Subject: [PATCH] Built motion from commit 1d5a56b.|0.0.148

From: Motion Team <[email-masked]>
Date: Wed, 26 Oct 2016 12:57:10 +0200

---
 public/app/4a68e305.app.js                         |   91 -
 public/app/fc371ddc.app.js                         |   91 +
 public/assets/plugins/jscripty/js/Actions.js       |  635 +-
 public/assets/plugins/jscripty/js/Dialogs.js       | 1195 +--
 public/assets/plugins/jscripty/js/Editor.js        |  889 +-
 public/assets/plugins/jscripty/js/EditorUi.js      | 1346 +--
 public/assets/plugins/jscripty/js/Graph.js         |  645 +-
 public/assets/plugins/jscripty/js/Menus.js         |  717 +-
 public/assets/plugins/jscripty/js/Shapes.js        | 1235 +--
 public/assets/plugins/jscripty/js/Sidebar.js       |  794 +-
 public/assets/plugins/jscripty/js/Toolbar.js       |  408 +-
 public/assets/plugins/jscripty/js/custom.js        |  284 +-
 public/assets/plugins/mxgraph/js/mxClient.js       |18738 +-------------------
 public/assets/plugins/square/js/Actions.js         |  639 +-
 public/assets/plugins/square/js/Dialogs.js         | 1277 +--
 public/assets/plugins/square/js/Editor.js          |  889 +-
 public/assets/plugins/square/js/EditorUi.js        | 1624 +--
 public/assets/plugins/square/js/Graph.js           |  645 +-
 public/assets/plugins/square/js/Menus.js           |  717 +-
 public/assets/plugins/square/js/Shapes.js          | 1235 +--
 public/assets/plugins/square/js/Sidebar.js         |  933 +-
 public/assets/plugins/square/js/Toolbar.js         |  408 +-
 public/assets/plugins/square/js/custom.js          |  308 +-
 public/index.html                                  |    2 +-
 release-notes/changelog_0.0.148.txt                |   10 +-
 server/api/_apidoc.js                              |   22 +-
 server/api/action/action.controller.js             |   89 +-
 server/api/action/action.events.js                 |   37 +-
 server/api/action/action.socket.js                 |   33 +-
 server/api/action/index.js                         |   14 +-
 server/api/agent/agent.controller.js               | 1145 +--
 server/api/agent/agent.events.js                   |   37 +-
 server/api/agent/agent.socket.js                   |   52 +-
 server/api/agent/index.js                          |  313 +-
 server/api/ami/ami.ami.js                          |   37 +-
 server/api/ami/ami.controller.js                   |   38 +-
 server/api/ami/ami.events.js                       |   37 +-
 server/api/ami/ami.socket.js                       |   33 +-
 server/api/ami/index.js                            |   13 +-
 server/api/automation/automation.controller.js     |  206 +-
 server/api/automation/automation.events.js         |   37 +-
 server/api/automation/automation.socket.js         |   29 +-
 server/api/automation/index.js                     |   17 +-
 .../api/canned_answer/canned_answer.controller.js  |  132 +-
 server/api/canned_answer/canned_answer.events.js   |   37 +-
 server/api/canned_answer/canned_answer.socket.js   |   29 +-
 server/api/canned_answer/index.js                  |   17 +-
 server/api/chanspy/chanspy.controller.js           |  108 +-
 server/api/chanspy/chanspy.events.js               |   37 +-
 server/api/chanspy/chanspy.socket.js               |   29 +-
 server/api/chanspy/index.js                        |   17 +-
 .../chat_application.controller.js                 |   98 +-
 .../chat_application/chat_application.events.js    |   37 +-
 .../chat_application/chat_application.socket.js    |   29 +-
 server/api/chat_application/index.js               |   18 +-
 .../chat_disposition.controller.js                 |  112 +-
 .../chat_disposition/chat_disposition.events.js    |   37 +-
 .../chat_disposition/chat_disposition.socket.js    |   33 +-
 server/api/chat_disposition/index.js               |   19 +-
 server/api/chat_enquiry/enquiry.controller.js      |  124 +-
 server/api/chat_enquiry/enquiry.events.js          |   37 +-
 server/api/chat_enquiry/enquiry.socket.js          |   29 +-
 server/api/chat_enquiry/index.js                   |   20 +-
 server/api/chat_message/chat_message.controller.js |  107 +-
 server/api/chat_message/chat_message.events.js     |   37 +-
 server/api/chat_message/chat_message.socket.js     |   63 +-
 server/api/chat_message/index.js                   |   19 +-
 .../chat_proactive_action.controller.js            |  113 +-
 .../chat_proactive_action.events.js                |   37 +-
 .../chat_proactive_action.socket.js                |   29 +-
 server/api/chat_proactive_action/index.js          |   18 +-
 server/api/chat_queue/chat_queue.controller.js     |  238 +-
 server/api/chat_queue/chat_queue.events.js         |   37 +-
 server/api/chat_queue/chat_queue.socket.js         |   29 +-
 server/api/chat_queue/index.js                     |   24 +-
 server/api/chat_room/chat_room.controller.js       |  656 +-
 server/api/chat_room/chat_room.events.js           |   37 +-
 server/api/chat_room/chat_room.socket.js           |   29 +-
 server/api/chat_room/index.js                      |   33 +-
 server/api/chat_visitor/chat_visitor.controller.js |  105 +-
 server/api/chat_visitor/chat_visitor.events.js     |   37 +-
 server/api/chat_visitor/chat_visitor.socket.js     |   29 +-
 server/api/chat_visitor/index.js                   |   18 +-
 server/api/chat_website/chat_website.controller.js |  580 +-
 server/api/chat_website/chat_website.events.js     |   37 +-
 server/api/chat_website/chat_website.socket.js     |   29 +-
 server/api/chat_website/index.js                   |   41 +-
 .../chat_websites_field.controller.js              |  113 +-
 .../chat_websites_field.events.js                  |   37 +-
 .../chat_websites_field.socket.js                  |   29 +-
 server/api/chat_websites_field/index.js            |   19 +-
 server/api/company/company.controller.js           |  147 +-
 server/api/company/company.events.js               |   37 +-
 server/api/company/company.socket.js               |   29 +-
 server/api/company/index.js                        |   19 +-
 .../contact_manager/contact_manager.controller.js  |  715 +-
 .../api/contact_manager/contact_manager.events.js  |   37 +-
 .../api/contact_manager/contact_manager.socket.js  |   29 +-
 server/api/contact_manager/index.js                |   24 +-
 .../api/custom_report/custom_report.controller.js  |  569 +-
 server/api/custom_report/custom_report.events.js   |   37 +-
 server/api/custom_report/custom_report.socket.js   |   29 +-
 server/api/custom_report/index.js                  |   25 +-
 server/api/dashboard/dashboard.controller.js       |  321 +-
 server/api/dashboard/dashboard.events.js           |   37 +-
 server/api/dashboard/dashboard.socket.js           |   29 +-
 server/api/dashboard/index.js                      |   20 +-
 .../default_metric/default_metric.controller.js    |  159 +-
 server/api/default_metric/index.js                 |   20 +-
 .../default_report/default_report.controller.js    |  393 +-
 server/api/default_report/default_report.events.js |   37 +-
 server/api/default_report/default_report.socket.js |   29 +-
 server/api/default_report/index.js                 |   22 +-
 server/api/desk_account/desk_account.controller.js |  256 +-
 server/api/desk_account/desk_account.events.js     |   37 +-
 server/api/desk_account/desk_account.socket.js     |   29 +-
 server/api/desk_account/index.js                   |   19 +-
 .../desk_configuration.controller.js               |  146 +-
 .../desk_configuration.events.js                   |   37 +-
 .../desk_configuration.socket.js                   |   29 +-
 server/api/desk_configuration/index.js             |   19 +-
 server/api/desk_field/desk_field.controller.js     |  105 +-
 server/api/desk_field/desk_field.events.js         |   37 +-
 server/api/desk_field/desk_field.socket.js         |   29 +-
 server/api/desk_field/index.js                     |   17 +-
 .../extracted_report.controller.js                 |  208 +-
 .../extracted_report/extracted_report.events.js    |   37 +-
 .../extracted_report/extracted_report.socket.js    |   29 +-
 server/api/extracted_report/index.js               |   18 +-
 server/api/fax_account/fax_account.controller.js   |  476 +-
 server/api/fax_account/fax_account.events.js       |   37 +-
 server/api/fax_account/fax_account.socket.js       |   29 +-
 server/api/fax_account/index.js                    |   32 +-
 .../fax_application/fax_application.controller.js  |   95 +-
 .../api/fax_application/fax_application.events.js  |   37 +-
 .../api/fax_application/fax_application.socket.js  |   29 +-
 server/api/fax_application/index.js                |   16 +-
 .../fax_attachment/fax_attachment.controller.js    |  141 +-
 server/api/fax_attachment/fax_attachment.events.js |   37 +-
 server/api/fax_attachment/fax_attachment.socket.js |   29 +-
 server/api/fax_attachment/index.js                 |   17 +-
 .../fax_disposition/fax_disposition.controller.js  |  113 +-
 .../api/fax_disposition/fax_disposition.events.js  |   37 +-
 .../api/fax_disposition/fax_disposition.socket.js  |   29 +-
 server/api/fax_disposition/index.js                |   17 +-
 server/api/fax_message/fax_message.ami.js          |   65 +-
 server/api/fax_message/fax_message.controller.js   |  176 +-
 server/api/fax_message/fax_message.events.js       |   37 +-
 server/api/fax_message/fax_message.socket.js       |   29 +-
 server/api/fax_message/index.js                    |   31 +-
 server/api/fax_queue/fax_queue.controller.js       |  214 +-
 server/api/fax_queue/fax_queue.events.js           |   37 +-
 server/api/fax_queue/fax_queue.socket.js           |   29 +-
 server/api/fax_queue/index.js                      |   22 +-
 server/api/fax_room/fax_room.controller.js         |  475 +-
 server/api/fax_room/fax_room.events.js             |   37 +-
 server/api/fax_room/fax_room.socket.js             |   70 +-
 server/api/fax_room/index.js                       |   32 +-
 .../freshdesk_account.controller.js                |  240 +-
 .../freshdesk_account/freshdesk_account.events.js  |   37 +-
 .../freshdesk_account/freshdesk_account.socket.js  |   29 +-
 server/api/freshdesk_account/index.js              |   22 +-
 .../freshdesk_configuration.controller.js          |  147 +-
 .../freshdesk_configuration.events.js              |   37 +-
 .../freshdesk_configuration.socket.js              |   29 +-
 server/api/freshdesk_configuration/index.js        |   20 +-
 .../freshdesk_field/freshdesk_field.controller.js  |  105 +-
 .../api/freshdesk_field/freshdesk_field.events.js  |   37 +-
 .../api/freshdesk_field/freshdesk_field.socket.js  |   29 +-
 server/api/freshdesk_field/index.js                |   19 +-
 server/api/integration/index.js                    |   16 +-
 server/api/integration/integration.controller.js   |  169 +-
 server/api/integration/integration.events.js       |   37 +-
 server/api/integration/integration.socket.js       |   29 +-
 server/api/interval/index.js                       |  202 +-
 server/api/interval/interval.controller.js         |  198 +-
 server/api/interval/interval.events.js             |   37 +-
 server/api/interval/interval.socket.js             |   29 +-
 server/api/jscripty_project/index.js               |   34 +-
 .../jscripty_project.controller.js                 | 1027 +--
 .../jscripty_project/jscripty_project.events.js    |   37 +-
 .../jscripty_project/jscripty_project.socket.js    |   29 +-
 server/api/license/index.js                        |   13 +-
 server/api/license/license.controller.js           |  136 +-
 server/api/list/index.js                           |   29 +-
 server/api/list/list.controller.js                 |  464 +-
 server/api/list/list.events.js                     |   37 +-
 server/api/list/list.socket.js                     |   29 +-
 server/api/mail_account/index.js                   |   32 +-
 server/api/mail_account/mail_account.controller.js |  529 +-
 server/api/mail_account/mail_account.events.js     |   37 +-
 server/api/mail_account/mail_account.socket.js     |   29 +-
 server/api/mail_application/index.js               |   18 +-
 .../mail_application.controller.js                 |  103 +-
 .../mail_application/mail_application.events.js    |   37 +-
 .../mail_application/mail_application.socket.js    |   29 +-
 server/api/mail_attachment/index.js                |   18 +-
 .../mail_attachment/mail_attachment.controller.js  |   98 +-
 .../api/mail_attachment/mail_attachment.events.js  |   37 +-
 .../api/mail_attachment/mail_attachment.socket.js  |   29 +-
 server/api/mail_disposition/index.js               |   19 +-
 .../mail_disposition.controller.js                 |  112 +-
 .../mail_disposition/mail_disposition.events.js    |   37 +-
 .../mail_disposition/mail_disposition.socket.js    |   29 +-
 server/api/mail_message/index.js                   |   22 +-
 server/api/mail_message/mail_message.controller.js |  208 +-
 server/api/mail_message/mail_message.events.js     |   37 +-
 server/api/mail_message/mail_message.socket.js     |   29 +-
 server/api/mail_queue/index.js                     |   22 +-
 server/api/mail_queue/mail_queue.controller.js     |  236 +-
 server/api/mail_queue/mail_queue.events.js         |   37 +-
 server/api/mail_queue/mail_queue.socket.js         |   29 +-
 server/api/mail_room/index.js                      |   33 +-
 server/api/mail_room/mail_room.controller.js       |  485 +-
 server/api/mail_room/mail_room.events.js           |   37 +-
 server/api/mail_room/mail_room.socket.js           |   29 +-
 server/api/mail_server_in/index.js                 |   18 +-
 .../mail_server_in/mail_server_in.controller.js    |   97 +-
 server/api/mail_server_in/mail_server_in.events.js |   37 +-
 server/api/mail_server_in/mail_server_in.socket.js |   43 +-
 server/api/mail_server_out/index.js                |   20 +-
 .../mail_server_out/mail_server_out.controller.js  |  158 +-
 .../api/mail_server_out/mail_server_out.events.js  |   37 +-
 .../api/mail_server_out/mail_server_out.socket.js  |   43 +-
 server/api/metric/index.js                         |   19 +-
 server/api/metric/metric.controller.js             |  136 +-
 server/api/metric/metric.events.js                 |   37 +-
 server/api/metric/metric.socket.js                 |   55 +-
 server/api/module/index.js                         |   12 +-
 server/api/module/module.controller.js             |   26 +-
 server/api/module/module.events.js                 |   37 +-
 server/api/module/module.socket.js                 |   29 +-
 server/api/motionbar/index.js                      |   12 +-
 server/api/motionbar/motionbar.controller.js       |   33 +-
 server/api/motionbar/motionbar.events.js           |   37 +-
 server/api/motionbar/motionbar.socket.js           |   31 +-
 server/api/network_externip/index.js               |   17 +-
 .../network_externip.controller.js                 |  132 +-
 .../network_externip/network_externip.events.js    |   37 +-
 .../network_externip/network_externip.socket.js    |   29 +-
 server/api/network_localnet/index.js               |   17 +-
 .../network_localnet.controller.js                 |  129 +-
 .../network_localnet/network_localnet.events.js    |   37 +-
 .../network_localnet/network_localnet.socket.js    |   29 +-
 server/api/openchannel_account/index.js            |   31 +-
 .../openchannel_account.controller.js              |  553 +-
 .../openchannel_account.events.js                  |   37 +-
 .../openchannel_account.socket.js                  |   33 +-
 server/api/openchannel_application/index.js        |   16 +-
 .../openchannel_application.controller.js          |  130 +-
 .../openchannel_application.events.js              |   37 +-
 .../openchannel_application.socket.js              |   33 +-
 server/api/openchannel_disposition/index.js        |   17 +-
 .../openchannel_disposition.controller.js          |  111 +-
 .../openchannel_disposition.events.js              |   37 +-
 .../openchannel_disposition.socket.js              |   33 +-
 server/api/openchannel_message/index.js            |   19 +-
 .../openchannel_message.controller.js              |  171 +-
 .../openchannel_message.events.js                  |   37 +-
 .../openchannel_message.socket.js                  |   48 +-
 server/api/openchannel_queue/index.js              |   23 +-
 .../openchannel_queue.controller.js                |  247 +-
 .../openchannel_queue/openchannel_queue.events.js  |   37 +-
 .../openchannel_queue/openchannel_queue.socket.js  |   33 +-
 server/api/openchannel_room/index.js               |   26 +-
 .../openchannel_room.controller.js                 |  400 +-
 .../openchannel_room/openchannel_room.events.js    |   37 +-
 .../openchannel_room/openchannel_room.socket.js    |   34 +-
 server/api/pause/index.js                          |  163 +-
 server/api/pause/pause.controller.js               |  151 +-
 server/api/pause/pause.events.js                   |   37 +-
 server/api/pause/pause.socket.js                   |   29 +-
 server/api/report_agent/index.js                   |   14 +-
 server/api/report_agent/report_agent.controller.js |  108 +-
 server/api/report_agent/report_agent.events.js     |   37 +-
 server/api/report_agent/report_agent.socket.js     |   31 +-
 server/api/report_call/index.js                    |   20 +-
 server/api/report_call/report_call.controller.js   |  177 +-
 server/api/report_call/report_call.events.js       |   37 +-
 server/api/report_call/report_call.socket.js       |   29 +-
 server/api/report_chat/index.js                    |   15 +-
 server/api/report_chat/report_chat.controller.js   |  164 +-
 server/api/report_chat/report_chat.events.js       |   37 +-
 server/api/report_chat/report_chat.socket.js       |   43 +-
 server/api/report_chat_session/index.js            |   20 +-
 .../report_chat_session.controller.js              |  226 +-
 .../report_chat_session.events.js                  |   37 +-
 .../report_chat_session.socket.js                  |  103 +-
 server/api/report_dial/index.js                    |   15 +-
 server/api/report_dial/report_dial.controller.js   |  117 +-
 server/api/report_dial/report_dial.events.js       |   37 +-
 server/api/report_dial/report_dial.socket.js       |   31 +-
 server/api/report_fax/index.js                     |   14 +-
 server/api/report_fax/report_fax.controller.js     |  106 +-
 server/api/report_fax/report_fax.events.js         |   37 +-
 server/api/report_fax/report_fax.socket.js         |   45 +-
 server/api/report_fax_session/index.js             |   16 +-
 .../report_fax_session.controller.js               |  239 +-
 .../report_fax_session.events.js                   |   37 +-
 .../report_fax_session.socket.js                   |  105 +-
 server/api/report_integration/index.js             |   15 +-
 .../report_integration.controller.js               |   62 +-
 .../report_integration.events.js                   |   35 +-
 .../report_integration.socket.js                   |   42 +-
 server/api/report_mail/index.js                    |   15 +-
 server/api/report_mail/report_mail.controller.js   |  114 +-
 server/api/report_mail/report_mail.events.js       |   37 +-
 server/api/report_mail/report_mail.socket.js       |   47 +-
 server/api/report_mail_session/index.js            |   17 +-
 .../report_mail_session.controller.js              |  156 +-
 .../report_mail_session.events.js                  |   37 +-
 .../report_mail_session.socket.js                  |  105 +-
 server/api/report_member/index.js                  |   13 +-
 .../api/report_member/report_member.controller.js  |   35 +-
 server/api/report_member/report_member.events.js   |   37 +-
 server/api/report_member/report_member.socket.js   |   46 +-
 server/api/report_openchannel/index.js             |   15 +-
 .../report_openchannel.controller.js               |  118 +-
 .../report_openchannel.events.js                   |   37 +-
 .../report_openchannel.socket.js                   |   46 +-
 server/api/report_openchannel_session/index.js     |   17 +-
 .../report_openchannel_session.controller.js       |  156 +-
 .../report_openchannel_session.events.js           |   37 +-
 .../report_openchannel_session.socket.js           |   91 +-
 server/api/report_queue/index.js                   |   28 +-
 server/api/report_queue/report_queue.controller.js |  624 +-
 server/api/report_queue/report_queue.events.js     |   37 +-
 server/api/report_queue/report_queue.socket.js     |   94 +-
 server/api/report_sms/index.js                     |   17 +-
 server/api/report_sms/report_sms.controller.js     |  180 +-
 server/api/report_sms/report_sms.events.js         |   37 +-
 server/api/report_sms/report_sms.socket.js         |   47 +-
 server/api/report_sms_session/index.js             |   17 +-
 .../report_sms_session.controller.js               |  156 +-
 .../report_sms_session.events.js                   |   37 +-
 .../report_sms_session.socket.js                   |  105 +-
 server/api/report_square/index.js                  |   15 +-
 .../api/report_square/report_square.controller.js  |   73 +-
 server/api/report_square/report_square.events.js   |   37 +-
 server/api/report_square/report_square.socket.js   |   45 +-
 server/api/report_square_detail/index.js           |   14 +-
 .../report_square_detail.controller.js             |   45 +-
 .../report_square_detail.events.js                 |   37 +-
 .../report_square_detail.socket.js                 |   46 +-
 server/api/report_tiger_dial/index.js              |   13 +-
 .../report_tiger_dial.controller.js                |   40 +-
 .../report_tiger_dial/report_tiger_dial.events.js  |   37 +-
 .../report_tiger_dial/report_tiger_dial.socket.js  |   46 +-
 server/api/report_tree/index.js                    |   13 +-
 server/api/report_tree/report_tree.controller.js   |   44 +-
 server/api/report_tree/report_tree.events.js       |   37 +-
 server/api/report_tree/report_tree.socket.js       |   33 +-
 server/api/salesforce_account/index.js             |   29 +-
 .../salesforce_account.controller.js               |  520 +-
 .../salesforce_account.events.js                   |   37 +-
 .../salesforce_account.socket.js                   |   33 +-
 server/api/salesforce_configuration/index.js       |   18 +-
 .../salesforce_configuration.controller.js         |  148 +-
 .../salesforce_configuration.events.js             |   37 +-
 .../salesforce_configuration.socket.js             |   33 +-
 server/api/salesforce_field/index.js               |   18 +-
 .../salesforce_field.controller.js                 |  105 +-
 .../salesforce_field/salesforce_field.events.js    |   37 +-
 .../salesforce_field/salesforce_field.socket.js    |   33 +-
 server/api/scheduler/index.js                      |   20 +-
 server/api/scheduler/scheduler.controller.js       |  131 +-
 server/api/scheduler/scheduler.events.js           |   37 +-
 server/api/scheduler/scheduler.socket.js           |   33 +-
 server/api/setting/index.js                        |   29 +-
 server/api/setting/setting.controller.js           |  418 +-
 server/api/setting/setting.events.js               |   37 +-
 server/api/setting/setting.socket.js               |   33 +-
 server/api/sms_account/index.js                    |   32 +-
 server/api/sms_account/sms_account.controller.js   |  678 +-
 server/api/sms_account/sms_account.events.js       |   37 +-
 server/api/sms_account/sms_account.socket.js       |   33 +-
 server/api/sms_application/index.js                |   16 +-
 .../sms_application/sms_application.controller.js  |  131 +-
 .../api/sms_application/sms_application.events.js  |   37 +-
 .../api/sms_application/sms_application.socket.js  |   33 +-
 server/api/sms_disposition/index.js                |   17 +-
 .../sms_disposition/sms_disposition.controller.js  |   96 +-
 .../api/sms_disposition/sms_disposition.events.js  |   37 +-
 .../api/sms_disposition/sms_disposition.socket.js  |   33 +-
 server/api/sms_message/index.js                    |   19 +-
 server/api/sms_message/sms_message.controller.js   |  171 +-
 server/api/sms_message/sms_message.events.js       |   37 +-
 server/api/sms_message/sms_message.socket.js       |   48 +-
 server/api/sms_queue/index.js                      |   22 +-
 server/api/sms_queue/sms_queue.controller.js       |  243 +-
 server/api/sms_queue/sms_queue.events.js           |   37 +-
 server/api/sms_queue/sms_queue.socket.js           |   33 +-
 server/api/sms_room/index.js                       |   27 +-
 server/api/sms_room/sms_room.controller.js         |  400 +-
 server/api/sms_room/sms_room.events.js             |   37 +-
 server/api/sms_room/sms_room.socket.js             |   34 +-
 server/api/sound/index.js                          |   18 +-
 server/api/sound/sound.controller.js               |  279 +-
 server/api/sound/sound.events.js                   |   37 +-
 server/api/sound/sound.socket.js                   |   33 +-
 server/api/square_odbc/index.js                    |   18 +-
 server/api/square_odbc/square_odbc.controller.js   |  136 +-
 server/api/square_odbc/square_odbc.events.js       |   37 +-
 server/api/square_odbc/square_odbc.socket.js       |   33 +-
 server/api/square_project/index.js                 |   18 +-
 .../square_project/square_project.controller.js    |  134 +-
 server/api/square_project/square_project.events.js |   37 +-
 server/api/square_project/square_project.socket.js |   33 +-
 server/api/square_recording/index.js               |   18 +-
 .../square_recording.controller.js                 |  184 +-
 .../square_recording/square_recording.events.js    |   37 +-
 .../square_recording/square_recording.socket.js    |   33 +-
 server/api/sugarcrm_account/index.js               |   21 +-
 .../sugarcrm_account.controller.js                 |  203 +-
 .../sugarcrm_account/sugarcrm_account.events.js    |   37 +-
 .../sugarcrm_account/sugarcrm_account.socket.js    |   33 +-
 server/api/sugarcrm_configuration/index.js         |   18 +-
 .../sugarcrm_configuration.controller.js           |  146 +-
 .../sugarcrm_configuration.events.js               |   37 +-
 .../sugarcrm_configuration.socket.js               |   33 +-
 server/api/sugarcrm_field/index.js                 |   18 +-
 .../sugarcrm_field/sugarcrm_field.controller.js    |  105 +-
 server/api/sugarcrm_field/sugarcrm_field.events.js |   37 +-
 server/api/sugarcrm_field/sugarcrm_field.socket.js |   33 +-
 server/api/tag/index.js                            |  172 +-
 server/api/tag/tag.controller.js                   |  210 +-
 server/api/tag/tag.events.js                       |   37 +-
 server/api/tag/tag.socket.js                       |   33 +-
 server/api/team/index.js                           |  248 +-
 server/api/team/team.controller.js                 |  253 +-
 server/api/team/team.events.js                     |   37 +-
 server/api/team/team.socket.js                     |   33 +-
 server/api/telephone/index.js                      |  175 +-
 server/api/telephone/telephone.controller.js       |  158 +-
 server/api/telephone/telephone.events.js           |   37 +-
 server/api/telephone/telephone.socket.js           |   33 +-
 server/api/template/index.js                       |  183 +-
 server/api/template/template.controller.js         |  109 +-
 server/api/template/template.events.js             |   37 +-
 server/api/template/template.socket.js             |   33 +-
 server/api/trigger/index.js                        |  262 +-
 server/api/trigger/trigger.controller.js           |  217 +-
 server/api/trigger/trigger.events.js               |   37 +-
 server/api/trigger/trigger.socket.js               |   33 +-
 server/api/trunk/index.js                          |  227 +-
 server/api/trunk/trunk.controller.js               |  112 +-
 server/api/trunk/trunk.events.js                   |   37 +-
 server/api/trunk/trunk.socket.js                   |   48 +-
 server/api/update/index.js                         |   15 +-
 server/api/update/update.controller.js             |   88 +-
 server/api/user/index.js                           |  262 +-
 server/api/user/user.controller.js                 |  710 +-
 server/api/user/user.events.js                     |   37 +-
 server/api/user/user.socket.js                     |   35 +-
 server/api/user_has_chat_queue/index.js            |   16 +-
 .../user_has_chat_queue.controller.js              |  104 +-
 .../user_has_chat_queue.events.js                  |   37 +-
 .../user_has_chat_queue.socket.js                  |   33 +-
 .../user_has_chat_queue_permit.events.js           |   36 +-
 .../user_has_chat_queue_permit.socket.js           |   35 +-
 server/api/user_has_chat_room/index.js             |   17 +-
 .../user_has_chat_room.controller.js               |   97 +-
 .../user_has_chat_room.events.js                   |   37 +-
 .../user_has_chat_room.socket.js                   |   61 +-
 server/api/user_has_fax_queue/index.js             |   16 +-
 .../user_has_fax_queue.controller.js               |  104 +-
 .../user_has_fax_queue.events.js                   |   37 +-
 .../user_has_fax_queue.socket.js                   |   33 +-
 .../user_has_fax_queue_permit.events.js            |   36 +-
 .../user_has_fax_queue_permit.socket.js            |   35 +-
 server/api/user_has_list/index.js                  |   16 +-
 .../api/user_has_list/user_has_list.controller.js  |   99 +-
 server/api/user_has_list/user_has_list.events.js   |   37 +-
 server/api/user_has_list/user_has_list.socket.js   |   33 +-
 server/api/user_has_mail_queue/index.js            |   16 +-
 .../user_has_mail_queue.controller.js              |   96 +-
 .../user_has_mail_queue.events.js                  |   37 +-
 .../user_has_mail_queue.socket.js                  |   33 +-
 .../user_has_mail_queue_permit.events.js           |   36 +-
 .../user_has_mail_queue_permit.socket.js           |   35 +-
 server/api/user_has_openchannel_queue/index.js     |   17 +-
 .../user_has_openchannel_queue.controller.js       |  110 +-
 .../user_has_openchannel_queue.events.js           |   37 +-
 .../user_has_openchannel_queue.socket.js           |   33 +-
 .../user_has_openchannel_queue_permit.events.js    |   36 +-
 .../user_has_openchannel_queue_permit.socket.js    |   35 +-
 server/api/user_has_sms_queue/index.js             |   16 +-
 .../user_has_sms_queue.controller.js               |  104 +-
 .../user_has_sms_queue.events.js                   |   37 +-
 .../user_has_sms_queue.socket.js                   |   33 +-
 .../user_has_sms_queue_permit.events.js            |   36 +-
 .../user_has_sms_queue_permit.socket.js            |   35 +-
 server/api/user_has_team/index.js                  |   16 +-
 .../api/user_has_team/user_has_team.controller.js  |   97 +-
 server/api/user_has_team/user_has_team.events.js   |   37 +-
 server/api/user_has_team/user_has_team.socket.js   |   33 +-
 server/api/user_has_voice_queue/index.js           |   13 +-
 .../user_has_voice_queue.controller.js             |   21 +-
 .../user_has_voice_queue.events.js                 |   37 +-
 .../user_has_voice_queue.socket.js                 |   59 +-
 .../user_has_voice_queue_permit.events.js          |   36 +-
 .../user_has_voice_queue_permit.socket.js          |   35 +-
 server/api/variable/index.js                       |  167 +-
 server/api/variable/variable.controller.js         |  118 +-
 server/api/variable/variable.events.js             |   37 +-
 server/api/variable/variable.socket.js             |   33 +-
 server/api/voice_context/index.js                  |   17 +-
 .../api/voice_context/voice_context.controller.js  |  228 +-
 server/api/voice_context/voice_context.events.js   |   37 +-
 server/api/voice_context/voice_context.socket.js   |   33 +-
 server/api/voice_disposition/index.js              |   19 +-
 .../voice_disposition.controller.js                |  113 +-
 .../voice_disposition/voice_disposition.events.js  |   37 +-
 .../voice_disposition/voice_disposition.socket.js  |   33 +-
 server/api/voice_extension/index.js                |   17 +-
 .../voice_extension/voice_extension.controller.js  |  149 +-
 .../api/voice_extension/voice_extension.events.js  |   37 +-
 .../api/voice_extension/voice_extension.socket.js  |   33 +-
 server/api/voice_musiconhold/index.js              |   22 +-
 .../voice_musiconhold.controller.js                |  291 +-
 .../voice_musiconhold/voice_musiconhold.events.js  |   37 +-
 .../voice_musiconhold/voice_musiconhold.socket.js  |   33 +-
 server/api/voice_queue/index.js                    |   21 +-
 server/api/voice_queue/voice_queue.controller.js   |  305 +-
 server/api/voice_queue/voice_queue.events.js       |   37 +-
 server/api/voice_queue/voice_queue.socket.js       |   87 +-
 server/api/voice_recording/index.js                |   20 +-
 .../voice_recording/voice_recording.controller.js  |  249 +-
 .../api/voice_recording/voice_recording.events.js  |   37 +-
 .../api/voice_recording/voice_recording.socket.js  |   33 +-
 server/api/voice_voicemail/index.js                |   18 +-
 .../voice_voicemail/voice_voicemail.controller.js  |  191 +-
 .../api/voice_voicemail/voice_voicemail.events.js  |   37 +-
 .../api/voice_voicemail/voice_voicemail.socket.js  |   33 +-
 server/api/voice_voicemail_messages/index.js       |   16 +-
 .../voice_voicemail_messages.controller.js         |  107 +-
 .../voice_voicemail_messages.events.js             |   37 +-
 .../voice_voicemail_messages.socket.js             |   33 +-
 server/api/widget/index.js                         |   14 +-
 server/api/widget/widget.controller.js             |  148 +-
 server/api/xchatty/index.js                        |   29 +-
 server/api/xchatty/xchatty.controller.js           | 1234 +--
 server/api/zendesk_account/index.js                |   29 +-
 .../zendesk_account/zendesk_account.controller.js  |  516 +-
 .../api/zendesk_account/zendesk_account.events.js  |   37 +-
 .../api/zendesk_account/zendesk_account.socket.js  |   33 +-
 server/api/zendesk_configuration/index.js          |   17 +-
 .../zendesk_configuration.controller.js            |  182 +-
 .../zendesk_configuration.events.js                |   37 +-
 .../zendesk_configuration.socket.js                |   33 +-
 server/api/zendesk_field/index.js                  |   15 +-
 .../api/zendesk_field/zendesk_field.controller.js  |   94 +-
 server/api/zendesk_field/zendesk_field.events.js   |   37 +-
 server/api/zendesk_field/zendesk_field.socket.js   |   33 +-
 server/app.js                                      |  136 +-
 server/auth/auth.service.js                        |  151 +-
 server/auth/facebook/index.js                      |   22 +-
 server/auth/facebook/passport.js                   |   38 +-
 server/auth/google/index.js                        |   25 +-
 server/auth/google/passport.js                     |   34 +-
 server/auth/index.js                               |   23 +-
 server/auth/local/index.js                         |  214 +-
 server/auth/local/local.ami.js                     |   52 +-
 server/auth/local/passport.js                      |   43 +-
 server/auth/twitter/index.js                       |   21 +-
 server/auth/twitter/passport.js                    |   36 +-
 server/config/agi/agi.js                           | 1850 +--
 server/config/agi/index.js                         |  132 +-
 server/config/ami/action.js                        |  783 +-
 server/config/ami/acw.js                           |  198 +-
 server/config/ami/agent.js                         |  127 +-
 server/config/ami/ami.js                           |  370 +-
 server/config/ami/call.js                          |   71 +-
 server/config/ami/cleaner.js                       |  152 +-
 server/config/ami/dial.js                          |  111 +-
 server/config/ami/fax.js                           |  655 +-
 server/config/ami/index.js                         |  255 +-
 server/config/ami/member.js                        |  105 +-
 server/config/ami/network.js                       |   92 +-
 server/config/ami/queue_caller.js                  |  109 +-
 server/config/ami/queue_member.js                  |  100 +-
 server/config/ami/recording.js                     |   84 +-
 server/config/ami/transfer.js                      |   57 +-
 server/config/ami/trunk.js                         |  195 +-
 server/config/ami/user.js                          |  111 +-
 server/config/ami/voice_context.js                 |   96 +-
 server/config/analytics.js                         |    1 +
 server/config/autodialer/index.js                  |  126 +-
 server/config/autodialer/process.js                |   27 +-
 server/config/automations/chat.js                  |  191 +-
 server/config/automations/fax.js                   |  192 +-
 server/config/automations/mail.js                  |  192 +-
 server/config/chat.js                              |  110 +-
 server/config/express.js                           |   81 +-
 server/config/fax.js                               |  241 +-
 server/config/history/history.js                   |  132 +-
 server/config/history/reportMove.js                |   51 +-
 server/config/imap/imap.js                         |  106 +-
 server/config/imap/index.js                        |  604 +-
 server/config/integration.js                       |   25 +-
 server/config/integrations/index.js                |   88 +-
 server/config/integrations/motionbar.js            |  102 +-
 server/config/integrations/salesforce.js           |  584 +-
 server/config/integrations/zendesk.js              |  638 +-
 server/config/license/hardware.js                  |   60 +-
 server/config/license/index.js                     |   88 +-
 server/config/license/license.service.js           |  366 +-
 server/config/local.env.sample.js                  |   24 +-
 server/config/logger.js                            |  121 +-
 server/config/openchannel/custom.js                |  275 +-
 server/config/openchannel/index.js                 |   24 +-
 server/config/routing/agent.js                     |  119 +-
 server/config/routing/fidelity.js                  |  106 +-
 server/config/routing/queue.js                     |  302 +-
 server/config/routing/replyMail.js                 |   87 +-
 server/config/routing/scheduler.js                 |  347 +-
 server/config/routing/sendMail.js                  |   83 +-
 server/config/routing/sendSms.js                   |   57 +-
 server/config/routing/structure.js                 |  141 +-
 server/config/scheduler/index.js                   |  104 +-
 server/config/scheduler/reports.js                 |  229 +-
 server/config/seed.js                              | 4006 +-----
 server/config/seedp.js                             | 8018 +---------
 server/config/sms/index.js                         |   24 +-
 server/config/sms/skebby.js                        |  111 +-
 server/config/sms/sms.js                           |  286 +-
 server/config/sms/twilio.js                        |   23 +-
 server/config/smtp/index.js                        |  132 +-
 server/config/smtp/smtp.js                         |  397 +-
 server/config/socketio.js                          |  316 +-
 server/config/tools/channelSpy.js                  |  110 +-
 server/config/tools/chatRoom.js                    |  105 +-
 server/config/tools/dashboard.js                   | 1249 +--
 server/config/tools/faxAccount.js                  |  258 +-
 server/config/tools/faxRoom.js                     |   36 +-
 server/config/tools/index.js                       |   27 +-
 server/config/tools/interval.js                    |   75 +-
 server/config/tools/mailAccount.js                 |   41 +-
 server/config/tools/mailRoom.js                    |   36 +-
 server/config/tools/openchannelRoom.js             |   27 +-
 server/config/tools/queueParameters.js             |  385 +-
 server/config/tools/smsRoom.js                     |   27 +-
 server/config/tools/system.js                      |   61 +-
 server/config/tools/user.js                        |  220 +-
 server/config/triggers/chat.js                     |  142 +-
 server/config/triggers/cm.js                       |   26 +-
 server/config/triggers/index.js                    |  355 +-
 server/config/triggers/jscripty.js                 |   22 +-
 server/config/triggers/mail.js                     |  222 +-
 server/config/triggers/sms.js                      |   66 +-
 server/config/triggers/urlForward.js               |   76 +-
 server/config/triggers/util.js                     |  119 +-
 server/config/triggers/voice.js                    |    8 +-
 server/config/util/error.js                        |   25 +-
 server/config/util/index.js                        |  785 +-
 .../20160801125118-placeholder.js                  |   24 +-
 .../20160916135658-report-session.js               |   20 +-
 .../20160920170835-report_tdial.js                 |   15 +-
 .../20161005162141-report_tdial_history.js         |  473 +-
 server/routes.js                                   |  172 +-
 server/services/dashboard/hooks/index.js           |   13 +-
 server/services/dashboard/hooks/voice.js           |   90 +-
 server/services/dashboard/index.js                 |   20 +-
 server/services/dashboard/workers/index.js         |  194 +-
 server/services/dashboard/workers/voice.js         |  227 +-
 server/utils/report_build.js                       |  547 +-
 server/utils/report_extraction.js                  |  300 +-
 server/utils/voice_extension.js                    |  322 +-
 668 files changed, 761 insertions(+), 111606 deletions(-)
 delete mode 100644 public/app/4a68e305.app.js
 create mode 100644 public/app/fc371ddc.app.js

diff --git a/public/app/4a68e305.app.js b/public/app/4a68e305.app.js
deleted file mode 100644
index ffa2b7c..0000000
--- a/public/app/4a68e305.app.js
+++ /dev/null
@@ -1,91 +0,0 @@
-"use strict";angular.module("xCallyShuttleApp",["adf","adf.structures.base","adf.widget.clock","adf.widget.iframe","adf.widget.counter","adf.widget.pie-chart","angular-md5","angular.filter","angularFileUpload","ngLetterAvatar","vAccordion","btford.socket-io","chart.js","checklist-model","colorpicker.module","frapontillo.bootstrap-switch","LocalStorageModule","mgo-angular-wizard","ng-slide-down","ngAnimate","ngBootstrap","ngCookies","ngCsv","ngFileSaver","ngJsTree","ngMap","ngPapaParse","ngResource","ngSanitize","notification","oc.lazyLoad","pascalprecht.translate","remoteValidation","smart-table","sprintf","timer","toastr","permission","ui-notification","ui.bootstrap.modal","ui.bootstrap.dropdown","ui.bootstrap.popover","ui.bootstrap.timepicker","ui.bootstrap.tooltip","ui.bootstrap.tpls","ui.bootstrap.accordion","ui.bootstrap.progressbar","ui.bootstrap.buttons","ui.bootstrap.typeahead","ui.grid","ui.grid.autoResize","ui.grid.draggable-rows","ui.grid.exporter","ui.grid.grouping","ui.grid.moveColumns","ui.grid.pagination","ui.grid.treeView","ui.grid.selection","ui.grid.exporter","ui.grid.resizeColumns","ui.router","ui.navbar","ui.select","ui.sortable","xeditable","ngAudio","truncate","ngScrollbars","ngEmoticons","angularSpinner","builder","builder.components","validator","angular-clipboard","ng-code-mirror","angularMoment","jsonFormatter","ui.bootstrap-slider","ui.bootstrap.datepicker","prettyBytes","bootstrapLightbox","rzModule","ckeditor","ngTagsInput","ngJoyRide","adf.widget.linklist"]).constant("CKEDITOR_BASEPATH","assets/plugins/ckeditor/").config(["$stateProvider","$urlRouterProvider","$locationProvider","$httpProvider","$translateProvider","localStorageServiceProvider","dashboardProvider","ScrollBarsProvider","tagsInputConfigProvider",function(a,b,c,d,e,f,g,h,i){i.setActiveInterpolation("tagsInput",{placeholder:!0}),b.otherwise(function(a){var b=a.get("$state");b.go("landing")}),e.useStaticFilesLoader({prefix:"assets/languages/locale-",suffix:".json"}),e.preferredLanguage("en_EN"),e.fallbackLanguage("en_EN"),e.useLocalStorage(),e.useSanitizeValueStrategy(null),c.html5Mode(!0),d.interceptors.push("authInterceptor"),g.structure("4-4-4",{rows:[{columns:[{styleClass:"col-md-4"},{styleClass:"col-md-4"},{styleClass:"col-md-4"}]}]}).structure("3-3-3-3",{rows:[{columns:[{styleClass:"col-md-3"},{styleClass:"col-md-3"},{styleClass:"col-md-3"},{styleClass:"col-md-3"}]}]}),f.setPrefix("motion"),h.defaults={scrollButtons:{scrollAmount:"auto",enable:!0},axis:"y"}}]).factory("authInterceptor",["$rootScope","$q","$cookieStore","$location",function(a,b,c,d){return{request:function(a){return a.headers=a.headers||{},c.get("token")?a.headers.Authorization="Bearer "+c.get("token"):d.path().match(/\/reset\/.[0-9]*/)||d.path("/login"),a}}}]).run(["$rootScope","$location","$state","$stateParams","$window","$q","Auth","RoleStore","editableThemes","editableOptions","License","User","PermissionStore","localStorageService",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){a.$state=c,a.$stateParams=d,i.bs3.inputClass="input-sm",i.bs3.buttonsClass="btn-xs",j.theme="bs3",a.$on("$stateChangeStart",function(a,c){g.isLoggedInAsync(function(a){!c.authenticate||a||b.path().match(/\/reset\/.[0-9]*/)||b.path("/login")})}),a.updateTableConfig=function(a,b){var c=_.find(a,{name:"All"});c&&(c.value=b)},a.settings={patternName:"[A-Za-z0-9._\\+*!\\-\\[\\]]+",patternPassword:"^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\\-_=+\\[\\{\\]\\}.])[0-9a-zA-Z~!@#$%^&\\-_=+\\[\\{\\]\\}.]{8,}$",patternPasswordLight:"^[a-zA-Z0-9~!@#$%^&\\-_=+\\[\\{\\]\\}.]{6,}$",patternGateway:"^(?:yes|no|[0-9]+)$",patternFaxdetect:"^(?:yes|no|t38|cng|[0-9]+)$",layout:{pageSidebarClosed:n.get("sidebarClosed")||!1,pageQuickSidebarOpened:!1,pageBodySolid:!1,pageAutoScrollOnLoad:1e3}},k.get().$promise.then(function(b){a.license=b.license,a.settings.soundPath=b.soundPath||"/var/opt/motion/server/files/sounds/converted",a.settings.logo=b.logo,a.settings.defaultLogo=b.defaultLogo,a.settings.loginLogo=b.loginLogo,a.settings.defaultLoginLogo=b.defaultLoginLogo,a.settings.footerWhiteLabel=b.footerWhiteLabel,a.settings.defaultFooterWhiteLabel=b.defaultFooterWhiteLabel,m.definePermission("hasCm",function(){return a.license.cm}),m.definePermission("hasChat",function(){return a.license.chat}),m.definePermission("hasMail",function(){return a.license.mail}),m.definePermission("hasFax",function(){return a.license.fax}),m.definePermission("hasSms",function(){return a.license.messaging}),m.definePermission("hasDialer",function(){return a.license.dialer}),m.definePermission("hasJscripty",function(){return a.license.jscripty}),m.definePermission("hasUpdate",function(){return a.license.update}),m.definePermission("hasCustom",function(){return a.license.custom}),m.definePermission("hasOpenChannel",function(){return a.license.openchannel})})["catch"](function(a){console.log(a)}),m.definePermission("agent",function(){return g.isAgent()}),m.definePermission("admin",function(){return g.isAdmin()}),m.definePermission("user",function(a,b){var c=f.defer(),d=g.getCurrentUser().$promise;return d?d.then(function(a){_.includes(_.map(a.Modules,"id"),b.toState.data.permissions.id)&&"user"===a.role?c.resolve():c.reject()})["catch"](function(){c.reject()}):c.resolve(),c.promise})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics",{url:"/analytics",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:17}}})}]),angular.module("xCallyShuttleApp").factory("Extracted",["$resource",function(a){return a("/api/analytics/extracted/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.extracted",{url:"/extracted",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("AnalyticExtractedListCtrl",["$scope","$translate","gridOptions","Extracted","uiGridConstants",function(a,b,c,d,e){a.moment=moment,a.Extracted=d,a.initView=function(){var b={exporterCsvFilename:"ExtractedReports.csv",columnDefs:[{name:"name"},{name:"startDate",displayName:"APPLICATION_START_DATE",filterHeaderTemplate:'<div class="ui-grid-filter-container row"><div ng-repeat="colFilter in col.filters" class="col-md-6 col-md-offset-0 col-sm-5 col-sm-offset-0 col-xs-5 col-xs-offset-0"><div custom-grid-date-filter-header></div></div></div>',filters:[{name:"From",condition:e.filter.GREATER_THAN_OR_EQUAL,hasTime:!0},{name:"To",condition:e.filter.LESS_THAN_OR_EQUAL,hasTime:!0}],sort:{direction:e.DESC,priority:0}},{name:"endDate",displayName:"APPLICATION_END_DATE",filterHeaderTemplate:'<div class="ui-grid-filter-container row"><div ng-repeat="colFilter in col.filters" class="col-md-6 col-md-offset-0 col-sm-5 col-sm-offset-0 col-xs-5 col-xs-offset-0"><div custom-grid-date-filter-header></div></div></div>',filters:[{name:"From",condition:e.filter.GREATER_THAN_OR_EQUAL,hasTime:!0},{name:"To",condition:e.filter.LESS_THAN_OR_EQUAL,hasTime:!0}]},{name:"createdAt",displayName:"APPLICATION_RUN_DATE",filterHeaderTemplate:'<div class="ui-grid-filter-container row"><div ng-repeat="colFilter in col.filters" class="col-md-6 col-md-offset-0 col-sm-5 col-sm-offset-0 col-xs-5 col-xs-offset-0"><div custom-grid-date-filter-header></div></div></div>',filters:[{name:"From",condition:e.filter.GREATER_THAN_OR_EQUAL,hasTime:!0},{name:"To",condition:e.filter.LESS_THAN_OR_EQUAL,hasTime:!0}]},{name:"output"},{name:"type"},{name:"status"},{name:"action",width:140,buttons:[{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"},{directive:"<motion-file-download data-ng-show=\"row.entity.status == 'completed'\" resource=\"grid.appScope.Extracted\" params=\"{id:row.entity.id,controller:'download'}\" mimetype=\"'application/'+row.entity.output.toLowerCase()\" filename=\"row.entity.name+'_'+row.entity.startDate.toString()+'_'+row.entity.endDate.toString()+'.'+row.entity.output.toLowerCase()\"></motion-file-download>"}]}]};a.gridOptions=c.gridOptions(d,b,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.extracted.list",{url:"/list",templateUrl:"app/analytic/extracted/list/list.html",controller:"AnalyticExtractedListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("DefaultMetric",["$resource",function(a){return a("/api/analytics/metrics/default/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("AnalyticMetricListCreateModalCtrl",["$scope","$uibModalInstance","Metric","xAlert","$translate","report",function(a,b,c,d,e,f){a.forms={dashboard:void 0},a.item={},a.tables=f.tables,a.ok=function(){return c.save(a.item).$promise.then(function(){b.close()})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("AnalyticMetricListCtrl",["$scope","xAlert","Modal","$uibModal","$log","gridOptions","Metric","DefaultMetric","$translate",function(a,b,c,d,e,f,g,h,i){a.$translate=i,a.initView=function(){var b={exporterCsvFilename:"Metrics.csv",columnDefs:[{name:"name"},{name:"table",cellTemplate:"<div style=\"padding:5px\">{{'APPLICATION_'+row.entity.table.toUpperCase() | translate}}</div>"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/analytics/metrics/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=f.gridOptions(g,b,a)},a.showMetric=function(a){d.open({animation:!0,templateUrl:"app/analytic/metric/list/view.modal.html",controller:"AnalyticMetricListViewModalCtrl",resolve:{metric:a}})},a.cloneMetric=function(c){return h.get({id:c,controller:"clone"}).$promise.then(function(){b.show(i.instant("MESSAGE_WELL_DONE"),"success"),a.gridOptions.getPage()})["catch"](function(a){b.error(a)})},a.create=function(){var c=d.open({animation:!0,templateUrl:"app/analytic/metric/list/create.modal.html",controller:"AnalyticMetricListCreateModalCtrl"});c.result.then(function(){b.show(i.instant("MESSAGE_WELL_DONE")+"!","success"),a.gridOptions.getPage()},function(){e.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.metrics.list",{url:"/list",templateUrl:"app/analytic/metric/list/list.html",controller:"AnalyticMetricListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("AnalyticMetricListViewModalCtrl",["$scope","$uibModalInstance","metric","xAlert","$translate","report",function(a,b,c,d,e,f){a.item=c,a.tables=f.tables,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").factory("Metric",["$resource",function(a){return a("/api/analytics/metrics/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.metrics",{url:"/metrics",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("AnalyticMetricViewCtrl",["$scope","xAlert","$translate","$stateParams","$location","Metric","report",function(a,b,c,d,e,f,g){a.tables=g.tables,a.getMetric=function(){return f.get({id:d.id}).$promise.then(function(b){a.metric=b})["catch"](function(a){e.path("/analytics/metrics/list")})},a.updateMetric=function(){return f.update({id:d.id},a.metric).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.metrics.view",{url:"/view/:id",templateUrl:"app/analytic/metric/view/view.html",controller:"AnalyticMetricViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.analytics.metrics.view.settings",{url:"/settings",templateUrl:"app/analytic/metric/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("CustomReport",["$resource",function(a){return a("/api/analytics/reports/custom/:precontroller/:id/:controller/:action",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("DefaultReport",["$resource",function(a){return a("/api/analytics/reports/default/:id/:controller/:action",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("ReportListCopyModalCtrl",["$scope","$uibModalInstance","$log","customTreeData",function(a,b,c,d){a.customTreeData=d,a.forms={dashboard:void 0},a.customTreeConfig={multiple:!1,animation:!0,core:{error:function(a){c.error("treeCtrl: error from js tree - "+angular.toJson(a))},check_callback:!0}},a.ac=function(){return!0},a.initCustomScopeTree=function(){a.customTree=a.customTreeInstance.jstree(!0),a.customTree.deselect_all(),a.customTree.open_all()},a.ok=function(){a.customTree.get_selected(!0).length?b.close({parent:a.customTree.get_selected(!0).pop().id}):a.showAlert=!0},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ReportListCreateModalCtrl",["$scope","$uibModalInstance","path",function(a,b,c){a.path=c,a.forms={dashboard:void 0},a.item={},a.ok=function(){a.item.model=JSON.stringify({title:a.item.name}),b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ReportListExtractModalCtrl",["$scope","$uibModalInstance","$translate",function(a,b,c){a.daily=!1,a.dailySwitch={onText:c.instant("APPLICATION_TODAY"),offText:c.instant("APPLICATION_RANGE"),isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"primary"},a.dates={startDate:moment().subtract(1,"days").startOf("day"),endDate:moment().subtract(1,"days").endOf("day")},a.ranges={},a.ranges[c.instant("APPLICATION_YESTERDAY")]=[moment().subtract(1,"days").startOf("day"),moment().subtract(1,"days").endOf("day")],a.ranges[c.instant("APPLICATION_LAST_SEVEN_DAYS")]=[moment().subtract("days",7).startOf("day"),moment().subtract(1,"days").endOf("day")],a.ranges[c.instant("APPLICATION_LAST_THIRTY_DAYS")]=[moment().subtract("days",30),moment()],a.ranges[c.instant("APPLICATION_LAST_MONTH")]=[moment().subtract(1,"months").startOf("month"),moment().subtract(1,"months").endOf("month")],a.timepicker={timePickerIncrement:1,timePicker12Hour:!1},a.dailyTime={start:moment("00:00","HH:mm"),end:moment("23:59","HH:mm")},a.maxdate=moment().subtract(1,"days").endOf("day").format("YYYY-MM-DD HH:mm"),a.extract=function(c){var d={startDate:moment(a.dates.startDate).format("YYYY-MM-DD"),endDate:moment(a.dates.endDate).format("YYYY-MM-DD"),startTime:a.daily?moment(a.dailyTime.start).format("HH:mm"):moment(a.dates.startDate).format("HH:mm"),endTime:a.daily?moment(a.dailyTime.end).format("HH:mm"):moment(a.dates.endDate).format("HH:mm"),daily:a.daily,action:c};b.close(d)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("AnalyticReportListCtrl",["$scope","xAlert","$translate","$location","$log","Modal","$uibModal","FileSaver","Blob","gridOptions","CustomReport","DefaultReport","ReportTree","localStorageService",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){function o(){var b=n.get("lastMotionReportNode")||!1,c=n.get("lastMotionReportTree")||!1;return b&&c?(a[c+"Tree"].open_node({id:b}),a[c+"Tree"].select_node({id:b}),!0):!1}function p(b,c){var d={parent:c.id};a.selectedNode=b?a.defaultTree.get_path(c," / "):a.customTree.get_path(c," / "),a.gridOptions?a.gridOptions.getPage({parent:c.id},b?l:k):a.gridOptions=j.gridOptions(b?l:k,q,a,d)}var q={exporterCsvFilename:"reports.csv",columnDefs:[{name:"name"},{name:"description"},{name:"manage",width:120,buttons:[{"class":"{{grid.appScope.defaultTreeActive ? 'display-none' : 'blue-hoki'}}",href:"/analytics/reports/view/{{row.entity.id}}/settings",title:c.instant("APPLICATION_SETTINGS"),name:"settings"},{"class":"{{grid.appScope.defaultTreeActive ? 'display-none' : 'red-sunglo'}}",title:c.instant("APPLICATION_DELETE"),name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"},{"class":"green",title:c.instant("APPLICATION_COPY"),name:"copy",onClick:"grid.appScope.copy(row.entity.id)"},{"class":"purple",title:c.instant("APPLICATION_EXPORT"),name:"export",onClick:"grid.appScope.export(row.entity.id)"}]},{name:"actions",width:60,buttons:[{"class":"yellow",name:"preview",title:c.instant("APPLICATION_PREVIEW"),onClick:"grid.appScope.preview(row.entity.id)"},{"class":"green-turquoise",name:"run",title:c.instant("APPLICATION_RUN"),onClick:"grid.appScope.extract(row.entity.id)"}]}]};a.searchField="",a.ac=function(){return!0},a.initDefaultScopeTree=function(){a.defaultTree=a.defaultTreeInstance.jstree(!0),a.defaultTree.deselect_all(),a.defaultTree.close_all(),a.defaultTreeReady=!0,a.defaultTreeActive=!0,a.previousDefaultNode=""},a.initCustomScopeTree=function(){a.customTree=a.customTreeInstance.jstree(!0),a.customTree.deselect_all(),a.customTree.close_all(),a.customTreeReady=!0,a.previousCustomNode=""},a.$watchGroup(["defaultTreeReady","customTreeReady"],function(b,c,d){b[0]&&b[1]&&(o()||(a.defaultTree.open_node({id:1}),a.customTree.open_node({id:1}),a.defaultTree.select_node({id:"1"})))}),a.updateCustomTree=function(){var c={tree:angular.toJson(a.customTree.get_json("#",{flat:!0}))};return m.update({id:2},c).$promise.then(function(a){console.log("Custom Tree Updated")})["catch"](function(a){b.error(a)})},a.configTrees=function(){a.defaultTreeConfig={multiple:!1,animation:!0,core:{error:function(a){e.error("treeCtrl: error from js tree - "+angular.toJson(a))},check_callback:!0,themes:{name:"default",url:"../../../assets/css/jstree-metronic/style.css"}},plugins:["search"]},a.customTreeConfig={multiple:!1,animation:!0,core:{error:function(a){e.error("treeCtrl: error from js tree - "+angular.toJson(a))},check_callback:function(a,b,c,d,e){return console.log(a),!0},themes:{name:"default",url:"../../../assets/css/jstree-metronic/style.css"}},plugins:["contextmenu","dnd","search"],contextmenu:{items:function(b,d){var e={create:{label:c.instant("APPLICATION_CREATE"),action:function(c){a.customTree.create_node(b),a.customTree.open_node(b)}},rename:{label:c.instant("APPLICATION_RENAME"),action:function(c){a.customTree.edit(b)}},remove:{label:c.instant("APPLICATION_REMOVE"),action:function(c){a.deleteNode(b)}}};return"#"===b.parent&&(delete e.rename,delete e.remove),d(e),e}}}},a.deleteNode=function(d){var f=g.open({animation:!0,templateUrl:"app/analytic/report/list/deleteNode.modal.html",controller:["$scope","$uibModalInstance","node",function(a,b,c){a.node=c,a.ok=function(){b.close()},a.cancel=function(){b.dismiss("cancel")}}],resolve:{node:function(){return d.text}}});f.result.then(function(){return k["delete"]({precontroller:"node",id:d.id}).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE"),"success"),a.customTree.delete_node(d),a.previousCustomNode==d.id&&a.customTree.select_node({id:d.parent})})["catch"](function(a){b.error(a)})},function(){e.info("Modal dismissed at: "+new Date)})},a.searchTrees=function(){a.defaultTree.search(a.searchField),a.customTree.search(a.searchField)},a.selectDefaultNode=function(){if(a.customTreeReady){a.previousCustomNode="";var b=a.defaultTree.get_selected(!0),c=b.pop();if(a.defaultTree.deselect_node(b[0],!0),a.customTree.deselect_all(),a.defaultTree.select_node(c,!0),c.id===a.previousDefaultNode)return void console.log("def");a.previousDefaultNode=c.id,n.set("lastMotionReportNode",c.id),n.set("lastMotionReportTree","default"),a.defaultTreeActive=!0,p(!0,c)}},a.selectCustomNode=function(){if(a.defaultTreeReady){a.previousDefaultNode="";var b=a.customTree.get_selected(!0),c=b.pop();if(a.customTree.deselect_node(b[0],!0),a.defaultTree.deselect_all(),a.customTree.select_node(c,!0),c.id===a.previousCustomNode)return void console.log("cus");a.previousCustomNode=c.id,n.set("lastMotionReportNode",c.id),n.set("lastMotionReportTree","custom"),a.defaultTreeActive=!1,p(!1,c)}},a.getTrees=function(){return m.query().$promise.then(function(b){a.defaultTreeData=JSON.parse(b[0].tree),a.customTreeData=JSON.parse(b[1].tree),a.configTrees()})["catch"](function(a){b.error(a)})},a.create=function(){var c=g.open({animation:!0,templateUrl:"app/analytic/report/list/create.modal.html",controller:"ReportListCreateModalCtrl",resolve:{path:function(){return a.selectedNode}}});c.result.then(function(c){return c.parent=a.previousCustomNode,k.save(c).$promise.then(function(a){d.path("/analytics/reports/view/"+a.id+"/settings")})["catch"](function(a){b.error(a)})},function(){e.info("Modal dismissed at: "+new Date)})},a.copy=function(d){var f=a.defaultTreeActive?l:k,h=g.open({animation:!0,templateUrl:"app/analytic/report/list/copy.modal.html",controller:"ReportListCopyModalCtrl",resolve:{customTreeData:function(){return a.customTree.get_json("#",{flat:!0})}}});h.result.then(function(e){return f.save({id:d,controller:"copy"},e).$promise.then(function(){a.gridOptions.getPage(),b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.error(a)})},function(){e.info("Modal dismissed at: "+new Date)})},a["export"]=function(c){var d=a.defaultTreeActive?l:k;return d.get({id:c,controller:"export"}).$promise.then(function(a){var b=new i([angular.toJson(a)],{type:"application/json;charset=utf-8"});h.saveAs(b,a.name+".json")})["catch"](function(a){b.error(a)})},a["import"]=function(d){var e=JSON.parse(d);e.parent=a.previousCustomNode;var f=!(!e.name||!e.parent),g=!0;return _.forEach(e.Fields,function(a){a.field&&a.alias||(g=!1)}),f&&g?k.save({controller:"import"},e).$promise.then(function(){a.gridOptions.getPage(),b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.error(a)}):void b.show(c.instant("MESSAGE_INVALID_JSON"),"danger")},a.preview=function(b){g.open({animation:!0,templateUrl:"app/analytic/report/list/preview.modal.html",controller:"ReportListPreviewModalCtrl",size:"full",resolve:{report:function(){return{id:b,tree:a.defaultTreeActive?"default":"custom"}}}})},a.extract=function(d){var f=g.open({animation:!0,templateUrl:"app/analytic/report/list/extract.modal.html",controller:"ReportListExtractModalCtrl",size:"md",resolve:{report:function(){return{id:d,tree:a.defaultTreeActive?"default":"custom"}}}});f.result.then(function(e){e.daily||delete e.daily;var f=a.defaultTreeActive?l:k;return f.get(_.merge({id:d,controller:"extract"},e)).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.error(a)})},function(){e.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.reports.list",{url:"/list",templateUrl:"app/analytic/report/list/list.html",controller:"AnalyticReportListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ReportListPreviewModalCtrl",["$scope","$uibModalInstance","report","xAlert","$translate","$timeout","CustomReport","DefaultReport",function(a,b,c,d,e,f,g,h){a.daily=!1,a.dailySwitch={onText:e.instant("APPLICATION_TODAY"),offText:e.instant("APPLICATION_RANGE"),isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"primary"},a.dates={startDate:moment().subtract(1,"days").startOf("day"),endDate:moment().subtract(1,"days").endOf("day")},a.ranges={},a.ranges[e.instant("APPLICATION_YESTERDAY")]=[moment().subtract(1,"days").startOf("day"),moment().subtract(1,"days").endOf("day")],a.ranges[e.instant("APPLICATION_LAST_SEVEN_DAYS")]=[moment().subtract("days",7).startOf("day"),moment().subtract(1,"days").endOf("day")],a.ranges[e.instant("APPLICATION_LAST_THIRTY_DAYS")]=[moment().subtract("days",30),moment()],a.ranges[e.instant("APPLICATION_LAST_MONTH")]=[moment().subtract(1,"months").startOf("month"),moment().subtract(1,"months").endOf("month")],a.timepicker={timePickerIncrement:1,timePicker12Hour:!1},a.dailyTime={start:moment("00:00","HH:mm"),end:moment("23:59","HH:mm")},a.maxdate=moment().subtract(1,"days").endOf("day").format("YYYY-MM-DD HH:mm");var i={offset:0,limit:25,sort:null,where:{},order:{}};a.gridOptions={paginationPageSizes:[10,25,50],paginationPageSize:25,useExternalPagination:!0,enableSorting:!1,enableFiltering:!0,useExternalFiltering:!0,enableGrouping:!1,enableColumnMenus:!1,treeRowHeaderAlwaysVisible:!1,gridMenuShowHideColumns:!1,enableGridMenu:!1,onRegisterApi:function(b){a.gridApi=b,b.pagination.on.paginationChanged(a,function(b,c){i.offset=(b-1)*c,i.limit=c,a.getPage()}),b.core.on.filterChanged(a,function(){var b=this.grid,c={};b.columns.forEach(function(a){a.filters[0].term&&(c[a.field]=a.filters[0].term)}),i.where=c,a.getPage()})}},a.getPage=function(){var b={offset:i.offset,limit:i.limit,startDate:moment(a.dates.startDate).format("YYYY-MM-DD"),endDate:moment(a.dates.endDate).format("YYYY-MM-DD"),startTime:a.daily?moment(a.dailyTime.start).format("HH:mm"):moment(a.dates.startDate).format("HH:mm"),endTime:a.daily?moment(a.dailyTime.end).format("HH:mm"):moment(a.dates.endDate).format("HH:mm"),daily:a.daily};_.forOwn(i.where,function(a,c){b[c]=a});var e="custom"===c.tree?g:h;return e.get(_.merge({id:c.id,controller:"preview"},b)).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.paginationPageSizes[3]=b.count,a.gridOptions.data=b.rows,a.showResult=!0})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss("cancel")},f(function(){a.getPage()})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.reports",{url:"/reports",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("ReportAgent",["$resource",function(a){return a("/api/report/agents/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ReportIntegration",["$resource",function(a){return a("/api/report/integrations/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ReportMember",["$resource",function(a){return a("/api/report/members/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ReportTree",["$resource",function(a){return a("/api/analytics/reports/trees/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("AnalyticReportViewCtrl",["$scope","xAlert","$translate","$stateParams","$location","ReportAgent","ReportCall","ReportMailSession","ReportSmsSession","ReportMember","ReportQueue","ReportIntegration","ReportChatSession","DefaultReport","CustomReport","Metric","report",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){function r(c){var d=_.find(a.tables,{value:c}).resource;d.get({controller:"describe"}).$promise.then(function(b){a.tableFields=_.map(b,function(a,b){return"$promise"!==b&&"$resolved"!==b?{name:b,value:b}:void 0})})["catch"](function(a){b.error(a)})["finally"](function(){s(c)})}function s(c){return p.get({controller:"table",table:c}).$promise.then(function(b){_.forEach(b.rows,function(b){a.tableFields.push({name:"<strong>Metric.</strong>"+b.name,alias:b.name,value:b.metric,MetricId:b.id})})})["catch"](function(a){b.error(a)})}function t(a){return String(a).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function u(a){if(!a)return"";for(var b="(",c=0;c<a.rules.length;c++)if(c>0&&(b+=" <strong>"+a.operator+"</strong> "),a.rules[c].group)b+=u(a.rules[c].group);else switch(b+=a.rules[c].field,a.rules[c].condition){case"IS NULL":case"IS NOT NULL":b+=" "+t(a.rules[c].condition);break;case"IS EMPTY":b+=" = ''";break;case"IS NOT EMPTY":b+=" != ''";break;default:b+=" "+t(a.rules[c].condition)+" "+a.rules[c].value}return b+")"}a.$translate=c,a.tempReport={},a.tables=q.tables;var v={group:{operator:"AND",rules:[]}};a.getReport=function(){return a.firstLoad=!0,o.get({id:d.id}).$promise.then(function(b){a.report=b,_.forEach(a.report.Fields,function(a){delete a.id}),a.report.conditions=a.report.conditions?JSON.parse(a.report.conditions):_.clone(v,!0),a.report.Fields.length&&a.getPreview()})["catch"](function(a){console.error(a),e.path("/analytics/reports/list")})},a.randomName=function(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")},a.$watch("report.table",function(b,c){b&&(r(b),c&&(a.tempReport[c]={conditions:a.report.conditions,fields:a.report.Fields}),a.firstLoad?a.firstLoad=!1:a.tempReport[b]?(a.report.Fields=a.tempReport[b].fields,a.report.conditions=a.tempReport[b].conditions):(a.report.Fields=[],a.report.conditions=_.clone(v,!0)))},!0),a.setMetricId=function(b,c){a.report.Fields[c].MetricId=b.MetricId?b.MetricId:null,a.report.Fields[c].alias=b.MetricId?b.alias:b.name},a.groupByField=[{name:"APPLICATION_YES",value:!0},{name:"APPLICATION_NO",value:!1}],a.functions=[{name:"Sum",value:"SUM"},{name:"Count",value:"COUNT"},{name:"Count Distinct",value:"COUNT DISTINCT"},{name:"Maximum",value:"MAX"},{name:"Minimum",value:"MIN"},{name:"Average",value:"AVG"},{name:"Group Concat",value:"GROUP_CONCAT"},{name:"Group Concat(asc)",value:"GROUP_CONCAT ASC"},{name:"Group Concat(desc)",value:"GROUP_CONCAT DESC"}],a.formatFunctions=[{name:"Sec To Time",value:"SEC_TO_TIME"},{name:"Date",value:"DATE"},{name:"Hour",value:"HOUR"},{name:"Round",value:"ROUND"},{name:"Unix TimeStamp",value:"UNIX_TIMESTAMP"}],a.addField=function(){a.report.Fields.push({groupBy:!1,custom:!1})},a.removeField=function(b){a.report.Fields.splice(b,1)},a.sortableOptions={"ui-floating":!0,cancel:".unsortable",handle:".report-field-handle",axis:"y"},a.toggleCustom=function(b){b.custom=!b.custom,b.custom||_.find(a.tableFields,{value:b.field})||(b.field=null)},a.updateReport=function(){if(a.report.Fields.length){var e=angular.copy(a.report);return console.log(e.conditions),e.conditions=angular.toJson(e.conditions),_.forEach(e.Fields,function(a){a.custom&&delete a.MetricId}),o.update({id:d.id},e).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE")+"!","success"),a.getPreview()})["catch"](function(a){b.error(a)})}b.show(c.instant("MESSAGE_SELECT_A_FIELD"),"danger")},a.$watch("report.conditions",function(b){a.output=b?u(b.group):"()"},!0),a.getPreview=function(){return a.gridOptions=null,o.get({id:d.id,controller:"preview",limit:20}).$promise.then(function(b){a.gridOptions={enableFiltering:!0,treeRowHeaderAlwaysVisible:!1,enableGridMenu:!0,data:b.rows}})["catch"](function(a){console.log(a),b.show(c.instant(a.message||"MESSAGE_QUERY_NOT_VALID"),"warning")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.reports.view",{url:"/view/:id",templateUrl:"app/analytic/report/view/view.html",controller:"AnalyticReportViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.analytics.reports.view.settings",{url:"/settings",templateUrl:"app/analytic/report/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels",{url:"/channels",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:6}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat",{url:"/chat",template:"<div ui-view></div>",
-"abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:8}}})}]),angular.module("xCallyShuttleApp").factory("ChatEnquiry",["$resource",function(a){return a("/api/chat/enquiries/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatReport",["$resource",function(a){return a("/api/report/chats/:id/:controller1/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatVisitor",["$resource",function(a){return a("/api/chat/visitors/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatMessage",["$resource",function(a){return a("/api/chat/messages/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatRoom",["$resource",function(a){return a("/api/chat/rooms/:id/:controller",{id:"@id"},{me:{method:"GET",isArray:!0,params:{id:"me"}},users:{method:"GET",params:{id:"users"}},externals:{method:"GET",isArray:!0,params:{id:"type",controller:"external"}},groups:{method:"GET",isArray:!0,params:{id:"groups"}},update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").controller("ChatOfflineListCtrl",["$scope","ChatEnquiry","gridOptions","uiGridConstants",function(a,b,c,d){a.initView=function(){var e={exporterCsvFilename:"chat_offline_messages.csv",columnDefs:[{name:"username",cellClass:"text-center"},{name:"email",cellClass:"text-center"},{name:"ChatWebsite.name",displayName:"Website",cellClass:"text-center"},{name:"createdAt",displayName:"createdAt",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span am-time-ago="row.entity.createdAt"></span></div>',field:"createdAt",sort:{direction:d.DESC,priority:0}},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/chat/offline/view/{{row.entity.id}}",name:"detail"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.fullname, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,e,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.offline.list",{url:"/list",templateUrl:"app/channels/chat/offline/list/list.html",controller:"ChatOfflineListCtrl"})}]),angular.module("xCallyShuttleApp").directive("enquiryMessage",["$rootScope","$translate","MailMessage","List","xAlert",function(a,b,c,d,e){return{restrict:"E",scope:{message:"=",listId:"="},templateUrl:"app/channels/chat/offline/message/message.directive.html",link:function(c){c.openContact=function(f){return c.listId?d.save({listId:c.listId,controller:"contacts"},{email:f}).$promise.then(function(b){var c=_.find(a.$root.workspaces,{contactID:b.id});c?c.active=!0:a.$root.workspaces.push({active:!0,"class":"icon-user",contactID:b.id,name:b.email,type:"contact"})})["catch"](function(a){e.error(a)}):void e.show(b.instant("MESSAGE_NO_LIST_CONFIGURED"),"info")}}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.offline",{url:"/offline",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:32}}})}]),angular.module("xCallyShuttleApp").controller("ChatOfflineViewCtrl",["$scope","$stateParams","$translate","$rootScope","ChatEnquiry","List","xAlert",function(a,b,c,d,e,f,g){a.initView=function(){return e.get({id:b.id}).$promise.then(function(b){a.enquiry=b})["catch"](function(a){g.error(a)})},a.openContact=function(b){return a.enquiry.ChatWebsite.ListId?f.save({listId:a.enquiry.ChatWebsite.ListId,controller:"contacts"},{email:b}).$promise.then(function(a){var b=_.find(d.$root.workspaces,{contactID:a.id});b?b.active=!0:d.$root.workspaces.push({active:!0,"class":"icon-user",contactID:a.id,name:a.email,type:"contact"})})["catch"](function(a){g.error(a)}):void g.show(c.instant("MESSAGE_NO_LIST_CONFIGURED"),"info")}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.offline.view",{url:"/view/:id",templateUrl:"app/channels/chat/offline/view/view.html",controller:"ChatOfflineViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatOnlineListCtrl",["$scope","ChatRoom","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"chat_online_messages.csv",columnDefs:[{name:"ChatVisitor.fullname",displayName:"APPLICATION_FULLNAME",cellClass:"text-center"},{name:"ChatVisitor.email",displayName:"APPLICATION_EMAIL",cellClass:"text-center"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/chat/online/view/{{row.entity.id}}/detail",name:"detail"}]}]};a.gridOptions=c.gridOptions(b,d,a,{id:"online"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.online.list",{url:"/list",templateUrl:"app/channels/chat/online/list/list.html",controller:"ChatOnlineListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.online",{url:"/online",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:8}}})}]),angular.module("xCallyShuttleApp").controller("ChatOnlineViewCtrl",["$scope","$stateParams","ChatRoom",function(a,b,c){a.initView=function(){return a.config={autoHideScrollbar:!1,theme:"light",advanced:{updateOnContentResize:!0},setHeight:400,scrollInertia:0},c.get({id:b.id}).$promise.then(function(b){a.chatRoom=b})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.online.view",{url:"/view/:id",templateUrl:"app/channels/chat/online/view/view.html",controller:"ChatOnlineViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.chat.online.view.detail",{url:"/detail",templateUrl:"app/channels/chat/online/view/view.detail.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/news.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("PreviewCtrl",["$scope",function(a){a.message="Hello"}]),angular.module("xCallyShuttleApp").directive("preview",["$rootScope",function(a){return{templateUrl:"app/channels/chat/preview/preview.html",restrict:"EA",link:function(a,b,c){}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("preview",{url:"/preview",templateUrl:"app/channels/chat/preview/preview.html",controller:"PreviewCtrl",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:8}}})}]),angular.module("xCallyShuttleApp").factory("ChatQueue",["$resource",function(a){return a("/api/chat/queues/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("ChatQueueListCtrl",["$scope","ChatQueue","gridOptions","Auth","$uibModal",function(a,b,c,d,e){a.initView=function(){a.Auth=d;var e={exporterCsvFilename:"chat_queues.csv",columnDefs:[{name:"name"},{name:"description"},{name:"strategy"},{name:"timeout"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/chat/queues/view/{{row.entity.id}}/settings",name:"settings"},{"class":"green-meadow",href:"/channels/chat/queues/view/{{row.entity.id}}/agents",name:"agents",hide:"user"===d.getCurrentUser().role},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,e,a)},a.createItem=function(){var b=e.open({animation:!0,templateUrl:"app/channels/chat/queue/list/list.create.modal.html",controller:"ChatQueueListCreateCtrl",size:"lg"});b.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("ChatQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","ChatQueue","Team",function(a,b,c,d,e,f){a.form={},a.item={penalty:0,agents:[]},a.getTeams=function(){return f.get({controller:"associations"}).$promise.then(function(b){a.teams=b.rows}).then(function(){ComponentsDropdowns.bindQueue(a.teams,[],function(){return{select:function(b){a.item.agents=_.union(a.item.agents,b)},deselect:function(b){a.item.agents=_.difference(a.item.agents,b)}}})})["catch"](function(a){console.error(a)})},a.save=function(){return e.save(a.item).$promise.then(function(a){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close(a)})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.queues.list",{url:"/list",templateUrl:"app/channels/chat/queue/list/list.html",controller:"ChatQueueListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.queues",{url:"/queues",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:30}}})}]),angular.module("xCallyShuttleApp").controller("ChatQueueViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","ChatQueue","Team","Auth",function(a,b,c,d,e,f,g,h){a.Auth=h;var i=function(){return{select:function(b){return f.save({id:a.queue.id,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})},deselect:function(b){return f["delete"]({id:a.queue.id,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})}}};a.getQueue=function(){b.get("/api/chat/queues/"+e.id).success(function(b){b.penalty=0,a.queue=b}).error(function(a){console.error(a)})},a.updateChatQueue=function(){var f=angular.copy(a.queue);b.put("/api/chat/queues/"+e.id,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){a.queue=f,b.errors.forEach(function(a){c.error(err)})})},a.getTeams=function(){return g.get({controller:"associations"}).$promise.then(function(b){return a.teams=b.rows,f.get({id:e.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindChatQueue(a.teams,_.map(b.rows,function(a){return{id:a.id,penalty:a.UserHasChatQueue.penalty}}),i)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.queues.view",{url:"/view/:id",templateUrl:"app/channels/chat/queue/view/view.html",controller:"ChatQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.chat.queues.view.settings",{url:"/settings",templateUrl:"app/channels/chat/queue/view/view.settings.html"}).state("main.channels.chat.queues.view.agents",{url:"/agents",templateUrl:"app/channels/chat/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:33}}})}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","ChatQueue","usSpinnerService","$q","uiGridConstants","Auth",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){function o(){return k.spin("grid-spinner"),g.get(t).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){q(a)})})["catch"](function(a){f.error(a)})["finally"](function(){k.stop("grid-spinner")})}function p(){e.socket.on("agent:save",function(b){b=b.newValues||b;var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});c&&(c.online=_.has(b,"online")?b.online:c.online,c.lastLoginAt=_.has(b,"lastLoginAt")?b.lastLoginAt:c.lastLoginAt,c.pause=_.has(b,"smsPause")?b.chatPause:c.chatPause,c.pauseType=_.has(b,"pauseType")?b.pauseType:c.pauseType,c.lastPauseAt=_.has(b,"lastPauseAt")?b.lastPauseAt:c.lastPauseAt,c.ipaddr=_.has(b,"ipaddr")?b.ipaddr:c.ipaddr,c.port=_.has(b,"port")?b.port:c.port,c.fullcontact=_.has(b,"fullcontact")?b.fullcontact:c.fullcontact,c.useragent=_.has(b,"useragent")?b.useragent:c.useragent,c.lastms=_.has(b,"lastms")?b.lastms:c.lastms,c.internal=_.has(b,"internal")?b.internal:c.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=_.has(b,"online")?b.online:a.online)}))}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_chat_queue:save",function(b){var c=_.includes(_.map(a.CurrentUser.PChatQueues,"id"),b.ChatQueueId)||n.isAdmin();if(c){var d=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0});if(d){var e=a.gridOptions.data.indexOf(d);a.gridOptions.data.splice(e+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,queueId:b.ChatQueueId,agent:b.membername,online:d.online})}}}),e.socket.on("user_has_chat_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queueId:b.ChatQueueId})})}function q(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.chatPause,pauseType:b.pauseType,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.ChatQueues.forEach(function(c){a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,queueId:c.id,agent:b.name,online:b.online})})}function r(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.error(a)})}function s(){return j.get().$promise.then(function(b){a.chatQueues=b.rows,e.syncUpdates("chat_queue",a.chatQueues)})["catch"](function(a){f.error(a)})}a.chatQueues=[];var t={controller:"realtime",controller1:"chat",offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="fa" data-ng-class="{\'font-green\':row.entity.online, \'font-red\':!row.entity.online,\'fa-user\':row.entity.online,\'fa-user-times\':!row.entity.online}"></i> <span data-ng-if="row.entity.online" class="left-margin">(<css-timer start-time="row.entity.lastLoginAt)"></css-timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"chatPause",displayName:"APPLICATION_PAUSE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.pause != null && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="fa fa-play font-green pointer-cursor left-margin" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="fa fa-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select> <span data-ng-if="row.entity.pause">({{row.entity.pauseType}})</span><span class="left-margin"><css-timer data-ng-if="row.entity.pause" start-time="row.entity.lastPauseAt"></css-timer></span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"PAUSED"},{value:"false",label:"NOT PAUSED"}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queueId" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queueId)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.chatQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){u(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){u(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){u(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?t.order=null:t.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),o()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){t.offset=(a-1)*b,t.limit=b,o()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?t[a.name]=a.filters[0].term:delete t[a.name]}),o()})}},o(),r(),s(),$timeout(function(){p()})};var u=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_chat_queue")}),a.pause=function(b,c,e){return e&&(a.pauseType=null),i.save({name:c,agent:b,type:e||"DEFAULT PAUSE",data4:e||"DEFAULT PAUSE",channel:"chat"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/chat/realtime/view/agent/queue.modal.add.html",controller:"ChatRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.chatQueues,function(b){return!!_.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})})}}});g.result.then(function(b){return i.save({name:"QueueAdd",agent:e,queues:_.filter(a.chatQueues,function(a){return _.includes(b.queues,a.id)}),channel:"chat",data1:e,data3:b.queues.join(","),data4:"chat"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queueId:b,channel:"chat",data1:a,data3:b,data4:"chat"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/chat/realtime/view/agent/agent.modal.info.html",controller:"ChatRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/chat/realtime/view/agent/agent.html",controller:"ChatRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewApplicationCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","ReportChatSession","usSpinnerService","$q","uiGridConstants","$timeout",function(a,b,c,d,e,f,g,h,i,j,k){function l(){return h.spin("spinner-grid"),g.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){m(),h.stop("spinner-grid")})}function m(){e.socket.on("report_chat_session:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&k(function(){_.remove(a.gridOptions.data,{id:b.id})},1e4)):b.leaveAt||a.gridOptions.data.push(b)}),e.socket.on("report_chat_session:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})}a.moment=moment,a.initApplications=function(){a.gridOptions={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"uniqueid",displayName:"APPLICATION_UNIQUEID",headerCellFilter:"translate"},{name:"websitename",displayName:"APPLICATION_WEBSITE",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.abandon">{{\'APPLICATION_QUEUESTATUS_ABANDON\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span> <span data-ng-if="!row.entity.leaveAt">[<timer start-time="grid.appScope.moment(row.entity.updatedAt).unix()*1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</span></div>"},{name:"queuename",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.queuename || ''}}</span></div>"}],data:[],gridMenuTitleFilter:function(a){var b=i.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){n(a.gridOptions.data.length)})}},l()};var n=function(a){var b=a?30*a+60:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("report_chat_session")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.realtime.view.applications",{url:"/applications",templateUrl:"app/channels/chat/realtime/view/application/application.html",controller:"ChatRealtimeViewApplicationCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewCtrl",["$scope",function(a){a.agents=[{name:"Queues",link:"main.chat.realtime.view.agent.queues"},{name:"Timeline",link:"main.chat.realtime.view.agent.timeline"}],a.sessions=[{name:"Sessions",link:"main.chat.realtime.view.sessions"}]}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.realtime.view",{url:"/view",templateUrl:"app/channels/chat/realtime/view/view.html",controller:"ChatRealtimeViewCtrl"})}]),angular.module("xCallyShuttleApp").factory("ReportChatSession",["$resource",function(a){return a("/api/report/chat/sessions/:id/:controller/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.room.external",{url:"/external",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatRoomExternalListCtrl",["$scope","$timeout","socket","Auth","ChatRoom","usSpinnerService","Tag","$uibModal","uibButtonConfig",function(a,b,c,d,e,f,g,h,i){function j(){return g.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)})}a.openChat=function(b){return e.get({id:b.id}).$promise.then(function(b){var c=_.find(a.workspaces,{id:b.id,type:"chatRoom"});c?c.active=!0:a.workspaces.push({id:b.id,name:b.ChatVisitor.fullname,type:"chatRoom","class":"icon-bubble",active:!0})})["catch"](function(a){console.error(a)})},a.initView=function(){i.activeClass="green-haze",a.id=[],a.query={status:"OPEN",tags:[]},a.gridOptions={enableGridMenu:!1,enableFiltering:!0,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,columnDefs:[{name:"id",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>#{{row.entity.id}}</span></div>",width:75,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"userpic",displayName:"",width:35,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div>           <ng-letter-avatar           height="20"           width="20"           fontsize="12"           data="{{row.entity.ChatVisitor.fullname}}"           avatarcustombgcolor="#B0B0B0"           charCount="2"           avatarcustomborder="border:2px solid #EA4C61"           shape="round"></ng-letter-avatar>           </div>',enableColumnMenu:!1,enableSorting:!1,enableFiltering:!1},{name:"fullname",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span style="padding-left: 5px;" class="pull-left">{{row.entity.ChatVisitor.fullname}}</span></div>',enableSorting:!0,enableFiltering:!0,enableColumnMenu:!0},{name:"action",cellTemplate:'<div><a class="btn btn-xs green-meadow" href="#" data-ng-click="grid.appScope.openChat(row.entity)">{{\'APPLICATION_CHAT\' | translate}}</a></div>',cellClass:"ui-grid-vcenter",width:100,enableFiltering:!1,enableSorting:!1,enableColumnMenu:!1}],data:[],onRegisterApi:function(b){a.gridApi=b,a.gridApi.selection&&(a.gridApi.selection.on.rowSelectionChanged(a,function(b){b.isSelected?a.id.push(a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id):_.pull(a.id,a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id)}),a.gridApi.selection.on.rowSelectionChangedBatch(a,function(b){b[0].isSelected?a.id=_.union(a.id,_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id")):_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id").forEach(function(b){_.pull(a.id,b)})}))}},a.getPage(),j()},a.tagItems=function(){h.open({animation:!0,templateUrl:"app/channels/chat/room/view.tags.modal.html",controller:"ChatRoomViewModalTagCtrl",resolve:{id:function(){return a.id}}}).result.then(function(){a.gridApi.selection.clearSelectedRows(),a.id=[]})},a.onChanged=function(){a.getPage()},a.$watch("query.status",function(){a.getPage()},!0),a.getPage=function(){return f.spin("spinner-grid"),e.get(_.merge({id:"externals"},a.query)).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){console.error(a)})["finally"](function(){f.stop("spinner-grid")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.room.external.list",{url:"/list",templateUrl:"app/channels/chat/room/external/list/list.html",controller:"ChatRoomExternalListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.room.group",{url:"/group",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatRoomGroupListCtrl",["$scope","$timeout","Auth","ChatRoom","usSpinnerService","Tag","uibButtonConfig",function(a,b,c,d,e,f,g){function h(){return f.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)})}a.getFullnames=function(a){var b=_.map(a.Users,"fullname");return a.ChatVisitor&&b.unshift(a.ChatVisitor.fullname),_.without(b,c.getCurrentUser().fullname).join(", ")},a.openChat=function(b){return d.get({id:b.id}).$promise.then(function(c){var d=_.find(a.workspaces,{id:c.id,type:"chatRoom"});d?d.active=!0:a.workspaces.push({id:c.id,data:b,name:a.getFullnames(c),type:"chatRoom","class":"icon-bubble",active:!0})})["catch"](function(a){console.error(a)})},a.initView=function(){g.activeClass="green-haze",a.query={status:"OPEN",tags:[]},a.currentUser=c.getCurrentUser(),a.gridOptions={enableGridMenu:!1,enableColumnResizing:!0,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,columnDefs:[{name:"userpic",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div>           <ng-letter-avatar data-ng-if="row.entity.ChatVisitor"          height="20"           width="20"           fontsize="12"           data="{{row.entity.ChatVisitor.fullname}}"           avatarcustombgcolor="#B0B0B0"           charCount="2"           avatarcustomborder="border:2px solid #EA4C61"           shape="round"></ng-letter-avatar>           <ng-letter-avatar data-ng-repeat="user in row.entity.Users | filter:{ id: \'!\' + grid.appScope.currentUser.id} track by user.id"            style="margin-right: 3px;"           height="20"           width="20"           fontsize="12"           data="{{user.fullname}}"           avatarcustombgcolor="#B0B0B0"           charCount="2"           avatarcustomborder="border:2px solid #3399CC"           shape="round"></ng-letter-avatar>           </div>',enableColumnMenu:!1,enableSorting:!1,enableFiltering:!1},{name:"Users",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{grid.appScope.getFullnames(row.entity)}}</div>",enableSorting:!0,enableFiltering:!0,enableColumnMenu:!0},{name:"action",cellTemplate:'<div><a class="btn btn-xs green-meadow" href="#" data-ng-click="grid.appScope.openChat(row.entity)">{{\'APPLICATION_CHAT\' | translate}}</a></div>',cellClass:"ui-grid-vcenter",width:100,enableFiltering:!1,enableSorting:!1,enableColumnMenu:!1}],data:[]},a.getPage(),h()},a.onChanged=function(){a.getPage()},a.$watch("query.status",function(){a.getPage()},!0),a.getPage=function(){return e.spin("spinner-grid"),
-d.get(_.merge({id:"groups"},a.query)).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){console.error(a)})["finally"](function(){e.stop("spinner-grid")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.room.group.list",{url:"/list",templateUrl:"app/channels/chat/room/group/list/list.html",controller:"ChatRoomGroupListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.room.internal",{url:"/internal",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatRoomInternalListCtrl",["$scope","$timeout","socket","Auth","ChatRoom","usSpinnerService",function(a,b,c,d,e,f){a.openChat=function(b){return e.users({users:[d.getCurrentUser().id,b.id]}).$promise.then(function(c){var d=_.find(a.workspaces,{id:c.id,type:"chatRoom"});d?d.active=!0:a.workspaces.push({id:c.id,name:b.fullname,type:"chatRoom","class":"icon-bubble",active:!0})})["catch"](function(a){console.error(a)})},a.initView=function(){a.gridOptions={enableGridMenu:!1,enableFiltering:!0,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,columnDefs:[{name:"userpic",displayName:"",width:35,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div>           <ng-letter-avatar           height="20"           width="20"           fontsize="12"           data="{{row.entity.fullname}}"           avatarcustombgcolor="#B0B0B0"           charCount="2"           avatarcustomborder="border:2px solid #3399CC"           shape="round"></ng-letter-avatar>           </div>',enableColumnMenu:!1,enableSorting:!1,enableFiltering:!1},{name:"fullname",enableSorting:!0,enableFiltering:!0,enableColumnMenu:!0},{name:"action",cellTemplate:'<div><a class="btn btn-xs green-meadow" href="#" data-ng-click="grid.appScope.openChat(row.entity)">{{\'APPLICATION_CHAT\' | translate}}</a></div>',cellClass:"ui-grid-vcenter",width:100,enableFiltering:!1,enableSorting:!1,enableColumnMenu:!1}],data:[]},c.socket.on("user:save",function(b){if(b.online&&d.getCurrentUser().id!==b.id){var c=_.find(a.gridOptions.data,{id:b.id});c?_.merge(c,b):a.gridOptions.data.push(b)}else _.remove(a.gridOptions.data,{id:b.id})}),b(function(){c.socket.on("agent:save",function(b){if(b.online&&d.getCurrentUser().id!==b.id){var c=_.find(a.gridOptions.data,{id:b.id});c?_.merge(c,b):a.gridOptions.data.push(b)}else _.remove(a.gridOptions.data,{id:b.id})})}),e.get({id:"agents"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){console.error(a)})["finally"](function(){f.stop("spinner-grid")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.room.internal.list",{url:"/list",templateUrl:"app/channels/chat/room/internal/list/list.html",controller:"ChatRoomInternalListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatRoomAddCtrl",["$scope","$uibModalInstance","Agent","items",function(a,b,c,d){a.items=d,a.agents=c.get(function(b){a.agents=b,a.items.forEach(function(b){_.remove(a.agents.rows,{id:b.id})})}),a.selected={items:[]},a.ok=function(){b.close(_.union(_.map(a.selected.items,"id"),_.map(a.items,"id")))},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").controller("ChatRoomCloseCtrl",["$scope","$uibModalInstance","closed","ChatWebsite","websiteId",function(a,b,c,d,e){a.modal={title:"APPLICATION_CONFIRM_CLOSE",text:"MESSAGE_ARE_YOU_SURE_YOU_WANT_TO_CLOSE_THE_CHAT"},a.initDisposition=function(){return d.get({websiteId:e,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a)})},a.item={},a.closed=c,a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").directive("chatRoom",["$interval","$rootScope","$uibModal","$notification","$window","socket","Auth","ChatRoom","ngAudio","xAlert","Tag","CannedAnswer","List","$translate",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){return{restrict:"E",scope:{workspace:"="},templateUrl:"app/channels/chat/room/room.directive.html",link:function(a){a.user=g.getCurrentUser(),a.message={body:""},a.openContact=function(c){return a.chatRoom.ChatWebsite.List?m.save({listId:a.chatRoom.ChatWebsite.List.id,controller:"contacts"},{email:c}).$promise.then(function(a){var c=_.find(b.$root.workspaces,{contactID:a.id});c?c.active=!0:b.$root.workspaces.push({active:!0,"class":"icon-user",contactID:a.id,name:a.email,type:"contact"})})["catch"](function(a){console.error(a)}):void j.show(n.instant("MESSAGE_NO_LIST_CONFIGURED"),"info")},a.modelOptions={debounce:{"default":500,blur:250},getterSetter:!0},a.form={},a.panelLeft="col-md-4",a.panelRight="col-md-8",a.onSelect=function(){a.message.body=a.modelOptions.selectedAnswer,delete a.modelOptions.selectedAnswer},a.togglePanelLeft=function(){a.panelLeft?(a.panelLeft=null,a.panelRight="col-md-12"):(a.panelLeft="col-md-4",a.panelRight="col-md-8")},a.options={link:!0,linkTarget:"_blank",pdf:{embed:!0},image:{embed:!0},audio:{embed:!0},code:{highlight:!0,lineNumbers:!1},basicVideo:!0},a.getAnswers=function(a){return l.get({key:a}).$promise.then(function(a){return console.log(a),_.map(a.rows,"value")})},a.isMyRoom=function(b){return!!_.find(b,{id:a.user.id})},h.get({id:a.workspace.id}).$promise.then(function(c){a.chatRoom=c,a.form.tags=c.tags,a.chatRoom.ChatVisitor&&(a.chatRoom.ChatVisitors=[],a.chatRoom.ChatVisitors.push(a.chatRoom.ChatVisitor)),f.socket.on("chat_room:save",function(b){a.chatRoom.id===b.id&&_.merge(a.chatRoom,b)}),f.socket.on("user_has_chat_room:save",function(b){return b.UserId!=a.user.id&&b.ChatRoomId==a.chatRoom.id?h.get({id:"agents",controller:b.UserId}).$promise.then(function(b){var c=_.map(a.chatRoom.Users,"fullname");a.chatRoom.ChatVisitor&&c.unshift(a.chatRoom.ChatVisitor.fullname),a.chatRoom.Users.push(b),a.workspace.name=_.without(c,g.getCurrentUser().fullname).join(", ")})["catch"](function(a){console.error(a)}):void 0}),f.socket.on("chat_message:save",function(c){a.chatRoom.id==c.ChatRoomId&&(a.user.id!=c.UserId&&a.chatRoom.ChatMessages.push(c),!b.settings.layout.onFocus&&e.Notification&&d("CHAT CHANNEL",{icon:"assets/images/media/channels/chat64.png",body:"NEW Chat Message!",delay:5e3}),a.workspace.active||(i.load("api/xchatty/assets?resource=notification/xc_blubb.mp3").play(),a.workspace.unread++))})})["catch"](function(a){console.error(a)}),k.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)}),a.closeRoom=function(b){return c.open({animation:!0,templateUrl:"app/channels/chat/room/room.close.html",controller:"ChatRoomCloseCtrl",resolve:{closed:function(){return"CLOSED"===a.chatRoom.status},websiteId:function(){return a.chatRoom.ChatWebsiteId}}}).result.then(function(a){var c={id:b,status:"CLOSED",completeReason:"agent"};return a.disposition&&(c.disposition=a.disposition),h.update(c).$promise["catch"](function(a){j.error(a)})})},a.onChanged=function(b){return h.update({id:b},{tags:a.form.tags}).$promise["catch"](function(a){console.error(a)})},a.addAgent=function(b){c.open({animation:!0,templateUrl:"app/channels/chat/room/room.add.html",controller:"ChatRoomAddCtrl",resolve:{items:function(){return _.map(a.chatRoom.Users||[],function(a){return{id:a.id,fullname:a.fullname}})}}}).result.then(function(a){return h.update({id:b,controller:"users"},{users:a}).$promise["catch"](function(a){j.error(a)})})},a.sendMessage=function(){var b={body:angular.copy(a.message.body),createdAt:moment(),UserId:a.user.id,User:{fullname:a.user.fullname}};return a.message.body.trim().length?(a.chatRoom.ChatMessages.push(b),a.message.body="",h.save({id:a.chatRoom.id,controller:"messages"},{body:b.body}).$promise["catch"](function(a){console.error(a)})):void 0}}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.room",{url:"/room",templateUrl:"app/channels/chat/room/room.html",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:31}},resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/inbox.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("ChatRoomViewModalTagCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Tag","ChatRoom","xAlert","id",function(a,b,c,d,e,f,g,h){a.initModal=function(){return a.tags=[],a.item={tags:[]},a.modal={dismissable:!0,title:"APPLICATION_MESSAGE_SEND_RETRY",text:"MESSAGE_MESSAGE_SEND_RETRY",buttons:[{"class":"btn-success",text:"APPLICATION_TAG",click:function(){var d={status:!0};return f.patch({id:h},{tags:a.item.tags}).$promise["catch"](function(){d.status=!1,g.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){b.close(d)})}},{"class":"default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]},e.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("ChatVisitorListCtrl",["$scope","ChatVisitor","gridOptions","$uibModal",function(a,b,c,d){a.initView=function(){var d={exporterCsvFilename:"chat_visitors.csv",columnDefs:[{name:"fullname",cellClass:"text-center"},{name:"email",cellClass:"text-center"},{name:"origin",cellClass:"text-center"},{name:"createdAt",displayName:"createdAt",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span am-time-ago="row.entity.createdAt"></span></div>'},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/chat/visitors/view/{{row.entity.id}}/profile",name:"profile"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.visitors.list",{url:"/list",templateUrl:"app/channels/chat/visitor/list/list.html",controller:"ChatVisitorListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatVisitorViewCtrl",["$scope","$stateParams","ChatVisitor",function(a,b,c){a.initView=function(){return c.get({id:b.id}).$promise.then(function(b){a.chatVisitor=b})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.visitors.view",{url:"/view/:id",templateUrl:"app/channels/chat/visitor/view/view.html",controller:"ChatVisitorViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.chat.visitors.view.profile",{url:"/profile",templateUrl:"app/channels/chat/visitor/view/view.profile.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.visitors",{url:"/visitors",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:8}}})}]),angular.module("xCallyShuttleApp").factory("ChatApplication",["$resource",function(a){return a("/api/chat/applications/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatWebsite",["$resource",function(a){return a("/api/chat/websites/:websiteId/:controller/:id",{id:"@websiteId"},{update:{method:"PUT"},updateFields:{method:"PUT",isArray:!0}})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteListCtrl",["$scope","gridOptions","ChatWebsite",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"chat_websites.csv",columnDefs:[{name:"name"},{name:"description"},{name:"address"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/chat/websites/view/{{row.entity.id}}/embedding/view",name:"embedding"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.list",{url:"/list",templateUrl:"app/channels/chat/website/list/list.html",controller:"ChatWebsiteListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.actions",{url:"/actions",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewActionListCtrl",["$scope","gridOptions","ChatWebsite","$http","$translate","$stateParams","socket","xAlert","Modal",function(a,b,c,d,e,f,g,h,i){a.initActons=function(){var d={draggable:!0,exporterCsvFilename:"chat_applications.csv",enableSorting:!1,enableFiltering:!1,columnDefs:[{name:"app",cellClass:"text-center"},{name:"name",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>{{row.entity.ChatQueue ? row.entity.ChatQueue.name : row.entity.User.name}}</span></div>"},{name:"timeout",cellClass:"text-center"},{name:"interval",displayName:"APPLICATION_TIME_INTERVAL",cellClass:"text-center",cellTemplate:"<div><span>{{row.entity.Interval ? row.entity.Interval.name : row.entity.interval}}</span></div>"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/chat/websites/view/{{row.entity.ChatWebsiteId}}/actions/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.app, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a,{websiteId:f.websiteId,controller:"applications"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.actions.list",{url:"/list",templateUrl:"app/channels/chat/website/view/action/list/list.html",controller:"ChatWebsiteViewActionListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewActionViewCtrl",["$scope","$http","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","ChatWebsite","ChatQueue","Agent","Interval","Template","MailAccount","SmsAccount",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initAction=function(){return a.$application=i.application,a.$stateParams=c,a.$interval=j.interval,a.forms={},a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"SendSMS",value:"sendSms"}],k.get({websiteId:c.websiteId,controller:"applications",id:c.actionId}).$promise.then(function(b){if(a.application=b,a.application.alwaysTime=!1,a.application.IntervalId)a.application.intType="list";else switch(a.application.interval){case"*,*,*,*":a.application.intType="always";break;default:a.application.intType="custom"}if("always"===a.application.intType||"custom"===a.application.intType){var c=a.application.interval.split(",");"*"===c[0]?a.application.alwaysTime=!0:(a.application.t_from=moment(new Date),a.application.t_to=moment(new Date),a.application.t_from.hour(c[0].split("-")[0].split(":")[0]),a.application.t_from.minute(c[0].split("-")[0].split(":")[1]),a.application.t_to.hour(c[0].split("-")[1].split(":")[0]),a.application.t_to.minute(c[0].split("-")[1].split(":")[1])),"*"===c[1]?(a.application.wd_from="always",a.application.wd_to="always"):(a.application.wd_from=c[1].split("-")[0],a.application.wd_to=c[1].split("-")[1]),"*"===c[2]?(a.application.md_from="always",a.application.md_to="always"):(a.application.md_from=c[2].split("-")[0],a.application.md_to=c[2].split("-")[1]),"*"===c[3]?(a.application.m_from="always",a.application.m_to="always"):(a.application.m_from=c[3].split("-")[0],a.application.m_to=c[3].split("-")[1])}a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})})["catch"](function(a){f.error(a)})},a.getQueues=function(){return l.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){f.error(a)})},a.getAgents=function(){return m.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){f.error(a)})},a.getIntervals=function(){return n.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){f.error(a)})},a.getSmsAccounts=function(){return q.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getTemplates=function(){return o.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.getMailAccounts=function(){return p.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})},a.updateItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var g,h,i,j,l;g=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(h=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(h+="-"+a.application.wd_to)):h="*",a.application.md_from&&"always"!==a.application.md_from?(i=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(i+="-"+a.application.md_to)):i="*",a.application.m_from&&"always"!==a.application.m_from?(j=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(j+="-"+a.application.m_to)):j="*",l=g+","+h+","+i+","+j,a.application.interval=l,a.application.IntervalId=null}return k.update({websiteId:c.websiteId,controller:"applications",id:c.actionId},a.application).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success"),e.path("/channels/chat/websites/view/"+c.websiteId+"/actions/list")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.actions.view",{url:"/view/:actionId",templateUrl:"app/channels/chat/website/view/action/view/view.html",controller:"ChatWebsiteViewActionViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewActionWizardCtrl",["$scope","$http","Agent","Interval","ChatQueue","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","ChatWebsite","Template","MailAccount","SmsAccount",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"SendSMS",value:"sendSms"}],a.$application=l.application,a.$stateParams=f,a.$interval=m.interval,a.forms={},a.application={app:"queue",intType:"always",alwaysTime:!0},a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})},a.getQueues=function(){return e.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return c.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){i.error(a)})},a.getIntervals=function(){return d.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){i.error(a)})},a.getSmsAccounts=function(){return q.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getTemplates=function(){return o.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.getMailAccounts=function(){return p.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})},a.createItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var c,d,e,j,k;c=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(d=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(d+="-"+a.application.wd_to)):d="*",a.application.md_from&&"always"!==a.application.md_from?(e=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(e+="-"+a.application.md_to)):e="*",a.application.m_from&&"always"!==a.application.m_from?(j=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(j+="-"+a.application.m_to)):j="*",k=c+","+d+","+e+","+j,a.application.interval=k,a.application.IntervalId=null}return n.save({websiteId:f.websiteId,controller:"applications"},a.application).$promise.then(function(){i.show(g.instant("MESSAGE_WELL_DONE"),"success"),h.path("/channels/chat/websites/view/"+f.websiteId+"/actions/list")})["catch"](function(a){i.error(a)})},a.formValidation=function(a){return a},a.next=function(){j.wizard().next()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.actions.wizard",{url:"/wizard",templateUrl:"app/channels/chat/website/view/action/wizard/wizard.html",controller:"ChatWebsiteViewActionWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("ChatDisposition",["$resource",function(a){return a("/api/chat/dispositions/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewModalDispositionAddCtrl",["$scope","$uibModalInstance","ChatWebsite","id","xAlert","$translate",function(a,b,c,d,e,f){a.ok=function(){return c.save({websiteId:d,controller:"dispositions"},{name:a.name}).$promise.then(function(a){b.close(a)})["catch"](function(a){e.show(f.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteDispositionViewCtrl",["$scope","$stateParams","$uibModal","$translate","ChatWebsite","xAlert",function(a,b,c,d,e,f){a.initView=function(){return e.get({websiteId:b.websiteId,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.updateDisposition=function(a,c){return e.update({websiteId:b.websiteId,controller:"dispositions",id:a},{name:c}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.deleteDisposition=function(c){return console.log("delete"),e.remove({websiteId:b.websiteId,controller:"dispositions",id:c}).$promise.then(function(){_.remove(a.dispositions,{id:c})})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addDisposition=function(){return c.open({animation:!0,templateUrl:"app/channels/chat/website/view/disposition/modal/add.modal.html",controller:"ChatWebsiteViewModalDispositionAddCtrl",resolve:{id:function(){return b.websiteId}}}).result.then(function(b){b&&a.dispositions.push(b)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.dispositions",{url:"/dispositions",controller:"ChatWebsiteDispositionViewCtrl",templateUrl:"app/channels/chat/website/view/disposition/view/view.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.embedding",{url:"/embedding",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewEmbeddingViewCtrl",["$scope","$stateParams","$translate","clipboard","xAlert","ChatWebsite",function(a,b,c,d,e,f){a.initView=function(){return f.get({websiteId:b.websiteId,controller:"snippet"}).$promise.then(function(b){a.snippetCode=b.html})["catch"](function(a){e.error(a)})},a.copyToClipboard=function(){d.copyText(a.snippetCode),e.show(c.instant("MESSAGE_TEXT_COPIED_CLIPBOARD")+"!","success")}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.embedding.view",{url:"/view",templateUrl:"app/channels/chat/website/view/embedding/view/view.html",controller:"ChatWebsiteViewEmbeddingViewCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.form",{url:"/forms",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewFormViewCtrl",["$scope","$builder","$validator","$stateParams","$translate","ChatWebsite","xAlert",function(a,b,c,d,e,f,g){a.saveForm=function(a){var c=angular.copy(b.forms[a]);return c.length>3?g.show("You can insert at least 3 input elements","danger"):(_.forEach(c,function(a){delete a.id}),f.updateFields({websiteId:d.websiteId,controller:"fields",id:a},c).$promise.then(function(){g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.error(a)}))},a.getChatWebsiteFields=function(a){return f.query({websiteId:d.websiteId,controller:"fields",id:a}).$promise.then(function(c){_.forEach(c,function(c){b.addFormObject(a,c)})})["catch"](function(a){g.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.form.view",{url:"/view",templateUrl:"app/channels/chat/website/view/form/view/view.html",controller:"ChatWebsiteViewFormViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteHooksViewCtrl",["$scope","ChatWebsite","Pause","$http","$stateParams","$translate","$location","xAlert",function(a,b,c,d,e,f,g,h){a.account={},a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.initView=function(){a.types=[{value:"",name:"-- None --"},{name:"HTTP GET",value:"GET"},{name:"HTTP POST",value:"POST"}],c.get().$promise.then(function(b){a.pauses=b.rows})["catch"](function(a){h.error(a)}),b.get({id:e.websiteId}).$promise.then(function(b){console.log(b),a.account=b,a.account.actions.length<1&&a.account.actions.push({action:"pause",enabled:!1,type:null})})["catch"](function(a){h.error(a)})},a.resetActionData=function(a){a.type=null},a.updateItem=function(){return console.log(a.account),b.update({id:e.websiteId},a.account).$promise.then(function(){h.show(f.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.hooks",{url:"/hooks",controller:"ChatWebsiteHooksViewCtrl",templateUrl:"app/channels/chat/website/view/hooks/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewProactiveListCtrl",["$scope","gridOptions","ChatWebsite","$http","$translate","$stateParams","$uibModal",function(a,b,c,d,e,f,g){a.initProactiveActions=function(){var d={exporterCsvFilename:"telephones.csv",columnDefs:[{name:"name"},{name:"type"},{name:"action",width:125,buttons:[{"class":"blue-hoki",onClick:"grid.appScope.createItem(row.entity)",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a,{websiteId:f.websiteId,controller:"proactive"})},a.createItem=function(b){var c=g.open({animation:!0,templateUrl:"app/channels/chat/website/view/proactive/list/list.create.modal.html",controller:"ChatWebsiteProactiveListCreateCtrl",resolve:{item:b}});c.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteProactiveListCreateCtrl",["$scope","$translate","$uibModalInstance","$stateParams","ChatWebsite","xAlert","item",function(a,b,c,d,e,f,g){a.form={},a.item=g||{},a.title=g?b.instant("APPLICATION_EDIT_PROACTIVE_ACTION"):b.instant("APPLICATION_NEW_PROACTIVE_ACTION"),a.possibleType=[{type:"mouseOver",title:"Mouse Over"},{type:"timeout",title:"Timeout"}],a.save=function(){return g?e.update({websiteId:d.websiteId,controller:"proactive",id:a.item.id},a.item).$promise.then(function(a){f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){f.error(a)}):e.save({websiteId:d.websiteId,controller:"proactive"},a.item).$promise.then(function(a){f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){f.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.proactive.list",{url:"/list",templateUrl:"app/channels/chat/website/view/proactive/list/list.html",controller:"ChatWebsiteViewProactiveListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.proactive",{url:"/proactive",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteSettingViewCtrl",["$scope","$stateParams","$translate","$location","$timeout","socket","xAlert","ChatWebsite","List",function(a,b,c,d,e,f,g,h,i){a.initView=function(){return i.get().$promise.then(function(b){a.lists=b.rows})["catch"](function(a){console.error(a)})},a.updateItemChatWebsite=function(){return h.update({id:b.websiteId},{ListId:a.chatWebsite.ListId}).$promise.then(function(){g.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.settings",{url:"/settings",controller:"ChatWebsiteSettingViewCtrl",templateUrl:"app/channels/chat/website/view/setting/view/view.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.snippet",{url:"/snippet",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewSnippetViewCtrl",["$scope","$http","$stateParams","$translate","Template","$rootScope","FileUploader","$cookieStore","xAlert","ChatWebsite",function(a,b,c,d,e,f,g,h,i,j){a.$translate=d,a.statePreview={state:"online"},a.radioSwitch={isActive:!!f.license.custom,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"};var k=a.uploader=new g({url:"api/chat/websites/"+c.websiteId+"/logo",queueLimit:1,withCredentials:!0,headers:{Authorization:"Bearer "+h.get("token")}});k.filters.push({name:"imageFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|jpg|png|jpeg|".indexOf(b)}}),k.onSuccessItem=function(b,c){a.chatWebsite.logo=c.logo,i.show(d.instant("MESSAGE_WELL_DONE"),"success")},k.onErrorItem=function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},k.onCompleteAll=function(){k.clearQueue()},a.enquirySwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.fidelitySwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.lang={HeaderCurrentlyChatting:"Live Chat",HeaderOffline:"Contact us",
-OperatorOfflineMessage:"It appears as if all operators are currently offline.",OfflineMessage:"<strong>We're not online.</strong><br/>It doesn't mean we're not there to help - leave your message below and we'll be in touch as soon as possible.",EnquiryMessagePlaceholder:"Your message...",EnquiryButtonText:"Leave message",EnquirySubmitSuccess:"Your message was sucessfully submitted - we will contact you as soon as possible.",OperatorComposing:"{fullname} is typing...",FirstMessageText:"",ExitChatButtonText:"Exit Chat",ExitChatQuestionText:"Are you sure?",ExitChatButtonConfirmText:"Yes",ExitChatButtonCancelText:"No",MessagePlaceholderText:"Your message...",MessageSendButtonText:"Send",ValidationEmailRequired:"Please enter your email address",ValidationEmailInvalid:"Please enter a valid email address",ValidationEmailMaxLength:"The email address may not exceed 85 characters",ValidationUsernameRequired:"Please enter your name",ValidationUsernameMaxLength:"The name may not exceed 45 characters",ValidationEnquiryRequired:"Please enter your enquiry",ValidationEnquiryMaxLength:"The enquiry may not exceed 1500 characters",ValidationMessageRequired:"Please enter your message",ValidationMessageMaxLength:"The message may not exceed 750 characters"},a.initView=function(){return j.get({id:c.websiteId}).$promise.then(function(b){return a.chatWebsite=b,e.get().$promise}).then(function(b){a.templates=b.rows})["catch"](function(a){i.error(a)})},a.updateItem=function(){return j.update({id:a.chatWebsite.id},a.chatWebsite).$promise.then(function(){i.show(d.instant("MESSAGE_CHAT_WEBSITE_UPDATE_SUCCESS")+"!","success")})["catch"](function(a){i.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.snippet.view",{url:"/view",templateUrl:"app/channels/chat/website/view/snippet/view/view.html",controller:"ChatWebsiteViewSnippetViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewCtrl",["$scope","xAlert","$http","$location","$stateParams","$translate","WizardHandler","ChatApplication","ChatWebsite",function(a,b,c,d,e,f,g,h,i){a.initView=function(){return i.get({id:e.websiteId}).$promise.then(function(b){a.chatWebsite=b})["catch"](function(a){b.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view",{url:"/view/:websiteId",templateUrl:"app/channels/chat/website/view/view.html",controller:"ChatWebsiteViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites",{url:"/websites",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:29}}})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteWizardCtrl",["$scope","$http","$location","$translate","WizardHandler","xAlert","ChatWebsite",function(a,b,c,d,e,f,g){a.$translate=d,a.next=function(){e.wizard().next()},a.exitValidation=function(a){return a},a.initWizard=function(){a.forms={formSetting:void 0,formAppearance:void 0,formLabel:void 0,formFunctionality:void 0},a.item={},a.item.remote=c.protocol()+"://"+location.host,a.item.color="#000080",a.item.color_focus="#000080",a.item.color_button="#000080",a.item.header_shape="rounded",a.item.animation=!0,a.item.header_online="We are here!",a.item.online_message="<strong>Questions?</strong><br />Insert your name and email address to start a live-chat with our support team.",a.item.name_title="Name",a.item.username_placeholder="Your name",a.item.email_title="Email Address",a.item.email_placeholder="Your e-mail address",a.item.start_chat_button="Chat",a.item.rating_message="Would you like rate this chat?",a.item.rating_send="Send",a.item.rating_skip="Skip",a.item.header_offline="Contact us",a.item.offline_message="<strong>We're not online.</strong><br />It doesn't mean we're not there to help - leave your message below and we'll be in touch as soon as possible.",a.item.message_title="Message",a.item.enquiry_message_placeholder="Your message...",a.item.enquiry_button="Leave message",a.item.agents_busy="In this moment all agents are busy. Try again!",a.item.download_transcript=!0},a.createItem=function(){return g.save(a.item).$promise.then(function(){f.show(d.instant("MESSAGE_CHAT_WEBSITE_CREATE_SUCCESS"),"success"),c.path("/channels/chat/websites/list")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.wizard",{url:"/wizard",templateUrl:"app/channels/chat/website/wizard/wizard.html",controller:"ChatWebsiteWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts",{url:"/accounts",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:38}}})}]),angular.module("xCallyShuttleApp").controller("FaxAccountListCtrl",["$scope","$uibModal","gridOptions","FaxAccount",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"chat_websites.csv",columnDefs:[{name:"name"},{name:"description"},{name:"localstationid"},{name:"TrunkName",displayName:"APPLICATION_TRUNK"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/fax/accounts/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(d,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/channels/fax/account/list/list.create.modal.html",controller:"FaxAccountListCreateCtrl"});c.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("FaxAccountListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","FaxAccount","Trunk",function(a,b,c,d,e,f){a.initWizard=function(){return a.form={},a.item={},a.trunks=[],f.get().$promise.then(function(b){a.trunks=b.rows})["catch"](function(a){d.error(a)})},a.save=function(){return e.save(a.item).$promise.then(function(a){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close(a)})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.list",{url:"/list",templateUrl:"app/channels/fax/account/list/list.html",controller:"FaxAccountListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.view.actions",{url:"/actions",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("FaxAccountViewActionListCtrl",["$scope","gridOptions","FaxAccount","$http","$translate","$stateParams",function(a,b,c,d,e,f){a.initActons=function(){var d={draggable:!0,exporterCsvFilename:"fax_applications.csv",enableSorting:!1,enableFiltering:!1,columnDefs:[{name:"app",cellClass:"text-center"},{name:"name",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span>{{row.entity.app == "queue" ? row.entity.FaxQueue.name : row.entity.User.name}}</span></div>'},{name:"timeout",cellClass:"text-center"},{name:"interval",displayName:"APPLICATION_TIME_INTERVAL",cellClass:"text-center",cellTemplate:"<div><span>{{row.entity.Interval ? row.entity.Interval.name : row.entity.interval}}</span></div>"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/fax/accounts/view/{{row.entity.FaxAccountId}}/actions/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.app, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a,{accountId:f.accountId,controller:"applications"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.view.actions.list",{url:"/list",templateUrl:"app/channels/fax/account/view/action/list/list.html",controller:"FaxAccountViewActionListCtrl"})}]),angular.module("xCallyShuttleApp").controller("FaxAccountViewActionViewCtrl",["$scope","$http","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","Agent","Interval","FaxQueue","FaxAccount","Template","MailAccount","SmsAccount",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initAction=function(){return a.$application=i.application,a.$stateParams=c,a.$interval=j.interval,a.forms={},a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"SendSMS",value:"sendSms"}],n.get({accountId:c.accountId,controller:"applications",id:c.actionId}).$promise.then(function(b){if(a.application=b,a.application.alwaysTime=!1,a.application.IntervalId)a.application.intType="list";else switch(a.application.interval){case"*,*,*,*":a.application.intType="always";break;default:a.application.intType="custom"}if("always"===a.application.intType||"custom"===a.application.intType){var c=a.application.interval.split(",");"*"===c[0]?a.application.alwaysTime=!0:(a.application.t_from=moment(new Date),a.application.t_to=moment(new Date),a.application.t_from.hour(c[0].split("-")[0].split(":")[0]),a.application.t_from.minute(c[0].split("-")[0].split(":")[1]),a.application.t_to.hour(c[0].split("-")[1].split(":")[0]),a.application.t_to.minute(c[0].split("-")[1].split(":")[1])),"*"===c[1]?(a.application.wd_from="always",a.application.wd_to="always"):(a.application.wd_from=c[1].split("-")[0],a.application.wd_to=c[1].split("-")[1]),"*"===c[2]?(a.application.md_from="always",a.application.md_to="always"):(a.application.md_from=c[2].split("-")[0],a.application.md_to=c[2].split("-")[1]),"*"===c[3]?(a.application.m_from="always",a.application.m_to="always"):(a.application.m_from=c[3].split("-")[0],a.application.m_to=c[3].split("-")[1])}a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})})["catch"](function(a){f.error(a)})},a.getQueues=function(){return m.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return k.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return l.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.getSmsAccounts=function(){return q.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getTemplates=function(){return o.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.getMailAccounts=function(){return p.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})},a.updateItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var g,h,i,j,k;g=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(h=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(h+="-"+a.application.wd_to)):h="*",a.application.md_from&&"always"!==a.application.md_from?(i=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(i+="-"+a.application.md_to)):i="*",a.application.m_from&&"always"!==a.application.m_from?(j=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(j+="-"+a.application.m_to)):j="*",k=g+","+h+","+i+","+j,a.application.interval=k,a.application.IntervalId=null}return n.update({accountId:c.accountId,controller:"applications",id:c.actionId},a.application).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success"),e.path("/channels/fax/accounts/view/"+c.accountId+"/actions/list")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.view.actions.view",{url:"/view/:actionId",templateUrl:"app/channels/fax/account/view/action/view/view.html",controller:"FaxAccountViewActionViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("FaxAccountViewActionWizardCtrl",["$scope","$http","Agent","FaxQueue","Interval","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","FaxAccount","Template","MailAccount","SmsAccount",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"SendSMS",value:"sendSms"}],a.$application=l.application,a.$stateParams=f,a.$interval=m.interval,a.forms={},a.application={alwaysTime:!0},a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})},a.getQueues=function(){return d.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return c.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return e.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.getSmsAccounts=function(){return q.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getTemplates=function(){return o.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.getMailAccounts=function(){return p.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})},a.createItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var c,d,e,j,k;c=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(d=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(d+="-"+a.application.wd_to)):d="*",a.application.md_from&&"always"!==a.application.md_from?(e=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(e+="-"+a.application.md_to)):e="*",a.application.m_from&&"always"!==a.application.m_from?(j=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(j+="-"+a.application.m_to)):j="*",k=c+","+d+","+e+","+j,a.application.interval=k,a.application.IntervalId=null}return n.save({accountId:f.accountId,controller:"applications"},a.application).$promise.then(function(){i.show(g.instant("MESSAGE_WELL_DONE"),"success"),h.path("/channels/fax/accounts/view/"+f.accountId+"/actions/list")})["catch"](function(a){i.error(a)})},a.formValidation=function(a){return a},a.next=function(){j.wizard().next()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.view.actions.wizard",{url:"/wizard",templateUrl:"app/channels/fax/account/view/action/wizard/wizard.html",controller:"FaxAccountViewActionWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("FaxDisposition",["$resource",function(a){return a("/api/fax/dispositions/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("FaxInboxViewModaDispositionAddCtrl",["$scope","$uibModalInstance","FaxAccount","id","xAlert",function(a,b,c,d,e){a.ok=function(){return c.save({accountId:d,controller:"dispositions"},{name:a.name}).$promise.then(function(a){b.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("FaxAccountDispositionViewCtrl",["$scope","$stateParams","$uibModal","$translate","FaxAccount","xAlert",function(a,b,c,d,e,f){a.initView=function(){return e.get({accountId:b.accountId,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){f.error(a)})},a.updateDisposition=function(a,c){return e.update({accountId:b.accountId,controller:"dispositions",id:a},{name:c}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){f.error(a)})},a.deleteDisposition=function(c){return e.remove({accountId:b.accountId,controller:"dispositions",id:c}).$promise.then(function(){_.remove(a.dispositions,{id:c})})["catch"](function(a){f.error(a)})},a.addDisposition=function(){return c.open({animation:!0,templateUrl:"app/channels/fax/account/view/disposition/modal/add.modal.html",controller:"FaxInboxViewModaDispositionAddCtrl",resolve:{id:function(){return b.accountId}}}).result.then(function(b){b&&a.dispositions.push(b)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.view.dispositions",{url:"/dispositions",controller:"FaxAccountDispositionViewCtrl",templateUrl:"app/channels/fax/account/view/disposition/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("FaxAccountHooksViewCtrl",["$scope","FaxAccount","Pause","$http","$stateParams","clipboard","$translate","$location","xAlert","List",function(a,b,c,d,e,f,g,h,i,j){a.account={},a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.initView=function(){a.types=[{value:"",name:"-- None --"},{name:"HTTP GET",value:"GET"},{name:"HTTP POST",value:"POST"}],c.get().$promise.then(function(b){a.pauses=b.rows})["catch"](function(a){i.error(a)}),b.get({id:e.accountId}).$promise.then(function(b){a.account=b,a.account.actions.length<1&&a.account.actions.push({action:"pause",enabled:!1,type:null})})["catch"](function(a){i.error(a)})},a.resetActionData=function(a){a.type=null},a.updateItemFaxAccount=function(){return console.log(a.account),b.update({id:e.accountId},a.account).$promise.then(function(){i.show(g.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){i.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.view.hooks",{url:"/hooks",controller:"FaxAccountHooksViewCtrl",templateUrl:"app/channels/fax/account/view/hooks/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("FaxAccountSettingViewCtrl",["$scope","$stateParams","$translate","FaxAccount","List","Trunk","xAlert",function(a,b,c,d,e,f,g){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initView=function(){return a.rate=["2400","4800","7200","9600","12000","14400"],a.techs=["SIP","IAX","DADHI","KHOMP"],f.get().$promise.then(function(b){a.trunks=b.rows})["catch"](function(a){g.error(a)}),e.get().$promise.then(function(b){a.lists=b.rows})["catch"](function(a){g.error(a)}),d.get({id:b.accountId}).$promise.then(function(b){a.account=b})["catch"](function(a){g.error(a)})},a.updateItemFaxAccount=function(){return d.update({id:b.accountId},a.account).$promise.then(function(){g.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.view.settings",{url:"/settings",controller:"FaxAccountSettingViewCtrl",templateUrl:"app/channels/fax/account/view/setting/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("FaxAccountViewCtrl",["$scope","$http","$stateParams","$translate","$location","WizardHandler","socket","xAlert","Modal","FaxAccount",function(a,b,c,d,e,f,g,h,i,j){a.initView=function(){return j.get({id:c.accountId}).$promise.then(function(b){a.account=b})["catch"](function(a){h.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.view",{url:"/view/:accountId",templateUrl:"app/channels/fax/account/view/view.html",controller:"FaxAccountViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}})}]),angular.module("xCallyShuttleApp").controller("FaxAccountWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler","Trunk","FaxAccount",function(a,b,c,d,e,f,g,h){a.translate=d,a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){return a.$translate=d,a.forms={},a.item={},a.rate=["2400","4800","7200","9600","12000","14400"],a.techs=["SIP","IAX","DADHI","KHOMP"],a.item.headerinfo="xCALLY Motion Fax",a.item.ecm="yes",a.item.minrate="4800",a.item.maxrate="14400",a.item.modem="v17,v27,v29",a.item.gateway="no",a.item.faxdetect="no",a.item.t38timeout=5e3,a.item.tech="SIP",g.get().$promise.then(function(b){a.trunks=b.rows})["catch"](function(a){e.error(a)})},a.next=function(){f.wizard().next()},a.previous=function(){f.wizard().previous()},a.exitValidation=function(a){return a},a.createItem=function(){return h.save(a.item).$promise.then(function(a){e.show(d.instant("MESSAGE_WELL_DONE"),"success"),c.path("/channels/fax/accounts/list")})["catch"](function(a){e.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.wizard",{url:"/wizard",templateUrl:"app/channels/fax/account/wizard/wizard.html",controller:"FaxAccountWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax",{url:"/fax",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:10}}})}]),angular.module("xCallyShuttleApp").factory("FaxAccount",["$resource",function(a){return a("/api/fax/accounts/:accountId/:controller/:id",{id:"@accountId"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("FaxAttachment",["$resource",function(a){return a("/api/fax/attachments/:id/:controller",{id:"@id"})}]),angular.module("xCallyShuttleApp").factory("FaxMessage",["$resource",function(a){return a("/api/fax/messages/:id/:controller",{id:"@id",controller:"@controller"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("FaxReport",["$resource",function(a){return a("/api/report/faxs/:id/:controller1/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("FaxRoom",["$resource",function(a){return a("/api/fax/rooms/:id/:controller",{id:"@id",controller:"@controller"},{update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.inbox",{url:"/inbox",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:40}}})}]),angular.module("xCallyShuttleApp").controller("FaxInboxInfoModalCtrl",["$scope","$translate","$uibModalInstance","$stateParams","xAlert","messageId","FaxMessage",function(a,b,c,d,e,f,g){a.data=null,a.initInfo=function(){g.get({id:f}).$promise.then(function(b){a.data={channel:b.channel,channelstate:b.channelstate,channelstatedesc:b.channelstatedesc,uniqueid:b.uniqueid,localstationid:b.localstationid,remotestationid:b.remotestationid,pagestransferred:b.pagestransferred,resolution:b.resolution,transferrate:b.transferrate,lastStatus:b.lastStatus,error:b.error,retry:b.retry}})["catch"](function(b){switch(b.status){case 404:a.data=null;break;default:e.error(b)}})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").directive("faxMessage",["$rootScope","$translate","$uibModal","FaxMessage","List","xAlert",function(a,b,c,d,e,f){return{restrict:"E",scope:{message:"=",listId:"="},templateUrl:"app/channels/fax/inbox/message/message.directive.html",link:function(g){g.openContact=function(c){return g.listId?e.save({listId:g.listId,controller:"contacts"},{fax:c}).$promise.then(function(b){var c=_.find(a.$root.workspaces,{contactID:b.id});c?c.active=!0:a.$root.workspaces.push({active:!0,"class":"icon-user",contactID:b.id,name:b.fax,type:"contact"})})["catch"](function(a){f.error(a)}):void f.show(b.instant("MESSAGE_NO_LIST_CONFIGURED"),"info")},g.info=function(a){c.open({animation:!0,templateUrl:"app/channels/fax/inbox/message/info.modal.html",controller:"FaxInboxInfoModalCtrl",resolve:{messageId:function(){return a.id}}})},g.retry=function(a){return d.update({id:a,status:"SENDING"}).$promise["catch"](function(a){console.error(a)})}}}}]),angular.module("xCallyShuttleApp").directive("faxNote",["$translate","Modal","Auth","FaxMessage","xAlert",function(a,b,c,d,e){return{restrict:"E",scope:{message:"="},templateUrl:"app/channels/fax/inbox/note/note.directive.html",link:function(f){f.Auth=c,f.deleteNote=b.confirm["delete"](function(){return d.remove({id:f.message.id}).$promise.then(function(){e.show(a.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){e.error(a)})})}}}]),angular.module("xCallyShuttleApp").controller("FaxInboxViewModalNoteCtrl",["$scope","$uibModalInstance","$translate","id","FaxRoom","xAlert",function(a,b,c,d,e,f){a.initModal=function(){a.item={}},a.ok=function(){return e.save({id:d,controller:"messages"},{text:a.item.text,status:"NOTE"}).$promise.then(function(){f.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})["finally"](function(){b.close()})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").directive("faxRoom",["$cookieStore","$translate","$uibModal","$timeout","FaxAccount","FaxRoom","FaxMessage","FileUploader","xAlert","usSpinnerService","socket","Tag","Auth","FaxAttachment","List",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){return{restrict:"E",scope:{workspace:"="},templateUrl:"app/channels/fax/inbox/room/room.directive.html",link:function(m){function p(a){if(a){var b=_.words(a),c=_.map(b,function(a){return a?a[0]:""});return c.join("").toUpperCase()}return!1}m.$on("$destroy",function(){}),m.initForm=function(){m.forms={compose:{}}},m.getContacts=function(a){return m.listId?o.get({listId:m.listId,controller:"contacts",fax:a}).$promise.then(function(a){return a.rows})["catch"](function(a){console.error(a)}):[]},m.setList=function(a){m.listId=a};var q=[];m.expanded=!0,m.modelOptions={debounce:{"default":500,blur:250},getterSetter:!0},m.panelLeft=null,m.panelRight="col-md-12",m.form={from:"",to:m.workspace.data&&m.workspace.data.to?m.workspace.data.to:"",disabled:!1},k.socket.on("fax_message:remove",function(a){_.remove(m.faxRoom.FaxMessages,{id:a.id})}),k.socket.on("fax_message:save",function(a){return m.workspace.id&&a.FaxRoomId==m.workspace.id?(m.workspace.active||m.workspace.unread++,g.get({id:a.id}).$promise.then(function(a){m.faxRoom||(m.faxRoom={FaxMessages:[]});var b=_.findIndex(m.faxRoom.FaxMessages,{id:a.id});b>-1?_.merge(m.faxRoom.FaxMessages[b],a):m.faxRoom.FaxMessages.unshift(a),m.panelLeft="col-md-6",m.panelRight="col-md-6"})["catch"](function(a){console.error(a)})):void 0});var r=m.uploader=new h({url:"api/fax/attachments",autoUpload:!0,withCredentials:!0,queueLimit:1,headers:{Authorization:"Bearer "+a.get("token")}});return r.filters.push({name:"uploadFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|pdf|tiff|tif".indexOf(b)}}),r.onWhenAddingFileFailed=function(a,c){switch(c.name){case"queueLimit":i.show(b.instant("MESSAGE_QUEUE_LIMIT_EXCEEDED"),"danger");break;case"uploadFilter":i.show(b.instant("MESSAGE_WRONG_FILE_FORMAT"),"danger");break;default:i.show(b.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")}},r.removeFromQueue=function(a){var c=this;return n["delete"]({id:a.basename}).$promise.then(function(){var b=c.getIndexOfItem(a),d=c.queue[b];d.isUploading&&d.cancel(),c.queue.splice(b,1),d._destroy(),c.progress=c._getTotalProgress(),q=_.reject(q,{basename:a.basename})})["catch"](function(){i.show(b.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},r.onErrorItem=function(){i.show(b.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},r.onSuccessItem=function(a,b){var c={path:b.path,name:b.name,basename:b.basename,type:b.type};a=_.merge(a,c),q.push(c)},m.getMessageMailId=function(a){var b=a.UserId?"imgFaxUserId"+a.UserId:"imgFaxVisitorId";return b+=m.faxRoom.id.toString()+a.id.toString()},m.togglePanelLeft=function(){m.panelLeft?(m.panelLeft=null,m.panelRight="col-md-12"):(m.panelLeft="col-md-6",m.panelRight="col-md-6")},m.closeRoom=function(){return c.open({animation:!0,templateUrl:"app/channels/fax/inbox/status/status.modal.html",controller:"FaxInboxStatusModalCtrl",resolve:{status:function(){return m.faxRoom.status},accountId:function(){return m.faxRoom.FaxAccount.id}}}).result.then(function(a){return f.update({id:m.workspace.id},a).$promise["catch"](function(a){i.error(a)})})},m.loadAgents=function(){c.open({animation:!0,templateUrl:"app/channels/fax/inbox/view/view.agents.modal.html",controller:"FaxInboxViewModalAgentCtrl",resolve:{roomId:function(){return m.workspace.id}}})},m.cancel=function(){m.form.disabled=!1,m.form.from="",m.form.to=""},m.loadNote=function(){c.open({animation:!0,templateUrl:"app/channels/fax/inbox/note/note.modal.html",controller:"FaxInboxViewModalNoteCtrl",resolve:{id:function(){return m.workspace.id}}})},m.getMessageFaxId=function(a){var b=a.UserId?"imgFaxUserId"+a.UserId:"imgFaxVisitorId";return b+=m.faxRoom.id.toString()+a.id.toString()},m.getMessageRoomAvatar=function(a,b,c,e){d(function(){var d=b?"#imgFaxUserId"+b:"#imgFaxVisitorId";d+=m.faxRoom.id.toString()+a.toString(),angular.element(d).avatar({useGravatar:!1,initials:e?[]:p(c),fallbackImage:e?"api/users/avatar/"+e:"api/users/avatar/unknown_avatar"})})},m.onChanged=function(){return f.update({id:m.workspace.id},{tags:m.form.tags}).$promise["catch"](function(a){i.error(a)})},m.sendFax=function(){j.spin("spinner-grid");var a={from:m.form.from,to:m.form.to[0].fax||"",status:"SENDING",FaxAttachments:q,FaxRoomId:m.faxRoom?m.faxRoom.id:null},c=_.find(m.faxAccounts,{localstationid:m.form.from});return c?e.save({accountId:c.id,controller:"send"},a).$promise.then(function(a){return r.queue=[],q=[],i.show(b.instant("MESSAGE_WELL_DONE"),"success"),m.SmsRoom?m.SmsRoom:f.get({id:"messages",controller:a.id}).$promise}).then(function(a){a&&(m.workspace.id=a.id,m.workspace.name=a.contact,m.faxRoom=a,m.panelLeft="col-md-6",m.panelRight="col-md-6",m.expanded=!1)})["catch"](function(a){i.error(a)})["finally"](function(){j.stop("spinner-grid")}):(console.log("Can not find account"),void j.stop("spinner-grid"))},l.get().$promise.then(function(a){m.tags=_.map(a.rows,"name")})["catch"](function(a){console.error(a)}),e.get().$promise.then(function(a){m.faxAccounts=a.rows})["catch"](function(a){console.error(a)}),m.workspace.id?(m.panelLeft="col-md-6",m.panelRight="col-md-6",f.get({id:m.workspace.id}).$promise.then(function(a){m.faxRoom=a,m.form.from=a.FaxAccount.localstationid,m.form.tags=a.tags,m.workspace.name=a.contact||"No number",m.expanded=!1;
-var b=_.findLast(a.FaxMessages,{status:"RECEIVED"});return b&&(m.form.to=[{fax:b.from}]),k.socket.on("fax_room:save",function(a){a.id===m.workspace.id&&_.merge(m.faxRoom,a)}),a})["catch"](function(a){i.error(a)})["finally"](function(){j.stop("spinner-grid"),m.form.disabled=!1})):(m.panelLeft=null,m.panelRight="col-md-12",j.stop("spinner-grid"),void 0)}}}]),angular.module("xCallyShuttleApp").controller("FaxInboxStatusModalCtrl",["$scope","$uibModalInstance","FaxAccount","status","accountId",function(a,b,c,d,e){a.modal={title:"APPLICATION_CONFIRM_CLOSE",text:"MESSAGE_ARE_YOU_SURE_YOU_WANT_TO_CLOSE_THE_FAX"},a.initDisposition=function(){return a.item={disposition:null,status:"CLOSED"},c.get({accountId:e,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a)})},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.inbox.view.account",{url:"/account/:id",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:10}}})}]),angular.module("xCallyShuttleApp").controller("FaxInboxViewAccountListCtrl",["$scope","$rootScope","$uibModal","$translate","$stateParams","$state","Tag","usSpinnerService","socket","FaxAccount","FaxRoom","gridOptions","uiGridConstants","Auth","Modal","xAlert","localStorageService","uibButtonConfig",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){a.openRoom=function(b){var c=_.find(a.workspaces,{id:b,type:"faxRoom"});return c?c.active=!0:a.workspaces.push({id:b,type:"faxRoom","class":"fa fa-fax",active:!0}),b&&"agent"===n.getCurrentUser().role&&"PENDING"!==a.query.status&&"CLOSED"!==a.query.status?k.patch({id:b},{status:"OPEN",openReason:"agent"}).$promise["catch"](function(a){console.error(a)}):void 0},a.getPage=function(){h.spin("spinner-grid");var b={accountId:e.id,controller:"rooms"};return a.query&&_.merge(b,a.query),j.query(b).$promise.then(function(b){q.set("faxAccountId",e.id),a.gridOptions.data=b,i.socket.on("fax_room:save",function(b){if(b.FaxAccountId==e.id){var c=_.find(a.gridOptions.data,{id:b.id});c?c.status!==b.status?_.remove(a.gridOptions.data,{id:b.id}):_.merge(c,b):a.query.status===b.status&&a.gridOptions.data.push(b)}}),i.socket.on("fax_room:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})})["catch"](function(a){p.error(a)})["finally"](function(){h.stop("spinner-grid")})},a.initView=function(){r.activeClass="green-haze",a.id=[],a.isAdmin=n.isAdmin(),a.isAgent=n.isAgent(),a.uncheckable=!1,a.query={status:q.get("faxStatus")?q.get("faxStatus"):"NEW",tags:q.get("faxTags")?q.get("faxTags"):[]},a.$watch("query.status",function(){q.set("faxStatus",a.query.status),a.getPage(a.query)},!0),j.get().$promise.then(function(b){a.faxAccounts=b.rows})["catch"](function(a){console.error(a)}),g.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)}),a.gridOptions={exporterCsvFilename:"fax_rooms.csv",enableRowHeaderSelection:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!1,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,enableSelectAll:!0,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,columnDefs:[{name:"lastEvent",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>           <span data-ng-class=\"{'icon-arrow-up font-green': row.entity.lastEvent === 'SENT',           'icon-arrow-up font-yellow': row.entity.lastEvent === 'SENDING',           'icon-arrow-down font-green': row.entity.lastEvent === 'RECEIVED',           'icon-close font-red': row.entity.lastEvent === 'FAILED',           'icon-question': !row.entity.lastEvent}\">           </span>           </div>",width:30,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"tags",displayName:"",headerCellTemplate:'<i class="icon-tag" style="margin-top: 8px; margin-left: 8px;"></i>',cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><i data-ng-class=\"row.entity.tags.length ? 'icon-tag' : ''\" title=\"{{row.entity.tags}}\"></i></div>",width:30,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"id",displayName:"Id",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>#{{row.entity.id}}</span></div>",width:75,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"contact",cellClass:"text-center"},{name:"disposition",displayName:"APPLICATION_DISPOSITION",headerCellFilter:"translate"},{name:"updatedAt",cellFilter:"date:'MM/dd/yyyy HH:mm'",width:120,enableSorting:!1,enableFiltering:!1,sort:{direction:m.DESC}},{name:"action",cellTemplate:'<div>           <a class="btn btn-icon-only font-green" data-ng-hide="row.entity.waiting" data-ng-click="grid.appScope.openRoom(row.entity.id, row.entity.contact)"><i class="fa fa-fax" aria-hidden="true"></i></a>           <a class="btn btn-icon-only font-red" data-ng-show="grid.appScope.isAdmin" data-ng-click="grid.appScope.deleteItem(row.entity.id, row.entity.id)"><i class="fa fa-trash" aria-hidden="true"></i>           </div>',enableSorting:!1,cellClass:"ui-grid-vcenter",width:70,enableFiltering:!1,enableColumnMenu:!1}],data:[],onRegisterApi:function(b){a.gridApi=b,a.gridApi.selection&&(a.gridApi.selection.on.rowSelectionChanged(a,function(b){b.isSelected?a.id.push(a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id):_.pull(a.id,a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id)}),a.gridApi.selection.on.rowSelectionChangedBatch(a,function(b){b[0].isSelected?a.id=_.union(a.id,_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id")):_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id").forEach(function(b){_.pull(a.id,b)})}))}},a.getPage(a.query)},a.onChanged=function(){q.set("faxTags",a.query.tags),a.getPage(a.query)},a.loadAgents=function(a){c.open({animation:!0,templateUrl:"app/channels/fax/inbox/view/view.agents.modal.html",controller:"FaxInboxViewModalAgentCtrl",resolve:{roomId:a}})},a.tagItems=function(){c.open({animation:!0,templateUrl:"app/channels/fax/inbox/view/view.tags.modal.html",controller:"FaxInboxViewModalTagCtrl",resolve:{id:function(){return a.id}}}).result.then(function(){a.gridApi.selection.clearSelectedRows(),a.id=[]})},a.deleteItem=o.confirm["delete"](function(b){var c={id:b};return k.remove(c).$promise.then(function(){a.getPage(),p.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})}),a.deleteItems=o.confirm["delete"](function(){var b={ids:a.id};return k["delete"](b).$promise.then(function(){a.getPage(),p.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})}),a.disposeItems=function(){return c.open({animation:!0,templateUrl:"app/channels/fax/inbox/status/status.modal.html",controller:"FaxInboxStatusModalCtrl",resolve:{status:function(){return null},accountId:function(){return e.id}}}).result.then(function(b){return k.patch({id:a.id},b).$promise.then(function(){a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.inbox.view.account.list",{url:"/list",templateUrl:"app/channels/fax/inbox/view/account/list/list.html",controller:"FaxInboxViewAccountListCtrl",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:10}}})}]),angular.module("xCallyShuttleApp").controller("FaxInboxViewModalAgentCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Agent","FaxRoom","xAlert","roomId",function(a,b,c,d,e,f,g,h){a.initModal=function(){a.agents=[],a.item={agents:[]},e.get().$promise.then(function(b){b.rows.forEach(function(b){a.agents.push(b)})})["catch"](function(a){console.error(a)}),f.query({id:h,controller:"agents"}).$promise.then(function(b){b.forEach(function(b){a.agents.push(b),a.item.agents.push(b.id)})})["catch"](function(a){console.error(a)}),a.modal={dismissable:!0,title:"APPLICATION_MESSAGE_SEND_RETRY",text:"MESSAGE_MESSAGE_SEND_RETRY",buttons:[{classes:"btn btn-success",text:"APPLICATION_RETRY",click:function(a){b.close(a)}},{classes:"btn default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]}},a.ok=function(){return f.update({id:h,controller:"agents",agents:a.item.agents}).$promise.then(function(){g.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close()})["catch"](function(a){console.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("FaxInboxViewCtrl",["$scope","$timeout","$location","localStorageService","FaxAccount","xAlert",function(a,b,c,d,e,f){a.initView=function(){return e.get().$promise.then(function(b){var e=null;a.faxAccounts=b.rows,a.faxAccounts.length&&(e="/channels/fax/inbox/view/account/"+(d.get("faxAccountId")||a.faxAccounts[0].id)+"/list"),e&&c.path(e)})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.inbox.view",{url:"/view",templateUrl:"app/channels/fax/inbox/view/view.html",controller:"FaxInboxViewCtrl",reload:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/inbox.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("FaxInboxViewModalStatusCtrl",["$scope","$uibModalInstance","$translate","$stateParams","$location","FaxRoom","xAlert","id","status",function(a,b,c,d,e,f,g,h,i){a.initModal=function(){a.modal={dismissable:!0,title:"APPLICATION_STATUS",html:"<p>"+c.instant("MESSAGE_CHANGE_STATUS")+"<strong> "+i+"</strong>?</p>",status:i,buttons:[{classes:"btn btn-success",text:"APPLICATION_CONFIRM",click:function(a){return f.update({id:h},{status:i}).$promise.then(function(){g.show(c.instant("MESSAGE_STATUS_UPDATE_SUCCESS"),"success"),b.close(a)})["catch"](function(a){g.error(a)})}},{classes:"btn default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]}}}]),angular.module("xCallyShuttleApp").controller("FaxInboxViewModalTagCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Tag","FaxRoom","xAlert","id",function(a,b,c,d,e,f,g,h){console.log(h),a.initModal=function(){return a.tags=[],a.item={tags:[]},a.modal={dismissable:!0,title:"APPLICATION_MESSAGE_SEND_RETRY",text:"MESSAGE_MESSAGE_SEND_RETRY",buttons:[{"class":"btn-success",text:"APPLICATION_TAG",click:function(){var d={status:!0};return f.patch({id:h},{tags:a.item.tags}).$promise["catch"](function(){d.status=!1,g.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){b.close(d)})}},{"class":"default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]},e.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").factory("FaxQueue",["$resource",function(a){return a("/api/fax/queues/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("FaxQueueListCtrl",["$scope","FaxQueue","gridOptions","Auth","$uibModal",function(a,b,c,d,e){a.initView=function(){a.Auth=d;var e={exporterCsvFilename:"fax_queues.csv",columnDefs:[{name:"name"},{name:"description"},{name:"strategy"},{name:"timeout"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/fax/queues/view/{{row.entity.id}}/settings",name:"settings"},{"class":"green-meadow",href:"/channels/fax/queues/view/{{row.entity.id}}/agents",name:"agents",hide:"user"===d.getCurrentUser().role},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,e,a)},a.createItem=function(){var b=e.open({animation:!0,templateUrl:"app/channels/fax/queue/list/list.create.modal.html",controller:"FaxQueueListCreateCtrl",size:"lg"});b.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("FaxQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","FaxQueue","Team","strategies",function(a,b,c,d,e,f,g){a.form={},a.strategies=g,a.item={penalty:0,agents:[]},a.getTeams=function(){return f.get({controller:"associations"}).$promise.then(function(b){a.teams=b.rows}).then(function(){ComponentsDropdowns.bindQueue(a.teams,[],function(){return{select:function(b){a.item.agents=_.union(a.item.agents,b)},deselect:function(b){a.item.agents=_.difference(a.item.agents,b)}}})})["catch"](function(a){console.error(a)})},a.save=function(){return e.save(a.item).$promise.then(function(a){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close(a)})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.queues.list",{url:"/list",templateUrl:"app/channels/fax/queue/list/list.html",controller:"FaxQueueListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.queues",{url:"/queues",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:39}}})}]),angular.module("xCallyShuttleApp").controller("FaxQueueViewCtrl",["$scope","$http","$translate","$stateParams","xAlert","FaxQueue","Team","Auth","strategies",function(a,b,c,d,e,f,g,h,i){a.Auth=h,a.strategies=i;var j=function(){return{select:function(b){return f.save({id:a.queue.id,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.error(a)})},deselect:function(b){return f["delete"]({id:a.queue.id,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.error(a)})}}};a.getQueue=function(){return f.get({id:d.id}).$promise.then(function(b){b.penalty=0,a.queue=b})["catch"](function(a){e.error(a)})},a.updateFaxQueue=function(){return f.update({id:d.id},{name:a.queue.name,description:a.queue.description,timeout:a.queue.timeout,strategy:a.queue.strategy}).$promise.then(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.error(a)})},a.getTeams=function(){return g.get({controller:"associations"}).$promise.then(function(b){return a.teams=b.rows,f.get({id:d.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindMailQueue(a.teams,_.map(b.rows,function(a){return{id:a.id,penalty:a.UserHasFaxQueue.penalty}}),j)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.queues.view",{url:"/view/:id",templateUrl:"app/channels/fax/queue/view/view.html",controller:"FaxQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.fax.queues.view.settings",{url:"/settings",templateUrl:"app/channels/fax/queue/view/view.settings.html"}).state("main.channels.fax.queues.view.agents",{url:"/agents",templateUrl:"app/channels/fax/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:41}}})}]),angular.module("xCallyShuttleApp").controller("FaxRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","FaxQueue","usSpinnerService","$q","uiGridConstants","Auth",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){function o(){return k.spin("grid-spinner"),g.get(t).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){q(a)})})["catch"](function(a){f.error(a)})["finally"](function(){k.stop("grid-spinner")})}function p(){e.socket.on("agent:save",function(b){b=b.newValues||b;var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});c&&(c.online=_.has(b,"online")?b.online:c.online,c.lastLoginAt=_.has(b,"lastLoginAt")?b.lastLoginAt:c.lastLoginAt,c.pause=_.has(b,"smsPause")?b.faxPause:c.faxPause,c.pauseType=_.has(b,"pauseType")?b.pauseType:c.pauseType,c.lastPauseAt=_.has(b,"lastPauseAt")?b.lastPauseAt:c.lastPauseAt,c.ipaddr=_.has(b,"ipaddr")?b.ipaddr:c.ipaddr,c.port=_.has(b,"port")?b.port:c.port,c.fullcontact=_.has(b,"fullcontact")?b.fullcontact:c.fullcontact,c.useragent=_.has(b,"useragent")?b.useragent:c.useragent,c.lastms=_.has(b,"lastms")?b.lastms:c.lastms,c.internal=_.has(b,"internal")?b.internal:c.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=_.has(b,"online")?b.online:a.online)}))}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_fax_queue:save",function(b){var c=_.includes(_.map(a.CurrentUser.PFaxQueues,"id"),b.FaxQueueId)||n.isAdmin();if(c){var d=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0});if(d){var e=a.gridOptions.data.indexOf(d);a.gridOptions.data.splice(e+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,queueId:b.FaxQueueId,agent:b.membername,online:d.online})}}}),e.socket.on("user_has_fax_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queueId:b.FaxQueueId})})}function q(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.faxPause,pauseType:b.pauseType,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.FaxQueues.forEach(function(c){a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,queueId:c.id,agent:b.name,online:b.online})})}function r(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.error(a)})}function s(){return j.get().$promise.then(function(b){a.faxQueues=b.rows,e.syncUpdates("fax_queue",a.faxQueues)})["catch"](function(a){f.error(a)})}a.faxQueues=[];var t={controller:"realtime",controller1:"fax",offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="fa" data-ng-class="{\'font-green\':row.entity.online, \'font-red\':!row.entity.online,\'fa-user\':row.entity.online,\'fa-user-times\':!row.entity.online}"></i> <span data-ng-if="row.entity.online" class="left-margin">(<css-timer start-time="row.entity.lastLoginAt"></css-timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"faxPause",width:300,displayName:"APPLICATION_PAUSE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.pause != null && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="fa fa-play font-green pointer-cursor left-margin" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="fa fa-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select> <span data-ng-if="row.entity.pause">({{row.entity.pauseType}})</span><span class="left-margin"><css-timer data-ng-if="row.entity.pause" start-time="row.entity.lastPauseAt"></css-timer></span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"PAUSED"},{value:"false",label:"NOT PAUSED"}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queueId" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queueId)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.faxQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){u(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){u(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){u(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?t.order=null:t.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),o()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){t.offset=(a-1)*b,t.limit=b,o()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?t[a.name]=a.filters[0].term:delete t[a.name]}),o()})}},o(),r(),s(),$timeout(function(){p()})};var u=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_fax_queue")}),a.pause=function(b,c,e){return e&&(a.pauseType=null),i.save({name:c,agent:b,type:e||"DEFAULT PAUSE",data4:e||"DEFAULT PAUSE",channel:"fax"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/fax/realtime/view/agent/queue.modal.add.html",controller:"FaxRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.faxQueues,function(b){return!!_.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})})}}});g.result.then(function(b){return i.save({name:"QueueAdd",agent:e,queues:_.filter(a.faxQueues,function(a){return _.includes(b.queues,a.id)}),channel:"fax",data1:e,data3:b.queues.join(","),data4:"fax"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queueId:b,channel:"fax",data1:a,data3:b,data4:"fax"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/fax/realtime/view/agent/agent.modal.info.html",controller:"FaxRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/fax/realtime/view/agent/agent.html",controller:"FaxRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("FaxRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("FaxRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("FaxRealtimeViewApplicationCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","ReportFaxSession","usSpinnerService","$q","uiGridConstants","$timeout",function(a,b,c,d,e,f,g,h,i,j,k){function l(){return h.spin("spinner-grid"),g.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){m(),h.stop("spinner-grid")})}function m(){e.socket.on("report_fax_session:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&k(function(){_.remove(a.gridOptions.data,{id:b.id})},1e4)):b.leaveAt||a.gridOptions.data.push(b)}),e.socket.on("report_fax_session:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})}a.moment=moment,a.initApplications=function(){a.gridOptions={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"uniqueid",displayName:"APPLICATION_UNIQUEID",headerCellFilter:"translate"},{name:"accountname",displayName:"APPLICATION_ACCOUNT",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span> <span data-ng-if="!row.entity.leaveAt">[<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</span></div>"},{name:"queuename",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.queuename || ''}}</span></div>"}],data:[],gridMenuTitleFilter:function(a){var b=i.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){n(a.gridOptions.data.length)})}},l()};var n=function(a){var b=a?30*a+60:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("report_fax_session")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.realtime.view.applications",{url:"/applications",templateUrl:"app/channels/fax/realtime/view/application/application.html",controller:"FaxRealtimeViewApplicationCtrl"})}]),angular.module("xCallyShuttleApp").controller("FaxRealtimeViewCtrl",["$scope","$state",function(a,b){a.agents=[{name:"Queues",link:"main.channels.fax.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.fax.realtime.view.agents.timeline"}],a.sessions=[{name:"Sessions",link:"main.channels.fax.realtime.view.sessions"}],a.tree={queues:[{name:"Queues",link:"main.channels.fax.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.fax.realtime.view.agents.timeline"}],sessions:[{name:"Sessions",link:"main.channels.fax.realtime.view.sessions"}]}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.realtime.view",{url:"/view",templateUrl:"app/channels/fax/realtime/view/view.html",controller:"FaxRealtimeViewCtrl"})}]),angular.module("xCallyShuttleApp").factory("ReportFaxSession",["$resource",function(a){return a("/api/report/fax/sessions/:id/:controller/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("MailAccount",["$resource",function(a){return a("/api/mail/accounts/:accountId/:controller/:id",{id:"@accountId"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts",{url:"/accounts",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:34}}})}]),angular.module("xCallyShuttleApp").controller("MailAccountListCtrl",["$scope","$stateParams","gridOptions","MailAccount","socket",function(a,b,c,d,e){a.$on("$destroy",function(){e.unsyncUpdates("mail_server_in")}),a.initView=function(){e.socket.on("mail_server_in:save",function(b){var c=_.find(a.gridOptions.data,{id:b.MailAccountId});c&&(c.MailServerIn.state=b.state,c.MailServerIn.source=JSON.parse(b.source))});var f={exporterCsvFilename:"mail_accounts.csv",columnDefs:[{name:"name"},{name:"description"},{name:"address"},{name:"MailServerIn.state",width:100,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div>           <span data-ng-if="row.entity.MailServerIn" class="label label-sm" data-ng-class="row.entity.MailServerIn.state === \'CONNECTED\' ? \'label-success\' : \'label-danger\'">{{row.entity.MailServerIn.state}}</span>           <span data-ng-if="!row.entity.MailServerIn" class="label label-sm label-info" >{{\'APPLICATION_DISABLED\' | translate | uppercase}}</span>           </div>',displayName:"IMAP",enableSorting:!1,enableFiltering:!1},{name:"MailServerOut.state",width:110,cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span class=\"label label-sm\" data-ng-class=\"row.entity.MailServerOut.state === 'CONNECTED' ? 'label-success' : 'label-danger'\">{{row.entity.MailServerOut.state}}</span></div>",displayName:"SMTP",enableSorting:!1,enableFiltering:!1},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/mail/accounts/view/{{row.entity.id}}/settings",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(d,f,a,{accountId:b.accountId})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.list",{
-url:"/list",templateUrl:"app/channels/mail/account/list/list.html",controller:"MailAccountListCtrl"})}]),angular.module("xCallyShuttleApp").factory("MailServerIn",["$resource",function(a){return a("/api/mail/servers/in/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("MailServerOut",["$resource",function(a){return a("/api/mail/servers/out/:id/:controller",{id:"@id"},{update:{method:"PUT"},test:{method:"GET"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.actions",{url:"/actions",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("MailAccountViewActionListCtrl",["$scope","gridOptions","MailAccount","$http","$translate","$stateParams",function(a,b,c,d,e,f){a.initActons=function(){var d={draggable:!0,exporterCsvFilename:"mail_applications.csv",enableSorting:!1,enableFiltering:!1,columnDefs:[{name:"app",cellClass:"text-center"},{name:"name",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span>{{row.entity.app == "queue" ? row.entity.MailQueue.name : row.entity.User.name}}</span></div>'},{name:"timeout",cellClass:"text-center"},{name:"interval",displayName:"APPLICATION_TIME_INTERVAL",cellClass:"text-center",cellTemplate:"<div><span>{{row.entity.Interval ? row.entity.Interval.name : row.entity.interval}}</span></div>"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/mail/accounts/view/{{row.entity.MailAccountId}}/actions/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.app, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a,{accountId:f.accountId,controller:"applications"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.actions.list",{url:"/list",templateUrl:"app/channels/mail/account/view/action/list/list.html",controller:"MailAccountViewActionListCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailAccountViewActionViewCtrl",["$scope","$http","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","Agent","Interval","MailQueue","MailAccount","Template","SmsAccount",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initAction=function(){return a.$application=i.application,a.$stateParams=c,a.$interval=j.interval,a.forms={},a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"ReplyMail",value:"replyMail"},{name:"SendSMS",value:"sendSms"}],a.types=[{key:"APPLICATION_REPLY",value:"reply"},{key:"APPLICATION_REPLY_TO_ALL",value:"replyAll"}],n.get({accountId:c.accountId,controller:"applications",id:c.actionId}).$promise.then(function(b){if(a.application=b,a.application.alwaysTime=!1,a.application.IntervalId)a.application.intType="list";else switch(a.application.interval){case"*,*,*,*":a.application.intType="always";break;default:a.application.intType="custom"}if("always"===a.application.intType||"custom"===a.application.intType){var c=a.application.interval.split(",");"*"===c[0]?a.application.alwaysTime=!0:(a.application.t_from=moment(new Date),a.application.t_to=moment(new Date),a.application.t_from.hour(c[0].split("-")[0].split(":")[0]),a.application.t_from.minute(c[0].split("-")[0].split(":")[1]),a.application.t_to.hour(c[0].split("-")[1].split(":")[0]),a.application.t_to.minute(c[0].split("-")[1].split(":")[1])),"*"===c[1]?(a.application.wd_from="always",a.application.wd_to="always"):(a.application.wd_from=c[1].split("-")[0],a.application.wd_to=c[1].split("-")[1]),"*"===c[2]?(a.application.md_from="always",a.application.md_to="always"):(a.application.md_from=c[2].split("-")[0],a.application.md_to=c[2].split("-")[1]),"*"===c[3]?(a.application.m_from="always",a.application.m_to="always"):(a.application.m_from=c[3].split("-")[0],a.application.m_to=c[3].split("-")[1])}a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})})["catch"](function(a){console.error(a),f.error(a)})},a.getQueues=function(){return m.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return k.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return l.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.getTemplates=function(){return o.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.getMailAccounts=function(){return n.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getSmsAccounts=function(){return p.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.updateItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var g,h,i,j,k;g=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(h=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(h+="-"+a.application.wd_to)):h="*",a.application.md_from&&"always"!==a.application.md_from?(i=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(i+="-"+a.application.md_to)):i="*",a.application.m_from&&"always"!==a.application.m_from?(j=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(j+="-"+a.application.m_to)):j="*",k=g+","+h+","+i+","+j,a.application.interval=k,a.application.IntervalId=null}return n.update({accountId:c.accountId,controller:"applications",id:c.actionId},a.application).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success"),e.path("/channels/mail/accounts/view/"+c.accountId+"/actions/list")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.actions.view",{url:"/view/:actionId",templateUrl:"app/channels/mail/account/view/action/view/view.html",controller:"MailAccountViewActionViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailAccountViewActionWizardCtrl",["$scope","$http","Agent","Template","MailQueue","MailAccount","Interval","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","SmsAccount",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"ReplyMail",value:"replyMail"},{name:"SendSMS",value:"sendSms"}],a.types=[{key:"APPLICATION_REPLY",value:"reply"},{key:"APPLICATION_REPLY_TO_ALL",value:"replyAll"}],a.$application=n.application,a.$stateParams=h,a.$interval=o.interval,a.forms={},a.application={alwaysTime:!0},a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})},a.getQueues=function(){return e.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return c.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getTemplates=function(){return d.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.getSmsAccounts=function(){return p.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getMailAccounts=function(){return f.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return g.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.createItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var c,d,e,g,i;c=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(d=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(d+="-"+a.application.wd_to)):d="*",a.application.md_from&&"always"!==a.application.md_from?(e=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(e+="-"+a.application.md_to)):e="*",a.application.m_from&&"always"!==a.application.m_from?(g=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(g+="-"+a.application.m_to)):g="*",i=c+","+d+","+e+","+g,a.application.interval=i,a.application.IntervalId=null}return f.save({accountId:h.accountId,controller:"applications"},a.application).$promise.then(function(){j.path("/channels/mail/accounts/view/"+h.accountId+"/actions/list")})["catch"](function(a){console.error(a)})},a.formValidation=function(a){return a},a.next=function(){l.wizard().next()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.actions.wizard",{url:"/wizard",templateUrl:"app/channels/mail/account/view/action/wizard/wizard.html",controller:"MailAccountViewActionWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("MailDisposition",["$resource",function(a){return a("/api/mail/dispositions/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("MailInboxViewModaDispositionAddCtrl",["$scope","$uibModalInstance","MailAccount","id","xAlert","$translate",function(a,b,c,d,e,f){a.ok=function(){return c.save({accountId:d,controller:"dispositions"},{name:a.name}).$promise.then(function(a){b.close(a)})["catch"](function(a){e.show(f.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("MailAccountDispositionViewCtrl",["$scope","$stateParams","$uibModal","$translate","MailAccount","xAlert",function(a,b,c,d,e,f){a.initView=function(){return e.get({accountId:b.accountId,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.updateDisposition=function(a,c){return e.update({accountId:b.accountId,controller:"dispositions",id:a},{name:c}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.deleteDisposition=function(c){return console.log("delete"),e.remove({accountId:b.accountId,controller:"dispositions",id:c}).$promise.then(function(){_.remove(a.dispositions,{id:c})})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addDisposition=function(){return c.open({animation:!0,templateUrl:"app/channels/mail/account/view/disposition/modal/add.modal.html",controller:"MailInboxViewModaDispositionAddCtrl",resolve:{id:function(){return b.accountId}}}).result.then(function(b){b&&a.dispositions.push(b)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.dispositions",{url:"/dispositions",controller:"MailAccountDispositionViewCtrl",templateUrl:"app/channels/mail/account/view/disposition/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("MailAccountHooksViewCtrl",["$scope","MailAccount","Pause","$http","$stateParams","clipboard","$translate","$location","xAlert","List",function(a,b,c,d,e,f,g,h,i,j){a.account={},a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.initView=function(){a.types=[{value:"",name:"-- None --"},{name:"HTTP GET",value:"GET"},{name:"HTTP POST",value:"POST"}],c.get().$promise.then(function(b){a.pauses=b.rows})["catch"](function(a){i.error(a)}),b.get({id:e.accountId}).$promise.then(function(b){a.account=b,a.account.actions.length<1&&a.account.actions.push({action:"pause",enabled:!1,type:null})})["catch"](function(a){i.error(a)})},a.resetActionData=function(a){a.type=null},a.updateItemMailAccount=function(){return console.log(a.account),b.update({id:e.accountId},a.account).$promise.then(function(){i.show(g.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){i.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.hooks",{url:"/hooks",controller:"MailAccountHooksViewCtrl",templateUrl:"app/channels/mail/account/view/hooks/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("MailAccountOtherViewCtrl",["$scope","$rootScope","$stateParams","$translate","xAlert","MailAccount",function(a,b,c,d,e,f){a.initView=function(){return a.options={language:b.language,allowedContent:!0,entities:!1,skin:"office2013",contentsCss:"/assets/css/global/richparams.css",extraPlugins:"autogrow",autoGrow_minHeight:450,disableNativeSpellChecker:!1,toolbar:[{name:"clipboard",items:["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Table","HorizontalRule","SpecialChar"]},{name:"tools",items:["Maximize"]},{name:"document",items:["Source"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote"]},{name:"styles",items:["Styles","Format"]},"/",{name:"motion",items:["voice","chat","mail"]}]},f.get({id:c.accountId}).$promise.then(function(b){console.log(b),a.account=b})["catch"](function(a){e.error(a)})},a.updateItemMailAccount=function(){return f.update({id:c.accountId},{whiteLabel:a.account.whiteLabel,signature:a.account.signature}).$promise.then(function(){e.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.other",{url:"/other",controller:"MailAccountOtherViewCtrl",templateUrl:"app/channels/mail/account/view/other/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("MailAccountSettingViewCtrl",["$scope","$http","$stateParams","$translate","$location","$timeout","socket","xAlert","MailAccount","MailMessage","MailServerIn","MailServerOut","usSpinnerService","List","Template",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){a.imapDisabled=!1,a.smtpDisabled=!1,a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.$on("$destroy",function(){g.socket.removeAllListeners("mail_message:sent"),g.socket.removeAllListeners("mail_message:failed")}),a.initView=function(){return g.socket.on("mail_message:sent",function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success"),m.stop("spinner-grid")}),g.socket.on("mail_message:failed",function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger"),m.stop("spinner-grid")}),n.get().$promise.then(function(b){a.lists=b.rows})["catch"](function(a){console.error(a)}),o.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)}),i.get({id:c.accountId}).$promise.then(function(b){a.account=b,a.account.MailServerIn&&(a.account.MailServerIn.source=JSON.parse(a.account.MailServerIn.source),a.account.MailServerOut.source=JSON.parse(a.account.MailServerOut.source),g.socket.on("mail_server_in:state",function(b){if(b.id===a.account.MailServerIn.id)switch(a.account.MailServerIn.state=b.state,a.account.MailServerIn.source=JSON.parse(b.source),b.state){case"CONNECTING":break;default:m.stop("spinner-grid"),a.imapDisabled=!1}})),g.socket.on("mail_server_out:state",function(b){if(b.id===a.account.MailServerOut.id)switch(a.account.MailServerOut.state=b.state,a.account.MailServerOut.source=JSON.parse(b.source),b.state){case"CONNECTING":break;default:m.stop("spinner-grid"),a.smtpDisabled=!1}})})["catch"](function(a){h.error(a)})},a.updateItemMailAccount=function(){return i.update({id:c.accountId},{name:a.account.name,description:a.account.description,address:a.account.address,fidelity:a.account.fidelity,timeout:a.account.timeout,service:a.account.service,ListId:a.account.ListId,TemplateId:a.account.TemplateId}).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})},a.updateItemMailServerIn=function(){var b=angular.copy(a.account.MailServerIn);return delete b.source,m.spin("spinner-grid"),a.imapDisabled=!0,k.update({id:b.id},b).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})},a.updateItemMailServerOut=function(){var b=angular.copy(a.account.MailServerOut);return delete b.source,m.spin("spinner-grid"),a.smtpDisabled=!0,l.update({id:b.id},b).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})},a.test=function(){return m.spin("spinner-grid"),a.smtpDisabled=!0,l.update({id:a.account.MailServerOut.id},{state:"CONNECTING"}).$promise["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.settings",{url:"/settings",controller:"MailAccountSettingViewCtrl",templateUrl:"app/channels/mail/account/view/setting/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("MailAccountViewCtrl",["$scope","$stateParams","MailAccount",function(a,b,c){a.initView=function(){return c.get({id:b.accountId}).$promise.then(function(b){a.account=b})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view",{url:"/view/:accountId",controller:"MailAccountViewCtrl",templateUrl:"app/channels/mail/account/view/view.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}})}]),angular.module("xCallyShuttleApp").controller("MailAccountWizardCtrl",["$scope","$http","$location","$translate","WizardHandler","xAlert","MailAccount",function(a,b,c,d,e,f,g){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.forms={},a.item={MailServerIn:{port:993,ssl:!0,"delete":!1,protocol:"IMAP",filter:"UNSEEN",mailbox:"INBOX",keepalive:!0,authTimeout:5,connTimeout:10},MailServerOut:{port:465,ssl:!0}}},a.goNext=function(){e.wizard().next()},a.formValidation=function(a){return a},a.createItem=function(){return g.save(a.item).$promise.then(function(){c.path("/channels/mail/accounts/list")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.wizard",{url:"/wizard",templateUrl:"app/channels/mail/account/wizard/wizard.html",controller:"MailAccountWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.inbox",{url:"/inbox",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:36}}})}]),angular.module("xCallyShuttleApp").controller("MailInboxInfoModalCtrl",["$scope","$translate","$uibModalInstance","$stateParams","xAlert","uniqueId","ReportSquare",function(a,b,c,d,e,f,g){a.data=null,a.initInfo=function(){g.get({controller:"show",uniqueid:f}).$promise.then(function(b){a.data={id:b.id,channel:b.channel,uniqueid:b.uniqueid,callerid:b.callerid,calleridname:b.calleridname,project_name:b.project_name,extension:b.extension}})["catch"](function(b){switch(b.status){case 404:a.data=null;break;default:e.error(b)}})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").directive("mailMessage",["$rootScope","$translate","MailMessage","List","xAlert","Lightbox","$uibModal",function(a,b,c,d,e,f,g){return{restrict:"E",scope:{message:"=",listId:"="},templateUrl:"app/channels/mail/inbox/message/message.directive.html",link:function(h){h.openPreview=function(a){f.openModal(["api/mail/attachments/"+a],0)},h.openContact=function(c){return h.listId?d.save({listId:h.listId,controller:"contacts"},{email:c}).$promise.then(function(b){var c=_.find(a.$root.workspaces,{contactID:b.id});c?c.active=!0:a.$root.workspaces.push({active:!0,"class":"icon-user",contactID:b.id,name:b.email,type:"contact"})})["catch"](function(a){console.error(a)}):void e.show(b.instant("MESSAGE_NO_LIST_CONFIGURED"),"info")},h.info=function(a){g.open({animation:!0,templateUrl:"app/channels/mail/inbox/message/info.modal.html",controller:"MailInboxInfoModalCtrl",resolve:{uniqueId:function(){return a}}})},h.retry=function(a){return c.update({id:a,status:"SENDING"}).$promise["catch"](function(a){console.error(a)})}}}}]),angular.module("xCallyShuttleApp").directive("mailNote",["$translate","Modal","Auth","MailMessage","xAlert",function(a,b,c,d,e){return{restrict:"E",scope:{message:"="},templateUrl:"app/channels/mail/inbox/note/note.directive.html",link:function(f){f.Auth=c,f.deleteNote=b.confirm["delete"](function(){return d.remove({id:f.message.id}).$promise.then(function(){e.show(a.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){e.error(a)})})}}}]),angular.module("xCallyShuttleApp").controller("MailInboxViewModalNoteCtrl",["$scope","$uibModalInstance","$translate","id","MailRoom","xAlert",function(a,b,c,d,e,f){a.initModal=function(){a.item={}},a.ok=function(){return e.save({id:d,controller:"messages",controller2:"send"},{text:a.item.text,status:"NOTE"}).$promise.then(function(){f.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(){f.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){b.close()})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").directive("mailRoom",["$rootScope","$cookieStore","$translate","$uibModal","$timeout","Tag","CannedAnswer","MailAttachment","List","MailAccount","MailRoom","MailMessage","FileUploader","xAlert","usSpinnerService","socket","Auth",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){return{restrict:"E",scope:{workspace:"="},templateUrl:"app/channels/mail/inbox/room/room.directive.html",link:function(e){function r(a){var b="";return e.mailRoom.MailAccount.signature&&(b+="<br>"+e.mailRoom.MailAccount.signature),a?b+"<br><blockquote>"+a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/\n/g,"<br>")+"</blockquote>":void 0}e.onCKReady=function(a){e.ckEditorInstance=a},e.$on("$destroy",function(){console.log("mailRoom directive $destroy")});var s=[];e.user=q.getCurrentUser(),e.getContacts=function(a){return e.listId?i.get({listId:e.listId,controller:"contacts",email:a}).$promise.then(function(a){return a.rows})["catch"](function(a){console.error(a)}):[]},e.setList=function(a){e.listId=a},e.options={language:a.language,allowedContent:!0,entities:!1,skin:"office2013",extraPlugins:"autogrow",autoGrow_minHeight:600,autoGrow_maxHeight:600,disableNativeSpellChecker:!1,toolbar:[{name:"clipboard",items:["Cut","Copy","Paste","-","Undo","Redo"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Table","HorizontalRule","SpecialChar"]},{name:"tools",items:["Maximize"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote"]},{name:"styles",items:["Styles","Format"]}]},e.expanded=!0,e.modelOptions={debounce:{"default":500,blur:250},getterSetter:!0},e.panelLeft=null,e.panelRight="col-md-12",e.forms={},e.form={from:[],to:e.workspace.data&&e.workspace.data.to?[e.workspace.data.to]:[],cc:[],bcc:[],tags:[],html:"",disabled:!1},p.socket.on("mail_message:remove",function(a){_.remove(e.mailRoom.MailMessages,{id:a.id})}),p.socket.on("mail_message:save",function(a){return e.workspace.id&&a.MailRoomId==e.workspace.id?(e.workspace.active||e.workspace.unread++,l.get({id:a.id}).$promise.then(function(a){e.mailRoom||(e.mailRoom={MailMessages:[]});var b=_.findIndex(e.mailRoom.MailMessages,{id:a.id});b>-1?_.merge(e.mailRoom.MailMessages[b],a):e.mailRoom.MailMessages.unshift(a),e.panelLeft="col-md-6",e.panelRight="col-md-6"})["catch"](function(a){console.error(a)})):void 0});var t=e.uploader=new m({url:"api/mail/attachments",autoUpload:!0,withCredentials:!0,headers:{Authorization:"Bearer "+b.get("token")}});return t.onErrorItem=function(){n.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},t.removeFromQueue=function(a){var b=this;return h["delete"]({id:a.basename}).$promise.then(function(){var c=b.getIndexOfItem(a),d=b.queue[c];d.isUploading&&d.cancel(),b.queue.splice(c,1),d._destroy(),b.progress=b._getTotalProgress(),s=_.reject(s,{basename:a.basename})})["catch"](function(){n.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},t.onSuccessItem=function(a,b){var c={size:b.size,path:b.path,name:b.name,basename:b.basename,type:b.type};a=_.merge(a,c),s.push(c)},e.openRoom=function(b){var c=_.find(a.workspaces,{id:b,type:"mailRoom"});c?c.active=!0:a.workspaces.push({id:b,type:"mailRoom","class":"icon-envelope",active:!0})},e.togglePanelLeft=function(){e.panelLeft?(e.panelLeft=null,e.panelRight="col-md-12"):(e.panelLeft="col-md-6",e.panelRight="col-md-6")},e.onSelectAnswer=function(){e.ckEditorInstance.insertHtml(e.modelOptions.selectedAnswer),delete e.modelOptions.selectedAnswer},e.getAnswers=function(a){return g.get({key:a}).$promise.then(function(a){return _.map(a.rows,"value")})},e.closeRoom=function(){return d.open({animation:!0,templateUrl:"app/channels/mail/inbox/status/status.modal.html",controller:"MailInboxStatusModalCtrl",resolve:{accountId:function(){return e.mailRoom.MailAccount.id}}}).result.then(function(a){return k.patch({id:e.workspace.id},a).$promise["catch"](function(a){n.error(a)})})},e.loadNote=function(){return d.open({animation:!0,templateUrl:"app/channels/mail/inbox/note/note.modal.html",controller:"MailInboxViewModalNoteCtrl",resolve:{id:function(){return e.workspace.id}}})},e.onChanged=function(){return k.update({id:e.workspace.id},{tags:e.form.tags}).$promise["catch"](function(a){console.error(a)})},e.sendMail=function(){o.spin("spinner-grid"),e.form.disabled=!0;var a={},b={subject:e.form.subject||(e.mailRoom?e.mailRoom.subject:null),from:e.form.from,to:_.map(e.form.to,"email"),cc:_.map(e.form.cc,"email"),bcc:_.map(e.form.bcc,"email"),html:e.form.html||null,text:e.form.text||null,inReplyTo:a.messageId||null,status:"SENDING",MailAttachments:s};return e.mailRoom?(a=_.last(e.mailRoom.MailMessages,{status:"RECEIVED"}),b.inReplyTo=a.messageId||null,k.save({id:e.workspace.id,controller:"messages",controller2:"send"},b).$promise.then(function(){e.form.html="",t.queue=[],s=[],n.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(){n.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){o.stop("spinner-grid"),e.form.disabled=!1})):l.save(b).$promise.then(function(a){n.show(c.instant("MESSAGE_MAIL_MESSAGE_SEND_SUCCESS"),"success"),e.form.html="",t.queue=[],s=[],e.workspace.id=a.id,e.workspace.name=a.subject,e.mailRoom=a,e.expanded=!1})["catch"](function(){n.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){o.stop("spinner-grid"),e.form.disabled=!1})},f.get().$promise.then(function(a){e.tags=_.map(a.rows,"name")})["catch"](function(a){console.error(a)}),j.get().$promise.then(function(a){e.mailAccounts=a.rows})["catch"](function(a){console.error(a)}),e.workspace.id?(e.panelLeft="col-md-6",e.panelRight="col-md-6",k.get({id:e.workspace.id}).$promise.then(function(a){e.mailRoom=a,e.expanded=!1,e.listId=a.MailAccount.ListId,e.workspace.name=a.subject||"No subject",e.form.from.push(a.MailAccount.address),e.form.tags=a.tags;var b=_.findLast(e.mailRoom.MailMessages,{status:"RECEIVED"});return b&&(e.form.to=_.map(_.union(b.from,b.to),function(a){return{email:a}}),e.form.to=_.remove(e.form.to,function(b){return b.email!==a.MailAccount.address}),e.form.cc=_.map(b.cc,function(a){return{email:a}}),e.form.bcc=_.map(b.bcc,function(a){return{email:a}}),e.form.subject="Re: "+(b.subject||"No subject"),e.form.html=r(b.text)),p.socket.on("mail_room:save",function(a){a.id===e.workspace.id&&_.merge(e.mailRoom,a)}),a})["catch"](function(a){console.error(a)})["finally"](function(){o.stop("spinner-grid"),e.form.disabled=!1})):(e.panelLeft=null,e.panelRight="col-md-12",o.stop("spinner-grid"),void 0)}}}]),angular.module("xCallyShuttleApp").controller("MailInboxStatusModalCtrl",["$scope","$uibModalInstance","MailAccount","accountId",function(a,b,c,d){a.modal={title:"APPLICATION_CONFIRM_CLOSE",text:"MESSAGE_ARE_YOU_SURE_YOU_WANT_TO_CLOSE_THE_MAIL"},a.initDisposition=function(){return a.item={disposition:null,status:"CLOSED"},c.get({accountId:d,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a)})},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.inbox.view.account",{url:"/account/:id",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:9}}})}]),angular.module("xCallyShuttleApp").controller("MailInboxViewAccountListCtrl",["$scope","$rootScope","$uibModal","$translate","$stateParams","$state","Tag","uibButtonConfig","usSpinnerService","socket","MailAccount","MailRoom","uiGridConstants","Auth","Modal","xAlert","localStorageService",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){a.openRoom=function(b,c){var d=_.find(a.workspaces,{id:b,type:"mailRoom"});return d&&b?d.active=!0:a.workspaces.push({id:b,subject:c,type:"mailRoom","class":"icon-envelope",active:!0}),b&&"agent"===n.getCurrentUser().role&&"PENDING"!==a.query.status&&"CLOSED"!==a.query.status?l.patch({id:b},{status:"OPEN",openReason:"agent"}).$promise["catch"](function(a){console.error(a)}):void 0},a.getPage=function(){i.spin("spinner-grid");var b={accountId:e.id,controller:"rooms"};return a.query&&_.merge(b,a.query),k.query(b).$promise.then(function(b){q.set("mailAccountId",e.id),a.gridOptions.data=b,j.socket.on("mail_room:save",function(b){if(b.MailAccountId==e.id){var c=_.find(a.gridOptions.data,{id:b.id});c?c.status!==b.status?_.remove(a.gridOptions.data,{id:b.id}):_.merge(c,b):a.query.status===b.status&&a.gridOptions.data.push(b)}}),j.socket.on("mail_room:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})})["catch"](function(a){console.error(a)})["finally"](function(){i.stop("spinner-grid")})},a.initView=function(){h.activeClass="green-haze",a.id=[],a.isAdmin=n.isAdmin(),
-a.isAgent=n.isAgent(),a.uncheckable=!1,a.query={status:q.get("mailStatus")?q.get("mailStatus"):"NEW",tags:q.get("mailTags")?q.get("mailTags"):[]},a.$watch("query.status",function(){q.set("mailStatus",a.query.status),a.getPage()},!0),k.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)}),g.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)}),a.gridOptions={exporterCsvFilename:"mail_rooms.csv",enableRowHeaderSelection:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!1,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,enableSelectAll:!0,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,columnDefs:[{name:"lastEvent",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>             <span data-ng-class=\"{'icon-arrow-up font-green': row.entity.lastEvent === 'SENT',             'icon-arrow-up font-yellow': row.entity.lastEvent === 'SENDING',             'icon-arrow-down font-green': row.entity.lastEvent === 'RECEIVED',             'icon-close font-red': row.entity.lastEvent === 'FAILED',             'icon-question': !row.entity.lastEvent}\">             </span>             </div>",width:30,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"attachment",displayName:"",headerCellTemplate:'<i class="icon-paper-clip" style="margin-top: 8px; margin-left: 8px;"></i>',cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><i data-ng-class=\"row.entity.attachment ? 'icon-paper-clip' : ''\"></i></div>",width:30,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"tags",displayName:"",headerCellTemplate:'<i class="icon-tag" style="margin-top: 8px; margin-left: 8px;"></i>',cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><i data-ng-class=\"row.entity.tags.length ? 'icon-tag' : ''\" title=\"{{row.entity.tags}}\"></i></div>",width:30,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"id",displayName:"Id",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>#{{row.entity.id}}</span></div>",width:75,enableSorting:!0,enableFiltering:!0,enableColumnMenu:!1},{name:"subject"},{name:"from",cellClass:"text-center"},{name:"disposition",displayName:"APPLICATION_DISPOSITION",headerCellFilter:"translate"},{name:"updatedAt",cellFilter:"date:'dd/MM/yyyy HH:mm'",width:120,enableSorting:!1,enableFiltering:!1,sort:{direction:m.DESC}},{name:"action",cellTemplate:'<div>             <a class="btn btn-icon-only" data-ng-disabled="row.entity.waiting" data-ng-class="row.entity.waiting ? \'font-blue\' : \'font-green\'" data-ng-click="grid.appScope.openRoom(row.entity.id, row.entity.subject)"><i class="fa" data-ng-class="row.entity.waiting ? \'fa-repeat\' : \'fa-envelope\' " aria-hidden="true"></i></a>             <a class="btn btn-icon-only font-red" data-ng-disabled="row.entity.waiting" data-ng-show="grid.appScope.isAdmin" data-ng-click="grid.appScope.deleteItem(row.entity.id, row.entity.id)"><i class="fa fa-trash" aria-hidden="true"></i></a>             </div>',enableSorting:!1,cellClass:"ui-grid-vcenter",width:70,enableFiltering:!1,enableColumnMenu:!1}],data:[],onRegisterApi:function(b){a.gridApi=b,a.gridApi.selection&&(a.gridApi.selection.on.rowSelectionChanged(a,function(b){b.isSelected?a.id.push(a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id):_.pull(a.id,a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id)}),a.gridApi.selection.on.rowSelectionChangedBatch(a,function(b){b[0].isSelected?a.id=_.union(a.id,_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id")):_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id").forEach(function(b){_.pull(a.id,b)})}))}},a.getPage(a.query)},a.onChanged=function(){q.set("mailTags",a.query.tags),a.getPage(a.query)},a.tagItems=function(){return c.open({animation:!0,templateUrl:"app/channels/mail/inbox/view/view.tags.modal.html",controller:"MailInboxViewModalTagCtrl",resolve:{id:function(){return a.id}}}).result.then(function(){a.gridApi.selection.clearSelectedRows(),a.id=[]})},a.disposeItems=function(){return c.open({animation:!0,templateUrl:"app/channels/mail/inbox/status/status.modal.html",controller:"MailInboxStatusModalCtrl",resolve:{status:function(){return null},accountId:function(){return e.id}}}).result.then(function(b){return l.patch({id:a.id},b).$promise.then(function(){a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})})},a.deleteItem=o.confirm["delete"](function(b){var c={id:b};return l.remove(c).$promise.then(function(){a.getPage(),p.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})}),a.deleteItems=o.confirm["delete"](function(){var b={ids:a.id};return l["delete"](b).$promise.then(function(){a.getPage(),p.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.inbox.view.account.list",{url:"/list",templateUrl:"app/channels/mail/inbox/view/account/list/list.html",controller:"MailInboxViewAccountListCtrl",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:9}}})}]),angular.module("xCallyShuttleApp").controller("MailInboxViewModalAgentCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Agent","Auth","MailRoom","xAlert","roomId",function(a,b,c,d,e,f,g,h,i){var j=[];a.initModal=function(){return a.agents=[],a.item={agents:[]},e.get().$promise.then(function(b){for(var c=0;c<b.rows.length;c++)a.agents.push(b.rows[c]);return g.query({id:i,controller:"agents"}).$promise}).then(function(b){for(var c=0;c<b.length;c++)f.isAgent()||a.item.agents.push(b[c]),j.push(b[c].id)})["catch"](function(a){console.error(a)})},a.ok=function(){return j=f.isAgent()?_.union(j,a.item.agents):angular.copy(a.item.agents),g.update({id:i,controller:"agents",agents:j}).$promise.then(function(){h.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close()})["catch"](function(a){console.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("MailInboxViewCtrl",["$scope","$timeout","$location","localStorageService","MailAccount",function(a,b,c,d,e){a.initView=function(){return e.get().$promise.then(function(b){var e=null;a.mailAccounts=b.rows,a.mailAccounts.length&&(e="/channels/mail/inbox/view/account/"+(d.get("mailAccountId")||a.mailAccounts[0].id)+"/list"),e&&c.path(e)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.inbox.view",{url:"/view",templateUrl:"app/channels/mail/inbox/view/view.html",controller:"MailInboxViewCtrl",reload:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/inbox.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("MailInboxViewModalTagCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Tag","MailRoom","xAlert","id",function(a,b,c,d,e,f,g,h){a.initModal=function(){return a.tags=[],a.item={tags:[]},a.modal={dismissable:!0,title:"APPLICATION_MESSAGE_SEND_RETRY",text:"MESSAGE_MESSAGE_SEND_RETRY",buttons:[{"class":"btn-success",text:"APPLICATION_TAG",click:function(){var d={status:!0};return f.patch({id:h},{tags:a.item.tags}).$promise["catch"](function(){d.status=!1,g.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){b.close(d)})}},{"class":"default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]},e.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("MailInboxViewModalTemplateCtrl",["$scope","$uibModalInstance","Template",function(a,b,c){a.initModal=function(){return a.item={},c.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail",{url:"/mail",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:9}}})}]),angular.module("xCallyShuttleApp").factory("MailReport",["$resource",function(a){return a("/api/report/mails/:id/:controller1/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("MailRoom",["$resource",function(a){return a("/api/mail/rooms/:id/:controller/:controller2",{id:"@id",controller:"@controller"},{update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").factory("MailAttachment",["$resource",function(a){return a("/api/mail/attachments/:id/:controller",{id:"@id"})}]),angular.module("xCallyShuttleApp").factory("MailMessage",["$resource",function(a){return a("/api/mail/messages/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("MailQueueListCtrl",["$scope","MailQueue","gridOptions","$uibModal","Auth",function(a,b,c,d,e){a.initView=function(){a.Auth=e;var d={exporterCsvFilename:"voice_queues.csv",columnDefs:[{name:"name"},{name:"description"},{name:"timeout"},{name:"strategy"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/mail/queues/view/{{row.entity.id}}/settings",name:"settings"},{"class":"green-meadow",href:"/channels/mail/queues/view/{{row.entity.id}}/agents",name:"agents",hide:"user"===e.getCurrentUser().role},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){var b=d.open({animation:!0,templateUrl:"app/channels/mail/queue/list/list.create.modal.html",controller:"MailQueueListCreateCtrl",size:"lg"});b.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("MailQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","MailQueue","Team","strategies",function(a,b,c,d,e,f,g){a.form={},a.strategies=g,a.item={penalty:0,agents:[]},a.getTeams=function(){return f.get({controller:"associations"}).$promise.then(function(b){a.teams=b.rows}).then(function(){ComponentsDropdowns.bindQueue(a.teams,[],function(){return{select:function(b){a.item.agents=_.union(a.item.agents,b)},deselect:function(b){a.item.agents=_.difference(a.item.agents,b)}}})})["catch"](function(a){console.error(a)})},a.save=function(){return e.save(a.item).$promise.then(function(a){b.close(a)})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.queues.list",{url:"/list",templateUrl:"app/channels/mail/queue/list/list.html",controller:"MailQueueListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").factory("MailQueue",["$resource",function(a){return a("/api/mail/queues/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.queues",{url:"/queues",template:"<div ui-view></div>","abstract":!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/scripts/components-dropdowns.js"]})}]},data:{permissions:{only:["admin","user"],redirectTo:"landing",id:35}}})}]),angular.module("xCallyShuttleApp").controller("MailQueueViewCtrl",["$scope","$http","$translate","$stateParams","xAlert","Team","MailQueue","Auth","strategies",function(a,b,c,d,e,f,g,h,i){a.Auth=h,a.strategies=i;var j=function(){return{select:function(b){return g.save({id:a.queue.id,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.error(a)})},deselect:function(b){return g["delete"]({id:a.queue.id,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.error(a)})}}};a.getQueue=function(){return g.get({id:d.id}).$promise.then(function(b){b.penalty=0,a.queue=b})["catch"](function(a){console.error(a)})},a.updateMailQueue=function(){return g.update({id:d.id},{name:a.queue.name,description:a.queue.description,timeout:a.queue.timeout,strategy:a.queue.strategy}).$promise.then(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.error(a)})},a.getTeams=function(){return f.get({controller:"associations"}).$promise.then(function(b){return a.teams=b.rows,g.get({id:d.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindMailQueue(a.teams,_.map(b.rows,function(a){return{id:a.id,penalty:a.UserHasMailQueue.penalty}}),j)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.queues.view",{url:"/view/:id",templateUrl:"app/channels/mail/queue/view/view.html",controller:"MailQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.mail.queues.view.settings",{url:"/settings",templateUrl:"app/channels/mail/queue/view/view.settings.html"}).state("main.channels.mail.queues.view.agents",{url:"/agents",templateUrl:"app/channels/mail/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:37}}})}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","MailQueue","usSpinnerService","$q","uiGridConstants","Auth",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){function o(){return k.spin("grid-spinner"),g.get(t).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){q(a)})})["catch"](function(a){f.error(a)})["finally"](function(){k.stop("grid-spinner")})}function p(){e.socket.on("agent:save",function(b){b=b.newValues||b;var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});c&&(c.online=_.has(b,"online")?b.online:c.online,c.lastLoginAt=_.has(b,"lastLoginAt")?b.lastLoginAt:c.lastLoginAt,c.pause=_.has(b,"smsPause")?b.mailPause:c.mailPause,c.pauseType=_.has(b,"pauseType")?b.pauseType:c.pauseType,c.lastPauseAt=_.has(b,"lastPauseAt")?b.lastPauseAt:c.lastPauseAt,c.ipaddr=_.has(b,"ipaddr")?b.ipaddr:c.ipaddr,c.port=_.has(b,"port")?b.port:c.port,c.fullcontact=_.has(b,"fullcontact")?b.fullcontact:c.fullcontact,c.useragent=_.has(b,"useragent")?b.useragent:c.useragent,c.lastms=_.has(b,"lastms")?b.lastms:c.lastms,c.internal=_.has(b,"internal")?b.internal:c.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=_.has(b,"online")?b.online:a.online)}))}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_mail_queue:save",function(b){var c=_.includes(_.map(a.CurrentUser.PMailQueues,"id"),b.MailQueueId)||n.isAdmin();if(c){var d=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0});if(d){var e=a.gridOptions.data.indexOf(d);a.gridOptions.data.splice(e+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,queueId:b.MailQueueId,agent:b.membername,online:d.online})}}}),e.socket.on("user_has_mail_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queueId:b.MailQueueId})})}function q(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.mailPause,pauseType:b.pauseType,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.MailQueues.forEach(function(c){a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,queueId:c.id,agent:b.name,online:b.online})})}function r(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.error(a)})}function s(){return j.get().$promise.then(function(b){a.mailQueues=b.rows,e.syncUpdates("mail_queue",a.mailQueues)})["catch"](function(a){f.error(a)})}a.mailQueues=[];var t={controller:"realtime",controller1:"mail",offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="fa" data-ng-class="{\'font-green\':row.entity.online, \'font-red\':!row.entity.online,\'fa-user\':row.entity.online,\'fa-user-times\':!row.entity.online}"></i> <span data-ng-if="row.entity.online" class="left-margin">(<css-timer start-time="row.entity.lastLoginAt"></css-timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"mailPause",displayName:"APPLICATION_PAUSE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.pause != null && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="fa fa-play font-green pointer-cursor left-margin" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="fa fa-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select> <span data-ng-if="row.entity.pause">({{row.entity.pauseType}})</span><span class="left-margin"><css-timer data-ng-if="row.entity.pause" start-time="row.entity.lastPauseAt"></css-timer></span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"PAUSED"},{value:"false",label:"NOT PAUSED"}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queueId" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queueId)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.mailQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){u(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){u(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){u(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?t.order=null:t.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),o()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){t.offset=(a-1)*b,t.limit=b,o()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?t[a.name]=a.filters[0].term:delete t[a.name]}),o()})}},o(),r(),s(),$timeout(function(){p()})};var u=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_mail_queue")}),a.pause=function(b,c,e){return e&&(a.pauseType=null),i.save({name:c,agent:b,type:e||"DEFAULT PAUSE",data4:e||"DEFAULT PAUSE",channel:"mail"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/mail/realtime/view/agent/queue.modal.add.html",controller:"MailRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.mailQueues,function(b){return!!_.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})})}}});g.result.then(function(b){return i.save({name:"QueueAdd",agent:e,queues:_.filter(a.mailQueues,function(a){return _.includes(b.queues,a.id)}),channel:"mail",data1:e,data3:b.queues.join(","),data4:"mail"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queueId:b,channel:"mail",data1:a,data3:b,data4:"mail"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/mail/realtime/view/agent/agent.modal.info.html",controller:"MailRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/mail/realtime/view/agent/agent.html",controller:"MailRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewApplicationCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","ReportMailSession","usSpinnerService","$q","uiGridConstants","$timeout",function(a,b,c,d,e,f,g,h,i,j,k){function l(){return h.spin("spinner-grid"),g.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){m(),h.stop("spinner-grid")})}function m(){e.socket.on("report_mail_session:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&k(function(){_.remove(a.gridOptions.data,{id:b.id})},1e4)):b.leaveAt||a.gridOptions.data.push(b)}),e.socket.on("report_mail_session:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})}a.moment=moment,a.initApplications=function(){a.gridOptions={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"uniqueid",displayName:"APPLICATION_UNIQUEID",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span> <span data-ng-if="!row.entity.leaveAt">[<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</span></div>"},{name:"queuename",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.queuename || ''}}</span></div>"}],data:[],gridMenuTitleFilter:function(a){var b=i.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){n(a.gridOptions.data.length)})}},l()};var n=function(a){var b=a?30*a+60:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("report_mail_session")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.realtime.view.applications",{url:"/applications",templateUrl:"app/channels/mail/realtime/view/application/application.html",controller:"MailRealtimeViewApplicationCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewCtrl",["$scope","$state",function(a,b){a.agents=[{name:"Queues",link:"main.channels.mail.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.mail.realtime.view.agents.timeline"}],a.sessions=[{name:"Sessions",link:"main.channels.mail.realtime.view.sessions"}],a.tree={queues:[{name:"Queues",link:"main.channels.mail.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.mail.realtime.view.agents.timeline"}],sessions:[{name:"Sessions",link:"main.channels.mail.realtime.view.sessions"}]}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.realtime.view",{url:"/view",templateUrl:"app/channels/mail/realtime/view/view.html",controller:"MailRealtimeViewCtrl"})}]),angular.module("xCallyShuttleApp").factory("ReportMailSession",["$resource",function(a){return a("/api/report/mail/sessions/:id/:controller/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("OpenChannelAccount",["$resource",function(a){return a("/api/openchannel/accounts/:accountId/:controller/:id",{id:"@accountId"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts",{url:"/accounts",template:"<div ui-view></div>",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:46}}})}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountListCtrl",["$scope","OpenChannelAccount","gridOptions","$stateParams","xAlert","$translate",function(a,b,c,d,e,f){a.initView=function(){var e={exporterCsvFilename:"openchannel_accounts.csv",columnDefs:[{name:"id",displayName:"ID",cellClass:"text-center",width:75,enableSorting:!1,enableFiltering:!1},{name:"name"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/openchannel/accounts/view/{{row.entity.id}}/settings",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,e,a,{accountId:d.accountId})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.list",{url:"/list",templateUrl:"app/channels/openchannel/account/list/list.html",controller:"OpenChannelAccountListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.view.actions",{url:"/actions",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("OpenChannelApplication",["$resource",function(a){return a("/api/openchannel/applications/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountViewActionListCtrl",["$scope","gridOptions","OpenChannelAccount","$http","$translate","$stateParams","xAlert",function(a,b,c,d,e,f,g){a.initActions=function(){var d={draggable:!0,exporterCsvFilename:"openchannel_applications.csv",enableSorting:!1,enableFiltering:!1,columnDefs:[{name:"app",cellClass:"text-center"},{name:"name",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span>{{row.entity.app == "queue" ? row.entity.OpenchannelQueue.name : row.entity.User.name}}</span></div>'},{name:"timeout",cellClass:"text-center"},{name:"interval",displayName:"APPLICATION_TIME_INTERVAL",cellClass:"text-center",cellTemplate:"<div><span>{{row.entity.Interval ? row.entity.Interval.name : row.entity.interval}}</span></div>"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/openchannel/accounts/view/{{row.entity.OpenchannelAccountId}}/actions/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.app, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a,{accountId:f.accountId,controller:"applications"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.view.actions.list",{url:"/list",templateUrl:"app/channels/openchannel/account/view/action/list/list.html",controller:"OpenChannelAccountViewActionListCtrl"})}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountViewActionViewCtrl",["$scope","$http","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","Agent","Interval","OpenChannelQueue","OpenChannelAccount","OpenChannelApplication","Template","MailAccount","SmsAccount",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initAction=function(){return a.$application=i.application,a.$stateParams=c,
-a.$interval=j.interval,a.forms={},a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"SendSMS",value:"sendSms"}],o.get({id:c.actionId}).$promise.then(function(b){if(a.application=b,a.application.alwaysTime=!1,a.application.IntervalId)a.application.intType="list";else switch(a.application.interval){case"*,*,*,*":a.application.intType="always";break;default:a.application.intType="custom"}if("always"===a.application.intType||"custom"===a.application.intType){var c=a.application.interval.split(",");"*"===c[0]?a.application.alwaysTime=!0:(a.application.t_from=moment(new Date),a.application.t_to=moment(new Date),a.application.t_from.hour(c[0].split("-")[0].split(":")[0]),a.application.t_from.minute(c[0].split("-")[0].split(":")[1]),a.application.t_to.hour(c[0].split("-")[1].split(":")[0]),a.application.t_to.minute(c[0].split("-")[1].split(":")[1])),"*"===c[1]?(a.application.wd_from="always",a.application.wd_to="always"):(a.application.wd_from=c[1].split("-")[0],a.application.wd_to=c[1].split("-")[1]),"*"===c[2]?(a.application.md_from="always",a.application.md_to="always"):(a.application.md_from=c[2].split("-")[0],a.application.md_to=c[2].split("-")[1]),"*"===c[3]?(a.application.m_from="always",a.application.m_to="always"):(a.application.m_from=c[3].split("-")[0],a.application.m_to=c[3].split("-")[1])}a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})})["catch"](function(a){f.error(a)})},a.getQueues=function(){return m.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getSmsAccounts=function(){return r.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return k.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return l.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.updateItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var g,h,i,j,k;g=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(h=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(h+="-"+a.application.wd_to)):h="*",a.application.md_from&&"always"!==a.application.md_from?(i=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(i+="-"+a.application.md_to)):i="*",a.application.m_from&&"always"!==a.application.m_from?(j=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(j+="-"+a.application.m_to)):j="*",k=g+","+h+","+i+","+j,a.application.interval=k,a.application.IntervalId=null}return n.update({accountId:c.accountId,controller:"applications",id:c.actionId},a.application).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success"),e.path("/channels/openchannel/accounts/view/"+c.accountId+"/actions/list")})["catch"](function(a){f.error(a)})},a.getTemplates=function(){return p.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.getMailAccounts=function(){return q.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.view.actions.view",{url:"/view/:actionId",templateUrl:"app/channels/openchannel/account/view/action/view/view.html",controller:"OpenChannelAccountViewActionViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountViewActionWizardCtrl",["$scope","$http","Agent","OpenChannelQueue","Interval","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","OpenChannelApplication","OpenChannelAccount","Template","MailAccount","SmsAccount",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"SendSMS",value:"sendSms"}],a.$application=l.application,a.$stateParams=f,a.$interval=m.interval,a.forms={},a.application={alwaysTime:!0},a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})},a.getQueues=function(){return d.get().$promise.then(function(b){console.log(b),a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return c.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getSmsAccounts=function(){return r.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return e.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.createItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var c,d,e,j,k;c=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(d=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(d+="-"+a.application.wd_to)):d="*",a.application.md_from&&"always"!==a.application.md_from?(e=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(e+="-"+a.application.md_to)):e="*",a.application.m_from&&"always"!==a.application.m_from?(j=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(j+="-"+a.application.m_to)):j="*",k=c+","+d+","+e+","+j,a.application.interval=k,a.application.IntervalId=null}return o.save({accountId:f.accountId,controller:"applications"},a.application).$promise.then(function(){i.show(g.instant("MESSAGE_WELL_DONE"),"success"),h.path("/channels/openchannel/accounts/view/"+f.accountId+"/actions/list")})["catch"](function(a){i.error(a)})},a.formValidation=function(a){return a},a.next=function(){j.wizard().next()},a.getMailAccounts=function(){return q.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getTemplates=function(){return p.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.view.actions.wizard",{url:"/wizard",templateUrl:"app/channels/openchannel/account/view/action/wizard/wizard.html",controller:"OpenChannelAccountViewActionWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountApiViewCtrl",["$scope","OpenChannelAccount","$http","$stateParams","clipboard","$translate","$location","xAlert",function(a,b,c,d,e,f,g,h){a.copyToClipboard=function(a){e.copyText(a),h.show(f.instant("MESSAGE_TEXT_COPIED_CLIPBOARD")+"!","success")},a.initView=function(){b.get({id:d.accountId}).$promise.then(function(b){a.account=b,a.receiveurl=a.account.remote+"/api/openchannel/accounts/"+a.account.id+"/receive"})["catch"](function(a){h.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.view.api",{url:"/api",controller:"OpenChannelAccountApiViewCtrl",templateUrl:"app/channels/openchannel/account/view/api/view/view.html"})}]),angular.module("xCallyShuttleApp").factory("OpenChannelDisposition",["$resource",function(a){return a("/api/openchannel/dispositions/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("OpenChannelInboxViewModaDispositionAddCtrl",["$scope","$uibModalInstance","OpenChannelAccount","id",function(a,b,c,d){a.ok=function(){return c.save({accountId:d,controller:"dispositions"},{name:a.name}).$promise.then(function(a){b.close(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountDispositionViewCtrl",["$scope","$stateParams","$uibModal","$translate","OpenChannelAccount","xAlert",function(a,b,c,d,e,f){a.initView=function(){return e.get({accountId:b.accountId,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.updateDisposition=function(a,c){return e.update({accountId:b.accountId,controller:"dispositions",id:a},{name:c}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.deleteDisposition=function(c){return console.log("delete"),e.remove({accountId:b.accountId,controller:"dispositions",id:c}).$promise.then(function(){_.remove(a.dispositions,{id:c})})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addDisposition=function(){return c.open({animation:!0,templateUrl:"app/channels/openchannel/account/view/disposition/modal/add.modal.html",controller:"OpenChannelInboxViewModaDispositionAddCtrl",resolve:{id:function(){return b.accountId}}}).result.then(function(b){b&&a.dispositions.push(b)})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.view.dispositions",{url:"/dispositions",controller:"OpenChannelAccountDispositionViewCtrl",templateUrl:"app/channels/openchannel/account/view/disposition/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountHooksViewCtrl",["$scope","OpenChannelAccount","Pause","$http","$stateParams","$translate","$location","xAlert",function(a,b,c,d,e,f,g,h){a.account={},a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.initView=function(){a.types=[{value:"",name:"-- None --"},{name:"HTTP GET",value:"GET"},{name:"HTTP POST",value:"POST"}],c.get().$promise.then(function(b){a.pauses=b.rows})["catch"](function(a){h.error(a)}),b.get({id:e.accountId}).$promise.then(function(b){a.account=b,a.account.actions.length<1&&a.account.actions.push({action:"pause",enabled:!1,type:null})})["catch"](function(a){h.error(a)})},a.resetActionData=function(a){a.type=null},a.updateItem=function(){return console.log(a.account),b.update({id:e.accountId},a.account).$promise.then(function(){h.show(f.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.view.hooks",{url:"/hooks",controller:"OpenChannelAccountHooksViewCtrl",templateUrl:"app/channels/openchannel/account/view/hooks/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountSettingViewCtrl",["$scope","OpenChannelAccount","$http","$stateParams","clipboard","$translate","$location","xAlert","List",function(a,b,c,d,e,f,g,h,i){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.types=[{name:"HTTP GET",value:"GET"},{name:"HTTP POST",value:"POST"}],a.account={},a.initView=function(){i.get().$promise.then(function(b){a.lists=b.rows})["catch"](function(a){console.error(a)}),b.get({id:d.accountId}).$promise.then(function(b){a.account=b})["catch"](function(a){h.error(a)})},a.updateItem=function(){return b.update({id:d.accountId},a.account).$promise.then(function(){h.show(f.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.view.settings",{url:"/settings",controller:"OpenChannelAccountSettingViewCtrl",templateUrl:"app/channels/openchannel/account/view/setting/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountViewCtrl",["$scope","OpenChannelAccount","$http","$stateParams","clipboard","$translate","$location","xAlert","List",function(a,b,c,d,e,f,g,h,i){a.initView=function(){return a.account={},b.get({id:d.accountId}).$promise.then(function(b){a.account=b,console.log(b)})["catch"](function(a){h.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.view",{url:"/view/:accountId",templateUrl:"app/channels/openchannel/account/view/view.html",controller:"OpenChannelAccountViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}})}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountWizardCtrl",["$scope","$http","$location","$translate","WizardHandler","xAlert","OpenChannelAccount",function(a,b,c,d,e,f,g){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.forms={},a.item={},a.item.remote=c.protocol()+"://"+location.host},a.goNext=function(){e.wizard().next()},a.formValidation=function(a){return a},a.createItem=function(){return g.save(a.item).$promise.then(function(){c.path("/channels/openchannel/accounts/list")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.wizard",{url:"/wizard",templateUrl:"app/channels/openchannel/account/wizard/wizard.html",controller:"OpenChannelAccountWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.inbox",{url:"/inbox",template:"<div ui-view></div>",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:48}}})}]),angular.module("xCallyShuttleApp").controller("OpenChannelInboxInfoModalCtrl",["$scope","$translate","$uibModalInstance","$stateParams","xAlert","data",function(a,b,c,d,e,f){a.data=null,a.initInfo=function(){f&&(a.data=_.isEmpty(JSON.parse(f))?null:JSON.parse(f))},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").directive("message",["$rootScope","OpenChannelMessage","List","xAlert","$translate","$uibModal",function(a,b,c,d,e,f){return{restrict:"E",scope:{Message:"=message",accounttype:"=accounttype",listId:"="},templateUrl:"app/channels/openchannel/inbox/message/message.html",link:function(b){b.openContact=function(f,g){if(b.listId){if(!g)return;var h;switch(f){case"phone":h={phone:g};break;case"email":h={email:g};break;default:return}return c.save({listId:b.listId,controller:"contacts"},h).$promise.then(function(b){var c=_.find(a.$root.workspaces,{contactID:b.id});c?c.active=!0:a.$root.workspaces.push({active:!0,"class":"icon-user",contactID:b.id,name:b.phone,type:"contact"})})["catch"](function(a){console.error(a)})}d.show(e.instant("MESSAGE_NO_LIST_CONFIGURED"),"info")},b.info=function(a){f.open({animation:!0,templateUrl:"app/channels/openchannel/inbox/message/info.modal.html",controller:"OpenChannelInboxInfoModalCtrl",resolve:{data:function(){return a}}})}}}}]),angular.module("xCallyShuttleApp").directive("openchannelRoom",["OpenChannelReport","$cookieStore","$translate","$uibModal","$timeout","Tag","CannedAnswer","Auth","OpenChannelAccount","OpenChannelRoom","OpenChannelMessage","xAlert","usSpinnerService","socket","$stateParams","$rootScope",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){return{restrict:"E",scope:{workspace:"=",index:"=",submit:"&onSubmit"},templateUrl:"app/channels/openchannel/inbox/room/room.directive.html",link:function(a){a.modelOptions={debounce:{"default":500,blur:250},getterSetter:!0},a.panelLeft=null,a.panelRight="col-md-12",a.togglePanelLeft=function(){a.panelLeft?(a.panelLeft=null,a.panelRight="col-md-12"):(a.panelLeft="col-md-6",a.panelRight="col-md-6")},a.form={disabled:!1,from:"",to:a.workspace.data&&a.workspace.data.to?a.workspace.data.to:"",body:""},n.socket.on("openchannel_message:save",function(b){return a.workspace.id&&b.OpenchannelRoomId==a.workspace.id?k.get({id:b.id}).$promise.then(function(b){a.Room||(a.Room={OpenchannelMessages:[]});var c=_.findIndex(a.Room.OpenchannelMessages,{id:b.id});c>-1?_.merge(a.Room.OpenchannelMessages[c],b):a.Room.OpenchannelMessages.unshift(b),a.panelLeft="col-md-6",a.panelRight="col-md-6"})["catch"](function(a){console.error(a)}):void 0}),n.socket.on("openchannel_message:update",function(b){if(a.Room&&b.OpenchannelRoomId==a.workspace.id){var c=_.find(a.Room.OpenchannelMessages,{id:b.id});c&&_.merge(c,b)}}),n.socket.on("openchannel_room:save",function(b){a.Room&&b.id==a.workspace.id&&(a.Room.status=b.status,a.Room.disposition=b.disposition)}),a.closeRoom=function(b){return d.open({animation:!0,templateUrl:"app/channels/openchannel/inbox/view/view.status.modal.html",controller:"OpenChannelInboxViewModalStatusCtrl",resolve:{closed:function(){return"CLOSED"===a.Room.status},accountId:function(){return a.Room.OpenchannelAccountId}}}).result.then(function(a){var c={id:b,status:"CLOSED"};return a.disposition&&(c.disposition=a.disposition),j.update(c).$promise["catch"](function(a){l.error(a)})})},a.openRoom=function(a,b){var c=_.find(p.workspaces,{id:a,type:"openchannelRoom"});c?c.active=!0:p.workspaces.push({id:a,name:b,type:"openchannelRoom","class":"icon-globe",active:!0})},f.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)}),i.get().$promise.then(function(b){a.Accounts=b.rows})["catch"](function(a){console.error(a)}),a.workspace.id?(a.panelLeft="col-md-6",a.panelRight="col-md-6",j.get({id:a.workspace.id}).$promise.then(function(b){a.Room=b,a.form.from=a.Room.OpenchannelAccount.name,a.form.to=a.Room.contact,a.form.tags=a.Room.tags})["catch"](function(a){console.error(a)})["finally"](function(){m.stop("spinner-grid"),a.form.disabled=!1})):m.stop("spinner-grid"),a.onSelect=function(){a.form.body+=a.modelOptions.selectedAnswer,delete a.modelOptions.selectedAnswer},a.onSelectAnswer=function(b){a.form.body+=b,a.selectedAnswer=""},a.getAnswers=function(a){return g.get({key:a}).$promise.then(function(a){return _.map(a.rows,"value")})},a.loadAgents=function(){d.open({animation:!0,templateUrl:"app/channels/openchannel/inbox/view/view.agents.modal.html",controller:"OpenChannelInboxViewModalAgentCtrl",resolve:{roomId:function(){return a.workspace.id}}})},a.onChanged=function(){return j.patch({id:a.workspace.id},{tags:a.form.tags}).$promise["catch"](function(a){console.error(a)})},a.sendMessage=function(){m.spin("spinner-grid");var b=_.find(a.Accounts,{name:a.form.from}).id;if(b){var d={from:a.form.from,to:a.form.to,body:a.form.body,OpenchannelRoomId:a.Room?a.Room.id:null};return i.save({accountId:b,controller:"send"},d).$promise.then(function(b){return l.show(c.instant("MESSAGE_WELL_DONE"),"success"),a.Room?a.Room:j.get({id:"messages",controller:b.id}).$promise}).then(function(b){b&&(a.form.body="",a.workspace.id=b.id,a.workspace.name=b.contact,a.Room=b,a.panelLeft="col-md-6",a.panelRight="col-md-6")})["catch"](function(a){l.error(a)})["finally"](function(){m.stop("spinner-grid")})}}}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.inbox.view.account",{url:"/account/:id",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("OpenChannelInboxViewAccountListCtrl",["$scope","$rootScope","$uibModal","$translate","$stateParams","$state","Tag","usSpinnerService","socket","OpenChannelAccount","OpenChannelRoom","gridOptions","uiGridConstants","Auth","Modal","xAlert","uibButtonConfig","localStorageService",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){a.loadAgents=function(a){c.open({animation:!0,templateUrl:"app/channels/openchannel/inbox/view/view.agents.modal.html",controller:"OpenChannelInboxViewModalAgentCtrl",resolve:{roomId:a}})},a.initView=function(){q.activeClass="green-haze",a.id=[],a.isAdmin=n.isAdmin(),a.isAgent=n.isAgent(),a.uncheckable=!1,a.query={status:r.get("openchannelStatus")?r.get("openchannelStatus"):"NEW",tags:r.get("openchannelTags")?r.get("openchannelTags"):[]},a.$watch("query.status",function(){r.set("openchannelStatus",a.query.status),a.getPage()},!0),g.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)}),a.gridOptions={exporterCsvFilename:"openchannel_rooms.csv",enableRowHeaderSelection:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!1,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,enableSelectAll:!0,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,columnDefs:[{name:"lastEvent",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>               <span data-ng-class=\"{'icon-arrow-up font-green': row.entity.lastEvent === 'SENT',               'icon-arrow-up font-yellow': row.entity.lastEvent === 'SENDING',               'icon-arrow-down font-green': row.entity.lastEvent === 'RECEIVED',               'icon-close font-red': row.entity.lastEvent === 'FAILED',               'icon-question': !row.entity.lastEvent}\">               </span>               </div>",width:30,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"tags",displayName:"",headerCellTemplate:'<i class="icon-tag" style="margin-top: 8px; margin-left: 8px;"></i>',cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><i data-ng-class=\"row.entity.tags.length ? 'icon-tag' : ''\" title=\"{{row.entity.tags}}\"></i></div>",width:30,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"id",displayName:"Id",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>#{{row.entity.id}}</span></div>",width:75,enableSorting:!1,enableFiltering:!0,enableColumnMenu:!1},{name:"contact",cellClass:"text-center"},{name:"disposition",cellClass:"text-center"},{name:"updatedAt",cellFilter:"date:'MM/dd/yyyy HH:mm'",width:120,enableSorting:!1,enableFiltering:!1,sort:{direction:m.DESC}},{name:"action",cellTemplate:'<div>             <a class="btn btn-icon-only font-green" data-ng-click="grid.appScope.openRoom(row.entity.id, row.entity.contact)"><i class="glyphicon glyphicon-comment" aria-hidden="true"></i></a>             <a class="btn btn-icon-only font-red" data-ng-show="grid.appScope.isAdmin" data-ng-click="grid.appScope.deleteItem(row.entity.id,row.entity.id)"><i class="fa fa-trash" aria-hidden="true"></i>             </div>',enableSorting:!1,cellClass:"ui-grid-vcenter",width:90,enableFiltering:!1,enableColumnMenu:!1}],data:[],onRegisterApi:function(b){a.gridApi=b,a.gridApi.selection&&(a.gridApi.selection.on.rowSelectionChanged(a,function(b){b.isSelected?a.id.push(a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id):_.pull(a.id,a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id)}),a.gridApi.selection.on.rowSelectionChangedBatch(a,function(b){b[0].isSelected?a.id=_.union(a.id,_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id")):_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id").forEach(function(b){_.pull(a.id,b)})}))}},i.socket.on("openchannel_room:remove",function(b){_.remove(a.workspaces,{id:b.id,type:"openchannelRoom"}),_.remove(a.gridOptions.data,{id:b.id})}),a.getPage(a.query)},a.onChanged=function(){a.getPage(a.query)},a.tagItems=function(){return c.open({animation:!0,templateUrl:"app/channels/openchannel/inbox/view/view.tags.modal.html",controller:"OpenChannelInboxViewModalTagCtrl",resolve:{id:function(){return a.id}}}).result.then(function(){a.gridApi.selection.clearSelectedRows(),a.id=[],a.getPage()})},a.openRoom=function(b,c){var d=_.find(a.workspaces,{id:b,type:"openchannelRoom"});return d?d.active=!0:a.workspaces.push({id:b,name:c,type:"openchannelRoom","class":"icon-globe",active:!0}),b&&"agent"===n.getCurrentUser().role&&"PENDING"!==a.query.status&&"CLOSED"!==a.query.status?k.patch({id:b},{status:"OPEN",openReason:"agent"}).$promise["catch"](function(a){console.error(a)}):void 0},a.getPage=function(b){h.spin("spinner-grid");var c={accountId:e.id,controller:"rooms"};return b&&_.merge(c,b),a.query&&_.merge(c,a.query),j.query(c).$promise.then(function(b){r.set("openchannelAccountId",e.id),a.gridOptions.data=b,i.socket.on("openchannel_room:save",function(b){if(b.OpenchannelAccountId==e.id){var c=_.find(a.gridOptions.data,{id:b.id});c?c.status!==b.status?_.remove(a.gridOptions.data,{id:b.id}):_.merge(c,b):a.query.status===b.status&&a.gridOptions.data.push(b)}}),i.socket.on("openchannel_room:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})})["catch"](function(a){console.error(a)})["finally"](function(){h.stop("spinner-grid")})},a.deleteItem=o.confirm["delete"](function(b){var c={id:b};return console.log(c),k["delete"](c).$promise.then(function(){a.getPage(),p.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})}),a.deleteItems=o.confirm["delete"](function(){var b={ids:a.id};return k["delete"](b).$promise.then(function(){a.getPage(),p.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.inbox.view.account.list",{url:"/list",templateUrl:"app/channels/openchannel/inbox/view/account/list/list.html",controller:"OpenChannelInboxViewAccountListCtrl"})}]),angular.module("xCallyShuttleApp").controller("OpenChannelInboxViewModalAgentCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Agent","OpenChannelRoom","xAlert","roomId",function(a,b,c,d,e,f,g,h){a.initModal=function(){a.agents=[],a.item={agents:[]},e.get().$promise.then(function(b){b.rows.forEach(function(b){a.agents.push(b)})})["catch"](function(a){console.error(a)}),f.query({id:h,controller:"agents"}).$promise.then(function(b){b.forEach(function(b){a.agents.push(b),a.item.agents.push(b.id)})})["catch"](function(a){console.error(a)}),a.modal={dismissable:!0,title:"APPLICATION_MESSAGE_SEND_RETRY",text:"MESSAGE_MESSAGE_SEND_RETRY",buttons:[{classes:"btn btn-success",text:"APPLICATION_RETRY",click:function(a){b.close(a)}},{classes:"btn default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]}},a.ok=function(){return f.update({id:h,controller:"agents",agents:a.item.agents}).$promise.then(function(){g.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close()})["catch"](function(a){console.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("OpenChannelInboxViewCtrl",["$scope","$location","$stateParams","$translate","$uibModal","socket","Auth","xAlert","OpenChannelRoom","OpenChannelAccount","localStorageService",function(a,b,c,d,e,f,g,h,i,j,k){a.initView=function(){j.get().$promise.then(function(c){var d=null;a.Accounts=c.rows,a.Accounts.length&&(d="/channels/openchannel/inbox/view/account/"+(k.get("openchannelAccountId")||a.Accounts[0].id)+"/list"),d&&b.path(d)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.inbox.view",{url:"/view",templateUrl:"app/channels/openchannel/inbox/view/view.html",controller:"OpenChannelInboxViewCtrl",reload:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/inbox.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("OpenChannelInboxViewModalStatusCtrl",["$scope","$uibModalInstance","closed","OpenChannelAccount","accountId",function(a,b,c,d,e){a.modal={title:"APPLICATION_CONFIRM_CLOSE",text:"MESSAGE_ARE_YOU_SURE_YOU_WANT_TO_CLOSE"},a.initDisposition=function(){return d.get({accountId:e,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a)})},a.item={},a.closed=c,a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").controller("OpenChannelInboxViewModalTagCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Tag","OpenChannelRoom","xAlert","id",function(a,b,c,d,e,f,g,h){a.initModal=function(){return a.tags=[],a.item={tags:[]},a.modal={dismissable:!0,title:"APPLICATION_MESSAGE_SEND_RETRY",text:"MESSAGE_MESSAGE_SEND_RETRY",buttons:[{"class":"btn-success",text:"APPLICATION_TAG",click:function(){var d={status:!0};return f.patch({id:h},{tags:a.item.tags}).$promise.then(function(){g.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(){d.status=!1,g.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){b.close(d)})}},{"class":"default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]},e.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel",{url:"/openchannel",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:20}}})}]),angular.module("xCallyShuttleApp").factory("OpenChannelReport",["$resource",function(a){return a("/api/report/openchannel/:id/:controller1/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("OpenChannelRoom",["$resource",function(a){return a("/api/openchannel/rooms/:id/:controller",{id:"@id",controller:"@controller"},{update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").factory("OpenChannelMessage",["$resource",function(a){return a("/api/openchannel/messages/:id/:controller",{id:"@id",controller:"@controller"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("OpenChannelQueueListCtrl",["$scope","OpenChannelQueue","gridOptions","$uibModal","xAlert","Auth",function(a,b,c,d,e,f){a.initView=function(){a.Auth=f;var d={exporterCsvFilename:"openchanel_queues.csv",columnDefs:[{name:"name"},{name:"description"},{name:"timeout"},{name:"strategy"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/openchannel/queues/view/{{row.entity.id}}/settings",name:"settings"},{"class":"green-meadow",href:"/channels/openchannel/queues/view/{{row.entity.id}}/agents",name:"agents",hide:"user"===f.getCurrentUser().role},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){var b=d.open({animation:!0,templateUrl:"app/channels/openchannel/queue/list/list.create.modal.html",controller:"OpenChannelQueueListCreateCtrl",size:"lg"});b.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("OpenChannelQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","OpenChannelQueue","Team","strategies",function(a,b,c,d,e,f,g){
-a.form={},a.strategies=g,a.item={penalty:0,agents:[]},a.getTeams=function(){return f.get({controller:"associations"}).$promise.then(function(b){a.teams=b.rows}).then(function(){ComponentsDropdowns.bindQueue(a.teams,[],function(){return{select:function(b){a.item.agents=_.union(a.item.agents,b)},deselect:function(b){a.item.agents=_.difference(a.item.agents,b)}}})})["catch"](function(a){console.error(a)})},a.save=function(){return console.log(a.item),e.save(a.item).$promise.then(function(a){b.close(a)})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.queues.list",{url:"/list",templateUrl:"app/channels/openchannel/queue/list/list.html",controller:"OpenChannelQueueListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").factory("OpenChannelQueue",["$resource",function(a){return a("/api/openchannel/queues/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.queues",{url:"/queues",template:"<div ui-view></div>",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:47}}})}]),angular.module("xCallyShuttleApp").controller("OpenChannelQueueViewCtrl",["$scope","$http","Auth","$translate","$stateParams","xAlert","Team","OpenChannelQueue","strategies",function(a,b,c,d,e,f,g,h,i){a.strategies=i,a.Auth=c;var j=function(){return{select:function(b){return h.save({id:a.queue.id,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(b){console.log("sel",b),a.getTeams()})["catch"](function(a){console.error(a)})},deselect:function(b){return h["delete"]({id:a.queue.id,controller:"agents",agents:b}).$promise.then(function(b){console.log("desel",b),a.getTeams()})["catch"](function(a){console.error(a)})}}};a.getQueue=function(){return h.get({id:e.id}).$promise.then(function(b){b.penalty=0,a.queue=b})["catch"](function(a){console.error(a)})},a.updateQueue=function(){return h.update({id:e.id},{name:a.queue.name,description:a.queue.description,timeout:a.queue.timeout,strategy:a.queue.strategy}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.getTeams=function(){return g.get({controller:"associations"}).$promise.then(function(b){return a.teams=b.rows,console.log(b.rows),h.get({id:e.id,controller:"agents"}).$promise}).then(function(b){console.log(b),ComponentsDropdowns.bindQueue(a.teams,_.map(b.rows,function(a){return{id:a.id,penalty:a.UserHasOpenchannelQueue.penalty}}),j)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.queues.view",{url:"/view/:id",templateUrl:"app/channels/openchannel/queue/view/view.html",controller:"OpenChannelQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.openchannel.queues.view.settings",{url:"/settings",templateUrl:"app/channels/openchannel/queue/view/view.settings.html"}).state("main.channels.openchannel.queues.view.agents",{url:"/agents",templateUrl:"app/channels/openchannel/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:49}}})}]),angular.module("xCallyShuttleApp").controller("OpenChannelRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","OpenChannelQueue","usSpinnerService","$q","uiGridConstants",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){return k.spin("grid-spinner"),g.get(s).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){p(a)})})["catch"](function(a){f.error(a)})["finally"](function(){k.stop("grid-spinner")})}function o(){e.socket.on("agent:save",function(b){b=b.newValues||b;var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});c&&(c.online=_.has(b,"online")?b.online:c.online,c.lastLoginAt=_.has(b,"lastLoginAt")?b.lastLoginAt:c.lastLoginAt,c.pause=_.has(b,"smsPause")?b.openchannelPause:c.openchannelPause,c.pauseType=_.has(b,"pauseType")?b.pauseType:c.pauseType,c.lastPauseAt=_.has(b,"lastPauseAt")?b.lastPauseAt:c.lastPauseAt,c.ipaddr=_.has(b,"ipaddr")?b.ipaddr:c.ipaddr,c.port=_.has(b,"port")?b.port:c.port,c.fullcontact=_.has(b,"fullcontact")?b.fullcontact:c.fullcontact,c.useragent=_.has(b,"useragent")?b.useragent:c.useragent,c.lastms=_.has(b,"lastms")?b.lastms:c.lastms,c.internal=_.has(b,"internal")?b.internal:c.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=_.has(b,"online")?b.online:a.online)}))}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_openchannel_queue:save",function(b){console.log("new queue",b);var c=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0}),d=a.gridOptions.data.indexOf(c);a.gridOptions.data.splice(d+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,queueId:b.OpenchannelQueueId,agent:b.membername,online:c.online})}),e.socket.on("user_has_openchannel_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queueId:b.OpenchannelQueueId})})}function p(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.openchannelPause,pauseType:b.pauseType,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.OpenchannelQueues.forEach(function(c){a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,queueId:c.id,agent:b.name,online:b.online})})}function q(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.error(a)})}function r(){return j.get().$promise.then(function(b){a.openchannelQueues=b.rows,e.syncUpdates("openchannel_queue",a.openchannelQueues)})["catch"](function(a){f.error(a)})}a.openchannelQueues=[];var s={controller:"realtime",controller1:"openchannel",offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="fa" data-ng-class="{\'font-green\':row.entity.online, \'font-red\':!row.entity.online,\'fa-user\':row.entity.online,\'fa-user-times\':!row.entity.online}"></i> <span data-ng-if="row.entity.online" class="left-margin">(<css-timer start-time="row.entity.lastLoginAt"></css-timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"openchannelPause",displayName:"APPLICATION_PAUSE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.pause != null && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="fa fa-play font-green pointer-cursor left-margin" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="fa fa-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select> <span data-ng-if="row.entity.pause" class="left-margin">({{row.entity.pauseType}})</span><span class="left-margin"><css-timer data-ng-if="row.entity.pause" start-time="row.entity.lastPauseAt"></css-timer></span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"PAUSED"},{value:"false",label:"NOT PAUSED"}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queueId" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queueId)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.openchannelQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?s.order=null:s.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),n()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){s.offset=(a-1)*b,s.limit=b,n()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?s[a.name]=a.filters[0].term:delete s[a.name]}),n()})}},n(),q(),r(),$timeout(function(){o()})};var t=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_openchannel_queue")}),a.pause=function(b,c,e){return e&&(a.pauseType=null),i.save({name:c,agent:b,type:e||"DEFAULT PAUSE",data4:e||"DEFAULT PAUSE",channel:"openchannel"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/openchannel/realtime/view/agent/queue.modal.add.html",controller:"OpenChannelRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.openchannelQueues,function(b){return!!_.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})})}}});g.result.then(function(b){return i.save({name:"QueueAdd",agent:e,queues:_.filter(a.openchannelQueues,function(a){return _.includes(b.queues,a.id)}),channel:"openchannel",data1:e,data3:b.queues.join(","),data4:"openchannel"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queueId:b,channel:"openchannel",data1:a,data3:b,data4:"openchannel"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/openchannel/realtime/view/agent/agent.modal.info.html",controller:"OpenChannelRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/openchannel/realtime/view/agent/agent.html",controller:"OpenChannelRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("OpenChannelRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("OpenChannelRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("OpenChannelRealtimeViewApplicationCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","ReportOpenChannelSession","usSpinnerService","$q","uiGridConstants","$timeout",function(a,b,c,d,e,f,g,h,i,j,k){function l(){return h.spin("spinner-grid"),g.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){m(),h.stop("spinner-grid")})}function m(){e.socket.on("report_openchannel_session:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&k(function(){_.remove(a.gridOptions.data,{id:b.id})},1e4)):b.leaveAt||a.gridOptions.data.push(b)}),e.socket.on("report_openchannel_session:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})}a.moment=moment,a.initApplications=function(){a.gridOptions={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"uniqueid",displayName:"APPLICATION_UNIQUEID",headerCellFilter:"translate"},{name:"accountname",displayName:"APPLICATION_ACCOUNT",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span> <span data-ng-if="!row.entity.leaveAt">[<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</span></div>"},{name:"queuename",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.queuename || ''}}</span></div>"}],data:[],gridMenuTitleFilter:function(a){var b=i.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){n(a.gridOptions.data.length)})}},l()};var n=function(a){var b=a?30*a+60:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("report_openchannel_session")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.realtime.view.applications",{url:"/applications",templateUrl:"app/channels/openchannel/realtime/view/application/application.html",controller:"OpenChannelRealtimeViewApplicationCtrl"})}]),angular.module("xCallyShuttleApp").controller("OpenChannelRealtimeViewCtrl",["$scope","$state",function(a,b){a.agents=[{name:"Queues",link:"main.channels.openchannel.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.openchannel.realtime.view.agents.timeline"}],a.sessions=[{name:"Sessions",link:"main.channels.openchannel.realtime.view.sessions"}],a.tree={queues:[{name:"Queues",link:"main.channels.openchannel.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.openchannel.realtime.view.agents.timeline"}],sessions:[{name:"Sessions",link:"main.channels.openchannel.realtime.view.sessions"}]}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.realtime.view",{url:"/view",templateUrl:"app/channels/openchannel/realtime/view/view.html",controller:"OpenChannelRealtimeViewCtrl"})}]),angular.module("xCallyShuttleApp").factory("ReportOpenChannelSession",["$resource",function(a){return a("/api/report/openchannel/sessions/:id/:controller/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:12}}})}]),angular.module("xCallyShuttleApp").controller("RealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","usSpinnerService","$q","uiGridConstants","$timeout",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(b){return j.spin("grid-spinner"),g.get(q).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){b&&m(function(){o()}),j.stop("grid-spinner")})}function o(){e.socket.on("agent:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id});c&&_.merge(c,b)}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})}function p(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.error(a)})}var q={controller:"realtime",offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.name}} &lt;{{row.entity.internal}}&gt;</div>"},{name:"online",displayName:"APPLICATION_ONLINE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null"><i class="fa" data-ng-class="{\'font-green\':row.entity.online, \'font-red\':!row.entity.online,\'fa-user\':row.entity.online,\'fa-user-times\':!row.entity.online}"></i> <span data-ng-if="row.entity.online" class="left-margin">(<css-timer start-time="row.entity.lastLoginAt"></css-timer>)</span></div>',filter:{type:l.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"pauseStatus",displayName:"APPLICATION_PAUSE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span class="left-margin"><i data-ng-if="row.entity.voicePause || row.entity.mailPause || row.entity.chatPause || row.entity.faxPause || row.entity.smsPause" data-ng-click="grid.appScope.pause(row.entity.id,\'unpause\',null,null)" class="fa fa-play font-green pointer-cursor" title="{{\'APPLICATION_RESUME\' | translate}}"></i> <i class="fa fa-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.id,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i></span><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.id,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select><span data-ng-if="row.entity.voicePause || row.entity.mailPause || row.entity.chatPause || row.entity.faxPause || row.entity.smsPause"> [{{row.entity.pauseType}}][<css-timer start-time="row.entity.lastPauseAt"></css-timer>]</span></div>'},{name:"voicePause",displayName:"APPLICATION_VOICE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online" data-ng-class="{\'paused-agent\':row.entity.voicePause}"><span class="left-margin"><i data-ng-if="row.entity.voicePause" data-ng-click="grid.appScope.pause(row.entity.id,\'unpause\',null,\'voice\')" class="fa fa-play font-green pointer-cursor" title="{{\'APPLICATION_RESUME\' | translate}}"></i></span></div>',filter:{type:l.filter.SELECT,selectOptions:[{value:"true",label:d.instant("APPLICATION_PAUSED")},{value:"connect",label:d.instant("APPLICATION_NOT_PAUSED")}]},enableSorting:!1,enableColumnMenu:!1},{name:"mailPause",displayName:"APPLICATION_MAIL",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online" data-ng-class="{\'paused-agent\':row.entity.mailPause}"><span class="left-margin"><i data-ng-if="row.entity.mailPause" data-ng-click="grid.appScope.pause(row.entity.id,\'unpause\',null,\'mail\')" class="fa fa-play font-green pointer-cursor" title="{{\'APPLICATION_RESUME\' | translate}}"></i></span></div>',filter:{type:l.filter.SELECT,selectOptions:[{value:"true",label:d.instant("APPLICATION_PAUSED")},{value:"connect",label:d.instant("APPLICATION_NOT_PAUSED")}]},enableSorting:!1,enableColumnMenu:!1},{name:"chatPause",displayName:"APPLICATION_CHAT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online" data-ng-class="{\'paused-agent\':row.entity.chatPause}"><span class="left-margin"><i data-ng-if="row.entity.chatPause" data-ng-click="grid.appScope.pause(row.entity.id,\'unpause\',null,\'chat\')" class="fa fa-play font-green pointer-cursor" title="{{\'APPLICATION_RESUME\' | translate}}"></i></span></div>',filter:{type:l.filter.SELECT,selectOptions:[{value:"true",label:d.instant("APPLICATION_PAUSED")},{value:"connect",label:d.instant("APPLICATION_NOT_PAUSED")}]},enableSorting:!1,enableColumnMenu:!1},{name:"faxPause",displayName:"APPLICATION_FAX",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online" data-ng-class="{\'paused-agent\':row.entity.faxPause}"><span class="left-margin"><i data-ng-if="row.entity.faxPause" data-ng-click="grid.appScope.pause(row.entity.id,\'unpause\',null,\'fax\')" class="fa fa-play font-green pointer-cursor" title="{{\'APPLICATION_RESUME\' | translate}}"></i></span></div>',filter:{type:l.filter.SELECT,selectOptions:[{value:"true",label:d.instant("APPLICATION_PAUSED")},{value:"connect",label:d.instant("APPLICATION_NOT_PAUSED")}]},enableSorting:!1,enableColumnMenu:!1},{name:"smsPause",displayName:"APPLICATION_SMS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online" data-ng-class="{\'paused-agent\':row.entity.smsPause}"><span class="left-margin"><i data-ng-if="row.entity.smsPause" data-ng-click="grid.appScope.pause(row.entity.id,\'unpause\',null,\'sms\')" class="fa fa-play font-green pointer-cursor" title="{{\'APPLICATION_RESUME\' | translate}}"></i></span></div>',filter:{type:l.filter.SELECT,selectOptions:[{value:"true",label:d.instant("APPLICATION_PAUSED")},{value:"connect",label:d.instant("APPLICATION_NOT_PAUSED")}]},enableSorting:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=k.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){r(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?q.order=null:q.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),n()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){q.offset=(a-1)*b,q.limit=b,n()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?q[a.name]=a.filters[0].term:delete q[a.name]}),n()})}},n(!0),p()};var r=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent")}),a.pause=function(b,c,e,g){return e&&(a.pauseType=null),i.save({name:c,agent:b,type:e||"DEFAULT PAUSE",data4:e||"DEFAULT PAUSE",channel:g||"all"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/realtime/view/agent/agent.html",controller:"RealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("RealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("RealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("RealtimeViewCtrl",["$scope",function(a){}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.realtime.view",{url:"/view",templateUrl:"app/channels/realtime/view/view.html",controller:"RealtimeViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("ReportCall",["$resource",function(a){return a("/api/report/calls/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ReportDial",["$resource",function(a){return a("/api/report/dials/:id/:controller/:controller2",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("SmsAccount",["$resource",function(a){return a("/api/sms/accounts/:accountId/:controller/:id",{id:"@accountId"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts",{url:"/accounts",template:"<div ui-view></div>",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:42}}})}]),angular.module("xCallyShuttleApp").controller("SmsAccountListCtrl",["$scope","SmsAccount","gridOptions","$stateParams","xAlert","$translate",function(a,b,c,d,e,f){a.message="Hello",a.initView=function(){var e={exporterCsvFilename:"sms_accounts.csv",columnDefs:[{name:"id",displayName:"ID",cellClass:"text-center",width:75,enableSorting:!1,enableFiltering:!1},{name:"name"},{name:"description"},{name:"type",displayName:"APPLICATION_ACCOUNT_TYPE"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/sms/accounts/view/{{row.entity.id}}/settings",name:"profile"},{"class":"green-jungle",name:"check",onClick:"grid.appScope.checkAccount(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,e,a,{accountId:d.accountId})},a.checkAccount=function(a){return b.get({accountId:a,controller:"check"}).$promise.then(function(){e.show(f.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(a){e.show(f.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.list",{url:"/list",templateUrl:"app/channels/sms/account/list/list.html",controller:"SmsAccountListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.actions",{url:"/actions",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("SmsApplication",["$resource",function(a){return a("/api/sms/applications/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SmsAccountViewActionListCtrl",["$scope","gridOptions","SmsAccount","$http","$translate","$stateParams","xAlert",function(a,b,c,d,e,f,g){a.initActions=function(){var d={draggable:!0,exporterCsvFilename:"sms_applications.csv",enableSorting:!1,enableFiltering:!1,columnDefs:[{name:"app",cellClass:"text-center"},{name:"name",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span>{{row.entity.app == "queue" ? row.entity.SmsQueue.name : row.entity.User.name}}</span></div>'},{name:"timeout",cellClass:"text-center"},{name:"interval",displayName:"APPLICATION_TIME_INTERVAL",cellClass:"text-center",cellTemplate:"<div><span>{{row.entity.Interval ? row.entity.Interval.name : row.entity.interval}}</span></div>"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/sms/accounts/view/{{row.entity.SmsAccountId}}/actions/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.app, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a,{accountId:f.accountId,controller:"applications"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.actions.list",{url:"/list",templateUrl:"app/channels/sms/account/view/action/list/list.html",controller:"SmsAccountViewActionListCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountViewActionViewCtrl",["$scope","$http","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","Agent","Interval","SmsQueue","SmsAccount","Template","MailAccount","SmsApplication",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initAction=function(){return a.$application=i.application,a.$stateParams=c,a.$interval=j.interval,a.forms={},a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"SendSMS",value:"sendSms"}],q.get({id:c.actionId}).$promise.then(function(b){if(a.application=b,a.application.alwaysTime=!1,a.application.IntervalId)a.application.intType="list";else switch(a.application.interval){case"*,*,*,*":a.application.intType="always";
-break;default:a.application.intType="custom"}if("always"===a.application.intType||"custom"===a.application.intType){var c=a.application.interval.split(",");"*"===c[0]?a.application.alwaysTime=!0:(a.application.t_from=moment(new Date),a.application.t_to=moment(new Date),a.application.t_from.hour(c[0].split("-")[0].split(":")[0]),a.application.t_from.minute(c[0].split("-")[0].split(":")[1]),a.application.t_to.hour(c[0].split("-")[1].split(":")[0]),a.application.t_to.minute(c[0].split("-")[1].split(":")[1])),"*"===c[1]?(a.application.wd_from="always",a.application.wd_to="always"):(a.application.wd_from=c[1].split("-")[0],a.application.wd_to=c[1].split("-")[1]),"*"===c[2]?(a.application.md_from="always",a.application.md_to="always"):(a.application.md_from=c[2].split("-")[0],a.application.md_to=c[2].split("-")[1]),"*"===c[3]?(a.application.m_from="always",a.application.m_to="always"):(a.application.m_from=c[3].split("-")[0],a.application.m_to=c[3].split("-")[1])}a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})})["catch"](function(a){f.error(a)})},a.getQueues=function(){return m.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return k.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return l.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.getTemplates=function(){return o.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.getMailAccounts=function(){return p.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getSmsAccounts=function(){return n.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.updateItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var g,h,i,j,k;g=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(h=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(h+="-"+a.application.wd_to)):h="*",a.application.md_from&&"always"!==a.application.md_from?(i=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(i+="-"+a.application.md_to)):i="*",a.application.m_from&&"always"!==a.application.m_from?(j=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(j+="-"+a.application.m_to)):j="*",k=g+","+h+","+i+","+j,a.application.interval=k,a.application.IntervalId=null}return n.update({accountId:c.accountId,controller:"applications",id:c.actionId},a.application).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success"),e.path("/channels/sms/accounts/view/"+c.accountId+"/actions/list")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.actions.view",{url:"/view/:actionId",templateUrl:"app/channels/sms/account/view/action/view/view.html",controller:"SmsAccountViewActionViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountViewActionWizardCtrl",["$scope","$http","Agent","SmsQueue","Interval","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","SmsAccount","Template","MailAccount",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"SendSMS",value:"sendSms"}],a.$application=l.application,a.$stateParams=f,a.$interval=m.interval,a.forms={},a.application={alwaysTime:!0},a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})},a.getQueues=function(){return d.get().$promise.then(function(b){console.log(b),a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return c.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return e.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.getTemplates=function(){return o.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.getMailAccounts=function(){return p.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getSmsAccounts=function(){return n.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.createItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var c,d,e,j,k;c=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(d=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(d+="-"+a.application.wd_to)):d="*",a.application.md_from&&"always"!==a.application.md_from?(e=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(e+="-"+a.application.md_to)):e="*",a.application.m_from&&"always"!==a.application.m_from?(j=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(j+="-"+a.application.m_to)):j="*",k=c+","+d+","+e+","+j,a.application.interval=k,a.application.IntervalId=null}return n.save({accountId:f.accountId,controller:"applications"},a.application).$promise.then(function(){i.show(g.instant("MESSAGE_WELL_DONE"),"success"),h.path("/channels/sms/accounts/view/"+f.accountId+"/actions/list")})["catch"](function(a){i.error(a)})},a.formValidation=function(a){return a},a.next=function(){j.wizard().next()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.actions.wizard",{url:"/wizard",templateUrl:"app/channels/sms/account/view/action/wizard/wizard.html",controller:"SmsAccountViewActionWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountApiViewCtrl",["$scope","SmsAccount","$http","$stateParams","clipboard","$translate","$location","xAlert",function(a,b,c,d,e,f,g,h){a.copyToClipboard=function(a){e.copyText(a),h.show(f.instant("MESSAGE_TEXT_COPIED_CLIPBOARD")+"!","success")},a.initView=function(){b.get({id:d.accountId}).$promise.then(function(b){a.account=b,a.deliveryurl=a.account.remote+"/api/sms/accounts/"+a.account.id+"/messageStatus",a.receiveurl=a.account.remote+"/api/sms/accounts/"+a.account.id+"/receive"})["catch"](function(a){h.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.api",{url:"/api",controller:"SmsAccountApiViewCtrl",templateUrl:"app/channels/sms/account/view/api/view/view.html"})}]),angular.module("xCallyShuttleApp").factory("SmsDisposition",["$resource",function(a){return a("/api/sms/dispositions/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SmsInboxViewModaDispositionAddCtrl",["$scope","$uibModalInstance","SmsAccount","id",function(a,b,c,d){a.ok=function(){return c.save({accountId:d,controller:"dispositions"},{name:a.name}).$promise.then(function(a){b.close(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("SmsAccountDispositionViewCtrl",["$scope","$stateParams","$uibModal","$translate","SmsAccount","xAlert",function(a,b,c,d,e,f){a.initView=function(){return e.get({accountId:b.accountId,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.updateDisposition=function(a,c){return e.update({accountId:b.accountId,controller:"dispositions",id:a},{name:c}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.deleteDisposition=function(c){return console.log("delete"),e.remove({accountId:b.accountId,controller:"dispositions",id:c}).$promise.then(function(){_.remove(a.dispositions,{id:c})})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addDisposition=function(){return c.open({animation:!0,templateUrl:"app/channels/sms/account/view/disposition/modal/add.modal.html",controller:"SmsInboxViewModaDispositionAddCtrl",resolve:{id:function(){return b.accountId}}}).result.then(function(b){b&&a.dispositions.push(b)})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.dispositions",{url:"/dispositions",controller:"SmsAccountDispositionViewCtrl",templateUrl:"app/channels/sms/account/view/disposition/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountHooksViewCtrl",["$scope","SmsAccount","Pause","$http","$stateParams","clipboard","$translate","$location","xAlert",function(a,b,c,d,e,f,g,h,i){a.account={},a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.initView=function(){a.types=[{value:"",name:"-- None --"},{name:"HTTP GET",value:"GET"},{name:"HTTP POST",value:"POST"}],c.get().$promise.then(function(b){a.pauses=b.rows})["catch"](function(a){i.error(a)}),b.get({id:e.accountId}).$promise.then(function(b){a.account=b,a.account.actions.length<1&&a.account.actions.push({action:"pause",enabled:!1,type:null})})["catch"](function(a){i.error(a)})},a.resetActionData=function(a){a.type=null},a.updateItemSmsAccount=function(){return console.log(a.account),b.update({id:e.accountId},a.account).$promise.then(function(){i.show(g.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){i.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.hooks",{url:"/hooks",controller:"SmsAccountHooksViewCtrl",templateUrl:"app/channels/sms/account/view/hooks/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountSettingViewCtrl",["$scope","SmsAccount","Pause","$http","$stateParams","clipboard","$translate","$location","xAlert","List",function(a,b,c,d,e,f,g,h,i,j){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.types=[{name:"HTTP GET",value:"GET"},{name:"HTTP POST",value:"POST"}],a.account={},a.initView=function(){j.get().$promise.then(function(b){a.lists=b.rows})["catch"](function(a){console.error(a)}),b.get({id:e.accountId}).$promise.then(function(b){a.account=b})["catch"](function(a){i.error(a)})},a.updateItemSmsAccount=function(){return b.update({id:e.accountId},a.account).$promise.then(function(){i.show(g.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){i.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.settings",{url:"/settings",controller:"SmsAccountSettingViewCtrl",templateUrl:"app/channels/sms/account/view/setting/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountViewCtrl",["$scope","SmsAccount","$http","$stateParams","clipboard","$translate","$location","xAlert","List",function(a,b,c,d,e,f,g,h,i){a.initView=function(){return a.account={},b.get({id:d.accountId}).$promise.then(function(b){a.account=b,console.log(b)})["catch"](function(a){h.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view",{url:"/view/:accountId",templateUrl:"app/channels/sms/account/view/view.html",controller:"SmsAccountViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}})}]),angular.module("xCallyShuttleApp").controller("SmsAccountWizardCtrl",["$scope","$http","$location","$translate","WizardHandler","xAlert","SmsAccount",function(a,b,c,d,e,f,g){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.forms={},a.item={},a.item.remote=c.protocol()+"://"+location.host},a.goNext=function(){e.wizard().next()},a.formValidation=function(a){return a},a.createItem=function(){return console.log(a.item),g.save(a.item).$promise.then(function(){c.path("/channels/sms/accounts/list")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.wizard",{url:"/wizard",templateUrl:"app/channels/sms/account/wizard/wizard.html",controller:"SmsAccountWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.inbox",{url:"/inbox",template:"<div ui-view></div>",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:44}}})}]),angular.module("xCallyShuttleApp").directive("smsRoom",["$cookieStore","$translate","$uibModal","$timeout","Tag","CannedAnswer","Auth","SmsAccount","SmsRoom","SmsMessage","xAlert","usSpinnerService","socket","$stateParams","$rootScope",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){return{restrict:"E",scope:{workspace:"=",index:"=",submit:"&onSubmit"},templateUrl:"app/channels/sms/inbox/room/room.directive.html",link:function(a){a.modelOptions={debounce:{"default":500,blur:250},getterSetter:!0},a.panelLeft=null,a.panelRight="col-md-12",a.togglePanelLeft=function(){a.panelLeft?(a.panelLeft=null,a.panelRight="col-md-12"):(a.panelLeft="col-md-6",a.panelRight="col-md-6")},a.form={disabled:!1,from:"",to:a.workspace.data&&a.workspace.data.to?a.workspace.data.to:"",body:""},m.socket.on("sms_message:save",function(b){return a.workspace.id&&b.SmsRoomId==a.workspace.id?j.get({id:b.id}).$promise.then(function(b){a.SmsRoom||(a.SmsRoom={SmsMessages:[]});var c=_.findIndex(a.SmsRoom.SmsMessages,{id:b.id});c>-1?_.merge(a.SmsRoom.SmsMessages[c],b):a.SmsRoom.SmsMessages.unshift(b),a.panelLeft="col-md-6",a.panelRight="col-md-6"})["catch"](function(a){console.error(a)}):void 0}),m.socket.on("sms_message:update",function(b){if(a.SmsRoom&&b.SmsRoomId==a.workspace.id){var c=_.find(a.SmsRoom.SmsMessages,{id:b.id});c&&_.merge(c,b)}}),m.socket.on("sms_room:save",function(b){a.SmsRoom&&b.id==a.workspace.id&&(a.SmsRoom.status=b.status,a.SmsRoom.disposition=b.disposition)}),a.closeRoom=function(b){return c.open({animation:!0,templateUrl:"app/channels/sms/inbox/view/view.status.modal.html",controller:"SmsInboxViewModalStatusCtrl",resolve:{closed:function(){return"CLOSED"===a.SmsRoom.status},accountId:function(){return a.SmsRoom.SmsAccountId}}}).result.then(function(a){var c={id:b,status:"CLOSED"};return a.disposition&&(c.disposition=a.disposition),i.update(c).$promise["catch"](function(a){k.error(a)})})},a.openRoom=function(a,b){var c=_.find(o.workspaces,{id:a,type:"smsRoom"});c?c.active=!0:o.workspaces.push({id:a,name:b,type:"smsRoom","class":"glyphicon glyphicon-comment",active:!0})},e.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)}),h.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)}),a.workspace.id?(a.panelLeft="col-md-6",a.panelRight="col-md-6",i.get({id:a.workspace.id}).$promise.then(function(b){a.SmsRoom=b,a.form.from=a.SmsRoom.SmsAccount.phone,a.form.to=a.SmsRoom.contact,a.form.tags=a.SmsRoom.tags})["catch"](function(a){console.error(a)})["finally"](function(){l.stop("spinner-grid"),a.form.disabled=!1})):l.stop("spinner-grid"),a.onSelect=function(){a.form.body+=a.modelOptions.selectedAnswer,delete a.modelOptions.selectedAnswer},a.onSelectAnswer=function(b){a.form.body+=b,a.selectedAnswer=""},a.getAnswers=function(a){return f.get({key:a}).$promise.then(function(a){return _.map(a.rows,"value")})},a.onChanged=function(){return i.patch({id:a.workspace.id},{tags:a.form.tags}).$promise["catch"](function(a){console.error(a)})},a.sendSMS=function(){l.spin("spinner-grid");var c=_.find(a.smsAccounts,{phone:a.form.from}),d={body:a.form.body,SmsRoomId:a.SmsRoom?a.SmsRoom.id:null};return"twilio"===c.type?(d.from=/^[\+][0-9]+$/.test(a.form.from)?a.form.from:"+"+a.form.from,d.to=/^[\+][0-9]+$/.test(a.form.to)?a.form.to:"+"+a.form.to):(d.from=/^[\+][0-9]+$/.test(a.form.from)?a.form.from.replace("+",""):a.form.from,d.to=/^[\+][0-9]+$/.test(a.form.to)?a.form.to.replace("+",""):a.form.to),c?h.save({accountId:c.id,controller:"send"},d).$promise.then(function(c){return k.show(b.instant("MESSAGE_WELL_DONE"),"success"),a.SmsRoom?a.SmsRoom:i.get({id:"messages",controller:c.id}).$promise}).then(function(b){b&&(a.form.body="",a.workspace.id=b.id,a.workspace.name=b.contact,a.SmsRoom=b,a.panelLeft="col-md-6",a.panelRight="col-md-6")})["catch"](function(a){k.error(a)})["finally"](function(){l.stop("spinner-grid")}):void console.log("Can not find account")}}}}]),angular.module("xCallyShuttleApp").controller("SmsInboxInfoModalCtrl",["$scope","$translate","$uibModalInstance","$stateParams","xAlert","data","uniqueId","ReportSquare",function(a,b,c,d,e,f,g,h){a.data=null,a.initInfo=function(){f&&(a.data=_.isEmpty(JSON.parse(f))?null:JSON.parse(f)),g&&h.get({controller:"show",uniqueid:g}).$promise.then(function(b){a.data={id:b.id,channel:b.channel,uniqueid:b.uniqueid,callerid:b.callerid,calleridname:b.calleridname,project_name:b.project_name,extension:b.extension}})["catch"](function(b){switch(b.status){case 404:a.data=null;break;default:e.error(b)}})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").directive("sms",["$rootScope","SmsMessage","List","xAlert","$translate","$uibModal",function(a,b,c,d,e,f){return{restrict:"E",scope:{smsMessage:"=message",accounttype:"=accounttype",listId:"="},templateUrl:"app/channels/sms/inbox/sms/sms.html",link:function(b){b.openContact=function(f){return b.listId?c.save({listId:b.listId,controller:"contacts"},{mobile:f}).$promise.then(function(b){var c=_.find(a.$root.workspaces,{contactID:b.id});c?c.active=!0:a.$root.workspaces.push({active:!0,"class":"icon-user",contactID:b.id,name:b.phone,type:"contact"})})["catch"](function(a){console.error(a)}):void d.show(e.instant("MESSAGE_NO_LIST_CONFIGURED"),"info")},b.info=function(a,b){f.open({animation:!0,templateUrl:"app/channels/sms/inbox/sms/info.modal.html",controller:"SmsInboxInfoModalCtrl",resolve:{data:function(){return b},uniqueId:function(){return a}}})}}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.inbox.view.account",{url:"/account/:id",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:11}}})}]),angular.module("xCallyShuttleApp").controller("SmsInboxViewAccountListCtrl",["$scope","$rootScope","$uibModal","$translate","$stateParams","$state","Tag","usSpinnerService","socket","SmsAccount","SmsRoom","gridOptions","uiGridConstants","Auth","Modal","xAlert","uibButtonConfig","localStorageService",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){a.initView=function(){q.activeClass="green-haze",a.id=[],a.isAdmin=n.isAdmin(),a.isAgent=n.isAgent(),a.uncheckable=!1,a.query={status:r.get("smsStatus")?r.get("smsStatus"):"NEW",tags:r.get("smsTags")?r.get("smsTags"):[]},a.$watch("query.status",function(){r.set("smsStatus",a.query.status),a.getPage()},!0),g.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)}),a.gridOptions={exporterCsvFilename:"sms_rooms.csv",enableRowHeaderSelection:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!1,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,enableSelectAll:!0,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,columnDefs:[{name:"lastEvent",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>             <span data-ng-class=\"{'icon-arrow-up font-green': row.entity.lastEvent === 'SENT',             'icon-arrow-up font-yellow': row.entity.lastEvent === 'SENDING',             'icon-arrow-down font-green': row.entity.lastEvent === 'RECEIVED',             'icon-close font-red': row.entity.lastEvent === 'FAILED',             'icon-question': !row.entity.lastEvent}\">             </span>             </div>",width:30,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"tags",displayName:"",headerCellTemplate:'<i class="icon-tag" style="margin-top: 8px; margin-left: 8px;"></i>',cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><i data-ng-class=\"row.entity.tags.length ? 'icon-tag' : ''\" title=\"{{row.entity.tags}}\"></i></div>",width:30,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"id",displayName:"Id",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>#{{row.entity.id}}</span></div>",width:75,enableSorting:!1,enableFiltering:!0,enableColumnMenu:!1},{name:"contact",cellClass:"text-center"},{name:"disposition",cellClass:"text-center"},{name:"updatedAt",cellFilter:"date:'MM/dd/yyyy HH:mm'",width:120,enableSorting:!1,enableFiltering:!1,sort:{direction:m.DESC}},{name:"action",cellTemplate:'<div>             <a class="btn btn-icon-only font-green" data-ng-click="grid.appScope.openRoom(row.entity.id, row.entity.contact)"><i class="glyphicon glyphicon-comment" aria-hidden="true"></i></a>             <a class="btn btn-icon-only font-red" data-ng-show="grid.appScope.isAdmin" data-ng-click="grid.appScope.deleteItem(row.entity.id,row.entity.id)"><i class="fa fa-trash" aria-hidden="true"></i>             </div>',enableSorting:!1,cellClass:"ui-grid-vcenter",width:90,enableFiltering:!1,enableColumnMenu:!1}],data:[],onRegisterApi:function(b){a.gridApi=b,a.gridApi.selection&&(a.gridApi.selection.on.rowSelectionChanged(a,function(b){b.isSelected?a.id.push(a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id):_.pull(a.id,a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id)}),a.gridApi.selection.on.rowSelectionChangedBatch(a,function(b){b[0].isSelected?a.id=_.union(a.id,_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id")):_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id").forEach(function(b){_.pull(a.id,b)})}))}},i.socket.on("sms_room:remove",function(b){_.remove(a.workspaces,{id:b.id,type:"smsRoom"}),_.remove(a.gridOptions.data,{id:b.id})}),a.getPage(a.query)},a.onChanged=function(){a.getPage(a.query)},a.tagItems=function(){return c.open({animation:!0,templateUrl:"app/channels/sms/inbox/view/view.tags.modal.html",controller:"SmsInboxViewModalTagCtrl",resolve:{id:function(){return a.id}}}).result.then(function(){a.gridApi.selection.clearSelectedRows(),a.id=[],a.getPage()})},a.disposeItems=function(){return c.open({animation:!0,templateUrl:"app/channels/sms/inbox/view/view.status.modal.html",controller:"SmsInboxViewModalStatusCtrl",resolve:{accountId:function(){return e.id}}}).result.then(function(b){return console.log(b,a.id),k.patch({id:a.id},b).$promise.then(function(){a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})})},a.openRoom=function(b,c){var d=_.find(a.workspaces,{id:b,type:"smsRoom"});return d?d.active=!0:a.workspaces.push({id:b,name:c,type:"smsRoom","class":"glyphicon glyphicon-comment",active:!0}),b&&"agent"===n.getCurrentUser().role&&"PENDING"!==a.query.status&&"CLOSED"!==a.query.status?k.patch({id:b},{status:"OPEN",openReason:"agent"}).$promise["catch"](function(a){console.error(a)}):void 0},a.getPage=function(b){h.spin("spinner-grid");var c={accountId:e.id,controller:"rooms"};return b&&_.merge(c,b),a.query&&_.merge(c,a.query),j.query(c).$promise.then(function(b){r.set("smsAccountId",e.id),a.gridOptions.data=b,i.socket.on("sms_room:save",function(b){if(console.log("data",b),console.log(b.SmsAccountId,e.id),b.SmsAccountId==e.id){var c=_.find(a.gridOptions.data,{id:b.id});c?c.status!==b.status?_.remove(a.gridOptions.data,{id:b.id}):_.merge(c,b):a.query.status===b.status&&a.gridOptions.data.push(b)}}),i.socket.on("sms_room:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})})["catch"](function(a){console.error(a)})["finally"](function(){h.stop("spinner-grid")})},a.deleteItem=o.confirm["delete"](function(b){var c={id:b};return console.log(c),k["delete"](c).$promise.then(function(){a.getPage(),p.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})}),a.deleteItems=o.confirm["delete"](function(){var b={ids:a.id};return k["delete"](b).$promise.then(function(){a.getPage(),p.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.inbox.view.account.list",{url:"/list",templateUrl:"app/channels/sms/inbox/view/account/list/list.html",controller:"SmsInboxViewAccountListCtrl",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:11}}})}]),angular.module("xCallyShuttleApp").controller("SmsInboxViewModalAgentCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Agent","SmsRoom","xAlert","roomId",function(a,b,c,d,e,f,g,h){a.initModal=function(){a.agents=[],a.item={agents:[]},e.get().$promise.then(function(b){b.rows.forEach(function(b){a.agents.push(b)})})["catch"](function(a){console.error(a)}),f.query({id:h,controller:"agents"}).$promise.then(function(b){b.forEach(function(b){a.agents.push(b),a.item.agents.push(b.id)})})["catch"](function(a){console.error(a)}),a.modal={dismissable:!0,title:"APPLICATION_MESSAGE_SEND_RETRY",text:"MESSAGE_MESSAGE_SEND_RETRY",buttons:[{classes:"btn btn-success",text:"APPLICATION_RETRY",click:function(a){b.close(a)}},{classes:"btn default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]}},a.ok=function(){return f.update({id:h,controller:"agents",agents:a.item.agents}).$promise.then(function(){g.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close()})["catch"](function(a){console.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("SmsInboxViewCtrl",["$scope","$location","$stateParams","$translate","$uibModal","socket","Auth","xAlert","SmsRoom","SmsAccount","localStorageService",function(a,b,c,d,e,f,g,h,i,j,k){a.initView=function(){return j.get().$promise.then(function(c){var d=null;a.smsAccounts=c.rows,a.smsAccounts.length&&(d="/channels/sms/inbox/view/account/"+(k.get("smsAccountId")||a.smsAccounts[0].id)+"/list"),d&&b.path(d)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.inbox.view",{url:"/view",templateUrl:"app/channels/sms/inbox/view/view.html",controller:"SmsInboxViewCtrl",reload:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/inbox.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("SmsInboxViewModalStatusCtrl",["$scope","$uibModalInstance","SmsAccount","accountId",function(a,b,c,d){a.modal={title:"APPLICATION_CONFIRM_CLOSE",text:"MESSAGE_ARE_YOU_SURE_YOU_WANT_TO_CLOSE_THE_SMS"},a.initDisposition=function(){return a.item={status:"CLOSED"},c.get({accountId:d,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a)})},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").controller("SmsInboxViewModalTagCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Tag","SmsRoom","xAlert","id",function(a,b,c,d,e,f,g,h){console.log(h),a.initModal=function(){return a.tags=[],a.item={tags:[]},a.modal={dismissable:!0,title:"APPLICATION_MESSAGE_SEND_RETRY",text:"MESSAGE_MESSAGE_SEND_RETRY",buttons:[{"class":"btn-success",text:"APPLICATION_TAG",click:function(){var d={status:!0};return f.patch({id:h},{tags:a.item.tags}).$promise.then(function(){g.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(){d.status=!1,g.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){b.close(d)})}},{"class":"default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]},e.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("SmsInboxViewModalTemplateCtrl",["$scope","$uibModalInstance","Template",function(a,b,c){a.initModal=function(){return a.item={},c.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("SmsQueueListCtrl",["$scope","SmsQueue","gridOptions","$uibModal","xAlert","Auth",function(a,b,c,d,e,f){a.initView=function(){a.Auth=f;var d={exporterCsvFilename:"voice_queues.csv",columnDefs:[{name:"name"},{name:"description"},{name:"timeout"},{name:"strategy"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/sms/queues/view/{{row.entity.id}}/settings",name:"settings"},{"class":"green-meadow",href:"/channels/sms/queues/view/{{row.entity.id}}/agents",name:"agents",hide:"user"===f.getCurrentUser().role},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){var b=d.open({animation:!0,templateUrl:"app/channels/sms/queue/list/list.create.modal.html",controller:"SmsQueueListCreateCtrl",size:"lg"});b.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("SmsQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","SmsQueue","Team","strategies",function(a,b,c,d,e,f,g){a.form={},a.strategies=g,a.item={penalty:0,agents:[]},a.getTeams=function(){return f.get({controller:"associations"}).$promise.then(function(b){a.teams=b.rows}).then(function(){ComponentsDropdowns.bindQueue(a.teams,[],function(){return{select:function(b){a.item.agents=_.union(a.item.agents,b)},deselect:function(b){a.item.agents=_.difference(a.item.agents,b)}}})})["catch"](function(a){console.error(a)})},a.save=function(){return console.log(a.item),e.save(a.item).$promise.then(function(a){b.close(a)})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.queues.list",{url:"/list",templateUrl:"app/channels/sms/queue/list/list.html",controller:"SmsQueueListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({
-insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").factory("SmsQueue",["$resource",function(a){return a("/api/sms/queues/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.queues",{url:"/queues",template:"<div ui-view></div>",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:43}}})}]),angular.module("xCallyShuttleApp").controller("SmsQueueViewCtrl",["$scope","$http","Auth","$translate","$stateParams","xAlert","Team","SmsQueue","strategies",function(a,b,c,d,e,f,g,h,i){a.strategies=i,a.Auth=c;var j=function(){return{select:function(b){return h.save({id:a.queue.id,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(b){console.log("sel",b),a.getTeams()})["catch"](function(a){console.error(a)})},deselect:function(b){return h["delete"]({id:a.queue.id,controller:"agents",agents:b}).$promise.then(function(b){console.log("desel",b),a.getTeams()})["catch"](function(a){console.error(a)})}}};a.getQueue=function(){return h.get({id:e.id}).$promise.then(function(b){b.penalty=0,a.queue=b})["catch"](function(a){console.error(a)})},a.updateSmsQueue=function(){return h.update({id:e.id},{name:a.queue.name,description:a.queue.description,timeout:a.queue.timeout,strategy:a.queue.strategy}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.getTeams=function(){return g.get({controller:"associations"}).$promise.then(function(b){return a.teams=b.rows,console.log(b.rows),h.get({id:e.id,controller:"agents"}).$promise}).then(function(b){console.log(b),ComponentsDropdowns.bindSmsQueue(a.teams,_.map(b.rows,function(a){return{id:a.id,penalty:a.UserHasSmsQueue.penalty}}),j)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.queues.view",{url:"/view/:id",templateUrl:"app/channels/sms/queue/view/view.html",controller:"SmsQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.sms.queues.view.settings",{url:"/settings",templateUrl:"app/channels/sms/queue/view/view.settings.html"}).state("main.channels.sms.queues.view.agents",{url:"/agents",templateUrl:"app/channels/sms/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:45}}})}]),angular.module("xCallyShuttleApp").controller("SmsRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","SmsQueue","usSpinnerService","$q","uiGridConstants",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){return k.spin("grid-spinner"),g.get(s).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){p(a)})})["catch"](function(a){f.error(a)})["finally"](function(){k.stop("grid-spinner")})}function o(){e.socket.on("agent:save",function(b){b=b.newValues||b;var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});c&&(c.online=_.has(b,"online")?b.online:c.online,c.lastLoginAt=_.has(b,"lastLoginAt")?b.lastLoginAt:c.lastLoginAt,c.pause=_.has(b,"smsPause")?b.smsPause:c.smsPause,c.pauseType=_.has(b,"pauseType")?b.pauseType:c.pauseType,c.lastPauseAt=_.has(b,"lastPauseAt")?b.lastPauseAt:c.lastPauseAt,c.ipaddr=_.has(b,"ipaddr")?b.ipaddr:c.ipaddr,c.port=_.has(b,"port")?b.port:c.port,c.fullcontact=_.has(b,"fullcontact")?b.fullcontact:c.fullcontact,c.useragent=_.has(b,"useragent")?b.useragent:c.useragent,c.lastms=_.has(b,"lastms")?b.lastms:c.lastms,c.internal=_.has(b,"internal")?b.internal:c.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=_.has(b,"online")?b.online:a.online)}))}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_sms_queue:save",function(b){console.log("new queue",b);var c=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0}),d=a.gridOptions.data.indexOf(c);a.gridOptions.data.splice(d+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,queueId:b.SmsQueueId,agent:b.membername,online:c.online})}),e.socket.on("user_has_sms_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queueId:b.SmsQueueId})})}function p(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.smsPause,pauseType:b.pauseType,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.SmsQueues.forEach(function(c){a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,queueId:c.id,agent:b.name,online:b.online})})}function q(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.error(a)})}function r(){return j.get().$promise.then(function(b){a.smsQueues=b.rows,e.syncUpdates("sms_queue",a.smsQueues)})["catch"](function(a){f.error(a)})}a.smsQueues=[];var s={controller:"realtime",controller1:"sms",offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="fa" data-ng-class="{\'font-green\':row.entity.online, \'font-red\':!row.entity.online,\'fa-user\':row.entity.online,\'fa-user-times\':!row.entity.online}"></i> <span data-ng-if="row.entity.online" class="left-margin">(<css-timer start-time="row.entity.lastLoginAt"></css-timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"smsPause",displayName:"APPLICATION_PAUSE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.pause != null && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="fa fa-play font-green pointer-cursor left-margin" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="fa fa-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select> <span data-ng-if="row.entity.pause" class="left-margin">({{row.entity.pauseType}})</span><span class="left-margin"><css-timer data-ng-if="row.entity.pause" start-time="row.entity.lastPauseAt"></css-timer></span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"PAUSED"},{value:"false",label:"NOT PAUSED"}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queueId" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queueId)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.smsQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?s.order=null:s.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),n()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){s.offset=(a-1)*b,s.limit=b,n()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?s[a.name]=a.filters[0].term:delete s[a.name]}),n()})}},n(),q(),r(),$timeout(function(){o()})};var t=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_sms_queue")}),a.pause=function(b,c,e){return e&&(a.pauseType=null),i.save({name:c,agent:b,type:e||"DEFAULT PAUSE",data4:e||"DEFAULT PAUSE",channel:"sms"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/sms/realtime/view/agent/queue.modal.add.html",controller:"SmsRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.smsQueues,function(b){return!!_.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})})}}});g.result.then(function(b){return i.save({name:"QueueAdd",agent:e,queues:_.filter(a.smsQueues,function(a){return _.includes(b.queues,a.id)}),channel:"sms",data1:e,data3:b.queues.join(","),data4:"sms"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queueId:b,channel:"sms",data1:a,data3:b,data4:"sms"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/sms/realtime/view/agent/agent.modal.info.html",controller:"SmsRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/sms/realtime/view/agent/agent.html",controller:"SmsRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("SmsRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("SmsRealtimeViewApplicationCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","ReportSmsSession","usSpinnerService","$q","uiGridConstants","$timeout",function(a,b,c,d,e,f,g,h,i,j,k){function l(){return h.spin("spinner-grid"),g.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){m(),h.stop("spinner-grid")})}function m(){e.socket.on("report_sms_session:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&k(function(){_.remove(a.gridOptions.data,{id:b.id})},1e4)):b.leaveAt||a.gridOptions.data.push(b)}),e.socket.on("report_sms_session:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})}a.moment=moment,a.initApplications=function(){a.gridOptions={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"uniqueid",displayName:"APPLICATION_UNIQUEID",headerCellFilter:"translate"},{name:"accountname",displayName:"APPLICATION_ACCOUNT",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span> <span data-ng-if="!row.entity.leaveAt">[<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</span></div>"},{name:"queuename",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.queuename || ''}}</span></div>"}],data:[],gridMenuTitleFilter:function(a){var b=i.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){n(a.gridOptions.data.length)})}},l()};var n=function(a){var b=a?30*a+60:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("report_sms_session")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.realtime.view.applications",{url:"/applications",templateUrl:"app/channels/sms/realtime/view/application/application.html",controller:"SmsRealtimeViewApplicationCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsRealtimeViewCtrl",["$scope","$state",function(a,b){a.agents=[{name:"Queues",link:"main.channels.sms.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.sms.realtime.view.agents.timeline"}],a.sessions=[{name:"Sessions",link:"main.channels.sms.realtime.view.sessions"}],a.tree={queues:[{name:"Queues",link:"main.channels.sms.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.sms.realtime.view.agents.timeline"}],sessions:[{name:"Sessions",link:"main.channels.sms.realtime.view.sessions"}]}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.realtime.view",{url:"/view",templateUrl:"app/channels/sms/realtime/view/view.html",controller:"SmsRealtimeViewCtrl"})}]),angular.module("xCallyShuttleApp").factory("ReportSmsSession",["$resource",function(a){return a("/api/report/sms/sessions/:id/:controller/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms",{url:"/sms",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:11}}})}]),angular.module("xCallyShuttleApp").factory("SmsQueue",["$resource",function(a){return a("/api/sms/queues/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("SmsReport",["$resource",function(a){return a("/api/report/sms/:id/:controller1/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("SmsMessage",["$resource",function(a){return a("/api/sms/messages/:id/:controller",{id:"@id",controller:"@controller"},{update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").factory("SmsRoom",["$resource",function(a){return a("/api/sms/rooms/:id/:controller",{id:"@id",controller:"@controller"},{update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").factory("ChanSpy",["$resource",function(a){return a("/api/chanspy/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.chanspy",{url:"/chanspy",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:27}}})}]),angular.module("xCallyShuttleApp").controller("ChanSpyListCtrl",["$scope","$uibModal","ChanSpy","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"chanspy.csv",columnDefs:[{name:"name"},{name:"prefix"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/voice/chanspy/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/channels/voice/chanspy/list/list.create.modal.html",controller:"ChanSpyListCreateCtrl"});c.result.then(function(b){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("ChanSpyListCreateCtrl",["$scope","$translate","$uibModalInstance","ChanSpy","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.options=[{name:"APPLICATION_CHANSPY_OPTION_b",value:"b"},{name:"APPLICATION_CHANSPY_OPTION_B",value:"B"},{name:"APPLICATION_CHANSPY_OPTION_E",value:"E"},{name:"APPLICATION_CHANSPY_OPTION_o",value:"o"},{name:"APPLICATION_CHANSPY_OPTION_q",value:"q"},{name:"APPLICATION_CHANSPY_OPTION_s",value:"s"},{name:"APPLICATION_CHANSPY_OPTION_S",value:"S"},{name:"APPLICATION_CHANSPY_OPTION_w",value:"w"},{name:"APPLICATION_CHANSPY_OPTION_W",value:"W"}],a.save=function(){return a.item.options=a.item.options.join(""),d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.chanspy.list",{url:"/list",templateUrl:"app/channels/voice/chanspy/list/list.html",controller:"ChanSpyListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChanSpyViewCtrl",["$scope","$translate","$stateParams","xAlert","ChanSpy",function(a,b,c,d,e){a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.options=[{name:"APPLICATION_CHANSPY_OPTION_b",value:"b"},{name:"APPLICATION_CHANSPY_OPTION_B",value:"B"},{name:"APPLICATION_CHANSPY_OPTION_E",value:"E"},{name:"APPLICATION_CHANSPY_OPTION_o",value:"o"},{name:"APPLICATION_CHANSPY_OPTION_q",value:"q"},{name:"APPLICATION_CHANSPY_OPTION_s",value:"s"},{name:"APPLICATION_CHANSPY_OPTION_S",value:"S"},{name:"APPLICATION_CHANSPY_OPTION_w",value:"w"},{name:"APPLICATION_CHANSPY_OPTION_W",value:"W"}],a.getChanSpy=function(){return e.get({id:c.id}).$promise.then(function(b){b.options=b.options.split(""),a.chanspy=b})["catch"](function(a){d.error(a)})},a.updateChanSpy=function(){var f=angular.copy(a.chanspy);return f.options=f.options.join(""),e.update({id:c.id},f).$promise.then(function(){d.show(b.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.chanspy.view",{url:"/view/:id",templateUrl:"app/channels/voice/chanspy/view/view.html",controller:"ChanSpyViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.chanspy.view.settings",{url:"/settings",templateUrl:"app/channels/voice/chanspy/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("VoiceContext",["$resource",function(a){return a("/api/voice/contexts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.contexts",{url:"/contexts",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:22}}})}]),angular.module("xCallyShuttleApp").controller("VoiceContextListCtrl",["$scope","VoiceContext","gridOptions","$uibModal","xAlert","$translate",function(a,b,c,d,e,f){a.initView=function(){var d={exporterCsvFilename:"voice_contexts.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:75,buttons:[{"class":"{{row.entity.defaultEntry ? 'blue-hoki disabled' : 'blue-hoki'}}",href:"/channels/voice/contexts/view/{{row.entity.id}}/settings",name:"settings"},{"class":"{{row.entity.defaultEntry ? 'red-sunglo disabled' : 'red-sunglo'}}",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){var c=d.open({animation:!0,templateUrl:"app/channels/voice/context/list/create.modal.html",controller:["$scope","$uibModalInstance",function(a,b){a.form={},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]});c.result.then(function(c){return b.save(c).$promise.then(function(){a.gridOptions.getPage(),e.show(f.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){e.error(a)})})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.contexts.list",{url:"/list",templateUrl:"app/channels/voice/context/list/list.html",controller:"VoiceContextListCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceContextViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location",function(a,b,c,d,e,f){a.getContext=function(){b.get("/api/voice/contexts/"+e.id).success(function(b){a.context=b}).error(function(a){console.error(a),f.path("/voice/contexts/list")})},a.updateVoiceContext=function(){var f=angular.copy(a.context);b.put("/api/voice/contexts/"+e.id,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){c.error(b),a.context=f})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.contexts.view",{url:"/view/:id",templateUrl:"app/channels/voice/context/view/view.html",controller:"VoiceContextViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.contexts.view.settings",{url:"/settings",templateUrl:"app/channels/voice/context/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.dispositions",{url:"/dispositions",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:28}}})}]),angular.module("xCallyShuttleApp").controller("VoiceDispositionListCtrl",["$scope","$stateParams","$uibModal","$translate","VoiceDisposition","xAlert",function(a,b,c,d,e,f){a.initView=function(){return e.get().$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.updateDisposition=function(a,b){return e.update({id:a},{name:b}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.deleteDisposition=function(b){return e.remove({id:b}).$promise.then(function(){_.remove(a.dispositions,{id:b}),f.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addDisposition=function(){return c.open({animation:!0,templateUrl:"app/channels/voice/disposition/list/modal/add.modal.html",controller:"VoiceDispositionListModalDispositionAddCtrl"}).result.then(function(b){b&&(a.dispositions.push(b),f.show(d.instant("MESSAGE_WELL_DONE")+"!","success"))})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.dispositions.list",{url:"/list",templateUrl:"app/channels/voice/disposition/list/list.html",controller:"VoiceDispositionListCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceDispositionListModalDispositionAddCtrl",["$scope","$uibModalInstance","VoiceDisposition","xAlert","$translate",function(a,b,c,d,e){a.ok=function(){return c.save({name:a.name}).$promise.then(function(a){b.close(a)})["catch"](function(a){d.show(e.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").factory("VoiceDisposition",["$resource",function(a){return a("/api/voice/dispositions/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("VoiceMohListCtrl",["$scope","gridOptions","VoiceMoh","$uibModal","xAlert","$translate",function(a,b,c,d,e,f){a.initView=function(){var d={exporterCsvFilename:"voice_mohs.csv",columnDefs:[{name:"name"},{name:"directory"},{name:"sort"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/voice/mohs/view/{{row.entity.id}}/settings",name:"settings"},{"class":"{{row.entity.defaultEntry ? 'red-sunglo disabled' : 'red-sunglo'}}",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a)},a.createItem=function(){var b=d.open({animation:!0,templateUrl:"app/channels/voice/moh/list/create.modal.html",controller:["$scope","$uibModalInstance",function(a,b){a.form={},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]});b.result.then(function(b){return c.save(b).$promise.then(function(){a.gridOptions.getPage(),e.show(f.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.error(a)})})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.mohs.list",{url:"/list",templateUrl:"app/channels/voice/moh/list/list.html",controller:"VoiceMohListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("VoiceMoh",["$resource",function(a){return a("/api/voice/musiconholds/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.mohs",{url:"/mohs",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:24}}})}]),angular.module("xCallyShuttleApp").controller("VoiceMohViewCtrl",["$scope","$http","xAlert","$translate","VoiceMoh","$stateParams","socket","Modal","$sce","$location","Sound",function(a,b,c,d,e,f,g,h,i,j,k){a.$translate=d,a.audioSources={},a.sortOptions=[{value:"random",name:"APPLICATION_RANDOM"},{value:"alpha",name:"APPLICATION_ALPHABETICAL"}],a.getMoh=function(){return e.get({id:f.id}).$promise.then(function(b){delete b.stamp,a.moh=b})["catch"](function(a){c.error(a)})},a.updateVoiceMoh=function(){return console.log("update"),e.update({id:f.id},a.moh).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){c.error(a)})},a.addMohs=function(){return e.save({id:f.id,controller:"files"},a.item).$promise.then(function(){j.path("/channels/voice/mohs/view/"+f.id+"/audios")})["catch"](function(a){c.error(a)})},a.getAudioFiles=function(){return e.get({id:f.id,controller:"files"}).$promise.then(function(b){a.audioFiles=b.files,a.mohPath=b.path,a.audioFiles.forEach(function(a){l(a)})})["catch"](function(a){c.error(a)})},a.getSecureSrc=function(a){return i.trustAsResourceUrl(a)},a.getSounds=function(){return a.item={sounds:[]},k.get().$promise.then(function(b){a.soundList=b.rows})["catch"](function(a){c.error(a)})};var l=function(c){b.get("/api/voice/musiconholds/stream",{params:{path:encodeURI(a.mohPath+"/"+c)}}).success(function(b){a.audioSources[c]="data:audio/ogg;base64,"+b}).error(function(a){console.error(a)})};a.deleteItem=h.confirm["delete"](function(e){b["delete"]("/api/voice/musiconholds/"+f.id+"/files",{params:{filename:e}}).success(function(){_.remove(a.audioFiles,function(a){return a===e}),c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){c.error(a)})})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.mohs.view",{url:"/view/:id",templateUrl:"app/channels/voice/moh/view/view.html",controller:"VoiceMohViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.mohs.view.settings",{url:"/settings",templateUrl:"app/channels/voice/moh/view/view.settings.html"}).state("main.channels.voice.mohs.view.audios",{url:"/audios",templateUrl:"app/channels/voice/moh/view/view.audios.html",cache:!1}).state("main.channels.voice.mohs.view.add",{url:"/add",templateUrl:"app/channels/voice/moh/view/view.addFiles.html",cache:!1})}]),angular.module("xCallyShuttleApp").controller("VoiceQueueListCtrl",["$scope","$rootScope","$uibModal","VoiceQueue","gridOptions","Auth",function(a,b,c,d,e,f){a.initView=function(){a.Auth=f;var b={exporterCsvFilename:"voice_queues.csv",primaryKey:"name",columnDefs:[{name:"name"},{name:"strategy"},{name:"description"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/voice/queues/view/{{row.entity.name}}/settings",name:"settings"},{"class":"green-meadow",href:"/channels/voice/queues/view/{{row.entity.name}}/agents",name:"agents",hide:"user"===f.getCurrentUser().role},{
-"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.name)"}]}]};a.gridOptions=e.gridOptions(d,b,a)},a.createItem=function(){var b=c.open({animation:!0,templateUrl:"app/channels/voice/queue/list/list.create.modal.html",controller:"VoiceQueueListCreateCtrl",size:"lg"});b.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("VoiceQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","VoiceQueue","Team",function(a,b,c,d,e,f){a.form={},a.item={penalty:0,agents:[]},a.getTeams=function(){return f.get({controller:"associations"}).$promise.then(function(b){a.teams=b.rows}).then(function(){ComponentsDropdowns.bindQueue(a.teams,[],function(){return{select:function(b){a.item.agents=_.union(a.item.agents,b),console.log(a.item.agents)},deselect:function(b){a.item.agents=_.difference(a.item.agents,b),console.log(a.item.agents)}}})})["catch"](function(a){console.error(a)})},a.save=function(){return e.save(a.item).$promise.then(function(a){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close(a)})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.queues.list",{url:"/list",templateUrl:"app/channels/voice/queue/list/list.html",controller:"VoiceQueueListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.queues",{url:"/queues",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"landing"}}})}]),angular.module("xCallyShuttleApp").factory("ReportQueue",["$resource",function(a){return a("/api/report/queues/:id/:controller/:controller2",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("UserHasVoiceQueue",["$resource",function(a){return a("/api/voice/user_has_queues/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("VoiceQueueViewCtrl",["$scope","xAlert","$translate","$stateParams","socket","$location","VoiceQueue","VoiceContext","Team","Auth","VoiceMoh","Sound","Setting",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.penalty=0,a.Auth=j,a.binaryChoices=[{name:"Yes",value:1},{name:"No",value:0}],a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.autoPauseValues=[{name:"No",value:"no"},{name:"Yes",value:"all"}],a.monitorFormats=[{name:"wav",value:"wav"},{name:"gsm",value:"gsm"},{name:"Inactive",value:""}],a.queueAnnounces=[{display_name:"Default",path:null},{display_name:"Disabled",path:""}];var n=function(){return{select:function(b){return g.save({id:a.queue.name,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})},deselect:function(b){return g["delete"]({id:a.queue.name,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})}}};a.getQueue=function(){return g.get({id:d.id}).$promise.then(function(b){b.joinempty=""===b.joinempty?[]:b.joinempty.split(","),b.leavewhenempty=""===b.leavewhenempty?[]:b.leavewhenempty.split(","),b.periodic_announce=""===b.periodic_announce?[]:b.periodic_announce.split(","),b.setinterfacevar="yes"===b.setinterfacevar,b.setqueuevar="yes"===b.setqueuevar,b.setqueueentryvar="yes"===b.setqueueentryvar,b.penalty=0,a.queue=b})["catch"](function(a){f.path("/channels/voice/queues/list")})},a.updateVoiceQueue=function(){var e=angular.copy(a.queue);return e.joinempty=e.joinempty.join(","),e.leavewhenempty=e.leavewhenempty.join(","),e.periodic_announce=e.periodic_announce.join(","),e.setinterfacevar=e.setinterfacevar?"yes":"no",e.setqueuevar=e.setqueuevar?"yes":"no",e.setqueueentryvar=e.setqueueentryvar?"yes":"no",e.context||(e.context=null),g.update({id:d.id},e).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.error(a)})},a.getTeams=function(){return i.get({controller:"associations"}).$promise.then(function(b){return a.teams=b.rows,g.get({id:d.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindQueue(a.teams,_.map(b.rows,function(a){return{id:a.id,penalty:a.UserHasVoiceQueue.penalty}}),n)})["catch"](function(a){console.error(a)})},a.getContexts=function(){return h.get().$promise.then(function(b){a.voiceContexts=b.rows})["catch"](function(a){b.error(data)})},a.getMohs=function(){return k.get().$promise.then(function(b){a.voiceMohs=b.rows,e.syncUpdates("voice_musiconhold",a.voiceMohs)})["catch"](function(a){b.error(a)})},a.getSounds=function(){var b;return m.get({id:1}).$promise.then(function(a){return b=a,l.get().$promise}).then(function(c){var d=b.soundPath||"/var/opt/motion/server/files/sounds/converted";_.forEach(c.rows,function(a){a.path=(d+"/"+a.save_name).replace(/\/+/g,"/").replace(/\\+/g,"\\")}),a.queueAnnounces=a.queueAnnounces.concat(c.rows),a.periodicAnnounces=angular.copy(c.rows),c.rows.unshift({display_name:"None",path:""}),a.sounds=c.rows,e.syncUpdates("sound",a.sounds)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.queues.view",{url:"/view/:id",templateUrl:"app/channels/voice/queue/view/view.html",controller:"VoiceQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.queues.view.settings",{url:"/settings",templateUrl:"app/channels/voice/queue/view/view.settings.html"}).state("main.channels.voice.queues.view.agents",{url:"/agents",templateUrl:"app/channels/voice/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").factory("VoiceQueue",["$resource",function(a){return a("/api/voice/queues/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:26}}})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAbandonedCtrl",["$scope","$translate","socket","xAlert","ReportQueue","usSpinnerService","$q","Auth","uiGridConstants",function(a,b,c,d,e,f,g,h,i){function j(){return f.spin("spinner-grid"),e.get({controller:"abandoned",controller2:"all"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){d.error(a)})["finally"](function(){k(),f.stop("spinner-grid")})}function k(){c.socket.on("report_queue:update",function(b){b.queuecallerabandon&&a.gridOptions.data.unshift(b)})}a.radioSwitch={size:"mini",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"success",onColor:"danger"};a.initAbandoned=function(){a.agent=h.getCurrentUser(),a.gridOptions={exporterCsvFilename:"abandoned_calls.csv",enableRowHeaderSelection:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!1,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,enableSelectAll:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:1,columnDefs:[{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter"},{name:"calleridnum",displayName:"APPLICATION_CALLERIDNUM",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter"},{name:"updatedAt",displayName:"APPLICATION_DATE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.updatedAt | date:'yyyy-MM-dd HH:mm:ss'}}</div>"},{name:"lastAssignedTo",cellClass:"text-center ui-grid-vcenter",displayName:"APPLICATION_LAST_ASSIGNED_TO",headerCellFilter:"translate"},{name:"assigned",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellTemplate:'<div class="centered-uigrid-td"><input data-ng-change="grid.appScope.updateItem(row.entity)", bs-switch ng-model="row.entity.assigned" type="checkbox" switch-active="{{ !row.entity.assigned || grid.appScope.agent.name === row.entity.lastAssignedTo }}" switch-on-text="{{ \'APPLICATION_ASSIGNED\' | translate }}" switch-off-text="{{ \'APPLICATION_FREE\' | translate }}" switch-on-color="{{ grid.appScope.radioSwitch.onColor }}" switch-off-color="{{ grid.appScope.radioSwitch.offColor }}" switch-animate="{{ grid.appScope.radioSwitch.animate }}" switch-size="{{ grid.appScope.radioSwitch.size }}" switch-label="{{ grid.appScope.radioSwitch.label }}" switch-icon="{{ grid.appScope.radioSwitch.icon }}" switch-radio-off="{{ grid.appScope.radioSwitch.radioOff }}" switch-label-width="{{ grid.appScope.radioSwitch.labelWidth }}" switch-handle-width="{{ grid.appScope.radioSwitch.handleWidth }}"></div>',enableFiltering:!1}],data:[],gridMenuTitleFilter:function(a){var c=g.defer();return c.resolve(b.instant(a)),c.promise},onRegisterApi:function(b){a.gridApi=b}},j()},a.updateItem=function(c){return e.update({id:c.id},{assigned:c.assigned,lastAssignedTo:c.assigned?a.agent.name:void 0}).$promise.then(function(){d.show(b.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){d.error(a)})};a.$on("$destroy",function(){c.unsyncUpdates("report_queue")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.abandoned",{url:"/abandoned",templateUrl:"app/channels/voice/realtime/view/abandoned/abandoned.html",controller:"VoiceRealtimeViewAbandonedCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","VoiceQueue","usSpinnerService","$q","uiGridConstants","Auth","$timeout",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){function p(){return k.spin("grid-spinner"),g.get(u).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){r(a)})})["catch"](function(a){f.error(a)})["finally"](function(){k.stop("grid-spinner")})}function q(){e.socket.on("agent:save",function(b){b=b.newValues||b;var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});c&&(c.online=_.has(b,"online")?b.online:c.online,c.lastLoginAt=_.has(b,"lastLoginAt")?b.lastLoginAt:c.lastLoginAt,c.pause=_.has(b,"voicePause")?b.voicePause:c.pause,c.pauseType=_.has(b,"pauseType")?b.pauseType:c.pauseType,c.lastPauseAt=_.has(b,"lastPauseAt")?b.lastPauseAt:c.lastPauseAt,c.status=_.has(b,"status")?b.status:c.status,c.statusAt=_.has(b,"statusAt")?b.statusAt:c.statusAt,c.queueStatus=_.has(b,"queueStatus")?b.queueStatus:c.queueStatus,c.queueStatusAt=_.has(b,"queueStatusAt")?b.queueStatusAt:c.queueStatusAt,c.lastQueue=_.has(b,"lastQueue")?b.lastQueue:c.lastQueue,c.ipaddr=_.has(b,"ipaddr")?b.ipaddr:c.ipaddr,c.port=_.has(b,"port")?b.port:c.port,c.fullcontact=_.has(b,"fullcontact")?b.fullcontact:c.fullcontact,c.useragent=_.has(b,"useragent")?b.useragent:c.useragent,c.lastms=_.has(b,"lastms")?b.lastms:c.lastms,c.internal=_.has(b,"internal")?b.internal:c.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=_.has(b,"online")?b.online:a.online)}))}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_voice_queue:save",function(b){var c=_.includes(_.map(a.CurrentUser.PVoiceQueues,"name"),b.queue)||n.isAdmin(),d=_.find(a.gridOptions.data,{agentId:b.UserId,queue:b.queue});if(!d&&b.logged&&c){var e=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0}),f=a.gridOptions.data.indexOf(e);a.gridOptions.data.splice(f+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,agent:b.membername,callstaken:b.callstaken?b.callstaken:0,online:e.online})}else d&&!b.logged?_.remove(a.gridOptions.data,{agentId:b.UserId,queue:b.queue}):d&&b.logged&&c&&(d.callstaken=b.callstaken?b.callstaken:0)}),e.socket.on("user_has_voice_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queue:b.queue})})}function r(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.voicePause,pauseType:b.pauseType,status:b.status||"UNKNOWN",statusAt:b.statusAt,queueStatus:b.queueStatus||"READY",queueStatusAt:b.queueStatusAt,lastQueue:b.lastQueue,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.VoiceQueues.forEach(function(c){c.UserHasVoiceQueue.logged&&a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,agent:b.name,callstaken:c.UserHasVoiceQueue.callstaken?c.UserHasVoiceQueue.callstaken:0,online:b.online})})}function s(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.error(a)})}function t(){return j.get().$promise.then(function(b){a.voiceQueues=b.rows,e.syncUpdates("voice_queue",a.voiceQueues)})["catch"](function(a){f.error(a)})}a.voiceQueues=[];var u={controller:"realtime",controller1:"voice",offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="fa" data-ng-class="{\'font-green\':row.entity.online, \'font-red\':!row.entity.online,\'fa-user\':row.entity.online,\'fa-user-times\':!row.entity.online}"></i> <span data-ng-if="row.entity.online" class="left-margin">(<css-timer start-time="row.entity.lastLoginAt"></css-timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"status",displayName:"APPLICATION_PHONE_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div data-ng-if=\"row.entity.isAgent\">{{'APPLICATION_'+row.entity.status | translate}} <span data-ng-if=\"row.entity.statusAt && (row.entity.status === 'BUSY' || row.entity.status === 'ONHOLD' || row.entity.status === 'INUSE')\">(<css-timer start-time=\"row.entity.statusAt\"></css-timer>)</span></span></div>",filter:{type:m.filter.SELECT,selectOptions:[{value:"UNKNOWN",label:d.instant("APPLICATION_UNKNOWN")},{value:"NOT_INUSE",label:d.instant("APPLICATION_NOT_INUSE")},{value:"INUSE",label:d.instant("APPLICATION_INUSE")},{value:"BUSY",label:d.instant("APPLICATION_BUSY")},{value:"INVALID",label:d.instant("APPLICATION_INVALID")},{value:"UNAVAILABLE",label:d.instant("APPLICATION_UNAVAILABLE")},{value:"RINGING",label:d.instant("APPLICATION_RINGING")},{value:"RINGINUSE",label:d.instant("APPLICATION_RINGINUSE")},{value:"ONHOLD",label:d.instant("APPLICATION_ONHOLD")}]}},{name:"queueStatus",displayName:"APPLICATION_QUEUE_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><span class="left-margin"><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="fa fa-play font-green pointer-cursor" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="fa fa-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i></span><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select><span> {{\'APPLICATION_\'+row.entity.queueStatus.toUpperCase() | translate}}</span><span data-ng-if="(row.entity.queueStatus!==\'complete\' && (row.entity.queueStatus!==\'paused\' || row.entity.pauseType === \'ACW\'))"> [{{row.entity.lastQueue}}]</span><span data-ng-if="row.entity.pause"> [{{row.entity.pauseType}}]</span><span data-ng-if="row.entity.queueStatusAt && row.entity.queueStatus!==\'complete\'">[<css-timer start-time="row.entity.lastPauseAt"></css-timer>]</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"paused",label:d.instant("APPLICATION_PAUSED")},{value:"connect",label:d.instant("APPLICATION_CONNECT")},{value:"complete",label:d.instant("APPLICATION_COMPLETE")},{value:"called",label:d.instant("APPLICATION_CALLED")}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"callstaken",displayName:"APPLICATION_CALLS_TAKEN",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.callstaken !== null">{{row.entity.callstaken}}</div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1,width:100},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queue" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queue)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.voiceQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button> <button data-ng-if="row.entity.isAgent" class="btn btn-xs blue-madison" data-ng-click="grid.appScope.showInfo(row.entity)"><i class="icon-info"></i></button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){v(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){v(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){v(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?u.order=null:u.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),p()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){u.offset=(a-1)*b,u.limit=b,p()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?u[a.name]=a.filters[0].term:delete u[a.name]}),p()})}},p(),s(),t(),o(function(){q()})};var v=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_voice_queue")}),a.pause=function(b,c,e){return e&&(a.pauseType=null),i.save({name:c,agent:b,type:e||"DEFAULT PAUSE",data4:e||"DEFAULT PAUSE",channel:"voice"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/voice/realtime/view/agent/queue.modal.add.html",controller:"VoiceRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.voiceQueues,function(b){return!!_.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})})}}});g.result.then(function(a){return i.save({name:"QueueAdd",agent:e,queues:a.queues,channel:"voice",data1:e,data3:a.queues.join(","),data4:"voice"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queue:b,channel:"voice",data1:a,data3:b,data4:"voice"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/voice/realtime/view/agent/agent.modal.info.html",controller:"VoiceRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/voice/realtime/view/agent/agent.html",controller:"VoiceRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","agent",function(a,b,c){a.agent=c,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewOutboundCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","ReportDial","Pause","Action","usSpinnerService","$q","uiGridConstants","$timeout","Auth",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){function o(){return j.spin("spinner-grid"),g.get({controller:"active",controller2:"calls"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){p(),j.stop("spinner-grid")})}function p(){e.socket.on("report_dial:save",function(b){a.gridOptions.data.unshift(b)}),e.socket.on("report_dial:update",function(b){var c=_.find(a.gridOptions.data,{id:b.id});c&&(_.merge(c,b),!b.endtime||b.answertime&&b.answertime==b.endtime||m(function(){_.remove(a.gridOptions.data,{id:b.id})},1e4))})}a.moment=moment,a.initDials=function(){a.gridOptions={paginationPageSizes:[10,25,50,75],paginationPageSize:10,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"uniqueid",displayName:"APPLICATION_UNIQUEID",headerCellFilter:"translate",cellClass:"text-center"},{name:"agent",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.channel.split('/')[1].split('-')[0]}}</div>"},{name:"calleridnum",displayName:"APPLICATION_CALLERID",headerCellFilter:"translate",cellClass:"text-center"},{name:"dialstring",cellClass:"text-center"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.endtime">{{\'APPLICATION_RINGING\' | translate}}</span><span data-ng-if="row.entity.answertime && row.entity.answertime == row.entity.endtime">{{\'APPLICATION_TALKING\' | translate}}</span><span data-ng-if="row.entity.answertime && row.entity.answertime != row.entity.endtime">{{\'APPLICATION_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.endtime && !row.entity.answertime">{{\'APPLICATION_\'+row.entity.dialstatus | translate}}</span><span data-ng-if="(!row.entity.endtime && !row.entity.answertime) || (row.entity.answertime && row.entity.answertime == row.entity.endtime)"> [<css-timer start-time="row.entity.updatedAt"></css-timer>]</div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1}],data:[],gridMenuTitleFilter:function(a){var b=k.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){q(a.gridOptions.data.length)})}},o()};var q=function(a){var b=a?30*a+100:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("report_dial")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.outbound",{url:"/outbound",templateUrl:"app/channels/voice/realtime/view/outbound/outbound.html",controller:"VoiceRealtimeViewOutboundCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewParameterCtrl",["$scope","$translate","Dashboard","VoiceQueue","Auth","socket","uiGridConstants",function(a,b,c,d,e,f,g){function h(a){var b=a?30*a+150:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")}function i(b){var c=_.find(a.gridOptions.data,{name:b.name});c&&(_.merge(c,b),a.$apply())}var j={offset:0,limit:10};a.initParameters=function(){var b;switch(a.user=e.getCurrentUser(),a.$on("$destroy",function(){b&&(b.terminate(),f.socket.removeAllListeners("dashboard:voice:init"),f.socket.removeAllListeners("dashboard:voice:waiting"),f.socket.removeAllListeners("dashboard:voice:active"),f.socket.removeAllListeners("dashboard:voice:complete"),f.socket.removeAllListeners("dashboard:voice:abandon"),f.socket.removeAllListeners("dashboard:voice:unmanaged"),f.socket.removeAllListeners("dashboard:voice:holdtime"),f.socket.removeAllListeners("dashboard:voice:talktime"))}),a.user.role){case"admin":c.get({id:"voice",controller:"init"}).$promise.then(function(b){for(var c in b.queues)b.queues[c].waiting=b.queues[c].waiting||0,b.queues[c].active=b.queues[c].active||0,b.queues[c].complete=b.queues[c].complete||0,b.queues[c].abandon=b.queues[c].abandon||0,b.queues[c].unmanaged=b.queues[c].unmanaged||0,b.queues[c].holdtime=b.queues[c].holdtime||0,b.queues[c].talktime=b.queues[c].talktime||0,a.gridOptions.data.push(b.queues[c])})["catch"](function(a){console.error(a)});break;case"user":c.get({id:"voice",controller:"init"}).$promise.then(function(b){for(var c in b.queues){var d=_.find(a.user.PVoiceQueues,{name:c});d&&(b.queues[c].waiting=b.queues[c].waiting||0,b.queues[c].active=b.queues[c].active||0,b.queues[c].complete=b.queues[c].complete||0,b.queues[c].abandon=b.queues[c].abandon||0,b.queues[c].unmanaged=b.queues[c].unmanaged||0,b.queues[c].holdtime=b.queues[c].holdtime||0,b.queues[c].talktime=b.queues[c].talktime||0,a.gridOptions.data.push(b.queues[c]))}})["catch"](function(a){console.error(a)})}f.socket.on("dashboard:voice:waiting",function(a){i(a)}),f.socket.on("dashboard:voice:active",function(a){i(a)}),f.socket.on("dashboard:voice:complete",function(a){i(a)}),f.socket.on("dashboard:voice:abandon",function(a){i(a)}),f.socket.on("dashboard:voice:unmanaged",function(a){i(a)}),f.socket.on("dashboard:voice:talktime",function(a){i(a)}),f.socket.on("dashboard:voice:holdtime",function(a){i(a)})},a.gridOptions={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,enableSorting:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,columnDefs:[{name:"name",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter"},{name:"waiting",displayName:"APPLICATION_WAITING",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"active",displayName:"APPLICATION_ACTIVE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"complete",displayName:"APPLICATION_ANSWERED",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableColumnMenu:!1,filters:[{condition:g.filter.GREATER_THAN_OR_EQUAL,placeholder:"from"},{condition:g.filter.LESS_THAN_OR_EQUAL,placeholder:"to"}]},{name:"abandon",displayName:"APPLICATION_ABANDONED",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableColumnMenu:!1,filters:[{condition:g.filter.GREATER_THAN_OR_EQUAL,placeholder:"from"},{condition:g.filter.LESS_THAN_OR_EQUAL,placeholder:"to"}]},{name:"unmanaged",displayName:"APPLICATION_UNMANAGED",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableColumnMenu:!1,filters:[{condition:g.filter.GREATER_THAN_OR_EQUAL,placeholder:"from"},{condition:g.filter.LESS_THAN_OR_EQUAL,placeholder:"to"}]},{name:"holdtime",displayName:"APPLICATION_HOLDTIME",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.holdtime | secToTime | date:'HH:mm:ss'}}</div>",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"talktime",displayName:"APPLICATION_TALKTIME",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.talktime | secToTime | date:'HH:mm:ss'}}</div>",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"totalCalls",displayName:"APPLICATION_TOTAL_CALLS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.complete + row.entity.abandon + row.entity.unmanaged}}</div>",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],onRegisterApi:function(b){a.gridApi=b,a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?j.order=null:j.order=b[0].name+" "+b[0].sort.direction.toUpperCase()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){h(b),j.offset=(a-1)*b,j.limit=b}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters.length>1?a.filters.forEach(function(b){b.term?64===b.condition?j[a.name+"_uiFrom"]=b.term:256===b.condition&&(j[a.name+"_uiTo"]=b.term):64===b.condition?delete j[a.name+"_uiFrom"]:256===b.condition&&delete j[a.name+"_uiTo"]}):a.filters.length&&a.filters[0].term?j[a.name]=a.filters[0].term:delete j[a.name]})})}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.parameters",{url:"/parameters",templateUrl:"app/channels/voice/realtime/view/parameter/parameter.html",controller:"VoiceRealtimeViewParameterCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewQueueCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","VoiceQueue","usSpinnerService","$q","uiGridConstants","Auth",function(a,b,c,d,e,f,g,h,i,j,k){function l(b){return h.spin("spinner-grid"),g.get(o).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){n(a)})})["catch"](function(a){f.error(a)})["finally"](function(){b&&m(),h.stop("spinner-grid")})}function m(){e.socket.on("voice_queue:save",function(b){var c=_.find(a.gridOptions.data,{
-queueName:b.name});c||l()}),e.socket.on("voice_queue:remove",function(b){_.remove(a.gridOptions.data,{queueId:b.id})}),e.socket.on("user_has_voice_queue:save",function(b){var c=_.find(a.gridOptions.data,{agentId:b.UserId,queue:b.queue});if(!c&&b.logged){var d=_.find(a.gridOptions.data,{queueName:b.queue}),e=a.gridOptions.data.indexOf(d);a.gridOptions.data.splice(e+1,0,{isAgent:!0,agent:b.membername,callstaken:b.callstaken?b.callstaken:0,lastcall:b.lastcall,status:b.statusdesc,paused:b.paused,reason:b.reason,agentId:b.UserId,queue:b.queue})}else c&&!b.logged?_.remove(a.gridOptions.data,{agentId:b.UserId,queue:b.queue}):c&&b.logged&&userHasQueue&&(c.callstaken=b.callstaken?b.callstaken:0,c.lastcall=b.lastcall,c.status=b.statusdesc,c.paused=b.paused,c.reason=b.reason)}),e.socket.on("user_has_voice_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queue:b.queue})})}function n(b){a.gridOptions.data.push({name:b.name,$$treeLevel:0,queueName:b.name}),b.Users.forEach(function(b){b.UserHasVoiceQueue.logged&&a.gridOptions.data.push({isAgent:!0,agent:b.UserHasVoiceQueue.membername,callstaken:b.UserHasVoiceQueue.callstaken?b.UserHasVoiceQueue.callstaken:0,lastcall:b.UserHasVoiceQueue.lastcall,status:b.UserHasVoiceQueue.statusdesc,paused:b.UserHasVoiceQueue.paused,reason:b.UserHasVoiceQueue.reason,agentId:b.UserHasVoiceQueue.UserId,queue:b.UserHasVoiceQueue.queue})})}var o={controller:"realtime",controller2:"voice",offset:0,limit:10};a.moment=moment,a.initQueues=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter"},{name:"agent",displayName:"APPLICATION_AGENT_NAME",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter"},{name:"callstaken",displayName:"APPLICATION_CALLS_TAKEN",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.callstaken}}</div>'},{name:"lastcall",displayName:"APPLICATION_LAST_CALL",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div data-ng-if=\"row.entity.isAgent\">{{row.entity.lastcall | date:'yyyy-MM-dd HH:mm:ss'}}</div>"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div data-ng-if=\"row.entity.isAgent\">{{'APPLICATION_'+row.entity.status | translate}}</div>"},{name:"paused",displayName:"APPLICATION_PAUSED",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div data-ng-if=\"row.entity.isAgent\">{{(row.entity.paused ? 'APPLICATION_YES' : 'APPLICATION_NO') | translate}}</div>"},{name:"reason",displayName:"APPLICATION_REASON",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent && row.entity.paused">{{row.entity.reason}}</div>'}],data:[],gridMenuTitleFilter:function(a){var b=i.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){p(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){p(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){p(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?o.order=null:o.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),l()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){o.offset=(a-1)*b,o.limit=b,l()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?o[a.name]=a.filters[0].term:delete o[a.name]}),l()})}},l(!0)};var p=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("voice_queue"),e.unsyncUpdates("user_has_voice_queue")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.queues",{url:"/queues",templateUrl:"app/channels/voice/realtime/view/queue/queue.html",controller:"VoiceRealtimeViewQueueCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewQueueCallsCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","ReportQueue","Pause","Action","usSpinnerService","$q","uiGridConstants","$timeout",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){return j.spin("spinner-grid"),g.get({controller:"waiting",controller2:"calls"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){o(),j.stop("spinner-grid")})}function o(){e.socket.on("report_queue:save",function(b){a.gridOptions.data.unshift(b)}),e.socket.on("report_queue:update",function(b){var c=_.find(a.gridOptions.data,{id:b.id});if(c){var d={queuecallerabandon:b.queuecallerabandon,queuecallerleave:b.queuecallerleave};delete b.queuecallerabandon,delete b.queuecallerleave,_.merge(c,b),d.queuecallerabandon&&(c.queuecallerabandon=d.queuecallerabandon),d.queuecallerleave&&(c.queuecallerleave=d.queuecallerleave),(c.queuecallerabandon||c.queuecallercomplete)&&m(function(){_.remove(a.gridOptions.data,{id:b.id})},3e3)}})}a.moment=moment,a.initQueues=function(){a.gridOptions={headerCellFilter:"translate",paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.queuecallerleaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.queuecallerleaveAt && !row.entity.queuecallerabandon && !row.entity.queuecallercomplete">{{\'APPLICATION_ACTIVE\' | translate}}</span><span data-ng-if="row.entity.queuecallerleaveAt && row.entity.queuecallerabandon">{{\'APPLICATION_QUEUESTATUS_ABANDON\' | translate}}</span><span data-ng-if="row.entity.queuecallerleaveAt && row.entity.queuecallercomplete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="!row.entity.queuecallercomplete && !row.entity.queuecallerabandon"> [<css-timer start-time="row.entity.updatedAt"></css-timer>]</div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"caller",displayName:"APPLICATION_CALLER",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.calleridnum || ''}} {{row.entity.calleridname || ''}}</div>",enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"position",displayName:"APPLICATION_POSITION",headerCellFilter:"translate"},{name:"lastAssignedTo",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1}],data:[],gridMenuTitleFilter:function(a){var b=k.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){p(a.gridOptions.data.length)})}},n()};var p=function(a){var b=a?30*a+100:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("report_queue")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.queuecalls",{url:"/queuecalls",templateUrl:"app/channels/voice/realtime/view/queuecalls/queuecalls.html",controller:"VoiceRealtimeViewQueueCallsCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewTelephoneCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Telephone","Pause","Action","usSpinnerService","$q","uiGridConstants","$timeout",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){return j.spin("spinner-grid"),g.get(p).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){j.stop("spinner-grid")})}function o(){e.socket.on("agent:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id});c&&(c.status=b.status,c.statusAt=b.statusAt,c.ipaddr=b.ipaddr,c.port=b.port,c.fullcontact=b.fullcontact,c.useragent=b.useragent,c.lastms=b.lastms,c.internal=b.internal)}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})}var p={offset:0,limit:10};a.moment=moment,a.initTelephones=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_TELEPHONE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.name}} &lt;{{row.entity.internal}}&gt;</div>"},{name:"status",displayName:"APPLICATION_PHONE_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{'APPLICATION_'+row.entity.status | translate}} <span data-ng-if=\"row.entity.statusAt && (row.entity.status === 'BUSY' || row.entity.status === 'ONHOLD' || row.entity.status === 'INUSE')\">(<css-timer start-time=\"row.entity.statusAt\"></css-timer>)</span></span></div>",filter:{type:l.filter.SELECT,selectOptions:[{value:"UNKNOWN",label:d.instant("APPLICATION_UNKNOWN")},{value:"NOT_INUSE",label:d.instant("APPLICATION_NOT_INUSE")},{value:"INUSE",label:d.instant("APPLICATION_INUSE")},{value:"BUSY",label:d.instant("APPLICATION_BUSY")},{value:"INVALID",label:d.instant("APPLICATION_INVALID")},{value:"UNAVAILABLE",label:d.instant("APPLICATION_UNAVAILABLE")},{value:"RINGING",label:d.instant("APPLICATION_RINGING")},{value:"RINGINUSE",label:d.instant("APPLICATION_RINGINUSE")},{value:"ONHOLD",label:d.instant("APPLICATION_ONHOLD")}]}},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button class="btn btn-xs blue-madison" data-ng-click="grid.appScope.showInfo(row.entity)"><i class="icon-info"></i></button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=k.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){q(a.gridOptions.data.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?p.order=null:p.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),n()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){p.offset=(a-1)*b,p.limit=b,n()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?p[a.name]=a.filters[0].term:delete p[a.name]}),n()})}},n(),m(function(){o()})};var q=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent")}),a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/voice/realtime/view/telephone/telephone.modal.info.html",controller:"VoiceRealtimeViewTelephoneInfoModalCtrl",resolve:{telephone:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.telephones",{url:"/telephones",templateUrl:"app/channels/voice/realtime/view/telephone/telephone.html",controller:"VoiceRealtimeViewTelephoneCtrl",data:{permissions:{only:["admin","user"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewTelephoneInfoModalCtrl",["$scope","$uibModalInstance","$http","telephone",function(a,b,c,d){a.telephone=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewCtrl",["$scope","Auth",function(a,b){a.Auth=b}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view",{url:"/view",templateUrl:"app/channels/voice/realtime/view/view.html",controller:"VoiceRealtimeViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceRecordingListCtrl",["$scope","$translate","$sce","Recording","gridOptions","xAlert","uiGridConstants","Auth",function(a,b,c,d,e,f,g,h){a.Recording=d,a.updateRating=function(a,c){return d.update({id:a,rating:c}).$promise.then(function(){f.show(b.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.initView=function(){var b={exporterCsvFilename:"recordings.csv",rowHeight:30,primaryKey:"id",columnDefs:[{name:"uniqueid"},{name:"customerPhone",displayName:"APPLICATION_CUSTOMER_PHONE",cellClass:"text-center ui-grid-vcenter"},{name:"membername"},{name:"type",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><i data-ng-class=\"{'icon-call-in font-green':row.entity.type === 'inbound','icon-call-out font-red':row.entity.type === 'outbound','icon-question':row.entity.type === 'unknown','icon-earphones font-purple':row.entity.type === 'internal'}\"></i></div>",filter:{type:g.filter.SELECT,selectOptions:[{value:"inbound",label:"Inbound"},{value:"internal",label:"Internal"},{value:"outbound",label:"Outbound"},{value:"unknown",label:"Unknown"}]}},{name:"queue"},{name:"createdAt",displayName:"APPLICATION_DATE",headerCellFilter:"translate",filterHeaderTemplate:'<div class="ui-grid-filter-container row"><div ng-repeat="colFilter in col.filters" class="col-md-6 col-md-offset-0 col-sm-5 col-sm-offset-0 col-xs-5 col-xs-offset-0"><div custom-grid-date-filter-header></div></div></div>',filters:[{name:"From",condition:g.filter.GREATER_THAN_OR_EQUAL},{name:"To",condition:g.filter.LESS_THAN_OR_EQUAL}],sort:{direction:g.DESC,priority:0}},{name:"rating",filter:{type:g.filter.SELECT,selectOptions:[{value:1,label:"1"},{value:2,label:"2"},{value:3,label:"3"},{value:4,label:"4"},{value:5,label:"5"}]},cellClass:"ui-grid-vcenter",width:"100",cellTemplate:'<div><uib-rating data-ng-model="row.entity.rating" data-ng-click="grid.appScope.updateRating(row.entity.id, row.entity.rating)" aria-labelledby="default-rating"></uib-rating></div>'},{name:"audio",displayName:"",width:100,enableSorting:!1,enableFiltering:!1,cellClass:"ui-grid-vcenter",cellTemplate:"<div><audio-file-download data-ng-if=\"row.entity.value.split('.').pop() == 'wav'\" params=\"{id:row.entity.id,controller:'stream'}\" resource=\"grid.appScope.Recording\"></audio-file-download><span data-ng-if=\"row.entity.value.split('.').pop() == 'gsm'\" title=\"{{'MESSAGE_GSM_PREVIEW_NOT_SUPPORTED' | translate}}\">{{'MESSAGE_GSM_PREVIEW_NOT_SUPPORTED' | translate}}</span></div>"},{name:"action",width:80,buttons:[{directive:"<motion-file-download params=\"{id:row.entity.id,controller:'stream'}\" resource=\"grid.appScope.Recording\" mimetype=\"'audio/'+row.entity.value.split('.').pop()\" btnclass=\"btn btn-xs blue-hoki\" filename=\"row.entity.uniqueid+'.'+row.entity.value.split('.').pop()\"></motion-file-download>"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.uniqueid, row.entity.id)",hide:!h.isAdmin()}]}]};a.gridOptions=e.gridOptions(d,b,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.recordings.list",{url:"/list",templateUrl:"app/channels/voice/recording/list/list.html",controller:"VoiceRecordingListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Recording",["$resource",function(a){return a("/api/voice/recordings/:id/:controller",{id:"@id"},{update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.recordings",{url:"/recordings",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:25}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.inbound",{url:"/inbound",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInboundListCreateCtrl",["$scope","$uibModalInstance","Route","application","xAlert","$location","$translate",function(a,b,c,d,e,f,g){a.$application=d.application,a.forms={route:void 0},a.item={type:"inbound",appdata:"Inbound Call",context:"from-voip-provider"},a.ok=function(){return a.item.exten=a.$application.checkUnderscore(a.item.exten),c.save(a.item).$promise.then(function(a){b.close(a),f.path("/channels/voice/routes/inbound/view/"+a.id+"/applications")})["catch"](function(a){console.log(a),e.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInboundListCtrl",["$scope","$http","socket","$translate","$rootScope","xAlert","Modal","stResource","gridOptions","Route","$uibModal","$location","$log",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.initView=function(){var b={exporterCsvFilename:"InboundRoutes.csv",columnDefs:[{name:"exten",displayName:"APPLICATION_PHONE_NUMBER"},{name:"description"},{name:"applications",cellClass:"ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.Applications.length"><span data-ng-repeat="app in row.entity.Applications | limitTo:2">{{app.app}}({{app.appdata[0]}}), </span>...</div><div data-ng-if="!row.entity.Applications.length">{{\'MESSAGE_NO_AVAILABLE_APPLICATIONS\' | translate}}</div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/voice/routes/inbound/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.exten, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(j,b,a,{type:"inbound"})},a.create=function(){k.open({animation:!0,templateUrl:"app/channels/voice/route/inbound/list/create.modal.html",controller:"VoiceRouteInboundListCreateCtrl"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.inbound.list",{url:"/list",templateUrl:"app/channels/voice/route/inbound/list/list.html",controller:"VoiceRouteInboundListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInboundViewCtrl",["$scope","$translate","$stateParams","socket","$location","WizardHandler","Modal","xAlert","application","interval","Route","VoiceQueue","Sound","SquareProject","VoiceContext","Interval","VoiceMail","User","Agent","Telephone","Trunk","Team",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v){function w(b){var c,d;if("always"===b.intType)c=null,d="*,*,*,*";else if("list"===b.intType)d=b.IntervalId?_.find(a.Intervals,{id:b.IntervalId}).name:"*,*,*,*",c=b.IntervalId||null;else if("custom"===b.intType){c=null;var e,f,g,h;e=b.t_from&&b.t_to&&!b.alwaysTime?moment(b.t_from).format("HH:mm")+"-"+moment(b.t_to).format("HH:mm"):"*",b.wd_from&&"always"!==b.wd_from?(f=b.wd_from,b.wd_to&&"always"!==b.wd_to&&(f+="-"+b.wd_to)):f="*",b.md_from&&"always"!==b.md_from?(g=b.md_from,b.md_to&&"always"!==b.md_to&&(g+="-"+b.md_to)):g="*",b.m_from&&"always"!==b.m_from?(h=b.m_from,b.m_to&&"always"!==b.m_to&&(h+="-"+b.m_to)):h="*",d=e+","+f+","+g+","+h}void 0===a.selectedApp?(a.application.interval=d,a.application.IntervalId=c):(a.route.Applications[a.selectedApp].interval=d,a.route.Applications[a.selectedApp].IntervalId=c)}function x(){if(a.interval.intType=a.route.Applications[a.selectedApp].IntervalId?"list":"*,*,*,*"===a.route.Applications[a.selectedApp].interval?"always":"custom",a.interval.IntervalId=a.route.Applications[a.selectedApp].IntervalId,!a.route.Applications[a.selectedApp].IntervalId){var b,c=a.route.Applications[a.selectedApp].interval?a.route.Applications[a.selectedApp].interval.split(","):["*","*","*","*"];c.forEach(function(c,d){switch(d){case 0:"*"!==c?(b=c.split("-"),a.interval.t_from=moment(b[0],"HH:mm"),a.interval.t_to=moment(b[1],"HH:mm"),a.interval.alwaysTime=!1):(a.interval.t_from=moment(new Date),a.interval.t_to=moment(new Date),a.interval.alwaysTime=!0);break;case 1:"*"!==c?(b=c.split("-"),a.interval.wd_from=b[0],a.interval.wd_to=b[1]?b[1]:"always"):(a.interval.wd_from="always",a.interval.wd_to="always");break;case 2:"*"!==c?(b=c.split("-"),a.interval.md_from=b[0],a.interval.md_to=b[1]?b[1]:"always"):(a.interval.md_from="always",a.interval.md_to="always");break;case 3:"*"!==c?(b=c.split("-"),a.interval.m_from=b[0],a.interval.m_to=b[1]?b[1]:"always"):(a.interval.m_from="always",a.interval.m_to="always")}})}}a.alwaysSwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.$translate=b,a.selectedApp=void 0,a.showGrid=!0,a.$application=i.application,a.$interval=j.interval,a.selectedRows=[],a._=_,a.gridOptions={enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableSorting:!1,rowTemplate:'<div grid="grid" class="ui-grid-draggable-row" draggable="true"><div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ng-class="{ \'ui-grid-row-header-cell\': col.isRowHeader, \'custom\': true }" ui-grid-cell></div></div>',columnDefs:[{name:"app",headerCellFilter:"translate",displayName:"APPLICATION_APPLICATION",enableColumnMenu:!1},{name:"appType",headerCellFilter:"translate",displayName:"APPLICATION_INFO",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{'APPLICATION_APPS_'+(row.entity.appType || (grid.appScope._.find(grid.appScope.$application.applications,{value:row.entity.app}) ? row.entity.app : 'custom')).toUpperCase() | translate}}</div>",enableColumnMenu:!1},{name:"appdata",headerCellFilter:"translate",displayName:"APPLICATION_ARGUMENTS",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{row.entity.appdata.join(',')}}</div>",enableColumnMenu:!1},{name:"interval",headerCellFilter:"translate",displayName:"APPLICATION_TIME_INTERVAL",enableColumnMenu:!1},{name:"action",enableColumnMenu:!1,headerCellFilter:"translate",displayName:"APPLICATION_ACTION",width:125,cellClass:"ui-grid-vcenter",cellTemplate:'<div><a class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.openApplication(grid.appScope.gridOptions.data.indexOf(row.entity))"><i class="icon-settings"></i></a><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteApp(row.entity.app+\' application\', grid.appScope.gridOptions.data.indexOf(row.entity))"><i class="fa fa-trash"></i></a></div>'}],onRegisterApi:function(b){b.selection.on.rowSelectionChanged(a,function(b){b.isSelected?a.selectedRows.push(b.entity):_.pull(a.selectedRows,b.entity)}),b.selection.on.rowSelectionChangedBatch(a,function(b){b[0].isSelected?a.selectedRows=_.map(b,"entity"):a.selectedRows=[]}),b.draggableRows.on.rowDropped(a,function(b,c){a.updateRoute()}),b.grid.registerDataChangeCallback(function(){y(a.gridOptions.data.length)})}};var y=function(a){var b=a?30*a+120:177;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px")};a.initApplication=function(b){b&&(a.selectedApp=void 0),a.forms={settings:void 0,interval:void 0},a.application={},a.interval={intType:"always",t_from:moment(new Date),t_to:moment(new Date),wd_from:"always",wd_to:"always",md_from:"always",md_to:"always",m_from:"always",m_to:"always",alwaysTime:!0},a.main={app:""}},a.$watch("interval",function(a){a&&w(a)},!0),a.updateSetAppdata=function(){a.application.variable&&a.application.value&&"Set"===a.main.app.value?a.application.appdata[0]=a.application.variable+"="+a.application.value:a.application.appdata[0]=null},a.updateSetAppdataSettings=function(){a.application.variable&&a.application.value&&"Set"===a.main.app.value?a.route.Applications[a.selectedApp].appdata[0]=a.application.variable+"="+a.application.value:a.route.Applications[a.selectedApp].appdata[0]=null},a.$watch("main.app",function(b){if(b){var c,d,e={},f={};switch(void 0===a.selectedApp&&(a.application={appType:b.type,app:b.value,interval:a.application.interval||"*,*,*,*",appdata:[]}),b.value){case"Queue":c=l,d=m;break;case"Playback":c=m;break;case"AGI":c=n;break;case"Goto":c=o;break;case"Voicemail":c=q;break;case"Dial":switch(b.type){case"internalDial":c=r,e={controller:"all"};break;case"externalDial":c=u}}if(c)return c.get(e).$promise.then(function(b){a.items=b.rows}).then(function(){return d?d.get(f).$promise:void 0}).then(function(b){b&&(a.items2=b.rows)})["catch"](function(a){h.error(a)})}},!0),a.deselectAndRedirect=function(b){a.selectedApp=void 0,e.path(b)},a.initRingGroup=function(){var b,c,d;return void 0===a.selectedApp?a.usersArray=[]:a.usersArray=_.map(a.route.Applications[a.selectedApp].appdata[0].split("&"),function(a){return a.split("/")[1]}),r.get().$promise.then(function(a){return b=a,s.get().$promise}).then(function(a){return c=a,t.get().$promise}).then(function(e){d=e,ComponentsDropdowns.bindUserByRole(b,c,d,function(b){a.usersArray=_.union(b,a.usersArray),void 0===a.selectedApp?(a.application.appdata[0]=null,a.application.appdata[0]=_.map(a.usersArray,function(a){return"SIP/"+a}).join("&")):(a.route.Applications[a.selectedApp].appdata[0]=null,a.route.Applications[a.selectedApp].appdata[0]=_.map(a.usersArray,function(a){return"SIP/"+a}).join("&"))},function(b){a.usersArray=_.difference(a.usersArray,b),void 0===a.selectedApp?(a.application.appdata[0]=null,a.application.appdata[0]=_.map(a.usersArray,function(a){return"SIP/"+a}).join("&")):(a.route.Applications[a.selectedApp].appdata[0]=null,a.route.Applications[a.selectedApp].appdata[0]=_.map(a.usersArray,function(a){return"SIP/"+a}).join("&"))},a.route.Applications[a.selectedApp]?a.route.Applications[a.selectedApp].appdata:null)})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return p.get().$promise.then(function(b){a.Intervals=b.rows,d.syncUpdates("interval",a.Intervals)})["catch"](function(a){h.error(a)})},a.getRoute=function(){return k.get({id:c.id}).$promise.then(function(b){a.route=b,a.gridOptions.data=b.Applications,y(a.gridOptions.data.length)})["catch"](function(a){e.path("/channels/voice/routes/inbound/list")})},a.getApplication=function(){if(void 0===a.selectedApp)e.path("/channels/voice/routes/inbound/list");else{if(a.showGrid=!0,a.route.Applications[a.selectedApp].appType)a.main.app=_.find(a.$application.applications,{type:a.route.Applications[a.selectedApp].appType});else{var b=_.find(a.$application.applications,{value:a.route.Applications[a.selectedApp].app});if(b)a.main.app=b;else{a.main.app=_.find(a.$application.applications,{type:"custom"});var c=a.route.Applications[a.selectedApp].appdata.join(",");a.route.Applications[a.selectedApp].appdata=[c],a.route.Applications[a.selectedApp].appType="custom"}}if("Set"===a.main.app.value){var d=a.route.Applications[a.selectedApp].appdata[0].split("=");a.application.variable=d[0],a.application.value=d[1]}x()}},a.openApplication=function(b){a.selectedApp=b,a.showGrid=!1,e.path("/channels/voice/routes/inbound/view/"+c.id+"/applications/settings")},a.updateRoute=function(d){return a.route.exten=a.$application.checkUnderscore(a.route.exten),_.forEach(a.route.Applications,function(a){if("custom"!==a.appType)switch(a.app){case"Dial":var b;switch(a.appType){case"externalDial":b=3;break;case"internalDial":b=2;break;default:b=2}a.appdata[b]=a.appdata[b]||"",a.appdata[b]+=(_.includes(a.appdata[b],"x")?"":"x")+(_.includes(a.appdata[b],"X")?"":"X");break;case"Queue":a.appdata[1]=a.appdata[1]||"",a.appdata[1]+=(_.includes(a.appdata[1],"x")?"":"x")+(_.includes(a.appdata[1],"X")?"":"X")}}),k.update({id:a.route.id},a.route).$promise.then(function(f){a.selectedApp=void 0,h.show(b.instant("MESSAGE_WELL_DONE")+"!","success"),d&&e.path("/channels/voice/routes/inbound/view/"+c.id+"/"+d)})["catch"](function(a){console.log(a),h.error(a)})},a.getContexts=function(){return o.get().$promise.then(function(b){a.voiceContexts=b.rows,d.syncUpdates("voice_context",a.voiceContexts)})["catch"](function(a){h.error(a)})},a.deleteApp=g.confirm["delete"](function(b){a.route.Applications.splice(b,1),a.updateRoute()}),a.deleteItems=g.confirm["delete"](function(){_.remove(a.route.Applications,function(b){return _.includes(a.selectedRows,b)}),a.selectedRows=[],a.updateRoute()}),a.addApplication=function(){a.route.Applications.push(a.application),a.updateRoute("applications")},a.goNext=function(){f.wizard().next()},a.previous=function(){f.wizard().previous()},a.formValidation=function(a){return a},a.$on("destroy",function(){d.unsyncUpdates("voice_extension")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.inbound.view",{url:"/view/:id",templateUrl:"app/channels/voice/route/inbound/view/view.html",controller:"VoiceRouteInboundViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.routes.inbound.view.settings",{url:"/settings",templateUrl:"app/channels/voice/route/inbound/view/view.settings.html"}).state("main.channels.voice.routes.inbound.view.applications",{url:"/applications",templateUrl:"app/channels/voice/route/inbound/view/view.applications.html"}).state("main.channels.voice.routes.inbound.view.application",{url:"/application",templateUrl:"app/channels/voice/route/view.application.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}}).state("main.channels.voice.routes.inbound.view.applications.settings",{url:"/settings",templateUrl:"app/channels/voice/route/view.applicationSettings.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.internal",{url:"/internal",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInternalListCreateCtrl",["$scope","$uibModalInstance","Route","application","$location","$translate","xAlert",function(a,b,c,d,e,f,g){a.$application=d.application,a.forms={route:void 0},a.item={type:"internal",appdata:"Internal Call",context:"from-sip"},a.ok=function(){return a.item.exten=a.$application.checkUnderscore(a.item.exten),c.save(a.item).$promise.then(function(a){b.close(a),e.path("/channels/voice/routes/internal/view/"+a.id+"/applications")})["catch"](function(a){
-g.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInternalListCtrl",["$scope","$http","socket","$translate","$rootScope","xAlert","Modal","stResource","gridOptions","Route","$uibModal","$location","$log",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.initView=function(){var b={exporterCsvFilename:"InternalRoutes.csv",columnDefs:[{name:"exten",displayName:"APPLICATION_PHONE_NUMBER"},{name:"description"},{name:"applications",cellClass:"ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.Applications.length"><span data-ng-repeat="app in row.entity.Applications | limitTo:2">{{app.app}}({{app.appdata[0]}}),</span>...</div><div data-ng-if="!row.entity.Applications.length">{{\'MESSAGE_NO_AVAILABLE_APPLICATIONS\' | translate}}</div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/voice/routes/internal/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.exten, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(j,b,a,{type:"internal"})},a.create=function(){k.open({animation:!0,templateUrl:"app/channels/voice/route/internal/list/create.modal.html",controller:"VoiceRouteInternalListCreateCtrl"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.internal.list",{url:"/list",templateUrl:"app/channels/voice/route/internal/list/list.html",controller:"VoiceRouteInternalListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInternalViewCtrl",["$scope","$translate","$stateParams","socket","$location","WizardHandler","Modal","xAlert","application","interval","Route","VoiceQueue","Sound","SquareProject","VoiceContext","Interval","VoiceMail","User","Agent","Telephone","Trunk",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){function v(b){var c,d;if("always"===b.intType)c=null,d="*,*,*,*";else if("list"===b.intType)d=b.IntervalId?_.find(a.Intervals,{id:b.IntervalId}).name:"*,*,*,*",c=b.IntervalId||null;else if("custom"===b.intType){c=null;var e,f,g,h;e=b.t_from&&b.t_to&&!b.alwaysTime?moment(b.t_from).format("HH:mm")+"-"+moment(b.t_to).format("HH:mm"):"*",b.wd_from&&"always"!==b.wd_from?(f=b.wd_from,b.wd_to&&"always"!==b.wd_to&&(f+="-"+b.wd_to)):f="*",b.md_from&&"always"!==b.md_from?(g=b.md_from,b.md_to&&"always"!==b.md_to&&(g+="-"+b.md_to)):g="*",b.m_from&&"always"!==b.m_from?(h=b.m_from,b.m_to&&"always"!==b.m_to&&(h+="-"+b.m_to)):h="*",d=e+","+f+","+g+","+h}void 0===a.selectedApp?(a.application.interval=d,a.application.IntervalId=c):(a.route.Applications[a.selectedApp].interval=d,a.route.Applications[a.selectedApp].IntervalId=c)}function w(){if(a.interval.intType=a.route.Applications[a.selectedApp].IntervalId?"list":"*,*,*,*"===a.route.Applications[a.selectedApp].interval?"always":"custom",a.interval.IntervalId=a.route.Applications[a.selectedApp].IntervalId,!a.route.Applications[a.selectedApp].IntervalId){var b,c=a.route.Applications[a.selectedApp].interval?a.route.Applications[a.selectedApp].interval.split(","):["*","*","*","*"];c.forEach(function(c,d){switch(d){case 0:"*"!==c?(b=c.split("-"),a.interval.t_from=moment(b[0],"HH:mm"),a.interval.t_to=moment(b[1],"HH:mm"),a.interval.alwaysTime=!1):(a.interval.t_from=moment(new Date),a.interval.t_to=moment(new Date),a.interval.alwaysTime=!0);break;case 1:"*"!==c?(b=c.split("-"),a.interval.wd_from=b[0],a.interval.wd_to=b[1]?b[1]:"always"):(a.interval.wd_from="always",a.interval.wd_to="always");break;case 2:"*"!==c?(b=c.split("-"),a.interval.md_from=b[0],a.interval.md_to=b[1]?b[1]:"always"):(a.interval.md_from="always",a.interval.md_to="always");break;case 3:"*"!==c?(b=c.split("-"),a.interval.m_from=b[0],a.interval.m_to=b[1]?b[1]:"always"):(a.interval.m_from="always",a.interval.m_to="always")}})}}a.alwaysSwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.$translate=b,a.selectedApp=void 0,a.showGrid=!0,a.$application=i.application,a.$interval=j.interval,a._=_,a.selectedRows=[],a.gridOptions={enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableSorting:!1,rowTemplate:'<div grid="grid" class="ui-grid-draggable-row" draggable="true"><div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ng-class="{ \'ui-grid-row-header-cell\': col.isRowHeader, \'custom\': true }" ui-grid-cell></div></div>',columnDefs:[{name:"app",headerCellFilter:"translate",displayName:"APPLICATION_APPLICATION",enableColumnMenu:!1},{name:"appType",headerCellFilter:"translate",displayName:"APPLICATION_INFO",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{'APPLICATION_APPS_'+(row.entity.appType || (grid.appScope._.find(grid.appScope.$application.applications,{value:row.entity.app}) ? row.entity.app : 'custom')).toUpperCase() | translate}}</div>",enableColumnMenu:!1},{name:"appdata",headerCellFilter:"translate",displayName:"APPLICATION_ARGUMENTS",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{row.entity.appdata.join(',')}}</div>",enableColumnMenu:!1},{name:"interval",headerCellFilter:"translate",displayName:"APPLICATION_TIME_INTERVAL",enableColumnMenu:!1},{name:"action",enableColumnMenu:!1,headerCellFilter:"translate",displayName:"APPLICATION_ACTION",width:125,cellClass:"ui-grid-vcenter",cellTemplate:'<div><a class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.openApplication(grid.appScope.gridOptions.data.indexOf(row.entity))"><i class="icon-settings"></i></a><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteApp(row.entity.app+\' application\', grid.appScope.gridOptions.data.indexOf(row.entity))"><i class="fa fa-trash"></i></a></div>'}],onRegisterApi:function(b){b.selection.on.rowSelectionChanged(a,function(b){b.isSelected?a.selectedRows.push(b.entity):_.pull(a.selectedRows,b.entity)}),b.selection.on.rowSelectionChangedBatch(a,function(b){b[0].isSelected?a.selectedRows=_.map(b,"entity"):a.selectedRows=[]}),b.draggableRows.on.rowDropped(a,function(b,c){a.updateRoute()}),b.grid.registerDataChangeCallback(function(){x(a.gridOptions.data.length)})}},a.deleteItems=g.confirm["delete"](function(){_.remove(a.route.Applications,function(b){return _.includes(a.selectedRows,b)}),a.selectedRows=[],a.updateRoute()}),a.initRingGroup=function(){var b,c,d;return void 0===a.selectedApp?a.usersArray=[]:a.usersArray=_.map(a.route.Applications[a.selectedApp].appdata[0].split("&"),function(a){return a.split("/")[1]}),r.get().$promise.then(function(a){return b=a,s.get().$promise}).then(function(a){return c=a,t.get().$promise}).then(function(e){d=e,ComponentsDropdowns.bindUserByRole(b,c,d,function(b){a.usersArray=_.union(b,a.usersArray),void 0===a.selectedApp?(a.application.appdata[0]=null,a.application.appdata[0]=_.map(a.usersArray,function(a){return"SIP/"+a}).join("&")):(a.route.Applications[a.selectedApp].appdata[0]=null,a.route.Applications[a.selectedApp].appdata[0]=_.map(a.usersArray,function(a){return"SIP/"+a}).join("&"))},function(b){a.usersArray=_.difference(a.usersArray,b),void 0===a.selectedApp?(a.application.appdata[0]=null,a.application.appdata[0]=_.map(a.usersArray,function(a){return"SIP/"+a}).join("&")):(a.route.Applications[a.selectedApp].appdata[0]=null,a.route.Applications[a.selectedApp].appdata[0]=_.map(a.usersArray,function(a){return"SIP/"+a}).join("&"))},a.route.Applications[a.selectedApp]?a.route.Applications[a.selectedApp].appdata:null)})["catch"](function(a){console.error(a)})};var x=function(a){var b=a?30*a+120:177;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px")};a.initApplication=function(b){b&&(a.selectedApp=void 0),a.forms={settings:void 0,interval:void 0},a.application={},a.interval={intType:"always",t_from:moment(new Date),t_to:moment(new Date),wd_from:"always",wd_to:"always",md_from:"always",md_to:"always",m_from:"always",m_to:"always",alwaysTime:!0},a.main={app:""}},a.$watch("interval",function(a){a&&v(a)},!0),a.updateSetAppdata=function(){a.application.variable&&a.application.value&&"Set"===a.main.app.value?a.application.appdata[0]=a.application.variable+"="+a.application.value:a.application.appdata[0]=null},a.updateSetAppdataSettings=function(){a.application.variable&&a.application.value&&"Set"===a.main.app.value?a.route.Applications[a.selectedApp].appdata[0]=a.application.variable+"="+a.application.value:a.application.appdata[0]=null},a.$watch("main.app",function(b){if(b){var c,d,e={},f={};switch(void 0===a.selectedApp&&(a.application={appType:b.type,app:b.value,interval:a.application.interval||"*,*,*,*",appdata:[]}),b.value){case"Queue":c=l,d=m;break;case"Playback":c=m;break;case"AGI":c=n;break;case"Goto":c=o;break;case"Voicemail":c=q;break;case"Dial":switch(b.type){case"internalDial":c=r,e={controller:"all"};break;case"externalDial":c=u}}if(c)return c.get(e).$promise.then(function(b){a.items=b.rows}).then(function(){return d?d.get(f).$promise:void 0}).then(function(b){b&&(a.items2=b.rows)})["catch"](function(a){h.error(a)})}},!0),a.deselectAndRedirect=function(b){a.selectedApp=void 0,e.path(b)},a.getIntervals=function(){return p.get().$promise.then(function(b){a.Intervals=b.rows,d.syncUpdates("interval",a.Intervals)})["catch"](function(a){h.error(a)})},a.getRoute=function(){return k.get({id:c.id}).$promise.then(function(b){a.route=b,a.gridOptions.data=b.Applications,x(a.gridOptions.data.length)})["catch"](function(a){e.path("/channels/voice/routes/internal/list")})},a.getApplication=function(){if(void 0===a.selectedApp)e.path("/channels/voice/routes/internal/list");else{if(a.showGrid=!0,a.route.Applications[a.selectedApp].appType)a.main.app=_.find(a.$application.applications,{type:a.route.Applications[a.selectedApp].appType});else{var b=_.find(a.$application.applications,{value:a.route.Applications[a.selectedApp].app});if(b)a.main.app=b;else{a.main.app=_.find(a.$application.applications,{type:"custom"});var c=a.route.Applications[a.selectedApp].appdata.join(",");a.route.Applications[a.selectedApp].appdata=[c],a.route.Applications[a.selectedApp].appType="custom"}}if("Set"===a.main.app.value){var d=a.route.Applications[a.selectedApp].appdata[0].split("=");a.application.variable=d[0],a.application.value=d[1]}w()}},a.openApplication=function(b){a.selectedApp=b,a.showGrid=!1,e.path("/channels/voice/routes/internal/view/"+c.id+"/applications/settings")},a.updateRoute=function(d){return a.route.exten=a.$application.checkUnderscore(a.route.exten),_.forEach(a.route.Applications,function(a){if("custom"!==a.appType)switch(a.app){case"Dial":var b;switch(a.appType){case"externalDial":b=3;break;case"internalDial":b=2;break;default:b=2}a.appdata[b]=a.appdata[b]||"",a.appdata[b]+=(_.includes(a.appdata[b],"x")?"":"x")+(_.includes(a.appdata[b],"X")?"":"X");break;case"Queue":a.appdata[1]=a.appdata[1]||"",a.appdata[1]+=(_.includes(a.appdata[1],"x")?"":"x")+(_.includes(a.appdata[1],"X")?"":"X")}}),k.update({id:a.route.id},a.route).$promise.then(function(f){a.selectedApp=void 0,h.show(b.instant("MESSAGE_WELL_DONE")+"!","success"),d&&e.path("/channels/voice/routes/internal/view/"+c.id+"/"+d)})["catch"](function(a){h.error(a)})},a.getContexts=function(){return o.get().$promise.then(function(b){a.voiceContexts=b.rows,d.syncUpdates("voice_context",a.voiceContexts)})["catch"](function(a){h.error(a)})},a.deleteApp=g.confirm["delete"](function(b){a.route.Applications.splice(b,1),a.updateRoute()}),a.addApplication=function(){a.route.Applications.push(a.application),a.updateRoute("applications")},a.goNext=function(){f.wizard().next()},a.previous=function(){f.wizard().previous()},a.formValidation=function(a){return a},a.$on("destroy",function(){d.unsyncUpdates("voice_extension")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.internal.view",{url:"/view/:id",templateUrl:"app/channels/voice/route/internal/view/view.html",controller:"VoiceRouteInternalViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.routes.internal.view.settings",{url:"/settings",templateUrl:"app/channels/voice/route/internal/view/view.settings.html"}).state("main.channels.voice.routes.internal.view.applications",{url:"/applications",templateUrl:"app/channels/voice/route/internal/view/view.applications.html"}).state("main.channels.voice.routes.internal.view.application",{url:"/application",templateUrl:"app/channels/voice/route/view.application.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}}).state("main.channels.voice.routes.internal.view.applications.settings",{url:"/settings",templateUrl:"app/channels/voice/route/view.applicationSettings.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteOutboundListCreateCtrl",["$scope","$uibModalInstance","Route","application","xAlert","$translate","$location","Tag",function(a,b,c,d,e,f,g,h){a.$application=d.application,a.forms={route:void 0},a.item={type:"outbound",appdata:"Outbound Call",context:"from-sip"},a.getTags=function(){return h.get().$promise.then(function(b){b.rows.unshift({name:"--"}),a.tags=b.rows})["catch"](function(a){e.error(a)})},a.ok=function(){return a.item.exten=a.$application.checkUnderscore(a.item.exten),c.save(a.item).$promise.then(function(a){b.close(a),g.path("/channels/voice/routes/outbound/view/"+a.id+"/routes")})["catch"](function(a){e.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRouteOutboundListCtrl",["$scope","$http","socket","$translate","$rootScope","xAlert","Modal","stResource","gridOptions","Route","$uibModal","$location","$log",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.initView=function(){var b={exporterCsvFilename:"OutboundRoutes.csv",columnDefs:[{name:"exten",displayName:"APPLICATION_DESTINATION_PATTERN"},{name:"description"},{name:"applications",cellClass:"ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.Applications.length"><span data-ng-repeat="app in row.entity.Applications | limitTo:2">{{app.app}}({{app.appdata[0]}}),</span>...</div><div data-ng-if="!row.entity.Applications.length">{{\'MESSAGE_NO_AVAILABLE_APPLICATIONS\' | translate}}</div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/voice/routes/outbound/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.exten, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(j,b,a,{type:"outbound"})},a.create=function(){k.open({animation:!0,templateUrl:"app/channels/voice/route/outbound/list/create.modal.html",controller:"VoiceRouteOutboundListCreateCtrl"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.outbound.list",{url:"/list",templateUrl:"app/channels/voice/route/outbound/list/list.html",controller:"VoiceRouteOutboundListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.outbound",{url:"/outbound",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteOutboundViewCtrl",["$scope","xAlert","$translate","$stateParams","socket","$location","WizardHandler","Modal","application","interval","Route","Trunk","VoiceContext","Interval","Tag",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){function p(b){var c,d;if("always"===b.intType)c=null,d="*,*,*,*";else if("list"===b.intType)d=b.IntervalId?_.find(a.Intervals,{id:b.IntervalId}).name:"*,*,*,*",c=b.IntervalId||null;else if("custom"===b.intType){c=null;var e,f,g,h;e=b.t_from&&b.t_to&&!b.alwaysTime?moment(b.t_from).format("HH:mm")+"-"+moment(b.t_to).format("HH:mm"):"*",b.wd_from&&"always"!==b.wd_from?(f=b.wd_from,b.wd_to&&"always"!==b.wd_to&&(f+="-"+b.wd_to)):f="*",b.md_from&&"always"!==b.md_from?(g=b.md_from,b.md_to&&"always"!==b.md_to&&(g+="-"+b.md_to)):g="*",b.m_from&&"always"!==b.m_from?(h=b.m_from,b.m_to&&"always"!==b.m_to&&(h+="-"+b.m_to)):h="*",d=e+","+f+","+g+","+h}void 0===a.selectedApp?(a.application.interval=d,a.application.IntervalId=c):(a.route.Applications[a.selectedApp].interval=d,a.route.Applications[a.selectedApp].IntervalId=c)}function q(){if(a.interval.intType=a.route.Applications[a.selectedApp].IntervalId?"list":"*,*,*,*"===a.route.Applications[a.selectedApp].interval?"always":"custom",a.interval.IntervalId=a.route.Applications[a.selectedApp].IntervalId,!a.route.Applications[a.selectedApp].IntervalId){var b,c=a.route.Applications[a.selectedApp].interval?a.route.Applications[a.selectedApp].interval.split(","):["*","*","*","*"];c.forEach(function(c,d){switch(d){case 0:"*"!==c?(b=c.split("-"),a.interval.t_from=moment(b[0],"HH:mm"),a.interval.t_to=moment(b[1],"HH:mm"),a.interval.alwaysTime=!1):(a.interval.t_from=moment(new Date),a.interval.t_to=moment(new Date),a.interval.alwaysTime=!0);break;case 1:"*"!==c?(b=c.split("-"),a.interval.wd_from=b[0],a.interval.wd_to=b[1]?b[1]:"always"):(a.interval.wd_from="always",a.interval.wd_to="always");break;case 2:"*"!==c?(b=c.split("-"),a.interval.md_from=b[0],a.interval.md_to=b[1]?b[1]:"always"):(a.interval.md_from="always",a.interval.md_to="always");break;case 3:"*"!==c?(b=c.split("-"),a.interval.m_from=b[0],a.interval.m_to=b[1]?b[1]:"always"):(a.interval.m_from="always",a.interval.m_to="always")}})}}a.$translate=c,a.selectedApp=void 0,a.showGrid=!0,a.$application=i.application,a.$interval=j.interval,a._=_,a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.alwaysSwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.selectedRows=[],a.gridOptions={enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableSorting:!1,rowTemplate:'<div grid="grid" class="ui-grid-draggable-row" draggable="true"><div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ng-class="{ \'ui-grid-row-header-cell\': col.isRowHeader, \'custom\': true }" ui-grid-cell></div></div>',columnDefs:[{name:"app",displayName:"APPLICATION_APPLICATION",cellClass:"ui-grid-vcenter",cellTemplate:"<div><span data-ng-if=\"row.entity.appType === 'externalDial'\">Default</span><span data-ng-if=\"row.entity.appType !== 'externalDial'\">{{row.entity.app}}</span></div>",headerCellFilter:"translate",enableColumnMenu:!1},{name:"appType",headerCellFilter:"translate",displayName:"APPLICATION_INFO",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{'APPLICATION_APPS_'+(row.entity.appType || (grid.appScope._.find(grid.appScope.$application.applications,{value:row.entity.app}) ? row.entity.app : 'custom')).toUpperCase() | translate}}</div>",enableColumnMenu:!1},{name:"appdata",displayName:"APPLICATION_ARGUMENTS",headerCellFilter:"translate",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{row.entity.appdata.join(',')}}</div>",enableColumnMenu:!1},{name:"interval",displayName:"APPLICATION_TIME_INTERVAL",headerCellFilter:"translate",enableColumnMenu:!1},{name:"action",displayName:"APPLICATION_ACTION",headerCellFilter:"translate",width:125,enableColumnMenu:!1,cellClass:"ui-grid-vcenter",cellTemplate:'<div><a class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.openApplication(grid.appScope.gridOptions.data.indexOf(row.entity))"><i class="icon-settings"></i></a><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteApp(row.entity.app+\' application\', grid.appScope.gridOptions.data.indexOf(row.entity))"><i class="fa fa-trash"></i></a></div>'}],onRegisterApi:function(b){b.selection.on.rowSelectionChanged(a,function(b){b.isSelected?a.selectedRows.push(b.entity):_.pull(a.selectedRows,b.entity)}),b.selection.on.rowSelectionChangedBatch(a,function(b){b[0].isSelected?a.selectedRows=_.map(b,"entity"):a.selectedRows=[]}),b.draggableRows.on.rowDropped(a,function(b,c){a.updateRoute()}),b.grid.registerDataChangeCallback(function(){r(a.gridOptions.data.length)})}},a.deleteItems=h.confirm["delete"](function(){_.remove(a.route.Applications,function(b){return _.includes(a.selectedRows,b)}),a.selectedRows=[],a.updateRoute()});var r=function(a){var b=a?30*a+120:177;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px")};a.initApplication=function(b){b&&(a.selectedApp=void 0),a.forms={info:void 0,interval:void 0},a.application={},a.interval={intType:"always",t_from:moment(new Date),t_to:moment(new Date),wd_from:"always",wd_to:"always",md_from:"always",md_to:"always",m_from:"always",m_to:"always",alwaysTime:!0},a.main={app:""},a.applications=[{name:"Default",value:"Dial",type:"outboundDial"},{name:"Custom",value:"custom",type:"custom"}]},a.$watch("interval",function(a){a&&p(a)},!0),a.$watch("main.app",function(c){if(c){var d,e;switch(void 0===a.selectedApp&&(a.application={appType:c.type,app:c.value,interval:a.application.interval||"*,*,*,*",appdata:[]}),c.value){case"Dial":d=l;break;default:d=null,e=null}if(d)return d.get().$promise.then(function(b){a.items=b.rows}).then(function(){return e?e.get().$promise:void 0}).then(function(b){b&&(a.items2=b.rows)})["catch"](function(a){b.error(a)})}},!0),a.deselectAndRedirect=function(b){a.selectedApp=void 0,f.path(b)},a.getIntervals=function(){return n.get().$promise.then(function(b){a.Intervals=b.rows,e.syncUpdates("interval",a.Intervals)})["catch"](function(a){b.error(a)})},a.getRoute=function(){return k.get({id:d.id}).$promise.then(function(b){a.route=b,a.gridOptions.data=b.Applications,r(a.gridOptions.data.length)})["catch"](function(a){f.path("/channels/voice/routes/outbound/list")})},a.getApplication=function(){if(void 0===a.selectedApp)f.path("/channels/voice/routes/outbound/list");else{if(a.showGrid=!0,a.route.Applications[a.selectedApp].appType)a.main.app=_.find(a.applications,{type:a.route.Applications[a.selectedApp].appType});else{a.main.app=_.find(a.applications,{type:"custom"});var b=a.route.Applications[a.selectedApp].appdata.join(",");a.route.Applications[a.selectedApp].appdata=[b],a.route.Applications[a.selectedApp].appType="custom"}q()}},a.openApplication=function(b){a.selectedApp=b,a.showGrid=!1,f.path("/channels/voice/routes/outbound/view/"+d.id+"/routes/settings")},a.updateRoute=function(e){return a.route.exten=a.$application.checkUnderscore(a.route.exten),_.forEach(a.route.Applications,function(a){"outboundDial"===a.appType&&(a.appdata[4]=a.appdata[4]||"",a.appdata[4]+=(_.includes(a.appdata[4],"x")?"":"x")+(_.includes(a.appdata[4],"X")?"":"X"))}),k.update({id:a.route.id},a.route).$promise.then(function(g){a.selectedApp=void 0,b.show(c.instant("MESSAGE_WELL_DONE")+"!","success"),e&&f.path("/channels/voice/routes/outbound/view/"+d.id+"/"+e)})["catch"](function(a){b.error(a)})},a.getContexts=function(){return m.get().$promise.then(function(b){a.voiceContexts=b.rows,e.syncUpdates("voice_context",a.voiceContexts)})["catch"](function(a){b.error(a)})},a.getTags=function(){return o.get().$promise.then(function(b){b.rows.unshift({name:"--"}),a.tags=b.rows})["catch"](function(a){b.error(a)})},a.deleteApp=h.confirm["delete"](function(b){a.route.Applications.splice(b,1),a.updateRoute()}),a.addApplication=function(){a.route.Applications.push(a.application),a.updateRoute("routes")},a.goNext=function(){g.wizard().next()},a.previous=function(){g.wizard().previous()},a.formValidation=function(a){return a},a.$on("destroy",function(){e.unsyncUpdates("voice_extension")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.outbound.view",{url:"/view/:id",templateUrl:"app/channels/voice/route/outbound/view/view.html",controller:"VoiceRouteOutboundViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.routes.outbound.view.settings",{url:"/settings",templateUrl:"app/channels/voice/route/outbound/view/view.settings.html"}).state("main.channels.voice.routes.outbound.view.routes",{url:"/routes",templateUrl:"app/channels/voice/route/outbound/view/view.routes.html"}).state("main.channels.voice.routes.outbound.view.route",{url:"/route",templateUrl:"app/channels/voice/route/outbound/view/view.route.html"}).state("main.channels.voice.routes.outbound.view.routes.settings",{url:"/settings",templateUrl:"app/channels/voice/route/outbound/view/view.routeSettings.html"})}]),angular.module("xCallyShuttleApp").factory("Route",["$resource",function(a){return a("/api/voice/extensions/:id",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes",{url:"/routes",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:21}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice",{url:"/voice",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:7}}})}]),angular.module("xCallyShuttleApp").controller("VoiceVoicemailListCtrl",["$scope","VoiceMail","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"voice_mails.csv",primaryKey:"uniqueid",columnDefs:[{name:"mailbox"},{name:"fullname"},{name:"email"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/voice/voicemails/view/{{row.entity.uniqueid}}/settings",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.mailbox, row.entity.uniqueid)"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.voicemails.list",{url:"/list",templateUrl:"app/channels/voice/voicemail/list/list.html",controller:"VoiceVoicemailListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceVoicemailViewCtrl",["$scope","VoiceMail","VoiceMailMessage","VoiceContext","$http","xAlert","$translate","$stateParams","socket","$sce","Modal","$location","gridOptions",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){var b={exporterCsvFilename:"voice_mail_messages.csv",primaryKey:"id",columnDefs:[{name:"callerid"},{name:"stamp",displayName:"APPLICATION_DATE",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{grid.appScope.moment(row.entity.stamp).format('YYYY-MM-DD HH:mm:ss')}}</div>"},{name:"duration",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{row.entity.duration*1000 | date:'mm:ss'}}</div>"},{name:"audio",displayName:"",width:225,enableSorting:!1,enableFiltering:!1,buttons:[{directive:'<audio-file-download params="{id:row.entity.id,controller:\'download\'}" resource="grid.appScope.VoiceMailMessage"></audio-file-download>'}]},{name:"action",width:150,buttons:[{directive:'<motion-file-download params="{id:row.entity.id,controller:\'download\'}" resource="grid.appScope.VoiceMailMessage" mimetype="audio/wav" btnclass="btn btn-xs blue-hoki" filename="row.entity.msg_id+\'.wav\'"></motion-file-download>'},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.id, row.entity.id)"}]}]};a.gridOptions=m.gridOptions(c,b,a,{mailbox:a.voicemail.mailbox,context:a.voicemail.context})}a.moment=moment,a["switch"]={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.VoiceMailMessage=c,a.getVoicemail=function(){return b.get({id:h.uniqueid}).$promise.then(function(b){delete b.password,delete b.stamp,a.voicemail=b})["catch"](function(a){l.path("/voice/voicemails/list")})},a.updateVoiceVoicemail=function(){return b.update({id:h.uniqueid},a.voicemail).$promise.then(function(){f.show(g.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.getContexts=function(){return d.get().$promise.then(function(b){a.voiceContexts=b.rows})["catch"](function(a){f.error(a)})},a.getMessages=function(){return a.voicemail?void n():b.get({id:h.uniqueid}).$promise.then(function(b){delete b.password,delete b.stamp,a.voicemail=b,n()})["catch"](function(a){l.path("/voice/voicemails/view/"+h.uniqueid+"/settings")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.voicemails.view",{url:"/view/:uniqueid",templateUrl:"app/channels/voice/voicemail/view/view.html",controller:"VoiceVoicemailViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.voicemails.view.settings",{url:"/settings",templateUrl:"app/channels/voice/voicemail/view/view.settings.html"}).state("main.channels.voice.voicemails.view.messages",{url:"/messages",templateUrl:"app/channels/voice/voicemail/view/view.messages.html"})}]),angular.module("xCallyShuttleApp").factory("VoiceMail",["$resource",function(a){return a("/api/voice/voicemails/:id/:controller",{uniqueid:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.voicemails",{url:"/voicemails",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:23}}})}]),angular.module("xCallyShuttleApp").factory("VoiceMailMessage",["$resource",function(a){return a("/api/voice/voicemails/messages/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("VoiceVoicemailWizardCtrl",["$scope","VoiceMail","xAlert","WizardHandler","$location","Setting",function(a,b,c,d,e,f){a.initWizard=function(){a.form={},a.item={context:"from-voicemail"}},a.next=function(){d.wizard().next()},a.previous=function(){d.wizard().previous()},a.exitValidation=function(a){return a},a.getFirstFreeMailbox=function(){f.get({controller:"mailbox"}).$promise.then(function(b){a.item.mailbox=b.value})["catch"](function(a){c.error(a)})},a.createItem=function(){return a.item.customer_id=a.item.mailbox,b.save(a.item).$promise.then(function(){e.path("/channels/voice/voicemails/list")})["catch"](function(a){c.error(data)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.voicemails.wizard",{url:"/wizard",templateUrl:"app/channels/voice/voicemail/wizard/wizard.html",controller:"VoiceVoicemailWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("VoiceQueue",["$resource",function(a){
-return a("/api/voice/queues/:id/:controller/:controller2",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("Company",["$resource",function(a){return a("/api/contactmanager/companies/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.companies",{url:"/companies",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:5}}})}]),angular.module("xCallyShuttleApp").controller("CompanyListCreateModalCtrl",["$scope","$uibModalInstance",function(a,b){a.forms={dashboard:void 0},a.item={},a.ok=function(){a.item.model=JSON.stringify({title:a.item.name}),b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ContactManagerCompanyListCtrl",["$scope","$translate","xAlert","Modal","$uibModal","$log","Company","gridOptions","$location",function(a,b,c,d,e,f,g,h,i){a.initView=function(){var b={exporterCsvFilename:"Companies.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:100,buttons:[{"class":"blue-hoki",name:"profile",href:"/contactmanager/companies/view/{{row.entity.id}}/settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"},{"class":"green-turquoise",name:"contacts",uisref:"main.contactmanager.contacts.list({companyId:{{row.entity.id}}})"}]}]};a.gridOptions=h.gridOptions(g,b,a)},a.create=function(){var a=e.open({animation:!0,size:"lg",templateUrl:"app/contactmanager/company/list/create.modal.html",controller:"CompanyListCreateModalCtrl"});a.result.then(function(a){return g.save(a).$promise.then(function(a){i.path("/contactmanager/companies/view/"+a.id+"/settings")})["catch"](function(a){c.error(a)})},function(){f.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.companies.list",{url:"/list",templateUrl:"app/contactmanager/company/list/list.html",controller:"ContactManagerCompanyListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("ContactManagerCompanyViewCtrl",["$scope","xAlert","$translate","$stateParams","$location","Company",function(a,b,c,d,e,f){a.getCompany=function(){return f.get({id:d.id}).$promise.then(function(b){a.company=b})["catch"](function(a){e.path("/contactmanager/companies/list")})},a.updateCompany=function(){return f.update({id:d.id},a.company).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){b.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.companies.view",{url:"/view/:id",templateUrl:"app/contactmanager/company/view/view.html",controller:"ContactManagerCompanyViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.contactmanager.companies.view.settings",{url:"/settings",templateUrl:"app/contactmanager/company/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("Contact",["$resource",function(a){return a("/api/contactmanager/contacts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.contacts",{url:"/contacts",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ContactManagerListCopyModalCtrl",["$scope","$uibModalInstance","xAlert","List","Contact","$translate",function(a,b,c,d,e,f){a.item={},a.getLists=function(){return d.get().$promise.then(function(b){a.lists=b.rows})["catch"](function(a){c.error(a)})},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ContactManagerListImportModalCtrl",["$scope","$uibModalInstance","indexes","csv","xAlert","socket","List","Contact","$translate","Company",function(a,b,c,d,e,f,g,h,i,j){function k(b){if(b>=a.csvLength||a.stopped)return void(a.importing=!1);for(var c,f=[],g=b;b+200>g&&g<a.csvLength;g++)c={},_.forOwn(a.item,function(b,e){switch(e){case"tags":c.tags=[],a.item.tags.forEach(function(a){""!==d[g][a]&&c.tags.push(d[g][a])});break;default:c[e]=d[g][b]}}),c.tags=c.tags?c.tags.join(","):void 0,c.ListId=a.item.ListId,c.CompanyId=a.item.CompanyId||null,f.push(c);return h.save({controller:"bulk"},{contacts:f}).$promise.then(function(b){a["import"].success+=b.ok*a.addingQuote,a["import"].succeeded+=b.ok,a["import"].fail+=b.ko*a.addingQuote,a["import"].failed+=b.ko,k(g)})["catch"](function(b){a.stopped=!0,e.error(b),k(g)})}a.indexes=c,a.importing=!1,a.submitted=!1,a.stopped=!1,a["import"]={success:0,fail:0,succeeded:0,failed:0},a.csvLength=d.length,a.addingQuote=100/a.csvLength,a.forms={csv:void 0},a.item={},a.start=function(){a.importing=!0,a.submitted=!0,k(0)},a.getLists=function(){return g.get().$promise.then(function(b){a.lists=b.rows,a.item.ListId=1,a.getCustomFields()})["catch"](function(a){e.error(a)})},a.getCompanies=function(){return j.get().$promise.then(function(b){a.companies=b.rows})["catch"](function(a){e.error(a)})},a.getCustomFields=function(){return g.get({listId:a.item.ListId,controller:"customfields"}).$promise.then(function(b){b.rows.forEach(function(a){a.values=JSON.parse(a.values)}),a.customFields=b.rows,f.socket.on("custom_field:remove",function(b){_.remove(a.customFields,function(a){return b.id==a.id})}),f.socket.on("custom_field:save",function(b){if(b.ListId===a.item.ListId){var c=_.find(a.customFields,{id:b.id});c||("string"==typeof b.values&&(b.values=JSON.parse(b.values)),a.customFields.push(b))}})})["catch"](function(a){console.error(a),e.error(a)})},a.close=function(){b.close()},a.stop=function(){a.stopped=!0}}]),angular.module("xCallyShuttleApp").controller("ContactManagerContactListCtrl",["$scope","$translate","Modal","FileUploader","Papa","$uibModal","$log","Contact","gridOptions","List","uiGridConstants","xAlert","socket","$stateParams","Auth","Company",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){a.Auth=o,a.initView=function(){var c;return j.get().$promise.then(function(b){return a.lists=[],a.customFields=[],b.rows.forEach(function(b,c){_.forEach(b.CustomFields,function(b){a.customFields.push({name:b.name,alias:b.alias})}),a.lists.push({value:b.id,label:b.name})}),p.get().$promise}).then(function(b){a.companies=[],b.rows.forEach(function(b,c){a.companies.push({value:b.id,label:b.name})})}).then(function(){var d=[{"class":"blue-hoki",name:"profile",onClick:"grid.appScope.openContactTab(row.entity)"}];o.isAgent()||(d.push({"class":"green",title:b.instant("APPLICATION_COPY"),name:"copy",onClick:"grid.appScope.copy(row.entity.id)"}),d.push({"class":"red-sunglo",name:"delete",title:b.instant("APPLICATION_DELETE"),onClick:"grid.appScope.deleteItem(row.entity.fullname, row.entity.id)"})),c={exporterCsvFilename:"Contacts.csv",columnDefs:[{name:"firstName"},{name:"lastName"},{name:"phone"},{name:"email"},{name:"ListId",displayName:"APPLICATION_LIST",field:"List.name",filter:{type:k.filter.SELECT,term:n.listId||null,selectOptions:a.lists},cellTemplate:'<div class="centered-uigrid-td"><a href="/contactmanager/lists/view/{{row.entity.ListId}}/settings">{{row.entity.List.name}}</a></div>'},{name:"CompanyId",displayName:"APPLICATION_COMPANY",field:"Company.name",filter:{type:k.filter.SELECT,term:n.companyId||null,selectOptions:a.companies},cellTemplate:'<div class="centered-uigrid-td"><a href="/contactmanager/companies/view/{{row.entity.CompanyId}}/settings">{{row.entity.Company.name}}</a></div>'},{name:"tags",filterHeaderTemplate:'<div class="ui-grid-filter-container row"><div ng-repeat="colFilter in col.filters" class="col-md-12 col-md-offset-0 col-sm-12 col-sm-offset-0 col-xs-12 col-xs-offset-0"><div custom-grid-tags-filter-header></div></div></div>',filters:[{name:"tags"}],cellTemplate:"<div class=\"centered-uigrid-td\">{{row.entity.tags.join(',')}}</div>"}]},_.forEach(a.customFields,function(a){c.columnDefs.push({name:a.name,displayName:a.alias,visible:!1})}),c.columnDefs.push({name:"action",width:100,buttons:d}),a.gridOptions=i.gridOptions(h,c,a),m.socket.on("contact_manager:remove",function(b){a.gridOptions.getPage()})})["catch"](function(a){l.error(a)})},d.FileSelect.prototype.isEmptyAfterSelection=function(){return!0};var q=a.uploader=new d({queueLimit:1,clearInputAfterAddedToQueue:!0});q.onAfterAddingFile=function(b){console.log("fileadded"),e.parse(b._file,{header:!0,complete:function(b){a.uploader.clearQueue(),a["import"](b.data)},error:function(a){console.log(a)}})},a["import"]=function(b){var c=f.open({animation:!0,size:"lg",backdrop:"static",keyboard:!1,templateUrl:"app/contactmanager/contact/list/import.modal.html",controller:"ContactManagerListImportModalCtrl",resolve:{indexes:function(){return _.keys(b[0])},csv:function(){return b}}});c.result.then(function(b){a.gridOptions.getPage()},function(){g.info("Modal dismissed at: "+new Date)})},a.copy=function(b){var c=f.open({animation:!0,size:"small",templateUrl:"app/contactmanager/contact/list/copy.modal.html",controller:"ContactManagerListCopyModalCtrl"});c.result.then(function(c){return h.save({id:b,controller:"copy"},c).$promise.then(function(b){a.openContactTab({firstName:b.firstName,lastName:b.lastName,id:b.id})})["catch"](function(a){l.error(a)})},function(){g.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.contacts.list",{url:"/list",templateUrl:"app/contactmanager/contact/list/list.html",params:{listId:null,companyId:null},controller:"ContactManagerContactListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager",{url:"/contactmanager",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:5}}})}]),angular.module("xCallyShuttleApp").factory("List",["$resource",function(a){return a("/api/contactmanager/lists/:listId/:controller/:id",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.lists",{url:"/lists",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:5}}})}]),angular.module("xCallyShuttleApp").controller("ContactManagerListListCreateModalCtrl",["$scope","$uibModalInstance",function(a,b){a.forms={dashboard:void 0},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ContactManagerListListCtrl",["$scope","$http","$translate","Modal","xAlert","$uibModal","$log","List","gridOptions",function(a,b,c,d,e,f,g,h,i){a.initView=function(){var b={exporterCsvFilename:"Lists.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:100,buttons:[{"class":"blue-hoki",name:"settings",href:"/contactmanager/lists/view/{{row.entity.id}}/settings"},{"class":"green-turquoise",name:"contacts",uisref:"main.contactmanager.contacts.list({listId:{{row.entity.id}}})"},{"class":"{{row.entity.defaultEntry ? 'red-sunglo disabled' : 'red-sunglo'}}",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(h,b,a)},a.create=function(){var d=f.open({animation:!0,templateUrl:"app/contactmanager/list/list/create.modal.html",controller:"ContactManagerListListCreateModalCtrl"});d.result.then(function(d){b.post("/api/contactmanager/lists/",d).then(function(b){a.gridOptions.getPage(),e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.error(a)})},function(){g.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.lists.list",{url:"/list",templateUrl:"app/contactmanager/list/list/list.html",controller:"ContactManagerListListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ContactManagerListCustomFieldViewCreateModalCtrl",["$scope","$uibModalInstance","$translate",function(a,b,c){a.$translate=c,a.forms={dashboard:void 0},a.item={},a.choices=[{value:""}],a.addField=function(){a.choices.push({})},a.removeField=function(b){a.choices.splice(b,1)},a.types=[{name:"APPLICATION_TEXT",value:"text"},{name:"APPLICATION_SELECT",value:"select"}],a.ok=function(){"select"===a.item.type&&(a.item.values=angular.toJson(a.choices)),b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ContactManagerListViewCtrl",["$scope","xAlert","$translate","$stateParams","socket","$location","$uibModal","$log","Modal","List","Team","gridOptions",function(a,b,c,d,e,f,g,h,i,j,k,l){function m(a){var b=a.split(""),c=0,d=0;return b.shift(),b.forEach(function(a,b){"{"===a?c++:"}"===a&&(c--,c||(d=b+1))}),d?JSON.parse("["+a.substr(1,d)+"]"):[]}var n=function(){return{select:function(b){return j.save({listId:a.list.id,controller:"agents"},{agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})},deselect:function(b){return j["delete"]({listId:a.list.id,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})}}};a.getList=function(){return j.get({listId:d.id}).$promise.then(function(b){a.list=b})["catch"](function(a){f.path("/contactmanager/lists/list")})},a.updateList=function(){return j.update({id:d.id},a.list).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){b.error(a)})},a.getTeams=function(){return k.get({controller:"associations"}).$promise.then(function(b){return a.teams=b.rows,a.list?void 0:a.getList()}).then(function(){return a.list.defaultEntry&&f.path("/contactmanager/lists/list"),j.get({listId:d.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindQueue(a.teams,_.map(b.rows,function(a){return{id:a.id}}),n)})["catch"](function(a){console.error(a)})},a.initCustomFields=function(){var b={exporterCsvFilename:"customfields.csv",primaryKey:"id",columnDefs:[{name:"alias",displayName:"APPLICATION_NAME"},{name:"name",displayName:"APPLICATION_FIELD"},{name:"type"},{name:"description"},{name:"action",width:200,buttons:[{"class":"blue-hoki",href:"/contactmanager/lists/view/{{grid.appScope.$stateParams.id}}/customfields/settings/{{row.entity.id}}",name:"settings"},{"class":"red-sunglo",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)",name:"delete"}]}]};a.gridOptions=l.gridOptions(j,b,a,{listId:d.id,controller:"customfields"})},a.create=function(){var e=g.open({animation:!0,templateUrl:"app/contactmanager/list/view/create.modal.html",controller:"ContactManagerListCustomFieldViewCreateModalCtrl"});e.result.then(function(e){return j.save({listId:d.id,controller:"customfields"},e).$promise.then(function(){a.gridOptions.getPage(),b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.error(a)})},function(){h.info("Modal dismissed at: "+new Date)})},a.getCustomField=function(){return j.get({listId:d.id,controller:"customfields",id:d.cfId}).$promise.then(function(b){if(a.customField=b,"select"===a.customField.type)try{a.choices=JSON.parse(a.customField.values)}catch(c){a.choices=m(a.customField.values)}})["catch"](function(a){console.error(a)})},a.updateCustomField=function(){var e=angular.copy(a.customField);return"select"===e.type&&(e.values=angular.toJson(a.choices)),j.update({listId:d.id,controller:"customfields",id:d.cfId},e).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){b.error(a)})},a.addField=function(){a.choices.push({})},a.removeField=function(b){a.choices.splice(b,1)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.lists.view",{url:"/view/:id",templateUrl:"app/contactmanager/list/view/view.html",controller:"ContactManagerListViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.contactmanager.lists.view.settings",{url:"/settings",templateUrl:"app/contactmanager/list/view/view.settings.html"}).state("main.contactmanager.lists.view.agents",{url:"/agents",templateUrl:"app/contactmanager/list/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}}).state("main.contactmanager.lists.view.customfields",{url:"/customfields",templateUrl:"app/contactmanager/list/view/view.customFields.html"}).state("main.contactmanager.lists.view.customfields.settings",{url:"/settings/:cfId",templateUrl:"app/contactmanager/list/view/view.customFieldSettings.html",controller:"ContactManagerListViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("DashboardChatCtrl",["$scope","Auth","ChatRoom","socket","Agent","$q","$translate","ReportChatSession","$timeout",function(a,b,c,d,e,f,g,h,i){a.Auth=b,a.moment=moment,a["new"]=0,a.open=0,a.unmanaged=0,a.closed=0;var j=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.initAgent=function(){a.table1={enableGridMenu:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,multiSelect:!0,columnDefs:[{name:"UserHasChatQueue.queue",headerCellFilter:"translate",displayName:"APPLICATION_QUEUE",cellClass:"text-center ui-grid-vcenter"}],data:[],onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){j(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)})}},a.table2={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"roomid",displayName:"APPLICATION_INTERACTION_ID",headerCellFilter:"translate"},{name:"websitename",displayName:"APPLICATION_WEBSITE",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.application}} <span data-ng-if=\"row.entity.application == 'queue' && row.entity.queuename\">({{row.entity.queuename}})</span></div>"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.abandon">{{\'APPLICATION_QUEUESTATUS_ABANDON\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span><span data-ng-if="!row.entity.leaveAt"> [<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</div>"}],data:[],gridMenuTitleFilter:function(a){var b=f.defer();return b.resolve(g.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){j(a.table2.data.length)})}},e.get({id:b.getCurrentUser().id,controller:"chat",controller1:"queues"}).$promise.then(function(b){a.table1.data=b.rows})["finally"](function(){d.socket.on("user_has_chat_queue:save",function(c){c.UserId!=b.getCurrentUser().id||_.find(a.table1.data,{id:c.ChatQueueId})||a.table1.data.push({id:c.ChatQueueId,UserHasChatQueue:c})}),d.socket.on("user_has_chat_queue:remove",function(c){c.UserId===b.getCurrentUser().id&&_.remove(a.table1.data,{id:c.ChatQueueId})})})["catch"](function(a){console.error(a)}),h.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.table2.data=b.rows})["finally"](function(){d.socket.on("report_chat_session:save",function(b){var c=_.find(a.table2.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&i(function(){_.remove(a.table2.data,{id:b.id})},1e4)):b.leaveAt||a.table2.data.push(b)}),d.socket.on("report_chat_session:remove",function(b){_.remove(a.table2.data,{id:b.id})})})["catch"](function(a){console.log(a)})},a.initWidget=function(b){var e;switch(b){case"unmanaged":e=c;break;default:e=h}return e.get({id:b}).$promise.then(function(c){a[b]=c.value,a.charts={interactions:{labels:[g.instant("APPLICATION_DASHBOARD_NEW"),g.instant("APPLICATION_DASHBOARD_OPEN"),g.instant("APPLICATION_UNMANAGED"),g.instant("APPLICATION_DASHBOARD_CLOSED"),g.instant("APPLICATION_DASHBOARD_ABANDONED")],values:[a["new"],a.open,a.unmanaged,a.closed,a.abandoned],colours:["#44B6AE","#578EBE","#35AA47","#8775A7","#f3c200"]}},d.socket.on("report_chat_dashboard:"+b,function(c){a[b]=c.value,a.charts.interactions.values=[a["new"],a.open,a.unmanaged,a.closed]})})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("DashboardCtrl",["$scope","$translate","Auth",function(a,b,c){}]),angular.module("xCallyShuttleApp").factory("Dashboard",["$resource",function(a){return a("/api/dashboards/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.dashboard",{"abstract":!0,url:"/dashboard",templateUrl:"app/dashboard/dashboard.html",controller:"DashboardCtrl",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:1}}}).state("main.dashboard.voice",{url:"/voice",controller:"DashboardVoiceCtrl",templateUrl:"app/dashboard/voice/voice.html"}).state("main.dashboard.chat",{url:"/chat",controller:"DashboardChatCtrl",templateUrl:"app/dashboard/chat/chat.html",data:{permissions:{redirectTo:"landing",id:8}}}).state("main.dashboard.mail",{url:"/mail",controller:"DashboardMailCtrl",templateUrl:"app/dashboard/mail/mail.html",data:{permissions:{redirectTo:"landing",id:9}}}).state("main.dashboard.fax",{url:"/fax",controller:"DashboardFaxCtrl",templateUrl:"app/dashboard/fax/fax.html",data:{permissions:{redirectTo:"landing",id:10}}}).state("main.dashboard.sms",{url:"/sms",controller:"DashboardSmsCtrl",templateUrl:"app/dashboard/sms/sms.html",data:{permissions:{redirectTo:"landing",id:11}}}).state("main.dashboard.openchannel",{url:"/openchannel",controller:"DashboardOpenChannelCtrl",templateUrl:"app/dashboard/openchannel/openchannel.html",data:{permissions:{redirectTo:"landing",id:20}}})}]),angular.module("xCallyShuttleApp").controller("DashboardFaxCtrl",["$scope","Auth","FaxRoom","socket","Agent","$translate","$q","ReportFaxSession","$timeout",function(a,b,c,d,e,f,g,h,i){a.Auth=b,a.moment=moment,a["new"]=0,a.open=0,a.pending=0,a.closed=0,a.initAgent=function(){a.table1={enableGridMenu:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,multiSelect:!0,columnDefs:[{name:"UserHasFaxQueue.queue",headerCellFilter:"translate",displayName:"APPLICATION_QUEUE",cellClass:"text-center ui-grid-vcenter"}],data:[],onRegisterApi:function(b){a.gridApi=b}},a.table2={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"roomid",displayName:"APPLICATION_INTERACTION_ID",headerCellFilter:"translate"},{name:"accountname",displayName:"APPLICATION_ACCOUNT_NAME",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.application}} <span data-ng-if=\"row.entity.application == 'queue' && row.entity.queuename\">({{row.entity.queuename}})</span></div>"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span><span data-ng-if="!row.entity.leaveAt"> [<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</span></div>"}],data:[],gridMenuTitleFilter:function(a){var b=g.defer();return b.resolve(f.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b}},e.get({id:b.getCurrentUser().id,controller:"fax",controller1:"queues"}).$promise.then(function(b){a.table1.data=b.rows})["finally"](function(){d.socket.on("user_has_fax_queue:save",function(c){c.UserId!=b.getCurrentUser().id||_.find(a.table1.data,{id:c.FaxQueueId})||a.table1.data.push({id:c.FaxQueueId,UserHasFaxQueue:c})}),d.socket.on("user_has_fax_queue:remove",function(c){c.UserId===b.getCurrentUser().id&&_.remove(a.table1.data,{id:c.FaxQueueId})})})["catch"](function(a){console.error(a)}),h.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.table2.data=b.rows})["finally"](function(){d.socket.on("report_fax_session:save",function(b){var c=_.find(a.table2.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&i(function(){_.remove(a.table2.data,{id:b.id})},1e4)):b.leaveAt||a.table2.data.push(b)}),d.socket.on("report_fax_session:remove",function(b){_.remove(a.table2.data,{id:b.id})})})["catch"](function(a){console.log(a)})},a.initWidget=function(b){var e;switch(b){case"timeout":case"waiting":e=h;break;default:e=c}return e.get({id:b}).$promise.then(function(c){a[b]=c.value,a.charts={interactions:{labels:[f.instant("APPLICATION_DASHBOARD_NEW"),f.instant("APPLICATION_DASHBOARD_OPEN"),f.instant("APPLICATION_DASHBOARD_PENDING"),f.instant("APPLICATION_DASHBOARD_CLOSED")],values:[a["new"],a.open,a.pending,a.closed],colours:["#44B6AE","#578EBE","#35AA47","#8775A7"]}},d.socket.on("report_fax_dashboard:"+b,function(c){a[b]=c.value,a.charts.interactions.values=[a["new"],a.open,a.pending,a.closed]})})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("DashboardMailCtrl",["$scope","Auth","MailRoom","socket","Agent","$translate","$q","ReportMailSession","$timeout",function(a,b,c,d,e,f,g,h,i){a.Auth=b,a.moment=moment,a["new"]=0,a.open=0,a.pending=0,a.closed=0,a.charts={interactions:{labels:[f.instant("APPLICATION_DASHBOARD_NEW"),f.instant("APPLICATION_DASHBOARD_OPEN"),f.instant("APPLICATION_DASHBOARD_PENDING"),f.instant("APPLICATION_DASHBOARD_CLOSED")],values:[a["new"],a.open,a.pending,a.closed],colours:["#44B6AE","#578EBE","#35AA47","#8775A7"]}},a.initAgent=function(){a.table1={enableGridMenu:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,multiSelect:!0,columnDefs:[{name:"UserHasMailQueue.queue",headerCellFilter:"translate",displayName:"APPLICATION_QUEUE",cellClass:"text-center ui-grid-vcenter"}],data:[],onRegisterApi:function(b){a.gridApi=b}},a.table2={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"roomid",displayName:"APPLICATION_INTERACTION_ID",headerCellFilter:"translate"},{name:"accountname",displayName:"APPLICATION_ACCOUNT_NAME",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.application}} <span data-ng-if=\"row.entity.application == 'queue' && row.entity.queuename\">({{row.entity.queuename}})</span></div>"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span><span data-ng-if="!row.entity.leaveAt"> [<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</span></div>"}],data:[],gridMenuTitleFilter:function(a){var b=g.defer();return b.resolve(f.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){})}},e.get({id:b.getCurrentUser().id,controller:"mail",controller1:"queues"}).$promise.then(function(b){a.table1.data=b.rows})["finally"](function(){d.socket.on("user_has_mail_queue:save",function(c){c.UserId!=b.getCurrentUser().id||_.find(a.table1.data,{id:c.MailQueueId})||a.table1.data.push({id:c.MailQueueId,UserHasMailQueue:c})}),d.socket.on("user_has_mail_queue:remove",function(c){c.UserId===b.getCurrentUser().id&&_.remove(a.table1.data,{id:c.MailQueueId})})})["catch"](function(a){console.error(a)}),h.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.table2.data=b.rows})["finally"](function(){d.socket.on("report_mail_session:save",function(b){var c=_.find(a.table2.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&i(function(){_.remove(a.table2.data,{id:b.id})},1e4)):b.leaveAt||a.table2.data.push(b)}),d.socket.on("report_mail_session:remove",function(b){_.remove(a.table2.data,{id:b.id})})})["catch"](function(a){console.log(a)})},a.initWidget=function(b){var e;switch(b){case"timeout":case"waiting":e=h;break;default:e=c}return e.get({id:b}).$promise.then(function(c){a[b]=c.value,a.charts={interactions:{labels:[f.instant("APPLICATION_DASHBOARD_NEW"),f.instant("APPLICATION_DASHBOARD_OPEN"),f.instant("APPLICATION_DASHBOARD_PENDING"),f.instant("APPLICATION_DASHBOARD_CLOSED")],values:[a["new"],a.open,a.pending,a.closed],colours:["#44B6AE","#578EBE","#35AA47","#8775A7"]}},d.socket.on("report_mail_dashboard:"+b,function(c){a[b]=c.value,a.charts.interactions.values=[a["new"],a.open,a.pending,a.closed]})})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("DashboardOpenChannelCtrl",["$scope","Auth","OpenChannelRoom","socket","Agent","$translate","$q","ReportOpenChannelSession","$timeout",function(a,b,c,d,e,f,g,h,i){a.Auth=b,a.moment=moment,a["new"]=0,a.open=0,a.pending=0,a.closed=0,a.initAgent=function(){a.table1={enableGridMenu:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,multiSelect:!0,columnDefs:[{name:"UserHasOpenchannelQueue.queue",headerCellFilter:"translate",displayName:"APPLICATION_QUEUE",cellClass:"text-center ui-grid-vcenter"}],data:[],onRegisterApi:function(b){a.gridApi=b}},a.table2={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"roomid",displayName:"APPLICATION_INTERACTION_ID",headerCellFilter:"translate"},{name:"accountname",displayName:"APPLICATION_ACCOUNT_NAME",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate",
-cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.application}} <span data-ng-if=\"row.entity.application == 'queue' && row.entity.queuename\">({{row.entity.queuename}})</span></div>"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span><span data-ng-if="!row.entity.leaveAt"> [<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</span></div>"}],data:[],gridMenuTitleFilter:function(a){var b=g.defer();return b.resolve(f.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b}},e.get({id:b.getCurrentUser().id,controller:"openchannel",controller1:"queues"}).$promise.then(function(b){a.table1.data=b.rows})["finally"](function(){d.socket.on("user_has_openchannel_queue:save",function(c){c.UserId!=b.getCurrentUser().id||_.find(a.table1.data,{id:c.OpenChannelQueueId})||a.table1.data.push({id:c.OpenChannelQueueId,UserHasOpenChannelQueue:c})}),d.socket.on("user_has_openchannel_queue:remove",function(c){c.UserId===b.getCurrentUser().id&&_.remove(a.table1.data,{id:c.OpenChannelQueueId})})})["catch"](function(a){console.error(a)}),h.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.table2.data=b.rows})["finally"](function(){d.socket.on("report_openchannel_session:save",function(b){var c=_.find(a.table2.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&i(function(){_.remove(a.table2.data,{id:b.id})},1e4)):b.leaveAt||a.table2.data.push(b)}),d.socket.on("report_openchannel_session:remove",function(b){_.remove(a.table2.data,{id:b.id})})})["catch"](function(a){console.log(a)})},a.initWidget=function(b){var e;switch(b){case"timeout":case"waiting":e=h;break;default:e=c}return e.get({id:b}).$promise.then(function(c){a[b]=c.value,a.charts={interactions:{labels:[f.instant("APPLICATION_DASHBOARD_NEW"),f.instant("APPLICATION_DASHBOARD_OPEN"),f.instant("APPLICATION_DASHBOARD_PENDING"),f.instant("APPLICATION_DASHBOARD_CLOSED")],values:[a["new"],a.open,a.pending,a.closed],colours:["#44B6AE","#578EBE","#35AA47","#8775A7"]}},d.socket.on("report_openchannel_dashboard:"+b,function(c){a[b]=c.value,a.charts.interactions.values=[a["new"],a.open,a.pending,a.closed]})})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("DashboardSmsCtrl",["$scope","Auth","SmsRoom","socket","Agent","$translate","$q","ReportSmsSession","$timeout",function(a,b,c,d,e,f,g,h,i){a.Auth=b,a.moment=moment,a["new"]=0,a.open=0,a.pending=0,a.closed=0,a.initAgent=function(){a.table1={enableGridMenu:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,multiSelect:!0,columnDefs:[{name:"UserHasSmsQueue.queue",headerCellFilter:"translate",displayName:"APPLICATION_QUEUE",cellClass:"text-center ui-grid-vcenter"}],data:[],onRegisterApi:function(b){a.gridApi=b}},a.table2={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"roomid",displayName:"APPLICATION_INTERACTION_ID",headerCellFilter:"translate"},{name:"accountname",displayName:"APPLICATION_ACCOUNT_NAME",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.application}} <span data-ng-if=\"row.entity.application == 'queue' && row.entity.queuename\">({{row.entity.queuename}})</span></div>"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span><span data-ng-if="!row.entity.leaveAt"> [<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</span></div>"}],data:[],gridMenuTitleFilter:function(a){var b=g.defer();return b.resolve(f.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b}},e.get({id:b.getCurrentUser().id,controller:"sms",controller1:"queues"}).$promise.then(function(b){a.table1.data=b.rows})["finally"](function(){d.socket.on("user_has_sms_queue:save",function(c){c.UserId!=b.getCurrentUser().id||_.find(a.table1.data,{id:c.SmsQueueId})||a.table1.data.push({id:c.SmsQueueId,UserHasSmsQueue:c})}),d.socket.on("user_has_sms_queue:remove",function(c){c.UserId===b.getCurrentUser().id&&_.remove(a.table1.data,{id:c.SmsQueueId})})})["catch"](function(a){console.error(a)}),h.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.table2.data=b.rows})["finally"](function(){d.socket.on("report_sms_session:save",function(b){var c=_.find(a.table2.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&i(function(){_.remove(a.table2.data,{id:b.id})},1e4)):b.leaveAt||a.table2.data.push(b)}),d.socket.on("report_sms_session:remove",function(b){_.remove(a.table2.data,{id:b.id})})})["catch"](function(a){console.log(a)})},a.initWidget=function(b){var e;switch(b){case"timeout":case"waiting":e=h;break;default:e=c}return e.get({id:b}).$promise.then(function(c){a[b]=c.value,a.charts={interactions:{labels:[f.instant("APPLICATION_DASHBOARD_NEW"),f.instant("APPLICATION_DASHBOARD_OPEN"),f.instant("APPLICATION_DASHBOARD_PENDING"),f.instant("APPLICATION_DASHBOARD_CLOSED")],values:[a["new"],a.open,a.pending,a.closed],colours:["#44B6AE","#578EBE","#35AA47","#8775A7"]}},d.socket.on("report_sms_dashboard:"+b,function(c){a[b]=c.value,a.charts.interactions.values=[a["new"],a.open,a.pending,a.closed]})})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("DashboardVoiceCtrl",["$scope","$rootScope","$timeout","Auth","ReportQueue","ReportCall","Agent","VoiceQueue","Dashboard","socket",function(a,b,c,d,e,f,g,h,i,j){a.moment=moment,a.radioSwitch={size:"mini",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"success",onColor:"danger"};var k=function(a,b){var c=a?30*a+130:177;angular.element(document.getElementsByName(b)[0]).css("height",c+"px")};a.initUser=function(){var b;if(a.user=d.getCurrentUser(),a.voice={},a.$on("$destroy",function(){b&&(b.terminate(),j.socket.removeAllListeners("dashboard:voice:waiting"),j.socket.removeAllListeners("dashboard:voice:active"),j.socket.removeAllListeners("dashboard:voice:complete"),j.socket.removeAllListeners("dashboard:voice:abandon"),j.socket.removeAllListeners("dashboard:voice:unmanaged"),j.socket.removeAllListeners("dashboard:voice:holdtime"),j.socket.removeAllListeners("dashboard:voice:talktime"))}),a.onmessage=function(b){a.voice=b.data,a.$apply()},window.Worker){switch(b=new Worker("assets/workers/dashboard/voice/worker.js"),a.user.role){case"admin":h.get().$promise.then(function(a){return b.postMessage({evt:"myQueues",queues:a.rows}),i.get({id:"voice",controller:"init"}).$promise}).then(function(a){a.evt="dashboard:voice:init",b.postMessage(a)})["catch"](function(a){console.error(a)});break;case"user":b.postMessage({evt:"myQueues",queues:a.user.PVoiceQueues}),i.get({id:"voice",controller:"init"}).$promise.then(function(a){a.evt="dashboard:voice:init",b.postMessage(a)})}b.onmessage=a.onmessage}j.socket.on("dashboard:voice:waiting",function(a){a.evt="dashboard:voice:waiting",b.postMessage(a)}),j.socket.on("dashboard:voice:active",function(a){a.evt="dashboard:voice:active",b.postMessage(a)}),j.socket.on("dashboard:voice:complete",function(a){a.evt="dashboard:voice:complete",b.postMessage(a)}),j.socket.on("dashboard:voice:abandon",function(a){a.evt="dashboard:voice:abandon",b.postMessage(a)}),j.socket.on("dashboard:voice:unmanaged",function(a){a.evt="dashboard:voice:unmanaged",b.postMessage(a)}),j.socket.on("dashboard:voice:talktime",function(a){a.evt="dashboard:voice:talktime",b.postMessage(a)}),j.socket.on("dashboard:voice:holdtime",function(a){a.evt="dashboard:voice:holdtime",b.postMessage(a)}),j.socket.on("dashboard:voice:outbound",function(a){a.evt="dashboard:voice:outbound",b.postMessage(a)})},a.initAgent=function(){return a.agent=d.getCurrentUser(),j.socket.on("voice:queue:agent:join",function(b){b.loggedAt=moment().format("YYYY-MM-DD HH:mm:ss"),b.callstaken=0,a.table1.data.push(b)}),j.socket.on("voice:queue:agent:leave",function(b){_.remove(a.table1.data,{queue:b.queue})}),a.table1={enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,enableSorting:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,columnDefs:[{name:"queue",headerCellFilter:"translate",displayName:"APPLICATION_QUEUE",cellClass:"text-center ui-grid-vcenter"},{name:"loggedAt",displayName:"logged At",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span am-time-ago="row.entity.loggedAt"></span></div>'},{name:"lastcall",headerCellFilter:"translate",displayName:"APPLICATION_LAST_CALL",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span am-time-ago="row.entity.lastcall"></span></div>'},{name:"callstaken",headerCellFilter:"translate",displayName:"APPLICATION_CALLS_TAKEN",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>{{row.entity.callstaken || 0}}</span></div>"}],data:[],onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){k(a.table1.paginationPageSize>a.table1.data.length?a.table1.data.length:a.table1.paginationPageSize,"table1")}),a.gridApi.pagination.on.paginationChanged(a,function(b,c){k(c>a.table1.data.length?a.table1.data.length:c,"table1")})}},a.table2={enableGridMenu:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,multiSelect:!1,columnDefs:[{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.queuecallerleaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.queuecallerleaveAt && !row.entity.queuecallercomplete && !row.entity.queuecallerabandon">{{\'APPLICATION_TALKING\' | translate}}</span><span data-ng-if="row.entity.queuecallercomplete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.queuecallerabandon">{{\'APPLICATION_QUEUESTATUS_ABANDON\' | translate}}</span><span data-ng-if="!row.entity.queuecallerleaveAt">[<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"caller",displayName:"APPLICATION_CALLER",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.calleridnum || ''}} {{row.entity.calleridname || ''}}</span></div>",enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"position",displayName:"APPLICATION_POSITION",headerCellFilter:"translate"},{name:"lastAssignedTo",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter"}],data:[],onRegisterApi:function(b){a.gridApi1=b,a.gridApi1.grid.registerDataChangeCallback(function(){k(a.gridApi1.core.getVisibleRows(a.gridApi1.grid).length,"table2")})}},a.table3={exporterCsvFilename:"abandoned_calls.csv",enableRowHeaderSelection:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!1,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,enableSelectAll:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:1,columnDefs:[{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter"},{name:"caller",displayName:"APPLICATION_CALLER",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.calleridnum || ''}} {{row.entity.calleridname || ''}}</div>"},{name:"createdAt",displayName:"APPLICATION_DATE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.updatedAt | date:'yyyy-MM-dd HH:mm:ss'}}</div>"},{name:"lastAssignedTo",cellClass:"text-center ui-grid-vcenter",displayName:"APPLICATION_LAST_ASSIGNED_TO",headerCellFilter:"translate"},{name:"assigned",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellTemplate:'<div class="centered-uigrid-td"><input data-ng-change="grid.appScope.updateItem(row.entity)", bs-switch ng-model="row.entity.assigned" type="checkbox" switch-active="{{ !row.entity.assigned || grid.appScope.agent.name === row.entity.lastAssignedTo }}" switch-on-text="{{ \'APPLICATION_ASSIGNED\' | translate }}" switch-off-text="{{ \'APPLICATION_FREE\' | translate }}" switch-on-color="{{ grid.appScope.radioSwitch.onColor }}" switch-off-color="{{ grid.appScope.radioSwitch.offColor }}" switch-animate="{{ grid.appScope.radioSwitch.animate }}" switch-size="{{ grid.appScope.radioSwitch.size }}" switch-label="{{ grid.appScope.radioSwitch.label }}" switch-icon="{{ grid.appScope.radioSwitch.icon }}" switch-radio-off="{{ grid.appScope.radioSwitch.radioOff }}" switch-label-width="{{ grid.appScope.radioSwitch.labelWidth }}" switch-handle-width="{{ grid.appScope.radioSwitch.handleWidth }}"></div>',enableFiltering:!1}],data:[],onRegisterApi:function(b){a.gridApi2=b,a.gridApi2.grid.registerDataChangeCallback(function(){k(a.gridApi2.core.getVisibleRows(a.gridApi2.grid).length,"table3")})}},g.get({id:d.getCurrentUser().id,controller:"voice",controller1:"queues"}).$promise.then(function(b){a.table1.data=_.map(b.rows,function(a){return{queue:a.UserHasVoiceQueue.queue,loggedAt:a.UserHasVoiceQueue.loggedAt,callstaken:a.UserHasVoiceQueue.callstaken,lastcall:a.UserHasVoiceQueue.lastcall}})})["finally"](function(){k(a.table1.paginationPageSize>a.table1.data.length?a.table1.data.length:a.table1.paginationPageSize,"table1"),j.socket.on("voice:queue:update",function(b){var c=_.find(a.table1.data,{queue:b.queue});c?_.merge(c,b):a.table1.data.push(b)}),j.socket.on("user_has_voice_queue:remove",function(b){b.UserId===d.getCurrentUser().id&&_.remove(a.table1.data,{queue:b.queue})}),j.socket.on("user_has_voice_queue:save",function(b){if(b.UserId===d.getCurrentUser().id){var c=_.find(a.table1.data,{queue:b.queue});!c&&b.logged&&a.table1.data.unshift({queue:b.queue,loggedAt:moment(),lastcall:null,callstaken:0})}})})["catch"](function(a){console.error(a)}),e.get({id:"waiting",controller:"calls"}).$promise.then(function(b){a.table2.data=b.rows})["finally"](function(){j.socket.on("report_queue:save",function(b){a.table2.data.push(b)}),j.socket.on("report_queue:update",function(b){var d=_.find(a.table2.data,{id:b.id});d&&(_.merge(d,b),b.queuecallerleaveAt&&c(function(){_.remove(a.table2.data,{id:b.id})},3e3))})})["catch"](function(a){console.error(a)}),e.get({controller:"abandoned",controller2:"all"}).$promise.then(function(b){a.table3.data=b.rows})["catch"](function(a){console.error(a)})["finally"](function(){j.socket.on("report_queue:update",function(b){b.queuecallerabandon&&a.table3.data.unshift(b)})})},a.updateItem=function(b){return e.update({id:b.id},{assigned:b.assigned,lastAssignedTo:b.assigned?a.agent.name:void 0}).$promise["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.desk",{url:"/desk",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("DeskAccount",["$resource",function(a){return a("/api/desk/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("DeskListCtrl",["$scope","$http","$rootScope","xAlert","$translate","socket","Modal","stResource",function(a,b,c,d,e,f,g,h){a.conf={accountsByPage:{name:"10",value:10}},a.accountsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.accounts={checked:[]},a.check=function(b,c){c?a.accounts.checked=angular.copy(_.map(a.displayedDeskAccounts,"id")):a.accounts.checked=[]},a.getAccounts=function(b){return _.map(a.displayedDeskAccounts,function(a){var c={};return b.forEach(function(b){c[b]=a[b]}),c})},a.initList=function(b){f.unsyncUpdates("desk_account"),b.url="/api/desk/accounts",h.getPage(b).then(function(d){a.displayedDeskAccounts=d.rows,b.pagination.numberOfPages=d.total_pages,c.updateTableConfig(a.accountsByPage,a.displayedDeskAccounts.length),c.updateTableConfig(a.conf.accountsByPage,a.displayedDeskAccounts.length)}),f.socket.on("desk_account:save",function(){a.initList(b)}),f.socket.on("desk_account:remove",function(c){a.accounts.checked=_.without(a.accounts.checked,c.id),a.initList(b)})},a.deleteItem=g.confirm["delete"](function(a){b["delete"]("/api/desk/accounts/"+a).success(function(){d.show(e.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){d.error(a)})}),a.deleteItems=g.confirm["delete"](function(){b["delete"]("/api/desk/accounts",{params:{id:a.accounts.checked}}).success(function(){d.show(e.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){d.error(a)})}),a.checkAccount=function(a){b.get("/api/desk/accounts/"+a+"/check").then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.desk.list",{url:"/list",templateUrl:"app/desk/list/list.html",controller:"DeskListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("DeskViewCtrl",["$scope","$http","$stateParams","$translate","$location","WizardHandler","socket","xAlert","Modal","desk_com",function(a,b,c,d,e,f,g,h,i,j){a.$stateParams=c,a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:500,scrollInertia:0},a.initConfiguration=function(){a.formsConfiguration={},a.configuration={}},a.goNext=function(){f.wizard().next()},a.formValidation=function(a){return a},a.$on("$destroy",function(){g.unsyncUpdates("desk_configuration"),g.unsyncUpdates("desk_field")}),a.initView=function(){b.get("/api/desk/accounts/"+c.id).success(function(b){a.account=b}).error(function(a){h.error(a)})},a.updateItem=function(){b.put("/api/desk/accounts/"+c.id,a.account).success(function(){h.show(d.instant("MESSAGE_WELL_DONE")+".","success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.getConfigurations=function(){b.get("/api/desk/configurations",{params:{AccountId:c.id}}).success(function(b){a.configurations=b,g.socket.on("desk_configuration:remove",function(b){_.remove(a.configurations,{id:b.id})})}).error(function(a){h.error(a)})},a.deleteConfiguration=i.confirm["delete"](function(a){b["delete"]("api/desk/configurations/"+a).success(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}),a.createConfiguration=function(){a.configuration.AccountId=c.id,b.post("api/desk/configurations",a.configuration).success(function(a){e.path("desk/view/"+c.id+"/configurations/settings/"+a.id)}).error(function(){h.show("Something went wrong!","danger")})},a.fieldType=["string","variable"],a.descFieldType=["string","key_value"],a.getFields=function(){b.get("/api/desk/accounts/"+c.id+"/fields").success(function(b){a.accountFields=j.fields.concat(b)}).error(function(a){h.error(a)})},a.getConfiguration=function(){b.get("/api/desk/configurations/"+c.configurationId).success(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,g.socket.on("desk_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})}).error(function(a){h.error(a)})},a.getVariables=function(){b.get("/api/variables").success(function(b){a.variables=b.rows}).error(function(a){h.error(a)})},a.removeItem=function(a){b["delete"]("api/desk/fields/"+a.id).success(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addItemSubject=function(){var d={type:"string",content:""};b.post("/api/desk/configurations/"+c.configurationId+"/subject",d).success(function(b){a.subjectConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.addItemDescription=function(){var d={type:"string",content:""};b.post("/api/desk/configurations/"+c.configurationId+"/description",d).success(function(b){a.descriptionConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.addItemField=function(){var d={content:""};b.post("/api/desk/configurations/"+c.configurationId+"/field",d).success(function(b){a.fieldConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.updateField=function(a){b.put("/api/desk/fields/"+a.id,a).success(function(){}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.changeType=function(b){"variable"===b.type?b.content="":"string"===b.type&&(b.VariableId=null),a.updateField(b)},a.changeDescType=function(b){"key_value"===b.type?(b.content="","string"===b.keyType?b.VariableId=null:"variable"===b.keyType&&(b.keyContent="")):"string"===b.type&&(b.VariableId=null,b.key="",b.keyContent=""),a.updateField(b)},a.changeFieldType=function(b){if(b.content="",b.idField){var c=_.find(a.accountFields,"id",b.idField);c&&(b.customField=_.result(c,"custom",!0))}a.updateField(b)},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"id",b);return c?c.data.choices?c.data.choices:null:void 0}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.desk.view",{url:"/view/:id",templateUrl:"app/desk/view/view.html",controller:"DeskViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.desk.view.account",{url:"/account",templateUrl:"app/desk/view/view.account.html"}).state("main.desk.view.configurations",{url:"/configurations",templateUrl:"app/desk/view/view.configurations.html"}).state("main.desk.view.configurations.settings",{url:"/settings/:configurationId",templateUrl:"app/desk/view/view.configurationSettings.html",controller:"DeskViewCtrl"}).state("main.desk.view.configuration",{url:"/configuration",templateUrl:"app/desk/view/view.configuration.html"})}]),angular.module("xCallyShuttleApp").controller("DeskWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler",function(a,b,c,d,e,f){a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={}},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){console.log(a.item),b.post("api/desk/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/desk/list")}).error(function(){e.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.desk.wizard",{url:"/wizard",templateUrl:"app/desk/wizard/wizard.html",controller:"DeskWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.freshdesk",{url:"/freshdesk",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("FreshdeskAccount",["$resource",function(a){return a("/api/freshdesk/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("FreshdeskListCtrl",["$scope","$http","$rootScope","xAlert","$translate","socket","Modal","stResource",function(a,b,c,d,e,f,g,h){a.conf={accountsByPage:{name:"10",value:10}},a.accountsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.accounts={checked:[]},a.check=function(b,c){c?a.accounts.checked=angular.copy(_.map(a.displayedFreshdeskAccounts,"id")):a.accounts.checked=[]},a.getAccounts=function(b){return _.map(a.displayedFreshdeskAccounts,function(a){var c={};return b.forEach(function(b){c[b]=a[b]}),c})},a.initList=function(b){f.unsyncUpdates("freshdesk_account"),b.url="/api/freshdesk/accounts",h.getPage(b).then(function(d){a.displayedFreshdeskAccounts=d.rows,b.pagination.numberOfPages=d.total_pages,c.updateTableConfig(a.accountsByPage,a.displayedFreshdeskAccounts.length),c.updateTableConfig(a.conf.accountsByPage,a.displayedFreshdeskAccounts.length)}),f.socket.on("freshdesk_account:save",function(){a.initList(b)}),f.socket.on("freshdesk_account:remove",function(c){a.accounts.checked=_.without(a.accounts.checked,c.id),a.initList(b)})},a.deleteItem=g.confirm["delete"](function(a){b["delete"]("/api/freshdesk/accounts/"+a).success(function(){d.show(e.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){d.error(a)})}),a.deleteItems=g.confirm["delete"](function(){b["delete"]("/api/freshdesk/accounts",{params:{id:a.accounts.checked}}).success(function(){d.show(e.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){d.error(a)})}),a.checkAccount=function(a){b.get("/api/freshdesk/accounts/"+a+"/check").then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.freshdesk.list",{url:"/list",templateUrl:"app/freshdesk/list/list.html",controller:"FreshdeskListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("FreshdeskViewCtrl",["$scope","$http","$stateParams","$translate","$location","$filter","WizardHandler","socket","xAlert","Modal",function(a,b,c,d,e,f,g,h,i,j){a.$stateParams=c,a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:500,scrollInertia:0},a.initConfiguration=function(){a.formsConfiguration={},a.configuration={}},a.goNext=function(){g.wizard().next()},a.formValidation=function(a){return a},a.$on("$destroy",function(){h.unsyncUpdates("freshdesk_configuration"),h.unsyncUpdates("freshdesk_field")}),a.initView=function(){b.get("/api/freshdesk/accounts/"+c.id).success(function(b){a.account=b}).error(function(a){i.error(a)})},a.updateItem=function(){b.put("/api/freshdesk/accounts/"+c.id,a.account).success(function(){i.show(d.instant("MESSAGE_WELL_DONE")+".","success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.getConfigurations=function(){b.get("/api/freshdesk/configurations",{params:{AccountId:c.id}}).success(function(b){a.configurations=b,h.socket.on("freshdesk_configuration:remove",function(b){_.remove(a.configurations,{id:b.id})})}).error(function(a){i.error(a)})},a.deleteConfiguration=j.confirm["delete"](function(a){b["delete"]("api/freshdesk/configurations/"+a).success(function(){i.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}),a.createConfiguration=function(){a.configuration.AccountId=c.id,b.post("api/freshdesk/configurations",a.configuration).success(function(a){e.path("freshdesk/view/"+c.id+"/configurations/settings/"+a.id)}).error(function(){i.show("Something went wrong!","danger")})},a.fieldType=["string","variable"],a.descFieldType=["string","key_value"],a.getFields=function(){b.get("/api/freshdesk/accounts/"+c.id+"/fields").success(function(b){a.accountFields=[],b=f("freshdesk")(b),_.forEach(b,function(b){a.accountFields.push(b.ticket_field)})}).error(function(a){i.error(a)})},a.getConfiguration=function(){b.get("/api/freshdesk/configurations/"+c.configurationId).success(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,h.socket.on("freshdesk_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})}).error(function(a){i.error(a)})},a.getVariables=function(){b.get("/api/variables").success(function(b){a.variables=b.rows}).error(function(a){i.error(a)})},a.removeItem=function(a){b["delete"]("api/freshdesk/fields/"+a.id).success(function(){i.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addItemSubject=function(){var d={type:"string",content:""};b.post("/api/freshdesk/configurations/"+c.configurationId+"/subject",d).success(function(b){a.subjectConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.addItemDescription=function(){var d={type:"string",content:""};b.post("/api/freshdesk/configurations/"+c.configurationId+"/description",d).success(function(b){a.descriptionConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.addItemField=function(){var d={content:""};b.post("/api/freshdesk/configurations/"+c.configurationId+"/field",d).success(function(b){a.fieldConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.updateField=function(a){b.put("/api/freshdesk/fields/"+a.id,a).success(function(){}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.changeType=function(b){"variable"===b.type?b.content="":"string"===b.type&&(b.VariableId=null),a.updateField(b)},a.changeDescType=function(b){"key_value"===b.type?(b.content="","string"===b.keyType?b.VariableId=null:"variable"===b.keyType&&(b.keyContent="")):"string"===b.type&&(b.VariableId=null,b.key="",b.keyContent=""),a.updateField(b)},a.changeFieldType=function(b){if(b.content="",b.idField){var c=_.find(a.accountFields,"name",b.idField);c&&(b.customField=!_.result(c,"default",!0))}a.updateField(b)},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"name",b);return c?c.choices.length>0?c.choices:null:void 0}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.freshdesk.view",{url:"/view/:id",templateUrl:"app/freshdesk/view/view.html",controller:"FreshdeskViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.freshdesk.view.account",{url:"/account",templateUrl:"app/freshdesk/view/view.account.html"}).state("main.freshdesk.view.configurations",{url:"/configurations",templateUrl:"app/freshdesk/view/view.configurations.html"}).state("main.freshdesk.view.configurations.settings",{url:"/settings/:configurationId",templateUrl:"app/freshdesk/view/view.configurationSettings.html",controller:"FreshdeskViewCtrl"}).state("main.freshdesk.view.configuration",{url:"/configuration",templateUrl:"app/freshdesk/view/view.configuration.html"})}]),angular.module("xCallyShuttleApp").controller("FreshdeskWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler",function(a,b,c,d,e,f){
-a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={}},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){console.log(a.item),b.post("api/freshdesk/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/freshdesk/list")}).error(function(){e.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.freshdesk.wizard",{url:"/wizard",templateUrl:"app/freshdesk/wizard/wizard.html",controller:"FreshdeskWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.iframe",{url:"/iframe",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("IframeViewCtrl",["$scope","Auth","Integration","xAlert","$translate","$sce",function(a,b,c,d,e,f){a.Auth=b,a.initView=function(){return c.get({state:"iframe"}).$promise.then(function(c){a.iframe=_.first(c.rows),a.iframe.remoteUri?a.url=f.trustAsResourceUrl(a.iframe.remoteUri):b.isAgent()&&d.show(e.instant("MESSAGE_NO_IFRAME_CONFIGURED")+".","danger")})["catch"](function(a){d.error(a)})},a.updateItem=function(){return b.isAgent()?void 0:c.update({id:a.iframe.id},a.iframe).$promise.then(function(){d.show(e.instant("MESSAGE_WELL_DONE")+".","success")})["catch"](function(a){d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.iframe.view",{url:"/view",templateUrl:"app/iframe/view/view.html",controller:"IframeViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("Integration",["$resource",function(a){return a("/api/integrations/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.integrations",{url:"/integrations",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:19}}})}]),angular.module("xCallyShuttleApp").controller("IntegrationListCtrl",["$scope","Modal","socket","FileUploader","Integration","xAlert",function(a,b,c,d,e,f){a.integrationsByPage=10;var g=a.uploader=new d({url:"api/integrations",autoUpload:!0,removeAfterUpload:!0});g.filters.push({name:"zipFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|zip|".indexOf(b)}}),g.onSuccessItem=function(a,b,c,d){console.info("onSuccessItem",a,b,c,d),f.show(b.name,"success")},g.onErrorItem=function(a,b,c,d){console.info("onErrorItem",a,b,c,d),b.errors.forEach(function(a){f.error(err)})},a.deleteItem=b.confirm["delete"](function(a){e["delete"]({id:a},function(){f.show("Integration Removed","success")},function(a){f.error(a)})}),a.initList=function(){a.integrations=e.query({},function(a){c.syncUpdates("integration",a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.integrations.list",{url:"/list",templateUrl:"app/integration/list/list.html",controller:"IntegrationListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty",{url:"/jscripty",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("JscriptyProject",["$resource",function(a){return a("/api/jscripty/projects/:id/:controller/:action/:action2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("JscriptyProjectListCtrl",["$scope","$uibModal","JscriptyProject","gridOptions","Auth",function(a,b,c,d,e){a.Auth=e,a.initView=function(){var b={exporterCsvFilename:"jscriptyProjects.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:300,buttons:[{"class":"blue-hoki",icon:"icon-settings",href:"/jscripty/projects/view/{{row.entity.id}}",hide:e.isAgent()},{"class":" green-turquoise",icon:"fa fa-play",onClick:"grid.appScope.openJscriptyTab(row.entity)"},{"class":"purple",icon:"icon-book-open",href:"/jscripty/projects/report/{{row.entity.id}}/sessions",hide:e.isAgent()},{"class":"red-sunglo",icon:"fa fa-trash",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)",hide:e.isAgent()}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/jscripty/project/list/list.create.modal.html",controller:"JscriptyProjectListCreateCtrl"});c.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("JscriptyProjectListCreateCtrl",["$scope","$translate","$uibModalInstance","JscriptyProject","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){console.log(a),e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty.projects.list",{url:"/list",templateUrl:"app/jscripty/project/list/list.html",controller:"JscriptyProjectListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty.projects",{url:"/projects",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("JscriptyProjectReportCtrl",["$scope","uiGridConstants","$http","$state","$stateParams","socket","Auth","Modal","xAlert","$translate","$rootScope","gridOptions","JscriptyProject","$location",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){a.projectStats={started:0,incomplete:0,completed:0},a.projectId=e.id,a.initView=function(){m.get({id:e.id}).$promise.then(function(b){a.project=b})["catch"](function(a){i.error(a)}),m.get({id:e.id,controller:"sessions"}).$promise.then(function(b){var c=_.groupBy(b.rows,"status");a.projectStats.started=c.started?c.started.length:0,a.projectStats.completed=c.completed?c.completed.length:0,a.projectStats.incomplete=c.incomplete?c.incomplete.length:0})["catch"](function(a){i.error(a)})},a.pdf=function(a,b){var c=[];if(a){var d=html2canvas(document.getElementById(a)),e=d.parse(),f=d.render(e),g=f.toDataURL("image/png");c.push({image:g,width:500,style:"img"})}b.length&&_.forEach(b,function(a){var b=html2canvas(document.getElementById(a.question_id)),d=b.parse(),e=b.render(d),f=e.toDataURL("image/png");c.push({image:f,width:500,style:"img"})});var h={content:c};pdfMake.createPdf(h).download("Project_summary.pdf")},a.getProjectSessions=function(){var c={exporterCsvFilename:"jscriptyProjects.csv",columnDefs:[{name:"session_id",displayName:"APPLICATION_SESSIONID"},{name:"queue",displayName:"APPLICATION_QUEUE"},{name:"membername",displayName:"APPLICATION_AGENT"},{name:"calleridnum",displayName:"APPLICATION_CALLERIDNUM"},{name:"createdAt",displayName:"APPLICATION_STARTEDAT",filterHeaderTemplate:'<div class="ui-grid-filter-container row"><div ng-repeat="colFilter in col.filters" class="col-md-6 col-md-offset-0 col-sm-5 col-sm-offset-0 col-xs-5 col-xs-offset-0"><div custom-grid-date-filter-header></div></div></div>',filters:[{name:"From",condition:b.filter.GREATER_THAN_OR_EQUAL},{name:"To",condition:b.filter.LESS_THAN_OR_EQUAL}]},{name:"completedAt",displayName:"APPLICATION_COMPLETEDAT",filterHeaderTemplate:'<div class="ui-grid-filter-container row"><div ng-repeat="colFilter in col.filters" class="col-md-6 col-md-offset-0 col-sm-5 col-sm-offset-0 col-xs-5 col-xs-offset-0"><div custom-grid-date-filter-header></div></div></div>',filters:[{name:"From",condition:b.filter.GREATER_THAN_OR_EQUAL},{name:"To",condition:b.filter.LESS_THAN_OR_EQUAL}]},{name:"status",displayName:"APPLICATION_STATUS"},{name:"last_question_id",displayName:"APPLICATION_LASTQUESTIONID"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/jscripty/projects/report/{{row.entity.projectId}}/session/{{row.entity.session_id}}",name:"Detail"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteSession(row.entity.session_id)"}]}]};a.gridOptions=l.gridOptions(m,c,a,{id:e.id,controller:"sessions"})},a.deleteSession=function(b){m["delete"]({id:e.id,controller:"sessions",action:b}).$promise.then(function(b){a.gridOptions.getPage(),a.initView(),i.show(j.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){i.error(a)})},a.getSessionDetails=function(){m.get({id:e.id,controller:"sessions",action:e.sessionId}).$promise.then(function(b){a.session=b,a.sessionQuestions=b.ReportJscriptyQuestions})["catch"](function(a){i.error(a)})},a.getQuestionSummary=function(){var b={exporterCsvFilename:"jscriptyProjects.csv",columnDefs:[{name:"question_id",displayName:"APPLICATION_QUESTIONID"},{name:"question_type",displayName:"APPLICATION_QUESTIONTYPE"},{name:"question_label",displayName:"APPLICATION_QUESTIONLABEL"},{name:"question_text",displayName:"APPLICATION_QUESTION"},{name:"count",displayName:"APPLICATION_COUNT",enableFiltering:!1},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/jscripty/projects/report/"+e.id+"/detail/{{row.entity.question_id}}",name:"Detail"}]}]};a.gridOptions=l.gridOptions(m,b,a,{id:e.id,controller:"questions",action:"summary"})},a.getQuestionInputs=function(){var b={exporterCsvFilename:"jscriptyProjects.csv",columnDefs:[{name:"session_id",displayName:"APPLICATION_SESSIONID"},{name:"question_id",displayName:"APPLICATION_QUESTIONID",enableFiltering:!1},{name:"question_label",displayName:"APPLICATION_QUESTIONLABEL",enableFiltering:!1},{name:"question_text",displayName:"APPLICATION_QUESTION",enableFiltering:!1},{name:"input_label",displayName:"APPLICATION_INPUTLABEL",enableFiltering:!1},{name:"input_value",cellTemplate:'<div uib-tooltip="{{row.entity.input_value}}">{{row.entity.input_value}}</div>',displayName:"APPLICATION_INPUTVALUE",enableFiltering:!1}]};a.gridOptions=l.gridOptions(m,b,a,{id:e.id,controller:"inputs"})},a.getProjectDetail=function(){a.projectDetail=[],m.query({id:e.id,controller:"questions",action:"detail"}).$promise.then(function(b){console.log(e.questionId),e.questionId?a.projectDetail.push(_.find(b,function(a){return a.question_id==parseInt(e.questionId)})):a.projectDetail=b,console.log(a.projectDetail)})["catch"](function(a){i.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty.projects.report",{url:"/report/:id",templateUrl:"app/jscripty/project/report/report.html",controller:"JscriptyProjectReportCtrl"}).state("main.jscripty.projects.report.sessions",{url:"/sessions",templateUrl:"app/jscripty/project/report/report.sessions.html"}).state("main.jscripty.projects.report.summary",{url:"/summary",templateUrl:"app/jscripty/project/report/report.summary.html"}).state("main.jscripty.projects.report.inputs",{url:"/inputs",templateUrl:"app/jscripty/project/report/report.inputs.html"}).state("main.jscripty.projects.report.detail",{url:"/detail",templateUrl:"app/jscripty/project/report/report.detail.html"}).state("main.jscripty.projects.report.questionDetail",{url:"/detail/:questionId",controller:"JscriptyProjectReportCtrl",templateUrl:"app/jscripty/project/report/report.detail.html"}).state("main.jscripty.projects.report.sessionDetail",{url:"/session/:sessionId",controller:"JscriptyProjectReportCtrl",templateUrl:"app/jscripty/project/report/report.session.detail.html"})}]),angular.module("xCallyShuttleApp").controller("JscriptyProjectViewCtrl",["$scope","$http","$state","$stateParams","socket","Auth","Modal","xAlert","$translate","$rootScope",function(a,b,c,d,e,f,g,h,i,j){a.jscriptyProject={},a.getProject=function(){b.get("/api/jscripty/projects/"+d.id).success(function(b){a.jscriptyProject=b,angular.element(document).ready(function(){window.onerror=function(a,b,c){try{if(null!=a&&-1!=a.indexOf("Script error."));else{var d=new Image;d.src="assets/plugins/mxgraph/images/1x1.png?msg="+encodeURIComponent(a)+"&url="+encodeURIComponent(b)+"&lnum="+encodeURIComponent(c)}}catch(e){}},b.token=f.getToken();var a=new EditorUi(new Editor);a.openString(b.draft,b.name,b),a.editor.graphChangeListener=function(a,b){var c=b.properties.rtChange||!1;c||(this.modified=!0)}}),e.syncUpdates("jscripty_project",[b],function(a,c,d){c.id===b.id})})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty.projects.view",{url:"/view/:id",templateUrl:"app/jscripty/project/view/view.html",controller:"JscriptyProjectViewCtrl",authenticate:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",serie:!0,cache:!1,files:["assets/plugins/mxgraph/css/common.css","assets/plugins/mxgraph/css/explorer.css","assets/plugins/mxgraph/styles/grapheditor.css","assets/plugins/mxgraph/styles/custom.css","assets/plugins/jscripty/js/custom.js","assets/plugins/mxgraph/js/mxClient.js","assets/plugins/jscripty/js/Editor.js","assets/plugins/jscripty/js/Graph.js","assets/plugins/jscripty/js/EditorUi.js","assets/plugins/jscripty/js/Actions.js","assets/plugins/jscripty/js/Menus.js","assets/plugins/jscripty/js/Sidebar.js","assets/plugins/jscripty/js/Toolbar.js","assets/plugins/jscripty/js/Dialogs.js"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("LandingCtrl",["$scope","$location","$window","$timeout","Auth","Setting","YourDashboard",function(a,b,c,d,e,f,g){function h(b,c){var d,f,g=b.length;for(d=0;g>d;d++)if(_.includes(c,b[d].id))if(b[d].SubModules&&b[d].SubModules.length){if(f=h(b[d].SubModules,c))return f}else switch(b[d].id){case 2:var i={};i[e.getRole()]=!0;var j=_.find(a.tempDashboards,i);if(j)return"/tools/yourdashboards/show/"+j.id;break;default:return b[d].path}}function i(c){c||(a.message="MESSAGE_NO_AVAILABLE_MODULES"),d(function(){b.path(c)},500)}a.initLanding=function(){a.year=moment().year(),f.get({controller:"info"}).$promise.then(function(b){a.info=b})["catch"](function(a){console.error(a)});var c,d;return(d=e.getCurrentUser().$promise)?d.then(function(b){switch(c=b,c.role){case"user":if(_.includes(_.map(b.Modules,"id"),2))return g.get().$promise.then(function(d){a.tempDashboards=d.rows,i(h(c.Modules,_.map(b.Modules,"id")))})["catch"](function(){_.remove(c.Modules,{id:2}),i(h(c.Modules,_.map(b.Modules,"id")))});i(h(c.Modules,_.map(b.Modules,"id")));break;case"admin":case"agent":i("/dashboard/voice")}})["catch"](function(a){console.error(a),b.path("/login")}):void b.path("/login")}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("landing",{url:"/landing",templateUrl:"app/landing/landing.html",controller:"LandingCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/error.css","assets/css/login.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("LoginCtrl",["$scope","Auth","$location","$window","$rootScope","Setting","xAlert","$stateParams",function(a,b,c,d,e,f,g,h){a.year=moment().year(),a.recovered=h.reset,a.userLogin={},a.userSignUp={},a.loginSubmitted=!1,a.signupSubmitted=!1,a.errorLogin=!1,a.errorSignup=!1,a.errorLog="",a.forgotPassword=!1,a.showRecoverMessage=!1,a.flagLogin1=!1,a.getInfo=function(){return f.get({controller:"info"}).$promise.then(function(b){a.info=b})["catch"](function(a){console.error(a)})},a.toggleLogin=function(){a.flagLogin1=!a.flagLogin1},a.toggleForgotPassword=function(b){a.showRecoverMessage=!1,a.userLogin.email="",a.forgotPassword=b},e.bodyLayout="login",a.$on("$viewContentLoaded",function(){Metronic.init(),Layout.init()}),a.recover=function(){b.recover({email:a.userLogin.email}).then(function(){a.showRecoverMessage=!0})["catch"](function(b){console.log(b),a.showRecoverMessage=!1,g.error(b)})},a.login=function(d){a.loginSubmitted=!0,d.$valid?b.login({name:a.userLogin.name,password:a.userLogin.password,remember:a.userLogin.remember}).then(function(){c.path("/landing")})["catch"](function(b){a.errorLog=b.message||"error",a.errorLogin=!0}):a.errorLogin=!0},a.signup=function(c){a.signupSubmitted=!0,c.$valid?b.createUser({email:a.userSignUp.email,fullname:a.userSignUp.fullname,name:a.userSignUp.name,password:a.userSignUp.password,role:a.userSignUp.role,online:!0})["catch"](function(b){a.errorLog=b.message||"error",a.errorSignup=!0}):a.errorSignup=!0},a.loginOauth=function(a){d.location.href="/auth/"+a}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("login",{url:"/login",templateUrl:"app/login/login.html",params:{reset:null},controller:"LoginCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/login.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("Action",["$resource",function(a){return a("/api/actions/:name/:controller",{name:"@name"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("Ami",["$resource",function(a){return a("/api/ami/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("ChooseContactModalCtrl",["$scope","$uibModalInstance","data","xAlert","$translate","Contact",function(a,b,c,d,e,f){function g(){return f.get({id:c.eventId,controller:"checkevent"}).$promise.then(function(b){a.contacts=b.rows})["catch"](function(a){d.error(a)})}function h(){return delete c.type,f.get(c).$promise.then(function(b){a.contacts=b.rows})["catch"](function(a){d.error(a)})}a.open=function(a){b.close(a)},a.getContacts=function(){switch(c.type){case"event":g();break;case"detail":h();break;default:b.dismiss("cancel")}},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("CloseEditedTabModalCtrl",["$scope","$uibModalInstance",function(a,b){a.close=function(){b.close()},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("CloseEditedTabModalJscriptyCtrl",["$scope","$uibModalInstance","project","JscriptyProject","xAlert",function(a,b,c,d,e){a.init=function(){a.project=c},a.close=function(){d.update({id:a.project.projectId,controller:"sessions",action:a.project.sessionId},{status:"incomplete",completedAt:Date(),last_question_id:a.project.lastQuestionId}).$promise.then(function(a){e.show("Project Ended","success")}),b.close()},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ContactManagerSetDisposition",["$scope","$uibModalInstance","VoiceDisposition",function(a,b,c){a.initDisposition=function(){return c.get().$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a)})},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").controller("customGridDateFilterModalCtrl",["$scope","$rootScope","$log","$uibModalInstance","term","hasTime",function(a,b,c,d,e,f){if(a.hasTime=f,a.dateTime={},e)if(f){var g=e.split(" ");a.dateTime.filterDate=moment(g[0]),a.dateTime.time=e[1]?moment(g[1],"HH:mm"):moment()}else a.dateTime.filterDate=moment(e);else f&&(a.dateTime.time=moment());a.setFilterDate=function(b){d.close({date:moment(b).format("YYYY-MM-DD").toString(),time:f?a.dateTime.time?moment(a.dateTime.time).format("HH:mm").toString():moment().format("HH:mm").toString():null})},a.cancelDateFilter=function(){d.dismiss()}}]),angular.module("xCallyShuttleApp").controller("customGridTagsModalCtrl",["$scope","$rootScope","$log","$uibModalInstance","term","Tag","xAlert",function(a,b,c,d,e,f,g){a.initModal=function(){return a.item={},f.get().$promise.then(function(b){a.tags=_.map(b.rows,"name"),a.item.myTags=e})["catch"](function(a){console.log("error retrieving tags"),g.error(a),d.dismiss()})},a.setFilterTags=function(){d.close(a.item.myTags)},a.cancelTagsFilter=function(){d.dismiss()}}]),angular.module("xCallyShuttleApp").factory("templateVariable",["$translate",function(a){return[{id:"voice",label:a.instant("APPLICATION_VOICE"),title:a.instant("APPLICATION_VOICE"),groups:[{label:a.instant("APPLICATION_QUEUE"),values:[{value:"{{uniqueid}}",label:a.instant("APPLICATION_UNIQUEID"),description:a.instant("APPLICATION_UNIQUEID")},{value:"{{calleridnum}}",label:a.instant("APPLICATION_CALLERIDNUM"),description:a.instant("APPLICATION_CALLERIDNUM")},{value:"{{calleridname}}",label:a.instant("APPLICATION_CALLERIDNAME"),description:a.instant("APPLICATION_CALLERIDNAME")},{value:"{{queue}}",label:a.instant("APPLICATION_QUEUE"),description:a.instant("APPLICATION_QUEUE")},{value:"{{interface}}",label:a.instant("APPLICATION_INTERFACE"),description:a.instant("APPLICATION_INTERFACE")},{value:"{{membername}}",label:a.instant("APPLICATION_MEMBERNAME"),description:a.instant("APPLICATION_MEMBERNAME")},{value:"{{holdtime}}",label:a.instant("APPLICATION_HOLDTIME"),description:a.instant("APPLICATION_HOLDTIME")},{value:"{{talktime}}",label:a.instant("APPLICATION_TALKTIME"),description:a.instant("APPLICATION_TALKTIME")},{value:"{{connectedlinenum}}",label:a.instant("APPLICATION_CONNECTEDLINENUM"),description:a.instant("APPLICATION_CONNECTEDLINENUM")},{value:"{{connectedlinename}}",label:a.instant("APPLICATION_CONNECTEDLINENAME"),description:a.instant("APPLICATION_CONNECTEDLINENAME")},{value:"{{agentconnectAt}}",label:a.instant("APPLICATION_CONNECTED_AT"),description:a.instant("APPLICATION_CONNECTED_AT")},{value:"{{agentcalledAt}}",label:a.instant("APPLICATION_CALLED_AT"),description:a.instant("APPLICATION_CALLED_AT")},{value:"{{agentcompleteAt}}",label:a.instant("APPLICATION_COMPLETED_AT"),description:a.instant("APPLICATION_AGENT_CALLED_AT")},{value:"{{reason}}",label:a.instant("APPLICATION_REASON"),description:a.instant("APPLICATION_REASON")},{value:"{{lastevent}}",label:a.instant("APPLICATION_LAST_EVENT"),description:a.instant("APPLICATION_LAST_EVENT")},{value:"{{channel}}",label:a.instant("APPLICATION_CHANNEL"),description:a.instant("APPLICATION_CHANNEL")}]}]},{id:"chat",label:a.instant("APPLICATION_CHAT"),title:a.instant("APPLICATION_CHAT"),groups:[{label:a.instant("APPLICATION_VARIABLES"),values:[{value:"{{username}}",label:a.instant("APPLICATION_USERNAME"),description:a.instant("APPLICATION_USERNAME")},{value:"{{email}}",label:a.instant("APPLICATION_MAIL"),description:a.instant("APPLICATION_MAIL")},{value:"{{text}}",label:a.instant("APPLICATION_TEXT"),description:a.instant("APPLICATION_TEXT")},{value:"{{chatWebsite}}",label:a.instant("APPLICATION_WEBSITE"),description:a.instant("APPLICATION_WEBSITE")}]}]},{id:"mail",label:a.instant("APPLICATION_MAIL"),title:a.instant("APPLICATION_MAIL"),groups:[{label:a.instant("APPLICATION_INTERACTION"),values:[{value:"{{interactionId}}",label:a.instant("APPLICATION_INTERACTION_ID"),description:a.instant("APPLICATION_INTERACTION_ID")},{value:"{{subject}}",label:a.instant("APPLICATION_SUBJECT"),description:a.instant("APPLICATION_SUBJECT")},{value:"{{{body}}}",label:a.instant("APPLICATION_MESSAGE"),description:a.instant("APPLICATION_MESSAGE")},{value:"{{accountName}}",label:a.instant("APPLICATION_ACCOUNT"),description:a.instant("APPLICATION_ACCOUNT")},{value:"{{from}}",label:"From",description:"From"},{value:"{{to}}",label:"To",description:"To"},{value:"{{cc}}",label:"Cc",description:"Cc"},{value:"{{agentName}}",label:a.instant("APPLICATION_AGENT_NAME"),description:a.instant("APPLICATION_AGENT_NAME")},{value:"{{agentEmail}}",label:a.instant("APPLICATION_AGENT_EMAIL"),description:a.instant("APPLICATION_AGENT_EMAIL")},{value:"{{createdAt}}",label:a.instant("APPLICATION_CREATED_AT"),description:a.instant("APPLICATION_CREATED_AT")}]}]}]}]),angular.module("xCallyShuttleApp").controller("gridDatePickerFilterCtrl",["$scope","$timeout","$uibModal","uiGridConstants",function(a,b,c,d){b(function(){a.col.colDef.name;a.openDatePicker=function(b){var d=c.open({templateUrl:"app/main/customDateFilter.modal.html",controller:"customGridDateFilterModalCtrl",size:"md",windowClass:"custom-date-filter-modal",resolve:{term:[function(){return b.term||null}],hasTime:b.hasTime||!1}});d.result.then(function(c){a.colFilter.listTerm=[],a.colFilter.term=c.date,b.hasTime&&(a.colFilter.term+=" "+c.time)})}})}]),angular.module("xCallyShuttleApp").factory("gridOptions",["Modal","xAlert","$translate","$interval","$q","usSpinnerService",function(a,b,c,d,e,f){return{gridOptions:function(d,g,h,i,j,k,l){function m(a,b){a.filter&&a.filter.term&&b&&(o[a.name]=a.filter.term),a.filters&&(a.filters.length>1?a.filters.forEach(function(b){b.term?64===b.condition?o[a.name+"_uiFrom"]=b.term:256===b.condition&&(o[a.name+"_uiTo"]=b.term):64===b.condition?delete o[a.name+"_uiFrom"]:256===b.condition&&delete o[a.name+"_uiTo"]}):a.filters.length&&a.filters[0].term?o[a.name]=a.filters[0].term:delete o[a.name])}h.id=[];var n=k?"gridOptions"+k:"gridOptions",o={offset:0,limit:10},p={offset:0,limit:10};g.draggable&&(g.rowTemplate='<div grid="grid" class="ui-grid-draggable-row" draggable="true"><div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ng-class="{ \'ui-grid-row-header-cell\': col.isRowHeader, \'custom\': true }" ui-grid-cell></div></div>',g.useExternalPagination=!1,g.enablePaginationControls=!1,g.showGridFooter=!1);var q=function(a){var b=a&&a>h[n].paginationPageSize?h[n].paginationPageSize:a,c=b?30*b+120:177,d=angular.element(document.getElementsByName(n)).length?angular.element(document.getElementsByName(n)[0]):angular.element(document.getElementsByClassName("ui-grid")[0]);d.css("height",c+"px")},r=function(a,b){return h[n].enablePaginationControls||(delete o.offset,delete o.limit),f.spin("spinner-grid"),i=a||i,d=b||d,d.get(i?_.merge(o,i):o).$promise.then(function(a){h[n].totalItems=a.count,h[n].data=a.rows,q(a.rows.length),l&&l()})["catch"](function(a){console.error(a)})["finally"](function(){f.stop("spinner-grid")})};return h.deleteItem=a.confirm["delete"](function(a){var e=i?angular.copy(i):{};return _.merge(e,{id:a}),d.remove(e).$promise.then(function(){r(),b.show(c.instant("MESSAGE_WELL_DONE")+"!","success"),h.gridApi.selection.clearSelectedRows(),h.id=[]})["catch"](function(a){b.error(a)})}),h.deleteItems=a.confirm["delete"](function(){var a=i?angular.copy(i):{};return _.merge(a,{ids:h.id}),d["delete"](a).$promise.then(function(){r(),b.show(c.instant("MESSAGE_WELL_DONE")+"!","success"),h.gridApi.selection.clearSelectedRows(),h.id=[]})["catch"](function(a){b.error(a)})}),g.columnDefs.forEach(function(a){m(a,!0),a.hasOwnProperty("displayName")||(a.displayName="APPLICATION_"+a.name.toUpperCase()),a.headerCellFilter="translate",a.hasOwnProperty("buttons")&&(a.displayName="",a.cellClass="ui-grid-vcenter",a.enableSorting=!1,a.enableFiltering=!1,a.enableColumnMenu=!1,a.cellTemplate="<div>",a.buttons.forEach(function(b){if(b.directive)a.cellTemplate+=b.directive;else{if(a.cellTemplate+="<a",a.cellTemplate+=b.hide?' data-ng-hide="'+b.hide+'" ':" ",a.cellTemplate+=b["class"]?' class="btn btn-xs '+b["class"]+'" ':" ",a.cellTemplate+=b.href?' data-ng-href="'+b.href+'" ':" ",a.cellTemplate+=b.uisref?' ui-sref="'+b.uisref+'" ':" ",a.cellTemplate+=b.onClick?' data-ng-click="'+b.onClick+'" ':" ",a.cellTemplate+=b.title?' title="'+b.title+'"':"",a.cellTemplate+=">",a.cellTemplate+=b.icon?'<i class="'+b.icon+'"></i>':"",b.name)switch(b.name){case"delete":a.cellTemplate+='<i class="icon-trash" title="'+b.name+'"></i>';break;case"profile":case"settings":case"detail":case"embedding":a.cellTemplate+='<i class="icon-settings" title="'+b.name+'"></i>';break;case"view":a.cellTemplate+='<i class="icon-doc" title="'+b.name+'"></i>';break;case"clone":a.cellTemplate+='<i class="icon-docs" title="'+b.name+'"></i>';break;case"permits":a.cellTemplate+='<i class="icon-key"></i>';break;case"copy":a.cellTemplate+='<i class="fa fa-files-o" title="'+b.name+'"></i>';break;case"select":a.cellTemplate+='<i class="icon-check" title="'+b.name+'"></i>';break;case"preview":a.cellTemplate+='<i class="icon-magnifier" title="'+b.name+'"></i>';break;case"contacts":a.cellTemplate+='<i class="fa fa-users" title="'+b.name+'"></i>';break;case"download":case"export":a.cellTemplate+='<i class="fa fa-download" title="'+b.name+'"></i>';break;case"agents":a.cellTemplate+='<i class="icon-people" title="'+b.name+'"></i>';break;case"run":a.cellTemplate+='<i class="fa fa-cogs" title="'+b.name+'"></i>';break;case"mailRoom":a.cellTemplate+='<i class="fa fa-envelope"></i>';break;case"chatRoom":a.cellTemplate+='<i class="fa fa-users"></i>';break;case"faxRoom":a.cellTemplate+='<i class="fa fa-fax"></i>';break;case"smsRoom":a.cellTemplate+='<i class="glyphicon glyphicon-comment"></i>';break;case"check":a.cellTemplate+='<i class="fa fa-check" title="'+b.name+'"></i>';break;case"queues":a.cellTemplate+='<i class="icon-docs" title="'+b.name+'"></i>';break;default:a.cellTemplate+="{{'APPLICATION_"+b.name.toUpperCase()+"' | translate}}"}else a.cellTemplate+=b.displayName?"{{'"+b.displayName+"' | translate}}":"";a.cellTemplate+="</a> "}}),a.cellTemplate+="<div>",delete a.buttons)}),_.merge({enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableRowSelection:!0,enableSelectAll:!0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,getPage:r,gridMenuTitleFilter:function(a){var b=e.defer();return b.resolve(c.instant(a)),b.promise},exporterAllDataFn:function(){return p.offset=o.offset,p.limit=o.limit,o={offset:0,limit:null},r().then(function(){o.offset=p.offset,o.limit=p.limit,r()})},exporterFieldCallback:function(a,b,c,d){if("applications"===c.field&&b.entity.Applications){var e="";return _.forEach(b.entity.Applications,function(a){e+=a.app+"("+a.appdata.join(",")+")"}),e}return d},exporterHeaderFilter:c.instant,onRegisterApi:function(a){h.gridApi=a,h.gridApi.selection&&(h.gridApi.selection.on.rowSelectionChanged(h,function(a){a.isSelected?h.id.push(h.gridApi.grid.options.primaryKey?a.entity[h.gridApi.grid.options.primaryKey]:a.entity.id):_.pull(h.id,h.gridApi.grid.options.primaryKey?a.entity[h.gridApi.grid.options.primaryKey]:a.entity.id)}),h.gridApi.selection.on.rowSelectionChangedBatch(h,function(a){a[0].isSelected?h.id=_.union(h.id,_.map(a,h.gridApi.grid.options.primaryKey?"entity."+h.gridApi.grid.options.primaryKey:"entity.id")):_.map(a,h.gridApi.grid.options.primaryKey?"entity."+h.gridApi.grid.options.primaryKey:"entity.id").forEach(function(a){_.pull(h.id,a)})})),h.gridApi.core.on.sortChanged(h,function(a,b){0===b.length?o.order=null:o.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),r()});for(var e=0;e<h.gridOptions.columnDefs.length;e++)if(h.gridOptions.columnDefs[e].hasOwnProperty("sort")){o.order=h.gridOptions.columnDefs[e].name+" "+h.gridOptions.columnDefs[e].sort.direction.toUpperCase();break}h.gridApi.pagination.on.paginationChanged(h,function(a,b){o.offset=(a-1)*b,o.limit=b,r()}),h.gridApi.core.on.filterChanged(h,function(){var a=this.grid;a.columns.forEach(function(a){m(a)}),r()}),h.gridApi.draggableRows&&h.gridApi.draggableRows.on.rowDropped(h,function(a){a.fromIndex!==a.toIndex&&d.update(i,h[n].data).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){b.error(a)})["finally"](function(){r()})}),j||r()}},g)}}}]),angular.module("xCallyShuttleApp").controller("gridTagsFilterCtrl",["$scope","$timeout","$uibModal","uiGridConstants",function(a,b,c,d){b(function(){a.col.colDef.name;a.openTags=function(b){var d=c.open({templateUrl:"app/main/customTagsFilter.modal.html",controller:"customGridTagsModalCtrl",size:"md",resolve:{term:[function(){if(b.term){var a=b.term.split(";");return a.pop(),a}return[]}]}});d.result.then(function(b){a.colFilter.listTerm=[],b.length&&(a.colFilter.term=b.join(";")+";")})}})}]),angular.module("xCallyShuttleApp").controller("MainCtrl",["$scope","$rootScope","$translate","$timeout","socket","Auth","xAlert","$uibModal","$log","$state","Contact","$window","$location","localStorageService",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){
-function o(){b.activeTour={main:!1},b.tourConfig={main:[{type:"function",fn:function(){b.tempTourPath=m.path()}},{type:"title",heading:c.instant("TOUR_MAIN_WELCOME"),text:'<div class="row"><div id="title-text" class="col-md-12"><span class="main-text">'+c.instant("TOUR_MAIN_DISCOVER_MOTION")+"</span><br/></div></div>",curtainClass:"myCurtainClass"}]},(f.isAdmin()||b.userModules[1])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/dashboard/voice"},{type:"title",heading:c.instant("TOUR_MAIN_DASHBOARD"),text:c.instant("TOUR_MAIN_DASHBOARD_MESSAGE"),curtainClass:"myCurtainClass"}])),(f.isAdmin()||b.userModules[2])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/tools/yourdashboards/show/1"},{type:"title",heading:c.instant("TOUR_MAIN_YOURDASHBOARD"),text:c.instant("TOUR_MAIN_YOURDASHBOARD_MESSAGE"),curtainClass:"myCurtainClass"}])),(f.isAdmin()||b.userModules[4])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/staff/agents/list"},{type:"title",heading:c.instant("TOUR_MAIN_AGENTS"),text:c.instant("TOUR_MAIN_AGENTS_MESSAGE"),curtainClass:"myCurtainClass"}])),f.isAdmin()&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/channels/voice/queues/list"},{type:"title",heading:c.instant("TOUR_MAIN_VOICE_QUEUE"),text:c.instant("TOUR_MAIN_VOICE_QUEUE_ADD_MESSAGE"),curtainClass:"myCurtainClass"}])),b.license.chat&&(f.isAdmin()||b.userModules[30])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/channels/chat/queues/list"},{type:"title",heading:c.instant("TOUR_MAIN_CHAT_QUEUE"),text:c.instant("TOUR_MAIN_CHAT_QUEUE_MESSAGE"),curtainClass:"myCurtainClass"}])),b.license.openchannel&&(f.isAdmin()||b.userModules[46])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/channels/openchannel/accounts/list"},{type:"title",heading:c.instant("TOUR_MAIN_OPENCHANNEL"),text:c.instant("TOUR_MAIN_OPENCHANNEL_MESSAGE"),curtainClass:"myCurtainClass"}])),(f.isAdmin()||b.userModules[14])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/square/projects/list"},{type:"title",heading:c.instant("TOUR_MAIN_SQUARE_PROJECT"),text:c.instant("TOUR_MAIN_SQUARE_PROJECT_MESSAGE"),curtainClass:"myCurtainClass"}])),(f.isAdmin()||b.userModules[52])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/tools/trunks/list"},{type:"title",heading:c.instant("TOUR_MAIN_TRUNKS"),text:c.instant("TOUR_MAIN_TRUNKS_MESSAGE"),curtainClass:"myCurtainClass"}])),(f.isAdmin()||b.userModules[52])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/tools/triggers/list"},{type:"title",heading:c.instant("TOUR_MAIN_TRIGGERS"),text:c.instant("TOUR_MAIN__MESSAGE"),curtainClass:"myCurtainClass"}])),b.license.jscripty&&(f.isAdmin()||b.userModules[50])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/jscripty/projects/list"},{type:"title",heading:c.instant("TOUR_MAIN_JSCRIPTY"),text:c.instant("TOUR_MAIN_JSCRIPTY_MESSAGE"),curtainClass:"myCurtainClass"}])),(f.isAdmin()||b.userModules[17])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/analytics/reports/list"},{type:"title",heading:c.instant("TOUR_MAIN_REPORTS"),text:c.instant("TOUR_MAIN_REPORTS_MESSAGE"),curtainClass:"myCurtainClass"}])),b.tourConfig.main=b.tourConfig.main.concat([{type:"title",heading:c.instant("TOUR_MAIN_END"),text:c.instant("TOUR_MAIN_END_MESSAGE"),curtainClass:"myCurtainClass"}])}a.awesomeThings=[],b.workspaces=[],a.Auth=f,b.userModules={},a.keepMeLoggedModalInstance=void 0,f.getCurrentUser().$promise.then(function(a){a.Modules.forEach(function(a){b.userModules[a.id]=!0}),o()})["catch"](function(a){g.error(a)}),b.onTourFinish=function(){n.set("skipTour",!0),b.tempTourPath&&m.path(b.tempTourPath)},b.onTourSkip=function(){n.set("skipTour",!0)},d(function(){n.get("skipTour")||(b.activeTour.main=!0)}),a.select=function(a){switch(a.type){case"chatRoom":case"mailRoom":case"faxRoom":a.unread=0}},e.socket.on("agent:save",function(b){!b.online&&f.isAgent()&&(a.keepMeLoggedModalInstance||(a.keepMeLoggedModalInstance=h.open({animation:!0,backdrop:"static",keyboard:!1,templateUrl:"app/main/keepMeLogged.modal.html",controller:["$scope","$uibModalInstance",function(a,b){a.close=function(){b.close(!0)},a.cancel=function(){b.close(!1)}}]}),a.keepMeLoggedModalInstance.result.then(function(a){a?l.location.reload():(f.logout(),m.path("/login"))})))}),a.openTdTab=function(a){b.workspaces.push({type:"tdDisposal",name:"Motion Dialer Disposition","class":"icon-control-forward",active:!0,spooler:a})},a.deselect=function(){},a.isAdmin=f.isAdmin,a.isLoggedIn=f.isLoggedIn,a.getCurrentUser=f.getCurrentUser,a.CurrentUser=f.getCurrentUser(),e.socket.on("user_has_voice_queue_permit:change",function(){a.CurrentUser=f.getCurrentUser()}),e.socket.on("user_has_chat_queue_permit:change",function(){a.CurrentUser=f.getCurrentUser()}),e.socket.on("user_has_mail_queue_permit:change",function(){a.CurrentUser=f.getCurrentUser()}),e.socket.on("user_has_fax_queue_permit:change",function(){a.CurrentUser=f.getCurrentUser()}),e.socket.on("user_has_sms_queue_permit:change",function(){a.CurrentUser=f.getCurrentUser()}),a.mainTab={active:!0},a.closeJscriptyTab=function(a){if(b.workspaces[a].edited){var c=h.open({animation:!0,templateUrl:"app/main/closeEditedTab.modal.jscripty.html",controller:"CloseEditedTabModalJscriptyCtrl",resolve:{project:b.workspaces[a]}});c.result.then(function(){b.workspaces.splice(a,1)})}else b.workspaces.splice(a,1)},b.closeTab=function(a){var c;b.workspaces[a].edited?"jscripty"===b.workspaces[a].type?b.workspaces[a].end():(c=h.open({animation:!0,templateUrl:"app/main/closeEditedTab.modal.html",controller:"CloseEditedTabModalCtrl"}),c.result.then(function(){b.workspaces.splice(a,1)},function(){i.info("Modal dismissed at: "+new Date)})):b.workspaces.splice(a,1)},a.createContact=function(d,e){return e.CompanyId||delete e.CompanyId,k.save(e).$promise.then(function(e){b.workspaces.splice(d,1);var f=e.firstName;e.lastName&&(f+=" "+e.lastName),a.openContactTab({firstName:e.firstName,lastName:e.lastName,id:e.id}),g.show(c.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){g.error(a)})};var p=function(b){var c=h.open({animation:!0,templateUrl:"app/main/chooseContact.modal.html",controller:"ChooseContactModalCtrl",resolve:{data:function(){return{type:"event",eventId:b.id}}}});c.result.then(function(c){c?a.openContactTab(c,b):a.newContact(b)},function(){i.info("Modal dismissed at: "+new Date)})};a.updateContact=function(a,d){var e=angular.copy(d);return e.CompanyId||(e.CompanyId=null),k.update({id:e.id},e).$promise.then(function(){b.workspaces[a].edited=!1,g.show(c.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){g.error(a)})},e.socket.on("report_integration:contactmanager",function(a){p(a)}),e.socket.on("report_integration:jscripty",function(b){a.openJscriptyTab({name:"Jscripty",id:b.projectId,calleridnum:b.calleridnum,calleridname:b.calleridname,queue:b.queue,membername:b.membername})}),e.socket.on("report_integration:salesforce",function(a){l.open(a.url,"_blank")}),e.socket.on("report_integration:tdDisposal",function(b){a.openTdTab(b)}),b.openContactTab=function(a,c){var d=_.find(b.workspaces,{contactID:a.id});if(d)d.active=!0;else{var e=a.firstName;a.lastName&&(e+=" "+a.lastName),b.workspaces.push({name:e,type:"contact",contactID:a.id,"class":"icon-user",active:!0,data:c||null})}},a.openJscriptyTab=function(a){b.workspaces.push({name:a.name,type:"jscripty",active:!0,data:a})},a.newContact=function(a){b.workspaces.push({name:"New Contact",type:"newContact","class":"icon-user",active:!0,data:a||null})},a.$on("$viewContentLoaded",function(){Metronic.init()}),b.language=c.use(),a.changeLanguage=function(a){return c.use(a).then(function(a){b.language=a,-1!==["main.jscripty.projects.view","main.square.projects.view"].indexOf(j.current.name)&&l.location.reload()})["catch"](function(a){console.error(a)})},a.$on("$destroy",function(){console.log("main $destroy"),e.unsyncUpdates("user_has_voice_queue_permit"),e.unsyncUpdates("user_has_chat_queue_permit"),e.unsyncUpdates("user_has_mail_queue_permit"),e.unsyncUpdates("user_has_fax_queue_permit"),e.unsyncUpdates("user_has_sms_queue_permit")})}]),angular.module("xCallyShuttleApp").directive("ngSpinnerBar",["$rootScope",function(a){return{link:function(b,c){c.addClass("hide"),a.$on("$stateChangeStart",function(){"spinner-page"===c[0].id&&c.removeClass("hide")}),a.$on("$stateChangeSuccess",function(){"spinner-page"===c[0].id&&(c.addClass("hide"),$("body").removeClass("page-on-load"),Layout.setSidebarMenuActiveLink("match"),setTimeout(function(){Metronic.scrollTop()},1e3))}),a.$on("$spinnerStart",function(){"spinner-request"===c[0].id&&c.removeClass("hide")}),a.$on("$spinnerStop",function(){"spinner-request"===c[0].id&&c.addClass("hide")}),a.$on("$stateNotFound",function(){"spinner-page"===c[0].id&&c.addClass("hide")}),a.$on("$stateChangeError",function(){"spinner-page"===c[0].id&&c.addClass("hide")})}}}]).directive("a",function(){return{restrict:"E",link:function(a,b,c){(c.ngClick||""===c.href||"#"===c.href)&&b.on("click",function(a){a.preventDefault()})}}}).directive("nxEqual",function(){return{require:"ngModel",link:function(a,b,c,d){return c.nxEqual?(a.$watch(c.nxEqual,function(a){d.$setValidity("nxEqual",a===d.$viewValue)}),void d.$parsers.push(function(b){var e=b===a.$eval(c.nxEqual);return d.$setValidity("nxEqual",e),e?b:void 0})):void console.error("nxEqual expects a model as an argument!")}}}).directive("ngEnter",function(){return function(a,b,c){b.bind("keydown keypress",function(b){13===b.which&&(a.$apply(function(){a.$eval(c.ngEnter)}),b.preventDefault())})}}).directive("dropdownMenuHover",function(){return{link:function(a,b){b.dropdownHover()}}}).directive("uiSelectRequired",function(){return{require:"ngModel",link:function(a,b,c,d){d.$validators.uiSelectRequired=function(a){return a&&a.length}}}}).directive("rpattern",function(){return{restrict:"A",require:"ngModel",link:function(a,b,c,d){function e(a,b){return null==b||""===b||!h||a.test(b)?(d.$setValidity("pattern",!0),b):void d.$setValidity("pattern",!1)}var f,g=c.rpattern,h=!0;g&&(g.match(/^\/(.*)\/$/)?(g=new RegExp(g.substr(1,g.length-2)),f=function(a){return e(g,a)}):f=function(b){var c=a.$eval(g);if(!c||!c.test)throw new Error("Expected "+g+" to be a RegExp but was "+c);return e(c,b)}),d.$formatters.push(f),d.$parsers.push(f),c.$observe("required",function(a){h=a,f(d.$viewValue)})}}}).directive("newContact",["$compile","xAlert","socket","$translate","$timeout","List","Tag","Company","ReportCall","$uibModal","$rootScope","Auth",function(a,b,c,d,e,f,g,h,i,j,k,l){return{restrict:"E",scope:{workspace:"=",index:"=",submit:"&onSubmit"},templateUrl:"app/main/template/template.contactTab.html",compile:function(a,m){return function(a,m,n){function o(){a.$watch("contact",function(b,c){angular.equals(b,c)||(a.workspace.edited=!0)},!0)}a.license=k.license,a.Auth=l,a.forms={general:{}},a.firstLoad=!0,a.detail={tab:"main"},a.contact={CompanyId:"",disposed:!1},a.submitButtonLabel=d.instant("APPLICATION_CONFIRM"),a.getAgent=function(){return l.getCurrentUser().$promise.then(function(b){a.agent=b})["catch"](function(a){b.error(a)})},a.callPhoneBar=function(c,e){var f;switch(e){case"call":f="http://127.0.0.1:"+a.agent.phoneBarRemoteControlPort+"/api/originate/"+c;break;case"transfer":f="http://127.0.0.1:"+a.agent.phoneBarRemoteControlPort+"/api/transfer?number="+c;break;default:f="http://127.0.0.1:"+a.agent.phoneBarRemoteControlPort+"/api/originate/"+c}return $http.get(f).success(function(){b.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){b.error(a)})},a.dispose=function(){return j.open({animation:!0,templateUrl:"app/main/cm.disposition.html",controller:"ContactManagerSetDisposition"}).result.then(function(c){return i.update({id:a.workspace.data.uniqueid},c).$promise.then(function(){a.contact.disposed=!0,b.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.error(a)})})},a.init=function(){a.workspace.data&&(a.contact.firstName=a.workspace.data.calleridname?a.workspace.data.calleridname:a.workspace.data.messageId?a.workspace.data.messageId:a.workspace.data.uniqueid?a.workspace.data.uniqueid:"",a.workspace.data.calleridnum&&(a.contact.phone=a.workspace.data.calleridnum),a.workspace.data.from&&(a.contact.email=a.workspace.data.from)),a.getTags(),a.getCompanies(),a.getLists(),a.getAgent()},a.getLists=function(){return f.get().$promise.then(function(b){a.lists=b.rows,c.syncUpdates("list",a.lists),a.contact.ListId=a.lists[0]?a.lists[0].id:null,a.getCustomFields()})["catch"](function(a){b.error(a)})},a.getCustomFields=function(){return f.get({listId:a.contact.ListId,controller:"customfields"}).$promise.then(function(b){a.customFields=b.rows,a.customFields.forEach(function(a){a.values=JSON.parse(a.values)}),c.socket.on("custom_field:remove",function(b){_.remove(a.customFields,function(a){return b.id==a.id})}),c.socket.on("custom_field:save",function(b){if(b.ListId===a.contact.ListId){var c=_.find(a.customFields,{id:b.id});c||("string"==typeof b.values&&(b.values=JSON.parse(b.values)),a.customFields.push(b))}}),!a.firstLoad||a.workspace.data?(a.workspace.edited=!0,a.firstLoad=!1):(a.firstLoad=!1,o())})["catch"](function(a){console.error(a),b.error(a)})},a.getTags=function(){return g.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a),b.error(a)})},a.getCompanies=function(){return h.get().$promise.then(function(b){a.companies=b.rows,a.companies.unshift({id:"",name:"-- None --"}),c.syncUpdates("company",a.companies)})["catch"](function(a){console.error(a),b.error(a)})},e(function(){a.init()})}}}}]).directive("contact",["$compile","xAlert","socket","$timeout","List","Tag","Company","Contact","$translate","gridOptions","$uibModal","ReportCall","$rootScope","usSpinnerService","uiGridConstants","$log","Auth","$http",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){return{restrict:"E",scope:{workspace:"=",index:"=",submit:"&onSubmit"},templateUrl:"app/main/template/template.contactTab.html",compile:function(a,j){return function(a,j,s){function t(b){var c=[],d={};_.forEach(a.columns[a.log[b].show][a.log[b].detail].indexes,function(e,f){d={name:e,displayName:a.columns[a.log[b].show][a.log[b].detail].header[f],headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},"createdAt"===e&&(d.cellTemplate="<div class=\"centered-uigrid-td\">{{row.entity.createdAt | date:'dd/MM/yyyy HH:mm:ss'}}</div>",d.filterHeaderTemplate='<div class="ui-grid-filter-container row"><div ng-repeat="colFilter in col.filters" class="col-md-6 col-md-offset-0 col-sm-5 col-sm-offset-0 col-xs-5 col-xs-offset-0"><div custom-grid-date-filter-header></div></div></div>',d.filters=[{name:"From",condition:o.filter.GREATER_THAN_OR_EQUAL},{name:"To",condition:o.filter.LESS_THAN_OR_EQUAL}]),c.push(d)}),a.columns[a.log[b].show][a.log[b].detail].actions&&c.push(a.columns[a.log[b].show][a.log[b].detail].actions),c.forEach(function(a){u(a,b,!0),a.hasOwnProperty("displayName")||(a.displayName="APPLICATION_"+a.name.toUpperCase()),a.headerCellFilter="translate",a.hasOwnProperty("buttons")&&(a.displayName="",a.cellClass="ui-grid-vcenter",a.enableSorting=!1,a.enableFiltering=!1,a.enableColumnMenu=!1,a.cellTemplate="<div>",a.buttons.forEach(function(b){if(b.directive)a.cellTemplate+=b.directive;else{if(a.cellTemplate+="<a",a.cellTemplate+=b.hide?' data-ng-hide="'+b.hide+'" ':" ",a.cellTemplate+=b["class"]?' class="btn btn-xs '+b["class"]+'" ':" ",a.cellTemplate+=b.href?' data-ng-href="'+b.href+'" ':" ",a.cellTemplate+=b.uisref?' ui-sref="'+b.uisref+'" ':" ",a.cellTemplate+=b.onClick?' data-ng-click="'+b.onClick+'" ':" ",a.cellTemplate+=b.title?' title="'+b.title+'"':"",a.cellTemplate+=">",a.cellTemplate+=b.icon?'<i class="'+b.icon+'"></i>':"",b.name)switch(b.name){case"delete":a.cellTemplate+='<i class="fa fa-trash"></i>';break;case"profile":case"settings":case"detail":case"embedding":a.cellTemplate+='<i class="icon-settings"></i>';break;case"agents":a.cellTemplate+='<i class="icon-people"></i>';break;case"run":a.cellTemplate+='<i class="fa fa-cogs"></i>';break;case"mailRoom":a.cellTemplate+='<i class="fa fa-envelope"></i>';break;case"chatRoom":a.cellTemplate+='<i class="fa fa-users"></i>';break;case"faxRoom":a.cellTemplate+='<i class="fa fa-fax"></i>';break;case"smsRoom":a.cellTemplate+='<i class="glyphicon glyphicon-comment"></i>';break;default:a.cellTemplate+="{{'APPLICATION_"+b.name.toUpperCase()+"' | translate}}"}else a.cellTemplate+=b.displayName?"{{'"+b.displayName+"' | translate}}":"";a.cellTemplate+="</a> "}}),a.cellTemplate+="<div>",delete a.buttons)});var e={enablePaginationControls:!0,exporterCsvFilename:b+".csv",columnDefs:c,enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,showTreeExpandNoChildren:!0,data:[],gridMenuTitleFilter:function(a){var b=$q.defer();return b.resolve(i.instant(a)),b.promise},onRegisterApi:function(c){a.gridApi=c,a.gridApi.grid.registerDataChangeCallback(function(){}),a.gridApi.core.on.sortChanged(a,function(a,c){0===c.length?v.order=null:v.order=c[0].name+" "+c[0].sort.direction.toUpperCase(),w(b)}),a.gridApi.pagination.on.paginationChanged(a,function(a,c){v.offset=(a-1)*c,v.limit=c,w(b)}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){u(a,b)}),w(b)})}};w(b,e)}function u(a,b,c){a.filter&&a.filter.term&&c&&(v[b][a.name]=a.filter.term),a.filters&&(a.filters.length>1?a.filters.forEach(function(c){c.term?64===c.condition?v[b][a.name+"_uiFrom"]=c.term:256===c.condition&&(v[b][a.name+"_uiTo"]=c.term):64===c.condition?delete v[b][a.name+"_uiFrom"]:256===c.condition&&delete v[b][a.name+"_uiTo"]}):a.filters.length&&a.filters[0].term?v[b][a.name]=a.filters[0].term:delete v[b][a.name])}a.moment=moment,a.license=m.license,a.forms={general:{}},a.detail={tab:"main"},a.log={daily:{show:"phone",type:"inbound",detail:"general"},history:{show:"phone",type:"inbound",detail:"general"}},a.columns={phone:{general:{header:["APPLICATION_SOURCE","APPLICATION_DESTINATION","APPLICATION_DISPOSITION","APPLICATION_DATE"],indexes:["source","destination","disposition","createdAt"]},queue:{header:["APPLICATION_CALLERID","APPLICATION_QUEUE","APPLICATION_DATE"],indexes:["calleridnum","queue","createdAt"]}},email:{general:{header:["APPLICATION_FROM","APPLICATION_TO","APPLICATION_DISPOSITION","APPLICATION_DATE"],indexes:["from","account","disposition","createdAt"],actions:{name:"action",displayName:"",width:40,buttons:[{"class":"green",name:"mailRoom",onClick:"grid.appScope.openRoom(row.entity.id, 'mailRoom')"}]}}},chat:{general:{header:["APPLICATION_WEBSITE","APPLICATION_VISITOR","APPLICATION_DISPOSITION","APPLICATION_DATE"],indexes:["website","contact","disposition","createdAt"],actions:{name:"action",displayName:"",width:40,buttons:[{"class":"green",name:"chatRoom",onClick:"grid.appScope.openRoom(row.entity.id, 'chatRoom')"}]}}},fax:{general:{header:["APPLICATION_FROM","APPLICATION_TO","APPLICATION_DISPOSITION","APPLICATION_DATE"],indexes:["contact","account","disposition","createdAt"],actions:{name:"action",displayName:"",width:40,buttons:[{"class":"green",name:"faxRoom",onClick:"grid.appScope.openRoom(row.entity.id, 'faxRoom')"}]}}},sms:{general:{header:["APPLICATION_ACCOUNT","APPLICATION_FROM","APPLICATION_DISPOSITION","APPLICATION_DATE"],indexes:["account","contact","disposition","createdAt"],actions:{name:"action",displayName:"",width:40,buttons:[{"class":"green",name:"smsRoom",onClick:"grid.appScope.openRoom(row.entity.id, 'smsRoom')"}]}}}},a.Auth=q,a.getAgent=function(){return q.getCurrentUser().$promise.then(function(b){a.agent=b})["catch"](function(a){b.error(a)})},a.callPhoneBar=function(c,d){var e;switch(d){case"call":e="http://127.0.0.1:"+a.agent.phoneBarRemoteControlPort+"/api/originate/"+c;break;case"transfer":e="http://127.0.0.1:"+a.agent.phoneBarRemoteControlPort+"/api/transfer?number="+c;break;default:e="http://127.0.0.1:"+a.agent.phoneBarRemoteControlPort+"/api/originate/"+c}return r.get(e).success(function(){b.show(i.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){b.error(a)})},a.copy=function(a){var c=k.open({animation:!0,size:"small",templateUrl:"app/contactmanager/contact/list/copy.modal.html",controller:"ContactManagerListCopyModalCtrl"});c.result.then(function(c){return h.save({id:a,controller:"copy"},c).$promise.then(function(a){m.openContactTab({firstName:a.firstName,lastName:a.lastName,id:a.id})})["catch"](function(a){b.error(a)})},function(){p.info("Modal dismissed at: "+new Date)})},a.merge=function(c){var d=k.open({animation:!0,size:"lg",templateUrl:"app/main/mergeContact.choose.modal.html",controller:"ContactManagerMergeContactChoose",resolve:{listId:c.ListId}});d.result.then(function(d){var e=k.open({animation:!0,size:"lg",templateUrl:"app/main/mergeContact.merge.modal.html",controller:"ContactManagerMergeContactMerge",resolve:{contactId:d,mergeContact:c}});e.result.then(function(e){return e.oldContact=c.id,h.save({id:d,controller:"merge"},e).$promise.then(function(b){m.workspaces.splice(a.index,1),_.remove(m.workspaces,{contactID:b.id}),m.openContactTab({firstName:b.firstName,lastName:b.lastName,id:b.id})})["catch"](function(a){b.error(a)})},function(){p.info("Modal dismissed at: "+new Date)})},function(){p.info("Modal dismissed at: "+new Date)})},a.dispose=function(){return k.open({animation:!0,templateUrl:"app/main/cm.disposition.modal.html",controller:"ContactManagerSetDisposition"}).result.then(function(c){return l.update({id:a.workspace.data.uniqueid},c).$promise.then(function(){a.contact.disposed=!0,b.show(i.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.error(a)})})},a.companyInfo=function(b){k.open({animation:!0,size:"lg",templateUrl:"app/main/company.info.modal.html",controller:["$scope","$uibModalInstance","company",function(a,b,c){a.company=c,a.close=function(){b.dismiss("cancel")}}],resolve:{company:_.find(a.companies,{id:b})}})},a.updateLog=function(b,c,d,e){c&&(a.log[b].show=c),d&&(a.log[b].detail=d),e&&(a.log[b].type=e),t(b)},a.openRoom=function(a,b,c){var d=_.find(m.workspaces,{id:a,type:b});if(d)d.active=!0;else{var e;switch(b){case"mailRoom":e="icon-envelope";break;case"chatRoom":e="fa fa-users";break;case"faxRoom":e="fa fa-fax";break;case"smsRoom":e="glyphicon glyphicon-comment"}m.workspaces.push({id:a,type:b,"class":e,active:!0,data:c})}};var v={daily:{offset:0,limit:10},history:{offset:0,limit:10}},w=function(b,c){return n.spin("spinner-grid"),h.get(_.merge(_.merge({id:a.workspace.contactID,controller:"log",logType:b,order:"createdAt DESC"},a.log[b]),v[b])).$promise.then(function(d){c&&(a["gridOptions"+b]=c),a["gridOptions"+b].totalItems=d.count,a["gridOptions"+b].data=d.rows,x("gridOptions"+b,d.rows.length)})["catch"](function(a){console.error(a)})["finally"](function(){n.stop("spinner-grid")})},x=function(a,b){var c=b?30*b+120:177;angular.element(document.getElementsByName(a)[0]).css("height",c+"px")};a.getContact=function(){return h.get({id:a.workspace.contactID}).$promise.then(function(b){a.contact=b,a.contact.CompanyId||(a.contact.CompanyId=""),a.getCustomFields(b.ListId),a.updateLog("daily"),a.updateLog("history")})["catch"](function(a){console.error(a),b.error(a)})},a.getTags=function(){return f.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a),b.error(a)})},a.getCompanies=function(){return g.get().$promise.then(function(b){a.companies=b.rows,a.companies.unshift({id:"",name:"-- None --"}),c.syncUpdates("company",a.companies)})["catch"](function(a){console.error(a),b.error(a)})},a.getCustomFields=function(d){return a.customFields=[],e.get({listId:d,controller:"customfields"}).$promise.then(function(b){b.rows.forEach(function(b){try{"select"===b.type&&(b.values=JSON.parse(b.values)),a.customFields.push(b)}catch(c){console.log("Cf not valid:",b.alias)}}),c.socket.on("custom_field:remove",function(b){_.remove(a.customFields,function(a){return b.id==a.id})}),c.socket.on("custom_field:save",function(b){if(b.ListId===d){var c=_.find(a.customFields,{id:b.id});c||("string"==typeof b.values&&(b.values=JSON.parse(b.values)),a.customFields.push(b))}})})["catch"](function(a){console.error(a),b.error(a)})},d(function(){a.getTags(),a.getCompanies(),a.getContact(),a.getAgent()})}}}}]).directive("jscripty",["$compile","xAlert","$http","socket","JscriptyProject",function(a,b,c,d,e){return{restrict:"E",scope:{workspace:"=",index:"=",submit:"&onSubmit"},templateUrl:"app/main/template/template.jscriptyTab.html",compile:function(a,d){return function(a,d,f){a.count=0,a.questions=[];var g,h=a.workspace.data.id;c.get("/api/jscripty/projects/"+h+"/download").success(function(b){b?c.post("/api/jscripty/projects/"+h+"/sessions",{projectId:h,status:"started",queue:a.workspace.data.queue,calleridnum:a.workspace.data.calleridnum,callername:a.workspace.data.callername,membername:a.workspace.data.membername}).success(function(c){g=c.session_id,a.workspace.edited=!0,a.workspace.sessionId=g,a.workspace.projectId=h;var d=mxUtils.parseXml(b),e=new mxCodec(d);a.decObj=e.decode(d.documentElement);var f=_.find(a.decObj.cells,function(a){return a.vertex&&"start"==a.value.nodeName});if("OFF"==f.getAttribute("state")){var j=_.find(f.edges,function(a){return a.source.id==f.id}).target;a.questions[a.count]=a.currentQuestion=i(j)}else a.questions[a.count]=a.currentQuestion=f;a.saveQuestions()}):(console.log("No project published!"),alert("No project published!"),a.submit({index:a.index}))}),a.next=function(b,c){switch(a.currentQuestion.answer&&a.currentQuestion.answer!=c&&(a.questions=_.take(a.questions,a.count+1)),a.currentQuestion.answer=c,b.value.nodeName){case"question":b=i(b)}a.questions[a.count]=a.currentQuestion,a.currentQuestion=b,a.count++,a.questions[a.count]=b,a.saveQuestions()};var i=function(a){var b=[];return a.options=[],_.forEach(a.edges,function(c,d){if(c.source.id==a.id&&c.value){var e=String(c.value).split(",");e.length>1?(_.forEach(e,function(b,d){var e=Object.create(c);e.setValue(b),a.edges.push(e),a.options.push(b)}),b.push(c)):a.options.push(e[0])}}),_.forEach(b,function(b){_.remove(a.edges,function(a){return a.value==b.value&&a.id==b.id})}),a};a.end=function(){a.saveQuestions(),a.workspace.lastQuestionId=a.questions[a.questions.length-1].id,"end"==a.questions[a.questions.length-1].value.nodeName&&(a.workspace.edited=!1,e.update({id:h,controller:"sessions",action:g},{status:"completed",completedAt:Date(),last_question_id:a.questions[a.questions.length-1].id}).$promise.then(function(a){b.show("Project Ended","success")})),a.submit({index:a.index})},a.workspace.end=a.end,a.back=function(){a.count--,a.currentQuestion=a.questions[a.count]},a.setCurrentQuestion=function(b){a.count=b,a.currentQuestion=a.questions[a.count]},a.saveQuestions=function(){for(var c=[],d=[],f=0;f<a.questions.length;f++){if(a.questions[f].children)for(var i=a.questions[f].children,j=0;j<i.length;j++)d[j]={input_id:i[j].id,input_type:i[j].getAttribute("type"),input_label:i[j].getAttribute("label"),input_value:"checkbox"!=i[j].getAttribute("type")||i[j].answer?i[j].answer:!1};c[f]={sessionId:g,projectId:h,question_id:a.questions[f].id,question_type:a.questions[f].value.nodeName,question_label:a.questions[f].getAttribute("label"),question_text:a.questions[f].getAttribute("question")||a.questions[f].getAttribute("text"),question_other_label:a.questions[f].getAttribute("other"),question_other_answer:a.questions[f].otheranswer,question_answer:a.questions[f].answer,question_options:a.questions[f].options?JSON.stringify({options:a.questions[f].options}):null,index:f,ReportJscriptyInputs:d},d=[]}e.save({id:h,controller:"sessions",action:g,action2:"questions"},c).$promise.then(function(a){})["catch"](function(a){b.error(a)})}}}}}]).directive("reportBuilder",["$compile",function(a){return{restrict:"E",scope:{group:"=",fields:"=",forms:"=",firstCall:"="},templateUrl:"app/main/template/template.reportBuilderView.html",compile:function(b,c){var d,e;return d=b.contents().remove(),function(b,c,f){b.operators=[{name:"AND"},{name:"OR"}],b.conditions=[{name:"="},{name:"!="},{name:"<"},{name:"<="},{name:">"},{name:">="},{name:"LIKE"},{name:"NOT LIKE"},{name:"IS NULL"},{name:"IS NOT NULL"},{name:"IS EMPTY"},{name:"IS NOT EMPTY"}],b.inputIsRequired=function(a){if(a.condition)switch(a.condition){case"IS NULL":case"IS NOT NULL":case"IS EMPTY":case"IS NOT EMPTY":a.required=!1;break;default:a.required=!0}},b.addCondition=function(){b.group.rules.push({condition:"=",field:"",value:""})},b.removeCondition=function(a){b.group.rules.splice(a,1)},b.addGroup=function(){b.group.rules.push({group:{operator:"AND",rules:[{condition:"=",field:"",value:""}]}})},b.randomName=function(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")},b.removeGroup=function(){b.$parent.group&&b.$parent.group.rules.splice(b.$parent.$index,1)},e||(e=a(d)),c.append(e(b,function(a){return a}))}}}}]).directive("dynamicName",["$compile",function(a){return{restrict:"A",terminal:!0,priority:1e3,link:function(b,c,d){c.attr("name",b.$eval(d.dynamicName)),c.removeAttr("dynamic-name"),a(c)(b)}}}]).directive("onReadFile",["$parse",function(a){return{restrict:"A",scope:!1,link:function(b,c,d){var e=a(d.onReadFile);c.on("change",function(a){var c=new FileReader;c.onload=function(a){b.$apply(function(){e(b,{$fileContent:a.target.result})})},c.readAsText((a.srcElement||a.target).files[0])})}}}]).directive("motionFileDownload",["xAlert","$translate","$timeout","$location","FileSaver","$compile",function(a,b,c,d,e,f){return{restrict:"E",template:'<a uib-tooltip=\'{{tooltiptext}}\' class="{{btnclass || \'btn default btn-xs blue-hoki\'}}" href="" data-ng-click="download()" ><i class="icon-cloud-download"></i>{{btncontent || \'\'}}</a>',scope:{mimetype:"=",filename:"=",resource:"=",params:"=",btnclass:"@",btncontent:"@",tooltiptext:"@"},link:function(b,c,d){var f=c.children()[0];b.$on("download-start",function(){$(f).attr("disabled","disabled")}),b.$on("downloaded",function(a,c){var d=base64ToBlob(c,b.mimetype);e.saveAs(d,b.filename),$(f).attr("disabled",!1)}),b.download=function(){return b.$emit("download-start"),b.resource.get(b.params).$promise.then(function(a){b.$emit("downloaded",a.downloadString)})["catch"](function(b){a.error(b),$(f).attr("disabled",!1)})}}}}]).directive("audioFileDownload",["xAlert","$translate","$uibModal",function(a,b,c){return{restrict:"E",template:'<button type="button" class="btn default btn-xs blue-hoki" data-ng-click="download()"><i class="fa fa-play"></i> {{ \'APPLICATION_PREVIEW\' | translate}}</button>',scope:{resource:"=",params:"="},link:function(b,d,e){var f=d.children()[0];b.$on("download-start",function(a,c){b.tempHtml=$(f).html(),$(f).attr("disabled","disabled").html('<i class="icon-refresh"></i> Loading...')}),b.$on("downloaded",function(a,d){c.open({animation:!0,size:"small",templateUrl:"app/main/audioFileDownload.play.modal.html",controller:["$scope","$uibModalInstance","$sce","audio",function(a,b,c,d){a.audio=c.trustAsResourceUrl("data:audio/wav;base64,"+d.data),a.close=function(){b.dismiss("cancel")}}],resolve:{audio:function(){return{data:d}}}});$(f).html(b.tempHtml).attr("disabled",!1)}),b.$on("error",function(a,c){$(f).html(b.tempHtml).attr("disabled",!1)}),b.download=function(){return b.$emit("download-start"),b.resource.get(b.params).$promise.then(function(a){b.$emit("downloaded",a.downloadString)})["catch"](function(c){a.error(c),b.$emit("error")})}}}}]).directive("uiRequired",function(){return{require:"ngModel",link:function(a,b,c,d){d.$validators.required=function(a,b){
-return!(b&&0===b.length&&"true"===c.uiRequired)},c.$observe("uiRequired",function(){d.$setValidity("required",!("true"===c.uiRequired&&d.$viewValue&&0===d.$viewValue.length))})}}}).directive("schrollBottom",function(){return{scope:{schrollBottom:"="},link:function(a,b){a.$watchCollection("schrollBottom",function(a){a&&$(b).scrollTop($(b)[0].scrollHeight)})}}}).directive("customGridDateFilterHeader",function(){return{templateUrl:"app/main/customDateFilterHeader.html",controller:"gridDatePickerFilterCtrl"}}).directive("customGridTagsFilterHeader",function(){return{templateUrl:"app/main/customTagsFilterHeader.html",controller:"gridTagsFilterCtrl"}}).directive("infiniteScroll",["$window",function(a){return{link:function(a,b,c){var d=parseInt(c.threshold)||0,e=b[0];b.bind("scroll",function(){a.$eval(c.canLoad)&&e.scrollTop+e.offsetHeight>=e.scrollHeight-d&&a.$apply(c.infiniteScroll)})}}}]).directive("tigerDialDisposal",["$compile","xAlert","socket","$translate","$timeout","$rootScope","MotionDialerSpooler","Agent",function(a,b,c,d,e,f,g,h){return{restrict:"E",scope:{workspace:"=",index:"="},templateUrl:"app/main/template/template.tigerDialDisposal.html",compile:function(a,c){return function(a,c,i){a.moment=moment,a.entitySpooler={},a.forms={td:{}},a.init=function(){return h.get().$promise.then(function(b){a.agents=[],b&&b.rows.forEach(function(b){a.agents.push("SIP/"+b.name)})})["catch"](function(a){b.error(a)})},a.save=function(){var c;switch(a.entitySpooler.retrieve){case"CLOSED":c=g.close({id:parseInt(a.workspace.spooler.ticketId)});break;case"OPEN":c=g.open({id:parseInt(a.workspace.spooler.ticketId)});break;case"BLACK_LIST":c=g.blacklist({id:parseInt(a.workspace.spooler.ticketId)});break;case"PLANNED":c=g.planning({id:parseInt(a.workspace.spooler.ticketId),date:moment(a.entitySpooler.planningtime).format("YYYY-MM-DD HH:mm")});break;case"PLANNED_PEER":c=g.planningpeer({id:parseInt(a.workspace.spooler.ticketId),date:moment(a.entitySpooler.planningtime).format("YYYY-MM-DD HH:mm"),peer:a.entitySpooler.planningpeer})}c?c.$promise.then(function(c){c.status>0?b.show(d.instant("MESSAGE_WELL_DONE"),"success"):c.response?c.response.RMI.errors.forEach(function(c){c?(b.show(c.field+": "+c.error,"danger"),f.workspaces.splice(a.index,1)):b.show("Please, check your connection!","danger")}):b.show("Please, check your connection!","danger")})["catch"](function(a){b.error(a)}):b.show("RETRIEVE NOT FOUND","danger")},e(function(){a.init()})}}}}]).directive("cssTimer",["$window","$interval",function(a,b){return{restrict:"EA",template:"<span>{{ millis | formatMilliseconds | date:format }}</span>",scope:{interval:"@",format:"@",startTime:"="},link:function(a,c,d){function e(){a.millis=Math.abs((new Date).getTime()-new Date(a.startTime).getTime())+1e3,a.activeInterval=b(function(){a.millis+=a.interval},a.interval)}a.interval||(a.interval=1e3),a.format||(a.format="HH:mm:ss"),e(),a.$watch("startTime",function(c,d){b.cancel(a.activeInterval),e()},!0)}}}]),angular.module("xCallyShuttleApp").filter("propsFilter",function(){return function(a,b){var c=[];return angular.isArray(a)?a.forEach(function(a){for(var d=!1,e=Object.keys(b),f=0;f<e.length;f++){var g=e[f],h=b[g].toLowerCase();if(-1!==a[g].toString().toLowerCase().indexOf(h)){d=!0;break}}d&&c.push(a)}):c=a,c}}).filter("capitalize",function(){return function(a){return a?a.replace(/([^\W_]+[^\s-]*) */g,function(a){return a.charAt(0).toUpperCase()+a.substr(1).toLowerCase()}):""}}).filter("salesforce",function(){var a=["CallDisposition","CallDurationInSeconds","CallObject","CallType","IsArchived","Priority","Status","Type"];return function(b){return _.remove(b,function(b){return b.custom===!1&&a.indexOf(b.name)<0}),b}}).filter("sugarcrm",function(){var a=["account_id","account_name","account_name1","assigned_user_name","assigned_user_id","case_number","created_by","created_by_name","date_entered","date_modified","deleted","description","id","modified_by_name","modified_user_id","name"];return function(b){return _.remove(b,function(b){return a.indexOf(b.name)>=0}),b}}).filter("freshdesk",function(){var a=["requester","subject","agent","description"];return function(b){return _.remove(b,function(b){return a.indexOf(b.ticket_field.name)>=0}),b}}).filter("zendesk",function(){var a=["subject","assignee","description"];return function(b){return _.remove(b,function(b){return a.indexOf(b.type)>=0}),b}}).filter("slice",function(){return function(a,b,c){return a?a.slice(b,c):void 0}}).filter("trusted",["$sce",function(a){var b=document.createElement("div");return function(c){return b.innerHTML=c,a.trustAsHtml(b.textContent)}}]).filter("formatMilliseconds",[function(){return function(a){return new Date(1970,0,1).setMilliseconds(a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main",{"abstract":!0,templateUrl:"app/main/main.html",controller:"MainCtrl",resolve:{authorization:["$q","Auth","$state","$timeout","$location","localStorageService",function(a,b,c,d,e,f){return b.getToken()?a.when():(f.remove("loggedIn"),d(function(){e.path("/login")}),a.reject())}],deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/plugins/mxgraph/js/mxClient.js","assets/plugins/ckeditor/ckeditor.js","assets/css/login.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("xAlert",["$translate","Notification","$state",function(a,b,c){return{show:function(c,d){switch(d){case"success":b.success({message:c,title:'<i class="glyphicon glyphicon-ok"></i> <strong>'+a.instant("MESSAGE_SUCCESS")+"!</strong>",delay:5e3});break;case"info":b.info({message:c,title:'<i class="glyphicon glyphicon-info-sign"></i> <strong>'+a.instant("MESSAGE_INFO")+"!</strong>",delay:5e3});break;case"danger":b.error({message:c,title:'<i class="glyphicon glyphicon-exclamation-sign"></i> <strong>'+a.instant("MESSAGE_ERROR")+"!</strong>",delay:1e4});break;case"warning":b.warning({message:c,title:'<i class="glyphicon glyphicon-warning-sign"></i> <strong>'+a.instant("MESSAGE_WARNING")+"!</strong>",delay:1e4});break;default:b.info(c)}},error:function(d){var e,f;d?d.status&&401===d.status?(e="Unauthorized!",f=!0):d.data?(e=d.data.translatedMessage||d.data.message||d.data||"Generic Error",console.log(d)):e=d.translatedMessage||d.message||"Generic Error":e="Generic Error",b.error({message:a.instant(e),title:'<i class="glyphicon glyphicon-exclamation-sign"></i> <strong>'+a.instant("MESSAGE_ERROR")+"!</strong>",delay:1e4}),f&&c.go("login")}}}]).factory("stResource",["$q","$filter","$timeout","$rootScope","$http","$translate","xAlert",function(a,b,c,d,e,f,g){return{getPage:function(b){var c={page:Math.ceil(b.pagination.start/b.pagination.number),per_page:b.pagination.number};b.sort.predicate&&(c.sort_by=b.sort.predicate,c.sort_order=b.sort.reverse?"DESC":"ASC"),_.forIn(b.search.predicateObject,function(a,b){c[b]=a}),b.search.params&&(c.clientQuery={},_.forIn(b.search.params,function(a,b){c.clientQuery[b]=a})),d.$broadcast("$spinnerStart"),e.get(b.url,{params:c}).success(function(a){f.resolve(a),d.$broadcast("$spinnerStop")}).error(function(a){g.error(a),d.$broadcast("$spinnerStop")});var f=a.defer();return f.promise}}}]).factory("xNotification",["$translate","Notification","$rootScope",function(a,b,c){return{show:function(d,e,f,g,h,i){var j=c.$new(),k={message:e,title:d,templateUrl:"app/main/template/template.notification.html",delay:g,scope:j};switch(j.acceptBtn=a.instant("APPLICATION_ACCEPT"),j.rejectBtn=a.instant("APPLICATION_REJECT"),j.nAccept=h,j.nReject=i,f){case"chat":j["class"]="alert-info",j.icon="icon-bubble";break;case"mail":j["class"]="alert-success",j.icon="icon-envelope";break;case"fax":j["class"]="alert-warning",j.icon="fa fa-fax";break;case"sms":j["class"]="alert-danger",j.icon="glyphicon glyphicon-comment";break;case"openchannel":j["class"]="alert-danger",j.icon="icon-globe";break;default:j["class"]="alert-info"}return new b(k)}}}]),angular.module("xCallyShuttleApp").controller("ContactManagerMergeContactChoose",["$scope","$translate","Contact","gridOptions","List","uiGridConstants","xAlert","$stateParams","Company","$uibModalInstance","listId",function(a,b,c,d,e,f,g,h,i,j,k){a.initView=function(){var b;return e.get().$promise.then(function(b){return a.lists=[],a.customFields=[],b.rows.forEach(function(b,c){_.forEach(b.CustomFields,function(b){a.customFields.push({name:b.name,alias:b.alias})}),a.lists.push({value:b.id,label:b.name})}),i.get().$promise}).then(function(b){a.companies=[],b.rows.forEach(function(b,c){a.companies.push({value:b.id,label:b.name})})}).then(function(){var e=[{"class":"blue-hoki",name:"select",onClick:"grid.appScope.choose(row.entity.id)"}];b={exporterCsvFilename:"Contacts.csv",columnDefs:[{name:"firstName"},{name:"lastName"},{name:"phone"},{name:"email"},{name:"ListId",displayName:"APPLICATION_LIST",field:"List.name",enableFiltering:!1},{name:"CompanyId",displayName:"APPLICATION_COMPANY",field:"Company.name",filter:{type:f.filter.SELECT,term:h.companyId||null,selectOptions:a.companies}}]},_.forEach(a.customFields,function(a){b.columnDefs.push({name:a.name,displayName:a.alias,visible:!1})}),b.columnDefs.push({name:"action",width:30,buttons:e}),a.gridOptions=d.gridOptions(c,b,a,{ListId:k})})["catch"](function(a){g.error(a)})},a.choose=function(a){j.close(a)},a.cancel=function(){j.dismiss()}}]),angular.module("xCallyShuttleApp").controller("ContactManagerMergeContactMerge",["$scope","$translate","Contact","xAlert","Company","$uibModalInstance","contactId","List","mergeContact","Tag",function(a,b,c,d,e,f,g,h,i,j){a.initView=function(){return e.get().$promise.then(function(b){return a.companies=b.rows,a.companies.unshift({id:"",name:"-- None --"}),j.get().$promise}).then(function(b){return a.tags=_.map(b.rows,"name"),c.get({id:g}).$promise}).then(function(b){a.fields={},a.contact={};var c=_.merge(_.keys(b),_.keys(i));return _.forEach(c,function(c){switch(c){case"tags":a.contact.tags=_.union(b.tags||[],i.tags||[]);break;case"$promise":case"$resolved":break;default:a.fields[c]=[],b[c]&&a.fields[c].push(b[c]),i[c]&&a.fields[c].push(i[c]),a.contact[c]=a.fields[c][0]||null}}),h.get({listId:b.ListId,controller:"customfields"}).$promise}).then(function(b){a.customFields=b.rows,a.customFields.forEach(function(a){a.values=JSON.parse(a.values)})})["catch"](function(a){d.error(a)})},a.merge=function(){a.contact.CompanyId||(a.contact.CompanyId=null),f.close(a.contact)},a.cancel=function(){f.dismiss()}}]),angular.module("xCallyShuttleApp").factory("Widget",["$resource",function(a){return a("/api/widgets/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("MarketCtrl",["$scope","$http","$translate","socket","xAlert","Modal","$timeout","Integration",function(a,b,c,d,e,f,g,h){function i(a,b){return Math.floor(Math.random()*(b-a+1))+a}a.initView=function(){return h.get().$promise.then(function(b){a.integrations=b.rows,a.groupedIntegration=_.chunk(a.integrations,4),d.syncUpdates("integration",a.integrations,function(){a.groupedIntegration=_.chunk(a.integrations,4)})})["catch"](function(a){e.error(a,"danger")})},a.isProgressing=!1,a.$on("$destroy",function(){d.unsyncUpdates("integration")}),a.installIntegration=function(b){return navigator.onLine?(a.status="Downloading",a.percentage=i(1,50),a.isProgressing=!0,b.downloading=!0,h.update({id:b.id},{active:!0}).$promise.then(function(){g(function(){a.percentage=i(51,99),a.status="Installing"},2500),g(function(){a.percentage=100,a.isProgressing=!1,a.status="Completed!",b.downloading=!1,e.show(c.instant("MESSAGE_WELL_DONE")+".","success")},5e3)})["catch"](function(){b.downloading=!1,a.percentage=0,a.isProgressing=!1,e.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})):void e.show(c.instant("MESSAGE_NO_INTERNET_CONNECTION")+".","danger")},a.uninstallIntegration=function(b){return navigator.onLine?(a.status="Uninstalling",a.percentage=i(1,99),a.isProgressing=!0,b.downloading=!0,h.update({id:b.id},{active:!1}).$promise.then(function(){g(function(){a.percentage=100,a.isProgressing=!1,a.status="Completed!",b.downloading=!1,e.show(c.instant("MESSAGE_WELL_DONE")+".","success")},5e3)})["catch"](function(){b.downloading=!1,a.percentage=0,a.isProgressing=!1,e.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})):void e.show(c.instant("MESSAGE_NO_INTERNET_CONNECTION")+".","danger")}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.market",{url:"/market",templateUrl:"app/market/market.html",controller:"MarketCtrl",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("MotionbarCtrl",["$scope","$stateParams","$cookieStore","$window","$location","Auth",function(a,b,c,d,e,f){console.log(b),b.token&&b.userId&&b.role&&b.redirectTo?(f.loginWithToken(b.token,b.userId,b.role),d.location.href=decodeURIComponent(b.redirectTo)):e.path("/login")}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("motionbar",{url:"/motionbar?redirectTo&token&userId&role",template:"<div ui-view></div>",controller:"MotionbarCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.blacklist",{url:"/blacklist",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("MotionDialerBlackListListCtrl",["$scope","$uibModal","$translate","xAlert","Modal","MotionDialerBlackList","uiGridConstants",function(a,b,c,d,e,f,g){a.initView=function(){a.gridOptions={paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!0,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,columnDefs:[{name:"id",width:60},{name:"phone"},{name:"description",enableSorting:!1},{name:"updatedtime",sort:{direction:g.DESC},enableFiltering:!1},{name:"action",cellTemplate:'<div><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteItem(row.entity.phone, row.entity.id)"><i class="icon-trash"></i></a></div>',enableSorting:!1,cellClass:"ui-grid-vcenter",enableFiltering:!1}]},f.list({page:1,size:6e5}).$promise.then(function(b){b.status>0?a.gridOptions.data=b.response.RMI.rows:d.show("Please, check your connection!","danger")})["catch"](function(a){d.error(a)})},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/motiondialer/blacklist/list/list.create.modal.html",controller:"MotionDialerBlackListListCreateCtrl"});c.result.then(function(b){a.gridOptions.data.push(b.response.RMI)})},a.deleteItem=e.confirm["delete"](function(b){return f["delete"]({id:b}).$promise.then(function(e){e.status>0?(_.remove(a.gridOptions.data,{id:b}),d.show(c.instant("MESSAGE_WELL_DONE"),"success")):d.show(e.message||"Please, check your connection!","danger")})["catch"](function(a){d.error(a)})})}]),angular.module("xCallyShuttleApp").controller("MotionDialerBlackListListCreateCtrl",["$scope","$translate","$uibModalInstance","MotionDialerBlackList","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.insert(a.item).$promise.then(function(a){a.status>0?(e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)):e.show(a.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.blacklist.list",{url:"/list",templateUrl:"app/motiondialer/blacklist/list/list.html",controller:"MotionDialerBlackListListCtrl",authenticate:!0})}]),angular.module("xCallyShuttleApp").factory("MotionDialerBlackList",["$resource",function(a){return a("/api/rest/blacklist/:controller",null,{list:{method:"POST",params:{controller:"list"}},insert:{method:"POST",params:{controller:"insert"}},"delete":{method:"POST",params:{controller:"delete"}},find:{method:"POST",params:{controller:"find"}},update:{method:"POST",params:{controller:"update"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.info",{url:"/info",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("MotionDialerSystem",["$resource",function(a){return a("/api/rest/system/:controller",null,{properties:{method:"POST",params:{controller:"properties"}}})}]),angular.module("xCallyShuttleApp").controller("MotionDialerInfoViewCtrl",["$scope","xAlert","MotionDialerSystem",function(a,b,c){a.getProperties=function(){return c.properties().$promise.then(function(c){console.log(c),c.status>0?a.properties=c.response.RMI:b.show(c.message||"Please, check your connection!","danger")})["catch"](function(a){b.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.info.view",{url:"/view",templateUrl:"app/motiondialer/info/view/view.html",controller:"MotionDialerInfoViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.motiondialer.info.view.about",{url:"/about",templateUrl:"app/motiondialer/info/view/view.about.html"}).state("main.motiondialer.info.view.details",{url:"/details",templateUrl:"app/motiondialer/info/view/view.details.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.lists",{url:"/lists",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("MotionDialerListListCtrl",["$scope","$uibModal","$translate","xAlert","Modal","MotionDialerList","uiGridConstants","usSpinnerService",function(a,b,c,d,e,f,g,h){a.initView=function(){return a.gridOptions={paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!0,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,columnDefs:[{name:"id",width:60},{name:"name"},{name:"description",enableSorting:!1},{name:"updatedtime",sort:{direction:g.DESC},enableFiltering:!1},{name:"action",cellTemplate:'<div><a class="btn btn-xs blue-hoki" href="/motiondialer/lists/view/{{row.entity.id}}/settings"><i class="icon-settings"></i></a> <a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteItem(row.entity.name, row.entity.id)"><i class="icon-trash"></i></a></div>',enableSorting:!1,cellClass:"ui-grid-vcenter",enableFiltering:!1}]},f.list({page:1,size:6e5}).$promise.then(function(b){b.status>0?a.gridOptions.data=b.response.RMI.rows:d.show("Please, check your connection!","danger")})["catch"](function(a){d.error(a)})["finally"](function(){h.stop("spinner-grid")})},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/motiondialer/list/list/list.create.modal.html",controller:"MotionDialerListListCreateCtrl"});c.result.then(function(b){a.gridOptions.data.push(b.response.RMI)})},a.deleteItem=e.confirm["delete"](function(b){return f["delete"]({id:b}).$promise.then(function(e){e.status>0?(_.remove(a.gridOptions.data,{id:b}),d.show(c.instant("MESSAGE_WELL_DONE"),"success")):d.show(e.message||"Please, check your connection!","danger")})["catch"](function(a){d.error(a)})})}]),angular.module("xCallyShuttleApp").controller("MotionDialerListListCreateCtrl",["$scope","$translate","$uibModalInstance","MotionDialerList","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.insert(a.item).$promise.then(function(a){a.status>0?(e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)):e.show(a.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.lists.list",{url:"/list",templateUrl:"app/motiondialer/list/list/list.html",controller:"MotionDialerListListCtrl",authenticate:!0})}]),angular.module("xCallyShuttleApp").factory("MotionDialerContact",["$resource",function(a){return a("/api/rest/contact/:controller",null,{list:{method:"POST",params:{controller:"list"}},insert:{method:"POST",params:{controller:"insert"}},"delete":{method:"POST",params:{controller:"delete"}},find:{method:"POST",params:{controller:"find"}},update:{method:"POST",params:{controller:"update"}}})}]),angular.module("xCallyShuttleApp").factory("MotionDialerList",["$resource",function(a){return a("/api/rest/list/:controller",null,{list:{method:"POST",params:{controller:"list"}},insert:{method:"POST",params:{controller:"insert"}},"delete":{method:"POST",params:{controller:"delete"}},find:{method:"POST",params:{controller:"find"}},update:{method:"POST",params:{controller:"update"}}})}]),angular.module("xCallyShuttleApp").controller("MotionDialerViewContactCreateCtrl",["$scope","$translate","$uibModalInstance","$stateParams","MotionDialerContact","xAlert","MotionDialerTimezone",function(a,b,c,d,e,f,g){a.form={},a.item={},a.timezones=g.list(),a.save=function(){return console.log(a.item),e.insert({id_list:parseInt(d.id),name:a.item.name,phones:a.item.phones.trim().split(","),description:a.item.description||""}).$promise.then(function(a){console.log(a),a.status>0?(f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)):f.show(a.message||"Please, check your connection!","danger")})["catch"](function(a){f.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").controller("MotionDialerListContactImportModalCtrl",["$scope","$uibModalInstance","$stateParams","indexes","csv","xAlert","MotionDialerContact","MotionDialerTimezone",function(a,b,c,d,e,f,g,h){function i(b){if(b>=a.csvLength||a.stopped)return void(a.importing=!1);var d={id_list:parseInt(c.id),name:"",phones:[],variables:[],description:"",account:"",timezone:""},f={};return _.forOwn(a.item,function(a,c){switch(c){case"phones":_.forEach(a,function(a){e[b][a]&&d.phones.push(e[b][a])});break;case"variables":_.forEach(a,function(a){e[b][a]&&(f={},f[a]=e[b][a],d.variables.push(f))});break;default:d[c]=e[b][a]}}),d.phones.length?(d.timezone||delete d.timezone,g.insert(d).$promise.then(function(b){b.status>0?(a["import"].success+=j,a["import"].succeeded++,k.push(b.response.RMI)):(console.log(b),a["import"].fail+=j,a["import"].failed++)})["catch"](function(b){console.log(b),a["import"].fail+=j,a["import"].failed++})["finally"](function(){i(b+1)})):(a.noPhone.push(b+2),a["import"].fail+=j,a["import"].failed++,i(b+1),void 0)}a.form={},a.item={},a.timezones=h.list(),a.uiTimeZones=[],_.forEach(a.timezones,function(b){_.forEach(b.zones,function(c){c.group=b.group,a.uiTimeZones.push(c)})}),console.log(d),console.log(e),a.indexes=d,a.importing=!1,a.submitted=!1,a.stopped=!1,a["import"]={success:0,fail:0,succeeded:0,failed:0},a.csvLength=e.length;var j=100/a.csvLength,k=[];a.start=function(){a.noPhone=[],a.importing=!0,a.submitted=!0,i(0)},a.close=function(){b.close(k)},a.stop=function(){a.stopped=!0}}]),angular.module("xCallyShuttleApp").controller("MotionDialerListViewCtrl",["$scope","$translate","$stateParams","$uibModal","xAlert","uiGridConstants","usSpinnerService","MotionDialerList","MotionDialerContact","Modal","FileUploader","Papa",function(a,b,c,d,e,f,g,h,i,j,k,l){a.getList=function(){return h.find({id:parseInt(c.id)}).$promise.then(function(b){b.status>0?a.list=b.response.RMI:e.show(b.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})},a.updateList=function(){return h.update({id:a.list.id,name:a.list.name,description:a.list.description}).$promise.then(function(a){a.status>0?e.show(b.instant("MESSAGE_WELL_DONE"),"success"):e.show(a.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})},a.getContacts=function(){return a.gridOptions={paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!0,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,columnDefs:[{name:"name"},{name:"phones",cellTemplate:"<div>{{row.entity.phones.join(',')}}</div>",cellClass:"ui-grid-vcenter"},{name:"description",enableSorting:!1},{name:"updatedtime",sort:{direction:f.DESC},enableFiltering:!1},{name:"action",cellTemplate:'<div><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteContact(row.entity.name, row.entity.id)"><i class="icon-trash"></i></a></div>',enableSorting:!1,cellClass:"ui-grid-vcenter",enableFiltering:!1}]},i.list({id_list:parseInt(c.id),page:1,size:6e5}).$promise.then(function(b){b.status>0?a.gridOptions.data=b.response.RMI.rows:e.show(b.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})["finally"](function(){g.stop("spinner-grid")})},a.deleteContact=j.confirm["delete"](function(c){return i["delete"]({id:c}).$promise.then(function(d){d.status>0?(_.remove(a.gridOptions.data,{id:c}),e.show(b.instant("MESSAGE_WELL_DONE"),"success")):e.show(d.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})}),a.createContact=function(){var b=d.open({animation:!0,templateUrl:"app/motiondialer/list/view/view.contact.create.modal.html",controller:"MotionDialerViewContactCreateCtrl"});b.result.then(function(b){a.gridOptions.data.push(b.response.RMI)})};var m=a.uploader=new k({queueLimit:1,clearInputAfterAddedToQueue:!0});m.onAfterAddingFile=function(b){l.parse(b._file,{header:!0,complete:function(b){a.uploader.clearQueue(),a["import"](b.data)},error:function(a){e.error(a)}})},a["import"]=function(b){var c=d.open({animation:!0,backdrop:"static",keyboard:!1,templateUrl:"app/motiondialer/list/view/view.contact.import.modal.html",controller:"MotionDialerListContactImportModalCtrl",resolve:{indexes:function(){return _.keys(b[0])},csv:function(){return b}}});c.result.then(function(b){console.log(b),a.gridOptions.data=a.gridOptions.data.concat(b)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.lists.view",{url:"/view/:id",templateUrl:"app/motiondialer/list/view/view.html",controller:"MotionDialerListViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.motiondialer.lists.view.settings",{url:"/settings",templateUrl:"app/motiondialer/list/view/view.settings.html"}).state("main.motiondialer.lists.view.contacts",{url:"/contacts",templateUrl:"app/motiondialer/list/view/view.contacts.html"})}]),angular.module("xCallyShuttleApp").factory("MotionDialerTimezone",function(){return{list:function(){return[{group:"US (Common)",zones:[{value:"America/Puerto_Rico",name:"Puerto Rico (Atlantic)"},{value:"America/New_York",name:"New York (Eastern)"},{value:"America/Chicago",name:"Chicago (Central)"},{value:"America/Denver",name:"Denver (Mountain)"},{value:"America/Phoenix",name:"Phoenix (MST)"},{value:"America/Los_Angeles",name:"Los Angeles (Pacific)"},{value:"America/Anchorage",name:"Anchorage (Alaska)"},{value:"Pacific/Honolulu",name:"Honolulu (Hawaii)"}]},{group:"America",zones:[{value:"America/Adak",name:"Adak"},{value:"America/Anchorage",name:"Anchorage"},{value:"America/Anguilla",name:"Anguilla"},{value:"America/Antigua",name:"Antigua"},{value:"America/Araguaina",name:"Araguaina"},{value:"America/Argentina/Buenos_Aires",name:"Argentina - Buenos Aires"},{value:"America/Argentina/Catamarca",name:"Argentina - Catamarca"},{value:"America/Argentina/ComodRivadavia",name:"Argentina - ComodRivadavia"},{value:"America/Argentina/Cordoba",name:"Argentina - Cordoba"},{value:"America/Argentina/Jujuy",name:"Argentina - Jujuy"},{value:"America/Argentina/La_Rioja",name:"Argentina - La Rioja"},{value:"America/Argentina/Mendoza",name:"Argentina - Mendoza"},{value:"America/Argentina/Rio_Gallegos",name:"Argentina - Rio Gallegos"},{value:"America/Argentina/Salta",name:"Argentina - Salta"},{value:"America/Argentina/San_Juan",name:"Argentina - San Juan"},{value:"America/Argentina/San_Luis",name:"Argentina - San Luis"},{value:"America/Argentina/Tucuman",name:"Argentina - Tucuman"},{value:"America/Argentina/Ushuaia",name:"Argentina - Ushuaia"},{value:"America/Aruba",name:"Aruba"},{value:"America/Asuncion",name:"Asuncion"},{value:"America/Atikokan",name:"Atikokan"},{value:"America/Atka",name:"Atka"},{value:"America/Bahia",name:"Bahia"},{value:"America/Barbados",name:"Barbados"},{value:"America/Belem",name:"Belem"},{value:"America/Belize",name:"Belize"},{value:"America/Blanc-Sablon",name:"Blanc-Sablon"},{value:"America/Boa_Vista",name:"Boa Vista"},{value:"America/Bogota",name:"Bogota"},{value:"America/Boise",name:"Boise"},{value:"America/Buenos_Aires",name:"Buenos Aires"},{value:"America/Cambridge_Bay",name:"Cambridge Bay"},{value:"America/Campo_Grande",name:"Campo Grande"},{value:"America/Cancun",name:"Cancun"},{value:"America/Caracas",name:"Caracas"},{value:"America/Catamarca",name:"Catamarca"},{value:"America/Cayenne",name:"Cayenne"},{value:"America/Cayman",name:"Cayman"},{value:"America/Chicago",name:"Chicago"},{value:"America/Chihuahua",name:"Chihuahua"},{value:"America/Coral_Harbour",name:"Coral Harbour"},{value:"America/Cordoba",name:"Cordoba"},{value:"America/Costa_Rica",name:"Costa Rica"},{value:"America/Cuiaba",name:"Cuiaba"},{value:"America/Curacao",name:"Curacao"},{value:"America/Danmarkshavn",name:"Danmarkshavn"},{value:"America/Dawson",name:"Dawson"},{value:"America/Dawson_Creek",name:"Dawson Creek"},{value:"America/Denver",name:"Denver"},{value:"America/Detroit",name:"Detroit"},{value:"America/Dominica",name:"Dominica"},{value:"America/Edmonton",name:"Edmonton"},{value:"America/Eirunepe",name:"Eirunepe"},{value:"America/El_Salvador",name:"El Salvador"},{value:"America/Ensenada",name:"Ensenada"},{value:"America/Fortaleza",name:"Fortaleza"},{value:"America/Fort_Wayne",name:"Fort Wayne"},{value:"America/Glace_Bay",name:"Glace Bay"},{value:"America/Godthab",name:"Godthab"},{value:"America/Goose_Bay",name:"Goose Bay"},{value:"America/Grand_Turk",name:"Grand Turk"},{value:"America/Grenada",name:"Grenada"},{value:"America/Guadeloupe",name:"Guadeloupe"},{value:"America/Guatemala",name:"Guatemala"},{value:"America/Guayaquil",name:"Guayaquil"},{value:"America/Guyana",name:"Guyana"},{value:"America/Halifax",name:"Halifax"},{value:"America/Havana",name:"Havana"},{value:"America/Hermosillo",name:"Hermosillo"},{value:"America/Indiana/Indianapolis",name:"Indiana - Indianapolis"},{value:"America/Indiana/Knox",name:"Indiana - Knox"},{value:"America/Indiana/Marengo",name:"Indiana - Marengo"},{value:"America/Indiana/Petersburg",name:"Indiana - Petersburg"},{value:"America/Indiana/Tell_City",name:"Indiana - Tell City"},{value:"America/Indiana/Vevay",name:"Indiana - Vevay"},{value:"America/Indiana/Vincennes",name:"Indiana - Vincennes"},{value:"America/Indiana/Winamac",name:"Indiana - Winamac"},{value:"America/Indianapolis",name:"Indianapolis"},{value:"America/Inuvik",name:"Inuvik"},{value:"America/Iqaluit",name:"Iqaluit"},{value:"America/Jamaica",name:"Jamaica"},{value:"America/Jujuy",name:"Jujuy"},{value:"America/Juneau",name:"Juneau"},{value:"America/Kentucky/Louisville",name:"Kentucky - Louisville"},{value:"America/Kentucky/Monticello",name:"Kentucky - Monticello"},{value:"America/Knox_IN",name:"Knox IN"},{value:"America/La_Paz",name:"La Paz"},{value:"America/Lima",name:"Lima"},{value:"America/Los_Angeles",name:"Los Angeles"},{value:"America/Louisville",name:"Louisville"},{value:"America/Maceio",name:"Maceio"},{value:"America/Managua",name:"Managua"},{value:"America/Manaus",name:"Manaus"},{value:"America/Marigot",name:"Marigot"},{value:"America/Martinique",name:"Martinique"},{value:"America/Matamoros",name:"Matamoros"},{value:"America/Mazatlan",name:"Mazatlan"},{value:"America/Mendoza",name:"Mendoza"},{value:"America/Menominee",name:"Menominee"},{value:"America/Merida",name:"Merida"},{value:"America/Mexico_City",name:"Mexico City"},{value:"America/Miquelon",name:"Miquelon"},{value:"America/Moncton",name:"Moncton"},{value:"America/Monterrey",
-name:"Monterrey"},{value:"America/Montevideo",name:"Montevideo"},{value:"America/Montreal",name:"Montreal"},{value:"America/Montserrat",name:"Montserrat"},{value:"America/Nassau",name:"Nassau"},{value:"America/New_York",name:"New York"},{value:"America/Nipigon",name:"Nipigon"},{value:"America/Nome",name:"Nome"},{value:"America/Noronha",name:"Noronha"},{value:"America/North_Dakota/Center",name:"North Dakota - Center"},{value:"America/North_Dakota/New_Salem",name:"North Dakota - New Salem"},{value:"America/Ojinaga",name:"Ojinaga"},{value:"America/Panama",name:"Panama"},{value:"America/Pangnirtung",name:"Pangnirtung"},{value:"America/Paramaribo",name:"Paramaribo"},{value:"America/Phoenix",name:"Phoenix"},{value:"America/Port-au-Prince",name:"Port-au-Prince"},{value:"America/Porto_Acre",name:"Porto Acre"},{value:"America/Port_of_Spain",name:"Port of Spain"},{value:"America/Porto_Velho",name:"Porto Velho"},{value:"America/Puerto_Rico",name:"Puerto Rico"},{value:"America/Rainy_River",name:"Rainy River"},{value:"America/Rankin_Inlet",name:"Rankin Inlet"},{value:"America/Recife",name:"Recife"},{value:"America/Regina",name:"Regina"},{value:"America/Resolute",name:"Resolute"},{value:"America/Rio_Branco",name:"Rio Branco"},{value:"America/Rosario",name:"Rosario"},{value:"America/Santa_Isabel",name:"Santa Isabel"},{value:"America/Santarem",name:"Santarem"},{value:"America/Santiago",name:"Santiago"},{value:"America/Santo_Domingo",name:"Santo Domingo"},{value:"America/Sao_Paulo",name:"Sao Paulo"},{value:"America/Scoresbysund",name:"Scoresbysund"},{value:"America/Shiprock",name:"Shiprock"},{value:"America/St_Barthelemy",name:"St Barthelemy"},{value:"America/St_Johns",name:"St Johns"},{value:"America/St_Kitts",name:"St Kitts"},{value:"America/St_Lucia",name:"St Lucia"},{value:"America/St_Thomas",name:"St Thomas"},{value:"America/St_Vincent",name:"St Vincent"},{value:"America/Swift_Current",name:"Swift Current"},{value:"America/Tegucigalpa",name:"Tegucigalpa"},{value:"America/Thule",name:"Thule"},{value:"America/Thunder_Bay",name:"Thunder Bay"},{value:"America/Tijuana",name:"Tijuana"},{value:"America/Toronto",name:"Toronto"},{value:"America/Tortola",name:"Tortola"},{value:"America/Vancouver",name:"Vancouver"},{value:"America/Virgin",name:"Virgin"},{value:"America/Whitehorse",name:"Whitehorse"},{value:"America/Winnipeg",name:"Winnipeg"},{value:"America/Yakutat",name:"Yakutat"},{value:"America/Yellowknife",name:"Yellowknife"}]},{group:"Europe",zones:[{value:"Europe/Amsterdam",name:"Amsterdam"},{value:"Europe/Andorra",name:"Andorra"},{value:"Europe/Athens",name:"Athens"},{value:"Europe/Belfast",name:"Belfast"},{value:"Europe/Belgrade",name:"Belgrade"},{value:"Europe/Berlin",name:"Berlin"},{value:"Europe/Bratislava",name:"Bratislava"},{value:"Europe/Brussels",name:"Brussels"},{value:"Europe/Bucharest",name:"Bucharest"},{value:"Europe/Budapest",name:"Budapest"},{value:"Europe/Chisinau",name:"Chisinau"},{value:"Europe/Copenhagen",name:"Copenhagen"},{value:"Europe/Dublin",name:"Dublin"},{value:"Europe/Gibraltar",name:"Gibraltar"},{value:"Europe/Guernsey",name:"Guernsey"},{value:"Europe/Helsinki",name:"Helsinki"},{value:"Europe/Isle_of_Man",name:"Isle of Man"},{value:"Europe/Istanbul",name:"Istanbul"},{value:"Europe/Jersey",name:"Jersey"},{value:"Europe/Kaliningrad",name:"Kaliningrad"},{value:"Europe/Kiev",name:"Kiev"},{value:"Europe/Lisbon",name:"Lisbon"},{value:"Europe/Ljubljana",name:"Ljubljana"},{value:"Europe/London",name:"London"},{value:"Europe/Luxembourg",name:"Luxembourg"},{value:"Europe/Madrid",name:"Madrid"},{value:"Europe/Malta",name:"Malta"},{value:"Europe/Mariehamn",name:"Mariehamn"},{value:"Europe/Minsk",name:"Minsk"},{value:"Europe/Monaco",name:"Monaco"},{value:"Europe/Moscow",name:"Moscow"},{value:"Europe/Nicosia",name:"Nicosia"},{value:"Europe/Oslo",name:"Oslo"},{value:"Europe/Paris",name:"Paris"},{value:"Europe/Podgorica",name:"Podgorica"},{value:"Europe/Prague",name:"Prague"},{value:"Europe/Riga",name:"Riga"},{value:"Europe/Rome",name:"Rome"},{value:"Europe/Samara",name:"Samara"},{value:"Europe/San_Marino",name:"San Marino"},{value:"Europe/Sarajevo",name:"Sarajevo"},{value:"Europe/Simferopol",name:"Simferopol"},{value:"Europe/Skopje",name:"Skopje"},{value:"Europe/Sofia",name:"Sofia"},{value:"Europe/Stockholm",name:"Stockholm"},{value:"Europe/Tallinn",name:"Tallinn"},{value:"Europe/Tirane",name:"Tirane"},{value:"Europe/Tiraspol",name:"Tiraspol"},{value:"Europe/Uzhgorod",name:"Uzhgorod"},{value:"Europe/Vaduz",name:"Vaduz"},{value:"Europe/Vatican",name:"Vatican"},{value:"Europe/Vienna",name:"Vienna"},{value:"Europe/Vilnius",name:"Vilnius"},{value:"Europe/Volgograd",name:"Volgograd"},{value:"Europe/Warsaw",name:"Warsaw"},{value:"Europe/Zagreb",name:"Zagreb"},{value:"Europe/Zaporozhye",name:"Zaporozhye"},{value:"Europe/Zurich",name:"Zurich"}]},{group:"Asia",zones:[{value:"Asia/Aden",name:"Aden"},{value:"Asia/Almaty",name:"Almaty"},{value:"Asia/Amman",name:"Amman"},{value:"Asia/Anadyr",name:"Anadyr"},{value:"Asia/Aqtau",name:"Aqtau"},{value:"Asia/Aqtobe",name:"Aqtobe"},{value:"Asia/Ashgabat",name:"Ashgabat"},{value:"Asia/Ashkhabad",name:"Ashkhabad"},{value:"Asia/Baghdad",name:"Baghdad"},{value:"Asia/Bahrain",name:"Bahrain"},{value:"Asia/Baku",name:"Baku"},{value:"Asia/Bangkok",name:"Bangkok"},{value:"Asia/Beirut",name:"Beirut"},{value:"Asia/Bishkek",name:"Bishkek"},{value:"Asia/Brunei",name:"Brunei"},{value:"Asia/Calcutta",name:"Calcutta"},{value:"Asia/Choibalsan",name:"Choibalsan"},{value:"Asia/Chongqing",name:"Chongqing"},{value:"Asia/Chungking",name:"Chungking"},{value:"Asia/Colombo",name:"Colombo"},{value:"Asia/Dacca",name:"Dacca"},{value:"Asia/Damascus",name:"Damascus"},{value:"Asia/Dhaka",name:"Dhaka"},{value:"Asia/Dili",name:"Dili"},{value:"Asia/Dubai",name:"Dubai"},{value:"Asia/Dushanbe",name:"Dushanbe"},{value:"Asia/Gaza",name:"Gaza"},{value:"Asia/Harbin",name:"Harbin"},{value:"Asia/Ho_Chi_Minh",name:"Ho Chi Minh"},{value:"Asia/Hong_Kong",name:"Hong Kong"},{value:"Asia/Hovd",name:"Hovd"},{value:"Asia/Irkutsk",name:"Irkutsk"},{value:"Asia/Istanbul",name:"Istanbul"},{value:"Asia/Jakarta",name:"Jakarta"},{value:"Asia/Jayapura",name:"Jayapura"},{value:"Asia/Jerusalem",name:"Jerusalem"},{value:"Asia/Kabul",name:"Kabul"},{value:"Asia/Kamchatka",name:"Kamchatka"},{value:"Asia/Karachi",name:"Karachi"},{value:"Asia/Kashgar",name:"Kashgar"},{value:"Asia/Kathmandu",name:"Kathmandu"},{value:"Asia/Katmandu",name:"Katmandu"},{value:"Asia/Kolkata",name:"Kolkata"},{value:"Asia/Krasnoyarsk",name:"Krasnoyarsk"},{value:"Asia/Kuala_Lumpur",name:"Kuala Lumpur"},{value:"Asia/Kuching",name:"Kuching"},{value:"Asia/Kuwait",name:"Kuwait"},{value:"Asia/Macao",name:"Macao"},{value:"Asia/Macau",name:"Macau"},{value:"Asia/Magadan",name:"Magadan"},{value:"Asia/Makassar",name:"Makassar"},{value:"Asia/Manila",name:"Manila"},{value:"Asia/Muscat",name:"Muscat"},{value:"Asia/Nicosia",name:"Nicosia"},{value:"Asia/Novokuznetsk",name:"Novokuznetsk"},{value:"Asia/Novosibirsk",name:"Novosibirsk"},{value:"Asia/Omsk",name:"Omsk"},{value:"Asia/Oral",name:"Oral"},{value:"Asia/Phnom_Penh",name:"Phnom Penh"},{value:"Asia/Pontianak",name:"Pontianak"},{value:"Asia/Pyongyang",name:"Pyongyang"},{value:"Asia/Qatar",name:"Qatar"},{value:"Asia/Qyzylorda",name:"Qyzylorda"},{value:"Asia/Rangoon",name:"Rangoon"},{value:"Asia/Riyadh",name:"Riyadh"},{value:"Asia/Saigon",name:"Saigon"},{value:"Asia/Sakhalin",name:"Sakhalin"},{value:"Asia/Samarkand",name:"Samarkand"},{value:"Asia/Seoul",name:"Seoul"},{value:"Asia/Shanghai",name:"Shanghai"},{value:"Asia/Singapore",name:"Singapore"},{value:"Asia/Taipei",name:"Taipei"},{value:"Asia/Tashkent",name:"Tashkent"},{value:"Asia/Tbilisi",name:"Tbilisi"},{value:"Asia/Tehran",name:"Tehran"},{value:"Asia/Tel_Aviv",name:"Tel Aviv"},{value:"Asia/Thimbu",name:"Thimbu"},{value:"Asia/Thimphu",name:"Thimphu"},{value:"Asia/Tokyo",name:"Tokyo"},{value:"Asia/Ujung_Pandang",name:"Ujung Pandang"},{value:"Asia/Ulaanbaatar",name:"Ulaanbaatar"},{value:"Asia/Ulan_Bator",name:"Ulan Bator"},{value:"Asia/Urumqi",name:"Urumqi"},{value:"Asia/Vientiane",name:"Vientiane"},{value:"Asia/Vladivostok",name:"Vladivostok"},{value:"Asia/Yakutsk",name:"Yakutsk"},{value:"Asia/Yekaterinburg",name:"Yekaterinburg"},{value:"Asia/Yerevan",name:"Yerevan"}]},{group:"Africa",zones:[{value:"Africa/Abidjan",name:"Abidjan"},{value:"Africa/Accra",name:"Accra"},{value:"Africa/Addis_Ababa",name:"Addis Ababa"},{value:"Africa/Algiers",name:"Algiers"},{value:"Africa/Asmara",name:"Asmara"},{value:"Africa/Asmera",name:"Asmera"},{value:"Africa/Bamako",name:"Bamako"},{value:"Africa/Bangui",name:"Bangui"},{value:"Africa/Banjul",name:"Banjul"},{value:"Africa/Bissau",name:"Bissau"},{value:"Africa/Blantyre",name:"Blantyre"},{value:"Africa/Brazzaville",name:"Brazzaville"},{value:"Africa/Bujumbura",name:"Bujumbura"},{value:"Africa/Cairo",name:"Cairo"},{value:"Africa/Casablanca",name:"Casablanca"},{value:"Africa/Ceuta",name:"Ceuta"},{value:"Africa/Conakry",name:"Conakry"},{value:"Africa/Dakar",name:"Dakar"},{value:"Africa/Dar_es_Salaam",name:"Dar es Salaam"},{value:"Africa/Djibouti",name:"Djibouti"},{value:"Africa/Douala",name:"Douala"},{value:"Africa/El_Aaiun",name:"El Aaiun"},{value:"Africa/Freetown",name:"Freetown"},{value:"Africa/Gaborone",name:"Gaborone"},{value:"Africa/Harare",name:"Harare"},{value:"Africa/Johannesburg",name:"Johannesburg"},{value:"Africa/Kampala",name:"Kampala"},{value:"Africa/Khartoum",name:"Khartoum"},{value:"Africa/Kigali",name:"Kigali"},{value:"Africa/Kinshasa",name:"Kinshasa"},{value:"Africa/Lagos",name:"Lagos"},{value:"Africa/Libreville",name:"Libreville"},{value:"Africa/Lome",name:"Lome"},{value:"Africa/Luanda",name:"Luanda"},{value:"Africa/Lubumbashi",name:"Lubumbashi"},{value:"Africa/Lusaka",name:"Lusaka"},{value:"Africa/Malabo",name:"Malabo"},{value:"Africa/Maputo",name:"Maputo"},{value:"Africa/Maseru",name:"Maseru"},{value:"Africa/Mbabane",name:"Mbabane"},{value:"Africa/Mogadishu",name:"Mogadishu"},{value:"Africa/Monrovia",name:"Monrovia"},{value:"Africa/Nairobi",name:"Nairobi"},{value:"Africa/Ndjamena",name:"Ndjamena"},{value:"Africa/Niamey",name:"Niamey"},{value:"Africa/Nouakchott",name:"Nouakchott"},{value:"Africa/Ouagadougou",name:"Ouagadougou"},{value:"Africa/Porto-Novo",name:"Porto-Novo"},{value:"Africa/Sao_Tome",name:"Sao Tome"},{value:"Africa/Timbuktu",name:"Timbuktu"},{value:"Africa/Tripoli",name:"Tripoli"},{value:"Africa/Tunis",name:"Tunis"},{value:"Africa/Windhoek",name:"Windhoek"}]},{group:"Australia",zones:[{value:"Australia/ACT",name:"ACT"},{value:"Australia/Adelaide",name:"Adelaide"},{value:"Australia/Brisbane",name:"Brisbane"},{value:"Australia/Broken_Hill",name:"Broken Hill"},{value:"Australia/Canberra",name:"Canberra"},{value:"Australia/Currie",name:"Currie"},{value:"Australia/Darwin",name:"Darwin"},{value:"Australia/Eucla",name:"Eucla"},{value:"Australia/Hobart",name:"Hobart"},{value:"Australia/LHI",name:"LHI"},{value:"Australia/Lindeman",name:"Lindeman"},{value:"Australia/Lord_Howe",name:"Lord Howe"},{value:"Australia/Melbourne",name:"Melbourne"},{value:"Australia/North",name:"North"},{value:"Australia/NSW",name:"NSW"},{value:"Australia/Perth",name:"Perth"},{value:"Australia/Queensland",name:"Queensland"},{value:"Australia/South",name:"South"},{value:"Australia/Sydney",name:"Sydney"},{value:"Australia/Tasmania",name:"Tasmania"},{value:"Australia/Victoria",name:"Victoria"},{value:"Australia/West",name:"West"},{value:"Australia/Yancowinna",name:"Yancowinna"}]},{group:"Indian",zones:[{value:"Indian/Antananarivo",name:"Antananarivo"},{value:"Indian/Chagos",name:"Chagos"},{value:"Indian/Christmas",name:"Christmas"},{value:"Indian/Cocos",name:"Cocos"},{value:"Indian/Comoro",name:"Comoro"},{value:"Indian/Kerguelen",name:"Kerguelen"},{value:"Indian/Mahe",name:"Mahe"},{value:"Indian/Maldives",name:"Maldives"},{value:"Indian/Mauritius",name:"Mauritius"},{value:"Indian/Mayotte",name:"Mayotte"},{value:"Indian/Reunion",name:"Reunion"}]},{group:"Atlantic",zones:[{value:"Atlantic/Azores",name:"Azores"},{value:"Atlantic/Bermuda",name:"Bermuda"},{value:"Atlantic/Canary",name:"Canary"},{value:"Atlantic/Cape_Verde",name:"Cape Verde"},{value:"Atlantic/Faeroe",name:"Faeroe"},{value:"Atlantic/Faroe",name:"Faroe"},{value:"Atlantic/Jan_Mayen",name:"Jan Mayen"},{value:"Atlantic/Madeira",name:"Madeira"},{value:"Atlantic/Reykjavik",name:"Reykjavik"},{value:"Atlantic/South_Georgia",name:"South Georgia"},{value:"Atlantic/Stanley",name:"Stanley"},{value:"Atlantic/St_Helena",name:"St Helena"}]},{group:"Pacific",zones:[{value:"Pacific/Apia",name:"Apia"},{value:"Pacific/Auckland",name:"Auckland"},{value:"Pacific/Chatham",name:"Chatham"},{value:"Pacific/Easter",name:"Easter"},{value:"Pacific/Efate",name:"Efate"},{value:"Pacific/Enderbury",name:"Enderbury"},{value:"Pacific/Fakaofo",name:"Fakaofo"},{value:"Pacific/Fiji",name:"Fiji"},{value:"Pacific/Funafuti",name:"Funafuti"},{value:"Pacific/Galapagos",name:"Galapagos"},{value:"Pacific/Gambier",name:"Gambier"},{value:"Pacific/Guadalcanal",name:"Guadalcanal"},{value:"Pacific/Guam",name:"Guam"},{value:"Pacific/Honolulu",name:"Honolulu"},{value:"Pacific/Johnston",name:"Johnston"},{value:"Pacific/Kiritimati",name:"Kiritimati"},{value:"Pacific/Kosrae",name:"Kosrae"},{value:"Pacific/Kwajalein",name:"Kwajalein"},{value:"Pacific/Majuro",name:"Majuro"},{value:"Pacific/Marquesas",name:"Marquesas"},{value:"Pacific/Midway",name:"Midway"},{value:"Pacific/Nauru",name:"Nauru"},{value:"Pacific/Niue",name:"Niue"},{value:"Pacific/Norfolk",name:"Norfolk"},{value:"Pacific/Noumea",name:"Noumea"},{value:"Pacific/Pago_Pago",name:"Pago Pago"},{value:"Pacific/Palau",name:"Palau"},{value:"Pacific/Pitcairn",name:"Pitcairn"},{value:"Pacific/Ponape",name:"Ponape"},{value:"Pacific/Port_Moresby",name:"Port Moresby"},{value:"Pacific/Rarotonga",name:"Rarotonga"},{value:"Pacific/Saipan",name:"Saipan"},{value:"Pacific/Samoa",name:"Samoa"},{value:"Pacific/Tahiti",name:"Tahiti"},{value:"Pacific/Tarawa",name:"Tarawa"},{value:"Pacific/Tongatapu",name:"Tongatapu"},{value:"Pacific/Truk",name:"Truk"},{value:"Pacific/Wake",name:"Wake"},{value:"Pacific/Wallis",name:"Wallis"},{value:"Pacific/Yap",name:"Yap"}]},{group:"Antarctica",zones:[{value:"Antarctica/Casey",name:"Casey"},{value:"Antarctica/Davis",name:"Davis"},{value:"Antarctica/DumontDUrville",name:"DumontDUrville"},{value:"Antarctica/Macquarie",name:"Macquarie"},{value:"Antarctica/Mawson",name:"Mawson"},{value:"Antarctica/McMurdo",name:"McMurdo"},{value:"Antarctica/Palmer",name:"Palmer"},{value:"Antarctica/Rothera",name:"Rothera"},{value:"Antarctica/South_Pole",name:"South Pole"},{value:"Antarctica/Syowa",name:"Syowa"},{value:"Antarctica/Vostok",name:"Vostok"}]},{group:"Arctic",zones:[{value:"Arctic/Longyearbyen",name:"Longyearbyen"}]},{group:"UTC",zones:[{value:"UTC",name:"UTC"}]},{group:"Manual Offsets",zones:[{value:"UTC-12",name:"UTC-12"},{value:"UTC-11",name:"UTC-11"},{value:"UTC-10",name:"UTC-10"},{value:"UTC-9",name:"UTC-9"},{value:"UTC-8",name:"UTC-8"},{value:"UTC-7",name:"UTC-7"},{value:"UTC-6",name:"UTC-6"},{value:"UTC-5",name:"UTC-5"},{value:"UTC-4",name:"UTC-4"},{value:"UTC-3",name:"UTC-3"},{value:"UTC-2",name:"UTC-2"},{value:"UTC-1",name:"UTC-1"},{value:"UTC+0",name:"UTC+0"},{value:"UTC+1",name:"UTC+1"},{value:"UTC+2",name:"UTC+2"},{value:"UTC+3",name:"UTC+3"},{value:"UTC+4",name:"UTC+4"},{value:"UTC+5",name:"UTC+5"},{value:"UTC+6",name:"UTC+6"},{value:"UTC+7",name:"UTC+7"},{value:"UTC+8",name:"UTC+8"},{value:"UTC+9",name:"UTC+9"},{value:"UTC+10",name:"UTC+10"},{value:"UTC+11",name:"UTC+11"},{value:"UTC+12",name:"UTC+12"},{value:"UTC+13",name:"UTC+13"},{value:"UTC+14",name:"UTC+14"}]}]}}}),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer",{url:"/motiondialer",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:16}}})}]),angular.module("xCallyShuttleApp").controller("MotionDialerProcessListCtrl",["$scope","$uibModal","$translate","xAlert","Modal","MotionDialerProcess","uiGridConstants","usSpinnerService",function(a,b,c,d,e,f,g,h){a.initView=function(){return a.gridOptions={paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!0,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,columnDefs:[{name:"id",width:60},{name:"name"},{name:"queue",enableSorting:!1},{name:"extension",enableSorting:!1},{name:"id_list",enableSorting:!1,cellTemplate:'<div><a class="btn btn-xs grey-cascade" href="/motiondialer/lists/view/{{row.entity.id_list}}/settings">{{row.entity.id_list}}</a></div>',cellClass:"ui-grid-vcenter"},{name:"status",cellTemplate:"<div><a class=\"btn btn-xs\" data-ng-class=\"row.entity.status == 'STOP' ? 'red-sunglo' : 'green-meadow'\" data-ng-href=\"#\">{{ (row.entity.status === 'RUN') ? 'RUNNING' : 'STOPPED'}}</a></div>",cellClass:"ui-grid-vcenter",filter:{type:g.filter.SELECT,selectOptions:[{value:"RUN",label:"RUNNING"},{value:"STOP",label:"STOPPED"}]}},{name:"updatedtime",sort:{direction:g.DESC},enableFiltering:!1},{name:"action",cellTemplate:'<div><a class="btn btn-xs blue-hoki" href="/motiondialer/processes/view/{{row.entity.id}}/overview"><i class="icon-settings"></i></a><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteItem(row.entity.name, row.entity.id)"><i class="icon-trash"></i></a></div>',enableSorting:!1,cellClass:"ui-grid-vcenter",enableFiltering:!1}]},f.list({page:1,size:6e5}).$promise.then(function(b){console.log(b),b.status>0?a.gridOptions.data=b.response.RMI.rows:d.show("Please, check your connection!","danger")})["catch"](function(a){d.error(a)})["finally"](function(){h.stop("spinner-grid")})},a.createProcessQueue=function(){var c=b.open({animation:!0,templateUrl:"app/motiondialer/process/list/list.create.queue.modal.html",controller:"MotionDialerProcessListCreateQueueCtrl"});c.result.then(function(b){a.gridOptions.data.push(b.response.RMI)})},a.createProcessSquare=function(){var c=b.open({animation:!0,templateUrl:"app/motiondialer/process/list/list.create.square.modal.html",controller:"MotionDialerProcessListCreateSquareCtrl"});c.result.then(function(b){a.gridOptions.data.push(b.response.RMI)})},a.deleteItem=e.confirm["delete"](function(b){return f["delete"]({id:b}).$promise.then(function(e){e.status>0?(_.remove(a.gridOptions.data,{id:b}),d.show(c.instant("MESSAGE_WELL_DONE"),"success")):d.show(e.message||"Please, check your connection!","danger")})["catch"](function(a){d.error(a)})})}]),angular.module("xCallyShuttleApp").controller("MotionDialerProcessListCreateQueueCtrl",["$scope","$translate","$uibModalInstance","MotionDialerProcess","MotionDialerList","Trunk","VoiceQueue","Route","xAlert",function(a,b,c,d,e,f,g,h,i){a.form={},a.item={fetch_sort:"ASC",timeout:3},a.initModal=function(){return g.get().$promise.then(function(b){return a.queues={},b&&(a.queues=b.rows),f.get().$promise}).then(function(b){return a.trunks={},b&&(a.trunks=b.rows),a.trunks.push({name:"fake"}),e.list({page:1,size:6e5}).$promise}).then(function(b){a.lists={},b.status>0?a.lists=b.response.RMI.rows:i.show("Please, check your connection!","danger")})["catch"](function(a){i.error(a)})},a.save=function(){console.log(a.item);var e="_process_"+a.item.name+Math.round(1e5*Math.random()),f="Generated by Motion Dialer, Process Queue"+(a.item.description?", "+a.item.description:"");return h.save({appdata:"Internal Call",context:"from-sip",exten:e.replace(/\s/g,"_"),type:"internal",description:f,Applications:[{appdata:["CDR(type)=tigerdial"],app:"Set",interval:"*,*,*,*",type:"internal"},{appdata:["QUEUE_PRIO=99"],app:"Set",interval:"*,*,*,*",type:"internal"},{appdata:["CALLERID(name)=${AUTODIAL_NAME}"],app:"Set",interval:"*,*,*,*",type:"internal"},{appdata:["CALLERID(num)=${AUTODIAL_PHONE}"],app:"Set",interval:"*,*,*,*",type:"internal"},{appdata:[a.item.queue.name,"","","",a.item.timeout],app:"Queue",interval:"*,*,*,*",type:"internal"}]}).$promise.then(function(b){return d.insert({name:a.item.name,id_list:a.item.list.id,queue:a.item.queue.name,device:a.item.device.name,context:"from-sip",extension:e.replace(/\s/g,"_"),description:a.item.description,auto_closed:!0,fetch_sort:a.item.fetch_sort,hooks:[{target:"http://localhost:9000/api/report/integrations/tdDisposal",type:"http",http_method:"POST",json:"true",event:"hangup"}]}).$promise}).then(function(a){a.status>0?(i.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)):i.show(a.message||"Please, check your connection!","danger")})["catch"](function(a){i.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").controller("MotionDialerProcessListCreateSquareCtrl",["$scope","$translate","$uibModalInstance","MotionDialerProcess","MotionDialerList","SquareProject","Trunk","Route","xAlert",function(a,b,c,d,e,f,g,h,i){a.form={},a.item={fetch_sort:"ASC"},a.initModal=function(){return f.get().$promise.then(function(b){return a.projects={},b&&(a.projects=b.rows),g.get().$promise}).then(function(b){return a.trunks={},b&&(a.trunks=b.rows),a.trunks.push({name:"fake"}),e.list({page:1,size:6e5}).$promise}).then(function(b){a.lists={},b.status>0?a.lists=b.response.RMI.rows:i.show("Please, check your connection!","danger")})["catch"](function(a){i.error(a)})},a.save=function(){console.log(a.item);var e="_process_"+a.item.name+Math.round(1e5*Math.random()),f="Generated by Motion Dialer, Process Square"+(a.item.description?", "+a.item.description:"");return h.save({appdata:"Internal Call",context:"from-sip",exten:e.replace(/\s/g,"_"),type:"internal",description:f,Applications:[{appdata:["CDR(type)=tigerdial"],app:"Set",interval:"*,*,*,*",type:"internal"},{appdata:["agi://127.0.0.1/square",a.item.project.name],app:"AGI",interval:"*,*,*,*",type:"internal"}]}).$promise.then(function(b){return d.insert({name:a.item.name,id_list:a.item.list.id,queue:"none",device:a.item.device.name,context:"from-sip",extension:e.replace(/\s/g,"_"),description:a.item.description,auto_closed:!0,channel_limit:15,fetch_sort:a.item.fetch_sort}).$promise}).then(function(a){a.status>0?(i.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)):i.show(a.message||"Please, check your connection!","danger")})["catch"](function(a){i.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.processes.list",{url:"/list",templateUrl:"app/motiondialer/process/list/list.html",controller:"MotionDialerProcessListCtrl",authenticate:!0})}]),angular.module("xCallyShuttleApp").factory("MotionDialerProcess",["$resource",function(a){return a("/api/rest/process/:controller",null,{list:{method:"POST",params:{controller:"list"}},insert:{method:"POST",params:{controller:"insert"}},"delete":{method:"POST",params:{controller:"delete"}},find:{method:"POST",params:{controller:"find"}},update:{method:"POST",params:{controller:"update"}}})}]),angular.module("xCallyShuttleApp").factory("MotionDialerSpooler",["$resource",function(a){return a("/api/rest/spooler/:controller/:retrieve/:peer",null,{list:{method:"POST",params:{controller:"list"}},"delete":{method:"POST",params:{controller:"delete"}},find:{method:"POST",params:{controller:"find"}},summary:{method:"POST",params:{controller:"summary"}},close:{method:"POST",params:{controller:"retrieve",retrieve:"close"}},open:{method:"POST",params:{controller:"retrieve",retrieve:"open"}},blacklist:{method:"POST",params:{controller:"retrieve",retrieve:"blacklist"}},planning:{method:"POST",params:{controller:"retrieve",retrieve:"planning"}},planningpeer:{method:"POST",params:{controller:"retrieve",retrieve:"planning",peer:"peer"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.processes",{url:"/processes",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("MotionDialerProcessViewCtrl",["$scope","$translate","$stateParams","$uibModal","xAlert","uiGridConstants","usSpinnerService","MotionDialerProcess","MotionDialerSpooler","Modal","VoiceQueue",function(a,b,c,d,e,f,g,h,i,j,k){a.process={},a.techs=["SIP","IAX","LOCAL","KHOMP"],a.dialFormats=["tech/device/number","tech/number@device"],a.checkDuplicates=["ALWAYS","IFOPEN","NO"],a.codecs=["g729","ilbc","gsm","ulaw","alaw"],a.getProcess=function(){return h.find({id:parseInt(c.id)}).$promise.then(function(b){console.log(b),b.status>0?(b.response.RMI.codecs=b.response.RMI.codecs.split(","),a.process=b.response.RMI,a.process.hooks&&a.process.hooks.length?a.process.disposal=!0:a.process.disposal=!1):e.show(b.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})},a.getSummary=function(){return i.summary({id_process:parseInt(c.id)}).$promise.then(function(b){if(b.status>0){a.summary=b.response.RMI.totals,a.total=0;for(var c=0;c<a.summary.length;c++)a.total+=a.summary[c][1]}else e.show(b.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})["finally"](function(){g.stop("spinner-grid")})},a.updateProcess=function(){var c=_.clone(a.process);return delete c.updatedtime,delete c.id_list,delete c.createdtime,delete c.runtime,delete c.fetch_sort,c.codecs=c.codecs.join(","),""===c.timezone&&delete c.timezone,c.disposal?c.hooks=[{target:"http://localhost:9000/api/report/integrations/tdDisposal",type:"http",http_method:"POST",json:"true",event:"hangup"}]:c.hooks=[],delete c.disposal,h.update(c).$promise.then(function(c){c.status>0?(c.response.RMI.codecs=c.response.RMI.codecs.split(","),a.process=c.response.RMI,a.process.hooks&&a.process.hooks.length?a.process.disposal=!0:a.process.disposal=!1,e.show(b.instant("MESSAGE_WELL_DONE"),"success")):c.response.RMI.errors.forEach(function(a){a?e.show(a.field+": "+a.error,"danger"):e.show("Please, check your connection!","danger")})})["catch"](function(a){e.error(a)})},a.getSpooler=function(){return g.spin("spinner-grid"),a.gridOptions||(a.gridOptions={paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!0,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,headerCellFilter:"translate",columnDefs:[{name:"name"},{name:"phones",cellTemplate:"<div>{{row.entity.phones.join(',')}}</div>",cellClass:"ui-grid-vcenter"},{name:"retrieve",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",filter:{type:f.filter.SELECT,selectOptions:[{value:"PLANNED_PEER",label:"PLANNED PEER"},{value:"PLANNED",label:"PLANNED"},{value:"BLACK_LIST",label:"BLACKLIST"},{value:"OPEN",label:"OPEN"},{value:"CLOSED",label:"CLOSED"},{value:"MAX_ATTEMPTS",label:"MAX ATTEMPTS"},{value:"COUNTER_BLOCK",label:"COUNTER BLOCK"},{value:"PLANNED_REQUEST",label:"PLANNED REQUEST"},{value:"DELETE",label:"DELETE"}]}},{name:"counter",enableFiltering:!1},{name:"planningtime",cellTemplate:"<div>{{row.entity.planningtime | date:'yyyy-MM-dd HH:mm'}}</div>",cellClass:"ui-grid-vcenter",enableFiltering:!1},{name:"action",cellTemplate:'<div><a class="btn btn-xs green" data-ng-click="grid.appScope.historySpooler(row.entity.history)"><i class="icon-info"></i></a> <a class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.editSpooler(row.entity)"><i class="icon-settings"></i></a> <a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteSpooler(row.entity.phones.join(), row.entity.id)"><i class="fa fa-trash"></i></a></div>',enableSorting:!1,cellClass:"ui-grid-vcenter",enableFiltering:!1}]}),i.list({id_process:parseInt(c.id),page:1,size:6e5}).$promise.then(function(b){b.status>0?a.gridOptions.data=b.response.RMI.rows:e.show(b.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})["finally"](function(){g.stop("spinner-grid")})},a.deleteSpooler=j.confirm["delete"](function(c){return i["delete"]({id:c}).$promise.then(function(d){d.status>0?(_.remove(a.gridOptions.data,{id:c}),e.show(b.instant("MESSAGE_WELL_DONE"),"success")):e.show(d.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})}),a.historySpooler=function(b){var c=d.open({animation:!0,templateUrl:"app/motiondialer/process/view/view.spooler.history.modal.html",controller:"MotionDialerViewSpoolerHistoryCtrl",resolve:{historySpooler:function(){return b}}});c.result.then(function(b){a.gridOptions.data.push(b.response.RMI)})},a.editSpooler=function(a){var b=d.open({animation:!0,templateUrl:"app/motiondialer/process/view/view.spooler.edit.modal.html",controller:"MotionDialerViewSpoolerEditCtrl",resolve:{entitySpooler:function(){return a}}});b.result.then(function(){})},a.initSettings=function(){return a.queues=null,k.get().$promise.then(function(b){b&&(a.queues=b.rows)})["catch"](function(a){e.error(a)})},a.createInterval=function(b){var c=d.open({animation:!0,templateUrl:"app/motiondialer/process/view/view.create.interval.modal.html",controller:"MotionDialerViewCreateIntervalCtrl",resolve:{objectProcess:function(){return a.process},intervalType:function(){return b},intervalValue:function(){return b?"8:00-20:00|MON-FRI|*|*":"00:01-07:59|SAT-SUN|*|*"}}});c.result.then(function(b){a.process=b})},a.editInterval=function(b,c){var e=d.open({animation:!0,templateUrl:"app/motiondialer/process/view/view.create.interval.modal.html",controller:"MotionDialerViewCreateIntervalCtrl",resolve:{objectProcess:function(){return a.process},intervalType:function(){return b},intervalValue:function(){return c}}});e.result.then(function(b){a.process=b})},a.deleteInterval=j.confirm["delete"](function(c,d){var f={id:a.process.id};return d?(f.intervals=[],f.intervals=f.intervals.concat(a.process.intervals),f.intervals.splice(c,1)):(f.not_intervals=[],f.not_intervals=f.not_intervals.concat(a.process.not_intervals),f.not_intervals.splice(c,1)),h.update(f).$promise.then(function(c){c.status>0?(c.response.RMI.codecs=c.response.RMI.codecs.split(","),a.process=c.response.RMI,e.show(b.instant("MESSAGE_WELL_DONE"),"success")):c.response.RMI.errors.forEach(function(a){a?e.show(a.field+": "+a.error,"danger"):e.show("Please, check your connection!","danger")})})["catch"](function(a){e.error(a)})}),a.runOrStop=function(){var b=d.open({animation:!0,templateUrl:"app/motiondialer/process/view/view.run.process.modal.html",controller:"MotionDialerViewRunProcessCtrl",resolve:{statusProcess:function(){return a.process.status}}});b.result.then(function(b){a.process.status=b.status})}}]),angular.module("xCallyShuttleApp").controller("MotionDialerViewCreateIntervalCtrl",["$scope","$translate","$uibModalInstance","$stateParams","MotionDialerProcess","xAlert","objectProcess","intervalType","intervalValue","interval",function(a,b,c,d,e,f,g,h,i,j){function k(a){var b,c=a.split("|"),d={};return c.forEach(function(a,c){switch(c){case 0:"*"!==a?(b=a.split("-"),d.t_from=moment(b[0],"HH:mm"),d.t_to=moment(b[1],"HH:mm"),d.alwaysTime=!1):(d.t_from=moment(new Date),d.t_to=moment(new Date),d.alwaysTime=!0);break;case 1:"*"!==a?(b=a.split("-"),d.wd_from=b[0].toLowerCase(),d.wd_to=b[1]?b[1].toLowerCase():"always"):(d.wd_from="always",d.wd_to="always");break;case 2:"*"!==a?(b=a.split("-"),d.md_from=b[0],d.md_to=b[1]?b[1]:"always"):(d.md_from="always",d.md_to="always");break;case 3:"*"!==a?(b=a.split("-"),d.m_from=b[0],d.m_to=b[1]?b[1]:"always"):(d.m_from="always",d.m_to="always")}}),d}function l(a){var b,c,d,e;return b=a.t_from&&a.t_to&&!a.alwaysTime?moment(a.t_from).format("HH:mm")+"-"+moment(a.t_to).format("HH:mm"):"*",a.wd_from&&"always"!==a.wd_from?(c=a.wd_from.toUpperCase(),a.wd_to&&"always"!==a.wd_to&&(c+="-"+a.wd_to.toUpperCase())):c="*",a.md_from&&"always"!==a.md_from?(d=a.md_from,a.md_to&&"always"!==a.md_to&&(d+="-"+a.md_to)):d="*",a.m_from&&"always"!==a.m_from?(e=a.m_from,a.m_to&&"always"!==a.m_to&&(e+="-"+a.m_to)):e="*",b+"|"+c+"|"+d+"|"+e}a.form={},a.$interval=j.interval,a.splittedInterval=k(i),a.save=function(){var d=l(a.splittedInterval);console.log(d);var i={id:g.id};return h?(i.intervals=[],i.intervals=i.intervals.concat(g.intervals),i.intervals.push(d)):(i.not_intervals=[],i.not_intervals=i.not_intervals.concat(g.not_intervals),i.not_intervals.push(d)),console.log(i),
-e.update(i).$promise.then(function(a){a.status>0?(a.response.RMI.codecs=a.response.RMI.codecs.split(","),f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a.response.RMI)):a.response.RMI.errors.forEach(function(a){a?f.show(a.field+": "+a.error,"danger"):f.show("Please, check your connection!","danger")})})["catch"](function(a){f.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.processes.view",{url:"/view/:id",templateUrl:"app/motiondialer/process/view/view.html",controller:"MotionDialerProcessViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.motiondialer.processes.view.overview",{url:"/overview",templateUrl:"app/motiondialer/process/view/view.overview.html"}).state("main.motiondialer.processes.view.settings",{url:"/settings",templateUrl:"app/motiondialer/process/view/view.settings.html"}).state("main.motiondialer.processes.view.intervals",{url:"/intervals",templateUrl:"app/motiondialer/process/view/view.intervals.html"}).state("main.motiondialer.processes.view.spooler",{url:"/spooler",templateUrl:"app/motiondialer/process/view/view.spooler.html"})}]),angular.module("xCallyShuttleApp").controller("MotionDialerViewRunProcessCtrl",["$scope","$stateParams","$uibModalInstance","$translate","statusProcess","MotionDialerProcess","xAlert",function(a,b,c,d,e,f,g){a.status="RUN"===e?"STOP":"RUN",a.yes=function(){f.update({id:parseInt(b.id),status:a.status}).$promise.then(function(a){a.status>0?(g.show(d.instant("MESSAGE_WELL_DONE"),"success"),c.close(a.response.RMI)):g.show(a.message||"Please, check your connection!","danger")})["catch"](function(a){g.error(a)})},a.no=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").controller("MotionDialerViewSpoolerEditCtrl",["$scope","$translate","$uibModalInstance","$stateParams","MotionDialerSpooler","xAlert","entitySpooler","Agent",function(a,b,c,d,e,f,g,h){a.moment=moment,a.initModal=function(){return h.get().$promise.then(function(b){a.agents=[],b&&b.rows.forEach(function(b){a.agents.push("SIP/"+b.name)})})["catch"](function(a){f.error(a)})},a.entitySpooler=g,a.save=function(){var d;switch(a.entitySpooler.retrieve){case"CLOSED":d=e.close({id:parseInt(a.entitySpooler.id)});break;case"OPEN":d=e.open({id:parseInt(a.entitySpooler.id)});break;case"BLACK_LIST":d=e.blacklist({id:parseInt(a.entitySpooler.id)});break;case"PLANNED":d=e.planning({id:parseInt(a.entitySpooler.id),date:moment(a.entitySpooler.planningtime).format("YYYY-MM-DD HH:mm")});break;case"PLANNED_PEER":d=e.planningpeer({id:parseInt(a.entitySpooler.id),date:moment(a.entitySpooler.planningtime).format("YYYY-MM-DD HH:mm"),peer:a.entitySpooler.planningpeer})}d?d.$promise.then(function(a){console.log(a),a.status>0?(f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close()):a.response.RMI.errors.forEach(function(a){a?f.show(a.field+": "+a.error,"danger"):f.show("Please, check your connection!","danger")})})["catch"](function(a){f.error(a)}):f.show("RETRIEVE NOT FOUND","danger")},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").controller("MotionDialerViewSpoolerHistoryCtrl",["$scope","$translate","$uibModalInstance","$stateParams","MotionDialerSpooler","xAlert","historySpooler",function(a,b,c,d,e,f,g){a.historySpooler=g,a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").factory("ReportMotionDialer",["$resource",function(a){return a("/api/report/motiondialer/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("ResetCtrl",["$scope","Auth","$location","$window","$rootScope","Setting","xAlert","$stateParams","$state",function(a,b,c,d,e,f,g,h,i){a.userReset={},a.getInfo=function(){return f.get({controller:"info"}).$promise.then(function(b){a.info=b})["catch"](function(a){console.error(a)})},e.bodyLayout="login",a.$on("$viewContentLoaded",function(){Metronic.init(),Layout.init()}),a.reset=function(){b.reset({token:h.token,password:a.userReset.password}).then(function(){i.go("login",{reset:!0})})["catch"](function(a){g.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("reset",{url:"/reset/:token",templateUrl:"app/reset/reset.html",controller:"ResetCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/login.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("SalesforceListCtrl",["$scope","SalesforceAccount","gridOptions","xAlert","$translate",function(a,b,c,d,e){a.initView=function(){var d={exporterCsvFilename:"salesforce_account.csv",columnDefs:[{name:"name",displayName:"APPLICATION_NAME"},{name:"username"},{name:"remoteUri",displayName:"APPLICATION_URI"},{name:"action",buttons:[{"class":"blue-hoki",href:"/salesforce/view/{{row.entity.id}}/account",name:"profile"},{"class":"green-jungle",name:"check",onClick:"grid.appScope.checkAccount(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.checkAccount=function(a){return b.check({id:a}).$promise.then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce.list",{url:"/list",templateUrl:"app/salesforce/list/list.html",controller:"SalesforceListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("SalesforceAccount",["$resource",function(a){return a("/api/salesforce/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"},fields:{params:{controller:"fields"},isArray:!0},check:{params:{controller:"check"}}})}]).factory("SalesforceConfiguration",["$resource",function(a){return a("/api/salesforce/accounts/:accountId/configurations/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]).factory("SalesforceField",["$resource",function(a){return a("/api/salesforce/accounts/:accountId/configurations/:configurationId/fields/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce",{url:"/salesforce",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce.view.configurations",{url:"/configurations",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("SalesforceViewConfigurationListCtrl",["$scope","$stateParams","$translate","gridOptions","SalesforceConfiguration","$uibModal",function(a,b,c,d,e,f){a.initView=function(){var c={exporterCsvFilename:"salesforce_configurations.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/salesforce/view/{{row.entity.AccountId}}/configurations/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(e,c,a,{accountId:b.id})},a.createItem=function(){var b=f.open({animation:!0,templateUrl:"app/salesforce/view/configuration/list/create.modal.html",controller:"SalesforceCreateConfigurationCtrl"});b.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("SalesforceCreateConfigurationCtrl",["$scope","$translate","$uibModalInstance","SalesforceConfiguration","xAlert","$stateParams","channel",function(a,b,c,d,e,f,g){a.form={},a.item={},a.channels=g,a.item.channel="voice",a.item.type="Queue",a.save=function(){return d.save({accountId:f.id},a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce.view.configurations.list",{url:"/list",templateUrl:"app/salesforce/view/configuration/list/list.html",controller:"SalesforceViewConfigurationListCtrl"})}]),angular.module("xCallyShuttleApp").controller("SalesforceViewConfigurationViewCtrl",["$scope","$filter","$stateParams","$translate","socket","variable","xAlert","SalesforceAccount","SalesforceConfiguration","SalesforceField","Variable",function(a,b,c,d,e,f,g,h,i,j,k){a.$on("$destroy",function(){e.unsyncUpdates("salesforce_field")}),a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:300,scrollInertia:0},a.fieldType=[{type:"string",title:"String"},{type:"variable",title:"Variable"},{type:"customVariable",title:"Custom Variable"}],a.descFieldType=[{type:"string",title:"String"},{type:"keyValue",title:"Key Value"}],a.groupVariableByGroup=function(a){switch(a.group){case"voice_queue":return"Voice: Queue";default:return"Other"}},a.initView=function(){a.configurationName="",a.subjectConfig=[],a.descriptionConfig=[],a.fieldConfig=[],a.variables=f},a.getConfiguration=function(){return i.get({accountId:c.id,id:c.configurationId}).$promise.then(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,e.socket.on("salesforce_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})})["catch"](function(a){g.error(a)})},a.getCustomVariables=function(){return k.get().$promise.then(function(b){a.customVariables=b.rows})["catch"](function(a){g.error(a)})},a.getFields=function(){return h.fields({id:c.id}).$promise.then(function(c){a.accountFields=_.sortByOrder(b("salesforce")(c),"name","asc"),console.log(a.accountFields)})["catch"](function(a){g.error(a)})},a.addItem=function(b){var d={};switch(b){case"subject":case"description":d={type:"string",content:""};break;case"field":d={content:""}}return i.save({accountId:c.id,id:c.configurationId,controller:b},d).$promise.then(function(c){switch(b){case"subject":a.subjectConfig.push(c);break;case"description":a.descriptionConfig.push(c);break;case"field":a.fieldConfig.push(c)}})["catch"](function(a){g.error(a)})},a.changeType=function(b){"variable"===b.type?(b.content="",b.variableName=""):"string"===b.type?(b.VariableId=null,b.variableName=""):"customVariable"===b.type&&(b.VariableId=null,b.content=""),a.updateField(b)},a.updateField=function(a){return j.update({accountId:c.id,configurationId:c.configurationId,id:a.id},a).$promise.then(function(){})["catch"](function(a){g.error(a)})},a.removeItem=function(a){return j["delete"]({accountId:c.id,configurationId:c.configurationId,id:a.id}).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){g.error(a)})},a.changeDescType=function(b){"keyValue"===b.type?(b.content="","string"===b.keyType?(b.VariableId=null,b.variableName=""):"variable"===b.keyType?(b.keyContent="",b.VariableId=null):"customVariable"===b.keyType&&(b.keyContent="",b.variableName="")):"string"===b.type&&(b.VariableId=null,b.variableName="",b.key="",b.keyContent=""),a.updateField(b)},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"name",b);if(c)switch(c.type){case"picklist":return c.picklistValues;default:return}}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce.view.configurations.view",{url:"/view/:configurationId",templateUrl:"app/salesforce/view/configuration/view/view.html",controller:"SalesforceViewConfigurationViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("SalesforceViewCtrl",["$scope","$http","$stateParams","$translate","$location","WizardHandler","socket","xAlert","Modal","$filter","SalesforceAccount",function(a,b,c,d,e,f,g,h,i,j,k){a.initView=function(){return k.get({id:c.id}).$promise.then(function(b){a.account=b})["catch"](function(a){h.error(a)})},a.updateItem=function(){return k.update({id:c.id},a.account).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE")+".","success")})["catch"](function(a){h.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce.view",{url:"/view/:id",templateUrl:"app/salesforce/view/view.html",controller:"SalesforceViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.salesforce.view.account",{url:"/account",templateUrl:"app/salesforce/view/view.account.html"})}]),angular.module("xCallyShuttleApp").controller("SalesforceWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler",function(a,b,c,d,e,f){a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={},a.item.serverUrl=c.protocol()+"://"+location.host},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){console.log(a.item),b.post("api/salesforce/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/salesforce/list")}).error(function(a){e.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce.wizard",{url:"/wizard",templateUrl:"app/salesforce/wizard/wizard.html",controller:"SalesforceWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.customization",{url:"/customization",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("CustomizationGeneralViewCtrl",["$scope","gridOptions","$uibModal","FileUploader","$cookieStore","xAlert","$translate","Setting","$rootScope",function(a,b,c,d,e,f,g,h,i){a.radioSwitch={isActive:!!i.license.custom,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"};var j=a.uploader=new d({url:"api/settings/logo/main",queueLimit:1,withCredentials:!0,headers:{Authorization:"Bearer "+e.get("token")}});j.filters.push({name:"imageFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|jpg|png|jpeg|".indexOf(b)}}),j.onSuccessItem=function(a,b){i.settings.logo=b.logo,f.show(g.instant("MESSAGE_WELL_DONE"),"success")},j.onErrorItem=function(){f.show(g.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},j.onCompleteAll=function(){j.clearQueue()};var k=a.uploader2=new d({url:"api/settings/logo/login",queueLimit:1,withCredentials:!0,headers:{Authorization:"Bearer "+e.get("token")}});k.filters.push({name:"imageFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|jpg|png|jpeg|".indexOf(b)}}),k.onSuccessItem=function(a,b){f.show(g.instant("MESSAGE_WELL_DONE"),"success")},k.onErrorItem=function(){f.show(g.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},k.onCompleteAll=function(){k.clearQueue()},a.initView=function(){return h.get({id:1}).$promise.then(function(b){a.settings={defaultLogo:b.defaultLogo,defaultLoginLogo:b.defaultLoginLogo,footerWhiteLabel:b.footerWhiteLabel,defaultFooterWhiteLabel:b.defaultFooterWhiteLabel}})["catch"](function(a){f.error(a)})},a.update=function(){return h.update({id:1},a.settings).$promise.then(function(b){_.merge(i.settings,a.settings),f.show(g.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.customization.view.general",{url:"/general",templateUrl:"app/setting/customization/view/general/general.html",controller:"CustomizationGeneralViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/scripts/jquery.sparkline.min.js","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js","assets/scripts/profile.js"]})}]}})}]),angular.module("xCallyShuttleApp").controller("CustomizationViewCtrl",["$scope",function(a){}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.customization.view",{url:"/view",templateUrl:"app/setting/customization/view/view.html",controller:"CustomizationViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.general",{url:"/general",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("GeneralMainViewCtrl",["$scope","xAlert","$translate","Setting",function(a,b,c,d){a.initView=function(){return d.get({id:1}).$promise.then(function(b){a.settings={agi_port:b.agi_port,min_internal:b.min_internal,min_mailbox:b.min_mailbox,securePassword:b.securePassword}})["catch"](function(a){b.error(a)})},a.update=function(){return d.update({id:1},a.settings).$promise.then(function(a){b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.general.view.main",{url:"/main",templateUrl:"app/setting/general/view/main/main.html",controller:"GeneralMainViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("GeneralViewCtrl",["$scope",function(a){}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.general.view",{url:"/view",templateUrl:"app/setting/general/view/view.html",controller:"GeneralViewCtrl"})}]),angular.module("xCallyShuttleApp").factory("License",["$resource",function(a){return a("/api/licenses/:id/:controller",{id:"@id"},{request:{method:"POST",params:{id:"request"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.license",{url:"/license",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("LicenseUpdateCtrl",["$scope","$translate","$uibModalInstance","xAlert","Setting",function(a,b,c,d,e){a.form={},a.item={},a.getLicense=function(){return e.get({id:1}).$promise.then(function(b){a.item.license=b.license})["catch"](function(a){d.error(a)})},a.update=function(){return e.update({id:1},a.item).$promise.then(function(a){d.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){d.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").controller("LicenseViewCtrl",["$scope","$rootScope","$translate","License","xAlert","$window","$uibModal",function(a,b,c,d,e,f,g){a.radioSwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.initView=function(){return d.get(function(b){a.item=b.license})},a.submitRequest=function(){return d.request(a.item,function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")},function(a){switch(a.status){case 304:e.show(a.statusText,"info");break;default:e.error(a)}})},a.updateLicense=function(){var a=g.open({animation:!0,templateUrl:"app/setting/license/view/update.modal.html",controller:"LicenseUpdateCtrl"});a.result.then(function(){f.location.reload()})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.license.view",{url:"/view",templateUrl:"app/setting/license/view/view.html",controller:"LicenseViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/pricing-tables.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("Externip",["$resource",function(a){return a("/api/network/externips/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("Localnet",["$resource",function(a){return a("/api/network/localnets/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.network",{url:"/network",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ExternipCtrl",["$scope","$uibModal","gridOptions","Externip",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"network_externip.csv",columnDefs:[{name:"value"},{name:"action",buttons:[{"class":"blue-hoki",onClick:"grid.appScope.createItem(row.entity)",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(d,b,a)},a.createItem=function(c){var d=b.open({animation:!0,templateUrl:"app/setting/network/view/externip/externip.create.modal.html",controller:"ExternipCreateCtrl",resolve:{item:c}});d.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("ExternipCreateCtrl",["$scope","$translate","$uibModalInstance","$stateParams","Externip","xAlert","item",function(a,b,c,d,e,f,g){a.initModal=function(){a.form={},a.item=g||{},a.title=g?b.instant("APPLICATION_EDIT_EXTERNIP"):b.instant("APPLICATION_NEW_EXTERNIP")},a.save=function(){return g?e.update({id:a.item.id},a.item).$promise.then(function(a){f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){f.error(a)}):e.save({},a.item).$promise.then(function(a){f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){f.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.network.view.externip",{url:"/externip",templateUrl:"app/setting/network/view/externip/externip.html",controller:"ExternipCtrl"})}]),angular.module("xCallyShuttleApp").controller("LocalnetCtrl",["$scope","gridOptions","Localnet","$uibModal",function(a,b,c,d){a.initView=function(){var d={exporterCsvFilename:"network_localnet.csv",columnDefs:[{name:"value"},{name:"action",buttons:[{"class":"blue-hoki",onClick:"grid.appScope.createItem(row.entity)",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a)},a.createItem=function(b){var c=d.open({animation:!0,templateUrl:"app/setting/network/view/localnet/localnet.create.modal.html",controller:"LocalnetCreateCtrl",resolve:{item:b}});c.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("LocalnetCreateCtrl",["$scope","$translate","$uibModalInstance","$stateParams","Localnet","xAlert","item",function(a,b,c,d,e,f,g){a.initModal=function(){if(a.form={},a.item=g||{},a.title=g?b.instant("APPLICATION_EDIT_LOCALNET"):b.instant("APPLICATION_NEW_LOCALNET"),g&&g.value){var c=a.item.value.split("/");c.length>1&&(a.item.address=c[0],a.item.mask=c[1])}},a.save=function(){var d=a.item.address+"/"+a.item.mask;return g?e.update({id:a.item.id},{value:d}).$promise.then(function(a){f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){f.error(a)}):e.save({},{value:d}).$promise.then(function(a){f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){f.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.network.view.localnet",{url:"/localnet",templateUrl:"app/setting/network/view/localnet/localnet.html",controller:"LocalnetCtrl"})}]),angular.module("xCallyShuttleApp").controller("NetworkViewCtrl",function(){}),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.network.view",{url:"/view",templateUrl:"app/setting/network/view/view.html",controller:"NetworkViewCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting",{url:"/setting",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:18}}})}]),angular.module("xCallyShuttleApp").factory("Setting",["$resource",function(a){return a("/api/settings/:id/:controller/:param",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("Smtp",["$resource",function(a){return a("/api/mail/servers/out/:id/:controller/:controller2",{id:"@id"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.smtp",{url:"/smtp",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("SmtpViewCtrl",["$scope","$stateParams","$translate","socket","MailServerOut","Setting","MailAccount","xAlert",function(a,b,c,d,e,f,g,h){a.initView=function(){return a.smtpDisabled=!1,a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.item={account:{service:!0,MailServerOut:{ssl:!1}}},a.$on("$destroy",function(){d.socket.removeAllListeners("mail_server_out:state")}),d.socket.on("mail_server_out:state",function(b){a.item&&Number(b.id)===a.item.account.MailServerOut.id&&(a.item.account.MailServerOut.state=b.state,a.item.account.MailServerOut.source=JSON.parse(b.source))}),f.get({id:"smtp"}).$promise.then(function(b){a.item.account=b})["catch"](function(b){switch(b.status){case 404:a.item.account.name=null,a.item.account.address=null,a.item.account.MailServerOut={ssl:!1},h.show("Service SMTP server not configured.","info");break;default:h.error(b)}})},a.updateItem=function(){return a.item.account.id?(delete a.item.account.MailServerOut.state,delete a.item.account.MailServerOut.source,f.update({id:"smtp",controller:a.item.account.id},a.item.account).$promise.then(function(){h.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})):f.save({id:"smtp"},{description:"Custom Account",name:a.item.account.name,address:a.item.account.address,service:a.item.account.service,custom:!0,MailServerOut:a.item.account.MailServerOut}).$promise.then(function(b){a.item.account=b,h.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})},a.test=function(){return e.get({id:a.item.account.MailServerOut.id,controller:"test"}).$promise["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.smtp.view",{url:"/view",templateUrl:"app/setting/smtp/view/view.html",controller:"SmtpViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.system",{url:"/system",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("SystemViewConsoleCtrl",["$scope","Setting","xAlert","usSpinnerService","$timeout","$translate","socket",function(a,b,c,d,e,f,g){function h(b){var c=_.findIndex(a.commandHistory.commands,function(a){return a===b});-1!==c&&a.commandHistory.commands.splice(c,1),a.commandHistory.commands.unshift(b)}a.output="<b>"+f.instant("APPLICATION_CONSOLE_WELCOME")+"</b><br/>",a.item={command:""},a.commandHistory={commands:[],index:-1},a.busy=!1,a.cmdFocus=function(){e(function(){angular.element("#command").trigger("focus")})},a.sendCmd=function(){return a.commandHistory.index=-1,a.tmp=a.item.command,a.item.command="",a.output+="<b>motion*CLI> "+a.tmp+"</b><br>",a.tmp?(h(a.tmp.trim()),a.busy=!0,d.spin("console-spinner"),b.save({controller:"asterisk"},{command:a.tmp}).$promise):void 0},g.socket.on("console:result",function(b){a.output+=b.content.replace(/(?:\r\n|\r|\n)/g,"<br />").replace("Response: Follows<br />Privilege: Command<br />","").replace(/ActionID: .[0-9]*<br \/>/,"").replace(/ActionID: .[0-9]*/,"")+"<br>",d.stop("console-spinner"),a.busy=!1,a.cmdFocus()}),g.socket.on("console:error",function(b){d.stop("console-spinner"),a.output+="command error:"+b.data.message+"<br>",a.busy=!1,a.cmdFocus()}),a.keyUp=function(b){switch(b.keyCode){case 40:a.commandHistory.commands[a.commandHistory.index-1]?a.item.command=a.commandHistory.commands[--a.commandHistory.index]:(a.item.command="",a.commandHistory.index=-1);break;case 38:a.commandHistory.commands[a.commandHistory.index+1]&&(a.item.command=a.commandHistory.commands[++a.commandHistory.index]);break;case 37:break;case 39:break;default:a.commandHistory.index=-1}},e(function(){angular.element("#command").trigger("focus"),d.stop("console-spinner")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.system.view.console",{url:"/console",templateUrl:"app/setting/system/view/console/console.html",controller:"SystemViewConsoleCtrl"})}]),angular.module("xCallyShuttleApp").controller("SystemViewGeneralCtrl",["$scope","$stateParams","$translate","socket","Setting","xAlert","usSpinnerService",function(a,b,c,d,e,f,g){function h(b){a.system.memory={labels:_.keys(b.memory.details),values:_.values(_.map(b.memory.details,function(a){return Math.round(a/1024)})),Total:Math.round(b.memory.Total/1024)},g.stop("memory-spinner"),a.system.disks=[],_.forEach(b.disks,function(b){a.system.disks.push({mount:b.mount,size:Number((b.size/1048576).toFixed(2)),values:_.values(_.map(b.details,function(a){return Number((a/1048576).toFixed(2))})),labels:_.keys(b.details)})}),a.system.mount=a.system.disks[0],g.stop("disk-spinner"),a.system.cpu={motion:Math.round(b.cpu.motion),cores:[]},_.forEach(b.cpu.cores,function(b){delete b.nice,delete b.irq,a.system.cpu.cores.push({labels:_.keys(b),values:_.values(b),colours:["#803690","#DCDCDC","#00ADF9"]})}),g.stop("cpu-spinner")}a.system={mount:void 0},a.initView=function(){return g.spin("memory-spinner"),g.spin("disk-spinner"),g.spin("cpu-spinner"),e.get({controller:"system"}).$promise.then(function(a){h(a)})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.system.view.general",{url:"/general",templateUrl:"app/setting/system/view/general/general.html",controller:"SystemViewGeneralCtrl"})}]),angular.module("xCallyShuttleApp").controller("SystemViewLogsCtrl",["$scope","$stateParams","$translate","socket","Setting","xAlert","usSpinnerService",function(a,b,c,d,e,f,g){a.initView=function(){return a.logs={errors:"",output:""},g.spin("logs-spinner"),e.get({controller:"logs"}).$promise.then(function(b){a.logs=b,g.stop("logs-spinner")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.system.view.logs",{url:"/logs",templateUrl:"app/setting/system/view/logs/logs.html",controller:"SystemViewLogsCtrl"})}]),angular.module("xCallyShuttleApp").controller("SystemViewCtrl",["$scope",function(a){}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.system.view",{url:"/view",templateUrl:"app/setting/system/view/view.html",controller:"SystemViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("UpdateListCtrl",["$scope","gridOptions","$uibModal","$location","Update","xAlert","$log","$translate","$state",function(a,b,c,d,e,f,g,h,i){a.initCounter=function(){a.$on("timer-stopped",function(a,b){f.show(h.instant("MESSAGE_UPDATE_COMPLETED")+'<a href="https://wiki.xcallymotion.com/display/XMD/xCally+Motion+service+manager#xCallyMotionservicemanager-pm2start|stop|restartmotion" target="_blank" style="color: blue;"> Read more</a>',"success"),i.go("main.setting.updates.list")})},a.initView=function(){return e.get({controller:"current"
-}).$promise.then(function(b){a.currentVersion=b.currentVersion,a.latestVersion=b.latestVersion})["catch"](function(a){console.log(a)})},a.pull=function(){var a=c.open({animation:!0,templateUrl:"app/setting/update/list/list.pull.html",controller:"UpdateListPullCtrl"});a.result.then(function(){return d.path("/setting/updates/landing"),e.pull().$promise.then(function(a){var b=!1;a&&(a.summary&&_.forOwn(a.summary,function(a){a&&(b=!0)}),(a.insertions&&!_.isEmpty(a.insertions)||a.deletions&&!_.isEmpty(a.deletions))&&(b=!0)),b?f.show(h.instant("MESSAGE_PULL_COMPLETED"),"success"):(f.show(h.instant("MESSAGE_NO_UPDATES"),"success"),d.path("/setting/updates/list"))})["catch"](function(a){console.log(a),f.error(a),d.path("/setting/updates/list")})},function(){g.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.updates.list",{url:"/list",templateUrl:"app/setting/update/list/list.html",controller:"UpdateListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"css",insertBefore:"#ng_load_plugins_before",files:["assets/css/pricing-table.css"]}])}]}}).state("main.setting.updates.landing",{url:"/landing",templateUrl:"app/setting/update/list/landing.html",controller:"UpdateListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"css",insertBefore:"#ng_load_plugins_before",files:["assets/css/error.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("UpdateListPullCtrl",["$scope","$uibModalInstance",function(a,b){a.modal={dismissable:!0,title:"Confirm Update",html:"Are you sure you want to update?",buttons:[{classes:"btn btn-success",text:"Update",click:function(){b.close()}},{classes:"btn default",text:"Cancel",click:function(){b.dismiss("cancel")}}]}}]),angular.module("xCallyShuttleApp").factory("Update",["$resource",function(a){return a("/api/updates/:id/:controller",{id:"@id"},{pull:{method:"GET",params:{id:"pull"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.updates",{url:"/updates",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["hasUpdate"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("SquareOdbcListCtrl",["$scope","$uibModal","$translate","SquareOdbc","gridOptions","xAlert",function(a,b,c,d,e,f){a.initView=function(){var b={exporterCsvFilename:"odbc.csv",columnDefs:[{name:"name"},{name:"dsn",displayName:"APPLICATION_ODBC"},{name:"description"},{name:"action",width:250,buttons:[{"class":"blue-hoki",href:"/square/odbc/view/{{row.entity.id}}/settings",name:"settings"},{"class":"green-jungle",name:"check",onClick:"grid.appScope.checkConnection(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=e.gridOptions(d,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/square/odbc/list/list.create.modal.html",controller:"SquareOdbcListCreateCtrl"});c.result.then(function(){a.gridOptions.getPage()})},a.checkConnection=function(a){return d.get({id:a,controller:"check"}).$promise.then(function(){f.show(c.instant("MESSAGE_CONNECTION_VERIFIED"),"success")})["catch"](function(){f.show(c.instant("MESSAGE_CONNECTION_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").controller("SquareOdbcListCreateCtrl",["$scope","$translate","$uibModalInstance","SquareOdbc","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.item.dsn||(a.item.dsn="DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion"),a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.odbc.list",{url:"/list",templateUrl:"app/square/odbc/list/list.html",controller:"SquareOdbcListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.odbc",{url:"/odbc",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("SquareOdbc",["$resource",function(a){return a("/api/square/odbc/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SquareOdbcViewCtrl",["$scope","$translate","$stateParams","SquareOdbc","xAlert",function(a,b,c,d,e){a.odbc={},a.getOdbc=function(){return d.get({id:c.id}).$promise.then(function(b){a.odbc=b})["catch"](function(a){e.error(a)})},a.updateOdbc=function(){var f=angular.copy(a.odbc);return d.update({id:c.id},f).$promise.then(function(){e.show(b.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.odbc.view",{url:"/view/:id",templateUrl:"app/square/odbc/view/view.html",controller:"SquareOdbcViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.square.odbc.view.settings",{url:"/settings",templateUrl:"app/square/odbc/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("SquareProjectListCtrl",["$scope","$uibModal","SquareProject","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"projects.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/square/projects/view/{{row.entity.id}}",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/square/project/list/list.create.modal.html",controller:"SquareProjectListCreateCtrl"});c.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("SquareProjectListCreateCtrl",["$scope","$translate","$uibModalInstance","SquareProject","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.projects.list",{url:"/list",templateUrl:"app/square/project/list/list.html",controller:"SquareProjectListCtrl",authenticate:!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.projects",{url:"/projects",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("SquareProject",["$resource",function(a){return a("/api/square/projects/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SquareProjectViewCtrl",["$scope","$stateParams","Auth","xAlert","SquareProject","socket","$translate","$log","$uibModal",function(a,b,c,d,e,f,g,h,i){a.squareProject={},a.$on("$destroy",function(){f.unsyncUpdates("square_project")}),a.getProject=function(){return e.get({id:b.id}).$promise.then(function(b){a.squareProject=b,angular.element(document).ready(function(){window.onerror=function(a,b,c){try{if(null!==a&&-1!==a.indexOf("Script error."));else{var e=new Image;e.src="assets/plugins/mxgraph/images/1x1.png?msg="+encodeURIComponent(a)+"&url="+encodeURIComponent(b)+"&lnum="+encodeURIComponent(c)}}catch(f){d.error(f)}},b.token=c.getToken();var a=new EditorUi(new Editor);a.openString(b.preproduction,b.name,b),a.editor.graphChangeListener=function(a,b){var c=b.properties.rtChange||!1;c||(this.modified=!0)}}),f.socket.on("square_project:save",function(c){c.id===b.id&&(a.squareProject=_.merge(a.squareProject,c))})})["catch"](function(a){d.error(a)})},a.editNotes=function(){var c=i.open({animation:!0,templateUrl:"app/square/project/view/projectNotes.modal.html",controller:["$scope","$uibModalInstance","notes",function(a,b,c){a.notes=c,a.close=function(){b.close(a.notes)},a.cancel=function(){b.dismiss("cancel")}}],resolve:{notes:{value:a.squareProject.notes}}});c.result.then(function(a){return e.update({id:b.id},{notes:a.value}).$promise.then(function(){d.show(g.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){d.error(a)})},function(){h.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.projects.view",{url:"/view/:id",templateUrl:"app/square/project/view/view.html",controller:"SquareProjectViewCtrl",authenticate:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",serie:!0,cache:!1,files:["assets/plugins/mxgraph/css/common.css","assets/plugins/mxgraph/css/explorer.css","assets/plugins/mxgraph/styles/grapheditor.css","assets/plugins/mxgraph/styles/custom.css","assets/plugins/square/js/custom.js","assets/plugins/mxgraph/js/mxClient.js","assets/plugins/square/js/Editor.js","assets/plugins/square/js/Graph.js","assets/plugins/square/js/EditorUi.js","assets/plugins/square/js/Actions.js","assets/plugins/square/js/Menus.js","assets/plugins/square/js/Sidebar.js","assets/plugins/square/js/Toolbar.js","assets/plugins/square/js/Dialogs.js"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:14}}})}]),angular.module("xCallyShuttleApp").factory("ReportSquare",["$resource",function(a){return a("/api/report/square/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ReportSquareDetail",["$resource",function(a){return a("/api/report/square/details/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SquareRealtimeViewGeneralCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","ReportSquare","usSpinnerService","$q","uiGridConstants",function(a,b,c,d,e,f,g,h,i,j){function k(b){return h.spin("spinner-grid"),g.get(m).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){b&&l(),h.stop("spinner-grid")})}function l(){e.socket.on("report_square:save",function(b){if(b.leaveAt){var c=_.remove(a.gridOptions.data,{id:b.id});c&&k()}else{var d=_.find(a.gridOptions.data,{id:b.id});if(!d&&a.gridOptions.data.length<m.limit){var e=_.clone(m);if(_.forEach(["offset","limit","controller","order"],function(a){delete e[a]}),_.isEmpty(e))a.gridOptions.data.push(b);else{var f=!0;_.forOwn(e,function(a,c){_.includes(b[c],a)||(f=!1)}),f&&a.gridOptions.data.push(b)}}}})}var m={controller:"realtime",offset:0,limit:25};a.moment=moment,a.init=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:25,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"uniqueid"},{name:"callerid"},{name:"extension"},{name:"project_name",displayName:"APPLICATION_PROJECT",headerCellFilter:"translate"},{name:"joinAt",displayName:"APPLICATION_ELAPSED_TIME",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><css-timer start-time="row.entity.joinAt"></css-timer></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1}],data:[],gridMenuTitleFilter:function(a){var b=i.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){n(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?m.order=null:m.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),k()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){m.offset=(a-1)*b,m.limit=b,k()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?m[a.name]=a.filters[0].term:delete m[a.name]}),k()})}},k(!0)};var n=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("report_square")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.realtime.view.general",{url:"/general",templateUrl:"app/square/realtime/view/general/general.html",controller:"SquareRealtimeViewGeneralCtrl"})}]),angular.module("xCallyShuttleApp").controller("SquareRealtimeViewCtrl",["$scope",function(a){}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.realtime.view",{url:"/view",templateUrl:"app/square/realtime/view/view.html",controller:"SquareRealtimeViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("SquareRecordingListCtrl",["$scope","SquareRecording","gridOptions","uiGridConstants",function(a,b,c,d){a.SquareRecording=b;a.initView=function(){var e={exporterCsvFilename:"recordings.csv",rowHeight:30,columnDefs:[{name:"uniqueid"},{name:"callerid",displayName:"APPLICATION_CALLERIDNUM"},{name:"filename"},{name:"extension"},{name:"projectName",displayName:"APPLICATION_PROJECT"},{name:"createdAt",displayName:"APPLICATION_DATE",cellFilter:"date:'yyyy-MM-dd HH:mm'",filterHeaderTemplate:'<div class="ui-grid-filter-container row"><div ng-repeat="colFilter in col.filters" class="col-md-6 col-md-offset-0 col-sm-5 col-sm-offset-0 col-xs-5 col-xs-offset-0"><div custom-grid-date-filter-header></div></div></div>',filters:[{name:"From",condition:d.filter.GREATER_THAN_OR_EQUAL,hasTime:!0},{name:"To",condition:d.filter.LESS_THAN_OR_EQUAL,hasTime:!0}],sort:{direction:d.DESC,priority:0}},{name:"audio",displayName:"",width:100,enableSorting:!1,enableFiltering:!1,cellClass:"ui-grid-vcenter",cellTemplate:"<div><audio-file-download data-ng-if=\"row.entity.savePath.split('.').pop() == 'wav'\" params=\"{id:row.entity.id,controller:'stream'}\" resource=\"grid.appScope.SquareRecording\"></audio-file-download><span data-ng-if=\"row.entity.value.split('.').pop() == 'gsm'\" title=\"{{'MESSAGE_GSM_PREVIEW_NOT_SUPPORTED' | translate}}\">{{'MESSAGE_GSM_PREVIEW_NOT_SUPPORTED' | translate}}</span></div>"},{name:"action",width:80,buttons:[{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.filename || row.entity.uniqueid, row.entity.id)"},{directive:"<motion-file-download params=\"{id:row.entity.id,controller:'stream'}\" resource=\"grid.appScope.SquareRecording\" mimetype=\"'audio/'+row.entity.value.split('.').pop()\" btnclass=\"btn btn-xs blue-hoki\" filename=\"(row.entity.filename || row.entity.uniqueid)+'.'+row.entity.savePath.split('.').pop()\"></motion-file-download>"}]}]};a.gridOptions=c.gridOptions(b,e,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.recordings.list",{url:"/list",templateUrl:"app/square/recording/list/list.html",controller:"SquareRecordingListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.recordings",{url:"/recordings",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("SquareRecording",["$resource",function(a){return a("/api/square/recordings/:id/:controller",{id:"@id"},{update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square",{url:"/square",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:14}}})}]),angular.module("xCallyShuttleApp").factory("Agent",["$resource",function(a){return a("/api/agents/:id/:controller/:controller1/:controller2/:controller3",{id:"@id"},{changePassword:{method:"PUT",params:{controller:"password"}},update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.agents",{url:"/agents",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:4}}})}]),angular.module("xCallyShuttleApp").controller("AgentListCtrl",["$scope","$timeout","Agent","Auth","gridOptions",function(a,b,c,d,e){a.initView=function(){a.Auth=d;var b={exporterCsvFilename:"agents.csv",columnDefs:[{name:"fullname"},{name:"name",displayName:"APPLICATION_USERNAME"},{name:"internal"},{name:"email"},{name:"description"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/staff/agents/view/{{row.entity.id}}/account",name:"profile"},{"class":"green-meadow",href:"/staff/agents/view/{{row.entity.id}}/queues/voice",name:"queues"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.fullname, row.entity.id)"}]}]};a.gridOptions=e.gridOptions(c,b,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.agents.list",{url:"/list",templateUrl:"app/staff/agent/list/list.html",controller:"AgentListCtrl",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:4}}})}]),angular.module("xCallyShuttleApp").controller("AgentViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$cookieStore","Agent","FileUploader","Auth","MailQueue","User","VoiceQueue","ChatQueue","FaxQueue","SmsQueue","OpenChannelQueue","Setting",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){a.Auth=i,a.radioSwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.initVoiceQueues=function(){var a={},b={};return l.get().$promise.then(function(b){return a.queues=_.map(b.rows,function(a){return{name:a.name}}),g.get({id:e.id,controller:"voice",controller2:"queues"}).$promise}).then(function(a){b.queues=_.map(a.rows,function(a){return{name:a.name}})}).then(function(){ComponentsDropdowns.bindAgent(a,b,"voice",e.id,g)})["catch"](function(a){console.error(a)})},a.initChatQueues=function(){var a={},b={};return m.get().$promise.then(function(b){return a.queues=_.map(b.rows,function(a){return{id:a.id,name:a.name}}),g.get({id:e.id,controller:"chat",controller2:"queues"}).$promise}).then(function(a){b.queues=_.map(a.rows,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindAgent(a,b,"chat",e.id,g)})["catch"](function(a){console.error(a)})},a.initMailQueues=function(){var a={},b={};return j.get().$promise.then(function(b){return a.queues=_.map(b.rows,function(a){return{id:a.id,name:a.name}}),g.get({id:e.id,controller:"mail",controller2:"queues"}).$promise}).then(function(a){b.queues=_.map(a.rows,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindAgent(a,b,"mail",e.id,g)})["catch"](function(a){console.error(a)})},a.initSmsQueues=function(){var a={},b={};return o.get().$promise.then(function(b){return a.queues=_.map(b.rows,function(a){return{id:a.id,name:a.name}}),g.get({id:e.id,controller:"sms",controller2:"queues"}).$promise}).then(function(a){b.queues=_.map(a.rows,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindAgent(a,b,"sms",e.id,g)})["catch"](function(a){console.error(a)})},a.initFaxQueues=function(){var a={},b={};return n.get().$promise.then(function(b){return a.queues=_.map(b.rows,function(a){return{id:a.id,name:a.name}}),g.get({id:e.id,controller:"fax",controller2:"queues"}).$promise}).then(function(a){b.queues=_.map(a.rows,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindAgent(a,b,"fax",e.id,g)})["catch"](function(a){console.error(a)})},a.initOpenchannelQueues=function(){var a={},b={};return p.get().$promise.then(function(b){return a.queues=_.map(b.rows,function(a){return{id:a.id,name:a.name}}),g.get({id:e.id,controller:"openchannel",controller2:"queues"}).$promise}).then(function(a){b.queues=_.map(a.rows,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindAgent(a,b,"openchannel",e.id,g)})["catch"](function(a){console.error(a)})},a.updatePassword=function(){var b={newPassword:a.agent.newPwd};return i.isAdmin()?b.id=e.id:b.oldPassword=a.agent.currentPwd,k.changePassword(b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.error(a)})};var r=a.uploader=new h({url:"api/users/"+e.id+"/avatar",queueLimit:1,withCredentials:!0,headers:{Authorization:"Bearer "+f.get("token")}});r.filters.push({name:"imageFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|jpg|png|jpeg|".indexOf(b)}}),r.onSuccessItem=function(b,e){a.agent.userpic=e.userpic,a.agent.id===i.getCurrentUser().id&&(i.getCurrentUser().userpic=e.userpic),c.show(d.instant("MESSAGE_WELL_DONE"),"success")},r.onErrorItem=function(){c.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},r.onCompleteAll=function(){r.clearQueue()},a.initView=function(){return g.get({id:e.id}).$promise.then(function(b){return a.agent=b,a.agent.transport=a.agent.transport?a.agent.transport.split(","):[],a.agent.allow=a.agent.allow?a.agent.allow.split(";"):[],a.agent.nat=a.agent.nat?a.agent.nat.split(","):[],q.get({id:1}).$promise}).then(function(b){a.setting=b})["catch"](function(a){c.error(a)})},a.patchItem=function(){return g.update({id:e.id},{chatCapacity:a.agent.chatCapacity,mailCapacity:a.agent.mailCapacity,faxCapacity:a.agent.faxCapacity,smsCapacity:a.agent.smsCapacity,openchannelCapacity:a.agent.openchannelCapacity}).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.error(a)})},a.updateItem=function(){var b=angular.copy(a.agent);return delete b.password,delete b.md5secret,b.transport=b.transport.join(","),b.allow=b.allow.join(";"),b.nat=b.nat.join(","),g.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.agents.view",{url:"/view/:id",templateUrl:"app/staff/agent/view/view.html",controller:"AgentViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]},data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:4}}}).state("main.staff.agents.view.account",{url:"/account",templateUrl:"app/staff/agent/view/view.account.html",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:4}},resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/scripts/jquery.sparkline.min.js","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js","assets/scripts/profile.js"]})}]}}).state("main.staff.agents.view.voice",{url:"/voice",templateUrl:"app/staff/agent/view/view.voice.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:4}}}).state("main.staff.agents.view.chat",{url:"/chat",templateUrl:"app/staff/agent/view/view.chat.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:4}}}).state("main.staff.agents.view.mail",{url:"/mail",templateUrl:"app/staff/agent/view/view.mail.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:4}}}).state("main.staff.agents.view.fax",{url:"/fax",templateUrl:"app/staff/agent/view/view.fax.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:4}}}).state("main.staff.agents.view.sms",{url:"/sms",templateUrl:"app/staff/agent/view/view.sms.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:4}}}).state("main.staff.agents.view.openchannel",{url:"/openchannel",templateUrl:"app/staff/agent/view/view.openchannel.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:4}}}).state("main.staff.agents.view.motionbar",{url:"/motionbar",templateUrl:"app/staff/agent/view/view.motionbar.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:4}}}).state("main.staff.agents.view.queues",{url:"/queues",templateUrl:"app/staff/agent/view/view.queues.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:4}},cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}}).state("main.staff.agents.view.queues.voice",{url:"/voice",templateUrl:"app/staff/agent/view/view.queues.voice.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:7}}}).state("main.staff.agents.view.queues.chat",{url:"/chat",templateUrl:"app/staff/agent/view/view.queues.chat.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:8}}}).state("main.staff.agents.view.queues.mail",{url:"/mail",templateUrl:"app/staff/agent/view/view.queues.mail.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:9}}}).state("main.staff.agents.view.queues.fax",{url:"/fax",templateUrl:"app/staff/agent/view/view.queues.fax.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:10}}}).state("main.staff.agents.view.queues.sms",{url:"/sms",templateUrl:"app/staff/agent/view/view.queues.sms.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:11}}}).state("main.staff.agents.view.queues.openchannel",{url:"/openchannel",templateUrl:"app/staff/agent/view/view.queues.openchannel.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:20}}})}]),angular.module("xCallyShuttleApp").controller("AgentWizardCtrl",["$scope","$rootScope","$location","$translate","$http","Agent","VoiceQueue","ChatQueue","MailQueue","SmsQueue","FaxQueue","OpenChannelQueue","Setting","xAlert","WizardHandler",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){a.maxAmount=1e3,a._data={voice:{queues:[]},chat:{queues:[]},mail:{queues:[]},sms:{queues:[]},fax:{queues:[]},openchannel:{queues:[]}},a._agent=angular.copy(a._data),a.forms={info:void 0,voice:void 0},a.item={role:"agent",allow:["alaw","ulaw","gsm"],transport:["udp"],context:"from-sip"},a.next=function(){o.wizard().next()},a.getAmount=function(){return m.get({controller:"internal",internal:a.item.minInternal}).$promise.then(function(b){a.item.minInternal=Number(b.value),a.maxAmount=b.range||1e3})["catch"](function(a){n.error(a)})},a.exitValidation=function(a){return a},a.getFirstFreeInternal=function(){return m.get({controller:"internal"}).$promise.then(function(b){return a.internal=b,a.item.internal=b.value,a.item.minInternal=b.value,a.maxAmount=b.range||1e3,m.get({id:1}).$promise}).then(function(b){a.setting=b})["catch"](function(a){n.error(a)})},a.createItem=function(){var b=angular.copy(a.item);return delete b.minInternal,b.transport&&(b.transport=b.transport.join(",")),a.item.allow&&(b.allow=b.allow.join(";")),b.channels=a._agent,f.save(b).$promise.then(function(a){c.path("/staff/agents/view/"+a.id+"/queues/voice")})["catch"](function(a){console.log(a),n.error(a)})},a.createItems=function(){var b=angular.copy(a.item);return delete b.internal,b.transport&&(b.transport=b.transport.join(",")),b.allow&&(b.allow=b.allow.join(";")),f.save({id:"bulk"},b).$promise.then(function(){c.path("/staff/agents/list")})["catch"](function(a){console.log(a),n.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.agents.wizard",{url:"/wizard",templateUrl:"app/staff/agent/wizard/wizard.html",controller:"AgentWizardCtrl",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}},resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}}).state("main.staff.agents.bulk",{url:"/bulk",templateUrl:"app/staff/agent/wizard/wizard-bulk.html",controller:"AgentWizardCtrl",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff",{url:"/staff",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("TeamCreateCtrl",["$scope","$uibModalInstance","Team","xAlert",function(a,b,c,d){a.form={},a.item={},a.ok=function(){return c.save(a.item).$promise.then(function(){b.close(a.item)})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("TeamListCtrl",["$scope","Team","gridOptions","$uibModal",function(a,b,c,d){a.initView=function(){var d={exporterCsvFilename:"teams.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:100,buttons:[{"class":"{{row.entity.defaultEntry ? 'blue-hoki disabled' : 'blue-hoki'}}",href:"/staff/teams/view/{{row.entity.id}}/settings",name:"profile"},{"class":"{{row.entity.defaultEntry ? 'green-turquoise disabled' : 'green-turquoise'}}",name:"agents",href:"/staff/teams/view/{{row.entity.id}}/agents"},{"class":"{{row.entity.defaultEntry ? 'red-sunglo disabled' : 'red-sunglo'}}",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){d.open({animation:!0,templateUrl:"app/staff/team/list/create.modal.html",controller:"TeamCreateCtrl"}).result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.teams.list",{url:"/list",templateUrl:"app/staff/team/list/list.html",controller:"TeamListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Team",["$resource",function(a){return a("/api/teams/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.teams",{url:"/teams",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"landing"}}})}]),angular.module("xCallyShuttleApp").controller("TeamViewCtrl",["$scope","$http","$stateParams","$translate","Team","Agent","xAlert",function(a,b,c,d,e,f,g){var h=function(){return{select:function(b){return console.log("agents",b),e.save({id:a.team.id,controller:"agents"},{agents:b})},deselect:function(b){return e["delete"]({id:a.team.id,controller:"agents",agents:b})}}};a.initView=function(){return e.get({id:c.id}).$promise.then(function(b){a.team=b})["catch"](function(a){g.error(a)})},a.initAgents=function(){return f.get().$promise.then(function(b){return a.agents=b.rows,e.get({id:c.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindTeam(_.map(b.rows,"id"),_.map(a.agents,function(a){return{id:a.id,name:a.name,fullname:a.fullname,internal:a.internal}}),h)})["catch"](function(a){g.error(a)})},a.updateItem=function(){var b=angular.copy(a.team);return e.update({id:c.id},b).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){
-g.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.teams.view",{url:"/view/:id",templateUrl:"app/staff/team/view/view.html",controller:"TeamViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.staff.teams.view.agents",{url:"/agents",templateUrl:"app/staff/team/view/view.agents.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]}])}]}}).state("main.staff.teams.view.settings",{url:"/settings",templateUrl:"app/staff/team/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("TelephoneListCtrl",["$scope","Telephone","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"telephones.csv",columnDefs:[{name:"fullname"},{name:"name"},{name:"internal"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/staff/telephones/view/{{row.entity.id}}/account",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.fullname, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.telephones.list",{url:"/list",templateUrl:"app/staff/telephone/list/list.html",controller:"TelephoneListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("Telephone",["$resource",function(a){return a("/api/telephones/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.telephones",{url:"/telephones",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"landing"}}})}]),angular.module("xCallyShuttleApp").controller("TelephoneViewCtrl",["$scope","$http","$stateParams","$translate","$cookieStore","Auth","xAlert","Telephone","Setting",function(a,b,c,d,e,f,g,h,i){a.initView=function(){return a.Auth=f,a.forms={},h.get({id:c.id}).$promise.then(function(b){return delete b.password,a.item=b,a.item.transport=a.item.transport?a.item.transport.split(","):[],a.item.allow=a.item.allow?a.item.allow.split(";"):[],i.get({id:1}).$promise}).then(function(b){a.setting=b})["catch"](function(a){g.error(a)})},a.updateItem=function(){var b=angular.copy(a.item);return b.transport=b.transport.join(","),b.allow=b.allow.join(";"),h.update(b).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.error(a)})},a.updatePassword=function(){return h.update({password:a.item.password}).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.telephones.view",{url:"/view/:id",templateUrl:"app/staff/telephone/view/view.html",controller:"TelephoneViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.staff.telephones.view.account",{url:"/account",templateUrl:"app/staff/telephone/view/view.account.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css","assets/scripts/jquery.sparkline.min.js","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js","assets/scripts/profile.js"]})}]}}).state("main.staff.telephones.view.voice",{url:"/voice",templateUrl:"app/staff/telephone/view/view.voice.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("TelephoneWizardCtrl",["$scope","$http","$location","WizardHandler","xAlert","$translate","Telephone","Setting",function(a,b,c,d,e,f,g,h){a.forms={},a.item={allow:["alaw","ulaw","gsm"],transport:["udp"],context:"from-sip"},a.next=function(){d.wizard().next()},a.exitValidation=function(a){return a},a.getFirstFreeInternal=function(){return h.get({controller:"internal"}).$promise.then(function(b){return a.item.internal=b.value,h.get({id:1}).$promise}).then(function(b){a.setting=b})["catch"](function(a){e.error(a)})},a.createItem=function(){var b=angular.copy(a.item);return b.transport&&(b.transport=b.transport.join(",")),a.item.allow&&(b.allow=b.allow.join(";")),g.save(b).$promise.then(function(){c.path("/staff/telephones/list")})["catch"](function(a){e.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.telephones.wizard",{url:"/wizard",templateUrl:"app/staff/telephone/wizard/wizard.html",controller:"TelephoneWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("UserListCtrl",["$scope","$timeout","User","Auth","gridOptions",function(a,b,c,d,e){function f(a){if(a){var b=_.words(a),c=_.map(b,function(a){return a?a[0]:""});return c.join("").toUpperCase()}return!1}a.getUserAvatar=function(a,c,d){b(function(){angular.element("#userImg"+a).avatar({useGravatar:!1,initials:d?[]:f(c),fallbackImage:"api/users/avatar/"+d,size:80})})},a.isAdmin=function(a){return"admin"===a},a.initView=function(){var b={exporterCsvFilename:"users.csv",columnDefs:[{name:"fullname"},{name:"name",displayName:"APPLICATION_USERNAME"},{name:"internal"},{name:"email"},{name:"description"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/staff/users/view/{{row.entity.id}}/account",name:"profile"},{"class":"green-meadow",href:"/staff/users/view/{{row.entity.id}}/permit/voice",name:"permits",hide:"grid.appScope.isAdmin(row.entity.role)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.fullname, row.entity.id)"}]}]};a.gridOptions=e.gridOptions(c,b,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.users.list",{url:"/list",templateUrl:"app/staff/user/list/list.html",controller:"UserListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Module",["$resource",function(a){return a("/api/modules/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("User",["$resource",function(a){return a("/api/users/:id/:controller/:controller2/:controller3",{id:"@id"},{changePassword:{method:"PUT",params:{controller:"password"}},update:{method:"PUT"},me:{method:"GET",params:{id:"me"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.users",{url:"/users",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"landing"}}})}]),angular.module("xCallyShuttleApp").controller("UserViewCtrl",["$scope","$stateParams","$cookieStore","$translate","FileUploader","User","Auth","xAlert","MailQueue","VoiceQueue","ChatQueue","FaxQueue","SmsQueue","OpenChannelQueue","Team","Module","Setting",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){function r(a,b){var c,d,e=b.length;for(c=0;e>c;c++){if(b[c].id===a)return b[c];if(b[c].SubModules&&b[c].SubModules.length&&(d=r(a,b[c].SubModules)))return d}}function s(b){var c=r(b.ModuleId,a.modules);if(b.status===!0)c.status=!0;else{var d=_.filter(c.SubModules,{status:!0});d.length||(c.status=!1)}c.ModuleId&&s(c)}function t(a,b){a.forEach(function(a){a.status=b,a.SubModules&&a.SubModules.length&&t(a.SubModules,b)})}function u(a,b){b.forEach(function(b){_.find(a,{id:b.id})?b.status=!0:b.status=!1,b.SubModules&&b.SubModules.length&&u(a,b.SubModules)})}function v(a,b){return a=_.union(a,_.map(_.filter(b,{status:!0}),"id")),b.forEach(function(b){b.SubModules&&b.SubModules.length&&(a=_.union(a,v(a,b.SubModules)))}),a}a.Auth=g,a._=_,a.moduleSwitch={onText:"On",offText:"Off",isActive:!0,size:"mini",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.initVoiceQueues=function(){var a={},c={};return j.get().$promise.then(function(c){return a.queues=_.map(c.rows,function(a){return{name:a.name}}),f.query({id:b.id,controller:"allowed",controller2:"voice",controller3:"queues"}).$promise}).then(function(a){c.queues=_.map(a,function(a){return{name:a.name}})}).then(function(){ComponentsDropdowns.bindPermit(a,c,"voice",b.id,f)})["catch"](function(a){console.error(a)})},a.initChatQueues=function(){var a={},c={};return k.get().$promise.then(function(c){return a.queues=_.map(c.rows,function(a){return{id:a.id,name:a.name}}),f.query({id:b.id,controller:"allowed",controller2:"chat",controller3:"queues"}).$promise}).then(function(a){c.queues=_.map(a,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindPermit(a,c,"chat",b.id,f)})["catch"](function(a){console.error(a)})},a.initMailQueues=function(){var a={},c={};return i.get().$promise.then(function(c){return a.queues=_.map(c.rows,function(a){return{id:a.id,name:a.name}}),f.query({id:b.id,controller:"allowed",controller2:"mail",controller3:"queues"}).$promise}).then(function(a){c.queues=_.map(a,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindPermit(a,c,"mail",b.id,f)})["catch"](function(a){console.error(a)})},a.initSmsQueues=function(){var a={},c={};return m.get().$promise.then(function(c){return a.queues=_.map(c.rows,function(a){return{id:a.id,name:a.name}}),f.query({id:b.id,controller:"allowed",controller2:"sms",controller3:"queues"}).$promise}).then(function(a){c.queues=_.map(a,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindPermit(a,c,"sms",b.id,f)})["catch"](function(a){console.error(a)})},a.initFaxQueues=function(){var a={},c={};return l.get().$promise.then(function(c){return a.queues=_.map(c.rows,function(a){return{id:a.id,name:a.name}}),f.query({id:b.id,controller:"allowed",controller2:"fax",controller3:"queues"}).$promise}).then(function(a){c.queues=_.map(a,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindPermit(a,c,"fax",b.id,f)})["catch"](function(a){console.error(a)})},a.initOpenchannelQueues=function(){var a={},c={};return n.get().$promise.then(function(c){return a.queues=_.map(c.rows,function(a){return{id:a.id,name:a.name}}),f.query({id:b.id,controller:"allowed",controller2:"openchannel",controller3:"queues"}).$promise}).then(function(a){c.queues=_.map(a,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindPermit(a,c,"openchannel",b.id,f)})["catch"](function(a){console.error(a)})},a.initView=function(){return f.get({id:b.id}).$promise.then(function(b){return a.user=b,a.user.transport=a.user.transport?a.user.transport.split(","):[],a.user.allow=a.user.allow?a.user.allow.split(";"):[],q.get({id:1}).$promise}).then(function(b){a.setting=b})["catch"](function(a){h.error(a)})},a.updateItem=function(){var c=angular.copy(a.user);return delete c.password,delete c.md5secret,c.transport=c.transport.join(","),c.allow=c.allow.join(";"),f.update({id:b.id},c).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})},a.updatePassword=function(){var c={newPassword:a.user.newPwd};return g.isAdmin()?c.id=b.id:c.oldPassword=a.user.currentPwd,f.changePassword(c).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})};var w=a.uploader=new e({url:"api/users/"+b.id+"/avatar",queueLimit:1,withCredentials:!0,headers:{Authorization:"Bearer "+c.get("token")}});w.filters.push({name:"imageFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|jpg|png|jpeg|".indexOf(b)}}),a.getModules=function(){return a.associatedModules=[],p.get().$promise.then(function(c){return a.modules=_.filter(c.rows,function(a){return!a.ModuleId}),f.query({id:b.id,controller:"allowed",controller2:"modules"}).$promise}).then(function(b){u(b,a.modules)})["catch"](function(a){h.error(a)})},a.updatePermissions=function(c){c.ModuleId&&s(c),c.SubModules&&c.SubModules.length&&t(c.SubModules,c.status);var e=v([],a.modules);return f.save({id:b.id,controller:"allowed",controller2:"modules"},{modules:e}).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})},w.onSuccessItem=function(b,c){a.user.userpic=c.userpic,a.user.id===g.getCurrentUser().id&&(g.getCurrentUser().userpic=c.userpic),h.show(d.instant("MESSAGE_WELL_DONE"),"success")},w.onErrorItem=function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},w.onCompleteAll=function(){w.clearQueue()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.users.view",{url:"/view/:id",templateUrl:"app/staff/user/view/view.html",controller:"UserViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.staff.users.view.account",{url:"/account",templateUrl:"app/staff/user/view/view.account.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css","assets/scripts/jquery.sparkline.min.js","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js","assets/scripts/profile.js"]})}]}}).state("main.staff.users.view.voice",{url:"/voice",templateUrl:"app/staff/user/view/view.voice.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}}).state("main.staff.users.view.permit",{url:"/permit",templateUrl:"app/staff/user/view/view.permit.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}},cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}}).state("main.staff.users.view.permit.voice",{url:"/voice",templateUrl:"app/staff/user/view/view.permit.voice.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}}).state("main.staff.users.view.permit.chat",{url:"/chat",templateUrl:"app/staff/user/view/view.permit.chat.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.chat"}}}).state("main.staff.users.view.permit.mail",{url:"/mail",templateUrl:"app/staff/user/view/view.permit.mail.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.mail"}}}).state("main.staff.users.view.permit.fax",{url:"/fax",templateUrl:"app/staff/user/view/view.permit.fax.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.fax"}}}).state("main.staff.users.view.permit.sms",{url:"/sms",templateUrl:"app/staff/user/view/view.permit.sms.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.sms"}}}).state("main.staff.users.view.permit.openchannel",{url:"/openchannel",templateUrl:"app/staff/user/view/view.permit.openchannel.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.openchannel"}}}).state("main.staff.users.view.permit.modules",{url:"/modules",templateUrl:"app/staff/user/view/view.permit.modules.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("UserWizardCtrl",["$scope","$location","WizardHandler","xAlert","$translate","User","Setting","Auth",function(a,b,c,d,e,f,g,h){a.initWizard=function(){return a.Auht=h,a.forms={info:void 0,voice:void 0},a.item={role:"user",host:"dynamic",context:"from-sip"},g.get({controller:"internal"}).$promise.then(function(b){return a.item.internal=b.value,g.get({id:1}).$promise}).then(function(b){a.setting=b})["catch"](function(a){d.error(a)})},a.next=function(){c.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){return f.save(a.item).$promise.then(function(a){b.path("user"===a.role?"/staff/users/view/"+a.id+"/permit/voice":"/staff/users/view/"+a.id+"/account")})["catch"](function(a){d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.users.wizard",{url:"/wizard",templateUrl:"app/staff/user/wizard/wizard.html",controller:"UserWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("SugarcrmListCtrl",["$scope","SugarcrmAccount","gridOptions","xAlert","$translate","Modal",function(a,b,c,d,e,f){a.initView=function(){var d={exporterCsvFilename:"sugarcrm_account.csv",columnDefs:[{name:"name",displayName:"APPLICATION_NAME"},{name:"username"},{name:"remoteUri",displayName:"APPLICATION_REMOTE_ADDRESS"},{name:"action",width:250,buttons:[{"class":"blue-hoki",href:"/sugarcrm/view/{{row.entity.id}}/account",name:"profile"},{"class":"green-jungle",name:"check",onClick:"grid.appScope.checkAccount(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.checkAccount=function(a){return b.get({id:a,controller:"check"}).$promise.then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(a){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.sugarcrm.list",{url:"/list",templateUrl:"app/sugarcrm/list/list.html",controller:"SugarcrmListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.sugarcrm",{url:"/sugarcrm",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("SugarcrmAccount",["$resource",function(a){return a("/api/sugarcrm/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("SugarcrmConfiguration",["$resource",function(a){return a("/api/sugarcrm/configurations/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("SugarcrmField",["$resource",function(a){return a("/api/sugarcrm/fields/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SugarcrmViewCtrl",["$scope","$http","$stateParams","$translate","$location","$filter","WizardHandler","socket","xAlert","Modal",function(a,b,c,d,e,f,g,h,i,j){a.$stateParams=c,a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:500,scrollInertia:0},a.initConfiguration=function(){a.formsConfiguration={},a.configuration={}},a.goNext=function(){g.wizard().next()},a.formValidation=function(a){return a},a.$on("$destroy",function(){h.unsyncUpdates("sugarcrm_configuration"),h.unsyncUpdates("sugarcrm_field")}),a.initView=function(){b.get("/api/sugarcrm/accounts/"+c.id).success(function(b){a.account=b}).error(function(a){i.error(a)})},a.updateItem=function(){b.put("/api/sugarcrm/accounts/"+c.id,a.account).success(function(){i.show(d.instant("MESSAGE_WELL_DONE")+".","success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.getConfigurations=function(){b.get("/api/sugarcrm/configurations",{params:{AccountId:c.id}}).success(function(b){a.configurations=b,h.socket.on("sugarcrm_configuration:remove",function(b){_.remove(a.configurations,{id:b.id})})}).error(function(a){i.error(a)})},a.deleteConfiguration=j.confirm["delete"](function(a){b["delete"]("api/sugarcrm/configurations/"+a).success(function(){i.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}),a.createConfiguration=function(){a.configuration.AccountId=c.id,b.post("api/sugarcrm/configurations",a.configuration).success(function(a){e.path("sugarcrm/view/"+c.id+"/configurations/settings/"+a.id)}).error(function(){i.show("Something went wrong!","danger")})},a.fieldType=["string","variable"],a.descFieldType=["string","key_value"],a.getFields=function(){b.get("/api/sugarcrm/accounts/"+c.id+"/fields").success(function(b){a.accountFields=_.sortByOrder(f("sugarcrm")(_.toArray(b)),"name","asc"),_.forEach(b,function(a){a.options=_.toArray(a.options)})}).error(function(a){i.error(a)})},a.getConfiguration=function(){b.get("/api/sugarcrm/configurations/"+c.configurationId).success(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,h.socket.on("sugarcrm_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})}).error(function(a){i.error(a)})},a.getVariables=function(){b.get("/api/variables").success(function(b){a.variables=b.rows}).error(function(a){i.error(a)})},a.removeItem=function(a){b["delete"]("api/sugarcrm/fields/"+a.id).success(function(){i.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addItemSubject=function(){var d={type:"string",content:""};b.post("/api/sugarcrm/configurations/"+c.configurationId+"/subject",d).success(function(b){a.subjectConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.addItemDescription=function(){var d={type:"string",content:""};b.post("/api/sugarcrm/configurations/"+c.configurationId+"/description",d).success(function(b){a.descriptionConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.addItemField=function(){var d={content:""};b.post("/api/sugarcrm/configurations/"+c.configurationId+"/field",d).success(function(b){a.fieldConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.updateField=function(a){b.put("/api/sugarcrm/fields/"+a.id,a).success(function(){}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.changeType=function(b){"variable"===b.type?b.content="":"string"===b.type&&(b.VariableId=null),a.updateField(b)},a.changeDescType=function(b){"key_value"===b.type?(b.content="","string"===b.keyType?b.VariableId=null:"variable"===b.keyType&&(b.keyContent="")):"string"===b.type&&(b.VariableId=null,b.key="",b.keyContent=""),a.updateField(b)},a.changeFieldType=function(b){b.content="",a.updateField(b)},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"name",b);return c?c.options.length>0?c.options:null:void 0}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.sugarcrm.view",{url:"/view/:id",templateUrl:"app/sugarcrm/view/view.html",controller:"SugarcrmViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.sugarcrm.view.account",{url:"/account",templateUrl:"app/sugarcrm/view/view.account.html"}).state("main.sugarcrm.view.configurations",{url:"/configurations",templateUrl:"app/sugarcrm/view/view.configurations.html"}).state("main.sugarcrm.view.configurations.settings",{url:"/settings/:configurationId",templateUrl:"app/sugarcrm/view/view.configurationSettings.html",controller:"SugarcrmViewCtrl"}).state("main.sugarcrm.view.configuration",{url:"/configuration",templateUrl:"app/sugarcrm/view/view.configuration.html"})}]),angular.module("xCallyShuttleApp").controller("SugarcrmkWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler",function(a,b,c,d,e,f){a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={}},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){b.post("api/sugarcrm/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/sugarcrm/list")}).error(function(){e.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.sugarcrm.wizard",{url:"/wizard",templateUrl:"app/sugarcrm/wizard/wizard.html",controller:"SugarcrmkWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("CannedAnswer",["$resource",function(a){return a("/api/answers/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.answers",{url:"/answers",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:58}}})}]),angular.module("xCallyShuttleApp").controller("AnswerListCtrl",["$scope","$uibModal","CannedAnswer","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"answers.csv",columnDefs:[{name:"key",displayName:"APPLICATION_NAME"},{name:"value"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/tools/answers/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.key, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){b.open({animation:!0,templateUrl:"app/tools/answer/list/list.create.modal.html",controller:"AnswerListCreateCtrl"}).result.then(function(b){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("AnswerListCreateCtrl",["$scope","$translate","$uibModalInstance","CannedAnswer","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.answers.list",{url:"/list",templateUrl:"app/tools/answer/list/list.html",controller:"AnswerListCtrl"})}]),angular.module("xCallyShuttleApp").controller("AnswerViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location","CannedAnswer",function(a,b,c,d,e,f,g){a.getAnswer=function(){return g.get({id:e.id}).$promise.then(function(b){a.answer=b})["catch"](function(a){c.error(a)})},a.updateAnswer=function(){var b=angular.copy(a.answer);return g.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.answers.view",{url:"/view/:id",templateUrl:"app/tools/answer/view/view.html",controller:"AnswerViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.answers.view.settings",{url:"/settings",templateUrl:"app/tools/answer/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("Automation",["$resource",function(a){return a("/api/automations/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.automations",{url:"/automations",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:51}}})}]),angular.module("xCallyShuttleApp").controller("AutomationListCtrl",["$scope","$http","$translate","xAlert","Automation","gridOptions",function(a,b,c,d,e,f){a.onText="On",a.offText="Off",a.isActive=!0,a.size="mini",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initView=function(){var b={exporterCsvFilename:"Automations.csv",columnDefs:[{name:"name"},{name:"description"},{name:"channel"},{name:"status",cellTemplate:'<div class="centered-uigrid-td"><input data-ng-change="grid.appScope.updateItem(row.entity)", bs-switch ng-model="row.entity.status" type="checkbox" switch-active="{{ grid.appScope.isActive }}" switch-on-text="{{ grid.appScope.onText }}" switch-off-text="{{ grid.appScope.offText }}" switch-on-color="{{ grid.appScope.onColor }}" switch-off-color="{{ grid.appScope.offColor }}" switch-animate="{{ grid.appScope.animate }}" switch-size="{{ grid.appScope.size }}" switch-label="{{ grid.appScope.label }}" switch-icon="{{ grid.appScope.icon }}" switch-radio-off="{{ grid.appScope.radioOff }}" switch-label-width="{{ grid.appScope.labelWidth }}" switch-handle-width="{{ grid.appScope.handleWidth }}"></div>',width:100,enableFiltering:!1},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/tools/automations/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=f.gridOptions(e,b,a)},a.updateItem=function(a){return e.update({id:a.id},a).$promise.then(function(){d.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.automations.list",{url:"/list",templateUrl:"app/tools/automation/list/list.html",controller:"AutomationListCtrl"})}]),angular.module("xCallyShuttleApp").controller("AutomationViewCtrl",["$scope","$stateParams","$http","$translate","xAlert","automations","Automation","$location",function(a,b,c,d,e,f,g,h){a.$automations=f,a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.forms={general:{}},a.addCondition=function(b){a.automation[b].push({field:"",operator:"",value:""})},a.removeCondition=function(b,c){a.automation[b].splice(c,1)},a.addAction=function(){a.automation.Actions.push({action:"",data1:"",data2:"",data3:"",data4:"",data5:""})},a.resetActionData=function(a){a.data1="",a.data2="",a.data3="",a.data4="",a.data5=""},a.removeAction=function(b){a.automation.Actions.splice(b,1)},a.initView=function(){return g.get({id:b.id}).$promise.then(function(b){a.automation=b})["catch"](function(a){e.error(a),h.path("/tools/automations/list")})},a.updateAutomation=function(){return g.update({id:b.id},a.automation).$promise.then(function(){e.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),e.error(a)})},a.exitValidation=function(b){return console.log(b&&(a.automation.All.length||a.automation.Any.length)&&a.automation.Actions.length),!(!b||!a.automation.All.length&&!a.automation.Any.length||!a.automation.Actions.length)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.automations.view",{url:"/view/:id",templateUrl:"app/tools/automation/view/view.html",controller:"AutomationViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}}).state("main.tools.automations.view.settings",{url:"/settings",templateUrl:"app/tools/automation/view/view.settings.html"}).state("main.tools.automations.view.routes",{url:"/routes",templateUrl:"app/tools/automation/view/view.routes.html"}).state("main.tools.automations.view.application",{url:"/application",templateUrl:"app/tools/automation/view/view.application.html"
-})}]),angular.module("xCallyShuttleApp").controller("AutomationWizardCtrl",["$scope","$http","$location","xAlert","automations","WizardHandler","Automation",function(a,b,c,d,e,f,g){a.$automations=e,a.statusSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.tempData={voice:{},mail:{},chat:{},fax:{}},a.item={All:[],Any:[],Actions:[]},a.forms={general:void 0,settings:void 0},a.addCondition=function(b){a.item[b].push({field:"",operator:"",value:""})},a.removeCondition=function(b,c){a.item[b].splice(c,1)},a.addAction=function(){a.item.Actions.push({action:"",data1:"",data2:"",data3:"",data4:"",data5:""})},a.resetActionData=function(a){a.data1="",a.data2="",a.data3="",a.data4="",a.data5=""},a.removeAction=function(b){a.item.Actions.splice(b,1)},a.$watch("item.channel",function(b,c){c&&(a.tempData[c].All=_.clone(a.item.All,!0),a.tempData[c].Any=_.clone(a.item.Any,!0),a.tempData[c].Actions=_.clone(a.item.Actions,!0)),a.item.All=a.tempData[b].All?a.tempData[b].All:[],a.item.Any=a.tempData[b].Any?a.tempData[b].Any:[],a.item.Actions=a.tempData[b].Actions?a.tempData[b].Actions:[]},!0),a.item.channel="mail",a.createItem=function(){return g.save(a.item).$promise.then(function(){c.path("/tools/automations/list")})["catch"](function(a){console.error(a),d.error(a)})},a.next=function(){f.wizard().next()},a.previous=function(){f.wizard().previous()},a.exitValidation=function(a){return a},a.exitSettingsValidation=function(b){return!(!b||!a.item.All.length&&!a.item.Any.length||!a.item.Actions.length)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.automations.wizard",{url:"/wizard",templateUrl:"app/tools/automation/wizard/wizard.html",controller:"AutomationWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("Interval",["$resource",function(a){return a("/api/intervals/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.intervals",{url:"/intervals",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:53}}})}]),angular.module("xCallyShuttleApp").controller("IntervalListCtrl",["$scope","$uibModal","Interval","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"intervals.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/tools/intervals/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/tools/interval/list/list.create.modal.html",controller:"IntervalListCreateCtrl"});c.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("IntervalListCreateCtrl",["$scope","$translate","$uibModalInstance","Interval","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.intervals.list",{url:"/list",templateUrl:"app/tools/interval/list/list.html",controller:"IntervalListCtrl"})}]),angular.module("xCallyShuttleApp").controller("IntervalViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","socket","$location","WizardHandler","Modal","interval",function(a,b,c,d,e,f,g,h,i,j){function k(b){var c,d,e,f;c=b.t_from&&b.t_to&&!b.alwaysTime?moment(b.t_from).format("HH:mm")+"-"+moment(b.t_to).format("HH:mm"):"*",b.wd_from&&"always"!==b.wd_from?(d=b.wd_from,b.wd_to&&"always"!==b.wd_to&&(d+="-"+b.wd_to)):d="*",b.md_from&&"always"!==b.md_from?(e=b.md_from,b.md_to&&"always"!==b.md_to&&(e+="-"+b.md_to)):e="*",b.m_from&&"always"!==b.m_from?(f=b.m_from,b.m_to&&"always"!==b.m_to&&(f+="-"+b.m_to)):f="*",void 0!==a.selectedSubInterval?a.interval.SubIntervals[a.selectedSubInterval].interval=c+","+d+","+e+","+f:a.subinterval.interval=c+","+d+","+e+","+f}a.$translate=d,a.$interval=j.interval,a.selectedSubInterval=void 0,a["switch"]={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.gridOptions={columnDefs:[{name:"name",displayName:"APPLICATION_NAME",headerCellFilter:"translate"},{name:"interval",displayName:"APPLICATION_INTERVAL",headerCellFilter:"translate"},{name:"action",displayName:"APPLICATION_ACTION",headerCellFilter:"translate",width:125,cellTemplate:'<a class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.openSubInterval(grid.appScope.gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_SETTINGS\' | translate}}</a><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteSubInterval(row.entity.name+\' interval\', grid.appScope.gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_DELETE\' | translate}}</a>'}]},a.forms={subinterval:void 0,general:void 0},a.initSubInterval=function(b){b&&(a.selectedSubInterval=void 0),a.subinterval={},a.splittedInterval={t_from:moment(new Date),t_to:moment(new Date),wd_from:"always",wd_to:"always",md_from:"always",md_to:"always",m_from:"always",m_to:"always",alwaysTime:!0}},a.next=function(){h.wizard().next()},a.previous=function(){h.wizard().previous()},a.exitValidation=function(a){return a},a.deselectAndRedirect=function(b){a.selectedSubInterval=void 0,g.path(b)},a.getInterval=function(){b.get("/api/intervals/"+e.id).success(function(b){a.interval=b,a.gridOptions.data=b.SubIntervals}).error(function(a){console.error(a),g.path("/tools/intervals/list")})},a.openSubInterval=function(b){a.selectedSubInterval=b,g.path("/tools/intervals/view/"+e.id+"/subintervals/settings")},a.updateInterval=function(f){a.selectedSubInterval=void 0,b.put("/api/intervals/"+e.id,a.interval).success(function(){a.getInterval(),c.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),f&&g.path("/tools/intervals/view/"+e.id+"/"+f)}).error(function(a){c.error(a)})},a.getSubInterval=function(){void 0===a.selectedSubInterval&&g.path("/tools/intervals/list"),a.splittedInterval={t_from:moment(new Date),t_to:moment(new Date)};var b,c=a.interval.SubIntervals[a.selectedSubInterval]?a.interval.SubIntervals[a.selectedSubInterval].interval.split(","):["*","*","*","*"];c.forEach(function(c,d){switch(d){case 0:"*"!==c?(b=c.split("-"),a.splittedInterval.t_from=moment(b[0],"HH:mm"),a.splittedInterval.t_to=moment(b[1],"HH:mm"),a.splittedInterval.alwaysTime=!1):(a.splittedInterval.t_from=moment(new Date),a.splittedInterval.t_to=moment(new Date),a.splittedInterval.alwaysTime=!0);break;case 1:"*"!==c?(b=c.split("-"),a.splittedInterval.wd_from=b[0],a.splittedInterval.wd_to=b[1]?b[1]:"always"):(a.splittedInterval.wd_from="always",a.splittedInterval.wd_to="always");break;case 2:"*"!==c?(b=c.split("-"),a.splittedInterval.md_from=b[0],a.splittedInterval.md_to=b[1]?b[1]:"always"):(a.splittedInterval.md_from="always",a.splittedInterval.md_to="always");break;case 3:"*"!==c?(b=c.split("-"),a.splittedInterval.m_from=b[0],a.splittedInterval.m_to=b[1]?b[1]:"always"):(a.splittedInterval.m_from="always",a.splittedInterval.m_to="always")}})},a.$watch("splittedInterval",function(a){a&&k(a)},!0),a.addSubInterval=function(){a.interval.SubIntervals.push(a.subinterval),a.updateInterval("subintervals")},a.deleteSubInterval=i.confirm["delete"](function(b){a.interval.SubIntervals.splice(b,1),a.updateInterval()})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.intervals.view",{url:"/view/:id",templateUrl:"app/tools/interval/view/view.html",controller:"IntervalViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.intervals.view.settings",{url:"/settings",templateUrl:"app/tools/interval/view/view.settings.html"}).state("main.tools.intervals.view.subintervals",{url:"/subintervals",templateUrl:"app/tools/interval/view/view.subintervals.html"}).state("main.tools.intervals.view.subinterval",{url:"/subinterval",templateUrl:"app/tools/interval/view/view.subinterval.html"}).state("main.tools.intervals.view.subintervals.settings",{url:"/settings",templateUrl:"app/tools/interval/view/view.subintervalSettings.html"})}]),angular.module("xCallyShuttleApp").controller("PauseListCtrl",["$scope","$log","$uibModal","$translate","Pause","gridOptions",function(a,b,c,d,e,f){a.initView=function(){var b={exporterCsvFilename:"pauses.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/tools/pauses/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=f.gridOptions(e,b,a)},a.createItem=function(){var b=c.open({animation:!0,templateUrl:"app/tools/pause/list/list.create.modal.html",controller:"PauseListCreateCtrl"});b.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("PauseListCreateCtrl",["$scope","$translate","$uibModalInstance","Pause","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.pauses.list",{url:"/list",templateUrl:"app/tools/pause/list/list.html",controller:"PauseListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Pause",["$resource",function(a){return a("/api/pauses/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.pauses",{url:"/pauses",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:57}}})}]),angular.module("xCallyShuttleApp").controller("PauseViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location","Pause",function(a,b,c,d,e,f,g){a.getPause=function(){return g.get({id:e.id}).$promise.then(function(b){a.pause=b})["catch"](function(a){c.error(a)})},a.updatePause=function(){var b=angular.copy(a.pause);return g.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.pauses.view",{url:"/view/:id",templateUrl:"app/tools/pause/view/view.html",controller:"PauseViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.pauses.view.settings",{url:"/settings",templateUrl:"app/tools/pause/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("SchedulerListCtrl",["$scope","Scheduler","gridOptions","xAlert","$translate","socket",function(a,b,c,d,e,f){a._=_,a.switches={isActive:!0,size:"mini",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.scheduleTypes=[{name:"APPLICATION_REPORT_EXTRACTION",value:"report"},{name:"APPLICATION_HISTORY_MOVE",value:"history"},{name:"APPLICATION_DB_BACKUP",value:"backup"}],a.initView=function(){var d={exporterCsvFilename:"Schedules.csv",columnDefs:[{name:"name"},{name:"type",cellTemplate:'<div class="centered-uigrid-td">{{grid.appScope._.find(grid.appScope.scheduleTypes,{value:row.entity.type}).name | translate}}</div>'},{name:"description"},{name:"active",cellTemplate:'<div class="centered-uigrid-td"><input data-ng-change="grid.appScope.updateItem(row.entity)", bs-switch ng-model="row.entity.active" type="checkbox" switch-active="{{ grid.appScope.switches.isActive }}" switch-on-text="{{ \'APPLICATION_YES\' | translate }}" switch-off-text="{{ \'APPLICATION_NO\' | translate }}" switch-on-color="{{ grid.appScope.switches.onColor }}" switch-off-color="{{ grid.appScope.switches.offColor }}" switch-animate="{{ grid.appScope.switches.animate }}" switch-size="{{ grid.appScope.switches.size }}" switch-label="{{ grid.appScope.switches.label }}" switch-icon="{{ grid.appScope.switches.icon }}" switch-radio-off="{{ grid.appScope.switches.radioOff }}" switch-label-width="{{ grid.appScope.switches.labelWidth }}" switch-handle-width="{{ grid.appScope.switches.handleWidth }}"></div>',enableFiltering:!1,enableSorting:!1},{name:"sendMail",displayName:"APPLICATION_SEND_MAIL",cellTemplate:'<div data-ng-if="row.entity.type == \'report\'" class="centered-uigrid-td"><input data-ng-change="grid.appScope.updateItem(row.entity)", bs-switch ng-model="row.entity.sendMail" type="checkbox" switch-active="{{ grid.appScope.switches.isActive }}" switch-on-text="{{ \'APPLICATION_YES\' | translate }}" switch-off-text="{{ \'APPLICATION_NO\' | translate }}" switch-on-color="{{ grid.appScope.switches.onColor }}" switch-off-color="{{ grid.appScope.switches.offColor }}" switch-animate="{{ grid.appScope.switches.animate }}" switch-size="{{ grid.appScope.switches.size }}" switch-label="{{ grid.appScope.switches.label }}" switch-icon="{{ grid.appScope.switches.icon }}" switch-radio-off="{{ grid.appScope.switches.radioOff }}" switch-label-width="{{ grid.appScope.switches.labelWidth }}" switch-handle-width="{{ grid.appScope.switches.handleWidth }}"></div>',enableFiltering:!1,enableSorting:!1},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/tools/scheduler/view/{{row.entity.id}}/settings",name:"settings"},{"class":"green-turquoise",name:"run",onClick:"grid.appScope.runSchedule(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.updateItem=function(a){return b.update({id:a.id},a).$promise.then(function(){d.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),d.error(a)})},a.runSchedule=function(a){return b.get({id:a,controller:"run"}).$promise.then(function(){d.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.scheduler.list",{url:"/list",templateUrl:"app/tools/scheduler/list/list.html",controller:"SchedulerListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Scheduler",["$resource",function(a){return a("/api/scheduler/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.scheduler",{url:"/scheduler",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:61}}})}]),angular.module("xCallyShuttleApp").controller("SchedulerViewCtrl",["$scope","xAlert","$translate","$stateParams","socket","$location","ReportTree","Scheduler","DefaultReport","CustomReport","$timeout","MailServerOut",function(a,b,c,d,e,f,g,h,i,j,k,l){function m(){switch(a.schedule.cronType=a.rangeExec.type,a.rangeExec.type){case"daily":a.schedule.cron="00 "+a.rangeExec.hour+" * * *";break;case"weekly":a.schedule.cron="00 "+a.rangeExec.hour+" * * "+a.rangeExec.weekDays.join(",");break;case"monthly":a.schedule.cron="00 "+a.rangeExec.hour+" "+a.rangeExec.monthDay+" * *"}}function n(b){var c;switch(b.cronType){case"daily":a.rangeExec.hour=Number(b.cron.split(" ")[1]),a.rangeExec.type=b.cronType;break;case"weekly":c=b.cron.split(" "),a.rangeExec.hour=Number(c[1]),c[4].split(",").forEach(function(b){a.rangeExec.weekDays.push(Number(b))}),a.rangeExec.type=b.cronType;break;case"monthly":c=b.cron.split(" "),a.rangeExec.hour=Number(c[1]),a.rangeExec.monthDay=Number(c[2]),a.rangeExec.type=b.cronType;break;case"currentDay":a.switchValues.today=!0}a.$watch("rangeExec",function(b){a.switchValues.today||m()},!0)}a.forms={},a.rangeExec={weekDays:[],monthDay:null,hour:0,type:null},a.initReports=function(){var c;return a.reports=[],a.tempTodayCron=null,g.query().$promise.then(function(b){return a.defaultTreeData=JSON.parse(b[0].tree),a.customTreeData=JSON.parse(b[1].tree),i.get().$promise}).then(function(b){return a.defRep=b.rows,a.defRep.length&&_.forEach(a.defRep,function(b){c=_.find(a.defaultTreeData,{id:b.parent}),c&&(b.parent="Motion Reports - "+c.text,b.type="default")}),j.get().$promise}).then(function(b){return a.cusRep=b.rows,a.cusRep.length&&_.forEach(a.cusRep,function(b){c=_.find(a.customTreeData,{id:b.parent}),c&&(b.parent="Custom Reports - "+c.text,b.type="custom")}),l.get().$promise}).then(function(b){a.mailServers=b.rows})["catch"](function(a){b.error(a)})},a.initView=function(){return h.get({id:d.id}).$promise.then(function(b){a.schedule=b,n(b)}).then(function(){e.socket.on("schedule:update",function(b){a.schedule.id===b.id&&(a.schedule.active=b.active,a.schedule.sendMail=b.sendMail)})})["catch"](function(a){console.error(a),f.path("/tools/scheduler/list")})},a.refreshSlider=function(){k(function(){a.$broadcast("rzSliderForceRender"),a.refreshSlider=null})},a.monthDays=function(){for(var a=[],b=1;31>=b;b++)a.push(b);return a}(),a.hours=function(){for(var a=[],b=0;23>=b;b++)a.push(b);return a}(),a.setReportTree=function(b){a.schedule.reportType=b.type},a.validitySlider={ceil:24,floor:0,showTicks:!0},a.switchValues={today:!1},a.switches={isActive:!0,size:"mini",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.scheduleTypes=[{name:"APPLICATION_REPORT_EXTRACTION",value:"report"}],a.todayCron=[{name:"15 min",value:"*/15 * * * *"},{name:"30 min",value:"*/30 * * * *"},{name:"1 h",value:"0 * * * *"}],a.reportRanges=[{name:"APPLICATION_PREVIOUS_DAY",value:"yesterday"},{name:"APPLICATION_LAST_SEVEN_DAYS",value:"last7"},{name:"APPLICATION_LAST_THIRTY_DAYS",value:"last30"},{name:"APPLICATION_LAST_MONTH",value:"lastMonth"}],a.cronTypes=[{name:"APPLICATION_DAY",value:"daily"},{name:"APPLICATION_WEEK",value:"weekly"},{name:"APPLICATION_MONTH",value:"monthly"}],a.weekDays=[{name:"APPLICATION_MONDAY",value:1},{name:"APPLICATION_TUESDAY",value:2},{name:"APPLICATION_WEDNESDAY",value:3},{name:"APPLICATION_THURSDAY",value:4},{name:"APPLICATION_FRIDAY",value:5},{name:"APPLICATION_SATURDAY",value:6},{name:"APPLICATION_SUNDAY",value:0}],a.checkToday=function(){a.switchValues.today?(a.schedule.cron=angular.copy(a.tempTodayCron),a.schedule.cronType="currentDay"):(a.tempTodayCron=angular.copy(a.schedule.cron),a.schedule.cron=void 0,m())},a.updateSchedule=function(){return h.update({id:a.schedule.id},a.schedule).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),b.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.scheduler.view",{url:"/view/:id",templateUrl:"app/tools/scheduler/view/view.html",controller:"SchedulerViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.scheduler.view.settings",{url:"/settings",templateUrl:"app/tools/scheduler/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("SchedulerWizardCtrl",["$scope","WizardHandler","$location","xAlert","Scheduler","ReportTree","$translate","DefaultReport","CustomReport","MailServerOut",function(a,b,c,d,e,f,g,h,i,j){function k(){switch(a.item.cronType=a.rangeExec.type,a.rangeExec.type){case"daily":a.item.cron="00 "+a.rangeExec.hour+" * * *";break;case"weekly":a.item.cron="00 "+a.rangeExec.hour+" * * "+a.rangeExec.weekDays.join(",");break;case"monthly":a.item.cron="00 "+a.rangeExec.hour+" "+a.rangeExec.monthDay+" * *"}}a.forms={},a.item={validityStart:8,validityEnd:16,type:"report",reportType:"default"},a.initReports=function(){a.reports=[];var b;return f.query().$promise.then(function(b){return a.defaultTreeData=JSON.parse(b[0].tree),a.customTreeData=JSON.parse(b[1].tree),h.get().$promise}).then(function(c){return a.defRep=c.rows,a.defRep.length&&_.forEach(a.defRep,function(c){b=_.find(a.defaultTreeData,{id:c.parent}),b&&(c.parent="Motion Reports - "+b.text,c.type="default")}),i.get().$promise}).then(function(c){return a.cusRep=c.rows,a.cusRep.length&&_.forEach(a.cusRep,function(c){b=_.find(a.customTreeData,{id:c.parent}),b&&(c.parent="Custom Reports - "+b.text,c.type="custom")}),j.get().$promise}).then(function(b){a.mailServers=b.rows;var c=_.find(a.mailServers,{MailAccountId:null});c&&(c.username+=" (custom)")})["catch"](function(a){d.error(a)})},a.setReportTree=function(b){a.item.reportType=b.type},a.validitySlider={ceil:24,floor:0,showTicks:!0},a.switchValues={today:!1},a.switches={isActive:!0,size:"mini",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.scheduleTypes=[{name:"APPLICATION_REPORT_EXTRACTION",value:"report"}],a.todayCron=[{name:"15 min",value:"*/15 * * * *"},{name:"30 min",value:"*/30 * * * *"},{name:"1 h",value:"0 * * * *"}],a.reportRanges=[{name:"APPLICATION_PREVIOUS_DAY",value:"yesterday"},{name:"APPLICATION_LAST_SEVEN_DAYS",value:"last7"},{name:"APPLICATION_LAST_THIRTY_DAYS",value:"last30"},{name:"APPLICATION_LAST_MONTH",value:"lastMonth"}],a.cronTypes=[{name:"APPLICATION_DAY",value:"daily"},{name:"APPLICATION_WEEK",value:"weekly"},{name:"APPLICATION_MONTH",value:"monthly"}],a.weekDays=[{name:"APPLICATION_MONDAY",value:1},{name:"APPLICATION_TUESDAY",value:2},{name:"APPLICATION_WEDNESDAY",value:3},{name:"APPLICATION_THURSDAY",value:4},{name:"APPLICATION_FRIDAY",value:5},{name:"APPLICATION_SATURDAY",value:6},{name:"APPLICATION_SUNDAY",value:0}],a.tempTodayCron=null,a.checkToday=function(){a.switchValues.today?(a.item.cron=angular.copy(a.tempTodayCron),a.item.cronType="currentDay"):(a.tempTodayCron=angular.copy(a.item.cron),a.item.cron=void 0,k())},a.monthDays=function(){for(var a=[],b=1;31>=b;b++)a.push(b);return a}(),a.hours=function(){for(var a=[],b=0;23>=b;b++)a.push(b);return a}(),a.rangeExec={weekDays:[],monthDay:null,hour:0,type:null},a.$watch("rangeExec",function(b){a.switchValues.today||k()},!0),a.next=function(){b.wizard().next()},a.previous=function(){b.wizard().previous()},a.exitValidation=function(a){return a},a.createItem=function(){return e.save(a.item).$promise.then(function(){c.path("/tools/scheduler/list")})["catch"](function(a){d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.scheduler.wizard",{url:"/wizard",templateUrl:"app/tools/scheduler/wizard/wizard.html",controller:"SchedulerWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("SoundListCtrl",["$scope","$http","socket","Modal","$q","FileUploader","$translate","xAlert","$cookieStore","$sce","Sound",function(a,b,c,d,e,f,g,h,i,j,k){a.Sound=k,a.isCollapsed=!0,a.downloadButtonClass="btn btn-xs blue-hoki",a["delete"]=d.confirm["delete"](function(a){b["delete"]("/api/sounds/"+a).success(function(a){}).error(function(a){console.log(a)})}),a.updateAudio=function(a,c){var d=e.defer();return b.put("/api/sounds/"+a,c).success(function(a){d.resolve()}).error(function(a){console.log(a.message),d.reject(a.message)}),d.promise},a.$on("$destroy",function(){c.unsyncUpdates("sound")}),a.initList=function(){b.get("/api/sounds").success(function(b){a.sounds=b.rows,b.rows.length||(a.isCollapsed=!1),c.syncUpdates("sound",a.sounds,function(){a.sounds.length||(a.isCollapsed=!1)})})};var l=a.uploader=new f({url:"/api/sounds",withCredentials:!0,headers:{Authorization:"Bearer "+i.get("token")}});l.filters.push({name:"customFilter",fn:function(a,b){return this.queue.length<10}}),l.onWhenAddingFileFailed=function(a,b,c){console.info("onWhenAddingFileFailed",a,b,c)},l.onAfterAddingFile=function(a){console.info("onAfterAddingFile",a)},l.onAfterAddingAll=function(a){console.info("onAfterAddingAll",a)},l.onBeforeUploadItem=function(a){console.info("onBeforeUploadItem",a)},l.onProgressItem=function(a,b){console.info("onProgressItem",a,b),a.isUploading=!0},l.onProgressAll=function(a){console.info("onProgressAll",a)},l.onSuccessItem=function(a,b,c,d){console.info("onSuccessItem",a,b,c,d),a.isUploading=!1},l.onErrorItem=function(a,b,c,d){console.info("onErrorItem",a,b,c,d),a.responseMessage=b,a.isUploading=!1},l.onCancelItem=function(a,b,c,d){console.info("onCancelItem",a,b,c,d),a.isUploading=!1},l.onCompleteItem=function(a,b,c,d){console.info("onCompleteItem",a,b,c,d),a.isUploading=!1},l.onCompleteAll=function(){console.info("onCompleteAll")}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.sounds.list",{url:"/list",templateUrl:"app/tools/sound/list/list.html",controller:"SoundListCtrl",authenticate:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js"]})}]}})}]),angular.module("xCallyShuttleApp").factory("Sound",["$resource",function(a){return a("/api/sounds/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.sounds",{url:"/sounds",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:60}}})}]),angular.module("xCallyShuttleApp").controller("TagListCtrl",["$scope","$uibModal","Tag","gridOptions","$rootScope",function(a,b,c,d,e){a.initView=function(){var b={exporterCsvFilename:"tag.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/tools/tags/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/tools/tag/list/list.create.modal.html",controller:"TagListCreateCtrl"});c.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("TagListCreateCtrl",["$scope","$translate","$uibModalInstance","Tag","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.tags.list",{url:"/list",templateUrl:"app/tools/tag/list/list.html",controller:"TagListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Tag",["$resource",function(a){return a("/api/tags/:id/:controller/:tag",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.tags",{url:"/tags",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:55}}})}]),angular.module("xCallyShuttleApp").controller("TagViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location","Tag","gridOptions","List","Company","Contact","uiGridConstants","usSpinnerService",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){m.stop("spinner-grid"),a.readyGrid=!0}a.getTag=function(){return g.get({id:e.id}).$promise.then(function(b){a.tag=b})["catch"](function(a){c.error(a)})},a.updateTag=function(){var b=angular.copy(a.tag);return g.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.error(a)})},a.initChat=function(){m.spin("spinner-grid");var b={enableRowSelection:!1,exporterCsvFilename:"tagChat.csv",columnDefs:[{name:"type"},{name:"status"},{name:"ChatWebsite.name",displayName:"APPLICATION_WEBSITE"},{name:"ChatVisitor.email",displayName:"APPLICATION_VISITOR"},{name:"action",width:40,buttons:[{"class":"green",name:"chatRoom",onClick:"grid.appScope.openRoom(row.entity.id, 'chatRoom')"}]}]};a.gridOptions=h.gridOptions(g,b,a,{controller:"chat",tag:a.tag.name},null,null,n())},a.initMail=function(){m.spin("spinner-grid");var b={enableRowSelection:!1,exporterCsvFilename:"tagMail.csv",columnDefs:[{name:"subject"},{name:"from"},{name:"account"},{name:"status"},{name:"action",width:40,buttons:[{"class":"green",name:"mailRoom",onClick:"grid.appScope.openRoom(row.entity.id, 'mailRoom')"}]}]};a.gridOptions=h.gridOptions(g,b,a,{controller:"mail",tag:a.tag.name},null,null,n())},a.initFax=function(){m.spin("spinner-grid");var b={enableRowSelection:!1,exporterCsvFilename:"tagFax.csv",columnDefs:[{name:"from"},{name:"account"},{name:"status"},{name:"action",width:40,buttons:[{"class":"green",name:"faxRoom",onClick:"grid.appScope.openRoom(row.entity.id, 'faxRoom')"}]}]};a.gridOptions=h.gridOptions(g,b,a,{controller:"fax",tag:a.tag.name},null,null,n())},a.initSms=function(){m.spin("spinner-grid");var b={enableRowSelection:!1,exporterCsvFilename:"tagSms.csv",columnDefs:[{name:"from"},{name:"status"},{name:"action",width:40,buttons:[{"class":"green",name:"smsRoom",onClick:"grid.appScope.openRoom(row.entity.id, 'smsRoom')"}]}]};a.gridOptions=h.gridOptions(g,b,a,{controller:"sms",tag:a.tag.name},null,null,n())},a.initContacts=function(){a.readyGrid=!1,m.spin("spinner-grid");var b;return i.get().$promise.then(function(b){return a.lists=[],b.rows.forEach(function(b,c){a.lists.push({value:b.id,label:b.name})}),j.get().$promise}).then(function(b){a.companies=[],b.rows.forEach(function(b,c){a.companies.push({value:b.id,label:b.name})})}).then(function(){b={enableRowSelection:!1,exporterCsvFilename:"tagContacts.csv",columnDefs:[{name:"firstName"},{name:"lastName"},{name:"phone"},{name:"email"},{name:"ListId",displayName:"APPLICATION_LIST",field:"List.name",filter:{type:l.filter.SELECT,selectOptions:a.lists}},{name:"CompanyId",displayName:"APPLICATION_COMPANY",field:"Company.name",filter:{type:l.filter.SELECT,term:e.companyId||null,selectOptions:a.companies}},{name:"action",width:40,buttons:[{"class":"blue-hoki",name:"profile",onClick:"grid.appScope.openContactTab(row.entity)"}]}]},a.gridOptions=h.gridOptions(g,b,a,{controller:"contacts",tag:a.tag.name},null,null,n())})["catch"](function(a){c.error(a)})},a.openRoom=function(b,c){var d=_.find(a.workspaces,{id:b,type:c});if(d)d.active=!0;else{var e;switch(c){case"mailRoom":e="icon-envelope";break;case"chatRoom":e="fa fa-users";break;case"faxRoom":e="fa fa-fax";break;case"smsRoom":e="glyphicon glyphicon-comment"}a.workspaces.push({id:b,type:c,"class":e,active:!0})}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.tags.view",{url:"/view/:id",templateUrl:"app/tools/tag/view/view.html",controller:"TagViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.tags.view.settings",{url:"/settings",templateUrl:"app/tools/tag/view/view.settings.html"}).state("main.tools.tags.view.chat",{url:"/chat",templateUrl:"app/tools/tag/view/view.chat.html"}).state("main.tools.tags.view.mail",{url:"/mail",templateUrl:"app/tools/tag/view/view.mail.html"}).state("main.tools.tags.view.fax",{url:"/fax",templateUrl:"app/tools/tag/view/view.fax.html"}).state("main.tools.tags.view.sms",{
-url:"/sms",templateUrl:"app/tools/tag/view/view.sms.html"}).state("main.tools.tags.view.contacts",{url:"/contacts",templateUrl:"app/tools/tag/view/view.contacts.html"})}]),angular.module("xCallyShuttleApp").controller("TemplateListCtrl",["$scope","Template","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"templates.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/tools/templates/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.templates.list",{url:"/list",templateUrl:"app/tools/template/list/list.html",controller:"TemplateListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Template",["$resource",function(a){return a("/api/templates/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.templates",{url:"/templates",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:56}}})}]),angular.module("xCallyShuttleApp").controller("TemplateViewCtrl",["$scope","$rootScope","$http","$translate","$stateParams","xAlert","Template","templateVariable","Variable",function(a,b,c,d,e,f,g,h,i){a.initItem=function(){CKEDITOR.plugins.addExternal("richparams","/assets/plugins/ckeditor-richparams/"),a.options={language:b.language,allowedContent:!0,entities:!1,skin:"office2013",contentsCss:"/assets/css/global/richparams.css",extraPlugins:"richparams,autogrow",autoGrow_minHeight:450,richparams:h,disableNativeSpellChecker:!1,toolbar:[{name:"clipboard",items:["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Table","HorizontalRule","SpecialChar"]},{name:"tools",items:["Maximize"]},{name:"document",items:["Source"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote"]},{name:"styles",items:["Styles","Format"]},"/",{name:"motion",items:["voice","chat","mail"]}]},a.form={},a.item={},a.item=g.get({id:e.id})},a.updateItem=function(){return g.update(a.item).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.templates.view",{url:"/view/:id",templateUrl:"app/tools/template/view/view.html",controller:"TemplateViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.templates.view.settings",{url:"/settings",templateUrl:"app/tools/template/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("TemplateWizardCtrl",["$scope","$rootScope","$location","$http","WizardHandler","xAlert","Template","templateVariable",function(a,b,c,d,e,f,g,h){a.initWizard=function(){CKEDITOR.plugins.addExternal("richparams","/assets/plugins/ckeditor-richparams/"),a.options={language:b.language,allowedContent:!0,entities:!1,skin:"office2013",contentsCss:"/assets/css/global/richparams.css",extraPlugins:"richparams,autogrow",autoGrow_minHeight:450,disableNativeSpellChecker:!1,richparams:h,toolbar:[{name:"clipboard",items:["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Table","HorizontalRule","SpecialChar"]},{name:"tools",items:["Maximize"]},{name:"document",items:["Source"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote"]},{name:"styles",items:["Styles","Format"]},"/",{name:"motion",items:["voice","chat","mail"]}]},a.item={},a.form={}},a.exitValidation=function(a){return a},a.createItem=function(){return g.save({name:a.item.name,description:a.item.description,subject:a.item.subject||null,html:a.item.html||null,text:a.item.text||null}).$promise.then(function(){c.path("/tools/templates/list")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.templates.wizard",{url:"/wizard",templateUrl:"app/tools/template/wizard/wizard.html",controller:"TemplateWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools",{url:"/tools",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:13}}})}]),angular.module("xCallyShuttleApp").controller("TriggerListCtrl",["$scope","$http","$translate","Modal","xAlert","Trigger","gridOptions",function(a,b,c,d,e,f,g){a.onText="On",a.offText="Off",a.isActive=!0,a.size="mini",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initView=function(){var b={exporterCsvFilename:"Triggers.csv",columnDefs:[{name:"name"},{name:"description"},{name:"channel"},{name:"status",cellTemplate:'<div class="centered-uigrid-td"><input data-ng-change="grid.appScope.updateItem(row.entity)", bs-switch ng-model="row.entity.status" type="checkbox" switch-active="{{ grid.appScope.isActive }}" switch-on-text="{{ grid.appScope.onText }}" switch-off-text="{{ grid.appScope.offText }}" switch-on-color="{{ grid.appScope.onColor }}" switch-off-color="{{ grid.appScope.offColor }}" switch-animate="{{ grid.appScope.animate }}" switch-size="{{ grid.appScope.size }}" switch-label="{{ grid.appScope.label }}" switch-icon="{{ grid.appScope.icon }}" switch-radio-off="{{ grid.appScope.radioOff }}" switch-label-width="{{ grid.appScope.labelWidth }}" switch-handle-width="{{ grid.appScope.handleWidth }}"></div>',width:100,enableFiltering:!1},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/tools/triggers/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=g.gridOptions(f,b,a)},a.updateItem=function(a){return f.update({id:a.id},a).$promise.then(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.triggers.list",{url:"/list",templateUrl:"app/tools/trigger/list/list.html",controller:"TriggerListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Trigger",["$resource",function(a){return a("/api/triggers/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.triggers",{url:"/triggers",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:50}}})}]),angular.module("xCallyShuttleApp").controller("TriggerViewCtrl",["$scope","$stateParams","$http","$translate","xAlert","triggers","Trigger","$location",function(a,b,c,d,e,f,g,h){a.$triggers=f,a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.forms={general:{}},a.addCondition=function(b){a.trigger[b].push({field:"",operator:"",value:""})},a.removeCondition=function(b,c){a.trigger[b].splice(c,1)},a.addAction=function(){a.trigger.Actions.push({action:"",data1:"",data2:"",data3:"",data4:"",data5:""})},a.resetActionData=function(a){a.data1="",a.data2="",a.data3="",a.data4="",a.data5=""},a.removeAction=function(b){a.trigger.Actions.splice(b,1)},a.initView=function(){return g.get({id:b.id}).$promise.then(function(b){a.trigger=b})["catch"](function(a){e.error(a),h.path("/tools/triggers/list")})},a.updateTrigger=function(){return g.update({id:b.id},a.trigger).$promise.then(function(){e.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),e.error(a)})},a.exitValidation=function(b){return!(!b||!a.trigger.All.length&&!a.trigger.Any.length||!a.trigger.Actions.length)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.triggers.view",{url:"/view/:id",templateUrl:"app/tools/trigger/view/view.html",controller:"TriggerViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}}).state("main.tools.triggers.view.settings",{url:"/settings",templateUrl:"app/tools/trigger/view/view.settings.html"}).state("main.tools.triggers.view.routes",{url:"/routes",templateUrl:"app/tools/trigger/view/view.routes.html"}).state("main.tools.triggers.view.application",{url:"/application",templateUrl:"app/tools/trigger/view/view.application.html"})}]),angular.module("xCallyShuttleApp").controller("TriggerWizardCtrl",["$scope","$http","$location","xAlert","triggers","WizardHandler","Trigger",function(a,b,c,d,e,f,g){a.$triggers=e,a.statusSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.tempData={voice:{},mail:{},chat:{},fax:{}},a.item={All:[],Any:[],Actions:[]},a.forms={general:void 0,settings:void 0},a.addCondition=function(b){a.item[b].push({field:"",operator:"",value:""})},a.removeCondition=function(b,c){a.item[b].splice(c,1)},a.addAction=function(){a.item.Actions.push({action:"",data1:"",data2:"",data3:"",data4:"",data5:""})},a.resetActionData=function(a){a.data1="",a.data2="",a.data3="",a.data4="",a.data5=""},a.removeAction=function(b){a.item.Actions.splice(b,1)},a.$watch("item.channel",function(b,c){c&&(a.tempData[c].All=_.clone(a.item.All,!0),a.tempData[c].Any=_.clone(a.item.Any,!0),a.tempData[c].Actions=_.clone(a.item.Actions,!0)),a.item.All=a.tempData[b].All?a.tempData[b].All:[],a.item.Any=a.tempData[b].Any?a.tempData[b].Any:[],a.item.Actions=a.tempData[b].Actions?a.tempData[b].Actions:[]},!0),a.item.channel="voice",a.createItem=function(){return g.save(a.item).$promise.then(function(){c.path("/tools/triggers/list")})["catch"](function(a){console.error(a),d.error(a)})},a.next=function(){f.wizard().next()},a.previous=function(){f.wizard().previous()},a.exitValidation=function(a){return a},a.exitSettingsValidation=function(b){return!(!b||!a.item.All.length&&!a.item.Any.length||!a.item.Actions.length)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.triggers.wizard",{url:"/wizard",templateUrl:"app/tools/trigger/wizard/wizard.html",controller:"TriggerWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("TrunkListCtrl",["$scope","Trunk","gridOptions","xAlert","$translate","socket",function(a,b,c,d,e,f){function g(){f.socket.on("trunk:update",function(b){var c=_.find(a.gridOptions.data,{name:b.name});c&&(c.status=b.status,c.peerstatus=b.peerstatus)})}a.isActive=!0,a.size="mini",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initView=function(){var d={exporterCsvFilename:"Trunks.csv",columnDefs:[{name:"name"},{name:"active",cellTemplate:'<div class="centered-uigrid-td"><input data-ng-change="grid.appScope.updateItem(row.entity)", bs-switch ng-model="row.entity.active" type="checkbox" switch-active="{{ grid.appScope.isActive }}" switch-on-text="{{ \'APPLICATION_YES\' | translate }}" switch-off-text="{{ \'APPLICATION_NO\' | translate }}" switch-on-color="{{ grid.appScope.onColor }}" switch-off-color="{{ grid.appScope.offColor }}" switch-animate="{{ grid.appScope.animate }}" switch-size="{{ grid.appScope.size }}" switch-label="{{ grid.appScope.label }}" switch-icon="{{ grid.appScope.icon }}" switch-radio-off="{{ grid.appScope.radioOff }}" switch-label-width="{{ grid.appScope.labelWidth }}" switch-handle-width="{{ grid.appScope.handleWidth }}"></div>'},{name:"host"},{name:"description"},{name:"status",cellTemplate:'<div class="centered-uigrid-td" data-ng-if="row.entity.active && row.entity.registry && row.entity.status">{{row.entity.status}}</div>'},{name:"peerstatus",cellTemplate:'<div class="centered-uigrid-td" data-ng-if="row.entity.active && row.entity.peerstatus">{{row.entity.peerstatus}}</div>'},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/tools/trunks/view/{{row.entity.name}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.name)"}]}]};a.gridOptions=c.gridOptions(b,d,a,null,null,null,g)},a.updateItem=function(a){return b.update({id:a.name},a).$promise.then(function(){d.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.trunks.list",{url:"/list",templateUrl:"app/tools/trunk/list/list.html",controller:"TrunkListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Trunk",["$resource",function(a){return a("/api/trunks/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.trunks",{url:"/trunks",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:52}}})}]),angular.module("xCallyShuttleApp").controller("TrunkViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","socket","$location","Trunk","VoiceContext",function(a,b,c,d,e,f,g,h,i){a.activeSwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.initView=function(){return h.get({id:e.id}).$promise.then(function(b){b.nat=b.nat?b.nat.split(","):[],b.allow=b.allow?b.allow.split(";"):[],b.insecure=b.insecure?b.insecure.split(","):[],b.transport=b.transport?b.transport.split(","):[],a.trunk=b}).then(function(){f.socket.on("trunk:update",function(b){a.trunk.name===b.name&&(a.trunk.status=b.status)})})["catch"](function(a){console.error(a),g.path("/tools/trunks/list")})},a.updateTrunk=function(){""===a.trunk.password&&delete a.trunk.password;var b=angular.copy(a.trunk);return b.nat=b.nat.join(","),b.allow=b.allow.join(";"),b.insecure=b.insecure.join(","),b.transport=b.transport.join(","),h.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){c.error(a)})},a.getContexts=function(){return i.get().$promise.then(function(b){a.voiceContexts=b.rows})["catch"](function(a){c.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.trunks.view",{url:"/view/:id",templateUrl:"app/tools/trunk/view/view.html",controller:"TrunkViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.trunks.view.settings",{url:"/settings",templateUrl:"app/tools/trunk/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("TrunkWizardCtrl",["$scope","WizardHandler","$location","xAlert","Trunk",function(a,b,c,d,e){a.initWizard=function(){a.forms={},a.item={context:"from-voip-provider"}},a.next=function(){b.wizard().next()},a.previous=function(){b.wizard().previous()},a.exitValidation=function(a){return a},a.createItem=function(){return a.item.fromuser=a.item.defaultuser,a.item.fromdomain=a.item.host,e.save(a.item).$promise.then(function(){c.path("/tools/trunks/list")})["catch"](function(a){d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.trunks.wizard",{url:"/wizard",templateUrl:"app/tools/trunk/wizard/wizard.html",controller:"TrunkWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("VariableListCtrl",["$scope","$uibModal","Variable","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"variables.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/tools/variables/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/tools/variable/list/list.create.modal.html",controller:"VariableListCreateCtrl"});c.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("VariableListCreateCtrl",["$scope","$translate","$uibModalInstance","Variable","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.variables.list",{url:"/list",templateUrl:"app/tools/variable/list/list.html",controller:"VariableListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Variable",["$resource",function(a){return a("/api/variables/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.variables",{url:"/variables",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:54}}})}]),angular.module("xCallyShuttleApp").controller("VariableViewCtrl",["$scope","$translate","$stateParams","xAlert","Variable",function(a,b,c,d,e){a.getVariable=function(){return e.get({id:c.id}).$promise.then(function(b){a.variable=b})["catch"](function(a){d.error(a)})},a.updateVariable=function(){return e.update({id:c.id},a.variable).$promise.then(function(){d.show(b.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.variables.view",{url:"/view/:id",templateUrl:"app/tools/variable/view/view.html",controller:"VariableViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.variables.view.settings",{url:"/settings",templateUrl:"app/tools/variable/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("YourdashboardListCloneModalCtrl",["$scope","$uibModalInstance",function(a,b){a.forms={dashboard:void 0},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("YourdashboardListCreateModalCtrl",["$scope","$uibModalInstance",function(a,b){a.forms={dashboard:void 0},a.item={},a.ok=function(){a.item.model=JSON.stringify({title:a.item.name}),b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("YourdashboardListCtrl",["$scope","$http","$translate","xAlert","Modal","$uibModal","$log","YourDashboard","gridOptions",function(a,b,c,d,e,f,g,h,i){a.initView=function(){var b={exporterCsvFilename:"voice_contexts.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:125,buttons:[{"class":"green",href:"/tools/yourdashboards/show/{{row.entity.id}}",name:"view"},{"class":"blue-hoki",href:"/tools/yourdashboards/view/{{row.entity.id}}/settings",name:"settings"},{"class":"{{row.entity.defaultEntry ? 'red-sunglo disabled' : 'red-sunglo'}}",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"},{"class":"purple",name:"clone",onClick:"grid.appScope.clone(row.entity.id)"}]}]};a.gridOptions=i.gridOptions(h,b,a)},a.create=function(){var b=f.open({animation:!0,templateUrl:"app/tools/yourdashboard/list/create.modal.html",controller:"YourdashboardListCreateModalCtrl"});b.result.then(function(b){return h.save(b).$promise.then(function(){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),a.gridOptions.getPage()})["catch"](function(a){console.error(a),d.error(a)})},function(){g.info("Modal dismissed at: "+new Date)})},a.clone=function(b){var e=f.open({animation:!0,templateUrl:"app/tools/yourdashboard/list/clone.modal.html",controller:"YourdashboardListCloneModalCtrl"});e.result.then(function(e){return h.save({id:b,controller:"clone"},e).$promise.then(function(){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),a.gridOptions.getPage()})["catch"](function(a){console.error(a),d.error(a)})},function(){g.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.yourdashboards.list",{url:"/list",templateUrl:"app/tools/yourdashboard/list/list.html",controller:"YourdashboardListCtrl",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:59}}})}]),angular.module("xCallyShuttleApp").controller("LeaveEditedDashboardModalCtrl",["$scope","$uibModalInstance",function(a,b){a.close=function(){b.close()},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("YourdashboardShowCtrl",["$scope","$rootScope","localStorageService","xAlert","$translate","Auth","$stateParams","$location","$uibModal","$log","YourDashboard",function(a,b,c,d,e,f,g,h,i,j,k){function l(a){var b,c;if(!a)return 0;for(a=a.toString(),b=c=a.length;b--;){var d=a[b].charCodeAt();d>=56320&&57343>=d&&b--,d>127&&2047>=d?c++:d>2047&&65535>=d&&(c+=2)}return c}a.Auth=f,a.editMode=!1,a.getDashboard=function(){return k.get({id:g.id}).$promise.then(function(b){!b[f.getRole()]&&h.path("/landing");var c={name:"dashboard",structure:"4-8",enableconfirmdelete:!0,maximizable:!0,collapsible:!0};b.model=JSON.parse(b.model||'{"title":"Dashboard"}'),b.editable=!(!f.isAdmin()||!b.editable),a.dashboard=_.merge(c,b)})["catch"](function(a){h.path("/tools/yourdashboards/list")})},a.$on("$locationChangeStart",function(b,c,d){if(a.editMode){b.preventDefault();var e=i.open({animation:!0,templateUrl:"app/tools/yourdashboard/show/leaveEditedDashboard.modal.html",controller:"LeaveEditedDashboardModalCtrl"});e.result.then(function(b){a.editMode=!1;var d=location.protocol+"//"+location.host;h.path(c.replace(d,""))},function(){j.info("Modal dismissed at: "+new Date)})}});var m=function(c,f,h){var i=angular.copy(a.dashboard);return i.name=a.dashboard.model.title,i.model=JSON.stringify(i.model),l(i.model)<=64e3?k.update({id:g.id},i).$promise.then(function(){d.show(e.instant("MESSAGE_DASHBOARD_SAVED")+"!","success"),a.editMode=!1})["catch"](function(b){d.error(b),i.model=JSON.parse(i.model),i.name="dashboard",a.dashboard=i}):(d.show(e.instant("MESSAGE_DASHBOARD_TOO_BIG")+"!","warning"),void b.$broadcast("adfToggleEditMode"))};a.$on("adfDashboardChanged",m),a.$on("adfIsEditMode",function(){a.editMode=!0}),a.$on("destroy",function(){console.log("main dashboard")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.yourdashboards.show",{url:"/show/:id",templateUrl:"app/tools/yourdashboard/show/show.html",controller:"YourdashboardShowCtrl",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:2}}})}]),angular.module("xCallyShuttleApp").controller("YourdashboardViewCtrl",["$scope","$rootScope","xAlert","$translate","$stateParams","$location","YourDashboard",function(a,b,c,d,e,f,g){a.radioSwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.getDashboard=function(){return g.get({id:e.id}).$promise.then(function(b){delete b.model,a.dashboard=b})["catch"](function(){f.path("/tools/yourdashboards/list")})},a.updateDashboard=function(){var b=angular.copy(a.dashboard);return g.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(d){c.error(d),a.dashboard=b})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.yourdashboards.view",{url:"/view/:id",templateUrl:"app/tools/yourdashboard/view/view.html",controller:"YourdashboardViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]},data:{permissions:{only:["admin","user"],redirectTo:"landing",id:59}}}).state("main.tools.yourdashboards.view.settings",{url:"/settings",templateUrl:"app/tools/yourdashboard/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("YourDashboard",["$resource",function(a){return a("/api/dashboards/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.yourdashboards",{url:"/yourdashboards",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ZendeskListCtrl",["$scope","ZendeskAccount","gridOptions","xAlert","$translate",function(a,b,c,d,e){a.initView=function(){var d={exporterCsvFilename:"zendesk_account.csv",columnDefs:[{name:"name",displayName:"APPLICATION_NAME"},{name:"username"},{name:"remoteUri",displayName:"APPLICATION_URI"},{name:"action",buttons:[{"class":"blue-hoki",href:"/zendesk/view/{{row.entity.id}}/account",name:"profile"},{"class":"green-jungle",name:"check",onClick:"grid.appScope.checkAccount(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.checkAccount=function(a){return b.check({id:a}).$promise.then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.list",{url:"/list",templateUrl:"app/zendesk/list/list.html",controller:"ZendeskListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.view.configurations",{url:"/configurations",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ZendeskViewConfigurationListCtrl",["$scope","$stateParams","$translate","gridOptions","ZendeskConfiguration","$uibModal",function(a,b,c,d,e,f){a.initView=function(){var c={exporterCsvFilename:"zendesk_configurations.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/zendesk/view/{{row.entity.AccountId}}/configurations/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(e,c,a,{accountId:b.id})},a.createItem=function(){var b=f.open({animation:!0,templateUrl:"app/zendesk/view/configuration/list/create.modal.html",controller:"ZendeskCreateConfigurationCtrl"});b.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("ZendeskCreateConfigurationCtrl",["$scope","$translate","$uibModalInstance","ZendeskConfiguration","xAlert","$stateParams","channel",function(a,b,c,d,e,f,g){a.form={},a.item={},a.channels=g,a.item.channel="voice",a.item.type="Queue",a.save=function(){return d.save({accountId:f.id},a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.view.configurations.list",{url:"/list",templateUrl:"app/zendesk/view/configuration/list/list.html",controller:"ZendeskViewConfigurationListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ZendeskViewConfigurationViewCtrl",["$scope","$stateParams","$filter","$translate","socket","ZendeskConfiguration","xAlert","variable","Variable","ZendeskAccount","Tag","ZendeskField",function(a,b,c,d,e,f,g,h,i,j,k,l){a.$on("$destroy",function(){e.unsyncUpdates("zendesk_field")}),a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:300,scrollInertia:0},a.fieldType=[{type:"string",title:"String"},{type:"variable",title:"Variable"},{type:"customVariable",title:"Custom Variable"}],a.descFieldType=[{type:"string",title:"String"},{type:"keyValue",title:"Key Value"}],a.groupVariableByGroup=function(a){switch(a.group){case"voice_queue":return"Voice: Queue";case"voice_outbound":return"Voice: Outbound";default:return"Other"}},a.initView=function(){a.configurationName="",a.subjectConfig=[],a.descriptionConfig=[],a.fieldConfig=[],a.selectedTags={tags:[]},a.variables=h},a.getConfiguration=function(){return f.get({accountId:b.id,id:b.configurationId}).$promise.then(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,a.selectedTags={tags:_.map(b.Tags,function(a){return a.id})},e.socket.on("zendesk_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})})["catch"](function(a){g.error(a)})},a.getCustomVariables=function(){return i.get().$promise.then(function(b){a.customVariables=b.rows})["catch"](function(a){g.error(a)})},a.getFields=function(){return j.fields({id:b.id}).$promise.then(function(b){a.accountFields=c("zendesk")(b)})["catch"](function(a){g.error(a)})},a.getTags=function(){return k.get().$promise.then(function(b){a.tags=b.rows})["catch"](function(a){g.error(a)})},a.addItem=function(c){var d={};switch(c){case"subject":case"description":d={type:"string",content:""};break;case"field":d={content:""}}return f.save({accountId:b.id,id:b.configurationId,controller:c},d).$promise.then(function(b){switch(c){case"subject":a.subjectConfig.push(b);break;case"description":a.descriptionConfig.push(b);break;case"field":a.fieldConfig.push(b)}})["catch"](function(a){g.error(a)})},a.changeType=function(b){"variable"===b.type?(b.content="",b.variableName=""):"string"===b.type?(b.VariableId=null,b.variableName=""):"customVariable"===b.type&&(b.VariableId=null,b.content=""),a.updateField(b)},a.updateField=function(a){return l.update({accountId:b.id,configurationId:b.configurationId,id:a.id},a).$promise.then(function(){})["catch"](function(a){g.error(a)})},a.removeItem=function(a){return l["delete"]({accountId:b.id,configurationId:b.configurationId,id:a.id}).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){g.error(a)})},a.changeDescType=function(b){"keyValue"===b.type?(b.content="","string"===b.keyType?(b.VariableId=null,b.variableName=""):"variable"===b.keyType?(b.keyContent="",b.VariableId=null):"customVariable"===b.keyType&&(b.keyContent="",b.variableName="")):"string"===b.type&&(b.VariableId=null,b.variableName="",b.key="",b.keyContent=""),a.updateField(b)},a.changeFieldType=function(b){if(b.content="",b.variableName="",b.nameField="",b.VariableId=null,b.idField){var c=_.find(a.accountFields,"id",b.idField);c&&(c.system_field_options?(b.customField=!1,b.nameField=c.title.toLowerCase()):b.customField=!0)}a.updateField(b)},a.updateTags=function(){return f.update({accountId:b.id,
-id:b.configurationId,controller:"tags"},a.selectedTags.tags).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE")+".","success")})["catch"](function(a){g.error(a)})},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"id",b);return c?c.system_field_options?c.system_field_options:null:void 0}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.view.configurations.view",{url:"/view/:configurationId",templateUrl:"app/zendesk/view/configuration/view/view.html",controller:"ZendeskViewConfigurationViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ZendeskViewCtrl",["$scope","$stateParams","$translate","xAlert","Modal","ZendeskAccount",function(a,b,c,d,e,f){a.initView=function(){return f.get({id:b.id}).$promise.then(function(b){a.account=b})["catch"](function(a){d.error(a)})},a.updateItem=function(){return f.update({id:b.id},a.account).$promise.then(function(){d.show(c.instant("MESSAGE_WELL_DONE")+".","success")})["catch"](function(a){d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.view",{url:"/view/:id",templateUrl:"app/zendesk/view/view.html",controller:"ZendeskViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.zendesk.view.account",{url:"/account",templateUrl:"app/zendesk/view/view.account.html"})}]),angular.module("xCallyShuttleApp").controller("ZendeskWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler","ZendeskAccount",function(a,b,c,d,e,f,g){a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={},a.item.authType="password",a.item.serverUrl=c.protocol()+"://"+location.host},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){return g.save(a.item).$promise.then(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/zendesk/list")})["catch"](function(a){e.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.wizard",{url:"/wizard",templateUrl:"app/zendesk/wizard/wizard.html",controller:"ZendeskWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("ZendeskAccount",["$resource",function(a){return a("/api/zendesk/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"},fields:{params:{controller:"fields"},isArray:!0},check:{params:{controller:"check"}}})}]).factory("ZendeskConfiguration",["$resource",function(a){return a("/api/zendesk/accounts/:accountId/configurations/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]).factory("ZendeskField",["$resource",function(a){return a("/api/zendesk/accounts/:accountId/configurations/:configurationId/fields/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk",{url:"/zendesk",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("Auth",["$location","$rootScope","$http","User","$cookieStore","$q","localStorageService",function(a,b,c,d,e,f,g){var h={};return e.get("token")&&(h=d.me()),{login:function(a,i){var j=i||angular.noop,k=f.defer();return c.post("/auth/local",{name:a.name,password:a.password,remember:a.remember}).success(function(a){return e.put("role",a.role),e.put("token",a.token),e.put("userId",a.userId),g.set("loggedIn",!0),h=d.me({},function(){b.$broadcast("login")}),k.resolve(a),j()}).error(function(a){return this.logout(),k.reject(a),j(a)}.bind(this)),k.promise},recover:function(a,b){var d=b||angular.noop,e=f.defer();return c.post("/auth/local/recover",{email:a.email}).success(function(a){return e.resolve(a),d()}).error(function(a){return e.reject(a),d(a)}.bind(this)),e.promise},reset:function(a,b){var d=b||angular.noop,e=f.defer();return c.post("/auth/local/reset/"+a.token,{password:a.password}).success(function(a){return e.resolve(a),d()}).error(function(a){return e.reject(a),d(a)}.bind(this)),e.promise},loginWithToken:function(a,c,f){e.put("role",f),e.put("token",a),e.put("userId",c),h=d.me({},function(){b.$broadcast("login")})},logout:function(){e.remove("role"),e.remove("token"),e.remove("userId"),g.set("loggedIn"),h={},b.$broadcast("logout")},createUser:function(a,b){var c=b||angular.noop;return d.save(a,function(b){return e.put("token",b.token),h=d.me(),c(a)},function(a){return this.logout(),c(a)}.bind(this)).$promise},changePassword:function(a,b,c){var e=c||angular.noop;return d.changePassword({id:h.id},{oldPassword:a,newPassword:b},function(a){return e(null,a)},function(a){return e(a)}).$promise},getCurrentUser:function(){return h},isLoggedIn:function(){return h.hasOwnProperty("role")},isLoggedInAsync:function(a){h.hasOwnProperty("$promise")?h.$promise.then(function(){a(!0)})["catch"](function(){a(!1)}):a(h.hasOwnProperty("role")?!0:!1)},isAdmin:function(){return"admin"===(e.get("role")||h.role)},isUser:function(){return"user"===(e.get("role")||h.role)},isAgent:function(){return"agent"===(e.get("role")||h.role)},getRole:function(){return h.role},getToken:function(){return e.get("token")}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderAccountEmail",["$compile","$timeout","MailAccount","xAlert","Template",function(a,b,c,d,e){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/accountEmail/actionBuilder.html",compile:function(f){function g(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var h,i;return h=f.contents().remove(),function(f,j){f.randomName=g(),b(function(){return c.get().$promise.then(function(a){return _.forEach(a.rows,function(a){a.id=String(a.id)}),f.accounts=a,e.get().$promise}).then(function(a){_.forEach(a.rows,function(a){a.id=String(a.id)}),f.templates=a.rows})["catch"](function(a){d.error(a)})}),i||(i=a(h)),j.append(i(f,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderAccountSms",["$compile","$timeout","SmsAccount","xAlert",function(a,b,c,d){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/accountSms/actionBuilder.html",compile:function(e){function f(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var g,h;return g=e.contents().remove(),function(e,i){e.randomName=f(),b(function(){return c.get().$promise.then(function(a){_.forEach(a.rows,function(a){a.id=String(a.id)}),e.accounts=a})["catch"](function(a){d.error(a)})}),h||(h=a(g)),i.append(h(e,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderAccountTemplate",["$compile","xAlert","$http","$timeout","Template","MailAccount",function(a,b,c,d,e,f){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/accountTemplate/actionBuilder.html",compile:function(c){function g(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var h,i;return h=c.contents().remove(),function(c,j){c.randomName=g(),d(function(){return e.get().$promise.then(function(a){_.forEach(a.rows,function(a){a.id=String(a.id)}),c.templates=a}).then(function(){return f.get()}).then(function(a){c.accounts=a})["catch"](function(a){b.error(a)})}),i||(i=a(h)),j.append(i(c,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderClose",["$compile",function(a){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/close/actionBuilder.html",compile:function(b){function c(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var d,e;return d=b.contents().remove(),function(b,f){b.randomName=c(),e||(e=a(d)),f.append(e(b,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderEmail",["$compile","xAlert","$timeout","Template",function(a,b,c,d){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/email/actionBuilder.html",compile:function(e){function f(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var g,h;return g=e.contents().remove(),function(e,i){e.randomName=f(),c(function(){return d.get().$promise.then(function(a){_.forEach(a.rows,function(a){a.id=String(a.id)}),e.templates=a.rows})["catch"](function(a){b.error(a)})}),h||(h=a(g)),i.append(h(e,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderForward",["$compile",function(a){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/forward/actionBuilder.html",compile:function(b){function c(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var d,e;return d=b.contents().remove(),function(b,f){b.randomName=c(),e||(e=a(d)),f.append(e(b,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderHttp",["$compile",function(a){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/http/actionBuilder.html",compile:function(b){function c(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var d,e;return d=b.contents().remove(),function(b,f){b.randomName=c(),b.methods=["GET","POST"],e||(e=a(d)),f.append(e(b,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderIntegration",["$compile","xAlert","$http","$timeout","Integration","$translate","ZendeskAccount","DeskAccount","SalesforceAccount","FreshdeskAccount","SugarcrmAccount",function(a,b,c,d,e,f,g,h,i,j,k){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/integration/actionBuilder.html",compile:function(c){function f(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var l,m;return l=c.contents().remove(),function(c,n){c.randomName=f(),d(function(){return e.get({active:1}).$promise.then(function(a){_.remove(a.rows,function(a){return"iframe"===a.state}),c.integrations=a.rows,c.element.data1&&o()})["catch"](function(a){b.error(a)})});var o=function(){var a;switch(c.element.data1){case"zendesk":a=g;break;case"desk":a=h;break;case"salesforce":a=i;break;case"freshdesk":a=j;break;case"sugarcrm":a=k}return a?a.get().$promise.then(function(a){c.accounts=a.rows,c.element.data2&&p()})["catch"](function(a){b.error(a)}):void 0},p=function(){c.configurations=_.find(c.accounts,{id:Number(c.element.data2)}).Configurations};c.changeIntegration=function(){c.element.data2="",o()},c.changeAccount=function(){c.element.data3="",p()},m||(m=a(l)),n.append(m(c,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderJscripty",["$compile","xAlert","$http","$timeout","Template","$translate","JscriptyProject",function(a,b,c,d,e,f,g){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/jscripty/actionBuilder.html",compile:function(c){var e,f;return e=c.contents().remove(),function(c,h){function i(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}c.randomName=i(),d(function(){return g.get().$promise.then(function(a){_.forEach(a.rows,function(a){a.id=String(a.id)}),c.projects=a.rows})["catch"](function(a){b.error(a)})}),f||(f=a(e)),h.append(f(c,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderMotionBar",["$compile","xAlert","$http","$timeout","Template",function(a,b,c,d,e){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/motionbar/actionBuilder.html",compile:function(c){var f,g;return f=c.contents().remove(),function(c,h){function i(){return e.get().$promise.then(function(a){_.forEach(a.rows,function(a){a.id=String(a.id)}),c.templates=a.rows})["catch"](function(a){b.error(a)})}function j(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}c.randomName=j(),c.motionActions=[{name:"Popup",value:"0"},{name:"URL",value:"1"},{name:"Windows App",value:"2"}],c.changeMode=function(){c.element.data2="",c.element.data3="",i()},d(function(){return i()}),g||(g=a(f)),h.append(g(c,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderStatus",["$compile",function(a){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/status/actionBuilder.html",compile:function(b){var c,d;return c=b.contents().remove(),function(b,e){function f(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}b.randomName=f(),b.states=[{name:"APPLICATION_STATUS_NEW",value:"NEW"},{name:"APPLICATION_STATUS_OPEN",value:"OPEN"},{name:"APPLICATION_STATUS_PENDING",value:"PENDING"},{name:"APPLICATION_STATUS_CLOSED",value:"CLOSED"}],d||(d=a(c)),e.append(d(b,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderTag",["$compile","xAlert","$http","$timeout","Tag",function(a,b,c,d,e){return{restrict:"E",scope:{myElement:"=element",form:"="},templateUrl:"components/directives/action/tag/actionBuilder.html",compile:function(c){function f(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var g,h;return g=c.contents().remove(),function(c,i){console.log("myElement",c.myElement),c.randomName=f(),c.data={tags:c.myElement.data1?c.myElement.data1.split(";"):[]},c.$watch("data.tags",function(a){c.myElement.data1=a.join(";")}),d(function(){return e.get().$promise.then(function(a){c.tags=a.rows})["catch"](function(a){b.error(a)})}),h||(h=a(g)),i.append(h(c,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderTemplate",["$compile","xAlert","$timeout","Template",function(a,b,c,d){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/template/actionBuilder.html",compile:function(e){function f(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var g,h;return g=e.contents().remove(),function(e,i){e.randomName=f(),c(function(){return d.get().$promise.then(function(a){_.forEach(a.rows,function(a){a.id=String(a.id)}),e.templates=a.rows})["catch"](function(a){b.error(a)})}),h||(h=a(g)),i.append(h(e,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderUrlForward",["$compile",function(a){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/urlforward/actionBuilder.html",compile:function(b){function c(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var d,e;return d=b.contents().remove(),function(b,f){b.randomName=c(),b.types=[{name:"HTTP GET",value:"GET"},{name:"HTTP POST",value:"POST"}],e||(e=a(d)),f.append(e(b,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("conditionBuilder",["$compile","$timeout","$translate","xAlert",function(a,b,c,d){return{restrict:"E",scope:{element:"=",serviceindex:"=",service:"=",form:"="},templateUrl:"components/directives/condition/conditionBuilder.html",compile:function(e){var f,g;return f=e.contents().remove(),function(e,h){function i(a){var b=_.find(e.service.services[e.serviceindex].conditions,{value:a});if(b)if(e.elementType=b.type,b.arr)e.values=b.arr;else if(b.resource)return b.resource.get(b.params||{}).$promise.then(function(a){e.values=_.map(a.rows,function(a){return{name:a[b.resName||b.resValue],value:a[b.resValue]}})})["catch"](function(a){d.show(c.instant(a.message),"danger")})}function j(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}e._=_,e.randomName=j(),b(function(){e.element.field&&i(e.element.field)}),e.checkCondition=function(a){e.element.value="",e.element.operator="",i(a)},g||(g=a(f)),h.append(g(e,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").factory("xNotificationLicense",["Notification","$rootScope","$location",function(a,b,c){return{show:function(d){var e=b.$new();return e["class"]="alert-warning",e.icon="fa fa-exclamation-triangle",e.more=function(){c.path("/setting/license/view")},new a({delay:d,templateUrl:"components/factories/xNotificationLicense/xNotificationLicense.html",scope:e})}}}]),angular.module("xCallyShuttleApp").filter("secToTime",[function(){return function(a){return new Date(1970,0,1).setSeconds(a)}}]),angular.module("xCallyShuttleApp").controller("FooterController",["$scope","Setting",function(a,b){a.year=moment().year(),a.$on("$includeContentLoaded",function(){Layout.initFooter()}),a.initFooter=function(){return b.get({controller:"info"}).$promise.then(function(b){a.info=b})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("HeaderController",["$scope","$rootScope","$location","$state","$http","$interval","$notification","Auth","xAlert","socket","xNotificationLicense","toastr","localStorageService","Agent","SmsReport","MailReport","OpenChannelReport","ChatReport","ChatRoom","xNotification","$timeout","$translate","$window","User","Pause","Action","FaxReport","List","MailAccount","ChatWebsite","FaxAccount","SmsAccount","OpenChannelAccount","ReportAgent","$uibModal","$log","ReportDial",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K){function L(a,b,c){return null===b&&(b=50),null===c&&(c="..."),a&&a.length>b?a.substring(0,b-c.length)+c:a}function M(b){var c,d="reason";switch(b){case"mail":c=p;break;case"chat":c=r;break;case"fax":c=A;break;case"sms":c=o;break;case"agent":c=H,d="lastevent";break;case"dial":c=K,d="dialstatus";break;case"openchannel":c=q;break;default:return}return c.get({limit:10,order:"updatedAt DESC"}).$promise.then(function(c){_.forEach(c.rows,function(a){if(a[d])switch(a[d].toLowerCase()){case"answer":case"connect":case"complete":a.status="taken";break;case"answered_elsewhere":a.status="taken_elsewhere";break;case"called":a.status="lost";break;case"busy":a.status="busy";break;case"rejected":a.status="rejected";break;case"cancel":case"abandoned":a.status="abandoned"}}),a.agentNotifications[b].rows=c.rows,j.socket.on("report_"+b+":save",function(c){c.status="none",a.agentNotifications[b].rows.unshift(c),"agent"!==b&&"dial"!==b&&(a.agentNotifications[b].timeout[c.id]=setTimeout(function(){clearTimeout(a.agentNotifications[b].timeout[c.id]),_.find(a.agentNotifications[b].rows,{id:c.id}).status="lost",angular.element(document.getElementById("header_"+b+"_notification_bar")).hasClass("open")||a.agentNotifications[b]["new"]++,delete a.agentNotifications[b].timeout[c.id]},1e3*c.timeslot))}),j.socket.on("report_"+b+":update",function(c){if("agent"===b){var e=_.find(a.activeCalls,{id:c.id});e&&(c.agentcomplete||c.agentringnoanswer||c.agentdump)?_.remove(a.activeCalls,{id:c.id}):!c.agentconnectAt||c.agentcomplete||c.agentringnoanswer||c.agentdump||a.activeCalls.push(c)}var f=_.find(a.agentNotifications[b].rows,{id:c.id});if(f&&("agent"!==b&&"dial"!==b&&a.agentNotifications[b].timeout[c.id]&&(clearTimeout(a.agentNotifications[b].timeout[c.id]),delete a.agentNotifications[b].timeout[c.id]),c[d])){switch(c[d].toLowerCase()){case"answer":case"connect":case"complete":c.status="taken";break;case"answered_elsewhere":c.status="taken_elsewhere",angular.element(document.getElementById("header_"+b+"_notification_bar")).hasClass("open")||a.agentNotifications.chat["new"]++;break;case"busy":c.status="busy",angular.element(document.getElementById("header_"+b+"_notification_bar")).hasClass("open")||a.agentNotifications[b]["new"]++;break;case"rejected":c.status="rejected";break;case"cancel":case"abandoned":c.status="abandoned",angular.element(document.getElementById("header_"+b+"_notification_bar")).hasClass("open")||a.agentNotifications[b]["new"]++}_.merge(f,c)}})})["catch"](function(a){i.error(a)})}function N(){return a.headerAgent=h.getCurrentUser(),a.readyTimer=1e3*moment().unix(),y.get().$promise.then(function(b){a.headerPauses=b.rows,j.syncUpdates("pause",a.headerPauses)}).then(function(){j.socket.on("agent:save",function(b){a.headerAgent.id===b.id&&(_.merge(a.headerAgent,b),b.voicePause&&b.mailPause&&b.chatPause&&b.faxPause&&b.smsPause&&b.openchannelPause||(a.readyTimer=1e3*moment().unix()))})})["finally"](function(){h.getCurrentUser().loginInPause&&!m.get("loggedIn")&&a.headerPause("pause")})["catch"](function(a){console.log("Error synchronizing agent status:",a)})}function O(){return H.get({id:"active",controller:"calls"}).$promise.then(function(b){a.activeCalls=b.rows})["catch"](function(a){i.error(a)})}a.moment=moment,$(document).on("click",".tabbed-dropdown",function(a){a.stopPropagation()}),a.license.token!==a.license.token2&&(h.isAdmin()||h.isUser())&&f(function(){"main.setting.license.view"!==d.current.name&&k.show(3e4)},3e4),a.openRoom=function(b,c){var d=_.find(a.workspaces,{id:b,type:c});if(d)d.active=!0;else{var e;switch(c){case"mailRoom":e="icon-envelope";break;case"chatRoom":e="fa fa-users";break;case"faxRoom":e="fa fa-fax";break;case"smsRoom":e="glyphicon glyphicon-comment";break;case"openchannelRoom":e="icon-globe"}a.workspaces.push({id:b,type:c,"class":e,active:!0})}},a.toggleSidebar=function(){b.settings.layout.pageSidebarClosed=!b.settings.layout.pageSidebarClosed,m.set("sidebarClosed",b.settings.layout.pageSidebarClosed)},a.chooseContact=function(b){var c=I.open({animation:!0,templateUrl:"app/main/chooseContact.modal.html",controller:"ChooseContactModalCtrl",resolve:{data:function(){return{type:"detail",phone:b,mobile:b}}}});c.result.then(function(c){c?a.openContactTab(c):a.newContact({calleridnum:b})},function(){J.info("Modal dismissed at: "+new Date)})},a.loadNotifications=function(b){if(!a.busyLoad[b].end){a.busyLoad[b].busy=!0;var c,d="reason";switch(b){case"mail":c=p;break;case"chat":c=r;break;case"fax":c=A;break;case"sms":c=o;break;case"agent":c=H,d="lastevent";break;case"dial":c=K,d="dialstatus";break;case"openchannel":c=q;break;default:return}return c.get({limit:10,offset:a.agentNotifications[b].rows.length,order:"updatedAt DESC"}).$promise.then(function(c){c.rows.length?(_.forEach(c.rows,function(a){if(a[d])switch(a[d].toLowerCase()){case"answer":case"connect":case"complete":a.status="taken";break;case"answered_elsewhere":a.status="taken_elsewhere";break;case"called":a.status="lost";break;case"busy":a.status="busy";break;case"rejected":a.status="rejected";break;case"abandoned":a.status="abandoned"}}),a.agentNotifications[b].rows=a.agentNotifications[b].rows.concat(c.rows)):a.busyLoad[b].end=!0,a.busyLoad[b].busy=!1})["catch"](function(a){i.error(a)})}},a.headerPause=function(b,c,d){return z.save({name:b,agent:a.headerAgent.id,type:c||"DEFAULT PAUSE",data4:c||"DEFAULT PAUSE",channel:d||"all"}).$promise.then(function(){i.show(v.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){i.error(a)})},h.isAgent()&&(N(),a.agentNotifications={mail:{rows:[],"new":0,timeout:{}},chat:{rows:[],"new":0,timeout:{}},fax:{rows:[],"new":0,timeout:{}},sms:{rows:[],"new":0,timeout:{}},agent:{rows:[],"new":0},dial:{rows:[],"new":0},openchannel:{rows:[],"new":0}},a.busyLoad={mail:{busy:!1,end:!1},chat:{busy:!1,end:!1},fax:{busy:!1,end:!1},sms:{busy:!1,end:!1},agent:{busy:!1,end:!1},dial:{busy:!1,end:!1},openchannel:{busy:!1,end:!1}},O(),M("agent"),M("dial"),a.license.mail&&M("mail"),a.license.chat&&M("chat"),a.license.fax&&M("fax"),a.license.messaging&&M("sms"),a.license.openchannel&&M("openchannel")),j.socket.on("user_has_chat_room:save",function(b){var c;return s.get({id:Number(b.ChatRoomId)}).$promise.then(function(b){console.log("chatRoom",b),c=b;var d=_.find(a.workspaces,{id:Number(c.id),type:"chatRoom"});d?d.name=a.getFullnames(c):a.workspaces.push({id:c.id,name:a.getFullnames(c),type:"chatRoom","class":"icon-bubble",unread:1})})["catch"](function(a){console.error(a)})}),j.socket.on("chat_message:save",function(b){var c;if(b.UserId!==h.getCurrentUser().id){var d=_.find(a.workspaces,{id:Number(b.ChatRoomId),type:"chatRoom"});if(!d)return s.get({id:Number(b.ChatRoomId)}).$promise.then(function(b){c=b,a.workspaces.push({id:c.id,name:a.getFullnames(b),type:"chatRoom","class":"icon-bubble",unread:1})})["catch"](function(a){console.error(a)})}});var P=function(){return w.Notification},Q=function(){b.settings.layout.onFocus=!0},R=function(){b.settings.layout.onFocus=!1};w.onfocus=Q,w.onblur=R,a.getFullnames=function(a){var b=_.map(a.Users,"fullname");return a.ChatVisitor&&b.unshift(a.ChatVisitor.fullname),_.without(b,h.getCurrentUser().fullname).join(", ")},a.openContact=function(b,c,d){if(d&&"<unknown>"!==d){var e,f;switch(b){case"mail":e=C,f={email:d};break;case"chat":e=D,f={email:d};break;case"fax":e=E,f={fax:d};break;case"sms":e=F,f={mobile:d};break;default:return}return e.get({id:c}).$promise.then(function(a){return a.ListId?B.save({listId:a.ListId,controller:"contacts"},f).$promise:null}).then(function(b){if(b){var c=_.find(a.workspaces,{contactID:b.id});c?c.active=!0:a.workspaces.push({active:!0,"class":"icon-user",contactID:b.id,name:b.email,type:"contact"})}else i.show(v.instant("MESSAGE_NO_LIST_CONFIGURED"),"info")})["catch"](function(a){console.error(a)})}},a.initHeader=function(){"agent"===h.getCurrentUser().role&&(j.socket.on("report_chat:save",function(a){P&&!b.settings.layout.onFocus&&g("CHAT CHANNEL",{icon:"assets/images/media/channels/chat64.png",body:"NEW Incoming Chat Visitor!",delay:1e3*a.timeslot});var c="<b>"+v.instant("APPLICATION_FROM")+"</b>: "+a.visitorname+"<br><b>"+v.instant("APPLICATION_EMAIL")+"</b>: "+a.visitoremail;"queue"===a.application&&(c+="<br><b>"+v.instant("APPLICATION_QUEUE")+"</b>: "+a.queuename),t.show(v.instant("APPLICATION_NEW_CHAT_REQUEST"),c,"chat",1e3*a.timeslot,function(){return r.get({id:a.id,controller1:"accept",controller2:a.uniqueid}).$promise.then(function(){i.show("Chat properly assigned","success")})["catch"](function(a){switch(a.status){case 504:i.show(v.instant("MESSAGE_CHAT_ALREADY_MANAGED"),"info");break;default:i.error(a)}})},function(){return r.get({id:a.id,controller1:"reject"}).$promise.then(function(){i.show("Chat properly rejected","success")})["catch"](function(a){i.error(a)})})}),j.socket.on("report_mail:save",function(c){var d=_.find(a.workspaces,{id:c.roomid,type:"mailRoom"});if(!d){var e="<b>"+v.instant("APPLICATION_ACCOUNT")+"</b>: "+c.accountname+"<br> <b>"+v.instant("APPLICATION_FROM")+"</b>: "+c.from+"<br> <b>"+v.instant("APPLICATION_SUBJECT")+"</b>: "+(L(c.subject,30,"...")||"No subject");"queue"===c.application&&(e+="<br><b>"+v.instant("APPLICATION_QUEUE")+"</b>: "+c.queuename),t.show(v.instant("APPLICATION_NEW_MAIL_REQUEST"),e,"mail",1e3*c.timeslot,function(){return p.get({id:c.id,controller1:"accept",controller2:c.uniqueid}).$promise.then(function(){var b=_.find(a.workspaces,{id:c.roomid,type:"mailRoom"});b?b.active=!0:a.workspaces.push({id:c.roomid,name:c.subject||"No subject",type:"mailRoom","class":"icon-envelope",active:!0,unread:0})})["catch"](function(a){switch(a.status){case 504:i.show(v.instant("MESSAGE_MAIL_ALREADY_MANAGED"),"info");break;default:i.error(a)}})},function(){return p.get({id:c.id,controller1:"reject"}).$promise["catch"](function(a){i.error(a)})}),P&&!b.settings.layout.onFocus?g("MAIL CHANNEL",{icon:"assets/images/media/channels/mail64.png",body:"NEW Incoming Mail Message!",delay:1e3*c.timeslot}):console.log("Notification API not supported in your browser")}}),j.socket.on("report_sms:save",function(b){var c="<b>"+v.instant("APPLICATION_ACCOUNT")+"</b>: "+b.accountname+"<br> <b>"+v.instant("APPLICATION_FROM")+"</b>: "+b.from;"queue"===b.application&&(c+="<br><b>"+v.instant("APPLICATION_QUEUE")+"</b>: "+b.queuename),t.show(v.instant("APPLICATION_NEW_SMS_REQUEST"),c,"sms",1e3*b.timeslot,function(){return o.get({id:b.id,controller1:"accept",controller2:b.uniqueid}).$promise.then(function(){var c=_.find(a.workspaces,{id:b.roomid,type:"smsRoom"});c?c.active=!0:a.workspaces.push({id:b.roomid,name:b.from,type:"smsRoom","class":"glyphicon glyphicon-comment",active:!0})})["catch"](function(a){switch(a.status){case 504:i.show(v.instant("MESSAGE_SMS_ALREADY_MANAGED"),"info");break;default:i.error(a)}})},function(){return o.get({id:b.id,controller1:"reject"}).$promise.then(function(){i.show("SMS properly rejected","success")})["catch"](function(a){i.error(a)})}),P?g("SMS CHANNEL",{icon:"assets/images/media/channels/chat64.png",body:"NEW Incoming SMS Message!",delay:1e3*b.timeslot}):console.log("Notification API not supported in your browser")}),j.socket.on("report_openchannel:save",function(b){var c="<b>"+v.instant("APPLICATION_ACCOUNT")+"</b>: "+b.accountname+"<br> <b>"+v.instant("APPLICATION_FROM")+"</b>: "+b.from;"queue"===b.application&&(c+="<br><b>"+v.instant("APPLICATION_QUEUE")+"</b>: "+b.queuename),t.show(v.instant("APPLICATION_NEW_MESSAGE"),c,"openchannel",1e3*b.timeslot,function(){return q.get({id:b.id,controller1:"accept",controller2:b.uniqueid}).$promise.then(function(){var c=_.find(a.workspaces,{id:b.roomid,type:"openchannelRoom"});c?c.active=!0:a.workspaces.push({id:b.roomid,name:b.from,type:"openchannelRoom","class":"icon-globe",active:!0})})["catch"](function(a){switch(a.status){case 504:i.show(v.instant("MESSAGE_ALREADY_MANAGED"),"info");break;default:i.error(a)}})},function(){return q.get({id:b.id,controller1:"reject"}).$promise.then(function(){i.show("Message properly rejected","success")})["catch"](function(a){i.error(a)})}),P?g("OPEN CHANNEL",{icon:"assets/images/media/channels/chat64.png",body:"NEW Incoming Message!",delay:1e3*b.timeslot}):console.log("Notification API not supported in your browser")}),j.socket.on("report_fax:save",function(c){var d=_.find(a.workspaces,{id:c.roomid,type:"faxRoom"});if(!d){var e="<b>"+v.instant("APPLICATION_ACCOUNT")+"</b>: "+c.accountname+"<br>               <b>"+v.instant("APPLICATION_PHONE")+"</b>: "+c.from;"queue"===c.application&&(e+="<br><b>"+v.instant("APPLICATION_QUEUE")+"</b>: "+c.queuename),t.show(v.instant("APPLICATION_NEW_FAX_REQUEST"),e,"fax",1e3*c.timeslot,function(){return A.get({id:c.id,controller1:"accept",controller2:c.uniqueid}).$promise.then(function(){var b=_.find(a.workspaces,{id:c.roomid,type:"faxRoom"});b?b.active=!0:a.workspaces.push({id:c.roomid,name:c.from,type:"faxRoom","class":"fa fa-fax",active:!0,unread:0})})["catch"](function(a){switch(a.status){case 504:i.show(v.instant("MESSAGE_FAX_ALREADY_MANAGED"),"info");break;default:i.error(a)}})},function(){return A.get({id:c.id,controller1:"reject"}).$promise["catch"](function(a){i.err(a)})}),P&&!b.settings.layout.onFocus?g("FAX CHANNEL",{icon:"assets/images/media/channels/telephone124.png",body:"NEW Incoming Fax Message!",delay:1e3*c.timeslot}):console.log("Notification API not supported in your browser")}}));
-},a.logout=function(){return e.get("/auth/local/logout").success(function(){h.logout(),c.path("/login")}).error(function(a){console.error(a)})},a.isActive=function(a){return a===c.path()},a.$on("$destroy",function(){console.log("header $destroy"),j.unsyncUpdates("pause"),j.unsyncUpdates("agent"),j.unsyncUpdates("report_chat"),j.unsyncUpdates("report_mail"),j.unsyncUpdates("report_fax"),j.unsyncUpdates("report_sms"),j.unsyncUpdates("report_openchannel"),j.unsyncUpdates("user_has_chat_room"),j.unsyncUpdates("chat_message")})}]),angular.module("xCallyShuttleApp").factory("Modal",["$rootScope","$uibModal",function(a,b){function c(c,d){var e=a.$new();return c=c||{},d=d||"modal-default",angular.extend(e,c),b.open({templateUrl:"components/modal/delete.html",windowClass:d,scope:e})}return{confirm:{"delete":function(a){return a=a||angular.noop,function(){var b,d=Array.prototype.slice.call(arguments),e=d.shift();b=c({modal:{dismissable:!0,title:"Confirm Delete",html:"<p>Are you sure you want to delete"+(e?"<strong> "+e+"</strong>":" selected items")+"?</p>",buttons:[{classes:"btn red",text:"Delete",click:function(a){b.close(a)}},{classes:"btn default",text:"Cancel",click:function(a){b.dismiss(a)}}]}},"over-topbar center"),b.result.then(function(b){a.apply(b,d)})}}}}}]),angular.module("xCallyShuttleApp").service("application",function(){var a={applications:[{type:null,name:"APPLICATION_QUEUE",value:"Queue"},{type:null,name:"APPLICATION_PLAYBACK",value:"Playback"},{type:null,name:"Dial",value:"Dial"},{type:"internalDial",name:"APPLICATION_INTERNAL_DIAL",value:"Dial"},{type:"externalDial",name:"APPLICATION_EXTERNAL_DIAL",value:"Dial"},{type:"RingGroup",name:"Ring Group",value:"Dial"},{type:null,name:"Cally-Square Project",value:"AGI"},{type:null,name:"GoTo",value:"Goto"},{type:null,name:"Hangup",value:"Hangup"},{type:null,name:"Set",value:"Set"},{type:"custom",name:"Custom",value:"custom"},{type:null,name:"APPLICATION_VOICEMAIL",value:"Voicemail"}],queueOptions:[{value:"C",name:"APPLICATION_QUEUE_OPTION_C"},{value:"c",name:"APPLICATION_QUEUE_OPTION_c"},{value:"d",name:"APPLICATION_QUEUE_OPTION_d"},{value:"F",name:"APPLICATION_QUEUE_OPTION_F"},{value:"h",name:"APPLICATION_QUEUE_OPTION_h"},{value:"H",name:"APPLICATION_QUEUE_OPTION_H"},{value:"n",name:"APPLICATION_QUEUE_OPTION_n"},{value:"i",name:"APPLICATION_QUEUE_OPTION_i"},{value:"I",name:"APPLICATION_QUEUE_OPTION_I"},{value:"r",name:"APPLICATION_QUEUE_OPTION_r"},{value:"R",name:"APPLICATION_QUEUE_OPTION_R"},{value:"t",name:"APPLICATION_QUEUE_OPTION_t"},{value:"T",name:"APPLICATION_QUEUE_OPTION_T"},{value:"w",name:"APPLICATION_QUEUE_OPTION_w"},{value:"W",name:"APPLICATION_QUEUE_OPTION_W"},{value:"k",name:"APPLICATION_QUEUE_OPTION_k"},{value:"K",name:"APPLICATION_QUEUE_OPTION_K"},{value:"x",name:"APPLICATION_QUEUE_OPTION_x"},{value:"X",name:"APPLICATION_QUEUE_OPTION_X"}],audioOptions:[{value:"skip",name:"APPLICATION_PLAYBACK_OPTION_SKIP"},{value:"noanswer",name:"APPLICATION_PLAYBACK_OPTION_NOANSWER"},{value:"j",name:"APPLICATION_PLAYBACK_OPTION_J"},{value:"say",name:"APPLICATION_PLAYBACK_OPTION_SAY"}],hangupCauses:[{value:"",name:"--"},{value:"1",name:"APPLICATION_HANGUP_CAUSE_1"},{value:"16",name:"APPLICATION_HANGUP_CAUSE_16"},{value:"17",name:"APPLICATION_HANGUP_CAUSE_17"},{value:"18",name:"APPLICATION_HANGUP_CAUSE_18"},{value:"21",name:"APPLICATION_HANGUP_CAUSE_21"},{value:"22",name:"APPLICATION_HANGUP_CAUSE_22"},{value:"27",name:"APPLICATION_HANGUP_CAUSE_27"},{value:"38",name:"APPLICATION_HANGUP_CAUSE_38"},{value:"41",name:"APPLICATION_HANGUP_CAUSE_41"}],intTypes:[{value:"always",name:"APPLICATION_ALWAYS"},{value:"custom",name:"APPLICATION_CUSTOM"},{value:"list",name:"APPLICATION_FROM_LIST"}],checkUnderscore:function(a){return 0===a.indexOf("_")?a:"_"+a}};return{application:a}}),angular.module("xCallyShuttleApp").service("automations",function(){var a={mail:{conditions:[{name:"APPLICATION_STATUS",value:"status",type:"select",arr:[{name:"APPLICATION_STATUS_NEW",value:"NEW"},{name:"APPLICATION_STATUS_OPEN",value:"OPEN"},{name:"APPLICATION_STATUS_CLOSED",value:"CLOSED"},{name:"APPLICATION_STATUS_PENDING",value:"PENDING"}],operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_HOURS_SINCE_CREATED",value:"createdAt",type:"input",operators:[{value:"greater_or_equal",name:"APPLICATION_GTE_TO"},{value:"less_or_equal",name:"APPLICATION_LTE_TO"},{value:"greater",name:"APPLICATION_GREATER_THAN"},{value:"less",name:"APPLICATION_LESS_THAN"}]}],actions:[{name:"APPLICATION_STATUS",value:"status"}]},chat:{conditions:[{name:"APPLICATION_STATUS",value:"status",type:"select",arr:[{name:"APPLICATION_STATUS_NEW",value:"NEW"},{name:"APPLICATION_STATUS_OPEN",value:"OPEN"},{name:"APPLICATION_STATUS_CLOSED",value:"CLOSED"},{name:"APPLICATION_STATUS_PENDING",value:"PENDING"}],operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_HOURS_SINCE_CREATED",value:"createdAt",type:"input",operators:[{value:"greater_or_equal",name:"APPLICATION_GTE_TO"},{value:"less_or_equal",name:"APPLICATION_LTE_TO"},{value:"greater",name:"APPLICATION_GREATER_THAN"},{value:"less",name:"APPLICATION_LESS_THAN"}]}],actions:[{name:"APPLICATION_STATUS",value:"status"}]},fax:{conditions:[{name:"APPLICATION_STATUS",value:"status",type:"select",arr:[{name:"APPLICATION_STATUS_NEW",value:"NEW"},{name:"APPLICATION_STATUS_OPEN",value:"OPEN"},{name:"APPLICATION_STATUS_CLOSED",value:"CLOSED"}],operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_HOURS_SINCE_CREATED",value:"createdAt",type:"input",operators:[{value:"greater_or_equal",name:"APPLICATION_GTE_TO"},{value:"less_or_equal",name:"APPLICATION_LTE_TO"},{value:"greater",name:"APPLICATION_GREATER_THAN"},{value:"less",name:"APPLICATION_LESS_THAN"}]}],actions:[{name:"APPLICATION_STATUS",value:"status"}]}},b=["mail","fax","chat"];return{services:a,channels:b}}),angular.module("xCallyShuttleApp").service("channel",function(){var a=[{name:"Voice",value:"voice"}];return a}),angular.module("xCallyShuttleApp").service("desk_com",function(){var a=[{id:"priority",label:"Priority",custom:!1,data:{choices:[1,2,3,4,5,6,7,8,9,10]}},{id:"status",label:"Status",custom:!1,data:{choices:["new","open","pending","resolved","closed"]}},{id:"type",label:"Type",custom:!1,data:{choices:["chat","twitter","email","qna","facebook","phone"]}}];return{fields:a}}),angular.module("xCallyShuttleApp").service("interval",function(){var a={months:[{value:"always",name:"APPLICATION_ALWAYS"},{value:"jan",name:"APPLICATION_JANUARY"},{value:"feb",name:"APPLICATION_FEBRUARY"},{value:"mar",name:"APPLICATION_MARCH"},{value:"apr",name:"APPLICATION_APRIL"},{value:"may",name:"APPLICATION_MAY"},{value:"jun",name:"APPLICATION_JUNE"},{value:"jul",name:"APPLICATION_JULY"},{value:"aug",name:"APPLICATION_AUGUST"},{value:"sep",name:"APPLICATION_SEPTEMBER"},{value:"oct",name:"APPLICATION_OCTOBER"},{value:"nov",name:"APPLICATION_NOVEMBER"},{value:"dec",name:"APPLICATION_DECEMBER"}],monthsNumber:[{value:"always",name:"APPLICATION_ALWAYS"},{value:"1",name:"APPLICATION_JANUARY"},{value:"2",name:"APPLICATION_FEBRUARY"},{value:"3",name:"APPLICATION_MARCH"},{value:"4",name:"APPLICATION_APRIL"},{value:"5",name:"APPLICATION_MAY"},{value:"6",name:"APPLICATION_JUNE"},{value:"7",name:"APPLICATION_JULY"},{value:"8",name:"APPLICATION_AUGUST"},{value:"9",name:"APPLICATION_SEPTEMBER"},{value:"10",name:"APPLICATION_OCTOBER"},{value:"11",name:"APPLICATION_NOVEMBER"},{value:"12",name:"APPLICATION_DECEMBER"}],daysOfWeek:[{value:"always",name:"APPLICATION_ALWAYS"},{value:"mon",name:"APPLICATION_MONDAY"},{value:"tue",name:"APPLICATION_TUESDAY"},{value:"wed",name:"APPLICATION_WEDNESDAY"},{value:"thu",name:"APPLICATION_THURSDAY"},{value:"fri",name:"APPLICATION_FRIDAY"},{value:"sat",name:"APPLICATION_SATURDAY"},{value:"sun",name:"APPLICATION_SUNDAY"}],daysOfMonth:["always",1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]};return{interval:a}}),angular.module("xCallyShuttleApp").service("report",["ReportAgent","ReportCall","ReportMailSession","ReportMember","ReportQueue","ReportIntegration","ReportChatSession","ReportSmsSession","Contact","Recording","ReportSquare","ReportSquareDetail","User","ReportFaxSession","MailRoom","MailMessage","FaxRoom","FaxMessage","ChatRoom","ChatMessage","SmsRoom","SmsMessage","OpenChannelRoom","OpenChannelMessage","ReportOpenChannelSession","ReportMotionDialer","UserHasVoiceQueue",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A){var B=[{value:"users",resource:m,channel:"General"},{value:"cm_contacts",resource:i,channel:"General"},{value:"report_integration_history",resource:f,channel:"General"},{value:"report_agent_history",resource:a,channel:"Voice"},{value:"report_call_history",resource:b,channel:"Voice"},{value:"report_member_history",resource:d,channel:"Voice"},{value:"report_queue_history",resource:e,channel:"Voice"},{value:"voice_recordings",resource:j,channel:"Voice"},{value:"report_square_history",resource:k,channel:"Voice"},{value:"report_square_details_history",resource:l,channel:"Voice"},{value:"report_tdial",resource:z,channel:"Voice"},{value:"report_chat_session_history",resource:g,channel:"Chat"},{value:"chat_rooms",resource:s,channel:"Chat"},{value:"chat_messages",resource:t,channel:"Chat"},{value:"report_mail_session_history",resource:c,channel:"Mail"},{value:"mail_rooms",resource:o,channel:"Mail"},{value:"mail_messages",resource:p,channel:"Mail"},{value:"report_fax_session_history",resource:n,channel:"Fax"},{value:"fax_rooms",resource:q,channel:"Fax"},{value:"fax_messages",resource:r,channel:"Fax"},{value:"report_sms_session_history",resource:h,channel:"Sms"},{value:"sms_rooms",resource:u,channel:"Sms"},{value:"sms_messages",resource:v,channel:"Sms"},{value:"report_openchannel_session_history",resource:y,channel:"Open Channel"},{value:"openchannel_rooms",resource:w,channel:"Open Channel"},{value:"openchannel_messages",resource:x,channel:"Open Channel"},{value:"user_has_voice_queues",resource:A,channel:"Voice"}];return{tables:B}}]),angular.module("xCallyShuttleApp").service("strategies",function(){return["beepall","roundrobin","rrmemory"]}),angular.module("xCallyShuttleApp").service("triggers",["VoiceQueue","Route",function(a,b){var c={voice:{conditions:[{name:"APPLICATION_QUEUE",value:"queue",type:"select",resource:a,resValue:"name",operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_CALL_STATUS",value:"lastevent",type:"select",arr:[{name:"ringing",value:"called"},{name:"up",value:"connect"},{name:"hangup",value:"complete"},{name:"rejected",value:"rejected"},{name:"abandoned",value:"abandoned"}],operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_OUTBOUND_ROUTE",value:"routeId",type:"select",resource:b,resValue:"id",resName:"exten",params:{type:"outbound"},operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]}],actions:[{name:"APPLICATION_CONTACT_MANAGER",value:"contactManager"},{name:"APPLICATION_INTEGRATIONS",value:"integration",propertyField:"select"},{name:"APPLICATION_MOTION_BAR",value:"motionbar",propertyField:"select"},{name:"APPLICATION_JSCRIPTY",value:"jscripty",propertyField:"select"},{name:"APPLICATION_URL_FORWARD",value:"urlForward"}]},mail:{conditions:[{name:"APPLICATION_FROM",value:"from",type:"input",operators:[{value:"contains",name:"APPLICATION_CONTAINS"},{value:"not_contains",name:"APPLICATION_NOT_CONTAINS"}]},{name:"APPLICATION_TO",value:"to",type:"input",operators:[{value:"contains",name:"APPLICATION_CONTAINS"},{value:"not_contains",name:"APPLICATION_NOT_CONTAINS"}]},{name:"APPLICATION_CC",value:"cc",type:"input",operators:[{value:"contains",name:"APPLICATION_CONTAINS"},{value:"not_contains",name:"APPLICATION_NOT_CONTAINS"}]},{name:"APPLICATION_SUBJECT",value:"subject",type:"input",operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"},{value:"contains",name:"APPLICATION_CONTAINS"},{value:"not_contains",name:"APPLICATION_NOT_CONTAINS"}]},{name:"APPLICATION_BODY",value:"text",type:"input",operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"},{value:"contains",name:"APPLICATION_CONTAINS"},{value:"not_contains",name:"APPLICATION_NOT_CONTAINS"}]}],actions:[{name:"APPLICATION_TEMPLATE",value:"template"},{name:"APPLICATION_EMAIL",value:"email"},{name:"APPLICATION_EMAIL_FROM_ACCOUNT",value:"accountEmail"},{name:"APPLICATION_SMS",value:"accountSms"},{name:"APPLICATION_FORWARD",value:"forward"},{name:"APPLICATION_TAG",value:"tag"},{name:"APPLICATION_HTTP_REQUEST",value:"http"},{name:"APPLICATION_CLOSE",value:"close"}]},chat:{conditions:[{name:"APPLICATION_NAME",value:"fullname",type:"input",operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_EMAIL",value:"email",type:"input",operators:[{value:"contains",name:"APPLICATION_CONTAINS"},{value:"not_contains",name:"APPLICATION_NOT_CONTAINS"}]}],actions:[{name:"APPLICATION_EMAIL_FROM_ACCOUNT",value:"accountEmail"},{name:"APPLICATION_SMS",value:"accountSms"},{name:"APPLICATION_TEMPLATE",value:"accountTemplate"},{name:"APPLICATION_TAG",value:"tag"},{name:"APPLICATION_HTTP_REQUEST",value:"http"},{name:"APPLICATION_CLOSE",value:"close"}]},sms:{conditions:[{name:"APPLICATION_FROM",value:"from",type:"input",operators:[{value:"contains",name:"APPLICATION_CONTAINS"},{value:"not_contains",name:"APPLICATION_NOT_CONTAINS"}]},{name:"APPLICATION_BODY",value:"body",type:"input",operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"},{value:"contains",name:"APPLICATION_CONTAINS"},{value:"not_contains",name:"APPLICATION_NOT_CONTAINS"}]}],actions:[{name:"APPLICATION_EMAIL_FROM_ACCOUNT",value:"accountEmail"},{name:"APPLICATION_SMS",value:"accountSms"},{name:"APPLICATION_TEMPLATE",value:"accountTemplate"},{name:"APPLICATION_TAG",value:"tag"},{name:"APPLICATION_HTTP_REQUEST",value:"http"},{name:"APPLICATION_CLOSE",value:"close"}]}},d=["voice","mail","chat","sms"];return{services:c,channels:d}}]),angular.module("xCallyShuttleApp").service("variable",function(){var a=[{title:"Unique ID",name:"uniqueid",group:"voice_queue"},{title:"Caller Number",name:"calleridnum",group:"voice_queue"},{title:"Caller Name",name:"calleridname",group:"voice_queue"},{title:"Queue",name:"queue",group:"voice_queue"},{title:"Called Number",name:"destcalleridnum",group:"voice_queue"},{title:"Called Name",name:"destcalleridname",group:"voice_queue"},{title:"Hold Time",name:"holdtime",group:"voice_queue"},{title:"Talk Time",name:"talktime",group:"voice_queue"},{title:"Connected Time",name:"agentconnectAt",group:"voice_queue"},{title:"Called Time",name:"agentcalledAt",group:"voice_queue"},{title:"DNID",name:"destexten",group:"voice_queue"},{title:"Complete Time",name:"agentcompleteAt",group:"voice_queue"},{title:"No Answer Time",name:"agentringnoanswerAt",group:"voice_queue"},{title:"Recording URL",name:"recordingURL",group:"voice_queue"},{title:"Unique ID",name:"uniqueid",group:"voice_outbound"},{title:"Caller Number",name:"calleridnum",group:"voice_outbound"},{title:"Caller Name",name:"calleridname",group:"voice_outbound"},{title:"Called Number",name:"destcalleridnum",group:"voice_outbound"},{title:"Called Name",name:"destcalleridname",group:"voice_outbound"},{title:"Start Time",name:"starttime",group:"voice_outbound"},{title:"Answer Time",name:"answertime",group:"voice_outbound"},{title:"Complete Time",name:"endtime",group:"voice_outbound"},{title:"Recording URL",name:"recordingURL",group:"voice_outbound"},{title:"Member Name",name:"membername",group:"voice_outbound"}];return a}),angular.module("xCallyShuttleApp").controller("SidebarController",["$scope","$rootScope","$resource","$location","Auth","Dashboard","Integration","xAlert","$stateParams","socket","$uibModal","Setting",function(a,b,c,d,e,f,g,h,i,j,k,l){a.Auth=e,a.$on("$includeContentLoaded",function(){Metronic.init(),Layout.initSidebar()}),a.getSidebarDashboards=function(){return f.get().$promise.then(function(a){b.dashboards=a.rows,j.syncUpdates("dashboard",b.dashboards)})["catch"](function(){h.show("Error loading your dashboards","danger")})},a.about=function(){k.open({animation:!0,size:"sm",templateUrl:"app/main/about.modal.html",controller:["$scope","$uibModalInstance",function(a,b){a.year=moment().year(),a.getInfo=function(){return l.get({controller:"info"}).$promise.then(function(b){a.info=b})["catch"](function(a){console.error(a)})},a.close=function(){b.dismiss("cancel")}}]})},a.getSidebarIntegrations=function(){return e.isAdmin()||e.isAgent()||b.userModules[19]?g.get().$promise.then(function(b){a.integrations=b.rows,j.syncUpdates("integration",a.integrations)})["catch"](function(a){h.error(a)}):void 0},a.$on("sidebar $destroy",function(){console.log("destroy"),j.unsyncUpdates("dashboard"),j.unsyncUpdates("integration")})}]),angular.module("xCallyShuttleApp").factory("socket",["$rootScope","$window","socketFactory","Auth",function(a,b,c,d){var e=d.getCurrentUser(),f=io("",{query:"token="+d.getToken()+"&userId="+e.id+"&name="+e.name+"&role="+(e.role||"agent")+"&source=browser",path:"/socket.io-client"}),g=c({ioSocket:f});return a.$on("logout",function(){g&&(g.disconnect(!0),b.location.reload())}),{socket:g,syncUpdates:function(a,b,c){c=c||angular.noop,g.on(a+":save",function(a){var d=_.find(b,{id:a.id}),e=b.indexOf(d),f="created";d?(_.merge(b[e],a),f="updated"):b.unshift(a),c(f,a,b)}),g.on(a+":remove",function(a){var d="deleted";_.remove(b,{id:a.id}),c(d,a,b)})},unsyncUpdates:function(a){g.removeAllListeners(a+":save"),g.removeAllListeners(a+":update"),g.removeAllListeners(a+":remove")},syncUpdatesByAttributes:function(a,b,c,d){d=d||angular.noop,g.on(a+":save",function(a){var e=!0;if(_.forIn(b,function(b,c){return a[c]&&a[c]===b?!0:e=!1}),e){var f=_.find(c,{id:a.id}),g=c.indexOf(f),h="created";f?(_.merge(c[g],a),h="updated"):c.unshift(a),d(h,a,c)}}),g.on(a+":remove",function(a){var b="deleted";_.remove(c,{id:a.id}),d(b,a,c)})},syncMailMessageUpdates:function(a,b,c,d){d=d||angular.noop,g.on(a+":"+b+":save",function(a){var b=_.find(c,{id:a.id}),e=c.indexOf(b),f="created";b?(_.merge(c[e],a),f="updated"):c.unshift(a),d(f,a)}),g.on(a+":"+b+":remove",function(a){var b="deleted";_.remove(c,{id:a.id}),d(b,a,c)})},unsyncMailMessageUpdates:function(a,b){g.removeAllListeners(a+":"+b+":save"),g.removeAllListeners(a+":"+b+":remove")},syncFaxMessageUpdates:function(a,b,c,d){d=d||angular.noop,g.on(a+":"+b+":save",function(a){var b=_.find(c,{id:a.id}),e=c.indexOf(b),f="created";b?(_.merge(c[e],a),f="updated"):c.unshift(a),d(f,a)}),g.on(a+":"+b+":remove",function(a){var b="deleted";_.remove(c,{id:a.id}),d(b,a,c)})},unsyncFaxMessageUpdates:function(a,b){g.removeAllListeners(a+":"+b+":save"),g.removeAllListeners(a+":"+b+":remove")}}}]),function(a,b){angular.module("adf.widget.counter",["adf.provider"]).config(["dashboardProvider",function(a){a.widget("counter",{title:"Single Value",description:"Single Value for db results",templateUrl:"{widgetsPath}/counter/src/view.html",controller:"apiwidgetCounterViewCtrl",edit:{templateUrl:"{widgetsPath}/counter/src/edit.html",controller:"apiwidgetCounterEditCtrl"}})}]).service("apiServiceCounter",["Widget",function(a){return{get:function(b){return a.get({select:b.select,condition:encodeURIComponent(b.condition),table:b.report.replace("_history",""),controller:"counter"}).$promise.then(function(a){return a})["catch"](function(a){console.log(a)})}}}]).controller("apiwidgetCounterEditCtrl",["$scope","report",function(a,b){a.config.reportTables=b.tables,a.config.colors=[{name:"Grey",value:"grey"},{name:"Grey 2",value:"grey-cascade"},{name:"Grey 3",value:"grey-silver"},{name:"Grey 4",value:"grey-steel"},{name:"Grey 5",value:"grey-carrara"},{name:"Grey 6",value:"grey-gallery"},{name:"Blue",value:"blue"},{name:"Blue 2",value:"blue-hoki"},{name:"Blue 3",value:"blue-steel"},{name:"Blue 4",value:"blue-madison"},{name:"Blue 5",value:"blue-chambray"},{name:"Blue 6",value:"blue-ebonyclay"},{name:"Red",value:"red"},{name:"Red 2",value:"red-pink"},{name:"Red 3",value:"red-sunglo"},{name:"Red 4",value:"red-intense"},{name:"Red 5",value:"red-thunderbird"},{name:"Red 6",value:"red-flamingo"},{name:"Green",value:"green"},{name:"Green 2",value:"green-meadow"},{name:"Green 3",value:"green-seagreen"},{name:"Green 4",value:"green-turquoise"},{name:"Green 5",value:"green-haze"},{name:"Green 6",value:"green-jungle"},{name:"Purple",value:"purple"},{name:"Purple 2",value:"purple-plum"},{name:"Purple 3",value:"purple-medium"},{name:"Purple 4",value:"purple-studio"},{name:"Purple 5",value:"purple-wisteria"},{name:"Purple 6",value:"purple-seance"},{name:"Yellow",value:"yellow"},{name:"Yellow 2",value:"yellow-gold"},{name:"Yellow 3",value:"yellow-casablanca"},{name:"Yellow 4",value:"yellow-crusta"},{name:"Yellow 5",value:"yellow-lemon"},{name:"Yellow 6",value:"yellow-saffron"}],a.config.icons=[{name:"Talk bubbles",value:"fa-comments"},{name:"Bar Chart",value:"fa-bar-chart"},{name:"Shopping Cart",value:"fa-shopping-cart"},{name:"Globe",value:"fa-globe"},{name:"Volume Control Phone",value:"fa-volume-control-phone"},{name:"Comments",value:"fa-comments-o"},{name:"Commenting",value:"fa-commenting-o"},{name:"Coffee",value:"fa-coffee"},{name:"Clock",value:"fa-clock-o"},{name:"Envelope",value:"fa-envelope-o"},{name:"Hourglass",value:"fa-hourglass-half"},{name:"Percent",value:"fa-percent"}],a.config.select=a.config.select?a.config.select:"COUNT(*)",a.config.timeout=a.config.timeout>=5?a.config.timeout:5,a.config.color=a.config.color?a.config.color:"blue-madison",a.config.icon=a.config.icon?a.config.icon:"fa-comments",a.config.link=a.config.link?a.config.link:"#",a.config.linkText=a.config.linkText?a.config.linkText:"VIEW MORE"}]).controller("apiwidgetCounterViewCtrl",["$scope","$interval","apiServiceCounter",function(a,b,c){a.config.timeout=a.config.timeout>=5?a.config.timeout:5,a.config.condition=a.config.condition?a.config.condition:null,a.config.color=a.config.color?a.config.color:"blue-madison",a.config.icon=a.config.icon?a.config.icon:"fa-comments",a.config.link=a.config.link?a.config.link:"#",a.config.linkText=a.config.linkText?a.config.linkText:"VIEW MORE",a.counterApiCall=function(){a.config.report&&c.get(a.config).then(function(b){b?b.result&&b.result.length>1||_.keys(b.result[0]).length>1?(a.tooManyResults=!0,a.result=null):(a.tooManyResults=!1,null!==_.values(b.result[0])[0]?a.result=_.values(b.result[0])[0].toString():a.result="--"):a.result=null})},a.counterApiCall();var d=b(function(){a.counterApiCall()},1e3*parseInt(a.config.timeout));a.$on("$destroy",function(){b.cancel(d)})}]),angular.module("adf.widget.counter").run(["$templateCache",function(a){a.put("{widgetsPath}/counter/src/edit.html","<form role=form><div class=form-group><label for=select>Select</label> <input type=text class=form-control id=condition ng-model=config.select placeholder=Select></div><div class=form-group><label class=control-label>From</label><ui-select data-ng-model=config.report name=report theme=bootstrap><ui-select-match placeholder=From>{{'APPLICATION_'+$select.selected.value.toUpperCase() | translate}}</ui-select-match><ui-select-choices group-by=\"'channel'\" repeat=\"table.value as table in config.reportTables | filter: $select.search\"><div ng-bind-html=\"'APPLICATION_'+table.value.toUpperCase() | translate | highlight: $select.search\"></div></ui-select-choices></ui-select></div><div class=form-group><label for=condition>Where</label> <input type=text class=form-control id=condition ng-model=config.condition placeholder=Where></div><div class=form-group><label for=condition>{{'APPLICATION_REFRESH_TIMEOUT' | translate}}</label> <input type=number class=form-control id=timeout ng-model=config.timeout placeholder=\"{{'APPLICATION_REFRESH_TIMEOUT' | translate}}\" min=5></div><div class=form-group><label class=control-label>{{'APPLICATION_WIDGET_COLOR' | translate}}</label><ui-select data-ng-model=config.color name=color theme=bootstrap><ui-select-match placeholder=\"{{ 'APPLICATION_WIDGET_COLOR' | translate }}\"><div data-ng-class=\"'bg-'+$select.selected.value\">&nbsp;</div></ui-select-match><ui-select-choices repeat=\"color.value as color in config.colors | filter: $select.search\"><div data-ng-class=\"'bg-'+color.value\">&nbsp;</div></ui-select-choices></ui-select></div><div class=form-group><label class=control-label>{{'APPLICATION_WIDGET_ICON' | translate}}</label><ui-select data-ng-model=config.icon name=icon theme=bootstrap><ui-select-match placeholder=\"{{ 'APPLICATION_WIDGET_ICON' | translate }}\"><i class=fa ng-class=$select.selected.value></i></ui-select-match><ui-select-choices repeat=\"icon.value as icon in config.icons | filter: $select.search\"><i class=fa ng-class=icon.value></i></ui-select-choices></ui-select></div><div class=form-group><label for=condition>{{'APPLICATION_WIDGET_DETAILS' | translate}}</label> <input type=text class=form-control id=details ng-model=config.details maxlength=30 placeholder=\"{{'APPLICATION_WIDGET_DETAILS' | translate}}\"></div><div class=form-group><label for=condition>{{'APPLICATION_WIDGET_LINK' | translate}}</label> <input type=text class=form-control id=link ng-model=config.link placeholder=http://yourlink></div><div class=form-group><label for=condition>{{'APPLICATION_WIDGET_LINK_TEXT' | translate}}</label> <input type=text class=form-control id=linkText ng-model=config.linkText maxlength=30 placeholder=\"{{'APPLICATION_WIDGET_LINK_TEXT' | translate}}\"></div></form>"),a.put("{widgetsPath}/counter/src/view.html",'<div class=dashboard-stat ng-class=config.color ng-if=result><div class=visual><i class=fa ng-class=config.icon></i></div><div class=details><div class=number>{{result}}</div><div class=desc>{{config.details}}</div></div><a class=more href={{config.link}}>{{config.linkText}} <i class="m-icon-swapright m-icon-white"></i></a></div><div class="alert alert-danger" role=alert ng-if=!config.report><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_WIDGET_SELECT_REPORT\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=tooManyResults><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_TOO_MANY_RESULTS\' | translate}}</div><div class="alert alert-danger" role=alert ng-if="!result && !tooManyResults"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_QUERY_NOT_VALID\' | translate}}</div>')}])}(window),function(a,b){angular.module("adf.widget.pie-chart",["adf.provider"]).config(["dashboardProvider",function(a){a.widget("pie-chart",{title:"Pie-Chart",description:"Display a pie-chart starting from DB values",templateUrl:"{widgetsPath}/pie-chart/src/view.html",controller:"apiWidgetPieChartViewCtrl",edit:{templateUrl:"{widgetsPath}/pie-chart/src/edit.html",controller:"apiWidgetPieChartEditCtrl"}})}]).service("apiServicePieChart",["Widget",function(a){return{get:function(b){return a.get({condition:encodeURIComponent(b.condition),table:b.report.replace("_history",""),fields:b.fields,controller:"piechart"}).$promise.then(function(a){return a})["catch"](function(a){console.log(a)})}}}]).controller("apiWidgetPieChartEditCtrl",["$scope","report",function(a,b){function c(){return a.config.fields||(a.config.fields=[{column:"",alias:""}]),a.config.fields}a.config.reportTables=b.tables,a.config.timeout=a.config.timeout>=5?a.config.timeout:5,a.config.fields=a.config.fields?a.config.fields:[{column:"",alias:""}],a.addField=function(){c().push({})},a.removeField=function(a){c().splice(a,1)}}]).controller("apiWidgetPieChartViewCtrl",["$scope","$interval","apiServicePieChart",function(a,b,c){a.config.timeout=a.config.timeout>=5?a.config.timeout:5,a.pieChartApiCall=function(){a.config.report&&a.config.fields.length&&""!==a.config.fields[0].column&&""!==a.config.fields[0].alias&&c.get(a.config).then(function(b){if(b&&b.result&&1===b.result.length){a.labels=[],a.data=[];for(var c in b.result[0])a.labels.push(c),a.data.push(b.result[0][c])}else a.labels=[],a.data=[]})},a.pieChartApiCall();var d=b(function(){a.pieChartApiCall()},1e3*parseInt(a.config.timeout));a.$on("$destroy",function(){b.cancel(d)})}]),angular.module("adf.widget.pie-chart").run(["$templateCache",function(a){a.put("{widgetsPath}/pie-chart/src/edit.html","<form role=form><div class=form-group><label class=control-label>{{'APPLICATION_REPORT' | translate}}</label><ui-select data-ng-model=config.report name=report theme=bootstrap><ui-select-match placeholder=\"{{ 'APPLICATION_REPORT' | translate }}\">{{'APPLICATION_'+$select.selected.value.toUpperCase() | translate}}</ui-select-match><ui-select-choices group-by=\"'channel'\" repeat=\"table.value as table in config.reportTables | filter: $select.search\"><div ng-bind-html=\"'APPLICATION_'+table.value.toUpperCase() | translate | highlight: $select.search\"></div></ui-select-choices></ui-select></div><div><label class=control-label>{{'APPLICATION_FIELDS' | translate}}</label></div><div class=padding-bottom ng-repeat=\"field in config.fields\"><div class=form-group><div class=input-group><input type=text class=form-control ng-model=field.column> <span class=input-group-addon>as</span> <input type=text class=form-control ng-model=field.alias> <span class=input-group-btn ng-if=\"config.fields.length>1\"><button class=\"btn btn-danger\" type=button data-ng-click=removeField($index)><i class=\"fa fa-times\"></i> {{'APPLICATION_REMOVE' | translate}}</button></span></div></div></div><button type=button class=\"btn btn-sm green mbottom20\" ng-click=addField()><i class=\"fa fa-plus\"></i> {{'APPLICATION_ADD_FIELD' | translate}}</button><div class=form-group><label for=condition>{{'APPLICATION_CONDITION' | translate}}</label> <input type=text class=form-control id=condition ng-model=config.condition placeholder=\"{{'APPLICATION_CONDITION' | translate}}\"></div><div class=form-group><label for=condition>{{'APPLICATION_REFRESH_TIMEOUT' | translate}}</label> <input type=number class=form-control id=timeout ng-model=config.timeout placeholder=\"{{'APPLICATION_REFRESH_TIMEOUT' | translate}}\" min=5></div></form>"),a.put("{widgetsPath}/pie-chart/src/view.html",'<div ng-if=labels.length ng-style=config.style><canvas id=doughnut class="chart chart-doughnut" chart-data=data chart-labels=labels legend=true></canvas></div><div class="alert alert-danger" role=alert ng-if=!config.report><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_WIDGET_SELECT_REPORT\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=!labels.length><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_ENTER_VALID_CONDITION\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=!labels.length><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_ENTER_ONE_VALID_METRIC_AND_CHECK_OTHER\' | translate}}</div>')}])}(window),function(a,b){angular.module("adf.widget.table",["adf.provider"]).value("apiServiceUrlTable","/api/widgets/table").config(["dashboardProvider",function(a){a.widget("table",{title:"Table",description:"Show tabbed results from db",templateUrl:"{widgetsPath}/table/src/view.html",
-controller:"apiWidgetTableViewCtrl",edit:{templateUrl:"{widgetsPath}/table/src/edit.html",controller:"apiWidgetTableEditCtrl"}})}]).service("apiServiceTable",["$q","$http","apiServiceUrlTable",function(a,b,c){return{get:function(d){var e=a.defer();return b.get(c,{params:{condition:encodeURIComponent(d.condition),table:d.report,fields:d.fields}}).success(function(a){a?e.resolve(a):e.reject()}).error(function(a){console.log(a),e.reject()}),e.promise}}}]).controller("apiWidgetTableEditCtrl",["$scope",function(a){function b(){return a.config.fields||(a.config.fields=[{column:"",alias:""}]),a.config.fields}a.config.reportTables=[{name:"Agents",value:"agent"},{name:"Calls",value:"call"},{name:"Dials",value:"dial"},{name:"Members",value:"member"},{name:"Queues",value:"queue"}],a.config.timeout=a.config.timeout?a.config.timeout:1,a.config.height=a.config.height?a.config.height:350,a.config.fields=a.config.fields?a.config.fields:[{column:"",alias:""}],a.addField=function(){b().push({})},a.removeField=function(a){b().splice(a,1)}}]).controller("apiWidgetTableViewCtrl",["$scope","$interval","apiServiceTable",function(a,b,c){a.config.timeout=a.config.timeout?a.config.timeout:1,a.config.height=a.config.height?a.config.height:350,a.config.style={"max-height":a.config.height+"px",overflow:"scroll"},a.tableApiCall=function(){a.config.condition&&a.config.report&&a.config.fields.length&&""!==a.config.fields[0].column&&""!==a.config.fields[0].alias&&c.get(a.config).then(function(b){a.results=b})},a.tableApiCall();var d=b(function(){a.tableApiCall()},1e3*parseInt(a.config.timeout));a.$on("$destroy",function(){b.cancel(d)})}]),angular.module("adf.widget.table").run(["$templateCache",function(a){a.put("{widgetsPath}/table/src/edit.html",'<form role=form><div class=form-group><label class=control-label>{{\'APPLICATION_REPORT\' | translate}}</label><ui-select data-ng-model=config.report name=report theme=bootstrap><ui-select-match placeholder="{{ \'APPLICATION_REPORT\' | translate }}">{{$select.selected.name}}</ui-select-match><ui-select-choices repeat="report.value as report in config.reportTables | filter: $select.search"><div ng-bind-html="report.name | highlight: $select.search"></div></ui-select-choices></ui-select></div><div><label class=control-label>{{\'APPLICATION_METRICS\' | translate}}</label></div><div class=padding-bottom ng-repeat="field in config.fields"><div class=form-group><div class=input-group><input type=text class=form-control ng-model=field.column> <span class=input-group-addon>as</span> <input type=text class=form-control ng-model=field.alias> <span class=input-group-btn ng-if="config.fields.length>1"><button class="btn btn-danger" type=button data-ng-click=removeField($index)><i class="fa fa-times"></i> {{\'APPLICATION_REMOVE\' | translate}}</button></span></div></div></div><button type=button class="btn btn-sm green mbottom20" ng-click=addField()><i class="fa fa-plus"></i> {{\'APPLICATION_ADD_FIELD\' | translate}}</button><div class=form-group><label for=condition>{{\'APPLICATION_CONDITION\' | translate}}</label> <input type=text class=form-control id=condition ng-model=config.condition placeholder="{{\'APPLICATION_CONDITION\' | translate}}"></div><div class=form-group><label for=condition>{{\'APPLICATION_REFRESH_TIMEOUT\' | translate}}</label> <input type=number class=form-control id=timeout ng-model=config.timeout placeholder="{{\'APPLICATION_REFRESH_TIMEOUT\' | translate}}" min=1></div><div class=form-group><label for=condition>{{\'APPLICATION_WIDGET_MAX_HEIGHT\' | translate}}</label> <input type=number class=form-control id=height ng-model=config.height placeholder="{{\'APPLICATION_WIDGET_MAX_HEIGHT\' | translate}}" min=350></div></form>'),a.put("{widgetsPath}/table/src/view.html",'<div ng-if=results ng-style=config.style><table st-table=results class="table table-striped table-bordered table-hover"><div class=table-responsive><thead><tr><th colspan={{config.fields.length}}><div class=row><div class=col-md-6></div><div class=col-md-6><div class="input-group input-medium pull-right"><input st-search placeholder="{{ \'APPLICATION_SEARCH\' | translate }}" class=form-control type=search> <span class=input-group-addon><i class="fa fa-search"></i></span></div></div></div></th></tr><tr><th ng-repeat="field in config.fields">{{field.alias}}</th></tr></thead><tbody><tr data-ng-repeat="result in results" class=animate-repeat><td ng-repeat="field in config.fields">{{result[field.alias]}}</td></tr><tr data-ng-hide=results.length><td colspan={{config.fields.length}} style=text-align:center;><i>{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</i></td></tr></tbody><tfoot><tr><td colspan={{config.fields.length}} class=text-center><div st-pagination class=pagination st-items-by-page=10 st-displayed-pages=3></div></td></tr></tfoot></div></table></div><div class="alert alert-danger" role=alert ng-if=!config.report><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_WIDGET_SELECT_REPORT\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=!results><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_ENTER_VALID_CONDITION\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=!results><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_ENTER_ONE_VALID_FIELD_AND_CHECK_OTHER\' | translate}}</div>')}])}(window);var Metronic=function(){var a,b=!1,c=!1,d=!1,e=!1,f=[],g="assets/",h="img/",i="plugins/",j="css/",k={blue:"#89C4F4",red:"#F3565D",green:"#1bbc9b",purple:"#9b59b6",grey:"#95a5a6",yellow:"#F8CB00"},l=function(){"rtl"===$("body").css("direction")&&(b=!0),c=!!navigator.userAgent.match(/MSIE 8.0/),d=!!navigator.userAgent.match(/MSIE 9.0/),e=!!navigator.userAgent.match(/MSIE 10.0/),e&&$("html").addClass("ie10"),(e||d||c)&&$("html").addClass("ie")},m=function(){for(var a=0;a<f.length;a++){var b=f[a];b.call()}},n=function(){var a;if(c){var b;$(window).resize(function(){b!=document.documentElement.clientHeight&&(a&&clearTimeout(a),a=setTimeout(function(){m()},50),b=document.documentElement.clientHeight)})}else $(window).resize(function(){a&&clearTimeout(a),a=setTimeout(function(){m()},50)})},o=function(){$("body").on("click",".portlet > .portlet-title > .tools > a.remove",function(a){a.preventDefault();var b=$(this).closest(".portlet");$("body").hasClass("page-portlet-fullscreen")&&$("body").removeClass("page-portlet-fullscreen"),b.find(".portlet-title .fullscreen").tooltip("destroy"),b.find(".portlet-title > .tools > .reload").tooltip("destroy"),b.find(".portlet-title > .tools > .remove").tooltip("destroy"),b.find(".portlet-title > .tools > .config").tooltip("destroy"),b.find(".portlet-title > .tools > .collapse, .portlet > .portlet-title > .tools > .expand").tooltip("destroy"),b.remove()}),$("body").on("click",".portlet > .portlet-title .fullscreen",function(a){a.preventDefault();var b=$(this).closest(".portlet");if(b.hasClass("portlet-fullscreen"))$(this).removeClass("on"),b.removeClass("portlet-fullscreen"),$("body").removeClass("page-portlet-fullscreen"),b.children(".portlet-body").css("height","auto");else{var c=Metronic.getViewPort().height-b.children(".portlet-title").outerHeight()-parseInt(b.children(".portlet-body").css("padding-top"))-parseInt(b.children(".portlet-body").css("padding-bottom"));$(this).addClass("on"),b.addClass("portlet-fullscreen"),$("body").addClass("page-portlet-fullscreen"),b.children(".portlet-body").css("height",c)}}),$("body").on("click",".portlet > .portlet-title > .tools > a.reload",function(a){a.preventDefault();var b=$(this).closest(".portlet").children(".portlet-body"),c=$(this).attr("data-url"),d=$(this).attr("data-error-display");c?(Metronic.blockUI({target:b,animate:!0,overlayColor:"none"}),$.ajax({type:"GET",cache:!1,url:c,dataType:"html",success:function(a){Metronic.unblockUI(b),b.html(a)},error:function(a,c,e){Metronic.unblockUI(b);var f="Error on reloading the content. Please check your connection and try again.";"toastr"==d&&toastr?toastr.error(f):"notific8"==d&&$.notific8?($.notific8("zindex",11500),$.notific8(f,{theme:"ruby",life:3e3})):alert(f)}})):(Metronic.blockUI({target:b,animate:!0,overlayColor:"none"}),window.setTimeout(function(){Metronic.unblockUI(b)},1e3))}),$('.portlet .portlet-title a.reload[data-load="true"]').click(),$("body").on("click",".portlet > .portlet-title > .tools > .collapse, .portlet .portlet-title > .tools > .expand",function(a){a.preventDefault()})},p=function(){if($().uniform){var a=$("input[type=checkbox]:not(.toggle, .make-switch, .icheck), input[type=radio]:not(.toggle, .star, .make-switch, .icheck)");a.size()>0&&a.each(function(){0===$(this).parents(".checker").size()&&$(this).show()})}},q=function(){$().iCheck&&$(".icheck").each(function(){var a=$(this).attr("data-checkbox")?$(this).attr("data-checkbox"):"icheckbox_minimal-grey",b=$(this).attr("data-radio")?$(this).attr("data-radio"):"iradio_minimal-grey";a.indexOf("_line")>-1||b.indexOf("_line")>-1?$(this).iCheck({checkboxClass:a,radioClass:b,insert:'<div class="icheck_line-icon"></div>'+$(this).attr("data-label")}):$(this).iCheck({checkboxClass:a,radioClass:b})})},r=function(){$().bootstrapSwitch&&$(".make-switch").bootstrapSwitch()},s=function(){$().confirmation&&$("[data-toggle=confirmation]").confirmation({container:"body",btnOkClass:"btn-xs btn-success",btnCancelClass:"btn-xs btn-danger"})},t=function(){$("body").on("shown.bs.collapse",".accordion.scrollable",function(a){Metronic.scrollTo($(a.target))})},u=function(){if(location.hash){var a=location.hash.substr(1);$('a[href="#'+a+'"]').parents(".tab-pane:hidden").each(function(){var a=$(this).attr("id");$('a[href="#'+a+'"]').click()}),$('a[href="#'+a+'"]').click()}},v=function(){$("body").on("hide.bs.modal",function(){$(".modal:visible").size()>1&&$("html").hasClass("modal-open")===!1?$("html").addClass("modal-open"):$(".modal:visible").size()<=1&&$("html").removeClass("modal-open")}),$("body").on("show.bs.modal",".modal",function(){$(this).hasClass("modal-scroll")&&$("body").addClass("modal-open-noscroll")}),$("body").on("hide.bs.modal",".modal",function(){$("body").removeClass("modal-open-noscroll")}),$("body").on("hidden.bs.modal",".modal:not(.modal-cached)",function(){$(this).removeData("bs.modal")})},w=function(){$(".tooltips").tooltip(),$(".portlet > .portlet-title .fullscreen").tooltip({container:"body",title:"Fullscreen"}),$(".portlet > .portlet-title > .tools > .reload").tooltip({container:"body",title:"Reload"}),$(".portlet > .portlet-title > .tools > .remove").tooltip({container:"body",title:"Remove"}),$(".portlet > .portlet-title > .tools > .config").tooltip({container:"body",title:"Settings"}),$(".portlet > .portlet-title > .tools > .collapse, .portlet > .portlet-title > .tools > .expand").tooltip({container:"body",title:"Collapse/Expand"})},x=function(){$("body").on("click",".dropdown-menu.hold-on-click",function(a){a.stopPropagation()})},y=function(){$("body").on("click",'[data-close="alert"]',function(a){$(this).parent(".alert").hide(),$(this).closest(".note").hide(),a.preventDefault()}),$("body").on("click",'[data-close="note"]',function(a){$(this).closest(".note").hide(),a.preventDefault()}),$("body").on("click",'[data-remove="note"]',function(a){$(this).closest(".note").remove(),a.preventDefault()})},z=function(){$('[data-hover="dropdown"]').not(".hover-initialized").each(function(){$(this).dropdownHover(),$(this).addClass("hover-initialized")})},A=function(){$(".popovers").popover(),$(document).on("click.bs.popover.data-api",function(b){a&&a.popover("hide")})},B=function(){Metronic.initSlimScroll(".scroller")},C=function(){jQuery.fancybox&&$(".fancybox-button").size()>0&&$(".fancybox-button").fancybox({groupAttr:"data-rel",prevEffect:"none",nextEffect:"none",closeBtn:!0,helpers:{title:{type:"inside"}}})},D=function(){(c||d)&&$("input[placeholder]:not(.placeholder-no-fix), textarea[placeholder]:not(.placeholder-no-fix)").each(function(){var a=$(this);""===a.val()&&""!==a.attr("placeholder")&&a.addClass("placeholder").val(a.attr("placeholder")),a.focus(function(){a.val()==a.attr("placeholder")&&a.val("")}),a.blur(function(){""!==a.val()&&a.val()!=a.attr("placeholder")||a.val(a.attr("placeholder"))})})},E=function(){$().select2&&$(".select2me").select2({placeholder:"Select"})};return{init:function(){l(),n(),p(),q(),r(),B(),C(),E(),o(),y(),x(),u(),w(),A(),t(),v(),s(),D()},initAjax:function(){p(),q(),r(),z(),B(),E(),C(),x(),w(),A(),t(),s()},initComponents:function(){this.initAjax()},setLastPopedPopover:function(b){a=b},addResizeHandler:function(a){f.push(a)},runResizeHandlers:function(){m()},scrollTo:function(a,b){var c=a&&a.size()>0?a.offset().top:0;a&&($("body").hasClass("page-header-fixed")&&(c-=$(".page-header").height()),c+=b?b:-1*a.height()),$("html,body").animate({scrollTop:c},"slow")},initSlimScroll:function(a){$(a).each(function(){if(!$(this).attr("data-initialized")){var a;a=$(this).attr("data-height")?$(this).attr("data-height"):$(this).css("height"),$(this).slimScroll({allowPageScroll:!0,size:"7px",color:$(this).attr("data-handle-color")?$(this).attr("data-handle-color"):"#bbb",wrapperClass:$(this).attr("data-wrapper-class")?$(this).attr("data-wrapper-class"):"slimScrollDiv",railColor:$(this).attr("data-rail-color")?$(this).attr("data-rail-color"):"#eaeaea",position:b?"left":"right",height:a,alwaysVisible:"1"==$(this).attr("data-always-visible"),railVisible:"1"==$(this).attr("data-rail-visible"),disableFadeOut:!0}),$(this).attr("data-initialized","1")}})},destroySlimScroll:function(a){$(a).each(function(){if("1"===$(this).attr("data-initialized")){$(this).removeAttr("data-initialized"),$(this).removeAttr("style");var a={};$(this).attr("data-handle-color")&&(a["data-handle-color"]=$(this).attr("data-handle-color")),$(this).attr("data-wrapper-class")&&(a["data-wrapper-class"]=$(this).attr("data-wrapper-class")),$(this).attr("data-rail-color")&&(a["data-rail-color"]=$(this).attr("data-rail-color")),$(this).attr("data-always-visible")&&(a["data-always-visible"]=$(this).attr("data-always-visible")),$(this).attr("data-rail-visible")&&(a["data-rail-visible"]=$(this).attr("data-rail-visible")),$(this).slimScroll({wrapperClass:$(this).attr("data-wrapper-class")?$(this).attr("data-wrapper-class"):"slimScrollDiv",destroy:!0});var b=$(this);$.each(a,function(a,c){b.attr(a,c)})}})},scrollTop:function(){Metronic.scrollTo()},blockUI:function(a){a=$.extend(!0,{},a);var b="";if(b=a.animate?'<div class="loading-message '+(a.boxed?"loading-message-boxed":"")+'"><div class="block-spinner-bar"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div></div>':a.iconOnly?'<div class="loading-message '+(a.boxed?"loading-message-boxed":"")+'"><img src="'+this.getGlobalImgPath()+'loading-spinner-blue.gif" align=""></div>':a.textOnly?'<div class="loading-message '+(a.boxed?"loading-message-boxed":"")+'"><span>&nbsp;&nbsp;'+(a.message?a.message:"LOADING...")+"</span></div>":'<div class="loading-message '+(a.boxed?"loading-message-boxed":"")+'"><img src="'+this.getGlobalImgPath()+'loading-spinner-blue.gif" align=""><span>&nbsp;&nbsp;'+(a.message?a.message:"LOADING...")+"</span></div>",a.target){var c=$(a.target);c.height()<=$(window).height()&&(a.cenrerY=!0),c.block({message:b,baseZ:a.zIndex?a.zIndex:1e3,centerY:void 0!==a.cenrerY?a.cenrerY:!1,css:{top:"10%",border:"0",padding:"0",backgroundColor:"none"},overlayCSS:{backgroundColor:a.overlayColor?a.overlayColor:"#555",opacity:a.boxed?.05:.1,cursor:"wait"}})}else $.blockUI({message:b,baseZ:a.zIndex?a.zIndex:1e3,css:{border:"0",padding:"0",backgroundColor:"none"},overlayCSS:{backgroundColor:a.overlayColor?a.overlayColor:"#555",opacity:a.boxed?.05:.1,cursor:"wait"}})},unblockUI:function(a){a?$(a).unblock({onUnblock:function(){$(a).css("position",""),$(a).css("zoom","")}}):$.unblockUI()},startPageLoading:function(a){a&&a.animate?($(".page-spinner-bar").remove(),$("body").append('<div class="page-spinner-bar"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div>')):($(".page-loading").remove(),$("body").append('<div class="page-loading"><img src="'+this.getGlobalImgPath()+'loading-spinner-blue.gif"/>&nbsp;&nbsp;<span>'+(a&&a.message?a.message:"Loading...")+"</span></div>"))},stopPageLoading:function(){$(".page-loading, .page-spinner-bar").remove()},alert:function(a){a=$.extend(!0,{container:"",place:"append",type:"success",message:"",close:!0,reset:!0,focus:!0,closeInSeconds:0,icon:""},a);var b=Metronic.getUniqueID("Metronic_alert"),c='<div id="'+b+'" class="Metronic-alerts alert alert-'+a.type+' fade in">'+(a.close?'<button type="button" class="close" data-dismiss="alert" aria-hidden="true"></button>':"")+(""!==a.icon?'<i class="fa-lg fa fa-'+a.icon+'"></i>  ':"")+a.message+"</div>";return a.reset&&$(".Metronic-alerts").remove(),a.container?"append"==a.place?$(a.container).append(c):$(a.container).prepend(c):$("body").hasClass("page-container-bg-solid")?$(".page-title").after(c):$(".page-bar").size()>0?$(".page-bar").after(c):$(".page-breadcrumb").after(c),a.focus&&Metronic.scrollTo($("#"+b)),a.closeInSeconds>0&&setTimeout(function(){$("#"+b).remove()},1e3*a.closeInSeconds),b},initUniform:function(a){a?$(a).each(function(){0===$(this).parents(".checker").size()&&($(this).show(),$(this).uniform())}):p()},updateUniform:function(a){$.uniform.update(a)},initFancybox:function(){C()},getActualVal:function(a){return a=$(a),a.val()===a.attr("placeholder")?"":a.val()},getURLParameter:function(a){var b,c,d=window.location.search.substring(1),e=d.split("&");for(b=0;b<e.length;b++)if(c=e[b].split("="),c[0]==a)return unescape(c[1]);return null},isTouchDevice:function(){try{return document.createEvent("TouchEvent"),!0}catch(a){return!1}},getViewPort:function(){var a=window,b="inner";return"innerWidth"in window||(b="client",a=document.documentElement||document.body),{width:a[b+"Width"],height:a[b+"Height"]}},getUniqueID:function(a){return"prefix_"+Math.floor(Math.random()*(new Date).getTime())},isIE8:function(){return c},isIE9:function(){return d},isRTL:function(){return b},isAngularJsApp:function(){return"undefined"!=typeof angular},getAssetsPath:function(){return g},setAssetsPath:function(a){g=a},setGlobalImgPath:function(a){h=a},getGlobalImgPath:function(){return g+h},setGlobalPluginsPath:function(a){i=a},getGlobalPluginsPath:function(){return g+i},getGlobalCssPath:function(){return g+j},getBrandColor:function(a){return k[a]?k[a]:""},getResponsiveBreakpoint:function(a){var b={xs:480,sm:768,md:900,lg:1200};return b[a]?b[a]:0}}}(),Layout=function(){var a="img/",b="css/",c=Metronic.getResponsiveBreakpoint("md"),d=function(){var a,b=$(".page-content"),d=$(".page-sidebar"),e=$("body");if(e.hasClass("page-footer-fixed")===!0&&e.hasClass("page-sidebar-fixed")===!1){var f=Metronic.getViewPort().height-$(".page-footer").outerHeight()-$(".page-header").outerHeight();b.height()<f&&b.attr("style","min-height:"+f+"px")}else{if(e.hasClass("page-sidebar-fixed"))a=g(),e.hasClass("page-footer-fixed")===!1&&(a-=$(".page-footer").outerHeight());else{var h=$(".page-header").outerHeight(),i=$(".page-footer").outerHeight();a=Metronic.getViewPort().width<c?Metronic.getViewPort().height-h-i:d.height()+20,a+h+i<=Metronic.getViewPort().height&&(a=Metronic.getViewPort().height-h-i)}b.attr("style","min-height:"+a+"px")}},e=function(a,b){var d=location.hash.toLowerCase(),e=$(".page-sidebar-menu");if("click"===a||"set"===a?b=$(b):"match"===a&&e.find("li > a").each(function(){var a=$(this).attr("href").toLowerCase();return a.length>1&&d.substr(1,a.length-1)==a.substr(1)?void(b=$(this)):void 0}),b&&0!=b.size()&&"javascript:;"!==b.attr("href").toLowerCase()&&"#"!==b.attr("href").toLowerCase()){parseInt(e.data("slide-speed")),e.data("keep-expanded");e.find("li.active").removeClass("active"),e.find("li > a > .selected").remove(),e.hasClass("page-sidebar-menu-hover-submenu")===!1?e.find("li.open").each(function(){0===$(this).children(".sub-menu").size()&&($(this).removeClass("open"),$(this).find("> a > .arrow.open").removeClass("open"))}):e.find("li.open").removeClass("open"),b.parents("li").each(function(){$(this).addClass("active"),$(this).find("> a > span.arrow").addClass("open"),1===$(this).parent("ul.page-sidebar-menu").size()&&$(this).find("> a").append('<span class="selected"></span>'),1===$(this).children("ul.sub-menu").size()&&$(this).addClass("open")}),"click"===a&&Metronic.getViewPort().width<c&&$(".page-sidebar").hasClass("in")&&$(".page-header .responsive-toggler").click()}},f=function(){jQuery(".page-sidebar").on("click","li > a",function(a){var b=$(this).next().hasClass("sub-menu");if(!(Metronic.getViewPort().width>=c&&1===$(this).parents(".page-sidebar-menu-hover-submenu").size())){if(b===!1)return void(Metronic.getViewPort().width<c&&$(".page-sidebar").hasClass("in")&&$(".page-header .responsive-toggler").click());if(!$(this).next().hasClass("sub-menu always-open")){var e=$(this).parent().parent(),f=$(this),g=$(".page-sidebar-menu"),h=jQuery(this).next(),i=g.data("auto-scroll"),j=parseInt(g.data("slide-speed")),k=g.data("keep-expanded");k!==!0&&(e.children("li.open").children("a").children(".arrow").removeClass("open"),e.children("li.open").children(".sub-menu:not(.always-open)").slideUp(j),e.children("li.open").removeClass("open"));var l=-200;h.is(":visible")?(jQuery(".arrow",jQuery(this)).removeClass("open"),jQuery(this).parent().removeClass("open"),h.slideUp(j,function(){i===!0&&$("body").hasClass("page-sidebar-closed")===!1&&($("body").hasClass("page-sidebar-fixed")?g.slimScroll({scrollTo:f.position().top}):Metronic.scrollTo(f,l)),d()})):b&&(jQuery(".arrow",jQuery(this)).addClass("open"),jQuery(this).parent().addClass("open"),h.slideDown(j,function(){i===!0&&$("body").hasClass("page-sidebar-closed")===!1&&($("body").hasClass("page-sidebar-fixed")?g.slimScroll({scrollTo:f.position().top}):Metronic.scrollTo(f,l)),d()})),a.preventDefault()}}}),jQuery(".page-sidebar").on("click"," li > a.ajaxify",function(a){a.preventDefault(),Metronic.scrollTop();var b=$(this).attr("href"),d=jQuery(".page-sidebar ul"),e=($(".page-content"),$(".page-content .page-content-body"));d.children("li.active").removeClass("active"),d.children("arrow.open").removeClass("open"),$(this).parents("li").each(function(){$(this).addClass("active"),$(this).children("a > span.arrow").addClass("open")}),$(this).parents("li").addClass("active"),Metronic.getViewPort().width<c&&$(".page-sidebar").hasClass("in")&&$(".page-header .responsive-toggler").click(),Metronic.startPageLoading();var f=$(this);$.ajax({type:"GET",cache:!1,url:b,dataType:"html",success:function(a){0===f.parents("li.open").size()&&$(".page-sidebar-menu > li.open > a").click(),Metronic.stopPageLoading(),e.html(a),Layout.fixContentHeight(),Metronic.initAjax()},error:function(a,b,c){Metronic.stopPageLoading(),e.html("<h4>Could not load the requested content.</h4>")}})}),jQuery(".page-content").on("click",".ajaxify",function(a){a.preventDefault(),Metronic.scrollTop();var b=$(this).attr("href"),d=($(".page-content"),$(".page-content .page-content-body"));Metronic.startPageLoading(),Metronic.getViewPort().width<c&&$(".page-sidebar").hasClass("in")&&$(".page-header .responsive-toggler").click(),$.ajax({type:"GET",cache:!1,url:b,dataType:"html",success:function(a){Metronic.stopPageLoading(),d.html(a),Layout.fixContentHeight(),Metronic.initAjax()},error:function(a,b,c){d.html("<h4>Could not load the requested content.</h4>"),Metronic.stopPageLoading()}})}),i(),$(".page-sidebar").on("click",".sidebar-search .remove",function(a){a.preventDefault(),$(".sidebar-search").removeClass("open")}),$(".page-sidebar .sidebar-search").on("keypress","input.form-control",function(a){return 13==a.which?($(".sidebar-search").submit(),!1):void 0}),0!==$(".sidebar-search").size()&&($(".sidebar-search .input-group").on("click",function(a){a.stopPropagation()}),$("body").on("click",function(){$(".sidebar-search").hasClass("open")&&$(".sidebar-search").removeClass("open")}))},g=function(){var a=Metronic.getViewPort().height-$(".page-header").outerHeight();return $("body").hasClass("page-footer-fixed")&&(a-=$(".page-footer").outerHeight()),a},h=function(){var a=$(".page-sidebar-menu");return Metronic.destroySlimScroll(a),0===$(".page-sidebar-fixed").size()?void d():void(Metronic.getViewPort().width>=c&&(a.attr("data-height",g()),Metronic.initSlimScroll(a),d()))},i=function(){var a=$("body");a.hasClass("page-sidebar-fixed")&&$(".page-sidebar").on("mouseenter",function(){a.hasClass("page-sidebar-closed")&&$(this).find(".page-sidebar-menu").removeClass("page-sidebar-menu-closed")}).on("mouseleave",function(){a.hasClass("page-sidebar-closed")&&$(this).find(".page-sidebar-menu").addClass("page-sidebar-menu-closed")})},j=function(){$("body");$.cookie&&"1"===$.cookie("sidebar_closed")&&Metronic.getViewPort().width>=c?($("body").addClass("page-sidebar-closed"),$(".page-sidebar-menu").addClass("page-sidebar-menu-closed")):$.cookie&&$.cookie("sidebar_closed","0")},k=function(){$(".page-header").on("click",'.hor-menu a[data-toggle="tab"]',function(a){a.preventDefault();var b=$(".hor-menu .nav"),c=b.find("li.current");$("li.active",c).removeClass("active"),$(".selected",c).remove();var d=$(this).parents("li").last();d.addClass("current"),d.find("a:first").append('<span class="selected"></span>')}),$(".page-header").on("click",".search-form",function(a){$(this).addClass("open"),$(this).find(".form-control").focus(),$(".page-header .search-form .form-control").on("blur",function(a){$(this).closest(".search-form").removeClass("open"),$(this).unbind("blur")})}),$(".page-header").on("keypress",".hor-menu .search-form .form-control",function(a){return 13==a.which?($(this).closest(".search-form").submit(),!1):void 0}),$(".page-header").on("mousedown",".search-form.open .submit",function(a){a.preventDefault(),a.stopPropagation(),$(this).closest(".search-form").submit()}),$('[data-hover="megamenu-dropdown"]').not(".hover-initialized").each(function(){$(this).dropdownHover(),$(this).addClass("hover-initialized")}),$(document).on("click",".mega-menu-dropdown .dropdown-menu",function(a){a.stopPropagation()})},l=function(){$("body").on("shown.bs.tab",'a[data-toggle="tab"]',function(){d()})},m=function(){var a=300,b=500;navigator.userAgent.match(/iPhone|iPad|iPod/i)?$(window).bind("touchend touchcancel touchleave",function(c){$(this).scrollTop()>a?$(".scroll-to-top").fadeIn(b):$(".scroll-to-top").fadeOut(b)}):$(window).scroll(function(){$(this).scrollTop()>a?$(".scroll-to-top").fadeIn(b):$(".scroll-to-top").fadeOut(b)}),$(".scroll-to-top").click(function(a){return a.preventDefault(),$("html, body").animate({scrollTop:0},b),!1})},n=function(){var a,b=$(".full-height-content");if(a=Metronic.getViewPort().height-$(".page-header").outerHeight(!0)-$(".page-footer").outerHeight(!0)-$(".page-title").outerHeight(!0)-$(".page-bar").outerHeight(!0),b.hasClass("portlet")){var d=b.find(".portlet-body");if(Metronic.getViewPort().width<c)return void Metronic.destroySlimScroll(d.find(".full-height-content-body"));a=a-b.find(".portlet-title").outerHeight(!0)-parseInt(b.find(".portlet-body").css("padding-top"))-parseInt(b.find(".portlet-body").css("padding-bottom"))-2,b.hasClass("full-height-content-scrollable")?(a-=35,d.find(".full-height-content-body").css("height",a),Metronic.initSlimScroll(d.find(".full-height-content-body"))):d.css("min-height",a)}else{if(Metronic.getViewPort().width<c)return void Metronic.destroySlimScroll(b.find(".full-height-content-body"));b.hasClass("full-height-content-scrollable")?(a-=35,b.find(".full-height-content-body").css("height",a),Metronic.initSlimScroll(b.find(".full-height-content-body"))):b.css("min-height",a)}};return{initHeader:function(){k()},setSidebarMenuActiveLink:function(a,b){e(a,b)},initSidebar:function(){h(),f(),j(),Metronic.isAngularJsApp()&&e("match"),Metronic.addResizeHandler(h)},initContent:function(){n(),l(),Metronic.addResizeHandler(d),Metronic.addResizeHandler(n)},initFooter:function(){m()},init:function(){this.initHeader(),this.initSidebar(),this.initContent(),this.initFooter()},fixContentHeight:function(){d()},initFixedSidebarHoverEffect:function(){i()},initFixedSidebar:function(){h()},getLayoutImgPath:function(){return Metronic.getAssetsPath()+a},getLayoutCssPath:function(){return Metronic.getAssetsPath()+b}}}();angular.module("xCallyShuttleApp").run(["$templateCache",function(a){a.put("app/analytic/extracted/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-file-pdf-o"></i>\n					<a href="/analytics/extracted/list">{{ \'APPLICATION_EXTRACTED_REPORTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="fa fa-file-pdf-o font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_EXTRACTED_REPORTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n\n<!-- END PAGE CONTENT-->\n'),a.put("app/analytic/metric/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_METRIC\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.metric" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.metric.name.$touched || forms.metric.$submitted) && forms.metric.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.metric.name.$touched || forms.metric.$submitted) && forms.metric.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START TABLE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.metric.table.$touched || forms.metric.$submitted) && forms.metric.table.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TABLE\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.table" name="table" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{\'APPLICATION_\'+$select.selected.value.toUpperCase() | translate}}</ui-select-match>\n        <ui-select-choices repeat="table.value as table in tables | filter: $select.search">\n          <div ng-bind-html="\'APPLICATION_\'+table.value.toUpperCase() | translate | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(forms.metric.table.$touched || forms.metric.$submitted) && forms.metric.table.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TABLE-->\n\n    <!-- START METRIC -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.metric.metric.$touched || forms.metric.$submitted) && forms.metric.metric.$invalid}">\n      <label class="control-label">{{\'APPLICATION_METRIC\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <textarea type="text" name="metric" placeholder="{{\'APPLICATION_METRIC\' | translate}}" class="form-control" data-ng-model="item.metric" required/></textarea>\n      <span data-ng-show="(forms.metric.metric.$touched || forms.metric.$submitted) && forms.metric.metric.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END METRIC -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.metric.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),
-a.put("app/analytic/metric/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-calculator"></i>\n					<a href="/analytics/metrics/list">{{ \'APPLICATION_METRICS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<!-- <div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-calculator font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_DEFAULT_METRICS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n				</div>\n			</div> -->\n			<!-- <div class="portlet-body"> -->\n				<!-- START TABLE -->\n				<!-- <div ui-grid="gridOptionsDefault" data-ng-if="gridOptionsDefault" name="gridOptionsDefault"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptionsDefault.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div> -->\n				<!-- END TABLE -->\n			<!-- </div> -->\n			<div class="portlet-title"><!-- removed margin-top20 class from title when commented the default metrics section-->\n				<div class="caption font-green-sharp">\n					<i class="icon-calculator font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_METRICS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="create()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_METRIC\' | translate }}\n						</button>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions" data-ng-if="gridOptions" name="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/analytic/metric/list/view.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_METRIC\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.metric" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.metric.name.$touched || forms.metric.$submitted) && forms.metric.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}</label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required readonly/>\n      <span data-ng-show="(forms.metric.name.$touched || forms.metric.$submitted) && forms.metric.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START TABLE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.metric.table.$touched || forms.metric.$submitted) && forms.metric.table.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TABLE\' | translate}}</label>\n      <ui-select data-ng-model="item.table" name="table" theme="bootstrap" required data-ng-disabled="true">\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{\'APPLICATION_\'+$select.selected.value.toUpperCase() | translate}}</ui-select-match>\n        <ui-select-choices repeat="table.value as table in tables | filter: $select.search">\n          <div ng-bind-html="\'APPLICATION_\'+table.value.toUpperCase() | translate | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(forms.metric.table.$touched || forms.metric.$submitted) && forms.metric.table.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TABLE-->\n\n    <!-- START METRIC -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.metric.metric.$touched || forms.metric.$submitted) && forms.metric.metric.$invalid}">\n      <label class="control-label">{{\'APPLICATION_METRIC\' | translate}}</label>\n      <textarea type="text" name="metric" placeholder="{{\'APPLICATION_METRIC\' | translate}}" class="form-control" data-ng-model="item.metric" required readonly/></textarea>\n      <span data-ng-show="(forms.metric.metric.$touched || forms.metric.$submitted) && forms.metric.metric.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END METRIC -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description" readonly></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/analytic/metric/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getMetric()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-eye"></i>\n					<a href="/analytics/metrics/list">{{ \'APPLICATION_METRICS\' | translate }}</a>\n					<i data-ng-show="metric" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="metric">\n					<a href="#">{{metric.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/metric.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{metric.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.analytics.metrics.view.settings\')}">\n							<a data-ng-href="/analytics/metrics/view/{{metric.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/analytic/metric/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_METRIC\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateMetric()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="metric.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START TABLE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.table.$touched || forms.general.$submitted) && forms.general.table.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TABLE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="metric.table" name="table" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{\'APPLICATION_\'+$select.selected.value.toUpperCase() | translate}}</ui-select-match>\n									<ui-select-choices repeat="table.value as table in tables | filter: $select.search">\n										<div ng-bind-html="\'APPLICATION_\'+table.value.toUpperCase() | translate | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.general.table.$touched || forms.general.$submitted) && forms.general.table.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TABLE-->\n\n							<!-- START METRIC -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.metric.$touched || forms.general.$submitted) && forms.general.metric.$invalid}">\n								<label class="control-label">{{\'APPLICATION_METRIC\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<textarea type="text" name="metric" placeholder="{{\'APPLICATION_METRIC\' | translate}}" class="form-control" data-ng-model="metric.metric" required/></textarea>\n								<span data-ng-show="(forms.general.metric.$touched || forms.general.$submitted) && forms.general.metric.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END METRIC -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="metric.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/analytic/report/list/copy.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_COPY_REPORT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <div class="portlet light bordered">\n    <div class="portlet-title">\n      <div class="caption font-green-sharp" style="padding-left:10px;">\n        <i class="icon-folder font-green-sharp"></i>\n        <span class="caption-subject">{{ \'APPLICATION_COPY_TO\' | translate }} </span>\n      </div>\n    </div>\n    <div class="portlet-body">\n      <div js-tree="customTreeConfig" ng-model="customTreeData" should-apply="ac()" tree="customTreeInstance" tree-events="ready:initCustomScopeTree;"></div>\n    </div>\n  </div>\n  <div class="has-error">\n    <span data-ng-show="showAlert" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_SELECT_FOLDER\' | translate}}.\n  </span>\n  </div>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/analytic/report/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_REPORT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.report" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.report.name.$touched || forms.report.$submitted) && forms.report.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.report.name.$touched || forms.report.$submitted) && forms.report.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.report.name.$touched || forms.report.$submitted) && forms.report.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_PATH\' | translate}}<span class="required" aria-required="true"></span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_PATH\' | translate}}" class="form-control" data-ng-model="path" disabled/>\n      <span data-ng-show="(forms.report.name.$touched || forms.report.$submitted) && forms.report.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.report.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/analytic/report/list/deleteNode.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_DELETE_FOLDER\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<p>\n  {{\'MESSAGE_DELETE_NODE\' | translate}} : <b>{{node}}</b>?\n</p>\n<p>\n  {{\'MESSAGE_ALL_REPORTS_WILL_BE_DELETED\' | translate}}\n</p>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="ok()" ng-disabled="forms.report.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/analytic/report/list/extract.modal.html",'<div class="modal-header">\n  <button type="button" ng-click="cancel()" class="close">Ã</button>\n  <h4 class="modal-title">{{ \'APPLICATION_EXTRACT_REPORT\' | translate }}</h4>\n</div>\n<div class="modal-body" style="text-align:center;">\n  <form name="forms.report" class="form-inline mbottom20" novalidate>\n    <div class="form-group" data-ng-class="{\'hidden\':daily}">\n      <label class="control-label">{{\'APPLICATION_DATE_RANGE\' | translate}}</label>\n      <input type="daterange" name="dates" ranges="ranges" style="min-width:190px;" enabletimepicker="timepicker" placeholder="{{\'APPLICATION_DATE_RANGE\' | translate}}" class="form-control" data-ng-model="dates" max-date="{{maxdate}}" data-ng-required="!daily" data-ng-disabled="daily" data-ng-class="{\'disabled-invisible\':daily}" style="cursor:pointer;" readonly/>\n    </div>\n    <div class="form-group" data-ng-if="daily">\n      <label class="control-label">{{\'APPLICATION_FROM\' | translate}}</label>\n    </div>\n    <div class="form-group" data-ng-if="daily">\n      <uib-timepicker ng-model="dailyTime.start" ng-change="changed()" hour-step="1" minute-step="1" show-meridian="false"></uib-timepicker>\n    </div>\n    <div class="form-group" data-ng-if="daily">\n      <label class="control-label">{{\'APPLICATION_TO\' | translate}}</label>\n    </div>\n    <div class="form-group" data-ng-if="daily">\n      <uib-timepicker ng-model="dailyTime.end" ng-change="changed()" hour-step="1" minute-step="1" show-meridian="false"></uib-timepicker>\n    </div>\n      <!-- START STATUS -->\n      <div class="form-group">\n      <input\n      bs-switch\n      class="form-control"\n      ng-model="daily"\n      type="checkbox"\n      name="auth"\n      switch-active="{{ dailySwitch.isActive }}"\n      switch-on-text="{{ dailySwitch.onText }}"\n      switch-off-text="{{ dailySwitch.offText }}"\n      switch-on-color="{{ dailySwitch.onColor }}"\n      switch-off-color="{{ dailySwitch.offColor }}"\n      switch-animate="{{ dailySwitch.animate }}"\n      switch-size="{{ dailySwitch.size }}"\n      switch-label="{{ dailySwitch.label }}"\n      switch-icon="{{ dailySwitch.icon }}"\n      switch-radio-off="{{ dailySwitch.radioOff }}"\n      switch-label-width="{{ dailySwitch.labelWidth }}"\n      switch-handle-width="{{ dailySwitch.handleWidth }}">\n    </div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn default green-jungle" type="button" data-ng-click="extract(\'csv\')"><i class="fa fa-file-excel-o"></i> {{ \'APPLICATION_SAVE_AS_CSV\' | translate }}</button>\n  <button class="btn default red-intense" type="button" data-ng-click="extract(\'pdf\')"><i class="fa fa-file-pdf-o"></i> {{ \'APPLICATION_SAVE_AS_PDF\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/analytic/report/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getTrees()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-book-open"></i>\n					<a href="/analytics/reports/list">{{ \'APPLICATION_REPORTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n		<div class="col-fixed">\n			<!-- BEGIN Portlet PORTLET-->\n			<div class="portlet light bordered">\n				<div class="portlet-title">\n					<div class="caption font-green-sharp" style="padding-left:10px;">\n						<i class="icon-folder font-green-sharp"></i>\n						<span class="caption-subject">{{ \'APPLICATION_FOLDERS\' | translate }} </span>\n					</div>\n					<div class="inputs">\n						<div class="portlet-input input-inline input-small">\n							<div class="input-icon right">\n								<i class="icon-magnifier"></i>\n								<input type="text" data-ng-model="searchField" data-ng-change="searchTrees()" class="form-control input-circle" placeholder="search...">\n							</div>\n						</div>\n					</div>\n				</div>\n				<div class="portlet-body">\n					<div js-tree="defaultTreeConfig" ng-model="defaultTreeData" should-apply="ac()" tree="defaultTreeInstance" tree-events="ready:initDefaultScopeTree;select_node:selectDefaultNode;"></div>\n					<div js-tree="customTreeConfig" ng-model="customTreeData" should-apply="ac()" tree="customTreeInstance" tree-events="ready:initCustomScopeTree;select_node:selectCustomNode;rename_node:updateCustomTree;delete_node:updateCustomTree;move_node:updateCustomTree;create_node:updateCustomTree;"></div>\n				</div>\n			</div>\n			<!-- END Portlet PORTLET-->\n		</div>\n		<div class="row tree-row">\n			<div class="col-md-12">\n				<!-- BEGIN Portlet PORTLET-->\n				<div class="portlet light bordered">\n					<div class="portlet-title">\n						<div class="caption font-green-sharp">\n							<i class="icon-book-open font-green-sharp"></i>\n							<span class="caption-subject">{{ \'APPLICATION_REPORTS\' | translate }}<span data-ng-if="selectedNode"> - {{selectedNode}}</span></span>\n						</div>\n						<div data-ng-if="!defaultTreeActive" class="actions">\n							<div class="btn-group" data-ng-show="id.length">\n								<a class="btn red" href="#" data-ng-click="deleteItems()">\n									<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n								</a>\n							</div>\n							<div class="btn-group">\n								<span class="btn default btn-file">\n								<span class="fileinput-new">\n								<i class="icon-cloud-upload"></i> {{\'APPLICATION_IMPORT_FROM_JSON\' | translate}}</span>\n								<input type="file" on-read-file="import($fileContent)"/>\n								</span>\n							</div>\n							<div class="btn-group">\n								<button class="btn green-jungle " ng-click="create()">\n									<i class="icon-plus"></i> {{ \'APPLICATION_NEW_REPORT\' | translate }}\n								</button>\n							</div>\n						</div>\n					</div>\n					<div class="portlet-body">\n						<div ng-slide-down="gridOptions" lazy-render duration="1">\n						<!-- START TABLE -->\n						<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n							<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n						</div>\n						<!-- END TABLE -->\n					</div>\n					</div>\n				</div>\n				<!-- END Portlet PORTLET-->\n			</div>\n		</div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/analytic/report/list/preview.modal.html",'<div class="modal-header">\n  <button type="button" ng-click="cancel()" class="close">Ã</button>\n  <h4 class="modal-title">{{ \'APPLICATION_REPORT_PREVIEW\' | translate }}</h4>\n</div>\n<div class="modal-body" style="text-align:center;">\n  <form name="forms.report" class="form-inline mbottom20" novalidate>\n    <div class="form-group" data-ng-class="{\'hidden\':daily}">\n      <label class="control-label">{{\'APPLICATION_DATE_RANGE\' | translate}}<span class="required" aria-required="true"></span></label>\n      <input type="daterange" name="dates" ranges="ranges" style="min-width:190px;" enabletimepicker="timepicker" placeholder="{{\'APPLICATION_DATE_RANGE\' | translate}}" class="form-control" data-ng-model="dates" data-ng-change="getPage()" max-date="{{maxdate}}" data-ng-required="!daily" data-ng-disabled="daily" data-ng-class="{\'disabled-invisible\':daily}" style="cursor:pointer;" readonly/>\n    </div>\n    <div class="form-group" data-ng-if="daily">\n      <label class="control-label">{{\'APPLICATION_FROM\' | translate}}</label>\n    </div>\n    <div class="form-group" data-ng-if="daily">\n      <uib-timepicker ng-model="dailyTime.start" ng-change="changed()" hour-step="1" minute-step="1" show-meridian="false"></uib-timepicker>\n    </div>\n    <div class="form-group" data-ng-if="daily">\n      <label class="control-label">{{\'APPLICATION_TO\' | translate}}</label>\n    </div>\n    <div class="form-group" data-ng-if="daily">\n      <uib-timepicker ng-model="dailyTime.end" ng-change="changed()" hour-step="1" minute-step="1" show-meridian="false"></uib-timepicker>\n    </div>\n    <div class="form-group" data-ng-if="daily">\n      <button class="btn btn-small btn-sm btn-success" data-ng-click="getPage()">Apply</button>\n    </div>\n      <div class="form-group">\n      <input\n      bs-switch\n      class="form-control"\n      ng-model="daily"\n      type="checkbox"\n      name="auth"\n      data-ng-change="getPage()"\n      switch-active="{{ dailySwitch.isActive }}"\n      switch-on-text="{{ dailySwitch.onText }}"\n      switch-off-text="{{ dailySwitch.offText }}"\n      switch-on-color="{{ dailySwitch.onColor }}"\n      switch-off-color="{{ dailySwitch.offColor }}"\n      switch-animate="{{ dailySwitch.animate }}"\n      switch-size="{{ dailySwitch.size }}"\n      switch-label="{{ dailySwitch.label }}"\n      switch-icon="{{ dailySwitch.icon }}"\n      switch-radio-off="{{ dailySwitch.radioOff }}"\n      switch-label-width="{{ dailySwitch.labelWidth }}"\n      switch-handle-width="{{ dailySwitch.handleWidth }}">\n    </div>\n  </form>\n  <div ng-slide-down="showResult" lazy-render duration="1">\n    <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter class="grid extract-grid">\n      <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n    </div>\n  </div>\n</div>\n<div class="modal-footer">\n<button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/analytic/report/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getReport()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-book-open"></i>\n					<a href="/analytics/reports/list">{{ \'APPLICATION_REPORTS\' | translate }}</a>\n					<i data-ng-show="report" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="report">\n					<a href="#">{{report.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/analytic/report/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<div class="caption-subject font-blue-madison bold uppercase dot">{{ \'APPLICATION_REPORT\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} - {{report.name}} </div>\n				</div>\n				<ul class="nav nav-tabs">\n					<li>\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n					<li class="active">\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_BUILD\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab" data-ng-click="showResult = true">{{ \'APPLICATION_TEST_PREVIEW\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n\n				<div class="tab-content">\n\n					<!-- GENERAL TAB -->\n					<div class="tab-pane" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.report.$valid && forms.general.$valid && updateReport()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="report.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="report.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}" />\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n					<!-- BUILD TAB -->\n					<div class="tab-pane active" id="tab_1_2">\n						<form name="forms.report" data-ng-submit="forms.report.$valid && forms.general.$valid && updateReport()" novalidate>\n							<!-- START TABLE INPUT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.report.table.$touched || forms.report.$submitted) && forms.report.table.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TABLE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="report.table" name="table" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{\'APPLICATION_\'+$select.selected.value.toUpperCase() | translate}}</ui-select-match>\n									<ui-select-choices group-by="\'channel\'" repeat="table.value as table in tables | filter: $select.search">\n										<div ng-bind-html="\'APPLICATION_\'+table.value.toUpperCase() | translate | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.report.table.$touched || forms.report.$submitted) && forms.report.table.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TABLE INPUT-->\n							<div data-ng-if="report.table" class="mbottom20 pbottom20 table-responsive">\n								<div class="portlet-title tabbable-line">\n									<div class="caption caption-md">\n										<i class="icon-globe theme-font hide"></i>\n										<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_FIELDS\' | translate}} </span>\n									</div>\n								</div>\n								<!-- START TABLE -->\n								<table class="table table-striped table-bordered table-hover">\n									<thead>\n										<tr>\n											<th>{{ \'APPLICATION_FIELD\' | translate }} / {{ \'APPLICATION_METRIC\' | translate }}</th>\n											<th style="min-width:167px;">{{ \'APPLICATION_ALIAS\' | translate }}</th>\n											<th>{{ \'APPLICATION_FUNCTION\' | translate }}</th>\n											<th>{{ \'APPLICATION_FORMAT\' | translate }}</th>\n											<th>{{ \'APPLICATION_GROUP_BY\' | translate }}</th>\n											<th>{{ \'APPLICATION_ORDER_BY\' | translate }}</th>\n											<th></th>\n											<th style="min-width:66px;"></th>\n										</tr>\n									</thead>\n									<tbody ui-sortable="sortableOptions" data-ng-model="report.Fields">\n										<tr data-ng-repeat="field in report.Fields">\n											<td>\n												<!-- START FIELD -->\n												<div class="form-group" data-ng-class="{\'has-error\': forms.report.$submitted && !field.field}">\n													<!-- <label class="control-label">{{\'APPLICATION_FIELD\' | translate}}<span class="required" aria-required="true">*</span></label> -->\n													<div class="input-group">\n														<ui-select data-ng-if="!field.custom" data-ng-model="field.field" dynamic-name="randomName()" theme="bootstrap" on-select="setMetricId($item,$index)" required>\n															<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}"><span ng-bind-html="$select.selected.name"></span></ui-select-match>\n															<ui-select-choices repeat="tableField.value as tableField in tableFields | filter: $select.search">\n																<div ng-bind-html="tableField.name | highlight: $select.search"></div>\n															</ui-select-choices>\n														</ui-select>\n														<input data-ng-if="field.custom" type="text" dynamic-name="randomName()" placeholder="{{\'APPLICATION_CUSTOM\' | translate}}" class="form-control" data-ng-model="field.field" required/>\n														<span class="input-group-btn">\n																<button type="button" data-ng-click="toggleCustom(field)" class="btn btn-default">\n																	<span class="icon-pencil" data-ng-class="{\'font-blue\':field.custom}"></span>\n														</button>\n														</span>\n													</div>\n													<span data-ng-show="forms.report.$submitted && !field.field" class="help-block help-block-error">\n															<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n														</span>\n												</div>\n												<!-- END FIELD-->\n											</td>\n											<td>\n												<!-- START ALIAS -->\n												<div class="form-group" data-ng-class="{\'has-error\': forms.report.$submitted && !field.alias}">\n													<!-- <label class="control-label">{{\'APPLICATION_ALIAS\' | translate}}<span class="required" aria-required="true">*</span></label> -->\n													<input type="text" dynamic-name="randomName()" placeholder="{{\'APPLICATION_ALIAS\' | translate}}" class="form-control" data-ng-model="field.alias" data-ng-pattern="\'[A-Za-z0-9 <>=,.%_\\\\+*!\\\\-\\\\[\\\\]]+\'" required/>\n													<span data-ng-show="forms.report.$submitted && !field.alias" class="help-block help-block-error">\n															<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n														</span>\n													<span data-ng-show="forms.report.$submitted && !field.alias" class="help-block help-block-error">\n															<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n														</span>\n												</div>\n												<!-- END ALIAS -->\n											</td>\n											<td>\n												<!-- START FUNCTION -->\n												<div class="form-group">\n													<!-- <label class="control-label">{{\'APPLICATION_FIELD\' | translate}}<span class="required" aria-required="true">*</span></label> -->\n													<ui-select data-ng-model="field.function" name="function" theme="bootstrap">\n														<ui-select-match placeholder="{{\'APPLICATION_FUNCTION\' | translate}}" allow-clear>{{$select.selected.name}}</ui-select-match>\n														<ui-select-choices repeat="function.value as function in functions | filter: $select.search">\n															<div ng-bind-html="function.name | highlight: $select.search"></div>\n														</ui-select-choices>\n													</ui-select>\n												</div>\n												<!-- END FUNCTION-->\n											</td>\n											<td>\n												<!-- START FORMAT -->\n												<div class="form-group">\n													<!-- <label class="control-label">{{\'APPLICATION_FIELD\' | translate}}<span class="required" aria-required="true">*</span></label> -->\n													<ui-select data-ng-model="field.format" name="format" theme="bootstrap">\n														<ui-select-match placeholder="{{\'APPLICATION_FORMAT\' | translate}}" allow-clear>{{$select.selected.name}}</ui-select-match>\n														<ui-select-choices repeat="format.value as format in formatFunctions | filter: $select.search">\n															<div ng-bind-html="format.name | highlight: $select.search"></div>\n														</ui-select-choices>\n													</ui-select>\n												</div>\n												<!-- END FORMAT-->\n											</td>\n											<td>\n												<!-- START GROUP_BY -->\n												<div class="form-group">\n													<!-- <label class="control-label">{{\'APPLICATION_FIELD\' | translate}}<span class="required" aria-required="true">*</span></label> -->\n													<ui-select data-ng-model="field.groupBy" name="groupBy" theme="bootstrap" required>\n														<ui-select-match placeholder="{{\'APPLICATION_GROUP_BY\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n														<ui-select-choices repeat="groupBy.value as groupBy in groupByField | filter: $select.search">\n															{{$translate.instant(groupBy.name)}}\n														</ui-select-choices>\n													</ui-select>\n												</div>\n												<!-- END GROUP_BY-->\n											</td>\n											<td>\n												<!-- START ORDER_BY -->\n												<div class="form-group">\n													<!-- <label class="control-label">{{\'APPLICATION_FIELD\' | translate}}<span class="required" aria-required="true">*</span></label> -->\n													<ui-select data-ng-model="field.orderBy" name="orderBy" theme="bootstrap">\n														<ui-select-match placeholder="{{\'APPLICATION_ORDER_BY\' | translate}}" allow-clear>{{$select.selected}}</ui-select-match>\n														<ui-select-choices repeat="orderBy in [\'ASC\',\'DESC\'] | filter: $select.search">\n															<div ng-bind-html="orderBy | highlight: $select.search"></div>\n														</ui-select-choices>\n													</ui-select>\n												</div>\n												<!-- END TABLE INPUT-->\n											</td>\n											<td class="report-field-remove">\n												<button class="btn red" type="button" data-ng-click="removeField($index)"><i class="fa fa-times"></i></button>\n											</td>\n											<td class="report-field-handle">\n												<!-- <img data-ng-src="assets/images/move.png" class="img-responsive"> -->\n											</td>\n										</tr>\n										<tr data-ng-hide="report.Fields.length" class="unsortable">\n											<td colspan="8" style="text-align:center;">\n												<i>{{ \'MESSAGE_ADD_A_FIELD\' | translate }}</i>\n											</td>\n										</tr>\n									</tbody>\n								</table>\n								<button type="button" class="btn btn-sm green padding-bottom" ng-click="addField()">\n									<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_FIELD\' | translate}}\n								</button>\n								<!-- END TABLE -->\n							</div>\n							<div data-ng-if="report.Fields.length" class="mbottom20 pbottom20">\n								<div class="portlet-title tabbable-line">\n									<div class="caption caption-md">\n										<i class="icon-globe theme-font hide"></i>\n										<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_CONDITIONS\' | translate}} </span>\n									</div>\n								</div>\n								<div class="alert alert-info">\n									<strong>Output</strong>\n									<br>\n									<span ng-bind-html="output"></span>\n								</div>\n\n								<report-builder group="report.conditions.group" fields="tableFields" forms="forms" firstCall=\'true\'></report-builder>\n							</div>\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}" />\n						</form>\n					</div>\n					<!-- END BUILD TAB -->\n\n					<!-- PREVIEW TAB -->\n					<div class="tab-pane" id="tab_1_3">\n						<div ng-slide-down="showResult" lazy-render duration="0.5">\n							<div ui-grid="gridOptions" data-ng-if="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-move-columns class="grid">\n								<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n							</div>\n						</div>\n					</div>\n					<!-- END PREVIEW TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
-a.put("app/channels/chat/offline/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-bubble"></i>\n						<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-login"></i>\n						<a href="/channels/chat/offline/list">{{ \'APPLICATION_OFFLINE\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-question font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_OFFLINE_MESSAGES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/offline/message/message.directive.html",'<div class="message">\n  <div class="row">\n    <div class="col-md-12">\n      <span class="bold">From: </span>\n      [<a href="" data-ng-click="openContact(message.email)">{{message.email}}</a>]\n    </div>\n  </div>\n  <br>\n  <span class="todo-tasklist-date">\n    <i class="icon-calendar"></i> {{message.createdAt | date:\'medium\'}} (<span am-time-ago="message.createdAt"></span>)\n  </span>\n  <hr>\n  <div class="body text-left message-body" data-ng-bind="message.text"></div>\n  <h5 data-ng-hide="message.text" class="media-heading"><i>{{\'MESSAGE_NO_AVAILABLE_TEXT\' | translate | lowercase}}</i></h5>\n</div>\n'),a.put("app/channels/chat/offline/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView();">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-bubble"></i>\n					<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-login"></i>\n					<a href="/channels/chat/offline/list">Offline</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-user"></i>\n					<a href="#">{{enquiry.username}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE CONTENT -->\n		<div class="portlet light">\n			<div class="portlet-title">\n				<div class="caption">\n					<span data-ng-if="enquiry.ChatWebsite" class="caption-subject font-green-sharp bold uppercase">{{enquiry.ChatWebsite.name}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<div class="row">\n					<div class="col-md-4">\n						<!-- Visitor Information -->\n						<div class="portlet">\n							<div class="portlet-body">\n								<v-accordion class="vAccordion--default">\n									<v-pane expanded="true">\n										<v-pane-header>\n											<ng-letter-avatar data-ng-if="enquiry.ChatVisitor" height="40" width="40" data="{{enquiry.ChatVisitor.fullname}}" fontsize="25" avatarcustombgcolor="#B0B0B0" charCount="2" avatarcustomborder="border:2px solid #EA4C61" shape="round"></ng-letter-avatar>\n										</v-pane-header>\n										<v-pane-content>\n											{{\'APPLICATION_NAME\' | translate}}:<p>{{enquiry.ChatVisitor.fullname}}</p>\n											{{\'APPLICATION_EMAIL\' | translate}}:<p><a data-ng-click="openContact(enquiry.ChatVisitor.email)" href="">{{enquiry.ChatVisitor.email}}</a></p>\n											<span data-ng-if="enquiry.ChatVisitor.labelOfflineData1">{{enquiry.ChatVisitor.labelOfflineData1}}: <p>{{enquiry.ChatVisitor.offlineData1}}</p></span>\n											<span data-ng-if="enquiry.ChatVisitor.labelOfflineData2">{{enquiry.ChatVisitor.labelOfflineData2}}: <p>{{enquiry.ChatVisitor.offlineData2}}</p></span>\n											<span data-ng-if="enquiry.ChatVisitor.labelOfflineData3">{{enquiry.ChatVisitor.labelOfflineData3}}: <p>{{enquiry.ChatVisitor.offlineData3}}</p></span>\n											{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}:<p>{{enquiry.ChatVisitor.remote_address}}</p>\n											{{\'APPLICATION_BROWSER\' | translate}}:<p>{{enquiry.ChatVisitor.browser}}</p>\n											{{\'APPLICATION_REFERER\' | translate}}:<p>{{enquiry.ChatVisitor.referer}} - {{enquiry.ChatWebsite.name}}</p>\n											{{\'APPLICATION_OS\' | translate}}:<p>{{enquiry.ChatVisitor.os}}</p>\n										</v-pane-content>\n									</v-pane>\n								</v-accordion>\n							</div>\n						</div>\n					</div>\n					<div class="col-md-8">\n						<!-- Offline message -->\n						<div id="mail-box">\n							<ul class="chats">\n								<li class="in">\n									<enquiry-message message="enquiry" list-id="enquiry.ChatWebsite.ListId"></enquiry-message>\n								</li>\n							</ul>\n						</div>\n					</div>\n				</div>\n			</div>\n			<!-- END PROFILE CONTENT -->\n		</div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/online/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-bubble"></i>\n						<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-login"></i>\n						<a href="/channels/chat/online/list">{{ \'APPLICATION_ONLINE\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-question font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_VISITORS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/online/view/view.detail.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DETAIL\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body row" data-ng-init="initView()">\n				<div class="col-md-6">\n					<div class="news-blocks">\n						<h3>\n							<a href="#" class="inactive-link">{{\'APPLICATION_MESSAGES\' | translate}}</a>\n							<!-- <a href="#" data-ng-click="export()" data-ng-show="chatRoom.ChatMessages.length" class="btn btn-sm blue pull-right"><i class="icon-cloud-download"></i> {{\'APPLICATION_EXPORT\' | translate}} CSV </a> -->\n							<a href="api/chat/rooms/{{chatRoom.id}}/export" target="_blank" data-ng-show="chatRoom.ChatMessages.length" class="btn btn-sm blue pull-right"><i class="icon-cloud-download"></i> {{\'APPLICATION_EXPORT\' | translate}} CSV </a>\n							<hr>\n						</h3>\n						<div class="news-block-tags">\n							<em am-time-ago="chatRoom.ChatVisitor.ChatEnquiry.createdAt"></em>\n						</div>\n						<p>\n							<div ng-scrollbars ng-scrollbars-config="config">\n								<ul class="chats">\n									<li data-ng-class="{\'out\': message.User, \'in\':message.ChatVisitor}" data-ng-repeat="message in chatRoom.ChatMessages | orderBy:\'createdAt\'">\n										<img class="avatar" data-ng-src="api/users/avatar/{{message.User.userpic || \'unknown_avatar\'}}">\n										<div class="message">\n											<span class="arrow">\n											</span>\n											<a href="#" class="name">\n												{{message.User ? message.User.fullname : message.ChatVisitor.fullname}}\n											</a>\n											<span class="datetime">\n												at {{message.createdAt | date: \'medium\'}}\n											</span>\n											<span class="body">\n												{{message.body}}\n											</span>\n										</div>\n									</li>\n								</ul>\n							</div>\n						</div>\n					</div>\n					<div class="col-md-6">\n						<div class="news-blocks">\n							<h3>\n								<a href="#" class="inactive-link">{{\'APPLICATION_VISITOR\' | translate}}</a>\n								<hr>\n							</h3>\n							<div class="margin-top-20 profile-desc-link">\n								<i class="icon-user"></i>\n								<a href="#" class="inactive-link">{{chatRoom.ChatVisitor.fullname}}</a>\n							</div>\n							<div class="margin-top-20 profile-desc-link">\n								<i class="icon-envelope"></i>\n								<a href="#" class="inactive-link">{{chatRoom.ChatVisitor.email}}</a>\n							</div>\n							<div class="margin-top-20 profile-desc-link">\n								<i class="icon-globe"></i>\n								<a href="#" class="inactive-link">{{chatRoom.ChatVisitor.remote_address}}</a>\n							</div>\n							<div class="margin-top-20 profile-desc-link">\n								<i class="icon-home"></i>\n								<a href="#" class="inactive-link">{{chatRoom.ChatVisitor.referer}} - {{chatRoom.ChatVisitor.ChatWebsite.name}}</a>\n							</div>\n							<div class="margin-top-20 profile-desc-link">\n								<i class="icon-cursor"></i>\n								<a href="#" class="inactive-link">{{chatRoom.ChatVisitor.browser}}</a>\n							</div>\n							<div class="margin-top-20 profile-desc-link">\n								<i class="icon-screen-desktop"></i>\n								<a href="#" class="inactive-link">{{chatRoom.ChatVisitor.os}}</a>\n							</div>\n						</div>\n					</div>\n				</div>\n			</div>\n		</div>\n	</div>\n'),a.put("app/channels/chat/online/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-bubble"></i>\n					<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-login"></i>\n					<a href="/channels/chat/online/list">Online</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/enquiry.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- START USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{chatRoom.ChatVisitor.email}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{chatRoom.ChatVisitor.fullname}}\n					</div>\n				</div>\n				<!-- END USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.chat.online.view.detail\')}">\n							<a data-ng-href="/channels/chat/online/view/{{chatRoom.id}}/detail">\n							<i class="icon-tag"></i>\n							{{ \'APPLICATION_DETAIL\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/preview/preview.html",'<style>\n.xc_header_logo\n{\n	display:block;\n  background-image:url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/motion_logo.png);\n	width:40px;\n	height:40px;\n	float:left;;\n	margin-left: 10px !important;\n  margin-top: 6px !important;\n}\n.xc_rating {\n  text-align: center;\n}\n.xc_rating_label > input{ /* HIDE RADIO */\n  display:none;\n}\n.xc_rating_label > input + img{ /* IMAGE STYLES */\n  cursor:pointer;\n  border:2px solid transparent;\n}\n.xc_rating_label > input:checked + img{ /* (CHECKED) IMAGE STYLES */\n  /*border:2px solid #f00;*/\n  background-color: #efefef;\n}\n\n.xc_label {\n  display: inline-block;\n  max-width: 100%;\n  margin-bottom: 5px;\n  font-weight: bold;\n}\n\n.xc_online_message,\n.xc_offline_message,\n.xc_rating_message\n{\n  text-align: center;\n}\n\n.xc_div_group {\n  margin: 10px 0 10px 0;\n}\n.xc_footer\n{\n  text-align: center;\n  padding-bottom: 5px;\n}\n\n.xc_powered\n{\n  color: grey;\n  font: 10px/16px "Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif;\n  padding-bottom: 5px;\n}\n\n.xc_chat_container\n{\n  //width:379px;\n  //position:fixed;\n  //bottom:0;\n  //right:50px;\n  z-index:9999;\n  background-color:transparent;\n}\n\n.xc_chat_container *\n{\n  font-family:Arial,Helvetica,sans-serif;\n  font-size:13px;\n  margin:0;\n  padding:0;\n}\n\n.xc_chat_container p\n{\n  margin:5px 0;\n}\n\n.xc_signup_wrapper\n{\n  max-height:375px;\n}\n\n.xc_conversation_container\n{\n  max-height:375px;\n  list-style:none;\n  overflow:auto;\n  margin:0;\n  padding:20px 10px;\n}\n\n.xc_conversation_container a\n{\n  color:#036;\n}\n\n.xc_conversation_container a.xc_btn_style\n{\n  color:#fff;\n}\n\ndiv.xc_chat_head\n{\n  color:#fff;\n  background:{{chatWebsite.color}};\n  //border-radius: 20px 20px 0px 0px !important;\n  height:52px;\n  line-height:55px;\n  cursor:pointer;\n}\n\ndiv.xc_chat_head.rounded\n{\n  border-radius: 20px 20px 0px 0px !important;\n}\n\ndiv.xc_chat_head.squared\n{\n  //border-radius: 20px 20px 0px 0px !important;\n}\n\n.xc_chat_head-title\n{\n  margin:5px 0 0 15px;\n  color: #fff;\n}\n\n.xc_header_icon\n{\n  display:block;\n  background-image:url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/iconVisitorchat.png);\n  width:21px;\n  height:16px;\n  float:right;\n  margin:20px 20px 0 0;\n}\n\n.xc_header_icon span.xc_notification_badge span\n{\n  display:block;\n  height:16px;\n  width:15px;\n  text-align:center;\n  font-size:9px;\n  color:#555;\n  position:relative;\n  top:-20px;\n  left:4px;\n  margin:0;\n  padding:0;\n}\n\n.xc_sub-head-spacer\n{\n  padding:1px;\n}\n\n.xc_conversation\n{\n  display:none;\n  margin:0 12px 0 11px;\n}\n\n.xc_chat_toggle_container\n{\n  /*background:mediumslateblue center 52px;*/\n  background: white;\n  border-style: solid;\n  border-width: 1px;\n  border-color: {{chatWebsite.color}};\n  //display:none;\n}\n\n.xc_signup_wrapper,.xc_notifications_wrapper,.xc_enquiry_wrapper,.xc_rating_wrapper\n{\n  //display:none;\n  display:block;\n  overflow:auto;\n  line-height:1;\n  padding:25px;\n}\n\n.xc_exit_chat_container\n{\n  text-align:right;\n  width:95%;\n  margin:0 auto;\n  padding:5px 1px 0 0;\n}\n\n.xc_exit_chat_container span,.xc_exit_chat_container a\n{\n  font-size:80%;\n  color:#666;\n  text-decoration:none;\n}\n\n.xc_exit_chat_container a:hover\n{\n  color:#333;\n}\n\na.xc_btn_exit_chat_confirm:hover\n{\n  color:red;\n}\n\na.xc_btn_exit_chat_cancel:hover\n{\n  color:#0c0;\n}\n\nform.xc_form_reply\n{\n  position:relative;\n}\n\n.xc_form_reply\n{\n  /*background-color:#e3e3e3;*/\n  text-align:center;\n  /*border-top:1px solid #d3d3d3;*/\n}\n\n.xc_input_message\n{\n  height:100px;\n  margin:10px auto 5px;\n}\n\n.xc_input_enquiry_message,\n.xc_input_rating_message\n{\n  height:100px;\n}\n\n.xc_form_signup,.xc_form_enquiry,.xc_form_rating\n{\n  /*text-align:center;*/\n}\n\n.xc_chat_container textarea,.xc_chat_container input[type=text]\n{\n  width:95%;\n  min-width:95%;\n  max-width:95%;\n  -webkit-box-sizing:border-box;\n  -moz-box-sizing:border-box;\n  box-sizing:border-box;\n  background-color:#fff;\n  border:1px solid #ccc;\n  -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);\n  -moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);\n  box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);\n  -webkit-transition:border linear .2s, box-shadow linear .2s;\n  -moz-transition:border linear .2s, box-shadow linear .2s;\n  -o-transition:border linear .2s, box-shadow linear .2s;\n  transition:border linear .2s, box-shadow linear .2s;\n  display:inline-block;\n  font-size:14px;\n  line-height:20px;\n  color:#555;\n  -webkit-border-radius:4px;\n  -moz-border-radius:4px;\n  border-radius:4px;\n  vertical-align:middle;\n  margin:3px 0;\n  padding:4px 6px;\n  resize: none;\n}\n\n.xc_chat_container textarea:focus,.xc_chat_container input[type=text]:focus\n{\n  outline: {{chatWebsite.color_focus}} auto 5px;\n}\n\n.xc_chat_container input[type=text]\n{\n  height: 30px;\n}\n\n.xc_message_sending textarea, .xc_enquiry_sending textarea\n{\n  background: #fff url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/loading.gif) 98% 5px no-repeat;\n}\n\n.xc_chatrow\n{\n  display:block;\n  border-top:1px dashed #e3e3e3;\n  margin:5px 0;\n  clear: both;\n}\n\n.xc_chatrow p\n{\n  color:#444;\n  word-wrap:break-word;\n}\n\n.xc_time\n{\n  float:right;\n  font-size:80%;\n  color:#ccc;\n  padding-left:12px;\n  margin:3px;\n}\n\n.xc_submission_pending\n{\n  background:transparent url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/bullet_clock.png) left center norepeat;\n}\n\n.xc_submission_confirmed\n{\n  background:transparent url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/bullet_tick.png) left center norepeat;\n}\n\n.xc_fullname\n{\n  font-weight:700;\n}\n\n.xc_fullname:after\n{\n  content:":";\n}\n\n.xc_avatar\n{\n  float: left;\n  margin: 0 5px 5px 0;\n  display: inline-block;\n  width: 40px;\n  height: 40px;\n  border-radius: 5px;\n  -moz-border-radius: 5px;\n  -webkit-border-radius: 5px;\n}\n\n.xc_smilie\n{\n  background-repeat:no-repeat;\n  display:inline-block;\n  width:18px;\n  height:18px;\n  text-indent:-9999px;\n  white-space:nowrap;\n}\n\n.xc_btn_load_more\n{\n  width:100%!important;\n}\n\n.xc_notifications_wrapper\n{\n  text-shadow:0 1px 0 rgba(255,255,255,0.5);\n}\n\n.xc_notification_success\n{\n  color:#468847;\n}\n\n.xc_notification_error\n{\n  color:#b94a48;\n}\n\n.xc_errorlist\n{\n  margin:0 0 0 25px;\n  padding:0;\n}\n\ni.xc_btn_notifications_close\n{\n  float:right;\n  font-weight:700;\n  font-size:20px;\n  color:#ccc;\n  cursor:pointer;\n  margin:-15px 0 0;\n  padding:0;\n}\n\n.xc_btn_style\n{\n  width:95%;\n  text-align:center;\n  line-height:1.2;\n  font-size:90%;\n  -moz-box-shadow:inset 0 1px 0 0 {{chatWebsite.color_button}};\n  -webkit-box-shadow:inset 0 1px 0 0 {{chatWebsite.color_button}};\n  box-shadow:inset 0 1px 0 0 {{chatWebsite.color_button}};\n  background:0;\n  background-color:{{chatWebsite.color_button}};\n  -moz-border-radius:4px;\n  -webkit-border-radius:4px;\n  border-radius:4px;\n  border:1px solid {{chatWebsite.color_button}};\n  display:inline-block;\n  color:#fff;\n  font-weight:700;\n  text-decoration:none;\n  text-shadow:1px 1px 0 #000c17;\n  margin:0 auto 5px;\n  padding:2px 0;\n}\n\n.xc_btn_style:hover\n{\n  background:0;\n  background-color:{{chatWebsite.color_button}};\n  color: #fff;\n  text-decoration: none;\n}\n\n.xc_btn_style:active\n{\n  position:relative;\n  top:1px;\n}\n\n.xc_composing_container\n{\n  display: none;\n  width: 95%;\n  margin: 0 auto;\n  background: transparent url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/bullet_pencil.png) 6px center no-repeat;\n  padding-left: 19px;\n  font-style: italic;\n}\n\n@media only screen and (max-height: 620px) {\n  .xc_conversation_container\n  {\n    max-height:300px!important;\n  }\n}\n\n@media only screen and (max-height: 545px) {\n  .xc_conversation_container\n  {\n    max-height:200px!important;\n  }\n}\n\n@media only screen and (max-height: 445px) {\n  .xc_conversation_container\n  {\n    max-height:150px!important;\n  }\n}\n\n@media only screen and (max-width: 480px) {\n  .xc_chat_container\n  {\n    width:95%!important;\n    right:auto!important;\n    -webkit-border-top-left-radius:15px;\n    -webkit-border-top-right-radius:15px;\n    -moz-border-radius-topleft:15px;\n    -moz-border-radius-topright:15px;\n    border-top-left-radius:15px;\n    border-top-right-radius:15px;\n    box-shadow:0 0 5px rgba(0,0,0,.5);\n    -webkit-box-shadow:0 0 5px rgba(0,0,0,.5);\n    -moz-box-shadow:0 0 5px rgba(0,0,0,.5);\n  }\n\n  div.xc_chat_head\n  {\n    background-color:#036;\n    background-image:none;\n    line-height:25px;\n    height:auto;\n    -webkit-border-top-left-radius:15px;\n    -webkit-border-top-right-radius:15px;\n    -moz-border-radius-topleft:15px;\n    -moz-border-radius-topright:15px;\n    border-top-left-radius:15px;\n    border-top-right-radius:15px;\n    padding:10px;\n  }\n\n  .xc_chat_toggle_container\n  {\n    background-color:#fff;\n    background-image:none;\n    border-color:#036;\n    border-style:solid;\n    border-width:0 1px;\n  }\n\n  .xc_header_icon\n  {\n    background-image:url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/icon_visitorchat.png);\n    margin:0;\n  }\n\n  .xc_header_icon span.xc_notification_badge span\n  {\n    top:-5px;\n    left:5px;\n  }\n\n  .xc_notification_success\n  {\n    background-color:#dff0d8;\n    border:1px solid #d6e9c6;\n  }\n\n  .xc_conversation_container\n  {\n    max-height:375px;\n    border-color:#036;\n  }\n\n  .xc_notification_error\n  {\n    background-color:#f2dede;\n    border:1px solid #eed3d7;\n  }\n\n  .xc_sub-head-spacer\n  {\n    display:none;\n    padding:0;\n  }\n\n  .xc_chat_head-title,.xc_conversation\n  {\n    margin:0;\n  }\n}\n</style>\n<div class="xc_chat_container">\n  <div class="xc_chat_head {{chatWebsite.header_shape}}">\n    <i class="xc_header_icon">\n      <span class="xc_notification_badge">\n        <span class="xc_notification_badge_number"></span>\n      </span>\n    </i>\n    <i class="xc_header_logo" style="background-image:url(/api/xchatty/assets?resource=images/{{(chatWebsite.defaultLogo || !license.custom) ? \'motionLogo.png\' : (!chatWebsite.defaultLogo && chatWebsite.logo && license.custom) ? chatWebsite.logo+\'&uploaded\' : \'motionLogo.png\'}});background-size:contain;"></i>\n	</a>\n    <span class="xc_chat_head-title">{{statePreview.state == \'online\' ? chatWebsite.header_online : chatWebsite.header_offline}}</span>\n  </div>\n  <div class="xc_chat_toggle_container">\n    <div class="xc_sub-head-spacer"></div>\n    <!-- <div class="xc_notifications_wrapper">\n    <ul class="xc_errorlist"></ul>\n  </div> -->\n  <div class="xc_enquiry_wrapper" data-ng-show=\'statePreview.state == "offline"\'>\n    <form class="xc_form_enquiry" accept-charset="UTF-8">\n      <p class="xc_offline_message" ng-bind-html=\'chatWebsite.offline_message\'></p>\n      <br>\n      <div ng-if="chatWebsite.enquiry_enable">\n        <div class="xc_div_group">\n          <label for="enquiryFullname" class="xc_label">{{chatWebsite.name_title}} *</label>\n          <input id="enquiryFullname" maxlength="45" data-label="Name" type="text" name="data[Enquiry][fullname]" placeholder="{{chatWebsite.username_placeholder}}" class="xc_input_enquiry_fullname" required/>\n        </div>\n        <br>\n        <div class="xc_div_group">\n          <label for="enquiryEmail" class="xc_label">{{chatWebsite.email_title}} *</label>\n          <input id="enquiryEmail" maxlength="85" type="text" data-label="Email Address" name="data[Enquiry][email]" placeholder="{{chatWebsite.email_placeholder}}" class="xc_input_enquiry_email" required/>\n        </div>\n        <br>\n        <div class="xc_div_group">\n          <label for="enquiryMessage" class="xc_label">{{chatWebsite.message_title}} *</label>\n          <textarea id="enquiryMessage" data-label="Message" maxlength="1500" placeholder="{{chatWebsite.enquiry_message_placeholder}}" name="data[Enquiry][message]" class="xc_input_enquiry_message" required></textarea>\n        </div>\n        <br>\n        <button type="submit" class="xc_btn_enquiry xc_btn_style">{{chatWebsite.enquiry_button}}</button>\n      </div>\n    </form>\n  </div>\n  <div class="xc_signup_wrapper" data-ng-show=\'statePreview.state == "online"\'>\n    <form class="xc_form_signup" accept-charset="UTF-8">\n      <p class="xc_online_message" ng-bind-html=\'chatWebsite.online_message\'></p>\n      <br>\n      <div class="xc_div_group">\n        <label for="dataFullname" class="xc_label">{{chatWebsite.name_title}} *</label>\n        <input maxlength="45" id="dataFullname" data-label="Fullname" type="text" name="data[Discussion][fullname]" placeholder="{{chatWebsite.username_placeholder}}" class="xc_input_fullname" required/>\n      </div>\n      <br>\n      <div class="xc_div_group">\n        <label for="dataEmail" class="xc_label">{{chatWebsite.email_title}} *</label>\n        <input maxlength="85" id="dataEmail" data-label="Email Address" type="text" name="data[Discussion][email]" placeholder="{{chatWebsite.email_placeholder}}" class="xc_input_email" required/>\n      </div>\n      <br>\n      <input type="hidden" class="xc_input_visitor_time" name="data[Discussion][visitor_time]" />\n      <button type="submit" class="xc_btn_signup xc_btn_style">{{chatWebsite.start_chat_button}}</button>\n    </form>\n  </div>\n  <div class="xc_rating_wrapper" data-ng-show=\'statePreview.state == "rating"\'>\n    <form class="xc_form_rating" accept-charset="UTF-8">\n      <p class="xc_rating_message">{{chatWebsite.rating_message}}</p>\n      <br>\n      <div class="xc_rating">\n        <label class="xc_rating_label" style="padding:30px;">\n          <input type="radio" name="data[Rating][rating]" value="good" />\n          <img src="{{chatWebsite.remote}}/api/xchatty/assets?resource=images/like.png" alt="Good" height="50"/>\n        </label>\n        <label class="xc_rating_label" style="padding:30px;">\n          <input type="radio" name="data[Rating][rating]" value="bad"/>\n          <img src="{{chatWebsite.remote}}/api/xchatty/assets?resource=images/dislike.png" alt="Good" height="50"/>\n        </label>\n      </div>\n      <div class="xc_div_group">\n        <label for="ratingMessage" class="xc_label">Message</label>\n        <textarea id="ratingMessage" data-label="Message" maxlength="1500" name="data[Rating][message]" class="xc_input_rating_message"></textarea>\n      </div>\n      <button type="submit" class="xc_button_rating xc_btn_style">{{chatWebsite.rating_send}}</button>\n      <button type="button" class="xc_button_skip_rating xc_btn_style">{{chatWebsite.rating_skip}}</button>\n    </form>\n  </div>\n  <div class="xc_footer">\n    <div data-ng-if="chatWebsite.defaultWhiteLabel || !license.custom" class="xc_powered"><a>Powered by xCALLY</a></div>\n		<div data-ng-if="!chatWebsite.defaultWhiteLabel && license.custom" data-ng-bind-html="chatWebsite.whiteLabel"></div>\n  </div>\n</div>\n</div>\n'),a.put("app/channels/chat/queue/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required />\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START STRATEGY -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.strategy.$touched || form.$submitted) && form.strategy.$invalid}">\n      <label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.strategy" name="strategy" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n        <ui-select-choices repeat="strategy in [\'beepall\',\'roundrobin\',\'rrmemory\'] | filter: $select.search">\n          <div ng-bind-html="strategy.toUpperCase() | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.strategy.$touched || form.$submitted) && form.strategy.$invalid && form.strategy.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END STRATEGY -->\n\n    <!-- START TIMEOUT -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.timeout.$touched || form.$submitted) && form.timeout.$invalid}">\n      <label class="control-label">{{\'APPLICATION_AGENT_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="number" name="timeout" placeholder="Timeout" class="form-control" data-ng-model="item.timeout" required min="1"/>\n      <span data-ng-show="(form.timeout.$touched || form.$submitted) && form.timeout.$invalid && form.timeout.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TIMEOUT -->\n\n    <!-- START AGENTS-->\n    <div class="form-body" data-ng-init="getTeams()">\n      <label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n      <div class="input-group input-small mbottom20">\n        <input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="item.penalty" readonly>\n        <div class="spinner-buttons input-group-btn btn-group-vertical">\n          <button type="button" class="btn spinner-up btn-xs blue" data-ng-click="item.penalty=item.penalty+1">\n            <i class="fa fa-angle-up"></i>\n          </button>\n          <button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!item.penalty" data-ng-click="item.penalty=item.penalty-1">\n            <i class="fa fa-angle-down"></i>\n          </button>\n        </div>\n      </div>\n      <div class="form-group last">\n        <div class="col-md-12" id="multi-select-team">\n        </div>\n      </div>\n    </div>\n    <!-- END AGENTS-->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),
-a.put("app/channels/chat/queue/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-bubble"></i>\n						<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-docs"></i>\n						<a href="#">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_QUEUES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="#" data-ng-click="createItem()" data-ng-if="Auth.isAdmin()">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_QUEUE\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/queue/view/view.agents.html",'<div class="row" data-ng-init="getTeams()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- BEGIN FORM-->\n				<form action="index.html" class="form-horizontal form-row-seperated">\n					<div class="form-body">\n						<label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n						<div class="input-group input-small mbottom20">\n							<input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="queue.penalty" readonly>\n							<div class="spinner-buttons input-group-btn btn-group-vertical">\n								<button type="button" class="btn spinner-up btn-xs blue" data-ng-click="queue.penalty=queue.penalty+1">\n									<i class="fa fa-angle-up"></i>\n								</button>\n								<button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!queue.penalty" data-ng-click="queue.penalty=queue.penalty-1">\n									<i class="fa fa-angle-down"></i>\n								</button>\n							</div>\n						</div>\n						<div class="form-group last">\n							<div class="col-md-12" id="multi-select-team">\n							</div>\n						</div>\n					</div>\n				</form>\n				<!-- END FORM-->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/chat/queue/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getQueue()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-bubble"></i>\n					<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/channels/chat/queues/list">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					<i data-ng-show="queue" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="queue">\n					<a href="#">{{queue.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/queue.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{queue.name}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.chat.queues.view.settings\')}">\n							<a data-ng-href="/channels/chat/queues/view/{{queue.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.channels.chat.queues.view.agents\')}" data-ng-show="Auth.getCurrentUser().role === \'admin\'">\n							<a data-ng-href="/channels/chat/queues/view/{{queue.id}}/agents">\n							<i class="icon-people"></i>\n							{{ \'APPLICATION_AGENTS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/queue/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.general" data-ng-submit="forms.general.$valid && updateChatQueue()" novalidate>\n					<!-- START NAME -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="queue.name" data-ng-pattern="settings.patternName" required />\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.pattern" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n						</span>\n					</div>\n					<!-- END NAME -->\n\n					<!-- START STRATEGY -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.strategy.$touched || forms.general.$submitted) && forms.general.strategy.$invalid}">\n						<label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}</label>\n						<ui-select data-ng-model="queue.strategy" name="strategy" theme="bootstrap">\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n							<ui-select-choices repeat="strategy in [\'beepall\',\'roundrobin\',\'rrmemory\'] | filter: $select.search">\n								<div ng-bind-html="strategy.toUpperCase() | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n					</div>\n					<!-- END STRATEGY -->\n\n					<!-- START TIMEOUT -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_AGENT\' | translate}} {{\'APPLICATION_TIMEOUT\' | translate}}</label>\n						<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" min="1" data-ng-model="queue.timeout"/>\n					</div>\n					<!-- END TIMEOUT -->\n\n					<!-- START DESCRIPTION -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n						<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="queue.description"/>\n					</div>\n					<!-- END DESCRIPTION -->\n\n					<input data-ng-if="Auth.isAdmin()" class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/chat/realtime/view/agent/agent.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-tree-view ui-grid-expandable-row ui-grid-pagination ui-grid-auto-resize>\n			<span us-spinner spinner-key="grid-spinner" spinner-start-active="true"></span>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/realtime/view/agent/agent.modal.info.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INTERFACE_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<div data-ng-if="agent.ipaddr" class="well">\n  <div>{{agent.ipaddr}}:{{agent.port}}</div>\n  <div>{{agent.fullcontact}}</div>\n  <div>{{agent.useragent}}</div>\n  <div>{{agent.lastms}}</div>\n</div>\n<div data-ng-if="!agent.ipaddr" class="alert alert-danger" role="alert">\n  {{\'MESSAGE_NO_AVAILABLE_INFO\' | translate}}\n</div>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/chat/realtime/view/agent/queue.modal.add.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_JOIN_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <div class="form-group row">\n  <label class="col-md-2 control-label" style="margin-top: 7px;">{{\'APPLICATION_QUEUE\' | translate}}:</label>\n  <div class="col-md-10">\n    <ui-select multiple ng-model="item.queues" theme="bootstrap" required>\n      <ui-select-match placeholder="{{\'APPLICATION_QUEUE\' | translate}}">{{$item.name}}</ui-select-match>\n      <ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n        <div ng-bind-html="queue.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n</div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/chat/realtime/view/application/application.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initApplications()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns class="ui-grid" ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/realtime/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-bubble"></i>\n					<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-energy"></i>\n					<a href="#">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<div>\n			<nav class="navbar navbar-default" role="navigation">\n				<div class="collapse navbar-collapse">\n					<ul class="nav navbar-nav">\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.chat.realtime.view.agents\')}">\n							<a href="/channels/chat/realtime/view/agents">\n								{{\'APPLICATION_AGENTS\' | translate}}\n							</a>\n						</li>\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.chat.realtime.view.applications\')}">\n							<a href="/channels/chat/realtime/view/applications">\n								{{\'APPLICATION_APPLICATIONS\' | translate}}\n							</a>\n						</li>\n					</ul>\n				</div>\n			</nav>\n		</div>\n\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/room/external/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n	<div class="portlet light" data-ng-init="initView()">\n		<div class="portlet-title">\n	<div class="caption">\n		<div class="btn-group btn-group-solid">\n			<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'OPEN\'" uib-uncheckable>OPEN</button>\n		</div>\n		<div class="btn-group btn-group-solid">\n			<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'CLOSED\'" uib-uncheckable>CLOSED</button>\n		</div>\n	</div>\n	<div class="actions">\n		<a href="#" class="btn btn-icon-only blue" data-ng-click="tagItems();" data-ng-show="id.length">\n			<i class="fa fa-tags"></i>\n		</a>\n		<a href="#" class="btn btn-icon-only default" data-ng-click="getPage();">\n			<i class="fa fa-refresh"></i>\n		</a>\n	</div>\n</div>\n<div class="portlet-title" data-ng-show="tags.length">\n	<!-- START TAGS -->\n	<div class="form-group">\n		<div class="row">\n			<div class="col-md-1">\n				<a href="#" class="btn btn-icon-only">\n					<i class="fa fa-tags" style="color: gray;"></i>\n				</a>\n			</div>\n			<div class="col-md-11">\n				<ui-select multiple data-ng-model="query.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)">\n					<ui-select-match placeholder="Search by tag...">{{$item}}</ui-select-match>\n					<ui-select-choices repeat="tag in tags | filter:$select.search">\n						{{tag}}\n					</ui-select-choices>\n				</ui-select>\n			</div>\n		</div>\n	</div>\n	<!-- END TAGS -->\n</div>\n<div class="portlet-body">\n		<!-- BEGIN UI-GRID SPINNER -->\n		<span us-spinner spinner-key="spinner-grid" spinner-start-active="true"></span>\n		<!-- END UI-GRID SPINNER -->\n\n		<!-- START TABLE -->\n\n		<div ui-grid="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-selection ui-grid-pagination class="ui-grid">\n			<div class="watermark" data-ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/room/group/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n	<div class="portlet light" data-ng-init="initView()">\n		<div class="portlet-title">\n	<div class="caption">\n		<div class="btn-group btn-group-solid">\n			<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'OPEN\'" uib-uncheckable>OPEN</button>\n		</div>\n		<div class="btn-group btn-group-solid">\n			<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'CLOSED\'" uib-uncheckable>CLOSED</button>\n		</div>\n	</div>\n	<div class="actions">\n		<a href="#" class="btn btn-icon-only default" data-ng-click="getPage();">\n			<i class="fa fa-refresh"></i>\n		</a>\n	</div>\n</div>\n<div class="portlet-title" data-ng-show="tags.length">\n	<!-- START TAGS -->\n	<div class="form-group">\n		<div class="row">\n			<div class="col-md-1">\n				<a href="#" class="btn btn-icon-only">\n					<i class="fa fa-tags" style="color: gray;"></i>\n				</a>\n			</div>\n			<div class="col-md-11">\n				<ui-select multiple data-ng-model="query.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)">\n					<ui-select-match placeholder="Search by tag...">{{$item}}</ui-select-match>\n					<ui-select-choices repeat="tag in tags | filter:$select.search">\n						{{tag}}\n					</ui-select-choices>\n				</ui-select>\n			</div>\n		</div>\n	</div>\n	<!-- END TAGS -->\n</div>\n<div class="portlet-body">\n		<!-- BEGIN UI-GRID SPINNER -->\n		<span us-spinner spinner-key="spinner-grid" spinner-start-active="true"></span>\n		<!-- END UI-GRID SPINNER -->\n\n		<!-- START TABLE -->\n\n		<div ui-grid="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination class="ui-grid">\n			<div class="watermark" data-ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/room/internal/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initView()">\n		<!-- BEGIN UI-GRID SPINNER -->\n		<span us-spinner spinner-key="spinner-grid" spinner-start-active="true"></span>\n		<!-- END UI-GRID SPINNER -->\n\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination class="ui-grid">\n			<div class="watermark" data-ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/room/room.add.html",'<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" data-ng-click="$dismiss()" class="close">&times;</button>\n  <h4 class="modal-title">{{\'APPLICATION_NEW_GROUP\' | translate}}</h4>\n</div>\n\n<div class="modal-body">\n  <div class="portlet box blue">\n		<div class="portlet-title">\n			<div class="caption">\n				<i class="icon-people"></i>{{\'APPLICATION_AGENTS\' | translate}}\n			</div>\n		</div>\n		<div class="portlet-body">\n			<ul>\n				<li data-ng-repeat="item in items">\n					 {{item.fullname}}\n				</li>\n        <li data-ng-repeat="item in selected.items">\n					 {{item.fullname}}\n				</li>\n			</ul>\n		</div>\n	</div>\n\n  <ui-select multiple name="items" ng-model="selected.items" theme="bootstrap">\n    <ui-select-match placeholder="{{\'APPLICATION_SELECTED_AGENTS\' | translate}}">{{$item.fullname}}</ui-select-match>\n    <ui-select-choices repeat="{id: agent.id, fullname: agent.fullname} as agent in agents.rows | filter: $select.search">\n      {{agent.fullname}}\n    </ui-select-choices>\n  </ui-select>\n</div>\n\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="selected.items.length">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/chat/room/room.close.html",'<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title | translate" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p ng-if="modal.text && !closed" ng-bind="modal.text | translate"></p>\n  <form name="form" novalidate data-ng-init="initDisposition()">\n  <div class="form-group">\n    <ui-select data-ng-model="item.disposition" name="list" theme="bootstrap" data-ng-disabled="!dispositions.length" required>\n      <ui-select-match placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}">{{$select.selected.name}}</ui-select-match>\n      <ui-select-choices repeat="disposition.name as disposition in dispositions | filter: $select.search">\n        <div ng-bind-html="disposition.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n  <div class="note note-warning" data-ng-hide="dispositions.length">\n    <h4 class="block">Warning!</h4>\n    <p>\n      {{ \'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate }}\n    </p>\n  </div>\n</form>\n  <!-- <div ng-if="modal.html" ng-bind-html="modal.html"></div> -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n  <!-- <button ng-repeat="button in modal.buttons" ng-class="button.classes" ng-click="button.click($event)" ng-bind="button.text" class="btn"></button> -->\n</div>\n'),a.put("app/channels/chat/room/room.directive.html",'<div class="portlet light">\n  <div class="portlet-title">\n    <div class="caption">\n      <span data-ng-if="chatRoom" class="label label-sm label-default">{{chatRoom.status}}</span>\n      <span data-ng-if="chatRoom.ChatWebsite"> | </span>\n      <span data-ng-if="chatRoom.ChatWebsite" class="caption-subject font-green-sharp bold uppercase">{{chatRoom.ChatWebsite.name | truncate: 25: \'...\': true}}</span>\n    </div>\n    <div class="actions">\n      <button class="btn btn-icon-only btn-primary" data-ng-click="addAgent(chatRoom.id)" data-ng-disabled="chatRoom.status === \'CLOSED\'">\n        <i class="fa fa-user-plus"></i>\n      </button>\n      <button class="btn btn-icon-only" data-ng-class="{\'btn-success\':chatRoom.status !== \'CLOSED\',\'grey-cascade\':chatRoom.status === \'CLOSED\'}" data-ng-click="closeRoom(chatRoom.id)" data-ng-if="chatRoom.ChatVisitors.length" data-ng-disabled="chatRoom.status === \'CLOSED\' && chatRoom.disposition">\n        <i data-ng-class="{\'fa fa-upload\':chatRoom.status !== \'CLOSED\',\'icon-target\':chatRoom.status === \'CLOSED\'}"></i>\n      </button>\n      <a href="api/chat/rooms/{{chatRoom.id}}/export" target="_blank" class="btn btn-primary btn-icon-only" data-ng-if="chatRoom" title="{{\'APPLICATION_EXPORT\' | translate}} CSV">\n        <i class="fa fa-download"></i>\n      </a>\n      <button class="btn default btn-icon-only" data-ng-if="chatRoom && chatRoom.status !== \'CLOSED\'" data-ng-click="togglePanelLeft()" title="{{\'APPLICATION_RESIZE\' | translate}}">\n        <i ng-class="panelRight == \'col-md-12\' ? \'icon-size-actual\' : \'icon-size-fullscreen\'"></i>\n      </button>\n    </div>\n  </div>\n  <div class="portlet-body">\n<div class="row">\n  <div data-ng-class="panelLeft" data-ng-show="panelLeft">\n    <div class="portlet">\n      <div class="portlet-body">\n        <div class="portlet-title line">\n          <div class="form">\n            <!-- START TAGS -->\n            <div class="form-group">\n              <div class="row">\n                <div class="col-md-1">\n                  <a href="#" class="btn btn-icon-only">\n                    <i class="fa fa-tags" style="color: gray;"></i>\n                  </a>\n                </div>\n                <div class="col-md-11">\n                  <ui-select multiple data-ng-model="form.tags" theme="bootstrap" on-select="onChanged(chatRoom.id)" on-remove="onChanged(chatRoom.id)">\n                    <ui-select-match placeholder="Tags...">{{$item}}</ui-select-match>\n                    <ui-select-choices repeat="tag in tags | filter:$select.search" class="">\n                      {{tag}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n            </div>\n            <!-- END TAGS -->\n          </div>\n        </div>\n        <v-accordion class="vAccordion--default">\n          <v-pane data-ng-if="chatRoom.ChatVisitors.length" data-ng-repeat="chatVisitor in chatRoom.ChatVisitors" expanded="true">\n            <v-pane-header>\n              <ng-letter-avatar\n              height="40"\n              width="40"\n              data="{{chatRoom.ChatVisitor.fullname}}"\n              fontsize="25"\n              avatarcustombgcolor="#B0B0B0"\n              charCount="2"\n              avatarcustomborder="border:2px solid #EA4C61"\n              shape="round"></ng-letter-avatar>\n            </v-pane-header>\n            <v-pane-content>\n              {{\'APPLICATION_ROOM_ID\' | translate}}: <p>{{chatRoom.id}}</p>\n              {{\'APPLICATION_NAME\' | translate}}: <p>{{chatRoom.ChatVisitor.fullname}}</p>\n              {{\'APPLICATION_EMAIL\' | translate}}: <p><a data-ng-click="openContact(chatRoom.ChatVisitor.email)" href="">{{chatRoom.ChatVisitor.email}}</a></p>\n              <span data-ng-if="chatRoom.ChatVisitor.labelData1">{{chatRoom.ChatVisitor.labelData1}}: <p>{{chatRoom.ChatVisitor.data1}}</p></span>\n              <span data-ng-if="chatRoom.ChatVisitor.labelData2">{{chatRoom.ChatVisitor.labelData2}}: <p>{{chatRoom.ChatVisitor.data2}}</p></span>\n              <span data-ng-if="chatRoom.ChatVisitor.labelData3">{{chatRoom.ChatVisitor.labelData3}}: <p>{{chatRoom.ChatVisitor.data3}}</p></span>\n              {{\'APPLICATION_REMOTE_ADDRESS\' | translate}}: <p>{{chatRoom.ChatVisitor.remote_address}}</p>\n              {{\'APPLICATION_BROWSER\' | translate}}: <p>{{chatRoom.ChatVisitor.browser}}</p>\n              {{\'APPLICATION_REFERER\' | translate}}:<p>{{chatRoom.ChatVisitor.referer}} - {{enquiry.ChatWebsite.name}}</p>\n              {{\'APPLICATION_OS\' | translate}}: <p>{{chatRoom.ChatVisitor.os}}</p>\n            </v-pane-content>\n          </v-pane>\n\n          <v-pane data-ng-repeat="user in chatRoom.Users | filter:{ id: \'!\' + user.id}">\n            <v-pane-header>\n              <ng-letter-avatar\n              height="40"\n              width="40"\n              data="{{user.fullname}}"\n              fontsize="25"\n              avatarcustombgcolor="#B0B0B0"\n              avatarcustomborder="border:2px solid #3399CC"\n              charCount="2"\n              shape="round"></ng-letter-avatar>\n            </v-pane-header>\n            <v-pane-content>\n              {{\'APPLICATION_NAME\' | translate}}: <p>{{user.fullname}}</p>\n              {{\'APPLICATION_ROLE\' | translate}}: <p>{{user.role}}</p>\n              {{\'APPLICATION_INTERNAL\' | translate}}: <p>{{user.internal}}</p>\n              {{\'APPLICATION_EMAIL\' | translate}}: <p><a data-ng-href="mailto:{{user.email}}">{{user.email}}</a></p>\n            </v-pane-content>\n          </v-pane>\n        </v-accordion>\n      </div>\n    </div>\n  </div>\n  <div data-ng-class="panelRight">\n    <div class="note note-info" data-ng-if="chatRoom && chatRoom.status == \'CLOSED\'">\n      <h4 class="block"><i class="icon-info"></i> {{\'MESSAGE_CHAT_ROOM_CLOSED\' | translate}}!</h4>\n      <p>\n        <strong>{{\'MESSAGE_CHAT_ROOM_CLOSED_DETAILS\' | translate}}.</strong>\n      </p>\n      <hr>\n      <p>\n        <i class="icon-target"></i> {{\'APPLICATION_DISPOSITION\' | translate}}: <strong>{{chatRoom.disposition}}</strong>\n      </p>\n      <p>\n        <i class="icon-star"></i> {{\'APPLICATION_RATING\' | translate}}: <strong>{{chatRoom.rating | ucfirst}}</strong>\n      </p>\n      <p>\n        <i class="icon-note"></i> {{\'APPLICATION_RATING_MESSAGE\' | translate}}: <strong>{{chatRoom.ratingMessage}}</strong>\n      </p>\n      <p>\n        <i class="icon-calendar"></i> {{\'APPLICATION_UPDATED_AT\' | translate}}: <strong>{{chatRoom.updatedAt | date:\'medium\'}}</strong> (<span am-time-ago="chatRoom.updatedAt"></span>)\n      </p>\n    </div>\n    <div class="portlet light bordered">\n      <div class="portlet-body">\n        <div id="chat-box" schroll-bottom="chatRoom.ChatMessages">\n        <ul class="chats">\n          <li data-ng-repeat="message in chatRoom.ChatMessages" data-ng-class="message.UserId == user.id ? \'out\' : \'in\'">\n            <div class="avatar" data-ng-class="message.ChatVisitor ? \'pretty-avatar-v\' : \'pretty-avatar\'">\n              <ng-letter-avatar\n              data-ng-if="!message.ChatVisitor"\n              height="40"\n              width="40"\n              fontsize="25"\n              data="{{message.User.fullname}}"\n              avatarcustombgcolor="#B0B0B0"\n              avatarcustomborder="border:2px solid #3399CC"\n              charCount="2"\n              shape="round"></ng-letter-avatar>\n              <ng-letter-avatar\n              data-ng-if="message.ChatVisitor"\n              height="40"\n              width="40"\n              fontsize="25"\n              data="{{message.ChatVisitor.fullname}}"\n              avatarcustombgcolor="#B0B0B0"\n              avatarcustomborder="border:2px solid #EA4C61"\n              charCount="2"\n              shape="round"></ng-letter-avatar>\n            </div>\n            <div class="message">\n              <span class="arrow"></span>\n              <a data-ng-click="message.ChatVisitor && openContact(chatRoom.ChatVisitor.email)" class="name">{{message.User.fullname || message.ChatVisitor.fullname}} </a>\n              <span am-time-ago="message.createdAt"></span>\n              <ng-emoticons emoticons-data="message.body"></ng-emoticons>\n            </div>\n          </li>\n          <li data-ng-if="chatRoom.status === \'CLOSED\'">\n            <div class="media-body" style="text-align: center;">\n              <h5 class="media-heading"><i>{{\'MESSAGE_CHAT_CLOSED\' | translate | lowercase}}</i></h5>\n            </div>\n          </li>\n        </ul>\n      </div>\n      <div class="chat-form" data-ng-if="chatRoom && isMyRoom(chatRoom.Users)">\n        <div class="input-cont">\n          <input class="form-control" type="text" placeholder="Type a message here..." ng-enter="sendMessage()" data-ng-model="message.body" data-ng-disabled="chatRoom.status === \'CLOSED\'"/>\n        </div>\n        <div class="btn-cont">\n          <span class="arrow"></span>\n          <a href="#" class="btn blue icn-only" data-ng-disabled="chatRoom.status === \'CLOSED\'" data-ng-click="sendMessage()">\n            <i class="fa fa-check icon-white"></i>\n          </a>\n        </div>\n      </div>\n      <div class="form-group chat-canned-answer-div" data-ng-if="chatRoom.status !== \'CLOSED\'" data-ng-class="{\'has-error\': forms.compose.subject.$invalid && forms.compose.$submitted}">\n        <div class="row">\n          <div class="col-md-1">\n            <a href="#" class="btn btn-icon-only">\n              <i class="fa fa-magic" style="color: gray;"></i>\n            </a>\n          </div>\n          <div class="col-md-11">\n            <input type="text"\n            data-ng-model="modelOptions.selectedAnswer"\n            uib-typeahead="key for key in getAnswers($viewValue)"\n            placeholder="Canned answers.."\n            typeahead-loading="loadingLocations"\n            typeahead-no-results="noResults"\n            typeahead-on-select="onSelect($item)"\n            class="form-control">\n            <i ng-show="loadingLocations" class="glyphicon glyphicon-refresh"></i>\n            <div ng-show="noResults">\n              <i class="glyphicon glyphicon-remove"></i> No Results Found\n            </div>\n            <span data-ng-show="forms.compose.subject.$invalid && forms.compose.$submitted" class="help-block help-block-error">\n'+"              <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n            </span>\n          </div>\n        </div>\n\n      </div>\n    </div>\n  </div>\n</div>\n</div>\n</div>\n"),
-a.put("app/channels/chat/room/room.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n  <div class="col-md-12">\n    <div class="page-bar">\n      <ul class="page-breadcrumb">\n        <li>\n          <i class="icon-rocket"></i>\n          <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="fa fa-spinner"></i>\n          <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="icon-bubble"></i>\n          <a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="fa fa-users"></i>\n          <a href="#">{{ \'APPLICATION_INTERACTIONS\' | translate }}</a>\n        </li>\n      </ul>\n    </div>\n\n    <div class="row inbox">\n      <div class="col-md-2">\n        <ul class="inbox-nav margin-bottom-10">\n          <li data-ng-class="{active: $state.includes(\'main.channels.chat.room.internal\')}">\n            <a href="/channels/chat/room/internal/list" class="btn">\n              {{\'APPLICATION_INTERNAL\' | translate}}\n            </a>\n            <b></b>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.chat.room.external\')}">\n            <a href="/channels/chat/room/external/list" class="btn">\n              {{\'APPLICATION_EXTERNAL\' | translate}}\n            </a>\n            <b></b>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.chat.room.group\')}">\n            <a href="/channels/chat/room/group/list" class="btn">\n              {{\'APPLICATION_GROUPS\' | translate}}\n            </a>\n            <b></b>\n          </li>\n        </ul>\n      </div>\n\n      <div class="col-md-10">\n        <div class="room-content">\n          <div ui-view></div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/room/template.html",'<div ng-bind-html="neText" ne-hljs></div>\n<div class="ne-video" ng-if="video.host" class="fade">\n  <div class="ne-video-preview" ng-hide="nePlayVideo || !options.video.details">\n    <div class="ne-video-thumb" ng-click="nePlayVideo=!nePlayVideo">\n      <img ng-src="{{video.thumbnail}}" alt=""/>\n      <i class="fa fa-play-circle-o"></i>\n    </div>\n    <div class="ne-video-detail">\n      <div class="ne-video-title">\n        <a ng-href="{{video.url}}">{{video.title}}</a>\n      </div>\n      <div class="ne-video-desc">\n        {{video.description}}\n      </div>\n      <div class="ne-video-stats">\n        <span><i class="fa fa-eye"></i> {{video.views}}</span>\n        <span><i class="fa fa-heart"></i> {{video.likes}}</span>\n      </div>\n    </div>\n  </div>\n  <div class="ne-video-player" ng-if="nePlayVideo || !(options.video.details)">\n    <iframe ng-src="{{video.embedSrc}}" frameBorder="0" width="{{video.width}}" height="{{video.height}}" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>\n  </div>\n</div>\n<div class="ne-video" ng-if="video.basic">\n  <div class="ne-video-player">\n    <div class="player">\n      <video ng-src="{{video.basic}}" controls></video>\n    </div>\n  </div>\n</div>\n<div ng-init="neImageLong=false" ng-class="{false:\'ne-image\', true:\'ne-image ne-image-long\'}[neImageLong]"\nng-if="image.url">\n<div class="ne-image-wrapper">\n  <img ng-src="{{image.url}}" ng-click="neImageLong=!neImageLong" alt=""/>\n</div>\n</div>\n<!-- <div class="ne-pdf" ng-if="pdf.url">\n  <div class="ne-pdf-preview" ng-hide="neShowPdf">\n    <div class="ne-pdf-icon">\n      <i class="fa fa-file-pdf-o"></i>\n    </div>\n    <div class="ne-pdf-detail" >\n      <div class="ne-pdf-title">\n        <a href="">{{pdf.url}}</a>\n      </div>\n      <div class="ne-pdf-view">\n\n        <button><i class="fa fa-download"></i> <a ng-href="{{pdf.url}}" target="_blank">Download</a></button>\n        <button ng-click="neShowPdf=!neShowPdf"><i class="fa fa-eye"></i> View PDF</button>\n\n      </div>\n    </div>\n  </div>\n  <div class="ne-pdf-viewer" ng-if="neShowPdf" ng-show="neShowPdf">\n    <iframe ng-src="{{pdf.url}}" frameBorder="0"></iframe>\n  </div>\n\n</div>\n<div class="ne-audio" ng-if="audio.url">\n  <audio ng-src="{{audio.url}}" controls></audio>\n</div> -->\n'),a.put("app/channels/chat/room/view.tags.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_TAGS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TRANSPORT -->\n  <div class="form-group">\n    <form name="form" novalidate>\n      <!-- START TAGS -->\n      <div class="form-group">\n        <ui-select multiple data-ng-model="item.tags" theme="bootstrap">\n          <ui-select-match placeholder="{{\'APPLICATION_TAGS\' | translate}}">{{$item}}</ui-select-match>\n          <ui-select-choices repeat="tag in tags | filter: $select.search">\n            {{tag}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n      <!-- END TAGS -->\n    </form>\n  </div>\n  <!-- END TRANSPORT -->\n</div>\n<div class="modal-footer">\n  <button type="button" class="btn" data-ng-class="button.class" data-ng-click="button.click()"data-ng-repeat="button in modal.buttons">{{button.text | translate}}</button>\n  <!-- <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button> -->\n</div>\n'),a.put("app/channels/chat/visitor/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-bubble"></i>\n						<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-question"></i>\n						<a href="/channels/chat/visitors/list">{{ \'APPLICATION_VISITORS\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-question font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_VISITORS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/visitor/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-bubble"></i>\n					<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-question"></i>\n					<a href="/channels/chat/visitors/list">{{ \'APPLICATION_VISITORS\' | translate }}</a>\n					<i  class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="chatVisitor">\n					<a href="#">{{chatVisitor.fullname}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/visitor.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{chatVisitor.fullname}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.chat.visitors.view.profile\')}">\n							<a data-ng-href="/channels/chat/visitors/view/{{chatVisitor.id}}/profile">\n							<i class="icon-tag"></i>\n							{{ \'APPLICATION_PROFILE\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/visitor/view/view.profile.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_PROFILE\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n				<div>\n					<h4 class="profile-desc-title">{{chatVisitor.email}}</h4>\n					<div class="margin-top-20 profile-desc-link">\n						<i class="icon-magnifier"></i>\n						<a href="#" class="inactive-link">{{chatVisitor.origin}}</a>\n					</div>\n					<div class="margin-top-20 profile-desc-link">\n						<i class="icon-globe"></i>\n						<a href="#" class="inactive-link">{{chatVisitor.remote_address}}</a>\n					</div>\n					<div class="margin-top-20 profile-desc-link">\n						<i class="icon-user"></i>\n						<a href="#" class="inactive-link">{{chatVisitor.user_agent | truncate: 50: \'...\'}}</a>\n					</div>\n					<div class="margin-top-20 profile-desc-link">\n						<i class="icon-flag"></i>\n						<a href="#" class="inactive-link">{{chatVisitor.visitor_language}}</a>\n					</div>\n					<div class="margin-top-20 profile-desc-link">\n						<i class="icon-home"></i>\n						<a href="#" class="inactive-link">{{chatVisitor.referer}}</a>\n					</div>\n					<div class="margin-top-20 profile-desc-link">\n						<i class="icon-cursor"></i>\n						<a href="#" class="inactive-link">{{chatVisitor.browser}}</a>\n					</div>\n					<div class="margin-top-20 profile-desc-link">\n						<i class="icon-screen-desktop"></i>\n						<a href="#" class="inactive-link">{{chatVisitor.os}}</a>\n					</div>\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/chat/website/list/list.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-bubble"></i>\n					<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-globe"></i>\n					<a href="#">{{ \'APPLICATION_WEB_SITES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n	</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_WEB_SITES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/channels/chat/websites/wizard">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_WEB_SITE\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/website/view/action/list/list.html",'<div class="row" data-ng-init="initActons()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACTIONS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/channels/chat/websites/view/{{chatWebsite.id}}/actions/wizard" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACTION\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/chat/website/view/action/view/view.html",'\n<div class="row" data-ng-init="initAction()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }}</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.settings" ng-submit="updateItem()" novalidate>\n					<!-- START APP -->\n					<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n							<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n							<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n								<div ng-bind-html="app.name | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid && forms.settings.app.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END APP -->\n\n					<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n						<!-- START QUEUE -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$invalid}">\n							<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.ChatQueueId" name="queue" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n									<div ng-bind-html="queue.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="queues.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/chat/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END QUEUE -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n						<!-- START AGENT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$invalid}">\n							<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n								<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n									<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="agents.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END AGENT -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n						<!-- START SENDMAIL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" min="1" required/>\n							<span data-ng-show="(forms.settings.from.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.mail.$touched || forms.settings.$submitted) && forms.settings.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.template.$touched || forms.settings.$submitted) && forms.settings.template.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n									<div ng-bind-html="template.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.template.$touched || forms.settings.$submitted) && forms.settings.template.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END SENDMAIL -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n						<!-- START SENDSms -->\n						<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n								<span data-ng-show="(forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid && forms.settings.to.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.text.$touched || forms.text.$submitted) && forms.settings.text.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<textarea id="text" class="form-control maxlength-handler" maxlength="160"  name="text" data-ng-model="application.data6" required></textarea>\n							<span data-ng-show="(forms.settings.text.$touched || forms.settings.$submitted) && forms.settings.text.$invalid && forms.settings.text.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<!-- END SENDSms -->\n					</div>\n\n					<!-- START INTERVAL_TYPE -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n							<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n								{{ intType.name | translate }}\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END INTERVAL_TYPE -->\n\n					<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n						<!-- START TIME -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n							<div class="input-group input-large">\n								<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n									<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n								</fieldset>\n								<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n								<fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n								<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n							</div>\n						</div>\n						<!-- END TIME -->\n\n						<!-- START ALWAYS -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n							<div class="input-group input-large">\n								<label class="control-label pointer-cursor">\n									<input\n										bs-switch\n										data-ng-model="application.alwaysTime"\n										type="checkbox"\n										switch-active="{{ isActive }}"\n										switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n										switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n										switch-on-color="{{ onColor }}"\n										switch-off-color="{{ offColor }}"\n										switch-animate="{{ animate }}"\n										switch-size="{{ size }}"\n										switch-label="{{ label }}"\n										switch-icon="{{ icon }}"\n										switch-radio-off="{{ radioOff }}"\n										switch-label-width="{{ labelWidth }}"\n										switch-handle-width="{{ handleWidth }}">\n									<!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n								</label>\n							</div>\n						</div>\n						<!-- END ALWAYS -->\n\n						<!-- START WEEKDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END WEEKDAY -->\n\n						<!-- START MONTHDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTHDAY -->\n\n						<!-- START MONTH -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTH -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n						<!-- START INTERVALS -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$invalid}">\n							<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n									{{ interval.name}}\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="intervals.length">\n								<h4 class="block">Warning!</h4>\n								<p>\n									{{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n								</p>\n								<p>\n									{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n								</p>\n							</div>\n							<span data-ng-show="(forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END INTERVALS -->\n\n					</div>\n					<button class="btn green-haze" type="submit">{{\'APPLICATION_UPDATE\' | translate}}</button>\n				</form>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/channels/chat/website/view/action/wizard/wizard.html",'\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n					<wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.action.$valid)">\n						<form name="forms.action" novalidate>\n							<!-- START APP -->\n							<div class="form-group"  data-ng-class="{\'has-error\': forms.action.$submitted && forms.action.app.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n									<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n										<div ng-bind-html="app.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="forms.action.$submitted && forms.action.app.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END APP -->\n\n							<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n								<!-- START AGENT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$invalid}">\n									<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n										<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n											<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="agents.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END AGENT -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n								<!-- START QUEUE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$invalid}">\n									<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.ChatQueueId" name="queue" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n											<div ng-bind-html="queue.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="queues.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/chat/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END QUEUE -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n								<!-- START SENDMAIL -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" min="1" required/>\n										<span data-ng-show="(forms.action.from.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.mail.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n											<div ng-bind-html="template.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END SENDMAIL -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n								<!-- START SENDSms -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n										<span data-ng-show="(forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid && forms.action.to.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<textarea id="text" class="form-control maxlength-handler"  maxlength="160" name="text" data-ng-model="application.data6" required></textarea>\n									<span data-ng-show="(forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid && forms.action.text.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<!-- END SENDSms -->\n							</div>\n\n							<!-- START INTERVAL_TYPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n										{{ intType.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END INTERVAL_TYPE -->\n\n							<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n								<!-- START TIME -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n									<div class="input-group input-large">\n										<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n											<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n										</fieldset>\n										<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n										<fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n										<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n									</div>\n								</div>\n								<!-- END TIME -->\n\n								<!-- START ALWAYS -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n									<div class="input-group input-large">\n										<label class="control-label pointer-cursor">\n											<input\n												bs-switch\n												data-ng-model="application.alwaysTime"\n												type="checkbox"\n												switch-active="{{ isActive }}"\n												switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n												switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n												switch-on-color="{{ onColor }}"\n												switch-off-color="{{ offColor }}"\n												switch-animate="{{ animate }}"\n												switch-size="{{ size }}"\n												switch-label="{{ label }}"\n												switch-icon="{{ icon }}"\n												switch-radio-off="{{ radioOff }}"\n												switch-label-width="{{ labelWidth }}"\n												switch-handle-width="{{ handleWidth }}">\n											<!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n										</label>\n									</div>\n								</div>\n								<!-- END ALWAYS -->\n\n								<!-- START WEEKDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END WEEKDAY -->\n\n								<!-- START MONTHDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTHDAY -->\n\n								<!-- START MONTH -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTH -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n								<!-- START INTERVALS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$invalid}">\n									<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n											{{ interval.name}}\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="intervals.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERVALS -->\n\n							</div>\n\n							<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONTINUE\' | translate}}"/>\n						</form>\n					</wz-step>\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/website/view/disposition/modal/add.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_DISPOSITIONS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.form.$touched || form.$submitted) && form.form.$invalid}">\n      <div class="">\n        <input type="text" name="form" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" class="form-control" data-ng-model="name" required/>\n        <span data-ng-show="form.form.$touched && form.form.$error.required" class="help-block help-block-error">\n          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n        </span>\n      </div>\n    </div>\n    <!-- END NAME -->\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="form.$valid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/chat/website/view/disposition/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DISPOSITIONS\' | translate}}</span>\n				</div>\n				<div class="actions actions-md">\n					<a href="#" class="btn btn-icon-only green" data-ng-click="addDisposition();">\n						<i class="fa fa-plus"></i>\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n				<div class="tab-content">\n					<div class="row" data-ng-hide="dispositions.length">\n						<div class="col-md-12">\n							<div class="note note-info">\n								<h4 class="block">Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}</h4>\n							</div>\n						</div>\n					</div>\n\n					<!-- GENERAL TAB -->\n					<div class="row" data-ng-repeat="disposition in dispositions">\n						<div class="col-md-12 form-group">\n							<div class="input-group">\n								<div>\n									<input class="form-control" type="text" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" data-ng-model="disposition.name">\n								</div>\n								<span class="input-group-btn">\n									<button class="btn btn-success" type="button" data-ng-click="updateDisposition(disposition.id, disposition.name);"><i class="fa fa-cloud-upload fa-fw"></i> {{\'APPLICATION_UPDATE\' | translate}}</button>\n									<button class="btn btn-danger" type="button" data-ng-click="deleteDisposition(disposition.id);"><i class="fa fa-times fa-fw"></i> {{\'APPLICATION_DELETE\' | translate}}</button>\n								</span>\n							</div>\n						</div>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/chat/website/view/embedding/view/view.html",'<div class="row" data-ng-init="initView()">\n  <div class="col-md-12">\n    <div class="portlet light">\n      <div class="portlet-title">\n        <div class="caption caption-md">\n          <i class="icon-globe theme-font hide"></i>\n          <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_EMBEDDING\' | translate}}</span>\n        </div>\n        <div class="actions">\n          <div class="btn-group">\n            <a class="btn green-jungle" href="#" data-ng-click="copyToClipboard();">\n              <i class="fa fa-clipboard"></i> {{\'APPLICATION_COPY_TO_CLIPBOARD\' | translate}}\n            </a>\n          </div>\n        </div>\n      </div>\n      <div class="portlet-body">\n        <div class="row">\n          <div class="col-md-12">\n            <h3>{{\'APPLICATION_EMBED_SNIPPET\' | translate}}</h3>\n            <p>\n              {{\'MESSAGE_EMBED_SNIPPET\' | translate}}\n            </p>\n            <div class="form-body">\n              <div class="form-group">\n                <div class="col-md-12">\n                  <code-mirror lang="html" model="snippetCode"></code-mirror>\n                </div>\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n'),a.put("app/channels/chat/website/view/form/view/view.html",'<div class="row" data-ng-init="getChatWebsiteFields(\'online\');getChatWebsiteFields(\'offline\');">\n  <div class="col-md-12">\n    <div class="portlet light">\n      <div class="portlet-title tabbable-line">\n        <ul class="nav nav-tabs">\n          <li class="active">\n            <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_ONLINE\' | translate}}</a>\n          </li>\n          <li>\n            <a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_OFFLINE\' | translate}}</a>\n          </li>\n        </ul>\n      </div>\n    <div class="portlet-body">\n      <div class="row">\n        <div class="col-md-12">\n          <div class="tab-content">\n            <div class="tab-pane active" id="tab_1_1">\n              <div class="row">\n                <div class="col-md-6">\n                  <div class="portlet">\n                    <div class="portlet-title">\n                      <div class="caption font-green-sharp">\n                        <i class="icon-book-open font-green-sharp"></i>\n                        <span class="caption-subject">{{ \'APPLICATION_FIELDS_SELECTED\' | translate }}</span>\n                      </div>\n                      <div class="actions">\n                        <div class="btn-group">\n                          <a class="btn green-jungle" href="#" data-ng-click="saveForm(\'online\');">\n                            <i class="fa fa-check"></i> {{ \'APPLICATION_SAVE\' | translate }}\n                          </a>\n                        </div>\n                      </div>\n                    </div>\n                    <div class="portlet-body">\n                      <div fb-builder="online"></div>\n                    </div>\n                  </div>\n                </div>\n                <div class="col-md-6">\n                  <div class="portlet">\n                    <div class="portlet-title">\n                      <div class="caption font-green-sharp">\n                        <i class="icon-book-open font-green-sharp"></i>\n                        <span class="caption-subject">{{ \'APPLICATION_FIELDS_AVAILABLE\' | translate }}</span>\n                      </div>\n                    </div>\n                    <div class="portlet-body">\n                      <div fb-components></div>\n                    </div>\n                  </div>\n                </div>\n              </div>\n            </div>\n            <div class="tab-pane" id="tab_1_2">\n              <div class="row">\n                <div class="col-md-6">\n                  <div class="portlet">\n                    <div class="portlet-title">\n                      <div class="caption font-green-sharp">\n                        <i class="icon-book-open font-green-sharp"></i>\n                        <span class="caption-subject">{{ \'APPLICATION_FIELDS_SELECTED\' | translate }}</span>\n                      </div>\n                      <div class="actions">\n                        <div class="btn-group">\n                          <a class="btn green-jungle" href="#" data-ng-click="saveForm(\'offline\');">\n                            <i class="fa fa-check"></i> {{ \'APPLICATION_SAVE\' | translate }}\n                          </a>\n                        </div>\n                      </div>\n                    </div>\n                    <div class="portlet-body">\n                      <div fb-builder="offline"></div>\n                    </div>\n                  </div>\n                </div>\n                <div class="col-md-6">\n                  <div class="portlet">\n                    <div class="portlet-title">\n                      <div class="caption font-green-sharp">\n                        <i class="icon-book-open font-green-sharp"></i>\n                        <span class="caption-subject">{{ \'APPLICATION_FIELDS_AVAILABLE\' | translate }}</span>\n                      </div>\n                    </div>\n                    <div class="portlet-body">\n                      <div fb-components></div>\n                    </div>\n                  </div>\n                </div>\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n</div>\n'),a.put("app/channels/chat/website/view/hooks/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_HOOKS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_ACCEPT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_REJECT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_CLOSE\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- ACCEPT TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.accept" data-ng-submit="forms.accept.$valid && updateItem()" novalidate>\n							<!-- START ACCEPT URL -->\n								<div class="row">\n									<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid}">\n										<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n										<ui-select data-ng-model="account.acceptMethod" name="method" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n											<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n												<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n											</ui-select-choices>\n										</ui-select>\n										<span data-ng-show="(forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid && forms.accept.method.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<div  class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid}">\n										<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n										<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.acceptUrl"  ng-required="account.acceptMethod"/>\n										<span data-ng-show="(forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid && forms.accept.url.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n								<!-- END ACCEPT URL-->\n								<!-- START ACTIONS-->\n								<!-- START PAUSE -->\n								<div class="row" ng-repeat = "action in account.actions">\n									<div  ng-switch="action.action">\n											<div ng-switch-when="pause">\n												<div  class="form-group col-md-4">\n													<label class="control-label">{{\'APPLICATION_PAUSE\' | translate}}</label></br>\n														<input\n														bs-switch\n														data-ng-change="resetActionData(action)"\n														data-ng-model="action.enabled"\n														type="checkbox"\n														switch-active="{{ isActive }}"\n														switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n														switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n														switch-on-color="{{ onColor }}"\n														switch-off-color="{{ offColor }}"\n														switch-animate="{{ animate }}"\n														switch-size="{{ size }}"\n														switch-label="{{ label }}"\n														switch-icon="{{ icon }}"\n														switch-radio-off="{{ radioOff }}"\n														switch-label-width="{{ labelWidth }}"\n														switch-handle-width="{{ handleWidth }}">\n													</div>\n													<div ng-if="action.enabled" class="form-group col-md-8">\n														<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}</label>\n														<ui-select  name="action" data-ng-model="action.type"  theme="bootstrap" >\n															<ui-select-match placeholder="{{\'APPLICATION_TYPE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n															<ui-select-choices repeat=" pause.name as pause in pauses | filter: $select.search">\n																<div ng-bind-html="pause.name | highlight: $select.search | uppercase" ></div>\n															</ui-select-choices>\n														</ui-select>\n													</div>\n											</div>\n								  	</div>\n									</div>\n								<!-- END ACTION -->\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ACCEPT TAB -->\n					<!-- START REJECT TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.reject" data-ng-submit="forms.reject.$valid && updateItem()" novalidate>\n							<!-- START REJECT URL -->\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.rejectMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid && forms.reject.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.rejectUrl" ng-required="account.rejectMethod"/>\n									<span data-ng-show="(forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid && forms.reject.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n\n							<!-- END REJECT URL -->\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END REJECT TAB -->\n					<!-- START CLOSE TAB -->\n					<div class="tab-pane" id="tab_1_3">\n						<form name="forms.close" data-ng-submit="forms.close.$valid && updateItem()" novalidate>\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.closeMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid && forms.close.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.closeUrl" ng-required="account.closeMethod"/>\n									<span data-ng-show="(forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid && forms.close.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CLOSE TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
-a.put("app/channels/chat/website/view/proactive/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{title}}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START TYPE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.type.$touched || form.$submitted) && form.type.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TYPE\' | translate}}</label>\n      <ui-select name="type" ng-model="item.type" theme="bootstrap" ng-disabled="disabled">\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n        <ui-select-choices repeat="item.type as item in possibleType | filter: $select.search">\n          <div ng-bind-html="item.title | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n    </div>\n    <!-- END TYPE -->\n\n    <!-- START SELECTOR -->\n    <div class="form-group" data-ng-if="item.type === \'mouseOver\'" data-ng-class="{\'has-error\': (form.selector.$touched || form.$submitted) && form.selector.$invalid}">\n      <label class="control-label">{{\'APPLICATION_SELECTOR\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="selector" placeholder="{{\'APPLICATION_SELECTOR\' | translate}}" class="form-control" data-ng-model="item.selector" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END SELECTOR -->\n\n    <!-- START TIMEOUT -->\n    <div class="form-group" data-ng-if="item.type === \'timeout\'" data-ng-class="{\'has-error\': (form.timeout.$touched || form.$submitted) && form.timeout.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="item.timeout" min="0" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TIMEOUT -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/chat/website/view/proactive/list/list.html",'<div class="row" data-ng-init="initProactiveActions()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_PROACTIVE_ACTIONS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="#" data-toggle="dropdown" data-ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_PROACTIVE_ACTION\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/chat/website/view/setting/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItemChatWebsite()" novalidate>\n							<!-- START LIST -->\n							<div class="form-group" data-ng-if="license.cm">\n								<label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n									<div class="input-group">\n\n										<ui-select data-ng-model="chatWebsite.ListId" name="list" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_LIST\' | translate}}">{{$select.selected.name}}</ui-select-match>\n											<ui-select-choices repeat="list.id as list in lists | filter: $select.search">\n												<div ng-bind-html="list.name | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n\n										<span class="input-group-btn">\n											<button type="button" data-ng-click="chatWebsite.ListId = null" class="btn btn-default">\n												<span class="glyphicon glyphicon-trash"></span>\n											</button>\n										</span>\n\n									</div>\n							</div>\n							<!-- END LIST -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/chat/website/view/snippet/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SNIPPET\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_APPEARANCE\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_FORMS\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_LABELS\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_4" data-toggle="tab">{{\'APPLICATION_SETTINGS\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_5" data-toggle="tab">{{\'APPLICATION_OFFLINE\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="row">\n						<div class="col-md-8">\n							<div class="tab-content">\n\n								<!-- APPEARANCE TAB -->\n								<div class="tab-pane active" id="tab_1_1">\n									<form name="forms.formAppearance" data-ng-submit="forms.formAppearance.$valid && updateItem()" novalidate>\n\n										<!-- START MAIN COLOR -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.mainColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.host.$invalid}">\n											<label class="control-label">{{\'APPLICATION_MAIN_COLOR\' | translate}} <span class="required" aria-required="true">*</span></label>\n											<input colorpicker type="text" name="mainColor" placeholder="{{\'APPLICATION_MAIN_COLOR\' | translate}}" style="color:{{chatWebsite.color}}" class="form-control" data-ng-model="chatWebsite.color" required/>\n											<span data-ng-show="(forms.formAppearance.mainColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.mainColor.$invalid && forms.formAppearance.mainColor.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END MAIN COLOR -->\n\n										<!-- START FOCUS COLOR -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.focusColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.focusColor.$invalid}">\n											<label class="control-label">{{\'APPLICATION_FOCUS_COLOR\' | translate}} <span class="required" aria-required="true">*</span></label>\n											<input colorpicker type="text" name="focusColor" placeholder="{{\'APPLICATION_FOCUS_COLOR\' | translate}}" style="color:{{chatWebsite.color_focus}}" class="form-control" data-ng-model="chatWebsite.color_focus" required/>\n											<span data-ng-show="(forms.formAppearance.focusColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.focusColor.$invalid && forms.formAppearance.focusColor.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END FOCUS COLOR -->\n\n										<!-- START BUTTON COLOR -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.buttonColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.buttonColor.$invalid}">\n											<label class="control-label">{{\'APPLICATION_BUTTON_COLOR\' | translate}} <span class="required" aria-required="true">*</span></label>\n											<input colorpicker type="text" name="buttonColor" placeholder="{{\'APPLICATION_BUTTON_COLOR\' | translate}}" style="color:{{chatWebsite.color_button}}" class="form-control" data-ng-model="chatWebsite.color_button" required/>\n											<span data-ng-show="(forms.formAppearance.buttonColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.buttonColor.$invalid && forms.formAppearance.buttonColor.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END BUTTON COLOR -->\n\n										<!-- START HEADER SHAPE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.headerShape.$touched || forms.formAppearance.$submitted) && forms.formAppearance.headerShape.$invalid}">\n											<label class="control-label">{{\'APPLICATION_HEADER_SHAPE\' | translate}}</label>\n											<!-- <input colorpicker type="text" name="animationToggle" placeholder="{{\'APPLICATION_BUTTON_COLOR\' | translate}}" class="form-control" data-ng-model="chatWebsite.animation" required/> -->\n											<ui-select data-ng-model="chatWebsite.header_shape" name="headerShape" theme="bootstrap">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$translate.instant(\'APPLICATION_\' + $select.selected.toUpperCase())}}</ui-select-match>\n												<ui-select-choices repeat="headerShape in [\'rounded\',\'squared\'] | filter: $select.search">\n													<div ng-bind-html="$translate.instant(\'APPLICATION_\' + headerShape.toUpperCase()) | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n										</div>\n										<!-- END HEADER SHAPE -->\n\n										<!-- START ANIMATION TOGGLE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.animationToggle.$touched || forms.formAppearance.$submitted) && forms.formAppearance.animationToggle.$invalid}">\n											<label class="control-label">{{\'APPLICATION_ANIMATION\' | translate}}</label></br>\n											<!-- <input colorpicker type="text" name="animationToggle" placeholder="{{\'APPLICATION_BUTTON_COLOR\' | translate}}" class="form-control" data-ng-model="chatWebsite.animation" required/> -->\n											<input\n											bs-switch\n											class="form-control"\n											ng-model="chatWebsite.animation"\n											type="checkbox"\n											switch-active="{{ true }}"\n											switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n											switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n											switch-on-color="{{ radioSwitch.onColor }}"\n											switch-off-color="{{ radioSwitch.offColor }}"\n											switch-animate="{{ radioSwitch.animate }}"\n											switch-size="{{ radioSwitch.size }}"\n											switch-label="{{ radioSwitch.label }}"\n											switch-icon="{{ radioSwitch.icon }}"\n											switch-radio-off="{{ radioSwitch.radioOff }}"\n											switch-label-width="{{ radioSwitch.labelWidth }}"\n											switch-handle-width="{{ radioSwitch.handleWidth }}">\n										</div>\n										<!-- END ANIMATION TOGGLE -->\n\n										<div class="portlet-title tabbable-line margin-top20">\n											<div class="caption caption-md">\n												<i class="icon-globe theme-font hide"></i>\n												<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_WHITE_LABEL\' | translate}}</span>\n											</div>\n										</div>\n\n										<div class="form-group">\n											<label class="control-label">{{\'APPLICATION_DEFAULT\' | translate}}</label></br>\n											<input\n											bs-switch\n											class="form-control"\n											ng-model="chatWebsite.defaultWhiteLabel"\n											data-ng-init="chatWebsite.defaultWhiteLabel = license.custom ? chatWebsite.defaultWhiteLabel : true"\n											type="checkbox"\n											name="defaultWhitelabel"\n											switch-active="{{ radioSwitch.isActive }}"\n											switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n											switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n											switch-on-color="{{ radioSwitch.onColor }}"\n											switch-off-color="{{ radioSwitch.offColor }}"\n											switch-animate="{{ radioSwitch.animate }}"\n											switch-size="{{ radioSwitch.size }}"\n											switch-label="{{ radioSwitch.label }}"\n											switch-icon="{{ radioSwitch.icon }}"\n											switch-radio-off="{{ radioSwitch.radioOff }}"\n											switch-label-width="{{ radioSwitch.labelWidth }}"\n											switch-handle-width="{{ radioSwitch.handleWidth }}">\n										</div>\n										<!-- END DEFAULT -->\n										<!-- START LABEL -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.whiteLabel.$touched || forms.formAppearance.$submitted) && forms.formAppearance.whiteLabel.$invalid}">\n											<label class="control-label">{{\'APPLICATION_WHITE_LABEL\' | translate}}<span data-ng-if="!chatWebsite.defaultWhiteLabel" class="required" aria-required="true">*</span></label>\n											<textarea type="password" name="whiteLabel" placeholder="{{\'APPLICATION_WHITE_LABEL\' | translate}}" class="form-control" data-ng-model="chatWebsite.whiteLabel" data-ng-disabled="chatWebsite.defaultWhiteLabel || !license.custom" data-ng-required="!chatWebsite.defaultWhiteLabel && license.custom"/></textarea>\n											<span data-ng-show="(forms.formAppearance.whiteLabel.$touched || forms.formAppearance.$submitted) && forms.formAppearance.whiteLabel.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END LABEL -->\n\n										<div class="portlet-title tabbable-line margin-top20">\n											<div class="caption caption-md">\n												<i class="icon-globe theme-font hide"></i>\n												<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_LOGO\' | translate}}</span>\n											</div>\n										</div>\n										<div class="row">\n\n											<div class="form-group col-md-6 col-sm-6">\n												<label class="control-label">{{\'APPLICATION_DEFAULT\' | translate}}</label></br>\n												<input\n												bs-switch\n												class="form-control"\n												ng-model="chatWebsite.defaultLogo"\n												data-ng-init="chatWebsite.defaultLogo = license.custom ? chatWebsite.defaultLogo : true"\n												type="checkbox"\n												name="defaultLogo"\n												switch-active="{{ radioSwitch.isActive }}"\n												switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n												switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n												switch-on-color="{{ radioSwitch.onColor }}"\n												switch-off-color="{{ radioSwitch.offColor }}"\n												switch-animate="{{ radioSwitch.animate }}"\n												switch-size="{{ radioSwitch.size }}"\n												switch-label="{{ radioSwitch.label }}"\n												switch-icon="{{ radioSwitch.icon }}"\n												switch-radio-off="{{ radioSwitch.radioOff }}"\n												switch-label-width="{{ radioSwitch.labelWidth }}"\n												switch-handle-width="{{ radioSwitch.handleWidth }}">\n											</div>\n											<!-- END STATUS -->\n											<div class="form-group col-md-6 col-sm-6" data-ng-if="!chatWebsite.defaultLogo && license.custom">\n												<div class="fileinput fileinput-new" data-provides="fileinput">\n													<div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">\n														<img ng-src="assets/images/media/noProfileImage.png" alt=""/>\n													</div>\n													<div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;">\n													</div>\n													<div>\n														<span class="btn default btn-file" data-ng-show="!uploader.queue[0]">\n															<span> {{ \'APPLICATION_SELECT_IMAGE\' | translate }} </span>\n															<input type="file" nv-file-select="" uploader="uploader"/><br/>\n														</span>\n														<button type="button" class="btn default" data-ng-show="uploader.queue[0]" data-dismiss="fileinput" ng-click="uploader.queue[0].remove()">\n															{{ \'APPLICATION_REMOVE\' | translate }}\n														<!-- </button>\n														<button type="button" class="btn green-haze" data-ng-show="uploader.queue[0]" data-ng-click="uploader.queue[0].upload()" ng-disabled="uploader.queue[0].isReady || uploader.queue[0].isUploading || uploader.queue[0].isSuccess">\n															{{ \'APPLICATION_CONFIRM\' | translate }}\n														</button> -->\n													</div>\n													<p>\n													</br> {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} <b>jpg, png, jpeg</b>.\n												</p>\n											</div>\n										</div>\n									</div>\n									<div class="row">\n										<div class="col-md-2">\n											<table class="table" border="0">\n												<tbody>\n													<tr data-ng-repeat="item in uploader.queue">\n														<td style="border-top-style:none">\n															<strong>\n																{{ item.file.name }}\n															</strong>\n														</td>\n														<td data-ng-show="uploader.isHTML5" nowrap style="border-top-style:none">\n															{{ item.file.size/1024/1024|number:2 }} MB\n														</td>\n														<td nowrap style="border-top-style:none">\n															<button type="button" class="btn btn-danger btn-xs" data-ng-click="item.remove()">\n																<span class="glyphicon glyphicon-trash"></span> Remove\n															</button>\n														</td>\n													</tr>\n												</tbody>\n											</table>\n										</div>\n									</div>\n\n										<input class="btn green-haze" type="submit" data-ng-click="uploader.queue[0] && uploader.queue[0].upload()" data-ng-disabled="uploader.queue[0].isReady || uploader.queue[0].isUploading || uploader.queue[0].isSuccess" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n									</form>\n								</div>\n								<!-- END APPEARANCE TAB -->\n\n								<!-- FORMS TAB -->\n								<div class="tab-pane" id="tab_1_2">\n									<form name="forms.formFunctionality" data-ng-submit="forms.formFunctionality.$valid && updateItem()" novalidate>\n\n										<!-- START DOWNLOAD TRANSCRIPT -->\n										<div class="form-group">\n											<label class="control-label">{{\'APPLICATION_DOWNLOAD_TRANSCRIPT\' | translate}}</label>\n											</br>\n											<input\n											bs-switch\n											class="form-control"\n											ng-model="chatWebsite.download_transcript"\n											type="checkbox"\n											switch-active="true"\n											switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n											switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n											switch-on-color="{{ radioSwitch.onColor }}"\n											switch-off-color="{{ radioSwitch.offColor }}"\n											switch-animate="{{ radioSwitch.animate }}"\n											switch-size="{{ radioSwitch.size }}"\n											switch-label="{{ radioSwitch.label }}"\n											switch-icon="{{ radioSwitch.icon }}"\n											switch-radio-off="{{ radioSwitch.radioOff }}"\n											switch-label-width="{{ radioSwitch.labelWidth }}"\n											switch-handle-width="{{ radioSwitch.handleWidth }}">\n										</div>\n										<!-- END DOWNLOAD TRANSCRIPT -->\n\n										<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n									</form>\n								</div>\n								<!-- END FORMS TAB -->\n\n								<!-- STRINGS TAB -->\n								<div class="tab-pane" id="tab_1_3">\n									<form name="forms.formLabel" data-ng-submit="forms.formLabel.$valid && updateItem()" novalidate>\n\n										<h4 class="block" data-ng-show="statePreview.state == \'online\'">{{\'APPLICATION_ONLINE_STATE\' | translate}}</h4>\n\n										<!-- START HEADER ONLINE -->\n										<div class="form-group" data-ng-show="statePreview.state == \'online\'" data-ng-class="{\'has-error\': (forms.formLabel.headerOnline.$touched || forms.formLabel.$submitted) && forms.formLabel.headerOnline.$invalid}">\n											<label class="control-label">{{\'APPLICATION_HEADER_ONLINE\' | translate}}</label>\n											<input type="text" name="headerOnline" placeholder="{{\'APPLICATION_HEADER_ONLINE\' | translate}}" class="form-control" data-ng-model="chatWebsite.header_online"/>\n										</div>\n										<!-- END HEADER ONLINE -->\n\n										<!-- START ONLINE MESSAGE-->\n										<div class="form-group" data-ng-show="statePreview.state == \'online\'" data-ng-class="{\'has-error\': (forms.formLabel.onlineMessage.$touched || forms.formLabel.$submitted) && forms.formLabel.onlineMessage.$invalid}">\n											<label class="control-label">{{\'APPLICATION_ONLINE_MESSAGE\' | translate}}</label>\n											<input type="text" name="onlineMessage" placeholder="{{\'APPLICATION_ONLINE_MESSAGE\' | translate}}" class="form-control" data-ng-model="chatWebsite.online_message"/>\n										</div>\n										<!-- END HEADER ONLINE -->\n\n										<!-- START USERNAME TITLE -->\n										<div class="form-group" data-ng-show="statePreview.state == \'online\' || statePreview.state == \'offline\'" data-ng-class="{\'has-error\': (forms.formLabel.nameTitle.$touched || forms.formLabel.$submitted) && forms.formLabel.nameTitle.$invalid}">\n											<label class="control-label">{{\'APPLICATION_NAME_TITLE\' | translate}}</label>\n											<input type="text" name="nameTitle" placeholder="{{\'APPLICATION_NAME_TITLE\' | translate}}" class="form-control" data-ng-model="chatWebsite.name_title"/>\n										</div>\n										<!-- END USERNAME TITLE -->\n\n										<!-- START USERNAME PLACEHOLDER -->\n										<div class="form-group" data-ng-show="statePreview.state == \'online\' || statePreview.state == \'offline\'" data-ng-class="{\'has-error\': (forms.formLabel.usernamePlaceholder.$touched || forms.formLabel.$submitted) && forms.formLabel.usernamePlaceholder.$invalid}">\n											<label class="control-label">{{\'APPLICATION_NAME_PLACEHOLDER\' | translate}}</label>\n											<input type="text" name="usernamePlaceholder" placeholder="{{\'APPLICATION_NAME_PLACEHOLDER\' | translate}}" class="form-control" data-ng-model="chatWebsite.username_placeholder"/>\n										</div>\n										<!-- END USERNAME PLACEHOLDER -->\n\n										<!-- START EMAIL TITLE -->\n										<div class="form-group" data-ng-show="statePreview.state == \'online\' || statePreview.state == \'offline\'" data-ng-class="{\'has-error\': (forms.formLabel.emailTitle.$touched || forms.formLabel.$submitted) && forms.formLabel.emailTitle.$invalid}">\n											<label class="control-label">{{\'APPLICATION_EMAIL_TITLE\' | translate}}</label>\n											<input type="text" name="emailTitle" placeholder="{{\'APPLICATION_EMAIL_TITLE\' | translate}}" class="form-control" data-ng-model="chatWebsite.email_title"/>\n										</div>\n										<!-- END EMAIL TITLE -->\n\n										<!-- START EMAIL PLACEHOLDER -->\n										<div class="form-group" data-ng-show="statePreview.state == \'online\' || statePreview.state == \'offline\'" data-ng-class="{\'has-error\': (forms.formLabel.emailPlaceholder.$touched || forms.formLabel.$submitted) && forms.formLabel.emailPlaceholder.$invalid}">\n											<label class="control-label">{{\'APPLICATION_EMAIL_PLACEHOLDER\' | translate}}</label>\n											<input type="text" name="emailPlaceholder" placeholder="{{\'APPLICATION_EMAIL_PLACEHOLDER\' | translate}}" class="form-control" data-ng-model="chatWebsite.email_placeholder"/>\n										</div>\n										<!-- END EMAIL PLACEHOLDER -->\n\n										<!-- START START CHAT BUTTON -->\n										<div class="form-group" data-ng-show="statePreview.state == \'online\'" data-ng-class="{\'has-error\': (forms.formLabel.startChatButton.$touched || forms.formLabel.$submitted) && forms.formLabel.startChatButton.$invalid}">\n											<label class="control-label">{{\'APPLICATION_START_CHAT_BUTTON\' | translate}}</label>\n											<input type="text" name="startChatButton" placeholder="{{\'APPLICATION_START_CHAT_BUTTON\' | translate}}" class="form-control" data-ng-model="chatWebsite.start_chat_button"/>\n										</div>\n										<!-- END START CHAT BUTTON -->\n\n										<h4 class="block" data-ng-show="statePreview.state == \'rating\'">{{\'APPLICATION_RATING_STATE\' | translate}}</h4>\n\n										<!-- START RATING MESSAGE -->\n										<div class="form-group" data-ng-show="statePreview.state == \'rating\'" data-ng-class="{\'has-error\': (forms.formLabel.ratingMessage.$touched || forms.formLabel.$submitted) && forms.formLabel.ratingMessage.$invalid}">\n											<label class="control-label">{{\'APPLICATION_RATING_MESSAGE\' | translate}}</label>\n											<input type="text" name="ratingMessage" placeholder="{{\'APPLICATION_RATING_MESSAGE\' | translate}}" class="form-control" data-ng-model="chatWebsite.rating_message"/>\n										</div>\n										<!-- END RATING MESSAGE -->\n\n										<!-- START RATING SEND BUTTON -->\n										<div class="form-group" data-ng-show="statePreview.state == \'rating\'" data-ng-class="{\'has-error\': (forms.formLabel.ratingSend.$touched || forms.formLabel.$submitted) && forms.formLabel.ratingSend.$invalid}">\n											<label class="control-label">{{\'APPLICATION_RATING_SEND_BUTTON\' | translate}}</label>\n											<input type="text" name="ratingSend" placeholder="{{\'APPLICATION_RATING_SEND_BUTTON\' | translate}}" class="form-control" data-ng-model="chatWebsite.rating_send"/>\n										</div>\n										<!-- END RATING SEND BUTTON -->\n\n										<!-- START RATING SKIP BUTTON -->\n										<div class="form-group" data-ng-show="statePreview.state == \'rating\'" data-ng-class="{\'has-error\': (forms.formLabel.ratingSkip.$touched || forms.formLabel.$submitted) && forms.formLabel.ratingSkip.$invalid}">\n											<label class="control-label">{{\'APPLICATION_RATING_SKIP_BUTTON\' | translate}}</label>\n											<input type="text" name="ratingSkip" placeholder="{{\'APPLICATION_RATING_SKIP_BUTTON\' | translate}}" class="form-control" data-ng-model="chatWebsite.rating_skip"/>\n										</div>\n										<!-- END RATING SKIP BUTTON -->\n\n										<h4 class="block" data-ng-show="statePreview.state == \'offline\'">{{\'APPLICATION_OFFLINE_STATE\' | translate}}</h4>\n\n										<!-- START HEADER OFFLINE -->\n										<div class="form-group" data-ng-show="statePreview.state == \'offline\'" data-ng-class="{\'has-error\': (forms.formLabel.headerOffline.$touched || forms.formLabel.$submitted) && forms.formLabel.headerOnline.$invalid}">\n											<label class="control-label">{{\'APPLICATION_HEADER_OFFLINE\' | translate}}</label>\n											<input type="text" name="headerOffline" placeholder="{{\'APPLICATION_HEADER_OFFLINE\' | translate}}" class="form-control" data-ng-model="chatWebsite.header_offline"/>\n										</div>\n										<!-- END HEADER OFFLINE -->\n\n										<!-- START OFFLINE MESSAGE-->\n										<div class="form-group" data-ng-show="statePreview.state == \'offline\'" data-ng-class="{\'has-error\': (forms.formLabel.offlineMessage.$touched || forms.formLabel.$submitted) && forms.formLabel.offlineMessage.$invalid}">\n											<label class="control-label">{{\'APPLICATION_OFFLINE_MESSAGE\' | translate}}</label>\n											<input type="text" name="offlineMessage" placeholder="{{\'APPLICATION_OFFLINE_MESSAGE\' | translate}}" class="form-control" data-ng-model="chatWebsite.offline_message"/>\n										</div>\n										<!-- END OFFLINE MESSAGE -->\n\n										<!-- START ENQUIRY MESSAGE TITLE-->\n										<div class="form-group" data-ng-show="statePreview.state == \'offline\'" data-ng-class="{\'has-error\': (forms.formLabel.enquiryMessageTitle.$touched || forms.formLabel.$submitted) && forms.formLabel.enquiryMessageTitle.$invalid}">\n											<label class="control-label">{{\'APPLICATION_ENQUIRY_MESSAGE_TITLE\' | translate}}</label>\n											<input type="text" name="enquiryMessageTitle" placeholder="{{\'APPLICATION_ENQUIRY_MESSAGE_TITLE\' | translate}}" class="form-control" data-ng-model="chatWebsite.message_title"/>\n										</div>\n										<!-- END ENQUIRY MESSAGE TITLE -->\n\n										<!-- START ENQUIRY MESSAGE PLACEHOLDER-->\n										<div class="form-group" data-ng-show="statePreview.state == \'offline\'" data-ng-class="{\'has-error\': (forms.formLabel.enquiryMessagePlaceholder.$touched || forms.formLabel.$submitted) && forms.formLabel.enquiryMessagePlaceholder.$invalid}">\n											<label class="control-label">{{\'APPLICATION_ENQUIRY_MESSAGE_PLACEHOLDER\' | translate}}</label>\n											<input type="text" name="enquiryMessagePlaceholder" placeholder="{{\'APPLICATION_ENQUIRY_MESSAGE_PLACEHOLDER\' | translate}}" class="form-control" data-ng-model="chatWebsite.enquiry_message_placeholder"/>\n										</div>\n										<!-- END ENQUIRY MESSAGE PLACEHOLDER -->\n\n										<!-- START ENQUIRY BUTTON -->\n										<div class="form-group" data-ng-show="statePreview.state == \'offline\'" data-ng-class="{\'has-error\': (forms.formLabel.enquiryButton.$touched || forms.formLabel.$submitted) && forms.formLabel.enquiryButton.$invalid}">\n											<label class="control-label">{{\'APPLICATION_ENQUIRY_BUTTON\' | translate}}</label>\n											<input type="text" name="enquiryButton" placeholder="{{\'APPLICATION_ENQUIRY_BUTTON\' | translate}}" class="form-control" data-ng-model="chatWebsite.enquiry_button"/>\n										</div>\n										<!-- END ENQUIRY BUTTON -->\n\n										<!-- START AGENTS BUSY BUTTON -->\n										<div class="form-group" data-ng-show="statePreview.state == \'online\'" data-ng-class="{\'has-error\': (forms.formLabel.agentsBusy.$touched || forms.formLabel.$submitted) && forms.formLabel.agentsBusy.$invalid}">\n											<label class="control-label">{{\'APPLICATION_AGENTS_BUSY\' | translate}}</label>\n											<input type="text" name="agentsBusy" placeholder="{{\'APPLICATION_AGENTS_BUSY\' | translate}}" class="form-control" data-ng-model="chatWebsite.agents_busy"/>\n										</div>\n										<!-- END AGENTS BUSY BUTTON -->\n\n										<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n									</form>\n								</div>\n								<!-- END STRINGS TAB -->\n\n								<!-- SETTINGS TAB -->\n								<div class="tab-pane" id="tab_1_4">\n									<form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n\n										<!-- START NAME -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formSetting.name.$touched || forms.formSetting.$submitted) && forms.formSetting.name.$invalid}">\n											<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n											<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="chatWebsite.name" required/>\n											<span data-ng-show="(forms.formSetting.name.$touched || forms.formSetting.$submitted) && forms.formSettings.name.$invalid && forms.formSetting.name.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END NAME -->\n\n										<!-- START ADDRESS -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formSetting.address.$touched || forms.formSetting.$submitted) && forms.formSetting.address.$invalid}">\n											<label class="control-label">{{\'APPLICATION_WEB_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n											<input type="url" name="address" placeholder="{{\'APPLICATION_WEB_ADDRESS\' | translate}}" class="form-control" data-ng-model="chatWebsite.address" required/>\n											<span data-ng-show="(forms.formSetting.address.$touched || forms.formSetting.$submitted) && forms.formSetting.address.$invalid && forms.formSetting.address.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END ADDRESS -->\n\n										<!-- START REMOTE IP -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formSetting.remote.$touched || forms.formSetting.$submitted) && forms.formSetting.remote.$invalid}">\n											<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n											<input type="url" name="remote" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="chatWebsite.remote" required/>\n											<span data-ng-show="(forms.formSetting.remote.$touched || forms.formSetting.$submitted) && forms.formSetting.remote.$invalid && forms.formSetting.remote.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span class="help-block help-block-info">\n												{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n											</span>\n										</div>\n										<!-- END REMOTE IP -->\n\n										<!-- START FIDELITY -->\n										<div class="form-group">\n											<label class="control-label">{{\'APPLICATION_FIDELITY\' | translate}}</label></br>\n											<input\n											bs-switch\n											data-ng-model="chatWebsite.fidelity"\n											type="checkbox"\n											switch-active="{{ fidelitySwitch.isActive }}"\n											switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n											switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n											switch-on-color="{{ fidelitySwitch.onColor }}"\n											switch-off-color="{{ fidelitySwitch.offColor }}"\n											switch-animate="{{ fidelitySwitch.animate }}"\n											switch-size="{{ fidelitySwitch.size }}"\n											switch-label="{{ fidelitySwitch.label }}"\n											switch-icon="{{ fidelitySwitch.icon }}"\n											switch-radio-off="{{ fidelitySwitch.radioOff }}"\n											switch-label-width="{{ fidelitySwitch.labelWidth }}"\n											switch-handle-width="{{ fidelitySwitch.handleWidth }}">\n										</div>\n										<!-- END FIDELITY -->\n\n										<!-- START TIMEOUT -->\n										<div class="form-group" data-ng-if="chatWebsite.fidelity" data-ng-class="{\'has-error\': (forms.formSetting.timeout.$touched || forms.formSetting.$submitted) && forms.formSetting.timeout.$invalid}">\n											<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n											<input type="number" min="0" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="chatWebsite.timeout" required/>\n											<span data-ng-show="(forms.formSetting.timeout.$touched || forms.formSetting.$submitted) && forms.formSetting.timeout.$invalid && forms.formSetting.timeout.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="(forms.formSetting.timeout.$touched || forms.formSetting.$submitted) && forms.formSetting.timeout.$invalid && forms.formSetting.timeout.$error.number" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END TIMEOUT -->\n\n										<!-- START DESCRIPTION -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formSetting.description.$touched || forms.formSetting.$submitted) && forms.formSetting.description.$invalid}">\n											<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n											<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="chatWebsite.description"/>\n										</div>\n										<!-- END DESCRIPTION -->\n\n										<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n									</form>\n								</div>\n								<!-- END SETTINGS TAB -->\n\n								<!-- OFFLINE TAB -->\n								<div class="tab-pane" id="tab_1_5">\n									<form name="forms.formOffline" data-ng-submit="forms.formOffline.$valid && updateItem()" novalidate>\n\n										<!-- START ENQUIRY ENABLE -->\n										<div class="form-group">\n											<label class="control-label">{{\'APPLICATION_ENQUIRY_ENABLED\' | translate}}</label></br>\n											<input\n											    bs-switch\n													class="form-control"\n											    ng-model="chatWebsite.enquiry_enable"\n											    type="checkbox"\n											    switch-active="{{ enquirySwitch.isActive }}"\n											    switch-on-text="{{ enquirySwitch.onText }}"\n											    switch-off-text="{{ enquirySwitch.offText }}"\n											    switch-on-color="{{ enquirySwitch.onColor }}"\n											    switch-off-color="{{ enquirySwitch.offColor }}"\n											    switch-animate="{{ enquirySwitch.animate }}"\n											    switch-size="{{ enquirySwitch.size }}"\n											    switch-label="{{ enquirySwitch.label }}"\n											    switch-icon="{{ enquirySwitch.icon }}"\n											    switch-radio-off="{{ enquirySwitch.radioOff }}"\n											    switch-label-width="{{ enquirySwitch.labelWidth }}"\n											    switch-handle-width="{{ enquirySwitch.handleWidth }}">\n										</div>\n										<!-- END ENQUIRY ENABLE -->\n\n										<!-- START ENQUIRY FORWARDING -->\n										<div class="form-group" data-ng-if="chatWebsite.enquiry_enable">\n											<label class="control-label">{{\'APPLICATION_ENQUIRY_FORWARDING\' | translate}}</label></br>\n											<input\n											    bs-switch\n													class="form-control"\n											    ng-model="chatWebsite.enquiry_forwarding"\n											    type="checkbox"\n											    switch-active="{{ enquirySwitch.isActive }}"\n											    switch-on-text="{{ enquirySwitch.onText }}"\n											    switch-off-text="{{ enquirySwitch.offText }}"\n											    switch-on-color="{{ enquirySwitch.onColor }}"\n											    switch-off-color="{{ enquirySwitch.offColor }}"\n											    switch-animate="{{ enquirySwitch.animate }}"\n											    switch-size="{{ enquirySwitch.size }}"\n											    switch-label="{{ enquirySwitch.label }}"\n											    switch-icon="{{ enquirySwitch.icon }}"\n											    switch-radio-off="{{ enquirySwitch.radioOff }}"\n											    switch-label-width="{{ enquirySwitch.labelWidth }}"\n											    switch-handle-width="{{ enquirySwitch.handleWidth }}">\n											<span class="help-block col-md-12">{{\'MESSAGE_REMEMBER_SMTP_SERVICE_ACCOUNT\' | translate}}.</span>\n										</div>\n										<!-- END ENQUIRY FORWARDING -->\n\n										<!-- START REMOTE IP -->\n										<div class="form-group" data-ng-if="chatWebsite.enquiry_enable && chatWebsite.enquiry_forwarding" data-ng-class="{\'has-error\': (forms.formOffline.forwardingAddress.$touched || forms.formOffline.$submitted) && forms.formSetting.forwardingAddress.$invalid}">\n											<label class="control-label">{{\'APPLICATION_ENQUIRY_FORWARDING_ADDRESS\' | translate}}<span class="required" aria-required="true">*</span></label>\n											<input type="text" name="forwardingAddress" placeholder="{{\'APPLICATION_ADDRESS\' | translate}}" class="form-control" data-ng-model="chatWebsite.enquiry_forwarding_address" required/>\n											<span data-ng-show="(forms.formOffline.forwardingAddress.$touched || forms.formOffline.$submitted) && forms.formOffline.forwardingAddress.$invalid && forms.formOffline.forwardingAddress.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END REMOTE IP -->\n\n										<!-- START HEADER SHAPE -->\n										<div class="form-group" data-ng-if="chatWebsite.enquiry_enable && chatWebsite.enquiry_forwarding" data-ng-class="{\'has-error\': (forms.formOffline.OfflineTemplateId.$touched || forms.formOffline.$submitted) && forms.formOffline.OfflineTemplateId.$invalid}">\n											<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n											<ui-select data-ng-model="chatWebsite.OfflineTemplateId" name="OfflineTemplateId" theme="bootstrap" required>\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n												<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n													<div ng-bind-html="template.name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<span data-ng-show="(forms.formOffline.OfflineTemplateId.$touched || forms.formOffline.$submitted) && forms.formOffline.OfflineTemplateId.$invalid && forms.formOffline.OfflineTemplateId.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END HEADER SHAPE -->\n\n										<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n									</form>\n								</div>\n								<!-- END OFFLINE TAB -->\n							</div>\n						</div>\n						<div class="col-md-4">\n							<!-- START STATE -->\n							<div class="form-group">\n								<!-- <label class="control-label">{{\'APPLICATION_ANIMATION\' | translate}}</label> -->\n								<!-- <input colorpicker type="text" name="animationToggle" placeholder="{{\'APPLICATION_BUTTON_COLOR\' | translate}}" class="form-control" data-ng-model="chatWebsite.animation" required/> -->\n								<ui-select data-ng-model="statePreview.state" name="statePreview" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="statePreview in [\'online\',\'rating\',\'offline\'] | filter: $select.search">\n										<div ng-bind-html="statePreview | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n							</div>\n							<!-- END STATE -->\n							<preview></preview>\n						</div>\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
-a.put("app/channels/chat/website/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-bubble"></i>\n					<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-globe"></i>\n					<a href="/channels/chat/websites/list">{{ \'APPLICATION_WEB_SITES\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{chatWebsite.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img src="assets/images/media/website.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{chatWebsite.name}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{chatWebsite.address}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.includes(\'main.channels.chat.websites.view.embedding\')}">\n							<a ng-href="/channels/chat/websites/view/{{chatWebsite.id}}/embedding/view">\n							<i class="fa fa-code"></i>\n							{{ \'APPLICATION_EMBEDDING\' | translate }} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.channels.chat.websites.view.snippet\')}">\n							<a ng-href="/channels/chat/websites/view/{{chatWebsite.id}}/snippet/view">\n							<i class="icon-note"></i>\n							{{ \'APPLICATION_SNIPPET\' | translate }} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.channels.chat.websites.view.form\')}">\n							<a ng-href="/channels/chat/websites/view/{{chatWebsite.id}}/forms/view">\n							<i class="icon-list"></i>\n							{{ \'APPLICATION_FORMS\' | translate }} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.channels.chat.websites.view.proactive\')}">\n							<a ng-href="/channels/chat/websites/view/{{chatWebsite.id}}/proactive/list">\n							<i class="icon-target"></i>\n							{{ \'APPLICATION_PROACTIVE_ACTIONS\' | translate }} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.channels.chat.websites.view.actions\')}">\n							<a ng-href="/channels/chat/websites/view/{{chatWebsite.id}}/actions/list">\n							<i class="icon-directions"></i>\n							{{ \'APPLICATION_ACTIONS\' | translate }} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.chat.websites.view.hooks\')}">\n							<a href="/channels/chat/websites/view/{{chatWebsite.id}}/hooks">\n							<i class="fa fa-code"></i>\n							{{\'APPLICATION_HOOKS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.channels.chat.websites.view.dispositions\')}">\n							<a ng-href="/channels/chat/websites/view/{{chatWebsite.id}}/dispositions">\n								<i class="icon-target"></i>\n								{{ \'APPLICATION_DISPOSITIONS\' | translate }} </a>\n							</li>\n						<li ng-class="{active: $state.is(\'main.channels.chat.websites.view.settings\')}">\n							<a href="/channels/chat/websites/view/{{chatWebsite.id}}/settings">\n							<i class="icon-settings"></i>\n							{{\'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/website/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-bubble"></i>\n						<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-globe"></i>\n						<a href="/channels/chat/websites/list">{{ \'APPLICATION_WEB_SITES\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard();">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_WEB_SITE\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_WEB_SITE_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n						<form name="forms.formSetting" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formSetting.name.$touched || forms.formSetting.$submitted) && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="forms.formSetting.name.$touched && !forms.formSettings.name.$valid && forms.formSetting.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formSetting.address.$touched || forms.formSetting.$submitted) && forms.formSetting.address.$invalid}">\n								<label class="control-label">{{\'APPLICATION_WEB_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="address" placeholder="{{\'APPLICATION_WEB_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.address" required/>\n								<span data-ng-show="(forms.formSetting.address.$touched || forms.formSetting.$submitted) && forms.formSetting.address.$invalid && forms.formSetting.address.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ADDRESS -->\n\n							<!-- START REMOTE IP -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formSetting.remote.$touched || forms.formSetting.$submitted) && forms.formSetting.remote.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remote" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remote" required/>\n								<span class="help-block help-block-info">\n									{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n								</span>\n								<span data-ng-show="(forms.formSetting.remote.$touched || forms.formSetting.$submitted) && forms.formSetting.remote.$invalid && forms.formSetting.remote.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END REMOTE IP -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.form.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_WEB_SITE_APPEARANCE\' | translate}}" canexit="exitValidation(forms.formAppearance.$valid)">\n						<form name="forms.formAppearance" novalidate>\n\n							<!-- START MAIN COLOR -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.mainColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.host.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MAIN_COLOR\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input colorpicker type="text" name="mainColor" placeholder="{{\'APPLICATION_MAIN_COLOR\' | translate}}" style="color:{{item.color}}" class="form-control" data-ng-model="item.color" required/>\n								<span data-ng-show="(forms.formAppearance.mainColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.mainColor.$invalid && forms.formAppearance.mainColor.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MAIN COLOR -->\n\n							<!-- START FOCUS COLOR -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.focusColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.focusColor.$invalid}">\n								<label class="control-label">{{\'APPLICATION_FOCUS_COLOR\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input colorpicker type="text" name="focusColor" placeholder="{{\'APPLICATION_FOCUS_COLOR\' | translate}}" style="color:{{item.color_focus}}" class="form-control" data-ng-model="item.color_focus" required/>\n								<span data-ng-show="(forms.formAppearance.focusColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.focusColor.$invalid && forms.formAppearance.focusColor.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END FOCUS COLOR -->\n\n							<!-- START BUTTON COLOR -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.buttonColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.buttonColor.$invalid}">\n								<label class="control-label">{{\'APPLICATION_BUTTON_COLOR\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input colorpicker type="text" name="buttonColor" placeholder="{{\'APPLICATION_BUTTON_COLOR\' | translate}}" style="color:{{item.color_button}}" class="form-control" data-ng-model="item.color_button" required/>\n								<span data-ng-show="(forms.formAppearance.buttonColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.buttonColor.$invalid && forms.formAppearance.buttonColor.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END BUTTON COLOR -->\n\n							<!-- START HEADER SHAPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.headerShape.$touched || forms.formAppearance.$submitted) && forms.formAppearance.headerShape.$invalid}">\n								<label class="control-label">{{\'APPLICATION_HEADER_SHAPE\' | translate}}</label>\n								<!-- <input colorpicker type="text" name="animationToggle" placeholder="{{\'APPLICATION_BUTTON_COLOR\' | translate}}" class="form-control" data-ng-model="item.animation" required/> -->\n								<ui-select data-ng-model="item.header_shape" name="headerShape" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$translate.instant(\'APPLICATION_\' + $select.selected.toUpperCase())}}</ui-select-match>\n									<ui-select-choices repeat="headerShape in [\'rounded\',\'squared\'] | filter: $select.search">\n										<div ng-bind-html="$translate.instant(\'APPLICATION_\' + headerShape.toUpperCase()) | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n							</div>\n							<!-- END HEADER SHAPE -->\n\n							<!-- START ANIMATION TOGGLE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.animationToggle.$touched || forms.formAppearance.$submitted) && forms.formAppearance.animationToggle.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ANIMATION\' | translate}}</label>\n								<ui-select data-ng-model="item.animation" name="animationToggle" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected  ? \'On\' : \'Off\'}}</ui-select-match>\n									<ui-select-choices repeat="filter in [true,false] | filter: $select.search">\n										<div ng-bind-html="filter ? \'On\' : \'Off\' | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n							</div>\n							<!-- END ANIMATION TOGGLE -->\n\n							<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_LABELS\' | translate}}" canexit="exitValidation(forms.formLabel.$valid)">\n						<form name="forms.formLabel" novalidate>\n\n							<!-- START HEADER ONLINE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.headerOnline.$touched || forms.formLabel.$submitted) && forms.formLabel.headerOnline.$invalid}">\n								<label class="control-label">{{\'APPLICATION_HEADER_ONLINE\' | translate}}</label>\n								<input type="text" name="headerOnline" placeholder="{{\'APPLICATION_HEADER_ONLINE\' | translate}}" class="form-control" data-ng-model="item.header_online"/>\n							</div>\n							<!-- END HEADER ONLINE -->\n\n							<!-- START ONLINE MESSAGE-->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.onlineMessage.$touched || forms.formLabel.$submitted) && forms.formLabel.onlineMessage.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ONLINE_MESSAGE\' | translate}}</label>\n								<input type="text" name="onlineMessage" placeholder="{{\'APPLICATION_ONLINE_MESSAGE\' | translate}}" class="form-control" data-ng-model="item.online_message"/>\n							</div>\n							<!-- END HEADER ONLINE -->\n\n							<!-- START USERNAME TITLE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.nameTitle.$touched || forms.formLabel.$submitted) && forms.formLabel.nameTitle.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME_TITLE\' | translate}}</label>\n								<input type="text" name="nameTitle" placeholder="{{\'APPLICATION_NAME_TITLE\' | translate}}" class="form-control" data-ng-model="item.name_title"/>\n							</div>\n							<!-- END USERNAME TITLE -->\n\n							<!-- START USERNAME PLACEHOLDER -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.usernamePlaceholder.$touched || forms.formLabel.$submitted) && forms.formLabel.usernamePlaceholder.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME_PLACEHOLDER\' | translate}}</label>\n								<input type="text" name="usernamePlaceholder" placeholder="{{\'APPLICATION_NAME_PLACEHOLDER\' | translate}}" class="form-control" data-ng-model="item.username_placeholder"/>\n							</div>\n							<!-- END USERNAME PLACEHOLDER -->\n\n							<!-- START EMAIL TITLE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.emailTitle.$touched || forms.formLabel.$submitted) && forms.formLabel.emailTitle.$invalid}">\n								<label class="control-label">{{\'APPLICATION_EMAIL_TITLE\' | translate}}</label>\n								<input type="text" name="emailTitle" placeholder="{{\'APPLICATION_EMAIL_TITLE\' | translate}}" class="form-control" data-ng-model="item.email_title"/>\n							</div>\n							<!-- END EMAIL TITLE -->\n\n							<!-- START EMAIL PLACEHOLDER -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.emailPlaceholder.$touched || forms.formLabel.$submitted) && forms.formLabel.emailPlaceholder.$invalid}">\n								<label class="control-label">{{\'APPLICATION_EMAIL_PLACEHOLDER\' | translate}}</label>\n								<input type="text" name="emailPlaceholder" placeholder="{{\'APPLICATION_EMAIL_PLACEHOLDER\' | translate}}" class="form-control" data-ng-model="item.email_placeholder"/>\n							</div>\n							<!-- END EMAIL PLACEHOLDER -->\n\n							<!-- START START CHAT BUTTON -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.startChatButton.$touched || forms.formLabel.$submitted) && forms.formLabel.startChatButton.$invalid}">\n								<label class="control-label">{{\'APPLICATION_START_CHAT_BUTTON\' | translate}}</label>\n								<input type="text" name="startChatButton" placeholder="{{\'APPLICATION_START_CHAT_BUTTON\' | translate}}" class="form-control" data-ng-model="item.start_chat_button"/>\n							</div>\n							<!-- END START CHAT BUTTON -->\n\n							<!-- START RATING MESSAGE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.ratingMessage.$touched || forms.formLabel.$submitted) && forms.formLabel.ratingMessage.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RATING_MESSAGE\' | translate}}</label>\n								<input type="text" name="ratingMessage" placeholder="{{\'APPLICATION_RATING_MESSAGE\' | translate}}" class="form-control" data-ng-model="item.rating_message"/>\n							</div>\n							<!-- END RATING MESSAGE -->\n\n							<!-- START RATING START TEXT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.ratingSend.$touched || forms.formLabel.$submitted) && forms.formLabel.ratingSend.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RATING_SEND_BUTTON\' | translate}}</label>\n								<input type="text" name="ratingSend" placeholder="{{\'APPLICATION_RATING_SEND_BUTTON\' | translate}}" class="form-control" data-ng-model="item.rating_send"/>\n							</div>\n							<!-- END RATING START TEXT -->\n\n							<!-- START RATING MESSAGE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.ratingSkip.$touched || forms.formLabel.$submitted) && forms.formLabel.ratingSkip.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RATING_SKIP_BUTTON\' | translate}}</label>\n								<input type="text" name="ratingSkip" placeholder="{{\'APPLICATION_RATING_SKIP_BUTTON\' | translate}}" class="form-control" data-ng-model="item.rating_skip"/>\n							</div>\n							<!-- END RATING MESSAGE -->\n\n							<!-- START HEADER OFFLINE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.headerOffline.$touched || forms.formLabel.$submitted) && forms.formLabel.headerOnline.$invalid}">\n								<label class="control-label">{{\'APPLICATION_HEADER_OFFLINE\' | translate}}</label>\n								<input type="text" name="headerOffline" placeholder="{{\'APPLICATION_HEADER_OFFLINE\' | translate}}" class="form-control" data-ng-model="item.header_offline"/>\n							</div>\n							<!-- END HEADER OFFLINE -->\n\n							<!-- START OFFLINE MESSAGE-->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.offlineMessage.$touched || forms.formLabel.$submitted) && forms.formLabel.onlineMessage.$invalid}">\n								<label class="control-label">{{\'APPLICATION_OFFLINE_MESSAGE\' | translate}}</label>\n								<input type="text" name="offlineMessage" placeholder="{{\'APPLICATION_OFFLINE_MESSAGE\' | translate}}" class="form-control" data-ng-model="item.offline_message"/>\n							</div>\n							<!-- END OFFLINE MESSAGE -->\n\n							<!-- START ENQUIRY MESSAGE TITLE-->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.enquiryMessageTitle.$touched || forms.formLabel.$submitted) && forms.formLabel.enquiryMessageTitle.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ENQUIRY_MESSAGE_TITLE\' | translate}}</label>\n								<input type="text" name="enquiryMessageTitle" placeholder="{{\'APPLICATION_ENQUIRY_MESSAGE_TITLE\' | translate}}" class="form-control" data-ng-model="item.message_title"/>\n							</div>\n							<!-- END ENQUIRY MESSAGE TITLE -->\n\n							<!-- START ENQUIRY MESSAGE PLACEHOLDER-->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.enquiryMessagePlaceholder.$touched || forms.formLabel.$submitted) && forms.formLabel.onlineMessage.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ENQUIRY_MESSAGE_PLACEHOLDER\' | translate}}</label>\n								<input type="text" name="enquiryMessagePlaceholder" placeholder="{{\'APPLICATION_ENQUIRY_MESSAGE_PLACEHOLDER\' | translate}}" class="form-control" data-ng-model="item.enquiry_message_placeholder"/>\n							</div>\n							<!-- END ENQUIRY MESSAGE PLACEHOLDER -->\n\n							<!-- START ENQUIRY BUTTON -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.enquiryButton.$touched || forms.formLabel.$submitted) && forms.formLabel.enquiryButton.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ENQUIRY_BUTTON\' | translate}}</label>\n								<input type="text" name="enquiryButton" placeholder="{{\'APPLICATION_ENQUIRY_BUTTON\' | translate}}" class="form-control" data-ng-model="item.enquiry_button"/>\n							</div>\n							<!-- END ENQUIRY BUTTON -->\n\n							<!-- START AGENTS BUSY BUTTON -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.agentsBusy.$touched || forms.formLabel.$submitted) && forms.formLabel.agentsBusy.$invalid}">\n								<label class="control-label">{{\'APPLICATION_AGENTS_BUSY\' | translate}}</label>\n								<input type="text" name="agentsBusy" placeholder="{{\'APPLICATION_AGENTS_BUSY\' | translate}}" class="form-control" data-ng-model="item.agents_busy"/>\n							</div>\n							<!-- END AGENTS BUSY BUTTON -->\n\n							<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_FORMS\' | translate}}" canexit="exitValidation(forms.formAppearance.$valid)">\n						<form name="forms.formFunctionality" novalidate>\n\n							<!-- START DOWNLOAD TRANSCRIPT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formFunctionality.animationToggle.$touched || forms.formFunctionality.$submitted) && forms.formFunctionality.animationToggle.$invalid}">\n								<label class="control-label">{{\'APPLICATION_DOWNLOAD_TRANSCRIPT\' | translate}}</label>\n								<ui-select data-ng-model="item.download_transcript" name="downloadTranscript" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected ? \'On\' : \'Off\'}}</ui-select-match>\n									<ui-select-choices repeat="downloadTranscript in [true, false] | filter: $select.search">\n										<div ng-bind-html="downloadTranscript ? \'On\' : \'Off\' | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n							</div>\n							<!-- END DOWNLOAD TRANSCRIPT -->\n\n							<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/fax/account/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_FAX_ACCOUNT\' | translate }}</h3>\n</div>\n<div class="modal-body" data-ng-init="initWizard();">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.$submitted || form.name.$touched) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="form.name.$error.required && (form.$submitted || form.name.$touched)" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START TRUNKS -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.$submitted || form.trunk.$touched) && form.trunk.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TRUNK\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.TrunkName" name="trunk" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_TRUNK\' | translate}}">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="trunk.name as trunk in trunks | filter: $select.search">\n          <div data-ng-bind="trunk.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <div class="note note-warning" data-ng-hide="trunks.length">\n        <h4 class="block">Warning!</h4>\n        <p>\n          {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n        </p>\n        <p>\n          {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/trunks/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n        </p>\n      </div>\n      <span data-ng-show="form.trunk.$error.required && (form.$submitted || form.trunk.$touched)" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- START TRUNKS -->\n\n    <!-- START LOCALSTATIONID -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.$submitted || form.localstationid.$touched) && form.localstationid.$invalid}">\n      <label class="control-label">{{\'APPLICATION_LOCALSTATIONID\' | translate}} <span class="required" aria-required="true">*</span></label>\n      <input type="text" name="localstationid" placeholder="{{\'APPLICATION_LOCALSTATIONID\' | translate}}" class="form-control" data-ng-model="item.localstationid" required/>\n      <span data-ng-show="form.localstationid.$error.required && (form.$submitted || form.localstationid.$touched)" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span class="help-block">\n        {{\'DESCRIPTION_LOCALSTATIONID\' | translate}}.\n      </span>\n    </div>\n    <!-- END LOCALSTATIONID -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/fax/account/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-fax"></i>\n						<a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-notebook"></i>\n						<a href="/channels/fax/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button type="button" class="btn green-jungle" data-toggle="dropdown" data-hover="dropdown" data-delay="1000" data-close-others="true" aria-expanded="true">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }} <i class="fa fa-angle-down"></i>\n						</button>\n						<ul class="dropdown-menu" role="menu">\n							<li>\n								<a href="/channels/fax/accounts/wizard">\n									{{ \'APPLICATION_STANDARD\' | translate }}\n								</a>\n							</li>\n							<li>\n								<a href="#" data-ng-click="createItem()">\n									{{ \'APPLICATION_QUICK\' | translate }}\n								</a>\n							</li>\n						</ul>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/fax/account/view/action/list/list.html",'<div class="row" data-ng-init="initActons()">\r\n	<div class="col-md-12">\r\n		<div class="portlet light">\r\n			<div class="portlet-title tabbable-line">\r\n				<div class="caption caption-md">\r\n					<i class="icon-globe theme-font hide"></i>\r\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACTIONS\' | translate}}</span>\r\n				</div>\r\n				<div class="actions">\r\n					<div class="btn-group" data-ng-show="id.length">\r\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\r\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\r\n						</a>\r\n					</div>\r\n					<div class="btn-group">\r\n						<a class="btn green-jungle" href="/channels/fax/accounts/view/{{account.id}}/actions/wizard" data-toggle="dropdown">\r\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACTION\' | translate }}\r\n						</a>\r\n					</div>\r\n				</div>\r\n			</div>\r\n			<div class="portlet-body">\r\n				<!-- START TABLE -->\r\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\r\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\r\n				</div>\r\n				<!-- END TABLE -->\r\n			</div>\r\n		</div>\r\n	</div>\r\n</div>\r\n'),
-a.put("app/channels/fax/account/view/action/view/view.html",'\n<div class="row" data-ng-init="initAction()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }}</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.settings" ng-submit="updateItem()" novalidate>\n					<!-- START APP -->\n					<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n							<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n							<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n								<div ng-bind-html="app.name | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid && forms.settings.app.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END APP -->\n\n					<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n						<!-- START QUEUE -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$invalid}">\n							<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.FaxQueueId" name="queue" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n									<div ng-bind-html="queue.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="queues.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/fax/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END QUEUE -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n						<!-- START AGENT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$invalid}">\n							<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n								<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n									<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="agents.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END AGENT -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n						<!-- START SENDMAIL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" min="1" required/>\n							<span data-ng-show="(forms.settings.from.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.mail.$touched || forms.settings.$submitted) && forms.settings.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.template.$touched || forms.settings.$submitted) && forms.settings.template.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n									<div ng-bind-html="template.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.template.$touched || forms.settings.$submitted) && forms.settings.template.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END SENDMAIL -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n						<!-- START SENDSms -->\n						<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n								<span data-ng-show="(forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid && forms.settings.to.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.text.$touched || forms.text.$submitted) && forms.settings.text.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<textarea id="text" class="form-control maxlength-handler" maxlength="160"  name="text" data-ng-model="application.data6" required></textarea>\n							<span data-ng-show="(forms.settings.text.$touched || forms.settings.$submitted) && forms.settings.text.$invalid && forms.settings.text.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<!-- END SENDSms -->\n					</div>\n\n					<!-- START INTERVAL_TYPE -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n							<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n								{{ intType.name | translate }}\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END INTERVAL_TYPE -->\n\n					<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n						<!-- START TIME -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n							<div class="input-group input-large">\n								<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n									<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n								</fieldset>\n								<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n								<fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n								<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n							</div>\n						</div>\n						<!-- END TIME -->\n\n						<!-- START ALWAYS -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n							<div class="input-group input-large">\n								<label class="control-label pointer-cursor">\n									<input\n										bs-switch\n										data-ng-model="application.alwaysTime"\n										type="checkbox"\n										switch-active="{{ isActive }}"\n										switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n										switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n										switch-on-color="{{ onColor }}"\n										switch-off-color="{{ offColor }}"\n										switch-animate="{{ animate }}"\n										switch-size="{{ size }}"\n										switch-label="{{ label }}"\n										switch-icon="{{ icon }}"\n										switch-radio-off="{{ radioOff }}"\n										switch-label-width="{{ labelWidth }}"\n										switch-handle-width="{{ handleWidth }}">\n									<!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n								</label>\n							</div>\n						</div>\n						<!-- END ALWAYS -->\n\n						<!-- START WEEKDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END WEEKDAY -->\n\n						<!-- START MONTHDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTHDAY -->\n\n						<!-- START MONTH -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTH -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n						<!-- START INTERVALS -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$invalid}">\n							<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n									{{ interval.name}}\n								</ui-select-choices>\n							</ui-select>\n              <div class="note note-warning" data-ng-hide="intervals.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_INTERVALS_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END INTERVALS -->\n\n					</div>\n					<button class="btn green-haze" type="submit">{{\'APPLICATION_UPDATE\' | translate}}</button>\n				</form>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/fax/account/view/action/wizard/wizard.html",'\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n					<wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.action.$valid)">\n						<form name="forms.action" novalidate>\n							<!-- START APP -->\n							<div class="form-group"  data-ng-class="{\'has-error\': forms.action.$submitted && forms.action.app.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n									<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n										<div ng-bind-html="app.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="forms.action.$submitted && forms.action.app.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END APP -->\n\n							<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n								<!-- START AGENT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$invalid}">\n									<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n										<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n											<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="agents.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END AGENT -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n								<!-- START QUEUE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$invalid}">\n									<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.FaxQueueId" name="queue" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n											<div ng-bind-html="queue.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="queues.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/fax/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END QUEUE -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n								<!-- START SENDMAIL -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" min="1" required/>\n										<span data-ng-show="(forms.action.from.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.mail.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n											<div ng-bind-html="template.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END SENDMAIL -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n								<!-- START SENDSms -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n										<span data-ng-show="(forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid && forms.action.to.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<textarea id="text" class="form-control maxlength-handler"  maxlength="160" name="text" data-ng-model="application.data6" required></textarea>\n									<span data-ng-show="(forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid && forms.action.text.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<!-- END SENDSms -->\n							</div>\n\n							<!-- START INTERVAL_TYPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n										{{ intType.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END INTERVAL_TYPE -->\n\n							<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n								<!-- START TIME -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n									<div class="input-group input-large">\n										<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n											<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n										</fieldset>\n										<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n										<fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n										<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n									</div>\n								</div>\n								<!-- END TIME -->\n\n								<!-- START ALWAYS -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n									<div class="input-group input-large">\n										<label class="control-label pointer-cursor">\n											<input\n												bs-switch\n												data-ng-model="application.alwaysTime"\n												type="checkbox"\n												switch-active="{{ isActive }}"\n												switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n												switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n												switch-on-color="{{ onColor }}"\n												switch-off-color="{{ offColor }}"\n												switch-animate="{{ animate }}"\n												switch-size="{{ size }}"\n												switch-label="{{ label }}"\n												switch-icon="{{ icon }}"\n												switch-radio-off="{{ radioOff }}"\n												switch-label-width="{{ labelWidth }}"\n												switch-handle-width="{{ handleWidth }}">\n											<!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n										</label>\n									</div>\n								</div>\n								<!-- END ALWAYS -->\n\n								<!-- START WEEKDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END WEEKDAY -->\n\n								<!-- START MONTHDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTHDAY -->\n\n								<!-- START MONTH -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTH -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n								<!-- START INTERVALS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$invalid}">\n									<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n											{{ interval.name}}\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="intervals.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_INTERVALS_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERVALS -->\n\n							</div>\n\n							<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONTINUE\' | translate}}"/>\n						</form>\n					</wz-step>\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/channels/fax/account/view/disposition/modal/add.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_DISPOSITIONS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.form.$touched || form.$submitted) && form.form.$invalid}">\n      <div class="">\n        <!-- <input type="text" name="form" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" class="form-control" data-ng-model="name" data-ng-pattern="/^[a-zA-Z0-9]*$/" required/> -->\n        <input type="text" name="form" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" class="form-control" data-ng-model="name" required/>\n        <span data-ng-show="form.form.$touched && form.form.$error.required" class="help-block help-block-error">\n          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n        </span>\n        <!-- <span data-ng-show="form.form.$touched && form.form.$error.pattern" class="help-block help-block-error">\n          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PATTERN\' | translate}}.\n        </span> -->\n      </div>\n      <!-- <div class="help-block">\n        {{\'MESSAGE_ALLOWED_NUMBERS_AND_LETTERS\' | translate}}\n			</div> -->\n    </div>\n    <!-- END NAME -->\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="form.$valid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/fax/account/view/disposition/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DISPOSITIONS\' | translate}}</span>\n				</div>\n				<div class="actions actions-md">\n					<a href="#" class="btn btn-icon-only green" data-ng-click="addDisposition();">\n						<i class="fa fa-plus"></i>\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n				<div class="tab-content">\n					<div class="row" data-ng-hide="dispositions.length">\n						<div class="col-md-12">\n							<div class="note note-info">\n								<h4 class="block">Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}</h4>\n							</div>\n						</div>\n					</div>\n\n					<!-- GENERAL TAB -->\n					<div class="row" data-ng-repeat="disposition in dispositions">\n						<div class="col-md-12 form-group">\n							<div class="input-group">\n								<div>\n									<input class="form-control" type="text" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" data-ng-model="disposition.name">\n								</div>\n								<span class="input-group-btn">\n									<button class="btn btn-success" type="button" data-ng-click="updateDisposition(disposition.id, disposition.name);"><i class="fa fa-cloud-upload fa-fw"></i> {{\'APPLICATION_UPDATE\' | translate}}</button>\n									<button class="btn btn-danger" type="button" data-ng-click="deleteDisposition(disposition.id);"><i class="fa fa-times fa-fw"></i> {{\'APPLICATION_DELETE\' | translate}}</button>\n								</span>\n							</div>\n						</div>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/fax/account/view/hooks/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_HOOKS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_ACCEPT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_REJECT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_CLOSE\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- ACCEPT TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.accept" data-ng-submit="forms.accept.$valid && updateItemFaxAccount()" novalidate>\n								<div class="row">\n									<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid}">\n										<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n										<ui-select data-ng-model="account.acceptMethod" name="method" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n											<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n												<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n											</ui-select-choices>\n										</ui-select>\n										<span data-ng-show="(forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid && forms.accept.method.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<div  class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid}">\n										<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n										<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.acceptUrl"  ng-required="account.acceptMethod"/>\n										<span data-ng-show="(forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid && forms.accept.url.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n								<!-- START ACTIONS-->\n								<div class="row" ng-repeat = "action in account.actions">\n									<div  ng-switch="action.action">\n											<div ng-switch-when="pause">\n												<div  class="form-group col-md-4">\n													<label class="control-label">{{\'APPLICATION_PAUSE\' | translate}}</label></br>\n														<input\n														bs-switch\n														data-ng-change="resetActionData(action)"\n														data-ng-model="action.enabled"\n														type="checkbox"\n														switch-active="{{ isActive }}"\n														switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n														switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n														switch-on-color="{{ onColor }}"\n														switch-off-color="{{ offColor }}"\n														switch-animate="{{ animate }}"\n														switch-size="{{ size }}"\n														switch-label="{{ label }}"\n														switch-icon="{{ icon }}"\n														switch-radio-off="{{ radioOff }}"\n														switch-label-width="{{ labelWidth }}"\n														switch-handle-width="{{ handleWidth }}">\n													</div>\n													<div ng-if="action.enabled" class="form-group col-md-8">\n														<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}</label>\n														<ui-select  name="action" data-ng-model="action.type"  theme="bootstrap" >\n															<ui-select-match placeholder="{{\'APPLICATION_TYPE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n															<ui-select-choices repeat=" pause.name as pause in pauses | filter: $select.search">\n																<div ng-bind-html="pause.name | highlight: $select.search | uppercase" ></div>\n															</ui-select-choices>\n														</ui-select>\n													</div>\n											</div>\n								  	</div>\n									</div>\n								<!-- END ACTION -->\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ACCEPT TAB -->\n					<!-- START REJECT TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.reject" data-ng-submit="forms.reject.$valid && updateItemFaxAccount()" novalidate>\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.rejectMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid && forms.reject.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.rejectUrl" ng-required="account.rejectMethod"/>\n									<span data-ng-show="(forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid && forms.reject.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ACCEPT TAB -->\n					<!-- START CLOSE TAB -->\n					<div class="tab-pane" id="tab_1_3">\n						<form name="forms.close" data-ng-submit="forms.close.$valid && updateItemFaxAccount()" novalidate>\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.closeMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid && forms.close.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.closeUrl" ng-required="account.closeMethod"/>\n									<span data-ng-show="(forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid && forms.close.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CLOSE TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/fax/account/view/setting/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_ADVANCED\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateItemFaxAccount()" novalidate>\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.$submitted || forms.general.name.$touched) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="forms.general.name.$error.required && (forms.general.$submitted || forms.general.name.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START HEADERINFO -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.$submitted || forms.general.headerinfo.$touched) && forms.general.headerinfo.$invalid}">\n								<label class="control-label">{{\'APPLICATION_HEADERINFO\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="headerinfo" placeholder="{{\'APPLICATION_HEADERINFO\' | translate}}" class="form-control" data-ng-model="account.headerinfo" required/>\n								<span data-ng-show="forms.general.headerinfo.$error.required && (forms.general.$submitted || forms.general.headerinfo.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span class="help-block">\n									{{\'DESCRIPTION_HEADERINFO\' | translate}}.\n								</span>\n							</div>\n							<!-- END HEADERINFO -->\n\n							<!-- START TRUNKS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.$submitted || forms.general.trunk.$touched) && forms.general.trunk.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TRUNK\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="account.TrunkName" name="trunk" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_TRUNK\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="trunk.name as trunk in trunks | filter: $select.search">\n										<div data-ng-bind="trunk.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<div class="note note-warning" data-ng-hide="trunks.length">\n	                <h4 class="block">Warning!</h4>\n	                <p>\n	                  {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n	                </p>\n	                <p>\n	                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/trunks/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n	                </p>\n	              </div>\n								<span data-ng-show="forms.general.trunk.$error.required && (forms.general.$submitted || forms.general.trunk.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- START TRUNKS -->\n\n							<!-- START LOCALSTATIONID -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.$submitted || forms.general.localstationid.$touched) && forms.general.localstationid.$invalid}">\n								<label class="control-label">{{\'APPLICATION_LOCALSTATIONID\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="localstationid" placeholder="{{\'APPLICATION_LOCALSTATIONID\' | translate}}" class="form-control" data-ng-model="account.localstationid" required/>\n								<span data-ng-show="forms.general.localstationid.$error.required && (forms.general.$submitted || forms.general.localstationid.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span class="help-block">\n									{{\'DESCRIPTION_LOCALSTATIONID\' | translate}}.\n								</span>\n							</div>\n							<!-- END LOCALSTATIONID -->\n\n							<!-- START LIST -->\n							<div class="form-group" data-ng-if="license.cm">\n								<label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n									<div class="input-group">\n\n										<ui-select data-ng-model="account.ListId" name="list" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_LIST\' | translate}}">{{$select.selected.name}}</ui-select-match>\n											<ui-select-choices repeat="list.id as list in lists | filter: $select.search">\n												<div ng-bind-html="list.name | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n\n										<span class="input-group-btn">\n											<button type="button" data-ng-click="account.ListId = null" class="btn btn-default">\n												<span class="glyphicon glyphicon-trash"></span>\n											</button>\n										</span>\n\n									</div>\n							</div>\n							<!-- END LIST -->\n\n							<!-- START FIDELITY -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_FIDELITY\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="account.fidelity"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END FIDELITY -->\n\n							<!-- START TIMEOUT -->\n							<div class="form-group" data-ng-if="account.fidelity" data-ng-class="{\'has-error\': (forms.general.$submitted || forms.general.timeout.$touched) && forms.general.timeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" name="timeout" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="account.timeout" required/>\n								<span data-ng-show="(forms.general.timeout.$touched || forms.general.$submitted) && forms.general.timeout.$invalid && forms.general.timeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.general.timeout.$touched || forms.general.$submitted) && forms.general.timeout.$invalid && forms.general.timeout.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIMEOUT -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n					<!-- ADVANCED TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.advanced" data-ng-submit="forms.advanced.$valid && updateItemFaxAccount()" novalidate>\n							<div class="row">\n								<div class="col-md-6">\n									<!-- START ECM -->\n									<div class="form-group">\n									  <label class="control-label">{{\'APPLICATION_ECM\' | translate}}<span class="required" aria-required="true">*</span></label><br>\n									  <input\n									    bs-switch\n									    ng-model="account.ecm"\n									    type="checkbox"\n									    switch-active="{{ isActive }}"\n									    switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n									    switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n									    switch-on-color="{{ onColor }}"\n									    switch-off-color="{{ offColor }}"\n									    switch-animate="{{ animate }}"\n									    switch-size="{{ size }}"\n									    switch-label="{{ label }}"\n									    switch-icon="{{ icon }}"\n									    switch-radio-off="{{ radioOff }}"\n									    switch-label-width="{{ labelWidth }}"\n									    switch-handle-width="{{ handleWidth }}"\n											ng-true-value="\'yes\'"\n		    							ng-false-value="\'no\'">\n											<span class="help-block">\n												{{\'DESCRIPTION_ECM\' | translate}}.\n											</span>\n									</div>\n									<!-- END ECM -->\n\n									<!-- START MINRATE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.$submitted || forms.advanced.minrate.$touched) && forms.advanced.minrate.$invalid}">\n									  <label class="control-label">{{\'APPLICATION_MINRATE\' | translate}} <span class="required" aria-required="true">*</span></label>\n									  <ui-select data-ng-model="account.minrate" name="minrate" theme="bootstrap" required>\n									    <ui-select-match placeholder="{{\'APPLICATION_MINRATE\' | translate}}">{{$select.selected}}</ui-select-match>\n									    <ui-select-choices repeat="minrate in rate | filter: $select.search">\n									      <div data-ng-bind="minrate | highlight: $select.search"></div>\n									    </ui-select-choices>\n									  </ui-select>\n										<span class="help-block">\n											{{\'DESCRIPTION_MINRATE\' | translate}}.\n										</span>\n										<span data-ng-show="forms.advanced.minrate.$error.required && (forms.advanced.$submitted || forms.advanced.minrate.$touched)" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- START MINRATE -->\n\n									<!-- START MAXRATE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.$submitted || forms.advanced.maxrate.$touched) && forms.advanced.maxrate.$invalid}">\n									  <label class="control-label">{{\'APPLICATION_MAXRATE\' | translate}} <span class="required" aria-required="true">*</span></label>\n									  <ui-select data-ng-model="account.maxrate" name="maxrate" theme="bootstrap" required>\n									    <ui-select-match placeholder="{{\'APPLICATION_MAXRATE\' | translate}}">{{$select.selected}}</ui-select-match>\n									    <ui-select-choices repeat="maxrate in rate | filter: $select.search">\n									      <div data-ng-bind="maxrate | highlight: $select.search"></div>\n									    </ui-select-choices>\n									  </ui-select>\n										<span class="help-block">\n											{{\'DESCRIPTION_MAXRATE\' | translate}}.\n										</span>\n										<span data-ng-show="forms.advanced.maxrate.$error.required && (forms.advanced.$submitted || forms.advanced.maxrate.$touched)" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- START MAXRATE -->\n\n									<!-- START MODEM -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.$submitted || forms.advanced.modem.$touched) && forms.advanced.modem.$invalid}">\n										<label class="control-label">{{\'APPLICATION_MODEM\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input type="text" name="modem" placeholder="{{\'APPLICATION_MODEM\' | translate}}" class="form-control" data-ng-model="account.modem" required/>\n										<span class="help-block">\n											{{\'DESCRIPTION_MODEM\' | translate}}.\n										</span>\n										<span data-ng-show="forms.advanced.modem.$error.required && (forms.advanced.$submitted || forms.advanced.modem.$touched)" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END MODEM -->\n								</div>\n								<div class="col-md-6">\n									<!-- START GATEWAY -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.$submitted || forms.advanced.gateway.$touched) && forms.advanced.gateway.$invalid}">\n										<label class="control-label">{{\'APPLICATION_GATEWAY\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input type="text" name="gateway" placeholder="{{\'APPLICATION_GATEWAY\' | translate}}" class="form-control" data-ng-model="account.gateway" required data-ng-pattern="settings.patternGateway"/>\n										<span class="help-block">\n											{{\'DESCRIPTION_GATEWAY\' | translate}}.\n										</span>\n										<span data-ng-show="(forms.advanced.gateway.$touched || forms.advanced.$submitted) && forms.advanced.gateway.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n										<span data-ng-show="(forms.advanced.gateway.$touched || forms.advanced.$submitted) && forms.advanced.gateway.$error.pattern" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_GATEWAY\' | translate}}.\n										</span>\n									</div>\n									<!-- END GATEWAY -->\n\n									<!-- START FAXDETECT -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.$submitted || forms.advanced.faxdetect.$touched) && forms.advanced.faxdetect.$invalid}">\n										<label class="control-label">{{\'APPLICATION_FAXDETECT\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input type="text" name="faxdetect" placeholder="{{\'APPLICATION_FAXDETECT\' | translate}}" class="form-control" data-ng-model="account.faxdetect" required data-ng-pattern="settings.patternFaxdetect"/>\n										<span class="help-block">\n											{{\'DESCRIPTION_FAXDETECT\' | translate}}.\n										</span>\n										<span data-ng-show="(forms.advanced.faxdetect.$touched || forms.advanced.$submitted) && forms.advanced.faxdetect.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n										<span data-ng-show="(forms.advanced.faxdetect.$touched || forms.advanced.$submitted) && forms.advanced.faxdetect.$error.pattern" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_FAXDETECT\' | translate}}.\n										</span>\n									</div>\n									<!-- END FAXDETECT -->\n\n									<!-- START T38TIMEOUT -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.$submitted || forms.advanced.t38timeout.$touched) && forms.advanced.t38timeout.$invalid}">\n										<label class="control-label">{{\'APPLICATION_T38TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input type="number" name="t38timeout" placeholder="{{\'APPLICATION_T38TIMEOUT\' | translate}}" class="form-control" data-ng-model="account.t38timeout" required min="1000"/>\n										<span class="help-block">\n											{{\'DESCRIPTION_T38TIMEOUT\' | translate}}.\n										</span>\n										<span data-ng-show="(forms.advanced.t38timeout.$touched || forms.advanced.$submitted) && forms.advanced.t38timeout.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n										<span data-ng-show="(forms.advanced.t38timeout.$touched || forms.advanced.$submitted) && forms.advanced.t38timeout.$error.min" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_T38TIMEOUT\' | translate}}.\n										</span>\n									</div>\n									<!-- END T38TIMEOUT -->\n\n									<!-- START TECH -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.$submitted || forms.advanced.tech.$touched) && forms.advanced.tech.$invalid}">\n									  <label class="control-label">{{\'APPLICATION_TECHNOLOGY\' | translate}} <span class="required" aria-required="true">*</span></label>\n									  <ui-select data-ng-model="account.tech" name="tech" theme="bootstrap" required>\n									    <ui-select-match placeholder="{{\'APPLICATION_TECHNOLOGY\' | translate}}">{{$select.selected}}</ui-select-match>\n									    <ui-select-choices repeat="tech in techs | filter: $select.search">\n									      <div data-ng-bind="tech | highlight: $select.search"></div>\n									    </ui-select-choices>\n									  </ui-select>\n										<span data-ng-show="(forms.advanced.tech.$touched || forms.advanced.$submitted) && forms.advanced.tech.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- START TECH -->\n								</div>\n							</div>\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
-a.put("app/channels/fax/account/view/view.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-fax"></i>\n					<a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="/channels/fax/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n					<i class="fa fa-angle-right" data-ng-show="account"></i>\n				</li>\n				<li data-ng-show="account">\n					<a href="#">{{ account.name || account.description }}</a>\n				</li>\n			</ul>\n		</div>\n\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/account.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ account.name || account.description }}\n					</div>\n					<div class="profile-usertitle-job">\n						{{ account.phone }}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.fax.accounts.view.settings\')}">\n							<a href="/channels/fax/accounts/view/{{account.id}}/settings">\n							<i class="icon-settings"></i>\n							{{\'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.fax.accounts.view.hooks\')}">\n							<a href="/channels/fax/accounts/view/{{account.id}}/hooks">\n							<i class="fa fa-code"></i>\n							{{\'APPLICATION_HOOKS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.fax.accounts.view.dispositions\')}">\n							<a href="/channels/fax/accounts/view/{{account.id}}/dispositions">\n							<i class="icon-target"></i>\n							{{\'APPLICATION_DISPOSITIONS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.includes(\'main.channels.fax.accounts.view.actions\')}">\n							<a href="/channels/fax/accounts/view/{{account.id}}/actions/list">\n							<i class="icon-directions"></i>\n							{{\'APPLICATION_ACTIONS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/fax/account/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-fax"></i>\n						<a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-notebook"></i>\n						<a href="/channels/fax/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(forms.formGeneral.$valid)">\n						<form name="forms.formGeneral" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formGeneral.$submitted || forms.formGeneral.name.$touched) && forms.formGeneral.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="forms.formGeneral.name.$error.required && (forms.formGeneral.$submitted || forms.formGeneral.name.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START HEADERINFO -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formGeneral.$submitted || forms.formGeneral.headerinfo.$touched) && forms.formGeneral.headerinfo.$invalid}">\n								<label class="control-label">{{\'APPLICATION_HEADERINFO\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="headerinfo" placeholder="{{\'APPLICATION_HEADERINFO\' | translate}}" class="form-control" data-ng-model="item.headerinfo" required/>\n								<span data-ng-show="forms.formGeneral.headerinfo.$error.required && (forms.formGeneral.$submitted || forms.formGeneral.headerinfo.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span class="help-block">\n									{{\'DESCRIPTION_HEADERINFO\' | translate}}.\n								</span>\n							</div>\n							<!-- END HEADERINFO -->\n\n							<!-- START TRUNKS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formGeneral.$submitted || forms.formGeneral.trunk.$touched) && forms.formGeneral.trunk.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TRUNK\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="item.TrunkName" name="trunk" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_TRUNK\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="trunk.name as trunk in trunks | filter: $select.search">\n										<div data-ng-bind="trunk.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<div class="note note-warning" data-ng-hide="trunks.length">\n	                <h4 class="block">Warning!</h4>\n	                <p>\n	                  {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n	                </p>\n	                <p>\n	                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/trunks/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n	                </p>\n	              </div>\n								<span data-ng-show="forms.formGeneral.trunk.$error.required && (forms.formGeneral.$submitted || forms.formGeneral.trunk.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- START TRUNKS -->\n\n							<!-- START LOCALSTATIONID -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formGeneral.$submitted || forms.formGeneral.localstationid.$touched) && forms.formGeneral.localstationid.$invalid}">\n								<label class="control-label">{{\'APPLICATION_LOCALSTATIONID\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="localstationid" placeholder="{{\'APPLICATION_LOCALSTATIONID\' | translate}}" class="form-control" data-ng-model="item.localstationid" required/>\n								<span data-ng-show="forms.formGeneral.localstationid.$error.required && (forms.formGeneral.$submitted || forms.formGeneral.localstationid.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span class="help-block">\n									{{\'DESCRIPTION_LOCALSTATIONID\' | translate}}.\n								</span>\n							</div>\n							<!-- END LOCALSTATIONID -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_ADVANCED\' | translate}}" canexit="exitValidation(forms.formAdvanced.$valid)">\n						<form name="forms.formAdvanced" novalidate>\n\n							<!-- START ECM -->\n							<div class="form-group">\n							  <label class="control-label">{{\'APPLICATION_ECM\' | translate}}<span class="required" aria-required="true">*</span></label><br>\n							  <input\n							    bs-switch\n							    ng-model="item.ecm"\n							    type="checkbox"\n							    switch-active="{{ isActive }}"\n							    switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n							    switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n							    switch-on-color="{{ onColor }}"\n							    switch-off-color="{{ offColor }}"\n							    switch-animate="{{ animate }}"\n							    switch-size="{{ size }}"\n							    switch-label="{{ label }}"\n							    switch-icon="{{ icon }}"\n							    switch-radio-off="{{ radioOff }}"\n							    switch-label-width="{{ labelWidth }}"\n							    switch-handle-width="{{ handleWidth }}"\n									ng-true-value="\'yes\'"\n    							ng-false-value="\'no\'">\n									<span class="help-block">\n										{{\'DESCRIPTION_ECM\' | translate}}.\n									</span>\n							</div>\n							<!-- END ECM -->\n\n							<!-- START MINRATE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAdvanced.$submitted || forms.formAdvanced.minrate.$touched) && forms.formAdvanced.minrate.$invalid}">\n							  <label class="control-label">{{\'APPLICATION_MINRATE\' | translate}} <span class="required" aria-required="true">*</span></label>\n							  <ui-select data-ng-model="item.minrate" name="minrate" theme="bootstrap" required>\n							    <ui-select-match placeholder="{{\'APPLICATION_MINRATE\' | translate}}">{{$select.selected}}</ui-select-match>\n							    <ui-select-choices repeat="minrate in rate | filter: $select.search">\n							      <div data-ng-bind="minrate | highlight: $select.search"></div>\n							    </ui-select-choices>\n							  </ui-select>\n								<span class="help-block">\n									{{\'DESCRIPTION_MINRATE\' | translate}}.\n								</span>\n								<span data-ng-show="forms.formAdvanced.minrate.$error.required && (forms.formAdvanced.$submitted || forms.formAdvanced.minrate.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- START MINRATE -->\n\n							<!-- START MAXRATE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAdvanced.$submitted || forms.formAdvanced.maxrate.$touched) && forms.formAdvanced.maxrate.$invalid}">\n							  <label class="control-label">{{\'APPLICATION_MAXRATE\' | translate}} <span class="required" aria-required="true">*</span></label>\n							  <ui-select data-ng-model="item.maxrate" name="maxrate" theme="bootstrap" required>\n							    <ui-select-match placeholder="{{\'APPLICATION_MAXRATE\' | translate}}">{{$select.selected}}</ui-select-match>\n							    <ui-select-choices repeat="maxrate in rate | filter: $select.search">\n							      <div data-ng-bind="maxrate | highlight: $select.search"></div>\n							    </ui-select-choices>\n							  </ui-select>\n								<span class="help-block">\n									{{\'DESCRIPTION_MAXRATE\' | translate}}.\n								</span>\n								<span data-ng-show="forms.formAdvanced.maxrate.$error.required && (forms.formAdvanced.$submitted || forms.formAdvanced.maxrate.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- START MAXRATE -->\n\n							<!-- START MODEM -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAdvanced.$submitted || forms.formAdvanced.modem.$touched) && forms.formAdvanced.modem.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MODEM\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="modem" placeholder="{{\'APPLICATION_MODEM\' | translate}}" class="form-control" data-ng-model="item.modem" required/>\n								<span class="help-block">\n									{{\'DESCRIPTION_MODEM\' | translate}}.\n								</span>\n								<span data-ng-show="forms.formAdvanced.modem.$error.required && (forms.formAdvanced.$submitted || forms.formAdvanced.modem.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MODEM -->\n\n							<!-- START GATEWAY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAdvanced.$submitted || forms.formAdvanced.gateway.$touched) && forms.formAdvanced.gateway.$invalid}">\n								<label class="control-label">{{\'APPLICATION_GATEWAY\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="gateway" placeholder="{{\'APPLICATION_GATEWAY\' | translate}}" class="form-control" data-ng-model="item.gateway" required data-ng-pattern="settings.patternGateway"/>\n								<span class="help-block">\n									{{\'DESCRIPTION_GATEWAY\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formAdvanced.gateway.$touched || forms.formAdvanced.$submitted) && forms.formAdvanced.gateway.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formAdvanced.gateway.$touched || forms.formAdvanced.$submitted) && forms.formAdvanced.gateway.$error.pattern" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_GATEWAY\' | translate}}.\n								</span>\n							</div>\n							<!-- END GATEWAY -->\n\n							<!-- START FAXDETECT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAdvanced.$submitted || forms.formAdvanced.faxdetect.$touched) && forms.formAdvanced.faxdetect.$invalid}">\n								<label class="control-label">{{\'APPLICATION_FAXDETECT\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="faxdetect" placeholder="{{\'APPLICATION_FAXDETECT\' | translate}}" class="form-control" data-ng-model="item.faxdetect" required data-ng-pattern="settings.patternFaxdetect"/>\n								<span class="help-block">\n									{{\'DESCRIPTION_FAXDETECT\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formAdvanced.faxdetect.$touched || forms.formAdvanced.$submitted) && forms.formAdvanced.faxdetect.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formAdvanced.faxdetect.$touched || forms.formAdvanced.$submitted) && forms.formAdvanced.faxdetect.$error.pattern" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_FAXDETECT\' | translate}}.\n								</span>\n							</div>\n							<!-- END FAXDETECT -->\n\n							<!-- START T38TIMEOUT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAdvanced.$submitted || forms.formAdvanced.t38timeout.$touched) && forms.formAdvanced.t38timeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_T38TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="number" name="t38timeout" placeholder="{{\'APPLICATION_T38TIMEOUT\' | translate}}" class="form-control" data-ng-model="item.t38timeout" required min="1000"/>\n								<span class="help-block">\n									{{\'DESCRIPTION_T38TIMEOUT\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formAdvanced.t38timeout.$touched || forms.formAdvanced.$submitted) && forms.formAdvanced.t38timeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formAdvanced.t38timeout.$touched || forms.formAdvanced.$submitted) && forms.formAdvanced.t38timeout.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_T38TIMEOUT\' | translate}}.\n								</span>\n							</div>\n							<!-- END T38TIMEOUT -->\n\n							<!-- START TECH -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAdvanced.$submitted || forms.formAdvanced.tech.$touched) && forms.formAdvanced.tech.$invalid}">\n							  <label class="control-label">{{\'APPLICATION_TECHNOLOGY\' | translate}} <span class="required" aria-required="true">*</span></label>\n							  <ui-select data-ng-model="item.tech" name="tech" theme="bootstrap" required>\n							    <ui-select-match placeholder="{{\'APPLICATION_TECHNOLOGY\' | translate}}">{{$select.selected}}</ui-select-match>\n							    <ui-select-choices repeat="tech in techs | filter: $select.search">\n							      <div data-ng-bind="tech | highlight: $select.search"></div>\n							    </ui-select-choices>\n							  </ui-select>\n								<span data-ng-show="(forms.formAdvanced.tech.$touched || forms.formAdvanced.$submitted) && forms.formAdvanced.tech.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- START TECH -->\n\n							<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n						<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n\n				</wizard>\n\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/fax/inbox/message/info.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body"  data-ng-init="initInfo()">\n  <div class="form-group" ng-if="data">\n    <json-formatter json="data" open="1"></json-formatter>\n  </div>\n  <div class="note note-warning" data-ng-hide="data">\n    <h4 class="block"></h4>\n    <p>\n      {{ \'MESSAGE_NO_INFO_AVAILABLE\' | translate }}\n    </p>\n  </div>\n\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/fax/inbox/message/message.directive.html",'<div class="message">\n  <div class="row">\n    <div class="col-md-6">\n      <span class="bold">From: </span>\n      [<a href="" data-ng-click="openContact(message.from)">{{message.from}}</a>]\n      <br>\n      <span class="bold">To: </span>\n      [<a href="" data-ng-click="openContact(message.to)">{{message.to}}</a>]\n    </div>\n    <div class="col-md-6">\n      <span class="pull-right">\n        <a ng-click="info(message)"><i class="icon-info font-blue"></i></a>\n      </span>\n      <span class="pull-right" data-ng-show="message.User">{{\'APPLICATION_SENT_BY\' | translate}}: <strong>{{message.User.fullname}}</strong></span>\n    </div>\n  </div>\n  <br>\n  <span class="todo-tasklist-date">\n    <span class="pull-right" data-ng-if="message.status!==\'RECEIVED\'" data-ng-switch="message.status" uib-tooltip="{{\'APPLICATION_PAGE_TRANSFERRED\' | translate}}: {{message.pagestransferred}} - {{\'APPLICATION_RETRY\' | translate}}: {{message.retry}}">\n      <a ng-switch-when="SENDING" href="#" class="btn default btn-xs inactive-link blue-stripe"> {{message.status | uppercase}}\n        <i class="fa fa-warning"></i>\n      </a>\n      <a ng-switch-when="FAILED" href="#" class="btn default btn-xs red-stripe" data-ng-click="retry(message.id)"> {{message.status | uppercase}}\n        <i class="fa fa-times"></i>\n      </a>\n      <a ng-switch-when="SENT" href="#" class="btn default btn-xs inactive-link green-stripe"> {{message.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n    </span>\n    <span class="pull-right" data-ng-if="message.status===\'RECEIVED\'" uib-tooltip="{{\'APPLICATION_PAGE_TRANSFERRED\' | translate}}: {{message.pagestransferred}}">\n      <a href="#" class="btn default btn-xs inactive-link green-stripe"> {{message.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n    </span>\n    <i class="icon-calendar"></i> <span am-time-ago="message.updatedAt"></span>\n  </span>\n  <hr data-ng-if="message.FaxAttachments.length">\n  <div data-ng-repeat="faxAttachment in message.FaxAttachments">\n    <strong>{{faxAttachment.name}}</strong>\n    <a target="_self" download="{{faxAttachment.name}}" href="api/fax/attachments/{{faxAttachment.id}}">\n      <i class="icon-cloud-download"></i>\n    </a>\n  </div>\n</div>\n'),a.put("app/channels/fax/inbox/note/note.directive.html",'<div class="note">\n  <div class="row">\n    <div class="col-md-6">\n      <a type="button" name="button" data-ng-if="::(Auth.getCurrentUser().id == message.UserId)" data-ng-click="deleteNote()">\n        <i class="fa fa-trash-o" style="color: red;"></i>\n      </a>\n\n      <i class="icon-calendar"></i> <span am-time-ago="message.updatedAt"></span>\n    </div>\n    <div class="col-md-6">\n      <span class="pull-right" data-ng-show="message.User">{{\'APPLICATION_ADD_BY\' | translate}}: <strong>{{message.User.fullname}}</strong></span>\n    </div>\n  </div>\n  <hr>\n  <span class="body text-left" data-ng-bind-html="message.text" style="white-space: pre-wrap;"></span>\n</div>\n'),a.put("app/channels/fax/inbox/note/note.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_NOTES\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n    <div class="form-group">\n      <textarea data-ng-model="item.text" name="text" rows="10" style="resize: none; width: 100%;"></textarea>\n    </div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/fax/inbox/room/room.directive.html",'<!-- BEGIN TODO CONTENT -->\n<div class="todo-content" data-ng-init="initForm();">\n	<div class="portlet light">\n		<div class="portlet-title">\n			<div class="caption">\n				<button data-ng-if="(!forms.compose.from.$invalid && !forms.compose.to.$invalid && uploader.queue.length) && faxRoom.status !== \'CLOSED\'" class="btn btn-sm btn-default green-meadow" data-ng-click="sendFax()">\n					<i class="icon-paper-plane" style="color: white;"></i> {{\'APPLICATION_SEND\' | translate}}\n				</button>\n				<span data-ng-if="(!forms.compose.from.$invalid && !forms.compose.to.$invalid && uploader.queue.length) && faxRoom && faxRoom.status !== \'CLOSED\'"> | </span>\n				<span data-ng-if="faxRoom" class="label label-default"> #{{faxRoom.id}} {{faxRoom.status}}</span>\n				<span data-ng-if="faxRoom"> | </span>\n				<span data-ng-if="faxRoom" class="caption-subject font-green-sharp bold">{{faxRoom.contact}}</span>\n			</div>\n			<div class="actions" data-ng-switch="faxRoom.status">\n				<button class="btn btn-icon-only yellow" data-ng-if="faxRoom" data-ng-click="loadNote()" data-ng-hide="faxRoom.status == \'CLOSED\'" title="{{\'APPLICATION_NOTES\' | translate}}">\n					<i class="fa fa-sticky-note"></i>\n				</button>\n				<button class="file-upload" data-ng-hide="faxRoom.status == \'CLOSED\'">\n					<i class="fa fa-paperclip"></i> <input type="file" data-ng-if="uploader" data-ng-hide="faxRoom.status == \'CLOSED\'" nv-file-select uploader="uploader" multiple class="file-input" title="{{\'APPLICATION_ATTACHMENTS\' | translate}}">\n				</button>\n				<!-- UPDATE SECTION START -->\n				<button data-ng-class="faxRoom.status == \'CLOSED\' ? \'grey-cascade\' : \'btn-success\'" class="btn btn-icon-only" data-ng-hide="faxRoom.status == \'CLOSED\' && faxRoom.disposition" data-ng-if="faxRoom" data-ng-click="closeRoom()" title="{{\'APPLICATION_STATUS\' | translate}}">\n					<i data-ng-class="faxRoom.status == \'CLOSED\' ? \'icon-target\' : \'fa fa-upload\'"></i>\n				</button>\n				<!-- UPDATE SECTION END -->\n				<button class="btn default btn-icon-only" data-ng-if="faxRoom && faxRoom.status !== \'CLOSED\'" data-ng-click="togglePanelLeft()" title="{{\'APPLICATION_RESIZE\' | translate}}">\n					<i ng-class="panelRight == \'col-md-12\' ? \'icon-size-actual\' : \'icon-size-fullscreen\'"></i>\n				</button>\n			</div>\n		</div>\n		<div class="portlet-body">\n			<div class="row">\n				<div data-ng-show="panelLeft" data-ng-class="panelLeft">\n					<div class="form">\n						<!-- START TAGS -->\n						<div class="form-group" data-ng-if="faxRoom.status !== \'CLOSED\'">\n							<div class="row">\n								<div class="col-md-1">\n									<a href="#" class="btn btn-icon-only">\n										<i class="fa fa-tags" style="color: gray;"></i>\n									</a>\n								</div>\n								<div class="col-md-11">\n									<ui-select multiple data-ng-model="form.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)" data-ng-disabled="faxRoom.status == \'CLOSED\'">\n										<ui-select-match placeholder="Tags...">{{$item}}</ui-select-match>\n										<ui-select-choices repeat="tag in tags | filter:$select.search" class="">\n											{{tag}}\n										</ui-select-choices>\n									</ui-select>\n								</div>\n							</div>\n						</div>\n						<!-- END TAGS -->\n					</div>\n\n					<hr data-ng-if="faxRoom && faxRoom.status !== \'CLOSED\'">\n\n					<!-- END TAGS -->\n\n					<div id="mail-box">\n						<ul class="chats">\n							<li\n							data-ng-switch="faxMessage.status"\n							data-ng-class="{\'in\': faxMessage.status == \'RECEIVED\', \'out\': faxMessage.status == \'SENT\' || faxMessage.status == \'SENDING\' || faxMessage.status == \'FAILED\' || faxMessage.status == \'NOTE\'}"\n							data-ng-repeat="faxMessage in faxRoom.FaxMessages | orderBy:\'-createdAt\'">\n								<div class="avatar" data-ng-class="faxMessage.UserId ? \'pretty-avatar\' : \'pretty-avatar-v\'">\n								<ng-letter-avatar\n								data-ng-if="faxMessage.UserId"\n								height="40"\n								width="40"\n								fontsize="25"\n								data="{{faxMessage.User.fullname}}"\n								avatarcustombgcolor="#B0B0B0"\n								avatarcustomborder="border:2px solid #3399CC"\n								charCount="2"\n								shape="round"></ng-letter-avatar>\n								<ng-letter-avatar\n								data-ng-if="!faxMessage.UserId"\n								height="40"\n								width="40"\n								fontsize="25"\n								data="{{faxMessage.from}}"\n								avatarcustombgcolor="#B0B0B0"\n								avatarcustomborder="border:2px solid #EA4C61"\n								charCount="1"\n								shape="round"></ng-letter-avatar>\n							</div>\n								<fax-note message="faxMessage" ng-switch-when="NOTE"></fax-note>\n								<fax-message message="faxMessage" list-id="faxRoom.FaxAccount.ListId" ng-switch-default></fax-message>\n							</li>\n						</ul>\n					</div>\n				</div>\n				<div data-ng-class="panelRight">\n					<div class="note note-info" data-ng-if="faxRoom && faxRoom.status == \'CLOSED\'">\n						<h4 class="block"><i class="icon-info"></i> {{\'MESSAGE_FAX_ROOM_CLOSED\' | translate}}!</h4>\n						<p>\n							<strong>{{\'MESSAGE_FAX_ROOM_CLOSED_DETAILS\' | translate}}.</strong>\n						</p>\n						<hr>\n						<p>\n							<i class="icon-target"></i> {{\'APPLICATION_DISPOSITION\' | translate}}: <strong>{{faxRoom.disposition}}</strong>\n						</p>\n						<p>\n							<i class="icon-calendar"></i> {{\'APPLICATION_UPDATED_AT\' | translate}}: <strong>{{faxRoom.updatedAt | date:\'medium\'}}</strong> (<span am-time-ago="faxRoom.updatedAt"></span>)\n						</p>\n					</div>\n					<form name="forms.compose" data-ng-submit="sendFax()" class="form-horizontal" novalidate>\n\n						<!-- START HEAD -->\n						<div class="form">\n\n							<v-accordion class="vAccordion--default" ng-if="faxRoom.status !== \'CLOSED\'">\n							  <v-pane expanded="expanded">\n							    <v-pane-header>\n							      <i class="icon-people"></i> From: {{form.from}}, To: {{form.to[0].fax}}\n							    </v-pane-header>\n							    <v-pane-content>\n										<!-- START FROM -->\n							      <div class="form-group" data-ng-if="faxRoom.status !== \'CLOSED\'" data-ng-class="{\'has-error\': forms.compose.from.$invalid}">\n							        <div class="col-md-12">\n							          <div class="row">\n							            <div class="col-md-1">\n							              <label class="control-label">From:</label>\n							            </div>\n							            <div class="col-md-11">\n							              <ui-select data-ng-model="form.from" data-ng-change="setList($select.selected.ListId)" theme="bootstrap" name="from" required>\n							                <ui-select-match placeholder="From...">{{$select.selected.name}}</ui-select-match>\n							                <ui-select-choices repeat="faxAccount.localstationid as faxAccount in faxAccounts | filter: $select.search">\n							                  <div data-ng-bind-html="faxAccount.name | highlight: $select.search"></div>\n							                  <small data-ng-bind-html="faxAccount.localstationid | highlight: $select.search"></small>\n							                </ui-select-choices>\n							              </ui-select>\n														<span data-ng-show="forms.compose.from.$invalid" class="help-block help-block-error">\n							                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							              </span>\n							            </div>\n							          </div>\n							        </div>\n							      </div>\n							      <!-- END FROM -->\n\n										<!-- START TO -->\n							      <div class="form-group" data-ng-if="faxRoom.status !== \'CLOSED\'" data-ng-class="{\'has-error\': forms.compose.to.$invalid}">\n							        <div class="col-md-12">\n							          <div class="row">\n							            <div class="col-md-1">\n							              <label class="control-label">To:</label>\n							            </div>\n							            <div class="col-md-11">\n							              <tags-input name="to" ng-model="form.to" type="text" display-property="fax" max-tags="1" min-tags="1">\n							                <auto-complete source="getContacts($query)"></auto-complete>\n							              </tags-input>\n							              <span data-ng-show="forms.compose.to.$invalid" class="help-block help-block-error">\n							                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_TO_LIMIT\' | translate}}.\n							              </span>\n							            </div>\n							          </div>\n							        </div>\n							      </div>\n							      <!-- END TO -->\n\n							    </v-pane-content>\n							  </v-pane>\n							</v-accordion>\n\n							<!-- START ATTACH -->\n							<div class="form-group" data-ng-if="uploader  && (faxRoom.status !== \'CLOSED\')">\n								<div class="col-md-12">\n									<hr ng-if="uploader.queue.length">\n									<table class="table">\n										<tbody>\n											<tr ng-repeat="item in uploader.queue">\n												<td style="border-top:none"><strong>{{ item.file.name | truncate: 5: \'...\': true}}</strong></td>\n												<td style="border-top:none" ng-show="uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB</td>\n												<td style="border-top:none" ng-show="uploader.isHTML5">\n													<div class="progress" style="margin-bottom: 0;">\n														<div class="progress-bar" role="progressbar" ng-style="{ \'width\': item.progress + \'%\' }"></div>\n													</div>\n												</td>\n												<td style="border-top-style:none" class="text-center">\n													<span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span>\n													<span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span>\n													<span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span>\n												</td>\n												<td style="border-top-style:none" nowrap>\n													<button type="button" class="btn btn-danger btn-xs" data-ng-click="item.remove()">\n														<span class="glyphicon glyphicon-trash"></span> {{\'APPLICATION_REMOVE\' | translate}}\n													</button>\n												</td>\n											</tr>\n										</tbody>\n									</table>\n									<div>\n									</div>\n								</div>\n							</div>\n							<!-- END ATTACH -->\n\n						</div>\n					</form>\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n<!-- END TODO CONTENT -->\n'),
-a.put("app/channels/fax/inbox/status/status.modal.html",'<div class="modal-header">\n  <button data-ng-if="modal.dismissable" type="button" data-ng-click="$dismiss()" class="close">&times;</button>\n  <h4 data-ng-if="modal.title" data-ng-bind="modal.title | translate" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p data-ng-if="modal.text && !closed" ng-bind="modal.text | translate"></p>\n  <form name="form" novalidate data-ng-init="initDisposition()">\n    <div class="form-group">\n      <ui-select data-ng-model="item.disposition" name="disposition" theme="bootstrap" data-ng-disabled="!dispositions.length" required>\n        <ui-select-match placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="disposition.name as disposition in dispositions | filter: $select.search">\n          <div ng-bind-html="disposition.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n    </div>\n    <div class="note note-warning" data-ng-if="dispositions.length < 1">\n      <h4 class="block">Warning!</h4>\n      <p>\n        {{ \'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate }}\n      </p>\n    </div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/fax/inbox/view/account/list/list.html",'<!-- BEGIN Portlet PORTLET-->\n<div class="portlet light" data-ng-init="initView()">\n	<div class="portlet-title">\n		<div class="caption">\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'NEW\'" uib-uncheckable>NEW</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'OPEN\'" uib-uncheckable>OPEN</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'PENDING\'" uib-uncheckable>PENDING</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'CLOSED\'" uib-uncheckable>CLOSED</button>\n			</div>\n		</div>\n		<div class="actions">\n			<a href="#" class="btn btn-icon-only default" data-ng-click="getPage();">\n				<i class="fa fa-refresh"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only red" data-ng-click="deleteItems();" data-ng-show="id.length && isAdmin">\n				<i class="fa fa-trash"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only btn-success" data-ng-click="disposeItems();" data-ng-show="id.length">\n				<i class="fa fa-upload"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only blue" data-ng-click="tagItems();" data-ng-show="id.length">\n				<i class="fa fa-tags"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only green" data-ng-click="openRoom(null, \'New Message\')">\n				<i class="fa fa-plus"></i>\n			</a>\n		</div>\n	</div>\n	<div class="portlet-title" data-ng-show="tags.length">\n		<!-- START TAGS -->\n		<div class="form-group">\n			<div class="row">\n				<div class="col-md-1">\n					<a href="#" class="btn btn-icon-only">\n						<i class="fa fa-tags" style="color: gray;"></i>\n					</a>\n				</div>\n				<div class="col-md-11">\n					<ui-select multiple data-ng-model="query.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)">\n						<ui-select-match placeholder="Search by tag...">{{$item}}</ui-select-match>\n						<ui-select-choices repeat="tag in tags | filter:$select.search">\n							{{tag}}\n						</ui-select-choices>\n					</ui-select>\n				</div>\n			</div>\n		</div>\n		<!-- END TAGS -->\n	</div>\n	<div class="portlet-body">\n		<!-- BEGIN UI-GRID SPINNER -->\n		<span us-spinner spinner-key="spinner-grid" spinner-start-active="false"></span>\n		<!-- END UI-GRID SPINNER -->\n\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-pagination ui-grid-selection ui-grid-exporter class="ui-grid-inbox">\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END Portlet PORTLET-->\n'),a.put("app/channels/fax/inbox/view/view.agents.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_AGENTS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TRANSPORT -->\n  <div class="form-group">\n    <form name="form" novalidate>\n      <!-- START TRANSPORT -->\n      <div class="form-group">\n        <ui-select multiple name="agents" data-ng-model="item.agents" theme="bootstrap">\n          <ui-select-match placeholder="{{\'APPLICATION_AGENTS\' | translate}}">{{$item.fullname}}</ui-select-match>\n          <ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n            {{agent.fullname}}\n          </ui-select-choices>\n        </ui-select>\n        <div class="note note-warning" data-ng-hide="agents">\n          <h4 class="block">Warning!</h4>\n          <p>\n            {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n          </p>\n          <p>\n            {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_AGENTS\' | translate}}</a>\n          </p>\n        </div>\n      </div>\n      <!-- END TRANSPORT -->\n    </form>\n  </div>\n  <!-- END TRANSPORT -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/fax/inbox/view/view.html",'<div class="row">\r\n	<div class="col-md-12">\r\n		<div class="page-bar">\r\n			<ul class="page-breadcrumb">\r\n        <li>\r\n          <i class="icon-rocket"></i>\r\n          <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\r\n          <i class="fa fa-angle-right"></i>\r\n        </li>\r\n        <li>\r\n          <i class="fa fa-spinner"></i>\r\n          <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\r\n          <i class="fa fa-angle-right"></i>\r\n        </li>\r\n        <li>\r\n          <i class="fa fa-fax"></i>\r\n          <a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\r\n          <i class="fa fa-angle-right"></i>\r\n        </li>\r\n				<li>\r\n					<i class="icon-note"></i>\r\n					<a href="#">{{ \'APPLICATION_INBOX\' | translate }}</a>\r\n				</li>\r\n			</ul>\r\n		</div>\r\n	</div>\r\n</div>\r\n\r\n<!-- BEGIN PAGE CONTENT-->\r\n<div class="row inbox">\r\n	<div class="col-md-3">\r\n		<ul class="inbox-nav margin-bottom-10">\r\n			<li data-ng-class="{active: $stateParams.id == faxAccount.id}" data-ng-repeat="faxAccount in faxAccounts">\r\n				<a href="/channels/fax/inbox/view/account/{{faxAccount.id}}/list" class="btn">\r\n					<i class="icon-notebook"></i> {{faxAccount.name}}\r\n				</a>\r\n				<b></b>\r\n			</li>\r\n		</ul>\r\n    <div class="note note-warning" data-ng-hide="faxAccounts.length">\r\n      <h4 class="block">Warning!</h4>\r\n      <p>\r\n        {{ \'MESSAGE_NO_AVAILABLE_ACCOUNTS\' | translate }}\r\n      </p>\r\n      <p>\r\n        {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/fax/accounts/list">{{\'APPLICATION_ACCOUNTS\' | translate}}</a>\r\n      </p>\r\n    </div>\r\n	</div>\r\n\r\n	<div class="col-md-9" data-ng-init="initView()">\r\n		<!-- BEGIN PROFILE CONTENT -->\r\n		<div class="room-content">\r\n			<div ui-view>\r\n				<div class="note note-info">\r\n					<h4 class="block">Info! {{\'APPLICATION_NO_ACCOUNT_SELECTED\' | translate}}</h4>\r\n				</div>\r\n			</div>\r\n		</div>\r\n		<!-- END PROFILE CONTENT -->\r\n	</div>\r\n</div>\r\n'),a.put("app/channels/fax/inbox/view/view.status.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ modal.title | translate }}</h3>\n</div>\n<div class="modal-body">\n  <p data-ng-if="modal.text" data-ng-bind="modal.text"></p>\n  <div data-ng-if="modal.html" data-ng-bind-html="modal.html"></div>\n</div>\n<div class="modal-footer">\n  <button data-ng-repeat="button in modal.buttons"\n  data-ng-class="button.classes"\n  data-ng-click="button.click($event)"\n  data-ng-bind="button.text | translate" class="btn"></button>\n</div>\n'),a.put("app/channels/fax/inbox/view/view.tags.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_TAGS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TRANSPORT -->\n  <div class="form-group">\n    <form name="form" novalidate>\n      <!-- START TAGS -->\n      <div class="form-group">\n        <ui-select multiple data-ng-model="item.tags" theme="bootstrap">\n          <ui-select-match placeholder="{{\'APPLICATION_TAGS\' | translate}}">{{$item}}</ui-select-match>\n          <ui-select-choices repeat="tag in tags | filter: $select.search">\n            {{tag}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n      <!-- END TAGS -->\n    </form>\n  </div>\n  <!-- END TRANSPORT -->\n</div>\n<div class="modal-footer">\n  <button type="button" class="btn" data-ng-class="button.class" data-ng-click="button.click()"data-ng-repeat="button in modal.buttons">{{button.text | translate}}</button>\n  <!-- <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button> -->\n</div>\n'),a.put("app/channels/fax/queue/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required />\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START STRATEGY -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.strategy.$touched || form.$submitted) && form.strategy.$invalid}">\n      <label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.strategy" name="strategy" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n        <ui-select-choices repeat="strategy in strategies | filter: $select.search">\n          <div ng-bind-html="strategy | uppercase | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.strategy.$touched || form.$submitted) && form.strategy.$invalid && form.strategy.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END STRATEGY -->\n\n    <!-- START TIMEOUT -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.timeout.$touched || form.$submitted) && form.timeout.$invalid}">\n      <label class="control-label">{{\'APPLICATION_AGENT_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="number" name="timeout" placeholder="Timeout" class="form-control" data-ng-model="item.timeout" required min="1"/>\n      <span data-ng-show="(form.timeout.$touched || form.$submitted) && form.timeout.$invalid && form.timeout.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TIMEOUT -->\n\n    <!-- START AGENTS-->\n    <div class="form-body" data-ng-init="getTeams()">\n      <label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n      <div class="input-group input-small mbottom20">\n        <input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="item.penalty" readonly>\n        <div class="spinner-buttons input-group-btn btn-group-vertical">\n          <button type="button" class="btn spinner-up btn-xs blue" data-ng-click="item.penalty=item.penalty+1">\n            <i class="fa fa-angle-up"></i>\n          </button>\n          <button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!item.penalty" data-ng-click="item.penalty=item.penalty-1">\n            <i class="fa fa-angle-down"></i>\n          </button>\n        </div>\n      </div>\n      <div class="form-group last">\n        <div class="col-md-12" id="multi-select-team">\n        </div>\n      </div>\n    </div>\n    <!-- END AGENTS-->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/fax/queue/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-fax"></i>\n						<a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-docs"></i>\n						<a href="/channels/fax/queues/lis">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_QUEUES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="#" data-ng-click="createItem()" data-ng-if="Auth.isAdmin()">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_QUEUE\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/fax/queue/view/view.agents.html",'<div class="row" data-ng-init="getTeams()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- BEGIN FORM-->\n				<form action="index.html" class="form-horizontal form-row-seperated">\n					<div class="form-body">\n						<label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n						<div class="input-group input-small mbottom20">\n							<input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="queue.penalty" readonly>\n							<div class="spinner-buttons input-group-btn btn-group-vertical">\n								<button type="button" class="btn spinner-up btn-xs blue" data-ng-click="queue.penalty=queue.penalty+1">\n									<i class="fa fa-angle-up"></i>\n								</button>\n								<button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!queue.penalty" data-ng-click="queue.penalty=queue.penalty-1">\n									<i class="fa fa-angle-down"></i>\n								</button>\n							</div>\n						</div>\n						<div class="form-group last">\n							<div class="col-md-12" id="multi-select-team">\n							</div>\n						</div>\n					</div>\n				</form>\n				<!-- END FORM-->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/fax/queue/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getQueue()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-fax"></i>\n					<a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/channels/fax/queues/list">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					<i data-ng-show="queue" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="queue">\n					<a href="#">{{queue.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/queue.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{queue.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.fax.queues.view.settings\')}">\n							<a data-ng-href="/channels/fax/queues/view/{{queue.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.channels.fax.queues.view.agents\')}" data-ng-show="Auth.getCurrentUser().role === \'admin\'">\n							<a data-ng-href="/channels/fax/queues/view/{{queue.id}}/agents">\n							<i class="icon-people"></i>\n							{{ \'APPLICATION_AGENTS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/fax/queue/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.general" data-ng-submit="forms.general.$valid && updateFaxQueue()" novalidate>\n					<!-- START NAME -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="queue.name" data-ng-pattern="settings.patternName" required />\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.pattern" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n						</span>\n					</div>\n					<!-- END NAME -->\n\n					<!-- START STRATEGY -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.strategy.$touched || forms.general.$submitted) && forms.general.strategy.$invalid}">\n						<label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}</label>\n						<ui-select data-ng-model="queue.strategy" name="strategy" theme="bootstrap">\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n							<ui-select-choices repeat="strategy in strategies | filter: $select.search">\n								<div ng-bind-html="strategy | uppercase | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n					</div>\n					<!-- END STRATEGY -->\n\n					<!-- START TIMEOUT -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}</label>\n						<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" min="1" data-ng-model="queue.timeout"/>\n					</div>\n					<!-- END TIMEOUT -->\n\n					<!-- START DESCRIPTION -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n						<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="queue.description"/>\n					</div>\n					<!-- END DESCRIPTION -->\n\n					<input data-ng-if="Auth.isAdmin()" class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/fax/realtime/view/agent/agent.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-tree-view ui-grid-expandable-row ui-grid-pagination ui-grid-auto-resize>\n			<span us-spinner spinner-key="grid-spinner" spinner-start-active="true"></span>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/fax/realtime/view/agent/agent.modal.info.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INTERFACE_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<div data-ng-if="agent.ipaddr" class="well">\n  <div>{{agent.ipaddr}}:{{agent.port}}</div>\n  <div>{{agent.fullcontact}}</div>\n  <div>{{agent.useragent}}</div>\n  <div>{{agent.lastms}}</div>\n</div>\n<div data-ng-if="!agent.ipaddr" class="alert alert-danger" role="alert">\n  {{\'MESSAGE_NO_AVAILABLE_INFO\' | translate}}\n</div>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/fax/realtime/view/agent/queue.modal.add.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_JOIN_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <div class="form-group row">\n  <label class="col-md-2 control-label" style="margin-top: 7px;">{{\'APPLICATION_QUEUE\' | translate}}:</label>\n  <div class="col-md-10">\n    <ui-select multiple ng-model="item.queues" theme="bootstrap" required>\n      <ui-select-match placeholder="{{\'APPLICATION_QUEUE\' | translate}}">{{$item.name}}</ui-select-match>\n      <ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n        <div ng-bind-html="queue.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n</div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/fax/realtime/view/application/application.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initApplications()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns class="ui-grid" ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/fax/realtime/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-fax"></i>\n					<a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-energy"></i>\n					<a href="#">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<div>\n			<nav class="navbar navbar-default" role="navigation">\n				<div class="collapse navbar-collapse">\n					<ul class="nav navbar-nav">\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.fax.realtime.view.agents\')}">\n							<a href="/channels/fax/realtime/view/agents">\n								{{\'APPLICATION_AGENTS\' | translate}}\n							</a>\n						</li>\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.fax.realtime.view.applications\')}">\n							<a href="/channels/fax/realtime/view/applications">\n								{{\'APPLICATION_APPLICATIONS\' | translate}}\n							</a>\n						</li>\n					</ul>\n				</div>\n			</nav>\n		</div>\n\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/mail/account/list/list.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-envelope"></i>\n					<a href="#">{{ \'APPLICATION_MAIL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="#">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n	</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group">\n						<a class="btn btn-default" href="#" data-ng-click="gridOptions.getPage();">\n							<i class="icon-reload"></i>\n						</a>\n					</div>\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/channels/mail/accounts/wizard">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/mail/account/view/action/list/list.html",'<div class="row" data-ng-init="initActons()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACTIONS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/channels/mail/accounts/view/{{account.id}}/actions/wizard" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACTION\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),
-a.put("app/channels/mail/account/view/action/view/view.html",'\n<div class="row" data-ng-init="initAction()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }}</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.settings" ng-submit="updateItem()" novalidate>\n					<!-- START APP -->\n					<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n							<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n							<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n								<div ng-bind-html="app.name | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid && forms.settings.app.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END APP -->\n\n					<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n						<!-- START QUEUE -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$invalid}">\n							<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.MailQueueId" name="queue" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n									<div ng-bind-html="queue.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="queues.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/mail/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END QUEUE -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n						<!-- START AGENT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$invalid}">\n							<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n								<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n									<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="agents.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_AGENTS\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END AGENT -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n						<!-- START SENDMAIL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" min="1" required/>\n							<span data-ng-show="(forms.action.from.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.action.mail.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n									<div ng-bind-html="template.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END SENDMAIL -->\n					</div>\n\n\n					<div class="app-settings" ng-slide-down="application.app === \'replyMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n						<!-- START REPLYMAIL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.action.type.$touched || forms.action.$submitted) && forms.action.type.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data1" name="type" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.key | translate }}</ui-select-match>\n								<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n									<div ng-bind-html="type.key | translate | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.action.type.$touched || forms.action.$submitted) && forms.action.type.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.action.mail.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n									<div ng-bind-html="template.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END REPLYMAIL -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n						<!-- START SENDSms -->\n						<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n								<span data-ng-show="(forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid && forms.settings.to.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.text.$touched || forms.text.$submitted) && forms.settings.text.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<textarea id="text" class="form-control maxlength-handler" maxlength="160"  name="text" data-ng-model="application.data6" required></textarea>\n							<span data-ng-show="(forms.settings.text.$touched || forms.settings.$submitted) && forms.settings.text.$invalid && forms.settings.text.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<!-- END SENDSms -->\n					</div>\n\n					<!-- START INTERVAL_TYPE -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n							<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n								{{ intType.name | translate }}\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END INTERVAL_TYPE -->\n\n					<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n						<!-- START TIME -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n							<div class="input-group input-large">\n								<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n									<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n								</fieldset>\n								<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n								<fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n								<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n							</div>\n						</div>\n						<!-- END TIME -->\n\n						<!-- START ALWAYS -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n							<div class="input-group input-large">\n								<label class="control-label pointer-cursor">\n									<input\n										bs-switch\n										data-ng-model="application.alwaysTime"\n										type="checkbox"\n										switch-active="{{ isActive }}"\n										switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n										switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n										switch-on-color="{{ onColor }}"\n										switch-off-color="{{ offColor }}"\n										switch-animate="{{ animate }}"\n										switch-size="{{ size }}"\n										switch-label="{{ label }}"\n										switch-icon="{{ icon }}"\n										switch-radio-off="{{ radioOff }}"\n										switch-label-width="{{ labelWidth }}"\n										switch-handle-width="{{ handleWidth }}">\n								</label>\n							</div>\n						</div>\n						<!-- END ALWAYS -->\n\n						<!-- START WEEKDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END WEEKDAY -->\n\n						<!-- START MONTHDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTHDAY -->\n\n						<!-- START MONTH -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTH -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n						<!-- START INTERVALS -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$invalid}">\n							<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n									{{ interval.name}}\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="intervals.length">\n								<h4 class="block">Warning!</h4>\n								<p>\n									{{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n								</p>\n								<p>\n									{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n								</p>\n							</div>\n							<span data-ng-show="(forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END INTERVALS -->\n\n					</div>\n					<button class="btn green-haze" type="submit">{{\'APPLICATION_UPDATE\' | translate}}</button>\n				</form>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/mail/account/view/action/wizard/wizard.html",'\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n					<wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.action.$valid)">\n\n						<form name="forms.action" novalidate>\n							<!-- START APP -->\n							<div class="form-group"  data-ng-class="{\'has-error\': forms.action.$submitted && forms.action.app.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n									<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n										<div ng-bind-html="app.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="forms.action.$submitted && forms.action.app.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END APP -->\n\n							<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n								<!-- START AGENT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$invalid}">\n									<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n										<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n											<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="agents.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_AGENTS\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END AGENT -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n								<!-- START QUEUE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$invalid}">\n									<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.MailQueueId" name="queue" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n											<div ng-bind-html="queue.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="queues.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/mail/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END QUEUE -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n								<!-- START SENDMAIL -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" min="1" required/>\n										<span data-ng-show="(forms.action.from.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.mail.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n											<div ng-bind-html="template.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END SENDMAIL -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'replyMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n								<!-- START REPLYMAIL -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.type.$touched || forms.action.$submitted) && forms.action.type.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data1" name="type" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.key | translate }}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.key | translate | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.type.$touched || forms.action.$submitted) && forms.action.type.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.mail.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n											<div ng-bind-html="template.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END REPLYMAIL -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n								<!-- START SENDSms -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n										<span data-ng-show="(forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid && forms.action.to.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<textarea id="text" class="form-control maxlength-handler"  maxlength="160" name="text" data-ng-model="application.data6" required></textarea>\n									<span data-ng-show="(forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid && forms.action.text.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<!-- END SENDSms -->\n							</div>\n\n							<!-- START INTERVAL_TYPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n										{{ intType.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END INTERVAL_TYPE -->\n\n							<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n								<!-- START TIME -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n									<div class="input-group input-large">\n										<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n											<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n										</fieldset>\n										<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n										<fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n										<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n									</div>\n								</div>\n								<!-- END TIME -->\n\n								<!-- START ALWAYS -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n									<div class="input-group input-large">\n										<label class="control-label pointer-cursor">\n											<input\n											bs-switch\n											data-ng-model="application.alwaysTime"\n											type="checkbox"\n											switch-active="{{ isActive }}"\n											switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n											switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n											switch-on-color="{{ onColor }}"\n											switch-off-color="{{ offColor }}"\n											switch-animate="{{ animate }}"\n											switch-size="{{ size }}"\n											switch-label="{{ label }}"\n											switch-icon="{{ icon }}"\n											switch-radio-off="{{ radioOff }}"\n											switch-label-width="{{ labelWidth }}"\n											switch-handle-width="{{ handleWidth }}">\n											<!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n										</label>\n									</div>\n								</div>\n								<!-- END ALWAYS -->\n\n								<!-- START WEEKDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END WEEKDAY -->\n\n								<!-- START MONTHDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTHDAY -->\n\n								<!-- START MONTH -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTH -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n								<!-- START INTERVALS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$invalid}">\n									<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n											{{ interval.name}}\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="intervals.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERVALS -->\n\n							</div>\n\n							<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONTINUE\' | translate}}"/>\n\n						</form>\n					</wz-step>\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/channels/mail/account/view/disposition/modal/add.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_DISPOSITIONS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.form.$touched || form.$submitted) && form.form.$invalid}">\n      <div class="">\n        <!-- <input type="text" name="form" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" class="form-control" data-ng-model="name" data-ng-pattern="/^[a-zA-Z0-9]*$/" required/> -->\n        <input type="text" name="form" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" class="form-control" data-ng-model="name" required/>\n        <span data-ng-show="form.form.$touched && form.form.$error.required" class="help-block help-block-error">\n          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n        </span>\n        <!-- <span data-ng-show="form.form.$touched && form.form.$error.pattern" class="help-block help-block-error">\n          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PATTERN\' | translate}}.\n        </span> -->\n      </div>\n      <!-- <div class="help-block">\n        {{\'MESSAGE_ALLOWED_NUMBERS_AND_LETTERS\' | translate}}\n			</div> -->\n    </div>\n    <!-- END NAME -->\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="form.$valid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/mail/account/view/disposition/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DISPOSITIONS\' | translate}}</span>\n				</div>\n				<div class="actions actions-md">\n					<a href="#" class="btn btn-icon-only green" data-ng-click="addDisposition();">\n						<i class="fa fa-plus"></i>\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n				<div class="tab-content">\n					<div class="row" data-ng-hide="dispositions.length">\n						<div class="col-md-12">\n							<div class="note note-info">\n								<h4 class="block">Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}</h4>\n							</div>\n						</div>\n					</div>\n\n					<!-- GENERAL TAB -->\n					<div class="row" data-ng-repeat="disposition in dispositions">\n						<div class="col-md-12 form-group">\n							<div class="input-group">\n								<div>\n									<input class="form-control" type="text" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" data-ng-model="disposition.name">\n								</div>\n								<span class="input-group-btn">\n									<button class="btn btn-success" type="button" data-ng-click="updateDisposition(disposition.id, disposition.name);"><i class="fa fa-cloud-upload fa-fw"></i> {{\'APPLICATION_UPDATE\' | translate}}</button>\n									<button class="btn btn-danger" type="button" data-ng-click="deleteDisposition(disposition.id);"><i class="fa fa-times fa-fw"></i> {{\'APPLICATION_DELETE\' | translate}}</button>\n								</span>\n							</div>\n						</div>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/mail/account/view/hooks/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_HOOKS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_ACCEPT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_REJECT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_CLOSE\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- ACCEPT TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.accept" data-ng-submit="forms.accept.$valid && updateItemMailAccount()" novalidate>\n								<div class="row">\n									<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid}">\n										<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n										<ui-select data-ng-model="account.acceptMethod" name="method" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n											<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n												<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n											</ui-select-choices>\n										</ui-select>\n										<span data-ng-show="(forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid && forms.accept.method.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<div  class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid}">\n										<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n										<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.acceptUrl"  ng-required="account.acceptMethod"/>\n										<span data-ng-show="(forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid && forms.accept.url.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n								<div class="row" ng-repeat = "action in account.actions">\n									<div  ng-switch="action.action">\n											<div ng-switch-when="pause">\n												<div  class="form-group col-md-4">\n													<label class="control-label">{{\'APPLICATION_PAUSE\' | translate}}</label></br>\n														<input\n														bs-switch\n														data-ng-change="resetActionData(action)"\n														data-ng-model="action.enabled"\n														type="checkbox"\n														switch-active="{{ isActive }}"\n														switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n														switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n														switch-on-color="{{ onColor }}"\n														switch-off-color="{{ offColor }}"\n														switch-animate="{{ animate }}"\n														switch-size="{{ size }}"\n														switch-label="{{ label }}"\n														switch-icon="{{ icon }}"\n														switch-radio-off="{{ radioOff }}"\n														switch-label-width="{{ labelWidth }}"\n														switch-handle-width="{{ handleWidth }}">\n													</div>\n													<div ng-if="action.enabled" class="form-group col-md-8">\n														<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}</label>\n														<ui-select  name="action" data-ng-model="action.type"  theme="bootstrap" >\n															<ui-select-match placeholder="{{\'APPLICATION_TYPE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n															<ui-select-choices repeat=" pause.name as pause in pauses | filter: $select.search">\n																<div ng-bind-html="pause.name | highlight: $select.search | uppercase" ></div>\n															</ui-select-choices>\n														</ui-select>\n													</div>\n											</div>\n										</div>\n									</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ACCEPT TAB -->\n					<!-- START REJECT TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.reject" data-ng-submit="forms.reject.$valid && updateItemMailAccount()" novalidate>\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.rejectMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid && forms.reject.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.rejectUrl" ng-required="account.rejectMethod"/>\n									<span data-ng-show="(forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid && forms.reject.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END REJECT TAB -->\n					<!-- START CLOSE TAB -->\n					<div class="tab-pane" id="tab_1_3">\n						<form name="forms.close" data-ng-submit="forms.close.$valid && updateItemMailAccount()" novalidate>\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.closeMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid && forms.close.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.closeUrl" ng-required="account.closeMethod"/>\n									<span data-ng-show="(forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid && forms.close.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CLOSE TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/mail/account/view/other/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_OTHER\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_SIGNATURE\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="mail-spinner-grid" spinner-start-active="false"></span>\n				<!-- END UI-GRID SPINNER -->\n\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItemMailAccount()" novalidate>\n							<!-- START WHITE LABEL -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.whiteLabel.$touched || forms.info.$submitted) && forms.info.whiteLabel.$invalid}">\n								<label class="control-label">{{\'APPLICATION_WHITE_LABEL\' | translate}}</label>\n								<textarea type="text" name="whiteLabel" placeholder="{{\'APPLICATION_WHITE_LABEL\' | translate}}" class="form-control" data-ng-model="account.whiteLabel" data-ng-disabled="!license.custom"/></textarea>\n								<span data-ng-show="(forms.info.whiteLabel.$touched || forms.info.$submitted) && forms.info.whiteLabel.$invalid && forms.info.whiteLabel.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END WHITE LABEL -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}" data-ng-disabled="!license.custom"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n					<!-- GENERAL TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.signature" data-ng-submit="updateItemMailAccount()" novalidate>\n							<!-- START SIGNATURE -->\n							<div class="form-group">\n								<div ckeditor="options" ng-model="account.signature"></div>\n							</div>\n							<!-- END WHITE LABEL -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/mail/account/view/setting/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n					<li data-ng-if="account.MailServerIn">\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">IMAP</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">SMTP</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="mail-spinner-grid" spinner-start-active="false"></span>\n				<!-- END UI-GRID SPINNER -->\n\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItemMailAccount()" novalidate>\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid && forms.info.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.address.$touched || forms.info.$submitted) && forms.info.address.$invalid}">\n								<label class="control-label">{{\'APPLICATION_EMAIL_ADDRESS\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="address" placeholder="{{\'APPLICATION_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.address" required/>\n								<span data-ng-show="(forms.info.address.$touched || forms.info.$submitted) && forms.info.address.$invalid && forms.info.address.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ADDRESS -->\n\n							<!-- START LIST -->\n							<div class="form-group" data-ng-if="license.cm">\n								<label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n									<div class="input-group">\n\n										<ui-select data-ng-model="account.ListId" name="list" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_LIST\' | translate}}">{{$select.selected.name}}</ui-select-match>\n											<ui-select-choices repeat="list.id as list in lists | filter: $select.search">\n												<div ng-bind-html="list.name | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n\n										<span class="input-group-btn">\n											<button type="button" data-ng-click="account.ListId = null" class="btn btn-default">\n												<span class="glyphicon glyphicon-trash"></span>\n											</button>\n										</span>\n\n									</div>\n							</div>\n							<!-- END LIST -->\n\n							<!-- START TEMPLATE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}</label>\n									<div class="input-group">\n\n										<ui-select data-ng-model="account.TemplateId" name="template" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_TEMPLATE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n											<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n												<div ng-bind-html="template.name | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n\n										<span class="input-group-btn">\n											<button type="button" data-ng-click="account.TemplateId = null" class="btn btn-default">\n												<span class="glyphicon glyphicon-trash"></span>\n											</button>\n										</span>\n\n									</div>\n							</div>\n							<!-- END TEMPLATE -->\n\n							<!-- START FIDELITY -->\n							<div class="form-group" data-ng-if="account.MailServerIn">\n								<label class="control-label">{{\'APPLICATION_FIDELITY\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="account.fidelity"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END FIDELITY -->\n\n							<!-- START TIMEOUT -->\n							<div class="form-group" data-ng-if="account.fidelity" data-ng-class="{\'has-error\': (forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" name="timeout" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="account.timeout" required/>\n								<span data-ng-show="(forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid && forms.info.timeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid && forms.info.timeout.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIMEOUT -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<!-- START SERVICE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_SERVICE\' | translate}}</label><br>\n								<input\n								bs-switch\n								data-ng-model="account.service"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END SERVICE -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n					<!-- IMAP TAB -->\n					<div class="tab-pane" id="tab_1_2" data-ng-if="account.MailServerIn">\n						<div class="note note-danger" data-ng-show="account.MailServerIn.state === \'DISCONNECTED\' || account.MailServerIn.state === \'ERROR\'">\n							<p> ERROR </p>\n							<json-formatter open="1" json="account.MailServerIn.source"></json-formatter>\n						</div>\n\n						<div class="note note-success" data-ng-show="account.MailServerIn.state === \'CONNECTED\'">\n							<p> CONNECTED </p>\n						</div>\n\n						<div class="note note-info" data-ng-show="account.MailServerIn.state === \'CONNECTING\'">\n							<p> TRYING... </p>\n						</div>\n\n						<form name="forms.formIn" data-ng-submit="forms.formIn.$valid && updateItemMailServerIn()" novalidate>\n							<!-- START HOST -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formIn.host.$touched || forms.formIn.$submitted) && forms.formIn.host.$invalid}">\n								<label class="control-label">{{\'APPLICATION_HOST\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="account.MailServerIn.host" required/>\n								<span data-ng-show="(forms.formIn.host.$touched || forms.formIn.$submitted) && forms.formIn.host.$invalid && forms.formIn.host.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END HOST -->\n\n							<!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formIn.username.$touched || forms.formIn.$submitted) && forms.formIn.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.MailServerIn.username" required/>\n								<span data-ng-show="(forms.formIn.username.$touched || forms.formIn.$submitted) && forms.formIn.username.$invalid && forms.formIn.username.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formIn.password.$touched || forms.formIn.$submitted) && forms.formIn.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.MailServerIn.password" required/>\n								<span data-ng-show="(forms.formIn.password.$touched || forms.formIn.$submitted) && forms.formIn.password.$invalid && forms.formIn.password.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n							<!-- START PORT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formIn.port.$touched || forms.formIn.$submitted) && forms.formIn.port.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" name="port" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="account.MailServerIn.port" required/>\n								<span data-ng-show="(forms.formIn.port.$touched || forms.formIn.$submitted) && forms.formIn.port.$invalid && forms.formIn.port.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formIn.port.$touched || forms.formIn.$submitted) && forms.formIn.port.$invalid && forms.formIn.port.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PORT -->\n\n							<!-- START MAILBOX -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_MAILBOX\' | translate}}</label>\n								<input type="text" name="mailbox" placeholder="{{\'APPLICATION_MAILBOX\' | translate}}" class="form-control" data-ng-model="account.MailServerIn.mailbox"/>\n							</div>\n							<!-- END MAILBOX -->\n\n							<!-- START SEARCH FILTER -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_SEARCH_FILTER\' | translate}}</label>\n								<ui-select data-ng-model="account.MailServerIn.filter" name="filter" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="filter in [\'UNSEEN\'] | filter: $select.search">\n										<div ng-bind-html="filter | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n							</div>\n							<!-- START SEARCH FILTER -->\n\n							<!-- START connTimeout -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.in.connTimeout.$touched || forms.in.$submitted) && forms.in.connTimeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CONNECTION_TIMEOUT\' | translate}} [sec]<span class="required" aria-required="true">*</span></label>\n								<input type="number" name="connTimeout" placeholder="{{\'APPLICATION_CONNECTION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="account.MailServerIn.connTimeout" required/>\n								<span data-ng-show="(forms.in.connTimeout.$touched || forms.in.$submitted) && forms.in.connTimeout.$invalid && forms.in.connTimeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.in.connTimeout.$touched || forms.in.$submitted) && forms.in.connTimeout.$invalid && forms.in.connTimeout.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END connTimeout -->\n\n							<!-- START authTimeout -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.in.authTimeout.$touched || forms.in.$submitted) && forms.in.authTimeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_AUTH_TIMEOUT\' | translate}} [sec]<span class="required" aria-required="true">*</span></label>\n								<input type="number" name="authTimeout" placeholder="{{\'APPLICATION_AUTH_TIMEOUT\' | translate}}" class="form-control" data-ng-model="account.MailServerIn.authTimeout" required/>\n								<span data-ng-show="(forms.in.authTimeout.$touched || forms.in.$submitted) && forms.in.authTimeout.$invalid && forms.in.authTimeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.in.authTimeout.$touched || forms.in.$submitted) && forms.in.authTimeout.$invalid && forms.in.authTimeout.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END authTimeout -->\n\n							<!-- START DELETE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DELETE_MAIL_FROM_SERVER\' | translate}}</label><br>\n								<input\n								bs-switch\n								data-ng-model="account.MailServerIn.delete"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END DELETE -->\n\n							<!-- START SSL -->\n							<div class="form-group">\n								<label class="control-label">SSL</label><br>\n								<input\n								bs-switch\n								data-ng-model="account.MailServerIn.ssl"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END SSL -->\n\n							<!-- START Keepalive -->\n							<div class="form-group">\n								<label class="control-label">Keepalive</label><br>\n								<input\n								bs-switch\n								data-ng-model="account.MailServerIn.keepalive"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END Keepalive -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END IMAP TAB -->\n\n					<!-- SMTP TAB -->\n					<div class="tab-pane" id="tab_1_3">\n\n						<div class="note note-danger" data-ng-show="account.MailServerOut.state === \'DISCONNECTED\' || account.MailServerOut.state === \'ERROR\'">\n							<p> ERROR </p>\n							<json-formatter open="1" json="account.MailServerOut.source"></json-formatter>\n						</div>\n\n						<div class="note note-success" data-ng-show="account.MailServerOut.state === \'CONNECTED\'">\n							<p> CONNECTED </p>\n						</div>\n\n						<div class="note note-info" data-ng-show="account.MailServerOut.state === \'CONNECTING\'">\n							<p> TRYING... </p>\n						</div>\n\n						<form name="forms.formOut" data-ng-submit="forms.formOut.$valid && updateItemMailServerOut()" novalidate>\n\n							<!-- START HOST -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formOut.host.$touched || forms.formOut.$submitted) && forms.formOut.host.$invalid}">\n								<label class="control-label">{{\'APPLICATION_HOST\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="account.MailServerOut.host" required/>\n								<span data-ng-show="(forms.formOut.host.$touched || forms.formOut.$submitted) && forms.formOut.host.$invalid && forms.formOut.host.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END HOST -->\n\n							<!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formOut.username.$touched || forms.formOut.$submitted) && forms.formOut.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.MailServerOut.username" required/>\n								<span data-ng-show="(forms.formOut.username.$touched || forms.formOut.$submitted) && forms.formOut.username.$invalid && forms.formOut.username.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formOut.password.$touched || forms.formOut.$submitted) && forms.formOut.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.MailServerOut.password" required/>\n								<span data-ng-show="(forms.formOut.password.$touched || forms.formOut.$submitted) && forms.formOut.password.$invalid && forms.formOut.password.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n							<!-- START PORT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formOut.port.$touched || forms.formOut.$submitted) && forms.formOut.port.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" name="port" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="account.MailServerOut.port" required/>\n								<span data-ng-show="(forms.formOut.form.$touched || forms.formOut.$submitted) && forms.formOut.port.$invalid && forms.formOut.port.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formOut.form.$touched || forms.formOut.$submitted) && forms.formOut.port.$invalid && forms.formOut.port.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PORT -->\n\n							<!-- START SSL -->\n							<div class="form-group">\n								<label class="control-label">SSL</label><br>\n								<input\n								bs-switch\n								data-ng-model="account.MailServerOut.ssl"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END SSL -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n							<input class="btn blue-madison" type="button" value="Test" data-ng-click="test()"/>\n						</form>\n					</div>\n					<!-- END SMTP TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
-a.put("app/channels/mail/account/view/view.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-envelope"></i>\n					<a href="#">{{ \'APPLICATION_MAIL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="/channels/mail/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n					<i class="fa fa-angle-right" data-ng-show="account"></i>\n				</li>\n				<li data-ng-show="account">\n					<a href="#">{{ account.description || account.name }}</a>\n				</li>\n			</ul>\n		</div>\n\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar" data-ng-init="initView()">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img ng-src="assets/images/media/account.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ account.description || account.name }}\n					</div>\n					<div class="profile-usertitle-job">\n						{{account.email}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li ng-class="{active: $state.is(\'main.channels.mail.accounts.view.settings\')}">\n							<a href="/channels/mail/accounts/view/{{account.id}}/settings">\n							<i class="icon-settings"></i>\n							{{\'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.mail.accounts.view.hooks\')}" data-ng-if="account.MailServerIn">\n							<a href="/channels/mail/accounts/view/{{account.id}}/hooks">\n							<i class="fa fa-code"></i>\n							{{\'APPLICATION_HOOKS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.mail.accounts.view.dispositions\')}" data-ng-if="account.MailServerIn">\n							<a href="/channels/mail/accounts/view/{{account.id}}/dispositions">\n							<i class="icon-target"></i>\n							{{\'APPLICATION_DISPOSITIONS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.includes(\'main.channels.mail.accounts.view.actions\')}" data-ng-if="account.MailServerIn">\n							<a href="/channels/mail/accounts/view/{{account.id}}/actions/list">\n							<i class="icon-directions"></i>\n							{{\'APPLICATION_ACTIONS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.includes(\'main.channels.mail.accounts.view.other\')}" data-ng-if="account.MailServerIn">\n							<a href="/channels/mail/accounts/view/{{account.id}}/other">\n							<i class="icon-equalizer"></i>\n							{{\'APPLICATION_OTHER\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<div ui-view class="profile-content"></div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n<!-- END PAGE CONTENT-->\n</div>\n'),a.put("app/channels/mail/account/wizard/wizard.html",'\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN PAGE HEADER-->\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-envelope"></i>\n					<a href="#">{{ \'APPLICATION_MAIL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="/channels/mail/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n		<!-- END PAGE HEADER-->\n\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n					<wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="formValidation(forms.info.$valid)">\n						<form name="forms.info" novalidate>\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid && forms.info.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.address.$touched || forms.info.$submitted) && forms.info.address.$invalid}">\n								<label class="control-label">{{\'APPLICATION_EMAIL_ADDRESS\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="address" placeholder="{{\'APPLICATION_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.address" required/>\n								<span data-ng-show="(forms.info.address.$touched || forms.info.$submitted) && forms.info.address.$invalid && forms.info.address.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ADDRESS -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n						</form>\n					</wz-step>\n\n					<wz-step title="IMAP" canexit="formValidation(forms.in.$valid)">\n						<form name="forms.in" novalidate>\n							<!-- START HOST -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.in.host.$touched || forms.in.$submitted) && forms.in.host.$invalid}">\n								<label class="control-label">{{\'APPLICATION_INCOMING_MAIL_SERVER\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="item.MailServerIn.host" required/>\n								<span data-ng-show="(forms.in.host.$touched || forms.in.$submitted) && forms.in.host.$invalid && forms.in.host.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END HOST -->\n\n							<!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.in.username.$touched || forms.in.$submitted) && forms.in.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.MailServerIn.username" name="username" required/>\n								<span data-ng-show="(forms.in.username.$touched || forms.in.$submitted) && forms.in.username.$invalid && forms.in.username.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.in.password.$touched || forms.in.$submitted) && forms.in.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.MailServerIn.password" required/>\n								<span data-ng-show="(forms.in.password.$touched || forms.in.$submitted) && forms.in.password.$invalid && forms.in.password.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n							<!-- START PORT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.in.port.$touched || forms.in.$submitted) && forms.in.port.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" name="port" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="item.MailServerIn.port" required/>\n								<span data-ng-show="(forms.in.port.$touched || forms.in.$submitted) && forms.in.port.$invalid && forms.in.port.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.in.port.$touched || forms.in.$submitted) && forms.in.port.$invalid && forms.in.port.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PORT -->\n\n							<!-- START MAILBOX -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_MAILBOX\' | translate}}</label>\n								<input type="text" name="mailbox" placeholder="{{\'APPLICATION_MAILBOX\' | translate}}" class="form-control" data-ng-model="item.MailServerIn.mailbox"/>\n							</div>\n							<!-- END MAILBOX -->\n\n							<!-- START SEARCH FILTER -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_SEARCH_FILTER\' | translate}}</label>\n								<ui-select data-ng-model="item.MailServerIn.filter" name="filter" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="filter in [\'UNSEEN\'] | filter: $select.search">\n										<div data-ng-bind="filter | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n							</div>\n							<!-- START SEARCH FILTER -->\n\n							<!-- START connTimeout -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.in.connTimeout.$touched || forms.in.$submitted) && forms.in.connTimeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CONNECTION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" name="connTimeout" placeholder="{{\'APPLICATION_CONNECTION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="item.MailServerIn.connTimeout" required/>\n								<span data-ng-show="(forms.in.connTimeout.$touched || forms.in.$submitted) && forms.in.connTimeout.$invalid && forms.in.connTimeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.in.connTimeout.$touched || forms.in.$submitted) && forms.in.connTimeout.$invalid && forms.in.connTimeout.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END connTimeout -->\n\n							<!-- START authTimeout -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.in.authTimeout.$touched || forms.in.$submitted) && forms.in.authTimeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_AUTH_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" name="authTimeout" placeholder="{{\'APPLICATION_AUTH_TIMEOUT\' | translate}}" class="form-control" data-ng-model="item.MailServerIn.authTimeout" required/>\n								<span data-ng-show="(forms.in.authTimeout.$touched || forms.in.$submitted) && forms.in.authTimeout.$invalid && forms.in.authTimeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.in.authTimeout.$touched || forms.in.$submitted) && forms.in.authTimeout.$invalid && forms.in.authTimeout.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END authTimeout -->\n\n							<!-- START DELETE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DELETE_MAIL_FROM_SERVER\' | translate}}</label><br>\n								<input\n								bs-switch\n								data-ng-model="item.MailServerIn.delete"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END DELETE -->\n\n							<!-- START SSL -->\n							<div class="form-group">\n								<label class="control-label">SSL</label><br>\n								<input\n								bs-switch\n								data-ng-model="item.MailServerIn.ssl"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END SSL -->\n\n							<!-- START Keepalive -->\n							<div class="form-group">\n								<label class="control-label">Keepalive</label><br>\n								<input\n								bs-switch\n								data-ng-model="item.MailServerIn.keepalive"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END Keepalive -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="goNext()"/>\n						</form>\n					</wz-step>\n\n					<wz-step title="SMTP" canexit="formValidation(forms.out.$valid)">\n						<form name="forms.out" novalidate>\n							<!-- START HOST -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.out.host.$touched || forms.out.$submitted) && forms.out.host.$invalid}">\n								<label class="control-label">{{\'APPLICATION_OUTGOING_MAIL_SERVER\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="item.MailServerOut.host" required/>\n								<span data-ng-show="(forms.out.host.$touched || forms.out.$submitted) && forms.out.host.$invalid && forms.out.host.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END HOST -->\n\n							<!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.out.username.$touched || forms.out.$submitted) && forms.out.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.MailServerOut.username" required/>\n								<span data-ng-show="(forms.out.username.$touched || forms.out.$submitted) && forms.out.username.$invalid && forms.out.username.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.out.password.$touched || forms.out.$submitted) && forms.out.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.MailServerOut.password" required/>\n								<span data-ng-show="(forms.out.password.$touched || forms.out.$submitted) && forms.out.password.$invalid && forms.out.password.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n							<!-- START PORT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.out.port.$touched || forms.out.$submitted) && forms.out.port.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" name="port" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="item.MailServerOut.port" required/>\n								<span data-ng-show="(out.$touched || forms.out.$submitted) && forms.out.port.$invalid && forms.out.port.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(out.$touched || forms.out.$submitted) && forms.out.port.$invalid && forms.out.port.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PORT -->\n\n							<!-- START SSL -->\n							<div class="form-group">\n								<label class="control-label">SSL</label><br>\n								<input\n								bs-switch\n								data-ng-model="item.MailServerOut.ssl"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END SSL -->\n\n							<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="goNext()"/>\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/mail/inbox/message/info.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body"  data-ng-init="initInfo()">\n  <div class="form-group" ng-if="data">\n    <json-formatter json="data" open="1"></json-formatter>\n  </div>\n  <div class="note note-warning" data-ng-hide="data">\n    <h4 class="block"></h4>\n    <p>\n      {{ \'MESSAGE_NO_INFO_AVAILABLE\' | translate }}\n    </p>\n  </div>\n\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/mail/inbox/message/message.directive.html",'<div class="message">\n  <div class="row">\n    <div class="col-md-12">\n      <span class="bold">From: </span>\n      <a href="" data-ng-click="openContact(message.from[0])">{{message.from[0]}} </a>\n      <br>\n      <span class="bold">To: </span>\n      <a href="" data-ng-click="openContact(to)" data-ng-repeat="to in message.to">{{to}}<span data-ng-if="!$last">, </span></a>\n      <br>\n      <span data-ng-if="message.cc.length" class="bold">Cc: </span>\n      <a href="" data-ng-click="openContact(cc)" data-ng-repeat="cc in message.cc">{{cc}}<span data-ng-if="!$last">, </span></a>\n      <br>\n      <span data-ng-if="message.bcc.length" class="bold">Bcc: </span>\n      <a href="" data-ng-click="openContact(bcc)" data-ng-repeat="cc in message.bcc">{{bcc}}<span data-ng-if="!$last">, </span></a>\n    </div>\n  <div class="row">\n    <div class="col-md-12">\n      <span class="pull-right" data-ng-if="message.User">{{\'APPLICATION_SENT_BY\' | translate}}: <strong>{{message.User.fullname}}</strong></span>\n      <span class="pull-right" data-ng-if="message.voiceSource">{{\'APPLICATION_SENT_BY\' | translate}}: <strong>Cally &#178;</strong>\n        <a ng-click="info(message.voiceSource)"><i class="icon-info font-blue"></i>\n        </a>\n      </span>\n    </div>\n  </div>\n  <br>\n  <span class="todo-tasklist-date">\n    <span class="pull-right" data-ng-switch="message.status" data-ng-if="message.status!==\'RECEIVED\'" uib-tooltip="{{\'APPLICATION_RETRY\' | translate}}: {{message.retry}}">\n      <a ng-switch-when="SENDING" href="#" class="btn default btn-xs inactive-link blue-stripe"> {{message.status | uppercase}}\n        <i class="fa fa-warning"></i>\n      </a>\n      <a ng-switch-when="SENT" href="#" class="btn default btn-xs inactive-link green-stripe"> {{message.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n      <a ng-switch-when="FAILED" href="#" class="btn default btn-xs red-stripe" data-ng-click="retry(message.id)"> {{message.status | uppercase}}\n        <i class="fa fa-times"></i>\n      </a>\n    </span>\n    <span class="pull-right" data-ng-if="message.status===\'RECEIVED\'">\n      <a href="#" class="btn default btn-xs inactive-link green-stripe"> {{message.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n    </span>\n    <i class="icon-calendar"></i> <span am-time-ago="message.updatedAt"></span>\n  </span>\n  <hr>\n  <div class="body text-left message-body" data-ng-bind="message.text"></div>\n  <h5 data-ng-hide="message.text" class="media-heading"><i>{{\'MESSAGE_NO_AVAILABLE_TEXT\' | translate | lowercase}}</i></h5>\n  <hr data-ng-if="message.MailAttachments.length">\n  <div data-ng-repeat="mailAttachment in message.MailAttachments">\n    <strong>{{mailAttachment.name}}</strong>\n    <span>\n      ({{mailAttachment.size | prettyBytes}})\n    </span>\n    <a target="_self" download="{{mailAttachment.name}}" href="api/mail/attachments/{{mailAttachment.id}}">\n      <i class="icon-cloud-download"></i>\n    </a>\n    <a ng-if="::(mailAttachment.type.indexOf(\'image\') > -1)" ng-click="openPreview(mailAttachment.id)">\n      <i class="icon-picture"></i>\n    </a>\n  </div>\n</div>\n'),a.put("app/channels/mail/inbox/note/note.directive.html",'<div class="note">\n  <div class="row">\n    <div class="col-md-6">\n      <a type="button" name="button" data-ng-if="::(Auth.getCurrentUser().id == message.UserId)" data-ng-click="deleteNote()">\n        <i class="fa fa-trash-o" style="color: red;"></i>\n      </a>\n\n      <i class="icon-calendar"></i> <span am-time-ago="message.updatedAt"></span>\n    </div>\n    <div class="col-md-6">\n      <span class="pull-right" data-ng-show="message.User">{{\'APPLICATION_ADD_BY\' | translate}}: <strong>{{message.User.fullname}}</strong></span>\n    </div>\n  </div>\n  <hr>\n  <span class="body text-left" data-ng-bind-html="message.text" style="white-space: pre-wrap;"></span>\n</div>\n'),a.put("app/channels/mail/inbox/note/note.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_NOTES\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n    <div class="form-group">\n      <textarea data-ng-model="item.text" name="text" rows="10" style="resize: none; width: 100%;"></textarea>\n    </div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/mail/inbox/room/room.directive.html",'<!-- BEGIN TODO CONTENT -->\n<div class="todo-content">\n	<div class="portlet light">\n		<div class="portlet-title">\n			<div class="caption">\n				<button data-ng-if="form.from.length && form.to.length && mailRoom.status !== \'CLOSED\' && form.html" class="btn btn-sm btn-default green-meadow" data-ng-click="sendMail()">\n					<i class="icon-paper-plane" style="color: white;"></i> {{\'APPLICATION_SEND\' | translate}}\n				</button>\n				<span data-ng-if="mailRoom && form.from.length && form.to.length && mailRoom.status !== \'CLOSED\' && form.html"> | </span>\n				<span data-ng-if="mailRoom" class="label label-default"> #{{mailRoom.id}} {{mailRoom.status}}</span>\n				<span data-ng-if="mailRoom"> | </span>\n				<span data-ng-if="mailRoom && mailRoom.ParentId" class="label label-warning"> Ref: <a data-ng-click="openRoom(mailRoom.ParentId)">#{{mailRoom.ParentId}}</a></span>\n				<span data-ng-if="mailRoom && mailRoom.ParentId"> | </span>\n				<span data-ng-if="mailRoom" class="caption-subject font-green-sharp bold uppercase dot">{{mailRoom.subject || \'No subject\'}}</span>\n			</div>\n			<div class="actions">\n				<button class="btn btn-icon-only yellow" data-ng-if="mailRoom" data-ng-click="loadNote()" data-ng-hide="mailRoom.status == \'CLOSED\'" title="{{\'APPLICATION_NOTES\' | translate}}">\n					<i class="fa fa-sticky-note"></i>\n				</button>\n				<button class="file-upload" data-ng-hide="mailRoom.status == \'CLOSED\'">\n					<i class="fa fa-paperclip"></i> <input type="file" data-ng-if="uploader" data-ng-disabled="mailRoom.status == \'CLOSED\'" nv-file-select uploader="uploader" multiple class="file-input" title="{{\'APPLICATION_ATTACHMENTS\' | translate}}">\n				</button>\n				<!-- UPDATE SECTION START -->\n				<button data-ng-class="mailRoom.status == \'CLOSED\' ? \'grey-cascade\' : \'btn-success\'" class="btn btn-icon-only" data-ng-disabled="mailRoom.status == \'CLOSED\' && mailRoom.disposition" data-ng-if="mailRoom" data-ng-click="closeRoom()" title="{{\'APPLICATION_STATUS\' | translate}}">\n					<i data-ng-class="mailRoom.status == \'CLOSED\' ? \'icon-target\' : \'fa fa-upload\'"></i>\n				</button>\n				<!-- UPDATE SECTION END -->\n				<button class="btn default btn-icon-only" data-ng-if="mailRoom && mailRoom.status !== \'CLOSED\'" data-ng-click="togglePanelLeft()" title="{{\'APPLICATION_RESIZE\' | translate}}">\n					<i ng-class="panelRight == \'col-md-12\' ? \'icon-size-actual\' : \'icon-size-fullscreen\'"></i>\n				</button>\n			</div>\n		</div>\n		<div class="portlet-body">\n			<div class="row">\n				<div data-ng-if="panelLeft" data-ng-class="panelLeft">\n					<div class="form">\n						<!-- START TAGS -->\n						<div class="form-group" data-ng-if="mailRoom.status !== \'CLOSED\'">\n							<div class="row">\n								<div class="col-md-1">\n									<a href="#" class="btn btn-icon-only">\n										<i class="fa fa-tags" style="color: gray;"></i>\n									</a>\n								</div>\n								<div class="col-md-11">\n									<ui-select multiple data-ng-model="form.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)" data-ng-disabled="mailRoom.status == \'CLOSED\'">\n										<ui-select-match placeholder="Tags...">{{$item}}</ui-select-match>\n										<ui-select-choices repeat="tag in tags | filter:$select.search" class="">\n											{{tag}}\n										</ui-select-choices>\n									</ui-select>\n								</div>\n							</div>\n						</div>\n						<!-- END TAGS -->\n					</div>\n\n					<hr data-ng-if="mailRoom && mailRoom.status !== \'CLOSED\'">\n\n					<!-- END TAGS -->\n					<div id="mail-box">\n						<ul class="chats">\n							<li\n							data-ng-switch="mailMessage.status"\n							data-ng-class="{\'in\': mailMessage.status == \'RECEIVED\', \'out\': mailMessage.status == \'SENT\' || mailMessage.status == \'SENDING\' || mailMessage.status == \'FAILED\' || mailMessage.status == \'NOTE\'}"\n							data-ng-repeat="mailMessage in mailRoom.MailMessages | orderBy:\'-createdAt\'">\n							<div class="avatar" data-ng-class="message.UserId ? \'pretty-avatar\' : \'pretty-avatar-v\'">\n								<ng-letter-avatar\n								data-ng-if="mailMessage.UserId"\n								height="40"\n								width="40"\n								fontsize="25"\n								data="{{mailMessage.User.fullname}}"\n								avatarcustombgcolor="#B0B0B0"\n								avatarcustomborder="border:2px solid #3399CC"\n								charCount="2"\n								shape="round"></ng-letter-avatar>\n								<ng-letter-avatar\n								data-ng-if="!mailMessage.UserId"\n								height="40"\n								width="40"\n								fontsize="25"\n								data="{{mailMessage.from[0]}}"\n								avatarcustombgcolor="#B0B0B0"\n								avatarcustomborder="border:2px solid #EA4C61"\n								charCount="1"\n								shape="round"></ng-letter-avatar>\n							</div>\n							<mail-note message="mailMessage" ng-switch-when="NOTE"></mail-note>\n							<mail-message message="mailMessage" list-id="mailRoom.MailAccount.ListId" ng-switch-default></mail-message>\n						</li>\n					</ul>\n				</div>\n			</div>\n			<div data-ng-class="panelRight">\n				<div class="note note-info" data-ng-if="mailRoom && mailRoom.status == \'CLOSED\'">\n					<h4 class="block"><i class="icon-info"></i> {{\'MESSAGE_MAIL_ROOM_CLOSED\' | translate}}!</h4>\n					<p>\n						<strong>{{\'MESSAGE_MAIL_ROOM_CLOSED_DETAILS\' | translate}}.</strong>\n					</p>\n					<hr>\n					<p>\n						<i class="icon-target"></i> {{\'APPLICATION_DISPOSITION\' | translate}}: <strong>{{mailRoom.disposition}}</strong>\n					</p>\n					<p>\n						<i class="icon-calendar"></i> {{\'APPLICATION_UPDATED_AT\' | translate}}: <strong>{{mailRoom.updatedAt | date:\'medium\'}}</strong> (<span am-time-ago="mailRoom.updatedAt"></span>)\n					</p>\n				</div>\n				<form name="forms.compose" data-ng-submit="sendMail()" class="form-horizontal" novalidate>\n					<!-- START HEAD -->\n					<div class="form">\n						<v-accordion class="vAccordion--default" ng-if="mailRoom.status !== \'CLOSED\'">\n							<v-pane expanded="expanded">\n								<v-pane-header>\n									<i class="icon-people"></i> From: {{form.from[0]}}, To: {{form.to[0].email}} <span ng-if="form.to.length > 1">(+{{form.to.length - 1}})</span>\n								</v-pane-header>\n								<v-pane-content>\n									<!-- START FROM -->\n									<div class="form-group" data-ng-if="mailRoom.status !== \'CLOSED\'">\n										<div class="col-md-12">\n											<div class="row">\n												<div class="col-md-1">\n													<label class="control-label">From:</label>\n												</div>\n												<div class="col-md-11">\n													<ui-select data-ng-model="form.from[0]" data-ng-change="setList($select.selected.ListId)" theme="bootstrap" name="from" required>\n														<ui-select-match placeholder="From...">{{$select.selected.name}}</ui-select-match>\n														<ui-select-choices repeat="mailAccount.address as mailAccount in mailAccounts | filter: $select.search">\n															<div data-ng-bind-html="mailAccount.name | highlight: $select.search"></div>\n															<small data-ng-bind-html="mailAccount.address | highlight: $select.search"></small>\n														</ui-select-choices>\n													</ui-select>\n												</div>\n											</div>\n										</div>\n									</div>\n									<!-- END FROM -->\n\n									<!-- MAIL TO -->\n									<div class="form-group" data-ng-if="mailRoom.status !== \'CLOSED\'">\n										<div class="col-md-12">\n											<div class="row">\n												<div class="col-md-1">\n													<label class="control-label">To:</label>\n												</div>\n												<div class="col-md-11">\n													<tags-input ng-model="form.to" type="email" display-property="email">\n														<auto-complete source="getContacts($query)"></auto-complete>\n													</tags-input>\n												</div>\n											</div>\n										</div>\n									</div>\n									<!-- END TO -->\n\n									<!-- START CC -->\n									<div class="form-group" data-ng-if="mailRoom.status !== \'CLOSED\'">\n										<div class="col-md-12">\n											<div class="row">\n												<div class="col-md-1">\n													<label class="control-label">Cc:</label>\n												</div>\n												<div class="col-md-11">\n													<tags-input ng-model="form.cc" type="email" display-property="email">\n														<auto-complete source="getContacts($query)"></auto-complete>\n													</tags-input>\n												</div>\n											</div>\n										</div>\n									</div>\n									<!-- END CC -->\n\n									<!-- START BCC -->\n									<div class="form-group" data-ng-if="mailRoom.status !== \'CLOSED\'">\n										<div class="col-md-12">\n											<div class="row">\n												<div class="col-md-1">\n													<label class="control-label">Bcc:</label>\n												</div>\n												<div class="col-md-11">\n													<tags-input ng-model="form.bcc" type="email" display-property="email">\n														<auto-complete source="getContacts($query)"></auto-complete>\n													</tags-input>\n												</div>\n											</div>\n										</div>\n									</div>\n									<!-- END BCC -->\n\n									<!-- START SUBJECT -->\n									<div class="form-group" data-ng-class="{\'has-error\': forms.compose.subject.$invalid && forms.compose.$submitted}" data-ng-if="mailRoom.status !== \'CLOSED\'">\n										<div class="col-md-12">\n											<div class="row">\n												<div class="col-md-1">\n													<label class="control-label">Subj:</label>\n												</div>\n												<div class="col-md-11">\n													<input type="text" name="subject" class="form-control todo-taskbody-taskdesc" placeholder="Subject..." rows="8" data-ng-model="form.subject">\n													<span data-ng-if="forms.compose.subject.$invalid && forms.compose.$submitted" class="help-block help-block-error">\n														<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n													</span>\n												</div>\n											</div>\n										</div>\n									</div>\n									<!-- END SUJBECT -->\n								</v-pane-content>\n							</v-pane>\n						</v-accordion>\n\n						<!-- START ATTACH -->\n						<div class="form-group" data-ng-if="uploader  && (mailRoom.status !== \'CLOSED\')">\n							<div class="col-md-12">\n								<hr ng-if="uploader.queue.length">\n								<table class="table">\n									<tbody>\n										<tr ng-repeat="item in uploader.queue">\n											<td style="border-top:none" rowspan="{{uploader.queue.length}}" ng-if="(!$index)">\n												{{\'APPLICATION_ATTACHMENTS\' | translate}}:\n											</td>\n											<td style="border-top:none"><strong>{{ item.file.name }}</strong></td>\n											<td style="border-top:none" ng-show="uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB</td>\n											<td style="border-top:none" ng-show="uploader.isHTML5">\n												<div class="progress" style="margin-bottom: 0;">\n													<div class="progress-bar" role="progressbar" ng-style="{ \'width\': item.progress + \'%\' }"></div>\n												</div>\n											</td>\n											<td style="border-top-style:none" class="text-center">\n												<span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span>\n												<span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span>\n												<span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span>\n											</td>\n											<td style="border-top-style:none" nowrap>\n												<button type="button" class="btn btn-danger btn-xs" data-ng-click="item.remove()">\n													<span class="glyphicon glyphicon-trash"></span> {{\'APPLICATION_REMOVE\' | translate}}\n												</button>\n											</td>\n										</tr>\n									</tbody>\n								</table>\n								<div>\n								</div>\n							</div>\n						</div>\n						<!-- END ATTACH -->\n\n						<!-- START CANNED -->\n						<div class="form-group" data-ng-class="{\'has-error\': forms.compose.subject.$invalid && forms.compose.$submitted}" data-ng-if="mailRoom.status !== \'CLOSED\'">\n							<div class="col-md-12">\n								<div class="row">\n									<div class="col-md-1">\n										<a href="#" class="btn btn-icon-only">\n											<i class="fa fa-magic" style="color: gray;"></i>\n										</a>\n									</div>\n									<div class="col-md-11">\n										<input type="text"\n										data-ng-model="modelOptions.selectedAnswer"\n										uib-typeahead="key for key in getAnswers($viewValue)"\n										placeholder="Canned answers.."\n										typeahead-loading="loadingLocations"\n										typeahead-no-results="noResults"\n										typeahead-on-select="onSelectAnswer($item)"\n										class="form-control">\n										<i ng-show="loadingLocations" class="glyphicon glyphicon-refresh"></i>\n										<div ng-show="noResults">\n											<i class="glyphicon glyphicon-remove"></i> No Results Found\n										</div>\n										<span data-ng-if="forms.compose.subject.$invalid && forms.compose.$submitted" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n							</div>\n						</div>\n						<!-- END CANNED -->\n\n						<!-- START HTML -->\n						<div class="form-group" data-ng-class="{\'has-error\': forms.compose.text.$invalid && forms.compose.$submitted}" data-ng-if="mailRoom.status !== \'CLOSED\'">\n							<div class="col-md-12">\n								<div ckeditor="options" ng-model="form.html" ready="onCKReady($instance)"></div>\n								<span data-ng-if="forms.compose.text.$invalid && forms.compose.$submitted" class="help-block help-block-error">\n'+"									<strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n								</span>\n							</div>\n						</div>\n						<!-- END HTML -->\n\n					</div>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n<!-- END TODO CONTENT -->\n"),
-a.put("app/channels/mail/inbox/status/status.modal.html",'<div class="modal-header">\n  <button data-ng-if="modal.dismissable" type="button" data-ng-click="$dismiss()" class="close">&times;</button>\n  <h4 data-ng-if="modal.title" data-ng-bind="modal.title | translate" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p data-ng-if="modal.text && !closed" ng-bind="modal.text | translate"></p>\n  <form name="form" novalidate data-ng-init="initDisposition()">\n    <div class="form-group">\n      <ui-select data-ng-model="item.disposition" name="disposition" theme="bootstrap" data-ng-disabled="!dispositions.length" required>\n        <ui-select-match placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="disposition.name as disposition in dispositions | filter: $select.search">\n          <div ng-bind-html="disposition.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n    </div>\n    <div class="note note-warning" data-ng-if="dispositions.length < 1">\n      <h4 class="block">Warning!</h4>\n      <p>\n        {{ \'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate }}\n      </p>\n    </div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/mail/inbox/view/account/list/list.html",'<!-- BEGIN Portlet PORTLET-->\n<div class="portlet light" data-ng-init="initView()">\n	<div class="portlet-title">\n		<div class="caption">\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'NEW\'" uib-uncheckable>NEW</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'OPEN\'" uib-uncheckable>OPEN</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'PENDING\'" uib-uncheckable>PENDING</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'CLOSED\'" uib-uncheckable>CLOSED</button>\n			</div>\n		</div>\n		<div class="actions">\n			<a href="#" class="btn btn-icon-only default" data-ng-click="getPage();">\n				<i class="fa fa-refresh"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only red" data-ng-click="deleteItems();" data-ng-show="id.length && isAdmin">\n				<i class="fa fa-trash"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only btn-success" data-ng-click="disposeItems();" data-ng-show="id.length">\n				<i class="fa fa-upload"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only blue" data-ng-click="tagItems();" data-ng-show="id.length">\n				<i class="fa fa-tags"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only green" data-ng-click="openRoom(null, \'New Message\')">\n				<i class="fa fa-plus"></i>\n			</a>\n		</div>\n	</div>\n	<div class="portlet-title" data-ng-show="tags.length">\n		<!-- START TAGS -->\n		<div class="form-group">\n			<div class="row">\n				<div class="col-md-1">\n					<a href="#" class="btn btn-icon-only">\n						<i class="fa fa-tags" style="color: gray;"></i>\n					</a>\n				</div>\n				<div class="col-md-11">\n					<ui-select multiple data-ng-model="query.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)">\n						<ui-select-match placeholder="Search by tag...">{{$item}}</ui-select-match>\n						<ui-select-choices repeat="tag in tags | filter:$select.search">\n							{{tag}}\n						</ui-select-choices>\n					</ui-select>\n				</div>\n			</div>\n		</div>\n		<!-- END TAGS -->\n	</div>\n	<div class="portlet-body">\n		<!-- BEGIN UI-GRID SPINNER -->\n		<span us-spinner spinner-key="spinner-grid" spinner-start-active="false"></span>\n		<!-- END UI-GRID SPINNER -->\n\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" class="ui-grid" ui-grid-auto-resize ui-grid-pagination ui-grid-selection>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END Portlet PORTLET-->\n'),a.put("app/channels/mail/inbox/view/view.agents.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_AGENTS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TRANSPORT -->\n  <div class="form-group">\n    <form name="form" novalidate>\n      <!-- START TRANSPORT -->\n      <div class="form-group">\n        <ui-select multiple name="agents" data-ng-model="item.agents" theme="bootstrap">\n          <ui-select-match placeholder="{{\'APPLICATION_AGENTS\' | translate}}">{{$item.fullname}}</ui-select-match>\n          <ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n            {{agent.fullname}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n      <!-- END TRANSPORT -->\n    </form>\n  </div>\n  <!-- END TRANSPORT -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/mail/inbox/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-envelope"></i>\n					<a href="#">{{ \'APPLICATION_MAIL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-note"></i>\n					<a href="#">{{ \'APPLICATION_INBOX\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n	</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row inbox">\n	<div class="col-md-3">\n		<ul class="inbox-nav margin-bottom-10">\n			<li data-ng-class="{active: $stateParams.id == mailAccount.id}" data-ng-repeat="mailAccount in mailAccounts">\n				<a href="/channels/mail/inbox/view/account/{{mailAccount.id}}/list" class="btn">\n					<i class="icon-notebook"></i> {{mailAccount.name}}\n				</a>\n				<b></b>\n			</li>\n		</ul>\n	</div>\n\n	<div class="col-md-9" data-ng-init="initView()">\n		<!-- BEGIN PROFILE CONTENT -->\n		<div class="room-content">\n			<div ui-view>\n				<div class="note note-info">\n					<h4 class="block">Info! {{\'APPLICATION_NO_ACCOUNT_SELECTED\' | translate}}</h4>\n				</div>\n			</div>\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n\n</div>\n'),a.put("app/channels/mail/inbox/view/view.tags.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_TAGS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TRANSPORT -->\n  <div class="form-group">\n    <form name="form" novalidate>\n      <!-- START TAGS -->\n      <div class="form-group">\n        <ui-select multiple data-ng-model="item.tags" theme="bootstrap">\n          <ui-select-match placeholder="{{\'APPLICATION_TAGS\' | translate}}">{{$item}}</ui-select-match>\n          <ui-select-choices repeat="tag in tags | filter: $select.search">\n            {{tag}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n      <!-- END TAGS -->\n    </form>\n  </div>\n  <!-- END TRANSPORT -->\n</div>\n<div class="modal-footer">\n  <button type="button" class="btn" data-ng-class="button.class" data-ng-click="button.click()"data-ng-repeat="button in modal.buttons">{{button.text | translate}}</button>\n  <!-- <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button> -->\n</div>\n'),a.put("app/channels/mail/inbox/view/view.templates.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_TEMPLATES\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <div class="note note-info" data-ng-show="!templates.length">\n    <h4 class="block">Info!</h4>\n    <p>\n      {{\'MESSAGE_NO_TEMPLATES_AVAILABLE\' | translate}}\n    </p>\n  </div>\n  <form name="form" data-ng-show="templates.length" novalidate>\n    <div class="form-group">\n      <ui-select data-ng-model="item.template" theme="bootstrap">\n        <ui-select-match placeholder="Select a template in the list or search his name...">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="template in templates | propsFilter: {name: $select.search}">\n          <div ng-bind-html="template.name | highlight: $select.search"></div>\n          <small data-ng-show="template.description">\n            {{\'APPLICATION_DESCRIPTION\' | translate}}: {{template.description}}\n          </small>\n        </ui-select-choices>\n      </ui-select>\n    </div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="templates.length">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/mail/queue/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required />\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START STRATEGY -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.strategy.$touched || form.$submitted) && form.strategy.$invalid}">\n      <label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.strategy" name="strategy" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n        <ui-select-choices repeat="strategy in strategies | filter: $select.search">\n          <div ng-bind-html="strategy.toUpperCase() | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.strategy.$touched || form.$submitted) && form.strategy.$invalid && form.strategy.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END STRATEGY -->\n\n    <!-- START TIMEOUT -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.timeout.$touched || form.$submitted) && form.timeout.$invalid}">\n      <label class="control-label">{{\'APPLICATION_AGENT_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="number" min="0" name="timeout" placeholder="Timeout" class="form-control" data-ng-model="item.timeout" required min="1"/>\n      <span data-ng-show="(form.timeout.$touched || form.$submitted) && form.timeout.$invalid && form.timeout.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TIMEOUT -->\n\n    <!-- START AGENTS-->\n    <div class="form-body" data-ng-init="getTeams()">\n      <label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n      <div class="input-group input-small mbottom20">\n        <input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="item.penalty" readonly>\n        <div class="spinner-buttons input-group-btn btn-group-vertical">\n          <button type="button" class="btn spinner-up btn-xs blue" data-ng-click="item.penalty=item.penalty+1">\n            <i class="fa fa-angle-up"></i>\n          </button>\n          <button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!item.penalty" data-ng-click="item.penalty=item.penalty-1">\n            <i class="fa fa-angle-down"></i>\n          </button>\n        </div>\n      </div>\n      <div class="form-group last">\n        <div class="col-md-12" id="multi-select-team">\n        </div>\n      </div>\n    </div>\n    <!-- END AGENTS-->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/mail/queue/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-envelope"></i>\n						<a href="#">{{ \'APPLICATION_MAIL\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-docs"></i>\n						<a href="#">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_QUEUES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group" data-ng-if="Auth.isAdmin()">\n						<a class="btn green-jungle" href="#" data-ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_QUEUE\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n						<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/mail/queue/view/view.agents.html",'<div class="row" data-ng-init="getTeams()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="note note-warning" data-ng-hide="teams.length">\n				<h4 class="block">Warning!</h4>\n				<p>\n					 {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\n				</p>\n			</div>\n			<div class="portlet-body">\n				<!-- BEGIN FORM-->\n				<form action="index.html" class="form-horizontal form-row-seperated">\n					<div class="form-body">\n						<label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n						<div class="input-group input-small mbottom20">\n							<input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="queue.penalty" readonly>\n							<div class="spinner-buttons input-group-btn btn-group-vertical">\n								<button type="button" class="btn spinner-up btn-xs blue" data-ng-click="queue.penalty=queue.penalty+1">\n									<i class="fa fa-angle-up"></i>\n								</button>\n								<button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!queue.penalty" data-ng-click="queue.penalty=queue.penalty-1">\n									<i class="fa fa-angle-down"></i>\n								</button>\n							</div>\n						</div>\n						<div class="form-group last">\n							<div class="col-md-12" id="multi-select-team">\n							</div>\n						</div>\n					</div>\n				</form>\n				<!-- END FORM-->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/mail/queue/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getQueue()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-envelope"></i>\n					<a href="#">{{ \'APPLICATION_MAIL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/channels/mail/queues/list">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					<i data-ng-show="queue" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="queue">\n					<a href="#">{{queue.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/queue.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{queue.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n					{{user.role}}\n				</div> -->\n			</div>\n			<!-- END SIDEBAR USER TITLE -->\n\n			<!-- SIDEBAR MENU -->\n			<div class="profile-usermenu">\n				<ul class="nav">\n					<li data-ng-class="{active: $state.is(\'main.channels.mail.queues.view.settings\')}">\n						<a data-ng-href="/channels/mail/queues/view/{{queue.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.channels.mail.queues.view.agents\')}" data-ng-show="Auth.getCurrentUser().role === \'admin\'">\n							<a data-ng-href="/channels/mail/queues/view/{{queue.id}}/agents">\n								<i class="icon-people"></i>\n								{{ \'APPLICATION_AGENTS\' | translate}} </a>\n							</li>\n						</ul>\n					</div>\n					<!-- END MENU -->\n				</div>\n				<!-- END PORTLET main.channels -->\n			</div>\n			<!-- END BEGIN PROFILE SIDEBAR -->\n			<!-- BEGIN PROFILE CONTENT -->\n			<div ui-view class="profile-content">\n			</div>\n			<!-- END PROFILE CONTENT -->\n		</div>\n	</div>\n	<!-- END PAGE CONTENT-->\n'),a.put("app/channels/mail/queue/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.general" data-ng-submit="forms.general.$valid && updateMailQueue()" novalidate>\n					<!-- START NAME -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="queue.name" data-ng-pattern="settings.patternName" required />\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.pattern" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n						</span>\n					</div>\n					<!-- END NAME -->\n\n					<!-- START DESCRIPTION -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n						<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="queue.description"/>\n					</div>\n					<!-- END DESCRIPTION -->\n\n					<!-- START TIMEOUT -->\n					<div class="form-group">\n						<label class="control-label">Agent Timeout</label>\n						<input type="number" name="timeout" placeholder="Timeout" class="form-control" min="1" data-ng-model="queue.timeout"/>\n					</div>\n					<!-- END TIMEOUT -->\n\n					<!-- START STRATEGY -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.strategy.$touched || forms.general.$submitted) && forms.general.strategy.$invalid}">\n						<label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}</label>\n						<ui-select data-ng-model="queue.strategy" name="strategy" theme="bootstrap">\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n							<ui-select-choices repeat="strategy in strategies | filter: $select.search">\n								<div ng-bind-html="strategy.toUpperCase() | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n					</div>\n					<!-- END STRATEGY -->\n\n					<input data-ng-if="Auth.isAdmin()" class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/mail/realtime/view/agent/agent.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-tree-view ui-grid-expandable-row ui-grid-pagination ui-grid-auto-resize>\n			<span us-spinner spinner-key="grid-spinner" spinner-start-active="true"></span>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/mail/realtime/view/agent/agent.modal.info.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INTERFACE_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<div data-ng-if="agent.ipaddr" class="well">\n  <div>{{agent.ipaddr}}:{{agent.port}}</div>\n  <div>{{agent.fullcontact}}</div>\n  <div>{{agent.useragent}}</div>\n  <div>{{agent.lastms}}</div>\n</div>\n<div data-ng-if="!agent.ipaddr" class="alert alert-danger" role="alert">\n  {{\'MESSAGE_NO_AVAILABLE_INFO\' | translate}}\n</div>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/mail/realtime/view/agent/queue.modal.add.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_JOIN_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <div class="form-group row">\n  <label class="col-md-2 control-label" style="margin-top: 7px;">{{\'APPLICATION_QUEUE\' | translate}}:</label>\n  <div class="col-md-10">\n    <ui-select multiple ng-model="item.queues" theme="bootstrap" required>\n      <ui-select-match placeholder="{{\'APPLICATION_QUEUE\' | translate}}">{{$item.name}}</ui-select-match>\n      <ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n        <div ng-bind-html="queue.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n</div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/mail/realtime/view/application/application.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initApplications()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns class="ui-grid" ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/mail/realtime/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-envelope"></i>\n					<a href="#">{{ \'APPLICATION_MAIL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-energy"></i>\n					<a href="#">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<div>\n			<nav class="navbar navbar-default" role="navigation">\n				<div class="collapse navbar-collapse">\n					<ul class="nav navbar-nav">\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.mail.realtime.view.agents\')}">\n							<a href="/channels/mail/realtime/view/agents">\n								{{\'APPLICATION_AGENTS\' | translate}}\n							</a>\n						</li>\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.mail.realtime.view.applications\')}">\n							<a href="/channels/mail/realtime/view/applications">\n								{{\'APPLICATION_APPLICATIONS\' | translate}}\n							</a>\n						</li>\n					</ul>\n				</div>\n			</nav>\n		</div>\n\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/mail/realtime/view/view.queue.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div id="grid1" ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-tree-view class="grid">\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/openchannel/account/list/list.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-globe"></i>\n					<a href="#">{{ \'APPLICATION_OPEN_CHANNEL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="/channels/openchannel/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n	</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group">\n						<a class="btn btn-default" href="#" data-ng-click="gridOptions.getPage();">\n							<i class="icon-reload"></i>\n						</a>\n					</div>\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/channels/openchannel/accounts/wizard">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/openchannel/account/view/action/list/list.html",'<div class="row" data-ng-init="initActions()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACTIONS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/channels/openchannel/accounts/view/{{account.id}}/actions/wizard" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACTION\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),
-a.put("app/channels/openchannel/account/view/action/view/view.html",'\n<div class="row" data-ng-init="initAction()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }}</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.settings" ng-submit="updateItem()" novalidate>\n					<!-- START APP -->\n					<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n							<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n							<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n								<div ng-bind-html="app.name | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid && forms.settings.app.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END APP -->\n\n					<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n						<!-- START QUEUE -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$invalid}">\n							<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.OpenchannelQueueId" name="queue" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n									<div ng-bind-html="queue.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="queues.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/openchannel/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END QUEUE -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n						<!-- START AGENT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$invalid}">\n							<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n								<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n									<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="agents.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END AGENT -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n						<!-- START SENDMAIL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" min="1" required/>\n							<span data-ng-show="(forms.settings.from.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.mail.$touched || forms.settings.$submitted) && forms.settings.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.template.$touched || forms.settings.$submitted) && forms.settings.template.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n									<div ng-bind-html="template.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.template.$touched || forms.settings.$submitted) && forms.settings.template.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END SENDMAIL -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n						<!-- START SENDSms -->\n						<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n								<span data-ng-show="(forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid && forms.settings.to.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.text.$touched || forms.text.$submitted) && forms.settings.text.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<textarea id="text" class="form-control maxlength-handler" maxlength="160"  name="text" data-ng-model="application.data6" required></textarea>\n							<span data-ng-show="(forms.settings.text.$touched || forms.settings.$submitted) && forms.settings.text.$invalid && forms.settings.text.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<!-- END SENDSms -->\n					</div>\n\n					<!-- START INTERVAL_TYPE -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n							<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n								{{ intType.name | translate }}\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END INTERVAL_TYPE -->\n\n					<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n						<!-- START TIME -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n							<div class="input-group input-large">\n								<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n									<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n								</fieldset>\n								<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n								<fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n								<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n							</div>\n						</div>\n						<!-- END TIME -->\n\n						<!-- START ALWAYS -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n							<div class="input-group input-large">\n								<label class="control-label pointer-cursor">\n									<input\n										bs-switch\n										data-ng-model="application.alwaysTime"\n										type="checkbox"\n										switch-active="{{ isActive }}"\n										switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n										switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n										switch-on-color="{{ onColor }}"\n										switch-off-color="{{ offColor }}"\n										switch-animate="{{ animate }}"\n										switch-size="{{ size }}"\n										switch-label="{{ label }}"\n										switch-icon="{{ icon }}"\n										switch-radio-off="{{ radioOff }}"\n										switch-label-width="{{ labelWidth }}"\n										switch-handle-width="{{ handleWidth }}">\n									<!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n								</label>\n							</div>\n						</div>\n						<!-- END ALWAYS -->\n\n						<!-- START WEEKDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END WEEKDAY -->\n\n						<!-- START MONTHDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTHDAY -->\n\n						<!-- START MONTH -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTH -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n						<!-- START INTERVALS -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$invalid}">\n							<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n									{{ interval.name}}\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="intervals.length">\n								<h4 class="block">Warning!</h4>\n								<p>\n									{{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n								</p>\n								<p>\n									{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n								</p>\n							</div>\n							<span data-ng-show="(forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END INTERVALS -->\n\n					</div>\n					<button class="btn green-haze" type="submit">{{\'APPLICATION_UPDATE\' | translate}}</button>\n				</form>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/openchannel/account/view/action/wizard/wizard.html",'<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n					<wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.action.$valid)">\n						<form name="forms.action" novalidate>\n							<!-- START APP -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.action.$submitted && forms.action.app.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n									<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n										<div ng-bind-html="app.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="forms.action.$submitted && forms.action.app.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END APP -->\n\n							<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n								<!-- START AGENT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$invalid}">\n									<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n										<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n											<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="agents.length">\n										<h4 class="block">Warning!</h4>\n										<p>\n											{{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n										</p>\n										<p>\n											{{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n										</p>\n									</div>\n									<span data-ng-show="(forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END AGENT -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n								<!-- START QUEUE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$invalid}">\n									<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.ChatQueueId" name="queue" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n											<div ng-bind-html="queue.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="queues.length">\n										<h4 class="block">Warning!</h4>\n										<p>\n											{{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n										</p>\n										<p>\n											{{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/openchannel/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n										</p>\n									</div>\n									<span data-ng-show="(forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END QUEUE -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n								<!-- START SENDMAIL -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" min="1" required/>\n										<span data-ng-show="(forms.action.from.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.mail.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n											<div ng-bind-html="template.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END SENDMAIL -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n								<!-- START SENDSms -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n										<span data-ng-show="(forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid && forms.action.to.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<textarea id="text" class="form-control maxlength-handler"  maxlength="160" name="text" data-ng-model="application.data6" required></textarea>\n									<span data-ng-show="(forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid && forms.action.text.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<!-- END SENDSms -->\n							</div>\n\n							<!-- START INTERVAL_TYPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n										{{ intType.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END INTERVAL_TYPE -->\n\n							<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n								<!-- START TIME -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n									<div class="input-group input-large">\n										<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n											<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n										</fieldset>\n										<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n										<fieldset ng-disabled="application.alwaysTime">\n											<uib-timepicker name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n										</fieldset>\n										<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n									</div>\n								</div>\n								<!-- END TIME -->\n\n								<!-- START ALWAYS -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n									<div class="input-group input-large">\n										<label class="control-label pointer-cursor">\n											<input\n												bs-switch\n												data-ng-model="application.alwaysTime"\n												type="checkbox"\n												switch-active="{{ isActive }}"\n												switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n												switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n												switch-on-color="{{ onColor }}"\n												switch-off-color="{{ offColor }}"\n												switch-animate="{{ animate }}"\n												switch-size="{{ size }}"\n												switch-label="{{ label }}"\n												switch-icon="{{ icon }}"\n												switch-radio-off="{{ radioOff }}"\n												switch-label-width="{{ labelWidth }}"\n												switch-handle-width="{{ handleWidth }}">\n											<!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n										</label>\n									</div>\n								</div>\n								<!-- END ALWAYS -->\n\n								<!-- START WEEKDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END WEEKDAY -->\n\n								<!-- START MONTHDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTHDAY -->\n\n								<!-- START MONTH -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTH -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n								<!-- START INTERVALS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$invalid}">\n									<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n											{{ interval.name}}\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="intervals.length">\n										<h4 class="block">Warning!</h4>\n										<p>\n											{{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n										</p>\n										<p>\n											{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n										</p>\n									</div>\n									<span data-ng-show="(forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERVALS -->\n\n							</div>\n\n							<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONTINUE\' | translate}}" />\n						</form>\n					</wz-step>\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONFIRM\' | translate}}" />\n					</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/channels/openchannel/account/view/api/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_API\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<div class="tab-pane active" id="tab_1_1">\n							<!-- START API -->\n							<div  class="row" >\n									<div class="col-md-12">\n										<label class="control-label">Receive URL</label>\n									</div>\n								</div>\n							<div   class="row" >\n									<div class="col-md-11">\n										<code-mirror  model="receiveurl"></code-mirror>\n									</div>\n									<div class="col-md-1">\n										<a class="btn btn-sm green-jungle" data-ng-click="copyToClipboard(receiveurl);"><i class="fa fa-clipboard"></i>\n										</a>\n									</div>\n							</div>\n							<!-- END API -->\n					</div>\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/openchannel/account/view/disposition/modal/add.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_DISPOSITIONS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.form.$touched || form.$submitted) && form.form.$invalid}">\n      <div class="">\n        <input type="text" name="form" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" class="form-control" data-ng-model="name" required/>\n        <span data-ng-show="form.form.$touched && form.form.$error.required" class="help-block help-block-error">\n          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n        </span>\n      </div>\n    </div>\n    <!-- END NAME -->\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="form.$valid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/openchannel/account/view/disposition/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DISPOSITIONS\' | translate}}</span>\n				</div>\n				<div class="actions actions-md">\n					<a href="#" class="btn btn-icon-only green" data-ng-click="addDisposition();">\n						<i class="fa fa-plus"></i>\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n				<div class="tab-content">\n					<div class="row" data-ng-hide="dispositions.length">\n						<div class="col-md-12">\n							<div class="note note-info">\n								<h4 class="block">Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}</h4>\n							</div>\n						</div>\n					</div>\n\n					<!-- GENERAL TAB -->\n					<div class="row" data-ng-repeat="disposition in dispositions">\n						<div class="col-md-12 form-group">\n							<div class="input-group">\n								<div>\n									<input class="form-control" type="text" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" data-ng-model="disposition.name">\n								</div>\n								<span class="input-group-btn">\n									<button class="btn btn-success" type="button" data-ng-click="updateDisposition(disposition.id, disposition.name);"><i class="fa fa-cloud-upload fa-fw"></i> {{\'APPLICATION_UPDATE\' | translate}}</button>\n									<button class="btn btn-danger" type="button" data-ng-click="deleteDisposition(disposition.id);"><i class="fa fa-times fa-fw"></i> {{\'APPLICATION_DELETE\' | translate}}</button>\n								</span>\n							</div>\n						</div>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/openchannel/account/view/hooks/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_HOOKS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SEND\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_ACCEPT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_REJECT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_4" data-toggle="tab">{{\'APPLICATION_CLOSE\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- START REPLY TAB -->\n					<div class="tab-pane  active" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItem()" novalidate>\n							<div  class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.info.method.$touched || forms.info.$submitted) && forms.info.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.replyMethod" name="method" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search" >\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.info.method.$touched || forms.info.$submitted) && forms.info.method.$invalid && forms.info.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.info.url.$touched || forms.info.$submitted) && forms.info.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.replyUrl"   ng-required="account.replyMethod"/>\n									<span data-ng-show="(forms.info.url.$touched || forms.info.$submitted) && forms.info.url.$invalid && forms.info.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END REPLY TAB -->\n\n					<!-- START ACCEPT TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.accept" data-ng-submit="forms.accept.$valid && updateItem()" novalidate>\n								<div class="row">\n									<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid}">\n										<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n										<ui-select data-ng-model="account.acceptMethod" name="method" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n											<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n												<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n											</ui-select-choices>\n										</ui-select>\n										<span data-ng-show="(forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid && forms.accept.method.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<div  class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid}">\n										<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n										<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.acceptUrl"  ng-required="account.acceptMethod"/>\n										<span data-ng-show="(forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid && forms.accept.url.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n								<!-- START ACTIONS-->\n								<div class="row" ng-repeat = "action in account.actions">\n									<div  ng-switch="action.action">\n											<div ng-switch-when="pause">\n												<div  class="form-group col-md-4">\n													<label class="control-label">{{\'APPLICATION_PAUSE\' | translate}}</label></br>\n														<input\n														bs-switch\n														data-ng-change="resetActionData(action)"\n														data-ng-model="action.enabled"\n														type="checkbox"\n														switch-active="{{ isActive }}"\n														switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n														switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n														switch-on-color="{{ onColor }}"\n														switch-off-color="{{ offColor }}"\n														switch-animate="{{ animate }}"\n														switch-size="{{ size }}"\n														switch-label="{{ label }}"\n														switch-icon="{{ icon }}"\n														switch-radio-off="{{ radioOff }}"\n														switch-label-width="{{ labelWidth }}"\n														switch-handle-width="{{ handleWidth }}">\n													</div>\n													<div ng-if="action.enabled" class="form-group col-md-8">\n														<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}</label>\n														<ui-select  name="action" data-ng-model="action.type"  theme="bootstrap" >\n															<ui-select-match placeholder="{{\'APPLICATION_TYPE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n															<ui-select-choices repeat=" pause.name as pause in pauses | filter: $select.search">\n																<div ng-bind-html="pause.name | highlight: $select.search | uppercase" ></div>\n															</ui-select-choices>\n														</ui-select>\n													</div>\n											</div>\n										</div>\n									</div>\n								<!-- END ACTION -->\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ACCEPT TAB -->\n					<!-- START REJECT TAB -->\n					<div class="tab-pane" id="tab_1_3">\n						<form name="forms.reject" data-ng-submit="forms.reject.$valid && updateItem()" novalidate>\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.rejectMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid && forms.reject.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.rejectUrl" ng-required="account.rejectMethod"/>\n									<span data-ng-show="(forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid && forms.reject.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END REJECT TAB -->\n					<!-- START CLOSE TAB -->\n					<div class="tab-pane" id="tab_1_4">\n						<form name="forms.close" data-ng-submit="forms.close.$valid && updateItem()" novalidate>\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.closeMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid && forms.close.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.closeUrl" ng-required="account.closeMethod"/>\n									<span data-ng-show="(forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid && forms.close.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CLOSE TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/openchannel/account/view/setting/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItem()" novalidate>\n							<!-- START ID -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ID\' | translate}}<span class="required" aria-required="true">*</span>\n								</label>\n								<input type="text" name="id" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.id" ng-disabled="true" required/>\n							</div>\n							<!-- END ID-->\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid && forms.info.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n							<!-- START LIST -->\n							<div class="form-group" data-ng-if="license.cm">\n								<label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n									<div class="input-group">\n\n										<ui-select data-ng-model="account.ListId" name="list" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_LIST\' | translate}}">{{$select.selected.name}}</ui-select-match>\n											<ui-select-choices repeat="list.id as list in lists | filter: $select.search">\n												<div ng-bind-html="list.name | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n\n										<span class="input-group-btn">\n											<button type="button" data-ng-click="account.ListId = null" class="btn btn-default">\n												<span class="glyphicon glyphicon-trash"></span>\n											</button>\n										</span>\n\n									</div>\n							</div>\n							<!-- END LIST -->\n							<!-- START FIDELITY -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_FIDELITY\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="account.fidelity"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END FIDELITY -->\n\n							<!-- START TIMEOUT -->\n							<div class="form-group" data-ng-if="account.fidelity" data-ng-class="{\'has-error\': (forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" name="timeout" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="account.timeout" required/>\n								<span data-ng-show="(forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid && forms.info.timeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid && forms.info.timeout.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIMEOUT -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<!-- START CUSTOM -->\n							<!-- <div  class="form-group">\n								<label class="control-label">{{\'APPLICATION_REPLY\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="account.reply"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div> -->\n							<!-- START REPLY HOOK -->\n							<!-- <div  ng-if= "account.reply" class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.info.method.$touched || forms.info.$submitted) && forms.info.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.replyMethod" name="method" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search" >\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.info.method.$touched || forms.info.$submitted) && forms.info.method.$invalid && forms.info.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.info.url.$touched || forms.info.$submitted) && forms.info.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.replyUrl"  required/>\n									<span data-ng-show="(forms.info.url.$touched || forms.info.$submitted) && forms.info.url.$invalid && forms.info.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div> -->\n							<!-- START REPLY HOOK -->\n							<!-- END CUSTOM -->\n\n							<!-- START REMOTE IP -->\n							<div  class="form-group" data-ng-class="{\'has-error\': (forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remote" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remote" required/>\n								<span class="help-block help-block-info">\n									{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n								</span>\n								<span data-ng-show="(forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid && forms.info.remote.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END REMOTE IP -->\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/openchannel/account/view/view.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-globe"></i>\n					<a href="#">{{ \'APPLICATION_OPEN_CHANNEL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="/channels/openchannel/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n					<i class="fa fa-angle-right" data-ng-show="account"></i>\n				</li>\n				<li data-ng-show="account">\n					<a href="#">{{ account.description || account.name }}</a>\n				</li>\n			</ul>\n		</div>\n\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img ng-src="assets/images/media/account.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ account.description || account.name }}\n					</div>\n					<div class="profile-usertitle-job">\n						{{account.email}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li ng-class="{active: $state.is(\'main.channels.openchannel.accounts.view.settings\')}">\n							<a href="/channels/openchannel/accounts/view/{{account.id}}/settings">\n							<i class="icon-settings"></i>\n							{{\'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.openchannel.accounts.view.api\')}">\n							<a href="/channels/openchannel/accounts/view/{{account.id}}/api">\n							<i class="fa fa-external-link"></i>\n							{{\'APPLICATION_API\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.openchannel.accounts.view.hooks\')}">\n							<a href="/channels/openchannel/accounts/view/{{account.id}}/hooks">\n							<i class="fa fa-code"></i>\n							{{\'APPLICATION_HOOKS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.openchannel.accounts.view.dispositions\')}">\n							<a href="/channels/openchannel/accounts/view/{{account.id}}/dispositions">\n							<i class="icon-target"></i>\n							{{\'APPLICATION_DISPOSITIONS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.includes(\'main.channels.openchannel.accounts.view.actions\')}">\n							<a href="/channels/openchannel/accounts/view/{{account.id}}/actions/list">\n							<i class="icon-directions"></i>\n							{{\'APPLICATION_ACTIONS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<div ui-view class="profile-content"></div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n<!-- END PAGE CONTENT-->\n</div>\n'),a.put("app/channels/openchannel/account/wizard/wizard.html",'\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN PAGE HEADER-->\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-globe"></i>\n					<a href="#">{{ \'APPLICATION_OPEN_CHANNEL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="/channels/openchannel/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n		<!-- END PAGE HEADER-->\n\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n	        <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="formValidation(forms.info.$valid)">\n							<form name="forms.info" novalidate>\n								<!-- START NAME -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n									<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n									<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid && forms.info.name.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END NAME -->\n\n								<!-- START DESCRIPTION -->\n								<div class="form-group">\n									<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n									<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n								</div>\n								<!-- END DESCRIPTION -->\n								<!-- START REMOTE IP -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid}">\n									<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="url" name="remote" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remote" required/>\n									<span class="help-block help-block-info">\n										{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n									</span>\n									<span data-ng-show="(forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid && forms.info.remote.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END REMOTE IP -->\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n							</form>\n						</wz-step>\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/channels/openchannel/inbox/message/info.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body"  data-ng-init="initInfo()" style=" overflow-x: auto;" >\n  <div  data-ng-if="data" >\n    <json-formatter json="data" open="1"></json-formatter>\n  </div>\n  <div class="note note-warning" data-ng-hide="data">\n    <p>\n      {{ \'MESSAGE_NO_INFO_AVAILABLE\' | translate }}\n    </p>\n  </div>\n\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/openchannel/inbox/message/message.html",'<div class="message">\n  <div class="row">\n    <div class="col-md-6">\n        <!-- <span data-ng-if="Message.from" class="bold">From: {{Message.from}} </span>\n        <br>\n        <span data-ng-if="Message.to" class="bold">To: {{Message.to}} </span>\n        <br> -->\n        <div class="row" ng-if="Message.from">\n          <div class="col-md-12">\n            <span data-ng-if="Message.from" class="bold">From: {{Message.from}} </span>\n          </div>\n        </div>\n        <div class="row" ng-if="Message.to">\n          <div class="col-md-12">\n            <span data-ng-if="Message.to" class="bold">To: {{Message.to}} </span>\n          </div>\n        </div>\n        <div class="row" ng-if="Message.name">\n          <div class="col-md-12">\n            <span   class="bold">Name: {{Message.name}}</span>\n          </div>\n        </div>\n        <div class="row" ng-if="Message.phone">\n          <div class="col-md-12">\n            <span  class="bold">Phone: <a href="" data-ng-click="openContact(\'phone\',Message.phone)">{{Message.phone}}</a></span>\n          </div>\n        </div>\n        <div class="row" ng-if="Message.email">\n          <div class="col-md-12">\n            <span  class="bold">Email: <a href="" data-ng-click="openContact(\'email\',Message.email)">{{Message.email}}</a></span>\n          </div>\n        </div>\n    </div>\n    <div class="col-md-6">\n      <span class="pull-right" data-ng-if="Message.User">{{\'APPLICATION_SENT_BY\' | translate}}: <strong>{{Message.User.fullname}}</strong></span>\n    </div>\n  </div>\n  <br>\n  <span class="todo-tasklist-date">\n    <span class="pull-right" data-ng-switch="Message.status">\n      <a ng-switch-when="RECEIVED" href="#" class="btn default btn-xs inactive-link green-stripe"> {{Message.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n      <a ng-switch-when="SENT" href="#" class="btn default btn-xs inactive-link green-stripe"> {{Message.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n      <a ng-switch-when="DELIVERED" href="#" class="btn default btn-xs inactive-link green-stripe"> {{Message.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n      <a ng-switch-when="SENDING" href="#" class="btn default btn-xs inactive-link blue-stripe" > {{Message.status | uppercase}}\n        <i class="fa fa-warning"></i>\n      </a>\n      <a ng-switch-when="FAILED" href="#" class="btn default btn-xs red-stripe" data-ng-click="info(Message.res_data)"> {{Message.status | uppercase}}\n        <i class="fa fa-times"></i>\n      </a>\n      <a ng-switch-default href="#" class="btn default btn-xs"> {{Message.status | uppercase}}\n      </a>\n      <br>\n    </span>\n\n    <i class="icon-calendar"></i> <span am-time-ago="Message.updatedAt"></span>\n  </span>\n  <hr>\n  <ng-emoticons emoticons-data="Message.body"></ng-emoticons>\n  <!-- <span class="body text-left" data-ng-bind-html="Message.body" style="white-space: pre-wrap;"></span> -->\n  </div>\n'),a.put("app/channels/openchannel/inbox/room/room.directive.html",'<!-- BEGIN TODO CONTENT -->\n\n<div class="todo-content">\n	<div class="portlet light">\n		<div class="portlet-title">\n			<div class="caption">\n				<button class="btn btn-sm btn-default green-meadow" data-ng-if="Room.status !== \'CLOSED\'" data-ng-disabled="!form.body || forms.compose.from.$invalid || forms.compose.to.$invalid" data-ng-click="sendMessage()">\n					<i class="icon-paper-plane" style="color: white;"></i> {{\'APPLICATION_SEND\' | translate}}\n				</button>\n				<span data-ng-show="Room && Room.status !== \'CLOSED\'"> | </span>\n				<span data-ng-show="Room" class="label label-default">#{{Room.id}} {{Room.status}}</span>\n				<span data-ng-if="Room && Room.ParentId"> | </span>\n				<span data-ng-if="Room && Room.ParentId" class="label label-warning"> Ref: <a data-ng-click="openRoom(Room.ParentId,Room.contact)">#{{Room.ParentId}}</a></span>\n			</div>\n			<div class="actions" data-ng-switch="Room.status">\n				<button class="btn btn-icon-only" data-ng-show="Room"  data-ng-class="{\'btn-success\':Room.status !== \'CLOSED\',\'grey-cascade\':Room.status === \'CLOSED\'}" data-ng-click="closeRoom(Room.id)"  data-ng-disabled="Room.status === \'CLOSED\' && Room.disposition">\n					<i data-ng-class="{\'fa fa-upload\':Room.status !== \'CLOSED\',\'icon-target\':Room.status === \'CLOSED\'}"></i>\n				</button>\n				<button  class="btn default btn-icon-only" data-ng-if="Room && Room.status !== \'CLOSED\'" type="button" data-ng-click="togglePanelLeft()" title="{{\'APPLICATION_RESIZE\' | translate}}">\n					<i  ng-class="panelRight == \'col-md-12\' ? \'icon-size-actual\' : \'icon-size-fullscreen\'"></i>\n				</button>\n			</div>\n		</div>\n		<div class="portlet-body">\n			<div class="row">\n				<div data-ng-show="panelLeft" data-ng-class="panelLeft">\n					<div class="form">\n						<!-- START TAGS -->\n						<div class="form-group" data-ng-if="Room.status !== \'CLOSED\' || (Room.status == \'CLOSED\' && form.tags.length)">\n							<div class="row">\n								<div class="col-md-1">\n									<a href="#" class="btn btn-icon-only">\n										<i class="fa fa-tags" style="color: gray;"></i>\n									</a>\n								</div>\n								<div class="col-md-11">\n									<ui-select data-ng-disabled="Room.status == \'CLOSED\'"  multiple data-ng-model="form.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)">\n										<ui-select-match placeholder="Tags...">{{$item}}</ui-select-match>\n										<ui-select-choices repeat="tag in tags | filter:$select.search" class="">\n											{{tag}}\n										</ui-select-choices>\n									</ui-select>\n								</div>\n							</div>\n						</div>\n						<!-- END TAGS -->\n					</div>\n					<hr data-ng-if="Room && Room.status !== \'CLOSED\'">\n\n					<div ng-scrollbars ng-scrollbars-config="{\n						autoHideScrollbar: false,\n						theme: \'light\',\n						advanced: {\n							updateOnContentResize: true\n						},\n						setHeight: 781,\n						scrollInertia: 0\n					}">\n						<ul class="chats">\n							<li data-ng-switch="Room.status" data-ng-class="{\'in\': Message.status == \'RECEIVED\', \'out\': Message.status == \'SENT\' || Message.status == \'SENDING\' || Message.status == \'FAILED\' || Message.status == \'NOTE\'  || Message.status == \'DELIVERED\' || Message.status == \'QUEUED\' ||  Message.status != \'RECEIVED\' }" data-ng-repeat="Message in Room.OpenchannelMessages | orderBy:\'-createdAt\'">\n								<!-- <img class="avatar" alt="" data-ng-src="api/users/avatar/{{getCurrentUser().userpic && smsMessage.status === \'SENT\' ? getCurrentUser().userpic : \'unknown_avatar\'}}"> -->\n								<!-- <note message="smsMessage" ng-switch-when="NOTE"></note> -->\n								<div class="avatar" data-ng-class="Message.UserId ? \'pretty-avatar\' : \'pretty-avatar-v\'">\n									<ng-letter-avatar\n									data-ng-if="Message.UserId"\n									height="40"\n									width="40"\n									fontsize="25"\n									data="{{Message.User.fullname}}"\n									avatarcustombgcolor="#B0B0B0"\n									avatarcustomborder="border:2px solid #3399CC"\n									charCount="2"\n									shape="round"></ng-letter-avatar>\n									<ng-letter-avatar\n									data-ng-if="!Message.UserId"\n									height="40"\n									width="40"\n									fontsize="25"\n									data="{{Message.from}}"\n									avatarcustombgcolor="#B0B0B0"\n									avatarcustomborder="border:2px solid #EA4C61"\n									charCount="1"\n									shape="round"></ng-letter-avatar>\n								</div>\n								<message message="Message" list-id="Room.OpenchannelAccount.ListId"  ng-switch-default></message>\n							</li>\n						</ul>\n					</div>\n				</div>\n				<div data-ng-class="panelRight">\n\n					<div class="note note-info" data-ng-if="Room && Room.status == \'CLOSED\'">\n						<h4 class="block">Info! {{\'MESSAGE_ROOM_CLOSED\' | translate}}</h4>\n						<p>\n							{{\'MESSAGE_ROOM_CLOSED_DETAILS\' | translate}}.\n						</p>\n						<hr>\n						<p>\n							<i class="icon-target"></i> {{\'APPLICATION_DISPOSITION\' | translate}}: <strong>{{Room.disposition}}</strong>\n						</p>\n						<p>\n							<i class="icon-calendar"></i> {{\'APPLICATION_UPDATED_AT\' | translate}}: <strong>{{Room.updatedAt | date:\'medium\'}}</strong> (<span am-time-ago="Room.updatedAt"></span>)\n						</p>\n					</div>\n					<form  name="forms.compose" data-ng-submit="forms.compose.$valid" class="form-horizontal" novalidate>\n						<!-- START HEAD -->\n						<div class="form">\n\n							<!-- START FROM -->\n									<div class="form-group" data-ng-class="{\'has-error\': forms.compose.from.$invalid && forms.compose.$submitted}" data-ng-if="Room.status !== \'CLOSED\'">\n										<div class="col-md-12">\n											<div class="row">\n												<div class="col-md-1">\n													<label class="control-label">From:</label>\n												</div>\n												<div class="col-md-11">\n													<ui-select  data-ng-disabled="Room"  theme="bootstrap" name="from" data-ng-model="form.from" required>\n														<ui-select-match placeholder="From...">{{$select.selected.name}}</ui-select-match>\n														<ui-select-choices repeat="Account.name as Account in Accounts | filter: $select.search">\n															<div data-ng-bind-html="Account.name | highlight: $select.search"></div>\n															<small data-ng-bind-html="Account.name | highlight: $select.search"></small>\n														</ui-select-choices>\n													</ui-select>\n													<span data-ng-show="forms.compose.from.$invalid && forms.compose.$submitted " class="help-block help-block-error">\n														<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n													</span>\n												</div>\n											</div>\n										</div>\n									</div>\n									<!-- END FROM -->\n							<!-- START TO -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.compose.to.$invalid && forms.compose.$submitted}" data-ng-if="Room.status !== \'CLOSED\'">\n\n								<div class="col-md-12">\n									<div class="row">\n										<div class="col-md-1">\n											<label class="control-label">To:</label>\n										</div>\n										<div class="col-md-11">\n											<input type="text"   name="to" class="form-control todo-taskbody-taskdesc" placeholder="To..." rows="8"   data-ng-disabled="Room" data-ng-model="form.to" required>\n											<span data-ng-show="forms.compose.to.$invalid && forms.compose.$submitted " class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n									</div>\n								</div>\n							</div>\n							<!-- END TO -->\n							<!-- START CANNED -->\n							<div class="form-group"  data-ng-if="Room.status !== \'CLOSED\'">\n								<div class="row">\n									<div class="col-md-1">\n										<a href="#" class="btn btn-icon-only">\n											<i class="fa fa-magic" style="color: gray;"></i>\n										</a>\n									</div>\n									<div class="col-md-11">\n										<input  type="text"\n										data-ng-model="modelOptions.selectedAnswer"\n										uib-typeahead="key for key in getAnswers($viewValue)"\n										placeholder="Canned answers.."\n										typeahead-loading="loadingLocations"\n										typeahead-no-results="noResults"\n										typeahead-on-select="onSelect($item)"\n										class="form-control">\n										<i ng-show="loadingLocations" class="glyphicon glyphicon-refresh"></i>\n										<div ng-show="noResults">\n											<i class="glyphicon glyphicon-remove"></i> No Results Found\n										</div>\n									</div>\n								</div>\n\n							</div>\n							<!-- END CANNED -->\n							<!-- START message -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.compose.body.$invalid && forms.compose.$submitted}" data-ng-if=" Room.status !== \'CLOSED\'">\n								<div class="col-md-12">\n									<textarea id="text" class="form-control maxlength-handler" rows="8"  name="body" data-ng-model="form.body"></textarea>\n									<span data-ng-show="forms.compose.body.$invalid && forms.compose.$submitted " class="help-block help-block-error">\n'+"										<strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n									</span>\n								</div>\n							</div>\n\n							<!-- END message -->\n						</div>\n					</form>\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n<!-- END TODO CONTENT -->\n"),a.put("app/channels/openchannel/inbox/view/account/list/list.html",'<!-- BEGIN Portlet PORTLET-->\n<div class="portlet light" data-ng-init="initView()">\n	<div class="portlet-title">\n		<div class="caption">\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'NEW\'" uib-uncheckable>NEW</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'OPEN\'" uib-uncheckable>OPEN</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'PENDING\'" uib-uncheckable>PENDING</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'CLOSED\'" uib-uncheckable>CLOSED</button>\n			</div>\n		</div>\n		<div class="actions">\n			<a href="#" class="btn btn-icon-only default" data-ng-click="getPage();">\n				<i class="fa fa-refresh"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only red" data-ng-click="deleteItems();" data-ng-show="id.length && isAdmin">\n				<i class="fa fa-trash"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only blue" data-ng-click="tagItems();" data-ng-show="id.length">\n				<i class="fa fa-tags"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only green" data-ng-click="openRoom(null, \'New Message\')">\n				<i class="fa fa-plus"></i>\n			</a>\n		</div>\n	</div>\n	<div class="portlet-title" data-ng-show="tags.length">\n		<!-- START TAGS -->\n		<div class="form-group">\n			<div class="row">\n				<div class="col-md-1">\n					<a href="#" class="btn btn-icon-only">\n						<i class="fa fa-tags" style="color: gray;"></i>\n					</a>\n				</div>\n				<div class="col-md-11">\n					<ui-select multiple data-ng-model="query.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)">\n						<ui-select-match placeholder="Search by tag...">{{$item}}</ui-select-match>\n						<ui-select-choices repeat="tag in tags | filter:$select.search">\n							{{tag}}\n						</ui-select-choices>\n					</ui-select>\n				</div>\n			</div>\n		</div>\n		<!-- END TAGS -->\n	</div>\n	<div class="portlet-body">\n		<!-- BEGIN UI-GRID SPINNER -->\n		<span us-spinner spinner-key="spinner-grid" spinner-start-active="false"></span>\n		<!-- END UI-GRID SPINNER -->\n\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid-inbox">\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END Portlet PORTLET-->\n'),a.put("app/channels/openchannel/inbox/view/view.agents.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_AGENTS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TRANSPORT -->\n  <div class="form-group">\n    <form name="form" novalidate>\n      <!-- START TRANSPORT -->\n      <div class="form-group">\n        <ui-select multiple name="agents" data-ng-model="item.agents" theme="bootstrap">\n          <ui-select-match placeholder="{{\'APPLICATION_AGENTS\' | translate}}">{{$item.fullname}}</ui-select-match>\n          <ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n            {{agent.fullname}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n      <!-- END TRANSPORT -->\n    </form>\n  </div>\n  <!-- END TRANSPORT -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/openchannel/inbox/view/view.html",'<div class="row">\n  <div class="col-md-12">\n    <div class="page-bar">\n      <ul class="page-breadcrumb">\n        <li>\n          <i class="icon-rocket"></i>\n          <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="fa fa-spinner"></i>\n          <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="icon-globe"></i>\n          <a href="#">{{ \'APPLICATION_OPEN_CHANNEL\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n					<i class="icon-note"></i>\n					<a href="/channels/openchannel/inbox/list">{{ \'APPLICATION_INBOX\' | translate }}</a>\n				</li>\n      </ul>\n    </div>\n  </div>\n</div>\n\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row inbox" data-ng-init="initView()">\n	<div class="col-md-3">\n		<ul class="inbox-nav margin-bottom-10">\n			<li data-ng-class="{active: $stateParams.id == Account.id}" data-ng-repeat="Account in Accounts">\n				<a href="/channels/openchannel/inbox/view/account/{{Account.id}}/list" class="btn">\n					<i class="icon-notebook"></i> {{Account.name}}\n				</a>\n        <b></b>\n			</li>\n		</ul>\n	</div>\n\n	<div class="col-md-9" >\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view>\n			<div class="note note-info">\n				<h4 class="block">Info! {{\'APPLICATION_NO_ACCOUNT_SELECTED\' | translate}}</h4>\n			</div>\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/openchannel/inbox/view/view.status.modal.html",'<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title | translate" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p ng-if="modal.text && !closed" ng-bind="modal.text | translate"></p>\n  <form name="form" novalidate data-ng-init="initDisposition()">\n  <div class="form-group">\n    <ui-select data-ng-model="item.disposition" name="list" theme="bootstrap" data-ng-disabled="!dispositions.length" required>\n      <ui-select-match placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}">{{$select.selected.name}}</ui-select-match>\n      <ui-select-choices repeat="disposition.name as disposition in dispositions | filter: $select.search">\n        <div ng-bind-html="disposition.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n  <div class="note note-warning" data-ng-hide="dispositions.length">\n    <h4 class="block">Warning!</h4>\n    <p>\n      {{ \'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate }}\n    </p>\n  </div>\n</form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/openchannel/inbox/view/view.tags.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_TAGS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TRANSPORT -->\n  <div class="form-group">\n    <form name="form" novalidate>\n      <!-- START TAGS -->\n      <div class="form-group">\n        <ui-select multiple data-ng-model="item.tags" theme="bootstrap">\n          <ui-select-match placeholder="{{\'APPLICATION_TAGS\' | translate}}">{{$item}}</ui-select-match>\n          <ui-select-choices repeat="tag in tags | filter: $select.search">\n            {{tag}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n      <!-- END TAGS -->\n    </form>\n  </div>\n  <!-- END TRANSPORT -->\n</div>\n<div class="modal-footer">\n  <button type="button" class="btn" data-ng-class="button.class" data-ng-click="button.click()"data-ng-repeat="button in modal.buttons">{{button.text | translate}}</button>\n  <!-- <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button> -->\n</div>\n'),a.put("app/channels/openchannel/queue/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required />\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START TIMEOUT -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.timeout.$touched || form.$submitted) && form.timeout.$invalid}">\n      <label class="control-label">{{\'APPLICATION_AGENT_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="number" min="0" name="timeout" placeholder="Timeout" class="form-control" data-ng-model="item.timeout" required min="1"/>\n      <span data-ng-show="(form.timeout.$touched || form.$submitted) && form.timeout.$invalid && form.timeout.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TIMEOUT -->\n\n    <!-- START STRATEGY -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.strategy.$touched || form.$submitted) && form.strategy.$invalid}">\n      <label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.strategy" name="strategy" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.toUpperCase()}}</ui-select-match>\n        <ui-select-choices repeat="strategy in strategies | filter: $select.search">\n          <div ng-bind-html="strategy.toUpperCase() | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.strategy.$touched || form.$submitted) && form.strategy.$invalid && form.strategy.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END STRATEGY -->\n\n    <!-- START AGENTS-->\n    <div class="form-body" data-ng-init="getTeams()">\n      <label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n      <div class="input-group input-small mbottom20">\n        <input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="item.penalty" readonly>\n        <div class="spinner-buttons input-group-btn btn-group-vertical">\n          <button type="button" class="btn spinner-up btn-xs blue" data-ng-click="item.penalty=item.penalty+1">\n            <i class="fa fa-angle-up"></i>\n          </button>\n          <button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!item.penalty" data-ng-click="item.penalty=item.penalty-1">\n            <i class="fa fa-angle-down"></i>\n          </button>\n        </div>\n      </div>\n      <div class="form-group last">\n        <div class="col-md-12" id="multi-select-team">\n        </div>\n      </div>\n    </div>\n    <!-- END AGENTS-->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/openchannel/queue/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-globe"></i>\n						<a href="#">{{ \'APPLICATION_OPEN_CHANNEL\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-docs"></i>\n						<a href="#">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_QUEUES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="#" data-ng-click="createItem()" data-ng-if="Auth.isAdmin()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_QUEUE\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n						<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/openchannel/queue/view/view.agents.html",'<div class="row" data-ng-init="getTeams()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="note note-warning" data-ng-hide="teams.length">\n				<h4 class="block">Warning!</h4>\n				<p>\n					 {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\n				</p>\n			</div>\n			<div class="portlet-body">\n				<!-- BEGIN FORM-->\n				<form action="index.html" class="form-horizontal form-row-seperated">\n					<div class="form-body">\n						<label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n						<div class="input-group input-small mbottom20">\n							<input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="queue.penalty" readonly>\n							<div class="spinner-buttons input-group-btn btn-group-vertical">\n								<button type="button" class="btn spinner-up btn-xs blue" data-ng-click="queue.penalty=queue.penalty+1">\n									<i class="fa fa-angle-up"></i>\n								</button>\n								<button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!queue.penalty" data-ng-click="queue.penalty=queue.penalty-1">\n									<i class="fa fa-angle-down"></i>\n								</button>\n							</div>\n						</div>\n						<div class="form-group last">\n							<div class="col-md-12" id="multi-select-team">\n							</div>\n						</div>\n					</div>\n				</form>\n				<!-- END FORM-->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/openchannel/queue/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getQueue()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-globe"></i>\n					<a href="#">{{ \'APPLICATION_OPEN_CHANNEL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/channels/openchannel/queues/list">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					<i data-ng-show="queue" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="queue">\n					<a href="#">{{queue.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/queue.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{queue.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n					{{user.role}}\n				</div> -->\n			</div>\n			<!-- END SIDEBAR USER TITLE -->\n\n			<!-- SIDEBAR MENU -->\n			<div class="profile-usermenu">\n				<ul class="nav">\n					<li data-ng-class="{active: $state.is(\'main.channels.openchannel.queues.view.settings\')}">\n						<a data-ng-href="/channels/openchannel/queues/view/{{queue.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.channels.openchannel.queues.view.agents\')}" data-ng-show="Auth.getCurrentUser().role === \'admin\'">\n							<a data-ng-href="/channels/openchannel/queues/view/{{queue.id}}/agents">\n								<i class="icon-people"></i>\n								{{ \'APPLICATION_AGENTS\' | translate}} </a>\n							</li>\n						</ul>\n					</div>\n					<!-- END MENU -->\n				</div>\n				<!-- END PORTLET main.channels -->\n			</div>\n			<!-- END BEGIN PROFILE SIDEBAR -->\n			<!-- BEGIN PROFILE CONTENT -->\n			<div ui-view class="profile-content">\n			</div>\n			<!-- END PROFILE CONTENT -->\n		</div>\n	</div>\n	<!-- END PAGE CONTENT-->\n'),
-a.put("app/channels/openchannel/queue/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.general" data-ng-submit="forms.general.$valid && updateQueue()" novalidate>\n					<!-- START NAME -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="queue.name" data-ng-pattern="settings.patternName" required />\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.pattern" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n						</span>\n					</div>\n					<!-- END NAME -->\n\n					<!-- START DESCRIPTION -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n						<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="queue.description"/>\n					</div>\n					<!-- END DESCRIPTION -->\n\n					<!-- START TIMEOUT -->\n					<div class="form-group">\n						<label class="control-label">Timeout</label>\n						<input type="number" name="timeout" placeholder="Timeout" class="form-control" min="1" data-ng-model="queue.timeout"/>\n					</div>\n					<!-- END TIMEOUT -->\n\n					<!-- START HEADER SHAPE -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.strategy.$touched || forms.general.$submitted) && forms.general.strategy.$invalid}">\n						<label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}</label>\n						<ui-select data-ng-model="queue.strategy" name="strategy" theme="bootstrap">\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.toUpperCase()}}</ui-select-match>\n							<ui-select-choices repeat="strategy in strategies | filter: $select.search">\n								<div ng-bind-html="strategy | uppercase | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n					</div>\n					<!-- END HEADER SHAPE -->\n					<input data-ng-if="Auth.isAdmin()" class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/openchannel/realtime/view/agent/agent.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-tree-view ui-grid-expandable-row ui-grid-pagination ui-grid-auto-resize>\n			<span us-spinner spinner-key="grid-spinner" spinner-start-active="true"></span>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/openchannel/realtime/view/agent/agent.modal.info.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INTERFACE_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<div data-ng-if="agent.ipaddr" class="well">\n  <div>{{agent.ipaddr}}:{{agent.port}}</div>\n  <div>{{agent.fullcontact}}</div>\n  <div>{{agent.useragent}}</div>\n  <div>{{agent.lastms}}</div>\n</div>\n<div data-ng-if="!agent.ipaddr" class="alert alert-danger" role="alert">\n  {{\'MESSAGE_NO_AVAILABLE_INFO\' | translate}}\n</div>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/openchannel/realtime/view/agent/queue.modal.add.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_JOIN_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <div class="form-group row">\n  <label class="col-md-2 control-label" style="margin-top: 7px;">{{\'APPLICATION_QUEUE\' | translate}}:</label>\n  <div class="col-md-10">\n    <ui-select multiple ng-model="item.queues" theme="bootstrap" required>\n      <ui-select-match placeholder="{{\'APPLICATION_QUEUE\' | translate}}">{{$item.name}}</ui-select-match>\n      <ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n        <div ng-bind-html="queue.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n</div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/openchannel/realtime/view/application/application.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initApplications()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns class="ui-grid" ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/openchannel/realtime/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-globe"></i>\n					<a href="#">{{ \'APPLICATION_OPEN_CHANNEL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-energy"></i>\n					<a href="#">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<div>\n			<nav class="navbar navbar-default" role="navigation">\n				<div class="collapse navbar-collapse">\n					<ul class="nav navbar-nav">\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.openchannel.realtime.view.agents\')}">\n							<a href="/channels/openchannel/realtime/view/agents">\n								{{\'APPLICATION_AGENTS\' | translate}}\n							</a>\n						</li>\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.openchannel.realtime.view.applications\')}">\n							<a href="/channels/openchannel/realtime/view/applications">\n								{{\'APPLICATION_APPLICATIONS\' | translate}}\n							</a>\n						</li>\n					</ul>\n				</div>\n			</nav>\n		</div>\n\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/openchannel/realtime/view/view.queue.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div id="grid1" ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-tree-view class="grid">\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/realtime/view/agent/agent.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-pagination ui-grid-auto-resize>\n			<span us-spinner spinner-key="grid-spinner" spinner-start-active="true"></span>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/realtime/view/agent/agent.modal.info.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INTERFACE_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<div data-ng-if="agent.ipaddr" class="well">\n  <div>{{agent.ipaddr}}:{{agent.port}}</div>\n  <div>{{agent.fullcontact}}</div>\n  <div>{{agent.useragent}}</div>\n  <div>{{agent.lastms}}</div>\n</div>\n<div data-ng-if="!agent.ipaddr" class="alert alert-danger" role="alert">\n  {{\'MESSAGE_NO_AVAILABLE_INFO\' | translate}}\n</div>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/realtime/view/agent/queue.modal.add.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_JOIN_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <div class="form-group row">\n  <label class="col-md-2 control-label" style="margin-top: 7px;">{{\'APPLICATION_QUEUE\' | translate}}:</label>\n  <div class="col-md-10">\n    <ui-select multiple ng-model="item.queues" theme="bootstrap" required>\n      <ui-select-match placeholder="{{\'APPLICATION_QUEUE\' | translate}}">{{$item.name}}</ui-select-match>\n      <ui-select-choices repeat="queue.name as queue in queues | filter: $select.search">\n        <div ng-bind-html="queue.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n</div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/realtime/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-energy"></i>\n					<a href="/channels/realtime/view/agents">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<div>\n		    <nav class="navbar navbar-default" role="navigation">\n					<div class="collapse navbar-collapse">\n						<ul class="nav navbar-nav">\n							<li data-ng-class="{\'active\': $state.is(\'main.channels.realtime.view.agents\')}">\n								<a href="/channels/realtime/view/agents">\n									{{\'APPLICATION_AGENTS\' | translate}}\n								</a>\n							</li>\n						</ul>\n					</div>\n		    </nav>\n		</div>\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/account/list/list.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="glyphicon glyphicon-comment"></i>\n					<a href="#">{{ \'APPLICATION_SMS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="/channels/sms/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n	</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group">\n						<a class="btn btn-default" href="#" data-ng-click="gridOptions.getPage();">\n							<i class="icon-reload"></i>\n						</a>\n					</div>\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/channels/sms/accounts/wizard">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/account/view/action/list/list.html",'<div class="row" data-ng-init="initActions()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACTIONS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/channels/sms/accounts/view/{{account.id}}/actions/wizard" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACTION\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/sms/account/view/action/view/view.html",'\n<div class="row" data-ng-init="initAction()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }}</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.settings" ng-submit="updateItem()" novalidate>\n					<!-- START APP -->\n					<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n							<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n							<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n								<div ng-bind-html="app.name | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid && forms.settings.app.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END APP -->\n\n					<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n						<!-- START QUEUE -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$invalid}">\n							<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.SmsQueueId" name="queue" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n									<div ng-bind-html="queue.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="queues.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/sms/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END QUEUE -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n						<!-- START AGENT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$invalid}">\n							<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n								<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n									<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="agents.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END AGENT -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n						<!-- START SENDMAIL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" min="1" required/>\n							<span data-ng-show="(forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid && forms.settings.to.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.template.$touched || forms.settings.$submitted) && forms.settings.template.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n									<div ng-bind-html="template.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.template.$touched || forms.settings.$submitted) && forms.settings.template.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END SENDMAIL -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n						<!-- START SENDSms -->\n						<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n								<span data-ng-show="(forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid && forms.settings.to.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.text.$touched || forms.text.$submitted) && forms.settings.text.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<textarea id="text" class="form-control maxlength-handler" maxlength="160"  name="text" data-ng-model="application.data6" required></textarea>\n							<span data-ng-show="(forms.settings.text.$touched || forms.settings.$submitted) && forms.settings.text.$invalid && forms.settings.text.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<!-- END SENDSms -->\n					</div>\n					<!-- START INTERVAL_TYPE -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n							<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n								{{ intType.name | translate }}\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END INTERVAL_TYPE -->\n\n					<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n						<!-- START TIME -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n							<div class="input-group input-large">\n								<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n									<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n								</fieldset>\n								<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n								<fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n								<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n							</div>\n						</div>\n						<!-- END TIME -->\n\n						<!-- START ALWAYS -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n							<div class="input-group input-large">\n								<label class="control-label pointer-cursor">\n									<input\n										bs-switch\n										data-ng-model="application.alwaysTime"\n										type="checkbox"\n										switch-active="{{ isActive }}"\n										switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n										switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n										switch-on-color="{{ onColor }}"\n										switch-off-color="{{ offColor }}"\n										switch-animate="{{ animate }}"\n										switch-size="{{ size }}"\n										switch-label="{{ label }}"\n										switch-icon="{{ icon }}"\n										switch-radio-off="{{ radioOff }}"\n										switch-label-width="{{ labelWidth }}"\n										switch-handle-width="{{ handleWidth }}">\n									<!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n								</label>\n							</div>\n						</div>\n						<!-- END ALWAYS -->\n\n						<!-- START WEEKDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END WEEKDAY -->\n\n						<!-- START MONTHDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTHDAY -->\n\n						<!-- START MONTH -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTH -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n						<!-- START INTERVALS -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$invalid}">\n							<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n									{{ interval.name}}\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="intervals.length">\n								<h4 class="block">Warning!</h4>\n								<p>\n									{{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n								</p>\n								<p>\n									{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n								</p>\n							</div>\n							<span data-ng-show="(forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END INTERVALS -->\n\n					</div>\n					<button class="btn green-haze" type="submit">{{\'APPLICATION_UPDATE\' | translate}}</button>\n				</form>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/channels/sms/account/view/action/wizard/wizard.html",'\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n					<wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.action.$valid)">\n						<form name="forms.action" novalidate>\n							<!-- START APP -->\n							<div class="form-group"  data-ng-class="{\'has-error\': forms.action.$submitted && forms.action.app.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n									<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n										<div ng-bind-html="app.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="forms.action.$submitted && forms.action.app.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END APP -->\n\n							<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n								<!-- START AGENT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$invalid}">\n									<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n										<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n											<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="agents.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_AGENTS\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END AGENT -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n								<!-- START QUEUE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$invalid}">\n									<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.SmsQueueId" name="queue" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n											<div ng-bind-html="queue.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="queues.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/sms/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END QUEUE -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n								<!-- START SENDMAIL -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" required/>\n										<span data-ng-show="(forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid && forms.action.to.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.mail.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n											<div ng-bind-html="template.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END SENDMAIL -->\n							</div>\n							<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n								<!-- START SENDSms -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n										<span data-ng-show="(forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid && forms.action.to.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<textarea id="text" class="form-control maxlength-handler"  maxlength="160" name="text" data-ng-model="application.data6" required></textarea>\n									<span data-ng-show="(forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid && forms.action.text.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<!-- END SENDSms -->\n							</div>\n							<!-- START INTERVAL_TYPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n										{{ intType.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END INTERVAL_TYPE -->\n\n							<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n								<!-- START TIME -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n									<div class="input-group input-large">\n										<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n											<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n										</fieldset>\n										<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n										<fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n										<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n									</div>\n								</div>\n								<!-- END TIME -->\n\n								<!-- START ALWAYS -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n									<div class="input-group input-large">\n										<label class="control-label pointer-cursor">\n											<input\n												bs-switch\n												data-ng-model="application.alwaysTime"\n												type="checkbox"\n												switch-active="{{ isActive }}"\n												switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n												switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n												switch-on-color="{{ onColor }}"\n												switch-off-color="{{ offColor }}"\n												switch-animate="{{ animate }}"\n												switch-size="{{ size }}"\n												switch-label="{{ label }}"\n												switch-icon="{{ icon }}"\n												switch-radio-off="{{ radioOff }}"\n												switch-label-width="{{ labelWidth }}"\n												switch-handle-width="{{ handleWidth }}">\n											<!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n										</label>\n									</div>\n								</div>\n								<!-- END ALWAYS -->\n\n								<!-- START WEEKDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END WEEKDAY -->\n\n								<!-- START MONTHDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTHDAY -->\n\n								<!-- START MONTH -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTH -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n								<!-- START INTERVALS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$invalid}">\n									<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n											{{ interval.name}}\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="intervals.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERVALS -->\n\n							</div>\n\n							<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONTINUE\' | translate}}"/>\n						</form>\n					</wz-step>\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/account/view/api/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_API\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- CALLBACK TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n							<!-- START CALLBACK URL -->\n							<div  class="row" >\n									<div class="col-md-12">\n										<label class="control-label">Receive URL</label>\n										<p>\n											Copy the following url and insert it into your {{account.type}} account settings to receive SMS.\n											<a href="https://wiki.xcallymotion.com/display/XMD/SMS" target="_blank">Detail</a>\n										</p>\n									</div>\n								</div>\n							<div   class="row" >\n									<div class="col-md-11">\n										<code-mirror  model="receiveurl"></code-mirror>\n									</div>\n									<div class="col-md-1">\n										<a class="btn btn-sm green-jungle" data-ng-click="copyToClipboard(receiveurl);"><i class="fa fa-clipboard"></i>\n										</a>\n									</div>\n							</div><br>\n							<!-- END CALLACK URL -->\n							<!-- START DELIVERY CALLBACK URL -->\n							<div ng-if= "account.smstype == \'classic+\'" class="row"  ng-show="!forms.info.remote.$invalid">\n								<div class="col-md-12">\n									<label class="control-label">Delivery URL </label>\n									<p>\n										Copy the following url and insert it into your {{account.type}} account settings to receive delivery report.\n 									 <a href="https://wiki.xcallymotion.com/display/XMD/SMS" target="_blank">Detail</a>\n									</p>\n								</div>\n							</div>\n							<div ng-if= "account.smstype == \'classic+\'"  class="row" ng-show="!forms.info.remote.$invalid">\n								<div class="col-md-11">\n									<code-mirror class="control-label" model="deliveryurl"></code-mirror>\n								</div>\n								<div class="col-md-1">\n									<a class="btn btn-sm green-jungle" data-ng-click="copyToClipboard(deliveryurl);"><i class="fa fa-clipboard"></i>\n									</a>\n								</div>\n							</div>\n							<!-- END DELIVERY CALLACK URL -->\n					</div>\n					<!-- END CALLBACK TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/sms/account/view/disposition/modal/add.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_DISPOSITIONS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.form.$touched || form.$submitted) && form.form.$invalid}">\n      <div class="">\n        <input type="text" name="form" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" class="form-control" data-ng-model="name" required/>\n        <span data-ng-show="form.form.$touched && form.form.$error.required" class="help-block help-block-error">\n          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n        </span>\n      </div>\n    </div>\n    <!-- END NAME -->\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="form.$valid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/sms/account/view/disposition/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DISPOSITIONS\' | translate}}</span>\n				</div>\n				<div class="actions actions-md">\n					<a href="#" class="btn btn-icon-only green" data-ng-click="addDisposition();">\n						<i class="fa fa-plus"></i>\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n				<div class="tab-content">\n					<div class="row" data-ng-hide="dispositions.length">\n						<div class="col-md-12">\n							<div class="note note-info">\n								<h4 class="block">Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}</h4>\n							</div>\n						</div>\n					</div>\n\n					<!-- GENERAL TAB -->\n					<div class="row" data-ng-repeat="disposition in dispositions">\n						<div class="col-md-12 form-group">\n							<div class="input-group">\n								<div>\n									<input class="form-control" type="text" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" data-ng-model="disposition.name">\n								</div>\n								<span class="input-group-btn">\n									<button class="btn btn-success" type="button" data-ng-click="updateDisposition(disposition.id, disposition.name);"><i class="fa fa-cloud-upload fa-fw"></i> {{\'APPLICATION_UPDATE\' | translate}}</button>\n									<button class="btn btn-danger" type="button" data-ng-click="deleteDisposition(disposition.id);"><i class="fa fa-times fa-fw"></i> {{\'APPLICATION_DELETE\' | translate}}</button>\n								</span>\n							</div>\n						</div>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/sms/account/view/hooks/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_HOOKS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_ACCEPT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_REJECT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_CLOSE\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- ACCEPT TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.accept" data-ng-submit="forms.accept.$valid && updateItemSmsAccount()" novalidate>\n							<!-- START ACCEPT URL -->\n								<div class="row">\n									<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid}">\n										<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n										<ui-select data-ng-model="account.acceptMethod" name="method" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n											<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n												<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n											</ui-select-choices>\n										</ui-select>\n										<span data-ng-show="(forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid && forms.accept.method.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<div  class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid}">\n										<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n										<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.acceptUrl"  ng-required="account.acceptMethod"/>\n										<span data-ng-show="(forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid && forms.accept.url.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n								<!-- END ACCEPT URL-->\n								<!-- START ACTIONS-->\n								<!-- START PAUSE -->\n								<div class="row" ng-repeat = "action in account.actions">\n									<div  ng-switch="action.action">\n											<div ng-switch-when="pause">\n												<div  class="form-group col-md-4">\n													<label class="control-label">{{\'APPLICATION_PAUSE\' | translate}}</label></br>\n														<input\n														bs-switch\n														data-ng-change="resetActionData(action)"\n														data-ng-model="action.enabled"\n														type="checkbox"\n														switch-active="{{ isActive }}"\n														switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n														switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n														switch-on-color="{{ onColor }}"\n														switch-off-color="{{ offColor }}"\n														switch-animate="{{ animate }}"\n														switch-size="{{ size }}"\n														switch-label="{{ label }}"\n														switch-icon="{{ icon }}"\n														switch-radio-off="{{ radioOff }}"\n														switch-label-width="{{ labelWidth }}"\n														switch-handle-width="{{ handleWidth }}">\n													</div>\n													<div ng-if="action.enabled" class="form-group col-md-8">\n														<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}</label>\n														<ui-select  name="action" data-ng-model="action.type"  theme="bootstrap" >\n															<ui-select-match placeholder="{{\'APPLICATION_TYPE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n															<ui-select-choices repeat=" pause.name as pause in pauses | filter: $select.search">\n																<div ng-bind-html="pause.name | highlight: $select.search | uppercase" ></div>\n															</ui-select-choices>\n														</ui-select>\n													</div>\n											</div>\n										</div>\n									</div>\n								<!-- END ACTION -->\n\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ACCEPT TAB -->\n					<!-- START REJECT TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.reject" data-ng-submit="forms.reject.$valid && updateItemSmsAccount()" novalidate>\n							<!-- START REJECT URL -->\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.rejectMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid && forms.reject.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.rejectUrl" ng-required="account.rejectMethod"/>\n									<span data-ng-show="(forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid && forms.reject.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n\n							<!-- END REJECT URL -->\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END REJECT TAB -->\n					<!-- START CLOSE TAB -->\n					<div class="tab-pane" id="tab_1_3">\n						<form name="forms.close" data-ng-submit="forms.close.$valid && updateItemSmsAccount()" novalidate>\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.closeMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid && forms.close.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.closeUrl" ng-required="account.closeMethod"/>\n									<span data-ng-show="(forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid && forms.close.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CLOSE TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
-a.put("app/channels/sms/account/view/setting/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItemSmsAccount()" novalidate>\n							<!-- START ID -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ID\' | translate}}<span class="required" aria-required="true">*</span>\n								</label>\n								<input type="text" name="id" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.id" ng-disabled="true" required/>\n							</div>\n							<!-- END ID-->\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid && forms.info.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n							<!-- START LIST -->\n							<div class="form-group" data-ng-if="license.cm">\n								<label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n									<div class="input-group">\n\n										<ui-select data-ng-model="account.ListId" name="list" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_LIST\' | translate}}">{{$select.selected.name}}</ui-select-match>\n											<ui-select-choices repeat="list.id as list in lists | filter: $select.search">\n												<div ng-bind-html="list.name | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n\n										<span class="input-group-btn">\n											<button type="button" data-ng-click="account.ListId = null" class="btn btn-default">\n												<span class="glyphicon glyphicon-trash"></span>\n											</button>\n										</span>\n\n									</div>\n							</div>\n							<!-- END LIST -->\n							<!-- START FIDELITY -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_FIDELITY\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="account.fidelity"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END FIDELITY -->\n\n							<!-- START TIMEOUT -->\n							<div class="form-group" data-ng-if="account.fidelity" data-ng-class="{\'has-error\': (forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" name="timeout" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="account.timeout" required/>\n								<span data-ng-show="(forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid && forms.info.timeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid && forms.info.timeout.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIMEOUT -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n							<!-- START TWILIO -->\n							<!-- START PHONE -->\n							<div ng-if= "account.type == \'twilio\'" class="form-group" data-ng-class="{\'has-error\': ( forms.info.phone.$touched ||forms.info.$submitted) && forms.info.phone.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PHONE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" ng-pattern="/^[\\+]?[0-9]+$/" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="account.phone" name="phone" required/>\n								<span data-ng-show="(forms.info.phone.$touched || forms.in.$submitted) && forms.info.phone.$invalid && forms.info.phone.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PHONE  -->\n\n							<!-- START SID -->\n							<div ng-if= "account.type == \'twilio\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.sid.$touched || forms.info.$submitted) && forms.info.sid.$invalid}">\n								<label class="control-label">{{\'APPLICATION_SID\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="sid" placeholder="{{\'APPLICATION_SID\' | translate}}" class="form-control" data-ng-model="account.sid" name="sid" required/>\n								<span data-ng-show="(forms.info.sid.$touched || forms.info.$submitted) && forms.info.sid.$invalid && forms.info.sid.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END SID -->\n							<!-- START TOKEN -->\n							<div ng-if= "account.type == \'twilio\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.token.$touched || forms.info.$submitted) && forms.info.token.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TOKEN\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="token" placeholder="{{\'APPLICATION_TOKEN\' | translate}}" class="form-control" data-ng-model="account.token" name="token" required/>\n								<span data-ng-show="(forms.info.token.$touched || forms.info.$submitted) && forms.info.token.$invalid && forms.info.token.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END SID -->\n							<!-- END TWILIO -->\n							<!-- START SKEBBY -->\n							<!-- START SKEBBY SMS TYPE -->\n						<div ng-if= " account.type == \'skebby\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.smstype.$touched || forms.info.$submitted) && forms.info.smstype.$invalid}">\n							<label class="control-label">{{\'APPLICATION_SMS_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="account.smstype" name="smstype" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'SMS_TYPE\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n								<ui-select-choices repeat="smstype in [\'basic\',\'classic\',\'classic+\'] | filter: $select.search">\n									<div data-ng-bind="smstype | highlight: $select.search | uppercase" ></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.info.smstype.$touched || forms.info.$submitted) && forms.info.smstype.$invalid && forms.info.smstype.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n							<!-- END SKEBBY SMS TYPE -->\n							<!-- START PHONE  -->\n							<div ng-if= "account.type == \'skebby\'  " class="form-group" data-ng-class="{\'has-error\': ( forms.info.phone.$touched ||forms.info.$submitted) && forms.info.phone.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PHONE\' | translate}}<span class="required" aria-required="true"></span></label>\n								<input type="text" ng-pattern="/^[0-9]+$/"  placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="account.phone" name="phone" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_PHONE_NUMBER\' | translate }}\n								</span>\n								<span data-ng-show="(forms.info.phone.$touched || forms.in.$submitted) && forms.info.phone.$invalid && forms.info.phone.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PHONE -->\n							<!-- START USERNAME -->\n							<div ng-if= "account.type == \'skebby\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.username.$touched || forms.info.$submitted) && forms.info.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" name="username" required/>\n								<span data-ng-show="(forms.info.username.$touched || forms.info.$submitted) && forms.info.username.$invalid && forms.info.username.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START PASSWORD -->\n							<div ng-if= "account.type == \'skebby\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n								<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid && forms.info.password.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n							<!-- END SKEBBY -->\n							<!-- START REMOTE IP -->\n							<div  class="form-group" data-ng-class="{\'has-error\': (forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remote" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remote" required/>\n								<span class="help-block help-block-info">\n									{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n								</span>\n								<span data-ng-show="(forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid && forms.info.remote.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END REMOTE IP -->\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/sms/account/view/view.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="glyphicon glyphicon-comment"></i>\n					<a href="#">{{ \'APPLICATION_SMS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="/channels/sms/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n					<i class="fa fa-angle-right" data-ng-show="account"></i>\n				</li>\n				<li data-ng-show="account">\n					<a href="#">{{ account.description || account.name }}</a>\n				</li>\n			</ul>\n		</div>\n\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img ng-src="assets/images/media/account.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ account.description || account.name }}\n					</div>\n					<div class="profile-usertitle-job">\n						{{account.email}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li ng-class="{active: $state.is(\'main.channels.sms.accounts.view.settings\')}">\n							<a href="/channels/sms/accounts/view/{{account.id}}/settings">\n							<i class="icon-settings"></i>\n							{{\'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.sms.accounts.view.api\')}">\n							<a href="/channels/sms/accounts/view/{{account.id}}/api">\n							<i class="fa fa-external-link"></i>\n							{{\'APPLICATION_API\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.sms.accounts.view.hooks\')}">\n							<a href="/channels/sms/accounts/view/{{account.id}}/hooks">\n							<i class="fa fa-code"></i>\n							{{\'APPLICATION_HOOKS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.sms.accounts.view.dispositions\')}">\n							<a href="/channels/sms/accounts/view/{{account.id}}/dispositions">\n							<i class="icon-target"></i>\n							{{\'APPLICATION_DISPOSITIONS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.includes(\'main.channels.sms.accounts.view.actions\')}">\n							<a href="/channels/sms/accounts/view/{{account.id}}/actions/list">\n							<i class="icon-directions"></i>\n							{{\'APPLICATION_ACTIONS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<div ui-view class="profile-content"></div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n<!-- END PAGE CONTENT-->\n</div>\n'),a.put("app/channels/sms/account/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItemSmsAccount()" novalidate>\n							<!-- START ID -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ID\' | translate}}<span class="required" aria-required="true">*</span>\n								</label>\n								<input type="text" name="id" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.id" ng-disabled="true" required/>\n							</div>\n							<!-- END ID-->\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid && forms.info.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n							<!-- START LIST -->\n							<div class="form-group" data-ng-if="license.cm">\n								<label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n									<div class="input-group">\n\n										<ui-select data-ng-model="account.ListId" name="list" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_LIST\' | translate}}">{{$select.selected.name}}</ui-select-match>\n											<ui-select-choices repeat="list.id as list in lists | filter: $select.search">\n												<div ng-bind-html="list.name | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n\n										<span class="input-group-btn">\n											<button type="button" data-ng-click="account.ListId = null" class="btn btn-default">\n												<span class="glyphicon glyphicon-trash"></span>\n											</button>\n										</span>\n\n									</div>\n							</div>\n							<!-- END LIST -->\n\n\n							<!-- START FIDELITY -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_FIDELITY\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								data-ng-model="account.fidelity"\n								type="checkbox"\n								name="auth"\n								switch-active="{{ recordSwitch.isActive }}"\n								switch-on-text="{{ recordSwitch.onText }}"\n								switch-off-text="{{ recordSwitch.offText }}"\n								switch-on-color="{{ recordSwitch.onColor }}"\n								switch-off-color="{{ recordSwitch.offColor }}"\n								switch-animate="{{ recordSwitch.animate }}"\n								switch-size="{{ recordSwitch.size }}"\n								switch-label="{{ recordSwitch.label }}"\n								switch-icon="{{ recordSwitch.icon }}"\n								switch-radio-off="{{ recordSwitch.radioOff }}"\n								switch-label-width="{{ recordSwitch.labelWidth }}"\n								switch-handle-width="{{ recordSwitch.handleWidth }}">\n							</div>\n							<!-- END FIDELITY -->\n\n							<!-- START TIMEOUT -->\n							<div class="form-group" data-ng-if="account.fidelity" data-ng-class="{\'has-error\': (forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" name="timeout" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="account.timeout" required/>\n								<span data-ng-show="(forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid && forms.info.timeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid && forms.info.timeout.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIMEOUT -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<!-- START PHONE FOR TWILLIO ACCOUNT -->\n\n							<div ng-if= "account.type == \'twilio\'" class="form-group" data-ng-class="{\'has-error\': ( forms.info.phone.$touched ||forms.info.$submitted) && forms.info.phone.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PHONE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" ng-pattern="/^[\\+]?[0-9]+$/" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="account.phone" name="phone" required/>\n<!-- Format with a \'+\' and country code  -->\n								<!-- <span class="help-block">\n									{{ \'DESCRIPTION_PHONE_NUMBER\' | translate }}\n								</span> -->\n								<span data-ng-show="(forms.info.phone.$touched || forms.in.$submitted) && forms.info.phone.$invalid && forms.info.phone.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PHONE FOR TWILLIO ACCOUNT -->\n\n							<!-- START SID -->\n							<div ng-if= "account.type == \'twilio\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.sid.$touched || forms.info.$submitted) && forms.info.sid.$invalid}">\n								<label class="control-label">{{\'APPLICATION_SID\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="sid" placeholder="{{\'APPLICATION_SID\' | translate}}" class="form-control" data-ng-model="account.sid" name="sid" required/>\n								<span data-ng-show="(forms.info.sid.$touched || forms.info.$submitted) && forms.info.sid.$invalid && forms.info.sid.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END SID -->\n							<!-- START TOKEN -->\n							<div ng-if= "account.type == \'twilio\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.token.$touched || forms.info.$submitted) && forms.info.token.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TOKEN\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="token" placeholder="{{\'APPLICATION_TOKEN\' | translate}}" class="form-control" data-ng-model="account.token" name="token" required/>\n								<span data-ng-show="(forms.info.token.$touched || forms.info.$submitted) && forms.info.token.$invalid && forms.info.token.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END SID -->\n\n							<!-- START SMS TYPE -->\n\n						<div ng-if= " account.type == \'skebby\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.smstype.$touched || forms.info.$submitted) && forms.info.smstype.$invalid}">\n							<label class="control-label">{{\'APPLICATION_SMS_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="account.smstype" name="smstype" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'SMS_TYPE\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n								<ui-select-choices repeat="smstype in [\'basic\',\'classic\',\'classic+\'] | filter: $select.search">\n									<div data-ng-bind="smstype | highlight: $select.search | uppercase" ></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.info.smstype.$touched || forms.info.$submitted) && forms.info.smstype.$invalid && forms.info.smstype.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n							<!-- END TYPE -->\n							<!-- START PHONE FOR SKEBBY ACCOUNT -->\n							<div ng-if= "account.type == \'skebby\'  " class="form-group" data-ng-class="{\'has-error\': ( forms.info.phone.$touched ||forms.info.$submitted) && forms.info.phone.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PHONE\' | translate}}<span class="required" aria-required="true"></span></label>\n								<input type="text" ng-pattern="/^[0-9]+$/"  placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="account.phone" name="phone" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_PHONE_NUMBER\' | translate }}\n								</span>\n								<span data-ng-show="(forms.info.phone.$touched || forms.in.$submitted) && forms.info.phone.$invalid && forms.info.phone.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PHONE -->\n							<!-- START USERNAME -->\n							<div ng-if= "account.type == \'skebby\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.username.$touched || forms.info.$submitted) && forms.info.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" name="username" required/>\n								<span data-ng-show="(forms.info.username.$touched || forms.info.$submitted) && forms.info.username.$invalid && forms.info.username.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START PASSWORD -->\n							<div ng-if= "account.type == \'skebby\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n								<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid && forms.info.password.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n							<!-- START REMOTE IP -->\n							<div  class="form-group" data-ng-class="{\'has-error\': (forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remote" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remote" required/>\n								<span data-ng-show="(forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid && forms.info.remote.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END REMOTE IP -->\n							<!-- START CALLBACK URL -->\n							<div  ng-show="!forms.info.remote.$invalid" class="row" >\n								<!-- <div class="row"> -->\n									<div class="col-md-12">\n										<label class="control-label">URL </label><br>\n										<span ng-if= "account.type == \'twilio\' || account.type == \'skebby\'">\n											Copy the following url and insert it into your {{account.type}} account settings to receive sms.\n											<a href="https://wiki.xcallymotion.com/display/XMD/SMS" target="_blank">Detail</a>\n										</span>\n									</div>\n								</div>\n								<br>\n							<div  ng-show="!forms.info.remote.$invalid" class="row" >\n									<div class="col-md-11">\n										<code-mirror  model="receiveurl"></code-mirror>\n									</div>\n									<div class="col-md-1">\n										<a class="btn btn-sm green-jungle" data-ng-click="copyToClipboard(receiveurl);"><i class="fa fa-clipboard"></i>\n										</a>\n									</div>\n							</div>\n							<!-- END CALLACK URL -->\n							<!-- START DELIVERY CALLBACK URL -->\n							<div ng-if= "account.smstype == \'classic+\'" class="row"  ng-show="!forms.info.remote.$invalid">\n								<div class="col-md-12">\n									<label class="control-label">Delivery URL </label><br>\n									 Copy the following url and insert it into your {{account.type}} account settings to receive delivery status.\n									 <a href="https://wiki.xcallymotion.com/display/XMD/SMS" target="_blank">Detail</a>\n								</div>\n							</div>\n									<br>\n							<div ng-if= "account.smstype == \'classic+\'"  class="row" ng-show="!forms.info.remote.$invalid">\n								<div class="col-md-11">\n									<code-mirror class="control-label" model="deliveryurl"></code-mirror>\n								</div>\n								<div class="col-md-1">\n									<a class="btn btn-sm green-jungle" data-ng-click="copyToClipboard(deliveryurl);"><i class="fa fa-clipboard"></i>\n									</a>\n								</div>\n							</div>\n							<!-- END DELIVERY CALLACK URL -->\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
-a.put("app/channels/sms/account/wizard/wizard.html",'\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN PAGE HEADER-->\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="glyphicon glyphicon-comment"></i>\n					<a href="#">{{ \'APPLICATION_SMS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="/channels/sms/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n		<!-- END PAGE HEADER-->\n\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n	        <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="formValidation(forms.info.$valid)">\n							<form name="forms.info" novalidate>\n								<!-- START NAME -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n									<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n									<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid && forms.info.name.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END NAME -->\n\n								<!-- START DESCRIPTION -->\n								<div class="form-group">\n									<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n									<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n								</div>\n								<!-- END DESCRIPTION -->\n                <!-- START APPLICATION TYPE -->\n\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.type.$touched || forms.info.$submitted) && forms.info.type.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="item.type" name="type" theme="bootstrap" required>\n			            <ui-select-match placeholder="{{\'APPLICATION_TYPE\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n			            <ui-select-choices repeat="type in [\'twilio\',\'skebby\'] | filter: $select.search">\n			              <div data-ng-bind="type | highlight: $select.search | uppercase" ></div>\n			            </ui-select-choices>\n			          </ui-select>\n								<span data-ng-show="(forms.info.type.$touched || forms.info.$submitted) && forms.info.type.$invalid && forms.info.type.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n                <!-- END TYPE -->\n								<!-- START PHONE FOR TWILLIO ACCOUNT -->\n								<div ng-if= "item.type == \'twilio\'" class="form-group" data-ng-class="{\'has-error\': ( forms.info.phone.$touched ||forms.info.$submitted) && forms.info.phone.$invalid}">\n									<label class="control-label">{{\'APPLICATION_PHONE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<input type="text" ng-pattern="/^[\\+]?[0-9]+$/"  placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="item.phone" name="phone" required/>\n									<span data-ng-show="(forms.info.phone.$touched || forms.info.$submitted) && forms.info.phone.$invalid && forms.info.phone.$error.required"  class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END PHONE FOR TWILLIO ACCOUNT -->\n                <!-- START SID -->\n                <div ng-if= "item.type == \'twilio\'" class="form-group" data-ng-class="{\'has-error\': ( forms.info.sid.$touched ||forms.info.$submitted) && forms.info.sid.$invalid}">\n                  <label class="control-label">{{\'APPLICATION_SID\' | translate}}<span class="required" aria-required="true">*</span></label>\n                  <input type="text"  placeholder="{{\'APPLICATION_SID\' | translate}}" class="form-control" data-ng-model="item.sid" name="sid" required/>\n                  <span data-ng-show="(forms.info.sid.$touched || forms.info.$submitted) && forms.info.sid.$invalid && forms.info.sid.$error.required"  class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n                <!-- END SID -->\n                <!-- START TOKEN -->\n                <div ng-if= "item.type == \'twilio\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.token.$touched || forms.info.$submitted) && forms.info.token.$invalid}">\n                  <label class="control-label">{{\'APPLICATION_TOKEN\' | translate}}<span class="required" aria-required="true">*</span></label>\n                  <input type="text"  placeholder="{{\'APPLICATION_TOKEN\' | translate}}" class="form-control" data-ng-model="item.token" name="token" required/>\n                  <span data-ng-show="(forms.info.token.$touched || forms.info.$submitted) && forms.info.token.$invalid && forms.info.token.$error.required"  class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n                <!-- END SID -->\n\n								<!-- START SMS TYPE -->\n							<div ng-if= " item.type == \'skebby\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.smstype.$touched || forms.info.$submitted) && forms.info.smstype.$invalid}">\n								<label class="control-label">{{\'APPLICATION_SMS_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="item.smstype" name="smstype" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'SMS_TYPE\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n									<ui-select-choices repeat="smstype in [\'basic\',\'classic\',\'classic+\'] | filter: $select.search">\n										<div data-ng-bind="smstype | highlight: $select.search | uppercase" ></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.info.smstype.$touched || forms.info.$submitted) && forms.info.smstype.$invalid && forms.info.smstype.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n								<!-- END TYPE -->\n								<!-- START PHONE FOR SKEBBY ACCOUNT -->\n							<div ng-if= "item.type == \'skebby\' " class="form-group" data-ng-class="{\'has-error\': ( forms.info.phone.$touched ||forms.info.$submitted) && forms.info.phone.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PHONE\' | translate}}<span class="required" aria-required="true"></span></label>\n								<input type="text" ng-pattern="/^[0-9]+$/"  placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="item.phone" name="phone" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_PHONE_NUMBER\' | translate }}\n								</span>\n								<span data-ng-show="(forms.info.phone.$touched || forms.info.$submitted) && forms.info.phone.$invalid && forms.info.phone.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n								<!-- END PHONE -->\n								<!-- START USERNAME -->\n								<div ng-if= "item.type == \'skebby\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.username.$touched || forms.info.$submitted) && forms.info.username.$invalid}">\n									<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.username" name="username" required/>\n									<span data-ng-show="(forms.info.username.$touched || forms.info.$submitted) && forms.info.username.$invalid && forms.info.username.$error.required"  class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END USERNAME -->\n                <!-- START PASSWORD -->\n                <div ng-if= "item.type == \'skebby\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n                  <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                  <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                  <span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid && forms.info.password.$error.required" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n                <!-- END PASSWORD -->\n								<!-- START REMOTE IP -->\n								<div ng-if= "item.type" class="form-group" data-ng-class="{\'has-error\': (forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid}">\n									<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="url" name="remote" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remote" required/>\n									<span class="help-block help-block-info">\n										{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n									</span>\n									<span data-ng-show="(forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid && forms.info.remote.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END REMOTE IP -->\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n							</form>\n						</wz-step>\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/inbox/room/room.directive.html",'<!-- BEGIN TODO CONTENT -->\n\n<div class="todo-content">\n	<div class="portlet light">\n		<div class="portlet-title">\n			<div class="caption">\n				<button class="btn btn-sm btn-default green-meadow" data-ng-if="SmsRoom.status !== \'CLOSED\'" data-ng-disabled="!form.body || forms.compose.from.$invalid || forms.compose.to.$invalid" data-ng-click="sendSMS()">\n					<i class="icon-paper-plane" style="color: white;"></i> {{\'APPLICATION_SEND\' | translate}}\n				</button>\n				<span data-ng-show="SmsRoom && SmsRoom.status !== \'CLOSED\'"> | </span>\n				<span data-ng-show="SmsRoom" class="label label-default">#{{SmsRoom.id}} {{SmsRoom.status}}</span>\n				<span data-ng-if="SmsRoom && SmsRoom.ParentId"> | </span>\n				<span data-ng-if="SmsRoom && SmsRoom.ParentId" class="label label-warning"> Ref: <a data-ng-click="openRoom(SmsRoom.ParentId,SmsRoom.contact)">#{{SmsRoom.ParentId}}</a></span>\n			</div>\n			<div class="actions" data-ng-switch="SmsRoom.status">\n				<button class="btn btn-icon-only" data-ng-show="SmsRoom"  data-ng-class="{\'btn-success\':SmsRoom.status !== \'CLOSED\',\'grey-cascade\':SmsRoom.status === \'CLOSED\'}" data-ng-click="closeRoom(SmsRoom.id)"  data-ng-disabled="SmsRoom.status === \'CLOSED\' && SmsRoom.disposition">\n					<i data-ng-class="{\'fa fa-upload\':SmsRoom.status !== \'CLOSED\',\'icon-target\':SmsRoom.status === \'CLOSED\'}"></i>\n				</button>\n				<button  class="btn default btn-icon-only" data-ng-if="SmsRoom && SmsRoom.status !== \'CLOSED\'" type="button" data-ng-click="togglePanelLeft()" title="{{\'APPLICATION_RESIZE\' | translate}}">\n					<i ng-class="panelRight == \'col-md-12\' ? \'icon-size-actual\' : \'icon-size-fullscreen\'"></i>\n				</button>\n			</div>\n		</div>\n		<div class="portlet-body">\n			<div class="row">\n				<div data-ng-show="panelLeft" data-ng-class="panelLeft">\n					<div class="form">\n						<!-- START TAGS -->\n						<div class="form-group" data-ng-if="SmsRoom.status !== \'CLOSED\' || (SmsRoom.status == \'CLOSED\' && form.tags.length)">\n							<div class="row">\n								<div class="col-md-1">\n									<a href="#" class="btn btn-icon-only">\n										<i class="fa fa-tags" style="color: gray;"></i>\n									</a>\n								</div>\n								<div class="col-md-11">\n									<ui-select data-ng-disabled="SmsRoom.status == \'CLOSED\'"  multiple data-ng-model="form.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)">\n										<ui-select-match placeholder="Tags...">{{$item}}</ui-select-match>\n										<ui-select-choices repeat="tag in tags | filter:$select.search" class="">\n											{{tag}}\n										</ui-select-choices>\n									</ui-select>\n								</div>\n							</div>\n						</div>\n						<!-- END TAGS -->\n					</div>\n					<hr data-ng-if="SmsRoom && SmsRoom.status !== \'CLOSED\'">\n\n					<div ng-scrollbars ng-scrollbars-config="{\n						autoHideScrollbar: false,\n						theme: \'light\',\n						advanced: {\n							updateOnContentResize: true\n						},\n						setHeight: 781,\n						scrollInertia: 0\n					}">\n						<ul class="chats">\n							<li data-ng-switch="SmsRoom.status" data-ng-class="{\'in\': smsMessage.status == \'RECEIVED\', \'out\': smsMessage.status == \'SENT\' || smsMessage.status == \'SENDING\' || smsMessage.status == \'FAILED\' || smsMessage.status == \'NOTE\'  || smsMessage.status == \'DELIVERED\' || smsMessage.status == \'QUEUED\' ||  smsMessage.status != \'RECEIVED\' }" data-ng-repeat="smsMessage in SmsRoom.SmsMessages | orderBy:\'-createdAt\'">\n								<div class="avatar" data-ng-class="smsMessage.UserId ? \'pretty-avatar\' : \'pretty-avatar-v\'">\n									<ng-letter-avatar\n									data-ng-if="smsMessage.UserId"\n									height="40"\n									width="40"\n									fontsize="25"\n									data="{{smsMessage.User.fullname}}"\n									avatarcustombgcolor="#B0B0B0"\n									avatarcustomborder="border:2px solid #3399CC"\n									charCount="2"\n									shape="round"></ng-letter-avatar>\n									<ng-letter-avatar\n									data-ng-if="!smsMessage.UserId"\n									height="40"\n									width="40"\n									fontsize="25"\n									data="{{smsMessage.from}}"\n									avatarcustombgcolor="#B0B0B0"\n									avatarcustomborder="border:2px solid #EA4C61"\n									charCount="1"\n									shape="round"></ng-letter-avatar>\n								</div>\n								<sms message="smsMessage" list-id="SmsRoom.SmsAccount.ListId" accounttype=\'SmsRoom.SmsAccount.type\' ng-switch-default></sms>\n							</li>\n						</ul>\n					</div>\n				</div>\n				<div data-ng-class="panelRight">\n					<div class="note note-info" data-ng-if="SmsRoom && SmsRoom.status == \'CLOSED\'">\n						<h4 class="block">Info! {{\'MESSAGE_SMS_ROOM_CLOSED\' | translate}}</h4>\n						<p>\n							{{\'MESSAGE_SMS_ROOM_CLOSED_DETAILS\' | translate}}.\n						</p>\n						<hr>\n						<p>\n							<i class="icon-target"></i> {{\'APPLICATION_DISPOSITION\' | translate}}: <strong>{{SmsRoom.disposition}}</strong>\n						</p>\n						<p>\n							<i class="icon-calendar"></i> {{\'APPLICATION_UPDATED_AT\' | translate}}: <strong>{{SmsRoom.updatedAt | date:\'medium\'}}</strong> (<span am-time-ago="SmsRoom.updatedAt"></span>)\n						</p>\n					</div>\n					<form name="forms.compose" data-ng-submit="forms.compose.$valid && sendSMS()" class="form-horizontal" novalidate>\n						<!-- START HEAD -->\n						<div class="form">\n\n							<!-- START FROM -->\n									<div class="form-group" data-ng-class="{\'has-error\': forms.compose.from.$invalid && forms.compose.$submitted}" data-ng-if="SmsRoom.status !== \'CLOSED\'">\n										<div class="col-md-12">\n											<div class="row">\n												<div class="col-md-1">\n													<label class="control-label">From:</label>\n												</div>\n												<div class="col-md-11">\n													<ui-select  data-ng-disabled="SmsRoom"  theme="bootstrap" name="from" data-ng-model="form.from" required>\n														<ui-select-match placeholder="From...">{{$select.selected.name}}</ui-select-match>\n														<ui-select-choices repeat="smsAccount.phone as smsAccount in smsAccounts | filter: $select.search">\n															<div data-ng-bind-html="smsAccount.name | highlight: $select.search"></div>\n															<small data-ng-bind-html="smsAccount.phone | highlight: $select.search"></small>\n														</ui-select-choices>\n													</ui-select>\n													<span data-ng-show="forms.compose.from.$invalid && forms.compose.$submitted " class="help-block help-block-error">\n														<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n													</span>\n												</div>\n											</div>\n										</div>\n									</div>\n									<!-- END FROM -->\n							<!-- START TO -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.compose.to.$invalid && forms.compose.$submitted}" data-ng-if="SmsRoom.status !== \'CLOSED\'">\n\n								<div class="col-md-12">\n									<div class="row">\n										<div class="col-md-1">\n											<label class="control-label">To:</label>\n										</div>\n										<div class="col-md-11">\n											<input type="text" ng-pattern="/^[\\+]?[0-9]+$/"  name="to" class="form-control todo-taskbody-taskdesc" placeholder="To..." rows="8"   data-ng-disabled="SmsRoom" data-ng-model="form.to" required>\n											<span data-ng-show="forms.compose.to.$invalid && forms.compose.$submitted " class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n									</div>\n								</div>\n							</div>\n							<!-- END TO -->\n							<!-- START CANNED -->\n							<div class="form-group"  data-ng-if="SmsRoom.status !== \'CLOSED\'">\n								<div class="row">\n									<div class="col-md-1">\n										<a href="#" class="btn btn-icon-only">\n											<i class="fa fa-magic" style="color: gray;"></i>\n										</a>\n									</div>\n									<div class="col-md-11">\n										<input  type="text"\n										data-ng-model="modelOptions.selectedAnswer"\n										uib-typeahead="key for key in getAnswers($viewValue)"\n										placeholder="Canned answers.."\n										typeahead-loading="loadingLocations"\n										typeahead-no-results="noResults"\n										typeahead-on-select="onSelect($item)"\n										class="form-control">\n										<i ng-show="loadingLocations" class="glyphicon glyphicon-refresh"></i>\n										<div ng-show="noResults">\n											<i class="glyphicon glyphicon-remove"></i> No Results Found\n										</div>\n									</div>\n								</div>\n\n							</div>\n							<!-- END CANNED -->\n							<!-- START message -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.compose.body.$invalid && forms.compose.$submitted}" data-ng-if="SmsRoom.status !== \'CLOSED\'">\n								<div class="col-md-12">\n									<textarea id="text" class="form-control maxlength-handler" rows="8" maxlength="160" name="body" data-ng-model="form.body" ></textarea>\n									<button id="btnPost" type="button" class="btn btn-success pull-right" ng-class="{\'btn-warning\': form.body.length >= 120, \'btn-danger\': form.body.length >= 141 }">{{ 160 - form.body.length }}</button>\n									<span class="help-block"> Max 160 chars</span>\n									<span data-ng-show="forms.compose.body.$invalid && forms.compose.$submitted " class="help-block help-block-error">\n'+"										<strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n									</span>\n								</div>\n							</div>\n\n							<!-- END message -->\n						</div>\n					</form>\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n<!-- END TODO CONTENT -->\n"),a.put("app/channels/sms/inbox/sms/info.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body"  data-ng-init="initInfo()" style=" overflow-x: auto;">\n  <div class="form-group" ng-if="data">\n    <json-formatter json="data" open="1"></json-formatter>\n  </div>\n  <div class="note note-warning" data-ng-hide="data">\n    <p>\n      {{ \'MESSAGE_NO_INFO_AVAILABLE\' | translate }}\n    </p>\n  </div>\n\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/sms/inbox/sms/sms.html",'<div class="message">\n  <div class="row">\n    <div class="col-md-6">\n      <span class="bold">From: </span>\n      [<a href="" data-ng-click="openContact(smsMessage.from)">{{smsMessage.from}}</a>]\n      <br>\n      <span class="bold">To: </span>\n      [<a href="" data-ng-click="openContact(smsMessage.to)">{{smsMessage.to}}</a>]\n      <br>\n    </div>\n    <div class="col-md-6">\n      <span class="pull-right" data-ng-if="smsMessage.User">{{\'APPLICATION_SENT_BY\' | translate}}: <strong>{{smsMessage.User.fullname}}</strong></span>\n      <span class="pull-right" data-ng-if="smsMessage.source">{{\'APPLICATION_SENT_BY\' | translate}}: <strong>Cally &#178;</strong>\n        <a ng-click="info(smsMessage.source)"><i class="icon-info font-blue"></i>\n        </a>\n    </div>\n  </div>\n\n  <br>\n  <span class="todo-tasklist-date">\n    <span class="pull-right" data-ng-switch="smsMessage.status">\n      <a ng-switch-when="RECEIVED" href="#" class="btn default btn-xs inactive-link green-stripe"> {{smsMessage.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n      <a ng-switch-when="SENT" href="#" class="btn default btn-xs inactive-link green-stripe"> {{smsMessage.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n      <a ng-switch-when="DELIVERED" href="#" class="btn default btn-xs inactive-link green-stripe"> {{smsMessage.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n      <a ng-switch-when="SENDING" href="#" class="btn default btn-xs inactive-link blue-stripe" > {{smsMessage.status | uppercase}}\n        <i class="fa fa-warning"></i>\n      </a>\n      <a ng-switch-when="FAILED" href="#" class="btn default btn-xs red-stripe" data-ng-click="info(null,smsMessage.res_data)"> {{smsMessage.status | uppercase}}\n        <i class="fa fa-times"></i>\n      </a>\n      <a ng-switch-default href="#" class="btn default btn-xs"> {{smsMessage.status | uppercase}}\n      </a>\n      <br>\n      <!-- <a ng-href="https://www.twilio.com/docs/errors/{{smsMessage.errorcode}}" target="_blank" ng-if="(smsMessage.errorcode) && (accounttype==\'twilio\')">Error Code:{{smsMessage.errorcode}}</a>\n      <a ng-href="{{smsMessage.errorcode.length > 2 ? \'http://www.skebby.com/sms-api/sms-gateway/developers-docs/#receiveNotifySection\' : \'http://www.skebby.com/sms-api/sms-gateway/developers-docs/#errorCodesSection\'}}" target="_blank" ng-if="(smsMessage.errorcode != 1) && (smsMessage.errorcode) && (accounttype==\'skebby\')">Error Code:{{smsMessage.errorcode}}</a> -->\n    </span>\n\n    <i class="icon-calendar"></i> <span am-time-ago="smsMessage.updatedAt"></span>\n  </span>\n  <hr>\n  <span class="body text-left" data-ng-bind-html="smsMessage.body" style="white-space: pre-wrap;"></span>\n\n  </div>\n'),a.put("app/channels/sms/inbox/view/account/list/list.html",'<!-- BEGIN Portlet PORTLET-->\n<div class="portlet light" data-ng-init="initView()">\n	<div class="portlet-title">\n		<div class="caption">\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'NEW\'" uib-uncheckable>NEW</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'OPEN\'" uib-uncheckable>OPEN</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'PENDING\'" uib-uncheckable>PENDING</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'CLOSED\'" uib-uncheckable>CLOSED</button>\n			</div>\n		</div>\n		<div class="actions">\n			<a href="#" class="btn btn-icon-only default" data-ng-click="getPage();">\n				<i class="fa fa-refresh"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only red" data-ng-click="deleteItems();" data-ng-show="id.length && isAdmin">\n				<i class="fa fa-trash"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only btn-success" data-ng-click="disposeItems();" data-ng-show="id.length">\n				<i class="fa fa-upload"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only blue" data-ng-click="tagItems();" data-ng-show="id.length">\n				<i class="fa fa-tags"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only green" data-ng-click="openRoom(null, \'New Message\')">\n				<i class="fa fa-plus"></i>\n			</a>\n		</div>\n	</div>\n	<div class="portlet-title" data-ng-show="tags.length">\n		<!-- START TAGS -->\n		<div class="form-group">\n			<div class="row">\n				<div class="col-md-1">\n					<a href="#" class="btn btn-icon-only">\n						<i class="fa fa-tags" style="color: gray;"></i>\n					</a>\n				</div>\n				<div class="col-md-11">\n					<ui-select multiple data-ng-model="query.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)">\n						<ui-select-match placeholder="Search by tag...">{{$item}}</ui-select-match>\n						<ui-select-choices repeat="tag in tags | filter:$select.search">\n							{{tag}}\n						</ui-select-choices>\n					</ui-select>\n				</div>\n			</div>\n		</div>\n		<!-- END TAGS -->\n	</div>\n	<div class="portlet-body">\n		<!-- BEGIN UI-GRID SPINNER -->\n		<span us-spinner spinner-key="spinner-grid" spinner-start-active="false"></span>\n		<!-- END UI-GRID SPINNER -->\n\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-pagination ui-grid-selection ui-grid-exporter class="ui-grid">\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END Portlet PORTLET-->\n'),a.put("app/channels/sms/inbox/view/view.agents.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_AGENTS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TRANSPORT -->\n  <div class="form-group">\n    <form name="form" novalidate>\n      <!-- START TRANSPORT -->\n      <div class="form-group">\n        <ui-select multiple name="agents" data-ng-model="item.agents" theme="bootstrap">\n          <ui-select-match placeholder="{{\'APPLICATION_AGENTS\' | translate}}">{{$item.fullname}}</ui-select-match>\n          <ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n            {{agent.fullname}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n      <!-- END TRANSPORT -->\n    </form>\n  </div>\n  <!-- END TRANSPORT -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/sms/inbox/view/view.html",'<div class="row">\n  <div class="col-md-12">\n    <div class="page-bar">\n      <ul class="page-breadcrumb">\n        <li>\n          <i class="icon-rocket"></i>\n          <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="fa fa-spinner"></i>\n          <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="glyphicon glyphicon-comment"></i>\n          <a href="#">{{ \'APPLICATION_SMS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n					<i class="icon-note"></i>\n					<a href="/channels/sms/inbox/list">{{ \'APPLICATION_INBOX\' | translate }}</a>\n				</li>\n      </ul>\n    </div>\n  </div>\n</div>\n\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row inbox" data-ng-init="initView()">\n	<div class="col-md-3">\n		<ul class="inbox-nav margin-bottom-10">\n			<li data-ng-class="{active: $stateParams.id == smsAccount.id}" data-ng-repeat="smsAccount in smsAccounts">\n				<a href="/channels/sms/inbox/view/account/{{smsAccount.id}}/list" class="btn">\n					<i class="icon-notebook"></i> {{smsAccount.name}}\n				</a>\n        <b></b>\n			</li>\n		</ul>\n	</div>\n\n	<div class="col-md-9" >\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view>\n			<div class="note note-info">\n				<h4 class="block">Info! {{\'APPLICATION_NO_ACCOUNT_SELECTED\' | translate}}</h4>\n			</div>\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/inbox/view/view.status.modal.html",'<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title | translate" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p ng-if="modal.text && !closed" ng-bind="modal.text | translate"></p>\n  <form name="form" novalidate data-ng-init="initDisposition()">\n  <div class="form-group">\n    <ui-select data-ng-model="item.disposition" name="list" theme="bootstrap" data-ng-disabled="!dispositions.length" required>\n      <ui-select-match placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}">{{$select.selected.name}}</ui-select-match>\n      <ui-select-choices repeat="disposition.name as disposition in dispositions | filter: $select.search">\n        <div ng-bind-html="disposition.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n  <div class="note note-warning" data-ng-hide="dispositions.length">\n    <h4 class="block">Warning!</h4>\n    <p>\n      {{ \'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate }}\n    </p>\n  </div>\n</form>\n  <!-- <div ng-if="modal.html" ng-bind-html="modal.html"></div> -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n  <!-- <button ng-repeat="button in modal.buttons" ng-class="button.classes" ng-click="button.click($event)" ng-bind="button.text" class="btn"></button> -->\n</div>\n'),
-a.put("app/channels/sms/inbox/view/view.tags.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_TAGS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TRANSPORT -->\n  <div class="form-group">\n    <form name="form" novalidate>\n      <!-- START TAGS -->\n      <div class="form-group">\n        <ui-select multiple data-ng-model="item.tags" theme="bootstrap">\n          <ui-select-match placeholder="{{\'APPLICATION_TAGS\' | translate}}">{{$item}}</ui-select-match>\n          <ui-select-choices repeat="tag in tags | filter: $select.search">\n            {{tag}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n      <!-- END TAGS -->\n    </form>\n  </div>\n  <!-- END TRANSPORT -->\n</div>\n<div class="modal-footer">\n  <button type="button" class="btn" data-ng-class="button.class" data-ng-click="button.click()"data-ng-repeat="button in modal.buttons">{{button.text | translate}}</button>\n  <!-- <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button> -->\n</div>\n'),a.put("app/channels/sms/inbox/view/view.templates.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_TEMPLATES\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <div class="note note-info" data-ng-show="!templates.length">\n    <h4 class="block">Info!</h4>\n    <p>\n      {{\'MESSAGE_NO_TEMPLATES_AVAILABLE\' | translate}}\n    </p>\n  </div>\n  <form name="form" data-ng-show="templates.length" novalidate>\n    <div class="form-group">\n      <ui-select data-ng-model="item.template" theme="bootstrap">\n        <ui-select-match placeholder="Select a template in the list or search his name...">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="template in templates | propsFilter: {name: $select.search}">\n          <div ng-bind-html="template.name | highlight: $select.search"></div>\n          <small data-ng-show="template.description">\n            {{\'APPLICATION_DESCRIPTION\' | translate}}: {{template.description}}\n          </small>\n        </ui-select-choices>\n      </ui-select>\n    </div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="templates.length">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/sms/queue/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required />\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START STRATEGY -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.strategy.$touched || form.$submitted) && form.strategy.$invalid}">\n      <label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.strategy" name="strategy" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.toUpperCase()}}</ui-select-match>\n        <ui-select-choices repeat="strategy in strategies | filter: $select.search">\n          <div ng-bind-html="strategy.toUpperCase() | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.strategy.$touched || form.$submitted) && form.strategy.$invalid && form.strategy.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END STRATEGY -->\n\n    <!-- START TIMEOUT -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.timeout.$touched || form.$submitted) && form.timeout.$invalid}">\n      <label class="control-label">{{\'APPLICATION_AGENT_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="number" min="0" name="timeout" placeholder="Timeout" class="form-control" data-ng-model="item.timeout" required min="1"/>\n      <span data-ng-show="(form.timeout.$touched || form.$submitted) && form.timeout.$invalid && form.timeout.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TIMEOUT -->\n\n    <!-- START AGENTS-->\n    <div class="form-body" data-ng-init="getTeams()">\n      <label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n      <div class="input-group input-small mbottom20">\n        <input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="item.penalty" readonly>\n        <div class="spinner-buttons input-group-btn btn-group-vertical">\n          <button type="button" class="btn spinner-up btn-xs blue" data-ng-click="item.penalty=item.penalty+1">\n            <i class="fa fa-angle-up"></i>\n          </button>\n          <button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!item.penalty" data-ng-click="item.penalty=item.penalty-1">\n            <i class="fa fa-angle-down"></i>\n          </button>\n        </div>\n      </div>\n      <div class="form-group last">\n        <div class="col-md-12" id="multi-select-team">\n        </div>\n      </div>\n    </div>\n    <!-- END AGENTS-->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/sms/queue/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="glyphicon glyphicon-comment"></i>\n						<a href="#">{{ \'APPLICATION_SMS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-docs"></i>\n						<a href="#">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_QUEUES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="#" data-ng-click="createItem()" data-ng-if="Auth.isAdmin()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_QUEUE\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n						<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/queue/view/view.agents.html",'<div class="row" data-ng-init="getTeams()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="note note-warning" data-ng-hide="teams.length">\n				<h4 class="block">Warning!</h4>\n				<p>\n					 {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\n				</p>\n			</div>\n			<div class="portlet-body">\n				<!-- BEGIN FORM-->\n				<form action="index.html" class="form-horizontal form-row-seperated">\n					<div class="form-body">\n						<label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n						<div class="input-group input-small mbottom20">\n							<input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="queue.penalty" readonly>\n							<div class="spinner-buttons input-group-btn btn-group-vertical">\n								<button type="button" class="btn spinner-up btn-xs blue" data-ng-click="queue.penalty=queue.penalty+1">\n									<i class="fa fa-angle-up"></i>\n								</button>\n								<button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!queue.penalty" data-ng-click="queue.penalty=queue.penalty-1">\n									<i class="fa fa-angle-down"></i>\n								</button>\n							</div>\n						</div>\n						<div class="form-group last">\n							<div class="col-md-12" id="multi-select-team">\n							</div>\n						</div>\n					</div>\n				</form>\n				<!-- END FORM-->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/sms/queue/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getQueue()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="glyphicon glyphicon-comment"></i>\n					<a href="#">{{ \'APPLICATION_SMS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/channels/sms/queues/list">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					<i data-ng-show="queue" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="queue">\n					<a href="#">{{queue.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/queue.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{queue.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n					{{user.role}}\n				</div> -->\n			</div>\n			<!-- END SIDEBAR USER TITLE -->\n\n			<!-- SIDEBAR MENU -->\n			<div class="profile-usermenu">\n				<ul class="nav">\n					<li data-ng-class="{active: $state.is(\'main.channels.sms.queues.view.settings\')}">\n						<a data-ng-href="/channels/sms/queues/view/{{queue.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.channels.sms.queues.view.agents\')}" data-ng-show="Auth.getCurrentUser().role === \'admin\'">\n							<a data-ng-href="/channels/sms/queues/view/{{queue.id}}/agents">\n								<i class="icon-people"></i>\n								{{ \'APPLICATION_AGENTS\' | translate}} </a>\n							</li>\n						</ul>\n					</div>\n					<!-- END MENU -->\n				</div>\n				<!-- END PORTLET main.channels -->\n			</div>\n			<!-- END BEGIN PROFILE SIDEBAR -->\n			<!-- BEGIN PROFILE CONTENT -->\n			<div ui-view class="profile-content">\n			</div>\n			<!-- END PROFILE CONTENT -->\n		</div>\n	</div>\n	<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/queue/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.general" data-ng-submit="forms.general.$valid && updateSmsQueue()" novalidate>\n					<!-- START NAME -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="queue.name" data-ng-pattern="settings.patternName" required />\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.pattern" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n						</span>\n					</div>\n					<!-- END NAME -->\n\n					<!-- START STRATEGY -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.strategy.$touched || forms.general.$submitted) && forms.general.strategy.$invalid}">\n						<label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}</label>\n						<ui-select data-ng-model="queue.strategy" name="strategy" theme="bootstrap">\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n							<ui-select-choices repeat="strategy in strategies | filter: $select.search">\n								<div ng-bind-html="strategy | uppercase | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n					</div>\n					<!-- END STRATEGY -->\n\n					<!-- START TIMEOUT -->\n					<div class="form-group">\n						<label class="control-label">Timeout</label>\n						<input type="number" name="timeout" placeholder="Timeout" class="form-control" min="1" data-ng-model="queue.timeout"/>\n					</div>\n					<!-- END TIMEOUT -->\n\n					<!-- START DESCRIPTION -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n						<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="queue.description"/>\n					</div>\n					<!-- END DESCRIPTION -->\n\n					<input data-ng-if="Auth.isAdmin()" class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/sms/realtime/view/agent/agent.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-tree-view ui-grid-expandable-row ui-grid-pagination ui-grid-auto-resize>\n			<span us-spinner spinner-key="grid-spinner" spinner-start-active="true"></span>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/realtime/view/agent/agent.modal.info.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INTERFACE_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<div data-ng-if="agent.ipaddr" class="well">\n  <div>{{agent.ipaddr}}:{{agent.port}}</div>\n  <div>{{agent.fullcontact}}</div>\n  <div>{{agent.useragent}}</div>\n  <div>{{agent.lastms}}</div>\n</div>\n<div data-ng-if="!agent.ipaddr" class="alert alert-danger" role="alert">\n  {{\'MESSAGE_NO_AVAILABLE_INFO\' | translate}}\n</div>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/sms/realtime/view/agent/queue.modal.add.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_JOIN_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <div class="form-group row">\n  <label class="col-md-2 control-label" style="margin-top: 7px;">{{\'APPLICATION_QUEUE\' | translate}}:</label>\n  <div class="col-md-10">\n    <ui-select multiple ng-model="item.queues" theme="bootstrap" required>\n      <ui-select-match placeholder="{{\'APPLICATION_QUEUE\' | translate}}">{{$item.name}}</ui-select-match>\n      <ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n        <div ng-bind-html="queue.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n</div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/sms/realtime/view/application/application.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initApplications()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns class="ui-grid" ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/realtime/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-directions"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="glyphicon glyphicon-comment"></i>\n					<a href="#">{{ \'APPLICATION_SMS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-energy"></i>\n					<a href="#">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<div>\n			<nav class="navbar navbar-default" role="navigation">\n				<div class="collapse navbar-collapse">\n					<ul class="nav navbar-nav">\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.sms.realtime.view.agents\')}">\n							<a href="/channels/sms/realtime/view/agents">\n								{{\'APPLICATION_AGENTS\' | translate}}\n							</a>\n						</li>\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.sms.realtime.view.applications\')}">\n							<a href="/channels/sms/realtime/view/applications">\n								{{\'APPLICATION_APPLICATIONS\' | translate}}\n							</a>\n						</li>\n					</ul>\n				</div>\n			</nav>\n		</div>\n\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/realtime/view/view.queue.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div id="grid1" ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-tree-view class="grid">\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/chanspy/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CHANSPY\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START PREFIX -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.prefix.$touched || form.$submitted) && form.prefix.$invalid}">\n      <label class="control-label">{{\'APPLICATION_PREFIX\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="prefix" placeholder="{{\'APPLICATION_PREFIX\' | translate}}" class="form-control" data-ng-model="item.prefix" required/>\n      <span data-ng-show="(form.prefix.$touched || form.$submitted) && form.prefix.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END PREFIX -->\n\n    <!-- START OPTIONS -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.options.$touched || form.$submitted) && form.options.$invalid}">\n      <label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select multiple data-ng-model="item.options" name="options" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item.value}}: {{$item.name | translate}}</ui-select-match>\n        <ui-select-choices repeat="option.value as option in options | filter: $select.search">\n          <div ng-bind-html="option.value + \': \' + (option.name | translate) | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.options.$touched || form.$submitted) && form.options.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END OPTIONS -->\n\n    <!-- START AUTH -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_AUTH\' | translate}}</label></br>\n      <input\n      bs-switch\n      class="form-control"\n      ng-model="item.auth"\n      type="checkbox"\n      name="auth"\n      data-ng-init="item.auth = 0"\n      switch-active="{{ recordSwitch.isActive }}"\n      switch-on-text="{{ recordSwitch.onText }}"\n      switch-off-text="{{ recordSwitch.offText }}"\n      switch-on-color="{{ recordSwitch.onColor }}"\n      switch-off-color="{{ recordSwitch.offColor }}"\n      switch-animate="{{ recordSwitch.animate }}"\n      switch-size="{{ recordSwitch.size }}"\n      switch-label="{{ recordSwitch.label }}"\n      switch-icon="{{ recordSwitch.icon }}"\n      switch-radio-off="{{ recordSwitch.radioOff }}"\n      switch-label-width="{{ recordSwitch.labelWidth }}"\n      switch-handle-width="{{ recordSwitch.handleWidth }}">\n    </div>\n    <!-- END AUTH -->\n\n    <!-- START PASSWORD -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.password.$touched || form.$submitted) && form.password.$invalid}">\n      <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span data-ng-show="item.auth" class="required" aria-required="true">*</span></label>\n      <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" data-ng-disabled="!item.auth" data-ng-required="item.auth"/>\n      <span data-ng-show="(form.password.$touched || form.$submitted) && form.password.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END PASSWORD -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/voice/chanspy/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-user-secret"></i>\n					<a href="/channels/voice/chanspys/list">{{ \'APPLICATION_CHANSPY\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="fa fa-user-secret font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_CHANSPY\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CHANSPY\' | translate }}\n						</button>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/chanspy/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getChanSpy()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-user-secret"></i>\n					<a href="/channels/voice/chanspy/list">{{ \'APPLICATION_CHANSPY\' | translate }}</a>\n					<i data-ng-show="chanspy" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="chanspy">\n					<a href="#">{{chanspy.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/chanspy.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{chanspy.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.chanspy.view.settings\')}">\n							<a data-ng-href="/channels/voice/chanspy/view/{{chanspy.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/channels/voice/chanspy/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_CHANSPY\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateChanSpy()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="chanspy.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START PREFIX -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.general.prefix.$touched || form.general.$submitted) && form.general.prefix.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PREFIX\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="prefix" placeholder="{{\'APPLICATION_PREFIX\' | translate}}" class="form-control" data-ng-model="chanspy.prefix" required/>\n								<span data-ng-show="(form.general.prefix.$touched || form.general.$submitted) && form.general.prefix.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PREFIX -->\n\n							<!-- START OPTIONS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.general.options.$touched || form.general.$submitted) && form.general.options.$invalid}">\n								<label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select multiple data-ng-model="chanspy.options" name="options" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item.value}}: {{$item.name | translate}}</ui-select-match>\n									<ui-select-choices repeat="option.value as option in options | filter: $select.search">\n										<div ng-bind-html="option.value + \': \' + (option.name | translate) | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(form.general.options.$touched || form.general.$submitted) && form.general.options.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END OPTIONS -->\n\n							<!-- START AUTH -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_AUTH\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="chanspy.auth"\n								type="checkbox"\n								name="auth"\n								switch-active="{{ recordSwitch.isActive }}"\n								switch-on-text="{{ recordSwitch.onText }}"\n								switch-off-text="{{ recordSwitch.offText }}"\n								switch-on-color="{{ recordSwitch.onColor }}"\n								switch-off-color="{{ recordSwitch.offColor }}"\n								switch-animate="{{ recordSwitch.animate }}"\n								switch-size="{{ recordSwitch.size }}"\n								switch-label="{{ recordSwitch.label }}"\n								switch-icon="{{ recordSwitch.icon }}"\n								switch-radio-off="{{ recordSwitch.radioOff }}"\n								switch-label-width="{{ recordSwitch.labelWidth }}"\n								switch-handle-width="{{ recordSwitch.handleWidth }}">\n							</div>\n							<!-- END AUTH -->\n\n							<!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.general.password.$touched || form.general.$submitted) && form.general.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" data-ng-show="chanspy.auth" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="chanspy.password" data-ng-disabled="!chanspy.auth" data-ng-required="chanspy.auth"/>\n								<span data-ng-show="(form.general.password.$touched || form.general.$submitted) && form.general.password.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="chanspy.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/voice/context/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CONTEXT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/voice/context/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="#">{{ \'APPLICATION_CONTEXTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_CONTEXTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="#" data-ng-click="createItem()">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONTEXT\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/context/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getContext()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/channels/voice/contexts/list">{{ \'APPLICATION_CONTEXTS\' | translate }}</a>\n					<i data-ng-show="context" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="context">\n					<a href="#">{{context.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/context.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{context.name}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.contexts.view.settings\')}">\n							<a data-ng-href="/channels/voice/contexts/view/{{context.id}}/settings">\n								<i class="icon-settings"></i>\n								{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n							</li>\n						</ul>\n					</div>\n					<!-- END MENU -->\n				</div>\n				<!-- END PORTLET main.channels -->\n			</div>\n			<!-- END BEGIN PROFILE SIDEBAR -->\n			<!-- BEGIN PROFILE CONTENT -->\n			<div ui-view class="profile-content">\n			</div>\n			<!-- END PROFILE CONTENT -->\n		</div>\n	</div>\n	<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/context/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_CONTEXT\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateVoiceContext()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="context.name" required readonly/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_CANT_EDIT_NAME\' | translate }}\n								</span>\n								<span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="context.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/voice/disposition/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-target"></i>\n					<a href="/channels/voice/dispositions/list">{{ \'APPLICATION_DISPOSITIONS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_DISPOSITIONS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<a href="#" class="btn btn-icon-only green" data-ng-click="addDisposition();">\n						<i class="fa fa-plus"></i>\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<div class="row" data-ng-hide="dispositions.length">\n						<div class="col-md-12">\n							<div class="note note-info">\n								<h4 class="block">Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}</h4>\n							</div>\n						</div>\n					</div>\n\n					<!-- GENERAL TAB -->\n					<div class="row" data-ng-repeat="disposition in dispositions">\n						<div class="col-md-12 form-group">\n							<div class="input-group">\n								<div>\n									<input class="form-control" type="text" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" data-ng-model="disposition.name">\n								</div>\n								<span class="input-group-btn">\n									<button class="btn btn-success" type="button" data-ng-click="updateDisposition(disposition.id, disposition.name);"><i class="fa fa-cloud-upload fa-fw"></i> {{\'APPLICATION_UPDATE\' | translate}}</button>\n									<button class="btn btn-danger" type="button" data-ng-click="deleteDisposition(disposition.id);"><i class="fa fa-times fa-fw"></i> {{\'APPLICATION_DELETE\' | translate}}</button>\n								</span>\n							</div>\n						</div>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/disposition/list/modal/add.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_DISPOSITIONS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.form.$touched || form.$submitted) && form.form.$invalid}">\n      <div class="">\n        <input type="text" name="form" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" class="form-control" data-ng-model="name" required/>\n        <span data-ng-show="form.form.$touched && form.form.$error.required" class="help-block help-block-error">\n          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n        </span>\n      </div>\n    </div>\n    <!-- END NAME -->\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="form.$valid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/voice/moh/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_MOH_CLASS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/voice/moh/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-music-tone"></i>\n					<a href="#">{{ \'APPLICATION_MOHS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-music-tone font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_MOHS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="#" data-ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_MOH_CLASS\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/moh/view/view.addFiles.html",'\n<div class="row" data-ng-init="getSounds()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_MOH\' | translate }} {{ \'APPLICATION_ADD_FILES\' | translate }}</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<div class="note note-warning" data-ng-hide="soundList.length">\n					<h4 class="block">Warning!</h4>\n					<p>\n						 {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n					</p>\n					<p>\n						{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/sounds/list">{{\'APPLICATION_SOUNDS\' | translate}}</a>\n					</p>\n				</div>\n            <form name="forms.general" data-ng-submit="(item.sounds.length > 0) && addMohs()" data-ng-show="soundList.length" novalidate>\n\n              <!-- START SOUNDS -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.sounds.$touched || forms.general.$submitted) && item.sounds.length == 0}">\n                <label class="control-label">{{\'APPLICATION_SOUNDS\' | translate}}<span class="required" aria-required="true">*</span></label>\n                <ui-select multiple data-ng-model="item.sounds" theme="bootstrap" name="sounds" required>\n                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item.display_name}}</ui-select-match>\n                  <ui-select-choices repeat="sound.id as sound in soundList | filter: $select.search">\n                    {{sound.display_name}}\n                  </ui-select-choices>\n                </ui-select>\n                <span data-ng-show="(forms.general.sounds.$touched || forms.general.$submitted) && item.sounds.length == 0" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END OPTIONS -->\n\n							<input type="submit" class="btn green-haze" value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</form>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/moh/view/view.audios.html",'<div ui-view class="profile-content">\n<div class="row" data-ng-init="getAudioFiles()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title  tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AUDIOS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="audioFiles">\n						<a class="btn green-jungle " href="/channels/voice/mohs/view/{{moh.id}}/add" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_ADD_FILES\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<div class="note note-warning" data-ng-hide="audioFiles">\n					<h4 class="block">Warning!</h4>\n					<p>\n						 {{ \'MESSAGE_FOLDER_DOES_NOT_EXIST\' | translate }}\n					</p>\n				</div>\n				<!-- START TABLE -->\n				<table class="table table-striped table-bordered table-hover" data-ng-show="audioFiles">\n					  <thead>\n						  <tr>\n						    <th>{{ \'APPLICATION_NAME\' | translate }}</th>\n								<th width="30%">{{ \'APPLICATION_PREVIEW\' | translate }}</th>\n								<th width="10%">{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n						  </tr>\n					  </thead>\n					  <tbody data-ng-model="audioFiles">\n					    <tr data-ng-repeat="audiofile in audioFiles">\n								<td>{{audiofile}}</td>\n								<td>\n									<audio controls ng-src="{{getSecureSrc(audioSources[audiofile])}}" preload="none">\n				            Your browser does not support the audio tag.\n				          </audio></td>\n					      <td>\n					        <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(audiofile,audiofile)">\n										{{ \'APPLICATION_DELETE\' | translate }}\n					        </a>\n					      </td>\n					    </tr>\n							<tr data-ng-hide="audioFiles.length">\n								<td colspan="3" style="text-align:center;">\n									<i>{{ \'MESSAGE_NO_AUDIOFILES_AVAILABLE\' | translate }}</i>\n								</td>\n							</tr>\n					  </tbody>\n				</table>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/channels/voice/moh/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getMoh()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-music-tone"></i>\n					<a href="/channels/voice/mohs/list">{{ \'APPLICATION_MOH_CLASS\' | translate }}</a>\n					<i data-ng-show="moh" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="moh">\n					<a href="#">{{moh.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/moh.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{moh.name}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.mohs.view.settings\')}">\n							<a data-ng-href="/channels/voice/mohs/view/{{moh.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.mohs.view.audios\') || $state.is(\'main.channels.voice.mohs.view.add\')}">\n							<a data-ng-href="/channels/voice/mohs/view/{{moh.id}}/audios">\n							<i class="icon-list"></i>\n							{{ \'APPLICATION_AUDIOS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET main.channels -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/moh/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_MOH_CLASS\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body" data-ng-init="getContexts();">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateVoiceMoh()" novalidate>\n\n	            <!-- START PATH -->\n	            <div class="form-group" >\n	              <label class="control-label">{{\'APPLICATION_PATH\' | translate}}</label>\n	              <input type="text" name="path" class="form-control" data-ng-model="moh.directory" disabled/>\n	            </div>\n	            <!-- END PATH -->\n\n	            <!-- START SORT -->\n	            <div class="form-group" data-ng-class="{\'has-error\': (forms.general.sort.$touched || forms.general.$submitted) && forms.general.sort.$invalid}">\n	              <label class="control-label">{{\'APPLICATION_SORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n	              <ui-select data-ng-model="moh.sort" theme="bootstrap" name="sort" required>\n	                <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$translate.instant($select.selected.name)}}</ui-select-match>\n	                <ui-select-choices repeat="sort.value as sort in sortOptions | filter: $select.search">\n	                  {{$translate.instant(sort.name)}}\n	                </ui-select-choices>\n	              </ui-select>\n	              <span data-ng-show="(forms.general.sort.$touched || forms.general.$submitted) && forms.general.sort.$error.required" class="help-block help-block-error">\n	                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n	              </span>\n	            </div>\n	            <!-- END SORT -->\n\n	            <!-- START DESCRIPTION -->\n				      <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.description.$invalid}">\n				        <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n				        <textarea type="text" name="description" class="form-control" data-ng-model="moh.description"/></textarea>\n								<span data-ng-show="forms.general.$submitted && forms.general.description.$invalid" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				        </span>\n				      </div>\n				      <!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
-a.put("app/channels/voice/queue/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.queue.name.$touched || form.queue.$submitted) && form.queue.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required />\n      <span data-ng-show="(form.queue.name.$touched || form.queue.$submitted) && form.queue.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.queue.name.$touched || form.queue.$submitted) && form.queue.name.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START STRATEGY -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.queue.strategy.$touched || form.queue.$submitted) && form.queue.strategy.$invalid}">\n      <label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.strategy" name="strategy" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.toUpperCase()}}</ui-select-match>\n        <ui-select-choices repeat="strategy in [\'ringall\', \'leastrecent\', \'fewestcalls\', \'random\', \'rrmemory\', \'linear\', \'wrandom\', \'rrordered\'] | filter: $select.search">\n          <div ng-bind-html="strategy.toUpperCase() | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span class="help-block">\n        {{ \'DESCRIPTION_QUEUE_STRATEGY\' | translate }}\n      </span>\n      <span data-ng-show="(form.queue.strategy.$touched || form.queue.$submitted) && form.queue.strategy.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END STRATEGY -->\n\n    <!-- START AGENTS-->\n    <div class="form-body" data-ng-init="getTeams()">\n      <label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n      <div class="input-group input-small mbottom20">\n        <input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="item.penalty" readonly>\n        <div class="spinner-buttons input-group-btn btn-group-vertical">\n          <button type="button" class="btn spinner-up btn-xs blue" data-ng-click="item.penalty=item.penalty+1">\n            <i class="fa fa-angle-up"></i>\n          </button>\n          <button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!item.penalty" data-ng-click="item.penalty=item.penalty-1">\n            <i class="fa fa-angle-down"></i>\n          </button>\n        </div>\n      </div>\n      <div class="form-group last">\n        <div class="col-md-12" id="multi-select-team">\n        </div>\n      </div>\n    </div>\n    <!-- END AGENTS-->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/voice/queue/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="#">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_QUEUES\' | translate }}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="#" data-ng-click="createItem()" data-ng-if="Auth.isAdmin()">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_QUEUE\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/queue/view/view.agents.html",'<div class="row" data-ng-init="getTeams()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="note note-warning" data-ng-hide="teams.length">\n				<h4 class="block">Warning!</h4><p>{{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}</p>\n			</div>\n			<div class="portlet-body">\n				<!-- BEGIN FORM-->\n				<form action="index.html" class="form-horizontal form-row-seperated">\n					<div class="form-body">\n						<label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n						<div class="input-group input-small mbottom20">\n							<input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="queue.penalty" readonly>\n							<div class="spinner-buttons input-group-btn btn-group-vertical">\n								<button type="button" class="btn spinner-up btn-xs blue" data-ng-click="queue.penalty=queue.penalty+1">\n									<i class="fa fa-angle-up"></i>\n								</button>\n								<button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!queue.penalty" data-ng-click="queue.penalty=queue.penalty-1">\n									<i class="fa fa-angle-down"></i>\n								</button>\n							</div>\n						</div>\n						<div class="form-group last">\n							<div class="col-md-12" id="multi-select-team">\n							</div>\n						</div>\n					</div>\n				</form>\n				<!-- END FORM-->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/voice/queue/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getQueue()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/channels/voice/queues/list">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					<i data-ng-show="queue" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="queue">\n					<a href="#">{{queue.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/queue.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{queue.name}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.queues.view.settings\')}">\n							<a data-ng-href="/channels/voice/queues/view/{{queue.name}}/settings"> <i class="icon-settings"></i> {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.queues.view.agents\')}" data-ng-show="Auth.getCurrentUser().role === \'admin\'">\n							<a data-ng-href="/channels/voice/queues/view/{{queue.name}}/agents"><i class="icon-people"></i>{{ \'APPLICATION_AGENTS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET main.channels -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/queue/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_QUEUE_SETTINGS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_PERIODIC_ANNOUNCE\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_ADVANCED\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body" data-ng-init="getContexts();getMohs();getSounds();">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && forms.announce.$valid && updateVoiceQueue()" novalidate>\n							<div class="row">\n								<div class="col-md-6">\n							<!-- START STRATEGY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.strategy.$touched || forms.general.$submitted) && forms.general.strategy.$invalid}">\n								<label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="queue.strategy" name="strategy" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.toUpperCase()}}</ui-select-match>\n									<ui-select-choices repeat="strategy in [\'ringall\', \'leastrecent\', \'fewestcalls\', \'random\', \'rrmemory\', \'linear\', \'wrandom\', \'rrordered\'] | filter: $select.search">\n										<div ng-bind-html="strategy.toUpperCase() | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_STRATEGY\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.strategy.$touched || forms.general.$submitted) && forms.general.strategy.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n				      <!-- END STRATEGY -->\n\n							<!-- START MOH -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.musiconhold.$touched || forms.general.$submitted) && forms.general.musiconhold.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MOH\' | translate}}</label>\n								<ui-select data-ng-model="queue.musiconhold" name="musiconhold" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="musiconhold.name as musiconhold in voiceMohs | filter: $select.search">\n										<div ng-bind-html="musiconhold.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_VOICE_MOH\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.musiconhold.$touched || forms.general.$submitted) && forms.general.musiconhold.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MOH -->\n\n							<!-- START TIMEOUT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.timeout.$touched || forms.general.$submitted) && forms.general.timeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="queue.timeout" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_TIMEOUT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.timeout.$touched || forms.general.$submitted) && forms.general.timeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIMEOUT -->\n\n							<!-- START MAXLEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.maxlen.$touched || forms.general.$submitted) && forms.general.maxlen.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MAXLEN\' | translate}}</label>\n								<input type="number" min="0" name="maxlen" placeholder="{{\'APPLICATION_MAXLEN\' | translate}}" class="form-control" data-ng-model="queue.maxlen" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_MAXLEN\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.maxlen.$touched || forms.general.$submitted) && forms.general.maxlen.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MAXLEN -->\n\n							<!-- START RETRY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.retry.$touched || forms.general.$submitted) && forms.general.retry.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RETRY\' | translate}}</label>\n								<input type="number" min="0" name="retry" placeholder="{{\'APPLICATION_RETRY\' | translate}}" class="form-control" data-ng-model="queue.retry" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_RETRY\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.retry.$touched || forms.general.$submitted) && forms.general.retry.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END RETRY -->\n\n						</div>\n						<div class="col-md-6">\n							<!-- START WRAPUPTIME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.wrapuptime.$touched || forms.general.$submitted) && forms.general.wrapuptime.$invalid}">\n								<label class="control-label">{{\'APPLICATION_WRAPUPTIME\' | translate}}</label>\n								<input type="number" min="0" name="wrapuptime" placeholder="{{\'APPLICATION_WRAPUPTIME\' | translate}}" class="form-control" data-ng-model="queue.wrapuptime" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_WRAPUPTIME\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.wrapuptime.$touched || forms.general.$submitted) && forms.general.wrapuptime.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END WRAPUPTIME -->\n\n							<!-- START WEIGHT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.weight.$touched || forms.general.$submitted) && forms.general.weight.$invalid}">\n								<label class="control-label">{{\'APPLICATION_WEIGHT\' | translate}}</label>\n								<input type="number" min="0" name="weight" placeholder="{{\'APPLICATION_WEIGHT\' | translate}}" class="form-control" data-ng-model="queue.weight" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_WEIGHT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.weight.$touched || forms.general.$submitted) && forms.general.weight.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END WEIGHT -->\n\n							<!-- START JOINEMPTY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.joinempty.$touched || forms.general.$submitted) && forms.general.joinempty.$invalid}">\n								<label class="control-label">{{\'APPLICATION_JOINEMPTY\' | translate}}</label>\n								<ui-select multiple data-ng-model="queue.joinempty" name="joinempty" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n									<ui-select-choices repeat="item in [\'yes\',\'no\',\'strict\',\'loose\',\'paused\',\'penalty\',\'inuse\',\'ringing\',\'unavailable\',\'invalid\',\'unknown\',\'wrapup\'] | filter: $select.search">\n										<div ng-bind-html="item | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_JOINEMPTY\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.joinempty.$touched || forms.general.$submitted) && forms.general.joinempty.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END JOINEMPTY -->\n\n							<!-- START LEAVEWHENEMPTY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.leavewhenempty.$touched || forms.general.$submitted) && forms.general.leavewhenempty.$invalid}">\n								<label class="control-label">{{\'APPLICATION_LEAVEWHENEMPTY\' | translate}}</label>\n								<ui-select multiple data-ng-model="queue.leavewhenempty" name="leavewhenempty" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n									<ui-select-choices repeat="item in [\'yes\',\'no\',\'strict\',\'loose\',\'paused\',\'penalty\',\'inuse\',\'ringing\',\'unavailable\',\'invalid\',\'unknown\',\'wrapup\'] | filter: $select.search">\n										<div ng-bind-html="item | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_LEAVEWHENEMPTY\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.leavewhenempty.$touched || forms.general.$submitted) && forms.general.leavewhenempty.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END LEAVEWHENEMPTY -->\n\n							<!-- START ANNOUNCE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.announce.$touched || forms.general.$submitted) && forms.general.announce.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ANNOUNCE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="queue.announce" name="announce" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n									<ui-select-choices repeat="announce.path as announce in sounds | filter: $select.search">\n										<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_ANNOUNCE\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.announce.$touched || forms.general.$submitted) && forms.general.announce.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ANNOUNCE -->\n						</div>\n					</div>\n					<!-- START DESCRIPTION -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n						<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="queue.description"></textarea>\n					</div>\n					<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.announce" data-ng-submit="forms.announce.$valid && forms.general.$valid && updateVoiceQueue()" novalidate>\n							<div class="row">\n								<div class="col-md-12">\n							<!-- START PERIODIC_ANNOUNCE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.periodic_announce.$touched || forms.announce.$submitted) && forms.announce.periodic_announce.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PERIODIC_ANNOUNCE\' | translate}}</label>\n								<ui-select multiple data-ng-model="queue.periodic_announce" name="periodic_announce" theme="bootstrap" data-ng-disabled="!periodicAnnounces.length">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item.display_name}}</ui-select-match>\n									<ui-select-choices repeat="announce.path as announce in periodicAnnounces | filter: $select.search track by $index">\n										<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<div class="note note-warning" data-ng-hide="periodicAnnounces.length">\n									<h4 class="block">Warning!</h4>\n									<p>\n										{{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n									</p>\n									<p>\n										{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/sounds/list">{{\'APPLICATION_SOUNDS\' | translate}}</a>\n									</p>\n								</div>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_PERIODIC_ANNOUNCE\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.periodic_announce.$touched || forms.announce.$submitted) && forms.announce.periodic_announce.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PERIODIC_ANNOUNCE -->\n						</div>\n					</div>\n							<div class="row">\n								<div class="col-md-6">\n							<p><h3>{{\'APPLICATION_SETTINGS\' | translate}}</h3></p>\n							<!-- START ANNOUNCE_FREQUENCY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.announce_frequency.$touched || forms.announce.$submitted) && forms.announce.announce_frequency.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ANNOUNCE_FREQUENCY\' | translate}}</label>\n								<input type="number" min="0" name="announce_frequency" placeholder="{{\'APPLICATION_ANNOUNCE_FREQUENCY\' | translate}}" class="form-control" data-ng-model="queue.announce_frequency" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_ANNOUNCE_FREQUENCY\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.announce_frequency.$touched || forms.announce.$submitted) && forms.announce.announce_frequency.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ANNOUNCE_FREQUENCY -->\n\n							<!-- START MIN_ANNOUNCE_FREQUENCY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.min_announce_frequency.$touched || forms.announce.$submitted) && forms.announce.min_announce_frequency.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MIN_ANNOUNCE_FREQUENCY\' | translate}}</label>\n								<input type="number" min="0" name="min_announce_frequency" placeholder="{{\'APPLICATION_MIN_ANNOUNCE_FREQUENCY\' | translate}}" class="form-control" data-ng-model="queue.min_announce_frequency" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_MIN_ANNOUNCE_FREQUENCY\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.min_announce_frequency.$touched || forms.announce.$submitted) && forms.announce.min_announce_frequency.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MIN_ANNOUNCE_FREQUENCY -->\n\n							<!-- START PERIODIC_ANNOUNCE_FREQUENCY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.periodic_announce_frequency.$touched || forms.announce.$submitted) && forms.announce.periodic_announce_frequency.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PERIODIC_ANNOUNCE_FREQUENCY\' | translate}}</label>\n								<input type="number" min="0" name="periodic_announce_frequency" placeholder="{{\'APPLICATION_PERIODIC_ANNOUNCE_FREQUENCY\' | translate}}" class="form-control" data-ng-model="queue.periodic_announce_frequency"/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_PERIODIC_ANNOUNCE_FREQUENCY\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.periodic_announce_frequency.$touched || forms.announce.$submitted) && forms.announce.periodic_announce_frequency.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PERIODIC_ANNOUNCE_FREQUENCY -->\n\n							<!-- START RANDOM_PERIODIC_ANNOUNCE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.random_periodic_announce.$touched || forms.announce.$submitted) && forms.announce.random_periodic_announce.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RANDOM_PERIODIC_ANNOUNCE\' | translate}}</label>\n								<ui-select data-ng-model="queue.random_periodic_announce" name="random_periodic_announce" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n										<div ng-bind-html="item | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_RANDOM_PERIODIC_ANNOUNCE\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.random_periodic_announce.$touched || forms.announce.$submitted) && forms.announce.random_periodic_announce.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END RANDOM_PERIODIC_ANNOUNCE -->\n\n							<!-- START ANNOUNCE_HOLDTIME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.announce_holdtime.$touched || forms.announce.$submitted) && forms.announce.announce_holdtime.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ANNOUNCE_HOLDTIME\' | translate}}</label>\n								<ui-select data-ng-model="queue.announce_holdtime" name="announce_holdtime" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="item in [\'yes\',\'no\',\'once\'] | filter: $select.search">\n										<div ng-bind-html="item | highlight: $select.search"></div>\n									</ui-select-choices>\n									</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_ANNOUNCE_HOLDTIME\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.announce_holdtime.$touched || forms.announce.$submitted) && forms.announce.announce_holdtime.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ANNOUNCE_HOLDTIME -->\n\n							<!-- START ANNOUNCE_POSITION -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.announce_position.$touched || forms.announce.$submitted) && forms.announce.announce_position.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ANNOUNCE_POSITION\' | translate}}</label>\n								<ui-select data-ng-model="queue.announce_position" name="announce_position" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="item in [\'yes\',\'no\',\'limit\',\'more\'] | filter: $select.search">\n										<div ng-bind-html="item | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_ANNOUNCE_POSITION\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.announce_position.$touched || forms.announce.$submitted) && forms.announce.announce_position.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ANNOUNCE_POSITION -->\n\n							<!-- START ANNOUNCE_POSITION_LIMIT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.announce_position_limit.$touched || forms.announce.$submitted) && forms.announce.announce_position_limit.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ANNOUNCE_POSITION_LIMIT\' | translate}}</label>\n								<input type="number" min="0" name="announce_position_limit" placeholder="{{\'APPLICATION_ANNOUNCE_POSITION_LIMIT\' | translate}}" class="form-control" data-ng-model="queue.announce_position_limit"/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_ANNOUNCE_POSITION_LIMIT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.announce_position_limit.$touched || forms.announce.$submitted) && forms.announce.announce_position_limit.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ANNOUNCE_POSITION_LIMIT -->\n\n							<!-- START REPORTHOLDTIME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.reportholdtime.$touched || forms.announce.$submitted) && forms.announce.reportholdtime.$invalid}">\n								<label class="control-label">{{\'APPLICATION_REPORTHOLDTIME\' | translate}}</label>\n								<ui-select data-ng-model="queue.reportholdtime" name="reportholdtime" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n										<div ng-bind-html="item | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_REPORTHOLDTIME\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.reportholdtime.$touched || forms.announce.$submitted) && forms.announce.reportholdtime.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END REPORTHOLDTIME -->\n\n						</div>\n							<div class="col-md-6">\n								<p><h3>{{\'APPLICATION_SOUNDS\' | translate}}</h3></p>\n								<!-- START QUEUE_REPORTHOLD -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.queue_reporthold.$touched || forms.announce.$submitted) && forms.announce.queue_reporthold.$invalid}">\n									<label class="control-label">{{\'APPLICATION_QUEUE_REPORTHOLD\' | translate}}</label>\n									<ui-select data-ng-model="queue.queue_reporthold" name="queue_reporthold" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n										<ui-select-choices repeat="announce.path as announce in queueAnnounces | filter: $select.search">\n											<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span class="help-block">\n										{{ \'DESCRIPTION_QUEUE_REPORTHOLD\' | translate }}\n									</span>\n									<span data-ng-show="(forms.announce.queue_reporthold.$touched || forms.announce.$submitted) && forms.announce.queue_reporthold.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END QUEUE_REPORTHOLD -->\n\n								<!-- START QUEUE_YOUARENEXT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.queue_youarenext.$touched || forms.announce.$submitted) && forms.announce.queue_youarenext.$invalid}">\n									<label class="control-label">{{\'APPLICATION_QUEUE_YOUARENEXT\' | translate}}</label>\n									<ui-select data-ng-model="queue.queue_youarenext" name="queue_youarenext" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n										<ui-select-choices repeat="announce.path as announce in queueAnnounces | filter: $select.search">\n											<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span class="help-block">\n										{{ \'DESCRIPTION_QUEUE_YOUARENEXT\' | translate }}\n									</span>\n									<span data-ng-show="(forms.announce.queue_youarenext.$touched || forms.announce.$submitted) && forms.announce.queue_youarenext.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END QUEUE_YOUARENEXT -->\n\n							<!-- START QUEUE_THEREARE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.queue_thereare.$touched || forms.announce.$submitted) && forms.announce.queue_thereare.$invalid}">\n								<label class="control-label">{{\'APPLICATION_QUEUE_THEREARE\' | translate}}</label>\n								<ui-select data-ng-model="queue.queue_thereare" name="queue_thereare" theme="bootstrap" >\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n									<ui-select-choices repeat="announce.path as announce in queueAnnounces | filter: $select.search">\n										<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_THEREARE\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.queue_thereare.$touched || forms.announce.$submitted) && forms.announce.queue_thereare.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END QUEUE_THEREARE -->\n\n							<!-- START QUEUE_CALLSWAITING -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.queue_callswaiting.$touched || forms.announce.$submitted) && forms.announce.queue_callswaiting.$invalid}">\n								<label class="control-label">{{\'APPLICATION_QUEUE_CALLSWAITING\' | translate}}</label>\n								<ui-select data-ng-model="queue.queue_callswaiting" name="queue_callswaiting" theme="bootstrap" >\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n									<ui-select-choices repeat="announce.path as announce in queueAnnounces | filter: $select.search">\n										<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_CALLSWAITING\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.queue_callswaiting.$touched || forms.announce.$submitted) && forms.announce.queue_callswaiting.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END QUEUE_CALLSWAITING -->\n\n							<!-- START QUEUE_HOLDTIME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.queue_holdtime.$touched || forms.announce.$submitted) && forms.announce.queue_holdtime.$invalid}">\n								<label class="control-label">{{\'APPLICATION_QUEUE_HOLDTIME\' | translate}}</label>\n								<ui-select data-ng-model="queue.queue_holdtime" name="queue_holdtime" theme="bootstrap" >\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n									<ui-select-choices repeat="announce.path as announce in queueAnnounces | filter: $select.search">\n										<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_HOLDTIME\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.queue_holdtime.$touched || forms.announce.$submitted) && forms.announce.queue_holdtime.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END QUEUE_HOLDTIME -->\n\n							<!-- START QUEUE_MINUTES -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.queue_minutes.$touched || forms.announce.$submitted) && forms.announce.queue_minutes.$invalid}">\n								<label class="control-label">{{\'APPLICATION_QUEUE_MINUTES\' | translate}}</label>\n								<ui-select data-ng-model="queue.queue_minutes" name="queue_minutes" theme="bootstrap" >\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n									<ui-select-choices repeat="announce.path as announce in queueAnnounces | filter: $select.search">\n										<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_MINUTES\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.queue_minutes.$touched || forms.announce.$submitted) && forms.announce.queue_minutes.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END QUEUE_MINUTES -->\n\n							<!-- START QUEUE_MINUTE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.queue_minute.$touched || forms.announce.$submitted) && forms.announce.queue_minute.$invalid}">\n								<label class="control-label">{{\'APPLICATION_QUEUE_MINUTE\' | translate}}</label>\n								<ui-select data-ng-model="queue.queue_minute" name="queue_minute" theme="bootstrap" >\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n									<ui-select-choices repeat="announce.path as announce in queueAnnounces | filter: $select.search">\n										<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_MINUTE\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.queue_minute.$touched || forms.announce.$submitted) && forms.announce.queue_minute.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END QUEUE_MINUTE -->\n\n							<!-- START QUEUE_SECONDS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.queue_seconds.$touched || forms.announce.$submitted) && forms.announce.queue_seconds.$invalid}">\n								<label class="control-label">{{\'APPLICATION_QUEUE_SECONDS\' | translate}}</label>\n								<ui-select data-ng-model="queue.queue_seconds" name="queue_seconds" theme="bootstrap" >\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n									<ui-select-choices repeat="announce.path as announce in queueAnnounces | filter: $select.search">\n										<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_SECONDS\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.queue_seconds.$touched || forms.announce.$submitted) && forms.announce.queue_seconds.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END QUEUE_SECONDS -->\n\n							<!-- START QUEUE_THANKYOU -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.queue_thankyou.$touched || forms.announce.$submitted) && forms.announce.queue_thankyou.$invalid}">\n								<label class="control-label">{{\'APPLICATION_QUEUE_THANKYOU\' | translate}}</label>\n								<ui-select data-ng-model="queue.queue_thankyou" name="QUEUE_THANKYOU" theme="bootstrap" >\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n									<ui-select-choices repeat="announce.path as announce in queueAnnounces | filter: $select.search">\n										<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_THANKYOU\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.queue_thankyou.$touched || forms.announce.$submitted) && forms.announce.queue_thankyou.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END QUEUE_THANKYOU -->\n\n						</div>\n					</div>\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n					<!-- ADVANCED TAB -->\n					<div class="tab-pane" id="tab_1_3">\n						<form name="forms.advanced" data-ng-submit="forms.announce.$valid && forms.general.$valid && forms.advanced.$valid && updateVoiceQueue()" novalidate>\n\n							<div class="row">\n								<div class="col-md-6">\n\n							<!-- START AUTOPAUSE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.autopause.$touched || forms.advanced.$submitted) && forms.advanced.autopause.$invalid}">\n								<label class="control-label">{{\'APPLICATION_AUTOPAUSE\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="queue.autopause"\n								type="checkbox"\n								switch-active="{{ recordSwitch.isActive }}"\n								switch-on-text="{{ recordSwitch.onText }}"\n								switch-off-text="{{ recordSwitch.offText }}"\n								switch-on-color="{{ recordSwitch.onColor }}"\n								switch-off-color="{{ recordSwitch.offColor }}"\n								switch-animate="{{ recordSwitch.animate }}"\n								switch-size="{{ recordSwitch.size }}"\n								switch-label="{{ recordSwitch.label }}"\n								switch-icon="{{ recordSwitch.icon }}"\n								switch-radio-off="{{ recordSwitch.radioOff }}"\n								switch-label-width="{{ recordSwitch.labelWidth }}"\n								switch-handle-width="{{ recordSwitch.handleWidth }}"\n								ng-true-value="\'all\'"\n								ng-false-value="\'no\'">\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_AUTOPAUSE\' | translate }}\n								</span>\n								<span data-ng-show="(forms.advanced.autopause.$touched || forms.advanced.$submitted) && forms.advanced.autopause.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END AUTOPAUSE -->\n\n							<!-- START RINGINUSE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.ringinuse.$touched || forms.advanced.$submitted) && forms.advanced.ringinuse.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RINGINUSE\' | translate}}</label>\n								<ui-select data-ng-model="queue.ringinuse" name="ringinuse" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n										<div ng-bind-html="item | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_RINGINUSE\' | translate }}\n								</span>\n								<span data-ng-show="(forms.advanced.ringinuse.$touched || forms.advanced.$submitted) && forms.advanced.ringinuse.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END RINGINUSE -->\n\n							<!-- START MEMBER_DELAY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.memberdelay.$touched || forms.advanced.$submitted) && forms.advanced.memberdelay.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MEMBER_DELAY\' | translate}}</label>\n								<input type="number" min="0" name="memberdelay" placeholder="{{\'APPLICATION_MEMBER_DELAY\' | translate}}" class="form-control" data-ng-model="queue.memberdelay" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_MEMBER_DELAY\' | translate }}\n								</span>\n								<span data-ng-show="(forms.advanced.memberdelay.$touched || forms.advanced.$submitted) && forms.advanced.memberdelay.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MEMBER_DELAY -->\n\n							<!-- START ACW -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.acw.$touched || forms.advanced.$submitted) && forms.advanced.acw.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ACW\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="queue.acw"\n								type="checkbox"\n								switch-active="{{ recordSwitch.isActive }}"\n								switch-on-text="{{ recordSwitch.onText }}"\n								switch-off-text="{{ recordSwitch.offText }}"\n								switch-on-color="{{ recordSwitch.onColor }}"\n								switch-off-color="{{ recordSwitch.offColor }}"\n								switch-animate="{{ recordSwitch.animate }}"\n								switch-size="{{ recordSwitch.size }}"\n								switch-label="{{ recordSwitch.label }}"\n								switch-icon="{{ recordSwitch.icon }}"\n								switch-radio-off="{{ recordSwitch.radioOff }}"\n								switch-label-width="{{ recordSwitch.labelWidth }}"\n								switch-handle-width="{{ recordSwitch.handleWidth }}">\n								<span class="help-block">\n									{{ \'DESCRIPTION_ACW\' | translate }}\n								</span>\n								<span data-ng-show="(forms.advanced.acw.$touched || forms.advanced.$submitted) && forms.advanced.acw.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_ACW\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ACW -->\n\n							<!-- START SETINTERFACEVAR -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.setinterfacevar.$touched || forms.advanced.$submitted) && forms.advanced.setinterfacevar.$invalid}">\n								<label class="control-label">{{\'APPLICATION_SETINTERFACEVAR\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="queue.setinterfacevar"\n								type="checkbox"\n								switch-active="{{ recordSwitch.isActive }}"\n								switch-on-text="{{ recordSwitch.onText }}"\n								switch-off-text="{{ recordSwitch.offText }}"\n								switch-on-color="{{ recordSwitch.onColor }}"\n								switch-off-color="{{ recordSwitch.offColor }}"\n								switch-animate="{{ recordSwitch.animate }}"\n								switch-size="{{ recordSwitch.size }}"\n								switch-label="{{ recordSwitch.label }}"\n								switch-icon="{{ recordSwitch.icon }}"\n								switch-radio-off="{{ recordSwitch.radioOff }}"\n								switch-label-width="{{ recordSwitch.labelWidth }}"\n								switch-handle-width="{{ recordSwitch.handleWidth }}">\n								<span class="help-block">\n									{{ \'DESCRIPTION_SETINTERFACEVAR\' | translate }} <a href="https://wiki.xcallymotion.com/display/XMD/Queues+-+Voice+Channel" target="_blank">wiki</a>)\n								</span>\n								<span data-ng-show="(forms.advanced.setinterfacevar.$touched || forms.advanced.$submitted) && forms.advanced.setinterfacevar.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_SETINTERFACEVAR\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END SETINTERFACEVAR -->\n\n							<!-- START SETQUEUEVAR -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.setqueuevar.$touched || forms.advanced.$submitted) && forms.advanced.setqueuevar.$invalid}">\n								<label class="control-label">{{\'APPLICATION_SETQUEUEVAR\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="queue.setqueuevar"\n								type="checkbox"\n								switch-active="{{ recordSwitch.isActive }}"\n								switch-on-text="{{ recordSwitch.onText }}"\n								switch-off-text="{{ recordSwitch.offText }}"\n								switch-on-color="{{ recordSwitch.onColor }}"\n								switch-off-color="{{ recordSwitch.offColor }}"\n								switch-animate="{{ recordSwitch.animate }}"\n								switch-size="{{ recordSwitch.size }}"\n								switch-label="{{ recordSwitch.label }}"\n								switch-icon="{{ recordSwitch.icon }}"\n								switch-radio-off="{{ recordSwitch.radioOff }}"\n								switch-label-width="{{ recordSwitch.labelWidth }}"\n								switch-handle-width="{{ recordSwitch.handleWidth }}">\n								<span class="help-block">\n									{{ \'DESCRIPTION_SETQUEUEVAR\' | translate }} <a href="https://wiki.xcallymotion.com/display/XMD/Queues+-+Voice+Channel" target="_blank">wiki</a>)\n								</span>\n								<span data-ng-show="(forms.advanced.setqueuevar.$touched || forms.advanced.$submitted) && forms.advanced.setqueuevar.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_SETQUEUEVAR\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END SETQUEUEVAR -->\n\n						</div>\n							<div class="col-md-6">\n\n							<!-- START TIMEOUTRESTART -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.timeoutrestart.$touched || forms.advanced.$submitted) && forms.advanced.timeoutrestart.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIMEOUTRESTART\' | translate}}</label>\n								<ui-select data-ng-model="queue.timeoutrestart" name="timeoutrestart" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n										<div ng-bind-html="item | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_TIMEOUTRESTART\' | translate }}\n								</span>\n								<span data-ng-show="(forms.advanced.timeoutrestart.$touched || forms.advanced.$submitted) && forms.advanced.timeoutrestart.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIMEOUTRESTART -->\n\n							<!-- START MONITOR_FORMAT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.monitor_format.$touched || forms.advanced.$submitted) && forms.advanced.monitor_format.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MONITOR_FORMAT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="queue.monitor_format" name="monitor_format" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="monFormat.value as monFormat in monitorFormats | filter: $select.search">\n										<div ng-bind-html="monFormat.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_MONITOR_FORMAT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.advanced.monitor_format.$touched || forms.advanced.$submitted) && forms.advanced.monitor_format.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MONITOR_FORMAT -->\n\n							<!-- START CONTEXT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.context.$touched || forms.advanced.$submitted) && forms.advanced.context.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}</label>\n								<ui-select data-ng-model="queue.context" name="context" theme="bootstrap">\n									<ui-select-match allow-clear placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="context.name as context in voiceContexts | filter: $select.search">\n										<div ng-bind-html="context.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_VOICE_CONTEXT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.advanced.context.$touched || forms.advanced.$submitted) && forms.advanced.context.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONTEXT -->\n\n							<!-- START ACW_TIMEOUT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.acwTimeout.$touched || forms.advanced.$submitted) && forms.advanced.acwTimeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ACW_TIMEOUT\' | translate}}</label>\n								<input type="number" min="0" name="acwTimeout" placeholder="{{\'APPLICATION_ACW_TIMEOUT\' | translate}}" class="form-control" data-ng-model="queue.acwTimeout" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_ACW_TIMEOUT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.advanced.acwTimeout.$touched || forms.advanced.$submitted) && forms.advanced.acwTimeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ACW_TIMEOUT -->\n\n							<!-- START SETQUEUEENTRYVAR -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.setqueueentryvar.$touched || forms.advanced.$submitted) && forms.advanced.setqueueentryvar.$invalid}">\n								<label class="control-label">{{\'APPLICATION_SETQUEUEENTRYVAR\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="queue.setqueueentryvar"\n								type="checkbox"\n								switch-active="{{ recordSwitch.isActive }}"\n								switch-on-text="{{ recordSwitch.onText }}"\n								switch-off-text="{{ recordSwitch.offText }}"\n								switch-on-color="{{ recordSwitch.onColor }}"\n								switch-off-color="{{ recordSwitch.offColor }}"\n								switch-animate="{{ recordSwitch.animate }}"\n								switch-size="{{ recordSwitch.size }}"\n								switch-label="{{ recordSwitch.label }}"\n								switch-icon="{{ recordSwitch.icon }}"\n								switch-radio-off="{{ recordSwitch.radioOff }}"\n								switch-label-width="{{ recordSwitch.labelWidth }}"\n								switch-handle-width="{{ recordSwitch.handleWidth }}">\n								<span class="help-block">\n									{{ \'DESCRIPTION_SETQUEUEENTRYVAR\' | translate }} <a href="https://wiki.xcallymotion.com/display/XMD/Queues+-+Voice+Channel" target="_blank">wiki</a>)\n								</span>\n								<span data-ng-show="(forms.advanced.setqueueentryvar.$touched || forms.advanced.$submitted) && forms.advanced.setqueueentryvar.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_SETQUEUEENTRYVAR\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END SETQUEUEENTRYVAR -->\n\n						</div>\n					</div>\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
-a.put("app/channels/voice/realtime/view/abandoned/abandoned.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAbandoned()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns  class="ui-grid" ui-grid-pagination ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/realtime/view/agent/agent.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-tree-view ui-grid-expandable-row ui-grid-pagination ui-grid-auto-resize>\n			<span us-spinner spinner-key="grid-spinner" spinner-start-active="true"></span>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/realtime/view/agent/agent.modal.info.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_SIP_CLIENT_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<div data-ng-if="agent.ipaddr" class="well">\n  <div>{{agent.ipaddr}}:{{agent.port}}</div>\n  <div>{{agent.fullcontact}}</div>\n  <div>{{agent.useragent}}</div>\n  <div>{{agent.lastms}}</div>\n</div>\n<div data-ng-if="!agent.ipaddr" class="alert alert-danger" role="alert">\n  {{\'MESSAGE_NO_AVAILABLE_INFO\' | translate}}\n</div>\n<!-- hidden random uiselect, needed to recompile the modal every time and show the content -->\n<ui-select multiple class="hide" ng-model="item.queues" theme="bootstrap" required>\n  <ui-select-match placeholder="{{\'APPLICATION_QUEUE\' | translate}}">{{$item.name}}</ui-select-match>\n  <ui-select-choices repeat="queue.name as queue in queues | filter: $select.search">\n    <div ng-bind-html="queue.name | highlight: $select.search"></div>\n  </ui-select-choices>\n</ui-select>\n<!--  -->\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/voice/realtime/view/agent/queue.modal.add.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_JOIN_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <div class="form-group row">\n  <label class="col-md-2 control-label" style="margin-top: 7px;">{{\'APPLICATION_QUEUE\' | translate}}:</label>\n  <div class="col-md-10">\n    <ui-select multiple ng-model="item.queues" theme="bootstrap" required>\n      <ui-select-match placeholder="{{\'APPLICATION_QUEUE\' | translate}}">{{$item.name}}</ui-select-match>\n      <ui-select-choices repeat="queue.name as queue in queues | filter: $select.search">\n        <div ng-bind-html="queue.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n</div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/voice/realtime/view/outbound/outbound.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initDials()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns class="ui-grid" ui-grid-auto-resize ui-grid-pagination>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/realtime/view/parameter/parameter.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initParameters()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-tree-view ui-grid-expandable-row ui-grid-pagination ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/realtime/view/queue/queue.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initQueues()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-tree-view ui-grid-expandable-row ui-grid-pagination ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/realtime/view/queuecalls/queuecalls.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initQueues()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns class="ui-grid" ui-grid-auto-resize ui-grid-pagination>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/realtime/view/telephone/telephone.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initTelephones()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns  class="ui-grid" ui-grid-pagination ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/realtime/view/telephone/telephone.modal.info.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INTERFACE_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<div data-ng-if="telephone.ipaddr" class="well">\n  <div>{{telephone.ipaddr}}:{{telephone.port}}</div>\n  <div>{{telephone.fullcontact}}</div>\n  <div>{{telephone.useragent}}</div>\n  <div>{{telephone.lastms}}</div>\n</div>\n<div data-ng-if="!telephone.ipaddr" class="alert alert-danger" role="alert">\n  {{\'MESSAGE_NO_AVAILABLE_INFO\' | translate}}\n</div>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/voice/realtime/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-directions"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-energy"></i>\n					<a href="/channels/voice/realtime/view/agents">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<div>\n		    <nav class="navbar navbar-default" role="navigation">\n					<div class="collapse navbar-collapse">\n						<ul class="nav navbar-nav">\n							<li data-ng-class="{\'active\': $state.is(\'main.channels.voice.realtime.view.agents\')}">\n								<a href="/channels/voice/realtime/view/agents">\n									{{\'APPLICATION_AGENTS\' | translate}}\n								</a>\n							</li>\n							<li data-ng-class="{\'active\': $state.is(\'main.channels.voice.realtime.view.telephones\')}" data-ng-show="Auth.isAdmin()">\n								<a href="/channels/voice/realtime/view/telephones">\n									{{\'APPLICATION_TELEPHONES\' | translate}}\n								</a>\n							</li>\n							<li data-ng-class="{\'active\': $state.is(\'main.channels.voice.realtime.view.queues\')}">\n								<a href="/channels/voice/realtime/view/queues">\n									{{\'APPLICATION_QUEUES\' | translate}}\n								</a>\n							</li>\n							<li data-ng-class="{\'active\': $state.is(\'main.channels.voice.realtime.view.queuecalls\')}">\n								<a href="/channels/voice/realtime/view/queuecalls">\n									{{\'APPLICATION_QUEUE_CALLS\' | translate}}\n								</a>\n							</li>\n							<li data-ng-class="{\'active\': $state.is(\'main.channels.voice.realtime.view.parameters\')}">\n								<a href="/channels/voice/realtime/view/parameters">\n									{{\'APPLICATION_QUEUE_PARAMETERS\' | translate}}\n								</a>\n							</li>\n							<li data-ng-class="{\'active\': $state.is(\'main.channels.voice.realtime.view.abandoned\')}">\n								<a href="/channels/voice/realtime/view/abandoned">\n									{{\'APPLICATION_QUEUE_ABANDONED\' | translate}}\n								</a>\n							</li>\n							<li data-ng-class="{\'active\': $state.is(\'main.channels.voice.realtime.view.outbound\')}">\n								<a href="/channels/voice/realtime/view/outbound">\n									{{\'APPLICATION_OUTBOUND_CALLS\' | translate}}\n								</a>\n							</li>\n						</ul>\n					</div>\n		    </nav>\n		</div>\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/recording/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-play"></i>\n					<a href="#">{{ \'APPLICATION_RECORDINGS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="fa fa-play font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_RECORDINGS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/route/inbound/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_ROUTE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.extension" novalidate>\n\n    <!-- START EXTEN -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.extension.exten.$touched || forms.extension.$submitted) && forms.extension.exten.$invalid || existRoute}">\n      <label class="control-label">{{\'APPLICATION_PHONE_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="exten" placeholder="{{\'APPLICATION_PHONE_NUMBER\' | translate}}" class="form-control" data-ng-model="item.exten" data-ng-pattern="settings.patternName" required/>\n      <span data-ng-show="(forms.extension.exten.$touched || forms.extension.$submitted) && forms.extension.exten.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END EXTEN -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.extension.$invalid || existRoute">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n<!-- <pre>\n  {{item | json}}\n</pre> -->\n'),a.put("app/channels/voice/route/inbound/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-call-in"></i>\n					<a href="/channels/voice/routes/inbound/list">{{ \'APPLICATION_INBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-users font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_INBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle " href="#" data-ng-click="create()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ROUTE\' | translate }}\n						</a>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter class="ui-grid" ui-grid-draggable-rows>\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/route/inbound/view/view.applications.html",'<div ui-view class="profile-content">\n<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title  tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACTIONS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="selectedRows.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle " href="/channels/voice/routes/inbound/view/{{route.id}}/application" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_APPLICATION\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div data-ng-if="showGrid" ui-grid="gridOptions"  ui-grid-resize-columns class="grid" ui-grid-selection ui-grid-draggable-rows ui-grid-auto-resize>\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/channels/voice/route/inbound/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getRoute()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-reload"></i>\n					<a href="/channels/voice/routes/inbound/list">{{ \'APPLICATION_INBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }}</a>\n					<i data-ng-show="route" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="route">\n					<a href="#">{{route.exten}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/inboundroute.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{route.exten}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.routes.inbound.view.settings\')}">\n							<a data-ng-click="deselectAndRedirect(\'/channels/voice/routes/inbound/view/\'+route.id+\'/settings\')">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n'+"						<li data-ng-class=\"{active: $state.is('main.channels.voice.routes.inbound.view.applications') || $state.is('main.channels.voice.routes.inbound.view.application') || $state.is('main.channels.voice.routes.inbound.view.applications.settings')}\">\n							<a data-ng-click=\"deselectAndRedirect('/channels/voice/routes/inbound/view/'+route.id+'/applications')\">\n							<i class=\"icon-list\"></i>\n							{{ 'APPLICATION_ACTIONS' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class=\"profile-content\">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n"),a.put("app/channels/voice/route/inbound/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_INBOUND\' | translate}} {{ \'APPLICATION_ROUTE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body" data-ng-init="getContexts()">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateRoute()" novalidate>\n\n							<!-- START EXTEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.exten.$touched || forms.general.$submitted) && forms.general.exten.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PHONE_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="exten" placeholder="{{\'APPLICATION_PHONE_NUMBER\' | translate}}" class="form-control" data-ng-model="route.exten" required/>\n								<span data-ng-show="(forms.general.exten.$touched || forms.general.$submitted) && forms.general.exten.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END EXTEN -->\n\n							<!-- START CONTEXT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="route.context" name="context" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="context.name as context in voiceContexts | filter: $select.search">\n										<div ng-bind-html="context.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONTEXT -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="route.description"/></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/voice/route/internal/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_ROUTE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.extension" novalidate>\n\n    <!-- START EXTEN -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.extension.exten.$touched || forms.extension.$submitted) && forms.extension.exten.$invalid || existRoute}">\n      <label class="control-label">{{\'APPLICATION_PHONE_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="exten" placeholder="{{\'APPLICATION_PHONE_NUMBER\' | translate}}" class="form-control" data-ng-model="item.exten" data-ng-pattern="settings.patternName" required/>\n      <span data-ng-show="(forms.extension.exten.$touched || forms.extension.$submitted) && forms.extension.exten.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END EXTEN -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.extension.$invalid || existRoute">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n<!-- <pre>\n  {{item | json}}\n</pre> -->\n'),a.put("app/channels/voice/route/internal/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-reload"></i>\n					<a href="/voice/routes/internal/list">{{ \'APPLICATION_INTERNAL\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-users font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_INTERNAL\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle " href="#" data-ng-click="create()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ROUTE\' | translate }}\n						</a>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter class="ui-grid" ui-grid-draggable-rows>\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/route/internal/view/view.applications.html",'<div ui-view class="profile-content">\n<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title  tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACTIONS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="selectedRows.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle " href="/channels/voice/routes/internal/view/{{route.id}}/application" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_APPLICATION\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div data-ng-if="showGrid" ui-grid="gridOptions"  ui-grid-resize-columns class="grid" ui-grid-selection ui-grid-draggable-rows ui-grid-auto-resize>\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/channels/voice/route/internal/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getRoute()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-reload"></i>\n					<a href="/channels/voice/routes/internal/list">{{ \'APPLICATION_INTERNAL\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }}</a>\n					<i data-ng-show="route" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="route">\n					<a href="#">{{route.exten}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/internalroute.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{route.exten}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.routes.internal.view.settings\')}">\n							<a data-ng-click="deselectAndRedirect(\'/channels/voice/routes/internal/view/\'+route.id+\'/settings\')">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n'+"						<li data-ng-class=\"{active: $state.is('main.channels.voice.routes.internal.view.applications') || $state.is('main.channels.voice.routes.internal.view.application') || $state.is('main.channels.voice.routes.internal.view.applications.settings')}\">\n							<a data-ng-click=\"deselectAndRedirect('/channels/voice/routes/internal/view/'+route.id+'/applications')\">\n							<i class=\"icon-list\"></i>\n							{{ 'APPLICATION_ACTIONS' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class=\"profile-content\">\n		</div>\n		<!-- <pre>\n			{{route | json}}\n		</pre> -->\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n"),
-a.put("app/channels/voice/route/internal/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_INTERNAL\' | translate}} {{ \'APPLICATION_ROUTE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body" data-ng-init="getContexts()">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateRoute()" novalidate>\n\n							<!-- START EXTEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.exten.$touched || forms.general.$submitted) && forms.general.exten.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PHONE_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="exten" placeholder="{{\'APPLICATION_PHONE_NUMBER\' | translate}}" class="form-control" data-ng-model="route.exten" required/>\n								<span data-ng-show="(forms.general.exten.$touched || forms.general.$submitted) && forms.general.exten.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END EXTEN -->\n\n							<!-- START CONTEXT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="route.context" name="context" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="context.name as context in voiceContexts | filter: $select.search">\n										<div ng-bind-html="context.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONTEXT -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="route.description"/></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/voice/route/outbound/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_ROUTE\' | translate }}</h3>\n</div>\n<div class="modal-body" data-ng-init="getTags()">\n  <form name="forms.extension" novalidate>\n\n    <!-- START EXTEN -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.extension.exten.$touched || forms.extension.$submitted) && forms.extension.exten.$invalid || existRoute}">\n      <label class="control-label">{{\'APPLICATION_DESTINATION_PATTERN\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="exten" placeholder="{{\'APPLICATION_DESTINATION_PATTERN\' | translate}}" class="form-control" data-ng-model="item.exten" data-ng-pattern="settings.patternName" required/>\n      <span data-ng-show="(forms.extension.exten.$touched || forms.extension.$submitted) && forms.extension.exten.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END EXTEN -->\n\n    <!-- START TAG -->\n    <div class="form-group"  data-ng-class="{\'has-error\': (forms.extension.tag.$touched || forms.extension.$submitted) && forms.extension.tag.$invalid}">\n      <label class="control-label">{{ \'APPLICATION_TAG\' | translate }}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.tag" name="tag" theme="bootstrap" required>\n        <ui-select-match placeholder="{{ \'APPLICATION_TAG\' | translate }}" data-ng-init="item.tag = \'--\'">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="tag.name as tag in tags | filter: $select.search">\n          <div ng-bind-html="tag.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(forms.extension.tag.$touched || forms.extension.$submitted) && forms.extension.tag.$invalid && forms.extension.tag.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TAG -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.extension.$invalid || existRoute">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n<!-- <pre>\n  {{item | json}}\n</pre> -->\n'),a.put("app/channels/voice/route/outbound/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-call-out"></i>\n					<a href="/channels/voice/routes/outbound/list">{{ \'APPLICATION_OUTBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-users font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_OUTBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle " href="#" data-ng-click="create()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ROUTE\' | translate }}\n						</a>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter class="ui-grid" ui-grid-draggable-rows>\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/route/outbound/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getRoute()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-call-out"></i>\n					<a href="/channels/voice/routes/outbound/list">{{ \'APPLICATION_OUTBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }}</a>\n					<i data-ng-show="route" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="route">\n					<a href="#">{{route.exten}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/outboundroute.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{route.exten}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.routes.outbound.view.settings\')}">\n							<a data-ng-click="deselectAndRedirect(\'/channels/voice/routes/outbound/view/\'+route.id+\'/settings\')">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n'+"						<li data-ng-class=\"{active: $state.is('main.channels.voice.routes.outbound.view.routes') || $state.is('main.channels.voice.routes.outbound.view.route') || $state.is('main.channels.voice.routes.outbound.view.routes.settings')}\">\n							<a data-ng-click=\"deselectAndRedirect('/channels/voice/routes/outbound/view/'+route.id+'/routes')\">\n							<i class=\"icon-list\"></i>\n							{{ 'APPLICATION_ACTIONS' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class=\"profile-content\">\n		</div>\n		<!-- <pre>\n			{{route | json}}\n		</pre> -->\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n"),a.put("app/channels/voice/route/outbound/view/view.route.html",'<div class="row" data-ng-init="initApplication(true);getIntervals();">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_NEW_ROUTE\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<div class="profile-usertitle-name">\n					{{(main.app.name | translate) || \'Application\'}}\n				</div>\n				<wizard on-finish="addApplication()">\n	        <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="formValidation(forms.info.$valid)">\n							<form name="forms.info" novalidate>\n								<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n								<!-- START APP -->\n								<div class="form-group"  data-ng-class="{\'has-error\': (forms.info.app.$touched || forms.info.$submitted) && forms.info.app.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="main.app" name="app" theme="bootstrap" required>\n										<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n										<ui-select-choices repeat="app in applications | filter: $select.search">\n											<div ng-bind-html="app.name | translate | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.info.app.$touched || forms.info.$submitted) && forms.info.app.$invalid && forms.info.app.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END APP -->\n								<div id="Dial" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && main.app.type == \'outboundDial\'" lazy-render duration="1">\n								<!-- START TRUNK -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.info.trunk.$touched || forms.info.$submitted) && forms.info.trunk.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TRUNK\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" name="trunk" theme="bootstrap" required data-ng-disabled="!items.length">\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="trunk.name as trunk in items | filter: $select.search">\n											<div ng-bind-html="trunk.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="items.length">\n										<h4 class="block">Warning!</h4>\n										<p>\n											{{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n										</p>\n										<p>\n											{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/trunks/list">{{\'APPLICATION_TRUNKS\' | translate}}</a>\n										</p>\n									</div>\n									<span data-ng-show="(forms.info.trunk.$touched || forms.info.$submitted) && forms.info.trunk.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TRUNK -->\n\n								<!-- START CALLERID -->\n								<div class="form-group"  data-ng-class="{\'has-error\': (forms.info.callerID.$touched || forms.info.$submitted) && forms.info.callerID.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_CALLERID\' | translate }}</label>\n									<input type="text" name="callerID" pattern=\'^"[a-zA-Z0-9_.-]*" <[a-zA-Z0-9_.-]*>\' placeholder=\'"name" <number>\' class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n										<span class="help-block">\n											{{ \'DESCRIPTION_OUTBOUND_CALLERID\' | translate }}\n										</span>\n									<span data-ng-show="(forms.info.callerID.$touched || forms.info.$submitted) && forms.info.callerID.$invalid" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END CALLERID -->\n\n								<!-- START PREFIX -->\n								<div class="form-group"  data-ng-class="{\'has-error\': (forms.info.prefix.$touched || forms.info.$submitted) && forms.info.prefix.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_PREFIX\' | translate }}</label>\n									<input type="text" name="prefix"  placeholder="{{ \'APPLICATION_PREFIX\' | translate }}" class="form-control" data-ng-model="application.appdata[2]" data-ng-init="application.appdata[2] = null">\n										<span class="help-block">\n											{{ \'DESCRIPTION_OUTBOUND_PREFIX\' | translate }}\n										</span>\n										<span data-ng-show="(forms.info.prefix.$touched || forms.info.$submitted) && forms.info.prefix.$invalid" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END PREFIX -->\n\n									<!-- START TIMEOUT -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n										<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n										<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="application.appdata[3]" data-ng-init="application.appdata[3] = null">\n										<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END TIMEOUT -->\n\n									<!-- START OPTIONS -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n										<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n										<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="application.appdata[4]" data-ng-init="application.appdata[4] = null">\n										<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END OPTIONS -->\n\n									<!-- START URL -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n										<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n										<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[5]" data-ng-init="application.appdata[5] = null">\n										<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END URL -->\n\n								</div>\n							<div id="Custom" class="app-settings" ng-slide-down="main.app.type == \'custom\'" lazy-render duration="1">\n\n								<!-- START CUSTOMAPP -->\n								<div class="form-group"  data-ng-class="{\'has-error\': (forms.info.customApp.$touched || forms.info.$submitted) && forms.info.customApp.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_CUSTOM_APP\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<input type="text" name="customApp" placeholder="{{ \'APPLICATION_CUSTOM_APP\' | translate }}" class="form-control" data-ng-model="application.app" data-ng-init="application.appdata[0] = null" required>\n									<span data-ng-show="(forms.info.customApp.$touched || forms.info.$submitted) && forms.info.customApp.$invalid && forms.info.customApp.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END CUSTOMAPP -->\n\n								<!-- START APPDATA -->\n								<div class="form-group"  data-ng-class="{\'has-error\': (forms.info.appdata.$touched || forms.info.$submitted) && forms.info.appdata.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_ARGUMENTS\' | translate }}</label>\n									<input type="text" name="appdata" placeholder="{{ \'APPLICATION_ARGUMENTS\' | translate }}" class="form-control" data-ng-model="application.appdata[0]" data-ng-init="application.appdata[1] = null">\n									<span data-ng-show="(forms.info.appdata.$touched || forms.info.$submitted) && forms.info.appdata.$invalid && forms.info.appdata.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END APPDATA -->\n							</div>\n							<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n							</form>\n							</wz-step>\n								<wz-step title="{{\'APPLICATION_INTERVAL\' | translate}}" canexit="formValidation(forms.interval.IntervalId.$valid || forms.interval.hasOwnProperty(\'t_from\') || forms.interval.intType.$modelValue === \'always\')">\n									<form name="forms.interval" novalidate>\n										<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n										<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n									<!-- START INTERVAL_TYPE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$invalid}">\n									<label class="control-label">{{\'APPLICATION_INTERVAL_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="interval.intType" theme="bootstrap" name="intType" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n										<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n											{{$translate.instant(intType.name)}}\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERVAL_TYPE -->\n								<div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'custom\'" lazy-render duration="1">\n										<!-- START TIME -->\n										<div class="form-group">\n											<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n											<div class="input-group input-large">\n												<fieldset class="pull-left" ng-disabled="interval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="interval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n												<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n												<fieldset ng-disabled="interval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="interval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n												<label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="interval.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label>\n											</div>\n										</div>\n										<!-- END TIME -->\n\n										<!-- START WEEKDAY -->\n										<div class="form-group">\n											<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n											<div class="input-group input-large">\n												<ui-select data-ng-model="interval.wd_from" theme="bootstrap" name="wd_from">\n													<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n													<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n														{{weekDay.name | translate}}\n													</ui-select-choices>\n												</ui-select>\n												<span class="input-group-addon">to</span>\n												<ui-select data-ng-model="interval.wd_to" theme="bootstrap" name="wd_to">\n													<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n													<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n														{{weekDay.name | translate}}\n													</ui-select-choices>\n												</ui-select>\n											</div>\n										</div>\n										<!-- END WEEKDAY -->\n\n										<!-- START MONTHDAY -->\n										<div class="form-group">\n											<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n											<div class="input-group input-large">\n												<ui-select data-ng-model="interval.md_from" theme="bootstrap" name="md_from">\n													<ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n													<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n														{{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n													</ui-select-choices>\n												</ui-select>\n												<span class="input-group-addon">to</span>\n												<ui-select data-ng-model="interval.md_to" theme="bootstrap" name="md_to">\n													<ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n													<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n														{{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n													</ui-select-choices>\n												</ui-select>\n											</div>\n										</div>\n										<!-- END MONTHDAY -->\n\n										<!-- START MONTH -->\n										<div class="form-group">\n											<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n											<div class="input-group input-large">\n												<ui-select data-ng-model="interval.m_from" theme="bootstrap" name="m_from">\n													<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n													<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n														{{month.name | translate}}\n													</ui-select-choices>\n												</ui-select>\n												<span class="input-group-addon">to</span>\n												<ui-select data-ng-model="interval.m_to" theme="bootstrap" name="m_to">\n													<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n													<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n														{{month.name | translate}}\n													</ui-select-choices>\n												</ui-select>\n											</div>\n										</div>\n										<!-- END MONTH -->\n						</div>\n\n						<div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'list\'" lazy-render duration="1">\n\n							<!-- START INTERVALS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$invalid}">\n								<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="interval.IntervalId" theme="bootstrap" name="IntervalId" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n									<ui-select-choices repeat="interval.id as interval in Intervals | filter: $select.search">\n										{{interval.name | translate}}\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END INTERVALS -->\n\n						</div>\n\n						<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n						<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n							</form>\n						</wz-step>\n\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/route/outbound/view/view.routeSettings.html",'<div class="row" data-ng-init="initApplication();getApplication();getIntervals();">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_APPLICATION_SETTINGS\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="updateRoute(\'routes\')">\n					<div class="profile-usertitle-name">\n						{{(main.app.name | translate) || \'Application\'}}\n					</div>\n	        <wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.info.$valid)">\n						<form name="forms.info" novalidate>\n							<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n							<div id="Dial" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && main.app.type == \'outboundDial\'" lazy-render duration="1">\n\n							<!-- START TRUNK -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.trunk.$touched || forms.info.$submitted) && forms.info.trunk.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TRUNK\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" name="trunk" theme="bootstrap" required data-ng-disabled="!items.length">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="trunk.name as trunk in items | filter: $select.search">\n										<div ng-bind-html="trunk.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<div class="note note-warning" data-ng-hide="items.length">\n									<h4 class="block">Warning!</h4>\n									<p>\n										{{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n									</p>\n									<p>\n										{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/trunks/list">{{\'APPLICATION_TRUNKS\' | translate}}</a>\n									</p>\n								</div>\n								<span data-ng-show="(forms.info.trunk.$touched || forms.info.$submitted) && forms.info.trunk.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TRUNK -->\n\n							<!-- START CALLERID -->\n							<div class="form-group"  data-ng-class="{\'has-error\': (forms.info.callerID.$touched || forms.info.$submitted) && forms.info.callerID.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_CALLERID\' | translate }}</label>\n								<input type="text" name="callerID" pattern=\'^"[a-zA-Z0-9_.-]*" <[a-zA-Z0-9_.-]*>\' placeholder=\'"name" <number>\' class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n									<span class="help-block">\n										{{ \'DESCRIPTION_OUTBOUND_CALLERID\' | translate }} "name" &lt;number&gt;\n									</span>\n								<span data-ng-show="(forms.info.callerID.$touched || forms.info.$submitted) && forms.info.callerID.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CALLERID -->\n\n							<!-- START PREFIX -->\n							<div class="form-group"  data-ng-class="{\'has-error\': (forms.info.prefix.$touched || forms.info.$submitted) && forms.info.prefix.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_PREFIX\' | translate }}</label>\n								<input type="text" name="prefix"  placeholder="{{ \'APPLICATION_PREFIX\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[2]">\n								<span class="help-block">\n									{{ \'DESCRIPTION_OUTBOUND_PREFIX\' | translate }}\n								</span>\n								<span data-ng-show="(forms.info.prefix.$touched || forms.info.$submitted) && forms.info.prefix.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n								<!-- END PREFIX -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n									<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[3]">\n									<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n								<!-- START OPTIONS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n									<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[4]">\n									<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END OPTIONS -->\n\n								<!-- START URL -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n									<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[5]">\n									<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END URL -->\n						</div>\n						<div id="Custom" class="app-settings" ng-slide-down="main.app.type == \'custom\'" lazy-render duration="1">\n\n							<!-- START CUSTOMAPP -->\n							<div class="form-group"  data-ng-class="{\'has-error\': (forms.info.customApp.$touched || forms.info.$submitted) && forms.info.customApp.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_CUSTOM_APP\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="customApp" placeholder="{{ \'APPLICATION_CUSTOM_APP\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].app" required>\n								<span data-ng-show="(forms.info.customApp.$touched || forms.info.$submitted) && forms.info.customApp.$invalid && forms.info.customApp.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CUSTOMAPP -->\n\n							<!-- START APPDATA -->\n							<div class="form-group"  data-ng-class="{\'has-error\': (forms.info.appdata.$touched || forms.info.$submitted) && forms.info.appdata.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_ARGUMENTS\' | translate }}</label>\n								<input type="text" name="appdata" placeholder="{{ \'APPLICATION_ARGUMENTS\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[0]">\n								<span data-ng-show="(forms.info.appdata.$touched || forms.info.$submitted) && forms.info.appdata.$invalid && forms.info.appdata.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END APPDATA -->\n						</div>\n						<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n					</form>\n					</wz-step>\n						<wz-step title="{{\'APPLICATION_INTERVAL\' | translate}}" canexit="formValidation(forms.interval.IntervalId.$valid || forms.interval.hasOwnProperty(\'t_from\') || forms.interval.intType.$modelValue === \'always\')">\n							<form name="forms.interval" novalidate>\n								<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n								<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n						<!-- START INTERVAL_TYPE -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$invalid}">\n							<label class="control-label">{{\'APPLICATION_INTERVAL_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="interval.intType" theme="bootstrap" name="intType" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n								<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n									{{intType.name | translate}}\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END INTERVAL_TYPE -->\n						<div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'custom\'" lazy-render duration="1">\n								<!-- START TIME -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n									<div class="input-group input-large">\n										<fieldset class="pull-left" ng-disabled="interval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="interval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n										<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n										<fieldset ng-disabled="interval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="interval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n									</div>\n								</div>\n								<!-- END TIME -->\n\n								<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="interval.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n								<!-- START ALWAYS -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n									<div class="input-group input-large">\n										<label class="control-label pointer-cursor">\n											<input\n												bs-switch\n												data-ng-model="interval.alwaysTime"\n												type="checkbox"\n												switch-active="{{ alwaysSwitch.isActive }}"\n												switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n												switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n												switch-on-color="{{ alwaysSwitch.onColor }}"\n												switch-off-color="{{ alwaysSwitch.offColor }}"\n												switch-animate="{{ alwaysSwitch.animate }}"\n												switch-size="{{ alwaysSwitch.size }}"\n												switch-label="{{ alwaysSwitch.label }}"\n												switch-icon="{{ alwaysSwitch.icon }}"\n												switch-radio-off="{{ alwaysSwitch.radioOff }}"\n												switch-label-width="{{ alwaysSwitch.labelWidth }}"\n												switch-handle-width="{{ alwaysSwitch.handleWidth }}">\n										</label>\n									</div>\n								</div>\n								<!-- END ALWAYS -->\n\n								<!-- START WEEKDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="interval.wd_from" theme="bootstrap" name="wd_from">\n											<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{weekDay.name | translate}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="interval.wd_to" theme="bootstrap" name="wd_to">\n											<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{weekDay.name | translate}}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END WEEKDAY -->\n\n								<!-- START MONTHDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="interval.md_from" theme="bootstrap" name="md_from">\n											<ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n												{{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="interval.md_to" theme="bootstrap" name="md_to">\n											<ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n												{{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTHDAY -->\n\n								<!-- START MONTH -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="interval.m_from" theme="bootstrap" name="m_from">\n											<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{month.name | translate}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="interval.m_to" theme="bootstrap" name="m_to">\n											<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{month.name | translate}}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTH -->\n							</div>\n\n							<div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'list\'" lazy-render duration="1">\n\n								<!-- START INTERVALS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$invalid}">\n									<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="interval.IntervalId" theme="bootstrap" name="IntervalId" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n										<ui-select-choices repeat="interval.id as interval in Intervals | filter: $select.search">\n											{{interval.name | translate}}\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="intervals.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERVALS -->\n\n							</div>\n							<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n							<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n							</form>\n						</wz-step>\n\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/channels/voice/route/outbound/view/view.routes.html",'<div ui-view class="profile-content">\n<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title  tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACTIONS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="selectedRows.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle " href="/channels/voice/routes/outbound/view/{{route.id}}/route" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ROUTE\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div data-ng-if="showGrid" ui-grid="gridOptions"  ui-grid-resize-columns class="grid" ui-grid-selection ui-grid-draggable-rows ui-grid-auto-resize>\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/channels/voice/route/outbound/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_OUTBOUND\' | translate}} {{ \'APPLICATION_ROUTE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body" data-ng-init="getContexts();getTags();">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateRoute()" novalidate>\n\n							<!-- START EXTEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.exten.$touched || forms.general.$submitted) && forms.general.exten.$invalid}">\n								<label class="control-label">{{\'APPLICATION_DESTINATION_PATTERN\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="exten" placeholder="{{\'APPLICATION_DESTINATION_PATTERN\' | translate}}" class="form-control" data-ng-model="route.exten" required/>\n								<span data-ng-show="(forms.general.exten.$touched || forms.general.$submitted) && forms.general.exten.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END EXTEN -->\n\n							<!-- START CUTDIGITS -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_CUTDIGITS\' | translate}}</label>\n								<input type="text" pattern="[0-9]+" class="form-control" name="cutdigits" data-ng-model="route.cutdigits">\n								<span class="help-block">\n								</span>\n							</div>\n							<!-- END CUTDIGITS -->\n\n							<!-- START TAG -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.tag.$touched || forms.general.$submitted) && forms.general.tag.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TAG\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="route.tag" name="tag" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="tag.name as tag in tags | filter: $select.search">\n										<div ng-bind-html="tag.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.general.tag.$touched || forms.general.$submitted) && forms.general.tag.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TAG -->\n\n							<!-- START CONTEXT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="route.context" name="context" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="context.name as context in voiceContexts | filter: $select.search">\n										<div ng-bind-html="context.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONTEXT -->\n\n							<!-- START RECORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.record.$touched || forms.general.$submitted) && forms.general.record.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RECORDING\' | translate}}</label></br>\n								<input\n								    bs-switch\n										class="form-control"\n								    ng-model="route.record"\n								    type="checkbox"\n								    switch-active="{{ recordSwitch.isActive }}"\n								    switch-on-text="{{ recordSwitch.onText }}"\n								    switch-off-text="{{ recordSwitch.offText }}"\n								    switch-on-color="{{ recordSwitch.onColor }}"\n								    switch-off-color="{{ recordSwitch.offColor }}"\n								    switch-animate="{{ recordSwitch.animate }}"\n								    switch-size="{{ recordSwitch.size }}"\n								    switch-label="{{ recordSwitch.label }}"\n								    switch-icon="{{ recordSwitch.icon }}"\n								    switch-radio-off="{{ recordSwitch.radioOff }}"\n								    switch-label-width="{{ recordSwitch.labelWidth }}"\n								    switch-handle-width="{{ recordSwitch.handleWidth }}">\n								<span data-ng-show="(forms.general.record.$touched || forms.general.$submitted) && forms.general.record.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END RECORD -->\n\n							<!-- START RECORDINGFORMAT -->\n							<div data-ng-if="route.record" class="form-group" data-ng-class="{\'has-error\': (forms.general.recordingFormat.$touched || forms.general.$submitted) && forms.general.recordingFormat.$invalid}">\n								<label class="control-label">{{\'APPLICATION_FORMAT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="route.recordingFormat" name="recordingFormat" theme="bootstrap" data-ng-required="route.record">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="format in [\'wav\',\'gsm\'] | filter: $select.search">\n										<div ng-bind-html="format | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.general.recordingFormat.$touched || forms.general.$submitted) && forms.general.recordingFormat.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END RECORDINGFORMAT -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="route.description"/></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/voice/route/view.application.html",'\n<div class="row" data-ng-init="initApplication(true); getIntervals();">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_NEW_APPLICATION\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="addApplication()">\n					<div class="profile-usertitle-name">\n						{{(main.app.name | translate) || \'Application\'}}\n					</div>\n	        <wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.settings.$valid)">\n							<form name="forms.settings" novalidate>\n\n								<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n									<!-- START APP -->\n									<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid}">\n										<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="main.app" name="app" theme="bootstrap" required>\n					            <ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n					            <ui-select-choices repeat="app in $application.applications| filter: $select.search">\n					              <div ng-bind-html="app.name | translate | highlight: $select.search"></div>\n					            </ui-select-choices>\n					          </ui-select>\n										<span data-ng-show="(forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid && forms.settings.app.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END APP -->\n\n									<div id="Queue" class="app-settings" ng-slide-down="main.app.value == \'Queue\'" lazy-render duration="1">\n										<!-- START QUEUE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$invalid}">\n											<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n											<ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" name="queue" theme="bootstrap" required data-ng-disabled="!items.length">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n												<ui-select-choices repeat="queue.name as queue in items | filter: $select.search">\n													<div ng-bind-html="queue.name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<div class="note note-warning" data-ng-hide="items.length">\n												<h4 class="block">Warning!</h4>\n												<p>\n													{{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n												</p>\n												<p>\n													{{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/voice/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n												</p>\n											</div>\n											<span data-ng-show="(forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END QUEUE -->\n\n										<!-- START OPTIONS -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n											<label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}</label>\n											<input type="text" pattern="[^,]*" name="app_options" placeholder="{{ \'APPLICATION_OPTIONS\' | translate }}" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n											<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.pattern" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n											</span>\n										</div>\n										<!-- END OPTIONS -->\n										<!-- START URL -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n											<input type="text" pattern="[^,]*" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[2]" data-ng-init="application.appdata[2] = null">\n											<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.pattern" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n											</span>\n										</div>\n										<!-- END URL -->\n\n										<!-- START APPLICATION_ANNOUNCE_OVERRIDE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$invalid}">\n											<label class="control-label">{{\'APPLICATION_ANNOUNCE_OVERRIDE\' | translate}}</label>\n											<ui-select data-ng-model="application.appdata[3]" data-ng-init="application.appdata[3] = null" name="audiofile" theme="bootstrap" data-ng-disabled="!items2.length">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n												<ui-select-choices repeat="settings.soundPath+\'/\'+audio.save_name as audio in items2 | filter: $select.search">\n													<div ng-bind-html="audio.display_name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<div class="note note-warning" data-ng-hide="items2.length">\n												<h4 class="block">Warning!</h4>\n												<p>\n													{{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n												</p>\n												<p>\n													{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/sounds/list">{{\'APPLICATION_SOUNDS\' | translate}}</a>\n												</p>\n											</div>\n											<span data-ng-show="(forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END APPLICATION_ANNOUNCE_OVERRIDE -->\n\n										<!-- START TIMEOUT -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n											<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="application.appdata[4]" data-ng-init="application.appdata[4] = null">\n											<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END TIMEOUT -->\n\n										<!-- START AGI -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.agi.$touched || forms.settings.$submitted) && forms.settings.agi.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_AGI\' | translate }}</label>\n											<input type="text" pattern="[^,]*" name="agi" placeholder="{{ \'APPLICATION_AGI\' | translate }}" class="form-control" data-ng-model="application.appdata[5]" data-ng-init="application.appdata[6] = null">\n											<span data-ng-show="(forms.settings.agi.$touched || forms.settings.$submitted) && forms.settings.agi.$invalid && forms.settings.agi.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="(forms.settings.agi.$touched || forms.settings.$submitted) && forms.settings.agi.$invalid && forms.settings.agi.$error.pattern" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n											</span>\n										</div>\n										<!-- END AGI -->\n\n										<!-- START MACRO -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.macro.$touched || forms.settings.$submitted) && forms.settings.macro.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_MACRO\' | translate }}</label>\n											<input type="text" pattern="[^,]*" name="macro" placeholder="{{ \'APPLICATION_MACRO\' | translate }}" class="form-control" data-ng-model="application.appdata[6]" data-ng-init="application.appdata[6] = null">\n											<span data-ng-show="(forms.settings.macro.$touched || forms.settings.$submitted) && forms.settings.macro.$invalid && forms.settings.macro.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="(forms.settings.macro.$touched || forms.settings.$submitted) && forms.settings.macro.$invalid && forms.settings.macro.$error.pattern" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n											</span>\n										</div>\n										<!-- END MACRO -->\n\n										<!-- START GOSUB -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.gosub.$touched || forms.settings.$submitted) && forms.settings.gosub.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_GOSUB\' | translate }}</label>\n											<input type="text" pattern="[^,]*" name="gosub" placeholder="{{ \'APPLICATION_GOSUB\' | translate }}" class="form-control" data-ng-model="application.appdata[7]" data-ng-init="application.appdata[7] = null">\n											<span data-ng-show="(forms.settings.gosub.$touched || forms.settings.$submitted) && forms.settings.gosub.$invalid && forms.settings.gosub.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="(forms.settings.gosub.$touched || forms.settings.$submitted) && forms.settings.gosub.$invalid && forms.settings.gosub.$error.pattern" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n											</span>\n										</div>\n										<!-- END GOSUB -->\n\n										<!-- START RULE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.rule.$touched || forms.settings.$submitted) && forms.settings.rule.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_RULE\' | translate }}</label>\n											<input type="text" pattern="[^,]*" name="rule" placeholder="{{ \'APPLICATION_RULE\' | translate }}" class="form-control" data-ng-model="application.appdata[8]" data-ng-init="application.appdata[8] = null">\n											<span data-ng-show="(forms.settings.rule.$touched || forms.settings.$submitted) && forms.settings.rule.$invalid && forms.settings.rule.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="(forms.settings.rule.$touched || forms.settings.$submitted) && forms.settings.rule.$invalid && forms.settings.rule.$error.pattern" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n											</span>\n										</div>\n										<!-- END RULE -->\n\n										<!-- START POSITION -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.position.$touched || forms.settings.$submitted) && forms.settings.position.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_POSITION\' | translate }}</label>\n											<input type="number" min="0" name="position" placeholder="{{ \'APPLICATION_POSITION\' | translate }}" class="form-control" data-ng-model="application.appdata[9]" data-ng-init="application.appdata[9] = null">\n											<span data-ng-show="(forms.settings.position.$touched || forms.settings.$submitted) && forms.settings.position.$invalid && forms.settings.position.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END POSITION -->\n\n										<!-- START ANSWER -->\n										<div class="form-group">\n											<label class="control-label">{{ \'APPLICATION_ANSWER\' | translate }}</label>\n											<div class="input-group input-large">\n												<label class="control-label pointer-cursor">\n													<input\n													bs-switch\n													data-ng-init="application.answer=true"\n													data-ng-model="application.answer"\n													type="checkbox"\n													switch-active="{{ alwaysSwitch.isActive }}"\n													switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n													switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n													switch-on-color="{{ alwaysSwitch.onColor }}"\n													switch-off-color="{{ alwaysSwitch.offColor }}"\n													switch-animate="{{ alwaysSwitch.animate }}"\n													switch-size="{{ alwaysSwitch.size }}"\n													switch-label="{{ alwaysSwitch.label }}"\n													switch-icon="{{ alwaysSwitch.icon }}"\n													switch-radio-off="{{ alwaysSwitch.radioOff }}"\n													switch-label-width="{{ alwaysSwitch.labelWidth }}"\n													switch-handle-width="{{ alwaysSwitch.handleWidth }}">\n												</label>\n											</div>\n										</div>\n										<!-- END ANSWER -->\n\n									</div>\n									<div id="Playback" class="app-settings" ng-slide-down="main.app.value == \'Playback\'" lazy-render duration="1">\n										<!-- START AUDIOFILE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$invalid}">\n											<label class="control-label">{{\'APPLICATION_AUDIO_FILE\' | translate}}<span class="required" aria-required="true">*</span></label>\n											<ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" name="audiofile" theme="bootstrap" required data-ng-disabled="!items.length">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n												<ui-select-choices repeat="settings.soundPath+\'/\'+audio.save_name as audio in items | filter: $select.search">\n													<div ng-bind-html="audio.display_name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<div class="note note-warning" data-ng-hide="items.length">\n												<h4 class="block">Warning!</h4>\n												<p>\n													{{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n												</p>\n												<p>\n													{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/sounds/list">{{\'APPLICATION_SOUNDS\' | translate}}</a>\n												</p>\n											</div>\n											<span data-ng-show="(forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END AUDIOFILE -->\n\n										<!-- START OPTIONS -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n											<label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}</label>\n											<input type="text" name="app_options" placeholder="{{ \'APPLICATION_OPTIONS\' | translate }}" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n											<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END OPTIONS -->\n\n										<!-- START ANSWER -->\n										<div class="form-group">\n											<label class="control-label">{{ \'APPLICATION_ANSWER\' | translate }}</label>\n											<div class="input-group input-large">\n												<label class="control-label pointer-cursor">\n													<input\n													bs-switch\n													data-ng-init="application.answer=true"\n													data-ng-model="application.answer"\n													type="checkbox"\n													switch-active="{{ alwaysSwitch.isActive }}"\n													switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n													switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n													switch-on-color="{{ alwaysSwitch.onColor }}"\n													switch-off-color="{{ alwaysSwitch.offColor }}"\n													switch-animate="{{ alwaysSwitch.animate }}"\n													switch-size="{{ alwaysSwitch.size }}"\n													switch-label="{{ alwaysSwitch.label }}"\n													switch-icon="{{ alwaysSwitch.icon }}"\n													switch-radio-off="{{ alwaysSwitch.radioOff }}"\n													switch-label-width="{{ alwaysSwitch.labelWidth }}"\n													switch-handle-width="{{ alwaysSwitch.handleWidth }}">\n												</label>\n											</div>\n										</div>\n										<!-- END ANSWER -->\n									</div>\n									<div id="Dial" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && !main.app.type" lazy-render duration="1">\n										<!-- START INTERFACE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.interface.$touched || forms.settings.$submitted) && forms.settings.interface.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_TYPE\' | translate }}/{{ \'APPLICATION_IDENTIFIER\' | translate }}<span class="required" aria-required="true">*</span></label>\n											<input type="text" name="interface" placeholder="SIP/0000" class="form-control" data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" required>\n											<span data-ng-show="(forms.settings.interface.$touched || forms.settings.$submitted) && forms.settings.interface.$invalid && forms.settings.interface.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END INTERFACE -->\n\n										<!-- START TIMEOUT -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n											<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n											<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END TIMEOUT -->\n\n										<!-- START OPTIONS -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n											<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="application.appdata[2]" data-ng-init="application.appdata[2] = null">\n											<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END OPTIONS -->\n\n										<!-- START URL -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n											<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[3]" data-ng-init="application.appdata[3] = null">\n											<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END URL -->\n									</div>\n									<div id="internalDial" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && main.app.type == \'internalDial\'" lazy-render duration="1">\n										<!-- START INTERNAL DIAL -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.user.$touched || forms.settings.$submitted) && forms.settings.user.$invalid}">\n											<label class="control-label">{{\'APPLICATION_USER\' | translate}}<span class="required" aria-required="true">*</span></label>\n											<ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" name="user" theme="bootstrap" required data-ng-disabled="!items.length">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n												<ui-select-choices repeat="user.name as user in items | filter: $select.search">\n													<div ng-bind-html="user.name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<span data-ng-show="(forms.settings.user.$touched || forms.settings.$submitted) && forms.settings.user.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END INTERNAL DIAL -->\n\n										<!-- START TIMEOUT -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n											<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n											<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END TIMEOUT -->\n\n										<!-- START OPTIONS -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n											<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="application.appdata[2]" data-ng-init="application.appdata[2] = null">\n											<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n												<strong>{{ \'APPLICATION_WARNING\' | translate }}!</strong> {{ \'MESSAGE_REQUIRED_FIELD\' | translate }}.\n											</span>\n										</div>\n										<!-- END OPTIONS -->\n\n										<!-- START URL -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n											<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[3]" data-ng-init="application.appdata[3] = null">\n											<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n												<strong>{{ \'APPLICATION_WARNING\' | translate }}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END URL -->\n\n									</div>\n									<div id="Dial" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && main.app.type == \'externalDial\'" lazy-render duration="1">\n										<!-- START TRUNK -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.info.trunk.$touched || forms.info.$submitted) && forms.info.trunk.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_TRUNK\' | translate }}<span class="required" aria-required="true">*</span></label>\n											<ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" name="trunk" theme="bootstrap" required data-ng-disabled="!items.length">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n												<ui-select-choices repeat="trunk.name as trunk in items | filter: $select.search">\n													<div ng-bind-html="trunk.name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<div class="note note-warning" data-ng-hide="items.length">\n												<h4 class="block">Warning!</h4>\n												<p>\n													{{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n												</p>\n												<p>\n													{{ \'APPLICATION_GO_TO\' | translate }} <a href="/tools/trunks/list">{{ \'APPLICATION_TRUNKS\' | translate }}</a>\n												</p>\n											</div>\n											<span data-ng-show="(forms.info.trunk.$touched || forms.info.$submitted) && forms.info.trunk.$error.required" class="help-block help-block-error">\n												<strong>{{ \'APPLICATION_WARNING\' | translate }}!</strong> {{ \'MESSAGE_REQUIRED_FIELD\' | translate }}.\n											</span>\n										</div>\n										<!-- END TRUNK -->\n\n										<!-- START PHONE -->\n											<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.phone.$touched || forms.settings.$submitted) && forms.settings.phone.$invalid}">\n												<label class="control-label">{{ \'APPLICATION_PHONE\' | translate }}<span class="required" aria-required="true">*</span></label>\n												<input type="text" name="phone" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null" required>\n												<span data-ng-show="(forms.settings.phone.$touched || forms.settings.$submitted) && forms.settings.phone.$invalid && forms.settings.phone.$error.required" class="help-block help-block-error">\n													<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n												</span>\n											</div>\n											<!-- END PHONE -->\n\n											<!-- START TIMEOUT -->\n											<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n												<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n												<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="application.appdata[2]" data-ng-init="application.appdata[2] = null">\n												<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n													<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n												</span>\n											</div>\n											<!-- END TIMEOUT -->\n\n											<!-- START OPTIONS -->\n											<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n												<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n												<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="application.appdata[3]" data-ng-init="application.appdata[3] = null">\n												<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n													<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n												</span>\n											</div>\n											<!-- END OPTIONS -->\n\n											<!-- START URL -->\n											<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n												<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n												<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[4]" data-ng-init="application.appdata[4] = null">\n												<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n													<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n												</span>\n											</div>\n											<!-- END URL -->\n										</div>\n										<div id="RingGroup" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && main.app.type == \'RingGroup\'" lazy-render duration="1">\n											<!-- START ITEMS -->\n											<input type="hidden" name="items" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[0]" data-ng-init="initRingGroup()">\n											<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.project.$touched || forms.settings.$submitted) && forms.settings.items.$invalid}">\n												<label class="control-label">{{\'APPLICATION_ITEMS\' | translate}}<span class="required" aria-required="true">*</span></label>\n												<div class="col-md-12" id="multi-select-user-by-role"></div>\n												<span data-ng-show="(forms.settings.items.$touched || forms.settings.$submitted) && forms.settings.items.$error.required" class="help-block help-block-error">\n													<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n												</span>\n											</div>\n											<!-- END ITEMS -->\n\n											<!-- START TIMEOUT -->\n											<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n												<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n												<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n												<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n													<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n												</span>\n											</div>\n											<!-- END TIMEOUT -->\n\n											<!-- START OPTIONS -->\n											<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n												<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n												<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="application.appdata[2]" data-ng-init="application.appdata[2] = null">\n												<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n													<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n												</span>\n											</div>\n											<!-- END OPTIONS -->\n\n											<!-- START URL -->\n											<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n												<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n												<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[3]" data-ng-init="application.appdata[3] = null">\n												<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n													<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n												</span>\n											</div>\n											<!-- END URL -->\n										</div>\n									<div id="AGI" class="app-settings" ng-slide-down="main.app.value == \'AGI\'" lazy-render duration="1">\n										<!-- START PROJECT -->\n										<input type="hidden" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = \'agi://127.0.0.1/square\'">\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.project.$touched || forms.settings.$submitted) && forms.settings.project.$invalid}">\n											<label class="control-label">{{\'APPLICATION_PROJECT\' | translate}}<span class="required" aria-required="true">*</span></label>\n											<ui-select data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null" name="project" theme="bootstrap" required data-ng-disabled="!items.length">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n												<ui-select-choices repeat="project.name as project in items | filter: $select.search">\n													<div ng-bind-html="project.name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<div class="note note-warning" data-ng-hide="items.length">\n												<h4 class="block">Warning!</h4>\n												<p>\n													{{ \'MESSAGE_NO_PROJECTS_AVAILABLE\' | translate }}\n												</p>\n												<p>\n													{{\'APPLICATION_GO_TO\' | translate}} <a href="/square/projects/list">{{\'APPLICATION_PROJECTS\' | translate}}</a>\n												</p>\n											</div>\n											<span data-ng-show="(forms.settings.project.$touched || forms.settings.$submitted) && forms.settings.project.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END PROJECT -->\n									</div>\n									<div id="Goto" class="app-settings" ng-slide-down="main.app.value == \'Goto\'" lazy-render duration="1">\n										<!-- START CONTEXT -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.context.$touched || forms.settings.$submitted) && forms.settings.context.$invalid}">\n											<label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n											<ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" name="context" theme="bootstrap" required>\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n												<ui-select-choices repeat="context.name as context in items | filter: $select.search">\n													<div ng-bind-html="context.name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<span data-ng-show="(forms.settings.context.$touched || forms.settings.$submitted) && forms.settings.context.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END CONTEXT -->\n\n										<!-- START EXTENSION -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.extension.$touched || forms.settings.$submitted) && forms.settings.extension.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_EXTENSION\' | translate }}<span class="required" aria-required="true">*</span></label>\n											<input type="text" name="extension" placeholder="" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null" required>\n											<span data-ng-show="(forms.settings.extension.$touched || forms.settings.$submitted) && forms.settings.extension.$invalid && forms.settings.extension.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END EXTENSION -->\n\n										<!-- START PRIORITY -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.priority.$touched || forms.settings.$submitted) && forms.settings.priority.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_PRIORITY\' | translate }}<span class="required" aria-required="true">*</span></label>\n											<input type="text" pattern="[0-9]+" name="priority" placeholder="" class="form-control" data-ng-model="application.appdata[2]" data-ng-init="application.appdata[2] = null" required>\n											<span data-ng-show="(forms.settings.priority.$touched || forms.settings.$submitted) && forms.settings.priority.$invalid" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END PRIORITY -->\n									</div>\n									<div id="Hangup" class="app-settings" ng-slide-down="main.app.value == \'Hangup\'" lazy-render duration="1">\n										<!-- START HANGUPCAUSE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.hangupCause.$touched || forms.settings.$submitted) && forms.settings.hangupCause.$invalid}">\n											<label class="control-label">{{\'APPLICATION_HANGUP_CAUSE\' | translate}}<span class="required" aria-required="true">*</span></label>\n											<ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" theme="bootstrap" name="hangupCause" required>\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n												<ui-select-choices repeat="hangupCause.value as hangupCause in $application.hangupCauses | filter: $select.search">\n													<div ng-bind-html="hangupCause.name  | translate | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<span data-ng-show="(forms.settings.hangupCause.$touched || forms.settings.$submitted) && forms.settings.hangupCause.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END HANGUPCAUSE -->\n									</div>\n									<div id="Set" class="app-settings" ng-slide-down="main.app.value == \'Set\'" lazy-render duration="1">\n										<!-- START VARIABLE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.variable.$touched || forms.settings.$submitted) && forms.settings.variable.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_VARIABLE\' | translate }}<span class="required" aria-required="true">*</span></label>\n											<input type="text" name="variable" placeholder="" class="form-control" data-ng-model="application.variable" data-ng-init="application.appdata[0] = null" data-ng-change="updateSetAppdata()" required>\n											<span data-ng-show="(forms.settings.variable.$touched || forms.settings.$submitted) && forms.settings.variable.$invalid && forms.settings.variable.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END VARIABLE -->\n\n										<!-- START VARVALUE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.varvalue.$touched || forms.settings.$submitted) && forms.settings.varvalue.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_VALUE\' | translate }}<span class="required" aria-required="true">*</span></label>\n											<input type="text" name="varvalue" placeholder="" class="form-control" data-ng-model="application.value" data-ng-change="updateSetAppdata()" required>\n											<span data-ng-show="(forms.settings.varvalue.$touched || forms.settings.$submitted) && forms.settings.varvalue.$invalid && forms.settings.varvalue.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END VARVALUE -->\n									</div>\n									<div id="Custom" class="app-settings" ng-slide-down="main.app.type == \'custom\'" lazy-render duration="1">\n\n										<!-- START CUSTOMAPP -->\n										<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.customApp.$touched || forms.settings.$submitted) && forms.settings.customApp.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_CUSTOM_APP\' | translate }}<span class="required" aria-required="true">*</span></label>\n											<input type="text" name="customApp" placeholder="{{ \'APPLICATION_CUSTOM_APP\' | translate }}" class="form-control" data-ng-model="application.app" required>\n											<span data-ng-show="(forms.settings.customApp.$touched || forms.settings.$submitted) && forms.settings.customApp.$invalid && forms.settings.customApp.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END CUSTOMAPP -->\n\n										<!-- START APPDATA -->\n										<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.appdata.$touched || forms.settings.$submitted) && forms.settings.appdata.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_ARGUMENTS\' | translate }}</label>\n											<input type="text" name="appdata" placeholder="{{ \'APPLICATION_ARGUMENTS\' | translate }}" class="form-control" data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null">\n											<span data-ng-show="(forms.settings.appdata.$touched || forms.settings.$submitted) && forms.settings.appdata.$invalid && forms.settings.appdata.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END APPDATA -->\n									</div>\n									<div id="Voicemail" class="app-settings" ng-slide-down="main.app.value == \'Voicemail\'" lazy-render duration="1">\n										<!-- START VOICEMAIL -->\n										<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.voicemail.$touched || forms.settings.$submitted) && forms.settings.voicemail.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_MAILBOX\' | translate }}@{{ \'APPLICATION_CONTEXT\' | translate }}<span class="required" aria-required="true">*</span></label>\n											<ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" theme="bootstrap" name="voicemail" required data-ng-disabled="!items.length">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.mailbox}}</ui-select-match>\n												<ui-select-choices repeat="mailbox.mailbox+\'@\'+mailbox.context as mailbox in items | filter: $select.search">\n													<div ng-bind-html="mailbox.mailbox | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<div class="note note-warning" data-ng-hide="items.length">\n												<h4 class="block">Warning!</h4>\n												<p>\n													{{ \'MESSAGE_NO_VOICEMAILS_AVAILABLE\' | translate }}\n												</p>\n												<p>\n													{{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/voice/voicemails/list">{{\'APPLICATION_VOICEMAILS\' | translate}}</a>\n												</p>\n											</div>\n											<span data-ng-show="(forms.settings.voicemail.$touched || forms.settings.$submitted) && forms.settings.voicemail.$invalid && forms.settings.voicemail.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END VOICEMAIL -->\n\n										<!-- START OPTIONS -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n											<label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}</label>\n											<input type="text" name="app_options" placeholder="{{ \'APPLICATION_OPTIONS\' | translate }}" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n										</div>\n										<!-- END OPTIONS -->\n									</div>\n									<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n								</form>\n								</wz-step>\n									<wz-step title="{{\'APPLICATION_INTERVAL\' | translate}}" canexit="formValidation(forms.interval.IntervalId.$valid || forms.interval.hasOwnProperty(\'t_from\') || forms.interval.intType.$modelValue === \'always\')">\n										<form name="forms.interval" novalidate>\n										<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n										<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n									<!-- START INTERVAL_TYPE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$invalid}">\n										<label class="control-label">{{\'APPLICATION_INTERVAL_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="interval.intType" theme="bootstrap" name="intType" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n											<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n												<div ng-bind-html="intType.name | translate | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span data-ng-show="(forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END INTERVAL_TYPE -->\n									<div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'custom\'" lazy-render duration="1">\n											<!-- START TIME -->\n											<div class="form-group">\n												<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n												<div class="input-group input-large">\n													<fieldset class="pull-left" ng-disabled="interval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="interval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n													<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n													<fieldset ng-disabled="interval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="interval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n												</div>\n											</div>\n											<!-- END TIME -->\n\n											<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="interval.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n											<!-- START ALWAYS -->\n											<div class="form-group">\n												<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n												<div class="input-group input-large">\n													<label class="control-label pointer-cursor">\n														<input\n															bs-switch\n															data-ng-model="interval.alwaysTime"\n															type="checkbox"\n															switch-active="{{ alwaysSwitch.isActive }}"\n															switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n															switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n															switch-on-color="{{ alwaysSwitch.onColor }}"\n															switch-off-color="{{ alwaysSwitch.offColor }}"\n															switch-animate="{{ alwaysSwitch.animate }}"\n															switch-size="{{ alwaysSwitch.size }}"\n															switch-label="{{ alwaysSwitch.label }}"\n															switch-icon="{{ alwaysSwitch.icon }}"\n															switch-radio-off="{{ alwaysSwitch.radioOff }}"\n															switch-label-width="{{ alwaysSwitch.labelWidth }}"\n															switch-handle-width="{{ alwaysSwitch.handleWidth }}">\n													</label>\n												</div>\n											</div>\n											<!-- END ALWAYS -->\n\n											<!-- START WEEKDAY -->\n											<div class="form-group">\n												<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n												<div class="input-group input-large">\n													<ui-select data-ng-model="interval.wd_from" theme="bootstrap" name="wd_from">\n														<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n														<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n															{{weekDay.name | translate}}\n														</ui-select-choices>\n													</ui-select>\n													<span class="input-group-addon">to</span>\n													<ui-select data-ng-model="interval.wd_to" theme="bootstrap" name="wd_to">\n														<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n														<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n															{{weekDay.name | translate}}\n														</ui-select-choices>\n													</ui-select>\n												</div>\n											</div>\n											<!-- END WEEKDAY -->\n\n											<!-- START MONTHDAY -->\n											<div class="form-group">\n												<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n												<div class="input-group input-large">\n													<ui-select data-ng-model="interval.md_from" theme="bootstrap" name="md_from">\n														<ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n														<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n															{{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n														</ui-select-choices>\n													</ui-select>\n													<span class="input-group-addon">to</span>\n													<ui-select data-ng-model="interval.md_to" theme="bootstrap" name="md_to">\n														<ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n														<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n															{{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n														</ui-select-choices>\n													</ui-select>\n												</div>\n											</div>\n											<!-- END MONTHDAY -->\n\n											<!-- START MONTH -->\n											<div class="form-group">\n												<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n												<div class="input-group input-large">\n													<ui-select data-ng-model="interval.m_from" theme="bootstrap" name="m_from">\n														<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n														<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n															{{month.name | translate}}\n														</ui-select-choices>\n													</ui-select>\n													<span class="input-group-addon">to</span>\n													<ui-select data-ng-model="interval.m_to" theme="bootstrap" name="m_to">\n														<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n														<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n															{{month.name | translate}}\n														</ui-select-choices>\n													</ui-select>\n												</div>\n											</div>\n											<!-- END MONTH -->\n							</div>\n\n							<div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'list\'" lazy-render duration="1">\n\n								<!-- START INTERVALS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$invalid}">\n									<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="interval.IntervalId" theme="bootstrap" name="IntervalId" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n										<ui-select-choices repeat="interval.id as interval in Intervals | filter: $select.search">\n											{{interval.name | translate}}\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="intervals.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERVALS -->\n\n							</div>\n								<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n								<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n							</form>\n						</wz-step>\n\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/channels/voice/route/view.applicationSettings.html",'\n<div class="row" data-ng-init="initApplication();getIntervals();getApplication();">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_APPLICATION_SETTINGS\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="updateRoute(\'applications\')">\n					<div class="profile-usertitle-name">\n						{{(main.app.name | translate) || \'Application\'}}\n					</div>\n					<wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.settings.$valid)">\n						<form name="forms.settings" novalidate>\n							<!-- <pre>\n								{{application | json}}\n							</pre> -->\n\n							<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n\n							<div id="Queue" class="app-settings" ng-slide-down="main.app.value == \'Queue\'" lazy-render duration="1">\n								<!-- START QUEUE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$invalid}">\n									<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" name="queue" theme="bootstrap" required data-ng-disabled="!items.length">\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="queue.name as queue in items | filter: $select.search">\n											<div ng-bind-html="queue.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="items.length">\n										<h4 class="block">Warning!</h4>\n										<p>\n											{{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n										</p>\n										<p>\n											{{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/voice/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n										</p>\n									</div>\n									<span data-ng-show="(forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END QUEUE -->\n\n								<!-- START OPTIONS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n									<label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}</label>\n									<input type="text" pattern="[^,]*" name="app_options" placeholder="{{ \'APPLICATION_OPTIONS\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n									<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n									<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.pattern" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n									</span>\n								</div>\n								<!-- END OPTIONS -->\n\n								<!-- START URL -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n									<input type="text" pattern="[^,]*" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[2]">\n									<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n									<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.pattern" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n									</span>\n								</div>\n								<!-- END URL -->\n\n								<!-- START APPLICATION_ANNOUNCE_OVERRIDE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ANNOUNCE_OVERRIDE\' | translate}}</label>\n									<ui-select data-ng-model="route.Applications[selectedApp].appdata[3]" name="audiofile" theme="bootstrap" data-ng-disabled="!items2.length">\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n										<ui-select-choices repeat="settings.soundPath+\'/\'+audio.save_name as audio in items2 | filter: $select.search">\n											<div ng-bind-html="audio.display_name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="items2.length">\n										<h4 class="block">Warning!</h4>\n										<p>\n											{{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n										</p>\n										<p>\n											{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/sounds/list">{{\'APPLICATION_SOUNDS\' | translate}}</a>\n										</p>\n									</div>\n									<span data-ng-show="(forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END APPLICATION_ANNOUNCE_OVERRIDE -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n									<input type="text" pattern="[0-9]+" name="timeout" placeholder="{{ \'APPLICATION_TIMEOUT\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[4]">\n									<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n								<!-- START AGI -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.agi.$touched || forms.settings.$submitted) && forms.settings.agi.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_AGI\' | translate }}</label>\n									<input type="text" pattern="[^,]*" name="agi" placeholder="{{ \'APPLICATION_AGI\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[5]">\n									<span data-ng-show="(forms.settings.agi.$touched || forms.settings.$submitted) && forms.settings.agi.$invalid && forms.settings.agi.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n									<span data-ng-show="(forms.settings.agi.$touched || forms.settings.$submitted) && forms.settings.agi.$invalid && forms.settings.agi.$error.pattern" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n									</span>\n								</div>\n								<!-- END AGI -->\n\n								<!-- START MACRO -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.macro.$touched || forms.settings.$submitted) && forms.settings.macro.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_MACRO\' | translate }}</label>\n									<input type="text" pattern="[^,]*" name="macro" placeholder="{{ \'APPLICATION_MACRO\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[6]">\n									<span data-ng-show="(forms.settings.macro.$touched || forms.settings.$submitted) && forms.settings.macro.$invalid && forms.settings.macro.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n									<span data-ng-show="(forms.settings.macro.$touched || forms.settings.$submitted) && forms.settings.macro.$invalid && forms.settings.macro.$error.pattern" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n									</span>\n								</div>\n								<!-- END MACRO -->\n\n								<!-- START GOSUB -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.gosub.$touched || forms.settings.$submitted) && forms.settings.gosub.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_GOSUB\' | translate }}</label>\n									<input type="text" pattern="[^,]*" name="gosub" placeholder="{{ \'APPLICATION_GOSUB\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[7]">\n									<span data-ng-show="(forms.settings.gosub.$touched || forms.settings.$submitted) && forms.settings.gosub.$invalid && forms.settings.gosub.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n									<span data-ng-show="(forms.settings.gosub.$touched || forms.settings.$submitted) && forms.settings.gosub.$invalid && forms.settings.gosub.$error.pattern" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n									</span>\n								</div>\n								<!-- END GOSUB -->\n\n								<!-- START RULE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.rule.$touched || forms.settings.$submitted) && forms.settings.rule.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_RULE\' | translate }}</label>\n									<input type="text" pattern="[^,]*" name="rule" placeholder="{{ \'APPLICATION_RULE\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[8]">\n									<span data-ng-show="(forms.settings.rule.$touched || forms.settings.$submitted) && forms.settings.rule.$invalid && forms.settings.rule.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n									<span data-ng-show="(forms.settings.rule.$touched || forms.settings.$submitted) && forms.settings.rule.$invalid && forms.settings.rule.$error.pattern" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n									</span>\n								</div>\n								<!-- END RULE -->\n\n								<!-- START POSITION -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.position.$touched || forms.settings.$submitted) && forms.settings.position.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_POSITION\' | translate }}</label>\n									<input type="number" min="0" name="position" placeholder="{{ \'APPLICATION_POSITION\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[9]">\n									<span data-ng-show="(forms.settings.position.$touched || forms.settings.$submitted) && forms.settings.position.$invalid && forms.settings.position.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END POSITION -->\n\n								<!-- START ANSWER -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_ANSWER\' | translate }}</label>\n									<div class="input-group input-large">\n										<label class="control-label pointer-cursor">\n											<input\n											bs-switch\n											data-ng-model="route.Applications[selectedApp].answer"\n											type="checkbox"\n											switch-active="{{ alwaysSwitch.isActive }}"\n											switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n											switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n											switch-on-color="{{ alwaysSwitch.onColor }}"\n											switch-off-color="{{ alwaysSwitch.offColor }}"\n											switch-animate="{{ alwaysSwitch.animate }}"\n											switch-size="{{ alwaysSwitch.size }}"\n											switch-label="{{ alwaysSwitch.label }}"\n											switch-icon="{{ alwaysSwitch.icon }}"\n											switch-radio-off="{{ alwaysSwitch.radioOff }}"\n											switch-label-width="{{ alwaysSwitch.labelWidth }}"\n											switch-handle-width="{{ alwaysSwitch.handleWidth }}">\n										</label>\n									</div>\n								</div>\n								<!-- END ANSWER -->\n\n							</div>\n							<div id="Playback" class="app-settings" ng-slide-down="main.app.value == \'Playback\'" lazy-render duration="1">\n								<!-- START AUDIOFILE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$invalid}">\n									<label class="control-label">{{\'APPLICATION_AUDIO_FILE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" name="audiofile" theme="bootstrap" required data-ng-disabled="!items.length">\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n										<ui-select-choices repeat="settings.soundPath+\'/\'+audio.save_name as audio in items | filter: $select.search">\n											<div ng-bind-html="audio.display_name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="items.length">\n										<h4 class="block">Warning!</h4>\n										<p>\n											{{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n										</p>\n										<p>\n											{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/sounds/list">{{\'APPLICATION_SOUNDS\' | translate}}</a>\n										</p>\n									</div>\n									<span data-ng-show="(forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END AUDIOFILE -->\n\n								<!-- START OPTIONS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n									<label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}</label>\n									<input type="text" name="app_options" placeholder="{{ \'APPLICATION_OPTIONS\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n									<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END OPTIONS -->\n\n								<!-- START ANSWER -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_ANSWER\' | translate }}</label>\n									<div class="input-group input-large">\n										<label class="control-label pointer-cursor">\n											<input\n											bs-switch\n											data-ng-model="route.Applications[selectedApp].answer"\n											type="checkbox"\n											switch-active="{{ alwaysSwitch.isActive }}"\n											switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n											switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n											switch-on-color="{{ alwaysSwitch.onColor }}"\n											switch-off-color="{{ alwaysSwitch.offColor }}"\n											switch-animate="{{ alwaysSwitch.animate }}"\n											switch-size="{{ alwaysSwitch.size }}"\n											switch-label="{{ alwaysSwitch.label }}"\n											switch-icon="{{ alwaysSwitch.icon }}"\n											switch-radio-off="{{ alwaysSwitch.radioOff }}"\n											switch-label-width="{{ alwaysSwitch.labelWidth }}"\n											switch-handle-width="{{ alwaysSwitch.handleWidth }}">\n										</label>\n									</div>\n								</div>\n								<!-- END ANSWER -->\n\n							</div>\n							<div id="Dial" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && !main.app.type" lazy-render duration="1">\n								<!-- START INTERFACE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.interface.$touched || forms.settings.$submitted) && forms.settings.interface.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_TYPE\' | translate }}/{{ \'APPLICATION_IDENTIFIER\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<input type="text" name="interface" placeholder="SIP/0000" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[0]" required>\n									<span data-ng-show="(forms.settings.interface.$touched || forms.settings.$submitted) && forms.settings.interface.$invalid && forms.settings.interface.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERFACE -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n									<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n									<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n								<!-- START OPTIONS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n									<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[2]">\n									<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END OPTIONS -->\n\n								<!-- START URL -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n									<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[3]">\n									<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END URL -->\n							</div>\n							<div id="internalDial" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && main.app.type == \'internalDial\'" lazy-render duration="1">\n								<!-- START INTERNAL DIAL -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.user.$touched || forms.settings.$submitted) && forms.settings.user.$invalid}">\n									<label class="control-label">{{\'APPLICATION_USER\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" name="user" theme="bootstrap" required data-ng-disabled="!items.length">\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="user.name as user in items | filter: $select.search">\n											<div ng-bind-html="user.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.settings.user.$touched || forms.settings.$submitted) && forms.settings.user.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERNAL DIAL -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n									<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n									<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n								<!-- START OPTIONS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n									<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[2]">\n									<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END OPTIONS -->\n\n								<!-- START URL -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n									<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[3]">\n									<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END URL -->\n\n							</div>\n							<div id="Dial" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && main.app.type == \'externalDial\'" lazy-render duration="1">\n\n								<!-- START TRUNK -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.info.trunk.$touched || forms.info.$submitted) && forms.info.trunk.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TRUNK\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" name="trunk" theme="bootstrap" required data-ng-disabled="!items.length">\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="trunk.name as trunk in items | filter: $select.search">\n											<div ng-bind-html="trunk.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="items.length">\n										<h4 class="block">Warning!</h4>\n										<p>\n											{{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n										</p>\n										<p>\n											{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/trunks/list">{{\'APPLICATION_TRUNKS\' | translate}}</a>\n										</p>\n									</div>\n									<span data-ng-show="(forms.info.trunk.$touched || forms.info.$submitted) && forms.info.trunk.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TRUNK -->\n\n								<!-- START PHONE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.phone.$touched || forms.settings.$submitted) && forms.settings.phone.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_PHONE\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<input type="text" pattern="[0-9]+" name="phone" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n									<span data-ng-show="(forms.settings.phone.$touched || forms.settings.$submitted) && forms.settings.phone.$invalid && forms.settings.phone.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END PHONE -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n									<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[2]">\n									<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n								<!-- START OPTIONS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n									<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[3]">\n									<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END OPTIONS -->\n\n								<!-- START URL -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n									<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[4]">\n									<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END URL -->\n							</div>\n							<div id="RingGroup" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && main.app.type == \'RingGroup\'" lazy-render duration="1">\n								<!-- START ITEMS -->\n								<input type="hidden" name="items" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[0]" data-ng-init="initRingGroup()">\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.items.$touched || forms.settings.$submitted) && forms.settings.items.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ITEMS\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<div class="col-md-12" id="multi-select-user-by-role"></div>\n									<span data-ng-show="(forms.settings.items.$touched || forms.settings.$submitted) && forms.settings.items.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END ITEMS -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n									<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]" data-ng-init="application.appdata[1] = null">\n									<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n								<!-- START OPTIONS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n									<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[2]" data-ng-init="application.appdata[2] = null">\n									<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END OPTIONS -->\n\n								<!-- START URL -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n									<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[3]" data-ng-init="application.appdata[3] = null">\n									<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END URL -->\n							</div>\n							<div id="AGI" class="app-settings" ng-slide-down="main.app.value == \'AGI\'" lazy-render duration="1">\n								<!-- START PROJECT -->\n								<input type="hidden" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[0]" data-ng-init="route.Applications[selectedApp].appdata[0] = \'agi://127.0.0.1/square\'">\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.project.$touched || forms.settings.$submitted) && forms.settings.project.$invalid}">\n									<label class="control-label">{{\'APPLICATION_PROJECT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="route.Applications[selectedApp].appdata[1]" name="project" theme="bootstrap" required data-ng-disabled="!items.length">\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="project.name as project in items | filter: $select.search">\n											<div ng-bind-html="project.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="items.length">\n										<h4 class="block">Warning!</h4>\n										<p>\n											{{ \'MESSAGE_NO_PROJECTS_AVAILABLE\' | translate }}\n										</p>\n										<p>\n											{{\'APPLICATION_GO_TO\' | translate}} <a href="/square/projects/list">{{\'APPLICATION_PROJECTS\' | translate}}</a>\n										</p>\n									</div>\n									<span data-ng-show="(forms.settings.project.$touched || forms.settings.$submitted) && forms.settings.project.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END PROJECT -->\n\n								<!-- START URL -->\n								<!-- <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n								<div class="input-group">\n								<input type="text" name="url" placeholder="agi://127.0.0.1/square" class="form-control" data-ng-model="application.url" data-ng-disabled="!application.urlEnabled" data-ng-required="application.urlEnabled" rpattern="/^agi:\\/\\/(?:[0-9]{1,3}\\.){3}[0-9]{1,3}\\/square$/">\n								<span class="input-group-addon">\n								<input type="checkbox" data-ng-model="application.urlEnabled">\n							</span>\n						</div>\n						<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n						<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n					</span>\n					<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.pattern" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n				</span>\n			</div> -->\n			<!-- END URL -->\n\n		</div>\n		<div id="Goto" class="app-settings" ng-slide-down="main.app.value == \'Goto\'" lazy-render duration="1">\n			<!-- START CONTEXT -->\n			<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.context.$touched || forms.settings.$submitted) && forms.settings.context.$invalid}">\n				<label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n				<ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" name="context" theme="bootstrap" required>\n					<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n					<ui-select-choices repeat="context.name as context in items | filter: $select.search">\n						<div ng-bind-html="context.name | highlight: $select.search"></div>\n					</ui-select-choices>\n				</ui-select>\n				<span data-ng-show="(forms.settings.context.$touched || forms.settings.$submitted) && forms.settings.context.$error.required" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END CONTEXT -->\n\n			<!-- START EXTENSION -->\n			<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.extension.$touched || forms.settings.$submitted) && forms.settings.extension.$invalid}">\n				<label class="control-label">{{ \'APPLICATION_EXTENSION\' | translate }}<span class="required" aria-required="true">*</span></label>\n				<input type="text" name="extension" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]" required>\n				<span data-ng-show="(forms.settings.extension.$touched || forms.settings.$submitted) && forms.settings.extension.$invalid && forms.settings.extension.$error.required" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END EXTENSION -->\n\n			<!-- START PRIORITY -->\n			<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.priority.$touched || forms.settings.$submitted) && forms.settings.priority.$invalid}">\n				<label class="control-label">{{ \'APPLICATION_PRIORITY\' | translate }}<span class="required" aria-required="true">*</span></label>\n				<input type="text" pattern="[0-9]+" name="priority" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[2]" required>\n				<span data-ng-show="(forms.settings.priority.$touched || forms.settings.$submitted) && forms.settings.priority.$invalid" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END PRIORITY -->\n		</div>\n		<div id="Hangup" class="app-settings" ng-slide-down="main.app.value == \'Hangup\'" lazy-render duration="1">\n			<!-- START HANGUPCAUSE -->\n			<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.hangupCause.$touched || forms.settings.$submitted) && forms.settings.hangupCause.$invalid}">\n				<label class="control-label">{{\'APPLICATION_HANGUP_CAUSE\' | translate}}<span class="required" aria-required="true">*</span></label>\n				<ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" theme="bootstrap" name="hangupCause" required>\n					<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n					<ui-select-choices repeat="hangupCause.value as hangupCause in $application.hangupCauses | filter: $select.search">\n						{{hangupCause.name | translate}}\n					</ui-select-choices>\n				</ui-select>\n				<span data-ng-show="(forms.settings.hangupCause.$touched || forms.settings.$submitted) && forms.settings.hangupCause.$error.required" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END HANGUPCAUSE -->\n		</div>\n		<div id="Set" class="app-settings" ng-slide-down="main.app.value == \'Set\'" lazy-render duration="1">\n			<!-- START VARIABLE -->\n			<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.variable.$touched || forms.settings.$submitted) && forms.settings.variable.$invalid}">\n				<label class="control-label">{{ \'APPLICATION_VARIABLE\' | translate }}<span class="required" aria-required="true">*</span></label>\n				<input type="text" name="variable" placeholder="" class="form-control" data-ng-model="application.variable" data-ng-change="updateSetAppdataSettings()" required>\n				<span data-ng-show="(forms.settings.variable.$touched || forms.settings.$submitted) && forms.settings.variable.$invalid && forms.settings.variable.$error.required" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END VARIABLE -->\n\n			<!-- START VARVALUE -->\n			<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.varvalue.$touched || forms.settings.$submitted) && forms.settings.varvalue.$invalid}">\n				<label class="control-label">{{ \'APPLICATION_VALUE\' | translate }}<span class="required" aria-required="true">*</span></label>\n				<input type="text" name="varvalue" placeholder="" class="form-control" data-ng-model="application.value" data-ng-change="updateSetAppdataSettings()" required>\n				<span data-ng-show="(forms.settings.varvalue.$touched || forms.settings.$submitted) && forms.settings.varvalue.$invalid && forms.settings.varvalue.$error.required" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END VARVALUE -->\n		</div>\n		<div id="Custom" class="app-settings" ng-slide-down="main.app.type == \'custom\'" lazy-render duration="1">\n\n			<!-- START CUSTOMAPP -->\n			<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.customApp.$touched || forms.settings.$submitted) && forms.settings.customApp.$invalid}">\n				<label class="control-label">{{ \'APPLICATION_CUSTOM_APP\' | translate }}<span class="required" aria-required="true">*</span></label>\n				<input type="text" name="customApp" placeholder="{{ \'APPLICATION_CUSTOM_APP\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].app" required>\n				<span data-ng-show="(forms.settings.customApp.$touched || forms.settings.$submitted) && forms.settings.customApp.$invalid && forms.settings.customApp.$error.required" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END CUSTOMAPP -->\n\n			<!-- START APPDATA -->\n			<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.appdata.$touched || forms.settings.$submitted) && forms.settings.appdata.$invalid}">\n				<label class="control-label">{{ \'APPLICATION_ARGUMENTS\' | translate }}</label>\n				<input type="text" name="appdata" placeholder="{{ \'APPLICATION_ARGUMENTS\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[0]">\n				<span data-ng-show="(forms.settings.appdata.$touched || forms.settings.$submitted) && forms.settings.appdata.$invalid && forms.settings.appdata.$error.required" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END APPDATA -->\n		</div>\n		<div id="Voicemail" class="app-settings" ng-slide-down="main.app.value == \'Voicemail\'" lazy-render duration="1">\n			<!-- START VOICEMAIL -->\n			<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.voicemail.$touched || forms.settings.$submitted) && forms.settings.voicemail.$invalid}">\n				<label class="control-label">{{ \'APPLICATION_MAILBOX\' | translate }}@{{ \'APPLICATION_CONTEXT\' | translate }}<span class="required" aria-required="true">*</span></label>\n				<ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" theme="bootstrap" name="voicemail" required data-ng-disabled="!items.length">\n					<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.mailbox}}</ui-select-match>\n					<ui-select-choices repeat="mailbox.mailbox+\'@\'+mailbox.context as mailbox in items | filter: $select.search">\n						<div ng-bind-html="mailbox.mailbox | highlight: $select.search"></div>\n					</ui-select-choices>\n				</ui-select>\n				<div class="note note-warning" data-ng-hide="items.length">\n					<h4 class="block">Warning!</h4>\n					<p>\n						{{ \'MESSAGE_NO_VOICEMAILS_AVAILABLE\' | translate }}\n					</p>\n					<p>\n						{{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/voice/voicemails/list">{{\'APPLICATION_VOICEMAILS\' | translate}}</a>\n					</p>\n				</div>\n				<span data-ng-show="(forms.settings.voicemail.$touched || forms.settings.$submitted) && forms.settings.voicemail.$invalid && forms.settings.voicemail.$error.required" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END VOICEMAIL -->\n\n			<!-- START OPTIONS -->\n			<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n				<label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}</label>\n				<input type="text" name="app_options" placeholder="{{ \'APPLICATION_OPTIONS\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n			</div>\n			<!-- END OPTIONS -->\n\n		</div>\n		<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n	</form>\n</wz-step>\n<wz-step title="{{\'APPLICATION_INTERVAL\' | translate}}" canexit="formValidation(forms.interval.IntervalId.$valid || forms.interval.hasOwnProperty(\'t_from\') || forms.interval.intType.$modelValue === \'always\')">\n	<form name="forms.interval" novalidate>\n		<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n		<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n		<!-- START INTERVAL_TYPE -->\n		<div class="form-group" data-ng-class="{\'has-error\': (forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$invalid}">\n			<label class="control-label">{{\'APPLICATION_INTERVAL_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n			<ui-select data-ng-model="interval.intType" theme="bootstrap" name="intType" required>\n				<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n				<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n					{{intType.name | translate}}\n				</ui-select-choices>\n			</ui-select>\n			<span data-ng-show="(forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$error.required" class="help-block help-block-error">\n				<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n			</span>\n		</div>\n		<!-- END INTERVAL_TYPE -->\n		<div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'custom\'" lazy-render duration="1">\n			<!-- START TIME -->\n			<div class="form-group">\n				<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n				<div class="input-group input-large">\n					<fieldset class="pull-left" ng-disabled="interval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="interval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n					<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n					<fieldset ng-disabled="interval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="interval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n				</div>\n			</div>\n			<!-- END TIME -->\n\n			<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="interval.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n			<!-- START ALWAYS -->\n			<div class="form-group">\n				<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n				<div class="input-group input-large">\n					<label class="control-label pointer-cursor">\n						<input\n							bs-switch\n							data-ng-model="interval.alwaysTime"\n							type="checkbox"\n							switch-active="{{ alwaysSwitch.isActive }}"\n							switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n							switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n							switch-on-color="{{ alwaysSwitch.onColor }}"\n							switch-off-color="{{ alwaysSwitch.offColor }}"\n							switch-animate="{{ alwaysSwitch.animate }}"\n							switch-size="{{ alwaysSwitch.size }}"\n							switch-label="{{ alwaysSwitch.label }}"\n							switch-icon="{{ alwaysSwitch.icon }}"\n							switch-radio-off="{{ alwaysSwitch.radioOff }}"\n							switch-label-width="{{ alwaysSwitch.labelWidth }}"\n							switch-handle-width="{{ alwaysSwitch.handleWidth }}">\n					</label>\n				</div>\n			</div>\n			<!-- END ALWAYS -->\n\n			<!-- START WEEKDAY -->\n			<div class="form-group">\n				<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n				<div class="input-group input-large">\n					<ui-select data-ng-model="interval.wd_from" theme="bootstrap" name="wd_from">\n						<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n						<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n							{{weekDay.name | translate}}\n						</ui-select-choices>\n					</ui-select>\n					<span class="input-group-addon">to</span>\n					<ui-select data-ng-model="interval.wd_to" theme="bootstrap" name="wd_to">\n						<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n						<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n							{{weekDay.name | translate}}\n						</ui-select-choices>\n					</ui-select>\n				</div>\n			</div>\n			<!-- END WEEKDAY -->\n\n			<!-- START MONTHDAY -->\n			<div class="form-group">\n				<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n				<div class="input-group input-large">\n					<ui-select data-ng-model="interval.md_from" theme="bootstrap" name="md_from">\n						<ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n						<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n							{{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n						</ui-select-choices>\n					</ui-select>\n					<span class="input-group-addon">to</span>\n					<ui-select data-ng-model="interval.md_to" theme="bootstrap" name="md_to">\n						<ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n						<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n							{{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n						</ui-select-choices>\n					</ui-select>\n				</div>\n			</div>\n			<!-- END MONTHDAY -->\n\n			<!-- START MONTH -->\n			<div class="form-group">\n				<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n				<div class="input-group input-large">\n					<ui-select data-ng-model="interval.m_from" theme="bootstrap" name="m_from">\n						<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n						<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n							{{month.name | translate}}\n						</ui-select-choices>\n					</ui-select>\n					<span class="input-group-addon">to</span>\n					<ui-select data-ng-model="interval.m_to" theme="bootstrap" name="m_to">\n						<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n						<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n							{{month.name | translate}}\n						</ui-select-choices>\n					</ui-select>\n				</div>\n			</div>\n			<!-- END MONTH -->\n		</div>\n\n		<div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'list\'" lazy-render duration="1">\n\n			<!-- START INTERVALS -->\n			<div class="form-group" data-ng-class="{\'has-error\': (forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$invalid}">\n				<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n				<ui-select data-ng-model="interval.IntervalId" theme="bootstrap" name="IntervalId" required>\n					<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n					<ui-select-choices repeat="interval.id as interval in Intervals | filter: $select.search">\n						{{interval.name | translate}}\n					</ui-select-choices>\n				</ui-select>\n				<span data-ng-show="(forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$error.required" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END INTERVALS -->\n\n		</div>\n		<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n		<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n	</form>\n</wz-step>\n\n<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n	<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n	<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n	<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n</wz-step>\n</wizard>\n</div>\n</div>\n<!-- END Portlet PORTLET-->\n</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/channels/voice/voicemail/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-envelope-letter"></i>\n					<a href="#">{{ \'APPLICATION_VOICEMAILS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-envelope-letter font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_VOICEMAILS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="/channels/voice/voicemails/wizard">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_VOICEMAIL\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/voicemail/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getVoicemail()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-envelope-letter"></i>\n					<a href="/channels/voice/voicemails/list">{{ \'APPLICATION_VOICEMAILS\' | translate }}</a>\n					<i data-ng-show="voicemail" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="voicemail">\n					<a href="#">{{voicemail.mailbox}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/voicemail.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{voicemail.mailbox}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.voicemails.view.settings\')}">\n							<a data-ng-href="/channels/voice/voicemails/view/{{voicemail.uniqueid}}/settings"><i class="icon-settings"></i>{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.voicemails.view.messages\')}">\n							<a data-ng-href="/channels/voice/voicemails/view/{{voicemail.uniqueid}}/messages"><i class="icon-speech"></i>{{ \'APPLICATION_MESSAGES\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET main.channels -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/voicemail/view/view.messages.html",'<div class="row" data-ng-init="getMessages()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title  tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_MESSAGES\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns data-ng-if="gridOptions" ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/voice/voicemail/view/view.settings.html",'<div class="row" data-ng-init="getContexts()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_VOICEMAIL\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_ADVANCED\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateVoiceVoicemail()" novalidate>\n\n							<!-- START FULLNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.fullname.$invalid}">\n								<label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="fullname" placeholder="{{\'APPLICATION_FULLNAME\' | translate}}" class="form-control" data-ng-model="voicemail.fullname" required/>\n								<span data-ng-show="forms.general.$submitted && forms.general.fullname.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END FULLNAME -->\n\n							<!-- START EMAIL -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.email.$invalid}">\n								<label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="voicemail.email" required/>\n								<span data-ng-show="forms.general.$submitted && forms.general.host.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END EMAIL -->\n\n							<!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NEW_PASSWORD\' | translate}}</label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="voicemail.password" />\n								<span data-ng-show="forms.general.$submitted && forms.general.password.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n							<!-- START CONFIRM PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.rpassword.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}</label>\n								<input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="voicemail.rpassword" nx-equal="voicemail.password"/>\n								<span data-ng-show="forms.general.$submitted && (forms.general.rpassword.$invalid || forms.general.rpassword.$invalid)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONFIRM PASSWORD -->\n\n							<!-- START MAILBOX -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.mailbox.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MAILBOX\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="mailbox" placeholder="{{\'APPLICATION_MAILBOX\' | translate}}" class="form-control" data-ng-model="voicemail.mailbox" required readonly/>\n								<span data-ng-show="forms.general.$submitted && forms.general.mailbox.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MAILBOX -->\n\n							<!-- START CONTEXT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="voicemail.context" name="context" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="context.name as context in voiceContexts | filter: $select.search">\n										<div ng-bind-html="context.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONTEXT -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n					<!-- ADVANCED TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.advanced" data-ng-submit="forms.general.$valid && forms.advanced.$valid && updateVoiceVoicemail()" novalidate>\n\n							<!-- START TIMEZONE -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.advanced.$submitted && forms.advanced.tz.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIMEZONE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="mailbox" placeholder="{{\'APPLICATION_TIMEZONE\' | translate}}" class="form-control" data-ng-model="voicemail.tz" required/>\n								<span data-ng-show="forms.advanced.$submitted && forms.advanced.tz.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIMEZONE -->\n\n							<!-- START ATTACH -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.attach.$touched || forms.advanced.$submitted) && forms.advanced.attach.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ATTACH\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="voicemail.attach"\n								type="checkbox"\n								switch-active="{{ switch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ switch.onColor }}"\n								switch-off-color="{{ switch.offColor }}"\n								switch-animate="{{ switch.animate }}"\n								switch-size="{{ switch.size }}"\n								switch-label="{{ switch.label }}"\n								switch-icon="{{ switch.icon }}"\n								switch-radio-off="{{ switch.radioOff }}"\n								switch-label-width="{{ switch.labelWidth }}"\n								switch-handle-width="{{ switch.handleWidth }}">\n							</div>\n							<!-- END ATTACH -->\n\n							<!-- START ENVELOPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.envelope.$touched || forms.advanced.$submitted) && forms.advanced.envelope.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ENVELOPE\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="voicemail.envelope"\n								type="checkbox"\n								switch-active="{{ switch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ switch.onColor }}"\n								switch-off-color="{{ switch.offColor }}"\n								switch-animate="{{ switch.animate }}"\n								switch-size="{{ switch.size }}"\n								switch-label="{{ switch.label }}"\n								switch-icon="{{ switch.icon }}"\n								switch-radio-off="{{ switch.radioOff }}"\n								switch-label-width="{{ switch.labelWidth }}"\n								switch-handle-width="{{ switch.handleWidth }}">\n							</div>\n							<!-- END ENVELOPE -->\n\n							<!-- START DELETE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.delete.$touched || forms.advanced.$submitted) && forms.advanced.delete.$invalid}">\n								<label class="control-label">{{\'APPLICATION_DELETE\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="voicemail.delete"\n								type="checkbox"\n								switch-active="{{ switch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ switch.onColor }}"\n								switch-off-color="{{ switch.offColor }}"\n								switch-animate="{{ switch.animate }}"\n								switch-size="{{ switch.size }}"\n								switch-label="{{ switch.label }}"\n								switch-icon="{{ switch.icon }}"\n								switch-radio-off="{{ switch.radioOff }}"\n								switch-label-width="{{ switch.labelWidth }}"\n								switch-handle-width="{{ switch.handleWidth }}">\n							</div>\n							<!-- END DELETE -->\n\n							<!-- START EMAIL_BODY -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_EMAIL_BODY\' | translate}}</label>\n								<textarea type="text" name="emailbody" placeholder="{{\'APPLICATION_EMAIL_BODY\' | translate}}" class="form-control" data-ng-model="voicemail.emailbody"></textarea>\n							</div>\n							<!-- END EMAIL_BODY -->\n\n							<!-- START EMAIL_SUBJECT -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_EMAIL_SUBJECT\' | translate}}</label>\n								<textarea type="text" name="emailsubject" placeholder="{{\'APPLICATION_EMAIL_SUBJECT\' | translate}}" class="form-control" data-ng-model="voicemail.emailsubject"></textarea>\n							</div>\n							<!-- END EMAIL_SUBJECT -->\n\n							<!-- START MAX_SECONDS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.maxsecs.$touched || forms.advanced.$submitted) && forms.advanced.maxsecs.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MAX_SECONDS\' | translate}}</label>\n								<input type="number" min="0" name="maxsecs" placeholder="{{\'APPLICATION_MAX_SECONDS\' | translate}}" class="form-control" data-ng-model="voicemail.maxsecs" required/>\n								<span data-ng-show="(forms.advanced.maxsecs.$touched || forms.advanced.$submitted) && forms.advanced.maxsecs.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MAX_SECONDS -->\n\n							<!-- START MAX_MESSAGES -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.maxmsg.$touched || forms.advanced.$submitted) && forms.advanced.maxmsg.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MAX_MESSAGES\' | translate}}</label>\n								<input type="number" min="0" name="maxmsg" placeholder="{{\'APPLICATION_MAX_MESSAGES\' | translate}}" class="form-control" data-ng-model="voicemail.maxmsg" required/>\n								<span data-ng-show="(forms.advanced.maxmsg.$touched || forms.advanced.$submitted) && forms.advanced.maxmsg.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MAX_MESSAGES -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/voice/voicemail/wizard/wizard.html",'<div class="col-md-12" data-ng-init="initWizard()">\n  <!-- BEGIN PAGE HEADER-->\n	<div class="page-bar">\n		<ul class="page-breadcrumb">\n			<li>\n				<i class="icon-rocket"></i>\n				<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="fa fa-spinner"></i>\n				<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-earphones-alt"></i>\n				<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-envelope-letter"></i>\n				<a href="/channels/voice/voicemails/list">{{ \'APPLICATION_VOICEMAILS\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-options"></i>\n				<a href="#">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n			</li>\n		</ul>\n	</div>\n  <!-- END PAGE HEADER-->\n\n  <!-- BEGIN PORTLET-->\n  <div class="portlet light bordered" data-ng-init="getFirstFreeMailbox()">\n  	<div class="portlet-title">\n  		<div class="caption font-green-sharp">\n  			<i class="icon-envelope-letter font-green-sharp"></i>\n  			<span class="caption-subject">{{ \'APPLICATION_VOICEMAIL\' | translate }} WIZARD</a> </span>\n  		</div>\n  	</div>\n  	<div class="portlet-body">\n  		<wizard on-finish="createItem()">\n				<wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(form.general.$valid)">\n			    <form name="form.general" novalidate>\n\n						<!-- START FULLNAME -->\n						<div class="form-group" data-ng-class="{\'has-error\': form.general.$submitted && form.general.fullname.$invalid}">\n							<label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="fullname" placeholder="{{\'APPLICATION_FULLNAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n							<span data-ng-show="form.general.$submitted && form.general.fullname.$invalid" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END FULLNAME -->\n\n						<!-- START EMAIL -->\n						<div class="form-group" data-ng-class="{\'has-error\': form.general.$submitted && form.general.email.$invalid}">\n							<label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="item.email" required/>\n							<span data-ng-show="form.general.$submitted && form.general.host.$invalid" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END EMAIL -->\n\n						<!-- START PASSWORD -->\n						<div class="form-group" data-ng-class="{\'has-error\': form.general.$submitted && form.general.password.$invalid}">\n							<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n							<span data-ng-show="form.general.$submitted && form.general.password.$invalid" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END PASSWORD -->\n\n						<!-- START CONFIRM PASSWORD -->\n						<div class="form-group" data-ng-class="{\'has-error\': form.general.$submitted && form.general.rpassword.$invalid}">\n							<label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.rpassword" nx-equal="item.password" required/>\n							<span data-ng-show="form.general.$submitted && (form.general.rpassword.$invalid || form.general.rpassword.$invalid)" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n							</span>\n						</div>\n						<!-- END CONFIRM PASSWORD -->\n\n						<!-- START MAILBOX -->\n						<div class="form-group" data-ng-class="{\'has-error\': form.general.$submitted && form.general.mailbox.$invalid}">\n							<label class="control-label">{{\'APPLICATION_MAILBOX\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="mailbox" placeholder="{{\'APPLICATION_MAILBOX\' | translate}}" class="form-control" data-ng-model="item.mailbox" required readonly/>\n							<span data-ng-show="form.general.$submitted && form.general.mailbox.$invalid" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END MAILBOX -->\n\n						<button class="btn green-haze" type="submit" ng-click="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n					</form>\n				</wz-step>\n\n				<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n					<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n					<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n					<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n				</wz-step>\n  		</wizard>\n  	</div>\n  </div>\n  <!-- END PORTLET-->\n</div>\n'),a.put("app/contactmanager/company/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_COMPANY\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.company" novalidate>\n    <div class="row">\n      <div class="col-md-6">\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.name.$touched || forms.company.$submitted) && forms.company.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.cmopany.name.$touched || forms.company.$submitted) && forms.company.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START VAT -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.vat.$touched || forms.company.$submitted) && forms.company.vat.$invalid}">\n      <label class="control-label">{{\'APPLICATION_VAT\' | translate}}</label>\n      <input type="text" name="vat" placeholder="{{\'APPLICATION_VAT\' | translate}}" class="form-control" data-ng-model="item.vat"/>\n      <span data-ng-show="(forms.cmopany.vat.$touched || forms.company.$submitted) && forms.company.vat.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END VAT -->\n\n    <!-- START COMPANYID -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.companyId.$touched || forms.company.$submitted) && forms.company.companyId.$invalid}">\n      <label class="control-label">{{\'APPLICATION_COMPANY_ID\' | translate}}</label>\n      <input type="text" name="companyId" placeholder="{{\'APPLICATION_COMPANY_ID\' | translate}}" class="form-control" data-ng-model="item.companyId"/>\n      <span data-ng-show="(forms.cmopany.companyId.$touched || forms.company.$submitted) && forms.company.companyId.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END COMPANYID -->\n\n    <!-- START WEBSITE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.website.$touched || forms.company.$submitted) && forms.company.website.$invalid}">\n      <label class="control-label">{{\'APPLICATION_WEBSITE\' | translate}}</label>\n      <input type="text" name="website" placeholder="{{\'APPLICATION_WEBSITE\' | translate}}" class="form-control" data-ng-model="item.website"/>\n      <span data-ng-show="(forms.cmopany.website.$touched || forms.company.$submitted) && forms.company.website.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END WEBSITE -->\n\n    <!-- START EMAIL -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.email.$touched || forms.company.$submitted) && forms.company.email.$invalid}">\n      <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}</label>\n      <input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="item.email"/>\n      <span data-ng-show="(forms.cmopany.email.$touched || forms.company.$submitted) && forms.company.email.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END EMAIL -->\n\n  </div>\n  <div class="col-md-6">\n    <!-- START PHONE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.phone.$touched || forms.company.$submitted) && forms.company.phone.$invalid}">\n      <label class="control-label">{{\'APPLICATION_PHONE\' | translate}}</label>\n      <input type="text" name="phone" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="item.phone"/>\n      <span data-ng-show="(forms.cmopany.phone.$touched || forms.company.$submitted) && forms.company.phone.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END PHONE -->\n\n    <!-- START FAX -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.fax.$touched || forms.company.$submitted) && forms.company.fax.$invalid}">\n      <label class="control-label">{{\'APPLICATION_FAX\' | translate}}</label>\n      <input type="text" name="fax" placeholder="{{\'APPLICATION_FAX\' | translate}}" class="form-control" data-ng-model="item.fax"/>\n      <span data-ng-show="(forms.cmopany.fax.$touched || forms.company.$submitted) && forms.company.fax.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END FAX -->\n\n    <!-- START TYPE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.type.$touched || forms.company.$submitted) && forms.company.type.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TYPE\' | translate}}</label>\n      <input type="text" name="type" placeholder="{{\'APPLICATION_TYPE\' | translate}}" class="form-control" data-ng-model="item.type"/>\n      <span data-ng-show="(forms.cmopany.type.$touched || forms.company.$submitted) && forms.company.type.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TYPE -->\n\n    <!-- START DOMAIN -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.emailDomain.$touched || forms.company.$submitted) && forms.company.emailDomain.$invalid}">\n      <label class="control-label">{{\'APPLICATION_EMAIL_DOMAIN\' | translate}}</label>\n      <input type="text" name="domain" placeholder="{{\'APPLICATION_EMAIL_DOMAIN\' | translate}}" class="form-control" data-ng-model="item.emailDomain"/>\n      <span data-ng-show="(forms.cmopany.emailDomain.$touched || forms.company.$submitted) && forms.company.emailDomain.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END DOMAIN -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n  </div>\n</div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.company.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),
-a.put("app/contactmanager/company/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-users"></i>\n					<a href="#">{{ \'APPLICATION_CONTACT_MANAGER\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-briefcase"></i>\n					<a href="/contactmanager/companies/list">{{ \'APPLICATION_COMPANIES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-briefcase font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_COMPANIES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="create()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_COMPANY\' | translate }}\n						</button>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/contactmanager/company/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getCompany()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-users"></i>\n					<a href="#">{{ \'APPLICATION_CONTACT_MANAGER\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-briefcase"></i>\n					<a href="/contactmanager/companies/list">{{ \'APPLICATION_COMPANIES\' | translate }}</a>\n					<i data-ng-show="company" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="company">\n					<a href="#">{{company.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/company.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{company.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.contactmanager.companies.view.settings\')}">\n							<a data-ng-href="/contactmanager/companies/view/{{company.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/contactmanager/company/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_COMPANY\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_ADDRESS\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_SHIPMENT_ADDRESS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateCompany()" novalidate>\n							<div class="row">\n								<div class="col-md-6">\n									<!-- START NAME -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n										<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="company.name" required/>\n										<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END NAME -->\n\n									<!-- START VAT -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.vat.$touched || forms.general.$submitted) && forms.general.vat.$invalid}">\n										<label class="control-label">{{\'APPLICATION_VAT\' | translate}}</label>\n										<input type="text" name="vat" placeholder="{{\'APPLICATION_VAT\' | translate}}" class="form-control" data-ng-model="company.vat"/>\n										<span data-ng-show="(forms.cmopany.vat.$touched || forms.general.$submitted) && forms.general.vat.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END VAT -->\n\n									<!-- START COMPANYID -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.companyId.$touched || forms.general.$submitted) && forms.general.companyId.$invalid}">\n										<label class="control-label">{{\'APPLICATION_COMPANY_ID\' | translate}}</label>\n										<input type="text" name="companyId" placeholder="{{\'APPLICATION_COMPANY_ID\' | translate}}" class="form-control" data-ng-model="company.companyId"/>\n										<span data-ng-show="(forms.cmopany.companyId.$touched || forms.general.$submitted) && forms.general.companyId.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END COMPANYID -->\n\n									<!-- START WEBSITE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.website.$touched || forms.general.$submitted) && forms.general.website.$invalid}">\n										<label class="control-label">{{\'APPLICATION_WEBSITE\' | translate}}</label>\n										<input type="text" name="website" placeholder="{{\'APPLICATION_WEBSITE\' | translate}}" class="form-control" data-ng-model="company.website"/>\n										<span data-ng-show="(forms.cmopany.website.$touched || forms.general.$submitted) && forms.general.website.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END WEBSITE -->\n\n									<!-- START EMAIL -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.email.$touched || forms.general.$submitted) && forms.general.email.$invalid}">\n										<label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}</label>\n										<input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="company.email"/>\n										<span data-ng-show="(forms.cmopany.email.$touched || forms.general.$submitted) && forms.general.email.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END EMAIL -->\n								</div>\n								<div class="col-md-6">\n									<!-- START PHONE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.phone.$touched || forms.general.$submitted) && forms.general.phone.$invalid}">\n										<label class="control-label">{{\'APPLICATION_PHONE\' | translate}}</label>\n										<input type="text" name="phone" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="company.phone"/>\n										<span data-ng-show="(forms.cmopany.phone.$touched || forms.general.$submitted) && forms.general.phone.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END PHONE -->\n\n									<!-- START FAX -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.fax.$touched || forms.general.$submitted) && forms.general.fax.$invalid}">\n										<label class="control-label">{{\'APPLICATION_FAX\' | translate}}</label>\n										<input type="text" name="fax" placeholder="{{\'APPLICATION_FAX\' | translate}}" class="form-control" data-ng-model="company.fax"/>\n										<span data-ng-show="(forms.cmopany.fax.$touched || forms.general.$submitted) && forms.general.fax.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END FAX -->\n\n									<!-- START TYPE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.type.$touched || forms.general.$submitted) && forms.general.type.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}</label>\n										<input type="text" name="type" placeholder="{{\'APPLICATION_TYPE\' | translate}}" class="form-control" data-ng-model="company.type"/>\n										<span data-ng-show="(forms.cmopany.type.$touched || forms.general.$submitted) && forms.general.type.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END TYPE -->\n\n									<!-- START DOMAIN -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.emailDomain.$touched || forms.general.$submitted) && forms.general.emailDomain.$invalid}">\n										<label class="control-label">{{\'APPLICATION_EMAIL_DOMAIN\' | translate}}</label>\n										<input type="text" name="domain" placeholder="{{\'APPLICATION_EMAIL_DOMAIN\' | translate}}" class="form-control" data-ng-model="company.emailDomain"/>\n										<span data-ng-show="(forms.cmopany.emailDomain.$touched || forms.general.$submitted) && forms.general.emailDomain.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END DOMAIN -->\n\n									<!-- START DESCRIPTION -->\n									<div class="form-group">\n										<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n										<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="company.description"></textarea>\n									</div>\n									<!-- END DESCRIPTION -->\n								</div>\n							</div>\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.address" data-ng-submit="forms.address.$valid && updateCompany()" novalidate>\n							<!-- START STREET -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.address.street.$touched || forms.address.$submitted) && forms.address.street.$invalid}">\n								<label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n								<input type="text" name="street" placeholder="{{\'APPLICATION_STREET\' | translate}}" class="form-control" data-ng-model="company.street"/>\n								<span data-ng-show="(forms.address.street.$touched || forms.address.$submitted) && forms.address.street.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END STREET -->\n\n							<!-- START POSTALCODE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.address.postalCode.$touched || forms.address.$submitted) && forms.address.postalCode.$invalid}">\n								<label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n								<input type="text" name="postalCode" placeholder="{{\'APPLICATION_POSTALCODE\' | translate}}" class="form-control" data-ng-model="company.postalCode"/>\n								<span data-ng-show="(forms.address.postalCode.$touched || forms.address.$submitted) && forms.address.postalCode.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END POSTALCODE -->\n\n							<!-- START CITY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.address.city.$touched || forms.address.$submitted) && forms.address.city.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n								<input type="text" name="city" placeholder="{{\'APPLICATION_CITY\' | translate}}" class="form-control" data-ng-model="company.city"/>\n								<span data-ng-show="(forms.address.city.$touched || forms.address.$submitted) && forms.address.city.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CITY -->\n							<!-- START COUNTRY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.address.country.$touched || forms.address.$submitted) && forms.address.country.$invalid}">\n								<label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n								<input type="text" name="country" placeholder="{{\'APPLICATION_COUNTRY\' | translate}}" class="form-control" data-ng-model="company.country"/>\n								<span data-ng-show="(forms.address.country.$touched || forms.address.$submitted) && forms.address.country.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END COUNTRY -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<div class="tab-pane" id="tab_1_3">\n						<form name="forms.shipmentAddress" data-ng-submit="forms.shipmentAddress.$valid && updateCompany()" novalidate>\n							<!-- START STREET -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.shipmentAddress.sStreet.$touched || forms.shipmentAddress.$submitted) && forms.shipmentAddress.sStreet.$invalid}">\n								<label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n								<input type="text" name="sStreet" placeholder="{{\'APPLICATION_STREET\' | translate}}" class="form-control" data-ng-model="company.sStreet"/>\n								<span data-ng-show="(forms.shipmentAddress.sStreet.$touched || forms.shipmentAddress.$submitted) && forms.shipmentAddress.sStreet.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END STREET -->\n\n							<!-- START POSTALCODE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.shipmentAddress.sPostalCode.$touched || forms.shipmentAddress.$submitted) && forms.shipmentAddress.sPostalCode.$invalid}">\n								<label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n								<input type="text" name="sPostalCode" placeholder="{{\'APPLICATION_POSTALCODE\' | translate}}" class="form-control" data-ng-model="company.sPostalCode"/>\n								<span data-ng-show="(forms.shipmentAddress.sPostalCode.$touched || forms.shipmentAddress.$submitted) && forms.shipmentAddress.sPostalCode.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END POSTALCODE -->\n\n							<!-- START CITY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.shipmentAddress.sCity.$touched || forms.shipmentAddress.$submitted) && forms.shipmentAddress.sCity.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n								<input type="text" name="sCity" placeholder="{{\'APPLICATION_CITY\' | translate}}" class="form-control" data-ng-model="company.sCity"/>\n								<span data-ng-show="(forms.shipmentAddress.sCity.$touched || forms.shipmentAddress.$submitted) && forms.shipmentAddress.sCity.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CITY -->\n							<!-- START COUNTRY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.shipmentAddress.sCountry.$touched || forms.shipmentAddress.$submitted) && forms.shipmentAddress.sCountry.$invalid}">\n								<label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n								<input type="text" name="sCountry" placeholder="{{\'APPLICATION_COUNTRY\' | translate}}" class="form-control" data-ng-model="company.sCountry"/>\n								<span data-ng-show="(forms.shipmentAddress.sCountry.$touched || forms.shipmentAddress.$submitted) && forms.shipmentAddress.sCountry.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END COUNTRY -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/contactmanager/contact/list/copy.modal.html",'<div class="modal-header" data-ng-init="getLists()">\n  <h3 class="modal-title">{{ \'APPLICATION_COPY_CONTACT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.copy" novalidate>\n        <!-- START LIST -->\n        <div class="form-group" data-ng-class="{\'has-error\': forms.csv.ListId.$invalid && forms.csv.$submitted}">\n          <label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n          <ui-select data-ng-model="item.ListId" theme="bootstrap" name="ListId" data-ng-disabled="disabled" data-ng-change="getCustomFields()" required>\n            <ui-select-match placeholder="{{ \'APPLICATION_LIST\' | translate }}">{{$select.selected.name}}</ui-select-match>\n            <ui-select-choices repeat="list.id as list in lists | filter: $select.search">\n              <div ng-bind-html="list.name | highlight: $select.search"></div>\n            </ui-select-choices>\n          </ui-select>\n          <span data-ng-show="forms.csv.ListId.$invalid && forms.csv.$submitted" class="help-block help-block-error">\n            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n          </span>\n        </div>\n        <!-- END LIST -->\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.copy.$invalid || !forms.copy.ListId">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/contactmanager/contact/list/import.modal.html",'<div class="modal-header" data-ng-init="getLists();getCompanies();">\n  <h3 class="modal-title">{{ \'APPLICATION_IMPORT_FROM_CSV\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.csv" novalidate>\n    <div class="row">\n      <div class="col-md-6">\n        <!-- START LIST -->\n        <div class="form-group" data-ng-class="{\'has-error\': forms.csv.ListId.$invalid && forms.csv.$submitted}">\n          <label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n          <ui-select data-ng-model="item.ListId" theme="bootstrap" name="ListId" data-ng-disabled="disabled" data-ng-change="getCustomFields()">\n            <ui-select-match placeholder="{{ \'APPLICATION_LIST\' | translate }}">{{$select.selected.name}}</ui-select-match>\n            <ui-select-choices repeat="list.id as list in lists | filter: $select.search">\n              <div ng-bind-html="list.name | highlight: $select.search"></div>\n            </ui-select-choices>\n          </ui-select>\n          <span data-ng-show="forms.csv.ListId.$invalid && forms.csv.$submitted" class="help-block help-block-error">\n            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n          </span>\n        </div>\n        <!-- END LIST -->\n\n        <!-- START FIRSTNAME -->\n        <div class="form-group" data-ng-class="{\'has-error\': forms.csv.firstName.$invalid && forms.csv.$submitted}">\n          <label class="control-label">{{\'APPLICATION_FIRSTNAME\' | translate}}</label>\n          <ui-select data-ng-model="item.firstName" theme="bootstrap" name="firstName" data-ng-disabled="disabled" required>\n            <ui-select-match allow-clear placeholder="{{ \'APPLICATION_FIRSTNAME\' | translate }}">{{$select.selected}}</ui-select-match>\n            <ui-select-choices repeat="index in indexes | filter: $select.search">\n              <div ng-bind-html="index | highlight: $select.search"></div>\n            </ui-select-choices>\n          </ui-select>\n          <span data-ng-show="forms.csv.firstName.$invalid && forms.csv.$touched" class="help-block help-block-error">\n            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n          </span>\n        </div>\n        <!-- END FIRSTNAME -->\n\n        <!-- START LASTNAME -->\n        <div class="form-group" data-ng-class="{\'has-error\': forms.csv.lastName.$invalid && forms.csv.$submitted}">\n          <label class="control-label">{{\'APPLICATION_LASTNAME\' | translate}}</label>\n          <ui-select data-ng-model="item.lastName" theme="bootstrap" name="lastName" data-ng-disabled="disabled">\n            <ui-select-match allow-clear placeholder="{{ \'APPLICATION_LASTNAME\' | translate }}">{{$select.selected}}</ui-select-match>\n            <ui-select-choices repeat="index in indexes | filter: $select.search">\n              <div ng-bind-html="index | highlight: $select.search"></div>\n            </ui-select-choices>\n          </ui-select>\n          <span data-ng-show="forms.csv.lastName.$invalid && forms.csv.$touched" class="help-block help-block-error">\n            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n          </span>\n        </div>\n        <!-- END LASTNAME -->\n\n    <!-- START STREET -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.street.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n      <ui-select data-ng-model="item.street" theme="bootstrap" name="street" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_STREET\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.street.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END STREET -->\n\n    <!-- START POSTALCODE -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.postalCode.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n      <ui-select data-ng-model="item.postalCode" theme="bootstrap" name="postalCode" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_POSTALCODE\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.postalCode.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END POSTALCODE -->\n\n    <!-- START CITY -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.city.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n      <ui-select data-ng-model="item.city" theme="bootstrap" name="city" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_CITY\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.city.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END CITY -->\n\n    <!-- START PHONE -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.phone.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_PHONE\' | translate}}</label>\n      <ui-select data-ng-model="item.phone" theme="bootstrap" name="phone" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_PHONE\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.phone.$invalid && forms.phone.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END PHONE -->\n\n    <!-- START MOBILE -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.mobile.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_MOBILE\' | translate}}</label>\n      <ui-select data-ng-model="item.mobile" theme="bootstrap" name="mobile" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_MOBILE\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.mobile.$invalid && forms.mobile.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END MOBILE -->\n\n  </div>\n  <div class="col-md-6">\n\n    <!-- START COUNTRY -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.country.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n      <ui-select data-ng-model="item.country" theme="bootstrap" name="country" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_COUNTRY\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.country.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END COUNTRY -->\n\n    <!-- START DATEOFBIRTH -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.dateOfBirth.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_DATEOFBIRTH\' | translate}}</label>\n      <ui-select data-ng-model="item.dateOfBirth" theme="bootstrap" name="dateOfBirth" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_DATEOFBIRTH\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.dateOfBirth.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END DATEOFBIRTH -->\n\n    <!-- START TAGS -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.tags.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_TAGS\' | translate}}</label>\n      <ui-select multiple data-ng-model="item.tags" theme="bootstrap" name="tags" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_TAGS\' | translate }}">{{$item}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.tags.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TAGS -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.description.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <ui-select data-ng-model="item.description" theme="bootstrap" name="description" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_DESCRIPTION\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.description.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END DESCRIPTION -->\n\n    <!-- START FAX -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.fax.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_FAX\' | translate}}</label>\n      <ui-select data-ng-model="item.fax" theme="bootstrap" name="fax" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_FAX\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.fax.$invalid && forms.fax.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END FAX -->\n\n    <!-- START EMAIL -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.email.$invalid && forms.general.$submitted}">\n      <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}</label>\n      <ui-select data-ng-model="item.email" theme="bootstrap" name="email" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_EMAIL\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.email.$invalid && forms.csv.$submitted" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END EMAIL -->\n\n    <!-- START COMPANY -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.CompanyId.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_COMPANY\' | translate}}</label>\n      <ui-select data-ng-model="item.CompanyId" theme="bootstrap" name="CompanyId" data-ng-disabled="!companies.length">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_COMPANY\' | translate }}">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="company.id as company in companies | filter: $select.search">\n          <div ng-bind-html="company.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <div class="note note-warning" data-ng-hide="companies.length">\n        <h4 class="block">Warning!</h4>\n        <p>\n          {{ \'MESSAGE_NO_COMPANIES_AVAILABLE\' | translate }}\n        </p>\n      </div>\n      <span data-ng-show="forms.csv.CompanyId.$invalid && forms.csv.$submitted" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END COMPANY -->\n\n  </div>\n  </div>\n\n  <!-- START CUSTOMFIELDS -->\n  <div data-ng-repeat="customField in customFields">\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv[customField.name].$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{customField.alias}}</label>\n      <ui-select data-ng-model="item[customField.name]" theme="bootstrap" name="{{customField.name}}" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{customField.alias}}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv[customField.name].$invalid && forms.csv.$submitted" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n  </div>\n  <!-- END CUSTOMFIELDS -->\n\n  <div>\n    <p>{{\'APPLICATION_IMPORT_SUCCEEDED\' | translate}}: {{import.succeeded}}/{{csvLength}}</p>\n    <div class="progress progress-sm" style="">\n      <div class="progress-bar progress-bar-info" role="progressbar" ng-style="{ \'width\': import.success + \'%\' }"></div>\n    </div>\n  </div>\n  <div>\n    <p>{{\'APPLICATION_IMPORT_FAILED\' | translate}}: {{import.failed}}/{{csvLength}}</p>\n    <div class="progress progress-sm" style="">\n      <div class="progress-bar progress-bar-danger" role="progressbar" ng-style="{ \'width\': import.fail + \'%\' }"></div>\n    </div>\n  </div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="start()" ng-disabled="forms.csv.$invalid || !forms.csv.firstName || submitted">{{ \'APPLICATION_SUBMIT\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="close()" data-ng-if="!importing">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="stop()" data-ng-if="importing">{{ \'APPLICATION_STOP\' | translate }}</button>\n</div>\n'),
-a.put("app/contactmanager/contact/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-users"></i>\n					<a href="#">{{ \'APPLICATION_CONTACT_MANAGER\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-users"></i>\n					<a href="/contactmanager/contacts/list">{{ \'APPLICATION_CONTACTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="fa fa-users font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_CONTACTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length && !Auth.isAgent()">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle" data-ng-click="newContact();">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONTACT\' | translate }}\n						</button>\n						<span class="btn default btn-file" data-ng-if="!Auth.isAgent()">\n						<span class="fileinput-new">\n						<i class="icon-cloud-upload"></i> {{\'APPLICATION_IMPORT_FROM_CSV\' | translate}}</span>\n						<input type="file" accept=".csv" nv-file-select="" uploader="uploader"/>\n						</span>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div data-ng-if="gridOptions"  ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/contactmanager/list/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_LIST\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.list" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.list.name.$touched || forms.list.$submitted) && forms.list.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.list.name.$touched || forms.list.$submitted) && forms.list.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.list.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/contactmanager/list/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-users"></i>\n					<a href="#">{{ \'APPLICATION_CONTACT_MANAGER\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-list-ul"></i>\n					<a href="/contactmanager/lists/list">{{ \'APPLICATION_LISTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="fa fa-list-ul font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_LISTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="create()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_LIST\' | translate }}\n						</button>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/contactmanager/list/view/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CUSTOM_FIELD\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.customField" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.customField.name.$touched || forms.customField.$submitted) && forms.customField.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.alias" required/>\n      <span data-ng-show="(forms.customField.name.$touched || forms.customField.$submitted) && forms.customField.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START TYPE -->\n    <div class="form-group"  data-ng-class="{\'has-error\': (forms.customField.type.$touched || forms.customField.$submitted) && forms.customField.type.$invalid}">\n      <label class="control-label">{{ \'APPLICATION_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.type" name="type" theme="bootstrap" required>\n        <ui-select-match placeholder="{{ \'APPLICATION_TYPE\' | translate }}">{{$translate.instant($select.selected.name)}}</ui-select-match>\n        <ui-select-choices repeat="type.value as type in types| filter: $select.search">\n          {{$translate.instant(type.name)}}\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(forms.customField.type.$touched || forms.customField.$submitted) && forms.customField.type.$invalid && forms.customField.type.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TYPE -->\n\n    <div ng-slide-down="item.type == \'select\'" lazy-render duration="1">\n      <div>\n        <label class="control-label">{{\'APPLICATION_CHOICES\' | translate}}</label>\n      </div>\n      <div class="padding-bottom" ng-repeat="choice in choices">\n        <div class="form-group">\n          <div class="input-group">\n            <input type="text" class="form-control" ng-model="choice.value" required>\n            <span class="input-group-btn">\n            <button class="btn red" type="button"data-ng-click="removeField($index)" data-ng-disabled="choices.length<=1"><i class="fa fa-times"></i></button>\n            </span>\n          </div>\n        </div>\n      </div>\n      <button type="button" class="btn btn-sm green padding-bottom" ng-click="addField()">\n        <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CHOICE\' | translate}}\n      </button>\n\n    </div>\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.customField.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/contactmanager/list/view/view.agents.html",'<div class="row" data-ng-init="getTeams()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="note note-warning" data-ng-hide="teams.length">\n				<h4 class="block">Warning!</h4>\n				<p>\n					 {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\n				</p>\n			</div>\n			<div class="portlet-body">\n				<!-- BEGIN FORM-->\n				<form action="index.html" class="form-horizontal form-row-seperated">\n					<div class="form-body">\n						<div class="form-group last">\n							<div class="col-md-12" id="multi-select-team">\n							</div>\n						</div>\n					</div>\n				</form>\n				<!-- END FORM-->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/contactmanager/list/view/view.customFieldSettings.html",'<div class="row" data-ng-init="getCustomField()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_CUSTOM_FIELD\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n			</div>\n\n			<div class="portlet-body">\n					<!-- GENERAL TAB -->\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateCustomField()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="customField.alias" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<div ng-slide-down="customField.type == \'select\'" lazy-render duration="1" class="mbottom20">\n								<div>\n									<label class="control-label">{{\'APPLICATION_CHOICES\' | translate}}</label>\n								</div>\n								<div class="padding-bottom" ng-repeat="choice in choices">\n									<div class="form-group">\n										<div class="input-group">\n											<input type="text" class="form-control" ng-model="choice.value" required>\n											<span class="input-group-btn">\n											<button class="btn red" type="button"data-ng-click="removeField($index)" data-ng-disabled="choices.length<=1"><i class="fa fa-times"></i></button>\n											</span>\n										</div>\n									</div>\n								</div>\n								<button type="button" class="btn btn-sm green padding-bottom" ng-click="addField()">\n									<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CHOICE\' | translate}}\n								</button>\n\n							</div>\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="customField.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/contactmanager/list/view/view.customFields.html",'<div ui-view class="profile-content">\n<div class="row" data-ng-init="initCustomFields()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title  tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CUSTOM_FIELDS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n          <div class="btn-group">\n            <button class="btn green-jungle " ng-click="create()">\n              <i class="icon-plus"></i> {{ \'APPLICATION_NEW_CUSTOM_FIELD\' | translate }}\n            </button>\n          </div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/contactmanager/list/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getList()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-users"></i>\n					<a href="#">{{ \'APPLICATION_CONTACT_MANAGER\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-list-ul"></i>\n					<a href="/contactmanager/lists/list">{{ \'APPLICATION_LISTS\' | translate }}</a>\n					<i data-ng-show="list" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="list">\n					<a href="#">{{list.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/list.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{list.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.contactmanager.lists.view.settings\')}">\n							<a data-ng-href="/contactmanager/lists/view/{{list.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-if="!list.defaultEntry" data-ng-class="{active: $state.is(\'main.contactmanager.lists.view.agents\')}">\n							<a data-ng-href="/contactmanager/lists/view/{{list.id}}/agents">\n							<i class="icon-people"></i>\n							{{ \'APPLICATION_AGENTS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.contactmanager.lists.view.customfields\')}">\n							<a data-ng-href="/contactmanager/lists/view/{{list.id}}/customfields">\n							<i class="icon-pencil"></i>\n							{{ \'APPLICATION_CUSTOM_FIELDS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/contactmanager/list/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_LIST\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateList()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="list.name" data-ng-disabled="list.defaultEntry" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="list.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/dashboard/chat/chat.html",'<div data-ng-switch="Auth.getRole()">\n  <div ng-switch-when="agent" data-ng-init="initAgent()">\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table1" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table1.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table2" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table2.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n  </div>\n  <div ng-switch-default>\n    <fieldset>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_TODAY_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-md-8">\n       <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'waiting\')">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="fa fa-play"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{waiting || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_WAITING_NEW\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'open\')">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-bell"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{open || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'unmanaged\')">\n          <div class="dashboard-stat green">\n            <div class="visual">\n              <i class="icon-options"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{unmanaged || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_UNMANAGED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'closed\')">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-like"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{closed || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'abandoned\')">\n          <div class="dashboard-stat yellow-crusta">\n            <div class="visual">\n              <i class="icon-dislike"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{abandoned || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_ABANDONED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" >\n          <div class="dashboard-stat yellow-casablanca">\n            <div class="visual">\n              <i class="icon-calculator"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{new+open+unmanaged+closed+abandoned || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TOTAL\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n    <div class="col-md-4">\n      <!-- <div class="portlet light bordered">\n        <div class="portlet-body"> -->\n          <canvas class="chart chart-pie"  chart-data="charts.interactions.values" chart-labels="charts.interactions.labels" chart-colours="charts.interactions.colours" chart-legend="true">\n          </canvas>\n        <!-- </div>\n      </div> -->\n    </div>\n    </div>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_INTERACTION_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'timeout\')">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-dislike"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{timeout || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TIMEOUT\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'waiting\')">\n          <div class="dashboard-stat purple">\n            <div class="visual">\n              <i class="icon-hourglass"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{waiting || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_WAITING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </fieldset>\n\n  </div>\n</div>\n'),a.put("app/dashboard/dashboard.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" id="dashboardView">\n	<div class="col-md-12" >\n		<div>\n			<nav class="navbar navbar-default" role="navigation">\n				<div class="navbar-header">\n					<button type="button" class="navbar-toggle" data-ng-init="navCollapsed = true" data-ng-click="navCollapsed = !navCollapsed">\n						<span class="sr-only">Toggle navigation</span>\n						<span class="icon-bar"></span>\n						<span class="icon-bar"></span>\n						<span class="icon-bar"></span>\n					</button>\n				</div>\n\n				<!-- Collect the nav links, forms, and other content for toggling -->\n				<div class="collapse navbar-collapse" ng-class="!navCollapsed && \'in\'" >\n					<ul class="nav navbar-nav">\n						<li data-ng-class="{active: $state.is(\'main.dashboard.voice\')}">\n							<a href="/dashboard/voice">\n								<b class=\'icon-earphones-alt\'></b>\n								{{ \'APPLICATION_VOICE\' | translate }}\n							</a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.dashboard.chat\'),\'disabled-link\':!license.chat}" data-ng-if="::((Auth.isAdmin() || Auth.isAgent() || userModules[8]))">\n							<a href="{{license.chat ? \'/dashboard/chat\' : \'#\'}}" class="disable-target">\n								<b class=\'icon-bubble\'></b>\n								{{ \'APPLICATION_CHAT\' | translate }}\n							</a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.dashboard.mail\'),\'disabled-link\':!license.mail}" data-ng-if="::((Auth.isAdmin() || Auth.isAgent() || userModules[9]))">\n							<a href="{{license.mail ? \'/dashboard/mail\' : \'#\'}}" class="disable-target">\n								<b class=\'icon-envelope\'></b>\n								{{ \'APPLICATION_MAIL\' | translate }}\n							</a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.dashboard.fax\'),\'disabled-link\':!license.fax}" data-ng-if="::((Auth.isAdmin() || Auth.isAgent() || userModules[10]))">\n							<a href="{{license.fax ? \'/dashboard/fax\' : \'#\'}}" class="disable-target">\n								<b class=\'fa fa-fax\'></b>\n								{{ \'APPLICATION_FAX\' | translate }}\n							</a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.dashboard.sms\'),\'disabled-link\':!license.messaging}" data-ng-if="::((Auth.isAdmin() || Auth.isAgent() || userModules[11]))">\n							<a href="{{license.messaging ? \'/dashboard/sms\' : \'#\'}}" class="disable-target">\n								<b class=\'glyphicon glyphicon-comment\'></b>\n								{{ \'APPLICATION_SMS\' | translate }}\n							</a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.dashboard.openchannel\'),\'disabled-link\':!license.openchannel}" data-ng-if="::((Auth.isAdmin() || Auth.isAgent() || userModules[20]))">\n							<a href="{{license.messaging ? \'/dashboard/openchannel\' : \'#\'}}" class="disable-target">\n								<b class=\'icon-globe\'></b>\n								{{ \'APPLICATION_OPEN_CHANNEL\' | translate }}\n							</a>\n						</li>\n					</ul>\n				</div>\n				<!-- /.navbar-collapse -->\n			</nav>\n		</div>\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/dashboard/fax/fax.html",'<div data-ng-switch="Auth.getRole()">\n  <div ng-switch-when="agent" data-ng-init="initAgent()">\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table1" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table1.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table2" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table2.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n  </div>\n  <div ng-switch-default>\n    <fieldset>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_TODAY_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-md-8">\n       <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'new\')">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="fa fa-play"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{new || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_NEW\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'open\')">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-bell"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{open || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'pending\')">\n          <div class="dashboard-stat green">\n            <div class="visual">\n              <i class="icon-options"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{pending || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_PENDING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'closed\')">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-like"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{closed || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" >\n          <div class="dashboard-stat yellow-casablanca">\n            <div class="visual">\n              <i class="icon-calculator"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{new+open+pending+closed || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TOTAL\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n    <div class="col-md-4">\n      <!-- <div class="portlet light bordered">\n        <div class="portlet-body"> -->\n          <canvas class="chart chart-pie"  chart-data="charts.interactions.values" chart-labels="charts.interactions.labels" chart-colours="charts.interactions.colours" chart-legend="true">\n          </canvas>\n        <!-- </div>\n      </div> -->\n    </div>\n    </div>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_INTERACTION_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'timeout\')">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-dislike"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{timeout || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TIMEOUT\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'waiting\')">\n          <div class="dashboard-stat purple">\n            <div class="visual">\n              <i class="icon-hourglass"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{waiting || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_WAITING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </fieldset>\n\n  </div>\n</div>\n'),
-a.put("app/dashboard/mail/mail.html",'<div data-ng-switch="Auth.getRole()">\n  <div ng-switch-when="agent" data-ng-init="initAgent()">\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table1" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table1.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table2" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table2.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n  </div>\n  <div ng-switch-default>\n    <fieldset>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_TODAY_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-md-8">\n       <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'new\')">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="fa fa-play"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{new || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_NEW\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'open\')">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-bell"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{open || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'pending\')">\n          <div class="dashboard-stat green">\n            <div class="visual">\n              <i class="icon-options"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{pending || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_PENDING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'closed\')">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-like"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{closed || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" >\n          <div class="dashboard-stat yellow-casablanca">\n            <div class="visual">\n              <i class="icon-calculator"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{new+open+pending+closed || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TOTAL\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n    <div class="col-md-4">\n      <!-- <div class="portlet light bordered">\n        <div class="portlet-body"> -->\n          <canvas class="chart chart-pie"  chart-data="charts.interactions.values" chart-labels="charts.interactions.labels" chart-colours="charts.interactions.colours" chart-legend="true">\n          </canvas>\n        <!-- </div>\n      </div> -->\n    </div>\n    </div>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_INTERACTION_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'timeout\')">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-dislike"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{timeout || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TIMEOUT\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'waiting\')">\n          <div class="dashboard-stat purple">\n            <div class="visual">\n              <i class="icon-hourglass"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{waiting || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_WAITING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </fieldset>\n\n  </div>\n</div>\n'),a.put("app/dashboard/openchannel/openchannel.html",'<div data-ng-switch="Auth.getRole()">\n  <div ng-switch-when="agent" data-ng-init="initAgent()">\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table1" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table1.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table2" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table2.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n  </div>\n  <div ng-switch-default>\n    <fieldset>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_TODAY_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-md-8">\n       <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'new\')">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="fa fa-play"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{new || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_NEW\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'open\')">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-bell"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{open || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'pending\')">\n          <div class="dashboard-stat green">\n            <div class="visual">\n              <i class="icon-options"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{pending || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_PENDING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'closed\')">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-like"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{closed || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" >\n          <div class="dashboard-stat yellow-casablanca">\n            <div class="visual">\n              <i class="icon-calculator"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{new+open+pending+closed || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TOTAL\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n    <div class="col-md-4">\n      <!-- <div class="portlet light bordered">\n        <div class="portlet-body"> -->\n          <canvas class="chart chart-pie"  chart-data="charts.interactions.values" chart-labels="charts.interactions.labels" chart-colours="charts.interactions.colours" chart-legend="true">\n          </canvas>\n        <!-- </div>\n      </div> -->\n    </div>\n    </div>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_INTERACTION_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'timeout\')">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-dislike"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{timeout || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TIMEOUT\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'waiting\')">\n          <div class="dashboard-stat purple">\n            <div class="visual">\n              <i class="icon-hourglass"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{waiting || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_WAITING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </fieldset>\n\n  </div>\n</div>\n'),a.put("app/dashboard/sms/sms.html",'<div data-ng-switch="Auth.getRole()">\n  <div ng-switch-when="agent" data-ng-init="initAgent()">\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table1" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table1.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table2" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table2.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n  </div>\n  <div ng-switch-default>\n    <fieldset>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_TODAY_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-md-8">\n       <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'new\')">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="fa fa-play"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{new || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_NEW\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'open\')">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-bell"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{open || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'pending\')">\n          <div class="dashboard-stat green">\n            <div class="visual">\n              <i class="icon-options"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{pending || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_PENDING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'closed\')">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-like"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{closed || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" >\n          <div class="dashboard-stat yellow-casablanca">\n            <div class="visual">\n              <i class="icon-calculator"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{new+open+pending+closed || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TOTAL\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n    <div class="col-md-4">\n      <!-- <div class="portlet light bordered">\n        <div class="portlet-body"> -->\n          <canvas class="chart chart-pie"  chart-data="charts.interactions.values" chart-labels="charts.interactions.labels" chart-colours="charts.interactions.colours" chart-legend="true">\n          </canvas>\n        <!-- </div>\n      </div> -->\n    </div>\n    </div>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_INTERACTION_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'timeout\')">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-dislike"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{timeout || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TIMEOUT\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'waiting\')">\n          <div class="dashboard-stat purple">\n            <div class="visual">\n              <i class="icon-hourglass"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{waiting || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_WAITING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </fieldset>\n\n  </div>\n</div>\n'),a.put("app/dashboard/voice/voice.html",'<div data-ng-switch="Auth.getRole()">\n  <div ng-switch-when="agent" data-ng-init="initAgent()">\n    <div class="portlet light">\n      <div class="portlet-body">\n        <!-- START TABLE -->\n        <div ui-grid="table1" name="table1" ui-grid-resize-columns ui-grid-pagination ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table1.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n\n    <div class="portlet light">\n      <div class="portlet-title tabbable-line">\n        <ul class="nav nav-tabs">\n          <li class="active">\n            <a href="#" data-target="#tab_1_a" data-toggle="tab">{{\'APPLICATION_WAITING\' | translate}}</a>\n          </li>\n          <li>\n            <a href="#" data-target="#tab_1_b" data-toggle="tab">{{\'APPLICATION_ABANDONED\' | translate}}</a>\n          </li>\n        </ul>\n      </div>\n      <div class="portlet-body" data-ng-init="initView()">\n        <div class="tab-content">\n          <div class="tab-pane active" id="tab_1_a">\n            <!-- START TABLE -->\n            <div ui-grid="table2" name="table2" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n              <div class="watermark" data-ng-show="!table2.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n            </div>\n            <!-- END TABLE -->\n          </div>\n          <div class="tab-pane" id="tab_1_b">\n            <!-- START TABLE -->\n            <div ui-grid="table3" name="table3" ui-grid-resize-columns ui-grid-pagination ui-grid-auto-resize class="ui-grid">\n              <div class="watermark" data-ng-show="!table3.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n            </div>\n          <!-- END TABLE -->\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n  <div ng-switch-default data-ng-init="initUser()">\n    <fieldset>\n      <legend>\n        <span class="caption-subject">{{ \'APPLICATION_INBOUND\' | translate }}</span><small class="font-grey-cascade pull-right">{{ \'APPLICATION_TODAY_STATS\' | translate }}</small>\n      </legend>\n\n      <div class="row">\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-bell"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ voice.waiting || 0 }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_WAITING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="fa fa-play"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ voice.active || 0 }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ACTIVE\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="icon-like"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ voice.complete || 0 }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ANSWERED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-dislike"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ voice.abandon || 0 }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ABANDONED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n\n      <div class="row">\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-clock"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ (voice.avgAnswerTime || 0) | secToTime | date:\'HH:mm:ss\' }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_AVG_ANSWER_TIME\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-clock"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ (voice.avgTalkTime || 0) | secToTime | date:\'HH:mm:ss\' }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_AVG_TALK_TIME\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="icon-pie-chart"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ (voice.answerRate || 0) | number:2}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ANSWER_RATE\' | translate}} (%)\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-pie-chart"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ (voice.abandonRate || 0) | number:2}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ABANDON_RATE\' | translate}} (%)\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n\n      <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-info"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ voice.totalOffered || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TOTAL_OFFERED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-info"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ voice.unmanaged || 0 }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_UNMANAGED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </fieldset>\n\n    <fieldset>\n      <legend>\n        <span class="caption-subject">{{ \'APPLICATION_OUTBOUND\' | translate }}</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_TODAY_STATS\' | translate }}</small>\n      </legend>\n\n      <div class="row">\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-call-out"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ voice.outbound.manualOutbound || 0 }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_MANUAL_OUTBOUND\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-clock"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ (voice.outbound.globalDuration || 0) | secToTime | date:\'HH:mm:ss\' }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_GLOBAL_DURATION\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="icon-like"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ voice.outbound.answered || 0 }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ANSWERED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-pie-chart"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ (voice.outbound.avgDuration || 0) | secToTime | date:\'HH:mm:ss\' }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_AVG_DURATION\' | translate}} (%)\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n\n      <div class="row">\n        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-pie-chart"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ (voice.outbound.answerRate || 0) | number:2 }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ANSWER_RATE\' | translate}} (%)\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n\n    </fieldset>\n  </div>\n</div>\n'),a.put("app/desk/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-handbag"></i>\n					<a href="/desk/list">{{ \'APPLICATION_DESK_COM\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-handbag font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_DESK_COM\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="accounts.checked.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/desk/wizard">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n						</a>\n					</div>\n					<a class="btn btn-icon-only btn-default" href="#" ng-csv="getAccounts([\'name\',\'username\',\'remoteUri\',\'authType\',\'consumerKey\',\'consumerSecret\',\'token\',\'tokenSecret\',\'password\'])" csv-header="[\'Name\', \'Username\', \'Remote Address\', \'Authentication Type\', \'Consumer Key\', \'Consumer Secret\', \'Token\', \'Token Secret\', \'Password\']" field-separator=";" filename="desk_accounts.csv">\n					<i class="icon-cloud-download"></i></a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<table st-table="displayedDeskAccounts" st-pipe="initList" class="table table-striped table-bordered table-hover">\n					<div class="table-responsive">\n					  <thead>\n							<tr>\n								<th colspan="7">\n									<div class="row">\n										<div class="col-md-6">\n											<ui-select class="input-xsmall" ng-model="conf.accountsByPage" theme="bootstrap" ng-disabled="disabled">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n												<ui-select-choices repeat="accountByPage in accountsByPage | filter: $select.search">\n													<div ng-bind-html="accountByPage.name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n										</div>\n										<div class="col-md-6">\n											<div class="input-group input-medium pull-right">\n												<input st-search placeholder="{{ \'APPLICATION_SEARCH\' | translate }}" class="form-control" type="search" />\n												<span class="input-group-addon">\n													<i class="fa fa-search"></i>\n												</span>\n											</div>\n										</div>\n									</div>\n								</th>\n							</tr>\n						  <tr>\n								<th class="small-cells" style="text-align: center; vertical-align: middle"><input type="checkbox" ng-change="check(account, checked)" checklist-model checklist-value="id"></th>\n						    <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n						    <th st-sort="username">{{ \'APPLICATION_EMAIL\' | translate }}</th>\n								<th st-sort="remoteUri">{{ \'APPLICATION_REMOTE_ADDRESS\' | translate }}</th>\n								<th>{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n								<th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n						  </tr>\n					  </thead>\n					  <tbody>\n					    <tr data-ng-repeat="account in displayedDeskAccounts" class="animate-repeat">\n								<td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="accounts.checked" checklist-value="account.id"></td>\n					      <td>{{account.name}}</td>\n					      <td>{{account.username}}</td>\n								<td>{{account.remoteUri}}</td>\n								<td>{{account.description}}</td>\n					      <td>\n					        <a class="btn default btn-xs blue-stripe" data-ng-href="/desk/view/{{account.id}}/account">\n										{{ \'APPLICATION_EDIT\' | translate }}\n					        </a>\n									<a class="btn default btn-xs green-stripe" data-ng-click="checkAccount(account.id)">\n										{{ \'APPLICATION_CHECK\' | translate }}\n					        </a>\n					        <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(account.name,account.id)">\n										{{ \'APPLICATION_DELETE\' | translate }}\n					        </a>\n					      </td>\n					    </tr>\n							<tr data-ng-hide="displayedDeskAccounts.length">\n								<td colspan="7" style="text-align:center;">\n									<i>No account available</i>\n								</td>\n							</tr>\n					  </tbody>\n					  <tfoot>\n							<tr>\n								<td/>\n						    <td>\n									<div class="input-icon right">\n										<i class="fa fa-search"></i>\n										<input st-search="name" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_NAME\' | translate | lowercase}}" class="form-control" type="search"/>\n									</div>\n						    </td>\n						    <td>\n									<div class="input-icon right">\n										<i class="fa fa-search"></i>\n										<input st-search="email" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_EMAIL\' | translate | lowercase}}" class="form-control" type="search"/>\n									</div>\n						    </td>\n						    <td>\n									<div class="input-icon right">\n										<i class="fa fa-search"></i>\n										<input st-search="remoteUri" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_REMOTE_ADDRESS\' | translate | lowercase}}" class="form-control" type="search"/>\n									</div>\n						    </td>\n						    <td/>\n								<td/>\n						  </tr>\n					    <tr>\n					      <td colspan="7" class="text-center">\n									<div class="pagination" st-pagination st-items-by-page="conf.accountsByPage.value" st-displayed-pages="7"></div>\n					      </td>\n					    </tr>\n					  </tfoot>\n					</div>\n				</table>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/desk/view/view.account.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START AUTH TYPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.authType.$invalid}">\n								<label class="control-label">{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}</label>\n								<ui-select data-ng-model="account.authType" name="authType" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="type in [\'basic\', \'oauth\'] | filter: $select.search">\n										<div data-ng-bind="type | capitalize | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="forms.formSetting.authType.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- START AUTH TYPE -->\n\n              <!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}" ng-slide-down="account.authType == \'basic\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n								<span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n							<!-- START CONSUMER KEY -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.consumerKey.$invalid}" ng-slide-down="account.authType == \'oauth\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_CONSUMER_KEY\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="consumerKey" placeholder="{{\'APPLICATION_CONSUMER_KEY\' | translate}}" class="form-control" data-ng-model="account.consumerKey" required/>\n								<span data-ng-show="forms.formSetting.consumerKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONSUMER KEY -->\n\n              <!-- START CONSUMER SECRET -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.consumerSecret.$invalid}" ng-slide-down="account.authType == \'oauth\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_CONSUMER_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="consumerSecret" placeholder="{{\'APPLICATION_CONSUMER_SECRET\' | translate}}" class="form-control" data-ng-model="account.consumerSecret" required/>\n								<span data-ng-show="forms.formSetting.consumerSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONSUMER SECRET -->\n\n              <!-- START TOKEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.token.$invalid}" ng-slide-down="account.authType == \'oauth\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="token" placeholder="{{\'APPLICATION_TOKEN\' | translate}}" class="form-control" data-ng-model="account.token" required/>\n								<span data-ng-show="forms.formSetting.token.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TOKEN -->\n\n              <!-- START TOKEN SECRET-->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.tokenSecret.$invalid}" ng-slide-down="account.authType == \'oauth\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_TOKEN_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="tokenSecret" placeholder="{{\'APPLICATION_TOKEN_SECRET\' | translate}}" class="form-control" data-ng-model="account.tokenSecret" required/>\n								<span data-ng-show="forms.formSetting.tokenSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TOKEN SECRET-->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/desk/view/view.configuration.html",'<div class="row" data-ng-init="initConfiguration()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_CONFIGURATION\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createConfiguration()">\n	        <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="formValidation(formsConfiguration.info.$valid)">\n							<form name="formsConfiguration.info" novalidate>\n								<!-- START NAME -->\n								<div class="form-group" data-ng-class="{\'has-error\': formsConfiguration.info.$submitted && formsConfiguration.info.name.$invalid}">\n									<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="configuration.name" required/>\n									<span data-ng-show="formsConfiguration.info.name.$invalid && formsConfiguration.info.$submitted" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END NAME -->\n								<!-- START DESCRIPTION -->\n								<div class="form-group">\n									<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n									<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="configuration.description"/>\n								</div>\n								<!-- END DESCRIPTION -->\n\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n							</form>\n						</wz-step>\n\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/desk/view/view.configurationSettings.html",'<div class="row" data-ng-init="getConfiguration();getVariables();getFields();">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\n					</li>\n          <li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\n					</li>\n          <li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- SUBJECT TAB -->\n					<div class="tab-pane ui-padding active" id="tab_1_1">\n            <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by blank space:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemSubject()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n	            <div class="row" data-ng-repeat="subjectItem in subjectConfig">\n	              <div class="col-md-3">\n	                <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n	                  <ui-select-choices repeat="item in fieldType | filter: $select.search">\n	                    <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\n	                <div class="form-group">\n	                  <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\n	                </div>\n	              </div>\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END SUBJECT TAB -->\n          <!-- DESCRIPTION TAB -->\n					<div class="tab-pane ui-padding" id="tab_1_2">\n						<div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by new line:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemDescription()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n							<div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\n								<!-- <pre>\n									{{descriptionItem|json}}\n								</pre> -->\n	              <div class="col-md-2">\n	                <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n	                  <ui-select-choices repeat="item in descFieldType | filter: $select.search">\n	                    <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\n	                <div class="form-group">\n	                  <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\n	                </div>\n	              </div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n									<input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\n								</div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n									<ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n	                  <ui-select-choices repeat="item in fieldType | filter: $select.search">\n	                    <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n								</div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'string\'">\n									<input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\n								</div>\n	              <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'variable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END DESCRIPTION TAB -->\n          <!-- FIELDS TAB -->\n					<div class="tab-pane ui-padding" id="tab_1_3">\n						<div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemField()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n	            <div class="row" data-ng-repeat="fieldItem in fieldConfig">\n	              <div class="col-md-3">\n	                <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\n	                  <ui-select-choices repeat="item.id as item in accountFields | filter: $select.search">\n	                    <div ng-bind-html="item.label | highlight: $select.search"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\n	                <div class="form-group">\n										<ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected}}</ui-select-match>\n		                  <ui-select-choices repeat="item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\n		                    <div ng-bind-html="item | highlight: $select.search"></div>\n		                  </ui-select-choices>\n		                </ui-select>\n	                </div>\n	              </div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\n									<div class="form-group">\n										<ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n		                  <ui-select-choices repeat="item in fieldType | filter: $select.search">\n		                    <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n		                  </ui-select-choices>\n		                </ui-select>\n									</div>\n								</div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\n	                <div class="form-group">\n										<input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\n	                </div>\n	              </div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\n	                <div class="form-group">\n										<ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END FIELDS TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/desk/view/view.configurations.html",'<div ui-view class="profile-content">\n	<div class="row" data-ng-init="getConfigurations()">\n		<div class="col-md-12">\n			<div class="portlet light">\n				<div class="portlet-title  tabbable-line">\n					<div class="caption caption-md">\n						<i class="icon-globe theme-font hide"></i>\n						<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATIONS\' | translate}}</span>\n					</div>\n					<div class="actions">\n						<div class="btn-group">\n							<a class="btn green-jungle " href="/desk/view/{{account.id}}/configuration" data-toggle="dropdown">\n								<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}\n							</a>\n						</div>\n					</div>\n				</div>\n				<div class="portlet-body">\n					<!-- START TABLE -->\n					<table class="table table-striped table-bordered table-hover">\n						  <thead>\n							  <tr>\n							    <th>{{\'APPLICATION_NAME\' | translate}}</th>\n									<th>{{\'APPLICATION_DESCRIPTION\' | translate}}</th>\n									<th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n							  </tr>\n						  </thead>\n							<tbody>\n						    <tr data-ng-repeat="configuration in configurations">\n									<td>{{configuration.name}}</td>\n									<td>{{configuration.description}}</td>\n						      <td>\n										<a class="btn default btn-xs blue-stripe" data-ng-href="/desk/view/{{account.id}}/configurations/settings/{{configuration.id}}">\n											{{ \'APPLICATION_SETTINGS\' | translate}}\n						        </a>\n						        <a class="btn default btn-xs red-stripe" data-ng-click="deleteConfiguration(configuration.name,configuration.id)">\n											{{ \'APPLICATION_DELETE\' | translate }}\n						        </a>\n						      </td>\n						    </tr>\n								<tr data-ng-hide="configurations.length">\n									<td colspan="5" style="text-align:center;">\n										<i>No configuration available</i>\n									</td>\n								</tr>\n						  </tbody>\n					</table>\n					<!-- END TABLE -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/desk/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n          <i class="icon-handbag"></i>\n          <a href="/desk/list">{{ \'APPLICATION_DESK_COM\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{account.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img src="assets/images/media/desk.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{account.name}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{account.remoteUri}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.desk.view.account\')}">\n							<a ng-href="/desk/view/{{account.id}}/account">\n							<i class="icon-user"></i>\n							{{ \'APPLICATION_ACCOUNT\' | translate }} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.desk.view.configurations\') || $state.is(\'main.desk.view.configuration\')}">\n							<a ng-href="/desk/view/{{account.id}}/configurations">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_CONFIGURATIONS\' | translate }} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/desk/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-handbag"></i>\n						<a href="/desk/list">{{ \'APPLICATION_DESK_COM\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n						<form name="forms.formSetting" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.username" required ng-remote-validate="/api/desk/accounts/validate/username"/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formSetting.username.$touched || forms.formSetting.$submitted) && forms.formSetting.username.$error.ngRemoteValidate" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n				        </span>\n							</div>\n							<!-- END USERNAME -->\n\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remoteUri" required ng-remote-validate="/api/desk/accounts/validate/remoteUri"/>\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formSetting.remoteUri.$touched || forms.formSetting.$submitted) && forms.formSetting.remoteUri.$error.ngRemoteValidate" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_DOMAIN\' | translate}}.\n				        </span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START AUTH TYPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.authType.$invalid}">\n								<label class="control-label">{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}</label>\n								<ui-select data-ng-model="item.authType" name="authType" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="type in [\'basic\', \'oauth\'] | filter: $select.search">\n										<div data-ng-bind="type | capitalize | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="forms.formSetting.authType.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- START AUTH TYPE -->\n\n              <!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}" ng-slide-down="item.authType == \'basic\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n								<span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n              <!-- START CONSUMER KEY -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.consumerKey.$invalid}" ng-slide-down="item.authType == \'oauth\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_CONSUMER_KEY\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="consumerKey" placeholder="{{\'APPLICATION_CONSUMER_KEY\' | translate}}" class="form-control" data-ng-model="item.consumerKey" required/>\n								<span data-ng-show="forms.formSetting.consumerKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONSUMER KEY -->\n\n              <!-- START CONSUMER SECRET -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.consumerSecret.$invalid}" ng-slide-down="item.authType == \'oauth\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_CONSUMER_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="consumerSecret" placeholder="{{\'APPLICATION_CONSUMER_SECRET\' | translate}}" class="form-control" data-ng-model="item.consumerSecret" required/>\n								<span data-ng-show="forms.formSetting.consumerSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONSUMER SECRET -->\n\n              <!-- START TOKEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.token.$invalid}" ng-slide-down="item.authType == \'oauth\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="token" placeholder="{{\'APPLICATION_TOKEN\' | translate}}" class="form-control" data-ng-model="item.token" required/>\n								<span data-ng-show="forms.formSetting.token.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TOKEN -->\n\n              <!-- START TOKEN SECRET-->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.tokenSecret.$invalid}" ng-slide-down="item.authType == \'oauth\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_TOKEN_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="tokenSecret" placeholder="{{\'APPLICATION_TOKEN_SECRET\' | translate}}" class="form-control" data-ng-model="item.tokenSecret" required/>\n								<span data-ng-show="forms.formSetting.tokenSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TOKEN SECRET-->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n\n				</wizard>\n\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/freshdesk/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-handbag"></i>\n					<a href="/freshdesk/list">{{ \'APPLICATION_FRESHDESK\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-handbag font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_FRESHDESK\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="accounts.checked.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/freshdesk/wizard">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n						</a>\n					</div>\n					<a class="btn btn-icon-only btn-default" href="#" ng-csv="getAccounts([\'name\',\'username\',\'remoteUri\',\'apiKey\'])" csv-header="[\'Name\', \'Username\', \'Remote Address\', \'Api Key\']" field-separator=";" filename="freshdesk_accounts.csv">\n					<i class="icon-cloud-download"></i></a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<table st-table="displayedFreshdeskAccounts" st-pipe="initList" class="table table-striped table-bordered table-hover">\n					<div class="table-responsive">\n					  <thead>\n							<tr>\n								<th colspan="7">\n									<div class="row">\n										<div class="col-md-6">\n											<ui-select class="input-xsmall" ng-model="conf.accountsByPage" theme="bootstrap" ng-disabled="disabled">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n												<ui-select-choices repeat="accountByPage in accountsByPage | filter: $select.search">\n													<div ng-bind-html="accountByPage.name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n										</div>\n										<div class="col-md-6">\n											<div class="input-group input-medium pull-right">\n												<input st-search placeholder="{{ \'APPLICATION_SEARCH\' | translate }}" class="form-control" type="search" />\n												<span class="input-group-addon">\n													<i class="fa fa-search"></i>\n												</span>\n											</div>\n										</div>\n									</div>\n								</th>\n							</tr>\n						  <tr>\n								<th class="small-cells" style="text-align: center; vertical-align: middle"><input type="checkbox" ng-change="check(account, checked)" checklist-model checklist-value="id"></th>\n						    <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n						    <th st-sort="username">{{ \'APPLICATION_EMAIL\' | translate }}</th>\n								<th st-sort="remoteUri">{{ \'APPLICATION_REMOTE_ADDRESS\' | translate }}</th>\n								<th>{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n								<th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n						  </tr>\n					  </thead>\n					  <tbody>\n					    <tr data-ng-repeat="account in displayedFreshdeskAccounts" class="animate-repeat">\n								<td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="accounts.checked" checklist-value="account.id"></td>\n					      <td>{{account.name}}</td>\n					      <td>{{account.username}}</td>\n								<td>{{account.remoteUri}}</td>\n								<td>{{account.description}}</td>\n					      <td>\n					        <a class="btn default btn-xs blue-stripe" data-ng-href="/freshdesk/view/{{account.id}}/account">\n										{{ \'APPLICATION_EDIT\' | translate }}\n					        </a>\n									<a class="btn default btn-xs green-stripe" data-ng-click="checkAccount(account.id)">\n										{{ \'APPLICATION_CHECK\' | translate }}\n					        </a>\n					        <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(account.name,account.id)">\n										{{ \'APPLICATION_DELETE\' | translate }}\n					        </a>\n					      </td>\n					    </tr>\n							<tr data-ng-hide="displayedFreshdeskAccounts.length">\n								<td colspan="7" style="text-align:center;">\n									<i>No account available</i>\n								</td>\n							</tr>\n					  </tbody>\n					  <tfoot>\n							<tr>\n								<td/>\n						    <td>\n									<div class="input-icon right">\n										<i class="fa fa-search"></i>\n										<input st-search="name" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_NAME\' | translate | lowercase}}" class="form-control" type="search"/>\n									</div>\n						    </td>\n						    <td>\n									<div class="input-icon right">\n										<i class="fa fa-search"></i>\n										<input st-search="email" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_EMAIL\' | translate | lowercase}}" class="form-control" type="search"/>\n									</div>\n						    </td>\n						    <td>\n									<div class="input-icon right">\n										<i class="fa fa-search"></i>\n										<input st-search="remoteUri" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_REMOTE_ADDRESS\' | translate | lowercase}}" class="form-control" type="search"/>\n									</div>\n						    </td>\n						    <td/>\n								<td/>\n						  </tr>\n					    <tr>\n					      <td colspan="7" class="text-center">\n									<div class="pagination" st-pagination st-items-by-page="conf.accountsByPage.value" st-displayed-pages="7"></div>\n					      </td>\n					    </tr>\n					  </tfoot>\n					</div>\n				</table>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/freshdesk/view/view.account.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START API KEY -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.apiKey.$invalid}">\n								<label class="control-label">{{\'APPLICATION_API_KEY\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="apiKey" placeholder="{{\'APPLICATION_API_KEY\' | translate}}" class="form-control" data-ng-model="account.apiKey" required/>\n								<span data-ng-show="forms.formSetting.apiKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END API KEY -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/freshdesk/view/view.configuration.html",'<div class="row" data-ng-init="initConfiguration()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_CONFIGURATION\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createConfiguration()">\n	        <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="formValidation(formsConfiguration.info.$valid)">\n							<form name="formsConfiguration.info" novalidate>\n								<!-- START NAME -->\n								<div class="form-group" data-ng-class="{\'has-error\': formsConfiguration.info.$submitted && formsConfiguration.info.name.$invalid}">\n									<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="configuration.name" required/>\n									<span data-ng-show="formsConfiguration.info.name.$invalid && formsConfiguration.info.$submitted" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END NAME -->\n								<!-- START DESCRIPTION -->\n								<div class="form-group">\n									<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n									<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="configuration.description"/>\n								</div>\n								<!-- END DESCRIPTION -->\n\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n							</form>\n						</wz-step>\n\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/freshdesk/view/view.configurationSettings.html",'<div class="row" data-ng-init="getConfiguration();getVariables();getFields();">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\n					</li>\n          <li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\n					</li>\n          <li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- SUBJECT TAB -->\n					<div class="tab-pane ui-padding active" id="tab_1_1">\n            <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by blank space:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemSubject()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n	            <div class="row" data-ng-repeat="subjectItem in subjectConfig">\n	              <div class="col-md-3">\n	                <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n	                  <ui-select-choices repeat="item in fieldType | filter: $select.search">\n	                    <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\n	                <div class="form-group">\n	                  <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\n	                </div>\n	              </div>\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END SUBJECT TAB -->\n          <!-- DESCRIPTION TAB -->\n					<div class="tab-pane ui-padding" id="tab_1_2">\n						<div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by new line:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemDescription()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n							<div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\n								<!-- <pre>\n									{{descriptionItem|json}}\n								</pre> -->\n	              <div class="col-md-2">\n	                <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n	                  <ui-select-choices repeat="item in descFieldType | filter: $select.search">\n	                    <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\n	                <div class="form-group">\n	                  <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\n	                </div>\n	              </div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n									<input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\n								</div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n									<ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n	                  <ui-select-choices repeat="item in fieldType | filter: $select.search">\n	                    <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n								</div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'string\'">\n									<input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\n								</div>\n	              <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'variable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END DESCRIPTION TAB -->\n          <!-- FIELDS TAB -->\n					<div class="tab-pane ui-padding" id="tab_1_3">\n						<div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemField()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n	            <div class="row" data-ng-repeat="fieldItem in fieldConfig">\n	              <div class="col-md-3">\n	                <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\n	                  <ui-select-choices repeat="item.name as item in accountFields | filter: $select.search">\n	                    <div ng-bind-html="item.label | highlight: $select.search"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\n	                <div class="form-group">\n										<ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected[0]}}</ui-select-match>\n		                  <ui-select-choices repeat="item[0] as item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\n		                    <div ng-bind-html="item[0] | highlight: $select.search"></div>\n		                  </ui-select-choices>\n		                </ui-select>\n	                </div>\n	              </div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\n									<div class="form-group">\n										<ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n		                  <ui-select-choices repeat="item in fieldType | filter: $select.search">\n		                    <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n		                  </ui-select-choices>\n		                </ui-select>\n									</div>\n								</div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\n	                <div class="form-group">\n										<input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\n	                </div>\n	              </div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\n	                <div class="form-group">\n										<ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END FIELDS TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/freshdesk/view/view.configurations.html",'<div ui-view class="profile-content">\n	<div class="row" data-ng-init="getConfigurations()">\n		<div class="col-md-12">\n			<div class="portlet light">\n				<div class="portlet-title  tabbable-line">\n					<div class="caption caption-md">\n						<i class="icon-globe theme-font hide"></i>\n						<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATIONS\' | translate}}</span>\n					</div>\n					<div class="actions">\n						<div class="btn-group">\n							<a class="btn green-jungle " href="/freshdesk/view/{{account.id}}/configuration" data-toggle="dropdown">\n								<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}\n							</a>\n						</div>\n					</div>\n				</div>\n				<div class="portlet-body">\n					<!-- START TABLE -->\n					<table class="table table-striped table-bordered table-hover">\n						  <thead>\n							  <tr>\n							    <th>{{\'APPLICATION_NAME\' | translate}}</th>\n									<th>{{\'APPLICATION_DESCRIPTION\' | translate}}</th>\n									<th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n							  </tr>\n						  </thead>\n							<tbody>\n						    <tr data-ng-repeat="configuration in configurations">\n									<td>{{configuration.name}}</td>\n									<td>{{configuration.description}}</td>\n						      <td>\n										<a class="btn default btn-xs blue-stripe" data-ng-href="/freshdesk/view/{{account.id}}/configurations/settings/{{configuration.id}}">\n											{{ \'APPLICATION_SETTINGS\' | translate}}\n						        </a>\n						        <a class="btn default btn-xs red-stripe" data-ng-click="deleteConfiguration(configuration.name,configuration.id)">\n											{{ \'APPLICATION_DELETE\' | translate }}\n						        </a>\n						      </td>\n						    </tr>\n								<tr data-ng-hide="configurations.length">\n									<td colspan="5" style="text-align:center;">\n										<i>No configuration available</i>\n									</td>\n								</tr>\n						  </tbody>\n					</table>\n					<!-- END TABLE -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/freshdesk/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n          <i class="icon-handbag"></i>\n          <a href="/freshdesk/list">{{ \'APPLICATION_FRESHDESK\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{account.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img src="assets/images/media/freshdesk.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{account.name}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{account.remoteUri}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.freshdesk.view.account\')}">\n							<a ng-href="/freshdesk/view/{{account.id}}/account">\n							<i class="icon-user"></i>\n							{{ \'APPLICATION_ACCOUNT\' | translate }} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.freshdesk.view.configurations\') || $state.is(\'main.freshdesk.view.configuration\')}">\n							<a ng-href="/freshdesk/view/{{account.id}}/configurations">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_CONFIGURATIONS\' | translate }} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/freshdesk/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-handbag"></i>\n						<a href="/freshdesk/list">{{ \'APPLICATION_FRESHDESK\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n						<form name="forms.formSetting" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.username" required ng-remote-validate="/api/freshdesk/accounts/validate/username"/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formSetting.username.$touched || forms.formSetting.$submitted) && forms.formSetting.username.$error.ngRemoteValidate" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n				        </span>\n							</div>\n							<!-- END USERNAME -->\n\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remoteUri" required ng-remote-validate="/api/freshdesk/accounts/validate/remoteUri"/>\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n                <span data-ng-show="(forms.formSetting.remoteUri.$touched || forms.formSetting.$submitted) && forms.formSetting.remoteUri.$error.ngRemoteValidate" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_DOMAIN\' | translate}}.\n				        </span>\n							</div>\n							<!-- END USERNAME -->\n\n              <!-- START API KEY -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.apiKey.$invalid}">\n								<label class="control-label">{{\'APPLICATION_API_KEY\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="apiKey" placeholder="{{\'APPLICATION_API_KEY\' | translate}}" class="form-control" data-ng-model="item.apiKey" required/>\n								<span data-ng-show="forms.formSetting.apiKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END API KEY -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n\n				</wizard>\n\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/iframe/view/view.html",'<!-- BEGIN PAGE CONTENT-->\r\n<div class="row" data-ng-init="initView()">\r\n	<div class="col-md-12">\r\n		<div class="page-bar">\r\n			<ul class="page-breadcrumb">\r\n				<li>\r\n					<i class="icon-rocket"></i>\r\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\r\n					<i class="fa fa-angle-right"></i>\r\n				</li>\r\n				<li>\r\n					<i class="fa fa-chrome"></i>\r\n					<a href="#" data-ng-if="!Auth.isAgent()">{{ \'APPLICATION_IFRAME\' | translate }}</a>\r\n					<a href="#" data-ng-if="Auth.isAgent()">{{ iframe.title || iframe.name}}</a>\r\n				</li>\r\n			</ul>\r\n		</div>\r\n\r\n		<!-- BEGIN PROFILE SIDEBAR -->\r\n		<div class="profile-sidebar" data-ng-if="!Auth.isAgent()">\r\n			<!-- PORTLET MAIN -->\r\n			<div class="portlet light profile-sidebar-portlet">\r\n				<!-- SIDEBAR USERPIC -->\r\n				<div class="profile-image">\r\n					<img src="assets/images/media/iframe.png" class="img-responsive">\r\n				</div>\r\n				<!-- END SIDEBAR USERPIC -->\r\n				<!-- SIDEBAR USER TITLE -->\r\n				<div class="profile-usertitle">\r\n					<div class="profile-usertitle-name">\r\n						{{iframe.title}}\r\n					</div>\r\n					<div class="profile-usertitle-job">\r\n						{{ \'APPLICATION_IFRAME\' | translate }}\r\n					</div>\r\n				</div>\r\n				<!-- END SIDEBAR USER TITLE -->\r\n			</div>\r\n			<!-- END PORTLET MAIN -->\r\n		</div>\r\n		<!-- END BEGIN PROFILE SIDEBAR -->\r\n		<!-- BEGIN PROFILE CONTENT -->\r\n		<div class="profile-content" data-ng-if="!Auth.isAgent()">\r\n			<div class="row">\r\n				<div class="col-md-12">\r\n					<div class="portlet light">\r\n						<div class="portlet-title tabbable-line">\r\n							<div class="caption caption-md">\r\n								<i class="icon-globe theme-font hide"></i>\r\n								<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_IFRAME\' | translate}}</span>\r\n							</div>\r\n							<ul class="nav nav-tabs">\r\n								<li class="active">\r\n									<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\r\n								</li>\r\n							</ul>\r\n						</div>\r\n						<div class="portlet-body">\r\n							<div class="tab-content">\r\n								<!-- GENERAL TAB -->\r\n								<div class="tab-pane active" id="tab_1_1">\r\n									<form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\r\n										<!-- START NAME -->\r\n										<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\r\n											<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\r\n											<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="iframe.title" required/>\r\n											<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\r\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\r\n											</span>\r\n										</div>\r\n										<!-- END NAME -->\r\n\r\n										<!-- START REMOTE ADDRESS -->\r\n										<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\r\n											<label class="control-label">{{\'APPLICATION_URL\' | translate}} <span class="required" aria-required="true">*</span></label>\r\n											<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="iframe.remoteUri" required />\r\n											<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\r\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\r\n											</span>\r\n										</div>\r\n										<!-- END USERNAME -->\r\n\r\n										<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}" />\r\n									</form>\r\n								</div>\r\n								<!-- END GENERAL TAB -->\r\n\r\n							</div>\r\n						</div>\r\n					</div>\r\n				</div>\r\n			</div>\r\n		</div>\r\n		<!-- END PROFILE CONTENT -->\r\n\r\n		<div class="row" data-ng-if="Auth.isAgent()">\r\n			<div class="col-md-12">\r\n				<iframe ng-if="url" style="height: 600px" src="{{url}}" />\r\n			</div>\r\n		</div>\r\n\r\n	</div>\r\n</div>\r\n<!-- END PAGE CONTENT-->\r\n'),a.put("app/integration/list/list.html",'\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-game-controller"></i>\n					<a href="/integrations/list">{{ \'APPLICATION_INTEGRATIONS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initList()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-eye font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_INTEGRATIONS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n				  <span class="btn green-jungle btn-file">\n            <span> <i class="icon-plus"></i> New App </span>\n            <input type="file" accept=".zip" nv-file-select="" uploader="uploader"/>\n          </span>\n          <a class="btn btn-icon-only btn-default" href="#" ng-csv="displayedIntegrations" filename="integrations.csv">\n					<i class="icon-cloud-download"></i></a>\n					<a class="btn btn-icon-only btn-default fullscreen" href="#"></a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<table st-table="displayedIntegrations" st-safe-src="integrations" class="table table-striped table-bordered table-hover">\n					<div class="table-responsive">\n					  <thead>\n							<tr>\n								<th colspan="6">\n									<div class="row">\n										<div class="col-md-6">\n											<select class="form-control input-small select2me" data-ng-model="integrationsByPage">\n												<option value="10">10</option>\n												<option value="25">25</option>\n												<option value="50">50</option>\n												<option value="{{integrations.length}}">{{ \'APPLICATION_ALL\' | translate }}</option>\n											</select>\n										</div>\n										<div class="col-md-6">\n											<div class="input-group input-medium pull-right">\n												<input st-search placeholder="{{ \'APPLICATION_SEARCH\' | translate }}" class="form-control" type="search" />\n												<span class="input-group-addon">\n													<i class="fa fa-search"></i>\n												</span>\n											</div>\n										</div>\n									</div>\n								</th>\n							</tr>\n						  <tr>\n								<th st-sort="id" width="5%" st-sort-default="reverse">{{ \'APPLICATION_ID\' | translate }}</th>\n						    <th st-sort="fullname">{{ \'APPLICATION_NAME\' | translate }}</th>\n								<th st-sort="name">{{ \'APPLICATION_FILENAME\' | translate }}</th>\n								<th st-sort="name">{{ \'APPLICATION_VERSION\' | translate }}</th>\n						    <th st-sort="name">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n						    <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n						  </tr>\n					  </thead>\n					  <tbody>\n					    <tr data-ng-repeat="integration in displayedIntegrations">\n								<td>{{integration.id}}</td>\n								<td>{{integration.name}}</td>\n								<td>{{integration.filename}}</td>\n								<td>{{integration.version}}</td>\n					      <td>{{integration.description}}</td>\n								<td>\n									<span class="btn default btn-xs blue-stripe btn-file">\n				            <span> {{ \'APPLICATION_UPDATE\' | translate }} </span>\n				            <input type="file" accept=".zip" nv-file-select="" uploader="uploader"/>\n				          </span>\n					        <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(integration.name, integration.id)">\n										{{ \'APPLICATION_DELETE\' | translate }}\n					        </a>\n					      </td>\n					    </tr>\n							<tr data-ng-hide="integrations.length">\n								<td colspan="6" style="text-align:center;">\n									<i>No integrations available</i>\n								</td>\n							</tr>\n					  </tbody>\n					  <tfoot>\n							<tr>\n								<td>\n									<div class="input-icon right">\n										<i class="fa fa-search"></i>\n										<input st-search="id" class="form-control" type="search"/>\n									</div>\n						    </td>\n						    <td>\n									<div class="input-icon right">\n										<i class="fa fa-search"></i>\n										<input st-search="name" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_NAME\' | translate | lowercase}}" class="form-control" type="search"/>\n									</div>\n						    </td>\n						    <td>\n									<div class="input-icon right">\n										<i class="fa fa-search"></i>\n										<input st-search="filename" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_FILENAME\' | translate | lowercase}}" class="form-control" type="search"/>\n									</div>\n						    </td>\n								<td>\n						    </td>\n								<td>\n						    </td>\n								<td>\n						    </td>\n						  </tr>\n					    <tr>\n					      <td colspan="6" class="text-center">\n					        <div st-pagination class="pagination" st-items-by-page="integrationsByPage" st-displayed-pages="7"></div>\n					      </td>\n					    </tr>\n					  </tfoot>\n				</div>\n				</table>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/jscripty/project/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PROJECT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/jscripty/project/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n        <li>\n          <i class="fa fa-slack"></i>\n          <a href="/jscripty/projects/list">{{ \'APPLICATION_PROJECTS\' | translate }}</a>\n        </li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_PROJECTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions" ng-show="!Auth.isAgent()">\n					<div class="btn-group">\n						<a class="btn btn-default" href="#" data-ng-click="gridOptions.getPage();">\n							<i class="icon-reload"></i>\n						</a>\n					</div>\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_PROJECT\' | translate }}\n						</a>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n\n					<!-- <div class="table-responsive"> -->\n\n\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/jscripty/project/report/report.detail.html",'<div class="portlet light bordered" data-ng-init="getProjectDetail();initView()">\n<div class="portlet-title">\n<div class="caption font-green-sharp">\n<i class="fa fa-list font-green-sharp"></i>\n<span class="caption-subject">{{ \'APPLICATION_SUMMARY\' | translate }}</a> </span>\n</div>\n<div class="actions">\n <div class="btn-group">\n <button class="btn btn-icon-only btn-primary"  data-ng-click="pdf(\'header\',projectDetail)">\n	 <i class="fa fa-download"></i>\n </button>\n <!-- <button class="btn btn-icon-only btn-default"  data-ng-click="accordion.expandAll()">\n	 <i class="fa fa-folder-open-o"></i>\n </button>\n <button class="btn btn-icon-only btn-default"  data-ng-click="accordion.collapseAll()">\n	 <i class="fa fa-folder"></i>\n </button> -->\n </div>\n</div>\n</div>\n<div id=\'detail\' class="portlet-body">\n	<div class="alert alert-success text-center" ng-show="!projectDetail.length">\n			<h4>{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</h4>\n	</div>\n	<div class="row" ng-show="projectDetail.length">\n		<div class="col-md-10 col-md-offset-1">\n			<div id="header" class="panel panel-info">\n				<div  class="panel-heading">\n					<strong>Project Name:	 </strong>{{project.name}}<br>\n					<strong>Project Id:	 </strong>{{project.id}}<br>\n					<strong>Completed:	 </strong>{{projectStats.completed}}<br>\n					<strong>Incomplete:	 </strong>{{projectStats.incomplete}}<br>\n					<strong>% Completed:	 </strong>{{projectStats.completed * 100 /(projectStats.completed + projectStats.incomplete) | number:2}}<br>\n				</div>\n			</div><br>\n			<v-accordion class="vAccordion--default" multiple control="accordion">\n				<v-pane id="{{question.question_id }}" ng-repeat="question in projectDetail" expanded="true">\n					<v-pane-header>\n					Question Id: 	{{question.question_id}}\n				</v-pane-header>\n				<v-pane-content>\n						<div ng-class=" {{question.graphData.length > 0}} ? \'col-md-8\' : \'col-md-12\'">\n							<div class="row">\n								<div class="col-md-10 col-md-offset-1 ">\n									<h4><strong>{{question.question_label}}</strong> : {{question.question_text}}</h4>\n									<br><br>\n									<table ng-if="question.choices.length" class="table  table-hover"  style="table-layout: fixed; width: 100%">\n										<thead>\n											<tr>\n												<th>Response</th>\n												<th> #Response </th>\n												<th> % </th>\n											</tr>\n										</thead>\n										<tbody>\n											<tr ng-if="!choice.other_option" ng-repeat="choice in question.choices ">\n															<td  style="word-wrap: break-word">{{choice.value}}</td>\n															<td>{{choice.count}}</td>\n															<td>{{choice.percentage | number:2}}</td>\n											</tr>\n										</tbody>\n									</table>\n								</div>\n							</div>\n						<div class="row" ng-if="question.question_other_label">\n						<!-- <div class="row" ng-if="choice.other_option" ng-repeat="choice in question.choices "> -->\n							<!-- <div class="col-md-10 col-md-offset-1 ">\n								<strong>{{choice.value}}</strong> <span class="badge">{{choice.count}}</span><br>\n							</div> -->\n							<!-- accordions can be nested :) -->\n							<v-accordion >\n								<v-pane >\n									<!-- ng-repeat="subpane in pane.subpanes" ng-disabled="subpane.isDisabled" -->\n									<v-pane-header>\n										<strong>{{question.question_other_label}}</strong><br>\n									</v-pane-header>\n									<v-pane-content>\n										<table ng-if="question.choices.length" class="table  table-hover"  style="table-layout: fixed; width: 100%">\n											<thead>\n												<tr>\n													<th>Response</th>\n													<th> #Response </th>\n													<!-- <th> % </th> -->\n												</tr>\n											</thead>\n											<tbody>\n\n												<tr ng-if="choice.other_option" ng-repeat="choice in question.choices ">\n																<td  style="word-wrap: break-word">{{choice.value}}</td>\n																<td>{{choice.count}}</td>\n																<!-- <td>{{choice.percentage | number:2}}</td> -->\n												</tr>\n											</tbody>\n										</table>\n									</v-pane-content>\n								</v-pane>\n							</v-accordion>\n						</div>\n						<div class="row">\n							<div class="col-md-10 col-md-offset-1 ">\n							<h4>	<strong>Total Respondents: {{question.total}}</strong></h4><br>\n							</div>\n						</div>\n						</div>\n						<div class=" col-md-4 pull-right " ng-if="question.graphType == \'bar\' && question.graphData">\n						<canvas  class="chart chart-bar"  chart-data="question.graphData" chart-labels="question.graphLabels" chart-legend="true">\n						</canvas>\n						</div>\n						<div class="col-md-4 pull-right " ng-if="question.graphType == \'pie\'  && question.graphData">\n						<canvas  class="chart chart-pie"  chart-data="question.graphData" chart-labels="question.graphLabels" chart-legend="true">\n						</canvas>\n						</div>\n					</v-pane-content>\n				</v-pane>\n			</v-accordion>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/jscripty/project/report/report.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-edit"></i>\n						<a href="/jscripty/projects/list">{{ \'APPLICATION_JSCRIPTY\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-slack"></i>\n						<a href="/jscripty/projects/list">{{ \'APPLICATION_PROJECTS\' | translate }}</a>\n            <i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-book-open"></i>\n						<a href="">{{ \'APPLICATION_REPORTS\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n				<div class="col-md-12">\n\n				<!-- BEGIN PROFILE SIDEBAR -->\n  					<div class="profile-sidebar">\n	              <div class="portlet light profile-sidebar-portlet">\n										<!-- SIDEBAR USERPIC -->\n										<div class="profile-image">\n												<img src="assets/images/media/report.png" class="img-responsive" >\n										</div>\n										<!-- END SIDEBAR USERPIC -->\n										<!-- SIDEBAR USER TITLE -->\n										<div class="profile-usertitle">\n												<div class="profile-usertitle-name">\n													{{project.name}}[{{project.id}}]\n												</div>\n												<div class="profile-usertitle-job">\n\n												</div>\n										</div>\n										<!-- END SIDEBAR USER TITLE -->\n\n										<!-- SIDEBAR MENU -->\n										<div class="profile-usermenu">\n													<ul class="nav">\n														<li data-ng-class="{active: $state.is(\'main.jscripty.projects.report.sessions\')|| $state.is(\'main.jscripty.projects.report.sessionDetail\')}">\n																	<a data-ng-href=\'/jscripty/projects/report/{{projectId}}/sessions\'>\n						                      	<i class="icon-settings"></i>\n						                        Sessions</a>\n														</li>\n						                <li data-ng-class="{active: $state.is(\'main.jscripty.projects.report.summary\') || $state.is( \'main.jscripty.projects.report.questionDetail\')}">\n																<a data-ng-href=\'/jscripty/projects/report/{{projectId}}/summary\'>\n						          					<i class="fa fa-bar-chart"></i>\n						                      Questions</a>\n						                </li>\n						                <li data-ng-class="{active: $state.is(\'main.jscripty.projects.report.detail\')}">\n																<a data-ng-href=\'/jscripty/projects/report/{{projectId}}/detail\'>\n						    								<i class="fa fa-list"></i>\n						                      Summary</a>\n						                </li>\n						                <li data-ng-class="{active: $state.is(\'main.jscripty.projects.report.inputs\')}">\n																<a data-ng-href=\'/jscripty/projects/report/{{projectId}}/inputs\'>\n						    								<i class="fa fa-edit"></i>\n						                      Inputs</a>\n						                </li>\n													</ul>\n										</div>\n										<!-- END MENU -->\n\n	          	</div>\n\n          	</div>\n\n              <div class="profile-content margin-top-20">\n									<div class="row">\n										<div class="col-md-12">\n														<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">\n															<div class="dashboard-stat2">\n																<div class="display">\n																	<div class="number">\n																		<h3 class="font-green-sharp">{{projectStats.started}}</h3>\n																		<small>Started</small>\n																	</div>\n																	<div class="icon">\n																		<i class="icon-pie-chart"></i>\n																	</div>\n																</div>\n																<div class="progress-info">\n																	<div class="progress">\n																		<span style="width: 100%;" class="progress-bar progress-bar-success green-sharp">\n																		</span>\n																	</div>\n																	<div class="status">\n																	</div>\n																</div>\n															</div>\n														</div>\n														<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">\n															<div class="dashboard-stat2">\n																<div class="display">\n																	<div class="number">\n																		<h3 class="font-red-haze">{{projectStats.incomplete}}</h3>\n																		<small>Incomplete</small>\n																	</div>\n																	<div class="icon">\n																		<i class="icon-chart"></i>\n																	</div>\n																</div>\n																<div class="progress-info">\n																	<div class="progress">\n																		<span style="width: 100%;" class="progress-bar progress-bar-success red-haze">\n																		</span>\n																	</div>\n																	<div class="status">\n																	</div>\n																</div>\n															</div>\n														</div>\n														<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">\n															<div class="dashboard-stat2">\n																<div class="display">\n																	<div class="number">\n																		<h3 class="font-blue-sharp">{{projectStats.completed}}</h3>\n																		<small>Completed</small>\n																	</div>\n																	<div class="icon">\n																		<i class="icon-like"></i>\n																	</div>\n																</div>\n																<div class="progress-info">\n																	<div class="progress">\n																		<span style="width: 100%;" class="progress-bar progress-bar-success blue-sharp">\n																		</span>\n																	</div>\n																	<div class="status">\n																	</div>\n																</div>\n															</div>\n														</div>\n											</div>\n							</div>\n\n	                <div class="row">\n	                  <div ui-view class="col-md-12">\n	                  </div>\n	                  </div>\n              </div>\n      	</div>\n	</div>\n'),a.put("app/jscripty/project/report/report.inputs.html",'<div class="row">\n	<div class="col-md-12">\n				<div class="portlet light bordered" data-ng-init="getQuestionInputs()">\n									<div class="portlet-title">\n										<div class="caption font-green-sharp">\n											<i class="fa fa-edit font-green-sharp"></i>\n											<span class="caption-subject">{{ \'APPLICATION_INPUTS\' | translate }}</a> </span>\n										</div>\n									<div class="tools">\n											<!-- <a href="" class="fullscreen" data-original-title="" title="">\n											</a> -->\n										</div>\n									</div>\n									<div class="portlet-body" >\n										<div ui-grid="gridOptions" ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n											<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n										</div>\n									</div>\n			</div>\n	</div>\n</div>\n'),a.put("app/jscripty/project/report/report.question.detail.html",'<div class="row" data-ng-init="getDetail()">\n	<div class="col-md-12">\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="fa fa-list font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_DETAIL\' | translate }}</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body" >\n				<div class="alert alert-success text-center" ng-show="!questionDetail">\n						<h4>{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</h4>\n				</div>\n				<div class="row  margin-top-20" ng-show="questionDetail">\n					<div class="col-md-10 col-md-offset-1">\n						<div class="panel panel-info" >\n							<div class="panel-heading">\n								<h3 class="panel-title">\n\n									<i class="fa-chart "></i>Question Id: 	{{questionDetail.question_id}}\n							</div>\n							<div class="panel-body">\n								<div class="row">\n									<div class="col-md-12">\n										<h4><strong>{{questionDetail.question_label}}</strong></h4>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-10 col-md-offset-1 ">\n										<strong><h4>{{questionDetail.question_text}}</h4></strong><br>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-6">\n										<div class="row">\n											<div class="col-md-10 col-md-offset-1 ">\n												<!-- <div class="alert alert-success text-center" ng-show="!questionDetail.choices.length">\n														<h4>{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</h4>\n												</div> -->\n												<table ng-if="questionDetail.choices.length" class="table  table-hover" style="table-layout: fixed; width: 100%">\n													<thead>\n														<tr>\n															<th style="width=5%"> Value  </th>\n															<th style="width=5%"> Count </th>\n															<th ng-if="question.graphType != \'PolarArea\'" style="width=5%"> % </th>\n														</tr>\n													</thead>\n													<tbody>\n														<tr ng-if="!choice.other_option" ng-repeat="choice in questionDetail.choices ">\n																		<td style="word-wrap: break-word">{{choice.value}}</td>\n																		<td>{{choice.count}}</td>\n																		<td ng-if="question.graphType != \'PolarArea\'">{{choice.percentage | number:2}}</td>\n														</tr>\n													</tbody>\n												</table>\n										</div>\n										</div>\n									<div class="row" ng-if="choice.other_option" ng-repeat="choice in questionDetail.choices ">\n										<div class="col-md-6 col-md-offset-3 ">\n											<strong><a href="">{{choice.value}}</a> </strong> <span class="badge">{{choice.count}}</span><br>\n\n										</div>\n									</div>\n									<div class="row">\n										<div class="col-md-10 col-md-offset-1 ">\n										<h4>	<strong>Total: {{questionDetail.total}}</strong></h4><br>\n										</div>\n									</div>\n									</div>\n									<div class="col-md-6 pull-right ">\n										<canvas id="base" class="chart-base" chart-type="questionDetail.graphType"\n										chart-data="questionDetail.graphData" chart-labels="questionDetail.graphLabels" chart-legend="true">\n										</canvas>\n										<!-- <button class="btn btn-success btn-sm pull-right" ng-click="toggle(questionDetail)">{{questionDetail.graphType}}</button> -->\n									</div>\n								</div>\n\n					</div>\n\n				</div>\n\n			</div>\n		</div>\n\n			</div>\n			</div>\n		</div>\n</div>\n'),a.put("app/jscripty/project/report/report.session.detail.html",'\n\n<div class="row" data-ng-init="getSessionDetails()">\n			<div class="col-md-12">\n				<div class="portlet light bordered">\n					<div class="portlet-title">\n						<div class="caption font-green-sharp">\n							<i class="fa fa-list font-green-sharp"></i>\n							<span class="caption-subject">{{ \'APPLICATION_DETAIL\' | translate }}</a> </span>\n						</div>\n            <div class="actions">\n             <div class="btn-group">\n               <button class="btn btn-icon-only btn-primary"  data-ng-click="pdf(\'header\',sessionQuestions)">\n                 <i class="fa fa-download"></i>\n               </button>\n               <!-- <button class="btn btn-icon-only btn-default"  data-ng-click="accordion.expandAll()">\n                 <i class="fa fa-plus-square-o"></i>\n               </button>\n               <button class="btn btn-icon-only btn-default"  data-ng-click="accordion.collapseAll()">\n                 <i class="icon-collapse-alt"></i>\n               </button> -->\n             </div>\n           </div>\n					</div>\n					<div class="portlet-body"  style="height: auto;">\n						<div class="row  margin-top-20">\n							<div class="col-md-10 col-md-offset-1">\n								<div id = "header" class="panel panel-info">\n									<div class="panel-heading">\n										<strong>Project Name:	 </strong>{{project.name}}<br>\n										<strong>Project Id:	 </strong>{{project.id}}<br>\n										<strong>Session Id:	 </strong>{{session.session_id}}<br>\n										<strong>Status:	 </strong>{{session.status}}<br>\n										<strong>Started At:	 </strong>{{session.createdAt}}<br>\n										<strong>Closed At:	 </strong>{{session.completedAt}}<br>\n									</div>\n								</div>\n                <v-accordion class="vAccordion--default" multiple control="accordion">\n                  <v-pane id="{{question.question_id }}" ng-repeat=" question in sessionQuestions | orderBy:\'index\'"" expanded="true">\n                    <v-pane-header>\n                      Question Id: 	{{question.question_id}}\n                    </v-pane-header>\n                    <v-pane-content>\n                        <h4><strong>{{question.question_label}}</strong> : {{question.question_text}}</h4>\n                        <div ng-if="question.question_type == \'question\'">\n                        <h4><strong>Answer:	 </strong>{{question.question_answer}}</h4>\n                      </div>\n                      <div ng-if="question.question_other_label">\n                        <h4>\n                       <strong>{{question.question_other_label}}: </strong>\n                         {{question.question_other_answer || \'No Value\'}}\n                       </h4>\n                      </div>\n                      <table class="table  table-hover" ng-if="question.ReportJscriptyInputs.length">\n                        <thead>\n                          <tr>\n                            <th > Label </th>\n                            <th >Answer </th>\n                          </tr>\n                        </thead>\n                        <tbody>\n                          <tr ng-repeat="input in question.ReportJscriptyInputs |orderBy:\'id\'">\n                                  <td>{{input.input_label}}</td>\n                                  <td>{{input.input_value || \'No Value\'}}</td>\n                          </tr>\n                        </tbody>\n                      </table>\n                    </v-pane-content>\n                  </v-pane>\n                </v-accordion>\n								</div>\n							</div>\n	        </div>\n				</div>\n		</div>\n</div>\n'),
-a.put("app/jscripty/project/report/report.sessions.html",'\n	<div class="row" >\n		<div class="col-md-12">\n			<div class="portlet light bordered" data-ng-init="getProjectSessions()">\n								<div class="portlet-title">\n									<div class="caption font-green-sharp">\n										<i class="icon-settings font-green-sharp"></i>\n										<span class="caption-subject">{{ \'APPLICATION_SESSIONS\' | translate }}</a> </span>\n									</div>\n									<div class="actions">\n										<div class="btn-group">\n											<a class="btn btn-default" href="#" data-ng-click="gridOptions.getPage();initView()">\n												<i class="icon-reload"></i>\n											</a>\n										</div>\n									</div>\n								</div>\n								<div class="portlet-body" >\n								<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n									<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n								</div>\n							</div>\n				</div>\n			</div>\n	</div>\n'),a.put("app/jscripty/project/report/report.summary.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light bordered" data-ng-init="getQuestionSummary()">\n							<div class="portlet-title">\n								<div class="caption font-green-sharp">\n									<i class="fa fa-bar-chart font-green-sharp"></i>\n									<span class="caption-subject">{{ \'APPLICATION_QUESTIONS\' | translate }}</a> </span>\n								</div>\n								<div class="actions">\n									<div class="btn-group">\n										<!-- <a class="btn btn-default" href="#" data-ng-click="gridOptions.getPage();initView()">\n											<i class="icon-reload"></i>\n										</a> -->\n									</div>\n								</div>\n							</div>\n							<div class="portlet-body" >\n										<div ui-grid="gridOptions" ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n											<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n										</div>\n							</div>\n				</div>\n	</div>\n</div>\n'),a.put("app/jscripty/project/view/view.html",'<div class="row" data-ng-init="getProject()">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-edit"></i>\n						<a href="/jscripty/projects/list">{{ \'APPLICATION_JSCRIPTY\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-slack"></i>\n						<a href="/jscripty/projects/list">{{ \'APPLICATION_PROJECTS\' | translate }}</a>\n            <i class="fa fa-angle-right"></i>\n					</li>\n          <li>\n						<a ng-href="/jscripty/projects/view/{{jscriptyProject.id}}">{{jscriptyProject.name}}</a>\n          </li>\n				</ul>\n			</div>\n		</div>\n</div>\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n		<div id="geEditor" class="geEditor"></div>\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n<script>\n\n\n</script>\n'),a.put("app/landing/landing.html",'<!-- BEGIN LOGO -->\n<div class="logo">\n  <a href="index.html">\n    <img data-ng-if="settings.defaultLoginLogo || !license.custom" ng-src="assets/images/logo-big.png" alt="logo" />\n    <img data-ng-if="license.custom && !settings.defaultLoginLogo" ng-src="api/settings/logo/login/{{settings.loginLogo ? settings.loginLogo : \'logo-big\'}}" alt="logo" class="custom-login-logo" onError="this.onerror=null;this.src=\'assets/images/logo-big.png\';"/>\n  </a>\n</div>\n<!-- END LOGO -->\n\n<!-- BEGIN LANDING -->\n<div data-ng-init="initLanding()">\n  <div data-ng-show="message" class="col-md-12 page-500" style="padding-bottom: 50px;">\n    <div class="number">\n      Oops!\n    </div>\n    <div class=" details" style="color: white;">\n      <h3>{{message | translate}}.</h3>\n      <p>\n        Please contact your administrator.<br><br>\n      </p>\n    </div>\n  </div>\n</div>\n<!-- END LANDING -->\n\n<div class="copyright">\n  xCALLY Motion v. {{info.version}} | 2016 - {{year + 1}} &copy; Powered by Xenialab <ng-bind-html data-ng-if="license.custom && !settings.defaultFooterWhiteLabel && settings.footerWhiteLabel" ng-bind-html="\'| \'+settings.footerWhiteLabel"></ng-bind-html>\n</div>\n'),a.put("app/login/login.html",'<!-- BEGIN LOGO -->\n<div class="logo" data-ng-init="getInfo()">\n	<a>\n		<img data-ng-if="settings.defaultLoginLogo || !license.custom" ng-src="assets/images/logo-big.png" alt="logo" />\n		<img data-ng-if="license.custom && !settings.defaultLoginLogo" ng-src="api/settings/logo/login/{{settings.loginLogo ? settings.loginLogo : \'logo-big.png\'}}" alt="logo" class="custom-login-logo" onError="this.onerror=null;this.src=\'assets/images/logo-big.png\';"/>\n	</a>\n</div>\n<!-- END LOGO -->\n<!-- BEGIN LOGIN -->\n<div class="content">\n	<!-- BEGIN LOGIN FORM -->\n	<form class="login-form" name="loginForm" data-ng-if="!forgotPassword" data-ng-submit="login(loginForm)" novalidate>\n		<h3 class="form-title">Sign In</h3>\n		<div class="alert alert-success" data-ng-show="recovered">\n			<button class="close" data-close="alert"></button>\n			<span>{{\'MESSAGE_ACCOUNT_RECOVERED\' | translate}}</span>\n		</div>\n		<div class="alert alert-danger" data-ng-class="{\'display-hide\': !loginForm.$submitted || !errorLogin}">\n			<button class="close" data-close="alert"></button>\n			<span>{{ errorLog ? errorLog : (\'MESSAGE_INSERT_USER_OR_PASS\' | translate)}}</span>\n		</div>\n		<div class="form-group" data-ng-class="{\'has-error\': loginForm.$submitted && loginForm.name.$invalid}">\n			<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}</label>\n			<div class="input-icon">\n				<i class="fa fa-user"></i>\n				<input ng-enter="login(loginForm)" class="form-control form-control-solid placeholder-no-fix" type="text" autocomplete="off" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" name="name" ng-model="userLogin.name" required/>\n			</div>\n			<span data-ng-show="loginForm.$submitted && loginForm.name.$invalid" class="help-block">{{\'MESSAGE_REQUIRED_FIELD\' | translate}}</span>\n		</div>\n		<div class="form-group" data-ng-class="{\'has-error\': loginForm.$submitted && loginForm.password.$invalid}">\n			<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}</label>\n			<div class="input-icon">\n				<i class="fa fa-lock"></i>\n				<input ng-enter="login(loginForm)" class="form-control form-control-solid placeholder-no-fix" type="password" autocomplete="off" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" name="password" ng-model="userLogin.password" required/>\n			</div>\n			<span data-ng-show="loginForm.$submitted && loginForm.password.$invalid" class="help-block">{{\'MESSAGE_REQUIRED_FIELD\' | translate}}</span>\n			<span class="help-block"><a href="#" data-ng-click="toggleForgotPassword(true)" class="forget-password">{{\'APPLICATION_FORGOT_PASSWORD\' | translate}}?</a></span>\n		</div>\n		<div class="form-actions">\n			<button type="submit" class="btn btn-success uppercase">{{\'APPLICATION_LOGIN\' | translate}}</button>\n			<label class="rememberme check">\n				<input type="checkbox" data-ng-model="userLogin.remember"> {{\'APPLICATION_REMEMBER_ME\' | translate}}\n			</label>\n			<!-- <label class="rememberme check">\n			<input type="checkbox" name="remember" value="1"/>Remember </label> -->\n			<!-- <a href="javascript:;" id="forget-password" class="forget-password">Forgot Password?</a> -->\n		</div>\n	</form>\n	<form name="forgetForm" data-ng-if="forgotPassword" data-ng-submit="forgetForm.$valid && recover()" novalidate>\n		<h3>{{\'APPLICATION_FORGOT_PASSWORD\' | translate}}?</h3>\n		<p>\n			{{\'APPLICATION_INSERT_EMAIL_TO_RESET\' | translate}}\n		</p>\n		<div class="alert alert-success" data-ng-show="showRecoverMessage">\n			<button class="close" data-close="alert"></button>\n			<span>{{\'MESSAGE_CHECK_YOUR_EMAIL_RECOVER\' | translate}}</span>\n		</div>\n		<div class="form-group" data-ng-class="{\'has-error\': forgetForm.$submitted && forgetForm.email.$invalid}">\n			<label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}</label>\n			<div class="input-icon">\n				<i class="fa fa-envelope"></i>\n				<input class="form-control form-control-solid placeholder-no-fix" type="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" name="email" ng-model="userLogin.email" required/>\n			</div>\n			<span data-ng-show="forgetForm.$submitted && forgetForm.email.$invalid" class="help-block">{{\'MESSAGE_REQUIRED_FIELD\' | translate}}</span>\n		</div>\n		<div class="form-actions">\n			<button type="button" id="back-btn" data-ng-click="toggleForgotPassword(false)" class="btn btn-default">{{\'APPLICATION_BACK\' | translate}}</button>\n			<button type="submit" class="btn btn-success uppercase pull-right">{{\'APPLICATION_SUBMIT\' | translate}}</button>\n		</div>\n	</form>\n		<div class="login-options">\n			<h4>{{\'APPLICATION_FOLLOW_US\' | translate}}</h4>\n			<ul class="social-icons">\n				<li>\n		      <a class="social-icon-color facebook" data-original-title="facebook" href="https://www.facebook.com/xcallymotion" target="_blank"></a>\n		    </li>\n		    <li>\n		      <a class="social-icon-color twitter" data-original-title="Twitter" href="https://twitter.com/xcallymotion" target="_blank"></a>\n		    </li>\n		    <li>\n		      <a class="social-icon-color googleplus" data-original-title="Google Plus" href="https://plus.google.com/+Xcally" target="_blank"></a>\n		    </li>\n		    <li>\n		      <a class="social-icon-color linkedin" data-original-title="Linkedin" href="https://www.linkedin.com/company/xcally" target="_blank"></a>\n		    </li>\n			</ul>\n		</div>\n</div>\n<div class="copyright">\n	xCALLY Motion v. {{info.version}} | 2016 - {{year + 1}} &copy; Powered by Xenialab <ng-bind-html data-ng-if="license.custom && !settings.defaultFooterWhiteLabel && settings.footerWhiteLabel" ng-bind-html="\'| \'+settings.footerWhiteLabel"></ng-bind-html>\n</div>\n<!-- END LOGIN -->\n'),a.put("app/main/about.modal.html",'<div class="center-text">\n<div class="modal-header no-border">\n<button type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <!-- <h3 class="modal-title center-text">{{ \'APPLICATION_ABOUT\' | translate }}</h3> -->\n</div>\n<div class="modal-body" style="padding-top:0px;">\n  <div  class="mbottom20" data-ng-init="getInfo()">\n	<a>\n		<img data-ng-if="settings.defaultLoginLogo || !license.custom" ng-src="assets/images/logo-big-pdf.png" alt="logo" class="about-logo" />\n		<img data-ng-if="license.custom && !settings.defaultLoginLogo" ng-src="api/settings/logo/login/{{settings.loginLogo ? settings.loginLogo : \'logo-big-pdf.png\'}}" alt="logo" class="custom-login-logo about-logo" onError="this.onerror=null;this.src=\'assets/images/logo-big-pdf.png\';"/>\n	</a>\n</div>\n<div class="mbottom20">\n  <b class="sounds-title-icon">xCALLY Motion</b><br>\n  <small>v. {{info.version}}</small><br><br>\n  <small>2016 - {{year + 1}} &copy; Powered by Xenialab</small><br>\n  <small><a href="https://www.xcallymotion.com">www.xcallymotion.com</a></small><br>\n  <ng-bind-html data-ng-if="license.custom && !settings.defaultFooterWhiteLabel && settings.footerWhiteLabel" ng-bind-html="settings.footerWhiteLabel"></ng-bind-html>\n</div>\n<div class="mbottom20">\n  <span><b>{{\'APPLICATION_USEFUL_LINKS\' | translate}}</b></span><br>\n  <small><a href="https://wiki.xcallymotion.com/" target="_blank">Wiki</a></small><br>\n  <small><a href="http://www.xcally.com/bar/multichannel/Setup.msi" target="_blank">Phonebar Download</a></small><br>\n  <small><a href="http://www.xcally.com/support/eula-xcally-license-en.pdf" target="_blank">EULA</a></small><br>\n</div>\n  <div class="login-options" style=\'margin-bottom:0px;\'>\n  <h4>{{\'APPLICATION_FOLLOW_US\' | translate}}</h4>\n  <ul class="social-icons">\n    <li>\n      <a class="social-icon-color facebook" data-original-title="facebook" href="https://www.facebook.com/xcallymotion" target="_blank"></a>\n    </li>\n    <li>\n      <a class="social-icon-color twitter" data-original-title="Twitter" href="https://twitter.com/xcallymotion" target="_blank"></a>\n    </li>\n    <li>\n      <a class="social-icon-color googleplus" data-original-title="Google Plus" href="https://plus.google.com/+Xcally" target="_blank"></a>\n    </li>\n    <li>\n      <a class="social-icon-color linkedin" data-original-title="Linkedin" href="https://www.linkedin.com/company/xcally" target="_blank"></a>\n    </li>\n  </ul>\n</div>\n<div class="login-options" style=\'margin-bottom:0px;\'>\n<h4>{{\'APPLICATION_CONTACT_US\' | translate}}:</h4>\n<div class="float-right" style="margin-top:10px;margin-bottom:10px;">\n  <a href="mailto:[email-masked]">[email-masked]</a></small>\n</div>\n</div>\n</div>\n</div>\n<!-- <div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div> -->\n'),a.put("app/main/audioFileDownload.play.modal.html",'<!-- <div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title | translate" class="modal-title"></h4>\n</div> -->\n<div class="modal-body" style="text-align:center;">\n  <audio controls autoplay ng-src="{{audio}}" preload="none">\n    Your browser does not support the audio tag.</audio>\n</div>\n<!-- <div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div> -->\n'),a.put("app/main/chooseContact.modal.html",'<div class="modal-header" data-ng-init="getContacts()">\n  <h3 class="modal-title">{{ \'APPLICATION_CHOOSE_CONTACT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <table st-table="rowCollection" class="table table-striped">\n  	<tbody>\n      <tr>\n        <th>{{\'APPLICATION_NAME\' | translate}}</th>\n        <th>{{\'APPLICATION_LIST\' | translate}}</th>\n        <th></th>\n      </tr>\n  	<tr ng-repeat="contact in contacts">\n  		<td>{{contact.firstName}} {{contact.lastName || \'\'}}</td>\n  		<td>{{contact.List.name}}</td>\n  		<td>\n        <button class="btn default btn-xs green-stripe" data-ng-click="open(contact)">\n          {{ \'APPLICATION_OPEN\' | translate}}\n        </button>\n      </td>\n  	</tr>\n    <tr data-ng-hide="contacts.length">\n      <td colspan="3" style="text-align:center;">\n        <i>{{ \'MESSAGE_NO_CONTACTS_AVAILABLE\' | translate }}</i>\n      </td>\n    </tr>\n  	</tbody>\n  </table>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="open()"><i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONTACT\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/main/closeEditedTab.modal.html",'<div class="modal-header" data-ng-init="getContacts()">\n  <h3 class="modal-title">{{ \'APPLICATION_WARNING\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <p>{{\'MESSAGE_CLOSE_EDITED_TAB\' | translate}}</p>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/main/closeEditedTab.modal.jscripty.html",' <div class="modal-header" data-ng-init="init()">\n  <h3  class="modal-title">{{ \'APPLICATION_WARNING\' | translate }}</h3>\n  <!-- <h3   ng-if="projectStatus == \'incomplete\'" class="modal-title">{{ \'APPLICATION_WARNING\' | translate }}</h3> -->\n\n</div>\n<div   class="modal-body">\n<!-- <div  ng-if="projectStatus == \'incomplete\'" class="modal-body"> -->\n  <p>{{\'MESSAGE_CLOSE_INCOMPLETE\' | translate}}</p>\n</div>\n\n\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/main/cm.disposition.modal.html",'<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title | translate" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate data-ng-init="initDisposition()">\n  <div class="form-group">\n    <ui-select data-ng-model="item.disposition" name="list" theme="bootstrap" data-ng-disabled="!dispositions.length" required>\n      <ui-select-match placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}">{{$select.selected.name}}</ui-select-match>\n      <ui-select-choices repeat="disposition.name as disposition in dispositions | filter: $select.search">\n        <div ng-bind-html="disposition.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n  <div class="note note-warning" data-ng-hide="dispositions.length">\n    <h4 class="block">Warning!</h4>\n    <p>\n      {{ \'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate }}\n    </p>\n  </div>\n</form>\n  <!-- <div ng-if="modal.html" ng-bind-html="modal.html"></div> -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="ok()"  data-ng-disabled="!item.disposition">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n  <!-- <button ng-repeat="button in modal.buttons" ng-class="button.classes" ng-click="button.click($event)" ng-bind="button.text" class="btn"></button> -->\n</div>\n'),a.put("app/main/company.info.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_COMPANY_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <div class="row">\n  	<div class="col-md-12">\n  		<div class="portlet light">\n  			<div class="portlet-title tabbable-line">\n  				<ul class="nav nav-tabs">\n  					<li class="active">\n  						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n  					</li>\n  					<li>\n  						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_ADDRESS\' | translate}}</a>\n  					</li>\n  					<li>\n  						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_SHIPMENT_ADDRESS\' | translate}}</a>\n  					</li>\n  				</ul>\n  			</div>\n\n  			<div class="portlet-body">\n  				<div class="tab-content">\n  					<!-- GENERAL TAB -->\n  					<div class="tab-pane active" id="tab_1_1">\n  						<form name="forms.general" data-ng-submit="forms.general.$valid && updateCompany()" novalidate>\n  							<div class="row">\n  								<div class="col-md-6">\n  									<!-- START NAME -->\n  									<div class="form-group">\n  										<label class="control-label">{{\'APPLICATION_NAME\' | translate}}</label>\n  										<input readonly type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="company.name" required/>\n  									</div>\n  									<!-- END NAME -->\n\n  									<!-- START VAT -->\n  									<div class="form-group">\n  										<label class="control-label">{{\'APPLICATION_VAT\' | translate}}</label>\n  										<input readonly type="text" name="vat" placeholder="{{\'APPLICATION_VAT\' | translate}}" class="form-control" data-ng-model="company.vat"/>\n  									</div>\n  									<!-- END VAT -->\n\n  									<!-- START COMPANYID -->\n  									<div class="form-group">\n  										<label class="control-label">{{\'APPLICATION_COMPANY_ID\' | translate}}</label>\n  										<input readonly type="text" name="companyId" placeholder="{{\'APPLICATION_COMPANY_ID\' | translate}}" class="form-control" data-ng-model="company.companyId"/>\n  									</div>\n  									<!-- END COMPANYID -->\n\n  									<!-- START WEBSITE -->\n  									<div class="form-group">\n  										<label class="control-label">{{\'APPLICATION_WEBSITE\' | translate}}</label>\n  										<input readonly type="text" name="website" placeholder="{{\'APPLICATION_WEBSITE\' | translate}}" class="form-control" data-ng-model="company.website"/>\n  									</div>\n  									<!-- END WEBSITE -->\n\n  									<!-- START EMAIL -->\n  									<div class="form-group" >\n  										<label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}</label>\n  										<input readonly type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="company.email"/>\n  									</div>\n  									<!-- END EMAIL -->\n  								</div>\n  								<div class="col-md-6">\n  									<!-- START PHONE -->\n  									<div class="form-group">\n  										<label class="control-label">{{\'APPLICATION_PHONE\' | translate}}</label>\n  										<input readonly type="text" name="phone" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="company.phone"/>\n  									</div>\n  									<!-- END PHONE -->\n\n  									<!-- START FAX -->\n  									<div class="form-group" >\n  										<label class="control-label">{{\'APPLICATION_FAX\' | translate}}</label>\n  										<input readonly type="text" name="fax" placeholder="{{\'APPLICATION_FAX\' | translate}}" class="form-control" data-ng-model="company.fax"/>\n  									</div>\n  									<!-- END FAX -->\n\n  									<!-- START TYPE -->\n  									<div class="form-group" >\n  										<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}</label>\n  										<input readonly type="text" name="type" placeholder="{{\'APPLICATION_TYPE\' | translate}}" class="form-control" data-ng-model="company.type"/>\n  									</div>\n  									<!-- END TYPE -->\n\n  									<!-- START DESCRIPTION -->\n  									<div class="form-group">\n  										<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n  										<textarea readonly type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="company.description"></textarea>\n  									</div>\n  									<!-- END DESCRIPTION -->\n  								</div>\n  							</div>\n  						</form>\n  					</div>\n  					<!-- END ADVANCED TAB -->\n  					<div class="tab-pane" id="tab_1_2">\n  						<form name="forms.address" novalidate>\n  							<!-- START STREET -->\n  							<div class="form-group" >\n  								<label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n  								<input readonly type="text" name="street" placeholder="{{\'APPLICATION_STREET\' | translate}}" class="form-control" data-ng-model="company.street"/>\n  							</div>\n  							<!-- END STREET -->\n\n  							<!-- START POSTALCODE -->\n  							<div class="form-group" >\n  								<label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n  								<input readonly type="text" name="postalCode" placeholder="{{\'APPLICATION_POSTALCODE\' | translate}}" class="form-control" data-ng-model="company.postalCode"/>\n  							</div>\n  							<!-- END POSTALCODE -->\n\n  							<!-- START CITY -->\n  							<div class="form-group" >\n  								<label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n  								<input readonly type="text" name="city" placeholder="{{\'APPLICATION_CITY\' | translate}}" class="form-control" data-ng-model="company.city"/>\n  							</div>\n  							<!-- END CITY -->\n  							<!-- START COUNTRY -->\n  							<div class="form-group" >\n  								<label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n  								<input readonly type="text" name="country" placeholder="{{\'APPLICATION_COUNTRY\' | translate}}" class="form-control" data-ng-model="company.country"/>\n  							</div>\n  							<!-- END COUNTRY -->\n  						</form>\n  					</div>\n  					<div class="tab-pane" id="tab_1_3">\n  						<form name="forms.shipmentAddress" novalidate>\n  							<!-- START STREET -->\n  							<div class="form-group" >\n  								<label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n  								<input readonly type="text" name="sStreet" placeholder="{{\'APPLICATION_STREET\' | translate}}" class="form-control" data-ng-model="company.sStreet"/>\n  							</div>\n  							<!-- END STREET -->\n\n  							<!-- START POSTALCODE -->\n  							<div class="form-group" >\n  								<label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n  								<input readonly type="text" name="sPostalCode" placeholder="{{\'APPLICATION_POSTALCODE\' | translate}}" class="form-control" data-ng-model="company.sPostalCode"/>\n  							</div>\n  							<!-- END POSTALCODE -->\n\n  							<!-- START CITY -->\n  							<div class="form-group" >\n  								<label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n  								<input readonly type="text" name="sCity" placeholder="{{\'APPLICATION_CITY\' | translate}}" class="form-control" data-ng-model="company.sCity"/>\n  							</div>\n  							<!-- END CITY -->\n  							<!-- START COUNTRY -->\n  							<div class="form-group">\n  								<label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n  								<input readonly type="text" name="sCountry" placeholder="{{\'APPLICATION_COUNTRY\' | translate}}" class="form-control" data-ng-model="company.sCountry"/>\n  							</div>\n  							<!-- END COUNTRY -->\n  						</form>\n  					</div>\n  				</div>\n  			</div>\n  		</div>\n  	</div>\n  </div>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/main/customDateFilter.modal.html",'<div class="modal-body">\n  <uib-datepicker ng-model="dateTime.filterDate"\n      class="well well-sm">\n  </uib-datepicker>\n  <uib-timepicker data-ng-if="hasTime" ng-model="dateTime.time" show-meridian="false"></uib-timepicker>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="setFilterDate(dateTime.filterDate)">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancelDateFilter()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/main/customDateFilterHeader.html",'<input class="ui-grid-filter-input date-time-filter-buttons pointer-cursor" style="width:90%;padding:inherit;" data-ng-click="openDatePicker(colFilter)" placeholder="{{ colFilter.name }}" readonly value="{{colFilter.term | date:\'dd-MM-yyyy\'}}">\n<span role="button" class="ui-grid-filter-button-select cancel-custom-date-range-filter-button ng-scope" data-ng-click="removeFilter(colFilter, $index)" data-ng-if="!colFilter.disableCancelFilterButton" data-ng-disabled="colFilter.term === undefined || colFilter.term === null || colFilter.term === \'\'" data-ng-show="colFilter.term !== undefined && colFilter.term != null" tabindex="0" aria-hidden="false" aria-disabled="false" style="right:22px;">\n  <i class="ui-grid-icon-cancel cancel-custom-date-range-filter" ui-grid-one-bind-aria-label="aria.removeFilter" aria-label="Remove Filter">&nbsp;</i>\n</span>\n'),a.put("app/main/customTagsFilter.modal.html",'<div class="modal-body" data-ng-init="initModal()">\n  <!-- START TAGS -->\n<div class="form-group">\n  <label class="control-label">{{\'APPLICATION_TAGS\' | translate}}</label>\n  <ui-select multiple=\'true\' data-ng-model="item.myTags" theme="bootstrap">\n    <ui-select-match placeholder="{{ \'APPLICATION_TAGS\' | translate }}">{{$item}}</ui-select-match>\n    <ui-select-choices repeat="tag in tags | filter: $select.search">\n      {{tag}}\n    </ui-select-choices>\n  </ui-select>\n</div>\n<!-- END TAGS -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="setFilterTags()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancelTagsFilter()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/main/customTagsFilterHeader.html",'<input class="ui-grid-filter-input pointer-cursor" style="width:90%;padding:inherit;" data-ng-click="openTags(colFilter)" placeholder="{{ colFilter.name }}" readonly value="{{colFilter.term}}">\n<span role="button" class="ui-grid-filter-button-select cancel-custom-date-range-filter-button ng-scope" data-ng-click="removeFilter(colFilter, $index)" data-ng-if="!colFilter.disableCancelFilterButton" data-ng-disabled="colFilter.term === undefined || colFilter.term === null || colFilter.term === \'\'" data-ng-show="colFilter.term !== undefined && colFilter.term != null" tabindex="0" aria-hidden="false" aria-disabled="false" style="right:5px;">\n  <i class="ui-grid-icon-cancel cancel-custom-date-range-filter" ui-grid-one-bind-aria-label="aria.removeFilter" aria-label="Remove Filter">&nbsp;</i>\n</span>\n'),a.put("app/main/keepMeLogged.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_WARNING\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <p>{{\'MESSAGE_SOMEONE_LOGGED_YOU_OUT\' | translate}}</p>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="close()">{{ \'APPLICATION_YES\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_NO\' | translate }}</button>\n</div>\n'),a.put("app/main/main.html",'<!-- BEGIN HEADER -->\n<div data-ng-include="\'components/header/header.html\'" data-ng-controller="HeaderController" class="page-header navbar navbar-fixed-top">\n</div>\n<!-- END HEADER -->\n\n<div class="clearfix">\n</div>\n<!-- BEGIN CONTAINER -->\n<div class="page-container">\n\n  <!-- BEGIN SIDEBAR -->\n  <div data-ng-include="\'components/sidebar/sidebar.html\'" data-ng-controller="SidebarController" class="page-sidebar-wrapper">\n  </div>\n  <!-- END SIDEBAR -->\n\n  <!-- BEGIN CONTENT -->\n  <div class="page-content-wrapper">\n    <div class="page-content" data-ng-class="{\'demo\': !license.expiration}">\n\n      <!-- BEGIN PAGE CONTENT -->\n      <uib-tabset>\n        <uib-tab select="addWorkspace()" active="mainTab.active">\n          <uib-tab-heading>\n            Motion <i class="icon-rocket"></i>\n          </uib-tab-heading>\n          <div class="hide" data-ng-if="!Auth.isAgent() && activeTour.main" ng-joy-ride="activeTour.main" config="tourConfig.main" on-finish="onTourFinish()" on-skip="onTourSkip()"></div>\n          <div ui-view class=""></div>\n        </uib-tab>\n        <uib-tab class="motion-{{workspace.type}}-uib-tab" data-ng-repeat="workspace in workspaces" active="workspace.active" data-ng-switch="workspace.type" select="select(workspace)" deselect="deselect(workspace)">\n          <uib-tab-heading data-ng-mouseup="$event.which === 2 && closeTab($index)">\n            <i data-ng-if="workspace.class" class="prova" data-ng-class="workspace.class"></i> {{workspace.name | truncate: 25: \'...\': true}} <span class="badge badge-danger" data-ng-if="workspace.unread">{{workspace.unread}}</span> <i class="icon-close pointer-cursor" data-ng-click="closeTab($index)"></i>\n          </uib-tab-heading>\n          <div class="" data-ng-switch="workspace.type">\n            <new-contact data-ng-switch-when="newContact" workspace="workspace" index="$index" on-submit="createContact(index,item)"></new-contact>\n            <contact data-ng-switch-when="contact" workspace="workspace" index="$index" on-submit="updateContact(index,item)"></contact>\n            <jscripty data-ng-switch-when="jscripty" workspace="workspace" index="$index" on-submit="closeJscriptyTab(index)"></jscripty>\n            <!-- <jscripty data-ng-switch-when="jscripty" workspace="workspace" index="$index" on-submit="closeTab(index,item)"></jscripty> -->\n            <chat-room data-ng-switch-when="chatRoom" workspace="workspace" index="$index" on-submit="closeTab(index)"></chat-room>\n            <fax-room data-ng-switch-when="faxRoom" workspace="workspace" index="$index" on-submit="closeTab(index)"></fax-room>\n            <mail-room data-ng-switch-when="mailRoom" workspace="workspace" index="$index" on-submit="closeTab(index)"></mail-room>\n            <sms-room data-ng-switch-when="smsRoom" workspace="workspace" index="$index" on-submit="closeTab(index)"></sms-room>\n            <openchannel-room data-ng-switch-when="openchannelRoom" workspace="workspace" index="$index" on-submit="closeTab(index)"></openchannel-room>\n            <tiger-dial-disposal data-ng-switch-when="tdDisposal" workspace="workspace" index="$index"></tiger-dial-disposal>\n          </div>\n        </uib-tab>\n      </uib-tabset>\n      <!-- END PAGE CONTENT  -->\n\n    </div>\n  </div>\n  <!-- END CONTENT -->\n\n</div>\n<!-- END CONTAINER -->\n\n<!-- BEGIN FOOTER -->\n<div data-ng-include="\'components/footer/footer.html\'" data-ng-controller="FooterController" class="page-footer">\n</div>\n<!-- END FOOTER -->\n\n<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->\n<!-- BEGIN CORE PLUGINS -->\n<!--[if lt IE 9]>\n<script src="../../assets/global/plugins/respond.min.js"></script>\n<script src="../../assets/global/plugins/excanvas.min.js"></script>\n<![endif]-->\n\n<!-- END JAVASCRIPTS -->\n'),
-a.put("app/main/mergeContact.choose.modal.html",'<div class="modal-header" data-ng-init="initView()">\n  <h3 class="modal-title">{{ \'APPLICATION_CHOOSE_CONTACT_TO_MERGE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TABLE -->\n<div data-ng-if="gridOptions" ui-grid="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-draggable-rows class="ui-grid">\n  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n</div>\n<!-- END TABLE -->\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/main/mergeContact.merge.modal.html",'<div class="modal-header" data-ng-init="initView()">\n  <h3 class="modal-title">{{ \'APPLICATION_MERGE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n      <form name="forms.general" data-ng-submit="submit({index:index,item:contact})" novalidate>\n          <!-- BEGIN PORTLET -->\n          <div class="portlet light ">\n                <div class="portlet-body row">\n                    <div class="col-md-4">\n                      <!-- START FIRSTNAME -->\n                      <div class="form-group" data-ng-class="{\'has-error\': (forms.general.firstName.$touched || forms.general.$submitted) && forms.general.firstName.$invalid}">\n                        <label class="control-label">{{\'APPLICATION_FIRSTNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                        <input data-ng-if="fields.firstName.length <= 1" type="text" name="firstName" placeholder="{{\'APPLICATION_FIRSTNAME\' | translate}}" class="form-control" data-ng-model="contact.firstName" required/>\n                        <ui-select data-ng-if="fields.firstName.length > 1" data-ng-model="contact.firstName" theme="bootstrap" name="firstName" required>\n                          <ui-select-match placeholder="{{ \'APPLICATION_FIRSTNAME\' | translate }}">{{$select.selected}}</ui-select-match>\n                          <ui-select-choices repeat="field in fields.firstName | filter: $select.search track by $index">\n                            <div ng-bind-html="field | highlight: $select.search"></div>\n                          </ui-select-choices>\n                        </ui-select>\n                        <span data-ng-show="(forms.general.firstName.$touched || forms.general.$submitted) && forms.general.firstName.$error.required" class="help-block help-block-error">\n                          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                        </span>\n                      </div>\n                      <!-- END FIRSTNAME -->\n\n                      <!-- START LASTNAME -->\n                      <div class="form-group" data-ng-class="{\'has-error\': (forms.general.lastName.$touched || forms.general.$submitted) && forms.general.lastName.$invalid}">\n                        <label class="control-label">{{\'APPLICATION_LASTNAME\' | translate}}</label>\n                        <input data-ng-if="fields.lastName.length <= 1" type="text" name="lastName" placeholder="{{\'APPLICATION_LASTNAME\' | translate}}" class="form-control" data-ng-model="contact.lastName"/>\n                        <ui-select data-ng-if="fields.lastName.length > 1" data-ng-model="contact.lastName" theme="bootstrap" name="lastName">\n                          <ui-select-match placeholder="{{ \'APPLICATION_LASTNAME\' | translate }}">{{$select.selected}}</ui-select-match>\n                          <ui-select-choices repeat="field in fields.lastName | filter: $select.search track by $index">\n                            <div ng-bind-html="field | highlight: $select.search"></div>\n                          </ui-select-choices>\n                        </ui-select>\n                        <span data-ng-show="(forms.general.lastName.$touched || forms.general.$submitted) && forms.general.lastName.$error.required" class="help-block help-block-error">\n                          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                        </span>\n                      </div>\n                      <!-- END LASTNAME -->\n\n                      <!-- START COMPANY -->\n                      <div class="form-group" data-ng-class="{\'has-error\': forms.general.CompanyId.$invalid && forms.general.$submitted}">\n                        <label class="control-label">{{\'APPLICATION_COMPANY\' | translate}}</label>\n                          <ui-select data-ng-model="contact.CompanyId" theme="bootstrap" name="CompanyId" ng-disabled="!companies.length" required>\n                            <ui-select-match placeholder="{{ \'APPLICATION_COMPANY\' | translate }}">{{$select.selected.name}}</ui-select-match>\n                            <ui-select-choices repeat="company.id as company in companies | filter: $select.search" null-option="scope.noCompany">\n                              <div ng-bind-html="company.name | highlight: $select.search"></div>\n                            </ui-select-choices>\n                          </ui-select>\n                        <div class="note note-warning" data-ng-hide="companies.length">\n                          <h4 class="block">Warning!</h4>\n                          <p>\n                            {{ \'MESSAGE_NO_COMPANIES_AVAILABLE\' | translate }}\n                          </p>\n                          <p>\n                            {{\'APPLICATION_GO_TO\' | translate}} <a href="/contactmanager/companies/list">{{\'APPLICATION_COMPANIES\' | translate}}</a>\n                          </p>\n                        </div>\n                        <span data-ng-show="forms.general.CompanyId.$invalid && forms.general.$submitted" class="help-block help-block-error">\n                          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                        </span>\n                      </div>\n                      <!-- END COMPANY -->\n                    </div>\n                    <div class="col-md-4">\n                      <!-- START PHONE -->\n                      <div class="form-group" data-ng-class="{\'has-error\': (forms.general.phone.$touched || forms.general.$submitted) && forms.general.phone.$invalid}">\n                        <label class="control-label">{{\'APPLICATION_PHONE\' | translate}}</label>\n                        <input data-ng-if="fields.phone.length <= 1" type="text" name="phone" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="contact.phone"/>\n                        <ui-select data-ng-if="fields.phone.length > 1" data-ng-model="contact.phone" theme="bootstrap" name="phone">\n                          <ui-select-match placeholder="{{ \'APPLICATION_PHONE\' | translate }}">{{$select.selected}}</ui-select-match>\n                          <ui-select-choices repeat="field in fields.phone | filter: $select.search track by $index">\n                            <div ng-bind-html="field | highlight: $select.search"></div>\n                          </ui-select-choices>\n                        </ui-select>\n                      <span data-ng-show="(forms.general.phone.$touched || forms.general.$submitted) && forms.general.phone.$error.required" class="help-block help-block-error">\n                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                      </span>\n                    </div>\n                    <!-- END PHONE -->\n                    <!-- START MOBILE -->\n                    <div class="form-group" data-ng-class="{\'has-error\': (forms.general.mobile.$touched || forms.general.$submitted) && forms.general.mobile.$invalid}">\n                      <label class="control-label">{{\'APPLICATION_MOBILE\' | translate}}</label>\n                      <input data-ng-if="fields.mobile.length <= 1" type="text" name="mobile" placeholder="{{\'APPLICATION_MOBILE\' | translate}}" class="form-control" data-ng-model="contact.mobile"/>\n                      <ui-select data-ng-if="fields.mobile.length > 1" data-ng-model="contact.mobile" theme="bootstrap" name="mobile">\n                        <ui-select-match placeholder="{{ \'APPLICATION_MOBILE\' | translate }}">{{$select.selected}}</ui-select-match>\n                        <ui-select-choices repeat="field in fields.mobile | filter: $select.search track by $index">\n                          <div ng-bind-html="field | highlight: $select.search"></div>\n                        </ui-select-choices>\n                      </ui-select>\n                    <span data-ng-show="(forms.general.mobile.$touched || forms.general.$submitted) && forms.general.mobile.$error.required" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END MOBILE -->\n                  <!-- START EMAIL -->\n                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.email.$touched || forms.general.$submitted) && forms.general.email.$invalid}">\n                    <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}</label>\n                    <input data-ng-if="fields.email.length <= 1" type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="contact.email"/>\n                      <ui-select data-ng-if="fields.email.length > 1" data-ng-model="contact.email" theme="bootstrap" name="email">\n                        <ui-select-match placeholder="{{ \'APPLICATION_EMAIL\' | translate }}">{{$select.selected}}</ui-select-match>\n                        <ui-select-choices repeat="field in fields.email | filter: $select.search track by $index">\n                          <div ng-bind-html="field | highlight: $select.search"></div>\n                        </ui-select-choices>\n                      </ui-select>\n                    <span data-ng-show="(forms.general.email.$touched || forms.general.$submitted) && forms.general.email.$error.required" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END EMAIL -->\n                </div>\n                <div class="col-md-4">\n                  <!-- START FAX -->\n                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.fax.$touched || forms.general.$submitted) && forms.general.fax.$invalid}">\n                    <label class="control-label">{{\'APPLICATION_FAX\' | translate}}</label>\n                    <input data-ng-if="fields.fax.length <= 1" type="text" name="fax" placeholder="{{\'APPLICATION_FAX\' | translate}}" class="form-control" data-ng-model="contact.fax"/>\n                      <ui-select data-ng-if="fields.fax.length > 1" data-ng-model="contact.fax" theme="bootstrap" name="fax">\n                        <ui-select-match placeholder="{{ \'APPLICATION_FAX\' | translate }}">{{$select.selected}}</ui-select-match>\n                        <ui-select-choices repeat="field in fields.fax | filter: $select.search track by $index">\n                          <div ng-bind-html="field | highlight: $select.search"></div>\n                        </ui-select-choices>\n                      </ui-select>\n                    <span data-ng-show="(forms.general.fax.$touched || forms.general.$submitted) && forms.general.fax.$error.required" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END FAX -->\n                  <!-- START TAGS -->\n                  <div class="form-group" data-ng-class="{\'has-error\': forms.general.tags.$invalid && forms.general.$submitted}">\n                    <label class="control-label">{{\'APPLICATION_TAGS\' | translate}}</label>\n                    <ui-select multiple=\'true\' data-ng-model="contact.tags" theme="bootstrap" name="tags" ng-disabled="disabled">\n                      <ui-select-match placeholder="{{ \'APPLICATION_TAGS\' | translate }}">{{$item}}</ui-select-match>\n                      <ui-select-choices repeat="tag in tags | filter: $select.search">\n                        <div ng-bind-html="tag | highlight: $select.search"></div>\n                      </ui-select-choices>\n                    </ui-select>\n                    <span data-ng-show="forms.general.tags.$invalid && forms.general.$submitted" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END TAGS -->\n                  <!-- START LIST -->\n                  <div class="form-group" data-ng-if="contact.id">\n                    <label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n                    <input type="text" name="list" placeholder="{{\'APPLICATION_LIST\' | translate}}" class="form-control" data-ng data-ng-model="contact.List.name" disabled/>\n                  </div>\n                  <!-- END LIST -->\n                </div>\n              </div>\n            </div>\n            <div class="portlet light upborder">\n                <div class="portlet-body row">\n                <div class="col-md-4">\n                  <!-- START STREET -->\n                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.street.$touched || forms.general.$submitted) && forms.general.street.$invalid}">\n                    <label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n                    <input data-ng-if="fields.street.length <= 1" type="text" name="street" placeholder="{{\'APPLICATION_STREET\' | translate}}" class="form-control" data-ng-model="contact.street"/>\n                        <ui-select data-ng-if="fields.street.length > 1" data-ng-model="contact.street" theme="bootstrap" name="street">\n                          <ui-select-match placeholder="{{ \'APPLICATION_STREET\' | translate }}">{{$select.selected}}</ui-select-match>\n                          <ui-select-choices repeat="field in fields.street | filter: $select.search track by $index">\n                            <div ng-bind-html="field | highlight: $select.search"></div>\n                          </ui-select-choices>\n                        </ui-select>\n                    <span data-ng-show="(forms.general.street.$touched || forms.general.$submitted) && forms.general.street.$error.required" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END STREET -->\n\n                  <!-- START POSTALCODE -->\n                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.postalCode.$touched || forms.general.$submitted) && forms.general.postalCode.$invalid}">\n                    <label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n                    <input data-ng-if="fields.postalCode.length <= 1" type="text" name="postalCode" placeholder="{{\'APPLICATION_POSTALCODE\' | translate}}" class="form-control" data-ng-model="contact.postalCode"/>\n                        <ui-select data-ng-if="fields.postalCode.length > 1" data-ng-model="contact.postalCode" theme="bootstrap" name="postalCode">\n                          <ui-select-match placeholder="{{ \'APPLICATION_POSTALCODE\' | translate }}">{{$select.selected}}</ui-select-match>\n                          <ui-select-choices repeat="field in fields.postalCode | filter: $select.search track by $index">\n                            <div ng-bind-html="field | highlight: $select.search"></div>\n                          </ui-select-choices>\n                        </ui-select>\n                    <span data-ng-show="(forms.general.postalCode.$touched || forms.general.$submitted) && forms.general.postalCode.$error.required" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END POSTALCODE -->\n\n                  <!-- START CITY -->\n                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.city.$touched || forms.general.$submitted) && forms.general.city.$invalid}">\n                    <label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n                    <input data-ng-if="fields.city.length <= 1" type="text" name="city" placeholder="{{\'APPLICATION_CITY\' | translate}}" class="form-control" data-ng-model="contact.city"/>\n                        <ui-select data-ng-if="fields.city.length > 1" data-ng-model="contact.city" theme="bootstrap" name="city">\n                          <ui-select-match placeholder="{{ \'APPLICATION_CITY\' | translate }}">{{$select.selected}}</ui-select-match>\n                          <ui-select-choices repeat="field in fields.city | filter: $select.search track by $index">\n                            <div ng-bind-html="field | highlight: $select.search"></div>\n                          </ui-select-choices>\n                        </ui-select>\n                    <span data-ng-show="(forms.general.city.$touched || forms.general.$submitted) && forms.general.city.$error.required" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END CITY -->\n                </div>\n                <div class="col-md-4">\n                  <!-- START COUNTRY -->\n                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.country.$touched || forms.general.$submitted) && forms.general.country.$invalid}">\n                    <label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n                    <input data-ng-if="fields.country.length <= 1" type="text" name="country" placeholder="{{\'APPLICATION_COUNTRY\' | translate}}" class="form-control" data-ng-model="contact.country"/>\n                        <ui-select data-ng-if="fields.country.length > 1" data-ng-model="contact.country" theme="bootstrap" name="country">\n                          <ui-select-match placeholder="{{ \'APPLICATION_COUNTRY\' | translate }}">{{$select.selected}}</ui-select-match>\n                          <ui-select-choices repeat="field in fields.country | filter: $select.search track by $index">\n                            <div ng-bind-html="field | highlight: $select.search"></div>\n                          </ui-select-choices>\n                        </ui-select>\n                    <span data-ng-show="(forms.general.country.$touched || forms.general.$submitted) && forms.general.country.$error.required" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END COUNTRY -->\n\n                  <!-- START DATEOFBIRTH -->\n                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.dateOfBirth.$touched || forms.general.$submitted) && forms.general.dateOfBirth.$invalid}">\n                    <label class="control-label">{{\'APPLICATION_DATEOFBIRTH\' | translate}}</label>\n                    <input data-ng-if="fields.dateOfBirth.length <= 1" type="date" name="dateOfBirth" placeholder="{{\'APPLICATION_DATEOFBIRTH\' | translate}}" class="form-control" data-ng-model="contact.dateOfBirth"/>\n                    <ui-select data-ng-if="fields.dateOfBirth.length > 1" data-ng-model="contact.dateOfBirth" theme="bootstrap" name="dateOfBirth">\n                      <ui-select-match placeholder="{{ \'APPLICATION_DATEOFBIRTH\' | translate }}">{{$select.selected}}</ui-select-match>\n                      <ui-select-choices repeat="field in fields.dateOfBirth | filter: $select.search track by $index">\n                        <div ng-bind-html="field | highlight: $select.search"></div>\n                      </ui-select-choices>\n                    </ui-select>\n                      <span data-ng-show="(forms.general.dateOfBirth.$touched || forms.general.$submitted) && forms.general.dateOfBirth.$error.required" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END DATEOFBIRTH -->\n\n                  <!-- START DESCRIPTION -->\n                  <div class="form-group">\n                    <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                    <textarea  style="resize: vertical;" data-ng-if="fields.description.length <= 1" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="contact.description"/></textarea>\n                        <ui-select data-ng-if="fields.description.length > 1" data-ng-model="contact.description" theme="bootstrap" name="description">\n                          <ui-select-match placeholder="{{ \'APPLICATION_DESCRIPTION\' | translate }}">{{$select.selected}}</ui-select-match>\n                          <ui-select-choices repeat="field in fields.description | filter: $select.search track by $index">\n                            <div ng-bind-html="field | highlight: $select.search"></div>\n                          </ui-select-choices>\n                        </ui-select>\n                  </div>\n                  <!-- END DESCRIPTION -->\n                </div>\n                <div class="col-md-4">\n                  <!-- START URL -->\n                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.url.$touched || forms.general.$submitted) && forms.general.url.$invalid}">\n                    <label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n                    <input data-ng-if="fields.url.length <= 1" type="text" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="contact.url"/>\n                    <ui-select data-ng-if="fields.url.length > 1" data-ng-model="contact.url" theme="bootstrap" name="url">\n                      <ui-select-match placeholder="{{ \'APPLICATION_URL\' | translate }}">{{$select.selected}}</ui-select-match>\n                      <ui-select-choices repeat="field in fields.url | filter: $select.search track by $index">\n                        <div ng-bind-html="field | highlight: $select.search"></div>\n                      </ui-select-choices>\n                    </ui-select>\n                    <span data-ng-show="(forms.general.url.$touched || forms.general.$submitted) && forms.general.url.$error.required" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END URL -->\n                </div>\n              </div>\n            </div>\n          <div class="portlet light upborder" data-ng-if="customFields.length">\n            <div class="portlet-body">\n              <div class="row">\n              <div class="col-md-4" data-ng-repeat="customField in customFields">\n                <div data-ng-if="customField.type==\'text\'" class="form-group" data-ng-class="{\'has-error\': (forms.general[customField.name].$touched || forms.general.$submitted) && forms.general[customField.name].$invalid}">\n                  <label class="control-label">{{customField.alias}}</label>\n                  <input data-ng-if="fields[customField.name].length <= 1" type="text" name="{{customField.name}}" placeholder="{{customField.alias}}" class="form-control" data-ng-model="contact[customField.name]"/>\n                  <ui-select data-ng-if="fields[customField.name].length > 1" data-ng-model="contact[customField.name]" theme="bootstrap" name="{{customField.name}}">\n                    <ui-select-match placeholder="{{customField.name}}">{{$select.selected}}</ui-select-match>\n                    <ui-select-choices repeat="field in fields[customField.name] | filter: $select.search track by $index">\n                      <div ng-bind-html="field | highlight: $select.search"></div>\n                    </ui-select-choices>\n                  </ui-select>\n                  <span data-ng-show="(forms.general[customField.name].$touched || forms.general.$submitted) && forms.general[customField.name].$error.required" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n                <div data-ng-if="customField.type==\'select\'" class="form-group" data-ng-class="{\'has-error\': forms.general[customField.name].$invalid && forms.general.$submitted}">\n                  <label class="control-label">{{customField.alias}}</label>\n                  <ui-select data-ng-model="contact[customField.name]" theme="bootstrap" name="{{customField.name}}" data-ng-disabled="disabled">\n                    <ui-select-match allow-clear placeholder="{{customField.alias}}">{{$select.selected.value}}</ui-select-match>\n                    <ui-select-choices repeat="choice.value as choice in customField.values | filter: $select.search">\n                      <div ng-bind-html="choice.value | highlight: $select.search"></div>\n                    </ui-select-choices>\n                  </ui-select>\n                  <span data-ng-show="forms.general[customField.name].$invalid && forms.general.$submitted" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n              </div>\n            </div>\n            </div>\n          </div>\n          <!-- END PORTLET -->\n        </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="merge()" ng-disabled="forms.general.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/main/template/actionBuilder/template.actionBuilderIntegration.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" data-ng-change="changeIntegration()" required>\n    <ui-select-match placeholder="{{ \'APPLICATION_INTEGRATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="integration.state as integration in integrations | filter: $select.search">\n      <div ng-bind-html="integration.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{\'APPLICATION_INTEGRATION\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="form-group col-md-6" data-ng-if="element.data1 && accounts && randomName" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data2" name="data2{{randomName}}" theme="bootstrap" data-ng-change="changeAccount();" required>\n    <ui-select-match placeholder="{{\'APPLICATION_ACCOUNT\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="account.id as account in accounts | filter: $select.search">\n      <div ng-bind-html="account.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{\'APPLICATION_ACCOUNT\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="form-group col-md-6" data-ng-if="element.data2 && configurations && randomName" data-ng-class="{\'has-error\': (form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data3" name="data3{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{\'APPLICATION_CONFIGURATION\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="config.id as config in configurations | filter: $select.search">\n      <div ng-bind-html="config.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{\'APPLICATION_CONFIGURATION\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("app/main/template/actionBuilder/template.actionBuilderJscripty.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="project.id as project in projects | filter: $select.search">\n      <div ng-bind-html="project.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("app/main/template/actionBuilder/template.actionBuilderMotionBar.html",'<!-- data1: 0 POPUP, 1 URL, 2 WINAPP -->\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required data-ng-change="changeMode();">\n    <ui-select-match placeholder="{{ \'APPLICATION_TYPE\' | translate }}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="motionAction.value as motionAction in motionActions | filter: $select.search">\n      <div ng-bind-html="motionAction.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{ \'APPLICATION_TYPE\' | translate }}\n  </span>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<!-- data1:0 data2:Template -->\n<div data-ng-if="randomName && element.data1==0" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data2" name="data2{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{ \'APPLICATION_TEMPLATE\' | translate }}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n      <div ng-bind-html="template.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{ \'APPLICATION_TEMPLATE\' | translate }}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<!-- data1:1 data2:URL -->\n<div data-ng-if="randomName && element.data1==1" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" required placeholder="{{ \'APPLICATION_URL\' | translate }}"/>\n  <span class="help-block">\n    {{ \'APPLICATION_URL\' | translate }}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<!-- data1:2 data2:Application data3:Arguments -->\n<div data-ng-if="randomName && element.data1==2" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" required placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}"/>\n  <span class="help-block">\n    {{ \'APPLICATION_APPLICATION\' | translate }}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div data-ng-if="randomName && element.data1==2" class="form-group col-md-6">\n  <input type="text" ng-model="element.data3" name="data3{{randomName}}" class="form-control" placeholder="{{ \'APPLICATION_ARGUMENTS\' | translate }}"/>\n  <span class="help-block">\n    {{ \'APPLICATION_ARGUMENTS\' | translate }}\n  </span>\n</div>\n'),
-a.put("app/main/template/actionBuilder/template.actionBuilderStatus.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="status.value as status in states | filter: $select.search">\n      <div ng-bind-html="status.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("app/main/template/actionBuilder/template.actionBuilderTemplate.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n      <div ng-bind-html="template.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" required/>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="col-md-6">\n  <input type="text" ng-model="element.data3" class="form-control"/>\n</div>\n'),a.put("app/main/template/actionBuilder/template.actionBuilderUrlForward.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{ \'APPLICATION_TYPE\' | translate }}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="type.value as type in types | filter: $select.search">\n      <div ng-bind-html="type.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{\'APPLICATION_TYPE\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="form-group col-md-6" data-ng-if="element.data1 && randomName" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="url" ng-model="element.data2" placeholder="{{ \'APPLICATION_URL\' | translate }}" name="data2{{randomName}}" class="form-control" required/>\n  <span class="help-block">\n    {{\'APPLICATION_URL\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("app/main/template/template.conditionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-4" data-ng-class="{\'has-error\': (form[\'field\'+randomName].$touched || form.$submitted) && form[\'field\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.field" name="field{{randomName}}" theme="bootstrap" data-ng-change="checkCondition(element.field)" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="condition.value as condition in service.services[serviceindex].conditions | filter: $select.search">\n      <div ng-bind-html="condition.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'field\'+randomName].$touched || form.$submitted) && form[\'field\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div data-ng-if="randomName && element.field" class="form-group col-md-4" data-ng-class="{\'has-error\': (form[\'operator\'+randomName].$touched || form.$submitted) && form[\'operator\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.operator" name="operator{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="operator.value as operator in _.find(service.services[serviceindex].conditions,{value:element.field}).operators | filter: $select.search">\n      <div ng-bind-html="operator.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'operator\'+randomName].$touched || form.$submitted) && form[\'operator\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="col-md-4" data-ng-if="elementType === \'input\' && randomName && element.field" data-ng-class="{\'has-error\': (form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$invalid}">\n  <input type="text" ng-model="element.value" class="form-control" name="value{{randomName}}" required/>\n  <span data-ng-show="(form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$error.required" class="help-block help-block-error">\n      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n    </span>\n</div>\n<div class="form-group col-md-4" data-ng-if="elementType === \'select\' && randomName && element.field" data-ng-class="{\'has-error\': (form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.value" name="value{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="value.value as value in values| filter: $select.search">\n      <div ng-bind-html="value.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("app/main/template/template.contactTab.html",'<div class="row margin-top-20 contact-tab-container">\n  <div class="col-md-12 contact-tab">\n    <form name="forms.general" data-ng-submit="submit({index:index,item:contact})" novalidate>\n    <!-- BEGIN PROFILE CONTENT -->\n    <div class="profile-content">\n      <ul class="nav nav-tabs">\n  <li class="active">\n    <a href="#tab_1_1{{contact.id || \'\'}}" data-toggle="tab">{{\'APPLICATION_DETAIL\' | translate}}</a>\n  </li>\n  <li data-ng-if="contact.id">\n    <a href="#tab_1_2{{contact.id || \'\'}}" data-toggle="tab">{{\'APPLICATION_CUSTOMER_JOURNEY\' | translate}}</a>\n  </li>\n</ul>\n<div class="tab-content">\n  <div class="tab-pane fade active in" id="tab_1_1{{contact.id || \'\'}}">\n    <!--end add-portfolio-->\n    <div class="row portfolio-block" data-ng-if="workspace.data && workspace.data.uniqueid && workspace.data.agentcalledAt">\n      <div class="col-md-3">\n        <div class="portfolio-text">\n          <img src="assets/images/media/CmCall.png" alt=""/>\n          <div class="portfolio-text-info">\n            <h4>{{\'MESSAGE_INBOUND_CALL_FROM\' | translate}} - {{workspace.data.calleridnum}}</h4>\n            <p>\n              {{\'MESSAGE_CALL_UNIQUEID\' | translate}} : {{workspace.data.uniqueid}}\n            </p>\n          </div>\n        </div>\n      </div>\n      <div class="col-md-2 portfolio-stat">\n        <div>{{\'APPLICATION_QUEUE\' | translate}} </div>\n        <p>  {{workspace.data.queue}} </p>\n      </div>\n      <div class="col-md-3 portfolio-stat">\n        <div>{{\'APPLICATION_AGENT\' | translate}} </div>\n        <p>  {{workspace.data.membername}} </p>\n      </div>\n      <div class="col-md-2 portfolio-stat">\n        <div>{{\'APPLICATION_DATE\' | translate}} </div>\n        <p>  {{workspace.data.agentcalledAt | date:\'dd/MM/yyyy HH:mm:ss\'}} </p>\n      </div>\n      <div class="col-md-2 portfolio-stat">\n        <button class="btn grey-cascade" type="button" data-ng-click="dispose()" data-ng-disabled="contact.disposed">\n          <i class="icon-target"></i> {{\'APPLICATION_DISPOSITION\' | translate}}\n        </button>\n      </div>\n    </div>\n            <!--end row-->\n          <!-- BEGIN PORTLET -->\n          <div class="portlet light ">\n            <div class="portlet-title">\n              <div class="caption caption-md">\n                <i class="icon-bar-chart theme-font hide"></i>\n                <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DETAIL\' | translate}}</span>\n              </div>\n              <div class="actions">\n                <div class="btn-group btn-group-devided" data-toggle="buttons">\n                  <button type="submit" data-ng-if="contact.id" title="{{\'APPLICATION_COPY\' | translate}}" class="btn btn-circle green btn-sm" data-ng-click="copy(contact.id)"><i class="fa fa-files-o"></i></button>\n                  <button type="submit" data-ng-if="contact.ListId" class="btn btn-circle purple btn-sm" title="{{\'APPLICATION_MERGE\' | translate}}" data-ng-click="merge(contact)"><i class="icon-link"></i></button>\n                  <label class="btn btn-transparent grey-salsa btn-circle btn-sm active" data-ng-click="detail.tab=\'main\'">\n                  <input type="radio" class="toggle">{{\'APPLICATION_MAIN\' | translate}}</label>\n                  <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-click="detail.tab=\'other\'">\n                  <input type="radio" class="toggle">{{\'APPLICATION_OTHER\' | translate}}</label>\n                </div>\n              </div>\n            </div>\n            <div class="portlet-body">\n              <div data-ng-class="{\'hidden\':detail.tab != \'main\'}" class="portlet-body contact-portlet row">\n                <div class="col-md-4">\n              <!-- START FIRSTNAME -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.firstName.$touched || forms.general.$submitted) && forms.general.firstName.$invalid}">\n                <label class="control-label">{{\'APPLICATION_FIRSTNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                <input type="text" name="firstName" placeholder="{{\'APPLICATION_FIRSTNAME\' | translate}}" class="form-control" data-ng-model="contact.firstName" required/>\n                <span data-ng-show="(forms.general.firstName.$touched || forms.general.$submitted) && forms.general.firstName.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END FIRSTNAME -->\n\n              <!-- START LASTNAME -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.lastName.$touched || forms.general.$submitted) && forms.general.lastName.$invalid}">\n                <label class="control-label">{{\'APPLICATION_LASTNAME\' | translate}}</label>\n                <input type="text" name="lastName" placeholder="{{\'APPLICATION_LASTNAME\' | translate}}" class="form-control" data-ng-model="contact.lastName"/>\n                <span data-ng-show="(forms.general.lastName.$touched || forms.general.$submitted) && forms.general.lastName.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END LASTNAME -->\n\n              <!-- START COMPANY -->\n              <div class="form-group" data-ng-class="{\'has-error\': forms.general.CompanyId.$invalid && forms.general.$submitted}">\n                <label class="control-label">{{\'APPLICATION_COMPANY\' | translate}}</label>\n                <div class="input-group">\n                  <ui-select data-ng-model="contact.CompanyId" theme="bootstrap" name="CompanyId" ng-disabled="!companies.length" required>\n                    <ui-select-match placeholder="{{ \'APPLICATION_COMPANY\' | translate }}">{{$select.selected.name}}</ui-select-match>\n                    <ui-select-choices repeat="company.id as company in companies | filter: $select.search" null-option="scope.noCompany">\n                      <div ng-bind-html="company.name | highlight: $select.search"></div>\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-btn">\n                    <button type="button" data-ng-click="companyInfo(contact.CompanyId)" class="btn btn-default" data-ng-disabled="!contact.CompanyId">\n                      <span class="icon-info" data-ng-class="{\'font-blue\':contact.CompanyId}"></span>\n                    </button>\n                  </span>\n                </div>\n                <div class="note note-warning" data-ng-hide="companies.length">\n                  <h4 class="block">Warning!</h4>\n                  <p>\n                    {{ \'MESSAGE_NO_COMPANIES_AVAILABLE\' | translate }}\n                  </p>\n                  <p>\n                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/contactmanager/companies/list">{{\'APPLICATION_COMPANIES\' | translate}}</a>\n                  </p>\n                </div>\n                <span data-ng-show="forms.general.CompanyId.$invalid && forms.general.$submitted" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END COMPANY -->\n            </div>\n            <div class="col-md-4">\n              <!-- START PHONE -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.phone.$touched || forms.general.$submitted) && forms.general.phone.$invalid}">\n                <label class="control-label">{{\'APPLICATION_PHONE\' | translate}}</label>\n                <div class="input-group">\n                  <input type="text" name="phone" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="contact.phone"/>\n                  <span class="input-group-btn" uib-dropdown>\n                    <button data-ng-if="Auth.isAgent()" type="button" uib-dropdown-toggle class="btn btn-default" data-ng-disabled="!contact.phone || !agent.phoneBarRemoteControl" >\n                      <span class="icon-earphones-alt" data-ng-class="{\'font-blue\':contact.phone && agent.phoneBarRemoteControl}" uib-tooltip="{{!agent.phoneBarRemoteControl ? (\'APPLICATION_ENABLE_REMOTE_PHONEBAR\' | translate) : (\'APPLICATION_MOTION_BAR_CONTROLS\' | translate)}}" ></span>\n                    </button>\n                    <ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="single-button">\n                      <li role="menuitem"><a href="#" data-ng-click="callPhoneBar(contact.phone,\'call\')"><i class="icon-phone"></i> {{\'APPLICATION_CALL\' | translate}}</a></li>\n                      <li role="menuitem"><a href="#" data-ng-click="callPhoneBar(contact.phone,\'transfer\')"><i class="glyphicon glyphicon-random"></i> {{\'APPLICATION_TRANSFER\' | translate}}</a></li>\n                    </ul>\n                    <button type="button" data-ng-click="openRoom(null,\'smsRoom\',{to:contact.phone})" class="btn btn-default" data-ng-disabled="!contact.phone || !license.messaging">\n                      <span class="glyphicon glyphicon-comment" data-ng-class="{\'font-blue\':contact.phone && license.messaging}"></span>\n                    </button>\n                  </span>\n                </div>\n                <span data-ng-show="(forms.general.phone.$touched || forms.general.$submitted) && forms.general.phone.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END PHONE -->\n              <!-- START MOBILE -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.mobile.$touched || forms.general.$submitted) && forms.general.mobile.$invalid}">\n                <label class="control-label">{{\'APPLICATION_MOBILE\' | translate}}</label>\n                <div class="input-group">\n                  <input type="text" name="mobile" placeholder="{{\'APPLICATION_MOBILE\' | translate}}" class="form-control" data-ng-model="contact.mobile"/>\n                  <span class="input-group-btn" uib-dropdown>\n                    <button data-ng-if="Auth.isAgent()" type="button" uib-dropdown-toggle class="btn btn-default" data-ng-disabled="!contact.mobile || !agent.phoneBarRemoteControl" >\n                      <span class="icon-earphones-alt" data-ng-class="{\'font-blue\':contact.mobile && agent.phoneBarRemoteControl}" uib-tooltip="{{!agent.phoneBarRemoteControl ? (\'APPLICATION_ENABLE_REMOTE_PHONEBAR\' | translate) : (\'APPLICATION_MOTION_BAR_CONTROLS\' | translate)}}" ></span>\n                    </button>\n                    <ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="single-button">\n                      <li role="menuitem"><a href="#" data-ng-click="callPhoneBar(contact.mobile,\'call\')"><i class="icon-phone"></i> {{\'APPLICATION_CALL\' | translate}}</a></li>\n                      <li role="menuitem"><a href="#" data-ng-click="callPhoneBar(contact.mobile,\'transfer\')"><i class="glyphicon glyphicon-random"></i> {{\'APPLICATION_TRANSFER\' | translate}}</a></li>\n                    </ul>\n                    <button type="button" data-ng-click="openRoom(null,\'smsRoom\',{to:contact.mobile})" class="btn btn-default" data-ng-disabled="!contact.mobile || !license.messaging">\n                      <span class="glyphicon glyphicon-comment" data-ng-class="{\'font-blue\':contact.mobile && license.messaging}"></span>\n                    </button>\n                  </span>\n                </div>\n                <span data-ng-show="(forms.general.mobile.$touched || forms.general.$submitted) && forms.general.mobile.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END MOBILE -->\n              <!-- START EMAIL -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.email.$touched || forms.general.$submitted) && forms.general.email.$invalid}">\n                <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}</label>\n                <div class="input-group">\n                  <input type="text" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="contact.email"/>\n                  <span class="input-group-btn">\n                    <button type="button" data-ng-click="openRoom(null,\'mailRoom\',{to:contact.email})" class="btn btn-default" data-ng-disabled="!contact.email || !license.mail">\n                      <span class="icon-envelope" data-ng-class="{\'font-blue\':contact.email && license.mail}"></span>\n                    </button>\n                  </span>\n                </div>\n                <span data-ng-show="(forms.general.email.$touched || forms.general.$submitted) && forms.general.email.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END EMAIL -->\n            </div>\n            <div class="col-md-4">\n              <!-- START FAX -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.fax.$touched || forms.general.$submitted) && forms.general.fax.$invalid}">\n                <label class="control-label">{{\'APPLICATION_FAX\' | translate}}</label>\n                <div class="input-group">\n                  <input type="text" name="fax" placeholder="{{\'APPLICATION_FAX\' | translate}}" class="form-control" data-ng-model="contact.fax"/>\n                  <span class="input-group-btn">\n                    <button type="button" data-ng-click="openRoom(null,\'faxRoom\',{to:contact.fax})" class="btn btn-default" data-ng-disabled="!contact.fax || !license.fax">\n                      <span class="fa fa-fax" data-ng-class="{\'font-blue\':contact.fax && license.fax}"></span>\n                    </button>\n                  </span>\n                </div>\n                <span data-ng-show="(forms.general.fax.$touched || forms.general.$submitted) && forms.general.fax.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END FAX -->\n              <!-- START TAGS -->\n              <div class="form-group" data-ng-class="{\'has-error\': forms.general.tags.$invalid && forms.general.$submitted}">\n                <label class="control-label">{{\'APPLICATION_TAGS\' | translate}}</label>\n                <ui-select multiple=\'true\' data-ng-model="contact.tags" theme="bootstrap" name="tags" ng-disabled="disabled">\n                  <ui-select-match placeholder="{{ \'APPLICATION_TAGS\' | translate }}">{{$item}}</ui-select-match>\n                  <ui-select-choices repeat="tag in tags | filter: $select.search">\n                    {{tag}}\n                  </ui-select-choices>\n                </ui-select>\n                <span data-ng-show="forms.general.tags.$invalid && forms.general.$submitted" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END TAGS -->\n              <!-- START LIST -->\n              <div class="form-group" data-ng-if="contact.id">\n                <label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n                <input type="text" name="list" placeholder="{{\'APPLICATION_LIST\' | translate}}" class="form-control" data-ng data-ng-model="contact.List.name" disabled/>\n              </div>\n              <!-- END LIST -->\n              <!-- START LIST -->\n              <div data-ng-if="!contact.id" class="form-group" data-ng-class="{\'has-error\': forms.general.ListId.$invalid && forms.general.$submitted}">\n                <label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n                <ui-select data-ng-model="contact.ListId" theme="bootstrap" name="ListId" data-ng-change="getCustomFields()" required>\n                  <ui-select-match placeholder="{{ \'APPLICATION_LIST\' | translate }}">{{$select.selected.name}}</ui-select-match>\n                  <ui-select-choices repeat="list.id as list in lists | filter: $select.search">\n                    <div ng-bind-html="list.name | highlight: $select.search"></div>\n                  </ui-select-choices>\n                </ui-select>\n                <div class="note note-warning" data-ng-hide="lists.length">\n                  <h4 class="block">Warning!</h4>\n                  <p>\n                    {{ \'MESSAGE_NO_LISTS_AVAILABLE\' | translate }}\n                  </p>\n                  <p>\n                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/contactmanager/lists/list">{{\'APPLICATION_LISTS\' | translate}}</a>\n                  </p>\n                </div>\n                <span data-ng-show="forms.general.ListId.$invalid && forms.general.$submitted" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END LIST -->\n            </div>\n            </div>\n            <div data-ng-class="{\'hidden\':detail.tab != \'other\'}" class="portlet-body contact-portlet row">\n              <div class="col-md-4">\n              <!-- START STREET -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.street.$touched || forms.general.$submitted) && forms.general.street.$invalid}">\n                <label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n                <input type="text" name="street" placeholder="{{\'APPLICATION_STREET\' | translate}}" class="form-control" data-ng-model="contact.street"/>\n                <span data-ng-show="(forms.general.street.$touched || forms.general.$submitted) && forms.general.street.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END STREET -->\n\n              <!-- START POSTALCODE -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.postalCode.$touched || forms.general.$submitted) && forms.general.postalCode.$invalid}">\n                <label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n                <input type="text" name="postalCode" placeholder="{{\'APPLICATION_POSTALCODE\' | translate}}" class="form-control" data-ng-model="contact.postalCode"/>\n                <span data-ng-show="(forms.general.postalCode.$touched || forms.general.$submitted) && forms.general.postalCode.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END POSTALCODE -->\n\n              <!-- START CITY -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.city.$touched || forms.general.$submitted) && forms.general.city.$invalid}">\n                <label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n                <input type="text" name="city" placeholder="{{\'APPLICATION_CITY\' | translate}}" class="form-control" data-ng-model="contact.city"/>\n                <span data-ng-show="(forms.general.city.$touched || forms.general.$submitted) && forms.general.city.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END CITY -->\n            </div>\n            <div class="col-md-4">\n              <!-- START COUNTRY -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.country.$touched || forms.general.$submitted) && forms.general.country.$invalid}">\n                <label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n                <input type="text" name="country" placeholder="{{\'APPLICATION_COUNTRY\' | translate}}" class="form-control" data-ng-model="contact.country"/>\n                <span data-ng-show="(forms.general.country.$touched || forms.general.$submitted) && forms.general.country.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END COUNTRY -->\n\n              <!-- START DATEOFBIRTH -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.dateOfBirth.$touched || forms.general.$submitted) && forms.general.dateOfBirth.$invalid}">\n                <label class="control-label">{{\'APPLICATION_DATEOFBIRTH\' | translate}}</label>\n                <input name="dateOfBirth" type="date" placeholder="{{\'APPLICATION_DATEOFBIRTH\' | translate}}" class="form-control date-picker" data-ng-model="contact.dateOfBirth"/>\n                <span data-ng-show="(forms.general.dateOfBirth.$touched || forms.general.$submitted) && forms.general.dateOfBirth.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END DATEOFBIRTH -->\n\n              <!-- START DESCRIPTION -->\n              <div class="form-group">\n                <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                <textarea style="resize: vertical;" type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="contact.description"></textarea>\n              </div>\n              <!-- END DESCRIPTION -->\n            </div>\n            <div class="col-md-4">\n              <!-- START URL -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.url.$touched || forms.general.$submitted) && forms.general.url.$invalid}">\n                <label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n                <input type="text" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="contact.url"/>\n                <span data-ng-show="(forms.general.url.$touched || forms.general.$submitted) && forms.general.url.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END URL -->\n\n              <!-- START CREATED_BY -->\n              <div class="form-group" data-ng-if="contact.id">\n                <label class="control-label">{{\'APPLICATION_CREATED_BY\' | translate}}</label>\n                <input type="text" name="createdBy" placeholder="{{\'APPLICATION_CREATED_BY\' | translate}}" class="form-control" data-ng-model="contact.User.name" disabled/>\n              </div>\n              <!-- END CREATED_BY -->\n            </div>\n            </div>\n            </div>\n            <button type="submit" class="btn btn-circle green-haze btn-sm" data-ng-disabled="!contact.firstName || !contact.ListId">{{\'APPLICATION_UPDATE\' | translate}}</button>\n          </div>\n          <!-- END PORTLET -->\n          <!-- BEGIN PORTLET -->\n          <div class="portlet light" data-ng-if="customFields.length">\n            <div class="portlet-title tabbable-line">\n              <div class="caption caption-md">\n                <i class="icon-globe theme-font hide"></i>\n                <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CUSTOM_FIELDS\' | translate}}</span>\n              </div>\n            </div>\n            <div class="portlet-body">\n              <div class="row">\n              <div class="col-md-4" data-ng-repeat="customField in customFields">\n                <div data-ng-if="customField.type==\'text\'" class="form-group" data-ng-class="{\'has-error\': (forms.general[customField.name].$touched || forms.general.$submitted) && forms.general[customField.name].$invalid}">\n                  <label class="control-label">{{customField.alias}}</label>\n                  <input type="text" name="{{customField.name}}" placeholder="{{customField.alias}}" class="form-control" data-ng-model="contact[customField.name]"/>\n                  <span data-ng-show="(forms.general[customField.name].$touched || forms.general.$submitted) && forms.general[customField.name].$error.required" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n                <div data-ng-if="customField.type==\'select\'" class="form-group" data-ng-class="{\'has-error\': forms.general[customField.name].$invalid && forms.general.$submitted}">\n                  <label class="control-label">{{customField.alias}}</label>\n                  <ui-select data-ng-model="contact[customField.name]" theme="bootstrap" name="{{customField.name}}" data-ng-disabled="disabled">\n                    <ui-select-match allow-clear placeholder="{{customField.alias}}">{{$select.selected.value}}</ui-select-match>\n                    <ui-select-choices repeat="choice.value as choice in customField.values | filter: $select.search">\n                      <div ng-bind-html="choice.value | highlight: $select.search"></div>\n                    </ui-select-choices>\n                  </ui-select>\n                  <span data-ng-show="forms.general[customField.name].$invalid && forms.general.$submitted" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n              </div>\n            </div>\n              <button type="submit" class="btn btn-circle green-haze btn-sm" data-ng-disabled="!contact.firstName || !contact.ListId">{{\'APPLICATION_UPDATE\' | translate}}</button>\n            </div>\n        </div>\n        <!-- END PORTLET -->\n      </div>\n      <div class="tab-pane fade" id="tab_1_2{{contact.id || \'\'}}">\n          <!-- BEGIN PORTLET -->\n          <div class="portlet light">\n            <div class="portlet-title tabbable-line">\n              <div class="caption caption-md">\n                <i class="icon-globe theme-font hide"></i>\n                <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CUSTOMER_JOURNEY\' | translate}}</span>\n              </div>\n              <ul class="nav nav-tabs">\n                <li class="active">\n                  <a href="#" data-target="#tab_2_1" data-toggle="tab">{{ \'APPLICATION_DAILY\' | translate}}</a>\n                </li>\n                <li>\n                  <a href="#" data-target="#tab_2_2" data-toggle="tab">{{ \'APPLICATION_HISTORY\' | translate}}</a>\n                </li>\n              </ul>\n            </div>\n            <div class="portlet-body">\n              <!--BEGIN TABS-->\n              <div class="tab-content">\n                <div class="tab-pane active" id="tab_2_1">\n                  <div class="contact-portlet">\n                    <div class="actions">\n                      <div class="btn-group btn-group-devided" data-toggle="buttons">\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.daily.show === \'phone\'}" data-ng-click="updateLog(\'daily\',\'phone\',\'general\',\'inbound\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_PHONES\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.daily.show === \'email\'}" data-ng-click="updateLog(\'daily\',\'email\',\'general\',\'room\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_EMAILS\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.daily.show === \'chat\'}" data-ng-click="updateLog(\'daily\',\'chat\',\'general\',\'room\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_CHAT\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.daily.show === \'fax\'}" data-ng-click="updateLog(\'daily\',\'fax\',\'general\',\'room\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_FAX\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.daily.show === \'sms\'}" data-ng-click="updateLog(\'daily\',\'sms\',\'general\',\'room\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_SMS\' | translate}}</label>\n                      </div><span data-ng-if="log.daily.show==\'phone\'"> |</span>\n                      <div class="btn-group btn-group-devided" data-toggle="buttons" data-ng-if="log.daily.show==\'phone\'">\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.daily.type === \'inbound\'}" data-ng-click="updateLog(\'daily\',false,false,\'inbound\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_INBOUND\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.daily.type === \'outbound\'}" data-ng-click="updateLog(\'daily\',false,\'general\',\'outbound\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_OUTBOUND\' | translate}}</label>\n                      </div><span data-ng-if="log.daily.show==\'phone\'"> |</span>\n                      <div class="btn-group btn-group-devided" data-toggle="buttons" data-ng-if="log.daily.show==\'phone\'">\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.daily.detail === \'general\'}" data-ng-click="updateLog(\'daily\',false,\'general\',false)">\n                        <input type="radio" class="toggle">{{\'APPLICATION_GENERAL\' | translate}}</label>\n                        <label data-ng-if="log.daily.type===\'inbound\'" class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.daily.detail === \'queue\'}" data-ng-click="updateLog(\'daily\',false,\'queue\',\'inbound\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_QUEUES\' | translate}}</label>\n                      </div>\n                    </div>\n                    <div data-ng-if="gridOptionsdaily" name="gridOptionsdaily"  ui-grid="gridOptionsdaily"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                      <div class="watermark" ng-show="!gridOptionsdaily.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                    </div>\n                  </div>\n              </div>\n                <div class="tab-pane" id="tab_2_2">\n                  <div class="contact-portlet">\n                    <div class="actions">\n                      <div class="btn-group btn-group-devided" data-toggle="buttons">\n'+"                        <label class=\"btn btn-transparent grey-salsa btn-circle btn-sm\" data-ng-class=\"{'active':log.history.show === 'phone'}\" data-ng-click=\"updateLog('history','phone','general','inbound')\">\n                        <input type=\"radio\" class=\"toggle\">{{'APPLICATION_PHONES' | translate}}</label>\n                        <label class=\"btn btn-transparent grey-salsa btn-circle btn-sm\" data-ng-class=\"{'active':log.history.show === 'email'}\" data-ng-click=\"updateLog('history','email','general','room')\">\n                        <input type=\"radio\" class=\"toggle\">{{'APPLICATION_EMAILS' | translate}}</label>\n                        <label class=\"btn btn-transparent grey-salsa btn-circle btn-sm\" data-ng-class=\"{'active':log.history.show === 'chat'}\" data-ng-click=\"updateLog('history','chat','general','room')\">\n                        <input type=\"radio\" class=\"toggle\">{{'APPLICATION_CHAT' | translate}}</label>\n                        <label class=\"btn btn-transparent grey-salsa btn-circle btn-sm\" data-ng-class=\"{'active':log.history.show === 'fax'}\" data-ng-click=\"updateLog('history','fax','general','room')\">\n                        <input type=\"radio\" class=\"toggle\">{{'APPLICATION_FAX' | translate}}</label>\n                        <label class=\"btn btn-transparent grey-salsa btn-circle btn-sm\" data-ng-class=\"{'active':log.history.show === 'sms'}\" data-ng-click=\"updateLog('history','sms','general','room')\">\n                        <input type=\"radio\" class=\"toggle\">{{'APPLICATION_SMS' | translate}}</label>\n                      </div><span data-ng-if=\"log.history.show=='phone'\"> |</span>\n                      <div class=\"btn-group btn-group-devided\" data-toggle=\"buttons\" data-ng-if=\"log.history.show=='phone'\">\n                        <label class=\"btn btn-transparent grey-salsa btn-circle btn-sm\" data-ng-class=\"{'active':log.history.type === 'inbound'}\" data-ng-click=\"updateLog('history',false,false,'inbound')\">\n                        <input type=\"radio\" class=\"toggle\">{{'APPLICATION_INBOUND' | translate}}</label>\n                        <label class=\"btn btn-transparent grey-salsa btn-circle btn-sm\" data-ng-class=\"{'active':log.history.type === 'outbound'}\" data-ng-click=\"updateLog('history',false,'general','outbound')\">\n                        <input type=\"radio\" class=\"toggle\">{{'APPLICATION_OUTBOUND' | translate}}</label>\n                      </div><span data-ng-if=\"log.history.show=='phone'\"> |</span>\n                      <div class=\"btn-group btn-group-devided\" data-toggle=\"buttons\" data-ng-if=\"log.history.show=='phone'\">\n                        <label class=\"btn btn-transparent grey-salsa btn-circle btn-sm\" data-ng-class=\"{'active':log.history.detail === 'general'}\" data-ng-click=\"updateLog('history',false,'general',false)\">\n                        <input type=\"radio\" class=\"toggle\">{{'APPLICATION_GENERAL' | translate}}</label>\n                        <label data-ng-if=\"log.history.type==='inbound'\" class=\"btn btn-transparent grey-salsa btn-circle btn-sm\" data-ng-class=\"{'active':log.history.detail === 'queue'}\" data-ng-click=\"updateLog('history',false,'queue','inbound')\">\n                        <input type=\"radio\" class=\"toggle\">{{'APPLICATION_QUEUES' | translate}}</label>\n                      </div>\n                    </div>\n                    <div data-ng-if=\"gridOptionshistory\" name=\"gridOptionshistory\" ui-grid=\"gridOptionshistory\"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter ui-grid-draggable-rows class=\"ui-grid\">\n                      <div class=\"watermark\" ng-show=\"!gridOptionshistory.data.length\">{{'MESSAGE_NO_RESULTS_AVAILABLE' | translate}}</div>\n                    </div>\n                  </div>\n                </div>\n              </div>\n              <!--END TABS-->\n            </div>\n          </div>\n          <!-- END PORTLET -->\n        </div>\n    <!-- END PROFILE CONTENT -->\n  </form>\n</div>\n  </div>\n</div>\n"),
-a.put("app/main/template/template.jscriptyTab.html",'<div class="portlet light bordered">\n    <!-- BEGIN PORTLET BODY -->\n    <div class="portlet-body">\n          <div class="row">\n              <!-- BEGIN SIDEBAR -->\n                <div  class="profile-sidebar" style="width: 250px;">\n                  <!-- PORTLET MAIN -->\n              				<!-- SIDEBAR MENU -->\n              				<div class="profile-usermenu">\n              					<ul class="nav">\n              						<li  ng-repeat= \'question in questions track by $index\' ng-class="{active: $index == count}">\n              							<a  ng-click="setCurrentQuestion($index)" >\n																<i class="fa fa-check"></i> <label ng-if="attribute.nodeName == \'label\'" ng-repeat=\'attribute in question.value.attributes track by $index\'>{{attribute.value}}</label>\n                            </a>\n              						</li>\n              					</ul>\n              				</div>\n              				<!-- END SIDEBAR MENU -->\n                    <!-- END PORTLET MAIN -->\n                </div>\n                  <!-- END SIDEBAR -->\n                  <div   class="profile-content">\n                        <div class="portlet light bordered">\n                          <div class="portlet-title">\n                            <div class="caption font-green-sharp">\n                              <i class="fa fa-edit font-green-sharp"></i>\n                              <span ng-if="attribute.nodeName ==\'label\'" ng-repeat=\'attribute in currentQuestion.value.attributes\' class="caption-subject">{{attribute.value}} </span>\n                            </div>\n\n                          </div>\n  										    <div class="portlet-body form ">\n                            <div class="row">\n															<div class="col-md-10 col-md-offset-1 ">\n                                  <form >\n                                    <div class="form-body" style="height: 400px; overflow-y: auto;overflow-x:hidden">\n\n                                       <!-- Question  -->\n                                       <div class="form-group" style="word-wrap: break-word;" >\n                                          <h3 ng-if="attribute.nodeName ==\'question\' || attribute.nodeName ==\'text\'" ng-repeat=\'attribute in currentQuestion.value.attributes\'>{{attribute.value}}</h3>\n                                        </div>\n                                        <!-- Buttons  -->\n\n                                        <div  ng-if ="(edge.source.id == currentQuestion.id) && edge.value" ng-repeat=\'edge in currentQuestion.edges track by $index\' class="row">\n                                          <div  class="col-md-8 col-md-offset-2">\n                                            <input    checked="checked"   type="radio"  ng-model="currentQuestion.button" ng-value="edge" >\n                                              <label  ng-show="(edge.source.id == currentQuestion.id) && edge.value">{{edge.value}}</label><br><br>\n                                          </div>\n                                        </div>\n                                               <!-- Question Other Option  -->\n\n                                         <div class="form-group" ng-if= "attribute.nodeName ==\'other\' && attribute.value " ng-repeat=\'attribute in currentQuestion.value.attributes track by $index\'>\n                                            <br>\n                                           <div class="col-md-2">\n                                             <label class="control-label">{{attribute.value}}</label>\n                                           </div>\n                                              <div class="col-md-8">\n                                                <textarea  style="overflow:auto" ng-model="currentQuestion.otheranswer" placeholder="Enter text" rows="8" cols="40" ></textarea>\n                                              </div>\n              													</div>\n                                              <!--  Inputs -->\n                                          <div class="row margin-top-10"  ng-repeat=\'question in currentQuestion.children track by $index\'>\n                                              <div class="col-md-10 col-md-offset-1">\n                                                <div  ng-repeat=\'attribute in question.value.attributes track by $index\'>\n                                                    <div  ng-switch="attribute.nodeName">\n                                                        <div ng-class="col-md-2" ng-switch-when="label">\n                                                          <label class="control-label" style=" display:block;word-break:break-all;" >{{attribute.value}}</label>\n                                                        </div>\n                                                        <div ng-class="attribute.value != \'checkbox\' ? \'col-md-10 pull-right\': \'col-md-2\'" ng-switch-when="type" ng-switch="attribute.value">\n                                                            <input class="form-control" ng-switch-when="text" type="text" ng-model="question.answer" />\n                                                            <input  class="form-control" ng-switch-when="number" type="number" ng-model="question.answer" />\n                                                            <input  class=" pull-right"  ng-switch-when="checkbox" type="checkbox" ng-model="question.answer" />\n                                                            <!-- ng-true-value="\'Selected\'" ng-false-value="\'Not Selected\'" -->\n                                                            <textarea  class="form-control" ng-switch-when="textarea" ng-model="question.answer" rows="8" cols="40"></textarea>\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                              </div>\n                                          </div>\n                                          </div>\n                                          <!-- actions -->\n                                          <div class="form-actions">\n                                            <div  ng-switch="attribute.nodeName" class="btn-set pull-left">\n                                              <button class="btn red-haze "  ng-click="end()">\n                                                <span  class="fa fa-times" > Close</span>\n                                              </button>\n                                              <!-- <button class="btn red-haze "  ng-click="end()">\n                                                <span ng-if="attribute.nodeName ==\'end\'" ng-repeat=\'attribute in currentQuestion.value.attributes\' class="fa fa-times" > Finish</span>\n                                              </button> -->\n                                              <button class="btn blue-haze"  ng-show="count" ng-click="back()"><span class="glyphicon glyphicon-chevron-left"></span>Back</button>\n                                            </div>\n                                            <div class="btn-set pull-right">\n                                              <button  ng-show=" currentQuestion.button" class="btn blue-hoki"   ng-click="next(currentQuestion.button.target, currentQuestion.button.value)">Next<span class="glyphicon glyphicon-chevron-right" ></span></button>\n                                              <button ng-repeat=\'edge in currentQuestion.edges track by $index\' ng-show="(edge.source.id == currentQuestion.id) && !edge.value" class="btn blue-hoki"   ng-click="next(edge.target)">Next<span class="glyphicon glyphicon-chevron-right" ></span></button>\n                                            </div>\n                                          </div>\n                                      </form>\n                                  </div>\n                                </div>\n                            </div>\n                        </div>\n                 </div>\n        </div>\n  </div>\n  <!-- END PORTLET BODY -->\n</div>\n'),a.put("app/main/template/template.notification.html",'<div class="ui-notification alert alert-block" ng-class="class" style="width: 350px; margin-top: 50px;">\n  <h4 ng-show="title" class="alert-heading"><i class="{{icon}}"></i> {{title}}</h4>\n  <hr>\n  <p ng-bind-html="message"></p>\n  <br>\n  <p>\n    <a class="btn btn-success close-notification" href="#" ng-click="nAccept()"><i class="glyphicon glyphicon-ok"></i> {{acceptBtn}} </a>\n    <a class="btn btn-danger close-notification" href="#" ng-click="nReject()"><i class="glyphicon glyphicon-remove"></i> {{rejectBtn}} </a>\n  </p>\n</div>\n'),a.put("app/main/template/template.reportBuilderView.html",'<div class="alert alert-warning alert-group">\n        <div class="form-inline" data-ng-class="{\'has-error\': forms.report.$submitted && !group.rules.length}">\n            <select ng-options="o.name as o.name for o in operators" ng-model="group.operator" class="form-control input-sm"></select>\n            <button style="margin-left: 5px" type="button" ng-click="addCondition()" class="btn btn-sm btn-success"><span class="glyphicon glyphicon-plus-sign"></span> {{\'APPLICATION_ADD_CONDITION\' | translate}}</button>\n            <button style="margin-left: 5px" type="button" ng-click="addGroup()" class="btn btn-sm btn-success"><span class="glyphicon glyphicon-plus-sign"></span> {{\'APPLICATION_ADD_GROUP\' | translate}}</button>\n            <button style="margin-left: 5px" type="button" ng-click="removeGroup()" class="btn btn-sm btn-danger"><span class="glyphicon glyphicon-minus-sign"></span> {{\'APPLICATION_REMOVE_GROUP\' | translate}}</button>\n        </div>\n        <div class="group-conditions">\n            <div ng-repeat="rule in group.rules | orderBy:\'index\'" class="condition">\n                <div ng-switch="rule.hasOwnProperty(\'group\')">\n                    <div ng-switch-when="true">\n                        <report-builder group="rule.group" fields="fields" forms="forms"></report-builder>\n                    </div>\n                    <div ng-switch-default="ng-switch-default">\n                        <div class="row">\n                          <div class="col-md-2" data-ng-class="{\'has-error\': forms.report.$submitted && !rule.field}">\n                          <ui-select data-ng-model="rule.field" theme="bootstrap" dynamic-name="randomName()" required>\n                            <ui-select-match placeholder="" ><span ng-bind-html="$select.selected.name"></span></ui-select-match>\n                            <ui-select-choices repeat="field.value as field in fields | filter: $select.search">\n                              <div ng-bind-html="field.name | highlight: $select.search"></div>\n                            </ui-select-choices>\n                          </ui-select>\n                          <span data-ng-show="forms.report.$submitted && !rule.field" class="help-block help-block-error">\n                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                          </span>\n                        </div>\n                        <div class="col-md-1">\n                          <ui-select data-ng-model="rule.condition" theme="bootstrap" dynamic-name="randomName()" data-ng-change="inputIsRequired(rule)" data-ng-init="inputIsRequired(rule)">\n                            <ui-select-match placeholder="">{{$select.selected.name}}</ui-select-match>\n                            <ui-select-choices repeat="condition.name as condition in conditions | filter: $select.search">\n                              <div ng-bind-html="condition.name | highlight: $select.search"></div>\n                            </ui-select-choices>\n                          </ui-select>\n                        </div>\n                          <div class="col-md-2" data-ng-class="{\'has-error\': forms.report.$submitted && !rule.value}" data-ng-if="rule.required">\n                            <input type="text" ng-model="rule.value" class="form-control" dynamic-name="randomName()" data-ng-required="requiredInput"/>\n                            <span data-ng-show="forms.report.$submitted && !rule.value" class="help-block help-block-error">\n															<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n														</span>\n                          </div>\n                            <button style="margin-left: 5px" ng-click="removeCondition($index)" class="btn btn-sm btn-danger" type="button"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n'),a.put("app/main/template/template.tigerDialDisposal.html",'<div class="row margin-top-20 contact-tab-container">\n  <div class="portlet light bordered">\n    <div class="row portfolio-block" data-ng-if="workspace.spooler.destcalleridnum && workspace.spooler.queue && workspace.spooler.agentconnectAt">\n      <div class="col-md-2">\n        <div class="portfolio-text">\n          <img src="assets/images/media/outboundroute.png" class="td-disposal-logo" alt=""/>\n        </div>\n      </div>\n      <div class="col-md-3 portfolio-stat">\n        <div>{{\'APPLICATION_CALLED_NUMBER\' | translate}} </div>\n        <p>  {{workspace.spooler.destcalleridnum}} </p>\n      </div>\n      <div class="col-md-3 portfolio-stat">\n        <div>{{\'APPLICATION_QUEUE\' | translate}} </div>\n        <p>  {{workspace.spooler.queue}} </p>\n      </div>\n      <div class="col-md-3 portfolio-stat">\n        <div>{{\'APPLICATION_DATE\' | translate}} </div>\n        <p>  {{workspace.spooler.agentconnectAt | date:\'dd/MM/yyyy HH:mm:ss\'}} </p>\n      </div>\n</div>\n    <div class="portlet-title">\n      <div class="caption font-blue-hoki">\n        <span class="caption-subject">{{ workspace.spooler.calleridname }} {{ \'APPLICATION_MOTION_DIALER\' | translate }} {{ \'APPLICATION_DISPOSITION\' | translate }} </span>\n      </div>\n    </div>\n    <div class="portlet-body">\n      <div class="padding-bottom row">\n        <div class="col-md-12" data-ng-form="tdForm">\n          <!-- START RETRIEVE -->\n          <div class="form-group" data-ng-class="{\'has-error\': (tdForm.retrieve.$touched || tdForm.$submitted) && tdForm.retrieve.$invalid}">\n            <label class="control-label">{{ \'APPLICATION_STATUS\' | translate }}<span class="required" aria-required="true">*</span></label>\n            <select name="retrieve" class="form-control" data-ng-model="entitySpooler.retrieve" required>\n              <option value="CLOSED">CLOSE</option>\n              <option value="OPEN">OPEN</option>\n              <option value="BLACK_LIST">BLACKLIST</option>\n              <option value="PLANNED">PLANNING</option>\n              <option value="PLANNED_PEER">PLANNING AGENT</option>\n            </select>\n            <span data-ng-show="(tdForm.retrieve.$touched || tdForm.$submitted) && tdForm.retrieve.$error.required" class="help-block help-block-error">\n              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n            </span>\n          </div>\n          <!-- END RETRIEVE -->\n          <!-- START PLANNING DATE -->\n          <div class="form-group" data-ng-if="entitySpooler.retrieve == \'PLANNED\' || entitySpooler.retrieve == \'PLANNED_PEER\'" data-ng-class="{\'has-error\': (tdForm.date.$touched || tdForm.$submitted) && tdForm.date.$invalid}">\n            <label class="control-label">PLANNING DATE<span class="required" aria-required="true">*</span></label>\n            <uib-datepicker name="date" ng-model="entitySpooler.planningtime" required="entitySpooler.retrieve == \'PLANNED\' || entitySpooler.retrieve == \'PLANNED_PEER\'" data-ng-init="entitySpooler.planningtime = moment();"></uib-datepicker>\n            <span data-ng-show="(tdForm.date.$touched || tdForm.$submitted) && tdForm.date.$error.required" class="help-block help-block-error">\n              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n            </span>\n          </div>\n          <!-- END PLANNING DATE -->\n          <!-- START PLANNING TIME -->\n          <div class="form-group" data-ng-if="entitySpooler.retrieve == \'PLANNED\' || entitySpooler.retrieve == \'PLANNED_PEER\'" data-ng-class="{\'has-error\': (tdForm.time.$touched || tdForm.$submitted) && tdForm.time.$invalid}">\n            <label class="control-label">PLANNING TIME<span class="required" aria-required="true">*</span></label>\n            <uib-timepicker name="time" ng-model="entitySpooler.planningtime" required="entitySpooler.retrieve == \'PLANNED\' || entitySpooler.retrieve == \'PLANNED_PEER\'" show-meridian="false" show-seconds="false"></uib-timepicker>\n            <span data-ng-show="(tdForm.time.$touched || tdForm.$submitted) && tdForm.time.$error.required" class="help-block help-block-error">\n              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n            </span>\n          </div>\n          <!-- END PLANNING TIME -->\n          <!-- START PLANNING PEER -->\n          <div class="form-group" data-ng-if="entitySpooler.retrieve == \'PLANNED_PEER\'" data-ng-class="{\'has-error\': (tdForm.agent.$touched || tdForm.$submitted) && tdForm.agent.$invalid}">\n            <label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n            <select name="agent" class="form-control" data-ng-model="entitySpooler.planningpeer" ng-options="agent for agent in agents" required="entitySpooler.retrieve == \'PLANNED_PEER\'">\n            </select>\n            <span data-ng-show="(tdForm.agent.$touched || tdForm.$submitted) && tdForm.agent.$error.required" class="help-block help-block-error">\n              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n            </span>\n          </div>\n          <!-- END PLANNING PEER -->\n          <button type="button" class="btn btn-circle green-haze btn-sm" data-ng-disabled="!tdForm.$valid" data-ng-click="save()">{{\'APPLICATION_SAVE\' | translate}}</button>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n'),a.put("app/market/market.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-handbag"></i>\n						<a href="/market">Market Place</a>\n          </li>\n        </ul>\n			</div>\n		</div>\n</div>\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n  <div class="col-md-12">\n    <!-- Our Integration -->\n    <div class="headline">\n      <h3>Our Integrations</h3>\n    </div>\n    <div class="row thumbnails" data-ng-repeat="group in groupedIntegration">\n      <div class="col-md-3" data-ng-repeat="integration in group">\n        <div class="our-integrations">\n          <h3> {{integration.name}} <small> {{integration.author}}</small></h3>\n          <img data-ng-src="{{integration.logo}}" alt="{{integration.name}}" class="img-responsive"/>\n          <div class="integration-info" data-ng-if="!integration.downloading">\n            <p>\n              {{integration.description}}\n            </p>\n            <div class="pull-right">\n	            <a data-ng-disabled="isProgressing" data-ng-if="!integration.active" data-ng-click="installIntegration(integration)" href="#" class="btn btn-xs green-meadow">Install <i class="fa fa-download"></i></a>\n							<a data-ng-disabled="isProgressing" data-ng-if="integration.active" data-ng-click="uninstallIntegration(integration)" href="#" class="btn btn-xs red-sunglo">Uninstall <i class="fa fa-trash"></i></a>\n	            <a href="{{integration.link}}" class="btn btn-xs grey-cascade" target="_blank">More <i class="fa fa-link"></i></a>\n            </div>\n          </div>\n					<div class="integration-info" data-ng-if="integration.downloading">\n						<div>\n							<uib-progressbar class="progress-striped active" value="percentage" type="success"><i style="color:black;">{{status}}</i></uib-progressbar>\n						</div>\n          </div>\n        </div>\n      </div>\n		</div>\n    <!--/thumbnails-->\n    <!-- //End Meer Our Team -->\n  </div>\n</div>\n'),a.put("app/motiondialer/blacklist/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CONTACT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START PHONE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.phone.$touched || form.$submitted) && form.phone.$invalid}">\n      <label class="control-label">{{\'APPLICATION_PHONE\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="phone" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="item.phone" required/>\n      <span data-ng-show="(form.phone.$touched || form.$submitted) && form.phone.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END PHONE -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/motiondialer/blacklist/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-control-forward"></i>\n					<a href="#">Motion Dialer</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n        <li>\n          <i class="icon-doc"></i>\n          <a href="#">{{ \'APPLICATION_BLACKLIST\' | translate }}</a>\n        </li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-doc font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_BLACKLIST\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONTACT\' | translate }}\n						</button>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/motiondialer/info/view/view.about.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_ABOUT\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n        <form class="form-horizontal form-row-seperated">\n          <div class="form-body">\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Specification</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="{{properties.SpecificationTitle}} ({{properties.SpecificationVersion}}) - {{properties.SpecificationVendor}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Implementation</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="{{properties.ImplementationTitle}} ({{properties.ImplementationVersion}}) - {{properties.ImplementationVendor}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Start Time</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" data-ng-model="properties.StartTime" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Uptime</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" data-ng-model="properties.Uptime" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Operating System</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="{{properties.OsName}} {{properties.OsVersion}} {{properties.OsArch}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Processors</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" data-ng-model="properties.Processors" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">System Start Time</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" data-ng-model="properties.SystemStartTime" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">System Uptime</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" data-ng-model="properties.SystemUptime" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">File System</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="Usable: {{properties.FileSystem.Usable | number:2}} Free: {{properties.FileSystem.Free | number:2}} Total: {{properties.FileSystem.Total | number:2}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n          </div>\n        </form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/motiondialer/info/view/view.details.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_DETAILS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n        <form class="form-horizontal form-row-seperated">\n          <div class="form-body">\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Java Specification Name</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" data-ng-model="properties.JavaSpecificationName" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Java Home</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" data-ng-model="properties.JavaHome" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">JavaVm</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="{{properties.JavaVmName}} ({{properties.JavaVmVersion}} {{properties.JavaVmInfo}}) - {{properties.JavaVmVendor}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Java</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="Java ({{properties.JavaVersion}} {{properties.JavaClassVersion}}) - {{properties.JavaVendor}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Java Runtime</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="{{properties.JavaRuntimeName}} ({{JavaRuntimeVersion}})" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Java Rmi Server Hostname</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="{{properties.JavaRmiServerHostname}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">User</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="{{properties.UserName}} {{properties.UserLanguage}}-{{properties.UserCountry}} {{properties.UserTimezone}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">User Home</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="{{properties.UserHome}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Hostname</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="{{properties.Hostname}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n          </div>\n        </form>\n			</div>\n		</div>\n	</div>\n</div>\n'),
-a.put("app/motiondialer/info/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getProperties()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-control-forward"></i>\n					<a href="#">Motion Dialer</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-info"></i>\n					<a href="/motiondialer/info/view/properties">{{ \'APPLICATION_INFO\' | translate }}</a>\n					<i data-ng-show="variable" class="fa fa-angle-right"></i>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/template.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ \'APPLICATION_INFO\' | translate }}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.motiondialer.info.view.about\')}">\n							<a data-ng-href="/motiondialer/info/view/about">\n							<i class="icon-globe"></i>\n							{{ \'APPLICATION_ABOUT\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.motiondialer.info.view.details\')}">\n							<a data-ng-href="/motiondialer/info/view/details">\n							<i class="icon-support"></i>\n							{{ \'APPLICATION_DETAILS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/motiondialer/list/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_LIST\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/motiondialer/list/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-control-forward"></i>\n					<a href="#">Motion Dialer</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n        <li>\n          <i class="icon-docs"></i>\n          <a href="#">{{ \'APPLICATION_LISTS\' | translate }}</a>\n        </li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_LISTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_LIST\' | translate }}\n						</button>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="spinner-grid" spinner-start-active="true"></span>\n				<!-- END UI-GRID SPINNER -->\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/motiondialer/list/view/view.contact.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CONTACT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START PHONES -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.phones.$touched || form.$submitted) && form.phones.$invalid}">\n      <label class="control-label">{{\'APPLICATION_PHONES\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="phones" placeholder="{{\'APPLICATION_PHONES\' | translate}}" class="form-control" data-ng-model="item.phones" required/>\n      <span data-ng-show="(form.phones.$touched || form.$submitted) && form.phones.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span class="help-block">\n        <p>Insert one or multiple phones separated by commas, for example:</p>\n        <p>0123455678, 3456785673, 2345667899</p>\n      </span>\n    </div>\n    <!-- END PHONES -->\n\n    <!-- START TIMEZONE -->\n    <div class="form-group">\n      <label class="control-label">Timezone</label><br>\n      <select ng-model="item.timezone">\n        <option value="">--</option>\n        <optgroup ng-repeat="timezone in timezones" label="{{timezone.group}}">\n          <option ng-repeat="zone in timezone.zones" value="{{zone.value}}">{{zone.name}}</option>\n        </optgroup>\n      </select>\n    </div>\n    <!-- END TIMEZONE -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/motiondialer/list/view/view.contact.import.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CONTACT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START PHONES -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.phones.$touched || form.$submitted) && form.phones.$invalid}">\n      <label class="control-label">{{\'APPLICATION_PHONE\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select multiple data-ng-model="item.phones" theme="bootstrap" name="phones" data-ng-disabled="disabled" required>\n        <ui-select-match placeholder="{{ \'APPLICATION_PHONE\' | translate }}">{{$select.selected[$index]}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.phones.$touched || form.$submitted) && form.phones.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END PHONES -->\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}</label>\n      <ui-select data-ng-model="item.name" theme="bootstrap" name="name" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_NAME\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START ACCOUNT_CODE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.account.$touched || form.$submitted) && form.account.$invalid}">\n      <label class="control-label">{{\'APPLICATION_ACCOUNT_CODE\' | translate}}</label>\n      <ui-select data-ng-model="item.account" theme="bootstrap" account="account" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_ACCOUNT_CODE\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n    </div>\n    <!-- END ACCOUNT_CODE -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <ui-select data-ng-model="item.description" theme="bootstrap" name="description" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_DESCRIPTION\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n    </div>\n    <!-- END DESCRIPTION -->\n\n    <!-- START TIMEZONE -->\n    <!-- <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_TIMEZONE\' | translate}}</label><br>\n      <select ng-model="item.timezone">\n        <option value="">--</option>\n        <optgroup ng-repeat="timezone in timezones" label="{{timezone.group}}">\n          <option ng-repeat="zone in timezone.zones" value="{{zone.value}}">{{zone.name}}</option>\n        </optgroup>\n      </select>\n    </div> -->\n    <!-- END TIMEZONE -->\n\n    <!-- START TIMEZONE -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_TIMEZONE\' | translate}}</label>\n      <ui-select data-ng-model="item.timezone" theme="bootstrap" name="description" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_TIMEZONE\' | translate }}">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="timezone.value as timezone in uiTimeZones | filter: $select.search" group-by="\'group\'">\n          <div ng-bind-html="timezone.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n    </div>\n    <!-- END TIMEZONE -->\n\n    <!-- START VARIABLES -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.variables.$touched || form.$submitted) && form.variables.$invalid}">\n      <label class="control-label">{{\'APPLICATION_VARIABLES\' | translate}}</label>\n      <ui-select multiple data-ng-model="item.variables" theme="bootstrap" name="variables" data-ng-disabled="disabled">\n        <ui-select-match placeholder="{{ \'APPLICATION_VARIABLES\' | translate }}">{{$select.selected[$index]}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.variables.$touched || form.$submitted) && form.variables.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END VARIABLES -->\n\n  </form>\n  <!-- START PROGRESS -->\n  <div>\n    <p>{{\'APPLICATION_IMPORT_SUCCEEDED\' | translate}}: {{import.succeeded}}/{{csvLength}}</p>\n    <div class="progress progress-sm" style="">\n      <div class="progress-bar progress-bar-info" role="progressbar" ng-style="{ \'width\': import.success + \'%\' }"></div>\n    </div>\n  </div>\n  <div>\n    <p>{{\'APPLICATION_IMPORT_FAILED\' | translate}}: {{import.failed}}/{{csvLength}}</p>\n    <div class="progress progress-sm" style="">\n      <div class="progress-bar progress-bar-danger" role="progressbar" ng-style="{ \'width\': import.fail + \'%\' }"></div>\n    </div>\n    <div class="has-error" data-ng-if="noPhone.length">\n      <span class="help-block help-block-error">\n        {{\'APPLICATION_CONTACTS_WITHOUT_PHONE\' | translate}}: {{noPhone}}\n      </span>\n    </div>\n  </div>\n  <!-- END PROGRESS -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="start()" ng-disabled="form.$invalid || !form.phones || submitted">{{ \'APPLICATION_SUBMIT\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="close()" data-ng-if="!importing">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="stop()" data-ng-if="importing">{{ \'APPLICATION_STOP\' | translate }}</button>\n</div>\n'),a.put("app/motiondialer/list/view/view.contacts.html",'<div class="row" data-ng-init="getContacts()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_LIST\' | translate}} {{ \'APPLICATION_CONTACTS\' | translate}} </span>\n				</div>\n			</div>\n\n			<div class="portlet-body">\n				<div class="btn-group">\n					<button class="btn green-jungle margin-bottom-10" ng-click="createContact()">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONTACT\' | translate }}\n					</button>\n					<span class="btn default btn-file">\n						<span class="fileinput-new"><i class="icon-cloud-upload"></i> {{\'APPLICATION_IMPORT_FROM_CSV\' | translate}}</span>\n						<input type="file" nv-file-select="" uploader="uploader"/>\n					</span>\n				</div>\n\n				<!-- <div class="btn-group">\n					<button class="btn green-jungle" data-ng-click="newContact();">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONTACT\' | translate }}\n					</button>\n\n				</div> -->\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="spinner-grid" spinner-start-active="true"></span>\n				<!-- END UI-GRID SPINNER -->\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/motiondialer/list/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getList()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-control-forward"></i>\n					<a href="#">Motion Dialer</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-doc"></i>\n					<a href="/motiondialer/lists/list">{{ \'APPLICATION_LISTS\' | translate }}</a>\n					<i data-ng-show="list.name" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="list.name">\n					<a href="#">{{list.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/template.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{list.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.motiondialer.lists.view.settings\')}">\n							<a data-ng-href="/motiondialer/lists/view/{{list.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.motiondialer.lists.view.contacts\')}">\n							<a data-ng-href="/motiondialer/lists/view/{{list.id}}/contacts">\n							<i class="icon-people"></i>\n							{{ \'APPLICATION_CONTACTS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/motiondialer/list/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_LIST\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_general" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- START GENERAL TAB -->\n					<div class="tab-pane active" id="tab_general">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateList()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="list.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="list.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/motiondialer/process/list/list.create.queue.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PROCESS\' | translate }} {{\'APPLICATION_QUEUE\' | translate}}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" ng-init="initModal()" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n    <!-- START LIST -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.list.$touched || form.$submitted) && form.list.$invalid}">\n      <label class="control-label">{{\'APPLICATION_LIST\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <select name="list" class="form-control" data-ng-model="item.list" ng-options="list.name for list in lists" required>\n      </select>\n      <span data-ng-show="(form.list.$touched || form.$submitted) && form.list.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END LIST -->\n    <!-- START QUEUE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.queue.$touched || form.$submitted) && form.queue.$invalid}">\n      <label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <select name="queue" class="form-control" data-ng-model="item.queue" ng-options="queue.name for queue in queues" required>\n      </select>\n      <span data-ng-show="(form.queue.$touched || form.$submitted) && form.queue.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END QUEUE -->\n    <!-- START TIMEOUT QUEUE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.timeout.$touched || form.$submitted) && form.timeout.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="number" min="1" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="item.timeout" required/>\n      <span data-ng-show="(form.timeout.$touched || form.$submitted) && form.timeout.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="form.timeout.$error.max || form.timeout.$error.min" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n      </span>\n    </div>\n    <!-- END MAX RETRIES -->\n    <!-- START TRUNK -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.device.$touched || form.$submitted) && form.device.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TRUNK\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <select name="device" class="form-control" data-ng-model="item.device" ng-options="trunk.name for trunk in trunks" required>\n        <option value="fake">{{\'APPLICATION_SELECT\' | translate}} {{\'APPLICATION_TRUNK\' | translate}}</option>\n      </select>\n      <span data-ng-show="(form.queue.$touched || form.$submitted) && form.queue.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TRUNK -->\n    <!-- START FETCH SORT -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_FETCH_SORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <select name="fetch_sort" class="form-control" data-ng-model="item.fetch_sort" ng-options="fetch_sort for fetch_sort in [\'ASC\', \'DESC\']" required>\n      </select>\n      <span class="help-block">{{\'DESCRIPTION_TD_FETCH_SORT\' | translate}}</span>\n    </div>\n    <!-- END  FETCH SORT-->\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/motiondialer/process/list/list.create.square.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PROCESS\' | translate }} {{\'APPLICATION_CALLYSQUARE\' | translate}}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" ng-init="initModal()" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n    <!-- START LIST -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.list.$touched || form.$submitted) && form.list.$invalid}">\n      <label class="control-label">{{\'APPLICATION_LIST\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <select name="list" class="form-control" data-ng-model="item.list" ng-options="list.name for list in lists" required>\n      </select>\n      <span data-ng-show="(form.list.$touched || form.$submitted) && form.list.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END LIST -->\n    <!-- START PROJECT -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.project.$touched || form.$submitted) && form.project.$invalid}">\n      <label class="control-label">{{\'APPLICATION_PROJECT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <select name="project" class="form-control" data-ng-model="item.project" ng-options="project.name for project in projects" required>\n      </select>\n      <span data-ng-show="(form.project.$touched || form.$submitted) && form.project.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END PROJECT -->\n    <!-- START TRUNK -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.device.$touched || form.$submitted) && form.device.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TRUNK\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <select name="device" class="form-control" data-ng-model="item.device" ng-options="trunk.name for trunk in trunks" required>\n        <option value="fake">{{\'APPLICATION_SELECT\' | translate}} {{\'APPLICATION_TRUNK\' | translate}}</option>\n      </select>\n      <span data-ng-show="(form.device.$touched || form.$submitted) && form.device.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TRUNK -->\n    <!-- START FETCH SORT -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_FETCH_SORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <select name="fetch_sort" class="form-control" data-ng-model="item.fetch_sort" ng-options="fetch_sort for fetch_sort in [\'ASC\', \'DESC\']" required>\n      </select>\n      <span class="help-block">{{\'DESCRIPTION_TD_FETCH_SORT\' | translate}}</span>\n    </div>\n    <!-- END  FETCH SORT-->\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),
-a.put("app/motiondialer/process/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-control-forward"></i>\n					<a href="#">Motion Dialer</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n        <li>\n          <i class="icon-settings"></i>\n          <a href="#">{{ \'APPLICATION_PROCESSES\' | translate }}</a>\n        </li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_PROCESSES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group">\n						<button class="btn green-jungle dropdown-toggle" data-toggle="dropdown" data-close-others="true">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_PROCESS\' | translate }}\n						</button>\n						<ul class="dropdown-menu pull-right">\n							<li>\n								<a href="#" ng-click="createProcessQueue()">{{ \'APPLICATION_QUEUE\' | translate }}</a>\n							</li>\n							<li>\n								<a href="#" ng-click="createProcessSquare()">{{ \'APPLICATION_CALLYSQUARE\' | translate | trusted}}</a>\n							</li>\n						</ul>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="spinner-grid" spinner-start-active="true"></span>\n				<!-- END UI-GRID SPINNER -->\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/motiondialer/process/view/view.create.interval.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_INTERVAL\' | translate }} </h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n    <!-- START TIME -->\n    <div class="form-group">\n      <label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n      <div class="input-group input-large">\n        <fieldset class="pull-left" ng-disabled="splittedInterval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="splittedInterval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n        <div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n        <fieldset ng-disabled="splittedInterval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="splittedInterval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n        <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="splittedInterval.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label>\n      </div>\n    </div>\n    <!-- END TIME -->\n\n    <!-- START WEEKDAY -->\n    <div class="form-group">\n      <label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n      <div class="input-group input-large">\n        <ui-select data-ng-model="splittedInterval.wd_from" theme="bootstrap" name="wd_from">\n          <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n          <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n            {{weekDay.name | translate}}\n          </ui-select-choices>\n        </ui-select>\n        <span class="input-group-addon">to</span>\n        <ui-select data-ng-model="splittedInterval.wd_to" theme="bootstrap" name="wd_to">\n          <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n          <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n            {{weekDay.name | translate}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n    </div>\n    <!-- END WEEKDAY -->\n\n    <!-- START MONTHDAY -->\n    <div class="form-group">\n      <label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n      <div class="input-group input-large">\n        <ui-select data-ng-model="splittedInterval.md_from" theme="bootstrap" name="md_from">\n          <ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n          <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n            {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n          </ui-select-choices>\n        </ui-select>\n        <span class="input-group-addon">to</span>\n        <ui-select data-ng-model="splittedInterval.md_to" theme="bootstrap" name="md_to">\n          <ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n          <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n            {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n    </div>\n    <!-- END MONTHDAY -->\n\n    <!-- START MONTH -->\n    <div class="form-group">\n      <label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n      <div class="input-group input-large">\n        <ui-select data-ng-model="splittedInterval.m_from" theme="bootstrap" name="m_from">\n          <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n          <ui-select-choices repeat="month.value as month in $interval.monthsNumber | filter: $select.search">\n            {{month.name | translate}}\n          </ui-select-choices>\n        </ui-select>\n        <span class="input-group-addon">to</span>\n        <ui-select data-ng-model="splittedInterval.m_to" theme="bootstrap" name="m_to">\n          <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n          <ui-select-choices repeat="month.value as month in $interval.monthsNumber | filter: $select.search">\n            {{month.name | translate}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n    </div>\n    <!-- END MONTH -->\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/motiondialer/process/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getProcess()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-control-forward"></i>\n					<a href="#">Motion Dialer</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-settings"></i>\n					<a href="/motiondialer/processes/list">{{ \'APPLICATION_PROCESSES\' | translate }}</a>\n					<i data-ng-show="process.name" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="process.name">\n					<a href="#">{{process.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/account.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{process.name}} ({{ (process.status === \'RUN\') ? \'RUNNING...\' : \'STOPPED\' }})\n					</div>\n					<div class="profile-usertitle-job">\n						<a href="/motiondialer/lists/view/{{process.id_list}}/settings">{{ \'APPLICATION_LIST\' | translate}} #{{process.id_list}} ({{process.fetch_sort}})</a>\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n        <div class="profile-userbuttons">\n					<button data-ng-show="process.status" type="button" class="btn btn-circle btn-sm" data-ng-class="{\'green-meadow\': process.status == \'STOP\', \'red-sunglo\': process.status == \'RUN\'}" data-ng-click="runOrStop()">{{ (process.status === \'RUN\') ? \'STOP\' : \'RUN\' }}</button>\n        </div>\n				<div class="profile-userbuttons">\n					<button style="cursor:default" data-ng-show="process.runtime" type="button" class="btn btn-circle btn-sm" data-ng-class="{\'green-meadow\': process.runtime.completed, \'yellow-crusta\': !process.runtime.completed}">{{process.runtime.completed ? \'Complete\' : \'Incomplete\'}}</button>\n					<button style="cursor:default" class="btn btn-circle btn-sm" data-ng-class="{\'green-meadow\': !process.runtime.outOfTime, \'red-sunglo\': process.runtime.outOfTime}"><i data-ng-class="{\'icon-clock\': !process.runtime.outOfTime, \'icon-close\': process.runtime.outOfTime}"></i> {{process.runtime.outOfTime ? \'Out of time\' : \'On time\'}}</button>\n				</div>\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n            <li data-ng-class="{active: $state.is(\'main.motiondialer.processes.view.overview\')}">\n							<a data-ng-href="/motiondialer/processes/view/{{process.id}}/overview">\n							<i class="icon-home"></i>\n							{{ \'APPLICATION_OVERVIEW\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.motiondialer.processes.view.settings\')}">\n							<a data-ng-href="/motiondialer/processes/view/{{process.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.motiondialer.processes.view.intervals\')}">\n							<a data-ng-href="/motiondialer/processes/view/{{process.id}}/intervals">\n							<i class="icon-clock"></i>\n							{{ \'APPLICATION_INTERVALS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.motiondialer.processes.view.spooler\')}">\n							<a data-ng-href="/motiondialer/processes/view/{{process.id}}/spooler">\n							<i class="icon-options-vertical"></i>\n							{{ \'APPLICATION_SPOOLER\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/motiondialer/process/view/view.intervals.html",'<div class="row" data-ng-init="initIntervals()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-clock  theme-font"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROCESS\' | translate}} {{ \'APPLICATION_INTERVALS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_allow" data-toggle="tab">{{ \'APPLICATION_ALLOW\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_disallow" data-toggle="tab">{{ \'APPLICATION_DISALLOW\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- ALLOW TAB -->\n					<div class="tab-pane active" id="tab_allow">\n						<button class="btn green-jungle margin-bottom-10" ng-click="createInterval(true)">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_INTERVAL\' | translate }} ({{ \'APPLICATION_ALLOW\' | translate }})\n						</button>\n						<table class="table table-bordered table-hover">\n							<thead>\n							<tr role="row" class="heading">\n								<th>\n									 {{ \'APPLICATION_VALUE\' | translate}}\n								</th>\n								<th>\n									 {{ \'APPLICATION_ACTIONS\' | translate}}\n								</th>\n							</tr>\n							</thead>\n							<tbody>\n							<tr ng-repeat="interval in process.intervals track by $index">\n								<td>\n									{{interval}}\n								</td>\n								<td>\n									<button href="javascript:;" data-ng-click="editInterval(true, interval)" class="btn blue-hoki btn-sm"> {{ \'APPLICATION_EDIT\' | translate}} </button>\n									<button data-ng-click="deleteInterval(interval, $index, true)" class="btn red-sunglo btn-sm"> {{ \'APPLICATION_DELETE\' | translate}} </button>\n								</td>\n							</tr>\n							<tr ng-show="!process.intervals.length"><td colspan=2>{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</td></tr>\n							</tbody>\n						</table>\n					</div>\n					<!-- END ALLOW TAB -->\n					<!-- DISALLOW TAB -->\n					<div class="tab-pane" id="tab_disallow">\n						<button class="btn green-jungle margin-bottom-10" ng-click="createInterval(false)">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_INTERVAL\' | translate }} ({{ \'APPLICATION_DISALLOW\' | translate }})\n						</button>\n						<table class="table table-bordered table-hover">\n							<thead>\n							<tr role="row" class="heading">\n								<th>\n									 {{ \'APPLICATION_VALUE\' | translate}}\n								</th>\n								<th>\n									 {{ \'APPLICATION_ACTIONS\' | translate}}\n								</th>\n							</tr>\n							</thead>\n							<tbody>\n							<tr ng-repeat="interval in process.not_intervals track by $index">\n								<td>\n									{{interval}}\n								</td>\n								<td>\n									<button href="javascript:;" data-ng-click="editInterval(false, interval)" class="btn blue-hoki btn-sm"> {{ \'APPLICATION_EDIT\' | translate}} </button>\n									<button href="javascript:;" data-ng-click="deleteInterval($index, interval, false)" class="btn red-sunglo btn-sm"> {{ \'APPLICATION_DELETE\' | translate}} </button>\n								</td>\n							</tr>\n							<tr ng-show="!process.not_intervals.length"><td colspan=2>{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</td></tr>\n							</tbody>\n						</table>\n\n					</div>\n					<!-- END DISALLOW TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/motiondialer/process/view/view.overview.html",'<div class="row" data-ng-init="getSummary()">\n  <div class="col-md-12">\n    <!-- BEGIN PORTLET -->\n    <div class="portlet light">\n      <div class="portlet-title tabbable-line">\n        <div class="caption caption-md">\n          <i class="icon-bar-chart theme-font hide"></i>\n          <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_OVERVIEW\' | translate}}</span>\n        </div>\n        <ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_summary" data-toggle="tab">{{ \'APPLICATION_SUMMARY\' | translate}}</a>\n					</li>\n          <li ng-show="process.runtime">\n						<a href="#" data-target="#tab_advanced" data-toggle="tab">{{ \'APPLICATION_ADVANCED\' | translate}}</a>\n					</li>\n				</ul>\n      </div>\n      <div class="portlet-body">\n        <div class="tab-content">\n					<!-- START SUMMARY TAB -->\n					<div class="tab-pane active" id="tab_summary">\n            <!-- BEGIN UI-GRID SPINNER -->\n    				<span us-spinner spinner-key="spinner-grid" spinner-start-active="true"></span>\n    				<!-- END UI-GRID SPINNER -->\n            <div class="row number-stats margin-bottom-30">\n              <div class="col-md-6 col-sm-6 col-xs-6">\n                <div class="stat-left">\n                  <div class="stat-number">\n                    <div class="title">\n                       {{\'APPLICATION_TOTAL\' | translate}}\n                    </div>\n                    <div class="number">\n                       {{total}}\n                    </div>\n                  </div>\n                </div>\n              </div>\n              <div class="col-md-6 col-sm-6 col-xs-6">\n                <div class="stat-right">\n                  <div class="stat-number">\n                    <div class="title">\n                       {{\'APPLICATION_FRESH\' | translate}}\n                    </div>\n                    <div class="number">\n                       {{process.runtime.fresh || 0}}\n                    </div>\n                  </div>\n                </div>\n              </div>\n            </div>\n            <div class="table-scrollable table-scrollable-borderless">\n              <table class="table table-hover table-light">\n              <thead>\n              <tr class="uppercase">\n                <th>\n                   {{\'APPLICATION_STATUS\' | translate}}\n                </th>\n                <th>\n                   {{\'APPLICATION_VALUE\' | translate}}\n                </th>\n                <th>\n                   {{\'APPLICATION_RATE\' | translate}}\n                </th>\n                <th>\n                   {{\'APPLICATION_DESCRIPTION\' | translate}}\n                </th>\n              </tr>\n              </thead>\n              <tr ng-repeat="sum in summary">\n                <td>\n                  <a href="#" class="primary-link">{{\'APPLICATION_TD_\' + sum[0] | translate}}</a>\n                </td>\n                <td>\n                   {{sum[1]}}\n                </td>\n                <td>\n                  <span class="bold theme-font">{{ total ? ((sum[1]/total)*100).toFixed(2) : 0 }}%</span>\n                </td>\n                <td>\n                   {{\'DESCRIPTION_TD_\' + sum[0] | translate}}\n                </td>\n              </tr>\n              </table>\n            </div>\n          </div>\n          <!-- END SUMMARY TAB -->\n          <!-- START SUMMARY TAB -->\n					<div class="tab-pane" id="tab_advanced" ng-show="process.runtime">\n            <div class="row number-stats margin-bottom-30">\n              <div class="col-md-6 col-sm-6 col-xs-6">\n                <div class="stat-left">\n                  <div class="stat-number">\n                    <div class="title">\n                       {{\'APPLICATION_SUCCESS\' | translate}}\n                    </div>\n                    <div class="number">\n                       {{process.runtime.success || 0}}\n                    </div>\n                  </div>\n                </div>\n              </div>\n              <div class="col-md-6 col-sm-6 col-xs-6">\n                <div class="stat-right">\n                  <div class="stat-number">\n                    <div class="title">\n                       {{\'APPLICATION_FAILED\' | translate}}\n                    </div>\n                    <div class="number">\n                       {{process.runtime.failed || 0}}\n                    </div>\n                  </div>\n                </div>\n              </div>\n            </div>\n            <div class="table-scrollable table-scrollable-borderless">\n              <table class="table table-hover table-light">\n              <thead>\n              <tr class="uppercase">\n                <th>\n                   {{\'APPLICATION_STATUS\' | translate}}\n                </th>\n                <th>\n                   {{\'APPLICATION_VALUE\' | translate}}\n                </th>\n                <th>\n                   {{\'APPLICATION_DESCRIPTION\' | translate}}\n                </th>\n              </tr>\n              </thead>\n              <tr ng-repeat="(key, value) in process.runtime">\n                <td>\n                  <a href="#" class="primary-link">{{\'APPLICATION_\' + key.toUpperCase() | translate}}</a>\n                </td>\n                <td ng-switch on="key">\n                   <span ng-switch-when="avgDial">{{value | number:2}}</span>\n                   <span ng-switch-when="avgDuration">{{value | number:2}}</span>\n                   <span ng-switch-when="avgProgress">{{value | number:2}}</span>\n                   <span ng-switch-when="completed">{{((value)? \'APPLICATION_YES\' : \'APPLICATION_NO\') | translate}}</span>\n                   <span ng-switch-when="outOfTime">{{((value)? \'APPLICATION_YES\' : \'APPLICATION_NO\') | translate}}</span>\n                   <span ng-switch-default>{{value}}</span>\n                </td>\n                <td>\n                   {{\'DESCRIPTION_TD_\' + key.toUpperCase() | translate}}\n                </td>\n              </tr>\n              </table>\n            </div>\n          </div>\n          <!-- END SUMMARY TAB -->\n        </div>\n      </div>\n    </div>\n    <!-- END PORTLET -->\n  </div>\n</div>\n'),a.put("app/motiondialer/process/view/view.run.process.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_STATUS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <p>\n    Do you want to {{ status }} the process?\n  </p>\n</div>\n<div class="modal-footer">\n  <button class="btn default green-meadow" type="button" ng-click="yes()">{{ \'APPLICATION_YES\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="no()">{{ \'APPLICATION_NO\' | translate }}</button>\n</div>\n'),a.put("app/motiondialer/process/view/view.settings.html",'<div class="row" data-ng-init="initSettings()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROCESS\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_general" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_channel" data-toggle="tab">{{ \'APPLICATION_CHANNEL\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_advanced" data-toggle="tab">{{ \'APPLICATION_ADVANCED\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_status" data-toggle="tab">{{ \'APPLICATION_STATUS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_general">\n						<form name="form" data-ng-submit="form.$valid && updateProcess()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="process.name" required/>\n								<span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n							<!-- START QUEUE -->\n					    <div data-ng-show="process.queue != \'none\'" class="form-group" data-ng-class="{\'has-error\': (form.queue.$touched || form.$submitted) && form.queue.$invalid}">\n					      <label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="process.queue" name="queue" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="queue.name as queue in queues | filter: $select.search">\n										<div ng-bind-html="queue.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n					      <span data-ng-show="(form.queue.$touched || form.$submitted) && form.queue.$error.required" class="help-block help-block-error">\n					        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n					      </span>\n					    </div>\n					    <!-- END QUEUE -->\n							<!-- START MAX RETRIES -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.max_retries.$touched || form.$submitted) && form.max_retries.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MAX_RETRIES\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" max="100" name="max_retries" placeholder="{{\'APPLICATION_MAX_RETRIES\' | translate}}" class="form-control" data-ng-model="process.max_retries" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_MAX_RETRIES\' | translate}}</span>\n								<span data-ng-show="(form.max_retries.$touched || form.$submitted) && form.max_retries.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.max_retries.$error.max || form.max_retries.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END MAX RETRIES -->\n							<!-- START RETRY TIME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.retry_time.$touched || form.$submitted) && form.retry_time.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RETRY_TIME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="retry_time" placeholder="{{\'APPLICATION_RETRY_TIME\' | translate}}" class="form-control" data-ng-model="process.retry_time" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_RETRY_TIME\' | translate}}</span>\n								<span data-ng-show="(form.retry_time.$touched || form.$submitted) && form.retry_time.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.retry_time.$error.max || form.retry_time.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END RETRY TIME -->\n							<!-- START RETRY TIME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.wait_time.$touched || form.$submitted) && form.wait_time.$invalid}">\n								<label class="control-label">{{\'APPLICATION_WAIT_TIME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1000" name="wait_time" placeholder="{{\'APPLICATION_WAIT_TIME\' | translate}}" class="form-control" data-ng-model="process.wait_time" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_WAIT_TIME\' | translate}}</span>\n								<span data-ng-show="(form.wait_time.$touched || form.$submitted) && form.wait_time.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.wait_time.$error.max || form.wait_time.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END WAIT TIME -->\n							<!-- START AUTO CLOSED -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_AUTO_CLOSED\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="process.auto_closed"\n								type="checkbox"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-animate="false">\n								<span class="help-block">{{\'DESCRIPTION_TD_AUTO_CLOSED\' | translate}}</span>\n							</div>\n							<!-- END AUTO CLOSED -->\n							<!--	START WEIGHT -->\n							<!-- END WEIGHT -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_AUTODIAL_LEVEL\' | translate}}</label></br>\n								<slider ng-model="process.weight" min="0" step="1" max="50"></slider>\n								<label>{{\'APPLICATION_VALUE\' | translate}}: {{process.weight}}</label>\n								<span class="help-block">{{\'DESCRIPTION_TD_WEIGHT\' | translate}}</span>\n							</div>\n							<!-- START DISPOSAL -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_TD_DISPOSAL\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="process.disposal"\n								type="checkbox"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-animate="false">\n								<span class="help-block">{{\'DESCRIPTION_TD_DISPOSAL\' | translate}}</span>\n							</div>\n							<!-- END DISPOSAL -->\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="process.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n					<!-- CHANNEL TAB -->\n					<div class="tab-pane" id="tab_channel">\n						<form name="form" data-ng-submit="form.$valid && updateProcess()" novalidate>\n							<!-- START CONTEXT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.context.$touched || form.$submitted) && form.context.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="context" placeholder="{{\'APPLICATION_CONTEXT\' | translate}}" class="form-control" data-ng-model="process.context" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_CONTEXT\' | translate}}</span>\n								<span data-ng-show="(form.context.$touched || form.$submitted) && form.context.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONTEXT -->\n							<!-- START EXTENSION -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.extension.$touched || form.$submitted) && form.extension.$invalid}">\n								<label class="control-label">{{\'APPLICATION_EXTENSION\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="extension" placeholder="{{\'APPLICATION_EXTENSION\' | translate}}" class="form-control" data-ng-model="process.extension" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_EXTENSION\' | translate}}</span><a href="/channels/voice/routes/internal/list">Link {{\'APPLICATION_INTERNAL\' | translate}}</a>\n								<span data-ng-show="(form.extension.$touched || form.$submitted) && form.extension.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END EXTENSION -->\n							<!-- START PRIORITY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.priority.$touched || form.$submitted) && form.priority.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PRIORITY\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="priority" placeholder="{{\'APPLICATION_PRIORITY\' | translate}}" class="form-control" data-ng-model="process.priority" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_PRIORITY\' | translate}}</span>\n								<span data-ng-show="(form.priority.$touched || form.$submitted) && form.priority.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.priority.$error.max || form.priority.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END PRIORITY -->\n							<!-- START PREFIX -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_PREFIX\' | translate}}</label>\n								<input type="text" name="prefix_code" placeholder="{{\'APPLICATION_PREFIX\' | translate}}" class="form-control" data-ng-model="process.prefix_code"/>\n								<span class="help-block">{{\'DESCRIPTION_TD_PREFIX\' | translate}}</span>\n							</div>\n							<!-- END PREFIX -->\n							<!-- START TECHNOLOGY -->\n					    <div class="form-group">\n					      <label class="control-label">{{\'APPLICATION_TECHNOLOGY\' | translate}}<span class="required" aria-required="true">*</span></label>\n					      <select name="tech" class="form-control" data-ng-model="process.tech" ng-options="tech for tech in techs" required>\n					      </select>\n								<span class="help-block">{{\'DESCRIPTION_TD_TECHNOLOGY\' | translate}}</span>\n					    </div>\n					    <!-- END TECHNOLOGY -->\n							<!-- START DEVICE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.device.$touched || form.$submitted) && form.device.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TRUNK\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="device" placeholder="{{\'APPLICATION_TRUNK\' | translate}}" class="form-control" data-ng-model="process.device" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_TRUNK\' | translate}}</span>\n								<span data-ng-show="(form.device.$touched || form.$submitted) && form.device.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END DEVICE -->\n							<!-- START CALLERID -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.callerid.$touched || form.$submitted) && form.callerid.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CALLERID\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="callerid" placeholder="{{\'APPLICATION_CALLERID\' | translate}}" class="form-control" data-ng-model="process.callerid" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_CALLERID\' | translate}}</span>\n								<span data-ng-show="(form.callerid.$touched || form.$submitted) && form.callerid.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CALLERID -->\n							<!-- START CODEC -->\n							<div class="form-group">\n								<label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n								<ui-select multiple data-ng-model="process.codecs" name="codecs" theme="bootstrap" data-ng-disabled="disabled">\n									<ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n									<ui-select-choices repeat="codec in codecs">\n										{{codec}}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n							<!-- END CODEC -->\n							<!-- START DIAL FORMAT -->\n					    <div class="form-group">\n					      <label class="control-label">{{\'APPLICATION_DIAL_FORMAT\' | translate}}<span class="required" aria-required="true">*</span></label>\n					      <select name="dial_format" class="form-control" data-ng-model="process.dial_format" ng-options="dial_format for dial_format in dialFormats" required>\n					      </select>\n								<span class="help-block">{{\'DESCRIPTION_TD_DIAL_FORMAT\' | translate}}</span>\n					    </div>\n					    <!-- END DIAL FORMAT -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CHANNEL TAB -->\n					<!-- ADVANCED TAB -->\n					<div class="tab-pane" id="tab_advanced">\n						<form name="form" data-ng-submit="form.$valid && updateProcess()" novalidate>\n							<!-- START CHECK DUPLICATE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_CHECK_DUPLICATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<select name="check_duplicate" class="form-control" data-ng-model="process.check_duplicate" ng-options="check_duplicate for check_duplicate in checkDuplicates" required>\n								</select>\n								<span class="help-block">{{\'DESCRIPTION_TD_CHECK_DUPLICATE\' | translate}}</span>\n							</div>\n							<!-- END CHECK DUPLICATE -->\n							<!-- START CHECK BLACKLIST -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_CHECK_BLACKLIST\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="process.check_blacklist"\n								type="checkbox"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-animate="false">\n								<span class="help-block">{{\'DESCRIPTION_TD_CHECK_BLACKLIST\' | translate}}</span>\n							</div>\n							<!-- END CHECK BLACKLIST -->\n							<!-- START CHECK PHONE LENGHT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.check_phone_length.$touched || form.$submitted) && form.check_phone_length.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CHECK_PHONE_LENGHT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="check_phone_length" placeholder="{{\'APPLICATION_CHECK_PHONE_LENGHT\' | translate}}" class="form-control" data-ng-model="process.check_phone_length" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_CHECK_PHONE_LENGHT\' | translate}}</span>\n								<span data-ng-show="(form.check_phone_length.$touched || form.$submitted) && form.check_phone_length.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.check_phone_length.$error.max || form.check_phone_length.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END CHECK PHONE LENGHT -->\n							<!-- START TIME SLICE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.time_slice.$touched || form.$submitted) && form.time_slice.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIME_SLICE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="time_slice" placeholder="{{\'APPLICATION_TIME_SLICE\' | translate}}" class="form-control" data-ng-model="process.time_slice" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_TIME_SLICE\' | translate}}</span>\n								<span data-ng-show="(form.time_slice.$touched || form.$submitted) && form.time_slice.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.time_slice.$error.max || form.time_slice.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIME SLICE -->\n							<!-- START MISSED -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_CHECK_MISSED\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="process.missed"\n								type="checkbox"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-animate="false">\n								<span class="help-block">{{\'DESCRIPTION_TD_CHECK_MISSED\' | translate}}</span>\n							</div>\n							<!-- END MISSED -->\n							<!-- START CHANNEL LIMIT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.channel_limit.$touched || form.$submitted) && form.channel_limit.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CHANNEL_LIMIT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" name="channel_limit" placeholder="{{\'APPLICATION_CHANNEL_LIMIT\' | translate}}" class="form-control" data-ng-model="process.channel_limit" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_CHANNEL_LIMIT\' | translate}}</span>\n								<span data-ng-show="(form.channel_limit.$touched || form.$submitted) && form.channel_limit.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.channel_limit.$error.max || form.channel_limit.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END  CHANNEL LIMIT -->\n							<!-- START CONTEXT FOR OTHER CALLS -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_CONTEXT_FOR_OTHER_CALLS\' | translate}}</label>\n								<input type="text" name="context_for_other_calls" placeholder="{{\'APPLICATION_CONTEXT_FOR_OTHER_CALLS\' | translate}}" class="form-control" data-ng-model="process.context_for_other_calls"/>\n								<span class="help-block">{{\'DESCRIPTION_TD_CONTEXT_FOR_OTHER_CALLS\' | translate}}</span>\n							</div>\n							<!-- END CONTEXT FOR OTHER CALLS -->\n							<!-- START EXTENSION FOR OTHER CALLS-->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_EXTENSION_FOR_OTHER_CALLS\' | translate}}</label>\n								<input type="text" name="extension_for_other_calls" placeholder="{{\'APPLICATION_EXTENSION_FOR_OTHER_CALLS\' | translate}}" class="form-control" data-ng-model="process.extension_for_other_calls"/>\n								<span class="help-block">{{\'DESCRIPTION_TD_EXTENSION_FOR_OTHER_CALLS\' | translate}}</span>\n							</div>\n							<!-- END EXTENSION FOR OTHER CALLS-->\n							<!-- START PRIORITY FOR OTHER CALLS-->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.priority_for_other_calls.$touched || form.$submitted) && form.priority_for_other_calls.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PRIORITY_FOR_OTHER_CALLS\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="priority_for_other_calls" placeholder="{{\'APPLICATION_PRIORITY_FOR_OTHER_CALLS\' | translate}}" class="form-control" data-ng-model="process.priority_for_other_calls"/>\n								<span class="help-block">{{\'DESCRIPTION_TD_PRIORITY_FOR_OTHER_CALLS\' | translate}}</span>\n								<span data-ng-show="form.priority_for_other_calls.$error.max || form.priority_for_other_calls.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END PRIORITY FOR OTHER CALLS -->\n							<!-- START TIMEZONE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_EXTENDED_TIME_INTERVAL\' | translate}}</label>\n								<input type="text" name="timezone" placeholder="08:30-20:30" class="form-control" data-ng-model="process.timezone"/>\n								<span class="help-block">{{\'DESCRIPTION_TD_EXTENDED_TIME_INTERVAL\' | translate}}</span>\n							</div>\n							<!-- END TIMEZONE -->\n\n							<!-- START AUTO TIMEZONE MANAGEMENT -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_AUTO_TIMEZONE_MANAGEMENT\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="process.auto_timezone_management"\n								type="checkbox"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-animate="false">\n								<span class="help-block">{{\'DESCRIPTION_TD_AUTO_TIMEZONE_MANAGEMENT\' | translate}}</span>\n							</div>\n							<!-- END AUTO TIMEZONE MANAGEMENT -->\n							<!-- START IGNORE STRINGS-->\n							<!-- COMMENTED: BECAUSE IGNORE_STRINGS IS AN ARRAY NOT A STRING-->\n							<!-- <div class="form-group">\n								<label class="control-label">{{\'APPLICATION_IGNORE_STRINGS\' | translate}}</label>\n								<input type="text" name="ignore_strings" placeholder="{{\'APPLICATION_IGNORE_STRINGS\' | translate}}" class="form-control" data-ng-model="process.ignore_strings"/>\n								<span class="help-block">{{\'DESCRIPTION_TD_IGNORE_STRINGS\' | translate}}</span>\n							</div> -->\n							<!-- END IGNORE STRINGS-->\n							<!-- START MIN OPERATOR -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.min_operator.$touched || form.$submitted) && form.min_operator.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MIN_OPERATOR\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="min_operator" placeholder="{{\'APPLICATION_MIN_OPERATOR\' | translate}}" class="form-control" data-ng-model="process.min_operator" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_MIN_OPERATOR\' | translate}}</span>\n								<span data-ng-show="(form.min_operator.$touched || form.$submitted) && form.min_operator.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.min_operator.$error.max || form.min_operator.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END MIN OPERATOR -->\n							<!-- START ALERT MAX CALLS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.alert_max_calls.$touched || form.$submitted) && form.alert_max_calls.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ALERT_MAX_CALLS\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" name="alert_max_calls" placeholder="{{\'APPLICATION_ALERT_MAX_CALLS\' | translate}}" class="form-control" data-ng-model="process.alert_max_calls" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_ALERT_MAX_CALLS\' | translate}}</span>\n								<span data-ng-show="(form.alert_max_calls.$touched || form.$submitted) && form.alert_max_calls.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.alert_max_calls.$error.max || form.alert_max_calls.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END ALERT MAX CALLS -->\n							<!-- START ALERT TIME SLICE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.alert_time_slice.$touched || form.$submitted) && form.alert_time_slice.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ALERT_TIME_SLICE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="alert_time_slice" placeholder="{{\'APPLICATION_ALERT_TIME_SLICE\' | translate}}" class="form-control" data-ng-model="process.alert_time_slice" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_ALERT_TIME_SLICE\' | translate}}</span>\n								<span data-ng-show="(form.alert_time_slice.$touched || form.$submitted) && form.alert_time_slice.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.alert_time_slice.$error.max || form.alert_time_slice.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END ALERT TIME SLICE -->\n							<!-- START DROP MAX COUNT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.drop_max_count.$touched || form.$submitted) && form.drop_max_count.$invalid}">\n								<label class="control-label">{{\'APPLICATION_DROP_MAX_COUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" name="drop_max_count" placeholder="{{\'APPLICATION_DROP_MAX_COUNT\' | translate}}" class="form-control" data-ng-model="process.drop_max_count" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_DROP_MAX_COUNT\' | translate}}</span>\n								<span data-ng-show="(form.drop_max_count.$touched || form.$submitted) && form.drop_max_count.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.drop_max_count.$error.max || form.drop_max_count.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END DROP MAX COUNT -->\n							<!-- START SUCCESS CALL SIZE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.success_call_size.$touched || form.$submitted) && form.success_call_size.$invalid}">\n								<label class="control-label">{{\'APPLICATION_SUCCESS_CALL_SIZE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="success_call_size" placeholder="{{\'APPLICATION_SUCCESS_CALL_SIZE\' | translate}}" class="form-control" data-ng-model="process.success_call_size" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_SUCCESS_CALL_SIZE\' | translate}}</span>\n								<span data-ng-show="(form.success_call_size.$touched || form.$submitted) && form.success_call_size.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.success_call_size.$error.max || form.success_call_size.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END SUCCESS CALL SIZE -->\n							<!-- START IGNORE STRINGS-->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_TIME_EXPIRED\' | translate}}</label>\n								<input type="text" name="expiredtime" placeholder="yyyy-MM-dd HH:mm:ss" class="form-control" data-ng-model="process.expiredtime"/>\n								<span class="help-block">{{\'DESCRIPTION_TD_TIME_EXPIRED\' | translate}}</span>\n							</div>\n							<!-- END IGNORE STRINGS-->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ANDVANCED TAB -->\n					<!-- START STATUS TAB -->\n					<div class="tab-pane" id="tab_status">\n						<form name="form" data-ng-submit="form.$valid && updateProcess()" novalidate>\n							<table class="table table-bordered table-hover">\n								<thead>\n								<tr role="row" class="heading">\n									<th>\n										 {{ \'APPLICATION_VALUE\' | translate}}\n									</th>\n									<th>\n										 {{ \'APPLICATION_MAX_RETRIES\' | translate}}\n									</th>\n									<th>\n										 {{ \'APPLICATION_RETRY_TIME\' | translate}} [min]\n									</th>\n									<th>\n										 {{ \'APPLICATION_DESCRIPTION\' | translate}}\n									</th>\n								</tr>\n								</thead>\n								<tbody>\n									<tr>\n										<td>\n											{{ \'APPLICATION_AMD\' | translate}}\n										</td>\n										<td>\n											<input type="number" min="0" name="amd_max_retries"class="form-control" data-ng-model="process.amd_max_retries" required/>\n											<span data-ng-show="(form.amd_max_retries.$touched || form.$submitted) && form.amd_max_retries.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.amd_max_retries.$error.max || form.amd_max_retries.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											<input type="number" min="0" name="amd_retry_time" class="form-control" data-ng-model="process.amd_retry_time" required/>\n											<span data-ng-show="(form.amd_retry_time.$touched || form.$submitted) && form.amd_retry_time.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.amd_retry_time.$error.max || form.amd_retry_time.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											{{ \'DESCRIPTION_TD_STATUS_AMD\' | translate}}\n										</td>\n									</tr>\n									<tr>\n										<td>\n											{{ \'APPLICATION_BUSY\' | translate}}\n										</td>\n										<td>\n											<input type="number" min="0" name="busy_max_retries"class="form-control" data-ng-model="process.busy_max_retries" required/>\n											<span data-ng-show="(form.busy_max_retries.$touched || form.$submitted) && form.busy_max_retries.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.busy_max_retries.$error.max || form.busy_max_retries.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											<input type="number" min="0" name="busy_retry_time"class="form-control" data-ng-model="process.busy_retry_time" required/>\n											<span data-ng-show="(form.busy_retry_time.$touched || form.$submitted) && form.busy_retry_time.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.busy_retry_time.$error.max || form.busy_retry_time.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											{{ \'DESCRIPTION_TD_STATUS_BUSY\' | translate}}\n										</td>\n									</tr>\n									<tr>\n										<td>\n											{{ \'APPLICATION_CONGESTION\' | translate}}\n										</td>\n										<td>\n											<input type="number" min="0" name="congestion_max_retries"class="form-control" data-ng-model="process.congestion_max_retries" required/>\n											<span data-ng-show="(form.congestion_max_retries.$touched || form.$submitted) && form.congestion_max_retries.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.congestion_max_retries.$error.max || form.congestion_max_retries.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											<input type="number" min="0" name="congestion_retry_time"class="form-control" data-ng-model="process.congestion_retry_time" required/>\n											<span data-ng-show="(form.congestion_retry_time.$touched || form.$submitted) && form.congestion_retry_time.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.congestion_retry_time.$error.max || form.congestion_retry_time.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											{{ \'DESCRIPTION_TD_STATUS_CONGESTION\' | translate}}\n										</td>\n									</tr>\n									<tr>\n										<td>\n											{{ \'APPLICATION_DROP\' | translate}}\n										</td>\n										<td>\n											<input type="number" min="0" name="drop_max_retries"class="form-control" data-ng-model="process.drop_max_retries" required/>\n											<span data-ng-show="(form.drop_max_retries.$touched || form.$submitted) && form.drop_max_retries.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.drop_max_retries.$error.max || form.drop_max_retries.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											<input type="number" min="0" name="drop_retry_time"class="form-control" data-ng-model="process.drop_retry_time" required/>\n											<span data-ng-show="(form.drop_retry_time.$touched || form.$submitted) && form.drop_retry_time.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.drop_retry_time.$error.max || form.drop_retry_time.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											{{ \'DESCRIPTION_TD_STATUS_DROP\' | translate}}\n										</td>\n									</tr>\n									<tr>\n										<td>\n											{{ \'APPLICATION_FAILED\' | translate}}\n										</td>\n										<td>\n											<input type="number" min="0" name="failed_max_retries"class="form-control" data-ng-model="process.failed_max_retries" required/>\n											<span data-ng-show="(form.failed_max_retries.$touched || form.$submitted) && form.failed_max_retries.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.failed_max_retries.$error.max || form.failed_max_retries.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											<input type="number" min="0" name="failed_retry_time"class="form-control" data-ng-model="process.failed_retry_time" required/>\n											<span data-ng-show="(form.failed_retry_time.$touched || form.$submitted) && form.failed_retry_time.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.failed_retry_time.$error.max || form.failed_retry_time.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											{{ \'DESCRIPTION_TD_STATUS_FAILED\' | translate}}\n										</td>\n									</tr>\n									<tr>\n										<td>\n											{{ \'APPLICATION_NOANSWER\' | translate}}\n										</td>\n										<td>\n											<input type="number" min="0" name="noanswer_max_retries"class="form-control" data-ng-model="process.noanswer_max_retries" required/>\n											<span data-ng-show="(form.noanswer_max_retries.$touched || form.$submitted) && form.noanswer_max_retries.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.noanswer_max_retries.$error.max || form.noanswer_max_retries.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											<input type="number" min="0" name="noanswer_retry_time"class="form-control" data-ng-model="process.noanswer_retry_time" required/>\n											<span data-ng-show="(form.noanswer_retry_time.$touched || form.$submitted) && form.noanswer_retry_time.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.noanswer_retry_time.$error.max || form.noanswer_retry_time.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											{{ \'DESCRIPTION_TD_STATUS_NOANSWER\' | translate}}\n										</td>\n									</tr>\n									<tr>\n										<td>\n											{{ \'APPLICATION_NOSUCHEXTENSION\' | translate}}\n										</td>\n										<td>\n											<input type="number" min="0" name="nosuchextension_max_retries"class="form-control" data-ng-model="process.nosuchextension_max_retries" required/>\n											<span data-ng-show="(form.nosuchextension_max_retries.$touched || form.$submitted) && form.nosuchextension_max_retries.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.nosuchextension_max_retries.$error.max || form.nosuchextension_max_retries.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											<input type="number" min="0" name="nosuchextension_retry_time"class="form-control" data-ng-model="process.nosuchextension_retry_time" required/>\n											<span data-ng-show="(form.nosuchextension_retry_time.$touched || form.$submitted) && form.nosuchextension_retry_time.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.nosuchextension_retry_time.$error.max || form.nosuchextension_retry_time.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											{{ \'DESCRIPTION_TD_STATUS_NOSUCHEXTENSION\' | translate}}\n										</td>\n									</tr>\n								</tbody>\n							</table>\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END STATUS TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
-a.put("app/motiondialer/process/view/view.spooler.edit.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_EDIT\' | translate }} {{ \'APPLICATION_CONTACT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START RETRIEVE -->\n  <div class="form-group" data-ng-class="{\'has-error\': (form.retrieve.$touched || form.$submitted) && form.retrieve.$invalid}" ng-init="initModal()">\n    <label class="control-label">{{ \'APPLICATION_STATUS\' | translate }}<span class="required" aria-required="true">*</span></label>\n    <select name="retrieve" class="form-control" data-ng-model="entitySpooler.retrieve" required>\n      <option value="CLOSED">CLOSE</option>\n      <option value="OPEN">OPEN</option>\n      <option value="BLACK_LIST">BLACKLIST</option>\n      <option value="PLANNED">PLANNING</option>\n      <option value="PLANNED_PEER">PLANNING AGENT</option>\n    </select>\n    <span data-ng-show="(form.retrieve.$touched || form.$submitted) && form.retrieve.$error.required" class="help-block help-block-error">\n      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n    </span>\n  </div>\n  <!-- END RETRIEVE -->\n  <!-- START PLANNING DATE -->\n  <div class="form-group" data-ng-if="entitySpooler.retrieve == \'PLANNED\' || entitySpooler.retrieve == \'PLANNED_PEER\'" data-ng-class="{\'has-error\': (form.date.$touched || form.$submitted) && form.date.$invalid}">\n    <label class="control-label">PLANNING DATE<span class="required" aria-required="true">*</span></label>\n    <uib-datepicker name="date" ng-model="entitySpooler.planningtime" required="entitySpooler.retrieve == \'PLANNED\' || entitySpooler.retrieve == \'PLANNED_PEER\'" data-ng-init="entitySpooler.planningtime = moment()"></uib-datepicker>\n    <span data-ng-show="(form.date.$touched || form.$submitted) && form.date.$error.required" class="help-block help-block-error">\n      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n    </span>\n  </div>\n  <!-- END PLANNING DATE -->\n  <!-- START PLANNING TIME -->\n  <div class="form-group" data-ng-if="entitySpooler.retrieve == \'PLANNED\' || entitySpooler.retrieve == \'PLANNED_PEER\'" data-ng-class="{\'has-error\': (form.time.$touched || form.$submitted) && form.time.$invalid}">\n    <label class="control-label">PLANNING TIME<span class="required" aria-required="true">*</span></label>\n    <uib-timepicker name="time" ng-model="entitySpooler.planningtime" required="entitySpooler.retrieve == \'PLANNED\' || entitySpooler.retrieve == \'PLANNED_PEER\'" show-meridian="false" show-seconds="false"></uib-timepicker>\n    <span data-ng-show="(form.time.$touched || form.$submitted) && form.time.$error.required" class="help-block help-block-error">\n      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n    </span>\n  </div>\n  <!-- END PLANNING TIME -->\n  <!-- START PLANNING PEER -->\n  <div class="form-group" data-ng-if="entitySpooler.retrieve == \'PLANNED_PEER\'" data-ng-class="{\'has-error\': (form.agent.$touched || form.$submitted) && form.agent.$invalid}">\n    <label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n    <select name="agent" class="form-control" data-ng-model="entitySpooler.planningpeer" ng-options="agent for agent in agents" required="entitySpooler.retrieve == \'PLANNED_PEER\'">\n    </select>\n    <span data-ng-show="(form.agent.$touched || form.$submitted) && form.agent.$error.required" class="help-block help-block-error">\n      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n    </span>\n  </div>\n  <!-- END PLANNING PEER -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/motiondialer/process/view/view.spooler.history.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_HISTORY\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <json-formatter json="historySpooler" open="2"></json-formatter>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/motiondialer/process/view/view.spooler.html",'<div class="row" data-ng-init="getSpooler()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_SPOOLER\' | translate}} </span>\n				</div>\n				<div class="actions">\n					<a class="btn btn-default" href="#" data-ng-click="getSpooler()">\n						<i class="icon-refresh"></i>\n					</a>\n				</div>\n			</div>\n\n			<div class="portlet-body">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="spinner-grid" spinner-start-active="true"></span>\n				<!-- END UI-GRID SPINNER -->\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/reset/reset.html",'<!-- BEGIN LOGO -->\n<div class="logo" data-ng-init="getInfo()">\n	<a href="index.html">\n		<img data-ng-if="settings.defaultLoginLogo || !license.custom" ng-src="assets/images/logo-big.png" alt="logo" />\n		<img data-ng-if="license.custom && !settings.defaultLoginLogo" ng-src="api/settings/logo/login/{{settings.loginLogo ? settings.loginLogo : \'logo-big.png\'}}" alt="logo" class="custom-login-logo" onError="this.onerror=null;this.src=\'assets/images/logo-big.png\';"/>\n	</a>\n</div>\n<!-- END LOGO -->\n<!-- BEGIN RESET -->\n<div class="content">\n	<!-- BEGIN RESET FORM -->\n	<form name="resetForm" data-ng-submit="resetForm.$valid && reset()" novalidate>\n		<h3>{{\'APPLICATION_RESET_PASSWORD\' | translate}}</h3>\n		<p>\n			{{\'APPLICATION_INSERT_NEW_PASSWORD_RESET\' | translate}}\n		</p>\n		<div class="form-group" data-ng-class="{\'has-error\': resetForm.$submitted && resetForm.password.$invalid}">\n			<label class="control-label">{{\'APPLICATION_NEW_PASSWORD\' | translate}}</label>\n			<div class="input-icon">\n				<i class="icon-key"></i>\n				<input class="form-control form-control-solid placeholder-no-fix" type="password" placeholder="{{\'APPLICATION_NEW_PASSWORD\' | translate}}" name="password" ng-model="userReset.password"  data-ng-pattern="settings.patternPassword" required/>\n			</div>\n			<span data-ng-show="resetForm.$submitted && resetForm.password.$invalid" class="help-block">{{\'MESSAGE_REQUIRED_FIELD\' | translate}}</span>\n			<span data-ng-show="(resetForm.password.$touched || resetForm.$submitted) && resetForm.password.$error.pattern" class="help-block help-block-error">\n				<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n			</span>\n		</div>\n		<div class="form-group" data-ng-class="{\'has-error\': resetForm.$submitted && resetForm.rePassword.$invalid}">\n			<label class="control-label">{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}</label>\n			<div class="input-icon">\n				<i class="icon-key"></i>\n				<input class="form-control form-control-solid placeholder-no-fix" type="password" placeholder="{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}" name="rePassword" ng-model="userReset.rePassword" nx-equal="userReset.password" required/>\n			</div>\n			<span data-ng-show="resetForm.$submitted && resetForm.rePassword.$invalid" class="help-block">{{\'MESSAGE_REQUIRED_FIELD\' | translate}}</span>\n			<span data-ng-show="(resetForm.password.$touched || resetForm.$submitted) && resetForm.$error.nxEqual" class="help-block help-block-error">\n				<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n			</span>\n		</div>\n		<div class="form-actions">\n			<button type="submit" class="btn btn-success uppercase">{{\'APPLICATION_SUBMIT\' | translate}}</button>\n		</div>\n	</form>\n	<!-- END RESET FORM-->\n		<div class="login-options">\n			<h4>{{\'APPLICATION_FOLLOW_US\' | translate}}</h4>\n			<ul class="social-icons">\n				<li>\n					<a class="social-icon-color facebook" data-original-title="facebook" href="https://www.facebook.com/xenialab"></a>\n				</li>\n				<li>\n					<a class="social-icon-color twitter" data-original-title="Twitter" href="https://twitter.com/xenialab"></a>\n				</li>\n				<li>\n					<a class="social-icon-color googleplus" data-original-title="Goole Plus" href="#"></a>\n				</li>\n				<li>\n					<a class="social-icon-color linkedin" data-original-title="Linkedin" href="#"></a>\n				</li>\n			</ul>\n		</div>\n</div>\n<div class="copyright">\n	xCALLY Motion v. {{info.version}} | 2016 - {{year + 1}} &copy; Powered by Xenialab <ng-bind-html data-ng-if="license.custom && !settings.defaultFooterWhiteLabel && settings.footerWhiteLabel" ng-bind-html="\'| \'+settings.footerWhiteLabel"></ng-bind-html>\n</div>\n<!-- END RESET -->\n'),a.put("app/salesforce/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-cloud"></i>\n					<a href="/salesforce/list">{{ \'APPLICATION_SALESFORCE\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="fa fa-cloud font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_SALESFORCE\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/salesforce/wizard" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/salesforce/view/configuration/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.name.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.name.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START CHANNEL -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.channel.$touched || form.channel.$submitted) && form.channel.$invalid}">\n      <label class="control-label">{{\'APPLICATION_CHANNEL\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.channel" name="channel" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_CHANNEL\' | translate}}">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="channel.value as channel in channels | filter: $select.search">\n          <div data-ng-bind="channel.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.channel.$touched || form.channel.$submitted) && form.channel.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- START CHANNEL -->\n\n    <!-- START VOICE SUBTYPE -->\n    <div data-ng-if="item.channel===\'voice\'" class="form-group" data-ng-class="{\'has-error\': (form.channel.$touched || form.channel.$submitted) && form.channel.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.type" name="type" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_TYPE\' | translate}}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="type in [\'Queue\',\'Outbound\'] | filter: $select.search">\n          <div data-ng-bind="type | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.type.$touched || form.type.$submitted) && form.type.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- START CHANNEL -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/salesforce/view/configuration/list/list.html",'<div ui-view class="profile-content">\r\n	<div class="row">\r\n		<div class="col-md-12">\r\n			<div class="portlet light" data-ng-init="initView()">\r\n				<div class="portlet-title  tabbable-line">\r\n					<div class="caption caption-md">\r\n						<i class="icon-globe theme-font hide"></i>\r\n						<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATIONS\' | translate}}</span>\r\n					</div>\r\n					<div class="actions">\r\n						<div class="btn-group" data-ng-show="id.length">\r\n							<a class="btn red" href="#" data-ng-click="deleteItems()">\r\n								<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\r\n							</a>\r\n						</div>\r\n						<div class="btn-group">\r\n							<a class="btn green-jungle" href="#" data-ng-click="createItem()">\r\n								<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}\r\n							</a>\r\n						</div>\r\n					</div>\r\n				</div>\r\n				<div class="portlet-body">\r\n					<!-- START TABLE -->\r\n					<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\r\n						<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\r\n					</div>\r\n				</div>\r\n			</div>\r\n		</div>\r\n	</div>\r\n</div>\r\n'),a.put("app/salesforce/view/configuration/view/view.html",'<div class="row" data-ng-init="initView();getConfiguration();getCustomVariables();getFields();">\r\n	<div class="col-md-12">\r\n		<div class="portlet light">\r\n			<div class="portlet-title tabbable-line">\r\n				<div class="caption caption-md">\r\n					<i class="icon-globe theme-font hide"></i>\r\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\r\n				</div>\r\n				<ul class="nav nav-tabs">\r\n					<li class="active">\r\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\r\n					</li>\r\n          <li>\r\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\r\n					</li>\r\n          <li>\r\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\r\n					</li>\r\n				</ul>\r\n			</div>\r\n			<div class="portlet-body">\r\n				<div class="tab-content">\r\n					<!-- SUBJECT TAB -->\r\n					<div class="tab-pane ui-padding active" id="tab_1_1">\r\n            <div class="row">\r\n              <div class="col-md-11">\r\n                <span class="caption-subject">All following fields will be join by blank space:</span>\r\n              </div>\r\n              <div class="col-md-1 pull-rigth">\r\n                <button class="btn btn-icon-only green" data-ng-click="addItem(\'subject\')"><i class="fa fa-plus"></i></button>\r\n              </div>\r\n            </div>\r\n            <hr>\r\n						<!-- <div id="subject-item-list" ng-scrollbars ng-scrollbars-config="config"> -->\r\n	            <div class="row" data-ng-repeat="subjectItem in subjectConfig">\r\n	              <div class="col-md-3">\r\n	                <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\r\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\r\n	                  <ui-select-choices repeat="item.type as item in fieldType | filter: $select.search">\r\n	                    <div ng-bind-html="item.title | highlight: $select.search"></div>\r\n	                  </ui-select-choices>\r\n	                </ui-select>\r\n	              </div>\r\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\r\n	                <div class="form-group">\r\n	                  <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\r\n	                </div>\r\n	              </div>\r\n								<div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\r\n	                <div class="form-group">\r\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.variableName" data-ng-change="updateField(subjectItem)">\r\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\r\n	                    <ui-select-choices group-by="groupVariableByGroup" repeat="variable.name as variable in variables | filter: $select.search">\r\n	                      <div ng-bind-html="variable.title | highlight: $select.search"></div>\r\n	                    </ui-select-choices>\r\n	                  </ui-select>\r\n	                </div>\r\n	              </div>\r\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'customVariable\'">\r\n	                <div class="form-group">\r\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\r\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\r\n	                    <ui-select-choices repeat="variable.id as variable in customVariables | filter: $select.search">\r\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\r\n	                    </ui-select-choices>\r\n	                  </ui-select>\r\n	                </div>\r\n	              </div>\r\n	              <div class="col-md-1">\r\n	                <div class="form-group">\r\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\r\n	                </div>\r\n	              </div>\r\n	            </div>\r\n						<!-- </div> -->\r\n					</div>\r\n					<!-- END SUBJECT TAB -->\r\n          <!-- DESCRIPTION TAB -->\r\n					<div class="tab-pane ui-padding" id="tab_1_2">\r\n						<div class="row">\r\n              <div class="col-md-11">\r\n                <span class="caption-subject">All following fields will be join by new line:</span>\r\n              </div>\r\n              <div class="col-md-1 pull-rigth">\r\n                <button class="btn btn-icon-only green" data-ng-click="addItem(\'description\')"><i class="fa fa-plus"></i></button>\r\n              </div>\r\n            </div>\r\n            <hr>\r\n						<!-- <div id="description-item-list" ng-scrollbars ng-scrollbars-config="config"> -->\r\n							<div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\r\n	              <div class="col-md-2">\r\n	                <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\r\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\r\n	                  <ui-select-choices repeat="item.type as item in descFieldType | filter: $select.search">\r\n	                    <div ng-bind-html="item.title | highlight: $select.search"></div>\r\n	                  </ui-select-choices>\r\n	                </ui-select>\r\n	              </div>\r\n	              <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\r\n	                <div class="form-group">\r\n	                  <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\r\n	                </div>\r\n	              </div>\r\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\'">\r\n									<input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\r\n								</div>\r\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\'">\r\n									<ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\r\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\r\n	                  <ui-select-choices repeat="item.type as item in fieldType | filter: $select.search">\r\n	                    <div ng-bind-html="item.title | highlight: $select.search"></div>\r\n	                  </ui-select-choices>\r\n	                </ui-select>\r\n								</div>\r\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\' && descriptionItem.keyType==\'string\'">\r\n									<input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\r\n								</div>\r\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\' && descriptionItem.keyType==\'variable\'">\r\n	                <div class="form-group">\r\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.variableName" data-ng-change="updateField(descriptionItem)">\r\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\r\n	                    <ui-select-choices group-by="groupVariableByGroup" repeat="variable.name as variable in variables | filter: $select.search">\r\n	                      <div ng-bind-html="variable.title | highlight: $select.search"></div>\r\n	                    </ui-select-choices>\r\n	                  </ui-select>\r\n	                </div>\r\n	              </div>\r\n	              <div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\' && descriptionItem.keyType==\'customVariable\'">\r\n	                <div class="form-group">\r\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\r\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\r\n	                    <ui-select-choices repeat="variable.id as variable in customVariables | filter: $select.search">\r\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\r\n	                    </ui-select-choices>\r\n	                  </ui-select>\r\n	                </div>\r\n	              </div>\r\n	              <div class="col-md-1">\r\n	                <div class="form-group">\r\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\r\n	                </div>\r\n	              </div>\r\n	            </div>\r\n						<!-- </div> -->\r\n					</div>\r\n					<!-- END DESCRIPTION TAB -->\r\n          <!-- FIELDS TAB -->\r\n					<div class="tab-pane ui-padding" id="tab_1_3">\r\n						<div class="row">\r\n              <div class="col-md-11">\r\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\r\n              </div>\r\n              <div class="col-md-1 pull-rigth">\r\n                <button class="btn btn-icon-only green" data-ng-click="addItem(\'field\')"><i class="fa fa-plus"></i></button>\r\n              </div>\r\n            </div>\r\n            <hr>\r\n						<!-- <div id="field-item-list" ng-scrollbars ng-scrollbars-config="config"> -->\r\n	            <div class="row" data-ng-repeat="fieldItem in fieldConfig">\r\n	              <div class="col-md-3">\r\n	                <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\r\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\r\n	                  <ui-select-choices repeat="item.name as item in accountFields | filter: $select.search">\r\n	                    <div ng-bind-html="item.label | highlight: $select.search"></div>\r\n	                  </ui-select-choices>\r\n	                </ui-select>\r\n	              </div>\r\n	              <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\r\n	                <div class="form-group">\r\n										<ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\r\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\r\n		                  <ui-select-choices repeat="item.value as item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\r\n		                    <div ng-bind-html="item.label | highlight: $select.search"></div>\r\n		                  </ui-select-choices>\r\n		                </ui-select>\r\n	                </div>\r\n	              </div>\r\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\r\n									<div class="form-group">\r\n										<ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\r\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\r\n		                  <ui-select-choices repeat="item.type as item in fieldType | filter: $select.search">\r\n		                    <div ng-bind-html="item.title | highlight: $select.search | ucfirst"></div>\r\n		                  </ui-select-choices>\r\n		                </ui-select>\r\n									</div>\r\n								</div>\r\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\r\n	                <div class="form-group">\r\n										<input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\r\n	                </div>\r\n	              </div>\r\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\r\n	                <div class="form-group">\r\n										<ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.variableName" data-ng-change="updateField(fieldItem)">\r\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\r\n	                    <ui-select-choices group-by="groupVariableByGroup" repeat="variable.name as variable in variables | filter: $select.search">\r\n	                      <div ng-bind-html="variable.title | highlight: $select.search"></div>\r\n	                    </ui-select-choices>\r\n	                  </ui-select>\r\n	                </div>\r\n	              </div>\r\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'customVariable\'">\r\n	                <div class="form-group">\r\n										<ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\r\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\r\n	                    <ui-select-choices repeat="variable.id as variable in customVariables | filter: $select.search">\r\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\r\n	                    </ui-select-choices>\r\n	                  </ui-select>\r\n	                </div>\r\n	              </div>\r\n	              <div class="col-md-1">\r\n	                <div class="form-group">\r\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\r\n	                </div>\r\n	              </div>\r\n	            </div>\r\n						<!-- </div> -->\r\n					</div>\r\n					<!-- END FIELDS TAB -->\r\n				</div>\r\n			</div>\r\n		</div>\r\n	</div>\r\n</div>\r\n'),a.put("app/salesforce/view/view.account.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_URI\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_URI\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n								<span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n              <!-- START CLIENT ID -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.clientId.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CLIENT_ID\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="clientId" placeholder="{{\'APPLICATION_CLIENT_ID\' | translate}}" class="form-control" data-ng-model="account.clientId" required/>\n								<span data-ng-show="forms.formSetting.clientId.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CLIENT ID -->\n\n              <!-- START CLIENT SECRET -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.clientSecret.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CLIENT_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="clientSecret" placeholder="{{\'APPLICATION_CLIENT_SECRET\' | translate}}" class="form-control" data-ng-model="account.clientSecret" required/>\n								<span data-ng-show="forms.formSetting.clientSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CLIENT SECRET -->\n\n              <!-- START SECURITY TOKEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.securityToken.$invalid}">\n								<label class="control-label">{{\'APPLICATION_SECURITY_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="securityToken" placeholder="{{\'APPLICATION_SECURITY_TOKEN\' | translate}}" class="form-control" data-ng-model="account.securityToken" required/>\n								<span data-ng-show="forms.formSetting.securityToken.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END SECURITY TOKEN -->\n\n							<!-- START SERVER URL -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.serverUrl.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}}</label>\n								<input type="url" name="serverUrl" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.serverUrl"/>\n								<span class="help-block">\n									{{\'DESCRIPTION_SERVER_URL\' | translate}}.\n								</span>\n								<span class="help-block help-block-info">\n									{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n								</span>\n							</div>\n							<!-- END SERVER URL -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
-a.put("app/salesforce/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n          <i class="fa fa-cloud"></i>\n          <a href="/salesforce/list">{{ \'APPLICATION_SALESFORCE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{account.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img src="assets/images/media/salesforce.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{account.name}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{account.remoteUri}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.salesforce.view.account\')}">\n							<a ng-href="/salesforce/view/{{account.id}}/account">\n							<i class="icon-user"></i>\n							{{ \'APPLICATION_ACCOUNT\' | translate }} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.salesforce.view.configurations\') || $state.is(\'main.salesforce.view.configuration\')}">\n							<a ng-href="/salesforce/view/{{account.id}}/configurations/list">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_CONFIGURATIONS\' | translate }} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/salesforce/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-cloud"></i>\n						<a href="/salesforce/list">{{ \'APPLICATION_SALESFORCE\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n						<form name="forms.formSetting" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.username" required ng-remote-validate="/api/salesforce/accounts/validate/username"/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formSetting.username.$touched || forms.formSetting.$submitted) && forms.formSetting.username.$error.ngRemoteValidate" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n				        </span>\n							</div>\n							<!-- END USERNAME -->\n\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_URI\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_URI\' | translate}}" class="form-control" data-ng-model="item.remoteUri" required/>\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n              <!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n								<span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n              <!-- START CLIENT ID -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.clientId.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CLIENT_ID\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="clientId" placeholder="{{\'APPLICATION_CLIENT_ID\' | translate}}" class="form-control" data-ng-model="item.clientId" required/>\n								<span data-ng-show="forms.formSetting.clientId.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CLIENT ID -->\n\n              <!-- START CLIENT SECRET -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.clientSecret.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CLIENT_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="clientSecret" placeholder="{{\'APPLICATION_CLIENT_SECRET\' | translate}}" class="form-control" data-ng-model="item.clientSecret" required/>\n								<span data-ng-show="forms.formSetting.clientSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CLIENT SECRET -->\n\n              <!-- START SECURITY TOKEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.securityToken.$invalid}">\n								<label class="control-label">{{\'APPLICATION_SECURITY_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="securityToken" placeholder="{{\'APPLICATION_SECURITY_TOKEN\' | translate}}" class="form-control" data-ng-model="item.securityToken" required/>\n								<span data-ng-show="forms.formSetting.securityToken.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END SECURITY TOKEN -->\n\n							<!-- START SERVER URL -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.serverUrl.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}}</label>\n								<input type="url" name="serverUrl" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.serverUrl"/>\n								<span class="help-block">\n									{{\'DESCRIPTION_SERVER_URL\' | translate}}.\n								</span>\n								<span class="help-block help-block-info">\n									{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n								</span>\n							</div>\n							<!-- END SERVER URL -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n\n				</wizard>\n\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/customization/view/general/general.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_GENERAL_CUSTOMIZATION\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_LOGO\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_FOOTER_WHITE_LABEL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- CHANGE LOGO TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<div class="col-md-6 col-sm-6" >\n							<div class="portlet light bordered" style="min-height:411px;">\n								<div class="portlet-title">\n									<div class="caption font-green-sharp">\n										<i class="icon-pie-chart font-green-sharp"></i>\n										<span class="caption-subject">{{ \'APPLICATION_MAIN\' | translate }}</span>\n									</div>\n									<div class="actions">\n									</div>\n								</div>\n								<div class="portlet-body">\n									<form action="#" role="form" class="row">\n										<!-- START STATUS -->\n										<div class="form-group col-md-6 col-sm-6">\n											<label class="control-label">{{\'APPLICATION_DEFAULT\' | translate}}</label></br>\n											<input\n											bs-switch\n											class="form-control"\n											ng-model="settings.defaultLogo"\n											data-ng-init="settings.defaultLogo = license.custom ? settings.defaultLogo : true"\n											type="checkbox"\n											name="defaultLogo"\n											data-ng-change="update()"\n											switch-active="{{ radioSwitch.isActive }}"\n											switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n											switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n											switch-on-color="{{ radioSwitch.onColor }}"\n											switch-off-color="{{ radioSwitch.offColor }}"\n											switch-animate="{{ radioSwitch.animate }}"\n											switch-size="{{ radioSwitch.size }}"\n											switch-label="{{ radioSwitch.label }}"\n											switch-icon="{{ radioSwitch.icon }}"\n											switch-radio-off="{{ radioSwitch.radioOff }}"\n											switch-label-width="{{ radioSwitch.labelWidth }}"\n											switch-handle-width="{{ radioSwitch.handleWidth }}">\n										</div>\n										<!-- END STATUS -->\n										<div class="form-group col-md-6 col-sm-6" data-ng-if="!settings.defaultLogo && license.custom">\n											<div class="fileinput fileinput-new" data-provides="fileinput">\n												<div class="fileinput-new thumbnail">\n													<img ng-src="assets/images/media/noProfileImage.png" alt=""/>\n												</div>\n												<div class="fileinput-preview fileinput-exists thumbnail">\n												</div>\n												<div>\n													<span class="btn default btn-file" data-ng-show="!uploader.queue[0]">\n														<span> {{ \'APPLICATION_SELECT_IMAGE\' | translate }} </span>\n														<input type="file" nv-file-select="" uploader="uploader"/><br/>\n													</span>\n													<button type="button" class="btn default" data-ng-show="uploader.queue[0]" data-dismiss="fileinput" ng-click="uploader.queue[0].remove()">\n														{{ \'APPLICATION_REMOVE\' | translate }}\n													</button>\n													<button type="button" class="btn green-haze" data-ng-show="uploader.queue[0]" data-ng-click="uploader.queue[0].upload()" ng-disabled="uploader.queue[0].isReady || uploader.queue[0].isUploading || uploader.queue[0].isSuccess">\n														{{ \'APPLICATION_CONFIRM\' | translate }}\n													</button>\n												</div>\n												<p>\n													</br> {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} <b>jpg, png, jpeg</b>.\n												</p>\n											</div>\n										</div>\n									</form>\n									<div data-ng-show="uploader2.isHTML5" >\n										<div data-ng-repeat="item in uploader.queue" nowrap style="border-top-style:none">\n												<strong>{{ item.file.name }}</strong> {{ item.file.size/1024/1024|number:2 }} MB\n												<button type="button" class="btn btn-danger btn-xs" data-ng-click="item.remove()">\n													<span class="glyphicon glyphicon-trash"></span> Remove\n												</button>\n										</div>\n									</div>\n								</div>\n							</div>\n						</div>\n						<div class="col-md-6 col-sm-6">\n							<div class="portlet light bordered"  style="min-height:411px;">\n								<div class="portlet-title">\n									<div class="caption font-green-sharp">\n										<i class="icon-pie-chart font-green-sharp"></i>\n										<span class="caption-subject">{{ \'APPLICATION_LOGIN\' | translate }}</span>\n									</div>\n									<div class="actions">\n									</div>\n								</div>\n								<div class="portlet-body">\n									<form action="#" role="form" class="row">\n										<!-- START STATUS -->\n										<div class="form-group col-md-6 col-sm-6">\n											<label class="control-label">{{\'APPLICATION_DEFAULT\' | translate}}</label></br>\n											<input\n											bs-switch\n											class="form-control"\n											ng-model="settings.defaultLoginLogo"\n											data-ng-init="settings.defaultLoginLogo = license.custom ? settings.defaultLoginLogo : true"\n											type="checkbox"\n											name="defaultLoginLogo"\n											data-ng-change="update()"\n											switch-active="{{ radioSwitch.isActive }}"\n											switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n											switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n											switch-on-color="{{ radioSwitch.onColor }}"\n											switch-off-color="{{ radioSwitch.offColor }}"\n											switch-animate="{{ radioSwitch.animate }}"\n											switch-size="{{ radioSwitch.size }}"\n											switch-label="{{ radioSwitch.label }}"\n											switch-icon="{{ radioSwitch.icon }}"\n											switch-radio-off="{{ radioSwitch.radioOff }}"\n											switch-label-width="{{ radioSwitch.labelWidth }}"\n											switch-handle-width="{{ radioSwitch.handleWidth }}">\n										</div>\n										<!-- END STATUS -->\n										<div class="form-group col-md-6 col-sm-6" data-ng-if="!settings.defaultLoginLogo && license.custom">\n											<div class="fileinput fileinput-new" data-provides="fileinput">\n												<div class="fileinput-new thumbnail">\n													<img ng-src="assets/images/media/noProfileImage.png" alt=""/>\n												</div>\n												<div class="fileinput-preview fileinput-exists thumbnail">\n												</div>\n												<div>\n													<span class="btn default btn-file" data-ng-show="!uploader2.queue[0]">\n														<span> {{ \'APPLICATION_SELECT_IMAGE\' | translate }} </span>\n														<input type="file" nv-file-select="" uploader="uploader2"/><br/>\n													</span>\n													<button type="button" class="btn default" data-ng-show="uploader2.queue[0]" data-dismiss="fileinput" ng-click="uploader2.queue[0].remove()">\n														{{ \'APPLICATION_REMOVE\' | translate }}\n													</button>\n													<button type="button" class="btn green-haze" data-ng-show="uploader2.queue[0]" data-ng-click="uploader2.queue[0].upload()" ng-disabled="uploader2.queue[0].isReady || uploader2.queue[0].isUploading || uploader2.queue[0].isSuccess">\n														{{ \'APPLICATION_CONFIRM\' | translate }}\n													</button>\n												</div>\n												<p>\n													</br> {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} <b>jpg, png, jpeg</b>.\n												</p>\n											</div>\n										</div>\n									</form>\n									<div data-ng-show="uploader2.isHTML5" >\n										<div data-ng-repeat="item in uploader.queue" nowrap style="border-top-style:none">\n												<strong>{{ item.file.name }}</strong> {{ item.file.size/1024/1024|number:2 }} MB\n												<button type="button" class="btn btn-danger btn-xs" data-ng-click="item.remove()">\n													<span class="glyphicon glyphicon-trash"></span> Remove\n												</button>\n										</div>\n									</div>\n								</div>\n							</div>\n						</div>\n					</div>\n					<!-- END CHANGE LOGO TAB -->\n					<!-- CHANGE FOOTER WHITE LABEL TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.footerWhiteLabel" data-ng-submit="forms.footerWhiteLabel.$valid && update()" novalidate>\n							<!-- START DEFAULT -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DEFAULT\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="settings.defaultFooterWhiteLabel"\n								type="checkbox"\n								name="defaultFooterWhiteLabel"\n								data-ng-change="update()"\n								data-ng-init="settings.defaultFooterWhiteLabel = license.custom ? settings.defaultFooterWhiteLabel : true"\n								switch-active="{{ radioSwitch.isActive }}"\n								switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n								switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n								switch-on-color="{{ radioSwitch.onColor }}"\n								switch-off-color="{{ radioSwitch.offColor }}"\n								switch-animate="{{ radioSwitch.animate }}"\n								switch-size="{{ radioSwitch.size }}"\n								switch-label="{{ radioSwitch.label }}"\n								switch-icon="{{ radioSwitch.icon }}"\n								switch-radio-off="{{ radioSwitch.radioOff }}"\n								switch-label-width="{{ radioSwitch.labelWidth }}"\n								switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END DEFAULT -->\n							<!-- START LABEL -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.footerWhiteLabel.footerWhiteLabel.$touched || forms.footerWhiteLabel.$submitted) && forms.footerWhiteLabel.footerWhiteLabel.$invalid}">\n								<label class="control-label">{{\'APPLICATION_FOOTER_WHITE_LABEL\' | translate}}<span data-ng-if="!settings.defaultFooterWhiteLabel" class="required" aria-required="true">*</span></label>\n								<textarea name="footer" placeholder="{{\'APPLICATION_FOOTER_WHITE_LABEL\' | translate}}" class="form-control" data-ng-model="settings.footerWhiteLabel" data-ng-disabled="settings.defaultFooterWhiteLabel || !license.custom" data-ng-required="!settings.defaultFooterWhiteLabel && license.custom"/></textarea>\n								<span data-ng-show="(forms.footerWhiteLabel.footerWhiteLabel.$touched || forms.footerWhiteLabel.$submitted) && forms.footerWhiteLabel.footerWhiteLabel.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END LABEL -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}" data-ng-disabled="!license.custom"/>\n						</form>\n					</div>\n					<!-- END CHANGE FOOTER WHITE LABEL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/setting/customization/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-settings"></i>\n					<a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n				</li>\n        <li>\n          <i class="icon-globe"></i>\n          <a href="#">{{ \'APPLICATION_CUSTOMIZATION\' | translate }}</a>\n        </li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img src="assets/images/media/customize.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ \'APPLICATION_CUSTOMIZATION\' | translate }}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.setting.customization.view.general\')}">\n							<a ng-href="/setting/customization/view/general">\n							<i class="icon-picture"></i>\n							{{ \'APPLICATION_GENERAL\' | translate }} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/general/view/main/main.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_GENERAL_SETTINGS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.main" data-ng-submit="forms.main.$valid && update()" novalidate>\n					<!-- START MIN INTERNAL -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.main.min_internal.$touched || forms.main.$submitted) && forms.main.min_internal.$invalid}">\n						<label class="control-label">{{\'APPLICATION_MIN_INTERNAL\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" min="1" name="min_internal" placeholder="{{\'APPLICATION_MIN_INTERNAL\' | translate}}" class="form-control" data-ng-model="settings.min_internal" required/>\n						<span data-ng-show="(forms.main.min_internal.$touched || forms.main.$submitted) && forms.main.min_internal.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END MIN INTERNAL -->\n\n					<!-- START MIN MAILBOX  -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.main.min_mailbox.$touched || forms.main.$submitted) && forms.main.min_mailbox.$invalid}">\n						<label class="control-label">{{\'APPLICATION_MIN_MAILBOX\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" min="1" name="min_mailbox" placeholder="{{\'APPLICATION_MIN_MAILBOX\' | translate}}" class="form-control" data-ng-model="settings.min_mailbox" required/>\n						<span data-ng-show="(forms.main.min_mailbox.$touched || forms.main.$submitted) && forms.main.min_mailbox.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END MIN MAILBOX -->\n\n					<!-- START AGI PORT -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.main.agi_port.$touched || forms.main.$submitted) && forms.main.agi_port.$invalid}">\n						<label class="control-label">{{\'APPLICATION_AGI_PORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" min="1" name="agi_port" placeholder="{{\'APPLICATION_AGI_PORT\' | translate}}" class="form-control" data-ng-model="settings.agi_port" required/>\n						<span data-ng-show="(forms.main.agi_port.$touched || forms.main.$submitted) && forms.main.agi_port.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END AGI PORT -->\n\n					<!-- START SSL -->\n					<div class="form-group">\n						<label class="control-label">\n							{{\'APPLICATION_SECURE_PASSWORD\' | translate}}\n						</label><br>\n							<input\n							bs-switch\n							data-ng-model="settings.securePassword"\n							type="checkbox"\n							switch-active="{{ isActive }}"\n							switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n							switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n							switch-on-color="{{ onColor }}"\n							switch-off-color="{{ offColor }}"\n							switch-animate="{{ animate }}"\n							switch-size="{{ size }}"\n							switch-label="{{ label }}"\n							switch-icon="{{ icon }}"\n							switch-radio-off="{{ radioOff }}"\n							switch-label-width="{{ labelWidth }}"\n							switch-handle-width="{{ handleWidth }}">\n					</div>\n					<!-- END SSL -->\n\n					<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/setting/general/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-settings"></i>\n					<a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n				</li>\n        <li>\n          <i class="icon-globe"></i>\n          <a href="#">{{ \'APPLICATION_GENERAL\' | translate }}</a>\n        </li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img src="assets/images/media/customize.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ \'APPLICATION_GENERAL\' | translate }}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.setting.general.view.main\')}">\n							<a ng-href="/setting/general/view/main">\n							<i class="icon-picture"></i>\n							{{ \'APPLICATION_MAIN\' | translate }} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/license/view/update.modal.html",'<div class="modal-header" data-ng-init="getLicense()">\n  <h3 class="modal-title">{{ \'APPLICATION_UPDATE_LICENSE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START LICENSE -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_LICENSE\' | translate}}</label>\n      <textarea type="text" style="min-height:95px;" name="description" placeholder="{{\'APPLICATION_LICENSE\' | translate}}" class="form-control" data-ng-model="item.license"></textarea>\n    </div>\n    <!-- END LICENSE -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="update()" ng-disabled="form.$invalid">{{ \'APPLICATION_UPDATE\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/setting/license/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n  <div class="col-md-12">\n    <div class="page-bar">\n      <ul class="page-breadcrumb">\n        <li>\n          <i class="icon-rocket"></i>\n          <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="icon-settings"></i>\n          <a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="icon-info"></i>\n          <a href="#">{{ \'APPLICATION_LICENSE\' | translate }}</a>\n        </li>\n      </ul>\n    </div>\n\n    <!-- BEGIN PROFILE CONTENT -->\n    <div class="profile-content">\n      <div class="row" data-ng-if="(license.token !== license.token2) && license.expirationTime > -1">\n        <div class="col-md-12">\n          <div class="note note-warning">\n            <h4 class="block"><strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_YOUR_LICENSE_WILL_EXPIRE\' | translate}} <strong>{{license.expirationTime}}</strong> {{\'MESSAGE_DAYS\' | translate}}.</h4>\n            <p>\n              {{\'MESSAGE_SEND_EMAIL_TO\' | translate}} <a href="mailto:[email-masked]?subject=New%20token%20detected&body=Hi xCALLY, my new token is: {{license.token2}}. Old token: {{license.token}}">[email-masked]</a>.\n            </p>\n            <p>\n              {{\'APPLICATION_NEW\' | translate | uppercase}} Token: <strong>{{license.token2}}</strong>\n            </p>\n          </div>\n        </div>\n      </div>\n      <div class="row">\n        <div class="col-md-6">\n          <div class="pricing hover-effect">\n            <div class="pricing-head" data-ng-switch="license.months">\n              <h3 ng-switch-when="1">{{\'APPLICATION_MONTH_TO_MONTH\' | translate}}<span>{{license.token || \'unknown\'}} </span></h3>\n              <h3 ng-switch-when="12">{{\'APPLICATION_YEARLY\' | translate}}<span>{{license.token || \'unknown\'}} </span></h3>\n              <h3 ng-switch-when="36">{{\'APPLICATION_PERPETUAL\' | translate}}<span>{{license.token || \'unknown\'}} </span></h3>\n              <h3 ng-switch-default>{{\'APPLICATION_UNKNOWN\' | translate}}<span>{{license.token || \'unknown\'}} </span></h3>\n              <h4><i>{{license.expiration ? (license.expiration | date:\'medium\') : \'DEMO\'}}</i>\n                <span data-ng-show="license.expiration">Expiration Date </span>\n              </h4>\n            </div>\n            <ul class="pricing-content list-unstyled">\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-eye"></i> {{\'APPLICATION_USERS\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  {{(license.users || license.users >= 0) ? license.users : \'unknown\'}}\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-people"></i> {{\'APPLICATION_AGENTS\' | translate}} ({{\'APPLICATION_CONCURRENTS\' | translate}}):\n                </div>\n                <div class="col-md-3 text-center">\n                  {{(license.agents || license.agents >= 0)  ? license.agents : \'unknown\'}}\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-phone"></i> {{\'APPLICATION_TELEPHONES\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  {{(license.telephones || license.telephones >= 0) ? license.telephones : \'unknown\'}}\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-bubble"></i> {{\'APPLICATION_CHAT\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.chat ? \'label-success\' : \'label-danger\'">{{license.chat ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-envelope"></i> {{\'APPLICATION_MAIL\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.mail ? \'label-success\' : \'label-danger\'">{{license.mail ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="fa fa-fax"></i> {{\'APPLICATION_FAX\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.fax ? \'label-success\' : \'label-danger\'">{{license.fax ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="glyphicon glyphicon-comment"></i> {{\'APPLICATION_SMS\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.messaging ? \'label-success\' : \'label-danger\'">{{license.messaging ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-globe"></i> {{\'APPLICATION_OPEN_CHANNEL\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.openchannel ? \'label-success\' : \'label-danger\'">{{license.openchannel ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-notebook"></i> {{\'APPLICATION_CONTACT_MANAGER\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.cm ? \'label-success\' : \'label-danger\'">{{license.cm ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-control-forward"></i> {{\'APPLICATION_MOTION_DIALER\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.dialer ? \'label-success\' : \'label-danger\'">{{license.dialer ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="fa fa-edit"></i> {{\'APPLICATION_JSCRIPTY\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.jscripty ? \'label-success\' : \'label-danger\'">{{license.jscripty ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-equalizer"></i> {{\'APPLICATION_CUSTOMIZATION\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.custom ? \'label-success\' : \'label-danger\'">{{license.custom ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-cloud-download"></i> {{\'APPLICATION_UPDATE\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.update ? \'label-success\' : \'label-danger\'">{{license.update ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n            </ul>\n            <div class="pricing-footer">\n              <p>\n                {{license.description}}\n              </p>\n              <a href="https://www.xcallymotion.com/prices" target="_blank" class="btn yellow-crusta">\n                {{\'APPLICATION_PRICES\' | translate}} <i class="m-icon-swapright m-icon-white"></i>\n              </a>\n              <a href="#" class="btn purple-plum" data-ng-click="updateLicense()">\n                {{\'APPLICATION_UPDATE\' | translate}} <i class="icon-refresh m-icon-white"></i>\n              </a>\n            </div>\n          </div>\n        </div>\n        <div class="col-md-6">\n          <div class="portlet light bordered">\n            <div class="portlet-title">\n              <div class="caption font-green-sharp">\n                <i class="icon-info font-green-sharp"></i>\n                <span class="caption-subject">{{ \'APPLICATION_LICENSE_REQUEST\' | translate }}</a> </span>\n              </div>\n            </div>\n            <div class="portlet-body">\n              <form name="form" novalidate data-ng-submit="submitRequest()">\n\n                <!-- START USERS -->\n                <div class="form-group" data-ng-class="{\'has-error\': (form.users.$touched || form.$submitted) && form.users.$invalid}">\n                  <label class="control-label">{{\'APPLICATION_USERS\' | translate}}</label>\n                  <div class="input-icon">\n                    <i class="icon-eye"></i>\n                    <input type="number" name="users" placeholder="{{\'APPLICATION_USERS\' | translate}}" class="form-control" data-ng-model="item.users" min="0" required>\n                  </div>\n                  <span data-ng-show="(form.users.$touched || forms.$submitted) && form.users.$error.required" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n                <!-- END USERS -->\n\n                <!-- START AGENTS -->\n                <div class="form-group" data-ng-class="{\'has-error\': (form.agents.$touched || form.$submitted) && form.agents.$invalid}">\n                  <label class="control-label">{{\'APPLICATION_AGENTS\' | translate}} ({{\'APPLICATION_CONCURRENTS\' | translate}})</label>\n                  <div class="input-icon">\n                    <i class="icon-people"></i>\n                    <input type="number" name="agents" placeholder="{{\'APPLICATION_AGENTS\' | translate}} ({{\'APPLICATION_CONCURRENTS\' | translate}})" class="form-control" data-ng-model="item.agents" min="0" required>\n                  </div>\n                  <span data-ng-show="(form.users.$touched || forms.$submitted) && form.users.$error.required" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n                <!-- END AGENTS -->\n\n                <!-- START TELEPHONES -->\n                <div class="form-group" data-ng-class="{\'has-error\': (form.telephones.$touched || form.$submitted) && form.telephones.$invalid}">\n                  <label class="control-label">{{\'APPLICATION_TELEPHONES\' | translate}}</label>\n                  <div class="input-icon">\n                    <i class="icon-phone"></i>\n                    <input type="number" name="telephones" placeholder="{{\'APPLICATION_TELEPHONES\' | translate}}" class="form-control" data-ng-model="item.telephones" min="0" required>\n                  </div>\n                  <span data-ng-show="(form.telephones.$touched || forms.$submitted) && form.telephones.$error.required" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n                <!-- END TELEPHONES -->\n                <div class="row">\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_CHAT\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.chat"\n                    type="checkbox"\n                    name="chat"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_MAIL\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.mail"\n                    type="checkbox"\n                    name="mail"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_FAX\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.fax"\n                    type="checkbox"\n                    name="fax"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_SMS\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.messaging"\n                    type="checkbox"\n                    name="messaging"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_OPEN_CHANNEL\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.openchannel"\n                    type="checkbox"\n                    name="openchannel"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_CONTACT_MANAGER\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.cm"\n                    type="checkbox"\n                    name="cm"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_MOTION_DIALER\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.dialer"\n                    type="checkbox"\n                    name="dialer"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_JSCRIPTY\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.jscripty"\n                    type="checkbox"\n                    name="jscripty"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_CUSTOMIZATION\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.custom"\n                    type="checkbox"\n                    name="custom"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_UPDATE\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.update"\n                    type="checkbox"\n                    name="update"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                </div>\n\n                <input class="btn green-haze" type="submit" value="{{\'APPLICATION_SUBMIT\' | translate}} {{\'APPLICATION_REQUEST\' | translate}}"/>\n              </form>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n    <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/setting/network/view/externip/externip.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{title}}</h3>\n</div>\n<div class="modal-body" data-ng-init="initModal()">\n  <form name="form" novalidate>\n\n    <!-- START ADDRESS -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.address.$touched || form.$submitted) && form.address.$invalid}">\n      <label class="control-label">{{\'APPLICATION_ADDRESS\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="address" placeholder="{{\'APPLICATION_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.value" required data-ng-pattern="/^(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})(.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}$/"/>\n      <span data-ng-show="(form.address.$touched || form.$submitted) && form.address.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.address.$touched || form.$submitted) && form.address.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n      </span>\n    </div>\n    <!-- END ADDRESS -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/setting/network/view/externip/externip.html",'<!-- BEGIN PAGE CONTENT-->\r\n<div class="row">\r\n	<div class="col-md-12">\r\n		<!-- BEGIN Portlet PORTLET-->\r\n		<div class="portlet light bordered" data-ng-init="initView()">\r\n			<div class="portlet-title">\r\n				<div class="caption font-green-sharp">\r\n					<i class="icon-globe font-green-sharp"></i>\r\n					<span class="caption-subject">{{ \'APPLICATION_EXTERNIP\' | translate }}</a> </span>\r\n				</div>\r\n				<div class="actions">\r\n					<div class="btn-group" data-ng-show="id.length">\r\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\r\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\r\n						</a>\r\n					</div>\r\n					<div class="btn-group">\r\n						<a class="btn green-jungle" href="#" data-toggle="dropdown" data-ng-click="createItem()">\r\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_EXTERNIP\' | translate }}\r\n						</a>\r\n					</div>\r\n				</div>\r\n			</div>\r\n			<div class="portlet-body">\r\n				<!-- START TABLE -->\r\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\r\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\r\n				</div>\r\n				<!-- END TABLE -->\r\n			</div>\r\n		</div>\r\n		<!-- END Portlet PORTLET-->\r\n	</div>\r\n</div>\r\n<!-- END PAGE CONTENT-->\r\n'),a.put("app/setting/network/view/localnet/localnet.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{title}}</h3>\n</div>\n<div class="modal-body" data-ng-init="initModal()">\n  <form name="form" novalidate>\n\n    <!-- START ADDRESS -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.address.$touched || form.$submitted) && form.address.$invalid}">\n      <label class="control-label">{{\'APPLICATION_ADDRESS\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="address" placeholder="{{\'APPLICATION_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.address" required data-ng-pattern="/^(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})(.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}$/"/>\n      <span data-ng-show="(form.address.$touched || form.$submitted) && form.address.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.address.$touched || form.$submitted) && form.address.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n      </span>\n    </div>\n    <!-- END ADDRESS -->\n\n    <!-- START MASK -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.mask.$touched || form.$submitted) && form.mask.$invalid}">\n      <label class="control-label">{{\'APPLICATION_MASK\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="mask" placeholder="{{\'APPLICATION_MASK\' | translate}}" class="form-control" data-ng-model="item.mask" required data-ng-pattern="/^(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})(.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}$/"/>\n      <span data-ng-show="(form.mask.$touched || form.$submitted) && form.mask.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.mask.$touched || form.$submitted) && form.mask.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n      </span>\n    </div>\n    <!-- END MASK -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/setting/network/view/localnet/localnet.html",'<!-- BEGIN PAGE CONTENT-->\r\n<div class="row">\r\n	<div class="col-md-12">\r\n		<!-- BEGIN Portlet PORTLET-->\r\n		<div class="portlet light bordered" data-ng-init="initView()">\r\n			<div class="portlet-title">\r\n				<div class="caption font-green-sharp">\r\n					<i class="icon-desktop font-green-sharp"></i>\r\n					<span class="caption-subject">{{ \'APPLICATION_LOCALNET\' | translate }}</a> </span>\r\n				</div>\r\n				<div class="actions">\r\n					<div class="btn-group" data-ng-show="id.length">\r\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\r\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\r\n						</a>\r\n					</div>\r\n					<div class="btn-group">\r\n						<a class="btn green-jungle" href="#" data-toggle="dropdown" data-ng-click="createItem()">\r\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_LOCALNET\' | translate }}\r\n						</a>\r\n					</div>\r\n				</div>\r\n			</div>\r\n			<div class="portlet-body">\r\n				<!-- START TABLE -->\r\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\r\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\r\n				</div>\r\n				<!-- END TABLE -->\r\n			</div>\r\n		</div>\r\n		<!-- END Portlet PORTLET-->\r\n	</div>\r\n</div>\r\n<!-- END PAGE CONTENT-->\r\n'),a.put("app/setting/network/view/view.html",'<!-- BEGIN PAGE CONTENT-->\r\n<div class="row">\r\n	<div class="col-md-12">\r\n		<div class="page-bar">\r\n			<ul class="page-breadcrumb">\r\n				<li>\r\n					<i class="icon-rocket"></i>\r\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\r\n					<i class="fa fa-angle-right"></i>\r\n				</li>\r\n				<li>\r\n					<i class="icon-settings"></i>\r\n					<a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\r\n          <i class="fa fa-angle-right"></i>\r\n				</li>\r\n        <li>\r\n          <i class="icon-globe"></i>\r\n          <a href="#">{{ \'APPLICATION_NETWORK\' | translate }}</a>\r\n        </li>\r\n			</ul>\r\n		</div>\r\n\r\n		<!-- BEGIN PROFILE SIDEBAR -->\r\n		<div class="profile-sidebar">\r\n			<!-- PORTLET MAIN -->\r\n			<div class="portlet light profile-sidebar-portlet">\r\n				<!-- SIDEBAR USERPIC -->\r\n				<div class="profile-image">\r\n					<img src="assets/images/media/business.png" class="img-responsive">\r\n				</div>\r\n				<!-- END SIDEBAR USERPIC -->\r\n				<!-- SIDEBAR USER TITLE -->\r\n				<div class="profile-usertitle">\r\n					<div class="profile-usertitle-name">\r\n						{{ \'APPLICATION_NETWORK\' | translate }}\r\n					</div>\r\n				</div>\r\n				<!-- END SIDEBAR USER TITLE -->\r\n				<!-- SIDEBAR MENU -->\r\n				<div class="profile-usermenu">\r\n					<ul class="nav">\r\n						<li data-ng-class="{active: $state.is(\'main.setting.network.view.localnet\')}">\r\n							<a ng-href="/setting/network/view/localnet">\r\n							<i class="icon-screen-desktop"></i>\r\n							{{ \'APPLICATION_LOCALNET\' | translate }} </a>\r\n						</li>\r\n						<li data-ng-class="{active: $state.is(\'main.setting.network.view.externip\')}">\r\n							<a ng-href="/setting/network/view/externip">\r\n							<i class="icon-globe"></i>\r\n							{{ \'APPLICATION_EXTERNIP\' | translate }} </a>\r\n						</li>\r\n					</ul>\r\n				</div>\r\n				<!-- END MENU -->\r\n			</div>\r\n			<!-- END PORTLET MAIN -->\r\n		</div>\r\n		<!-- END BEGIN PROFILE SIDEBAR -->\r\n		<!-- BEGIN PROFILE CONTENT -->\r\n		<div ui-view class="profile-content">\r\n		</div>\r\n		<!-- END PROFILE CONTENT -->\r\n\r\n	</div>\r\n</div>\r\n<!-- END PAGE CONTENT-->\r\n'),a.put("app/setting/smtp/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">SMTP</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body" data-ng-init="initView();initMailAccounts();">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="mail-spinner-grid" spinner-start-active="false"></span>\n				<!-- END UI-GRID SPINNER -->\n\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItem()" novalidate>\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.account.name" required/>\n								<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid && forms.info.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<!-- START SERVICE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_SERVICE\' | translate}}</label><br>\n								<input\n								bs-switch\n								data-ng-model="item.account.service"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END SERVICE -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n					<!-- SMTP TAB -->\n					<div class="tab-pane" id="tab_1_2">\n\n						<div class="note note-danger" data-ng-show="item.account.MailServerOut.state === \'DISCONNECTED\' || item.account.MailServerOut.state === \'ERROR\'">\n							<p> ERROR </p>\n							<json-formatter open="1" json="item.account.MailServerOut.source"></json-formatter>\n						</div>\n\n						<div class="note note-success" data-ng-show="item.account.MailServerOut.state === \'CONNECTED\'">\n							<p> CONNECTED </p>\n						</div>\n\n						<div class="note note-info" data-ng-show="item.account.MailServerOut.state === \'CONNECTING\'">\n							<p> TRYING... </p>\n						</div>\n\n						<form name="forms.formOut" data-ng-submit="forms.formOut.$valid && updateItem()" novalidate>\n\n							<!-- START HOST -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formOut.host.$touched || forms.formOut.$submitted) && forms.formOut.host.$invalid}">\n								<label class="control-label">{{\'APPLICATION_HOST\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="item.account.MailServerOut.host" required/>\n								<span data-ng-show="(forms.formOut.host.$touched || forms.formOut.$submitted) && forms.formOut.host.$invalid && forms.formOut.host.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END HOST -->\n\n							<!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formOut.username.$touched || forms.formOut.$submitted) && forms.formOut.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.account.MailServerOut.username" required/>\n								<span data-ng-show="(forms.formOut.username.$touched || forms.formOut.$submitted) && forms.formOut.username.$invalid && forms.formOut.username.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formOut.password.$touched || forms.formOut.$submitted) && forms.formOut.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.account.MailServerOut.password" required/>\n								<span data-ng-show="(forms.formOut.password.$touched || forms.formOut.$submitted) && forms.formOut.password.$invalid && forms.formOut.password.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n							<!-- START PORT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formOut.port.$touched || forms.formOut.$submitted) && forms.formOut.port.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" name="port" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="item.account.MailServerOut.port" required/>\n								<span data-ng-show="(forms.formOut.form.$touched || forms.formOut.$submitted) && forms.formOut.port.$invalid && forms.formOut.port.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formOut.form.$touched || forms.formOut.$submitted) && forms.formOut.port.$invalid && forms.formOut.port.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PORT -->\n\n							<!-- START SSL -->\n							<div class="form-group">\n								<label class="control-label">SSL</label><br>\n								<input\n								bs-switch\n								data-ng-model="item.account.MailServerOut.ssl"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END SSL -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n							<input class="btn blue-madison" type="button" value="Test" data-ng-click="test()"/>\n						</form>\n					</div>\n					<!-- END SMTP TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/setting/system/view/console/console.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()" data-ng-click="cmdFocus()">\n	<div class="portlet light">\n		<div class="portlet-title tabbable-line">\n			<div class="caption caption-md">\n				<i class="icon-globe theme-font hide"></i>\n				<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_ASTERISK_CONSOLE\' | translate}}\n					<button class="btn btn-default" href="#" data-ng-click="output = \'\';cmdFocus();">\n						<i class="icon-ban"></i>\n					</button></span>\n				</div>\n		</div>\n		<div class="portlet-body">\n					<span us-spinner spinner-key="console-spinner" spinner-start-active="true"></span>\n					<div class="well" style="height:400px;overflow-y:scroll;" schroll-bottom="output" data-ng-bind-html="output"></div>\n					<form name="forms.console" data-ng-submit="forms.console.$valid && sendCmd() && !busy" novalidate>\n					<!-- START COMMAND -->\n					<div class="form-group">\n						<input type="text" name="command" id="command" placeholder="{{\'APPLICATION_INSERT_COMMAND\' | translate}}" class="form-control" data-ng-model="item.command" data-ng-disabled="busy" autocomplete="off" data-ng-keyup="keyUp($event)"/>\n					</div>\n					<span class="help-block">\n						{{ \'DESCRIPTION_ENTER_TO_COMMAND\' | translate }}\n					</span>\n					<button type="submit" class="hide"></button>\n					<!-- END COMMAND -->\n				</form>\n		</div>\n	</div>\n</div>\n'),a.put("app/setting/system/view/general/general.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="row ">\n				<div class="col-md-6 col-sm-6">\n					<div class="portlet light bordered">\n						<div class="portlet-title">\n							<div class="caption font-green-sharp">\n								<i class="icon-pie-chart font-green-sharp"></i>\n								<span class="caption-subject">{{ \'APPLICATION_MEMORY\' | translate }} (<b>{{ \'APPLICATION_TOTAL\' | translate }}</b>: {{system.memory.Total}} MB)</a> </span>\n							</div>\n							<div class="actions">\n								<a class="btn btn-default" href="#" data-ng-click="initView()">\n									<i class="icon-refresh"></i>\n								</a>\n							</div>\n						</div>\n						<div class="portlet-body">\n							<!-- BEGIN UI-GRID SPINNER -->\n							<span us-spinner spinner-key="memory-spinner" spinner-start-active="true"></span>\n							<!-- END UI-GRID SPINNER -->\n							<canvas  class="chart chart-pie"  chart-data="system.memory.values" chart-labels="system.memory.labels" chart-legend="true">\n							</canvas>\n						</div>\n					</div>\n				</div>\n				<div class="col-md-6 col-sm-6">\n					<div class="portlet light bordered">\n						<div class="portlet-title">\n							<div class="caption font-green-sharp">\n								<i class="icon-pie-chart font-green-sharp"></i>\n								<span class="caption-subject">{{ \'APPLICATION_DISK\' | translate }} (<b>{{ \'APPLICATION_TOTAL\' | translate }}</b>: {{system.mount.size}} GB)</a> </span>\n							</div>\n							<div class="actions">\n								<div class="portlet-input input-inline input-medium">\n									<div class="input-group">\n										<ui-select data-ng-model="system.mount" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_DISK\' | translate}}">{{$select.selected.mount}}</ui-select-match>\n											<ui-select-choices repeat="disk in system.disks | filter: $select.search">\n												<div ng-bind-html="disk.mount | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-btn">\n											<button class="btn btn-default" href="#" data-ng-click="initView()">\n												<i class="icon-refresh"></i>\n											</button>\n										</span>\n									</div>\n								</div>\n							</div>\n						</div>\n						<div class="portlet-body">\n							<!-- BEGIN UI-GRID SPINNER -->\n							<span us-spinner spinner-key="disk-spinner" spinner-start-active="true"></span>\n							<!-- END UI-GRID SPINNER -->\n							<canvas  class="chart chart-pie"  chart-data="system.mount.values" chart-labels="system.mount.labels" chart-legend="true">\n							</canvas>\n							<!-- END Portlet PORTLET-->\n						</div>\n					</div>\n				</div>\n			</div>\n			<div class="portlet light bordered">\n				<div class="portlet-title">\n					<div class="caption font-green-sharp">\n						<i class="icon-pie-chart font-green-sharp"></i>\n						<span class="caption-subject">CPU (<b>{{ \'APPLICATION_NUMBER_OF_CORES\' | translate }}</b>: {{system.cpu.cores.length}}, <b>MOTION</b>: {{system.cpu.motion}} % )</a> </span>\n					</div>\n					<div class="actions">\n						<a class="btn btn-default" href="#" data-ng-click="initView()">\n							<i class="icon-refresh"></i>\n						</a>\n					</div>\n				</div>\n				<div class="portlet-body">\n					<div class="row">\n						<div class="col-md-2 col-sm-4" data-ng-repeat="cpu in system.cpu.cores">\n							<!-- BEGIN UI-GRID SPINNER -->\n							<span us-spinner spinner-key="cpu-spinner" spinner-start-active="false"></span>\n							<!-- END UI-GRID SPINNER -->\n							<canvas  class="chart chart-doughnut"  chart-data="cpu.values" chart-labels="cpu.labels" chart-colours="cpu.colours" chart-legend="true">\n							</canvas>\n						</div>\n					</div>\n					<!-- END Portlet PORTLET-->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/setting/system/view/logs/logs.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="portlet light">\n		<div class="portlet-title tabbable-line">\n			<div class="caption caption-md">\n				<i class="icon-globe theme-font hide"></i>\n				<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_LOGS\' | translate}}\n					<button class="btn btn-default" href="#" data-ng-click="initView()">\n						<i class="icon-refresh"></i>\n					</button></span>\n				</div>\n			<ul class="nav nav-tabs">\n				<li class="active">\n					<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_OUTPUT\' | translate}}</a>\n				</li>\n				<li>\n					<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_ERRORS\' | translate}}</a>\n				</li>\n			</ul>\n		</div>\n		<div class="portlet-body">\n			<div class="tab-content">\n				<!-- CHANGE LOGO TAB -->\n				<div class="tab-pane active" id="tab_1_1">\n					<pre style="height:700px;overflow-y:scroll;" schroll-bottom="logs.output">\n						<!-- BEGIN UI-GRID SPINNER -->\n						<span us-spinner spinner-key="logs-spinner" spinner-start-active="true"></span>\n						<!-- END UI-GRID SPINNER -->\n						{{logs.output}}\n					</pre>\n				</div>\n				<div class="tab-pane" id="tab_1_2">\n					<pre style="height:700px;overflow-y:scroll;" schroll-bottom="logs.errors">\n						<!-- BEGIN UI-GRID SPINNER -->\n						<span us-spinner spinner-key="logs-spinner" spinner-start-active="true"></span>\n						<!-- END UI-GRID SPINNER -->\n						{{logs.errors}}\n					</pre>\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/setting/system/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-settings"></i>\n					<a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n				</li>\n        <li>\n          <i class="icon-pie-chart"></i>\n          <a href="#">{{ \'APPLICATION_SYSTEM\' | translate }}</a>\n        </li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img src="assets/images/media/customize.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ \'APPLICATION_SYSTEM\' | translate }}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.setting.system.view.general\')}">\n							<a ng-href="/setting/system/view/general">\n								<i class="icon-pie-chart"></i>\n								{{ \'APPLICATION_GENERAL\' | translate }} </a>\n							</li>\n							<li data-ng-class="{active: $state.is(\'main.setting.system.view.logs\')}">\n								<a ng-href="/setting/system/view/logs">\n									<i class="icon-list"></i>\n									{{ \'APPLICATION_LOGS\' | translate }} </a>\n							</li>\n							<li data-ng-class="{active: $state.is(\'main.setting.system.view.console\')}">\n								<a ng-href="/setting/system/view/console">\n									<i class="icon-chemistry"></i>\n									{{ \'APPLICATION_ASTERISK_CONSOLE\' | translate }} </a>\n								</li>\n						</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/update/list/landing.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n    <div class="page-bar">\n      <ul class="page-breadcrumb">\n        <li>\n          <i class="icon-rocket"></i>\n          <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="icon-settings"></i>\n          <a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="icon-cloud-download"></i>\n          <a href="#">{{ \'APPLICATION_UPDATES\' | translate }}</a>\n        </li>\n      </ul>\n    </div>\n    <!-- BEGIN PAGE CONTENT--> \n    <div class="row" data-ng-init="initCounter()">\n      <div class="col-md-12 page-500">\n        <div class="number">\n          <timer interval="1000" countdown="120">{{countdown}}</timer>\n        </div>\n        <div class="details">\n          <h3>Wait! We need to restart xCALLY Motion server.</h3>\n          <p>\n            We are updating it!<br/>\n            xCALLY Motion Team<br/><br/>\n          </p>\n        </div>\n      </div>\n    </div>\n    <!-- END PAGE CONTENT-->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/update/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-settings"></i>\n					<a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-cloud-download"></i>\n					<a href="#">{{ \'APPLICATION_UPDATES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<!-- <div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-cloud-download font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_UPDATES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<a class="btn btn-default" href="#" data-ng-click="pull()">\n						<i class="icon-cloud-download"></i> {{ \'APPLICATION_UPDATE\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()"> -->\n				<!-- START TABLE -->\n				<!-- <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div> -->\n				<!-- END TABLE -->\n			<!-- </div> -->\n			<!-- END Portlet PORTLET-->\n		<!-- </div> -->\n		<div class="row">\n			<div class="col-md-12">\n				<!-- BEGIN INLINE NOTIFICATIONS PORTLET-->\n				<div class="portlet">\n					<div class="portlet-title">\n						<div class="caption">\n							<i class="icon-cloud-download font-green-sharp"></i>{{ \'APPLICATION_UPDATE\' | translate }}\n						</div>\n						<div class="actions">\n							<button class="btn btn-default" href="#" data-ng-click="pull()">\n								<i class="icon-cloud-download"></i> {{ \'APPLICATION_UPDATE\' | translate }}\n							</button>\n						</div>\n					</div>\n					<div class="portlet-body" data-ng-init="initView()">\n						<div class="row margin-bottom-40">\n							<!-- Pricing -->\n							<div class="col-md-6">\n								<div class="pricing hover-effect current-version">\n									<div class="pricing-head">\n										<h3>{{ \'APPLICATION_CURRENT_VERSION\' | translate }} <span>\n										{{ \'APPLICATION_LAST_PERFORMED_UPDATE\' | translate }} </span>\n										</h3>\n										<h4>v. {{currentVersion.version}}</h4>\n									</div>\n									<ul class="pricing-content list-unstyled">\n										<li>\n											<i class="icon-clock"></i><b> {{\'APPLICATION_RELEASED_AT\' | translate}}:</b> {{currentVersion.createdAt}}\n										</li>\n										<li>\n											<i class="icon-list"></i> <a href="https://wiki.xcallymotion.com/display/XMD/Motion+GUI#MotionGUI-Version{{currentVersion.version}}">{{\'APPLICATION_CHANGELOG\' | translate}}</a>\n										</li>\n									</ul>\n									<div class="pricing-footer">\n									</div>\n								</div>\n							</div>\n							<div class="col-md-6">\n								<div class="pricing hover-effect" data-ng-class="{\'disabled-update\':currentVersion.version==latestVersion.version}">\n									<div class="pricing-head">\n										<h3>{{ \'APPLICATION_LATEST_VERSION\' | translate }} <span>\n										{{ \'APPLICATION_LAST_SOFTWARE_UPDATE_AVAILABLE\' | translate }} </span>\n										</h3>\n										<h4>v. {{latestVersion.version}}</h4>\n									</div>\n									<ul class="pricing-content list-unstyled">\n										<li>\n											<i class="icon-clock"></i><b> {{\'APPLICATION_RELEASED_AT\' | translate}}:</b> {{latestVersion.createdAt}}\n										</li>\n										<li>\n											<i class="icon-list"></i> <a href="https://wiki.xcallymotion.com/display/XMD/Motion+GUI#MotionGUI-Version{{latestVersion.version}}">{{\'APPLICATION_CHANGELOG\' | translate}}</a>\n										</li>\n									</ul>\n									<div class="pricing-footer">\n									</div>\n								</div>\n							</div>\n							<!--//End Pricing -->\n						</div>\n					</div>\n				</div>\n				<!-- END INLINE NOTIFICATIONS PORTLET-->\n			</div>\n		</div>\n\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/setting/update/list/list.pull.html",'<div class="modal-header">\n  <button data-ng-if="modal.dismissable" type="button" data-ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p data-ng-if="modal.text" data-ng-bind="modal.text"></p>\n  <div data-ng-if="modal.html" data-ng-bind-html="modal.html"></div>\n</div>\n<div class="modal-footer">\n  <button data-ng-repeat="button in modal.buttons" data-ng-class="button.classes" data-ng-click="button.click($event)" data-ng-bind="button.text" class="btn"></button>\n</div>\n'),a.put("app/square/odbc/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PROJECT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DSN -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.dsn.$touched || form.$submitted) && form.dsn.$invalid}">\n      <label class="control-label">{{\'APPLICATION_ODBC\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="dsn" placeholder="DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion" class="form-control" data-ng-model="item.dsn" required/>\n      <p class="help-block">Es. DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion</p>\n      <span data-ng-show="(form.dsn.$touched || form.$submitted) && form.dsn.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END DSN -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/square/odbc/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-superscript"></i>\n					<a>Cally &#178;</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="#">{{ \'APPLICATION_ODBCS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ODBCS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ODBC\' | translate }}\n						</button>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/square/odbc/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getOdbc()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-superscript"></i>\n					<a>Cally &#178;</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/square/odbc/list">{{ \'APPLICATION_ODBCS\' | translate }}</a>\n					<i data-ng-show="odbc" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="odbc">\n					<a href="#">{{odbc.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/odbc.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{odbc.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.square.odbc.view.settings\')}">\n							<a data-ng-href="/square/odbc/view/{{odbc.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/square/odbc/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_ODBC\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateOdbc()" novalidate>\n\n							<!-- START NAME -->\n				      <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n				        <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n				        <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="odbc.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				        </span>\n				      </div>\n				      <!-- END NAME -->\n\n							<!-- START DSN -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.odbc.dsn.$touched || forms.odbc.$submitted) && forms.odbc.dsn.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ODBC\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="dsn" placeholder="{{\'APPLICATION_DSN\' | translate}}" class="form-control" data-ng-model="odbc.dsn" required/>\n								<p class="help-block">Es. DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion</p>\n					      <span data-ng-show="(forms.odbc.dsn.$touched || forms.odbc.$submitted) && forms.odbc.dsn.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END DSN -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="odbc.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/square/project/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PROJECT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/square/project/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-superscript"></i>\n					<a>Cally &#178;</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n        <li>\n          <i class="fa fa-slack"></i>\n          <a href="#">{{ \'APPLICATION_PROJECTS\' | translate }}</a>\n        </li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_PROJECTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_PROJECT\' | translate }}\n						</button>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/square/project/view/projectNotes.modal.html",'<div class="yellow-notes">\n<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 class="modal-title">{{\'APPLICATION_NOTES\' | translate}}</h4>\n</div>\n<div class="modal-body" style="text-align:center;">\n<textarea name="name" class="notes-textarea" placeholder="{{\'MESSAGE_INSERT_YOUR_TEXT_HERE\' | translate}}" data-ng-model="notes.value"></textarea>\n</div>\n<div class="modal-footer" >\n  <button class="btn green-haze" type="button" ng-click="close()">{{ \'APPLICATION_SAVE\' | translate }}</button>\n</div>\n</div>\n'),a.put("app/square/project/view/view.html",'<div class="row" data-ng-init="getProject()">\n	<div class="col-md-12">\n		<div class="page-bar" style="margin-bottom: 0px;">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-superscript"></i>\n					<a>Cally &#178;</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-slack"></i>\n					<a href="/square/projects/list">{{ \'APPLICATION_PROJECTS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a ng-href="/square/projects/view/{{squareProject.id}}">{{squareProject.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<h4 class="text-success bold"> {{squareProject.name}} <button class="btn btn-xs yellow-saffron" type="button" data-ng-click="editNotes()"><i class="icon-note"></i> {{\'APPLICATION_NOTES\' | translate}}</button></h4> <p class="text-muted"> {{squareProject.description}} </p>\n\n		<div id="geEditor" class="geEditor"></div>\n	</div>\n</div>\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n\n	</div>\n</div>\n\n<!-- END PAGE CONTENT-->\n<script></script>\n'),a.put("app/square/realtime/view/general/general.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="init()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-pagination ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/square/realtime/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-superscript"></i>\n					<a href="#">Cally &#178;</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-energy"></i>\n					<a href="/square/realtime/view/general">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<div>\n		    <nav class="navbar navbar-default" role="navigation">\n					<div class="collapse navbar-collapse">\n						<ul class="nav navbar-nav">\n							<li data-ng-class="{\'active\': $state.is(\'main.square.realtime.view.general\')}">\n								<a href="/square/realtime/view/general">\n									{{\'APPLICATION_GENERAL\' | translate}}\n								</a>\n							</li>\n						</ul>\n					</div>\n		    </nav>\n		</div>\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/square/recording/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-superscript"></i>\n					<a href="#">Cally &#178;</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-microphone"></i>\n					<a href="#">{{ \'APPLICATION_RECORDINGS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="fa fa-play font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_RECORDINGS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-puzzle"></i>\n					<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-people"></i>\n					<a href="#">{{ \'APPLICATION_AGENTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-people font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_AGENTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group" data-ng-show="Auth.getCurrentUser().role === \'admin\'">\n						<button type="button" class="btn green-jungle" data-toggle="dropdown" data-hover="dropdown" data-delay="1000" data-close-others="true" aria-expanded="true">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_AGENT\' | translate }} <i class="fa fa-angle-down"></i>\n						</button>\n						<ul class="dropdown-menu" role="menu">\n							<li>\n								<a href="/staff/agents/wizard">\n									Standard\n								</a>\n							</li>\n							<li>\n								<a href="/staff/agents/bulk">\n									{{ \'APPLICATION_BULK\' | translate }}\n								</a>\n							</li>\n						</ul>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/view/view.account.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_ACCOUNT\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li data-ng-class="{\'active\': Auth.isAdmin() || userModules[4]}" data-ng-show="Auth.isAdmin() || userModules[4]">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_PERSONAL_INFO\' | translate}}</a>\n					</li>\n					<li data-ng-show="Auth.isAdmin() || userModules[4]">\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_CHANGE_AVATAR\' | translate}}</a>\n					</li>\n					<li data-ng-show="Auth.isAdmin() || userModules[4] || agent.id === Auth.getCurrentUser().id" data-ng-class="{\'active\': !Auth.isAdmin() && agent.id === Auth.getCurrentUser().id}">\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_CHANGE_PASSWORD\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- PERSONAL INFO TAB -->\n					<div class="tab-pane" data-ng-class="{\'active\': Auth.isAdmin() || userModules[4]}" data-ng-show="Auth.isAdmin() || userModules[4]" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItem()" novalidate>\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n								<label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="agent.fullname" required/>\n								<span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}</label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="agent.name" disabled/>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START EMAIL -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$invalid}">\n								<label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="agent.email" required/>\n								<span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.email" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n								</span>\n							</div>\n							<!-- END EMAIL -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="agent.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<!-- START LOGIN IN PAUSE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_LOGIN_IN_PAUSE\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="agent.loginInPause"\n								type="checkbox"\n								name="auth"\n								switch-active="{{ recordSwitch.isActive }}"\n								switch-on-text="{{ recordSwitch.onText }}"\n								switch-off-text="{{ recordSwitch.offText }}"\n								switch-on-color="{{ recordSwitch.onColor }}"\n								switch-off-color="{{ recordSwitch.offColor }}"\n								switch-animate="{{ recordSwitch.animate }}"\n								switch-size="{{ recordSwitch.size }}"\n								switch-label="{{ recordSwitch.label }}"\n								switch-icon="{{ recordSwitch.icon }}"\n								switch-radio-off="{{ recordSwitch.radioOff }}"\n								switch-label-width="{{ recordSwitch.labelWidth }}"\n								switch-handle-width="{{ recordSwitch.handleWidth }}">\n							</div>\n							<!-- END LOGIN IN PAUSE -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END PERSONAL INFO TAB -->\n					<!-- CHANGE AVATAR TAB -->\n					<div class="tab-pane" data-ng-show="Auth.isAdmin() || userModules[4]" id="tab_1_2">\n						<form action="#" role="form">\n							<div class="form-group">\n								<div class="fileinput fileinput-new" data-provides="fileinput">\n									<div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">\n										<img ng-src="assets/images/media/noProfileImage.png" alt=""/>\n									</div>\n									<div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;">\n									</div>\n									<div>\n										<span class="btn default btn-file" data-ng-show="!uploader.queue[0]">\n											<span> {{ \'APPLICATION_SELECT_IMAGE\' | translate }} </span>\n											<input type="file" nv-file-select="" uploader="uploader" /><br/>\n										</span>\n										<button type="button" class="btn default" data-ng-show="uploader.queue[0]" data-dismiss="fileinput" ng-click="uploader.queue[0].remove()">\n											{{ \'APPLICATION_REMOVE\' | translate }}\n										</button>\n										<button type="button" class="btn green-haze" data-ng-show="uploader.queue[0]" data-ng-click="uploader.queue[0].upload()" ng-disabled="uploader.queue[0].isReady || uploader.queue[0].isUploading || uploader.queue[0].isSuccess">\n											{{ \'APPLICATION_CONFIRM\' | translate }}\n										</button>\n									</div>\n									<p>\n										</br> {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} <b>jpg, png, jpeg</b>.\n									</p>\n								</div>\n							</div>\n						</form>\n						<div class="row">\n							<div class="col-md-2">\n								<table class="table" border="0">\n									<tbody>\n									<tr data-ng-repeat="item in uploader.queue">\n											<td style="border-top-style:none">\n												<strong>\n													{{ item.file.name }}\n												</strong>\n											</td>\n											<td data-ng-show="uploader.isHTML5" nowrap style="border-top-style:none">\n												{{ item.file.size/1024/1024|number:2 }} MB\n											</td>\n											<td nowrap style="border-top-style:none">\n												<button type="button" class="btn btn-danger btn-xs" data-ng-click="item.remove()">\n														<span class="glyphicon glyphicon-trash"></span> Remove\n												</button>\n											</td>\n										</tr>\n									</tbody>\n								</table>\n							</div>\n						</div>\n					</div>\n					<!-- END CHANGE AVATAR TAB -->\n					<!-- CHANGE PASSWORD TAB -->\n					<div class="tab-pane" data-ng-show="Auth.isAdmin() || userModules[4] || agent.id === Auth.getCurrentUser().id" data-ng-class="{\'active\': !Auth.isAdmin() && agent.id === Auth.getCurrentUser().id}" id="tab_1_3">\n						<form name="forms.changePwd" data-ng-submit="forms.changePwd.$valid && updatePassword()" novalidate>\n							<!-- START CURRENT PWD -->\n							<div class="form-group" data-ng-if="!(Auth.isAdmin() || userModules[4])" data-ng-class="{\'has-error\': (forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="current_pwd" placeholder="{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}" class="form-control" data-ng-model="agent.currentPwd" required/>\n								<span data-ng-show="(forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CURRENT PWD -->\n							<!-- START NEW PWD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="new_pwd" placeholder="{{\'APPLICATION_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="agent.newPwd" data-ng-pattern="setting.securePassword ? settings.patternPassword : settings.patternPasswordLight" required/>\n								<span class="help-block">\n									{{setting.securePassword ? \'MESSAGE_PASSWORD_FORMAT\' : \'MESSAGE_PASSWORD_LIGTH_FORMAT\' | translate}}\n								</span>\n								<span data-ng-show="(forms.changePwd.current_pwd.$touched || forms.info.$submitted) && forms.changePwd.current_pwd.$error.pattern" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NEW PWD -->\n							<!-- START RE-NEW PWD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.re_new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.re_new_pwd.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="re_new_pwd" placeholder="{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="agent.reNewPwd" nx-equal="agent.newPwd" required/>\n								<span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END RE-NEW PWD -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CHANGE PASSWORD TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
-a.put("app/staff/agent/view/view.chat.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_CHAT\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body">\n				<!-- START CHAT TAB -->\n				<form name="form" data-ng-submit="patchItem()" novalidate>\n					<!-- START CAPACITY -->\n					<div class="form-group" data-ng-class="{\'has-error\': (form.capacity.$touched || form.$submitted) && form.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_CAPACITY\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" name="chatCapacity" placeholder="{{\'APPLICATION_CAPACITY\' | translate}}" class="form-control" data-ng-model="agent.chatCapacity" min="0" required/>\n						<span class="help-block">\n							{{\'MESSAGE_ZERO_MEANS_UNLIMITED\' | translate}}\n						</span>\n						<span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END CAPACITY -->\n					<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n				<!-- END CHAT TAB -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/staff/agent/view/view.fax.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_FAX\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body">\n				<!-- START CHAT TAB -->\n				<form name="form" data-ng-submit="patchItem()" novalidate>\n					<!-- START CAPACITY -->\n					<div class="form-group" data-ng-class="{\'has-error\': (form.capacity.$touched || form.$submitted) && form.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_CAPACITY\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" name="faxCapacity" placeholder="{{\'APPLICATION_CAPACITY\' | translate}}" class="form-control" data-ng-model="agent.faxCapacity" min="0" required/>\n						<span class="help-block">\n							{{\'MESSAGE_ZERO_MEANS_UNLIMITED\' | translate}}\n						</span>\n						<span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END CAPACITY -->\n					<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n				<!-- END CHAT TAB -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/staff/agent/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-puzzle"></i>\n					<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-people"></i>\n					<a href="/staff/agents/list">{{ \'APPLICATION_AGENTS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{agent.fullname}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-userpic">\n					<img ng-src="api/users/avatar/{{agent.userpic ? agent.userpic : \'unknown_avatar\'}}" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n\n				<!-- START SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{agent.fullname}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{agent.role}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.staff.agents.view.account\')}">\n							<a data-ng-href="/staff/agents/view/{{agent.id}}/account">\n							<i class="icon-user"></i>\n							{{ \'APPLICATION_ACCOUNT\' | translate}} </a>\n						</li>\n\n						<li data-ng-class="{active: $state.includes(\'main.staff.agents.view.queues\')}" data-ng-show="Auth.isAdmin() || userModules[7]">\n							<a data-ng-href="/staff/agents/view/{{agent.id}}/queues/voice">\n							<i class="icon-docs"></i>\n							{{ \'APPLICATION_QUEUES\' | translate}} </a>\n						</li>\n\n						<li data-ng-class="{active: $state.is(\'main.staff.agents.view.voice\')}" data-ng-show="Auth.isAdmin() || userModules[7]">\n							<a data-ng-href="/staff/agents/view/{{agent.id}}/voice">\n							<i class="icon-earphones-alt"></i>\n							{{ \'APPLICATION_VOICE\' | translate}} </a>\n						</li>\n\n						<li data-ng-class="{active: $state.is(\'main.staff.agents.view.chat\'),\'disabled-link\':!license.chat}" data-ng-show="Auth.isAdmin() || userModules[8]">\n							<a data-ng-href="{{license.chat ? \'/staff/agents/view/\'+agent.id+\'/chat\' : \'javascript:;\'}}" class="disable-target">\n							<i class="icon-bubble"></i>\n							{{ \'APPLICATION_CHAT\' | translate}} </a>\n						</li>\n\n						<li data-ng-class="{active: $state.is(\'main.staff.agents.view.mail\'),\'disabled-link\':!license.mail}" data-ng-show="Auth.isAdmin() || userModules[9]">\n							<a data-ng-href="{{license.mail ? \'/staff/agents/view/\'+agent.id+\'/mail\' : \'javascript:;\'}}" class="disable-target">\n							<i class="icon-envelope"></i>\n							{{ \'APPLICATION_MAIL\' | translate}} </a>\n						</li>\n\n						<li data-ng-class="{active: $state.is(\'main.staff.agents.view.fax\'),\'disabled-link\':!license.fax}" data-ng-show="Auth.isAdmin() || userModules[10]">\n							<a data-ng-href="{{license.fax ? \'/staff/agents/view/\'+agent.id+\'/fax\' : \'javascript:;\'}}" class="disable-target">\n							<i class="fa fa-fax"></i>\n							{{ \'APPLICATION_FAX\' | translate}} </a>\n						</li>\n\n						<li data-ng-class="{active: $state.is(\'main.staff.agents.view.sms\'),\'disabled-link\':!license.messaging}" data-ng-show="Auth.isAdmin() || userModules[11]">\n							<a data-ng-href="{{license.messaging ? \'/staff/agents/view/\'+agent.id+\'/sms\' : \'javascript:;\'}}" class="disable-target">\n								<i class="	glyphicon glyphicon-comment	"></i>\n							{{ \'APPLICATION_SMS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.staff.agents.view.openchannel\'),\'disabled-link\':!license.openchannel}" data-ng-show="Auth.isAdmin() || userModules[20]">\n							<a data-ng-href="{{license.openchannel ? \'/staff/agents/view/\'+agent.id+\'/openchannel\' : \'javascript:;\'}}" class="disable-target">\n								<i class="	icon-globe	"></i>\n							{{ \'APPLICATION_OPEN_CHANNEL\' | translate}} </a>\n						</li>\n\n						<li data-ng-class="{active: $state.is(\'main.staff.agents.view.motionbar\')}" data-ng-show="Auth.isAdmin()">\n							<a data-ng-href="/staff/agents/view/{{agent.id}}/motionbar">\n							<i class="icon-screen-desktop"></i>\n							{{ \'APPLICATION_MOTION_BAR\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/view/view.mail.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_MAIL\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body">\n				<!-- START CHAT TAB -->\n				<form name="form" data-ng-submit="patchItem()" novalidate>\n					<!-- START CAPACITY -->\n					<div class="form-group" data-ng-class="{\'has-error\': (form.capacity.$touched || form.$submitted) && form.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_CAPACITY\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" name="mailCapacity" placeholder="{{\'APPLICATION_CAPACITY\' | translate}}" class="form-control" data-ng-model="agent.mailCapacity" min="0" required/>\n						<span class="help-block">\n							{{\'MESSAGE_ZERO_MEANS_UNLIMITED\' | translate}}\n						</span>\n						<span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END CAPACITY -->\n					<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n				<!-- END CHAT TAB -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/staff/agent/view/view.motionbar.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_MOTION_BAR\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li data-ng-class="{\'active\': Auth.isAdmin()}" data-ng-show="Auth.isAdmin()">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n					<li data-ng-show="Auth.isAdmin()">\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_CALL_FORWARDING\' | translate}}</a>\n					</li>\n					<li data-ng-show="Auth.isAdmin()">\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_ADVANCED\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- START GENERAL TAB -->\n					<div class="tab-pane" data-ng-class="{\'active\': Auth.isAdmin()}" data-ng-show="Auth.isAdmin()" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="updateItem()" novalidate>\n\n							<!-- START ENABLE_SETTINGS -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_ENABLE_SETTINGS\' | translate}}</label><br>\n								<input\n								bs-switch\n								ng-model="agent.phoneBarEnableSettings"\n								type="checkbox"\n								switch-active="{{ radioSwitch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ radioSwitch.onColor }}"\n								switch-off-color="{{ radioSwitch.offColor }}"\n								switch-animate="{{ radioSwitch.animate }}"\n								switch-size="{{ radioSwitch.size }}"\n								switch-label="{{ radioSwitch.label }}"\n								switch-icon="{{ radioSwitch.icon }}"\n								switch-radio-off="{{ radioSwitch.radioOff }}"\n								switch-label-width="{{ radioSwitch.labelWidth }}"\n								switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END ENABLE_SETTINGS -->\n\n							<!-- START AUTO_ANSWER -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_AUTO_ANSWER\' | translate}}</label><br>\n								<input\n								bs-switch\n								ng-model="agent.phoneBarAutoAnswer"\n								type="checkbox"\n								switch-active="{{ radioSwitch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ radioSwitch.onColor }}"\n								switch-off-color="{{ radioSwitch.offColor }}"\n								switch-animate="{{ radioSwitch.animate }}"\n								switch-size="{{ radioSwitch.size }}"\n								switch-label="{{ radioSwitch.label }}"\n								switch-icon="{{ radioSwitch.icon }}"\n								switch-radio-off="{{ radioSwitch.radioOff }}"\n								switch-label-width="{{ radioSwitch.labelWidth }}"\n								switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END AUTO_ANSWER -->\n\n							<!-- START APPLICATION_ENABLE_RECORDING -->\n							<!-- <div class="form-group">\n								<label class="control-label">{{\'APPLICATION_ENABLE_RECORDING\' | translate}}</label><br>\n								<input\n								bs-switch\n								ng-model="agent.phoneBarEnableRecording"\n								type="checkbox"\n								switch-active="{{ radioSwitch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ radioSwitch.onColor }}"\n								switch-off-color="{{ radioSwitch.offColor }}"\n								switch-animate="{{ radioSwitch.animate }}"\n								switch-size="{{ radioSwitch.size }}"\n								switch-label="{{ radioSwitch.label }}"\n								switch-icon="{{ radioSwitch.icon }}"\n								switch-radio-off="{{ radioSwitch.radioOff }}"\n								switch-label-width="{{ radioSwitch.labelWidth }}"\n								switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div> -->\n							<!-- END APPLICATION_ENABLE_RECORDING -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n					<!-- START CALL FORWARDING TAB -->\n					<div class="tab-pane" data-ng-show="Auth.isAdmin()" id="tab_1_2">\n						<form name="forms.callForwarding" data-ng-submit="updateItem()" novalidate>\n\n							<!-- START UNCONDITIONAL -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_UNCONDITIONAL\' | translate}}</label><br>\n								<input\n								bs-switch\n								ng-model="agent.phoneBarUnconditional"\n								type="checkbox"\n								switch-active="{{ radioSwitch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ radioSwitch.onColor }}"\n								switch-off-color="{{ radioSwitch.offColor }}"\n								switch-animate="{{ radioSwitch.animate }}"\n								switch-size="{{ radioSwitch.size }}"\n								switch-label="{{ radioSwitch.label }}"\n								switch-icon="{{ radioSwitch.icon }}"\n								switch-radio-off="{{ radioSwitch.radioOff }}"\n								switch-label-width="{{ radioSwitch.labelWidth }}"\n								switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END UNCONDITIONAL -->\n\n\n							<!-- START UNCONDITIONAL NUMBER -->\n							<div class="form-group" data-ng-if="agent.phoneBarUnconditional" data-ng-class="{\'has-error\': (forms.callForwarding.phoneBarUnconditionalNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarUnconditionalNumber.$invalid}">\n								<input type="text" name="phoneBarUnconditionalNumber" placeholder="{{\'APPLICATION_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.phoneBarUnconditionalNumber" required/>\n								<span class="help-block">\n									<!-- {{ \'DESCRIPTION_VOICE_HOST\' | translate }} -->\n								</span>\n								<span data-ng-show="(forms.callForwarding.phoneBarUnconditionalNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarUnconditionalNumber.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END UNCONDITIONAL NUMBER -->\n\n							<!-- START NO REPLY -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_NO_REPLY\' | translate}}</label><br>\n								<input\n								bs-switch\n								ng-model="agent.phoneBarNoReply"\n								type="checkbox"\n								switch-active="{{ radioSwitch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ radioSwitch.onColor }}"\n								switch-off-color="{{ radioSwitch.offColor }}"\n								switch-animate="{{ radioSwitch.animate }}"\n								switch-size="{{ radioSwitch.size }}"\n								switch-label="{{ radioSwitch.label }}"\n								switch-icon="{{ radioSwitch.icon }}"\n								switch-radio-off="{{ radioSwitch.radioOff }}"\n								switch-label-width="{{ radioSwitch.labelWidth }}"\n								switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END NO REPLY -->\n\n							<!-- START NO REPLY -->\n							<div class="form-group" data-ng-if="agent.phoneBarNoReply" data-ng-class="{\'has-error\': (forms.callForwarding.phoneBarNoReplyNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarNoReplyNumber.$invalid}">\n								<input type="text" name="phoneBarNoReplyNumber" placeholder="{{\'APPLICATION_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.phoneBarNoReplyNumber" required/>\n								<span class="help-block">\n									<!-- {{ \'DESCRIPTION_VOICE_HOST\' | translate }} -->\n								</span>\n								<span data-ng-show="(forms.callForwarding.phoneBarNoReplyNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarNoReplyNumber.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END REPLY -->\n\n							<!-- START BUSY -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_BUSY\' | translate}}</label><br>\n								<input\n								bs-switch\n								ng-model="agent.phoneBarBusy"\n								type="checkbox"\n								switch-active="{{ radioSwitch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ radioSwitch.onColor }}"\n								switch-off-color="{{ radioSwitch.offColor }}"\n								switch-animate="{{ radioSwitch.animate }}"\n								switch-size="{{ radioSwitch.size }}"\n								switch-label="{{ radioSwitch.label }}"\n								switch-icon="{{ radioSwitch.icon }}"\n								switch-radio-off="{{ radioSwitch.radioOff }}"\n								switch-label-width="{{ radioSwitch.labelWidth }}"\n								switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END BUSY -->\n\n							<!-- START BUSY NUMBER -->\n							<div class="form-group" data-ng-if="agent.phoneBarBusy" data-ng-class="{\'has-error\': (forms.callForwarding.phoneBarBusyNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarBusyNumber.$invalid}">\n								<input type="text" name="phoneBarBusyNumber" placeholder="{{\'APPLICATION_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.phoneBarBusyNumber" required/>\n								<span class="help-block">\n									<!-- {{ \'DESCRIPTION_VOICE_HOST\' | translate }} -->\n								</span>\n								<span data-ng-show="(forms.callForwarding.phoneBarBusyNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarBusyNumber.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END BUSY NUMBER -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CALL FORWARDING TAB -->\n					<!-- START ADVANCED TAB -->\n					<div class="tab-pane" data-ng-show="Auth.isAdmin()" id="tab_1_3">\n						<form name="forms.advanced" data-ng-submit="updateItem()" novalidate>\n\n							<!-- START ENABLE REMOTE CONTROL -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_REMOTE_CONTROL\' | translate}}</label><br>\n								<input\n								bs-switch\n								ng-model="agent.phoneBarRemoteControl"\n								type="checkbox"\n								switch-active="{{ radioSwitch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ radioSwitch.onColor }}"\n								switch-off-color="{{ radioSwitch.offColor }}"\n								switch-animate="{{ radioSwitch.animate }}"\n								switch-size="{{ radioSwitch.size }}"\n								switch-label="{{ radioSwitch.label }}"\n								switch-icon="{{ radioSwitch.icon }}"\n								switch-radio-off="{{ radioSwitch.radioOff }}"\n								switch-label-width="{{ radioSwitch.labelWidth }}"\n								switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END ENABLE REMOTE CONTROL -->\n\n\n							<!-- START REMOTE CONTROL PORT -->\n							<div class="form-group" data-ng-if="agent.phoneBarRemoteControl" data-ng-class="{\'has-error\': (forms.advanced.phoneBarRemoteControlPort.$touched || forms.advanced.$submitted) && forms.advanced.phoneBarRemoteControlPort.$invalid}">\n								<label class="control-label">{{\'APPLICATION_REMOTE_CONTROL\' | translate}} {{\'APPLICATION_PORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="phoneBarRemoteControlPort" placeholder="{{\'APPLICATION_REMOTE_CONTROL\' | translate}} {{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="agent.phoneBarRemoteControlPort" required/>\n								<span class="help-block">Default: 9888</span>\n								<span data-ng-show="(forms.advanced.phoneBarRemoteControlPort.$touched || forms.advanced.$submitted) && forms.advanced.phoneBarRemoteControlPort.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.advanced.phoneBarRemoteControlPort.$error.max || form.advanced.phoneBarRemoteControlPort.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END REMOTE CONTROL PORT -->\n\n							<!-- START SIP EXPIRES -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.phoneBarExpires.$touched || forms.advanced.$submitted) && forms.advanced.phoneBarExpires.$invalid}">\n								<label class="control-label">SIP {{\'APPLICATION_EXPIRES\' | translate}} [sec]<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="phoneBarExpires" placeholder="SIP {{\'APPLICATION_EXPIRES\' | translate}}" class="form-control" data-ng-model="agent.phoneBarExpires" required/>\n								<span class="help-block">Default: 160</span>\n								<span data-ng-show="(forms.advanced.phoneBarExpires.$touched || forms.advanced.$submitted) && forms.advanced.phoneBarExpires.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.advanced.phoneBarExpires.$error.max || form.advanced.phoneBarExpires.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}} (min 1).\n								</span>\n							</div>\n							<!-- END SIP EXPIRES -->\n\n							<!-- START SIP PORT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.phoneBarListenPort.$touched || forms.advanced.$submitted) && forms.advanced.phoneBarListenPort.$invalid}">\n								<label class="control-label">SIP {{\'APPLICATION_PORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" max="65535" name="phoneBarListenPort" placeholder="SIP {{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="agent.phoneBarListenPort" required/>\n								<span class="help-block">Default: 5060</span>\n								<span data-ng-show="(forms.advanced.phoneBarListenPort.$touched || forms.advanced.$submitted) && forms.advanced.phoneBarListenPort.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.advanced.phoneBarListenPort.$error.max || form.advanced.phoneBarListenPort.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}} (0-65535).\n								</span>\n							</div>\n							<!-- END SIP PORT -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/staff/agent/view/view.openchannel.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_OPEN_CHANNEL\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body">\n				<!-- START CHAT TAB -->\n				<form name="form" data-ng-submit="patchItem()" novalidate>\n					<!-- START CAPACITY -->\n					<div class="form-group" data-ng-class="{\'has-error\': (form.capacity.$touched || form.$submitted) && form.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_CAPACITY\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" name="openchannelCapacity" placeholder="{{\'APPLICATION_CAPACITY\' | translate}}" class="form-control" data-ng-model="agent.openchannelCapacity" min="0" required/>\n						<span class="help-block">\n							{{\'MESSAGE_ZERO_MEANS_UNLIMITED\' | translate}}\n						</span>\n						<span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END CAPACITY -->\n					<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n				<!-- END CHAT TAB -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/staff/agent/view/view.queues.chat.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initChatQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-queues-chat">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/view/view.queues.fax.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initFaxQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-queues-fax">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/view/view.queues.html","<!-- BEGIN PAGE CONTENT-->\n<div class=\"row\" data-ng-init=\"initView()\">\n	<div class=\"col-md-12\">\n		<div>\n		    <nav class=\"navbar navbar-default\" role=\"navigation\">\n					<div class=\"collapse navbar-collapse\">\n						<ul class=\"nav navbar-nav\">\n							<li data-ng-class=\"{'active': $state.is('main.staff.agents.view.queues.voice')}\">\n								<a href=\"/staff/agents/view/{{agent.id}}/queues/voice\">\n									<i class=\"icon-earphones-alt\"></i> {{'APPLICATION_VOICE' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.agents.view.queues.chat'),'disabled-link':!license.chat}\" data-ng-show=\"Auth.isAdmin() || userModules[8]\">\n								<a href=\"{{license.chat ? '/staff/agents/view/'+agent.id+'/queues/chat' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"icon-bubble\"></i> {{'APPLICATION_CHAT' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.agents.view.queues.mail'),'disabled-link':!license.mail}\" data-ng-show=\"Auth.isAdmin() || userModules[9]\">\n								<a href=\"{{license.mail ? '/staff/agents/view/'+agent.id+'/queues/mail' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"icon-envelope\"></i>{{'APPLICATION_MAIL' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.agents.view.queues.fax'),'disabled-link':!license.fax}\" data-ng-show=\"Auth.isAdmin() || userModules[10]\">\n								<a href=\"{{license.fax ? '/staff/agents/view/'+agent.id+'/queues/fax' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"fa fa-fax\"></i> {{'APPLICATION_FAX' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.agents.view.queues.sms'),'disabled-link':!license.messaging}\" data-ng-show=\"Auth.isAdmin() || userModules[11]\">\n								<a href=\"{{license.messaging ? '/staff/agents/view/'+agent.id+'/queues/sms' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"glyphicon glyphicon-comment\"></i> {{'APPLICATION_SMS' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.agents.view.queues.openchannel'),'disabled-link':!license.openchannel}\" data-ng-show=\"Auth.isAdmin() || userModules[20]\">\n								<a href=\"{{license.openchannel ? '/staff/agents/view/'+agent.id+'/queues/openchannel' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"icon-globe\"></i> {{'APPLICATION_OPEN_CHANNEL' | translate}}\n								</a>\n							</li>\n						</ul>\n					</div>\n		    </nav>\n		</div>\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n"),a.put("app/staff/agent/view/view.queues.mail.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initMailQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-queues-mail">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/view/view.queues.openchannel.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initOpenchannelQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-queues-openchannel">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/staff/agent/view/view.queues.sms.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initSmsQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-queues-sms">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/view/view.queues.voice.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initVoiceQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-queues-voice">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/view/view.sms.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_SMS\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body">\n				<!-- START CHAT TAB -->\n				<form name="form" data-ng-submit="patchItem()" novalidate>\n					<!-- START CAPACITY -->\n					<div class="form-group" data-ng-class="{\'has-error\': (form.capacity.$touched || form.$submitted) && form.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_CAPACITY\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" name="smsCapacity" placeholder="{{\'APPLICATION_CAPACITY\' | translate}}" class="form-control" data-ng-model="agent.smsCapacity" min="0" required/>\n						<span class="help-block">\n							{{\'MESSAGE_ZERO_MEANS_UNLIMITED\' | translate}}\n						</span>\n						<span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END CAPACITY -->\n					<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n				<!-- END CHAT TAB -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/staff/agent/view/view.voice.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_VOICE\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.voice" data-ng-submit="updateItem()" novalidate>\n\n					<!-- START INTERNAL -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.voice.internal.$touched || forms.voice.$submitted) && forms.voice.internal.$invalid}">\n						<label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="text" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.internal" required disabled/>\n						<span data-ng-show="(forms.voice.internal.$touched || forms.voice.$submitted) && forms.voice.internal.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END INTERNAL -->\n\n					<!-- START TRANSPORT -->\n					<div class="form-group">\n						<label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n						<ui-select multiple name="transport" ng-model="agent.transport" theme="bootstrap">\n							<ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n							<ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n								{{transport}}\n							</ui-select-choices>\n						</ui-select>\n						<span class="help-block">\n							{{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n						</span>\n					</div>\n					<!-- END TRANSPORT -->\n\n					<!-- START HOST -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.voice.host.$touched || forms.voice.$submitted) && forms.voice.host.$invalid}">\n						<label class="control-label">{{\'APPLICATION_HOST\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="agent.host" required/>\n						<span class="help-block">\n							{{ \'DESCRIPTION_VOICE_HOST\' | translate }}\n						</span>\n						<span data-ng-show="(forms.voice.host.$touched || forms.voice.$submitted) && forms.voice.host.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END HOST -->\n\n					<!-- START NAT -->\n					<div class="form-group">\n						<label class="control-label">{{ \'APPLICATION_NAT\' | translate}}</label>\n						<ui-select multiple data-ng-model="agent.nat" name="nat" theme="bootstrap">\n							<ui-select-match placeholder="{{ \'APPLICATION_SEARCH_FILTER\' | translate }}">{{$item}}</ui-select-match>\n							<ui-select-choices repeat="nat in [\'yes\', \'no\', \'never\', \'route\', \'force_rport\', \'comedia\'] | filter: $select.search">\n								{{nat}}\n							</ui-select-choices>\n						</ui-select>\n						<span class="help-block">\n							{{ \'DESCRIPTION_VOICE_NAT\' | translate }}\n						</span>\n					</div>\n					<!-- END NAT -->\n\n					<!-- START TYPE -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.voice.type.$touched || forms.voice.$submitted) && forms.voice.type.$invalid}">\n						<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="agent.type" name="type" theme="bootstrap" required>\n							<ui-select-match placeholder="{{ \'APPLICATION_SEARCH_FILTER\' | translate }}">{{$select.selected}}</ui-select-match>\n							<ui-select-choices repeat="type in [\'friend\', \'user\', \'peer\'] | filter: $select.search">\n								<div ng-bind-html="type | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n						<span class="help-block">\n							{{ \'DESCRIPTION_VOICE_TYPE\' | translate }}\n						</span>\n						<span data-ng-show="(forms.voice.type.$touched || forms.voice.$submitted) && forms.voice.type.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END TYPE -->\n\n					<!-- START CODEC -->\n					<div class="form-group">\n						<label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n						<ui-select multiple ng-model="agent.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n							<ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n							<ui-select-choices repeat="allow in [\'g729\', \'ilbc\', \'gsm\', \'ulaw\', \'alaw\'] | filter: $select.search">\n								{{allow}}\n							</ui-select-choices>\n						</ui-select>\n						<span class="help-block">\n							{{ \'DESCRIPTION_VOICE_CODEC\' | translate }}\n						</span>\n					</div>\n					<!-- END CODEC -->\n\n					<!-- START STATUS -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_CHANSPY\' | translate}}</label></br>\n						<input\n						bs-switch\n						class="form-control"\n						ng-model="agent.chanspy"\n						type="checkbox"\n						name="auth"\n						switch-active="{{ recordSwitch.isActive }}"\n						switch-on-text="{{ recordSwitch.onText }}"\n						switch-off-text="{{ recordSwitch.offText }}"\n						switch-on-color="{{ recordSwitch.onColor }}"\n						switch-off-color="{{ recordSwitch.offColor }}"\n						switch-animate="{{ recordSwitch.animate }}"\n						switch-size="{{ recordSwitch.size }}"\n						switch-label="{{ recordSwitch.label }}"\n						switch-icon="{{ recordSwitch.icon }}"\n						switch-radio-off="{{ recordSwitch.radioOff }}"\n						switch-label-width="{{ recordSwitch.labelWidth }}"\n						switch-handle-width="{{ recordSwitch.handleWidth }}">\n					</div>\n					<!-- END STATUS -->\n\n					<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/staff/agent/wizard/wizard-bulk.html",'<div class="col-md-12">\n	<!-- BEGIN PAGE HEADER-->\n	<div class="page-bar">\n		<ul class="page-breadcrumb">\n			<li>\n				<i class="icon-rocket"></i>\n				<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-people"></i>\n				<a href="/agents/list">{{ \'APPLICATION_AGENTS\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-options"></i>\n				<a href="/agents/wizard">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n			</li>\n		</ul>\n	</div>\n	<!-- END PAGE HEADER-->\n\n	<!-- BEGIN PORTLET-->\n	<div class="portlet light bordered" data-ng-init="getFirstFreeInternal(); item.amount = 2; item.startIndex = 0;">\n		<div class="portlet-title">\n			<div class="caption font-green-sharp">\n				<i class="icon-user font-green-sharp"></i>\n				<span class="caption-subject">{{ \'APPLICATION_AGENT\' | translate }} WIZARD</a> </span>\n			</div>\n		</div>\n		<div class="portlet-body">\n			<wizard on-finish="createItems()">\n				<wz-step title="{{\'APPLICATION_ACCOUNT\' | translate}}" canexit="exitValidation(forms.info.$valid)">\n					<form name="forms.info" novalidate>\n\n						<!-- START AMOUNT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.amount.$touched || forms.info.$submitted) && forms.info.amount.$invalid}">\n							<label class="control-label">{{\'APPLICATION_AMOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="number" name="amount" min="2" max="{{maxAmount}}" placeholder="{{\'APPLICATION_AMOUNT\' | translate}}" class="form-control" data-ng-model="item.amount" required>\n							<span data-ng-show="(forms.info.amount.$touched || forms.info.$submitted) && forms.info.amount.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span class="help-block help-block-info">\n							{{\'MESSAGE_STARTING_FROM_INTERNAL\' | translate}} <b>{{item.minInternal}}</b> {{\'MESSAGE_MAX_NUM_OF_BULK_AGENTS_IS\' | translate}} <b>{{maxAmount}}</b>\n						</span>\n						</div>\n						<!-- END AMOUNT -->\n\n						<!-- START START INDEX -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.startIndex.$touched || forms.info.$submitted) && forms.info.startIndex.$invalid}">\n							<label class="control-label">{{\'APPLICATION_START_INDEX\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="number" name="startIndex" min="0" placeholder="{{\'APPLICATION_START_INDEX\' | translate}}" class="form-control" data-ng-model="item.startIndex" required>\n							<span data-ng-show="(forms.info.startIndex.$touched || forms.info.$submitted) && forms.info.startIndex.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END START INDEX -->\n\n						<!-- START MIN INTERNAL-->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.minInternal.$invalid}">\n							<label class="control-label">{{\'APPLICATION_MIN_INTERNAL\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="number" name="minInternal" min="0" placeholder="{{\'APPLICATION_MIN_INTERNAL\' | translate}}" class="form-control" data-ng-change="getAmount()" data-ng-model="item.minInternal" required>\n							<span data-ng-show="(forms.info.minInternal.$touched || forms.info.$submitted) && forms.info.minInternal.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END MIN INTERNAL-->\n\n						<!-- START NAME -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n							<label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n							<span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END NAME -->\n\n						<!-- START USERNAME -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n							<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required>\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n							</span>\n						</div>\n						<!-- END USERNAME -->\n\n						<!-- START EMAIL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$invalid}">\n							<label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="item.email" required>\n							<span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.email" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n							</span>\n						</div>\n						<!-- END EMAIL -->\n\n						<!-- START PASSWORD -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n							<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" data-ng-pattern="setting.securePassword ? settings.patternPassword : settings.patternPasswordLight" required/>\n							<span class="help-block">\n								 {{setting.securePassword ? \'MESSAGE_PASSWORD_FORMAT\' : \'MESSAGE_PASSWORD_LIGTH_FORMAT\' | translate}}\n							</span>\n							<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n							</span>\n						</div>\n						<!-- END PASSWORD -->\n\n						<!-- START RE PASSWORD -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$invalid}">\n							<label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.rpassword" nx-equal="item.password" required/>\n							<span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.nxEqual" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n							</span>\n						</div>\n						<!-- END RE PASSWORD -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n							<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n						</div>\n						<!-- END DESCRIPTION -->\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n					</form>\n				</wz-step>\n\n				<wz-step title="{{\'APPLICATION_VOICE\' | translate}}" canexit="exitValidation(forms.voice.$valid)">\n					<form name="forms.voice" novalidate>\n\n						<!-- START TRANSPORT -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n							<ui-select multiple name="transport" ng-model="item.transport" theme="bootstrap" ng-disabled="disabled">\n								<ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n								<ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n									{{transport}}\n								</ui-select-choices>\n							</ui-select>\n							<span class="help-block">\n								{{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n							</span>\n						</div>\n						<!-- END TRANSPORT -->\n\n						<!-- START CODEC -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n							<ui-select multiple ng-model="item.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n								<ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n								<ui-select-choices repeat="allow in [\'g729\', \'ilbc\', \'gsm\', \'ulaw\', \'alaw\'] | filter: $select.search">\n									{{allow}}\n								</ui-select-choices>\n							</ui-select>\n							<span class="help-block">\n								{{ \'DESCRIPTION_VOICE_CODEC\' | translate }}\n							</span>\n						</div>\n						<!-- END CODEC -->\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					</form>\n				</wz-step>\n\n				<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n					<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n					<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n				</wz-step>\n			</wizard>\n		</div>\n	</div>\n	<!-- END PORTLET-->\n</div>\n'),a.put("app/staff/agent/wizard/wizard.html",'<div class="col-md-12">\n	<!-- BEGIN PAGE HEADER-->\n	<div class="page-bar">\n		<ul class="page-breadcrumb">\n			<li>\n				<i class="icon-rocket"></i>\n				<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-puzzle"></i>\n				<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-people"></i>\n				<a href="/staff/agents/list">{{ \'APPLICATION_AGENTS\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-options"></i>\n				<a href="/agents/wizard">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n			</li>\n		</ul>\n	</div>\n	<!-- END PAGE HEADER-->\n\n	<!-- BEGIN PORTLET-->\n	<div class="portlet light bordered" data-ng-init="getFirstFreeInternal();">\n		<div class="portlet-title">\n			<div class="caption font-green-sharp">\n				<i class="icon-user font-green-sharp"></i>\n				<span class="caption-subject">{{ \'APPLICATION_AGENT\' | translate }} WIZARD</a> </span>\n			</div>\n		</div>\n		<div class="portlet-body">\n			<wizard on-finish="createItem()">\n				<wz-step title="{{\'APPLICATION_ACCOUNT\' | translate}}" canexit="exitValidation(forms.info.$valid)">\n					<form name="forms.info" novalidate>\n\n						<!-- START NAME -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n							<label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n							<span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END NAME -->\n\n						<!-- START USERNAME -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n							<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required>\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n							</span>\n						</div>\n						<!-- END USERNAME -->\n\n						<!-- START EMAIL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$invalid}">\n							<label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="item.email" required>\n							<span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.email" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n							</span>\n						</div>\n						<!-- END EMAIL -->\n\n						<!-- START PASSWORD -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n							<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" data-ng-pattern="setting.securePassword ? settings.patternPassword : settings.patternPasswordLight" required/>\n							<span class="help-block">\n								 {{setting.securePassword ? \'MESSAGE_PASSWORD_FORMAT\' : \'MESSAGE_PASSWORD_LIGTH_FORMAT\' | translate}}\n							</span>\n							<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END PASSWORD -->\n\n						<!-- START RE PASSWORD -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$invalid}">\n							<label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.rpassword" nx-equal="item.password" required/>\n							<span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.nxEqual" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n							</span>\n						</div>\n						<!-- END RE PASSWORD -->\n\n						<!-- START INTERNAL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$invalid}">\n							<label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<div class="input-group">\n								<input type="number" min="1" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="item.internal" data-ng-disabled="!item.internalEnabled" data-ng-required="item.internalEnabled"/>\n								<span class="input-group-addon">\n									<input type="checkbox" data-ng-model="item.internalEnabled">\n								</span>\n							</div>\n							<span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END INTERNAL -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n							<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n						</div>\n						<!-- END DESCRIPTION -->\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n					</form>\n				</wz-step>\n\n				<wz-step title="{{\'APPLICATION_VOICE\' | translate}}" canexit="exitValidation(forms.voice.$valid)">\n					<form name="forms.voice" novalidate>\n\n						<!-- START TRANSPORT -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n							<ui-select multiple name="transport" ng-model="item.transport" theme="bootstrap" ng-disabled="disabled">\n								<ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n								<ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n									{{transport}}\n								</ui-select-choices>\n							</ui-select>\n							<span class="help-block">\n								{{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n							</span>\n						</div>\n						<!-- END TRANSPORT -->\n\n						<!-- START CODEC -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n							<ui-select multiple ng-model="item.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n								<ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n								<ui-select-choices repeat="allow in [\'g729\', \'ilbc\', \'gsm\', \'ulaw\', \'alaw\'] | filter: $select.search">\n									{{allow}}\n								</ui-select-choices>\n							</ui-select>\n							<span class="help-block">\n								{{ \'DESCRIPTION_VOICE_CODEC\' | translate }}\n							</span>\n						</div>\n						<!-- END CODEC -->\n\n						<!-- <div class="form-body" data-ng-init="initVoiceQueues()">\n							<label class="control-label">{{ \'APPLICATION_QUEUES\' | translate}}</label>\n							<div class="form-group last">\n								<div class="col-md-12" id="multi-select-queues-voice">\n								</div>\n							</div>\n						</div> -->\n\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n					</form>\n				</wz-step>\n\n				<!-- <wz-step title="{{\'APPLICATION_CHAT\' | translate}}">\n					<form name="forms.chat">\n						<div class="form-body" data-ng-init="initChatQueues()">\n							<label class="control-label">{{ \'APPLICATION_QUEUES\' | translate}}</label>\n							<div class="form-group last">\n								<div class="col-md-12" id="multi-select-queues-chat">\n								</div>\n							</div>\n						</div>\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					</form>\n				</wz-step> -->\n\n				<!-- <wz-step title="{{\'APPLICATION_MAIL\' | translate}}">\n					<form name="forms.mail">\n						<div class="form-body" data-ng-init="initMailQueues()">\n							<label class="control-label">{{ \'APPLICATION_QUEUES\' | translate}}</label>\n							<div class="form-group last">\n								<div class="col-md-12" id="multi-select-queues-mail">\n								</div>\n							</div>\n						</div>\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					</form>\n				</wz-step> -->\n\n\n				<!-- <wz-step title="{{\'APPLICATION_SMS\' | translate}}">\n					<form name="forms.sms">\n						<div class="form-body" data-ng-init="initSmsQueues()">\n							<label class="control-label">{{ \'APPLICATION_QUEUES\' | translate}}</label>\n							<div class="form-group last">\n								<div class="col-md-12" id="multi-select-queues-sms">\n								</div>\n							</div>\n						</div>\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					</form>\n				</wz-step> -->\n\n				<!-- <wz-step title="{{\'APPLICATION_FAX\' | translate}}">\n					<form name="forms.fax">\n						<div class="form-body" data-ng-init="initFaxQueues()">\n							<label class="control-label">{{ \'APPLICATION_QUEUES\' | translate}}</label>\n							<div class="form-group last">\n								<div class="col-md-12" id="multi-select-queues-fax">\n								</div>\n							</div>\n						</div>\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					</form>\n				</wz-step> -->\n\n				<!-- <wz-step title="{{\'APPLICATION_OPEN_CHANNEL\' | translate}}">\n					<form name="forms.openchannel">\n						<div class="form-body" data-ng-init="initOpenchannelQueues()">\n							<label class="control-label">{{ \'APPLICATION_QUEUES\' | translate}}</label>\n							<div class="form-group last">\n								<div class="col-md-12" id="multi-select-queues-openchannel">\n								</div>\n							</div>\n						</div>\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					</form>\n				</wz-step> -->\n\n				<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n					<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n					<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n				</wz-step>\n			</wizard>\n		</div>\n	</div>\n	<!-- END PORTLET-->\n</div>\n'),
-a.put("app/staff/team/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_TEAM\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/staff/team/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-puzzle"></i>\n					<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-shield"></i>\n					<a href="/staff/teams/list">{{ \'APPLICATION_TEAMS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-shield font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_TEAMS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="#" data-ng-click="createItem()">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_TEAM\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/team/view/view.agents.html",'<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n			<!-- GENERAL TAB -->\n				<!-- BEGIN PORTLET-->\n					<!-- BEGIN FORM-->\n					<form action="index.html" class="form-horizontal form-row-seperated">\n						<div class="form-body">\n							<div class="form-group last">\n								<div class="col-md-12" id="multi-select-team">\n								</div>\n							</div>\n						</div>\n					</form>\n					<!-- END FORM-->\n				<!-- END PORTLET-->\n			<!-- END GENERAL TAB -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/staff/team/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-puzzle"></i>\n					<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-shield"></i>\n					<a href="/staff/teams/list">{{ \'APPLICATION_TEAMS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{team.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img ng-src="assets/images/media/team.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{team.name}}\n					</div>\n\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.staff.teams.view.settings\')}">\n							<a data-ng-href="/staff/teams/view/{{team.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.staff.teams.view.agents\')}">\n							<a data-ng-href="/staff/teams/view/{{team.id}}/agents">\n							<i class="icon-people"></i>\n							{{ \'APPLICATION_AGENTS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content"></div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/team/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_ACCOUNT\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body">\n				<!-- PERSONAL INFO TAB -->\n				<div>\n\n					<form name="forms.info" data-ng-submit="updateItem()" novalidate>\n						<!-- START NAME -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n							<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="team.name" required/>\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END NAME -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n							<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="team.description"/>\n						</div>\n						<!-- END DESCRIPTION -->\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n					</form>\n				</div>\n				<!-- END PERSONAL INFO TAB -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/staff/telephone/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-puzzle"></i>\n					<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-phone"></i>\n					<a href="/staff/telephones/list">{{ \'APPLICATION_TELEPHONES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-phone font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_TELEPHONES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="/staff/telephones/wizard" data-toggle="dropdown">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_TELEPHONE\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/telephone/view/view.account.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_ACCOUNT\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_ACCOUNT\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-ng-show="Auth.isAdmin() || item.id === getCurrentTelephone().id" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_CHANGE_PASSWORD\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- PERSONAL INFO TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItem()" novalidate>\n\n				      <!-- START NAME -->\n				      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n				        <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n				        <input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n								<span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				        </span>\n				      </div>\n				      <!-- END NAME -->\n\n				      <!-- START USERNAME -->\n				      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n				        <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}</label>\n				        <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.name" disabled/>\n				      </div>\n				      <!-- END USERNAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n				      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				    </form>\n					</div>\n					<!-- END PERSONAL INFO TAB -->\n\n					<!-- CHANGE PASSWORD TAB -->\n					<div class="tab-pane" id="tab_1_2" data-ng-show="Auth.isAdmin() || item.id === getCurrentTelephone().id">\n						<form name="forms.changePwd" data-ng-submit="forms.changePwd.$valid && updatePassword()" novalidate>\n							<!-- START CURRENT PWD -->\n							<!-- <div class="form-group" data-ng-if="!Auth.isAdmin()" data-ng-class="{\'has-error\': (forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="current_pwd" placeholder="{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.currentPwd" required/>\n								<span data-ng-show="(forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div> -->\n							<!-- END CURRENT PWD -->\n							<!-- START NEW PWD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="new_pwd" placeholder="{{\'APPLICATION_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" data-ng-pattern="settings.patternPassword" required/>\n								<span class="help-block">\n									{{setting.securePassword ? \'MESSAGE_PASSWORD_FORMAT\' : \'MESSAGE_PASSWORD_LIGTH_FORMAT\' | translate}}\n								</span>\n								<span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NEW PWD -->\n							<!-- START RE-NEW PWD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.re_new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.re_new_pwd.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="re_new_pwd" placeholder="{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.reNewPwd" nx-equal="item.password" required/>\n								<span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END RE-NEW PWD -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CHANGE PASSWORD TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/staff/telephone/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-puzzle"></i>\n					<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-phone"></i>\n					<a href="/staff/telephones/list">{{ \'APPLICATION_TELEPHONES\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{item.fullname}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR TELEPHONEPIC -->\n				<div class="profile-userpic">\n					<img data-ng-src="assets/images/media/telephone.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR TELEPHONEPIC -->\n				<!-- SIDEBAR TELEPHONE TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{item.fullname}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{item.role}}\n					</div>\n				</div>\n				<!-- END SIDEBAR TELEPHONE TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.staff.telephones.view.account\')}">\n							<a data-ng-href="/staff/telephones/view/{{item.id}}/account">\n							<i class="icon-phone"></i>\n							{{ \'APPLICATION_ACCOUNT\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.staff.telephones.view.voice\')}" data-ng-show="Auth.isAdmin()">\n							<a data-ng-href="/staff/telephones/view/{{item.id}}/voice">\n								<i class="icon-earphones-alt"></i>\n								{{ \'APPLICATION_VOICE\' | translate}} </a>\n							</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/telephone/view/view.voice.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_ACCOUNT\' | translate}} {{ \'APPLICATION_VOICE\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.info" data-ng-submit="updateItem()" novalidate>\n\n					<!-- START INTERNAL -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$invalid}">\n						<label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" min="1" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="item.internal" required readonly/>\n						<span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n						<span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.ngRemoteValidate" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_INTERNAL\' | translate}}.\n						</span>\n					</div>\n					<!-- END INTERNAL -->\n\n					<!-- START TRANSPORT -->\n					<div class="form-group">\n						<label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n						<ui-select multiple name="transport" ng-model="item.transport" theme="bootstrap" ng-disabled="disabled">\n							<ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n							<ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n								{{transport}}\n							</ui-select-choices>\n						</ui-select>\n						<span class="help-block">\n							{{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n						</span>\n					</div>\n					<!-- END TRANSPORT -->\n\n					<!-- START CODEC -->\n					<div class="form-group">\n						<label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n						<ui-select multiple ng-model="item.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n							<ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n'+"							<ui-select-choices repeat=\"allow in ['g729', 'ilbc', 'gsm', 'ulaw', 'alaw'] | filter: $select.search\">\n								{{allow}}\n							</ui-select-choices>\n						</ui-select>\n						<span class=\"help-block\">\n							{{ 'DESCRIPTION_VOICE_CODEC' | translate }}\n						</span>\n					</div>\n					<!-- END CODEC -->\n\n					<input class=\"btn green-haze\" type=\"submit\" value=\"{{'APPLICATION_UPDATE' | translate}}\"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n"),a.put("app/staff/telephone/wizard/wizard.html",'<div class="col-md-12">\n  <!-- BEGIN PAGE HEADER-->\n	<div class="page-bar">\n		<ul class="page-breadcrumb">\n			<li>\n				<i class="icon-rocket"></i>\n				<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-puzzle"></i>\n				<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-phone"></i>\n				<a href="/staff/telephones/list">{{ \'APPLICATION_TELEPHONES\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-options"></i>\n				<a href="/staff/telephones/wizard">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n			</li>\n		</ul>\n	</div>\n  <!-- END PAGE HEADER-->\n\n  <!-- BEGIN PORTLET-->\n  <div class="portlet light bordered" data-ng-init="getFirstFreeInternal();">\n  	<div class="portlet-title">\n  		<div class="caption font-green-sharp">\n  			<i class="icon-phone font-green-sharp"></i>\n  			<span class="caption-subject">{{ \'APPLICATION_TELEPHONE\' | translate }} WIZARD</a> </span>\n  		</div>\n  	</div>\n  	<div class="portlet-body">\n  		<wizard on-finish="createItem()">\n				<wz-step title="{{\'APPLICATION_ACCOUNT\' | translate}}" canexit="exitValidation(forms.info.$valid)">\n			    <form name="forms.info" novalidate>\n\n			      <!-- START NAME -->\n			      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n			        <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n			        <input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n							<span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n			        </span>\n			      </div>\n			      <!-- END NAME -->\n\n			      <!-- START USERNAME -->\n			      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n			        <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n			        <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.name" ata-ng-pattern="settings.patternName"  required />\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n			        </span>\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.ngRemoteValidate" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n			        </span>\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n							</span>\n			      </div>\n			      <!-- END USERNAME -->\n\n			      <!-- START PASSWORD -->\n			      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n			        <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" data-ng-pattern="setting.securePassword ? settings.patternPassword : settings.patternPasswordLight" required/>\n							<span class="help-block">\n								{{setting.securePassword ? \'MESSAGE_PASSWORD_FORMAT\' : \'MESSAGE_PASSWORD_LIGTH_FORMAT\' | translate}}\n							</span>\n							<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n			      </div>\n			      <!-- END PASSWORD -->\n\n			      <!-- START RE PASSWORD -->\n			      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$invalid}">\n			        <label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n			        <input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.rpassword" nx-equal="item.password" required/>\n			        <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.required" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n			        </span>\n			        <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.nxEqual" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n			        </span>\n			      </div>\n			      <!-- END RE PASSWORD -->\n\n						<!-- START INTERNAL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$invalid}">\n							<label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<div class="input-group">\n							<input type="number" min="1" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="item.internal" data-ng-disabled="!item.internalEnabled" data-ng-required="item.internalEnabled"/>\n							<span class="input-group-addon">\n								<input type="checkbox" data-ng-model="item.internalEnabled">\n							</span>\n							</div>\n							<span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END INTERNAL -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n							<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n						</div>\n						<!-- END DESCRIPTION -->\n\n			      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n			    </form>\n			  </wz-step>\n\n				<wz-step title="{{\'APPLICATION_VOICE\' | translate}}" canexit="exitValidation(forms.voice.$valid)">\n					<form name="forms.voice" novalidate>\n\n						<!-- START TRANSPORT -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n							<ui-select multiple name="transport" ng-model="item.transport" theme="bootstrap" ng-disabled="disabled">\n						    <ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n						    <ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n						    	{{transport}}\n						    </ui-select-choices>\n						  </ui-select>\n							<span class="help-block">\n								{{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n							</span>\n						</div>\n						<!-- END TRANSPORT -->\n\n						<!-- START CODEC -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n							<ui-select multiple ng-model="item.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n						    <ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n						    <ui-select-choices repeat="allow in [\'g729\', \'ilbc\', \'gsm\', \'ulaw\', \'alaw\'] | filter: $select.search">\n						    	{{allow}}\n						    </ui-select-choices>\n						  </ui-select>\n							<span class="help-block">\n								{{ \'DESCRIPTION_VOICE_CODEC\' | translate }}\n							</span>\n						</div>\n						<!-- END CODEC -->\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					</form>\n				</wz-step>\n\n				<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n					<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n					<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n				</wz-step>\n  		</wizard>\n  	</div>\n  </div>\n  <!-- END PORTLET-->\n</div>\n'),
-a.put("app/staff/user/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-puzzle"></i>\n					<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-eye"></i>\n					<a href="#">{{ \'APPLICATION_USERS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-eye font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_USERS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="/staff/users/wizard" data-toggle="dropdown">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_USER\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.account.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_ACCOUNT\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_PERSONAL_INFO\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_CHANGE_AVATAR\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-ng-show="Auth.isAdmin() || user.id === getCurrentUser().id" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_CHANGE_PASSWORD\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- PERSONAL INFO TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="updateItem()" novalidate>\n\n							<!-- START ROLE -->\n							<div class="form-group" data-ng-if="Auth.getCurrentUser().role === \'admin\' && Auth.getCurrentUser().id !== user.id">\n								<label class="control-label">{{ \'APPLICATION_ROLE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select name="role" data-ng-model="user.role" theme="bootstrap" required>\n									<ui-select-match placeholder="Select role...">{{$select.selected | uppercase}}</ui-select-match>\n									<ui-select-choices repeat="role in [\'user\', \'admin\'] | filter: $select.search">\n										{{role | uppercase}}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n							<!-- END ROLE -->\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n								<label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="user.fullname" required/>\n								<span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}</label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="user.name" disabled/>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START EMAIL -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$invalid}">\n								<label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="user.email" required/>\n								<span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.email" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n								</span>\n							</div>\n							<!-- END EMAIL -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="user.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END PERSONAL INFO TAB -->\n\n					<!-- CHANGE AVATAR TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form action="#" role="form">\n							<div class="form-group">\n								<div class="fileinput fileinput-new" data-provides="fileinput">\n									<div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">\n										<img ng-src="assets/images/media/noProfileImage.png" alt=""/>\n									</div>\n									<div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;">\n									</div>\n									<div>\n										<span class="btn default btn-file" data-ng-show="!uploader.queue[0]">\n											<span> {{ \'APPLICATION_SELECT_IMAGE\' | translate }} </span>\n											<input type="file" nv-file-select="" uploader="uploader" /><br/>\n										</span>\n										<button type="button" class="btn default" data-ng-show="uploader.queue[0]" data-dismiss="fileinput" ng-click="uploader.queue[0].remove()">\n											<span> {{ \'APPLICATION_REMOVE\' | translate }} </span>\n										</button>\n										<button type="button" class="btn green-haze" data-ng-show="uploader.queue[0]" data-ng-click="uploader.queue[0].upload()" ng-disabled="uploader.queue[0].isReady || uploader.queue[0].isUploading || uploader.queue[0].isSuccess">\n											<span> {{ \'APPLICATION_CONFIRM\' | translate }} </span>\n										</button>\n									</div>\n									<p>\n										</br> {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} <b>jpg, png, jpeg</b>.\n									</p>\n								</div>\n							</div>\n						</form>\n						<div class="row">\n							<div class="col-md-2">\n								<table class="table" border="0">\n									<tbody>\n									<tr data-ng-repeat="item in uploader.queue">\n											<td style="border-top-style:none">\n												<strong>\n													{{ item.file.name }}\n												</strong>\n											</td>\n											<td data-ng-show="uploader.isHTML5" nowrap style="border-top-style:none">\n												{{ item.file.size/1024/1024|number:2 }} MB\n											</td>\n											<td nowrap style="border-top-style:none">\n												<button type="button" class="btn btn-danger btn-xs" data-ng-click="item.remove()">\n														<span class="glyphicon glyphicon-trash"></span> Remove\n												</button>\n											</td>\n										</tr>\n									</tbody>\n								</table>\n							</div>\n						</div>\n					</div>\n					<!-- END CHANGE AVATAR TAB -->\n					<!-- CHANGE PASSWORD TAB -->\n					<div class="tab-pane" id="tab_1_3" data-ng-show="Auth.isAdmin() || user.id === getCurrentUser().id">\n						<form name="forms.changePwd" data-ng-submit="forms.changePwd.$valid && updatePassword()" novalidate>\n							<!-- START CURRENT PWD -->\n							<div class="form-group" data-ng-if="!Auth.isAdmin()" data-ng-class="{\'has-error\': (forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="current_pwd" placeholder="{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}" class="form-control" data-ng-model="user.currentPwd" required/>\n								<span data-ng-show="(forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CURRENT PWD -->\n							<!-- START NEW PWD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="new_pwd" placeholder="{{\'APPLICATION_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="user.newPwd" data-ng-pattern="setting.securePassword ? settings.patternPassword : settings.patternPasswordLight" required/>\n								<span class="help-block">\n									{{setting.securePassword ? \'MESSAGE_PASSWORD_FORMAT\' : \'MESSAGE_PASSWORD_LIGTH_FORMAT\' | translate}}\n								</span>\n								<span data-ng-show="(forms.changePwd.current_pwd.$touched || forms.info.$submitted) && forms.changePwd.current_pwd.$error.pattern" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NEW PWD -->\n							<!-- START RE-NEW PWD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.re_new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.re_new_pwd.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="re_new_pwd" placeholder="{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="user.reNewPwd" nx-equal="user.newPwd" required/>\n								<span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END RE-NEW PWD -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CHANGE PASSWORD TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/staff/user/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-puzzle"></i>\n					<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-eye"></i>\n					<a href="/staff/users/list">{{ \'APPLICATION_USERS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{user.fullname}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-userpic">\n					<img ng-src="api/users/avatar/{{user.userpic ? user.userpic : \'unknown_avatar\'}}" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{user.fullname}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{user.role}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.staff.users.view.account\')}">\n							<a data-ng-href="/staff/users/view/{{user.id}}/account">\n								<i class="icon-user"></i>\n								{{ \'APPLICATION_ACCOUNT\' | translate}}\n							</a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.staff.users.view.voice\')}" data-ng-show="Auth.isAdmin()">\n							<a data-ng-href="/staff/users/view/{{user.id}}/voice">\n								<i class="icon-earphones-alt"></i>\n								{{ \'APPLICATION_VOICE\' | translate}}\n							</a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.staff.users.view.permit\')}" data-ng-show="Auth.isAdmin() && user.role === \'user\'">\n							<a data-ng-href="/staff/users/view/{{user.id}}/permit/voice">\n								<i class="icon-key"></i>\n								{{ \'APPLICATION_PERMITS\' | translate}}\n							</a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.permit.chat.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initChatQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-permit">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.permit.fax.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initFaxQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-permit">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.permit.html","<!-- BEGIN PAGE CONTENT-->\n<div class=\"row\">\n	<div class=\"col-md-12\">\n		<div>\n		    <nav class=\"navbar navbar-default\" role=\"navigation\">\n					<div class=\"collapse navbar-collapse\">\n						<ul class=\"nav navbar-nav\">\n							<li data-ng-class=\"{'active': $state.is('main.staff.users.view.permit.voice')}\">\n								<a href=\"/staff/users/view/{{user.id}}/permit/voice\">\n									<i class=\"icon-earphones-alt\"></i> {{'APPLICATION_VOICE' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.users.view.permit.chat'),'disabled-link':!license.chat}\" data-ng-show=\"Auth.isAdmin() || userModules[8]\">\n								<a href=\"{{license.chat ? '/staff/users/view/'+user.id+'/permit/chat' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"icon-bubble\"></i> {{'APPLICATION_CHAT' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.users.view.permit.mail'),'disabled-link':!license.mail}\" data-ng-show=\"Auth.isAdmin() || userModules[9]\">\n								<a href=\"{{license.mail ? '/staff/users/view/'+user.id+'/permit/mail' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"icon-envelope\"></i>{{'APPLICATION_MAIL' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.users.view.permit.fax'),'disabled-link':!license.fax}\" data-ng-show=\"Auth.isAdmin() || userModules[10]\">\n								<a href=\"{{license.fax ? '/staff/users/view/'+user.id+'/permit/fax' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"fa fa-fax\"></i> {{'APPLICATION_FAX' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.users.view.permit.sms'),'disabled-link':!license.messaging}\" data-ng-show=\"Auth.isAdmin() || userModules[11]\">\n								<a href=\"{{license.messaging ? '/staff/users/view/'+user.id+'/permit/sms' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"glyphicon glyphicon-comment\"></i> {{'APPLICATION_SMS' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.users.view.permit.openchannel'),'disabled-link':!license.openchannel}\" data-ng-show=\"Auth.isAdmin() || userModules[20]\">\n								<a href=\"{{license.openchannel ? '/staff/users/view/'+user.id+'/permit/openchannel' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"icon-globe\"></i> {{'APPLICATION_OPEN_CHANNEL' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.users.view.permit.modules')}\" data-ng-if=\"user.role !== 'admin'\">\n								<a href=\"/staff/users/view/{{user.id}}/permit/modules\">\n									<i class=\"icon-menu\"></i> {{'APPLICATION_MODULES' | translate}}\n								</a>\n							</li>\n						</ul>\n					</div>\n		    </nav>\n		</div>\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n"),a.put("app/staff/user/view/view.permit.mail.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initMailQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-permit">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.permit.modules.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row left-margin" data-ng-init="getModules()">\n	<div data-ng-repeat="module in modules" data-ng-if="!module.ModuleId && ((module.id === 8 && license.chat) || (module.id === 9 && license.mail) || (module.id === 10 && license.fax) || (module.id === 11 && license.messaging) || (module.id === 20 && license.openchannel)  || !_.includes([8,9,10,11,20],module.id))">\n		<div class="form-group" data-ng-class="{\'left-margin-40\':module.ModuleId}">\n			<span data-ng-if="module.ModuleId">âââ</span> <input\n			bs-switch\n			class="form-control"\n			ng-model="module.status"\n			type="checkbox"\n			data-ng-change="updatePermissions(module)"\n			switch-active="{{ moduleSwitch.isActive }}"\n			switch-on-text="{{ moduleSwitch.onText }}"\n			switch-off-text="{{ moduleSwitch.offText }}"\n			switch-on-color="{{ moduleSwitch.onColor }}"\n			switch-off-color="{{ moduleSwitch.offColor }}"\n			switch-animate="{{ moduleSwitch.animate }}"\n			switch-size="{{ moduleSwitch.size }}"\n			switch-label="{{ moduleSwitch.label }}"\n			switch-icon="{{ moduleSwitch.icon }}"\n			switch-radio-off="{{ moduleSwitch.radioOff }}"\n			switch-label-width="{{ moduleSwitch.labelWidth }}"\n			switch-handle-width="{{ moduleSwitch.handleWidth }}">\n			<label class="control-label">{{module.title | translate | trusted}}</label>\n		</div>\n		<div ng-slide-down="module.status" lazy-render duration="0.5">\n			<div data-ng-repeat="subModule in module.SubModules" data-ng-if="(subModule.id === 8 && license.chat) || (subModule.id === 9 && license.mail) || (subModule.id === 10 && license.fax) || (subModule.id === 11 && license.messaging) || (subModule.id === 20 && license.openchannel)  || !_.includes([8,9,10,11,20],subModule.id)">\n				<div class="form-group" data-ng-class="{\'left-margin-40\':module.ModuleId}">\n					<span>âââ</span> <input\n					bs-switch\n					class="form-control"\n					ng-model="subModule.status"\n					type="checkbox"\n					data-ng-change="updatePermissions(subModule)"\n					switch-active="{{ moduleSwitch.isActive }}"\n					switch-on-text="{{ moduleSwitch.onText }}"\n					switch-off-text="{{ moduleSwitch.offText }}"\n					switch-on-color="{{ moduleSwitch.onColor }}"\n					switch-off-color="{{ moduleSwitch.offColor }}"\n					switch-animate="{{ moduleSwitch.animate }}"\n					switch-size="{{ moduleSwitch.size }}"\n					switch-label="{{ moduleSwitch.label }}"\n					switch-icon="{{ moduleSwitch.icon }}"\n					switch-radio-off="{{ moduleSwitch.radioOff }}"\n					switch-label-width="{{ moduleSwitch.labelWidth }}"\n					switch-handle-width="{{ moduleSwitch.handleWidth }}">\n					<label class="control-label">{{subModule.title | translate}}</label>\n				</div>\n				<div ng-slide-down="subModule.status" lazy-render duration="0.5">\n					<div data-ng-repeat="subModule2 in subModule.SubModules" class="form-group" data-ng-class="{\'left-margin-40\':module.ModuleId}">\n						<span style="margin-left:40px">âââ</span> <input\n						bs-switch\n						class="form-control"\n						ng-model="subModule2.status"\n						type="checkbox"\n						data-ng-change="updatePermissions(subModule2)"\n						switch-active="{{ moduleSwitch.isActive }}"\n						switch-on-text="{{ moduleSwitch.onText }}"\n						switch-off-text="{{ moduleSwitch.offText }}"\n						switch-on-color="{{ moduleSwitch.onColor }}"\n						switch-off-color="{{ moduleSwitch.offColor }}"\n						switch-animate="{{ moduleSwitch.animate }}"\n						switch-size="{{ moduleSwitch.size }}"\n						switch-label="{{ moduleSwitch.label }}"\n						switch-icon="{{ moduleSwitch.icon }}"\n						switch-radio-off="{{ moduleSwitch.radioOff }}"\n						switch-label-width="{{ moduleSwitch.labelWidth }}"\n						switch-handle-width="{{ moduleSwitch.handleWidth }}">\n						<label class="control-label">{{subModule2.title | translate}}</label>\n					</div>\n				</div>\n			</div>\n		</div>\n	</div>\n	<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.permit.openchannel.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initOpenchannelQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-permit">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.permit.sms.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initSmsQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-permit">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.permit.voice.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initVoiceQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-permit">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.voice.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_ACCOUNT\' | translate}} {{ \'APPLICATION_VOICE\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.info" data-ng-submit="updateItem()" novalidate>\n\n					<!-- START INTERNAL -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$invalid}">\n						<label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" min="1" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="user.internal" required readonly/>\n						<span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n						<span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.ngRemoteValidate" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_INTERNAL\' | translate}}.\n						</span>\n					</div>\n					<!-- END INTERNAL -->\n\n					<!-- START TRANSPORT -->\n					<div class="form-group">\n						<label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n						<ui-select multiple name="transport" ng-model="user.transport" theme="bootstrap" ng-disabled="disabled">\n							<ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n							<ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n								{{transport}}\n							</ui-select-choices>\n						</ui-select>\n						<span class="help-block">\n							{{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n						</span>\n					</div>\n					<!-- END TRANSPORT -->\n\n					<!-- START CODEC -->\n					<div class="form-group">\n						<label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n						<ui-select multiple ng-model="user.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n							<ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n'+"							<ui-select-choices repeat=\"allow in ['g729', 'ilbc', 'gsm', 'ulaw', 'alaw'] | filter: $select.search\">\n								{{allow}}\n							</ui-select-choices>\n						</ui-select>\n						<span class=\"help-block\">\n							{{ 'DESCRIPTION_VOICE_CODEC' | translate }}\n						</span>\n					</div>\n					<!-- END CODEC -->\n\n					<input class=\"btn green-haze\" type=\"submit\" value=\"{{'APPLICATION_UPDATE' | translate}}\"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n"),a.put("app/staff/user/wizard/wizard.html",'<div class="col-md-12">\n  <!-- BEGIN PAGE HEADER-->\n	<div class="page-bar">\n		<ul class="page-breadcrumb">\n			<li>\n				<i class="icon-rocket"></i>\n				<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-puzzle"></i>\n				<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-eye"></i>\n				<a href="/staff/users/list">{{ \'APPLICATION_USERS\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-options"></i>\n				<a href="/staff/users/wizard">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n			</li>\n		</ul>\n	</div>\n  <!-- END PAGE HEADER-->\n\n  <!-- BEGIN PORTLET-->\n  <div class="portlet light bordered" data-ng-init="initWizard();">\n  	<div class="portlet-title">\n  		<div class="caption font-green-sharp">\n  			<i class="icon-user font-green-sharp"></i>\n  			<span class="caption-subject">{{ \'APPLICATION_USER\' | translate }} WIZARD</a> </span>\n  		</div>\n  	</div>\n  	<div class="portlet-body">\n  		<wizard on-finish="createItem()">\n				<wz-step title="{{\'APPLICATION_ACCOUNT\' | translate}}" canexit="exitValidation(forms.info.$valid)">\n			    <form name="forms.info" novalidate>\n\n						<!-- START ROLE -->\n						<div class="form-group" data-ng-if="Auth.getCurrentUser().role === \'admin\'">\n							<label class="control-label">{{ \'APPLICATION_ROLE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select name="role" data-ng-model="item.role" theme="bootstrap" required>\n								<ui-select-match placeholder="Select role...">{{$select.selected | uppercase}}</ui-select-match>\n								<ui-select-choices repeat="role in [\'user\', \'admin\'] | filter: $select.search">\n									{{role | uppercase}}\n								</ui-select-choices>\n							</ui-select>\n						</div>\n						<!-- END ROLE -->\n\n			      <!-- START NAME -->\n			      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n			        <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n			        <input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n							<span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n			        </span>\n			      </div>\n			      <!-- END NAME -->\n\n			      <!-- START USERNAME -->\n			      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n			        <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n			        <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required />\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n			        </span>\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n							</span>\n			      </div>\n			      <!-- END USERNAME -->\n\n			      <!-- START EMAIL -->\n			      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$invalid}">\n			        <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n			        <input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="item.email" required />\n			        <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.required" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n			        </span>\n			        <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.email" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n			        </span>\n			      </div>\n			      <!-- END EMAIL -->\n\n			      <!-- START PASSWORD -->\n			      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n			        <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" data-ng-pattern="setting.securePassword ? settings.patternPassword : settings.patternPasswordLight" required/>\n							<span class="help-block">\n								{{setting.securePassword ? \'MESSAGE_PASSWORD_FORMAT\' : \'MESSAGE_PASSWORD_LIGTH_FORMAT\' | translate}}\n							</span>\n							<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.required" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n			        </span>\n			      </div>\n			      <!-- END PASSWORD -->\n\n			      <!-- START RE PASSWORD -->\n			      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$invalid}">\n			        <label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n			        <input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.rpassword" nx-equal="item.password" required/>\n			        <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.required" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n			        </span>\n			        <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.nxEqual" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n			        </span>\n			      </div>\n			      <!-- END RE PASSWORD -->\n\n						<!-- START INTERNAL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$invalid}">\n							<label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<div class="input-group">\n								<input type="number" min="1" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="item.internal" data-ng-disabled="!item.internalEnabled" data-ng-required="item.internalEnabled"/>\n								<span class="input-group-addon">\n									<input type="checkbox" data-ng-model="item.internalEnabled">\n								</span>\n							</div>\n							<span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END INTERNAL -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n							<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n						</div>\n						<!-- END DESCRIPTION -->\n\n			      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n			    </form>\n			  </wz-step>\n\n				<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n					<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n					<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n				</wz-step>\n  		</wizard>\n  	</div>\n  </div>\n  <!-- END PORTLET-->\n</div>\n'),
-a.put("app/sugarcrm/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-handbag"></i>\n					<a href="/sugarcrm/list">{{ \'APPLICATION_SUGARCRM\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-handbag font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_SUGARCRM\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/sugarcrm/wizard" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/sugarcrm/view/view.account.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n								<span data-ng-show="forms.formSetting.apiKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END API KEY -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/sugarcrm/view/view.configuration.html",'<div class="row" data-ng-init="initConfiguration()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_CONFIGURATION\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createConfiguration()">\n	        <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="formValidation(formsConfiguration.info.$valid)">\n							<form name="formsConfiguration.info" novalidate>\n								<!-- START NAME -->\n								<div class="form-group" data-ng-class="{\'has-error\': formsConfiguration.info.$submitted && formsConfiguration.info.name.$invalid}">\n									<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="configuration.name" required/>\n									<span data-ng-show="formsConfiguration.info.name.$invalid && formsConfiguration.info.$submitted" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END NAME -->\n								<!-- START DESCRIPTION -->\n								<div class="form-group">\n									<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n									<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="configuration.description"/>\n								</div>\n								<!-- END DESCRIPTION -->\n\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n							</form>\n						</wz-step>\n\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/sugarcrm/view/view.configurationSettings.html",'<div class="row" data-ng-init="getConfiguration();getVariables();getFields();">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\n					</li>\n          <li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\n					</li>\n          <li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- SUBJECT TAB -->\n					<div class="tab-pane ui-padding active" id="tab_1_1">\n            <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by blank space:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemSubject()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n	            <div class="row" data-ng-repeat="subjectItem in subjectConfig">\n	              <div class="col-md-3">\n	                <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n	                  <ui-select-choices repeat="item in fieldType | filter: $select.search">\n	                    <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\n	                <div class="form-group">\n	                  <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\n	                </div>\n	              </div>\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END SUBJECT TAB -->\n          <!-- DESCRIPTION TAB -->\n					<div class="tab-pane ui-padding" id="tab_1_2">\n						<div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by new line:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemDescription()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n							<div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\n								<!-- <pre>\n									{{descriptionItem|json}}\n								</pre> -->\n	              <div class="col-md-2">\n	                <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n	                  <ui-select-choices repeat="item in descFieldType | filter: $select.search">\n	                    <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\n	                <div class="form-group">\n	                  <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\n	                </div>\n	              </div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n									<input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\n								</div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n									<ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n	                  <ui-select-choices repeat="item in fieldType | filter: $select.search">\n	                    <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n								</div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'string\'">\n									<input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\n								</div>\n	              <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'variable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END DESCRIPTION TAB -->\n          <!-- FIELDS TAB -->\n					<div class="tab-pane ui-padding" id="tab_1_3">\n						<div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemField()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n	            <div class="row" data-ng-repeat="fieldItem in fieldConfig">\n	              <div class="col-md-3">\n	                <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\n	                  <ui-select-choices repeat="item.name as item in accountFields | filter: $select.search">\n	                    <div ng-bind-html="item.label | highlight: $select.search"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\n	                <div class="form-group">\n										<ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n		                  <ui-select-choices repeat="item.value as item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\n		                    <div ng-bind-html="item.name | highlight: $select.search"></div>\n		                  </ui-select-choices>\n		                </ui-select>\n	                </div>\n	              </div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\n									<div class="form-group">\n										<ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n		                  <ui-select-choices repeat="item in fieldType | filter: $select.search">\n		                    <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n		                  </ui-select-choices>\n		                </ui-select>\n									</div>\n								</div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\n	                <div class="form-group">\n										<input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\n	                </div>\n	              </div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\n	                <div class="form-group">\n										<ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END FIELDS TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/sugarcrm/view/view.configurations.html",'<div ui-view class="profile-content">\n	<div class="row" data-ng-init="getConfigurations()">\n		<div class="col-md-12">\n			<div class="portlet light">\n				<div class="portlet-title  tabbable-line">\n					<div class="caption caption-md">\n						<i class="icon-globe theme-font hide"></i>\n						<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATIONS\' | translate}}</span>\n					</div>\n					<div class="actions">\n						<div class="btn-group">\n							<a class="btn green-jungle " href="/sugarcrm/view/{{account.id}}/configuration" data-toggle="dropdown">\n								<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}\n							</a>\n						</div>\n					</div>\n				</div>\n				<div class="portlet-body">\n					<!-- START TABLE -->\n					<table class="table table-striped table-bordered table-hover">\n						  <thead>\n							  <tr>\n							    <th>{{\'APPLICATION_NAME\' | translate}}</th>\n									<th>{{\'APPLICATION_DESCRIPTION\' | translate}}</th>\n									<th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n							  </tr>\n						  </thead>\n							<tbody>\n						    <tr data-ng-repeat="configuration in configurations">\n									<td>{{configuration.name}}</td>\n									<td>{{configuration.description}}</td>\n						      <td>\n										<a class="btn default btn-xs blue-stripe" data-ng-href="/sugarcrm/view/{{account.id}}/configurations/settings/{{configuration.id}}">\n											{{ \'APPLICATION_SETTINGS\' | translate}}\n						        </a>\n						        <a class="btn default btn-xs red-stripe" data-ng-click="deleteConfiguration(configuration.name,configuration.id)">\n											{{ \'APPLICATION_DELETE\' | translate }}\n						        </a>\n						      </td>\n						    </tr>\n								<tr data-ng-hide="configurations.length">\n									<td colspan="5" style="text-align:center;">\n										<i>No configuration available</i>\n									</td>\n								</tr>\n						  </tbody>\n					</table>\n					<!-- END TABLE -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/sugarcrm/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n          <i class="icon-handbag"></i>\n          <a href="/sugarcrm/list">{{ \'APPLICATION_SUGARCRM\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{account.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img src="assets/images/media/sugarcrm.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{account.name}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{account.remoteUri}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.sugarcrm.view.account\')}">\n							<a ng-href="/sugarcrm/view/{{account.id}}/account">\n							<i class="icon-user"></i>\n							{{ \'APPLICATION_ACCOUNT\' | translate }} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.sugarcrm.view.configurations\') || $state.is(\'main.sugarcrm.view.configuration\')}">\n							<a ng-href="/sugarcrm/view/{{account.id}}/configurations">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_CONFIGURATIONS\' | translate }} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/sugarcrm/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-handbag"></i>\n						<a href="/sugarcrm/list">{{ \'APPLICATION_SUGARCRM\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n						<form name="forms.formSetting" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.username" required/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remoteUri" required ng-remote-validate="/api/sugarcrm/accounts/validate/remoteUri"/>\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n                <span data-ng-show="(forms.formSetting.remoteUri.$touched || forms.formSetting.$submitted) && forms.formSetting.remoteUri.$error.ngRemoteValidate" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_DOMAIN\' | translate}}.\n				        </span>\n							</div>\n							<!-- END USERNAME -->\n\n              <!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n								<span data-ng-show="forms.formSetting.apiKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n\n				</wizard>\n\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/answer/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CANNED_ANSWER\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.key.$touched || form.$submitted) && form.key.$invalid}">\n      <label class="control-label">{{\'APPLICATION_KEY\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="key" placeholder="{{\'APPLICATION_KEY\' | translate}}" class="form-control" data-ng-model="item.key" required/>\n      <span data-ng-show="(form.key.$touched || form.$submitted) && form.key.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START VALUE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.value.$touched || form.$submitted) && form.value.$invalid}">\n      <label class="control-label">{{\'APPLICATION_VALUE\' | translate}}<span class="required" aria-required="true">*</span></label></label>\n      <textarea type="text" name="value" placeholder="{{\'APPLICATION_VALUE\' | translate}}" class="form-control" data-ng-model="item.value" required></textarea>\n      <span data-ng-show="(form.value.$touched || form.$submitted) && form.value.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END VALUE -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),
-a.put("app/tools/answer/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-magic-wand"></i>\n					<a href="#">{{ \'APPLICATION_CANNED_ANSWERS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-magic-wand font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_CANNED_ANSWERS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="#" data-toggle="dropdown" data-ng-click="createItem()">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CANNED_ANSWER\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n						<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/answer/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getAnswer()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-magic-wand"></i>\n					<a href="/tools/answers/list">{{ \'APPLICATION_CANNED_ANSWER\' | translate }}</a>\n					<i data-ng-show="answer" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="answer">\n					<a href="#">{{answer.key}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/answer.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{answer.name}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.answers.view.settings\')}">\n							<a data-ng-href="/tools/answers/view/{{answer.id}}/settings">\n								<i class="icon-settings"></i>\n								{{ \'APPLICATION_SETTINGS\' | translate}}\n							</a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/answer/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_CANNED_ANSWER\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateAnswer()" novalidate>\n\n							<!-- START KEY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.key.$touched || forms.general.$submitted) && forms.general.key.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="key" placeholder="{{\'APPLICATION_KEY\' | translate}}" class="form-control" data-ng-model="answer.key" required/>\n								<span data-ng-show="(forms.general.key.$touched || forms.general.$submitted) && forms.general.key.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END KEY -->\n\n							<!-- START VALUE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.value.$touched || forms.general.$submitted) && forms.general.value.$invalid}">\n								<label class="control-label">{{\'APPLICATION_VALUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<textarea type="text" name="value" placeholder="{{\'APPLICATION_VALUE\' | translate}}" class="form-control" data-ng-model="answer.value" required></textarea>\n								<span data-ng-show="(forms.general.value.$touched || forms.general.$submitted) && forms.general.value.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END VALUE -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="answer.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/automation/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-wrench"></i>\n						<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-bulb"></i>\n						<a href="#">{{ \'APPLICATION_AUTOMATIONS\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-bulb font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_AUTOMATIONS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle " href="/tools/automations/wizard">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_AUTOMATION\' | translate }}\n						</a>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/automation/view/view.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-settings"></i>\n					<a href="/tools/automations/list">{{ \'APPLICATION_AUTOMATIONS\' | translate }}</a>\n					<i class="fa fa-angle-right" data-ng-show="automation"></i>\n				</li>\n				<li data-ng-show="automation">\n					<a href="#">{{ automation.description || automation.name }}</a>\n				</li>\n			</ul>\n		</div>\n\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/automation.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ automation.name }}\n					</div>\n					<div class="profile-usertitle-job">\n						{{ automation.description }}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.automations.view.settings\')}">\n							<a href="/tools/automations/view/{{automation.id}}/settings">\n							<i class="icon-bulb"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate }} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/automation/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_CONDITIONS\' | translate}} & {{\'APPLICATION_ACTIONS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.general" data-ng-submit="exitValidation(forms.general.$valid) && updateAutomation()" novalidate>\n					<div class="tab-content">\n						<!-- GENERAL TAB -->\n						<div class="tab-pane active" id="tab_1_1">\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="automation.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START CHANNEL -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.channel.$touched || forms.general.$submitted) && forms.general.channel.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CHANNEL\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="channel" placeholder="{{\'APPLICATION_CHANNEL\' | translate}}" class="form-control" data-ng-model="automation.channel" required readonly/>\n								<span data-ng-show="(forms.general.channel.$touched || forms.general.$submitted) && forms.general.channel.$invalid && forms.general.channel.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CHANNEL -->\n\n							<!-- START TIMEOUT -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.general.timeout.$touched && forms.general.timeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} ({{\'APPLICATION_MINUTES\' | translate}})</label>\n								<input type="number" name="timeout" min="10" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}} (min 10 {{\'APPLICATION_MINUTES\' | translate}})" class="form-control" data-ng-model="automation.timeout" data-ng-init="item.timeout = 10" required/>\n								<span data-ng-show="forms.general.timeout.$touched && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIMEOUT -->\n\n							<!-- START STATUS -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_STATUS\' | translate}}</label>\n								</br>\n								<input bs-switch class="form-control" ng-model="automation.status" type="checkbox" name="status" switch-active="{{ recordSwitch.isActive }}" switch-on-text="{{ recordSwitch.onText }}" switch-off-text="{{ recordSwitch.offText }}" switch-on-color="{{ recordSwitch.onColor }}"\n												switch-off-color="{{ recordSwitch.offColor }}" switch-animate="{{ recordSwitch.animate }}" switch-size="{{ recordSwitch.size }}" switch-label="{{ recordSwitch.label }}" switch-icon="{{ recordSwitch.icon }}" switch-radio-off="{{ recordSwitch.radioOff }}"\n												switch-label-width="{{ recordSwitch.labelWidth }}" switch-handle-width="{{ recordSwitch.handleWidth }}">\n							</div>\n							<!-- END STATUS -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="automation.description" />\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}" />\n						</div>\n						<!-- END GENERAL TAB -->\n						<div class="tab-pane" id="tab_1_2">\n							<!-- All -->\n							<div class="portlet light bordered">\n								<div class="portlet-title">\n									<div class="caption font-blue-hoki">\n										<i class="icon-tag font-blue-hoki"></i>\n										<span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ALL_CONDITIONS\' | translate"></span>:\n									</div>\n								</div>\n								<div class="portlet-body">\n									<div class="portlet light bordered" ng-repeat="all in automation.All">\n										<div class="portlet-title">\n											<div class="caption font-blue-hoki">\n												<span class="caption-subject">{{ \'APPLICATION_ALL\' | translate }} #{{$index+1}}</span>\n											</div>\n											<div class="actions">\n												<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeCondition(\'All\',$index)"><i class="fa fa-trash"></i></a>\n											</div>\n										</div>\n										<div class="portlet-body">\n											<div class="padding-bottom row">\n												<div class="col-md-12">\n													<condition-builder element="all" serviceindex="automation.channel" service="$automations" form="forms.general"></condition-builder>\n												</div>\n											</div>\n										</div>\n									</div>\n									<div class="row">\n										<div class="col-md-12">\n											<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'All\')">\n												<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n											</button>\n										</div>\n									</div>\n								</div>\n							</div>\n\n							<!-- Any -->\n							<div class="portlet light bordered">\n								<div class="portlet-title">\n									<div class="caption font-blue-hoki">\n										<i class="icon-tag font-blue-hoki"></i>\n										<span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ANY_CONDITIONS\' | translate"></span>:\n									</div>\n								</div>\n								<div class="portlet-body">\n									<div class="portlet light bordered" ng-repeat="any in automation.Any">\n										<div class="portlet-title">\n											<div class="caption font-blue-hoki">\n												<span class="caption-subject">{{ \'APPLICATION_ANY\' | translate }} #{{$index+1}}</span>\n											</div>\n											<div class="actions">\n												<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeCondition(\'Any\',$index)"><i class="fa fa-trash"></i></a>\n											</div>\n										</div>\n										<div class="portlet-body">\n											<div class="padding-bottom row">\n												<div class="col-md-12">\n													<condition-builder element="any" serviceindex="automation.channel" service="$automations" form="forms.general"></condition-builder>\n												</div>\n											</div>\n										</div>\n									</div>\n									<div class="row">\n										<div class="col-md-12">\n											<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'Any\')">\n												<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n											</button>\n										</div>\n									</div>\n								</div>\n							</div>\n\n							<!-- Actions -->\n							<div class="portlet light bordered">\n								<div class="portlet-title">\n									<div class="caption font-blue-hoki">\n										<i class="icon-tag font-blue-hoki"></i>\n										<span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }}</span>:\n									</div>\n								</div>\n								<div class="portlet-body">\n									<div class="portlet light bordered" ng-repeat="action in automation.Actions">\n										<div class="portlet-title">\n											<div class="caption font-blue-hoki">\n												<span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }} #{{$index+1}}</span>\n											</div>\n											<div class="actions">\n												<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeAction($index)"><i class="fa fa-trash"></i></a>\n											</div>\n										</div>\n										<div class="portlet-body">\n											<div class="padding-bottom row">\n												<div class="col-md-12">\n													<div class="form-group col-md-6" data-ng-class="{\'has-error\': (forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$invalid}">\n														<ui-select data-ng-model="action.action" theme="bootstrap" data-ng-change="resetActionData(action)" name="action{{$index}}" required>\n															<ui-select-match placeholder="{{ \'APPLICATION_ACTION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n															<ui-select-choices repeat="tAction.value as tAction in $automations.services[automation.channel].actions | filter: $select.search">\n																<div ng-bind-html="tAction.name | translate | highlight: $select.search"></div>\n															</ui-select-choices>\n														</ui-select>\n														<span class="help-block">\n												{{ \'APPLICATION_ACTION\' | translate }}\n											</span>\n														<span data-ng-show="(forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n													</div>\n													<div ng-switch="action.action">\n														<action-builder-status ng-switch-when="status" element="action" form="forms.settings"></action-builder-status>\n													</div>\n												</div>\n											</div>\n										</div>\n									</div>\n									<div class="row">\n										<div class="col-md-12">\n											<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addAction()">\n												<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_ACTION\' | translate}}\n											</button>\n										</div>\n									</div>\n								</div>\n							</div>\n							<div class="has-error" data-ng-show="forms.general.$submitted && !automation.All.length && !automation.Any.length">\n								<span class="help-block help-block-error form-control">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_CONDITION\' | translate}}.\n							</span>\n							</div>\n							<div class="has-error" data-ng-show="forms.general.$submitted && !automation.Actions.length">\n								<span class="help-block help-block-error form-control">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_ACTION\' | translate}}.\n							</span>\n							</div>\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}" />\n						</div>\n					</div>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/automation/wizard/wizard.html",'<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN PAGE HEADER-->\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-settings"></i>\n					<a href="/tools/automations/list">{{ \'APPLICATION_AUTOMATIONS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n		<!-- END PAGE HEADER-->\n\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-bulb font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_AUTOMATIONS\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n					<wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(forms.general.$valid)">\n						<form name="forms.general" data-ng-submit="submit()" novalidate>\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.general.name.$touched && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="forms.general.name.$touched && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START STATUS -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_STATUS\' | translate}}</label></br>\n							<input\n								    bs-switch\n										class="form-control"\n								    ng-model="item.status"\n								    type="checkbox"\n										name="status"\n										data-ng-init="item.status = 0"\n								    switch-active="{{ statusSwitch.isActive }}"\n								    switch-on-text="{{ statusSwitch.onText }}"\n								    switch-off-text="{{ statusSwitch.offText }}"\n								    switch-on-color="{{ statusSwitch.onColor }}"\n								    switch-off-color="{{ statusSwitch.offColor }}"\n								    switch-animate="{{ statusSwitch.animate }}"\n								    switch-size="{{ statusSwitch.size }}"\n								    switch-label="{{ statusSwitch.label }}"\n								    switch-icon="{{ statusSwitch.icon }}"\n								    switch-radio-off="{{ statusSwitch.radioOff }}"\n								    switch-label-width="{{ statusSwitch.labelWidth }}"\n								    switch-handle-width="{{ statusSwitch.handleWidth }}">\n							</div>\n							<!-- END STATUS -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						</form>\n					</wz-step>\n					<wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitSettingsValidation(forms.settings.$valid)">\n						<form name="forms.settings" novalidate>\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject">{{ \'APPLICATION_CHANNEL\' | translate }}</span>\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.channel.$touched || forms.settings.$submitted) && forms.settings.channel.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_CHANNEL\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="item.channel" name="channel" theme="bootstrap" required>\n										<ui-select-match placeholder="{{ \'APPLICATION_CHANNEL\' | translate }}">{{$select.selected | capitalize}}</ui-select-match>\n										<ui-select-choices repeat="channel in $automations.channels | filter: $select.search">\n											<div ng-bind-html="channel | highlight: $select.search | capitalize"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.settings.channel.$touched || forms.settings.$submitted) && forms.settings.channel.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n						</div>\n\n						<!-- All -->\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ALL_CONDITIONS\' | translate"></span>:\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="portlet light bordered" ng-repeat="all in item.All">\n									<div class="portlet-title">\n										<div class="caption font-blue-hoki">\n											<span class="caption-subject">{{ \'APPLICATION_ALL\' | translate }} #{{$index+1}}</span>\n										</div>\n										<div class="actions">\n											<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeCondition(\'All\',$index)"><i class="fa fa-trash"></i></a>\n										</div>\n									</div>\n									<div class="portlet-body">\n										<div class="padding-bottom row">\n											<div class="col-md-12">\n												<condition-builder element="all" serviceindex="item.channel" service="$automations" form="forms.general"></condition-builder>\n											</div>\n										</div>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-12">\n										<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'All\')">\n											<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n										</button>\n									</div>\n								</div>\n							</div>\n						</div>\n\n						<!-- Any -->\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ANY_CONDITIONS\' | translate"></span>:\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="portlet light bordered" ng-repeat="any in item.Any">\n									<div class="portlet-title">\n										<div class="caption font-blue-hoki">\n											<span class="caption-subject">{{ \'APPLICATION_ANY\' | translate }} #{{$index+1}}</span>\n										</div>\n										<div class="actions">\n											<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeCondition(\'Any\',$index)"><i class="fa fa-trash"></i></a>\n										</div>\n									</div>\n									<div class="portlet-body">\n										<div class="padding-bottom row">\n											<div class="col-md-12">\n												<condition-builder element="any" serviceindex="item.channel" service="$automations" form="forms.general"></condition-builder>\n											</div>\n										</div>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-12">\n										<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'Any\')">\n											<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n										</button>\n									</div>\n								</div>\n							</div>\n						</div>\n\n						<!-- Actions -->\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }}</span>:\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="portlet light bordered" ng-repeat="action in item.Actions">\n									<div class="portlet-title">\n										<div class="caption font-blue-hoki">\n											<span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }} #{{$index+1}}</span>\n										</div>\n										<div class="actions">\n											<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeAction($index)"><i class="fa fa-trash"></i></a>\n										</div>\n									</div>\n									<div class="portlet-body">\n										<div class="padding-bottom row">\n											<div class="col-md-12">\n												<div class="form-group col-md-6" data-ng-class="{\'has-error\': (forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$invalid}">\n													<ui-select data-ng-model="action.action" theme="bootstrap" data-ng-change="resetActionData(action)" name="action{{$index}}" required>\n														<ui-select-match placeholder="{{ \'APPLICATION_ACTION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n														<ui-select-choices repeat="tAction.value as tAction in $automations.services[item.channel].actions | filter: $select.search">\n															<div ng-bind-html="tAction.name | translate | highlight: $select.search"></div>\n														</ui-select-choices>\n													</ui-select>\n													<span class="help-block">\n												{{ \'APPLICATION_ACTION\' | translate }}\n											</span>\n													<span data-ng-show="(forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n												</div>\n												<div ng-switch="action.action">\n													<action-builder-status ng-switch-when="status" element="action" form="forms.settings"></action-builder-status>\n												</div>\n											</div>\n										</div>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-12">\n										<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addAction()">\n											<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_ACTION\' | translate}}\n										</button>\n									</div>\n								</div>\n							</div>\n						</div>\n						<div class="has-error" data-ng-show="forms.settings.$submitted && !item.All.length && !item.Any.length">\n							<span class="help-block help-block-error form-control">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_CONDITION\' | translate}}.\n							</span>\n						</div>\n						<div class="has-error" data-ng-show="forms.settings.$submitted && !item.Actions.length">\n							<span class="help-block help-block-error form-control">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_ACTION\' | translate}}.\n							</span>\n						</div>\n						<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n					</form>\n					</wz-step>\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n						<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/tools/interval/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_INTERVAL\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/interval/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-clock"></i>\n					<a href="#">{{ \'APPLICATION_INTERVALS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_INTERVALS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_INTERVAL\' | translate }}\n						</button>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/interval/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getInterval()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-clock"></i>\n					<a href="/tools/intervals/list">{{ \'APPLICATION_INTERVALS\' | translate }}</a>\n					<i data-ng-show="interval" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="interval">\n					<a href="#">{{interval.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/interval.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{interval.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.intervals.view.settings\')}">\n							<a data-ng-click="deselectAndRedirect(\'/tools/intervals/view/\'+interval.id+\'/settings\')">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n'+"						<li data-ng-class=\"{active: $state.is('main.tools.intervals.view.subintervals') || $state.is('main.tools.intervals.view.subinterval') || $state.is('main.tools.intervals.view.subintervals.settings')}\">\n							<a data-ng-click=\"deselectAndRedirect('/tools/intervals/view/'+interval.id+'/subintervals')\">\n							<i class=\"icon-list\"></i>\n							{{ 'APPLICATION_SUBINTERVALS' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class=\"profile-content\">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n"),a.put("app/tools/interval/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_INTERVAL\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateInterval()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="interval.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="interval.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/interval/view/view.subinterval.html",'\n<div class="row" data-ng-init="initSubInterval(true)">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_NEW_SUBINTERVAL\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="addSubInterval()">\n          <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitValidation(forms.subinterval.name.$valid)">\n            <form name="forms.subinterval" novalidate>\n\n              <!-- START NAME -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.subinterval.name.$touched || forms.subinterval.$submitted) && forms.subinterval.name.$invalid}">\n                <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="subinterval.name" required/>\n                <span data-ng-show="(forms.subinterval.name.$touched || forms.subinterval.$submitted) && forms.subinterval.name.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END NAME -->\n\n							<!-- START TIME -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n                <div class="input-group input-large">\n									<fieldset class="pull-left" ng-disabled="splittedInterval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="splittedInterval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n                  <div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n									<fieldset ng-disabled="splittedInterval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="splittedInterval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n									<label class="control-label pointer-cursor margin-top20"><input\n									bs-switch\n									class="form-control"\n									ng-model="splittedInterval.alwaysTime"\n									type="checkbox"\n									switch-active="{{ switch.isActive }}"\n									switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n									switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n									switch-on-color="{{ switch.onColor }}"\n									switch-off-color="{{ switch.offColor }}"\n									switch-animate="{{ switch.animate }}"\n									switch-size="{{ switch.size }}"\n									switch-label="{{ switch.label }}"\n									switch-icon="{{ switch.icon }}"\n									switch-radio-off="{{ switch.radioOff }}"\n									switch-label-width="{{ switch.labelWidth }}"\n									switch-handle-width="{{ switch.handleWidth }}"> {{\'APPLICATION_ALWAYS\' | translate}}</label>\n                </div>\n              </div>\n              <!-- END TIME -->\n\n              <!-- START WEEKDAY -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.wd_from" theme="bootstrap" name="wd_from">\n                    <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{weekDay.name | translate}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.wd_to" theme="bootstrap" name="wd_to">\n                    <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{weekDay.name | translate}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END WEEKDAY -->\n\n							<!-- START MONTHDAY -->\n							<div class="form-group">\n								<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n								<div class="input-group input-large">\n									<ui-select data-ng-model="splittedInterval.md_from" theme="bootstrap" name="md_from">\n										<ui-select-match>{{$select.selected===\'always\' ? ($select.selected | capitalize) : $select.selected}}</ui-select-match>\n										<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="splittedInterval.md_to && splittedInterval.md_to!==\'always\' && monthDay>splittedInterval.md_to && monthDay!==\'always\'">\n											{{monthDay===\'always\' ? (monthDay | capitalize) : monthDay}}\n										</ui-select-choices>\n									</ui-select>\n									<span class="input-group-addon">to</span>\n									<ui-select data-ng-model="splittedInterval.md_to" theme="bootstrap" name="md_to">\n										<ui-select-match>{{$select.selected===\'always\' ? ($select.selected | capitalize) : $select.selected}}</ui-select-match>\n										<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="splittedInterval.md_from && splittedInterval.md_from!==\'always\' && monthDay<splittedInterval.md_from && monthDay!==\'always\'">\n											{{monthDay===\'always\' ? (monthDay | capitalize) : monthDay}}\n										</ui-select-choices>\n									</ui-select>\n								</div>\n							</div>\n							<!-- END MONTHDAY -->\n\n\n              <!-- START MONTH -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.m_from" theme="bootstrap" name="m_from">\n                    <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{month.name | translate}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.m_to" theme="bootstrap" name="m_to">\n                    <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{month.name | translate}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END MONTH -->\n\n\n\n							<button class="btn green-haze" type="submit" ng-click="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n            </form>\n          </wz-step>\n\n\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/interval/view/view.subintervalSettings.html",'\n<div class="row" data-ng-init="initSubInterval();getSubInterval();">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_SUBINTERVAL_SETTINGS\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="updateInterval(\'subintervals\')">\n					<div class="profile-usertitle-name">\n						{{subinterval.name}}\n					</div>\n          <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitValidation(forms.subinterval.name.$valid)">\n            <form name="forms.subinterval" novalidate>\n\n              <!-- START NAME -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.subinterval.name.$touched || forms.subinterval.$submitted) && forms.subinterval.name.$invalid}">\n                <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="interval.SubIntervals[selectedSubInterval].name" required/>\n                <span data-ng-show="(forms.subinterval.name.$touched || forms.subinterval.$submitted) && forms.subinterval.name.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END NAME -->\n\n              <!-- START TIME -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n                <div class="input-group input-large">\n									<fieldset class="pull-left" ng-disabled="splittedInterval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="splittedInterval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n                  <div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n									<fieldset ng-disabled="splittedInterval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="splittedInterval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n									<label class="control-label pointer-cursor margin-top20"><input\n									bs-switch\n									class="form-control"\n									ng-model="splittedInterval.alwaysTime"\n									type="checkbox"\n									switch-active="{{ switch.isActive }}"\n									switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n									switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n									switch-on-color="{{ switch.onColor }}"\n									switch-off-color="{{ switch.offColor }}"\n									switch-animate="{{ switch.animate }}"\n									switch-size="{{ switch.size }}"\n									switch-label="{{ switch.label }}"\n									switch-icon="{{ switch.icon }}"\n									switch-radio-off="{{ switch.radioOff }}"\n									switch-label-width="{{ switch.labelWidth }}"\n									switch-handle-width="{{ switch.handleWidth }}"> {{\'APPLICATION_ALWAYS\' | translate}}</label>\n                </div>\n              </div>\n              <!-- END TIME -->\n\n              <!-- START WEEKDAY -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.wd_from" theme="bootstrap" name="wd_from">\n                    <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{weekDay.name | translate}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.wd_to" theme="bootstrap" name="wd_to">\n                    <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{weekDay.name | translate}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END WEEKDAY -->\n\n							<!-- START MONTHDAY -->\n							<div class="form-group">\n								<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n								<div class="input-group input-large">\n									<ui-select data-ng-model="splittedInterval.md_from" theme="bootstrap" name="md_from">\n										<ui-select-match>{{$select.selected===\'always\' ? ($select.selected | capitalize) : $select.selected}}</ui-select-match>\n										<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="splittedInterval.md_to && splittedInterval.md_to!==\'always\' && monthDay>splittedInterval.md_to && monthDay!==\'always\'">\n											{{monthDay===\'always\' ? (monthDay | capitalize) : monthDay}}\n										</ui-select-choices>\n									</ui-select>\n									<span class="input-group-addon">to</span>\n									<ui-select data-ng-model="splittedInterval.md_to" theme="bootstrap" name="md_to">\n										<ui-select-match>{{$select.selected===\'always\' ? ($select.selected | capitalize) : $select.selected}}</ui-select-match>\n										<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="splittedInterval.md_from && splittedInterval.md_from!==\'always\' && monthDay<splittedInterval.md_from && monthDay!==\'always\'">\n											{{monthDay===\'always\' ? (monthDay | capitalize) : monthDay}}\n										</ui-select-choices>\n									</ui-select>\n								</div>\n							</div>\n							<!-- END MONTHDAY -->\n\n              <!-- START MONTH -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.m_from" theme="bootstrap" name="m_from">\n                    <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{month.name | translate}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.m_to" theme="bootstrap" name="m_to">\n                    <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{month.name | translate}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END MONTH -->\n\n\n\n							<button class="btn green-haze" type="submit" ng-click="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n            </form>\n          </wz-step>\n\n\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/interval/view/view.subintervals.html",'<div ui-view class="profile-content">\n<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title  tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SUBINTERVALS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group">\n						<a class="btn green-jungle " href="/tools/intervals/view/{{interval.id}}/subinterval" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_SUBINTERVAL\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div data-ng-if="selectedSubInterval === undefined" ui-grid="gridOptions"  ui-grid-resize-columns class="grid" ui-grid-draggable-rows>\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/tools/pause/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PAUSE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/pause/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-pause"></i>\n					<a href="#">{{ \'APPLICATION_PAUSES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="fa fa-pause font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_PAUSES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="#" data-toggle="dropdown" data-ng-click="createItem()">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_PAUSE\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n						<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/pause/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getPause()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-control-pause"></i>\n					<a href="/tools/pauses/list">{{ \'APPLICATION_PAUSES\' | translate }}</a>\n					<i data-ng-show="pause" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="pause">\n					<a href="#">{{pause.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/pause.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{pause.name}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.pauses.view.settings\')}">\n							<a data-ng-href="/tools/pauses/view/{{pause.id}}/settings">\n								<i class="icon-settings"></i>\n								{{ \'APPLICATION_SETTINGS\' | translate}}\n							</a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/pause/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PAUSE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updatePause()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="pause.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="pause.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
-a.put("app/tools/scheduler/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-calendar"></i>\n					<a href="#">{{ \'APPLICATION_SCHEDULER\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-link font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_SCHEDULES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="/tools/scheduler/wizard" data-toggle="dropdown">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_SCHEDULE\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/scheduler/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-calendar"></i>\n					<a href="/tools/scheduler/list">{{ \'APPLICATION_SCHEDULER\' | translate }}</a>\n					<i data-ng-show="schedule" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="schedule">\n					<a href="#">{{schedule.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/scheduler.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{schedule.name}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.scheduler.view.settings\')}">\n							<a data-ng-href="/tools/scheduler/view/{{schedule.id}}/settings"><i class="icon-settings"></i> {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/scheduler/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_SCHEDULE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab" data-ng-click="refreshSlider()">{{ \'APPLICATION_CONFIGURATION\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && forms.config.$valid && updateSchedule()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.$submitted && forms.general.name.$invalid) || forms.general.name.$error.pattern}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="schedule.name" data-ng-pattern="settings.patternName" required/>\n								<span data-ng-show="forms.general.$submitted && forms.general.name.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.pattern" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START ACTIVE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_ACTIVE\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="schedule.active"\n								type="checkbox"\n								name="status"\n								switch-active="{{ switches.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ switches.onColor }}"\n								switch-off-color="{{ switches.offColor }}"\n								switch-animate="{{ switches.animate }}"\n								switch-size="{{ switches.size }}"\n								switch-label="{{ switches.label }}"\n								switch-icon="{{ switches.icon }}"\n								switch-radio-off="{{ switches.radioOff }}"\n								switch-label-width="{{ switches.labelWidth }}"\n								switch-handle-width="{{ switches.handleWidth }}">\n							</div>\n							<!-- END ACTIVE -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="schedule.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n					<!-- CONFIG TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.config" data-ng-switch="schedule.reportType" data-ng-submit="forms.config.$valid && forms.general.$valid && updateSchedule()" data-ng-if="schedule.type===\'report\'" data-ng-init="initReports()" novalidate>\n\n							<div class="row">\n\n								<!-- START TYPE -->\n								<div class="form-group col-md-2" data-ng-class="{\'has-error\': (forms.config.type.$touched || forms.config.$submitted) && forms.config.type.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="schedule.reportType" name="type" theme="bootstrap" required>\n										<ui-select-match placeholder="{{ \'APPLICATION_TYPE\' | translate }}">{{$select.selected | capitalize}}</ui-select-match>\n										<ui-select-choices repeat="report in [\'default\', \'custom\'] | filter: $select.search">\n											<div ng-bind-html="report | capitalize | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.config.type.$touched || forms.config.$submitted) && forms.config.type.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TYPE -->\n\n\n								<!-- START REPORT -->\n								<div data-ng-switch-when="default" class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.config.reportId.$touched || forms.config.$submitted) && forms.config.reportId.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_REPORT\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="schedule.reportId" name="reportId" theme="bootstrap" on-select="setReportTree($item,$model)" required>\n										<ui-select-match placeholder="{{ \'APPLICATION_REPORT\' | translate }}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices group-by="\'parent\'" repeat="report.id as report in defRep | filter: $select.search">\n											<div ng-bind-html="report.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.config.reportId.$touched || forms.config.$submitted) && forms.config.reportId.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END REPORT -->\n\n								<!-- START REPORT -->\n								<div data-ng-switch-when="custom" class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.config.reportId.$touched || forms.config.$submitted) && forms.config.reportId.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_REPORT\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="schedule.reportId" name="reportId" theme="bootstrap" on-select="setReportTree($item,$model)" required>\n										<ui-select-match placeholder="{{ \'APPLICATION_REPORT\' | translate }}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices group-by="\'parent\'" repeat="report.id as report in cusRep | filter: $select.search">\n											<div ng-bind-html="report.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.config.reportId.$touched || forms.config.$submitted) && forms.config.reportId.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END REPORT -->\n\n								<!-- START REPORT -->\n								<div class="form-group col-md-2" data-ng-class="{\'has-error\': (forms.config.reportOutput.$touched || forms.config.$submitted) && forms.config.reportOutput.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_OUTPUT\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="schedule.reportOutput" name="reportOutput" theme="bootstrap" required>\n										<ui-select-match placeholder="{{ \'APPLICATION_OUTPUT\' | translate }}">{{$select.selected}}</ui-select-match>\n										<ui-select-choices repeat="output in [\'CSV\',\'PDF\'] | filter: $select.search">\n											<div ng-bind-html="output | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.config.reportOutput.$touched || forms.config.$submitted) && forms.config.reportOutput.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END REPORT -->\n\n							</div>\n\n							<!-- START TODAY -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_RUN_ON\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								data-ng-model="switchValues.today"\n								type="checkbox"\n								name="status"\n								data-ng-change="checkToday()"\n								switch-active="{{ switches.isActive }}"\n								switch-on-text="{{ \'APPLICATION_TODAY\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_RANGE\' | translate }}"\n								switch-on-color="{{ switches.onColor }}"\n								switch-off-color="{{ switches.offColor }}"\n								switch-animate="{{ switches.animate }}"\n								switch-size="{{ switches.size }}"\n								switch-label="{{ switches.label }}"\n								switch-icon="{{ switches.icon }}"\n								switch-radio-off="{{ switches.radioOff }}"\n								switch-label-width="{{ switches.labelWidth }}"\n								switch-handle-width="{{ switches.handleWidth }}">\n							</div>\n							<!-- END TODAY -->\n\n							<!-- START VALIDITY -->\n							<div class="form-group" data-ng-if="switchValues.today">\n								<label class="control-label">{{\'APPLICATION_VALIDITY\' | translate}}</label>\n								<rzslider rz-slider-model="schedule.validityStart" rz-slider-high="schedule.validityEnd" rz-slider-options="validitySlider"></rzslider>\n							</div>\n							<!-- END VALIDITY -->\n\n							<!-- START RANGE -->\n							<div class="form-group" data-ng-if="!switchValues.today" data-ng-class="{\'has-error\': (forms.config.range.$touched || forms.config.$submitted) && forms.config.range.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_REPORT_RANGE\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="schedule.reportRange" name="range" theme="bootstrap" required>\n									<ui-select-match placeholder="{{ \'APPLICATION_RANGE\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n									<ui-select-choices repeat="range.value as range in reportRanges | filter: $select.search">\n										<div ng-bind-html="range.name | highlight: $select.search | translate"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.config.range.$touched || forms.config.$submitted) && forms.config.range.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END RANGE -->\n\n							<!-- START TODAY CRON -->\n							<div class="form-group" data-ng-if="switchValues.today" data-ng-class="{\'has-error\': (forms.config.cron.$touched || forms.config.$submitted) && forms.config.cron.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_EXECUTE_EVERY\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="schedule.cron" name="cron" theme="bootstrap" data-ng-required="switchValues.today">\n									<ui-select-match placeholder="{{ \'APPLICATION_EXECUTE_EVERY\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n									<ui-select-choices repeat="cron.value as cron in todayCron | filter: $select.search">\n										<div ng-bind-html="cron.name | highlight: $select.search | translate"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.config.cron.$touched || forms.config.$submitted) && forms.config.cron.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TODAY -->\n							<div class="row" data-ng-if="!switchValues.today">\n								<!-- START CRONTYPE EXEC -->\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.config.cronType.$touched || forms.config.$submitted) && forms.config.cronType.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_EXECUTE_EVERY\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="rangeExec.type" name="cronType" theme="bootstrap" required>\n										<ui-select-match placeholder="{{ \'APPLICATION_EXECUTE_EVERY\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in cronTypes | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | translate"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.config.cronType.$touched || forms.config.$submitted) && forms.config.cronType.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END CRONTYPE -->\n\n								<!-- START WEEKDAY -->\n								<div class="form-group col-md-4" data-ng-if="schedule.cronType === \'weekly\'" data-ng-class="{\'has-error\': (forms.config.weekDay.$touched || forms.config.$submitted) && forms.config.weekDay.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_WEEKDAYS\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select multiple data-ng-model="rangeExec.weekDays" name="weekDay" theme="bootstrap" data-ng-required="schedule.cronType === \'weekly\'">\n										<ui-select-match placeholder="{{ \'APPLICATION_WEEKDAYS\' | translate }}">{{$item.name | translate}}</ui-select-match>\n										<ui-select-choices repeat="day.value as day in weekDays | filter: $select.search">\n											<div ng-bind-html="day.name | highlight: $select.search | translate"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.config.weekDay.$touched || forms.config.$submitted) && forms.config.weekDay.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END WEEKDAY -->\n\n								<!-- START MONTHDAY -->\n								<div class="form-group col-md-4" data-ng-if="schedule.cronType === \'monthly\'" data-ng-class="{\'has-error\': (forms.config.monthDay.$touched || forms.config.$submitted) && forms.config.monthDay.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="rangeExec.monthDay" name="monthDay" theme="bootstrap" data-ng-required="schedule.cronType === \'monthly\'">\n										<ui-select-match placeholder="{{ \'APPLICATION_MONTHDAY\' | translate }}">{{$select.selected}}</ui-select-match>\n										<ui-select-choices repeat="day in monthDays | filter: $select.search">\n											<div ng-bind-html="day | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.config.monthDay.$touched || forms.config.$submitted) && forms.config.monthDay.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END MONTHDAY -->\n\n								<!-- START HOUR -->\n								<div class="form-group col-md-4" data-ng-if="schedule.cronType" data-ng-class="{\'has-error\': (forms.config.hour.$touched || forms.config.$submitted) && forms.config.hour.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_HOUR\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="rangeExec.hour" name="hour" theme="bootstrap" required>\n										<ui-select-match placeholder="{{ \'APPLICATION_HOUR\' | translate }}">{{$select.selected}}</ui-select-match>\n										<ui-select-choices repeat="hour in hours | filter: $select.search">\n											<div ng-bind-html="hour | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.config.hour.$touched || forms.config.$submitted) && forms.config.hour.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END HOUR -->\n							</div>\n\n							<!-- START SEND MAIL -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_SEND_MAIL\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								data-ng-model="schedule.sendMail"\n								type="checkbox"\n								name="status"\n								switch-active="{{ switches.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ switches.onColor }}"\n								switch-off-color="{{ switches.offColor }}"\n								switch-animate="{{ switches.animate }}"\n								switch-size="{{ switches.size }}"\n								switch-label="{{ switches.label }}"\n								switch-icon="{{ switches.icon }}"\n								switch-radio-off="{{ switches.radioOff }}"\n								switch-label-width="{{ switches.labelWidth }}"\n								switch-handle-width="{{ switches.handleWidth }}">\n							</div>\n							<!-- END SEND MAIL -->\n							<div class="row">\n							<!-- START ACCOUNT -->\n							<div class="form-group col-md-6" data-ng-class="{\'has-error\': (forms.config.MailServerOutId.$touched || forms.config.$submitted) && forms.config.MailServerOutId.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_ACCOUNT\' | translate }}<span class="required" data-ng-if="schedule.sendMail" aria-required="true">*</span></label>\n								<ui-select data-ng-model="schedule.MailServerOutId" name="MailServerOutId" theme="bootstrap" data-ng-disabled="!schedule.sendMail" data-ng-required="schedule.sendMail">\n									<ui-select-match placeholder="{{ \'APPLICATION_ACCOUNT\' | translate }}">{{$select.selected.username}}</ui-select-match>\n									<ui-select-choices repeat="account.id as account in mailServers | filter: $select.search">\n										<div ng-bind-html="account.username | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.config.MailServerOutId.$touched || forms.config.$submitted) && forms.config.MailServerOutId.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<div class="note note-warning" data-ng-hide="mailServers.length">\n									<h4 class="block">Warning!</h4>\n									<p>\n										{{ \'MESSAGE_NO_ACCOUNTS_AVAILABLE\' | translate }}\n									</p>\n								</div>\n							</div>\n							<!-- END ACCOUNT -->\n\n							<!-- START EMAIL -->\n							<div class="form-group col-md-6" data-ng-class="{\'has-error\': (forms.config.$submitted && forms.config.email.$invalid) || forms.config.email.$error.pattern}">\n								<label class="control-label">{{\'APPLICATION_EMAIL_ADDRESS\' | translate}}<span data-ng-if="schedule.sendMail" class="required" aria-required="true">*</span></label>\n								<input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL_ADDRESS\' | translate}}" class="form-control" data-ng-model="schedule.email" data-ng-disabled="!schedule.sendMail" data-ng-required="schedule.sendMail"/>\n								<span data-ng-show="forms.config.$submitted && forms.config.email.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END EMAIL -->\n\n						</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CONFIG TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n<!-- <pre>\n	{{rangeExec | json}}\n</pre>\n<pre>\n	{{schedule | json}}\n</pre> -->\n'),a.put("app/tools/scheduler/wizard/wizard.html",'<div class="col-md-12">\n	<!-- BEGIN PAGE HEADER-->\n	<div class="page-bar">\n		<ul class="page-breadcrumb">\n			<li>\n				<i class="icon-rocket"></i>\n				<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-wrench"></i>\n				<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-calendar"></i>\n				<a href="/tools/scheduler/list">{{ \'APPLICATION_SCHEDULER\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-options"></i>\n				<a href="#">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n			</li>\n		</ul>\n	</div>\n	<!-- END PAGE HEADER-->\n\n	<!-- BEGIN PORTLET-->\n	<div class="portlet light bordered">\n		<div class="portlet-title">\n			<div class="caption font-green-sharp">\n				<i class="icon-link font-green-sharp"></i>\n				<span class="caption-subject">{{ \'APPLICATION_SCHEDULE\' | translate }} WIZARD</a> </span>\n			</div>\n		</div>\n		<div class="portlet-body">\n			<wizard on-finish="createItem()">\n				<wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(forms.general.$valid)">\n					<form name="forms.general" novalidate>\n\n						<!-- START NAME -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.general.$submitted && forms.general.name.$invalid) || forms.general.name.$error.pattern}">\n							<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required/>\n							<span data-ng-show="forms.general.$submitted && forms.general.name.$invalid" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n							</span>\n						</div>\n						<!-- END NAME -->\n\n						<!-- START ACTIVE -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_ACTIVE\' | translate}}</label></br>\n							<input\n							bs-switch\n							class="form-control"\n							ng-model="item.active"\n							type="checkbox"\n							name="status"\n							data-ng-init="item.active = 0"\n							switch-active="{{ switches.isActive }}"\n							switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n							switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n							switch-on-color="{{ switches.onColor }}"\n							switch-off-color="{{ switches.offColor }}"\n							switch-animate="{{ switches.animate }}"\n							switch-size="{{ switches.size }}"\n							switch-label="{{ switches.label }}"\n							switch-icon="{{ switches.icon }}"\n							switch-radio-off="{{ switches.radioOff }}"\n							switch-label-width="{{ switches.labelWidth }}"\n							switch-handle-width="{{ switches.handleWidth }}">\n						</div>\n						<!-- END ACTIVE -->\n\n						<!-- START TYPE -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.general.type.$touched || forms.general.$submitted) && forms.general.type.$invalid}">\n							<label class="control-label">{{ \'APPLICATION_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="item.type" name="type" theme="bootstrap" required>\n								<ui-select-match placeholder="{{ \'APPLICATION_TYPE\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n								<ui-select-choices repeat="type.value as type in scheduleTypes | filter: $select.search">\n									<div ng-bind-html="type.name | highlight: $select.search | translate"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.general.type.$touched || forms.general.$submitted) && forms.general.type.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TYPE -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n							<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n						</div>\n						<!-- END DESCRIPTION -->\n\n						<button class="btn green-haze" type="submit" ng-click="next(true)">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n					</form>\n				</wz-step>\n\n				<wz-step title="{{\'APPLICATION_CONFIGURATION\' | translate}}" canexit="exitValidation(forms.config.$valid)">\n					<form name="forms.config" data-ng-switch="item.reportType" data-ng-if="item.type===\'report\'" data-ng-init="initReports()" novalidate>\n						<div class="row">\n\n							<!-- START TYPE -->\n							<div class="form-group col-md-2" data-ng-class="{\'has-error\': (forms.config.type.$touched || forms.config.$submitted) && forms.config.type.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="item.reportType" name="type" theme="bootstrap" required>\n									<ui-select-match placeholder="{{ \'APPLICATION_TYPE\' | translate }}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="report in [\'default\', \'custom\'] | filter: $select.search">\n										<div ng-bind-html="report | capitalize | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.config.type.$touched || forms.config.$submitted) && forms.config.type.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TYPE -->\n\n							<!-- START DEFAULT REPORT -->\n							<div data-ng-switch-when="default" class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.config.reportId.$touched || forms.config.$submitted) && forms.config.reportId.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_REPORT\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="item.reportId" name="reportId" theme="bootstrap" on-select="setReportTree($item,$model)" required>\n									<ui-select-match placeholder="{{ \'APPLICATION_REPORT\' | translate }}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices group-by="\'parent\'" repeat="report.id as report in defRep | filter: $select.search">\n										<div ng-bind-html="report.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.config.reportId.$touched || forms.config.$submitted) && forms.config.reportId.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END DEFAULT REPORT -->\n\n							<!-- START CUSTOM REPORT -->\n							<div data-ng-switch-when="custom" class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.config.reportId.$touched || forms.config.$submitted) && forms.config.reportId.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_REPORT\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="item.reportId" name="reportId" theme="bootstrap" on-select="setReportTree($item,$model)" required>\n									<ui-select-match placeholder="{{ \'APPLICATION_REPORT\' | translate }}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices group-by="\'parent\'" repeat="report.id as report in cusRep | filter: $select.search">\n										<div ng-bind-html="report.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.config.reportId.$touched || forms.config.$submitted) && forms.config.reportId.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CUSTOM REPORT -->\n\n						<!-- START OUTPUT -->\n						<div class="form-group col-md-2" data-ng-class="{\'has-error\': (forms.config.reportOutput.$touched || forms.config.$submitted) && forms.config.reportOutput.$invalid}">\n							<label class="control-label">{{ \'APPLICATION_OUTPUT\' | translate }}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="item.reportOutput" name="reportOutput" theme="bootstrap" required>\n								<ui-select-match placeholder="{{ \'APPLICATION_OUTPUT\' | translate }}">{{$select.selected}}</ui-select-match>\n								<ui-select-choices repeat="output in [\'CSV\',\'PDF\'] | filter: $select.search">\n									<div ng-bind-html="output | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.config.reportOutput.$touched || forms.config.$submitted) && forms.config.reportOutput.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END OUTPUT -->\n\n					</div>\n\n						<!-- START TODAY -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_RUN_ON\' | translate}}</label></br>\n							<input\n							bs-switch\n							class="form-control"\n							data-ng-model="switchValues.today"\n							type="checkbox"\n							name="status"\n							data-ng-change="checkToday()"\n							switch-active="{{ switches.isActive }}"\n							switch-on-text="{{ \'APPLICATION_TODAY\' | translate }}"\n							switch-off-text="{{ \'APPLICATION_RANGE\' | translate }}"\n							switch-on-color="{{ switches.onColor }}"\n							switch-off-color="{{ switches.offColor }}"\n							switch-animate="{{ switches.animate }}"\n							switch-size="{{ switches.size }}"\n							switch-label="{{ switches.label }}"\n							switch-icon="{{ switches.icon }}"\n							switch-radio-off="{{ switches.radioOff }}"\n							switch-label-width="{{ switches.labelWidth }}"\n							switch-handle-width="{{ switches.handleWidth }}">\n						</div>\n						<!-- END TODAY -->\n\n						<!-- START VALIDITY -->\n						<div class="form-group" data-ng-if="switchValues.today">\n							<label class="control-label">{{\'APPLICATION_VALIDITY\' | translate}}</label>\n							<rzslider rz-slider-model="item.validityStart" rz-slider-high="item.validityEnd" rz-slider-options="validitySlider" data-ng-init="item.validityStart = 8;item.validityEnd = 16;"></rzslider>\n						</div>\n						<!-- END VALIDITY -->\n\n						<!-- START RANGE -->\n						<div class="form-group" data-ng-if="!switchValues.today" data-ng-class="{\'has-error\': (forms.config.range.$touched || forms.config.$submitted) && forms.config.range.$invalid}">\n							<label class="control-label">{{ \'APPLICATION_REPORT_RANGE\' | translate }}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="item.reportRange" name="range" theme="bootstrap" required>\n								<ui-select-match placeholder="{{ \'APPLICATION_RANGE\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n								<ui-select-choices repeat="range.value as range in reportRanges | filter: $select.search">\n									<div ng-bind-html="range.name | highlight: $select.search | translate"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.config.range.$touched || forms.config.$submitted) && forms.config.range.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END RANGE -->\n\n						<!-- START TODAY CRON EXEC -->\n						<div class="form-group" data-ng-if="switchValues.today" data-ng-class="{\'has-error\': (forms.config.cron.$touched || forms.config.$submitted) && forms.config.cron.$invalid}">\n							<label class="control-label">{{ \'APPLICATION_EXECUTE_EVERY\' | translate }}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="item.cron" name="cron" theme="bootstrap" data-ng-required="switchValues.today">\n								<ui-select-match placeholder="{{ \'APPLICATION_EXECUTE_EVERY\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n								<ui-select-choices repeat="cron.value as cron in todayCron | filter: $select.search">\n									<div ng-bind-html="cron.name | highlight: $select.search | translate"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.config.cron.$touched || forms.config.$submitted) && forms.config.cron.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TODAY CRON -->\n						<div class="row" data-ng-if="!switchValues.today">\n						<!-- START CRONTYPE EXEC -->\n						<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.config.cronType.$touched || forms.config.$submitted) && forms.config.cronType.$invalid}">\n							<label class="control-label">{{ \'APPLICATION_EXECUTE_EVERY\' | translate }}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="rangeExec.type" name="cronType" theme="bootstrap" required>\n								<ui-select-match placeholder="{{ \'APPLICATION_EXECUTE_EVERY\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n								<ui-select-choices repeat="type.value as type in cronTypes | filter: $select.search">\n									<div ng-bind-html="type.name | highlight: $select.search | translate"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.config.cronType.$touched || forms.config.$submitted) && forms.config.cronType.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END CRONTYPE -->\n\n						<!-- START WEEKDAY -->\n						<div class="form-group col-md-4" data-ng-if="item.cronType === \'weekly\'" data-ng-class="{\'has-error\': (forms.config.weekDay.$touched || forms.config.$submitted) && forms.config.weekDay.$invalid}">\n							<label class="control-label">{{ \'APPLICATION_WEEKDAYS\' | translate }}<span class="required" aria-required="true">*</span></label>\n							<ui-select multiple data-ng-model="rangeExec.weekDays" name="weekDay" theme="bootstrap" data-ng-required="item.cronType === \'weekly\'">\n								<ui-select-match placeholder="{{ \'APPLICATION_WEEKDAYS\' | translate }}">{{$item.name | translate}}</ui-select-match>\n								<ui-select-choices repeat="day.value as day in weekDays | filter: $select.search">\n									<div ng-bind-html="day.name | highlight: $select.search | translate"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.config.weekDay.$touched || forms.config.$submitted) && forms.config.weekDay.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END WEEKDAY -->\n\n						<!-- START MONTHDAY -->\n						<div class="form-group col-md-4" data-ng-if="item.cronType === \'monthly\'" data-ng-class="{\'has-error\': (forms.config.monthDay.$touched || forms.config.$submitted) && forms.config.monthDay.$invalid}">\n							<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="rangeExec.monthDay" name="monthDay" theme="bootstrap" data-ng-required="item.cronType === \'monthly\'">\n								<ui-select-match placeholder="{{ \'APPLICATION_MONTHDAY\' | translate }}">{{$select.selected}}</ui-select-match>\n								<ui-select-choices repeat="day in monthDays | filter: $select.search">\n									<div ng-bind-html="day | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.config.monthDay.$touched || forms.config.$submitted) && forms.config.monthDay.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END MONTHDAY -->\n\n						<!-- START HOUR -->\n						<div class="form-group col-md-4" data-ng-if="item.cronType" data-ng-class="{\'has-error\': (forms.config.hour.$touched || forms.config.$submitted) && forms.config.hour.$invalid}">\n							<label class="control-label">{{ \'APPLICATION_HOUR\' | translate }}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="rangeExec.hour" name="hour" theme="bootstrap" required>\n								<ui-select-match placeholder="{{ \'APPLICATION_HOUR\' | translate }}">{{$select.selected}}</ui-select-match>\n								<ui-select-choices repeat="hour in hours | filter: $select.search">\n									<div ng-bind-html="hour | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.config.hour.$touched || forms.config.$submitted) && forms.config.hour.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END HOUR -->\n					</div>\n\n					<!-- START SEND MAIL -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_SEND_MAIL\' | translate}}</label></br>\n						<input\n						bs-switch\n						class="form-control"\n						data-ng-model="item.sendMail"\n						type="checkbox"\n						name="status"\n						data-ng-init="item.sendMail = 0"\n						switch-active="{{ switches.isActive }}"\n						switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n						switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n						switch-on-color="{{ switches.onColor }}"\n						switch-off-color="{{ switches.offColor }}"\n						switch-animate="{{ switches.animate }}"\n						switch-size="{{ switches.size }}"\n						switch-label="{{ switches.label }}"\n						switch-icon="{{ switches.icon }}"\n						switch-radio-off="{{ switches.radioOff }}"\n						switch-label-width="{{ switches.labelWidth }}"\n						switch-handle-width="{{ switches.handleWidth }}">\n					</div>\n					<!-- END SEND MAIL -->\n					<div class="row">\n					<!-- START ACCOUNT -->\n					<div class="form-group col-md-6" data-ng-class="{\'has-error\': (forms.config.MailServerOutId.$touched || forms.config.$submitted) && forms.config.MailServerOutId.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_ACCOUNT\' | translate }}<span class="required" data-ng-if="item.sendMail" aria-required="true">*</span></label>\n						<ui-select data-ng-model="item.MailServerOutId" name="MailServerOutId" theme="bootstrap" data-ng-disabled="!item.sendMail" data-ng-required="item.sendMail">\n							<ui-select-match placeholder="{{ \'APPLICATION_ACCOUNT\' | translate }}">{{$select.selected.username}}</ui-select-match>\n							<ui-select-choices repeat="account.id as account in mailServers | filter: $select.search">\n								<div ng-bind-html="account.username | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.config.MailServerOutId.$touched || forms.config.$submitted) && forms.config.MailServerOutId.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n						<div class="note note-warning" data-ng-hide="mailServers.length">\n							<h4 class="block">Warning!</h4>\n							<p>\n								{{ \'MESSAGE_NO_ACCOUNTS_AVAILABLE\' | translate }}\n							</p>\n						</div>\n					</div>\n					<!-- END ACCOUNT -->\n\n					<!-- START EMAIL -->\n					<div class="form-group col-md-6" data-ng-class="{\'has-error\': (forms.config.$submitted && forms.config.email.$invalid) || forms.config.email.$error.pattern}">\n						<label class="control-label">{{\'APPLICATION_EMAIL_ADDRESS\' | translate}}<span data-ng-if="item.sendMail" class="required" aria-required="true">*</span></label>\n						<input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.email" required data-ng-disabled="!item.sendMail" data-ng-required="item.sendMail"/>\n						<span data-ng-show="forms.config.$submitted && forms.config.email.$invalid" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END EMAIL -->\n				</div>\n\n						<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n						<button class="btn green-haze" type="submit" ng-click="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n					</form>\n				</wz-step>\n\n				<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n					<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n					<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n					<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n				</wz-step>\n			</wizard>\n		</div>\n	</div>\n	<!-- END PORTLET-->\n</div>\n<!-- <pre>\n	{{rangeExec | json}}\n</pre>\n<pre>\n	{{item | json}}\n</pre> -->\n'),
-a.put("app/tools/sound/list/list.html",'<div class="page-bar">\n  <ul class="page-breadcrumb">\n    <li>\n      <i class="icon-rocket"></i>\n      <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n      <i class="fa fa-angle-right"></i>\n    </li>\n    <li>\n      <i class="icon-music-tone-alt"></i>\n      <a href="#">{{ \'APPLICATION_SOUNDS\' | translate }}</a>\n    </li>\n  </ul>\n  <div class="page-toolbar">\n  </div>\n</div>\n<!-- END PAGE HEADER-->\n<!-- BEGIN PAGE CONTENT-->\n<!-- Audio Portlets -->\n<div class="headline">\n  <h3><i class="icon-music-tone-alt sounds-title-icon"></i> {{ \'APPLICATION_SOUNDS\' | translate }}</h3>\n</div>\n<div class="portlet light bg-inverse">\n  <div class="portlet-title collapsible" ng-click="isCollapsed = !isCollapsed">\n    <div class="caption">\n      <i class="icon-puzzle font-red-flamingo"></i>\n      <span class="caption-subject bold font-red-flamingo uppercase">\n      {{\'APPLICATION_FILE_UPLOAD\' | translate}} </span>\n    </div>\n    <div class="tools">\n      <a href="" ng-class="{\'collapse\': !isCollapsed, \'expand\' : isCollapsed}">\n      </a>\n    </div>\n  </div>\n  <div class="portlet-body" ng-slide-down="!isCollapsed">\n    <div class="row" nv-file-drop="" uploader="uploader" filters="queueLimit, customFilter">\n    	<div class="col-md-4">\n    		<div class="portlet light bordered">\n    			<div class="portlet-title">\n    				<div class="caption font-green-sharp">\n    					<i class="icon-settings font-green-sharp"></i>\n    					<span class="caption-subject bold uppercase">{{\'APPLICATION_SELECT_FILES\' | translate}}</span>\n    					<span class="caption-helper hide"></span>\n    				</div>\n    				<div class="actions">\n    				</div>\n    			</div>\n    			<div class="portlet-body">\n    				<div ng-show="uploader.isHTML5">\n    					<div class="file-drop-zone margin-bottom-20" nv-file-over="" uploader="uploader" over-class="file-drop-zone-over">\n    						Base drop zone\n    					</div>\n    				</div>\n    				<span class="btn default btn-file">\n    				<span class="fileinput-new">\n    				{{\'APPLICATION_FILE_UPLOAD\' | translate}}</span>\n    				<input type="file" nv-file-select="" uploader="uploader" />\n    				</span>\n    				<span class="btn default btn-file">\n    				<span class="fileinput-new">\n    				{{\'APPLICATION_MULTI_FILE_UPLOAD\' | translate}}</span>\n    				<input type="file" nv-file-select="" uploader="uploader" multiple  /><br/>\n          </span>\n          <p>\n            </br>\n            {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} <b>wav, mp3, gsm, ogg</b>.\n          </p>\n          <p>\n            {{ \'MESSAGE_MAXIMUM_SOUND_UPLOAD_SIZE\' | translate }} <b>15 Mb</b>.\n          </p>\n    			</div>\n    		</div>\n    	</div>\n    	<div class="col-md-8">\n    		<div class="portlet light bordered">\n    			<div class="portlet-title">\n    				<div class="caption font-green-sharp">\n    					<i class="icon-settings font-green-sharp"></i>\n    					<span class="caption-subject bold uppercase">{{\'APPLICATION_UPLOAD_QUEUE\' | translate}}</span>\n    					<span class="caption-helper">{{\'APPLICATION_QUEUE_LENGTH\' | translate}}: {{ uploader.queue.length }}</span>\n    				</div>\n    				<div class="actions">\n    				</div>\n    			</div>\n    			<div class="portlet-body">\n    				<div class="table-scrollable table-scrollable-borderless">\n    					<table class="table table-hover table-light">\n    						<thead>\n    							<tr class="uppercase">\n    								<th width="50%">{{\'APPLICATION_NAME\' | translate}}</th>\n    								<th ng-show="uploader.isHTML5">{{\'APPLICATION_SIZE\' | translate}}</th>\n    								<th ng-show="uploader.isHTML5">{{\'APPLICATION_PROGRESS\' | translate}}</th>\n    								<th>{{\'APPLICATION_STATUS\' | translate}}</th>\n    								<th>{{\'APPLICATION_MESSAGE\' | translate}}</th>\n    								<th>{{\'APPLICATION_ACTIONS\' | translate}}</th>\n    							</tr>\n    						</thead>\n    						<tbody>\n    							<tr ng-repeat="item in uploader.queue">\n    								<td><strong>{{ item.file.name }}</strong></td>\n    								<td ng-show="uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB</td>\n    								<td ng-show="uploader.isHTML5">\n    									<div class="progress progress-sm" style="margin-bottom: 0;">\n    										<div class="progress-bar progress-bar-info" role="progressbar" ng-style="{ \'width\': item.progress + \'%\' }"></div>\n    									</div>\n    								</td>\n    								<td class="text-center">\n    									<span ng-show="item.isSuccess" class="text-success"><i class="glyphicon glyphicon-ok"></i></span>\n    									<span ng-show="item.isCancel" class="text-info"><i class="glyphicon glyphicon-ban-circle"></i></span>\n    									<span ng-show="item.isError" class="text-danger"><i class="glyphicon glyphicon-remove"></i></span>\n    									<span ng-show="item.isUploading" class="text-info"><i class="glyphicon glyphicon-upload"></i></span>\n    								</td>\n    								<td class="text-center">\n    									<span ng-show="item.responseMessage" class="text-danger">{{item.responseMessage}}</span>\n    								</td>\n    								<td nowrap>\n    									<button type="button" class="btn btn-success btn-xs" ng-click="item.upload()" ng-disabled="item.isReady || item.isUploading || item.isSuccess">\n    									<span class="glyphicon glyphicon-upload"></span> {{\'APPLICATION_UPLOAD\' | translate}}\n    									</button>\n    									<button type="button" class="btn btn-warning btn-xs" ng-click="item.cancel()" ng-disabled="!item.isUploading">\n    									<span class="glyphicon glyphicon-ban-circle"></span> {{\'APPLICATION_CANCEL\' | translate}}\n    									</button>\n    									<button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">\n    									<span class="glyphicon glyphicon-trash"></span> {{\'APPLICATION_REMOVE\' | translate}}\n    									</button>\n    								</td>\n    							</tr>\n    						</tbody>\n    					</table>\n    				</div>\n    				<div>\n    					<p>{{\'APPLICATION_UPLOAD_QUEUE_PROGRESS\' | translate}}:</p>\n    					<div class="progress progress-sm" style="">\n    						<div class="progress-bar progress-bar-info" role="progressbar" ng-style="{ \'width\': uploader.progress + \'%\' }"></div>\n    					</div>\n    				</div>\n    				<button type="button" class="btn btn-success btn-s" ng-click="uploader.uploadAll()" ng-disabled="!uploader.getNotUploadedItems().length">\n    				<span class="glyphicon glyphicon-upload"></span> {{\'APPLICATION_UPLOAD_ALL\' | translate}}\n    				</button>\n    				<button type="button" class="btn btn-warning btn-s" ng-click="uploader.cancelAll()" ng-disabled="!uploader.isUploading">\n    				<span class="glyphicon glyphicon-ban-circle"></span> {{\'APPLICATION_CANCEL_ALL\' | translate}}\n    				</button>\n    				<button type="button" class="btn btn-danger btn-s" ng-click="uploader.clearQueue()" ng-disabled="!uploader.queue.length">\n    				<span class="glyphicon glyphicon-trash"></span> {{\'APPLICATION_REMOVE_ALL\' | translate}}\n    				</button>\n    			</div>\n    		</div>\n    	</div>\n    </div>\n  </div>\n</div>\n<div class="row thumbnails" data-ng-init="initList()">\n  <div class="row" ng-show="sounds.length == 0">\n    <div class="col-md-12 page-404">\n      <div class="details">\n        <h3>{{ \'MESSAGE_NO_SOUNDS\' | translate }}</h3>\n        <p>\n          <a href="/">\n          {{ \'MESSAGE_RETURN_HOME\' | translate }} </a>\n          {{ \'MESSAGE_OR_UPLOAD_SOUND_FILE\' | translate }}\n        </p>\n      </div>\n    </div>\n  </div>\n  <div class="audio-portlet-wrapper animate-repeat" ng-repeat="sound in sounds">\n    <div class="audio-portlet">\n      <div class="audio-portlet-title"><a href="#" editable-text="sound.display_name" onbeforesave="updateAudio(sound.id,{display_name : $data})">{{ sound.display_name || "Empty" }}</a></div>\n      <img src="../assets/images/note_placeholder.png" alt="" class="img-responsive"/>\n      <div class="file-info">\n        <div class="audio-tag-wrapper">\n          <audio-file-download params="{id:sound.id,controller:\'stream\'}" resource="Sound"></audio-file-download>\n        </div>\n        <p id="description_div">\n          <a href="#" editable-text="sound.description" onbeforesave="updateAudio(sound.id,{description : $data})">{{ sound.description || "Empty" }}</a>\n        </p>\n        <p class="float-right">\n            <button class="btn btn-xs green-meadow" uib-tooltip-template="\'audioInfoTemplate.html\'"><i class="icon-list"></i></button>\n            <motion-file-download  params="{id:sound.id,controller:\'download\'}" resource="Sound" mimetype="\'audio/\'+sound.original_format" tooltiptext="Download" filename="sound.display_name+\'.\'+sound.original_format" btnclass="{{downloadButtonClass}}" btncontent=\'{{downloadButtonContent}}\'></motion-file-download>\n            <button uib-tooltip="Delete" class="btn btn-xs red-sunglo" ng-click="delete(sound.display_name, sound.id)" tooltip="Delete"><i class="icon-close" ></i></button>\n        </p>\n      </div>\n    </div>\n  </div>\n  <script type="text/ng-template" id="audioInfoTemplate.html">\n    <div>\n      <ul class="list-unstyled">\n        <li><b>Format : </b>{{sound.original_format}}</li>\n        <li><b>Duration : </b>{{sound.original_duration | date: \'mm:ss\'}}</li>\n        <li><b>Channels : </b>{{sound.original_channelCount}}</li>\n        <li><b>Bitrate : </b>{{sound.original_bitRate/1024}} kbs</li>\n        <li><b>Sample Rate : </b>{{sound.original_sampleRate/1000}} KHz</li>\n      </ul>\n    </div>\n  </script>\n</div>\n<!-- End Audio Portlets -->\n'),a.put("app/tools/tag/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_TAG\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required data-ng-pattern="settings.patternName"/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/tag/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-tag"></i>\n					<a href="#">{{ \'APPLICATION_TAGS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_TAGS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_TAG\' | translate }}\n						</button>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/tag/view/view.chat.html",'<div class="row" >\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_TAGGED_CHAT\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body" data-ng-if="tag" data-ng-init="initChat()">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="spinner-grid" spinner-start-active="false"></span>\n				<!-- END UI-GRID SPINNER -->\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/tag/view/view.contacts.html",'<div class="row" >\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_TAGGED_CONTACTS\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body" data-ng-if="tag" data-ng-init="initContacts()">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="spinner-grid" spinner-start-active="false"></span>\n				<!-- END UI-GRID SPINNER -->\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions" data-ng-if="readyGrid && gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/tag/view/view.fax.html",'<div class="row" >\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_TAGGED_FAX\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body" data-ng-if="tag" data-ng-init="initFax()">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="spinner-grid" spinner-start-active="false"></span>\n				<!-- END UI-GRID SPINNER -->\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/tag/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getTag()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-tag"></i>\n					<a href="/tools/tags/list">{{ \'APPLICATION_TAGS\' | translate }}</a>\n					<i data-ng-show="tag" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="tag">\n					<a href="#">{{tag.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/tag.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{tag.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.tags.view.settings\')}">\n							<a data-ng-href="/tools/tags/view/{{tag.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.tools.tags.view.chat\')}">\n							<a data-ng-href="{{license.chat ? \'/tools/tags/view/\'+tag.id+\'/chat\' : \'#\'}}" data-ng-class="{\'disabled-link\':!license.chat}">\n							<i class="icon-bubble"></i>\n							{{ \'APPLICATION_CHAT\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.tools.tags.view.mail\')}">\n							<a data-ng-href="{{license.mail ? \'/tools/tags/view/\'+tag.id+\'/mail\' : \'#\'}}" data-ng-class="{\'disabled-link\':!license.mail}">\n							<i class="icon-envelope"></i>\n							{{ \'APPLICATION_MAIL\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.tools.tags.view.fax\')}">\n							<a data-ng-href="{{license.fax ? \'/tools/tags/view/\'+tag.id+\'/fax\' : \'#\'}}" data-ng-class="{\'disabled-link\':!license.fax}">\n							<i class="fa fa-fax"></i>\n							{{ \'APPLICATION_FAX\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.tools.tags.view.sms\')}" >\n							<a data-ng-href="{{license.messaging ? \'/tools/tags/view/\'+tag.id+\'/sms\' : \'#\'}}" data-ng-class="{\'disabled-link\':!license.messaging}">\n							<i class="glyphicon glyphicon-comment"></i>\n							{{ \'APPLICATION_SMS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.tools.tags.view.contacts\')}">\n							<a data-ng-href="{{license.cm ? \'/tools/tags/view/\'+tag.id+\'/contacts\' : \'#\'}}" data-ng-class="{\'disabled-link\':!license.cm}">\n							<i class="fa fa-users"></i>\n							{{ \'APPLICATION_CONTACTS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/tag/view/view.mail.html",'<div class="row" >\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_TAGGED_MAIL\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body" data-ng-if="tag" data-ng-init="initMail()">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="spinner-grid" spinner-start-active="false"></span>\n				<!-- END UI-GRID SPINNER -->\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/tag/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_TAG\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="spinner-grid" spinner-start-active="false"></span>\n				<!-- END UI-GRID SPINNER -->\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateTag()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="tag.name" required data-ng-pattern="settings.patternName"/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.pattern" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="tag.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/tag/view/view.sms.html",'<div class="row" >\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_TAGGED_SMS\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body" data-ng-if="tag" data-ng-init="initSms()">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/template/list/list.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="#">{{ \'APPLICATION_TEMPLATES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n	</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-wrench font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_TEMPLATES\' | translate }}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/tools/templates/wizard">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_TEMPLATE\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/template/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initItem()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/tools/templates/list">{{ \'APPLICATION_TEMPLATES\' | translate }}</a>\n					<i data-ng-show="item" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="item">\n					<a href="#">{{item.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/template.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{item.name}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.templates.view.settings\')}">\n							<a data-ng-href="/tools/templates/view/{{item.id}}/settings">\n								<i class="icon-settings"></i>\n								{{ \'APPLICATION_SETTINGS\' | translate}}\n							</a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/template/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n\n				<form name="form" data-ng-submit="form.$valid && updateItem()" class="form-horizontal" novalidate>\n					<!-- START NAME -->\n					<div class="form-group" data-ng-class="{\'has-error\': form.name.$invalid && form.$submitted}">\n						<div class="col-md-12">\n							<div class="row">\n								<div class="col-md-2">\n									<label class="control-label">{{\'APPLICATION_NAME\' | translate}}:<span class="required" aria-required="true">*</span></label>\n								</div>\n								<div class="col-md-10">\n									<input type="text" name="name" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_NAME\' | translate}}..." data-ng-model="item.name" required>\n									<span data-ng-show="form.name.$invalid && form.$submitted" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n						</div>\n					</div>\n					<!-- END NAME -->\n\n					<!-- START DESCRIPTION -->\n					<div class="form-group" data-ng-class="{\'has-error\': form.description.$invalid && form.$submitted}">\n						<div class="col-md-12">\n							<div class="row">\n								<div class="col-md-2">\n									<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}:</label>\n								</div>\n								<div class="col-md-10">\n									<input type="text" name="description" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}..." rows="8" data-ng-model="item.description">\n									<span data-ng-show="form.description.$invalid && form.$submitted" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n						</div>\n					</div>\n					<!-- END NAME -->\n\n					<hr>\n\n					<!-- START SUBJECT -->\n					<div class="form-group row" data-ng-class="{\'has-error\': form.subject.$invalid && form.$submitted}">\n						<div class="col-md-12">\n							<div class="row">\n								<div class="col-md-2">\n									<label class="control-label">{{\'APPLICATION_SUBJECT\' | translate}}:</label>\n								</div>\n								<div class="col-md-10">\n									<input type="text" name="subject" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_SUBJECT\' | translate}}..." rows="8" data-ng-model="item.subject">\n									<span data-ng-show="form.subject.$invalid && form.$submitted" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n						</div>\n					</div>\n					<!-- END SUJBECT -->\n\n					<!-- START HTML -->\n					<div class="form-group row" data-ng-class="{\'has-error\': form.text.$invalid && form.$submitted}">\n						<div class="col-md-12">\n							<div ckeditor="options" ng-model="item.html"></div>\n							<span data-ng-show="form.text.$invalid && form.$submitted" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n					</div>\n					<!-- END HTML -->\n\n					<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),
-a.put("app/tools/template/wizard/wizard.html",'<div class="row">\n	<div class="col-md-12">\n	  <!-- BEGIN PAGE HEADER-->\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/tools/templates/list">{{ \'APPLICATION_TEMPLATES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n	  <!-- END PAGE HEADER-->\n\n	  <!-- BEGIN PORTLET-->\n	  <div class="portlet light bordered" data-ng-init="initWizard()">\n	  	<div class="portlet-title">\n	  		<div class="caption font-green-sharp">\n	  			<i class="icon-docs font-green-sharp"></i>\n	  			<span class="caption-subject">{{ \'APPLICATION_TEMPLATES\' | translate }} FORM</a> </span>\n	  		</div>\n	  	</div>\n	  	<div class="portlet-body">\n				<form name="form" data-ng-submit="form.$valid && createItem()" class="form-horizontal" novalidate>\n					<!-- START HEAD -->\n					<div class="form">\n						<!-- START NAME -->\n						<div class="form-group" data-ng-class="{\'has-error\': form.name.$invalid && form.$submitted}">\n							<div class="col-md-12">\n								<div class="row">\n									<div class="col-md-1">\n										<label class="control-label">{{\'APPLICATION_NAME\' | translate}}:<span class="required" aria-required="true">*</span></label>\n									</div>\n									<div class="col-md-11">\n										<input type="text" name="name" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_NAME\' | translate}}..." data-ng-model="item.name" required>\n										<span data-ng-show="form.name.$invalid && form.$submitted" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n							</div>\n						</div>\n						<!-- END NAME -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group" data-ng-class="{\'has-error\': form.description.$invalid && form.$submitted}">\n							<div class="col-md-12">\n								<div class="row">\n									<div class="col-md-1">\n										<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}:</label>\n									</div>\n									<div class="col-md-11">\n										<input type="text" name="description" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}..." rows="8" data-ng-model="item.description">\n										<span data-ng-show="form.description.$invalid && form.$submitted" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n							</div>\n						</div>\n						<!-- END NAME -->\n\n						<!-- START SUBJECT -->\n						<div class="form-group" data-ng-class="{\'has-error\': form.subject.$invalid && form.$submitted}">\n							<div class="col-md-12">\n								<div class="row">\n									<div class="col-md-1">\n										<label class="control-label">{{\'APPLICATION_SUBJECT\' | translate}}:</label>\n									</div>\n									<div class="col-md-11">\n										<input type="text" name="subject" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_SUBJECT\' | translate}}..." rows="8" data-ng-model="item.subject">\n										<span data-ng-show="form.subject.$invalid && form.$submitted" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n							</div>\n						</div>\n						<!-- END SUJBECT -->\n\n						<!-- START HTML -->\n						<div class="form-group row" data-ng-class="{\'has-error\': form.text.$invalid && form.$submitted}">\n							<div class="col-md-12">\n								<div ckeditor="options" ng-model="item.html"></div>\n									<span data-ng-show="form.text.$invalid && form.$submitted" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n							</div>\n						</div>\n						<!-- END HTML -->\n\n					</div>\n					<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n				</form>\n	  	</div>\n	  </div>\n	  <!-- END PORTLET-->\n	</div>\n</div>\n'),a.put("app/tools/trigger/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-wrench"></i>\n						<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-bulb"></i>\n						<a href="#">{{ \'APPLICATION_TRIGGERS\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-bulb font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_TRIGGERS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle " href="/tools/triggers/wizard">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_TRIGGER\' | translate }}\n						</a>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/trigger/view/view.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row" data-ng-init="initView();">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-bulb"></i>\n					<a href="/tools/triggers/list">{{ \'APPLICATION_TRIGGERS\' | translate }}</a>\n					<i class="fa fa-angle-right" data-ng-show="trigger"></i>\n				</li>\n				<li data-ng-show="trigger">\n					<a href="#">{{ trigger.description || trigger.name }}</a>\n				</li>\n			</ul>\n		</div>\n\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/trigger.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ trigger.name }}\n					</div>\n					<div class="profile-usertitle-job">\n						{{ trigger.description }}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.triggers.view.settings\')}">\n							<a href="/tools/triggers/view/{{trigger.id}}/settings">\n							<i class="icon-bulb"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate }} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/trigger/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_CONDITIONS\' | translate}} & {{\'APPLICATION_ACTIONS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.general" data-ng-submit="exitValidation(forms.general.$valid) && updateTrigger()" novalidate>\n					<div class="tab-content">\n						<!-- GENERAL TAB -->\n						<div class="tab-pane active" id="tab_1_1">\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="trigger.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START CHANNEL -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.channel.$touched || forms.general.$submitted) && forms.general.channel.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CHANNEL\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="channel" placeholder="{{\'APPLICATION_CHANNEL\' | translate}}" class="form-control" data-ng-model="trigger.channel" required readonly/>\n								<span data-ng-show="(forms.general.channel.$touched || forms.general.$submitted) && forms.general.channel.$invalid && forms.general.channel.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CHANNEL -->\n\n							<!-- START STATUS -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_STATUS\' | translate}}</label>\n							</br>\n							<input bs-switch class="form-control" ng-model="trigger.status" type="checkbox" name="status" switch-active="{{ recordSwitch.isActive }}" switch-on-text="{{ recordSwitch.onText }}" switch-off-text="{{ recordSwitch.offText }}" switch-on-color="{{ recordSwitch.onColor }}"\n							switch-off-color="{{ recordSwitch.offColor }}" switch-animate="{{ recordSwitch.animate }}" switch-size="{{ recordSwitch.size }}" switch-label="{{ recordSwitch.label }}" switch-icon="{{ recordSwitch.icon }}" switch-radio-off="{{ recordSwitch.radioOff }}"\n							switch-label-width="{{ recordSwitch.labelWidth }}" switch-handle-width="{{ recordSwitch.handleWidth }}">\n						</div>\n						<!-- END STATUS -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n							<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="trigger.description" />\n						</div>\n						<!-- END DESCRIPTION -->\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}" />\n					</div>\n					<!-- END GENERAL TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ALL_CONDITIONS\' | translate"></span>:\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="portlet light bordered" ng-repeat="all in trigger.All">\n									<div class="portlet-title">\n										<div class="caption font-blue-hoki">\n											<span class="caption-subject">{{ \'APPLICATION_ALL\' | translate }} #{{$index+1}}</span>\n										</div>\n										<div class="actions">\n											<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeCondition(\'All\',$index)"><i class="fa fa-trash"></i></a>\n										</div>\n									</div>\n									<div class="portlet-body">\n										<div class="padding-bottom row">\n											<div class="col-md-12">\n												<condition-builder element="all" serviceindex="trigger.channel" service="$triggers" form="forms.general"></condition-builder>\n											</div>\n										</div>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-12">\n										<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'All\')">\n											<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n										</button>\n									</div>\n								</div>\n							</div>\n						</div>\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ANY_CONDITIONS\' | translate"></span>:\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="portlet light bordered" ng-repeat="any in trigger.Any">\n									<div class="portlet-title">\n										<div class="caption font-blue-hoki">\n											<span class="caption-subject">{{ \'APPLICATION_ANY\' | translate }} #{{$index+1}}</span>\n										</div>\n										<div class="actions">\n											<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeCondition(\'Any\',$index)"><i class="fa fa-trash"></i></a>\n										</div>\n									</div>\n									<div class="portlet-body">\n										<div class="padding-bottom row">\n											<div class="col-md-12">\n												<condition-builder element="any" serviceindex="trigger.channel" service="$triggers" form="forms.general"></condition-builder>\n											</div>\n										</div>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-12">\n										<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'Any\')">\n											<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n										</button>\n									</div>\n								</div>\n							</div>\n						</div>\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }}</span>:\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="portlet light bordered" ng-repeat="action in trigger.Actions">\n									<div class="portlet-title">\n										<div class="caption font-blue-hoki">\n											<span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }} #{{$index+1}}</span>\n										</div>\n										<div class="actions">\n											<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeAction($index)"><i class="fa fa-trash"></i></a>\n										</div>\n									</div>\n									<div class="portlet-body">\n										<div class="padding-bottom row">\n											<div class="col-md-12">\n												<div class="form-group col-md-6" data-ng-class="{\'has-error\': (forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$invalid}">\n													<ui-select data-ng-model="action.action" theme="bootstrap" name="action{{$index}}" data-ng-change="resetActionData(action)" required>\n														<ui-select-match placeholder="{{ \'APPLICATION_ACTION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n														<ui-select-choices repeat="tAction.value as tAction in $triggers.services[trigger.channel].actions | filter: $select.search">\n															<div ng-bind-html="tAction.name | translate | highlight: $select.search"></div>\n														</ui-select-choices>\n													</ui-select>\n													<span data-ng-show="(forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$error.required" class="help-block help-block-error">\n														<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n													</span>\n												</div>\n												<div ng-switch="action.action">\n													<action-builder-template ng-switch-when="template" element="action" form="forms.general"></action-builder-template>\n													<action-builder-account-template ng-switch-when="accountTemplate" element="action" form="forms.general"></action-builder-account-template>\n													<action-builder-integration ng-switch-when="integration" element="action" form="forms.general"></action-builder-integration>\n													<action-builder-motion-bar ng-switch-when="motionbar" element="action" form="forms.general"></action-builder-motion-bar>\n													<action-builder-jscripty ng-switch-when="jscripty" element="action" form="forms.general"></action-builder-jscripty>\n													<action-builder-url-forward ng-switch-when="urlForward" element="action" form="forms.general"></action-builder-url-forward>\n													<action-builder-close ng-switch-when="close" element="action" form="forms.general"></action-builder-close>\n													<action-builder-forward ng-switch-when="forward" element="action" form="forms.general"></action-builder-forward>\n													<action-builder-tag ng-switch-when="tag" element="action" form="forms.general"></action-builder-tag>\n													<action-builder-http ng-switch-when="http" element="action" form="forms.general"></action-builder-http>\n													<action-builder-email ng-switch-when="email" element="action" form="forms.general"></action-builder-email>\n													<action-builder-account-email ng-switch-when="accountEmail" element="action" form="forms.general"></action-builder-account-email>\n													<action-builder-account-sms ng-switch-when="accountSms" element="action" form="forms.general"></action-builder-account-sms>\n												</div>\n											</div>\n										</div>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-12">\n										<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addAction()">\n											<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_ACTION\' | translate}}\n										</button>\n									</div>\n								</div>\n							</div>\n						</div>\n						<div class="has-error" data-ng-show="forms.general.$submitted && !trigger.All.length && !trigger.Any.length">\n							<span class="help-block help-block-error form-control">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_CONDITION\' | translate}}.\n							</span>\n						</div>\n						<div class="has-error" data-ng-show="forms.general.$submitted && !trigger.Actions.length">\n							<span class="help-block help-block-error form-control">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_ACTION\' | translate}}.\n							</span>\n						</div>\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}" />\n					</div>\n				</div>\n			</form>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/tools/trigger/wizard/wizard.html",'<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN PAGE HEADER-->\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-bulb"></i>\n					<a href="/tools/triggers/list">{{ \'APPLICATION_TRIGGERS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n		<!-- END PAGE HEADER-->\n\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-bulb font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_TRIGGERS\' | translate }} WIZARD</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n					<wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(forms.general.$valid)">\n						<form name="forms.general" novalidate>\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START STATUS -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_STATUS\' | translate}}</label>\n							</br>\n							<input bs-switch class="form-control" ng-model="item.status" type="checkbox" name="status" data-ng-init="item.status = 0" switch-active="{{ statusSwitch.isActive }}" switch-on-text="{{ statusSwitch.onText }}" switch-off-text="{{ statusSwitch.offText }}"\n							switch-on-color="{{ statusSwitch.onColor }}" switch-off-color="{{ statusSwitch.offColor }}" switch-animate="{{ statusSwitch.animate }}" switch-size="{{ statusSwitch.size }}" switch-label="{{ statusSwitch.label }}" switch-icon="{{ statusSwitch.icon }}"\n							switch-radio-off="{{ statusSwitch.radioOff }}" switch-label-width="{{ statusSwitch.labelWidth }}" switch-handle-width="{{ statusSwitch.handleWidth }}">\n						</div>\n						<!-- END STATUS -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n							<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description" />\n						</div>\n						<!-- END DESCRIPTION -->\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()" />\n					</form>\n				</wz-step>\n				<wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitSettingsValidation(forms.settings.$valid)">\n					<form name="forms.settings" novalidate>\n\n						<!-- Channel -->\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject">{{ \'APPLICATION_CHANNEL\' | translate }}</span>\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.channel.$touched || forms.settings.$submitted) && forms.settings.channel.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_CHANNEL\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="item.channel" name="channel" theme="bootstrap" required>\n										<ui-select-match placeholder="{{ \'APPLICATION_CHANNEL\' | translate }}">{{$select.selected | capitalize}}</ui-select-match>\n										<ui-select-choices repeat="channel in $triggers.channels | filter: $select.search">\n											<div ng-bind-html="channel | highlight: $select.search | capitalize"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.settings.channel.$touched || forms.settings.$submitted) && forms.settings.channel.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n						</div>\n\n						<!-- All -->\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ALL_CONDITIONS\' | translate"></span>:\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="portlet light bordered" ng-repeat="all in item.All">\n									<div class="portlet-title">\n										<div class="caption font-blue-hoki">\n											<span class="caption-subject">{{ \'APPLICATION_ALL\' | translate }} #{{$index+1}}</span>\n										</div>\n										<div class="actions">\n											<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeCondition(\'All\',$index)"><i class="fa fa-trash"></i></a>\n										</div>\n									</div>\n									<div class="portlet-body">\n										<div class="padding-bottom row">\n											<div class="col-md-12">\n												<condition-builder element="all" serviceindex="item.channel" service="$triggers" form="forms.general"></condition-builder>\n											</div>\n										</div>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-12">\n										<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'All\')">\n											<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n										</button>\n									</div>\n								</div>\n							</div>\n						</div>\n\n						<!-- Any -->\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ANY_CONDITIONS\' | translate"></span>:\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="portlet light bordered" ng-repeat="any in item.Any">\n									<div class="portlet-title">\n										<div class="caption font-blue-hoki">\n											<span class="caption-subject">{{ \'APPLICATION_ANY\' | translate }} #{{$index+1}}</span>\n										</div>\n										<div class="actions">\n											<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeCondition(\'Any\',$index)"><i class="fa fa-trash"></i></a>\n										</div>\n									</div>\n									<div class="portlet-body">\n										<div class="padding-bottom row">\n											<div class="col-md-12">\n												<condition-builder element="any" serviceindex="item.channel" service="$triggers" form="forms.general"></condition-builder>\n											</div>\n										</div>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-12">\n										<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'Any\')">\n											<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n										</button>\n									</div>\n								</div>\n							</div>\n						</div>\n\n						<!-- Actions -->\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }}</span>:\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="portlet light bordered" ng-repeat="action in item.Actions">\n									<div class="portlet-title">\n										<div class="caption font-blue-hoki">\n											<span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }} #{{$index+1}}</span>\n										</div>\n										<div class="actions">\n											<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeAction($index)"><i class="fa fa-trash"></i></a>\n										</div>\n									</div>\n									<div class="portlet-body">\n										<div class="padding-bottom row">\n											<!-- <div class="col-md-12"> -->\n												<div class="form-group col-md-6" data-ng-class="{\'has-error\': (forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$invalid}">\n													<ui-select data-ng-model="action.action" theme="bootstrap" data-ng-change="resetActionData(action)" name="action{{$index}}" required>\n														<ui-select-match placeholder="{{ \'APPLICATION_ACTION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n														<ui-select-choices repeat="tAction.value as tAction in $triggers.services[item.channel].actions | filter: $select.search">\n															<div ng-bind-html="tAction.name | translate | highlight: $select.search"></div>\n														</ui-select-choices>\n													</ui-select>\n													<!-- <span class="help-block">\n														{{ \'APPLICATION_ACTION\' | translate }}\n													</span> -->\n													<span data-ng-show="(forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$error.required" class="help-block help-block-error">\n														<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n													</span>\n												</div>\n												<div ng-switch="action.action">\n													<action-builder-template ng-switch-when="template" element="action" form="forms.general"></action-builder-template>\n													<action-builder-account-template ng-switch-when="accountTemplate" element="action" form="forms.general"></action-builder-account-template>\n													<action-builder-integration ng-switch-when="integration" element="action" form="forms.general"></action-builder-integration>\n													<action-builder-motion-bar ng-switch-when="motionbar" element="action" form="forms.general"></action-builder-motion-bar>\n													<action-builder-jscripty ng-switch-when="jscripty" element="action" form="forms.general"></action-builder-jscripty>\n													<action-builder-url-forward ng-switch-when="urlForward" element="action" form="forms.general"></action-builder-url-forward>\n													<action-builder-close ng-switch-when="close" element="action" form="forms.general"></action-builder-close>\n													<action-builder-forward ng-switch-when="forward" element="action" form="forms.general"></action-builder-forward>\n													<action-builder-tag ng-switch-when="tag" element="action" form="forms.general"></action-builder-tag>\n													<action-builder-http ng-switch-when="http" element="action" form="forms.general"></action-builder-http>\n													<action-builder-email ng-switch-when="email" element="action" form="forms.general"></action-builder-email>\n													<action-builder-account-email ng-switch-when="accountEmail" element="action" form="forms.general"></action-builder-account-email>\n													<action-builder-account-sms ng-switch-when="accountSms" element="action" form="forms.general"></action-builder-account-sms>\n												</div>\n											<!-- </div> -->\n										</div>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-12">\n										<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addAction()">\n											<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_ACTION\' | translate}}\n										</button>\n									</div>\n								</div>\n							</div>\n						</div>\n\n						<div class="has-error" data-ng-show="forms.settings.$submitted && !item.All.length && !item.Any.length">\n							<span class="help-block help-block-error form-control">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_CONDITION\' | translate}}.\n							</span>\n						</div>\n						<div class="has-error" data-ng-show="forms.settings.$submitted && !item.Actions.length">\n							<span class="help-block help-block-error form-control">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_ACTION\' | translate}}.\n							</span>\n						</div>\n						<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()" />\n					</form>\n				</wz-step>\n				<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n					<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n					<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n					<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}" />\n				</wz-step>\n			</wizard>\n		</div>\n	</div>\n	<!-- END PORTLET-->\n</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("app/tools/trunk/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-link"></i>\n					<a href="#">{{ \'APPLICATION_TRUNKS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-link font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_TRUNKS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="/tools/trunks/wizard" data-toggle="dropdown">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_TRUNK\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/trunk/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-link"></i>\n					<a href="/tools/trunks/list">{{ \'APPLICATION_TRUNKS\' | translate }}</a>\n					<i data-ng-show="trunk" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="trunk">\n					<a href="#">{{trunk.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/trunk.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{trunk.name}}\n					</div>\n					<p data-ng-if="trunk.active && trunk.registry && trunk.status">({{trunk.status}})</p>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.trunks.view.settings\')}">\n							<a data-ng-href="/tools/trunks/view/{{trunk.name}}/settings"><i class="icon-settings"></i> {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/trunk/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_TRUNK\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_ADVANCED\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_OTHER_FIELDS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body" data-ng-init="getContexts();">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateTrunk()" novalidate>\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="trunk.name" data-ng-pattern="settings.patternName" required readonly/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.pattern" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START ACTIVE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_ACTIVE\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="trunk.active"\n								type="checkbox"\n								name="auth"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-off-color="{{ activeSwitch.offColor }}"\n								switch-on-color="{{ activeSwitch.onColor }}"\n								switch-animate="{{ activeSwitch.animate }}"\n								switch-size="{{ activeSwitch.size }}"\n								switch-label="{{ activeSwitch.label }}"\n								switch-icon="{{ activeSwitch.icon }}"\n								switch-radio-off="{{ activeSwitch.radioOff }}"\n								switch-label-width="{{ activeSwitch.labelWidth }}"\n								switch-handle-width="{{ activeSwitch.handleWidth }}">\n							</div>\n							<!-- END ACTIVE -->\n							<div class="row">\n\n								<div class="col-md-6">\n\n									<!-- START HOST -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.host.$touched || forms.general.$submitted) && forms.general.host.$invalid}">\n										<label class="control-label">{{\'APPLICATION_HOST\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="trunk.host" required/>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_HOST\' | translate }}\n										</span>\n										<span data-ng-show="(forms.general.host.$touched || forms.general.$submitted) && forms.general.host.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END HOST -->\n\n									<!-- START SECRET -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.secret.$touched || forms.general.$submitted) && forms.general.secret.$invalid}">\n										<label class="control-label">{{\'APPLICATION_SECRET\' | translate}}</label>\n										<input type="password" name="secret" placeholder="{{\'APPLICATION_SECRET\' | translate}}" class="form-control" data-ng-model="trunk.secret">\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_SECRET\' | translate }}\n										</span>\n										<span data-ng-show="(forms.general.secret.$touched || forms.general.$submitted) && forms.general.secret.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END SECRET -->\n\n									<!-- START CONTEXT -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$invalid}">\n										<label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.context" name="context" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n											<ui-select-choices repeat="context.name as context in voiceContexts | filter: $select.search">\n												<div ng-bind-html="context.name | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_VOICE_CONTEXT\' | translate }}\n										</span>\n										<span data-ng-show="(forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END CONTEXT -->\n\n									<!-- START CALLERID -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.callerid.$touched || forms.general.$submitted) && forms.general.callerid.$invalid}">\n										<label class="control-label">{{\'APPLICATION_CALLERID\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<input type="text" name="callerid" pattern=\'^"[a-zA-Z0-9_.-]*" <[a-zA-Z0-9_.-]*>\' placeholder="{{\'APPLICATION_CALLERID\' | translate}}" class="form-control" data-ng-model="trunk.callerid"/>\n										<span class="help-block">\n												{{ \'DESCRIPTION_OUTBOUND_CALLERID\' | translate }} "name" &lt;number&gt;\n											</span>\n										<span data-ng-show="(forms.general.callerid.$touched || forms.general.$submitted) && forms.general.callerid.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END CALLERID -->\n\n									<!-- START TYPE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.type.$touched || forms.general.$submitted) && forms.general.type.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.type" name="type" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'user\',\'peer\',\'friend\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_TYPE\' | translate }}\n										</span>\n										<span data-ng-show="(forms.general.type.$touched || forms.general.$submitted) && forms.general.type.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END TYPE -->\n\n									<!-- START DTMFMODE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.dtmfmode.$touched || forms.general.$submitted) && forms.general.dtmfmode.$invalid}">\n										<label class="control-label">{{\'APPLICATION_DTMFMODE\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.dtmfmode" name="dtmfmode" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'rfc2833\', \'info\', \'shortinfo\', \'inband\',\'auto\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_DTMFMODE\' | translate }}\n										</span>\n										<span data-ng-show="(forms.general.dtmfmode.$touched || forms.general.$submitted) && forms.general.dtmfmode.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END DTMFMODE -->\n\n								</div>\n\n								<div class="col-md-6">\n\n									<!-- START DEFAULT USER -->\n									<div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.defaultuser.$invalid}">\n										<label class="control-label">{{\'APPLICATION_DEFAULT_USER\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<input type="text" name="defaultuser" placeholder="{{\'APPLICATION_DEFAULT_USER\' | translate}}" class="form-control" data-ng-model="trunk.defaultuser" required/>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_DEFAULT_USER\' | translate }}\n										</span>\n										<span data-ng-show="forms.general.$submitted && (forms.general.defaultuser.$invalid)" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END DEFAULT USER -->\n\n									<!-- START NAT -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.nat.$touched || forms.general.$submitted) && forms.general.nat.$invalid}">\n										<label class="control-label">{{\'APPLICATION_NAT\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select multiple data-ng-model="trunk.nat" name="nat" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'yes\', \'no\', \'never\', \'route\', \'force_rport\', \'comedia\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_NAT\' | translate }}\n										</span>\n										<span data-ng-show="(forms.general.nat.$touched || forms.general.$submitted) && forms.general.nat.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END NAT -->\n\n									<!-- START QUALIFY -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.qualify.$touched || forms.general.$submitted) && forms.general.qualify.$invalid}">\n										<label class="control-label">{{\'APPLICATION_QUALIFY\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.qualify" name="qualify" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_QUALIFY\' | translate }}\n										</span>\n										<span data-ng-show="(forms.general.qualify.$touched || forms.general.$submitted) && forms.general.qualify.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END QUALIFY -->\n\n									<!-- START ALLOW -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.allow.$touched || forms.general.$submitted) && forms.general.allow.$invalid}">\n										<label class="control-label">{{\'APPLICATION_ALLOW_CODEC\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select multiple data-ng-model="trunk.allow" name="allow" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'g723\',\'gsm\',\'ulaw\',\'alaw\',\'g726\',\'g722\',\'g729\',\'ilbc\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_ALLOW_CODEC\' | translate }}\n										</span>\n										<span data-ng-show="(forms.general.allow.$touched || forms.general.$submitted) && forms.general.allow.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END ALLOW -->\n\n									<!-- START INSECURE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.insecure.$touched || forms.general.$submitted) && forms.general.insecure.$invalid}">\n										<label class="control-label">{{\'APPLICATION_INSECURE\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select multiple data-ng-model="trunk.insecure" name="insecure" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'port\',\'invite\',\'very\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_INSECURE\' | translate }}\n										</span>\n										<span data-ng-show="(forms.general.insecure.$touched || forms.general.$submitted) && forms.general.insecure.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END INSECURE -->\n\n									<!-- START CALLLIMIT -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.call_limit.$touched || forms.general.$submitted) && forms.general.call_limit.$invalid}">\n										<label class="control-label">{{\'APPLICATION_CALLLIMIT\' | translate}}</label>\n										<input type="number" min="0" name="call-limit" placeholder="{{\'APPLICATION_CALLLIMIT\' | translate}}" class="form-control" data-ng-model="trunk.call_limit"/>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_CALLLIMIT\' | translate }}\n										</span>\n									</div>\n									<!-- END CALLLIMIT -->\n\n								</div>\n							</div>\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="trunk.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n					<!-- ADVANCED TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.advanced" data-ng-submit="forms.advanced.$valid && updateTrunk()" novalidate>\n							<div class="row">\n								<div class="col-md-6">\n\n									<!-- START REGISTRY -->\n									<div class="form-group">\n										<label class="control-label">{{\'APPLICATION_REGISTRY\' | translate}}</label>\n										<input type="text" name="registry" placeholder="{{\'APPLICATION_REGISTRY\' | translate}}" class="form-control" data-ng-model="trunk.registry"/>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_REGISTRY\' | translate }}\n										</span>\n									</div>\n									<!-- END REGISTRY -->\n\n									<!-- START DIRECTMEDIA -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.directmedia.$touched || forms.advanced.$submitted) && forms.advanced.directmedia.$invalid}">\n										<label class="control-label">{{\'APPLICATION_DIRECTMEDIA\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.directmedia" name="directmedia" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'yes\', \'no\', \'nonat\', \'update\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_DIRECTMEDIA\' | translate }}\n										</span>\n										<span data-ng-show="(forms.advanced.directmedia.$touched || forms.advanced.$submitted) && forms.advanced.directmedia.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END DIRECTMEDIA -->\n\n									<!-- START CALLCOUNTER -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.callcounter.$touched || forms.advanced.$submitted) && forms.advanced.callcounter.$invalid}">\n										<label class="control-label">{{\'APPLICATION_CALLCOUNTER\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.callcounter" name="callcounter" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_CALLCOUNTER\' | translate }}\n										</span>\n										<span data-ng-show="(forms.advanced.callcounter.$touched || forms.advanced.$submitted) && forms.advanced.callcounter.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END CALLCOUNTER -->\n\n									<!-- START FROMDOMAIN -->\n									<div class="form-group" data-ng-class="{\'has-error\': forms.advanced.$submitted && forms.advanced.fromdomain.$invalid}">\n										<label class="control-label">{{\'APPLICATION_FROMDOMAIN\' | translate}}</label>\n										<input type="text" name="fromdomain" placeholder="{{\'APPLICATION_FROMDOMAIN\' | translate}}" class="form-control" data-ng-model="trunk.fromdomain" />\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_FROMDOMAIN\' | translate }}\n										</span>\n										<span data-ng-show="forms.advanced.$submitted && (forms.advanced.fromdomain.$invalid)" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END FROMDOMAIN -->\n\n									<!-- START FROMUSER -->\n									<div class="form-group" data-ng-class="{\'has-error\': forms.advanced.$submitted && forms.advanced.fromuser.$invalid}">\n										<label class="control-label">{{\'APPLICATION_FROMUSER\' | translate}}</label>\n										<input type="text" name="fromuser" placeholder="{{\'APPLICATION_FROMUSER\' | translate}}" class="form-control" data-ng-model="trunk.fromuser" />\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_FROMUSER\' | translate }}\n										</span>\n										<span data-ng-show="forms.advanced.$submitted && (forms.advanced.fromuser.$invalid)" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END FROMUSER -->\n\n								</div>\n								<div class="col-md-6">\n\n									<!-- START OUTBOUNDPROXY -->\n									<div class="form-group" data-ng-class="{\'has-error\': forms.advanced.$submitted && forms.advanced.outboundproxy.$invalid}">\n										<label class="control-label">{{\'APPLICATION_OUTBOUNDPROXY\' | translate}}</label>\n										<input type="text" name="outboundproxy" placeholder="{{\'APPLICATION_OUTBOUNDPROXY\' | translate}}" class="form-control" data-ng-model="trunk.outboundproxy" />\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_OUTBOUNDPROXY\' | translate }}\n										</span>\n										<span data-ng-show="forms.advanced.$submitted && (forms.advanced.outboundproxy.$invalid)" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END OUTBOUNDPROXY -->\n\n									<!-- START USEREQPHONE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.usereqphone.$touched || forms.advanced.$submitted) && forms.advanced.usereqphone.$invalid}">\n										<label class="control-label">{{\'APPLICATION_USEREQPHONE\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.usereqphone" name="usereqphone" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_USEREQPHONE\' | translate }}\n										</span>\n										<span data-ng-show="(forms.advanced.usereqphone.$touched || forms.advanced.$submitted) && forms.advanced.usereqphone.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END USEREQPHONE -->\n\n									<!-- START TRUSTRPID -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.trustrpid.$touched || forms.advanced.$submitted) && forms.advanced.trustrpid.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TRUSTRPID\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.trustrpid" name="trustrpid" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_TRUSTRPID\' | translate }}\n										</span>\n										<span data-ng-show="(forms.advanced.trustrpid.$touched || forms.advanced.$submitted) && forms.advanced.trustrpid.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END TRUSTRPID -->\n\n									<!-- START SENDRPID -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.sendrpid.$touched || forms.advanced.$submitted) && forms.advanced.sendrpid.$invalid}">\n										<label class="control-label">{{\'APPLICATION_SENDRPID\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.sendrpid" name="sendrpid" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_SENDRPID\' | translate }}\n										</span>\n										<span data-ng-show="(forms.advanced.sendrpid.$touched || forms.advanced.$submitted) && forms.advanced.sendrpid.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END SENDRPID -->\n\n									<!-- START ENCRYPTION -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.encryption.$touched || forms.advanced.$submitted) && forms.advanced.encryption.$invalid}">\n										<label class="control-label">{{\'APPLICATION_ENCRYPTION\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.encryption" name="encryption" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_ENCRYPTION\' | translate }}\n										</span>\n										<span data-ng-show="(forms.advanced.encryption.$touched || forms.advanced.$submitted) && forms.advanced.encryption.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END ENCRYPTION -->\n\n									<!-- START PORT -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.port.$touched || forms.advanced.$submitted) && forms.advanced.port.$invalid}">\n										<label class="control-label">{{\'APPLICATION_PORT\' | translate}}</label>\n										<input type="number" min="0" name="port" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="trunk.port"/>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_PORT\' | translate }}\n										</span>\n										<span data-ng-show="(forms.advanced.port.$touched || forms.advanced.$submitted) && forms.advanced.port.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END PORT -->\n\n									<!-- START TRANSPORT -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.transport.$touched || forms.advanced.$submitted) && forms.advanced.transport.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TRANSPORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select multiple data-ng-model="trunk.transport" name="transport" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'udp\',\'wss\',\'ws\',\'tcp\',\'tls\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_TRANSPORT\' | translate }}\n										</span>\n										<span data-ng-show="(forms.advanced.transport.$touched || forms.advanced.$submitted) && forms.advanced.transport.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END TRANSPORT -->\n\n								</div>\n							</div>\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n					<!-- START OTHER FIELDS TAB -->\n					<div class="tab-pane" id="tab_1_3">\n						<form name="forms.otherFields" data-ng-submit="forms.otherFields.$valid && updateTrunk()" novalidate>\n							<div class="row">\n								<div class="col-md-6">\n									<!-- START OTHER FIELDS-->\n									<div class="form-group">\n										<label class="control-label">{{\'APPLICATION_OTHER_FIELDS\' | translate}}</label>\n										<textarea name="otherFields" placeholder="{{\'APPLICATION_OTHER_FIELDS\' | translate}}" class="form-control otherfields-col" data-ng-model="trunk.otherFields"></textarea>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_OTHER_FIELDS\' | translate }}\n										</span>\n									</div>\n									<!-- END OTHER FIELDS -->\n								</div>\n								<div class="col-md-6">\n									<div class="form-group">\n										<label class="control-label">{{\'APPLICATION_EXAMPLE\' | translate}}</label>\n										<div class="well">\n											<div>host=dynamicp</div>\n											<div>secret=********</div>\n											<div>regcontext=tammari-internal</div>\n											<div>regexten=1005</div>\n											<div>dtmfmode=rfc2833</div>\n											<div>insecure=invite,port</div>\n											<div>canreinvite=yes</div>\n											<div>nat=yes</div>\n											<div>qualify=yes</div>\n											<div>context=merus-sipphone</div>\n											<div>pickupgroup=1</div>\n											<div>callgroup=1</div>\n											<div>mailbox=1000@default</div>\n										</div>\n									</div>\n								</div>\n							</div>\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n\n					</div>\n					<!-- END OTHER FIELDS TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
-a.put("app/tools/trunk/wizard/wizard.html",'<div class="col-md-12" data-ng-init="initWizard()">\n	<!-- BEGIN PAGE HEADER-->\n	<div class="page-bar">\n		<ul class="page-breadcrumb">\n			<li>\n				<i class="icon-rocket"></i>\n				<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-wrench"></i>\n				<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-link"></i>\n				<a href="/tools/trunks/list">{{ \'APPLICATION_TRUNKS\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-options"></i>\n				<a href="#">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n			</li>\n		</ul>\n	</div>\n	<!-- END PAGE HEADER-->\n\n	<!-- BEGIN PORTLET-->\n	<div class="portlet light bordered">\n		<div class="portlet-title">\n			<div class="caption font-green-sharp">\n				<i class="icon-link font-green-sharp"></i>\n				<span class="caption-subject">{{ \'APPLICATION_TRUNK\' | translate }} WIZARD</a> </span>\n			</div>\n		</div>\n		<div class="portlet-body">\n			<wizard on-finish="createItem()">\n				<wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(forms.general.$valid)">\n					<form name="forms.general" novalidate>\n\n						<!-- START NAME -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.general.$submitted && forms.general.name.$invalid) || forms.general.name.$error.pattern}">\n							<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required/>\n							<span data-ng-show="forms.general.$submitted && forms.general.name.$invalid" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n							</span>\n						</div>\n						<!-- END NAME -->\n\n						<!-- START HOST -->\n						<div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.host.$invalid}">\n							<label class="control-label">{{\'APPLICATION_HOST\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="item.host" required/>\n							<span class="help-block">\n								{{ \'DESCRIPTION_TRUNK_HOST\' | translate }}\n							</span>\n							<span data-ng-show="forms.general.$submitted && forms.general.host.$invalid" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END HOST -->\n\n						<!-- START PASSWORD -->\n						<div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.password.$invalid}">\n							<label class="control-label">{{\'APPLICATION_SECRET\' | translate}}</label>\n							<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.secret"/>\n							<span class="help-block">\n								{{ \'DESCRIPTION_TRUNK_SECRET\' | translate }}\n							</span>\n							<span data-ng-show="forms.general.$submitted && forms.general.password.$invalid" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END PASSWORD -->\n\n						<!-- START DEFAULT USER -->\n						<div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.defaultuser.$invalid}">\n							<label class="control-label">{{\'APPLICATION_DEFAULT_USER\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="defaultuser" placeholder="{{\'APPLICATION_DEFAULT\' | translate}} {{\'APPLICATION_USER\' | translate}}" class="form-control" data-ng-model="item.defaultuser" required/>\n							<span class="help-block">\n								{{ \'DESCRIPTION_TRUNK_DEFAULT_USER\' | translate }}\n							</span>\n							<span data-ng-show="forms.general.$submitted && (forms.general.defaultuser.$invalid)" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n							</span>\n						</div>\n						<!-- END DEFAULT USER -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n							<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n						</div>\n						<!-- END DESCRIPTION -->\n\n						<button class="btn green-haze" type="submit" ng-click="next(true)">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n					</form>\n				</wz-step>\n\n				<wz-step title="{{\'APPLICATION_ADVANCED\' | translate}}" canexit="exitValidation(forms.advanced.$valid)">\n					<form name="forms.advanced" novalidate>\n\n						<!-- START REGISTRY -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_REGISTRY\' | translate}}</label>\n							<input type="text" name="registry" placeholder="{{\'APPLICATION_REGISTRY\' | translate}}" class="form-control" data-ng-model="item.registry"/>\n							<span class="help-block">\n								{{ \'DESCRIPTION_TRUNK_REGISTRY\' | translate }}\n							</span>\n						</div>\n						<!-- END REGISTRY -->\n						<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n						<button class="btn green-haze" type="submit" ng-click="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n					</form>\n				</wz-step>\n\n				<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n					<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n					<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n					<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n				</wz-step>\n			</wizard>\n		</div>\n	</div>\n	<!-- END PORTLET-->\n</div>\n'),a.put("app/tools/variable/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_VARIABLE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/variable/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-eye"></i>\n					<a href="#">{{ \'APPLICATION_VARIABLES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_VARIABLES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_VARIABLE\' | translate }}\n						</button>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/variable/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getVariable()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-eye"></i>\n					<a href="/tools/variables/list">{{ \'APPLICATION_VARIABLES\' | translate }}</a>\n					<i data-ng-show="variable" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="variable">\n					<a href="#">{{variable.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/variable.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{variable.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.variables.view.settings\')}">\n							<a data-ng-href="/tools/variables/view/{{variable.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/variable/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_VARIABLE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateVariable()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="variable.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="variable.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/yourdashboard/list/clone.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_CLONE_DASHBOARD\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.dashboard" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.dashboard.name.$touched || forms.dashboard.$submitted) && forms.dashboard.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.dashboard.name.$touched || forms.dashboard.$submitted) && forms.dashboard.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.dashboard.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/yourdashboard/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_DASHBOARD\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.dashboard" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.dashboard.name.$touched || forms.dashboard.$submitted) && forms.dashboard.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.dashboard.name.$touched || forms.dashboard.$submitted) && forms.dashboard.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.dashboard.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/yourdashboard/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-tachometer"></i>\n					<a href="/tools/yourdashboards/list">{{ \'APPLICATION_YOUR_DASHBOARDS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_YOUR_DASHBOARDS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="create()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_DASHBOARD\' | translate }}\n						</button>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/yourdashboard/show/leaveEditedDashboard.modal.html",'<div class="modal-header" data-ng-init="getContacts()">\n  <h3 class="modal-title">{{ \'APPLICATION_WARNING\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <p>{{\'MESSAGE_LEAVE_EDITED_PAGE\' | translate}}</p>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="close()">{{ \'APPLICATION_CONTINUE\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/yourdashboard/show/show.html",'<div class="row" style="min-height: 466px;" id="yourDashboardView">\n  <div class="col-md-12" ng-init="getDashboard()">\n    <adf-dashboard\n    data-ng-if="dashboard"\n    name="{{dashboard.name}}"\n    collapsible="{{dashboard.collapsible}}"\n    maximizable="{{dashboard.maximizable}}"\n    enableconfirmdelete="{{dashboard.enableconfirmdelete}}"\n    structure="{{dashboard.structure}}"\n    editable="{{dashboard.editable}}"\n    adf-model="dashboard.model"/>\n  </div>\n</div>\n'),a.put("app/tools/yourdashboard/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getDashboard()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-tachometer"></i>\n					<a href="/tools/yourdashboards/list">{{ \'APPLICATION_YOUR_DASHBOARDS\' | translate }}</a>\n					<i data-ng-show="dashboard" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="dashboard">\n					<a href="#">{{dashboard.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/dashboard.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{dashboard.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.yourdashboards.view.settings\')}">\n							<a data-ng-href="/tools/yourdashboards/view/{{dashboard.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/yourdashboard/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_DASHBOARD\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateDashboard()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="dashboard.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START VISIBLE TO ADMIN -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_VISIBLE_TO_ADMIN\' | translate}}</label><br>\n								<input\n									bs-switch\n									ng-model="dashboard.admin"\n									type="checkbox"\n									switch-active="{{ radioSwitch.isActive }}"\n									switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n									switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n									switch-on-color="{{ radioSwitch.onColor }}"\n									switch-off-color="{{ radioSwitch.offColor }}"\n									switch-animate="{{ radioSwitch.animate }}"\n									switch-size="{{ radioSwitch.size }}"\n									switch-label="{{ radioSwitch.label }}"\n									switch-icon="{{ radioSwitch.icon }}"\n									switch-radio-off="{{ radioSwitch.radioOff }}"\n									switch-label-width="{{ radioSwitch.labelWidth }}"\n									switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END VISIBLE TO ADMIN -->\n\n							<!-- START VISIBLE TO USER -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_VISIBLE_TO_USER\' | translate}}</label><br>\n								<input\n									bs-switch\n									ng-model="dashboard.user"\n									type="checkbox"\n									switch-active="{{ radioSwitch.isActive }}"\n									switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n									switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n									switch-on-color="{{ radioSwitch.onColor }}"\n									switch-off-color="{{ radioSwitch.offColor }}"\n									switch-animate="{{ radioSwitch.animate }}"\n									switch-size="{{ radioSwitch.size }}"\n									switch-label="{{ radioSwitch.label }}"\n									switch-icon="{{ radioSwitch.icon }}"\n									switch-radio-off="{{ radioSwitch.radioOff }}"\n									switch-label-width="{{ radioSwitch.labelWidth }}"\n									switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END VISIBLE TO USER -->\n\n							<!-- START VISIBLE TO AGENT -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_VISIBLE_TO_AGENT\' | translate}}</label><br>\n								<input\n									bs-switch\n									ng-model="dashboard.agent"\n									type="checkbox"\n									switch-active="{{ radioSwitch.isActive }}"\n									switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n									switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n									switch-on-color="{{ radioSwitch.onColor }}"\n									switch-off-color="{{ radioSwitch.offColor }}"\n									switch-animate="{{ radioSwitch.animate }}"\n									switch-size="{{ radioSwitch.size }}"\n									switch-label="{{ radioSwitch.label }}"\n									switch-icon="{{ radioSwitch.icon }}"\n									switch-radio-off="{{ radioSwitch.radioOff }}"\n									switch-label-width="{{ radioSwitch.labelWidth }}"\n									switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END VISIBLE TO AGENT -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="dashboard.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/zendesk/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-heart"></i>\n					<a href="/zendesk/list">{{ \'APPLICATION_ZENDESK\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-heart font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ZENDESK\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/zendesk/wizard" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/zendesk/view/configuration/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.name.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.name.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START CHANNEL -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.channel.$touched || form.channel.$submitted) && form.channel.$invalid}">\n      <label class="control-label">{{\'APPLICATION_CHANNEL\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.channel" name="channel" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_CHANNEL\' | translate}}">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="channel.value as channel in channels | filter: $select.search">\n          <div data-ng-bind="channel.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.channel.$touched || form.channel.$submitted) && form.channel.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- START CHANNEL -->\n\n    <!-- START VOICE SUBTYPE -->\n    <div data-ng-if="item.channel===\'voice\'" class="form-group" data-ng-class="{\'has-error\': (form.channel.$touched || form.channel.$submitted) && form.channel.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.type" name="type" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_TYPE\' | translate}}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="type in [\'Queue\',\'Outbound\'] | filter: $select.search">\n          <div data-ng-bind="type | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.type.$touched || form.type.$submitted) && form.type.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- START CHANNEL -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),
-a.put("app/zendesk/view/configuration/list/list.html",'<div ui-view class="profile-content">\n	<div class="row">\n		<div class="col-md-12">\n			<div class="portlet light" data-ng-init="initView()">\n				<div class="portlet-title  tabbable-line">\n					<div class="caption caption-md">\n						<i class="icon-globe theme-font hide"></i>\n						<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATIONS\' | translate}}</span>\n					</div>\n					<div class="actions">\n						<div class="btn-group" data-ng-show="id.length">\n							<a class="btn red" href="#" data-ng-click="deleteItems()">\n								<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n							</a>\n						</div>\n						<div class="btn-group">\n							<a class="btn green-jungle" href="#" data-ng-click="createItem()">\n								<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}\n							</a>\n						</div>\n					</div>\n				</div>\n				<div class="portlet-body">\n					<!-- START TABLE -->\n					<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n						<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n					</div>\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/zendesk/view/configuration/view/view.html",'<div class="row" data-ng-init="initView();getConfiguration();getCustomVariables();getFields();getTags();">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\n					</li>\n          <li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\n					</li>\n          <li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_4" data-toggle="tab">{{\'APPLICATION_TAGS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- SUBJECT TAB -->\n					<div class="tab-pane ui-padding active" id="tab_1_1">\n            <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by blank space:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItem(\'subject\')"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div id="subject-item-list" ng-scrollbars ng-scrollbars-config="config"> -->\n	            <div class="row" data-ng-repeat="subjectItem in subjectConfig">\n	              <div class="col-md-3">\n	                <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n	                  <ui-select-choices repeat="item.type as item in fieldType | filter: $select.search">\n	                    <div ng-bind-html="item.title | highlight: $select.search"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\n	                <div class="form-group">\n	                  <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\n	                </div>\n	              </div>\n								<div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.variableName" data-ng-change="updateField(subjectItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n	                    <ui-select-choices group-by="groupVariableByGroup" repeat="variable.name as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.title | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'customVariable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in customVariables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END SUBJECT TAB -->\n          <!-- DESCRIPTION TAB -->\n					<div class="tab-pane ui-padding" id="tab_1_2">\n						<div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by new line:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItem(\'description\')"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div id="description-item-list" ng-scrollbars ng-scrollbars-config="config"> -->\n							<div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\n	              <div class="col-md-2">\n	                <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n	                  <ui-select-choices repeat="item.type as item in descFieldType | filter: $select.search">\n	                    <div ng-bind-html="item.title | highlight: $select.search"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\n	                <div class="form-group">\n	                  <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\n	                </div>\n	              </div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\'">\n									<input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\n								</div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\'">\n									<ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n	                  <ui-select-choices repeat="item.type as item in fieldType | filter: $select.search">\n	                    <div ng-bind-html="item.title | highlight: $select.search"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n								</div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\' && descriptionItem.keyType==\'string\'">\n									<input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\n								</div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\' && descriptionItem.keyType==\'variable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.variableName" data-ng-change="updateField(descriptionItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n	                    <ui-select-choices group-by="groupVariableByGroup" repeat="variable.name as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.title | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\' && descriptionItem.keyType==\'customVariable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in customVariables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END DESCRIPTION TAB -->\n          <!-- FIELDS TAB -->\n					<div class="tab-pane ui-padding" id="tab_1_3">\n						<div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItem(\'field\')"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div id="field-item-list" ng-scrollbars ng-scrollbars-config="config"> -->\n	            <div class="row" data-ng-repeat="fieldItem in fieldConfig">\n	              <div class="col-md-3">\n	                <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n	                  <ui-select-choices repeat="item.id as item in accountFields | filter: $select.search">\n	                    <div ng-bind-html="item.title | highlight: $select.search"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\n	                <div class="form-group">\n										<ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n		                  <ui-select-choices repeat="item.value as item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\n		                    <div ng-bind-html="item.name | highlight: $select.search"></div>\n		                  </ui-select-choices>\n		                </ui-select>\n	                </div>\n	              </div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\n									<div class="form-group">\n										<ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n		                  <ui-select-choices repeat="item.type as item in fieldType | filter: $select.search">\n		                    <div ng-bind-html="item.title | highlight: $select.search | ucfirst"></div>\n		                  </ui-select-choices>\n		                </ui-select>\n									</div>\n								</div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\n	                <div class="form-group">\n										<input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\n	                </div>\n	              </div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\n	                <div class="form-group">\n										<ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.variableName" data-ng-change="updateField(fieldItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n	                    <ui-select-choices group-by="groupVariableByGroup" repeat="variable.name as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.title | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'customVariable\'">\n	                <div class="form-group">\n										<ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in customVariables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END FIELDS TAB -->\n					<!-- TAG TAB -->\n					<div class="tab-pane ui-padding" id="tab_1_4">\n						<div class="row">\n              <div class="col-md-12">\n                <span class="caption-subject">Select tags that you want add in the ticket:</span>\n              </div>\n            </div>\n            <hr>\n						<form name="forms.tags" data-ng-submit="updateTags()" novalidate>\n							<!-- TAG -->\n							<div class="form-group">\n								<ui-select multiple data-ng-model="selectedTags.tags" theme="bootstrap" name="tags" ng-disabled="disabled">\n									<ui-select-match placeholder="{{ \'APPLICATION_TAGS\' | translate }}">{{$item.name}}</ui-select-match>\n									<ui-select-choices repeat="tag.id as tag in tags | filter: $select.search">\n										{{tag.name}}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n							<!-- END TAG -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END TAG TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/zendesk/view/view.account.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_URI\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_URI\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START AUTH TYPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.authType.$invalid}">\n								<label class="control-label">{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}</label>\n								<ui-select data-ng-model="account.authType" name="authType" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="type in [\'password\', \'token\'] | filter: $select.search">\n										<div data-ng-bind="type | capitalize | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="forms.formSetting.authType.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- START AUTH TYPE -->\n\n              <!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}" ng-slide-down="account.authType == \'password\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n								<span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n              <!-- START TOKEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.token.$invalid}" ng-slide-down="account.authType == \'token\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="token" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.token" required/>\n								<span data-ng-show="forms.formSetting.token.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TOKEN -->\n\n							<!-- START SERVER URL -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.serverUrl.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}}</label>\n								<input type="url" name="serverUrl" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.serverUrl"/>\n								<span class="help-block">\n									{{\'DESCRIPTION_SERVER_URL\' | translate}}.\n								</span>\n								<span class="help-block help-block-info">\n									{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n								</span>\n							</div>\n							<!-- END SERVER URL -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/zendesk/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n          <i class="icon-heart"></i>\n          <a href="/zendesk/list">{{ \'APPLICATION_ZENDESK\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{account.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img src="assets/images/media/zendesk.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{account.name}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{account.remoteUri}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.zendesk.view.account\')}">\n							<a ng-href="/zendesk/view/{{account.id}}/account">\n							<i class="icon-user"></i>\n							{{ \'APPLICATION_ACCOUNT\' | translate }} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.zendesk.view.configurations\') || $state.is(\'main.zendesk.view.configuration\')}">\n							<a ng-href="/zendesk/view/{{account.id}}/configurations/list">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_CONFIGURATIONS\' | translate }} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/zendesk/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-heart"></i>\n						<a href="/zendesk/list">{{ \'APPLICATION_ZENDESK\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n						<form name="forms.formSetting" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.username" required ng-remote-validate="/api/zendesk/accounts/validate/username"/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formSetting.username.$touched || forms.formSetting.$submitted) && forms.formSetting.username.$error.ngRemoteValidate" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n				        </span>\n							</div>\n							<!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_URI\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_URI\' | translate}}" class="form-control" data-ng-model="item.remoteUri" required ng-remote-validate="/api/zendesk/accounts/validate/remoteUri"/>\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formSetting.remoteUri.$touched || forms.formSetting.$submitted) && forms.formSetting.remoteUri.$error.ngRemoteValidate" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_DOMAIN\' | translate}}.\n				        </span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START AUTH TYPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.authType.$invalid}">\n								<label class="control-label">{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}</label>\n								<ui-select data-ng-model="item.authType" name="authType" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="type in [\'password\', \'token\'] | filter: $select.search">\n										<div data-ng-bind="type | capitalize | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="forms.formSetting.authType.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- START AUTH TYPE -->\n\n              <!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}" ng-slide-down="item.authType == \'password\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n								<span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n              <!-- START TOKEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.token.$invalid}" ng-slide-down="item.authType == \'token\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="token" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.token" required/>\n								<span data-ng-show="forms.formSetting.token.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TOKEN -->\n\n							<!-- START SERVER URL -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.serverUrl.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}}</label>\n								<input type="url" name="serverUrl" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.serverUrl"/>\n								<span class="help-block">\n									{{\'DESCRIPTION_SERVER_URL\' | translate}}.\n								</span>\n								<span class="help-block help-block-info">\n									{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n								</span>\n							</div>\n							<!-- END SERVER URL -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n\n				</wizard>\n\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
-a.put("components/directives/action/accountEmail/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{\'APPLICATION_ACCOUNT\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="account.id as account in accounts.rows | filter: $select.search">\n      <div ng-bind-html="account.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data6\'+randomName].$touched || form.$submitted) && form[\'data6\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data6" name="data6{{randomName}}" theme="bootstrap">\n    <ui-select-match allow-clear placeholder="{{\'APPLICATION_TEMPLATE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n      <div ng-bind-html="template.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data6\'+randomName].$touched || form.$submitted) && form[\'data6\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_TO\' | translate}}" required/>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data3" name="data3{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_CC\' | translate}}"/>\n  <span data-ng-show="(form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName  && !element.data6" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data4\'+randomName].$touched || form.$submitted) && form[\'data4\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data4" name="data4{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_SUBJECT\' | translate}}"/>\n  <span data-ng-show="(form[\'data4\'+randomName].$touched || form.$submitted) && form[\'data4\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-12" data-ng-class="{\'has-error\': (form[\'data5\'+randomName].$touched || form.$submitted) && form[\'data5\'+randomName].$invalid}">\n  <textarea rows="10" ng-model="element.data5" name="data5{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_TEXT\' | translate}}" data-ng-required="!element.data6"></textarea>\n  <span data-ng-show="(form[\'data5\'+randomName].$touched || form.$submitted) && form[\'data5\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/accountSms/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{\'APPLICATION_ACCOUNT\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="account.id as account in accounts.rows | filter: $select.search">\n      <div ng-bind-html="account.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_TO\' | translate}}" required/>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-12" data-ng-class="{\'has-error\': (form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$invalid}">\n  <textarea rows="10" ng-model="element.data3" name="data3{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_TEXT\' | translate}}"></textarea>\n  <span data-ng-show="(form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/accountTemplate/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{\'APPLICATION_ACCOUNT\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="account.id as account in accounts.rows | filter: $select.search">\n      <div ng-bind-html="account.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data2" name="data2{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{\'APPLICATION_TEMPLATE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="template.id as template in templates.rows | filter: $select.search">\n      <div ng-bind-html="template.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data3" name="data3{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_TO\' | translate}}" required/>\n  <span data-ng-show="(form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/close/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data1" name="data1{{randomName}}" class="form-control" placeholder="{{ \'APPLICATION_DISPOSITION\' | translate }}" required/>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/email/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data5\'+randomName].$touched || form.$submitted) && form[\'data5\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data5" name="data5{{randomName}}" theme="bootstrap">\n    <ui-select-match allow-clear placeholder="{{\'APPLICATION_TEMPLATE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n      <div ng-bind-html="template.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data5\'+randomName].$touched || form.$submitted) && form[\'data5\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data1" name="data1{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_TO\' | translate}}" required/>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_CC\' | translate}}"/>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName && !element.data5" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data3" name="data3{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_SUBJECT\' | translate}}"/>\n  <span data-ng-show="(form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-12" data-ng-class="{\'has-error\': (form[\'data4\'+randomName].$touched || form.$submitted) && form[\'data4\'+randomName].$invalid}">\n  <textarea rows="10" ng-model="element.data4" name="data4{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_TEXT\' | translate}}" data-ng-required="!element.data5"></textarea>\n  <span data-ng-show="(form[\'data4\'+randomName].$touched || form.$submitted) && form[\'data4\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/forward/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data1" name="data1{{randomName}}" class="form-control" placeholder="{{ \'APPLICATION_TO\' | translate }}" required/>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/http/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected}}</ui-select-match>\n    <ui-select-choices repeat="method in methods | filter: $select.search">\n      <div ng-bind-html="method | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" placeholder="URL" required/>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/integration/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" data-ng-change="changeIntegration()" required>\n    <ui-select-match placeholder="{{ \'APPLICATION_INTEGRATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="integration.state as integration in integrations | filter: $select.search">\n      <div ng-bind-html="integration.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{\'APPLICATION_INTEGRATION\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="form-group col-md-6" data-ng-if="element.data1 && accounts && randomName" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data2" name="data2{{randomName}}" theme="bootstrap" data-ng-change="changeAccount();" required>\n    <ui-select-match placeholder="{{\'APPLICATION_ACCOUNT\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="account.id as account in accounts | filter: $select.search">\n      <div ng-bind-html="account.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{\'APPLICATION_ACCOUNT\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="form-group col-md-6" data-ng-if="element.data2 && configurations && randomName" data-ng-class="{\'has-error\': (form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data3" name="data3{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{\'APPLICATION_CONFIGURATION\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="config.id as config in configurations | filter: $select.search">\n      <div ng-bind-html="config.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{\'APPLICATION_CONFIGURATION\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/jscripty/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="project.id as project in projects | filter: $select.search">\n      <div ng-bind-html="project.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/motionbar/actionBuilder.html",'<!-- data1: 0 POPUP, 1 URL, 2 WINAPP -->\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required data-ng-change="changeMode();">\n    <ui-select-match placeholder="{{ \'APPLICATION_TYPE\' | translate }}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="motionAction.value as motionAction in motionActions | filter: $select.search">\n      <div ng-bind-html="motionAction.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{ \'APPLICATION_TYPE\' | translate }}\n  </span>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<!-- data1:0 data2:Template -->\n<div data-ng-if="randomName && element.data1==0" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data2" name="data2{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{ \'APPLICATION_TEMPLATE\' | translate }}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n      <div ng-bind-html="template.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{ \'APPLICATION_TEMPLATE\' | translate }}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<!-- data1:1 data2:URL -->\n<div data-ng-if="randomName && element.data1==1" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" required placeholder="{{ \'APPLICATION_URL\' | translate }}"/>\n  <span class="help-block">\n    {{ \'APPLICATION_URL\' | translate }}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<!-- data1:2 data2:Application data3:Arguments -->\n<div data-ng-if="randomName && element.data1==2" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" required placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}"/>\n  <span class="help-block">\n    {{ \'APPLICATION_APPLICATION\' | translate }}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div data-ng-if="randomName && element.data1==2" class="form-group col-md-6">\n  <input type="text" ng-model="element.data3" name="data3{{randomName}}" class="form-control" placeholder="{{ \'APPLICATION_ARGUMENTS\' | translate }}"/>\n  <span class="help-block">\n    {{ \'APPLICATION_ARGUMENTS\' | translate }}\n  </span>\n</div>\n'),a.put("components/directives/action/status/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="status.value as status in states | filter: $select.search">\n      <div ng-bind-html="status.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/tag/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select multiple data-ng-model="data.tags" theme="bootstrap">\n    <ui-select-match placeholder="{{\'APPLICATION_TAG\' | translate}}">{{$item.name}}</ui-select-match>\n    <ui-select-choices repeat="tag.name as tag in tags | filter:$select.search" class="">\n      {{tag.name}}\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/template/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{\'APPLICATION_TEMPLATE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n      <div ng-bind-html="template.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_TO\' | translate}}" required/>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/urlforward/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{ \'APPLICATION_TYPE\' | translate }}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="type.value as type in types | filter: $select.search">\n      <div ng-bind-html="type.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{\'APPLICATION_TYPE\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="form-group col-md-6" data-ng-if="element.data1 && randomName" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="url" ng-model="element.data2" placeholder="{{ \'APPLICATION_URL\' | translate }}" name="data2{{randomName}}" class="form-control" required/>\n  <span class="help-block">\n    {{\'APPLICATION_URL\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/condition/conditionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-4" data-ng-class="{\'has-error\': (form[\'field\'+randomName].$touched || form.$submitted) && form[\'field\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.field" name="field{{randomName}}" theme="bootstrap" data-ng-change="checkCondition(element.field)" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="condition.value as condition in service.services[serviceindex].conditions | filter: $select.search">\n      <div ng-bind-html="condition.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'field\'+randomName].$touched || form.$submitted) && form[\'field\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div data-ng-if="randomName && element.field" class="form-group col-md-4" data-ng-class="{\'has-error\': (form[\'operator\'+randomName].$touched || form.$submitted) && form[\'operator\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.operator" name="operator{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="operator.value as operator in _.find(service.services[serviceindex].conditions,{value:element.field}).operators | filter: $select.search">\n      <div ng-bind-html="operator.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'operator\'+randomName].$touched || form.$submitted) && form[\'operator\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="col-md-4" data-ng-if="elementType === \'input\' && randomName && element.field" data-ng-class="{\'has-error\': (form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$invalid}">\n  <input type="text" ng-model="element.value" class="form-control" name="value{{randomName}}" required/>\n  <span data-ng-show="(form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$error.required" class="help-block help-block-error">\n      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n    </span>\n</div>\n<div class="form-group col-md-4" data-ng-if="elementType === \'select\' && randomName && element.field" data-ng-class="{\'has-error\': (form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.value" name="value{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="value.value as value in values| filter: $select.search">\n      <div ng-bind-html="value.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),
-a.put("components/factories/xNotificationLicense/xNotificationLicense.html",'<div class="ui-notification alert alert-block" ng-class="class" style="width: 410px;">\n  <h4 class="alert-heading">\n    <i class="{{icon}}"></i> {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_YOUR_LICENSE_IS_GOING_TO_EXPIRE\' | translate}}! <a ng-click="more()" style="color: blue;">More.</a>\n  </h4>\n</div>\n'),a.put("components/footer/footer.html",'<!-- BEGIN FOOTER -->\n<div class="page-footer" data-ng-init="initFooter()">\n  <div class="page-footer-inner">\n     xCALLY Motion v. {{info.version}} | 2016 - {{year + 1}} &copy; Powered by Xenialab <ng-bind-html data-ng-if="license.custom && !settings.defaultFooterWhiteLabel && settings.footerWhiteLabel" ng-bind-html="\'| \'+settings.footerWhiteLabel"></ng-bind-html>\n  </div>\n  <div class="scroll-to-top">\n    <i class="icon-arrow-up"></i>\n  </div>\n</div>\n<!-- END FOOTER -->\n'),a.put("components/header/header.html",'<!-- BEGIN HEADER INNER -->\n<div class="page-header-inner" data-ng-init="initHeader()">\n  <!-- BEGIN LOGO -->\n  <div class="page-logo">\n    <a href="/">\n      <img data-ng-if="settings.defaultLogo || !license.custom" ng-src="assets/images/logo.png" alt="logo" class="logo-default"/>\n      <img data-ng-if="!settings.defaultLogo && license.custom" ng-src="api/settings/logo/main/{{settings.logo ? settings.logo : \'logo\'}}" alt="logo" class="logo-default custom-logo" onError="this.onerror=null;this.src=\'assets/images/logo.png\';"/>\n    </a>\n    <div class="menu-toggler sidebar-toggler" data-ng-click="toggleSidebar()"></div>\n  </div>\n\n  <!-- END LOGO -->\n  <!-- BEGIN HEADER SEARCH BOX -->\n  <!-- DOC: Apply "search-form-expanded" right after the "search-form" class to have half expanded search box -->\n  <form ng-repeat="call in activeCalls | limitTo:2" class="search-form search-form-expanded">\n    <div class="input-group">\n      <input type="text" class="form-control" value="{{call.calleridnum}}" readonly>\n      <span class="input-group-btn">\n        <a href="javascript:;" class="btn submit inactive-link"><i class="icon-earphones-alt"></i></a>\n      </span>\n    </div>\n  </form>\n  <!-- END HEADER SEARCH BOX -->\n  <!-- BEGIN RESPONSIVE MENU TOGGLER -->\n  <a href="javascript:;" class="menu-toggler responsive-toggler" data-toggle="collapse" data-target=".navbar-collapse"></a>\n  <!-- END RESPONSIVE MENU TOGGLER -->\n  <!-- BEGIN TOP NAVIGATION MENU -->\n  <div class="top-menu">\n    <ul class="nav navbar-nav pull-right">\n      <!-- DOC: Apply "dropdown-dark" class after below "dropdown-extended" to change the dropdown styte -->\n\n      <!-- BEGIN USER LOGIN DROPDOWN -->\n      <!-- DOC: Apply "dropdown-dark" class after below "dropdown-extended" to change the dropdown styte -->\n      <li class="dropdown dropdown-user">\n        <a href="#" class="dropdown-toggle" dropdown-menu-hover data-toggle="dropdown" data-close-others="true">\n          <img class="img-circle" data-ng-src="api/users/avatar/{{getCurrentUser().userpic || \'unknown_avatar\'}}" alt="...">\n          <span class="username username-hide-on-mobile">\n            {{ getCurrentUser().fullname }}\n          </span>\n          <i class="fa fa-angle-down"></i>\n        </a>\n        <ul class="dropdown-menu dropdown-menu-default">\n          <li>\n            <a ng-href=" {{isAdmin() ? \'/staff/users/view/\'+getCurrentUser().id+\'/account\' : \'/staff/agents/view/\'+getCurrentUser().id+\'/account\'}}">\n              <i class="icon-key"></i>{{\'APPLICATION_CHANGE_PASSWORD\' | translate}}\n            </a>\n          </li>\n          <li data-ng-click="logout()">\n            <a href="#">\n              <i class="icon-logout"></i> Log Out\n            </a>\n          </li>\n        </ul>\n      </li>\n      <!-- END USER LOGIN DROPDOWN -->\n      <!-- BEGIN QUICK SIDEBAR TOGGLER -->\n      <!-- DOC: Apply "dropdown-dark" class after below "dropdown-extended" to change the dropdown styte -->\n      <!-- <li class="dropdown dropdown-quick-sidebar-toggler" data-ng-click="toggleQuickSidebar()">\n      <a href="#" class="dropdown-toggle">\n      <i class="icon-logout"></i>\n    </a>\n  </li> -->\n  <!-- END QUICK SIDEBAR TOGGLER -->\n</ul>\n<ul class="nav navbar-nav pull-right">\n  <!-- BEGIN LANGUAGE BAR -->\n  <li class="dropdown dropdown-language">\n    <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n      <img ng-src="assets/images/flags/{{ language }}.png">\n      <i class="fa fa-angle-down"></i>\n    </a>\n    <ul class="dropdown-menu dropdown-menu-default scrollable-menu">\n      <li>\n        <a href="#" ng-click="changeLanguage(\'ar\')">\n          <img alt="" src="assets/images/flags/ar.png"> {{\'APPLICATION_ARABIC\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'da\')">\n          <img alt="" src="assets/images/flags/da.png"> {{\'APPLICATION_DANISH\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'de\')">\n          <img alt="" src="assets/images/flags/de.png"> {{\'APPLICATION_GERMAN\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'en_EN\')">\n          <img alt="" src="assets/images/flags/en_EN.png"> {{\'APPLICATION_ENGLISH\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'es\')">\n          <img alt="" src="assets/images/flags/es.png"> {{\'APPLICATION_SPANISH\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'fi\')">\n          <img alt="" src="assets/images/flags/fi.png"> {{\'APPLICATION_FINNISH\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'fr\')">\n          <img alt="" src="assets/images/flags/fr.png"> {{\'APPLICATION_FRENCH\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'hi\')">\n          <img alt="" src="assets/images/flags/hi.png"> {{\'APPLICATION_HINDI\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'it\')">\n          <img alt="" src="assets/images/flags/it.png"> {{\'APPLICATION_ITALIAN\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'ja\')">\n          <img alt="" src="assets/images/flags/ja.png"> {{\'APPLICATION_JAPANASE\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'ko\')">\n          <img alt="" src="assets/images/flags/ko.png"> {{\'APPLICATION_KOREAN\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'nl\')">\n          <img alt="" src="assets/images/flags/nl.png"> {{\'APPLICATION_DUTCH\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'no\')">\n          <img alt="" src="assets/images/flags/no.png"> {{\'APPLICATION_NORWEGIAN\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'pt-BR\')">\n          <img alt="" src="assets/images/flags/pt-BR.png"> {{\'APPLICATION_PORTUGUESE_BRAZIL\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'pt-PT\')">\n          <img alt="" src="assets/images/flags/pt-PT.png"> {{\'APPLICATION_PORTUGUESE_PORTUGAL\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'ru\')">\n          <img alt="" src="assets/images/flags/ru.png"> {{\'APPLICATION_RUSSIAN\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'sv\')">\n          <img alt="" src="assets/images/flags/sv.png"> {{\'APPLICATION_SWEDISH\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'tr\')">\n          <img alt="" src="assets/images/flags/tr.png"> {{\'APPLICATION_TURKISH\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'fa\')">\n          <img alt="" src="assets/images/flags/fa.png"> {{\'APPLICATION_PERSIAN\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'zh-CN\')">\n          <img alt="" src="assets/images/flags/zh-CN.png"> {{\'APPLICATION_CHINESE_SIMPLIFIED\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'zh-TW\')">\n          <img alt="" src="assets/images/flags/zh-TW.png"> {{\'APPLICATION_CHINESE_TRADITIONAL\' | translate}}\n        </a>\n      </li>\n    </ul>\n  </li>\n  <!-- END LANGUAGE BAR -->\n</ul>\n<ul data-ng-if="getCurrentUser().role === \'agent\'" class="nav navbar-nav pull-right header-ul-with-separator padding-side-7" data-ng-class="{\'paused-header\':headerAgent.voicePause || headerAgent.mailPause || headerAgent.chatPause || headerAgent.faxPause || headerAgent.smsPause || headerAgent.openchannelPause}">\n  <li class="dropdown dropdown-user" >\n    <a href="#" class="dropdown-toggle custom-header-a" dropdown-menu-hover data-toggle="dropdown" data-close-others="true" style="cursor:default;">\n      <div>{{(headerAgent.voicePause || headerAgent.mailPause || headerAgent.chatPause || headerAgent.faxPause || headerAgent.smsPause || headerAgent.openchannelPause) ? ((!headerAgent.voicePause || !headerAgent.mailPause || !headerAgent.chatPause || !headerAgent.faxPause || !headerAgent.smsPause || !headerAgent.openchannelPause) ? \'(\'+(\'APPLICATION_PARTIAL\' | translate) + \') \'+headerAgent.pauseType : headerAgent.pauseType) : \'READY\'}}</div>\n      <div data-ng-if="headerAgent.voicePause || headerAgent.mailPause || headerAgent.chatPause || headerAgent.faxPause || headerAgent.smsPause || headerAgent.openchannelPause"><css-timer start-time="headerAgent.lastPauseAt"></css-timer></div>\n    </a>\n  </li>\n  <li class="dropdown dropdown-user" data-ng-if="headerAgent.voicePause || headerAgent.mailPause || headerAgent.chatPause || headerAgent.faxPause || headerAgent.smsPause || headerAgent.openchannelPause">\n    <a href="#" class="dropdown-toggle padding-side-7 header-bar-button header-bar-button-controls" dropdown-menu-hover data-toggle="dropdown" data-close-others="true" data-ng-click="headerPause(\'unpause\')">\n      <i class="fa fa-play font-green"></i></a>\n    </li>\n    <li class="dropdown dropdown-user" data-ng-if="headerAgent.voicePause || headerAgent.mailPause || headerAgent.chatPause || headerAgent.faxPause || headerAgent.smsPause || headerAgent.openchannelPause">\n      <a href="#" class="dropdown-toggle header-bar-button" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n        <i class="fa fa-angle-down"></i>\n      </a>\n      <ul class="dropdown-menu dropdown-menu-default scrollable-menu">\n        <li data-ng-if="headerAgent.voicePause">\n          <a href="#" data-ng-click="headerPause(\'unpause\',null,\'voice\')">\n            <i class="fa fa-play font-green"></i> {{\'APPLICATION_VOICE\' | translate}}\n          </a>\n        </li>\n        <li data-ng-if="headerAgent.mailPause">\n          <a href="#" data-ng-click="headerPause(\'unpause\',null,\'mail\')">\n            <i class="fa fa-play font-green"></i> {{\'APPLICATION_MAIL\' | translate}}\n          </a>\n        </li>\n        <li data-ng-if="headerAgent.chatPause">\n          <a href="#" data-ng-click="headerPause(\'unpause\',null,\'chat\')">\n            <i class="fa fa-play font-green"></i> {{\'APPLICATION_CHAT\' | translate}}\n          </a>\n        </li>\n        <li data-ng-if="headerAgent.faxPause">\n          <a href="#" data-ng-click="headerPause(\'unpause\',null,\'fax\')">\n            <i class="fa fa-play font-green"></i> {{\'APPLICATION_FAX\' | translate}}\n          </a>\n        </li>\n        <li data-ng-if="headerAgent.smsPause">\n          <a href="#" data-ng-click="headerPause(\'unpause\',null,\'sms\')">\n            <i class="fa fa-play font-green"></i> {{\'APPLICATION_SMS\' | translate}}\n          </a>\n        </li>\n        <li data-ng-if="headerAgent.openchannelPause">\n          <a href="#" data-ng-click="headerPause(\'unpause\',null,\'openchannel\')">\n            <i class="fa fa-play font-green"></i> {{\'APPLICATION_OPEN_CHANNEL\' | translate}}\n          </a>\n        </li>\n      </ul>\n    </li>\n    <li class="dropdown dropdown-user">\n      <a href="#" class="dropdown-toggle padding-side-7 header-bar-button header-bar-button-controls" dropdown-menu-hover data-toggle="dropdown" data-close-others="true" data-ng-click="headerPause(\'pause\',\'DEFAULT PAUSE\')">\n        <i class="fa fa-pause font-yellow"></i></a>\n      </li>\n      <li class="dropdown dropdown-user" data-ng-if="headerPauses.length">\n        <a href="#" class="dropdown-toggle header-bar-button" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n          <i class="fa fa-angle-down"></i>\n        </a>\n        <ul class="dropdown-menu dropdown-menu-default scrollable-menu">\n          <li data-ng-repeat="pause in headerPauses">\n            <a href="#" data-ng-click="headerPause(\'pause\',pause.name)">\n              {{pause.name}}\n            </a>\n          </li>\n        </ul>\n      </li>\n    </ul>\n    <ul class="nav navbar-nav pull-right" data-ng-if="getCurrentUser().role === \'agent\'" >\n      <li data class="dropdown dropdown-extended dropdown-notification" id="header_agent_notification_bar" data-ng-click="agentNotifications.agent.new = 0;">\n        <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n          <i class="icon-earphones-alt"></i>\n          <span class="badge badge-default" data-ng-if="agentNotifications.agent.new">\n            {{agentNotifications.agent.new}} </span>\n          </a>\n          <ul class="dropdown-menu tabbed-dropdown">\n            <li class="external">\n              <h3><span class="bold">{{\'APPLICATION_LAST_VOICE_NOTIFICATIONS\' | translate}}</span></h3>\n            </li>\n            <li>\n              <ul class="nav nav-tabs">\n                <li class="active">\n                  <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_INBOUND\' | translate}}</a>\n                </li>\n                <li>\n                  <a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_OUTBOUND\' | translate}}</a>\n                </li>\n              </ul>\n\n              <div class="tab-content">\n                <!-- GENERAL TAB -->\n                <div class="tab-pane active" id="tab_1_1">\n                  <!-- BEGIN UI-GRID SPINNER -->\n                  <span us-spinner spinner-key="agent-spinner-grid" data-ng-if="busyLoad.agent.busy" spinner-start-active="true"></span>\n                  <!-- END UI-GRID SPINNER -->\n                  <ul class="dropdown-menu-list scrollable-menu" style="height: 250px;" data-handle-color="#637283" infinite-scroll="loadNotifications(\'agent\')" can-load=\'!busyLoad.agent.busy\' treshold="261">\n                    <li data-ng-repeat="notification in agentNotifications.agent.rows">\n                      <a href="javascript:;" style="cursor:default;">\n                        <div class="row">\n                          <div class="col-md-1">\n                            <img src="assets/images/media/inboundroute.png" style="width:25px;height:25px;" alt="">\n                          </div>\n                          <div class="col-md-10">\n                            <div>{{\'APPLICATION_VOICE_NEW_CALL\' | translate}}<span data-ng-if="notification.status && notification.status !== \'none\'" class="badge float-right" data-ng-class="{\'badge-success\':notification.status === \'taken\',\'badge-danger\':notification.status === \'lost\',\'badge-warning\':notification.status === \'rejected\' || notification.status === \'busy\',\'badge-info\':notification.status === \'taken_elsewhere\'}">{{\'APPLICATION_VOICE_\'+notification.status.toUpperCase() | translate}}</span></div>\n                            <div><span class="time float-left" style="max-width:none !important;"><span am-time-ago="notification.updatedAt"></span></span></div>\n                          </div>\n                        </div>\n                        <div>\n                          <span class="message">{{notification.dialstring ? \'APPLICATION_TO\' : \'APPLICATION_FROM\' | translate}}: <span class="span-link" data-ng-click="chooseContact(notification.calleridnum)">{{notification.calleridnum}}</span></span>\n                        </div>\n                        <div data-ng-if="notification.status === \'taken_elsewhere\'">\n                          <span class="message">{{\'APPLICATION_AGENT_NAME\' | translate}}: <span ><b>{{notification.answeredelsewheremembername}}</b></span></span>\n                        </div>\n                        <div data-ng-if="notification.status === \'taken\' && notification.lastevent === \'complete\'">\n                          <span class="message">{{\'APPLICATION_COMPLETED_BY\' | translate}}: <span ><b>{{\'APPLICATION_VOICE_\'+notification.reason.toUpperCase() | translate}}</b></span></span>\n                        </div>\n                      </a>\n                    </li>\n                  </ul>\n                </div>\n                <div class="tab-pane" id="tab_1_2">\n                  <!-- BEGIN UI-GRID SPINNER -->\n                  <span us-spinner spinner-key="dial-spinner-grid" data-ng-if="busyLoad.dial.busy" spinner-start-active="true"></span>\n                  <!-- END UI-GRID SPINNER -->\n                  <ul class="dropdown-menu-list scrollable-menu" style="height: 250px;" data-handle-color="#637283" infinite-scroll="loadNotifications(\'dial\')" can-load=\'!busyLoad.dial.busy\' treshold="261">\n                    <li data-ng-repeat="notification in agentNotifications.dial.rows">\n                      <a href="javascript:;" style="cursor:default;">\n                        <div class="row">\n                          <div class="col-md-1">\n                            <img src="assets/images/media/outboundroute.png" style="width:25px;height:25px;" alt="">\n                          </div>\n                          <div class="col-md-10">\n                            <div>{{\'APPLICATION_VOICE_NEW_CALL\' | translate}}<span data-ng-if="notification.status && notification.status !== \'none\'" class="badge float-right" data-ng-class="{\'badge-success\':notification.status === \'taken\',\'badge-danger\':notification.status === \'lost\',\'badge-warning\':notification.status === \'rejected\',\'badge-info\':notification.status === \'taken_elsewhere\'}">{{\'APPLICATION_VOICE_\'+notification.status.toUpperCase() | translate}}</span></div>\n                            <div><span class="time float-left" style="max-width:none !important;"><span am-time-ago="notification.updatedAt"></span></span></div>\n                          </div>\n                        </div>\n                        <div>\n                          <span class="message">{{\'APPLICATION_TO\' | translate}}: <span class="span-link" data-ng-click="chooseContact(notification.destcalleridnum)">{{notification.destcalleridnum}}</span></span>\n                        </div>\n                      </a>\n                    </li>\n                  </ul>\n                </div>\n              </div>\n            </li>\n          </ul>\n        </li>\n        <li data ng-if="license.mail" class="dropdown dropdown-extended dropdown-notification" id="header_mail_notification_bar" data-ng-click="agentNotifications.mail.new = 0;">\n          <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n            <i class="icon-envelope-open"></i>\n            <span class="badge badge-default" data-ng-if="agentNotifications.mail.new">\n              {{agentNotifications.mail.new}} </span>\n            </a>\n            <ul class="dropdown-menu">\n              <li class="external">\n                <h3><span class="bold">{{\'APPLICATION_LAST_MAIL_NOTIFICATIONS\' | translate}}</span></h3>\n              </li>\n              <li>\n                <!-- BEGIN UI-GRID SPINNER -->\n                <span us-spinner spinner-key="mail-spinner-grid" data-ng-if="busyLoad.mail.busy" spinner-start-active="true"></span>\n                <!-- END UI-GRID SPINNER -->\n                <ul class="dropdown-menu-list scrollable-menu" style="height: 250px;" data-handle-color="#637283" infinite-scroll="loadNotifications(\'mail\')" can-load=\'!busyLoad.mail.busy\' treshold="261">\n                  <li data-ng-repeat="notification in agentNotifications.mail.rows">\n                    <a href="javascript:;" style="cursor:default;">\n                      <div class="row">\n                        <div class="col-md-1">\n                          <img src="assets/images/media/enquiry.png" style="width:25px;height:25px;" alt="">\n                        </div>\n                        <div class="col-md-10">\n                          <div>{{\'APPLICATION_NEW_MESSAGE\' | translate}}<span data-ng-if="notification.status && notification.status !== \'none\'" class="badge float-right" data-ng-class="{\'badge-success pointer-cursor\':notification.status === \'taken\',\'badge-danger\':notification.status === \'lost\',\'badge-warning\':notification.status === \'rejected\'}" data-ng-click="notification.status === \'taken\' && openRoom(notification.roomid, \'mailRoom\')">{{\'APPLICATION_MESSAGE_\'+notification.status.toUpperCase() | translate}} <i data-ng-if="notification.status === \'taken\'" class="fa fa-envelope"></i></span></div>\n                          <div><span class="time float-left" style="max-width:none !important;"><span am-time-ago="notification.updatedAt"></span></span></div>\n                        </div>\n                      </div>\n                      <div>\n                        <span class="message">{{\'APPLICATION_FROM\' | translate}}: <span class="span-link" data-ng-click="openContact(\'mail\',notification.accountid,notification.from)">{{notification.from}}</span></span>\n                      </div>\n                    </a>\n                  </li>\n                </ul>\n              </li>\n            </ul>\n          </li>\n          <li data ng-if="license.chat" class="dropdown dropdown-extended dropdown-notification" id="header_chat_notification_bar" data-ng-click="agentNotifications.chat.new = 0;">\n            <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n              <i class="icon-bubble"></i>\n              <span class="badge badge-default" data-ng-if="agentNotifications.chat.new">\n                {{agentNotifications.chat.new}} </span>\n              </a>\n              <ul class="dropdown-menu">\n                <li class="external">\n                  <h3><span class="bold">{{\'APPLICATION_LAST_CHAT_NOTIFICATIONS\' | translate}}</span></h3>\n                </li>\n                <li>\n                  <!-- BEGIN UI-GRID SPINNER -->\n                  <span us-spinner spinner-key="chat-spinner-grid" data-ng-if="busyLoad.chat.busy" spinner-start-active="true"></span>\n                  <!-- END UI-GRID SPINNER -->\n                  <ul class="dropdown-menu-list scrollable-menu" style="height: 250px;" data-handle-color="#637283" infinite-scroll="loadNotifications(\'chat\')" can-load=\'!busyLoad.chat.busy\' treshold="261">\n                    <li data-ng-repeat="notification in agentNotifications.chat.rows">\n                      <a href="javascript:;" style="cursor:default;">\n                        <div class="row">\n                          <div class="col-md-1">\n                            <img src="assets/images/media/website.png" style="width:25px;height:25px;" alt="">\n                          </div>\n                          <div class="col-md-10">\n                            <div>{{\'APPLICATION_NEW_CHAT_REQUEST\' | translate}}<span data-ng-if="notification.status && notification.status !== \'none\'" class="badge float-right" data-ng-class="{\'badge-success pointer-cursor\':notification.status === \'taken\',\'badge-danger\':notification.status === \'lost\',\'badge-warning\':notification.status === \'rejected\'}" data-ng-click="notification.status === \'taken\' && openRoom(notification.roomid, \'chatRoom\')">{{\'APPLICATION_CHAT_\'+notification.status.toUpperCase() | translate}} <i data-ng-if="notification.status === \'taken\'" class="fa fa-envelope"></i></span></div>\n                            <div><span class="time float-left" style="max-width:none !important;"><span am-time-ago="notification.updatedAt"></span></span></div>\n                          </div>\n                        </div>\n                        <div>\n                          <span class="message">{{\'APPLICATION_FROM\' | translate}}: <span class="span-link" data-ng-click="openContact(\'chat\',notification.websiteid,notification.visitoremail)">{{notification.visitoremail}}</span></span>\n                        </div>\n                      </a>\n                    </li>\n                  </ul>\n                </li>\n              </ul>\n            </li>\n            <li data ng-if="license.fax" class="dropdown dropdown-extended dropdown-notification" id="header_fax_notification_bar" data-ng-click="agentNotifications.fax.new = 0;">\n              <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n                <i class="fa fa-fax"></i>\n                <span class="badge badge-default" data-ng-if="agentNotifications.fax.new">\n                  {{agentNotifications.fax.new}} </span>\n                </a>\n                <ul class="dropdown-menu">\n                  <li class="external">\n                    <h3><span class="bold">{{\'APPLICATION_LAST_FAX_NOTIFICATIONS\' | translate}}</span></h3>\n                  </li>\n                  <li>\n                    <!-- BEGIN UI-GRID SPINNER -->\n                    <span us-spinner spinner-key="fax-spinner-grid" data-ng-if="busyLoad.fax.busy" spinner-start-active="true"></span>\n                    <!-- END UI-GRID SPINNER -->\n                    <ul class="dropdown-menu-list scrollable-menu" style="height: 250px;" data-handle-color="#637283" infinite-scroll="loadNotifications(\'fax\')" can-load=\'!busyLoad.fax.busy\' treshold="261">\n                      <li data-ng-repeat="notification in agentNotifications.fax.rows">\n                        <a href="javascript:;" style="cursor:default;">\n                          <div class="row">\n                            <div class="col-md-1">\n                              <img src="assets/images/media/fax.png" style="width:25px;height:25px;" alt="">\n                            </div>\n                            <div class="col-md-10">\n                              <div>{{\'APPLICATION_NEW_FAX_REQUEST\' | translate}}<span data-ng-if="notification.status && notification.status !== \'none\'" class="badge float-right" data-ng-class="{\'badge-success pointer-cursor\':notification.status === \'taken\',\'badge-danger\':notification.status === \'lost\',\'badge-warning\':notification.status === \'rejected\'}" data-ng-click="notification.status === \'taken\' && openRoom(notification.roomid, \'faxRoom\')">{{\'APPLICATION_FAX_\'+notification.status.toUpperCase() | translate}} <i data-ng-if="notification.status === \'taken\'" class="fa fa-envelope"></i></span></div>\n                              <div><span class="time float-left" style="max-width:none !important;"><span am-time-ago="notification.updatedAt"></span></span></div>\n                            </div>\n                          </div>\n                          <div>\n                            <span class="message">{{\'APPLICATION_FROM\' | translate}}: <span class="span-link" data-ng-click="openContact(\'fax\',notification.accountid,notification.from)">{{notification.from}}</span></span>\n                          </div>\n                        </a>\n                      </li>\n                    </ul>\n                  </li>\n                </ul>\n              </li>\n              <li data ng-if="license.messaging" class="dropdown dropdown-extended dropdown-notification" id="header_sms_notification_bar" data-ng-click="agentNotifications.sms.new = 0;">\n                <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n                  <i class="glyphicon glyphicon-comment"></i>\n                  <span class="badge badge-default" data-ng-if="agentNotifications.sms.new">\n                    {{agentNotifications.sms.new}} </span>\n                  </a>\n                  <ul class="dropdown-menu">\n                    <li class="external">\n                      <h3><span class="bold">{{\'APPLICATION_LAST_SMS_NOTIFICATIONS\' | translate}}</span></h3>\n                    </li>\n                    <li>\n                      <!-- BEGIN UI-GRID SPINNER -->\n                      <span us-spinner spinner-key="sms-spinner-grid" data-ng-if="busyLoad.sms.busy" spinner-start-active="true"></span>\n                      <!-- END UI-GRID SPINNER -->\n                      <ul class="dropdown-menu-list scrollable-menu" style="height: 250px;" data-handle-color="#637283" infinite-scroll="loadNotifications(\'sms\')" can-load=\'!busyLoad.sms.busy\' treshold="261">\n                        <li data-ng-repeat="notification in agentNotifications.sms.rows">\n                          <a href="javascript:;" style="cursor:default;">\n                            <div class="row">\n                              <div class="col-md-1">\n                                <img src="assets/images/media/sms.png" style="width:25px;height:25px;" alt="">\n                              </div>\n                              <div class="col-md-10">\n                                <div>{{\'APPLICATION_NEW_SMS_REQUEST\' | translate}}<span data-ng-if="notification.status && notification.status !== \'none\'" class="badge float-right" data-ng-class="{\'badge-success pointer-cursor\':notification.status === \'taken\',\'badge-danger\':notification.status === \'lost\',\'badge-warning\':notification.status === \'rejected\'}" data-ng-click="notification.status === \'taken\' && openRoom(notification.roomid, \'smsRoom\')">{{\'APPLICATION_SMS_\'+notification.status.toUpperCase() | translate}} <i data-ng-if="notification.status === \'taken\'" class="fa fa-envelope"></i></span></div>\n                                <div><span class="time float-left" style="max-width:none !important;"><span am-time-ago="notification.updatedAt"></span></span></div>\n                              </div>\n                            </div>\n                            <div>\n                              <span class="message">{{\'APPLICATION_FROM\' | translate}}: <span class="span-link" data-ng-click="openContact(\'sms\',notification.accountid,notification.from)">{{notification.from}}</span></span>\n                            </div>\n                          </a>\n                        </li>\n                      </ul>\n                    </li>\n                  </ul>\n                </li>\n                <li data ng-if="license.openchannel" class="dropdown dropdown-extended dropdown-notification" id="header_openchannel_notification_bar" data-ng-click="agentNotifications.openchannel.new = 0;">\n                  <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n                    <i class="icon-globe"></i>\n                    <span class="badge badge-default" data-ng-if="agentNotifications.openchannel.new">\n                      {{agentNotifications.openchannel.new}} </span>\n                    </a>\n                    <ul class="dropdown-menu">\n                      <li class="external">\n                        <h3><span class="bold">{{\'APPLICATION_LAST_OPENCHANNEL_NOTIFICATIONS\' | translate}}</span></h3>\n                      </li>\n                      <li>\n                        <!-- BEGIN UI-GRID SPINNER -->\n                        <span us-spinner spinner-key="openchannel-spinner-grid" data-ng-if="busyLoad.openchannel.busy" spinner-start-active="true"></span>\n                        <!-- END UI-GRID SPINNER -->\n                        <ul class="dropdown-menu-list scrollable-menu" style="height: 250px;" data-handle-color="#637283" infinite-scroll="loadNotifications(\'openchannel\')" can-load=\'!busyLoad.openchannel.busy\' treshold="261">\n                          <li data-ng-repeat="notification in agentNotifications.openchannel.rows">\n                            <a href="javascript:;" style="cursor:default;">\n                              <div class="row">\n                                <div class="col-md-1">\n                                  <img src="assets/images/media/openchannel.png" style="width:25px;height:25px;" alt="">\n                                </div>\n                                <div class="col-md-10">\n'+"                                  <div>{{'APPLICATION_NEW_OPENCHANNEL_REQUEST' | translate}}<span data-ng-if=\"notification.status && notification.status !== 'none'\" class=\"badge float-right\" data-ng-class=\"{'badge-success pointer-cursor':notification.status === 'taken','badge-danger':notification.status === 'lost','badge-warning':notification.status === 'rejected'}\" data-ng-click=\"notification.status === 'taken' && openRoom(notification.roomid, 'openchannelRoom')\">{{'APPLICATION_OPENCHANNEL_'+notification.status.toUpperCase() | translate}} <i data-ng-if=\"notification.status === 'taken'\" class=\"fa fa-envelope\"></i></span></div>\n                                  <div><span class=\"time float-left\" style=\"max-width:none !important;\"><span am-time-ago=\"notification.updatedAt\"></span></span></div>\n                                </div>\n                              </div>\n                              <!-- <div>\n                              <span class=\"message\">{{'APPLICATION_FROM' | translate}}: <span class=\"span-link\" data-ng-click=\"openContact('openchannel',notification.accountid,notification.from)\">{{notification.from}}</span></span>\n                            </div> -->\n                          </a>\n                        </li>\n                      </ul>\n                    </li>\n                  </ul>\n                </li>\n              </ul>\n            </div>\n            <!-- END TOP NAVIGATION MENU -->\n          </div>\n          <!-- END HEADER INNER -->\n"),
-a.put("components/modal/delete.html",'<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p ng-if="modal.text" ng-bind="modal.text"></p>\n  <div ng-if="modal.html" ng-bind-html="modal.html"></div>\n</div>\n<div class="modal-footer">\n  <button ng-repeat="button in modal.buttons" ng-class="button.classes" ng-click="button.click($event)" ng-bind="button.text" class="btn"></button>\n</div>\n'),a.put("components/sidebar/sidebar.html",'<div id="page-sidebar" class="page-sidebar navbar-collapse collapse" data-ng-init="initSidebar()">\n  <!-- BEGIN SIDEBAR MENU -->\n  <!-- DOC: Apply "page-sidebar-menu-light" class right after "page-sidebar-menu" to enable light sidebar menu style(without borders) -->\n  <!-- DOC: Apply "page-sidebar-menu-hover-submenu" class right after "page-sidebar-menu" to enable hoverable(hover vs accordion) sub menu mode -->\n  <!-- DOC: Apply "page-sidebar-menu-closed" class right after "page-sidebar-menu" to collapse("page-sidebar-closed" class must be applied to the body element) the sidebar sub menu mode -->\n  <!-- DOC: Set data-auto-scroll="false" to disable the sidebar from auto scrolling/focusing -->\n  <!-- DOC: Set data-keep-expand="true" to keep the submenues expanded -->\n  <!-- DOC: Set data-auto-speed="200" to adjust the sub menu slide up/down speed -->\n  <ul data-ng-click="mainTab.active=true" class="page-sidebar-menu" data-keep-expanded="false" data-auto-scroll="true" data-slide-speed="200" data-ng-class="{\'page-sidebar-menu-closed\': settings.layout.pageSidebarClosed}" data-ng-init="getSidebarIntegrations()">\n    <!-- DOC: To remove the search box from the sidebar you just need to completely remove the below "sidebar-search-wrapper" LI element -->\n    <li class="sidebar-search-wrapper">\n      <!-- BEGIN RESPONSIVE QUICK SEARCH FORM -->\n      <!-- DOC: Apply "sidebar-search-bordered" class the below search form to have bordered search box -->\n      <!-- DOC: Apply "sidebar-search-bordered sidebar-search-solid" class the below search form to have bordered & solid search box -->\n      <form class="sidebar-search sidebar-search-bordered" action="extra_search.html" method="POST">\n        <a href="javascript:;" class="remove">\n          <i class="icon-close"></i>\n        </a>\n      </form>\n      <!-- END RESPONSIVE QUICK SEARCH FORM -->\n    </li>\n\n    <!-- START DASHBOARD CASE -->\n    <li class="start" data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[1])" data-ng-class="{active: $state.includes(\'main.dashboard\')}">\n      <a href="/dashboard/voice">\n        <i class="icon-rocket"></i>\n        <span class="title">{{\'APPLICATION_DASHBOARD\' | translate}}</span>\n        <span data-ng-if="$state.includes(\'main.dashboard\')" class="selected"></span>\n      </a>\n    </li>\n    <!-- END DASHBOARD CASE -->\n\n    <!-- START YOURDASHBOARD LIST CASE -->\n    <li data-ng-if="::(!Auth.isUser() || userModules[2])" data-ng-class="{active: $state.is(\'main.tools.yourdashboards.show\')}">\n      <a href="javascript:;">\n        <i class="fa fa-tachometer"></i>\n        <span class="title" >{{\'APPLICATION_YOUR_DASHBOARDS\' | translate}}</span>\n        <span class="arrow" data-ng-class="{ open: $state.includes(\'main.tools.yourdashboards.show\') }"></span>\n      </a>\n      <ul class="sub-menu" data-ng-init="getSidebarDashboards()">\n        <li data-ng-class="{active: $stateParams.id == dashboard.id && $state.includes(\'main.tools.yourdashboards.show\')}" data-ng-repeat="dashboard in dashboards" data-ng-if="dashboard[Auth.getRole()]">\n          <a href="/tools/yourdashboards/show/{{dashboard.id}}" >\n            <i class="icon-screen-desktop"></i>\n            <span class="title" >{{dashboard.name}}  </span>\n          </a>\n        </li>\n      </ul>\n    </li>\n    <!-- END YOURDASHBOARD LIST CASE -->\n\n    <!-- START STAFF LIST CASE -->\n    <li data-ng-class="{active: $state.includes(\'main.staff\')}">\n      <a href="javascript:;" data-ng-if="::(Auth.isAdmin() || userModules[3])">\n        <i class="icon-puzzle"></i>\n        <span class="title" >{{\'APPLICATION_STAFF\' | translate}}</span>\n        <span class="arrow" data-ng-class="{open: $state.includes(\'main.staff\')}"></span>\n      </a>\n      <ul class="sub-menu">\n        <!-- START USERS CASE -->\n        <li data-ng-if="::(Auth.isAdmin())" data-ng-class="{active: $state.includes(\'main.staff.users\')}">\n          <a href="/staff/users/list">\n            <i class="icon-eye"></i>\n            <span class="title" >{{\'APPLICATION_USERS\' | translate}}</span>\n            <span data-ng-if="$state.includes(\'main.staff.users\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END USERS CASE -->\n\n        <!-- START AGENTS CASE -->\n        <li data-ng-if="::(Auth.isAdmin() || userModules[4])" data-ng-class="{active: $state.includes(\'main.staff.agents\')}">\n          <a href="/staff/agents/list">\n            <i class="icon-people"></i>\n            <span class="title" >{{\'APPLICATION_AGENTS\' | translate}}</span>\n            <span data-ng-if="$state.includes(\'main.staff.agents\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END AGENTS CASE -->\n\n        <!-- START TELEPHONES CASE -->\n        <li data-ng-if="::(Auth.isAdmin())" data-ng-class="{active: $state.includes(\'main.staff.telephones\')}">\n          <a href="/staff/telephones/list">\n            <i class="icon-phone"></i>\n            <span class="title" >{{\'APPLICATION_TELEPHONES\' | translate}}</span>\n            <span data-ng-if="$state.includes(\'main.staff.telephones\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END TELEPHONES CASE -->\n\n        <!-- START TEAMS CASE -->\n        <li data-ng-if="::(Auth.isAdmin())" data-ng-class="{active: $state.includes(\'main.staff.teams\')}">\n          <a href="/staff/teams/list">\n            <i class="icon-shield"></i>\n            <span class="title" >{{\'APPLICATION_TEAMS\' | translate}}</span>\n            <span data-ng-if="$state.includes(\'main.staff.teams\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END TEAMS CASE -->\n      </ul>\n    </li>\n    <!-- END STAFF LIST CASE -->\n\n    <!-- START CONTACT MANAGER LIST CASE -->\n    <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[5])" data-ng-class="{active: $state.includes(\'main.contactmanager\')}">\n      <a href="javascript:;" data-ng-class="{\'disabled-link\':!license.cm}">\n        <i class="icon-notebook"></i>\n        <span class="title disable-target" >{{\'APPLICATION_CONTACT_MANAGER\' | translate}}</span>\n        <span class="arrow" data-ng-class="{ open: $state.includes(\'main.contactmanager.contacts\')\n        || $state.includes(\'main.contactmanager.companies\')\n        || $state.includes(\'main.contactmanager.listss\') }"></span>\n      </a>\n      <ul class="sub-menu" data-ng-if="license.cm">\n        <!-- START CONTACTS CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.contactmanager.contacts\')}">\n          <a href="/contactmanager/contacts/list">\n            <i class=" fa fa-users"></i>\n            <span class="title" >{{\'APPLICATION_CONTACTS\' | translate}}</span>\n            <span data-ng-if="$state.includes(\'main.contactmanager.contacts\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END CONTACTS CASE -->\n        <!-- START COMPANIES CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.contactmanager.companies\')}" data-ng-if="::(Auth.isAdmin() || Auth.isUser())">\n          <a href="/contactmanager/companies/list">\n            <i class="icon-briefcase"></i>\n            <span class="title" >{{\'APPLICATION_COMPANIES\' | translate}}</span>\n            <span data-ng-if="$state.includes(\'main.contactmanager.companies\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END COMPANIES CASE -->\n        <!-- START LISTS CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.contactmanager.lists\')}" data-ng-if="::(Auth.isAdmin() || Auth.isUser())">\n          <a href="/contactmanager/lists/list">\n            <i class="fa fa-list-ul"></i>\n            <span class="title" >{{\'APPLICATION_LISTS\' | translate}}</span>\n            <span data-ng-if="$state.includes(\'main.contactmanager.lists\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END LISTS CASE -->\n      </ul>\n    </li>\n    <!-- END CONTACT MANAGER LIST CASE -->\n\n    <!-- START CHANNEL LIST CASE -->\n    <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[6])" data-ng-class="{active: $state.includes(\'main.channels\')}">\n      <a href="javascript:;">\n        <i class="fa fa-spinner"></i>\n        <span class="title" >{{\'APPLICATION_CHANNELS\' | translate}}</span>\n        <span class="arrow" data-ng-class="{open: $state.includes(\'main.channels\')}"></span>\n      </a>\n      <ul class="sub-menu">\n        <!-- START VOICE CASE -->\n        <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[7])" data-ng-class="{ active: $state.includes(\'main.channels.voice\') }">\n          <a href="javascript:;">\n            <i class="icon-earphones-alt"></i>\n            <span class="title">{{ \'APPLICATION_VOICE\' | translate}}</span>\n            <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.voice\') }"></span>\n          </a>\n\n          <ul class="sub-menu">\n            <li data-ng-if="::(Auth.isAdmin())" data-ng-class="{active: $state.includes(\'main.channels.voice.queues\')}">\n              <a href="/channels/voice/queues/list">\n                <i class="icon-docs"></i>\n                <span class="title">{{\'APPLICATION_QUEUES\' | translate}}</span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || userModules[21])">\n              <a href="javascript:;">\n                <i class="icon-directions"></i>\n                <span class="title"> {{ \'APPLICATION_ROUTES\' | translate}} </span>\n                <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.voice.routes\') }"></span>\n                <ul class="sub-menu">\n                  <li data-ng-class="{active: $state.includes(\'main.channels.voice.routes.inbound\')}">\n                    <a href="/channels/voice/routes/inbound/list">\n                      <i class="icon-call-in"></i>\n                      <span class="title"> {{\'APPLICATION_INBOUND\' | translate}} </span>\n                    </a>\n                  </li>\n                  <li data-ng-class="{active: $state.includes(\'main.channels.voice.routes.outbound\')}">\n                    <a href="/channels/voice/routes/outbound/list">\n                      <i class="icon-call-out"></i>\n                      <span class="title"> {{\'APPLICATION_OUTBOUND\' | translate}} </span>\n                    </a>\n                  </li>\n                  <li data-ng-class="{active: $state.includes(\'main.channels.voice.routes.internal\')}">\n                    <a href="/channels/voice/routes/internal/list">\n                      <i class="icon-reload"></i>\n                      <span class="title"> {{\'APPLICATION_INTERNALS\' | translate}} </span>\n                    </a>\n                  </li>\n                </ul>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || userModules[22])" data-ng-class="{active: $state.includes(\'main.channels.voice.contexts\')}">\n              <a href="/channels/voice/contexts/list">\n                <i class="icon-docs"></i>\n                <span class="title"> {{\'APPLICATION_CONTEXTS\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || userModules[23])" data-ng-class="{active: $state.includes(\'main.channels.voice.voicemails\')}">\n              <a href="/channels/voice/voicemails/list">\n                <i class="icon-envelope-letter"></i>\n                <span class="title"> {{\'APPLICATION_VOICEMAILS\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || userModules[24])" data-ng-class="{active: $state.includes(\'main.channels.voice.mohs\')}">\n              <a href="/channels/voice/mohs/list">\n                <i class="icon-music-tone"></i>\n                <span class="title"> {{\'APPLICATION_MOH\' | translate}} </span>\n              </a>\n            </li>\n            <!-- START RECORDING CASE -->\n            <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[25])" data-ng-class="{active: $state.includes(\'main.channels.voice.recordings\')}">\n              <a href="/channels/voice/recordings/list">\n                <i class="icon-control-play"></i>\n                <span class="title">{{\'APPLICATION_RECORDINGS\' | translate}}</span>\n              </a>\n            </li>\n            <!-- END RECORDING CASE -->\n            <!-- START REALTIME CASE -->\n            <li data-ng-if="::(Auth.isAdmin() || userModules[26])" data-ng-class="{active: $state.includes(\'main.channels.voice.realtime\')}">\n              <a href="/channels/voice/realtime/view/agents">\n                <i class="icon-energy"></i>\n                <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n              </a>\n            </li>\n            <!-- END REALTIME CASE -->\n            <!-- START CHANSPY CASE -->\n            <li data-ng-if="::(Auth.isAdmin() || userModules[27])" data-ng-class="{active: $state.includes(\'main.channels.voice.chanspy\')}">\n              <a href="/channels/voice/chanspy/list">\n                <i class="fa fa-user-secret"></i>\n                <span class="title" >{{\'APPLICATION_CHANSPY\' | translate}}</span>\n                <!-- <span data-ng-if="$state.includes(\'main.chanspy\')" class="selected"></span> -->\n              </a>\n            </li>\n            <!-- END CHANSPY CASE -->\n            <!-- START CHANSPY CASE -->\n            <li data-ng-if="::(Auth.isAdmin() || userModules[28])" data-ng-class="{active: $state.includes(\'main.channels.voice.dispositions\')}">\n              <a href="/channels/voice/dispositions/list">\n                <i class="icon-target"></i>\n                <span class="title" >{{\'APPLICATION_DISPOSITIONS\' | translate}}</span>\n              </a>\n            </li>\n            <!-- END CHANSPY CASE -->\n          </ul>\n        </li>\n        <!-- END VOICE CASE -->\n\n        <!-- START CHAT CASE -->\n        <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[8])" data-ng-class="{active: $state.includes(\'main.channels.chat\')}">\n          <a href="javascript:;" data-ng-class="{\'disabled-link\':!license.chat}">\n            <i class="icon-bubble"></i>\n            <span class="title disable-target">{{\'APPLICATION_CHAT\' | translate}}</span>\n            <span class="arrow" data-ng-class="{open: $state.includes(\'main.channels.chat\')}"></span>\n          </a>\n          <ul class="sub-menu" data-ng-if="license.chat">\n            <li data-ng-if="::(Auth.isAdmin() || userModules[29])" data-ng-class="{active: $state.includes(\'main.channels.chat.websites\')}">\n              <a href="/channels/chat/websites/list">\n                <i class="icon-globe"></i>\n                <span class="title"> {{\'APPLICATION_WEB_SITES\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || userModules[30])" data-ng-class="{active: $state.includes(\'main.channels.chat.queues\')}">\n              <a href="/channels/chat/queues/list">\n                <i class="icon-docs"></i>\n                <span class="title"> {{\'APPLICATION_QUEUES\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[31])" data-ng-class="{active: $state.includes(\'main.channels.chat.room\')}">\n              <a href="/channels/chat/room/internal/list">\n                <i class="fa fa-users"></i>\n                <span class="title"> {{\'APPLICATION_INTERACTIONS\' | translate}} </span>\n              </a>\n            </li>\n            <!-- <li data-ng-if="::(Auth.isAdmin() || userModules[8])" data-ng-class="{active: $state.includes(\'main.channels.chat.online\')}">\n              <a href="/channels/chat/online/list">\n                <i class="icon-login"></i>\n                <span class="title"> {{\'APPLICATION_ONLINE_MESSAGES\' | translate}} </span>\n              </a>\n            </li> -->\n            <li data-ng-if="::(Auth.isAdmin() || userModules[32])" data-ng-class="{active: $state.includes(\'main.channels.chat.offline\')}">\n              <a href="/channels/chat/offline/list">\n                <i class="icon-logout"></i>\n                <span class="title"> {{\'APPLICATION_OFFLINE_MESSAGES\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || userModules[33])" data-ng-class="{active: $state.includes(\'main.channels.chat.realtime\')}">\n              <a href="/channels/chat/realtime/view/agents">\n                <i class="icon-energy"></i>\n                <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n              </a>\n            </li>\n          </ul>\n        </li>\n        <!-- END CHAT CASE -->\n\n        <!-- START MAIL CASE -->\n        <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[9])" data-ng-class="{active: $state.includes(\'main.channels.mail\')}" >\n          <a href="javascript:;" data-ng-class="{\'disabled-link\':!license.mail}">\n            <i class="icon-envelope"></i>\n            <span class="title disable-target">{{\'APPLICATION_MAIL\' | translate}}</span>\n            <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.mail\') }"></span>\n          </a>\n\n          <ul class="sub-menu" data-ng-if="license.mail">\n            <li data-ng-if="::(Auth.isAdmin() || userModules[34])" data-ng-class="{active: $state.includes(\'main.channels.mail.accounts\') || $state.includes(\'main.channels.mail.account\')}">\n              <a href="/channels/mail/accounts/list">\n                <i class="icon-notebook"></i>\n                <span class="title"> {{\'APPLICATION_ACCOUNTS\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || userModules[35])" data-ng-class="{active: $state.includes(\'main.channels.mail.queues\') || $state.includes(\'main.channels.mail.queue\')}">\n              <a href="/channels/mail/queues/list">\n                <i class="icon-docs"></i>\n                <span class="title"> {{\'APPLICATION_QUEUES\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[36])" data-ng-class="{active: $state.includes(\'main.channels.mail.inbox\')}">\n              <a href="/channels/mail/inbox/view">\n                <i class="icon-note"></i>\n                <span class="title"> {{\'APPLICATION_INBOX\' | translate}} </span>\n              </a>\n            </li>\n            <!-- START REALTIME CASE -->\n            <li data-ng-if="::(Auth.isAdmin() || userModules[37])" data-ng-class="{active: $state.includes(\'main.channels.mail.realtime\')}">\n              <a href="/channels/mail/realtime/view/agents">\n                <i class="icon-energy"></i>\n                <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n              </a>\n            </li>\n            <!-- END REALTIME CASE -->\n          </ul>\n        </li>\n        <!-- END MAIL CASE -->\n\n        <!-- START FAX CASE -->\n        <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[10])" data-ng-class="{active: $state.includes(\'main.channels.fax\')}">\n          <a href="javascript:;" data-ng-class="{\'disabled-link\':!license.fax}">\n            <i class="fa fa-fax"></i>\n            <span class="title disable-target"> {{ \'APPLICATION_FAX\' | translate}}</span>\n            <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.fax\') }"></span>\n          </a>\n          <ul class="sub-menu" data-ng-if="license.fax">\n            <li data-ng-if="::(Auth.isAdmin() || userModules[38])" data-ng-class="{active: $state.includes(\'main.channels.fax.accounts\')}">\n              <a href="/channels/fax/accounts/list">\n                <i class="icon-notebook"></i>\n                <span class="title"> {{ \'APPLICATION_ACCOUNTS\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || userModules[39])" data-ng-class="{active: $state.includes(\'main.channels.fax.queues\')}">\n              <a href="/channels/fax/queues/list">\n                <i class="icon-docs"></i>\n                <span class="title"> {{ \'APPLICATION_QUEUES\' | translate }} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[40])" data-ng-class="{active: $state.includes(\'main.channels.fax.inbox\')}">\n              <a href="/channels/fax/inbox/view">\n                <i class="icon-note"></i>\n                <span class="title"> {{ \'APPLICATION_INBOX\' | translate }} </span>\n              </a>\n            </li>\n            <!-- START REALTIME CASE -->\n            <li data-ng-if="::(Auth.isAdmin() || userModules[41])" data-ng-class="{active: $state.includes(\'main.channels.fax.realtime\')}">\n              <a href="/channels/fax/realtime/view/agents">\n                <i class="icon-energy"></i>\n                <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n              </a>\n            </li>\n            <!-- END REALTIME CASE -->\n          </ul>\n        </li>\n        <!-- END FAX CASE -->\n\n        <!-- START SMS CASE -->\n        <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[11])" data-ng-class="{active: $state.includes(\'main.channels.sms\')}">\n          <a href="javascript:;" data-ng-class="{\'disabled-link\':!license.messaging}">\n            <i class="glyphicon glyphicon-comment"></i>\n            <span class="title disable-target">{{\'APPLICATION_SMS\' | translate}}</span>\n            <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.sms\') }"></span>\n          </a>\n\n          <ul class="sub-menu" data-ng-if="license.messaging">\n            <li data-ng-if="::(Auth.isAdmin() || userModules[42])" data-ng-class="{active: $state.includes(\'main.channels.sms.accounts\') || $state.includes(\'main.channels.sms.account\')}">\n              <a href="/channels/sms/accounts/list">\n                <i class="icon-notebook"></i>\n                <span class="title"> {{\'APPLICATION_ACCOUNTS\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || userModules[43])" data-ng-class="{active: $state.includes(\'main.channels.sms.queues\') || $state.includes(\'main.channels.sms.queue\')}">\n              <a href="/channels/sms/queues/list">\n                <i class="icon-docs"></i>\n                <span class="title"> {{\'APPLICATION_QUEUES\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[44])" data-ng-class="{active: $state.includes(\'main.channels.sms.inbox\')}">\n              <a href="/channels/sms/inbox/view">\n                <i class="icon-note"></i>\n                <span class="title"> {{\'APPLICATION_INBOX\' | translate}} </span>\n              </a>\n            </li>\n            <!-- START REALTIME CASE -->\n            <li data-ng-if="::(Auth.isAdmin() ||  userModules[45])"  data-ng-class="{active: $state.includes(\'main.channels.sms.realtime\')}">\n              <a href="/channels/sms/realtime/view/agents">\n                <i class="icon-energy"></i>\n                <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n              </a>\n            </li>\n            <!-- END REALTIME CASE -->\n          </ul>\n        </li>\n\n        <!-- END SMS CASE -->\n\n        <!-- START OPENCHANNEL CASE -->\n        <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent()|| userModules[20])" data-ng-class="{active: $state.includes(\'main.channels.openchannel\')}">\n          <a href="javascript:;" data-ng-class="{\'disabled-link\':!license.openchannel}" >\n            <i class="icon-globe"></i>\n            <span class="title disable-target">{{\'APPLICATION_OPEN_CHANNEL\' | translate}}</span>\n            <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.openchannel\') }"></span>\n          </a>\n          <ul class="sub-menu" data-ng-if="license.openchannel" >\n            <li data-ng-if="::(Auth.isAdmin()|| userModules[46])" data-ng-class="{active: $state.includes(\'main.channels.openchannel.accounts\') || $state.includes(\'main.channels.openchannel.account\')}">\n              <a href="/channels/openchannel/accounts/list">\n                <i class="icon-notebook"></i>\n                <span class="title"> {{\'APPLICATION_ACCOUNTS\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin()|| userModules[47])" data-ng-class="{active: $state.includes(\'main.channels.openchannel.queues\') || $state.includes(\'main.channels.openchannel.queue\')}">\n              <a href="/channels/openchannel/queues/list">\n                <i class="icon-docs"></i>\n                <span class="title"> {{\'APPLICATION_QUEUES\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent()|| userModules[48])" data-ng-class="{active: $state.includes(\'main.channels.openchannel.inbox\')}">\n              <a href="/channels/openchannel/inbox/view">\n                <i class="icon-note"></i>\n                <span class="title"> {{\'APPLICATION_INBOX\' | translate}} </span>\n              </a>\n            </li>\n            <!-- START REALTIME CASE -->\n            <li data-ng-if="::(Auth.isAdmin() ||  userModules[49])"  data-ng-class="{active: $state.includes(\'main.channels.openchannel.realtime\')}">\n              <a href="/channels/openchannel/realtime/view/agents">\n                <i class="icon-energy"></i>\n                <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n              </a>\n            </li>\n            <!-- END REALTIME CASE -->\n          </ul>\n        </li>\n\n        <!-- END OPENCHANNEL CASE -->\n        <!-- START REALTIME CASE -->\n        <li data-ng-if="::(Auth.isAdmin() || userModules[12])" data-ng-class="{active: $state.includes(\'main.channels.realtime\')}">\n          <a href="/channels/realtime/view/agents">\n            <i class="icon-energy"></i>\n            <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n          </a>\n        </li>\n        <!-- END REALTIME CASE -->\n      </ul>\n    </li>\n    <!-- END CHANNEL LIST CASE -->\n\n    <!-- START TOOLS LIST CASE -->\n    <li data-ng-if="::(Auth.isAdmin() || userModules[13])" data-ng-class="{active: $state.includes(\'main.tools\') && !$state.is(\'main.tools.yourdashboards.show\')}">\n      <a href="javascript:;">\n        <i class="icon-wrench"></i>\n        <span class="title" >{{\'APPLICATION_TOOLS\' | translate}}</span>\n        <span class="arrow" data-ng-class="{ open: $state.includes(\'main.tools\') && !$state.is(\'main.tools.yourdashboards.show\')}"></span>\n      </a>\n      <ul class="sub-menu">\n        <li data-ng-class="{active: $state.includes(\'main.tools.triggers\')}" data-ng-if="::(Auth.isAdmin() || userModules[50])">\n          <a href="/tools/triggers/list">\n            <i class="icon-bulb"></i>\n            <span class="title"> {{\'APPLICATION_TRIGGERS\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.tools.automations\')}" data-ng-if="::(Auth.isAdmin() || userModules[51])">\n          <a href="/tools/automations/list">\n            <i class="icon-settings"></i>\n            <span class="title"> {{\'APPLICATION_AUTOMATIONS\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.tools.trunks\')}" data-ng-if="::(Auth.isAdmin() || userModules[52])">\n          <a href="/tools/trunks/list">\n            <i class="icon-link"></i>\n            <span class="title"> {{\'APPLICATION_TRUNKS\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.tools.intervals\')}" data-ng-if="::(Auth.isAdmin() || userModules[53])">\n          <a href="/tools/intervals/list">\n            <i class="icon-clock"></i>\n            <span class="title"> {{\'APPLICATION_INTERVALS\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.tools.variables\')}" data-ng-if="::(Auth.isAdmin() || userModules[54])">\n          <a href="/tools/variables/list">\n            <i class="fa fa-eye"></i>\n            <span class="title" >{{\'APPLICATION_VARIABLES\' | translate}}  </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.tools.tags\')}" data-ng-if="::(Auth.isAdmin() || userModules[55])">\n          <a href="/tools/tags/list">\n            <i class="icon-tag"></i>\n            <span class="title" >{{\'APPLICATION_TAGS\' | translate}}  </span>\n          </a>\n        </li>\n        <!-- START TEMPLATE CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.tools.templates\')}" data-ng-if="::(Auth.isAdmin() || userModules[56])">\n          <a href="/tools/templates/list">\n            <i class="icon-docs"></i>\n            <span class="title"> {{\'APPLICATION_TEMPLATES\' | translate}} </span>\n          </a>\n        </li>\n        <!-- END TEMPLATE CASE -->\n\n        <!-- START PAUSE CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.tools.pauses\')}" data-ng-if="::(Auth.isAdmin() || userModules[57])">\n          <a href="/tools/pauses/list">\n            <i class="icon-control-pause"></i>\n            <span class="title"> {{\'APPLICATION_PAUSES\' | translate}} </span>\n          </a>\n        </li>\n        <!-- END PAUSE CASE -->\n\n        <!-- START ANSWER CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.tools.answers\')}" data-ng-if="::(Auth.isAdmin() || userModules[58])">\n          <a href="/tools/answers/list">\n            <i class="icon-magic-wand"></i>\n            <span class="title"> {{\'APPLICATION_CANNED_ANSWERS\' | translate}} </span>\n          </a>\n        </li>\n        <!-- END ANSWER CASE -->\n\n        <!-- START DASHBOARD MANAGER CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.tools.yourdashboards\') && !$state.is(\'main.tools.yourdashboards.show\')}" data-ng-if="::(Auth.isAdmin() || userModules[59])">\n          <a href="/tools/yourdashboards/list">\n            <i class="fa fa-tachometer"></i>\n            <span class="title"> {{\'APPLICATION_DASHBOARDS_MANAGER\' | translate}} </span>\n          </a>\n        </li>\n        <!-- END DASHBOARD MANAGER CASE -->\n\n        <!-- START SOUND CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.tools.sounds\')}" data-ng-if="::(Auth.isAdmin() || userModules[60])">\n          <a href="/tools/sounds/list">\n            <i class="icon-music-tone-alt"></i>\n            <span class="title" >{{\'APPLICATION_SOUNDS\' | translate}}</span>\n            <!-- <span data-ng-if="$state.includes(\'main.sounds\')" class="selected"></span> -->\n          </a>\n        </li>\n        <!-- END SOUND CASE -->\n\n        <!-- START SCHEDULE CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.tools.scheduler\')}" data-ng-if="::(Auth.isAdmin() || userModules[61])">\n          <a href="/tools/scheduler/list">\n            <i class="icon-calendar"></i>\n            <span class="title" >{{\'APPLICATION_SCHEDULER\' | translate}}</span>\n            <!-- <span data-ng-if="$state.includes(\'main.sounds\')" class="selected"></span> -->\n          </a>\n        </li>\n        <!-- END SCHEDULE CASE -->\n      </ul>\n    </li>\n    <!-- END TOOLS LIST CASE -->\n\n    <!-- START CALLYSQUARE CASE -->\n    <li data-ng-if="::(Auth.isAdmin() || userModules[14])" data-ng-class="{active: $state.includes(\'main.square\')}">\n      <a href="javascript:;">\n        <i class="fa fa-superscript"></i>\n        <span class="title" >Cally &#178;</span>\n        <span class="arrow"></span>\n      </a>\n      <ul class="sub-menu">\n        <li data-ng-class="{active: $state.includes(\'main.square.projects\')}">\n          <a href="/square/projects/list">\n            <i class="fa fa-slack"></i>\n            <span class="title" >{{\'APPLICATION_PROJECTS\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.square.odbc\')}">\n          <a href="/square/odbc/list">\n            <i class="fa fa-database"></i>\n            <span class="title" >{{\'APPLICATION_ODBC\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.square.recordings\')}">\n          <a href="/square/recordings/list">\n            <i class="icon-microphone"></i>\n            <span class="title" >{{\'APPLICATION_RECORDINGS\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.square.realtime.view.general\')}">\n          <a href="/square/realtime/view/general">\n            <i class="icon-energy"></i>\n            <span class="title" >{{\'APPLICATION_REALTIME\' | translate}} </span>\n          </a>\n        </li>\n      </ul>\n    </li>\n    <!-- END CALLYSQUARE CASE -->\n    <!-- START JSCRIPTY LIST -->\n    <li data-ng-show="::(Auth.isAdmin() || Auth.isAgent() || userModules[15])" data-ng-class="{active: $state.includes(\'main.jscripty\')}">\n      <a href="javascript:;" data-ng-class="{\'disabled-link\':!license.jscripty}" >\n        <i class="icon-note"></i>\n        <span class="title disable-target" >{{\'APPLICATION_JSCRIPTY\' | translate}} </span>\n        <span class="arrow"></span>\n      </a>\n      <ul class="sub-menu" data-ng-if="license.jscripty">\n        <!--  -->\n        <!-- START PROJECTS CASE -->\n        <li data-ng-show="Auth.isAdmin() || Auth.isAgent() || userModules[15]"  data-ng-class="{active: $state.includes(\'main.jscripty.projects\')}">\n          <a href="/jscripty/projects/list">\n            <i class="fa fa-slack"></i>\n            <span class="title" >{{\'APPLICATION_PROJECTS\' | translate}} </span>\n          </a>\n        </li>\n        <!-- END PROJECTS CASE -->\n      </ul>\n    </li>\n    <!-- END JSCRIPTY LIST -->\n\n    <!-- START MOTION DIALER LIST CASE-->\n    <li data-ng-if="::(Auth.isAdmin() || userModules[16])" data-ng-class="{active: $state.includes(\'main.motiondialer\')}">\n      <a href="javascript:;" data-ng-class="{\'disabled-link\':!license.dialer}">\n        <i class="icon-control-forward"></i>\n        <span class="title disable-target" >{{\'APPLICATION_MOTION_DIALER\' | translate}} </span>\n        <span class="arrow"></span>\n      </a>\n      <ul class="sub-menu" data-ng-if="license.dialer">\n        <li data-ng-class="{active: $state.includes(\'main.motiondialer.lists\')}">\n          <a href="/motiondialer/lists/list">\n            <i class="icon-docs"></i>\n            <span class="title" >{{\'APPLICATION_LISTS\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.motiondialer.blacklist\')}">\n          <a href="/motiondialer/blacklist/list">\n            <i class="icon-doc"></i>\n            <span class="title" >{{\'APPLICATION_BLACKLIST\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.motiondialer.processes\')}">\n          <a href="/motiondialer/processes/list">\n            <i class="icon-settings"></i>\n            <span class="title" >{{\'APPLICATION_PROCESSES\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.motiondialer.info\')}">\n          <a href="/motiondialer/info/view/about">\n            <i class="icon-info"></i>\n            <span class="title" >{{\'APPLICATION_INFO\' | translate}} </span>\n          </a>\n        </li>\n      </ul>\n    </li>\n    <!-- END MOTION DIALER LIST CASE-->\n\n    <!-- START ANALYTIC LIST CASE -->\n    <li data-ng-if="::(Auth.isAdmin() || userModules[17])" data-ng-class="{active: $state.includes(\'main.analytics.reports\')\n    || $state.includes(\'main.analytics.extracted\')\n    || $state.includes(\'main.analytics.metrics\')}" data-ng-if="::(Auth.isAdmin())">\n    <a href="javascript:;">\n      <i class="icon-calculator"></i>\n      <span class="title" >{{\'APPLICATION_ANALYTICS\' | translate}}</span>\n      <span class="arrow" data-ng-class="{ open: $state.includes(\'main.analytics.reports\')\n      || $state.includes(\'main.analytics.extracted\')\n      || $state.includes(\'main.analytics.metrics\') }"></span>\n    </a>\n    <ul class="sub-menu">\n      <!-- START REPORT CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.analytics.reports\')}">\n        <a href="/analytics/reports/list">\n          <i class="icon-book-open"></i>\n          <span class="title" >{{\'APPLICATION_REPORTS\' | translate}}</span>\n          <span data-ng-if="$state.includes(\'main.analytics.reports\')" class="selected"></span>\n        </a>\n      </li>\n      <!-- END REPORT CASE -->\n      <!-- START EXTRA REPORT CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.analytics.extracted\')}">\n        <a href="/analytics/extracted/list">\n          <i class="fa fa-file-pdf-o"></i>\n          <span class="title" >{{\'APPLICATION_EXTRACTED_REPORTS\' | translate}}</span>\n          <span data-ng-if="$state.includes(\'main.analytics.extracted\')" class="selected"></span>\n        </a>\n      </li>\n      <!-- END EXTRA REPORT CASE -->\n      <!-- START METRICS CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.analytics.metrics\')}">\n        <a href="/analytics/metrics/list">\n          <i class="icon-calculator"></i>\n          <span class="title" >{{\'APPLICATION_METRICS\' | translate}}</span>\n          <span data-ng-if="$state.includes(\'main.metrics.reports\')" class="selected"></span>\n        </a>\n      </li>\n      <!-- END METRICS CASE -->\n    </ul>\n  </li>\n  <!-- END ANALYTIC LIST CASE -->\n\n  <!-- START SETTINGS LIST -->\n  <li data-ng-if="::(Auth.isAdmin() || userModules[18])" data-ng-class="{active: $state.includes(\'main.setting\')}">\n    <a href="javascript:;">\n      <i class="icon-settings"></i>\n      <span class="title" >{{\'APPLICATION_SETTINGS\' | translate}}</span>\n      <span class="arrow"></span>\n    </a>\n    <ul class="sub-menu">\n      <!-- START GENERAL CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.setting.general\')}">\n        <a href="/setting/general/view/main">\n          <i class="icon-settings"></i>\n          <span class="title"> {{\'APPLICATION_GENERAL\' | translate}} </span>\n        </a>\n      </li>\n      <!-- END GENERAL CASE -->\n\n      <!-- START UPDATES CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.setting.updates\')}">\n        <a href="{{license.update ? \'/setting/updates/list\' : \'javascript:;\'}}" data-ng-class="{\'disabled-link\':!license.update}">\n          <i class="icon-cloud-download"></i>\n          <span class="title disable-target" >{{\'APPLICATION_UPDATES\' | translate}}</span>\n          <!-- <span data-ng-if="$state.includes(\'main.updates\')" class="selected"></span> -->\n        </a>\n      </li>\n      <!-- END UPDATES CASE -->\n\n      <!-- START SMTP CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.setting.smtp\')}">\n        <a href="/setting/smtp/view">\n          <i class="icon-envelope"></i>\n          <span class="title">SMTP</span>\n          <!-- <span data-ng-if="$state.includes(\'main.smtp\')" class="selected"></span> -->\n        </a>\n      </li>\n      <!-- END SMTP CASE -->\n\n      <!-- START LICENSE CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.setting.license\')}">\n        <a href="/setting/license/view">\n          <i class="icon-info"></i>\n          <span class="title"> {{\'APPLICATION_LICENSE\' | translate}} </span>\n        </a>\n      </li>\n      <!-- END LICENSE CASE -->\n\n      <!-- START NETWORK CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.setting.network\')}">\n        <a href="/setting/network/view/localnet">\n          <i class="icon-globe"></i>\n          <span class="title"> {{\'APPLICATION_NETWORK\' | translate}} </span>\n        </a>\n      </li>\n      <!-- END NETWORK CASE -->\n\n      <!-- START SYSTEM CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.setting.system\')}">\n        <a href="/setting/system/view/general">\n          <i class="icon-pie-chart"></i>\n          <span class="title"> {{\'APPLICATION_SYSTEM\' | translate}} </span>\n        </a>\n      </li>\n      <!-- END SYSTEM CASE -->\n\n      <!-- START CUSTOMIZATION CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.setting.customization\')}">\n        <a href="/setting/customization/view/general">\n          <i class="icon-equalizer"></i>\n          <span class="title"> {{\'APPLICATION_CUSTOMIZATION\' | translate}} </span>\n        </a>\n      </li>\n      <!-- END CUSTOMIZATION CASE -->\n    </ul>\n  </li>\n  <!-- END SETTINGS LIST -->\n\n  <!-- START INTEGRATION CASE -->\n  <li data-ng-if=" (Auth.isAdmin() || Auth.isAgent() || userModules[19]) && integration.active" data-ng-repeat="integration in integrations" data-ng-class="{active: $state.includes(\'main.{{integration.state}}\')}">\n    <a href="/{{integration.state}}/list" ng-switch on="integration.state" data-ng-if="integration.state !== \'iframe\' && (Auth.isAdmin() || userModules[19])">\n      <i ng-switch-when="zendesk" class="icon-heart"></i>\n      <i ng-switch-when="salesforce" class="fa fa-cloud"></i>\n      <i ng-switch-default class="icon-handbag"></i>\n      <span class="title" >{{integration.name}}</span>\n      <span data-ng-if="$state.includes(\'main.{{integration.state}}\')" class="selected"></span>\n    </a>\n    <a href="/{{integration.state}}/view" data-ng-if="integration.state === \'iframe\'">\n      <i class="fa fa-chrome"></i>\n      <span class="title" data-ng-if="Auth.isAdmin() || userModules[19]">{{integration.name}}</span>\n      <span class="title" data-ng-if="Auth.isAgent()">{{integration.title || integration.name}}</span>\n      <span data-ng-if="$state.includes(\'main.{{integration.state}}\')" class="selected"></span>\n    </a>\n  </li>\n\n  <li data-ng-if="::(Auth.isAdmin())" data-ng-class="{active: $state.is(\'main.market\')}">\n    <a href="/market">\n      <i class="icon-handbag"></i>\n      <span class="title" translate>Market Place</span>\n      <span data-ng-if="$state.includes(\'main.market\')" class="selected"></span>\n    </a>\n  </li>\n  <!-- END INTEGRATIONS CASE -->\n  <li>\n  <a href="javascript:;" data-ng-click="activeTour.main = true" data-ng-if="::(!Auth.isAgent())">\n    <i class="icon-location-pin"></i>\n    <span class="title">{{\'APPLICATION_TAKE_A_TOUR\' | translate}}</span>\n  </a>\n  </li>\n  <li>\n    <a href="javascript:;" data-ng-click="about()">\n      <i class="icon-info"></i>\n      <span class="title">{{\'APPLICATION_ABOUT\' | translate}}</span>\n    </a>\n  </li>\n\n</ul>\n<!-- END SIDEBAR MENU -->\n</div>\n');
-}]);
\ No newline at end of file
diff --git a/public/app/fc371ddc.app.js b/public/app/fc371ddc.app.js
new file mode 100644
index 0000000..82e363e
--- /dev/null
+++ b/public/app/fc371ddc.app.js
@@ -0,0 +1,91 @@
+"use strict";angular.module("xCallyShuttleApp",["adf","adf.structures.base","adf.widget.clock","adf.widget.iframe","adf.widget.counter","adf.widget.pie-chart","angular-md5","angular.filter","angularFileUpload","ngLetterAvatar","vAccordion","btford.socket-io","chart.js","checklist-model","colorpicker.module","frapontillo.bootstrap-switch","LocalStorageModule","mgo-angular-wizard","ng-slide-down","ngAnimate","ngBootstrap","ngCookies","ngCsv","ngFileSaver","ngJsTree","ngMap","ngPapaParse","ngResource","ngSanitize","notification","oc.lazyLoad","pascalprecht.translate","remoteValidation","smart-table","sprintf","timer","toastr","permission","ui-notification","ui.bootstrap.modal","ui.bootstrap.dropdown","ui.bootstrap.popover","ui.bootstrap.timepicker","ui.bootstrap.tooltip","ui.bootstrap.tpls","ui.bootstrap.accordion","ui.bootstrap.progressbar","ui.bootstrap.buttons","ui.bootstrap.typeahead","ui.grid","ui.grid.autoResize","ui.grid.draggable-rows","ui.grid.exporter","ui.grid.grouping","ui.grid.moveColumns","ui.grid.pagination","ui.grid.treeView","ui.grid.selection","ui.grid.exporter","ui.grid.resizeColumns","ui.router","ui.navbar","ui.select","ui.sortable","xeditable","ngAudio","truncate","ngScrollbars","ngEmoticons","angularSpinner","builder","builder.components","validator","angular-clipboard","ng-code-mirror","angularMoment","jsonFormatter","ui.bootstrap-slider","ui.bootstrap.datepicker","prettyBytes","bootstrapLightbox","rzModule","ckeditor","ngTagsInput","ngJoyRide","adf.widget.linklist"]).constant("CKEDITOR_BASEPATH","assets/plugins/ckeditor/").config(["$stateProvider","$urlRouterProvider","$locationProvider","$httpProvider","$translateProvider","localStorageServiceProvider","dashboardProvider","ScrollBarsProvider","tagsInputConfigProvider",function(a,b,c,d,e,f,g,h,i){i.setActiveInterpolation("tagsInput",{placeholder:!0}),b.otherwise(function(a){var b=a.get("$state");b.go("landing")}),e.useStaticFilesLoader({prefix:"assets/languages/locale-",suffix:".json"}),e.preferredLanguage("en_EN"),e.fallbackLanguage("en_EN"),e.useLocalStorage(),e.useSanitizeValueStrategy(null),c.html5Mode(!0),d.interceptors.push("authInterceptor"),g.structure("4-4-4",{rows:[{columns:[{styleClass:"col-md-4"},{styleClass:"col-md-4"},{styleClass:"col-md-4"}]}]}).structure("3-3-3-3",{rows:[{columns:[{styleClass:"col-md-3"},{styleClass:"col-md-3"},{styleClass:"col-md-3"},{styleClass:"col-md-3"}]}]}),f.setPrefix("motion"),h.defaults={scrollButtons:{scrollAmount:"auto",enable:!0},axis:"y"}}]).factory("authInterceptor",["$rootScope","$q","$cookieStore","$location",function(a,b,c,d){return{request:function(a){return a.headers=a.headers||{},c.get("token")?a.headers.Authorization="Bearer "+c.get("token"):d.path().match(/\/reset\/.[0-9]*/)||d.path("/login"),a}}}]).run(["$rootScope","$location","$state","$stateParams","$window","$q","Auth","RoleStore","editableThemes","editableOptions","License","User","PermissionStore","localStorageService",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){a.$state=c,a.$stateParams=d,i.bs3.inputClass="input-sm",i.bs3.buttonsClass="btn-xs",j.theme="bs3",a.$on("$stateChangeStart",function(a,c){g.isLoggedInAsync(function(a){!c.authenticate||a||b.path().match(/\/reset\/.[0-9]*/)||b.path("/login")})}),a.updateTableConfig=function(a,b){var c=_.find(a,{name:"All"});c&&(c.value=b)},a.settings={patternName:"[A-Za-z0-9._\\+*!\\-\\[\\]]+",patternPassword:"^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\\-_=+\\[\\{\\]\\}.])[0-9a-zA-Z~!@#$%^&\\-_=+\\[\\{\\]\\}.]{8,}$",patternPasswordLight:"^[a-zA-Z0-9~!@#$%^&\\-_=+\\[\\{\\]\\}.]{6,}$",patternGateway:"^(?:yes|no|[0-9]+)$",patternFaxdetect:"^(?:yes|no|t38|cng|[0-9]+)$",layout:{pageSidebarClosed:n.get("sidebarClosed")||!1,pageQuickSidebarOpened:!1,pageBodySolid:!1,pageAutoScrollOnLoad:1e3}},k.get().$promise.then(function(b){a.license=b.license,a.settings.soundPath=b.soundPath||"/var/opt/motion/server/files/sounds/converted",a.settings.logo=b.logo,a.settings.defaultLogo=b.defaultLogo,a.settings.loginLogo=b.loginLogo,a.settings.defaultLoginLogo=b.defaultLoginLogo,a.settings.footerWhiteLabel=b.footerWhiteLabel,a.settings.defaultFooterWhiteLabel=b.defaultFooterWhiteLabel,m.definePermission("hasCm",function(){return a.license.cm}),m.definePermission("hasChat",function(){return a.license.chat}),m.definePermission("hasMail",function(){return a.license.mail}),m.definePermission("hasFax",function(){return a.license.fax}),m.definePermission("hasSms",function(){return a.license.messaging}),m.definePermission("hasDialer",function(){return a.license.dialer}),m.definePermission("hasJscripty",function(){return a.license.jscripty}),m.definePermission("hasUpdate",function(){return a.license.update}),m.definePermission("hasCustom",function(){return a.license.custom}),m.definePermission("hasOpenChannel",function(){return a.license.openchannel})})["catch"](function(a){console.log(a)}),m.definePermission("agent",function(){return g.isAgent()}),m.definePermission("admin",function(){return g.isAdmin()}),m.definePermission("user",function(a,b){var c=f.defer(),d=g.getCurrentUser().$promise;return d?d.then(function(a){_.includes(_.map(a.Modules,"id"),b.toState.data.permissions.id)&&"user"===a.role?c.resolve():c.reject()})["catch"](function(){c.reject()}):c.resolve(),c.promise})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics",{url:"/analytics",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:17}}})}]),angular.module("xCallyShuttleApp").factory("Extracted",["$resource",function(a){return a("/api/analytics/extracted/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.extracted",{url:"/extracted",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("AnalyticExtractedListCtrl",["$scope","$translate","gridOptions","Extracted","uiGridConstants",function(a,b,c,d,e){a.moment=moment,a.Extracted=d,a.initView=function(){var b={exporterCsvFilename:"ExtractedReports.csv",columnDefs:[{name:"name"},{name:"startDate",displayName:"APPLICATION_START_DATE",filterHeaderTemplate:'<div class="ui-grid-filter-container row"><div ng-repeat="colFilter in col.filters" class="col-md-6 col-md-offset-0 col-sm-5 col-sm-offset-0 col-xs-5 col-xs-offset-0"><div custom-grid-date-filter-header></div></div></div>',filters:[{name:"From",condition:e.filter.GREATER_THAN_OR_EQUAL,hasTime:!0},{name:"To",condition:e.filter.LESS_THAN_OR_EQUAL,hasTime:!0}],sort:{direction:e.DESC,priority:0}},{name:"endDate",displayName:"APPLICATION_END_DATE",filterHeaderTemplate:'<div class="ui-grid-filter-container row"><div ng-repeat="colFilter in col.filters" class="col-md-6 col-md-offset-0 col-sm-5 col-sm-offset-0 col-xs-5 col-xs-offset-0"><div custom-grid-date-filter-header></div></div></div>',filters:[{name:"From",condition:e.filter.GREATER_THAN_OR_EQUAL,hasTime:!0},{name:"To",condition:e.filter.LESS_THAN_OR_EQUAL,hasTime:!0}]},{name:"createdAt",displayName:"APPLICATION_RUN_DATE",filterHeaderTemplate:'<div class="ui-grid-filter-container row"><div ng-repeat="colFilter in col.filters" class="col-md-6 col-md-offset-0 col-sm-5 col-sm-offset-0 col-xs-5 col-xs-offset-0"><div custom-grid-date-filter-header></div></div></div>',filters:[{name:"From",condition:e.filter.GREATER_THAN_OR_EQUAL,hasTime:!0},{name:"To",condition:e.filter.LESS_THAN_OR_EQUAL,hasTime:!0}]},{name:"output"},{name:"type"},{name:"status"},{name:"action",width:140,buttons:[{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"},{directive:"<motion-file-download data-ng-show=\"row.entity.status == 'completed'\" resource=\"grid.appScope.Extracted\" params=\"{id:row.entity.id,controller:'download'}\" mimetype=\"'application/'+row.entity.output.toLowerCase()\" filename=\"row.entity.name+'_'+row.entity.startDate.toString()+'_'+row.entity.endDate.toString()+'.'+row.entity.output.toLowerCase()\"></motion-file-download>"}]}]};a.gridOptions=c.gridOptions(d,b,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.extracted.list",{url:"/list",templateUrl:"app/analytic/extracted/list/list.html",controller:"AnalyticExtractedListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("DefaultMetric",["$resource",function(a){return a("/api/analytics/metrics/default/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("AnalyticMetricListCreateModalCtrl",["$scope","$uibModalInstance","Metric","xAlert","$translate","report",function(a,b,c,d,e,f){a.forms={dashboard:void 0},a.item={},a.tables=f.tables,a.ok=function(){return c.save(a.item).$promise.then(function(){b.close()})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("AnalyticMetricListCtrl",["$scope","xAlert","Modal","$uibModal","$log","gridOptions","Metric","DefaultMetric","$translate",function(a,b,c,d,e,f,g,h,i){a.$translate=i,a.initView=function(){var b={exporterCsvFilename:"Metrics.csv",columnDefs:[{name:"name"},{name:"table",cellTemplate:"<div style=\"padding:5px\">{{'APPLICATION_'+row.entity.table.toUpperCase() | translate}}</div>"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/analytics/metrics/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=f.gridOptions(g,b,a)},a.showMetric=function(a){d.open({animation:!0,templateUrl:"app/analytic/metric/list/view.modal.html",controller:"AnalyticMetricListViewModalCtrl",resolve:{metric:a}})},a.cloneMetric=function(c){return h.get({id:c,controller:"clone"}).$promise.then(function(){b.show(i.instant("MESSAGE_WELL_DONE"),"success"),a.gridOptions.getPage()})["catch"](function(a){b.error(a)})},a.create=function(){var c=d.open({animation:!0,templateUrl:"app/analytic/metric/list/create.modal.html",controller:"AnalyticMetricListCreateModalCtrl"});c.result.then(function(){b.show(i.instant("MESSAGE_WELL_DONE")+"!","success"),a.gridOptions.getPage()},function(){e.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.metrics.list",{url:"/list",templateUrl:"app/analytic/metric/list/list.html",controller:"AnalyticMetricListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("AnalyticMetricListViewModalCtrl",["$scope","$uibModalInstance","metric","xAlert","$translate","report",function(a,b,c,d,e,f){a.item=c,a.tables=f.tables,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").factory("Metric",["$resource",function(a){return a("/api/analytics/metrics/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.metrics",{url:"/metrics",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("AnalyticMetricViewCtrl",["$scope","xAlert","$translate","$stateParams","$location","Metric","report",function(a,b,c,d,e,f,g){a.tables=g.tables,a.getMetric=function(){return f.get({id:d.id}).$promise.then(function(b){a.metric=b})["catch"](function(a){e.path("/analytics/metrics/list")})},a.updateMetric=function(){return f.update({id:d.id},a.metric).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.metrics.view",{url:"/view/:id",templateUrl:"app/analytic/metric/view/view.html",controller:"AnalyticMetricViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.analytics.metrics.view.settings",{url:"/settings",templateUrl:"app/analytic/metric/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("CustomReport",["$resource",function(a){return a("/api/analytics/reports/custom/:precontroller/:id/:controller/:action",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("DefaultReport",["$resource",function(a){return a("/api/analytics/reports/default/:id/:controller/:action",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("ReportListCopyModalCtrl",["$scope","$uibModalInstance","$log","customTreeData",function(a,b,c,d){a.customTreeData=d,a.forms={dashboard:void 0},a.customTreeConfig={multiple:!1,animation:!0,core:{error:function(a){c.error("treeCtrl: error from js tree - "+angular.toJson(a))},check_callback:!0}},a.ac=function(){return!0},a.initCustomScopeTree=function(){a.customTree=a.customTreeInstance.jstree(!0),a.customTree.deselect_all(),a.customTree.open_all()},a.ok=function(){a.customTree.get_selected(!0).length?b.close({parent:a.customTree.get_selected(!0).pop().id}):a.showAlert=!0},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ReportListCreateModalCtrl",["$scope","$uibModalInstance","path",function(a,b,c){a.path=c,a.forms={dashboard:void 0},a.item={},a.ok=function(){a.item.model=JSON.stringify({title:a.item.name}),b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ReportListExtractModalCtrl",["$scope","$uibModalInstance","$translate",function(a,b,c){a.daily=!1,a.dailySwitch={onText:c.instant("APPLICATION_TODAY"),offText:c.instant("APPLICATION_RANGE"),isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"primary"},a.dates={startDate:moment().subtract(1,"days").startOf("day"),endDate:moment().subtract(1,"days").endOf("day")},a.ranges={},a.ranges[c.instant("APPLICATION_YESTERDAY")]=[moment().subtract(1,"days").startOf("day"),moment().subtract(1,"days").endOf("day")],a.ranges[c.instant("APPLICATION_LAST_SEVEN_DAYS")]=[moment().subtract("days",7).startOf("day"),moment().subtract(1,"days").endOf("day")],a.ranges[c.instant("APPLICATION_LAST_THIRTY_DAYS")]=[moment().subtract("days",30),moment()],a.ranges[c.instant("APPLICATION_LAST_MONTH")]=[moment().subtract(1,"months").startOf("month"),moment().subtract(1,"months").endOf("month")],a.timepicker={timePickerIncrement:1,timePicker12Hour:!1},a.dailyTime={start:moment("00:00","HH:mm"),end:moment("23:59","HH:mm")},a.maxdate=moment().subtract(1,"days").endOf("day").format("YYYY-MM-DD HH:mm"),a.extract=function(c){var d={startDate:moment(a.dates.startDate).format("YYYY-MM-DD"),endDate:moment(a.dates.endDate).format("YYYY-MM-DD"),startTime:a.daily?moment(a.dailyTime.start).format("HH:mm"):moment(a.dates.startDate).format("HH:mm"),endTime:a.daily?moment(a.dailyTime.end).format("HH:mm"):moment(a.dates.endDate).format("HH:mm"),daily:a.daily,action:c};b.close(d)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("AnalyticReportListCtrl",["$scope","xAlert","$translate","$location","$log","Modal","$uibModal","FileSaver","Blob","gridOptions","CustomReport","DefaultReport","ReportTree","localStorageService",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){function o(){var b=n.get("lastMotionReportNode")||!1,c=n.get("lastMotionReportTree")||!1;return b&&c?(a[c+"Tree"].open_node({id:b}),a[c+"Tree"].select_node({id:b}),!0):!1}function p(b,c){var d={parent:c.id};a.selectedNode=b?a.defaultTree.get_path(c," / "):a.customTree.get_path(c," / "),a.gridOptions?a.gridOptions.getPage({parent:c.id},b?l:k):a.gridOptions=j.gridOptions(b?l:k,q,a,d)}var q={exporterCsvFilename:"reports.csv",columnDefs:[{name:"name"},{name:"description"},{name:"manage",width:120,buttons:[{"class":"{{grid.appScope.defaultTreeActive ? 'display-none' : 'blue-hoki'}}",href:"/analytics/reports/view/{{row.entity.id}}/settings",title:c.instant("APPLICATION_SETTINGS"),name:"settings"},{"class":"{{grid.appScope.defaultTreeActive ? 'display-none' : 'red-sunglo'}}",title:c.instant("APPLICATION_DELETE"),name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"},{"class":"green",title:c.instant("APPLICATION_COPY"),name:"copy",onClick:"grid.appScope.copy(row.entity.id)"},{"class":"purple",title:c.instant("APPLICATION_EXPORT"),name:"export",onClick:"grid.appScope.export(row.entity.id)"}]},{name:"actions",width:60,buttons:[{"class":"yellow",name:"preview",title:c.instant("APPLICATION_PREVIEW"),onClick:"grid.appScope.preview(row.entity.id)"},{"class":"green-turquoise",name:"run",title:c.instant("APPLICATION_RUN"),onClick:"grid.appScope.extract(row.entity.id)"}]}]};a.searchField="",a.ac=function(){return!0},a.initDefaultScopeTree=function(){a.defaultTree=a.defaultTreeInstance.jstree(!0),a.defaultTree.deselect_all(),a.defaultTree.close_all(),a.defaultTreeReady=!0,a.defaultTreeActive=!0,a.previousDefaultNode=""},a.initCustomScopeTree=function(){a.customTree=a.customTreeInstance.jstree(!0),a.customTree.deselect_all(),a.customTree.close_all(),a.customTreeReady=!0,a.previousCustomNode=""},a.$watchGroup(["defaultTreeReady","customTreeReady"],function(b,c,d){b[0]&&b[1]&&(o()||(a.defaultTree.open_node({id:1}),a.customTree.open_node({id:1}),a.defaultTree.select_node({id:"1"})))}),a.updateCustomTree=function(){var c={tree:angular.toJson(a.customTree.get_json("#",{flat:!0}))};return m.update({id:2},c).$promise.then(function(a){console.log("Custom Tree Updated")})["catch"](function(a){b.error(a)})},a.configTrees=function(){a.defaultTreeConfig={multiple:!1,animation:!0,core:{error:function(a){e.error("treeCtrl: error from js tree - "+angular.toJson(a))},check_callback:!0,themes:{name:"default",url:"../../../assets/css/jstree-metronic/style.css"}},plugins:["search"]},a.customTreeConfig={multiple:!1,animation:!0,core:{error:function(a){e.error("treeCtrl: error from js tree - "+angular.toJson(a))},check_callback:function(a,b,c,d,e){return console.log(a),!0},themes:{name:"default",url:"../../../assets/css/jstree-metronic/style.css"}},plugins:["contextmenu","dnd","search"],contextmenu:{items:function(b,d){var e={create:{label:c.instant("APPLICATION_CREATE"),action:function(c){a.customTree.create_node(b),a.customTree.open_node(b)}},rename:{label:c.instant("APPLICATION_RENAME"),action:function(c){a.customTree.edit(b)}},remove:{label:c.instant("APPLICATION_REMOVE"),action:function(c){a.deleteNode(b)}}};return"#"===b.parent&&(delete e.rename,delete e.remove),d(e),e}}}},a.deleteNode=function(d){var f=g.open({animation:!0,templateUrl:"app/analytic/report/list/deleteNode.modal.html",controller:["$scope","$uibModalInstance","node",function(a,b,c){a.node=c,a.ok=function(){b.close()},a.cancel=function(){b.dismiss("cancel")}}],resolve:{node:function(){return d.text}}});f.result.then(function(){return k["delete"]({precontroller:"node",id:d.id}).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE"),"success"),a.customTree.delete_node(d),a.previousCustomNode==d.id&&a.customTree.select_node({id:d.parent})})["catch"](function(a){b.error(a)})},function(){e.info("Modal dismissed at: "+new Date)})},a.searchTrees=function(){a.defaultTree.search(a.searchField),a.customTree.search(a.searchField)},a.selectDefaultNode=function(){if(a.customTreeReady){a.previousCustomNode="";var b=a.defaultTree.get_selected(!0),c=b.pop();if(a.defaultTree.deselect_node(b[0],!0),a.customTree.deselect_all(),a.defaultTree.select_node(c,!0),c.id===a.previousDefaultNode)return void console.log("def");a.previousDefaultNode=c.id,n.set("lastMotionReportNode",c.id),n.set("lastMotionReportTree","default"),a.defaultTreeActive=!0,p(!0,c)}},a.selectCustomNode=function(){if(a.defaultTreeReady){a.previousDefaultNode="";var b=a.customTree.get_selected(!0),c=b.pop();if(a.customTree.deselect_node(b[0],!0),a.defaultTree.deselect_all(),a.customTree.select_node(c,!0),c.id===a.previousCustomNode)return void console.log("cus");a.previousCustomNode=c.id,n.set("lastMotionReportNode",c.id),n.set("lastMotionReportTree","custom"),a.defaultTreeActive=!1,p(!1,c)}},a.getTrees=function(){return m.query().$promise.then(function(b){a.defaultTreeData=JSON.parse(b[0].tree),a.customTreeData=JSON.parse(b[1].tree),a.configTrees()})["catch"](function(a){b.error(a)})},a.create=function(){var c=g.open({animation:!0,templateUrl:"app/analytic/report/list/create.modal.html",controller:"ReportListCreateModalCtrl",resolve:{path:function(){return a.selectedNode}}});c.result.then(function(c){return c.parent=a.previousCustomNode,k.save(c).$promise.then(function(a){d.path("/analytics/reports/view/"+a.id+"/settings")})["catch"](function(a){b.error(a)})},function(){e.info("Modal dismissed at: "+new Date)})},a.copy=function(d){var f=a.defaultTreeActive?l:k,h=g.open({animation:!0,templateUrl:"app/analytic/report/list/copy.modal.html",controller:"ReportListCopyModalCtrl",resolve:{customTreeData:function(){return a.customTree.get_json("#",{flat:!0})}}});h.result.then(function(e){return f.save({id:d,controller:"copy"},e).$promise.then(function(){a.gridOptions.getPage(),b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.error(a)})},function(){e.info("Modal dismissed at: "+new Date)})},a["export"]=function(c){var d=a.defaultTreeActive?l:k;return d.get({id:c,controller:"export"}).$promise.then(function(a){var b=new i([angular.toJson(a)],{type:"application/json;charset=utf-8"});h.saveAs(b,a.name+".json")})["catch"](function(a){b.error(a)})},a["import"]=function(d){var e=JSON.parse(d);e.parent=a.previousCustomNode;var f=!(!e.name||!e.parent),g=!0;return _.forEach(e.Fields,function(a){a.field&&a.alias||(g=!1)}),f&&g?k.save({controller:"import"},e).$promise.then(function(){a.gridOptions.getPage(),b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.error(a)}):void b.show(c.instant("MESSAGE_INVALID_JSON"),"danger")},a.preview=function(b){g.open({animation:!0,templateUrl:"app/analytic/report/list/preview.modal.html",controller:"ReportListPreviewModalCtrl",size:"full",resolve:{report:function(){return{id:b,tree:a.defaultTreeActive?"default":"custom"}}}})},a.extract=function(d){var f=g.open({animation:!0,templateUrl:"app/analytic/report/list/extract.modal.html",controller:"ReportListExtractModalCtrl",size:"md",resolve:{report:function(){return{id:d,tree:a.defaultTreeActive?"default":"custom"}}}});f.result.then(function(e){e.daily||delete e.daily;var f=a.defaultTreeActive?l:k;return f.get(_.merge({id:d,controller:"extract"},e)).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.error(a)})},function(){e.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.reports.list",{url:"/list",templateUrl:"app/analytic/report/list/list.html",controller:"AnalyticReportListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ReportListPreviewModalCtrl",["$scope","$uibModalInstance","report","xAlert","$translate","$timeout","CustomReport","DefaultReport",function(a,b,c,d,e,f,g,h){a.daily=!1,a.dailySwitch={onText:e.instant("APPLICATION_TODAY"),offText:e.instant("APPLICATION_RANGE"),isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"primary"},a.dates={startDate:moment().subtract(1,"days").startOf("day"),endDate:moment().subtract(1,"days").endOf("day")},a.ranges={},a.ranges[e.instant("APPLICATION_YESTERDAY")]=[moment().subtract(1,"days").startOf("day"),moment().subtract(1,"days").endOf("day")],a.ranges[e.instant("APPLICATION_LAST_SEVEN_DAYS")]=[moment().subtract("days",7).startOf("day"),moment().subtract(1,"days").endOf("day")],a.ranges[e.instant("APPLICATION_LAST_THIRTY_DAYS")]=[moment().subtract("days",30),moment()],a.ranges[e.instant("APPLICATION_LAST_MONTH")]=[moment().subtract(1,"months").startOf("month"),moment().subtract(1,"months").endOf("month")],a.timepicker={timePickerIncrement:1,timePicker12Hour:!1},a.dailyTime={start:moment("00:00","HH:mm"),end:moment("23:59","HH:mm")},a.maxdate=moment().subtract(1,"days").endOf("day").format("YYYY-MM-DD HH:mm");var i={offset:0,limit:25,sort:null,where:{},order:{}};a.gridOptions={paginationPageSizes:[10,25,50],paginationPageSize:25,useExternalPagination:!0,enableSorting:!1,enableFiltering:!0,useExternalFiltering:!0,enableGrouping:!1,enableColumnMenus:!1,treeRowHeaderAlwaysVisible:!1,gridMenuShowHideColumns:!1,enableGridMenu:!1,onRegisterApi:function(b){a.gridApi=b,b.pagination.on.paginationChanged(a,function(b,c){i.offset=(b-1)*c,i.limit=c,a.getPage()}),b.core.on.filterChanged(a,function(){var b=this.grid,c={};b.columns.forEach(function(a){a.filters[0].term&&(c[a.field]=a.filters[0].term)}),i.where=c,a.getPage()})}},a.getPage=function(){var b={offset:i.offset,limit:i.limit,startDate:moment(a.dates.startDate).format("YYYY-MM-DD"),endDate:moment(a.dates.endDate).format("YYYY-MM-DD"),startTime:a.daily?moment(a.dailyTime.start).format("HH:mm"):moment(a.dates.startDate).format("HH:mm"),endTime:a.daily?moment(a.dailyTime.end).format("HH:mm"):moment(a.dates.endDate).format("HH:mm"),daily:a.daily};_.forOwn(i.where,function(a,c){b[c]=a});var e="custom"===c.tree?g:h;return e.get(_.merge({id:c.id,controller:"preview"},b)).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.paginationPageSizes[3]=b.count,a.gridOptions.data=b.rows,a.showResult=!0})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss("cancel")},f(function(){a.getPage()})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.reports",{url:"/reports",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("ReportAgent",["$resource",function(a){return a("/api/report/agents/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ReportIntegration",["$resource",function(a){return a("/api/report/integrations/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ReportMember",["$resource",function(a){return a("/api/report/members/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ReportTree",["$resource",function(a){return a("/api/analytics/reports/trees/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("AnalyticReportViewCtrl",["$scope","xAlert","$translate","$stateParams","$location","ReportAgent","ReportCall","ReportMailSession","ReportSmsSession","ReportMember","ReportQueue","ReportIntegration","ReportChatSession","DefaultReport","CustomReport","Metric","report",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){function r(c){var d=_.find(a.tables,{value:c}).resource;d.get({controller:"describe"}).$promise.then(function(b){a.tableFields=_.map(b,function(a,b){return"$promise"!==b&&"$resolved"!==b?{name:b,value:b}:void 0})})["catch"](function(a){b.error(a)})["finally"](function(){s(c)})}function s(c){return p.get({controller:"table",table:c}).$promise.then(function(b){_.forEach(b.rows,function(b){a.tableFields.push({name:"<strong>Metric.</strong>"+b.name,alias:b.name,value:b.metric,MetricId:b.id})})})["catch"](function(a){b.error(a)})}function t(a){return String(a).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function u(a){if(!a)return"";for(var b="(",c=0;c<a.rules.length;c++)if(c>0&&(b+=" <strong>"+a.operator+"</strong> "),a.rules[c].group)b+=u(a.rules[c].group);else switch(b+=a.rules[c].field,a.rules[c].condition){case"IS NULL":case"IS NOT NULL":b+=" "+t(a.rules[c].condition);break;case"IS EMPTY":b+=" = ''";break;case"IS NOT EMPTY":b+=" != ''";break;default:b+=" "+t(a.rules[c].condition)+" "+a.rules[c].value}return b+")"}a.$translate=c,a.tempReport={},a.tables=q.tables;var v={group:{operator:"AND",rules:[]}};a.getReport=function(){return a.firstLoad=!0,o.get({id:d.id}).$promise.then(function(b){a.report=b,_.forEach(a.report.Fields,function(a){delete a.id}),a.report.conditions=a.report.conditions?JSON.parse(a.report.conditions):_.clone(v,!0),a.report.Fields.length&&a.getPreview()})["catch"](function(a){console.error(a),e.path("/analytics/reports/list")})},a.randomName=function(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")},a.$watch("report.table",function(b,c){b&&(r(b),c&&(a.tempReport[c]={conditions:a.report.conditions,fields:a.report.Fields}),a.firstLoad?a.firstLoad=!1:a.tempReport[b]?(a.report.Fields=a.tempReport[b].fields,a.report.conditions=a.tempReport[b].conditions):(a.report.Fields=[],a.report.conditions=_.clone(v,!0)))},!0),a.setMetricId=function(b,c){a.report.Fields[c].MetricId=b.MetricId?b.MetricId:null,a.report.Fields[c].alias=b.MetricId?b.alias:b.name},a.groupByField=[{name:"APPLICATION_YES",value:!0},{name:"APPLICATION_NO",value:!1}],a.functions=[{name:"Sum",value:"SUM"},{name:"Count",value:"COUNT"},{name:"Count Distinct",value:"COUNT DISTINCT"},{name:"Maximum",value:"MAX"},{name:"Minimum",value:"MIN"},{name:"Average",value:"AVG"},{name:"Group Concat",value:"GROUP_CONCAT"},{name:"Group Concat(asc)",value:"GROUP_CONCAT ASC"},{name:"Group Concat(desc)",value:"GROUP_CONCAT DESC"}],a.formatFunctions=[{name:"Sec To Time",value:"SEC_TO_TIME"},{name:"Date",value:"DATE"},{name:"Hour",value:"HOUR"},{name:"Round",value:"ROUND"},{name:"Unix TimeStamp",value:"UNIX_TIMESTAMP"}],a.addField=function(){a.report.Fields.push({groupBy:!1,custom:!1})},a.removeField=function(b){a.report.Fields.splice(b,1)},a.sortableOptions={"ui-floating":!0,cancel:".unsortable",handle:".report-field-handle",axis:"y"},a.toggleCustom=function(b){b.custom=!b.custom,b.custom||_.find(a.tableFields,{value:b.field})||(b.field=null)},a.updateReport=function(){if(a.report.Fields.length){var e=angular.copy(a.report);return console.log(e.conditions),e.conditions=angular.toJson(e.conditions),_.forEach(e.Fields,function(a){a.custom&&delete a.MetricId}),o.update({id:d.id},e).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE")+"!","success"),a.getPreview()})["catch"](function(a){b.error(a)})}b.show(c.instant("MESSAGE_SELECT_A_FIELD"),"danger")},a.$watch("report.conditions",function(b){a.output=b?u(b.group):"()"},!0),a.getPreview=function(){return a.gridOptions=null,o.get({id:d.id,controller:"preview",limit:20}).$promise.then(function(b){a.gridOptions={enableFiltering:!0,treeRowHeaderAlwaysVisible:!1,enableGridMenu:!0,data:b.rows}})["catch"](function(a){console.log(a),b.show(c.instant(a.message||"MESSAGE_QUERY_NOT_VALID"),"warning")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.analytics.reports.view",{url:"/view/:id",templateUrl:"app/analytic/report/view/view.html",controller:"AnalyticReportViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.analytics.reports.view.settings",{url:"/settings",templateUrl:"app/analytic/report/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels",{url:"/channels",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:6}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat",{url:"/chat",template:"<div ui-view></div>",
+"abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:8}}})}]),angular.module("xCallyShuttleApp").factory("ChatEnquiry",["$resource",function(a){return a("/api/chat/enquiries/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatReport",["$resource",function(a){return a("/api/report/chats/:id/:controller1/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatVisitor",["$resource",function(a){return a("/api/chat/visitors/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatMessage",["$resource",function(a){return a("/api/chat/messages/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatRoom",["$resource",function(a){return a("/api/chat/rooms/:id/:controller",{id:"@id"},{me:{method:"GET",isArray:!0,params:{id:"me"}},users:{method:"GET",params:{id:"users"}},externals:{method:"GET",isArray:!0,params:{id:"type",controller:"external"}},groups:{method:"GET",isArray:!0,params:{id:"groups"}},update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").controller("ChatOfflineListCtrl",["$scope","ChatEnquiry","gridOptions","uiGridConstants",function(a,b,c,d){a.initView=function(){var e={exporterCsvFilename:"chat_offline_messages.csv",columnDefs:[{name:"username",cellClass:"text-center"},{name:"email",cellClass:"text-center"},{name:"ChatWebsite.name",displayName:"Website",cellClass:"text-center"},{name:"createdAt",displayName:"createdAt",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span am-time-ago="row.entity.createdAt"></span></div>',field:"createdAt",sort:{direction:d.DESC,priority:0}},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/chat/offline/view/{{row.entity.id}}",name:"detail"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.fullname, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,e,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.offline.list",{url:"/list",templateUrl:"app/channels/chat/offline/list/list.html",controller:"ChatOfflineListCtrl"})}]),angular.module("xCallyShuttleApp").directive("enquiryMessage",["$rootScope","$translate","MailMessage","List","xAlert",function(a,b,c,d,e){return{restrict:"E",scope:{message:"=",listId:"="},templateUrl:"app/channels/chat/offline/message/message.directive.html",link:function(c){c.openContact=function(f){return c.listId?d.save({listId:c.listId,controller:"contacts"},{email:f}).$promise.then(function(b){var c=_.find(a.$root.workspaces,{contactID:b.id});c?c.active=!0:a.$root.workspaces.push({active:!0,"class":"icon-user",contactID:b.id,name:b.email,type:"contact"})})["catch"](function(a){e.error(a)}):void e.show(b.instant("MESSAGE_NO_LIST_CONFIGURED"),"info")}}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.offline",{url:"/offline",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:32}}})}]),angular.module("xCallyShuttleApp").controller("ChatOfflineViewCtrl",["$scope","$stateParams","$translate","$rootScope","ChatEnquiry","List","xAlert",function(a,b,c,d,e,f,g){a.initView=function(){return e.get({id:b.id}).$promise.then(function(b){a.enquiry=b})["catch"](function(a){g.error(a)})},a.openContact=function(b){return a.enquiry.ChatWebsite.ListId?f.save({listId:a.enquiry.ChatWebsite.ListId,controller:"contacts"},{email:b}).$promise.then(function(a){var b=_.find(d.$root.workspaces,{contactID:a.id});b?b.active=!0:d.$root.workspaces.push({active:!0,"class":"icon-user",contactID:a.id,name:a.email,type:"contact"})})["catch"](function(a){g.error(a)}):void g.show(c.instant("MESSAGE_NO_LIST_CONFIGURED"),"info")}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.offline.view",{url:"/view/:id",templateUrl:"app/channels/chat/offline/view/view.html",controller:"ChatOfflineViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatOnlineListCtrl",["$scope","ChatRoom","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"chat_online_messages.csv",columnDefs:[{name:"ChatVisitor.fullname",displayName:"APPLICATION_FULLNAME",cellClass:"text-center"},{name:"ChatVisitor.email",displayName:"APPLICATION_EMAIL",cellClass:"text-center"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/chat/online/view/{{row.entity.id}}/detail",name:"detail"}]}]};a.gridOptions=c.gridOptions(b,d,a,{id:"online"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.online.list",{url:"/list",templateUrl:"app/channels/chat/online/list/list.html",controller:"ChatOnlineListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.online",{url:"/online",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:8}}})}]),angular.module("xCallyShuttleApp").controller("ChatOnlineViewCtrl",["$scope","$stateParams","ChatRoom",function(a,b,c){a.initView=function(){return a.config={autoHideScrollbar:!1,theme:"light",advanced:{updateOnContentResize:!0},setHeight:400,scrollInertia:0},c.get({id:b.id}).$promise.then(function(b){a.chatRoom=b})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.online.view",{url:"/view/:id",templateUrl:"app/channels/chat/online/view/view.html",controller:"ChatOnlineViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.chat.online.view.detail",{url:"/detail",templateUrl:"app/channels/chat/online/view/view.detail.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/news.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("PreviewCtrl",["$scope",function(a){a.message="Hello"}]),angular.module("xCallyShuttleApp").directive("preview",["$rootScope",function(a){return{templateUrl:"app/channels/chat/preview/preview.html",restrict:"EA",link:function(a,b,c){}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("preview",{url:"/preview",templateUrl:"app/channels/chat/preview/preview.html",controller:"PreviewCtrl",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:8}}})}]),angular.module("xCallyShuttleApp").factory("ChatQueue",["$resource",function(a){return a("/api/chat/queues/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("ChatQueueListCtrl",["$scope","ChatQueue","gridOptions","Auth","$uibModal",function(a,b,c,d,e){a.initView=function(){a.Auth=d;var e={exporterCsvFilename:"chat_queues.csv",columnDefs:[{name:"name"},{name:"description"},{name:"strategy"},{name:"timeout"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/chat/queues/view/{{row.entity.id}}/settings",name:"settings"},{"class":"green-meadow",href:"/channels/chat/queues/view/{{row.entity.id}}/agents",name:"agents",hide:"user"===d.getCurrentUser().role},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,e,a)},a.createItem=function(){var b=e.open({animation:!0,templateUrl:"app/channels/chat/queue/list/list.create.modal.html",controller:"ChatQueueListCreateCtrl",size:"lg"});b.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("ChatQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","ChatQueue","Team",function(a,b,c,d,e,f){a.form={},a.item={penalty:0,agents:[]},a.getTeams=function(){return f.get({controller:"associations"}).$promise.then(function(b){a.teams=b.rows}).then(function(){ComponentsDropdowns.bindQueue(a.teams,[],function(){return{select:function(b){a.item.agents=_.union(a.item.agents,b)},deselect:function(b){a.item.agents=_.difference(a.item.agents,b)}}})})["catch"](function(a){console.error(a)})},a.save=function(){return e.save(a.item).$promise.then(function(a){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close(a)})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.queues.list",{url:"/list",templateUrl:"app/channels/chat/queue/list/list.html",controller:"ChatQueueListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.queues",{url:"/queues",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:30}}})}]),angular.module("xCallyShuttleApp").controller("ChatQueueViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","ChatQueue","Team","Auth",function(a,b,c,d,e,f,g,h){a.Auth=h;var i=function(){return{select:function(b){return f.save({id:a.queue.id,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})},deselect:function(b){return f["delete"]({id:a.queue.id,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})}}};a.getQueue=function(){b.get("/api/chat/queues/"+e.id).success(function(b){b.penalty=0,a.queue=b}).error(function(a){console.error(a)})},a.updateChatQueue=function(){var f=angular.copy(a.queue);b.put("/api/chat/queues/"+e.id,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){a.queue=f,b.errors.forEach(function(a){c.error(err)})})},a.getTeams=function(){return g.get({controller:"associations"}).$promise.then(function(b){return a.teams=b.rows,f.get({id:e.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindChatQueue(a.teams,_.map(b.rows,function(a){return{id:a.id,penalty:a.UserHasChatQueue.penalty}}),i)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.queues.view",{url:"/view/:id",templateUrl:"app/channels/chat/queue/view/view.html",controller:"ChatQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.chat.queues.view.settings",{url:"/settings",templateUrl:"app/channels/chat/queue/view/view.settings.html"}).state("main.channels.chat.queues.view.agents",{url:"/agents",templateUrl:"app/channels/chat/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:33}}})}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","ChatQueue","usSpinnerService","$q","uiGridConstants","Auth",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){function o(){return k.spin("grid-spinner"),g.get(t).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){q(a)})})["catch"](function(a){f.error(a)})["finally"](function(){k.stop("grid-spinner")})}function p(){e.socket.on("agent:save",function(b){b=b.newValues||b;var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});c&&(c.online=_.has(b,"online")?b.online:c.online,c.lastLoginAt=_.has(b,"lastLoginAt")?b.lastLoginAt:c.lastLoginAt,c.pause=_.has(b,"smsPause")?b.chatPause:c.chatPause,c.pauseType=_.has(b,"pauseType")?b.pauseType:c.pauseType,c.lastPauseAt=_.has(b,"lastPauseAt")?b.lastPauseAt:c.lastPauseAt,c.ipaddr=_.has(b,"ipaddr")?b.ipaddr:c.ipaddr,c.port=_.has(b,"port")?b.port:c.port,c.fullcontact=_.has(b,"fullcontact")?b.fullcontact:c.fullcontact,c.useragent=_.has(b,"useragent")?b.useragent:c.useragent,c.lastms=_.has(b,"lastms")?b.lastms:c.lastms,c.internal=_.has(b,"internal")?b.internal:c.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=_.has(b,"online")?b.online:a.online)}))}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_chat_queue:save",function(b){var c=_.includes(_.map(a.CurrentUser.PChatQueues,"id"),b.ChatQueueId)||n.isAdmin();if(c){var d=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0});if(d){var e=a.gridOptions.data.indexOf(d);a.gridOptions.data.splice(e+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,queueId:b.ChatQueueId,agent:b.membername,online:d.online})}}}),e.socket.on("user_has_chat_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queueId:b.ChatQueueId})})}function q(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.chatPause,pauseType:b.pauseType,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.ChatQueues.forEach(function(c){a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,queueId:c.id,agent:b.name,online:b.online})})}function r(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.error(a)})}function s(){return j.get().$promise.then(function(b){a.chatQueues=b.rows,e.syncUpdates("chat_queue",a.chatQueues)})["catch"](function(a){f.error(a)})}a.chatQueues=[];var t={controller:"realtime",controller1:"chat",offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="fa" data-ng-class="{\'font-green\':row.entity.online, \'font-red\':!row.entity.online,\'fa-user\':row.entity.online,\'fa-user-times\':!row.entity.online}"></i> <span data-ng-if="row.entity.online" class="left-margin">(<css-timer start-time="row.entity.lastLoginAt)"></css-timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"chatPause",displayName:"APPLICATION_PAUSE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.pause != null && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="fa fa-play font-green pointer-cursor left-margin" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="fa fa-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select> <span data-ng-if="row.entity.pause">({{row.entity.pauseType}})</span><span class="left-margin"><css-timer data-ng-if="row.entity.pause" start-time="row.entity.lastPauseAt"></css-timer></span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"PAUSED"},{value:"false",label:"NOT PAUSED"}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queueId" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queueId)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.chatQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){u(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){u(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){u(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?t.order=null:t.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),o()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){t.offset=(a-1)*b,t.limit=b,o()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?t[a.name]=a.filters[0].term:delete t[a.name]}),o()})}},o(),r(),s(),$timeout(function(){p()})};var u=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_chat_queue")}),a.pause=function(b,c,e){return e&&(a.pauseType=null),i.save({name:c,agent:b,type:e||"DEFAULT PAUSE",data4:e||"DEFAULT PAUSE",channel:"chat"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/chat/realtime/view/agent/queue.modal.add.html",controller:"ChatRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.chatQueues,function(b){return!!_.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})})}}});g.result.then(function(b){return i.save({name:"QueueAdd",agent:e,queues:_.filter(a.chatQueues,function(a){return _.includes(b.queues,a.id)}),channel:"chat",data1:e,data3:b.queues.join(","),data4:"chat"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queueId:b,channel:"chat",data1:a,data3:b,data4:"chat"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/chat/realtime/view/agent/agent.modal.info.html",controller:"ChatRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/chat/realtime/view/agent/agent.html",controller:"ChatRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewApplicationCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","ReportChatSession","usSpinnerService","$q","uiGridConstants","$timeout",function(a,b,c,d,e,f,g,h,i,j,k){function l(){return h.spin("spinner-grid"),g.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){m(),h.stop("spinner-grid")})}function m(){e.socket.on("report_chat_session:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&k(function(){_.remove(a.gridOptions.data,{id:b.id})},1e4)):b.leaveAt||a.gridOptions.data.push(b)}),e.socket.on("report_chat_session:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})}a.moment=moment,a.initApplications=function(){a.gridOptions={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"uniqueid",displayName:"APPLICATION_UNIQUEID",headerCellFilter:"translate"},{name:"websitename",displayName:"APPLICATION_WEBSITE",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.abandon">{{\'APPLICATION_QUEUESTATUS_ABANDON\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span> <span data-ng-if="!row.entity.leaveAt">[<timer start-time="grid.appScope.moment(row.entity.updatedAt).unix()*1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</span></div>"},{name:"queuename",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.queuename || ''}}</span></div>"}],data:[],gridMenuTitleFilter:function(a){var b=i.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){n(a.gridOptions.data.length)})}},l()};var n=function(a){var b=a?30*a+60:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("report_chat_session")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.realtime.view.applications",{url:"/applications",templateUrl:"app/channels/chat/realtime/view/application/application.html",controller:"ChatRealtimeViewApplicationCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatRealtimeViewCtrl",["$scope",function(a){a.agents=[{name:"Queues",link:"main.chat.realtime.view.agent.queues"},{name:"Timeline",link:"main.chat.realtime.view.agent.timeline"}],a.sessions=[{name:"Sessions",link:"main.chat.realtime.view.sessions"}]}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.realtime.view",{url:"/view",templateUrl:"app/channels/chat/realtime/view/view.html",controller:"ChatRealtimeViewCtrl"})}]),angular.module("xCallyShuttleApp").factory("ReportChatSession",["$resource",function(a){return a("/api/report/chat/sessions/:id/:controller/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.room.external",{url:"/external",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatRoomExternalListCtrl",["$scope","$timeout","socket","Auth","ChatRoom","usSpinnerService","Tag","$uibModal","uibButtonConfig",function(a,b,c,d,e,f,g,h,i){function j(){return g.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)})}a.openChat=function(b){return e.get({id:b.id}).$promise.then(function(b){var c=_.find(a.workspaces,{id:b.id,type:"chatRoom"});c?c.active=!0:a.workspaces.push({id:b.id,name:b.ChatVisitor.fullname,type:"chatRoom","class":"icon-bubble",active:!0})})["catch"](function(a){console.error(a)})},a.initView=function(){i.activeClass="green-haze",a.id=[],a.query={status:"OPEN",tags:[]},a.gridOptions={enableGridMenu:!1,enableFiltering:!0,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,columnDefs:[{name:"id",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>#{{row.entity.id}}</span></div>",width:75,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"userpic",displayName:"",width:35,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div>           <ng-letter-avatar           height="20"           width="20"           fontsize="12"           data="{{row.entity.ChatVisitor.fullname}}"           avatarcustombgcolor="#B0B0B0"           charCount="2"           avatarcustomborder="border:2px solid #EA4C61"           shape="round"></ng-letter-avatar>           </div>',enableColumnMenu:!1,enableSorting:!1,enableFiltering:!1},{name:"fullname",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span style="padding-left: 5px;" class="pull-left">{{row.entity.ChatVisitor.fullname}}</span></div>',enableSorting:!0,enableFiltering:!0,enableColumnMenu:!0},{name:"action",cellTemplate:'<div><a class="btn btn-xs green-meadow" href="#" data-ng-click="grid.appScope.openChat(row.entity)">{{\'APPLICATION_CHAT\' | translate}}</a></div>',cellClass:"ui-grid-vcenter",width:100,enableFiltering:!1,enableSorting:!1,enableColumnMenu:!1}],data:[],onRegisterApi:function(b){a.gridApi=b,a.gridApi.selection&&(a.gridApi.selection.on.rowSelectionChanged(a,function(b){b.isSelected?a.id.push(a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id):_.pull(a.id,a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id)}),a.gridApi.selection.on.rowSelectionChangedBatch(a,function(b){b[0].isSelected?a.id=_.union(a.id,_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id")):_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id").forEach(function(b){_.pull(a.id,b)})}))}},a.getPage(),j()},a.tagItems=function(){h.open({animation:!0,templateUrl:"app/channels/chat/room/view.tags.modal.html",controller:"ChatRoomViewModalTagCtrl",resolve:{id:function(){return a.id}}}).result.then(function(){a.gridApi.selection.clearSelectedRows(),a.id=[]})},a.onChanged=function(){a.getPage()},a.$watch("query.status",function(){a.getPage()},!0),a.getPage=function(){return f.spin("spinner-grid"),e.get(_.merge({id:"externals"},a.query)).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){console.error(a)})["finally"](function(){f.stop("spinner-grid")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.room.external.list",{url:"/list",templateUrl:"app/channels/chat/room/external/list/list.html",controller:"ChatRoomExternalListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.room.group",{url:"/group",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatRoomGroupListCtrl",["$scope","$timeout","Auth","ChatRoom","usSpinnerService","Tag","uibButtonConfig",function(a,b,c,d,e,f,g){function h(){return f.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)})}a.getFullnames=function(a){var b=_.map(a.Users,"fullname");return a.ChatVisitor&&b.unshift(a.ChatVisitor.fullname),_.without(b,c.getCurrentUser().fullname).join(", ")},a.openChat=function(b){return d.get({id:b.id}).$promise.then(function(c){var d=_.find(a.workspaces,{id:c.id,type:"chatRoom"});d?d.active=!0:a.workspaces.push({id:c.id,data:b,name:a.getFullnames(c),type:"chatRoom","class":"icon-bubble",active:!0})})["catch"](function(a){console.error(a)})},a.initView=function(){g.activeClass="green-haze",a.query={status:"OPEN",tags:[]},a.currentUser=c.getCurrentUser(),a.gridOptions={enableGridMenu:!1,enableColumnResizing:!0,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,columnDefs:[{name:"userpic",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div>           <ng-letter-avatar data-ng-if="row.entity.ChatVisitor"          height="20"           width="20"           fontsize="12"           data="{{row.entity.ChatVisitor.fullname}}"           avatarcustombgcolor="#B0B0B0"           charCount="2"           avatarcustomborder="border:2px solid #EA4C61"           shape="round"></ng-letter-avatar>           <ng-letter-avatar data-ng-repeat="user in row.entity.Users | filter:{ id: \'!\' + grid.appScope.currentUser.id} track by user.id"            style="margin-right: 3px;"           height="20"           width="20"           fontsize="12"           data="{{user.fullname}}"           avatarcustombgcolor="#B0B0B0"           charCount="2"           avatarcustomborder="border:2px solid #3399CC"           shape="round"></ng-letter-avatar>           </div>',enableColumnMenu:!1,enableSorting:!1,enableFiltering:!1},{name:"Users",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{grid.appScope.getFullnames(row.entity)}}</div>",enableSorting:!0,enableFiltering:!0,enableColumnMenu:!0},{name:"action",cellTemplate:'<div><a class="btn btn-xs green-meadow" href="#" data-ng-click="grid.appScope.openChat(row.entity)">{{\'APPLICATION_CHAT\' | translate}}</a></div>',cellClass:"ui-grid-vcenter",width:100,enableFiltering:!1,enableSorting:!1,enableColumnMenu:!1}],data:[]},a.getPage(),h()},a.onChanged=function(){a.getPage()},a.$watch("query.status",function(){a.getPage()},!0),a.getPage=function(){return e.spin("spinner-grid"),
+d.get(_.merge({id:"groups"},a.query)).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){console.error(a)})["finally"](function(){e.stop("spinner-grid")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.room.group.list",{url:"/list",templateUrl:"app/channels/chat/room/group/list/list.html",controller:"ChatRoomGroupListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.room.internal",{url:"/internal",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatRoomInternalListCtrl",["$scope","$timeout","socket","Auth","ChatRoom","usSpinnerService",function(a,b,c,d,e,f){a.openChat=function(b){return e.users({users:[d.getCurrentUser().id,b.id]}).$promise.then(function(c){var d=_.find(a.workspaces,{id:c.id,type:"chatRoom"});d?d.active=!0:a.workspaces.push({id:c.id,name:b.fullname,type:"chatRoom","class":"icon-bubble",active:!0})})["catch"](function(a){console.error(a)})},a.initView=function(){a.gridOptions={enableGridMenu:!1,enableFiltering:!0,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,columnDefs:[{name:"userpic",displayName:"",width:35,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div>           <ng-letter-avatar           height="20"           width="20"           fontsize="12"           data="{{row.entity.fullname}}"           avatarcustombgcolor="#B0B0B0"           charCount="2"           avatarcustomborder="border:2px solid #3399CC"           shape="round"></ng-letter-avatar>           </div>',enableColumnMenu:!1,enableSorting:!1,enableFiltering:!1},{name:"fullname",enableSorting:!0,enableFiltering:!0,enableColumnMenu:!0},{name:"action",cellTemplate:'<div><a class="btn btn-xs green-meadow" href="#" data-ng-click="grid.appScope.openChat(row.entity)">{{\'APPLICATION_CHAT\' | translate}}</a></div>',cellClass:"ui-grid-vcenter",width:100,enableFiltering:!1,enableSorting:!1,enableColumnMenu:!1}],data:[]},c.socket.on("user:save",function(b){if(b.online&&d.getCurrentUser().id!==b.id){var c=_.find(a.gridOptions.data,{id:b.id});c?_.merge(c,b):a.gridOptions.data.push(b)}else _.remove(a.gridOptions.data,{id:b.id})}),b(function(){c.socket.on("agent:save",function(b){if(b.online&&d.getCurrentUser().id!==b.id){var c=_.find(a.gridOptions.data,{id:b.id});c?_.merge(c,b):a.gridOptions.data.push(b)}else _.remove(a.gridOptions.data,{id:b.id})})}),e.get({id:"agents"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){console.error(a)})["finally"](function(){f.stop("spinner-grid")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.room.internal.list",{url:"/list",templateUrl:"app/channels/chat/room/internal/list/list.html",controller:"ChatRoomInternalListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatRoomAddCtrl",["$scope","$uibModalInstance","Agent","items",function(a,b,c,d){a.items=d,a.agents=c.get(function(b){a.agents=b,a.items.forEach(function(b){_.remove(a.agents.rows,{id:b.id})})}),a.selected={items:[]},a.ok=function(){b.close(_.union(_.map(a.selected.items,"id"),_.map(a.items,"id")))},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").controller("ChatRoomCloseCtrl",["$scope","$uibModalInstance","closed","ChatWebsite","websiteId",function(a,b,c,d,e){a.modal={title:"APPLICATION_CONFIRM_CLOSE",text:"MESSAGE_ARE_YOU_SURE_YOU_WANT_TO_CLOSE_THE_CHAT"},a.initDisposition=function(){return d.get({websiteId:e,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a)})},a.item={},a.closed=c,a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").directive("chatRoom",["$interval","$rootScope","$uibModal","$notification","$window","socket","Auth","ChatRoom","ngAudio","xAlert","Tag","CannedAnswer","List","$translate",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){return{restrict:"E",scope:{workspace:"="},templateUrl:"app/channels/chat/room/room.directive.html",link:function(a){a.user=g.getCurrentUser(),a.message={body:""},a.openContact=function(c){return a.chatRoom.ChatWebsite.List?m.save({listId:a.chatRoom.ChatWebsite.List.id,controller:"contacts"},{email:c}).$promise.then(function(a){var c=_.find(b.$root.workspaces,{contactID:a.id});c?c.active=!0:b.$root.workspaces.push({active:!0,"class":"icon-user",contactID:a.id,name:a.email,type:"contact"})})["catch"](function(a){console.error(a)}):void j.show(n.instant("MESSAGE_NO_LIST_CONFIGURED"),"info")},a.modelOptions={debounce:{"default":500,blur:250},getterSetter:!0},a.form={},a.panelLeft="col-md-4",a.panelRight="col-md-8",a.onSelect=function(){a.message.body=a.modelOptions.selectedAnswer,delete a.modelOptions.selectedAnswer},a.togglePanelLeft=function(){a.panelLeft?(a.panelLeft=null,a.panelRight="col-md-12"):(a.panelLeft="col-md-4",a.panelRight="col-md-8")},a.options={link:!0,linkTarget:"_blank",pdf:{embed:!0},image:{embed:!0},audio:{embed:!0},code:{highlight:!0,lineNumbers:!1},basicVideo:!0},a.getAnswers=function(a){return l.get({key:a}).$promise.then(function(a){return console.log(a),_.map(a.rows,"value")})},a.isMyRoom=function(b){return!!_.find(b,{id:a.user.id})},h.get({id:a.workspace.id}).$promise.then(function(c){a.chatRoom=c,a.form.tags=c.tags,a.chatRoom.ChatVisitor&&(a.chatRoom.ChatVisitors=[],a.chatRoom.ChatVisitors.push(a.chatRoom.ChatVisitor)),f.socket.on("chat_room:save",function(b){a.chatRoom.id===b.id&&_.merge(a.chatRoom,b)}),f.socket.on("user_has_chat_room:save",function(b){return b.UserId!=a.user.id&&b.ChatRoomId==a.chatRoom.id?h.get({id:"agents",controller:b.UserId}).$promise.then(function(b){var c=_.map(a.chatRoom.Users,"fullname");a.chatRoom.ChatVisitor&&c.unshift(a.chatRoom.ChatVisitor.fullname),a.chatRoom.Users.push(b),a.workspace.name=_.without(c,g.getCurrentUser().fullname).join(", ")})["catch"](function(a){console.error(a)}):void 0}),f.socket.on("chat_message:save",function(c){a.chatRoom.id==c.ChatRoomId&&(a.user.id!=c.UserId&&a.chatRoom.ChatMessages.push(c),!b.settings.layout.onFocus&&e.Notification&&d("CHAT CHANNEL",{icon:"assets/images/media/channels/chat64.png",body:"NEW Chat Message!",delay:5e3}),a.workspace.active||(i.load("api/xchatty/assets?resource=notification/xc_blubb.mp3").play(),a.workspace.unread++))})})["catch"](function(a){console.error(a)}),k.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)}),a.closeRoom=function(b){return c.open({animation:!0,templateUrl:"app/channels/chat/room/room.close.html",controller:"ChatRoomCloseCtrl",resolve:{closed:function(){return"CLOSED"===a.chatRoom.status},websiteId:function(){return a.chatRoom.ChatWebsiteId}}}).result.then(function(a){var c={id:b,status:"CLOSED",completeReason:"agent"};return a.disposition&&(c.disposition=a.disposition),h.update(c).$promise["catch"](function(a){j.error(a)})})},a.onChanged=function(b){return h.update({id:b},{tags:a.form.tags}).$promise["catch"](function(a){console.error(a)})},a.addAgent=function(b){c.open({animation:!0,templateUrl:"app/channels/chat/room/room.add.html",controller:"ChatRoomAddCtrl",resolve:{items:function(){return _.map(a.chatRoom.Users||[],function(a){return{id:a.id,fullname:a.fullname}})}}}).result.then(function(a){return h.update({id:b,controller:"users"},{users:a}).$promise["catch"](function(a){j.error(a)})})},a.sendMessage=function(){var b={body:angular.copy(a.message.body),createdAt:moment(),UserId:a.user.id,User:{fullname:a.user.fullname}};return a.message.body.trim().length?(a.chatRoom.ChatMessages.push(b),a.message.body="",h.save({id:a.chatRoom.id,controller:"messages"},{body:b.body}).$promise["catch"](function(a){console.error(a)})):void 0}}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.room",{url:"/room",templateUrl:"app/channels/chat/room/room.html",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:31}},resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/inbox.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("ChatRoomViewModalTagCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Tag","ChatRoom","xAlert","id",function(a,b,c,d,e,f,g,h){a.initModal=function(){return a.tags=[],a.item={tags:[]},a.modal={dismissable:!0,title:"APPLICATION_MESSAGE_SEND_RETRY",text:"MESSAGE_MESSAGE_SEND_RETRY",buttons:[{"class":"btn-success",text:"APPLICATION_TAG",click:function(){var d={status:!0};return f.patch({id:h},{tags:a.item.tags}).$promise["catch"](function(){d.status=!1,g.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){b.close(d)})}},{"class":"default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]},e.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("ChatVisitorListCtrl",["$scope","ChatVisitor","gridOptions","$uibModal",function(a,b,c,d){a.initView=function(){var d={exporterCsvFilename:"chat_visitors.csv",columnDefs:[{name:"fullname",cellClass:"text-center"},{name:"email",cellClass:"text-center"},{name:"origin",cellClass:"text-center"},{name:"createdAt",displayName:"createdAt",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span am-time-ago="row.entity.createdAt"></span></div>'},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/chat/visitors/view/{{row.entity.id}}/profile",name:"profile"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.visitors.list",{url:"/list",templateUrl:"app/channels/chat/visitor/list/list.html",controller:"ChatVisitorListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatVisitorViewCtrl",["$scope","$stateParams","ChatVisitor",function(a,b,c){a.initView=function(){return c.get({id:b.id}).$promise.then(function(b){a.chatVisitor=b})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.visitors.view",{url:"/view/:id",templateUrl:"app/channels/chat/visitor/view/view.html",controller:"ChatVisitorViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.chat.visitors.view.profile",{url:"/profile",templateUrl:"app/channels/chat/visitor/view/view.profile.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.visitors",{url:"/visitors",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:8}}})}]),angular.module("xCallyShuttleApp").factory("ChatApplication",["$resource",function(a){return a("/api/chat/applications/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ChatWebsite",["$resource",function(a){return a("/api/chat/websites/:websiteId/:controller/:id",{id:"@websiteId"},{update:{method:"PUT"},updateFields:{method:"PUT",isArray:!0}})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteListCtrl",["$scope","gridOptions","ChatWebsite",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"chat_websites.csv",columnDefs:[{name:"name"},{name:"description"},{name:"address"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/chat/websites/view/{{row.entity.id}}/embedding/view",name:"embedding"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.list",{url:"/list",templateUrl:"app/channels/chat/website/list/list.html",controller:"ChatWebsiteListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.actions",{url:"/actions",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewActionListCtrl",["$scope","gridOptions","ChatWebsite","$http","$translate","$stateParams","socket","xAlert","Modal",function(a,b,c,d,e,f,g,h,i){a.initActons=function(){var d={draggable:!0,exporterCsvFilename:"chat_applications.csv",enableSorting:!1,enableFiltering:!1,columnDefs:[{name:"app",cellClass:"text-center"},{name:"name",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>{{row.entity.ChatQueue ? row.entity.ChatQueue.name : row.entity.User.name}}</span></div>"},{name:"timeout",cellClass:"text-center"},{name:"interval",displayName:"APPLICATION_TIME_INTERVAL",cellClass:"text-center",cellTemplate:"<div><span>{{row.entity.Interval ? row.entity.Interval.name : row.entity.interval}}</span></div>"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/chat/websites/view/{{row.entity.ChatWebsiteId}}/actions/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.app, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a,{websiteId:f.websiteId,controller:"applications"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.actions.list",{url:"/list",templateUrl:"app/channels/chat/website/view/action/list/list.html",controller:"ChatWebsiteViewActionListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewActionViewCtrl",["$scope","$http","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","ChatWebsite","ChatQueue","Agent","Interval","Template","MailAccount","SmsAccount",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initAction=function(){return a.$application=i.application,a.$stateParams=c,a.$interval=j.interval,a.forms={},a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"SendSMS",value:"sendSms"}],k.get({websiteId:c.websiteId,controller:"applications",id:c.actionId}).$promise.then(function(b){if(a.application=b,a.application.alwaysTime=!1,a.application.IntervalId)a.application.intType="list";else switch(a.application.interval){case"*,*,*,*":a.application.intType="always";break;default:a.application.intType="custom"}if("always"===a.application.intType||"custom"===a.application.intType){var c=a.application.interval.split(",");"*"===c[0]?a.application.alwaysTime=!0:(a.application.t_from=moment(new Date),a.application.t_to=moment(new Date),a.application.t_from.hour(c[0].split("-")[0].split(":")[0]),a.application.t_from.minute(c[0].split("-")[0].split(":")[1]),a.application.t_to.hour(c[0].split("-")[1].split(":")[0]),a.application.t_to.minute(c[0].split("-")[1].split(":")[1])),"*"===c[1]?(a.application.wd_from="always",a.application.wd_to="always"):(a.application.wd_from=c[1].split("-")[0],a.application.wd_to=c[1].split("-")[1]),"*"===c[2]?(a.application.md_from="always",a.application.md_to="always"):(a.application.md_from=c[2].split("-")[0],a.application.md_to=c[2].split("-")[1]),"*"===c[3]?(a.application.m_from="always",a.application.m_to="always"):(a.application.m_from=c[3].split("-")[0],a.application.m_to=c[3].split("-")[1])}a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})})["catch"](function(a){f.error(a)})},a.getQueues=function(){return l.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){f.error(a)})},a.getAgents=function(){return m.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){f.error(a)})},a.getIntervals=function(){return n.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){f.error(a)})},a.getSmsAccounts=function(){return q.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getTemplates=function(){return o.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.getMailAccounts=function(){return p.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})},a.updateItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var g,h,i,j,l;g=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(h=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(h+="-"+a.application.wd_to)):h="*",a.application.md_from&&"always"!==a.application.md_from?(i=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(i+="-"+a.application.md_to)):i="*",a.application.m_from&&"always"!==a.application.m_from?(j=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(j+="-"+a.application.m_to)):j="*",l=g+","+h+","+i+","+j,a.application.interval=l,a.application.IntervalId=null}return k.update({websiteId:c.websiteId,controller:"applications",id:c.actionId},a.application).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success"),e.path("/channels/chat/websites/view/"+c.websiteId+"/actions/list")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.actions.view",{url:"/view/:actionId",templateUrl:"app/channels/chat/website/view/action/view/view.html",controller:"ChatWebsiteViewActionViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewActionWizardCtrl",["$scope","$http","Agent","Interval","ChatQueue","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","ChatWebsite","Template","MailAccount","SmsAccount",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"SendSMS",value:"sendSms"}],a.$application=l.application,a.$stateParams=f,a.$interval=m.interval,a.forms={},a.application={app:"queue",intType:"always",alwaysTime:!0},a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})},a.getQueues=function(){return e.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return c.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){i.error(a)})},a.getIntervals=function(){return d.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){i.error(a)})},a.getSmsAccounts=function(){return q.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getTemplates=function(){return o.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.getMailAccounts=function(){return p.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})},a.createItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var c,d,e,j,k;c=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(d=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(d+="-"+a.application.wd_to)):d="*",a.application.md_from&&"always"!==a.application.md_from?(e=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(e+="-"+a.application.md_to)):e="*",a.application.m_from&&"always"!==a.application.m_from?(j=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(j+="-"+a.application.m_to)):j="*",k=c+","+d+","+e+","+j,a.application.interval=k,a.application.IntervalId=null}return n.save({websiteId:f.websiteId,controller:"applications"},a.application).$promise.then(function(){i.show(g.instant("MESSAGE_WELL_DONE"),"success"),h.path("/channels/chat/websites/view/"+f.websiteId+"/actions/list")})["catch"](function(a){i.error(a)})},a.formValidation=function(a){return a},a.next=function(){j.wizard().next()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.actions.wizard",{url:"/wizard",templateUrl:"app/channels/chat/website/view/action/wizard/wizard.html",controller:"ChatWebsiteViewActionWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("ChatDisposition",["$resource",function(a){return a("/api/chat/dispositions/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewModalDispositionAddCtrl",["$scope","$uibModalInstance","ChatWebsite","id","xAlert","$translate",function(a,b,c,d,e,f){a.ok=function(){return c.save({websiteId:d,controller:"dispositions"},{name:a.name}).$promise.then(function(a){b.close(a)})["catch"](function(a){e.show(f.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteDispositionViewCtrl",["$scope","$stateParams","$uibModal","$translate","ChatWebsite","xAlert",function(a,b,c,d,e,f){a.initView=function(){return e.get({websiteId:b.websiteId,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.updateDisposition=function(a,c){return e.update({websiteId:b.websiteId,controller:"dispositions",id:a},{name:c}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.deleteDisposition=function(c){return console.log("delete"),e.remove({websiteId:b.websiteId,controller:"dispositions",id:c}).$promise.then(function(){_.remove(a.dispositions,{id:c})})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addDisposition=function(){return c.open({animation:!0,templateUrl:"app/channels/chat/website/view/disposition/modal/add.modal.html",controller:"ChatWebsiteViewModalDispositionAddCtrl",resolve:{id:function(){return b.websiteId}}}).result.then(function(b){b&&a.dispositions.push(b)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.dispositions",{url:"/dispositions",controller:"ChatWebsiteDispositionViewCtrl",templateUrl:"app/channels/chat/website/view/disposition/view/view.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.embedding",{url:"/embedding",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewEmbeddingViewCtrl",["$scope","$stateParams","$translate","clipboard","xAlert","ChatWebsite",function(a,b,c,d,e,f){a.initView=function(){return f.get({websiteId:b.websiteId,controller:"snippet"}).$promise.then(function(b){a.snippetCode=b.html})["catch"](function(a){e.error(a)})},a.copyToClipboard=function(){d.copyText(a.snippetCode),e.show(c.instant("MESSAGE_TEXT_COPIED_CLIPBOARD")+"!","success")}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.embedding.view",{url:"/view",templateUrl:"app/channels/chat/website/view/embedding/view/view.html",controller:"ChatWebsiteViewEmbeddingViewCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.form",{url:"/forms",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewFormViewCtrl",["$scope","$builder","$validator","$stateParams","$translate","ChatWebsite","xAlert",function(a,b,c,d,e,f,g){a.saveForm=function(a){var c=angular.copy(b.forms[a]);return c.length>3?g.show("You can insert at least 3 input elements","danger"):(_.forEach(c,function(a){delete a.id}),f.updateFields({websiteId:d.websiteId,controller:"fields",id:a},c).$promise.then(function(){g.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.error(a)}))},a.getChatWebsiteFields=function(a){return f.query({websiteId:d.websiteId,controller:"fields",id:a}).$promise.then(function(c){_.forEach(c,function(c){b.addFormObject(a,c)})})["catch"](function(a){g.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.form.view",{url:"/view",templateUrl:"app/channels/chat/website/view/form/view/view.html",controller:"ChatWebsiteViewFormViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteHooksViewCtrl",["$scope","ChatWebsite","Pause","$http","$stateParams","$translate","$location","xAlert",function(a,b,c,d,e,f,g,h){a.account={},a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.initView=function(){a.types=[{value:"",name:"-- None --"},{name:"HTTP GET",value:"GET"},{name:"HTTP POST",value:"POST"}],c.get().$promise.then(function(b){a.pauses=b.rows})["catch"](function(a){h.error(a)}),b.get({id:e.websiteId}).$promise.then(function(b){console.log(b),a.account=b,a.account.actions.length<1&&a.account.actions.push({action:"pause",enabled:!1,type:null})})["catch"](function(a){h.error(a)})},a.resetActionData=function(a){a.type=null},a.updateItem=function(){return console.log(a.account),b.update({id:e.websiteId},a.account).$promise.then(function(){h.show(f.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.hooks",{url:"/hooks",controller:"ChatWebsiteHooksViewCtrl",templateUrl:"app/channels/chat/website/view/hooks/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewProactiveListCtrl",["$scope","gridOptions","ChatWebsite","$http","$translate","$stateParams","$uibModal",function(a,b,c,d,e,f,g){a.initProactiveActions=function(){var d={exporterCsvFilename:"telephones.csv",columnDefs:[{name:"name"},{name:"type"},{name:"action",width:125,buttons:[{"class":"blue-hoki",onClick:"grid.appScope.createItem(row.entity)",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a,{websiteId:f.websiteId,controller:"proactive"})},a.createItem=function(b){var c=g.open({animation:!0,templateUrl:"app/channels/chat/website/view/proactive/list/list.create.modal.html",controller:"ChatWebsiteProactiveListCreateCtrl",resolve:{item:b}});c.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteProactiveListCreateCtrl",["$scope","$translate","$uibModalInstance","$stateParams","ChatWebsite","xAlert","item",function(a,b,c,d,e,f,g){a.form={},a.item=g||{},a.title=g?b.instant("APPLICATION_EDIT_PROACTIVE_ACTION"):b.instant("APPLICATION_NEW_PROACTIVE_ACTION"),a.possibleType=[{type:"mouseOver",title:"Mouse Over"},{type:"timeout",title:"Timeout"}],a.save=function(){return g?e.update({websiteId:d.websiteId,controller:"proactive",id:a.item.id},a.item).$promise.then(function(a){f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){f.error(a)}):e.save({websiteId:d.websiteId,controller:"proactive"},a.item).$promise.then(function(a){f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){f.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.proactive.list",{url:"/list",templateUrl:"app/channels/chat/website/view/proactive/list/list.html",controller:"ChatWebsiteViewProactiveListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.proactive",{url:"/proactive",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteSettingViewCtrl",["$scope","$stateParams","$translate","$location","$timeout","socket","xAlert","ChatWebsite","List",function(a,b,c,d,e,f,g,h,i){a.initView=function(){return i.get().$promise.then(function(b){a.lists=b.rows})["catch"](function(a){console.error(a)})},a.updateItemChatWebsite=function(){return h.update({id:b.websiteId},{ListId:a.chatWebsite.ListId}).$promise.then(function(){g.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.settings",{url:"/settings",controller:"ChatWebsiteSettingViewCtrl",templateUrl:"app/channels/chat/website/view/setting/view/view.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.snippet",{url:"/snippet",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewSnippetViewCtrl",["$scope","$http","$stateParams","$translate","Template","$rootScope","FileUploader","$cookieStore","xAlert","ChatWebsite",function(a,b,c,d,e,f,g,h,i,j){a.$translate=d,a.statePreview={state:"online"},a.radioSwitch={isActive:!!f.license.custom,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"};var k=a.uploader=new g({url:"api/chat/websites/"+c.websiteId+"/logo",queueLimit:1,withCredentials:!0,headers:{Authorization:"Bearer "+h.get("token")}});k.filters.push({name:"imageFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|jpg|png|jpeg|".indexOf(b)}}),k.onSuccessItem=function(b,c){a.chatWebsite.logo=c.logo,i.show(d.instant("MESSAGE_WELL_DONE"),"success")},k.onErrorItem=function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},k.onCompleteAll=function(){k.clearQueue()},a.enquirySwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.fidelitySwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.lang={HeaderCurrentlyChatting:"Live Chat",HeaderOffline:"Contact us",
+OperatorOfflineMessage:"It appears as if all operators are currently offline.",OfflineMessage:"<strong>We're not online.</strong><br/>It doesn't mean we're not there to help - leave your message below and we'll be in touch as soon as possible.",EnquiryMessagePlaceholder:"Your message...",EnquiryButtonText:"Leave message",EnquirySubmitSuccess:"Your message was sucessfully submitted - we will contact you as soon as possible.",OperatorComposing:"{fullname} is typing...",FirstMessageText:"",ExitChatButtonText:"Exit Chat",ExitChatQuestionText:"Are you sure?",ExitChatButtonConfirmText:"Yes",ExitChatButtonCancelText:"No",MessagePlaceholderText:"Your message...",MessageSendButtonText:"Send",ValidationEmailRequired:"Please enter your email address",ValidationEmailInvalid:"Please enter a valid email address",ValidationEmailMaxLength:"The email address may not exceed 85 characters",ValidationUsernameRequired:"Please enter your name",ValidationUsernameMaxLength:"The name may not exceed 45 characters",ValidationEnquiryRequired:"Please enter your enquiry",ValidationEnquiryMaxLength:"The enquiry may not exceed 1500 characters",ValidationMessageRequired:"Please enter your message",ValidationMessageMaxLength:"The message may not exceed 750 characters"},a.initView=function(){return j.get({id:c.websiteId}).$promise.then(function(b){return a.chatWebsite=b,e.get().$promise}).then(function(b){a.templates=b.rows})["catch"](function(a){i.error(a)})},a.updateItem=function(){return j.update({id:a.chatWebsite.id},a.chatWebsite).$promise.then(function(){i.show(d.instant("MESSAGE_CHAT_WEBSITE_UPDATE_SUCCESS")+"!","success")})["catch"](function(a){i.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view.snippet.view",{url:"/view",templateUrl:"app/channels/chat/website/view/snippet/view/view.html",controller:"ChatWebsiteViewSnippetViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteViewCtrl",["$scope","xAlert","$http","$location","$stateParams","$translate","WizardHandler","ChatApplication","ChatWebsite",function(a,b,c,d,e,f,g,h,i){a.initView=function(){return i.get({id:e.websiteId}).$promise.then(function(b){a.chatWebsite=b})["catch"](function(a){b.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.view",{url:"/view/:websiteId",templateUrl:"app/channels/chat/website/view/view.html",controller:"ChatWebsiteViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites",{url:"/websites",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:29}}})}]),angular.module("xCallyShuttleApp").controller("ChatWebsiteWizardCtrl",["$scope","$http","$location","$translate","WizardHandler","xAlert","ChatWebsite",function(a,b,c,d,e,f,g){a.$translate=d,a.next=function(){e.wizard().next()},a.exitValidation=function(a){return a},a.initWizard=function(){a.forms={formSetting:void 0,formAppearance:void 0,formLabel:void 0,formFunctionality:void 0},a.item={},a.item.remote=c.protocol()+"://"+location.host,a.item.color="#000080",a.item.color_focus="#000080",a.item.color_button="#000080",a.item.header_shape="rounded",a.item.animation=!0,a.item.header_online="We are here!",a.item.online_message="<strong>Questions?</strong><br />Insert your name and email address to start a live-chat with our support team.",a.item.name_title="Name",a.item.username_placeholder="Your name",a.item.email_title="Email Address",a.item.email_placeholder="Your e-mail address",a.item.start_chat_button="Chat",a.item.rating_message="Would you like rate this chat?",a.item.rating_send="Send",a.item.rating_skip="Skip",a.item.header_offline="Contact us",a.item.offline_message="<strong>We're not online.</strong><br />It doesn't mean we're not there to help - leave your message below and we'll be in touch as soon as possible.",a.item.message_title="Message",a.item.enquiry_message_placeholder="Your message...",a.item.enquiry_button="Leave message",a.item.agents_busy="In this moment all agents are busy. Try again!",a.item.download_transcript=!0},a.createItem=function(){return g.save(a.item).$promise.then(function(){f.show(d.instant("MESSAGE_CHAT_WEBSITE_CREATE_SUCCESS"),"success"),c.path("/channels/chat/websites/list")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.chat.websites.wizard",{url:"/wizard",templateUrl:"app/channels/chat/website/wizard/wizard.html",controller:"ChatWebsiteWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts",{url:"/accounts",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:38}}})}]),angular.module("xCallyShuttleApp").controller("FaxAccountListCtrl",["$scope","$uibModal","gridOptions","FaxAccount",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"chat_websites.csv",columnDefs:[{name:"name"},{name:"description"},{name:"localstationid"},{name:"TrunkName",displayName:"APPLICATION_TRUNK"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/fax/accounts/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(d,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/channels/fax/account/list/list.create.modal.html",controller:"FaxAccountListCreateCtrl"});c.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("FaxAccountListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","FaxAccount","Trunk",function(a,b,c,d,e,f){a.initWizard=function(){return a.form={},a.item={},a.trunks=[],f.get().$promise.then(function(b){a.trunks=b.rows})["catch"](function(a){d.error(a)})},a.save=function(){return e.save(a.item).$promise.then(function(a){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close(a)})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.list",{url:"/list",templateUrl:"app/channels/fax/account/list/list.html",controller:"FaxAccountListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.view.actions",{url:"/actions",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("FaxAccountViewActionListCtrl",["$scope","gridOptions","FaxAccount","$http","$translate","$stateParams",function(a,b,c,d,e,f){a.initActons=function(){var d={draggable:!0,exporterCsvFilename:"fax_applications.csv",enableSorting:!1,enableFiltering:!1,columnDefs:[{name:"app",cellClass:"text-center"},{name:"name",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span>{{row.entity.app == "queue" ? row.entity.FaxQueue.name : row.entity.User.name}}</span></div>'},{name:"timeout",cellClass:"text-center"},{name:"interval",displayName:"APPLICATION_TIME_INTERVAL",cellClass:"text-center",cellTemplate:"<div><span>{{row.entity.Interval ? row.entity.Interval.name : row.entity.interval}}</span></div>"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/fax/accounts/view/{{row.entity.FaxAccountId}}/actions/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.app, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a,{accountId:f.accountId,controller:"applications"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.view.actions.list",{url:"/list",templateUrl:"app/channels/fax/account/view/action/list/list.html",controller:"FaxAccountViewActionListCtrl"})}]),angular.module("xCallyShuttleApp").controller("FaxAccountViewActionViewCtrl",["$scope","$http","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","Agent","Interval","FaxQueue","FaxAccount","Template","MailAccount","SmsAccount",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initAction=function(){return a.$application=i.application,a.$stateParams=c,a.$interval=j.interval,a.forms={},a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"SendSMS",value:"sendSms"}],n.get({accountId:c.accountId,controller:"applications",id:c.actionId}).$promise.then(function(b){if(a.application=b,a.application.alwaysTime=!1,a.application.IntervalId)a.application.intType="list";else switch(a.application.interval){case"*,*,*,*":a.application.intType="always";break;default:a.application.intType="custom"}if("always"===a.application.intType||"custom"===a.application.intType){var c=a.application.interval.split(",");"*"===c[0]?a.application.alwaysTime=!0:(a.application.t_from=moment(new Date),a.application.t_to=moment(new Date),a.application.t_from.hour(c[0].split("-")[0].split(":")[0]),a.application.t_from.minute(c[0].split("-")[0].split(":")[1]),a.application.t_to.hour(c[0].split("-")[1].split(":")[0]),a.application.t_to.minute(c[0].split("-")[1].split(":")[1])),"*"===c[1]?(a.application.wd_from="always",a.application.wd_to="always"):(a.application.wd_from=c[1].split("-")[0],a.application.wd_to=c[1].split("-")[1]),"*"===c[2]?(a.application.md_from="always",a.application.md_to="always"):(a.application.md_from=c[2].split("-")[0],a.application.md_to=c[2].split("-")[1]),"*"===c[3]?(a.application.m_from="always",a.application.m_to="always"):(a.application.m_from=c[3].split("-")[0],a.application.m_to=c[3].split("-")[1])}a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})})["catch"](function(a){f.error(a)})},a.getQueues=function(){return m.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return k.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return l.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.getSmsAccounts=function(){return q.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getTemplates=function(){return o.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.getMailAccounts=function(){return p.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})},a.updateItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var g,h,i,j,k;g=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(h=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(h+="-"+a.application.wd_to)):h="*",a.application.md_from&&"always"!==a.application.md_from?(i=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(i+="-"+a.application.md_to)):i="*",a.application.m_from&&"always"!==a.application.m_from?(j=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(j+="-"+a.application.m_to)):j="*",k=g+","+h+","+i+","+j,a.application.interval=k,a.application.IntervalId=null}return n.update({accountId:c.accountId,controller:"applications",id:c.actionId},a.application).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success"),e.path("/channels/fax/accounts/view/"+c.accountId+"/actions/list")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.view.actions.view",{url:"/view/:actionId",templateUrl:"app/channels/fax/account/view/action/view/view.html",controller:"FaxAccountViewActionViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("FaxAccountViewActionWizardCtrl",["$scope","$http","Agent","FaxQueue","Interval","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","FaxAccount","Template","MailAccount","SmsAccount",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"SendSMS",value:"sendSms"}],a.$application=l.application,a.$stateParams=f,a.$interval=m.interval,a.forms={},a.application={alwaysTime:!0},a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})},a.getQueues=function(){return d.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return c.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return e.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.getSmsAccounts=function(){return q.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getTemplates=function(){return o.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.getMailAccounts=function(){return p.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})},a.createItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var c,d,e,j,k;c=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(d=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(d+="-"+a.application.wd_to)):d="*",a.application.md_from&&"always"!==a.application.md_from?(e=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(e+="-"+a.application.md_to)):e="*",a.application.m_from&&"always"!==a.application.m_from?(j=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(j+="-"+a.application.m_to)):j="*",k=c+","+d+","+e+","+j,a.application.interval=k,a.application.IntervalId=null}return n.save({accountId:f.accountId,controller:"applications"},a.application).$promise.then(function(){i.show(g.instant("MESSAGE_WELL_DONE"),"success"),h.path("/channels/fax/accounts/view/"+f.accountId+"/actions/list")})["catch"](function(a){i.error(a)})},a.formValidation=function(a){return a},a.next=function(){j.wizard().next()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.view.actions.wizard",{url:"/wizard",templateUrl:"app/channels/fax/account/view/action/wizard/wizard.html",controller:"FaxAccountViewActionWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("FaxDisposition",["$resource",function(a){return a("/api/fax/dispositions/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("FaxInboxViewModaDispositionAddCtrl",["$scope","$uibModalInstance","FaxAccount","id","xAlert",function(a,b,c,d,e){a.ok=function(){return c.save({accountId:d,controller:"dispositions"},{name:a.name}).$promise.then(function(a){b.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("FaxAccountDispositionViewCtrl",["$scope","$stateParams","$uibModal","$translate","FaxAccount","xAlert",function(a,b,c,d,e,f){a.initView=function(){return e.get({accountId:b.accountId,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){f.error(a)})},a.updateDisposition=function(a,c){return e.update({accountId:b.accountId,controller:"dispositions",id:a},{name:c}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){f.error(a)})},a.deleteDisposition=function(c){return e.remove({accountId:b.accountId,controller:"dispositions",id:c}).$promise.then(function(){_.remove(a.dispositions,{id:c})})["catch"](function(a){f.error(a)})},a.addDisposition=function(){return c.open({animation:!0,templateUrl:"app/channels/fax/account/view/disposition/modal/add.modal.html",controller:"FaxInboxViewModaDispositionAddCtrl",resolve:{id:function(){return b.accountId}}}).result.then(function(b){b&&a.dispositions.push(b)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.view.dispositions",{url:"/dispositions",controller:"FaxAccountDispositionViewCtrl",templateUrl:"app/channels/fax/account/view/disposition/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("FaxAccountHooksViewCtrl",["$scope","FaxAccount","Pause","$http","$stateParams","clipboard","$translate","$location","xAlert","List",function(a,b,c,d,e,f,g,h,i,j){a.account={},a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.initView=function(){a.types=[{value:"",name:"-- None --"},{name:"HTTP GET",value:"GET"},{name:"HTTP POST",value:"POST"}],c.get().$promise.then(function(b){a.pauses=b.rows})["catch"](function(a){i.error(a)}),b.get({id:e.accountId}).$promise.then(function(b){a.account=b,a.account.actions.length<1&&a.account.actions.push({action:"pause",enabled:!1,type:null})})["catch"](function(a){i.error(a)})},a.resetActionData=function(a){a.type=null},a.updateItemFaxAccount=function(){return console.log(a.account),b.update({id:e.accountId},a.account).$promise.then(function(){i.show(g.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){i.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.view.hooks",{url:"/hooks",controller:"FaxAccountHooksViewCtrl",templateUrl:"app/channels/fax/account/view/hooks/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("FaxAccountSettingViewCtrl",["$scope","$stateParams","$translate","FaxAccount","List","Trunk","xAlert",function(a,b,c,d,e,f,g){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initView=function(){return a.rate=["2400","4800","7200","9600","12000","14400"],a.techs=["SIP","IAX","DADHI","KHOMP"],f.get().$promise.then(function(b){a.trunks=b.rows})["catch"](function(a){g.error(a)}),e.get().$promise.then(function(b){a.lists=b.rows})["catch"](function(a){g.error(a)}),d.get({id:b.accountId}).$promise.then(function(b){a.account=b})["catch"](function(a){g.error(a)})},a.updateItemFaxAccount=function(){return d.update({id:b.accountId},a.account).$promise.then(function(){g.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.view.settings",{url:"/settings",controller:"FaxAccountSettingViewCtrl",templateUrl:"app/channels/fax/account/view/setting/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("FaxAccountViewCtrl",["$scope","$http","$stateParams","$translate","$location","WizardHandler","socket","xAlert","Modal","FaxAccount",function(a,b,c,d,e,f,g,h,i,j){a.initView=function(){return j.get({id:c.accountId}).$promise.then(function(b){a.account=b})["catch"](function(a){h.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.view",{url:"/view/:accountId",templateUrl:"app/channels/fax/account/view/view.html",controller:"FaxAccountViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}})}]),angular.module("xCallyShuttleApp").controller("FaxAccountWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler","Trunk","FaxAccount",function(a,b,c,d,e,f,g,h){a.translate=d,a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){return a.$translate=d,a.forms={},a.item={},a.rate=["2400","4800","7200","9600","12000","14400"],a.techs=["SIP","IAX","DADHI","KHOMP"],a.item.headerinfo="xCALLY Motion Fax",a.item.ecm="yes",a.item.minrate="4800",a.item.maxrate="14400",a.item.modem="v17,v27,v29",a.item.gateway="no",a.item.faxdetect="no",a.item.t38timeout=5e3,a.item.tech="SIP",g.get().$promise.then(function(b){a.trunks=b.rows})["catch"](function(a){e.error(a)})},a.next=function(){f.wizard().next()},a.previous=function(){f.wizard().previous()},a.exitValidation=function(a){return a},a.createItem=function(){return h.save(a.item).$promise.then(function(a){e.show(d.instant("MESSAGE_WELL_DONE"),"success"),c.path("/channels/fax/accounts/list")})["catch"](function(a){e.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.accounts.wizard",{url:"/wizard",templateUrl:"app/channels/fax/account/wizard/wizard.html",controller:"FaxAccountWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax",{url:"/fax",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:10}}})}]),angular.module("xCallyShuttleApp").factory("FaxAccount",["$resource",function(a){return a("/api/fax/accounts/:accountId/:controller/:id",{id:"@accountId"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("FaxAttachment",["$resource",function(a){return a("/api/fax/attachments/:id/:controller",{id:"@id"})}]),angular.module("xCallyShuttleApp").factory("FaxMessage",["$resource",function(a){return a("/api/fax/messages/:id/:controller",{id:"@id",controller:"@controller"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("FaxReport",["$resource",function(a){return a("/api/report/faxs/:id/:controller1/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("FaxRoom",["$resource",function(a){return a("/api/fax/rooms/:id/:controller",{id:"@id",controller:"@controller"},{update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.inbox",{url:"/inbox",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:40}}})}]),angular.module("xCallyShuttleApp").controller("FaxInboxInfoModalCtrl",["$scope","$translate","$uibModalInstance","$stateParams","xAlert","messageId","FaxMessage",function(a,b,c,d,e,f,g){a.data=null,a.initInfo=function(){g.get({id:f}).$promise.then(function(b){a.data={channel:b.channel,channelstate:b.channelstate,channelstatedesc:b.channelstatedesc,uniqueid:b.uniqueid,localstationid:b.localstationid,remotestationid:b.remotestationid,pagestransferred:b.pagestransferred,resolution:b.resolution,transferrate:b.transferrate,lastStatus:b.lastStatus,error:b.error,retry:b.retry}})["catch"](function(b){switch(b.status){case 404:a.data=null;break;default:e.error(b)}})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").directive("faxMessage",["$rootScope","$translate","$uibModal","FaxMessage","List","xAlert",function(a,b,c,d,e,f){return{restrict:"E",scope:{message:"=",listId:"="},templateUrl:"app/channels/fax/inbox/message/message.directive.html",link:function(g){g.openContact=function(c){return g.listId?e.save({listId:g.listId,controller:"contacts"},{fax:c}).$promise.then(function(b){var c=_.find(a.$root.workspaces,{contactID:b.id});c?c.active=!0:a.$root.workspaces.push({active:!0,"class":"icon-user",contactID:b.id,name:b.fax,type:"contact"})})["catch"](function(a){f.error(a)}):void f.show(b.instant("MESSAGE_NO_LIST_CONFIGURED"),"info")},g.info=function(a){c.open({animation:!0,templateUrl:"app/channels/fax/inbox/message/info.modal.html",controller:"FaxInboxInfoModalCtrl",resolve:{messageId:function(){return a.id}}})},g.retry=function(a){return d.update({id:a,status:"SENDING"}).$promise["catch"](function(a){console.error(a)})}}}}]),angular.module("xCallyShuttleApp").directive("faxNote",["$translate","Modal","Auth","FaxMessage","xAlert",function(a,b,c,d,e){return{restrict:"E",scope:{message:"="},templateUrl:"app/channels/fax/inbox/note/note.directive.html",link:function(f){f.Auth=c,f.deleteNote=b.confirm["delete"](function(){return d.remove({id:f.message.id}).$promise.then(function(){e.show(a.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){e.error(a)})})}}}]),angular.module("xCallyShuttleApp").controller("FaxInboxViewModalNoteCtrl",["$scope","$uibModalInstance","$translate","id","FaxRoom","xAlert",function(a,b,c,d,e,f){a.initModal=function(){a.item={}},a.ok=function(){return e.save({id:d,controller:"messages"},{text:a.item.text,status:"NOTE"}).$promise.then(function(){f.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})["finally"](function(){b.close()})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").directive("faxRoom",["$cookieStore","$translate","$uibModal","$timeout","FaxAccount","FaxRoom","FaxMessage","FileUploader","xAlert","usSpinnerService","socket","Tag","Auth","FaxAttachment","List",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){return{restrict:"E",scope:{workspace:"="},templateUrl:"app/channels/fax/inbox/room/room.directive.html",link:function(m){function p(a){if(a){var b=_.words(a),c=_.map(b,function(a){return a?a[0]:""});return c.join("").toUpperCase()}return!1}m.$on("$destroy",function(){}),m.initForm=function(){m.forms={compose:{}}},m.getContacts=function(a){return m.listId?o.get({listId:m.listId,controller:"contacts",fax:a}).$promise.then(function(a){return a.rows})["catch"](function(a){console.error(a)}):[]},m.setList=function(a){m.listId=a};var q=[];m.expanded=!0,m.modelOptions={debounce:{"default":500,blur:250},getterSetter:!0},m.panelLeft=null,m.panelRight="col-md-12",m.form={from:"",to:m.workspace.data&&m.workspace.data.to?m.workspace.data.to:"",disabled:!1},k.socket.on("fax_message:remove",function(a){_.remove(m.faxRoom.FaxMessages,{id:a.id})}),k.socket.on("fax_message:save",function(a){return m.workspace.id&&a.FaxRoomId==m.workspace.id?(m.workspace.active||m.workspace.unread++,g.get({id:a.id}).$promise.then(function(a){m.faxRoom||(m.faxRoom={FaxMessages:[]});var b=_.findIndex(m.faxRoom.FaxMessages,{id:a.id});b>-1?_.merge(m.faxRoom.FaxMessages[b],a):m.faxRoom.FaxMessages.unshift(a),m.panelLeft="col-md-6",m.panelRight="col-md-6"})["catch"](function(a){console.error(a)})):void 0});var r=m.uploader=new h({url:"api/fax/attachments",autoUpload:!0,withCredentials:!0,queueLimit:1,headers:{Authorization:"Bearer "+a.get("token")}});return r.filters.push({name:"uploadFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|pdf|tiff|tif".indexOf(b)}}),r.onWhenAddingFileFailed=function(a,c){switch(c.name){case"queueLimit":i.show(b.instant("MESSAGE_QUEUE_LIMIT_EXCEEDED"),"danger");break;case"uploadFilter":i.show(b.instant("MESSAGE_WRONG_FILE_FORMAT"),"danger");break;default:i.show(b.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")}},r.removeFromQueue=function(a){var c=this;return n["delete"]({id:a.basename}).$promise.then(function(){var b=c.getIndexOfItem(a),d=c.queue[b];d.isUploading&&d.cancel(),c.queue.splice(b,1),d._destroy(),c.progress=c._getTotalProgress(),q=_.reject(q,{basename:a.basename})})["catch"](function(){i.show(b.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},r.onErrorItem=function(){i.show(b.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},r.onSuccessItem=function(a,b){var c={path:b.path,name:b.name,basename:b.basename,type:b.type};a=_.merge(a,c),q.push(c)},m.getMessageMailId=function(a){var b=a.UserId?"imgFaxUserId"+a.UserId:"imgFaxVisitorId";return b+=m.faxRoom.id.toString()+a.id.toString()},m.togglePanelLeft=function(){m.panelLeft?(m.panelLeft=null,m.panelRight="col-md-12"):(m.panelLeft="col-md-6",m.panelRight="col-md-6")},m.closeRoom=function(){return c.open({animation:!0,templateUrl:"app/channels/fax/inbox/status/status.modal.html",controller:"FaxInboxStatusModalCtrl",resolve:{status:function(){return m.faxRoom.status},accountId:function(){return m.faxRoom.FaxAccount.id}}}).result.then(function(a){return f.update({id:m.workspace.id},a).$promise["catch"](function(a){i.error(a)})})},m.loadAgents=function(){c.open({animation:!0,templateUrl:"app/channels/fax/inbox/view/view.agents.modal.html",controller:"FaxInboxViewModalAgentCtrl",resolve:{roomId:function(){return m.workspace.id}}})},m.cancel=function(){m.form.disabled=!1,m.form.from="",m.form.to=""},m.loadNote=function(){c.open({animation:!0,templateUrl:"app/channels/fax/inbox/note/note.modal.html",controller:"FaxInboxViewModalNoteCtrl",resolve:{id:function(){return m.workspace.id}}})},m.getMessageFaxId=function(a){var b=a.UserId?"imgFaxUserId"+a.UserId:"imgFaxVisitorId";return b+=m.faxRoom.id.toString()+a.id.toString()},m.getMessageRoomAvatar=function(a,b,c,e){d(function(){var d=b?"#imgFaxUserId"+b:"#imgFaxVisitorId";d+=m.faxRoom.id.toString()+a.toString(),angular.element(d).avatar({useGravatar:!1,initials:e?[]:p(c),fallbackImage:e?"api/users/avatar/"+e:"api/users/avatar/unknown_avatar"})})},m.onChanged=function(){return f.update({id:m.workspace.id},{tags:m.form.tags}).$promise["catch"](function(a){i.error(a)})},m.sendFax=function(){j.spin("spinner-grid");var a={from:m.form.from,to:m.form.to[0].fax||"",status:"SENDING",FaxAttachments:q,FaxRoomId:m.faxRoom?m.faxRoom.id:null},c=_.find(m.faxAccounts,{localstationid:m.form.from});return c?e.save({accountId:c.id,controller:"send"},a).$promise.then(function(a){return r.queue=[],q=[],i.show(b.instant("MESSAGE_WELL_DONE"),"success"),m.SmsRoom?m.SmsRoom:f.get({id:"messages",controller:a.id}).$promise}).then(function(a){a&&(m.workspace.id=a.id,m.workspace.name=a.contact,m.faxRoom=a,m.panelLeft="col-md-6",m.panelRight="col-md-6",m.expanded=!1)})["catch"](function(a){i.error(a)})["finally"](function(){j.stop("spinner-grid")}):(console.log("Can not find account"),void j.stop("spinner-grid"))},l.get().$promise.then(function(a){m.tags=_.map(a.rows,"name")})["catch"](function(a){console.error(a)}),e.get().$promise.then(function(a){m.faxAccounts=a.rows})["catch"](function(a){console.error(a)}),m.workspace.id?(m.panelLeft="col-md-6",m.panelRight="col-md-6",f.get({id:m.workspace.id}).$promise.then(function(a){m.faxRoom=a,m.form.from=a.FaxAccount.localstationid,m.form.tags=a.tags,m.workspace.name=a.contact||"No number",m.expanded=!1;
+var b=_.findLast(a.FaxMessages,{status:"RECEIVED"});return b&&(m.form.to=[{fax:b.from}]),k.socket.on("fax_room:save",function(a){a.id===m.workspace.id&&_.merge(m.faxRoom,a)}),a})["catch"](function(a){i.error(a)})["finally"](function(){j.stop("spinner-grid"),m.form.disabled=!1})):(m.panelLeft=null,m.panelRight="col-md-12",j.stop("spinner-grid"),void 0)}}}]),angular.module("xCallyShuttleApp").controller("FaxInboxStatusModalCtrl",["$scope","$uibModalInstance","FaxAccount","status","accountId",function(a,b,c,d,e){a.modal={title:"APPLICATION_CONFIRM_CLOSE",text:"MESSAGE_ARE_YOU_SURE_YOU_WANT_TO_CLOSE_THE_FAX"},a.initDisposition=function(){return a.item={disposition:null,status:"CLOSED"},c.get({accountId:e,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a)})},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.inbox.view.account",{url:"/account/:id",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:10}}})}]),angular.module("xCallyShuttleApp").controller("FaxInboxViewAccountListCtrl",["$scope","$rootScope","$uibModal","$translate","$stateParams","$state","Tag","usSpinnerService","socket","FaxAccount","FaxRoom","gridOptions","uiGridConstants","Auth","Modal","xAlert","localStorageService","uibButtonConfig",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){a.openRoom=function(b){var c=_.find(a.workspaces,{id:b,type:"faxRoom"});return c?c.active=!0:a.workspaces.push({id:b,type:"faxRoom","class":"fa fa-fax",active:!0}),b&&"agent"===n.getCurrentUser().role&&"PENDING"!==a.query.status&&"CLOSED"!==a.query.status?k.patch({id:b},{status:"OPEN",openReason:"agent"}).$promise["catch"](function(a){console.error(a)}):void 0},a.getPage=function(){h.spin("spinner-grid");var b={accountId:e.id,controller:"rooms"};return a.query&&_.merge(b,a.query),j.query(b).$promise.then(function(b){q.set("faxAccountId",e.id),a.gridOptions.data=b,i.socket.on("fax_room:save",function(b){if(b.FaxAccountId==e.id){var c=_.find(a.gridOptions.data,{id:b.id});c?c.status!==b.status?_.remove(a.gridOptions.data,{id:b.id}):_.merge(c,b):a.query.status===b.status&&a.gridOptions.data.push(b)}}),i.socket.on("fax_room:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})})["catch"](function(a){p.error(a)})["finally"](function(){h.stop("spinner-grid")})},a.initView=function(){r.activeClass="green-haze",a.id=[],a.isAdmin=n.isAdmin(),a.isAgent=n.isAgent(),a.uncheckable=!1,a.query={status:q.get("faxStatus")?q.get("faxStatus"):"NEW",tags:q.get("faxTags")?q.get("faxTags"):[]},a.$watch("query.status",function(){q.set("faxStatus",a.query.status),a.getPage(a.query)},!0),j.get().$promise.then(function(b){a.faxAccounts=b.rows})["catch"](function(a){console.error(a)}),g.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)}),a.gridOptions={exporterCsvFilename:"fax_rooms.csv",enableRowHeaderSelection:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!1,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,enableSelectAll:!0,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,columnDefs:[{name:"lastEvent",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>           <span data-ng-class=\"{'icon-arrow-up font-green': row.entity.lastEvent === 'SENT',           'icon-arrow-up font-yellow': row.entity.lastEvent === 'SENDING',           'icon-arrow-down font-green': row.entity.lastEvent === 'RECEIVED',           'icon-close font-red': row.entity.lastEvent === 'FAILED',           'icon-question': !row.entity.lastEvent}\">           </span>           </div>",width:30,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"tags",displayName:"",headerCellTemplate:'<i class="icon-tag" style="margin-top: 8px; margin-left: 8px;"></i>',cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><i data-ng-class=\"row.entity.tags.length ? 'icon-tag' : ''\" title=\"{{row.entity.tags}}\"></i></div>",width:30,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"id",displayName:"Id",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>#{{row.entity.id}}</span></div>",width:75,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"contact",cellClass:"text-center"},{name:"disposition",displayName:"APPLICATION_DISPOSITION",headerCellFilter:"translate"},{name:"updatedAt",cellFilter:"date:'MM/dd/yyyy HH:mm'",width:120,enableSorting:!1,enableFiltering:!1,sort:{direction:m.DESC}},{name:"action",cellTemplate:'<div>           <a class="btn btn-icon-only font-green" data-ng-hide="row.entity.waiting" data-ng-click="grid.appScope.openRoom(row.entity.id, row.entity.contact)"><i class="fa fa-fax" aria-hidden="true"></i></a>           <a class="btn btn-icon-only font-red" data-ng-show="grid.appScope.isAdmin" data-ng-click="grid.appScope.deleteItem(row.entity.id, row.entity.id)"><i class="fa fa-trash" aria-hidden="true"></i>           </div>',enableSorting:!1,cellClass:"ui-grid-vcenter",width:70,enableFiltering:!1,enableColumnMenu:!1}],data:[],onRegisterApi:function(b){a.gridApi=b,a.gridApi.selection&&(a.gridApi.selection.on.rowSelectionChanged(a,function(b){b.isSelected?a.id.push(a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id):_.pull(a.id,a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id)}),a.gridApi.selection.on.rowSelectionChangedBatch(a,function(b){b[0].isSelected?a.id=_.union(a.id,_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id")):_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id").forEach(function(b){_.pull(a.id,b)})}))}},a.getPage(a.query)},a.onChanged=function(){q.set("faxTags",a.query.tags),a.getPage(a.query)},a.loadAgents=function(a){c.open({animation:!0,templateUrl:"app/channels/fax/inbox/view/view.agents.modal.html",controller:"FaxInboxViewModalAgentCtrl",resolve:{roomId:a}})},a.tagItems=function(){c.open({animation:!0,templateUrl:"app/channels/fax/inbox/view/view.tags.modal.html",controller:"FaxInboxViewModalTagCtrl",resolve:{id:function(){return a.id}}}).result.then(function(){a.gridApi.selection.clearSelectedRows(),a.id=[]})},a.deleteItem=o.confirm["delete"](function(b){var c={id:b};return k.remove(c).$promise.then(function(){a.getPage(),p.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})}),a.deleteItems=o.confirm["delete"](function(){var b={ids:a.id};return k["delete"](b).$promise.then(function(){a.getPage(),p.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})}),a.disposeItems=function(){return c.open({animation:!0,templateUrl:"app/channels/fax/inbox/status/status.modal.html",controller:"FaxInboxStatusModalCtrl",resolve:{status:function(){return null},accountId:function(){return e.id}}}).result.then(function(b){return k.patch({id:a.id},b).$promise.then(function(){a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.inbox.view.account.list",{url:"/list",templateUrl:"app/channels/fax/inbox/view/account/list/list.html",controller:"FaxInboxViewAccountListCtrl",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:10}}})}]),angular.module("xCallyShuttleApp").controller("FaxInboxViewModalAgentCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Agent","FaxRoom","xAlert","roomId",function(a,b,c,d,e,f,g,h){a.initModal=function(){a.agents=[],a.item={agents:[]},e.get().$promise.then(function(b){b.rows.forEach(function(b){a.agents.push(b)})})["catch"](function(a){console.error(a)}),f.query({id:h,controller:"agents"}).$promise.then(function(b){b.forEach(function(b){a.agents.push(b),a.item.agents.push(b.id)})})["catch"](function(a){console.error(a)}),a.modal={dismissable:!0,title:"APPLICATION_MESSAGE_SEND_RETRY",text:"MESSAGE_MESSAGE_SEND_RETRY",buttons:[{classes:"btn btn-success",text:"APPLICATION_RETRY",click:function(a){b.close(a)}},{classes:"btn default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]}},a.ok=function(){return f.update({id:h,controller:"agents",agents:a.item.agents}).$promise.then(function(){g.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close()})["catch"](function(a){console.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("FaxInboxViewCtrl",["$scope","$timeout","$location","localStorageService","FaxAccount","xAlert",function(a,b,c,d,e,f){a.initView=function(){return e.get().$promise.then(function(b){var e=null;a.faxAccounts=b.rows,a.faxAccounts.length&&(e="/channels/fax/inbox/view/account/"+(d.get("faxAccountId")||a.faxAccounts[0].id)+"/list"),e&&c.path(e)})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.inbox.view",{url:"/view",templateUrl:"app/channels/fax/inbox/view/view.html",controller:"FaxInboxViewCtrl",reload:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/inbox.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("FaxInboxViewModalStatusCtrl",["$scope","$uibModalInstance","$translate","$stateParams","$location","FaxRoom","xAlert","id","status",function(a,b,c,d,e,f,g,h,i){a.initModal=function(){a.modal={dismissable:!0,title:"APPLICATION_STATUS",html:"<p>"+c.instant("MESSAGE_CHANGE_STATUS")+"<strong> "+i+"</strong>?</p>",status:i,buttons:[{classes:"btn btn-success",text:"APPLICATION_CONFIRM",click:function(a){return f.update({id:h},{status:i}).$promise.then(function(){g.show(c.instant("MESSAGE_STATUS_UPDATE_SUCCESS"),"success"),b.close(a)})["catch"](function(a){g.error(a)})}},{classes:"btn default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]}}}]),angular.module("xCallyShuttleApp").controller("FaxInboxViewModalTagCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Tag","FaxRoom","xAlert","id",function(a,b,c,d,e,f,g,h){console.log(h),a.initModal=function(){return a.tags=[],a.item={tags:[]},a.modal={dismissable:!0,title:"APPLICATION_MESSAGE_SEND_RETRY",text:"MESSAGE_MESSAGE_SEND_RETRY",buttons:[{"class":"btn-success",text:"APPLICATION_TAG",click:function(){var d={status:!0};return f.patch({id:h},{tags:a.item.tags}).$promise["catch"](function(){d.status=!1,g.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){b.close(d)})}},{"class":"default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]},e.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").factory("FaxQueue",["$resource",function(a){return a("/api/fax/queues/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("FaxQueueListCtrl",["$scope","FaxQueue","gridOptions","Auth","$uibModal",function(a,b,c,d,e){a.initView=function(){a.Auth=d;var e={exporterCsvFilename:"fax_queues.csv",columnDefs:[{name:"name"},{name:"description"},{name:"strategy"},{name:"timeout"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/fax/queues/view/{{row.entity.id}}/settings",name:"settings"},{"class":"green-meadow",href:"/channels/fax/queues/view/{{row.entity.id}}/agents",name:"agents",hide:"user"===d.getCurrentUser().role},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,e,a)},a.createItem=function(){var b=e.open({animation:!0,templateUrl:"app/channels/fax/queue/list/list.create.modal.html",controller:"FaxQueueListCreateCtrl",size:"lg"});b.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("FaxQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","FaxQueue","Team","strategies",function(a,b,c,d,e,f,g){a.form={},a.strategies=g,a.item={penalty:0,agents:[]},a.getTeams=function(){return f.get({controller:"associations"}).$promise.then(function(b){a.teams=b.rows}).then(function(){ComponentsDropdowns.bindQueue(a.teams,[],function(){return{select:function(b){a.item.agents=_.union(a.item.agents,b)},deselect:function(b){a.item.agents=_.difference(a.item.agents,b)}}})})["catch"](function(a){console.error(a)})},a.save=function(){return e.save(a.item).$promise.then(function(a){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close(a)})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.queues.list",{url:"/list",templateUrl:"app/channels/fax/queue/list/list.html",controller:"FaxQueueListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.queues",{url:"/queues",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:39}}})}]),angular.module("xCallyShuttleApp").controller("FaxQueueViewCtrl",["$scope","$http","$translate","$stateParams","xAlert","FaxQueue","Team","Auth","strategies",function(a,b,c,d,e,f,g,h,i){a.Auth=h,a.strategies=i;var j=function(){return{select:function(b){return f.save({id:a.queue.id,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.error(a)})},deselect:function(b){return f["delete"]({id:a.queue.id,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.error(a)})}}};a.getQueue=function(){return f.get({id:d.id}).$promise.then(function(b){b.penalty=0,a.queue=b})["catch"](function(a){e.error(a)})},a.updateFaxQueue=function(){return f.update({id:d.id},{name:a.queue.name,description:a.queue.description,timeout:a.queue.timeout,strategy:a.queue.strategy}).$promise.then(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.error(a)})},a.getTeams=function(){return g.get({controller:"associations"}).$promise.then(function(b){return a.teams=b.rows,f.get({id:d.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindMailQueue(a.teams,_.map(b.rows,function(a){return{id:a.id,penalty:a.UserHasFaxQueue.penalty}}),j)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.queues.view",{url:"/view/:id",templateUrl:"app/channels/fax/queue/view/view.html",controller:"FaxQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.fax.queues.view.settings",{url:"/settings",templateUrl:"app/channels/fax/queue/view/view.settings.html"}).state("main.channels.fax.queues.view.agents",{url:"/agents",templateUrl:"app/channels/fax/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:41}}})}]),angular.module("xCallyShuttleApp").controller("FaxRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","FaxQueue","usSpinnerService","$q","uiGridConstants","Auth",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){function o(){return k.spin("grid-spinner"),g.get(t).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){q(a)})})["catch"](function(a){f.error(a)})["finally"](function(){k.stop("grid-spinner")})}function p(){e.socket.on("agent:save",function(b){b=b.newValues||b;var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});c&&(c.online=_.has(b,"online")?b.online:c.online,c.lastLoginAt=_.has(b,"lastLoginAt")?b.lastLoginAt:c.lastLoginAt,c.pause=_.has(b,"smsPause")?b.faxPause:c.faxPause,c.pauseType=_.has(b,"pauseType")?b.pauseType:c.pauseType,c.lastPauseAt=_.has(b,"lastPauseAt")?b.lastPauseAt:c.lastPauseAt,c.ipaddr=_.has(b,"ipaddr")?b.ipaddr:c.ipaddr,c.port=_.has(b,"port")?b.port:c.port,c.fullcontact=_.has(b,"fullcontact")?b.fullcontact:c.fullcontact,c.useragent=_.has(b,"useragent")?b.useragent:c.useragent,c.lastms=_.has(b,"lastms")?b.lastms:c.lastms,c.internal=_.has(b,"internal")?b.internal:c.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=_.has(b,"online")?b.online:a.online)}))}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_fax_queue:save",function(b){var c=_.includes(_.map(a.CurrentUser.PFaxQueues,"id"),b.FaxQueueId)||n.isAdmin();if(c){var d=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0});if(d){var e=a.gridOptions.data.indexOf(d);a.gridOptions.data.splice(e+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,queueId:b.FaxQueueId,agent:b.membername,online:d.online})}}}),e.socket.on("user_has_fax_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queueId:b.FaxQueueId})})}function q(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.faxPause,pauseType:b.pauseType,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.FaxQueues.forEach(function(c){a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,queueId:c.id,agent:b.name,online:b.online})})}function r(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.error(a)})}function s(){return j.get().$promise.then(function(b){a.faxQueues=b.rows,e.syncUpdates("fax_queue",a.faxQueues)})["catch"](function(a){f.error(a)})}a.faxQueues=[];var t={controller:"realtime",controller1:"fax",offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="fa" data-ng-class="{\'font-green\':row.entity.online, \'font-red\':!row.entity.online,\'fa-user\':row.entity.online,\'fa-user-times\':!row.entity.online}"></i> <span data-ng-if="row.entity.online" class="left-margin">(<css-timer start-time="row.entity.lastLoginAt"></css-timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"faxPause",width:300,displayName:"APPLICATION_PAUSE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.pause != null && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="fa fa-play font-green pointer-cursor left-margin" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="fa fa-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select> <span data-ng-if="row.entity.pause">({{row.entity.pauseType}})</span><span class="left-margin"><css-timer data-ng-if="row.entity.pause" start-time="row.entity.lastPauseAt"></css-timer></span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"PAUSED"},{value:"false",label:"NOT PAUSED"}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queueId" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queueId)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.faxQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){u(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){u(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){u(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?t.order=null:t.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),o()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){t.offset=(a-1)*b,t.limit=b,o()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?t[a.name]=a.filters[0].term:delete t[a.name]}),o()})}},o(),r(),s(),$timeout(function(){p()})};var u=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_fax_queue")}),a.pause=function(b,c,e){return e&&(a.pauseType=null),i.save({name:c,agent:b,type:e||"DEFAULT PAUSE",data4:e||"DEFAULT PAUSE",channel:"fax"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/fax/realtime/view/agent/queue.modal.add.html",controller:"FaxRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.faxQueues,function(b){return!!_.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})})}}});g.result.then(function(b){return i.save({name:"QueueAdd",agent:e,queues:_.filter(a.faxQueues,function(a){return _.includes(b.queues,a.id)}),channel:"fax",data1:e,data3:b.queues.join(","),data4:"fax"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queueId:b,channel:"fax",data1:a,data3:b,data4:"fax"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/fax/realtime/view/agent/agent.modal.info.html",controller:"FaxRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/fax/realtime/view/agent/agent.html",controller:"FaxRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("FaxRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("FaxRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("FaxRealtimeViewApplicationCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","ReportFaxSession","usSpinnerService","$q","uiGridConstants","$timeout",function(a,b,c,d,e,f,g,h,i,j,k){function l(){return h.spin("spinner-grid"),g.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){m(),h.stop("spinner-grid")})}function m(){e.socket.on("report_fax_session:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&k(function(){_.remove(a.gridOptions.data,{id:b.id})},1e4)):b.leaveAt||a.gridOptions.data.push(b)}),e.socket.on("report_fax_session:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})}a.moment=moment,a.initApplications=function(){a.gridOptions={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"uniqueid",displayName:"APPLICATION_UNIQUEID",headerCellFilter:"translate"},{name:"accountname",displayName:"APPLICATION_ACCOUNT",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span> <span data-ng-if="!row.entity.leaveAt">[<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</span></div>"},{name:"queuename",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.queuename || ''}}</span></div>"}],data:[],gridMenuTitleFilter:function(a){var b=i.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){n(a.gridOptions.data.length)})}},l()};var n=function(a){var b=a?30*a+60:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("report_fax_session")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.realtime.view.applications",{url:"/applications",templateUrl:"app/channels/fax/realtime/view/application/application.html",controller:"FaxRealtimeViewApplicationCtrl"})}]),angular.module("xCallyShuttleApp").controller("FaxRealtimeViewCtrl",["$scope","$state",function(a,b){a.agents=[{name:"Queues",link:"main.channels.fax.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.fax.realtime.view.agents.timeline"}],a.sessions=[{name:"Sessions",link:"main.channels.fax.realtime.view.sessions"}],a.tree={queues:[{name:"Queues",link:"main.channels.fax.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.fax.realtime.view.agents.timeline"}],sessions:[{name:"Sessions",link:"main.channels.fax.realtime.view.sessions"}]}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.fax.realtime.view",{url:"/view",templateUrl:"app/channels/fax/realtime/view/view.html",controller:"FaxRealtimeViewCtrl"})}]),angular.module("xCallyShuttleApp").factory("ReportFaxSession",["$resource",function(a){return a("/api/report/fax/sessions/:id/:controller/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("MailAccount",["$resource",function(a){return a("/api/mail/accounts/:accountId/:controller/:id",{id:"@accountId"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts",{url:"/accounts",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:34}}})}]),angular.module("xCallyShuttleApp").controller("MailAccountListCtrl",["$scope","$stateParams","gridOptions","MailAccount","socket",function(a,b,c,d,e){a.$on("$destroy",function(){e.unsyncUpdates("mail_server_in")}),a.initView=function(){e.socket.on("mail_server_in:save",function(b){var c=_.find(a.gridOptions.data,{id:b.MailAccountId});c&&(c.MailServerIn.state=b.state,c.MailServerIn.source=JSON.parse(b.source))});var f={exporterCsvFilename:"mail_accounts.csv",columnDefs:[{name:"name"},{name:"description"},{name:"address"},{name:"MailServerIn.state",width:100,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div>           <span data-ng-if="row.entity.MailServerIn" class="label label-sm" data-ng-class="row.entity.MailServerIn.state === \'CONNECTED\' ? \'label-success\' : \'label-danger\'">{{row.entity.MailServerIn.state}}</span>           <span data-ng-if="!row.entity.MailServerIn" class="label label-sm label-info" >{{\'APPLICATION_DISABLED\' | translate | uppercase}}</span>           </div>',displayName:"IMAP",enableSorting:!1,enableFiltering:!1},{name:"MailServerOut.state",width:110,cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span class=\"label label-sm\" data-ng-class=\"row.entity.MailServerOut.state === 'CONNECTED' ? 'label-success' : 'label-danger'\">{{row.entity.MailServerOut.state}}</span></div>",displayName:"SMTP",enableSorting:!1,enableFiltering:!1},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/mail/accounts/view/{{row.entity.id}}/settings",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(d,f,a,{accountId:b.accountId})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.list",{
+url:"/list",templateUrl:"app/channels/mail/account/list/list.html",controller:"MailAccountListCtrl"})}]),angular.module("xCallyShuttleApp").factory("MailServerIn",["$resource",function(a){return a("/api/mail/servers/in/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("MailServerOut",["$resource",function(a){return a("/api/mail/servers/out/:id/:controller",{id:"@id"},{update:{method:"PUT"},test:{method:"GET"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.actions",{url:"/actions",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("MailAccountViewActionListCtrl",["$scope","gridOptions","MailAccount","$http","$translate","$stateParams",function(a,b,c,d,e,f){a.initActons=function(){var d={draggable:!0,exporterCsvFilename:"mail_applications.csv",enableSorting:!1,enableFiltering:!1,columnDefs:[{name:"app",cellClass:"text-center"},{name:"name",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span>{{row.entity.app == "queue" ? row.entity.MailQueue.name : row.entity.User.name}}</span></div>'},{name:"timeout",cellClass:"text-center"},{name:"interval",displayName:"APPLICATION_TIME_INTERVAL",cellClass:"text-center",cellTemplate:"<div><span>{{row.entity.Interval ? row.entity.Interval.name : row.entity.interval}}</span></div>"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/mail/accounts/view/{{row.entity.MailAccountId}}/actions/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.app, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a,{accountId:f.accountId,controller:"applications"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.actions.list",{url:"/list",templateUrl:"app/channels/mail/account/view/action/list/list.html",controller:"MailAccountViewActionListCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailAccountViewActionViewCtrl",["$scope","$http","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","Agent","Interval","MailQueue","MailAccount","Template","SmsAccount",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initAction=function(){return a.$application=i.application,a.$stateParams=c,a.$interval=j.interval,a.forms={},a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"ReplyMail",value:"replyMail"},{name:"SendSMS",value:"sendSms"}],a.types=[{key:"APPLICATION_REPLY",value:"reply"},{key:"APPLICATION_REPLY_TO_ALL",value:"replyAll"}],n.get({accountId:c.accountId,controller:"applications",id:c.actionId}).$promise.then(function(b){if(a.application=b,a.application.alwaysTime=!1,a.application.IntervalId)a.application.intType="list";else switch(a.application.interval){case"*,*,*,*":a.application.intType="always";break;default:a.application.intType="custom"}if("always"===a.application.intType||"custom"===a.application.intType){var c=a.application.interval.split(",");"*"===c[0]?a.application.alwaysTime=!0:(a.application.t_from=moment(new Date),a.application.t_to=moment(new Date),a.application.t_from.hour(c[0].split("-")[0].split(":")[0]),a.application.t_from.minute(c[0].split("-")[0].split(":")[1]),a.application.t_to.hour(c[0].split("-")[1].split(":")[0]),a.application.t_to.minute(c[0].split("-")[1].split(":")[1])),"*"===c[1]?(a.application.wd_from="always",a.application.wd_to="always"):(a.application.wd_from=c[1].split("-")[0],a.application.wd_to=c[1].split("-")[1]),"*"===c[2]?(a.application.md_from="always",a.application.md_to="always"):(a.application.md_from=c[2].split("-")[0],a.application.md_to=c[2].split("-")[1]),"*"===c[3]?(a.application.m_from="always",a.application.m_to="always"):(a.application.m_from=c[3].split("-")[0],a.application.m_to=c[3].split("-")[1])}a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})})["catch"](function(a){console.error(a),f.error(a)})},a.getQueues=function(){return m.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return k.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return l.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.getTemplates=function(){return o.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.getMailAccounts=function(){return n.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getSmsAccounts=function(){return p.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.updateItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var g,h,i,j,k;g=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(h=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(h+="-"+a.application.wd_to)):h="*",a.application.md_from&&"always"!==a.application.md_from?(i=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(i+="-"+a.application.md_to)):i="*",a.application.m_from&&"always"!==a.application.m_from?(j=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(j+="-"+a.application.m_to)):j="*",k=g+","+h+","+i+","+j,a.application.interval=k,a.application.IntervalId=null}return n.update({accountId:c.accountId,controller:"applications",id:c.actionId},a.application).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success"),e.path("/channels/mail/accounts/view/"+c.accountId+"/actions/list")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.actions.view",{url:"/view/:actionId",templateUrl:"app/channels/mail/account/view/action/view/view.html",controller:"MailAccountViewActionViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailAccountViewActionWizardCtrl",["$scope","$http","Agent","Template","MailQueue","MailAccount","Interval","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","SmsAccount",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"ReplyMail",value:"replyMail"},{name:"SendSMS",value:"sendSms"}],a.types=[{key:"APPLICATION_REPLY",value:"reply"},{key:"APPLICATION_REPLY_TO_ALL",value:"replyAll"}],a.$application=n.application,a.$stateParams=h,a.$interval=o.interval,a.forms={},a.application={alwaysTime:!0},a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})},a.getQueues=function(){return e.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return c.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getTemplates=function(){return d.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.getSmsAccounts=function(){return p.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getMailAccounts=function(){return f.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return g.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.createItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var c,d,e,g,i;c=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(d=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(d+="-"+a.application.wd_to)):d="*",a.application.md_from&&"always"!==a.application.md_from?(e=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(e+="-"+a.application.md_to)):e="*",a.application.m_from&&"always"!==a.application.m_from?(g=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(g+="-"+a.application.m_to)):g="*",i=c+","+d+","+e+","+g,a.application.interval=i,a.application.IntervalId=null}return f.save({accountId:h.accountId,controller:"applications"},a.application).$promise.then(function(){j.path("/channels/mail/accounts/view/"+h.accountId+"/actions/list")})["catch"](function(a){console.error(a)})},a.formValidation=function(a){return a},a.next=function(){l.wizard().next()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.actions.wizard",{url:"/wizard",templateUrl:"app/channels/mail/account/view/action/wizard/wizard.html",controller:"MailAccountViewActionWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("MailDisposition",["$resource",function(a){return a("/api/mail/dispositions/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("MailInboxViewModaDispositionAddCtrl",["$scope","$uibModalInstance","MailAccount","id","xAlert","$translate",function(a,b,c,d,e,f){a.ok=function(){return c.save({accountId:d,controller:"dispositions"},{name:a.name}).$promise.then(function(a){b.close(a)})["catch"](function(a){e.show(f.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("MailAccountDispositionViewCtrl",["$scope","$stateParams","$uibModal","$translate","MailAccount","xAlert",function(a,b,c,d,e,f){a.initView=function(){return e.get({accountId:b.accountId,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.updateDisposition=function(a,c){return e.update({accountId:b.accountId,controller:"dispositions",id:a},{name:c}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.deleteDisposition=function(c){return console.log("delete"),e.remove({accountId:b.accountId,controller:"dispositions",id:c}).$promise.then(function(){_.remove(a.dispositions,{id:c})})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addDisposition=function(){return c.open({animation:!0,templateUrl:"app/channels/mail/account/view/disposition/modal/add.modal.html",controller:"MailInboxViewModaDispositionAddCtrl",resolve:{id:function(){return b.accountId}}}).result.then(function(b){b&&a.dispositions.push(b)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.dispositions",{url:"/dispositions",controller:"MailAccountDispositionViewCtrl",templateUrl:"app/channels/mail/account/view/disposition/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("MailAccountHooksViewCtrl",["$scope","MailAccount","Pause","$http","$stateParams","clipboard","$translate","$location","xAlert","List",function(a,b,c,d,e,f,g,h,i,j){a.account={},a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.initView=function(){a.types=[{value:"",name:"-- None --"},{name:"HTTP GET",value:"GET"},{name:"HTTP POST",value:"POST"}],c.get().$promise.then(function(b){a.pauses=b.rows})["catch"](function(a){i.error(a)}),b.get({id:e.accountId}).$promise.then(function(b){a.account=b,a.account.actions.length<1&&a.account.actions.push({action:"pause",enabled:!1,type:null})})["catch"](function(a){i.error(a)})},a.resetActionData=function(a){a.type=null},a.updateItemMailAccount=function(){return console.log(a.account),b.update({id:e.accountId},a.account).$promise.then(function(){i.show(g.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){i.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.hooks",{url:"/hooks",controller:"MailAccountHooksViewCtrl",templateUrl:"app/channels/mail/account/view/hooks/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("MailAccountOtherViewCtrl",["$scope","$rootScope","$stateParams","$translate","xAlert","MailAccount",function(a,b,c,d,e,f){a.initView=function(){return a.options={language:b.language,allowedContent:!0,entities:!1,skin:"office2013",contentsCss:"/assets/css/global/richparams.css",extraPlugins:"autogrow",autoGrow_minHeight:450,disableNativeSpellChecker:!1,toolbar:[{name:"clipboard",items:["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Table","HorizontalRule","SpecialChar"]},{name:"tools",items:["Maximize"]},{name:"document",items:["Source"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote"]},{name:"styles",items:["Styles","Format"]},"/",{name:"motion",items:["voice","chat","mail"]}]},f.get({id:c.accountId}).$promise.then(function(b){console.log(b),a.account=b})["catch"](function(a){e.error(a)})},a.updateItemMailAccount=function(){return f.update({id:c.accountId},{whiteLabel:a.account.whiteLabel,signature:a.account.signature}).$promise.then(function(){e.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.other",{url:"/other",controller:"MailAccountOtherViewCtrl",templateUrl:"app/channels/mail/account/view/other/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("MailAccountSettingViewCtrl",["$scope","$http","$stateParams","$translate","$location","$timeout","socket","xAlert","MailAccount","MailMessage","MailServerIn","MailServerOut","usSpinnerService","List","Template",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){a.imapDisabled=!1,a.smtpDisabled=!1,a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.$on("$destroy",function(){g.socket.removeAllListeners("mail_message:sent"),g.socket.removeAllListeners("mail_message:failed")}),a.initView=function(){return g.socket.on("mail_message:sent",function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success"),m.stop("spinner-grid")}),g.socket.on("mail_message:failed",function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger"),m.stop("spinner-grid")}),n.get().$promise.then(function(b){a.lists=b.rows})["catch"](function(a){console.error(a)}),o.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)}),i.get({id:c.accountId}).$promise.then(function(b){a.account=b,a.account.MailServerIn&&(a.account.MailServerIn.source=JSON.parse(a.account.MailServerIn.source),a.account.MailServerOut.source=JSON.parse(a.account.MailServerOut.source),g.socket.on("mail_server_in:state",function(b){if(b.id===a.account.MailServerIn.id)switch(a.account.MailServerIn.state=b.state,a.account.MailServerIn.source=JSON.parse(b.source),b.state){case"CONNECTING":break;default:m.stop("spinner-grid"),a.imapDisabled=!1}})),g.socket.on("mail_server_out:state",function(b){if(b.id===a.account.MailServerOut.id)switch(a.account.MailServerOut.state=b.state,a.account.MailServerOut.source=JSON.parse(b.source),b.state){case"CONNECTING":break;default:m.stop("spinner-grid"),a.smtpDisabled=!1}})})["catch"](function(a){h.error(a)})},a.updateItemMailAccount=function(){return i.update({id:c.accountId},{name:a.account.name,description:a.account.description,address:a.account.address,fidelity:a.account.fidelity,timeout:a.account.timeout,service:a.account.service,ListId:a.account.ListId,TemplateId:a.account.TemplateId}).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})},a.updateItemMailServerIn=function(){var b=angular.copy(a.account.MailServerIn);return delete b.source,m.spin("spinner-grid"),a.imapDisabled=!0,k.update({id:b.id},b).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})},a.updateItemMailServerOut=function(){var b=angular.copy(a.account.MailServerOut);return delete b.source,m.spin("spinner-grid"),a.smtpDisabled=!0,l.update({id:b.id},b).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})},a.test=function(){return m.spin("spinner-grid"),a.smtpDisabled=!0,l.update({id:a.account.MailServerOut.id},{state:"CONNECTING"}).$promise["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view.settings",{url:"/settings",controller:"MailAccountSettingViewCtrl",templateUrl:"app/channels/mail/account/view/setting/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("MailAccountViewCtrl",["$scope","$stateParams","MailAccount",function(a,b,c){a.initView=function(){return c.get({id:b.accountId}).$promise.then(function(b){a.account=b})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.view",{url:"/view/:accountId",controller:"MailAccountViewCtrl",templateUrl:"app/channels/mail/account/view/view.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}})}]),angular.module("xCallyShuttleApp").controller("MailAccountWizardCtrl",["$scope","$http","$location","$translate","WizardHandler","xAlert","MailAccount",function(a,b,c,d,e,f,g){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.forms={},a.item={MailServerIn:{port:993,ssl:!0,"delete":!1,protocol:"IMAP",filter:"UNSEEN",mailbox:"INBOX",keepalive:!0,authTimeout:5,connTimeout:10},MailServerOut:{port:465,ssl:!0}}},a.goNext=function(){e.wizard().next()},a.formValidation=function(a){return a},a.createItem=function(){return g.save(a.item).$promise.then(function(){c.path("/channels/mail/accounts/list")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.accounts.wizard",{url:"/wizard",templateUrl:"app/channels/mail/account/wizard/wizard.html",controller:"MailAccountWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.inbox",{url:"/inbox",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:36}}})}]),angular.module("xCallyShuttleApp").controller("MailInboxInfoModalCtrl",["$scope","$translate","$uibModalInstance","$stateParams","xAlert","uniqueId","ReportSquare",function(a,b,c,d,e,f,g){a.data=null,a.initInfo=function(){g.get({controller:"show",uniqueid:f}).$promise.then(function(b){a.data={id:b.id,channel:b.channel,uniqueid:b.uniqueid,callerid:b.callerid,calleridname:b.calleridname,project_name:b.project_name,extension:b.extension}})["catch"](function(b){switch(b.status){case 404:a.data=null;break;default:e.error(b)}})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").directive("mailMessage",["$rootScope","$translate","MailMessage","List","xAlert","Lightbox","$uibModal",function(a,b,c,d,e,f,g){return{restrict:"E",scope:{message:"=",listId:"="},templateUrl:"app/channels/mail/inbox/message/message.directive.html",link:function(h){h.openPreview=function(a){f.openModal(["api/mail/attachments/"+a],0)},h.openContact=function(c){return h.listId?d.save({listId:h.listId,controller:"contacts"},{email:c}).$promise.then(function(b){var c=_.find(a.$root.workspaces,{contactID:b.id});c?c.active=!0:a.$root.workspaces.push({active:!0,"class":"icon-user",contactID:b.id,name:b.email,type:"contact"})})["catch"](function(a){console.error(a)}):void e.show(b.instant("MESSAGE_NO_LIST_CONFIGURED"),"info")},h.info=function(a){g.open({animation:!0,templateUrl:"app/channels/mail/inbox/message/info.modal.html",controller:"MailInboxInfoModalCtrl",resolve:{uniqueId:function(){return a}}})},h.retry=function(a){return c.update({id:a,status:"SENDING"}).$promise["catch"](function(a){console.error(a)})}}}}]),angular.module("xCallyShuttleApp").directive("mailNote",["$translate","Modal","Auth","MailMessage","xAlert",function(a,b,c,d,e){return{restrict:"E",scope:{message:"="},templateUrl:"app/channels/mail/inbox/note/note.directive.html",link:function(f){f.Auth=c,f.deleteNote=b.confirm["delete"](function(){return d.remove({id:f.message.id}).$promise.then(function(){e.show(a.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){e.error(a)})})}}}]),angular.module("xCallyShuttleApp").controller("MailInboxViewModalNoteCtrl",["$scope","$uibModalInstance","$translate","id","MailRoom","xAlert",function(a,b,c,d,e,f){a.initModal=function(){a.item={}},a.ok=function(){return e.save({id:d,controller:"messages",controller2:"send"},{text:a.item.text,status:"NOTE"}).$promise.then(function(){f.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(){f.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){b.close()})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").directive("mailRoom",["$rootScope","$cookieStore","$translate","$uibModal","$timeout","Tag","CannedAnswer","MailAttachment","List","MailAccount","MailRoom","MailMessage","FileUploader","xAlert","usSpinnerService","socket","Auth",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){return{restrict:"E",scope:{workspace:"="},templateUrl:"app/channels/mail/inbox/room/room.directive.html",link:function(e){function r(a){var b="";return e.mailRoom.MailAccount.signature&&(b+="<br>"+e.mailRoom.MailAccount.signature),a?b+"<br><blockquote>"+a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/\n/g,"<br>")+"</blockquote>":void 0}e.onCKReady=function(a){e.ckEditorInstance=a},e.$on("$destroy",function(){console.log("mailRoom directive $destroy")});var s=[];e.user=q.getCurrentUser(),e.getContacts=function(a){return e.listId?i.get({listId:e.listId,controller:"contacts",email:a}).$promise.then(function(a){return a.rows})["catch"](function(a){console.error(a)}):[]},e.setList=function(a){e.listId=a},e.options={language:a.language,allowedContent:!0,entities:!1,skin:"office2013",extraPlugins:"autogrow",autoGrow_minHeight:600,autoGrow_maxHeight:600,disableNativeSpellChecker:!1,toolbar:[{name:"clipboard",items:["Cut","Copy","Paste","-","Undo","Redo"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Table","HorizontalRule","SpecialChar"]},{name:"tools",items:["Maximize"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote"]},{name:"styles",items:["Styles","Format"]}]},e.expanded=!0,e.modelOptions={debounce:{"default":500,blur:250},getterSetter:!0},e.panelLeft=null,e.panelRight="col-md-12",e.forms={},e.form={from:[],to:e.workspace.data&&e.workspace.data.to?[e.workspace.data.to]:[],cc:[],bcc:[],tags:[],html:"",disabled:!1},p.socket.on("mail_message:remove",function(a){_.remove(e.mailRoom.MailMessages,{id:a.id})}),p.socket.on("mail_message:save",function(a){return e.workspace.id&&a.MailRoomId==e.workspace.id?(e.workspace.active||e.workspace.unread++,l.get({id:a.id}).$promise.then(function(a){e.mailRoom||(e.mailRoom={MailMessages:[]});var b=_.findIndex(e.mailRoom.MailMessages,{id:a.id});b>-1?_.merge(e.mailRoom.MailMessages[b],a):e.mailRoom.MailMessages.unshift(a),e.panelLeft="col-md-6",e.panelRight="col-md-6"})["catch"](function(a){console.error(a)})):void 0});var t=e.uploader=new m({url:"api/mail/attachments",autoUpload:!0,withCredentials:!0,headers:{Authorization:"Bearer "+b.get("token")}});return t.onErrorItem=function(){n.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},t.removeFromQueue=function(a){var b=this;return h["delete"]({id:a.basename}).$promise.then(function(){var c=b.getIndexOfItem(a),d=b.queue[c];d.isUploading&&d.cancel(),b.queue.splice(c,1),d._destroy(),b.progress=b._getTotalProgress(),s=_.reject(s,{basename:a.basename})})["catch"](function(){n.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},t.onSuccessItem=function(a,b){var c={size:b.size,path:b.path,name:b.name,basename:b.basename,type:b.type};a=_.merge(a,c),s.push(c)},e.openRoom=function(b){var c=_.find(a.workspaces,{id:b,type:"mailRoom"});c?c.active=!0:a.workspaces.push({id:b,type:"mailRoom","class":"icon-envelope",active:!0})},e.togglePanelLeft=function(){e.panelLeft?(e.panelLeft=null,e.panelRight="col-md-12"):(e.panelLeft="col-md-6",e.panelRight="col-md-6")},e.onSelectAnswer=function(){e.ckEditorInstance.insertHtml(e.modelOptions.selectedAnswer),delete e.modelOptions.selectedAnswer},e.getAnswers=function(a){return g.get({key:a}).$promise.then(function(a){return _.map(a.rows,"value")})},e.closeRoom=function(){return d.open({animation:!0,templateUrl:"app/channels/mail/inbox/status/status.modal.html",controller:"MailInboxStatusModalCtrl",resolve:{accountId:function(){return e.mailRoom.MailAccount.id}}}).result.then(function(a){return k.patch({id:e.workspace.id},a).$promise["catch"](function(a){n.error(a)})})},e.loadNote=function(){return d.open({animation:!0,templateUrl:"app/channels/mail/inbox/note/note.modal.html",controller:"MailInboxViewModalNoteCtrl",resolve:{id:function(){return e.workspace.id}}})},e.onChanged=function(){return k.update({id:e.workspace.id},{tags:e.form.tags}).$promise["catch"](function(a){console.error(a)})},e.sendMail=function(){o.spin("spinner-grid"),e.form.disabled=!0;var a={},b={subject:e.form.subject||(e.mailRoom?e.mailRoom.subject:null),from:e.form.from,to:_.map(e.form.to,"email"),cc:_.map(e.form.cc,"email"),bcc:_.map(e.form.bcc,"email"),html:e.form.html||null,text:e.form.text||null,inReplyTo:a.messageId||null,status:"SENDING",MailAttachments:s};return e.mailRoom?(a=_.last(e.mailRoom.MailMessages,{status:"RECEIVED"}),b.inReplyTo=a.messageId||null,k.save({id:e.workspace.id,controller:"messages",controller2:"send"},b).$promise.then(function(){e.form.html="",t.queue=[],s=[],n.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(){n.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){o.stop("spinner-grid"),e.form.disabled=!1})):l.save(b).$promise.then(function(a){n.show(c.instant("MESSAGE_MAIL_MESSAGE_SEND_SUCCESS"),"success"),e.form.html="",t.queue=[],s=[],e.workspace.id=a.id,e.workspace.name=a.subject,e.mailRoom=a,e.expanded=!1})["catch"](function(){n.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){o.stop("spinner-grid"),e.form.disabled=!1})},f.get().$promise.then(function(a){e.tags=_.map(a.rows,"name")})["catch"](function(a){console.error(a)}),j.get().$promise.then(function(a){e.mailAccounts=a.rows})["catch"](function(a){console.error(a)}),e.workspace.id?(e.panelLeft="col-md-6",e.panelRight="col-md-6",k.get({id:e.workspace.id}).$promise.then(function(a){e.mailRoom=a,e.expanded=!1,e.listId=a.MailAccount.ListId,e.workspace.name=a.subject||"No subject",e.form.from.push(a.MailAccount.address),e.form.tags=a.tags;var b=_.findLast(e.mailRoom.MailMessages,{status:"RECEIVED"});return b&&(e.form.to=_.map(_.union(b.from,b.to),function(a){return{email:a}}),e.form.to=_.remove(e.form.to,function(b){return b.email!==a.MailAccount.address}),e.form.cc=_.map(b.cc,function(a){return{email:a}}),e.form.bcc=_.map(b.bcc,function(a){return{email:a}}),e.form.subject="Re: "+(b.subject||"No subject"),e.form.html=r(b.text)),p.socket.on("mail_room:save",function(a){a.id===e.workspace.id&&_.merge(e.mailRoom,a)}),a})["catch"](function(a){console.error(a)})["finally"](function(){o.stop("spinner-grid"),e.form.disabled=!1})):(e.panelLeft=null,e.panelRight="col-md-12",o.stop("spinner-grid"),void 0)}}}]),angular.module("xCallyShuttleApp").controller("MailInboxStatusModalCtrl",["$scope","$uibModalInstance","MailAccount","accountId",function(a,b,c,d){a.modal={title:"APPLICATION_CONFIRM_CLOSE",text:"MESSAGE_ARE_YOU_SURE_YOU_WANT_TO_CLOSE_THE_MAIL"},a.initDisposition=function(){return a.item={disposition:null,status:"CLOSED"},c.get({accountId:d,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a)})},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.inbox.view.account",{url:"/account/:id",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:9}}})}]),angular.module("xCallyShuttleApp").controller("MailInboxViewAccountListCtrl",["$scope","$rootScope","$uibModal","$translate","$stateParams","$state","Tag","uibButtonConfig","usSpinnerService","socket","MailAccount","MailRoom","uiGridConstants","Auth","Modal","xAlert","localStorageService",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){a.openRoom=function(b,c){var d=_.find(a.workspaces,{id:b,type:"mailRoom"});return d&&b?d.active=!0:a.workspaces.push({id:b,subject:c,type:"mailRoom","class":"icon-envelope",active:!0}),b&&"agent"===n.getCurrentUser().role&&"PENDING"!==a.query.status&&"CLOSED"!==a.query.status?l.patch({id:b},{status:"OPEN",openReason:"agent"}).$promise["catch"](function(a){console.error(a)}):void 0},a.getPage=function(){i.spin("spinner-grid");var b={accountId:e.id,controller:"rooms"};return a.query&&_.merge(b,a.query),k.query(b).$promise.then(function(b){q.set("mailAccountId",e.id),a.gridOptions.data=b,j.socket.on("mail_room:save",function(b){if(b.MailAccountId==e.id){var c=_.find(a.gridOptions.data,{id:b.id});c?c.status!==b.status?_.remove(a.gridOptions.data,{id:b.id}):_.merge(c,b):a.query.status===b.status&&a.gridOptions.data.push(b)}}),j.socket.on("mail_room:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})})["catch"](function(a){console.error(a)})["finally"](function(){i.stop("spinner-grid")})},a.initView=function(){h.activeClass="green-haze",a.id=[],a.isAdmin=n.isAdmin(),
+a.isAgent=n.isAgent(),a.uncheckable=!1,a.query={status:q.get("mailStatus")?q.get("mailStatus"):"NEW",tags:q.get("mailTags")?q.get("mailTags"):[]},a.$watch("query.status",function(){q.set("mailStatus",a.query.status),a.getPage()},!0),k.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)}),g.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)}),a.gridOptions={exporterCsvFilename:"mail_rooms.csv",enableRowHeaderSelection:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!1,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,enableSelectAll:!0,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,columnDefs:[{name:"lastEvent",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>             <span data-ng-class=\"{'icon-arrow-up font-green': row.entity.lastEvent === 'SENT',             'icon-arrow-up font-yellow': row.entity.lastEvent === 'SENDING',             'icon-arrow-down font-green': row.entity.lastEvent === 'RECEIVED',             'icon-close font-red': row.entity.lastEvent === 'FAILED',             'icon-question': !row.entity.lastEvent}\">             </span>             </div>",width:30,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"attachment",displayName:"",headerCellTemplate:'<i class="icon-paper-clip" style="margin-top: 8px; margin-left: 8px;"></i>',cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><i data-ng-class=\"row.entity.attachment ? 'icon-paper-clip' : ''\"></i></div>",width:30,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"tags",displayName:"",headerCellTemplate:'<i class="icon-tag" style="margin-top: 8px; margin-left: 8px;"></i>',cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><i data-ng-class=\"row.entity.tags.length ? 'icon-tag' : ''\" title=\"{{row.entity.tags}}\"></i></div>",width:30,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"id",displayName:"Id",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>#{{row.entity.id}}</span></div>",width:75,enableSorting:!0,enableFiltering:!0,enableColumnMenu:!1},{name:"subject"},{name:"from",cellClass:"text-center"},{name:"disposition",displayName:"APPLICATION_DISPOSITION",headerCellFilter:"translate"},{name:"updatedAt",cellFilter:"date:'dd/MM/yyyy HH:mm'",width:120,enableSorting:!1,enableFiltering:!1,sort:{direction:m.DESC}},{name:"action",cellTemplate:'<div>             <a class="btn btn-icon-only" data-ng-disabled="row.entity.waiting" data-ng-class="row.entity.waiting ? \'font-blue\' : \'font-green\'" data-ng-click="grid.appScope.openRoom(row.entity.id, row.entity.subject)"><i class="fa" data-ng-class="row.entity.waiting ? \'fa-repeat\' : \'fa-envelope\' " aria-hidden="true"></i></a>             <a class="btn btn-icon-only font-red" data-ng-disabled="row.entity.waiting" data-ng-show="grid.appScope.isAdmin" data-ng-click="grid.appScope.deleteItem(row.entity.id, row.entity.id)"><i class="fa fa-trash" aria-hidden="true"></i></a>             </div>',enableSorting:!1,cellClass:"ui-grid-vcenter",width:70,enableFiltering:!1,enableColumnMenu:!1}],data:[],onRegisterApi:function(b){a.gridApi=b,a.gridApi.selection&&(a.gridApi.selection.on.rowSelectionChanged(a,function(b){b.isSelected?a.id.push(a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id):_.pull(a.id,a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id)}),a.gridApi.selection.on.rowSelectionChangedBatch(a,function(b){b[0].isSelected?a.id=_.union(a.id,_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id")):_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id").forEach(function(b){_.pull(a.id,b)})}))}},a.getPage(a.query)},a.onChanged=function(){q.set("mailTags",a.query.tags),a.getPage(a.query)},a.tagItems=function(){return c.open({animation:!0,templateUrl:"app/channels/mail/inbox/view/view.tags.modal.html",controller:"MailInboxViewModalTagCtrl",resolve:{id:function(){return a.id}}}).result.then(function(){a.gridApi.selection.clearSelectedRows(),a.id=[]})},a.disposeItems=function(){return c.open({animation:!0,templateUrl:"app/channels/mail/inbox/status/status.modal.html",controller:"MailInboxStatusModalCtrl",resolve:{status:function(){return null},accountId:function(){return e.id}}}).result.then(function(b){return l.patch({id:a.id},b).$promise.then(function(){a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})})},a.deleteItem=o.confirm["delete"](function(b){var c={id:b};return l.remove(c).$promise.then(function(){a.getPage(),p.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})}),a.deleteItems=o.confirm["delete"](function(){var b={ids:a.id};return l["delete"](b).$promise.then(function(){a.getPage(),p.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.inbox.view.account.list",{url:"/list",templateUrl:"app/channels/mail/inbox/view/account/list/list.html",controller:"MailInboxViewAccountListCtrl",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:9}}})}]),angular.module("xCallyShuttleApp").controller("MailInboxViewModalAgentCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Agent","Auth","MailRoom","xAlert","roomId",function(a,b,c,d,e,f,g,h,i){var j=[];a.initModal=function(){return a.agents=[],a.item={agents:[]},e.get().$promise.then(function(b){for(var c=0;c<b.rows.length;c++)a.agents.push(b.rows[c]);return g.query({id:i,controller:"agents"}).$promise}).then(function(b){for(var c=0;c<b.length;c++)f.isAgent()||a.item.agents.push(b[c]),j.push(b[c].id)})["catch"](function(a){console.error(a)})},a.ok=function(){return j=f.isAgent()?_.union(j,a.item.agents):angular.copy(a.item.agents),g.update({id:i,controller:"agents",agents:j}).$promise.then(function(){h.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close()})["catch"](function(a){console.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("MailInboxViewCtrl",["$scope","$timeout","$location","localStorageService","MailAccount",function(a,b,c,d,e){a.initView=function(){return e.get().$promise.then(function(b){var e=null;a.mailAccounts=b.rows,a.mailAccounts.length&&(e="/channels/mail/inbox/view/account/"+(d.get("mailAccountId")||a.mailAccounts[0].id)+"/list"),e&&c.path(e)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.inbox.view",{url:"/view",templateUrl:"app/channels/mail/inbox/view/view.html",controller:"MailInboxViewCtrl",reload:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/inbox.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("MailInboxViewModalTagCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Tag","MailRoom","xAlert","id",function(a,b,c,d,e,f,g,h){a.initModal=function(){return a.tags=[],a.item={tags:[]},a.modal={dismissable:!0,title:"APPLICATION_MESSAGE_SEND_RETRY",text:"MESSAGE_MESSAGE_SEND_RETRY",buttons:[{"class":"btn-success",text:"APPLICATION_TAG",click:function(){var d={status:!0};return f.patch({id:h},{tags:a.item.tags}).$promise["catch"](function(){d.status=!1,g.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){b.close(d)})}},{"class":"default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]},e.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("MailInboxViewModalTemplateCtrl",["$scope","$uibModalInstance","Template",function(a,b,c){a.initModal=function(){return a.item={},c.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail",{url:"/mail",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:9}}})}]),angular.module("xCallyShuttleApp").factory("MailReport",["$resource",function(a){return a("/api/report/mails/:id/:controller1/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("MailRoom",["$resource",function(a){return a("/api/mail/rooms/:id/:controller/:controller2",{id:"@id",controller:"@controller"},{update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").factory("MailAttachment",["$resource",function(a){return a("/api/mail/attachments/:id/:controller",{id:"@id"})}]),angular.module("xCallyShuttleApp").factory("MailMessage",["$resource",function(a){return a("/api/mail/messages/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("MailQueueListCtrl",["$scope","MailQueue","gridOptions","$uibModal","Auth",function(a,b,c,d,e){a.initView=function(){a.Auth=e;var d={exporterCsvFilename:"voice_queues.csv",columnDefs:[{name:"name"},{name:"description"},{name:"timeout"},{name:"strategy"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/mail/queues/view/{{row.entity.id}}/settings",name:"settings"},{"class":"green-meadow",href:"/channels/mail/queues/view/{{row.entity.id}}/agents",name:"agents",hide:"user"===e.getCurrentUser().role},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){var b=d.open({animation:!0,templateUrl:"app/channels/mail/queue/list/list.create.modal.html",controller:"MailQueueListCreateCtrl",size:"lg"});b.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("MailQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","MailQueue","Team","strategies",function(a,b,c,d,e,f,g){a.form={},a.strategies=g,a.item={penalty:0,agents:[]},a.getTeams=function(){return f.get({controller:"associations"}).$promise.then(function(b){a.teams=b.rows}).then(function(){ComponentsDropdowns.bindQueue(a.teams,[],function(){return{select:function(b){a.item.agents=_.union(a.item.agents,b)},deselect:function(b){a.item.agents=_.difference(a.item.agents,b)}}})})["catch"](function(a){console.error(a)})},a.save=function(){return e.save(a.item).$promise.then(function(a){b.close(a)})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.queues.list",{url:"/list",templateUrl:"app/channels/mail/queue/list/list.html",controller:"MailQueueListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").factory("MailQueue",["$resource",function(a){return a("/api/mail/queues/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.queues",{url:"/queues",template:"<div ui-view></div>","abstract":!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/scripts/components-dropdowns.js"]})}]},data:{permissions:{only:["admin","user"],redirectTo:"landing",id:35}}})}]),angular.module("xCallyShuttleApp").controller("MailQueueViewCtrl",["$scope","$http","$translate","$stateParams","xAlert","Team","MailQueue","Auth","strategies",function(a,b,c,d,e,f,g,h,i){a.Auth=h,a.strategies=i;var j=function(){return{select:function(b){return g.save({id:a.queue.id,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.error(a)})},deselect:function(b){return g["delete"]({id:a.queue.id,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.error(a)})}}};a.getQueue=function(){return g.get({id:d.id}).$promise.then(function(b){b.penalty=0,a.queue=b})["catch"](function(a){console.error(a)})},a.updateMailQueue=function(){return g.update({id:d.id},{name:a.queue.name,description:a.queue.description,timeout:a.queue.timeout,strategy:a.queue.strategy}).$promise.then(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.error(a)})},a.getTeams=function(){return f.get({controller:"associations"}).$promise.then(function(b){return a.teams=b.rows,g.get({id:d.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindMailQueue(a.teams,_.map(b.rows,function(a){return{id:a.id,penalty:a.UserHasMailQueue.penalty}}),j)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.queues.view",{url:"/view/:id",templateUrl:"app/channels/mail/queue/view/view.html",controller:"MailQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.mail.queues.view.settings",{url:"/settings",templateUrl:"app/channels/mail/queue/view/view.settings.html"}).state("main.channels.mail.queues.view.agents",{url:"/agents",templateUrl:"app/channels/mail/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:37}}})}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","MailQueue","usSpinnerService","$q","uiGridConstants","Auth",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){function o(){return k.spin("grid-spinner"),g.get(t).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){q(a)})})["catch"](function(a){f.error(a)})["finally"](function(){k.stop("grid-spinner")})}function p(){e.socket.on("agent:save",function(b){b=b.newValues||b;var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});c&&(c.online=_.has(b,"online")?b.online:c.online,c.lastLoginAt=_.has(b,"lastLoginAt")?b.lastLoginAt:c.lastLoginAt,c.pause=_.has(b,"smsPause")?b.mailPause:c.mailPause,c.pauseType=_.has(b,"pauseType")?b.pauseType:c.pauseType,c.lastPauseAt=_.has(b,"lastPauseAt")?b.lastPauseAt:c.lastPauseAt,c.ipaddr=_.has(b,"ipaddr")?b.ipaddr:c.ipaddr,c.port=_.has(b,"port")?b.port:c.port,c.fullcontact=_.has(b,"fullcontact")?b.fullcontact:c.fullcontact,c.useragent=_.has(b,"useragent")?b.useragent:c.useragent,c.lastms=_.has(b,"lastms")?b.lastms:c.lastms,c.internal=_.has(b,"internal")?b.internal:c.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=_.has(b,"online")?b.online:a.online)}))}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_mail_queue:save",function(b){var c=_.includes(_.map(a.CurrentUser.PMailQueues,"id"),b.MailQueueId)||n.isAdmin();if(c){var d=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0});if(d){var e=a.gridOptions.data.indexOf(d);a.gridOptions.data.splice(e+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,queueId:b.MailQueueId,agent:b.membername,online:d.online})}}}),e.socket.on("user_has_mail_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queueId:b.MailQueueId})})}function q(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.mailPause,pauseType:b.pauseType,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.MailQueues.forEach(function(c){a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,queueId:c.id,agent:b.name,online:b.online})})}function r(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.error(a)})}function s(){return j.get().$promise.then(function(b){a.mailQueues=b.rows,e.syncUpdates("mail_queue",a.mailQueues)})["catch"](function(a){f.error(a)})}a.mailQueues=[];var t={controller:"realtime",controller1:"mail",offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="fa" data-ng-class="{\'font-green\':row.entity.online, \'font-red\':!row.entity.online,\'fa-user\':row.entity.online,\'fa-user-times\':!row.entity.online}"></i> <span data-ng-if="row.entity.online" class="left-margin">(<css-timer start-time="row.entity.lastLoginAt"></css-timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"mailPause",displayName:"APPLICATION_PAUSE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.pause != null && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="fa fa-play font-green pointer-cursor left-margin" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="fa fa-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select> <span data-ng-if="row.entity.pause">({{row.entity.pauseType}})</span><span class="left-margin"><css-timer data-ng-if="row.entity.pause" start-time="row.entity.lastPauseAt"></css-timer></span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"PAUSED"},{value:"false",label:"NOT PAUSED"}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queueId" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queueId)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.mailQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){u(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){u(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){u(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?t.order=null:t.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),o()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){t.offset=(a-1)*b,t.limit=b,o()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?t[a.name]=a.filters[0].term:delete t[a.name]}),o()})}},o(),r(),s(),$timeout(function(){p()})};var u=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_mail_queue")}),a.pause=function(b,c,e){return e&&(a.pauseType=null),i.save({name:c,agent:b,type:e||"DEFAULT PAUSE",data4:e||"DEFAULT PAUSE",channel:"mail"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/mail/realtime/view/agent/queue.modal.add.html",controller:"MailRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.mailQueues,function(b){return!!_.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})})}}});g.result.then(function(b){return i.save({name:"QueueAdd",agent:e,queues:_.filter(a.mailQueues,function(a){return _.includes(b.queues,a.id)}),channel:"mail",data1:e,data3:b.queues.join(","),data4:"mail"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queueId:b,channel:"mail",data1:a,data3:b,data4:"mail"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/mail/realtime/view/agent/agent.modal.info.html",controller:"MailRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/mail/realtime/view/agent/agent.html",controller:"MailRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewApplicationCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","ReportMailSession","usSpinnerService","$q","uiGridConstants","$timeout",function(a,b,c,d,e,f,g,h,i,j,k){function l(){return h.spin("spinner-grid"),g.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){m(),h.stop("spinner-grid")})}function m(){e.socket.on("report_mail_session:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&k(function(){_.remove(a.gridOptions.data,{id:b.id})},1e4)):b.leaveAt||a.gridOptions.data.push(b)}),e.socket.on("report_mail_session:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})}a.moment=moment,a.initApplications=function(){a.gridOptions={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"uniqueid",displayName:"APPLICATION_UNIQUEID",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span> <span data-ng-if="!row.entity.leaveAt">[<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</span></div>"},{name:"queuename",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.queuename || ''}}</span></div>"}],data:[],gridMenuTitleFilter:function(a){var b=i.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){n(a.gridOptions.data.length)})}},l()};var n=function(a){var b=a?30*a+60:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("report_mail_session")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.realtime.view.applications",{url:"/applications",templateUrl:"app/channels/mail/realtime/view/application/application.html",controller:"MailRealtimeViewApplicationCtrl"})}]),angular.module("xCallyShuttleApp").controller("MailRealtimeViewCtrl",["$scope","$state",function(a,b){a.agents=[{name:"Queues",link:"main.channels.mail.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.mail.realtime.view.agents.timeline"}],a.sessions=[{name:"Sessions",link:"main.channels.mail.realtime.view.sessions"}],a.tree={queues:[{name:"Queues",link:"main.channels.mail.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.mail.realtime.view.agents.timeline"}],sessions:[{name:"Sessions",link:"main.channels.mail.realtime.view.sessions"}]}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.mail.realtime.view",{url:"/view",templateUrl:"app/channels/mail/realtime/view/view.html",controller:"MailRealtimeViewCtrl"})}]),angular.module("xCallyShuttleApp").factory("ReportMailSession",["$resource",function(a){return a("/api/report/mail/sessions/:id/:controller/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("OpenChannelAccount",["$resource",function(a){return a("/api/openchannel/accounts/:accountId/:controller/:id",{id:"@accountId"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts",{url:"/accounts",template:"<div ui-view></div>",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:46}}})}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountListCtrl",["$scope","OpenChannelAccount","gridOptions","$stateParams","xAlert","$translate",function(a,b,c,d,e,f){a.initView=function(){var e={exporterCsvFilename:"openchannel_accounts.csv",columnDefs:[{name:"id",displayName:"ID",cellClass:"text-center",width:75,enableSorting:!1,enableFiltering:!1},{name:"name"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/openchannel/accounts/view/{{row.entity.id}}/settings",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,e,a,{accountId:d.accountId})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.list",{url:"/list",templateUrl:"app/channels/openchannel/account/list/list.html",controller:"OpenChannelAccountListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.view.actions",{url:"/actions",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("OpenChannelApplication",["$resource",function(a){return a("/api/openchannel/applications/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountViewActionListCtrl",["$scope","gridOptions","OpenChannelAccount","$http","$translate","$stateParams","xAlert",function(a,b,c,d,e,f,g){a.initActions=function(){var d={draggable:!0,exporterCsvFilename:"openchannel_applications.csv",enableSorting:!1,enableFiltering:!1,columnDefs:[{name:"app",cellClass:"text-center"},{name:"name",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span>{{row.entity.app == "queue" ? row.entity.OpenchannelQueue.name : row.entity.User.name}}</span></div>'},{name:"timeout",cellClass:"text-center"},{name:"interval",displayName:"APPLICATION_TIME_INTERVAL",cellClass:"text-center",cellTemplate:"<div><span>{{row.entity.Interval ? row.entity.Interval.name : row.entity.interval}}</span></div>"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/openchannel/accounts/view/{{row.entity.OpenchannelAccountId}}/actions/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.app, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a,{accountId:f.accountId,controller:"applications"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.view.actions.list",{url:"/list",templateUrl:"app/channels/openchannel/account/view/action/list/list.html",controller:"OpenChannelAccountViewActionListCtrl"})}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountViewActionViewCtrl",["$scope","$http","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","Agent","Interval","OpenChannelQueue","OpenChannelAccount","OpenChannelApplication","Template","MailAccount","SmsAccount",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initAction=function(){return a.$application=i.application,a.$stateParams=c,
+a.$interval=j.interval,a.forms={},a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"SendSMS",value:"sendSms"}],o.get({id:c.actionId}).$promise.then(function(b){if(a.application=b,a.application.alwaysTime=!1,a.application.IntervalId)a.application.intType="list";else switch(a.application.interval){case"*,*,*,*":a.application.intType="always";break;default:a.application.intType="custom"}if("always"===a.application.intType||"custom"===a.application.intType){var c=a.application.interval.split(",");"*"===c[0]?a.application.alwaysTime=!0:(a.application.t_from=moment(new Date),a.application.t_to=moment(new Date),a.application.t_from.hour(c[0].split("-")[0].split(":")[0]),a.application.t_from.minute(c[0].split("-")[0].split(":")[1]),a.application.t_to.hour(c[0].split("-")[1].split(":")[0]),a.application.t_to.minute(c[0].split("-")[1].split(":")[1])),"*"===c[1]?(a.application.wd_from="always",a.application.wd_to="always"):(a.application.wd_from=c[1].split("-")[0],a.application.wd_to=c[1].split("-")[1]),"*"===c[2]?(a.application.md_from="always",a.application.md_to="always"):(a.application.md_from=c[2].split("-")[0],a.application.md_to=c[2].split("-")[1]),"*"===c[3]?(a.application.m_from="always",a.application.m_to="always"):(a.application.m_from=c[3].split("-")[0],a.application.m_to=c[3].split("-")[1])}a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})})["catch"](function(a){f.error(a)})},a.getQueues=function(){return m.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getSmsAccounts=function(){return r.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return k.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return l.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.updateItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var g,h,i,j,k;g=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(h=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(h+="-"+a.application.wd_to)):h="*",a.application.md_from&&"always"!==a.application.md_from?(i=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(i+="-"+a.application.md_to)):i="*",a.application.m_from&&"always"!==a.application.m_from?(j=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(j+="-"+a.application.m_to)):j="*",k=g+","+h+","+i+","+j,a.application.interval=k,a.application.IntervalId=null}return n.update({accountId:c.accountId,controller:"applications",id:c.actionId},a.application).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success"),e.path("/channels/openchannel/accounts/view/"+c.accountId+"/actions/list")})["catch"](function(a){f.error(a)})},a.getTemplates=function(){return p.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.getMailAccounts=function(){return q.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.view.actions.view",{url:"/view/:actionId",templateUrl:"app/channels/openchannel/account/view/action/view/view.html",controller:"OpenChannelAccountViewActionViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountViewActionWizardCtrl",["$scope","$http","Agent","OpenChannelQueue","Interval","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","OpenChannelApplication","OpenChannelAccount","Template","MailAccount","SmsAccount",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"SendSMS",value:"sendSms"}],a.$application=l.application,a.$stateParams=f,a.$interval=m.interval,a.forms={},a.application={alwaysTime:!0},a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})},a.getQueues=function(){return d.get().$promise.then(function(b){console.log(b),a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return c.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getSmsAccounts=function(){return r.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return e.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.createItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var c,d,e,j,k;c=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(d=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(d+="-"+a.application.wd_to)):d="*",a.application.md_from&&"always"!==a.application.md_from?(e=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(e+="-"+a.application.md_to)):e="*",a.application.m_from&&"always"!==a.application.m_from?(j=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(j+="-"+a.application.m_to)):j="*",k=c+","+d+","+e+","+j,a.application.interval=k,a.application.IntervalId=null}return o.save({accountId:f.accountId,controller:"applications"},a.application).$promise.then(function(){i.show(g.instant("MESSAGE_WELL_DONE"),"success"),h.path("/channels/openchannel/accounts/view/"+f.accountId+"/actions/list")})["catch"](function(a){i.error(a)})},a.formValidation=function(a){return a},a.next=function(){j.wizard().next()},a.getMailAccounts=function(){return q.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getTemplates=function(){return p.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.view.actions.wizard",{url:"/wizard",templateUrl:"app/channels/openchannel/account/view/action/wizard/wizard.html",controller:"OpenChannelAccountViewActionWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountApiViewCtrl",["$scope","OpenChannelAccount","$http","$stateParams","clipboard","$translate","$location","xAlert",function(a,b,c,d,e,f,g,h){a.copyToClipboard=function(a){e.copyText(a),h.show(f.instant("MESSAGE_TEXT_COPIED_CLIPBOARD")+"!","success")},a.initView=function(){b.get({id:d.accountId}).$promise.then(function(b){a.account=b,a.receiveurl=a.account.remote+"/api/openchannel/accounts/"+a.account.id+"/receive"})["catch"](function(a){h.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.view.api",{url:"/api",controller:"OpenChannelAccountApiViewCtrl",templateUrl:"app/channels/openchannel/account/view/api/view/view.html"})}]),angular.module("xCallyShuttleApp").factory("OpenChannelDisposition",["$resource",function(a){return a("/api/openchannel/dispositions/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("OpenChannelInboxViewModaDispositionAddCtrl",["$scope","$uibModalInstance","OpenChannelAccount","id",function(a,b,c,d){a.ok=function(){return c.save({accountId:d,controller:"dispositions"},{name:a.name}).$promise.then(function(a){b.close(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountDispositionViewCtrl",["$scope","$stateParams","$uibModal","$translate","OpenChannelAccount","xAlert",function(a,b,c,d,e,f){a.initView=function(){return e.get({accountId:b.accountId,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.updateDisposition=function(a,c){return e.update({accountId:b.accountId,controller:"dispositions",id:a},{name:c}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.deleteDisposition=function(c){return console.log("delete"),e.remove({accountId:b.accountId,controller:"dispositions",id:c}).$promise.then(function(){_.remove(a.dispositions,{id:c})})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addDisposition=function(){return c.open({animation:!0,templateUrl:"app/channels/openchannel/account/view/disposition/modal/add.modal.html",controller:"OpenChannelInboxViewModaDispositionAddCtrl",resolve:{id:function(){return b.accountId}}}).result.then(function(b){b&&a.dispositions.push(b)})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.view.dispositions",{url:"/dispositions",controller:"OpenChannelAccountDispositionViewCtrl",templateUrl:"app/channels/openchannel/account/view/disposition/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountHooksViewCtrl",["$scope","OpenChannelAccount","Pause","$http","$stateParams","$translate","$location","xAlert",function(a,b,c,d,e,f,g,h){a.account={},a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.initView=function(){a.types=[{value:"",name:"-- None --"},{name:"HTTP GET",value:"GET"},{name:"HTTP POST",value:"POST"}],c.get().$promise.then(function(b){a.pauses=b.rows})["catch"](function(a){h.error(a)}),b.get({id:e.accountId}).$promise.then(function(b){a.account=b,a.account.actions.length<1&&a.account.actions.push({action:"pause",enabled:!1,type:null})})["catch"](function(a){h.error(a)})},a.resetActionData=function(a){a.type=null},a.updateItem=function(){return console.log(a.account),b.update({id:e.accountId},a.account).$promise.then(function(){h.show(f.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.view.hooks",{url:"/hooks",controller:"OpenChannelAccountHooksViewCtrl",templateUrl:"app/channels/openchannel/account/view/hooks/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountSettingViewCtrl",["$scope","OpenChannelAccount","$http","$stateParams","clipboard","$translate","$location","xAlert","List",function(a,b,c,d,e,f,g,h,i){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.types=[{name:"HTTP GET",value:"GET"},{name:"HTTP POST",value:"POST"}],a.account={},a.initView=function(){i.get().$promise.then(function(b){a.lists=b.rows})["catch"](function(a){console.error(a)}),b.get({id:d.accountId}).$promise.then(function(b){a.account=b})["catch"](function(a){h.error(a)})},a.updateItem=function(){return b.update({id:d.accountId},a.account).$promise.then(function(){h.show(f.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.view.settings",{url:"/settings",controller:"OpenChannelAccountSettingViewCtrl",templateUrl:"app/channels/openchannel/account/view/setting/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountViewCtrl",["$scope","OpenChannelAccount","$http","$stateParams","clipboard","$translate","$location","xAlert","List",function(a,b,c,d,e,f,g,h,i){a.initView=function(){return a.account={},b.get({id:d.accountId}).$promise.then(function(b){a.account=b,console.log(b)})["catch"](function(a){h.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.view",{url:"/view/:accountId",templateUrl:"app/channels/openchannel/account/view/view.html",controller:"OpenChannelAccountViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}})}]),angular.module("xCallyShuttleApp").controller("OpenChannelAccountWizardCtrl",["$scope","$http","$location","$translate","WizardHandler","xAlert","OpenChannelAccount",function(a,b,c,d,e,f,g){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.forms={},a.item={},a.item.remote=c.protocol()+"://"+location.host},a.goNext=function(){e.wizard().next()},a.formValidation=function(a){return a},a.createItem=function(){return g.save(a.item).$promise.then(function(){c.path("/channels/openchannel/accounts/list")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.accounts.wizard",{url:"/wizard",templateUrl:"app/channels/openchannel/account/wizard/wizard.html",controller:"OpenChannelAccountWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.inbox",{url:"/inbox",template:"<div ui-view></div>",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:48}}})}]),angular.module("xCallyShuttleApp").controller("OpenChannelInboxInfoModalCtrl",["$scope","$translate","$uibModalInstance","$stateParams","xAlert","data",function(a,b,c,d,e,f){a.data=null,a.initInfo=function(){f&&(a.data=_.isEmpty(JSON.parse(f))?null:JSON.parse(f))},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").directive("message",["$rootScope","OpenChannelMessage","List","xAlert","$translate","$uibModal",function(a,b,c,d,e,f){return{restrict:"E",scope:{Message:"=message",accounttype:"=accounttype",listId:"="},templateUrl:"app/channels/openchannel/inbox/message/message.html",link:function(b){b.openContact=function(f,g){if(b.listId){if(!g)return;var h;switch(f){case"phone":h={phone:g};break;case"email":h={email:g};break;default:return}return c.save({listId:b.listId,controller:"contacts"},h).$promise.then(function(b){var c=_.find(a.$root.workspaces,{contactID:b.id});c?c.active=!0:a.$root.workspaces.push({active:!0,"class":"icon-user",contactID:b.id,name:b.phone,type:"contact"})})["catch"](function(a){console.error(a)})}d.show(e.instant("MESSAGE_NO_LIST_CONFIGURED"),"info")},b.info=function(a){f.open({animation:!0,templateUrl:"app/channels/openchannel/inbox/message/info.modal.html",controller:"OpenChannelInboxInfoModalCtrl",resolve:{data:function(){return a}}})}}}}]),angular.module("xCallyShuttleApp").directive("openchannelRoom",["OpenChannelReport","$cookieStore","$translate","$uibModal","$timeout","Tag","CannedAnswer","Auth","OpenChannelAccount","OpenChannelRoom","OpenChannelMessage","xAlert","usSpinnerService","socket","$stateParams","$rootScope",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){return{restrict:"E",scope:{workspace:"=",index:"=",submit:"&onSubmit"},templateUrl:"app/channels/openchannel/inbox/room/room.directive.html",link:function(a){a.modelOptions={debounce:{"default":500,blur:250},getterSetter:!0},a.panelLeft=null,a.panelRight="col-md-12",a.togglePanelLeft=function(){a.panelLeft?(a.panelLeft=null,a.panelRight="col-md-12"):(a.panelLeft="col-md-6",a.panelRight="col-md-6")},a.form={disabled:!1,from:"",to:a.workspace.data&&a.workspace.data.to?a.workspace.data.to:"",body:""},n.socket.on("openchannel_message:save",function(b){return a.workspace.id&&b.OpenchannelRoomId==a.workspace.id?k.get({id:b.id}).$promise.then(function(b){a.Room||(a.Room={OpenchannelMessages:[]});var c=_.findIndex(a.Room.OpenchannelMessages,{id:b.id});c>-1?_.merge(a.Room.OpenchannelMessages[c],b):a.Room.OpenchannelMessages.unshift(b),a.panelLeft="col-md-6",a.panelRight="col-md-6"})["catch"](function(a){console.error(a)}):void 0}),n.socket.on("openchannel_message:update",function(b){if(a.Room&&b.OpenchannelRoomId==a.workspace.id){var c=_.find(a.Room.OpenchannelMessages,{id:b.id});c&&_.merge(c,b)}}),n.socket.on("openchannel_room:save",function(b){a.Room&&b.id==a.workspace.id&&(a.Room.status=b.status,a.Room.disposition=b.disposition)}),a.closeRoom=function(b){return d.open({animation:!0,templateUrl:"app/channels/openchannel/inbox/view/view.status.modal.html",controller:"OpenChannelInboxViewModalStatusCtrl",resolve:{closed:function(){return"CLOSED"===a.Room.status},accountId:function(){return a.Room.OpenchannelAccountId}}}).result.then(function(a){var c={id:b,status:"CLOSED"};return a.disposition&&(c.disposition=a.disposition),j.update(c).$promise["catch"](function(a){l.error(a)})})},a.openRoom=function(a,b){var c=_.find(p.workspaces,{id:a,type:"openchannelRoom"});c?c.active=!0:p.workspaces.push({id:a,name:b,type:"openchannelRoom","class":"icon-globe",active:!0})},f.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)}),i.get().$promise.then(function(b){a.Accounts=b.rows})["catch"](function(a){console.error(a)}),a.workspace.id?(a.panelLeft="col-md-6",a.panelRight="col-md-6",j.get({id:a.workspace.id}).$promise.then(function(b){a.Room=b,a.form.from=a.Room.OpenchannelAccount.name,a.form.to=a.Room.contact,a.form.tags=a.Room.tags})["catch"](function(a){console.error(a)})["finally"](function(){m.stop("spinner-grid"),a.form.disabled=!1})):m.stop("spinner-grid"),a.onSelect=function(){a.form.body+=a.modelOptions.selectedAnswer,delete a.modelOptions.selectedAnswer},a.onSelectAnswer=function(b){a.form.body+=b,a.selectedAnswer=""},a.getAnswers=function(a){return g.get({key:a}).$promise.then(function(a){return _.map(a.rows,"value")})},a.loadAgents=function(){d.open({animation:!0,templateUrl:"app/channels/openchannel/inbox/view/view.agents.modal.html",controller:"OpenChannelInboxViewModalAgentCtrl",resolve:{roomId:function(){return a.workspace.id}}})},a.onChanged=function(){return j.patch({id:a.workspace.id},{tags:a.form.tags}).$promise["catch"](function(a){console.error(a)})},a.sendMessage=function(){m.spin("spinner-grid");var b=_.find(a.Accounts,{name:a.form.from}).id;if(b){var d={from:a.form.from,to:a.form.to,body:a.form.body,OpenchannelRoomId:a.Room?a.Room.id:null};return i.save({accountId:b,controller:"send"},d).$promise.then(function(b){return l.show(c.instant("MESSAGE_WELL_DONE"),"success"),a.Room?a.Room:j.get({id:"messages",controller:b.id}).$promise}).then(function(b){b&&(a.form.body="",a.workspace.id=b.id,a.workspace.name=b.contact,a.Room=b,a.panelLeft="col-md-6",a.panelRight="col-md-6")})["catch"](function(a){l.error(a)})["finally"](function(){m.stop("spinner-grid")})}}}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.inbox.view.account",{url:"/account/:id",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("OpenChannelInboxViewAccountListCtrl",["$scope","$rootScope","$uibModal","$translate","$stateParams","$state","Tag","usSpinnerService","socket","OpenChannelAccount","OpenChannelRoom","gridOptions","uiGridConstants","Auth","Modal","xAlert","uibButtonConfig","localStorageService",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){a.loadAgents=function(a){c.open({animation:!0,templateUrl:"app/channels/openchannel/inbox/view/view.agents.modal.html",controller:"OpenChannelInboxViewModalAgentCtrl",resolve:{roomId:a}})},a.initView=function(){q.activeClass="green-haze",a.id=[],a.isAdmin=n.isAdmin(),a.isAgent=n.isAgent(),a.uncheckable=!1,a.query={status:r.get("openchannelStatus")?r.get("openchannelStatus"):"NEW",tags:r.get("openchannelTags")?r.get("openchannelTags"):[]},a.$watch("query.status",function(){r.set("openchannelStatus",a.query.status),a.getPage()},!0),g.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)}),a.gridOptions={exporterCsvFilename:"openchannel_rooms.csv",enableRowHeaderSelection:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!1,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,enableSelectAll:!0,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,columnDefs:[{name:"lastEvent",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>               <span data-ng-class=\"{'icon-arrow-up font-green': row.entity.lastEvent === 'SENT',               'icon-arrow-up font-yellow': row.entity.lastEvent === 'SENDING',               'icon-arrow-down font-green': row.entity.lastEvent === 'RECEIVED',               'icon-close font-red': row.entity.lastEvent === 'FAILED',               'icon-question': !row.entity.lastEvent}\">               </span>               </div>",width:30,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"tags",displayName:"",headerCellTemplate:'<i class="icon-tag" style="margin-top: 8px; margin-left: 8px;"></i>',cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><i data-ng-class=\"row.entity.tags.length ? 'icon-tag' : ''\" title=\"{{row.entity.tags}}\"></i></div>",width:30,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"id",displayName:"Id",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>#{{row.entity.id}}</span></div>",width:75,enableSorting:!1,enableFiltering:!0,enableColumnMenu:!1},{name:"contact",cellClass:"text-center"},{name:"disposition",cellClass:"text-center"},{name:"updatedAt",cellFilter:"date:'MM/dd/yyyy HH:mm'",width:120,enableSorting:!1,enableFiltering:!1,sort:{direction:m.DESC}},{name:"action",cellTemplate:'<div>             <a class="btn btn-icon-only font-green" data-ng-click="grid.appScope.openRoom(row.entity.id, row.entity.contact)"><i class="glyphicon glyphicon-comment" aria-hidden="true"></i></a>             <a class="btn btn-icon-only font-red" data-ng-show="grid.appScope.isAdmin" data-ng-click="grid.appScope.deleteItem(row.entity.id,row.entity.id)"><i class="fa fa-trash" aria-hidden="true"></i>             </div>',enableSorting:!1,cellClass:"ui-grid-vcenter",width:90,enableFiltering:!1,enableColumnMenu:!1}],data:[],onRegisterApi:function(b){a.gridApi=b,a.gridApi.selection&&(a.gridApi.selection.on.rowSelectionChanged(a,function(b){b.isSelected?a.id.push(a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id):_.pull(a.id,a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id)}),a.gridApi.selection.on.rowSelectionChangedBatch(a,function(b){b[0].isSelected?a.id=_.union(a.id,_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id")):_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id").forEach(function(b){_.pull(a.id,b)})}))}},i.socket.on("openchannel_room:remove",function(b){_.remove(a.workspaces,{id:b.id,type:"openchannelRoom"}),_.remove(a.gridOptions.data,{id:b.id})}),a.getPage(a.query)},a.onChanged=function(){a.getPage(a.query)},a.tagItems=function(){return c.open({animation:!0,templateUrl:"app/channels/openchannel/inbox/view/view.tags.modal.html",controller:"OpenChannelInboxViewModalTagCtrl",resolve:{id:function(){return a.id}}}).result.then(function(){a.gridApi.selection.clearSelectedRows(),a.id=[],a.getPage()})},a.openRoom=function(b,c){var d=_.find(a.workspaces,{id:b,type:"openchannelRoom"});return d?d.active=!0:a.workspaces.push({id:b,name:c,type:"openchannelRoom","class":"icon-globe",active:!0}),b&&"agent"===n.getCurrentUser().role&&"PENDING"!==a.query.status&&"CLOSED"!==a.query.status?k.patch({id:b},{status:"OPEN",openReason:"agent"}).$promise["catch"](function(a){console.error(a)}):void 0},a.getPage=function(b){h.spin("spinner-grid");var c={accountId:e.id,controller:"rooms"};return b&&_.merge(c,b),a.query&&_.merge(c,a.query),j.query(c).$promise.then(function(b){r.set("openchannelAccountId",e.id),a.gridOptions.data=b,i.socket.on("openchannel_room:save",function(b){if(b.OpenchannelAccountId==e.id){var c=_.find(a.gridOptions.data,{id:b.id});c?c.status!==b.status?_.remove(a.gridOptions.data,{id:b.id}):_.merge(c,b):a.query.status===b.status&&a.gridOptions.data.push(b)}}),i.socket.on("openchannel_room:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})})["catch"](function(a){console.error(a)})["finally"](function(){h.stop("spinner-grid")})},a.deleteItem=o.confirm["delete"](function(b){var c={id:b};return console.log(c),k["delete"](c).$promise.then(function(){a.getPage(),p.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})}),a.deleteItems=o.confirm["delete"](function(){var b={ids:a.id};return k["delete"](b).$promise.then(function(){a.getPage(),p.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.inbox.view.account.list",{url:"/list",templateUrl:"app/channels/openchannel/inbox/view/account/list/list.html",controller:"OpenChannelInboxViewAccountListCtrl"})}]),angular.module("xCallyShuttleApp").controller("OpenChannelInboxViewModalAgentCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Agent","OpenChannelRoom","xAlert","roomId",function(a,b,c,d,e,f,g,h){a.initModal=function(){a.agents=[],a.item={agents:[]},e.get().$promise.then(function(b){b.rows.forEach(function(b){a.agents.push(b)})})["catch"](function(a){console.error(a)}),f.query({id:h,controller:"agents"}).$promise.then(function(b){b.forEach(function(b){a.agents.push(b),a.item.agents.push(b.id)})})["catch"](function(a){console.error(a)}),a.modal={dismissable:!0,title:"APPLICATION_MESSAGE_SEND_RETRY",text:"MESSAGE_MESSAGE_SEND_RETRY",buttons:[{classes:"btn btn-success",text:"APPLICATION_RETRY",click:function(a){b.close(a)}},{classes:"btn default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]}},a.ok=function(){return f.update({id:h,controller:"agents",agents:a.item.agents}).$promise.then(function(){g.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close()})["catch"](function(a){console.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("OpenChannelInboxViewCtrl",["$scope","$location","$stateParams","$translate","$uibModal","socket","Auth","xAlert","OpenChannelRoom","OpenChannelAccount","localStorageService",function(a,b,c,d,e,f,g,h,i,j,k){a.initView=function(){j.get().$promise.then(function(c){var d=null;a.Accounts=c.rows,a.Accounts.length&&(d="/channels/openchannel/inbox/view/account/"+(k.get("openchannelAccountId")||a.Accounts[0].id)+"/list"),d&&b.path(d)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.inbox.view",{url:"/view",templateUrl:"app/channels/openchannel/inbox/view/view.html",controller:"OpenChannelInboxViewCtrl",reload:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/inbox.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("OpenChannelInboxViewModalStatusCtrl",["$scope","$uibModalInstance","closed","OpenChannelAccount","accountId",function(a,b,c,d,e){a.modal={title:"APPLICATION_CONFIRM_CLOSE",text:"MESSAGE_ARE_YOU_SURE_YOU_WANT_TO_CLOSE"},a.initDisposition=function(){return d.get({accountId:e,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a)})},a.item={},a.closed=c,a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").controller("OpenChannelInboxViewModalTagCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Tag","OpenChannelRoom","xAlert","id",function(a,b,c,d,e,f,g,h){a.initModal=function(){return a.tags=[],a.item={tags:[]},a.modal={dismissable:!0,title:"APPLICATION_MESSAGE_SEND_RETRY",text:"MESSAGE_MESSAGE_SEND_RETRY",buttons:[{"class":"btn-success",text:"APPLICATION_TAG",click:function(){var d={status:!0};return f.patch({id:h},{tags:a.item.tags}).$promise.then(function(){g.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(){d.status=!1,g.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){b.close(d)})}},{"class":"default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]},e.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel",{url:"/openchannel",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:20}}})}]),angular.module("xCallyShuttleApp").factory("OpenChannelReport",["$resource",function(a){return a("/api/report/openchannel/:id/:controller1/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("OpenChannelRoom",["$resource",function(a){return a("/api/openchannel/rooms/:id/:controller",{id:"@id",controller:"@controller"},{update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").factory("OpenChannelMessage",["$resource",function(a){return a("/api/openchannel/messages/:id/:controller",{id:"@id",controller:"@controller"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("OpenChannelQueueListCtrl",["$scope","OpenChannelQueue","gridOptions","$uibModal","xAlert","Auth",function(a,b,c,d,e,f){a.initView=function(){a.Auth=f;var d={exporterCsvFilename:"openchanel_queues.csv",columnDefs:[{name:"name"},{name:"description"},{name:"timeout"},{name:"strategy"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/openchannel/queues/view/{{row.entity.id}}/settings",name:"settings"},{"class":"green-meadow",href:"/channels/openchannel/queues/view/{{row.entity.id}}/agents",name:"agents",hide:"user"===f.getCurrentUser().role},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){var b=d.open({animation:!0,templateUrl:"app/channels/openchannel/queue/list/list.create.modal.html",controller:"OpenChannelQueueListCreateCtrl",size:"lg"});b.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("OpenChannelQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","OpenChannelQueue","Team","strategies",function(a,b,c,d,e,f,g){
+a.form={},a.strategies=g,a.item={penalty:0,agents:[]},a.getTeams=function(){return f.get({controller:"associations"}).$promise.then(function(b){a.teams=b.rows}).then(function(){ComponentsDropdowns.bindQueue(a.teams,[],function(){return{select:function(b){a.item.agents=_.union(a.item.agents,b)},deselect:function(b){a.item.agents=_.difference(a.item.agents,b)}}})})["catch"](function(a){console.error(a)})},a.save=function(){return console.log(a.item),e.save(a.item).$promise.then(function(a){b.close(a)})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.queues.list",{url:"/list",templateUrl:"app/channels/openchannel/queue/list/list.html",controller:"OpenChannelQueueListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").factory("OpenChannelQueue",["$resource",function(a){return a("/api/openchannel/queues/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.queues",{url:"/queues",template:"<div ui-view></div>",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:47}}})}]),angular.module("xCallyShuttleApp").controller("OpenChannelQueueViewCtrl",["$scope","$http","Auth","$translate","$stateParams","xAlert","Team","OpenChannelQueue","strategies",function(a,b,c,d,e,f,g,h,i){a.strategies=i,a.Auth=c;var j=function(){return{select:function(b){return h.save({id:a.queue.id,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(b){console.log("sel",b),a.getTeams()})["catch"](function(a){console.error(a)})},deselect:function(b){return h["delete"]({id:a.queue.id,controller:"agents",agents:b}).$promise.then(function(b){console.log("desel",b),a.getTeams()})["catch"](function(a){console.error(a)})}}};a.getQueue=function(){return h.get({id:e.id}).$promise.then(function(b){b.penalty=0,a.queue=b})["catch"](function(a){console.error(a)})},a.updateQueue=function(){return h.update({id:e.id},{name:a.queue.name,description:a.queue.description,timeout:a.queue.timeout,strategy:a.queue.strategy}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.getTeams=function(){return g.get({controller:"associations"}).$promise.then(function(b){return a.teams=b.rows,console.log(b.rows),h.get({id:e.id,controller:"agents"}).$promise}).then(function(b){console.log(b),ComponentsDropdowns.bindQueue(a.teams,_.map(b.rows,function(a){return{id:a.id,penalty:a.UserHasOpenchannelQueue.penalty}}),j)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.queues.view",{url:"/view/:id",templateUrl:"app/channels/openchannel/queue/view/view.html",controller:"OpenChannelQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.openchannel.queues.view.settings",{url:"/settings",templateUrl:"app/channels/openchannel/queue/view/view.settings.html"}).state("main.channels.openchannel.queues.view.agents",{url:"/agents",templateUrl:"app/channels/openchannel/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:49}}})}]),angular.module("xCallyShuttleApp").controller("OpenChannelRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","OpenChannelQueue","usSpinnerService","$q","uiGridConstants",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){return k.spin("grid-spinner"),g.get(s).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){p(a)})})["catch"](function(a){f.error(a)})["finally"](function(){k.stop("grid-spinner")})}function o(){e.socket.on("agent:save",function(b){b=b.newValues||b;var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});c&&(c.online=_.has(b,"online")?b.online:c.online,c.lastLoginAt=_.has(b,"lastLoginAt")?b.lastLoginAt:c.lastLoginAt,c.pause=_.has(b,"smsPause")?b.openchannelPause:c.openchannelPause,c.pauseType=_.has(b,"pauseType")?b.pauseType:c.pauseType,c.lastPauseAt=_.has(b,"lastPauseAt")?b.lastPauseAt:c.lastPauseAt,c.ipaddr=_.has(b,"ipaddr")?b.ipaddr:c.ipaddr,c.port=_.has(b,"port")?b.port:c.port,c.fullcontact=_.has(b,"fullcontact")?b.fullcontact:c.fullcontact,c.useragent=_.has(b,"useragent")?b.useragent:c.useragent,c.lastms=_.has(b,"lastms")?b.lastms:c.lastms,c.internal=_.has(b,"internal")?b.internal:c.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=_.has(b,"online")?b.online:a.online)}))}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_openchannel_queue:save",function(b){console.log("new queue",b);var c=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0}),d=a.gridOptions.data.indexOf(c);a.gridOptions.data.splice(d+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,queueId:b.OpenchannelQueueId,agent:b.membername,online:c.online})}),e.socket.on("user_has_openchannel_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queueId:b.OpenchannelQueueId})})}function p(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.openchannelPause,pauseType:b.pauseType,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.OpenchannelQueues.forEach(function(c){a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,queueId:c.id,agent:b.name,online:b.online})})}function q(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.error(a)})}function r(){return j.get().$promise.then(function(b){a.openchannelQueues=b.rows,e.syncUpdates("openchannel_queue",a.openchannelQueues)})["catch"](function(a){f.error(a)})}a.openchannelQueues=[];var s={controller:"realtime",controller1:"openchannel",offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="fa" data-ng-class="{\'font-green\':row.entity.online, \'font-red\':!row.entity.online,\'fa-user\':row.entity.online,\'fa-user-times\':!row.entity.online}"></i> <span data-ng-if="row.entity.online" class="left-margin">(<css-timer start-time="row.entity.lastLoginAt"></css-timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"openchannelPause",displayName:"APPLICATION_PAUSE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.pause != null && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="fa fa-play font-green pointer-cursor left-margin" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="fa fa-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select> <span data-ng-if="row.entity.pause" class="left-margin">({{row.entity.pauseType}})</span><span class="left-margin"><css-timer data-ng-if="row.entity.pause" start-time="row.entity.lastPauseAt"></css-timer></span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"PAUSED"},{value:"false",label:"NOT PAUSED"}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queueId" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queueId)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.openchannelQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?s.order=null:s.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),n()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){s.offset=(a-1)*b,s.limit=b,n()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?s[a.name]=a.filters[0].term:delete s[a.name]}),n()})}},n(),q(),r(),$timeout(function(){o()})};var t=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_openchannel_queue")}),a.pause=function(b,c,e){return e&&(a.pauseType=null),i.save({name:c,agent:b,type:e||"DEFAULT PAUSE",data4:e||"DEFAULT PAUSE",channel:"openchannel"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/openchannel/realtime/view/agent/queue.modal.add.html",controller:"OpenChannelRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.openchannelQueues,function(b){return!!_.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})})}}});g.result.then(function(b){return i.save({name:"QueueAdd",agent:e,queues:_.filter(a.openchannelQueues,function(a){return _.includes(b.queues,a.id)}),channel:"openchannel",data1:e,data3:b.queues.join(","),data4:"openchannel"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queueId:b,channel:"openchannel",data1:a,data3:b,data4:"openchannel"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/openchannel/realtime/view/agent/agent.modal.info.html",controller:"OpenChannelRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/openchannel/realtime/view/agent/agent.html",controller:"OpenChannelRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("OpenChannelRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("OpenChannelRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("OpenChannelRealtimeViewApplicationCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","ReportOpenChannelSession","usSpinnerService","$q","uiGridConstants","$timeout",function(a,b,c,d,e,f,g,h,i,j,k){function l(){return h.spin("spinner-grid"),g.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){m(),h.stop("spinner-grid")})}function m(){e.socket.on("report_openchannel_session:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&k(function(){_.remove(a.gridOptions.data,{id:b.id})},1e4)):b.leaveAt||a.gridOptions.data.push(b)}),e.socket.on("report_openchannel_session:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})}a.moment=moment,a.initApplications=function(){a.gridOptions={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"uniqueid",displayName:"APPLICATION_UNIQUEID",headerCellFilter:"translate"},{name:"accountname",displayName:"APPLICATION_ACCOUNT",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span> <span data-ng-if="!row.entity.leaveAt">[<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</span></div>"},{name:"queuename",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.queuename || ''}}</span></div>"}],data:[],gridMenuTitleFilter:function(a){var b=i.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){n(a.gridOptions.data.length)})}},l()};var n=function(a){var b=a?30*a+60:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("report_openchannel_session")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.realtime.view.applications",{url:"/applications",templateUrl:"app/channels/openchannel/realtime/view/application/application.html",controller:"OpenChannelRealtimeViewApplicationCtrl"})}]),angular.module("xCallyShuttleApp").controller("OpenChannelRealtimeViewCtrl",["$scope","$state",function(a,b){a.agents=[{name:"Queues",link:"main.channels.openchannel.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.openchannel.realtime.view.agents.timeline"}],a.sessions=[{name:"Sessions",link:"main.channels.openchannel.realtime.view.sessions"}],a.tree={queues:[{name:"Queues",link:"main.channels.openchannel.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.openchannel.realtime.view.agents.timeline"}],sessions:[{name:"Sessions",link:"main.channels.openchannel.realtime.view.sessions"}]}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.openchannel.realtime.view",{url:"/view",templateUrl:"app/channels/openchannel/realtime/view/view.html",controller:"OpenChannelRealtimeViewCtrl"})}]),angular.module("xCallyShuttleApp").factory("ReportOpenChannelSession",["$resource",function(a){return a("/api/report/openchannel/sessions/:id/:controller/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:12}}})}]),angular.module("xCallyShuttleApp").controller("RealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","usSpinnerService","$q","uiGridConstants","$timeout",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(b){return j.spin("grid-spinner"),g.get(q).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){b&&m(function(){o()}),j.stop("grid-spinner")})}function o(){e.socket.on("agent:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id});c&&_.merge(c,b)}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})}function p(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.error(a)})}var q={controller:"realtime",offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.name}} &lt;{{row.entity.internal}}&gt;</div>"},{name:"online",displayName:"APPLICATION_ONLINE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null"><i class="fa" data-ng-class="{\'font-green\':row.entity.online, \'font-red\':!row.entity.online,\'fa-user\':row.entity.online,\'fa-user-times\':!row.entity.online}"></i> <span data-ng-if="row.entity.online" class="left-margin">(<css-timer start-time="row.entity.lastLoginAt"></css-timer>)</span></div>',filter:{type:l.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"pauseStatus",displayName:"APPLICATION_PAUSE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span class="left-margin"><i data-ng-if="row.entity.voicePause || row.entity.mailPause || row.entity.chatPause || row.entity.faxPause || row.entity.smsPause" data-ng-click="grid.appScope.pause(row.entity.id,\'unpause\',null,null)" class="fa fa-play font-green pointer-cursor" title="{{\'APPLICATION_RESUME\' | translate}}"></i> <i class="fa fa-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.id,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i></span><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.id,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select><span data-ng-if="row.entity.voicePause || row.entity.mailPause || row.entity.chatPause || row.entity.faxPause || row.entity.smsPause"> [{{row.entity.pauseType}}][<css-timer start-time="row.entity.lastPauseAt"></css-timer>]</span></div>'},{name:"voicePause",displayName:"APPLICATION_VOICE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online" data-ng-class="{\'paused-agent\':row.entity.voicePause}"><span class="left-margin"><i data-ng-if="row.entity.voicePause" data-ng-click="grid.appScope.pause(row.entity.id,\'unpause\',null,\'voice\')" class="fa fa-play font-green pointer-cursor" title="{{\'APPLICATION_RESUME\' | translate}}"></i></span></div>',filter:{type:l.filter.SELECT,selectOptions:[{value:"true",label:d.instant("APPLICATION_PAUSED")},{value:"connect",label:d.instant("APPLICATION_NOT_PAUSED")}]},enableSorting:!1,enableColumnMenu:!1},{name:"mailPause",displayName:"APPLICATION_MAIL",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online" data-ng-class="{\'paused-agent\':row.entity.mailPause}"><span class="left-margin"><i data-ng-if="row.entity.mailPause" data-ng-click="grid.appScope.pause(row.entity.id,\'unpause\',null,\'mail\')" class="fa fa-play font-green pointer-cursor" title="{{\'APPLICATION_RESUME\' | translate}}"></i></span></div>',filter:{type:l.filter.SELECT,selectOptions:[{value:"true",label:d.instant("APPLICATION_PAUSED")},{value:"connect",label:d.instant("APPLICATION_NOT_PAUSED")}]},enableSorting:!1,enableColumnMenu:!1},{name:"chatPause",displayName:"APPLICATION_CHAT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online" data-ng-class="{\'paused-agent\':row.entity.chatPause}"><span class="left-margin"><i data-ng-if="row.entity.chatPause" data-ng-click="grid.appScope.pause(row.entity.id,\'unpause\',null,\'chat\')" class="fa fa-play font-green pointer-cursor" title="{{\'APPLICATION_RESUME\' | translate}}"></i></span></div>',filter:{type:l.filter.SELECT,selectOptions:[{value:"true",label:d.instant("APPLICATION_PAUSED")},{value:"connect",label:d.instant("APPLICATION_NOT_PAUSED")}]},enableSorting:!1,enableColumnMenu:!1},{name:"faxPause",displayName:"APPLICATION_FAX",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online" data-ng-class="{\'paused-agent\':row.entity.faxPause}"><span class="left-margin"><i data-ng-if="row.entity.faxPause" data-ng-click="grid.appScope.pause(row.entity.id,\'unpause\',null,\'fax\')" class="fa fa-play font-green pointer-cursor" title="{{\'APPLICATION_RESUME\' | translate}}"></i></span></div>',filter:{type:l.filter.SELECT,selectOptions:[{value:"true",label:d.instant("APPLICATION_PAUSED")},{value:"connect",label:d.instant("APPLICATION_NOT_PAUSED")}]},enableSorting:!1,enableColumnMenu:!1},{name:"smsPause",displayName:"APPLICATION_SMS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online" data-ng-class="{\'paused-agent\':row.entity.smsPause}"><span class="left-margin"><i data-ng-if="row.entity.smsPause" data-ng-click="grid.appScope.pause(row.entity.id,\'unpause\',null,\'sms\')" class="fa fa-play font-green pointer-cursor" title="{{\'APPLICATION_RESUME\' | translate}}"></i></span></div>',filter:{type:l.filter.SELECT,selectOptions:[{value:"true",label:d.instant("APPLICATION_PAUSED")},{value:"connect",label:d.instant("APPLICATION_NOT_PAUSED")}]},enableSorting:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=k.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){r(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?q.order=null:q.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),n()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){q.offset=(a-1)*b,q.limit=b,n()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?q[a.name]=a.filters[0].term:delete q[a.name]}),n()})}},n(!0),p()};var r=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent")}),a.pause=function(b,c,e,g){return e&&(a.pauseType=null),i.save({name:c,agent:b,type:e||"DEFAULT PAUSE",data4:e||"DEFAULT PAUSE",channel:g||"all"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/realtime/view/agent/agent.html",controller:"RealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("RealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("RealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("RealtimeViewCtrl",["$scope",function(a){}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.realtime.view",{url:"/view",templateUrl:"app/channels/realtime/view/view.html",controller:"RealtimeViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("ReportCall",["$resource",function(a){return a("/api/report/calls/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ReportDial",["$resource",function(a){return a("/api/report/dials/:id/:controller/:controller2",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("SmsAccount",["$resource",function(a){return a("/api/sms/accounts/:accountId/:controller/:id",{id:"@accountId"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts",{url:"/accounts",template:"<div ui-view></div>",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:42}}})}]),angular.module("xCallyShuttleApp").controller("SmsAccountListCtrl",["$scope","SmsAccount","gridOptions","$stateParams","xAlert","$translate",function(a,b,c,d,e,f){a.message="Hello",a.initView=function(){var e={exporterCsvFilename:"sms_accounts.csv",columnDefs:[{name:"id",displayName:"ID",cellClass:"text-center",width:75,enableSorting:!1,enableFiltering:!1},{name:"name"},{name:"description"},{name:"type",displayName:"APPLICATION_ACCOUNT_TYPE"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/sms/accounts/view/{{row.entity.id}}/settings",name:"profile"},{"class":"green-jungle",name:"check",onClick:"grid.appScope.checkAccount(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,e,a,{accountId:d.accountId})},a.checkAccount=function(a){return b.get({accountId:a,controller:"check"}).$promise.then(function(){e.show(f.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(a){e.show(f.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.list",{url:"/list",templateUrl:"app/channels/sms/account/list/list.html",controller:"SmsAccountListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.actions",{url:"/actions",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("SmsApplication",["$resource",function(a){return a("/api/sms/applications/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SmsAccountViewActionListCtrl",["$scope","gridOptions","SmsAccount","$http","$translate","$stateParams","xAlert",function(a,b,c,d,e,f,g){a.initActions=function(){var d={draggable:!0,exporterCsvFilename:"sms_applications.csv",enableSorting:!1,enableFiltering:!1,columnDefs:[{name:"app",cellClass:"text-center"},{name:"name",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span>{{row.entity.app == "queue" ? row.entity.SmsQueue.name : row.entity.User.name}}</span></div>'},{name:"timeout",cellClass:"text-center"},{name:"interval",displayName:"APPLICATION_TIME_INTERVAL",cellClass:"text-center",cellTemplate:"<div><span>{{row.entity.Interval ? row.entity.Interval.name : row.entity.interval}}</span></div>"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/channels/sms/accounts/view/{{row.entity.SmsAccountId}}/actions/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.app, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a,{accountId:f.accountId,controller:"applications"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.actions.list",{url:"/list",templateUrl:"app/channels/sms/account/view/action/list/list.html",controller:"SmsAccountViewActionListCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountViewActionViewCtrl",["$scope","$http","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","Agent","Interval","SmsQueue","SmsAccount","Template","MailAccount","SmsApplication",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initAction=function(){return a.$application=i.application,a.$stateParams=c,a.$interval=j.interval,a.forms={},a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"SendSMS",value:"sendSms"}],q.get({id:c.actionId}).$promise.then(function(b){if(a.application=b,a.application.alwaysTime=!1,a.application.IntervalId)a.application.intType="list";else switch(a.application.interval){case"*,*,*,*":a.application.intType="always";
+break;default:a.application.intType="custom"}if("always"===a.application.intType||"custom"===a.application.intType){var c=a.application.interval.split(",");"*"===c[0]?a.application.alwaysTime=!0:(a.application.t_from=moment(new Date),a.application.t_to=moment(new Date),a.application.t_from.hour(c[0].split("-")[0].split(":")[0]),a.application.t_from.minute(c[0].split("-")[0].split(":")[1]),a.application.t_to.hour(c[0].split("-")[1].split(":")[0]),a.application.t_to.minute(c[0].split("-")[1].split(":")[1])),"*"===c[1]?(a.application.wd_from="always",a.application.wd_to="always"):(a.application.wd_from=c[1].split("-")[0],a.application.wd_to=c[1].split("-")[1]),"*"===c[2]?(a.application.md_from="always",a.application.md_to="always"):(a.application.md_from=c[2].split("-")[0],a.application.md_to=c[2].split("-")[1]),"*"===c[3]?(a.application.m_from="always",a.application.m_to="always"):(a.application.m_from=c[3].split("-")[0],a.application.m_to=c[3].split("-")[1])}a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})})["catch"](function(a){f.error(a)})},a.getQueues=function(){return m.get().$promise.then(function(b){a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return k.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return l.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.getTemplates=function(){return o.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.getMailAccounts=function(){return p.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getSmsAccounts=function(){return n.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.updateItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var g,h,i,j,k;g=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(h=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(h+="-"+a.application.wd_to)):h="*",a.application.md_from&&"always"!==a.application.md_from?(i=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(i+="-"+a.application.md_to)):i="*",a.application.m_from&&"always"!==a.application.m_from?(j=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(j+="-"+a.application.m_to)):j="*",k=g+","+h+","+i+","+j,a.application.interval=k,a.application.IntervalId=null}return n.update({accountId:c.accountId,controller:"applications",id:c.actionId},a.application).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success"),e.path("/channels/sms/accounts/view/"+c.accountId+"/actions/list")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.actions.view",{url:"/view/:actionId",templateUrl:"app/channels/sms/account/view/action/view/view.html",controller:"SmsAccountViewActionViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountViewActionWizardCtrl",["$scope","$http","Agent","SmsQueue","Interval","$stateParams","$translate","$location","xAlert","WizardHandler","socket","application","interval","SmsAccount","Template","MailAccount",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.apps=[{name:"Queue",value:"queue"},{name:"Agent",value:"agent"},{name:"SendMail",value:"sendMail"},{name:"SendSMS",value:"sendSms"}],a.$application=l.application,a.$stateParams=f,a.$interval=m.interval,a.forms={},a.application={alwaysTime:!0},a.$watch("application.t_from",function(b){a.application.t_from_hm=moment(b).format("HH:mm")}),a.$watch("application.t_to",function(b){a.application.t_to_hm=moment(b).format("HH:mm")})},a.getQueues=function(){return d.get().$promise.then(function(b){console.log(b),a.queues=b.rows})["catch"](function(a){console.error(a)})},a.getAgents=function(){return c.get().$promise.then(function(b){a.agents=b.rows})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return e.get().$promise.then(function(b){a.intervals=b.rows})["catch"](function(a){console.error(a)})},a.getTemplates=function(){return o.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.getMailAccounts=function(){return p.get().$promise.then(function(b){a.mailAccounts=b.rows})["catch"](function(a){console.error(a)})},a.getSmsAccounts=function(){return n.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)})},a.createItem=function(){switch(a.application.intType){case"always":a.application.interval="*,*,*,*",a.application.IntervalId=null;break;case"list":var b=_.find(a.intervals,{id:a.application.IntervalId});a.application.interval=b?"":"*,*,*,*",a.application.IntervalId=b?a.application.IntervalId:null;break;case"custom":var c,d,e,j,k;c=a.application.t_from&&a.application.t_to&&!a.application.alwaysTime?moment(a.application.t_from).format("HH:mm")+"-"+moment(a.application.t_to).format("HH:mm"):"*",a.application.wd_from&&"always"!==a.application.wd_from?(d=a.application.wd_from,a.application.wd_to&&"always"!==a.application.wd_to&&(d+="-"+a.application.wd_to)):d="*",a.application.md_from&&"always"!==a.application.md_from?(e=a.application.md_from,a.application.md_to&&"always"!==a.application.md_to&&(e+="-"+a.application.md_to)):e="*",a.application.m_from&&"always"!==a.application.m_from?(j=a.application.m_from,a.application.m_to&&"always"!==a.application.m_to&&(j+="-"+a.application.m_to)):j="*",k=c+","+d+","+e+","+j,a.application.interval=k,a.application.IntervalId=null}return n.save({accountId:f.accountId,controller:"applications"},a.application).$promise.then(function(){i.show(g.instant("MESSAGE_WELL_DONE"),"success"),h.path("/channels/sms/accounts/view/"+f.accountId+"/actions/list")})["catch"](function(a){i.error(a)})},a.formValidation=function(a){return a},a.next=function(){j.wizard().next()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.actions.wizard",{url:"/wizard",templateUrl:"app/channels/sms/account/view/action/wizard/wizard.html",controller:"SmsAccountViewActionWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountApiViewCtrl",["$scope","SmsAccount","$http","$stateParams","clipboard","$translate","$location","xAlert",function(a,b,c,d,e,f,g,h){a.copyToClipboard=function(a){e.copyText(a),h.show(f.instant("MESSAGE_TEXT_COPIED_CLIPBOARD")+"!","success")},a.initView=function(){b.get({id:d.accountId}).$promise.then(function(b){a.account=b,a.deliveryurl=a.account.remote+"/api/sms/accounts/"+a.account.id+"/messageStatus",a.receiveurl=a.account.remote+"/api/sms/accounts/"+a.account.id+"/receive"})["catch"](function(a){h.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.api",{url:"/api",controller:"SmsAccountApiViewCtrl",templateUrl:"app/channels/sms/account/view/api/view/view.html"})}]),angular.module("xCallyShuttleApp").factory("SmsDisposition",["$resource",function(a){return a("/api/sms/dispositions/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SmsInboxViewModaDispositionAddCtrl",["$scope","$uibModalInstance","SmsAccount","id",function(a,b,c,d){a.ok=function(){return c.save({accountId:d,controller:"dispositions"},{name:a.name}).$promise.then(function(a){b.close(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("SmsAccountDispositionViewCtrl",["$scope","$stateParams","$uibModal","$translate","SmsAccount","xAlert",function(a,b,c,d,e,f){a.initView=function(){return e.get({accountId:b.accountId,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.updateDisposition=function(a,c){return e.update({accountId:b.accountId,controller:"dispositions",id:a},{name:c}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.deleteDisposition=function(c){return console.log("delete"),e.remove({accountId:b.accountId,controller:"dispositions",id:c}).$promise.then(function(){_.remove(a.dispositions,{id:c})})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addDisposition=function(){return c.open({animation:!0,templateUrl:"app/channels/sms/account/view/disposition/modal/add.modal.html",controller:"SmsInboxViewModaDispositionAddCtrl",resolve:{id:function(){return b.accountId}}}).result.then(function(b){b&&a.dispositions.push(b)})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.dispositions",{url:"/dispositions",controller:"SmsAccountDispositionViewCtrl",templateUrl:"app/channels/sms/account/view/disposition/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountHooksViewCtrl",["$scope","SmsAccount","Pause","$http","$stateParams","clipboard","$translate","$location","xAlert",function(a,b,c,d,e,f,g,h,i){a.account={},a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.initView=function(){a.types=[{value:"",name:"-- None --"},{name:"HTTP GET",value:"GET"},{name:"HTTP POST",value:"POST"}],c.get().$promise.then(function(b){a.pauses=b.rows})["catch"](function(a){i.error(a)}),b.get({id:e.accountId}).$promise.then(function(b){a.account=b,a.account.actions.length<1&&a.account.actions.push({action:"pause",enabled:!1,type:null})})["catch"](function(a){i.error(a)})},a.resetActionData=function(a){a.type=null},a.updateItemSmsAccount=function(){return console.log(a.account),b.update({id:e.accountId},a.account).$promise.then(function(){i.show(g.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){i.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.hooks",{url:"/hooks",controller:"SmsAccountHooksViewCtrl",templateUrl:"app/channels/sms/account/view/hooks/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountSettingViewCtrl",["$scope","SmsAccount","Pause","$http","$stateParams","clipboard","$translate","$location","xAlert","List",function(a,b,c,d,e,f,g,h,i,j){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.types=[{name:"HTTP GET",value:"GET"},{name:"HTTP POST",value:"POST"}],a.account={},a.initView=function(){j.get().$promise.then(function(b){a.lists=b.rows})["catch"](function(a){console.error(a)}),b.get({id:e.accountId}).$promise.then(function(b){a.account=b})["catch"](function(a){i.error(a)})},a.updateItemSmsAccount=function(){return b.update({id:e.accountId},a.account).$promise.then(function(){i.show(g.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){i.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view.settings",{url:"/settings",controller:"SmsAccountSettingViewCtrl",templateUrl:"app/channels/sms/account/view/setting/view/view.html"})}]),angular.module("xCallyShuttleApp").controller("SmsAccountViewCtrl",["$scope","SmsAccount","$http","$stateParams","clipboard","$translate","$location","xAlert","List",function(a,b,c,d,e,f,g,h,i){a.initView=function(){return a.account={},b.get({id:d.accountId}).$promise.then(function(b){a.account=b,console.log(b)})["catch"](function(a){h.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.view",{url:"/view/:accountId",templateUrl:"app/channels/sms/account/view/view.html",controller:"SmsAccountViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}})}]),angular.module("xCallyShuttleApp").controller("SmsAccountWizardCtrl",["$scope","$http","$location","$translate","WizardHandler","xAlert","SmsAccount",function(a,b,c,d,e,f,g){a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initWizard=function(){a.forms={},a.item={},a.item.remote=c.protocol()+"://"+location.host},a.goNext=function(){e.wizard().next()},a.formValidation=function(a){return a},a.createItem=function(){return console.log(a.item),g.save(a.item).$promise.then(function(){c.path("/channels/sms/accounts/list")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.accounts.wizard",{url:"/wizard",templateUrl:"app/channels/sms/account/wizard/wizard.html",controller:"SmsAccountWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.inbox",{url:"/inbox",template:"<div ui-view></div>",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:44}}})}]),angular.module("xCallyShuttleApp").directive("smsRoom",["$cookieStore","$translate","$uibModal","$timeout","Tag","CannedAnswer","Auth","SmsAccount","SmsRoom","SmsMessage","xAlert","usSpinnerService","socket","$stateParams","$rootScope",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){return{restrict:"E",scope:{workspace:"=",index:"=",submit:"&onSubmit"},templateUrl:"app/channels/sms/inbox/room/room.directive.html",link:function(a){a.modelOptions={debounce:{"default":500,blur:250},getterSetter:!0},a.panelLeft=null,a.panelRight="col-md-12",a.togglePanelLeft=function(){a.panelLeft?(a.panelLeft=null,a.panelRight="col-md-12"):(a.panelLeft="col-md-6",a.panelRight="col-md-6")},a.form={disabled:!1,from:"",to:a.workspace.data&&a.workspace.data.to?a.workspace.data.to:"",body:""},m.socket.on("sms_message:save",function(b){return a.workspace.id&&b.SmsRoomId==a.workspace.id?j.get({id:b.id}).$promise.then(function(b){a.SmsRoom||(a.SmsRoom={SmsMessages:[]});var c=_.findIndex(a.SmsRoom.SmsMessages,{id:b.id});c>-1?_.merge(a.SmsRoom.SmsMessages[c],b):a.SmsRoom.SmsMessages.unshift(b),a.panelLeft="col-md-6",a.panelRight="col-md-6"})["catch"](function(a){console.error(a)}):void 0}),m.socket.on("sms_message:update",function(b){if(a.SmsRoom&&b.SmsRoomId==a.workspace.id){var c=_.find(a.SmsRoom.SmsMessages,{id:b.id});c&&_.merge(c,b)}}),m.socket.on("sms_room:save",function(b){a.SmsRoom&&b.id==a.workspace.id&&(a.SmsRoom.status=b.status,a.SmsRoom.disposition=b.disposition)}),a.closeRoom=function(b){return c.open({animation:!0,templateUrl:"app/channels/sms/inbox/view/view.status.modal.html",controller:"SmsInboxViewModalStatusCtrl",resolve:{closed:function(){return"CLOSED"===a.SmsRoom.status},accountId:function(){return a.SmsRoom.SmsAccountId}}}).result.then(function(a){var c={id:b,status:"CLOSED"};return a.disposition&&(c.disposition=a.disposition),i.update(c).$promise["catch"](function(a){k.error(a)})})},a.openRoom=function(a,b){var c=_.find(o.workspaces,{id:a,type:"smsRoom"});c?c.active=!0:o.workspaces.push({id:a,name:b,type:"smsRoom","class":"glyphicon glyphicon-comment",active:!0})},e.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)}),h.get().$promise.then(function(b){a.smsAccounts=b.rows})["catch"](function(a){console.error(a)}),a.workspace.id?(a.panelLeft="col-md-6",a.panelRight="col-md-6",i.get({id:a.workspace.id}).$promise.then(function(b){a.SmsRoom=b,a.form.from=a.SmsRoom.SmsAccount.phone,a.form.to=a.SmsRoom.contact,a.form.tags=a.SmsRoom.tags})["catch"](function(a){console.error(a)})["finally"](function(){l.stop("spinner-grid"),a.form.disabled=!1})):l.stop("spinner-grid"),a.onSelect=function(){a.form.body+=a.modelOptions.selectedAnswer,delete a.modelOptions.selectedAnswer},a.onSelectAnswer=function(b){a.form.body+=b,a.selectedAnswer=""},a.getAnswers=function(a){return f.get({key:a}).$promise.then(function(a){return _.map(a.rows,"value")})},a.onChanged=function(){return i.patch({id:a.workspace.id},{tags:a.form.tags}).$promise["catch"](function(a){console.error(a)})},a.sendSMS=function(){l.spin("spinner-grid");var c=_.find(a.smsAccounts,{phone:a.form.from}),d={body:a.form.body,SmsRoomId:a.SmsRoom?a.SmsRoom.id:null};return"twilio"===c.type?(d.from=/^[\+][0-9]+$/.test(a.form.from)?a.form.from:"+"+a.form.from,d.to=/^[\+][0-9]+$/.test(a.form.to)?a.form.to:"+"+a.form.to):(d.from=/^[\+][0-9]+$/.test(a.form.from)?a.form.from.replace("+",""):a.form.from,d.to=/^[\+][0-9]+$/.test(a.form.to)?a.form.to.replace("+",""):a.form.to),c?h.save({accountId:c.id,controller:"send"},d).$promise.then(function(c){return k.show(b.instant("MESSAGE_WELL_DONE"),"success"),a.SmsRoom?a.SmsRoom:i.get({id:"messages",controller:c.id}).$promise}).then(function(b){b&&(a.form.body="",a.workspace.id=b.id,a.workspace.name=b.contact,a.SmsRoom=b,a.panelLeft="col-md-6",a.panelRight="col-md-6")})["catch"](function(a){k.error(a)})["finally"](function(){l.stop("spinner-grid")}):void console.log("Can not find account")}}}}]),angular.module("xCallyShuttleApp").controller("SmsInboxInfoModalCtrl",["$scope","$translate","$uibModalInstance","$stateParams","xAlert","data","uniqueId","ReportSquare",function(a,b,c,d,e,f,g,h){a.data=null,a.initInfo=function(){f&&(a.data=_.isEmpty(JSON.parse(f))?null:JSON.parse(f)),g&&h.get({controller:"show",uniqueid:g}).$promise.then(function(b){a.data={id:b.id,channel:b.channel,uniqueid:b.uniqueid,callerid:b.callerid,calleridname:b.calleridname,project_name:b.project_name,extension:b.extension}})["catch"](function(b){switch(b.status){case 404:a.data=null;break;default:e.error(b)}})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").directive("sms",["$rootScope","SmsMessage","List","xAlert","$translate","$uibModal",function(a,b,c,d,e,f){return{restrict:"E",scope:{smsMessage:"=message",accounttype:"=accounttype",listId:"="},templateUrl:"app/channels/sms/inbox/sms/sms.html",link:function(b){b.openContact=function(f){return b.listId?c.save({listId:b.listId,controller:"contacts"},{mobile:f}).$promise.then(function(b){var c=_.find(a.$root.workspaces,{contactID:b.id});c?c.active=!0:a.$root.workspaces.push({active:!0,"class":"icon-user",contactID:b.id,name:b.phone,type:"contact"})})["catch"](function(a){console.error(a)}):void d.show(e.instant("MESSAGE_NO_LIST_CONFIGURED"),"info")},b.info=function(a,b){f.open({animation:!0,templateUrl:"app/channels/sms/inbox/sms/info.modal.html",controller:"SmsInboxInfoModalCtrl",resolve:{data:function(){return b},uniqueId:function(){return a}}})}}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.inbox.view.account",{url:"/account/:id",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:11}}})}]),angular.module("xCallyShuttleApp").controller("SmsInboxViewAccountListCtrl",["$scope","$rootScope","$uibModal","$translate","$stateParams","$state","Tag","usSpinnerService","socket","SmsAccount","SmsRoom","gridOptions","uiGridConstants","Auth","Modal","xAlert","uibButtonConfig","localStorageService",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){a.initView=function(){q.activeClass="green-haze",a.id=[],a.isAdmin=n.isAdmin(),a.isAgent=n.isAgent(),a.uncheckable=!1,a.query={status:r.get("smsStatus")?r.get("smsStatus"):"NEW",tags:r.get("smsTags")?r.get("smsTags"):[]},a.$watch("query.status",function(){r.set("smsStatus",a.query.status),a.getPage()},!0),g.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)}),a.gridOptions={exporterCsvFilename:"sms_rooms.csv",enableRowHeaderSelection:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!1,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,enableSelectAll:!0,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,columnDefs:[{name:"lastEvent",displayName:"",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>             <span data-ng-class=\"{'icon-arrow-up font-green': row.entity.lastEvent === 'SENT',             'icon-arrow-up font-yellow': row.entity.lastEvent === 'SENDING',             'icon-arrow-down font-green': row.entity.lastEvent === 'RECEIVED',             'icon-close font-red': row.entity.lastEvent === 'FAILED',             'icon-question': !row.entity.lastEvent}\">             </span>             </div>",width:30,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"tags",displayName:"",headerCellTemplate:'<i class="icon-tag" style="margin-top: 8px; margin-left: 8px;"></i>',cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><i data-ng-class=\"row.entity.tags.length ? 'icon-tag' : ''\" title=\"{{row.entity.tags}}\"></i></div>",width:30,enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"id",displayName:"Id",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>#{{row.entity.id}}</span></div>",width:75,enableSorting:!1,enableFiltering:!0,enableColumnMenu:!1},{name:"contact",cellClass:"text-center"},{name:"disposition",cellClass:"text-center"},{name:"updatedAt",cellFilter:"date:'MM/dd/yyyy HH:mm'",width:120,enableSorting:!1,enableFiltering:!1,sort:{direction:m.DESC}},{name:"action",cellTemplate:'<div>             <a class="btn btn-icon-only font-green" data-ng-click="grid.appScope.openRoom(row.entity.id, row.entity.contact)"><i class="glyphicon glyphicon-comment" aria-hidden="true"></i></a>             <a class="btn btn-icon-only font-red" data-ng-show="grid.appScope.isAdmin" data-ng-click="grid.appScope.deleteItem(row.entity.id,row.entity.id)"><i class="fa fa-trash" aria-hidden="true"></i>             </div>',enableSorting:!1,cellClass:"ui-grid-vcenter",width:90,enableFiltering:!1,enableColumnMenu:!1}],data:[],onRegisterApi:function(b){a.gridApi=b,a.gridApi.selection&&(a.gridApi.selection.on.rowSelectionChanged(a,function(b){b.isSelected?a.id.push(a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id):_.pull(a.id,a.gridApi.grid.options.primaryKey?b.entity[a.gridApi.grid.options.primaryKey]:b.entity.id)}),a.gridApi.selection.on.rowSelectionChangedBatch(a,function(b){b[0].isSelected?a.id=_.union(a.id,_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id")):_.map(b,a.gridApi.grid.options.primaryKey?"entity."+a.gridApi.grid.options.primaryKey:"entity.id").forEach(function(b){_.pull(a.id,b)})}))}},i.socket.on("sms_room:remove",function(b){_.remove(a.workspaces,{id:b.id,type:"smsRoom"}),_.remove(a.gridOptions.data,{id:b.id})}),a.getPage(a.query)},a.onChanged=function(){a.getPage(a.query)},a.tagItems=function(){return c.open({animation:!0,templateUrl:"app/channels/sms/inbox/view/view.tags.modal.html",controller:"SmsInboxViewModalTagCtrl",resolve:{id:function(){return a.id}}}).result.then(function(){a.gridApi.selection.clearSelectedRows(),a.id=[],a.getPage()})},a.disposeItems=function(){return c.open({animation:!0,templateUrl:"app/channels/sms/inbox/view/view.status.modal.html",controller:"SmsInboxViewModalStatusCtrl",resolve:{accountId:function(){return e.id}}}).result.then(function(b){return console.log(b,a.id),k.patch({id:a.id},b).$promise.then(function(){a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})})},a.openRoom=function(b,c){var d=_.find(a.workspaces,{id:b,type:"smsRoom"});return d?d.active=!0:a.workspaces.push({id:b,name:c,type:"smsRoom","class":"glyphicon glyphicon-comment",active:!0}),b&&"agent"===n.getCurrentUser().role&&"PENDING"!==a.query.status&&"CLOSED"!==a.query.status?k.patch({id:b},{status:"OPEN",openReason:"agent"}).$promise["catch"](function(a){console.error(a)}):void 0},a.getPage=function(b){h.spin("spinner-grid");var c={accountId:e.id,controller:"rooms"};return b&&_.merge(c,b),a.query&&_.merge(c,a.query),j.query(c).$promise.then(function(b){r.set("smsAccountId",e.id),a.gridOptions.data=b,i.socket.on("sms_room:save",function(b){if(console.log("data",b),console.log(b.SmsAccountId,e.id),b.SmsAccountId==e.id){var c=_.find(a.gridOptions.data,{id:b.id});c?c.status!==b.status?_.remove(a.gridOptions.data,{id:b.id}):_.merge(c,b):a.query.status===b.status&&a.gridOptions.data.push(b)}}),i.socket.on("sms_room:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})})["catch"](function(a){console.error(a)})["finally"](function(){h.stop("spinner-grid")})},a.deleteItem=o.confirm["delete"](function(b){var c={id:b};return console.log(c),k["delete"](c).$promise.then(function(){a.getPage(),p.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})}),a.deleteItems=o.confirm["delete"](function(){var b={ids:a.id};return k["delete"](b).$promise.then(function(){a.getPage(),p.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),a.gridApi.selection.clearSelectedRows(),a.id=[]})["catch"](function(a){p.error(a)})})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.inbox.view.account.list",{url:"/list",templateUrl:"app/channels/sms/inbox/view/account/list/list.html",controller:"SmsInboxViewAccountListCtrl",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:11}}})}]),angular.module("xCallyShuttleApp").controller("SmsInboxViewModalAgentCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Agent","SmsRoom","xAlert","roomId",function(a,b,c,d,e,f,g,h){a.initModal=function(){a.agents=[],a.item={agents:[]},e.get().$promise.then(function(b){b.rows.forEach(function(b){a.agents.push(b)})})["catch"](function(a){console.error(a)}),f.query({id:h,controller:"agents"}).$promise.then(function(b){b.forEach(function(b){a.agents.push(b),a.item.agents.push(b.id)})})["catch"](function(a){console.error(a)}),a.modal={dismissable:!0,title:"APPLICATION_MESSAGE_SEND_RETRY",text:"MESSAGE_MESSAGE_SEND_RETRY",buttons:[{classes:"btn btn-success",text:"APPLICATION_RETRY",click:function(a){b.close(a)}},{classes:"btn default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]}},a.ok=function(){return f.update({id:h,controller:"agents",agents:a.item.agents}).$promise.then(function(){g.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close()})["catch"](function(a){console.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("SmsInboxViewCtrl",["$scope","$location","$stateParams","$translate","$uibModal","socket","Auth","xAlert","SmsRoom","SmsAccount","localStorageService",function(a,b,c,d,e,f,g,h,i,j,k){a.initView=function(){return j.get().$promise.then(function(c){var d=null;a.smsAccounts=c.rows,a.smsAccounts.length&&(d="/channels/sms/inbox/view/account/"+(k.get("smsAccountId")||a.smsAccounts[0].id)+"/list"),d&&b.path(d)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.inbox.view",{url:"/view",templateUrl:"app/channels/sms/inbox/view/view.html",controller:"SmsInboxViewCtrl",reload:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/inbox.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("SmsInboxViewModalStatusCtrl",["$scope","$uibModalInstance","SmsAccount","accountId",function(a,b,c,d){a.modal={title:"APPLICATION_CONFIRM_CLOSE",text:"MESSAGE_ARE_YOU_SURE_YOU_WANT_TO_CLOSE_THE_SMS"},a.initDisposition=function(){return a.item={status:"CLOSED"},c.get({accountId:d,controller:"dispositions"}).$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a)})},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").controller("SmsInboxViewModalTagCtrl",["$scope","$uibModalInstance","$translate","$stateParams","Tag","SmsRoom","xAlert","id",function(a,b,c,d,e,f,g,h){console.log(h),a.initModal=function(){return a.tags=[],a.item={tags:[]},a.modal={dismissable:!0,title:"APPLICATION_MESSAGE_SEND_RETRY",text:"MESSAGE_MESSAGE_SEND_RETRY",buttons:[{"class":"btn-success",text:"APPLICATION_TAG",click:function(){var d={status:!0};return f.patch({id:h},{tags:a.item.tags}).$promise.then(function(){g.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(){d.status=!1,g.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})["finally"](function(){b.close(d)})}},{"class":"default",text:"APPLICATION_CANCEL",click:function(a){b.dismiss(a)}}]},e.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("SmsInboxViewModalTemplateCtrl",["$scope","$uibModalInstance","Template",function(a,b,c){a.initModal=function(){return a.item={},c.get().$promise.then(function(b){a.templates=b.rows})["catch"](function(a){console.error(a)})},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("SmsQueueListCtrl",["$scope","SmsQueue","gridOptions","$uibModal","xAlert","Auth",function(a,b,c,d,e,f){a.initView=function(){a.Auth=f;var d={exporterCsvFilename:"voice_queues.csv",columnDefs:[{name:"name"},{name:"description"},{name:"timeout"},{name:"strategy"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/sms/queues/view/{{row.entity.id}}/settings",name:"settings"},{"class":"green-meadow",href:"/channels/sms/queues/view/{{row.entity.id}}/agents",name:"agents",hide:"user"===f.getCurrentUser().role},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){var b=d.open({animation:!0,templateUrl:"app/channels/sms/queue/list/list.create.modal.html",controller:"SmsQueueListCreateCtrl",size:"lg"});b.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("SmsQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","SmsQueue","Team","strategies",function(a,b,c,d,e,f,g){a.form={},a.strategies=g,a.item={penalty:0,agents:[]},a.getTeams=function(){return f.get({controller:"associations"}).$promise.then(function(b){a.teams=b.rows}).then(function(){ComponentsDropdowns.bindQueue(a.teams,[],function(){return{select:function(b){a.item.agents=_.union(a.item.agents,b)},deselect:function(b){a.item.agents=_.difference(a.item.agents,b)}}})})["catch"](function(a){console.error(a)})},a.save=function(){return console.log(a.item),e.save(a.item).$promise.then(function(a){b.close(a)})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.queues.list",{url:"/list",templateUrl:"app/channels/sms/queue/list/list.html",controller:"SmsQueueListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({
+insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").factory("SmsQueue",["$resource",function(a){return a("/api/sms/queues/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.queues",{url:"/queues",template:"<div ui-view></div>",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:43}}})}]),angular.module("xCallyShuttleApp").controller("SmsQueueViewCtrl",["$scope","$http","Auth","$translate","$stateParams","xAlert","Team","SmsQueue","strategies",function(a,b,c,d,e,f,g,h,i){a.strategies=i,a.Auth=c;var j=function(){return{select:function(b){return h.save({id:a.queue.id,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(b){console.log("sel",b),a.getTeams()})["catch"](function(a){console.error(a)})},deselect:function(b){return h["delete"]({id:a.queue.id,controller:"agents",agents:b}).$promise.then(function(b){console.log("desel",b),a.getTeams()})["catch"](function(a){console.error(a)})}}};a.getQueue=function(){return h.get({id:e.id}).$promise.then(function(b){b.penalty=0,a.queue=b})["catch"](function(a){console.error(a)})},a.updateSmsQueue=function(){return h.update({id:e.id},{name:a.queue.name,description:a.queue.description,timeout:a.queue.timeout,strategy:a.queue.strategy}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.getTeams=function(){return g.get({controller:"associations"}).$promise.then(function(b){return a.teams=b.rows,console.log(b.rows),h.get({id:e.id,controller:"agents"}).$promise}).then(function(b){console.log(b),ComponentsDropdowns.bindSmsQueue(a.teams,_.map(b.rows,function(a){return{id:a.id,penalty:a.UserHasSmsQueue.penalty}}),j)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.queues.view",{url:"/view/:id",templateUrl:"app/channels/sms/queue/view/view.html",controller:"SmsQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.sms.queues.view.settings",{url:"/settings",templateUrl:"app/channels/sms/queue/view/view.settings.html"}).state("main.channels.sms.queues.view.agents",{url:"/agents",templateUrl:"app/channels/sms/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:45}}})}]),angular.module("xCallyShuttleApp").controller("SmsRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","SmsQueue","usSpinnerService","$q","uiGridConstants",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){return k.spin("grid-spinner"),g.get(s).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){p(a)})})["catch"](function(a){f.error(a)})["finally"](function(){k.stop("grid-spinner")})}function o(){e.socket.on("agent:save",function(b){b=b.newValues||b;var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});c&&(c.online=_.has(b,"online")?b.online:c.online,c.lastLoginAt=_.has(b,"lastLoginAt")?b.lastLoginAt:c.lastLoginAt,c.pause=_.has(b,"smsPause")?b.smsPause:c.smsPause,c.pauseType=_.has(b,"pauseType")?b.pauseType:c.pauseType,c.lastPauseAt=_.has(b,"lastPauseAt")?b.lastPauseAt:c.lastPauseAt,c.ipaddr=_.has(b,"ipaddr")?b.ipaddr:c.ipaddr,c.port=_.has(b,"port")?b.port:c.port,c.fullcontact=_.has(b,"fullcontact")?b.fullcontact:c.fullcontact,c.useragent=_.has(b,"useragent")?b.useragent:c.useragent,c.lastms=_.has(b,"lastms")?b.lastms:c.lastms,c.internal=_.has(b,"internal")?b.internal:c.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=_.has(b,"online")?b.online:a.online)}))}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_sms_queue:save",function(b){console.log("new queue",b);var c=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0}),d=a.gridOptions.data.indexOf(c);a.gridOptions.data.splice(d+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,queueId:b.SmsQueueId,agent:b.membername,online:c.online})}),e.socket.on("user_has_sms_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queueId:b.SmsQueueId})})}function p(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.smsPause,pauseType:b.pauseType,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.SmsQueues.forEach(function(c){a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,queueId:c.id,agent:b.name,online:b.online})})}function q(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.error(a)})}function r(){return j.get().$promise.then(function(b){a.smsQueues=b.rows,e.syncUpdates("sms_queue",a.smsQueues)})["catch"](function(a){f.error(a)})}a.smsQueues=[];var s={controller:"realtime",controller1:"sms",offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="fa" data-ng-class="{\'font-green\':row.entity.online, \'font-red\':!row.entity.online,\'fa-user\':row.entity.online,\'fa-user-times\':!row.entity.online}"></i> <span data-ng-if="row.entity.online" class="left-margin">(<css-timer start-time="row.entity.lastLoginAt"></css-timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"smsPause",displayName:"APPLICATION_PAUSE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.pause != null && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="fa fa-play font-green pointer-cursor left-margin" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="fa fa-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select> <span data-ng-if="row.entity.pause" class="left-margin">({{row.entity.pauseType}})</span><span class="left-margin"><css-timer data-ng-if="row.entity.pause" start-time="row.entity.lastPauseAt"></css-timer></span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"PAUSED"},{value:"false",label:"NOT PAUSED"}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queueId" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queueId)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.smsQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){t(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?s.order=null:s.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),n()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){s.offset=(a-1)*b,s.limit=b,n()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?s[a.name]=a.filters[0].term:delete s[a.name]}),n()})}},n(),q(),r(),$timeout(function(){o()})};var t=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_sms_queue")}),a.pause=function(b,c,e){return e&&(a.pauseType=null),i.save({name:c,agent:b,type:e||"DEFAULT PAUSE",data4:e||"DEFAULT PAUSE",channel:"sms"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/sms/realtime/view/agent/queue.modal.add.html",controller:"SmsRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.smsQueues,function(b){return!!_.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})})}}});g.result.then(function(b){return i.save({name:"QueueAdd",agent:e,queues:_.filter(a.smsQueues,function(a){return _.includes(b.queues,a.id)}),channel:"sms",data1:e,data3:b.queues.join(","),data4:"sms"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queueId:b,channel:"sms",data1:a,data3:b,data4:"sms"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/sms/realtime/view/agent/agent.modal.info.html",controller:"SmsRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/sms/realtime/view/agent/agent.html",controller:"SmsRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","$http","agent",function(a,b,c,d){a.agent=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("SmsRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("SmsRealtimeViewApplicationCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","ReportSmsSession","usSpinnerService","$q","uiGridConstants","$timeout",function(a,b,c,d,e,f,g,h,i,j,k){function l(){return h.spin("spinner-grid"),g.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){m(),h.stop("spinner-grid")})}function m(){e.socket.on("report_sms_session:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&k(function(){_.remove(a.gridOptions.data,{id:b.id})},1e4)):b.leaveAt||a.gridOptions.data.push(b)}),e.socket.on("report_sms_session:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})}a.moment=moment,a.initApplications=function(){a.gridOptions={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"uniqueid",displayName:"APPLICATION_UNIQUEID",headerCellFilter:"translate"},{name:"accountname",displayName:"APPLICATION_ACCOUNT",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span> <span data-ng-if="!row.entity.leaveAt">[<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</span></div>"},{name:"queuename",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.queuename || ''}}</span></div>"}],data:[],gridMenuTitleFilter:function(a){var b=i.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){n(a.gridOptions.data.length)})}},l()};var n=function(a){var b=a?30*a+60:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("report_sms_session")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.realtime.view.applications",{url:"/applications",templateUrl:"app/channels/sms/realtime/view/application/application.html",controller:"SmsRealtimeViewApplicationCtrl"})}]),angular.module("xCallyShuttleApp").controller("SmsRealtimeViewCtrl",["$scope","$state",function(a,b){a.agents=[{name:"Queues",link:"main.channels.sms.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.sms.realtime.view.agents.timeline"}],a.sessions=[{name:"Sessions",link:"main.channels.sms.realtime.view.sessions"}],a.tree={queues:[{name:"Queues",link:"main.channels.sms.realtime.view.agents.queues"},{name:"Timeline",link:"main.channels.sms.realtime.view.agents.timeline"}],sessions:[{name:"Sessions",link:"main.channels.sms.realtime.view.sessions"}]}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms.realtime.view",{url:"/view",templateUrl:"app/channels/sms/realtime/view/view.html",controller:"SmsRealtimeViewCtrl"})}]),angular.module("xCallyShuttleApp").factory("ReportSmsSession",["$resource",function(a){return a("/api/report/sms/sessions/:id/:controller/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.sms",{url:"/sms",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:11}}})}]),angular.module("xCallyShuttleApp").factory("SmsQueue",["$resource",function(a){return a("/api/sms/queues/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("SmsReport",["$resource",function(a){return a("/api/report/sms/:id/:controller1/:controller2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("SmsMessage",["$resource",function(a){return a("/api/sms/messages/:id/:controller",{id:"@id",controller:"@controller"},{update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").factory("SmsRoom",["$resource",function(a){return a("/api/sms/rooms/:id/:controller",{id:"@id",controller:"@controller"},{update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").factory("ChanSpy",["$resource",function(a){return a("/api/chanspy/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.chanspy",{url:"/chanspy",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:27}}})}]),angular.module("xCallyShuttleApp").controller("ChanSpyListCtrl",["$scope","$uibModal","ChanSpy","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"chanspy.csv",columnDefs:[{name:"name"},{name:"prefix"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/voice/chanspy/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/channels/voice/chanspy/list/list.create.modal.html",controller:"ChanSpyListCreateCtrl"});c.result.then(function(b){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("ChanSpyListCreateCtrl",["$scope","$translate","$uibModalInstance","ChanSpy","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.options=[{name:"APPLICATION_CHANSPY_OPTION_b",value:"b"},{name:"APPLICATION_CHANSPY_OPTION_B",value:"B"},{name:"APPLICATION_CHANSPY_OPTION_E",value:"E"},{name:"APPLICATION_CHANSPY_OPTION_o",value:"o"},{name:"APPLICATION_CHANSPY_OPTION_q",value:"q"},{name:"APPLICATION_CHANSPY_OPTION_s",value:"s"},{name:"APPLICATION_CHANSPY_OPTION_S",value:"S"},{name:"APPLICATION_CHANSPY_OPTION_w",value:"w"},{name:"APPLICATION_CHANSPY_OPTION_W",value:"W"}],a.save=function(){return a.item.options=a.item.options.join(""),d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.chanspy.list",{url:"/list",templateUrl:"app/channels/voice/chanspy/list/list.html",controller:"ChanSpyListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ChanSpyViewCtrl",["$scope","$translate","$stateParams","xAlert","ChanSpy",function(a,b,c,d,e){a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.options=[{name:"APPLICATION_CHANSPY_OPTION_b",value:"b"},{name:"APPLICATION_CHANSPY_OPTION_B",value:"B"},{name:"APPLICATION_CHANSPY_OPTION_E",value:"E"},{name:"APPLICATION_CHANSPY_OPTION_o",value:"o"},{name:"APPLICATION_CHANSPY_OPTION_q",value:"q"},{name:"APPLICATION_CHANSPY_OPTION_s",value:"s"},{name:"APPLICATION_CHANSPY_OPTION_S",value:"S"},{name:"APPLICATION_CHANSPY_OPTION_w",value:"w"},{name:"APPLICATION_CHANSPY_OPTION_W",value:"W"}],a.getChanSpy=function(){return e.get({id:c.id}).$promise.then(function(b){b.options=b.options.split(""),a.chanspy=b})["catch"](function(a){d.error(a)})},a.updateChanSpy=function(){var f=angular.copy(a.chanspy);return f.options=f.options.join(""),e.update({id:c.id},f).$promise.then(function(){d.show(b.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.chanspy.view",{url:"/view/:id",templateUrl:"app/channels/voice/chanspy/view/view.html",controller:"ChanSpyViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.chanspy.view.settings",{url:"/settings",templateUrl:"app/channels/voice/chanspy/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("VoiceContext",["$resource",function(a){return a("/api/voice/contexts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.contexts",{url:"/contexts",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:22}}})}]),angular.module("xCallyShuttleApp").controller("VoiceContextListCtrl",["$scope","VoiceContext","gridOptions","$uibModal","xAlert","$translate",function(a,b,c,d,e,f){a.initView=function(){var d={exporterCsvFilename:"voice_contexts.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:75,buttons:[{"class":"{{row.entity.defaultEntry ? 'blue-hoki disabled' : 'blue-hoki'}}",href:"/channels/voice/contexts/view/{{row.entity.id}}/settings",name:"settings"},{"class":"{{row.entity.defaultEntry ? 'red-sunglo disabled' : 'red-sunglo'}}",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){var c=d.open({animation:!0,templateUrl:"app/channels/voice/context/list/create.modal.html",controller:["$scope","$uibModalInstance",function(a,b){a.form={},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]});c.result.then(function(c){return b.save(c).$promise.then(function(){a.gridOptions.getPage(),e.show(f.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){e.error(a)})})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.contexts.list",{url:"/list",templateUrl:"app/channels/voice/context/list/list.html",controller:"VoiceContextListCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceContextViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location",function(a,b,c,d,e,f){a.getContext=function(){b.get("/api/voice/contexts/"+e.id).success(function(b){a.context=b}).error(function(a){console.error(a),f.path("/voice/contexts/list")})},a.updateVoiceContext=function(){var f=angular.copy(a.context);b.put("/api/voice/contexts/"+e.id,f).success(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(b){c.error(b),a.context=f})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.contexts.view",{url:"/view/:id",templateUrl:"app/channels/voice/context/view/view.html",controller:"VoiceContextViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.contexts.view.settings",{url:"/settings",templateUrl:"app/channels/voice/context/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.dispositions",{url:"/dispositions",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:28}}})}]),angular.module("xCallyShuttleApp").controller("VoiceDispositionListCtrl",["$scope","$stateParams","$uibModal","$translate","VoiceDisposition","xAlert",function(a,b,c,d,e,f){a.initView=function(){return e.get().$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.updateDisposition=function(a,b){return e.update({id:a},{name:b}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.deleteDisposition=function(b){return e.remove({id:b}).$promise.then(function(){_.remove(a.dispositions,{id:b}),f.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){console.error(a),f.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addDisposition=function(){return c.open({animation:!0,templateUrl:"app/channels/voice/disposition/list/modal/add.modal.html",controller:"VoiceDispositionListModalDispositionAddCtrl"}).result.then(function(b){b&&(a.dispositions.push(b),f.show(d.instant("MESSAGE_WELL_DONE")+"!","success"))})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.dispositions.list",{url:"/list",templateUrl:"app/channels/voice/disposition/list/list.html",controller:"VoiceDispositionListCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceDispositionListModalDispositionAddCtrl",["$scope","$uibModalInstance","VoiceDisposition","xAlert","$translate",function(a,b,c,d,e){a.ok=function(){return c.save({name:a.name}).$promise.then(function(a){b.close(a)})["catch"](function(a){d.show(e.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").factory("VoiceDisposition",["$resource",function(a){return a("/api/voice/dispositions/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("VoiceMohListCtrl",["$scope","gridOptions","VoiceMoh","$uibModal","xAlert","$translate",function(a,b,c,d,e,f){a.initView=function(){var d={exporterCsvFilename:"voice_mohs.csv",columnDefs:[{name:"name"},{name:"directory"},{name:"sort"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/voice/mohs/view/{{row.entity.id}}/settings",name:"settings"},{"class":"{{row.entity.defaultEntry ? 'red-sunglo disabled' : 'red-sunglo'}}",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a)},a.createItem=function(){var b=d.open({animation:!0,templateUrl:"app/channels/voice/moh/list/create.modal.html",controller:["$scope","$uibModalInstance",function(a,b){a.form={},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]});b.result.then(function(b){return c.save(b).$promise.then(function(){a.gridOptions.getPage(),e.show(f.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.error(a)})})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.mohs.list",{url:"/list",templateUrl:"app/channels/voice/moh/list/list.html",controller:"VoiceMohListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("VoiceMoh",["$resource",function(a){return a("/api/voice/musiconholds/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.mohs",{url:"/mohs",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:24}}})}]),angular.module("xCallyShuttleApp").controller("VoiceMohViewCtrl",["$scope","$http","xAlert","$translate","VoiceMoh","$stateParams","socket","Modal","$sce","$location","Sound",function(a,b,c,d,e,f,g,h,i,j,k){a.$translate=d,a.audioSources={},a.sortOptions=[{value:"random",name:"APPLICATION_RANDOM"},{value:"alpha",name:"APPLICATION_ALPHABETICAL"}],a.getMoh=function(){return e.get({id:f.id}).$promise.then(function(b){delete b.stamp,a.moh=b})["catch"](function(a){c.error(a)})},a.updateVoiceMoh=function(){return console.log("update"),e.update({id:f.id},a.moh).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){c.error(a)})},a.addMohs=function(){return e.save({id:f.id,controller:"files"},a.item).$promise.then(function(){j.path("/channels/voice/mohs/view/"+f.id+"/audios")})["catch"](function(a){c.error(a)})},a.getAudioFiles=function(){return e.get({id:f.id,controller:"files"}).$promise.then(function(b){a.audioFiles=b.files,a.mohPath=b.path,a.audioFiles.forEach(function(a){l(a)})})["catch"](function(a){c.error(a)})},a.getSecureSrc=function(a){return i.trustAsResourceUrl(a)},a.getSounds=function(){return a.item={sounds:[]},k.get().$promise.then(function(b){a.soundList=b.rows})["catch"](function(a){c.error(a)})};var l=function(c){b.get("/api/voice/musiconholds/stream",{params:{path:encodeURI(a.mohPath+"/"+c)}}).success(function(b){a.audioSources[c]="data:audio/ogg;base64,"+b}).error(function(a){console.error(a)})};a.deleteItem=h.confirm["delete"](function(e){b["delete"]("/api/voice/musiconholds/"+f.id+"/files",{params:{filename:e}}).success(function(){_.remove(a.audioFiles,function(a){return a===e}),c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){c.error(a)})})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.mohs.view",{url:"/view/:id",templateUrl:"app/channels/voice/moh/view/view.html",controller:"VoiceMohViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.mohs.view.settings",{url:"/settings",templateUrl:"app/channels/voice/moh/view/view.settings.html"}).state("main.channels.voice.mohs.view.audios",{url:"/audios",templateUrl:"app/channels/voice/moh/view/view.audios.html",cache:!1}).state("main.channels.voice.mohs.view.add",{url:"/add",templateUrl:"app/channels/voice/moh/view/view.addFiles.html",cache:!1})}]),angular.module("xCallyShuttleApp").controller("VoiceQueueListCtrl",["$scope","$rootScope","$uibModal","VoiceQueue","gridOptions","Auth",function(a,b,c,d,e,f){a.initView=function(){a.Auth=f;var b={exporterCsvFilename:"voice_queues.csv",primaryKey:"name",columnDefs:[{name:"name"},{name:"strategy"},{name:"description"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/channels/voice/queues/view/{{row.entity.name}}/settings",name:"settings"},{"class":"green-meadow",href:"/channels/voice/queues/view/{{row.entity.name}}/agents",name:"agents",hide:"user"===f.getCurrentUser().role},{
+"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.name)"}]}]};a.gridOptions=e.gridOptions(d,b,a)},a.createItem=function(){var b=c.open({animation:!0,templateUrl:"app/channels/voice/queue/list/list.create.modal.html",controller:"VoiceQueueListCreateCtrl",size:"lg"});b.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("VoiceQueueListCreateCtrl",["$scope","$uibModalInstance","$translate","xAlert","VoiceQueue","Team",function(a,b,c,d,e,f){a.form={},a.item={penalty:0,agents:[]},a.getTeams=function(){return f.get({controller:"associations"}).$promise.then(function(b){a.teams=b.rows}).then(function(){ComponentsDropdowns.bindQueue(a.teams,[],function(){return{select:function(b){a.item.agents=_.union(a.item.agents,b),console.log(a.item.agents)},deselect:function(b){a.item.agents=_.difference(a.item.agents,b),console.log(a.item.agents)}}})})["catch"](function(a){console.error(a)})},a.save=function(){return e.save(a.item).$promise.then(function(a){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),b.close(a)})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.queues.list",{url:"/list",templateUrl:"app/channels/voice/queue/list/list.html",controller:"VoiceQueueListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.queues",{url:"/queues",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"landing"}}})}]),angular.module("xCallyShuttleApp").factory("ReportQueue",["$resource",function(a){return a("/api/report/queues/:id/:controller/:controller2",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("UserHasVoiceQueue",["$resource",function(a){return a("/api/voice/user_has_queues/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("VoiceQueueViewCtrl",["$scope","xAlert","$translate","$stateParams","socket","$location","VoiceQueue","VoiceContext","Team","Auth","VoiceMoh","Sound","Setting",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.penalty=0,a.Auth=j,a.binaryChoices=[{name:"Yes",value:1},{name:"No",value:0}],a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.autoPauseValues=[{name:"No",value:"no"},{name:"Yes",value:"all"}],a.monitorFormats=[{name:"wav",value:"wav"},{name:"gsm",value:"gsm"},{name:"Inactive",value:""}],a.queueAnnounces=[{display_name:"Default",path:null},{display_name:"Disabled",path:""}];var n=function(){return{select:function(b){return g.save({id:a.queue.name,controller:"agents"},{agents:b,penalty:a.queue.penalty}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})},deselect:function(b){return g["delete"]({id:a.queue.name,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})}}};a.getQueue=function(){return g.get({id:d.id}).$promise.then(function(b){b.joinempty=""===b.joinempty?[]:b.joinempty.split(","),b.leavewhenempty=""===b.leavewhenempty?[]:b.leavewhenempty.split(","),b.periodic_announce=""===b.periodic_announce?[]:b.periodic_announce.split(","),b.setinterfacevar="yes"===b.setinterfacevar,b.setqueuevar="yes"===b.setqueuevar,b.setqueueentryvar="yes"===b.setqueueentryvar,b.penalty=0,a.queue=b})["catch"](function(a){f.path("/channels/voice/queues/list")})},a.updateVoiceQueue=function(){var e=angular.copy(a.queue);return e.joinempty=e.joinempty.join(","),e.leavewhenempty=e.leavewhenempty.join(","),e.periodic_announce=e.periodic_announce.join(","),e.setinterfacevar=e.setinterfacevar?"yes":"no",e.setqueuevar=e.setqueuevar?"yes":"no",e.setqueueentryvar=e.setqueueentryvar?"yes":"no",e.context||(e.context=null),g.update({id:d.id},e).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.error(a)})},a.getTeams=function(){return i.get({controller:"associations"}).$promise.then(function(b){return a.teams=b.rows,g.get({id:d.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindQueue(a.teams,_.map(b.rows,function(a){return{id:a.id,penalty:a.UserHasVoiceQueue.penalty}}),n)})["catch"](function(a){console.error(a)})},a.getContexts=function(){return h.get().$promise.then(function(b){a.voiceContexts=b.rows})["catch"](function(a){b.error(data)})},a.getMohs=function(){return k.get().$promise.then(function(b){a.voiceMohs=b.rows,e.syncUpdates("voice_musiconhold",a.voiceMohs)})["catch"](function(a){b.error(a)})},a.getSounds=function(){var b;return m.get({id:1}).$promise.then(function(a){return b=a,l.get().$promise}).then(function(c){var d=b.soundPath||"/var/opt/motion/server/files/sounds/converted";_.forEach(c.rows,function(a){a.path=(d+"/"+a.save_name).replace(/\/+/g,"/").replace(/\\+/g,"\\")}),a.queueAnnounces=a.queueAnnounces.concat(c.rows),a.periodicAnnounces=angular.copy(c.rows),c.rows.unshift({display_name:"None",path:""}),a.sounds=c.rows,e.syncUpdates("sound",a.sounds)})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.queues.view",{url:"/view/:id",templateUrl:"app/channels/voice/queue/view/view.html",controller:"VoiceQueueViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.queues.view.settings",{url:"/settings",templateUrl:"app/channels/voice/queue/view/view.settings.html"}).state("main.channels.voice.queues.view.agents",{url:"/agents",templateUrl:"app/channels/voice/queue/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").factory("VoiceQueue",["$resource",function(a){return a("/api/voice/queues/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:26}}})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAbandonedCtrl",["$scope","$translate","socket","xAlert","ReportQueue","usSpinnerService","$q","Auth","uiGridConstants",function(a,b,c,d,e,f,g,h,i){function j(){return f.spin("spinner-grid"),e.get({controller:"abandoned",controller2:"all"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){d.error(a)})["finally"](function(){k(),f.stop("spinner-grid")})}function k(){c.socket.on("report_queue:update",function(b){b.queuecallerabandon&&a.gridOptions.data.unshift(b)})}a.radioSwitch={size:"mini",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"success",onColor:"danger"};a.initAbandoned=function(){a.agent=h.getCurrentUser(),a.gridOptions={exporterCsvFilename:"abandoned_calls.csv",enableRowHeaderSelection:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!1,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,enableSelectAll:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:1,columnDefs:[{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter"},{name:"calleridnum",displayName:"APPLICATION_CALLERIDNUM",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter"},{name:"updatedAt",displayName:"APPLICATION_DATE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.updatedAt | date:'yyyy-MM-dd HH:mm:ss'}}</div>"},{name:"lastAssignedTo",cellClass:"text-center ui-grid-vcenter",displayName:"APPLICATION_LAST_ASSIGNED_TO",headerCellFilter:"translate"},{name:"assigned",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellTemplate:'<div class="centered-uigrid-td"><input data-ng-change="grid.appScope.updateItem(row.entity)", bs-switch ng-model="row.entity.assigned" type="checkbox" switch-active="{{ !row.entity.assigned || grid.appScope.agent.name === row.entity.lastAssignedTo }}" switch-on-text="{{ \'APPLICATION_ASSIGNED\' | translate }}" switch-off-text="{{ \'APPLICATION_FREE\' | translate }}" switch-on-color="{{ grid.appScope.radioSwitch.onColor }}" switch-off-color="{{ grid.appScope.radioSwitch.offColor }}" switch-animate="{{ grid.appScope.radioSwitch.animate }}" switch-size="{{ grid.appScope.radioSwitch.size }}" switch-label="{{ grid.appScope.radioSwitch.label }}" switch-icon="{{ grid.appScope.radioSwitch.icon }}" switch-radio-off="{{ grid.appScope.radioSwitch.radioOff }}" switch-label-width="{{ grid.appScope.radioSwitch.labelWidth }}" switch-handle-width="{{ grid.appScope.radioSwitch.handleWidth }}"></div>',enableFiltering:!1}],data:[],gridMenuTitleFilter:function(a){var c=g.defer();return c.resolve(b.instant(a)),c.promise},onRegisterApi:function(b){a.gridApi=b}},j()},a.updateItem=function(c){return e.update({id:c.id},{assigned:c.assigned,lastAssignedTo:c.assigned?a.agent.name:void 0}).$promise.then(function(){d.show(b.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){d.error(a)})};a.$on("$destroy",function(){c.unsyncUpdates("report_queue")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.abandoned",{url:"/abandoned",templateUrl:"app/channels/voice/realtime/view/abandoned/abandoned.html",controller:"VoiceRealtimeViewAbandonedCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAgentCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Agent","Pause","Action","VoiceQueue","usSpinnerService","$q","uiGridConstants","Auth","$timeout",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){function p(){return k.spin("grid-spinner"),g.get(u).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){r(a)})})["catch"](function(a){f.error(a)})["finally"](function(){k.stop("grid-spinner")})}function q(){e.socket.on("agent:save",function(b){console.log(b),b=b.newValues||b;var c=_.find(a.gridOptions.data,{agentId:b.id,isAgent:!0});c&&(c.online=_.has(b,"online")?b.online:c.online,c.lastLoginAt=_.has(b,"lastLoginAt")?b.lastLoginAt:c.lastLoginAt,c.pause=_.has(b,"voicePause")?b.voicePause:c.pause,c.pauseType=_.has(b,"pauseType")?b.pauseType:c.pauseType,c.lastPauseAt=_.has(b,"lastPauseAt")?b.lastPauseAt:c.lastPauseAt,c.status=_.has(b,"status")?b.status:c.status,c.statusAt=_.has(b,"statusAt")?b.statusAt:c.statusAt,c.queueStatus=_.has(b,"queueStatus")?b.queueStatus:c.queueStatus,c.queueStatusAt=_.has(b,"queueStatusAt")?b.queueStatusAt:c.queueStatusAt,c.lastQueue=_.has(b,"lastQueue")?b.lastQueue:c.lastQueue,c.ipaddr=_.has(b,"ipaddr")?b.ipaddr:c.ipaddr,c.port=_.has(b,"port")?b.port:c.port,c.fullcontact=_.has(b,"fullcontact")?b.fullcontact:c.fullcontact,c.useragent=_.has(b,"useragent")?b.useragent:c.useragent,c.lastms=_.has(b,"lastms")?b.lastms:c.lastms,c.internal=_.has(b,"internal")?b.internal:c.internal,_.map(a.gridOptions.data,function(a){a.isAgent||a.agentId!==b.id||(a.online=_.has(b,"online")?b.online:a.online)}))}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.id})}),e.socket.on("user_has_voice_queue:save",function(b){var c=_.includes(_.map(a.CurrentUser.PVoiceQueues,"name"),b.queue)||n.isAdmin(),d=_.find(a.gridOptions.data,{agentId:b.UserId,queue:b.queue});if(!d&&b.logged&&c){var e=_.find(a.gridOptions.data,{agentId:b.UserId,isAgent:!0}),f=a.gridOptions.data.indexOf(e);a.gridOptions.data.splice(f+1,0,{isAgent:!1,agentId:b.UserId,queue:b.queue,agent:b.membername,callstaken:b.callstaken?b.callstaken:0,online:e.online})}else d&&!b.logged?_.remove(a.gridOptions.data,{agentId:b.UserId,queue:b.queue}):d&&b.logged&&c&&(d.callstaken=b.callstaken?b.callstaken:0)}),e.socket.on("user_has_voice_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queue:b.queue})})}function r(b){a.gridOptions.data.push({isAgent:!0,agentId:b.id,agent:b.name,online:b.online,lastLoginAt:b.lastLoginAt,lastPauseAt:b.lastPauseAt,pause:b.voicePause,pauseType:b.pauseType,status:b.status||"UNKNOWN",statusAt:b.statusAt,queueStatus:b.queueStatus||"READY",queueStatusAt:b.queueStatusAt,lastQueue:b.lastQueue,ipaddr:b.ipaddr,port:b.port,fullcontact:b.fullcontact,useragent:b.useragent,lastms:b.lastms,internal:b.internal,$$treeLevel:0}),b.VoiceQueues.forEach(function(c){c.UserHasVoiceQueue.logged&&a.gridOptions.data.push({isAgent:!1,agentId:b.id,queue:c.name,agent:b.name,callstaken:c.UserHasVoiceQueue.callstaken?c.UserHasVoiceQueue.callstaken:0,online:b.online})})}function s(){return h.get().$promise.then(function(b){a.pauses=b.rows,e.syncUpdates("pause",a.pauses)})["catch"](function(a){f.error(a)})}function t(){return j.get().$promise.then(function(b){a.voiceQueues=b.rows,e.syncUpdates("voice_queue",a.voiceQueues)})["catch"](function(a){f.error(a)})}a.voiceQueues=[];var u={controller:"realtime",controller1:"voice",offset:0,limit:10};a.moment=moment,a.initAgents=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.agent}} &lt;{{row.entity.internal}}&gt;</div>'},{name:"online",displayName:"APPLICATION_ONLINE",width:150,headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.online != null && row.entity.isAgent"><i class="fa" data-ng-class="{\'font-green\':row.entity.online, \'font-red\':!row.entity.online,\'fa-user\':row.entity.online,\'fa-user-times\':!row.entity.online}"></i> <span data-ng-if="row.entity.online" class="left-margin">(<css-timer start-time="row.entity.lastLoginAt"></css-timer>)</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"true",label:"ONLINE"},{value:"false",label:"OFFLINE"}]}},{name:"status",displayName:"APPLICATION_PHONE_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div data-ng-if=\"row.entity.isAgent\">{{'APPLICATION_'+row.entity.status | translate}} <span data-ng-if=\"row.entity.statusAt && (row.entity.status === 'BUSY' || row.entity.status === 'ONHOLD' || row.entity.status === 'INUSE')\">(<css-timer start-time=\"row.entity.statusAt\"></css-timer>)</span></span></div>",filter:{type:m.filter.SELECT,selectOptions:[{value:"UNKNOWN",label:d.instant("APPLICATION_UNKNOWN")},{value:"NOT_INUSE",label:d.instant("APPLICATION_NOT_INUSE")},{value:"INUSE",label:d.instant("APPLICATION_INUSE")},{value:"BUSY",label:d.instant("APPLICATION_BUSY")},{value:"INVALID",label:d.instant("APPLICATION_INVALID")},{value:"UNAVAILABLE",label:d.instant("APPLICATION_UNAVAILABLE")},{value:"RINGING",label:d.instant("APPLICATION_RINGING")},{value:"RINGINUSE",label:d.instant("APPLICATION_RINGINUSE")},{value:"ONHOLD",label:d.instant("APPLICATION_ONHOLD")}]}},{name:"queueStatus",displayName:"APPLICATION_QUEUE_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent && row.entity.online" class="ui-grid-vcenter" data-ng-class="{\'paused-agent\':row.entity.pause}"><span class="left-margin"><i data-ng-if="row.entity.pause" data-ng-click="grid.appScope.pause(row.entity.agentId,\'unpause\')" class="fa fa-play font-green pointer-cursor" title="{{\'APPLICATION_RESUME\' | translate}}"></i><i class="fa fa-pause font-yellow pointer-cursor" data-ng-click="grid.appScope.pause(row.entity.agentId,\'pause\',\'DEFAULT PAUSE\')" title="{{\'APPLICATION_DEFAULT_PAUSE\' | translate}}"></i></span><select data-ng-if="grid.appScope.pauses.length" class="pause-select pointer-cursor" data-ng-model="grid.appScope.pauseType" data-ng-change="grid.appScope.pause(row.entity.agentId,\'pause\',grid.appScope.pauseType)"><option class="pointer-cursor" data-ng-repeat="pause in grid.appScope.pauses">{{pause.name}}</option></select><span> {{\'APPLICATION_\'+row.entity.queueStatus.toUpperCase() | translate}}</span><span data-ng-if="(row.entity.queueStatus!==\'complete\' && (row.entity.queueStatus!==\'paused\' || row.entity.pauseType === \'ACW\'))"> [{{row.entity.lastQueue}}]</span><span data-ng-if="row.entity.pause"> [{{row.entity.pauseType}}]</span><span data-ng-if="row.entity.queueStatusAt && row.entity.queueStatus!==\'complete\'">[<css-timer start-time="row.entity.lastPauseAt"></css-timer>]</span></div>',filter:{type:m.filter.SELECT,selectOptions:[{value:"paused",label:d.instant("APPLICATION_PAUSED")},{value:"connect",label:d.instant("APPLICATION_CONNECT")},{value:"complete",label:d.instant("APPLICATION_COMPLETE")},{value:"called",label:d.instant("APPLICATION_CALLED")}]},enableSorting:!1,enableColumnMenu:!1},{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"callstaken",displayName:"APPLICATION_CALLS_TAKEN",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.callstaken !== null">{{row.entity.callstaken}}</div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1,width:100},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button data-ng-if="row.entity.queue" class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.leaveQueue(row.entity.agentId,row.entity.queue)"><i class="icon-ban"></i> {{\'APPLICATION_LEAVE\' | translate}}</button><button data-ng-if="row.entity.isAgent && row.treeNode.children.length < grid.appScope.voiceQueues.length" class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.joinQueue(row.entity.agentId)"><i class="icon-plus"></i> {{\'APPLICATION_JOIN_QUEUE\' | translate}}</button> <button data-ng-if="row.entity.isAgent" class="btn btn-xs blue-madison" data-ng-click="grid.appScope.showInfo(row.entity)"><i class="icon-info"></i></button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=l.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){v(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){v(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){v(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?u.order=null:u.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),p()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){u.offset=(a-1)*b,u.limit=b,p()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?u[a.name]=a.filters[0].term:delete u[a.name]}),p()})}},p(),s(),t(),o(function(){q()})};var v=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent"),e.unsyncUpdates("user_has_voice_queue")}),a.pause=function(b,c,e){return e&&(a.pauseType=null),i.save({name:c,agent:b,type:e||"DEFAULT PAUSE",data4:e||"DEFAULT PAUSE",channel:"voice"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.joinQueue=function(e){var g=c.open({animation:!0,templateUrl:"app/channels/voice/realtime/view/agent/queue.modal.add.html",controller:"VoiceRealtimeViewAgentQueueModalCtrl",resolve:{queues:function(){return _.reject(a.voiceQueues,function(b){return!!_.find(a.gridOptions.data,{queue:b.name,isAgent:!1,agentId:e})})}}});g.result.then(function(a){return i.save({name:"QueueAdd",agent:e,queues:a.queues,channel:"voice",data1:e,data3:a.queues.join(","),data4:"voice"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},function(){b.info("Modal dismissed at: "+new Date)})},a.leaveQueue=function(a,b){return i.save({name:"QueueRemove",agent:a,queue:b,channel:"voice",data1:a,data3:b,data4:"voice"}).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/voice/realtime/view/agent/agent.modal.info.html",controller:"VoiceRealtimeViewAgentInfoModalCtrl",resolve:{agent:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.agents",{url:"/agents",templateUrl:"app/channels/voice/realtime/view/agent/agent.html",controller:"VoiceRealtimeViewAgentCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAgentInfoModalCtrl",["$scope","$uibModalInstance","agent",function(a,b,c){a.agent=c,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewAgentQueueModalCtrl",["$scope","$uibModalInstance","$http","queues",function(a,b,c,d){a.queues=d,a.item={},a.save=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewOutboundCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","ReportDial","Pause","Action","usSpinnerService","$q","uiGridConstants","$timeout","Auth",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){function o(){return j.spin("spinner-grid"),g.get({controller:"active",controller2:"calls"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){p(),j.stop("spinner-grid")})}function p(){e.socket.on("report_dial:save",function(b){a.gridOptions.data.unshift(b)}),e.socket.on("report_dial:update",function(b){var c=_.find(a.gridOptions.data,{uniqueid:b.uniqueid});c&&(_.merge(c,b),!b.endtime||b.answertime&&b.answertime==b.endtime||m(function(){_.remove(a.gridOptions.data,{id:b.id})},1e4))})}a.moment=moment,a.initDials=function(){a.gridOptions={paginationPageSizes:[10,25,50,75],paginationPageSize:10,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"uniqueid",displayName:"APPLICATION_UNIQUEID",headerCellFilter:"translate",cellClass:"text-center"},{name:"agent",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.channel.split('/')[1].split('-')[0]}}</div>"},{name:"calleridnum",displayName:"APPLICATION_CALLERID",headerCellFilter:"translate",cellClass:"text-center"},{name:"dialstring",cellClass:"text-center"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.endtime">{{\'APPLICATION_RINGING\' | translate}}</span><span data-ng-if="row.entity.answertime && row.entity.answertime == row.entity.endtime">{{\'APPLICATION_TALKING\' | translate}}</span><span data-ng-if="row.entity.answertime && row.entity.answertime != row.entity.endtime">{{\'APPLICATION_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.endtime && !row.entity.answertime">{{\'APPLICATION_\'+row.entity.dialstatus | translate}}</span><span data-ng-if="(!row.entity.endtime && !row.entity.answertime) || (row.entity.answertime && row.entity.answertime == row.entity.endtime)"> [<css-timer start-time="row.entity.updatedAt"></css-timer>]</div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1}],data:[],gridMenuTitleFilter:function(a){var b=k.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){q(a.gridOptions.data.length)})}},o()};var q=function(a){var b=a?30*a+100:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("report_dial")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.outbound",{url:"/outbound",templateUrl:"app/channels/voice/realtime/view/outbound/outbound.html",controller:"VoiceRealtimeViewOutboundCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewParameterCtrl",["$scope","$translate","Dashboard","VoiceQueue","Auth","socket","uiGridConstants",function(a,b,c,d,e,f,g){function h(a){var b=a?30*a+150:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")}function i(b){var c=_.find(a.gridOptions.data,{name:b.name});c&&(_.merge(c,b),a.$apply())}var j={offset:0,limit:10};a.initParameters=function(){var b;switch(a.user=e.getCurrentUser(),a.$on("$destroy",function(){b&&(b.terminate(),f.socket.removeAllListeners("dashboard:voice:init"),f.socket.removeAllListeners("dashboard:voice:waiting"),f.socket.removeAllListeners("dashboard:voice:active"),f.socket.removeAllListeners("dashboard:voice:complete"),f.socket.removeAllListeners("dashboard:voice:abandon"),f.socket.removeAllListeners("dashboard:voice:unmanaged"),f.socket.removeAllListeners("dashboard:voice:holdtime"),f.socket.removeAllListeners("dashboard:voice:talktime"))}),a.user.role){case"admin":c.get({id:"voice",controller:"init"}).$promise.then(function(b){for(var c in b.queues)b.queues[c].waiting=b.queues[c].waiting||0,b.queues[c].active=b.queues[c].active||0,b.queues[c].complete=b.queues[c].complete||0,b.queues[c].abandon=b.queues[c].abandon||0,b.queues[c].unmanaged=b.queues[c].unmanaged||0,b.queues[c].holdtime=b.queues[c].holdtime||0,b.queues[c].talktime=b.queues[c].talktime||0,a.gridOptions.data.push(b.queues[c])})["catch"](function(a){console.error(a)});break;case"user":c.get({id:"voice",controller:"init"}).$promise.then(function(b){for(var c in b.queues){var d=_.find(a.user.PVoiceQueues,{name:c});d&&(b.queues[c].waiting=b.queues[c].waiting||0,b.queues[c].active=b.queues[c].active||0,b.queues[c].complete=b.queues[c].complete||0,b.queues[c].abandon=b.queues[c].abandon||0,b.queues[c].unmanaged=b.queues[c].unmanaged||0,b.queues[c].holdtime=b.queues[c].holdtime||0,b.queues[c].talktime=b.queues[c].talktime||0,a.gridOptions.data.push(b.queues[c]))}})["catch"](function(a){console.error(a)})}f.socket.on("dashboard:voice:waiting",function(a){i(a)}),f.socket.on("dashboard:voice:active",function(a){i(a)}),f.socket.on("dashboard:voice:complete",function(a){i(a)}),f.socket.on("dashboard:voice:abandon",function(a){i(a)}),f.socket.on("dashboard:voice:unmanaged",function(a){i(a)}),f.socket.on("dashboard:voice:talktime",function(a){i(a)}),f.socket.on("dashboard:voice:holdtime",function(a){i(a)})},a.gridOptions={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,enableSorting:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,columnDefs:[{name:"name",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter"},{name:"waiting",displayName:"APPLICATION_WAITING",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"active",displayName:"APPLICATION_ACTIVE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"complete",displayName:"APPLICATION_ANSWERED",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableColumnMenu:!1,filters:[{condition:g.filter.GREATER_THAN_OR_EQUAL,placeholder:"from"},{condition:g.filter.LESS_THAN_OR_EQUAL,placeholder:"to"}]},{name:"abandon",displayName:"APPLICATION_ABANDONED",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableColumnMenu:!1,filters:[{condition:g.filter.GREATER_THAN_OR_EQUAL,placeholder:"from"},{condition:g.filter.LESS_THAN_OR_EQUAL,placeholder:"to"}]},{name:"unmanaged",displayName:"APPLICATION_UNMANAGED",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableColumnMenu:!1,filters:[{condition:g.filter.GREATER_THAN_OR_EQUAL,placeholder:"from"},{condition:g.filter.LESS_THAN_OR_EQUAL,placeholder:"to"}]},{name:"holdtime",displayName:"APPLICATION_HOLDTIME",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.holdtime | secToTime | date:'HH:mm:ss'}}</div>",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"talktime",displayName:"APPLICATION_TALKTIME",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.talktime | secToTime | date:'HH:mm:ss'}}</div>",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"totalCalls",displayName:"APPLICATION_TOTAL_CALLS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.complete + row.entity.abandon + row.entity.unmanaged}}</div>",enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],onRegisterApi:function(b){a.gridApi=b,a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?j.order=null:j.order=b[0].name+" "+b[0].sort.direction.toUpperCase()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){h(b),j.offset=(a-1)*b,j.limit=b}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters.length>1?a.filters.forEach(function(b){b.term?64===b.condition?j[a.name+"_uiFrom"]=b.term:256===b.condition&&(j[a.name+"_uiTo"]=b.term):64===b.condition?delete j[a.name+"_uiFrom"]:256===b.condition&&delete j[a.name+"_uiTo"]}):a.filters.length&&a.filters[0].term?j[a.name]=a.filters[0].term:delete j[a.name]})})}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.parameters",{url:"/parameters",templateUrl:"app/channels/voice/realtime/view/parameter/parameter.html",controller:"VoiceRealtimeViewParameterCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewQueueCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","VoiceQueue","usSpinnerService","$q","uiGridConstants","Auth",function(a,b,c,d,e,f,g,h,i,j,k){function l(b){return h.spin("spinner-grid"),g.get(o).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=[],b.rows.forEach(function(a){n(a)})})["catch"](function(a){f.error(a)})["finally"](function(){b&&m(),h.stop("spinner-grid")})}function m(){e.socket.on("voice_queue:save",function(b){var c=_.find(a.gridOptions.data,{
+queueName:b.name});c||l()}),e.socket.on("voice_queue:remove",function(b){_.remove(a.gridOptions.data,{queueId:b.id})}),e.socket.on("user_has_voice_queue:save",function(b){var c=_.find(a.gridOptions.data,{agentId:b.UserId,queue:b.queue});if(!c&&b.logged){var d=_.find(a.gridOptions.data,{queueName:b.queue}),e=a.gridOptions.data.indexOf(d);a.gridOptions.data.splice(e+1,0,{isAgent:!0,agent:b.membername,callstaken:b.callstaken?b.callstaken:0,lastcall:b.lastcall,status:b.statusdesc,paused:b.paused,reason:b.reason,agentId:b.UserId,queue:b.queue})}else c&&!b.logged?_.remove(a.gridOptions.data,{agentId:b.UserId,queue:b.queue}):c&&b.logged&&userHasQueue&&(c.callstaken=b.callstaken?b.callstaken:0,c.lastcall=b.lastcall,c.status=b.statusdesc,c.paused=b.paused,c.reason=b.reason)}),e.socket.on("user_has_voice_queue:remove",function(b){_.remove(a.gridOptions.data,{agentId:b.UserId,queue:b.queue})})}function n(b){a.gridOptions.data.push({name:b.name,$$treeLevel:0,queueName:b.name}),b.Users.forEach(function(b){b.UserHasVoiceQueue.logged&&a.gridOptions.data.push({isAgent:!0,agent:b.UserHasVoiceQueue.membername,callstaken:b.UserHasVoiceQueue.callstaken?b.UserHasVoiceQueue.callstaken:0,lastcall:b.UserHasVoiceQueue.lastcall,status:b.UserHasVoiceQueue.statusdesc,paused:b.UserHasVoiceQueue.paused,reason:b.UserHasVoiceQueue.reason,agentId:b.UserHasVoiceQueue.UserId,queue:b.UserHasVoiceQueue.queue})})}var o={controller:"realtime",controller2:"voice",offset:0,limit:10};a.moment=moment,a.initQueues=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter"},{name:"agent",displayName:"APPLICATION_AGENT_NAME",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter"},{name:"callstaken",displayName:"APPLICATION_CALLS_TAKEN",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent">{{row.entity.callstaken}}</div>'},{name:"lastcall",displayName:"APPLICATION_LAST_CALL",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div data-ng-if=\"row.entity.isAgent\">{{row.entity.lastcall | date:'yyyy-MM-dd HH:mm:ss'}}</div>"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div data-ng-if=\"row.entity.isAgent\">{{'APPLICATION_'+row.entity.status | translate}}</div>"},{name:"paused",displayName:"APPLICATION_PAUSED",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div data-ng-if=\"row.entity.isAgent\">{{(row.entity.paused ? 'APPLICATION_YES' : 'APPLICATION_NO') | translate}}</div>"},{name:"reason",displayName:"APPLICATION_REASON",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.isAgent && row.entity.paused">{{row.entity.reason}}</div>'}],data:[],gridMenuTitleFilter:function(a){var b=i.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){p(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.treeBase.on.rowExpanded(a,function(b){p(a.gridApi.core.getVisibleRows(a.gridApi.grid).length+b.treeNode.children.length)}),a.gridApi.treeBase.on.rowCollapsed(a,function(b){p(a.gridApi.core.getVisibleRows(a.gridApi.grid).length-b.treeNode.children.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?o.order=null:o.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),l()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){o.offset=(a-1)*b,o.limit=b,l()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?o[a.name]=a.filters[0].term:delete o[a.name]}),l()})}},l(!0)};var p=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("voice_queue"),e.unsyncUpdates("user_has_voice_queue")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.queues",{url:"/queues",templateUrl:"app/channels/voice/realtime/view/queue/queue.html",controller:"VoiceRealtimeViewQueueCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewQueueCallsCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","ReportQueue","Pause","Action","usSpinnerService","$q","uiGridConstants","$timeout",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){return j.spin("spinner-grid"),g.get({controller:"waiting",controller2:"calls"}).$promise.then(function(b){a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){o(),j.stop("spinner-grid")})}function o(){e.socket.on("report_queue:save",function(b){a.gridOptions.data.unshift(b)}),e.socket.on("report_queue:update",function(b){var c=_.find(a.gridOptions.data,{id:b.id});if(c){var d={queuecallerabandon:b.queuecallerabandon,queuecallerleave:b.queuecallerleave};delete b.queuecallerabandon,delete b.queuecallerleave,_.merge(c,b),d.queuecallerabandon&&(c.queuecallerabandon=d.queuecallerabandon),d.queuecallerleave&&(c.queuecallerleave=d.queuecallerleave),(c.queuecallerabandon||c.queuecallercomplete)&&m(function(){_.remove(a.gridOptions.data,{id:b.id})},3e3)}})}a.moment=moment,a.initQueues=function(){a.gridOptions={headerCellFilter:"translate",paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.queuecallerleaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.queuecallerleaveAt && !row.entity.queuecallerabandon && !row.entity.queuecallercomplete">{{\'APPLICATION_ACTIVE\' | translate}}</span><span data-ng-if="row.entity.queuecallerleaveAt && row.entity.queuecallerabandon">{{\'APPLICATION_QUEUESTATUS_ABANDON\' | translate}}</span><span data-ng-if="row.entity.queuecallerleaveAt && row.entity.queuecallercomplete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="!row.entity.queuecallercomplete && !row.entity.queuecallerabandon"> [<css-timer start-time="row.entity.updatedAt"></css-timer>]</div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"caller",displayName:"APPLICATION_CALLER",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.calleridnum || ''}} {{row.entity.calleridname || ''}}</div>",enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"position",displayName:"APPLICATION_POSITION",headerCellFilter:"translate"},{name:"lastAssignedTo",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1}],data:[],gridMenuTitleFilter:function(a){var b=k.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){p(a.gridOptions.data.length)})}},n()};var p=function(a){var b=a?30*a+100:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("report_queue")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.queuecalls",{url:"/queuecalls",templateUrl:"app/channels/voice/realtime/view/queuecalls/queuecalls.html",controller:"VoiceRealtimeViewQueueCallsCtrl"})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewTelephoneCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","Telephone","Pause","Action","usSpinnerService","$q","uiGridConstants","$timeout",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){return j.spin("spinner-grid"),g.get(p).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){j.stop("spinner-grid")})}function o(){e.socket.on("agent:save",function(b){var c=_.find(a.gridOptions.data,{id:b.id});c&&(c.status=b.status,c.statusAt=b.statusAt,c.ipaddr=b.ipaddr,c.port=b.port,c.fullcontact=b.fullcontact,c.useragent=b.useragent,c.lastms=b.lastms,c.internal=b.internal)}),e.socket.on("agent:remove",function(b){_.remove(a.gridOptions.data,{id:b.id})})}var p={offset:0,limit:10};a.moment=moment,a.initTelephones=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"name",displayName:"APPLICATION_TELEPHONE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.name}} &lt;{{row.entity.internal}}&gt;</div>"},{name:"status",displayName:"APPLICATION_PHONE_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{'APPLICATION_'+row.entity.status | translate}} <span data-ng-if=\"row.entity.statusAt && (row.entity.status === 'BUSY' || row.entity.status === 'ONHOLD' || row.entity.status === 'INUSE')\">(<css-timer start-time=\"row.entity.statusAt\"></css-timer>)</span></span></div>",filter:{type:l.filter.SELECT,selectOptions:[{value:"UNKNOWN",label:d.instant("APPLICATION_UNKNOWN")},{value:"NOT_INUSE",label:d.instant("APPLICATION_NOT_INUSE")},{value:"INUSE",label:d.instant("APPLICATION_INUSE")},{value:"BUSY",label:d.instant("APPLICATION_BUSY")},{value:"INVALID",label:d.instant("APPLICATION_INVALID")},{value:"UNAVAILABLE",label:d.instant("APPLICATION_UNAVAILABLE")},{value:"RINGING",label:d.instant("APPLICATION_RINGING")},{value:"RINGINUSE",label:d.instant("APPLICATION_RINGINUSE")},{value:"ONHOLD",label:d.instant("APPLICATION_ONHOLD")}]}},{name:"action",displayName:"",width:170,cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><button class="btn btn-xs blue-madison" data-ng-click="grid.appScope.showInfo(row.entity)"><i class="icon-info"></i></button><div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1}],data:[],gridMenuTitleFilter:function(a){var b=k.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){q(a.gridOptions.data.length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?p.order=null:p.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),n()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){p.offset=(a-1)*b,p.limit=b,n()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?p[a.name]=a.filters[0].term:delete p[a.name]}),n()})}},n(),m(function(){o()})};var q=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("agent")}),a.showInfo=function(a){c.open({animation:!0,templateUrl:"app/channels/voice/realtime/view/telephone/telephone.modal.info.html",controller:"VoiceRealtimeViewTelephoneInfoModalCtrl",resolve:{telephone:a}})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view.telephones",{url:"/telephones",templateUrl:"app/channels/voice/realtime/view/telephone/telephone.html",controller:"VoiceRealtimeViewTelephoneCtrl",data:{permissions:{only:["admin","user"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewTelephoneInfoModalCtrl",["$scope","$uibModalInstance","$http","telephone",function(a,b,c,d){a.telephone=d,a.close=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRealtimeViewCtrl",["$scope","Auth",function(a,b){a.Auth=b}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.realtime.view",{url:"/view",templateUrl:"app/channels/voice/realtime/view/view.html",controller:"VoiceRealtimeViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceRecordingListCtrl",["$scope","$translate","$sce","Recording","gridOptions","xAlert","uiGridConstants","Auth",function(a,b,c,d,e,f,g,h){a.Recording=d,a.updateRating=function(a,c){return d.update({id:a,rating:c}).$promise.then(function(){f.show(b.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.initView=function(){var b={exporterCsvFilename:"recordings.csv",rowHeight:30,primaryKey:"id",columnDefs:[{name:"uniqueid"},{name:"customerPhone",displayName:"APPLICATION_CUSTOMER_PHONE",cellClass:"text-center ui-grid-vcenter"},{name:"membername"},{name:"type",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><i data-ng-class=\"{'icon-call-in font-green':row.entity.type === 'inbound','icon-call-out font-red':row.entity.type === 'outbound','icon-question':row.entity.type === 'unknown','icon-earphones font-purple':row.entity.type === 'internal'}\"></i></div>",filter:{type:g.filter.SELECT,selectOptions:[{value:"inbound",label:"Inbound"},{value:"internal",label:"Internal"},{value:"outbound",label:"Outbound"},{value:"unknown",label:"Unknown"}]}},{name:"queue"},{name:"createdAt",displayName:"APPLICATION_DATE",headerCellFilter:"translate",filterHeaderTemplate:'<div class="ui-grid-filter-container row"><div ng-repeat="colFilter in col.filters" class="col-md-6 col-md-offset-0 col-sm-5 col-sm-offset-0 col-xs-5 col-xs-offset-0"><div custom-grid-date-filter-header></div></div></div>',filters:[{name:"From",condition:g.filter.GREATER_THAN_OR_EQUAL},{name:"To",condition:g.filter.LESS_THAN_OR_EQUAL}],sort:{direction:g.DESC,priority:0}},{name:"rating",filter:{type:g.filter.SELECT,selectOptions:[{value:1,label:"1"},{value:2,label:"2"},{value:3,label:"3"},{value:4,label:"4"},{value:5,label:"5"}]},cellClass:"ui-grid-vcenter",width:"100",cellTemplate:'<div><uib-rating data-ng-model="row.entity.rating" data-ng-click="grid.appScope.updateRating(row.entity.id, row.entity.rating)" aria-labelledby="default-rating"></uib-rating></div>'},{name:"audio",displayName:"",width:100,enableSorting:!1,enableFiltering:!1,cellClass:"ui-grid-vcenter",cellTemplate:"<div><audio-file-download data-ng-if=\"row.entity.value.split('.').pop() == 'wav'\" params=\"{id:row.entity.id,controller:'stream'}\" resource=\"grid.appScope.Recording\"></audio-file-download><span data-ng-if=\"row.entity.value.split('.').pop() == 'gsm'\" title=\"{{'MESSAGE_GSM_PREVIEW_NOT_SUPPORTED' | translate}}\">{{'MESSAGE_GSM_PREVIEW_NOT_SUPPORTED' | translate}}</span></div>"},{name:"action",width:80,buttons:[{directive:"<motion-file-download params=\"{id:row.entity.id,controller:'stream'}\" resource=\"grid.appScope.Recording\" mimetype=\"'audio/'+row.entity.value.split('.').pop()\" btnclass=\"btn btn-xs blue-hoki\" filename=\"row.entity.uniqueid+'.'+row.entity.value.split('.').pop()\"></motion-file-download>"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.uniqueid, row.entity.id)",hide:!h.isAdmin()}]}]};a.gridOptions=e.gridOptions(d,b,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.recordings.list",{url:"/list",templateUrl:"app/channels/voice/recording/list/list.html",controller:"VoiceRecordingListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Recording",["$resource",function(a){return a("/api/voice/recordings/:id/:controller",{id:"@id"},{update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.recordings",{url:"/recordings",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:25}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.inbound",{url:"/inbound",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInboundListCreateCtrl",["$scope","$uibModalInstance","Route","application","xAlert","$location","$translate",function(a,b,c,d,e,f,g){a.$application=d.application,a.forms={route:void 0},a.item={type:"inbound",appdata:"Inbound Call",context:"from-voip-provider"},a.ok=function(){return a.item.exten=a.$application.checkUnderscore(a.item.exten),c.save(a.item).$promise.then(function(a){b.close(a),f.path("/channels/voice/routes/inbound/view/"+a.id+"/applications")})["catch"](function(a){console.log(a),e.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInboundListCtrl",["$scope","$http","socket","$translate","$rootScope","xAlert","Modal","stResource","gridOptions","Route","$uibModal","$location","$log",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.initView=function(){var b={exporterCsvFilename:"InboundRoutes.csv",columnDefs:[{name:"exten",displayName:"APPLICATION_PHONE_NUMBER"},{name:"description"},{name:"applications",cellClass:"ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.Applications.length"><span data-ng-repeat="app in row.entity.Applications | limitTo:2">{{app.app}}({{app.appdata[0]}}), </span>...</div><div data-ng-if="!row.entity.Applications.length">{{\'MESSAGE_NO_AVAILABLE_APPLICATIONS\' | translate}}</div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/voice/routes/inbound/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.exten, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(j,b,a,{type:"inbound"})},a.create=function(){k.open({animation:!0,templateUrl:"app/channels/voice/route/inbound/list/create.modal.html",controller:"VoiceRouteInboundListCreateCtrl"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.inbound.list",{url:"/list",templateUrl:"app/channels/voice/route/inbound/list/list.html",controller:"VoiceRouteInboundListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInboundViewCtrl",["$scope","$translate","$stateParams","socket","$location","WizardHandler","Modal","xAlert","application","interval","Route","VoiceQueue","Sound","SquareProject","VoiceContext","Interval","VoiceMail","User","Agent","Telephone","Trunk","Team",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v){function w(b){var c,d;if("always"===b.intType)c=null,d="*,*,*,*";else if("list"===b.intType)d=b.IntervalId?_.find(a.Intervals,{id:b.IntervalId}).name:"*,*,*,*",c=b.IntervalId||null;else if("custom"===b.intType){c=null;var e,f,g,h;e=b.t_from&&b.t_to&&!b.alwaysTime?moment(b.t_from).format("HH:mm")+"-"+moment(b.t_to).format("HH:mm"):"*",b.wd_from&&"always"!==b.wd_from?(f=b.wd_from,b.wd_to&&"always"!==b.wd_to&&(f+="-"+b.wd_to)):f="*",b.md_from&&"always"!==b.md_from?(g=b.md_from,b.md_to&&"always"!==b.md_to&&(g+="-"+b.md_to)):g="*",b.m_from&&"always"!==b.m_from?(h=b.m_from,b.m_to&&"always"!==b.m_to&&(h+="-"+b.m_to)):h="*",d=e+","+f+","+g+","+h}void 0===a.selectedApp?(a.application.interval=d,a.application.IntervalId=c):(a.route.Applications[a.selectedApp].interval=d,a.route.Applications[a.selectedApp].IntervalId=c)}function x(){if(a.interval.intType=a.route.Applications[a.selectedApp].IntervalId?"list":"*,*,*,*"===a.route.Applications[a.selectedApp].interval?"always":"custom",a.interval.IntervalId=a.route.Applications[a.selectedApp].IntervalId,!a.route.Applications[a.selectedApp].IntervalId){var b,c=a.route.Applications[a.selectedApp].interval?a.route.Applications[a.selectedApp].interval.split(","):["*","*","*","*"];c.forEach(function(c,d){switch(d){case 0:"*"!==c?(b=c.split("-"),a.interval.t_from=moment(b[0],"HH:mm"),a.interval.t_to=moment(b[1],"HH:mm"),a.interval.alwaysTime=!1):(a.interval.t_from=moment(new Date),a.interval.t_to=moment(new Date),a.interval.alwaysTime=!0);break;case 1:"*"!==c?(b=c.split("-"),a.interval.wd_from=b[0],a.interval.wd_to=b[1]?b[1]:"always"):(a.interval.wd_from="always",a.interval.wd_to="always");break;case 2:"*"!==c?(b=c.split("-"),a.interval.md_from=b[0],a.interval.md_to=b[1]?b[1]:"always"):(a.interval.md_from="always",a.interval.md_to="always");break;case 3:"*"!==c?(b=c.split("-"),a.interval.m_from=b[0],a.interval.m_to=b[1]?b[1]:"always"):(a.interval.m_from="always",a.interval.m_to="always")}})}}a.alwaysSwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.$translate=b,a.selectedApp=void 0,a.showGrid=!0,a.$application=i.application,a.$interval=j.interval,a.selectedRows=[],a._=_,a.gridOptions={enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableSorting:!1,rowTemplate:'<div grid="grid" class="ui-grid-draggable-row" draggable="true"><div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ng-class="{ \'ui-grid-row-header-cell\': col.isRowHeader, \'custom\': true }" ui-grid-cell></div></div>',columnDefs:[{name:"app",headerCellFilter:"translate",displayName:"APPLICATION_APPLICATION",enableColumnMenu:!1},{name:"appType",headerCellFilter:"translate",displayName:"APPLICATION_INFO",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{'APPLICATION_APPS_'+(row.entity.appType || (grid.appScope._.find(grid.appScope.$application.applications,{value:row.entity.app}) ? row.entity.app : 'custom')).toUpperCase() | translate}}</div>",enableColumnMenu:!1},{name:"appdata",headerCellFilter:"translate",displayName:"APPLICATION_ARGUMENTS",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{row.entity.appdata.join(',')}}</div>",enableColumnMenu:!1},{name:"interval",headerCellFilter:"translate",displayName:"APPLICATION_TIME_INTERVAL",enableColumnMenu:!1},{name:"action",enableColumnMenu:!1,headerCellFilter:"translate",displayName:"APPLICATION_ACTION",width:125,cellClass:"ui-grid-vcenter",cellTemplate:'<div><a class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.openApplication(grid.appScope.gridOptions.data.indexOf(row.entity))"><i class="icon-settings"></i></a><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteApp(row.entity.app+\' application\', grid.appScope.gridOptions.data.indexOf(row.entity))"><i class="fa fa-trash"></i></a></div>'}],onRegisterApi:function(b){b.selection.on.rowSelectionChanged(a,function(b){b.isSelected?a.selectedRows.push(b.entity):_.pull(a.selectedRows,b.entity)}),b.selection.on.rowSelectionChangedBatch(a,function(b){b[0].isSelected?a.selectedRows=_.map(b,"entity"):a.selectedRows=[]}),b.draggableRows.on.rowDropped(a,function(b,c){a.updateRoute()}),b.grid.registerDataChangeCallback(function(){y(a.gridOptions.data.length)})}};var y=function(a){var b=a?30*a+120:177;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px")};a.initApplication=function(b){b&&(a.selectedApp=void 0),a.forms={settings:void 0,interval:void 0},a.application={},a.interval={intType:"always",t_from:moment(new Date),t_to:moment(new Date),wd_from:"always",wd_to:"always",md_from:"always",md_to:"always",m_from:"always",m_to:"always",alwaysTime:!0},a.main={app:""}},a.$watch("interval",function(a){a&&w(a)},!0),a.updateSetAppdata=function(){a.application.variable&&a.application.value&&"Set"===a.main.app.value?a.application.appdata[0]=a.application.variable+"="+a.application.value:a.application.appdata[0]=null},a.updateSetAppdataSettings=function(){a.application.variable&&a.application.value&&"Set"===a.main.app.value?a.route.Applications[a.selectedApp].appdata[0]=a.application.variable+"="+a.application.value:a.route.Applications[a.selectedApp].appdata[0]=null},a.$watch("main.app",function(b){if(b){var c,d,e={},f={};switch(void 0===a.selectedApp&&(a.application={appType:b.type,app:b.value,interval:a.application.interval||"*,*,*,*",appdata:[]}),b.value){case"Queue":c=l,d=m;break;case"Playback":c=m;break;case"AGI":c=n;break;case"Goto":c=o;break;case"Voicemail":c=q;break;case"Dial":switch(b.type){case"internalDial":c=r,e={controller:"all"};break;case"externalDial":c=u}}if(c)return c.get(e).$promise.then(function(b){a.items=b.rows}).then(function(){return d?d.get(f).$promise:void 0}).then(function(b){b&&(a.items2=b.rows)})["catch"](function(a){h.error(a)})}},!0),a.deselectAndRedirect=function(b){a.selectedApp=void 0,e.path(b)},a.initRingGroup=function(){var b,c,d;return void 0===a.selectedApp?a.usersArray=[]:a.usersArray=_.map(a.route.Applications[a.selectedApp].appdata[0].split("&"),function(a){return a.split("/")[1]}),r.get().$promise.then(function(a){return b=a,s.get().$promise}).then(function(a){return c=a,t.get().$promise}).then(function(e){d=e,ComponentsDropdowns.bindUserByRole(b,c,d,function(b){a.usersArray=_.union(b,a.usersArray),void 0===a.selectedApp?(a.application.appdata[0]=null,a.application.appdata[0]=_.map(a.usersArray,function(a){return"SIP/"+a}).join("&")):(a.route.Applications[a.selectedApp].appdata[0]=null,a.route.Applications[a.selectedApp].appdata[0]=_.map(a.usersArray,function(a){return"SIP/"+a}).join("&"))},function(b){a.usersArray=_.difference(a.usersArray,b),void 0===a.selectedApp?(a.application.appdata[0]=null,a.application.appdata[0]=_.map(a.usersArray,function(a){return"SIP/"+a}).join("&")):(a.route.Applications[a.selectedApp].appdata[0]=null,a.route.Applications[a.selectedApp].appdata[0]=_.map(a.usersArray,function(a){return"SIP/"+a}).join("&"))},a.route.Applications[a.selectedApp]?a.route.Applications[a.selectedApp].appdata:null)})["catch"](function(a){console.error(a)})},a.getIntervals=function(){return p.get().$promise.then(function(b){a.Intervals=b.rows,d.syncUpdates("interval",a.Intervals)})["catch"](function(a){h.error(a)})},a.getRoute=function(){return k.get({id:c.id}).$promise.then(function(b){a.route=b,a.gridOptions.data=b.Applications,y(a.gridOptions.data.length)})["catch"](function(a){e.path("/channels/voice/routes/inbound/list")})},a.getApplication=function(){if(void 0===a.selectedApp)e.path("/channels/voice/routes/inbound/list");else{if(a.showGrid=!0,a.route.Applications[a.selectedApp].appType)a.main.app=_.find(a.$application.applications,{type:a.route.Applications[a.selectedApp].appType});else{var b=_.find(a.$application.applications,{value:a.route.Applications[a.selectedApp].app});if(b)a.main.app=b;else{a.main.app=_.find(a.$application.applications,{type:"custom"});var c=a.route.Applications[a.selectedApp].appdata.join(",");a.route.Applications[a.selectedApp].appdata=[c],a.route.Applications[a.selectedApp].appType="custom"}}if("Set"===a.main.app.value){var d=a.route.Applications[a.selectedApp].appdata[0].split("=");a.application.variable=d[0],a.application.value=d[1]}x()}},a.openApplication=function(b){a.selectedApp=b,a.showGrid=!1,e.path("/channels/voice/routes/inbound/view/"+c.id+"/applications/settings")},a.updateRoute=function(d){return a.route.exten=a.$application.checkUnderscore(a.route.exten),_.forEach(a.route.Applications,function(a){if("custom"!==a.appType)switch(a.app){case"Dial":var b;switch(a.appType){case"externalDial":b=3;break;case"internalDial":b=2;break;default:b=2}a.appdata[b]=a.appdata[b]||"",a.appdata[b]+=(_.includes(a.appdata[b],"x")?"":"x")+(_.includes(a.appdata[b],"X")?"":"X");break;case"Queue":a.appdata[1]=a.appdata[1]||"",a.appdata[1]+=(_.includes(a.appdata[1],"x")?"":"x")+(_.includes(a.appdata[1],"X")?"":"X")}}),k.update({id:a.route.id},a.route).$promise.then(function(f){a.selectedApp=void 0,h.show(b.instant("MESSAGE_WELL_DONE")+"!","success"),d&&e.path("/channels/voice/routes/inbound/view/"+c.id+"/"+d)})["catch"](function(a){console.log(a),h.error(a)})},a.getContexts=function(){return o.get().$promise.then(function(b){a.voiceContexts=b.rows,d.syncUpdates("voice_context",a.voiceContexts)})["catch"](function(a){h.error(a)})},a.deleteApp=g.confirm["delete"](function(b){a.route.Applications.splice(b,1),a.updateRoute()}),a.deleteItems=g.confirm["delete"](function(){_.remove(a.route.Applications,function(b){return _.includes(a.selectedRows,b)}),a.selectedRows=[],a.updateRoute()}),a.addApplication=function(){a.route.Applications.push(a.application),a.updateRoute("applications")},a.goNext=function(){f.wizard().next()},a.previous=function(){f.wizard().previous()},a.formValidation=function(a){return a},a.$on("destroy",function(){d.unsyncUpdates("voice_extension")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.inbound.view",{url:"/view/:id",templateUrl:"app/channels/voice/route/inbound/view/view.html",controller:"VoiceRouteInboundViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.routes.inbound.view.settings",{url:"/settings",templateUrl:"app/channels/voice/route/inbound/view/view.settings.html"}).state("main.channels.voice.routes.inbound.view.applications",{url:"/applications",templateUrl:"app/channels/voice/route/inbound/view/view.applications.html"}).state("main.channels.voice.routes.inbound.view.application",{url:"/application",templateUrl:"app/channels/voice/route/view.application.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}}).state("main.channels.voice.routes.inbound.view.applications.settings",{url:"/settings",templateUrl:"app/channels/voice/route/view.applicationSettings.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.internal",{url:"/internal",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInternalListCreateCtrl",["$scope","$uibModalInstance","Route","application","$location","$translate","xAlert",function(a,b,c,d,e,f,g){a.$application=d.application,a.forms={route:void 0},a.item={type:"internal",appdata:"Internal Call",context:"from-sip"},a.ok=function(){return a.item.exten=a.$application.checkUnderscore(a.item.exten),c.save(a.item).$promise.then(function(a){b.close(a),e.path("/channels/voice/routes/internal/view/"+a.id+"/applications")})["catch"](function(a){
+g.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInternalListCtrl",["$scope","$http","socket","$translate","$rootScope","xAlert","Modal","stResource","gridOptions","Route","$uibModal","$location","$log",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.initView=function(){var b={exporterCsvFilename:"InternalRoutes.csv",columnDefs:[{name:"exten",displayName:"APPLICATION_PHONE_NUMBER"},{name:"description"},{name:"applications",cellClass:"ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.Applications.length"><span data-ng-repeat="app in row.entity.Applications | limitTo:2">{{app.app}}({{app.appdata[0]}}),</span>...</div><div data-ng-if="!row.entity.Applications.length">{{\'MESSAGE_NO_AVAILABLE_APPLICATIONS\' | translate}}</div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/voice/routes/internal/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.exten, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(j,b,a,{type:"internal"})},a.create=function(){k.open({animation:!0,templateUrl:"app/channels/voice/route/internal/list/create.modal.html",controller:"VoiceRouteInternalListCreateCtrl"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.internal.list",{url:"/list",templateUrl:"app/channels/voice/route/internal/list/list.html",controller:"VoiceRouteInternalListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteInternalViewCtrl",["$scope","$translate","$stateParams","socket","$location","WizardHandler","Modal","xAlert","application","interval","Route","VoiceQueue","Sound","SquareProject","VoiceContext","Interval","VoiceMail","User","Agent","Telephone","Trunk",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){function v(b){var c,d;if("always"===b.intType)c=null,d="*,*,*,*";else if("list"===b.intType)d=b.IntervalId?_.find(a.Intervals,{id:b.IntervalId}).name:"*,*,*,*",c=b.IntervalId||null;else if("custom"===b.intType){c=null;var e,f,g,h;e=b.t_from&&b.t_to&&!b.alwaysTime?moment(b.t_from).format("HH:mm")+"-"+moment(b.t_to).format("HH:mm"):"*",b.wd_from&&"always"!==b.wd_from?(f=b.wd_from,b.wd_to&&"always"!==b.wd_to&&(f+="-"+b.wd_to)):f="*",b.md_from&&"always"!==b.md_from?(g=b.md_from,b.md_to&&"always"!==b.md_to&&(g+="-"+b.md_to)):g="*",b.m_from&&"always"!==b.m_from?(h=b.m_from,b.m_to&&"always"!==b.m_to&&(h+="-"+b.m_to)):h="*",d=e+","+f+","+g+","+h}void 0===a.selectedApp?(a.application.interval=d,a.application.IntervalId=c):(a.route.Applications[a.selectedApp].interval=d,a.route.Applications[a.selectedApp].IntervalId=c)}function w(){if(a.interval.intType=a.route.Applications[a.selectedApp].IntervalId?"list":"*,*,*,*"===a.route.Applications[a.selectedApp].interval?"always":"custom",a.interval.IntervalId=a.route.Applications[a.selectedApp].IntervalId,!a.route.Applications[a.selectedApp].IntervalId){var b,c=a.route.Applications[a.selectedApp].interval?a.route.Applications[a.selectedApp].interval.split(","):["*","*","*","*"];c.forEach(function(c,d){switch(d){case 0:"*"!==c?(b=c.split("-"),a.interval.t_from=moment(b[0],"HH:mm"),a.interval.t_to=moment(b[1],"HH:mm"),a.interval.alwaysTime=!1):(a.interval.t_from=moment(new Date),a.interval.t_to=moment(new Date),a.interval.alwaysTime=!0);break;case 1:"*"!==c?(b=c.split("-"),a.interval.wd_from=b[0],a.interval.wd_to=b[1]?b[1]:"always"):(a.interval.wd_from="always",a.interval.wd_to="always");break;case 2:"*"!==c?(b=c.split("-"),a.interval.md_from=b[0],a.interval.md_to=b[1]?b[1]:"always"):(a.interval.md_from="always",a.interval.md_to="always");break;case 3:"*"!==c?(b=c.split("-"),a.interval.m_from=b[0],a.interval.m_to=b[1]?b[1]:"always"):(a.interval.m_from="always",a.interval.m_to="always")}})}}a.alwaysSwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.$translate=b,a.selectedApp=void 0,a.showGrid=!0,a.$application=i.application,a.$interval=j.interval,a._=_,a.selectedRows=[],a.gridOptions={enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableSorting:!1,rowTemplate:'<div grid="grid" class="ui-grid-draggable-row" draggable="true"><div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ng-class="{ \'ui-grid-row-header-cell\': col.isRowHeader, \'custom\': true }" ui-grid-cell></div></div>',columnDefs:[{name:"app",headerCellFilter:"translate",displayName:"APPLICATION_APPLICATION",enableColumnMenu:!1},{name:"appType",headerCellFilter:"translate",displayName:"APPLICATION_INFO",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{'APPLICATION_APPS_'+(row.entity.appType || (grid.appScope._.find(grid.appScope.$application.applications,{value:row.entity.app}) ? row.entity.app : 'custom')).toUpperCase() | translate}}</div>",enableColumnMenu:!1},{name:"appdata",headerCellFilter:"translate",displayName:"APPLICATION_ARGUMENTS",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{row.entity.appdata.join(',')}}</div>",enableColumnMenu:!1},{name:"interval",headerCellFilter:"translate",displayName:"APPLICATION_TIME_INTERVAL",enableColumnMenu:!1},{name:"action",enableColumnMenu:!1,headerCellFilter:"translate",displayName:"APPLICATION_ACTION",width:125,cellClass:"ui-grid-vcenter",cellTemplate:'<div><a class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.openApplication(grid.appScope.gridOptions.data.indexOf(row.entity))"><i class="icon-settings"></i></a><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteApp(row.entity.app+\' application\', grid.appScope.gridOptions.data.indexOf(row.entity))"><i class="fa fa-trash"></i></a></div>'}],onRegisterApi:function(b){b.selection.on.rowSelectionChanged(a,function(b){b.isSelected?a.selectedRows.push(b.entity):_.pull(a.selectedRows,b.entity)}),b.selection.on.rowSelectionChangedBatch(a,function(b){b[0].isSelected?a.selectedRows=_.map(b,"entity"):a.selectedRows=[]}),b.draggableRows.on.rowDropped(a,function(b,c){a.updateRoute()}),b.grid.registerDataChangeCallback(function(){x(a.gridOptions.data.length)})}},a.deleteItems=g.confirm["delete"](function(){_.remove(a.route.Applications,function(b){return _.includes(a.selectedRows,b)}),a.selectedRows=[],a.updateRoute()}),a.initRingGroup=function(){var b,c,d;return void 0===a.selectedApp?a.usersArray=[]:a.usersArray=_.map(a.route.Applications[a.selectedApp].appdata[0].split("&"),function(a){return a.split("/")[1]}),r.get().$promise.then(function(a){return b=a,s.get().$promise}).then(function(a){return c=a,t.get().$promise}).then(function(e){d=e,ComponentsDropdowns.bindUserByRole(b,c,d,function(b){a.usersArray=_.union(b,a.usersArray),void 0===a.selectedApp?(a.application.appdata[0]=null,a.application.appdata[0]=_.map(a.usersArray,function(a){return"SIP/"+a}).join("&")):(a.route.Applications[a.selectedApp].appdata[0]=null,a.route.Applications[a.selectedApp].appdata[0]=_.map(a.usersArray,function(a){return"SIP/"+a}).join("&"))},function(b){a.usersArray=_.difference(a.usersArray,b),void 0===a.selectedApp?(a.application.appdata[0]=null,a.application.appdata[0]=_.map(a.usersArray,function(a){return"SIP/"+a}).join("&")):(a.route.Applications[a.selectedApp].appdata[0]=null,a.route.Applications[a.selectedApp].appdata[0]=_.map(a.usersArray,function(a){return"SIP/"+a}).join("&"))},a.route.Applications[a.selectedApp]?a.route.Applications[a.selectedApp].appdata:null)})["catch"](function(a){console.error(a)})};var x=function(a){var b=a?30*a+120:177;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px")};a.initApplication=function(b){b&&(a.selectedApp=void 0),a.forms={settings:void 0,interval:void 0},a.application={},a.interval={intType:"always",t_from:moment(new Date),t_to:moment(new Date),wd_from:"always",wd_to:"always",md_from:"always",md_to:"always",m_from:"always",m_to:"always",alwaysTime:!0},a.main={app:""}},a.$watch("interval",function(a){a&&v(a)},!0),a.updateSetAppdata=function(){a.application.variable&&a.application.value&&"Set"===a.main.app.value?a.application.appdata[0]=a.application.variable+"="+a.application.value:a.application.appdata[0]=null},a.updateSetAppdataSettings=function(){a.application.variable&&a.application.value&&"Set"===a.main.app.value?a.route.Applications[a.selectedApp].appdata[0]=a.application.variable+"="+a.application.value:a.application.appdata[0]=null},a.$watch("main.app",function(b){if(b){var c,d,e={},f={};switch(void 0===a.selectedApp&&(a.application={appType:b.type,app:b.value,interval:a.application.interval||"*,*,*,*",appdata:[]}),b.value){case"Queue":c=l,d=m;break;case"Playback":c=m;break;case"AGI":c=n;break;case"Goto":c=o;break;case"Voicemail":c=q;break;case"Dial":switch(b.type){case"internalDial":c=r,e={controller:"all"};break;case"externalDial":c=u}}if(c)return c.get(e).$promise.then(function(b){a.items=b.rows}).then(function(){return d?d.get(f).$promise:void 0}).then(function(b){b&&(a.items2=b.rows)})["catch"](function(a){h.error(a)})}},!0),a.deselectAndRedirect=function(b){a.selectedApp=void 0,e.path(b)},a.getIntervals=function(){return p.get().$promise.then(function(b){a.Intervals=b.rows,d.syncUpdates("interval",a.Intervals)})["catch"](function(a){h.error(a)})},a.getRoute=function(){return k.get({id:c.id}).$promise.then(function(b){a.route=b,a.gridOptions.data=b.Applications,x(a.gridOptions.data.length)})["catch"](function(a){e.path("/channels/voice/routes/internal/list")})},a.getApplication=function(){if(void 0===a.selectedApp)e.path("/channels/voice/routes/internal/list");else{if(a.showGrid=!0,a.route.Applications[a.selectedApp].appType)a.main.app=_.find(a.$application.applications,{type:a.route.Applications[a.selectedApp].appType});else{var b=_.find(a.$application.applications,{value:a.route.Applications[a.selectedApp].app});if(b)a.main.app=b;else{a.main.app=_.find(a.$application.applications,{type:"custom"});var c=a.route.Applications[a.selectedApp].appdata.join(",");a.route.Applications[a.selectedApp].appdata=[c],a.route.Applications[a.selectedApp].appType="custom"}}if("Set"===a.main.app.value){var d=a.route.Applications[a.selectedApp].appdata[0].split("=");a.application.variable=d[0],a.application.value=d[1]}w()}},a.openApplication=function(b){a.selectedApp=b,a.showGrid=!1,e.path("/channels/voice/routes/internal/view/"+c.id+"/applications/settings")},a.updateRoute=function(d){return a.route.exten=a.$application.checkUnderscore(a.route.exten),_.forEach(a.route.Applications,function(a){if("custom"!==a.appType)switch(a.app){case"Dial":var b;switch(a.appType){case"externalDial":b=3;break;case"internalDial":b=2;break;default:b=2}a.appdata[b]=a.appdata[b]||"",a.appdata[b]+=(_.includes(a.appdata[b],"x")?"":"x")+(_.includes(a.appdata[b],"X")?"":"X");break;case"Queue":a.appdata[1]=a.appdata[1]||"",a.appdata[1]+=(_.includes(a.appdata[1],"x")?"":"x")+(_.includes(a.appdata[1],"X")?"":"X")}}),k.update({id:a.route.id},a.route).$promise.then(function(f){a.selectedApp=void 0,h.show(b.instant("MESSAGE_WELL_DONE")+"!","success"),d&&e.path("/channels/voice/routes/internal/view/"+c.id+"/"+d)})["catch"](function(a){h.error(a)})},a.getContexts=function(){return o.get().$promise.then(function(b){a.voiceContexts=b.rows,d.syncUpdates("voice_context",a.voiceContexts)})["catch"](function(a){h.error(a)})},a.deleteApp=g.confirm["delete"](function(b){a.route.Applications.splice(b,1),a.updateRoute()}),a.addApplication=function(){a.route.Applications.push(a.application),a.updateRoute("applications")},a.goNext=function(){f.wizard().next()},a.previous=function(){f.wizard().previous()},a.formValidation=function(a){return a},a.$on("destroy",function(){d.unsyncUpdates("voice_extension")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.internal.view",{url:"/view/:id",templateUrl:"app/channels/voice/route/internal/view/view.html",controller:"VoiceRouteInternalViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.routes.internal.view.settings",{url:"/settings",templateUrl:"app/channels/voice/route/internal/view/view.settings.html"}).state("main.channels.voice.routes.internal.view.applications",{url:"/applications",templateUrl:"app/channels/voice/route/internal/view/view.applications.html"}).state("main.channels.voice.routes.internal.view.application",{url:"/application",templateUrl:"app/channels/voice/route/view.application.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}}).state("main.channels.voice.routes.internal.view.applications.settings",{url:"/settings",templateUrl:"app/channels/voice/route/view.applicationSettings.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteOutboundListCreateCtrl",["$scope","$uibModalInstance","Route","application","xAlert","$translate","$location","Tag",function(a,b,c,d,e,f,g,h){a.$application=d.application,a.forms={route:void 0},a.item={type:"outbound",appdata:"Outbound Call",context:"from-sip"},a.getTags=function(){return h.get().$promise.then(function(b){b.rows.unshift({name:"--"}),a.tags=b.rows})["catch"](function(a){e.error(a)})},a.ok=function(){return a.item.exten=a.$application.checkUnderscore(a.item.exten),c.save(a.item).$promise.then(function(a){b.close(a),g.path("/channels/voice/routes/outbound/view/"+a.id+"/routes")})["catch"](function(a){e.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("VoiceRouteOutboundListCtrl",["$scope","$http","socket","$translate","$rootScope","xAlert","Modal","stResource","gridOptions","Route","$uibModal","$location","$log",function(a,b,c,d,e,f,g,h,i,j,k,l,m){a.initView=function(){var b={exporterCsvFilename:"OutboundRoutes.csv",columnDefs:[{name:"exten",displayName:"APPLICATION_DESTINATION_PATTERN"},{name:"description"},{name:"applications",cellClass:"ui-grid-vcenter",cellTemplate:'<div data-ng-if="row.entity.Applications.length"><span data-ng-repeat="app in row.entity.Applications | limitTo:2">{{app.app}}({{app.appdata[0]}}),</span>...</div><div data-ng-if="!row.entity.Applications.length">{{\'MESSAGE_NO_AVAILABLE_APPLICATIONS\' | translate}}</div>',enableSorting:!1,enableFiltering:!1,enableColumnMenu:!1},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/voice/routes/outbound/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.exten, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(j,b,a,{type:"outbound"})},a.create=function(){k.open({animation:!0,templateUrl:"app/channels/voice/route/outbound/list/create.modal.html",controller:"VoiceRouteOutboundListCreateCtrl"})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.outbound.list",{url:"/list",templateUrl:"app/channels/voice/route/outbound/list/list.html",controller:"VoiceRouteOutboundListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.outbound",{url:"/outbound",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("VoiceRouteOutboundViewCtrl",["$scope","xAlert","$translate","$stateParams","socket","$location","WizardHandler","Modal","application","interval","Route","Trunk","VoiceContext","Interval","Tag",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){function p(b){var c,d;if("always"===b.intType)c=null,d="*,*,*,*";else if("list"===b.intType)d=b.IntervalId?_.find(a.Intervals,{id:b.IntervalId}).name:"*,*,*,*",c=b.IntervalId||null;else if("custom"===b.intType){c=null;var e,f,g,h;e=b.t_from&&b.t_to&&!b.alwaysTime?moment(b.t_from).format("HH:mm")+"-"+moment(b.t_to).format("HH:mm"):"*",b.wd_from&&"always"!==b.wd_from?(f=b.wd_from,b.wd_to&&"always"!==b.wd_to&&(f+="-"+b.wd_to)):f="*",b.md_from&&"always"!==b.md_from?(g=b.md_from,b.md_to&&"always"!==b.md_to&&(g+="-"+b.md_to)):g="*",b.m_from&&"always"!==b.m_from?(h=b.m_from,b.m_to&&"always"!==b.m_to&&(h+="-"+b.m_to)):h="*",d=e+","+f+","+g+","+h}void 0===a.selectedApp?(a.application.interval=d,a.application.IntervalId=c):(a.route.Applications[a.selectedApp].interval=d,a.route.Applications[a.selectedApp].IntervalId=c)}function q(){if(a.interval.intType=a.route.Applications[a.selectedApp].IntervalId?"list":"*,*,*,*"===a.route.Applications[a.selectedApp].interval?"always":"custom",a.interval.IntervalId=a.route.Applications[a.selectedApp].IntervalId,!a.route.Applications[a.selectedApp].IntervalId){var b,c=a.route.Applications[a.selectedApp].interval?a.route.Applications[a.selectedApp].interval.split(","):["*","*","*","*"];c.forEach(function(c,d){switch(d){case 0:"*"!==c?(b=c.split("-"),a.interval.t_from=moment(b[0],"HH:mm"),a.interval.t_to=moment(b[1],"HH:mm"),a.interval.alwaysTime=!1):(a.interval.t_from=moment(new Date),a.interval.t_to=moment(new Date),a.interval.alwaysTime=!0);break;case 1:"*"!==c?(b=c.split("-"),a.interval.wd_from=b[0],a.interval.wd_to=b[1]?b[1]:"always"):(a.interval.wd_from="always",a.interval.wd_to="always");break;case 2:"*"!==c?(b=c.split("-"),a.interval.md_from=b[0],a.interval.md_to=b[1]?b[1]:"always"):(a.interval.md_from="always",a.interval.md_to="always");break;case 3:"*"!==c?(b=c.split("-"),a.interval.m_from=b[0],a.interval.m_to=b[1]?b[1]:"always"):(a.interval.m_from="always",a.interval.m_to="always")}})}}a.$translate=c,a.selectedApp=void 0,a.showGrid=!0,a.$application=i.application,a.$interval=j.interval,a._=_,a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.alwaysSwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.selectedRows=[],a.gridOptions={enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableSorting:!1,rowTemplate:'<div grid="grid" class="ui-grid-draggable-row" draggable="true"><div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ng-class="{ \'ui-grid-row-header-cell\': col.isRowHeader, \'custom\': true }" ui-grid-cell></div></div>',columnDefs:[{name:"app",displayName:"APPLICATION_APPLICATION",cellClass:"ui-grid-vcenter",cellTemplate:"<div><span data-ng-if=\"row.entity.appType === 'externalDial'\">Default</span><span data-ng-if=\"row.entity.appType !== 'externalDial'\">{{row.entity.app}}</span></div>",headerCellFilter:"translate",enableColumnMenu:!1},{name:"appType",headerCellFilter:"translate",displayName:"APPLICATION_INFO",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{'APPLICATION_APPS_'+(row.entity.appType || (grid.appScope._.find(grid.appScope.$application.applications,{value:row.entity.app}) ? row.entity.app : 'custom')).toUpperCase() | translate}}</div>",enableColumnMenu:!1},{name:"appdata",displayName:"APPLICATION_ARGUMENTS",headerCellFilter:"translate",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{row.entity.appdata.join(',')}}</div>",enableColumnMenu:!1},{name:"interval",displayName:"APPLICATION_TIME_INTERVAL",headerCellFilter:"translate",enableColumnMenu:!1},{name:"action",displayName:"APPLICATION_ACTION",headerCellFilter:"translate",width:125,enableColumnMenu:!1,cellClass:"ui-grid-vcenter",cellTemplate:'<div><a class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.openApplication(grid.appScope.gridOptions.data.indexOf(row.entity))"><i class="icon-settings"></i></a><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteApp(row.entity.app+\' application\', grid.appScope.gridOptions.data.indexOf(row.entity))"><i class="fa fa-trash"></i></a></div>'}],onRegisterApi:function(b){b.selection.on.rowSelectionChanged(a,function(b){b.isSelected?a.selectedRows.push(b.entity):_.pull(a.selectedRows,b.entity)}),b.selection.on.rowSelectionChangedBatch(a,function(b){b[0].isSelected?a.selectedRows=_.map(b,"entity"):a.selectedRows=[]}),b.draggableRows.on.rowDropped(a,function(b,c){a.updateRoute()}),b.grid.registerDataChangeCallback(function(){r(a.gridOptions.data.length)})}},a.deleteItems=h.confirm["delete"](function(){_.remove(a.route.Applications,function(b){return _.includes(a.selectedRows,b)}),a.selectedRows=[],a.updateRoute()});var r=function(a){var b=a?30*a+120:177;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px")};a.initApplication=function(b){b&&(a.selectedApp=void 0),a.forms={info:void 0,interval:void 0},a.application={},a.interval={intType:"always",t_from:moment(new Date),t_to:moment(new Date),wd_from:"always",wd_to:"always",md_from:"always",md_to:"always",m_from:"always",m_to:"always",alwaysTime:!0},a.main={app:""},a.applications=[{name:"Default",value:"Dial",type:"outboundDial"},{name:"Custom",value:"custom",type:"custom"}]},a.$watch("interval",function(a){a&&p(a)},!0),a.$watch("main.app",function(c){if(c){var d,e;switch(void 0===a.selectedApp&&(a.application={appType:c.type,app:c.value,interval:a.application.interval||"*,*,*,*",appdata:[]}),c.value){case"Dial":d=l;break;default:d=null,e=null}if(d)return d.get().$promise.then(function(b){a.items=b.rows}).then(function(){return e?e.get().$promise:void 0}).then(function(b){b&&(a.items2=b.rows)})["catch"](function(a){b.error(a)})}},!0),a.deselectAndRedirect=function(b){a.selectedApp=void 0,f.path(b)},a.getIntervals=function(){return n.get().$promise.then(function(b){a.Intervals=b.rows,e.syncUpdates("interval",a.Intervals)})["catch"](function(a){b.error(a)})},a.getRoute=function(){return k.get({id:d.id}).$promise.then(function(b){a.route=b,a.gridOptions.data=b.Applications,r(a.gridOptions.data.length)})["catch"](function(a){f.path("/channels/voice/routes/outbound/list")})},a.getApplication=function(){if(void 0===a.selectedApp)f.path("/channels/voice/routes/outbound/list");else{if(a.showGrid=!0,a.route.Applications[a.selectedApp].appType)a.main.app=_.find(a.applications,{type:a.route.Applications[a.selectedApp].appType});else{a.main.app=_.find(a.applications,{type:"custom"});var b=a.route.Applications[a.selectedApp].appdata.join(",");a.route.Applications[a.selectedApp].appdata=[b],a.route.Applications[a.selectedApp].appType="custom"}q()}},a.openApplication=function(b){a.selectedApp=b,a.showGrid=!1,f.path("/channels/voice/routes/outbound/view/"+d.id+"/routes/settings")},a.updateRoute=function(e){return a.route.exten=a.$application.checkUnderscore(a.route.exten),_.forEach(a.route.Applications,function(a){"outboundDial"===a.appType&&(a.appdata[4]=a.appdata[4]||"",a.appdata[4]+=(_.includes(a.appdata[4],"x")?"":"x")+(_.includes(a.appdata[4],"X")?"":"X"))}),k.update({id:a.route.id},a.route).$promise.then(function(g){a.selectedApp=void 0,b.show(c.instant("MESSAGE_WELL_DONE")+"!","success"),e&&f.path("/channels/voice/routes/outbound/view/"+d.id+"/"+e)})["catch"](function(a){b.error(a)})},a.getContexts=function(){return m.get().$promise.then(function(b){a.voiceContexts=b.rows,e.syncUpdates("voice_context",a.voiceContexts)})["catch"](function(a){b.error(a)})},a.getTags=function(){return o.get().$promise.then(function(b){b.rows.unshift({name:"--"}),a.tags=b.rows})["catch"](function(a){b.error(a)})},a.deleteApp=h.confirm["delete"](function(b){a.route.Applications.splice(b,1),a.updateRoute()}),a.addApplication=function(){a.route.Applications.push(a.application),a.updateRoute("routes")},a.goNext=function(){g.wizard().next()},a.previous=function(){g.wizard().previous()},a.formValidation=function(a){return a},a.$on("destroy",function(){e.unsyncUpdates("voice_extension")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes.outbound.view",{url:"/view/:id",templateUrl:"app/channels/voice/route/outbound/view/view.html",controller:"VoiceRouteOutboundViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.routes.outbound.view.settings",{url:"/settings",templateUrl:"app/channels/voice/route/outbound/view/view.settings.html"}).state("main.channels.voice.routes.outbound.view.routes",{url:"/routes",templateUrl:"app/channels/voice/route/outbound/view/view.routes.html"}).state("main.channels.voice.routes.outbound.view.route",{url:"/route",templateUrl:"app/channels/voice/route/outbound/view/view.route.html"}).state("main.channels.voice.routes.outbound.view.routes.settings",{url:"/settings",templateUrl:"app/channels/voice/route/outbound/view/view.routeSettings.html"})}]),angular.module("xCallyShuttleApp").factory("Route",["$resource",function(a){return a("/api/voice/extensions/:id",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.routes",{url:"/routes",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:21}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice",{url:"/voice",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:7}}})}]),angular.module("xCallyShuttleApp").controller("VoiceVoicemailListCtrl",["$scope","VoiceMail","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"voice_mails.csv",primaryKey:"uniqueid",columnDefs:[{name:"mailbox"},{name:"fullname"},{name:"email"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/channels/voice/voicemails/view/{{row.entity.uniqueid}}/settings",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.mailbox, row.entity.uniqueid)"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.voicemails.list",{url:"/list",templateUrl:"app/channels/voice/voicemail/list/list.html",controller:"VoiceVoicemailListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("VoiceVoicemailViewCtrl",["$scope","VoiceMail","VoiceMailMessage","VoiceContext","$http","xAlert","$translate","$stateParams","socket","$sce","Modal","$location","gridOptions",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){var b={exporterCsvFilename:"voice_mail_messages.csv",primaryKey:"id",columnDefs:[{name:"callerid"},{name:"stamp",displayName:"APPLICATION_DATE",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{grid.appScope.moment(row.entity.stamp).format('YYYY-MM-DD HH:mm:ss')}}</div>"},{name:"duration",cellClass:"ui-grid-vcenter",cellTemplate:"<div>{{row.entity.duration*1000 | date:'mm:ss'}}</div>"},{name:"audio",displayName:"",width:225,enableSorting:!1,enableFiltering:!1,buttons:[{directive:'<audio-file-download params="{id:row.entity.id,controller:\'download\'}" resource="grid.appScope.VoiceMailMessage"></audio-file-download>'}]},{name:"action",width:150,buttons:[{directive:'<motion-file-download params="{id:row.entity.id,controller:\'download\'}" resource="grid.appScope.VoiceMailMessage" mimetype="audio/wav" btnclass="btn btn-xs blue-hoki" filename="row.entity.msg_id+\'.wav\'"></motion-file-download>'},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.id, row.entity.id)"}]}]};a.gridOptions=m.gridOptions(c,b,a,{mailbox:a.voicemail.mailbox,context:a.voicemail.context})}a.moment=moment,a["switch"]={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.VoiceMailMessage=c,a.getVoicemail=function(){return b.get({id:h.uniqueid}).$promise.then(function(b){delete b.password,delete b.stamp,a.voicemail=b})["catch"](function(a){l.path("/voice/voicemails/list")})},a.updateVoiceVoicemail=function(){return b.update({id:h.uniqueid},a.voicemail).$promise.then(function(){f.show(g.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})},a.getContexts=function(){return d.get().$promise.then(function(b){a.voiceContexts=b.rows})["catch"](function(a){f.error(a)})},a.getMessages=function(){return a.voicemail?void n():b.get({id:h.uniqueid}).$promise.then(function(b){delete b.password,delete b.stamp,a.voicemail=b,n()})["catch"](function(a){l.path("/voice/voicemails/view/"+h.uniqueid+"/settings")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.voicemails.view",{url:"/view/:uniqueid",templateUrl:"app/channels/voice/voicemail/view/view.html",controller:"VoiceVoicemailViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.channels.voice.voicemails.view.settings",{url:"/settings",templateUrl:"app/channels/voice/voicemail/view/view.settings.html"}).state("main.channels.voice.voicemails.view.messages",{url:"/messages",templateUrl:"app/channels/voice/voicemail/view/view.messages.html"})}]),angular.module("xCallyShuttleApp").factory("VoiceMail",["$resource",function(a){return a("/api/voice/voicemails/:id/:controller",{uniqueid:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.voicemails",{url:"/voicemails",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:23}}})}]),angular.module("xCallyShuttleApp").factory("VoiceMailMessage",["$resource",function(a){return a("/api/voice/voicemails/messages/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("VoiceVoicemailWizardCtrl",["$scope","VoiceMail","xAlert","WizardHandler","$location","Setting",function(a,b,c,d,e,f){a.initWizard=function(){a.form={},a.item={context:"from-voicemail"}},a.next=function(){d.wizard().next()},a.previous=function(){d.wizard().previous()},a.exitValidation=function(a){return a},a.getFirstFreeMailbox=function(){f.get({controller:"mailbox"}).$promise.then(function(b){a.item.mailbox=b.value})["catch"](function(a){c.error(a)})},a.createItem=function(){return a.item.customer_id=a.item.mailbox,b.save(a.item).$promise.then(function(){e.path("/channels/voice/voicemails/list")})["catch"](function(a){c.error(data)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.channels.voice.voicemails.wizard",{url:"/wizard",templateUrl:"app/channels/voice/voicemail/wizard/wizard.html",controller:"VoiceVoicemailWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("VoiceQueue",["$resource",function(a){
+return a("/api/voice/queues/:id/:controller/:controller2",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("Company",["$resource",function(a){return a("/api/contactmanager/companies/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.companies",{url:"/companies",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:5}}})}]),angular.module("xCallyShuttleApp").controller("CompanyListCreateModalCtrl",["$scope","$uibModalInstance",function(a,b){a.forms={dashboard:void 0},a.item={},a.ok=function(){a.item.model=JSON.stringify({title:a.item.name}),b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ContactManagerCompanyListCtrl",["$scope","$translate","xAlert","Modal","$uibModal","$log","Company","gridOptions","$location",function(a,b,c,d,e,f,g,h,i){a.initView=function(){var b={exporterCsvFilename:"Companies.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:100,buttons:[{"class":"blue-hoki",name:"profile",href:"/contactmanager/companies/view/{{row.entity.id}}/settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"},{"class":"green-turquoise",name:"contacts",uisref:"main.contactmanager.contacts.list({companyId:{{row.entity.id}}})"}]}]};a.gridOptions=h.gridOptions(g,b,a)},a.create=function(){var a=e.open({animation:!0,size:"lg",templateUrl:"app/contactmanager/company/list/create.modal.html",controller:"CompanyListCreateModalCtrl"});a.result.then(function(a){return g.save(a).$promise.then(function(a){i.path("/contactmanager/companies/view/"+a.id+"/settings")})["catch"](function(a){c.error(a)})},function(){f.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.companies.list",{url:"/list",templateUrl:"app/contactmanager/company/list/list.html",controller:"ContactManagerCompanyListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("ContactManagerCompanyViewCtrl",["$scope","xAlert","$translate","$stateParams","$location","Company",function(a,b,c,d,e,f){a.getCompany=function(){return f.get({id:d.id}).$promise.then(function(b){a.company=b})["catch"](function(a){e.path("/contactmanager/companies/list")})},a.updateCompany=function(){return f.update({id:d.id},a.company).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){b.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.companies.view",{url:"/view/:id",templateUrl:"app/contactmanager/company/view/view.html",controller:"ContactManagerCompanyViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.contactmanager.companies.view.settings",{url:"/settings",templateUrl:"app/contactmanager/company/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("Contact",["$resource",function(a){return a("/api/contactmanager/contacts/:id/:controller",{id:"@id"},{update:{method:"PUT"},search:{method:"POST"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.contacts",{url:"/contacts",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ContactManagerListCopyModalCtrl",["$scope","$uibModalInstance","xAlert","List","Contact","$translate",function(a,b,c,d,e,f){a.item={},a.getLists=function(){return d.get().$promise.then(function(b){a.lists=b.rows})["catch"](function(a){c.error(a)})},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ContactManagerListImportModalCtrl",["$scope","$uibModalInstance","indexes","csv","xAlert","socket","List","Contact","$translate","Company",function(a,b,c,d,e,f,g,h,i,j){function k(b){if(b>=a.csvLength||a.stopped)return void(a.importing=!1);for(var c,f=[],g=b;b+200>g&&g<a.csvLength;g++)c={},_.forOwn(a.item,function(b,e){switch(e){case"tags":c.tags=[],a.item.tags.forEach(function(a){""!==d[g][a]&&c.tags.push(d[g][a])});break;default:c[e]=d[g][b]}}),c.tags=c.tags?c.tags.join(","):void 0,c.ListId=a.item.ListId,c.CompanyId=a.item.CompanyId||null,f.push(c);return h.save({controller:"bulk"},{contacts:f}).$promise.then(function(b){a["import"].success+=b.ok*a.addingQuote,a["import"].succeeded+=b.ok,a["import"].fail+=b.ko*a.addingQuote,a["import"].failed+=b.ko,k(g)})["catch"](function(b){a.stopped=!0,e.error(b),k(g)})}a.indexes=c,a.importing=!1,a.submitted=!1,a.stopped=!1,a["import"]={success:0,fail:0,succeeded:0,failed:0},a.csvLength=d.length,a.addingQuote=100/a.csvLength,a.forms={csv:void 0},a.item={},a.start=function(){a.importing=!0,a.submitted=!0,k(0)},a.getLists=function(){return g.get().$promise.then(function(b){a.lists=b.rows,a.item.ListId=1,a.getCustomFields()})["catch"](function(a){e.error(a)})},a.getCompanies=function(){return j.get().$promise.then(function(b){a.companies=b.rows})["catch"](function(a){e.error(a)})},a.getCustomFields=function(){return g.get({listId:a.item.ListId,controller:"customfields"}).$promise.then(function(b){b.rows.forEach(function(a){a.values=JSON.parse(a.values)}),a.customFields=b.rows,f.socket.on("custom_field:remove",function(b){_.remove(a.customFields,function(a){return b.id==a.id})}),f.socket.on("custom_field:save",function(b){if(b.ListId===a.item.ListId){var c=_.find(a.customFields,{id:b.id});c||("string"==typeof b.values&&(b.values=JSON.parse(b.values)),a.customFields.push(b))}})})["catch"](function(a){console.error(a),e.error(a)})},a.close=function(){b.close()},a.stop=function(){a.stopped=!0}}]),angular.module("xCallyShuttleApp").controller("ContactManagerContactListCtrl",["$scope","$translate","Modal","FileUploader","Papa","$uibModal","$log","Contact","gridOptions","List","uiGridConstants","xAlert","socket","$stateParams","Auth","Company",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){a.Auth=o,a.initView=function(){var c;return j.get().$promise.then(function(b){return a.lists=[],a.customFields=[],b.rows.forEach(function(b,c){_.forEach(b.CustomFields,function(b){a.customFields.push({name:b.name,alias:b.alias})}),a.lists.push({value:b.id,label:b.name})}),p.get().$promise}).then(function(b){a.companies=[],b.rows.forEach(function(b,c){a.companies.push({value:b.id,label:b.name})})}).then(function(){var d=[{"class":"blue-hoki",name:"profile",onClick:"grid.appScope.openContactTab(row.entity)"}];o.isAgent()||(d.push({"class":"green",title:b.instant("APPLICATION_COPY"),name:"copy",onClick:"grid.appScope.copy(row.entity.id)"}),d.push({"class":"red-sunglo",name:"delete",title:b.instant("APPLICATION_DELETE"),onClick:"grid.appScope.deleteItem(row.entity.fullname, row.entity.id)"})),c={exporterCsvFilename:"Contacts.csv",columnDefs:[{name:"firstName"},{name:"lastName"},{name:"phone"},{name:"email"},{name:"ListId",displayName:"APPLICATION_LIST",field:"List.name",filter:{type:k.filter.SELECT,term:n.listId||null,selectOptions:a.lists},cellTemplate:'<div class="centered-uigrid-td"><a href="/contactmanager/lists/view/{{row.entity.ListId}}/settings">{{row.entity.List.name}}</a></div>'},{name:"CompanyId",displayName:"APPLICATION_COMPANY",field:"Company.name",filter:{type:k.filter.SELECT,term:n.companyId||null,selectOptions:a.companies},cellTemplate:'<div class="centered-uigrid-td"><a href="/contactmanager/companies/view/{{row.entity.CompanyId}}/settings">{{row.entity.Company.name}}</a></div>'},{name:"tags",filterHeaderTemplate:'<div class="ui-grid-filter-container row"><div ng-repeat="colFilter in col.filters" class="col-md-12 col-md-offset-0 col-sm-12 col-sm-offset-0 col-xs-12 col-xs-offset-0"><div custom-grid-tags-filter-header></div></div></div>',filters:[{name:"tags"}],cellTemplate:"<div class=\"centered-uigrid-td\">{{row.entity.tags.join(',')}}</div>"}]},_.forEach(a.customFields,function(a){c.columnDefs.push({name:a.name,displayName:a.alias,visible:!1})}),c.columnDefs.push({name:"action",width:100,buttons:d}),a.gridOptions=i.gridOptions(h,c,a),m.socket.on("contact_manager:remove",function(b){a.gridOptions.getPage()})})["catch"](function(a){l.error(a)})},d.FileSelect.prototype.isEmptyAfterSelection=function(){return!0};var q=a.uploader=new d({queueLimit:1,clearInputAfterAddedToQueue:!0});q.onAfterAddingFile=function(b){console.log("fileadded"),e.parse(b._file,{header:!0,complete:function(b){a.uploader.clearQueue(),a["import"](b.data)},error:function(a){console.log(a)}})},a["import"]=function(b){var c=f.open({animation:!0,size:"lg",backdrop:"static",keyboard:!1,templateUrl:"app/contactmanager/contact/list/import.modal.html",controller:"ContactManagerListImportModalCtrl",resolve:{indexes:function(){return _.keys(b[0])},csv:function(){return b}}});c.result.then(function(b){a.gridOptions.getPage()},function(){g.info("Modal dismissed at: "+new Date)})},a.copy=function(b){var c=f.open({animation:!0,size:"small",templateUrl:"app/contactmanager/contact/list/copy.modal.html",controller:"ContactManagerListCopyModalCtrl"});c.result.then(function(c){return h.save({id:b,controller:"copy"},c).$promise.then(function(b){a.openContactTab({firstName:b.firstName,lastName:b.lastName,id:b.id})})["catch"](function(a){l.error(a)})},function(){g.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.contacts.list",{url:"/list",templateUrl:"app/contactmanager/contact/list/list.html",params:{listId:null,companyId:null},controller:"ContactManagerContactListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager",{url:"/contactmanager",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:5}}})}]),angular.module("xCallyShuttleApp").factory("List",["$resource",function(a){return a("/api/contactmanager/lists/:listId/:controller/:id",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.lists",{url:"/lists",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:5}}})}]),angular.module("xCallyShuttleApp").controller("ContactManagerListListCreateModalCtrl",["$scope","$uibModalInstance",function(a,b){a.forms={dashboard:void 0},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ContactManagerListListCtrl",["$scope","$http","$translate","Modal","xAlert","$uibModal","$log","List","gridOptions",function(a,b,c,d,e,f,g,h,i){a.initView=function(){var b={exporterCsvFilename:"Lists.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:100,buttons:[{"class":"blue-hoki",name:"settings",href:"/contactmanager/lists/view/{{row.entity.id}}/settings"},{"class":"green-turquoise",name:"contacts",uisref:"main.contactmanager.contacts.list({listId:{{row.entity.id}}})"},{"class":"{{row.entity.defaultEntry ? 'red-sunglo disabled' : 'red-sunglo'}}",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=i.gridOptions(h,b,a)},a.create=function(){var d=f.open({animation:!0,templateUrl:"app/contactmanager/list/list/create.modal.html",controller:"ContactManagerListListCreateModalCtrl"});d.result.then(function(d){b.post("/api/contactmanager/lists/",d).then(function(b){a.gridOptions.getPage(),e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.error(a)})},function(){g.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.lists.list",{url:"/list",templateUrl:"app/contactmanager/list/list/list.html",controller:"ContactManagerListListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ContactManagerListCustomFieldViewCreateModalCtrl",["$scope","$uibModalInstance","$translate",function(a,b,c){a.$translate=c,a.forms={dashboard:void 0},a.item={},a.choices=[{value:""}],a.addField=function(){a.choices.push({})},a.removeField=function(b){a.choices.splice(b,1)},a.types=[{name:"APPLICATION_TEXT",value:"text"},{name:"APPLICATION_SELECT",value:"select"}],a.ok=function(){"select"===a.item.type&&(a.item.values=angular.toJson(a.choices)),b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ContactManagerListViewCtrl",["$scope","xAlert","$translate","$stateParams","socket","$location","$uibModal","$log","Modal","List","Team","gridOptions",function(a,b,c,d,e,f,g,h,i,j,k,l){function m(a){var b=a.split(""),c=0,d=0;return b.shift(),b.forEach(function(a,b){"{"===a?c++:"}"===a&&(c--,c||(d=b+1))}),d?JSON.parse("["+a.substr(1,d)+"]"):[]}var n=function(){return{select:function(b){return j.save({listId:a.list.id,controller:"agents"},{agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})},deselect:function(b){return j["delete"]({listId:a.list.id,controller:"agents",agents:b}).$promise.then(function(){a.getTeams()})["catch"](function(a){console.log(a)})}}};a.getList=function(){return j.get({listId:d.id}).$promise.then(function(b){a.list=b})["catch"](function(a){f.path("/contactmanager/lists/list")})},a.updateList=function(){return j.update({id:d.id},a.list).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){b.error(a)})},a.getTeams=function(){return k.get({controller:"associations"}).$promise.then(function(b){return a.teams=b.rows,a.list?void 0:a.getList()}).then(function(){return a.list.defaultEntry&&f.path("/contactmanager/lists/list"),j.get({listId:d.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindQueue(a.teams,_.map(b.rows,function(a){return{id:a.id}}),n)})["catch"](function(a){console.error(a)})},a.initCustomFields=function(){var b={exporterCsvFilename:"customfields.csv",primaryKey:"id",columnDefs:[{name:"alias",displayName:"APPLICATION_NAME"},{name:"name",displayName:"APPLICATION_FIELD"},{name:"type"},{name:"description"},{name:"action",width:200,buttons:[{"class":"blue-hoki",href:"/contactmanager/lists/view/{{grid.appScope.$stateParams.id}}/customfields/settings/{{row.entity.id}}",name:"settings"},{"class":"red-sunglo",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)",name:"delete"}]}]};a.gridOptions=l.gridOptions(j,b,a,{listId:d.id,controller:"customfields"})},a.create=function(){var e=g.open({animation:!0,templateUrl:"app/contactmanager/list/view/create.modal.html",controller:"ContactManagerListCustomFieldViewCreateModalCtrl"});e.result.then(function(e){return j.save({listId:d.id,controller:"customfields"},e).$promise.then(function(){a.gridOptions.getPage(),b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.error(a)})},function(){h.info("Modal dismissed at: "+new Date)})},a.getCustomField=function(){return j.get({listId:d.id,controller:"customfields",id:d.cfId}).$promise.then(function(b){if(a.customField=b,"select"===a.customField.type)try{a.choices=JSON.parse(a.customField.values)}catch(c){a.choices=m(a.customField.values)}})["catch"](function(a){console.error(a)})},a.updateCustomField=function(){var e=angular.copy(a.customField);return"select"===e.type&&(e.values=angular.toJson(a.choices)),j.update({listId:d.id,controller:"customfields",id:d.cfId},e).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){b.error(a)})},a.addField=function(){a.choices.push({})},a.removeField=function(b){a.choices.splice(b,1)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.contactmanager.lists.view",{url:"/view/:id",templateUrl:"app/contactmanager/list/view/view.html",controller:"ContactManagerListViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.contactmanager.lists.view.settings",{url:"/settings",templateUrl:"app/contactmanager/list/view/view.settings.html"}).state("main.contactmanager.lists.view.agents",{url:"/agents",templateUrl:"app/contactmanager/list/view/view.agents.html",cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}}).state("main.contactmanager.lists.view.customfields",{url:"/customfields",templateUrl:"app/contactmanager/list/view/view.customFields.html"}).state("main.contactmanager.lists.view.customfields.settings",{url:"/settings/:cfId",templateUrl:"app/contactmanager/list/view/view.customFieldSettings.html",controller:"ContactManagerListViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("DashboardChatCtrl",["$scope","Auth","ChatRoom","socket","Agent","$q","$translate","ReportChatSession","$timeout",function(a,b,c,d,e,f,g,h,i){a.Auth=b,a.moment=moment,a["new"]=0,a.open=0,a.unmanaged=0,a.closed=0;var j=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.initAgent=function(){a.table1={enableGridMenu:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,multiSelect:!0,columnDefs:[{name:"UserHasChatQueue.queue",headerCellFilter:"translate",displayName:"APPLICATION_QUEUE",cellClass:"text-center ui-grid-vcenter"}],data:[],onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){j(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)})}},a.table2={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"roomid",displayName:"APPLICATION_INTERACTION_ID",headerCellFilter:"translate"},{name:"websitename",displayName:"APPLICATION_WEBSITE",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.application}} <span data-ng-if=\"row.entity.application == 'queue' && row.entity.queuename\">({{row.entity.queuename}})</span></div>"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.abandon">{{\'APPLICATION_QUEUESTATUS_ABANDON\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span><span data-ng-if="!row.entity.leaveAt"> [<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</div>"}],data:[],gridMenuTitleFilter:function(a){var b=f.defer();return b.resolve(g.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){j(a.table2.data.length)})}},e.get({id:b.getCurrentUser().id,controller:"chat",controller1:"queues"}).$promise.then(function(b){a.table1.data=b.rows})["finally"](function(){d.socket.on("user_has_chat_queue:save",function(c){c.UserId!=b.getCurrentUser().id||_.find(a.table1.data,{id:c.ChatQueueId})||a.table1.data.push({id:c.ChatQueueId,UserHasChatQueue:c})}),d.socket.on("user_has_chat_queue:remove",function(c){c.UserId===b.getCurrentUser().id&&_.remove(a.table1.data,{id:c.ChatQueueId})})})["catch"](function(a){console.error(a)}),h.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.table2.data=b.rows})["finally"](function(){d.socket.on("report_chat_session:save",function(b){var c=_.find(a.table2.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&i(function(){_.remove(a.table2.data,{id:b.id})},1e4)):b.leaveAt||a.table2.data.push(b)}),d.socket.on("report_chat_session:remove",function(b){_.remove(a.table2.data,{id:b.id})})})["catch"](function(a){console.log(a)})},a.initWidget=function(b){var e;switch(b){case"unmanaged":e=c;break;default:e=h}return e.get({id:b}).$promise.then(function(c){a[b]=c.value,a.charts={interactions:{labels:[g.instant("APPLICATION_DASHBOARD_NEW"),g.instant("APPLICATION_DASHBOARD_OPEN"),g.instant("APPLICATION_UNMANAGED"),g.instant("APPLICATION_DASHBOARD_CLOSED"),g.instant("APPLICATION_DASHBOARD_ABANDONED")],values:[a["new"],a.open,a.unmanaged,a.closed,a.abandoned],colours:["#44B6AE","#578EBE","#35AA47","#8775A7","#f3c200"]}},d.socket.on("report_chat_dashboard:"+b,function(c){a[b]=c.value,a.charts.interactions.values=[a["new"],a.open,a.unmanaged,a.closed]})})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("DashboardCtrl",["$scope","$translate","Auth",function(a,b,c){}]),angular.module("xCallyShuttleApp").factory("Dashboard",["$resource",function(a){return a("/api/dashboards/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.dashboard",{"abstract":!0,url:"/dashboard",templateUrl:"app/dashboard/dashboard.html",controller:"DashboardCtrl",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:1}}}).state("main.dashboard.voice",{url:"/voice",controller:"DashboardVoiceCtrl",templateUrl:"app/dashboard/voice/voice.html"}).state("main.dashboard.chat",{url:"/chat",controller:"DashboardChatCtrl",templateUrl:"app/dashboard/chat/chat.html",data:{permissions:{redirectTo:"landing",id:8}}}).state("main.dashboard.mail",{url:"/mail",controller:"DashboardMailCtrl",templateUrl:"app/dashboard/mail/mail.html",data:{permissions:{redirectTo:"landing",id:9}}}).state("main.dashboard.fax",{url:"/fax",controller:"DashboardFaxCtrl",templateUrl:"app/dashboard/fax/fax.html",data:{permissions:{redirectTo:"landing",id:10}}}).state("main.dashboard.sms",{url:"/sms",controller:"DashboardSmsCtrl",templateUrl:"app/dashboard/sms/sms.html",data:{permissions:{redirectTo:"landing",id:11}}}).state("main.dashboard.openchannel",{url:"/openchannel",controller:"DashboardOpenChannelCtrl",templateUrl:"app/dashboard/openchannel/openchannel.html",data:{permissions:{redirectTo:"landing",id:20}}})}]),angular.module("xCallyShuttleApp").controller("DashboardFaxCtrl",["$scope","Auth","FaxRoom","socket","Agent","$translate","$q","ReportFaxSession","$timeout",function(a,b,c,d,e,f,g,h,i){a.Auth=b,a.moment=moment,a["new"]=0,a.open=0,a.pending=0,a.closed=0,a.initAgent=function(){a.table1={enableGridMenu:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,multiSelect:!0,columnDefs:[{name:"UserHasFaxQueue.queue",headerCellFilter:"translate",displayName:"APPLICATION_QUEUE",cellClass:"text-center ui-grid-vcenter"}],data:[],onRegisterApi:function(b){a.gridApi=b}},a.table2={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"roomid",displayName:"APPLICATION_INTERACTION_ID",headerCellFilter:"translate"},{name:"accountname",displayName:"APPLICATION_ACCOUNT_NAME",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.application}} <span data-ng-if=\"row.entity.application == 'queue' && row.entity.queuename\">({{row.entity.queuename}})</span></div>"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span><span data-ng-if="!row.entity.leaveAt"> [<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</span></div>"}],data:[],gridMenuTitleFilter:function(a){var b=g.defer();return b.resolve(f.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b}},e.get({id:b.getCurrentUser().id,controller:"fax",controller1:"queues"}).$promise.then(function(b){a.table1.data=b.rows})["finally"](function(){d.socket.on("user_has_fax_queue:save",function(c){c.UserId!=b.getCurrentUser().id||_.find(a.table1.data,{id:c.FaxQueueId})||a.table1.data.push({id:c.FaxQueueId,UserHasFaxQueue:c})}),d.socket.on("user_has_fax_queue:remove",function(c){c.UserId===b.getCurrentUser().id&&_.remove(a.table1.data,{id:c.FaxQueueId})})})["catch"](function(a){console.error(a)}),h.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.table2.data=b.rows})["finally"](function(){d.socket.on("report_fax_session:save",function(b){var c=_.find(a.table2.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&i(function(){_.remove(a.table2.data,{id:b.id})},1e4)):b.leaveAt||a.table2.data.push(b)}),d.socket.on("report_fax_session:remove",function(b){_.remove(a.table2.data,{id:b.id})})})["catch"](function(a){console.log(a)})},a.initWidget=function(b){var e;switch(b){case"timeout":case"waiting":e=h;break;default:e=c}return e.get({id:b}).$promise.then(function(c){a[b]=c.value,a.charts={interactions:{labels:[f.instant("APPLICATION_DASHBOARD_NEW"),f.instant("APPLICATION_DASHBOARD_OPEN"),f.instant("APPLICATION_DASHBOARD_PENDING"),f.instant("APPLICATION_DASHBOARD_CLOSED")],values:[a["new"],a.open,a.pending,a.closed],colours:["#44B6AE","#578EBE","#35AA47","#8775A7"]}},d.socket.on("report_fax_dashboard:"+b,function(c){a[b]=c.value,a.charts.interactions.values=[a["new"],a.open,a.pending,a.closed]})})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("DashboardMailCtrl",["$scope","Auth","MailRoom","socket","Agent","$translate","$q","ReportMailSession","$timeout",function(a,b,c,d,e,f,g,h,i){a.Auth=b,a.moment=moment,a["new"]=0,a.open=0,a.pending=0,a.closed=0,a.charts={interactions:{labels:[f.instant("APPLICATION_DASHBOARD_NEW"),f.instant("APPLICATION_DASHBOARD_OPEN"),f.instant("APPLICATION_DASHBOARD_PENDING"),f.instant("APPLICATION_DASHBOARD_CLOSED")],values:[a["new"],a.open,a.pending,a.closed],colours:["#44B6AE","#578EBE","#35AA47","#8775A7"]}},a.initAgent=function(){a.table1={enableGridMenu:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,multiSelect:!0,columnDefs:[{name:"UserHasMailQueue.queue",headerCellFilter:"translate",displayName:"APPLICATION_QUEUE",cellClass:"text-center ui-grid-vcenter"}],data:[],onRegisterApi:function(b){a.gridApi=b}},a.table2={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"roomid",displayName:"APPLICATION_INTERACTION_ID",headerCellFilter:"translate"},{name:"accountname",displayName:"APPLICATION_ACCOUNT_NAME",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.application}} <span data-ng-if=\"row.entity.application == 'queue' && row.entity.queuename\">({{row.entity.queuename}})</span></div>"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span><span data-ng-if="!row.entity.leaveAt"> [<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</span></div>"}],data:[],gridMenuTitleFilter:function(a){var b=g.defer();return b.resolve(f.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){})}},e.get({id:b.getCurrentUser().id,controller:"mail",controller1:"queues"}).$promise.then(function(b){a.table1.data=b.rows})["finally"](function(){d.socket.on("user_has_mail_queue:save",function(c){c.UserId!=b.getCurrentUser().id||_.find(a.table1.data,{id:c.MailQueueId})||a.table1.data.push({id:c.MailQueueId,UserHasMailQueue:c})}),d.socket.on("user_has_mail_queue:remove",function(c){c.UserId===b.getCurrentUser().id&&_.remove(a.table1.data,{id:c.MailQueueId})})})["catch"](function(a){console.error(a)}),h.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.table2.data=b.rows})["finally"](function(){d.socket.on("report_mail_session:save",function(b){var c=_.find(a.table2.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&i(function(){_.remove(a.table2.data,{id:b.id})},1e4)):b.leaveAt||a.table2.data.push(b)}),d.socket.on("report_mail_session:remove",function(b){_.remove(a.table2.data,{id:b.id})})})["catch"](function(a){console.log(a)})},a.initWidget=function(b){var e;switch(b){case"timeout":case"waiting":e=h;break;default:e=c}return e.get({id:b}).$promise.then(function(c){a[b]=c.value,a.charts={interactions:{labels:[f.instant("APPLICATION_DASHBOARD_NEW"),f.instant("APPLICATION_DASHBOARD_OPEN"),f.instant("APPLICATION_DASHBOARD_PENDING"),f.instant("APPLICATION_DASHBOARD_CLOSED")],values:[a["new"],a.open,a.pending,a.closed],colours:["#44B6AE","#578EBE","#35AA47","#8775A7"]}},d.socket.on("report_mail_dashboard:"+b,function(c){a[b]=c.value,a.charts.interactions.values=[a["new"],a.open,a.pending,a.closed]})})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("DashboardOpenChannelCtrl",["$scope","Auth","OpenChannelRoom","socket","Agent","$translate","$q","ReportOpenChannelSession","$timeout",function(a,b,c,d,e,f,g,h,i){a.Auth=b,a.moment=moment,a["new"]=0,a.open=0,a.pending=0,a.closed=0,a.initAgent=function(){a.table1={enableGridMenu:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,multiSelect:!0,columnDefs:[{name:"UserHasOpenchannelQueue.queue",headerCellFilter:"translate",displayName:"APPLICATION_QUEUE",cellClass:"text-center ui-grid-vcenter"}],data:[],onRegisterApi:function(b){a.gridApi=b}},a.table2={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"roomid",displayName:"APPLICATION_INTERACTION_ID",headerCellFilter:"translate"},{name:"accountname",displayName:"APPLICATION_ACCOUNT_NAME",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate",
+cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.application}} <span data-ng-if=\"row.entity.application == 'queue' && row.entity.queuename\">({{row.entity.queuename}})</span></div>"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span><span data-ng-if="!row.entity.leaveAt"> [<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</span></div>"}],data:[],gridMenuTitleFilter:function(a){var b=g.defer();return b.resolve(f.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b}},e.get({id:b.getCurrentUser().id,controller:"openchannel",controller1:"queues"}).$promise.then(function(b){a.table1.data=b.rows})["finally"](function(){d.socket.on("user_has_openchannel_queue:save",function(c){c.UserId!=b.getCurrentUser().id||_.find(a.table1.data,{id:c.OpenChannelQueueId})||a.table1.data.push({id:c.OpenChannelQueueId,UserHasOpenChannelQueue:c})}),d.socket.on("user_has_openchannel_queue:remove",function(c){c.UserId===b.getCurrentUser().id&&_.remove(a.table1.data,{id:c.OpenChannelQueueId})})})["catch"](function(a){console.error(a)}),h.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.table2.data=b.rows})["finally"](function(){d.socket.on("report_openchannel_session:save",function(b){var c=_.find(a.table2.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&i(function(){_.remove(a.table2.data,{id:b.id})},1e4)):b.leaveAt||a.table2.data.push(b)}),d.socket.on("report_openchannel_session:remove",function(b){_.remove(a.table2.data,{id:b.id})})})["catch"](function(a){console.log(a)})},a.initWidget=function(b){var e;switch(b){case"timeout":case"waiting":e=h;break;default:e=c}return e.get({id:b}).$promise.then(function(c){a[b]=c.value,a.charts={interactions:{labels:[f.instant("APPLICATION_DASHBOARD_NEW"),f.instant("APPLICATION_DASHBOARD_OPEN"),f.instant("APPLICATION_DASHBOARD_PENDING"),f.instant("APPLICATION_DASHBOARD_CLOSED")],values:[a["new"],a.open,a.pending,a.closed],colours:["#44B6AE","#578EBE","#35AA47","#8775A7"]}},d.socket.on("report_openchannel_dashboard:"+b,function(c){a[b]=c.value,a.charts.interactions.values=[a["new"],a.open,a.pending,a.closed]})})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("DashboardSmsCtrl",["$scope","Auth","SmsRoom","socket","Agent","$translate","$q","ReportSmsSession","$timeout",function(a,b,c,d,e,f,g,h,i){a.Auth=b,a.moment=moment,a["new"]=0,a.open=0,a.pending=0,a.closed=0,a.initAgent=function(){a.table1={enableGridMenu:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,multiSelect:!0,columnDefs:[{name:"UserHasSmsQueue.queue",headerCellFilter:"translate",displayName:"APPLICATION_QUEUE",cellClass:"text-center ui-grid-vcenter"}],data:[],onRegisterApi:function(b){a.gridApi=b}},a.table2={headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,columnDefs:[{name:"roomid",displayName:"APPLICATION_INTERACTION_ID",headerCellFilter:"translate"},{name:"accountname",displayName:"APPLICATION_ACCOUNT_NAME",headerCellFilter:"translate"},{name:"application",displayName:"APPLICATION_APPLICATION",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.application}} <span data-ng-if=\"row.entity.application == 'queue' && row.entity.queuename\">({{row.entity.queuename}})</span></div>"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.leaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.complete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.leaveAt && row.entity.timeout">{{\'APPLICATION_TIMEOUT\' | translate}}</span><span data-ng-if="!row.entity.leaveAt"> [<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"membername",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.membername || ''}}</span></div>"}],data:[],gridMenuTitleFilter:function(a){var b=g.defer();return b.resolve(f.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b}},e.get({id:b.getCurrentUser().id,controller:"sms",controller1:"queues"}).$promise.then(function(b){a.table1.data=b.rows})["finally"](function(){d.socket.on("user_has_sms_queue:save",function(c){c.UserId!=b.getCurrentUser().id||_.find(a.table1.data,{id:c.SmsQueueId})||a.table1.data.push({id:c.SmsQueueId,UserHasSmsQueue:c})}),d.socket.on("user_has_sms_queue:remove",function(c){c.UserId===b.getCurrentUser().id&&_.remove(a.table1.data,{id:c.SmsQueueId})})})["catch"](function(a){console.error(a)}),h.get({controller:"waiting",controller2:"applications"}).$promise.then(function(b){a.table2.data=b.rows})["finally"](function(){d.socket.on("report_sms_session:save",function(b){var c=_.find(a.table2.data,{id:b.id});c?(_.merge(c,b),b.leaveAt&&i(function(){_.remove(a.table2.data,{id:b.id})},1e4)):b.leaveAt||a.table2.data.push(b)}),d.socket.on("report_sms_session:remove",function(b){_.remove(a.table2.data,{id:b.id})})})["catch"](function(a){console.log(a)})},a.initWidget=function(b){var e;switch(b){case"timeout":case"waiting":e=h;break;default:e=c}return e.get({id:b}).$promise.then(function(c){a[b]=c.value,a.charts={interactions:{labels:[f.instant("APPLICATION_DASHBOARD_NEW"),f.instant("APPLICATION_DASHBOARD_OPEN"),f.instant("APPLICATION_DASHBOARD_PENDING"),f.instant("APPLICATION_DASHBOARD_CLOSED")],values:[a["new"],a.open,a.pending,a.closed],colours:["#44B6AE","#578EBE","#35AA47","#8775A7"]}},d.socket.on("report_sms_dashboard:"+b,function(c){a[b]=c.value,a.charts.interactions.values=[a["new"],a.open,a.pending,a.closed]})})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("DashboardVoiceCtrl",["$scope","$rootScope","$timeout","Auth","ReportQueue","ReportCall","Agent","VoiceQueue","Dashboard","socket",function(a,b,c,d,e,f,g,h,i,j){a.moment=moment,a.radioSwitch={size:"mini",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"success",onColor:"danger"};var k=function(a,b){var c=a?30*a+130:177;angular.element(document.getElementsByName(b)[0]).css("height",c+"px")};a.initUser=function(){var b;if(a.user=d.getCurrentUser(),a.voice={},a.$on("$destroy",function(){b&&(b.terminate(),j.socket.removeAllListeners("dashboard:voice:waiting"),j.socket.removeAllListeners("dashboard:voice:active"),j.socket.removeAllListeners("dashboard:voice:complete"),j.socket.removeAllListeners("dashboard:voice:abandon"),j.socket.removeAllListeners("dashboard:voice:unmanaged"),j.socket.removeAllListeners("dashboard:voice:holdtime"),j.socket.removeAllListeners("dashboard:voice:talktime"))}),a.onmessage=function(b){a.voice=b.data,a.$apply()},window.Worker){switch(b=new Worker("assets/workers/dashboard/voice/worker.js"),a.user.role){case"admin":h.get().$promise.then(function(a){return b.postMessage({evt:"myQueues",queues:a.rows}),i.get({id:"voice",controller:"init"}).$promise}).then(function(a){a.evt="dashboard:voice:init",b.postMessage(a)})["catch"](function(a){console.error(a)});break;case"user":b.postMessage({evt:"myQueues",queues:a.user.PVoiceQueues}),i.get({id:"voice",controller:"init"}).$promise.then(function(a){a.evt="dashboard:voice:init",b.postMessage(a)})}b.onmessage=a.onmessage}j.socket.on("dashboard:voice:waiting",function(a){a.evt="dashboard:voice:waiting",b.postMessage(a)}),j.socket.on("dashboard:voice:active",function(a){a.evt="dashboard:voice:active",b.postMessage(a)}),j.socket.on("dashboard:voice:complete",function(a){a.evt="dashboard:voice:complete",b.postMessage(a)}),j.socket.on("dashboard:voice:abandon",function(a){a.evt="dashboard:voice:abandon",b.postMessage(a)}),j.socket.on("dashboard:voice:unmanaged",function(a){a.evt="dashboard:voice:unmanaged",b.postMessage(a)}),j.socket.on("dashboard:voice:talktime",function(a){a.evt="dashboard:voice:talktime",b.postMessage(a)}),j.socket.on("dashboard:voice:holdtime",function(a){a.evt="dashboard:voice:holdtime",b.postMessage(a)}),j.socket.on("dashboard:voice:outbound",function(a){a.evt="dashboard:voice:outbound",b.postMessage(a)})},a.initAgent=function(){return a.agent=d.getCurrentUser(),j.socket.on("voice:queue:agent:join",function(b){b.loggedAt=moment().format("YYYY-MM-DD HH:mm:ss"),b.callstaken=0,a.table1.data.push(b)}),j.socket.on("voice:queue:agent:leave",function(b){_.remove(a.table1.data,{queue:b.queue})}),a.table1={enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,enableSorting:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,columnDefs:[{name:"queue",headerCellFilter:"translate",displayName:"APPLICATION_QUEUE",cellClass:"text-center ui-grid-vcenter"},{name:"loggedAt",displayName:"logged At",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span am-time-ago="row.entity.loggedAt"></span></div>'},{name:"lastcall",headerCellFilter:"translate",displayName:"APPLICATION_LAST_CALL",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span am-time-ago="row.entity.lastcall"></span></div>'},{name:"callstaken",headerCellFilter:"translate",displayName:"APPLICATION_CALLS_TAKEN",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div><span>{{row.entity.callstaken || 0}}</span></div>"}],data:[],onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){k(a.table1.paginationPageSize>a.table1.data.length?a.table1.data.length:a.table1.paginationPageSize,"table1")}),a.gridApi.pagination.on.paginationChanged(a,function(b,c){k(c>a.table1.data.length?a.table1.data.length:c,"table1")})}},a.table2={enableGridMenu:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:0,multiSelect:!1,columnDefs:[{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate"},{name:"status",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><span data-ng-if="!row.entity.queuecallerleaveAt">{{\'APPLICATION_QUEUESTATUS_WAITING\' | translate}}</span><span data-ng-if="row.entity.queuecallerleaveAt && !row.entity.queuecallercomplete && !row.entity.queuecallerabandon">{{\'APPLICATION_TALKING\' | translate}}</span><span data-ng-if="row.entity.queuecallercomplete">{{\'APPLICATION_QUEUESTATUS_COMPLETE\' | translate}}</span><span data-ng-if="row.entity.queuecallerabandon">{{\'APPLICATION_QUEUESTATUS_ABANDON\' | translate}}</span><span data-ng-if="!row.entity.queuecallerleaveAt">[<css-timer start-time="row.entity.updatedAt"></css-timer>]</span></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"caller",displayName:"APPLICATION_CALLER",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.calleridnum || ''}} {{row.entity.calleridname || ''}}</span></div>",enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1},{name:"position",displayName:"APPLICATION_POSITION",headerCellFilter:"translate"},{name:"lastAssignedTo",displayName:"APPLICATION_AGENT",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter"}],data:[],onRegisterApi:function(b){a.gridApi1=b,a.gridApi1.grid.registerDataChangeCallback(function(){k(a.gridApi1.core.getVisibleRows(a.gridApi1.grid).length,"table2")})}},a.table3={exporterCsvFilename:"abandoned_calls.csv",enableRowHeaderSelection:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!1,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,enableSelectAll:!1,enableHorizontalScrollbar:0,enableVerticalScrollbar:1,columnDefs:[{name:"queue",displayName:"APPLICATION_QUEUE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter"},{name:"caller",displayName:"APPLICATION_CALLER",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.calleridnum || ''}} {{row.entity.calleridname || ''}}</div>"},{name:"createdAt",displayName:"APPLICATION_DATE",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:"<div>{{row.entity.updatedAt | date:'yyyy-MM-dd HH:mm:ss'}}</div>"},{name:"lastAssignedTo",cellClass:"text-center ui-grid-vcenter",displayName:"APPLICATION_LAST_ASSIGNED_TO",headerCellFilter:"translate"},{name:"assigned",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",cellTemplate:'<div class="centered-uigrid-td"><input data-ng-change="grid.appScope.updateItem(row.entity)", bs-switch ng-model="row.entity.assigned" type="checkbox" switch-active="{{ !row.entity.assigned || grid.appScope.agent.name === row.entity.lastAssignedTo }}" switch-on-text="{{ \'APPLICATION_ASSIGNED\' | translate }}" switch-off-text="{{ \'APPLICATION_FREE\' | translate }}" switch-on-color="{{ grid.appScope.radioSwitch.onColor }}" switch-off-color="{{ grid.appScope.radioSwitch.offColor }}" switch-animate="{{ grid.appScope.radioSwitch.animate }}" switch-size="{{ grid.appScope.radioSwitch.size }}" switch-label="{{ grid.appScope.radioSwitch.label }}" switch-icon="{{ grid.appScope.radioSwitch.icon }}" switch-radio-off="{{ grid.appScope.radioSwitch.radioOff }}" switch-label-width="{{ grid.appScope.radioSwitch.labelWidth }}" switch-handle-width="{{ grid.appScope.radioSwitch.handleWidth }}"></div>',enableFiltering:!1}],data:[],onRegisterApi:function(b){a.gridApi2=b,a.gridApi2.grid.registerDataChangeCallback(function(){k(a.gridApi2.core.getVisibleRows(a.gridApi2.grid).length,"table3")})}},g.get({id:d.getCurrentUser().id,controller:"voice",controller1:"queues"}).$promise.then(function(b){a.table1.data=_.map(b.rows,function(a){return{queue:a.UserHasVoiceQueue.queue,loggedAt:a.UserHasVoiceQueue.loggedAt,callstaken:a.UserHasVoiceQueue.callstaken,lastcall:a.UserHasVoiceQueue.lastcall}})})["finally"](function(){k(a.table1.paginationPageSize>a.table1.data.length?a.table1.data.length:a.table1.paginationPageSize,"table1"),j.socket.on("voice:queue:update",function(b){var c=_.find(a.table1.data,{queue:b.queue});c?_.merge(c,b):a.table1.data.push(b)}),j.socket.on("user_has_voice_queue:remove",function(b){b.UserId===d.getCurrentUser().id&&_.remove(a.table1.data,{queue:b.queue})}),j.socket.on("user_has_voice_queue:save",function(b){if(b.UserId===d.getCurrentUser().id){var c=_.find(a.table1.data,{queue:b.queue});!c&&b.logged&&a.table1.data.unshift({queue:b.queue,loggedAt:moment(),lastcall:null,callstaken:0})}})})["catch"](function(a){console.error(a)}),e.get({id:"waiting",controller:"calls"}).$promise.then(function(b){a.table2.data=b.rows})["finally"](function(){j.socket.on("report_queue:save",function(b){a.table2.data.push(b)}),j.socket.on("report_queue:update",function(b){var d=_.find(a.table2.data,{id:b.id});d&&(_.merge(d,b),b.queuecallerleaveAt&&c(function(){_.remove(a.table2.data,{id:b.id})},3e3))})})["catch"](function(a){console.error(a)}),e.get({controller:"abandoned",controller2:"all"}).$promise.then(function(b){a.table3.data=b.rows})["catch"](function(a){console.error(a)})["finally"](function(){j.socket.on("report_queue:update",function(b){b.queuecallerabandon&&a.table3.data.unshift(b)})})},a.updateItem=function(b){return e.update({id:b.id},{assigned:b.assigned,lastAssignedTo:b.assigned?a.agent.name:void 0}).$promise["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.desk",{url:"/desk",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("DeskAccount",["$resource",function(a){return a("/api/desk/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("DeskListCtrl",["$scope","$http","$rootScope","xAlert","$translate","socket","Modal","stResource",function(a,b,c,d,e,f,g,h){a.conf={accountsByPage:{name:"10",value:10}},a.accountsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.accounts={checked:[]},a.check=function(b,c){c?a.accounts.checked=angular.copy(_.map(a.displayedDeskAccounts,"id")):a.accounts.checked=[]},a.getAccounts=function(b){return _.map(a.displayedDeskAccounts,function(a){var c={};return b.forEach(function(b){c[b]=a[b]}),c})},a.initList=function(b){f.unsyncUpdates("desk_account"),b.url="/api/desk/accounts",h.getPage(b).then(function(d){a.displayedDeskAccounts=d.rows,b.pagination.numberOfPages=d.total_pages,c.updateTableConfig(a.accountsByPage,a.displayedDeskAccounts.length),c.updateTableConfig(a.conf.accountsByPage,a.displayedDeskAccounts.length)}),f.socket.on("desk_account:save",function(){a.initList(b)}),f.socket.on("desk_account:remove",function(c){a.accounts.checked=_.without(a.accounts.checked,c.id),a.initList(b)})},a.deleteItem=g.confirm["delete"](function(a){b["delete"]("/api/desk/accounts/"+a).success(function(){d.show(e.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){d.error(a)})}),a.deleteItems=g.confirm["delete"](function(){b["delete"]("/api/desk/accounts",{params:{id:a.accounts.checked}}).success(function(){d.show(e.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){d.error(a)})}),a.checkAccount=function(a){b.get("/api/desk/accounts/"+a+"/check").then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.desk.list",{url:"/list",templateUrl:"app/desk/list/list.html",controller:"DeskListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("DeskViewCtrl",["$scope","$http","$stateParams","$translate","$location","WizardHandler","socket","xAlert","Modal","desk_com",function(a,b,c,d,e,f,g,h,i,j){a.$stateParams=c,a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:500,scrollInertia:0},a.initConfiguration=function(){a.formsConfiguration={},a.configuration={}},a.goNext=function(){f.wizard().next()},a.formValidation=function(a){return a},a.$on("$destroy",function(){g.unsyncUpdates("desk_configuration"),g.unsyncUpdates("desk_field")}),a.initView=function(){b.get("/api/desk/accounts/"+c.id).success(function(b){a.account=b}).error(function(a){h.error(a)})},a.updateItem=function(){b.put("/api/desk/accounts/"+c.id,a.account).success(function(){h.show(d.instant("MESSAGE_WELL_DONE")+".","success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.getConfigurations=function(){b.get("/api/desk/configurations",{params:{AccountId:c.id}}).success(function(b){a.configurations=b,g.socket.on("desk_configuration:remove",function(b){_.remove(a.configurations,{id:b.id})})}).error(function(a){h.error(a)})},a.deleteConfiguration=i.confirm["delete"](function(a){b["delete"]("api/desk/configurations/"+a).success(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}),a.createConfiguration=function(){a.configuration.AccountId=c.id,b.post("api/desk/configurations",a.configuration).success(function(a){e.path("desk/view/"+c.id+"/configurations/settings/"+a.id)}).error(function(){h.show("Something went wrong!","danger")})},a.fieldType=["string","variable"],a.descFieldType=["string","key_value"],a.getFields=function(){b.get("/api/desk/accounts/"+c.id+"/fields").success(function(b){a.accountFields=j.fields.concat(b)}).error(function(a){h.error(a)})},a.getConfiguration=function(){b.get("/api/desk/configurations/"+c.configurationId).success(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,g.socket.on("desk_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})}).error(function(a){h.error(a)})},a.getVariables=function(){b.get("/api/variables").success(function(b){a.variables=b.rows}).error(function(a){h.error(a)})},a.removeItem=function(a){b["delete"]("api/desk/fields/"+a.id).success(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addItemSubject=function(){var d={type:"string",content:""};b.post("/api/desk/configurations/"+c.configurationId+"/subject",d).success(function(b){a.subjectConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.addItemDescription=function(){var d={type:"string",content:""};b.post("/api/desk/configurations/"+c.configurationId+"/description",d).success(function(b){a.descriptionConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.addItemField=function(){var d={content:""};b.post("/api/desk/configurations/"+c.configurationId+"/field",d).success(function(b){a.fieldConfig.push(b)}).error(function(){h.show("Something went wrong!","danger")})},a.updateField=function(a){b.put("/api/desk/fields/"+a.id,a).success(function(){}).error(function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.changeType=function(b){"variable"===b.type?b.content="":"string"===b.type&&(b.VariableId=null),a.updateField(b)},a.changeDescType=function(b){"key_value"===b.type?(b.content="","string"===b.keyType?b.VariableId=null:"variable"===b.keyType&&(b.keyContent="")):"string"===b.type&&(b.VariableId=null,b.key="",b.keyContent=""),a.updateField(b)},a.changeFieldType=function(b){if(b.content="",b.idField){var c=_.find(a.accountFields,"id",b.idField);c&&(b.customField=_.result(c,"custom",!0))}a.updateField(b)},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"id",b);return c?c.data.choices?c.data.choices:null:void 0}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.desk.view",{url:"/view/:id",templateUrl:"app/desk/view/view.html",controller:"DeskViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.desk.view.account",{url:"/account",templateUrl:"app/desk/view/view.account.html"}).state("main.desk.view.configurations",{url:"/configurations",templateUrl:"app/desk/view/view.configurations.html"}).state("main.desk.view.configurations.settings",{url:"/settings/:configurationId",templateUrl:"app/desk/view/view.configurationSettings.html",controller:"DeskViewCtrl"}).state("main.desk.view.configuration",{url:"/configuration",templateUrl:"app/desk/view/view.configuration.html"})}]),angular.module("xCallyShuttleApp").controller("DeskWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler",function(a,b,c,d,e,f){a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={}},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){console.log(a.item),b.post("api/desk/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/desk/list")}).error(function(){e.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.desk.wizard",{url:"/wizard",templateUrl:"app/desk/wizard/wizard.html",controller:"DeskWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.freshdesk",{url:"/freshdesk",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("FreshdeskAccount",["$resource",function(a){return a("/api/freshdesk/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("FreshdeskListCtrl",["$scope","$http","$rootScope","xAlert","$translate","socket","Modal","stResource",function(a,b,c,d,e,f,g,h){a.conf={accountsByPage:{name:"10",value:10}},a.accountsByPage=[{name:"10",value:10},{name:"25",value:25},{name:"50",value:50},{name:"All",value:0}],a.accounts={checked:[]},a.check=function(b,c){c?a.accounts.checked=angular.copy(_.map(a.displayedFreshdeskAccounts,"id")):a.accounts.checked=[]},a.getAccounts=function(b){return _.map(a.displayedFreshdeskAccounts,function(a){var c={};return b.forEach(function(b){c[b]=a[b]}),c})},a.initList=function(b){f.unsyncUpdates("freshdesk_account"),b.url="/api/freshdesk/accounts",h.getPage(b).then(function(d){a.displayedFreshdeskAccounts=d.rows,b.pagination.numberOfPages=d.total_pages,c.updateTableConfig(a.accountsByPage,a.displayedFreshdeskAccounts.length),c.updateTableConfig(a.conf.accountsByPage,a.displayedFreshdeskAccounts.length)}),f.socket.on("freshdesk_account:save",function(){a.initList(b)}),f.socket.on("freshdesk_account:remove",function(c){a.accounts.checked=_.without(a.accounts.checked,c.id),a.initList(b)})},a.deleteItem=g.confirm["delete"](function(a){b["delete"]("/api/freshdesk/accounts/"+a).success(function(){d.show(e.instant("MESSAGE_WELL_DONE")+"!","success")}).error(function(a){d.error(a)})}),a.deleteItems=g.confirm["delete"](function(){b["delete"]("/api/freshdesk/accounts",{params:{id:a.accounts.checked}}).success(function(){d.show(e.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){d.error(a)})}),a.checkAccount=function(a){b.get("/api/freshdesk/accounts/"+a+"/check").then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.freshdesk.list",{url:"/list",templateUrl:"app/freshdesk/list/list.html",controller:"FreshdeskListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("FreshdeskViewCtrl",["$scope","$http","$stateParams","$translate","$location","$filter","WizardHandler","socket","xAlert","Modal",function(a,b,c,d,e,f,g,h,i,j){a.$stateParams=c,a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:500,scrollInertia:0},a.initConfiguration=function(){a.formsConfiguration={},a.configuration={}},a.goNext=function(){g.wizard().next()},a.formValidation=function(a){return a},a.$on("$destroy",function(){h.unsyncUpdates("freshdesk_configuration"),h.unsyncUpdates("freshdesk_field")}),a.initView=function(){b.get("/api/freshdesk/accounts/"+c.id).success(function(b){a.account=b}).error(function(a){i.error(a)})},a.updateItem=function(){b.put("/api/freshdesk/accounts/"+c.id,a.account).success(function(){i.show(d.instant("MESSAGE_WELL_DONE")+".","success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.getConfigurations=function(){b.get("/api/freshdesk/configurations",{params:{AccountId:c.id}}).success(function(b){a.configurations=b,h.socket.on("freshdesk_configuration:remove",function(b){_.remove(a.configurations,{id:b.id})})}).error(function(a){i.error(a)})},a.deleteConfiguration=j.confirm["delete"](function(a){b["delete"]("api/freshdesk/configurations/"+a).success(function(){i.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}),a.createConfiguration=function(){a.configuration.AccountId=c.id,b.post("api/freshdesk/configurations",a.configuration).success(function(a){e.path("freshdesk/view/"+c.id+"/configurations/settings/"+a.id)}).error(function(){i.show("Something went wrong!","danger")})},a.fieldType=["string","variable"],a.descFieldType=["string","key_value"],a.getFields=function(){b.get("/api/freshdesk/accounts/"+c.id+"/fields").success(function(b){a.accountFields=[],b=f("freshdesk")(b),_.forEach(b,function(b){a.accountFields.push(b.ticket_field)})}).error(function(a){i.error(a)})},a.getConfiguration=function(){b.get("/api/freshdesk/configurations/"+c.configurationId).success(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,h.socket.on("freshdesk_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})}).error(function(a){i.error(a)})},a.getVariables=function(){b.get("/api/variables").success(function(b){a.variables=b.rows}).error(function(a){i.error(a)})},a.removeItem=function(a){b["delete"]("api/freshdesk/fields/"+a.id).success(function(){i.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addItemSubject=function(){var d={type:"string",content:""};b.post("/api/freshdesk/configurations/"+c.configurationId+"/subject",d).success(function(b){a.subjectConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.addItemDescription=function(){var d={type:"string",content:""};b.post("/api/freshdesk/configurations/"+c.configurationId+"/description",d).success(function(b){a.descriptionConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.addItemField=function(){var d={content:""};b.post("/api/freshdesk/configurations/"+c.configurationId+"/field",d).success(function(b){a.fieldConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.updateField=function(a){b.put("/api/freshdesk/fields/"+a.id,a).success(function(){}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.changeType=function(b){"variable"===b.type?b.content="":"string"===b.type&&(b.VariableId=null),a.updateField(b)},a.changeDescType=function(b){"key_value"===b.type?(b.content="","string"===b.keyType?b.VariableId=null:"variable"===b.keyType&&(b.keyContent="")):"string"===b.type&&(b.VariableId=null,b.key="",b.keyContent=""),a.updateField(b)},a.changeFieldType=function(b){if(b.content="",b.idField){var c=_.find(a.accountFields,"name",b.idField);c&&(b.customField=!_.result(c,"default",!0))}a.updateField(b)},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"name",b);return c?c.choices.length>0?c.choices:null:void 0}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.freshdesk.view",{url:"/view/:id",templateUrl:"app/freshdesk/view/view.html",controller:"FreshdeskViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.freshdesk.view.account",{url:"/account",templateUrl:"app/freshdesk/view/view.account.html"}).state("main.freshdesk.view.configurations",{url:"/configurations",templateUrl:"app/freshdesk/view/view.configurations.html"}).state("main.freshdesk.view.configurations.settings",{url:"/settings/:configurationId",templateUrl:"app/freshdesk/view/view.configurationSettings.html",controller:"FreshdeskViewCtrl"}).state("main.freshdesk.view.configuration",{url:"/configuration",templateUrl:"app/freshdesk/view/view.configuration.html"})}]),angular.module("xCallyShuttleApp").controller("FreshdeskWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler",function(a,b,c,d,e,f){
+a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={}},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){console.log(a.item),b.post("api/freshdesk/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/freshdesk/list")}).error(function(){e.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.freshdesk.wizard",{url:"/wizard",templateUrl:"app/freshdesk/wizard/wizard.html",controller:"FreshdeskWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.iframe",{url:"/iframe",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("IframeViewCtrl",["$scope","Auth","Integration","xAlert","$translate","$sce",function(a,b,c,d,e,f){a.Auth=b,a.initView=function(){return c.get({state:"iframe"}).$promise.then(function(c){a.iframe=_.first(c.rows),a.iframe.remoteUri?a.url=f.trustAsResourceUrl(a.iframe.remoteUri):b.isAgent()&&d.show(e.instant("MESSAGE_NO_IFRAME_CONFIGURED")+".","danger")})["catch"](function(a){d.error(a)})},a.updateItem=function(){return b.isAgent()?void 0:c.update({id:a.iframe.id},a.iframe).$promise.then(function(){d.show(e.instant("MESSAGE_WELL_DONE")+".","success")})["catch"](function(a){d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.iframe.view",{url:"/view",templateUrl:"app/iframe/view/view.html",controller:"IframeViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("Integration",["$resource",function(a){return a("/api/integrations/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.integrations",{url:"/integrations",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:19}}})}]),angular.module("xCallyShuttleApp").controller("IntegrationListCtrl",["$scope","Modal","socket","FileUploader","Integration","xAlert",function(a,b,c,d,e,f){a.integrationsByPage=10;var g=a.uploader=new d({url:"api/integrations",autoUpload:!0,removeAfterUpload:!0});g.filters.push({name:"zipFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|zip|".indexOf(b)}}),g.onSuccessItem=function(a,b,c,d){console.info("onSuccessItem",a,b,c,d),f.show(b.name,"success")},g.onErrorItem=function(a,b,c,d){console.info("onErrorItem",a,b,c,d),b.errors.forEach(function(a){f.error(err)})},a.deleteItem=b.confirm["delete"](function(a){e["delete"]({id:a},function(){f.show("Integration Removed","success")},function(a){f.error(a)})}),a.initList=function(){a.integrations=e.query({},function(a){c.syncUpdates("integration",a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.integrations.list",{url:"/list",templateUrl:"app/integration/list/list.html",controller:"IntegrationListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js"]})}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty",{url:"/jscripty",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("JscriptyProject",["$resource",function(a){return a("/api/jscripty/projects/:id/:controller/:action/:action2",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("JscriptyProjectListCtrl",["$scope","$uibModal","JscriptyProject","gridOptions","Auth",function(a,b,c,d,e){a.Auth=e,a.initView=function(){var b={exporterCsvFilename:"jscriptyProjects.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:300,buttons:[{"class":"blue-hoki",icon:"icon-settings",href:"/jscripty/projects/view/{{row.entity.id}}",hide:e.isAgent()},{"class":" green-turquoise",icon:"fa fa-play",onClick:"grid.appScope.openJscriptyTab(row.entity)"},{"class":"purple",icon:"icon-book-open",href:"/jscripty/projects/report/{{row.entity.id}}/sessions",hide:e.isAgent()},{"class":"red-sunglo",icon:"fa fa-trash",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)",hide:e.isAgent()}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/jscripty/project/list/list.create.modal.html",controller:"JscriptyProjectListCreateCtrl"});c.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("JscriptyProjectListCreateCtrl",["$scope","$translate","$uibModalInstance","JscriptyProject","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){console.log(a),e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty.projects.list",{url:"/list",templateUrl:"app/jscripty/project/list/list.html",controller:"JscriptyProjectListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty.projects",{url:"/projects",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("JscriptyProjectReportCtrl",["$scope","uiGridConstants","$http","$state","$stateParams","socket","Auth","Modal","xAlert","$translate","$rootScope","gridOptions","JscriptyProject","$location",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){a.projectStats={started:0,incomplete:0,completed:0},a.projectId=e.id,a.initView=function(){m.get({id:e.id}).$promise.then(function(b){a.project=b})["catch"](function(a){i.error(a)}),m.get({id:e.id,controller:"sessions"}).$promise.then(function(b){var c=_.groupBy(b.rows,"status");a.projectStats.started=c.started?c.started.length:0,a.projectStats.completed=c.completed?c.completed.length:0,a.projectStats.incomplete=c.incomplete?c.incomplete.length:0})["catch"](function(a){i.error(a)})},a.pdf=function(a,b){var c=[];if(a){var d=html2canvas(document.getElementById(a)),e=d.parse(),f=d.render(e),g=f.toDataURL("image/png");c.push({image:g,width:500,style:"img"})}b.length&&_.forEach(b,function(a){var b=html2canvas(document.getElementById(a.question_id)),d=b.parse(),e=b.render(d),f=e.toDataURL("image/png");c.push({image:f,width:500,style:"img"})});var h={content:c};pdfMake.createPdf(h).download("Project_summary.pdf")},a.getProjectSessions=function(){var c={exporterCsvFilename:"jscriptyProjects.csv",columnDefs:[{name:"session_id",displayName:"APPLICATION_SESSIONID"},{name:"queue",displayName:"APPLICATION_QUEUE"},{name:"membername",displayName:"APPLICATION_AGENT"},{name:"calleridnum",displayName:"APPLICATION_CALLERIDNUM"},{name:"createdAt",displayName:"APPLICATION_STARTEDAT",filterHeaderTemplate:'<div class="ui-grid-filter-container row"><div ng-repeat="colFilter in col.filters" class="col-md-6 col-md-offset-0 col-sm-5 col-sm-offset-0 col-xs-5 col-xs-offset-0"><div custom-grid-date-filter-header></div></div></div>',filters:[{name:"From",condition:b.filter.GREATER_THAN_OR_EQUAL},{name:"To",condition:b.filter.LESS_THAN_OR_EQUAL}]},{name:"completedAt",displayName:"APPLICATION_COMPLETEDAT",filterHeaderTemplate:'<div class="ui-grid-filter-container row"><div ng-repeat="colFilter in col.filters" class="col-md-6 col-md-offset-0 col-sm-5 col-sm-offset-0 col-xs-5 col-xs-offset-0"><div custom-grid-date-filter-header></div></div></div>',filters:[{name:"From",condition:b.filter.GREATER_THAN_OR_EQUAL},{name:"To",condition:b.filter.LESS_THAN_OR_EQUAL}]},{name:"status",displayName:"APPLICATION_STATUS"},{name:"last_question_id",displayName:"APPLICATION_LASTQUESTIONID"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/jscripty/projects/report/{{row.entity.projectId}}/session/{{row.entity.session_id}}",name:"Detail"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteSession(row.entity.session_id)"}]}]};a.gridOptions=l.gridOptions(m,c,a,{id:e.id,controller:"sessions"})},a.deleteSession=function(b){m["delete"]({id:e.id,controller:"sessions",action:b}).$promise.then(function(b){a.gridOptions.getPage(),a.initView(),i.show(j.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){i.error(a)})},a.getSessionDetails=function(){m.get({id:e.id,controller:"sessions",action:e.sessionId}).$promise.then(function(b){a.session=b,a.sessionQuestions=b.ReportJscriptyQuestions})["catch"](function(a){i.error(a)})},a.getQuestionSummary=function(){var b={exporterCsvFilename:"jscriptyProjects.csv",columnDefs:[{name:"question_id",displayName:"APPLICATION_QUESTIONID"},{name:"question_type",displayName:"APPLICATION_QUESTIONTYPE"},{name:"question_label",displayName:"APPLICATION_QUESTIONLABEL"},{name:"question_text",displayName:"APPLICATION_QUESTION"},{name:"count",displayName:"APPLICATION_COUNT",enableFiltering:!1},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/jscripty/projects/report/"+e.id+"/detail/{{row.entity.question_id}}",name:"Detail"}]}]};a.gridOptions=l.gridOptions(m,b,a,{id:e.id,controller:"questions",action:"summary"})},a.getQuestionInputs=function(){var b={exporterCsvFilename:"jscriptyProjects.csv",columnDefs:[{name:"session_id",displayName:"APPLICATION_SESSIONID"},{name:"question_id",displayName:"APPLICATION_QUESTIONID",enableFiltering:!1},{name:"question_label",displayName:"APPLICATION_QUESTIONLABEL",enableFiltering:!1},{name:"question_text",displayName:"APPLICATION_QUESTION",enableFiltering:!1},{name:"input_label",displayName:"APPLICATION_INPUTLABEL",enableFiltering:!1},{name:"input_value",cellTemplate:'<div uib-tooltip="{{row.entity.input_value}}">{{row.entity.input_value}}</div>',displayName:"APPLICATION_INPUTVALUE",enableFiltering:!1}]};a.gridOptions=l.gridOptions(m,b,a,{id:e.id,controller:"inputs"})},a.getProjectDetail=function(){a.projectDetail=[],m.query({id:e.id,controller:"questions",action:"detail"}).$promise.then(function(b){console.log(e.questionId),e.questionId?a.projectDetail.push(_.find(b,function(a){return a.question_id==parseInt(e.questionId)})):a.projectDetail=b,console.log(a.projectDetail)})["catch"](function(a){i.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty.projects.report",{url:"/report/:id",templateUrl:"app/jscripty/project/report/report.html",controller:"JscriptyProjectReportCtrl"}).state("main.jscripty.projects.report.sessions",{url:"/sessions",templateUrl:"app/jscripty/project/report/report.sessions.html"}).state("main.jscripty.projects.report.summary",{url:"/summary",templateUrl:"app/jscripty/project/report/report.summary.html"}).state("main.jscripty.projects.report.inputs",{url:"/inputs",templateUrl:"app/jscripty/project/report/report.inputs.html"}).state("main.jscripty.projects.report.detail",{url:"/detail",templateUrl:"app/jscripty/project/report/report.detail.html"}).state("main.jscripty.projects.report.questionDetail",{url:"/detail/:questionId",controller:"JscriptyProjectReportCtrl",templateUrl:"app/jscripty/project/report/report.detail.html"}).state("main.jscripty.projects.report.sessionDetail",{url:"/session/:sessionId",controller:"JscriptyProjectReportCtrl",templateUrl:"app/jscripty/project/report/report.session.detail.html"})}]),angular.module("xCallyShuttleApp").controller("JscriptyProjectViewCtrl",["$scope","$http","$state","$stateParams","socket","Auth","Modal","xAlert","$translate","$rootScope",function(a,b,c,d,e,f,g,h,i,j){a.jscriptyProject={},a.getProject=function(){b.get("/api/jscripty/projects/"+d.id).success(function(b){a.jscriptyProject=b,angular.element(document).ready(function(){window.onerror=function(a,b,c){try{if(null!=a&&-1!=a.indexOf("Script error."));else{var d=new Image;d.src="assets/plugins/mxgraph/images/1x1.png?msg="+encodeURIComponent(a)+"&url="+encodeURIComponent(b)+"&lnum="+encodeURIComponent(c)}}catch(e){}},b.token=f.getToken();var a=new EditorUi(new Editor);a.openString(b.draft,b.name,b),a.editor.graphChangeListener=function(a,b){var c=b.properties.rtChange||!1;c||(this.modified=!0)}}),e.syncUpdates("jscripty_project",[b],function(a,c,d){c.id===b.id})})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.jscripty.projects.view",{url:"/view/:id",templateUrl:"app/jscripty/project/view/view.html",controller:"JscriptyProjectViewCtrl",authenticate:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",serie:!0,cache:!1,files:["assets/plugins/mxgraph/css/common.css","assets/plugins/mxgraph/css/explorer.css","assets/plugins/mxgraph/styles/grapheditor.css","assets/plugins/mxgraph/styles/custom.css","assets/plugins/jscripty/js/custom.js","assets/plugins/mxgraph/js/mxClient.js","assets/plugins/jscripty/js/Editor.js","assets/plugins/jscripty/js/Graph.js","assets/plugins/jscripty/js/EditorUi.js","assets/plugins/jscripty/js/Actions.js","assets/plugins/jscripty/js/Menus.js","assets/plugins/jscripty/js/Sidebar.js","assets/plugins/jscripty/js/Toolbar.js","assets/plugins/jscripty/js/Dialogs.js"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("LandingCtrl",["$scope","$location","$window","$timeout","Auth","Setting","YourDashboard",function(a,b,c,d,e,f,g){function h(b,c){var d,f,g=b.length;for(d=0;g>d;d++)if(_.includes(c,b[d].id))if(b[d].SubModules&&b[d].SubModules.length){if(f=h(b[d].SubModules,c))return f}else switch(b[d].id){case 2:var i={};i[e.getRole()]=!0;var j=_.find(a.tempDashboards,i);if(j)return f="/tools/yourdashboards/show/"+j.id,delete a.tempDashboards,f;break;default:return b[d].path}}function i(c){c||(a.message="MESSAGE_NO_AVAILABLE_MODULES"),d(function(){b.path(c)},500)}a.initLanding=function(){a.year=moment().year(),f.get({controller:"info"}).$promise.then(function(b){a.info=b})["catch"](function(a){console.error(a)});var c,d;return(d=e.getCurrentUser().$promise)?d.then(function(b){switch(c=b,c.role){case"user":if(_.includes(_.map(b.Modules,"id"),2))return g.get().$promise.then(function(d){a.tempDashboards=d.rows,i(h(c.Modules,_.map(b.Modules,"id")))})["catch"](function(){_.remove(c.Modules,{id:2}),i(h(c.Modules,_.map(b.Modules,"id")))});i(h(c.Modules,_.map(b.Modules,"id")));break;case"admin":case"agent":i("/dashboard/voice")}})["catch"](function(a){console.error(a),b.path("/login")}):void b.path("/login")}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("landing",{url:"/landing",templateUrl:"app/landing/landing.html",controller:"LandingCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/error.css","assets/css/login.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("LoginCtrl",["$scope","Auth","$location","$window","$rootScope","Setting","xAlert","$stateParams",function(a,b,c,d,e,f,g,h){a.year=moment().year(),a.recovered=h.reset,a.userLogin={},a.userSignUp={},a.loginSubmitted=!1,a.signupSubmitted=!1,a.errorLogin=!1,a.errorSignup=!1,a.errorLog="",a.forgotPassword=!1,a.showRecoverMessage=!1,a.flagLogin1=!1,a.getInfo=function(){return f.get({controller:"info"}).$promise.then(function(b){a.info=b})["catch"](function(a){console.error(a)})},a.toggleLogin=function(){a.flagLogin1=!a.flagLogin1},a.toggleForgotPassword=function(b){a.showRecoverMessage=!1,a.userLogin.email="",a.forgotPassword=b},e.bodyLayout="login",a.$on("$viewContentLoaded",function(){Metronic.init(),Layout.init()}),a.recover=function(){b.recover({email:a.userLogin.email}).then(function(){a.showRecoverMessage=!0})["catch"](function(b){console.log(b),a.showRecoverMessage=!1,g.error(b)})},a.login=function(d){a.loginSubmitted=!0,d.$valid?b.login({name:a.userLogin.name,password:a.userLogin.password,remember:a.userLogin.remember}).then(function(){c.path("/landing")})["catch"](function(b){a.errorLog=b.message||"error",a.errorLogin=!0}):a.errorLogin=!0},a.signup=function(c){a.signupSubmitted=!0,c.$valid?b.createUser({email:a.userSignUp.email,fullname:a.userSignUp.fullname,name:a.userSignUp.name,password:a.userSignUp.password,role:a.userSignUp.role,online:!0})["catch"](function(b){a.errorLog=b.message||"error",a.errorSignup=!0}):a.errorSignup=!0},a.loginOauth=function(a){d.location.href="/auth/"+a}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("login",{url:"/login",templateUrl:"app/login/login.html",params:{reset:null},controller:"LoginCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/login.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("Action",["$resource",function(a){return a("/api/actions/:name/:controller",{name:"@name"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("Ami",["$resource",function(a){return a("/api/ami/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("ChooseContactModalCtrl",["$scope","$uibModalInstance","data","xAlert","$translate","Contact",function(a,b,c,d,e,f){a.open=function(a){b.close(a)},a.getContacts=function(){return f.search({controller:"listcontact"},c).$promise.then(function(b){a.contacts=b.rows})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("CloseEditedTabModalCtrl",["$scope","$uibModalInstance",function(a,b){a.close=function(){b.close()},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("CloseEditedTabModalJscriptyCtrl",["$scope","$uibModalInstance","project","JscriptyProject","xAlert",function(a,b,c,d,e){a.init=function(){a.project=c},a.close=function(){d.update({id:a.project.projectId,controller:"sessions",action:a.project.sessionId},{status:"incomplete",completedAt:Date(),last_question_id:a.project.lastQuestionId}).$promise.then(function(a){e.show("Project Ended","success")}),b.close()},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("ContactManagerSetDisposition",["$scope","$uibModalInstance","VoiceDisposition",function(a,b,c){a.initDisposition=function(){return c.get().$promise.then(function(b){a.dispositions=b.rows})["catch"](function(a){console.error(a)})},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss()}}]),angular.module("xCallyShuttleApp").controller("customGridDateFilterModalCtrl",["$scope","$rootScope","$log","$uibModalInstance","term","hasTime",function(a,b,c,d,e,f){if(a.hasTime=f,a.dateTime={},e)if(f){var g=e.split(" ");a.dateTime.filterDate=moment(g[0]),a.dateTime.time=e[1]?moment(g[1],"HH:mm"):moment()}else a.dateTime.filterDate=moment(e);else f&&(a.dateTime.time=moment());a.setFilterDate=function(b){d.close({date:moment(b).format("YYYY-MM-DD").toString(),time:f?a.dateTime.time?moment(a.dateTime.time).format("HH:mm").toString():moment().format("HH:mm").toString():null})},a.cancelDateFilter=function(){d.dismiss()}}]),angular.module("xCallyShuttleApp").controller("customGridTagsModalCtrl",["$scope","$rootScope","$log","$uibModalInstance","term","Tag","xAlert",function(a,b,c,d,e,f,g){a.initModal=function(){return a.item={},f.get().$promise.then(function(b){a.tags=_.map(b.rows,"name"),a.item.myTags=e})["catch"](function(a){console.log("error retrieving tags"),g.error(a),d.dismiss()})},a.setFilterTags=function(){d.close(a.item.myTags)},a.cancelTagsFilter=function(){d.dismiss()}}]),angular.module("xCallyShuttleApp").factory("templateVariable",["$translate",function(a){return[{id:"voice",label:a.instant("APPLICATION_VOICE"),title:a.instant("APPLICATION_VOICE"),groups:[{label:a.instant("APPLICATION_QUEUE"),values:[{value:"{{uniqueid}}",label:a.instant("APPLICATION_UNIQUEID"),description:a.instant("APPLICATION_UNIQUEID")},{value:"{{calleridnum}}",label:a.instant("APPLICATION_CALLERIDNUM"),description:a.instant("APPLICATION_CALLERIDNUM")},{value:"{{calleridname}}",label:a.instant("APPLICATION_CALLERIDNAME"),description:a.instant("APPLICATION_CALLERIDNAME")},{value:"{{queue}}",label:a.instant("APPLICATION_QUEUE"),description:a.instant("APPLICATION_QUEUE")},{value:"{{interface}}",label:a.instant("APPLICATION_INTERFACE"),description:a.instant("APPLICATION_INTERFACE")},{value:"{{membername}}",label:a.instant("APPLICATION_MEMBERNAME"),description:a.instant("APPLICATION_MEMBERNAME")},{value:"{{holdtime}}",label:a.instant("APPLICATION_HOLDTIME"),description:a.instant("APPLICATION_HOLDTIME")},{value:"{{talktime}}",label:a.instant("APPLICATION_TALKTIME"),description:a.instant("APPLICATION_TALKTIME")},{value:"{{connectedlinenum}}",label:a.instant("APPLICATION_CONNECTEDLINENUM"),description:a.instant("APPLICATION_CONNECTEDLINENUM")},{value:"{{connectedlinename}}",label:a.instant("APPLICATION_CONNECTEDLINENAME"),description:a.instant("APPLICATION_CONNECTEDLINENAME")},{value:"{{agentconnectAt}}",label:a.instant("APPLICATION_CONNECTED_AT"),description:a.instant("APPLICATION_CONNECTED_AT")},{value:"{{agentcalledAt}}",label:a.instant("APPLICATION_CALLED_AT"),description:a.instant("APPLICATION_CALLED_AT")},{value:"{{agentcompleteAt}}",label:a.instant("APPLICATION_COMPLETED_AT"),description:a.instant("APPLICATION_AGENT_CALLED_AT")},{value:"{{reason}}",label:a.instant("APPLICATION_REASON"),description:a.instant("APPLICATION_REASON")},{value:"{{lastevent}}",label:a.instant("APPLICATION_LAST_EVENT"),description:a.instant("APPLICATION_LAST_EVENT")},{value:"{{channel}}",label:a.instant("APPLICATION_CHANNEL"),description:a.instant("APPLICATION_CHANNEL")}]}]},{id:"chat",label:a.instant("APPLICATION_CHAT"),title:a.instant("APPLICATION_CHAT"),groups:[{label:a.instant("APPLICATION_VARIABLES"),values:[{value:"{{username}}",label:a.instant("APPLICATION_USERNAME"),description:a.instant("APPLICATION_USERNAME")},{value:"{{email}}",label:a.instant("APPLICATION_MAIL"),description:a.instant("APPLICATION_MAIL")},{value:"{{text}}",label:a.instant("APPLICATION_TEXT"),description:a.instant("APPLICATION_TEXT")},{value:"{{chatWebsite}}",label:a.instant("APPLICATION_WEBSITE"),description:a.instant("APPLICATION_WEBSITE")}]}]},{id:"mail",label:a.instant("APPLICATION_MAIL"),title:a.instant("APPLICATION_MAIL"),groups:[{label:a.instant("APPLICATION_INTERACTION"),values:[{value:"{{interactionId}}",label:a.instant("APPLICATION_INTERACTION_ID"),description:a.instant("APPLICATION_INTERACTION_ID")},{value:"{{subject}}",label:a.instant("APPLICATION_SUBJECT"),description:a.instant("APPLICATION_SUBJECT")},{value:"{{{body}}}",label:a.instant("APPLICATION_MESSAGE"),description:a.instant("APPLICATION_MESSAGE")},{value:"{{accountName}}",label:a.instant("APPLICATION_ACCOUNT"),description:a.instant("APPLICATION_ACCOUNT")},{value:"{{from}}",label:"From",description:"From"},{value:"{{to}}",label:"To",description:"To"},{value:"{{cc}}",label:"Cc",description:"Cc"},{value:"{{agentName}}",label:a.instant("APPLICATION_AGENT_NAME"),description:a.instant("APPLICATION_AGENT_NAME")},{value:"{{agentEmail}}",label:a.instant("APPLICATION_AGENT_EMAIL"),description:a.instant("APPLICATION_AGENT_EMAIL")},{value:"{{createdAt}}",label:a.instant("APPLICATION_CREATED_AT"),description:a.instant("APPLICATION_CREATED_AT")}]}]}]}]),angular.module("xCallyShuttleApp").controller("gridDatePickerFilterCtrl",["$scope","$timeout","$uibModal","uiGridConstants",function(a,b,c,d){b(function(){a.col.colDef.name;a.openDatePicker=function(b){var d=c.open({templateUrl:"app/main/customDateFilter.modal.html",controller:"customGridDateFilterModalCtrl",size:"md",windowClass:"custom-date-filter-modal",resolve:{term:[function(){return b.term||null}],hasTime:b.hasTime||!1}});d.result.then(function(c){a.colFilter.listTerm=[],a.colFilter.term=c.date,b.hasTime&&(a.colFilter.term+=" "+c.time)})}})}]),angular.module("xCallyShuttleApp").factory("gridOptions",["Modal","xAlert","$translate","$interval","$q","usSpinnerService",function(a,b,c,d,e,f){return{gridOptions:function(d,g,h,i,j,k,l){function m(a,b){a.filter&&a.filter.term&&b&&(o[a.name]=a.filter.term),a.filters&&(a.filters.length>1?a.filters.forEach(function(b){b.term?64===b.condition?o[a.name+"_uiFrom"]=b.term:256===b.condition&&(o[a.name+"_uiTo"]=b.term):64===b.condition?delete o[a.name+"_uiFrom"]:256===b.condition&&delete o[a.name+"_uiTo"]}):a.filters.length&&a.filters[0].term?o[a.name]=a.filters[0].term:delete o[a.name])}h.id=[];var n=k?"gridOptions"+k:"gridOptions",o={offset:0,limit:10},p={offset:0,limit:10};g.draggable&&(g.rowTemplate='<div grid="grid" class="ui-grid-draggable-row" draggable="true"><div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ng-class="{ \'ui-grid-row-header-cell\': col.isRowHeader, \'custom\': true }" ui-grid-cell></div></div>',g.useExternalPagination=!1,g.enablePaginationControls=!1,g.showGridFooter=!1);var q=function(a){var b=a&&a>h[n].paginationPageSize?h[n].paginationPageSize:a,c=b?30*b+120:177,d=angular.element(document.getElementsByName(n)).length?angular.element(document.getElementsByName(n)[0]):angular.element(document.getElementsByClassName("ui-grid")[0]);d.css("height",c+"px")},r=function(a,b){return h[n].enablePaginationControls||(delete o.offset,delete o.limit),f.spin("spinner-grid"),i=a||i,d=b||d,d.get(i?_.merge(o,i):o).$promise.then(function(a){h[n].totalItems=a.count,h[n].data=a.rows,q(a.rows.length),l&&l()})["catch"](function(a){console.error(a)})["finally"](function(){f.stop("spinner-grid")})};return h.deleteItem=a.confirm["delete"](function(a){var e=i?angular.copy(i):{};return _.merge(e,{id:a}),d.remove(e).$promise.then(function(){r(),b.show(c.instant("MESSAGE_WELL_DONE")+"!","success"),h.gridApi.selection.clearSelectedRows(),h.id=[]})["catch"](function(a){b.error(a)})}),h.deleteItems=a.confirm["delete"](function(){var a=i?angular.copy(i):{};return _.merge(a,{ids:h.id}),d["delete"](a).$promise.then(function(){r(),b.show(c.instant("MESSAGE_WELL_DONE")+"!","success"),h.gridApi.selection.clearSelectedRows(),h.id=[]})["catch"](function(a){b.error(a)})}),g.columnDefs.forEach(function(a){m(a,!0),a.hasOwnProperty("displayName")||(a.displayName="APPLICATION_"+a.name.toUpperCase()),a.headerCellFilter="translate",a.hasOwnProperty("buttons")&&(a.displayName="",a.cellClass="ui-grid-vcenter",a.enableSorting=!1,a.enableFiltering=!1,a.enableColumnMenu=!1,a.cellTemplate="<div>",a.buttons.forEach(function(b){if(b.directive)a.cellTemplate+=b.directive;else{if(a.cellTemplate+="<a",a.cellTemplate+=b.hide?' data-ng-hide="'+b.hide+'" ':" ",a.cellTemplate+=b["class"]?' class="btn btn-xs '+b["class"]+'" ':" ",a.cellTemplate+=b.href?' data-ng-href="'+b.href+'" ':" ",a.cellTemplate+=b.uisref?' ui-sref="'+b.uisref+'" ':" ",a.cellTemplate+=b.onClick?' data-ng-click="'+b.onClick+'" ':" ",a.cellTemplate+=b.title?' title="'+b.title+'"':"",a.cellTemplate+=">",a.cellTemplate+=b.icon?'<i class="'+b.icon+'"></i>':"",b.name)switch(b.name){case"delete":a.cellTemplate+='<i class="icon-trash" title="'+b.name+'"></i>';break;case"profile":case"settings":case"detail":case"embedding":a.cellTemplate+='<i class="icon-settings" title="'+b.name+'"></i>';break;case"view":a.cellTemplate+='<i class="icon-doc" title="'+b.name+'"></i>';break;case"clone":a.cellTemplate+='<i class="icon-docs" title="'+b.name+'"></i>';break;case"permits":a.cellTemplate+='<i class="icon-key"></i>';break;case"copy":a.cellTemplate+='<i class="fa fa-files-o" title="'+b.name+'"></i>';break;case"select":a.cellTemplate+='<i class="icon-check" title="'+b.name+'"></i>';break;case"preview":a.cellTemplate+='<i class="icon-magnifier" title="'+b.name+'"></i>';break;case"contacts":a.cellTemplate+='<i class="fa fa-users" title="'+b.name+'"></i>';break;case"download":case"export":a.cellTemplate+='<i class="fa fa-download" title="'+b.name+'"></i>';break;case"agents":a.cellTemplate+='<i class="icon-people" title="'+b.name+'"></i>';break;case"run":a.cellTemplate+='<i class="fa fa-cogs" title="'+b.name+'"></i>';break;case"mailRoom":a.cellTemplate+='<i class="fa fa-envelope"></i>';break;case"chatRoom":a.cellTemplate+='<i class="fa fa-users"></i>';break;case"faxRoom":a.cellTemplate+='<i class="fa fa-fax"></i>';break;case"smsRoom":a.cellTemplate+='<i class="glyphicon glyphicon-comment"></i>';break;case"check":a.cellTemplate+='<i class="fa fa-check" title="'+b.name+'"></i>';break;case"queues":a.cellTemplate+='<i class="icon-docs" title="'+b.name+'"></i>';break;default:a.cellTemplate+="{{'APPLICATION_"+b.name.toUpperCase()+"' | translate}}"}else a.cellTemplate+=b.displayName?"{{'"+b.displayName+"' | translate}}":"";a.cellTemplate+="</a> "}}),a.cellTemplate+="<div>",delete a.buttons)}),_.merge({enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableRowSelection:!0,enableSelectAll:!0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,multiSelect:!0,getPage:r,gridMenuTitleFilter:function(a){var b=e.defer();return b.resolve(c.instant(a)),b.promise},exporterAllDataFn:function(){return p.offset=o.offset,p.limit=o.limit,o={offset:0,limit:null},r().then(function(){o.offset=p.offset,o.limit=p.limit,r()})},exporterFieldCallback:function(a,b,c,d){if("applications"===c.field&&b.entity.Applications){var e="";return _.forEach(b.entity.Applications,function(a){e+=a.app+"("+a.appdata.join(",")+")"}),e}return d},exporterHeaderFilter:c.instant,onRegisterApi:function(a){h.gridApi=a,h.gridApi.selection&&(h.gridApi.selection.on.rowSelectionChanged(h,function(a){a.isSelected?h.id.push(h.gridApi.grid.options.primaryKey?a.entity[h.gridApi.grid.options.primaryKey]:a.entity.id):_.pull(h.id,h.gridApi.grid.options.primaryKey?a.entity[h.gridApi.grid.options.primaryKey]:a.entity.id)}),h.gridApi.selection.on.rowSelectionChangedBatch(h,function(a){a[0].isSelected?h.id=_.union(h.id,_.map(a,h.gridApi.grid.options.primaryKey?"entity."+h.gridApi.grid.options.primaryKey:"entity.id")):_.map(a,h.gridApi.grid.options.primaryKey?"entity."+h.gridApi.grid.options.primaryKey:"entity.id").forEach(function(a){_.pull(h.id,a)})})),h.gridApi.core.on.sortChanged(h,function(a,b){0===b.length?o.order=null:o.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),r()});for(var e=0;e<h.gridOptions.columnDefs.length;e++)if(h.gridOptions.columnDefs[e].hasOwnProperty("sort")){o.order=h.gridOptions.columnDefs[e].name+" "+h.gridOptions.columnDefs[e].sort.direction.toUpperCase();break}h.gridApi.pagination.on.paginationChanged(h,function(a,b){o.offset=(a-1)*b,o.limit=b,r()}),h.gridApi.core.on.filterChanged(h,function(){var a=this.grid;a.columns.forEach(function(a){m(a)}),r()}),h.gridApi.draggableRows&&h.gridApi.draggableRows.on.rowDropped(h,function(a){a.fromIndex!==a.toIndex&&d.update(i,h[n].data).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){b.error(a)})["finally"](function(){r()})}),j||r()}},g)}}}]),angular.module("xCallyShuttleApp").controller("gridTagsFilterCtrl",["$scope","$timeout","$uibModal","uiGridConstants",function(a,b,c,d){b(function(){a.col.colDef.name;a.openTags=function(b){var d=c.open({templateUrl:"app/main/customTagsFilter.modal.html",controller:"customGridTagsModalCtrl",size:"md",resolve:{term:[function(){if(b.term){var a=b.term.split(";");return a.pop(),a}return[]}]}});d.result.then(function(b){a.colFilter.listTerm=[],b.length&&(a.colFilter.term=b.join(";")+";")})}})}]),angular.module("xCallyShuttleApp").controller("MainCtrl",["$scope","$rootScope","$translate","$timeout","socket","Auth","xAlert","$uibModal","$log","$state","Contact","$window","$location","localStorageService","YourDashboard",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){function p(d){b.activeTour={
+main:!1},b.tourConfig={main:[{type:"function",fn:function(){b.tempTourPath=m.path()}},{type:"title",heading:c.instant("TOUR_MAIN_WELCOME"),text:'<div class="row"><div id="title-text" class="col-md-12"><span class="main-text">'+c.instant("TOUR_MAIN_DISCOVER_MOTION")+"</span><br/></div></div>",curtainClass:"myCurtainClass"}]},(f.isAdmin()||b.userModules[1])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/dashboard/voice"},{type:"title",heading:c.instant("TOUR_MAIN_DASHBOARD"),text:c.instant("TOUR_MAIN_DASHBOARD_MESSAGE"),curtainClass:"myCurtainClass"}])),(f.isAdmin()||b.userModules[2])&&d&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/tools/yourdashboards/show/"+d.id},{type:"title",heading:c.instant("TOUR_MAIN_YOURDASHBOARD"),text:c.instant("TOUR_MAIN_YOURDASHBOARD_MESSAGE"),curtainClass:"myCurtainClass"}]),delete a.tempDashboards),(f.isAdmin()||b.userModules[4])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/staff/agents/list"},{type:"title",heading:c.instant("TOUR_MAIN_AGENTS"),text:c.instant("TOUR_MAIN_AGENTS_MESSAGE"),curtainClass:"myCurtainClass"}])),f.isAdmin()&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/channels/voice/queues/list"},{type:"title",heading:c.instant("TOUR_MAIN_VOICE_QUEUE"),text:c.instant("TOUR_MAIN_VOICE_QUEUE_ADD_MESSAGE"),curtainClass:"myCurtainClass"}])),b.license.chat&&(f.isAdmin()||b.userModules[30])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/channels/chat/queues/list"},{type:"title",heading:c.instant("TOUR_MAIN_CHAT_QUEUE"),text:c.instant("TOUR_MAIN_CHAT_QUEUE_MESSAGE"),curtainClass:"myCurtainClass"}])),b.license.openchannel&&(f.isAdmin()||b.userModules[46])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/channels/openchannel/accounts/list"},{type:"title",heading:c.instant("TOUR_MAIN_OPENCHANNEL"),text:c.instant("TOUR_MAIN_OPENCHANNEL_MESSAGE"),curtainClass:"myCurtainClass"}])),(f.isAdmin()||b.userModules[14])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/square/projects/list"},{type:"title",heading:c.instant("TOUR_MAIN_SQUARE_PROJECT"),text:c.instant("TOUR_MAIN_SQUARE_PROJECT_MESSAGE"),curtainClass:"myCurtainClass"}])),(f.isAdmin()||b.userModules[52])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/tools/trunks/list"},{type:"title",heading:c.instant("TOUR_MAIN_TRUNKS"),text:c.instant("TOUR_MAIN_TRUNKS_MESSAGE"),curtainClass:"myCurtainClass"}])),(f.isAdmin()||b.userModules[52])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/tools/triggers/list"},{type:"title",heading:c.instant("TOUR_MAIN_TRIGGERS"),text:c.instant("TOUR_MAIN__MESSAGE"),curtainClass:"myCurtainClass"}])),b.license.jscripty&&(f.isAdmin()||b.userModules[50])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/jscripty/projects/list"},{type:"title",heading:c.instant("TOUR_MAIN_JSCRIPTY"),text:c.instant("TOUR_MAIN_JSCRIPTY_MESSAGE"),curtainClass:"myCurtainClass"}])),(f.isAdmin()||b.userModules[17])&&(b.tourConfig.main=b.tourConfig.main.concat([{type:"location_change",path:"/analytics/reports/list"},{type:"title",heading:c.instant("TOUR_MAIN_REPORTS"),text:c.instant("TOUR_MAIN_REPORTS_MESSAGE"),curtainClass:"myCurtainClass"}])),b.tourConfig.main=b.tourConfig.main.concat([{type:"title",heading:c.instant("TOUR_MAIN_END"),text:c.instant("TOUR_MAIN_END_MESSAGE"),curtainClass:"myCurtainClass"}]),n.get("skipTour")||(b.activeTour.main=!0)}a.awesomeThings=[],b.workspaces=[],a.Auth=f,b.userModules={},a.keepMeLoggedModalInstance=void 0,b.initTours=function(){return f.isAdmin()||b.userModules[2]?o.get().$promise.then(function(a){var b={};b[f.getRole()]=!0,p(_.find(a.rows,b))})["catch"](function(a){console.log(a)}):void p()},f.getCurrentUser().$promise.then(function(a){a.Modules.forEach(function(a){b.userModules[a.id]=!0}),b.initTours()})["catch"](function(a){g.error(a)}),b.onTourFinish=function(){n.set("skipTour",!0),b.tempTourPath&&m.path(b.tempTourPath)},b.onTourSkip=function(){n.set("skipTour",!0)},a.select=function(a){switch(a.type){case"chatRoom":case"mailRoom":case"faxRoom":a.unread=0}},e.socket.on("agent:save",function(b){!b.online&&f.isAgent()&&(a.keepMeLoggedModalInstance||(a.keepMeLoggedModalInstance=h.open({animation:!0,backdrop:"static",keyboard:!1,templateUrl:"app/main/keepMeLogged.modal.html",controller:["$scope","$uibModalInstance",function(a,b){a.close=function(){b.close(!0)},a.cancel=function(){b.close(!1)}}]}),a.keepMeLoggedModalInstance.result.then(function(a){a?l.location.reload():(f.logout(),m.path("/login"))})))}),a.openTdTab=function(a){b.workspaces.push({type:"tdDisposal",name:"Motion Dialer Disposition","class":"icon-control-forward",active:!0,spooler:a})},a.deselect=function(){},a.isAdmin=f.isAdmin,a.isLoggedIn=f.isLoggedIn,a.getCurrentUser=f.getCurrentUser,a.CurrentUser=f.getCurrentUser(),e.socket.on("user_has_voice_queue_permit:change",function(){a.CurrentUser=f.getCurrentUser()}),e.socket.on("user_has_chat_queue_permit:change",function(){a.CurrentUser=f.getCurrentUser()}),e.socket.on("user_has_mail_queue_permit:change",function(){a.CurrentUser=f.getCurrentUser()}),e.socket.on("user_has_fax_queue_permit:change",function(){a.CurrentUser=f.getCurrentUser()}),e.socket.on("user_has_sms_queue_permit:change",function(){a.CurrentUser=f.getCurrentUser()}),a.mainTab={active:!0},a.closeJscriptyTab=function(a){if(b.workspaces[a].edited){var c=h.open({animation:!0,templateUrl:"app/main/closeEditedTab.modal.jscripty.html",controller:"CloseEditedTabModalJscriptyCtrl",resolve:{project:b.workspaces[a]}});c.result.then(function(){b.workspaces.splice(a,1)})}else b.workspaces.splice(a,1)},b.closeTab=function(a){var c;b.workspaces[a].edited?"jscripty"===b.workspaces[a].type?b.workspaces[a].end():(c=h.open({animation:!0,templateUrl:"app/main/closeEditedTab.modal.html",controller:"CloseEditedTabModalCtrl"}),c.result.then(function(){b.workspaces.splice(a,1)},function(){i.info("Modal dismissed at: "+new Date)})):b.workspaces.splice(a,1)},a.createContact=function(d,e){return e.CompanyId||delete e.CompanyId,k.save(e).$promise.then(function(e){b.workspaces.splice(d,1);var f=e.firstName;e.lastName&&(f+=" "+e.lastName),a.openContactTab({firstName:e.firstName,lastName:e.lastName,id:e.id}),g.show(c.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){g.error(a)})};var q=function(b){var c=h.open({animation:!0,templateUrl:"app/main/chooseContact.modal.html",controller:"ChooseContactModalCtrl",resolve:{data:function(){return b}}});c.result.then(function(c){c?a.openContactTab(c,b):a.newContact(b)},function(){i.info("Modal dismissed at: "+new Date)})};a.updateContact=function(a,d){var e=angular.copy(d);return e.CompanyId||(e.CompanyId=null),k.update({id:e.id},e).$promise.then(function(){b.workspaces[a].edited=!1,g.show(c.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){g.error(a)})},e.socket.on("report_integration:contactmanager",function(a){q(a)}),e.socket.on("report_integration:jscripty",function(b){a.openJscriptyTab({name:"Jscripty",id:b.projectId,calleridnum:b.calleridnum,calleridname:b.calleridname,queue:b.queue,membername:b.membername})}),e.socket.on("report_integration:salesforce",function(a){l.open(a.url,"_blank")}),e.socket.on("report_integration:tdDisposal",function(b){a.openTdTab(b)}),b.openContactTab=function(a,c){var d=_.find(b.workspaces,{contactID:a.id});if(d)d.active=!0;else{var e=a.firstName;a.lastName&&(e+=" "+a.lastName),b.workspaces.push({name:e,type:"contact",contactID:a.id,"class":"icon-user",active:!0,data:c||null})}},a.openJscriptyTab=function(a){b.workspaces.push({name:a.name,type:"jscripty",active:!0,data:a})},a.newContact=function(a){b.workspaces.push({name:"New Contact",type:"newContact","class":"icon-user",active:!0,data:a||null})},a.$on("$viewContentLoaded",function(){Metronic.init()}),b.language=c.use(),a.changeLanguage=function(a){return c.use(a).then(function(a){b.language=a,-1!==["main.jscripty.projects.view","main.square.projects.view"].indexOf(j.current.name)&&l.location.reload()})["catch"](function(a){console.error(a)})},a.$on("$destroy",function(){console.log("main $destroy"),e.unsyncUpdates("user_has_voice_queue_permit"),e.unsyncUpdates("user_has_chat_queue_permit"),e.unsyncUpdates("user_has_mail_queue_permit"),e.unsyncUpdates("user_has_fax_queue_permit"),e.unsyncUpdates("user_has_sms_queue_permit")})}]),angular.module("xCallyShuttleApp").directive("ngSpinnerBar",["$rootScope",function(a){return{link:function(b,c){c.addClass("hide"),a.$on("$stateChangeStart",function(){"spinner-page"===c[0].id&&c.removeClass("hide")}),a.$on("$stateChangeSuccess",function(){"spinner-page"===c[0].id&&(c.addClass("hide"),$("body").removeClass("page-on-load"),Layout.setSidebarMenuActiveLink("match"),setTimeout(function(){Metronic.scrollTop()},1e3))}),a.$on("$spinnerStart",function(){"spinner-request"===c[0].id&&c.removeClass("hide")}),a.$on("$spinnerStop",function(){"spinner-request"===c[0].id&&c.addClass("hide")}),a.$on("$stateNotFound",function(){"spinner-page"===c[0].id&&c.addClass("hide")}),a.$on("$stateChangeError",function(){"spinner-page"===c[0].id&&c.addClass("hide")})}}}]).directive("a",function(){return{restrict:"E",link:function(a,b,c){(c.ngClick||""===c.href||"#"===c.href)&&b.on("click",function(a){a.preventDefault()})}}}).directive("nxEqual",function(){return{require:"ngModel",link:function(a,b,c,d){return c.nxEqual?(a.$watch(c.nxEqual,function(a){d.$setValidity("nxEqual",a===d.$viewValue)}),void d.$parsers.push(function(b){var e=b===a.$eval(c.nxEqual);return d.$setValidity("nxEqual",e),e?b:void 0})):void console.error("nxEqual expects a model as an argument!")}}}).directive("ngEnter",function(){return function(a,b,c){b.bind("keydown keypress",function(b){13===b.which&&(a.$apply(function(){a.$eval(c.ngEnter)}),b.preventDefault())})}}).directive("dropdownMenuHover",function(){return{link:function(a,b){b.dropdownHover()}}}).directive("uiSelectRequired",function(){return{require:"ngModel",link:function(a,b,c,d){d.$validators.uiSelectRequired=function(a){return a&&a.length}}}}).directive("rpattern",function(){return{restrict:"A",require:"ngModel",link:function(a,b,c,d){function e(a,b){return null==b||""===b||!h||a.test(b)?(d.$setValidity("pattern",!0),b):void d.$setValidity("pattern",!1)}var f,g=c.rpattern,h=!0;g&&(g.match(/^\/(.*)\/$/)?(g=new RegExp(g.substr(1,g.length-2)),f=function(a){return e(g,a)}):f=function(b){var c=a.$eval(g);if(!c||!c.test)throw new Error("Expected "+g+" to be a RegExp but was "+c);return e(c,b)}),d.$formatters.push(f),d.$parsers.push(f),c.$observe("required",function(a){h=a,f(d.$viewValue)})}}}).directive("newContact",["$compile","xAlert","socket","$translate","$timeout","List","Tag","Company","ReportCall","$uibModal","$rootScope","Auth",function(a,b,c,d,e,f,g,h,i,j,k,l){return{restrict:"E",scope:{workspace:"=",index:"=",submit:"&onSubmit"},templateUrl:"app/main/template/template.contactTab.html",compile:function(a,m){return function(a,m,n){function o(){a.$watch("contact",function(b,c){angular.equals(b,c)||(a.workspace.edited=!0)},!0)}a.license=k.license,a.Auth=l,a.forms={general:{}},a.firstLoad=!0,a.detail={tab:"main"},a.contact={CompanyId:"",disposed:!1},a.submitButtonLabel=d.instant("APPLICATION_CONFIRM"),a.getAgent=function(){return l.getCurrentUser().$promise.then(function(b){a.agent=b})["catch"](function(a){b.error(a)})},a.callPhoneBar=function(c,e){var f;switch(e){case"call":f="http://127.0.0.1:"+a.agent.phoneBarRemoteControlPort+"/api/originate/"+c;break;case"transfer":f="http://127.0.0.1:"+a.agent.phoneBarRemoteControlPort+"/api/transfer?number="+c;break;default:f="http://127.0.0.1:"+a.agent.phoneBarRemoteControlPort+"/api/originate/"+c}return $http.get(f).success(function(){b.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){b.error(a)})},a.dispose=function(){return j.open({animation:!0,templateUrl:"app/main/cm.disposition.modal.html",controller:"ContactManagerSetDisposition"}).result.then(function(c){return i.update({id:a.workspace.data.uniqueid},c).$promise.then(function(){a.contact.disposed=!0,b.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.error(a)})})},a.init=function(){a.workspace.data&&(a.contact.firstName=a.workspace.data.calleridname?a.workspace.data.calleridname:a.workspace.data.messageId?a.workspace.data.messageId:a.workspace.data.uniqueid?a.workspace.data.uniqueid:"",a.workspace.data.calleridnum&&(a.contact.phone=a.workspace.data.calleridnum),a.workspace.data.from&&(a.contact.email=a.workspace.data.from)),a.getTags(),a.getCompanies(),a.getLists(),a.getAgent()},a.getLists=function(){return f.get().$promise.then(function(b){a.lists=b.rows,c.syncUpdates("list",a.lists),a.contact.ListId=a.lists[0]?a.lists[0].id:null,a.getCustomFields()})["catch"](function(a){b.error(a)})},a.getCustomFields=function(){return f.get({listId:a.contact.ListId,controller:"customfields"}).$promise.then(function(b){a.customFields=b.rows,a.customFields.forEach(function(a){a.values=JSON.parse(a.values)}),c.socket.on("custom_field:remove",function(b){_.remove(a.customFields,function(a){return b.id==a.id})}),c.socket.on("custom_field:save",function(b){if(b.ListId===a.contact.ListId){var c=_.find(a.customFields,{id:b.id});c||("string"==typeof b.values&&(b.values=JSON.parse(b.values)),a.customFields.push(b))}}),!a.firstLoad||a.workspace.data?(a.workspace.edited=!0,a.firstLoad=!1):(a.firstLoad=!1,o())})["catch"](function(a){console.error(a),b.error(a)})},a.getTags=function(){return g.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a),b.error(a)})},a.getCompanies=function(){return h.get().$promise.then(function(b){a.companies=b.rows,a.companies.unshift({id:"",name:"-- None --"}),c.syncUpdates("company",a.companies)})["catch"](function(a){console.error(a),b.error(a)})},e(function(){a.init()})}}}}]).directive("contact",["$compile","xAlert","socket","$timeout","List","Tag","Company","Contact","$translate","gridOptions","$uibModal","ReportCall","$rootScope","usSpinnerService","uiGridConstants","$log","Auth","$http",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){return{restrict:"E",scope:{workspace:"=",index:"=",submit:"&onSubmit"},templateUrl:"app/main/template/template.contactTab.html",compile:function(a,j){return function(a,j,s){function t(b){var c=[],d={};_.forEach(a.columns[a.log[b].show][a.log[b].detail].indexes,function(e,f){d={name:e,displayName:a.columns[a.log[b].show][a.log[b].detail].header[f],headerCellFilter:"translate",enableSorting:!1,enableColumnMenu:!1},"createdAt"===e&&(d.cellTemplate="<div class=\"centered-uigrid-td\">{{row.entity.createdAt | date:'dd/MM/yyyy HH:mm:ss'}}</div>",d.filterHeaderTemplate='<div class="ui-grid-filter-container row"><div ng-repeat="colFilter in col.filters" class="col-md-6 col-md-offset-0 col-sm-5 col-sm-offset-0 col-xs-5 col-xs-offset-0"><div custom-grid-date-filter-header></div></div></div>',d.filters=[{name:"From",condition:o.filter.GREATER_THAN_OR_EQUAL},{name:"To",condition:o.filter.LESS_THAN_OR_EQUAL}]),c.push(d)}),a.columns[a.log[b].show][a.log[b].detail].actions&&c.push(a.columns[a.log[b].show][a.log[b].detail].actions),c.forEach(function(a){u(a,b,!0),a.hasOwnProperty("displayName")||(a.displayName="APPLICATION_"+a.name.toUpperCase()),a.headerCellFilter="translate",a.hasOwnProperty("buttons")&&(a.displayName="",a.cellClass="ui-grid-vcenter",a.enableSorting=!1,a.enableFiltering=!1,a.enableColumnMenu=!1,a.cellTemplate="<div>",a.buttons.forEach(function(b){if(b.directive)a.cellTemplate+=b.directive;else{if(a.cellTemplate+="<a",a.cellTemplate+=b.hide?' data-ng-hide="'+b.hide+'" ':" ",a.cellTemplate+=b["class"]?' class="btn btn-xs '+b["class"]+'" ':" ",a.cellTemplate+=b.href?' data-ng-href="'+b.href+'" ':" ",a.cellTemplate+=b.uisref?' ui-sref="'+b.uisref+'" ':" ",a.cellTemplate+=b.onClick?' data-ng-click="'+b.onClick+'" ':" ",a.cellTemplate+=b.title?' title="'+b.title+'"':"",a.cellTemplate+=">",a.cellTemplate+=b.icon?'<i class="'+b.icon+'"></i>':"",b.name)switch(b.name){case"delete":a.cellTemplate+='<i class="fa fa-trash"></i>';break;case"profile":case"settings":case"detail":case"embedding":a.cellTemplate+='<i class="icon-settings"></i>';break;case"agents":a.cellTemplate+='<i class="icon-people"></i>';break;case"run":a.cellTemplate+='<i class="fa fa-cogs"></i>';break;case"mailRoom":a.cellTemplate+='<i class="fa fa-envelope"></i>';break;case"chatRoom":a.cellTemplate+='<i class="fa fa-users"></i>';break;case"faxRoom":a.cellTemplate+='<i class="fa fa-fax"></i>';break;case"smsRoom":a.cellTemplate+='<i class="glyphicon glyphicon-comment"></i>';break;default:a.cellTemplate+="{{'APPLICATION_"+b.name.toUpperCase()+"' | translate}}"}else a.cellTemplate+=b.displayName?"{{'"+b.displayName+"' | translate}}":"";a.cellTemplate+="</a> "}}),a.cellTemplate+="<div>",delete a.buttons)});var e={enablePaginationControls:!0,exporterCsvFilename:b+".csv",columnDefs:c,enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:10,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,showTreeExpandNoChildren:!0,data:[],gridMenuTitleFilter:function(a){var b=$q.defer();return b.resolve(i.instant(a)),b.promise},onRegisterApi:function(c){a.gridApi=c,a.gridApi.grid.registerDataChangeCallback(function(){}),a.gridApi.core.on.sortChanged(a,function(a,c){0===c.length?v.order=null:v.order=c[0].name+" "+c[0].sort.direction.toUpperCase(),w(b)}),a.gridApi.pagination.on.paginationChanged(a,function(a,c){v.offset=(a-1)*c,v.limit=c,w(b)}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){u(a,b)}),w(b)})}};w(b,e)}function u(a,b,c){a.filter&&a.filter.term&&c&&(v[b][a.name]=a.filter.term),a.filters&&(a.filters.length>1?a.filters.forEach(function(c){c.term?64===c.condition?v[b][a.name+"_uiFrom"]=c.term:256===c.condition&&(v[b][a.name+"_uiTo"]=c.term):64===c.condition?delete v[b][a.name+"_uiFrom"]:256===c.condition&&delete v[b][a.name+"_uiTo"]}):a.filters.length&&a.filters[0].term?v[b][a.name]=a.filters[0].term:delete v[b][a.name])}a.moment=moment,a.license=m.license,a.forms={general:{}},a.detail={tab:"main"},a.log={daily:{show:"phone",type:"inbound",detail:"general"},history:{show:"phone",type:"inbound",detail:"general"}},a.columns={phone:{general:{header:["APPLICATION_SOURCE","APPLICATION_DESTINATION","APPLICATION_DISPOSITION","APPLICATION_DATE"],indexes:["source","destination","disposition","createdAt"]},queue:{header:["APPLICATION_CALLERID","APPLICATION_QUEUE","APPLICATION_DATE"],indexes:["calleridnum","queue","createdAt"]}},email:{general:{header:["APPLICATION_FROM","APPLICATION_TO","APPLICATION_DISPOSITION","APPLICATION_DATE"],indexes:["from","account","disposition","createdAt"],actions:{name:"action",displayName:"",width:40,buttons:[{"class":"green",name:"mailRoom",onClick:"grid.appScope.openRoom(row.entity.id, 'mailRoom')"}]}}},chat:{general:{header:["APPLICATION_WEBSITE","APPLICATION_VISITOR","APPLICATION_DISPOSITION","APPLICATION_DATE"],indexes:["website","contact","disposition","createdAt"],actions:{name:"action",displayName:"",width:40,buttons:[{"class":"green",name:"chatRoom",onClick:"grid.appScope.openRoom(row.entity.id, 'chatRoom')"}]}}},fax:{general:{header:["APPLICATION_FROM","APPLICATION_TO","APPLICATION_DISPOSITION","APPLICATION_DATE"],indexes:["contact","account","disposition","createdAt"],actions:{name:"action",displayName:"",width:40,buttons:[{"class":"green",name:"faxRoom",onClick:"grid.appScope.openRoom(row.entity.id, 'faxRoom')"}]}}},sms:{general:{header:["APPLICATION_ACCOUNT","APPLICATION_FROM","APPLICATION_DISPOSITION","APPLICATION_DATE"],indexes:["account","contact","disposition","createdAt"],actions:{name:"action",displayName:"",width:40,buttons:[{"class":"green",name:"smsRoom",onClick:"grid.appScope.openRoom(row.entity.id, 'smsRoom')"}]}}}},a.Auth=q,a.getAgent=function(){return q.getCurrentUser().$promise.then(function(b){a.agent=b})["catch"](function(a){b.error(a)})},a.callPhoneBar=function(c,d){var e;switch(d){case"call":e="http://127.0.0.1:"+a.agent.phoneBarRemoteControlPort+"/api/originate/"+c;break;case"transfer":e="http://127.0.0.1:"+a.agent.phoneBarRemoteControlPort+"/api/transfer?number="+c;break;default:e="http://127.0.0.1:"+a.agent.phoneBarRemoteControlPort+"/api/originate/"+c}return r.get(e).success(function(){b.show(i.instant("MESSAGE_WELL_DONE"),"success")}).error(function(a){b.error(a)})},a.copy=function(a){var c=k.open({animation:!0,size:"small",templateUrl:"app/contactmanager/contact/list/copy.modal.html",controller:"ContactManagerListCopyModalCtrl"});c.result.then(function(c){return h.save({id:a,controller:"copy"},c).$promise.then(function(a){m.openContactTab({firstName:a.firstName,lastName:a.lastName,id:a.id})})["catch"](function(a){b.error(a)})},function(){p.info("Modal dismissed at: "+new Date)})},a.merge=function(c){var d=k.open({animation:!0,size:"lg",templateUrl:"app/main/mergeContact.choose.modal.html",controller:"ContactManagerMergeContactChoose",resolve:{listId:c.ListId}});d.result.then(function(d){var e=k.open({animation:!0,size:"lg",templateUrl:"app/main/mergeContact.merge.modal.html",controller:"ContactManagerMergeContactMerge",resolve:{contactId:d,mergeContact:c}});e.result.then(function(e){return e.oldContact=c.id,h.save({id:d,controller:"merge"},e).$promise.then(function(b){m.workspaces.splice(a.index,1),_.remove(m.workspaces,{contactID:b.id}),m.openContactTab({firstName:b.firstName,lastName:b.lastName,id:b.id})})["catch"](function(a){b.error(a)})},function(){p.info("Modal dismissed at: "+new Date)})},function(){p.info("Modal dismissed at: "+new Date)})},a.dispose=function(){return k.open({animation:!0,templateUrl:"app/main/cm.disposition.modal.html",controller:"ContactManagerSetDisposition"}).result.then(function(c){return l.update({id:a.workspace.data.uniqueid},c).$promise.then(function(){a.contact.disposed=!0,b.show(i.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.error(a)})})},a.companyInfo=function(b){k.open({animation:!0,size:"lg",templateUrl:"app/main/company.info.modal.html",controller:["$scope","$uibModalInstance","company",function(a,b,c){a.company=c,a.close=function(){b.dismiss("cancel")}}],resolve:{company:_.find(a.companies,{id:b})}})},a.updateLog=function(b,c,d,e){c&&(a.log[b].show=c),d&&(a.log[b].detail=d),e&&(a.log[b].type=e),t(b)},a.openRoom=function(a,b,c){var d=_.find(m.workspaces,{id:a,type:b});if(d)d.active=!0;else{var e;switch(b){case"mailRoom":e="icon-envelope";break;case"chatRoom":e="fa fa-users";break;case"faxRoom":e="fa fa-fax";break;case"smsRoom":e="glyphicon glyphicon-comment"}m.workspaces.push({id:a,type:b,"class":e,active:!0,data:c})}};var v={daily:{offset:0,limit:10},history:{offset:0,limit:10}},w=function(b,c){return n.spin("spinner-grid"),h.get(_.merge(_.merge({id:a.workspace.contactID,controller:"log",logType:b,order:"createdAt DESC"},a.log[b]),v[b])).$promise.then(function(d){c&&(a["gridOptions"+b]=c),a["gridOptions"+b].totalItems=d.count,a["gridOptions"+b].data=d.rows,x("gridOptions"+b,d.rows.length)})["catch"](function(a){console.error(a)})["finally"](function(){n.stop("spinner-grid")})},x=function(a,b){var c=b?30*b+120:177;angular.element(document.getElementsByName(a)[0]).css("height",c+"px")};a.getContact=function(){return h.get({id:a.workspace.contactID}).$promise.then(function(b){a.contact=b,a.contact.CompanyId||(a.contact.CompanyId=""),a.getCustomFields(b.ListId),a.updateLog("daily"),a.updateLog("history")})["catch"](function(a){console.error(a),b.error(a)})},a.getTags=function(){return f.get().$promise.then(function(b){a.tags=_.map(b.rows,"name")})["catch"](function(a){console.error(a),b.error(a)})},a.getCompanies=function(){return g.get().$promise.then(function(b){a.companies=b.rows,a.companies.unshift({id:"",name:"-- None --"}),c.syncUpdates("company",a.companies)})["catch"](function(a){console.error(a),b.error(a)})},a.getCustomFields=function(d){return a.customFields=[],e.get({listId:d,controller:"customfields"}).$promise.then(function(b){b.rows.forEach(function(b){try{"select"===b.type&&(b.values=JSON.parse(b.values)),a.customFields.push(b)}catch(c){console.log("Cf not valid:",b.alias)}}),c.socket.on("custom_field:remove",function(b){_.remove(a.customFields,function(a){return b.id==a.id})}),c.socket.on("custom_field:save",function(b){if(b.ListId===d){var c=_.find(a.customFields,{id:b.id});c||("string"==typeof b.values&&(b.values=JSON.parse(b.values)),a.customFields.push(b))}})})["catch"](function(a){console.error(a),b.error(a)})},d(function(){a.getTags(),a.getCompanies(),a.getContact(),a.getAgent()})}}}}]).directive("jscripty",["$compile","xAlert","$http","socket","JscriptyProject",function(a,b,c,d,e){return{restrict:"E",scope:{workspace:"=",index:"=",submit:"&onSubmit"},templateUrl:"app/main/template/template.jscriptyTab.html",compile:function(a,d){return function(a,d,f){a.count=0,a.questions=[];var g,h=a.workspace.data.id;c.get("/api/jscripty/projects/"+h+"/download").success(function(b){b?c.post("/api/jscripty/projects/"+h+"/sessions",{projectId:h,status:"started",queue:a.workspace.data.queue,calleridnum:a.workspace.data.calleridnum,callername:a.workspace.data.callername,membername:a.workspace.data.membername}).success(function(c){g=c.session_id,a.workspace.edited=!0,a.workspace.sessionId=g,a.workspace.projectId=h;var d=mxUtils.parseXml(b),e=new mxCodec(d);a.decObj=e.decode(d.documentElement);var f=_.find(a.decObj.cells,function(a){return a.vertex&&"start"==a.value.nodeName});if("OFF"==f.getAttribute("state")){var j=_.find(f.edges,function(a){return a.source.id==f.id}).target;a.questions[a.count]=a.currentQuestion=i(j)}else a.questions[a.count]=a.currentQuestion=f;a.saveQuestions()}):(console.log("No project published!"),alert("No project published!"),a.submit({index:a.index}))}),a.next=function(b,c){switch(a.currentQuestion.answer&&a.currentQuestion.answer!=c&&(a.questions=_.take(a.questions,a.count+1)),a.currentQuestion.answer=c,b.value.nodeName){case"question":b=i(b)}a.questions[a.count]=a.currentQuestion,a.currentQuestion=b,a.count++,a.questions[a.count]=b,a.saveQuestions()};var i=function(a){var b=[];return a.options=[],_.forEach(a.edges,function(c,d){if(c.source.id==a.id&&c.value){var e=String(c.value).split(",");e.length>1?(_.forEach(e,function(b,d){var e=Object.create(c);e.setValue(b),a.edges.push(e),a.options.push(b)}),b.push(c)):a.options.push(e[0])}}),_.forEach(b,function(b){_.remove(a.edges,function(a){return a.value==b.value&&a.id==b.id})}),a};a.end=function(){a.saveQuestions(),a.workspace.lastQuestionId=a.questions[a.questions.length-1].id,"end"==a.questions[a.questions.length-1].value.nodeName&&(a.workspace.edited=!1,e.update({id:h,controller:"sessions",action:g},{status:"completed",completedAt:Date(),last_question_id:a.questions[a.questions.length-1].id}).$promise.then(function(a){b.show("Project Ended","success")})),a.submit({index:a.index})},a.workspace.end=a.end,a.back=function(){a.count--,a.currentQuestion=a.questions[a.count]},a.setCurrentQuestion=function(b){a.count=b,a.currentQuestion=a.questions[a.count]},a.saveQuestions=function(){for(var c=[],d=[],f=0;f<a.questions.length;f++){if(a.questions[f].children)for(var i=a.questions[f].children,j=0;j<i.length;j++)d[j]={input_id:i[j].id,input_type:i[j].getAttribute("type"),input_label:i[j].getAttribute("label"),input_value:"checkbox"!=i[j].getAttribute("type")||i[j].answer?i[j].answer:!1};c[f]={sessionId:g,projectId:h,question_id:a.questions[f].id,question_type:a.questions[f].value.nodeName,question_label:a.questions[f].getAttribute("label"),question_text:a.questions[f].getAttribute("question")||a.questions[f].getAttribute("text"),question_other_label:a.questions[f].getAttribute("other"),question_other_answer:a.questions[f].otheranswer,question_answer:a.questions[f].answer,question_options:a.questions[f].options?JSON.stringify({options:a.questions[f].options}):null,index:f,ReportJscriptyInputs:d},d=[]}e.save({id:h,controller:"sessions",action:g,action2:"questions"},c).$promise.then(function(a){})["catch"](function(a){b.error(a)})}}}}}]).directive("reportBuilder",["$compile",function(a){return{restrict:"E",scope:{group:"=",fields:"=",forms:"=",firstCall:"="},templateUrl:"app/main/template/template.reportBuilderView.html",compile:function(b,c){var d,e;return d=b.contents().remove(),function(b,c,f){b.operators=[{name:"AND"},{name:"OR"}],b.conditions=[{name:"="},{name:"!="},{name:"<"},{name:"<="},{name:">"},{name:">="},{name:"LIKE"},{name:"NOT LIKE"},{name:"IS NULL"},{name:"IS NOT NULL"},{name:"IS EMPTY"},{name:"IS NOT EMPTY"}],b.inputIsRequired=function(a){if(a.condition)switch(a.condition){case"IS NULL":case"IS NOT NULL":case"IS EMPTY":case"IS NOT EMPTY":a.required=!1;break;default:a.required=!0}},b.addCondition=function(){b.group.rules.push({condition:"=",field:"",value:""})},b.removeCondition=function(a){b.group.rules.splice(a,1)},b.addGroup=function(){b.group.rules.push({group:{operator:"AND",rules:[{condition:"=",field:"",value:""}]}})},b.randomName=function(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")},b.removeGroup=function(){b.$parent.group&&b.$parent.group.rules.splice(b.$parent.$index,1)},e||(e=a(d)),c.append(e(b,function(a){return a}))}}}}]).directive("dynamicName",["$compile",function(a){return{restrict:"A",terminal:!0,priority:1e3,link:function(b,c,d){c.attr("name",b.$eval(d.dynamicName)),c.removeAttr("dynamic-name"),a(c)(b)}}}]).directive("onReadFile",["$parse",function(a){return{restrict:"A",scope:!1,link:function(b,c,d){var e=a(d.onReadFile);c.on("change",function(a){var c=new FileReader;c.onload=function(a){b.$apply(function(){e(b,{$fileContent:a.target.result})})},c.readAsText((a.srcElement||a.target).files[0])})}}}]).directive("motionFileDownload",["xAlert","$translate","$timeout","$location","FileSaver","$compile",function(a,b,c,d,e,f){return{restrict:"E",template:'<a uib-tooltip=\'{{tooltiptext}}\' class="{{btnclass || \'btn default btn-xs blue-hoki\'}}" href="" data-ng-click="download()" ><i class="icon-cloud-download"></i>{{btncontent || \'\'}}</a>',scope:{mimetype:"=",filename:"=",resource:"=",params:"=",btnclass:"@",btncontent:"@",tooltiptext:"@"},link:function(b,c,d){var f=c.children()[0];b.$on("download-start",function(){$(f).attr("disabled","disabled")}),b.$on("downloaded",function(a,c){var d=base64ToBlob(c,b.mimetype);e.saveAs(d,b.filename),$(f).attr("disabled",!1)}),b.download=function(){return b.$emit("download-start"),b.resource.get(b.params).$promise.then(function(a){b.$emit("downloaded",a.downloadString)})["catch"](function(b){a.error(b),$(f).attr("disabled",!1)})}}}}]).directive("audioFileDownload",["xAlert","$translate","$uibModal",function(a,b,c){return{restrict:"E",template:'<button type="button" class="btn default btn-xs blue-hoki" data-ng-click="download()"><i class="fa fa-play"></i> {{ \'APPLICATION_PREVIEW\' | translate}}</button>',scope:{resource:"=",params:"="},link:function(b,d,e){var f=d.children()[0];b.$on("download-start",function(a,c){b.tempHtml=$(f).html(),$(f).attr("disabled","disabled").html('<i class="icon-refresh"></i> Loading...')}),b.$on("downloaded",function(a,d){c.open({animation:!0,size:"small",templateUrl:"app/main/audioFileDownload.play.modal.html",controller:["$scope","$uibModalInstance","$sce","audio",function(a,b,c,d){a.audio=c.trustAsResourceUrl("data:audio/wav;base64,"+d.data),a.close=function(){b.dismiss("cancel")}}],resolve:{audio:function(){return{data:d}}}});$(f).html(b.tempHtml).attr("disabled",!1)}),b.$on("error",function(a,c){$(f).html(b.tempHtml).attr("disabled",!1)}),b.download=function(){return b.$emit("download-start"),b.resource.get(b.params).$promise.then(function(a){b.$emit("downloaded",a.downloadString);
+})["catch"](function(c){a.error(c),b.$emit("error")})}}}}]).directive("uiRequired",function(){return{require:"ngModel",link:function(a,b,c,d){d.$validators.required=function(a,b){return!(b&&0===b.length&&"true"===c.uiRequired)},c.$observe("uiRequired",function(){d.$setValidity("required",!("true"===c.uiRequired&&d.$viewValue&&0===d.$viewValue.length))})}}}).directive("schrollBottom",function(){return{scope:{schrollBottom:"="},link:function(a,b){a.$watchCollection("schrollBottom",function(a){a&&$(b).scrollTop($(b)[0].scrollHeight)})}}}).directive("customGridDateFilterHeader",function(){return{templateUrl:"app/main/customDateFilterHeader.html",controller:"gridDatePickerFilterCtrl"}}).directive("customGridTagsFilterHeader",function(){return{templateUrl:"app/main/customTagsFilterHeader.html",controller:"gridTagsFilterCtrl"}}).directive("infiniteScroll",["$window",function(a){return{link:function(a,b,c){var d=parseInt(c.threshold)||0,e=b[0];b.bind("scroll",function(){a.$eval(c.canLoad)&&e.scrollTop+e.offsetHeight>=e.scrollHeight-d&&a.$apply(c.infiniteScroll)})}}}]).directive("tigerDialDisposal",["$compile","xAlert","socket","$translate","$timeout","$rootScope","MotionDialerSpooler","Agent",function(a,b,c,d,e,f,g,h){return{restrict:"E",scope:{workspace:"=",index:"="},templateUrl:"app/main/template/template.tigerDialDisposal.html",compile:function(a,c){return function(a,c,i){a.moment=moment,a.entitySpooler={},a.forms={td:{}},a.init=function(){return h.get().$promise.then(function(b){a.agents=[],b&&b.rows.forEach(function(b){a.agents.push("SIP/"+b.name)})})["catch"](function(a){b.error(a)})},a.save=function(){var c;switch(a.entitySpooler.retrieve){case"CLOSED":c=g.close({id:parseInt(a.workspace.spooler.ticketId)});break;case"OPEN":c=g.open({id:parseInt(a.workspace.spooler.ticketId)});break;case"BLACK_LIST":c=g.blacklist({id:parseInt(a.workspace.spooler.ticketId)});break;case"PLANNED":c=g.planning({id:parseInt(a.workspace.spooler.ticketId),date:moment(a.entitySpooler.planningtime).format("YYYY-MM-DD HH:mm")});break;case"PLANNED_PEER":c=g.planningpeer({id:parseInt(a.workspace.spooler.ticketId),date:moment(a.entitySpooler.planningtime).format("YYYY-MM-DD HH:mm"),peer:a.entitySpooler.planningpeer})}c?c.$promise.then(function(c){c.status>0?b.show(d.instant("MESSAGE_WELL_DONE"),"success"):c.response?c.response.RMI.errors.forEach(function(c){c?(b.show(c.field+": "+c.error,"danger"),f.workspaces.splice(a.index,1)):b.show("Please, check your connection!","danger")}):b.show("Please, check your connection!","danger")})["catch"](function(a){b.error(a)}):b.show("RETRIEVE NOT FOUND","danger")},e(function(){a.init()})}}}}]).directive("cssTimer",["$window","$interval",function(a,b){return{restrict:"EA",template:"<span>{{ millis | formatMilliseconds | date:format }}</span>",scope:{interval:"@",format:"@",startTime:"="},link:function(a,c,d){function e(){a.millis=Math.abs((new Date).getTime()-new Date(a.startTime).getTime())+1e3,a.activeInterval=b(function(){a.millis+=a.interval},a.interval)}a.interval||(a.interval=1e3),a.format||(a.format="HH:mm:ss"),e(),a.$watch("startTime",function(c,d){b.cancel(a.activeInterval),e()},!0)}}}]),angular.module("xCallyShuttleApp").filter("propsFilter",function(){return function(a,b){var c=[];return angular.isArray(a)?a.forEach(function(a){for(var d=!1,e=Object.keys(b),f=0;f<e.length;f++){var g=e[f],h=b[g].toLowerCase();if(-1!==a[g].toString().toLowerCase().indexOf(h)){d=!0;break}}d&&c.push(a)}):c=a,c}}).filter("capitalize",function(){return function(a){return a?a.replace(/([^\W_]+[^\s-]*) */g,function(a){return a.charAt(0).toUpperCase()+a.substr(1).toLowerCase()}):""}}).filter("salesforce",function(){var a=["CallDisposition","CallDurationInSeconds","CallObject","CallType","IsArchived","Priority","Status","Type"];return function(b){return _.remove(b,function(b){return b.custom===!1&&a.indexOf(b.name)<0}),b}}).filter("sugarcrm",function(){var a=["account_id","account_name","account_name1","assigned_user_name","assigned_user_id","case_number","created_by","created_by_name","date_entered","date_modified","deleted","description","id","modified_by_name","modified_user_id","name"];return function(b){return _.remove(b,function(b){return a.indexOf(b.name)>=0}),b}}).filter("freshdesk",function(){var a=["requester","subject","agent","description"];return function(b){return _.remove(b,function(b){return a.indexOf(b.ticket_field.name)>=0}),b}}).filter("zendesk",function(){var a=["subject","assignee","description"];return function(b){return _.remove(b,function(b){return a.indexOf(b.type)>=0}),b}}).filter("slice",function(){return function(a,b,c){return a?a.slice(b,c):void 0}}).filter("trusted",["$sce",function(a){var b=document.createElement("div");return function(c){return b.innerHTML=c,a.trustAsHtml(b.textContent)}}]).filter("formatMilliseconds",[function(){return function(a){return new Date(1970,0,1).setMilliseconds(a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main",{"abstract":!0,templateUrl:"app/main/main.html",controller:"MainCtrl",resolve:{authorization:["$q","Auth","$state","$timeout","$location","localStorageService",function(a,b,c,d,e,f){return b.getToken()?a.when():(f.remove("loggedIn"),d(function(){e.path("/login")}),a.reject())}],deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/plugins/mxgraph/js/mxClient.js","assets/plugins/ckeditor/ckeditor.js","assets/css/login.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("xAlert",["$translate","Notification","$state",function(a,b,c){return{show:function(c,d){switch(d){case"success":b.success({message:c,title:'<i class="glyphicon glyphicon-ok"></i> <strong>'+a.instant("MESSAGE_SUCCESS")+"!</strong>",delay:5e3});break;case"info":b.info({message:c,title:'<i class="glyphicon glyphicon-info-sign"></i> <strong>'+a.instant("MESSAGE_INFO")+"!</strong>",delay:5e3});break;case"danger":b.error({message:c,title:'<i class="glyphicon glyphicon-exclamation-sign"></i> <strong>'+a.instant("MESSAGE_ERROR")+"!</strong>",delay:1e4});break;case"warning":b.warning({message:c,title:'<i class="glyphicon glyphicon-warning-sign"></i> <strong>'+a.instant("MESSAGE_WARNING")+"!</strong>",delay:1e4});break;default:b.info(c)}},error:function(d){var e,f;d?d.status&&401===d.status?(e="Unauthorized!",f=!0):d.data?(e=d.data.translatedMessage||d.data.message||d.data||"Generic Error",console.log(d)):e=d.translatedMessage||d.message||"Generic Error":e="Generic Error",b.error({message:a.instant(e),title:'<i class="glyphicon glyphicon-exclamation-sign"></i> <strong>'+a.instant("MESSAGE_ERROR")+"!</strong>",delay:1e4}),f&&c.go("login")}}}]).factory("stResource",["$q","$filter","$timeout","$rootScope","$http","$translate","xAlert",function(a,b,c,d,e,f,g){return{getPage:function(b){var c={page:Math.ceil(b.pagination.start/b.pagination.number),per_page:b.pagination.number};b.sort.predicate&&(c.sort_by=b.sort.predicate,c.sort_order=b.sort.reverse?"DESC":"ASC"),_.forIn(b.search.predicateObject,function(a,b){c[b]=a}),b.search.params&&(c.clientQuery={},_.forIn(b.search.params,function(a,b){c.clientQuery[b]=a})),d.$broadcast("$spinnerStart"),e.get(b.url,{params:c}).success(function(a){f.resolve(a),d.$broadcast("$spinnerStop")}).error(function(a){g.error(a),d.$broadcast("$spinnerStop")});var f=a.defer();return f.promise}}}]).factory("xNotification",["$translate","Notification","$rootScope",function(a,b,c){return{show:function(d,e,f,g,h,i){var j=c.$new(),k={message:e,title:d,templateUrl:"app/main/template/template.notification.html",delay:g,scope:j};switch(j.acceptBtn=a.instant("APPLICATION_ACCEPT"),j.rejectBtn=a.instant("APPLICATION_REJECT"),j.nAccept=h,j.nReject=i,f){case"chat":j["class"]="alert-info",j.icon="icon-bubble";break;case"mail":j["class"]="alert-success",j.icon="icon-envelope";break;case"fax":j["class"]="alert-warning",j.icon="fa fa-fax";break;case"sms":j["class"]="alert-danger",j.icon="glyphicon glyphicon-comment";break;case"openchannel":j["class"]="alert-danger",j.icon="icon-globe";break;default:j["class"]="alert-info"}return new b(k)}}}]),angular.module("xCallyShuttleApp").controller("ContactManagerMergeContactChoose",["$scope","$translate","Contact","gridOptions","List","uiGridConstants","xAlert","$stateParams","Company","$uibModalInstance","listId",function(a,b,c,d,e,f,g,h,i,j,k){a.initView=function(){var b;return e.get().$promise.then(function(b){return a.lists=[],a.customFields=[],b.rows.forEach(function(b,c){_.forEach(b.CustomFields,function(b){a.customFields.push({name:b.name,alias:b.alias})}),a.lists.push({value:b.id,label:b.name})}),i.get().$promise}).then(function(b){a.companies=[],b.rows.forEach(function(b,c){a.companies.push({value:b.id,label:b.name})})}).then(function(){var e=[{"class":"blue-hoki",name:"select",onClick:"grid.appScope.choose(row.entity.id)"}];b={exporterCsvFilename:"Contacts.csv",columnDefs:[{name:"firstName"},{name:"lastName"},{name:"phone"},{name:"email"},{name:"ListId",displayName:"APPLICATION_LIST",field:"List.name",enableFiltering:!1},{name:"CompanyId",displayName:"APPLICATION_COMPANY",field:"Company.name",filter:{type:f.filter.SELECT,term:h.companyId||null,selectOptions:a.companies}}]},_.forEach(a.customFields,function(a){b.columnDefs.push({name:a.name,displayName:a.alias,visible:!1})}),b.columnDefs.push({name:"action",width:30,buttons:e}),a.gridOptions=d.gridOptions(c,b,a,{ListId:k})})["catch"](function(a){g.error(a)})},a.choose=function(a){j.close(a)},a.cancel=function(){j.dismiss()}}]),angular.module("xCallyShuttleApp").controller("ContactManagerMergeContactMerge",["$scope","$translate","Contact","xAlert","Company","$uibModalInstance","contactId","List","mergeContact","Tag",function(a,b,c,d,e,f,g,h,i,j){a.initView=function(){return e.get().$promise.then(function(b){return a.companies=b.rows,a.companies.unshift({id:"",name:"-- None --"}),j.get().$promise}).then(function(b){return a.tags=_.map(b.rows,"name"),c.get({id:g}).$promise}).then(function(b){a.fields={},a.contact={};var c=_.merge(_.keys(b),_.keys(i));return _.forEach(c,function(c){switch(c){case"tags":a.contact.tags=_.union(b.tags||[],i.tags||[]);break;case"$promise":case"$resolved":break;default:a.fields[c]=[],b[c]&&a.fields[c].push(b[c]),i[c]&&a.fields[c].push(i[c]),a.contact[c]=a.fields[c][0]||null}}),h.get({listId:b.ListId,controller:"customfields"}).$promise}).then(function(b){a.customFields=b.rows,a.customFields.forEach(function(a){a.values=JSON.parse(a.values)})})["catch"](function(a){d.error(a)})},a.merge=function(){a.contact.CompanyId||(a.contact.CompanyId=null),f.close(a.contact)},a.cancel=function(){f.dismiss()}}]),angular.module("xCallyShuttleApp").factory("Widget",["$resource",function(a){return a("/api/widgets/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("MarketCtrl",["$scope","$http","$translate","socket","xAlert","Modal","$timeout","Integration",function(a,b,c,d,e,f,g,h){function i(a,b){return Math.floor(Math.random()*(b-a+1))+a}a.initView=function(){return h.get().$promise.then(function(b){a.integrations=b.rows,a.groupedIntegration=_.chunk(a.integrations,4),d.syncUpdates("integration",a.integrations,function(){a.groupedIntegration=_.chunk(a.integrations,4)})})["catch"](function(a){e.error(a,"danger")})},a.isProgressing=!1,a.$on("$destroy",function(){d.unsyncUpdates("integration")}),a.installIntegration=function(b){return navigator.onLine?(a.status="Downloading",a.percentage=i(1,50),a.isProgressing=!0,b.downloading=!0,h.update({id:b.id},{active:!0}).$promise.then(function(){g(function(){a.percentage=i(51,99),a.status="Installing"},2500),g(function(){a.percentage=100,a.isProgressing=!1,a.status="Completed!",b.downloading=!1,e.show(c.instant("MESSAGE_WELL_DONE")+".","success")},5e3)})["catch"](function(){b.downloading=!1,a.percentage=0,a.isProgressing=!1,e.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})):void e.show(c.instant("MESSAGE_NO_INTERNET_CONNECTION")+".","danger")},a.uninstallIntegration=function(b){return navigator.onLine?(a.status="Uninstalling",a.percentage=i(1,99),a.isProgressing=!0,b.downloading=!0,h.update({id:b.id},{active:!1}).$promise.then(function(){g(function(){a.percentage=100,a.isProgressing=!1,a.status="Completed!",b.downloading=!1,e.show(c.instant("MESSAGE_WELL_DONE")+".","success")},5e3)})["catch"](function(){b.downloading=!1,a.percentage=0,a.isProgressing=!1,e.show(c.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})):void e.show(c.instant("MESSAGE_NO_INTERNET_CONNECTION")+".","danger")}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.market",{url:"/market",templateUrl:"app/market/market.html",controller:"MarketCtrl",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("MotionbarCtrl",["$scope","$stateParams","$cookieStore","$window","$location","Auth",function(a,b,c,d,e,f){console.log(b),b.token&&b.userId&&b.role&&b.redirectTo?(f.loginWithToken(b.token,b.userId,b.role),d.location.href=decodeURIComponent(b.redirectTo)):e.path("/login")}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("motionbar",{url:"/motionbar?redirectTo&token&userId&role",template:"<div ui-view></div>",controller:"MotionbarCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.blacklist",{url:"/blacklist",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("MotionDialerBlackListListCtrl",["$scope","$uibModal","$translate","xAlert","Modal","MotionDialerBlackList","uiGridConstants",function(a,b,c,d,e,f,g){a.initView=function(){a.gridOptions={paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!0,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,columnDefs:[{name:"id",width:60},{name:"phone"},{name:"description",enableSorting:!1},{name:"updatedtime",sort:{direction:g.DESC},enableFiltering:!1},{name:"action",cellTemplate:'<div><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteItem(row.entity.phone, row.entity.id)"><i class="icon-trash"></i></a></div>',enableSorting:!1,cellClass:"ui-grid-vcenter",enableFiltering:!1}]},f.list({page:1,size:6e5}).$promise.then(function(b){b.status>0?a.gridOptions.data=b.response.RMI.rows:d.show("Please, check your connection!","danger")})["catch"](function(a){d.error(a)})},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/motiondialer/blacklist/list/list.create.modal.html",controller:"MotionDialerBlackListListCreateCtrl"});c.result.then(function(b){a.gridOptions.data.push(b.response.RMI)})},a.deleteItem=e.confirm["delete"](function(b){return f["delete"]({id:b}).$promise.then(function(e){e.status>0?(_.remove(a.gridOptions.data,{id:b}),d.show(c.instant("MESSAGE_WELL_DONE"),"success")):d.show(e.message||"Please, check your connection!","danger")})["catch"](function(a){d.error(a)})})}]),angular.module("xCallyShuttleApp").controller("MotionDialerBlackListListCreateCtrl",["$scope","$translate","$uibModalInstance","MotionDialerBlackList","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.insert(a.item).$promise.then(function(a){a.status>0?(e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)):e.show(a.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.blacklist.list",{url:"/list",templateUrl:"app/motiondialer/blacklist/list/list.html",controller:"MotionDialerBlackListListCtrl",authenticate:!0})}]),angular.module("xCallyShuttleApp").factory("MotionDialerBlackList",["$resource",function(a){return a("/api/rest/blacklist/:controller",null,{list:{method:"POST",params:{controller:"list"}},insert:{method:"POST",params:{controller:"insert"}},"delete":{method:"POST",params:{controller:"delete"}},find:{method:"POST",params:{controller:"find"}},update:{method:"POST",params:{controller:"update"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.info",{url:"/info",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("MotionDialerSystem",["$resource",function(a){return a("/api/rest/system/:controller",null,{properties:{method:"POST",params:{controller:"properties"}}})}]),angular.module("xCallyShuttleApp").controller("MotionDialerInfoViewCtrl",["$scope","xAlert","MotionDialerSystem",function(a,b,c){a.getProperties=function(){return c.properties().$promise.then(function(c){console.log(c),c.status>0?a.properties=c.response.RMI:b.show(c.message||"Please, check your connection!","danger")})["catch"](function(a){b.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.info.view",{url:"/view",templateUrl:"app/motiondialer/info/view/view.html",controller:"MotionDialerInfoViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.motiondialer.info.view.about",{url:"/about",templateUrl:"app/motiondialer/info/view/view.about.html"}).state("main.motiondialer.info.view.details",{url:"/details",templateUrl:"app/motiondialer/info/view/view.details.html"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.lists",{url:"/lists",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("MotionDialerListListCtrl",["$scope","$uibModal","$translate","xAlert","Modal","MotionDialerList","uiGridConstants","usSpinnerService",function(a,b,c,d,e,f,g,h){a.initView=function(){return a.gridOptions={paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!0,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,columnDefs:[{name:"id",width:60},{name:"name"},{name:"description",enableSorting:!1},{name:"updatedtime",sort:{direction:g.DESC},enableFiltering:!1},{name:"action",cellTemplate:'<div><a class="btn btn-xs blue-hoki" href="/motiondialer/lists/view/{{row.entity.id}}/settings"><i class="icon-settings"></i></a> <a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteItem(row.entity.name, row.entity.id)"><i class="icon-trash"></i></a></div>',enableSorting:!1,cellClass:"ui-grid-vcenter",enableFiltering:!1}]},f.list({page:1,size:6e5}).$promise.then(function(b){b.status>0?a.gridOptions.data=b.response.RMI.rows:d.show("Please, check your connection!","danger")})["catch"](function(a){d.error(a)})["finally"](function(){h.stop("spinner-grid")})},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/motiondialer/list/list/list.create.modal.html",controller:"MotionDialerListListCreateCtrl"});c.result.then(function(b){a.gridOptions.data.push(b.response.RMI)})},a.deleteItem=e.confirm["delete"](function(b){return f["delete"]({id:b}).$promise.then(function(e){e.status>0?(_.remove(a.gridOptions.data,{id:b}),d.show(c.instant("MESSAGE_WELL_DONE"),"success")):d.show(e.message||"Please, check your connection!","danger")})["catch"](function(a){d.error(a)})})}]),angular.module("xCallyShuttleApp").controller("MotionDialerListListCreateCtrl",["$scope","$translate","$uibModalInstance","MotionDialerList","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.insert(a.item).$promise.then(function(a){a.status>0?(e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)):e.show(a.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.lists.list",{url:"/list",templateUrl:"app/motiondialer/list/list/list.html",controller:"MotionDialerListListCtrl",authenticate:!0})}]),angular.module("xCallyShuttleApp").factory("MotionDialerContact",["$resource",function(a){return a("/api/rest/contact/:controller",null,{list:{method:"POST",params:{controller:"list"}},insert:{method:"POST",params:{controller:"insert"}},"delete":{method:"POST",params:{controller:"delete"}},find:{method:"POST",params:{controller:"find"}},update:{method:"POST",params:{controller:"update"}}})}]),angular.module("xCallyShuttleApp").factory("MotionDialerList",["$resource",function(a){return a("/api/rest/list/:controller",null,{list:{method:"POST",params:{controller:"list"}},insert:{method:"POST",params:{controller:"insert"}},"delete":{method:"POST",params:{controller:"delete"}},find:{method:"POST",params:{controller:"find"}},update:{method:"POST",params:{controller:"update"}}})}]),angular.module("xCallyShuttleApp").controller("MotionDialerViewContactCreateCtrl",["$scope","$translate","$uibModalInstance","$stateParams","MotionDialerContact","xAlert","MotionDialerTimezone",function(a,b,c,d,e,f,g){a.form={},a.item={},a.timezones=g.list(),a.save=function(){return console.log(a.item),e.insert({id_list:parseInt(d.id),name:a.item.name,phones:a.item.phones.trim().split(","),description:a.item.description||""}).$promise.then(function(a){console.log(a),a.status>0?(f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)):f.show(a.message||"Please, check your connection!","danger")})["catch"](function(a){f.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").controller("MotionDialerListContactImportModalCtrl",["$scope","$uibModalInstance","$stateParams","indexes","csv","xAlert","MotionDialerContact","MotionDialerTimezone",function(a,b,c,d,e,f,g,h){function i(b){if(b>=a.csvLength||a.stopped)return void(a.importing=!1);var d={id_list:parseInt(c.id),name:"",phones:[],variables:[],description:"",account:"",timezone:""},f={};return _.forOwn(a.item,function(a,c){switch(c){case"phones":_.forEach(a,function(a){e[b][a]&&d.phones.push(e[b][a])});break;case"variables":_.forEach(a,function(a){e[b][a]&&(f={},f[a]=e[b][a],d.variables.push(f))});break;default:d[c]=e[b][a]}}),d.phones.length?(d.timezone||delete d.timezone,g.insert(d).$promise.then(function(b){b.status>0?(a["import"].success+=j,a["import"].succeeded++,k.push(b.response.RMI)):(console.log(b),a["import"].fail+=j,a["import"].failed++)})["catch"](function(b){console.log(b),a["import"].fail+=j,a["import"].failed++})["finally"](function(){i(b+1)})):(a.noPhone.push(b+2),a["import"].fail+=j,a["import"].failed++,i(b+1),void 0)}a.form={},a.item={},a.timezones=h.list(),a.uiTimeZones=[],_.forEach(a.timezones,function(b){_.forEach(b.zones,function(c){c.group=b.group,a.uiTimeZones.push(c)})}),a.indexes=d,a.importing=!1,a.submitted=!1,a.stopped=!1,a["import"]={success:0,fail:0,succeeded:0,failed:0},a.csvLength=e.length;var j=100/a.csvLength,k=[];a.start=function(){a.noPhone=[],a.importing=!0,a.submitted=!0,i(0)},a.close=function(){b.close(k)},a.stop=function(){a.stopped=!0}}]),angular.module("xCallyShuttleApp").controller("MotionDialerListViewCtrl",["$scope","$translate","$stateParams","$uibModal","xAlert","uiGridConstants","usSpinnerService","MotionDialerList","MotionDialerContact","Modal","FileUploader","Papa",function(a,b,c,d,e,f,g,h,i,j,k,l){a.getList=function(){return h.find({id:parseInt(c.id)}).$promise.then(function(b){b.status>0?a.list=b.response.RMI:e.show(b.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})},a.updateList=function(){return h.update({id:a.list.id,name:a.list.name,description:a.list.description}).$promise.then(function(a){a.status>0?e.show(b.instant("MESSAGE_WELL_DONE"),"success"):e.show(a.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})},a.getContacts=function(){return a.gridOptions={paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!0,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,columnDefs:[{name:"name"},{name:"phones",cellTemplate:"<div>{{row.entity.phones.join(',')}}</div>",cellClass:"ui-grid-vcenter"},{name:"description",enableSorting:!1},{name:"updatedtime",sort:{direction:f.DESC},enableFiltering:!1},{name:"action",cellTemplate:'<div><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteContact(row.entity.name, row.entity.id)"><i class="icon-trash"></i></a></div>',enableSorting:!1,cellClass:"ui-grid-vcenter",enableFiltering:!1}]},i.list({id_list:parseInt(c.id),page:1,size:6e5}).$promise.then(function(b){b.status>0?a.gridOptions.data=b.response.RMI.rows:e.show(b.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})["finally"](function(){g.stop("spinner-grid")})},a.deleteContact=j.confirm["delete"](function(c){return i["delete"]({id:c}).$promise.then(function(d){d.status>0?(_.remove(a.gridOptions.data,{id:c}),e.show(b.instant("MESSAGE_WELL_DONE"),"success")):e.show(d.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})}),a.createContact=function(){var b=d.open({animation:!0,templateUrl:"app/motiondialer/list/view/view.contact.create.modal.html",controller:"MotionDialerViewContactCreateCtrl"});b.result.then(function(b){a.gridOptions.data.push(b.response.RMI)})};var m=a.uploader=new k({queueLimit:1,clearInputAfterAddedToQueue:!0});m.onAfterAddingFile=function(b){l.parse(b._file,{header:!0,complete:function(b){a.uploader.clearQueue(),a["import"](b.data)},error:function(a){e.error(a)}})},a["import"]=function(b){var c=d.open({animation:!0,backdrop:"static",keyboard:!1,templateUrl:"app/motiondialer/list/view/view.contact.import.modal.html",controller:"MotionDialerListContactImportModalCtrl",resolve:{indexes:function(){return _.keys(b[0])},csv:function(){return b}}});c.result.then(function(b){console.log(b),a.gridOptions.data=a.gridOptions.data.concat(b)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.lists.view",{url:"/view/:id",templateUrl:"app/motiondialer/list/view/view.html",controller:"MotionDialerListViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.motiondialer.lists.view.settings",{url:"/settings",templateUrl:"app/motiondialer/list/view/view.settings.html"}).state("main.motiondialer.lists.view.contacts",{url:"/contacts",templateUrl:"app/motiondialer/list/view/view.contacts.html"})}]),angular.module("xCallyShuttleApp").factory("MotionDialerTimezone",function(){return{list:function(){return[{group:"US (Common)",zones:[{value:"America/Puerto_Rico",name:"Puerto Rico (Atlantic)"},{value:"America/New_York",name:"New York (Eastern)"},{value:"America/Chicago",name:"Chicago (Central)"},{value:"America/Denver",name:"Denver (Mountain)"},{value:"America/Phoenix",name:"Phoenix (MST)"},{value:"America/Los_Angeles",name:"Los Angeles (Pacific)"},{value:"America/Anchorage",name:"Anchorage (Alaska)"},{value:"Pacific/Honolulu",name:"Honolulu (Hawaii)"}]},{group:"America",zones:[{value:"America/Adak",name:"Adak"},{value:"America/Anchorage",name:"Anchorage"},{value:"America/Anguilla",name:"Anguilla"},{value:"America/Antigua",name:"Antigua"},{value:"America/Araguaina",name:"Araguaina"},{value:"America/Argentina/Buenos_Aires",name:"Argentina - Buenos Aires"},{value:"America/Argentina/Catamarca",name:"Argentina - Catamarca"},{value:"America/Argentina/ComodRivadavia",name:"Argentina - ComodRivadavia"},{value:"America/Argentina/Cordoba",name:"Argentina - Cordoba"},{value:"America/Argentina/Jujuy",name:"Argentina - Jujuy"},{value:"America/Argentina/La_Rioja",name:"Argentina - La Rioja"},{value:"America/Argentina/Mendoza",name:"Argentina - Mendoza"},{value:"America/Argentina/Rio_Gallegos",name:"Argentina - Rio Gallegos"},{value:"America/Argentina/Salta",name:"Argentina - Salta"},{value:"America/Argentina/San_Juan",name:"Argentina - San Juan"},{value:"America/Argentina/San_Luis",name:"Argentina - San Luis"},{value:"America/Argentina/Tucuman",name:"Argentina - Tucuman"},{value:"America/Argentina/Ushuaia",name:"Argentina - Ushuaia"},{value:"America/Aruba",name:"Aruba"},{value:"America/Asuncion",name:"Asuncion"},{value:"America/Atikokan",name:"Atikokan"},{value:"America/Atka",name:"Atka"},{value:"America/Bahia",name:"Bahia"},{value:"America/Barbados",name:"Barbados"},{value:"America/Belem",name:"Belem"},{value:"America/Belize",name:"Belize"},{value:"America/Blanc-Sablon",name:"Blanc-Sablon"},{value:"America/Boa_Vista",name:"Boa Vista"},{value:"America/Bogota",name:"Bogota"},{value:"America/Boise",name:"Boise"},{value:"America/Buenos_Aires",name:"Buenos Aires"},{value:"America/Cambridge_Bay",name:"Cambridge Bay"},{value:"America/Campo_Grande",name:"Campo Grande"},{value:"America/Cancun",name:"Cancun"},{value:"America/Caracas",name:"Caracas"},{value:"America/Catamarca",name:"Catamarca"},{value:"America/Cayenne",name:"Cayenne"},{value:"America/Cayman",name:"Cayman"},{value:"America/Chicago",name:"Chicago"},{value:"America/Chihuahua",name:"Chihuahua"},{value:"America/Coral_Harbour",name:"Coral Harbour"},{value:"America/Cordoba",name:"Cordoba"},{value:"America/Costa_Rica",name:"Costa Rica"},{value:"America/Cuiaba",name:"Cuiaba"},{value:"America/Curacao",name:"Curacao"},{value:"America/Danmarkshavn",name:"Danmarkshavn"},{value:"America/Dawson",name:"Dawson"},{value:"America/Dawson_Creek",name:"Dawson Creek"},{value:"America/Denver",name:"Denver"},{value:"America/Detroit",name:"Detroit"},{value:"America/Dominica",name:"Dominica"},{value:"America/Edmonton",name:"Edmonton"},{value:"America/Eirunepe",name:"Eirunepe"},{value:"America/El_Salvador",name:"El Salvador"},{value:"America/Ensenada",name:"Ensenada"},{value:"America/Fortaleza",name:"Fortaleza"},{value:"America/Fort_Wayne",name:"Fort Wayne"},{value:"America/Glace_Bay",name:"Glace Bay"},{value:"America/Godthab",name:"Godthab"},{value:"America/Goose_Bay",name:"Goose Bay"},{value:"America/Grand_Turk",name:"Grand Turk"},{value:"America/Grenada",name:"Grenada"},{value:"America/Guadeloupe",name:"Guadeloupe"},{value:"America/Guatemala",name:"Guatemala"},{value:"America/Guayaquil",name:"Guayaquil"},{value:"America/Guyana",name:"Guyana"},{value:"America/Halifax",name:"Halifax"},{value:"America/Havana",name:"Havana"},{value:"America/Hermosillo",name:"Hermosillo"},{value:"America/Indiana/Indianapolis",name:"Indiana - Indianapolis"},{value:"America/Indiana/Knox",name:"Indiana - Knox"},{value:"America/Indiana/Marengo",name:"Indiana - Marengo"},{value:"America/Indiana/Petersburg",name:"Indiana - Petersburg"},{value:"America/Indiana/Tell_City",name:"Indiana - Tell City"},{value:"America/Indiana/Vevay",name:"Indiana - Vevay"},{value:"America/Indiana/Vincennes",name:"Indiana - Vincennes"},{value:"America/Indiana/Winamac",name:"Indiana - Winamac"},{value:"America/Indianapolis",name:"Indianapolis"},{value:"America/Inuvik",name:"Inuvik"},{value:"America/Iqaluit",name:"Iqaluit"},{value:"America/Jamaica",name:"Jamaica"},{value:"America/Jujuy",name:"Jujuy"},{value:"America/Juneau",name:"Juneau"},{value:"America/Kentucky/Louisville",name:"Kentucky - Louisville"},{value:"America/Kentucky/Monticello",name:"Kentucky - Monticello"},{value:"America/Knox_IN",name:"Knox IN"},{value:"America/La_Paz",name:"La Paz"},{value:"America/Lima",name:"Lima"},{value:"America/Los_Angeles",name:"Los Angeles"},{value:"America/Louisville",name:"Louisville"},{value:"America/Maceio",name:"Maceio"},{value:"America/Managua",name:"Managua"},{value:"America/Manaus",name:"Manaus"},{value:"America/Marigot",name:"Marigot"},{value:"America/Martinique",name:"Martinique"},{value:"America/Matamoros",name:"Matamoros"},{value:"America/Mazatlan",name:"Mazatlan"},{value:"America/Mendoza",name:"Mendoza"},{value:"America/Menominee",name:"Menominee"},{value:"America/Merida",name:"Merida"},{value:"America/Mexico_City",
+name:"Mexico City"},{value:"America/Miquelon",name:"Miquelon"},{value:"America/Moncton",name:"Moncton"},{value:"America/Monterrey",name:"Monterrey"},{value:"America/Montevideo",name:"Montevideo"},{value:"America/Montreal",name:"Montreal"},{value:"America/Montserrat",name:"Montserrat"},{value:"America/Nassau",name:"Nassau"},{value:"America/New_York",name:"New York"},{value:"America/Nipigon",name:"Nipigon"},{value:"America/Nome",name:"Nome"},{value:"America/Noronha",name:"Noronha"},{value:"America/North_Dakota/Center",name:"North Dakota - Center"},{value:"America/North_Dakota/New_Salem",name:"North Dakota - New Salem"},{value:"America/Ojinaga",name:"Ojinaga"},{value:"America/Panama",name:"Panama"},{value:"America/Pangnirtung",name:"Pangnirtung"},{value:"America/Paramaribo",name:"Paramaribo"},{value:"America/Phoenix",name:"Phoenix"},{value:"America/Port-au-Prince",name:"Port-au-Prince"},{value:"America/Porto_Acre",name:"Porto Acre"},{value:"America/Port_of_Spain",name:"Port of Spain"},{value:"America/Porto_Velho",name:"Porto Velho"},{value:"America/Puerto_Rico",name:"Puerto Rico"},{value:"America/Rainy_River",name:"Rainy River"},{value:"America/Rankin_Inlet",name:"Rankin Inlet"},{value:"America/Recife",name:"Recife"},{value:"America/Regina",name:"Regina"},{value:"America/Resolute",name:"Resolute"},{value:"America/Rio_Branco",name:"Rio Branco"},{value:"America/Rosario",name:"Rosario"},{value:"America/Santa_Isabel",name:"Santa Isabel"},{value:"America/Santarem",name:"Santarem"},{value:"America/Santiago",name:"Santiago"},{value:"America/Santo_Domingo",name:"Santo Domingo"},{value:"America/Sao_Paulo",name:"Sao Paulo"},{value:"America/Scoresbysund",name:"Scoresbysund"},{value:"America/Shiprock",name:"Shiprock"},{value:"America/St_Barthelemy",name:"St Barthelemy"},{value:"America/St_Johns",name:"St Johns"},{value:"America/St_Kitts",name:"St Kitts"},{value:"America/St_Lucia",name:"St Lucia"},{value:"America/St_Thomas",name:"St Thomas"},{value:"America/St_Vincent",name:"St Vincent"},{value:"America/Swift_Current",name:"Swift Current"},{value:"America/Tegucigalpa",name:"Tegucigalpa"},{value:"America/Thule",name:"Thule"},{value:"America/Thunder_Bay",name:"Thunder Bay"},{value:"America/Tijuana",name:"Tijuana"},{value:"America/Toronto",name:"Toronto"},{value:"America/Tortola",name:"Tortola"},{value:"America/Vancouver",name:"Vancouver"},{value:"America/Virgin",name:"Virgin"},{value:"America/Whitehorse",name:"Whitehorse"},{value:"America/Winnipeg",name:"Winnipeg"},{value:"America/Yakutat",name:"Yakutat"},{value:"America/Yellowknife",name:"Yellowknife"}]},{group:"Europe",zones:[{value:"Europe/Amsterdam",name:"Amsterdam"},{value:"Europe/Andorra",name:"Andorra"},{value:"Europe/Athens",name:"Athens"},{value:"Europe/Belfast",name:"Belfast"},{value:"Europe/Belgrade",name:"Belgrade"},{value:"Europe/Berlin",name:"Berlin"},{value:"Europe/Bratislava",name:"Bratislava"},{value:"Europe/Brussels",name:"Brussels"},{value:"Europe/Bucharest",name:"Bucharest"},{value:"Europe/Budapest",name:"Budapest"},{value:"Europe/Chisinau",name:"Chisinau"},{value:"Europe/Copenhagen",name:"Copenhagen"},{value:"Europe/Dublin",name:"Dublin"},{value:"Europe/Gibraltar",name:"Gibraltar"},{value:"Europe/Guernsey",name:"Guernsey"},{value:"Europe/Helsinki",name:"Helsinki"},{value:"Europe/Isle_of_Man",name:"Isle of Man"},{value:"Europe/Istanbul",name:"Istanbul"},{value:"Europe/Jersey",name:"Jersey"},{value:"Europe/Kaliningrad",name:"Kaliningrad"},{value:"Europe/Kiev",name:"Kiev"},{value:"Europe/Lisbon",name:"Lisbon"},{value:"Europe/Ljubljana",name:"Ljubljana"},{value:"Europe/London",name:"London"},{value:"Europe/Luxembourg",name:"Luxembourg"},{value:"Europe/Madrid",name:"Madrid"},{value:"Europe/Malta",name:"Malta"},{value:"Europe/Mariehamn",name:"Mariehamn"},{value:"Europe/Minsk",name:"Minsk"},{value:"Europe/Monaco",name:"Monaco"},{value:"Europe/Moscow",name:"Moscow"},{value:"Europe/Nicosia",name:"Nicosia"},{value:"Europe/Oslo",name:"Oslo"},{value:"Europe/Paris",name:"Paris"},{value:"Europe/Podgorica",name:"Podgorica"},{value:"Europe/Prague",name:"Prague"},{value:"Europe/Riga",name:"Riga"},{value:"Europe/Rome",name:"Rome"},{value:"Europe/Samara",name:"Samara"},{value:"Europe/San_Marino",name:"San Marino"},{value:"Europe/Sarajevo",name:"Sarajevo"},{value:"Europe/Simferopol",name:"Simferopol"},{value:"Europe/Skopje",name:"Skopje"},{value:"Europe/Sofia",name:"Sofia"},{value:"Europe/Stockholm",name:"Stockholm"},{value:"Europe/Tallinn",name:"Tallinn"},{value:"Europe/Tirane",name:"Tirane"},{value:"Europe/Tiraspol",name:"Tiraspol"},{value:"Europe/Uzhgorod",name:"Uzhgorod"},{value:"Europe/Vaduz",name:"Vaduz"},{value:"Europe/Vatican",name:"Vatican"},{value:"Europe/Vienna",name:"Vienna"},{value:"Europe/Vilnius",name:"Vilnius"},{value:"Europe/Volgograd",name:"Volgograd"},{value:"Europe/Warsaw",name:"Warsaw"},{value:"Europe/Zagreb",name:"Zagreb"},{value:"Europe/Zaporozhye",name:"Zaporozhye"},{value:"Europe/Zurich",name:"Zurich"}]},{group:"Asia",zones:[{value:"Asia/Aden",name:"Aden"},{value:"Asia/Almaty",name:"Almaty"},{value:"Asia/Amman",name:"Amman"},{value:"Asia/Anadyr",name:"Anadyr"},{value:"Asia/Aqtau",name:"Aqtau"},{value:"Asia/Aqtobe",name:"Aqtobe"},{value:"Asia/Ashgabat",name:"Ashgabat"},{value:"Asia/Ashkhabad",name:"Ashkhabad"},{value:"Asia/Baghdad",name:"Baghdad"},{value:"Asia/Bahrain",name:"Bahrain"},{value:"Asia/Baku",name:"Baku"},{value:"Asia/Bangkok",name:"Bangkok"},{value:"Asia/Beirut",name:"Beirut"},{value:"Asia/Bishkek",name:"Bishkek"},{value:"Asia/Brunei",name:"Brunei"},{value:"Asia/Calcutta",name:"Calcutta"},{value:"Asia/Choibalsan",name:"Choibalsan"},{value:"Asia/Chongqing",name:"Chongqing"},{value:"Asia/Chungking",name:"Chungking"},{value:"Asia/Colombo",name:"Colombo"},{value:"Asia/Dacca",name:"Dacca"},{value:"Asia/Damascus",name:"Damascus"},{value:"Asia/Dhaka",name:"Dhaka"},{value:"Asia/Dili",name:"Dili"},{value:"Asia/Dubai",name:"Dubai"},{value:"Asia/Dushanbe",name:"Dushanbe"},{value:"Asia/Gaza",name:"Gaza"},{value:"Asia/Harbin",name:"Harbin"},{value:"Asia/Ho_Chi_Minh",name:"Ho Chi Minh"},{value:"Asia/Hong_Kong",name:"Hong Kong"},{value:"Asia/Hovd",name:"Hovd"},{value:"Asia/Irkutsk",name:"Irkutsk"},{value:"Asia/Istanbul",name:"Istanbul"},{value:"Asia/Jakarta",name:"Jakarta"},{value:"Asia/Jayapura",name:"Jayapura"},{value:"Asia/Jerusalem",name:"Jerusalem"},{value:"Asia/Kabul",name:"Kabul"},{value:"Asia/Kamchatka",name:"Kamchatka"},{value:"Asia/Karachi",name:"Karachi"},{value:"Asia/Kashgar",name:"Kashgar"},{value:"Asia/Kathmandu",name:"Kathmandu"},{value:"Asia/Katmandu",name:"Katmandu"},{value:"Asia/Kolkata",name:"Kolkata"},{value:"Asia/Krasnoyarsk",name:"Krasnoyarsk"},{value:"Asia/Kuala_Lumpur",name:"Kuala Lumpur"},{value:"Asia/Kuching",name:"Kuching"},{value:"Asia/Kuwait",name:"Kuwait"},{value:"Asia/Macao",name:"Macao"},{value:"Asia/Macau",name:"Macau"},{value:"Asia/Magadan",name:"Magadan"},{value:"Asia/Makassar",name:"Makassar"},{value:"Asia/Manila",name:"Manila"},{value:"Asia/Muscat",name:"Muscat"},{value:"Asia/Nicosia",name:"Nicosia"},{value:"Asia/Novokuznetsk",name:"Novokuznetsk"},{value:"Asia/Novosibirsk",name:"Novosibirsk"},{value:"Asia/Omsk",name:"Omsk"},{value:"Asia/Oral",name:"Oral"},{value:"Asia/Phnom_Penh",name:"Phnom Penh"},{value:"Asia/Pontianak",name:"Pontianak"},{value:"Asia/Pyongyang",name:"Pyongyang"},{value:"Asia/Qatar",name:"Qatar"},{value:"Asia/Qyzylorda",name:"Qyzylorda"},{value:"Asia/Rangoon",name:"Rangoon"},{value:"Asia/Riyadh",name:"Riyadh"},{value:"Asia/Saigon",name:"Saigon"},{value:"Asia/Sakhalin",name:"Sakhalin"},{value:"Asia/Samarkand",name:"Samarkand"},{value:"Asia/Seoul",name:"Seoul"},{value:"Asia/Shanghai",name:"Shanghai"},{value:"Asia/Singapore",name:"Singapore"},{value:"Asia/Taipei",name:"Taipei"},{value:"Asia/Tashkent",name:"Tashkent"},{value:"Asia/Tbilisi",name:"Tbilisi"},{value:"Asia/Tehran",name:"Tehran"},{value:"Asia/Tel_Aviv",name:"Tel Aviv"},{value:"Asia/Thimbu",name:"Thimbu"},{value:"Asia/Thimphu",name:"Thimphu"},{value:"Asia/Tokyo",name:"Tokyo"},{value:"Asia/Ujung_Pandang",name:"Ujung Pandang"},{value:"Asia/Ulaanbaatar",name:"Ulaanbaatar"},{value:"Asia/Ulan_Bator",name:"Ulan Bator"},{value:"Asia/Urumqi",name:"Urumqi"},{value:"Asia/Vientiane",name:"Vientiane"},{value:"Asia/Vladivostok",name:"Vladivostok"},{value:"Asia/Yakutsk",name:"Yakutsk"},{value:"Asia/Yekaterinburg",name:"Yekaterinburg"},{value:"Asia/Yerevan",name:"Yerevan"}]},{group:"Africa",zones:[{value:"Africa/Abidjan",name:"Abidjan"},{value:"Africa/Accra",name:"Accra"},{value:"Africa/Addis_Ababa",name:"Addis Ababa"},{value:"Africa/Algiers",name:"Algiers"},{value:"Africa/Asmara",name:"Asmara"},{value:"Africa/Asmera",name:"Asmera"},{value:"Africa/Bamako",name:"Bamako"},{value:"Africa/Bangui",name:"Bangui"},{value:"Africa/Banjul",name:"Banjul"},{value:"Africa/Bissau",name:"Bissau"},{value:"Africa/Blantyre",name:"Blantyre"},{value:"Africa/Brazzaville",name:"Brazzaville"},{value:"Africa/Bujumbura",name:"Bujumbura"},{value:"Africa/Cairo",name:"Cairo"},{value:"Africa/Casablanca",name:"Casablanca"},{value:"Africa/Ceuta",name:"Ceuta"},{value:"Africa/Conakry",name:"Conakry"},{value:"Africa/Dakar",name:"Dakar"},{value:"Africa/Dar_es_Salaam",name:"Dar es Salaam"},{value:"Africa/Djibouti",name:"Djibouti"},{value:"Africa/Douala",name:"Douala"},{value:"Africa/El_Aaiun",name:"El Aaiun"},{value:"Africa/Freetown",name:"Freetown"},{value:"Africa/Gaborone",name:"Gaborone"},{value:"Africa/Harare",name:"Harare"},{value:"Africa/Johannesburg",name:"Johannesburg"},{value:"Africa/Kampala",name:"Kampala"},{value:"Africa/Khartoum",name:"Khartoum"},{value:"Africa/Kigali",name:"Kigali"},{value:"Africa/Kinshasa",name:"Kinshasa"},{value:"Africa/Lagos",name:"Lagos"},{value:"Africa/Libreville",name:"Libreville"},{value:"Africa/Lome",name:"Lome"},{value:"Africa/Luanda",name:"Luanda"},{value:"Africa/Lubumbashi",name:"Lubumbashi"},{value:"Africa/Lusaka",name:"Lusaka"},{value:"Africa/Malabo",name:"Malabo"},{value:"Africa/Maputo",name:"Maputo"},{value:"Africa/Maseru",name:"Maseru"},{value:"Africa/Mbabane",name:"Mbabane"},{value:"Africa/Mogadishu",name:"Mogadishu"},{value:"Africa/Monrovia",name:"Monrovia"},{value:"Africa/Nairobi",name:"Nairobi"},{value:"Africa/Ndjamena",name:"Ndjamena"},{value:"Africa/Niamey",name:"Niamey"},{value:"Africa/Nouakchott",name:"Nouakchott"},{value:"Africa/Ouagadougou",name:"Ouagadougou"},{value:"Africa/Porto-Novo",name:"Porto-Novo"},{value:"Africa/Sao_Tome",name:"Sao Tome"},{value:"Africa/Timbuktu",name:"Timbuktu"},{value:"Africa/Tripoli",name:"Tripoli"},{value:"Africa/Tunis",name:"Tunis"},{value:"Africa/Windhoek",name:"Windhoek"}]},{group:"Australia",zones:[{value:"Australia/ACT",name:"ACT"},{value:"Australia/Adelaide",name:"Adelaide"},{value:"Australia/Brisbane",name:"Brisbane"},{value:"Australia/Broken_Hill",name:"Broken Hill"},{value:"Australia/Canberra",name:"Canberra"},{value:"Australia/Currie",name:"Currie"},{value:"Australia/Darwin",name:"Darwin"},{value:"Australia/Eucla",name:"Eucla"},{value:"Australia/Hobart",name:"Hobart"},{value:"Australia/LHI",name:"LHI"},{value:"Australia/Lindeman",name:"Lindeman"},{value:"Australia/Lord_Howe",name:"Lord Howe"},{value:"Australia/Melbourne",name:"Melbourne"},{value:"Australia/North",name:"North"},{value:"Australia/NSW",name:"NSW"},{value:"Australia/Perth",name:"Perth"},{value:"Australia/Queensland",name:"Queensland"},{value:"Australia/South",name:"South"},{value:"Australia/Sydney",name:"Sydney"},{value:"Australia/Tasmania",name:"Tasmania"},{value:"Australia/Victoria",name:"Victoria"},{value:"Australia/West",name:"West"},{value:"Australia/Yancowinna",name:"Yancowinna"}]},{group:"Indian",zones:[{value:"Indian/Antananarivo",name:"Antananarivo"},{value:"Indian/Chagos",name:"Chagos"},{value:"Indian/Christmas",name:"Christmas"},{value:"Indian/Cocos",name:"Cocos"},{value:"Indian/Comoro",name:"Comoro"},{value:"Indian/Kerguelen",name:"Kerguelen"},{value:"Indian/Mahe",name:"Mahe"},{value:"Indian/Maldives",name:"Maldives"},{value:"Indian/Mauritius",name:"Mauritius"},{value:"Indian/Mayotte",name:"Mayotte"},{value:"Indian/Reunion",name:"Reunion"}]},{group:"Atlantic",zones:[{value:"Atlantic/Azores",name:"Azores"},{value:"Atlantic/Bermuda",name:"Bermuda"},{value:"Atlantic/Canary",name:"Canary"},{value:"Atlantic/Cape_Verde",name:"Cape Verde"},{value:"Atlantic/Faeroe",name:"Faeroe"},{value:"Atlantic/Faroe",name:"Faroe"},{value:"Atlantic/Jan_Mayen",name:"Jan Mayen"},{value:"Atlantic/Madeira",name:"Madeira"},{value:"Atlantic/Reykjavik",name:"Reykjavik"},{value:"Atlantic/South_Georgia",name:"South Georgia"},{value:"Atlantic/Stanley",name:"Stanley"},{value:"Atlantic/St_Helena",name:"St Helena"}]},{group:"Pacific",zones:[{value:"Pacific/Apia",name:"Apia"},{value:"Pacific/Auckland",name:"Auckland"},{value:"Pacific/Chatham",name:"Chatham"},{value:"Pacific/Easter",name:"Easter"},{value:"Pacific/Efate",name:"Efate"},{value:"Pacific/Enderbury",name:"Enderbury"},{value:"Pacific/Fakaofo",name:"Fakaofo"},{value:"Pacific/Fiji",name:"Fiji"},{value:"Pacific/Funafuti",name:"Funafuti"},{value:"Pacific/Galapagos",name:"Galapagos"},{value:"Pacific/Gambier",name:"Gambier"},{value:"Pacific/Guadalcanal",name:"Guadalcanal"},{value:"Pacific/Guam",name:"Guam"},{value:"Pacific/Honolulu",name:"Honolulu"},{value:"Pacific/Johnston",name:"Johnston"},{value:"Pacific/Kiritimati",name:"Kiritimati"},{value:"Pacific/Kosrae",name:"Kosrae"},{value:"Pacific/Kwajalein",name:"Kwajalein"},{value:"Pacific/Majuro",name:"Majuro"},{value:"Pacific/Marquesas",name:"Marquesas"},{value:"Pacific/Midway",name:"Midway"},{value:"Pacific/Nauru",name:"Nauru"},{value:"Pacific/Niue",name:"Niue"},{value:"Pacific/Norfolk",name:"Norfolk"},{value:"Pacific/Noumea",name:"Noumea"},{value:"Pacific/Pago_Pago",name:"Pago Pago"},{value:"Pacific/Palau",name:"Palau"},{value:"Pacific/Pitcairn",name:"Pitcairn"},{value:"Pacific/Ponape",name:"Ponape"},{value:"Pacific/Port_Moresby",name:"Port Moresby"},{value:"Pacific/Rarotonga",name:"Rarotonga"},{value:"Pacific/Saipan",name:"Saipan"},{value:"Pacific/Samoa",name:"Samoa"},{value:"Pacific/Tahiti",name:"Tahiti"},{value:"Pacific/Tarawa",name:"Tarawa"},{value:"Pacific/Tongatapu",name:"Tongatapu"},{value:"Pacific/Truk",name:"Truk"},{value:"Pacific/Wake",name:"Wake"},{value:"Pacific/Wallis",name:"Wallis"},{value:"Pacific/Yap",name:"Yap"}]},{group:"Antarctica",zones:[{value:"Antarctica/Casey",name:"Casey"},{value:"Antarctica/Davis",name:"Davis"},{value:"Antarctica/DumontDUrville",name:"DumontDUrville"},{value:"Antarctica/Macquarie",name:"Macquarie"},{value:"Antarctica/Mawson",name:"Mawson"},{value:"Antarctica/McMurdo",name:"McMurdo"},{value:"Antarctica/Palmer",name:"Palmer"},{value:"Antarctica/Rothera",name:"Rothera"},{value:"Antarctica/South_Pole",name:"South Pole"},{value:"Antarctica/Syowa",name:"Syowa"},{value:"Antarctica/Vostok",name:"Vostok"}]},{group:"Arctic",zones:[{value:"Arctic/Longyearbyen",name:"Longyearbyen"}]},{group:"UTC",zones:[{value:"UTC",name:"UTC"}]},{group:"Manual Offsets",zones:[{value:"UTC-12",name:"UTC-12"},{value:"UTC-11",name:"UTC-11"},{value:"UTC-10",name:"UTC-10"},{value:"UTC-9",name:"UTC-9"},{value:"UTC-8",name:"UTC-8"},{value:"UTC-7",name:"UTC-7"},{value:"UTC-6",name:"UTC-6"},{value:"UTC-5",name:"UTC-5"},{value:"UTC-4",name:"UTC-4"},{value:"UTC-3",name:"UTC-3"},{value:"UTC-2",name:"UTC-2"},{value:"UTC-1",name:"UTC-1"},{value:"UTC+0",name:"UTC+0"},{value:"UTC+1",name:"UTC+1"},{value:"UTC+2",name:"UTC+2"},{value:"UTC+3",name:"UTC+3"},{value:"UTC+4",name:"UTC+4"},{value:"UTC+5",name:"UTC+5"},{value:"UTC+6",name:"UTC+6"},{value:"UTC+7",name:"UTC+7"},{value:"UTC+8",name:"UTC+8"},{value:"UTC+9",name:"UTC+9"},{value:"UTC+10",name:"UTC+10"},{value:"UTC+11",name:"UTC+11"},{value:"UTC+12",name:"UTC+12"},{value:"UTC+13",name:"UTC+13"},{value:"UTC+14",name:"UTC+14"}]}]}}}),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer",{url:"/motiondialer",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:16}}})}]),angular.module("xCallyShuttleApp").controller("MotionDialerProcessListCtrl",["$scope","$uibModal","$translate","xAlert","Modal","MotionDialerProcess","uiGridConstants","usSpinnerService",function(a,b,c,d,e,f,g,h){a.initView=function(){return a.gridOptions={paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!0,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,columnDefs:[{name:"id",width:60},{name:"name"},{name:"queue",enableSorting:!1},{name:"extension",enableSorting:!1},{name:"id_list",enableSorting:!1,cellTemplate:'<div><a class="btn btn-xs grey-cascade" href="/motiondialer/lists/view/{{row.entity.id_list}}/settings">{{row.entity.id_list}}</a></div>',cellClass:"ui-grid-vcenter"},{name:"status",cellTemplate:"<div><a class=\"btn btn-xs\" data-ng-class=\"row.entity.status == 'STOP' ? 'red-sunglo' : 'green-meadow'\" data-ng-href=\"#\">{{ (row.entity.status === 'RUN') ? 'RUNNING' : 'STOPPED'}}</a></div>",cellClass:"ui-grid-vcenter",filter:{type:g.filter.SELECT,selectOptions:[{value:"RUN",label:"RUNNING"},{value:"STOP",label:"STOPPED"}]}},{name:"updatedtime",sort:{direction:g.DESC},enableFiltering:!1},{name:"action",cellTemplate:'<div><a class="btn btn-xs blue-hoki" href="/motiondialer/processes/view/{{row.entity.id}}/overview"><i class="icon-settings"></i></a><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteItem(row.entity.name, row.entity.id)"><i class="icon-trash"></i></a></div>',enableSorting:!1,cellClass:"ui-grid-vcenter",enableFiltering:!1}]},f.list({page:1,size:6e5}).$promise.then(function(b){console.log(b),b.status>0?a.gridOptions.data=b.response.RMI.rows:d.show("Please, check your connection!","danger")})["catch"](function(a){d.error(a)})["finally"](function(){h.stop("spinner-grid")})},a.createProcessQueue=function(){var c=b.open({animation:!0,templateUrl:"app/motiondialer/process/list/list.create.queue.modal.html",controller:"MotionDialerProcessListCreateQueueCtrl"});c.result.then(function(b){a.gridOptions.data.push(b.response.RMI)})},a.createProcessSquare=function(){var c=b.open({animation:!0,templateUrl:"app/motiondialer/process/list/list.create.square.modal.html",controller:"MotionDialerProcessListCreateSquareCtrl"});c.result.then(function(b){a.gridOptions.data.push(b.response.RMI)})},a.deleteItem=e.confirm["delete"](function(b){return f["delete"]({id:b}).$promise.then(function(e){e.status>0?(_.remove(a.gridOptions.data,{id:b}),d.show(c.instant("MESSAGE_WELL_DONE"),"success")):d.show(e.message||"Please, check your connection!","danger")})["catch"](function(a){d.error(a)})})}]),angular.module("xCallyShuttleApp").controller("MotionDialerProcessListCreateQueueCtrl",["$scope","$translate","$uibModalInstance","MotionDialerProcess","MotionDialerList","Trunk","VoiceQueue","Route","xAlert",function(a,b,c,d,e,f,g,h,i){a.form={},a.item={fetch_sort:"ASC",timeout:3},a.initModal=function(){return g.get().$promise.then(function(b){return a.queues={},b&&(a.queues=b.rows),f.get().$promise}).then(function(b){return a.trunks={},b&&(a.trunks=b.rows),a.trunks.push({name:"fake"}),e.list({page:1,size:6e5}).$promise}).then(function(b){a.lists={},b.status>0?a.lists=b.response.RMI.rows:i.show("Please, check your connection!","danger")})["catch"](function(a){i.error(a)})},a.save=function(){console.log(a.item);var e="_process_"+a.item.name+Math.round(1e5*Math.random()),f="Generated by Motion Dialer, Process Queue"+(a.item.description?", "+a.item.description:"");return h.save({appdata:"Internal Call",context:"from-sip",exten:e.replace(/\s/g,"_"),type:"internal",description:f,Applications:[{appdata:["CDR(type)=tigerdial"],app:"Set",interval:"*,*,*,*",type:"internal"},{appdata:["QUEUE_PRIO=99"],app:"Set",interval:"*,*,*,*",type:"internal"},{appdata:["CALLERID(name)=${AUTODIAL_NAME}"],app:"Set",interval:"*,*,*,*",type:"internal"},{appdata:["CALLERID(num)=${AUTODIAL_PHONE}"],app:"Set",interval:"*,*,*,*",type:"internal"},{appdata:[a.item.queue.name,"","","",a.item.timeout],app:"Queue",interval:"*,*,*,*",type:"internal"}]}).$promise.then(function(b){return d.insert({name:a.item.name,id_list:a.item.list.id,queue:a.item.queue.name,device:a.item.device.name,context:"from-sip",extension:e.replace(/\s/g,"_"),description:a.item.description,auto_closed:!0,fetch_sort:a.item.fetch_sort,hooks:[{target:"http://localhost:9000/api/report/integrations/tdDisposal",type:"http",http_method:"POST",json:"true",event:"hangup"}]}).$promise}).then(function(a){a.status>0?(i.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)):i.show(a.message||"Please, check your connection!","danger")})["catch"](function(a){i.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").controller("MotionDialerProcessListCreateSquareCtrl",["$scope","$translate","$uibModalInstance","MotionDialerProcess","MotionDialerList","SquareProject","Trunk","Route","xAlert",function(a,b,c,d,e,f,g,h,i){a.form={},a.item={fetch_sort:"ASC"},a.initModal=function(){return f.get().$promise.then(function(b){return a.projects={},b&&(a.projects=b.rows),g.get().$promise}).then(function(b){return a.trunks={},b&&(a.trunks=b.rows),a.trunks.push({name:"fake"}),e.list({page:1,size:6e5}).$promise}).then(function(b){a.lists={},b.status>0?a.lists=b.response.RMI.rows:i.show("Please, check your connection!","danger")})["catch"](function(a){i.error(a)})},a.save=function(){console.log(a.item);var e="_process_"+a.item.name+Math.round(1e5*Math.random()),f="Generated by Motion Dialer, Process Square"+(a.item.description?", "+a.item.description:"");return h.save({appdata:"Internal Call",context:"from-sip",exten:e.replace(/\s/g,"_"),type:"internal",description:f,Applications:[{appdata:["CDR(type)=tigerdial"],app:"Set",interval:"*,*,*,*",type:"internal"},{appdata:["agi://127.0.0.1/square",a.item.project.name],app:"AGI",interval:"*,*,*,*",type:"internal"}]}).$promise.then(function(b){return d.insert({name:a.item.name,id_list:a.item.list.id,queue:"none",device:a.item.device.name,context:"from-sip",extension:e.replace(/\s/g,"_"),description:a.item.description,auto_closed:!0,channel_limit:15,fetch_sort:a.item.fetch_sort}).$promise}).then(function(a){a.status>0?(i.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)):i.show(a.message||"Please, check your connection!","danger")})["catch"](function(a){i.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.processes.list",{url:"/list",templateUrl:"app/motiondialer/process/list/list.html",controller:"MotionDialerProcessListCtrl",authenticate:!0})}]),angular.module("xCallyShuttleApp").factory("MotionDialerProcess",["$resource",function(a){return a("/api/rest/process/:controller",null,{list:{method:"POST",params:{controller:"list"}},insert:{method:"POST",params:{controller:"insert"}},"delete":{method:"POST",params:{controller:"delete"}},find:{method:"POST",params:{controller:"find"}},update:{method:"POST",params:{controller:"update"}}})}]),angular.module("xCallyShuttleApp").factory("MotionDialerSpooler",["$resource",function(a){return a("/api/rest/spooler/:controller/:retrieve/:peer",null,{list:{method:"POST",params:{controller:"list"}},"delete":{method:"POST",params:{controller:"delete"}},find:{method:"POST",params:{controller:"find"}},summary:{method:"POST",params:{controller:"summary"}},close:{method:"POST",params:{controller:"retrieve",retrieve:"close"}},open:{method:"POST",params:{controller:"retrieve",retrieve:"open"}},blacklist:{method:"POST",params:{controller:"retrieve",retrieve:"blacklist"}},planning:{method:"POST",params:{controller:"retrieve",retrieve:"planning"}},planningpeer:{method:"POST",params:{controller:"retrieve",retrieve:"planning",peer:"peer"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.processes",{url:"/processes",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("MotionDialerProcessViewCtrl",["$scope","$translate","$stateParams","$uibModal","xAlert","uiGridConstants","usSpinnerService","MotionDialerProcess","MotionDialerSpooler","Modal","VoiceQueue",function(a,b,c,d,e,f,g,h,i,j,k){a.process={},a.techs=["SIP","IAX","LOCAL","KHOMP"],a.dialFormats=["tech/device/number","tech/number@device"],a.checkDuplicates=["ALWAYS","IFOPEN","NO"],a.codecs=["g729","ilbc","gsm","ulaw","alaw"],a.getProcess=function(){return h.find({id:parseInt(c.id)}).$promise.then(function(b){console.log(b),b.status>0?(b.response.RMI.codecs=b.response.RMI.codecs.split(","),a.process=b.response.RMI,a.process.hooks&&a.process.hooks.length?a.process.disposal=!0:a.process.disposal=!1):e.show(b.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})},a.getSummary=function(){return i.summary({id_process:parseInt(c.id)}).$promise.then(function(b){if(b.status>0){a.summary=b.response.RMI.totals,a.total=0;for(var c=0;c<a.summary.length;c++)a.total+=a.summary[c][1]}else e.show(b.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})["finally"](function(){g.stop("spinner-grid")})},a.updateProcess=function(){var c=_.clone(a.process);return delete c.updatedtime,delete c.id_list,delete c.createdtime,delete c.runtime,delete c.fetch_sort,c.codecs=c.codecs.join(","),""===c.timezone&&delete c.timezone,c.disposal?c.hooks=[{target:"http://localhost:9000/api/report/integrations/tdDisposal",type:"http",http_method:"POST",json:"true",event:"hangup"}]:c.hooks=[],delete c.disposal,h.update(c).$promise.then(function(c){c.status>0?(c.response.RMI.codecs=c.response.RMI.codecs.split(","),a.process=c.response.RMI,a.process.hooks&&a.process.hooks.length?a.process.disposal=!0:a.process.disposal=!1,e.show(b.instant("MESSAGE_WELL_DONE"),"success")):c.response.RMI.errors.forEach(function(a){a?e.show(a.field+": "+a.error,"danger"):e.show("Please, check your connection!","danger")})})["catch"](function(a){e.error(a)})},a.getSpooler=function(){return g.spin("spinner-grid"),a.gridOptions||(a.gridOptions={paginationPageSizes:[10,25,50,75],paginationPageSize:10,enableFiltering:!0,enableSorting:!0,enableGridMenu:!0,flatEntityAccess:!0,showGridFooter:!0,fastWatch:!0,headerCellFilter:"translate",columnDefs:[{name:"name"},{name:"phones",cellTemplate:"<div>{{row.entity.phones.join(',')}}</div>",cellClass:"ui-grid-vcenter"},{name:"retrieve",displayName:"APPLICATION_STATUS",headerCellFilter:"translate",filter:{type:f.filter.SELECT,selectOptions:[{value:"PLANNED_PEER",label:"PLANNED PEER"},{value:"PLANNED",label:"PLANNED"},{value:"BLACK_LIST",label:"BLACKLIST"},{value:"OPEN",label:"OPEN"},{value:"CLOSED",label:"CLOSED"},{value:"MAX_ATTEMPTS",label:"MAX ATTEMPTS"},{value:"COUNTER_BLOCK",label:"COUNTER BLOCK"},{value:"PLANNED_REQUEST",label:"PLANNED REQUEST"},{value:"DELETE",label:"DELETE"}]}},{name:"counter",enableFiltering:!1},{name:"planningtime",cellTemplate:"<div>{{row.entity.planningtime | date:'yyyy-MM-dd HH:mm'}}</div>",cellClass:"ui-grid-vcenter",enableFiltering:!1},{name:"action",cellTemplate:'<div><a class="btn btn-xs green" data-ng-click="grid.appScope.historySpooler(row.entity.history)"><i class="icon-info"></i></a> <a class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.editSpooler(row.entity)"><i class="icon-settings"></i></a> <a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteSpooler(row.entity.phones.join(), row.entity.id)"><i class="fa fa-trash"></i></a></div>',enableSorting:!1,cellClass:"ui-grid-vcenter",enableFiltering:!1}]}),i.list({id_process:parseInt(c.id),page:1,size:6e5}).$promise.then(function(b){b.status>0?a.gridOptions.data=b.response.RMI.rows:e.show(b.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})["finally"](function(){g.stop("spinner-grid")})},a.deleteSpooler=j.confirm["delete"](function(c){return i["delete"]({id:c}).$promise.then(function(d){d.status>0?(_.remove(a.gridOptions.data,{id:c}),e.show(b.instant("MESSAGE_WELL_DONE"),"success")):e.show(d.message||"Please, check your connection!","danger")})["catch"](function(a){e.error(a)})}),a.historySpooler=function(b){var c=d.open({animation:!0,templateUrl:"app/motiondialer/process/view/view.spooler.history.modal.html",controller:"MotionDialerViewSpoolerHistoryCtrl",resolve:{historySpooler:function(){return b}}});c.result.then(function(b){a.gridOptions.data.push(b.response.RMI)})},a.editSpooler=function(a){var b=d.open({animation:!0,templateUrl:"app/motiondialer/process/view/view.spooler.edit.modal.html",controller:"MotionDialerViewSpoolerEditCtrl",resolve:{entitySpooler:function(){return a}}});b.result.then(function(){})},a.initSettings=function(){return a.queues=null,k.get().$promise.then(function(b){b&&(a.queues=b.rows)})["catch"](function(a){e.error(a)})},a.createInterval=function(b){var c=d.open({animation:!0,templateUrl:"app/motiondialer/process/view/view.create.interval.modal.html",controller:"MotionDialerViewCreateIntervalCtrl",resolve:{objectProcess:function(){return a.process},intervalType:function(){return b},intervalValue:function(){return b?"8:00-20:00|MON-FRI|*|*":"00:01-07:59|SAT-SUN|*|*"}}});c.result.then(function(b){a.process=b})},a.editInterval=function(b,c){var e=d.open({animation:!0,templateUrl:"app/motiondialer/process/view/view.create.interval.modal.html",controller:"MotionDialerViewCreateIntervalCtrl",resolve:{objectProcess:function(){return a.process},intervalType:function(){return b},intervalValue:function(){return c}}});e.result.then(function(b){a.process=b})},a.deleteInterval=j.confirm["delete"](function(c,d){var f={id:a.process.id};return d?(f.intervals=[],f.intervals=f.intervals.concat(a.process.intervals),f.intervals.splice(c,1)):(f.not_intervals=[],f.not_intervals=f.not_intervals.concat(a.process.not_intervals),f.not_intervals.splice(c,1)),h.update(f).$promise.then(function(c){c.status>0?(c.response.RMI.codecs=c.response.RMI.codecs.split(","),a.process=c.response.RMI,e.show(b.instant("MESSAGE_WELL_DONE"),"success")):c.response.RMI.errors.forEach(function(a){a?e.show(a.field+": "+a.error,"danger"):e.show("Please, check your connection!","danger")})})["catch"](function(a){e.error(a)})}),a.runOrStop=function(){var b=d.open({animation:!0,templateUrl:"app/motiondialer/process/view/view.run.process.modal.html",controller:"MotionDialerViewRunProcessCtrl",resolve:{statusProcess:function(){return a.process.status}}});b.result.then(function(b){a.process.status=b.status})}}]),angular.module("xCallyShuttleApp").controller("MotionDialerViewCreateIntervalCtrl",["$scope","$translate","$uibModalInstance","$stateParams","MotionDialerProcess","xAlert","objectProcess","intervalType","intervalValue","interval",function(a,b,c,d,e,f,g,h,i,j){function k(a){var b,c=a.split("|"),d={};return c.forEach(function(a,c){switch(c){case 0:"*"!==a?(b=a.split("-"),d.t_from=moment(b[0],"HH:mm"),d.t_to=moment(b[1],"HH:mm"),d.alwaysTime=!1):(d.t_from=moment(new Date),d.t_to=moment(new Date),d.alwaysTime=!0);break;case 1:"*"!==a?(b=a.split("-"),d.wd_from=b[0].toLowerCase(),d.wd_to=b[1]?b[1].toLowerCase():"always"):(d.wd_from="always",d.wd_to="always");break;case 2:"*"!==a?(b=a.split("-"),d.md_from=b[0],d.md_to=b[1]?b[1]:"always"):(d.md_from="always",d.md_to="always");break;case 3:"*"!==a?(b=a.split("-"),d.m_from=b[0],d.m_to=b[1]?b[1]:"always"):(d.m_from="always",d.m_to="always")}}),d}function l(a){var b,c,d,e;return b=a.t_from&&a.t_to&&!a.alwaysTime?moment(a.t_from).format("HH:mm")+"-"+moment(a.t_to).format("HH:mm"):"*",a.wd_from&&"always"!==a.wd_from?(c=a.wd_from.toUpperCase(),a.wd_to&&"always"!==a.wd_to&&(c+="-"+a.wd_to.toUpperCase())):c="*",a.md_from&&"always"!==a.md_from?(d=a.md_from,a.md_to&&"always"!==a.md_to&&(d+="-"+a.md_to)):d="*",a.m_from&&"always"!==a.m_from?(e=a.m_from,a.m_to&&"always"!==a.m_to&&(e+="-"+a.m_to)):e="*",b+"|"+c+"|"+d+"|"+e}a.form={},a.$interval=j.interval,a.splittedInterval=k(i),a.save=function(){var d=l(a.splittedInterval);console.log(d);var i={id:g.id};return h?(i.intervals=[],i.intervals=i.intervals.concat(g.intervals),i.intervals.push(d)):(i.not_intervals=[],
+i.not_intervals=i.not_intervals.concat(g.not_intervals),i.not_intervals.push(d)),console.log(i),e.update(i).$promise.then(function(a){a.status>0?(a.response.RMI.codecs=a.response.RMI.codecs.split(","),f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a.response.RMI)):a.response.RMI.errors.forEach(function(a){a?f.show(a.field+": "+a.error,"danger"):f.show("Please, check your connection!","danger")})})["catch"](function(a){f.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.motiondialer.processes.view",{url:"/view/:id",templateUrl:"app/motiondialer/process/view/view.html",controller:"MotionDialerProcessViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.motiondialer.processes.view.overview",{url:"/overview",templateUrl:"app/motiondialer/process/view/view.overview.html"}).state("main.motiondialer.processes.view.settings",{url:"/settings",templateUrl:"app/motiondialer/process/view/view.settings.html"}).state("main.motiondialer.processes.view.intervals",{url:"/intervals",templateUrl:"app/motiondialer/process/view/view.intervals.html"}).state("main.motiondialer.processes.view.spooler",{url:"/spooler",templateUrl:"app/motiondialer/process/view/view.spooler.html"})}]),angular.module("xCallyShuttleApp").controller("MotionDialerViewRunProcessCtrl",["$scope","$stateParams","$uibModalInstance","$translate","statusProcess","MotionDialerProcess","xAlert",function(a,b,c,d,e,f,g){a.status="RUN"===e?"STOP":"RUN",a.yes=function(){f.update({id:parseInt(b.id),status:a.status}).$promise.then(function(a){a.status>0?(g.show(d.instant("MESSAGE_WELL_DONE"),"success"),c.close(a.response.RMI)):g.show(a.message||"Please, check your connection!","danger")})["catch"](function(a){g.error(a)})},a.no=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").controller("MotionDialerViewSpoolerEditCtrl",["$scope","$translate","$uibModalInstance","$stateParams","MotionDialerSpooler","xAlert","entitySpooler","Agent",function(a,b,c,d,e,f,g,h){a.moment=moment,a.initModal=function(){return h.get().$promise.then(function(b){a.agents=[],b&&b.rows.forEach(function(b){a.agents.push("SIP/"+b.name)})})["catch"](function(a){f.error(a)})},a.entitySpooler=g,a.save=function(){var d;switch(a.entitySpooler.retrieve){case"CLOSED":d=e.close({id:parseInt(a.entitySpooler.id)});break;case"OPEN":d=e.open({id:parseInt(a.entitySpooler.id)});break;case"BLACK_LIST":d=e.blacklist({id:parseInt(a.entitySpooler.id)});break;case"PLANNED":d=e.planning({id:parseInt(a.entitySpooler.id),date:moment(a.entitySpooler.planningtime).format("YYYY-MM-DD HH:mm")});break;case"PLANNED_PEER":d=e.planningpeer({id:parseInt(a.entitySpooler.id),date:moment(a.entitySpooler.planningtime).format("YYYY-MM-DD HH:mm"),peer:a.entitySpooler.planningpeer})}d?d.$promise.then(function(a){console.log(a),a.status>0?(f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close()):a.response.RMI.errors.forEach(function(a){a?f.show(a.field+": "+a.error,"danger"):f.show("Please, check your connection!","danger")})})["catch"](function(a){f.error(a)}):f.show("RETRIEVE NOT FOUND","danger")},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").controller("MotionDialerViewSpoolerHistoryCtrl",["$scope","$translate","$uibModalInstance","$stateParams","MotionDialerSpooler","xAlert","historySpooler",function(a,b,c,d,e,f,g){a.historySpooler=g,a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").factory("ReportMotionDialer",["$resource",function(a){return a("/api/report/motiondialer/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("ResetCtrl",["$scope","Auth","$location","$window","$rootScope","Setting","xAlert","$stateParams","$state",function(a,b,c,d,e,f,g,h,i){a.userReset={},a.getInfo=function(){return f.get({controller:"info"}).$promise.then(function(b){a.info=b})["catch"](function(a){console.error(a)})},e.bodyLayout="login",a.$on("$viewContentLoaded",function(){Metronic.init(),Layout.init()}),a.reset=function(){b.reset({token:h.token,password:a.userReset.password}).then(function(){i.go("login",{reset:!0})})["catch"](function(a){g.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("reset",{url:"/reset/:token",templateUrl:"app/reset/reset.html",controller:"ResetCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/login.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("SalesforceListCtrl",["$scope","SalesforceAccount","gridOptions","xAlert","$translate",function(a,b,c,d,e){a.initView=function(){var d={exporterCsvFilename:"salesforce_account.csv",columnDefs:[{name:"name",displayName:"APPLICATION_NAME"},{name:"username"},{name:"remoteUri",displayName:"APPLICATION_URI"},{name:"action",buttons:[{"class":"blue-hoki",href:"/salesforce/view/{{row.entity.id}}/account",name:"profile"},{"class":"green-jungle",name:"check",onClick:"grid.appScope.checkAccount(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.checkAccount=function(a){return b.check({id:a}).$promise.then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce.list",{url:"/list",templateUrl:"app/salesforce/list/list.html",controller:"SalesforceListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("SalesforceAccount",["$resource",function(a){return a("/api/salesforce/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"},fields:{params:{controller:"fields"},isArray:!0},check:{params:{controller:"check"}}})}]).factory("SalesforceConfiguration",["$resource",function(a){return a("/api/salesforce/accounts/:accountId/configurations/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]).factory("SalesforceField",["$resource",function(a){return a("/api/salesforce/accounts/:accountId/configurations/:configurationId/fields/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce",{url:"/salesforce",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce.view.configurations",{url:"/configurations",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("SalesforceViewConfigurationListCtrl",["$scope","$stateParams","$translate","gridOptions","SalesforceConfiguration","$uibModal",function(a,b,c,d,e,f){a.initView=function(){var c={exporterCsvFilename:"salesforce_configurations.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/salesforce/view/{{row.entity.AccountId}}/configurations/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(e,c,a,{accountId:b.id})},a.createItem=function(){var b=f.open({animation:!0,templateUrl:"app/salesforce/view/configuration/list/create.modal.html",controller:"SalesforceCreateConfigurationCtrl"});b.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("SalesforceCreateConfigurationCtrl",["$scope","$translate","$uibModalInstance","SalesforceConfiguration","xAlert","$stateParams","channel",function(a,b,c,d,e,f,g){a.form={},a.item={},a.channels=g,a.item.channel="voice",a.item.type="Queue",a.save=function(){return d.save({accountId:f.id},a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce.view.configurations.list",{url:"/list",templateUrl:"app/salesforce/view/configuration/list/list.html",controller:"SalesforceViewConfigurationListCtrl"})}]),angular.module("xCallyShuttleApp").controller("SalesforceViewConfigurationViewCtrl",["$scope","$filter","$stateParams","$translate","socket","variable","xAlert","SalesforceAccount","SalesforceConfiguration","SalesforceField","Variable",function(a,b,c,d,e,f,g,h,i,j,k){a.$on("$destroy",function(){e.unsyncUpdates("salesforce_field")}),a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:300,scrollInertia:0},a.fieldType=[{type:"string",title:"String"},{type:"variable",title:"Variable"},{type:"customVariable",title:"Custom Variable"}],a.descFieldType=[{type:"string",title:"String"},{type:"keyValue",title:"Key Value"}],a.groupVariableByGroup=function(a){switch(a.group){case"voice_queue":return"Voice: Queue";default:return"Other"}},a.initView=function(){a.configurationName="",a.subjectConfig=[],a.descriptionConfig=[],a.fieldConfig=[],a.variables=f},a.getConfiguration=function(){return i.get({accountId:c.id,id:c.configurationId}).$promise.then(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,e.socket.on("salesforce_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})})["catch"](function(a){g.error(a)})},a.getCustomVariables=function(){return k.get().$promise.then(function(b){a.customVariables=b.rows})["catch"](function(a){g.error(a)})},a.getFields=function(){return h.fields({id:c.id}).$promise.then(function(c){a.accountFields=_.sortByOrder(b("salesforce")(c),"name","asc"),console.log(a.accountFields)})["catch"](function(a){g.error(a)})},a.addItem=function(b){var d={};switch(b){case"subject":case"description":d={type:"string",content:""};break;case"field":d={content:""}}return i.save({accountId:c.id,id:c.configurationId,controller:b},d).$promise.then(function(c){switch(b){case"subject":a.subjectConfig.push(c);break;case"description":a.descriptionConfig.push(c);break;case"field":a.fieldConfig.push(c)}})["catch"](function(a){g.error(a)})},a.changeType=function(b){"variable"===b.type?(b.content="",b.variableName=""):"string"===b.type?(b.VariableId=null,b.variableName=""):"customVariable"===b.type&&(b.VariableId=null,b.content=""),a.updateField(b)},a.updateField=function(a){return j.update({accountId:c.id,configurationId:c.configurationId,id:a.id},a).$promise.then(function(){})["catch"](function(a){g.error(a)})},a.removeItem=function(a){return j["delete"]({accountId:c.id,configurationId:c.configurationId,id:a.id}).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){g.error(a)})},a.changeDescType=function(b){"keyValue"===b.type?(b.content="","string"===b.keyType?(b.VariableId=null,b.variableName=""):"variable"===b.keyType?(b.keyContent="",b.VariableId=null):"customVariable"===b.keyType&&(b.keyContent="",b.variableName="")):"string"===b.type&&(b.VariableId=null,b.variableName="",b.key="",b.keyContent=""),a.updateField(b)},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"name",b);if(c)switch(c.type){case"picklist":return c.picklistValues;default:return}}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce.view.configurations.view",{url:"/view/:configurationId",templateUrl:"app/salesforce/view/configuration/view/view.html",controller:"SalesforceViewConfigurationViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("SalesforceViewCtrl",["$scope","$http","$stateParams","$translate","$location","WizardHandler","socket","xAlert","Modal","$filter","SalesforceAccount",function(a,b,c,d,e,f,g,h,i,j,k){a.initView=function(){return k.get({id:c.id}).$promise.then(function(b){a.account=b})["catch"](function(a){h.error(a)})},a.updateItem=function(){return k.update({id:c.id},a.account).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE")+".","success")})["catch"](function(a){h.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce.view",{url:"/view/:id",templateUrl:"app/salesforce/view/view.html",controller:"SalesforceViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.salesforce.view.account",{url:"/account",templateUrl:"app/salesforce/view/view.account.html"})}]),angular.module("xCallyShuttleApp").controller("SalesforceWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler",function(a,b,c,d,e,f){a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={},a.item.serverUrl=c.protocol()+"://"+location.host},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){console.log(a.item),b.post("api/salesforce/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/salesforce/list")}).error(function(a){e.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.salesforce.wizard",{url:"/wizard",templateUrl:"app/salesforce/wizard/wizard.html",controller:"SalesforceWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.customization",{url:"/customization",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("CustomizationGeneralViewCtrl",["$scope","gridOptions","$uibModal","FileUploader","$cookieStore","xAlert","$translate","Setting","$rootScope",function(a,b,c,d,e,f,g,h,i){a.radioSwitch={isActive:!!i.license.custom,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"};var j=a.uploader=new d({url:"api/settings/logo/main",queueLimit:1,withCredentials:!0,headers:{Authorization:"Bearer "+e.get("token")}});j.filters.push({name:"imageFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|jpg|png|jpeg|".indexOf(b)}}),j.onSuccessItem=function(a,b){i.settings.logo=b.logo,f.show(g.instant("MESSAGE_WELL_DONE"),"success")},j.onErrorItem=function(){f.show(g.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},j.onCompleteAll=function(){j.clearQueue()};var k=a.uploader2=new d({url:"api/settings/logo/login",queueLimit:1,withCredentials:!0,headers:{Authorization:"Bearer "+e.get("token")}});k.filters.push({name:"imageFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|jpg|png|jpeg|".indexOf(b)}}),k.onSuccessItem=function(a,b){f.show(g.instant("MESSAGE_WELL_DONE"),"success")},k.onErrorItem=function(){f.show(g.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},k.onCompleteAll=function(){k.clearQueue()},a.initView=function(){return h.get({id:1}).$promise.then(function(b){a.settings={defaultLogo:b.defaultLogo,defaultLoginLogo:b.defaultLoginLogo,footerWhiteLabel:b.footerWhiteLabel,defaultFooterWhiteLabel:b.defaultFooterWhiteLabel}})["catch"](function(a){f.error(a)})},a.update=function(){return h.update({id:1},a.settings).$promise.then(function(b){_.merge(i.settings,a.settings),f.show(g.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.customization.view.general",{url:"/general",templateUrl:"app/setting/customization/view/general/general.html",controller:"CustomizationGeneralViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/scripts/jquery.sparkline.min.js","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js","assets/scripts/profile.js"]})}]}})}]),angular.module("xCallyShuttleApp").controller("CustomizationViewCtrl",["$scope",function(a){}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.customization.view",{url:"/view",templateUrl:"app/setting/customization/view/view.html",controller:"CustomizationViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.general",{url:"/general",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("GeneralMainViewCtrl",["$scope","xAlert","$translate","Setting",function(a,b,c,d){a.initView=function(){return d.get({id:1}).$promise.then(function(b){a.settings={agi_port:b.agi_port,min_internal:b.min_internal,min_mailbox:b.min_mailbox,securePassword:b.securePassword}})["catch"](function(a){b.error(a)})},a.update=function(){return d.update({id:1},a.settings).$promise.then(function(a){b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){b.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.general.view.main",{url:"/main",templateUrl:"app/setting/general/view/main/main.html",controller:"GeneralMainViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("GeneralViewCtrl",["$scope",function(a){}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.general.view",{url:"/view",templateUrl:"app/setting/general/view/view.html",controller:"GeneralViewCtrl"})}]),angular.module("xCallyShuttleApp").factory("License",["$resource",function(a){return a("/api/licenses/:id/:controller",{id:"@id"},{request:{method:"POST",params:{id:"request"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.license",{url:"/license",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("LicenseUpdateCtrl",["$scope","$translate","$uibModalInstance","xAlert","Setting",function(a,b,c,d,e){a.form={},a.item={},a.getLicense=function(){return e.get({id:1}).$promise.then(function(b){a.item.license=b.license})["catch"](function(a){d.error(a)})},a.update=function(){return e.update({id:1},a.item).$promise.then(function(a){d.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){d.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").controller("LicenseViewCtrl",["$scope","$rootScope","$translate","License","xAlert","$window","$uibModal",function(a,b,c,d,e,f,g){a.radioSwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.initView=function(){return d.get(function(b){a.item=b.license})},a.submitRequest=function(){return d.request(a.item,function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")},function(a){switch(a.status){case 304:e.show(a.statusText,"info");break;default:e.error(a)}})},a.updateLicense=function(){var a=g.open({animation:!0,templateUrl:"app/setting/license/view/update.modal.html",controller:"LicenseUpdateCtrl"});a.result.then(function(){f.location.reload()})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.license.view",{url:"/view",templateUrl:"app/setting/license/view/view.html",controller:"LicenseViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/pricing-tables.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("Externip",["$resource",function(a){return a("/api/network/externips/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("Localnet",["$resource",function(a){return a("/api/network/localnets/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.network",{url:"/network",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ExternipCtrl",["$scope","$uibModal","gridOptions","Externip",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"network_externip.csv",columnDefs:[{name:"value"},{name:"action",buttons:[{"class":"blue-hoki",onClick:"grid.appScope.createItem(row.entity)",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(d,b,a)},a.createItem=function(c){var d=b.open({animation:!0,templateUrl:"app/setting/network/view/externip/externip.create.modal.html",controller:"ExternipCreateCtrl",resolve:{item:c}});d.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("ExternipCreateCtrl",["$scope","$translate","$uibModalInstance","$stateParams","Externip","xAlert","item",function(a,b,c,d,e,f,g){a.initModal=function(){a.form={},a.item=g||{},a.title=g?b.instant("APPLICATION_EDIT_EXTERNIP"):b.instant("APPLICATION_NEW_EXTERNIP")},a.save=function(){return g?e.update({id:a.item.id},a.item).$promise.then(function(a){f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){f.error(a)}):e.save({},a.item).$promise.then(function(a){f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){f.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.network.view.externip",{url:"/externip",templateUrl:"app/setting/network/view/externip/externip.html",controller:"ExternipCtrl"})}]),angular.module("xCallyShuttleApp").controller("LocalnetCtrl",["$scope","gridOptions","Localnet","$uibModal",function(a,b,c,d){a.initView=function(){var d={exporterCsvFilename:"network_localnet.csv",columnDefs:[{name:"value"},{name:"action",buttons:[{"class":"blue-hoki",onClick:"grid.appScope.createItem(row.entity)",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=b.gridOptions(c,d,a)},a.createItem=function(b){var c=d.open({animation:!0,templateUrl:"app/setting/network/view/localnet/localnet.create.modal.html",controller:"LocalnetCreateCtrl",resolve:{item:b}});c.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("LocalnetCreateCtrl",["$scope","$translate","$uibModalInstance","$stateParams","Localnet","xAlert","item",function(a,b,c,d,e,f,g){a.initModal=function(){if(a.form={},a.item=g||{},a.title=g?b.instant("APPLICATION_EDIT_LOCALNET"):b.instant("APPLICATION_NEW_LOCALNET"),g&&g.value){var c=a.item.value.split("/");c.length>1&&(a.item.address=c[0],a.item.mask=c[1])}},a.save=function(){var d=a.item.address+"/"+a.item.mask;return g?e.update({id:a.item.id},{value:d}).$promise.then(function(a){f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){f.error(a)}):e.save({},{value:d}).$promise.then(function(a){f.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){f.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.network.view.localnet",{url:"/localnet",templateUrl:"app/setting/network/view/localnet/localnet.html",controller:"LocalnetCtrl"})}]),angular.module("xCallyShuttleApp").controller("NetworkViewCtrl",function(){}),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.network.view",{url:"/view",templateUrl:"app/setting/network/view/view.html",controller:"NetworkViewCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting",{url:"/setting",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:18}}})}]),angular.module("xCallyShuttleApp").factory("Setting",["$resource",function(a){return a("/api/settings/:id/:controller/:param",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("Smtp",["$resource",function(a){return a("/api/mail/servers/out/:id/:controller/:controller2",{id:"@id"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.smtp",{url:"/smtp",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("SmtpViewCtrl",["$scope","$stateParams","$translate","socket","MailServerOut","Setting","MailAccount","xAlert",function(a,b,c,d,e,f,g,h){a.initView=function(){return a.smtpDisabled=!1,a.isActive=!0,a.size="small",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.CONST_TIMEOUT=3e4,a.item={account:{service:!0,MailServerOut:{ssl:!1}}},a.$on("$destroy",function(){d.socket.removeAllListeners("mail_server_out:state")}),d.socket.on("mail_server_out:state",function(b){a.item&&Number(b.id)===a.item.account.MailServerOut.id&&(a.item.account.MailServerOut.state=b.state,a.item.account.MailServerOut.source=JSON.parse(b.source))}),f.get({id:"smtp"}).$promise.then(function(b){a.item.account=b})["catch"](function(b){switch(b.status){case 404:a.item.account.name=null,a.item.account.address=null,a.item.account.MailServerOut={ssl:!1},h.show("Service SMTP server not configured.","info");break;default:h.error(b)}})},a.updateItem=function(){return a.item.account.id?(delete a.item.account.MailServerOut.state,delete a.item.account.MailServerOut.source,f.update({id:"smtp",controller:a.item.account.id},a.item.account).$promise.then(function(){h.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})):f.save({id:"smtp"},{description:"Custom Account",name:a.item.account.name,address:a.item.account.address,service:a.item.account.service,custom:!0,MailServerOut:a.item.account.MailServerOut}).$promise.then(function(b){a.item.account=b,h.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})},a.test=function(){return e.get({id:a.item.account.MailServerOut.id,controller:"test"}).$promise["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.smtp.view",{url:"/view",templateUrl:"app/setting/smtp/view/view.html",controller:"SmtpViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.system",{url:"/system",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("SystemViewConsoleCtrl",["$scope","Setting","xAlert","usSpinnerService","$timeout","$translate","socket",function(a,b,c,d,e,f,g){function h(b){var c=_.findIndex(a.commandHistory.commands,function(a){return a===b});-1!==c&&a.commandHistory.commands.splice(c,1),a.commandHistory.commands.unshift(b)}a.output="<b>"+f.instant("APPLICATION_CONSOLE_WELCOME")+"</b><br/>",a.item={command:""},a.commandHistory={commands:[],index:-1},a.busy=!1,a.cmdFocus=function(){e(function(){angular.element("#command").trigger("focus")})},a.sendCmd=function(){return a.commandHistory.index=-1,a.tmp=a.item.command,a.item.command="",a.output+="<b>motion*CLI> "+a.tmp+"</b><br>",a.tmp?(h(a.tmp.trim()),a.busy=!0,d.spin("console-spinner"),b.save({controller:"asterisk"},{command:a.tmp}).$promise):void 0},g.socket.on("console:result",function(b){a.output+=b.content.replace(/(?:\r\n|\r|\n)/g,"<br />").replace("Response: Follows<br />Privilege: Command<br />","").replace(/ActionID: .[0-9]*<br \/>/,"").replace(/ActionID: .[0-9]*/,"")+"<br>",d.stop("console-spinner"),a.busy=!1,a.cmdFocus()}),g.socket.on("console:error",function(b){d.stop("console-spinner"),a.output+="command error:"+b.data.message+"<br>",a.busy=!1,a.cmdFocus()}),a.keyUp=function(b){switch(b.keyCode){case 40:a.commandHistory.commands[a.commandHistory.index-1]?a.item.command=a.commandHistory.commands[--a.commandHistory.index]:(a.item.command="",a.commandHistory.index=-1);break;case 38:a.commandHistory.commands[a.commandHistory.index+1]&&(a.item.command=a.commandHistory.commands[++a.commandHistory.index]);break;case 37:break;case 39:break;default:a.commandHistory.index=-1}},e(function(){angular.element("#command").trigger("focus"),d.stop("console-spinner")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.system.view.console",{url:"/console",templateUrl:"app/setting/system/view/console/console.html",controller:"SystemViewConsoleCtrl"})}]),angular.module("xCallyShuttleApp").controller("SystemViewGeneralCtrl",["$scope","$stateParams","$translate","socket","Setting","xAlert","usSpinnerService",function(a,b,c,d,e,f,g){function h(b){a.system.memory={labels:_.keys(b.memory.details),values:_.values(_.map(b.memory.details,function(a){return Math.round(a/1024)})),Total:Math.round(b.memory.Total/1024)},g.stop("memory-spinner"),a.system.disks=[],_.forEach(b.disks,function(b){a.system.disks.push({mount:b.mount,size:Number((b.size/1048576).toFixed(2)),values:_.values(_.map(b.details,function(a){return Number((a/1048576).toFixed(2))})),labels:_.keys(b.details)})}),a.system.mount=a.system.disks[0],g.stop("disk-spinner"),a.system.cpu={motion:Math.round(b.cpu.motion),cores:[]},_.forEach(b.cpu.cores,function(b){delete b.nice,delete b.irq,a.system.cpu.cores.push({labels:_.keys(b),values:_.values(b),colours:["#803690","#DCDCDC","#00ADF9"]})}),g.stop("cpu-spinner")}a.system={mount:void 0},a.initView=function(){return g.spin("memory-spinner"),g.spin("disk-spinner"),g.spin("cpu-spinner"),e.get({controller:"system"}).$promise.then(function(a){h(a)})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.system.view.general",{url:"/general",templateUrl:"app/setting/system/view/general/general.html",controller:"SystemViewGeneralCtrl"})}]),angular.module("xCallyShuttleApp").controller("SystemViewLogsCtrl",["$scope","$stateParams","$translate","socket","Setting","xAlert","usSpinnerService",function(a,b,c,d,e,f,g){a.initView=function(){return a.logs={errors:"",output:""},g.spin("logs-spinner"),e.get({controller:"logs"}).$promise.then(function(b){a.logs=b,g.stop("logs-spinner")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.system.view.logs",{url:"/logs",templateUrl:"app/setting/system/view/logs/logs.html",controller:"SystemViewLogsCtrl"})}]),angular.module("xCallyShuttleApp").controller("SystemViewCtrl",["$scope",function(a){}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.system.view",{url:"/view",templateUrl:"app/setting/system/view/view.html",controller:"SystemViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("UpdateListCtrl",["$scope","gridOptions","$uibModal","$location","Update","xAlert","$log","$translate","$state",function(a,b,c,d,e,f,g,h,i){a.initCounter=function(){a.$on("timer-stopped",function(a,b){f.show(h.instant("MESSAGE_UPDATE_COMPLETED")+'<a href="https://wiki.xcallymotion.com/display/XMD/xCally+Motion+service+manager#xCallyMotionservicemanager-pm2start|stop|restartmotion" target="_blank" style="color: blue;"> Read more</a>',"success"),
+i.go("main.setting.updates.list")})},a.initView=function(){return e.get({controller:"current"}).$promise.then(function(b){a.currentVersion=b.currentVersion,a.latestVersion=b.latestVersion})["catch"](function(a){console.log(a)})},a.pull=function(){var a=c.open({animation:!0,templateUrl:"app/setting/update/list/list.pull.html",controller:"UpdateListPullCtrl"});a.result.then(function(){return d.path("/setting/updates/landing"),e.pull().$promise.then(function(a){var b=!1;a&&(a.summary&&_.forOwn(a.summary,function(a){a&&(b=!0)}),(a.insertions&&!_.isEmpty(a.insertions)||a.deletions&&!_.isEmpty(a.deletions))&&(b=!0)),b?f.show(h.instant("MESSAGE_PULL_COMPLETED"),"success"):(f.show(h.instant("MESSAGE_NO_UPDATES"),"success"),d.path("/setting/updates/list"))})["catch"](function(a){console.log(a),f.error(a),d.path("/setting/updates/list")})},function(){g.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.updates.list",{url:"/list",templateUrl:"app/setting/update/list/list.html",controller:"UpdateListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"css",insertBefore:"#ng_load_plugins_before",files:["assets/css/pricing-table.css"]}])}]}}).state("main.setting.updates.landing",{url:"/landing",templateUrl:"app/setting/update/list/landing.html",controller:"UpdateListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"css",insertBefore:"#ng_load_plugins_before",files:["assets/css/error.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("UpdateListPullCtrl",["$scope","$uibModalInstance",function(a,b){a.modal={dismissable:!0,title:"Confirm Update",html:"Are you sure you want to update?",buttons:[{classes:"btn btn-success",text:"Update",click:function(){b.close()}},{classes:"btn default",text:"Cancel",click:function(){b.dismiss("cancel")}}]}}]),angular.module("xCallyShuttleApp").factory("Update",["$resource",function(a){return a("/api/updates/:id/:controller",{id:"@id"},{pull:{method:"GET",params:{id:"pull"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.setting.updates",{url:"/updates",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["hasUpdate"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("SquareOdbcListCtrl",["$scope","$uibModal","$translate","SquareOdbc","gridOptions","xAlert",function(a,b,c,d,e,f){a.initView=function(){var b={exporterCsvFilename:"odbc.csv",columnDefs:[{name:"name"},{name:"dsn",displayName:"APPLICATION_ODBC"},{name:"description"},{name:"action",width:250,buttons:[{"class":"blue-hoki",href:"/square/odbc/view/{{row.entity.id}}/settings",name:"settings"},{"class":"green-jungle",name:"check",onClick:"grid.appScope.checkConnection(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=e.gridOptions(d,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/square/odbc/list/list.create.modal.html",controller:"SquareOdbcListCreateCtrl"});c.result.then(function(){a.gridOptions.getPage()})},a.checkConnection=function(a){return d.get({id:a,controller:"check"}).$promise.then(function(){f.show(c.instant("MESSAGE_CONNECTION_VERIFIED"),"success")})["catch"](function(){f.show(c.instant("MESSAGE_CONNECTION_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").controller("SquareOdbcListCreateCtrl",["$scope","$translate","$uibModalInstance","SquareOdbc","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.item.dsn||(a.item.dsn="DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion"),a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.odbc.list",{url:"/list",templateUrl:"app/square/odbc/list/list.html",controller:"SquareOdbcListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.odbc",{url:"/odbc",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("SquareOdbc",["$resource",function(a){return a("/api/square/odbc/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SquareOdbcViewCtrl",["$scope","$translate","$stateParams","SquareOdbc","xAlert",function(a,b,c,d,e){a.odbc={},a.getOdbc=function(){return d.get({id:c.id}).$promise.then(function(b){a.odbc=b})["catch"](function(a){e.error(a)})},a.updateOdbc=function(){var f=angular.copy(a.odbc);return d.update({id:c.id},f).$promise.then(function(){e.show(b.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.odbc.view",{url:"/view/:id",templateUrl:"app/square/odbc/view/view.html",controller:"SquareOdbcViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.square.odbc.view.settings",{url:"/settings",templateUrl:"app/square/odbc/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("SquareProjectListCtrl",["$scope","$uibModal","SquareProject","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"projects.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:160,buttons:[{"class":"blue-hoki",href:"/square/projects/view/{{row.entity.id}}",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/square/project/list/list.create.modal.html",controller:"SquareProjectListCreateCtrl"});c.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("SquareProjectListCreateCtrl",["$scope","$translate","$uibModalInstance","SquareProject","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.projects.list",{url:"/list",templateUrl:"app/square/project/list/list.html",controller:"SquareProjectListCtrl",authenticate:!0})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.projects",{url:"/projects",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("SquareProject",["$resource",function(a){return a("/api/square/projects/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SquareProjectViewCtrl",["$scope","$stateParams","Auth","xAlert","SquareProject","socket","$translate","$log","$uibModal",function(a,b,c,d,e,f,g,h,i){a.squareProject={},a.$on("$destroy",function(){f.unsyncUpdates("square_project")}),a.getProject=function(){return e.get({id:b.id}).$promise.then(function(b){a.squareProject=b,angular.element(document).ready(function(){window.onerror=function(a,b,c){try{if(null!==a&&-1!==a.indexOf("Script error."));else{var e=new Image;e.src="assets/plugins/mxgraph/images/1x1.png?msg="+encodeURIComponent(a)+"&url="+encodeURIComponent(b)+"&lnum="+encodeURIComponent(c)}}catch(f){d.error(f)}},b.token=c.getToken();var a=new EditorUi(new Editor);a.openString(b.preproduction,b.name,b),a.editor.graphChangeListener=function(a,b){var c=b.properties.rtChange||!1;c||(this.modified=!0)}}),f.socket.on("square_project:save",function(c){c.id===b.id&&(a.squareProject=_.merge(a.squareProject,c))})})["catch"](function(a){d.error(a)})},a.editNotes=function(){var c=i.open({animation:!0,templateUrl:"app/square/project/view/projectNotes.modal.html",controller:["$scope","$uibModalInstance","notes",function(a,b,c){a.notes=c,a.close=function(){b.close(a.notes)},a.cancel=function(){b.dismiss("cancel")}}],resolve:{notes:{value:a.squareProject.notes}}});c.result.then(function(a){return e.update({id:b.id},{notes:a.value}).$promise.then(function(){d.show(g.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){d.error(a)})},function(){h.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.projects.view",{url:"/view/:id",templateUrl:"app/square/project/view/view.html",controller:"SquareProjectViewCtrl",authenticate:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",serie:!0,cache:!1,files:["assets/plugins/mxgraph/css/common.css","assets/plugins/mxgraph/css/explorer.css","assets/plugins/mxgraph/styles/grapheditor.css","assets/plugins/mxgraph/styles/custom.css","assets/plugins/square/js/custom.js","assets/plugins/mxgraph/js/mxClient.js","assets/plugins/square/js/Editor.js","assets/plugins/square/js/Graph.js","assets/plugins/square/js/EditorUi.js","assets/plugins/square/js/Actions.js","assets/plugins/square/js/Menus.js","assets/plugins/square/js/Sidebar.js","assets/plugins/square/js/Toolbar.js","assets/plugins/square/js/Dialogs.js"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.realtime",{url:"/realtime",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:14}}})}]),angular.module("xCallyShuttleApp").factory("ReportSquare",["$resource",function(a){return a("/api/report/square/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("ReportSquareDetail",["$resource",function(a){return a("/api/report/square/details/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SquareRealtimeViewGeneralCtrl",["$scope","$log","$uibModal","$translate","socket","xAlert","ReportSquare","usSpinnerService","$q","uiGridConstants",function(a,b,c,d,e,f,g,h,i,j){function k(b){return h.spin("spinner-grid"),g.get(m).$promise.then(function(b){a.gridOptions.totalItems=b.count,a.gridOptions.data=b.rows})["catch"](function(a){f.error(a)})["finally"](function(){b&&l(),h.stop("spinner-grid")})}function l(){e.socket.on("report_square:save",function(b){if(b.leaveAt){var c=_.remove(a.gridOptions.data,{id:b.id});c&&k()}else{var d=_.find(a.gridOptions.data,{id:b.id});if(!d&&a.gridOptions.data.length<m.limit){var e=_.clone(m);if(_.forEach(["offset","limit","controller","order"],function(a){delete e[a]}),_.isEmpty(e))a.gridOptions.data.push(b);else{var f=!0;_.forOwn(e,function(a,c){_.includes(b[c],a)||(f=!1)}),f&&a.gridOptions.data.push(b)}}}})}var m={controller:"realtime",offset:0,limit:25};a.moment=moment,a.init=function(){a.gridOptions={enableGridMenu:!0,headerCellFilter:"translate",enableHorizontalScrollbar:0,enableVerticalScrollbar:0,enableFiltering:!0,showGridFooter:!0,paginationPageSizes:[10,25,50,75],paginationPageSize:25,useExternalPagination:!0,useExternalSorting:!0,useExternalFiltering:!0,showTreeExpandNoChildren:!0,columnDefs:[{name:"uniqueid"},{name:"callerid"},{name:"extension"},{name:"project_name",displayName:"APPLICATION_PROJECT",headerCellFilter:"translate"},{name:"joinAt",displayName:"APPLICATION_ELAPSED_TIME",headerCellFilter:"translate",cellClass:"text-center ui-grid-vcenter",cellTemplate:'<div><css-timer start-time="row.entity.joinAt"></css-timer></div>',enableSorting:!1,enableColumnMenu:!1,enableFiltering:!1}],data:[],gridMenuTitleFilter:function(a){var b=i.defer();return b.resolve(d.instant(a)),b.promise},onRegisterApi:function(b){a.gridApi=b,a.gridApi.grid.registerDataChangeCallback(function(){n(a.gridApi.core.getVisibleRows(a.gridApi.grid).length)}),a.gridApi.core.on.sortChanged(a,function(a,b){0===b.length?m.order=null:m.order=b[0].name+" "+b[0].sort.direction.toUpperCase(),k()}),a.gridApi.pagination.on.paginationChanged(a,function(a,b){m.offset=(a-1)*b,m.limit=b,k()}),a.gridApi.core.on.filterChanged(a,function(){var a=this.grid;a.columns.forEach(function(a){a.filters[0].term?m[a.name]=a.filters[0].term:delete m[a.name]}),k()})}},k(!0)};var n=function(a){var b=a?30*a+130:270;angular.element(document.getElementsByClassName("ui-grid")[0]).css("height",b+"px"),angular.element(document.getElementsByClassName("ui-grid-viewport")).css("height",30*a+"px")};a.$on("$destroy",function(){e.unsyncUpdates("report_square")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.realtime.view.general",{url:"/general",templateUrl:"app/square/realtime/view/general/general.html",controller:"SquareRealtimeViewGeneralCtrl"})}]),angular.module("xCallyShuttleApp").controller("SquareRealtimeViewCtrl",["$scope",function(a){}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.realtime.view",{url:"/view",templateUrl:"app/square/realtime/view/view.html",controller:"SquareRealtimeViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}})}]),angular.module("xCallyShuttleApp").controller("SquareRecordingListCtrl",["$scope","SquareRecording","gridOptions","uiGridConstants",function(a,b,c,d){a.SquareRecording=b;a.initView=function(){var e={exporterCsvFilename:"recordings.csv",rowHeight:30,columnDefs:[{name:"uniqueid"},{name:"callerid",displayName:"APPLICATION_CALLERIDNUM"},{name:"filename"},{name:"extension"},{name:"projectName",displayName:"APPLICATION_PROJECT"},{name:"createdAt",displayName:"APPLICATION_DATE",cellFilter:"date:'yyyy-MM-dd HH:mm'",filterHeaderTemplate:'<div class="ui-grid-filter-container row"><div ng-repeat="colFilter in col.filters" class="col-md-6 col-md-offset-0 col-sm-5 col-sm-offset-0 col-xs-5 col-xs-offset-0"><div custom-grid-date-filter-header></div></div></div>',filters:[{name:"From",condition:d.filter.GREATER_THAN_OR_EQUAL,hasTime:!0},{name:"To",condition:d.filter.LESS_THAN_OR_EQUAL,hasTime:!0}],sort:{direction:d.DESC,priority:0}},{name:"audio",displayName:"",width:100,enableSorting:!1,enableFiltering:!1,cellClass:"ui-grid-vcenter",cellTemplate:"<div><audio-file-download data-ng-if=\"row.entity.savePath.split('.').pop() == 'wav'\" params=\"{id:row.entity.id,controller:'stream'}\" resource=\"grid.appScope.SquareRecording\"></audio-file-download><span data-ng-if=\"row.entity.value.split('.').pop() == 'gsm'\" title=\"{{'MESSAGE_GSM_PREVIEW_NOT_SUPPORTED' | translate}}\">{{'MESSAGE_GSM_PREVIEW_NOT_SUPPORTED' | translate}}</span></div>"},{name:"action",width:80,buttons:[{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.filename || row.entity.uniqueid, row.entity.id)"},{directive:"<motion-file-download params=\"{id:row.entity.id,controller:'stream'}\" resource=\"grid.appScope.SquareRecording\" mimetype=\"'audio/'+row.entity.value.split('.').pop()\" btnclass=\"btn btn-xs blue-hoki\" filename=\"(row.entity.filename || row.entity.uniqueid)+'.'+row.entity.savePath.split('.').pop()\"></motion-file-download>"}]}]};a.gridOptions=c.gridOptions(b,e,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.recordings.list",{url:"/list",templateUrl:"app/square/recording/list/list.html",controller:"SquareRecordingListCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square.recordings",{url:"/recordings",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("SquareRecording",["$resource",function(a){return a("/api/square/recordings/:id/:controller",{id:"@id"},{update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.square",{url:"/square",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:14}}})}]),angular.module("xCallyShuttleApp").factory("Agent",["$resource",function(a){return a("/api/agents/:id/:controller/:controller1/:controller2/:controller3",{id:"@id"},{changePassword:{method:"PUT",params:{controller:"password"}},update:{method:"PUT"},patch:{method:"PATCH"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.agents",{url:"/agents",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:4}}})}]),angular.module("xCallyShuttleApp").controller("AgentListCtrl",["$scope","$timeout","Agent","Auth","gridOptions",function(a,b,c,d,e){a.initView=function(){a.Auth=d;var b={exporterCsvFilename:"agents.csv",columnDefs:[{name:"fullname"},{name:"name",displayName:"APPLICATION_USERNAME"},{name:"internal"},{name:"email"},{name:"description"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/staff/agents/view/{{row.entity.id}}/account",name:"profile"},{"class":"green-meadow",href:"/staff/agents/view/{{row.entity.id}}/queues/voice",name:"queues"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.fullname, row.entity.id)"}]}]};a.gridOptions=e.gridOptions(c,b,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.agents.list",{url:"/list",templateUrl:"app/staff/agent/list/list.html",controller:"AgentListCtrl",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:4}}})}]),angular.module("xCallyShuttleApp").controller("AgentViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$cookieStore","Agent","FileUploader","Auth","MailQueue","User","VoiceQueue","ChatQueue","FaxQueue","SmsQueue","OpenChannelQueue","Setting",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){a.Auth=i,a.radioSwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.initVoiceQueues=function(){var a={},b={};return l.get().$promise.then(function(b){return a.queues=_.map(b.rows,function(a){return{name:a.name}}),g.get({id:e.id,controller:"voice",controller2:"queues"}).$promise}).then(function(a){b.queues=_.map(a.rows,function(a){return{name:a.name}})}).then(function(){ComponentsDropdowns.bindAgent(a,b,"voice",e.id,g)})["catch"](function(a){console.error(a)})},a.initChatQueues=function(){var a={},b={};return m.get().$promise.then(function(b){return a.queues=_.map(b.rows,function(a){return{id:a.id,name:a.name}}),g.get({id:e.id,controller:"chat",controller2:"queues"}).$promise}).then(function(a){b.queues=_.map(a.rows,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindAgent(a,b,"chat",e.id,g)})["catch"](function(a){console.error(a)})},a.initMailQueues=function(){var a={},b={};return j.get().$promise.then(function(b){return a.queues=_.map(b.rows,function(a){return{id:a.id,name:a.name}}),g.get({id:e.id,controller:"mail",controller2:"queues"}).$promise}).then(function(a){b.queues=_.map(a.rows,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindAgent(a,b,"mail",e.id,g)})["catch"](function(a){console.error(a)})},a.initSmsQueues=function(){var a={},b={};return o.get().$promise.then(function(b){return a.queues=_.map(b.rows,function(a){return{id:a.id,name:a.name}}),g.get({id:e.id,controller:"sms",controller2:"queues"}).$promise}).then(function(a){b.queues=_.map(a.rows,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindAgent(a,b,"sms",e.id,g)})["catch"](function(a){console.error(a)})},a.initFaxQueues=function(){var a={},b={};return n.get().$promise.then(function(b){return a.queues=_.map(b.rows,function(a){return{id:a.id,name:a.name}}),g.get({id:e.id,controller:"fax",controller2:"queues"}).$promise}).then(function(a){b.queues=_.map(a.rows,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindAgent(a,b,"fax",e.id,g)})["catch"](function(a){console.error(a)})},a.initOpenchannelQueues=function(){var a={},b={};return p.get().$promise.then(function(b){return a.queues=_.map(b.rows,function(a){return{id:a.id,name:a.name}}),g.get({id:e.id,controller:"openchannel",controller2:"queues"}).$promise}).then(function(a){b.queues=_.map(a.rows,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindAgent(a,b,"openchannel",e.id,g)})["catch"](function(a){console.error(a)})},a.updatePassword=function(){var b={newPassword:a.agent.newPwd};return i.isAdmin()?b.id=e.id:b.oldPassword=a.agent.currentPwd,k.changePassword(b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.error(a)})};var r=a.uploader=new h({url:"api/users/"+e.id+"/avatar",queueLimit:1,withCredentials:!0,headers:{Authorization:"Bearer "+f.get("token")}});r.filters.push({name:"imageFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|jpg|png|jpeg|".indexOf(b)}}),r.onSuccessItem=function(b,e){a.agent.userpic=e.userpic,a.agent.id===i.getCurrentUser().id&&(i.getCurrentUser().userpic=e.userpic),c.show(d.instant("MESSAGE_WELL_DONE"),"success")},r.onErrorItem=function(){c.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},r.onCompleteAll=function(){r.clearQueue()},a.initView=function(){return g.get({id:e.id}).$promise.then(function(b){return a.agent=b,a.agent.transport=a.agent.transport?a.agent.transport.split(","):[],a.agent.allow=a.agent.allow?a.agent.allow.split(";"):[],a.agent.nat=a.agent.nat?a.agent.nat.split(","):[],q.get({id:1}).$promise}).then(function(b){a.setting=b})["catch"](function(a){c.error(a)})},a.patchItem=function(){return g.update({id:e.id},{chatCapacity:a.agent.chatCapacity,mailCapacity:a.agent.mailCapacity,faxCapacity:a.agent.faxCapacity,smsCapacity:a.agent.smsCapacity,openchannelCapacity:a.agent.openchannelCapacity}).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.error(a)})},a.updateItem=function(){var b=angular.copy(a.agent);return delete b.password,delete b.md5secret,b.transport=b.transport.join(","),b.allow=b.allow.join(";"),b.nat=b.nat.join(","),g.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.agents.view",{url:"/view/:id",templateUrl:"app/staff/agent/view/view.html",controller:"AgentViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]},data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:4}}}).state("main.staff.agents.view.account",{url:"/account",templateUrl:"app/staff/agent/view/view.account.html",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:4}},resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/scripts/jquery.sparkline.min.js","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js","assets/scripts/profile.js"]})}]}}).state("main.staff.agents.view.voice",{url:"/voice",templateUrl:"app/staff/agent/view/view.voice.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:4}}}).state("main.staff.agents.view.chat",{url:"/chat",templateUrl:"app/staff/agent/view/view.chat.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:4}}}).state("main.staff.agents.view.mail",{url:"/mail",templateUrl:"app/staff/agent/view/view.mail.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:4}}}).state("main.staff.agents.view.fax",{url:"/fax",templateUrl:"app/staff/agent/view/view.fax.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:4}}}).state("main.staff.agents.view.sms",{url:"/sms",templateUrl:"app/staff/agent/view/view.sms.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:4}}}).state("main.staff.agents.view.openchannel",{url:"/openchannel",templateUrl:"app/staff/agent/view/view.openchannel.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:4}}}).state("main.staff.agents.view.motionbar",{url:"/motionbar",templateUrl:"app/staff/agent/view/view.motionbar.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:4}}}).state("main.staff.agents.view.queues",{url:"/queues",templateUrl:"app/staff/agent/view/view.queues.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:4}},cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}}).state("main.staff.agents.view.queues.voice",{url:"/voice",templateUrl:"app/staff/agent/view/view.queues.voice.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:7}}}).state("main.staff.agents.view.queues.chat",{url:"/chat",templateUrl:"app/staff/agent/view/view.queues.chat.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:8}}}).state("main.staff.agents.view.queues.mail",{url:"/mail",templateUrl:"app/staff/agent/view/view.queues.mail.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:9}}}).state("main.staff.agents.view.queues.fax",{url:"/fax",templateUrl:"app/staff/agent/view/view.queues.fax.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:10}}}).state("main.staff.agents.view.queues.sms",{url:"/sms",templateUrl:"app/staff/agent/view/view.queues.sms.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:11}}}).state("main.staff.agents.view.queues.openchannel",{url:"/openchannel",templateUrl:"app/staff/agent/view/view.queues.openchannel.html",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:20}}})}]),angular.module("xCallyShuttleApp").controller("AgentWizardCtrl",["$scope","$rootScope","$location","$translate","$http","Agent","VoiceQueue","ChatQueue","MailQueue","SmsQueue","FaxQueue","OpenChannelQueue","Setting","xAlert","WizardHandler",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){a.maxAmount=1e3,a._data={voice:{queues:[]},chat:{queues:[]},mail:{queues:[]},sms:{queues:[]},fax:{queues:[]},openchannel:{queues:[]}},a._agent=angular.copy(a._data),a.forms={info:void 0,voice:void 0},a.item={role:"agent",allow:["alaw","ulaw","gsm"],transport:["udp"],context:"from-sip"},a.next=function(){o.wizard().next()},a.getAmount=function(){return m.get({controller:"internal",internal:a.item.minInternal}).$promise.then(function(b){a.item.minInternal=Number(b.value),a.maxAmount=b.range||1e3})["catch"](function(a){n.error(a)})},a.exitValidation=function(a){return a},a.getFirstFreeInternal=function(){return m.get({controller:"internal"}).$promise.then(function(b){return a.internal=b,a.item.internal=b.value,a.item.minInternal=b.value,a.maxAmount=b.range||1e3,m.get({id:1}).$promise}).then(function(b){a.setting=b})["catch"](function(a){n.error(a)})},a.createItem=function(){var b=angular.copy(a.item);return delete b.minInternal,b.transport&&(b.transport=b.transport.join(",")),a.item.allow&&(b.allow=b.allow.join(";")),b.channels=a._agent,f.save(b).$promise.then(function(a){c.path("/staff/agents/view/"+a.id+"/queues/voice")})["catch"](function(a){console.log(a),n.error(a)})},a.createItems=function(){var b=angular.copy(a.item);return delete b.internal,b.transport&&(b.transport=b.transport.join(",")),b.allow&&(b.allow=b.allow.join(";")),f.save({id:"bulk"},b).$promise.then(function(){c.path("/staff/agents/list")})["catch"](function(a){console.log(a),n.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.agents.wizard",{url:"/wizard",templateUrl:"app/staff/agent/wizard/wizard.html",controller:"AgentWizardCtrl",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}},resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}}).state("main.staff.agents.bulk",{url:"/bulk",templateUrl:"app/staff/agent/wizard/wizard-bulk.html",controller:"AgentWizardCtrl",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff",{url:"/staff",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("TeamCreateCtrl",["$scope","$uibModalInstance","Team","xAlert",function(a,b,c,d){a.form={},a.item={},a.ok=function(){return c.save(a.item).$promise.then(function(){b.close(a.item)})["catch"](function(a){d.error(a)})},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("TeamListCtrl",["$scope","Team","gridOptions","$uibModal",function(a,b,c,d){a.initView=function(){var d={exporterCsvFilename:"teams.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:100,buttons:[{"class":"{{row.entity.defaultEntry ? 'blue-hoki disabled' : 'blue-hoki'}}",href:"/staff/teams/view/{{row.entity.id}}/settings",name:"profile"},{"class":"{{row.entity.defaultEntry ? 'green-turquoise disabled' : 'green-turquoise'}}",name:"agents",href:"/staff/teams/view/{{row.entity.id}}/agents"},{"class":"{{row.entity.defaultEntry ? 'red-sunglo disabled' : 'red-sunglo'}}",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.createItem=function(){d.open({animation:!0,templateUrl:"app/staff/team/list/create.modal.html",controller:"TeamCreateCtrl"}).result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.teams.list",{url:"/list",templateUrl:"app/staff/team/list/list.html",controller:"TeamListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Team",["$resource",function(a){return a("/api/teams/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.teams",{url:"/teams",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"landing"}}})}]),angular.module("xCallyShuttleApp").controller("TeamViewCtrl",["$scope","$http","$stateParams","$translate","Team","Agent","xAlert",function(a,b,c,d,e,f,g){var h=function(){return{select:function(b){return console.log("agents",b),e.save({id:a.team.id,controller:"agents"},{agents:b})},deselect:function(b){return e["delete"]({id:a.team.id,controller:"agents",agents:b})}}};a.initView=function(){return e.get({id:c.id}).$promise.then(function(b){a.team=b})["catch"](function(a){g.error(a)})},a.initAgents=function(){return f.get().$promise.then(function(b){return a.agents=b.rows,e.get({id:c.id,controller:"agents"}).$promise}).then(function(b){ComponentsDropdowns.bindTeam(_.map(b.rows,"id"),_.map(a.agents,function(a){return{id:a.id,name:a.name,fullname:a.fullname,internal:a.internal}}),h)})["catch"](function(a){g.error(a)})},a.updateItem=function(){var b=angular.copy(a.team);return e.update({
+id:c.id},b).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.teams.view",{url:"/view/:id",templateUrl:"app/staff/team/view/view.html",controller:"TeamViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.staff.teams.view.agents",{url:"/agents",templateUrl:"app/staff/team/view/view.agents.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]}])}]}}).state("main.staff.teams.view.settings",{url:"/settings",templateUrl:"app/staff/team/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("TelephoneListCtrl",["$scope","Telephone","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"telephones.csv",columnDefs:[{name:"fullname"},{name:"name"},{name:"internal"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/staff/telephones/view/{{row.entity.id}}/account",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.fullname, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.telephones.list",{url:"/list",templateUrl:"app/staff/telephone/list/list.html",controller:"TelephoneListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").factory("Telephone",["$resource",function(a){return a("/api/telephones/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.telephones",{url:"/telephones",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"landing"}}})}]),angular.module("xCallyShuttleApp").controller("TelephoneViewCtrl",["$scope","$http","$stateParams","$translate","$cookieStore","Auth","xAlert","Telephone","Setting",function(a,b,c,d,e,f,g,h,i){a.initView=function(){return a.Auth=f,a.forms={},h.get({id:c.id}).$promise.then(function(b){return delete b.password,a.item=b,a.item.transport=a.item.transport?a.item.transport.split(","):[],a.item.allow=a.item.allow?a.item.allow.split(";"):[],i.get({id:1}).$promise}).then(function(b){a.setting=b})["catch"](function(a){g.error(a)})},a.updateItem=function(){var b=angular.copy(a.item);return b.transport=b.transport.join(","),b.allow=b.allow.join(";"),h.update(b).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.error(a)})},a.updatePassword=function(){return h.update({password:a.item.password}).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){g.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.telephones.view",{url:"/view/:id",templateUrl:"app/staff/telephone/view/view.html",controller:"TelephoneViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.staff.telephones.view.account",{url:"/account",templateUrl:"app/staff/telephone/view/view.account.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css","assets/scripts/jquery.sparkline.min.js","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js","assets/scripts/profile.js"]})}]}}).state("main.staff.telephones.view.voice",{url:"/voice",templateUrl:"app/staff/telephone/view/view.voice.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("TelephoneWizardCtrl",["$scope","$http","$location","WizardHandler","xAlert","$translate","Telephone","Setting",function(a,b,c,d,e,f,g,h){a.forms={},a.item={allow:["alaw","ulaw","gsm"],transport:["udp"],context:"from-sip"},a.next=function(){d.wizard().next()},a.exitValidation=function(a){return a},a.getFirstFreeInternal=function(){return h.get({controller:"internal"}).$promise.then(function(b){return a.item.internal=b.value,h.get({id:1}).$promise}).then(function(b){a.setting=b})["catch"](function(a){e.error(a)})},a.createItem=function(){var b=angular.copy(a.item);return b.transport&&(b.transport=b.transport.join(",")),a.item.allow&&(b.allow=b.allow.join(";")),g.save(b).$promise.then(function(){c.path("/staff/telephones/list")})["catch"](function(a){e.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.telephones.wizard",{url:"/wizard",templateUrl:"app/staff/telephone/wizard/wizard.html",controller:"TelephoneWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("UserListCtrl",["$scope","$timeout","User","Auth","gridOptions",function(a,b,c,d,e){function f(a){if(a){var b=_.words(a),c=_.map(b,function(a){return a?a[0]:""});return c.join("").toUpperCase()}return!1}a.getUserAvatar=function(a,c,d){b(function(){angular.element("#userImg"+a).avatar({useGravatar:!1,initials:d?[]:f(c),fallbackImage:"api/users/avatar/"+d,size:80})})},a.isAdmin=function(a){return"admin"===a},a.initView=function(){var b={exporterCsvFilename:"users.csv",columnDefs:[{name:"fullname"},{name:"name",displayName:"APPLICATION_USERNAME"},{name:"internal"},{name:"email"},{name:"description"},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/staff/users/view/{{row.entity.id}}/account",name:"profile"},{"class":"green-meadow",href:"/staff/users/view/{{row.entity.id}}/permit/voice",name:"permits",hide:"grid.appScope.isAdmin(row.entity.role)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.fullname, row.entity.id)"}]}]};a.gridOptions=e.gridOptions(c,b,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.users.list",{url:"/list",templateUrl:"app/staff/user/list/list.html",controller:"UserListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Module",["$resource",function(a){return a("/api/modules/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("User",["$resource",function(a){return a("/api/users/:id/:controller/:controller2/:controller3",{id:"@id"},{changePassword:{method:"PUT",params:{controller:"password"}},update:{method:"PUT"},me:{method:"GET",params:{id:"me"}}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.users",{url:"/users",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"landing"}}})}]),angular.module("xCallyShuttleApp").controller("UserViewCtrl",["$scope","$stateParams","$cookieStore","$translate","FileUploader","User","Auth","xAlert","MailQueue","VoiceQueue","ChatQueue","FaxQueue","SmsQueue","OpenChannelQueue","Team","Module","Setting",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){function r(a,b){var c,d,e=b.length;for(c=0;e>c;c++){if(b[c].id===a)return b[c];if(b[c].SubModules&&b[c].SubModules.length&&(d=r(a,b[c].SubModules)))return d}}function s(b){var c=r(b.ModuleId,a.modules);if(b.status===!0)c.status=!0;else{var d=_.filter(c.SubModules,{status:!0});d.length||(c.status=!1)}c.ModuleId&&s(c)}function t(a,b){a.forEach(function(a){a.status=b,a.SubModules&&a.SubModules.length&&t(a.SubModules,b)})}function u(a,b){b.forEach(function(b){_.find(a,{id:b.id})?b.status=!0:b.status=!1,b.SubModules&&b.SubModules.length&&u(a,b.SubModules)})}function v(a,b){return a=_.union(a,_.map(_.filter(b,{status:!0}),"id")),b.forEach(function(b){b.SubModules&&b.SubModules.length&&(a=_.union(a,v(a,b.SubModules)))}),a}a.Auth=g,a._=_,a.moduleSwitch={onText:"On",offText:"Off",isActive:!0,size:"mini",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.initVoiceQueues=function(){var a={},c={};return j.get().$promise.then(function(c){return a.queues=_.map(c.rows,function(a){return{name:a.name}}),f.query({id:b.id,controller:"allowed",controller2:"voice",controller3:"queues"}).$promise}).then(function(a){c.queues=_.map(a,function(a){return{name:a.name}})}).then(function(){ComponentsDropdowns.bindPermit(a,c,"voice",b.id,f)})["catch"](function(a){console.error(a)})},a.initChatQueues=function(){var a={},c={};return k.get().$promise.then(function(c){return a.queues=_.map(c.rows,function(a){return{id:a.id,name:a.name}}),f.query({id:b.id,controller:"allowed",controller2:"chat",controller3:"queues"}).$promise}).then(function(a){c.queues=_.map(a,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindPermit(a,c,"chat",b.id,f)})["catch"](function(a){console.error(a)})},a.initMailQueues=function(){var a={},c={};return i.get().$promise.then(function(c){return a.queues=_.map(c.rows,function(a){return{id:a.id,name:a.name}}),f.query({id:b.id,controller:"allowed",controller2:"mail",controller3:"queues"}).$promise}).then(function(a){c.queues=_.map(a,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindPermit(a,c,"mail",b.id,f)})["catch"](function(a){console.error(a)})},a.initSmsQueues=function(){var a={},c={};return m.get().$promise.then(function(c){return a.queues=_.map(c.rows,function(a){return{id:a.id,name:a.name}}),f.query({id:b.id,controller:"allowed",controller2:"sms",controller3:"queues"}).$promise}).then(function(a){c.queues=_.map(a,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindPermit(a,c,"sms",b.id,f)})["catch"](function(a){console.error(a)})},a.initFaxQueues=function(){var a={},c={};return l.get().$promise.then(function(c){return a.queues=_.map(c.rows,function(a){return{id:a.id,name:a.name}}),f.query({id:b.id,controller:"allowed",controller2:"fax",controller3:"queues"}).$promise}).then(function(a){c.queues=_.map(a,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindPermit(a,c,"fax",b.id,f)})["catch"](function(a){console.error(a)})},a.initOpenchannelQueues=function(){var a={},c={};return n.get().$promise.then(function(c){return a.queues=_.map(c.rows,function(a){return{id:a.id,name:a.name}}),f.query({id:b.id,controller:"allowed",controller2:"openchannel",controller3:"queues"}).$promise}).then(function(a){c.queues=_.map(a,function(a){return{id:a.id,name:a.name}})}).then(function(){ComponentsDropdowns.bindPermit(a,c,"openchannel",b.id,f)})["catch"](function(a){console.error(a)})},a.initView=function(){return f.get({id:b.id}).$promise.then(function(b){return a.user=b,a.user.transport=a.user.transport?a.user.transport.split(","):[],a.user.allow=a.user.allow?a.user.allow.split(";"):[],q.get({id:1}).$promise}).then(function(b){a.setting=b})["catch"](function(a){h.error(a)})},a.updateItem=function(){var c=angular.copy(a.user);return delete c.password,delete c.md5secret,c.transport=c.transport.join(","),c.allow=c.allow.join(";"),f.update({id:b.id},c).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})},a.updatePassword=function(){var c={newPassword:a.user.newPwd};return g.isAdmin()?c.id=b.id:c.oldPassword=a.user.currentPwd,f.changePassword(c).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})};var w=a.uploader=new e({url:"api/users/"+b.id+"/avatar",queueLimit:1,withCredentials:!0,headers:{Authorization:"Bearer "+c.get("token")}});w.filters.push({name:"imageFilter",fn:function(a){var b="|"+a.type.slice(a.type.lastIndexOf("/")+1)+"|";return-1!=="|jpg|png|jpeg|".indexOf(b)}}),a.getModules=function(){return a.associatedModules=[],p.get().$promise.then(function(c){return a.modules=_.filter(c.rows,function(a){return!a.ModuleId}),f.query({id:b.id,controller:"allowed",controller2:"modules"}).$promise}).then(function(b){u(b,a.modules)})["catch"](function(a){h.error(a)})},a.updatePermissions=function(c){c.ModuleId&&s(c),c.SubModules&&c.SubModules.length&&t(c.SubModules,c.status);var e=v([],a.modules);return f.save({id:b.id,controller:"allowed",controller2:"modules"},{modules:e}).$promise.then(function(){h.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){h.error(a)})},w.onSuccessItem=function(b,c){a.user.userpic=c.userpic,a.user.id===g.getCurrentUser().id&&(g.getCurrentUser().userpic=c.userpic),h.show(d.instant("MESSAGE_WELL_DONE"),"success")},w.onErrorItem=function(){h.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")},w.onCompleteAll=function(){w.clearQueue()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.users.view",{url:"/view/:id",templateUrl:"app/staff/user/view/view.html",controller:"UserViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.staff.users.view.account",{url:"/account",templateUrl:"app/staff/user/view/view.account.html",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css","assets/scripts/jquery.sparkline.min.js","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js","assets/scripts/profile.js"]})}]}}).state("main.staff.users.view.voice",{url:"/voice",templateUrl:"app/staff/user/view/view.voice.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}}).state("main.staff.users.view.permit",{url:"/permit",templateUrl:"app/staff/user/view/view.permit.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}},cache:!1,serie:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/jquery-multi-select/css/multi-select.css","assets/plugins/jquery-multi-select/js/jquery.multi-select.js","assets/plugins/jquery-quicksearch/jquery.quicksearch.js","assets/scripts/components-dropdowns.js"]})}]}}).state("main.staff.users.view.permit.voice",{url:"/voice",templateUrl:"app/staff/user/view/view.permit.voice.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}}).state("main.staff.users.view.permit.chat",{url:"/chat",templateUrl:"app/staff/user/view/view.permit.chat.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.chat"}}}).state("main.staff.users.view.permit.mail",{url:"/mail",templateUrl:"app/staff/user/view/view.permit.mail.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.mail"}}}).state("main.staff.users.view.permit.fax",{url:"/fax",templateUrl:"app/staff/user/view/view.permit.fax.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.fax"}}}).state("main.staff.users.view.permit.sms",{url:"/sms",templateUrl:"app/staff/user/view/view.permit.sms.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.sms"}}}).state("main.staff.users.view.permit.openchannel",{url:"/openchannel",templateUrl:"app/staff/user/view/view.permit.openchannel.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.openchannel"}}}).state("main.staff.users.view.permit.modules",{url:"/modules",templateUrl:"app/staff/user/view/view.permit.modules.html",data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").controller("UserWizardCtrl",["$scope","$location","WizardHandler","xAlert","$translate","User","Setting","Auth",function(a,b,c,d,e,f,g,h){a.initWizard=function(){return a.Auht=h,a.forms={info:void 0,voice:void 0},a.item={role:"user",host:"dynamic",context:"from-sip"},g.get({controller:"internal"}).$promise.then(function(b){return a.item.internal=b.value,g.get({id:1}).$promise}).then(function(b){a.setting=b})["catch"](function(a){d.error(a)})},a.next=function(){c.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){return f.save(a.item).$promise.then(function(a){b.path("user"===a.role?"/staff/users/view/"+a.id+"/permit/voice":"/staff/users/view/"+a.id+"/account")})["catch"](function(a){d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.staff.users.wizard",{url:"/wizard",templateUrl:"app/staff/user/wizard/wizard.html",controller:"UserWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("SugarcrmListCtrl",["$scope","SugarcrmAccount","gridOptions","xAlert","$translate","Modal",function(a,b,c,d,e,f){a.initView=function(){var d={exporterCsvFilename:"sugarcrm_account.csv",columnDefs:[{name:"name",displayName:"APPLICATION_NAME"},{name:"username"},{name:"remoteUri",displayName:"APPLICATION_REMOTE_ADDRESS"},{name:"action",width:250,buttons:[{"class":"blue-hoki",href:"/sugarcrm/view/{{row.entity.id}}/account",name:"profile"},{"class":"green-jungle",name:"check",onClick:"grid.appScope.checkAccount(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.checkAccount=function(a){return b.get({id:a,controller:"check"}).$promise.then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(a){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.sugarcrm.list",{url:"/list",templateUrl:"app/sugarcrm/list/list.html",controller:"SugarcrmListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.sugarcrm",{url:"/sugarcrm",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin"],redirectTo:"main.dashboard.voice"}}})}]),angular.module("xCallyShuttleApp").factory("SugarcrmAccount",["$resource",function(a){return a("/api/sugarcrm/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("SugarcrmConfiguration",["$resource",function(a){return a("/api/sugarcrm/configurations/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").factory("SugarcrmField",["$resource",function(a){return a("/api/sugarcrm/fields/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").controller("SugarcrmViewCtrl",["$scope","$http","$stateParams","$translate","$location","$filter","WizardHandler","socket","xAlert","Modal",function(a,b,c,d,e,f,g,h,i,j){a.$stateParams=c,a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:500,scrollInertia:0},a.initConfiguration=function(){a.formsConfiguration={},a.configuration={}},a.goNext=function(){g.wizard().next()},a.formValidation=function(a){return a},a.$on("$destroy",function(){h.unsyncUpdates("sugarcrm_configuration"),h.unsyncUpdates("sugarcrm_field")}),a.initView=function(){b.get("/api/sugarcrm/accounts/"+c.id).success(function(b){a.account=b}).error(function(a){i.error(a)})},a.updateItem=function(){b.put("/api/sugarcrm/accounts/"+c.id,a.account).success(function(){i.show(d.instant("MESSAGE_WELL_DONE")+".","success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.getConfigurations=function(){b.get("/api/sugarcrm/configurations",{params:{AccountId:c.id}}).success(function(b){a.configurations=b,h.socket.on("sugarcrm_configuration:remove",function(b){_.remove(a.configurations,{id:b.id})})}).error(function(a){i.error(a)})},a.deleteConfiguration=j.confirm["delete"](function(a){b["delete"]("api/sugarcrm/configurations/"+a).success(function(){i.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})}),a.createConfiguration=function(){a.configuration.AccountId=c.id,b.post("api/sugarcrm/configurations",a.configuration).success(function(a){e.path("sugarcrm/view/"+c.id+"/configurations/settings/"+a.id)}).error(function(){i.show("Something went wrong!","danger")})},a.fieldType=["string","variable"],a.descFieldType=["string","key_value"],a.getFields=function(){b.get("/api/sugarcrm/accounts/"+c.id+"/fields").success(function(b){a.accountFields=_.sortByOrder(f("sugarcrm")(_.toArray(b)),"name","asc"),_.forEach(b,function(a){a.options=_.toArray(a.options)})}).error(function(a){i.error(a)})},a.getConfiguration=function(){b.get("/api/sugarcrm/configurations/"+c.configurationId).success(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,h.socket.on("sugarcrm_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})}).error(function(a){i.error(a)})},a.getVariables=function(){b.get("/api/variables").success(function(b){a.variables=b.rows}).error(function(a){i.error(a)})},a.removeItem=function(a){b["delete"]("api/sugarcrm/fields/"+a.id).success(function(){i.show(d.instant("MESSAGE_WELL_DONE"),"success")}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG"),"danger")})},a.addItemSubject=function(){var d={type:"string",content:""};b.post("/api/sugarcrm/configurations/"+c.configurationId+"/subject",d).success(function(b){a.subjectConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.addItemDescription=function(){var d={type:"string",content:""};b.post("/api/sugarcrm/configurations/"+c.configurationId+"/description",d).success(function(b){a.descriptionConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.addItemField=function(){var d={content:""};b.post("/api/sugarcrm/configurations/"+c.configurationId+"/field",d).success(function(b){a.fieldConfig.push(b)}).error(function(){i.show("Something went wrong!","danger")})},a.updateField=function(a){b.put("/api/sugarcrm/fields/"+a.id,a).success(function(){}).error(function(){i.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})},a.changeType=function(b){"variable"===b.type?b.content="":"string"===b.type&&(b.VariableId=null),a.updateField(b)},a.changeDescType=function(b){"key_value"===b.type?(b.content="","string"===b.keyType?b.VariableId=null:"variable"===b.keyType&&(b.keyContent="")):"string"===b.type&&(b.VariableId=null,b.key="",b.keyContent=""),a.updateField(b)},a.changeFieldType=function(b){b.content="",a.updateField(b)},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"name",b);return c?c.options.length>0?c.options:null:void 0}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.sugarcrm.view",{url:"/view/:id",templateUrl:"app/sugarcrm/view/view.html",controller:"SugarcrmViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.sugarcrm.view.account",{url:"/account",templateUrl:"app/sugarcrm/view/view.account.html"}).state("main.sugarcrm.view.configurations",{url:"/configurations",templateUrl:"app/sugarcrm/view/view.configurations.html"}).state("main.sugarcrm.view.configurations.settings",{url:"/settings/:configurationId",templateUrl:"app/sugarcrm/view/view.configurationSettings.html",controller:"SugarcrmViewCtrl"}).state("main.sugarcrm.view.configuration",{url:"/configuration",templateUrl:"app/sugarcrm/view/view.configuration.html"})}]),angular.module("xCallyShuttleApp").controller("SugarcrmkWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler",function(a,b,c,d,e,f){a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={}},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){b.post("api/sugarcrm/accounts",a.item).success(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/sugarcrm/list")}).error(function(){e.show(d.instant("MESSAGE_SOMETHING_WENT_WRONG")+".","danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.sugarcrm.wizard",{url:"/wizard",templateUrl:"app/sugarcrm/wizard/wizard.html",controller:"SugarcrmkWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("CannedAnswer",["$resource",function(a){return a("/api/answers/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.answers",{url:"/answers",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:58}}})}]),angular.module("xCallyShuttleApp").controller("AnswerListCtrl",["$scope","$uibModal","CannedAnswer","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"answers.csv",columnDefs:[{name:"key",displayName:"APPLICATION_NAME"},{name:"value"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/tools/answers/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.key, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){b.open({animation:!0,templateUrl:"app/tools/answer/list/list.create.modal.html",controller:"AnswerListCreateCtrl"}).result.then(function(b){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("AnswerListCreateCtrl",["$scope","$translate","$uibModalInstance","CannedAnswer","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.answers.list",{url:"/list",templateUrl:"app/tools/answer/list/list.html",controller:"AnswerListCtrl"})}]),angular.module("xCallyShuttleApp").controller("AnswerViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location","CannedAnswer",function(a,b,c,d,e,f,g){a.getAnswer=function(){return g.get({id:e.id}).$promise.then(function(b){a.answer=b})["catch"](function(a){c.error(a)})},a.updateAnswer=function(){var b=angular.copy(a.answer);return g.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.answers.view",{url:"/view/:id",templateUrl:"app/tools/answer/view/view.html",controller:"AnswerViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.answers.view.settings",{url:"/settings",templateUrl:"app/tools/answer/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("Automation",["$resource",function(a){return a("/api/automations/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.automations",{url:"/automations",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:51}}})}]),angular.module("xCallyShuttleApp").controller("AutomationListCtrl",["$scope","$http","$translate","xAlert","Automation","gridOptions",function(a,b,c,d,e,f){a.onText="On",a.offText="Off",a.isActive=!0,a.size="mini",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initView=function(){var b={exporterCsvFilename:"Automations.csv",columnDefs:[{name:"name"},{name:"description"},{name:"channel"},{name:"status",cellTemplate:'<div class="centered-uigrid-td"><input data-ng-change="grid.appScope.updateItem(row.entity)", bs-switch ng-model="row.entity.status" type="checkbox" switch-active="{{ grid.appScope.isActive }}" switch-on-text="{{ grid.appScope.onText }}" switch-off-text="{{ grid.appScope.offText }}" switch-on-color="{{ grid.appScope.onColor }}" switch-off-color="{{ grid.appScope.offColor }}" switch-animate="{{ grid.appScope.animate }}" switch-size="{{ grid.appScope.size }}" switch-label="{{ grid.appScope.label }}" switch-icon="{{ grid.appScope.icon }}" switch-radio-off="{{ grid.appScope.radioOff }}" switch-label-width="{{ grid.appScope.labelWidth }}" switch-handle-width="{{ grid.appScope.handleWidth }}"></div>',width:100,enableFiltering:!1},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/tools/automations/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=f.gridOptions(e,b,a)},a.updateItem=function(a){return e.update({id:a.id},a).$promise.then(function(){d.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.automations.list",{url:"/list",templateUrl:"app/tools/automation/list/list.html",controller:"AutomationListCtrl"})}]),angular.module("xCallyShuttleApp").controller("AutomationViewCtrl",["$scope","$stateParams","$http","$translate","xAlert","automations","Automation","$location",function(a,b,c,d,e,f,g,h){a.$automations=f,a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.forms={general:{}},a.addCondition=function(b){a.automation[b].push({field:"",operator:"",value:""})},a.removeCondition=function(b,c){a.automation[b].splice(c,1)},a.addAction=function(){a.automation.Actions.push({action:"",data1:"",data2:"",data3:"",data4:"",data5:""})},a.resetActionData=function(a){a.data1="",a.data2="",a.data3="",a.data4="",a.data5=""},a.removeAction=function(b){a.automation.Actions.splice(b,1)},a.initView=function(){return g.get({id:b.id}).$promise.then(function(b){a.automation=b})["catch"](function(a){e.error(a),h.path("/tools/automations/list")})},a.updateAutomation=function(){return g.update({id:b.id},a.automation).$promise.then(function(){e.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),e.error(a)})},a.exitValidation=function(b){return console.log(b&&(a.automation.All.length||a.automation.Any.length)&&a.automation.Actions.length),!(!b||!a.automation.All.length&&!a.automation.Any.length||!a.automation.Actions.length)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.automations.view",{url:"/view/:id",templateUrl:"app/tools/automation/view/view.html",controller:"AutomationViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}}).state("main.tools.automations.view.settings",{url:"/settings",templateUrl:"app/tools/automation/view/view.settings.html"}).state("main.tools.automations.view.routes",{url:"/routes",templateUrl:"app/tools/automation/view/view.routes.html"
+}).state("main.tools.automations.view.application",{url:"/application",templateUrl:"app/tools/automation/view/view.application.html"})}]),angular.module("xCallyShuttleApp").controller("AutomationWizardCtrl",["$scope","$http","$location","xAlert","automations","WizardHandler","Automation",function(a,b,c,d,e,f,g){a.$automations=e,a.statusSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.tempData={voice:{},mail:{},chat:{},fax:{}},a.item={All:[],Any:[],Actions:[]},a.forms={general:void 0,settings:void 0},a.addCondition=function(b){a.item[b].push({field:"",operator:"",value:""})},a.removeCondition=function(b,c){a.item[b].splice(c,1)},a.addAction=function(){a.item.Actions.push({action:"",data1:"",data2:"",data3:"",data4:"",data5:""})},a.resetActionData=function(a){a.data1="",a.data2="",a.data3="",a.data4="",a.data5=""},a.removeAction=function(b){a.item.Actions.splice(b,1)},a.$watch("item.channel",function(b,c){c&&(a.tempData[c].All=_.clone(a.item.All,!0),a.tempData[c].Any=_.clone(a.item.Any,!0),a.tempData[c].Actions=_.clone(a.item.Actions,!0)),a.item.All=a.tempData[b].All?a.tempData[b].All:[],a.item.Any=a.tempData[b].Any?a.tempData[b].Any:[],a.item.Actions=a.tempData[b].Actions?a.tempData[b].Actions:[]},!0),a.item.channel="mail",a.createItem=function(){return g.save(a.item).$promise.then(function(){c.path("/tools/automations/list")})["catch"](function(a){console.error(a),d.error(a)})},a.next=function(){f.wizard().next()},a.previous=function(){f.wizard().previous()},a.exitValidation=function(a){return a},a.exitSettingsValidation=function(b){return!(!b||!a.item.All.length&&!a.item.Any.length||!a.item.Actions.length)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.automations.wizard",{url:"/wizard",templateUrl:"app/tools/automation/wizard/wizard.html",controller:"AutomationWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("Interval",["$resource",function(a){return a("/api/intervals/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.intervals",{url:"/intervals",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:53}}})}]),angular.module("xCallyShuttleApp").controller("IntervalListCtrl",["$scope","$uibModal","Interval","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"intervals.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/tools/intervals/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/tools/interval/list/list.create.modal.html",controller:"IntervalListCreateCtrl"});c.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("IntervalListCreateCtrl",["$scope","$translate","$uibModalInstance","Interval","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.intervals.list",{url:"/list",templateUrl:"app/tools/interval/list/list.html",controller:"IntervalListCtrl"})}]),angular.module("xCallyShuttleApp").controller("IntervalViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","socket","$location","WizardHandler","Modal","interval",function(a,b,c,d,e,f,g,h,i,j){function k(b){var c,d,e,f;c=b.t_from&&b.t_to&&!b.alwaysTime?moment(b.t_from).format("HH:mm")+"-"+moment(b.t_to).format("HH:mm"):"*",b.wd_from&&"always"!==b.wd_from?(d=b.wd_from,b.wd_to&&"always"!==b.wd_to&&(d+="-"+b.wd_to)):d="*",b.md_from&&"always"!==b.md_from?(e=b.md_from,b.md_to&&"always"!==b.md_to&&(e+="-"+b.md_to)):e="*",b.m_from&&"always"!==b.m_from?(f=b.m_from,b.m_to&&"always"!==b.m_to&&(f+="-"+b.m_to)):f="*",void 0!==a.selectedSubInterval?a.interval.SubIntervals[a.selectedSubInterval].interval=c+","+d+","+e+","+f:a.subinterval.interval=c+","+d+","+e+","+f}a.$translate=d,a.$interval=j.interval,a.selectedSubInterval=void 0,a["switch"]={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.gridOptions={columnDefs:[{name:"name",displayName:"APPLICATION_NAME",headerCellFilter:"translate"},{name:"interval",displayName:"APPLICATION_INTERVAL",headerCellFilter:"translate"},{name:"action",displayName:"APPLICATION_ACTION",headerCellFilter:"translate",width:125,cellTemplate:'<a class="btn btn-xs blue-hoki" data-ng-click="grid.appScope.openSubInterval(grid.appScope.gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_SETTINGS\' | translate}}</a><a class="btn btn-xs red-sunglo" data-ng-click="grid.appScope.deleteSubInterval(row.entity.name+\' interval\', grid.appScope.gridOptions.data.indexOf(row.entity))">{{\'APPLICATION_DELETE\' | translate}}</a>'}]},a.forms={subinterval:void 0,general:void 0},a.initSubInterval=function(b){b&&(a.selectedSubInterval=void 0),a.subinterval={},a.splittedInterval={t_from:moment(new Date),t_to:moment(new Date),wd_from:"always",wd_to:"always",md_from:"always",md_to:"always",m_from:"always",m_to:"always",alwaysTime:!0}},a.next=function(){h.wizard().next()},a.previous=function(){h.wizard().previous()},a.exitValidation=function(a){return a},a.deselectAndRedirect=function(b){a.selectedSubInterval=void 0,g.path(b)},a.getInterval=function(){b.get("/api/intervals/"+e.id).success(function(b){a.interval=b,a.gridOptions.data=b.SubIntervals}).error(function(a){console.error(a),g.path("/tools/intervals/list")})},a.openSubInterval=function(b){a.selectedSubInterval=b,g.path("/tools/intervals/view/"+e.id+"/subintervals/settings")},a.updateInterval=function(f){a.selectedSubInterval=void 0,b.put("/api/intervals/"+e.id,a.interval).success(function(){a.getInterval(),c.show(d.instant("MESSAGE_WELL_DONE")+"!","success"),f&&g.path("/tools/intervals/view/"+e.id+"/"+f)}).error(function(a){c.error(a)})},a.getSubInterval=function(){void 0===a.selectedSubInterval&&g.path("/tools/intervals/list"),a.splittedInterval={t_from:moment(new Date),t_to:moment(new Date)};var b,c=a.interval.SubIntervals[a.selectedSubInterval]?a.interval.SubIntervals[a.selectedSubInterval].interval.split(","):["*","*","*","*"];c.forEach(function(c,d){switch(d){case 0:"*"!==c?(b=c.split("-"),a.splittedInterval.t_from=moment(b[0],"HH:mm"),a.splittedInterval.t_to=moment(b[1],"HH:mm"),a.splittedInterval.alwaysTime=!1):(a.splittedInterval.t_from=moment(new Date),a.splittedInterval.t_to=moment(new Date),a.splittedInterval.alwaysTime=!0);break;case 1:"*"!==c?(b=c.split("-"),a.splittedInterval.wd_from=b[0],a.splittedInterval.wd_to=b[1]?b[1]:"always"):(a.splittedInterval.wd_from="always",a.splittedInterval.wd_to="always");break;case 2:"*"!==c?(b=c.split("-"),a.splittedInterval.md_from=b[0],a.splittedInterval.md_to=b[1]?b[1]:"always"):(a.splittedInterval.md_from="always",a.splittedInterval.md_to="always");break;case 3:"*"!==c?(b=c.split("-"),a.splittedInterval.m_from=b[0],a.splittedInterval.m_to=b[1]?b[1]:"always"):(a.splittedInterval.m_from="always",a.splittedInterval.m_to="always")}})},a.$watch("splittedInterval",function(a){a&&k(a)},!0),a.addSubInterval=function(){a.interval.SubIntervals.push(a.subinterval),a.updateInterval("subintervals")},a.deleteSubInterval=i.confirm["delete"](function(b){a.interval.SubIntervals.splice(b,1),a.updateInterval()})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.intervals.view",{url:"/view/:id",templateUrl:"app/tools/interval/view/view.html",controller:"IntervalViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.intervals.view.settings",{url:"/settings",templateUrl:"app/tools/interval/view/view.settings.html"}).state("main.tools.intervals.view.subintervals",{url:"/subintervals",templateUrl:"app/tools/interval/view/view.subintervals.html"}).state("main.tools.intervals.view.subinterval",{url:"/subinterval",templateUrl:"app/tools/interval/view/view.subinterval.html"}).state("main.tools.intervals.view.subintervals.settings",{url:"/settings",templateUrl:"app/tools/interval/view/view.subintervalSettings.html"})}]),angular.module("xCallyShuttleApp").controller("PauseListCtrl",["$scope","$log","$uibModal","$translate","Pause","gridOptions",function(a,b,c,d,e,f){a.initView=function(){var b={exporterCsvFilename:"pauses.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/tools/pauses/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=f.gridOptions(e,b,a)},a.createItem=function(){var b=c.open({animation:!0,templateUrl:"app/tools/pause/list/list.create.modal.html",controller:"PauseListCreateCtrl"});b.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("PauseListCreateCtrl",["$scope","$translate","$uibModalInstance","Pause","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.pauses.list",{url:"/list",templateUrl:"app/tools/pause/list/list.html",controller:"PauseListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Pause",["$resource",function(a){return a("/api/pauses/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.pauses",{url:"/pauses",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:57}}})}]),angular.module("xCallyShuttleApp").controller("PauseViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location","Pause",function(a,b,c,d,e,f,g){a.getPause=function(){return g.get({id:e.id}).$promise.then(function(b){a.pause=b})["catch"](function(a){c.error(a)})},a.updatePause=function(){var b=angular.copy(a.pause);return g.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.pauses.view",{url:"/view/:id",templateUrl:"app/tools/pause/view/view.html",controller:"PauseViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.pauses.view.settings",{url:"/settings",templateUrl:"app/tools/pause/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("SchedulerListCtrl",["$scope","Scheduler","gridOptions","xAlert","$translate","socket",function(a,b,c,d,e,f){a._=_,a.switches={isActive:!0,size:"mini",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.scheduleTypes=[{name:"APPLICATION_REPORT_EXTRACTION",value:"report"},{name:"APPLICATION_HISTORY_MOVE",value:"history"},{name:"APPLICATION_DB_BACKUP",value:"backup"}],a.initView=function(){var d={exporterCsvFilename:"Schedules.csv",columnDefs:[{name:"name"},{name:"type",cellTemplate:'<div class="centered-uigrid-td">{{grid.appScope._.find(grid.appScope.scheduleTypes,{value:row.entity.type}).name | translate}}</div>'},{name:"description"},{name:"active",cellTemplate:'<div class="centered-uigrid-td"><input data-ng-change="grid.appScope.updateItem(row.entity)", bs-switch ng-model="row.entity.active" type="checkbox" switch-active="{{ grid.appScope.switches.isActive }}" switch-on-text="{{ \'APPLICATION_YES\' | translate }}" switch-off-text="{{ \'APPLICATION_NO\' | translate }}" switch-on-color="{{ grid.appScope.switches.onColor }}" switch-off-color="{{ grid.appScope.switches.offColor }}" switch-animate="{{ grid.appScope.switches.animate }}" switch-size="{{ grid.appScope.switches.size }}" switch-label="{{ grid.appScope.switches.label }}" switch-icon="{{ grid.appScope.switches.icon }}" switch-radio-off="{{ grid.appScope.switches.radioOff }}" switch-label-width="{{ grid.appScope.switches.labelWidth }}" switch-handle-width="{{ grid.appScope.switches.handleWidth }}"></div>',enableFiltering:!1,enableSorting:!1},{name:"sendMail",displayName:"APPLICATION_SEND_MAIL",cellTemplate:'<div data-ng-if="row.entity.type == \'report\'" class="centered-uigrid-td"><input data-ng-change="grid.appScope.updateItem(row.entity)", bs-switch ng-model="row.entity.sendMail" type="checkbox" switch-active="{{ grid.appScope.switches.isActive }}" switch-on-text="{{ \'APPLICATION_YES\' | translate }}" switch-off-text="{{ \'APPLICATION_NO\' | translate }}" switch-on-color="{{ grid.appScope.switches.onColor }}" switch-off-color="{{ grid.appScope.switches.offColor }}" switch-animate="{{ grid.appScope.switches.animate }}" switch-size="{{ grid.appScope.switches.size }}" switch-label="{{ grid.appScope.switches.label }}" switch-icon="{{ grid.appScope.switches.icon }}" switch-radio-off="{{ grid.appScope.switches.radioOff }}" switch-label-width="{{ grid.appScope.switches.labelWidth }}" switch-handle-width="{{ grid.appScope.switches.handleWidth }}"></div>',enableFiltering:!1,enableSorting:!1},{name:"action",width:100,buttons:[{"class":"blue-hoki",href:"/tools/scheduler/view/{{row.entity.id}}/settings",name:"settings"},{"class":"green-turquoise",name:"run",onClick:"grid.appScope.runSchedule(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.updateItem=function(a){return b.update({id:a.id},a).$promise.then(function(){d.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),d.error(a)})},a.runSchedule=function(a){return b.get({id:a,controller:"run"}).$promise.then(function(){d.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.scheduler.list",{url:"/list",templateUrl:"app/tools/scheduler/list/list.html",controller:"SchedulerListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Scheduler",["$resource",function(a){return a("/api/scheduler/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.scheduler",{url:"/scheduler",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:61}}})}]),angular.module("xCallyShuttleApp").controller("SchedulerViewCtrl",["$scope","xAlert","$translate","$stateParams","socket","$location","ReportTree","Scheduler","DefaultReport","CustomReport","$timeout","MailServerOut",function(a,b,c,d,e,f,g,h,i,j,k,l){function m(){switch(a.schedule.cronType=a.rangeExec.type,a.rangeExec.type){case"daily":a.schedule.cron="00 "+a.rangeExec.hour+" * * *";break;case"weekly":a.schedule.cron="00 "+a.rangeExec.hour+" * * "+a.rangeExec.weekDays.join(",");break;case"monthly":a.schedule.cron="00 "+a.rangeExec.hour+" "+a.rangeExec.monthDay+" * *"}}function n(b){var c;switch(b.cronType){case"daily":a.rangeExec.hour=Number(b.cron.split(" ")[1]),a.rangeExec.type=b.cronType;break;case"weekly":c=b.cron.split(" "),a.rangeExec.hour=Number(c[1]),c[4].split(",").forEach(function(b){a.rangeExec.weekDays.push(Number(b))}),a.rangeExec.type=b.cronType;break;case"monthly":c=b.cron.split(" "),a.rangeExec.hour=Number(c[1]),a.rangeExec.monthDay=Number(c[2]),a.rangeExec.type=b.cronType;break;case"currentDay":a.switchValues.today=!0}a.$watch("rangeExec",function(b){a.switchValues.today||m()},!0)}a.forms={},a.rangeExec={weekDays:[],monthDay:null,hour:0,type:null},a.initReports=function(){var c;return a.reports=[],a.tempTodayCron=null,g.query().$promise.then(function(b){return a.defaultTreeData=JSON.parse(b[0].tree),a.customTreeData=JSON.parse(b[1].tree),i.get().$promise}).then(function(b){return a.defRep=b.rows,a.defRep.length&&_.forEach(a.defRep,function(b){c=_.find(a.defaultTreeData,{id:b.parent}),c&&(b.parent="Motion Reports - "+c.text,b.type="default")}),j.get().$promise}).then(function(b){return a.cusRep=b.rows,a.cusRep.length&&_.forEach(a.cusRep,function(b){c=_.find(a.customTreeData,{id:b.parent}),c&&(b.parent="Custom Reports - "+c.text,b.type="custom")}),l.get().$promise}).then(function(b){a.mailServers=b.rows})["catch"](function(a){b.error(a)})},a.initView=function(){return h.get({id:d.id}).$promise.then(function(b){a.schedule=b,n(b)}).then(function(){e.socket.on("schedule:update",function(b){a.schedule.id===b.id&&(a.schedule.active=b.active,a.schedule.sendMail=b.sendMail)})})["catch"](function(a){console.error(a),f.path("/tools/scheduler/list")})},a.refreshSlider=function(){k(function(){a.$broadcast("rzSliderForceRender"),a.refreshSlider=null})},a.monthDays=function(){for(var a=[],b=1;31>=b;b++)a.push(b);return a}(),a.hours=function(){for(var a=[],b=0;23>=b;b++)a.push(b);return a}(),a.setReportTree=function(b){a.schedule.reportType=b.type},a.validitySlider={ceil:24,floor:0,showTicks:!0},a.switchValues={today:!1},a.switches={isActive:!0,size:"mini",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.scheduleTypes=[{name:"APPLICATION_REPORT_EXTRACTION",value:"report"}],a.todayCron=[{name:"15 min",value:"*/15 * * * *"},{name:"30 min",value:"*/30 * * * *"},{name:"1 h",value:"0 * * * *"}],a.reportRanges=[{name:"APPLICATION_PREVIOUS_DAY",value:"yesterday"},{name:"APPLICATION_LAST_SEVEN_DAYS",value:"last7"},{name:"APPLICATION_LAST_THIRTY_DAYS",value:"last30"},{name:"APPLICATION_LAST_MONTH",value:"lastMonth"}],a.cronTypes=[{name:"APPLICATION_DAY",value:"daily"},{name:"APPLICATION_WEEK",value:"weekly"},{name:"APPLICATION_MONTH",value:"monthly"}],a.weekDays=[{name:"APPLICATION_MONDAY",value:1},{name:"APPLICATION_TUESDAY",value:2},{name:"APPLICATION_WEDNESDAY",value:3},{name:"APPLICATION_THURSDAY",value:4},{name:"APPLICATION_FRIDAY",value:5},{name:"APPLICATION_SATURDAY",value:6},{name:"APPLICATION_SUNDAY",value:0}],a.checkToday=function(){a.switchValues.today?(a.schedule.cron=angular.copy(a.tempTodayCron),a.schedule.cronType="currentDay"):(a.tempTodayCron=angular.copy(a.schedule.cron),a.schedule.cron=void 0,m())},a.updateSchedule=function(){return h.update({id:a.schedule.id},a.schedule).$promise.then(function(){b.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),b.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.scheduler.view",{url:"/view/:id",templateUrl:"app/tools/scheduler/view/view.html",controller:"SchedulerViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.scheduler.view.settings",{url:"/settings",templateUrl:"app/tools/scheduler/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("SchedulerWizardCtrl",["$scope","WizardHandler","$location","xAlert","Scheduler","ReportTree","$translate","DefaultReport","CustomReport","MailServerOut",function(a,b,c,d,e,f,g,h,i,j){function k(){switch(a.item.cronType=a.rangeExec.type,a.rangeExec.type){case"daily":a.item.cron="00 "+a.rangeExec.hour+" * * *";break;case"weekly":a.item.cron="00 "+a.rangeExec.hour+" * * "+a.rangeExec.weekDays.join(",");break;case"monthly":a.item.cron="00 "+a.rangeExec.hour+" "+a.rangeExec.monthDay+" * *"}}a.forms={},a.item={validityStart:8,validityEnd:16,type:"report",reportType:"default"},a.initReports=function(){a.reports=[];var b;return f.query().$promise.then(function(b){return a.defaultTreeData=JSON.parse(b[0].tree),a.customTreeData=JSON.parse(b[1].tree),h.get().$promise}).then(function(c){return a.defRep=c.rows,a.defRep.length&&_.forEach(a.defRep,function(c){b=_.find(a.defaultTreeData,{id:c.parent}),b&&(c.parent="Motion Reports - "+b.text,c.type="default")}),i.get().$promise}).then(function(c){return a.cusRep=c.rows,a.cusRep.length&&_.forEach(a.cusRep,function(c){b=_.find(a.customTreeData,{id:c.parent}),b&&(c.parent="Custom Reports - "+b.text,c.type="custom")}),j.get().$promise}).then(function(b){a.mailServers=b.rows;var c=_.find(a.mailServers,{MailAccountId:null});c&&(c.username+=" (custom)")})["catch"](function(a){d.error(a)})},a.setReportTree=function(b){a.item.reportType=b.type},a.validitySlider={ceil:24,floor:0,showTicks:!0},a.switchValues={today:!1},a.switches={isActive:!0,size:"mini",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.scheduleTypes=[{name:"APPLICATION_REPORT_EXTRACTION",value:"report"}],a.todayCron=[{name:"15 min",value:"*/15 * * * *"},{name:"30 min",value:"*/30 * * * *"},{name:"1 h",value:"0 * * * *"}],a.reportRanges=[{name:"APPLICATION_PREVIOUS_DAY",value:"yesterday"},{name:"APPLICATION_LAST_SEVEN_DAYS",value:"last7"},{name:"APPLICATION_LAST_THIRTY_DAYS",value:"last30"},{name:"APPLICATION_LAST_MONTH",value:"lastMonth"}],a.cronTypes=[{name:"APPLICATION_DAY",value:"daily"},{name:"APPLICATION_WEEK",value:"weekly"},{name:"APPLICATION_MONTH",value:"monthly"}],a.weekDays=[{name:"APPLICATION_MONDAY",value:1},{name:"APPLICATION_TUESDAY",value:2},{name:"APPLICATION_WEDNESDAY",value:3},{name:"APPLICATION_THURSDAY",value:4},{name:"APPLICATION_FRIDAY",value:5},{name:"APPLICATION_SATURDAY",value:6},{name:"APPLICATION_SUNDAY",value:0}],a.tempTodayCron=null,a.checkToday=function(){a.switchValues.today?(a.item.cron=angular.copy(a.tempTodayCron),a.item.cronType="currentDay"):(a.tempTodayCron=angular.copy(a.item.cron),a.item.cron=void 0,k())},a.monthDays=function(){for(var a=[],b=1;31>=b;b++)a.push(b);return a}(),a.hours=function(){for(var a=[],b=0;23>=b;b++)a.push(b);return a}(),a.rangeExec={weekDays:[],monthDay:null,hour:0,type:null},a.$watch("rangeExec",function(b){a.switchValues.today||k()},!0),a.next=function(){b.wizard().next()},a.previous=function(){b.wizard().previous()},a.exitValidation=function(a){return a},a.createItem=function(){return e.save(a.item).$promise.then(function(){c.path("/tools/scheduler/list")})["catch"](function(a){d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.scheduler.wizard",{url:"/wizard",templateUrl:"app/tools/scheduler/wizard/wizard.html",controller:"SchedulerWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("SoundListCtrl",["$scope","$http","socket","Modal","$q","FileUploader","$translate","xAlert","$cookieStore","$sce","Sound",function(a,b,c,d,e,f,g,h,i,j,k){a.Sound=k,a.isCollapsed=!0,a.downloadButtonClass="btn btn-xs blue-hoki",a["delete"]=d.confirm["delete"](function(a){b["delete"]("/api/sounds/"+a).success(function(a){}).error(function(a){console.log(a)})}),a.updateAudio=function(a,c){var d=e.defer();return b.put("/api/sounds/"+a,c).success(function(a){d.resolve()}).error(function(a){console.log(a.message),d.reject(a.message)}),d.promise},a.$on("$destroy",function(){c.unsyncUpdates("sound")}),a.initList=function(){b.get("/api/sounds").success(function(b){a.sounds=b.rows,b.rows.length||(a.isCollapsed=!1),c.syncUpdates("sound",a.sounds,function(){a.sounds.length||(a.isCollapsed=!1)})})};var l=a.uploader=new f({url:"/api/sounds",withCredentials:!0,headers:{Authorization:"Bearer "+i.get("token")}});l.filters.push({name:"customFilter",fn:function(a,b){return this.queue.length<10}}),l.onWhenAddingFileFailed=function(a,b,c){console.info("onWhenAddingFileFailed",a,b,c)},l.onAfterAddingFile=function(a){console.info("onAfterAddingFile",a)},l.onAfterAddingAll=function(a){console.info("onAfterAddingAll",a)},l.onBeforeUploadItem=function(a){console.info("onBeforeUploadItem",a)},l.onProgressItem=function(a,b){console.info("onProgressItem",a,b),a.isUploading=!0},l.onProgressAll=function(a){console.info("onProgressAll",a)},l.onSuccessItem=function(a,b,c,d){console.info("onSuccessItem",a,b,c,d),a.isUploading=!1},l.onErrorItem=function(a,b,c,d){console.info("onErrorItem",a,b,c,d),a.responseMessage=b,a.isUploading=!1},l.onCancelItem=function(a,b,c,d){console.info("onCancelItem",a,b,c,d),a.isUploading=!1},l.onCompleteItem=function(a,b,c,d){console.info("onCompleteItem",a,b,c,d),a.isUploading=!1},l.onCompleteAll=function(){console.info("onCompleteAll")}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.sounds.list",{url:"/list",templateUrl:"app/tools/sound/list/list.html",controller:"SoundListCtrl",authenticate:!0,resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js"]})}]}})}]),angular.module("xCallyShuttleApp").factory("Sound",["$resource",function(a){return a("/api/sounds/:id/:controller",{name:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.sounds",{url:"/sounds",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:60}}})}]),angular.module("xCallyShuttleApp").controller("TagListCtrl",["$scope","$uibModal","Tag","gridOptions","$rootScope",function(a,b,c,d,e){a.initView=function(){var b={exporterCsvFilename:"tag.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/tools/tags/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/tools/tag/list/list.create.modal.html",controller:"TagListCreateCtrl"});c.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("TagListCreateCtrl",["$scope","$translate","$uibModalInstance","Tag","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.tags.list",{url:"/list",templateUrl:"app/tools/tag/list/list.html",controller:"TagListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Tag",["$resource",function(a){return a("/api/tags/:id/:controller/:tag",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.tags",{url:"/tags",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:55}}})}]),angular.module("xCallyShuttleApp").controller("TagViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","$location","Tag","gridOptions","List","Company","Contact","uiGridConstants","usSpinnerService",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){m.stop("spinner-grid"),a.readyGrid=!0}a.getTag=function(){return g.get({id:e.id}).$promise.then(function(b){a.tag=b})["catch"](function(a){c.error(a)})},a.updateTag=function(){var b=angular.copy(a.tag);return g.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){c.error(a)})},a.initChat=function(){m.spin("spinner-grid");var b={enableRowSelection:!1,exporterCsvFilename:"tagChat.csv",columnDefs:[{name:"type"},{name:"status"},{name:"ChatWebsite.name",displayName:"APPLICATION_WEBSITE"},{name:"ChatVisitor.email",displayName:"APPLICATION_VISITOR"},{name:"action",width:40,buttons:[{"class":"green",name:"chatRoom",onClick:"grid.appScope.openRoom(row.entity.id, 'chatRoom')"}]}]};a.gridOptions=h.gridOptions(g,b,a,{controller:"chat",tag:a.tag.name},null,null,n())},a.initMail=function(){m.spin("spinner-grid");var b={enableRowSelection:!1,exporterCsvFilename:"tagMail.csv",columnDefs:[{name:"subject"},{name:"from"},{name:"account"},{name:"status"},{name:"action",width:40,buttons:[{"class":"green",name:"mailRoom",onClick:"grid.appScope.openRoom(row.entity.id, 'mailRoom')"}]}]};a.gridOptions=h.gridOptions(g,b,a,{controller:"mail",tag:a.tag.name},null,null,n())},a.initFax=function(){m.spin("spinner-grid");var b={enableRowSelection:!1,exporterCsvFilename:"tagFax.csv",columnDefs:[{name:"from"},{name:"account"},{name:"status"},{name:"action",width:40,buttons:[{"class":"green",name:"faxRoom",onClick:"grid.appScope.openRoom(row.entity.id, 'faxRoom')"}]}]};a.gridOptions=h.gridOptions(g,b,a,{controller:"fax",tag:a.tag.name},null,null,n())},a.initSms=function(){m.spin("spinner-grid");var b={enableRowSelection:!1,exporterCsvFilename:"tagSms.csv",columnDefs:[{name:"from"},{name:"status"},{name:"action",width:40,buttons:[{"class":"green",name:"smsRoom",onClick:"grid.appScope.openRoom(row.entity.id, 'smsRoom')"}]}]};a.gridOptions=h.gridOptions(g,b,a,{controller:"sms",tag:a.tag.name},null,null,n())},a.initContacts=function(){a.readyGrid=!1,m.spin("spinner-grid");var b;return i.get().$promise.then(function(b){return a.lists=[],b.rows.forEach(function(b,c){a.lists.push({value:b.id,label:b.name})}),j.get().$promise}).then(function(b){a.companies=[],b.rows.forEach(function(b,c){a.companies.push({value:b.id,label:b.name})})}).then(function(){b={enableRowSelection:!1,exporterCsvFilename:"tagContacts.csv",columnDefs:[{name:"firstName"},{name:"lastName"},{name:"phone"},{name:"email"},{name:"ListId",displayName:"APPLICATION_LIST",field:"List.name",filter:{type:l.filter.SELECT,selectOptions:a.lists}},{name:"CompanyId",displayName:"APPLICATION_COMPANY",field:"Company.name",filter:{type:l.filter.SELECT,term:e.companyId||null,selectOptions:a.companies}},{name:"action",width:40,buttons:[{"class":"blue-hoki",name:"profile",onClick:"grid.appScope.openContactTab(row.entity)"}]}]},a.gridOptions=h.gridOptions(g,b,a,{controller:"contacts",tag:a.tag.name},null,null,n())})["catch"](function(a){c.error(a)})},a.openRoom=function(b,c){var d=_.find(a.workspaces,{id:b,type:c});if(d)d.active=!0;else{var e;switch(c){case"mailRoom":e="icon-envelope";break;case"chatRoom":e="fa fa-users";break;case"faxRoom":e="fa fa-fax";break;case"smsRoom":e="glyphicon glyphicon-comment"}a.workspaces.push({id:b,type:c,"class":e,active:!0})}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.tags.view",{url:"/view/:id",templateUrl:"app/tools/tag/view/view.html",controller:"TagViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.tags.view.settings",{url:"/settings",templateUrl:"app/tools/tag/view/view.settings.html"}).state("main.tools.tags.view.chat",{url:"/chat",templateUrl:"app/tools/tag/view/view.chat.html"}).state("main.tools.tags.view.mail",{url:"/mail",templateUrl:"app/tools/tag/view/view.mail.html"
+}).state("main.tools.tags.view.fax",{url:"/fax",templateUrl:"app/tools/tag/view/view.fax.html"}).state("main.tools.tags.view.sms",{url:"/sms",templateUrl:"app/tools/tag/view/view.sms.html"}).state("main.tools.tags.view.contacts",{url:"/contacts",templateUrl:"app/tools/tag/view/view.contacts.html"})}]),angular.module("xCallyShuttleApp").controller("TemplateListCtrl",["$scope","Template","gridOptions",function(a,b,c){a.initView=function(){var d={exporterCsvFilename:"templates.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/tools/templates/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.templates.list",{url:"/list",templateUrl:"app/tools/template/list/list.html",controller:"TemplateListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Template",["$resource",function(a){return a("/api/templates/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.templates",{url:"/templates",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:56}}})}]),angular.module("xCallyShuttleApp").controller("TemplateViewCtrl",["$scope","$rootScope","$http","$translate","$stateParams","xAlert","Template","templateVariable","Variable",function(a,b,c,d,e,f,g,h,i){a.initItem=function(){CKEDITOR.plugins.addExternal("richparams","/assets/plugins/ckeditor-richparams/"),a.options={language:b.language,allowedContent:!0,entities:!1,skin:"office2013",contentsCss:"/assets/css/global/richparams.css",extraPlugins:"richparams,autogrow",autoGrow_minHeight:450,richparams:h,disableNativeSpellChecker:!1,toolbar:[{name:"clipboard",items:["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Table","HorizontalRule","SpecialChar"]},{name:"tools",items:["Maximize"]},{name:"document",items:["Source"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote"]},{name:"styles",items:["Styles","Format"]},"/",{name:"motion",items:["voice","chat","mail"]}]},a.form={},a.item={},a.item=g.get({id:e.id})},a.updateItem=function(){return g.update(a.item).$promise.then(function(){f.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.templates.view",{url:"/view/:id",templateUrl:"app/tools/template/view/view.html",controller:"TemplateViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.templates.view.settings",{url:"/settings",templateUrl:"app/tools/template/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("TemplateWizardCtrl",["$scope","$rootScope","$location","$http","WizardHandler","xAlert","Template","templateVariable",function(a,b,c,d,e,f,g,h){a.initWizard=function(){CKEDITOR.plugins.addExternal("richparams","/assets/plugins/ckeditor-richparams/"),a.options={language:b.language,allowedContent:!0,entities:!1,skin:"office2013",contentsCss:"/assets/css/global/richparams.css",extraPlugins:"richparams,autogrow",autoGrow_minHeight:450,disableNativeSpellChecker:!1,richparams:h,toolbar:[{name:"clipboard",items:["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Table","HorizontalRule","SpecialChar"]},{name:"tools",items:["Maximize"]},{name:"document",items:["Source"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote"]},{name:"styles",items:["Styles","Format"]},"/",{name:"motion",items:["voice","chat","mail"]}]},a.item={},a.form={}},a.exitValidation=function(a){return a},a.createItem=function(){return g.save({name:a.item.name,description:a.item.description,subject:a.item.subject||null,html:a.item.html||null,text:a.item.text||null}).$promise.then(function(){c.path("/tools/templates/list")})["catch"](function(a){f.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.templates.wizard",{url:"/wizard",templateUrl:"app/tools/template/wizard/wizard.html",controller:"TemplateWizardCtrl"})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools",{url:"/tools",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:13}}})}]),angular.module("xCallyShuttleApp").controller("TriggerListCtrl",["$scope","$http","$translate","Modal","xAlert","Trigger","gridOptions",function(a,b,c,d,e,f,g){a.onText="On",a.offText="Off",a.isActive=!0,a.size="mini",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initView=function(){var b={exporterCsvFilename:"Triggers.csv",columnDefs:[{name:"name"},{name:"description"},{name:"channel"},{name:"status",cellTemplate:'<div class="centered-uigrid-td"><input data-ng-change="grid.appScope.updateItem(row.entity)", bs-switch ng-model="row.entity.status" type="checkbox" switch-active="{{ grid.appScope.isActive }}" switch-on-text="{{ grid.appScope.onText }}" switch-off-text="{{ grid.appScope.offText }}" switch-on-color="{{ grid.appScope.onColor }}" switch-off-color="{{ grid.appScope.offColor }}" switch-animate="{{ grid.appScope.animate }}" switch-size="{{ grid.appScope.size }}" switch-label="{{ grid.appScope.label }}" switch-icon="{{ grid.appScope.icon }}" switch-radio-off="{{ grid.appScope.radioOff }}" switch-label-width="{{ grid.appScope.labelWidth }}" switch-handle-width="{{ grid.appScope.handleWidth }}"></div>',width:100,enableFiltering:!1},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/tools/triggers/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=g.gridOptions(f,b,a)},a.updateItem=function(a){return f.update({id:a.id},a).$promise.then(function(){e.show(c.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){e.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.triggers.list",{url:"/list",templateUrl:"app/tools/trigger/list/list.html",controller:"TriggerListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Trigger",["$resource",function(a){return a("/api/triggers/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.triggers",{url:"/triggers",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:50}}})}]),angular.module("xCallyShuttleApp").controller("TriggerViewCtrl",["$scope","$stateParams","$http","$translate","xAlert","triggers","Trigger","$location",function(a,b,c,d,e,f,g,h){a.$triggers=f,a.recordSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.forms={general:{}},a.addCondition=function(b){a.trigger[b].push({field:"",operator:"",value:""})},a.removeCondition=function(b,c){a.trigger[b].splice(c,1)},a.addAction=function(){a.trigger.Actions.push({action:"",data1:"",data2:"",data3:"",data4:"",data5:""})},a.resetActionData=function(a){a.data1="",a.data2="",a.data3="",a.data4="",a.data5=""},a.removeAction=function(b){a.trigger.Actions.splice(b,1)},a.initView=function(){return g.get({id:b.id}).$promise.then(function(b){a.trigger=b})["catch"](function(a){e.error(a),h.path("/tools/triggers/list")})},a.updateTrigger=function(){return g.update({id:b.id},a.trigger).$promise.then(function(){e.show(d.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),e.error(a)})},a.exitValidation=function(b){return!(!b||!a.trigger.All.length&&!a.trigger.Any.length||!a.trigger.Actions.length)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.triggers.view",{url:"/view/:id",templateUrl:"app/tools/trigger/view/view.html",controller:"TriggerViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load({insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]})}]}}).state("main.tools.triggers.view.settings",{url:"/settings",templateUrl:"app/tools/trigger/view/view.settings.html"}).state("main.tools.triggers.view.routes",{url:"/routes",templateUrl:"app/tools/trigger/view/view.routes.html"}).state("main.tools.triggers.view.application",{url:"/application",templateUrl:"app/tools/trigger/view/view.application.html"})}]),angular.module("xCallyShuttleApp").controller("TriggerWizardCtrl",["$scope","$http","$location","xAlert","triggers","WizardHandler","Trigger",function(a,b,c,d,e,f,g){a.$triggers=e,a.statusSwitch={onText:"On",offText:"Off",isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.tempData={voice:{},mail:{},chat:{},fax:{}},a.item={All:[],Any:[],Actions:[]},a.forms={general:void 0,settings:void 0},a.addCondition=function(b){a.item[b].push({field:"",operator:"",value:""})},a.removeCondition=function(b,c){a.item[b].splice(c,1)},a.addAction=function(){a.item.Actions.push({action:"",data1:"",data2:"",data3:"",data4:"",data5:""})},a.resetActionData=function(a){a.data1="",a.data2="",a.data3="",a.data4="",a.data5=""},a.removeAction=function(b){a.item.Actions.splice(b,1)},a.$watch("item.channel",function(b,c){c&&(a.tempData[c].All=_.clone(a.item.All,!0),a.tempData[c].Any=_.clone(a.item.Any,!0),a.tempData[c].Actions=_.clone(a.item.Actions,!0)),a.item.All=a.tempData[b].All?a.tempData[b].All:[],a.item.Any=a.tempData[b].Any?a.tempData[b].Any:[],a.item.Actions=a.tempData[b].Actions?a.tempData[b].Actions:[]},!0),a.item.channel="voice",a.createItem=function(){return g.save(a.item).$promise.then(function(){c.path("/tools/triggers/list")})["catch"](function(a){console.error(a),d.error(a)})},a.next=function(){f.wizard().next()},a.previous=function(){f.wizard().previous()},a.exitValidation=function(a){return a},a.exitSettingsValidation=function(b){return!(!b||!a.item.All.length&&!a.item.Any.length||!a.item.Actions.length)}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.triggers.wizard",{url:"/wizard",templateUrl:"app/tools/trigger/wizard/wizard.html",controller:"TriggerWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("TrunkListCtrl",["$scope","Trunk","gridOptions","xAlert","$translate","socket",function(a,b,c,d,e,f){function g(){f.socket.on("trunk:update",function(b){var c=_.find(a.gridOptions.data,{name:b.name});c&&(c.status=b.status,c.peerstatus=b.peerstatus)})}a.isActive=!0,a.size="mini",a.animate=!0,a.radioOff=!0,a.handleWidth="auto",a.labelWidth="auto",a.inverse=!0,a.offColor="danger",a.onColor="success",a.initView=function(){var d={exporterCsvFilename:"Trunks.csv",columnDefs:[{name:"name"},{name:"active",cellTemplate:'<div class="centered-uigrid-td"><input data-ng-change="grid.appScope.updateItem(row.entity)", bs-switch ng-model="row.entity.active" type="checkbox" switch-active="{{ grid.appScope.isActive }}" switch-on-text="{{ \'APPLICATION_YES\' | translate }}" switch-off-text="{{ \'APPLICATION_NO\' | translate }}" switch-on-color="{{ grid.appScope.onColor }}" switch-off-color="{{ grid.appScope.offColor }}" switch-animate="{{ grid.appScope.animate }}" switch-size="{{ grid.appScope.size }}" switch-label="{{ grid.appScope.label }}" switch-icon="{{ grid.appScope.icon }}" switch-radio-off="{{ grid.appScope.radioOff }}" switch-label-width="{{ grid.appScope.labelWidth }}" switch-handle-width="{{ grid.appScope.handleWidth }}"></div>'},{name:"host"},{name:"description"},{name:"status",cellTemplate:'<div class="centered-uigrid-td" data-ng-if="row.entity.active && row.entity.registry && row.entity.status">{{row.entity.status}}</div>'},{name:"peerstatus",cellTemplate:'<div class="centered-uigrid-td" data-ng-if="row.entity.active && row.entity.peerstatus">{{row.entity.peerstatus}}</div>'},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/tools/trunks/view/{{row.entity.name}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.name)"}]}]};a.gridOptions=c.gridOptions(b,d,a,null,null,null,g)},a.updateItem=function(a){return b.update({id:a.name},a).$promise.then(function(){d.show(e.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){console.error(a),d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.trunks.list",{url:"/list",templateUrl:"app/tools/trunk/list/list.html",controller:"TrunkListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Trunk",["$resource",function(a){return a("/api/trunks/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.trunks",{url:"/trunks",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:52}}})}]),angular.module("xCallyShuttleApp").controller("TrunkViewCtrl",["$scope","$http","xAlert","$translate","$stateParams","socket","$location","Trunk","VoiceContext",function(a,b,c,d,e,f,g,h,i){a.activeSwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.initView=function(){return h.get({id:e.id}).$promise.then(function(b){b.nat=b.nat?b.nat.split(","):[],b.allow=b.allow?b.allow.split(";"):[],b.insecure=b.insecure?b.insecure.split(","):[],b.transport=b.transport?b.transport.split(","):[],a.trunk=b}).then(function(){f.socket.on("trunk:update",function(b){a.trunk.name===b.name&&(a.trunk.status=b.status)})})["catch"](function(a){console.error(a),g.path("/tools/trunks/list")})},a.updateTrunk=function(){""===a.trunk.password&&delete a.trunk.password;var b=angular.copy(a.trunk);return b.nat=b.nat.join(","),b.allow=b.allow.join(";"),b.insecure=b.insecure.join(","),b.transport=b.transport.join(","),h.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){c.error(a)})},a.getContexts=function(){return i.get().$promise.then(function(b){a.voiceContexts=b.rows})["catch"](function(a){c.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.trunks.view",{url:"/view/:id",templateUrl:"app/tools/trunk/view/view.html",controller:"TrunkViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.trunks.view.settings",{url:"/settings",templateUrl:"app/tools/trunk/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("TrunkWizardCtrl",["$scope","WizardHandler","$location","xAlert","Trunk",function(a,b,c,d,e){a.initWizard=function(){a.forms={},a.item={context:"from-voip-provider"}},a.next=function(){b.wizard().next()},a.previous=function(){b.wizard().previous()},a.exitValidation=function(a){return a},a.createItem=function(){return a.item.fromuser=a.item.defaultuser,a.item.fromdomain=a.item.host,e.save(a.item).$promise.then(function(){c.path("/tools/trunks/list")})["catch"](function(a){d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.trunks.wizard",{url:"/wizard",templateUrl:"app/tools/trunk/wizard/wizard.html",controller:"TrunkWizardCtrl"})}]),angular.module("xCallyShuttleApp").controller("VariableListCtrl",["$scope","$uibModal","Variable","gridOptions",function(a,b,c,d){a.initView=function(){var b={exporterCsvFilename:"variables.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:75,buttons:[{"class":"blue-hoki",href:"/tools/variables/view/{{row.entity.id}}/settings",name:"settings"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(c,b,a)},a.createItem=function(){var c=b.open({animation:!0,templateUrl:"app/tools/variable/list/list.create.modal.html",controller:"VariableListCreateCtrl"});c.result.then(function(b){console.log(b),a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("VariableListCreateCtrl",["$scope","$translate","$uibModalInstance","Variable","xAlert",function(a,b,c,d,e){a.form={},a.item={},a.save=function(){return d.save(a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.variables.list",{url:"/list",templateUrl:"app/tools/variable/list/list.html",controller:"VariableListCtrl"})}]),angular.module("xCallyShuttleApp").factory("Variable",["$resource",function(a){return a("/api/variables/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.variables",{url:"/variables",template:"<div ui-view></div>","abstract":!0,data:{permissions:{only:["admin","user"],redirectTo:"landing",id:54}}})}]),angular.module("xCallyShuttleApp").controller("VariableViewCtrl",["$scope","$translate","$stateParams","xAlert","Variable",function(a,b,c,d,e){a.getVariable=function(){return e.get({id:c.id}).$promise.then(function(b){a.variable=b})["catch"](function(a){d.error(a)})},a.updateVariable=function(){return e.update({id:c.id},a.variable).$promise.then(function(){d.show(b.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.variables.view",{url:"/view/:id",templateUrl:"app/tools/variable/view/view.html",controller:"VariableViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.tools.variables.view.settings",{url:"/settings",templateUrl:"app/tools/variable/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").controller("YourdashboardListCloneModalCtrl",["$scope","$uibModalInstance",function(a,b){a.forms={dashboard:void 0},a.item={},a.ok=function(){b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("YourdashboardListCreateModalCtrl",["$scope","$uibModalInstance",function(a,b){a.forms={dashboard:void 0},a.item={},a.ok=function(){a.item.model=JSON.stringify({title:a.item.name}),b.close(a.item)},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("YourdashboardListCtrl",["$scope","$http","$translate","xAlert","Modal","$uibModal","$log","YourDashboard","gridOptions",function(a,b,c,d,e,f,g,h,i){a.initView=function(){var b={exporterCsvFilename:"voice_contexts.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:125,buttons:[{"class":"green",href:"/tools/yourdashboards/show/{{row.entity.id}}",name:"view"},{"class":"blue-hoki",href:"/tools/yourdashboards/view/{{row.entity.id}}/settings",name:"settings"},{"class":"{{row.entity.defaultEntry ? 'red-sunglo disabled' : 'red-sunglo'}}",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"},{"class":"purple",name:"clone",onClick:"grid.appScope.clone(row.entity.id)"}]}]};a.gridOptions=i.gridOptions(h,b,a)},a.create=function(){var b=f.open({animation:!0,templateUrl:"app/tools/yourdashboard/list/create.modal.html",controller:"YourdashboardListCreateModalCtrl"});b.result.then(function(b){return h.save(b).$promise.then(function(){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),a.gridOptions.getPage()})["catch"](function(a){console.error(a),d.error(a)})},function(){g.info("Modal dismissed at: "+new Date)})},a.clone=function(b){var e=f.open({animation:!0,templateUrl:"app/tools/yourdashboard/list/clone.modal.html",controller:"YourdashboardListCloneModalCtrl"});e.result.then(function(e){return h.save({id:b,controller:"clone"},e).$promise.then(function(){d.show(c.instant("MESSAGE_WELL_DONE"),"success"),a.gridOptions.getPage()})["catch"](function(a){console.error(a),d.error(a)})},function(){g.info("Modal dismissed at: "+new Date)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.yourdashboards.list",{url:"/list",templateUrl:"app/tools/yourdashboard/list/list.html",controller:"YourdashboardListCtrl",data:{permissions:{only:["admin","user"],redirectTo:"landing",id:59}}})}]),angular.module("xCallyShuttleApp").controller("LeaveEditedDashboardModalCtrl",["$scope","$uibModalInstance",function(a,b){a.close=function(){b.close()},a.cancel=function(){b.dismiss("cancel")}}]),angular.module("xCallyShuttleApp").controller("YourdashboardShowCtrl",["$scope","$rootScope","localStorageService","xAlert","$translate","Auth","$stateParams","$location","$uibModal","$log","YourDashboard",function(a,b,c,d,e,f,g,h,i,j,k){function l(a){var b,c;if(!a)return 0;for(a=a.toString(),b=c=a.length;b--;){var d=a[b].charCodeAt();d>=56320&&57343>=d&&b--,d>127&&2047>=d?c++:d>2047&&65535>=d&&(c+=2)}return c}a.Auth=f,a.editMode=!1,a.getDashboard=function(){return k.get({id:g.id}).$promise.then(function(b){!b[f.getRole()]&&h.path("/landing");var c={name:"dashboard",structure:"4-8",enableconfirmdelete:!0,maximizable:!0,collapsible:!0};b.model=JSON.parse(b.model||'{"title":"Dashboard"}'),b.editable=!(!f.isAdmin()||!b.editable),a.dashboard=_.merge(c,b)})["catch"](function(a){h.path("/tools/yourdashboards/list")})},a.$on("$locationChangeStart",function(b,c,d){if(a.editMode){b.preventDefault();var e=i.open({animation:!0,templateUrl:"app/tools/yourdashboard/show/leaveEditedDashboard.modal.html",controller:"LeaveEditedDashboardModalCtrl"});e.result.then(function(b){a.editMode=!1;var d=location.protocol+"//"+location.host;h.path(c.replace(d,""))},function(){j.info("Modal dismissed at: "+new Date)})}});var m=function(c,f,h){var i=angular.copy(a.dashboard);return i.name=a.dashboard.model.title,i.model=JSON.stringify(i.model),l(i.model)<=64e3?k.update({id:g.id},i).$promise.then(function(){d.show(e.instant("MESSAGE_DASHBOARD_SAVED")+"!","success"),a.editMode=!1})["catch"](function(b){d.error(b),i.model=JSON.parse(i.model),i.name="dashboard",a.dashboard=i}):(d.show(e.instant("MESSAGE_DASHBOARD_TOO_BIG")+"!","warning"),void b.$broadcast("adfToggleEditMode"))};a.$on("adfDashboardChanged",m),a.$on("adfIsEditMode",function(){a.editMode=!0}),a.$on("destroy",function(){console.log("main dashboard")})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.yourdashboards.show",{url:"/show/:id",templateUrl:"app/tools/yourdashboard/show/show.html",controller:"YourdashboardShowCtrl",data:{permissions:{only:["admin","user","agent"],redirectTo:"landing",id:2}}})}]),angular.module("xCallyShuttleApp").controller("YourdashboardViewCtrl",["$scope","$rootScope","xAlert","$translate","$stateParams","$location","YourDashboard",function(a,b,c,d,e,f,g){a.radioSwitch={isActive:!0,size:"small",animate:!0,radioOff:!0,handleWidth:"auto",labelWidth:"auto",inverse:!0,offColor:"danger",onColor:"success"},a.getDashboard=function(){return g.get({id:e.id}).$promise.then(function(b){delete b.model,a.dashboard=b})["catch"](function(){f.path("/tools/yourdashboards/list")})},a.updateDashboard=function(){var b=angular.copy(a.dashboard);return g.update({id:e.id},b).$promise.then(function(){c.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(d){c.error(d),a.dashboard=b})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.yourdashboards.view",{url:"/view/:id",templateUrl:"app/tools/yourdashboard/view/view.html",controller:"YourdashboardViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/plugins/bootstrap-fileinput/bootstrap-fileinput.css","assets/css/profile.css","assets/css/tasks.css"]}])}]},data:{permissions:{only:["admin","user"],redirectTo:"landing",id:59}}}).state("main.tools.yourdashboards.view.settings",{url:"/settings",templateUrl:"app/tools/yourdashboard/view/view.settings.html"})}]),angular.module("xCallyShuttleApp").factory("YourDashboard",["$resource",function(a){return a("/api/dashboards/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.tools.yourdashboards",{url:"/yourdashboards",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ZendeskListCtrl",["$scope","ZendeskAccount","gridOptions","xAlert","$translate",function(a,b,c,d,e){a.initView=function(){var d={exporterCsvFilename:"zendesk_account.csv",columnDefs:[{name:"name",displayName:"APPLICATION_NAME"},{name:"username"},{name:"remoteUri",displayName:"APPLICATION_URI"},{name:"action",buttons:[{"class":"blue-hoki",href:"/zendesk/view/{{row.entity.id}}/account",name:"profile"},{"class":"green-jungle",name:"check",onClick:"grid.appScope.checkAccount(row.entity.id)"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=c.gridOptions(b,d,a)},a.checkAccount=function(a){return b.check({id:a}).$promise.then(function(){d.show(e.instant("MESSAGE_ACCOUNT_VERIFIED"),"success")})["catch"](function(){d.show(e.instant("MESSAGE_ACCOUNT_INVALID"),"danger")})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.list",{url:"/list",templateUrl:"app/zendesk/list/list.html",controller:"ZendeskListCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{name:"smart-table",insertBefore:"#ng_load_plugins_before",files:["assets/css/smart_table.css"]}])}]}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.view.configurations",{url:"/configurations",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").controller("ZendeskViewConfigurationListCtrl",["$scope","$stateParams","$translate","gridOptions","ZendeskConfiguration","$uibModal",function(a,b,c,d,e,f){a.initView=function(){var c={exporterCsvFilename:"zendesk_configurations.csv",columnDefs:[{name:"name"},{name:"description"},{name:"action",width:125,buttons:[{"class":"blue-hoki",href:"/zendesk/view/{{row.entity.AccountId}}/configurations/view/{{row.entity.id}}",name:"profile"},{"class":"red-sunglo",name:"delete",onClick:"grid.appScope.deleteItem(row.entity.name, row.entity.id)"}]}]};a.gridOptions=d.gridOptions(e,c,a,{accountId:b.id})},a.createItem=function(){var b=f.open({animation:!0,templateUrl:"app/zendesk/view/configuration/list/create.modal.html",controller:"ZendeskCreateConfigurationCtrl"});b.result.then(function(){a.gridOptions.getPage()})}}]),angular.module("xCallyShuttleApp").controller("ZendeskCreateConfigurationCtrl",["$scope","$translate","$uibModalInstance","ZendeskConfiguration","xAlert","$stateParams","channel",function(a,b,c,d,e,f,g){a.form={},a.item={},a.channels=g,a.item.channel="voice",a.item.type="Queue",a.save=function(){return d.save({accountId:f.id},a.item).$promise.then(function(a){e.show(b.instant("MESSAGE_WELL_DONE"),"success"),c.close(a)})["catch"](function(a){e.error(a)})},a.cancel=function(){c.dismiss()}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.view.configurations.list",{url:"/list",templateUrl:"app/zendesk/view/configuration/list/list.html",controller:"ZendeskViewConfigurationListCtrl"})}]),angular.module("xCallyShuttleApp").controller("ZendeskViewConfigurationViewCtrl",["$scope","$stateParams","$filter","$translate","socket","ZendeskConfiguration","xAlert","variable","Variable","ZendeskAccount","Tag","ZendeskField",function(a,b,c,d,e,f,g,h,i,j,k,l){a.$on("$destroy",function(){e.unsyncUpdates("zendesk_field")}),a.config={autoHideScrollbar:!1,theme:"dark",advanced:{updateOnContentResize:!0},setHeight:300,scrollInertia:0},a.fieldType=[{type:"string",title:"String"},{type:"variable",title:"Variable"},{type:"customVariable",title:"Custom Variable"}],a.descFieldType=[{type:"string",title:"String"},{type:"keyValue",title:"Key Value"}],a.groupVariableByGroup=function(a){switch(a.group){case"voice_queue":return"Voice: Queue";case"voice_outbound":return"Voice: Outbound";default:return"Other"}},a.initView=function(){a.configurationName="",a.subjectConfig=[],a.descriptionConfig=[],a.fieldConfig=[],a.selectedTags={tags:[]},a.variables=h},a.getConfiguration=function(){return f.get({accountId:b.id,id:b.configurationId}).$promise.then(function(b){a.configurationName=b.name,a.subjectConfig=b.Subject,a.descriptionConfig=b.Description,a.fieldConfig=b.Field,a.selectedTags={tags:_.map(b.Tags,function(a){return a.id})},e.socket.on("zendesk_field:remove",function(b){_.remove(a.subjectConfig,{id:b.id}),_.remove(a.descriptionConfig,{id:b.id}),_.remove(a.fieldConfig,{id:b.id})})})["catch"](function(a){g.error(a)})},a.getCustomVariables=function(){return i.get().$promise.then(function(b){a.customVariables=b.rows})["catch"](function(a){g.error(a)})},a.getFields=function(){return j.fields({id:b.id}).$promise.then(function(b){a.accountFields=c("zendesk")(b)})["catch"](function(a){g.error(a)})},a.getTags=function(){return k.get().$promise.then(function(b){a.tags=b.rows})["catch"](function(a){g.error(a)})},a.addItem=function(c){var d={};switch(c){case"subject":case"description":d={type:"string",content:""};break;case"field":d={content:""}}return f.save({accountId:b.id,id:b.configurationId,controller:c},d).$promise.then(function(b){switch(c){case"subject":a.subjectConfig.push(b);break;case"description":a.descriptionConfig.push(b);break;case"field":a.fieldConfig.push(b)}})["catch"](function(a){g.error(a)})},a.changeType=function(b){"variable"===b.type?(b.content="",b.variableName=""):"string"===b.type?(b.VariableId=null,b.variableName=""):"customVariable"===b.type&&(b.VariableId=null,b.content=""),a.updateField(b)},a.updateField=function(a){return l.update({accountId:b.id,configurationId:b.configurationId,id:a.id},a).$promise.then(function(){})["catch"](function(a){g.error(a)})},a.removeItem=function(a){return l["delete"]({accountId:b.id,configurationId:b.configurationId,id:a.id}).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE")+"!","success")})["catch"](function(a){g.error(a)})},a.changeDescType=function(b){"keyValue"===b.type?(b.content="","string"===b.keyType?(b.VariableId=null,b.variableName=""):"variable"===b.keyType?(b.keyContent="",b.VariableId=null):"customVariable"===b.keyType&&(b.keyContent="",b.variableName="")):"string"===b.type&&(b.VariableId=null,b.variableName="",b.key="",b.keyContent=""),a.updateField(b)},a.changeFieldType=function(b){if(b.content="",b.variableName="",b.nameField="",b.VariableId=null,b.idField){var c=_.find(a.accountFields,"id",b.idField);c&&(c.system_field_options?(b.customField=!1,
+b.nameField=c.title.toLowerCase()):b.customField=!0)}a.updateField(b)},a.updateTags=function(){return f.update({accountId:b.id,id:b.configurationId,controller:"tags"},a.selectedTags.tags).$promise.then(function(){g.show(d.instant("MESSAGE_WELL_DONE")+".","success")})["catch"](function(a){g.error(a)})},a.getSystemFieldOptions=function(b){if(b){var c=_.find(a.accountFields,"id",b);return c?c.system_field_options?c.system_field_options:null:void 0}}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.view.configurations.view",{url:"/view/:configurationId",templateUrl:"app/zendesk/view/configuration/view/view.html",controller:"ZendeskViewConfigurationViewCtrl"})}]),angular.module("xCallyShuttleApp").controller("ZendeskViewCtrl",["$scope","$stateParams","$translate","xAlert","Modal","ZendeskAccount",function(a,b,c,d,e,f){a.initView=function(){return f.get({id:b.id}).$promise.then(function(b){a.account=b})["catch"](function(a){d.error(a)})},a.updateItem=function(){return f.update({id:b.id},a.account).$promise.then(function(){d.show(c.instant("MESSAGE_WELL_DONE")+".","success")})["catch"](function(a){d.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.view",{url:"/view/:id",templateUrl:"app/zendesk/view/view.html",controller:"ZendeskViewCtrl",resolve:{deps:["$ocLazyLoad",function(a){return a.load([{insertBefore:"#ng_load_plugins_before",files:["assets/css/profile.css","assets/css/tasks.css"]}])}]}}).state("main.zendesk.view.account",{url:"/account",templateUrl:"app/zendesk/view/view.account.html"})}]),angular.module("xCallyShuttleApp").controller("ZendeskWizardCtrl",["$scope","$http","$location","$translate","xAlert","WizardHandler","ZendeskAccount",function(a,b,c,d,e,f,g){a.translate=d,a.initWizard=function(){a.$translate=d,a.forms={},a.item={},a.item.authType="password",a.item.serverUrl=c.protocol()+"://"+location.host},a.next=function(){f.wizard().next()},a.exitValidation=function(a){return a},a.createItem=function(){return g.save(a.item).$promise.then(function(){e.show(d.instant("MESSAGE_WELL_DONE")+".","success"),c.path("/zendesk/list")})["catch"](function(a){e.error(a)})}}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk.wizard",{url:"/wizard",templateUrl:"app/zendesk/wizard/wizard.html",controller:"ZendeskWizardCtrl"})}]),angular.module("xCallyShuttleApp").factory("ZendeskAccount",["$resource",function(a){return a("/api/zendesk/accounts/:id/:controller",{id:"@id"},{update:{method:"PUT"},fields:{params:{controller:"fields"},isArray:!0},check:{params:{controller:"check"}}})}]).factory("ZendeskConfiguration",["$resource",function(a){return a("/api/zendesk/accounts/:accountId/configurations/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]).factory("ZendeskField",["$resource",function(a){return a("/api/zendesk/accounts/:accountId/configurations/:configurationId/fields/:id/:controller",{id:"@id"},{update:{method:"PUT"}})}]),angular.module("xCallyShuttleApp").config(["$stateProvider",function(a){a.state("main.zendesk",{url:"/zendesk",template:"<div ui-view></div>","abstract":!0})}]),angular.module("xCallyShuttleApp").factory("Auth",["$location","$rootScope","$http","User","$cookieStore","$q","localStorageService",function(a,b,c,d,e,f,g){var h={};return e.get("token")&&(h=d.me()),{login:function(a,i){var j=i||angular.noop,k=f.defer();return c.post("/auth/local",{name:a.name,password:a.password,remember:a.remember}).success(function(a){return e.put("role",a.role),e.put("token",a.token),e.put("userId",a.userId),g.set("loggedIn",!0),h=d.me({},function(){b.$broadcast("login")}),k.resolve(a),j()}).error(function(a){return this.logout(),k.reject(a),j(a)}.bind(this)),k.promise},recover:function(a,b){var d=b||angular.noop,e=f.defer();return c.post("/auth/local/recover",{email:a.email}).success(function(a){return e.resolve(a),d()}).error(function(a){return e.reject(a),d(a)}.bind(this)),e.promise},reset:function(a,b){var d=b||angular.noop,e=f.defer();return c.post("/auth/local/reset/"+a.token,{password:a.password}).success(function(a){return e.resolve(a),d()}).error(function(a){return e.reject(a),d(a)}.bind(this)),e.promise},loginWithToken:function(a,c,f){e.put("role",f),e.put("token",a),e.put("userId",c),h=d.me({},function(){b.$broadcast("login")})},logout:function(){e.remove("role"),e.remove("token"),e.remove("userId"),g.set("loggedIn"),h={},b.$broadcast("logout")},createUser:function(a,b){var c=b||angular.noop;return d.save(a,function(b){return e.put("token",b.token),h=d.me(),c(a)},function(a){return this.logout(),c(a)}.bind(this)).$promise},changePassword:function(a,b,c){var e=c||angular.noop;return d.changePassword({id:h.id},{oldPassword:a,newPassword:b},function(a){return e(null,a)},function(a){return e(a)}).$promise},getCurrentUser:function(){return h},isLoggedIn:function(){return h.hasOwnProperty("role")},isLoggedInAsync:function(a){h.hasOwnProperty("$promise")?h.$promise.then(function(){a(!0)})["catch"](function(){a(!1)}):a(h.hasOwnProperty("role")?!0:!1)},isAdmin:function(){return"admin"===(e.get("role")||h.role)},isUser:function(){return"user"===(e.get("role")||h.role)},isAgent:function(){return"agent"===(e.get("role")||h.role)},getRole:function(){return h.role},getToken:function(){return e.get("token")}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderAccountEmail",["$compile","$timeout","MailAccount","xAlert","Template",function(a,b,c,d,e){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/accountEmail/actionBuilder.html",compile:function(f){function g(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var h,i;return h=f.contents().remove(),function(f,j){f.randomName=g(),b(function(){return c.get().$promise.then(function(a){return _.forEach(a.rows,function(a){a.id=String(a.id)}),f.accounts=a,e.get().$promise}).then(function(a){_.forEach(a.rows,function(a){a.id=String(a.id)}),f.templates=a.rows})["catch"](function(a){d.error(a)})}),i||(i=a(h)),j.append(i(f,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderAccountSms",["$compile","$timeout","SmsAccount","xAlert",function(a,b,c,d){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/accountSms/actionBuilder.html",compile:function(e){function f(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var g,h;return g=e.contents().remove(),function(e,i){e.randomName=f(),b(function(){return c.get().$promise.then(function(a){_.forEach(a.rows,function(a){a.id=String(a.id)}),e.accounts=a})["catch"](function(a){d.error(a)})}),h||(h=a(g)),i.append(h(e,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderAccountTemplate",["$compile","xAlert","$http","$timeout","Template","MailAccount",function(a,b,c,d,e,f){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/accountTemplate/actionBuilder.html",compile:function(c){function g(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var h,i;return h=c.contents().remove(),function(c,j){c.randomName=g(),d(function(){return e.get().$promise.then(function(a){_.forEach(a.rows,function(a){a.id=String(a.id)}),c.templates=a}).then(function(){return f.get()}).then(function(a){c.accounts=a})["catch"](function(a){b.error(a)})}),i||(i=a(h)),j.append(i(c,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderClose",["$compile",function(a){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/close/actionBuilder.html",compile:function(b){function c(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var d,e;return d=b.contents().remove(),function(b,f){b.randomName=c(),e||(e=a(d)),f.append(e(b,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderEmail",["$compile","xAlert","$timeout","Template",function(a,b,c,d){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/email/actionBuilder.html",compile:function(e){function f(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var g,h;return g=e.contents().remove(),function(e,i){e.randomName=f(),c(function(){return d.get().$promise.then(function(a){_.forEach(a.rows,function(a){a.id=String(a.id)}),e.templates=a.rows})["catch"](function(a){b.error(a)})}),h||(h=a(g)),i.append(h(e,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderForward",["$compile",function(a){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/forward/actionBuilder.html",compile:function(b){function c(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var d,e;return d=b.contents().remove(),function(b,f){b.randomName=c(),e||(e=a(d)),f.append(e(b,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderHttp",["$compile",function(a){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/http/actionBuilder.html",compile:function(b){function c(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var d,e;return d=b.contents().remove(),function(b,f){b.randomName=c(),b.methods=["GET","POST"],e||(e=a(d)),f.append(e(b,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderIntegration",["$compile","xAlert","$http","$timeout","Integration","$translate","ZendeskAccount","DeskAccount","SalesforceAccount","FreshdeskAccount","SugarcrmAccount",function(a,b,c,d,e,f,g,h,i,j,k){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/integration/actionBuilder.html",compile:function(c){function f(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var l,m;return l=c.contents().remove(),function(c,n){c.randomName=f(),d(function(){return e.get({active:1}).$promise.then(function(a){_.remove(a.rows,function(a){return"iframe"===a.state}),c.integrations=a.rows,c.element.data1&&o()})["catch"](function(a){b.error(a)})});var o=function(){var a;switch(c.element.data1){case"zendesk":a=g;break;case"desk":a=h;break;case"salesforce":a=i;break;case"freshdesk":a=j;break;case"sugarcrm":a=k}return a?a.get().$promise.then(function(a){c.accounts=a.rows,c.element.data2&&p()})["catch"](function(a){b.error(a)}):void 0},p=function(){c.configurations=_.find(c.accounts,{id:Number(c.element.data2)}).Configurations};c.changeIntegration=function(){c.element.data2="",o()},c.changeAccount=function(){c.element.data3="",p()},m||(m=a(l)),n.append(m(c,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderJscripty",["$compile","xAlert","$http","$timeout","Template","$translate","JscriptyProject",function(a,b,c,d,e,f,g){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/jscripty/actionBuilder.html",compile:function(c){var e,f;return e=c.contents().remove(),function(c,h){function i(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}c.randomName=i(),d(function(){return g.get().$promise.then(function(a){_.forEach(a.rows,function(a){a.id=String(a.id)}),c.projects=a.rows})["catch"](function(a){b.error(a)})}),f||(f=a(e)),h.append(f(c,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderMotionBar",["$compile","xAlert","$http","$timeout","Template",function(a,b,c,d,e){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/motionbar/actionBuilder.html",compile:function(c){var f,g;return f=c.contents().remove(),function(c,h){function i(){return e.get().$promise.then(function(a){_.forEach(a.rows,function(a){a.id=String(a.id)}),c.templates=a.rows})["catch"](function(a){b.error(a)})}function j(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}c.randomName=j(),c.motionActions=[{name:"Popup",value:"0"},{name:"URL",value:"1"},{name:"Windows App",value:"2"}],c.changeMode=function(){c.element.data2="",c.element.data3="",i()},d(function(){return i()}),g||(g=a(f)),h.append(g(c,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderStatus",["$compile",function(a){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/status/actionBuilder.html",compile:function(b){var c,d;return c=b.contents().remove(),function(b,e){function f(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}b.randomName=f(),b.states=[{name:"APPLICATION_STATUS_NEW",value:"NEW"},{name:"APPLICATION_STATUS_OPEN",value:"OPEN"},{name:"APPLICATION_STATUS_PENDING",value:"PENDING"},{name:"APPLICATION_STATUS_CLOSED",value:"CLOSED"}],d||(d=a(c)),e.append(d(b,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderTag",["$compile","xAlert","$http","$timeout","Tag",function(a,b,c,d,e){return{restrict:"E",scope:{myElement:"=element",form:"="},templateUrl:"components/directives/action/tag/actionBuilder.html",compile:function(c){function f(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var g,h;return g=c.contents().remove(),function(c,i){console.log("myElement",c.myElement),c.randomName=f(),c.data={tags:c.myElement.data1?c.myElement.data1.split(";"):[]},c.$watch("data.tags",function(a){c.myElement.data1=a.join(";")}),d(function(){return e.get().$promise.then(function(a){c.tags=a.rows})["catch"](function(a){b.error(a)})}),h||(h=a(g)),i.append(h(c,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderTemplate",["$compile","xAlert","$timeout","Template",function(a,b,c,d){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/template/actionBuilder.html",compile:function(e){function f(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var g,h;return g=e.contents().remove(),function(e,i){e.randomName=f(),c(function(){return d.get().$promise.then(function(a){_.forEach(a.rows,function(a){a.id=String(a.id)}),e.templates=a.rows})["catch"](function(a){b.error(a)})}),h||(h=a(g)),i.append(h(e,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("actionBuilderUrlForward",["$compile",function(a){return{restrict:"E",scope:{element:"=",form:"="},templateUrl:"components/directives/action/urlforward/actionBuilder.html",compile:function(b){function c(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}var d,e;return d=b.contents().remove(),function(b,f){b.randomName=c(),b.types=[{name:"HTTP GET",value:"GET"},{name:"HTTP POST",value:"POST"}],e||(e=a(d)),f.append(e(b,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").directive("conditionBuilder",["$compile","$timeout","$translate","xAlert",function(a,b,c,d){return{restrict:"E",scope:{element:"=",serviceindex:"=",service:"=",form:"="},templateUrl:"components/directives/condition/conditionBuilder.html",compile:function(e){var f,g;return f=e.contents().remove(),function(e,h){function i(a){var b=_.find(e.service.services[e.serviceindex].conditions,{value:a});if(b)if(e.elementType=b.type,b.arr)e.values=b.arr;else if(b.resource)return b.resource.get(b.params||{}).$promise.then(function(a){e.values=_.map(a.rows,function(a){return{name:a[b.resName||b.resValue],value:a[b.resValue]}})})["catch"](function(a){d.show(c.instant(a.message),"danger")})}function j(a,b){var c=[];for(a=a||5,b=b||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";--a;)c.push(b.charAt(Math.floor(Math.random()*b.length)));return c.join("")}e._=_,e.randomName=j(),b(function(){e.element.field&&i(e.element.field)}),e.checkCondition=function(a){e.element.value="",e.element.operator="",i(a)},g||(g=a(f)),h.append(g(e,function(a){return a}))}}}}]),angular.module("xCallyShuttleApp").factory("xNotificationLicense",["Notification","$rootScope","$location",function(a,b,c){return{show:function(d){var e=b.$new();return e["class"]="alert-warning",e.icon="fa fa-exclamation-triangle",e.more=function(){c.path("/setting/license/view")},new a({delay:d,templateUrl:"components/factories/xNotificationLicense/xNotificationLicense.html",scope:e})}}}]),angular.module("xCallyShuttleApp").filter("secToTime",[function(){return function(a){return new Date(1970,0,1).setSeconds(a)}}]),angular.module("xCallyShuttleApp").controller("FooterController",["$scope","Setting",function(a,b){a.year=moment().year(),a.$on("$includeContentLoaded",function(){Layout.initFooter()}),a.initFooter=function(){return b.get({controller:"info"}).$promise.then(function(b){a.info=b})["catch"](function(a){console.error(a)})}}]),angular.module("xCallyShuttleApp").controller("HeaderController",["$scope","$rootScope","$location","$state","$http","$interval","$notification","Auth","xAlert","socket","xNotificationLicense","toastr","localStorageService","Agent","SmsReport","MailReport","OpenChannelReport","ChatReport","ChatRoom","xNotification","$timeout","$translate","$window","User","Pause","Action","FaxReport","List","MailAccount","ChatWebsite","FaxAccount","SmsAccount","OpenChannelAccount","ReportAgent","$uibModal","$log","ReportDial",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K){function L(a,b,c){return null===b&&(b=50),null===c&&(c="..."),a&&a.length>b?a.substring(0,b-c.length)+c:a}function M(b){var c,d="reason";switch(b){case"mail":c=p;break;case"chat":c=r;break;case"fax":c=A;break;case"sms":c=o;break;case"agent":c=H,d="lastevent";break;case"dial":c=K,d="dialstatus";break;case"openchannel":c=q;break;default:return}return c.get({limit:10,order:"updatedAt DESC"}).$promise.then(function(c){_.forEach(c.rows,function(a){if(a[d])switch(a[d].toLowerCase()){case"answer":case"connect":case"complete":a.status="taken";break;case"answered_elsewhere":a.status="taken_elsewhere";break;case"called":a.status="lost";break;case"busy":a.status="busy";break;case"rejected":a.status="rejected";break;case"cancel":case"abandoned":a.status="abandoned"}}),a.agentNotifications[b].rows=c.rows,j.socket.on("report_"+b+":save",function(c){c.status="none",a.agentNotifications[b].rows.unshift(c),"agent"!==b&&"dial"!==b&&(a.agentNotifications[b].timeout[c.id]=setTimeout(function(){clearTimeout(a.agentNotifications[b].timeout[c.id]),_.find(a.agentNotifications[b].rows,{id:c.id}).status="lost",angular.element(document.getElementById("header_"+b+"_notification_bar")).hasClass("open")||a.agentNotifications[b]["new"]++,delete a.agentNotifications[b].timeout[c.id]},1e3*c.timeslot))}),j.socket.on("report_"+b+":update",function(c){if("agent"===b){var e=_.find(a.activeCalls,{id:c.id});e&&(c.agentcomplete||c.agentringnoanswer||c.agentdump)?_.remove(a.activeCalls,{id:c.id}):!c.agentconnectAt||c.agentcomplete||c.agentringnoanswer||c.agentdump||a.activeCalls.push(c)}var f=_.find(a.agentNotifications[b].rows,{id:c.id});if(f&&("agent"!==b&&"dial"!==b&&a.agentNotifications[b].timeout[c.id]&&(clearTimeout(a.agentNotifications[b].timeout[c.id]),delete a.agentNotifications[b].timeout[c.id]),c[d])){switch(c[d].toLowerCase()){case"answer":case"connect":case"complete":c.status="taken";break;case"answered_elsewhere":c.status="taken_elsewhere",angular.element(document.getElementById("header_"+b+"_notification_bar")).hasClass("open")||a.agentNotifications.chat["new"]++;break;case"busy":c.status="busy",angular.element(document.getElementById("header_"+b+"_notification_bar")).hasClass("open")||a.agentNotifications[b]["new"]++;break;case"rejected":c.status="rejected";break;case"cancel":case"abandoned":c.status="abandoned",angular.element(document.getElementById("header_"+b+"_notification_bar")).hasClass("open")||a.agentNotifications[b]["new"]++}_.merge(f,c)}})})["catch"](function(a){i.error(a)})}function N(){return a.headerAgent=h.getCurrentUser(),a.readyTimer=1e3*moment().unix(),y.get().$promise.then(function(b){a.headerPauses=b.rows,j.syncUpdates("pause",a.headerPauses)}).then(function(){j.socket.on("agent:save",function(b){a.headerAgent.id===b.id&&(_.merge(a.headerAgent,b),b.voicePause&&b.mailPause&&b.chatPause&&b.faxPause&&b.smsPause&&b.openchannelPause||(a.readyTimer=1e3*moment().unix()))})})["finally"](function(){h.getCurrentUser().loginInPause&&!m.get("loggedIn")&&a.headerPause("pause")})["catch"](function(a){console.log("Error synchronizing agent status:",a)})}function O(){return H.get({id:"active",controller:"calls"}).$promise.then(function(b){a.activeCalls=b.rows})["catch"](function(a){i.error(a)})}a.moment=moment,$(document).on("click",".tabbed-dropdown",function(a){a.stopPropagation()}),a.license.token!==a.license.token2&&(h.isAdmin()||h.isUser())&&f(function(){"main.setting.license.view"!==d.current.name&&k.show(3e4)},3e4),a.openRoom=function(b,c){var d=_.find(a.workspaces,{id:b,type:c});if(d)d.active=!0;else{var e;switch(c){case"mailRoom":e="icon-envelope";break;case"chatRoom":e="fa fa-users";break;case"faxRoom":e="fa fa-fax";break;case"smsRoom":e="glyphicon glyphicon-comment";break;case"openchannelRoom":e="icon-globe"}a.workspaces.push({id:b,type:c,"class":e,active:!0})}},a.toggleSidebar=function(){b.settings.layout.pageSidebarClosed=!b.settings.layout.pageSidebarClosed,m.set("sidebarClosed",b.settings.layout.pageSidebarClosed)},a.chooseContact=function(b){var c=I.open({animation:!0,templateUrl:"app/main/chooseContact.modal.html",controller:"ChooseContactModalCtrl",resolve:{data:function(){return{eventChannel:"voice",calleridnum:b}}}});c.result.then(function(c){c?a.openContactTab(c):a.newContact({calleridnum:b})},function(){J.info("Modal dismissed at: "+new Date)})},a.loadNotifications=function(b){if(!a.busyLoad[b].end){a.busyLoad[b].busy=!0;var c,d="reason";switch(b){case"mail":c=p;break;case"chat":c=r;break;case"fax":c=A;break;case"sms":c=o;break;case"agent":c=H,d="lastevent";break;case"dial":c=K,d="dialstatus";break;case"openchannel":c=q;break;default:return}return c.get({limit:10,offset:a.agentNotifications[b].rows.length,order:"updatedAt DESC"}).$promise.then(function(c){c.rows.length?(_.forEach(c.rows,function(a){if(a[d])switch(a[d].toLowerCase()){case"answer":case"connect":case"complete":a.status="taken";break;case"answered_elsewhere":a.status="taken_elsewhere";break;case"called":a.status="lost";break;case"busy":a.status="busy";break;case"rejected":a.status="rejected";break;case"abandoned":a.status="abandoned"}}),a.agentNotifications[b].rows=a.agentNotifications[b].rows.concat(c.rows)):a.busyLoad[b].end=!0,a.busyLoad[b].busy=!1})["catch"](function(a){i.error(a)})}},a.headerPause=function(b,c,d){return z.save({name:b,agent:a.headerAgent.id,type:c||"DEFAULT PAUSE",data4:c||"DEFAULT PAUSE",channel:d||"all"}).$promise.then(function(){i.show(v.instant("MESSAGE_WELL_DONE"),"success")})["catch"](function(a){i.error(a)})},h.isAgent()&&(N(),a.agentNotifications={mail:{rows:[],"new":0,timeout:{}},chat:{rows:[],"new":0,timeout:{}},fax:{rows:[],"new":0,timeout:{}},sms:{rows:[],"new":0,timeout:{}},agent:{rows:[],"new":0},dial:{rows:[],"new":0},openchannel:{rows:[],"new":0}},a.busyLoad={mail:{busy:!1,end:!1},chat:{busy:!1,end:!1},fax:{busy:!1,end:!1},sms:{busy:!1,end:!1},agent:{busy:!1,end:!1},dial:{busy:!1,end:!1},openchannel:{busy:!1,end:!1}},O(),M("agent"),M("dial"),a.license.mail&&M("mail"),a.license.chat&&M("chat"),a.license.fax&&M("fax"),a.license.messaging&&M("sms"),a.license.openchannel&&M("openchannel")),j.socket.on("user_has_chat_room:save",function(b){var c;return s.get({id:Number(b.ChatRoomId)}).$promise.then(function(b){console.log("chatRoom",b),c=b;var d=_.find(a.workspaces,{id:Number(c.id),type:"chatRoom"});d?d.name=a.getFullnames(c):a.workspaces.push({id:c.id,name:a.getFullnames(c),type:"chatRoom","class":"icon-bubble",unread:1})})["catch"](function(a){console.error(a)})}),j.socket.on("chat_message:save",function(b){var c;if(b.UserId!==h.getCurrentUser().id){var d=_.find(a.workspaces,{id:Number(b.ChatRoomId),type:"chatRoom"});if(!d)return s.get({id:Number(b.ChatRoomId)}).$promise.then(function(b){c=b,a.workspaces.push({id:c.id,name:a.getFullnames(b),type:"chatRoom","class":"icon-bubble",unread:1})})["catch"](function(a){console.error(a)})}});var P=function(){return w.Notification},Q=function(){b.settings.layout.onFocus=!0},R=function(){b.settings.layout.onFocus=!1};w.onfocus=Q,w.onblur=R,a.getFullnames=function(a){var b=_.map(a.Users,"fullname");return a.ChatVisitor&&b.unshift(a.ChatVisitor.fullname),_.without(b,h.getCurrentUser().fullname).join(", ")},a.openContact=function(b,c,d){if(d&&"<unknown>"!==d){var e,f;switch(b){case"mail":e=C,f={email:d};break;case"chat":e=D,f={email:d};break;case"fax":e=E,f={fax:d};break;case"sms":e=F,f={mobile:d};break;default:return}return e.get({id:c}).$promise.then(function(a){return a.ListId?B.save({listId:a.ListId,controller:"contacts"},f).$promise:null}).then(function(b){if(b){var c=_.find(a.workspaces,{contactID:b.id});c?c.active=!0:a.workspaces.push({active:!0,"class":"icon-user",contactID:b.id,name:b.email,type:"contact"})}else i.show(v.instant("MESSAGE_NO_LIST_CONFIGURED"),"info")})["catch"](function(a){console.error(a)})}},a.initHeader=function(){"agent"===h.getCurrentUser().role&&(j.socket.on("report_chat:save",function(a){P&&!b.settings.layout.onFocus&&g("CHAT CHANNEL",{icon:"assets/images/media/channels/chat64.png",body:"NEW Incoming Chat Visitor!",delay:1e3*a.timeslot});var c="<b>"+v.instant("APPLICATION_FROM")+"</b>: "+a.visitorname+"<br><b>"+v.instant("APPLICATION_EMAIL")+"</b>: "+a.visitoremail;"queue"===a.application&&(c+="<br><b>"+v.instant("APPLICATION_QUEUE")+"</b>: "+a.queuename),t.show(v.instant("APPLICATION_NEW_CHAT_REQUEST"),c,"chat",1e3*a.timeslot,function(){return r.get({id:a.id,controller1:"accept",controller2:a.uniqueid}).$promise.then(function(){i.show("Chat properly assigned","success")})["catch"](function(a){switch(a.status){case 504:i.show(v.instant("MESSAGE_CHAT_ALREADY_MANAGED"),"info");break;default:i.error(a)}})},function(){return r.get({id:a.id,controller1:"reject"}).$promise.then(function(){i.show("Chat properly rejected","success")})["catch"](function(a){i.error(a)})})}),j.socket.on("report_mail:save",function(c){var d=_.find(a.workspaces,{id:c.roomid,type:"mailRoom"});if(!d){var e="<b>"+v.instant("APPLICATION_ACCOUNT")+"</b>: "+c.accountname+"<br> <b>"+v.instant("APPLICATION_FROM")+"</b>: "+c.from+"<br> <b>"+v.instant("APPLICATION_SUBJECT")+"</b>: "+(L(c.subject,30,"...")||"No subject");"queue"===c.application&&(e+="<br><b>"+v.instant("APPLICATION_QUEUE")+"</b>: "+c.queuename),t.show(v.instant("APPLICATION_NEW_MAIL_REQUEST"),e,"mail",1e3*c.timeslot,function(){return p.get({id:c.id,controller1:"accept",controller2:c.uniqueid}).$promise.then(function(){var b=_.find(a.workspaces,{id:c.roomid,type:"mailRoom"});b?b.active=!0:a.workspaces.push({id:c.roomid,name:c.subject||"No subject",type:"mailRoom","class":"icon-envelope",active:!0,unread:0})})["catch"](function(a){switch(a.status){case 504:i.show(v.instant("MESSAGE_MAIL_ALREADY_MANAGED"),"info");break;default:i.error(a)}})},function(){return p.get({id:c.id,controller1:"reject"}).$promise["catch"](function(a){i.error(a)})}),P&&!b.settings.layout.onFocus?g("MAIL CHANNEL",{icon:"assets/images/media/channels/mail64.png",body:"NEW Incoming Mail Message!",delay:1e3*c.timeslot}):console.log("Notification API not supported in your browser")}}),j.socket.on("report_sms:save",function(b){var c="<b>"+v.instant("APPLICATION_ACCOUNT")+"</b>: "+b.accountname+"<br> <b>"+v.instant("APPLICATION_FROM")+"</b>: "+b.from;"queue"===b.application&&(c+="<br><b>"+v.instant("APPLICATION_QUEUE")+"</b>: "+b.queuename),t.show(v.instant("APPLICATION_NEW_SMS_REQUEST"),c,"sms",1e3*b.timeslot,function(){return o.get({id:b.id,controller1:"accept",controller2:b.uniqueid}).$promise.then(function(){var c=_.find(a.workspaces,{id:b.roomid,type:"smsRoom"});c?c.active=!0:a.workspaces.push({id:b.roomid,name:b.from,type:"smsRoom","class":"glyphicon glyphicon-comment",active:!0})})["catch"](function(a){switch(a.status){case 504:i.show(v.instant("MESSAGE_SMS_ALREADY_MANAGED"),"info");break;default:i.error(a)}})},function(){return o.get({id:b.id,controller1:"reject"}).$promise.then(function(){i.show("SMS properly rejected","success")})["catch"](function(a){i.error(a)})}),P?g("SMS CHANNEL",{icon:"assets/images/media/channels/chat64.png",body:"NEW Incoming SMS Message!",delay:1e3*b.timeslot}):console.log("Notification API not supported in your browser")}),j.socket.on("report_openchannel:save",function(b){var c="<b>"+v.instant("APPLICATION_ACCOUNT")+"</b>: "+b.accountname+"<br> <b>"+v.instant("APPLICATION_FROM")+"</b>: "+b.from;"queue"===b.application&&(c+="<br><b>"+v.instant("APPLICATION_QUEUE")+"</b>: "+b.queuename),t.show(v.instant("APPLICATION_NEW_MESSAGE"),c,"openchannel",1e3*b.timeslot,function(){return q.get({id:b.id,controller1:"accept",controller2:b.uniqueid}).$promise.then(function(){var c=_.find(a.workspaces,{id:b.roomid,type:"openchannelRoom"});c?c.active=!0:a.workspaces.push({id:b.roomid,name:b.from,type:"openchannelRoom","class":"icon-globe",active:!0})})["catch"](function(a){switch(a.status){case 504:i.show(v.instant("MESSAGE_ALREADY_MANAGED"),"info");break;default:i.error(a)}})},function(){return q.get({id:b.id,controller1:"reject"}).$promise.then(function(){i.show("Message properly rejected","success")})["catch"](function(a){i.error(a)})}),P?g("OPEN CHANNEL",{icon:"assets/images/media/channels/chat64.png",body:"NEW Incoming Message!",delay:1e3*b.timeslot}):console.log("Notification API not supported in your browser")}),j.socket.on("report_fax:save",function(c){var d=_.find(a.workspaces,{id:c.roomid,type:"faxRoom"});if(!d){var e="<b>"+v.instant("APPLICATION_ACCOUNT")+"</b>: "+c.accountname+"<br>               <b>"+v.instant("APPLICATION_PHONE")+"</b>: "+c.from;"queue"===c.application&&(e+="<br><b>"+v.instant("APPLICATION_QUEUE")+"</b>: "+c.queuename),t.show(v.instant("APPLICATION_NEW_FAX_REQUEST"),e,"fax",1e3*c.timeslot,function(){return A.get({id:c.id,controller1:"accept",controller2:c.uniqueid}).$promise.then(function(){var b=_.find(a.workspaces,{id:c.roomid,type:"faxRoom"});b?b.active=!0:a.workspaces.push({id:c.roomid,name:c.from,type:"faxRoom","class":"fa fa-fax",active:!0,unread:0})})["catch"](function(a){switch(a.status){case 504:i.show(v.instant("MESSAGE_FAX_ALREADY_MANAGED"),"info");break;default:i.error(a)}})},function(){return A.get({id:c.id,controller1:"reject"}).$promise["catch"](function(a){i.err(a)})}),P&&!b.settings.layout.onFocus?g("FAX CHANNEL",{icon:"assets/images/media/channels/telephone124.png",
+body:"NEW Incoming Fax Message!",delay:1e3*c.timeslot}):console.log("Notification API not supported in your browser")}}))},a.logout=function(){return e.get("/auth/local/logout").success(function(){h.logout(),c.path("/login")}).error(function(a){console.error(a)})},a.isActive=function(a){return a===c.path()},a.$on("$destroy",function(){console.log("header $destroy"),j.unsyncUpdates("pause"),j.unsyncUpdates("agent"),j.unsyncUpdates("report_chat"),j.unsyncUpdates("report_mail"),j.unsyncUpdates("report_fax"),j.unsyncUpdates("report_sms"),j.unsyncUpdates("report_openchannel"),j.unsyncUpdates("user_has_chat_room"),j.unsyncUpdates("chat_message")})}]),angular.module("xCallyShuttleApp").factory("Modal",["$rootScope","$uibModal",function(a,b){function c(c,d){var e=a.$new();return c=c||{},d=d||"modal-default",angular.extend(e,c),b.open({templateUrl:"components/modal/delete.html",windowClass:d,scope:e})}return{confirm:{"delete":function(a){return a=a||angular.noop,function(){var b,d=Array.prototype.slice.call(arguments),e=d.shift();b=c({modal:{dismissable:!0,title:"Confirm Delete",html:"<p>Are you sure you want to delete"+(e?"<strong> "+e+"</strong>":" selected items")+"?</p>",buttons:[{classes:"btn red",text:"Delete",click:function(a){b.close(a)}},{classes:"btn default",text:"Cancel",click:function(a){b.dismiss(a)}}]}},"over-topbar center"),b.result.then(function(b){a.apply(b,d)})}}}}}]),angular.module("xCallyShuttleApp").service("application",function(){var a={applications:[{type:null,name:"APPLICATION_QUEUE",value:"Queue"},{type:null,name:"APPLICATION_PLAYBACK",value:"Playback"},{type:null,name:"Dial",value:"Dial"},{type:"internalDial",name:"APPLICATION_INTERNAL_DIAL",value:"Dial"},{type:"externalDial",name:"APPLICATION_EXTERNAL_DIAL",value:"Dial"},{type:"RingGroup",name:"Ring Group",value:"Dial"},{type:null,name:"Cally-Square Project",value:"AGI"},{type:null,name:"GoTo",value:"Goto"},{type:null,name:"Hangup",value:"Hangup"},{type:null,name:"Set",value:"Set"},{type:"custom",name:"Custom",value:"custom"},{type:null,name:"APPLICATION_VOICEMAIL",value:"Voicemail"}],queueOptions:[{value:"C",name:"APPLICATION_QUEUE_OPTION_C"},{value:"c",name:"APPLICATION_QUEUE_OPTION_c"},{value:"d",name:"APPLICATION_QUEUE_OPTION_d"},{value:"F",name:"APPLICATION_QUEUE_OPTION_F"},{value:"h",name:"APPLICATION_QUEUE_OPTION_h"},{value:"H",name:"APPLICATION_QUEUE_OPTION_H"},{value:"n",name:"APPLICATION_QUEUE_OPTION_n"},{value:"i",name:"APPLICATION_QUEUE_OPTION_i"},{value:"I",name:"APPLICATION_QUEUE_OPTION_I"},{value:"r",name:"APPLICATION_QUEUE_OPTION_r"},{value:"R",name:"APPLICATION_QUEUE_OPTION_R"},{value:"t",name:"APPLICATION_QUEUE_OPTION_t"},{value:"T",name:"APPLICATION_QUEUE_OPTION_T"},{value:"w",name:"APPLICATION_QUEUE_OPTION_w"},{value:"W",name:"APPLICATION_QUEUE_OPTION_W"},{value:"k",name:"APPLICATION_QUEUE_OPTION_k"},{value:"K",name:"APPLICATION_QUEUE_OPTION_K"},{value:"x",name:"APPLICATION_QUEUE_OPTION_x"},{value:"X",name:"APPLICATION_QUEUE_OPTION_X"}],audioOptions:[{value:"skip",name:"APPLICATION_PLAYBACK_OPTION_SKIP"},{value:"noanswer",name:"APPLICATION_PLAYBACK_OPTION_NOANSWER"},{value:"j",name:"APPLICATION_PLAYBACK_OPTION_J"},{value:"say",name:"APPLICATION_PLAYBACK_OPTION_SAY"}],hangupCauses:[{value:"",name:"--"},{value:"1",name:"APPLICATION_HANGUP_CAUSE_1"},{value:"16",name:"APPLICATION_HANGUP_CAUSE_16"},{value:"17",name:"APPLICATION_HANGUP_CAUSE_17"},{value:"18",name:"APPLICATION_HANGUP_CAUSE_18"},{value:"21",name:"APPLICATION_HANGUP_CAUSE_21"},{value:"22",name:"APPLICATION_HANGUP_CAUSE_22"},{value:"27",name:"APPLICATION_HANGUP_CAUSE_27"},{value:"38",name:"APPLICATION_HANGUP_CAUSE_38"},{value:"41",name:"APPLICATION_HANGUP_CAUSE_41"}],intTypes:[{value:"always",name:"APPLICATION_ALWAYS"},{value:"custom",name:"APPLICATION_CUSTOM"},{value:"list",name:"APPLICATION_FROM_LIST"}],checkUnderscore:function(a){return 0===a.indexOf("_")?a:"_"+a}};return{application:a}}),angular.module("xCallyShuttleApp").service("automations",function(){var a={mail:{conditions:[{name:"APPLICATION_STATUS",value:"status",type:"select",arr:[{name:"APPLICATION_STATUS_NEW",value:"NEW"},{name:"APPLICATION_STATUS_OPEN",value:"OPEN"},{name:"APPLICATION_STATUS_CLOSED",value:"CLOSED"},{name:"APPLICATION_STATUS_PENDING",value:"PENDING"}],operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_HOURS_SINCE_CREATED",value:"createdAt",type:"input",operators:[{value:"greater_or_equal",name:"APPLICATION_GTE_TO"},{value:"less_or_equal",name:"APPLICATION_LTE_TO"},{value:"greater",name:"APPLICATION_GREATER_THAN"},{value:"less",name:"APPLICATION_LESS_THAN"}]}],actions:[{name:"APPLICATION_STATUS",value:"status"}]},chat:{conditions:[{name:"APPLICATION_STATUS",value:"status",type:"select",arr:[{name:"APPLICATION_STATUS_NEW",value:"NEW"},{name:"APPLICATION_STATUS_OPEN",value:"OPEN"},{name:"APPLICATION_STATUS_CLOSED",value:"CLOSED"},{name:"APPLICATION_STATUS_PENDING",value:"PENDING"}],operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_HOURS_SINCE_CREATED",value:"createdAt",type:"input",operators:[{value:"greater_or_equal",name:"APPLICATION_GTE_TO"},{value:"less_or_equal",name:"APPLICATION_LTE_TO"},{value:"greater",name:"APPLICATION_GREATER_THAN"},{value:"less",name:"APPLICATION_LESS_THAN"}]}],actions:[{name:"APPLICATION_STATUS",value:"status"}]},fax:{conditions:[{name:"APPLICATION_STATUS",value:"status",type:"select",arr:[{name:"APPLICATION_STATUS_NEW",value:"NEW"},{name:"APPLICATION_STATUS_OPEN",value:"OPEN"},{name:"APPLICATION_STATUS_CLOSED",value:"CLOSED"}],operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_HOURS_SINCE_CREATED",value:"createdAt",type:"input",operators:[{value:"greater_or_equal",name:"APPLICATION_GTE_TO"},{value:"less_or_equal",name:"APPLICATION_LTE_TO"},{value:"greater",name:"APPLICATION_GREATER_THAN"},{value:"less",name:"APPLICATION_LESS_THAN"}]}],actions:[{name:"APPLICATION_STATUS",value:"status"}]}},b=["mail","fax","chat"];return{services:a,channels:b}}),angular.module("xCallyShuttleApp").service("channel",function(){var a=[{name:"Voice",value:"voice"}];return a}),angular.module("xCallyShuttleApp").service("desk_com",function(){var a=[{id:"priority",label:"Priority",custom:!1,data:{choices:[1,2,3,4,5,6,7,8,9,10]}},{id:"status",label:"Status",custom:!1,data:{choices:["new","open","pending","resolved","closed"]}},{id:"type",label:"Type",custom:!1,data:{choices:["chat","twitter","email","qna","facebook","phone"]}}];return{fields:a}}),angular.module("xCallyShuttleApp").service("interval",function(){var a={months:[{value:"always",name:"APPLICATION_ALWAYS"},{value:"jan",name:"APPLICATION_JANUARY"},{value:"feb",name:"APPLICATION_FEBRUARY"},{value:"mar",name:"APPLICATION_MARCH"},{value:"apr",name:"APPLICATION_APRIL"},{value:"may",name:"APPLICATION_MAY"},{value:"jun",name:"APPLICATION_JUNE"},{value:"jul",name:"APPLICATION_JULY"},{value:"aug",name:"APPLICATION_AUGUST"},{value:"sep",name:"APPLICATION_SEPTEMBER"},{value:"oct",name:"APPLICATION_OCTOBER"},{value:"nov",name:"APPLICATION_NOVEMBER"},{value:"dec",name:"APPLICATION_DECEMBER"}],monthsNumber:[{value:"always",name:"APPLICATION_ALWAYS"},{value:"1",name:"APPLICATION_JANUARY"},{value:"2",name:"APPLICATION_FEBRUARY"},{value:"3",name:"APPLICATION_MARCH"},{value:"4",name:"APPLICATION_APRIL"},{value:"5",name:"APPLICATION_MAY"},{value:"6",name:"APPLICATION_JUNE"},{value:"7",name:"APPLICATION_JULY"},{value:"8",name:"APPLICATION_AUGUST"},{value:"9",name:"APPLICATION_SEPTEMBER"},{value:"10",name:"APPLICATION_OCTOBER"},{value:"11",name:"APPLICATION_NOVEMBER"},{value:"12",name:"APPLICATION_DECEMBER"}],daysOfWeek:[{value:"always",name:"APPLICATION_ALWAYS"},{value:"mon",name:"APPLICATION_MONDAY"},{value:"tue",name:"APPLICATION_TUESDAY"},{value:"wed",name:"APPLICATION_WEDNESDAY"},{value:"thu",name:"APPLICATION_THURSDAY"},{value:"fri",name:"APPLICATION_FRIDAY"},{value:"sat",name:"APPLICATION_SATURDAY"},{value:"sun",name:"APPLICATION_SUNDAY"}],daysOfMonth:["always",1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]};return{interval:a}}),angular.module("xCallyShuttleApp").service("report",["ReportAgent","ReportCall","ReportMailSession","ReportMember","ReportQueue","ReportIntegration","ReportChatSession","ReportSmsSession","Contact","Recording","ReportSquare","ReportSquareDetail","User","ReportFaxSession","MailRoom","MailMessage","FaxRoom","FaxMessage","ChatRoom","ChatMessage","SmsRoom","SmsMessage","OpenChannelRoom","OpenChannelMessage","ReportOpenChannelSession","ReportMotionDialer","UserHasVoiceQueue",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A){var B=[{value:"users",resource:m,channel:"General"},{value:"cm_contacts",resource:i,channel:"General"},{value:"report_integration_history",resource:f,channel:"General"},{value:"report_agent_history",resource:a,channel:"Voice"},{value:"report_call_history",resource:b,channel:"Voice"},{value:"report_member_history",resource:d,channel:"Voice"},{value:"report_queue_history",resource:e,channel:"Voice"},{value:"voice_recordings",resource:j,channel:"Voice"},{value:"report_square_history",resource:k,channel:"Voice"},{value:"report_square_details_history",resource:l,channel:"Voice"},{value:"report_tdial",resource:z,channel:"Voice"},{value:"report_chat_session_history",resource:g,channel:"Chat"},{value:"chat_rooms",resource:s,channel:"Chat"},{value:"chat_messages",resource:t,channel:"Chat"},{value:"report_mail_session_history",resource:c,channel:"Mail"},{value:"mail_rooms",resource:o,channel:"Mail"},{value:"mail_messages",resource:p,channel:"Mail"},{value:"report_fax_session_history",resource:n,channel:"Fax"},{value:"fax_rooms",resource:q,channel:"Fax"},{value:"fax_messages",resource:r,channel:"Fax"},{value:"report_sms_session_history",resource:h,channel:"Sms"},{value:"sms_rooms",resource:u,channel:"Sms"},{value:"sms_messages",resource:v,channel:"Sms"},{value:"report_openchannel_session_history",resource:y,channel:"Open Channel"},{value:"openchannel_rooms",resource:w,channel:"Open Channel"},{value:"openchannel_messages",resource:x,channel:"Open Channel"},{value:"user_has_voice_queues",resource:A,channel:"Voice"}];return{tables:B}}]),angular.module("xCallyShuttleApp").service("strategies",function(){return["beepall","roundrobin","rrmemory"]}),angular.module("xCallyShuttleApp").service("triggers",["VoiceQueue","Route",function(a,b){var c={voice:{conditions:[{name:"APPLICATION_QUEUE",value:"queue",type:"select",resource:a,resValue:"name",operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_CALL_STATUS",value:"lastevent",type:"select",arr:[{name:"ringing",value:"called"},{name:"up",value:"connect"},{name:"hangup",value:"complete"},{name:"rejected",value:"rejected"},{name:"abandoned",value:"abandoned"}],operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_OUTBOUND_ROUTE",value:"routeId",type:"select",resource:b,resValue:"id",resName:"exten",params:{type:"outbound"},operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]}],actions:[{name:"APPLICATION_CONTACT_MANAGER",value:"contactManager"},{name:"APPLICATION_INTEGRATIONS",value:"integration",propertyField:"select"},{name:"APPLICATION_MOTION_BAR",value:"motionbar",propertyField:"select"},{name:"APPLICATION_JSCRIPTY",value:"jscripty",propertyField:"select"},{name:"APPLICATION_URL_FORWARD",value:"urlForward"}]},mail:{conditions:[{name:"APPLICATION_FROM",value:"from",type:"input",operators:[{value:"contains",name:"APPLICATION_CONTAINS"},{value:"not_contains",name:"APPLICATION_NOT_CONTAINS"}]},{name:"APPLICATION_TO",value:"to",type:"input",operators:[{value:"contains",name:"APPLICATION_CONTAINS"},{value:"not_contains",name:"APPLICATION_NOT_CONTAINS"}]},{name:"APPLICATION_CC",value:"cc",type:"input",operators:[{value:"contains",name:"APPLICATION_CONTAINS"},{value:"not_contains",name:"APPLICATION_NOT_CONTAINS"}]},{name:"APPLICATION_SUBJECT",value:"subject",type:"input",operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"},{value:"contains",name:"APPLICATION_CONTAINS"},{value:"not_contains",name:"APPLICATION_NOT_CONTAINS"}]},{name:"APPLICATION_BODY",value:"text",type:"input",operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"},{value:"contains",name:"APPLICATION_CONTAINS"},{value:"not_contains",name:"APPLICATION_NOT_CONTAINS"}]}],actions:[{name:"APPLICATION_TEMPLATE",value:"template"},{name:"APPLICATION_EMAIL",value:"email"},{name:"APPLICATION_EMAIL_FROM_ACCOUNT",value:"accountEmail"},{name:"APPLICATION_SMS",value:"accountSms"},{name:"APPLICATION_FORWARD",value:"forward"},{name:"APPLICATION_TAG",value:"tag"},{name:"APPLICATION_HTTP_REQUEST",value:"http"},{name:"APPLICATION_CLOSE",value:"close"}]},chat:{conditions:[{name:"APPLICATION_NAME",value:"fullname",type:"input",operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"}]},{name:"APPLICATION_EMAIL",value:"email",type:"input",operators:[{value:"contains",name:"APPLICATION_CONTAINS"},{value:"not_contains",name:"APPLICATION_NOT_CONTAINS"}]}],actions:[{name:"APPLICATION_EMAIL_FROM_ACCOUNT",value:"accountEmail"},{name:"APPLICATION_SMS",value:"accountSms"},{name:"APPLICATION_TEMPLATE",value:"accountTemplate"},{name:"APPLICATION_TAG",value:"tag"},{name:"APPLICATION_HTTP_REQUEST",value:"http"},{name:"APPLICATION_CLOSE",value:"close"}]},sms:{conditions:[{name:"APPLICATION_FROM",value:"from",type:"input",operators:[{value:"contains",name:"APPLICATION_CONTAINS"},{value:"not_contains",name:"APPLICATION_NOT_CONTAINS"}]},{name:"APPLICATION_BODY",value:"body",type:"input",operators:[{value:"equals",name:"APPLICATION_EQUALS_TO"},{value:"not_equals",name:"APPLICATION_NOT_EQUALS_TO"},{value:"contains",name:"APPLICATION_CONTAINS"},{value:"not_contains",name:"APPLICATION_NOT_CONTAINS"}]}],actions:[{name:"APPLICATION_EMAIL_FROM_ACCOUNT",value:"accountEmail"},{name:"APPLICATION_SMS",value:"accountSms"},{name:"APPLICATION_TEMPLATE",value:"accountTemplate"},{name:"APPLICATION_TAG",value:"tag"},{name:"APPLICATION_HTTP_REQUEST",value:"http"},{name:"APPLICATION_CLOSE",value:"close"}]}},d=["voice","mail","chat","sms"];return{services:c,channels:d}}]),angular.module("xCallyShuttleApp").service("variable",function(){var a=[{title:"Unique ID",name:"uniqueid",group:"voice_queue"},{title:"Caller Number",name:"calleridnum",group:"voice_queue"},{title:"Caller Name",name:"calleridname",group:"voice_queue"},{title:"Queue",name:"queue",group:"voice_queue"},{title:"Called Number",name:"destcalleridnum",group:"voice_queue"},{title:"Called Name",name:"destcalleridname",group:"voice_queue"},{title:"Hold Time",name:"holdtime",group:"voice_queue"},{title:"Talk Time",name:"talktime",group:"voice_queue"},{title:"Connected Time",name:"agentconnectAt",group:"voice_queue"},{title:"Called Time",name:"agentcalledAt",group:"voice_queue"},{title:"DNID",name:"destexten",group:"voice_queue"},{title:"Complete Time",name:"agentcompleteAt",group:"voice_queue"},{title:"No Answer Time",name:"agentringnoanswerAt",group:"voice_queue"},{title:"Recording URL",name:"recordingURL",group:"voice_queue"},{title:"Unique ID",name:"uniqueid",group:"voice_outbound"},{title:"Caller Number",name:"calleridnum",group:"voice_outbound"},{title:"Caller Name",name:"calleridname",group:"voice_outbound"},{title:"Called Number",name:"destcalleridnum",group:"voice_outbound"},{title:"Called Name",name:"destcalleridname",group:"voice_outbound"},{title:"Start Time",name:"starttime",group:"voice_outbound"},{title:"Answer Time",name:"answertime",group:"voice_outbound"},{title:"Complete Time",name:"endtime",group:"voice_outbound"},{title:"Recording URL",name:"recordingURL",group:"voice_outbound"},{title:"Member Name",name:"membername",group:"voice_outbound"}];return a}),angular.module("xCallyShuttleApp").controller("SidebarController",["$scope","$rootScope","$resource","$location","Auth","Dashboard","Integration","xAlert","$stateParams","socket","$uibModal","Setting",function(a,b,c,d,e,f,g,h,i,j,k,l){a.Auth=e,a.$on("$includeContentLoaded",function(){Metronic.init(),Layout.initSidebar()}),a.getSidebarDashboards=function(){return f.get().$promise.then(function(c){b.dashboards=c.rows,j.syncUpdates("dashboard",b.dashboards),a.$watch("dashboards",function(a){a&&b.initTours()},!0)})["catch"](function(){h.show("Error loading your dashboards","danger")})},a.about=function(){k.open({animation:!0,size:"sm",templateUrl:"app/main/about.modal.html",controller:["$scope","$uibModalInstance",function(a,b){a.year=moment().year(),a.getInfo=function(){return l.get({controller:"info"}).$promise.then(function(b){a.info=b})["catch"](function(a){console.error(a)})},a.close=function(){b.dismiss("cancel")}}]})},a.getSidebarIntegrations=function(){return e.isAdmin()||e.isAgent()||b.userModules[19]?g.get().$promise.then(function(b){a.integrations=b.rows,j.syncUpdates("integration",a.integrations)})["catch"](function(a){h.error(a)}):void 0},a.$on("sidebar $destroy",function(){console.log("destroy"),j.unsyncUpdates("dashboard"),j.unsyncUpdates("integration")})}]),angular.module("xCallyShuttleApp").factory("socket",["$rootScope","$window","socketFactory","Auth",function(a,b,c,d){var e=d.getCurrentUser(),f=io("",{query:"token="+d.getToken()+"&userId="+e.id+"&name="+e.name+"&role="+(e.role||"agent")+"&source=browser",path:"/socket.io-client"}),g=c({ioSocket:f});return a.$on("logout",function(){g&&(g.disconnect(!0),b.location.reload())}),{socket:g,syncUpdates:function(a,b,c){c=c||angular.noop,g.on(a+":save",function(a){var d=_.find(b,{id:a.id}),e=b.indexOf(d),f="created";d?(_.merge(b[e],a),f="updated"):b.unshift(a),c(f,a,b)}),g.on(a+":remove",function(a){var d="deleted";_.remove(b,{id:a.id}),c(d,a,b)})},unsyncUpdates:function(a){g.removeAllListeners(a+":save"),g.removeAllListeners(a+":update"),g.removeAllListeners(a+":remove")},syncUpdatesByAttributes:function(a,b,c,d){d=d||angular.noop,g.on(a+":save",function(a){var e=!0;if(_.forIn(b,function(b,c){return a[c]&&a[c]===b?!0:e=!1}),e){var f=_.find(c,{id:a.id}),g=c.indexOf(f),h="created";f?(_.merge(c[g],a),h="updated"):c.unshift(a),d(h,a,c)}}),g.on(a+":remove",function(a){var b="deleted";_.remove(c,{id:a.id}),d(b,a,c)})},syncMailMessageUpdates:function(a,b,c,d){d=d||angular.noop,g.on(a+":"+b+":save",function(a){var b=_.find(c,{id:a.id}),e=c.indexOf(b),f="created";b?(_.merge(c[e],a),f="updated"):c.unshift(a),d(f,a)}),g.on(a+":"+b+":remove",function(a){var b="deleted";_.remove(c,{id:a.id}),d(b,a,c)})},unsyncMailMessageUpdates:function(a,b){g.removeAllListeners(a+":"+b+":save"),g.removeAllListeners(a+":"+b+":remove")},syncFaxMessageUpdates:function(a,b,c,d){d=d||angular.noop,g.on(a+":"+b+":save",function(a){var b=_.find(c,{id:a.id}),e=c.indexOf(b),f="created";b?(_.merge(c[e],a),f="updated"):c.unshift(a),d(f,a)}),g.on(a+":"+b+":remove",function(a){var b="deleted";_.remove(c,{id:a.id}),d(b,a,c)})},unsyncFaxMessageUpdates:function(a,b){g.removeAllListeners(a+":"+b+":save"),g.removeAllListeners(a+":"+b+":remove")}}}]),function(a,b){angular.module("adf.widget.counter",["adf.provider"]).config(["dashboardProvider",function(a){a.widget("counter",{title:"Single Value",description:"Single Value for db results",templateUrl:"{widgetsPath}/counter/src/view.html",controller:"apiwidgetCounterViewCtrl",edit:{templateUrl:"{widgetsPath}/counter/src/edit.html",controller:"apiwidgetCounterEditCtrl"}})}]).service("apiServiceCounter",["Widget",function(a){return{get:function(b){return a.get({select:b.select,condition:encodeURIComponent(b.condition),table:b.report.replace("_history",""),controller:"counter"}).$promise.then(function(a){return a})["catch"](function(a){console.log(a)})}}}]).controller("apiwidgetCounterEditCtrl",["$scope","report",function(a,b){a.config.reportTables=b.tables,a.config.colors=[{name:"Grey",value:"grey"},{name:"Grey 2",value:"grey-cascade"},{name:"Grey 3",value:"grey-silver"},{name:"Grey 4",value:"grey-steel"},{name:"Grey 5",value:"grey-carrara"},{name:"Grey 6",value:"grey-gallery"},{name:"Blue",value:"blue"},{name:"Blue 2",value:"blue-hoki"},{name:"Blue 3",value:"blue-steel"},{name:"Blue 4",value:"blue-madison"},{name:"Blue 5",value:"blue-chambray"},{name:"Blue 6",value:"blue-ebonyclay"},{name:"Red",value:"red"},{name:"Red 2",value:"red-pink"},{name:"Red 3",value:"red-sunglo"},{name:"Red 4",value:"red-intense"},{name:"Red 5",value:"red-thunderbird"},{name:"Red 6",value:"red-flamingo"},{name:"Green",value:"green"},{name:"Green 2",value:"green-meadow"},{name:"Green 3",value:"green-seagreen"},{name:"Green 4",value:"green-turquoise"},{name:"Green 5",value:"green-haze"},{name:"Green 6",value:"green-jungle"},{name:"Purple",value:"purple"},{name:"Purple 2",value:"purple-plum"},{name:"Purple 3",value:"purple-medium"},{name:"Purple 4",value:"purple-studio"},{name:"Purple 5",value:"purple-wisteria"},{name:"Purple 6",value:"purple-seance"},{name:"Yellow",value:"yellow"},{name:"Yellow 2",value:"yellow-gold"},{name:"Yellow 3",value:"yellow-casablanca"},{name:"Yellow 4",value:"yellow-crusta"},{name:"Yellow 5",value:"yellow-lemon"},{name:"Yellow 6",value:"yellow-saffron"}],a.config.icons=[{name:"Talk bubbles",value:"fa-comments"},{name:"Bar Chart",value:"fa-bar-chart"},{name:"Shopping Cart",value:"fa-shopping-cart"},{name:"Globe",value:"fa-globe"},{name:"Volume Control Phone",value:"fa-volume-control-phone"},{name:"Comments",value:"fa-comments-o"},{name:"Commenting",value:"fa-commenting-o"},{name:"Coffee",value:"fa-coffee"},{name:"Clock",value:"fa-clock-o"},{name:"Envelope",value:"fa-envelope-o"},{name:"Hourglass",value:"fa-hourglass-half"},{name:"Percent",value:"fa-percent"}],a.config.select=a.config.select?a.config.select:"COUNT(*)",a.config.timeout=a.config.timeout>=5?a.config.timeout:5,a.config.color=a.config.color?a.config.color:"blue-madison",a.config.icon=a.config.icon?a.config.icon:"fa-comments",a.config.link=a.config.link?a.config.link:"#",a.config.linkText=a.config.linkText?a.config.linkText:"VIEW MORE"}]).controller("apiwidgetCounterViewCtrl",["$scope","$interval","apiServiceCounter",function(a,b,c){a.config.timeout=a.config.timeout>=5?a.config.timeout:5,a.config.condition=a.config.condition?a.config.condition:null,a.config.color=a.config.color?a.config.color:"blue-madison",a.config.icon=a.config.icon?a.config.icon:"fa-comments",a.config.link=a.config.link?a.config.link:"#",a.config.linkText=a.config.linkText?a.config.linkText:"VIEW MORE",a.counterApiCall=function(){a.config.report&&c.get(a.config).then(function(b){b?b.result&&b.result.length>1||_.keys(b.result[0]).length>1?(a.tooManyResults=!0,a.result=null):(a.tooManyResults=!1,null!==_.values(b.result[0])[0]?a.result=_.values(b.result[0])[0].toString():a.result="--"):a.result=null})},a.counterApiCall();var d=b(function(){a.counterApiCall()},1e3*parseInt(a.config.timeout));a.$on("$destroy",function(){b.cancel(d)})}]),angular.module("adf.widget.counter").run(["$templateCache",function(a){a.put("{widgetsPath}/counter/src/edit.html","<form role=form><div class=form-group><label for=select>Select</label> <input type=text class=form-control id=condition ng-model=config.select placeholder=Select></div><div class=form-group><label class=control-label>From</label><ui-select data-ng-model=config.report name=report theme=bootstrap><ui-select-match placeholder=From>{{'APPLICATION_'+$select.selected.value.toUpperCase() | translate}}</ui-select-match><ui-select-choices group-by=\"'channel'\" repeat=\"table.value as table in config.reportTables | filter: $select.search\"><div ng-bind-html=\"'APPLICATION_'+table.value.toUpperCase() | translate | highlight: $select.search\"></div></ui-select-choices></ui-select></div><div class=form-group><label for=condition>Where</label> <input type=text class=form-control id=condition ng-model=config.condition placeholder=Where></div><div class=form-group><label for=condition>{{'APPLICATION_REFRESH_TIMEOUT' | translate}}</label> <input type=number class=form-control id=timeout ng-model=config.timeout placeholder=\"{{'APPLICATION_REFRESH_TIMEOUT' | translate}}\" min=5></div><div class=form-group><label class=control-label>{{'APPLICATION_WIDGET_COLOR' | translate}}</label><ui-select data-ng-model=config.color name=color theme=bootstrap><ui-select-match placeholder=\"{{ 'APPLICATION_WIDGET_COLOR' | translate }}\"><div data-ng-class=\"'bg-'+$select.selected.value\">&nbsp;</div></ui-select-match><ui-select-choices repeat=\"color.value as color in config.colors | filter: $select.search\"><div data-ng-class=\"'bg-'+color.value\">&nbsp;</div></ui-select-choices></ui-select></div><div class=form-group><label class=control-label>{{'APPLICATION_WIDGET_ICON' | translate}}</label><ui-select data-ng-model=config.icon name=icon theme=bootstrap><ui-select-match placeholder=\"{{ 'APPLICATION_WIDGET_ICON' | translate }}\"><i class=fa ng-class=$select.selected.value></i></ui-select-match><ui-select-choices repeat=\"icon.value as icon in config.icons | filter: $select.search\"><i class=fa ng-class=icon.value></i></ui-select-choices></ui-select></div><div class=form-group><label for=condition>{{'APPLICATION_WIDGET_DETAILS' | translate}}</label> <input type=text class=form-control id=details ng-model=config.details maxlength=30 placeholder=\"{{'APPLICATION_WIDGET_DETAILS' | translate}}\"></div><div class=form-group><label for=condition>{{'APPLICATION_WIDGET_LINK' | translate}}</label> <input type=text class=form-control id=link ng-model=config.link placeholder=http://yourlink></div><div class=form-group><label for=condition>{{'APPLICATION_WIDGET_LINK_TEXT' | translate}}</label> <input type=text class=form-control id=linkText ng-model=config.linkText maxlength=30 placeholder=\"{{'APPLICATION_WIDGET_LINK_TEXT' | translate}}\"></div></form>"),a.put("{widgetsPath}/counter/src/view.html",'<div class=dashboard-stat ng-class=config.color ng-if=result><div class=visual><i class=fa ng-class=config.icon></i></div><div class=details><div class=number>{{result}}</div><div class=desc>{{config.details}}</div></div><a class=more href={{config.link}}>{{config.linkText}} <i class="m-icon-swapright m-icon-white"></i></a></div><div class="alert alert-danger" role=alert ng-if=!config.report><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_WIDGET_SELECT_REPORT\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=tooManyResults><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_TOO_MANY_RESULTS\' | translate}}</div><div class="alert alert-danger" role=alert ng-if="!result && !tooManyResults"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_QUERY_NOT_VALID\' | translate}}</div>')}])}(window),function(a,b){angular.module("adf.widget.pie-chart",["adf.provider"]).config(["dashboardProvider",function(a){a.widget("pie-chart",{title:"Pie-Chart",description:"Display a pie-chart starting from DB values",templateUrl:"{widgetsPath}/pie-chart/src/view.html",controller:"apiWidgetPieChartViewCtrl",edit:{templateUrl:"{widgetsPath}/pie-chart/src/edit.html",controller:"apiWidgetPieChartEditCtrl"}})}]).service("apiServicePieChart",["Widget",function(a){return{get:function(b){return a.get({condition:encodeURIComponent(b.condition),table:b.report.replace("_history",""),fields:b.fields,controller:"piechart"}).$promise.then(function(a){return a})["catch"](function(a){console.log(a)})}}}]).controller("apiWidgetPieChartEditCtrl",["$scope","report",function(a,b){function c(){return a.config.fields||(a.config.fields=[{column:"",alias:""}]),a.config.fields}a.config.reportTables=b.tables,a.config.timeout=a.config.timeout>=5?a.config.timeout:5,a.config.fields=a.config.fields?a.config.fields:[{column:"",alias:""}],a.addField=function(){c().push({})},a.removeField=function(a){c().splice(a,1)}}]).controller("apiWidgetPieChartViewCtrl",["$scope","$interval","apiServicePieChart",function(a,b,c){a.config.timeout=a.config.timeout>=5?a.config.timeout:5,a.pieChartApiCall=function(){a.config.report&&a.config.fields.length&&""!==a.config.fields[0].column&&""!==a.config.fields[0].alias&&c.get(a.config).then(function(b){if(b&&b.result&&1===b.result.length){a.labels=[],a.data=[];for(var c in b.result[0])a.labels.push(c),a.data.push(b.result[0][c])}else a.labels=[],a.data=[]})},a.pieChartApiCall();var d=b(function(){a.pieChartApiCall()},1e3*parseInt(a.config.timeout));a.$on("$destroy",function(){b.cancel(d)})}]),angular.module("adf.widget.pie-chart").run(["$templateCache",function(a){a.put("{widgetsPath}/pie-chart/src/edit.html","<form role=form><div class=form-group><label class=control-label>{{'APPLICATION_REPORT' | translate}}</label><ui-select data-ng-model=config.report name=report theme=bootstrap><ui-select-match placeholder=\"{{ 'APPLICATION_REPORT' | translate }}\">{{'APPLICATION_'+$select.selected.value.toUpperCase() | translate}}</ui-select-match><ui-select-choices group-by=\"'channel'\" repeat=\"table.value as table in config.reportTables | filter: $select.search\"><div ng-bind-html=\"'APPLICATION_'+table.value.toUpperCase() | translate | highlight: $select.search\"></div></ui-select-choices></ui-select></div><div><label class=control-label>{{'APPLICATION_FIELDS' | translate}}</label></div><div class=padding-bottom ng-repeat=\"field in config.fields\"><div class=form-group><div class=input-group><input type=text class=form-control ng-model=field.column> <span class=input-group-addon>as</span> <input type=text class=form-control ng-model=field.alias> <span class=input-group-btn ng-if=\"config.fields.length>1\"><button class=\"btn btn-danger\" type=button data-ng-click=removeField($index)><i class=\"fa fa-times\"></i> {{'APPLICATION_REMOVE' | translate}}</button></span></div></div></div><button type=button class=\"btn btn-sm green mbottom20\" ng-click=addField()><i class=\"fa fa-plus\"></i> {{'APPLICATION_ADD_FIELD' | translate}}</button><div class=form-group><label for=condition>{{'APPLICATION_CONDITION' | translate}}</label> <input type=text class=form-control id=condition ng-model=config.condition placeholder=\"{{'APPLICATION_CONDITION' | translate}}\"></div><div class=form-group><label for=condition>{{'APPLICATION_REFRESH_TIMEOUT' | translate}}</label> <input type=number class=form-control id=timeout ng-model=config.timeout placeholder=\"{{'APPLICATION_REFRESH_TIMEOUT' | translate}}\" min=5></div></form>"),a.put("{widgetsPath}/pie-chart/src/view.html",'<div ng-if=labels.length ng-style=config.style><canvas id=doughnut class="chart chart-doughnut" chart-data=data chart-labels=labels legend=true></canvas></div><div class="alert alert-danger" role=alert ng-if=!config.report><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_WIDGET_SELECT_REPORT\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=!labels.length><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_ENTER_VALID_CONDITION\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=!labels.length><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_ENTER_ONE_VALID_METRIC_AND_CHECK_OTHER\' | translate}}</div>')}])}(window),function(a,b){angular.module("adf.widget.table",["adf.provider"]).value("apiServiceUrlTable","/api/widgets/table").config(["dashboardProvider",function(a){
+a.widget("table",{title:"Table",description:"Show tabbed results from db",templateUrl:"{widgetsPath}/table/src/view.html",controller:"apiWidgetTableViewCtrl",edit:{templateUrl:"{widgetsPath}/table/src/edit.html",controller:"apiWidgetTableEditCtrl"}})}]).service("apiServiceTable",["$q","$http","apiServiceUrlTable",function(a,b,c){return{get:function(d){var e=a.defer();return b.get(c,{params:{condition:encodeURIComponent(d.condition),table:d.report,fields:d.fields}}).success(function(a){a?e.resolve(a):e.reject()}).error(function(a){console.log(a),e.reject()}),e.promise}}}]).controller("apiWidgetTableEditCtrl",["$scope",function(a){function b(){return a.config.fields||(a.config.fields=[{column:"",alias:""}]),a.config.fields}a.config.reportTables=[{name:"Agents",value:"agent"},{name:"Calls",value:"call"},{name:"Dials",value:"dial"},{name:"Members",value:"member"},{name:"Queues",value:"queue"}],a.config.timeout=a.config.timeout?a.config.timeout:1,a.config.height=a.config.height?a.config.height:350,a.config.fields=a.config.fields?a.config.fields:[{column:"",alias:""}],a.addField=function(){b().push({})},a.removeField=function(a){b().splice(a,1)}}]).controller("apiWidgetTableViewCtrl",["$scope","$interval","apiServiceTable",function(a,b,c){a.config.timeout=a.config.timeout?a.config.timeout:1,a.config.height=a.config.height?a.config.height:350,a.config.style={"max-height":a.config.height+"px",overflow:"scroll"},a.tableApiCall=function(){a.config.condition&&a.config.report&&a.config.fields.length&&""!==a.config.fields[0].column&&""!==a.config.fields[0].alias&&c.get(a.config).then(function(b){a.results=b})},a.tableApiCall();var d=b(function(){a.tableApiCall()},1e3*parseInt(a.config.timeout));a.$on("$destroy",function(){b.cancel(d)})}]),angular.module("adf.widget.table").run(["$templateCache",function(a){a.put("{widgetsPath}/table/src/edit.html",'<form role=form><div class=form-group><label class=control-label>{{\'APPLICATION_REPORT\' | translate}}</label><ui-select data-ng-model=config.report name=report theme=bootstrap><ui-select-match placeholder="{{ \'APPLICATION_REPORT\' | translate }}">{{$select.selected.name}}</ui-select-match><ui-select-choices repeat="report.value as report in config.reportTables | filter: $select.search"><div ng-bind-html="report.name | highlight: $select.search"></div></ui-select-choices></ui-select></div><div><label class=control-label>{{\'APPLICATION_METRICS\' | translate}}</label></div><div class=padding-bottom ng-repeat="field in config.fields"><div class=form-group><div class=input-group><input type=text class=form-control ng-model=field.column> <span class=input-group-addon>as</span> <input type=text class=form-control ng-model=field.alias> <span class=input-group-btn ng-if="config.fields.length>1"><button class="btn btn-danger" type=button data-ng-click=removeField($index)><i class="fa fa-times"></i> {{\'APPLICATION_REMOVE\' | translate}}</button></span></div></div></div><button type=button class="btn btn-sm green mbottom20" ng-click=addField()><i class="fa fa-plus"></i> {{\'APPLICATION_ADD_FIELD\' | translate}}</button><div class=form-group><label for=condition>{{\'APPLICATION_CONDITION\' | translate}}</label> <input type=text class=form-control id=condition ng-model=config.condition placeholder="{{\'APPLICATION_CONDITION\' | translate}}"></div><div class=form-group><label for=condition>{{\'APPLICATION_REFRESH_TIMEOUT\' | translate}}</label> <input type=number class=form-control id=timeout ng-model=config.timeout placeholder="{{\'APPLICATION_REFRESH_TIMEOUT\' | translate}}" min=1></div><div class=form-group><label for=condition>{{\'APPLICATION_WIDGET_MAX_HEIGHT\' | translate}}</label> <input type=number class=form-control id=height ng-model=config.height placeholder="{{\'APPLICATION_WIDGET_MAX_HEIGHT\' | translate}}" min=350></div></form>'),a.put("{widgetsPath}/table/src/view.html",'<div ng-if=results ng-style=config.style><table st-table=results class="table table-striped table-bordered table-hover"><div class=table-responsive><thead><tr><th colspan={{config.fields.length}}><div class=row><div class=col-md-6></div><div class=col-md-6><div class="input-group input-medium pull-right"><input st-search placeholder="{{ \'APPLICATION_SEARCH\' | translate }}" class=form-control type=search> <span class=input-group-addon><i class="fa fa-search"></i></span></div></div></div></th></tr><tr><th ng-repeat="field in config.fields">{{field.alias}}</th></tr></thead><tbody><tr data-ng-repeat="result in results" class=animate-repeat><td ng-repeat="field in config.fields">{{result[field.alias]}}</td></tr><tr data-ng-hide=results.length><td colspan={{config.fields.length}} style=text-align:center;><i>{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</i></td></tr></tbody><tfoot><tr><td colspan={{config.fields.length}} class=text-center><div st-pagination class=pagination st-items-by-page=10 st-displayed-pages=3></div></td></tr></tfoot></div></table></div><div class="alert alert-danger" role=alert ng-if=!config.report><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_WIDGET_SELECT_REPORT\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=!results><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_ENTER_VALID_CONDITION\' | translate}}</div><div class="alert alert-danger" role=alert ng-if=!results><span class="glyphicon glyphicon-exclamation-sign" aria-hidden=true></span> <span class=sr-only>{{\'APPLICATION_ERROR\' | translate}}:</span> {{\'MESSAGE_ENTER_ONE_VALID_FIELD_AND_CHECK_OTHER\' | translate}}</div>')}])}(window);var Metronic=function(){var a,b=!1,c=!1,d=!1,e=!1,f=[],g="assets/",h="img/",i="plugins/",j="css/",k={blue:"#89C4F4",red:"#F3565D",green:"#1bbc9b",purple:"#9b59b6",grey:"#95a5a6",yellow:"#F8CB00"},l=function(){"rtl"===$("body").css("direction")&&(b=!0),c=!!navigator.userAgent.match(/MSIE 8.0/),d=!!navigator.userAgent.match(/MSIE 9.0/),e=!!navigator.userAgent.match(/MSIE 10.0/),e&&$("html").addClass("ie10"),(e||d||c)&&$("html").addClass("ie")},m=function(){for(var a=0;a<f.length;a++){var b=f[a];b.call()}},n=function(){var a;if(c){var b;$(window).resize(function(){b!=document.documentElement.clientHeight&&(a&&clearTimeout(a),a=setTimeout(function(){m()},50),b=document.documentElement.clientHeight)})}else $(window).resize(function(){a&&clearTimeout(a),a=setTimeout(function(){m()},50)})},o=function(){$("body").on("click",".portlet > .portlet-title > .tools > a.remove",function(a){a.preventDefault();var b=$(this).closest(".portlet");$("body").hasClass("page-portlet-fullscreen")&&$("body").removeClass("page-portlet-fullscreen"),b.find(".portlet-title .fullscreen").tooltip("destroy"),b.find(".portlet-title > .tools > .reload").tooltip("destroy"),b.find(".portlet-title > .tools > .remove").tooltip("destroy"),b.find(".portlet-title > .tools > .config").tooltip("destroy"),b.find(".portlet-title > .tools > .collapse, .portlet > .portlet-title > .tools > .expand").tooltip("destroy"),b.remove()}),$("body").on("click",".portlet > .portlet-title .fullscreen",function(a){a.preventDefault();var b=$(this).closest(".portlet");if(b.hasClass("portlet-fullscreen"))$(this).removeClass("on"),b.removeClass("portlet-fullscreen"),$("body").removeClass("page-portlet-fullscreen"),b.children(".portlet-body").css("height","auto");else{var c=Metronic.getViewPort().height-b.children(".portlet-title").outerHeight()-parseInt(b.children(".portlet-body").css("padding-top"))-parseInt(b.children(".portlet-body").css("padding-bottom"));$(this).addClass("on"),b.addClass("portlet-fullscreen"),$("body").addClass("page-portlet-fullscreen"),b.children(".portlet-body").css("height",c)}}),$("body").on("click",".portlet > .portlet-title > .tools > a.reload",function(a){a.preventDefault();var b=$(this).closest(".portlet").children(".portlet-body"),c=$(this).attr("data-url"),d=$(this).attr("data-error-display");c?(Metronic.blockUI({target:b,animate:!0,overlayColor:"none"}),$.ajax({type:"GET",cache:!1,url:c,dataType:"html",success:function(a){Metronic.unblockUI(b),b.html(a)},error:function(a,c,e){Metronic.unblockUI(b);var f="Error on reloading the content. Please check your connection and try again.";"toastr"==d&&toastr?toastr.error(f):"notific8"==d&&$.notific8?($.notific8("zindex",11500),$.notific8(f,{theme:"ruby",life:3e3})):alert(f)}})):(Metronic.blockUI({target:b,animate:!0,overlayColor:"none"}),window.setTimeout(function(){Metronic.unblockUI(b)},1e3))}),$('.portlet .portlet-title a.reload[data-load="true"]').click(),$("body").on("click",".portlet > .portlet-title > .tools > .collapse, .portlet .portlet-title > .tools > .expand",function(a){a.preventDefault()})},p=function(){if($().uniform){var a=$("input[type=checkbox]:not(.toggle, .make-switch, .icheck), input[type=radio]:not(.toggle, .star, .make-switch, .icheck)");a.size()>0&&a.each(function(){0===$(this).parents(".checker").size()&&$(this).show()})}},q=function(){$().iCheck&&$(".icheck").each(function(){var a=$(this).attr("data-checkbox")?$(this).attr("data-checkbox"):"icheckbox_minimal-grey",b=$(this).attr("data-radio")?$(this).attr("data-radio"):"iradio_minimal-grey";a.indexOf("_line")>-1||b.indexOf("_line")>-1?$(this).iCheck({checkboxClass:a,radioClass:b,insert:'<div class="icheck_line-icon"></div>'+$(this).attr("data-label")}):$(this).iCheck({checkboxClass:a,radioClass:b})})},r=function(){$().bootstrapSwitch&&$(".make-switch").bootstrapSwitch()},s=function(){$().confirmation&&$("[data-toggle=confirmation]").confirmation({container:"body",btnOkClass:"btn-xs btn-success",btnCancelClass:"btn-xs btn-danger"})},t=function(){$("body").on("shown.bs.collapse",".accordion.scrollable",function(a){Metronic.scrollTo($(a.target))})},u=function(){if(location.hash){var a=location.hash.substr(1);$('a[href="#'+a+'"]').parents(".tab-pane:hidden").each(function(){var a=$(this).attr("id");$('a[href="#'+a+'"]').click()}),$('a[href="#'+a+'"]').click()}},v=function(){$("body").on("hide.bs.modal",function(){$(".modal:visible").size()>1&&$("html").hasClass("modal-open")===!1?$("html").addClass("modal-open"):$(".modal:visible").size()<=1&&$("html").removeClass("modal-open")}),$("body").on("show.bs.modal",".modal",function(){$(this).hasClass("modal-scroll")&&$("body").addClass("modal-open-noscroll")}),$("body").on("hide.bs.modal",".modal",function(){$("body").removeClass("modal-open-noscroll")}),$("body").on("hidden.bs.modal",".modal:not(.modal-cached)",function(){$(this).removeData("bs.modal")})},w=function(){$(".tooltips").tooltip(),$(".portlet > .portlet-title .fullscreen").tooltip({container:"body",title:"Fullscreen"}),$(".portlet > .portlet-title > .tools > .reload").tooltip({container:"body",title:"Reload"}),$(".portlet > .portlet-title > .tools > .remove").tooltip({container:"body",title:"Remove"}),$(".portlet > .portlet-title > .tools > .config").tooltip({container:"body",title:"Settings"}),$(".portlet > .portlet-title > .tools > .collapse, .portlet > .portlet-title > .tools > .expand").tooltip({container:"body",title:"Collapse/Expand"})},x=function(){$("body").on("click",".dropdown-menu.hold-on-click",function(a){a.stopPropagation()})},y=function(){$("body").on("click",'[data-close="alert"]',function(a){$(this).parent(".alert").hide(),$(this).closest(".note").hide(),a.preventDefault()}),$("body").on("click",'[data-close="note"]',function(a){$(this).closest(".note").hide(),a.preventDefault()}),$("body").on("click",'[data-remove="note"]',function(a){$(this).closest(".note").remove(),a.preventDefault()})},z=function(){$('[data-hover="dropdown"]').not(".hover-initialized").each(function(){$(this).dropdownHover(),$(this).addClass("hover-initialized")})},A=function(){$(".popovers").popover(),$(document).on("click.bs.popover.data-api",function(b){a&&a.popover("hide")})},B=function(){Metronic.initSlimScroll(".scroller")},C=function(){jQuery.fancybox&&$(".fancybox-button").size()>0&&$(".fancybox-button").fancybox({groupAttr:"data-rel",prevEffect:"none",nextEffect:"none",closeBtn:!0,helpers:{title:{type:"inside"}}})},D=function(){(c||d)&&$("input[placeholder]:not(.placeholder-no-fix), textarea[placeholder]:not(.placeholder-no-fix)").each(function(){var a=$(this);""===a.val()&&""!==a.attr("placeholder")&&a.addClass("placeholder").val(a.attr("placeholder")),a.focus(function(){a.val()==a.attr("placeholder")&&a.val("")}),a.blur(function(){""!==a.val()&&a.val()!=a.attr("placeholder")||a.val(a.attr("placeholder"))})})},E=function(){$().select2&&$(".select2me").select2({placeholder:"Select"})};return{init:function(){l(),n(),p(),q(),r(),B(),C(),E(),o(),y(),x(),u(),w(),A(),t(),v(),s(),D()},initAjax:function(){p(),q(),r(),z(),B(),E(),C(),x(),w(),A(),t(),s()},initComponents:function(){this.initAjax()},setLastPopedPopover:function(b){a=b},addResizeHandler:function(a){f.push(a)},runResizeHandlers:function(){m()},scrollTo:function(a,b){var c=a&&a.size()>0?a.offset().top:0;a&&($("body").hasClass("page-header-fixed")&&(c-=$(".page-header").height()),c+=b?b:-1*a.height()),$("html,body").animate({scrollTop:c},"slow")},initSlimScroll:function(a){$(a).each(function(){if(!$(this).attr("data-initialized")){var a;a=$(this).attr("data-height")?$(this).attr("data-height"):$(this).css("height"),$(this).slimScroll({allowPageScroll:!0,size:"7px",color:$(this).attr("data-handle-color")?$(this).attr("data-handle-color"):"#bbb",wrapperClass:$(this).attr("data-wrapper-class")?$(this).attr("data-wrapper-class"):"slimScrollDiv",railColor:$(this).attr("data-rail-color")?$(this).attr("data-rail-color"):"#eaeaea",position:b?"left":"right",height:a,alwaysVisible:"1"==$(this).attr("data-always-visible"),railVisible:"1"==$(this).attr("data-rail-visible"),disableFadeOut:!0}),$(this).attr("data-initialized","1")}})},destroySlimScroll:function(a){$(a).each(function(){if("1"===$(this).attr("data-initialized")){$(this).removeAttr("data-initialized"),$(this).removeAttr("style");var a={};$(this).attr("data-handle-color")&&(a["data-handle-color"]=$(this).attr("data-handle-color")),$(this).attr("data-wrapper-class")&&(a["data-wrapper-class"]=$(this).attr("data-wrapper-class")),$(this).attr("data-rail-color")&&(a["data-rail-color"]=$(this).attr("data-rail-color")),$(this).attr("data-always-visible")&&(a["data-always-visible"]=$(this).attr("data-always-visible")),$(this).attr("data-rail-visible")&&(a["data-rail-visible"]=$(this).attr("data-rail-visible")),$(this).slimScroll({wrapperClass:$(this).attr("data-wrapper-class")?$(this).attr("data-wrapper-class"):"slimScrollDiv",destroy:!0});var b=$(this);$.each(a,function(a,c){b.attr(a,c)})}})},scrollTop:function(){Metronic.scrollTo()},blockUI:function(a){a=$.extend(!0,{},a);var b="";if(b=a.animate?'<div class="loading-message '+(a.boxed?"loading-message-boxed":"")+'"><div class="block-spinner-bar"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div></div>':a.iconOnly?'<div class="loading-message '+(a.boxed?"loading-message-boxed":"")+'"><img src="'+this.getGlobalImgPath()+'loading-spinner-blue.gif" align=""></div>':a.textOnly?'<div class="loading-message '+(a.boxed?"loading-message-boxed":"")+'"><span>&nbsp;&nbsp;'+(a.message?a.message:"LOADING...")+"</span></div>":'<div class="loading-message '+(a.boxed?"loading-message-boxed":"")+'"><img src="'+this.getGlobalImgPath()+'loading-spinner-blue.gif" align=""><span>&nbsp;&nbsp;'+(a.message?a.message:"LOADING...")+"</span></div>",a.target){var c=$(a.target);c.height()<=$(window).height()&&(a.cenrerY=!0),c.block({message:b,baseZ:a.zIndex?a.zIndex:1e3,centerY:void 0!==a.cenrerY?a.cenrerY:!1,css:{top:"10%",border:"0",padding:"0",backgroundColor:"none"},overlayCSS:{backgroundColor:a.overlayColor?a.overlayColor:"#555",opacity:a.boxed?.05:.1,cursor:"wait"}})}else $.blockUI({message:b,baseZ:a.zIndex?a.zIndex:1e3,css:{border:"0",padding:"0",backgroundColor:"none"},overlayCSS:{backgroundColor:a.overlayColor?a.overlayColor:"#555",opacity:a.boxed?.05:.1,cursor:"wait"}})},unblockUI:function(a){a?$(a).unblock({onUnblock:function(){$(a).css("position",""),$(a).css("zoom","")}}):$.unblockUI()},startPageLoading:function(a){a&&a.animate?($(".page-spinner-bar").remove(),$("body").append('<div class="page-spinner-bar"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div>')):($(".page-loading").remove(),$("body").append('<div class="page-loading"><img src="'+this.getGlobalImgPath()+'loading-spinner-blue.gif"/>&nbsp;&nbsp;<span>'+(a&&a.message?a.message:"Loading...")+"</span></div>"))},stopPageLoading:function(){$(".page-loading, .page-spinner-bar").remove()},alert:function(a){a=$.extend(!0,{container:"",place:"append",type:"success",message:"",close:!0,reset:!0,focus:!0,closeInSeconds:0,icon:""},a);var b=Metronic.getUniqueID("Metronic_alert"),c='<div id="'+b+'" class="Metronic-alerts alert alert-'+a.type+' fade in">'+(a.close?'<button type="button" class="close" data-dismiss="alert" aria-hidden="true"></button>':"")+(""!==a.icon?'<i class="fa-lg fa fa-'+a.icon+'"></i>  ':"")+a.message+"</div>";return a.reset&&$(".Metronic-alerts").remove(),a.container?"append"==a.place?$(a.container).append(c):$(a.container).prepend(c):$("body").hasClass("page-container-bg-solid")?$(".page-title").after(c):$(".page-bar").size()>0?$(".page-bar").after(c):$(".page-breadcrumb").after(c),a.focus&&Metronic.scrollTo($("#"+b)),a.closeInSeconds>0&&setTimeout(function(){$("#"+b).remove()},1e3*a.closeInSeconds),b},initUniform:function(a){a?$(a).each(function(){0===$(this).parents(".checker").size()&&($(this).show(),$(this).uniform())}):p()},updateUniform:function(a){$.uniform.update(a)},initFancybox:function(){C()},getActualVal:function(a){return a=$(a),a.val()===a.attr("placeholder")?"":a.val()},getURLParameter:function(a){var b,c,d=window.location.search.substring(1),e=d.split("&");for(b=0;b<e.length;b++)if(c=e[b].split("="),c[0]==a)return unescape(c[1]);return null},isTouchDevice:function(){try{return document.createEvent("TouchEvent"),!0}catch(a){return!1}},getViewPort:function(){var a=window,b="inner";return"innerWidth"in window||(b="client",a=document.documentElement||document.body),{width:a[b+"Width"],height:a[b+"Height"]}},getUniqueID:function(a){return"prefix_"+Math.floor(Math.random()*(new Date).getTime())},isIE8:function(){return c},isIE9:function(){return d},isRTL:function(){return b},isAngularJsApp:function(){return"undefined"!=typeof angular},getAssetsPath:function(){return g},setAssetsPath:function(a){g=a},setGlobalImgPath:function(a){h=a},getGlobalImgPath:function(){return g+h},setGlobalPluginsPath:function(a){i=a},getGlobalPluginsPath:function(){return g+i},getGlobalCssPath:function(){return g+j},getBrandColor:function(a){return k[a]?k[a]:""},getResponsiveBreakpoint:function(a){var b={xs:480,sm:768,md:900,lg:1200};return b[a]?b[a]:0}}}(),Layout=function(){var a="img/",b="css/",c=Metronic.getResponsiveBreakpoint("md"),d=function(){var a,b=$(".page-content"),d=$(".page-sidebar"),e=$("body");if(e.hasClass("page-footer-fixed")===!0&&e.hasClass("page-sidebar-fixed")===!1){var f=Metronic.getViewPort().height-$(".page-footer").outerHeight()-$(".page-header").outerHeight();b.height()<f&&b.attr("style","min-height:"+f+"px")}else{if(e.hasClass("page-sidebar-fixed"))a=g(),e.hasClass("page-footer-fixed")===!1&&(a-=$(".page-footer").outerHeight());else{var h=$(".page-header").outerHeight(),i=$(".page-footer").outerHeight();a=Metronic.getViewPort().width<c?Metronic.getViewPort().height-h-i:d.height()+20,a+h+i<=Metronic.getViewPort().height&&(a=Metronic.getViewPort().height-h-i)}b.attr("style","min-height:"+a+"px")}},e=function(a,b){var d=location.hash.toLowerCase(),e=$(".page-sidebar-menu");if("click"===a||"set"===a?b=$(b):"match"===a&&e.find("li > a").each(function(){var a=$(this).attr("href").toLowerCase();return a.length>1&&d.substr(1,a.length-1)==a.substr(1)?void(b=$(this)):void 0}),b&&0!=b.size()&&"javascript:;"!==b.attr("href").toLowerCase()&&"#"!==b.attr("href").toLowerCase()){parseInt(e.data("slide-speed")),e.data("keep-expanded");e.find("li.active").removeClass("active"),e.find("li > a > .selected").remove(),e.hasClass("page-sidebar-menu-hover-submenu")===!1?e.find("li.open").each(function(){0===$(this).children(".sub-menu").size()&&($(this).removeClass("open"),$(this).find("> a > .arrow.open").removeClass("open"))}):e.find("li.open").removeClass("open"),b.parents("li").each(function(){$(this).addClass("active"),$(this).find("> a > span.arrow").addClass("open"),1===$(this).parent("ul.page-sidebar-menu").size()&&$(this).find("> a").append('<span class="selected"></span>'),1===$(this).children("ul.sub-menu").size()&&$(this).addClass("open")}),"click"===a&&Metronic.getViewPort().width<c&&$(".page-sidebar").hasClass("in")&&$(".page-header .responsive-toggler").click()}},f=function(){jQuery(".page-sidebar").on("click","li > a",function(a){var b=$(this).next().hasClass("sub-menu");if(!(Metronic.getViewPort().width>=c&&1===$(this).parents(".page-sidebar-menu-hover-submenu").size())){if(b===!1)return void(Metronic.getViewPort().width<c&&$(".page-sidebar").hasClass("in")&&$(".page-header .responsive-toggler").click());if(!$(this).next().hasClass("sub-menu always-open")){var e=$(this).parent().parent(),f=$(this),g=$(".page-sidebar-menu"),h=jQuery(this).next(),i=g.data("auto-scroll"),j=parseInt(g.data("slide-speed")),k=g.data("keep-expanded");k!==!0&&(e.children("li.open").children("a").children(".arrow").removeClass("open"),e.children("li.open").children(".sub-menu:not(.always-open)").slideUp(j),e.children("li.open").removeClass("open"));var l=-200;h.is(":visible")?(jQuery(".arrow",jQuery(this)).removeClass("open"),jQuery(this).parent().removeClass("open"),h.slideUp(j,function(){i===!0&&$("body").hasClass("page-sidebar-closed")===!1&&($("body").hasClass("page-sidebar-fixed")?g.slimScroll({scrollTo:f.position().top}):Metronic.scrollTo(f,l)),d()})):b&&(jQuery(".arrow",jQuery(this)).addClass("open"),jQuery(this).parent().addClass("open"),h.slideDown(j,function(){i===!0&&$("body").hasClass("page-sidebar-closed")===!1&&($("body").hasClass("page-sidebar-fixed")?g.slimScroll({scrollTo:f.position().top}):Metronic.scrollTo(f,l)),d()})),a.preventDefault()}}}),jQuery(".page-sidebar").on("click"," li > a.ajaxify",function(a){a.preventDefault(),Metronic.scrollTop();var b=$(this).attr("href"),d=jQuery(".page-sidebar ul"),e=($(".page-content"),$(".page-content .page-content-body"));d.children("li.active").removeClass("active"),d.children("arrow.open").removeClass("open"),$(this).parents("li").each(function(){$(this).addClass("active"),$(this).children("a > span.arrow").addClass("open")}),$(this).parents("li").addClass("active"),Metronic.getViewPort().width<c&&$(".page-sidebar").hasClass("in")&&$(".page-header .responsive-toggler").click(),Metronic.startPageLoading();var f=$(this);$.ajax({type:"GET",cache:!1,url:b,dataType:"html",success:function(a){0===f.parents("li.open").size()&&$(".page-sidebar-menu > li.open > a").click(),Metronic.stopPageLoading(),e.html(a),Layout.fixContentHeight(),Metronic.initAjax()},error:function(a,b,c){Metronic.stopPageLoading(),e.html("<h4>Could not load the requested content.</h4>")}})}),jQuery(".page-content").on("click",".ajaxify",function(a){a.preventDefault(),Metronic.scrollTop();var b=$(this).attr("href"),d=($(".page-content"),$(".page-content .page-content-body"));Metronic.startPageLoading(),Metronic.getViewPort().width<c&&$(".page-sidebar").hasClass("in")&&$(".page-header .responsive-toggler").click(),$.ajax({type:"GET",cache:!1,url:b,dataType:"html",success:function(a){Metronic.stopPageLoading(),d.html(a),Layout.fixContentHeight(),Metronic.initAjax()},error:function(a,b,c){d.html("<h4>Could not load the requested content.</h4>"),Metronic.stopPageLoading()}})}),i(),$(".page-sidebar").on("click",".sidebar-search .remove",function(a){a.preventDefault(),$(".sidebar-search").removeClass("open")}),$(".page-sidebar .sidebar-search").on("keypress","input.form-control",function(a){return 13==a.which?($(".sidebar-search").submit(),!1):void 0}),0!==$(".sidebar-search").size()&&($(".sidebar-search .input-group").on("click",function(a){a.stopPropagation()}),$("body").on("click",function(){$(".sidebar-search").hasClass("open")&&$(".sidebar-search").removeClass("open")}))},g=function(){var a=Metronic.getViewPort().height-$(".page-header").outerHeight();return $("body").hasClass("page-footer-fixed")&&(a-=$(".page-footer").outerHeight()),a},h=function(){var a=$(".page-sidebar-menu");return Metronic.destroySlimScroll(a),0===$(".page-sidebar-fixed").size()?void d():void(Metronic.getViewPort().width>=c&&(a.attr("data-height",g()),Metronic.initSlimScroll(a),d()))},i=function(){var a=$("body");a.hasClass("page-sidebar-fixed")&&$(".page-sidebar").on("mouseenter",function(){a.hasClass("page-sidebar-closed")&&$(this).find(".page-sidebar-menu").removeClass("page-sidebar-menu-closed")}).on("mouseleave",function(){a.hasClass("page-sidebar-closed")&&$(this).find(".page-sidebar-menu").addClass("page-sidebar-menu-closed")})},j=function(){$("body");$.cookie&&"1"===$.cookie("sidebar_closed")&&Metronic.getViewPort().width>=c?($("body").addClass("page-sidebar-closed"),$(".page-sidebar-menu").addClass("page-sidebar-menu-closed")):$.cookie&&$.cookie("sidebar_closed","0")},k=function(){$(".page-header").on("click",'.hor-menu a[data-toggle="tab"]',function(a){a.preventDefault();var b=$(".hor-menu .nav"),c=b.find("li.current");$("li.active",c).removeClass("active"),$(".selected",c).remove();var d=$(this).parents("li").last();d.addClass("current"),d.find("a:first").append('<span class="selected"></span>')}),$(".page-header").on("click",".search-form",function(a){$(this).addClass("open"),$(this).find(".form-control").focus(),$(".page-header .search-form .form-control").on("blur",function(a){$(this).closest(".search-form").removeClass("open"),$(this).unbind("blur")})}),$(".page-header").on("keypress",".hor-menu .search-form .form-control",function(a){return 13==a.which?($(this).closest(".search-form").submit(),!1):void 0}),$(".page-header").on("mousedown",".search-form.open .submit",function(a){a.preventDefault(),a.stopPropagation(),$(this).closest(".search-form").submit()}),$('[data-hover="megamenu-dropdown"]').not(".hover-initialized").each(function(){$(this).dropdownHover(),$(this).addClass("hover-initialized")}),$(document).on("click",".mega-menu-dropdown .dropdown-menu",function(a){a.stopPropagation()})},l=function(){$("body").on("shown.bs.tab",'a[data-toggle="tab"]',function(){d()})},m=function(){var a=300,b=500;navigator.userAgent.match(/iPhone|iPad|iPod/i)?$(window).bind("touchend touchcancel touchleave",function(c){$(this).scrollTop()>a?$(".scroll-to-top").fadeIn(b):$(".scroll-to-top").fadeOut(b)}):$(window).scroll(function(){$(this).scrollTop()>a?$(".scroll-to-top").fadeIn(b):$(".scroll-to-top").fadeOut(b)}),$(".scroll-to-top").click(function(a){return a.preventDefault(),$("html, body").animate({scrollTop:0},b),!1})},n=function(){var a,b=$(".full-height-content");if(a=Metronic.getViewPort().height-$(".page-header").outerHeight(!0)-$(".page-footer").outerHeight(!0)-$(".page-title").outerHeight(!0)-$(".page-bar").outerHeight(!0),b.hasClass("portlet")){var d=b.find(".portlet-body");if(Metronic.getViewPort().width<c)return void Metronic.destroySlimScroll(d.find(".full-height-content-body"));a=a-b.find(".portlet-title").outerHeight(!0)-parseInt(b.find(".portlet-body").css("padding-top"))-parseInt(b.find(".portlet-body").css("padding-bottom"))-2,b.hasClass("full-height-content-scrollable")?(a-=35,d.find(".full-height-content-body").css("height",a),Metronic.initSlimScroll(d.find(".full-height-content-body"))):d.css("min-height",a)}else{if(Metronic.getViewPort().width<c)return void Metronic.destroySlimScroll(b.find(".full-height-content-body"));b.hasClass("full-height-content-scrollable")?(a-=35,b.find(".full-height-content-body").css("height",a),Metronic.initSlimScroll(b.find(".full-height-content-body"))):b.css("min-height",a)}};return{initHeader:function(){k()},setSidebarMenuActiveLink:function(a,b){e(a,b)},initSidebar:function(){h(),f(),j(),Metronic.isAngularJsApp()&&e("match"),Metronic.addResizeHandler(h)},initContent:function(){n(),l(),Metronic.addResizeHandler(d),Metronic.addResizeHandler(n)},initFooter:function(){m()},init:function(){this.initHeader(),this.initSidebar(),this.initContent(),this.initFooter()},fixContentHeight:function(){d()},initFixedSidebarHoverEffect:function(){i()},initFixedSidebar:function(){h()},getLayoutImgPath:function(){return Metronic.getAssetsPath()+a},getLayoutCssPath:function(){return Metronic.getAssetsPath()+b}}}();angular.module("xCallyShuttleApp").run(["$templateCache",function(a){a.put("app/analytic/extracted/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-file-pdf-o"></i>\n					<a href="/analytics/extracted/list">{{ \'APPLICATION_EXTRACTED_REPORTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="fa fa-file-pdf-o font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_EXTRACTED_REPORTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n\n<!-- END PAGE CONTENT-->\n'),a.put("app/analytic/metric/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_METRIC\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.metric" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.metric.name.$touched || forms.metric.$submitted) && forms.metric.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.metric.name.$touched || forms.metric.$submitted) && forms.metric.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START TABLE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.metric.table.$touched || forms.metric.$submitted) && forms.metric.table.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TABLE\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.table" name="table" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{\'APPLICATION_\'+$select.selected.value.toUpperCase() | translate}}</ui-select-match>\n        <ui-select-choices repeat="table.value as table in tables | filter: $select.search">\n          <div ng-bind-html="\'APPLICATION_\'+table.value.toUpperCase() | translate | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(forms.metric.table.$touched || forms.metric.$submitted) && forms.metric.table.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TABLE-->\n\n    <!-- START METRIC -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.metric.metric.$touched || forms.metric.$submitted) && forms.metric.metric.$invalid}">\n      <label class="control-label">{{\'APPLICATION_METRIC\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <textarea type="text" name="metric" placeholder="{{\'APPLICATION_METRIC\' | translate}}" class="form-control" data-ng-model="item.metric" required/></textarea>\n      <span data-ng-show="(forms.metric.metric.$touched || forms.metric.$submitted) && forms.metric.metric.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END METRIC -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.metric.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),
+a.put("app/analytic/metric/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-calculator"></i>\n					<a href="/analytics/metrics/list">{{ \'APPLICATION_METRICS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<!-- <div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-calculator font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_DEFAULT_METRICS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n				</div>\n			</div> -->\n			<!-- <div class="portlet-body"> -->\n				<!-- START TABLE -->\n				<!-- <div ui-grid="gridOptionsDefault" data-ng-if="gridOptionsDefault" name="gridOptionsDefault"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptionsDefault.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div> -->\n				<!-- END TABLE -->\n			<!-- </div> -->\n			<div class="portlet-title"><!-- removed margin-top20 class from title when commented the default metrics section-->\n				<div class="caption font-green-sharp">\n					<i class="icon-calculator font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_METRICS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="create()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_METRIC\' | translate }}\n						</button>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions" data-ng-if="gridOptions" name="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/analytic/metric/list/view.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_METRIC\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.metric" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.metric.name.$touched || forms.metric.$submitted) && forms.metric.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}</label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required readonly/>\n      <span data-ng-show="(forms.metric.name.$touched || forms.metric.$submitted) && forms.metric.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START TABLE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.metric.table.$touched || forms.metric.$submitted) && forms.metric.table.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TABLE\' | translate}}</label>\n      <ui-select data-ng-model="item.table" name="table" theme="bootstrap" required data-ng-disabled="true">\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{\'APPLICATION_\'+$select.selected.value.toUpperCase() | translate}}</ui-select-match>\n        <ui-select-choices repeat="table.value as table in tables | filter: $select.search">\n          <div ng-bind-html="\'APPLICATION_\'+table.value.toUpperCase() | translate | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(forms.metric.table.$touched || forms.metric.$submitted) && forms.metric.table.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TABLE-->\n\n    <!-- START METRIC -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.metric.metric.$touched || forms.metric.$submitted) && forms.metric.metric.$invalid}">\n      <label class="control-label">{{\'APPLICATION_METRIC\' | translate}}</label>\n      <textarea type="text" name="metric" placeholder="{{\'APPLICATION_METRIC\' | translate}}" class="form-control" data-ng-model="item.metric" required readonly/></textarea>\n      <span data-ng-show="(forms.metric.metric.$touched || forms.metric.$submitted) && forms.metric.metric.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END METRIC -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description" readonly></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/analytic/metric/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getMetric()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-eye"></i>\n					<a href="/analytics/metrics/list">{{ \'APPLICATION_METRICS\' | translate }}</a>\n					<i data-ng-show="metric" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="metric">\n					<a href="#">{{metric.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/metric.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{metric.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.analytics.metrics.view.settings\')}">\n							<a data-ng-href="/analytics/metrics/view/{{metric.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/analytic/metric/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_METRIC\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateMetric()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="metric.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START TABLE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.table.$touched || forms.general.$submitted) && forms.general.table.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TABLE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="metric.table" name="table" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{\'APPLICATION_\'+$select.selected.value.toUpperCase() | translate}}</ui-select-match>\n									<ui-select-choices repeat="table.value as table in tables | filter: $select.search">\n										<div ng-bind-html="\'APPLICATION_\'+table.value.toUpperCase() | translate | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.general.table.$touched || forms.general.$submitted) && forms.general.table.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TABLE-->\n\n							<!-- START METRIC -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.metric.$touched || forms.general.$submitted) && forms.general.metric.$invalid}">\n								<label class="control-label">{{\'APPLICATION_METRIC\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<textarea type="text" name="metric" placeholder="{{\'APPLICATION_METRIC\' | translate}}" class="form-control" data-ng-model="metric.metric" required/></textarea>\n								<span data-ng-show="(forms.general.metric.$touched || forms.general.$submitted) && forms.general.metric.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END METRIC -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="metric.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/analytic/report/list/copy.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_COPY_REPORT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <div class="portlet light bordered">\n    <div class="portlet-title">\n      <div class="caption font-green-sharp" style="padding-left:10px;">\n        <i class="icon-folder font-green-sharp"></i>\n        <span class="caption-subject">{{ \'APPLICATION_COPY_TO\' | translate }} </span>\n      </div>\n    </div>\n    <div class="portlet-body">\n      <div js-tree="customTreeConfig" ng-model="customTreeData" should-apply="ac()" tree="customTreeInstance" tree-events="ready:initCustomScopeTree;"></div>\n    </div>\n  </div>\n  <div class="has-error">\n    <span data-ng-show="showAlert" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_SELECT_FOLDER\' | translate}}.\n  </span>\n  </div>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/analytic/report/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_REPORT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.report" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.report.name.$touched || forms.report.$submitted) && forms.report.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.report.name.$touched || forms.report.$submitted) && forms.report.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.report.name.$touched || forms.report.$submitted) && forms.report.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_PATH\' | translate}}<span class="required" aria-required="true"></span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_PATH\' | translate}}" class="form-control" data-ng-model="path" disabled/>\n      <span data-ng-show="(forms.report.name.$touched || forms.report.$submitted) && forms.report.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.report.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/analytic/report/list/deleteNode.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_DELETE_FOLDER\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<p>\n  {{\'MESSAGE_DELETE_NODE\' | translate}} : <b>{{node}}</b>?\n</p>\n<p>\n  {{\'MESSAGE_ALL_REPORTS_WILL_BE_DELETED\' | translate}}\n</p>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="ok()" ng-disabled="forms.report.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/analytic/report/list/extract.modal.html",'<div class="modal-header">\n  <button type="button" ng-click="cancel()" class="close">Ã</button>\n  <h4 class="modal-title">{{ \'APPLICATION_EXTRACT_REPORT\' | translate }}</h4>\n</div>\n<div class="modal-body" style="text-align:center;">\n  <form name="forms.report" class="form-inline mbottom20" novalidate>\n    <div class="form-group" data-ng-class="{\'hidden\':daily}">\n      <label class="control-label">{{\'APPLICATION_DATE_RANGE\' | translate}}</label>\n      <input type="daterange" name="dates" ranges="ranges" style="min-width:190px;" enabletimepicker="timepicker" placeholder="{{\'APPLICATION_DATE_RANGE\' | translate}}" class="form-control" data-ng-model="dates" max-date="{{maxdate}}" data-ng-required="!daily" data-ng-disabled="daily" data-ng-class="{\'disabled-invisible\':daily}" style="cursor:pointer;" readonly/>\n    </div>\n    <div class="form-group" data-ng-if="daily">\n      <label class="control-label">{{\'APPLICATION_FROM\' | translate}}</label>\n    </div>\n    <div class="form-group" data-ng-if="daily">\n      <uib-timepicker ng-model="dailyTime.start" ng-change="changed()" hour-step="1" minute-step="1" show-meridian="false"></uib-timepicker>\n    </div>\n    <div class="form-group" data-ng-if="daily">\n      <label class="control-label">{{\'APPLICATION_TO\' | translate}}</label>\n    </div>\n    <div class="form-group" data-ng-if="daily">\n      <uib-timepicker ng-model="dailyTime.end" ng-change="changed()" hour-step="1" minute-step="1" show-meridian="false"></uib-timepicker>\n    </div>\n      <!-- START STATUS -->\n      <div class="form-group">\n      <input\n      bs-switch\n      class="form-control"\n      ng-model="daily"\n      type="checkbox"\n      name="auth"\n      switch-active="{{ dailySwitch.isActive }}"\n      switch-on-text="{{ dailySwitch.onText }}"\n      switch-off-text="{{ dailySwitch.offText }}"\n      switch-on-color="{{ dailySwitch.onColor }}"\n      switch-off-color="{{ dailySwitch.offColor }}"\n      switch-animate="{{ dailySwitch.animate }}"\n      switch-size="{{ dailySwitch.size }}"\n      switch-label="{{ dailySwitch.label }}"\n      switch-icon="{{ dailySwitch.icon }}"\n      switch-radio-off="{{ dailySwitch.radioOff }}"\n      switch-label-width="{{ dailySwitch.labelWidth }}"\n      switch-handle-width="{{ dailySwitch.handleWidth }}">\n    </div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn default green-jungle" type="button" data-ng-click="extract(\'csv\')"><i class="fa fa-file-excel-o"></i> {{ \'APPLICATION_SAVE_AS_CSV\' | translate }}</button>\n  <button class="btn default red-intense" type="button" data-ng-click="extract(\'pdf\')"><i class="fa fa-file-pdf-o"></i> {{ \'APPLICATION_SAVE_AS_PDF\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/analytic/report/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getTrees()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-book-open"></i>\n					<a href="/analytics/reports/list">{{ \'APPLICATION_REPORTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n		<div class="col-fixed">\n			<!-- BEGIN Portlet PORTLET-->\n			<div class="portlet light bordered">\n				<div class="portlet-title">\n					<div class="caption font-green-sharp" style="padding-left:10px;">\n						<i class="icon-folder font-green-sharp"></i>\n						<span class="caption-subject">{{ \'APPLICATION_FOLDERS\' | translate }} </span>\n					</div>\n					<div class="inputs">\n						<div class="portlet-input input-inline input-small">\n							<div class="input-icon right">\n								<i class="icon-magnifier"></i>\n								<input type="text" data-ng-model="searchField" data-ng-change="searchTrees()" class="form-control input-circle" placeholder="search...">\n							</div>\n						</div>\n					</div>\n				</div>\n				<div class="portlet-body">\n					<div js-tree="defaultTreeConfig" ng-model="defaultTreeData" should-apply="ac()" tree="defaultTreeInstance" tree-events="ready:initDefaultScopeTree;select_node:selectDefaultNode;"></div>\n					<div js-tree="customTreeConfig" ng-model="customTreeData" should-apply="ac()" tree="customTreeInstance" tree-events="ready:initCustomScopeTree;select_node:selectCustomNode;rename_node:updateCustomTree;delete_node:updateCustomTree;move_node:updateCustomTree;create_node:updateCustomTree;"></div>\n				</div>\n			</div>\n			<!-- END Portlet PORTLET-->\n		</div>\n		<div class="row tree-row">\n			<div class="col-md-12">\n				<!-- BEGIN Portlet PORTLET-->\n				<div class="portlet light bordered">\n					<div class="portlet-title">\n						<div class="caption font-green-sharp">\n							<i class="icon-book-open font-green-sharp"></i>\n							<span class="caption-subject">{{ \'APPLICATION_REPORTS\' | translate }}<span data-ng-if="selectedNode"> - {{selectedNode}}</span></span>\n						</div>\n						<div data-ng-if="!defaultTreeActive" class="actions">\n							<div class="btn-group" data-ng-show="id.length">\n								<a class="btn red" href="#" data-ng-click="deleteItems()">\n									<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n								</a>\n							</div>\n							<div class="btn-group">\n								<span class="btn default btn-file">\n								<span class="fileinput-new">\n								<i class="icon-cloud-upload"></i> {{\'APPLICATION_IMPORT_FROM_JSON\' | translate}}</span>\n								<input type="file" on-read-file="import($fileContent)"/>\n								</span>\n							</div>\n							<div class="btn-group">\n								<button class="btn green-jungle " ng-click="create()">\n									<i class="icon-plus"></i> {{ \'APPLICATION_NEW_REPORT\' | translate }}\n								</button>\n							</div>\n						</div>\n					</div>\n					<div class="portlet-body">\n						<div ng-slide-down="gridOptions" lazy-render duration="1">\n						<!-- START TABLE -->\n						<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n							<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n						</div>\n						<!-- END TABLE -->\n					</div>\n					</div>\n				</div>\n				<!-- END Portlet PORTLET-->\n			</div>\n		</div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/analytic/report/list/preview.modal.html",'<div class="modal-header">\n  <button type="button" ng-click="cancel()" class="close">Ã</button>\n  <h4 class="modal-title">{{ \'APPLICATION_REPORT_PREVIEW\' | translate }}</h4>\n</div>\n<div class="modal-body" style="text-align:center;">\n  <form name="forms.report" class="form-inline mbottom20" novalidate>\n    <div class="form-group" data-ng-class="{\'hidden\':daily}">\n      <label class="control-label">{{\'APPLICATION_DATE_RANGE\' | translate}}<span class="required" aria-required="true"></span></label>\n      <input type="daterange" name="dates" ranges="ranges" style="min-width:190px;" enabletimepicker="timepicker" placeholder="{{\'APPLICATION_DATE_RANGE\' | translate}}" class="form-control" data-ng-model="dates" data-ng-change="getPage()" max-date="{{maxdate}}" data-ng-required="!daily" data-ng-disabled="daily" data-ng-class="{\'disabled-invisible\':daily}" style="cursor:pointer;" readonly/>\n    </div>\n    <div class="form-group" data-ng-if="daily">\n      <label class="control-label">{{\'APPLICATION_FROM\' | translate}}</label>\n    </div>\n    <div class="form-group" data-ng-if="daily">\n      <uib-timepicker ng-model="dailyTime.start" ng-change="changed()" hour-step="1" minute-step="1" show-meridian="false"></uib-timepicker>\n    </div>\n    <div class="form-group" data-ng-if="daily">\n      <label class="control-label">{{\'APPLICATION_TO\' | translate}}</label>\n    </div>\n    <div class="form-group" data-ng-if="daily">\n      <uib-timepicker ng-model="dailyTime.end" ng-change="changed()" hour-step="1" minute-step="1" show-meridian="false"></uib-timepicker>\n    </div>\n    <div class="form-group" data-ng-if="daily">\n      <button class="btn btn-small btn-sm btn-success" data-ng-click="getPage()">Apply</button>\n    </div>\n      <div class="form-group">\n      <input\n      bs-switch\n      class="form-control"\n      ng-model="daily"\n      type="checkbox"\n      name="auth"\n      data-ng-change="getPage()"\n      switch-active="{{ dailySwitch.isActive }}"\n      switch-on-text="{{ dailySwitch.onText }}"\n      switch-off-text="{{ dailySwitch.offText }}"\n      switch-on-color="{{ dailySwitch.onColor }}"\n      switch-off-color="{{ dailySwitch.offColor }}"\n      switch-animate="{{ dailySwitch.animate }}"\n      switch-size="{{ dailySwitch.size }}"\n      switch-label="{{ dailySwitch.label }}"\n      switch-icon="{{ dailySwitch.icon }}"\n      switch-radio-off="{{ dailySwitch.radioOff }}"\n      switch-label-width="{{ dailySwitch.labelWidth }}"\n      switch-handle-width="{{ dailySwitch.handleWidth }}">\n    </div>\n  </form>\n  <div ng-slide-down="showResult" lazy-render duration="1">\n    <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter class="grid extract-grid">\n      <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n    </div>\n  </div>\n</div>\n<div class="modal-footer">\n<button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/analytic/report/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getReport()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-book-open"></i>\n					<a href="/analytics/reports/list">{{ \'APPLICATION_REPORTS\' | translate }}</a>\n					<i data-ng-show="report" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="report">\n					<a href="#">{{report.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/analytic/report/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<div class="caption-subject font-blue-madison bold uppercase dot">{{ \'APPLICATION_REPORT\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} - {{report.name}} </div>\n				</div>\n				<ul class="nav nav-tabs">\n					<li>\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n					<li class="active">\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_BUILD\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab" data-ng-click="showResult = true">{{ \'APPLICATION_TEST_PREVIEW\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n\n				<div class="tab-content">\n\n					<!-- GENERAL TAB -->\n					<div class="tab-pane" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.report.$valid && forms.general.$valid && updateReport()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="report.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="report.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}" />\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n					<!-- BUILD TAB -->\n					<div class="tab-pane active" id="tab_1_2">\n						<form name="forms.report" data-ng-submit="forms.report.$valid && forms.general.$valid && updateReport()" novalidate>\n							<!-- START TABLE INPUT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.report.table.$touched || forms.report.$submitted) && forms.report.table.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TABLE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="report.table" name="table" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{\'APPLICATION_\'+$select.selected.value.toUpperCase() | translate}}</ui-select-match>\n									<ui-select-choices group-by="\'channel\'" repeat="table.value as table in tables | filter: $select.search">\n										<div ng-bind-html="\'APPLICATION_\'+table.value.toUpperCase() | translate | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.report.table.$touched || forms.report.$submitted) && forms.report.table.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TABLE INPUT-->\n							<div data-ng-if="report.table" class="mbottom20 pbottom20 table-responsive">\n								<div class="portlet-title tabbable-line">\n									<div class="caption caption-md">\n										<i class="icon-globe theme-font hide"></i>\n										<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_FIELDS\' | translate}} </span>\n									</div>\n								</div>\n								<!-- START TABLE -->\n								<table class="table table-striped table-bordered table-hover">\n									<thead>\n										<tr>\n											<th>{{ \'APPLICATION_FIELD\' | translate }} / {{ \'APPLICATION_METRIC\' | translate }}</th>\n											<th style="min-width:167px;">{{ \'APPLICATION_ALIAS\' | translate }}</th>\n											<th>{{ \'APPLICATION_FUNCTION\' | translate }}</th>\n											<th>{{ \'APPLICATION_FORMAT\' | translate }}</th>\n											<th>{{ \'APPLICATION_GROUP_BY\' | translate }}</th>\n											<th>{{ \'APPLICATION_ORDER_BY\' | translate }}</th>\n											<th></th>\n											<th style="min-width:66px;"></th>\n										</tr>\n									</thead>\n									<tbody ui-sortable="sortableOptions" data-ng-model="report.Fields">\n										<tr data-ng-repeat="field in report.Fields">\n											<td>\n												<!-- START FIELD -->\n												<div class="form-group" data-ng-class="{\'has-error\': forms.report.$submitted && !field.field}">\n													<!-- <label class="control-label">{{\'APPLICATION_FIELD\' | translate}}<span class="required" aria-required="true">*</span></label> -->\n													<div class="input-group">\n														<ui-select data-ng-if="!field.custom" data-ng-model="field.field" dynamic-name="randomName()" theme="bootstrap" on-select="setMetricId($item,$index)" required>\n															<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}"><span ng-bind-html="$select.selected.name"></span></ui-select-match>\n															<ui-select-choices repeat="tableField.value as tableField in tableFields | filter: $select.search">\n																<div ng-bind-html="tableField.name | highlight: $select.search"></div>\n															</ui-select-choices>\n														</ui-select>\n														<input data-ng-if="field.custom" type="text" dynamic-name="randomName()" placeholder="{{\'APPLICATION_CUSTOM\' | translate}}" class="form-control" data-ng-model="field.field" required/>\n														<span class="input-group-btn">\n																<button type="button" data-ng-click="toggleCustom(field)" class="btn btn-default">\n																	<span class="icon-pencil" data-ng-class="{\'font-blue\':field.custom}"></span>\n														</button>\n														</span>\n													</div>\n													<span data-ng-show="forms.report.$submitted && !field.field" class="help-block help-block-error">\n															<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n														</span>\n												</div>\n												<!-- END FIELD-->\n											</td>\n											<td>\n												<!-- START ALIAS -->\n												<div class="form-group" data-ng-class="{\'has-error\': forms.report.$submitted && !field.alias}">\n													<!-- <label class="control-label">{{\'APPLICATION_ALIAS\' | translate}}<span class="required" aria-required="true">*</span></label> -->\n													<input type="text" dynamic-name="randomName()" placeholder="{{\'APPLICATION_ALIAS\' | translate}}" class="form-control" data-ng-model="field.alias" data-ng-pattern="\'[A-Za-z0-9 <>=,.%_\\\\+*!\\\\-\\\\[\\\\]]+\'" required/>\n													<span data-ng-show="forms.report.$submitted && !field.alias" class="help-block help-block-error">\n															<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n														</span>\n													<span data-ng-show="forms.report.$submitted && !field.alias" class="help-block help-block-error">\n															<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n														</span>\n												</div>\n												<!-- END ALIAS -->\n											</td>\n											<td>\n												<!-- START FUNCTION -->\n												<div class="form-group">\n													<!-- <label class="control-label">{{\'APPLICATION_FIELD\' | translate}}<span class="required" aria-required="true">*</span></label> -->\n													<ui-select data-ng-model="field.function" name="function" theme="bootstrap">\n														<ui-select-match placeholder="{{\'APPLICATION_FUNCTION\' | translate}}" allow-clear>{{$select.selected.name}}</ui-select-match>\n														<ui-select-choices repeat="function.value as function in functions | filter: $select.search">\n															<div ng-bind-html="function.name | highlight: $select.search"></div>\n														</ui-select-choices>\n													</ui-select>\n												</div>\n												<!-- END FUNCTION-->\n											</td>\n											<td>\n												<!-- START FORMAT -->\n												<div class="form-group">\n													<!-- <label class="control-label">{{\'APPLICATION_FIELD\' | translate}}<span class="required" aria-required="true">*</span></label> -->\n													<ui-select data-ng-model="field.format" name="format" theme="bootstrap">\n														<ui-select-match placeholder="{{\'APPLICATION_FORMAT\' | translate}}" allow-clear>{{$select.selected.name}}</ui-select-match>\n														<ui-select-choices repeat="format.value as format in formatFunctions | filter: $select.search">\n															<div ng-bind-html="format.name | highlight: $select.search"></div>\n														</ui-select-choices>\n													</ui-select>\n												</div>\n												<!-- END FORMAT-->\n											</td>\n											<td>\n												<!-- START GROUP_BY -->\n												<div class="form-group">\n													<!-- <label class="control-label">{{\'APPLICATION_FIELD\' | translate}}<span class="required" aria-required="true">*</span></label> -->\n													<ui-select data-ng-model="field.groupBy" name="groupBy" theme="bootstrap" required>\n														<ui-select-match placeholder="{{\'APPLICATION_GROUP_BY\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n														<ui-select-choices repeat="groupBy.value as groupBy in groupByField | filter: $select.search">\n															{{$translate.instant(groupBy.name)}}\n														</ui-select-choices>\n													</ui-select>\n												</div>\n												<!-- END GROUP_BY-->\n											</td>\n											<td>\n												<!-- START ORDER_BY -->\n												<div class="form-group">\n													<!-- <label class="control-label">{{\'APPLICATION_FIELD\' | translate}}<span class="required" aria-required="true">*</span></label> -->\n													<ui-select data-ng-model="field.orderBy" name="orderBy" theme="bootstrap">\n														<ui-select-match placeholder="{{\'APPLICATION_ORDER_BY\' | translate}}" allow-clear>{{$select.selected}}</ui-select-match>\n														<ui-select-choices repeat="orderBy in [\'ASC\',\'DESC\'] | filter: $select.search">\n															<div ng-bind-html="orderBy | highlight: $select.search"></div>\n														</ui-select-choices>\n													</ui-select>\n												</div>\n												<!-- END TABLE INPUT-->\n											</td>\n											<td class="report-field-remove">\n												<button class="btn red" type="button" data-ng-click="removeField($index)"><i class="fa fa-times"></i></button>\n											</td>\n											<td class="report-field-handle">\n												<!-- <img data-ng-src="assets/images/move.png" class="img-responsive"> -->\n											</td>\n										</tr>\n										<tr data-ng-hide="report.Fields.length" class="unsortable">\n											<td colspan="8" style="text-align:center;">\n												<i>{{ \'MESSAGE_ADD_A_FIELD\' | translate }}</i>\n											</td>\n										</tr>\n									</tbody>\n								</table>\n								<button type="button" class="btn btn-sm green padding-bottom" ng-click="addField()">\n									<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_FIELD\' | translate}}\n								</button>\n								<!-- END TABLE -->\n							</div>\n							<div data-ng-if="report.Fields.length" class="mbottom20 pbottom20">\n								<div class="portlet-title tabbable-line">\n									<div class="caption caption-md">\n										<i class="icon-globe theme-font hide"></i>\n										<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_CONDITIONS\' | translate}} </span>\n									</div>\n								</div>\n								<div class="alert alert-info">\n									<strong>Output</strong>\n									<br>\n									<span ng-bind-html="output"></span>\n								</div>\n\n								<report-builder group="report.conditions.group" fields="tableFields" forms="forms" firstCall=\'true\'></report-builder>\n							</div>\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}" />\n						</form>\n					</div>\n					<!-- END BUILD TAB -->\n\n					<!-- PREVIEW TAB -->\n					<div class="tab-pane" id="tab_1_3">\n						<div ng-slide-down="showResult" lazy-render duration="0.5">\n							<div ui-grid="gridOptions" data-ng-if="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-move-columns class="grid">\n								<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n							</div>\n						</div>\n					</div>\n					<!-- END PREVIEW TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
+a.put("app/channels/chat/offline/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-bubble"></i>\n						<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-login"></i>\n						<a href="/channels/chat/offline/list">{{ \'APPLICATION_OFFLINE\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-question font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_OFFLINE_MESSAGES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/offline/message/message.directive.html",'<div class="message">\n  <div class="row">\n    <div class="col-md-12">\n      <span class="bold">From: </span>\n      [<a href="" data-ng-click="openContact(message.email)">{{message.email}}</a>]\n    </div>\n  </div>\n  <br>\n  <span class="todo-tasklist-date">\n    <i class="icon-calendar"></i> {{message.createdAt | date:\'medium\'}} (<span am-time-ago="message.createdAt"></span>)\n  </span>\n  <hr>\n  <div class="body text-left message-body" data-ng-bind="message.text"></div>\n  <h5 data-ng-hide="message.text" class="media-heading"><i>{{\'MESSAGE_NO_AVAILABLE_TEXT\' | translate | lowercase}}</i></h5>\n</div>\n'),a.put("app/channels/chat/offline/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView();">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-bubble"></i>\n					<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-login"></i>\n					<a href="/channels/chat/offline/list">Offline</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-user"></i>\n					<a href="#">{{enquiry.username}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE CONTENT -->\n		<div class="portlet light">\n			<div class="portlet-title">\n				<div class="caption">\n					<span data-ng-if="enquiry.ChatWebsite" class="caption-subject font-green-sharp bold uppercase">{{enquiry.ChatWebsite.name}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<div class="row">\n					<div class="col-md-4">\n						<!-- Visitor Information -->\n						<div class="portlet">\n							<div class="portlet-body">\n								<v-accordion class="vAccordion--default">\n									<v-pane expanded="true">\n										<v-pane-header>\n											<ng-letter-avatar data-ng-if="enquiry.ChatVisitor" height="40" width="40" data="{{enquiry.ChatVisitor.fullname}}" fontsize="25" avatarcustombgcolor="#B0B0B0" charCount="2" avatarcustomborder="border:2px solid #EA4C61" shape="round"></ng-letter-avatar>\n										</v-pane-header>\n										<v-pane-content>\n											{{\'APPLICATION_NAME\' | translate}}:<p>{{enquiry.ChatVisitor.fullname}}</p>\n											{{\'APPLICATION_EMAIL\' | translate}}:<p><a data-ng-click="openContact(enquiry.ChatVisitor.email)" href="">{{enquiry.ChatVisitor.email}}</a></p>\n											<span data-ng-if="enquiry.ChatVisitor.labelOfflineData1">{{enquiry.ChatVisitor.labelOfflineData1}}: <p>{{enquiry.ChatVisitor.offlineData1}}</p></span>\n											<span data-ng-if="enquiry.ChatVisitor.labelOfflineData2">{{enquiry.ChatVisitor.labelOfflineData2}}: <p>{{enquiry.ChatVisitor.offlineData2}}</p></span>\n											<span data-ng-if="enquiry.ChatVisitor.labelOfflineData3">{{enquiry.ChatVisitor.labelOfflineData3}}: <p>{{enquiry.ChatVisitor.offlineData3}}</p></span>\n											{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}:<p>{{enquiry.ChatVisitor.remote_address}}</p>\n											{{\'APPLICATION_BROWSER\' | translate}}:<p>{{enquiry.ChatVisitor.browser}}</p>\n											{{\'APPLICATION_REFERER\' | translate}}:<p>{{enquiry.ChatVisitor.referer}} - {{enquiry.ChatWebsite.name}}</p>\n											{{\'APPLICATION_OS\' | translate}}:<p>{{enquiry.ChatVisitor.os}}</p>\n										</v-pane-content>\n									</v-pane>\n								</v-accordion>\n							</div>\n						</div>\n					</div>\n					<div class="col-md-8">\n						<!-- Offline message -->\n						<div id="mail-box">\n							<ul class="chats">\n								<li class="in">\n									<enquiry-message message="enquiry" list-id="enquiry.ChatWebsite.ListId"></enquiry-message>\n								</li>\n							</ul>\n						</div>\n					</div>\n				</div>\n			</div>\n			<!-- END PROFILE CONTENT -->\n		</div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/online/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-bubble"></i>\n						<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-login"></i>\n						<a href="/channels/chat/online/list">{{ \'APPLICATION_ONLINE\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-question font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_VISITORS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/online/view/view.detail.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DETAIL\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body row" data-ng-init="initView()">\n				<div class="col-md-6">\n					<div class="news-blocks">\n						<h3>\n							<a href="#" class="inactive-link">{{\'APPLICATION_MESSAGES\' | translate}}</a>\n							<!-- <a href="#" data-ng-click="export()" data-ng-show="chatRoom.ChatMessages.length" class="btn btn-sm blue pull-right"><i class="icon-cloud-download"></i> {{\'APPLICATION_EXPORT\' | translate}} CSV </a> -->\n							<a href="api/chat/rooms/{{chatRoom.id}}/export" target="_blank" data-ng-show="chatRoom.ChatMessages.length" class="btn btn-sm blue pull-right"><i class="icon-cloud-download"></i> {{\'APPLICATION_EXPORT\' | translate}} CSV </a>\n							<hr>\n						</h3>\n						<div class="news-block-tags">\n							<em am-time-ago="chatRoom.ChatVisitor.ChatEnquiry.createdAt"></em>\n						</div>\n						<p>\n							<div ng-scrollbars ng-scrollbars-config="config">\n								<ul class="chats">\n									<li data-ng-class="{\'out\': message.User, \'in\':message.ChatVisitor}" data-ng-repeat="message in chatRoom.ChatMessages | orderBy:\'createdAt\'">\n										<img class="avatar" data-ng-src="api/users/avatar/{{message.User.userpic || \'unknown_avatar\'}}">\n										<div class="message">\n											<span class="arrow">\n											</span>\n											<a href="#" class="name">\n												{{message.User ? message.User.fullname : message.ChatVisitor.fullname}}\n											</a>\n											<span class="datetime">\n												at {{message.createdAt | date: \'medium\'}}\n											</span>\n											<span class="body">\n												{{message.body}}\n											</span>\n										</div>\n									</li>\n								</ul>\n							</div>\n						</div>\n					</div>\n					<div class="col-md-6">\n						<div class="news-blocks">\n							<h3>\n								<a href="#" class="inactive-link">{{\'APPLICATION_VISITOR\' | translate}}</a>\n								<hr>\n							</h3>\n							<div class="margin-top-20 profile-desc-link">\n								<i class="icon-user"></i>\n								<a href="#" class="inactive-link">{{chatRoom.ChatVisitor.fullname}}</a>\n							</div>\n							<div class="margin-top-20 profile-desc-link">\n								<i class="icon-envelope"></i>\n								<a href="#" class="inactive-link">{{chatRoom.ChatVisitor.email}}</a>\n							</div>\n							<div class="margin-top-20 profile-desc-link">\n								<i class="icon-globe"></i>\n								<a href="#" class="inactive-link">{{chatRoom.ChatVisitor.remote_address}}</a>\n							</div>\n							<div class="margin-top-20 profile-desc-link">\n								<i class="icon-home"></i>\n								<a href="#" class="inactive-link">{{chatRoom.ChatVisitor.referer}} - {{chatRoom.ChatVisitor.ChatWebsite.name}}</a>\n							</div>\n							<div class="margin-top-20 profile-desc-link">\n								<i class="icon-cursor"></i>\n								<a href="#" class="inactive-link">{{chatRoom.ChatVisitor.browser}}</a>\n							</div>\n							<div class="margin-top-20 profile-desc-link">\n								<i class="icon-screen-desktop"></i>\n								<a href="#" class="inactive-link">{{chatRoom.ChatVisitor.os}}</a>\n							</div>\n						</div>\n					</div>\n				</div>\n			</div>\n		</div>\n	</div>\n'),a.put("app/channels/chat/online/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-bubble"></i>\n					<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-login"></i>\n					<a href="/channels/chat/online/list">Online</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/enquiry.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- START USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{chatRoom.ChatVisitor.email}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{chatRoom.ChatVisitor.fullname}}\n					</div>\n				</div>\n				<!-- END USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.chat.online.view.detail\')}">\n							<a data-ng-href="/channels/chat/online/view/{{chatRoom.id}}/detail">\n							<i class="icon-tag"></i>\n							{{ \'APPLICATION_DETAIL\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/preview/preview.html",'<style>\n.xc_header_logo\n{\n	display:block;\n  background-image:url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/motion_logo.png);\n	width:40px;\n	height:40px;\n	float:left;;\n	margin-left: 10px !important;\n  margin-top: 6px !important;\n}\n.xc_rating {\n  text-align: center;\n}\n.xc_rating_label > input{ /* HIDE RADIO */\n  display:none;\n}\n.xc_rating_label > input + img{ /* IMAGE STYLES */\n  cursor:pointer;\n  border:2px solid transparent;\n}\n.xc_rating_label > input:checked + img{ /* (CHECKED) IMAGE STYLES */\n  /*border:2px solid #f00;*/\n  background-color: #efefef;\n}\n\n.xc_label {\n  display: inline-block;\n  max-width: 100%;\n  margin-bottom: 5px;\n  font-weight: bold;\n}\n\n.xc_online_message,\n.xc_offline_message,\n.xc_rating_message\n{\n  text-align: center;\n}\n\n.xc_div_group {\n  margin: 10px 0 10px 0;\n}\n.xc_footer\n{\n  text-align: center;\n  padding-bottom: 5px;\n}\n\n.xc_powered\n{\n  color: grey;\n  font: 10px/16px "Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif;\n  padding-bottom: 5px;\n}\n\n.xc_chat_container\n{\n  //width:379px;\n  //position:fixed;\n  //bottom:0;\n  //right:50px;\n  z-index:9999;\n  background-color:transparent;\n}\n\n.xc_chat_container *\n{\n  font-family:Arial,Helvetica,sans-serif;\n  font-size:13px;\n  margin:0;\n  padding:0;\n}\n\n.xc_chat_container p\n{\n  margin:5px 0;\n}\n\n.xc_signup_wrapper\n{\n  max-height:375px;\n}\n\n.xc_conversation_container\n{\n  max-height:375px;\n  list-style:none;\n  overflow:auto;\n  margin:0;\n  padding:20px 10px;\n}\n\n.xc_conversation_container a\n{\n  color:#036;\n}\n\n.xc_conversation_container a.xc_btn_style\n{\n  color:#fff;\n}\n\ndiv.xc_chat_head\n{\n  color:#fff;\n  background:{{chatWebsite.color}};\n  //border-radius: 20px 20px 0px 0px !important;\n  height:52px;\n  line-height:55px;\n  cursor:pointer;\n}\n\ndiv.xc_chat_head.rounded\n{\n  border-radius: 20px 20px 0px 0px !important;\n}\n\ndiv.xc_chat_head.squared\n{\n  //border-radius: 20px 20px 0px 0px !important;\n}\n\n.xc_chat_head-title\n{\n  margin:5px 0 0 15px;\n  color: #fff;\n}\n\n.xc_header_icon\n{\n  display:block;\n  background-image:url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/iconVisitorchat.png);\n  width:21px;\n  height:16px;\n  float:right;\n  margin:20px 20px 0 0;\n}\n\n.xc_header_icon span.xc_notification_badge span\n{\n  display:block;\n  height:16px;\n  width:15px;\n  text-align:center;\n  font-size:9px;\n  color:#555;\n  position:relative;\n  top:-20px;\n  left:4px;\n  margin:0;\n  padding:0;\n}\n\n.xc_sub-head-spacer\n{\n  padding:1px;\n}\n\n.xc_conversation\n{\n  display:none;\n  margin:0 12px 0 11px;\n}\n\n.xc_chat_toggle_container\n{\n  /*background:mediumslateblue center 52px;*/\n  background: white;\n  border-style: solid;\n  border-width: 1px;\n  border-color: {{chatWebsite.color}};\n  //display:none;\n}\n\n.xc_signup_wrapper,.xc_notifications_wrapper,.xc_enquiry_wrapper,.xc_rating_wrapper\n{\n  //display:none;\n  display:block;\n  overflow:auto;\n  line-height:1;\n  padding:25px;\n}\n\n.xc_exit_chat_container\n{\n  text-align:right;\n  width:95%;\n  margin:0 auto;\n  padding:5px 1px 0 0;\n}\n\n.xc_exit_chat_container span,.xc_exit_chat_container a\n{\n  font-size:80%;\n  color:#666;\n  text-decoration:none;\n}\n\n.xc_exit_chat_container a:hover\n{\n  color:#333;\n}\n\na.xc_btn_exit_chat_confirm:hover\n{\n  color:red;\n}\n\na.xc_btn_exit_chat_cancel:hover\n{\n  color:#0c0;\n}\n\nform.xc_form_reply\n{\n  position:relative;\n}\n\n.xc_form_reply\n{\n  /*background-color:#e3e3e3;*/\n  text-align:center;\n  /*border-top:1px solid #d3d3d3;*/\n}\n\n.xc_input_message\n{\n  height:100px;\n  margin:10px auto 5px;\n}\n\n.xc_input_enquiry_message,\n.xc_input_rating_message\n{\n  height:100px;\n}\n\n.xc_form_signup,.xc_form_enquiry,.xc_form_rating\n{\n  /*text-align:center;*/\n}\n\n.xc_chat_container textarea,.xc_chat_container input[type=text]\n{\n  width:95%;\n  min-width:95%;\n  max-width:95%;\n  -webkit-box-sizing:border-box;\n  -moz-box-sizing:border-box;\n  box-sizing:border-box;\n  background-color:#fff;\n  border:1px solid #ccc;\n  -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);\n  -moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);\n  box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);\n  -webkit-transition:border linear .2s, box-shadow linear .2s;\n  -moz-transition:border linear .2s, box-shadow linear .2s;\n  -o-transition:border linear .2s, box-shadow linear .2s;\n  transition:border linear .2s, box-shadow linear .2s;\n  display:inline-block;\n  font-size:14px;\n  line-height:20px;\n  color:#555;\n  -webkit-border-radius:4px;\n  -moz-border-radius:4px;\n  border-radius:4px;\n  vertical-align:middle;\n  margin:3px 0;\n  padding:4px 6px;\n  resize: none;\n}\n\n.xc_chat_container textarea:focus,.xc_chat_container input[type=text]:focus\n{\n  outline: {{chatWebsite.color_focus}} auto 5px;\n}\n\n.xc_chat_container input[type=text]\n{\n  height: 30px;\n}\n\n.xc_message_sending textarea, .xc_enquiry_sending textarea\n{\n  background: #fff url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/loading.gif) 98% 5px no-repeat;\n}\n\n.xc_chatrow\n{\n  display:block;\n  border-top:1px dashed #e3e3e3;\n  margin:5px 0;\n  clear: both;\n}\n\n.xc_chatrow p\n{\n  color:#444;\n  word-wrap:break-word;\n}\n\n.xc_time\n{\n  float:right;\n  font-size:80%;\n  color:#ccc;\n  padding-left:12px;\n  margin:3px;\n}\n\n.xc_submission_pending\n{\n  background:transparent url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/bullet_clock.png) left center norepeat;\n}\n\n.xc_submission_confirmed\n{\n  background:transparent url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/bullet_tick.png) left center norepeat;\n}\n\n.xc_fullname\n{\n  font-weight:700;\n}\n\n.xc_fullname:after\n{\n  content:":";\n}\n\n.xc_avatar\n{\n  float: left;\n  margin: 0 5px 5px 0;\n  display: inline-block;\n  width: 40px;\n  height: 40px;\n  border-radius: 5px;\n  -moz-border-radius: 5px;\n  -webkit-border-radius: 5px;\n}\n\n.xc_smilie\n{\n  background-repeat:no-repeat;\n  display:inline-block;\n  width:18px;\n  height:18px;\n  text-indent:-9999px;\n  white-space:nowrap;\n}\n\n.xc_btn_load_more\n{\n  width:100%!important;\n}\n\n.xc_notifications_wrapper\n{\n  text-shadow:0 1px 0 rgba(255,255,255,0.5);\n}\n\n.xc_notification_success\n{\n  color:#468847;\n}\n\n.xc_notification_error\n{\n  color:#b94a48;\n}\n\n.xc_errorlist\n{\n  margin:0 0 0 25px;\n  padding:0;\n}\n\ni.xc_btn_notifications_close\n{\n  float:right;\n  font-weight:700;\n  font-size:20px;\n  color:#ccc;\n  cursor:pointer;\n  margin:-15px 0 0;\n  padding:0;\n}\n\n.xc_btn_style\n{\n  width:95%;\n  text-align:center;\n  line-height:1.2;\n  font-size:90%;\n  -moz-box-shadow:inset 0 1px 0 0 {{chatWebsite.color_button}};\n  -webkit-box-shadow:inset 0 1px 0 0 {{chatWebsite.color_button}};\n  box-shadow:inset 0 1px 0 0 {{chatWebsite.color_button}};\n  background:0;\n  background-color:{{chatWebsite.color_button}};\n  -moz-border-radius:4px;\n  -webkit-border-radius:4px;\n  border-radius:4px;\n  border:1px solid {{chatWebsite.color_button}};\n  display:inline-block;\n  color:#fff;\n  font-weight:700;\n  text-decoration:none;\n  text-shadow:1px 1px 0 #000c17;\n  margin:0 auto 5px;\n  padding:2px 0;\n}\n\n.xc_btn_style:hover\n{\n  background:0;\n  background-color:{{chatWebsite.color_button}};\n  color: #fff;\n  text-decoration: none;\n}\n\n.xc_btn_style:active\n{\n  position:relative;\n  top:1px;\n}\n\n.xc_composing_container\n{\n  display: none;\n  width: 95%;\n  margin: 0 auto;\n  background: transparent url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/bullet_pencil.png) 6px center no-repeat;\n  padding-left: 19px;\n  font-style: italic;\n}\n\n@media only screen and (max-height: 620px) {\n  .xc_conversation_container\n  {\n    max-height:300px!important;\n  }\n}\n\n@media only screen and (max-height: 545px) {\n  .xc_conversation_container\n  {\n    max-height:200px!important;\n  }\n}\n\n@media only screen and (max-height: 445px) {\n  .xc_conversation_container\n  {\n    max-height:150px!important;\n  }\n}\n\n@media only screen and (max-width: 480px) {\n  .xc_chat_container\n  {\n    width:95%!important;\n    right:auto!important;\n    -webkit-border-top-left-radius:15px;\n    -webkit-border-top-right-radius:15px;\n    -moz-border-radius-topleft:15px;\n    -moz-border-radius-topright:15px;\n    border-top-left-radius:15px;\n    border-top-right-radius:15px;\n    box-shadow:0 0 5px rgba(0,0,0,.5);\n    -webkit-box-shadow:0 0 5px rgba(0,0,0,.5);\n    -moz-box-shadow:0 0 5px rgba(0,0,0,.5);\n  }\n\n  div.xc_chat_head\n  {\n    background-color:#036;\n    background-image:none;\n    line-height:25px;\n    height:auto;\n    -webkit-border-top-left-radius:15px;\n    -webkit-border-top-right-radius:15px;\n    -moz-border-radius-topleft:15px;\n    -moz-border-radius-topright:15px;\n    border-top-left-radius:15px;\n    border-top-right-radius:15px;\n    padding:10px;\n  }\n\n  .xc_chat_toggle_container\n  {\n    background-color:#fff;\n    background-image:none;\n    border-color:#036;\n    border-style:solid;\n    border-width:0 1px;\n  }\n\n  .xc_header_icon\n  {\n    background-image:url({{chatWebsite.remote}}/api/xchatty/assets?resource=images/icon_visitorchat.png);\n    margin:0;\n  }\n\n  .xc_header_icon span.xc_notification_badge span\n  {\n    top:-5px;\n    left:5px;\n  }\n\n  .xc_notification_success\n  {\n    background-color:#dff0d8;\n    border:1px solid #d6e9c6;\n  }\n\n  .xc_conversation_container\n  {\n    max-height:375px;\n    border-color:#036;\n  }\n\n  .xc_notification_error\n  {\n    background-color:#f2dede;\n    border:1px solid #eed3d7;\n  }\n\n  .xc_sub-head-spacer\n  {\n    display:none;\n    padding:0;\n  }\n\n  .xc_chat_head-title,.xc_conversation\n  {\n    margin:0;\n  }\n}\n</style>\n<div class="xc_chat_container">\n  <div class="xc_chat_head {{chatWebsite.header_shape}}">\n    <i class="xc_header_icon">\n      <span class="xc_notification_badge">\n        <span class="xc_notification_badge_number"></span>\n      </span>\n    </i>\n    <i class="xc_header_logo" style="background-image:url(/api/xchatty/assets?resource=images/{{(chatWebsite.defaultLogo || !license.custom) ? \'motionLogo.png\' : (!chatWebsite.defaultLogo && chatWebsite.logo && license.custom) ? chatWebsite.logo+\'&uploaded\' : \'motionLogo.png\'}});background-size:contain;"></i>\n	</a>\n    <span class="xc_chat_head-title">{{statePreview.state == \'online\' ? chatWebsite.header_online : chatWebsite.header_offline}}</span>\n  </div>\n  <div class="xc_chat_toggle_container">\n    <div class="xc_sub-head-spacer"></div>\n    <!-- <div class="xc_notifications_wrapper">\n    <ul class="xc_errorlist"></ul>\n  </div> -->\n  <div class="xc_enquiry_wrapper" data-ng-show=\'statePreview.state == "offline"\'>\n    <form class="xc_form_enquiry" accept-charset="UTF-8">\n      <p class="xc_offline_message" ng-bind-html=\'chatWebsite.offline_message\'></p>\n      <br>\n      <div ng-if="chatWebsite.enquiry_enable">\n        <div class="xc_div_group">\n          <label for="enquiryFullname" class="xc_label">{{chatWebsite.name_title}} *</label>\n          <input id="enquiryFullname" maxlength="45" data-label="Name" type="text" name="data[Enquiry][fullname]" placeholder="{{chatWebsite.username_placeholder}}" class="xc_input_enquiry_fullname" required/>\n        </div>\n        <br>\n        <div class="xc_div_group">\n          <label for="enquiryEmail" class="xc_label">{{chatWebsite.email_title}} *</label>\n          <input id="enquiryEmail" maxlength="85" type="text" data-label="Email Address" name="data[Enquiry][email]" placeholder="{{chatWebsite.email_placeholder}}" class="xc_input_enquiry_email" required/>\n        </div>\n        <br>\n        <div class="xc_div_group">\n          <label for="enquiryMessage" class="xc_label">{{chatWebsite.message_title}} *</label>\n          <textarea id="enquiryMessage" data-label="Message" maxlength="1500" placeholder="{{chatWebsite.enquiry_message_placeholder}}" name="data[Enquiry][message]" class="xc_input_enquiry_message" required></textarea>\n        </div>\n        <br>\n        <button type="submit" class="xc_btn_enquiry xc_btn_style">{{chatWebsite.enquiry_button}}</button>\n      </div>\n    </form>\n  </div>\n  <div class="xc_signup_wrapper" data-ng-show=\'statePreview.state == "online"\'>\n    <form class="xc_form_signup" accept-charset="UTF-8">\n      <p class="xc_online_message" ng-bind-html=\'chatWebsite.online_message\'></p>\n      <br>\n      <div class="xc_div_group">\n        <label for="dataFullname" class="xc_label">{{chatWebsite.name_title}} *</label>\n        <input maxlength="45" id="dataFullname" data-label="Fullname" type="text" name="data[Discussion][fullname]" placeholder="{{chatWebsite.username_placeholder}}" class="xc_input_fullname" required/>\n      </div>\n      <br>\n      <div class="xc_div_group">\n        <label for="dataEmail" class="xc_label">{{chatWebsite.email_title}} *</label>\n        <input maxlength="85" id="dataEmail" data-label="Email Address" type="text" name="data[Discussion][email]" placeholder="{{chatWebsite.email_placeholder}}" class="xc_input_email" required/>\n      </div>\n      <br>\n      <input type="hidden" class="xc_input_visitor_time" name="data[Discussion][visitor_time]" />\n      <button type="submit" class="xc_btn_signup xc_btn_style">{{chatWebsite.start_chat_button}}</button>\n    </form>\n  </div>\n  <div class="xc_rating_wrapper" data-ng-show=\'statePreview.state == "rating"\'>\n    <form class="xc_form_rating" accept-charset="UTF-8">\n      <p class="xc_rating_message">{{chatWebsite.rating_message}}</p>\n      <br>\n      <div class="xc_rating">\n        <label class="xc_rating_label" style="padding:30px;">\n          <input type="radio" name="data[Rating][rating]" value="good" />\n          <img src="{{chatWebsite.remote}}/api/xchatty/assets?resource=images/like.png" alt="Good" height="50"/>\n        </label>\n        <label class="xc_rating_label" style="padding:30px;">\n          <input type="radio" name="data[Rating][rating]" value="bad"/>\n          <img src="{{chatWebsite.remote}}/api/xchatty/assets?resource=images/dislike.png" alt="Good" height="50"/>\n        </label>\n      </div>\n      <div class="xc_div_group">\n        <label for="ratingMessage" class="xc_label">Message</label>\n        <textarea id="ratingMessage" data-label="Message" maxlength="1500" name="data[Rating][message]" class="xc_input_rating_message"></textarea>\n      </div>\n      <button type="submit" class="xc_button_rating xc_btn_style">{{chatWebsite.rating_send}}</button>\n      <button type="button" class="xc_button_skip_rating xc_btn_style">{{chatWebsite.rating_skip}}</button>\n    </form>\n  </div>\n  <div class="xc_footer">\n    <div data-ng-if="chatWebsite.defaultWhiteLabel || !license.custom" class="xc_powered"><a>Powered by xCALLY</a></div>\n		<div data-ng-if="!chatWebsite.defaultWhiteLabel && license.custom" data-ng-bind-html="chatWebsite.whiteLabel"></div>\n  </div>\n</div>\n</div>\n'),a.put("app/channels/chat/queue/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required />\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START STRATEGY -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.strategy.$touched || form.$submitted) && form.strategy.$invalid}">\n      <label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.strategy" name="strategy" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n        <ui-select-choices repeat="strategy in [\'beepall\',\'roundrobin\',\'rrmemory\'] | filter: $select.search">\n          <div ng-bind-html="strategy.toUpperCase() | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.strategy.$touched || form.$submitted) && form.strategy.$invalid && form.strategy.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END STRATEGY -->\n\n    <!-- START TIMEOUT -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.timeout.$touched || form.$submitted) && form.timeout.$invalid}">\n      <label class="control-label">{{\'APPLICATION_AGENT_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="number" name="timeout" placeholder="Timeout" class="form-control" data-ng-model="item.timeout" required min="1"/>\n      <span data-ng-show="(form.timeout.$touched || form.$submitted) && form.timeout.$invalid && form.timeout.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TIMEOUT -->\n\n    <!-- START AGENTS-->\n    <div class="form-body" data-ng-init="getTeams()">\n      <label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n      <div class="input-group input-small mbottom20">\n        <input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="item.penalty" readonly>\n        <div class="spinner-buttons input-group-btn btn-group-vertical">\n          <button type="button" class="btn spinner-up btn-xs blue" data-ng-click="item.penalty=item.penalty+1">\n            <i class="fa fa-angle-up"></i>\n          </button>\n          <button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!item.penalty" data-ng-click="item.penalty=item.penalty-1">\n            <i class="fa fa-angle-down"></i>\n          </button>\n        </div>\n      </div>\n      <div class="form-group last">\n        <div class="col-md-12" id="multi-select-team">\n        </div>\n      </div>\n    </div>\n    <!-- END AGENTS-->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),
+a.put("app/channels/chat/queue/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-bubble"></i>\n						<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-docs"></i>\n						<a href="#">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_QUEUES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="#" data-ng-click="createItem()" data-ng-if="Auth.isAdmin()">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_QUEUE\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/queue/view/view.agents.html",'<div class="row" data-ng-init="getTeams()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- BEGIN FORM-->\n				<form action="index.html" class="form-horizontal form-row-seperated">\n					<div class="form-body">\n						<label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n						<div class="input-group input-small mbottom20">\n							<input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="queue.penalty" readonly>\n							<div class="spinner-buttons input-group-btn btn-group-vertical">\n								<button type="button" class="btn spinner-up btn-xs blue" data-ng-click="queue.penalty=queue.penalty+1">\n									<i class="fa fa-angle-up"></i>\n								</button>\n								<button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!queue.penalty" data-ng-click="queue.penalty=queue.penalty-1">\n									<i class="fa fa-angle-down"></i>\n								</button>\n							</div>\n						</div>\n						<div class="form-group last">\n							<div class="col-md-12" id="multi-select-team">\n							</div>\n						</div>\n					</div>\n				</form>\n				<!-- END FORM-->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/chat/queue/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getQueue()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-bubble"></i>\n					<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/channels/chat/queues/list">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					<i data-ng-show="queue" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="queue">\n					<a href="#">{{queue.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/queue.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{queue.name}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.chat.queues.view.settings\')}">\n							<a data-ng-href="/channels/chat/queues/view/{{queue.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.channels.chat.queues.view.agents\')}" data-ng-show="Auth.getCurrentUser().role === \'admin\'">\n							<a data-ng-href="/channels/chat/queues/view/{{queue.id}}/agents">\n							<i class="icon-people"></i>\n							{{ \'APPLICATION_AGENTS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/queue/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.general" data-ng-submit="forms.general.$valid && updateChatQueue()" novalidate>\n					<!-- START NAME -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="queue.name" data-ng-pattern="settings.patternName" required />\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.pattern" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n						</span>\n					</div>\n					<!-- END NAME -->\n\n					<!-- START STRATEGY -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.strategy.$touched || forms.general.$submitted) && forms.general.strategy.$invalid}">\n						<label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}</label>\n						<ui-select data-ng-model="queue.strategy" name="strategy" theme="bootstrap">\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n							<ui-select-choices repeat="strategy in [\'beepall\',\'roundrobin\',\'rrmemory\'] | filter: $select.search">\n								<div ng-bind-html="strategy.toUpperCase() | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n					</div>\n					<!-- END STRATEGY -->\n\n					<!-- START TIMEOUT -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_AGENT\' | translate}} {{\'APPLICATION_TIMEOUT\' | translate}}</label>\n						<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" min="1" data-ng-model="queue.timeout"/>\n					</div>\n					<!-- END TIMEOUT -->\n\n					<!-- START DESCRIPTION -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n						<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="queue.description"/>\n					</div>\n					<!-- END DESCRIPTION -->\n\n					<input data-ng-if="Auth.isAdmin()" class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/chat/realtime/view/agent/agent.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-tree-view ui-grid-expandable-row ui-grid-pagination ui-grid-auto-resize>\n			<span us-spinner spinner-key="grid-spinner" spinner-start-active="true"></span>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/realtime/view/agent/agent.modal.info.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INTERFACE_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<div data-ng-if="agent.ipaddr" class="well">\n  <div>{{agent.ipaddr}}:{{agent.port}}</div>\n  <div>{{agent.fullcontact}}</div>\n  <div>{{agent.useragent}}</div>\n  <div>{{agent.lastms}}</div>\n</div>\n<div data-ng-if="!agent.ipaddr" class="alert alert-danger" role="alert">\n  {{\'MESSAGE_NO_AVAILABLE_INFO\' | translate}}\n</div>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/chat/realtime/view/agent/queue.modal.add.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_JOIN_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <div class="form-group row">\n  <label class="col-md-2 control-label" style="margin-top: 7px;">{{\'APPLICATION_QUEUE\' | translate}}:</label>\n  <div class="col-md-10">\n    <ui-select multiple ng-model="item.queues" theme="bootstrap" required>\n      <ui-select-match placeholder="{{\'APPLICATION_QUEUE\' | translate}}">{{$item.name}}</ui-select-match>\n      <ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n        <div ng-bind-html="queue.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n</div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/chat/realtime/view/application/application.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initApplications()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns class="ui-grid" ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/realtime/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-bubble"></i>\n					<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-energy"></i>\n					<a href="#">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<div>\n			<nav class="navbar navbar-default" role="navigation">\n				<div class="collapse navbar-collapse">\n					<ul class="nav navbar-nav">\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.chat.realtime.view.agents\')}">\n							<a href="/channels/chat/realtime/view/agents">\n								{{\'APPLICATION_AGENTS\' | translate}}\n							</a>\n						</li>\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.chat.realtime.view.applications\')}">\n							<a href="/channels/chat/realtime/view/applications">\n								{{\'APPLICATION_APPLICATIONS\' | translate}}\n							</a>\n						</li>\n					</ul>\n				</div>\n			</nav>\n		</div>\n\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/room/external/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n	<div class="portlet light" data-ng-init="initView()">\n		<div class="portlet-title">\n	<div class="caption">\n		<div class="btn-group btn-group-solid">\n			<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'OPEN\'" uib-uncheckable>OPEN</button>\n		</div>\n		<div class="btn-group btn-group-solid">\n			<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'CLOSED\'" uib-uncheckable>CLOSED</button>\n		</div>\n	</div>\n	<div class="actions">\n		<a href="#" class="btn btn-icon-only blue" data-ng-click="tagItems();" data-ng-show="id.length">\n			<i class="fa fa-tags"></i>\n		</a>\n		<a href="#" class="btn btn-icon-only default" data-ng-click="getPage();">\n			<i class="fa fa-refresh"></i>\n		</a>\n	</div>\n</div>\n<div class="portlet-title" data-ng-show="tags.length">\n	<!-- START TAGS -->\n	<div class="form-group">\n		<div class="row">\n			<div class="col-md-1">\n				<a href="#" class="btn btn-icon-only">\n					<i class="fa fa-tags" style="color: gray;"></i>\n				</a>\n			</div>\n			<div class="col-md-11">\n				<ui-select multiple data-ng-model="query.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)">\n					<ui-select-match placeholder="Search by tag...">{{$item}}</ui-select-match>\n					<ui-select-choices repeat="tag in tags | filter:$select.search">\n						{{tag}}\n					</ui-select-choices>\n				</ui-select>\n			</div>\n		</div>\n	</div>\n	<!-- END TAGS -->\n</div>\n<div class="portlet-body">\n		<!-- BEGIN UI-GRID SPINNER -->\n		<span us-spinner spinner-key="spinner-grid" spinner-start-active="true"></span>\n		<!-- END UI-GRID SPINNER -->\n\n		<!-- START TABLE -->\n\n		<div ui-grid="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-selection ui-grid-pagination class="ui-grid">\n			<div class="watermark" data-ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/room/group/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n	<div class="portlet light" data-ng-init="initView()">\n		<div class="portlet-title">\n	<div class="caption">\n		<div class="btn-group btn-group-solid">\n			<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'OPEN\'" uib-uncheckable>OPEN</button>\n		</div>\n		<div class="btn-group btn-group-solid">\n			<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'CLOSED\'" uib-uncheckable>CLOSED</button>\n		</div>\n	</div>\n	<div class="actions">\n		<a href="#" class="btn btn-icon-only default" data-ng-click="getPage();">\n			<i class="fa fa-refresh"></i>\n		</a>\n	</div>\n</div>\n<div class="portlet-title" data-ng-show="tags.length">\n	<!-- START TAGS -->\n	<div class="form-group">\n		<div class="row">\n			<div class="col-md-1">\n				<a href="#" class="btn btn-icon-only">\n					<i class="fa fa-tags" style="color: gray;"></i>\n				</a>\n			</div>\n			<div class="col-md-11">\n				<ui-select multiple data-ng-model="query.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)">\n					<ui-select-match placeholder="Search by tag...">{{$item}}</ui-select-match>\n					<ui-select-choices repeat="tag in tags | filter:$select.search">\n						{{tag}}\n					</ui-select-choices>\n				</ui-select>\n			</div>\n		</div>\n	</div>\n	<!-- END TAGS -->\n</div>\n<div class="portlet-body">\n		<!-- BEGIN UI-GRID SPINNER -->\n		<span us-spinner spinner-key="spinner-grid" spinner-start-active="true"></span>\n		<!-- END UI-GRID SPINNER -->\n\n		<!-- START TABLE -->\n\n		<div ui-grid="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination class="ui-grid">\n			<div class="watermark" data-ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/room/internal/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initView()">\n		<!-- BEGIN UI-GRID SPINNER -->\n		<span us-spinner spinner-key="spinner-grid" spinner-start-active="true"></span>\n		<!-- END UI-GRID SPINNER -->\n\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination class="ui-grid">\n			<div class="watermark" data-ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/room/room.add.html",'<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" data-ng-click="$dismiss()" class="close">&times;</button>\n  <h4 class="modal-title">{{\'APPLICATION_NEW_GROUP\' | translate}}</h4>\n</div>\n\n<div class="modal-body">\n  <div class="portlet box blue">\n		<div class="portlet-title">\n			<div class="caption">\n				<i class="icon-people"></i>{{\'APPLICATION_AGENTS\' | translate}}\n			</div>\n		</div>\n		<div class="portlet-body">\n			<ul>\n				<li data-ng-repeat="item in items">\n					 {{item.fullname}}\n				</li>\n        <li data-ng-repeat="item in selected.items">\n					 {{item.fullname}}\n				</li>\n			</ul>\n		</div>\n	</div>\n\n  <ui-select multiple name="items" ng-model="selected.items" theme="bootstrap">\n    <ui-select-match placeholder="{{\'APPLICATION_SELECTED_AGENTS\' | translate}}">{{$item.fullname}}</ui-select-match>\n    <ui-select-choices repeat="{id: agent.id, fullname: agent.fullname} as agent in agents.rows | filter: $select.search">\n      {{agent.fullname}}\n    </ui-select-choices>\n  </ui-select>\n</div>\n\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="selected.items.length">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/chat/room/room.close.html",'<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title | translate" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p ng-if="modal.text && !closed" ng-bind="modal.text | translate"></p>\n  <form name="form" novalidate data-ng-init="initDisposition()">\n  <div class="form-group">\n    <ui-select data-ng-model="item.disposition" name="list" theme="bootstrap" data-ng-disabled="!dispositions.length" required>\n      <ui-select-match placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}">{{$select.selected.name}}</ui-select-match>\n      <ui-select-choices repeat="disposition.name as disposition in dispositions | filter: $select.search">\n        <div ng-bind-html="disposition.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n  <div class="note note-warning" data-ng-hide="dispositions.length">\n    <h4 class="block">Warning!</h4>\n    <p>\n      {{ \'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate }}\n    </p>\n  </div>\n</form>\n  <!-- <div ng-if="modal.html" ng-bind-html="modal.html"></div> -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n  <!-- <button ng-repeat="button in modal.buttons" ng-class="button.classes" ng-click="button.click($event)" ng-bind="button.text" class="btn"></button> -->\n</div>\n'),a.put("app/channels/chat/room/room.directive.html",'<div class="portlet light">\n  <div class="portlet-title">\n    <div class="caption">\n      <span data-ng-if="chatRoom" class="label label-sm label-default">{{chatRoom.status}}</span>\n      <span data-ng-if="chatRoom.ChatWebsite"> | </span>\n      <span data-ng-if="chatRoom.ChatWebsite" class="caption-subject font-green-sharp bold uppercase">{{chatRoom.ChatWebsite.name | truncate: 25: \'...\': true}}</span>\n    </div>\n    <div class="actions">\n      <button class="btn btn-icon-only btn-primary" data-ng-click="addAgent(chatRoom.id)" data-ng-disabled="chatRoom.status === \'CLOSED\'">\n        <i class="fa fa-user-plus"></i>\n      </button>\n      <button class="btn btn-icon-only" data-ng-class="{\'btn-success\':chatRoom.status !== \'CLOSED\',\'grey-cascade\':chatRoom.status === \'CLOSED\'}" data-ng-click="closeRoom(chatRoom.id)" data-ng-if="chatRoom.ChatVisitors.length" data-ng-disabled="chatRoom.status === \'CLOSED\' && chatRoom.disposition">\n        <i data-ng-class="{\'fa fa-upload\':chatRoom.status !== \'CLOSED\',\'icon-target\':chatRoom.status === \'CLOSED\'}"></i>\n      </button>\n      <a href="api/chat/rooms/{{chatRoom.id}}/export" target="_blank" class="btn btn-primary btn-icon-only" data-ng-if="chatRoom" title="{{\'APPLICATION_EXPORT\' | translate}} CSV">\n        <i class="fa fa-download"></i>\n      </a>\n      <button class="btn default btn-icon-only" data-ng-if="chatRoom && chatRoom.status !== \'CLOSED\'" data-ng-click="togglePanelLeft()" title="{{\'APPLICATION_RESIZE\' | translate}}">\n        <i ng-class="panelRight == \'col-md-12\' ? \'icon-size-actual\' : \'icon-size-fullscreen\'"></i>\n      </button>\n    </div>\n  </div>\n  <div class="portlet-body">\n<div class="row">\n  <div data-ng-class="panelLeft" data-ng-show="panelLeft">\n    <div class="portlet">\n      <div class="portlet-body">\n        <div class="portlet-title line">\n          <div class="form">\n            <!-- START TAGS -->\n            <div class="form-group">\n              <div class="row">\n                <div class="col-md-1">\n                  <a href="#" class="btn btn-icon-only">\n                    <i class="fa fa-tags" style="color: gray;"></i>\n                  </a>\n                </div>\n                <div class="col-md-11">\n                  <ui-select multiple data-ng-model="form.tags" theme="bootstrap" on-select="onChanged(chatRoom.id)" on-remove="onChanged(chatRoom.id)">\n                    <ui-select-match placeholder="Tags...">{{$item}}</ui-select-match>\n                    <ui-select-choices repeat="tag in tags | filter:$select.search" class="">\n                      {{tag}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n            </div>\n            <!-- END TAGS -->\n          </div>\n        </div>\n        <v-accordion class="vAccordion--default">\n          <v-pane data-ng-if="chatRoom.ChatVisitors.length" data-ng-repeat="chatVisitor in chatRoom.ChatVisitors" expanded="true">\n            <v-pane-header>\n              <ng-letter-avatar\n              height="40"\n              width="40"\n              data="{{chatRoom.ChatVisitor.fullname}}"\n              fontsize="25"\n              avatarcustombgcolor="#B0B0B0"\n              charCount="2"\n              avatarcustomborder="border:2px solid #EA4C61"\n              shape="round"></ng-letter-avatar>\n            </v-pane-header>\n            <v-pane-content>\n              {{\'APPLICATION_ROOM_ID\' | translate}}: <p>{{chatRoom.id}}</p>\n              {{\'APPLICATION_NAME\' | translate}}: <p>{{chatRoom.ChatVisitor.fullname}}</p>\n              {{\'APPLICATION_EMAIL\' | translate}}: <p><a data-ng-click="openContact(chatRoom.ChatVisitor.email)" href="">{{chatRoom.ChatVisitor.email}}</a></p>\n              <span data-ng-if="chatRoom.ChatVisitor.labelData1">{{chatRoom.ChatVisitor.labelData1}}: <p>{{chatRoom.ChatVisitor.data1}}</p></span>\n              <span data-ng-if="chatRoom.ChatVisitor.labelData2">{{chatRoom.ChatVisitor.labelData2}}: <p>{{chatRoom.ChatVisitor.data2}}</p></span>\n              <span data-ng-if="chatRoom.ChatVisitor.labelData3">{{chatRoom.ChatVisitor.labelData3}}: <p>{{chatRoom.ChatVisitor.data3}}</p></span>\n              {{\'APPLICATION_REMOTE_ADDRESS\' | translate}}: <p>{{chatRoom.ChatVisitor.remote_address}}</p>\n              {{\'APPLICATION_BROWSER\' | translate}}: <p>{{chatRoom.ChatVisitor.browser}}</p>\n              {{\'APPLICATION_REFERER\' | translate}}:<p>{{chatRoom.ChatVisitor.referer}} - {{enquiry.ChatWebsite.name}}</p>\n              {{\'APPLICATION_OS\' | translate}}: <p>{{chatRoom.ChatVisitor.os}}</p>\n            </v-pane-content>\n          </v-pane>\n\n          <v-pane data-ng-repeat="user in chatRoom.Users | filter:{ id: \'!\' + user.id}">\n            <v-pane-header>\n              <ng-letter-avatar\n              height="40"\n              width="40"\n              data="{{user.fullname}}"\n              fontsize="25"\n              avatarcustombgcolor="#B0B0B0"\n              avatarcustomborder="border:2px solid #3399CC"\n              charCount="2"\n              shape="round"></ng-letter-avatar>\n            </v-pane-header>\n            <v-pane-content>\n              {{\'APPLICATION_NAME\' | translate}}: <p>{{user.fullname}}</p>\n              {{\'APPLICATION_ROLE\' | translate}}: <p>{{user.role}}</p>\n              {{\'APPLICATION_INTERNAL\' | translate}}: <p>{{user.internal}}</p>\n              {{\'APPLICATION_EMAIL\' | translate}}: <p><a data-ng-href="mailto:{{user.email}}">{{user.email}}</a></p>\n            </v-pane-content>\n          </v-pane>\n        </v-accordion>\n      </div>\n    </div>\n  </div>\n  <div data-ng-class="panelRight">\n    <div class="note note-info" data-ng-if="chatRoom && chatRoom.status == \'CLOSED\'">\n      <h4 class="block"><i class="icon-info"></i> {{\'MESSAGE_CHAT_ROOM_CLOSED\' | translate}}!</h4>\n      <p>\n        <strong>{{\'MESSAGE_CHAT_ROOM_CLOSED_DETAILS\' | translate}}.</strong>\n      </p>\n      <hr>\n      <p>\n        <i class="icon-target"></i> {{\'APPLICATION_DISPOSITION\' | translate}}: <strong>{{chatRoom.disposition}}</strong>\n      </p>\n      <p>\n        <i class="icon-star"></i> {{\'APPLICATION_RATING\' | translate}}: <strong>{{chatRoom.rating | ucfirst}}</strong>\n      </p>\n      <p>\n        <i class="icon-note"></i> {{\'APPLICATION_RATING_MESSAGE\' | translate}}: <strong>{{chatRoom.ratingMessage}}</strong>\n      </p>\n      <p>\n        <i class="icon-calendar"></i> {{\'APPLICATION_UPDATED_AT\' | translate}}: <strong>{{chatRoom.updatedAt | date:\'medium\'}}</strong> (<span am-time-ago="chatRoom.updatedAt"></span>)\n      </p>\n    </div>\n    <div class="portlet light bordered">\n      <div class="portlet-body">\n        <div id="chat-box" schroll-bottom="chatRoom.ChatMessages">\n        <ul class="chats">\n          <li data-ng-repeat="message in chatRoom.ChatMessages" data-ng-class="message.UserId == user.id ? \'out\' : \'in\'">\n            <div class="avatar" data-ng-class="message.ChatVisitor ? \'pretty-avatar-v\' : \'pretty-avatar\'">\n              <ng-letter-avatar\n              data-ng-if="!message.ChatVisitor"\n              height="40"\n              width="40"\n              fontsize="25"\n              data="{{message.User.fullname}}"\n              avatarcustombgcolor="#B0B0B0"\n              avatarcustomborder="border:2px solid #3399CC"\n              charCount="2"\n              shape="round"></ng-letter-avatar>\n              <ng-letter-avatar\n              data-ng-if="message.ChatVisitor"\n              height="40"\n              width="40"\n              fontsize="25"\n              data="{{message.ChatVisitor.fullname}}"\n              avatarcustombgcolor="#B0B0B0"\n              avatarcustomborder="border:2px solid #EA4C61"\n              charCount="2"\n              shape="round"></ng-letter-avatar>\n            </div>\n            <div class="message">\n              <span class="arrow"></span>\n              <a data-ng-click="message.ChatVisitor && openContact(chatRoom.ChatVisitor.email)" class="name">{{message.User.fullname || message.ChatVisitor.fullname}} </a>\n              <span am-time-ago="message.createdAt"></span>\n              <ng-emoticons emoticons-data="message.body"></ng-emoticons>\n            </div>\n          </li>\n          <li data-ng-if="chatRoom.status === \'CLOSED\'">\n            <div class="media-body" style="text-align: center;">\n              <h5 class="media-heading"><i>{{\'MESSAGE_CHAT_CLOSED\' | translate | lowercase}}</i></h5>\n            </div>\n          </li>\n        </ul>\n      </div>\n      <div class="chat-form" data-ng-if="chatRoom && isMyRoom(chatRoom.Users)">\n        <div class="input-cont">\n          <input class="form-control" type="text" placeholder="Type a message here..." ng-enter="sendMessage()" data-ng-model="message.body" data-ng-disabled="chatRoom.status === \'CLOSED\'"/>\n        </div>\n        <div class="btn-cont">\n          <span class="arrow"></span>\n          <a href="#" class="btn blue icn-only" data-ng-disabled="chatRoom.status === \'CLOSED\'" data-ng-click="sendMessage()">\n            <i class="fa fa-check icon-white"></i>\n          </a>\n        </div>\n      </div>\n      <div class="form-group chat-canned-answer-div" data-ng-if="chatRoom.status !== \'CLOSED\'" data-ng-class="{\'has-error\': forms.compose.subject.$invalid && forms.compose.$submitted}">\n        <div class="row">\n          <div class="col-md-1">\n            <a href="#" class="btn btn-icon-only">\n              <i class="fa fa-magic" style="color: gray;"></i>\n            </a>\n          </div>\n          <div class="col-md-11">\n            <input type="text"\n            data-ng-model="modelOptions.selectedAnswer"\n            uib-typeahead="key for key in getAnswers($viewValue)"\n            placeholder="Canned answers.."\n            typeahead-loading="loadingLocations"\n            typeahead-no-results="noResults"\n            typeahead-on-select="onSelect($item)"\n            class="form-control">\n            <i ng-show="loadingLocations" class="glyphicon glyphicon-refresh"></i>\n            <div ng-show="noResults">\n              <i class="glyphicon glyphicon-remove"></i> No Results Found\n            </div>\n            <span data-ng-show="forms.compose.subject.$invalid && forms.compose.$submitted" class="help-block help-block-error">\n'+"              <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n            </span>\n          </div>\n        </div>\n\n      </div>\n    </div>\n  </div>\n</div>\n</div>\n</div>\n"),
+a.put("app/channels/chat/room/room.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n  <div class="col-md-12">\n    <div class="page-bar">\n      <ul class="page-breadcrumb">\n        <li>\n          <i class="icon-rocket"></i>\n          <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="fa fa-spinner"></i>\n          <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="icon-bubble"></i>\n          <a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="fa fa-users"></i>\n          <a href="#">{{ \'APPLICATION_INTERACTIONS\' | translate }}</a>\n        </li>\n      </ul>\n    </div>\n\n    <div class="row inbox">\n      <div class="col-md-2">\n        <ul class="inbox-nav margin-bottom-10">\n          <li data-ng-class="{active: $state.includes(\'main.channels.chat.room.internal\')}">\n            <a href="/channels/chat/room/internal/list" class="btn">\n              {{\'APPLICATION_INTERNAL\' | translate}}\n            </a>\n            <b></b>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.chat.room.external\')}">\n            <a href="/channels/chat/room/external/list" class="btn">\n              {{\'APPLICATION_EXTERNAL\' | translate}}\n            </a>\n            <b></b>\n          </li>\n          <li data-ng-class="{active: $state.includes(\'main.channels.chat.room.group\')}">\n            <a href="/channels/chat/room/group/list" class="btn">\n              {{\'APPLICATION_GROUPS\' | translate}}\n            </a>\n            <b></b>\n          </li>\n        </ul>\n      </div>\n\n      <div class="col-md-10">\n        <div class="room-content">\n          <div ui-view></div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/room/template.html",'<div ng-bind-html="neText" ne-hljs></div>\n<div class="ne-video" ng-if="video.host" class="fade">\n  <div class="ne-video-preview" ng-hide="nePlayVideo || !options.video.details">\n    <div class="ne-video-thumb" ng-click="nePlayVideo=!nePlayVideo">\n      <img ng-src="{{video.thumbnail}}" alt=""/>\n      <i class="fa fa-play-circle-o"></i>\n    </div>\n    <div class="ne-video-detail">\n      <div class="ne-video-title">\n        <a ng-href="{{video.url}}">{{video.title}}</a>\n      </div>\n      <div class="ne-video-desc">\n        {{video.description}}\n      </div>\n      <div class="ne-video-stats">\n        <span><i class="fa fa-eye"></i> {{video.views}}</span>\n        <span><i class="fa fa-heart"></i> {{video.likes}}</span>\n      </div>\n    </div>\n  </div>\n  <div class="ne-video-player" ng-if="nePlayVideo || !(options.video.details)">\n    <iframe ng-src="{{video.embedSrc}}" frameBorder="0" width="{{video.width}}" height="{{video.height}}" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>\n  </div>\n</div>\n<div class="ne-video" ng-if="video.basic">\n  <div class="ne-video-player">\n    <div class="player">\n      <video ng-src="{{video.basic}}" controls></video>\n    </div>\n  </div>\n</div>\n<div ng-init="neImageLong=false" ng-class="{false:\'ne-image\', true:\'ne-image ne-image-long\'}[neImageLong]"\nng-if="image.url">\n<div class="ne-image-wrapper">\n  <img ng-src="{{image.url}}" ng-click="neImageLong=!neImageLong" alt=""/>\n</div>\n</div>\n<!-- <div class="ne-pdf" ng-if="pdf.url">\n  <div class="ne-pdf-preview" ng-hide="neShowPdf">\n    <div class="ne-pdf-icon">\n      <i class="fa fa-file-pdf-o"></i>\n    </div>\n    <div class="ne-pdf-detail" >\n      <div class="ne-pdf-title">\n        <a href="">{{pdf.url}}</a>\n      </div>\n      <div class="ne-pdf-view">\n\n        <button><i class="fa fa-download"></i> <a ng-href="{{pdf.url}}" target="_blank">Download</a></button>\n        <button ng-click="neShowPdf=!neShowPdf"><i class="fa fa-eye"></i> View PDF</button>\n\n      </div>\n    </div>\n  </div>\n  <div class="ne-pdf-viewer" ng-if="neShowPdf" ng-show="neShowPdf">\n    <iframe ng-src="{{pdf.url}}" frameBorder="0"></iframe>\n  </div>\n\n</div>\n<div class="ne-audio" ng-if="audio.url">\n  <audio ng-src="{{audio.url}}" controls></audio>\n</div> -->\n'),a.put("app/channels/chat/room/view.tags.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_TAGS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TRANSPORT -->\n  <div class="form-group">\n    <form name="form" novalidate>\n      <!-- START TAGS -->\n      <div class="form-group">\n        <ui-select multiple data-ng-model="item.tags" theme="bootstrap">\n          <ui-select-match placeholder="{{\'APPLICATION_TAGS\' | translate}}">{{$item}}</ui-select-match>\n          <ui-select-choices repeat="tag in tags | filter: $select.search">\n            {{tag}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n      <!-- END TAGS -->\n    </form>\n  </div>\n  <!-- END TRANSPORT -->\n</div>\n<div class="modal-footer">\n  <button type="button" class="btn" data-ng-class="button.class" data-ng-click="button.click()"data-ng-repeat="button in modal.buttons">{{button.text | translate}}</button>\n  <!-- <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button> -->\n</div>\n'),a.put("app/channels/chat/visitor/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-bubble"></i>\n						<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-question"></i>\n						<a href="/channels/chat/visitors/list">{{ \'APPLICATION_VISITORS\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-question font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_VISITORS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/visitor/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-bubble"></i>\n					<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-question"></i>\n					<a href="/channels/chat/visitors/list">{{ \'APPLICATION_VISITORS\' | translate }}</a>\n					<i  class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="chatVisitor">\n					<a href="#">{{chatVisitor.fullname}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/visitor.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{chatVisitor.fullname}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.chat.visitors.view.profile\')}">\n							<a data-ng-href="/channels/chat/visitors/view/{{chatVisitor.id}}/profile">\n							<i class="icon-tag"></i>\n							{{ \'APPLICATION_PROFILE\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/visitor/view/view.profile.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_PROFILE\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n				<div>\n					<h4 class="profile-desc-title">{{chatVisitor.email}}</h4>\n					<div class="margin-top-20 profile-desc-link">\n						<i class="icon-magnifier"></i>\n						<a href="#" class="inactive-link">{{chatVisitor.origin}}</a>\n					</div>\n					<div class="margin-top-20 profile-desc-link">\n						<i class="icon-globe"></i>\n						<a href="#" class="inactive-link">{{chatVisitor.remote_address}}</a>\n					</div>\n					<div class="margin-top-20 profile-desc-link">\n						<i class="icon-user"></i>\n						<a href="#" class="inactive-link">{{chatVisitor.user_agent | truncate: 50: \'...\'}}</a>\n					</div>\n					<div class="margin-top-20 profile-desc-link">\n						<i class="icon-flag"></i>\n						<a href="#" class="inactive-link">{{chatVisitor.visitor_language}}</a>\n					</div>\n					<div class="margin-top-20 profile-desc-link">\n						<i class="icon-home"></i>\n						<a href="#" class="inactive-link">{{chatVisitor.referer}}</a>\n					</div>\n					<div class="margin-top-20 profile-desc-link">\n						<i class="icon-cursor"></i>\n						<a href="#" class="inactive-link">{{chatVisitor.browser}}</a>\n					</div>\n					<div class="margin-top-20 profile-desc-link">\n						<i class="icon-screen-desktop"></i>\n						<a href="#" class="inactive-link">{{chatVisitor.os}}</a>\n					</div>\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/chat/website/list/list.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-bubble"></i>\n					<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-globe"></i>\n					<a href="#">{{ \'APPLICATION_WEB_SITES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n	</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_WEB_SITES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/channels/chat/websites/wizard">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_WEB_SITE\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/website/view/action/list/list.html",'<div class="row" data-ng-init="initActons()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACTIONS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/channels/chat/websites/view/{{chatWebsite.id}}/actions/wizard" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACTION\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/chat/website/view/action/view/view.html",'\n<div class="row" data-ng-init="initAction()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }}</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.settings" ng-submit="updateItem()" novalidate>\n					<!-- START APP -->\n					<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n							<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n							<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n								<div ng-bind-html="app.name | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid && forms.settings.app.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END APP -->\n\n					<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n						<!-- START QUEUE -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$invalid}">\n							<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.ChatQueueId" name="queue" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n									<div ng-bind-html="queue.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="queues.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/chat/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END QUEUE -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n						<!-- START AGENT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$invalid}">\n							<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n								<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n									<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="agents.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END AGENT -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n						<!-- START SENDMAIL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" min="1" required/>\n							<span data-ng-show="(forms.settings.from.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.mail.$touched || forms.settings.$submitted) && forms.settings.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.template.$touched || forms.settings.$submitted) && forms.settings.template.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n									<div ng-bind-html="template.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.template.$touched || forms.settings.$submitted) && forms.settings.template.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END SENDMAIL -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n						<!-- START SENDSms -->\n						<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n								<span data-ng-show="(forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid && forms.settings.to.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.text.$touched || forms.text.$submitted) && forms.settings.text.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<textarea id="text" class="form-control maxlength-handler" maxlength="160"  name="text" data-ng-model="application.data6" required></textarea>\n							<span data-ng-show="(forms.settings.text.$touched || forms.settings.$submitted) && forms.settings.text.$invalid && forms.settings.text.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<!-- END SENDSms -->\n					</div>\n\n					<!-- START INTERVAL_TYPE -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n							<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n								{{ intType.name | translate }}\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END INTERVAL_TYPE -->\n\n					<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n						<!-- START TIME -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n							<div class="input-group input-large">\n								<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n									<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n								</fieldset>\n								<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n								<fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n								<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n							</div>\n						</div>\n						<!-- END TIME -->\n\n						<!-- START ALWAYS -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n							<div class="input-group input-large">\n								<label class="control-label pointer-cursor">\n									<input\n										bs-switch\n										data-ng-model="application.alwaysTime"\n										type="checkbox"\n										switch-active="{{ isActive }}"\n										switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n										switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n										switch-on-color="{{ onColor }}"\n										switch-off-color="{{ offColor }}"\n										switch-animate="{{ animate }}"\n										switch-size="{{ size }}"\n										switch-label="{{ label }}"\n										switch-icon="{{ icon }}"\n										switch-radio-off="{{ radioOff }}"\n										switch-label-width="{{ labelWidth }}"\n										switch-handle-width="{{ handleWidth }}">\n									<!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n								</label>\n							</div>\n						</div>\n						<!-- END ALWAYS -->\n\n						<!-- START WEEKDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END WEEKDAY -->\n\n						<!-- START MONTHDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTHDAY -->\n\n						<!-- START MONTH -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTH -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n						<!-- START INTERVALS -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$invalid}">\n							<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n									{{ interval.name}}\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="intervals.length">\n								<h4 class="block">Warning!</h4>\n								<p>\n									{{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n								</p>\n								<p>\n									{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n								</p>\n							</div>\n							<span data-ng-show="(forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END INTERVALS -->\n\n					</div>\n					<button class="btn green-haze" type="submit">{{\'APPLICATION_UPDATE\' | translate}}</button>\n				</form>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/channels/chat/website/view/action/wizard/wizard.html",'\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n					<wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.action.$valid)">\n						<form name="forms.action" novalidate>\n							<!-- START APP -->\n							<div class="form-group"  data-ng-class="{\'has-error\': forms.action.$submitted && forms.action.app.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n									<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n										<div ng-bind-html="app.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="forms.action.$submitted && forms.action.app.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END APP -->\n\n							<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n								<!-- START AGENT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$invalid}">\n									<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n										<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n											<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="agents.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END AGENT -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n								<!-- START QUEUE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$invalid}">\n									<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.ChatQueueId" name="queue" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n											<div ng-bind-html="queue.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="queues.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/chat/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END QUEUE -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n								<!-- START SENDMAIL -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" min="1" required/>\n										<span data-ng-show="(forms.action.from.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.mail.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n											<div ng-bind-html="template.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END SENDMAIL -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n								<!-- START SENDSms -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n										<span data-ng-show="(forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid && forms.action.to.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<textarea id="text" class="form-control maxlength-handler"  maxlength="160" name="text" data-ng-model="application.data6" required></textarea>\n									<span data-ng-show="(forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid && forms.action.text.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<!-- END SENDSms -->\n							</div>\n\n							<!-- START INTERVAL_TYPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n										{{ intType.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END INTERVAL_TYPE -->\n\n							<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n								<!-- START TIME -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n									<div class="input-group input-large">\n										<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n											<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n										</fieldset>\n										<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n										<fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n										<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n									</div>\n								</div>\n								<!-- END TIME -->\n\n								<!-- START ALWAYS -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n									<div class="input-group input-large">\n										<label class="control-label pointer-cursor">\n											<input\n												bs-switch\n												data-ng-model="application.alwaysTime"\n												type="checkbox"\n												switch-active="{{ isActive }}"\n												switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n												switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n												switch-on-color="{{ onColor }}"\n												switch-off-color="{{ offColor }}"\n												switch-animate="{{ animate }}"\n												switch-size="{{ size }}"\n												switch-label="{{ label }}"\n												switch-icon="{{ icon }}"\n												switch-radio-off="{{ radioOff }}"\n												switch-label-width="{{ labelWidth }}"\n												switch-handle-width="{{ handleWidth }}">\n											<!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n										</label>\n									</div>\n								</div>\n								<!-- END ALWAYS -->\n\n								<!-- START WEEKDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END WEEKDAY -->\n\n								<!-- START MONTHDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTHDAY -->\n\n								<!-- START MONTH -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTH -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n								<!-- START INTERVALS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$invalid}">\n									<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n											{{ interval.name}}\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="intervals.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERVALS -->\n\n							</div>\n\n							<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONTINUE\' | translate}}"/>\n						</form>\n					</wz-step>\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/website/view/disposition/modal/add.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_DISPOSITIONS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.form.$touched || form.$submitted) && form.form.$invalid}">\n      <div class="">\n        <input type="text" name="form" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" class="form-control" data-ng-model="name" required/>\n        <span data-ng-show="form.form.$touched && form.form.$error.required" class="help-block help-block-error">\n          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n        </span>\n      </div>\n    </div>\n    <!-- END NAME -->\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="form.$valid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/chat/website/view/disposition/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DISPOSITIONS\' | translate}}</span>\n				</div>\n				<div class="actions actions-md">\n					<a href="#" class="btn btn-icon-only green" data-ng-click="addDisposition();">\n						<i class="fa fa-plus"></i>\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n				<div class="tab-content">\n					<div class="row" data-ng-hide="dispositions.length">\n						<div class="col-md-12">\n							<div class="note note-info">\n								<h4 class="block">Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}</h4>\n							</div>\n						</div>\n					</div>\n\n					<!-- GENERAL TAB -->\n					<div class="row" data-ng-repeat="disposition in dispositions">\n						<div class="col-md-12 form-group">\n							<div class="input-group">\n								<div>\n									<input class="form-control" type="text" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" data-ng-model="disposition.name">\n								</div>\n								<span class="input-group-btn">\n									<button class="btn btn-success" type="button" data-ng-click="updateDisposition(disposition.id, disposition.name);"><i class="fa fa-cloud-upload fa-fw"></i> {{\'APPLICATION_UPDATE\' | translate}}</button>\n									<button class="btn btn-danger" type="button" data-ng-click="deleteDisposition(disposition.id);"><i class="fa fa-times fa-fw"></i> {{\'APPLICATION_DELETE\' | translate}}</button>\n								</span>\n							</div>\n						</div>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/chat/website/view/embedding/view/view.html",'<div class="row" data-ng-init="initView()">\n  <div class="col-md-12">\n    <div class="portlet light">\n      <div class="portlet-title">\n        <div class="caption caption-md">\n          <i class="icon-globe theme-font hide"></i>\n          <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_EMBEDDING\' | translate}}</span>\n        </div>\n        <div class="actions">\n          <div class="btn-group">\n            <a class="btn green-jungle" href="#" data-ng-click="copyToClipboard();">\n              <i class="fa fa-clipboard"></i> {{\'APPLICATION_COPY_TO_CLIPBOARD\' | translate}}\n            </a>\n          </div>\n        </div>\n      </div>\n      <div class="portlet-body">\n        <div class="row">\n          <div class="col-md-12">\n            <h3>{{\'APPLICATION_EMBED_SNIPPET\' | translate}}</h3>\n            <p>\n              {{\'MESSAGE_EMBED_SNIPPET\' | translate}}\n            </p>\n            <div class="form-body">\n              <div class="form-group">\n                <div class="col-md-12">\n                  <code-mirror lang="html" model="snippetCode"></code-mirror>\n                </div>\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n'),a.put("app/channels/chat/website/view/form/view/view.html",'<div class="row" data-ng-init="getChatWebsiteFields(\'online\');getChatWebsiteFields(\'offline\');">\n  <div class="col-md-12">\n    <div class="portlet light">\n      <div class="portlet-title tabbable-line">\n        <ul class="nav nav-tabs">\n          <li class="active">\n            <a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_ONLINE\' | translate}}</a>\n          </li>\n          <li>\n            <a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_OFFLINE\' | translate}}</a>\n          </li>\n        </ul>\n      </div>\n    <div class="portlet-body">\n      <div class="row">\n        <div class="col-md-12">\n          <div class="tab-content">\n            <div class="tab-pane active" id="tab_1_1">\n              <div class="row">\n                <div class="col-md-6">\n                  <div class="portlet">\n                    <div class="portlet-title">\n                      <div class="caption font-green-sharp">\n                        <i class="icon-book-open font-green-sharp"></i>\n                        <span class="caption-subject">{{ \'APPLICATION_FIELDS_SELECTED\' | translate }}</span>\n                      </div>\n                      <div class="actions">\n                        <div class="btn-group">\n                          <a class="btn green-jungle" href="#" data-ng-click="saveForm(\'online\');">\n                            <i class="fa fa-check"></i> {{ \'APPLICATION_SAVE\' | translate }}\n                          </a>\n                        </div>\n                      </div>\n                    </div>\n                    <div class="portlet-body">\n                      <div fb-builder="online"></div>\n                    </div>\n                  </div>\n                </div>\n                <div class="col-md-6">\n                  <div class="portlet">\n                    <div class="portlet-title">\n                      <div class="caption font-green-sharp">\n                        <i class="icon-book-open font-green-sharp"></i>\n                        <span class="caption-subject">{{ \'APPLICATION_FIELDS_AVAILABLE\' | translate }}</span>\n                      </div>\n                    </div>\n                    <div class="portlet-body">\n                      <div fb-components></div>\n                    </div>\n                  </div>\n                </div>\n              </div>\n            </div>\n            <div class="tab-pane" id="tab_1_2">\n              <div class="row">\n                <div class="col-md-6">\n                  <div class="portlet">\n                    <div class="portlet-title">\n                      <div class="caption font-green-sharp">\n                        <i class="icon-book-open font-green-sharp"></i>\n                        <span class="caption-subject">{{ \'APPLICATION_FIELDS_SELECTED\' | translate }}</span>\n                      </div>\n                      <div class="actions">\n                        <div class="btn-group">\n                          <a class="btn green-jungle" href="#" data-ng-click="saveForm(\'offline\');">\n                            <i class="fa fa-check"></i> {{ \'APPLICATION_SAVE\' | translate }}\n                          </a>\n                        </div>\n                      </div>\n                    </div>\n                    <div class="portlet-body">\n                      <div fb-builder="offline"></div>\n                    </div>\n                  </div>\n                </div>\n                <div class="col-md-6">\n                  <div class="portlet">\n                    <div class="portlet-title">\n                      <div class="caption font-green-sharp">\n                        <i class="icon-book-open font-green-sharp"></i>\n                        <span class="caption-subject">{{ \'APPLICATION_FIELDS_AVAILABLE\' | translate }}</span>\n                      </div>\n                    </div>\n                    <div class="portlet-body">\n                      <div fb-components></div>\n                    </div>\n                  </div>\n                </div>\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n</div>\n'),a.put("app/channels/chat/website/view/hooks/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_HOOKS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_ACCEPT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_REJECT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_CLOSE\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- ACCEPT TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.accept" data-ng-submit="forms.accept.$valid && updateItem()" novalidate>\n							<!-- START ACCEPT URL -->\n								<div class="row">\n									<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid}">\n										<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n										<ui-select data-ng-model="account.acceptMethod" name="method" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n											<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n												<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n											</ui-select-choices>\n										</ui-select>\n										<span data-ng-show="(forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid && forms.accept.method.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<div  class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid}">\n										<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n										<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.acceptUrl"  ng-required="account.acceptMethod"/>\n										<span data-ng-show="(forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid && forms.accept.url.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n								<!-- END ACCEPT URL-->\n								<!-- START ACTIONS-->\n								<!-- START PAUSE -->\n								<div class="row" ng-repeat = "action in account.actions">\n									<div  ng-switch="action.action">\n											<div ng-switch-when="pause">\n												<div  class="form-group col-md-4">\n													<label class="control-label">{{\'APPLICATION_PAUSE\' | translate}}</label></br>\n														<input\n														bs-switch\n														data-ng-change="resetActionData(action)"\n														data-ng-model="action.enabled"\n														type="checkbox"\n														switch-active="{{ isActive }}"\n														switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n														switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n														switch-on-color="{{ onColor }}"\n														switch-off-color="{{ offColor }}"\n														switch-animate="{{ animate }}"\n														switch-size="{{ size }}"\n														switch-label="{{ label }}"\n														switch-icon="{{ icon }}"\n														switch-radio-off="{{ radioOff }}"\n														switch-label-width="{{ labelWidth }}"\n														switch-handle-width="{{ handleWidth }}">\n													</div>\n													<div ng-if="action.enabled" class="form-group col-md-8">\n														<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}</label>\n														<ui-select  name="action" data-ng-model="action.type"  theme="bootstrap" >\n															<ui-select-match placeholder="{{\'APPLICATION_TYPE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n															<ui-select-choices repeat=" pause.name as pause in pauses | filter: $select.search">\n																<div ng-bind-html="pause.name | highlight: $select.search | uppercase" ></div>\n															</ui-select-choices>\n														</ui-select>\n													</div>\n											</div>\n								  	</div>\n									</div>\n								<!-- END ACTION -->\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ACCEPT TAB -->\n					<!-- START REJECT TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.reject" data-ng-submit="forms.reject.$valid && updateItem()" novalidate>\n							<!-- START REJECT URL -->\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.rejectMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid && forms.reject.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.rejectUrl" ng-required="account.rejectMethod"/>\n									<span data-ng-show="(forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid && forms.reject.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n\n							<!-- END REJECT URL -->\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END REJECT TAB -->\n					<!-- START CLOSE TAB -->\n					<div class="tab-pane" id="tab_1_3">\n						<form name="forms.close" data-ng-submit="forms.close.$valid && updateItem()" novalidate>\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.closeMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid && forms.close.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.closeUrl" ng-required="account.closeMethod"/>\n									<span data-ng-show="(forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid && forms.close.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CLOSE TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
+a.put("app/channels/chat/website/view/proactive/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{title}}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START TYPE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.type.$touched || form.$submitted) && form.type.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TYPE\' | translate}}</label>\n      <ui-select name="type" ng-model="item.type" theme="bootstrap" ng-disabled="disabled">\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n        <ui-select-choices repeat="item.type as item in possibleType | filter: $select.search">\n          <div ng-bind-html="item.title | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n    </div>\n    <!-- END TYPE -->\n\n    <!-- START SELECTOR -->\n    <div class="form-group" data-ng-if="item.type === \'mouseOver\'" data-ng-class="{\'has-error\': (form.selector.$touched || form.$submitted) && form.selector.$invalid}">\n      <label class="control-label">{{\'APPLICATION_SELECTOR\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="selector" placeholder="{{\'APPLICATION_SELECTOR\' | translate}}" class="form-control" data-ng-model="item.selector" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END SELECTOR -->\n\n    <!-- START TIMEOUT -->\n    <div class="form-group" data-ng-if="item.type === \'timeout\'" data-ng-class="{\'has-error\': (form.timeout.$touched || form.$submitted) && form.timeout.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="item.timeout" min="0" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TIMEOUT -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/chat/website/view/proactive/list/list.html",'<div class="row" data-ng-init="initProactiveActions()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_PROACTIVE_ACTIONS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="#" data-toggle="dropdown" data-ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_PROACTIVE_ACTION\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/chat/website/view/setting/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItemChatWebsite()" novalidate>\n							<!-- START LIST -->\n							<div class="form-group" data-ng-if="license.cm">\n								<label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n									<div class="input-group">\n\n										<ui-select data-ng-model="chatWebsite.ListId" name="list" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_LIST\' | translate}}">{{$select.selected.name}}</ui-select-match>\n											<ui-select-choices repeat="list.id as list in lists | filter: $select.search">\n												<div ng-bind-html="list.name | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n\n										<span class="input-group-btn">\n											<button type="button" data-ng-click="chatWebsite.ListId = null" class="btn btn-default">\n												<span class="glyphicon glyphicon-trash"></span>\n											</button>\n										</span>\n\n									</div>\n							</div>\n							<!-- END LIST -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/chat/website/view/snippet/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SNIPPET\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_APPEARANCE\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_FORMS\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_LABELS\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_4" data-toggle="tab">{{\'APPLICATION_SETTINGS\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_5" data-toggle="tab">{{\'APPLICATION_OFFLINE\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="row">\n						<div class="col-md-8">\n							<div class="tab-content">\n\n								<!-- APPEARANCE TAB -->\n								<div class="tab-pane active" id="tab_1_1">\n									<form name="forms.formAppearance" data-ng-submit="forms.formAppearance.$valid && updateItem()" novalidate>\n\n										<!-- START MAIN COLOR -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.mainColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.host.$invalid}">\n											<label class="control-label">{{\'APPLICATION_MAIN_COLOR\' | translate}} <span class="required" aria-required="true">*</span></label>\n											<input colorpicker type="text" name="mainColor" placeholder="{{\'APPLICATION_MAIN_COLOR\' | translate}}" style="color:{{chatWebsite.color}}" class="form-control" data-ng-model="chatWebsite.color" required/>\n											<span data-ng-show="(forms.formAppearance.mainColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.mainColor.$invalid && forms.formAppearance.mainColor.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END MAIN COLOR -->\n\n										<!-- START FOCUS COLOR -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.focusColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.focusColor.$invalid}">\n											<label class="control-label">{{\'APPLICATION_FOCUS_COLOR\' | translate}} <span class="required" aria-required="true">*</span></label>\n											<input colorpicker type="text" name="focusColor" placeholder="{{\'APPLICATION_FOCUS_COLOR\' | translate}}" style="color:{{chatWebsite.color_focus}}" class="form-control" data-ng-model="chatWebsite.color_focus" required/>\n											<span data-ng-show="(forms.formAppearance.focusColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.focusColor.$invalid && forms.formAppearance.focusColor.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END FOCUS COLOR -->\n\n										<!-- START BUTTON COLOR -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.buttonColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.buttonColor.$invalid}">\n											<label class="control-label">{{\'APPLICATION_BUTTON_COLOR\' | translate}} <span class="required" aria-required="true">*</span></label>\n											<input colorpicker type="text" name="buttonColor" placeholder="{{\'APPLICATION_BUTTON_COLOR\' | translate}}" style="color:{{chatWebsite.color_button}}" class="form-control" data-ng-model="chatWebsite.color_button" required/>\n											<span data-ng-show="(forms.formAppearance.buttonColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.buttonColor.$invalid && forms.formAppearance.buttonColor.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END BUTTON COLOR -->\n\n										<!-- START HEADER SHAPE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.headerShape.$touched || forms.formAppearance.$submitted) && forms.formAppearance.headerShape.$invalid}">\n											<label class="control-label">{{\'APPLICATION_HEADER_SHAPE\' | translate}}</label>\n											<!-- <input colorpicker type="text" name="animationToggle" placeholder="{{\'APPLICATION_BUTTON_COLOR\' | translate}}" class="form-control" data-ng-model="chatWebsite.animation" required/> -->\n											<ui-select data-ng-model="chatWebsite.header_shape" name="headerShape" theme="bootstrap">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$translate.instant(\'APPLICATION_\' + $select.selected.toUpperCase())}}</ui-select-match>\n												<ui-select-choices repeat="headerShape in [\'rounded\',\'squared\'] | filter: $select.search">\n													<div ng-bind-html="$translate.instant(\'APPLICATION_\' + headerShape.toUpperCase()) | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n										</div>\n										<!-- END HEADER SHAPE -->\n\n										<!-- START ANIMATION TOGGLE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.animationToggle.$touched || forms.formAppearance.$submitted) && forms.formAppearance.animationToggle.$invalid}">\n											<label class="control-label">{{\'APPLICATION_ANIMATION\' | translate}}</label></br>\n											<!-- <input colorpicker type="text" name="animationToggle" placeholder="{{\'APPLICATION_BUTTON_COLOR\' | translate}}" class="form-control" data-ng-model="chatWebsite.animation" required/> -->\n											<input\n											bs-switch\n											class="form-control"\n											ng-model="chatWebsite.animation"\n											type="checkbox"\n											switch-active="{{ true }}"\n											switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n											switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n											switch-on-color="{{ radioSwitch.onColor }}"\n											switch-off-color="{{ radioSwitch.offColor }}"\n											switch-animate="{{ radioSwitch.animate }}"\n											switch-size="{{ radioSwitch.size }}"\n											switch-label="{{ radioSwitch.label }}"\n											switch-icon="{{ radioSwitch.icon }}"\n											switch-radio-off="{{ radioSwitch.radioOff }}"\n											switch-label-width="{{ radioSwitch.labelWidth }}"\n											switch-handle-width="{{ radioSwitch.handleWidth }}">\n										</div>\n										<!-- END ANIMATION TOGGLE -->\n\n										<div class="portlet-title tabbable-line margin-top20">\n											<div class="caption caption-md">\n												<i class="icon-globe theme-font hide"></i>\n												<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_WHITE_LABEL\' | translate}}</span>\n											</div>\n										</div>\n\n										<div class="form-group">\n											<label class="control-label">{{\'APPLICATION_DEFAULT\' | translate}}</label></br>\n											<input\n											bs-switch\n											class="form-control"\n											ng-model="chatWebsite.defaultWhiteLabel"\n											data-ng-init="chatWebsite.defaultWhiteLabel = license.custom ? chatWebsite.defaultWhiteLabel : true"\n											type="checkbox"\n											name="defaultWhitelabel"\n											switch-active="{{ radioSwitch.isActive }}"\n											switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n											switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n											switch-on-color="{{ radioSwitch.onColor }}"\n											switch-off-color="{{ radioSwitch.offColor }}"\n											switch-animate="{{ radioSwitch.animate }}"\n											switch-size="{{ radioSwitch.size }}"\n											switch-label="{{ radioSwitch.label }}"\n											switch-icon="{{ radioSwitch.icon }}"\n											switch-radio-off="{{ radioSwitch.radioOff }}"\n											switch-label-width="{{ radioSwitch.labelWidth }}"\n											switch-handle-width="{{ radioSwitch.handleWidth }}">\n										</div>\n										<!-- END DEFAULT -->\n										<!-- START LABEL -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.whiteLabel.$touched || forms.formAppearance.$submitted) && forms.formAppearance.whiteLabel.$invalid}">\n											<label class="control-label">{{\'APPLICATION_WHITE_LABEL\' | translate}}<span data-ng-if="!chatWebsite.defaultWhiteLabel" class="required" aria-required="true">*</span></label>\n											<textarea type="password" name="whiteLabel" placeholder="{{\'APPLICATION_WHITE_LABEL\' | translate}}" class="form-control" data-ng-model="chatWebsite.whiteLabel" data-ng-disabled="chatWebsite.defaultWhiteLabel || !license.custom" data-ng-required="!chatWebsite.defaultWhiteLabel && license.custom"/></textarea>\n											<span data-ng-show="(forms.formAppearance.whiteLabel.$touched || forms.formAppearance.$submitted) && forms.formAppearance.whiteLabel.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END LABEL -->\n\n										<div class="portlet-title tabbable-line margin-top20">\n											<div class="caption caption-md">\n												<i class="icon-globe theme-font hide"></i>\n												<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_LOGO\' | translate}}</span>\n											</div>\n										</div>\n										<div class="row">\n\n											<div class="form-group col-md-6 col-sm-6">\n												<label class="control-label">{{\'APPLICATION_DEFAULT\' | translate}}</label></br>\n												<input\n												bs-switch\n												class="form-control"\n												ng-model="chatWebsite.defaultLogo"\n												data-ng-init="chatWebsite.defaultLogo = license.custom ? chatWebsite.defaultLogo : true"\n												type="checkbox"\n												name="defaultLogo"\n												switch-active="{{ radioSwitch.isActive }}"\n												switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n												switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n												switch-on-color="{{ radioSwitch.onColor }}"\n												switch-off-color="{{ radioSwitch.offColor }}"\n												switch-animate="{{ radioSwitch.animate }}"\n												switch-size="{{ radioSwitch.size }}"\n												switch-label="{{ radioSwitch.label }}"\n												switch-icon="{{ radioSwitch.icon }}"\n												switch-radio-off="{{ radioSwitch.radioOff }}"\n												switch-label-width="{{ radioSwitch.labelWidth }}"\n												switch-handle-width="{{ radioSwitch.handleWidth }}">\n											</div>\n											<!-- END STATUS -->\n											<div class="form-group col-md-6 col-sm-6" data-ng-if="!chatWebsite.defaultLogo && license.custom">\n												<div class="fileinput fileinput-new" data-provides="fileinput">\n													<div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">\n														<img ng-src="assets/images/media/noProfileImage.png" alt=""/>\n													</div>\n													<div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;">\n													</div>\n													<div>\n														<span class="btn default btn-file" data-ng-show="!uploader.queue[0]">\n															<span> {{ \'APPLICATION_SELECT_IMAGE\' | translate }} </span>\n															<input type="file" nv-file-select="" uploader="uploader"/><br/>\n														</span>\n														<button type="button" class="btn default" data-ng-show="uploader.queue[0]" data-dismiss="fileinput" ng-click="uploader.queue[0].remove()">\n															{{ \'APPLICATION_REMOVE\' | translate }}\n														<!-- </button>\n														<button type="button" class="btn green-haze" data-ng-show="uploader.queue[0]" data-ng-click="uploader.queue[0].upload()" ng-disabled="uploader.queue[0].isReady || uploader.queue[0].isUploading || uploader.queue[0].isSuccess">\n															{{ \'APPLICATION_CONFIRM\' | translate }}\n														</button> -->\n													</div>\n													<p>\n													</br> {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} <b>jpg, png, jpeg</b>.\n												</p>\n											</div>\n										</div>\n									</div>\n									<div class="row">\n										<div class="col-md-2">\n											<table class="table" border="0">\n												<tbody>\n													<tr data-ng-repeat="item in uploader.queue">\n														<td style="border-top-style:none">\n															<strong>\n																{{ item.file.name }}\n															</strong>\n														</td>\n														<td data-ng-show="uploader.isHTML5" nowrap style="border-top-style:none">\n															{{ item.file.size/1024/1024|number:2 }} MB\n														</td>\n														<td nowrap style="border-top-style:none">\n															<button type="button" class="btn btn-danger btn-xs" data-ng-click="item.remove()">\n																<span class="glyphicon glyphicon-trash"></span> Remove\n															</button>\n														</td>\n													</tr>\n												</tbody>\n											</table>\n										</div>\n									</div>\n\n										<input class="btn green-haze" type="submit" data-ng-click="uploader.queue[0] && uploader.queue[0].upload()" data-ng-disabled="uploader.queue[0].isReady || uploader.queue[0].isUploading || uploader.queue[0].isSuccess" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n									</form>\n								</div>\n								<!-- END APPEARANCE TAB -->\n\n								<!-- FORMS TAB -->\n								<div class="tab-pane" id="tab_1_2">\n									<form name="forms.formFunctionality" data-ng-submit="forms.formFunctionality.$valid && updateItem()" novalidate>\n\n										<!-- START DOWNLOAD TRANSCRIPT -->\n										<div class="form-group">\n											<label class="control-label">{{\'APPLICATION_DOWNLOAD_TRANSCRIPT\' | translate}}</label>\n											</br>\n											<input\n											bs-switch\n											class="form-control"\n											ng-model="chatWebsite.download_transcript"\n											type="checkbox"\n											switch-active="true"\n											switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n											switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n											switch-on-color="{{ radioSwitch.onColor }}"\n											switch-off-color="{{ radioSwitch.offColor }}"\n											switch-animate="{{ radioSwitch.animate }}"\n											switch-size="{{ radioSwitch.size }}"\n											switch-label="{{ radioSwitch.label }}"\n											switch-icon="{{ radioSwitch.icon }}"\n											switch-radio-off="{{ radioSwitch.radioOff }}"\n											switch-label-width="{{ radioSwitch.labelWidth }}"\n											switch-handle-width="{{ radioSwitch.handleWidth }}">\n										</div>\n										<!-- END DOWNLOAD TRANSCRIPT -->\n\n										<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n									</form>\n								</div>\n								<!-- END FORMS TAB -->\n\n								<!-- STRINGS TAB -->\n								<div class="tab-pane" id="tab_1_3">\n									<form name="forms.formLabel" data-ng-submit="forms.formLabel.$valid && updateItem()" novalidate>\n\n										<h4 class="block" data-ng-show="statePreview.state == \'online\'">{{\'APPLICATION_ONLINE_STATE\' | translate}}</h4>\n\n										<!-- START HEADER ONLINE -->\n										<div class="form-group" data-ng-show="statePreview.state == \'online\'" data-ng-class="{\'has-error\': (forms.formLabel.headerOnline.$touched || forms.formLabel.$submitted) && forms.formLabel.headerOnline.$invalid}">\n											<label class="control-label">{{\'APPLICATION_HEADER_ONLINE\' | translate}}</label>\n											<input type="text" name="headerOnline" placeholder="{{\'APPLICATION_HEADER_ONLINE\' | translate}}" class="form-control" data-ng-model="chatWebsite.header_online"/>\n										</div>\n										<!-- END HEADER ONLINE -->\n\n										<!-- START ONLINE MESSAGE-->\n										<div class="form-group" data-ng-show="statePreview.state == \'online\'" data-ng-class="{\'has-error\': (forms.formLabel.onlineMessage.$touched || forms.formLabel.$submitted) && forms.formLabel.onlineMessage.$invalid}">\n											<label class="control-label">{{\'APPLICATION_ONLINE_MESSAGE\' | translate}}</label>\n											<input type="text" name="onlineMessage" placeholder="{{\'APPLICATION_ONLINE_MESSAGE\' | translate}}" class="form-control" data-ng-model="chatWebsite.online_message"/>\n										</div>\n										<!-- END HEADER ONLINE -->\n\n										<!-- START USERNAME TITLE -->\n										<div class="form-group" data-ng-show="statePreview.state == \'online\' || statePreview.state == \'offline\'" data-ng-class="{\'has-error\': (forms.formLabel.nameTitle.$touched || forms.formLabel.$submitted) && forms.formLabel.nameTitle.$invalid}">\n											<label class="control-label">{{\'APPLICATION_NAME_TITLE\' | translate}}</label>\n											<input type="text" name="nameTitle" placeholder="{{\'APPLICATION_NAME_TITLE\' | translate}}" class="form-control" data-ng-model="chatWebsite.name_title"/>\n										</div>\n										<!-- END USERNAME TITLE -->\n\n										<!-- START USERNAME PLACEHOLDER -->\n										<div class="form-group" data-ng-show="statePreview.state == \'online\' || statePreview.state == \'offline\'" data-ng-class="{\'has-error\': (forms.formLabel.usernamePlaceholder.$touched || forms.formLabel.$submitted) && forms.formLabel.usernamePlaceholder.$invalid}">\n											<label class="control-label">{{\'APPLICATION_NAME_PLACEHOLDER\' | translate}}</label>\n											<input type="text" name="usernamePlaceholder" placeholder="{{\'APPLICATION_NAME_PLACEHOLDER\' | translate}}" class="form-control" data-ng-model="chatWebsite.username_placeholder"/>\n										</div>\n										<!-- END USERNAME PLACEHOLDER -->\n\n										<!-- START EMAIL TITLE -->\n										<div class="form-group" data-ng-show="statePreview.state == \'online\' || statePreview.state == \'offline\'" data-ng-class="{\'has-error\': (forms.formLabel.emailTitle.$touched || forms.formLabel.$submitted) && forms.formLabel.emailTitle.$invalid}">\n											<label class="control-label">{{\'APPLICATION_EMAIL_TITLE\' | translate}}</label>\n											<input type="text" name="emailTitle" placeholder="{{\'APPLICATION_EMAIL_TITLE\' | translate}}" class="form-control" data-ng-model="chatWebsite.email_title"/>\n										</div>\n										<!-- END EMAIL TITLE -->\n\n										<!-- START EMAIL PLACEHOLDER -->\n										<div class="form-group" data-ng-show="statePreview.state == \'online\' || statePreview.state == \'offline\'" data-ng-class="{\'has-error\': (forms.formLabel.emailPlaceholder.$touched || forms.formLabel.$submitted) && forms.formLabel.emailPlaceholder.$invalid}">\n											<label class="control-label">{{\'APPLICATION_EMAIL_PLACEHOLDER\' | translate}}</label>\n											<input type="text" name="emailPlaceholder" placeholder="{{\'APPLICATION_EMAIL_PLACEHOLDER\' | translate}}" class="form-control" data-ng-model="chatWebsite.email_placeholder"/>\n										</div>\n										<!-- END EMAIL PLACEHOLDER -->\n\n										<!-- START START CHAT BUTTON -->\n										<div class="form-group" data-ng-show="statePreview.state == \'online\'" data-ng-class="{\'has-error\': (forms.formLabel.startChatButton.$touched || forms.formLabel.$submitted) && forms.formLabel.startChatButton.$invalid}">\n											<label class="control-label">{{\'APPLICATION_START_CHAT_BUTTON\' | translate}}</label>\n											<input type="text" name="startChatButton" placeholder="{{\'APPLICATION_START_CHAT_BUTTON\' | translate}}" class="form-control" data-ng-model="chatWebsite.start_chat_button"/>\n										</div>\n										<!-- END START CHAT BUTTON -->\n\n										<h4 class="block" data-ng-show="statePreview.state == \'rating\'">{{\'APPLICATION_RATING_STATE\' | translate}}</h4>\n\n										<!-- START RATING MESSAGE -->\n										<div class="form-group" data-ng-show="statePreview.state == \'rating\'" data-ng-class="{\'has-error\': (forms.formLabel.ratingMessage.$touched || forms.formLabel.$submitted) && forms.formLabel.ratingMessage.$invalid}">\n											<label class="control-label">{{\'APPLICATION_RATING_MESSAGE\' | translate}}</label>\n											<input type="text" name="ratingMessage" placeholder="{{\'APPLICATION_RATING_MESSAGE\' | translate}}" class="form-control" data-ng-model="chatWebsite.rating_message"/>\n										</div>\n										<!-- END RATING MESSAGE -->\n\n										<!-- START RATING SEND BUTTON -->\n										<div class="form-group" data-ng-show="statePreview.state == \'rating\'" data-ng-class="{\'has-error\': (forms.formLabel.ratingSend.$touched || forms.formLabel.$submitted) && forms.formLabel.ratingSend.$invalid}">\n											<label class="control-label">{{\'APPLICATION_RATING_SEND_BUTTON\' | translate}}</label>\n											<input type="text" name="ratingSend" placeholder="{{\'APPLICATION_RATING_SEND_BUTTON\' | translate}}" class="form-control" data-ng-model="chatWebsite.rating_send"/>\n										</div>\n										<!-- END RATING SEND BUTTON -->\n\n										<!-- START RATING SKIP BUTTON -->\n										<div class="form-group" data-ng-show="statePreview.state == \'rating\'" data-ng-class="{\'has-error\': (forms.formLabel.ratingSkip.$touched || forms.formLabel.$submitted) && forms.formLabel.ratingSkip.$invalid}">\n											<label class="control-label">{{\'APPLICATION_RATING_SKIP_BUTTON\' | translate}}</label>\n											<input type="text" name="ratingSkip" placeholder="{{\'APPLICATION_RATING_SKIP_BUTTON\' | translate}}" class="form-control" data-ng-model="chatWebsite.rating_skip"/>\n										</div>\n										<!-- END RATING SKIP BUTTON -->\n\n										<h4 class="block" data-ng-show="statePreview.state == \'offline\'">{{\'APPLICATION_OFFLINE_STATE\' | translate}}</h4>\n\n										<!-- START HEADER OFFLINE -->\n										<div class="form-group" data-ng-show="statePreview.state == \'offline\'" data-ng-class="{\'has-error\': (forms.formLabel.headerOffline.$touched || forms.formLabel.$submitted) && forms.formLabel.headerOnline.$invalid}">\n											<label class="control-label">{{\'APPLICATION_HEADER_OFFLINE\' | translate}}</label>\n											<input type="text" name="headerOffline" placeholder="{{\'APPLICATION_HEADER_OFFLINE\' | translate}}" class="form-control" data-ng-model="chatWebsite.header_offline"/>\n										</div>\n										<!-- END HEADER OFFLINE -->\n\n										<!-- START OFFLINE MESSAGE-->\n										<div class="form-group" data-ng-show="statePreview.state == \'offline\'" data-ng-class="{\'has-error\': (forms.formLabel.offlineMessage.$touched || forms.formLabel.$submitted) && forms.formLabel.offlineMessage.$invalid}">\n											<label class="control-label">{{\'APPLICATION_OFFLINE_MESSAGE\' | translate}}</label>\n											<input type="text" name="offlineMessage" placeholder="{{\'APPLICATION_OFFLINE_MESSAGE\' | translate}}" class="form-control" data-ng-model="chatWebsite.offline_message"/>\n										</div>\n										<!-- END OFFLINE MESSAGE -->\n\n										<!-- START ENQUIRY MESSAGE TITLE-->\n										<div class="form-group" data-ng-show="statePreview.state == \'offline\'" data-ng-class="{\'has-error\': (forms.formLabel.enquiryMessageTitle.$touched || forms.formLabel.$submitted) && forms.formLabel.enquiryMessageTitle.$invalid}">\n											<label class="control-label">{{\'APPLICATION_ENQUIRY_MESSAGE_TITLE\' | translate}}</label>\n											<input type="text" name="enquiryMessageTitle" placeholder="{{\'APPLICATION_ENQUIRY_MESSAGE_TITLE\' | translate}}" class="form-control" data-ng-model="chatWebsite.message_title"/>\n										</div>\n										<!-- END ENQUIRY MESSAGE TITLE -->\n\n										<!-- START ENQUIRY MESSAGE PLACEHOLDER-->\n										<div class="form-group" data-ng-show="statePreview.state == \'offline\'" data-ng-class="{\'has-error\': (forms.formLabel.enquiryMessagePlaceholder.$touched || forms.formLabel.$submitted) && forms.formLabel.enquiryMessagePlaceholder.$invalid}">\n											<label class="control-label">{{\'APPLICATION_ENQUIRY_MESSAGE_PLACEHOLDER\' | translate}}</label>\n											<input type="text" name="enquiryMessagePlaceholder" placeholder="{{\'APPLICATION_ENQUIRY_MESSAGE_PLACEHOLDER\' | translate}}" class="form-control" data-ng-model="chatWebsite.enquiry_message_placeholder"/>\n										</div>\n										<!-- END ENQUIRY MESSAGE PLACEHOLDER -->\n\n										<!-- START ENQUIRY BUTTON -->\n										<div class="form-group" data-ng-show="statePreview.state == \'offline\'" data-ng-class="{\'has-error\': (forms.formLabel.enquiryButton.$touched || forms.formLabel.$submitted) && forms.formLabel.enquiryButton.$invalid}">\n											<label class="control-label">{{\'APPLICATION_ENQUIRY_BUTTON\' | translate}}</label>\n											<input type="text" name="enquiryButton" placeholder="{{\'APPLICATION_ENQUIRY_BUTTON\' | translate}}" class="form-control" data-ng-model="chatWebsite.enquiry_button"/>\n										</div>\n										<!-- END ENQUIRY BUTTON -->\n\n										<!-- START AGENTS BUSY BUTTON -->\n										<div class="form-group" data-ng-show="statePreview.state == \'online\'" data-ng-class="{\'has-error\': (forms.formLabel.agentsBusy.$touched || forms.formLabel.$submitted) && forms.formLabel.agentsBusy.$invalid}">\n											<label class="control-label">{{\'APPLICATION_AGENTS_BUSY\' | translate}}</label>\n											<input type="text" name="agentsBusy" placeholder="{{\'APPLICATION_AGENTS_BUSY\' | translate}}" class="form-control" data-ng-model="chatWebsite.agents_busy"/>\n										</div>\n										<!-- END AGENTS BUSY BUTTON -->\n\n										<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n									</form>\n								</div>\n								<!-- END STRINGS TAB -->\n\n								<!-- SETTINGS TAB -->\n								<div class="tab-pane" id="tab_1_4">\n									<form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n\n										<!-- START NAME -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formSetting.name.$touched || forms.formSetting.$submitted) && forms.formSetting.name.$invalid}">\n											<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n											<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="chatWebsite.name" required/>\n											<span data-ng-show="(forms.formSetting.name.$touched || forms.formSetting.$submitted) && forms.formSettings.name.$invalid && forms.formSetting.name.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END NAME -->\n\n										<!-- START ADDRESS -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formSetting.address.$touched || forms.formSetting.$submitted) && forms.formSetting.address.$invalid}">\n											<label class="control-label">{{\'APPLICATION_WEB_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n											<input type="url" name="address" placeholder="{{\'APPLICATION_WEB_ADDRESS\' | translate}}" class="form-control" data-ng-model="chatWebsite.address" required/>\n											<span data-ng-show="(forms.formSetting.address.$touched || forms.formSetting.$submitted) && forms.formSetting.address.$invalid && forms.formSetting.address.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END ADDRESS -->\n\n										<!-- START REMOTE IP -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formSetting.remote.$touched || forms.formSetting.$submitted) && forms.formSetting.remote.$invalid}">\n											<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n											<input type="url" name="remote" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="chatWebsite.remote" required/>\n											<span data-ng-show="(forms.formSetting.remote.$touched || forms.formSetting.$submitted) && forms.formSetting.remote.$invalid && forms.formSetting.remote.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span class="help-block help-block-info">\n												{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n											</span>\n										</div>\n										<!-- END REMOTE IP -->\n\n										<!-- START FIDELITY -->\n										<div class="form-group">\n											<label class="control-label">{{\'APPLICATION_FIDELITY\' | translate}}</label></br>\n											<input\n											bs-switch\n											data-ng-model="chatWebsite.fidelity"\n											type="checkbox"\n											switch-active="{{ fidelitySwitch.isActive }}"\n											switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n											switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n											switch-on-color="{{ fidelitySwitch.onColor }}"\n											switch-off-color="{{ fidelitySwitch.offColor }}"\n											switch-animate="{{ fidelitySwitch.animate }}"\n											switch-size="{{ fidelitySwitch.size }}"\n											switch-label="{{ fidelitySwitch.label }}"\n											switch-icon="{{ fidelitySwitch.icon }}"\n											switch-radio-off="{{ fidelitySwitch.radioOff }}"\n											switch-label-width="{{ fidelitySwitch.labelWidth }}"\n											switch-handle-width="{{ fidelitySwitch.handleWidth }}">\n										</div>\n										<!-- END FIDELITY -->\n\n										<!-- START TIMEOUT -->\n										<div class="form-group" data-ng-if="chatWebsite.fidelity" data-ng-class="{\'has-error\': (forms.formSetting.timeout.$touched || forms.formSetting.$submitted) && forms.formSetting.timeout.$invalid}">\n											<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n											<input type="number" min="0" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="chatWebsite.timeout" required/>\n											<span data-ng-show="(forms.formSetting.timeout.$touched || forms.formSetting.$submitted) && forms.formSetting.timeout.$invalid && forms.formSetting.timeout.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="(forms.formSetting.timeout.$touched || forms.formSetting.$submitted) && forms.formSetting.timeout.$invalid && forms.formSetting.timeout.$error.number" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END TIMEOUT -->\n\n										<!-- START DESCRIPTION -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.formSetting.description.$touched || forms.formSetting.$submitted) && forms.formSetting.description.$invalid}">\n											<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n											<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="chatWebsite.description"/>\n										</div>\n										<!-- END DESCRIPTION -->\n\n										<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n									</form>\n								</div>\n								<!-- END SETTINGS TAB -->\n\n								<!-- OFFLINE TAB -->\n								<div class="tab-pane" id="tab_1_5">\n									<form name="forms.formOffline" data-ng-submit="forms.formOffline.$valid && updateItem()" novalidate>\n\n										<!-- START ENQUIRY ENABLE -->\n										<div class="form-group">\n											<label class="control-label">{{\'APPLICATION_ENQUIRY_ENABLED\' | translate}}</label></br>\n											<input\n											    bs-switch\n													class="form-control"\n											    ng-model="chatWebsite.enquiry_enable"\n											    type="checkbox"\n											    switch-active="{{ enquirySwitch.isActive }}"\n											    switch-on-text="{{ enquirySwitch.onText }}"\n											    switch-off-text="{{ enquirySwitch.offText }}"\n											    switch-on-color="{{ enquirySwitch.onColor }}"\n											    switch-off-color="{{ enquirySwitch.offColor }}"\n											    switch-animate="{{ enquirySwitch.animate }}"\n											    switch-size="{{ enquirySwitch.size }}"\n											    switch-label="{{ enquirySwitch.label }}"\n											    switch-icon="{{ enquirySwitch.icon }}"\n											    switch-radio-off="{{ enquirySwitch.radioOff }}"\n											    switch-label-width="{{ enquirySwitch.labelWidth }}"\n											    switch-handle-width="{{ enquirySwitch.handleWidth }}">\n										</div>\n										<!-- END ENQUIRY ENABLE -->\n\n										<!-- START ENQUIRY FORWARDING -->\n										<div class="form-group" data-ng-if="chatWebsite.enquiry_enable">\n											<label class="control-label">{{\'APPLICATION_ENQUIRY_FORWARDING\' | translate}}</label></br>\n											<input\n											    bs-switch\n													class="form-control"\n											    ng-model="chatWebsite.enquiry_forwarding"\n											    type="checkbox"\n											    switch-active="{{ enquirySwitch.isActive }}"\n											    switch-on-text="{{ enquirySwitch.onText }}"\n											    switch-off-text="{{ enquirySwitch.offText }}"\n											    switch-on-color="{{ enquirySwitch.onColor }}"\n											    switch-off-color="{{ enquirySwitch.offColor }}"\n											    switch-animate="{{ enquirySwitch.animate }}"\n											    switch-size="{{ enquirySwitch.size }}"\n											    switch-label="{{ enquirySwitch.label }}"\n											    switch-icon="{{ enquirySwitch.icon }}"\n											    switch-radio-off="{{ enquirySwitch.radioOff }}"\n											    switch-label-width="{{ enquirySwitch.labelWidth }}"\n											    switch-handle-width="{{ enquirySwitch.handleWidth }}">\n											<span class="help-block col-md-12">{{\'MESSAGE_REMEMBER_SMTP_SERVICE_ACCOUNT\' | translate}}.</span>\n										</div>\n										<!-- END ENQUIRY FORWARDING -->\n\n										<!-- START REMOTE IP -->\n										<div class="form-group" data-ng-if="chatWebsite.enquiry_enable && chatWebsite.enquiry_forwarding" data-ng-class="{\'has-error\': (forms.formOffline.forwardingAddress.$touched || forms.formOffline.$submitted) && forms.formSetting.forwardingAddress.$invalid}">\n											<label class="control-label">{{\'APPLICATION_ENQUIRY_FORWARDING_ADDRESS\' | translate}}<span class="required" aria-required="true">*</span></label>\n											<input type="text" name="forwardingAddress" placeholder="{{\'APPLICATION_ADDRESS\' | translate}}" class="form-control" data-ng-model="chatWebsite.enquiry_forwarding_address" required/>\n											<span data-ng-show="(forms.formOffline.forwardingAddress.$touched || forms.formOffline.$submitted) && forms.formOffline.forwardingAddress.$invalid && forms.formOffline.forwardingAddress.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END REMOTE IP -->\n\n										<!-- START HEADER SHAPE -->\n										<div class="form-group" data-ng-if="chatWebsite.enquiry_enable && chatWebsite.enquiry_forwarding" data-ng-class="{\'has-error\': (forms.formOffline.OfflineTemplateId.$touched || forms.formOffline.$submitted) && forms.formOffline.OfflineTemplateId.$invalid}">\n											<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n											<ui-select data-ng-model="chatWebsite.OfflineTemplateId" name="OfflineTemplateId" theme="bootstrap" required>\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n												<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n													<div ng-bind-html="template.name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<span data-ng-show="(forms.formOffline.OfflineTemplateId.$touched || forms.formOffline.$submitted) && forms.formOffline.OfflineTemplateId.$invalid && forms.formOffline.OfflineTemplateId.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END HEADER SHAPE -->\n\n										<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n									</form>\n								</div>\n								<!-- END OFFLINE TAB -->\n							</div>\n						</div>\n						<div class="col-md-4">\n							<!-- START STATE -->\n							<div class="form-group">\n								<!-- <label class="control-label">{{\'APPLICATION_ANIMATION\' | translate}}</label> -->\n								<!-- <input colorpicker type="text" name="animationToggle" placeholder="{{\'APPLICATION_BUTTON_COLOR\' | translate}}" class="form-control" data-ng-model="chatWebsite.animation" required/> -->\n								<ui-select data-ng-model="statePreview.state" name="statePreview" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="statePreview in [\'online\',\'rating\',\'offline\'] | filter: $select.search">\n										<div ng-bind-html="statePreview | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n							</div>\n							<!-- END STATE -->\n							<preview></preview>\n						</div>\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
+a.put("app/channels/chat/website/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-bubble"></i>\n					<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-globe"></i>\n					<a href="/channels/chat/websites/list">{{ \'APPLICATION_WEB_SITES\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{chatWebsite.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img src="assets/images/media/website.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{chatWebsite.name}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{chatWebsite.address}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.includes(\'main.channels.chat.websites.view.embedding\')}">\n							<a ng-href="/channels/chat/websites/view/{{chatWebsite.id}}/embedding/view">\n							<i class="fa fa-code"></i>\n							{{ \'APPLICATION_EMBEDDING\' | translate }} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.channels.chat.websites.view.snippet\')}">\n							<a ng-href="/channels/chat/websites/view/{{chatWebsite.id}}/snippet/view">\n							<i class="icon-note"></i>\n							{{ \'APPLICATION_SNIPPET\' | translate }} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.channels.chat.websites.view.form\')}">\n							<a ng-href="/channels/chat/websites/view/{{chatWebsite.id}}/forms/view">\n							<i class="icon-list"></i>\n							{{ \'APPLICATION_FORMS\' | translate }} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.channels.chat.websites.view.proactive\')}">\n							<a ng-href="/channels/chat/websites/view/{{chatWebsite.id}}/proactive/list">\n							<i class="icon-target"></i>\n							{{ \'APPLICATION_PROACTIVE_ACTIONS\' | translate }} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.channels.chat.websites.view.actions\')}">\n							<a ng-href="/channels/chat/websites/view/{{chatWebsite.id}}/actions/list">\n							<i class="icon-directions"></i>\n							{{ \'APPLICATION_ACTIONS\' | translate }} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.chat.websites.view.hooks\')}">\n							<a href="/channels/chat/websites/view/{{chatWebsite.id}}/hooks">\n							<i class="fa fa-code"></i>\n							{{\'APPLICATION_HOOKS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.channels.chat.websites.view.dispositions\')}">\n							<a ng-href="/channels/chat/websites/view/{{chatWebsite.id}}/dispositions">\n								<i class="icon-target"></i>\n								{{ \'APPLICATION_DISPOSITIONS\' | translate }} </a>\n							</li>\n						<li ng-class="{active: $state.is(\'main.channels.chat.websites.view.settings\')}">\n							<a href="/channels/chat/websites/view/{{chatWebsite.id}}/settings">\n							<i class="icon-settings"></i>\n							{{\'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/chat/website/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-bubble"></i>\n						<a href="#">{{ \'APPLICATION_CHAT\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-globe"></i>\n						<a href="/channels/chat/websites/list">{{ \'APPLICATION_WEB_SITES\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard();">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_WEB_SITE\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_WEB_SITE_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n						<form name="forms.formSetting" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formSetting.name.$touched || forms.formSetting.$submitted) && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="forms.formSetting.name.$touched && !forms.formSettings.name.$valid && forms.formSetting.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formSetting.address.$touched || forms.formSetting.$submitted) && forms.formSetting.address.$invalid}">\n								<label class="control-label">{{\'APPLICATION_WEB_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="address" placeholder="{{\'APPLICATION_WEB_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.address" required/>\n								<span data-ng-show="(forms.formSetting.address.$touched || forms.formSetting.$submitted) && forms.formSetting.address.$invalid && forms.formSetting.address.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ADDRESS -->\n\n							<!-- START REMOTE IP -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formSetting.remote.$touched || forms.formSetting.$submitted) && forms.formSetting.remote.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remote" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remote" required/>\n								<span class="help-block help-block-info">\n									{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n								</span>\n								<span data-ng-show="(forms.formSetting.remote.$touched || forms.formSetting.$submitted) && forms.formSetting.remote.$invalid && forms.formSetting.remote.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END REMOTE IP -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.form.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_WEB_SITE_APPEARANCE\' | translate}}" canexit="exitValidation(forms.formAppearance.$valid)">\n						<form name="forms.formAppearance" novalidate>\n\n							<!-- START MAIN COLOR -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.mainColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.host.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MAIN_COLOR\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input colorpicker type="text" name="mainColor" placeholder="{{\'APPLICATION_MAIN_COLOR\' | translate}}" style="color:{{item.color}}" class="form-control" data-ng-model="item.color" required/>\n								<span data-ng-show="(forms.formAppearance.mainColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.mainColor.$invalid && forms.formAppearance.mainColor.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MAIN COLOR -->\n\n							<!-- START FOCUS COLOR -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.focusColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.focusColor.$invalid}">\n								<label class="control-label">{{\'APPLICATION_FOCUS_COLOR\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input colorpicker type="text" name="focusColor" placeholder="{{\'APPLICATION_FOCUS_COLOR\' | translate}}" style="color:{{item.color_focus}}" class="form-control" data-ng-model="item.color_focus" required/>\n								<span data-ng-show="(forms.formAppearance.focusColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.focusColor.$invalid && forms.formAppearance.focusColor.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END FOCUS COLOR -->\n\n							<!-- START BUTTON COLOR -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.buttonColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.buttonColor.$invalid}">\n								<label class="control-label">{{\'APPLICATION_BUTTON_COLOR\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input colorpicker type="text" name="buttonColor" placeholder="{{\'APPLICATION_BUTTON_COLOR\' | translate}}" style="color:{{item.color_button}}" class="form-control" data-ng-model="item.color_button" required/>\n								<span data-ng-show="(forms.formAppearance.buttonColor.$touched || forms.formAppearance.$submitted) && forms.formAppearance.buttonColor.$invalid && forms.formAppearance.buttonColor.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END BUTTON COLOR -->\n\n							<!-- START HEADER SHAPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.headerShape.$touched || forms.formAppearance.$submitted) && forms.formAppearance.headerShape.$invalid}">\n								<label class="control-label">{{\'APPLICATION_HEADER_SHAPE\' | translate}}</label>\n								<!-- <input colorpicker type="text" name="animationToggle" placeholder="{{\'APPLICATION_BUTTON_COLOR\' | translate}}" class="form-control" data-ng-model="item.animation" required/> -->\n								<ui-select data-ng-model="item.header_shape" name="headerShape" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$translate.instant(\'APPLICATION_\' + $select.selected.toUpperCase())}}</ui-select-match>\n									<ui-select-choices repeat="headerShape in [\'rounded\',\'squared\'] | filter: $select.search">\n										<div ng-bind-html="$translate.instant(\'APPLICATION_\' + headerShape.toUpperCase()) | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n							</div>\n							<!-- END HEADER SHAPE -->\n\n							<!-- START ANIMATION TOGGLE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAppearance.animationToggle.$touched || forms.formAppearance.$submitted) && forms.formAppearance.animationToggle.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ANIMATION\' | translate}}</label>\n								<ui-select data-ng-model="item.animation" name="animationToggle" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected  ? \'On\' : \'Off\'}}</ui-select-match>\n									<ui-select-choices repeat="filter in [true,false] | filter: $select.search">\n										<div ng-bind-html="filter ? \'On\' : \'Off\' | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n							</div>\n							<!-- END ANIMATION TOGGLE -->\n\n							<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_LABELS\' | translate}}" canexit="exitValidation(forms.formLabel.$valid)">\n						<form name="forms.formLabel" novalidate>\n\n							<!-- START HEADER ONLINE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.headerOnline.$touched || forms.formLabel.$submitted) && forms.formLabel.headerOnline.$invalid}">\n								<label class="control-label">{{\'APPLICATION_HEADER_ONLINE\' | translate}}</label>\n								<input type="text" name="headerOnline" placeholder="{{\'APPLICATION_HEADER_ONLINE\' | translate}}" class="form-control" data-ng-model="item.header_online"/>\n							</div>\n							<!-- END HEADER ONLINE -->\n\n							<!-- START ONLINE MESSAGE-->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.onlineMessage.$touched || forms.formLabel.$submitted) && forms.formLabel.onlineMessage.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ONLINE_MESSAGE\' | translate}}</label>\n								<input type="text" name="onlineMessage" placeholder="{{\'APPLICATION_ONLINE_MESSAGE\' | translate}}" class="form-control" data-ng-model="item.online_message"/>\n							</div>\n							<!-- END HEADER ONLINE -->\n\n							<!-- START USERNAME TITLE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.nameTitle.$touched || forms.formLabel.$submitted) && forms.formLabel.nameTitle.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME_TITLE\' | translate}}</label>\n								<input type="text" name="nameTitle" placeholder="{{\'APPLICATION_NAME_TITLE\' | translate}}" class="form-control" data-ng-model="item.name_title"/>\n							</div>\n							<!-- END USERNAME TITLE -->\n\n							<!-- START USERNAME PLACEHOLDER -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.usernamePlaceholder.$touched || forms.formLabel.$submitted) && forms.formLabel.usernamePlaceholder.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME_PLACEHOLDER\' | translate}}</label>\n								<input type="text" name="usernamePlaceholder" placeholder="{{\'APPLICATION_NAME_PLACEHOLDER\' | translate}}" class="form-control" data-ng-model="item.username_placeholder"/>\n							</div>\n							<!-- END USERNAME PLACEHOLDER -->\n\n							<!-- START EMAIL TITLE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.emailTitle.$touched || forms.formLabel.$submitted) && forms.formLabel.emailTitle.$invalid}">\n								<label class="control-label">{{\'APPLICATION_EMAIL_TITLE\' | translate}}</label>\n								<input type="text" name="emailTitle" placeholder="{{\'APPLICATION_EMAIL_TITLE\' | translate}}" class="form-control" data-ng-model="item.email_title"/>\n							</div>\n							<!-- END EMAIL TITLE -->\n\n							<!-- START EMAIL PLACEHOLDER -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.emailPlaceholder.$touched || forms.formLabel.$submitted) && forms.formLabel.emailPlaceholder.$invalid}">\n								<label class="control-label">{{\'APPLICATION_EMAIL_PLACEHOLDER\' | translate}}</label>\n								<input type="text" name="emailPlaceholder" placeholder="{{\'APPLICATION_EMAIL_PLACEHOLDER\' | translate}}" class="form-control" data-ng-model="item.email_placeholder"/>\n							</div>\n							<!-- END EMAIL PLACEHOLDER -->\n\n							<!-- START START CHAT BUTTON -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.startChatButton.$touched || forms.formLabel.$submitted) && forms.formLabel.startChatButton.$invalid}">\n								<label class="control-label">{{\'APPLICATION_START_CHAT_BUTTON\' | translate}}</label>\n								<input type="text" name="startChatButton" placeholder="{{\'APPLICATION_START_CHAT_BUTTON\' | translate}}" class="form-control" data-ng-model="item.start_chat_button"/>\n							</div>\n							<!-- END START CHAT BUTTON -->\n\n							<!-- START RATING MESSAGE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.ratingMessage.$touched || forms.formLabel.$submitted) && forms.formLabel.ratingMessage.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RATING_MESSAGE\' | translate}}</label>\n								<input type="text" name="ratingMessage" placeholder="{{\'APPLICATION_RATING_MESSAGE\' | translate}}" class="form-control" data-ng-model="item.rating_message"/>\n							</div>\n							<!-- END RATING MESSAGE -->\n\n							<!-- START RATING START TEXT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.ratingSend.$touched || forms.formLabel.$submitted) && forms.formLabel.ratingSend.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RATING_SEND_BUTTON\' | translate}}</label>\n								<input type="text" name="ratingSend" placeholder="{{\'APPLICATION_RATING_SEND_BUTTON\' | translate}}" class="form-control" data-ng-model="item.rating_send"/>\n							</div>\n							<!-- END RATING START TEXT -->\n\n							<!-- START RATING MESSAGE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.ratingSkip.$touched || forms.formLabel.$submitted) && forms.formLabel.ratingSkip.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RATING_SKIP_BUTTON\' | translate}}</label>\n								<input type="text" name="ratingSkip" placeholder="{{\'APPLICATION_RATING_SKIP_BUTTON\' | translate}}" class="form-control" data-ng-model="item.rating_skip"/>\n							</div>\n							<!-- END RATING MESSAGE -->\n\n							<!-- START HEADER OFFLINE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.headerOffline.$touched || forms.formLabel.$submitted) && forms.formLabel.headerOnline.$invalid}">\n								<label class="control-label">{{\'APPLICATION_HEADER_OFFLINE\' | translate}}</label>\n								<input type="text" name="headerOffline" placeholder="{{\'APPLICATION_HEADER_OFFLINE\' | translate}}" class="form-control" data-ng-model="item.header_offline"/>\n							</div>\n							<!-- END HEADER OFFLINE -->\n\n							<!-- START OFFLINE MESSAGE-->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.offlineMessage.$touched || forms.formLabel.$submitted) && forms.formLabel.onlineMessage.$invalid}">\n								<label class="control-label">{{\'APPLICATION_OFFLINE_MESSAGE\' | translate}}</label>\n								<input type="text" name="offlineMessage" placeholder="{{\'APPLICATION_OFFLINE_MESSAGE\' | translate}}" class="form-control" data-ng-model="item.offline_message"/>\n							</div>\n							<!-- END OFFLINE MESSAGE -->\n\n							<!-- START ENQUIRY MESSAGE TITLE-->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.enquiryMessageTitle.$touched || forms.formLabel.$submitted) && forms.formLabel.enquiryMessageTitle.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ENQUIRY_MESSAGE_TITLE\' | translate}}</label>\n								<input type="text" name="enquiryMessageTitle" placeholder="{{\'APPLICATION_ENQUIRY_MESSAGE_TITLE\' | translate}}" class="form-control" data-ng-model="item.message_title"/>\n							</div>\n							<!-- END ENQUIRY MESSAGE TITLE -->\n\n							<!-- START ENQUIRY MESSAGE PLACEHOLDER-->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.enquiryMessagePlaceholder.$touched || forms.formLabel.$submitted) && forms.formLabel.onlineMessage.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ENQUIRY_MESSAGE_PLACEHOLDER\' | translate}}</label>\n								<input type="text" name="enquiryMessagePlaceholder" placeholder="{{\'APPLICATION_ENQUIRY_MESSAGE_PLACEHOLDER\' | translate}}" class="form-control" data-ng-model="item.enquiry_message_placeholder"/>\n							</div>\n							<!-- END ENQUIRY MESSAGE PLACEHOLDER -->\n\n							<!-- START ENQUIRY BUTTON -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.enquiryButton.$touched || forms.formLabel.$submitted) && forms.formLabel.enquiryButton.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ENQUIRY_BUTTON\' | translate}}</label>\n								<input type="text" name="enquiryButton" placeholder="{{\'APPLICATION_ENQUIRY_BUTTON\' | translate}}" class="form-control" data-ng-model="item.enquiry_button"/>\n							</div>\n							<!-- END ENQUIRY BUTTON -->\n\n							<!-- START AGENTS BUSY BUTTON -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formLabel.agentsBusy.$touched || forms.formLabel.$submitted) && forms.formLabel.agentsBusy.$invalid}">\n								<label class="control-label">{{\'APPLICATION_AGENTS_BUSY\' | translate}}</label>\n								<input type="text" name="agentsBusy" placeholder="{{\'APPLICATION_AGENTS_BUSY\' | translate}}" class="form-control" data-ng-model="item.agents_busy"/>\n							</div>\n							<!-- END AGENTS BUSY BUTTON -->\n\n							<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_FORMS\' | translate}}" canexit="exitValidation(forms.formAppearance.$valid)">\n						<form name="forms.formFunctionality" novalidate>\n\n							<!-- START DOWNLOAD TRANSCRIPT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formFunctionality.animationToggle.$touched || forms.formFunctionality.$submitted) && forms.formFunctionality.animationToggle.$invalid}">\n								<label class="control-label">{{\'APPLICATION_DOWNLOAD_TRANSCRIPT\' | translate}}</label>\n								<ui-select data-ng-model="item.download_transcript" name="downloadTranscript" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected ? \'On\' : \'Off\'}}</ui-select-match>\n									<ui-select-choices repeat="downloadTranscript in [true, false] | filter: $select.search">\n										<div ng-bind-html="downloadTranscript ? \'On\' : \'Off\' | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n							</div>\n							<!-- END DOWNLOAD TRANSCRIPT -->\n\n							<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/fax/account/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_FAX_ACCOUNT\' | translate }}</h3>\n</div>\n<div class="modal-body" data-ng-init="initWizard();">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.$submitted || form.name.$touched) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="form.name.$error.required && (form.$submitted || form.name.$touched)" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START TRUNKS -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.$submitted || form.trunk.$touched) && form.trunk.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TRUNK\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.TrunkName" name="trunk" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_TRUNK\' | translate}}">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="trunk.name as trunk in trunks | filter: $select.search">\n          <div data-ng-bind="trunk.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <div class="note note-warning" data-ng-hide="trunks.length">\n        <h4 class="block">Warning!</h4>\n        <p>\n          {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n        </p>\n        <p>\n          {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/trunks/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n        </p>\n      </div>\n      <span data-ng-show="form.trunk.$error.required && (form.$submitted || form.trunk.$touched)" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- START TRUNKS -->\n\n    <!-- START LOCALSTATIONID -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.$submitted || form.localstationid.$touched) && form.localstationid.$invalid}">\n      <label class="control-label">{{\'APPLICATION_LOCALSTATIONID\' | translate}} <span class="required" aria-required="true">*</span></label>\n      <input type="text" name="localstationid" placeholder="{{\'APPLICATION_LOCALSTATIONID\' | translate}}" class="form-control" data-ng-model="item.localstationid" required/>\n      <span data-ng-show="form.localstationid.$error.required && (form.$submitted || form.localstationid.$touched)" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span class="help-block">\n        {{\'DESCRIPTION_LOCALSTATIONID\' | translate}}.\n      </span>\n    </div>\n    <!-- END LOCALSTATIONID -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/fax/account/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-fax"></i>\n						<a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-notebook"></i>\n						<a href="/channels/fax/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button type="button" class="btn green-jungle" data-toggle="dropdown" data-hover="dropdown" data-delay="1000" data-close-others="true" aria-expanded="true">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }} <i class="fa fa-angle-down"></i>\n						</button>\n						<ul class="dropdown-menu" role="menu">\n							<li>\n								<a href="/channels/fax/accounts/wizard">\n									{{ \'APPLICATION_STANDARD\' | translate }}\n								</a>\n							</li>\n							<li>\n								<a href="#" data-ng-click="createItem()">\n									{{ \'APPLICATION_QUICK\' | translate }}\n								</a>\n							</li>\n						</ul>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/fax/account/view/action/list/list.html",'<div class="row" data-ng-init="initActons()">\r\n	<div class="col-md-12">\r\n		<div class="portlet light">\r\n			<div class="portlet-title tabbable-line">\r\n				<div class="caption caption-md">\r\n					<i class="icon-globe theme-font hide"></i>\r\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACTIONS\' | translate}}</span>\r\n				</div>\r\n				<div class="actions">\r\n					<div class="btn-group" data-ng-show="id.length">\r\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\r\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\r\n						</a>\r\n					</div>\r\n					<div class="btn-group">\r\n						<a class="btn green-jungle" href="/channels/fax/accounts/view/{{account.id}}/actions/wizard" data-toggle="dropdown">\r\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACTION\' | translate }}\r\n						</a>\r\n					</div>\r\n				</div>\r\n			</div>\r\n			<div class="portlet-body">\r\n				<!-- START TABLE -->\r\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\r\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\r\n				</div>\r\n				<!-- END TABLE -->\r\n			</div>\r\n		</div>\r\n	</div>\r\n</div>\r\n'),
+a.put("app/channels/fax/account/view/action/view/view.html",'\n<div class="row" data-ng-init="initAction()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }}</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.settings" ng-submit="updateItem()" novalidate>\n					<!-- START APP -->\n					<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n							<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n							<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n								<div ng-bind-html="app.name | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid && forms.settings.app.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END APP -->\n\n					<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n						<!-- START QUEUE -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$invalid}">\n							<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.FaxQueueId" name="queue" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n									<div ng-bind-html="queue.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="queues.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/fax/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END QUEUE -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n						<!-- START AGENT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$invalid}">\n							<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n								<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n									<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="agents.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END AGENT -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n						<!-- START SENDMAIL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" min="1" required/>\n							<span data-ng-show="(forms.settings.from.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.mail.$touched || forms.settings.$submitted) && forms.settings.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.template.$touched || forms.settings.$submitted) && forms.settings.template.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n									<div ng-bind-html="template.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.template.$touched || forms.settings.$submitted) && forms.settings.template.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END SENDMAIL -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n						<!-- START SENDSms -->\n						<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n								<span data-ng-show="(forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid && forms.settings.to.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.text.$touched || forms.text.$submitted) && forms.settings.text.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<textarea id="text" class="form-control maxlength-handler" maxlength="160"  name="text" data-ng-model="application.data6" required></textarea>\n							<span data-ng-show="(forms.settings.text.$touched || forms.settings.$submitted) && forms.settings.text.$invalid && forms.settings.text.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<!-- END SENDSms -->\n					</div>\n\n					<!-- START INTERVAL_TYPE -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n							<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n								{{ intType.name | translate }}\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END INTERVAL_TYPE -->\n\n					<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n						<!-- START TIME -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n							<div class="input-group input-large">\n								<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n									<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n								</fieldset>\n								<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n								<fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n								<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n							</div>\n						</div>\n						<!-- END TIME -->\n\n						<!-- START ALWAYS -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n							<div class="input-group input-large">\n								<label class="control-label pointer-cursor">\n									<input\n										bs-switch\n										data-ng-model="application.alwaysTime"\n										type="checkbox"\n										switch-active="{{ isActive }}"\n										switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n										switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n										switch-on-color="{{ onColor }}"\n										switch-off-color="{{ offColor }}"\n										switch-animate="{{ animate }}"\n										switch-size="{{ size }}"\n										switch-label="{{ label }}"\n										switch-icon="{{ icon }}"\n										switch-radio-off="{{ radioOff }}"\n										switch-label-width="{{ labelWidth }}"\n										switch-handle-width="{{ handleWidth }}">\n									<!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n								</label>\n							</div>\n						</div>\n						<!-- END ALWAYS -->\n\n						<!-- START WEEKDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END WEEKDAY -->\n\n						<!-- START MONTHDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTHDAY -->\n\n						<!-- START MONTH -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTH -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n						<!-- START INTERVALS -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$invalid}">\n							<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n									{{ interval.name}}\n								</ui-select-choices>\n							</ui-select>\n              <div class="note note-warning" data-ng-hide="intervals.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_INTERVALS_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END INTERVALS -->\n\n					</div>\n					<button class="btn green-haze" type="submit">{{\'APPLICATION_UPDATE\' | translate}}</button>\n				</form>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/fax/account/view/action/wizard/wizard.html",'\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n					<wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.action.$valid)">\n						<form name="forms.action" novalidate>\n							<!-- START APP -->\n							<div class="form-group"  data-ng-class="{\'has-error\': forms.action.$submitted && forms.action.app.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n									<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n										<div ng-bind-html="app.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="forms.action.$submitted && forms.action.app.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END APP -->\n\n							<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n								<!-- START AGENT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$invalid}">\n									<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n										<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n											<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="agents.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END AGENT -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n								<!-- START QUEUE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$invalid}">\n									<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.FaxQueueId" name="queue" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n											<div ng-bind-html="queue.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="queues.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/fax/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END QUEUE -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n								<!-- START SENDMAIL -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" min="1" required/>\n										<span data-ng-show="(forms.action.from.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.mail.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n											<div ng-bind-html="template.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END SENDMAIL -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n								<!-- START SENDSms -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n										<span data-ng-show="(forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid && forms.action.to.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<textarea id="text" class="form-control maxlength-handler"  maxlength="160" name="text" data-ng-model="application.data6" required></textarea>\n									<span data-ng-show="(forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid && forms.action.text.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<!-- END SENDSms -->\n							</div>\n\n							<!-- START INTERVAL_TYPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n										{{ intType.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END INTERVAL_TYPE -->\n\n							<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n								<!-- START TIME -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n									<div class="input-group input-large">\n										<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n											<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n										</fieldset>\n										<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n										<fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n										<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n									</div>\n								</div>\n								<!-- END TIME -->\n\n								<!-- START ALWAYS -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n									<div class="input-group input-large">\n										<label class="control-label pointer-cursor">\n											<input\n												bs-switch\n												data-ng-model="application.alwaysTime"\n												type="checkbox"\n												switch-active="{{ isActive }}"\n												switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n												switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n												switch-on-color="{{ onColor }}"\n												switch-off-color="{{ offColor }}"\n												switch-animate="{{ animate }}"\n												switch-size="{{ size }}"\n												switch-label="{{ label }}"\n												switch-icon="{{ icon }}"\n												switch-radio-off="{{ radioOff }}"\n												switch-label-width="{{ labelWidth }}"\n												switch-handle-width="{{ handleWidth }}">\n											<!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n										</label>\n									</div>\n								</div>\n								<!-- END ALWAYS -->\n\n								<!-- START WEEKDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END WEEKDAY -->\n\n								<!-- START MONTHDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTHDAY -->\n\n								<!-- START MONTH -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTH -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n								<!-- START INTERVALS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$invalid}">\n									<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n											{{ interval.name}}\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="intervals.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_INTERVALS_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERVALS -->\n\n							</div>\n\n							<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONTINUE\' | translate}}"/>\n						</form>\n					</wz-step>\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/channels/fax/account/view/disposition/modal/add.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_DISPOSITIONS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.form.$touched || form.$submitted) && form.form.$invalid}">\n      <div class="">\n        <!-- <input type="text" name="form" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" class="form-control" data-ng-model="name" data-ng-pattern="/^[a-zA-Z0-9]*$/" required/> -->\n        <input type="text" name="form" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" class="form-control" data-ng-model="name" required/>\n        <span data-ng-show="form.form.$touched && form.form.$error.required" class="help-block help-block-error">\n          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n        </span>\n        <!-- <span data-ng-show="form.form.$touched && form.form.$error.pattern" class="help-block help-block-error">\n          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PATTERN\' | translate}}.\n        </span> -->\n      </div>\n      <!-- <div class="help-block">\n        {{\'MESSAGE_ALLOWED_NUMBERS_AND_LETTERS\' | translate}}\n			</div> -->\n    </div>\n    <!-- END NAME -->\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="form.$valid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/fax/account/view/disposition/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DISPOSITIONS\' | translate}}</span>\n				</div>\n				<div class="actions actions-md">\n					<a href="#" class="btn btn-icon-only green" data-ng-click="addDisposition();">\n						<i class="fa fa-plus"></i>\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n				<div class="tab-content">\n					<div class="row" data-ng-hide="dispositions.length">\n						<div class="col-md-12">\n							<div class="note note-info">\n								<h4 class="block">Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}</h4>\n							</div>\n						</div>\n					</div>\n\n					<!-- GENERAL TAB -->\n					<div class="row" data-ng-repeat="disposition in dispositions">\n						<div class="col-md-12 form-group">\n							<div class="input-group">\n								<div>\n									<input class="form-control" type="text" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" data-ng-model="disposition.name">\n								</div>\n								<span class="input-group-btn">\n									<button class="btn btn-success" type="button" data-ng-click="updateDisposition(disposition.id, disposition.name);"><i class="fa fa-cloud-upload fa-fw"></i> {{\'APPLICATION_UPDATE\' | translate}}</button>\n									<button class="btn btn-danger" type="button" data-ng-click="deleteDisposition(disposition.id);"><i class="fa fa-times fa-fw"></i> {{\'APPLICATION_DELETE\' | translate}}</button>\n								</span>\n							</div>\n						</div>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/fax/account/view/hooks/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_HOOKS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_ACCEPT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_REJECT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_CLOSE\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- ACCEPT TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.accept" data-ng-submit="forms.accept.$valid && updateItemFaxAccount()" novalidate>\n								<div class="row">\n									<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid}">\n										<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n										<ui-select data-ng-model="account.acceptMethod" name="method" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n											<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n												<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n											</ui-select-choices>\n										</ui-select>\n										<span data-ng-show="(forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid && forms.accept.method.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<div  class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid}">\n										<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n										<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.acceptUrl"  ng-required="account.acceptMethod"/>\n										<span data-ng-show="(forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid && forms.accept.url.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n								<!-- START ACTIONS-->\n								<div class="row" ng-repeat = "action in account.actions">\n									<div  ng-switch="action.action">\n											<div ng-switch-when="pause">\n												<div  class="form-group col-md-4">\n													<label class="control-label">{{\'APPLICATION_PAUSE\' | translate}}</label></br>\n														<input\n														bs-switch\n														data-ng-change="resetActionData(action)"\n														data-ng-model="action.enabled"\n														type="checkbox"\n														switch-active="{{ isActive }}"\n														switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n														switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n														switch-on-color="{{ onColor }}"\n														switch-off-color="{{ offColor }}"\n														switch-animate="{{ animate }}"\n														switch-size="{{ size }}"\n														switch-label="{{ label }}"\n														switch-icon="{{ icon }}"\n														switch-radio-off="{{ radioOff }}"\n														switch-label-width="{{ labelWidth }}"\n														switch-handle-width="{{ handleWidth }}">\n													</div>\n													<div ng-if="action.enabled" class="form-group col-md-8">\n														<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}</label>\n														<ui-select  name="action" data-ng-model="action.type"  theme="bootstrap" >\n															<ui-select-match placeholder="{{\'APPLICATION_TYPE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n															<ui-select-choices repeat=" pause.name as pause in pauses | filter: $select.search">\n																<div ng-bind-html="pause.name | highlight: $select.search | uppercase" ></div>\n															</ui-select-choices>\n														</ui-select>\n													</div>\n											</div>\n								  	</div>\n									</div>\n								<!-- END ACTION -->\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ACCEPT TAB -->\n					<!-- START REJECT TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.reject" data-ng-submit="forms.reject.$valid && updateItemFaxAccount()" novalidate>\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.rejectMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid && forms.reject.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.rejectUrl" ng-required="account.rejectMethod"/>\n									<span data-ng-show="(forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid && forms.reject.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ACCEPT TAB -->\n					<!-- START CLOSE TAB -->\n					<div class="tab-pane" id="tab_1_3">\n						<form name="forms.close" data-ng-submit="forms.close.$valid && updateItemFaxAccount()" novalidate>\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.closeMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid && forms.close.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.closeUrl" ng-required="account.closeMethod"/>\n									<span data-ng-show="(forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid && forms.close.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CLOSE TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/fax/account/view/setting/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_ADVANCED\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateItemFaxAccount()" novalidate>\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.$submitted || forms.general.name.$touched) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="forms.general.name.$error.required && (forms.general.$submitted || forms.general.name.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START HEADERINFO -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.$submitted || forms.general.headerinfo.$touched) && forms.general.headerinfo.$invalid}">\n								<label class="control-label">{{\'APPLICATION_HEADERINFO\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="headerinfo" placeholder="{{\'APPLICATION_HEADERINFO\' | translate}}" class="form-control" data-ng-model="account.headerinfo" required/>\n								<span data-ng-show="forms.general.headerinfo.$error.required && (forms.general.$submitted || forms.general.headerinfo.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span class="help-block">\n									{{\'DESCRIPTION_HEADERINFO\' | translate}}.\n								</span>\n							</div>\n							<!-- END HEADERINFO -->\n\n							<!-- START TRUNKS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.$submitted || forms.general.trunk.$touched) && forms.general.trunk.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TRUNK\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="account.TrunkName" name="trunk" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_TRUNK\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="trunk.name as trunk in trunks | filter: $select.search">\n										<div data-ng-bind="trunk.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<div class="note note-warning" data-ng-hide="trunks.length">\n	                <h4 class="block">Warning!</h4>\n	                <p>\n	                  {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n	                </p>\n	                <p>\n	                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/trunks/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n	                </p>\n	              </div>\n								<span data-ng-show="forms.general.trunk.$error.required && (forms.general.$submitted || forms.general.trunk.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- START TRUNKS -->\n\n							<!-- START LOCALSTATIONID -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.$submitted || forms.general.localstationid.$touched) && forms.general.localstationid.$invalid}">\n								<label class="control-label">{{\'APPLICATION_LOCALSTATIONID\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="localstationid" placeholder="{{\'APPLICATION_LOCALSTATIONID\' | translate}}" class="form-control" data-ng-model="account.localstationid" required/>\n								<span data-ng-show="forms.general.localstationid.$error.required && (forms.general.$submitted || forms.general.localstationid.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span class="help-block">\n									{{\'DESCRIPTION_LOCALSTATIONID\' | translate}}.\n								</span>\n							</div>\n							<!-- END LOCALSTATIONID -->\n\n							<!-- START LIST -->\n							<div class="form-group" data-ng-if="license.cm">\n								<label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n									<div class="input-group">\n\n										<ui-select data-ng-model="account.ListId" name="list" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_LIST\' | translate}}">{{$select.selected.name}}</ui-select-match>\n											<ui-select-choices repeat="list.id as list in lists | filter: $select.search">\n												<div ng-bind-html="list.name | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n\n										<span class="input-group-btn">\n											<button type="button" data-ng-click="account.ListId = null" class="btn btn-default">\n												<span class="glyphicon glyphicon-trash"></span>\n											</button>\n										</span>\n\n									</div>\n							</div>\n							<!-- END LIST -->\n\n							<!-- START FIDELITY -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_FIDELITY\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="account.fidelity"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END FIDELITY -->\n\n							<!-- START TIMEOUT -->\n							<div class="form-group" data-ng-if="account.fidelity" data-ng-class="{\'has-error\': (forms.general.$submitted || forms.general.timeout.$touched) && forms.general.timeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" name="timeout" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="account.timeout" required/>\n								<span data-ng-show="(forms.general.timeout.$touched || forms.general.$submitted) && forms.general.timeout.$invalid && forms.general.timeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.general.timeout.$touched || forms.general.$submitted) && forms.general.timeout.$invalid && forms.general.timeout.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIMEOUT -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n					<!-- ADVANCED TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.advanced" data-ng-submit="forms.advanced.$valid && updateItemFaxAccount()" novalidate>\n							<div class="row">\n								<div class="col-md-6">\n									<!-- START ECM -->\n									<div class="form-group">\n									  <label class="control-label">{{\'APPLICATION_ECM\' | translate}}<span class="required" aria-required="true">*</span></label><br>\n									  <input\n									    bs-switch\n									    ng-model="account.ecm"\n									    type="checkbox"\n									    switch-active="{{ isActive }}"\n									    switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n									    switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n									    switch-on-color="{{ onColor }}"\n									    switch-off-color="{{ offColor }}"\n									    switch-animate="{{ animate }}"\n									    switch-size="{{ size }}"\n									    switch-label="{{ label }}"\n									    switch-icon="{{ icon }}"\n									    switch-radio-off="{{ radioOff }}"\n									    switch-label-width="{{ labelWidth }}"\n									    switch-handle-width="{{ handleWidth }}"\n											ng-true-value="\'yes\'"\n		    							ng-false-value="\'no\'">\n											<span class="help-block">\n												{{\'DESCRIPTION_ECM\' | translate}}.\n											</span>\n									</div>\n									<!-- END ECM -->\n\n									<!-- START MINRATE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.$submitted || forms.advanced.minrate.$touched) && forms.advanced.minrate.$invalid}">\n									  <label class="control-label">{{\'APPLICATION_MINRATE\' | translate}} <span class="required" aria-required="true">*</span></label>\n									  <ui-select data-ng-model="account.minrate" name="minrate" theme="bootstrap" required>\n									    <ui-select-match placeholder="{{\'APPLICATION_MINRATE\' | translate}}">{{$select.selected}}</ui-select-match>\n									    <ui-select-choices repeat="minrate in rate | filter: $select.search">\n									      <div data-ng-bind="minrate | highlight: $select.search"></div>\n									    </ui-select-choices>\n									  </ui-select>\n										<span class="help-block">\n											{{\'DESCRIPTION_MINRATE\' | translate}}.\n										</span>\n										<span data-ng-show="forms.advanced.minrate.$error.required && (forms.advanced.$submitted || forms.advanced.minrate.$touched)" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- START MINRATE -->\n\n									<!-- START MAXRATE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.$submitted || forms.advanced.maxrate.$touched) && forms.advanced.maxrate.$invalid}">\n									  <label class="control-label">{{\'APPLICATION_MAXRATE\' | translate}} <span class="required" aria-required="true">*</span></label>\n									  <ui-select data-ng-model="account.maxrate" name="maxrate" theme="bootstrap" required>\n									    <ui-select-match placeholder="{{\'APPLICATION_MAXRATE\' | translate}}">{{$select.selected}}</ui-select-match>\n									    <ui-select-choices repeat="maxrate in rate | filter: $select.search">\n									      <div data-ng-bind="maxrate | highlight: $select.search"></div>\n									    </ui-select-choices>\n									  </ui-select>\n										<span class="help-block">\n											{{\'DESCRIPTION_MAXRATE\' | translate}}.\n										</span>\n										<span data-ng-show="forms.advanced.maxrate.$error.required && (forms.advanced.$submitted || forms.advanced.maxrate.$touched)" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- START MAXRATE -->\n\n									<!-- START MODEM -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.$submitted || forms.advanced.modem.$touched) && forms.advanced.modem.$invalid}">\n										<label class="control-label">{{\'APPLICATION_MODEM\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input type="text" name="modem" placeholder="{{\'APPLICATION_MODEM\' | translate}}" class="form-control" data-ng-model="account.modem" required/>\n										<span class="help-block">\n											{{\'DESCRIPTION_MODEM\' | translate}}.\n										</span>\n										<span data-ng-show="forms.advanced.modem.$error.required && (forms.advanced.$submitted || forms.advanced.modem.$touched)" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END MODEM -->\n								</div>\n								<div class="col-md-6">\n									<!-- START GATEWAY -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.$submitted || forms.advanced.gateway.$touched) && forms.advanced.gateway.$invalid}">\n										<label class="control-label">{{\'APPLICATION_GATEWAY\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input type="text" name="gateway" placeholder="{{\'APPLICATION_GATEWAY\' | translate}}" class="form-control" data-ng-model="account.gateway" required data-ng-pattern="settings.patternGateway"/>\n										<span class="help-block">\n											{{\'DESCRIPTION_GATEWAY\' | translate}}.\n										</span>\n										<span data-ng-show="(forms.advanced.gateway.$touched || forms.advanced.$submitted) && forms.advanced.gateway.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n										<span data-ng-show="(forms.advanced.gateway.$touched || forms.advanced.$submitted) && forms.advanced.gateway.$error.pattern" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_GATEWAY\' | translate}}.\n										</span>\n									</div>\n									<!-- END GATEWAY -->\n\n									<!-- START FAXDETECT -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.$submitted || forms.advanced.faxdetect.$touched) && forms.advanced.faxdetect.$invalid}">\n										<label class="control-label">{{\'APPLICATION_FAXDETECT\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input type="text" name="faxdetect" placeholder="{{\'APPLICATION_FAXDETECT\' | translate}}" class="form-control" data-ng-model="account.faxdetect" required data-ng-pattern="settings.patternFaxdetect"/>\n										<span class="help-block">\n											{{\'DESCRIPTION_FAXDETECT\' | translate}}.\n										</span>\n										<span data-ng-show="(forms.advanced.faxdetect.$touched || forms.advanced.$submitted) && forms.advanced.faxdetect.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n										<span data-ng-show="(forms.advanced.faxdetect.$touched || forms.advanced.$submitted) && forms.advanced.faxdetect.$error.pattern" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_FAXDETECT\' | translate}}.\n										</span>\n									</div>\n									<!-- END FAXDETECT -->\n\n									<!-- START T38TIMEOUT -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.$submitted || forms.advanced.t38timeout.$touched) && forms.advanced.t38timeout.$invalid}">\n										<label class="control-label">{{\'APPLICATION_T38TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input type="number" name="t38timeout" placeholder="{{\'APPLICATION_T38TIMEOUT\' | translate}}" class="form-control" data-ng-model="account.t38timeout" required min="1000"/>\n										<span class="help-block">\n											{{\'DESCRIPTION_T38TIMEOUT\' | translate}}.\n										</span>\n										<span data-ng-show="(forms.advanced.t38timeout.$touched || forms.advanced.$submitted) && forms.advanced.t38timeout.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n										<span data-ng-show="(forms.advanced.t38timeout.$touched || forms.advanced.$submitted) && forms.advanced.t38timeout.$error.min" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_T38TIMEOUT\' | translate}}.\n										</span>\n									</div>\n									<!-- END T38TIMEOUT -->\n\n									<!-- START TECH -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.$submitted || forms.advanced.tech.$touched) && forms.advanced.tech.$invalid}">\n									  <label class="control-label">{{\'APPLICATION_TECHNOLOGY\' | translate}} <span class="required" aria-required="true">*</span></label>\n									  <ui-select data-ng-model="account.tech" name="tech" theme="bootstrap" required>\n									    <ui-select-match placeholder="{{\'APPLICATION_TECHNOLOGY\' | translate}}">{{$select.selected}}</ui-select-match>\n									    <ui-select-choices repeat="tech in techs | filter: $select.search">\n									      <div data-ng-bind="tech | highlight: $select.search"></div>\n									    </ui-select-choices>\n									  </ui-select>\n										<span data-ng-show="(forms.advanced.tech.$touched || forms.advanced.$submitted) && forms.advanced.tech.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- START TECH -->\n								</div>\n							</div>\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
+a.put("app/channels/fax/account/view/view.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-fax"></i>\n					<a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="/channels/fax/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n					<i class="fa fa-angle-right" data-ng-show="account"></i>\n				</li>\n				<li data-ng-show="account">\n					<a href="#">{{ account.name || account.description }}</a>\n				</li>\n			</ul>\n		</div>\n\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/account.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ account.name || account.description }}\n					</div>\n					<div class="profile-usertitle-job">\n						{{ account.phone }}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.fax.accounts.view.settings\')}">\n							<a href="/channels/fax/accounts/view/{{account.id}}/settings">\n							<i class="icon-settings"></i>\n							{{\'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.fax.accounts.view.hooks\')}">\n							<a href="/channels/fax/accounts/view/{{account.id}}/hooks">\n							<i class="fa fa-code"></i>\n							{{\'APPLICATION_HOOKS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.fax.accounts.view.dispositions\')}">\n							<a href="/channels/fax/accounts/view/{{account.id}}/dispositions">\n							<i class="icon-target"></i>\n							{{\'APPLICATION_DISPOSITIONS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.includes(\'main.channels.fax.accounts.view.actions\')}">\n							<a href="/channels/fax/accounts/view/{{account.id}}/actions/list">\n							<i class="icon-directions"></i>\n							{{\'APPLICATION_ACTIONS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/fax/account/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-fax"></i>\n						<a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-notebook"></i>\n						<a href="/channels/fax/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(forms.formGeneral.$valid)">\n						<form name="forms.formGeneral" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formGeneral.$submitted || forms.formGeneral.name.$touched) && forms.formGeneral.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="forms.formGeneral.name.$error.required && (forms.formGeneral.$submitted || forms.formGeneral.name.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START HEADERINFO -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formGeneral.$submitted || forms.formGeneral.headerinfo.$touched) && forms.formGeneral.headerinfo.$invalid}">\n								<label class="control-label">{{\'APPLICATION_HEADERINFO\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="headerinfo" placeholder="{{\'APPLICATION_HEADERINFO\' | translate}}" class="form-control" data-ng-model="item.headerinfo" required/>\n								<span data-ng-show="forms.formGeneral.headerinfo.$error.required && (forms.formGeneral.$submitted || forms.formGeneral.headerinfo.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span class="help-block">\n									{{\'DESCRIPTION_HEADERINFO\' | translate}}.\n								</span>\n							</div>\n							<!-- END HEADERINFO -->\n\n							<!-- START TRUNKS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formGeneral.$submitted || forms.formGeneral.trunk.$touched) && forms.formGeneral.trunk.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TRUNK\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="item.TrunkName" name="trunk" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_TRUNK\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="trunk.name as trunk in trunks | filter: $select.search">\n										<div data-ng-bind="trunk.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<div class="note note-warning" data-ng-hide="trunks.length">\n	                <h4 class="block">Warning!</h4>\n	                <p>\n	                  {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n	                </p>\n	                <p>\n	                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/trunks/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n	                </p>\n	              </div>\n								<span data-ng-show="forms.formGeneral.trunk.$error.required && (forms.formGeneral.$submitted || forms.formGeneral.trunk.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- START TRUNKS -->\n\n							<!-- START LOCALSTATIONID -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formGeneral.$submitted || forms.formGeneral.localstationid.$touched) && forms.formGeneral.localstationid.$invalid}">\n								<label class="control-label">{{\'APPLICATION_LOCALSTATIONID\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="localstationid" placeholder="{{\'APPLICATION_LOCALSTATIONID\' | translate}}" class="form-control" data-ng-model="item.localstationid" required/>\n								<span data-ng-show="forms.formGeneral.localstationid.$error.required && (forms.formGeneral.$submitted || forms.formGeneral.localstationid.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span class="help-block">\n									{{\'DESCRIPTION_LOCALSTATIONID\' | translate}}.\n								</span>\n							</div>\n							<!-- END LOCALSTATIONID -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_ADVANCED\' | translate}}" canexit="exitValidation(forms.formAdvanced.$valid)">\n						<form name="forms.formAdvanced" novalidate>\n\n							<!-- START ECM -->\n							<div class="form-group">\n							  <label class="control-label">{{\'APPLICATION_ECM\' | translate}}<span class="required" aria-required="true">*</span></label><br>\n							  <input\n							    bs-switch\n							    ng-model="item.ecm"\n							    type="checkbox"\n							    switch-active="{{ isActive }}"\n							    switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n							    switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n							    switch-on-color="{{ onColor }}"\n							    switch-off-color="{{ offColor }}"\n							    switch-animate="{{ animate }}"\n							    switch-size="{{ size }}"\n							    switch-label="{{ label }}"\n							    switch-icon="{{ icon }}"\n							    switch-radio-off="{{ radioOff }}"\n							    switch-label-width="{{ labelWidth }}"\n							    switch-handle-width="{{ handleWidth }}"\n									ng-true-value="\'yes\'"\n    							ng-false-value="\'no\'">\n									<span class="help-block">\n										{{\'DESCRIPTION_ECM\' | translate}}.\n									</span>\n							</div>\n							<!-- END ECM -->\n\n							<!-- START MINRATE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAdvanced.$submitted || forms.formAdvanced.minrate.$touched) && forms.formAdvanced.minrate.$invalid}">\n							  <label class="control-label">{{\'APPLICATION_MINRATE\' | translate}} <span class="required" aria-required="true">*</span></label>\n							  <ui-select data-ng-model="item.minrate" name="minrate" theme="bootstrap" required>\n							    <ui-select-match placeholder="{{\'APPLICATION_MINRATE\' | translate}}">{{$select.selected}}</ui-select-match>\n							    <ui-select-choices repeat="minrate in rate | filter: $select.search">\n							      <div data-ng-bind="minrate | highlight: $select.search"></div>\n							    </ui-select-choices>\n							  </ui-select>\n								<span class="help-block">\n									{{\'DESCRIPTION_MINRATE\' | translate}}.\n								</span>\n								<span data-ng-show="forms.formAdvanced.minrate.$error.required && (forms.formAdvanced.$submitted || forms.formAdvanced.minrate.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- START MINRATE -->\n\n							<!-- START MAXRATE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAdvanced.$submitted || forms.formAdvanced.maxrate.$touched) && forms.formAdvanced.maxrate.$invalid}">\n							  <label class="control-label">{{\'APPLICATION_MAXRATE\' | translate}} <span class="required" aria-required="true">*</span></label>\n							  <ui-select data-ng-model="item.maxrate" name="maxrate" theme="bootstrap" required>\n							    <ui-select-match placeholder="{{\'APPLICATION_MAXRATE\' | translate}}">{{$select.selected}}</ui-select-match>\n							    <ui-select-choices repeat="maxrate in rate | filter: $select.search">\n							      <div data-ng-bind="maxrate | highlight: $select.search"></div>\n							    </ui-select-choices>\n							  </ui-select>\n								<span class="help-block">\n									{{\'DESCRIPTION_MAXRATE\' | translate}}.\n								</span>\n								<span data-ng-show="forms.formAdvanced.maxrate.$error.required && (forms.formAdvanced.$submitted || forms.formAdvanced.maxrate.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- START MAXRATE -->\n\n							<!-- START MODEM -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAdvanced.$submitted || forms.formAdvanced.modem.$touched) && forms.formAdvanced.modem.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MODEM\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="modem" placeholder="{{\'APPLICATION_MODEM\' | translate}}" class="form-control" data-ng-model="item.modem" required/>\n								<span class="help-block">\n									{{\'DESCRIPTION_MODEM\' | translate}}.\n								</span>\n								<span data-ng-show="forms.formAdvanced.modem.$error.required && (forms.formAdvanced.$submitted || forms.formAdvanced.modem.$touched)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MODEM -->\n\n							<!-- START GATEWAY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAdvanced.$submitted || forms.formAdvanced.gateway.$touched) && forms.formAdvanced.gateway.$invalid}">\n								<label class="control-label">{{\'APPLICATION_GATEWAY\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="gateway" placeholder="{{\'APPLICATION_GATEWAY\' | translate}}" class="form-control" data-ng-model="item.gateway" required data-ng-pattern="settings.patternGateway"/>\n								<span class="help-block">\n									{{\'DESCRIPTION_GATEWAY\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formAdvanced.gateway.$touched || forms.formAdvanced.$submitted) && forms.formAdvanced.gateway.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formAdvanced.gateway.$touched || forms.formAdvanced.$submitted) && forms.formAdvanced.gateway.$error.pattern" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_GATEWAY\' | translate}}.\n								</span>\n							</div>\n							<!-- END GATEWAY -->\n\n							<!-- START FAXDETECT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAdvanced.$submitted || forms.formAdvanced.faxdetect.$touched) && forms.formAdvanced.faxdetect.$invalid}">\n								<label class="control-label">{{\'APPLICATION_FAXDETECT\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="faxdetect" placeholder="{{\'APPLICATION_FAXDETECT\' | translate}}" class="form-control" data-ng-model="item.faxdetect" required data-ng-pattern="settings.patternFaxdetect"/>\n								<span class="help-block">\n									{{\'DESCRIPTION_FAXDETECT\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formAdvanced.faxdetect.$touched || forms.formAdvanced.$submitted) && forms.formAdvanced.faxdetect.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formAdvanced.faxdetect.$touched || forms.formAdvanced.$submitted) && forms.formAdvanced.faxdetect.$error.pattern" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_FAXDETECT\' | translate}}.\n								</span>\n							</div>\n							<!-- END FAXDETECT -->\n\n							<!-- START T38TIMEOUT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAdvanced.$submitted || forms.formAdvanced.t38timeout.$touched) && forms.formAdvanced.t38timeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_T38TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="number" name="t38timeout" placeholder="{{\'APPLICATION_T38TIMEOUT\' | translate}}" class="form-control" data-ng-model="item.t38timeout" required min="1000"/>\n								<span class="help-block">\n									{{\'DESCRIPTION_T38TIMEOUT\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formAdvanced.t38timeout.$touched || forms.formAdvanced.$submitted) && forms.formAdvanced.t38timeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formAdvanced.t38timeout.$touched || forms.formAdvanced.$submitted) && forms.formAdvanced.t38timeout.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_T38TIMEOUT\' | translate}}.\n								</span>\n							</div>\n							<!-- END T38TIMEOUT -->\n\n							<!-- START TECH -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formAdvanced.$submitted || forms.formAdvanced.tech.$touched) && forms.formAdvanced.tech.$invalid}">\n							  <label class="control-label">{{\'APPLICATION_TECHNOLOGY\' | translate}} <span class="required" aria-required="true">*</span></label>\n							  <ui-select data-ng-model="item.tech" name="tech" theme="bootstrap" required>\n							    <ui-select-match placeholder="{{\'APPLICATION_TECHNOLOGY\' | translate}}">{{$select.selected}}</ui-select-match>\n							    <ui-select-choices repeat="tech in techs | filter: $select.search">\n							      <div data-ng-bind="tech | highlight: $select.search"></div>\n							    </ui-select-choices>\n							  </ui-select>\n								<span data-ng-show="(forms.formAdvanced.tech.$touched || forms.formAdvanced.$submitted) && forms.formAdvanced.tech.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- START TECH -->\n\n							<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n						<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n\n				</wizard>\n\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/fax/inbox/message/info.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body"  data-ng-init="initInfo()">\n  <div class="form-group" ng-if="data">\n    <json-formatter json="data" open="1"></json-formatter>\n  </div>\n  <div class="note note-warning" data-ng-hide="data">\n    <h4 class="block"></h4>\n    <p>\n      {{ \'MESSAGE_NO_INFO_AVAILABLE\' | translate }}\n    </p>\n  </div>\n\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/fax/inbox/message/message.directive.html",'<div class="message">\n  <div class="row">\n    <div class="col-md-6">\n      <span class="bold">From: </span>\n      [<a href="" data-ng-click="openContact(message.from)">{{message.from}}</a>]\n      <br>\n      <span class="bold">To: </span>\n      [<a href="" data-ng-click="openContact(message.to)">{{message.to}}</a>]\n    </div>\n    <div class="col-md-6">\n      <span class="pull-right">\n        <a ng-click="info(message)"><i class="icon-info font-blue"></i></a>\n      </span>\n      <span class="pull-right" data-ng-show="message.User">{{\'APPLICATION_SENT_BY\' | translate}}: <strong>{{message.User.fullname}}</strong></span>\n    </div>\n  </div>\n  <br>\n  <span class="todo-tasklist-date">\n    <span class="pull-right" data-ng-if="message.status!==\'RECEIVED\'" data-ng-switch="message.status" uib-tooltip="{{\'APPLICATION_PAGE_TRANSFERRED\' | translate}}: {{message.pagestransferred}} - {{\'APPLICATION_RETRY\' | translate}}: {{message.retry}}">\n      <a ng-switch-when="SENDING" href="#" class="btn default btn-xs inactive-link blue-stripe"> {{message.status | uppercase}}\n        <i class="fa fa-warning"></i>\n      </a>\n      <a ng-switch-when="FAILED" href="#" class="btn default btn-xs red-stripe" data-ng-click="retry(message.id)"> {{message.status | uppercase}}\n        <i class="fa fa-times"></i>\n      </a>\n      <a ng-switch-when="SENT" href="#" class="btn default btn-xs inactive-link green-stripe"> {{message.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n    </span>\n    <span class="pull-right" data-ng-if="message.status===\'RECEIVED\'" uib-tooltip="{{\'APPLICATION_PAGE_TRANSFERRED\' | translate}}: {{message.pagestransferred}}">\n      <a href="#" class="btn default btn-xs inactive-link green-stripe"> {{message.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n    </span>\n    <i class="icon-calendar"></i> <span am-time-ago="message.updatedAt"></span>\n  </span>\n  <hr data-ng-if="message.FaxAttachments.length">\n  <div data-ng-repeat="faxAttachment in message.FaxAttachments">\n    <strong>{{faxAttachment.name}}</strong>\n    <a target="_self" download="{{faxAttachment.name}}" href="api/fax/attachments/{{faxAttachment.id}}">\n      <i class="icon-cloud-download"></i>\n    </a>\n  </div>\n</div>\n'),a.put("app/channels/fax/inbox/note/note.directive.html",'<div class="note">\n  <div class="row">\n    <div class="col-md-6">\n      <a type="button" name="button" data-ng-if="::(Auth.getCurrentUser().id == message.UserId)" data-ng-click="deleteNote()">\n        <i class="fa fa-trash-o" style="color: red;"></i>\n      </a>\n\n      <i class="icon-calendar"></i> <span am-time-ago="message.updatedAt"></span>\n    </div>\n    <div class="col-md-6">\n      <span class="pull-right" data-ng-show="message.User">{{\'APPLICATION_ADD_BY\' | translate}}: <strong>{{message.User.fullname}}</strong></span>\n    </div>\n  </div>\n  <hr>\n  <span class="body text-left" data-ng-bind-html="message.text" style="white-space: pre-wrap;"></span>\n</div>\n'),a.put("app/channels/fax/inbox/note/note.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_NOTES\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n    <div class="form-group">\n      <textarea data-ng-model="item.text" name="text" rows="10" style="resize: none; width: 100%;"></textarea>\n    </div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/fax/inbox/room/room.directive.html",'<!-- BEGIN TODO CONTENT -->\n<div class="todo-content" data-ng-init="initForm();">\n	<div class="portlet light">\n		<div class="portlet-title">\n			<div class="caption">\n				<button data-ng-if="(!forms.compose.from.$invalid && !forms.compose.to.$invalid && uploader.queue.length) && faxRoom.status !== \'CLOSED\'" class="btn btn-sm btn-default green-meadow" data-ng-click="sendFax()">\n					<i class="icon-paper-plane" style="color: white;"></i> {{\'APPLICATION_SEND\' | translate}}\n				</button>\n				<span data-ng-if="(!forms.compose.from.$invalid && !forms.compose.to.$invalid && uploader.queue.length) && faxRoom && faxRoom.status !== \'CLOSED\'"> | </span>\n				<span data-ng-if="faxRoom" class="label label-default"> #{{faxRoom.id}} {{faxRoom.status}}</span>\n				<span data-ng-if="faxRoom"> | </span>\n				<span data-ng-if="faxRoom" class="caption-subject font-green-sharp bold">{{faxRoom.contact}}</span>\n			</div>\n			<div class="actions" data-ng-switch="faxRoom.status">\n				<button class="btn btn-icon-only yellow" data-ng-if="faxRoom" data-ng-click="loadNote()" data-ng-hide="faxRoom.status == \'CLOSED\'" title="{{\'APPLICATION_NOTES\' | translate}}">\n					<i class="fa fa-sticky-note"></i>\n				</button>\n				<button class="file-upload" data-ng-hide="faxRoom.status == \'CLOSED\'">\n					<i class="fa fa-paperclip"></i> <input type="file" data-ng-if="uploader" data-ng-hide="faxRoom.status == \'CLOSED\'" nv-file-select uploader="uploader" multiple class="file-input" title="{{\'APPLICATION_ATTACHMENTS\' | translate}}">\n				</button>\n				<!-- UPDATE SECTION START -->\n				<button data-ng-class="faxRoom.status == \'CLOSED\' ? \'grey-cascade\' : \'btn-success\'" class="btn btn-icon-only" data-ng-hide="faxRoom.status == \'CLOSED\' && faxRoom.disposition" data-ng-if="faxRoom" data-ng-click="closeRoom()" title="{{\'APPLICATION_STATUS\' | translate}}">\n					<i data-ng-class="faxRoom.status == \'CLOSED\' ? \'icon-target\' : \'fa fa-upload\'"></i>\n				</button>\n				<!-- UPDATE SECTION END -->\n				<button class="btn default btn-icon-only" data-ng-if="faxRoom && faxRoom.status !== \'CLOSED\'" data-ng-click="togglePanelLeft()" title="{{\'APPLICATION_RESIZE\' | translate}}">\n					<i ng-class="panelRight == \'col-md-12\' ? \'icon-size-actual\' : \'icon-size-fullscreen\'"></i>\n				</button>\n			</div>\n		</div>\n		<div class="portlet-body">\n			<div class="row">\n				<div data-ng-show="panelLeft" data-ng-class="panelLeft">\n					<div class="form">\n						<!-- START TAGS -->\n						<div class="form-group" data-ng-if="faxRoom.status !== \'CLOSED\'">\n							<div class="row">\n								<div class="col-md-1">\n									<a href="#" class="btn btn-icon-only">\n										<i class="fa fa-tags" style="color: gray;"></i>\n									</a>\n								</div>\n								<div class="col-md-11">\n									<ui-select multiple data-ng-model="form.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)" data-ng-disabled="faxRoom.status == \'CLOSED\'">\n										<ui-select-match placeholder="Tags...">{{$item}}</ui-select-match>\n										<ui-select-choices repeat="tag in tags | filter:$select.search" class="">\n											{{tag}}\n										</ui-select-choices>\n									</ui-select>\n								</div>\n							</div>\n						</div>\n						<!-- END TAGS -->\n					</div>\n\n					<hr data-ng-if="faxRoom && faxRoom.status !== \'CLOSED\'">\n\n					<!-- END TAGS -->\n\n					<div id="mail-box">\n						<ul class="chats">\n							<li\n							data-ng-switch="faxMessage.status"\n							data-ng-class="{\'in\': faxMessage.status == \'RECEIVED\', \'out\': faxMessage.status == \'SENT\' || faxMessage.status == \'SENDING\' || faxMessage.status == \'FAILED\' || faxMessage.status == \'NOTE\'}"\n							data-ng-repeat="faxMessage in faxRoom.FaxMessages | orderBy:\'-createdAt\'">\n								<div class="avatar" data-ng-class="faxMessage.UserId ? \'pretty-avatar\' : \'pretty-avatar-v\'">\n								<ng-letter-avatar\n								data-ng-if="faxMessage.UserId"\n								height="40"\n								width="40"\n								fontsize="25"\n								data="{{faxMessage.User.fullname}}"\n								avatarcustombgcolor="#B0B0B0"\n								avatarcustomborder="border:2px solid #3399CC"\n								charCount="2"\n								shape="round"></ng-letter-avatar>\n								<ng-letter-avatar\n								data-ng-if="!faxMessage.UserId"\n								height="40"\n								width="40"\n								fontsize="25"\n								data="{{faxMessage.from}}"\n								avatarcustombgcolor="#B0B0B0"\n								avatarcustomborder="border:2px solid #EA4C61"\n								charCount="1"\n								shape="round"></ng-letter-avatar>\n							</div>\n								<fax-note message="faxMessage" ng-switch-when="NOTE"></fax-note>\n								<fax-message message="faxMessage" list-id="faxRoom.FaxAccount.ListId" ng-switch-default></fax-message>\n							</li>\n						</ul>\n					</div>\n				</div>\n				<div data-ng-class="panelRight">\n					<div class="note note-info" data-ng-if="faxRoom && faxRoom.status == \'CLOSED\'">\n						<h4 class="block"><i class="icon-info"></i> {{\'MESSAGE_FAX_ROOM_CLOSED\' | translate}}!</h4>\n						<p>\n							<strong>{{\'MESSAGE_FAX_ROOM_CLOSED_DETAILS\' | translate}}.</strong>\n						</p>\n						<hr>\n						<p>\n							<i class="icon-target"></i> {{\'APPLICATION_DISPOSITION\' | translate}}: <strong>{{faxRoom.disposition}}</strong>\n						</p>\n						<p>\n							<i class="icon-calendar"></i> {{\'APPLICATION_UPDATED_AT\' | translate}}: <strong>{{faxRoom.updatedAt | date:\'medium\'}}</strong> (<span am-time-ago="faxRoom.updatedAt"></span>)\n						</p>\n					</div>\n					<form name="forms.compose" data-ng-submit="sendFax()" class="form-horizontal" novalidate>\n\n						<!-- START HEAD -->\n						<div class="form">\n\n							<v-accordion class="vAccordion--default" ng-if="faxRoom.status !== \'CLOSED\'">\n							  <v-pane expanded="expanded">\n							    <v-pane-header>\n							      <i class="icon-people"></i> From: {{form.from}}, To: {{form.to[0].fax}}\n							    </v-pane-header>\n							    <v-pane-content>\n										<!-- START FROM -->\n							      <div class="form-group" data-ng-if="faxRoom.status !== \'CLOSED\'" data-ng-class="{\'has-error\': forms.compose.from.$invalid}">\n							        <div class="col-md-12">\n							          <div class="row">\n							            <div class="col-md-1">\n							              <label class="control-label">From:</label>\n							            </div>\n							            <div class="col-md-11">\n							              <ui-select data-ng-model="form.from" data-ng-change="setList($select.selected.ListId)" theme="bootstrap" name="from" required>\n							                <ui-select-match placeholder="From...">{{$select.selected.name}}</ui-select-match>\n							                <ui-select-choices repeat="faxAccount.localstationid as faxAccount in faxAccounts | filter: $select.search">\n							                  <div data-ng-bind-html="faxAccount.name | highlight: $select.search"></div>\n							                  <small data-ng-bind-html="faxAccount.localstationid | highlight: $select.search"></small>\n							                </ui-select-choices>\n							              </ui-select>\n														<span data-ng-show="forms.compose.from.$invalid" class="help-block help-block-error">\n							                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							              </span>\n							            </div>\n							          </div>\n							        </div>\n							      </div>\n							      <!-- END FROM -->\n\n										<!-- START TO -->\n							      <div class="form-group" data-ng-if="faxRoom.status !== \'CLOSED\'" data-ng-class="{\'has-error\': forms.compose.to.$invalid}">\n							        <div class="col-md-12">\n							          <div class="row">\n							            <div class="col-md-1">\n							              <label class="control-label">To:</label>\n							            </div>\n							            <div class="col-md-11">\n							              <tags-input name="to" ng-model="form.to" type="text" display-property="fax" max-tags="1" min-tags="1">\n							                <auto-complete source="getContacts($query)"></auto-complete>\n							              </tags-input>\n							              <span data-ng-show="forms.compose.to.$invalid" class="help-block help-block-error">\n							                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_TO_LIMIT\' | translate}}.\n							              </span>\n							            </div>\n							          </div>\n							        </div>\n							      </div>\n							      <!-- END TO -->\n\n							    </v-pane-content>\n							  </v-pane>\n							</v-accordion>\n\n							<!-- START ATTACH -->\n							<div class="form-group" data-ng-if="uploader  && (faxRoom.status !== \'CLOSED\')">\n								<div class="col-md-12">\n									<hr ng-if="uploader.queue.length">\n									<table class="table">\n										<tbody>\n											<tr ng-repeat="item in uploader.queue">\n												<td style="border-top:none"><strong>{{ item.file.name | truncate: 5: \'...\': true}}</strong></td>\n												<td style="border-top:none" ng-show="uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB</td>\n												<td style="border-top:none" ng-show="uploader.isHTML5">\n													<div class="progress" style="margin-bottom: 0;">\n														<div class="progress-bar" role="progressbar" ng-style="{ \'width\': item.progress + \'%\' }"></div>\n													</div>\n												</td>\n												<td style="border-top-style:none" class="text-center">\n													<span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span>\n													<span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span>\n													<span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span>\n												</td>\n												<td style="border-top-style:none" nowrap>\n													<button type="button" class="btn btn-danger btn-xs" data-ng-click="item.remove()">\n														<span class="glyphicon glyphicon-trash"></span> {{\'APPLICATION_REMOVE\' | translate}}\n													</button>\n												</td>\n											</tr>\n										</tbody>\n									</table>\n									<div>\n									</div>\n								</div>\n							</div>\n							<!-- END ATTACH -->\n\n						</div>\n					</form>\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n<!-- END TODO CONTENT -->\n'),
+a.put("app/channels/fax/inbox/status/status.modal.html",'<div class="modal-header">\n  <button data-ng-if="modal.dismissable" type="button" data-ng-click="$dismiss()" class="close">&times;</button>\n  <h4 data-ng-if="modal.title" data-ng-bind="modal.title | translate" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p data-ng-if="modal.text && !closed" ng-bind="modal.text | translate"></p>\n  <form name="form" novalidate data-ng-init="initDisposition()">\n    <div class="form-group">\n      <ui-select data-ng-model="item.disposition" name="disposition" theme="bootstrap" data-ng-disabled="!dispositions.length" required>\n        <ui-select-match placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="disposition.name as disposition in dispositions | filter: $select.search">\n          <div ng-bind-html="disposition.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n    </div>\n    <div class="note note-warning" data-ng-if="dispositions.length < 1">\n      <h4 class="block">Warning!</h4>\n      <p>\n        {{ \'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate }}\n      </p>\n    </div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/fax/inbox/view/account/list/list.html",'<!-- BEGIN Portlet PORTLET-->\n<div class="portlet light" data-ng-init="initView()">\n	<div class="portlet-title">\n		<div class="caption">\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'NEW\'" uib-uncheckable>NEW</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'OPEN\'" uib-uncheckable>OPEN</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'PENDING\'" uib-uncheckable>PENDING</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'CLOSED\'" uib-uncheckable>CLOSED</button>\n			</div>\n		</div>\n		<div class="actions">\n			<a href="#" class="btn btn-icon-only default" data-ng-click="getPage();">\n				<i class="fa fa-refresh"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only red" data-ng-click="deleteItems();" data-ng-show="id.length && isAdmin">\n				<i class="fa fa-trash"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only btn-success" data-ng-click="disposeItems();" data-ng-show="id.length">\n				<i class="fa fa-upload"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only blue" data-ng-click="tagItems();" data-ng-show="id.length">\n				<i class="fa fa-tags"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only green" data-ng-click="openRoom(null, \'New Message\')">\n				<i class="fa fa-plus"></i>\n			</a>\n		</div>\n	</div>\n	<div class="portlet-title" data-ng-show="tags.length">\n		<!-- START TAGS -->\n		<div class="form-group">\n			<div class="row">\n				<div class="col-md-1">\n					<a href="#" class="btn btn-icon-only">\n						<i class="fa fa-tags" style="color: gray;"></i>\n					</a>\n				</div>\n				<div class="col-md-11">\n					<ui-select multiple data-ng-model="query.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)">\n						<ui-select-match placeholder="Search by tag...">{{$item}}</ui-select-match>\n						<ui-select-choices repeat="tag in tags | filter:$select.search">\n							{{tag}}\n						</ui-select-choices>\n					</ui-select>\n				</div>\n			</div>\n		</div>\n		<!-- END TAGS -->\n	</div>\n	<div class="portlet-body">\n		<!-- BEGIN UI-GRID SPINNER -->\n		<span us-spinner spinner-key="spinner-grid" spinner-start-active="false"></span>\n		<!-- END UI-GRID SPINNER -->\n\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-pagination ui-grid-selection ui-grid-exporter class="ui-grid-inbox">\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END Portlet PORTLET-->\n'),a.put("app/channels/fax/inbox/view/view.agents.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_AGENTS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TRANSPORT -->\n  <div class="form-group">\n    <form name="form" novalidate>\n      <!-- START TRANSPORT -->\n      <div class="form-group">\n        <ui-select multiple name="agents" data-ng-model="item.agents" theme="bootstrap">\n          <ui-select-match placeholder="{{\'APPLICATION_AGENTS\' | translate}}">{{$item.fullname}}</ui-select-match>\n          <ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n            {{agent.fullname}}\n          </ui-select-choices>\n        </ui-select>\n        <div class="note note-warning" data-ng-hide="agents">\n          <h4 class="block">Warning!</h4>\n          <p>\n            {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n          </p>\n          <p>\n            {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_AGENTS\' | translate}}</a>\n          </p>\n        </div>\n      </div>\n      <!-- END TRANSPORT -->\n    </form>\n  </div>\n  <!-- END TRANSPORT -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/fax/inbox/view/view.html",'<div class="row">\r\n	<div class="col-md-12">\r\n		<div class="page-bar">\r\n			<ul class="page-breadcrumb">\r\n        <li>\r\n          <i class="icon-rocket"></i>\r\n          <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\r\n          <i class="fa fa-angle-right"></i>\r\n        </li>\r\n        <li>\r\n          <i class="fa fa-spinner"></i>\r\n          <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\r\n          <i class="fa fa-angle-right"></i>\r\n        </li>\r\n        <li>\r\n          <i class="fa fa-fax"></i>\r\n          <a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\r\n          <i class="fa fa-angle-right"></i>\r\n        </li>\r\n				<li>\r\n					<i class="icon-note"></i>\r\n					<a href="#">{{ \'APPLICATION_INBOX\' | translate }}</a>\r\n				</li>\r\n			</ul>\r\n		</div>\r\n	</div>\r\n</div>\r\n\r\n<!-- BEGIN PAGE CONTENT-->\r\n<div class="row inbox">\r\n	<div class="col-md-3">\r\n		<ul class="inbox-nav margin-bottom-10">\r\n			<li data-ng-class="{active: $stateParams.id == faxAccount.id}" data-ng-repeat="faxAccount in faxAccounts">\r\n				<a href="/channels/fax/inbox/view/account/{{faxAccount.id}}/list" class="btn">\r\n					<i class="icon-notebook"></i> {{faxAccount.name}}\r\n				</a>\r\n				<b></b>\r\n			</li>\r\n		</ul>\r\n    <div class="note note-warning" data-ng-hide="faxAccounts.length">\r\n      <h4 class="block">Warning!</h4>\r\n      <p>\r\n        {{ \'MESSAGE_NO_AVAILABLE_ACCOUNTS\' | translate }}\r\n      </p>\r\n      <p>\r\n        {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/fax/accounts/list">{{\'APPLICATION_ACCOUNTS\' | translate}}</a>\r\n      </p>\r\n    </div>\r\n	</div>\r\n\r\n	<div class="col-md-9" data-ng-init="initView()">\r\n		<!-- BEGIN PROFILE CONTENT -->\r\n		<div class="room-content">\r\n			<div ui-view>\r\n				<div class="note note-info">\r\n					<h4 class="block">Info! {{\'APPLICATION_NO_ACCOUNT_SELECTED\' | translate}}</h4>\r\n				</div>\r\n			</div>\r\n		</div>\r\n		<!-- END PROFILE CONTENT -->\r\n	</div>\r\n</div>\r\n'),a.put("app/channels/fax/inbox/view/view.status.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ modal.title | translate }}</h3>\n</div>\n<div class="modal-body">\n  <p data-ng-if="modal.text" data-ng-bind="modal.text"></p>\n  <div data-ng-if="modal.html" data-ng-bind-html="modal.html"></div>\n</div>\n<div class="modal-footer">\n  <button data-ng-repeat="button in modal.buttons"\n  data-ng-class="button.classes"\n  data-ng-click="button.click($event)"\n  data-ng-bind="button.text | translate" class="btn"></button>\n</div>\n'),a.put("app/channels/fax/inbox/view/view.tags.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_TAGS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TRANSPORT -->\n  <div class="form-group">\n    <form name="form" novalidate>\n      <!-- START TAGS -->\n      <div class="form-group">\n        <ui-select multiple data-ng-model="item.tags" theme="bootstrap">\n          <ui-select-match placeholder="{{\'APPLICATION_TAGS\' | translate}}">{{$item}}</ui-select-match>\n          <ui-select-choices repeat="tag in tags | filter: $select.search">\n            {{tag}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n      <!-- END TAGS -->\n    </form>\n  </div>\n  <!-- END TRANSPORT -->\n</div>\n<div class="modal-footer">\n  <button type="button" class="btn" data-ng-class="button.class" data-ng-click="button.click()"data-ng-repeat="button in modal.buttons">{{button.text | translate}}</button>\n  <!-- <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button> -->\n</div>\n'),a.put("app/channels/fax/queue/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required />\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START STRATEGY -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.strategy.$touched || form.$submitted) && form.strategy.$invalid}">\n      <label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.strategy" name="strategy" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n        <ui-select-choices repeat="strategy in strategies | filter: $select.search">\n          <div ng-bind-html="strategy | uppercase | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.strategy.$touched || form.$submitted) && form.strategy.$invalid && form.strategy.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END STRATEGY -->\n\n    <!-- START TIMEOUT -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.timeout.$touched || form.$submitted) && form.timeout.$invalid}">\n      <label class="control-label">{{\'APPLICATION_AGENT_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="number" name="timeout" placeholder="Timeout" class="form-control" data-ng-model="item.timeout" required min="1"/>\n      <span data-ng-show="(form.timeout.$touched || form.$submitted) && form.timeout.$invalid && form.timeout.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TIMEOUT -->\n\n    <!-- START AGENTS-->\n    <div class="form-body" data-ng-init="getTeams()">\n      <label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n      <div class="input-group input-small mbottom20">\n        <input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="item.penalty" readonly>\n        <div class="spinner-buttons input-group-btn btn-group-vertical">\n          <button type="button" class="btn spinner-up btn-xs blue" data-ng-click="item.penalty=item.penalty+1">\n            <i class="fa fa-angle-up"></i>\n          </button>\n          <button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!item.penalty" data-ng-click="item.penalty=item.penalty-1">\n            <i class="fa fa-angle-down"></i>\n          </button>\n        </div>\n      </div>\n      <div class="form-group last">\n        <div class="col-md-12" id="multi-select-team">\n        </div>\n      </div>\n    </div>\n    <!-- END AGENTS-->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/fax/queue/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-fax"></i>\n						<a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-docs"></i>\n						<a href="/channels/fax/queues/lis">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_QUEUES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="#" data-ng-click="createItem()" data-ng-if="Auth.isAdmin()">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_QUEUE\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/fax/queue/view/view.agents.html",'<div class="row" data-ng-init="getTeams()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- BEGIN FORM-->\n				<form action="index.html" class="form-horizontal form-row-seperated">\n					<div class="form-body">\n						<label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n						<div class="input-group input-small mbottom20">\n							<input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="queue.penalty" readonly>\n							<div class="spinner-buttons input-group-btn btn-group-vertical">\n								<button type="button" class="btn spinner-up btn-xs blue" data-ng-click="queue.penalty=queue.penalty+1">\n									<i class="fa fa-angle-up"></i>\n								</button>\n								<button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!queue.penalty" data-ng-click="queue.penalty=queue.penalty-1">\n									<i class="fa fa-angle-down"></i>\n								</button>\n							</div>\n						</div>\n						<div class="form-group last">\n							<div class="col-md-12" id="multi-select-team">\n							</div>\n						</div>\n					</div>\n				</form>\n				<!-- END FORM-->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/fax/queue/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getQueue()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-fax"></i>\n					<a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/channels/fax/queues/list">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					<i data-ng-show="queue" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="queue">\n					<a href="#">{{queue.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/queue.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{queue.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.fax.queues.view.settings\')}">\n							<a data-ng-href="/channels/fax/queues/view/{{queue.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.channels.fax.queues.view.agents\')}" data-ng-show="Auth.getCurrentUser().role === \'admin\'">\n							<a data-ng-href="/channels/fax/queues/view/{{queue.id}}/agents">\n							<i class="icon-people"></i>\n							{{ \'APPLICATION_AGENTS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/fax/queue/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.general" data-ng-submit="forms.general.$valid && updateFaxQueue()" novalidate>\n					<!-- START NAME -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="queue.name" data-ng-pattern="settings.patternName" required />\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.pattern" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n						</span>\n					</div>\n					<!-- END NAME -->\n\n					<!-- START STRATEGY -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.strategy.$touched || forms.general.$submitted) && forms.general.strategy.$invalid}">\n						<label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}</label>\n						<ui-select data-ng-model="queue.strategy" name="strategy" theme="bootstrap">\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n							<ui-select-choices repeat="strategy in strategies | filter: $select.search">\n								<div ng-bind-html="strategy | uppercase | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n					</div>\n					<!-- END STRATEGY -->\n\n					<!-- START TIMEOUT -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}</label>\n						<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" min="1" data-ng-model="queue.timeout"/>\n					</div>\n					<!-- END TIMEOUT -->\n\n					<!-- START DESCRIPTION -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n						<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="queue.description"/>\n					</div>\n					<!-- END DESCRIPTION -->\n\n					<input data-ng-if="Auth.isAdmin()" class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/fax/realtime/view/agent/agent.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-tree-view ui-grid-expandable-row ui-grid-pagination ui-grid-auto-resize>\n			<span us-spinner spinner-key="grid-spinner" spinner-start-active="true"></span>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/fax/realtime/view/agent/agent.modal.info.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INTERFACE_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<div data-ng-if="agent.ipaddr" class="well">\n  <div>{{agent.ipaddr}}:{{agent.port}}</div>\n  <div>{{agent.fullcontact}}</div>\n  <div>{{agent.useragent}}</div>\n  <div>{{agent.lastms}}</div>\n</div>\n<div data-ng-if="!agent.ipaddr" class="alert alert-danger" role="alert">\n  {{\'MESSAGE_NO_AVAILABLE_INFO\' | translate}}\n</div>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/fax/realtime/view/agent/queue.modal.add.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_JOIN_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <div class="form-group row">\n  <label class="col-md-2 control-label" style="margin-top: 7px;">{{\'APPLICATION_QUEUE\' | translate}}:</label>\n  <div class="col-md-10">\n    <ui-select multiple ng-model="item.queues" theme="bootstrap" required>\n      <ui-select-match placeholder="{{\'APPLICATION_QUEUE\' | translate}}">{{$item.name}}</ui-select-match>\n      <ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n        <div ng-bind-html="queue.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n</div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/fax/realtime/view/application/application.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initApplications()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns class="ui-grid" ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/fax/realtime/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-fax"></i>\n					<a href="#">{{ \'APPLICATION_FAX\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-energy"></i>\n					<a href="#">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<div>\n			<nav class="navbar navbar-default" role="navigation">\n				<div class="collapse navbar-collapse">\n					<ul class="nav navbar-nav">\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.fax.realtime.view.agents\')}">\n							<a href="/channels/fax/realtime/view/agents">\n								{{\'APPLICATION_AGENTS\' | translate}}\n							</a>\n						</li>\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.fax.realtime.view.applications\')}">\n							<a href="/channels/fax/realtime/view/applications">\n								{{\'APPLICATION_APPLICATIONS\' | translate}}\n							</a>\n						</li>\n					</ul>\n				</div>\n			</nav>\n		</div>\n\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/mail/account/list/list.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-envelope"></i>\n					<a href="#">{{ \'APPLICATION_MAIL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="#">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n	</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group">\n						<a class="btn btn-default" href="#" data-ng-click="gridOptions.getPage();">\n							<i class="icon-reload"></i>\n						</a>\n					</div>\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/channels/mail/accounts/wizard">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/mail/account/view/action/list/list.html",'<div class="row" data-ng-init="initActons()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACTIONS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/channels/mail/accounts/view/{{account.id}}/actions/wizard" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACTION\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),
+a.put("app/channels/mail/account/view/action/view/view.html",'\n<div class="row" data-ng-init="initAction()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }}</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.settings" ng-submit="updateItem()" novalidate>\n					<!-- START APP -->\n					<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n							<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n							<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n								<div ng-bind-html="app.name | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid && forms.settings.app.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END APP -->\n\n					<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n						<!-- START QUEUE -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$invalid}">\n							<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.MailQueueId" name="queue" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n									<div ng-bind-html="queue.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="queues.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/mail/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END QUEUE -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n						<!-- START AGENT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$invalid}">\n							<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n								<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n									<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="agents.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_AGENTS\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END AGENT -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n						<!-- START SENDMAIL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" min="1" required/>\n							<span data-ng-show="(forms.action.from.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.action.mail.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n									<div ng-bind-html="template.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END SENDMAIL -->\n					</div>\n\n\n					<div class="app-settings" ng-slide-down="application.app === \'replyMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n						<!-- START REPLYMAIL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.action.type.$touched || forms.action.$submitted) && forms.action.type.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data1" name="type" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.key | translate }}</ui-select-match>\n								<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n									<div ng-bind-html="type.key | translate | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.action.type.$touched || forms.action.$submitted) && forms.action.type.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.action.mail.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n									<div ng-bind-html="template.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END REPLYMAIL -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n						<!-- START SENDSms -->\n						<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n								<span data-ng-show="(forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid && forms.settings.to.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.text.$touched || forms.text.$submitted) && forms.settings.text.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<textarea id="text" class="form-control maxlength-handler" maxlength="160"  name="text" data-ng-model="application.data6" required></textarea>\n							<span data-ng-show="(forms.settings.text.$touched || forms.settings.$submitted) && forms.settings.text.$invalid && forms.settings.text.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<!-- END SENDSms -->\n					</div>\n\n					<!-- START INTERVAL_TYPE -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n							<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n								{{ intType.name | translate }}\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END INTERVAL_TYPE -->\n\n					<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n						<!-- START TIME -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n							<div class="input-group input-large">\n								<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n									<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n								</fieldset>\n								<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n								<fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n								<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n							</div>\n						</div>\n						<!-- END TIME -->\n\n						<!-- START ALWAYS -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n							<div class="input-group input-large">\n								<label class="control-label pointer-cursor">\n									<input\n										bs-switch\n										data-ng-model="application.alwaysTime"\n										type="checkbox"\n										switch-active="{{ isActive }}"\n										switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n										switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n										switch-on-color="{{ onColor }}"\n										switch-off-color="{{ offColor }}"\n										switch-animate="{{ animate }}"\n										switch-size="{{ size }}"\n										switch-label="{{ label }}"\n										switch-icon="{{ icon }}"\n										switch-radio-off="{{ radioOff }}"\n										switch-label-width="{{ labelWidth }}"\n										switch-handle-width="{{ handleWidth }}">\n								</label>\n							</div>\n						</div>\n						<!-- END ALWAYS -->\n\n						<!-- START WEEKDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END WEEKDAY -->\n\n						<!-- START MONTHDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTHDAY -->\n\n						<!-- START MONTH -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTH -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n						<!-- START INTERVALS -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$invalid}">\n							<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n									{{ interval.name}}\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="intervals.length">\n								<h4 class="block">Warning!</h4>\n								<p>\n									{{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n								</p>\n								<p>\n									{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n								</p>\n							</div>\n							<span data-ng-show="(forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END INTERVALS -->\n\n					</div>\n					<button class="btn green-haze" type="submit">{{\'APPLICATION_UPDATE\' | translate}}</button>\n				</form>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/mail/account/view/action/wizard/wizard.html",'\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n					<wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.action.$valid)">\n\n						<form name="forms.action" novalidate>\n							<!-- START APP -->\n							<div class="form-group"  data-ng-class="{\'has-error\': forms.action.$submitted && forms.action.app.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n									<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n										<div ng-bind-html="app.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="forms.action.$submitted && forms.action.app.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END APP -->\n\n							<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n								<!-- START AGENT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$invalid}">\n									<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n										<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n											<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="agents.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_AGENTS\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END AGENT -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n								<!-- START QUEUE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$invalid}">\n									<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.MailQueueId" name="queue" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n											<div ng-bind-html="queue.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="queues.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/mail/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END QUEUE -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n								<!-- START SENDMAIL -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" min="1" required/>\n										<span data-ng-show="(forms.action.from.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.mail.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n											<div ng-bind-html="template.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END SENDMAIL -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'replyMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n								<!-- START REPLYMAIL -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.type.$touched || forms.action.$submitted) && forms.action.type.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data1" name="type" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.key | translate }}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.key | translate | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.type.$touched || forms.action.$submitted) && forms.action.type.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.mail.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n											<div ng-bind-html="template.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END REPLYMAIL -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n								<!-- START SENDSms -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n										<span data-ng-show="(forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid && forms.action.to.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<textarea id="text" class="form-control maxlength-handler"  maxlength="160" name="text" data-ng-model="application.data6" required></textarea>\n									<span data-ng-show="(forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid && forms.action.text.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<!-- END SENDSms -->\n							</div>\n\n							<!-- START INTERVAL_TYPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n										{{ intType.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END INTERVAL_TYPE -->\n\n							<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n								<!-- START TIME -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n									<div class="input-group input-large">\n										<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n											<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n										</fieldset>\n										<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n										<fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n										<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n									</div>\n								</div>\n								<!-- END TIME -->\n\n								<!-- START ALWAYS -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n									<div class="input-group input-large">\n										<label class="control-label pointer-cursor">\n											<input\n											bs-switch\n											data-ng-model="application.alwaysTime"\n											type="checkbox"\n											switch-active="{{ isActive }}"\n											switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n											switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n											switch-on-color="{{ onColor }}"\n											switch-off-color="{{ offColor }}"\n											switch-animate="{{ animate }}"\n											switch-size="{{ size }}"\n											switch-label="{{ label }}"\n											switch-icon="{{ icon }}"\n											switch-radio-off="{{ radioOff }}"\n											switch-label-width="{{ labelWidth }}"\n											switch-handle-width="{{ handleWidth }}">\n											<!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n										</label>\n									</div>\n								</div>\n								<!-- END ALWAYS -->\n\n								<!-- START WEEKDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END WEEKDAY -->\n\n								<!-- START MONTHDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTHDAY -->\n\n								<!-- START MONTH -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTH -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n								<!-- START INTERVALS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$invalid}">\n									<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n											{{ interval.name}}\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="intervals.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERVALS -->\n\n							</div>\n\n							<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONTINUE\' | translate}}"/>\n\n						</form>\n					</wz-step>\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/channels/mail/account/view/disposition/modal/add.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_DISPOSITIONS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.form.$touched || form.$submitted) && form.form.$invalid}">\n      <div class="">\n        <!-- <input type="text" name="form" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" class="form-control" data-ng-model="name" data-ng-pattern="/^[a-zA-Z0-9]*$/" required/> -->\n        <input type="text" name="form" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" class="form-control" data-ng-model="name" required/>\n        <span data-ng-show="form.form.$touched && form.form.$error.required" class="help-block help-block-error">\n          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n        </span>\n        <!-- <span data-ng-show="form.form.$touched && form.form.$error.pattern" class="help-block help-block-error">\n          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PATTERN\' | translate}}.\n        </span> -->\n      </div>\n      <!-- <div class="help-block">\n        {{\'MESSAGE_ALLOWED_NUMBERS_AND_LETTERS\' | translate}}\n			</div> -->\n    </div>\n    <!-- END NAME -->\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="form.$valid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/mail/account/view/disposition/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DISPOSITIONS\' | translate}}</span>\n				</div>\n				<div class="actions actions-md">\n					<a href="#" class="btn btn-icon-only green" data-ng-click="addDisposition();">\n						<i class="fa fa-plus"></i>\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n				<div class="tab-content">\n					<div class="row" data-ng-hide="dispositions.length">\n						<div class="col-md-12">\n							<div class="note note-info">\n								<h4 class="block">Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}</h4>\n							</div>\n						</div>\n					</div>\n\n					<!-- GENERAL TAB -->\n					<div class="row" data-ng-repeat="disposition in dispositions">\n						<div class="col-md-12 form-group">\n							<div class="input-group">\n								<div>\n									<input class="form-control" type="text" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" data-ng-model="disposition.name">\n								</div>\n								<span class="input-group-btn">\n									<button class="btn btn-success" type="button" data-ng-click="updateDisposition(disposition.id, disposition.name);"><i class="fa fa-cloud-upload fa-fw"></i> {{\'APPLICATION_UPDATE\' | translate}}</button>\n									<button class="btn btn-danger" type="button" data-ng-click="deleteDisposition(disposition.id);"><i class="fa fa-times fa-fw"></i> {{\'APPLICATION_DELETE\' | translate}}</button>\n								</span>\n							</div>\n						</div>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/mail/account/view/hooks/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_HOOKS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_ACCEPT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_REJECT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_CLOSE\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- ACCEPT TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.accept" data-ng-submit="forms.accept.$valid && updateItemMailAccount()" novalidate>\n								<div class="row">\n									<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid}">\n										<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n										<ui-select data-ng-model="account.acceptMethod" name="method" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n											<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n												<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n											</ui-select-choices>\n										</ui-select>\n										<span data-ng-show="(forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid && forms.accept.method.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<div  class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid}">\n										<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n										<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.acceptUrl"  ng-required="account.acceptMethod"/>\n										<span data-ng-show="(forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid && forms.accept.url.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n								<div class="row" ng-repeat = "action in account.actions">\n									<div  ng-switch="action.action">\n											<div ng-switch-when="pause">\n												<div  class="form-group col-md-4">\n													<label class="control-label">{{\'APPLICATION_PAUSE\' | translate}}</label></br>\n														<input\n														bs-switch\n														data-ng-change="resetActionData(action)"\n														data-ng-model="action.enabled"\n														type="checkbox"\n														switch-active="{{ isActive }}"\n														switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n														switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n														switch-on-color="{{ onColor }}"\n														switch-off-color="{{ offColor }}"\n														switch-animate="{{ animate }}"\n														switch-size="{{ size }}"\n														switch-label="{{ label }}"\n														switch-icon="{{ icon }}"\n														switch-radio-off="{{ radioOff }}"\n														switch-label-width="{{ labelWidth }}"\n														switch-handle-width="{{ handleWidth }}">\n													</div>\n													<div ng-if="action.enabled" class="form-group col-md-8">\n														<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}</label>\n														<ui-select  name="action" data-ng-model="action.type"  theme="bootstrap" >\n															<ui-select-match placeholder="{{\'APPLICATION_TYPE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n															<ui-select-choices repeat=" pause.name as pause in pauses | filter: $select.search">\n																<div ng-bind-html="pause.name | highlight: $select.search | uppercase" ></div>\n															</ui-select-choices>\n														</ui-select>\n													</div>\n											</div>\n										</div>\n									</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ACCEPT TAB -->\n					<!-- START REJECT TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.reject" data-ng-submit="forms.reject.$valid && updateItemMailAccount()" novalidate>\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.rejectMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid && forms.reject.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.rejectUrl" ng-required="account.rejectMethod"/>\n									<span data-ng-show="(forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid && forms.reject.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END REJECT TAB -->\n					<!-- START CLOSE TAB -->\n					<div class="tab-pane" id="tab_1_3">\n						<form name="forms.close" data-ng-submit="forms.close.$valid && updateItemMailAccount()" novalidate>\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.closeMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid && forms.close.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.closeUrl" ng-required="account.closeMethod"/>\n									<span data-ng-show="(forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid && forms.close.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CLOSE TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/mail/account/view/other/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_OTHER\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_SIGNATURE\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="mail-spinner-grid" spinner-start-active="false"></span>\n				<!-- END UI-GRID SPINNER -->\n\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItemMailAccount()" novalidate>\n							<!-- START WHITE LABEL -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.whiteLabel.$touched || forms.info.$submitted) && forms.info.whiteLabel.$invalid}">\n								<label class="control-label">{{\'APPLICATION_WHITE_LABEL\' | translate}}</label>\n								<textarea type="text" name="whiteLabel" placeholder="{{\'APPLICATION_WHITE_LABEL\' | translate}}" class="form-control" data-ng-model="account.whiteLabel" data-ng-disabled="!license.custom"/></textarea>\n								<span data-ng-show="(forms.info.whiteLabel.$touched || forms.info.$submitted) && forms.info.whiteLabel.$invalid && forms.info.whiteLabel.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END WHITE LABEL -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}" data-ng-disabled="!license.custom"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n					<!-- GENERAL TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.signature" data-ng-submit="updateItemMailAccount()" novalidate>\n							<!-- START SIGNATURE -->\n							<div class="form-group">\n								<div ckeditor="options" ng-model="account.signature"></div>\n							</div>\n							<!-- END WHITE LABEL -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/mail/account/view/setting/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n					<li data-ng-if="account.MailServerIn">\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">IMAP</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">SMTP</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="mail-spinner-grid" spinner-start-active="false"></span>\n				<!-- END UI-GRID SPINNER -->\n\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItemMailAccount()" novalidate>\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid && forms.info.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.address.$touched || forms.info.$submitted) && forms.info.address.$invalid}">\n								<label class="control-label">{{\'APPLICATION_EMAIL_ADDRESS\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="address" placeholder="{{\'APPLICATION_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.address" required/>\n								<span data-ng-show="(forms.info.address.$touched || forms.info.$submitted) && forms.info.address.$invalid && forms.info.address.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ADDRESS -->\n\n							<!-- START LIST -->\n							<div class="form-group" data-ng-if="license.cm">\n								<label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n									<div class="input-group">\n\n										<ui-select data-ng-model="account.ListId" name="list" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_LIST\' | translate}}">{{$select.selected.name}}</ui-select-match>\n											<ui-select-choices repeat="list.id as list in lists | filter: $select.search">\n												<div ng-bind-html="list.name | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n\n										<span class="input-group-btn">\n											<button type="button" data-ng-click="account.ListId = null" class="btn btn-default">\n												<span class="glyphicon glyphicon-trash"></span>\n											</button>\n										</span>\n\n									</div>\n							</div>\n							<!-- END LIST -->\n\n							<!-- START TEMPLATE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}</label>\n									<div class="input-group">\n\n										<ui-select data-ng-model="account.TemplateId" name="template" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_TEMPLATE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n											<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n												<div ng-bind-html="template.name | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n\n										<span class="input-group-btn">\n											<button type="button" data-ng-click="account.TemplateId = null" class="btn btn-default">\n												<span class="glyphicon glyphicon-trash"></span>\n											</button>\n										</span>\n\n									</div>\n							</div>\n							<!-- END TEMPLATE -->\n\n							<!-- START FIDELITY -->\n							<div class="form-group" data-ng-if="account.MailServerIn">\n								<label class="control-label">{{\'APPLICATION_FIDELITY\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="account.fidelity"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END FIDELITY -->\n\n							<!-- START TIMEOUT -->\n							<div class="form-group" data-ng-if="account.fidelity" data-ng-class="{\'has-error\': (forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" name="timeout" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="account.timeout" required/>\n								<span data-ng-show="(forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid && forms.info.timeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid && forms.info.timeout.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIMEOUT -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<!-- START SERVICE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_SERVICE\' | translate}}</label><br>\n								<input\n								bs-switch\n								data-ng-model="account.service"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END SERVICE -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n					<!-- IMAP TAB -->\n					<div class="tab-pane" id="tab_1_2" data-ng-if="account.MailServerIn">\n						<div class="note note-danger" data-ng-show="account.MailServerIn.state === \'DISCONNECTED\' || account.MailServerIn.state === \'ERROR\'">\n							<p> ERROR </p>\n							<json-formatter open="1" json="account.MailServerIn.source"></json-formatter>\n						</div>\n\n						<div class="note note-success" data-ng-show="account.MailServerIn.state === \'CONNECTED\'">\n							<p> CONNECTED </p>\n						</div>\n\n						<div class="note note-info" data-ng-show="account.MailServerIn.state === \'CONNECTING\'">\n							<p> TRYING... </p>\n						</div>\n\n						<form name="forms.formIn" data-ng-submit="forms.formIn.$valid && updateItemMailServerIn()" novalidate>\n							<!-- START HOST -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formIn.host.$touched || forms.formIn.$submitted) && forms.formIn.host.$invalid}">\n								<label class="control-label">{{\'APPLICATION_HOST\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="account.MailServerIn.host" required/>\n								<span data-ng-show="(forms.formIn.host.$touched || forms.formIn.$submitted) && forms.formIn.host.$invalid && forms.formIn.host.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END HOST -->\n\n							<!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formIn.username.$touched || forms.formIn.$submitted) && forms.formIn.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.MailServerIn.username" required/>\n								<span data-ng-show="(forms.formIn.username.$touched || forms.formIn.$submitted) && forms.formIn.username.$invalid && forms.formIn.username.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formIn.password.$touched || forms.formIn.$submitted) && forms.formIn.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.MailServerIn.password" required/>\n								<span data-ng-show="(forms.formIn.password.$touched || forms.formIn.$submitted) && forms.formIn.password.$invalid && forms.formIn.password.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n							<!-- START PORT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formIn.port.$touched || forms.formIn.$submitted) && forms.formIn.port.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" name="port" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="account.MailServerIn.port" required/>\n								<span data-ng-show="(forms.formIn.port.$touched || forms.formIn.$submitted) && forms.formIn.port.$invalid && forms.formIn.port.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formIn.port.$touched || forms.formIn.$submitted) && forms.formIn.port.$invalid && forms.formIn.port.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PORT -->\n\n							<!-- START MAILBOX -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_MAILBOX\' | translate}}</label>\n								<input type="text" name="mailbox" placeholder="{{\'APPLICATION_MAILBOX\' | translate}}" class="form-control" data-ng-model="account.MailServerIn.mailbox"/>\n							</div>\n							<!-- END MAILBOX -->\n\n							<!-- START SEARCH FILTER -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_SEARCH_FILTER\' | translate}}</label>\n								<ui-select data-ng-model="account.MailServerIn.filter" name="filter" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="filter in [\'UNSEEN\'] | filter: $select.search">\n										<div ng-bind-html="filter | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n							</div>\n							<!-- START SEARCH FILTER -->\n\n							<!-- START connTimeout -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.in.connTimeout.$touched || forms.in.$submitted) && forms.in.connTimeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CONNECTION_TIMEOUT\' | translate}} [sec]<span class="required" aria-required="true">*</span></label>\n								<input type="number" name="connTimeout" placeholder="{{\'APPLICATION_CONNECTION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="account.MailServerIn.connTimeout" required/>\n								<span data-ng-show="(forms.in.connTimeout.$touched || forms.in.$submitted) && forms.in.connTimeout.$invalid && forms.in.connTimeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.in.connTimeout.$touched || forms.in.$submitted) && forms.in.connTimeout.$invalid && forms.in.connTimeout.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END connTimeout -->\n\n							<!-- START authTimeout -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.in.authTimeout.$touched || forms.in.$submitted) && forms.in.authTimeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_AUTH_TIMEOUT\' | translate}} [sec]<span class="required" aria-required="true">*</span></label>\n								<input type="number" name="authTimeout" placeholder="{{\'APPLICATION_AUTH_TIMEOUT\' | translate}}" class="form-control" data-ng-model="account.MailServerIn.authTimeout" required/>\n								<span data-ng-show="(forms.in.authTimeout.$touched || forms.in.$submitted) && forms.in.authTimeout.$invalid && forms.in.authTimeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.in.authTimeout.$touched || forms.in.$submitted) && forms.in.authTimeout.$invalid && forms.in.authTimeout.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END authTimeout -->\n\n							<!-- START DELETE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DELETE_MAIL_FROM_SERVER\' | translate}}</label><br>\n								<input\n								bs-switch\n								data-ng-model="account.MailServerIn.delete"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END DELETE -->\n\n							<!-- START SSL -->\n							<div class="form-group">\n								<label class="control-label">SSL</label><br>\n								<input\n								bs-switch\n								data-ng-model="account.MailServerIn.ssl"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END SSL -->\n\n							<!-- START Keepalive -->\n							<div class="form-group">\n								<label class="control-label">Keepalive</label><br>\n								<input\n								bs-switch\n								data-ng-model="account.MailServerIn.keepalive"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END Keepalive -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END IMAP TAB -->\n\n					<!-- SMTP TAB -->\n					<div class="tab-pane" id="tab_1_3">\n\n						<div class="note note-danger" data-ng-show="account.MailServerOut.state === \'DISCONNECTED\' || account.MailServerOut.state === \'ERROR\'">\n							<p> ERROR </p>\n							<json-formatter open="1" json="account.MailServerOut.source"></json-formatter>\n						</div>\n\n						<div class="note note-success" data-ng-show="account.MailServerOut.state === \'CONNECTED\'">\n							<p> CONNECTED </p>\n						</div>\n\n						<div class="note note-info" data-ng-show="account.MailServerOut.state === \'CONNECTING\'">\n							<p> TRYING... </p>\n						</div>\n\n						<form name="forms.formOut" data-ng-submit="forms.formOut.$valid && updateItemMailServerOut()" novalidate>\n\n							<!-- START HOST -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formOut.host.$touched || forms.formOut.$submitted) && forms.formOut.host.$invalid}">\n								<label class="control-label">{{\'APPLICATION_HOST\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="account.MailServerOut.host" required/>\n								<span data-ng-show="(forms.formOut.host.$touched || forms.formOut.$submitted) && forms.formOut.host.$invalid && forms.formOut.host.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END HOST -->\n\n							<!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formOut.username.$touched || forms.formOut.$submitted) && forms.formOut.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.MailServerOut.username" required/>\n								<span data-ng-show="(forms.formOut.username.$touched || forms.formOut.$submitted) && forms.formOut.username.$invalid && forms.formOut.username.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formOut.password.$touched || forms.formOut.$submitted) && forms.formOut.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.MailServerOut.password" required/>\n								<span data-ng-show="(forms.formOut.password.$touched || forms.formOut.$submitted) && forms.formOut.password.$invalid && forms.formOut.password.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n							<!-- START PORT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formOut.port.$touched || forms.formOut.$submitted) && forms.formOut.port.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" name="port" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="account.MailServerOut.port" required/>\n								<span data-ng-show="(forms.formOut.form.$touched || forms.formOut.$submitted) && forms.formOut.port.$invalid && forms.formOut.port.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formOut.form.$touched || forms.formOut.$submitted) && forms.formOut.port.$invalid && forms.formOut.port.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PORT -->\n\n							<!-- START SSL -->\n							<div class="form-group">\n								<label class="control-label">SSL</label><br>\n								<input\n								bs-switch\n								data-ng-model="account.MailServerOut.ssl"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END SSL -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n							<input class="btn blue-madison" type="button" value="Test" data-ng-click="test()"/>\n						</form>\n					</div>\n					<!-- END SMTP TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
+a.put("app/channels/mail/account/view/view.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-envelope"></i>\n					<a href="#">{{ \'APPLICATION_MAIL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="/channels/mail/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n					<i class="fa fa-angle-right" data-ng-show="account"></i>\n				</li>\n				<li data-ng-show="account">\n					<a href="#">{{ account.description || account.name }}</a>\n				</li>\n			</ul>\n		</div>\n\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar" data-ng-init="initView()">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img ng-src="assets/images/media/account.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ account.description || account.name }}\n					</div>\n					<div class="profile-usertitle-job">\n						{{account.email}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li ng-class="{active: $state.is(\'main.channels.mail.accounts.view.settings\')}">\n							<a href="/channels/mail/accounts/view/{{account.id}}/settings">\n							<i class="icon-settings"></i>\n							{{\'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.mail.accounts.view.hooks\')}" data-ng-if="account.MailServerIn">\n							<a href="/channels/mail/accounts/view/{{account.id}}/hooks">\n							<i class="fa fa-code"></i>\n							{{\'APPLICATION_HOOKS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.mail.accounts.view.dispositions\')}" data-ng-if="account.MailServerIn">\n							<a href="/channels/mail/accounts/view/{{account.id}}/dispositions">\n							<i class="icon-target"></i>\n							{{\'APPLICATION_DISPOSITIONS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.includes(\'main.channels.mail.accounts.view.actions\')}" data-ng-if="account.MailServerIn">\n							<a href="/channels/mail/accounts/view/{{account.id}}/actions/list">\n							<i class="icon-directions"></i>\n							{{\'APPLICATION_ACTIONS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.includes(\'main.channels.mail.accounts.view.other\')}" data-ng-if="account.MailServerIn">\n							<a href="/channels/mail/accounts/view/{{account.id}}/other">\n							<i class="icon-equalizer"></i>\n							{{\'APPLICATION_OTHER\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<div ui-view class="profile-content"></div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n<!-- END PAGE CONTENT-->\n</div>\n'),a.put("app/channels/mail/account/wizard/wizard.html",'\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN PAGE HEADER-->\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-envelope"></i>\n					<a href="#">{{ \'APPLICATION_MAIL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="/channels/mail/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n		<!-- END PAGE HEADER-->\n\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n					<wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="formValidation(forms.info.$valid)">\n						<form name="forms.info" novalidate>\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid && forms.info.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.address.$touched || forms.info.$submitted) && forms.info.address.$invalid}">\n								<label class="control-label">{{\'APPLICATION_EMAIL_ADDRESS\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="address" placeholder="{{\'APPLICATION_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.address" required/>\n								<span data-ng-show="(forms.info.address.$touched || forms.info.$submitted) && forms.info.address.$invalid && forms.info.address.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ADDRESS -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n						</form>\n					</wz-step>\n\n					<wz-step title="IMAP" canexit="formValidation(forms.in.$valid)">\n						<form name="forms.in" novalidate>\n							<!-- START HOST -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.in.host.$touched || forms.in.$submitted) && forms.in.host.$invalid}">\n								<label class="control-label">{{\'APPLICATION_INCOMING_MAIL_SERVER\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="item.MailServerIn.host" required/>\n								<span data-ng-show="(forms.in.host.$touched || forms.in.$submitted) && forms.in.host.$invalid && forms.in.host.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END HOST -->\n\n							<!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.in.username.$touched || forms.in.$submitted) && forms.in.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.MailServerIn.username" name="username" required/>\n								<span data-ng-show="(forms.in.username.$touched || forms.in.$submitted) && forms.in.username.$invalid && forms.in.username.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.in.password.$touched || forms.in.$submitted) && forms.in.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.MailServerIn.password" required/>\n								<span data-ng-show="(forms.in.password.$touched || forms.in.$submitted) && forms.in.password.$invalid && forms.in.password.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n							<!-- START PORT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.in.port.$touched || forms.in.$submitted) && forms.in.port.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" name="port" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="item.MailServerIn.port" required/>\n								<span data-ng-show="(forms.in.port.$touched || forms.in.$submitted) && forms.in.port.$invalid && forms.in.port.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.in.port.$touched || forms.in.$submitted) && forms.in.port.$invalid && forms.in.port.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PORT -->\n\n							<!-- START MAILBOX -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_MAILBOX\' | translate}}</label>\n								<input type="text" name="mailbox" placeholder="{{\'APPLICATION_MAILBOX\' | translate}}" class="form-control" data-ng-model="item.MailServerIn.mailbox"/>\n							</div>\n							<!-- END MAILBOX -->\n\n							<!-- START SEARCH FILTER -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_SEARCH_FILTER\' | translate}}</label>\n								<ui-select data-ng-model="item.MailServerIn.filter" name="filter" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="filter in [\'UNSEEN\'] | filter: $select.search">\n										<div data-ng-bind="filter | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n							</div>\n							<!-- START SEARCH FILTER -->\n\n							<!-- START connTimeout -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.in.connTimeout.$touched || forms.in.$submitted) && forms.in.connTimeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CONNECTION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" name="connTimeout" placeholder="{{\'APPLICATION_CONNECTION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="item.MailServerIn.connTimeout" required/>\n								<span data-ng-show="(forms.in.connTimeout.$touched || forms.in.$submitted) && forms.in.connTimeout.$invalid && forms.in.connTimeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.in.connTimeout.$touched || forms.in.$submitted) && forms.in.connTimeout.$invalid && forms.in.connTimeout.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END connTimeout -->\n\n							<!-- START authTimeout -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.in.authTimeout.$touched || forms.in.$submitted) && forms.in.authTimeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_AUTH_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" name="authTimeout" placeholder="{{\'APPLICATION_AUTH_TIMEOUT\' | translate}}" class="form-control" data-ng-model="item.MailServerIn.authTimeout" required/>\n								<span data-ng-show="(forms.in.authTimeout.$touched || forms.in.$submitted) && forms.in.authTimeout.$invalid && forms.in.authTimeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.in.authTimeout.$touched || forms.in.$submitted) && forms.in.authTimeout.$invalid && forms.in.authTimeout.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END authTimeout -->\n\n							<!-- START DELETE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DELETE_MAIL_FROM_SERVER\' | translate}}</label><br>\n								<input\n								bs-switch\n								data-ng-model="item.MailServerIn.delete"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END DELETE -->\n\n							<!-- START SSL -->\n							<div class="form-group">\n								<label class="control-label">SSL</label><br>\n								<input\n								bs-switch\n								data-ng-model="item.MailServerIn.ssl"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END SSL -->\n\n							<!-- START Keepalive -->\n							<div class="form-group">\n								<label class="control-label">Keepalive</label><br>\n								<input\n								bs-switch\n								data-ng-model="item.MailServerIn.keepalive"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END Keepalive -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="goNext()"/>\n						</form>\n					</wz-step>\n\n					<wz-step title="SMTP" canexit="formValidation(forms.out.$valid)">\n						<form name="forms.out" novalidate>\n							<!-- START HOST -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.out.host.$touched || forms.out.$submitted) && forms.out.host.$invalid}">\n								<label class="control-label">{{\'APPLICATION_OUTGOING_MAIL_SERVER\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="item.MailServerOut.host" required/>\n								<span data-ng-show="(forms.out.host.$touched || forms.out.$submitted) && forms.out.host.$invalid && forms.out.host.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END HOST -->\n\n							<!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.out.username.$touched || forms.out.$submitted) && forms.out.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.MailServerOut.username" required/>\n								<span data-ng-show="(forms.out.username.$touched || forms.out.$submitted) && forms.out.username.$invalid && forms.out.username.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.out.password.$touched || forms.out.$submitted) && forms.out.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.MailServerOut.password" required/>\n								<span data-ng-show="(forms.out.password.$touched || forms.out.$submitted) && forms.out.password.$invalid && forms.out.password.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n							<!-- START PORT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.out.port.$touched || forms.out.$submitted) && forms.out.port.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" name="port" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="item.MailServerOut.port" required/>\n								<span data-ng-show="(out.$touched || forms.out.$submitted) && forms.out.port.$invalid && forms.out.port.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(out.$touched || forms.out.$submitted) && forms.out.port.$invalid && forms.out.port.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PORT -->\n\n							<!-- START SSL -->\n							<div class="form-group">\n								<label class="control-label">SSL</label><br>\n								<input\n								bs-switch\n								data-ng-model="item.MailServerOut.ssl"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END SSL -->\n\n							<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="goNext()"/>\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/mail/inbox/message/info.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body"  data-ng-init="initInfo()">\n  <div class="form-group" ng-if="data">\n    <json-formatter json="data" open="1"></json-formatter>\n  </div>\n  <div class="note note-warning" data-ng-hide="data">\n    <h4 class="block"></h4>\n    <p>\n      {{ \'MESSAGE_NO_INFO_AVAILABLE\' | translate }}\n    </p>\n  </div>\n\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/mail/inbox/message/message.directive.html",'<div class="message">\n  <div class="row">\n    <div class="col-md-12">\n      <span class="bold">From: </span>\n      <a href="" data-ng-click="openContact(message.from[0])">{{message.from[0]}} </a>\n      <br>\n      <span class="bold">To: </span>\n      <a href="" data-ng-click="openContact(to)" data-ng-repeat="to in message.to">{{to}}<span data-ng-if="!$last">, </span></a>\n      <br>\n      <span data-ng-if="message.cc.length" class="bold">Cc: </span>\n      <a href="" data-ng-click="openContact(cc)" data-ng-repeat="cc in message.cc">{{cc}}<span data-ng-if="!$last">, </span></a>\n      <br>\n      <span data-ng-if="message.bcc.length" class="bold">Bcc: </span>\n      <a href="" data-ng-click="openContact(bcc)" data-ng-repeat="cc in message.bcc">{{bcc}}<span data-ng-if="!$last">, </span></a>\n    </div>\n  <div class="row">\n    <div class="col-md-12">\n      <span class="pull-right" data-ng-if="message.User">{{\'APPLICATION_SENT_BY\' | translate}}: <strong>{{message.User.fullname}}</strong></span>\n      <span class="pull-right" data-ng-if="message.voiceSource">{{\'APPLICATION_SENT_BY\' | translate}}: <strong>Cally &#178;</strong>\n        <a ng-click="info(message.voiceSource)"><i class="icon-info font-blue"></i>\n        </a>\n      </span>\n    </div>\n  </div>\n  <br>\n  <span class="todo-tasklist-date">\n    <span class="pull-right" data-ng-switch="message.status" data-ng-if="message.status!==\'RECEIVED\'" uib-tooltip="{{\'APPLICATION_RETRY\' | translate}}: {{message.retry}}">\n      <a ng-switch-when="SENDING" href="#" class="btn default btn-xs inactive-link blue-stripe"> {{message.status | uppercase}}\n        <i class="fa fa-warning"></i>\n      </a>\n      <a ng-switch-when="SENT" href="#" class="btn default btn-xs inactive-link green-stripe"> {{message.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n      <a ng-switch-when="FAILED" href="#" class="btn default btn-xs red-stripe" data-ng-click="retry(message.id)"> {{message.status | uppercase}}\n        <i class="fa fa-times"></i>\n      </a>\n    </span>\n    <span class="pull-right" data-ng-if="message.status===\'RECEIVED\'">\n      <a href="#" class="btn default btn-xs inactive-link green-stripe"> {{message.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n    </span>\n    <i class="icon-calendar"></i> <span am-time-ago="message.updatedAt"></span>\n  </span>\n  <hr>\n  <div class="body text-left message-body" data-ng-bind="message.text"></div>\n  <h5 data-ng-hide="message.text" class="media-heading"><i>{{\'MESSAGE_NO_AVAILABLE_TEXT\' | translate | lowercase}}</i></h5>\n  <hr data-ng-if="message.MailAttachments.length">\n  <div data-ng-repeat="mailAttachment in message.MailAttachments">\n    <strong>{{mailAttachment.name}}</strong>\n    <span>\n      ({{mailAttachment.size | prettyBytes}})\n    </span>\n    <a target="_self" download="{{mailAttachment.name}}" href="api/mail/attachments/{{mailAttachment.id}}">\n      <i class="icon-cloud-download"></i>\n    </a>\n    <a ng-if="::(mailAttachment.type.indexOf(\'image\') > -1)" ng-click="openPreview(mailAttachment.id)">\n      <i class="icon-picture"></i>\n    </a>\n  </div>\n</div>\n'),a.put("app/channels/mail/inbox/note/note.directive.html",'<div class="note">\n  <div class="row">\n    <div class="col-md-6">\n      <a type="button" name="button" data-ng-if="::(Auth.getCurrentUser().id == message.UserId)" data-ng-click="deleteNote()">\n        <i class="fa fa-trash-o" style="color: red;"></i>\n      </a>\n\n      <i class="icon-calendar"></i> <span am-time-ago="message.updatedAt"></span>\n    </div>\n    <div class="col-md-6">\n      <span class="pull-right" data-ng-show="message.User">{{\'APPLICATION_ADD_BY\' | translate}}: <strong>{{message.User.fullname}}</strong></span>\n    </div>\n  </div>\n  <hr>\n  <span class="body text-left" data-ng-bind-html="message.text" style="white-space: pre-wrap;"></span>\n</div>\n'),a.put("app/channels/mail/inbox/note/note.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_NOTES\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n    <div class="form-group">\n      <textarea data-ng-model="item.text" name="text" rows="10" style="resize: none; width: 100%;"></textarea>\n    </div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/mail/inbox/room/room.directive.html",'<!-- BEGIN TODO CONTENT -->\n<div class="todo-content">\n	<div class="portlet light">\n		<div class="portlet-title">\n			<div class="caption">\n				<button data-ng-if="form.from.length && form.to.length && mailRoom.status !== \'CLOSED\' && form.html" class="btn btn-sm btn-default green-meadow" data-ng-click="sendMail()">\n					<i class="icon-paper-plane" style="color: white;"></i> {{\'APPLICATION_SEND\' | translate}}\n				</button>\n				<span data-ng-if="mailRoom && form.from.length && form.to.length && mailRoom.status !== \'CLOSED\' && form.html"> | </span>\n				<span data-ng-if="mailRoom" class="label label-default"> #{{mailRoom.id}} {{mailRoom.status}}</span>\n				<span data-ng-if="mailRoom"> | </span>\n				<span data-ng-if="mailRoom && mailRoom.ParentId" class="label label-warning"> Ref: <a data-ng-click="openRoom(mailRoom.ParentId)">#{{mailRoom.ParentId}}</a></span>\n				<span data-ng-if="mailRoom && mailRoom.ParentId"> | </span>\n				<span data-ng-if="mailRoom" class="caption-subject font-green-sharp bold uppercase dot">{{mailRoom.subject || \'No subject\'}}</span>\n			</div>\n			<div class="actions">\n				<button class="btn btn-icon-only yellow" data-ng-if="mailRoom" data-ng-click="loadNote()" data-ng-hide="mailRoom.status == \'CLOSED\'" title="{{\'APPLICATION_NOTES\' | translate}}">\n					<i class="fa fa-sticky-note"></i>\n				</button>\n				<button class="file-upload" data-ng-hide="mailRoom.status == \'CLOSED\'">\n					<i class="fa fa-paperclip"></i> <input type="file" data-ng-if="uploader" data-ng-disabled="mailRoom.status == \'CLOSED\'" nv-file-select uploader="uploader" multiple class="file-input" title="{{\'APPLICATION_ATTACHMENTS\' | translate}}">\n				</button>\n				<!-- UPDATE SECTION START -->\n				<button data-ng-class="mailRoom.status == \'CLOSED\' ? \'grey-cascade\' : \'btn-success\'" class="btn btn-icon-only" data-ng-disabled="mailRoom.status == \'CLOSED\' && mailRoom.disposition" data-ng-if="mailRoom" data-ng-click="closeRoom()" title="{{\'APPLICATION_STATUS\' | translate}}">\n					<i data-ng-class="mailRoom.status == \'CLOSED\' ? \'icon-target\' : \'fa fa-upload\'"></i>\n				</button>\n				<!-- UPDATE SECTION END -->\n				<button class="btn default btn-icon-only" data-ng-if="mailRoom && mailRoom.status !== \'CLOSED\'" data-ng-click="togglePanelLeft()" title="{{\'APPLICATION_RESIZE\' | translate}}">\n					<i ng-class="panelRight == \'col-md-12\' ? \'icon-size-actual\' : \'icon-size-fullscreen\'"></i>\n				</button>\n			</div>\n		</div>\n		<div class="portlet-body">\n			<div class="row">\n				<div data-ng-if="panelLeft" data-ng-class="panelLeft">\n					<div class="form">\n						<!-- START TAGS -->\n						<div class="form-group" data-ng-if="mailRoom.status !== \'CLOSED\'">\n							<div class="row">\n								<div class="col-md-1">\n									<a href="#" class="btn btn-icon-only">\n										<i class="fa fa-tags" style="color: gray;"></i>\n									</a>\n								</div>\n								<div class="col-md-11">\n									<ui-select multiple data-ng-model="form.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)" data-ng-disabled="mailRoom.status == \'CLOSED\'">\n										<ui-select-match placeholder="Tags...">{{$item}}</ui-select-match>\n										<ui-select-choices repeat="tag in tags | filter:$select.search" class="">\n											{{tag}}\n										</ui-select-choices>\n									</ui-select>\n								</div>\n							</div>\n						</div>\n						<!-- END TAGS -->\n					</div>\n\n					<hr data-ng-if="mailRoom && mailRoom.status !== \'CLOSED\'">\n\n					<!-- END TAGS -->\n					<div id="mail-box">\n						<ul class="chats">\n							<li\n							data-ng-switch="mailMessage.status"\n							data-ng-class="{\'in\': mailMessage.status == \'RECEIVED\', \'out\': mailMessage.status == \'SENT\' || mailMessage.status == \'SENDING\' || mailMessage.status == \'FAILED\' || mailMessage.status == \'NOTE\'}"\n							data-ng-repeat="mailMessage in mailRoom.MailMessages | orderBy:\'-createdAt\'">\n							<div class="avatar" data-ng-class="message.UserId ? \'pretty-avatar\' : \'pretty-avatar-v\'">\n								<ng-letter-avatar\n								data-ng-if="mailMessage.UserId"\n								height="40"\n								width="40"\n								fontsize="25"\n								data="{{mailMessage.User.fullname}}"\n								avatarcustombgcolor="#B0B0B0"\n								avatarcustomborder="border:2px solid #3399CC"\n								charCount="2"\n								shape="round"></ng-letter-avatar>\n								<ng-letter-avatar\n								data-ng-if="!mailMessage.UserId"\n								height="40"\n								width="40"\n								fontsize="25"\n								data="{{mailMessage.from[0]}}"\n								avatarcustombgcolor="#B0B0B0"\n								avatarcustomborder="border:2px solid #EA4C61"\n								charCount="1"\n								shape="round"></ng-letter-avatar>\n							</div>\n							<mail-note message="mailMessage" ng-switch-when="NOTE"></mail-note>\n							<mail-message message="mailMessage" list-id="mailRoom.MailAccount.ListId" ng-switch-default></mail-message>\n						</li>\n					</ul>\n				</div>\n			</div>\n			<div data-ng-class="panelRight">\n				<div class="note note-info" data-ng-if="mailRoom && mailRoom.status == \'CLOSED\'">\n					<h4 class="block"><i class="icon-info"></i> {{\'MESSAGE_MAIL_ROOM_CLOSED\' | translate}}!</h4>\n					<p>\n						<strong>{{\'MESSAGE_MAIL_ROOM_CLOSED_DETAILS\' | translate}}.</strong>\n					</p>\n					<hr>\n					<p>\n						<i class="icon-target"></i> {{\'APPLICATION_DISPOSITION\' | translate}}: <strong>{{mailRoom.disposition}}</strong>\n					</p>\n					<p>\n						<i class="icon-calendar"></i> {{\'APPLICATION_UPDATED_AT\' | translate}}: <strong>{{mailRoom.updatedAt | date:\'medium\'}}</strong> (<span am-time-ago="mailRoom.updatedAt"></span>)\n					</p>\n				</div>\n				<form name="forms.compose" data-ng-submit="sendMail()" class="form-horizontal" novalidate>\n					<!-- START HEAD -->\n					<div class="form">\n						<v-accordion class="vAccordion--default" ng-if="mailRoom.status !== \'CLOSED\'">\n							<v-pane expanded="expanded">\n								<v-pane-header>\n									<i class="icon-people"></i> From: {{form.from[0]}}, To: {{form.to[0].email}} <span ng-if="form.to.length > 1">(+{{form.to.length - 1}})</span>\n								</v-pane-header>\n								<v-pane-content>\n									<!-- START FROM -->\n									<div class="form-group" data-ng-if="mailRoom.status !== \'CLOSED\'">\n										<div class="col-md-12">\n											<div class="row">\n												<div class="col-md-1">\n													<label class="control-label">From:</label>\n												</div>\n												<div class="col-md-11">\n													<ui-select data-ng-model="form.from[0]" data-ng-change="setList($select.selected.ListId)" theme="bootstrap" name="from" required>\n														<ui-select-match placeholder="From...">{{$select.selected.name}}</ui-select-match>\n														<ui-select-choices repeat="mailAccount.address as mailAccount in mailAccounts | filter: $select.search">\n															<div data-ng-bind-html="mailAccount.name | highlight: $select.search"></div>\n															<small data-ng-bind-html="mailAccount.address | highlight: $select.search"></small>\n														</ui-select-choices>\n													</ui-select>\n												</div>\n											</div>\n										</div>\n									</div>\n									<!-- END FROM -->\n\n									<!-- MAIL TO -->\n									<div class="form-group" data-ng-if="mailRoom.status !== \'CLOSED\'">\n										<div class="col-md-12">\n											<div class="row">\n												<div class="col-md-1">\n													<label class="control-label">To:</label>\n												</div>\n												<div class="col-md-11">\n													<tags-input ng-model="form.to" type="email" display-property="email">\n														<auto-complete source="getContacts($query)"></auto-complete>\n													</tags-input>\n												</div>\n											</div>\n										</div>\n									</div>\n									<!-- END TO -->\n\n									<!-- START CC -->\n									<div class="form-group" data-ng-if="mailRoom.status !== \'CLOSED\'">\n										<div class="col-md-12">\n											<div class="row">\n												<div class="col-md-1">\n													<label class="control-label">Cc:</label>\n												</div>\n												<div class="col-md-11">\n													<tags-input ng-model="form.cc" type="email" display-property="email">\n														<auto-complete source="getContacts($query)"></auto-complete>\n													</tags-input>\n												</div>\n											</div>\n										</div>\n									</div>\n									<!-- END CC -->\n\n									<!-- START BCC -->\n									<div class="form-group" data-ng-if="mailRoom.status !== \'CLOSED\'">\n										<div class="col-md-12">\n											<div class="row">\n												<div class="col-md-1">\n													<label class="control-label">Bcc:</label>\n												</div>\n												<div class="col-md-11">\n													<tags-input ng-model="form.bcc" type="email" display-property="email">\n														<auto-complete source="getContacts($query)"></auto-complete>\n													</tags-input>\n												</div>\n											</div>\n										</div>\n									</div>\n									<!-- END BCC -->\n\n									<!-- START SUBJECT -->\n									<div class="form-group" data-ng-class="{\'has-error\': forms.compose.subject.$invalid && forms.compose.$submitted}" data-ng-if="mailRoom.status !== \'CLOSED\'">\n										<div class="col-md-12">\n											<div class="row">\n												<div class="col-md-1">\n													<label class="control-label">Subj:</label>\n												</div>\n												<div class="col-md-11">\n													<input type="text" name="subject" class="form-control todo-taskbody-taskdesc" placeholder="Subject..." rows="8" data-ng-model="form.subject">\n													<span data-ng-if="forms.compose.subject.$invalid && forms.compose.$submitted" class="help-block help-block-error">\n														<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n													</span>\n												</div>\n											</div>\n										</div>\n									</div>\n									<!-- END SUJBECT -->\n								</v-pane-content>\n							</v-pane>\n						</v-accordion>\n\n						<!-- START ATTACH -->\n						<div class="form-group" data-ng-if="uploader  && (mailRoom.status !== \'CLOSED\')">\n							<div class="col-md-12">\n								<hr ng-if="uploader.queue.length">\n								<table class="table">\n									<tbody>\n										<tr ng-repeat="item in uploader.queue">\n											<td style="border-top:none" rowspan="{{uploader.queue.length}}" ng-if="(!$index)">\n												{{\'APPLICATION_ATTACHMENTS\' | translate}}:\n											</td>\n											<td style="border-top:none"><strong>{{ item.file.name }}</strong></td>\n											<td style="border-top:none" ng-show="uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB</td>\n											<td style="border-top:none" ng-show="uploader.isHTML5">\n												<div class="progress" style="margin-bottom: 0;">\n													<div class="progress-bar" role="progressbar" ng-style="{ \'width\': item.progress + \'%\' }"></div>\n												</div>\n											</td>\n											<td style="border-top-style:none" class="text-center">\n												<span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span>\n												<span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span>\n												<span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span>\n											</td>\n											<td style="border-top-style:none" nowrap>\n												<button type="button" class="btn btn-danger btn-xs" data-ng-click="item.remove()">\n													<span class="glyphicon glyphicon-trash"></span> {{\'APPLICATION_REMOVE\' | translate}}\n												</button>\n											</td>\n										</tr>\n									</tbody>\n								</table>\n								<div>\n								</div>\n							</div>\n						</div>\n						<!-- END ATTACH -->\n\n						<!-- START CANNED -->\n						<div class="form-group" data-ng-class="{\'has-error\': forms.compose.subject.$invalid && forms.compose.$submitted}" data-ng-if="mailRoom.status !== \'CLOSED\'">\n							<div class="col-md-12">\n								<div class="row">\n									<div class="col-md-1">\n										<a href="#" class="btn btn-icon-only">\n											<i class="fa fa-magic" style="color: gray;"></i>\n										</a>\n									</div>\n									<div class="col-md-11">\n										<input type="text"\n										data-ng-model="modelOptions.selectedAnswer"\n										uib-typeahead="key for key in getAnswers($viewValue)"\n										placeholder="Canned answers.."\n										typeahead-loading="loadingLocations"\n										typeahead-no-results="noResults"\n										typeahead-on-select="onSelectAnswer($item)"\n										class="form-control">\n										<i ng-show="loadingLocations" class="glyphicon glyphicon-refresh"></i>\n										<div ng-show="noResults">\n											<i class="glyphicon glyphicon-remove"></i> No Results Found\n										</div>\n										<span data-ng-if="forms.compose.subject.$invalid && forms.compose.$submitted" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n							</div>\n						</div>\n						<!-- END CANNED -->\n\n						<!-- START HTML -->\n						<div class="form-group" data-ng-class="{\'has-error\': forms.compose.text.$invalid && forms.compose.$submitted}" data-ng-if="mailRoom.status !== \'CLOSED\'">\n							<div class="col-md-12">\n								<div ckeditor="options" ng-model="form.html" ready="onCKReady($instance)"></div>\n								<span data-ng-if="forms.compose.text.$invalid && forms.compose.$submitted" class="help-block help-block-error">\n'+"									<strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n								</span>\n							</div>\n						</div>\n						<!-- END HTML -->\n\n					</div>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n<!-- END TODO CONTENT -->\n"),
+a.put("app/channels/mail/inbox/status/status.modal.html",'<div class="modal-header">\n  <button data-ng-if="modal.dismissable" type="button" data-ng-click="$dismiss()" class="close">&times;</button>\n  <h4 data-ng-if="modal.title" data-ng-bind="modal.title | translate" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p data-ng-if="modal.text && !closed" ng-bind="modal.text | translate"></p>\n  <form name="form" novalidate data-ng-init="initDisposition()">\n    <div class="form-group">\n      <ui-select data-ng-model="item.disposition" name="disposition" theme="bootstrap" data-ng-disabled="!dispositions.length" required>\n        <ui-select-match placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="disposition.name as disposition in dispositions | filter: $select.search">\n          <div ng-bind-html="disposition.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n    </div>\n    <div class="note note-warning" data-ng-if="dispositions.length < 1">\n      <h4 class="block">Warning!</h4>\n      <p>\n        {{ \'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate }}\n      </p>\n    </div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/mail/inbox/view/account/list/list.html",'<!-- BEGIN Portlet PORTLET-->\n<div class="portlet light" data-ng-init="initView()">\n	<div class="portlet-title">\n		<div class="caption">\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'NEW\'" uib-uncheckable>NEW</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'OPEN\'" uib-uncheckable>OPEN</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'PENDING\'" uib-uncheckable>PENDING</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'CLOSED\'" uib-uncheckable>CLOSED</button>\n			</div>\n		</div>\n		<div class="actions">\n			<a href="#" class="btn btn-icon-only default" data-ng-click="getPage();">\n				<i class="fa fa-refresh"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only red" data-ng-click="deleteItems();" data-ng-show="id.length && isAdmin">\n				<i class="fa fa-trash"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only btn-success" data-ng-click="disposeItems();" data-ng-show="id.length">\n				<i class="fa fa-upload"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only blue" data-ng-click="tagItems();" data-ng-show="id.length">\n				<i class="fa fa-tags"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only green" data-ng-click="openRoom(null, \'New Message\')">\n				<i class="fa fa-plus"></i>\n			</a>\n		</div>\n	</div>\n	<div class="portlet-title" data-ng-show="tags.length">\n		<!-- START TAGS -->\n		<div class="form-group">\n			<div class="row">\n				<div class="col-md-1">\n					<a href="#" class="btn btn-icon-only">\n						<i class="fa fa-tags" style="color: gray;"></i>\n					</a>\n				</div>\n				<div class="col-md-11">\n					<ui-select multiple data-ng-model="query.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)">\n						<ui-select-match placeholder="Search by tag...">{{$item}}</ui-select-match>\n						<ui-select-choices repeat="tag in tags | filter:$select.search">\n							{{tag}}\n						</ui-select-choices>\n					</ui-select>\n				</div>\n			</div>\n		</div>\n		<!-- END TAGS -->\n	</div>\n	<div class="portlet-body">\n		<!-- BEGIN UI-GRID SPINNER -->\n		<span us-spinner spinner-key="spinner-grid" spinner-start-active="false"></span>\n		<!-- END UI-GRID SPINNER -->\n\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" class="ui-grid" ui-grid-auto-resize ui-grid-pagination ui-grid-selection>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END Portlet PORTLET-->\n'),a.put("app/channels/mail/inbox/view/view.agents.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_AGENTS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TRANSPORT -->\n  <div class="form-group">\n    <form name="form" novalidate>\n      <!-- START TRANSPORT -->\n      <div class="form-group">\n        <ui-select multiple name="agents" data-ng-model="item.agents" theme="bootstrap">\n          <ui-select-match placeholder="{{\'APPLICATION_AGENTS\' | translate}}">{{$item.fullname}}</ui-select-match>\n          <ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n            {{agent.fullname}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n      <!-- END TRANSPORT -->\n    </form>\n  </div>\n  <!-- END TRANSPORT -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/mail/inbox/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-envelope"></i>\n					<a href="#">{{ \'APPLICATION_MAIL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-note"></i>\n					<a href="#">{{ \'APPLICATION_INBOX\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n	</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row inbox">\n	<div class="col-md-3">\n		<ul class="inbox-nav margin-bottom-10">\n			<li data-ng-class="{active: $stateParams.id == mailAccount.id}" data-ng-repeat="mailAccount in mailAccounts">\n				<a href="/channels/mail/inbox/view/account/{{mailAccount.id}}/list" class="btn">\n					<i class="icon-notebook"></i> {{mailAccount.name}}\n				</a>\n				<b></b>\n			</li>\n		</ul>\n	</div>\n\n	<div class="col-md-9" data-ng-init="initView()">\n		<!-- BEGIN PROFILE CONTENT -->\n		<div class="room-content">\n			<div ui-view>\n				<div class="note note-info">\n					<h4 class="block">Info! {{\'APPLICATION_NO_ACCOUNT_SELECTED\' | translate}}</h4>\n				</div>\n			</div>\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n\n</div>\n'),a.put("app/channels/mail/inbox/view/view.tags.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_TAGS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TRANSPORT -->\n  <div class="form-group">\n    <form name="form" novalidate>\n      <!-- START TAGS -->\n      <div class="form-group">\n        <ui-select multiple data-ng-model="item.tags" theme="bootstrap">\n          <ui-select-match placeholder="{{\'APPLICATION_TAGS\' | translate}}">{{$item}}</ui-select-match>\n          <ui-select-choices repeat="tag in tags | filter: $select.search">\n            {{tag}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n      <!-- END TAGS -->\n    </form>\n  </div>\n  <!-- END TRANSPORT -->\n</div>\n<div class="modal-footer">\n  <button type="button" class="btn" data-ng-class="button.class" data-ng-click="button.click()"data-ng-repeat="button in modal.buttons">{{button.text | translate}}</button>\n  <!-- <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button> -->\n</div>\n'),a.put("app/channels/mail/inbox/view/view.templates.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_TEMPLATES\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <div class="note note-info" data-ng-show="!templates.length">\n    <h4 class="block">Info!</h4>\n    <p>\n      {{\'MESSAGE_NO_TEMPLATES_AVAILABLE\' | translate}}\n    </p>\n  </div>\n  <form name="form" data-ng-show="templates.length" novalidate>\n    <div class="form-group">\n      <ui-select data-ng-model="item.template" theme="bootstrap">\n        <ui-select-match placeholder="Select a template in the list or search his name...">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="template in templates | propsFilter: {name: $select.search}">\n          <div ng-bind-html="template.name | highlight: $select.search"></div>\n          <small data-ng-show="template.description">\n            {{\'APPLICATION_DESCRIPTION\' | translate}}: {{template.description}}\n          </small>\n        </ui-select-choices>\n      </ui-select>\n    </div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="templates.length">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/mail/queue/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required />\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START STRATEGY -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.strategy.$touched || form.$submitted) && form.strategy.$invalid}">\n      <label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.strategy" name="strategy" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n        <ui-select-choices repeat="strategy in strategies | filter: $select.search">\n          <div ng-bind-html="strategy.toUpperCase() | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.strategy.$touched || form.$submitted) && form.strategy.$invalid && form.strategy.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END STRATEGY -->\n\n    <!-- START TIMEOUT -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.timeout.$touched || form.$submitted) && form.timeout.$invalid}">\n      <label class="control-label">{{\'APPLICATION_AGENT_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="number" min="0" name="timeout" placeholder="Timeout" class="form-control" data-ng-model="item.timeout" required min="1"/>\n      <span data-ng-show="(form.timeout.$touched || form.$submitted) && form.timeout.$invalid && form.timeout.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TIMEOUT -->\n\n    <!-- START AGENTS-->\n    <div class="form-body" data-ng-init="getTeams()">\n      <label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n      <div class="input-group input-small mbottom20">\n        <input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="item.penalty" readonly>\n        <div class="spinner-buttons input-group-btn btn-group-vertical">\n          <button type="button" class="btn spinner-up btn-xs blue" data-ng-click="item.penalty=item.penalty+1">\n            <i class="fa fa-angle-up"></i>\n          </button>\n          <button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!item.penalty" data-ng-click="item.penalty=item.penalty-1">\n            <i class="fa fa-angle-down"></i>\n          </button>\n        </div>\n      </div>\n      <div class="form-group last">\n        <div class="col-md-12" id="multi-select-team">\n        </div>\n      </div>\n    </div>\n    <!-- END AGENTS-->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/mail/queue/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-envelope"></i>\n						<a href="#">{{ \'APPLICATION_MAIL\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-docs"></i>\n						<a href="#">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_QUEUES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group" data-ng-if="Auth.isAdmin()">\n						<a class="btn green-jungle" href="#" data-ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_QUEUE\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n						<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/mail/queue/view/view.agents.html",'<div class="row" data-ng-init="getTeams()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="note note-warning" data-ng-hide="teams.length">\n				<h4 class="block">Warning!</h4>\n				<p>\n					 {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\n				</p>\n			</div>\n			<div class="portlet-body">\n				<!-- BEGIN FORM-->\n				<form action="index.html" class="form-horizontal form-row-seperated">\n					<div class="form-body">\n						<label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n						<div class="input-group input-small mbottom20">\n							<input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="queue.penalty" readonly>\n							<div class="spinner-buttons input-group-btn btn-group-vertical">\n								<button type="button" class="btn spinner-up btn-xs blue" data-ng-click="queue.penalty=queue.penalty+1">\n									<i class="fa fa-angle-up"></i>\n								</button>\n								<button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!queue.penalty" data-ng-click="queue.penalty=queue.penalty-1">\n									<i class="fa fa-angle-down"></i>\n								</button>\n							</div>\n						</div>\n						<div class="form-group last">\n							<div class="col-md-12" id="multi-select-team">\n							</div>\n						</div>\n					</div>\n				</form>\n				<!-- END FORM-->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/mail/queue/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getQueue()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-envelope"></i>\n					<a href="#">{{ \'APPLICATION_MAIL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/channels/mail/queues/list">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					<i data-ng-show="queue" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="queue">\n					<a href="#">{{queue.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/queue.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{queue.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n					{{user.role}}\n				</div> -->\n			</div>\n			<!-- END SIDEBAR USER TITLE -->\n\n			<!-- SIDEBAR MENU -->\n			<div class="profile-usermenu">\n				<ul class="nav">\n					<li data-ng-class="{active: $state.is(\'main.channels.mail.queues.view.settings\')}">\n						<a data-ng-href="/channels/mail/queues/view/{{queue.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.channels.mail.queues.view.agents\')}" data-ng-show="Auth.getCurrentUser().role === \'admin\'">\n							<a data-ng-href="/channels/mail/queues/view/{{queue.id}}/agents">\n								<i class="icon-people"></i>\n								{{ \'APPLICATION_AGENTS\' | translate}} </a>\n							</li>\n						</ul>\n					</div>\n					<!-- END MENU -->\n				</div>\n				<!-- END PORTLET main.channels -->\n			</div>\n			<!-- END BEGIN PROFILE SIDEBAR -->\n			<!-- BEGIN PROFILE CONTENT -->\n			<div ui-view class="profile-content">\n			</div>\n			<!-- END PROFILE CONTENT -->\n		</div>\n	</div>\n	<!-- END PAGE CONTENT-->\n'),a.put("app/channels/mail/queue/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.general" data-ng-submit="forms.general.$valid && updateMailQueue()" novalidate>\n					<!-- START NAME -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="queue.name" data-ng-pattern="settings.patternName" required />\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.pattern" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n						</span>\n					</div>\n					<!-- END NAME -->\n\n					<!-- START DESCRIPTION -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n						<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="queue.description"/>\n					</div>\n					<!-- END DESCRIPTION -->\n\n					<!-- START TIMEOUT -->\n					<div class="form-group">\n						<label class="control-label">Agent Timeout</label>\n						<input type="number" name="timeout" placeholder="Timeout" class="form-control" min="1" data-ng-model="queue.timeout"/>\n					</div>\n					<!-- END TIMEOUT -->\n\n					<!-- START STRATEGY -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.strategy.$touched || forms.general.$submitted) && forms.general.strategy.$invalid}">\n						<label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}</label>\n						<ui-select data-ng-model="queue.strategy" name="strategy" theme="bootstrap">\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n							<ui-select-choices repeat="strategy in strategies | filter: $select.search">\n								<div ng-bind-html="strategy.toUpperCase() | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n					</div>\n					<!-- END STRATEGY -->\n\n					<input data-ng-if="Auth.isAdmin()" class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/mail/realtime/view/agent/agent.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-tree-view ui-grid-expandable-row ui-grid-pagination ui-grid-auto-resize>\n			<span us-spinner spinner-key="grid-spinner" spinner-start-active="true"></span>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/mail/realtime/view/agent/agent.modal.info.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INTERFACE_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<div data-ng-if="agent.ipaddr" class="well">\n  <div>{{agent.ipaddr}}:{{agent.port}}</div>\n  <div>{{agent.fullcontact}}</div>\n  <div>{{agent.useragent}}</div>\n  <div>{{agent.lastms}}</div>\n</div>\n<div data-ng-if="!agent.ipaddr" class="alert alert-danger" role="alert">\n  {{\'MESSAGE_NO_AVAILABLE_INFO\' | translate}}\n</div>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/mail/realtime/view/agent/queue.modal.add.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_JOIN_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <div class="form-group row">\n  <label class="col-md-2 control-label" style="margin-top: 7px;">{{\'APPLICATION_QUEUE\' | translate}}:</label>\n  <div class="col-md-10">\n    <ui-select multiple ng-model="item.queues" theme="bootstrap" required>\n      <ui-select-match placeholder="{{\'APPLICATION_QUEUE\' | translate}}">{{$item.name}}</ui-select-match>\n      <ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n        <div ng-bind-html="queue.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n</div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/mail/realtime/view/application/application.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initApplications()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns class="ui-grid" ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/mail/realtime/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-envelope"></i>\n					<a href="#">{{ \'APPLICATION_MAIL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-energy"></i>\n					<a href="#">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<div>\n			<nav class="navbar navbar-default" role="navigation">\n				<div class="collapse navbar-collapse">\n					<ul class="nav navbar-nav">\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.mail.realtime.view.agents\')}">\n							<a href="/channels/mail/realtime/view/agents">\n								{{\'APPLICATION_AGENTS\' | translate}}\n							</a>\n						</li>\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.mail.realtime.view.applications\')}">\n							<a href="/channels/mail/realtime/view/applications">\n								{{\'APPLICATION_APPLICATIONS\' | translate}}\n							</a>\n						</li>\n					</ul>\n				</div>\n			</nav>\n		</div>\n\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/mail/realtime/view/view.queue.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div id="grid1" ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-tree-view class="grid">\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/openchannel/account/list/list.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-globe"></i>\n					<a href="#">{{ \'APPLICATION_OPEN_CHANNEL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="/channels/openchannel/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n	</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group">\n						<a class="btn btn-default" href="#" data-ng-click="gridOptions.getPage();">\n							<i class="icon-reload"></i>\n						</a>\n					</div>\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/channels/openchannel/accounts/wizard">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/openchannel/account/view/action/list/list.html",'<div class="row" data-ng-init="initActions()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACTIONS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/channels/openchannel/accounts/view/{{account.id}}/actions/wizard" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACTION\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),
+a.put("app/channels/openchannel/account/view/action/view/view.html",'\n<div class="row" data-ng-init="initAction()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }}</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.settings" ng-submit="updateItem()" novalidate>\n					<!-- START APP -->\n					<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n							<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n							<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n								<div ng-bind-html="app.name | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid && forms.settings.app.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END APP -->\n\n					<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n						<!-- START QUEUE -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$invalid}">\n							<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.OpenchannelQueueId" name="queue" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n									<div ng-bind-html="queue.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="queues.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/openchannel/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END QUEUE -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n						<!-- START AGENT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$invalid}">\n							<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n								<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n									<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="agents.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END AGENT -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n						<!-- START SENDMAIL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" min="1" required/>\n							<span data-ng-show="(forms.settings.from.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.mail.$touched || forms.settings.$submitted) && forms.settings.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.template.$touched || forms.settings.$submitted) && forms.settings.template.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n									<div ng-bind-html="template.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.template.$touched || forms.settings.$submitted) && forms.settings.template.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END SENDMAIL -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n						<!-- START SENDSms -->\n						<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n								<span data-ng-show="(forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid && forms.settings.to.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.text.$touched || forms.text.$submitted) && forms.settings.text.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<textarea id="text" class="form-control maxlength-handler" maxlength="160"  name="text" data-ng-model="application.data6" required></textarea>\n							<span data-ng-show="(forms.settings.text.$touched || forms.settings.$submitted) && forms.settings.text.$invalid && forms.settings.text.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<!-- END SENDSms -->\n					</div>\n\n					<!-- START INTERVAL_TYPE -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n							<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n								{{ intType.name | translate }}\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END INTERVAL_TYPE -->\n\n					<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n						<!-- START TIME -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n							<div class="input-group input-large">\n								<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n									<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n								</fieldset>\n								<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n								<fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n								<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n							</div>\n						</div>\n						<!-- END TIME -->\n\n						<!-- START ALWAYS -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n							<div class="input-group input-large">\n								<label class="control-label pointer-cursor">\n									<input\n										bs-switch\n										data-ng-model="application.alwaysTime"\n										type="checkbox"\n										switch-active="{{ isActive }}"\n										switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n										switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n										switch-on-color="{{ onColor }}"\n										switch-off-color="{{ offColor }}"\n										switch-animate="{{ animate }}"\n										switch-size="{{ size }}"\n										switch-label="{{ label }}"\n										switch-icon="{{ icon }}"\n										switch-radio-off="{{ radioOff }}"\n										switch-label-width="{{ labelWidth }}"\n										switch-handle-width="{{ handleWidth }}">\n									<!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n								</label>\n							</div>\n						</div>\n						<!-- END ALWAYS -->\n\n						<!-- START WEEKDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END WEEKDAY -->\n\n						<!-- START MONTHDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTHDAY -->\n\n						<!-- START MONTH -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTH -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n						<!-- START INTERVALS -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$invalid}">\n							<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n									{{ interval.name}}\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="intervals.length">\n								<h4 class="block">Warning!</h4>\n								<p>\n									{{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n								</p>\n								<p>\n									{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n								</p>\n							</div>\n							<span data-ng-show="(forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END INTERVALS -->\n\n					</div>\n					<button class="btn green-haze" type="submit">{{\'APPLICATION_UPDATE\' | translate}}</button>\n				</form>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/openchannel/account/view/action/wizard/wizard.html",'<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n					<wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.action.$valid)">\n						<form name="forms.action" novalidate>\n							<!-- START APP -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.action.$submitted && forms.action.app.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n									<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n										<div ng-bind-html="app.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="forms.action.$submitted && forms.action.app.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END APP -->\n\n							<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n								<!-- START AGENT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$invalid}">\n									<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n										<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n											<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="agents.length">\n										<h4 class="block">Warning!</h4>\n										<p>\n											{{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n										</p>\n										<p>\n											{{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n										</p>\n									</div>\n									<span data-ng-show="(forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END AGENT -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n								<!-- START QUEUE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$invalid}">\n									<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.ChatQueueId" name="queue" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n											<div ng-bind-html="queue.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="queues.length">\n										<h4 class="block">Warning!</h4>\n										<p>\n											{{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n										</p>\n										<p>\n											{{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/openchannel/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n										</p>\n									</div>\n									<span data-ng-show="(forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END QUEUE -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n								<!-- START SENDMAIL -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" min="1" required/>\n										<span data-ng-show="(forms.action.from.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.mail.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n											<div ng-bind-html="template.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END SENDMAIL -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n								<!-- START SENDSms -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n										<span data-ng-show="(forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid && forms.action.to.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<textarea id="text" class="form-control maxlength-handler"  maxlength="160" name="text" data-ng-model="application.data6" required></textarea>\n									<span data-ng-show="(forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid && forms.action.text.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<!-- END SENDSms -->\n							</div>\n\n							<!-- START INTERVAL_TYPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n										{{ intType.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END INTERVAL_TYPE -->\n\n							<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n								<!-- START TIME -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n									<div class="input-group input-large">\n										<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n											<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n										</fieldset>\n										<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n										<fieldset ng-disabled="application.alwaysTime">\n											<uib-timepicker name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n										</fieldset>\n										<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n									</div>\n								</div>\n								<!-- END TIME -->\n\n								<!-- START ALWAYS -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n									<div class="input-group input-large">\n										<label class="control-label pointer-cursor">\n											<input\n												bs-switch\n												data-ng-model="application.alwaysTime"\n												type="checkbox"\n												switch-active="{{ isActive }}"\n												switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n												switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n												switch-on-color="{{ onColor }}"\n												switch-off-color="{{ offColor }}"\n												switch-animate="{{ animate }}"\n												switch-size="{{ size }}"\n												switch-label="{{ label }}"\n												switch-icon="{{ icon }}"\n												switch-radio-off="{{ radioOff }}"\n												switch-label-width="{{ labelWidth }}"\n												switch-handle-width="{{ handleWidth }}">\n											<!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n										</label>\n									</div>\n								</div>\n								<!-- END ALWAYS -->\n\n								<!-- START WEEKDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END WEEKDAY -->\n\n								<!-- START MONTHDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTHDAY -->\n\n								<!-- START MONTH -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTH -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n								<!-- START INTERVALS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$invalid}">\n									<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n											{{ interval.name}}\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="intervals.length">\n										<h4 class="block">Warning!</h4>\n										<p>\n											{{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n										</p>\n										<p>\n											{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n										</p>\n									</div>\n									<span data-ng-show="(forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERVALS -->\n\n							</div>\n\n							<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONTINUE\' | translate}}" />\n						</form>\n					</wz-step>\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONFIRM\' | translate}}" />\n					</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/channels/openchannel/account/view/api/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_API\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<div class="tab-pane active" id="tab_1_1">\n							<!-- START API -->\n							<div  class="row" >\n									<div class="col-md-12">\n										<label class="control-label">Receive URL</label>\n									</div>\n								</div>\n							<div   class="row" >\n									<div class="col-md-11">\n										<code-mirror  model="receiveurl"></code-mirror>\n									</div>\n									<div class="col-md-1">\n										<a class="btn btn-sm green-jungle" data-ng-click="copyToClipboard(receiveurl);"><i class="fa fa-clipboard"></i>\n										</a>\n									</div>\n							</div>\n							<!-- END API -->\n					</div>\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/openchannel/account/view/disposition/modal/add.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_DISPOSITIONS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.form.$touched || form.$submitted) && form.form.$invalid}">\n      <div class="">\n        <input type="text" name="form" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" class="form-control" data-ng-model="name" required/>\n        <span data-ng-show="form.form.$touched && form.form.$error.required" class="help-block help-block-error">\n          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n        </span>\n      </div>\n    </div>\n    <!-- END NAME -->\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="form.$valid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/openchannel/account/view/disposition/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DISPOSITIONS\' | translate}}</span>\n				</div>\n				<div class="actions actions-md">\n					<a href="#" class="btn btn-icon-only green" data-ng-click="addDisposition();">\n						<i class="fa fa-plus"></i>\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n				<div class="tab-content">\n					<div class="row" data-ng-hide="dispositions.length">\n						<div class="col-md-12">\n							<div class="note note-info">\n								<h4 class="block">Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}</h4>\n							</div>\n						</div>\n					</div>\n\n					<!-- GENERAL TAB -->\n					<div class="row" data-ng-repeat="disposition in dispositions">\n						<div class="col-md-12 form-group">\n							<div class="input-group">\n								<div>\n									<input class="form-control" type="text" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" data-ng-model="disposition.name">\n								</div>\n								<span class="input-group-btn">\n									<button class="btn btn-success" type="button" data-ng-click="updateDisposition(disposition.id, disposition.name);"><i class="fa fa-cloud-upload fa-fw"></i> {{\'APPLICATION_UPDATE\' | translate}}</button>\n									<button class="btn btn-danger" type="button" data-ng-click="deleteDisposition(disposition.id);"><i class="fa fa-times fa-fw"></i> {{\'APPLICATION_DELETE\' | translate}}</button>\n								</span>\n							</div>\n						</div>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/openchannel/account/view/hooks/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_HOOKS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SEND\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_ACCEPT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_REJECT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_4" data-toggle="tab">{{\'APPLICATION_CLOSE\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- START REPLY TAB -->\n					<div class="tab-pane  active" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItem()" novalidate>\n							<div  class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.info.method.$touched || forms.info.$submitted) && forms.info.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.replyMethod" name="method" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search" >\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.info.method.$touched || forms.info.$submitted) && forms.info.method.$invalid && forms.info.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.info.url.$touched || forms.info.$submitted) && forms.info.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.replyUrl"   ng-required="account.replyMethod"/>\n									<span data-ng-show="(forms.info.url.$touched || forms.info.$submitted) && forms.info.url.$invalid && forms.info.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END REPLY TAB -->\n\n					<!-- START ACCEPT TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.accept" data-ng-submit="forms.accept.$valid && updateItem()" novalidate>\n								<div class="row">\n									<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid}">\n										<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n										<ui-select data-ng-model="account.acceptMethod" name="method" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n											<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n												<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n											</ui-select-choices>\n										</ui-select>\n										<span data-ng-show="(forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid && forms.accept.method.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<div  class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid}">\n										<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n										<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.acceptUrl"  ng-required="account.acceptMethod"/>\n										<span data-ng-show="(forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid && forms.accept.url.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n								<!-- START ACTIONS-->\n								<div class="row" ng-repeat = "action in account.actions">\n									<div  ng-switch="action.action">\n											<div ng-switch-when="pause">\n												<div  class="form-group col-md-4">\n													<label class="control-label">{{\'APPLICATION_PAUSE\' | translate}}</label></br>\n														<input\n														bs-switch\n														data-ng-change="resetActionData(action)"\n														data-ng-model="action.enabled"\n														type="checkbox"\n														switch-active="{{ isActive }}"\n														switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n														switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n														switch-on-color="{{ onColor }}"\n														switch-off-color="{{ offColor }}"\n														switch-animate="{{ animate }}"\n														switch-size="{{ size }}"\n														switch-label="{{ label }}"\n														switch-icon="{{ icon }}"\n														switch-radio-off="{{ radioOff }}"\n														switch-label-width="{{ labelWidth }}"\n														switch-handle-width="{{ handleWidth }}">\n													</div>\n													<div ng-if="action.enabled" class="form-group col-md-8">\n														<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}</label>\n														<ui-select  name="action" data-ng-model="action.type"  theme="bootstrap" >\n															<ui-select-match placeholder="{{\'APPLICATION_TYPE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n															<ui-select-choices repeat=" pause.name as pause in pauses | filter: $select.search">\n																<div ng-bind-html="pause.name | highlight: $select.search | uppercase" ></div>\n															</ui-select-choices>\n														</ui-select>\n													</div>\n											</div>\n										</div>\n									</div>\n								<!-- END ACTION -->\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ACCEPT TAB -->\n					<!-- START REJECT TAB -->\n					<div class="tab-pane" id="tab_1_3">\n						<form name="forms.reject" data-ng-submit="forms.reject.$valid && updateItem()" novalidate>\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.rejectMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid && forms.reject.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.rejectUrl" ng-required="account.rejectMethod"/>\n									<span data-ng-show="(forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid && forms.reject.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END REJECT TAB -->\n					<!-- START CLOSE TAB -->\n					<div class="tab-pane" id="tab_1_4">\n						<form name="forms.close" data-ng-submit="forms.close.$valid && updateItem()" novalidate>\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.closeMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid && forms.close.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.closeUrl" ng-required="account.closeMethod"/>\n									<span data-ng-show="(forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid && forms.close.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CLOSE TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/openchannel/account/view/setting/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItem()" novalidate>\n							<!-- START ID -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ID\' | translate}}<span class="required" aria-required="true">*</span>\n								</label>\n								<input type="text" name="id" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.id" ng-disabled="true" required/>\n							</div>\n							<!-- END ID-->\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid && forms.info.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n							<!-- START LIST -->\n							<div class="form-group" data-ng-if="license.cm">\n								<label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n									<div class="input-group">\n\n										<ui-select data-ng-model="account.ListId" name="list" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_LIST\' | translate}}">{{$select.selected.name}}</ui-select-match>\n											<ui-select-choices repeat="list.id as list in lists | filter: $select.search">\n												<div ng-bind-html="list.name | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n\n										<span class="input-group-btn">\n											<button type="button" data-ng-click="account.ListId = null" class="btn btn-default">\n												<span class="glyphicon glyphicon-trash"></span>\n											</button>\n										</span>\n\n									</div>\n							</div>\n							<!-- END LIST -->\n							<!-- START FIDELITY -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_FIDELITY\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="account.fidelity"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END FIDELITY -->\n\n							<!-- START TIMEOUT -->\n							<div class="form-group" data-ng-if="account.fidelity" data-ng-class="{\'has-error\': (forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" name="timeout" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="account.timeout" required/>\n								<span data-ng-show="(forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid && forms.info.timeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid && forms.info.timeout.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIMEOUT -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<!-- START CUSTOM -->\n							<!-- <div  class="form-group">\n								<label class="control-label">{{\'APPLICATION_REPLY\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="account.reply"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div> -->\n							<!-- START REPLY HOOK -->\n							<!-- <div  ng-if= "account.reply" class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.info.method.$touched || forms.info.$submitted) && forms.info.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.replyMethod" name="method" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search" >\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.info.method.$touched || forms.info.$submitted) && forms.info.method.$invalid && forms.info.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.info.url.$touched || forms.info.$submitted) && forms.info.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.replyUrl"  required/>\n									<span data-ng-show="(forms.info.url.$touched || forms.info.$submitted) && forms.info.url.$invalid && forms.info.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div> -->\n							<!-- START REPLY HOOK -->\n							<!-- END CUSTOM -->\n\n							<!-- START REMOTE IP -->\n							<div  class="form-group" data-ng-class="{\'has-error\': (forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remote" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remote" required/>\n								<span class="help-block help-block-info">\n									{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n								</span>\n								<span data-ng-show="(forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid && forms.info.remote.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END REMOTE IP -->\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/openchannel/account/view/view.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-globe"></i>\n					<a href="#">{{ \'APPLICATION_OPEN_CHANNEL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="/channels/openchannel/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n					<i class="fa fa-angle-right" data-ng-show="account"></i>\n				</li>\n				<li data-ng-show="account">\n					<a href="#">{{ account.description || account.name }}</a>\n				</li>\n			</ul>\n		</div>\n\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img ng-src="assets/images/media/account.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ account.description || account.name }}\n					</div>\n					<div class="profile-usertitle-job">\n						{{account.email}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li ng-class="{active: $state.is(\'main.channels.openchannel.accounts.view.settings\')}">\n							<a href="/channels/openchannel/accounts/view/{{account.id}}/settings">\n							<i class="icon-settings"></i>\n							{{\'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.openchannel.accounts.view.api\')}">\n							<a href="/channels/openchannel/accounts/view/{{account.id}}/api">\n							<i class="fa fa-external-link"></i>\n							{{\'APPLICATION_API\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.openchannel.accounts.view.hooks\')}">\n							<a href="/channels/openchannel/accounts/view/{{account.id}}/hooks">\n							<i class="fa fa-code"></i>\n							{{\'APPLICATION_HOOKS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.openchannel.accounts.view.dispositions\')}">\n							<a href="/channels/openchannel/accounts/view/{{account.id}}/dispositions">\n							<i class="icon-target"></i>\n							{{\'APPLICATION_DISPOSITIONS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.includes(\'main.channels.openchannel.accounts.view.actions\')}">\n							<a href="/channels/openchannel/accounts/view/{{account.id}}/actions/list">\n							<i class="icon-directions"></i>\n							{{\'APPLICATION_ACTIONS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<div ui-view class="profile-content"></div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n<!-- END PAGE CONTENT-->\n</div>\n'),a.put("app/channels/openchannel/account/wizard/wizard.html",'\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN PAGE HEADER-->\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-globe"></i>\n					<a href="#">{{ \'APPLICATION_OPEN_CHANNEL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="/channels/openchannel/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n		<!-- END PAGE HEADER-->\n\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n	        <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="formValidation(forms.info.$valid)">\n							<form name="forms.info" novalidate>\n								<!-- START NAME -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n									<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n									<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid && forms.info.name.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END NAME -->\n\n								<!-- START DESCRIPTION -->\n								<div class="form-group">\n									<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n									<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n								</div>\n								<!-- END DESCRIPTION -->\n								<!-- START REMOTE IP -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid}">\n									<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="url" name="remote" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remote" required/>\n									<span class="help-block help-block-info">\n										{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n									</span>\n									<span data-ng-show="(forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid && forms.info.remote.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END REMOTE IP -->\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n							</form>\n						</wz-step>\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/channels/openchannel/inbox/message/info.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body"  data-ng-init="initInfo()" style=" overflow-x: auto;" >\n  <div  data-ng-if="data" >\n    <json-formatter json="data" open="1"></json-formatter>\n  </div>\n  <div class="note note-warning" data-ng-hide="data">\n    <p>\n      {{ \'MESSAGE_NO_INFO_AVAILABLE\' | translate }}\n    </p>\n  </div>\n\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/openchannel/inbox/message/message.html",'<div class="message">\n  <div class="row">\n    <div class="col-md-6">\n        <!-- <span data-ng-if="Message.from" class="bold">From: {{Message.from}} </span>\n        <br>\n        <span data-ng-if="Message.to" class="bold">To: {{Message.to}} </span>\n        <br> -->\n        <div class="row" ng-if="Message.from">\n          <div class="col-md-12">\n            <span data-ng-if="Message.from" class="bold">From: {{Message.from}} </span>\n          </div>\n        </div>\n        <div class="row" ng-if="Message.to">\n          <div class="col-md-12">\n            <span data-ng-if="Message.to" class="bold">To: {{Message.to}} </span>\n          </div>\n        </div>\n        <div class="row" ng-if="Message.name">\n          <div class="col-md-12">\n            <span   class="bold">Name: {{Message.name}}</span>\n          </div>\n        </div>\n        <div class="row" ng-if="Message.phone">\n          <div class="col-md-12">\n            <span  class="bold">Phone: <a href="" data-ng-click="openContact(\'phone\',Message.phone)">{{Message.phone}}</a></span>\n          </div>\n        </div>\n        <div class="row" ng-if="Message.email">\n          <div class="col-md-12">\n            <span  class="bold">Email: <a href="" data-ng-click="openContact(\'email\',Message.email)">{{Message.email}}</a></span>\n          </div>\n        </div>\n    </div>\n    <div class="col-md-6">\n      <span class="pull-right" data-ng-if="Message.User">{{\'APPLICATION_SENT_BY\' | translate}}: <strong>{{Message.User.fullname}}</strong></span>\n    </div>\n  </div>\n  <br>\n  <span class="todo-tasklist-date">\n    <span class="pull-right" data-ng-switch="Message.status">\n      <a ng-switch-when="RECEIVED" href="#" class="btn default btn-xs inactive-link green-stripe"> {{Message.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n      <a ng-switch-when="SENT" href="#" class="btn default btn-xs inactive-link green-stripe"> {{Message.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n      <a ng-switch-when="DELIVERED" href="#" class="btn default btn-xs inactive-link green-stripe"> {{Message.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n      <a ng-switch-when="SENDING" href="#" class="btn default btn-xs inactive-link blue-stripe" > {{Message.status | uppercase}}\n        <i class="fa fa-warning"></i>\n      </a>\n      <a ng-switch-when="FAILED" href="#" class="btn default btn-xs red-stripe" data-ng-click="info(Message.res_data)"> {{Message.status | uppercase}}\n        <i class="fa fa-times"></i>\n      </a>\n      <a ng-switch-default href="#" class="btn default btn-xs"> {{Message.status | uppercase}}\n      </a>\n      <br>\n    </span>\n\n    <i class="icon-calendar"></i> <span am-time-ago="Message.updatedAt"></span>\n  </span>\n  <hr>\n  <ng-emoticons emoticons-data="Message.body"></ng-emoticons>\n  <!-- <span class="body text-left" data-ng-bind-html="Message.body" style="white-space: pre-wrap;"></span> -->\n  </div>\n'),a.put("app/channels/openchannel/inbox/room/room.directive.html",'<!-- BEGIN TODO CONTENT -->\n\n<div class="todo-content">\n	<div class="portlet light">\n		<div class="portlet-title">\n			<div class="caption">\n				<button class="btn btn-sm btn-default green-meadow" data-ng-if="Room.status !== \'CLOSED\'" data-ng-disabled="!form.body || forms.compose.from.$invalid || forms.compose.to.$invalid" data-ng-click="sendMessage()">\n					<i class="icon-paper-plane" style="color: white;"></i> {{\'APPLICATION_SEND\' | translate}}\n				</button>\n				<span data-ng-show="Room && Room.status !== \'CLOSED\'"> | </span>\n				<span data-ng-show="Room" class="label label-default">#{{Room.id}} {{Room.status}}</span>\n				<span data-ng-if="Room && Room.ParentId"> | </span>\n				<span data-ng-if="Room && Room.ParentId" class="label label-warning"> Ref: <a data-ng-click="openRoom(Room.ParentId,Room.contact)">#{{Room.ParentId}}</a></span>\n			</div>\n			<div class="actions" data-ng-switch="Room.status">\n				<button class="btn btn-icon-only" data-ng-show="Room"  data-ng-class="{\'btn-success\':Room.status !== \'CLOSED\',\'grey-cascade\':Room.status === \'CLOSED\'}" data-ng-click="closeRoom(Room.id)"  data-ng-disabled="Room.status === \'CLOSED\' && Room.disposition">\n					<i data-ng-class="{\'fa fa-upload\':Room.status !== \'CLOSED\',\'icon-target\':Room.status === \'CLOSED\'}"></i>\n				</button>\n				<button  class="btn default btn-icon-only" data-ng-if="Room && Room.status !== \'CLOSED\'" type="button" data-ng-click="togglePanelLeft()" title="{{\'APPLICATION_RESIZE\' | translate}}">\n					<i  ng-class="panelRight == \'col-md-12\' ? \'icon-size-actual\' : \'icon-size-fullscreen\'"></i>\n				</button>\n			</div>\n		</div>\n		<div class="portlet-body">\n			<div class="row">\n				<div data-ng-show="panelLeft" data-ng-class="panelLeft">\n					<div class="form">\n						<!-- START TAGS -->\n						<div class="form-group" data-ng-if="Room.status !== \'CLOSED\' || (Room.status == \'CLOSED\' && form.tags.length)">\n							<div class="row">\n								<div class="col-md-1">\n									<a href="#" class="btn btn-icon-only">\n										<i class="fa fa-tags" style="color: gray;"></i>\n									</a>\n								</div>\n								<div class="col-md-11">\n									<ui-select data-ng-disabled="Room.status == \'CLOSED\'"  multiple data-ng-model="form.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)">\n										<ui-select-match placeholder="Tags...">{{$item}}</ui-select-match>\n										<ui-select-choices repeat="tag in tags | filter:$select.search" class="">\n											{{tag}}\n										</ui-select-choices>\n									</ui-select>\n								</div>\n							</div>\n						</div>\n						<!-- END TAGS -->\n					</div>\n					<hr data-ng-if="Room && Room.status !== \'CLOSED\'">\n\n					<div ng-scrollbars ng-scrollbars-config="{\n						autoHideScrollbar: false,\n						theme: \'light\',\n						advanced: {\n							updateOnContentResize: true\n						},\n						setHeight: 781,\n						scrollInertia: 0\n					}">\n						<ul class="chats">\n							<li data-ng-switch="Room.status" data-ng-class="{\'in\': Message.status == \'RECEIVED\', \'out\': Message.status == \'SENT\' || Message.status == \'SENDING\' || Message.status == \'FAILED\' || Message.status == \'NOTE\'  || Message.status == \'DELIVERED\' || Message.status == \'QUEUED\' ||  Message.status != \'RECEIVED\' }" data-ng-repeat="Message in Room.OpenchannelMessages | orderBy:\'-createdAt\'">\n								<!-- <img class="avatar" alt="" data-ng-src="api/users/avatar/{{getCurrentUser().userpic && smsMessage.status === \'SENT\' ? getCurrentUser().userpic : \'unknown_avatar\'}}"> -->\n								<!-- <note message="smsMessage" ng-switch-when="NOTE"></note> -->\n								<div class="avatar" data-ng-class="Message.UserId ? \'pretty-avatar\' : \'pretty-avatar-v\'">\n									<ng-letter-avatar\n									data-ng-if="Message.UserId"\n									height="40"\n									width="40"\n									fontsize="25"\n									data="{{Message.User.fullname}}"\n									avatarcustombgcolor="#B0B0B0"\n									avatarcustomborder="border:2px solid #3399CC"\n									charCount="2"\n									shape="round"></ng-letter-avatar>\n									<ng-letter-avatar\n									data-ng-if="!Message.UserId"\n									height="40"\n									width="40"\n									fontsize="25"\n									data="{{Message.from}}"\n									avatarcustombgcolor="#B0B0B0"\n									avatarcustomborder="border:2px solid #EA4C61"\n									charCount="1"\n									shape="round"></ng-letter-avatar>\n								</div>\n								<message message="Message" list-id="Room.OpenchannelAccount.ListId"  ng-switch-default></message>\n							</li>\n						</ul>\n					</div>\n				</div>\n				<div data-ng-class="panelRight">\n\n					<div class="note note-info" data-ng-if="Room && Room.status == \'CLOSED\'">\n						<h4 class="block">Info! {{\'MESSAGE_ROOM_CLOSED\' | translate}}</h4>\n						<p>\n							{{\'MESSAGE_ROOM_CLOSED_DETAILS\' | translate}}.\n						</p>\n						<hr>\n						<p>\n							<i class="icon-target"></i> {{\'APPLICATION_DISPOSITION\' | translate}}: <strong>{{Room.disposition}}</strong>\n						</p>\n						<p>\n							<i class="icon-calendar"></i> {{\'APPLICATION_UPDATED_AT\' | translate}}: <strong>{{Room.updatedAt | date:\'medium\'}}</strong> (<span am-time-ago="Room.updatedAt"></span>)\n						</p>\n					</div>\n					<form  name="forms.compose" data-ng-submit="forms.compose.$valid" class="form-horizontal" novalidate>\n						<!-- START HEAD -->\n						<div class="form">\n\n							<!-- START FROM -->\n									<div class="form-group" data-ng-class="{\'has-error\': forms.compose.from.$invalid && forms.compose.$submitted}" data-ng-if="Room.status !== \'CLOSED\'">\n										<div class="col-md-12">\n											<div class="row">\n												<div class="col-md-1">\n													<label class="control-label">From:</label>\n												</div>\n												<div class="col-md-11">\n													<ui-select  data-ng-disabled="Room"  theme="bootstrap" name="from" data-ng-model="form.from" required>\n														<ui-select-match placeholder="From...">{{$select.selected.name}}</ui-select-match>\n														<ui-select-choices repeat="Account.name as Account in Accounts | filter: $select.search">\n															<div data-ng-bind-html="Account.name | highlight: $select.search"></div>\n															<small data-ng-bind-html="Account.name | highlight: $select.search"></small>\n														</ui-select-choices>\n													</ui-select>\n													<span data-ng-show="forms.compose.from.$invalid && forms.compose.$submitted " class="help-block help-block-error">\n														<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n													</span>\n												</div>\n											</div>\n										</div>\n									</div>\n									<!-- END FROM -->\n							<!-- START TO -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.compose.to.$invalid && forms.compose.$submitted}" data-ng-if="Room.status !== \'CLOSED\'">\n\n								<div class="col-md-12">\n									<div class="row">\n										<div class="col-md-1">\n											<label class="control-label">To:</label>\n										</div>\n										<div class="col-md-11">\n											<input type="text"   name="to" class="form-control todo-taskbody-taskdesc" placeholder="To..." rows="8"   data-ng-disabled="Room" data-ng-model="form.to" required>\n											<span data-ng-show="forms.compose.to.$invalid && forms.compose.$submitted " class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n									</div>\n								</div>\n							</div>\n							<!-- END TO -->\n							<!-- START CANNED -->\n							<div class="form-group"  data-ng-if="Room.status !== \'CLOSED\'">\n								<div class="row">\n									<div class="col-md-1">\n										<a href="#" class="btn btn-icon-only">\n											<i class="fa fa-magic" style="color: gray;"></i>\n										</a>\n									</div>\n									<div class="col-md-11">\n										<input  type="text"\n										data-ng-model="modelOptions.selectedAnswer"\n										uib-typeahead="key for key in getAnswers($viewValue)"\n										placeholder="Canned answers.."\n										typeahead-loading="loadingLocations"\n										typeahead-no-results="noResults"\n										typeahead-on-select="onSelect($item)"\n										class="form-control">\n										<i ng-show="loadingLocations" class="glyphicon glyphicon-refresh"></i>\n										<div ng-show="noResults">\n											<i class="glyphicon glyphicon-remove"></i> No Results Found\n										</div>\n									</div>\n								</div>\n\n							</div>\n							<!-- END CANNED -->\n							<!-- START message -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.compose.body.$invalid && forms.compose.$submitted}" data-ng-if=" Room.status !== \'CLOSED\'">\n								<div class="col-md-12">\n									<textarea id="text" class="form-control maxlength-handler" rows="8"  name="body" data-ng-model="form.body"></textarea>\n									<span data-ng-show="forms.compose.body.$invalid && forms.compose.$submitted " class="help-block help-block-error">\n'+"										<strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n									</span>\n								</div>\n							</div>\n\n							<!-- END message -->\n						</div>\n					</form>\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n<!-- END TODO CONTENT -->\n"),a.put("app/channels/openchannel/inbox/view/account/list/list.html",'<!-- BEGIN Portlet PORTLET-->\n<div class="portlet light" data-ng-init="initView()">\n	<div class="portlet-title">\n		<div class="caption">\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'NEW\'" uib-uncheckable>NEW</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'OPEN\'" uib-uncheckable>OPEN</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'PENDING\'" uib-uncheckable>PENDING</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'CLOSED\'" uib-uncheckable>CLOSED</button>\n			</div>\n		</div>\n		<div class="actions">\n			<a href="#" class="btn btn-icon-only default" data-ng-click="getPage();">\n				<i class="fa fa-refresh"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only red" data-ng-click="deleteItems();" data-ng-show="id.length && isAdmin">\n				<i class="fa fa-trash"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only blue" data-ng-click="tagItems();" data-ng-show="id.length">\n				<i class="fa fa-tags"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only green" data-ng-click="openRoom(null, \'New Message\')">\n				<i class="fa fa-plus"></i>\n			</a>\n		</div>\n	</div>\n	<div class="portlet-title" data-ng-show="tags.length">\n		<!-- START TAGS -->\n		<div class="form-group">\n			<div class="row">\n				<div class="col-md-1">\n					<a href="#" class="btn btn-icon-only">\n						<i class="fa fa-tags" style="color: gray;"></i>\n					</a>\n				</div>\n				<div class="col-md-11">\n					<ui-select multiple data-ng-model="query.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)">\n						<ui-select-match placeholder="Search by tag...">{{$item}}</ui-select-match>\n						<ui-select-choices repeat="tag in tags | filter:$select.search">\n							{{tag}}\n						</ui-select-choices>\n					</ui-select>\n				</div>\n			</div>\n		</div>\n		<!-- END TAGS -->\n	</div>\n	<div class="portlet-body">\n		<!-- BEGIN UI-GRID SPINNER -->\n		<span us-spinner spinner-key="spinner-grid" spinner-start-active="false"></span>\n		<!-- END UI-GRID SPINNER -->\n\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid-inbox">\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END Portlet PORTLET-->\n'),a.put("app/channels/openchannel/inbox/view/view.agents.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_AGENTS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TRANSPORT -->\n  <div class="form-group">\n    <form name="form" novalidate>\n      <!-- START TRANSPORT -->\n      <div class="form-group">\n        <ui-select multiple name="agents" data-ng-model="item.agents" theme="bootstrap">\n          <ui-select-match placeholder="{{\'APPLICATION_AGENTS\' | translate}}">{{$item.fullname}}</ui-select-match>\n          <ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n            {{agent.fullname}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n      <!-- END TRANSPORT -->\n    </form>\n  </div>\n  <!-- END TRANSPORT -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/openchannel/inbox/view/view.html",'<div class="row">\n  <div class="col-md-12">\n    <div class="page-bar">\n      <ul class="page-breadcrumb">\n        <li>\n          <i class="icon-rocket"></i>\n          <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="fa fa-spinner"></i>\n          <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="icon-globe"></i>\n          <a href="#">{{ \'APPLICATION_OPEN_CHANNEL\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n					<i class="icon-note"></i>\n					<a href="/channels/openchannel/inbox/list">{{ \'APPLICATION_INBOX\' | translate }}</a>\n				</li>\n      </ul>\n    </div>\n  </div>\n</div>\n\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row inbox" data-ng-init="initView()">\n	<div class="col-md-3">\n		<ul class="inbox-nav margin-bottom-10">\n			<li data-ng-class="{active: $stateParams.id == Account.id}" data-ng-repeat="Account in Accounts">\n				<a href="/channels/openchannel/inbox/view/account/{{Account.id}}/list" class="btn">\n					<i class="icon-notebook"></i> {{Account.name}}\n				</a>\n        <b></b>\n			</li>\n		</ul>\n	</div>\n\n	<div class="col-md-9" >\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view>\n			<div class="note note-info">\n				<h4 class="block">Info! {{\'APPLICATION_NO_ACCOUNT_SELECTED\' | translate}}</h4>\n			</div>\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/openchannel/inbox/view/view.status.modal.html",'<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title | translate" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p ng-if="modal.text && !closed" ng-bind="modal.text | translate"></p>\n  <form name="form" novalidate data-ng-init="initDisposition()">\n  <div class="form-group">\n    <ui-select data-ng-model="item.disposition" name="list" theme="bootstrap" data-ng-disabled="!dispositions.length" required>\n      <ui-select-match placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}">{{$select.selected.name}}</ui-select-match>\n      <ui-select-choices repeat="disposition.name as disposition in dispositions | filter: $select.search">\n        <div ng-bind-html="disposition.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n  <div class="note note-warning" data-ng-hide="dispositions.length">\n    <h4 class="block">Warning!</h4>\n    <p>\n      {{ \'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate }}\n    </p>\n  </div>\n</form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/openchannel/inbox/view/view.tags.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_TAGS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TRANSPORT -->\n  <div class="form-group">\n    <form name="form" novalidate>\n      <!-- START TAGS -->\n      <div class="form-group">\n        <ui-select multiple data-ng-model="item.tags" theme="bootstrap">\n          <ui-select-match placeholder="{{\'APPLICATION_TAGS\' | translate}}">{{$item}}</ui-select-match>\n          <ui-select-choices repeat="tag in tags | filter: $select.search">\n            {{tag}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n      <!-- END TAGS -->\n    </form>\n  </div>\n  <!-- END TRANSPORT -->\n</div>\n<div class="modal-footer">\n  <button type="button" class="btn" data-ng-class="button.class" data-ng-click="button.click()"data-ng-repeat="button in modal.buttons">{{button.text | translate}}</button>\n  <!-- <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button> -->\n</div>\n'),a.put("app/channels/openchannel/queue/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required />\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START TIMEOUT -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.timeout.$touched || form.$submitted) && form.timeout.$invalid}">\n      <label class="control-label">{{\'APPLICATION_AGENT_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="number" min="0" name="timeout" placeholder="Timeout" class="form-control" data-ng-model="item.timeout" required min="1"/>\n      <span data-ng-show="(form.timeout.$touched || form.$submitted) && form.timeout.$invalid && form.timeout.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TIMEOUT -->\n\n    <!-- START STRATEGY -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.strategy.$touched || form.$submitted) && form.strategy.$invalid}">\n      <label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.strategy" name="strategy" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.toUpperCase()}}</ui-select-match>\n        <ui-select-choices repeat="strategy in strategies | filter: $select.search">\n          <div ng-bind-html="strategy.toUpperCase() | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.strategy.$touched || form.$submitted) && form.strategy.$invalid && form.strategy.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END STRATEGY -->\n\n    <!-- START AGENTS-->\n    <div class="form-body" data-ng-init="getTeams()">\n      <label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n      <div class="input-group input-small mbottom20">\n        <input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="item.penalty" readonly>\n        <div class="spinner-buttons input-group-btn btn-group-vertical">\n          <button type="button" class="btn spinner-up btn-xs blue" data-ng-click="item.penalty=item.penalty+1">\n            <i class="fa fa-angle-up"></i>\n          </button>\n          <button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!item.penalty" data-ng-click="item.penalty=item.penalty-1">\n            <i class="fa fa-angle-down"></i>\n          </button>\n        </div>\n      </div>\n      <div class="form-group last">\n        <div class="col-md-12" id="multi-select-team">\n        </div>\n      </div>\n    </div>\n    <!-- END AGENTS-->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/openchannel/queue/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-globe"></i>\n						<a href="#">{{ \'APPLICATION_OPEN_CHANNEL\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-docs"></i>\n						<a href="#">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_QUEUES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="#" data-ng-click="createItem()" data-ng-if="Auth.isAdmin()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_QUEUE\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n						<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/openchannel/queue/view/view.agents.html",'<div class="row" data-ng-init="getTeams()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="note note-warning" data-ng-hide="teams.length">\n				<h4 class="block">Warning!</h4>\n				<p>\n					 {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\n				</p>\n			</div>\n			<div class="portlet-body">\n				<!-- BEGIN FORM-->\n				<form action="index.html" class="form-horizontal form-row-seperated">\n					<div class="form-body">\n						<label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n						<div class="input-group input-small mbottom20">\n							<input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="queue.penalty" readonly>\n							<div class="spinner-buttons input-group-btn btn-group-vertical">\n								<button type="button" class="btn spinner-up btn-xs blue" data-ng-click="queue.penalty=queue.penalty+1">\n									<i class="fa fa-angle-up"></i>\n								</button>\n								<button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!queue.penalty" data-ng-click="queue.penalty=queue.penalty-1">\n									<i class="fa fa-angle-down"></i>\n								</button>\n							</div>\n						</div>\n						<div class="form-group last">\n							<div class="col-md-12" id="multi-select-team">\n							</div>\n						</div>\n					</div>\n				</form>\n				<!-- END FORM-->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/openchannel/queue/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getQueue()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-globe"></i>\n					<a href="#">{{ \'APPLICATION_OPEN_CHANNEL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/channels/openchannel/queues/list">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					<i data-ng-show="queue" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="queue">\n					<a href="#">{{queue.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/queue.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{queue.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n					{{user.role}}\n				</div> -->\n			</div>\n			<!-- END SIDEBAR USER TITLE -->\n\n			<!-- SIDEBAR MENU -->\n			<div class="profile-usermenu">\n				<ul class="nav">\n					<li data-ng-class="{active: $state.is(\'main.channels.openchannel.queues.view.settings\')}">\n						<a data-ng-href="/channels/openchannel/queues/view/{{queue.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.channels.openchannel.queues.view.agents\')}" data-ng-show="Auth.getCurrentUser().role === \'admin\'">\n							<a data-ng-href="/channels/openchannel/queues/view/{{queue.id}}/agents">\n								<i class="icon-people"></i>\n								{{ \'APPLICATION_AGENTS\' | translate}} </a>\n							</li>\n						</ul>\n					</div>\n					<!-- END MENU -->\n				</div>\n				<!-- END PORTLET main.channels -->\n			</div>\n			<!-- END BEGIN PROFILE SIDEBAR -->\n			<!-- BEGIN PROFILE CONTENT -->\n			<div ui-view class="profile-content">\n			</div>\n			<!-- END PROFILE CONTENT -->\n		</div>\n	</div>\n	<!-- END PAGE CONTENT-->\n'),
+a.put("app/channels/openchannel/queue/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.general" data-ng-submit="forms.general.$valid && updateQueue()" novalidate>\n					<!-- START NAME -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="queue.name" data-ng-pattern="settings.patternName" required />\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.pattern" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n						</span>\n					</div>\n					<!-- END NAME -->\n\n					<!-- START DESCRIPTION -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n						<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="queue.description"/>\n					</div>\n					<!-- END DESCRIPTION -->\n\n					<!-- START TIMEOUT -->\n					<div class="form-group">\n						<label class="control-label">Timeout</label>\n						<input type="number" name="timeout" placeholder="Timeout" class="form-control" min="1" data-ng-model="queue.timeout"/>\n					</div>\n					<!-- END TIMEOUT -->\n\n					<!-- START HEADER SHAPE -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.strategy.$touched || forms.general.$submitted) && forms.general.strategy.$invalid}">\n						<label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}</label>\n						<ui-select data-ng-model="queue.strategy" name="strategy" theme="bootstrap">\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.toUpperCase()}}</ui-select-match>\n							<ui-select-choices repeat="strategy in strategies | filter: $select.search">\n								<div ng-bind-html="strategy | uppercase | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n					</div>\n					<!-- END HEADER SHAPE -->\n					<input data-ng-if="Auth.isAdmin()" class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/openchannel/realtime/view/agent/agent.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-tree-view ui-grid-expandable-row ui-grid-pagination ui-grid-auto-resize>\n			<span us-spinner spinner-key="grid-spinner" spinner-start-active="true"></span>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/openchannel/realtime/view/agent/agent.modal.info.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INTERFACE_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<div data-ng-if="agent.ipaddr" class="well">\n  <div>{{agent.ipaddr}}:{{agent.port}}</div>\n  <div>{{agent.fullcontact}}</div>\n  <div>{{agent.useragent}}</div>\n  <div>{{agent.lastms}}</div>\n</div>\n<div data-ng-if="!agent.ipaddr" class="alert alert-danger" role="alert">\n  {{\'MESSAGE_NO_AVAILABLE_INFO\' | translate}}\n</div>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/openchannel/realtime/view/agent/queue.modal.add.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_JOIN_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <div class="form-group row">\n  <label class="col-md-2 control-label" style="margin-top: 7px;">{{\'APPLICATION_QUEUE\' | translate}}:</label>\n  <div class="col-md-10">\n    <ui-select multiple ng-model="item.queues" theme="bootstrap" required>\n      <ui-select-match placeholder="{{\'APPLICATION_QUEUE\' | translate}}">{{$item.name}}</ui-select-match>\n      <ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n        <div ng-bind-html="queue.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n</div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/openchannel/realtime/view/application/application.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initApplications()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns class="ui-grid" ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/openchannel/realtime/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-globe"></i>\n					<a href="#">{{ \'APPLICATION_OPEN_CHANNEL\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-energy"></i>\n					<a href="#">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<div>\n			<nav class="navbar navbar-default" role="navigation">\n				<div class="collapse navbar-collapse">\n					<ul class="nav navbar-nav">\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.openchannel.realtime.view.agents\')}">\n							<a href="/channels/openchannel/realtime/view/agents">\n								{{\'APPLICATION_AGENTS\' | translate}}\n							</a>\n						</li>\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.openchannel.realtime.view.applications\')}">\n							<a href="/channels/openchannel/realtime/view/applications">\n								{{\'APPLICATION_APPLICATIONS\' | translate}}\n							</a>\n						</li>\n					</ul>\n				</div>\n			</nav>\n		</div>\n\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/openchannel/realtime/view/view.queue.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div id="grid1" ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-tree-view class="grid">\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/realtime/view/agent/agent.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-pagination ui-grid-auto-resize>\n			<span us-spinner spinner-key="grid-spinner" spinner-start-active="true"></span>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/realtime/view/agent/agent.modal.info.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INTERFACE_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<div data-ng-if="agent.ipaddr" class="well">\n  <div>{{agent.ipaddr}}:{{agent.port}}</div>\n  <div>{{agent.fullcontact}}</div>\n  <div>{{agent.useragent}}</div>\n  <div>{{agent.lastms}}</div>\n</div>\n<div data-ng-if="!agent.ipaddr" class="alert alert-danger" role="alert">\n  {{\'MESSAGE_NO_AVAILABLE_INFO\' | translate}}\n</div>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/realtime/view/agent/queue.modal.add.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_JOIN_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <div class="form-group row">\n  <label class="col-md-2 control-label" style="margin-top: 7px;">{{\'APPLICATION_QUEUE\' | translate}}:</label>\n  <div class="col-md-10">\n    <ui-select multiple ng-model="item.queues" theme="bootstrap" required>\n      <ui-select-match placeholder="{{\'APPLICATION_QUEUE\' | translate}}">{{$item.name}}</ui-select-match>\n      <ui-select-choices repeat="queue.name as queue in queues | filter: $select.search">\n        <div ng-bind-html="queue.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n</div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/realtime/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-energy"></i>\n					<a href="/channels/realtime/view/agents">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<div>\n		    <nav class="navbar navbar-default" role="navigation">\n					<div class="collapse navbar-collapse">\n						<ul class="nav navbar-nav">\n							<li data-ng-class="{\'active\': $state.is(\'main.channels.realtime.view.agents\')}">\n								<a href="/channels/realtime/view/agents">\n									{{\'APPLICATION_AGENTS\' | translate}}\n								</a>\n							</li>\n						</ul>\n					</div>\n		    </nav>\n		</div>\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/account/list/list.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="glyphicon glyphicon-comment"></i>\n					<a href="#">{{ \'APPLICATION_SMS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="/channels/sms/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n	</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group">\n						<a class="btn btn-default" href="#" data-ng-click="gridOptions.getPage();">\n							<i class="icon-reload"></i>\n						</a>\n					</div>\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/channels/sms/accounts/wizard">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/account/view/action/list/list.html",'<div class="row" data-ng-init="initActions()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACTIONS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/channels/sms/accounts/view/{{account.id}}/actions/wizard" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACTION\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/sms/account/view/action/view/view.html",'\n<div class="row" data-ng-init="initAction()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }}</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.settings" ng-submit="updateItem()" novalidate>\n					<!-- START APP -->\n					<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n							<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n							<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n								<div ng-bind-html="app.name | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid && forms.settings.app.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END APP -->\n\n					<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n						<!-- START QUEUE -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$invalid}">\n							<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.SmsQueueId" name="queue" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n									<div ng-bind-html="queue.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="queues.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/sms/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END QUEUE -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n						<!-- START AGENT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$invalid}">\n							<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n								<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n									<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="agents.length">\n                <h4 class="block">Warning!</h4>\n                <p>\n                  {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n                </p>\n                <p>\n                  {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n                </p>\n              </div>\n							<span data-ng-show="(forms.settings.agent.$touched || forms.settings.$submitted) && forms.settings.agent.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END AGENT -->\n\n						<!-- START TIMEOUT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n							<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TIMEOUT -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n						<!-- START SENDMAIL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n							<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" min="1" required/>\n							<span data-ng-show="(forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid && forms.settings.to.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.template.$touched || forms.settings.$submitted) && forms.settings.template.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n									<div ng-bind-html="template.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.template.$touched || forms.settings.$submitted) && forms.settings.template.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END SENDMAIL -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n						<!-- START SENDSms -->\n						<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n								<span data-ng-show="(forms.settings.to.$touched || forms.settings.$submitted) && forms.settings.to.$invalid && forms.settings.to.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n						</div>\n\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$invalid}">\n							<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n									<div ng-bind-html="account.name | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.settings.account.$touched || forms.settings.$submitted) && forms.settings.account.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.text.$touched || forms.text.$submitted) && forms.settings.text.$invalid}">\n							<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<textarea id="text" class="form-control maxlength-handler" maxlength="160"  name="text" data-ng-model="application.data6" required></textarea>\n							<span data-ng-show="(forms.settings.text.$touched || forms.settings.$submitted) && forms.settings.text.$invalid && forms.settings.text.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n\n						<!-- END SENDSms -->\n					</div>\n					<!-- START INTERVAL_TYPE -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n							<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n								{{ intType.name | translate }}\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.settings.intType.$touched || forms.settings.$submitted) && forms.settings.intType.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END INTERVAL_TYPE -->\n\n					<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n						<!-- START TIME -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n							<div class="input-group input-large">\n								<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n									<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n								</fieldset>\n								<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n								<fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n								<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n							</div>\n						</div>\n						<!-- END TIME -->\n\n						<!-- START ALWAYS -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n							<div class="input-group input-large">\n								<label class="control-label pointer-cursor">\n									<input\n										bs-switch\n										data-ng-model="application.alwaysTime"\n										type="checkbox"\n										switch-active="{{ isActive }}"\n										switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n										switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n										switch-on-color="{{ onColor }}"\n										switch-off-color="{{ offColor }}"\n										switch-animate="{{ animate }}"\n										switch-size="{{ size }}"\n										switch-label="{{ label }}"\n										switch-icon="{{ icon }}"\n										switch-radio-off="{{ radioOff }}"\n										switch-label-width="{{ labelWidth }}"\n										switch-handle-width="{{ handleWidth }}">\n									<!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n								</label>\n							</div>\n						</div>\n						<!-- END ALWAYS -->\n\n						<!-- START WEEKDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n										{{ weekDay.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END WEEKDAY -->\n\n						<!-- START MONTHDAY -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n									<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n										{{monthDay}}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTHDAY -->\n\n						<!-- START MONTH -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n							<div class="input-group input-large">\n								<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span class="input-group-addon">to</span>\n								<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n									<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n										{{ month.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n						</div>\n						<!-- END MONTH -->\n					</div>\n\n					<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n						<!-- START INTERVALS -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$invalid}">\n							<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n								<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n									{{ interval.name}}\n								</ui-select-choices>\n							</ui-select>\n							<div class="note note-warning" data-ng-hide="intervals.length">\n								<h4 class="block">Warning!</h4>\n								<p>\n									{{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n								</p>\n								<p>\n									{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n								</p>\n							</div>\n							<span data-ng-show="(forms.settings.IntervalId.$touched || forms.settings.$submitted) && forms.settings.IntervalId.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END INTERVALS -->\n\n					</div>\n					<button class="btn green-haze" type="submit">{{\'APPLICATION_UPDATE\' | translate}}</button>\n				</form>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/channels/sms/account/view/action/wizard/wizard.html",'\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-directions font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACTION\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n					<wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.action.$valid)">\n						<form name="forms.action" novalidate>\n							<!-- START APP -->\n							<div class="form-group"  data-ng-class="{\'has-error\': forms.action.$submitted && forms.action.app.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.app" name="app" theme="bootstrap" required>\n									<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="app.value as app in apps | filter: $select.search">\n										<div ng-bind-html="app.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="forms.action.$submitted && forms.action.app.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END APP -->\n\n							<div class="app-settings" ng-slide-down="application.app === \'agent\'" lazy-render duration="1" data-ng-init="getAgents()">\n								<!-- START AGENT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$invalid}">\n									<label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.UserId" name="agent" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.fullname}}</ui-select-match>\n										<ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n											<div ng-bind-html="agent.fullname | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="agents.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/staff/agents/list">{{\'APPLICATION_AGENTS\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.agent.$touched || forms.action.$submitted) && forms.action.agent.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END AGENT -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'queue\'" lazy-render duration="1" data-ng-init="getQueues()">\n								<!-- START QUEUE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$invalid}">\n									<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.SmsQueueId" name="queue" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n											<div ng-bind-html="queue.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="queues.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/sms/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.queue.$touched || forms.action.$submitted) && forms.action.queue.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END QUEUE -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="number" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="application.timeout" min="1" required/>\n									<span data-ng-show="(forms.action.timeout.$touched || forms.action.$submitted) && forms.action.timeout.$invalid && forms.action.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1" data-ng-init="getMailAccounts();getTemplates()">\n								<!-- START SENDMAIL -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendMail\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input type="email" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2" required/>\n										<span data-ng-show="(forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid && forms.action.to.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.mail.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in mailAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEMPLATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data9" name="template" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n											<div ng-bind-html="template.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.template.$touched || forms.action.$submitted) && forms.action.template.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END SENDMAIL -->\n							</div>\n							<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1" data-ng-init="getSmsAccounts()">\n								<!-- START SENDSms -->\n								<div class="app-settings" ng-slide-down="application.app === \'sendSms\'" lazy-render duration="1">\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TO\' | translate}} <span class="required" aria-required="true">*</span></label>\n										<input  type="text" ng-pattern="/^[\\+]?[0-9]+$/" name="to" placeholder="{{\'APPLICATION_TO\' | translate}}" class="form-control" data-ng-model="application.data2"  required/>\n										<span data-ng-show="(forms.action.to.$touched || forms.action.$submitted) && forms.action.to.$invalid && forms.action.to.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ACCOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.data8" name="account" theme="bootstrap" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="account.id as account in smsAccounts | filter: $select.search">\n											<div ng-bind-html="account.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.action.account.$touched || forms.action.$submitted) && forms.action.account.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<textarea id="text" class="form-control maxlength-handler"  maxlength="160" name="text" data-ng-model="application.data6" required></textarea>\n									<span data-ng-show="(forms.action.text.$touched || forms.action.$submitted) && forms.action.text.$invalid && forms.action.text.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n\n								<!-- END SENDSms -->\n							</div>\n							<!-- START INTERVAL_TYPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_INTERVAL_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="application.intType" theme="bootstrap" name="intType" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name | translate }}</ui-select-match>\n									<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n										{{ intType.name | translate }}\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.action.intType.$touched || forms.action.$submitted) && forms.action.intType.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END INTERVAL_TYPE -->\n\n							<div class="app-settings" ng-slide-down="application.intType === \'custom\'" lazy-render duration="1">\n								<!-- START TIME -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n									<div class="input-group input-large">\n										<fieldset class="pull-left" ng-disabled="application.alwaysTime">\n											<uib-timepicker name="t_from" data-ng-model="application.t_from" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker>\n										</fieldset>\n										<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n										<fieldset ng-disabled="application.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="application.t_to" show-meridian="false" show-spinners="false" mousewheel="false"></uib-timepicker></fieldset>\n										<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="application.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n									</div>\n								</div>\n								<!-- END TIME -->\n\n								<!-- START ALWAYS -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n									<div class="input-group input-large">\n										<label class="control-label pointer-cursor">\n											<input\n												bs-switch\n												data-ng-model="application.alwaysTime"\n												type="checkbox"\n												switch-active="{{ isActive }}"\n												switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n												switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n												switch-on-color="{{ onColor }}"\n												switch-off-color="{{ offColor }}"\n												switch-animate="{{ animate }}"\n												switch-size="{{ size }}"\n												switch-label="{{ label }}"\n												switch-icon="{{ icon }}"\n												switch-radio-off="{{ radioOff }}"\n												switch-label-width="{{ labelWidth }}"\n												switch-handle-width="{{ handleWidth }}">\n											<!-- <input type="checkbox" data-ng-model="application.alwaysTime"> -->\n										</label>\n									</div>\n								</div>\n								<!-- END ALWAYS -->\n\n								<!-- START WEEKDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.wd_from" theme="bootstrap" name="wd_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.wd_to" theme="bootstrap" name="wd_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{ weekDay.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END WEEKDAY -->\n\n								<!-- START MONTHDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.md_from" theme="bootstrap" name="md_from">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_to && application.md_to!==\'always\' && monthDay>application.md_to && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.md_to" theme="bootstrap" name="md_to">\n											<ui-select-match allow-clear>{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="application.md_from && application.md_from!==\'always\' && monthDay<application.md_from && monthDay!==\'always\'">\n												{{monthDay}}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTHDAY -->\n\n								<!-- START MONTH -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="application.m_from" theme="bootstrap" name="m_from">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="application.m_to" theme="bootstrap" name="m_to">\n											<ui-select-match placeholder="">{{ $select.selected.name | translate }}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{ month.name | translate }}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTH -->\n							</div>\n\n							<div class="app-settings" ng-slide-down="application.intType === \'list\'" lazy-render duration="1" data-ng-init="getIntervals()">\n\n								<!-- START INTERVALS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$invalid}">\n									<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.IntervalId" theme="bootstrap" name="IntervalId" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{ $select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="interval.id as interval in intervals | filter: $select.search">\n											{{ interval.name}}\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="intervals.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.action.IntervalId.$touched || forms.action.$submitted) && forms.action.IntervalId.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERVALS -->\n\n							</div>\n\n							<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONTINUE\' | translate}}"/>\n						</form>\n					</wz-step>\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input class="btn green-haze" type="submit" data-ng-click="next()" value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/account/view/api/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_API\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- CALLBACK TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n							<!-- START CALLBACK URL -->\n							<div  class="row" >\n									<div class="col-md-12">\n										<label class="control-label">Receive URL</label>\n										<p>\n											Copy the following url and insert it into your {{account.type}} account settings to receive SMS.\n											<a href="https://wiki.xcallymotion.com/display/XMD/SMS" target="_blank">Detail</a>\n										</p>\n									</div>\n								</div>\n							<div   class="row" >\n									<div class="col-md-11">\n										<code-mirror  model="receiveurl"></code-mirror>\n									</div>\n									<div class="col-md-1">\n										<a class="btn btn-sm green-jungle" data-ng-click="copyToClipboard(receiveurl);"><i class="fa fa-clipboard"></i>\n										</a>\n									</div>\n							</div><br>\n							<!-- END CALLACK URL -->\n							<!-- START DELIVERY CALLBACK URL -->\n							<div ng-if= "account.smstype == \'classic+\'" class="row"  ng-show="!forms.info.remote.$invalid">\n								<div class="col-md-12">\n									<label class="control-label">Delivery URL </label>\n									<p>\n										Copy the following url and insert it into your {{account.type}} account settings to receive delivery report.\n 									 <a href="https://wiki.xcallymotion.com/display/XMD/SMS" target="_blank">Detail</a>\n									</p>\n								</div>\n							</div>\n							<div ng-if= "account.smstype == \'classic+\'"  class="row" ng-show="!forms.info.remote.$invalid">\n								<div class="col-md-11">\n									<code-mirror class="control-label" model="deliveryurl"></code-mirror>\n								</div>\n								<div class="col-md-1">\n									<a class="btn btn-sm green-jungle" data-ng-click="copyToClipboard(deliveryurl);"><i class="fa fa-clipboard"></i>\n									</a>\n								</div>\n							</div>\n							<!-- END DELIVERY CALLACK URL -->\n					</div>\n					<!-- END CALLBACK TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/sms/account/view/disposition/modal/add.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_DISPOSITIONS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.form.$touched || form.$submitted) && form.form.$invalid}">\n      <div class="">\n        <input type="text" name="form" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" class="form-control" data-ng-model="name" required/>\n        <span data-ng-show="form.form.$touched && form.form.$error.required" class="help-block help-block-error">\n          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n        </span>\n      </div>\n    </div>\n    <!-- END NAME -->\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="form.$valid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/sms/account/view/disposition/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DISPOSITIONS\' | translate}}</span>\n				</div>\n				<div class="actions actions-md">\n					<a href="#" class="btn btn-icon-only green" data-ng-click="addDisposition();">\n						<i class="fa fa-plus"></i>\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()">\n				<div class="tab-content">\n					<div class="row" data-ng-hide="dispositions.length">\n						<div class="col-md-12">\n							<div class="note note-info">\n								<h4 class="block">Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}</h4>\n							</div>\n						</div>\n					</div>\n\n					<!-- GENERAL TAB -->\n					<div class="row" data-ng-repeat="disposition in dispositions">\n						<div class="col-md-12 form-group">\n							<div class="input-group">\n								<div>\n									<input class="form-control" type="text" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" data-ng-model="disposition.name">\n								</div>\n								<span class="input-group-btn">\n									<button class="btn btn-success" type="button" data-ng-click="updateDisposition(disposition.id, disposition.name);"><i class="fa fa-cloud-upload fa-fw"></i> {{\'APPLICATION_UPDATE\' | translate}}</button>\n									<button class="btn btn-danger" type="button" data-ng-click="deleteDisposition(disposition.id);"><i class="fa fa-times fa-fw"></i> {{\'APPLICATION_DELETE\' | translate}}</button>\n								</span>\n							</div>\n						</div>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/sms/account/view/hooks/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_HOOKS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_ACCEPT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_REJECT\' | translate}}</a>\n					</li>\n					<li >\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_CLOSE\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- ACCEPT TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.accept" data-ng-submit="forms.accept.$valid && updateItemSmsAccount()" novalidate>\n							<!-- START ACCEPT URL -->\n								<div class="row">\n									<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid}">\n										<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n										<ui-select data-ng-model="account.acceptMethod" name="method" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n											<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n												<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n											</ui-select-choices>\n										</ui-select>\n										<span data-ng-show="(forms.accept.method.$touched || forms.accept.$submitted) && forms.accept.method.$invalid && forms.accept.method.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<div  class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid}">\n										<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n										<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.acceptUrl"  ng-required="account.acceptMethod"/>\n										<span data-ng-show="(forms.accept.url.$touched || forms.accept.$submitted) && forms.accept.url.$invalid && forms.accept.url.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n								<!-- END ACCEPT URL-->\n								<!-- START ACTIONS-->\n								<!-- START PAUSE -->\n								<div class="row" ng-repeat = "action in account.actions">\n									<div  ng-switch="action.action">\n											<div ng-switch-when="pause">\n												<div  class="form-group col-md-4">\n													<label class="control-label">{{\'APPLICATION_PAUSE\' | translate}}</label></br>\n														<input\n														bs-switch\n														data-ng-change="resetActionData(action)"\n														data-ng-model="action.enabled"\n														type="checkbox"\n														switch-active="{{ isActive }}"\n														switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n														switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n														switch-on-color="{{ onColor }}"\n														switch-off-color="{{ offColor }}"\n														switch-animate="{{ animate }}"\n														switch-size="{{ size }}"\n														switch-label="{{ label }}"\n														switch-icon="{{ icon }}"\n														switch-radio-off="{{ radioOff }}"\n														switch-label-width="{{ labelWidth }}"\n														switch-handle-width="{{ handleWidth }}">\n													</div>\n													<div ng-if="action.enabled" class="form-group col-md-8">\n														<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}</label>\n														<ui-select  name="action" data-ng-model="action.type"  theme="bootstrap" >\n															<ui-select-match placeholder="{{\'APPLICATION_TYPE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n															<ui-select-choices repeat=" pause.name as pause in pauses | filter: $select.search">\n																<div ng-bind-html="pause.name | highlight: $select.search | uppercase" ></div>\n															</ui-select-choices>\n														</ui-select>\n													</div>\n											</div>\n										</div>\n									</div>\n								<!-- END ACTION -->\n\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ACCEPT TAB -->\n					<!-- START REJECT TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.reject" data-ng-submit="forms.reject.$valid && updateItemSmsAccount()" novalidate>\n							<!-- START REJECT URL -->\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.rejectMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.reject.method.$touched || forms.reject.$submitted) && forms.reject.method.$invalid && forms.reject.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.rejectUrl" ng-required="account.rejectMethod"/>\n									<span data-ng-show="(forms.reject.url.$touched || forms.reject.$submitted) && forms.reject.url.$invalid && forms.reject.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n\n							<!-- END REJECT URL -->\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END REJECT TAB -->\n					<!-- START CLOSE TAB -->\n					<div class="tab-pane" id="tab_1_3">\n						<form name="forms.close" data-ng-submit="forms.close.$valid && updateItemSmsAccount()" novalidate>\n							<div class="row">\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid}">\n									<label class="control-label">{{\'APPLICATION_METHOD\' | translate}}</label>\n									<ui-select data-ng-model="account.closeMethod" name="method" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected.name | uppercase}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in types | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | uppercase" ></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.close.method.$touched || forms.close.$submitted) && forms.close.method.$invalid && forms.close.method.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<div class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid}">\n									<label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n									<input type="url" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="account.closeUrl" ng-required="account.closeMethod"/>\n									<span data-ng-show="(forms.close.url.$touched || forms.close.$submitted) && forms.close.url.$invalid && forms.close.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CLOSE TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
+a.put("app/channels/sms/account/view/setting/view/view.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItemSmsAccount()" novalidate>\n							<!-- START ID -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ID\' | translate}}<span class="required" aria-required="true">*</span>\n								</label>\n								<input type="text" name="id" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.id" ng-disabled="true" required/>\n							</div>\n							<!-- END ID-->\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid && forms.info.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n							<!-- START LIST -->\n							<div class="form-group" data-ng-if="license.cm">\n								<label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n									<div class="input-group">\n\n										<ui-select data-ng-model="account.ListId" name="list" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_LIST\' | translate}}">{{$select.selected.name}}</ui-select-match>\n											<ui-select-choices repeat="list.id as list in lists | filter: $select.search">\n												<div ng-bind-html="list.name | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n\n										<span class="input-group-btn">\n											<button type="button" data-ng-click="account.ListId = null" class="btn btn-default">\n												<span class="glyphicon glyphicon-trash"></span>\n											</button>\n										</span>\n\n									</div>\n							</div>\n							<!-- END LIST -->\n							<!-- START FIDELITY -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_FIDELITY\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="account.fidelity"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END FIDELITY -->\n\n							<!-- START TIMEOUT -->\n							<div class="form-group" data-ng-if="account.fidelity" data-ng-class="{\'has-error\': (forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" name="timeout" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="account.timeout" required/>\n								<span data-ng-show="(forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid && forms.info.timeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid && forms.info.timeout.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIMEOUT -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n							<!-- START TWILIO -->\n							<!-- START PHONE -->\n							<div ng-if= "account.type == \'twilio\'" class="form-group" data-ng-class="{\'has-error\': ( forms.info.phone.$touched ||forms.info.$submitted) && forms.info.phone.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PHONE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" ng-pattern="/^[\\+]?[0-9]+$/" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="account.phone" name="phone" required/>\n								<span data-ng-show="(forms.info.phone.$touched || forms.in.$submitted) && forms.info.phone.$invalid && forms.info.phone.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PHONE  -->\n\n							<!-- START SID -->\n							<div ng-if= "account.type == \'twilio\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.sid.$touched || forms.info.$submitted) && forms.info.sid.$invalid}">\n								<label class="control-label">{{\'APPLICATION_SID\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="sid" placeholder="{{\'APPLICATION_SID\' | translate}}" class="form-control" data-ng-model="account.sid" name="sid" required/>\n								<span data-ng-show="(forms.info.sid.$touched || forms.info.$submitted) && forms.info.sid.$invalid && forms.info.sid.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END SID -->\n							<!-- START TOKEN -->\n							<div ng-if= "account.type == \'twilio\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.token.$touched || forms.info.$submitted) && forms.info.token.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TOKEN\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="token" placeholder="{{\'APPLICATION_TOKEN\' | translate}}" class="form-control" data-ng-model="account.token" name="token" required/>\n								<span data-ng-show="(forms.info.token.$touched || forms.info.$submitted) && forms.info.token.$invalid && forms.info.token.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END SID -->\n							<!-- END TWILIO -->\n							<!-- START SKEBBY -->\n							<!-- START SKEBBY SMS TYPE -->\n						<div ng-if= " account.type == \'skebby\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.smstype.$touched || forms.info.$submitted) && forms.info.smstype.$invalid}">\n							<label class="control-label">{{\'APPLICATION_SMS_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="account.smstype" name="smstype" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'SMS_TYPE\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n								<ui-select-choices repeat="smstype in [\'basic\',\'classic\',\'classic+\'] | filter: $select.search">\n									<div data-ng-bind="smstype | highlight: $select.search | uppercase" ></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.info.smstype.$touched || forms.info.$submitted) && forms.info.smstype.$invalid && forms.info.smstype.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n							<!-- END SKEBBY SMS TYPE -->\n							<!-- START PHONE  -->\n							<div ng-if= "account.type == \'skebby\'  " class="form-group" data-ng-class="{\'has-error\': ( forms.info.phone.$touched ||forms.info.$submitted) && forms.info.phone.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PHONE\' | translate}}<span class="required" aria-required="true"></span></label>\n								<input type="text" ng-pattern="/^[0-9]+$/"  placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="account.phone" name="phone" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_PHONE_NUMBER\' | translate }}\n								</span>\n								<span data-ng-show="(forms.info.phone.$touched || forms.in.$submitted) && forms.info.phone.$invalid && forms.info.phone.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PHONE -->\n							<!-- START USERNAME -->\n							<div ng-if= "account.type == \'skebby\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.username.$touched || forms.info.$submitted) && forms.info.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" name="username" required/>\n								<span data-ng-show="(forms.info.username.$touched || forms.info.$submitted) && forms.info.username.$invalid && forms.info.username.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START PASSWORD -->\n							<div ng-if= "account.type == \'skebby\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n								<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid && forms.info.password.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n							<!-- END SKEBBY -->\n							<!-- START REMOTE IP -->\n							<div  class="form-group" data-ng-class="{\'has-error\': (forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remote" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remote" required/>\n								<span class="help-block help-block-info">\n									{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n								</span>\n								<span data-ng-show="(forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid && forms.info.remote.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END REMOTE IP -->\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/sms/account/view/view.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="glyphicon glyphicon-comment"></i>\n					<a href="#">{{ \'APPLICATION_SMS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="/channels/sms/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n					<i class="fa fa-angle-right" data-ng-show="account"></i>\n				</li>\n				<li data-ng-show="account">\n					<a href="#">{{ account.description || account.name }}</a>\n				</li>\n			</ul>\n		</div>\n\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img ng-src="assets/images/media/account.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ account.description || account.name }}\n					</div>\n					<div class="profile-usertitle-job">\n						{{account.email}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li ng-class="{active: $state.is(\'main.channels.sms.accounts.view.settings\')}">\n							<a href="/channels/sms/accounts/view/{{account.id}}/settings">\n							<i class="icon-settings"></i>\n							{{\'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.sms.accounts.view.api\')}">\n							<a href="/channels/sms/accounts/view/{{account.id}}/api">\n							<i class="fa fa-external-link"></i>\n							{{\'APPLICATION_API\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.sms.accounts.view.hooks\')}">\n							<a href="/channels/sms/accounts/view/{{account.id}}/hooks">\n							<i class="fa fa-code"></i>\n							{{\'APPLICATION_HOOKS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.is(\'main.channels.sms.accounts.view.dispositions\')}">\n							<a href="/channels/sms/accounts/view/{{account.id}}/dispositions">\n							<i class="icon-target"></i>\n							{{\'APPLICATION_DISPOSITIONS\' | translate}} </a>\n						</li>\n						<li ng-class="{active: $state.includes(\'main.channels.sms.accounts.view.actions\')}">\n							<a href="/channels/sms/accounts/view/{{account.id}}/actions/list">\n							<i class="icon-directions"></i>\n							{{\'APPLICATION_ACTIONS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<div ui-view class="profile-content"></div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n<!-- END PAGE CONTENT-->\n</div>\n'),a.put("app/channels/sms/account/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItemSmsAccount()" novalidate>\n							<!-- START ID -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ID\' | translate}}<span class="required" aria-required="true">*</span>\n								</label>\n								<input type="text" name="id" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.id" ng-disabled="true" required/>\n							</div>\n							<!-- END ID-->\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid && forms.info.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n							<!-- START LIST -->\n							<div class="form-group" data-ng-if="license.cm">\n								<label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n									<div class="input-group">\n\n										<ui-select data-ng-model="account.ListId" name="list" theme="bootstrap">\n											<ui-select-match placeholder="{{\'APPLICATION_LIST\' | translate}}">{{$select.selected.name}}</ui-select-match>\n											<ui-select-choices repeat="list.id as list in lists | filter: $select.search">\n												<div ng-bind-html="list.name | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n\n										<span class="input-group-btn">\n											<button type="button" data-ng-click="account.ListId = null" class="btn btn-default">\n												<span class="glyphicon glyphicon-trash"></span>\n											</button>\n										</span>\n\n									</div>\n							</div>\n							<!-- END LIST -->\n\n\n							<!-- START FIDELITY -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_FIDELITY\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								data-ng-model="account.fidelity"\n								type="checkbox"\n								name="auth"\n								switch-active="{{ recordSwitch.isActive }}"\n								switch-on-text="{{ recordSwitch.onText }}"\n								switch-off-text="{{ recordSwitch.offText }}"\n								switch-on-color="{{ recordSwitch.onColor }}"\n								switch-off-color="{{ recordSwitch.offColor }}"\n								switch-animate="{{ recordSwitch.animate }}"\n								switch-size="{{ recordSwitch.size }}"\n								switch-label="{{ recordSwitch.label }}"\n								switch-icon="{{ recordSwitch.icon }}"\n								switch-radio-off="{{ recordSwitch.radioOff }}"\n								switch-label-width="{{ recordSwitch.labelWidth }}"\n								switch-handle-width="{{ recordSwitch.handleWidth }}">\n							</div>\n							<!-- END FIDELITY -->\n\n							<!-- START TIMEOUT -->\n							<div class="form-group" data-ng-if="account.fidelity" data-ng-class="{\'has-error\': (forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" name="timeout" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="account.timeout" required/>\n								<span data-ng-show="(forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid && forms.info.timeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.info.timeout.$touched || forms.info.$submitted) && forms.info.timeout.$invalid && forms.info.timeout.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIMEOUT -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<!-- START PHONE FOR TWILLIO ACCOUNT -->\n\n							<div ng-if= "account.type == \'twilio\'" class="form-group" data-ng-class="{\'has-error\': ( forms.info.phone.$touched ||forms.info.$submitted) && forms.info.phone.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PHONE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" ng-pattern="/^[\\+]?[0-9]+$/" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="account.phone" name="phone" required/>\n<!-- Format with a \'+\' and country code  -->\n								<!-- <span class="help-block">\n									{{ \'DESCRIPTION_PHONE_NUMBER\' | translate }}\n								</span> -->\n								<span data-ng-show="(forms.info.phone.$touched || forms.in.$submitted) && forms.info.phone.$invalid && forms.info.phone.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PHONE FOR TWILLIO ACCOUNT -->\n\n							<!-- START SID -->\n							<div ng-if= "account.type == \'twilio\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.sid.$touched || forms.info.$submitted) && forms.info.sid.$invalid}">\n								<label class="control-label">{{\'APPLICATION_SID\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="sid" placeholder="{{\'APPLICATION_SID\' | translate}}" class="form-control" data-ng-model="account.sid" name="sid" required/>\n								<span data-ng-show="(forms.info.sid.$touched || forms.info.$submitted) && forms.info.sid.$invalid && forms.info.sid.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END SID -->\n							<!-- START TOKEN -->\n							<div ng-if= "account.type == \'twilio\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.token.$touched || forms.info.$submitted) && forms.info.token.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TOKEN\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="token" placeholder="{{\'APPLICATION_TOKEN\' | translate}}" class="form-control" data-ng-model="account.token" name="token" required/>\n								<span data-ng-show="(forms.info.token.$touched || forms.info.$submitted) && forms.info.token.$invalid && forms.info.token.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END SID -->\n\n							<!-- START SMS TYPE -->\n\n						<div ng-if= " account.type == \'skebby\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.smstype.$touched || forms.info.$submitted) && forms.info.smstype.$invalid}">\n							<label class="control-label">{{\'APPLICATION_SMS_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="account.smstype" name="smstype" theme="bootstrap" required>\n								<ui-select-match placeholder="{{\'SMS_TYPE\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n								<ui-select-choices repeat="smstype in [\'basic\',\'classic\',\'classic+\'] | filter: $select.search">\n									<div data-ng-bind="smstype | highlight: $select.search | uppercase" ></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.info.smstype.$touched || forms.info.$submitted) && forms.info.smstype.$invalid && forms.info.smstype.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n							<!-- END TYPE -->\n							<!-- START PHONE FOR SKEBBY ACCOUNT -->\n							<div ng-if= "account.type == \'skebby\'  " class="form-group" data-ng-class="{\'has-error\': ( forms.info.phone.$touched ||forms.info.$submitted) && forms.info.phone.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PHONE\' | translate}}<span class="required" aria-required="true"></span></label>\n								<input type="text" ng-pattern="/^[0-9]+$/"  placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="account.phone" name="phone" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_PHONE_NUMBER\' | translate }}\n								</span>\n								<span data-ng-show="(forms.info.phone.$touched || forms.in.$submitted) && forms.info.phone.$invalid && forms.info.phone.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PHONE -->\n							<!-- START USERNAME -->\n							<div ng-if= "account.type == \'skebby\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.username.$touched || forms.info.$submitted) && forms.info.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" name="username" required/>\n								<span data-ng-show="(forms.info.username.$touched || forms.info.$submitted) && forms.info.username.$invalid && forms.info.username.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START PASSWORD -->\n							<div ng-if= "account.type == \'skebby\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n								<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid && forms.info.password.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n							<!-- START REMOTE IP -->\n							<div  class="form-group" data-ng-class="{\'has-error\': (forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remote" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remote" required/>\n								<span data-ng-show="(forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid && forms.info.remote.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END REMOTE IP -->\n							<!-- START CALLBACK URL -->\n							<div  ng-show="!forms.info.remote.$invalid" class="row" >\n								<!-- <div class="row"> -->\n									<div class="col-md-12">\n										<label class="control-label">URL </label><br>\n										<span ng-if= "account.type == \'twilio\' || account.type == \'skebby\'">\n											Copy the following url and insert it into your {{account.type}} account settings to receive sms.\n											<a href="https://wiki.xcallymotion.com/display/XMD/SMS" target="_blank">Detail</a>\n										</span>\n									</div>\n								</div>\n								<br>\n							<div  ng-show="!forms.info.remote.$invalid" class="row" >\n									<div class="col-md-11">\n										<code-mirror  model="receiveurl"></code-mirror>\n									</div>\n									<div class="col-md-1">\n										<a class="btn btn-sm green-jungle" data-ng-click="copyToClipboard(receiveurl);"><i class="fa fa-clipboard"></i>\n										</a>\n									</div>\n							</div>\n							<!-- END CALLACK URL -->\n							<!-- START DELIVERY CALLBACK URL -->\n							<div ng-if= "account.smstype == \'classic+\'" class="row"  ng-show="!forms.info.remote.$invalid">\n								<div class="col-md-12">\n									<label class="control-label">Delivery URL </label><br>\n									 Copy the following url and insert it into your {{account.type}} account settings to receive delivery status.\n									 <a href="https://wiki.xcallymotion.com/display/XMD/SMS" target="_blank">Detail</a>\n								</div>\n							</div>\n									<br>\n							<div ng-if= "account.smstype == \'classic+\'"  class="row" ng-show="!forms.info.remote.$invalid">\n								<div class="col-md-11">\n									<code-mirror class="control-label" model="deliveryurl"></code-mirror>\n								</div>\n								<div class="col-md-1">\n									<a class="btn btn-sm green-jungle" data-ng-click="copyToClipboard(deliveryurl);"><i class="fa fa-clipboard"></i>\n									</a>\n								</div>\n							</div>\n							<!-- END DELIVERY CALLACK URL -->\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
+a.put("app/channels/sms/account/wizard/wizard.html",'\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN PAGE HEADER-->\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="glyphicon glyphicon-comment"></i>\n					<a href="#">{{ \'APPLICATION_SMS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-notebook"></i>\n					<a href="/channels/sms/accounts/list">{{ \'APPLICATION_ACCOUNTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n		<!-- END PAGE HEADER-->\n\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n	        <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="formValidation(forms.info.$valid)">\n							<form name="forms.info" novalidate>\n								<!-- START NAME -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n									<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n									<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid && forms.info.name.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END NAME -->\n\n								<!-- START DESCRIPTION -->\n								<div class="form-group">\n									<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n									<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n								</div>\n								<!-- END DESCRIPTION -->\n                <!-- START APPLICATION TYPE -->\n\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.type.$touched || forms.info.$submitted) && forms.info.type.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="item.type" name="type" theme="bootstrap" required>\n			            <ui-select-match placeholder="{{\'APPLICATION_TYPE\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n			            <ui-select-choices repeat="type in [\'twilio\',\'skebby\'] | filter: $select.search">\n			              <div data-ng-bind="type | highlight: $select.search | uppercase" ></div>\n			            </ui-select-choices>\n			          </ui-select>\n								<span data-ng-show="(forms.info.type.$touched || forms.info.$submitted) && forms.info.type.$invalid && forms.info.type.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n                <!-- END TYPE -->\n								<!-- START PHONE FOR TWILLIO ACCOUNT -->\n								<div ng-if= "item.type == \'twilio\'" class="form-group" data-ng-class="{\'has-error\': ( forms.info.phone.$touched ||forms.info.$submitted) && forms.info.phone.$invalid}">\n									<label class="control-label">{{\'APPLICATION_PHONE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<input type="text" ng-pattern="/^[\\+]?[0-9]+$/"  placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="item.phone" name="phone" required/>\n									<span data-ng-show="(forms.info.phone.$touched || forms.info.$submitted) && forms.info.phone.$invalid && forms.info.phone.$error.required"  class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END PHONE FOR TWILLIO ACCOUNT -->\n                <!-- START SID -->\n                <div ng-if= "item.type == \'twilio\'" class="form-group" data-ng-class="{\'has-error\': ( forms.info.sid.$touched ||forms.info.$submitted) && forms.info.sid.$invalid}">\n                  <label class="control-label">{{\'APPLICATION_SID\' | translate}}<span class="required" aria-required="true">*</span></label>\n                  <input type="text"  placeholder="{{\'APPLICATION_SID\' | translate}}" class="form-control" data-ng-model="item.sid" name="sid" required/>\n                  <span data-ng-show="(forms.info.sid.$touched || forms.info.$submitted) && forms.info.sid.$invalid && forms.info.sid.$error.required"  class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n                <!-- END SID -->\n                <!-- START TOKEN -->\n                <div ng-if= "item.type == \'twilio\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.token.$touched || forms.info.$submitted) && forms.info.token.$invalid}">\n                  <label class="control-label">{{\'APPLICATION_TOKEN\' | translate}}<span class="required" aria-required="true">*</span></label>\n                  <input type="text"  placeholder="{{\'APPLICATION_TOKEN\' | translate}}" class="form-control" data-ng-model="item.token" name="token" required/>\n                  <span data-ng-show="(forms.info.token.$touched || forms.info.$submitted) && forms.info.token.$invalid && forms.info.token.$error.required"  class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n                <!-- END SID -->\n\n								<!-- START SMS TYPE -->\n							<div ng-if= " item.type == \'skebby\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.smstype.$touched || forms.info.$submitted) && forms.info.smstype.$invalid}">\n								<label class="control-label">{{\'APPLICATION_SMS_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="item.smstype" name="smstype" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'SMS_TYPE\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n									<ui-select-choices repeat="smstype in [\'basic\',\'classic\',\'classic+\'] | filter: $select.search">\n										<div data-ng-bind="smstype | highlight: $select.search | uppercase" ></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.info.smstype.$touched || forms.info.$submitted) && forms.info.smstype.$invalid && forms.info.smstype.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n								<!-- END TYPE -->\n								<!-- START PHONE FOR SKEBBY ACCOUNT -->\n							<div ng-if= "item.type == \'skebby\' " class="form-group" data-ng-class="{\'has-error\': ( forms.info.phone.$touched ||forms.info.$submitted) && forms.info.phone.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PHONE\' | translate}}<span class="required" aria-required="true"></span></label>\n								<input type="text" ng-pattern="/^[0-9]+$/"  placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="item.phone" name="phone" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_PHONE_NUMBER\' | translate }}\n								</span>\n								<span data-ng-show="(forms.info.phone.$touched || forms.info.$submitted) && forms.info.phone.$invalid && forms.info.phone.$error.required"  class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n								<!-- END PHONE -->\n								<!-- START USERNAME -->\n								<div ng-if= "item.type == \'skebby\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.username.$touched || forms.info.$submitted) && forms.info.username.$invalid}">\n									<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.username" name="username" required/>\n									<span data-ng-show="(forms.info.username.$touched || forms.info.$submitted) && forms.info.username.$invalid && forms.info.username.$error.required"  class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END USERNAME -->\n                <!-- START PASSWORD -->\n                <div ng-if= "item.type == \'skebby\'" class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n                  <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n                  <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n                  <span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid && forms.info.password.$error.required" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n                <!-- END PASSWORD -->\n								<!-- START REMOTE IP -->\n								<div ng-if= "item.type" class="form-group" data-ng-class="{\'has-error\': (forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid}">\n									<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="url" name="remote" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remote" required/>\n									<span class="help-block help-block-info">\n										{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n									</span>\n									<span data-ng-show="(forms.info.remote.$touched || forms.info.$submitted) && forms.info.remote.$invalid && forms.info.remote.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END REMOTE IP -->\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n							</form>\n						</wz-step>\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/inbox/room/room.directive.html",'<!-- BEGIN TODO CONTENT -->\n\n<div class="todo-content">\n	<div class="portlet light">\n		<div class="portlet-title">\n			<div class="caption">\n				<button class="btn btn-sm btn-default green-meadow" data-ng-if="SmsRoom.status !== \'CLOSED\'" data-ng-disabled="!form.body || forms.compose.from.$invalid || forms.compose.to.$invalid" data-ng-click="sendSMS()">\n					<i class="icon-paper-plane" style="color: white;"></i> {{\'APPLICATION_SEND\' | translate}}\n				</button>\n				<span data-ng-show="SmsRoom && SmsRoom.status !== \'CLOSED\'"> | </span>\n				<span data-ng-show="SmsRoom" class="label label-default">#{{SmsRoom.id}} {{SmsRoom.status}}</span>\n				<span data-ng-if="SmsRoom && SmsRoom.ParentId"> | </span>\n				<span data-ng-if="SmsRoom && SmsRoom.ParentId" class="label label-warning"> Ref: <a data-ng-click="openRoom(SmsRoom.ParentId,SmsRoom.contact)">#{{SmsRoom.ParentId}}</a></span>\n			</div>\n			<div class="actions" data-ng-switch="SmsRoom.status">\n				<button class="btn btn-icon-only" data-ng-show="SmsRoom"  data-ng-class="{\'btn-success\':SmsRoom.status !== \'CLOSED\',\'grey-cascade\':SmsRoom.status === \'CLOSED\'}" data-ng-click="closeRoom(SmsRoom.id)"  data-ng-disabled="SmsRoom.status === \'CLOSED\' && SmsRoom.disposition">\n					<i data-ng-class="{\'fa fa-upload\':SmsRoom.status !== \'CLOSED\',\'icon-target\':SmsRoom.status === \'CLOSED\'}"></i>\n				</button>\n				<button  class="btn default btn-icon-only" data-ng-if="SmsRoom && SmsRoom.status !== \'CLOSED\'" type="button" data-ng-click="togglePanelLeft()" title="{{\'APPLICATION_RESIZE\' | translate}}">\n					<i ng-class="panelRight == \'col-md-12\' ? \'icon-size-actual\' : \'icon-size-fullscreen\'"></i>\n				</button>\n			</div>\n		</div>\n		<div class="portlet-body">\n			<div class="row">\n				<div data-ng-show="panelLeft" data-ng-class="panelLeft">\n					<div class="form">\n						<!-- START TAGS -->\n						<div class="form-group" data-ng-if="SmsRoom.status !== \'CLOSED\' || (SmsRoom.status == \'CLOSED\' && form.tags.length)">\n							<div class="row">\n								<div class="col-md-1">\n									<a href="#" class="btn btn-icon-only">\n										<i class="fa fa-tags" style="color: gray;"></i>\n									</a>\n								</div>\n								<div class="col-md-11">\n									<ui-select data-ng-disabled="SmsRoom.status == \'CLOSED\'"  multiple data-ng-model="form.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)">\n										<ui-select-match placeholder="Tags...">{{$item}}</ui-select-match>\n										<ui-select-choices repeat="tag in tags | filter:$select.search" class="">\n											{{tag}}\n										</ui-select-choices>\n									</ui-select>\n								</div>\n							</div>\n						</div>\n						<!-- END TAGS -->\n					</div>\n					<hr data-ng-if="SmsRoom && SmsRoom.status !== \'CLOSED\'">\n\n					<div ng-scrollbars ng-scrollbars-config="{\n						autoHideScrollbar: false,\n						theme: \'light\',\n						advanced: {\n							updateOnContentResize: true\n						},\n						setHeight: 781,\n						scrollInertia: 0\n					}">\n						<ul class="chats">\n							<li data-ng-switch="SmsRoom.status" data-ng-class="{\'in\': smsMessage.status == \'RECEIVED\', \'out\': smsMessage.status == \'SENT\' || smsMessage.status == \'SENDING\' || smsMessage.status == \'FAILED\' || smsMessage.status == \'NOTE\'  || smsMessage.status == \'DELIVERED\' || smsMessage.status == \'QUEUED\' ||  smsMessage.status != \'RECEIVED\' }" data-ng-repeat="smsMessage in SmsRoom.SmsMessages | orderBy:\'-createdAt\'">\n								<div class="avatar" data-ng-class="smsMessage.UserId ? \'pretty-avatar\' : \'pretty-avatar-v\'">\n									<ng-letter-avatar\n									data-ng-if="smsMessage.UserId"\n									height="40"\n									width="40"\n									fontsize="25"\n									data="{{smsMessage.User.fullname}}"\n									avatarcustombgcolor="#B0B0B0"\n									avatarcustomborder="border:2px solid #3399CC"\n									charCount="2"\n									shape="round"></ng-letter-avatar>\n									<ng-letter-avatar\n									data-ng-if="!smsMessage.UserId"\n									height="40"\n									width="40"\n									fontsize="25"\n									data="{{smsMessage.from}}"\n									avatarcustombgcolor="#B0B0B0"\n									avatarcustomborder="border:2px solid #EA4C61"\n									charCount="1"\n									shape="round"></ng-letter-avatar>\n								</div>\n								<sms message="smsMessage" list-id="SmsRoom.SmsAccount.ListId" accounttype=\'SmsRoom.SmsAccount.type\' ng-switch-default></sms>\n							</li>\n						</ul>\n					</div>\n				</div>\n				<div data-ng-class="panelRight">\n					<div class="note note-info" data-ng-if="SmsRoom && SmsRoom.status == \'CLOSED\'">\n						<h4 class="block">Info! {{\'MESSAGE_SMS_ROOM_CLOSED\' | translate}}</h4>\n						<p>\n							{{\'MESSAGE_SMS_ROOM_CLOSED_DETAILS\' | translate}}.\n						</p>\n						<hr>\n						<p>\n							<i class="icon-target"></i> {{\'APPLICATION_DISPOSITION\' | translate}}: <strong>{{SmsRoom.disposition}}</strong>\n						</p>\n						<p>\n							<i class="icon-calendar"></i> {{\'APPLICATION_UPDATED_AT\' | translate}}: <strong>{{SmsRoom.updatedAt | date:\'medium\'}}</strong> (<span am-time-ago="SmsRoom.updatedAt"></span>)\n						</p>\n					</div>\n					<form name="forms.compose" data-ng-submit="forms.compose.$valid && sendSMS()" class="form-horizontal" novalidate>\n						<!-- START HEAD -->\n						<div class="form">\n\n							<!-- START FROM -->\n									<div class="form-group" data-ng-class="{\'has-error\': forms.compose.from.$invalid && forms.compose.$submitted}" data-ng-if="SmsRoom.status !== \'CLOSED\'">\n										<div class="col-md-12">\n											<div class="row">\n												<div class="col-md-1">\n													<label class="control-label">From:</label>\n												</div>\n												<div class="col-md-11">\n													<ui-select  data-ng-disabled="SmsRoom"  theme="bootstrap" name="from" data-ng-model="form.from" required>\n														<ui-select-match placeholder="From...">{{$select.selected.name}}</ui-select-match>\n														<ui-select-choices repeat="smsAccount.phone as smsAccount in smsAccounts | filter: $select.search">\n															<div data-ng-bind-html="smsAccount.name | highlight: $select.search"></div>\n															<small data-ng-bind-html="smsAccount.phone | highlight: $select.search"></small>\n														</ui-select-choices>\n													</ui-select>\n													<span data-ng-show="forms.compose.from.$invalid && forms.compose.$submitted " class="help-block help-block-error">\n														<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n													</span>\n												</div>\n											</div>\n										</div>\n									</div>\n									<!-- END FROM -->\n							<!-- START TO -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.compose.to.$invalid && forms.compose.$submitted}" data-ng-if="SmsRoom.status !== \'CLOSED\'">\n\n								<div class="col-md-12">\n									<div class="row">\n										<div class="col-md-1">\n											<label class="control-label">To:</label>\n										</div>\n										<div class="col-md-11">\n											<input type="text" ng-pattern="/^[\\+]?[0-9]+$/"  name="to" class="form-control todo-taskbody-taskdesc" placeholder="To..." rows="8"   data-ng-disabled="SmsRoom" data-ng-model="form.to" required>\n											<span data-ng-show="forms.compose.to.$invalid && forms.compose.$submitted " class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n									</div>\n								</div>\n							</div>\n							<!-- END TO -->\n							<!-- START CANNED -->\n							<div class="form-group"  data-ng-if="SmsRoom.status !== \'CLOSED\'">\n								<div class="row">\n									<div class="col-md-1">\n										<a href="#" class="btn btn-icon-only">\n											<i class="fa fa-magic" style="color: gray;"></i>\n										</a>\n									</div>\n									<div class="col-md-11">\n										<input  type="text"\n										data-ng-model="modelOptions.selectedAnswer"\n										uib-typeahead="key for key in getAnswers($viewValue)"\n										placeholder="Canned answers.."\n										typeahead-loading="loadingLocations"\n										typeahead-no-results="noResults"\n										typeahead-on-select="onSelect($item)"\n										class="form-control">\n										<i ng-show="loadingLocations" class="glyphicon glyphicon-refresh"></i>\n										<div ng-show="noResults">\n											<i class="glyphicon glyphicon-remove"></i> No Results Found\n										</div>\n									</div>\n								</div>\n\n							</div>\n							<!-- END CANNED -->\n							<!-- START message -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.compose.body.$invalid && forms.compose.$submitted}" data-ng-if="SmsRoom.status !== \'CLOSED\'">\n								<div class="col-md-12">\n									<textarea id="text" class="form-control maxlength-handler" rows="8" maxlength="160" name="body" data-ng-model="form.body" ></textarea>\n									<button id="btnPost" type="button" class="btn btn-success pull-right" ng-class="{\'btn-warning\': form.body.length >= 120, \'btn-danger\': form.body.length >= 141 }">{{ 160 - form.body.length }}</button>\n									<span class="help-block"> Max 160 chars</span>\n									<span data-ng-show="forms.compose.body.$invalid && forms.compose.$submitted " class="help-block help-block-error">\n'+"										<strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n									</span>\n								</div>\n							</div>\n\n							<!-- END message -->\n						</div>\n					</form>\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n<!-- END TODO CONTENT -->\n"),a.put("app/channels/sms/inbox/sms/info.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body"  data-ng-init="initInfo()" style=" overflow-x: auto;">\n  <div class="form-group" ng-if="data">\n    <json-formatter json="data" open="1"></json-formatter>\n  </div>\n  <div class="note note-warning" data-ng-hide="data">\n    <p>\n      {{ \'MESSAGE_NO_INFO_AVAILABLE\' | translate }}\n    </p>\n  </div>\n\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/sms/inbox/sms/sms.html",'<div class="message">\n  <div class="row">\n    <div class="col-md-6">\n      <span class="bold">From: </span>\n      [<a href="" data-ng-click="openContact(smsMessage.from)">{{smsMessage.from}}</a>]\n      <br>\n      <span class="bold">To: </span>\n      [<a href="" data-ng-click="openContact(smsMessage.to)">{{smsMessage.to}}</a>]\n      <br>\n    </div>\n    <div class="col-md-6">\n      <span class="pull-right" data-ng-if="smsMessage.User">{{\'APPLICATION_SENT_BY\' | translate}}: <strong>{{smsMessage.User.fullname}}</strong></span>\n      <span class="pull-right" data-ng-if="smsMessage.source">{{\'APPLICATION_SENT_BY\' | translate}}: <strong>Cally &#178;</strong>\n        <a ng-click="info(smsMessage.source)"><i class="icon-info font-blue"></i>\n        </a>\n    </div>\n  </div>\n\n  <br>\n  <span class="todo-tasklist-date">\n    <span class="pull-right" data-ng-switch="smsMessage.status">\n      <a ng-switch-when="RECEIVED" href="#" class="btn default btn-xs inactive-link green-stripe"> {{smsMessage.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n      <a ng-switch-when="SENT" href="#" class="btn default btn-xs inactive-link green-stripe"> {{smsMessage.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n      <a ng-switch-when="DELIVERED" href="#" class="btn default btn-xs inactive-link green-stripe"> {{smsMessage.status | uppercase}}\n        <i class="fa fa-check"></i>\n      </a>\n      <a ng-switch-when="SENDING" href="#" class="btn default btn-xs inactive-link blue-stripe" > {{smsMessage.status | uppercase}}\n        <i class="fa fa-warning"></i>\n      </a>\n      <a ng-switch-when="FAILED" href="#" class="btn default btn-xs red-stripe" data-ng-click="info(null,smsMessage.res_data)"> {{smsMessage.status | uppercase}}\n        <i class="fa fa-times"></i>\n      </a>\n      <a ng-switch-default href="#" class="btn default btn-xs"> {{smsMessage.status | uppercase}}\n      </a>\n      <br>\n      <!-- <a ng-href="https://www.twilio.com/docs/errors/{{smsMessage.errorcode}}" target="_blank" ng-if="(smsMessage.errorcode) && (accounttype==\'twilio\')">Error Code:{{smsMessage.errorcode}}</a>\n      <a ng-href="{{smsMessage.errorcode.length > 2 ? \'http://www.skebby.com/sms-api/sms-gateway/developers-docs/#receiveNotifySection\' : \'http://www.skebby.com/sms-api/sms-gateway/developers-docs/#errorCodesSection\'}}" target="_blank" ng-if="(smsMessage.errorcode != 1) && (smsMessage.errorcode) && (accounttype==\'skebby\')">Error Code:{{smsMessage.errorcode}}</a> -->\n    </span>\n\n    <i class="icon-calendar"></i> <span am-time-ago="smsMessage.updatedAt"></span>\n  </span>\n  <hr>\n  <span class="body text-left" data-ng-bind-html="smsMessage.body" style="white-space: pre-wrap;"></span>\n\n  </div>\n'),a.put("app/channels/sms/inbox/view/account/list/list.html",'<!-- BEGIN Portlet PORTLET-->\n<div class="portlet light" data-ng-init="initView()">\n	<div class="portlet-title">\n		<div class="caption">\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'NEW\'" uib-uncheckable>NEW</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'OPEN\'" uib-uncheckable>OPEN</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'PENDING\'" uib-uncheckable>PENDING</button>\n			</div>\n			<div class="btn-group btn-group-solid">\n				<button type="button" class="btn btn-sm default" data-ng-model="query.status" uib-btn-radio="\'CLOSED\'" uib-uncheckable>CLOSED</button>\n			</div>\n		</div>\n		<div class="actions">\n			<a href="#" class="btn btn-icon-only default" data-ng-click="getPage();">\n				<i class="fa fa-refresh"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only red" data-ng-click="deleteItems();" data-ng-show="id.length && isAdmin">\n				<i class="fa fa-trash"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only btn-success" data-ng-click="disposeItems();" data-ng-show="id.length">\n				<i class="fa fa-upload"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only blue" data-ng-click="tagItems();" data-ng-show="id.length">\n				<i class="fa fa-tags"></i>\n			</a>\n			<a href="#" class="btn btn-icon-only green" data-ng-click="openRoom(null, \'New Message\')">\n				<i class="fa fa-plus"></i>\n			</a>\n		</div>\n	</div>\n	<div class="portlet-title" data-ng-show="tags.length">\n		<!-- START TAGS -->\n		<div class="form-group">\n			<div class="row">\n				<div class="col-md-1">\n					<a href="#" class="btn btn-icon-only">\n						<i class="fa fa-tags" style="color: gray;"></i>\n					</a>\n				</div>\n				<div class="col-md-11">\n					<ui-select multiple data-ng-model="query.tags" theme="bootstrap" on-select="onChanged($item, $model)" on-remove="onChanged($item, $model)">\n						<ui-select-match placeholder="Search by tag...">{{$item}}</ui-select-match>\n						<ui-select-choices repeat="tag in tags | filter:$select.search">\n							{{tag}}\n						</ui-select-choices>\n					</ui-select>\n				</div>\n			</div>\n		</div>\n		<!-- END TAGS -->\n	</div>\n	<div class="portlet-body">\n		<!-- BEGIN UI-GRID SPINNER -->\n		<span us-spinner spinner-key="spinner-grid" spinner-start-active="false"></span>\n		<!-- END UI-GRID SPINNER -->\n\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-pagination ui-grid-selection ui-grid-exporter class="ui-grid">\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END Portlet PORTLET-->\n'),a.put("app/channels/sms/inbox/view/view.agents.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_AGENTS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TRANSPORT -->\n  <div class="form-group">\n    <form name="form" novalidate>\n      <!-- START TRANSPORT -->\n      <div class="form-group">\n        <ui-select multiple name="agents" data-ng-model="item.agents" theme="bootstrap">\n          <ui-select-match placeholder="{{\'APPLICATION_AGENTS\' | translate}}">{{$item.fullname}}</ui-select-match>\n          <ui-select-choices repeat="agent.id as agent in agents | filter: $select.search">\n            {{agent.fullname}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n      <!-- END TRANSPORT -->\n    </form>\n  </div>\n  <!-- END TRANSPORT -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/sms/inbox/view/view.html",'<div class="row">\n  <div class="col-md-12">\n    <div class="page-bar">\n      <ul class="page-breadcrumb">\n        <li>\n          <i class="icon-rocket"></i>\n          <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="fa fa-spinner"></i>\n          <a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="glyphicon glyphicon-comment"></i>\n          <a href="#">{{ \'APPLICATION_SMS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n					<i class="icon-note"></i>\n					<a href="/channels/sms/inbox/list">{{ \'APPLICATION_INBOX\' | translate }}</a>\n				</li>\n      </ul>\n    </div>\n  </div>\n</div>\n\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row inbox" data-ng-init="initView()">\n	<div class="col-md-3">\n		<ul class="inbox-nav margin-bottom-10">\n			<li data-ng-class="{active: $stateParams.id == smsAccount.id}" data-ng-repeat="smsAccount in smsAccounts">\n				<a href="/channels/sms/inbox/view/account/{{smsAccount.id}}/list" class="btn">\n					<i class="icon-notebook"></i> {{smsAccount.name}}\n				</a>\n        <b></b>\n			</li>\n		</ul>\n	</div>\n\n	<div class="col-md-9" >\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view>\n			<div class="note note-info">\n				<h4 class="block">Info! {{\'APPLICATION_NO_ACCOUNT_SELECTED\' | translate}}</h4>\n			</div>\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/inbox/view/view.status.modal.html",'<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title | translate" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p ng-if="modal.text && !closed" ng-bind="modal.text | translate"></p>\n  <form name="form" novalidate data-ng-init="initDisposition()">\n  <div class="form-group">\n    <ui-select data-ng-model="item.disposition" name="list" theme="bootstrap" data-ng-disabled="!dispositions.length" required>\n      <ui-select-match placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}">{{$select.selected.name}}</ui-select-match>\n      <ui-select-choices repeat="disposition.name as disposition in dispositions | filter: $select.search">\n        <div ng-bind-html="disposition.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n  <div class="note note-warning" data-ng-hide="dispositions.length">\n    <h4 class="block">Warning!</h4>\n    <p>\n      {{ \'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate }}\n    </p>\n  </div>\n</form>\n  <!-- <div ng-if="modal.html" ng-bind-html="modal.html"></div> -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n  <!-- <button ng-repeat="button in modal.buttons" ng-class="button.classes" ng-click="button.click($event)" ng-bind="button.text" class="btn"></button> -->\n</div>\n'),
+a.put("app/channels/sms/inbox/view/view.tags.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_TAGS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TRANSPORT -->\n  <div class="form-group">\n    <form name="form" novalidate>\n      <!-- START TAGS -->\n      <div class="form-group">\n        <ui-select multiple data-ng-model="item.tags" theme="bootstrap">\n          <ui-select-match placeholder="{{\'APPLICATION_TAGS\' | translate}}">{{$item}}</ui-select-match>\n          <ui-select-choices repeat="tag in tags | filter: $select.search">\n            {{tag}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n      <!-- END TAGS -->\n    </form>\n  </div>\n  <!-- END TRANSPORT -->\n</div>\n<div class="modal-footer">\n  <button type="button" class="btn" data-ng-class="button.class" data-ng-click="button.click()"data-ng-repeat="button in modal.buttons">{{button.text | translate}}</button>\n  <!-- <button class="btn btn-success" type="button" data-ng-click="ok()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button> -->\n</div>\n'),a.put("app/channels/sms/inbox/view/view.templates.modal.html",'<div class="modal-header" data-ng-init="initModal()">\n  <h3 class="modal-title">{{ \'APPLICATION_TEMPLATES\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <div class="note note-info" data-ng-show="!templates.length">\n    <h4 class="block">Info!</h4>\n    <p>\n      {{\'MESSAGE_NO_TEMPLATES_AVAILABLE\' | translate}}\n    </p>\n  </div>\n  <form name="form" data-ng-show="templates.length" novalidate>\n    <div class="form-group">\n      <ui-select data-ng-model="item.template" theme="bootstrap">\n        <ui-select-match placeholder="Select a template in the list or search his name...">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="template in templates | propsFilter: {name: $select.search}">\n          <div ng-bind-html="template.name | highlight: $select.search"></div>\n          <small data-ng-show="template.description">\n            {{\'APPLICATION_DESCRIPTION\' | translate}}: {{template.description}}\n          </small>\n        </ui-select-choices>\n      </ui-select>\n    </div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="templates.length">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/sms/queue/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required />\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$invalid && form.name.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START STRATEGY -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.strategy.$touched || form.$submitted) && form.strategy.$invalid}">\n      <label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.strategy" name="strategy" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.toUpperCase()}}</ui-select-match>\n        <ui-select-choices repeat="strategy in strategies | filter: $select.search">\n          <div ng-bind-html="strategy.toUpperCase() | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.strategy.$touched || form.$submitted) && form.strategy.$invalid && form.strategy.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END STRATEGY -->\n\n    <!-- START TIMEOUT -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.timeout.$touched || form.$submitted) && form.timeout.$invalid}">\n      <label class="control-label">{{\'APPLICATION_AGENT_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="number" min="0" name="timeout" placeholder="Timeout" class="form-control" data-ng-model="item.timeout" required min="1"/>\n      <span data-ng-show="(form.timeout.$touched || form.$submitted) && form.timeout.$invalid && form.timeout.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TIMEOUT -->\n\n    <!-- START AGENTS-->\n    <div class="form-body" data-ng-init="getTeams()">\n      <label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n      <div class="input-group input-small mbottom20">\n        <input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="item.penalty" readonly>\n        <div class="spinner-buttons input-group-btn btn-group-vertical">\n          <button type="button" class="btn spinner-up btn-xs blue" data-ng-click="item.penalty=item.penalty+1">\n            <i class="fa fa-angle-up"></i>\n          </button>\n          <button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!item.penalty" data-ng-click="item.penalty=item.penalty-1">\n            <i class="fa fa-angle-down"></i>\n          </button>\n        </div>\n      </div>\n      <div class="form-group last">\n        <div class="col-md-12" id="multi-select-team">\n        </div>\n      </div>\n    </div>\n    <!-- END AGENTS-->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/sms/queue/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-spinner"></i>\n						<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="glyphicon glyphicon-comment"></i>\n						<a href="#">{{ \'APPLICATION_SMS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-docs"></i>\n						<a href="#">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_QUEUES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="#" data-ng-click="createItem()" data-ng-if="Auth.isAdmin()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_QUEUE\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n						<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/queue/view/view.agents.html",'<div class="row" data-ng-init="getTeams()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="note note-warning" data-ng-hide="teams.length">\n				<h4 class="block">Warning!</h4>\n				<p>\n					 {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\n				</p>\n			</div>\n			<div class="portlet-body">\n				<!-- BEGIN FORM-->\n				<form action="index.html" class="form-horizontal form-row-seperated">\n					<div class="form-body">\n						<label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n						<div class="input-group input-small mbottom20">\n							<input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="queue.penalty" readonly>\n							<div class="spinner-buttons input-group-btn btn-group-vertical">\n								<button type="button" class="btn spinner-up btn-xs blue" data-ng-click="queue.penalty=queue.penalty+1">\n									<i class="fa fa-angle-up"></i>\n								</button>\n								<button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!queue.penalty" data-ng-click="queue.penalty=queue.penalty-1">\n									<i class="fa fa-angle-down"></i>\n								</button>\n							</div>\n						</div>\n						<div class="form-group last">\n							<div class="col-md-12" id="multi-select-team">\n							</div>\n						</div>\n					</div>\n				</form>\n				<!-- END FORM-->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/sms/queue/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getQueue()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="glyphicon glyphicon-comment"></i>\n					<a href="#">{{ \'APPLICATION_SMS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/channels/sms/queues/list">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					<i data-ng-show="queue" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="queue">\n					<a href="#">{{queue.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/queue.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{queue.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n					{{user.role}}\n				</div> -->\n			</div>\n			<!-- END SIDEBAR USER TITLE -->\n\n			<!-- SIDEBAR MENU -->\n			<div class="profile-usermenu">\n				<ul class="nav">\n					<li data-ng-class="{active: $state.is(\'main.channels.sms.queues.view.settings\')}">\n						<a data-ng-href="/channels/sms/queues/view/{{queue.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.channels.sms.queues.view.agents\')}" data-ng-show="Auth.getCurrentUser().role === \'admin\'">\n							<a data-ng-href="/channels/sms/queues/view/{{queue.id}}/agents">\n								<i class="icon-people"></i>\n								{{ \'APPLICATION_AGENTS\' | translate}} </a>\n							</li>\n						</ul>\n					</div>\n					<!-- END MENU -->\n				</div>\n				<!-- END PORTLET main.channels -->\n			</div>\n			<!-- END BEGIN PROFILE SIDEBAR -->\n			<!-- BEGIN PROFILE CONTENT -->\n			<div ui-view class="profile-content">\n			</div>\n			<!-- END PROFILE CONTENT -->\n		</div>\n	</div>\n	<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/queue/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.general" data-ng-submit="forms.general.$valid && updateSmsQueue()" novalidate>\n					<!-- START NAME -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="queue.name" data-ng-pattern="settings.patternName" required />\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n						<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.pattern" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n						</span>\n					</div>\n					<!-- END NAME -->\n\n					<!-- START STRATEGY -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.general.strategy.$touched || forms.general.$submitted) && forms.general.strategy.$invalid}">\n						<label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}</label>\n						<ui-select data-ng-model="queue.strategy" name="strategy" theme="bootstrap">\n							<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | uppercase}}</ui-select-match>\n							<ui-select-choices repeat="strategy in strategies | filter: $select.search">\n								<div ng-bind-html="strategy | uppercase | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n					</div>\n					<!-- END STRATEGY -->\n\n					<!-- START TIMEOUT -->\n					<div class="form-group">\n						<label class="control-label">Timeout</label>\n						<input type="number" name="timeout" placeholder="Timeout" class="form-control" min="1" data-ng-model="queue.timeout"/>\n					</div>\n					<!-- END TIMEOUT -->\n\n					<!-- START DESCRIPTION -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n						<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="queue.description"/>\n					</div>\n					<!-- END DESCRIPTION -->\n\n					<input data-ng-if="Auth.isAdmin()" class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/sms/realtime/view/agent/agent.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-tree-view ui-grid-expandable-row ui-grid-pagination ui-grid-auto-resize>\n			<span us-spinner spinner-key="grid-spinner" spinner-start-active="true"></span>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/realtime/view/agent/agent.modal.info.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INTERFACE_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<div data-ng-if="agent.ipaddr" class="well">\n  <div>{{agent.ipaddr}}:{{agent.port}}</div>\n  <div>{{agent.fullcontact}}</div>\n  <div>{{agent.useragent}}</div>\n  <div>{{agent.lastms}}</div>\n</div>\n<div data-ng-if="!agent.ipaddr" class="alert alert-danger" role="alert">\n  {{\'MESSAGE_NO_AVAILABLE_INFO\' | translate}}\n</div>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/sms/realtime/view/agent/queue.modal.add.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_JOIN_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <div class="form-group row">\n  <label class="col-md-2 control-label" style="margin-top: 7px;">{{\'APPLICATION_QUEUE\' | translate}}:</label>\n  <div class="col-md-10">\n    <ui-select multiple ng-model="item.queues" theme="bootstrap" required>\n      <ui-select-match placeholder="{{\'APPLICATION_QUEUE\' | translate}}">{{$item.name}}</ui-select-match>\n      <ui-select-choices repeat="queue.id as queue in queues | filter: $select.search">\n        <div ng-bind-html="queue.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n</div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/sms/realtime/view/application/application.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initApplications()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns class="ui-grid" ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/realtime/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-directions"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="glyphicon glyphicon-comment"></i>\n					<a href="#">{{ \'APPLICATION_SMS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-energy"></i>\n					<a href="#">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<div>\n			<nav class="navbar navbar-default" role="navigation">\n				<div class="collapse navbar-collapse">\n					<ul class="nav navbar-nav">\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.sms.realtime.view.agents\')}">\n							<a href="/channels/sms/realtime/view/agents">\n								{{\'APPLICATION_AGENTS\' | translate}}\n							</a>\n						</li>\n						<li data-ng-class="{\'active\': $state.is(\'main.channels.sms.realtime.view.applications\')}">\n							<a href="/channels/sms/realtime/view/applications">\n								{{\'APPLICATION_APPLICATIONS\' | translate}}\n							</a>\n						</li>\n					</ul>\n				</div>\n			</nav>\n		</div>\n\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/sms/realtime/view/view.queue.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div id="grid1" ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-tree-view class="grid">\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/chanspy/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CHANSPY\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START PREFIX -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.prefix.$touched || form.$submitted) && form.prefix.$invalid}">\n      <label class="control-label">{{\'APPLICATION_PREFIX\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="prefix" placeholder="{{\'APPLICATION_PREFIX\' | translate}}" class="form-control" data-ng-model="item.prefix" required/>\n      <span data-ng-show="(form.prefix.$touched || form.$submitted) && form.prefix.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END PREFIX -->\n\n    <!-- START OPTIONS -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.options.$touched || form.$submitted) && form.options.$invalid}">\n      <label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select multiple data-ng-model="item.options" name="options" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item.value}}: {{$item.name | translate}}</ui-select-match>\n        <ui-select-choices repeat="option.value as option in options | filter: $select.search">\n          <div ng-bind-html="option.value + \': \' + (option.name | translate) | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.options.$touched || form.$submitted) && form.options.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END OPTIONS -->\n\n    <!-- START AUTH -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_AUTH\' | translate}}</label></br>\n      <input\n      bs-switch\n      class="form-control"\n      ng-model="item.auth"\n      type="checkbox"\n      name="auth"\n      data-ng-init="item.auth = 0"\n      switch-active="{{ recordSwitch.isActive }}"\n      switch-on-text="{{ recordSwitch.onText }}"\n      switch-off-text="{{ recordSwitch.offText }}"\n      switch-on-color="{{ recordSwitch.onColor }}"\n      switch-off-color="{{ recordSwitch.offColor }}"\n      switch-animate="{{ recordSwitch.animate }}"\n      switch-size="{{ recordSwitch.size }}"\n      switch-label="{{ recordSwitch.label }}"\n      switch-icon="{{ recordSwitch.icon }}"\n      switch-radio-off="{{ recordSwitch.radioOff }}"\n      switch-label-width="{{ recordSwitch.labelWidth }}"\n      switch-handle-width="{{ recordSwitch.handleWidth }}">\n    </div>\n    <!-- END AUTH -->\n\n    <!-- START PASSWORD -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.password.$touched || form.$submitted) && form.password.$invalid}">\n      <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span data-ng-show="item.auth" class="required" aria-required="true">*</span></label>\n      <input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" data-ng-disabled="!item.auth" data-ng-required="item.auth"/>\n      <span data-ng-show="(form.password.$touched || form.$submitted) && form.password.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END PASSWORD -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/voice/chanspy/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-user-secret"></i>\n					<a href="/channels/voice/chanspys/list">{{ \'APPLICATION_CHANSPY\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="fa fa-user-secret font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_CHANSPY\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CHANSPY\' | translate }}\n						</button>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/chanspy/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getChanSpy()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-user-secret"></i>\n					<a href="/channels/voice/chanspy/list">{{ \'APPLICATION_CHANSPY\' | translate }}</a>\n					<i data-ng-show="chanspy" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="chanspy">\n					<a href="#">{{chanspy.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/chanspy.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{chanspy.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.chanspy.view.settings\')}">\n							<a data-ng-href="/channels/voice/chanspy/view/{{chanspy.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/channels/voice/chanspy/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_CHANSPY\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateChanSpy()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="chanspy.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START PREFIX -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.general.prefix.$touched || form.general.$submitted) && form.general.prefix.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PREFIX\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="prefix" placeholder="{{\'APPLICATION_PREFIX\' | translate}}" class="form-control" data-ng-model="chanspy.prefix" required/>\n								<span data-ng-show="(form.general.prefix.$touched || form.general.$submitted) && form.general.prefix.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PREFIX -->\n\n							<!-- START OPTIONS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.general.options.$touched || form.general.$submitted) && form.general.options.$invalid}">\n								<label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select multiple data-ng-model="chanspy.options" name="options" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item.value}}: {{$item.name | translate}}</ui-select-match>\n									<ui-select-choices repeat="option.value as option in options | filter: $select.search">\n										<div ng-bind-html="option.value + \': \' + (option.name | translate) | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(form.general.options.$touched || form.general.$submitted) && form.general.options.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END OPTIONS -->\n\n							<!-- START AUTH -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_AUTH\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="chanspy.auth"\n								type="checkbox"\n								name="auth"\n								switch-active="{{ recordSwitch.isActive }}"\n								switch-on-text="{{ recordSwitch.onText }}"\n								switch-off-text="{{ recordSwitch.offText }}"\n								switch-on-color="{{ recordSwitch.onColor }}"\n								switch-off-color="{{ recordSwitch.offColor }}"\n								switch-animate="{{ recordSwitch.animate }}"\n								switch-size="{{ recordSwitch.size }}"\n								switch-label="{{ recordSwitch.label }}"\n								switch-icon="{{ recordSwitch.icon }}"\n								switch-radio-off="{{ recordSwitch.radioOff }}"\n								switch-label-width="{{ recordSwitch.labelWidth }}"\n								switch-handle-width="{{ recordSwitch.handleWidth }}">\n							</div>\n							<!-- END AUTH -->\n\n							<!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.general.password.$touched || form.general.$submitted) && form.general.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" data-ng-show="chanspy.auth" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="chanspy.password" data-ng-disabled="!chanspy.auth" data-ng-required="chanspy.auth"/>\n								<span data-ng-show="(form.general.password.$touched || form.general.$submitted) && form.general.password.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="chanspy.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/voice/context/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CONTEXT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/voice/context/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="#">{{ \'APPLICATION_CONTEXTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_CONTEXTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="#" data-ng-click="createItem()">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONTEXT\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/context/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getContext()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/channels/voice/contexts/list">{{ \'APPLICATION_CONTEXTS\' | translate }}</a>\n					<i data-ng-show="context" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="context">\n					<a href="#">{{context.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/context.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{context.name}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.contexts.view.settings\')}">\n							<a data-ng-href="/channels/voice/contexts/view/{{context.id}}/settings">\n								<i class="icon-settings"></i>\n								{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n							</li>\n						</ul>\n					</div>\n					<!-- END MENU -->\n				</div>\n				<!-- END PORTLET main.channels -->\n			</div>\n			<!-- END BEGIN PROFILE SIDEBAR -->\n			<!-- BEGIN PROFILE CONTENT -->\n			<div ui-view class="profile-content">\n			</div>\n			<!-- END PROFILE CONTENT -->\n		</div>\n	</div>\n	<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/context/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_CONTEXT\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateVoiceContext()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="context.name" required readonly/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_CANT_EDIT_NAME\' | translate }}\n								</span>\n								<span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="context.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/voice/disposition/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-target"></i>\n					<a href="/channels/voice/dispositions/list">{{ \'APPLICATION_DISPOSITIONS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_DISPOSITIONS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<a href="#" class="btn btn-icon-only green" data-ng-click="addDisposition();">\n						<i class="fa fa-plus"></i>\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<div class="row" data-ng-hide="dispositions.length">\n						<div class="col-md-12">\n							<div class="note note-info">\n								<h4 class="block">Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}</h4>\n							</div>\n						</div>\n					</div>\n\n					<!-- GENERAL TAB -->\n					<div class="row" data-ng-repeat="disposition in dispositions">\n						<div class="col-md-12 form-group">\n							<div class="input-group">\n								<div>\n									<input class="form-control" type="text" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" data-ng-model="disposition.name">\n								</div>\n								<span class="input-group-btn">\n									<button class="btn btn-success" type="button" data-ng-click="updateDisposition(disposition.id, disposition.name);"><i class="fa fa-cloud-upload fa-fw"></i> {{\'APPLICATION_UPDATE\' | translate}}</button>\n									<button class="btn btn-danger" type="button" data-ng-click="deleteDisposition(disposition.id);"><i class="fa fa-times fa-fw"></i> {{\'APPLICATION_DELETE\' | translate}}</button>\n								</span>\n							</div>\n						</div>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/disposition/list/modal/add.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_DISPOSITIONS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.form.$touched || form.$submitted) && form.form.$invalid}">\n      <div class="">\n        <input type="text" name="form" placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}" class="form-control" data-ng-model="name" required/>\n        <span data-ng-show="form.form.$touched && form.form.$error.required" class="help-block help-block-error">\n          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n        </span>\n      </div>\n    </div>\n    <!-- END NAME -->\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" data-ng-click="ok()" data-ng-show="form.$valid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" data-ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/voice/moh/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_MOH_CLASS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/voice/moh/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-music-tone"></i>\n					<a href="#">{{ \'APPLICATION_MOHS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-music-tone font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_MOHS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="#" data-ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_MOH_CLASS\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/moh/view/view.addFiles.html",'\n<div class="row" data-ng-init="getSounds()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_MOH\' | translate }} {{ \'APPLICATION_ADD_FILES\' | translate }}</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<div class="note note-warning" data-ng-hide="soundList.length">\n					<h4 class="block">Warning!</h4>\n					<p>\n						 {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n					</p>\n					<p>\n						{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/sounds/list">{{\'APPLICATION_SOUNDS\' | translate}}</a>\n					</p>\n				</div>\n            <form name="forms.general" data-ng-submit="(item.sounds.length > 0) && addMohs()" data-ng-show="soundList.length" novalidate>\n\n              <!-- START SOUNDS -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.sounds.$touched || forms.general.$submitted) && item.sounds.length == 0}">\n                <label class="control-label">{{\'APPLICATION_SOUNDS\' | translate}}<span class="required" aria-required="true">*</span></label>\n                <ui-select multiple data-ng-model="item.sounds" theme="bootstrap" name="sounds" required>\n                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item.display_name}}</ui-select-match>\n                  <ui-select-choices repeat="sound.id as sound in soundList | filter: $select.search">\n                    {{sound.display_name}}\n                  </ui-select-choices>\n                </ui-select>\n                <span data-ng-show="(forms.general.sounds.$touched || forms.general.$submitted) && item.sounds.length == 0" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END OPTIONS -->\n\n							<input type="submit" class="btn green-haze" value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</form>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/moh/view/view.audios.html",'<div ui-view class="profile-content">\n<div class="row" data-ng-init="getAudioFiles()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title  tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AUDIOS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="audioFiles">\n						<a class="btn green-jungle " href="/channels/voice/mohs/view/{{moh.id}}/add" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_ADD_FILES\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<div class="note note-warning" data-ng-hide="audioFiles">\n					<h4 class="block">Warning!</h4>\n					<p>\n						 {{ \'MESSAGE_FOLDER_DOES_NOT_EXIST\' | translate }}\n					</p>\n				</div>\n				<!-- START TABLE -->\n				<table class="table table-striped table-bordered table-hover" data-ng-show="audioFiles">\n					  <thead>\n						  <tr>\n						    <th>{{ \'APPLICATION_NAME\' | translate }}</th>\n								<th width="30%">{{ \'APPLICATION_PREVIEW\' | translate }}</th>\n								<th width="10%">{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n						  </tr>\n					  </thead>\n					  <tbody data-ng-model="audioFiles">\n					    <tr data-ng-repeat="audiofile in audioFiles">\n								<td>{{audiofile}}</td>\n								<td>\n									<audio controls ng-src="{{getSecureSrc(audioSources[audiofile])}}" preload="none">\n				            Your browser does not support the audio tag.\n				          </audio></td>\n					      <td>\n					        <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(audiofile,audiofile)">\n										{{ \'APPLICATION_DELETE\' | translate }}\n					        </a>\n					      </td>\n					    </tr>\n							<tr data-ng-hide="audioFiles.length">\n								<td colspan="3" style="text-align:center;">\n									<i>{{ \'MESSAGE_NO_AUDIOFILES_AVAILABLE\' | translate }}</i>\n								</td>\n							</tr>\n					  </tbody>\n				</table>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/channels/voice/moh/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getMoh()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-music-tone"></i>\n					<a href="/channels/voice/mohs/list">{{ \'APPLICATION_MOH_CLASS\' | translate }}</a>\n					<i data-ng-show="moh" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="moh">\n					<a href="#">{{moh.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/moh.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{moh.name}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.mohs.view.settings\')}">\n							<a data-ng-href="/channels/voice/mohs/view/{{moh.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.mohs.view.audios\') || $state.is(\'main.channels.voice.mohs.view.add\')}">\n							<a data-ng-href="/channels/voice/mohs/view/{{moh.id}}/audios">\n							<i class="icon-list"></i>\n							{{ \'APPLICATION_AUDIOS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET main.channels -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/moh/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_MOH_CLASS\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body" data-ng-init="getContexts();">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateVoiceMoh()" novalidate>\n\n	            <!-- START PATH -->\n	            <div class="form-group" >\n	              <label class="control-label">{{\'APPLICATION_PATH\' | translate}}</label>\n	              <input type="text" name="path" class="form-control" data-ng-model="moh.directory" disabled/>\n	            </div>\n	            <!-- END PATH -->\n\n	            <!-- START SORT -->\n	            <div class="form-group" data-ng-class="{\'has-error\': (forms.general.sort.$touched || forms.general.$submitted) && forms.general.sort.$invalid}">\n	              <label class="control-label">{{\'APPLICATION_SORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n	              <ui-select data-ng-model="moh.sort" theme="bootstrap" name="sort" required>\n	                <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$translate.instant($select.selected.name)}}</ui-select-match>\n	                <ui-select-choices repeat="sort.value as sort in sortOptions | filter: $select.search">\n	                  {{$translate.instant(sort.name)}}\n	                </ui-select-choices>\n	              </ui-select>\n	              <span data-ng-show="(forms.general.sort.$touched || forms.general.$submitted) && forms.general.sort.$error.required" class="help-block help-block-error">\n	                <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n	              </span>\n	            </div>\n	            <!-- END SORT -->\n\n	            <!-- START DESCRIPTION -->\n				      <div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.description.$invalid}">\n				        <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n				        <textarea type="text" name="description" class="form-control" data-ng-model="moh.description"/></textarea>\n								<span data-ng-show="forms.general.$submitted && forms.general.description.$invalid" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				        </span>\n				      </div>\n				      <!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
+a.put("app/channels/voice/queue/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.queue.name.$touched || form.queue.$submitted) && form.queue.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required />\n      <span data-ng-show="(form.queue.name.$touched || form.queue.$submitted) && form.queue.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.queue.name.$touched || form.queue.$submitted) && form.queue.name.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START STRATEGY -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.queue.strategy.$touched || form.queue.$submitted) && form.queue.strategy.$invalid}">\n      <label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.strategy" name="strategy" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.toUpperCase()}}</ui-select-match>\n        <ui-select-choices repeat="strategy in [\'ringall\', \'leastrecent\', \'fewestcalls\', \'random\', \'rrmemory\', \'linear\', \'wrandom\', \'rrordered\'] | filter: $select.search">\n          <div ng-bind-html="strategy.toUpperCase() | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span class="help-block">\n        {{ \'DESCRIPTION_QUEUE_STRATEGY\' | translate }}\n      </span>\n      <span data-ng-show="(form.queue.strategy.$touched || form.queue.$submitted) && form.queue.strategy.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END STRATEGY -->\n\n    <!-- START AGENTS-->\n    <div class="form-body" data-ng-init="getTeams()">\n      <label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n      <div class="input-group input-small mbottom20">\n        <input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="item.penalty" readonly>\n        <div class="spinner-buttons input-group-btn btn-group-vertical">\n          <button type="button" class="btn spinner-up btn-xs blue" data-ng-click="item.penalty=item.penalty+1">\n            <i class="fa fa-angle-up"></i>\n          </button>\n          <button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!item.penalty" data-ng-click="item.penalty=item.penalty-1">\n            <i class="fa fa-angle-down"></i>\n          </button>\n        </div>\n      </div>\n      <div class="form-group last">\n        <div class="col-md-12" id="multi-select-team">\n        </div>\n      </div>\n    </div>\n    <!-- END AGENTS-->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/voice/queue/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="#">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_QUEUES\' | translate }}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="#" data-ng-click="createItem()" data-ng-if="Auth.isAdmin()">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_QUEUE\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/queue/view/view.agents.html",'<div class="row" data-ng-init="getTeams()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="note note-warning" data-ng-hide="teams.length">\n				<h4 class="block">Warning!</h4><p>{{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}</p>\n			</div>\n			<div class="portlet-body">\n				<!-- BEGIN FORM-->\n				<form action="index.html" class="form-horizontal form-row-seperated">\n					<div class="form-body">\n						<label for="penalty">{{\'APPLICATION_PENALTY\' | translate}}</label>\n						<div class="input-group input-small mbottom20">\n							<input type="number" class="spinner-input form-control" maxlength="3" data-ng-model="queue.penalty" readonly>\n							<div class="spinner-buttons input-group-btn btn-group-vertical">\n								<button type="button" class="btn spinner-up btn-xs blue" data-ng-click="queue.penalty=queue.penalty+1">\n									<i class="fa fa-angle-up"></i>\n								</button>\n								<button type="button" class="btn spinner-down btn-xs blue" data-ng-disabled="!queue.penalty" data-ng-click="queue.penalty=queue.penalty-1">\n									<i class="fa fa-angle-down"></i>\n								</button>\n							</div>\n						</div>\n						<div class="form-group last">\n							<div class="col-md-12" id="multi-select-team">\n							</div>\n						</div>\n					</div>\n				</form>\n				<!-- END FORM-->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/voice/queue/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getQueue()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/channels/voice/queues/list">{{ \'APPLICATION_QUEUES\' | translate }}</a>\n					<i data-ng-show="queue" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="queue">\n					<a href="#">{{queue.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/queue.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{queue.name}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.queues.view.settings\')}">\n							<a data-ng-href="/channels/voice/queues/view/{{queue.name}}/settings"> <i class="icon-settings"></i> {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.queues.view.agents\')}" data-ng-show="Auth.getCurrentUser().role === \'admin\'">\n							<a data-ng-href="/channels/voice/queues/view/{{queue.name}}/agents"><i class="icon-people"></i>{{ \'APPLICATION_AGENTS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET main.channels -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/queue/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_QUEUE_SETTINGS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_PERIODIC_ANNOUNCE\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_ADVANCED\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body" data-ng-init="getContexts();getMohs();getSounds();">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && forms.announce.$valid && updateVoiceQueue()" novalidate>\n							<div class="row">\n								<div class="col-md-6">\n							<!-- START STRATEGY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.strategy.$touched || forms.general.$submitted) && forms.general.strategy.$invalid}">\n								<label class="control-label">{{\'APPLICATION_STRATEGY\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="queue.strategy" name="strategy" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.toUpperCase()}}</ui-select-match>\n									<ui-select-choices repeat="strategy in [\'ringall\', \'leastrecent\', \'fewestcalls\', \'random\', \'rrmemory\', \'linear\', \'wrandom\', \'rrordered\'] | filter: $select.search">\n										<div ng-bind-html="strategy.toUpperCase() | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_STRATEGY\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.strategy.$touched || forms.general.$submitted) && forms.general.strategy.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n				      <!-- END STRATEGY -->\n\n							<!-- START MOH -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.musiconhold.$touched || forms.general.$submitted) && forms.general.musiconhold.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MOH\' | translate}}</label>\n								<ui-select data-ng-model="queue.musiconhold" name="musiconhold" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="musiconhold.name as musiconhold in voiceMohs | filter: $select.search">\n										<div ng-bind-html="musiconhold.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_VOICE_MOH\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.musiconhold.$touched || forms.general.$submitted) && forms.general.musiconhold.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MOH -->\n\n							<!-- START TIMEOUT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.timeout.$touched || forms.general.$submitted) && forms.general.timeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="queue.timeout" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_TIMEOUT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.timeout.$touched || forms.general.$submitted) && forms.general.timeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIMEOUT -->\n\n							<!-- START MAXLEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.maxlen.$touched || forms.general.$submitted) && forms.general.maxlen.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MAXLEN\' | translate}}</label>\n								<input type="number" min="0" name="maxlen" placeholder="{{\'APPLICATION_MAXLEN\' | translate}}" class="form-control" data-ng-model="queue.maxlen" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_MAXLEN\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.maxlen.$touched || forms.general.$submitted) && forms.general.maxlen.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MAXLEN -->\n\n							<!-- START RETRY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.retry.$touched || forms.general.$submitted) && forms.general.retry.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RETRY\' | translate}}</label>\n								<input type="number" min="0" name="retry" placeholder="{{\'APPLICATION_RETRY\' | translate}}" class="form-control" data-ng-model="queue.retry" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_RETRY\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.retry.$touched || forms.general.$submitted) && forms.general.retry.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END RETRY -->\n\n						</div>\n						<div class="col-md-6">\n							<!-- START WRAPUPTIME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.wrapuptime.$touched || forms.general.$submitted) && forms.general.wrapuptime.$invalid}">\n								<label class="control-label">{{\'APPLICATION_WRAPUPTIME\' | translate}}</label>\n								<input type="number" min="0" name="wrapuptime" placeholder="{{\'APPLICATION_WRAPUPTIME\' | translate}}" class="form-control" data-ng-model="queue.wrapuptime" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_WRAPUPTIME\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.wrapuptime.$touched || forms.general.$submitted) && forms.general.wrapuptime.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END WRAPUPTIME -->\n\n							<!-- START WEIGHT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.weight.$touched || forms.general.$submitted) && forms.general.weight.$invalid}">\n								<label class="control-label">{{\'APPLICATION_WEIGHT\' | translate}}</label>\n								<input type="number" min="0" name="weight" placeholder="{{\'APPLICATION_WEIGHT\' | translate}}" class="form-control" data-ng-model="queue.weight" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_WEIGHT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.weight.$touched || forms.general.$submitted) && forms.general.weight.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END WEIGHT -->\n\n							<!-- START JOINEMPTY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.joinempty.$touched || forms.general.$submitted) && forms.general.joinempty.$invalid}">\n								<label class="control-label">{{\'APPLICATION_JOINEMPTY\' | translate}}</label>\n								<ui-select multiple data-ng-model="queue.joinempty" name="joinempty" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n									<ui-select-choices repeat="item in [\'yes\',\'no\',\'strict\',\'loose\',\'paused\',\'penalty\',\'inuse\',\'ringing\',\'unavailable\',\'invalid\',\'unknown\',\'wrapup\'] | filter: $select.search">\n										<div ng-bind-html="item | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_JOINEMPTY\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.joinempty.$touched || forms.general.$submitted) && forms.general.joinempty.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END JOINEMPTY -->\n\n							<!-- START LEAVEWHENEMPTY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.leavewhenempty.$touched || forms.general.$submitted) && forms.general.leavewhenempty.$invalid}">\n								<label class="control-label">{{\'APPLICATION_LEAVEWHENEMPTY\' | translate}}</label>\n								<ui-select multiple data-ng-model="queue.leavewhenempty" name="leavewhenempty" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n									<ui-select-choices repeat="item in [\'yes\',\'no\',\'strict\',\'loose\',\'paused\',\'penalty\',\'inuse\',\'ringing\',\'unavailable\',\'invalid\',\'unknown\',\'wrapup\'] | filter: $select.search">\n										<div ng-bind-html="item | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_LEAVEWHENEMPTY\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.leavewhenempty.$touched || forms.general.$submitted) && forms.general.leavewhenempty.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END LEAVEWHENEMPTY -->\n\n							<!-- START ANNOUNCE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.announce.$touched || forms.general.$submitted) && forms.general.announce.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ANNOUNCE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="queue.announce" name="announce" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n									<ui-select-choices repeat="announce.path as announce in sounds | filter: $select.search">\n										<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_ANNOUNCE\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.announce.$touched || forms.general.$submitted) && forms.general.announce.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ANNOUNCE -->\n						</div>\n					</div>\n					<!-- START DESCRIPTION -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n						<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="queue.description"></textarea>\n					</div>\n					<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.announce" data-ng-submit="forms.announce.$valid && forms.general.$valid && updateVoiceQueue()" novalidate>\n							<div class="row">\n								<div class="col-md-12">\n							<!-- START PERIODIC_ANNOUNCE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.periodic_announce.$touched || forms.announce.$submitted) && forms.announce.periodic_announce.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PERIODIC_ANNOUNCE\' | translate}}</label>\n								<ui-select multiple data-ng-model="queue.periodic_announce" name="periodic_announce" theme="bootstrap" data-ng-disabled="!periodicAnnounces.length">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item.display_name}}</ui-select-match>\n									<ui-select-choices repeat="announce.path as announce in periodicAnnounces | filter: $select.search track by $index">\n										<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<div class="note note-warning" data-ng-hide="periodicAnnounces.length">\n									<h4 class="block">Warning!</h4>\n									<p>\n										{{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n									</p>\n									<p>\n										{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/sounds/list">{{\'APPLICATION_SOUNDS\' | translate}}</a>\n									</p>\n								</div>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_PERIODIC_ANNOUNCE\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.periodic_announce.$touched || forms.announce.$submitted) && forms.announce.periodic_announce.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PERIODIC_ANNOUNCE -->\n						</div>\n					</div>\n							<div class="row">\n								<div class="col-md-6">\n							<p><h3>{{\'APPLICATION_SETTINGS\' | translate}}</h3></p>\n							<!-- START ANNOUNCE_FREQUENCY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.announce_frequency.$touched || forms.announce.$submitted) && forms.announce.announce_frequency.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ANNOUNCE_FREQUENCY\' | translate}}</label>\n								<input type="number" min="0" name="announce_frequency" placeholder="{{\'APPLICATION_ANNOUNCE_FREQUENCY\' | translate}}" class="form-control" data-ng-model="queue.announce_frequency" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_ANNOUNCE_FREQUENCY\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.announce_frequency.$touched || forms.announce.$submitted) && forms.announce.announce_frequency.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ANNOUNCE_FREQUENCY -->\n\n							<!-- START MIN_ANNOUNCE_FREQUENCY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.min_announce_frequency.$touched || forms.announce.$submitted) && forms.announce.min_announce_frequency.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MIN_ANNOUNCE_FREQUENCY\' | translate}}</label>\n								<input type="number" min="0" name="min_announce_frequency" placeholder="{{\'APPLICATION_MIN_ANNOUNCE_FREQUENCY\' | translate}}" class="form-control" data-ng-model="queue.min_announce_frequency" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_MIN_ANNOUNCE_FREQUENCY\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.min_announce_frequency.$touched || forms.announce.$submitted) && forms.announce.min_announce_frequency.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MIN_ANNOUNCE_FREQUENCY -->\n\n							<!-- START PERIODIC_ANNOUNCE_FREQUENCY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.periodic_announce_frequency.$touched || forms.announce.$submitted) && forms.announce.periodic_announce_frequency.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PERIODIC_ANNOUNCE_FREQUENCY\' | translate}}</label>\n								<input type="number" min="0" name="periodic_announce_frequency" placeholder="{{\'APPLICATION_PERIODIC_ANNOUNCE_FREQUENCY\' | translate}}" class="form-control" data-ng-model="queue.periodic_announce_frequency"/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_PERIODIC_ANNOUNCE_FREQUENCY\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.periodic_announce_frequency.$touched || forms.announce.$submitted) && forms.announce.periodic_announce_frequency.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PERIODIC_ANNOUNCE_FREQUENCY -->\n\n							<!-- START RANDOM_PERIODIC_ANNOUNCE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.random_periodic_announce.$touched || forms.announce.$submitted) && forms.announce.random_periodic_announce.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RANDOM_PERIODIC_ANNOUNCE\' | translate}}</label>\n								<ui-select data-ng-model="queue.random_periodic_announce" name="random_periodic_announce" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n										<div ng-bind-html="item | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_RANDOM_PERIODIC_ANNOUNCE\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.random_periodic_announce.$touched || forms.announce.$submitted) && forms.announce.random_periodic_announce.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END RANDOM_PERIODIC_ANNOUNCE -->\n\n							<!-- START ANNOUNCE_HOLDTIME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.announce_holdtime.$touched || forms.announce.$submitted) && forms.announce.announce_holdtime.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ANNOUNCE_HOLDTIME\' | translate}}</label>\n								<ui-select data-ng-model="queue.announce_holdtime" name="announce_holdtime" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="item in [\'yes\',\'no\',\'once\'] | filter: $select.search">\n										<div ng-bind-html="item | highlight: $select.search"></div>\n									</ui-select-choices>\n									</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_ANNOUNCE_HOLDTIME\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.announce_holdtime.$touched || forms.announce.$submitted) && forms.announce.announce_holdtime.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ANNOUNCE_HOLDTIME -->\n\n							<!-- START ANNOUNCE_POSITION -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.announce_position.$touched || forms.announce.$submitted) && forms.announce.announce_position.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ANNOUNCE_POSITION\' | translate}}</label>\n								<ui-select data-ng-model="queue.announce_position" name="announce_position" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="item in [\'yes\',\'no\',\'limit\',\'more\'] | filter: $select.search">\n										<div ng-bind-html="item | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_ANNOUNCE_POSITION\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.announce_position.$touched || forms.announce.$submitted) && forms.announce.announce_position.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ANNOUNCE_POSITION -->\n\n							<!-- START ANNOUNCE_POSITION_LIMIT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.announce_position_limit.$touched || forms.announce.$submitted) && forms.announce.announce_position_limit.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ANNOUNCE_POSITION_LIMIT\' | translate}}</label>\n								<input type="number" min="0" name="announce_position_limit" placeholder="{{\'APPLICATION_ANNOUNCE_POSITION_LIMIT\' | translate}}" class="form-control" data-ng-model="queue.announce_position_limit"/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_ANNOUNCE_POSITION_LIMIT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.announce_position_limit.$touched || forms.announce.$submitted) && forms.announce.announce_position_limit.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ANNOUNCE_POSITION_LIMIT -->\n\n							<!-- START REPORTHOLDTIME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.reportholdtime.$touched || forms.announce.$submitted) && forms.announce.reportholdtime.$invalid}">\n								<label class="control-label">{{\'APPLICATION_REPORTHOLDTIME\' | translate}}</label>\n								<ui-select data-ng-model="queue.reportholdtime" name="reportholdtime" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n										<div ng-bind-html="item | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_REPORTHOLDTIME\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.reportholdtime.$touched || forms.announce.$submitted) && forms.announce.reportholdtime.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END REPORTHOLDTIME -->\n\n						</div>\n							<div class="col-md-6">\n								<p><h3>{{\'APPLICATION_SOUNDS\' | translate}}</h3></p>\n								<!-- START QUEUE_REPORTHOLD -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.queue_reporthold.$touched || forms.announce.$submitted) && forms.announce.queue_reporthold.$invalid}">\n									<label class="control-label">{{\'APPLICATION_QUEUE_REPORTHOLD\' | translate}}</label>\n									<ui-select data-ng-model="queue.queue_reporthold" name="queue_reporthold" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n										<ui-select-choices repeat="announce.path as announce in queueAnnounces | filter: $select.search">\n											<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span class="help-block">\n										{{ \'DESCRIPTION_QUEUE_REPORTHOLD\' | translate }}\n									</span>\n									<span data-ng-show="(forms.announce.queue_reporthold.$touched || forms.announce.$submitted) && forms.announce.queue_reporthold.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END QUEUE_REPORTHOLD -->\n\n								<!-- START QUEUE_YOUARENEXT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.queue_youarenext.$touched || forms.announce.$submitted) && forms.announce.queue_youarenext.$invalid}">\n									<label class="control-label">{{\'APPLICATION_QUEUE_YOUARENEXT\' | translate}}</label>\n									<ui-select data-ng-model="queue.queue_youarenext" name="queue_youarenext" theme="bootstrap" >\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n										<ui-select-choices repeat="announce.path as announce in queueAnnounces | filter: $select.search">\n											<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span class="help-block">\n										{{ \'DESCRIPTION_QUEUE_YOUARENEXT\' | translate }}\n									</span>\n									<span data-ng-show="(forms.announce.queue_youarenext.$touched || forms.announce.$submitted) && forms.announce.queue_youarenext.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END QUEUE_YOUARENEXT -->\n\n							<!-- START QUEUE_THEREARE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.queue_thereare.$touched || forms.announce.$submitted) && forms.announce.queue_thereare.$invalid}">\n								<label class="control-label">{{\'APPLICATION_QUEUE_THEREARE\' | translate}}</label>\n								<ui-select data-ng-model="queue.queue_thereare" name="queue_thereare" theme="bootstrap" >\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n									<ui-select-choices repeat="announce.path as announce in queueAnnounces | filter: $select.search">\n										<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_THEREARE\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.queue_thereare.$touched || forms.announce.$submitted) && forms.announce.queue_thereare.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END QUEUE_THEREARE -->\n\n							<!-- START QUEUE_CALLSWAITING -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.queue_callswaiting.$touched || forms.announce.$submitted) && forms.announce.queue_callswaiting.$invalid}">\n								<label class="control-label">{{\'APPLICATION_QUEUE_CALLSWAITING\' | translate}}</label>\n								<ui-select data-ng-model="queue.queue_callswaiting" name="queue_callswaiting" theme="bootstrap" >\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n									<ui-select-choices repeat="announce.path as announce in queueAnnounces | filter: $select.search">\n										<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_CALLSWAITING\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.queue_callswaiting.$touched || forms.announce.$submitted) && forms.announce.queue_callswaiting.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END QUEUE_CALLSWAITING -->\n\n							<!-- START QUEUE_HOLDTIME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.queue_holdtime.$touched || forms.announce.$submitted) && forms.announce.queue_holdtime.$invalid}">\n								<label class="control-label">{{\'APPLICATION_QUEUE_HOLDTIME\' | translate}}</label>\n								<ui-select data-ng-model="queue.queue_holdtime" name="queue_holdtime" theme="bootstrap" >\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n									<ui-select-choices repeat="announce.path as announce in queueAnnounces | filter: $select.search">\n										<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_HOLDTIME\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.queue_holdtime.$touched || forms.announce.$submitted) && forms.announce.queue_holdtime.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END QUEUE_HOLDTIME -->\n\n							<!-- START QUEUE_MINUTES -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.queue_minutes.$touched || forms.announce.$submitted) && forms.announce.queue_minutes.$invalid}">\n								<label class="control-label">{{\'APPLICATION_QUEUE_MINUTES\' | translate}}</label>\n								<ui-select data-ng-model="queue.queue_minutes" name="queue_minutes" theme="bootstrap" >\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n									<ui-select-choices repeat="announce.path as announce in queueAnnounces | filter: $select.search">\n										<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_MINUTES\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.queue_minutes.$touched || forms.announce.$submitted) && forms.announce.queue_minutes.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END QUEUE_MINUTES -->\n\n							<!-- START QUEUE_MINUTE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.queue_minute.$touched || forms.announce.$submitted) && forms.announce.queue_minute.$invalid}">\n								<label class="control-label">{{\'APPLICATION_QUEUE_MINUTE\' | translate}}</label>\n								<ui-select data-ng-model="queue.queue_minute" name="queue_minute" theme="bootstrap" >\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n									<ui-select-choices repeat="announce.path as announce in queueAnnounces | filter: $select.search">\n										<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_MINUTE\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.queue_minute.$touched || forms.announce.$submitted) && forms.announce.queue_minute.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END QUEUE_MINUTE -->\n\n							<!-- START QUEUE_SECONDS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.queue_seconds.$touched || forms.announce.$submitted) && forms.announce.queue_seconds.$invalid}">\n								<label class="control-label">{{\'APPLICATION_QUEUE_SECONDS\' | translate}}</label>\n								<ui-select data-ng-model="queue.queue_seconds" name="queue_seconds" theme="bootstrap" >\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n									<ui-select-choices repeat="announce.path as announce in queueAnnounces | filter: $select.search">\n										<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_SECONDS\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.queue_seconds.$touched || forms.announce.$submitted) && forms.announce.queue_seconds.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END QUEUE_SECONDS -->\n\n							<!-- START QUEUE_THANKYOU -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.announce.queue_thankyou.$touched || forms.announce.$submitted) && forms.announce.queue_thankyou.$invalid}">\n								<label class="control-label">{{\'APPLICATION_QUEUE_THANKYOU\' | translate}}</label>\n								<ui-select data-ng-model="queue.queue_thankyou" name="QUEUE_THANKYOU" theme="bootstrap" >\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n									<ui-select-choices repeat="announce.path as announce in queueAnnounces | filter: $select.search">\n										<div ng-bind-html="announce.display_name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_THANKYOU\' | translate }}\n								</span>\n								<span data-ng-show="(forms.announce.queue_thankyou.$touched || forms.announce.$submitted) && forms.announce.queue_thankyou.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END QUEUE_THANKYOU -->\n\n						</div>\n					</div>\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n					<!-- ADVANCED TAB -->\n					<div class="tab-pane" id="tab_1_3">\n						<form name="forms.advanced" data-ng-submit="forms.announce.$valid && forms.general.$valid && forms.advanced.$valid && updateVoiceQueue()" novalidate>\n\n							<div class="row">\n								<div class="col-md-6">\n\n							<!-- START AUTOPAUSE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.autopause.$touched || forms.advanced.$submitted) && forms.advanced.autopause.$invalid}">\n								<label class="control-label">{{\'APPLICATION_AUTOPAUSE\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="queue.autopause"\n								type="checkbox"\n								switch-active="{{ recordSwitch.isActive }}"\n								switch-on-text="{{ recordSwitch.onText }}"\n								switch-off-text="{{ recordSwitch.offText }}"\n								switch-on-color="{{ recordSwitch.onColor }}"\n								switch-off-color="{{ recordSwitch.offColor }}"\n								switch-animate="{{ recordSwitch.animate }}"\n								switch-size="{{ recordSwitch.size }}"\n								switch-label="{{ recordSwitch.label }}"\n								switch-icon="{{ recordSwitch.icon }}"\n								switch-radio-off="{{ recordSwitch.radioOff }}"\n								switch-label-width="{{ recordSwitch.labelWidth }}"\n								switch-handle-width="{{ recordSwitch.handleWidth }}"\n								ng-true-value="\'all\'"\n								ng-false-value="\'no\'">\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_AUTOPAUSE\' | translate }}\n								</span>\n								<span data-ng-show="(forms.advanced.autopause.$touched || forms.advanced.$submitted) && forms.advanced.autopause.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END AUTOPAUSE -->\n\n							<!-- START RINGINUSE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.ringinuse.$touched || forms.advanced.$submitted) && forms.advanced.ringinuse.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RINGINUSE\' | translate}}</label>\n								<ui-select data-ng-model="queue.ringinuse" name="ringinuse" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n										<div ng-bind-html="item | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_RINGINUSE\' | translate }}\n								</span>\n								<span data-ng-show="(forms.advanced.ringinuse.$touched || forms.advanced.$submitted) && forms.advanced.ringinuse.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END RINGINUSE -->\n\n							<!-- START MEMBER_DELAY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.memberdelay.$touched || forms.advanced.$submitted) && forms.advanced.memberdelay.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MEMBER_DELAY\' | translate}}</label>\n								<input type="number" min="0" name="memberdelay" placeholder="{{\'APPLICATION_MEMBER_DELAY\' | translate}}" class="form-control" data-ng-model="queue.memberdelay" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_MEMBER_DELAY\' | translate }}\n								</span>\n								<span data-ng-show="(forms.advanced.memberdelay.$touched || forms.advanced.$submitted) && forms.advanced.memberdelay.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MEMBER_DELAY -->\n\n							<!-- START ACW -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.acw.$touched || forms.advanced.$submitted) && forms.advanced.acw.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ACW\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="queue.acw"\n								type="checkbox"\n								switch-active="{{ recordSwitch.isActive }}"\n								switch-on-text="{{ recordSwitch.onText }}"\n								switch-off-text="{{ recordSwitch.offText }}"\n								switch-on-color="{{ recordSwitch.onColor }}"\n								switch-off-color="{{ recordSwitch.offColor }}"\n								switch-animate="{{ recordSwitch.animate }}"\n								switch-size="{{ recordSwitch.size }}"\n								switch-label="{{ recordSwitch.label }}"\n								switch-icon="{{ recordSwitch.icon }}"\n								switch-radio-off="{{ recordSwitch.radioOff }}"\n								switch-label-width="{{ recordSwitch.labelWidth }}"\n								switch-handle-width="{{ recordSwitch.handleWidth }}">\n								<span class="help-block">\n									{{ \'DESCRIPTION_ACW\' | translate }}\n								</span>\n								<span data-ng-show="(forms.advanced.acw.$touched || forms.advanced.$submitted) && forms.advanced.acw.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_ACW\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ACW -->\n\n							<!-- START SETINTERFACEVAR -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.setinterfacevar.$touched || forms.advanced.$submitted) && forms.advanced.setinterfacevar.$invalid}">\n								<label class="control-label">{{\'APPLICATION_SETINTERFACEVAR\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="queue.setinterfacevar"\n								type="checkbox"\n								switch-active="{{ recordSwitch.isActive }}"\n								switch-on-text="{{ recordSwitch.onText }}"\n								switch-off-text="{{ recordSwitch.offText }}"\n								switch-on-color="{{ recordSwitch.onColor }}"\n								switch-off-color="{{ recordSwitch.offColor }}"\n								switch-animate="{{ recordSwitch.animate }}"\n								switch-size="{{ recordSwitch.size }}"\n								switch-label="{{ recordSwitch.label }}"\n								switch-icon="{{ recordSwitch.icon }}"\n								switch-radio-off="{{ recordSwitch.radioOff }}"\n								switch-label-width="{{ recordSwitch.labelWidth }}"\n								switch-handle-width="{{ recordSwitch.handleWidth }}">\n								<span class="help-block">\n									{{ \'DESCRIPTION_SETINTERFACEVAR\' | translate }} <a href="https://wiki.xcallymotion.com/display/XMD/Queues+-+Voice+Channel" target="_blank">wiki</a>)\n								</span>\n								<span data-ng-show="(forms.advanced.setinterfacevar.$touched || forms.advanced.$submitted) && forms.advanced.setinterfacevar.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_SETINTERFACEVAR\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END SETINTERFACEVAR -->\n\n							<!-- START SETQUEUEVAR -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.setqueuevar.$touched || forms.advanced.$submitted) && forms.advanced.setqueuevar.$invalid}">\n								<label class="control-label">{{\'APPLICATION_SETQUEUEVAR\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="queue.setqueuevar"\n								type="checkbox"\n								switch-active="{{ recordSwitch.isActive }}"\n								switch-on-text="{{ recordSwitch.onText }}"\n								switch-off-text="{{ recordSwitch.offText }}"\n								switch-on-color="{{ recordSwitch.onColor }}"\n								switch-off-color="{{ recordSwitch.offColor }}"\n								switch-animate="{{ recordSwitch.animate }}"\n								switch-size="{{ recordSwitch.size }}"\n								switch-label="{{ recordSwitch.label }}"\n								switch-icon="{{ recordSwitch.icon }}"\n								switch-radio-off="{{ recordSwitch.radioOff }}"\n								switch-label-width="{{ recordSwitch.labelWidth }}"\n								switch-handle-width="{{ recordSwitch.handleWidth }}">\n								<span class="help-block">\n									{{ \'DESCRIPTION_SETQUEUEVAR\' | translate }} <a href="https://wiki.xcallymotion.com/display/XMD/Queues+-+Voice+Channel" target="_blank">wiki</a>)\n								</span>\n								<span data-ng-show="(forms.advanced.setqueuevar.$touched || forms.advanced.$submitted) && forms.advanced.setqueuevar.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_SETQUEUEVAR\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END SETQUEUEVAR -->\n\n						</div>\n							<div class="col-md-6">\n\n							<!-- START TIMEOUTRESTART -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.timeoutrestart.$touched || forms.advanced.$submitted) && forms.advanced.timeoutrestart.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIMEOUTRESTART\' | translate}}</label>\n								<ui-select data-ng-model="queue.timeoutrestart" name="timeoutrestart" theme="bootstrap">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n										<div ng-bind-html="item | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_TIMEOUTRESTART\' | translate }}\n								</span>\n								<span data-ng-show="(forms.advanced.timeoutrestart.$touched || forms.advanced.$submitted) && forms.advanced.timeoutrestart.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIMEOUTRESTART -->\n\n							<!-- START MONITOR_FORMAT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.monitor_format.$touched || forms.advanced.$submitted) && forms.advanced.monitor_format.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MONITOR_FORMAT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="queue.monitor_format" name="monitor_format" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="monFormat.value as monFormat in monitorFormats | filter: $select.search">\n										<div ng-bind-html="monFormat.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_MONITOR_FORMAT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.advanced.monitor_format.$touched || forms.advanced.$submitted) && forms.advanced.monitor_format.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MONITOR_FORMAT -->\n\n							<!-- START CONTEXT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.context.$touched || forms.advanced.$submitted) && forms.advanced.context.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}</label>\n								<ui-select data-ng-model="queue.context" name="context" theme="bootstrap">\n									<ui-select-match allow-clear placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="context.name as context in voiceContexts | filter: $select.search">\n										<div ng-bind-html="context.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_QUEUE_VOICE_CONTEXT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.advanced.context.$touched || forms.advanced.$submitted) && forms.advanced.context.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONTEXT -->\n\n							<!-- START ACW_TIMEOUT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.acwTimeout.$touched || forms.advanced.$submitted) && forms.advanced.acwTimeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ACW_TIMEOUT\' | translate}}</label>\n								<input type="number" min="0" name="acwTimeout" placeholder="{{\'APPLICATION_ACW_TIMEOUT\' | translate}}" class="form-control" data-ng-model="queue.acwTimeout" required/>\n								<span class="help-block">\n									{{ \'DESCRIPTION_ACW_TIMEOUT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.advanced.acwTimeout.$touched || forms.advanced.$submitted) && forms.advanced.acwTimeout.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END ACW_TIMEOUT -->\n\n							<!-- START SETQUEUEENTRYVAR -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.setqueueentryvar.$touched || forms.advanced.$submitted) && forms.advanced.setqueueentryvar.$invalid}">\n								<label class="control-label">{{\'APPLICATION_SETQUEUEENTRYVAR\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="queue.setqueueentryvar"\n								type="checkbox"\n								switch-active="{{ recordSwitch.isActive }}"\n								switch-on-text="{{ recordSwitch.onText }}"\n								switch-off-text="{{ recordSwitch.offText }}"\n								switch-on-color="{{ recordSwitch.onColor }}"\n								switch-off-color="{{ recordSwitch.offColor }}"\n								switch-animate="{{ recordSwitch.animate }}"\n								switch-size="{{ recordSwitch.size }}"\n								switch-label="{{ recordSwitch.label }}"\n								switch-icon="{{ recordSwitch.icon }}"\n								switch-radio-off="{{ recordSwitch.radioOff }}"\n								switch-label-width="{{ recordSwitch.labelWidth }}"\n								switch-handle-width="{{ recordSwitch.handleWidth }}">\n								<span class="help-block">\n									{{ \'DESCRIPTION_SETQUEUEENTRYVAR\' | translate }} <a href="https://wiki.xcallymotion.com/display/XMD/Queues+-+Voice+Channel" target="_blank">wiki</a>)\n								</span>\n								<span data-ng-show="(forms.advanced.setqueueentryvar.$touched || forms.advanced.$submitted) && forms.advanced.setqueueentryvar.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_SETQUEUEENTRYVAR\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END SETQUEUEENTRYVAR -->\n\n						</div>\n					</div>\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
+a.put("app/channels/voice/realtime/view/abandoned/abandoned.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAbandoned()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns  class="ui-grid" ui-grid-pagination ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/realtime/view/agent/agent.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-tree-view ui-grid-expandable-row ui-grid-pagination ui-grid-auto-resize>\n			<span us-spinner spinner-key="grid-spinner" spinner-start-active="true"></span>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/realtime/view/agent/agent.modal.info.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_SIP_CLIENT_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<div data-ng-if="agent.ipaddr" class="well">\n  <div>{{agent.ipaddr}}:{{agent.port}}</div>\n  <div>{{agent.fullcontact}}</div>\n  <div>{{agent.useragent}}</div>\n  <div>{{agent.lastms}}</div>\n</div>\n<div data-ng-if="!agent.ipaddr" class="alert alert-danger" role="alert">\n  {{\'MESSAGE_NO_AVAILABLE_INFO\' | translate}}\n</div>\n<!-- hidden random uiselect, needed to recompile the modal every time and show the content -->\n<ui-select multiple class="hide" ng-model="item.queues" theme="bootstrap" required>\n  <ui-select-match placeholder="{{\'APPLICATION_QUEUE\' | translate}}">{{$item.name}}</ui-select-match>\n  <ui-select-choices repeat="queue.name as queue in queues | filter: $select.search">\n    <div ng-bind-html="queue.name | highlight: $select.search"></div>\n  </ui-select-choices>\n</ui-select>\n<!--  -->\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/voice/realtime/view/agent/queue.modal.add.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_JOIN_QUEUE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <div class="form-group row">\n  <label class="col-md-2 control-label" style="margin-top: 7px;">{{\'APPLICATION_QUEUE\' | translate}}:</label>\n  <div class="col-md-10">\n    <ui-select multiple ng-model="item.queues" theme="bootstrap" required>\n      <ui-select-match placeholder="{{\'APPLICATION_QUEUE\' | translate}}">{{$item.name}}</ui-select-match>\n      <ui-select-choices repeat="queue.name as queue in queues | filter: $select.search">\n        <div ng-bind-html="queue.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n</div>\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/channels/voice/realtime/view/outbound/outbound.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initDials()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns class="ui-grid" ui-grid-auto-resize ui-grid-pagination>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/realtime/view/parameter/parameter.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initParameters()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-tree-view ui-grid-expandable-row ui-grid-pagination ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/realtime/view/queue/queue.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initQueues()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-tree-view ui-grid-expandable-row ui-grid-pagination ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/realtime/view/queuecalls/queuecalls.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initQueues()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns class="ui-grid" ui-grid-auto-resize ui-grid-pagination>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/realtime/view/telephone/telephone.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initTelephones()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions" ui-grid-resize-columns  class="ui-grid" ui-grid-pagination ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/realtime/view/telephone/telephone.modal.info.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_INTERFACE_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n<div data-ng-if="telephone.ipaddr" class="well">\n  <div>{{telephone.ipaddr}}:{{telephone.port}}</div>\n  <div>{{telephone.fullcontact}}</div>\n  <div>{{telephone.useragent}}</div>\n  <div>{{telephone.lastms}}</div>\n</div>\n<div data-ng-if="!telephone.ipaddr" class="alert alert-danger" role="alert">\n  {{\'MESSAGE_NO_AVAILABLE_INFO\' | translate}}\n</div>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/channels/voice/realtime/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-directions"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-energy"></i>\n					<a href="/channels/voice/realtime/view/agents">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<div>\n		    <nav class="navbar navbar-default" role="navigation">\n					<div class="collapse navbar-collapse">\n						<ul class="nav navbar-nav">\n							<li data-ng-class="{\'active\': $state.is(\'main.channels.voice.realtime.view.agents\')}">\n								<a href="/channels/voice/realtime/view/agents">\n									{{\'APPLICATION_AGENTS\' | translate}}\n								</a>\n							</li>\n							<li data-ng-class="{\'active\': $state.is(\'main.channels.voice.realtime.view.telephones\')}" data-ng-show="Auth.isAdmin()">\n								<a href="/channels/voice/realtime/view/telephones">\n									{{\'APPLICATION_TELEPHONES\' | translate}}\n								</a>\n							</li>\n							<li data-ng-class="{\'active\': $state.is(\'main.channels.voice.realtime.view.queues\')}">\n								<a href="/channels/voice/realtime/view/queues">\n									{{\'APPLICATION_QUEUES\' | translate}}\n								</a>\n							</li>\n							<li data-ng-class="{\'active\': $state.is(\'main.channels.voice.realtime.view.queuecalls\')}">\n								<a href="/channels/voice/realtime/view/queuecalls">\n									{{\'APPLICATION_QUEUE_CALLS\' | translate}}\n								</a>\n							</li>\n							<li data-ng-class="{\'active\': $state.is(\'main.channels.voice.realtime.view.parameters\')}">\n								<a href="/channels/voice/realtime/view/parameters">\n									{{\'APPLICATION_QUEUE_PARAMETERS\' | translate}}\n								</a>\n							</li>\n							<li data-ng-class="{\'active\': $state.is(\'main.channels.voice.realtime.view.abandoned\')}">\n								<a href="/channels/voice/realtime/view/abandoned">\n									{{\'APPLICATION_QUEUE_ABANDONED\' | translate}}\n								</a>\n							</li>\n							<li data-ng-class="{\'active\': $state.is(\'main.channels.voice.realtime.view.outbound\')}">\n								<a href="/channels/voice/realtime/view/outbound">\n									{{\'APPLICATION_OUTBOUND_CALLS\' | translate}}\n								</a>\n							</li>\n						</ul>\n					</div>\n		    </nav>\n		</div>\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/recording/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-play"></i>\n					<a href="#">{{ \'APPLICATION_RECORDINGS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="fa fa-play font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_RECORDINGS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/route/inbound/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_ROUTE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.extension" novalidate>\n\n    <!-- START EXTEN -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.extension.exten.$touched || forms.extension.$submitted) && forms.extension.exten.$invalid || existRoute}">\n      <label class="control-label">{{\'APPLICATION_PHONE_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="exten" placeholder="{{\'APPLICATION_PHONE_NUMBER\' | translate}}" class="form-control" data-ng-model="item.exten" data-ng-pattern="settings.patternName" required/>\n      <span data-ng-show="(forms.extension.exten.$touched || forms.extension.$submitted) && forms.extension.exten.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END EXTEN -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.extension.$invalid || existRoute">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n<!-- <pre>\n  {{item | json}}\n</pre> -->\n'),a.put("app/channels/voice/route/inbound/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-call-in"></i>\n					<a href="/channels/voice/routes/inbound/list">{{ \'APPLICATION_INBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-users font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_INBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle " href="#" data-ng-click="create()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ROUTE\' | translate }}\n						</a>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter class="ui-grid" ui-grid-draggable-rows>\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/route/inbound/view/view.applications.html",'<div ui-view class="profile-content">\n<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title  tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACTIONS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="selectedRows.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle " href="/channels/voice/routes/inbound/view/{{route.id}}/application" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_APPLICATION\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div data-ng-if="showGrid" ui-grid="gridOptions"  ui-grid-resize-columns class="grid" ui-grid-selection ui-grid-draggable-rows ui-grid-auto-resize>\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/channels/voice/route/inbound/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getRoute()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-reload"></i>\n					<a href="/channels/voice/routes/inbound/list">{{ \'APPLICATION_INBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }}</a>\n					<i data-ng-show="route" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="route">\n					<a href="#">{{route.exten}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/inboundroute.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{route.exten}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.routes.inbound.view.settings\')}">\n							<a data-ng-click="deselectAndRedirect(\'/channels/voice/routes/inbound/view/\'+route.id+\'/settings\')">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n'+"						<li data-ng-class=\"{active: $state.is('main.channels.voice.routes.inbound.view.applications') || $state.is('main.channels.voice.routes.inbound.view.application') || $state.is('main.channels.voice.routes.inbound.view.applications.settings')}\">\n							<a data-ng-click=\"deselectAndRedirect('/channels/voice/routes/inbound/view/'+route.id+'/applications')\">\n							<i class=\"icon-list\"></i>\n							{{ 'APPLICATION_ACTIONS' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class=\"profile-content\">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n"),a.put("app/channels/voice/route/inbound/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_INBOUND\' | translate}} {{ \'APPLICATION_ROUTE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body" data-ng-init="getContexts()">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateRoute()" novalidate>\n\n							<!-- START EXTEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.exten.$touched || forms.general.$submitted) && forms.general.exten.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PHONE_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="exten" placeholder="{{\'APPLICATION_PHONE_NUMBER\' | translate}}" class="form-control" data-ng-model="route.exten" required/>\n								<span data-ng-show="(forms.general.exten.$touched || forms.general.$submitted) && forms.general.exten.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END EXTEN -->\n\n							<!-- START CONTEXT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="route.context" name="context" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="context.name as context in voiceContexts | filter: $select.search">\n										<div ng-bind-html="context.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONTEXT -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="route.description"/></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/voice/route/internal/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_ROUTE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.extension" novalidate>\n\n    <!-- START EXTEN -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.extension.exten.$touched || forms.extension.$submitted) && forms.extension.exten.$invalid || existRoute}">\n      <label class="control-label">{{\'APPLICATION_PHONE_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="exten" placeholder="{{\'APPLICATION_PHONE_NUMBER\' | translate}}" class="form-control" data-ng-model="item.exten" data-ng-pattern="settings.patternName" required/>\n      <span data-ng-show="(forms.extension.exten.$touched || forms.extension.$submitted) && forms.extension.exten.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END EXTEN -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.extension.$invalid || existRoute">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n<!-- <pre>\n  {{item | json}}\n</pre> -->\n'),a.put("app/channels/voice/route/internal/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-reload"></i>\n					<a href="/voice/routes/internal/list">{{ \'APPLICATION_INTERNAL\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-users font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_INTERNAL\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle " href="#" data-ng-click="create()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ROUTE\' | translate }}\n						</a>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter class="ui-grid" ui-grid-draggable-rows>\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/route/internal/view/view.applications.html",'<div ui-view class="profile-content">\n<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title  tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACTIONS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="selectedRows.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle " href="/channels/voice/routes/internal/view/{{route.id}}/application" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_APPLICATION\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div data-ng-if="showGrid" ui-grid="gridOptions"  ui-grid-resize-columns class="grid" ui-grid-selection ui-grid-draggable-rows ui-grid-auto-resize>\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/channels/voice/route/internal/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getRoute()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-reload"></i>\n					<a href="/channels/voice/routes/internal/list">{{ \'APPLICATION_INTERNAL\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }}</a>\n					<i data-ng-show="route" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="route">\n					<a href="#">{{route.exten}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/internalroute.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{route.exten}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.routes.internal.view.settings\')}">\n							<a data-ng-click="deselectAndRedirect(\'/channels/voice/routes/internal/view/\'+route.id+\'/settings\')">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n'+"						<li data-ng-class=\"{active: $state.is('main.channels.voice.routes.internal.view.applications') || $state.is('main.channels.voice.routes.internal.view.application') || $state.is('main.channels.voice.routes.internal.view.applications.settings')}\">\n							<a data-ng-click=\"deselectAndRedirect('/channels/voice/routes/internal/view/'+route.id+'/applications')\">\n							<i class=\"icon-list\"></i>\n							{{ 'APPLICATION_ACTIONS' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class=\"profile-content\">\n		</div>\n		<!-- <pre>\n			{{route | json}}\n		</pre> -->\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n"),
+a.put("app/channels/voice/route/internal/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_INTERNAL\' | translate}} {{ \'APPLICATION_ROUTE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body" data-ng-init="getContexts()">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateRoute()" novalidate>\n\n							<!-- START EXTEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.exten.$touched || forms.general.$submitted) && forms.general.exten.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PHONE_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="exten" placeholder="{{\'APPLICATION_PHONE_NUMBER\' | translate}}" class="form-control" data-ng-model="route.exten" required/>\n								<span data-ng-show="(forms.general.exten.$touched || forms.general.$submitted) && forms.general.exten.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END EXTEN -->\n\n							<!-- START CONTEXT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="route.context" name="context" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="context.name as context in voiceContexts | filter: $select.search">\n										<div ng-bind-html="context.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONTEXT -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="route.description"/></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/voice/route/outbound/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_ROUTE\' | translate }}</h3>\n</div>\n<div class="modal-body" data-ng-init="getTags()">\n  <form name="forms.extension" novalidate>\n\n    <!-- START EXTEN -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.extension.exten.$touched || forms.extension.$submitted) && forms.extension.exten.$invalid || existRoute}">\n      <label class="control-label">{{\'APPLICATION_DESTINATION_PATTERN\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="exten" placeholder="{{\'APPLICATION_DESTINATION_PATTERN\' | translate}}" class="form-control" data-ng-model="item.exten" data-ng-pattern="settings.patternName" required/>\n      <span data-ng-show="(forms.extension.exten.$touched || forms.extension.$submitted) && forms.extension.exten.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END EXTEN -->\n\n    <!-- START TAG -->\n    <div class="form-group"  data-ng-class="{\'has-error\': (forms.extension.tag.$touched || forms.extension.$submitted) && forms.extension.tag.$invalid}">\n      <label class="control-label">{{ \'APPLICATION_TAG\' | translate }}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.tag" name="tag" theme="bootstrap" required>\n        <ui-select-match placeholder="{{ \'APPLICATION_TAG\' | translate }}" data-ng-init="item.tag = \'--\'">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="tag.name as tag in tags | filter: $select.search">\n          <div ng-bind-html="tag.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(forms.extension.tag.$touched || forms.extension.$submitted) && forms.extension.tag.$invalid && forms.extension.tag.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TAG -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.extension.$invalid || existRoute">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n<!-- <pre>\n  {{item | json}}\n</pre> -->\n'),a.put("app/channels/voice/route/outbound/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-call-out"></i>\n					<a href="/channels/voice/routes/outbound/list">{{ \'APPLICATION_OUTBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-users font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_OUTBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle " href="#" data-ng-click="create()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ROUTE\' | translate }}\n						</a>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter class="ui-grid" ui-grid-draggable-rows>\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/route/outbound/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getRoute()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-call-out"></i>\n					<a href="/channels/voice/routes/outbound/list">{{ \'APPLICATION_OUTBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }}</a>\n					<i data-ng-show="route" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="route">\n					<a href="#">{{route.exten}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/outboundroute.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{route.exten}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.routes.outbound.view.settings\')}">\n							<a data-ng-click="deselectAndRedirect(\'/channels/voice/routes/outbound/view/\'+route.id+\'/settings\')">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n'+"						<li data-ng-class=\"{active: $state.is('main.channels.voice.routes.outbound.view.routes') || $state.is('main.channels.voice.routes.outbound.view.route') || $state.is('main.channels.voice.routes.outbound.view.routes.settings')}\">\n							<a data-ng-click=\"deselectAndRedirect('/channels/voice/routes/outbound/view/'+route.id+'/routes')\">\n							<i class=\"icon-list\"></i>\n							{{ 'APPLICATION_ACTIONS' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class=\"profile-content\">\n		</div>\n		<!-- <pre>\n			{{route | json}}\n		</pre> -->\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n"),a.put("app/channels/voice/route/outbound/view/view.route.html",'<div class="row" data-ng-init="initApplication(true);getIntervals();">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_NEW_ROUTE\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<div class="profile-usertitle-name">\n					{{(main.app.name | translate) || \'Application\'}}\n				</div>\n				<wizard on-finish="addApplication()">\n	        <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="formValidation(forms.info.$valid)">\n							<form name="forms.info" novalidate>\n								<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n								<!-- START APP -->\n								<div class="form-group"  data-ng-class="{\'has-error\': (forms.info.app.$touched || forms.info.$submitted) && forms.info.app.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="main.app" name="app" theme="bootstrap" required>\n										<ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n										<ui-select-choices repeat="app in applications | filter: $select.search">\n											<div ng-bind-html="app.name | translate | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.info.app.$touched || forms.info.$submitted) && forms.info.app.$invalid && forms.info.app.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END APP -->\n								<div id="Dial" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && main.app.type == \'outboundDial\'" lazy-render duration="1">\n								<!-- START TRUNK -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.info.trunk.$touched || forms.info.$submitted) && forms.info.trunk.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TRUNK\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" name="trunk" theme="bootstrap" required data-ng-disabled="!items.length">\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="trunk.name as trunk in items | filter: $select.search">\n											<div ng-bind-html="trunk.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="items.length">\n										<h4 class="block">Warning!</h4>\n										<p>\n											{{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n										</p>\n										<p>\n											{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/trunks/list">{{\'APPLICATION_TRUNKS\' | translate}}</a>\n										</p>\n									</div>\n									<span data-ng-show="(forms.info.trunk.$touched || forms.info.$submitted) && forms.info.trunk.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TRUNK -->\n\n								<!-- START CALLERID -->\n								<div class="form-group"  data-ng-class="{\'has-error\': (forms.info.callerID.$touched || forms.info.$submitted) && forms.info.callerID.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_CALLERID\' | translate }}</label>\n									<input type="text" name="callerID" pattern=\'^"[a-zA-Z0-9_.-]*" <[a-zA-Z0-9_.-]*>\' placeholder=\'"name" <number>\' class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n										<span class="help-block">\n											{{ \'DESCRIPTION_OUTBOUND_CALLERID\' | translate }}\n										</span>\n									<span data-ng-show="(forms.info.callerID.$touched || forms.info.$submitted) && forms.info.callerID.$invalid" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END CALLERID -->\n\n								<!-- START PREFIX -->\n								<div class="form-group"  data-ng-class="{\'has-error\': (forms.info.prefix.$touched || forms.info.$submitted) && forms.info.prefix.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_PREFIX\' | translate }}</label>\n									<input type="text" name="prefix"  placeholder="{{ \'APPLICATION_PREFIX\' | translate }}" class="form-control" data-ng-model="application.appdata[2]" data-ng-init="application.appdata[2] = null">\n										<span class="help-block">\n											{{ \'DESCRIPTION_OUTBOUND_PREFIX\' | translate }}\n										</span>\n										<span data-ng-show="(forms.info.prefix.$touched || forms.info.$submitted) && forms.info.prefix.$invalid" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END PREFIX -->\n\n									<!-- START TIMEOUT -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n										<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n										<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="application.appdata[3]" data-ng-init="application.appdata[3] = null">\n										<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END TIMEOUT -->\n\n									<!-- START OPTIONS -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n										<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n										<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="application.appdata[4]" data-ng-init="application.appdata[4] = null">\n										<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END OPTIONS -->\n\n									<!-- START URL -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n										<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n										<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[5]" data-ng-init="application.appdata[5] = null">\n										<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END URL -->\n\n								</div>\n							<div id="Custom" class="app-settings" ng-slide-down="main.app.type == \'custom\'" lazy-render duration="1">\n\n								<!-- START CUSTOMAPP -->\n								<div class="form-group"  data-ng-class="{\'has-error\': (forms.info.customApp.$touched || forms.info.$submitted) && forms.info.customApp.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_CUSTOM_APP\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<input type="text" name="customApp" placeholder="{{ \'APPLICATION_CUSTOM_APP\' | translate }}" class="form-control" data-ng-model="application.app" data-ng-init="application.appdata[0] = null" required>\n									<span data-ng-show="(forms.info.customApp.$touched || forms.info.$submitted) && forms.info.customApp.$invalid && forms.info.customApp.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END CUSTOMAPP -->\n\n								<!-- START APPDATA -->\n								<div class="form-group"  data-ng-class="{\'has-error\': (forms.info.appdata.$touched || forms.info.$submitted) && forms.info.appdata.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_ARGUMENTS\' | translate }}</label>\n									<input type="text" name="appdata" placeholder="{{ \'APPLICATION_ARGUMENTS\' | translate }}" class="form-control" data-ng-model="application.appdata[0]" data-ng-init="application.appdata[1] = null">\n									<span data-ng-show="(forms.info.appdata.$touched || forms.info.$submitted) && forms.info.appdata.$invalid && forms.info.appdata.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END APPDATA -->\n							</div>\n							<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n							</form>\n							</wz-step>\n								<wz-step title="{{\'APPLICATION_INTERVAL\' | translate}}" canexit="formValidation(forms.interval.IntervalId.$valid || forms.interval.hasOwnProperty(\'t_from\') || forms.interval.intType.$modelValue === \'always\')">\n									<form name="forms.interval" novalidate>\n										<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n										<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n									<!-- START INTERVAL_TYPE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$invalid}">\n									<label class="control-label">{{\'APPLICATION_INTERVAL_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="interval.intType" theme="bootstrap" name="intType" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n										<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n											{{$translate.instant(intType.name)}}\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERVAL_TYPE -->\n								<div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'custom\'" lazy-render duration="1">\n										<!-- START TIME -->\n										<div class="form-group">\n											<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n											<div class="input-group input-large">\n												<fieldset class="pull-left" ng-disabled="interval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="interval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n												<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n												<fieldset ng-disabled="interval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="interval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n												<label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="interval.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label>\n											</div>\n										</div>\n										<!-- END TIME -->\n\n										<!-- START WEEKDAY -->\n										<div class="form-group">\n											<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n											<div class="input-group input-large">\n												<ui-select data-ng-model="interval.wd_from" theme="bootstrap" name="wd_from">\n													<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n													<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n														{{weekDay.name | translate}}\n													</ui-select-choices>\n												</ui-select>\n												<span class="input-group-addon">to</span>\n												<ui-select data-ng-model="interval.wd_to" theme="bootstrap" name="wd_to">\n													<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n													<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n														{{weekDay.name | translate}}\n													</ui-select-choices>\n												</ui-select>\n											</div>\n										</div>\n										<!-- END WEEKDAY -->\n\n										<!-- START MONTHDAY -->\n										<div class="form-group">\n											<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n											<div class="input-group input-large">\n												<ui-select data-ng-model="interval.md_from" theme="bootstrap" name="md_from">\n													<ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n													<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n														{{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n													</ui-select-choices>\n												</ui-select>\n												<span class="input-group-addon">to</span>\n												<ui-select data-ng-model="interval.md_to" theme="bootstrap" name="md_to">\n													<ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n													<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n														{{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n													</ui-select-choices>\n												</ui-select>\n											</div>\n										</div>\n										<!-- END MONTHDAY -->\n\n										<!-- START MONTH -->\n										<div class="form-group">\n											<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n											<div class="input-group input-large">\n												<ui-select data-ng-model="interval.m_from" theme="bootstrap" name="m_from">\n													<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n													<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n														{{month.name | translate}}\n													</ui-select-choices>\n												</ui-select>\n												<span class="input-group-addon">to</span>\n												<ui-select data-ng-model="interval.m_to" theme="bootstrap" name="m_to">\n													<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n													<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n														{{month.name | translate}}\n													</ui-select-choices>\n												</ui-select>\n											</div>\n										</div>\n										<!-- END MONTH -->\n						</div>\n\n						<div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'list\'" lazy-render duration="1">\n\n							<!-- START INTERVALS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$invalid}">\n								<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="interval.IntervalId" theme="bootstrap" name="IntervalId" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n									<ui-select-choices repeat="interval.id as interval in Intervals | filter: $select.search">\n										{{interval.name | translate}}\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END INTERVALS -->\n\n						</div>\n\n						<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n						<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n							</form>\n						</wz-step>\n\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/route/outbound/view/view.routeSettings.html",'<div class="row" data-ng-init="initApplication();getApplication();getIntervals();">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_APPLICATION_SETTINGS\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="updateRoute(\'routes\')">\n					<div class="profile-usertitle-name">\n						{{(main.app.name | translate) || \'Application\'}}\n					</div>\n	        <wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.info.$valid)">\n						<form name="forms.info" novalidate>\n							<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n							<div id="Dial" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && main.app.type == \'outboundDial\'" lazy-render duration="1">\n\n							<!-- START TRUNK -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.trunk.$touched || forms.info.$submitted) && forms.info.trunk.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TRUNK\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" name="trunk" theme="bootstrap" required data-ng-disabled="!items.length">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="trunk.name as trunk in items | filter: $select.search">\n										<div ng-bind-html="trunk.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<div class="note note-warning" data-ng-hide="items.length">\n									<h4 class="block">Warning!</h4>\n									<p>\n										{{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n									</p>\n									<p>\n										{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/trunks/list">{{\'APPLICATION_TRUNKS\' | translate}}</a>\n									</p>\n								</div>\n								<span data-ng-show="(forms.info.trunk.$touched || forms.info.$submitted) && forms.info.trunk.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TRUNK -->\n\n							<!-- START CALLERID -->\n							<div class="form-group"  data-ng-class="{\'has-error\': (forms.info.callerID.$touched || forms.info.$submitted) && forms.info.callerID.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_CALLERID\' | translate }}</label>\n								<input type="text" name="callerID" pattern=\'^"[a-zA-Z0-9_.-]*" <[a-zA-Z0-9_.-]*>\' placeholder=\'"name" <number>\' class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n									<span class="help-block">\n										{{ \'DESCRIPTION_OUTBOUND_CALLERID\' | translate }} "name" &lt;number&gt;\n									</span>\n								<span data-ng-show="(forms.info.callerID.$touched || forms.info.$submitted) && forms.info.callerID.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CALLERID -->\n\n							<!-- START PREFIX -->\n							<div class="form-group"  data-ng-class="{\'has-error\': (forms.info.prefix.$touched || forms.info.$submitted) && forms.info.prefix.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_PREFIX\' | translate }}</label>\n								<input type="text" name="prefix"  placeholder="{{ \'APPLICATION_PREFIX\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[2]">\n								<span class="help-block">\n									{{ \'DESCRIPTION_OUTBOUND_PREFIX\' | translate }}\n								</span>\n								<span data-ng-show="(forms.info.prefix.$touched || forms.info.$submitted) && forms.info.prefix.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n								<!-- END PREFIX -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n									<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[3]">\n									<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n								<!-- START OPTIONS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n									<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[4]">\n									<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END OPTIONS -->\n\n								<!-- START URL -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n									<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[5]">\n									<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END URL -->\n						</div>\n						<div id="Custom" class="app-settings" ng-slide-down="main.app.type == \'custom\'" lazy-render duration="1">\n\n							<!-- START CUSTOMAPP -->\n							<div class="form-group"  data-ng-class="{\'has-error\': (forms.info.customApp.$touched || forms.info.$submitted) && forms.info.customApp.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_CUSTOM_APP\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="customApp" placeholder="{{ \'APPLICATION_CUSTOM_APP\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].app" required>\n								<span data-ng-show="(forms.info.customApp.$touched || forms.info.$submitted) && forms.info.customApp.$invalid && forms.info.customApp.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CUSTOMAPP -->\n\n							<!-- START APPDATA -->\n							<div class="form-group"  data-ng-class="{\'has-error\': (forms.info.appdata.$touched || forms.info.$submitted) && forms.info.appdata.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_ARGUMENTS\' | translate }}</label>\n								<input type="text" name="appdata" placeholder="{{ \'APPLICATION_ARGUMENTS\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[0]">\n								<span data-ng-show="(forms.info.appdata.$touched || forms.info.$submitted) && forms.info.appdata.$invalid && forms.info.appdata.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END APPDATA -->\n						</div>\n						<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n					</form>\n					</wz-step>\n						<wz-step title="{{\'APPLICATION_INTERVAL\' | translate}}" canexit="formValidation(forms.interval.IntervalId.$valid || forms.interval.hasOwnProperty(\'t_from\') || forms.interval.intType.$modelValue === \'always\')">\n							<form name="forms.interval" novalidate>\n								<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n								<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n						<!-- START INTERVAL_TYPE -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$invalid}">\n							<label class="control-label">{{\'APPLICATION_INTERVAL_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="interval.intType" theme="bootstrap" name="intType" required>\n								<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n								<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n									{{intType.name | translate}}\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END INTERVAL_TYPE -->\n						<div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'custom\'" lazy-render duration="1">\n								<!-- START TIME -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n									<div class="input-group input-large">\n										<fieldset class="pull-left" ng-disabled="interval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="interval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n										<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n										<fieldset ng-disabled="interval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="interval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n									</div>\n								</div>\n								<!-- END TIME -->\n\n								<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="interval.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n								<!-- START ALWAYS -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n									<div class="input-group input-large">\n										<label class="control-label pointer-cursor">\n											<input\n												bs-switch\n												data-ng-model="interval.alwaysTime"\n												type="checkbox"\n												switch-active="{{ alwaysSwitch.isActive }}"\n												switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n												switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n												switch-on-color="{{ alwaysSwitch.onColor }}"\n												switch-off-color="{{ alwaysSwitch.offColor }}"\n												switch-animate="{{ alwaysSwitch.animate }}"\n												switch-size="{{ alwaysSwitch.size }}"\n												switch-label="{{ alwaysSwitch.label }}"\n												switch-icon="{{ alwaysSwitch.icon }}"\n												switch-radio-off="{{ alwaysSwitch.radioOff }}"\n												switch-label-width="{{ alwaysSwitch.labelWidth }}"\n												switch-handle-width="{{ alwaysSwitch.handleWidth }}">\n										</label>\n									</div>\n								</div>\n								<!-- END ALWAYS -->\n\n								<!-- START WEEKDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="interval.wd_from" theme="bootstrap" name="wd_from">\n											<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{weekDay.name | translate}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="interval.wd_to" theme="bootstrap" name="wd_to">\n											<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n											<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n												{{weekDay.name | translate}}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END WEEKDAY -->\n\n								<!-- START MONTHDAY -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="interval.md_from" theme="bootstrap" name="md_from">\n											<ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n												{{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="interval.md_to" theme="bootstrap" name="md_to">\n											<ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n											<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n												{{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTHDAY -->\n\n								<!-- START MONTH -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n									<div class="input-group input-large">\n										<ui-select data-ng-model="interval.m_from" theme="bootstrap" name="m_from">\n											<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{month.name | translate}}\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-addon">to</span>\n										<ui-select data-ng-model="interval.m_to" theme="bootstrap" name="m_to">\n											<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n											<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n												{{month.name | translate}}\n											</ui-select-choices>\n										</ui-select>\n									</div>\n								</div>\n								<!-- END MONTH -->\n							</div>\n\n							<div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'list\'" lazy-render duration="1">\n\n								<!-- START INTERVALS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$invalid}">\n									<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="interval.IntervalId" theme="bootstrap" name="IntervalId" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n										<ui-select-choices repeat="interval.id as interval in Intervals | filter: $select.search">\n											{{interval.name | translate}}\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="intervals.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERVALS -->\n\n							</div>\n							<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n							<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n							</form>\n						</wz-step>\n\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/channels/voice/route/outbound/view/view.routes.html",'<div ui-view class="profile-content">\n<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title  tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACTIONS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="selectedRows.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle " href="/channels/voice/routes/outbound/view/{{route.id}}/route" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ROUTE\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div data-ng-if="showGrid" ui-grid="gridOptions"  ui-grid-resize-columns class="grid" ui-grid-selection ui-grid-draggable-rows ui-grid-auto-resize>\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/channels/voice/route/outbound/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_OUTBOUND\' | translate}} {{ \'APPLICATION_ROUTE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body" data-ng-init="getContexts();getTags();">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateRoute()" novalidate>\n\n							<!-- START EXTEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.exten.$touched || forms.general.$submitted) && forms.general.exten.$invalid}">\n								<label class="control-label">{{\'APPLICATION_DESTINATION_PATTERN\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="exten" placeholder="{{\'APPLICATION_DESTINATION_PATTERN\' | translate}}" class="form-control" data-ng-model="route.exten" required/>\n								<span data-ng-show="(forms.general.exten.$touched || forms.general.$submitted) && forms.general.exten.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END EXTEN -->\n\n							<!-- START CUTDIGITS -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_CUTDIGITS\' | translate}}</label>\n								<input type="text" pattern="[0-9]+" class="form-control" name="cutdigits" data-ng-model="route.cutdigits">\n								<span class="help-block">\n								</span>\n							</div>\n							<!-- END CUTDIGITS -->\n\n							<!-- START TAG -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.tag.$touched || forms.general.$submitted) && forms.general.tag.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TAG\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="route.tag" name="tag" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="tag.name as tag in tags | filter: $select.search">\n										<div ng-bind-html="tag.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.general.tag.$touched || forms.general.$submitted) && forms.general.tag.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TAG -->\n\n							<!-- START CONTEXT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="route.context" name="context" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="context.name as context in voiceContexts | filter: $select.search">\n										<div ng-bind-html="context.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONTEXT -->\n\n							<!-- START RECORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.record.$touched || forms.general.$submitted) && forms.general.record.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RECORDING\' | translate}}</label></br>\n								<input\n								    bs-switch\n										class="form-control"\n								    ng-model="route.record"\n								    type="checkbox"\n								    switch-active="{{ recordSwitch.isActive }}"\n								    switch-on-text="{{ recordSwitch.onText }}"\n								    switch-off-text="{{ recordSwitch.offText }}"\n								    switch-on-color="{{ recordSwitch.onColor }}"\n								    switch-off-color="{{ recordSwitch.offColor }}"\n								    switch-animate="{{ recordSwitch.animate }}"\n								    switch-size="{{ recordSwitch.size }}"\n								    switch-label="{{ recordSwitch.label }}"\n								    switch-icon="{{ recordSwitch.icon }}"\n								    switch-radio-off="{{ recordSwitch.radioOff }}"\n								    switch-label-width="{{ recordSwitch.labelWidth }}"\n								    switch-handle-width="{{ recordSwitch.handleWidth }}">\n								<span data-ng-show="(forms.general.record.$touched || forms.general.$submitted) && forms.general.record.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END RECORD -->\n\n							<!-- START RECORDINGFORMAT -->\n							<div data-ng-if="route.record" class="form-group" data-ng-class="{\'has-error\': (forms.general.recordingFormat.$touched || forms.general.$submitted) && forms.general.recordingFormat.$invalid}">\n								<label class="control-label">{{\'APPLICATION_FORMAT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="route.recordingFormat" name="recordingFormat" theme="bootstrap" data-ng-required="route.record">\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected}}</ui-select-match>\n									<ui-select-choices repeat="format in [\'wav\',\'gsm\'] | filter: $select.search">\n										<div ng-bind-html="format | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.general.recordingFormat.$touched || forms.general.$submitted) && forms.general.recordingFormat.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END RECORDINGFORMAT -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="route.description"/></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/voice/route/view.application.html",'\n<div class="row" data-ng-init="initApplication(true); getIntervals();">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_NEW_APPLICATION\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="addApplication()">\n					<div class="profile-usertitle-name">\n						{{(main.app.name | translate) || \'Application\'}}\n					</div>\n	        <wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.settings.$valid)">\n							<form name="forms.settings" novalidate>\n\n								<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n									<!-- START APP -->\n									<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid}">\n										<label class="control-label">{{ \'APPLICATION_APPLICATION\' | translate }}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="main.app" name="app" theme="bootstrap" required>\n					            <ui-select-match placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n					            <ui-select-choices repeat="app in $application.applications| filter: $select.search">\n					              <div ng-bind-html="app.name | translate | highlight: $select.search"></div>\n					            </ui-select-choices>\n					          </ui-select>\n										<span data-ng-show="(forms.settings.app.$touched || forms.settings.$submitted) && forms.settings.app.$invalid && forms.settings.app.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END APP -->\n\n									<div id="Queue" class="app-settings" ng-slide-down="main.app.value == \'Queue\'" lazy-render duration="1">\n										<!-- START QUEUE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$invalid}">\n											<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n											<ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" name="queue" theme="bootstrap" required data-ng-disabled="!items.length">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n												<ui-select-choices repeat="queue.name as queue in items | filter: $select.search">\n													<div ng-bind-html="queue.name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<div class="note note-warning" data-ng-hide="items.length">\n												<h4 class="block">Warning!</h4>\n												<p>\n													{{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n												</p>\n												<p>\n													{{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/voice/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n												</p>\n											</div>\n											<span data-ng-show="(forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END QUEUE -->\n\n										<!-- START OPTIONS -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n											<label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}</label>\n											<input type="text" pattern="[^,]*" name="app_options" placeholder="{{ \'APPLICATION_OPTIONS\' | translate }}" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n											<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.pattern" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n											</span>\n										</div>\n										<!-- END OPTIONS -->\n										<!-- START URL -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n											<input type="text" pattern="[^,]*" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[2]" data-ng-init="application.appdata[2] = null">\n											<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.pattern" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n											</span>\n										</div>\n										<!-- END URL -->\n\n										<!-- START APPLICATION_ANNOUNCE_OVERRIDE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$invalid}">\n											<label class="control-label">{{\'APPLICATION_ANNOUNCE_OVERRIDE\' | translate}}</label>\n											<ui-select data-ng-model="application.appdata[3]" data-ng-init="application.appdata[3] = null" name="audiofile" theme="bootstrap" data-ng-disabled="!items2.length">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n												<ui-select-choices repeat="settings.soundPath+\'/\'+audio.save_name as audio in items2 | filter: $select.search">\n													<div ng-bind-html="audio.display_name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<div class="note note-warning" data-ng-hide="items2.length">\n												<h4 class="block">Warning!</h4>\n												<p>\n													{{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n												</p>\n												<p>\n													{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/sounds/list">{{\'APPLICATION_SOUNDS\' | translate}}</a>\n												</p>\n											</div>\n											<span data-ng-show="(forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END APPLICATION_ANNOUNCE_OVERRIDE -->\n\n										<!-- START TIMEOUT -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n											<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="application.appdata[4]" data-ng-init="application.appdata[4] = null">\n											<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END TIMEOUT -->\n\n										<!-- START AGI -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.agi.$touched || forms.settings.$submitted) && forms.settings.agi.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_AGI\' | translate }}</label>\n											<input type="text" pattern="[^,]*" name="agi" placeholder="{{ \'APPLICATION_AGI\' | translate }}" class="form-control" data-ng-model="application.appdata[5]" data-ng-init="application.appdata[6] = null">\n											<span data-ng-show="(forms.settings.agi.$touched || forms.settings.$submitted) && forms.settings.agi.$invalid && forms.settings.agi.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="(forms.settings.agi.$touched || forms.settings.$submitted) && forms.settings.agi.$invalid && forms.settings.agi.$error.pattern" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n											</span>\n										</div>\n										<!-- END AGI -->\n\n										<!-- START MACRO -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.macro.$touched || forms.settings.$submitted) && forms.settings.macro.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_MACRO\' | translate }}</label>\n											<input type="text" pattern="[^,]*" name="macro" placeholder="{{ \'APPLICATION_MACRO\' | translate }}" class="form-control" data-ng-model="application.appdata[6]" data-ng-init="application.appdata[6] = null">\n											<span data-ng-show="(forms.settings.macro.$touched || forms.settings.$submitted) && forms.settings.macro.$invalid && forms.settings.macro.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="(forms.settings.macro.$touched || forms.settings.$submitted) && forms.settings.macro.$invalid && forms.settings.macro.$error.pattern" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n											</span>\n										</div>\n										<!-- END MACRO -->\n\n										<!-- START GOSUB -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.gosub.$touched || forms.settings.$submitted) && forms.settings.gosub.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_GOSUB\' | translate }}</label>\n											<input type="text" pattern="[^,]*" name="gosub" placeholder="{{ \'APPLICATION_GOSUB\' | translate }}" class="form-control" data-ng-model="application.appdata[7]" data-ng-init="application.appdata[7] = null">\n											<span data-ng-show="(forms.settings.gosub.$touched || forms.settings.$submitted) && forms.settings.gosub.$invalid && forms.settings.gosub.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="(forms.settings.gosub.$touched || forms.settings.$submitted) && forms.settings.gosub.$invalid && forms.settings.gosub.$error.pattern" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n											</span>\n										</div>\n										<!-- END GOSUB -->\n\n										<!-- START RULE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.rule.$touched || forms.settings.$submitted) && forms.settings.rule.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_RULE\' | translate }}</label>\n											<input type="text" pattern="[^,]*" name="rule" placeholder="{{ \'APPLICATION_RULE\' | translate }}" class="form-control" data-ng-model="application.appdata[8]" data-ng-init="application.appdata[8] = null">\n											<span data-ng-show="(forms.settings.rule.$touched || forms.settings.$submitted) && forms.settings.rule.$invalid && forms.settings.rule.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="(forms.settings.rule.$touched || forms.settings.$submitted) && forms.settings.rule.$invalid && forms.settings.rule.$error.pattern" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n											</span>\n										</div>\n										<!-- END RULE -->\n\n										<!-- START POSITION -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.position.$touched || forms.settings.$submitted) && forms.settings.position.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_POSITION\' | translate }}</label>\n											<input type="number" min="0" name="position" placeholder="{{ \'APPLICATION_POSITION\' | translate }}" class="form-control" data-ng-model="application.appdata[9]" data-ng-init="application.appdata[9] = null">\n											<span data-ng-show="(forms.settings.position.$touched || forms.settings.$submitted) && forms.settings.position.$invalid && forms.settings.position.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END POSITION -->\n\n										<!-- START ANSWER -->\n										<div class="form-group">\n											<label class="control-label">{{ \'APPLICATION_ANSWER\' | translate }}</label>\n											<div class="input-group input-large">\n												<label class="control-label pointer-cursor">\n													<input\n													bs-switch\n													data-ng-init="application.answer=true"\n													data-ng-model="application.answer"\n													type="checkbox"\n													switch-active="{{ alwaysSwitch.isActive }}"\n													switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n													switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n													switch-on-color="{{ alwaysSwitch.onColor }}"\n													switch-off-color="{{ alwaysSwitch.offColor }}"\n													switch-animate="{{ alwaysSwitch.animate }}"\n													switch-size="{{ alwaysSwitch.size }}"\n													switch-label="{{ alwaysSwitch.label }}"\n													switch-icon="{{ alwaysSwitch.icon }}"\n													switch-radio-off="{{ alwaysSwitch.radioOff }}"\n													switch-label-width="{{ alwaysSwitch.labelWidth }}"\n													switch-handle-width="{{ alwaysSwitch.handleWidth }}">\n												</label>\n											</div>\n										</div>\n										<!-- END ANSWER -->\n\n									</div>\n									<div id="Playback" class="app-settings" ng-slide-down="main.app.value == \'Playback\'" lazy-render duration="1">\n										<!-- START AUDIOFILE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$invalid}">\n											<label class="control-label">{{\'APPLICATION_AUDIO_FILE\' | translate}}<span class="required" aria-required="true">*</span></label>\n											<ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" name="audiofile" theme="bootstrap" required data-ng-disabled="!items.length">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n												<ui-select-choices repeat="settings.soundPath+\'/\'+audio.save_name as audio in items | filter: $select.search">\n													<div ng-bind-html="audio.display_name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<div class="note note-warning" data-ng-hide="items.length">\n												<h4 class="block">Warning!</h4>\n												<p>\n													{{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n												</p>\n												<p>\n													{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/sounds/list">{{\'APPLICATION_SOUNDS\' | translate}}</a>\n												</p>\n											</div>\n											<span data-ng-show="(forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END AUDIOFILE -->\n\n										<!-- START OPTIONS -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n											<label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}</label>\n											<input type="text" name="app_options" placeholder="{{ \'APPLICATION_OPTIONS\' | translate }}" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n											<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END OPTIONS -->\n\n										<!-- START ANSWER -->\n										<div class="form-group">\n											<label class="control-label">{{ \'APPLICATION_ANSWER\' | translate }}</label>\n											<div class="input-group input-large">\n												<label class="control-label pointer-cursor">\n													<input\n													bs-switch\n													data-ng-init="application.answer=true"\n													data-ng-model="application.answer"\n													type="checkbox"\n													switch-active="{{ alwaysSwitch.isActive }}"\n													switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n													switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n													switch-on-color="{{ alwaysSwitch.onColor }}"\n													switch-off-color="{{ alwaysSwitch.offColor }}"\n													switch-animate="{{ alwaysSwitch.animate }}"\n													switch-size="{{ alwaysSwitch.size }}"\n													switch-label="{{ alwaysSwitch.label }}"\n													switch-icon="{{ alwaysSwitch.icon }}"\n													switch-radio-off="{{ alwaysSwitch.radioOff }}"\n													switch-label-width="{{ alwaysSwitch.labelWidth }}"\n													switch-handle-width="{{ alwaysSwitch.handleWidth }}">\n												</label>\n											</div>\n										</div>\n										<!-- END ANSWER -->\n									</div>\n									<div id="Dial" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && !main.app.type" lazy-render duration="1">\n										<!-- START INTERFACE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.interface.$touched || forms.settings.$submitted) && forms.settings.interface.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_TYPE\' | translate }}/{{ \'APPLICATION_IDENTIFIER\' | translate }}<span class="required" aria-required="true">*</span></label>\n											<input type="text" name="interface" placeholder="SIP/0000" class="form-control" data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" required>\n											<span data-ng-show="(forms.settings.interface.$touched || forms.settings.$submitted) && forms.settings.interface.$invalid && forms.settings.interface.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END INTERFACE -->\n\n										<!-- START TIMEOUT -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n											<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n											<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END TIMEOUT -->\n\n										<!-- START OPTIONS -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n											<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="application.appdata[2]" data-ng-init="application.appdata[2] = null">\n											<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END OPTIONS -->\n\n										<!-- START URL -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n											<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[3]" data-ng-init="application.appdata[3] = null">\n											<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END URL -->\n									</div>\n									<div id="internalDial" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && main.app.type == \'internalDial\'" lazy-render duration="1">\n										<!-- START INTERNAL DIAL -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.user.$touched || forms.settings.$submitted) && forms.settings.user.$invalid}">\n											<label class="control-label">{{\'APPLICATION_USER\' | translate}}<span class="required" aria-required="true">*</span></label>\n											<ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" name="user" theme="bootstrap" required data-ng-disabled="!items.length">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n												<ui-select-choices repeat="user.name as user in items | filter: $select.search">\n													<div ng-bind-html="user.name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<span data-ng-show="(forms.settings.user.$touched || forms.settings.$submitted) && forms.settings.user.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END INTERNAL DIAL -->\n\n										<!-- START TIMEOUT -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n											<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n											<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END TIMEOUT -->\n\n										<!-- START OPTIONS -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n											<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="application.appdata[2]" data-ng-init="application.appdata[2] = null">\n											<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n												<strong>{{ \'APPLICATION_WARNING\' | translate }}!</strong> {{ \'MESSAGE_REQUIRED_FIELD\' | translate }}.\n											</span>\n										</div>\n										<!-- END OPTIONS -->\n\n										<!-- START URL -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n											<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[3]" data-ng-init="application.appdata[3] = null">\n											<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n												<strong>{{ \'APPLICATION_WARNING\' | translate }}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END URL -->\n\n									</div>\n									<div id="Dial" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && main.app.type == \'externalDial\'" lazy-render duration="1">\n										<!-- START TRUNK -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.info.trunk.$touched || forms.info.$submitted) && forms.info.trunk.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_TRUNK\' | translate }}<span class="required" aria-required="true">*</span></label>\n											<ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" name="trunk" theme="bootstrap" required data-ng-disabled="!items.length">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n												<ui-select-choices repeat="trunk.name as trunk in items | filter: $select.search">\n													<div ng-bind-html="trunk.name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<div class="note note-warning" data-ng-hide="items.length">\n												<h4 class="block">Warning!</h4>\n												<p>\n													{{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n												</p>\n												<p>\n													{{ \'APPLICATION_GO_TO\' | translate }} <a href="/tools/trunks/list">{{ \'APPLICATION_TRUNKS\' | translate }}</a>\n												</p>\n											</div>\n											<span data-ng-show="(forms.info.trunk.$touched || forms.info.$submitted) && forms.info.trunk.$error.required" class="help-block help-block-error">\n												<strong>{{ \'APPLICATION_WARNING\' | translate }}!</strong> {{ \'MESSAGE_REQUIRED_FIELD\' | translate }}.\n											</span>\n										</div>\n										<!-- END TRUNK -->\n\n										<!-- START PHONE -->\n											<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.phone.$touched || forms.settings.$submitted) && forms.settings.phone.$invalid}">\n												<label class="control-label">{{ \'APPLICATION_PHONE\' | translate }}<span class="required" aria-required="true">*</span></label>\n												<input type="text" name="phone" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null" required>\n												<span data-ng-show="(forms.settings.phone.$touched || forms.settings.$submitted) && forms.settings.phone.$invalid && forms.settings.phone.$error.required" class="help-block help-block-error">\n													<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n												</span>\n											</div>\n											<!-- END PHONE -->\n\n											<!-- START TIMEOUT -->\n											<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n												<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n												<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="application.appdata[2]" data-ng-init="application.appdata[2] = null">\n												<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n													<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n												</span>\n											</div>\n											<!-- END TIMEOUT -->\n\n											<!-- START OPTIONS -->\n											<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n												<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n												<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="application.appdata[3]" data-ng-init="application.appdata[3] = null">\n												<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n													<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n												</span>\n											</div>\n											<!-- END OPTIONS -->\n\n											<!-- START URL -->\n											<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n												<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n												<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[4]" data-ng-init="application.appdata[4] = null">\n												<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n													<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n												</span>\n											</div>\n											<!-- END URL -->\n										</div>\n										<div id="RingGroup" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && main.app.type == \'RingGroup\'" lazy-render duration="1">\n											<!-- START ITEMS -->\n											<input type="hidden" name="items" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[0]" data-ng-init="initRingGroup()">\n											<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.project.$touched || forms.settings.$submitted) && forms.settings.items.$invalid}">\n												<label class="control-label">{{\'APPLICATION_ITEMS\' | translate}}<span class="required" aria-required="true">*</span></label>\n												<div class="col-md-12" id="multi-select-user-by-role"></div>\n												<span data-ng-show="(forms.settings.items.$touched || forms.settings.$submitted) && forms.settings.items.$error.required" class="help-block help-block-error">\n													<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n												</span>\n											</div>\n											<!-- END ITEMS -->\n\n											<!-- START TIMEOUT -->\n											<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n												<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n												<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n												<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n													<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n												</span>\n											</div>\n											<!-- END TIMEOUT -->\n\n											<!-- START OPTIONS -->\n											<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n												<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n												<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="application.appdata[2]" data-ng-init="application.appdata[2] = null">\n												<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n													<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n												</span>\n											</div>\n											<!-- END OPTIONS -->\n\n											<!-- START URL -->\n											<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n												<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n												<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[3]" data-ng-init="application.appdata[3] = null">\n												<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n													<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n												</span>\n											</div>\n											<!-- END URL -->\n										</div>\n									<div id="AGI" class="app-settings" ng-slide-down="main.app.value == \'AGI\'" lazy-render duration="1">\n										<!-- START PROJECT -->\n										<input type="hidden" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = \'agi://127.0.0.1/square\'">\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.project.$touched || forms.settings.$submitted) && forms.settings.project.$invalid}">\n											<label class="control-label">{{\'APPLICATION_PROJECT\' | translate}}<span class="required" aria-required="true">*</span></label>\n											<ui-select data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null" name="project" theme="bootstrap" required data-ng-disabled="!items.length">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n												<ui-select-choices repeat="project.name as project in items | filter: $select.search">\n													<div ng-bind-html="project.name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<div class="note note-warning" data-ng-hide="items.length">\n												<h4 class="block">Warning!</h4>\n												<p>\n													{{ \'MESSAGE_NO_PROJECTS_AVAILABLE\' | translate }}\n												</p>\n												<p>\n													{{\'APPLICATION_GO_TO\' | translate}} <a href="/square/projects/list">{{\'APPLICATION_PROJECTS\' | translate}}</a>\n												</p>\n											</div>\n											<span data-ng-show="(forms.settings.project.$touched || forms.settings.$submitted) && forms.settings.project.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END PROJECT -->\n									</div>\n									<div id="Goto" class="app-settings" ng-slide-down="main.app.value == \'Goto\'" lazy-render duration="1">\n										<!-- START CONTEXT -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.context.$touched || forms.settings.$submitted) && forms.settings.context.$invalid}">\n											<label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n											<ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" name="context" theme="bootstrap" required>\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n												<ui-select-choices repeat="context.name as context in items | filter: $select.search">\n													<div ng-bind-html="context.name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<span data-ng-show="(forms.settings.context.$touched || forms.settings.$submitted) && forms.settings.context.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END CONTEXT -->\n\n										<!-- START EXTENSION -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.extension.$touched || forms.settings.$submitted) && forms.settings.extension.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_EXTENSION\' | translate }}<span class="required" aria-required="true">*</span></label>\n											<input type="text" name="extension" placeholder="" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null" required>\n											<span data-ng-show="(forms.settings.extension.$touched || forms.settings.$submitted) && forms.settings.extension.$invalid && forms.settings.extension.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END EXTENSION -->\n\n										<!-- START PRIORITY -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.priority.$touched || forms.settings.$submitted) && forms.settings.priority.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_PRIORITY\' | translate }}<span class="required" aria-required="true">*</span></label>\n											<input type="text" pattern="[0-9]+" name="priority" placeholder="" class="form-control" data-ng-model="application.appdata[2]" data-ng-init="application.appdata[2] = null" required>\n											<span data-ng-show="(forms.settings.priority.$touched || forms.settings.$submitted) && forms.settings.priority.$invalid" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END PRIORITY -->\n									</div>\n									<div id="Hangup" class="app-settings" ng-slide-down="main.app.value == \'Hangup\'" lazy-render duration="1">\n										<!-- START HANGUPCAUSE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.hangupCause.$touched || forms.settings.$submitted) && forms.settings.hangupCause.$invalid}">\n											<label class="control-label">{{\'APPLICATION_HANGUP_CAUSE\' | translate}}<span class="required" aria-required="true">*</span></label>\n											<ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" theme="bootstrap" name="hangupCause" required>\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n												<ui-select-choices repeat="hangupCause.value as hangupCause in $application.hangupCauses | filter: $select.search">\n													<div ng-bind-html="hangupCause.name  | translate | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<span data-ng-show="(forms.settings.hangupCause.$touched || forms.settings.$submitted) && forms.settings.hangupCause.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END HANGUPCAUSE -->\n									</div>\n									<div id="Set" class="app-settings" ng-slide-down="main.app.value == \'Set\'" lazy-render duration="1">\n										<!-- START VARIABLE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.variable.$touched || forms.settings.$submitted) && forms.settings.variable.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_VARIABLE\' | translate }}<span class="required" aria-required="true">*</span></label>\n											<input type="text" name="variable" placeholder="" class="form-control" data-ng-model="application.variable" data-ng-init="application.appdata[0] = null" data-ng-change="updateSetAppdata()" required>\n											<span data-ng-show="(forms.settings.variable.$touched || forms.settings.$submitted) && forms.settings.variable.$invalid && forms.settings.variable.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END VARIABLE -->\n\n										<!-- START VARVALUE -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.varvalue.$touched || forms.settings.$submitted) && forms.settings.varvalue.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_VALUE\' | translate }}<span class="required" aria-required="true">*</span></label>\n											<input type="text" name="varvalue" placeholder="" class="form-control" data-ng-model="application.value" data-ng-change="updateSetAppdata()" required>\n											<span data-ng-show="(forms.settings.varvalue.$touched || forms.settings.$submitted) && forms.settings.varvalue.$invalid && forms.settings.varvalue.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END VARVALUE -->\n									</div>\n									<div id="Custom" class="app-settings" ng-slide-down="main.app.type == \'custom\'" lazy-render duration="1">\n\n										<!-- START CUSTOMAPP -->\n										<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.customApp.$touched || forms.settings.$submitted) && forms.settings.customApp.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_CUSTOM_APP\' | translate }}<span class="required" aria-required="true">*</span></label>\n											<input type="text" name="customApp" placeholder="{{ \'APPLICATION_CUSTOM_APP\' | translate }}" class="form-control" data-ng-model="application.app" required>\n											<span data-ng-show="(forms.settings.customApp.$touched || forms.settings.$submitted) && forms.settings.customApp.$invalid && forms.settings.customApp.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END CUSTOMAPP -->\n\n										<!-- START APPDATA -->\n										<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.appdata.$touched || forms.settings.$submitted) && forms.settings.appdata.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_ARGUMENTS\' | translate }}</label>\n											<input type="text" name="appdata" placeholder="{{ \'APPLICATION_ARGUMENTS\' | translate }}" class="form-control" data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null">\n											<span data-ng-show="(forms.settings.appdata.$touched || forms.settings.$submitted) && forms.settings.appdata.$invalid && forms.settings.appdata.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END APPDATA -->\n									</div>\n									<div id="Voicemail" class="app-settings" ng-slide-down="main.app.value == \'Voicemail\'" lazy-render duration="1">\n										<!-- START VOICEMAIL -->\n										<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.voicemail.$touched || forms.settings.$submitted) && forms.settings.voicemail.$invalid}">\n											<label class="control-label">{{ \'APPLICATION_MAILBOX\' | translate }}@{{ \'APPLICATION_CONTEXT\' | translate }}<span class="required" aria-required="true">*</span></label>\n											<ui-select data-ng-model="application.appdata[0]" data-ng-init="application.appdata[0] = null" theme="bootstrap" name="voicemail" required data-ng-disabled="!items.length">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.mailbox}}</ui-select-match>\n												<ui-select-choices repeat="mailbox.mailbox+\'@\'+mailbox.context as mailbox in items | filter: $select.search">\n													<div ng-bind-html="mailbox.mailbox | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n											<div class="note note-warning" data-ng-hide="items.length">\n												<h4 class="block">Warning!</h4>\n												<p>\n													{{ \'MESSAGE_NO_VOICEMAILS_AVAILABLE\' | translate }}\n												</p>\n												<p>\n													{{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/voice/voicemails/list">{{\'APPLICATION_VOICEMAILS\' | translate}}</a>\n												</p>\n											</div>\n											<span data-ng-show="(forms.settings.voicemail.$touched || forms.settings.$submitted) && forms.settings.voicemail.$invalid && forms.settings.voicemail.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n										</div>\n										<!-- END VOICEMAIL -->\n\n										<!-- START OPTIONS -->\n										<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n											<label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}</label>\n											<input type="text" name="app_options" placeholder="{{ \'APPLICATION_OPTIONS\' | translate }}" class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n										</div>\n										<!-- END OPTIONS -->\n									</div>\n									<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n								</form>\n								</wz-step>\n									<wz-step title="{{\'APPLICATION_INTERVAL\' | translate}}" canexit="formValidation(forms.interval.IntervalId.$valid || forms.interval.hasOwnProperty(\'t_from\') || forms.interval.intType.$modelValue === \'always\')">\n										<form name="forms.interval" novalidate>\n										<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n										<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n									<!-- START INTERVAL_TYPE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$invalid}">\n										<label class="control-label">{{\'APPLICATION_INTERVAL_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="interval.intType" theme="bootstrap" name="intType" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n											<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n												<div ng-bind-html="intType.name | translate | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span data-ng-show="(forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END INTERVAL_TYPE -->\n									<div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'custom\'" lazy-render duration="1">\n											<!-- START TIME -->\n											<div class="form-group">\n												<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n												<div class="input-group input-large">\n													<fieldset class="pull-left" ng-disabled="interval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="interval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n													<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n													<fieldset ng-disabled="interval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="interval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n												</div>\n											</div>\n											<!-- END TIME -->\n\n											<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="interval.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n											<!-- START ALWAYS -->\n											<div class="form-group">\n												<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n												<div class="input-group input-large">\n													<label class="control-label pointer-cursor">\n														<input\n															bs-switch\n															data-ng-model="interval.alwaysTime"\n															type="checkbox"\n															switch-active="{{ alwaysSwitch.isActive }}"\n															switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n															switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n															switch-on-color="{{ alwaysSwitch.onColor }}"\n															switch-off-color="{{ alwaysSwitch.offColor }}"\n															switch-animate="{{ alwaysSwitch.animate }}"\n															switch-size="{{ alwaysSwitch.size }}"\n															switch-label="{{ alwaysSwitch.label }}"\n															switch-icon="{{ alwaysSwitch.icon }}"\n															switch-radio-off="{{ alwaysSwitch.radioOff }}"\n															switch-label-width="{{ alwaysSwitch.labelWidth }}"\n															switch-handle-width="{{ alwaysSwitch.handleWidth }}">\n													</label>\n												</div>\n											</div>\n											<!-- END ALWAYS -->\n\n											<!-- START WEEKDAY -->\n											<div class="form-group">\n												<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n												<div class="input-group input-large">\n													<ui-select data-ng-model="interval.wd_from" theme="bootstrap" name="wd_from">\n														<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n														<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n															{{weekDay.name | translate}}\n														</ui-select-choices>\n													</ui-select>\n													<span class="input-group-addon">to</span>\n													<ui-select data-ng-model="interval.wd_to" theme="bootstrap" name="wd_to">\n														<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n														<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n															{{weekDay.name | translate}}\n														</ui-select-choices>\n													</ui-select>\n												</div>\n											</div>\n											<!-- END WEEKDAY -->\n\n											<!-- START MONTHDAY -->\n											<div class="form-group">\n												<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n												<div class="input-group input-large">\n													<ui-select data-ng-model="interval.md_from" theme="bootstrap" name="md_from">\n														<ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n														<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n															{{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n														</ui-select-choices>\n													</ui-select>\n													<span class="input-group-addon">to</span>\n													<ui-select data-ng-model="interval.md_to" theme="bootstrap" name="md_to">\n														<ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n														<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n															{{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n														</ui-select-choices>\n													</ui-select>\n												</div>\n											</div>\n											<!-- END MONTHDAY -->\n\n											<!-- START MONTH -->\n											<div class="form-group">\n												<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n												<div class="input-group input-large">\n													<ui-select data-ng-model="interval.m_from" theme="bootstrap" name="m_from">\n														<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n														<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n															{{month.name | translate}}\n														</ui-select-choices>\n													</ui-select>\n													<span class="input-group-addon">to</span>\n													<ui-select data-ng-model="interval.m_to" theme="bootstrap" name="m_to">\n														<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n														<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n															{{month.name | translate}}\n														</ui-select-choices>\n													</ui-select>\n												</div>\n											</div>\n											<!-- END MONTH -->\n							</div>\n\n							<div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'list\'" lazy-render duration="1">\n\n								<!-- START INTERVALS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$invalid}">\n									<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="interval.IntervalId" theme="bootstrap" name="IntervalId" required>\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n										<ui-select-choices repeat="interval.id as interval in Intervals | filter: $select.search">\n											{{interval.name | translate}}\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="intervals.length">\n	                  <h4 class="block">Warning!</h4>\n	                  <p>\n	                    {{ \'MESSAGE_NO_INTERVAL_AVAILABLE\' | translate }}\n	                  </p>\n	                  <p>\n	                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/intervals/list">{{\'APPLICATION_INTERVALS\' | translate}}</a>\n	                  </p>\n	                </div>\n									<span data-ng-show="(forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERVALS -->\n\n							</div>\n								<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n								<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n							</form>\n						</wz-step>\n\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/channels/voice/route/view.applicationSettings.html",'\n<div class="row" data-ng-init="initApplication();getIntervals();getApplication();">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_APPLICATION_SETTINGS\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="updateRoute(\'applications\')">\n					<div class="profile-usertitle-name">\n						{{(main.app.name | translate) || \'Application\'}}\n					</div>\n					<wz-step title="{{\'APPLICATION_APPLICATION\' | translate}}" canexit="formValidation(forms.settings.$valid)">\n						<form name="forms.settings" novalidate>\n							<!-- <pre>\n								{{application | json}}\n							</pre> -->\n\n							<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n\n							<div id="Queue" class="app-settings" ng-slide-down="main.app.value == \'Queue\'" lazy-render duration="1">\n								<!-- START QUEUE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$invalid}">\n									<label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" name="queue" theme="bootstrap" required data-ng-disabled="!items.length">\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="queue.name as queue in items | filter: $select.search">\n											<div ng-bind-html="queue.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="items.length">\n										<h4 class="block">Warning!</h4>\n										<p>\n											{{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n										</p>\n										<p>\n											{{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/voice/queues/list">{{\'APPLICATION_QUEUES\' | translate}}</a>\n										</p>\n									</div>\n									<span data-ng-show="(forms.settings.queue.$touched || forms.settings.$submitted) && forms.settings.queue.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END QUEUE -->\n\n								<!-- START OPTIONS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n									<label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}</label>\n									<input type="text" pattern="[^,]*" name="app_options" placeholder="{{ \'APPLICATION_OPTIONS\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n									<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n									<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.pattern" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n									</span>\n								</div>\n								<!-- END OPTIONS -->\n\n								<!-- START URL -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n									<input type="text" pattern="[^,]*" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[2]">\n									<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n									<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.pattern" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n									</span>\n								</div>\n								<!-- END URL -->\n\n								<!-- START APPLICATION_ANNOUNCE_OVERRIDE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ANNOUNCE_OVERRIDE\' | translate}}</label>\n									<ui-select data-ng-model="route.Applications[selectedApp].appdata[3]" name="audiofile" theme="bootstrap" data-ng-disabled="!items2.length">\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n										<ui-select-choices repeat="settings.soundPath+\'/\'+audio.save_name as audio in items2 | filter: $select.search">\n											<div ng-bind-html="audio.display_name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="items2.length">\n										<h4 class="block">Warning!</h4>\n										<p>\n											{{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n										</p>\n										<p>\n											{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/sounds/list">{{\'APPLICATION_SOUNDS\' | translate}}</a>\n										</p>\n									</div>\n									<span data-ng-show="(forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END APPLICATION_ANNOUNCE_OVERRIDE -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n									<input type="text" pattern="[0-9]+" name="timeout" placeholder="{{ \'APPLICATION_TIMEOUT\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[4]">\n									<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n								<!-- START AGI -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.agi.$touched || forms.settings.$submitted) && forms.settings.agi.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_AGI\' | translate }}</label>\n									<input type="text" pattern="[^,]*" name="agi" placeholder="{{ \'APPLICATION_AGI\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[5]">\n									<span data-ng-show="(forms.settings.agi.$touched || forms.settings.$submitted) && forms.settings.agi.$invalid && forms.settings.agi.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n									<span data-ng-show="(forms.settings.agi.$touched || forms.settings.$submitted) && forms.settings.agi.$invalid && forms.settings.agi.$error.pattern" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n									</span>\n								</div>\n								<!-- END AGI -->\n\n								<!-- START MACRO -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.macro.$touched || forms.settings.$submitted) && forms.settings.macro.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_MACRO\' | translate }}</label>\n									<input type="text" pattern="[^,]*" name="macro" placeholder="{{ \'APPLICATION_MACRO\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[6]">\n									<span data-ng-show="(forms.settings.macro.$touched || forms.settings.$submitted) && forms.settings.macro.$invalid && forms.settings.macro.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n									<span data-ng-show="(forms.settings.macro.$touched || forms.settings.$submitted) && forms.settings.macro.$invalid && forms.settings.macro.$error.pattern" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n									</span>\n								</div>\n								<!-- END MACRO -->\n\n								<!-- START GOSUB -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.gosub.$touched || forms.settings.$submitted) && forms.settings.gosub.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_GOSUB\' | translate }}</label>\n									<input type="text" pattern="[^,]*" name="gosub" placeholder="{{ \'APPLICATION_GOSUB\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[7]">\n									<span data-ng-show="(forms.settings.gosub.$touched || forms.settings.$submitted) && forms.settings.gosub.$invalid && forms.settings.gosub.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n									<span data-ng-show="(forms.settings.gosub.$touched || forms.settings.$submitted) && forms.settings.gosub.$invalid && forms.settings.gosub.$error.pattern" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n									</span>\n								</div>\n								<!-- END GOSUB -->\n\n								<!-- START RULE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.rule.$touched || forms.settings.$submitted) && forms.settings.rule.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_RULE\' | translate }}</label>\n									<input type="text" pattern="[^,]*" name="rule" placeholder="{{ \'APPLICATION_RULE\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[8]">\n									<span data-ng-show="(forms.settings.rule.$touched || forms.settings.$submitted) && forms.settings.rule.$invalid && forms.settings.rule.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n									<span data-ng-show="(forms.settings.rule.$touched || forms.settings.$submitted) && forms.settings.rule.$invalid && forms.settings.rule.$error.pattern" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n									</span>\n								</div>\n								<!-- END RULE -->\n\n								<!-- START POSITION -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.position.$touched || forms.settings.$submitted) && forms.settings.position.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_POSITION\' | translate }}</label>\n									<input type="number" min="0" name="position" placeholder="{{ \'APPLICATION_POSITION\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[9]">\n									<span data-ng-show="(forms.settings.position.$touched || forms.settings.$submitted) && forms.settings.position.$invalid && forms.settings.position.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END POSITION -->\n\n								<!-- START ANSWER -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_ANSWER\' | translate }}</label>\n									<div class="input-group input-large">\n										<label class="control-label pointer-cursor">\n											<input\n											bs-switch\n											data-ng-model="route.Applications[selectedApp].answer"\n											type="checkbox"\n											switch-active="{{ alwaysSwitch.isActive }}"\n											switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n											switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n											switch-on-color="{{ alwaysSwitch.onColor }}"\n											switch-off-color="{{ alwaysSwitch.offColor }}"\n											switch-animate="{{ alwaysSwitch.animate }}"\n											switch-size="{{ alwaysSwitch.size }}"\n											switch-label="{{ alwaysSwitch.label }}"\n											switch-icon="{{ alwaysSwitch.icon }}"\n											switch-radio-off="{{ alwaysSwitch.radioOff }}"\n											switch-label-width="{{ alwaysSwitch.labelWidth }}"\n											switch-handle-width="{{ alwaysSwitch.handleWidth }}">\n										</label>\n									</div>\n								</div>\n								<!-- END ANSWER -->\n\n							</div>\n							<div id="Playback" class="app-settings" ng-slide-down="main.app.value == \'Playback\'" lazy-render duration="1">\n								<!-- START AUDIOFILE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$invalid}">\n									<label class="control-label">{{\'APPLICATION_AUDIO_FILE\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" name="audiofile" theme="bootstrap" required data-ng-disabled="!items.length">\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.display_name}}</ui-select-match>\n										<ui-select-choices repeat="settings.soundPath+\'/\'+audio.save_name as audio in items | filter: $select.search">\n											<div ng-bind-html="audio.display_name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="items.length">\n										<h4 class="block">Warning!</h4>\n										<p>\n											{{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n										</p>\n										<p>\n											{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/sounds/list">{{\'APPLICATION_SOUNDS\' | translate}}</a>\n										</p>\n									</div>\n									<span data-ng-show="(forms.settings.audiofile.$touched || forms.settings.$submitted) && forms.settings.audiofile.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END AUDIOFILE -->\n\n								<!-- START OPTIONS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n									<label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}</label>\n									<input type="text" name="app_options" placeholder="{{ \'APPLICATION_OPTIONS\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n									<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END OPTIONS -->\n\n								<!-- START ANSWER -->\n								<div class="form-group">\n									<label class="control-label">{{ \'APPLICATION_ANSWER\' | translate }}</label>\n									<div class="input-group input-large">\n										<label class="control-label pointer-cursor">\n											<input\n											bs-switch\n											data-ng-model="route.Applications[selectedApp].answer"\n											type="checkbox"\n											switch-active="{{ alwaysSwitch.isActive }}"\n											switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n											switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n											switch-on-color="{{ alwaysSwitch.onColor }}"\n											switch-off-color="{{ alwaysSwitch.offColor }}"\n											switch-animate="{{ alwaysSwitch.animate }}"\n											switch-size="{{ alwaysSwitch.size }}"\n											switch-label="{{ alwaysSwitch.label }}"\n											switch-icon="{{ alwaysSwitch.icon }}"\n											switch-radio-off="{{ alwaysSwitch.radioOff }}"\n											switch-label-width="{{ alwaysSwitch.labelWidth }}"\n											switch-handle-width="{{ alwaysSwitch.handleWidth }}">\n										</label>\n									</div>\n								</div>\n								<!-- END ANSWER -->\n\n							</div>\n							<div id="Dial" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && !main.app.type" lazy-render duration="1">\n								<!-- START INTERFACE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.interface.$touched || forms.settings.$submitted) && forms.settings.interface.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_TYPE\' | translate }}/{{ \'APPLICATION_IDENTIFIER\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<input type="text" name="interface" placeholder="SIP/0000" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[0]" required>\n									<span data-ng-show="(forms.settings.interface.$touched || forms.settings.$submitted) && forms.settings.interface.$invalid && forms.settings.interface.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERFACE -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n									<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n									<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n								<!-- START OPTIONS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n									<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[2]">\n									<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END OPTIONS -->\n\n								<!-- START URL -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n									<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[3]">\n									<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END URL -->\n							</div>\n							<div id="internalDial" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && main.app.type == \'internalDial\'" lazy-render duration="1">\n								<!-- START INTERNAL DIAL -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.user.$touched || forms.settings.$submitted) && forms.settings.user.$invalid}">\n									<label class="control-label">{{\'APPLICATION_USER\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" name="user" theme="bootstrap" required data-ng-disabled="!items.length">\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="user.name as user in items | filter: $select.search">\n											<div ng-bind-html="user.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.settings.user.$touched || forms.settings.$submitted) && forms.settings.user.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END INTERNAL DIAL -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n									<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n									<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n								<!-- START OPTIONS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n									<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[2]">\n									<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END OPTIONS -->\n\n								<!-- START URL -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n									<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[3]">\n									<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END URL -->\n\n							</div>\n							<div id="Dial" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && main.app.type == \'externalDial\'" lazy-render duration="1">\n\n								<!-- START TRUNK -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.info.trunk.$touched || forms.info.$submitted) && forms.info.trunk.$invalid}">\n									<label class="control-label">{{\'APPLICATION_TRUNK\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" name="trunk" theme="bootstrap" required data-ng-disabled="!items.length">\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="trunk.name as trunk in items | filter: $select.search">\n											<div ng-bind-html="trunk.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="items.length">\n										<h4 class="block">Warning!</h4>\n										<p>\n											{{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n										</p>\n										<p>\n											{{\'APPLICATION_GO_TO\' | translate}} <a href="/tools/trunks/list">{{\'APPLICATION_TRUNKS\' | translate}}</a>\n										</p>\n									</div>\n									<span data-ng-show="(forms.info.trunk.$touched || forms.info.$submitted) && forms.info.trunk.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TRUNK -->\n\n								<!-- START PHONE -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.phone.$touched || forms.settings.$submitted) && forms.settings.phone.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_PHONE\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<input type="text" pattern="[0-9]+" name="phone" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n									<span data-ng-show="(forms.settings.phone.$touched || forms.settings.$submitted) && forms.settings.phone.$invalid && forms.settings.phone.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END PHONE -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n									<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[2]">\n									<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n								<!-- START OPTIONS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n									<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[3]">\n									<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END OPTIONS -->\n\n								<!-- START URL -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n									<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[4]">\n									<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END URL -->\n							</div>\n							<div id="RingGroup" class="app-settings" ng-slide-down="main.app.value == \'Dial\' && main.app.type == \'RingGroup\'" lazy-render duration="1">\n								<!-- START ITEMS -->\n								<input type="hidden" name="items" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[0]" data-ng-init="initRingGroup()">\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.items.$touched || forms.settings.$submitted) && forms.settings.items.$invalid}">\n									<label class="control-label">{{\'APPLICATION_ITEMS\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<div class="col-md-12" id="multi-select-user-by-role"></div>\n									<span data-ng-show="(forms.settings.items.$touched || forms.settings.$submitted) && forms.settings.items.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END ITEMS -->\n\n								<!-- START TIMEOUT -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_TIMEOUT\' | translate }}</label>\n									<input type="text" pattern="[0-9]+" name="timeout" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]" data-ng-init="application.appdata[1] = null">\n									<span data-ng-show="(forms.settings.timeout.$touched || forms.settings.$submitted) && forms.settings.timeout.$invalid && forms.settings.timeout.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TIMEOUT -->\n\n								<!-- START OPTIONS -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_OPTIONS\' | translate }}</label>\n									<input type="text" name="app_options" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[2]" data-ng-init="application.appdata[2] = null">\n									<span data-ng-show="(forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid && forms.settings.app_options.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END OPTIONS -->\n\n								<!-- START URL -->\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n									<input type="text" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[3]" data-ng-init="application.appdata[3] = null">\n									<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END URL -->\n							</div>\n							<div id="AGI" class="app-settings" ng-slide-down="main.app.value == \'AGI\'" lazy-render duration="1">\n								<!-- START PROJECT -->\n								<input type="hidden" name="url" placeholder="{{ \'APPLICATION_URL\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[0]" data-ng-init="route.Applications[selectedApp].appdata[0] = \'agi://127.0.0.1/square\'">\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.project.$touched || forms.settings.$submitted) && forms.settings.project.$invalid}">\n									<label class="control-label">{{\'APPLICATION_PROJECT\' | translate}}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="route.Applications[selectedApp].appdata[1]" name="project" theme="bootstrap" required data-ng-disabled="!items.length">\n										<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices repeat="project.name as project in items | filter: $select.search">\n											<div ng-bind-html="project.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<div class="note note-warning" data-ng-hide="items.length">\n										<h4 class="block">Warning!</h4>\n										<p>\n											{{ \'MESSAGE_NO_PROJECTS_AVAILABLE\' | translate }}\n										</p>\n										<p>\n											{{\'APPLICATION_GO_TO\' | translate}} <a href="/square/projects/list">{{\'APPLICATION_PROJECTS\' | translate}}</a>\n										</p>\n									</div>\n									<span data-ng-show="(forms.settings.project.$touched || forms.settings.$submitted) && forms.settings.project.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END PROJECT -->\n\n								<!-- START URL -->\n								<!-- <div class="form-group" data-ng-class="{\'has-error\': (forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_URL\' | translate }}</label>\n								<div class="input-group">\n								<input type="text" name="url" placeholder="agi://127.0.0.1/square" class="form-control" data-ng-model="application.url" data-ng-disabled="!application.urlEnabled" data-ng-required="application.urlEnabled" rpattern="/^agi:\\/\\/(?:[0-9]{1,3}\\.){3}[0-9]{1,3}\\/square$/">\n								<span class="input-group-addon">\n								<input type="checkbox" data-ng-model="application.urlEnabled">\n							</span>\n						</div>\n						<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.required" class="help-block help-block-error">\n						<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n					</span>\n					<span data-ng-show="(forms.settings.url.$touched || forms.settings.$submitted) && forms.settings.url.$invalid && forms.settings.url.$error.pattern" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n				</span>\n			</div> -->\n			<!-- END URL -->\n\n		</div>\n		<div id="Goto" class="app-settings" ng-slide-down="main.app.value == \'Goto\'" lazy-render duration="1">\n			<!-- START CONTEXT -->\n			<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.context.$touched || forms.settings.$submitted) && forms.settings.context.$invalid}">\n				<label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n				<ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" name="context" theme="bootstrap" required>\n					<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n					<ui-select-choices repeat="context.name as context in items | filter: $select.search">\n						<div ng-bind-html="context.name | highlight: $select.search"></div>\n					</ui-select-choices>\n				</ui-select>\n				<span data-ng-show="(forms.settings.context.$touched || forms.settings.$submitted) && forms.settings.context.$error.required" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END CONTEXT -->\n\n			<!-- START EXTENSION -->\n			<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.extension.$touched || forms.settings.$submitted) && forms.settings.extension.$invalid}">\n				<label class="control-label">{{ \'APPLICATION_EXTENSION\' | translate }}<span class="required" aria-required="true">*</span></label>\n				<input type="text" name="extension" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]" required>\n				<span data-ng-show="(forms.settings.extension.$touched || forms.settings.$submitted) && forms.settings.extension.$invalid && forms.settings.extension.$error.required" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END EXTENSION -->\n\n			<!-- START PRIORITY -->\n			<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.priority.$touched || forms.settings.$submitted) && forms.settings.priority.$invalid}">\n				<label class="control-label">{{ \'APPLICATION_PRIORITY\' | translate }}<span class="required" aria-required="true">*</span></label>\n				<input type="text" pattern="[0-9]+" name="priority" placeholder="" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[2]" required>\n				<span data-ng-show="(forms.settings.priority.$touched || forms.settings.$submitted) && forms.settings.priority.$invalid" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END PRIORITY -->\n		</div>\n		<div id="Hangup" class="app-settings" ng-slide-down="main.app.value == \'Hangup\'" lazy-render duration="1">\n			<!-- START HANGUPCAUSE -->\n			<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.hangupCause.$touched || forms.settings.$submitted) && forms.settings.hangupCause.$invalid}">\n				<label class="control-label">{{\'APPLICATION_HANGUP_CAUSE\' | translate}}<span class="required" aria-required="true">*</span></label>\n				<ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" theme="bootstrap" name="hangupCause" required>\n					<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n					<ui-select-choices repeat="hangupCause.value as hangupCause in $application.hangupCauses | filter: $select.search">\n						{{hangupCause.name | translate}}\n					</ui-select-choices>\n				</ui-select>\n				<span data-ng-show="(forms.settings.hangupCause.$touched || forms.settings.$submitted) && forms.settings.hangupCause.$error.required" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END HANGUPCAUSE -->\n		</div>\n		<div id="Set" class="app-settings" ng-slide-down="main.app.value == \'Set\'" lazy-render duration="1">\n			<!-- START VARIABLE -->\n			<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.variable.$touched || forms.settings.$submitted) && forms.settings.variable.$invalid}">\n				<label class="control-label">{{ \'APPLICATION_VARIABLE\' | translate }}<span class="required" aria-required="true">*</span></label>\n				<input type="text" name="variable" placeholder="" class="form-control" data-ng-model="application.variable" data-ng-change="updateSetAppdataSettings()" required>\n				<span data-ng-show="(forms.settings.variable.$touched || forms.settings.$submitted) && forms.settings.variable.$invalid && forms.settings.variable.$error.required" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END VARIABLE -->\n\n			<!-- START VARVALUE -->\n			<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.varvalue.$touched || forms.settings.$submitted) && forms.settings.varvalue.$invalid}">\n				<label class="control-label">{{ \'APPLICATION_VALUE\' | translate }}<span class="required" aria-required="true">*</span></label>\n				<input type="text" name="varvalue" placeholder="" class="form-control" data-ng-model="application.value" data-ng-change="updateSetAppdataSettings()" required>\n				<span data-ng-show="(forms.settings.varvalue.$touched || forms.settings.$submitted) && forms.settings.varvalue.$invalid && forms.settings.varvalue.$error.required" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END VARVALUE -->\n		</div>\n		<div id="Custom" class="app-settings" ng-slide-down="main.app.type == \'custom\'" lazy-render duration="1">\n\n			<!-- START CUSTOMAPP -->\n			<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.customApp.$touched || forms.settings.$submitted) && forms.settings.customApp.$invalid}">\n				<label class="control-label">{{ \'APPLICATION_CUSTOM_APP\' | translate }}<span class="required" aria-required="true">*</span></label>\n				<input type="text" name="customApp" placeholder="{{ \'APPLICATION_CUSTOM_APP\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].app" required>\n				<span data-ng-show="(forms.settings.customApp.$touched || forms.settings.$submitted) && forms.settings.customApp.$invalid && forms.settings.customApp.$error.required" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END CUSTOMAPP -->\n\n			<!-- START APPDATA -->\n			<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.appdata.$touched || forms.settings.$submitted) && forms.settings.appdata.$invalid}">\n				<label class="control-label">{{ \'APPLICATION_ARGUMENTS\' | translate }}</label>\n				<input type="text" name="appdata" placeholder="{{ \'APPLICATION_ARGUMENTS\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[0]">\n				<span data-ng-show="(forms.settings.appdata.$touched || forms.settings.$submitted) && forms.settings.appdata.$invalid && forms.settings.appdata.$error.required" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END APPDATA -->\n		</div>\n		<div id="Voicemail" class="app-settings" ng-slide-down="main.app.value == \'Voicemail\'" lazy-render duration="1">\n			<!-- START VOICEMAIL -->\n			<div class="form-group"  data-ng-class="{\'has-error\': (forms.settings.voicemail.$touched || forms.settings.$submitted) && forms.settings.voicemail.$invalid}">\n				<label class="control-label">{{ \'APPLICATION_MAILBOX\' | translate }}@{{ \'APPLICATION_CONTEXT\' | translate }}<span class="required" aria-required="true">*</span></label>\n				<ui-select data-ng-model="route.Applications[selectedApp].appdata[0]" theme="bootstrap" name="voicemail" required data-ng-disabled="!items.length">\n					<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.mailbox}}</ui-select-match>\n					<ui-select-choices repeat="mailbox.mailbox+\'@\'+mailbox.context as mailbox in items | filter: $select.search">\n						<div ng-bind-html="mailbox.mailbox | highlight: $select.search"></div>\n					</ui-select-choices>\n				</ui-select>\n				<div class="note note-warning" data-ng-hide="items.length">\n					<h4 class="block">Warning!</h4>\n					<p>\n						{{ \'MESSAGE_NO_VOICEMAILS_AVAILABLE\' | translate }}\n					</p>\n					<p>\n						{{\'APPLICATION_GO_TO\' | translate}} <a href="/channels/voice/voicemails/list">{{\'APPLICATION_VOICEMAILS\' | translate}}</a>\n					</p>\n				</div>\n				<span data-ng-show="(forms.settings.voicemail.$touched || forms.settings.$submitted) && forms.settings.voicemail.$invalid && forms.settings.voicemail.$error.required" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END VOICEMAIL -->\n\n			<!-- START OPTIONS -->\n			<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.app_options.$touched || forms.settings.$submitted) && forms.settings.app_options.$invalid}">\n				<label class="control-label">{{\'APPLICATION_OPTIONS\' | translate}}</label>\n				<input type="text" name="app_options" placeholder="{{ \'APPLICATION_OPTIONS\' | translate }}" class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n			</div>\n			<!-- END OPTIONS -->\n\n		</div>\n		<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n	</form>\n</wz-step>\n<wz-step title="{{\'APPLICATION_INTERVAL\' | translate}}" canexit="formValidation(forms.interval.IntervalId.$valid || forms.interval.hasOwnProperty(\'t_from\') || forms.interval.intType.$modelValue === \'always\')">\n	<form name="forms.interval" novalidate>\n		<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n		<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n		<!-- START INTERVAL_TYPE -->\n		<div class="form-group" data-ng-class="{\'has-error\': (forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$invalid}">\n			<label class="control-label">{{\'APPLICATION_INTERVAL_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n			<ui-select data-ng-model="interval.intType" theme="bootstrap" name="intType" required>\n				<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n				<ui-select-choices repeat="intType.value as intType in $application.intTypes | filter: $select.search">\n					{{intType.name | translate}}\n				</ui-select-choices>\n			</ui-select>\n			<span data-ng-show="(forms.interval.intType.$touched || forms.interval.$submitted) && forms.interval.intType.$error.required" class="help-block help-block-error">\n				<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n			</span>\n		</div>\n		<!-- END INTERVAL_TYPE -->\n		<div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'custom\'" lazy-render duration="1">\n			<!-- START TIME -->\n			<div class="form-group">\n				<label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n				<div class="input-group input-large">\n					<fieldset class="pull-left" ng-disabled="interval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="interval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n					<div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n					<fieldset ng-disabled="interval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="interval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n				</div>\n			</div>\n			<!-- END TIME -->\n\n			<!-- <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="interval.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label> -->\n			<!-- START ALWAYS -->\n			<div class="form-group">\n				<label class="control-label">{{ \'APPLICATION_ALWAYS\' | translate }}</label>\n				<div class="input-group input-large">\n					<label class="control-label pointer-cursor">\n						<input\n							bs-switch\n							data-ng-model="interval.alwaysTime"\n							type="checkbox"\n							switch-active="{{ alwaysSwitch.isActive }}"\n							switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n							switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n							switch-on-color="{{ alwaysSwitch.onColor }}"\n							switch-off-color="{{ alwaysSwitch.offColor }}"\n							switch-animate="{{ alwaysSwitch.animate }}"\n							switch-size="{{ alwaysSwitch.size }}"\n							switch-label="{{ alwaysSwitch.label }}"\n							switch-icon="{{ alwaysSwitch.icon }}"\n							switch-radio-off="{{ alwaysSwitch.radioOff }}"\n							switch-label-width="{{ alwaysSwitch.labelWidth }}"\n							switch-handle-width="{{ alwaysSwitch.handleWidth }}">\n					</label>\n				</div>\n			</div>\n			<!-- END ALWAYS -->\n\n			<!-- START WEEKDAY -->\n			<div class="form-group">\n				<label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n				<div class="input-group input-large">\n					<ui-select data-ng-model="interval.wd_from" theme="bootstrap" name="wd_from">\n						<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n						<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n							{{weekDay.name | translate}}\n						</ui-select-choices>\n					</ui-select>\n					<span class="input-group-addon">to</span>\n					<ui-select data-ng-model="interval.wd_to" theme="bootstrap" name="wd_to">\n						<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n						<ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n							{{weekDay.name | translate}}\n						</ui-select-choices>\n					</ui-select>\n				</div>\n			</div>\n			<!-- END WEEKDAY -->\n\n			<!-- START MONTHDAY -->\n			<div class="form-group">\n				<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n				<div class="input-group input-large">\n					<ui-select data-ng-model="interval.md_from" theme="bootstrap" name="md_from">\n						<ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n						<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n							{{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n						</ui-select-choices>\n					</ui-select>\n					<span class="input-group-addon">to</span>\n					<ui-select data-ng-model="interval.md_to" theme="bootstrap" name="md_to">\n						<ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n						<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n							{{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n						</ui-select-choices>\n					</ui-select>\n				</div>\n			</div>\n			<!-- END MONTHDAY -->\n\n			<!-- START MONTH -->\n			<div class="form-group">\n				<label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n				<div class="input-group input-large">\n					<ui-select data-ng-model="interval.m_from" theme="bootstrap" name="m_from">\n						<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n						<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n							{{month.name | translate}}\n						</ui-select-choices>\n					</ui-select>\n					<span class="input-group-addon">to</span>\n					<ui-select data-ng-model="interval.m_to" theme="bootstrap" name="m_to">\n						<ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n						<ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n							{{month.name | translate}}\n						</ui-select-choices>\n					</ui-select>\n				</div>\n			</div>\n			<!-- END MONTH -->\n		</div>\n\n		<div id="customInterval" class="app-settings" ng-slide-down="interval.intType == \'list\'" lazy-render duration="1">\n\n			<!-- START INTERVALS -->\n			<div class="form-group" data-ng-class="{\'has-error\': (forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$invalid}">\n				<label class="control-label">{{\'APPLICATION_INTERVALS\' | translate}}<span class="required" aria-required="true">*</span></label>\n				<ui-select data-ng-model="interval.IntervalId" theme="bootstrap" name="IntervalId" required>\n					<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name | translate}}</ui-select-match>\n					<ui-select-choices repeat="interval.id as interval in Intervals | filter: $select.search">\n						{{interval.name | translate}}\n					</ui-select-choices>\n				</ui-select>\n				<span data-ng-show="(forms.interval.IntervalId.$touched || forms.interval.$submitted) && forms.interval.IntervalId.$error.required" class="help-block help-block-error">\n					<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				</span>\n			</div>\n			<!-- END INTERVALS -->\n\n		</div>\n		<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n		<button class="btn green-haze" type="submit" ng-click="goNext()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n	</form>\n</wz-step>\n\n<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n	<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n	<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n	<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n</wz-step>\n</wizard>\n</div>\n</div>\n<!-- END Portlet PORTLET-->\n</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/channels/voice/voicemail/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-envelope-letter"></i>\n					<a href="#">{{ \'APPLICATION_VOICEMAILS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-envelope-letter font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_VOICEMAILS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="/channels/voice/voicemails/wizard">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_VOICEMAIL\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/voicemail/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getVoicemail()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-spinner"></i>\n					<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-earphones-alt"></i>\n					<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-envelope-letter"></i>\n					<a href="/channels/voice/voicemails/list">{{ \'APPLICATION_VOICEMAILS\' | translate }}</a>\n					<i data-ng-show="voicemail" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="voicemail">\n					<a href="#">{{voicemail.mailbox}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET main.channels -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/voicemail.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{voicemail.mailbox}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.voicemails.view.settings\')}">\n							<a data-ng-href="/channels/voice/voicemails/view/{{voicemail.uniqueid}}/settings"><i class="icon-settings"></i>{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.channels.voice.voicemails.view.messages\')}">\n							<a data-ng-href="/channels/voice/voicemails/view/{{voicemail.uniqueid}}/messages"><i class="icon-speech"></i>{{ \'APPLICATION_MESSAGES\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET main.channels -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/channels/voice/voicemail/view/view.messages.html",'<div class="row" data-ng-init="getMessages()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title  tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_MESSAGES\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns data-ng-if="gridOptions" ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/voice/voicemail/view/view.settings.html",'<div class="row" data-ng-init="getContexts()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_VOICEMAIL\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_ADVANCED\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateVoiceVoicemail()" novalidate>\n\n							<!-- START FULLNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.fullname.$invalid}">\n								<label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="fullname" placeholder="{{\'APPLICATION_FULLNAME\' | translate}}" class="form-control" data-ng-model="voicemail.fullname" required/>\n								<span data-ng-show="forms.general.$submitted && forms.general.fullname.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END FULLNAME -->\n\n							<!-- START EMAIL -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.email.$invalid}">\n								<label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="voicemail.email" required/>\n								<span data-ng-show="forms.general.$submitted && forms.general.host.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END EMAIL -->\n\n							<!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NEW_PASSWORD\' | translate}}</label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="voicemail.password" />\n								<span data-ng-show="forms.general.$submitted && forms.general.password.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n							<!-- START CONFIRM PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.rpassword.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}</label>\n								<input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="voicemail.rpassword" nx-equal="voicemail.password"/>\n								<span data-ng-show="forms.general.$submitted && (forms.general.rpassword.$invalid || forms.general.rpassword.$invalid)" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONFIRM PASSWORD -->\n\n							<!-- START MAILBOX -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.mailbox.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MAILBOX\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="mailbox" placeholder="{{\'APPLICATION_MAILBOX\' | translate}}" class="form-control" data-ng-model="voicemail.mailbox" required readonly/>\n								<span data-ng-show="forms.general.$submitted && forms.general.mailbox.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MAILBOX -->\n\n							<!-- START CONTEXT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="voicemail.context" name="context" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="context.name as context in voiceContexts | filter: $select.search">\n										<div ng-bind-html="context.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span class="help-block">\n									{{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n								</span>\n								<span data-ng-show="(forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONTEXT -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n					<!-- ADVANCED TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.advanced" data-ng-submit="forms.general.$valid && forms.advanced.$valid && updateVoiceVoicemail()" novalidate>\n\n							<!-- START TIMEZONE -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.advanced.$submitted && forms.advanced.tz.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIMEZONE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="mailbox" placeholder="{{\'APPLICATION_TIMEZONE\' | translate}}" class="form-control" data-ng-model="voicemail.tz" required/>\n								<span data-ng-show="forms.advanced.$submitted && forms.advanced.tz.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIMEZONE -->\n\n							<!-- START ATTACH -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.attach.$touched || forms.advanced.$submitted) && forms.advanced.attach.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ATTACH\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="voicemail.attach"\n								type="checkbox"\n								switch-active="{{ switch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ switch.onColor }}"\n								switch-off-color="{{ switch.offColor }}"\n								switch-animate="{{ switch.animate }}"\n								switch-size="{{ switch.size }}"\n								switch-label="{{ switch.label }}"\n								switch-icon="{{ switch.icon }}"\n								switch-radio-off="{{ switch.radioOff }}"\n								switch-label-width="{{ switch.labelWidth }}"\n								switch-handle-width="{{ switch.handleWidth }}">\n							</div>\n							<!-- END ATTACH -->\n\n							<!-- START ENVELOPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.envelope.$touched || forms.advanced.$submitted) && forms.advanced.envelope.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ENVELOPE\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="voicemail.envelope"\n								type="checkbox"\n								switch-active="{{ switch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ switch.onColor }}"\n								switch-off-color="{{ switch.offColor }}"\n								switch-animate="{{ switch.animate }}"\n								switch-size="{{ switch.size }}"\n								switch-label="{{ switch.label }}"\n								switch-icon="{{ switch.icon }}"\n								switch-radio-off="{{ switch.radioOff }}"\n								switch-label-width="{{ switch.labelWidth }}"\n								switch-handle-width="{{ switch.handleWidth }}">\n							</div>\n							<!-- END ENVELOPE -->\n\n							<!-- START DELETE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.delete.$touched || forms.advanced.$submitted) && forms.advanced.delete.$invalid}">\n								<label class="control-label">{{\'APPLICATION_DELETE\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="voicemail.delete"\n								type="checkbox"\n								switch-active="{{ switch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ switch.onColor }}"\n								switch-off-color="{{ switch.offColor }}"\n								switch-animate="{{ switch.animate }}"\n								switch-size="{{ switch.size }}"\n								switch-label="{{ switch.label }}"\n								switch-icon="{{ switch.icon }}"\n								switch-radio-off="{{ switch.radioOff }}"\n								switch-label-width="{{ switch.labelWidth }}"\n								switch-handle-width="{{ switch.handleWidth }}">\n							</div>\n							<!-- END DELETE -->\n\n							<!-- START EMAIL_BODY -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_EMAIL_BODY\' | translate}}</label>\n								<textarea type="text" name="emailbody" placeholder="{{\'APPLICATION_EMAIL_BODY\' | translate}}" class="form-control" data-ng-model="voicemail.emailbody"></textarea>\n							</div>\n							<!-- END EMAIL_BODY -->\n\n							<!-- START EMAIL_SUBJECT -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_EMAIL_SUBJECT\' | translate}}</label>\n								<textarea type="text" name="emailsubject" placeholder="{{\'APPLICATION_EMAIL_SUBJECT\' | translate}}" class="form-control" data-ng-model="voicemail.emailsubject"></textarea>\n							</div>\n							<!-- END EMAIL_SUBJECT -->\n\n							<!-- START MAX_SECONDS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.maxsecs.$touched || forms.advanced.$submitted) && forms.advanced.maxsecs.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MAX_SECONDS\' | translate}}</label>\n								<input type="number" min="0" name="maxsecs" placeholder="{{\'APPLICATION_MAX_SECONDS\' | translate}}" class="form-control" data-ng-model="voicemail.maxsecs" required/>\n								<span data-ng-show="(forms.advanced.maxsecs.$touched || forms.advanced.$submitted) && forms.advanced.maxsecs.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MAX_SECONDS -->\n\n							<!-- START MAX_MESSAGES -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.maxmsg.$touched || forms.advanced.$submitted) && forms.advanced.maxmsg.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MAX_MESSAGES\' | translate}}</label>\n								<input type="number" min="0" name="maxmsg" placeholder="{{\'APPLICATION_MAX_MESSAGES\' | translate}}" class="form-control" data-ng-model="voicemail.maxmsg" required/>\n								<span data-ng-show="(forms.advanced.maxmsg.$touched || forms.advanced.$submitted) && forms.advanced.maxmsg.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END MAX_MESSAGES -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/channels/voice/voicemail/wizard/wizard.html",'<div class="col-md-12" data-ng-init="initWizard()">\n  <!-- BEGIN PAGE HEADER-->\n	<div class="page-bar">\n		<ul class="page-breadcrumb">\n			<li>\n				<i class="icon-rocket"></i>\n				<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="fa fa-spinner"></i>\n				<a href="#">{{ \'APPLICATION_CHANNELS\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-earphones-alt"></i>\n				<a href="#">{{ \'APPLICATION_VOICE\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-envelope-letter"></i>\n				<a href="/channels/voice/voicemails/list">{{ \'APPLICATION_VOICEMAILS\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-options"></i>\n				<a href="#">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n			</li>\n		</ul>\n	</div>\n  <!-- END PAGE HEADER-->\n\n  <!-- BEGIN PORTLET-->\n  <div class="portlet light bordered" data-ng-init="getFirstFreeMailbox()">\n  	<div class="portlet-title">\n  		<div class="caption font-green-sharp">\n  			<i class="icon-envelope-letter font-green-sharp"></i>\n  			<span class="caption-subject">{{ \'APPLICATION_VOICEMAIL\' | translate }} WIZARD</a> </span>\n  		</div>\n  	</div>\n  	<div class="portlet-body">\n  		<wizard on-finish="createItem()">\n				<wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(form.general.$valid)">\n			    <form name="form.general" novalidate>\n\n						<!-- START FULLNAME -->\n						<div class="form-group" data-ng-class="{\'has-error\': form.general.$submitted && form.general.fullname.$invalid}">\n							<label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="fullname" placeholder="{{\'APPLICATION_FULLNAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n							<span data-ng-show="form.general.$submitted && form.general.fullname.$invalid" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END FULLNAME -->\n\n						<!-- START EMAIL -->\n						<div class="form-group" data-ng-class="{\'has-error\': form.general.$submitted && form.general.email.$invalid}">\n							<label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="item.email" required/>\n							<span data-ng-show="form.general.$submitted && form.general.host.$invalid" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END EMAIL -->\n\n						<!-- START PASSWORD -->\n						<div class="form-group" data-ng-class="{\'has-error\': form.general.$submitted && form.general.password.$invalid}">\n							<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n							<span data-ng-show="form.general.$submitted && form.general.password.$invalid" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END PASSWORD -->\n\n						<!-- START CONFIRM PASSWORD -->\n						<div class="form-group" data-ng-class="{\'has-error\': form.general.$submitted && form.general.rpassword.$invalid}">\n							<label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.rpassword" nx-equal="item.password" required/>\n							<span data-ng-show="form.general.$submitted && (form.general.rpassword.$invalid || form.general.rpassword.$invalid)" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n							</span>\n						</div>\n						<!-- END CONFIRM PASSWORD -->\n\n						<!-- START MAILBOX -->\n						<div class="form-group" data-ng-class="{\'has-error\': form.general.$submitted && form.general.mailbox.$invalid}">\n							<label class="control-label">{{\'APPLICATION_MAILBOX\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="mailbox" placeholder="{{\'APPLICATION_MAILBOX\' | translate}}" class="form-control" data-ng-model="item.mailbox" required readonly/>\n							<span data-ng-show="form.general.$submitted && form.general.mailbox.$invalid" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END MAILBOX -->\n\n						<button class="btn green-haze" type="submit" ng-click="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n					</form>\n				</wz-step>\n\n				<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n					<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n					<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n					<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n				</wz-step>\n  		</wizard>\n  	</div>\n  </div>\n  <!-- END PORTLET-->\n</div>\n'),a.put("app/contactmanager/company/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_COMPANY\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.company" novalidate>\n    <div class="row">\n      <div class="col-md-6">\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.name.$touched || forms.company.$submitted) && forms.company.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.cmopany.name.$touched || forms.company.$submitted) && forms.company.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START VAT -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.vat.$touched || forms.company.$submitted) && forms.company.vat.$invalid}">\n      <label class="control-label">{{\'APPLICATION_VAT\' | translate}}</label>\n      <input type="text" name="vat" placeholder="{{\'APPLICATION_VAT\' | translate}}" class="form-control" data-ng-model="item.vat"/>\n      <span data-ng-show="(forms.cmopany.vat.$touched || forms.company.$submitted) && forms.company.vat.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END VAT -->\n\n    <!-- START COMPANYID -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.companyId.$touched || forms.company.$submitted) && forms.company.companyId.$invalid}">\n      <label class="control-label">{{\'APPLICATION_COMPANY_ID\' | translate}}</label>\n      <input type="text" name="companyId" placeholder="{{\'APPLICATION_COMPANY_ID\' | translate}}" class="form-control" data-ng-model="item.companyId"/>\n      <span data-ng-show="(forms.cmopany.companyId.$touched || forms.company.$submitted) && forms.company.companyId.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END COMPANYID -->\n\n    <!-- START WEBSITE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.website.$touched || forms.company.$submitted) && forms.company.website.$invalid}">\n      <label class="control-label">{{\'APPLICATION_WEBSITE\' | translate}}</label>\n      <input type="text" name="website" placeholder="{{\'APPLICATION_WEBSITE\' | translate}}" class="form-control" data-ng-model="item.website"/>\n      <span data-ng-show="(forms.cmopany.website.$touched || forms.company.$submitted) && forms.company.website.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END WEBSITE -->\n\n    <!-- START EMAIL -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.email.$touched || forms.company.$submitted) && forms.company.email.$invalid}">\n      <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}</label>\n      <input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="item.email"/>\n      <span data-ng-show="(forms.cmopany.email.$touched || forms.company.$submitted) && forms.company.email.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END EMAIL -->\n\n  </div>\n  <div class="col-md-6">\n    <!-- START PHONE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.phone.$touched || forms.company.$submitted) && forms.company.phone.$invalid}">\n      <label class="control-label">{{\'APPLICATION_PHONE\' | translate}}</label>\n      <input type="text" name="phone" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="item.phone"/>\n      <span data-ng-show="(forms.cmopany.phone.$touched || forms.company.$submitted) && forms.company.phone.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END PHONE -->\n\n    <!-- START FAX -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.fax.$touched || forms.company.$submitted) && forms.company.fax.$invalid}">\n      <label class="control-label">{{\'APPLICATION_FAX\' | translate}}</label>\n      <input type="text" name="fax" placeholder="{{\'APPLICATION_FAX\' | translate}}" class="form-control" data-ng-model="item.fax"/>\n      <span data-ng-show="(forms.cmopany.fax.$touched || forms.company.$submitted) && forms.company.fax.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END FAX -->\n\n    <!-- START TYPE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.type.$touched || forms.company.$submitted) && forms.company.type.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TYPE\' | translate}}</label>\n      <input type="text" name="type" placeholder="{{\'APPLICATION_TYPE\' | translate}}" class="form-control" data-ng-model="item.type"/>\n      <span data-ng-show="(forms.cmopany.type.$touched || forms.company.$submitted) && forms.company.type.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TYPE -->\n\n    <!-- START DOMAIN -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.company.emailDomain.$touched || forms.company.$submitted) && forms.company.emailDomain.$invalid}">\n      <label class="control-label">{{\'APPLICATION_EMAIL_DOMAIN\' | translate}}</label>\n      <input type="text" name="domain" placeholder="{{\'APPLICATION_EMAIL_DOMAIN\' | translate}}" class="form-control" data-ng-model="item.emailDomain"/>\n      <span data-ng-show="(forms.cmopany.emailDomain.$touched || forms.company.$submitted) && forms.company.emailDomain.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END DOMAIN -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n  </div>\n</div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.company.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),
+a.put("app/contactmanager/company/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-users"></i>\n					<a href="#">{{ \'APPLICATION_CONTACT_MANAGER\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-briefcase"></i>\n					<a href="/contactmanager/companies/list">{{ \'APPLICATION_COMPANIES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-briefcase font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_COMPANIES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="create()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_COMPANY\' | translate }}\n						</button>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/contactmanager/company/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getCompany()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-users"></i>\n					<a href="#">{{ \'APPLICATION_CONTACT_MANAGER\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-briefcase"></i>\n					<a href="/contactmanager/companies/list">{{ \'APPLICATION_COMPANIES\' | translate }}</a>\n					<i data-ng-show="company" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="company">\n					<a href="#">{{company.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/company.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{company.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.contactmanager.companies.view.settings\')}">\n							<a data-ng-href="/contactmanager/companies/view/{{company.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/contactmanager/company/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_COMPANY\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_ADDRESS\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_SHIPMENT_ADDRESS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateCompany()" novalidate>\n							<div class="row">\n								<div class="col-md-6">\n									<!-- START NAME -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n										<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="company.name" required/>\n										<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END NAME -->\n\n									<!-- START VAT -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.vat.$touched || forms.general.$submitted) && forms.general.vat.$invalid}">\n										<label class="control-label">{{\'APPLICATION_VAT\' | translate}}</label>\n										<input type="text" name="vat" placeholder="{{\'APPLICATION_VAT\' | translate}}" class="form-control" data-ng-model="company.vat"/>\n										<span data-ng-show="(forms.cmopany.vat.$touched || forms.general.$submitted) && forms.general.vat.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END VAT -->\n\n									<!-- START COMPANYID -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.companyId.$touched || forms.general.$submitted) && forms.general.companyId.$invalid}">\n										<label class="control-label">{{\'APPLICATION_COMPANY_ID\' | translate}}</label>\n										<input type="text" name="companyId" placeholder="{{\'APPLICATION_COMPANY_ID\' | translate}}" class="form-control" data-ng-model="company.companyId"/>\n										<span data-ng-show="(forms.cmopany.companyId.$touched || forms.general.$submitted) && forms.general.companyId.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END COMPANYID -->\n\n									<!-- START WEBSITE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.website.$touched || forms.general.$submitted) && forms.general.website.$invalid}">\n										<label class="control-label">{{\'APPLICATION_WEBSITE\' | translate}}</label>\n										<input type="text" name="website" placeholder="{{\'APPLICATION_WEBSITE\' | translate}}" class="form-control" data-ng-model="company.website"/>\n										<span data-ng-show="(forms.cmopany.website.$touched || forms.general.$submitted) && forms.general.website.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END WEBSITE -->\n\n									<!-- START EMAIL -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.email.$touched || forms.general.$submitted) && forms.general.email.$invalid}">\n										<label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}</label>\n										<input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="company.email"/>\n										<span data-ng-show="(forms.cmopany.email.$touched || forms.general.$submitted) && forms.general.email.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END EMAIL -->\n								</div>\n								<div class="col-md-6">\n									<!-- START PHONE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.phone.$touched || forms.general.$submitted) && forms.general.phone.$invalid}">\n										<label class="control-label">{{\'APPLICATION_PHONE\' | translate}}</label>\n										<input type="text" name="phone" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="company.phone"/>\n										<span data-ng-show="(forms.cmopany.phone.$touched || forms.general.$submitted) && forms.general.phone.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END PHONE -->\n\n									<!-- START FAX -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.fax.$touched || forms.general.$submitted) && forms.general.fax.$invalid}">\n										<label class="control-label">{{\'APPLICATION_FAX\' | translate}}</label>\n										<input type="text" name="fax" placeholder="{{\'APPLICATION_FAX\' | translate}}" class="form-control" data-ng-model="company.fax"/>\n										<span data-ng-show="(forms.cmopany.fax.$touched || forms.general.$submitted) && forms.general.fax.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END FAX -->\n\n									<!-- START TYPE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.type.$touched || forms.general.$submitted) && forms.general.type.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}</label>\n										<input type="text" name="type" placeholder="{{\'APPLICATION_TYPE\' | translate}}" class="form-control" data-ng-model="company.type"/>\n										<span data-ng-show="(forms.cmopany.type.$touched || forms.general.$submitted) && forms.general.type.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END TYPE -->\n\n									<!-- START DOMAIN -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.emailDomain.$touched || forms.general.$submitted) && forms.general.emailDomain.$invalid}">\n										<label class="control-label">{{\'APPLICATION_EMAIL_DOMAIN\' | translate}}</label>\n										<input type="text" name="domain" placeholder="{{\'APPLICATION_EMAIL_DOMAIN\' | translate}}" class="form-control" data-ng-model="company.emailDomain"/>\n										<span data-ng-show="(forms.cmopany.emailDomain.$touched || forms.general.$submitted) && forms.general.emailDomain.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END DOMAIN -->\n\n									<!-- START DESCRIPTION -->\n									<div class="form-group">\n										<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n										<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="company.description"></textarea>\n									</div>\n									<!-- END DESCRIPTION -->\n								</div>\n							</div>\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.address" data-ng-submit="forms.address.$valid && updateCompany()" novalidate>\n							<!-- START STREET -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.address.street.$touched || forms.address.$submitted) && forms.address.street.$invalid}">\n								<label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n								<input type="text" name="street" placeholder="{{\'APPLICATION_STREET\' | translate}}" class="form-control" data-ng-model="company.street"/>\n								<span data-ng-show="(forms.address.street.$touched || forms.address.$submitted) && forms.address.street.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END STREET -->\n\n							<!-- START POSTALCODE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.address.postalCode.$touched || forms.address.$submitted) && forms.address.postalCode.$invalid}">\n								<label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n								<input type="text" name="postalCode" placeholder="{{\'APPLICATION_POSTALCODE\' | translate}}" class="form-control" data-ng-model="company.postalCode"/>\n								<span data-ng-show="(forms.address.postalCode.$touched || forms.address.$submitted) && forms.address.postalCode.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END POSTALCODE -->\n\n							<!-- START CITY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.address.city.$touched || forms.address.$submitted) && forms.address.city.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n								<input type="text" name="city" placeholder="{{\'APPLICATION_CITY\' | translate}}" class="form-control" data-ng-model="company.city"/>\n								<span data-ng-show="(forms.address.city.$touched || forms.address.$submitted) && forms.address.city.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CITY -->\n							<!-- START COUNTRY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.address.country.$touched || forms.address.$submitted) && forms.address.country.$invalid}">\n								<label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n								<input type="text" name="country" placeholder="{{\'APPLICATION_COUNTRY\' | translate}}" class="form-control" data-ng-model="company.country"/>\n								<span data-ng-show="(forms.address.country.$touched || forms.address.$submitted) && forms.address.country.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END COUNTRY -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<div class="tab-pane" id="tab_1_3">\n						<form name="forms.shipmentAddress" data-ng-submit="forms.shipmentAddress.$valid && updateCompany()" novalidate>\n							<!-- START STREET -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.shipmentAddress.sStreet.$touched || forms.shipmentAddress.$submitted) && forms.shipmentAddress.sStreet.$invalid}">\n								<label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n								<input type="text" name="sStreet" placeholder="{{\'APPLICATION_STREET\' | translate}}" class="form-control" data-ng-model="company.sStreet"/>\n								<span data-ng-show="(forms.shipmentAddress.sStreet.$touched || forms.shipmentAddress.$submitted) && forms.shipmentAddress.sStreet.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END STREET -->\n\n							<!-- START POSTALCODE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.shipmentAddress.sPostalCode.$touched || forms.shipmentAddress.$submitted) && forms.shipmentAddress.sPostalCode.$invalid}">\n								<label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n								<input type="text" name="sPostalCode" placeholder="{{\'APPLICATION_POSTALCODE\' | translate}}" class="form-control" data-ng-model="company.sPostalCode"/>\n								<span data-ng-show="(forms.shipmentAddress.sPostalCode.$touched || forms.shipmentAddress.$submitted) && forms.shipmentAddress.sPostalCode.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END POSTALCODE -->\n\n							<!-- START CITY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.shipmentAddress.sCity.$touched || forms.shipmentAddress.$submitted) && forms.shipmentAddress.sCity.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n								<input type="text" name="sCity" placeholder="{{\'APPLICATION_CITY\' | translate}}" class="form-control" data-ng-model="company.sCity"/>\n								<span data-ng-show="(forms.shipmentAddress.sCity.$touched || forms.shipmentAddress.$submitted) && forms.shipmentAddress.sCity.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CITY -->\n							<!-- START COUNTRY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.shipmentAddress.sCountry.$touched || forms.shipmentAddress.$submitted) && forms.shipmentAddress.sCountry.$invalid}">\n								<label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n								<input type="text" name="sCountry" placeholder="{{\'APPLICATION_COUNTRY\' | translate}}" class="form-control" data-ng-model="company.sCountry"/>\n								<span data-ng-show="(forms.shipmentAddress.sCountry.$touched || forms.shipmentAddress.$submitted) && forms.shipmentAddress.sCountry.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END COUNTRY -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/contactmanager/contact/list/copy.modal.html",'<div class="modal-header" data-ng-init="getLists()">\n  <h3 class="modal-title">{{ \'APPLICATION_COPY_CONTACT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.copy" novalidate>\n        <!-- START LIST -->\n        <div class="form-group" data-ng-class="{\'has-error\': forms.csv.ListId.$invalid && forms.csv.$submitted}">\n          <label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n          <ui-select data-ng-model="item.ListId" theme="bootstrap" name="ListId" data-ng-disabled="disabled" data-ng-change="getCustomFields()" required>\n            <ui-select-match placeholder="{{ \'APPLICATION_LIST\' | translate }}">{{$select.selected.name}}</ui-select-match>\n            <ui-select-choices repeat="list.id as list in lists | filter: $select.search">\n              <div ng-bind-html="list.name | highlight: $select.search"></div>\n            </ui-select-choices>\n          </ui-select>\n          <span data-ng-show="forms.csv.ListId.$invalid && forms.csv.$submitted" class="help-block help-block-error">\n            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n          </span>\n        </div>\n        <!-- END LIST -->\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.copy.$invalid || !forms.copy.ListId">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/contactmanager/contact/list/import.modal.html",'<div class="modal-header" data-ng-init="getLists();getCompanies();">\n  <h3 class="modal-title">{{ \'APPLICATION_IMPORT_FROM_CSV\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.csv" novalidate>\n    <div class="row">\n      <div class="col-md-6">\n        <!-- START LIST -->\n        <div class="form-group" data-ng-class="{\'has-error\': forms.csv.ListId.$invalid && forms.csv.$submitted}">\n          <label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n          <ui-select data-ng-model="item.ListId" theme="bootstrap" name="ListId" data-ng-disabled="disabled" data-ng-change="getCustomFields()">\n            <ui-select-match placeholder="{{ \'APPLICATION_LIST\' | translate }}">{{$select.selected.name}}</ui-select-match>\n            <ui-select-choices repeat="list.id as list in lists | filter: $select.search">\n              <div ng-bind-html="list.name | highlight: $select.search"></div>\n            </ui-select-choices>\n          </ui-select>\n          <span data-ng-show="forms.csv.ListId.$invalid && forms.csv.$submitted" class="help-block help-block-error">\n            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n          </span>\n        </div>\n        <!-- END LIST -->\n\n        <!-- START FIRSTNAME -->\n        <div class="form-group" data-ng-class="{\'has-error\': forms.csv.firstName.$invalid && forms.csv.$submitted}">\n          <label class="control-label">{{\'APPLICATION_FIRSTNAME\' | translate}}</label>\n          <ui-select data-ng-model="item.firstName" theme="bootstrap" name="firstName" data-ng-disabled="disabled" required>\n            <ui-select-match allow-clear placeholder="{{ \'APPLICATION_FIRSTNAME\' | translate }}">{{$select.selected}}</ui-select-match>\n            <ui-select-choices repeat="index in indexes | filter: $select.search">\n              <div ng-bind-html="index | highlight: $select.search"></div>\n            </ui-select-choices>\n          </ui-select>\n          <span data-ng-show="forms.csv.firstName.$invalid && forms.csv.$touched" class="help-block help-block-error">\n            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n          </span>\n        </div>\n        <!-- END FIRSTNAME -->\n\n        <!-- START LASTNAME -->\n        <div class="form-group" data-ng-class="{\'has-error\': forms.csv.lastName.$invalid && forms.csv.$submitted}">\n          <label class="control-label">{{\'APPLICATION_LASTNAME\' | translate}}</label>\n          <ui-select data-ng-model="item.lastName" theme="bootstrap" name="lastName" data-ng-disabled="disabled">\n            <ui-select-match allow-clear placeholder="{{ \'APPLICATION_LASTNAME\' | translate }}">{{$select.selected}}</ui-select-match>\n            <ui-select-choices repeat="index in indexes | filter: $select.search">\n              <div ng-bind-html="index | highlight: $select.search"></div>\n            </ui-select-choices>\n          </ui-select>\n          <span data-ng-show="forms.csv.lastName.$invalid && forms.csv.$touched" class="help-block help-block-error">\n            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n          </span>\n        </div>\n        <!-- END LASTNAME -->\n\n    <!-- START STREET -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.street.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n      <ui-select data-ng-model="item.street" theme="bootstrap" name="street" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_STREET\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.street.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END STREET -->\n\n    <!-- START POSTALCODE -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.postalCode.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n      <ui-select data-ng-model="item.postalCode" theme="bootstrap" name="postalCode" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_POSTALCODE\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.postalCode.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END POSTALCODE -->\n\n    <!-- START CITY -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.city.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n      <ui-select data-ng-model="item.city" theme="bootstrap" name="city" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_CITY\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.city.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END CITY -->\n\n    <!-- START PHONE -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.phone.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_PHONE\' | translate}}</label>\n      <ui-select data-ng-model="item.phone" theme="bootstrap" name="phone" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_PHONE\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.phone.$invalid && forms.phone.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END PHONE -->\n\n    <!-- START MOBILE -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.mobile.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_MOBILE\' | translate}}</label>\n      <ui-select data-ng-model="item.mobile" theme="bootstrap" name="mobile" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_MOBILE\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.mobile.$invalid && forms.mobile.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END MOBILE -->\n\n  </div>\n  <div class="col-md-6">\n\n    <!-- START COUNTRY -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.country.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n      <ui-select data-ng-model="item.country" theme="bootstrap" name="country" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_COUNTRY\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.country.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END COUNTRY -->\n\n    <!-- START DATEOFBIRTH -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.dateOfBirth.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_DATEOFBIRTH\' | translate}}</label>\n      <ui-select data-ng-model="item.dateOfBirth" theme="bootstrap" name="dateOfBirth" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_DATEOFBIRTH\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.dateOfBirth.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END DATEOFBIRTH -->\n\n    <!-- START TAGS -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.tags.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_TAGS\' | translate}}</label>\n      <ui-select multiple data-ng-model="item.tags" theme="bootstrap" name="tags" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_TAGS\' | translate }}">{{$item}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.tags.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TAGS -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.description.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <ui-select data-ng-model="item.description" theme="bootstrap" name="description" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_DESCRIPTION\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.description.$invalid && forms.csv.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END DESCRIPTION -->\n\n    <!-- START FAX -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.fax.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_FAX\' | translate}}</label>\n      <ui-select data-ng-model="item.fax" theme="bootstrap" name="fax" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_FAX\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.fax.$invalid && forms.fax.$touched" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END FAX -->\n\n    <!-- START EMAIL -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.email.$invalid && forms.general.$submitted}">\n      <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}</label>\n      <ui-select data-ng-model="item.email" theme="bootstrap" name="email" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_EMAIL\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv.email.$invalid && forms.csv.$submitted" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END EMAIL -->\n\n    <!-- START COMPANY -->\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv.CompanyId.$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{\'APPLICATION_COMPANY\' | translate}}</label>\n      <ui-select data-ng-model="item.CompanyId" theme="bootstrap" name="CompanyId" data-ng-disabled="!companies.length">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_COMPANY\' | translate }}">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="company.id as company in companies | filter: $select.search">\n          <div ng-bind-html="company.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <div class="note note-warning" data-ng-hide="companies.length">\n        <h4 class="block">Warning!</h4>\n        <p>\n          {{ \'MESSAGE_NO_COMPANIES_AVAILABLE\' | translate }}\n        </p>\n      </div>\n      <span data-ng-show="forms.csv.CompanyId.$invalid && forms.csv.$submitted" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END COMPANY -->\n\n  </div>\n  </div>\n\n  <!-- START CUSTOMFIELDS -->\n  <div data-ng-repeat="customField in customFields">\n    <div class="form-group" data-ng-class="{\'has-error\': forms.csv[customField.name].$invalid && forms.csv.$submitted}">\n      <label class="control-label">{{customField.alias}}</label>\n      <ui-select data-ng-model="item[customField.name]" theme="bootstrap" name="{{customField.name}}" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{customField.alias}}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="forms.csv[customField.name].$invalid && forms.csv.$submitted" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n  </div>\n  <!-- END CUSTOMFIELDS -->\n\n  <div>\n    <p>{{\'APPLICATION_IMPORT_SUCCEEDED\' | translate}}: {{import.succeeded}}/{{csvLength}}</p>\n    <div class="progress progress-sm" style="">\n      <div class="progress-bar progress-bar-info" role="progressbar" ng-style="{ \'width\': import.success + \'%\' }"></div>\n    </div>\n  </div>\n  <div>\n    <p>{{\'APPLICATION_IMPORT_FAILED\' | translate}}: {{import.failed}}/{{csvLength}}</p>\n    <div class="progress progress-sm" style="">\n      <div class="progress-bar progress-bar-danger" role="progressbar" ng-style="{ \'width\': import.fail + \'%\' }"></div>\n    </div>\n  </div>\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="start()" ng-disabled="forms.csv.$invalid || !forms.csv.firstName || submitted">{{ \'APPLICATION_SUBMIT\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="close()" data-ng-if="!importing">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="stop()" data-ng-if="importing">{{ \'APPLICATION_STOP\' | translate }}</button>\n</div>\n'),
+a.put("app/contactmanager/contact/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-users"></i>\n					<a href="#">{{ \'APPLICATION_CONTACT_MANAGER\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-users"></i>\n					<a href="/contactmanager/contacts/list">{{ \'APPLICATION_CONTACTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="fa fa-users font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_CONTACTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length && !Auth.isAgent()">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle" data-ng-click="newContact();">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONTACT\' | translate }}\n						</button>\n						<span class="btn default btn-file" data-ng-if="!Auth.isAgent()">\n						<span class="fileinput-new">\n						<i class="icon-cloud-upload"></i> {{\'APPLICATION_IMPORT_FROM_CSV\' | translate}}</span>\n						<input type="file" accept=".csv" nv-file-select="" uploader="uploader"/>\n						</span>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div data-ng-if="gridOptions"  ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/contactmanager/list/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_LIST\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.list" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.list.name.$touched || forms.list.$submitted) && forms.list.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.list.name.$touched || forms.list.$submitted) && forms.list.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.list.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/contactmanager/list/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-users"></i>\n					<a href="#">{{ \'APPLICATION_CONTACT_MANAGER\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-list-ul"></i>\n					<a href="/contactmanager/lists/list">{{ \'APPLICATION_LISTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="fa fa-list-ul font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_LISTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="create()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_LIST\' | translate }}\n						</button>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/contactmanager/list/view/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CUSTOM_FIELD\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.customField" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.customField.name.$touched || forms.customField.$submitted) && forms.customField.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.alias" required/>\n      <span data-ng-show="(forms.customField.name.$touched || forms.customField.$submitted) && forms.customField.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START TYPE -->\n    <div class="form-group"  data-ng-class="{\'has-error\': (forms.customField.type.$touched || forms.customField.$submitted) && forms.customField.type.$invalid}">\n      <label class="control-label">{{ \'APPLICATION_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.type" name="type" theme="bootstrap" required>\n        <ui-select-match placeholder="{{ \'APPLICATION_TYPE\' | translate }}">{{$translate.instant($select.selected.name)}}</ui-select-match>\n        <ui-select-choices repeat="type.value as type in types| filter: $select.search">\n          {{$translate.instant(type.name)}}\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(forms.customField.type.$touched || forms.customField.$submitted) && forms.customField.type.$invalid && forms.customField.type.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TYPE -->\n\n    <div ng-slide-down="item.type == \'select\'" lazy-render duration="1">\n      <div>\n        <label class="control-label">{{\'APPLICATION_CHOICES\' | translate}}</label>\n      </div>\n      <div class="padding-bottom" ng-repeat="choice in choices">\n        <div class="form-group">\n          <div class="input-group">\n            <input type="text" class="form-control" ng-model="choice.value" required>\n            <span class="input-group-btn">\n            <button class="btn red" type="button"data-ng-click="removeField($index)" data-ng-disabled="choices.length<=1"><i class="fa fa-times"></i></button>\n            </span>\n          </div>\n        </div>\n      </div>\n      <button type="button" class="btn btn-sm green padding-bottom" ng-click="addField()">\n        <i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CHOICE\' | translate}}\n      </button>\n\n    </div>\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.customField.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/contactmanager/list/view/view.agents.html",'<div class="row" data-ng-init="getTeams()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="note note-warning" data-ng-hide="teams.length">\n				<h4 class="block">Warning!</h4>\n				<p>\n					 {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\n				</p>\n			</div>\n			<div class="portlet-body">\n				<!-- BEGIN FORM-->\n				<form action="index.html" class="form-horizontal form-row-seperated">\n					<div class="form-body">\n						<div class="form-group last">\n							<div class="col-md-12" id="multi-select-team">\n							</div>\n						</div>\n					</div>\n				</form>\n				<!-- END FORM-->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/contactmanager/list/view/view.customFieldSettings.html",'<div class="row" data-ng-init="getCustomField()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_CUSTOM_FIELD\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n			</div>\n\n			<div class="portlet-body">\n					<!-- GENERAL TAB -->\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateCustomField()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="customField.alias" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<div ng-slide-down="customField.type == \'select\'" lazy-render duration="1" class="mbottom20">\n								<div>\n									<label class="control-label">{{\'APPLICATION_CHOICES\' | translate}}</label>\n								</div>\n								<div class="padding-bottom" ng-repeat="choice in choices">\n									<div class="form-group">\n										<div class="input-group">\n											<input type="text" class="form-control" ng-model="choice.value" required>\n											<span class="input-group-btn">\n											<button class="btn red" type="button"data-ng-click="removeField($index)" data-ng-disabled="choices.length<=1"><i class="fa fa-times"></i></button>\n											</span>\n										</div>\n									</div>\n								</div>\n								<button type="button" class="btn btn-sm green padding-bottom" ng-click="addField()">\n									<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CHOICE\' | translate}}\n								</button>\n\n							</div>\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="customField.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/contactmanager/list/view/view.customFields.html",'<div ui-view class="profile-content">\n<div class="row" data-ng-init="initCustomFields()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title  tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CUSTOM_FIELDS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n          <div class="btn-group">\n            <button class="btn green-jungle " ng-click="create()">\n              <i class="icon-plus"></i> {{ \'APPLICATION_NEW_CUSTOM_FIELD\' | translate }}\n            </button>\n          </div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/contactmanager/list/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getList()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-users"></i>\n					<a href="#">{{ \'APPLICATION_CONTACT_MANAGER\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-list-ul"></i>\n					<a href="/contactmanager/lists/list">{{ \'APPLICATION_LISTS\' | translate }}</a>\n					<i data-ng-show="list" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="list">\n					<a href="#">{{list.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/list.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{list.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.contactmanager.lists.view.settings\')}">\n							<a data-ng-href="/contactmanager/lists/view/{{list.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-if="!list.defaultEntry" data-ng-class="{active: $state.is(\'main.contactmanager.lists.view.agents\')}">\n							<a data-ng-href="/contactmanager/lists/view/{{list.id}}/agents">\n							<i class="icon-people"></i>\n							{{ \'APPLICATION_AGENTS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.contactmanager.lists.view.customfields\')}">\n							<a data-ng-href="/contactmanager/lists/view/{{list.id}}/customfields">\n							<i class="icon-pencil"></i>\n							{{ \'APPLICATION_CUSTOM_FIELDS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/contactmanager/list/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_LIST\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateList()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="list.name" data-ng-disabled="list.defaultEntry" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="list.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/dashboard/chat/chat.html",'<div data-ng-switch="Auth.getRole()">\n  <div ng-switch-when="agent" data-ng-init="initAgent()">\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table1" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table1.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table2" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table2.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n  </div>\n  <div ng-switch-default>\n    <fieldset>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_TODAY_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-md-8">\n       <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'waiting\')">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="fa fa-play"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{waiting || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_WAITING_NEW\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'open\')">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-bell"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{open || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'unmanaged\')">\n          <div class="dashboard-stat green">\n            <div class="visual">\n              <i class="icon-options"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{unmanaged || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_UNMANAGED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'closed\')">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-like"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{closed || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'abandoned\')">\n          <div class="dashboard-stat yellow-crusta">\n            <div class="visual">\n              <i class="icon-dislike"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{abandoned || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_ABANDONED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" >\n          <div class="dashboard-stat yellow-casablanca">\n            <div class="visual">\n              <i class="icon-calculator"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{new+open+unmanaged+closed+abandoned || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TOTAL\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n    <div class="col-md-4">\n      <!-- <div class="portlet light bordered">\n        <div class="portlet-body"> -->\n          <canvas class="chart chart-pie"  chart-data="charts.interactions.values" chart-labels="charts.interactions.labels" chart-colours="charts.interactions.colours" chart-legend="true">\n          </canvas>\n        <!-- </div>\n      </div> -->\n    </div>\n    </div>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_INTERACTION_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'timeout\')">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-dislike"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{timeout || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TIMEOUT\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'waiting\')">\n          <div class="dashboard-stat purple">\n            <div class="visual">\n              <i class="icon-hourglass"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{waiting || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_WAITING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </fieldset>\n\n  </div>\n</div>\n'),a.put("app/dashboard/dashboard.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" id="dashboardView">\n	<div class="col-md-12" >\n		<div>\n			<nav class="navbar navbar-default" role="navigation">\n				<div class="navbar-header">\n					<button type="button" class="navbar-toggle" data-ng-init="navCollapsed = true" data-ng-click="navCollapsed = !navCollapsed">\n						<span class="sr-only">Toggle navigation</span>\n						<span class="icon-bar"></span>\n						<span class="icon-bar"></span>\n						<span class="icon-bar"></span>\n					</button>\n				</div>\n\n				<!-- Collect the nav links, forms, and other content for toggling -->\n				<div class="collapse navbar-collapse" ng-class="!navCollapsed && \'in\'" >\n					<ul class="nav navbar-nav">\n						<li data-ng-class="{active: $state.is(\'main.dashboard.voice\')}">\n							<a href="/dashboard/voice">\n								<b class=\'icon-earphones-alt\'></b>\n								{{ \'APPLICATION_VOICE\' | translate }}\n							</a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.dashboard.chat\'),\'disabled-link\':!license.chat}" data-ng-if="::((Auth.isAdmin() || Auth.isAgent() || userModules[8]))">\n							<a href="{{license.chat ? \'/dashboard/chat\' : \'#\'}}" class="disable-target">\n								<b class=\'icon-bubble\'></b>\n								{{ \'APPLICATION_CHAT\' | translate }}\n							</a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.dashboard.mail\'),\'disabled-link\':!license.mail}" data-ng-if="::((Auth.isAdmin() || Auth.isAgent() || userModules[9]))">\n							<a href="{{license.mail ? \'/dashboard/mail\' : \'#\'}}" class="disable-target">\n								<b class=\'icon-envelope\'></b>\n								{{ \'APPLICATION_MAIL\' | translate }}\n							</a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.dashboard.fax\'),\'disabled-link\':!license.fax}" data-ng-if="::((Auth.isAdmin() || Auth.isAgent() || userModules[10]))">\n							<a href="{{license.fax ? \'/dashboard/fax\' : \'#\'}}" class="disable-target">\n								<b class=\'fa fa-fax\'></b>\n								{{ \'APPLICATION_FAX\' | translate }}\n							</a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.dashboard.sms\'),\'disabled-link\':!license.messaging}" data-ng-if="::((Auth.isAdmin() || Auth.isAgent() || userModules[11]))">\n							<a href="{{license.messaging ? \'/dashboard/sms\' : \'#\'}}" class="disable-target">\n								<b class=\'glyphicon glyphicon-comment\'></b>\n								{{ \'APPLICATION_SMS\' | translate }}\n							</a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.dashboard.openchannel\'),\'disabled-link\':!license.openchannel}" data-ng-if="::((Auth.isAdmin() || Auth.isAgent() || userModules[20]))">\n							<a href="{{license.messaging ? \'/dashboard/openchannel\' : \'#\'}}" class="disable-target">\n								<b class=\'icon-globe\'></b>\n								{{ \'APPLICATION_OPEN_CHANNEL\' | translate }}\n							</a>\n						</li>\n					</ul>\n				</div>\n				<!-- /.navbar-collapse -->\n			</nav>\n		</div>\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/dashboard/fax/fax.html",'<div data-ng-switch="Auth.getRole()">\n  <div ng-switch-when="agent" data-ng-init="initAgent()">\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table1" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table1.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table2" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table2.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n  </div>\n  <div ng-switch-default>\n    <fieldset>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_TODAY_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-md-8">\n       <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'new\')">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="fa fa-play"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{new || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_NEW\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'open\')">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-bell"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{open || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'pending\')">\n          <div class="dashboard-stat green">\n            <div class="visual">\n              <i class="icon-options"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{pending || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_PENDING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'closed\')">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-like"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{closed || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" >\n          <div class="dashboard-stat yellow-casablanca">\n            <div class="visual">\n              <i class="icon-calculator"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{new+open+pending+closed || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TOTAL\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n    <div class="col-md-4">\n      <!-- <div class="portlet light bordered">\n        <div class="portlet-body"> -->\n          <canvas class="chart chart-pie"  chart-data="charts.interactions.values" chart-labels="charts.interactions.labels" chart-colours="charts.interactions.colours" chart-legend="true">\n          </canvas>\n        <!-- </div>\n      </div> -->\n    </div>\n    </div>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_INTERACTION_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'timeout\')">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-dislike"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{timeout || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TIMEOUT\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'waiting\')">\n          <div class="dashboard-stat purple">\n            <div class="visual">\n              <i class="icon-hourglass"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{waiting || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_WAITING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </fieldset>\n\n  </div>\n</div>\n'),
+a.put("app/dashboard/mail/mail.html",'<div data-ng-switch="Auth.getRole()">\n  <div ng-switch-when="agent" data-ng-init="initAgent()">\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table1" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table1.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table2" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table2.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n  </div>\n  <div ng-switch-default>\n    <fieldset>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_TODAY_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-md-8">\n       <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'new\')">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="fa fa-play"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{new || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_NEW\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'open\')">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-bell"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{open || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'pending\')">\n          <div class="dashboard-stat green">\n            <div class="visual">\n              <i class="icon-options"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{pending || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_PENDING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'closed\')">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-like"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{closed || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" >\n          <div class="dashboard-stat yellow-casablanca">\n            <div class="visual">\n              <i class="icon-calculator"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{new+open+pending+closed || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TOTAL\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n    <div class="col-md-4">\n      <!-- <div class="portlet light bordered">\n        <div class="portlet-body"> -->\n          <canvas class="chart chart-pie"  chart-data="charts.interactions.values" chart-labels="charts.interactions.labels" chart-colours="charts.interactions.colours" chart-legend="true">\n          </canvas>\n        <!-- </div>\n      </div> -->\n    </div>\n    </div>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_INTERACTION_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'timeout\')">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-dislike"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{timeout || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TIMEOUT\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'waiting\')">\n          <div class="dashboard-stat purple">\n            <div class="visual">\n              <i class="icon-hourglass"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{waiting || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_WAITING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </fieldset>\n\n  </div>\n</div>\n'),a.put("app/dashboard/openchannel/openchannel.html",'<div data-ng-switch="Auth.getRole()">\n  <div ng-switch-when="agent" data-ng-init="initAgent()">\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table1" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table1.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table2" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table2.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n  </div>\n  <div ng-switch-default>\n    <fieldset>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_TODAY_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-md-8">\n       <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'new\')">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="fa fa-play"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{new || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_NEW\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'open\')">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-bell"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{open || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'pending\')">\n          <div class="dashboard-stat green">\n            <div class="visual">\n              <i class="icon-options"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{pending || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_PENDING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'closed\')">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-like"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{closed || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" >\n          <div class="dashboard-stat yellow-casablanca">\n            <div class="visual">\n              <i class="icon-calculator"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{new+open+pending+closed || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TOTAL\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n    <div class="col-md-4">\n      <!-- <div class="portlet light bordered">\n        <div class="portlet-body"> -->\n          <canvas class="chart chart-pie"  chart-data="charts.interactions.values" chart-labels="charts.interactions.labels" chart-colours="charts.interactions.colours" chart-legend="true">\n          </canvas>\n        <!-- </div>\n      </div> -->\n    </div>\n    </div>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_INTERACTION_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'timeout\')">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-dislike"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{timeout || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TIMEOUT\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'waiting\')">\n          <div class="dashboard-stat purple">\n            <div class="visual">\n              <i class="icon-hourglass"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{waiting || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_WAITING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </fieldset>\n\n  </div>\n</div>\n'),a.put("app/dashboard/sms/sms.html",'<div data-ng-switch="Auth.getRole()">\n  <div ng-switch-when="agent" data-ng-init="initAgent()">\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table1" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table1.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n\n    <div class="row" style="padding-bottom:10px;">\n      <div class="col-md-12">\n        <!-- START TABLE -->\n        <div ui-grid="table2" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table2.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n  </div>\n  <div ng-switch-default>\n    <fieldset>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_TODAY_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-md-8">\n       <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'new\')">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="fa fa-play"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{new || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_NEW\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'open\')">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-bell"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{open || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'pending\')">\n          <div class="dashboard-stat green">\n            <div class="visual">\n              <i class="icon-options"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{pending || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_PENDING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'closed\')">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-like"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{closed || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class ="row">\n        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" >\n          <div class="dashboard-stat yellow-casablanca">\n            <div class="visual">\n              <i class="icon-calculator"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{new+open+pending+closed || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TOTAL\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n    <div class="col-md-4">\n      <!-- <div class="portlet light bordered">\n        <div class="portlet-body"> -->\n          <canvas class="chart chart-pie"  chart-data="charts.interactions.values" chart-labels="charts.interactions.labels" chart-colours="charts.interactions.colours" chart-legend="true">\n          </canvas>\n        <!-- </div>\n      </div> -->\n    </div>\n    </div>\n      <legend>\n        <span class="caption-subject">&nbsp;</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_INTERACTION_STATS\' | translate }}</small>\n      </legend>\n      <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'timeout\')">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-dislike"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{timeout || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TIMEOUT\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" data-ng-init="initWidget(\'waiting\')">\n          <div class="dashboard-stat purple">\n            <div class="visual">\n              <i class="icon-hourglass"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{waiting || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_WAITING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </fieldset>\n\n  </div>\n</div>\n'),a.put("app/dashboard/voice/voice.html",'<div data-ng-switch="Auth.getRole()">\n  <div ng-switch-when="agent" data-ng-init="initAgent()">\n    <div class="portlet light">\n      <div class="portlet-body">\n        <!-- START TABLE -->\n        <div ui-grid="table1" name="table1" ui-grid-resize-columns ui-grid-pagination ui-grid-auto-resize class="ui-grid">\n          <div class="watermark" data-ng-show="!table1.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n        </div>\n        <!-- END TABLE -->\n      </div>\n    </div>\n\n    <div class="portlet light">\n      <div class="portlet-title tabbable-line">\n        <ul class="nav nav-tabs">\n          <li class="active">\n            <a href="#" data-target="#tab_1_a" data-toggle="tab">{{\'APPLICATION_WAITING\' | translate}}</a>\n          </li>\n          <li>\n            <a href="#" data-target="#tab_1_b" data-toggle="tab">{{\'APPLICATION_ABANDONED\' | translate}}</a>\n          </li>\n        </ul>\n      </div>\n      <div class="portlet-body" data-ng-init="initView()">\n        <div class="tab-content">\n          <div class="tab-pane active" id="tab_1_a">\n            <!-- START TABLE -->\n            <div ui-grid="table2" name="table2" ui-grid-resize-columns ui-grid-auto-resize class="ui-grid">\n              <div class="watermark" data-ng-show="!table2.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n            </div>\n            <!-- END TABLE -->\n          </div>\n          <div class="tab-pane" id="tab_1_b">\n            <!-- START TABLE -->\n            <div ui-grid="table3" name="table3" ui-grid-resize-columns ui-grid-pagination ui-grid-auto-resize class="ui-grid">\n              <div class="watermark" data-ng-show="!table3.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n            </div>\n          <!-- END TABLE -->\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n  <div ng-switch-default data-ng-init="initUser()">\n    <fieldset>\n      <legend>\n        <span class="caption-subject">{{ \'APPLICATION_INBOUND\' | translate }}</span><small class="font-grey-cascade pull-right">{{ \'APPLICATION_TODAY_STATS\' | translate }}</small>\n      </legend>\n\n      <div class="row">\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-bell"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ voice.waiting || 0 }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_WAITING\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="fa fa-play"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ voice.active || 0 }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ACTIVE\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="icon-like"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ voice.complete || 0 }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ANSWERED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-dislike"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ voice.abandon || 0 }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ABANDONED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n\n      <div class="row">\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-clock"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ (voice.avgAnswerTime || 0) | secToTime | date:\'HH:mm:ss\' }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_AVG_ANSWER_TIME\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-clock"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ (voice.avgTalkTime || 0) | secToTime | date:\'HH:mm:ss\' }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_AVG_TALK_TIME\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="icon-pie-chart"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ (voice.answerRate || 0) | number:2}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ANSWER_RATE\' | translate}} (%)\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-pie-chart"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ (voice.abandonRate || 0) | number:2}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ABANDON_RATE\' | translate}} (%)\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n\n      <div class="row">\n        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-info"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ voice.totalOffered || 0}}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_TOTAL_OFFERED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-info"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ voice.unmanaged || 0 }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_UNMANAGED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </fieldset>\n\n    <fieldset>\n      <legend>\n        <span class="caption-subject">{{ \'APPLICATION_OUTBOUND\' | translate }}</span><small class="pull-right font-grey-cascade">{{ \'APPLICATION_TODAY_STATS\' | translate }}</small>\n      </legend>\n\n      <div class="row">\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-call-out"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ voice.outbound.manualOutbound || 0 }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_MANUAL_OUTBOUND\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat purple-plum">\n            <div class="visual">\n              <i class="icon-clock"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ (voice.outbound.globalDuration || 0) | secToTime | date:\'HH:mm:ss\' }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_GLOBAL_DURATION\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat green-haze">\n            <div class="visual">\n              <i class="icon-like"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ voice.outbound.answered || 0 }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ANSWERED\' | translate}}\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">\n          <div class="dashboard-stat red-intense">\n            <div class="visual">\n              <i class="icon-pie-chart"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ (voice.outbound.avgDuration || 0) | secToTime | date:\'HH:mm:ss\' }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_AVG_DURATION\' | translate}} (%)\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n\n      <div class="row">\n        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">\n          <div class="dashboard-stat blue-madison">\n            <div class="visual">\n              <i class="icon-pie-chart"></i>\n            </div>\n            <div class="details">\n              <div class="number">\n                {{ (voice.outbound.answerRate || 0) | number:2 }}\n              </div>\n              <div class="desc">\n                {{\'APPLICATION_ANSWER_RATE\' | translate}} (%)\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n\n    </fieldset>\n  </div>\n</div>\n'),a.put("app/desk/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-handbag"></i>\n					<a href="/desk/list">{{ \'APPLICATION_DESK_COM\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-handbag font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_DESK_COM\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="accounts.checked.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/desk/wizard">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n						</a>\n					</div>\n					<a class="btn btn-icon-only btn-default" href="#" ng-csv="getAccounts([\'name\',\'username\',\'remoteUri\',\'authType\',\'consumerKey\',\'consumerSecret\',\'token\',\'tokenSecret\',\'password\'])" csv-header="[\'Name\', \'Username\', \'Remote Address\', \'Authentication Type\', \'Consumer Key\', \'Consumer Secret\', \'Token\', \'Token Secret\', \'Password\']" field-separator=";" filename="desk_accounts.csv">\n					<i class="icon-cloud-download"></i></a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<table st-table="displayedDeskAccounts" st-pipe="initList" class="table table-striped table-bordered table-hover">\n					<div class="table-responsive">\n					  <thead>\n							<tr>\n								<th colspan="7">\n									<div class="row">\n										<div class="col-md-6">\n											<ui-select class="input-xsmall" ng-model="conf.accountsByPage" theme="bootstrap" ng-disabled="disabled">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n												<ui-select-choices repeat="accountByPage in accountsByPage | filter: $select.search">\n													<div ng-bind-html="accountByPage.name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n										</div>\n										<div class="col-md-6">\n											<div class="input-group input-medium pull-right">\n												<input st-search placeholder="{{ \'APPLICATION_SEARCH\' | translate }}" class="form-control" type="search" />\n												<span class="input-group-addon">\n													<i class="fa fa-search"></i>\n												</span>\n											</div>\n										</div>\n									</div>\n								</th>\n							</tr>\n						  <tr>\n								<th class="small-cells" style="text-align: center; vertical-align: middle"><input type="checkbox" ng-change="check(account, checked)" checklist-model checklist-value="id"></th>\n						    <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n						    <th st-sort="username">{{ \'APPLICATION_EMAIL\' | translate }}</th>\n								<th st-sort="remoteUri">{{ \'APPLICATION_REMOTE_ADDRESS\' | translate }}</th>\n								<th>{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n								<th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n						  </tr>\n					  </thead>\n					  <tbody>\n					    <tr data-ng-repeat="account in displayedDeskAccounts" class="animate-repeat">\n								<td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="accounts.checked" checklist-value="account.id"></td>\n					      <td>{{account.name}}</td>\n					      <td>{{account.username}}</td>\n								<td>{{account.remoteUri}}</td>\n								<td>{{account.description}}</td>\n					      <td>\n					        <a class="btn default btn-xs blue-stripe" data-ng-href="/desk/view/{{account.id}}/account">\n										{{ \'APPLICATION_EDIT\' | translate }}\n					        </a>\n									<a class="btn default btn-xs green-stripe" data-ng-click="checkAccount(account.id)">\n										{{ \'APPLICATION_CHECK\' | translate }}\n					        </a>\n					        <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(account.name,account.id)">\n										{{ \'APPLICATION_DELETE\' | translate }}\n					        </a>\n					      </td>\n					    </tr>\n							<tr data-ng-hide="displayedDeskAccounts.length">\n								<td colspan="7" style="text-align:center;">\n									<i>No account available</i>\n								</td>\n							</tr>\n					  </tbody>\n					  <tfoot>\n							<tr>\n								<td/>\n						    <td>\n									<div class="input-icon right">\n										<i class="fa fa-search"></i>\n										<input st-search="name" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_NAME\' | translate | lowercase}}" class="form-control" type="search"/>\n									</div>\n						    </td>\n						    <td>\n									<div class="input-icon right">\n										<i class="fa fa-search"></i>\n										<input st-search="email" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_EMAIL\' | translate | lowercase}}" class="form-control" type="search"/>\n									</div>\n						    </td>\n						    <td>\n									<div class="input-icon right">\n										<i class="fa fa-search"></i>\n										<input st-search="remoteUri" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_REMOTE_ADDRESS\' | translate | lowercase}}" class="form-control" type="search"/>\n									</div>\n						    </td>\n						    <td/>\n								<td/>\n						  </tr>\n					    <tr>\n					      <td colspan="7" class="text-center">\n									<div class="pagination" st-pagination st-items-by-page="conf.accountsByPage.value" st-displayed-pages="7"></div>\n					      </td>\n					    </tr>\n					  </tfoot>\n					</div>\n				</table>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/desk/view/view.account.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START AUTH TYPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.authType.$invalid}">\n								<label class="control-label">{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}</label>\n								<ui-select data-ng-model="account.authType" name="authType" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="type in [\'basic\', \'oauth\'] | filter: $select.search">\n										<div data-ng-bind="type | capitalize | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="forms.formSetting.authType.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- START AUTH TYPE -->\n\n              <!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}" ng-slide-down="account.authType == \'basic\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n								<span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n							<!-- START CONSUMER KEY -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.consumerKey.$invalid}" ng-slide-down="account.authType == \'oauth\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_CONSUMER_KEY\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="consumerKey" placeholder="{{\'APPLICATION_CONSUMER_KEY\' | translate}}" class="form-control" data-ng-model="account.consumerKey" required/>\n								<span data-ng-show="forms.formSetting.consumerKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONSUMER KEY -->\n\n              <!-- START CONSUMER SECRET -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.consumerSecret.$invalid}" ng-slide-down="account.authType == \'oauth\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_CONSUMER_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="consumerSecret" placeholder="{{\'APPLICATION_CONSUMER_SECRET\' | translate}}" class="form-control" data-ng-model="account.consumerSecret" required/>\n								<span data-ng-show="forms.formSetting.consumerSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONSUMER SECRET -->\n\n              <!-- START TOKEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.token.$invalid}" ng-slide-down="account.authType == \'oauth\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="token" placeholder="{{\'APPLICATION_TOKEN\' | translate}}" class="form-control" data-ng-model="account.token" required/>\n								<span data-ng-show="forms.formSetting.token.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TOKEN -->\n\n              <!-- START TOKEN SECRET-->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.tokenSecret.$invalid}" ng-slide-down="account.authType == \'oauth\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_TOKEN_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="tokenSecret" placeholder="{{\'APPLICATION_TOKEN_SECRET\' | translate}}" class="form-control" data-ng-model="account.tokenSecret" required/>\n								<span data-ng-show="forms.formSetting.tokenSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TOKEN SECRET-->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/desk/view/view.configuration.html",'<div class="row" data-ng-init="initConfiguration()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_CONFIGURATION\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createConfiguration()">\n	        <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="formValidation(formsConfiguration.info.$valid)">\n							<form name="formsConfiguration.info" novalidate>\n								<!-- START NAME -->\n								<div class="form-group" data-ng-class="{\'has-error\': formsConfiguration.info.$submitted && formsConfiguration.info.name.$invalid}">\n									<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="configuration.name" required/>\n									<span data-ng-show="formsConfiguration.info.name.$invalid && formsConfiguration.info.$submitted" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END NAME -->\n								<!-- START DESCRIPTION -->\n								<div class="form-group">\n									<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n									<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="configuration.description"/>\n								</div>\n								<!-- END DESCRIPTION -->\n\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n							</form>\n						</wz-step>\n\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/desk/view/view.configurationSettings.html",'<div class="row" data-ng-init="getConfiguration();getVariables();getFields();">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\n					</li>\n          <li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\n					</li>\n          <li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- SUBJECT TAB -->\n					<div class="tab-pane ui-padding active" id="tab_1_1">\n            <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by blank space:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemSubject()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n	            <div class="row" data-ng-repeat="subjectItem in subjectConfig">\n	              <div class="col-md-3">\n	                <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n	                  <ui-select-choices repeat="item in fieldType | filter: $select.search">\n	                    <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\n	                <div class="form-group">\n	                  <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\n	                </div>\n	              </div>\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END SUBJECT TAB -->\n          <!-- DESCRIPTION TAB -->\n					<div class="tab-pane ui-padding" id="tab_1_2">\n						<div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by new line:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemDescription()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n							<div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\n								<!-- <pre>\n									{{descriptionItem|json}}\n								</pre> -->\n	              <div class="col-md-2">\n	                <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n	                  <ui-select-choices repeat="item in descFieldType | filter: $select.search">\n	                    <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\n	                <div class="form-group">\n	                  <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\n	                </div>\n	              </div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n									<input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\n								</div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n									<ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n	                  <ui-select-choices repeat="item in fieldType | filter: $select.search">\n	                    <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n								</div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'string\'">\n									<input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\n								</div>\n	              <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'variable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END DESCRIPTION TAB -->\n          <!-- FIELDS TAB -->\n					<div class="tab-pane ui-padding" id="tab_1_3">\n						<div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemField()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n	            <div class="row" data-ng-repeat="fieldItem in fieldConfig">\n	              <div class="col-md-3">\n	                <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\n	                  <ui-select-choices repeat="item.id as item in accountFields | filter: $select.search">\n	                    <div ng-bind-html="item.label | highlight: $select.search"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\n	                <div class="form-group">\n										<ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected}}</ui-select-match>\n		                  <ui-select-choices repeat="item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\n		                    <div ng-bind-html="item | highlight: $select.search"></div>\n		                  </ui-select-choices>\n		                </ui-select>\n	                </div>\n	              </div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\n									<div class="form-group">\n										<ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n		                  <ui-select-choices repeat="item in fieldType | filter: $select.search">\n		                    <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n		                  </ui-select-choices>\n		                </ui-select>\n									</div>\n								</div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\n	                <div class="form-group">\n										<input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\n	                </div>\n	              </div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\n	                <div class="form-group">\n										<ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END FIELDS TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/desk/view/view.configurations.html",'<div ui-view class="profile-content">\n	<div class="row" data-ng-init="getConfigurations()">\n		<div class="col-md-12">\n			<div class="portlet light">\n				<div class="portlet-title  tabbable-line">\n					<div class="caption caption-md">\n						<i class="icon-globe theme-font hide"></i>\n						<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATIONS\' | translate}}</span>\n					</div>\n					<div class="actions">\n						<div class="btn-group">\n							<a class="btn green-jungle " href="/desk/view/{{account.id}}/configuration" data-toggle="dropdown">\n								<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}\n							</a>\n						</div>\n					</div>\n				</div>\n				<div class="portlet-body">\n					<!-- START TABLE -->\n					<table class="table table-striped table-bordered table-hover">\n						  <thead>\n							  <tr>\n							    <th>{{\'APPLICATION_NAME\' | translate}}</th>\n									<th>{{\'APPLICATION_DESCRIPTION\' | translate}}</th>\n									<th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n							  </tr>\n						  </thead>\n							<tbody>\n						    <tr data-ng-repeat="configuration in configurations">\n									<td>{{configuration.name}}</td>\n									<td>{{configuration.description}}</td>\n						      <td>\n										<a class="btn default btn-xs blue-stripe" data-ng-href="/desk/view/{{account.id}}/configurations/settings/{{configuration.id}}">\n											{{ \'APPLICATION_SETTINGS\' | translate}}\n						        </a>\n						        <a class="btn default btn-xs red-stripe" data-ng-click="deleteConfiguration(configuration.name,configuration.id)">\n											{{ \'APPLICATION_DELETE\' | translate }}\n						        </a>\n						      </td>\n						    </tr>\n								<tr data-ng-hide="configurations.length">\n									<td colspan="5" style="text-align:center;">\n										<i>No configuration available</i>\n									</td>\n								</tr>\n						  </tbody>\n					</table>\n					<!-- END TABLE -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/desk/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n          <i class="icon-handbag"></i>\n          <a href="/desk/list">{{ \'APPLICATION_DESK_COM\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{account.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img src="assets/images/media/desk.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{account.name}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{account.remoteUri}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.desk.view.account\')}">\n							<a ng-href="/desk/view/{{account.id}}/account">\n							<i class="icon-user"></i>\n							{{ \'APPLICATION_ACCOUNT\' | translate }} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.desk.view.configurations\') || $state.is(\'main.desk.view.configuration\')}">\n							<a ng-href="/desk/view/{{account.id}}/configurations">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_CONFIGURATIONS\' | translate }} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/desk/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-handbag"></i>\n						<a href="/desk/list">{{ \'APPLICATION_DESK_COM\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n						<form name="forms.formSetting" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.username" required ng-remote-validate="/api/desk/accounts/validate/username"/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formSetting.username.$touched || forms.formSetting.$submitted) && forms.formSetting.username.$error.ngRemoteValidate" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n				        </span>\n							</div>\n							<!-- END USERNAME -->\n\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remoteUri" required ng-remote-validate="/api/desk/accounts/validate/remoteUri"/>\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formSetting.remoteUri.$touched || forms.formSetting.$submitted) && forms.formSetting.remoteUri.$error.ngRemoteValidate" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_DOMAIN\' | translate}}.\n				        </span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START AUTH TYPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.authType.$invalid}">\n								<label class="control-label">{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}</label>\n								<ui-select data-ng-model="item.authType" name="authType" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="type in [\'basic\', \'oauth\'] | filter: $select.search">\n										<div data-ng-bind="type | capitalize | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="forms.formSetting.authType.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- START AUTH TYPE -->\n\n              <!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}" ng-slide-down="item.authType == \'basic\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n								<span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n              <!-- START CONSUMER KEY -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.consumerKey.$invalid}" ng-slide-down="item.authType == \'oauth\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_CONSUMER_KEY\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="consumerKey" placeholder="{{\'APPLICATION_CONSUMER_KEY\' | translate}}" class="form-control" data-ng-model="item.consumerKey" required/>\n								<span data-ng-show="forms.formSetting.consumerKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONSUMER KEY -->\n\n              <!-- START CONSUMER SECRET -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.consumerSecret.$invalid}" ng-slide-down="item.authType == \'oauth\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_CONSUMER_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="consumerSecret" placeholder="{{\'APPLICATION_CONSUMER_SECRET\' | translate}}" class="form-control" data-ng-model="item.consumerSecret" required/>\n								<span data-ng-show="forms.formSetting.consumerSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONSUMER SECRET -->\n\n              <!-- START TOKEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.token.$invalid}" ng-slide-down="item.authType == \'oauth\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="token" placeholder="{{\'APPLICATION_TOKEN\' | translate}}" class="form-control" data-ng-model="item.token" required/>\n								<span data-ng-show="forms.formSetting.token.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TOKEN -->\n\n              <!-- START TOKEN SECRET-->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.tokenSecret.$invalid}" ng-slide-down="item.authType == \'oauth\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_TOKEN_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="tokenSecret" placeholder="{{\'APPLICATION_TOKEN_SECRET\' | translate}}" class="form-control" data-ng-model="item.tokenSecret" required/>\n								<span data-ng-show="forms.formSetting.tokenSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TOKEN SECRET-->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n\n				</wizard>\n\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/freshdesk/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-handbag"></i>\n					<a href="/freshdesk/list">{{ \'APPLICATION_FRESHDESK\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-handbag font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_FRESHDESK\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="accounts.checked.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/freshdesk/wizard">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n						</a>\n					</div>\n					<a class="btn btn-icon-only btn-default" href="#" ng-csv="getAccounts([\'name\',\'username\',\'remoteUri\',\'apiKey\'])" csv-header="[\'Name\', \'Username\', \'Remote Address\', \'Api Key\']" field-separator=";" filename="freshdesk_accounts.csv">\n					<i class="icon-cloud-download"></i></a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<table st-table="displayedFreshdeskAccounts" st-pipe="initList" class="table table-striped table-bordered table-hover">\n					<div class="table-responsive">\n					  <thead>\n							<tr>\n								<th colspan="7">\n									<div class="row">\n										<div class="col-md-6">\n											<ui-select class="input-xsmall" ng-model="conf.accountsByPage" theme="bootstrap" ng-disabled="disabled">\n												<ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n												<ui-select-choices repeat="accountByPage in accountsByPage | filter: $select.search">\n													<div ng-bind-html="accountByPage.name | highlight: $select.search"></div>\n												</ui-select-choices>\n											</ui-select>\n										</div>\n										<div class="col-md-6">\n											<div class="input-group input-medium pull-right">\n												<input st-search placeholder="{{ \'APPLICATION_SEARCH\' | translate }}" class="form-control" type="search" />\n												<span class="input-group-addon">\n													<i class="fa fa-search"></i>\n												</span>\n											</div>\n										</div>\n									</div>\n								</th>\n							</tr>\n						  <tr>\n								<th class="small-cells" style="text-align: center; vertical-align: middle"><input type="checkbox" ng-change="check(account, checked)" checklist-model checklist-value="id"></th>\n						    <th st-sort="name">{{ \'APPLICATION_NAME\' | translate }}</th>\n						    <th st-sort="username">{{ \'APPLICATION_EMAIL\' | translate }}</th>\n								<th st-sort="remoteUri">{{ \'APPLICATION_REMOTE_ADDRESS\' | translate }}</th>\n								<th>{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n								<th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n						  </tr>\n					  </thead>\n					  <tbody>\n					    <tr data-ng-repeat="account in displayedFreshdeskAccounts" class="animate-repeat">\n								<td style="text-align: center; vertical-align: middle"><input type="checkbox" checklist-model="accounts.checked" checklist-value="account.id"></td>\n					      <td>{{account.name}}</td>\n					      <td>{{account.username}}</td>\n								<td>{{account.remoteUri}}</td>\n								<td>{{account.description}}</td>\n					      <td>\n					        <a class="btn default btn-xs blue-stripe" data-ng-href="/freshdesk/view/{{account.id}}/account">\n										{{ \'APPLICATION_EDIT\' | translate }}\n					        </a>\n									<a class="btn default btn-xs green-stripe" data-ng-click="checkAccount(account.id)">\n										{{ \'APPLICATION_CHECK\' | translate }}\n					        </a>\n					        <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(account.name,account.id)">\n										{{ \'APPLICATION_DELETE\' | translate }}\n					        </a>\n					      </td>\n					    </tr>\n							<tr data-ng-hide="displayedFreshdeskAccounts.length">\n								<td colspan="7" style="text-align:center;">\n									<i>No account available</i>\n								</td>\n							</tr>\n					  </tbody>\n					  <tfoot>\n							<tr>\n								<td/>\n						    <td>\n									<div class="input-icon right">\n										<i class="fa fa-search"></i>\n										<input st-search="name" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_NAME\' | translate | lowercase}}" class="form-control" type="search"/>\n									</div>\n						    </td>\n						    <td>\n									<div class="input-icon right">\n										<i class="fa fa-search"></i>\n										<input st-search="email" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_EMAIL\' | translate | lowercase}}" class="form-control" type="search"/>\n									</div>\n						    </td>\n						    <td>\n									<div class="input-icon right">\n										<i class="fa fa-search"></i>\n										<input st-search="remoteUri" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_REMOTE_ADDRESS\' | translate | lowercase}}" class="form-control" type="search"/>\n									</div>\n						    </td>\n						    <td/>\n								<td/>\n						  </tr>\n					    <tr>\n					      <td colspan="7" class="text-center">\n									<div class="pagination" st-pagination st-items-by-page="conf.accountsByPage.value" st-displayed-pages="7"></div>\n					      </td>\n					    </tr>\n					  </tfoot>\n					</div>\n				</table>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/freshdesk/view/view.account.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START API KEY -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.apiKey.$invalid}">\n								<label class="control-label">{{\'APPLICATION_API_KEY\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="apiKey" placeholder="{{\'APPLICATION_API_KEY\' | translate}}" class="form-control" data-ng-model="account.apiKey" required/>\n								<span data-ng-show="forms.formSetting.apiKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END API KEY -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/freshdesk/view/view.configuration.html",'<div class="row" data-ng-init="initConfiguration()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_CONFIGURATION\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createConfiguration()">\n	        <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="formValidation(formsConfiguration.info.$valid)">\n							<form name="formsConfiguration.info" novalidate>\n								<!-- START NAME -->\n								<div class="form-group" data-ng-class="{\'has-error\': formsConfiguration.info.$submitted && formsConfiguration.info.name.$invalid}">\n									<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="configuration.name" required/>\n									<span data-ng-show="formsConfiguration.info.name.$invalid && formsConfiguration.info.$submitted" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END NAME -->\n								<!-- START DESCRIPTION -->\n								<div class="form-group">\n									<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n									<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="configuration.description"/>\n								</div>\n								<!-- END DESCRIPTION -->\n\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n							</form>\n						</wz-step>\n\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/freshdesk/view/view.configurationSettings.html",'<div class="row" data-ng-init="getConfiguration();getVariables();getFields();">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\n					</li>\n          <li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\n					</li>\n          <li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- SUBJECT TAB -->\n					<div class="tab-pane ui-padding active" id="tab_1_1">\n            <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by blank space:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemSubject()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n	            <div class="row" data-ng-repeat="subjectItem in subjectConfig">\n	              <div class="col-md-3">\n	                <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n	                  <ui-select-choices repeat="item in fieldType | filter: $select.search">\n	                    <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\n	                <div class="form-group">\n	                  <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\n	                </div>\n	              </div>\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END SUBJECT TAB -->\n          <!-- DESCRIPTION TAB -->\n					<div class="tab-pane ui-padding" id="tab_1_2">\n						<div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by new line:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemDescription()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n							<div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\n								<!-- <pre>\n									{{descriptionItem|json}}\n								</pre> -->\n	              <div class="col-md-2">\n	                <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n	                  <ui-select-choices repeat="item in descFieldType | filter: $select.search">\n	                    <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\n	                <div class="form-group">\n	                  <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\n	                </div>\n	              </div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n									<input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\n								</div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n									<ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n	                  <ui-select-choices repeat="item in fieldType | filter: $select.search">\n	                    <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n								</div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'string\'">\n									<input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\n								</div>\n	              <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'variable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END DESCRIPTION TAB -->\n          <!-- FIELDS TAB -->\n					<div class="tab-pane ui-padding" id="tab_1_3">\n						<div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemField()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n	            <div class="row" data-ng-repeat="fieldItem in fieldConfig">\n	              <div class="col-md-3">\n	                <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\n	                  <ui-select-choices repeat="item.name as item in accountFields | filter: $select.search">\n	                    <div ng-bind-html="item.label | highlight: $select.search"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\n	                <div class="form-group">\n										<ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected[0]}}</ui-select-match>\n		                  <ui-select-choices repeat="item[0] as item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\n		                    <div ng-bind-html="item[0] | highlight: $select.search"></div>\n		                  </ui-select-choices>\n		                </ui-select>\n	                </div>\n	              </div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\n									<div class="form-group">\n										<ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n		                  <ui-select-choices repeat="item in fieldType | filter: $select.search">\n		                    <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n		                  </ui-select-choices>\n		                </ui-select>\n									</div>\n								</div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\n	                <div class="form-group">\n										<input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\n	                </div>\n	              </div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\n	                <div class="form-group">\n										<ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END FIELDS TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/freshdesk/view/view.configurations.html",'<div ui-view class="profile-content">\n	<div class="row" data-ng-init="getConfigurations()">\n		<div class="col-md-12">\n			<div class="portlet light">\n				<div class="portlet-title  tabbable-line">\n					<div class="caption caption-md">\n						<i class="icon-globe theme-font hide"></i>\n						<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATIONS\' | translate}}</span>\n					</div>\n					<div class="actions">\n						<div class="btn-group">\n							<a class="btn green-jungle " href="/freshdesk/view/{{account.id}}/configuration" data-toggle="dropdown">\n								<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}\n							</a>\n						</div>\n					</div>\n				</div>\n				<div class="portlet-body">\n					<!-- START TABLE -->\n					<table class="table table-striped table-bordered table-hover">\n						  <thead>\n							  <tr>\n							    <th>{{\'APPLICATION_NAME\' | translate}}</th>\n									<th>{{\'APPLICATION_DESCRIPTION\' | translate}}</th>\n									<th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n							  </tr>\n						  </thead>\n							<tbody>\n						    <tr data-ng-repeat="configuration in configurations">\n									<td>{{configuration.name}}</td>\n									<td>{{configuration.description}}</td>\n						      <td>\n										<a class="btn default btn-xs blue-stripe" data-ng-href="/freshdesk/view/{{account.id}}/configurations/settings/{{configuration.id}}">\n											{{ \'APPLICATION_SETTINGS\' | translate}}\n						        </a>\n						        <a class="btn default btn-xs red-stripe" data-ng-click="deleteConfiguration(configuration.name,configuration.id)">\n											{{ \'APPLICATION_DELETE\' | translate }}\n						        </a>\n						      </td>\n						    </tr>\n								<tr data-ng-hide="configurations.length">\n									<td colspan="5" style="text-align:center;">\n										<i>No configuration available</i>\n									</td>\n								</tr>\n						  </tbody>\n					</table>\n					<!-- END TABLE -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/freshdesk/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n          <i class="icon-handbag"></i>\n          <a href="/freshdesk/list">{{ \'APPLICATION_FRESHDESK\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{account.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img src="assets/images/media/freshdesk.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{account.name}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{account.remoteUri}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.freshdesk.view.account\')}">\n							<a ng-href="/freshdesk/view/{{account.id}}/account">\n							<i class="icon-user"></i>\n							{{ \'APPLICATION_ACCOUNT\' | translate }} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.freshdesk.view.configurations\') || $state.is(\'main.freshdesk.view.configuration\')}">\n							<a ng-href="/freshdesk/view/{{account.id}}/configurations">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_CONFIGURATIONS\' | translate }} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/freshdesk/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-handbag"></i>\n						<a href="/freshdesk/list">{{ \'APPLICATION_FRESHDESK\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n						<form name="forms.formSetting" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.username" required ng-remote-validate="/api/freshdesk/accounts/validate/username"/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formSetting.username.$touched || forms.formSetting.$submitted) && forms.formSetting.username.$error.ngRemoteValidate" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n				        </span>\n							</div>\n							<!-- END USERNAME -->\n\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remoteUri" required ng-remote-validate="/api/freshdesk/accounts/validate/remoteUri"/>\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n                <span data-ng-show="(forms.formSetting.remoteUri.$touched || forms.formSetting.$submitted) && forms.formSetting.remoteUri.$error.ngRemoteValidate" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_DOMAIN\' | translate}}.\n				        </span>\n							</div>\n							<!-- END USERNAME -->\n\n              <!-- START API KEY -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.apiKey.$invalid}">\n								<label class="control-label">{{\'APPLICATION_API_KEY\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="apiKey" placeholder="{{\'APPLICATION_API_KEY\' | translate}}" class="form-control" data-ng-model="item.apiKey" required/>\n								<span data-ng-show="forms.formSetting.apiKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END API KEY -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n\n				</wizard>\n\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/iframe/view/view.html",'<!-- BEGIN PAGE CONTENT-->\r\n<div class="row" data-ng-init="initView()">\r\n	<div class="col-md-12">\r\n		<div class="page-bar">\r\n			<ul class="page-breadcrumb">\r\n				<li>\r\n					<i class="icon-rocket"></i>\r\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\r\n					<i class="fa fa-angle-right"></i>\r\n				</li>\r\n				<li>\r\n					<i class="fa fa-chrome"></i>\r\n					<a href="#" data-ng-if="!Auth.isAgent()">{{ \'APPLICATION_IFRAME\' | translate }}</a>\r\n					<a href="#" data-ng-if="Auth.isAgent()">{{ iframe.title || iframe.name}}</a>\r\n				</li>\r\n			</ul>\r\n		</div>\r\n\r\n		<!-- BEGIN PROFILE SIDEBAR -->\r\n		<div class="profile-sidebar" data-ng-if="!Auth.isAgent()">\r\n			<!-- PORTLET MAIN -->\r\n			<div class="portlet light profile-sidebar-portlet">\r\n				<!-- SIDEBAR USERPIC -->\r\n				<div class="profile-image">\r\n					<img src="assets/images/media/iframe.png" class="img-responsive">\r\n				</div>\r\n				<!-- END SIDEBAR USERPIC -->\r\n				<!-- SIDEBAR USER TITLE -->\r\n				<div class="profile-usertitle">\r\n					<div class="profile-usertitle-name">\r\n						{{iframe.title}}\r\n					</div>\r\n					<div class="profile-usertitle-job">\r\n						{{ \'APPLICATION_IFRAME\' | translate }}\r\n					</div>\r\n				</div>\r\n				<!-- END SIDEBAR USER TITLE -->\r\n			</div>\r\n			<!-- END PORTLET MAIN -->\r\n		</div>\r\n		<!-- END BEGIN PROFILE SIDEBAR -->\r\n		<!-- BEGIN PROFILE CONTENT -->\r\n		<div class="profile-content" data-ng-if="!Auth.isAgent()">\r\n			<div class="row">\r\n				<div class="col-md-12">\r\n					<div class="portlet light">\r\n						<div class="portlet-title tabbable-line">\r\n							<div class="caption caption-md">\r\n								<i class="icon-globe theme-font hide"></i>\r\n								<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_IFRAME\' | translate}}</span>\r\n							</div>\r\n							<ul class="nav nav-tabs">\r\n								<li class="active">\r\n									<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\r\n								</li>\r\n							</ul>\r\n						</div>\r\n						<div class="portlet-body">\r\n							<div class="tab-content">\r\n								<!-- GENERAL TAB -->\r\n								<div class="tab-pane active" id="tab_1_1">\r\n									<form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\r\n										<!-- START NAME -->\r\n										<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\r\n											<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\r\n											<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="iframe.title" required/>\r\n											<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\r\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\r\n											</span>\r\n										</div>\r\n										<!-- END NAME -->\r\n\r\n										<!-- START REMOTE ADDRESS -->\r\n										<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\r\n											<label class="control-label">{{\'APPLICATION_URL\' | translate}} <span class="required" aria-required="true">*</span></label>\r\n											<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="iframe.remoteUri" required />\r\n											<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\r\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\r\n											</span>\r\n										</div>\r\n										<!-- END USERNAME -->\r\n\r\n										<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}" />\r\n									</form>\r\n								</div>\r\n								<!-- END GENERAL TAB -->\r\n\r\n							</div>\r\n						</div>\r\n					</div>\r\n				</div>\r\n			</div>\r\n		</div>\r\n		<!-- END PROFILE CONTENT -->\r\n\r\n		<div class="row" data-ng-if="Auth.isAgent()">\r\n			<div class="col-md-12">\r\n				<iframe ng-if="url" style="height: 600px" src="{{url}}" />\r\n			</div>\r\n		</div>\r\n\r\n	</div>\r\n</div>\r\n<!-- END PAGE CONTENT-->\r\n'),a.put("app/integration/list/list.html",'\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-game-controller"></i>\n					<a href="/integrations/list">{{ \'APPLICATION_INTEGRATIONS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initList()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-eye font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_INTEGRATIONS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n				  <span class="btn green-jungle btn-file">\n            <span> <i class="icon-plus"></i> New App </span>\n            <input type="file" accept=".zip" nv-file-select="" uploader="uploader"/>\n          </span>\n          <a class="btn btn-icon-only btn-default" href="#" ng-csv="displayedIntegrations" filename="integrations.csv">\n					<i class="icon-cloud-download"></i></a>\n					<a class="btn btn-icon-only btn-default fullscreen" href="#"></a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<table st-table="displayedIntegrations" st-safe-src="integrations" class="table table-striped table-bordered table-hover">\n					<div class="table-responsive">\n					  <thead>\n							<tr>\n								<th colspan="6">\n									<div class="row">\n										<div class="col-md-6">\n											<select class="form-control input-small select2me" data-ng-model="integrationsByPage">\n												<option value="10">10</option>\n												<option value="25">25</option>\n												<option value="50">50</option>\n												<option value="{{integrations.length}}">{{ \'APPLICATION_ALL\' | translate }}</option>\n											</select>\n										</div>\n										<div class="col-md-6">\n											<div class="input-group input-medium pull-right">\n												<input st-search placeholder="{{ \'APPLICATION_SEARCH\' | translate }}" class="form-control" type="search" />\n												<span class="input-group-addon">\n													<i class="fa fa-search"></i>\n												</span>\n											</div>\n										</div>\n									</div>\n								</th>\n							</tr>\n						  <tr>\n								<th st-sort="id" width="5%" st-sort-default="reverse">{{ \'APPLICATION_ID\' | translate }}</th>\n						    <th st-sort="fullname">{{ \'APPLICATION_NAME\' | translate }}</th>\n								<th st-sort="name">{{ \'APPLICATION_FILENAME\' | translate }}</th>\n								<th st-sort="name">{{ \'APPLICATION_VERSION\' | translate }}</th>\n						    <th st-sort="name">{{ \'APPLICATION_DESCRIPTION\' | translate }}</th>\n						    <th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n						  </tr>\n					  </thead>\n					  <tbody>\n					    <tr data-ng-repeat="integration in displayedIntegrations">\n								<td>{{integration.id}}</td>\n								<td>{{integration.name}}</td>\n								<td>{{integration.filename}}</td>\n								<td>{{integration.version}}</td>\n					      <td>{{integration.description}}</td>\n								<td>\n									<span class="btn default btn-xs blue-stripe btn-file">\n				            <span> {{ \'APPLICATION_UPDATE\' | translate }} </span>\n				            <input type="file" accept=".zip" nv-file-select="" uploader="uploader"/>\n				          </span>\n					        <a class="btn default btn-xs red-stripe" data-ng-click="deleteItem(integration.name, integration.id)">\n										{{ \'APPLICATION_DELETE\' | translate }}\n					        </a>\n					      </td>\n					    </tr>\n							<tr data-ng-hide="integrations.length">\n								<td colspan="6" style="text-align:center;">\n									<i>No integrations available</i>\n								</td>\n							</tr>\n					  </tbody>\n					  <tfoot>\n							<tr>\n								<td>\n									<div class="input-icon right">\n										<i class="fa fa-search"></i>\n										<input st-search="id" class="form-control" type="search"/>\n									</div>\n						    </td>\n						    <td>\n									<div class="input-icon right">\n										<i class="fa fa-search"></i>\n										<input st-search="name" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_NAME\' | translate | lowercase}}" class="form-control" type="search"/>\n									</div>\n						    </td>\n						    <td>\n									<div class="input-icon right">\n										<i class="fa fa-search"></i>\n										<input st-search="filename" placeholder="{{ \'APPLICATION_SEARCH\' | translate }} {{ \'APPLICATION_BY\' | translate | lowercase }} {{ \'APPLICATION_FILENAME\' | translate | lowercase}}" class="form-control" type="search"/>\n									</div>\n						    </td>\n								<td>\n						    </td>\n								<td>\n						    </td>\n								<td>\n						    </td>\n						  </tr>\n					    <tr>\n					      <td colspan="6" class="text-center">\n					        <div st-pagination class="pagination" st-items-by-page="integrationsByPage" st-displayed-pages="7"></div>\n					      </td>\n					    </tr>\n					  </tfoot>\n				</div>\n				</table>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/jscripty/project/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PROJECT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/jscripty/project/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n        <li>\n          <i class="fa fa-slack"></i>\n          <a href="/jscripty/projects/list">{{ \'APPLICATION_PROJECTS\' | translate }}</a>\n        </li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_PROJECTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions" ng-show="!Auth.isAgent()">\n					<div class="btn-group">\n						<a class="btn btn-default" href="#" data-ng-click="gridOptions.getPage();">\n							<i class="icon-reload"></i>\n						</a>\n					</div>\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_PROJECT\' | translate }}\n						</a>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n\n					<!-- <div class="table-responsive"> -->\n\n\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/jscripty/project/report/report.detail.html",'<div class="portlet light bordered" data-ng-init="getProjectDetail();initView()">\n<div class="portlet-title">\n<div class="caption font-green-sharp">\n<i class="fa fa-list font-green-sharp"></i>\n<span class="caption-subject">{{ \'APPLICATION_SUMMARY\' | translate }}</a> </span>\n</div>\n<div class="actions">\n <div class="btn-group">\n <button class="btn btn-icon-only btn-primary"  data-ng-click="pdf(\'header\',projectDetail)">\n	 <i class="fa fa-download"></i>\n </button>\n <!-- <button class="btn btn-icon-only btn-default"  data-ng-click="accordion.expandAll()">\n	 <i class="fa fa-folder-open-o"></i>\n </button>\n <button class="btn btn-icon-only btn-default"  data-ng-click="accordion.collapseAll()">\n	 <i class="fa fa-folder"></i>\n </button> -->\n </div>\n</div>\n</div>\n<div id=\'detail\' class="portlet-body">\n	<div class="alert alert-success text-center" ng-show="!projectDetail.length">\n			<h4>{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</h4>\n	</div>\n	<div class="row" ng-show="projectDetail.length">\n		<div class="col-md-10 col-md-offset-1">\n			<div id="header" class="panel panel-info">\n				<div  class="panel-heading">\n					<strong>Project Name:	 </strong>{{project.name}}<br>\n					<strong>Project Id:	 </strong>{{project.id}}<br>\n					<strong>Completed:	 </strong>{{projectStats.completed}}<br>\n					<strong>Incomplete:	 </strong>{{projectStats.incomplete}}<br>\n					<strong>% Completed:	 </strong>{{projectStats.completed * 100 /(projectStats.completed + projectStats.incomplete) | number:2}}<br>\n				</div>\n			</div><br>\n			<v-accordion class="vAccordion--default" multiple control="accordion">\n				<v-pane id="{{question.question_id }}" ng-repeat="question in projectDetail" expanded="true">\n					<v-pane-header>\n					Question Id: 	{{question.question_id}}\n				</v-pane-header>\n				<v-pane-content>\n						<div ng-class=" {{question.graphData.length > 0}} ? \'col-md-8\' : \'col-md-12\'">\n							<div class="row">\n								<div class="col-md-10 col-md-offset-1 ">\n									<h4><strong>{{question.question_label}}</strong> : {{question.question_text}}</h4>\n									<br><br>\n									<table ng-if="question.choices.length" class="table  table-hover"  style="table-layout: fixed; width: 100%">\n										<thead>\n											<tr>\n												<th>Response</th>\n												<th> #Response </th>\n												<th> % </th>\n											</tr>\n										</thead>\n										<tbody>\n											<tr ng-if="!choice.other_option" ng-repeat="choice in question.choices ">\n															<td  style="word-wrap: break-word">{{choice.value}}</td>\n															<td>{{choice.count}}</td>\n															<td>{{choice.percentage | number:2}}</td>\n											</tr>\n										</tbody>\n									</table>\n								</div>\n							</div>\n						<div class="row" ng-if="question.question_other_label">\n						<!-- <div class="row" ng-if="choice.other_option" ng-repeat="choice in question.choices "> -->\n							<!-- <div class="col-md-10 col-md-offset-1 ">\n								<strong>{{choice.value}}</strong> <span class="badge">{{choice.count}}</span><br>\n							</div> -->\n							<!-- accordions can be nested :) -->\n							<v-accordion >\n								<v-pane >\n									<!-- ng-repeat="subpane in pane.subpanes" ng-disabled="subpane.isDisabled" -->\n									<v-pane-header>\n										<strong>{{question.question_other_label}}</strong><br>\n									</v-pane-header>\n									<v-pane-content>\n										<table ng-if="question.choices.length" class="table  table-hover"  style="table-layout: fixed; width: 100%">\n											<thead>\n												<tr>\n													<th>Response</th>\n													<th> #Response </th>\n													<!-- <th> % </th> -->\n												</tr>\n											</thead>\n											<tbody>\n\n												<tr ng-if="choice.other_option" ng-repeat="choice in question.choices ">\n																<td  style="word-wrap: break-word">{{choice.value}}</td>\n																<td>{{choice.count}}</td>\n																<!-- <td>{{choice.percentage | number:2}}</td> -->\n												</tr>\n											</tbody>\n										</table>\n									</v-pane-content>\n								</v-pane>\n							</v-accordion>\n						</div>\n						<div class="row">\n							<div class="col-md-10 col-md-offset-1 ">\n							<h4>	<strong>Total Respondents: {{question.total}}</strong></h4><br>\n							</div>\n						</div>\n						</div>\n						<div class=" col-md-4 pull-right " ng-if="question.graphType == \'bar\' && question.graphData">\n						<canvas  class="chart chart-bar"  chart-data="question.graphData" chart-labels="question.graphLabels" chart-legend="true">\n						</canvas>\n						</div>\n						<div class="col-md-4 pull-right " ng-if="question.graphType == \'pie\'  && question.graphData">\n						<canvas  class="chart chart-pie"  chart-data="question.graphData" chart-labels="question.graphLabels" chart-legend="true">\n						</canvas>\n						</div>\n					</v-pane-content>\n				</v-pane>\n			</v-accordion>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/jscripty/project/report/report.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-edit"></i>\n						<a href="/jscripty/projects/list">{{ \'APPLICATION_JSCRIPTY\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-slack"></i>\n						<a href="/jscripty/projects/list">{{ \'APPLICATION_PROJECTS\' | translate }}</a>\n            <i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-book-open"></i>\n						<a href="">{{ \'APPLICATION_REPORTS\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n				<div class="col-md-12">\n\n				<!-- BEGIN PROFILE SIDEBAR -->\n  					<div class="profile-sidebar">\n	              <div class="portlet light profile-sidebar-portlet">\n										<!-- SIDEBAR USERPIC -->\n										<div class="profile-image">\n												<img src="assets/images/media/report.png" class="img-responsive" >\n										</div>\n										<!-- END SIDEBAR USERPIC -->\n										<!-- SIDEBAR USER TITLE -->\n										<div class="profile-usertitle">\n												<div class="profile-usertitle-name">\n													{{project.name}}[{{project.id}}]\n												</div>\n												<div class="profile-usertitle-job">\n\n												</div>\n										</div>\n										<!-- END SIDEBAR USER TITLE -->\n\n										<!-- SIDEBAR MENU -->\n										<div class="profile-usermenu">\n													<ul class="nav">\n														<li data-ng-class="{active: $state.is(\'main.jscripty.projects.report.sessions\')|| $state.is(\'main.jscripty.projects.report.sessionDetail\')}">\n																	<a data-ng-href=\'/jscripty/projects/report/{{projectId}}/sessions\'>\n						                      	<i class="icon-settings"></i>\n						                        Sessions</a>\n														</li>\n						                <li data-ng-class="{active: $state.is(\'main.jscripty.projects.report.summary\') || $state.is( \'main.jscripty.projects.report.questionDetail\')}">\n																<a data-ng-href=\'/jscripty/projects/report/{{projectId}}/summary\'>\n						          					<i class="fa fa-bar-chart"></i>\n						                      Questions</a>\n						                </li>\n						                <li data-ng-class="{active: $state.is(\'main.jscripty.projects.report.detail\')}">\n																<a data-ng-href=\'/jscripty/projects/report/{{projectId}}/detail\'>\n						    								<i class="fa fa-list"></i>\n						                      Summary</a>\n						                </li>\n						                <li data-ng-class="{active: $state.is(\'main.jscripty.projects.report.inputs\')}">\n																<a data-ng-href=\'/jscripty/projects/report/{{projectId}}/inputs\'>\n						    								<i class="fa fa-edit"></i>\n						                      Inputs</a>\n						                </li>\n													</ul>\n										</div>\n										<!-- END MENU -->\n\n	          	</div>\n\n          	</div>\n\n              <div class="profile-content margin-top-20">\n									<div class="row">\n										<div class="col-md-12">\n														<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">\n															<div class="dashboard-stat2">\n																<div class="display">\n																	<div class="number">\n																		<h3 class="font-green-sharp">{{projectStats.started}}</h3>\n																		<small>Started</small>\n																	</div>\n																	<div class="icon">\n																		<i class="icon-pie-chart"></i>\n																	</div>\n																</div>\n																<div class="progress-info">\n																	<div class="progress">\n																		<span style="width: 100%;" class="progress-bar progress-bar-success green-sharp">\n																		</span>\n																	</div>\n																	<div class="status">\n																	</div>\n																</div>\n															</div>\n														</div>\n														<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">\n															<div class="dashboard-stat2">\n																<div class="display">\n																	<div class="number">\n																		<h3 class="font-red-haze">{{projectStats.incomplete}}</h3>\n																		<small>Incomplete</small>\n																	</div>\n																	<div class="icon">\n																		<i class="icon-chart"></i>\n																	</div>\n																</div>\n																<div class="progress-info">\n																	<div class="progress">\n																		<span style="width: 100%;" class="progress-bar progress-bar-success red-haze">\n																		</span>\n																	</div>\n																	<div class="status">\n																	</div>\n																</div>\n															</div>\n														</div>\n														<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">\n															<div class="dashboard-stat2">\n																<div class="display">\n																	<div class="number">\n																		<h3 class="font-blue-sharp">{{projectStats.completed}}</h3>\n																		<small>Completed</small>\n																	</div>\n																	<div class="icon">\n																		<i class="icon-like"></i>\n																	</div>\n																</div>\n																<div class="progress-info">\n																	<div class="progress">\n																		<span style="width: 100%;" class="progress-bar progress-bar-success blue-sharp">\n																		</span>\n																	</div>\n																	<div class="status">\n																	</div>\n																</div>\n															</div>\n														</div>\n											</div>\n							</div>\n\n	                <div class="row">\n	                  <div ui-view class="col-md-12">\n	                  </div>\n	                  </div>\n              </div>\n      	</div>\n	</div>\n'),a.put("app/jscripty/project/report/report.inputs.html",'<div class="row">\n	<div class="col-md-12">\n				<div class="portlet light bordered" data-ng-init="getQuestionInputs()">\n									<div class="portlet-title">\n										<div class="caption font-green-sharp">\n											<i class="fa fa-edit font-green-sharp"></i>\n											<span class="caption-subject">{{ \'APPLICATION_INPUTS\' | translate }}</a> </span>\n										</div>\n									<div class="tools">\n											<!-- <a href="" class="fullscreen" data-original-title="" title="">\n											</a> -->\n										</div>\n									</div>\n									<div class="portlet-body" >\n										<div ui-grid="gridOptions" ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n											<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n										</div>\n									</div>\n			</div>\n	</div>\n</div>\n'),a.put("app/jscripty/project/report/report.question.detail.html",'<div class="row" data-ng-init="getDetail()">\n	<div class="col-md-12">\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="fa fa-list font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_DETAIL\' | translate }}</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body" >\n				<div class="alert alert-success text-center" ng-show="!questionDetail">\n						<h4>{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</h4>\n				</div>\n				<div class="row  margin-top-20" ng-show="questionDetail">\n					<div class="col-md-10 col-md-offset-1">\n						<div class="panel panel-info" >\n							<div class="panel-heading">\n								<h3 class="panel-title">\n\n									<i class="fa-chart "></i>Question Id: 	{{questionDetail.question_id}}\n							</div>\n							<div class="panel-body">\n								<div class="row">\n									<div class="col-md-12">\n										<h4><strong>{{questionDetail.question_label}}</strong></h4>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-10 col-md-offset-1 ">\n										<strong><h4>{{questionDetail.question_text}}</h4></strong><br>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-6">\n										<div class="row">\n											<div class="col-md-10 col-md-offset-1 ">\n												<!-- <div class="alert alert-success text-center" ng-show="!questionDetail.choices.length">\n														<h4>{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</h4>\n												</div> -->\n												<table ng-if="questionDetail.choices.length" class="table  table-hover" style="table-layout: fixed; width: 100%">\n													<thead>\n														<tr>\n															<th style="width=5%"> Value  </th>\n															<th style="width=5%"> Count </th>\n															<th ng-if="question.graphType != \'PolarArea\'" style="width=5%"> % </th>\n														</tr>\n													</thead>\n													<tbody>\n														<tr ng-if="!choice.other_option" ng-repeat="choice in questionDetail.choices ">\n																		<td style="word-wrap: break-word">{{choice.value}}</td>\n																		<td>{{choice.count}}</td>\n																		<td ng-if="question.graphType != \'PolarArea\'">{{choice.percentage | number:2}}</td>\n														</tr>\n													</tbody>\n												</table>\n										</div>\n										</div>\n									<div class="row" ng-if="choice.other_option" ng-repeat="choice in questionDetail.choices ">\n										<div class="col-md-6 col-md-offset-3 ">\n											<strong><a href="">{{choice.value}}</a> </strong> <span class="badge">{{choice.count}}</span><br>\n\n										</div>\n									</div>\n									<div class="row">\n										<div class="col-md-10 col-md-offset-1 ">\n										<h4>	<strong>Total: {{questionDetail.total}}</strong></h4><br>\n										</div>\n									</div>\n									</div>\n									<div class="col-md-6 pull-right ">\n										<canvas id="base" class="chart-base" chart-type="questionDetail.graphType"\n										chart-data="questionDetail.graphData" chart-labels="questionDetail.graphLabels" chart-legend="true">\n										</canvas>\n										<!-- <button class="btn btn-success btn-sm pull-right" ng-click="toggle(questionDetail)">{{questionDetail.graphType}}</button> -->\n									</div>\n								</div>\n\n					</div>\n\n				</div>\n\n			</div>\n		</div>\n\n			</div>\n			</div>\n		</div>\n</div>\n'),a.put("app/jscripty/project/report/report.session.detail.html",'\n\n<div class="row" data-ng-init="getSessionDetails()">\n			<div class="col-md-12">\n				<div class="portlet light bordered">\n					<div class="portlet-title">\n						<div class="caption font-green-sharp">\n							<i class="fa fa-list font-green-sharp"></i>\n							<span class="caption-subject">{{ \'APPLICATION_DETAIL\' | translate }}</a> </span>\n						</div>\n            <div class="actions">\n             <div class="btn-group">\n               <button class="btn btn-icon-only btn-primary"  data-ng-click="pdf(\'header\',sessionQuestions)">\n                 <i class="fa fa-download"></i>\n               </button>\n               <!-- <button class="btn btn-icon-only btn-default"  data-ng-click="accordion.expandAll()">\n                 <i class="fa fa-plus-square-o"></i>\n               </button>\n               <button class="btn btn-icon-only btn-default"  data-ng-click="accordion.collapseAll()">\n                 <i class="icon-collapse-alt"></i>\n               </button> -->\n             </div>\n           </div>\n					</div>\n					<div class="portlet-body"  style="height: auto;">\n						<div class="row  margin-top-20">\n							<div class="col-md-10 col-md-offset-1">\n								<div id = "header" class="panel panel-info">\n									<div class="panel-heading">\n										<strong>Project Name:	 </strong>{{project.name}}<br>\n										<strong>Project Id:	 </strong>{{project.id}}<br>\n										<strong>Session Id:	 </strong>{{session.session_id}}<br>\n										<strong>Status:	 </strong>{{session.status}}<br>\n										<strong>Started At:	 </strong>{{session.createdAt}}<br>\n										<strong>Closed At:	 </strong>{{session.completedAt}}<br>\n									</div>\n								</div>\n                <v-accordion class="vAccordion--default" multiple control="accordion">\n                  <v-pane id="{{question.question_id }}" ng-repeat=" question in sessionQuestions | orderBy:\'index\'"" expanded="true">\n                    <v-pane-header>\n                      Question Id: 	{{question.question_id}}\n                    </v-pane-header>\n                    <v-pane-content>\n                        <h4><strong>{{question.question_label}}</strong> : {{question.question_text}}</h4>\n                        <div ng-if="question.question_type == \'question\'">\n                        <h4><strong>Answer:	 </strong>{{question.question_answer}}</h4>\n                      </div>\n                      <div ng-if="question.question_other_label">\n                        <h4>\n                       <strong>{{question.question_other_label}}: </strong>\n                         {{question.question_other_answer || \'No Value\'}}\n                       </h4>\n                      </div>\n                      <table class="table  table-hover" ng-if="question.ReportJscriptyInputs.length">\n                        <thead>\n                          <tr>\n                            <th > Label </th>\n                            <th >Answer </th>\n                          </tr>\n                        </thead>\n                        <tbody>\n                          <tr ng-repeat="input in question.ReportJscriptyInputs |orderBy:\'id\'">\n                                  <td>{{input.input_label}}</td>\n                                  <td>{{input.input_value || \'No Value\'}}</td>\n                          </tr>\n                        </tbody>\n                      </table>\n                    </v-pane-content>\n                  </v-pane>\n                </v-accordion>\n								</div>\n							</div>\n	        </div>\n				</div>\n		</div>\n</div>\n'),
+a.put("app/jscripty/project/report/report.sessions.html",'\n	<div class="row" >\n		<div class="col-md-12">\n			<div class="portlet light bordered" data-ng-init="getProjectSessions()">\n								<div class="portlet-title">\n									<div class="caption font-green-sharp">\n										<i class="icon-settings font-green-sharp"></i>\n										<span class="caption-subject">{{ \'APPLICATION_SESSIONS\' | translate }}</a> </span>\n									</div>\n									<div class="actions">\n										<div class="btn-group">\n											<a class="btn btn-default" href="#" data-ng-click="gridOptions.getPage();initView()">\n												<i class="icon-reload"></i>\n											</a>\n										</div>\n									</div>\n								</div>\n								<div class="portlet-body" >\n								<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n									<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n								</div>\n							</div>\n				</div>\n			</div>\n	</div>\n'),a.put("app/jscripty/project/report/report.summary.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light bordered" data-ng-init="getQuestionSummary()">\n							<div class="portlet-title">\n								<div class="caption font-green-sharp">\n									<i class="fa fa-bar-chart font-green-sharp"></i>\n									<span class="caption-subject">{{ \'APPLICATION_QUESTIONS\' | translate }}</a> </span>\n								</div>\n								<div class="actions">\n									<div class="btn-group">\n										<!-- <a class="btn btn-default" href="#" data-ng-click="gridOptions.getPage();initView()">\n											<i class="icon-reload"></i>\n										</a> -->\n									</div>\n								</div>\n							</div>\n							<div class="portlet-body" >\n										<div ui-grid="gridOptions" ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n											<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n										</div>\n							</div>\n				</div>\n	</div>\n</div>\n'),a.put("app/jscripty/project/view/view.html",'<div class="row" data-ng-init="getProject()">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-edit"></i>\n						<a href="/jscripty/projects/list">{{ \'APPLICATION_JSCRIPTY\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-slack"></i>\n						<a href="/jscripty/projects/list">{{ \'APPLICATION_PROJECTS\' | translate }}</a>\n            <i class="fa fa-angle-right"></i>\n					</li>\n          <li>\n						<a ng-href="/jscripty/projects/view/{{jscriptyProject.id}}">{{jscriptyProject.name}}</a>\n          </li>\n				</ul>\n			</div>\n		</div>\n</div>\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n		<div id="geEditor" class="geEditor"></div>\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n<script>\n\n\n</script>\n'),a.put("app/landing/landing.html",'<!-- BEGIN LOGO -->\n<div class="logo">\n  <a href="index.html">\n    <img data-ng-if="settings.defaultLoginLogo || !license.custom" ng-src="assets/images/logo-big.png" alt="logo" />\n    <img data-ng-if="license.custom && !settings.defaultLoginLogo" ng-src="api/settings/logo/login/{{settings.loginLogo ? settings.loginLogo : \'logo-big\'}}" alt="logo" class="custom-login-logo" onError="this.onerror=null;this.src=\'assets/images/logo-big.png\';"/>\n  </a>\n</div>\n<!-- END LOGO -->\n\n<!-- BEGIN LANDING -->\n<div data-ng-init="initLanding()">\n  <div data-ng-show="message" class="col-md-12 page-500" style="padding-bottom: 50px;">\n    <div class="number">\n      Oops!\n    </div>\n    <div class=" details" style="color: white;">\n      <h3>{{message | translate}}.</h3>\n      <p>\n        Please contact your administrator.<br><br>\n      </p>\n    </div>\n  </div>\n</div>\n<!-- END LANDING -->\n\n<div class="copyright">\n  xCALLY Motion v. {{info.version}} | 2016 - {{year + 1}} &copy; Powered by Xenialab <ng-bind-html data-ng-if="license.custom && !settings.defaultFooterWhiteLabel && settings.footerWhiteLabel" ng-bind-html="\'| \'+settings.footerWhiteLabel"></ng-bind-html>\n</div>\n'),a.put("app/login/login.html",'<!-- BEGIN LOGO -->\n<div class="logo" data-ng-init="getInfo()">\n	<a>\n		<img data-ng-if="settings.defaultLoginLogo || !license.custom" ng-src="assets/images/logo-big.png" alt="logo" />\n		<img data-ng-if="license.custom && !settings.defaultLoginLogo" ng-src="api/settings/logo/login/{{settings.loginLogo ? settings.loginLogo : \'logo-big.png\'}}" alt="logo" class="custom-login-logo" onError="this.onerror=null;this.src=\'assets/images/logo-big.png\';"/>\n	</a>\n</div>\n<!-- END LOGO -->\n<!-- BEGIN LOGIN -->\n<div class="content">\n	<!-- BEGIN LOGIN FORM -->\n	<form class="login-form" name="loginForm" data-ng-if="!forgotPassword" data-ng-submit="login(loginForm)" novalidate>\n		<h3 class="form-title">Sign In</h3>\n		<div class="alert alert-success" data-ng-show="recovered">\n			<button class="close" data-close="alert"></button>\n			<span>{{\'MESSAGE_ACCOUNT_RECOVERED\' | translate}}</span>\n		</div>\n		<div class="alert alert-danger" data-ng-class="{\'display-hide\': !loginForm.$submitted || !errorLogin}">\n			<button class="close" data-close="alert"></button>\n			<span>{{ errorLog ? errorLog : (\'MESSAGE_INSERT_USER_OR_PASS\' | translate)}}</span>\n		</div>\n		<div class="form-group" data-ng-class="{\'has-error\': loginForm.$submitted && loginForm.name.$invalid}">\n			<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}</label>\n			<div class="input-icon">\n				<i class="fa fa-user"></i>\n				<input ng-enter="login(loginForm)" class="form-control form-control-solid placeholder-no-fix" type="text" autocomplete="off" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" name="name" ng-model="userLogin.name" required/>\n			</div>\n			<span data-ng-show="loginForm.$submitted && loginForm.name.$invalid" class="help-block">{{\'MESSAGE_REQUIRED_FIELD\' | translate}}</span>\n		</div>\n		<div class="form-group" data-ng-class="{\'has-error\': loginForm.$submitted && loginForm.password.$invalid}">\n			<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}</label>\n			<div class="input-icon">\n				<i class="fa fa-lock"></i>\n				<input ng-enter="login(loginForm)" class="form-control form-control-solid placeholder-no-fix" type="password" autocomplete="off" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" name="password" ng-model="userLogin.password" required/>\n			</div>\n			<span data-ng-show="loginForm.$submitted && loginForm.password.$invalid" class="help-block">{{\'MESSAGE_REQUIRED_FIELD\' | translate}}</span>\n			<span class="help-block"><a href="#" data-ng-click="toggleForgotPassword(true)" class="forget-password">{{\'APPLICATION_FORGOT_PASSWORD\' | translate}}?</a></span>\n		</div>\n		<div class="form-actions">\n			<button type="submit" class="btn btn-success uppercase">{{\'APPLICATION_LOGIN\' | translate}}</button>\n			<label class="rememberme check">\n				<input type="checkbox" data-ng-model="userLogin.remember"> {{\'APPLICATION_REMEMBER_ME\' | translate}}\n			</label>\n			<!-- <label class="rememberme check">\n			<input type="checkbox" name="remember" value="1"/>Remember </label> -->\n			<!-- <a href="javascript:;" id="forget-password" class="forget-password">Forgot Password?</a> -->\n		</div>\n	</form>\n	<form name="forgetForm" data-ng-if="forgotPassword" data-ng-submit="forgetForm.$valid && recover()" novalidate>\n		<h3>{{\'APPLICATION_FORGOT_PASSWORD\' | translate}}?</h3>\n		<p>\n			{{\'APPLICATION_INSERT_EMAIL_TO_RESET\' | translate}}\n		</p>\n		<div class="alert alert-success" data-ng-show="showRecoverMessage">\n			<button class="close" data-close="alert"></button>\n			<span>{{\'MESSAGE_CHECK_YOUR_EMAIL_RECOVER\' | translate}}</span>\n		</div>\n		<div class="form-group" data-ng-class="{\'has-error\': forgetForm.$submitted && forgetForm.email.$invalid}">\n			<label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}</label>\n			<div class="input-icon">\n				<i class="fa fa-envelope"></i>\n				<input class="form-control form-control-solid placeholder-no-fix" type="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" name="email" ng-model="userLogin.email" required/>\n			</div>\n			<span data-ng-show="forgetForm.$submitted && forgetForm.email.$invalid" class="help-block">{{\'MESSAGE_REQUIRED_FIELD\' | translate}}</span>\n		</div>\n		<div class="form-actions">\n			<button type="button" id="back-btn" data-ng-click="toggleForgotPassword(false)" class="btn btn-default">{{\'APPLICATION_BACK\' | translate}}</button>\n			<button type="submit" class="btn btn-success uppercase pull-right">{{\'APPLICATION_SUBMIT\' | translate}}</button>\n		</div>\n	</form>\n		<div class="login-options">\n			<h4>{{\'APPLICATION_FOLLOW_US\' | translate}}</h4>\n			<ul class="social-icons">\n				<li>\n		      <a class="social-icon-color facebook" data-original-title="facebook" href="https://www.facebook.com/xcallymotion" target="_blank"></a>\n		    </li>\n		    <li>\n		      <a class="social-icon-color twitter" data-original-title="Twitter" href="https://twitter.com/xcallymotion" target="_blank"></a>\n		    </li>\n		    <li>\n		      <a class="social-icon-color googleplus" data-original-title="Google Plus" href="https://plus.google.com/+Xcally" target="_blank"></a>\n		    </li>\n		    <li>\n		      <a class="social-icon-color linkedin" data-original-title="Linkedin" href="https://www.linkedin.com/company/xcally" target="_blank"></a>\n		    </li>\n			</ul>\n		</div>\n</div>\n<div class="copyright">\n	xCALLY Motion v. {{info.version}} | 2016 - {{year + 1}} &copy; Powered by Xenialab <ng-bind-html data-ng-if="license.custom && !settings.defaultFooterWhiteLabel && settings.footerWhiteLabel" ng-bind-html="\'| \'+settings.footerWhiteLabel"></ng-bind-html>\n</div>\n<!-- END LOGIN -->\n'),a.put("app/main/about.modal.html",'<div class="center-text">\n<div class="modal-header no-border">\n<button type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <!-- <h3 class="modal-title center-text">{{ \'APPLICATION_ABOUT\' | translate }}</h3> -->\n</div>\n<div class="modal-body" style="padding-top:0px;">\n  <div  class="mbottom20" data-ng-init="getInfo()">\n	<a>\n		<img data-ng-if="settings.defaultLoginLogo || !license.custom" ng-src="assets/images/logo-big-pdf.png" alt="logo" class="about-logo" />\n		<img data-ng-if="license.custom && !settings.defaultLoginLogo" ng-src="api/settings/logo/login/{{settings.loginLogo ? settings.loginLogo : \'logo-big-pdf.png\'}}" alt="logo" class="custom-login-logo about-logo" onError="this.onerror=null;this.src=\'assets/images/logo-big-pdf.png\';"/>\n	</a>\n</div>\n<div class="mbottom20">\n  <b class="sounds-title-icon">xCALLY Motion</b><br>\n  <small>v. {{info.version}}</small><br><br>\n  <small>2016 - {{year + 1}} &copy; Powered by Xenialab</small><br>\n  <small><a href="https://www.xcallymotion.com">www.xcallymotion.com</a></small><br>\n  <ng-bind-html data-ng-if="license.custom && !settings.defaultFooterWhiteLabel && settings.footerWhiteLabel" ng-bind-html="settings.footerWhiteLabel"></ng-bind-html>\n</div>\n<div class="mbottom20">\n  <span><b>{{\'APPLICATION_USEFUL_LINKS\' | translate}}</b></span><br>\n  <small><a href="https://wiki.xcallymotion.com/" target="_blank">Wiki</a></small><br>\n  <small><a href="http://www.xcally.com/bar/multichannel/Setup.msi" target="_blank">Phonebar Download</a></small><br>\n  <small><a href="http://www.xcally.com/support/eula-xcally-license-en.pdf" target="_blank">EULA</a></small><br>\n</div>\n  <div class="login-options" style=\'margin-bottom:0px;\'>\n  <h4>{{\'APPLICATION_FOLLOW_US\' | translate}}</h4>\n  <ul class="social-icons">\n    <li>\n      <a class="social-icon-color facebook" data-original-title="facebook" href="https://www.facebook.com/xcallymotion" target="_blank"></a>\n    </li>\n    <li>\n      <a class="social-icon-color twitter" data-original-title="Twitter" href="https://twitter.com/xcallymotion" target="_blank"></a>\n    </li>\n    <li>\n      <a class="social-icon-color googleplus" data-original-title="Google Plus" href="https://plus.google.com/+Xcally" target="_blank"></a>\n    </li>\n    <li>\n      <a class="social-icon-color linkedin" data-original-title="Linkedin" href="https://www.linkedin.com/company/xcally" target="_blank"></a>\n    </li>\n  </ul>\n</div>\n<div class="login-options" style=\'margin-bottom:0px;\'>\n<h4>{{\'APPLICATION_CONTACT_US\' | translate}}:</h4>\n<div class="float-right" style="margin-top:10px;margin-bottom:10px;">\n  <a href="mailto:[email-masked]">[email-masked]</a></small>\n</div>\n</div>\n</div>\n</div>\n<!-- <div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div> -->\n'),a.put("app/main/audioFileDownload.play.modal.html",'<!-- <div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title | translate" class="modal-title"></h4>\n</div> -->\n<div class="modal-body" style="text-align:center;">\n  <audio controls autoplay ng-src="{{audio}}" preload="none">\n    Your browser does not support the audio tag.</audio>\n</div>\n<!-- <div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div> -->\n'),a.put("app/main/chooseContact.modal.html",'<div class="modal-header" data-ng-init="getContacts()">\n  <h3 class="modal-title">{{ \'APPLICATION_CHOOSE_CONTACT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <table st-table="rowCollection" class="table table-striped">\n  	<tbody>\n      <tr>\n        <th>{{\'APPLICATION_NAME\' | translate}}</th>\n        <th>{{\'APPLICATION_LIST\' | translate}}</th>\n        <th></th>\n      </tr>\n  	<tr ng-repeat="contact in contacts">\n  		<td>{{contact.firstName}} {{contact.lastName || \'\'}}</td>\n  		<td>{{contact.List.name}}</td>\n  		<td>\n        <button class="btn default btn-xs green-stripe" data-ng-click="open(contact)">\n          {{ \'APPLICATION_OPEN\' | translate}}\n        </button>\n      </td>\n  	</tr>\n    <tr data-ng-hide="contacts.length">\n      <td colspan="3" style="text-align:center;">\n        <i>{{ \'MESSAGE_NO_CONTACTS_AVAILABLE\' | translate }}</i>\n      </td>\n    </tr>\n  	</tbody>\n  </table>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="open()"><i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONTACT\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/main/closeEditedTab.modal.html",'<div class="modal-header" data-ng-init="getContacts()">\n  <h3 class="modal-title">{{ \'APPLICATION_WARNING\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <p>{{\'MESSAGE_CLOSE_EDITED_TAB\' | translate}}</p>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/main/closeEditedTab.modal.jscripty.html",' <div class="modal-header" data-ng-init="init()">\n  <h3  class="modal-title">{{ \'APPLICATION_WARNING\' | translate }}</h3>\n  <!-- <h3   ng-if="projectStatus == \'incomplete\'" class="modal-title">{{ \'APPLICATION_WARNING\' | translate }}</h3> -->\n\n</div>\n<div   class="modal-body">\n<!-- <div  ng-if="projectStatus == \'incomplete\'" class="modal-body"> -->\n  <p>{{\'MESSAGE_CLOSE_INCOMPLETE\' | translate}}</p>\n</div>\n\n\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/main/cm.disposition.modal.html",'<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title | translate" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate data-ng-init="initDisposition()">\n  <div class="form-group">\n    <ui-select data-ng-model="item.disposition" name="list" theme="bootstrap" data-ng-disabled="!dispositions.length" required>\n      <ui-select-match placeholder="{{\'APPLICATION_DISPOSITION\' | translate}}">{{$select.selected.name}}</ui-select-match>\n      <ui-select-choices repeat="disposition.name as disposition in dispositions | filter: $select.search">\n        <div ng-bind-html="disposition.name | highlight: $select.search"></div>\n      </ui-select-choices>\n    </ui-select>\n  </div>\n  <div class="note note-warning" data-ng-hide="dispositions.length">\n    <h4 class="block">Warning!</h4>\n    <p>\n      {{ \'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate }}\n    </p>\n  </div>\n</form>\n  <!-- <div ng-if="modal.html" ng-bind-html="modal.html"></div> -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="ok()"  data-ng-disabled="!item.disposition">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n  <!-- <button ng-repeat="button in modal.buttons" ng-class="button.classes" ng-click="button.click($event)" ng-bind="button.text" class="btn"></button> -->\n</div>\n'),a.put("app/main/company.info.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_COMPANY_INFO\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <div class="row">\n  	<div class="col-md-12">\n  		<div class="portlet light">\n  			<div class="portlet-title tabbable-line">\n  				<ul class="nav nav-tabs">\n  					<li class="active">\n  						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n  					</li>\n  					<li>\n  						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_ADDRESS\' | translate}}</a>\n  					</li>\n  					<li>\n  						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_SHIPMENT_ADDRESS\' | translate}}</a>\n  					</li>\n  				</ul>\n  			</div>\n\n  			<div class="portlet-body">\n  				<div class="tab-content">\n  					<!-- GENERAL TAB -->\n  					<div class="tab-pane active" id="tab_1_1">\n  						<form name="forms.general" data-ng-submit="forms.general.$valid && updateCompany()" novalidate>\n  							<div class="row">\n  								<div class="col-md-6">\n  									<!-- START NAME -->\n  									<div class="form-group">\n  										<label class="control-label">{{\'APPLICATION_NAME\' | translate}}</label>\n  										<input readonly type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="company.name" required/>\n  									</div>\n  									<!-- END NAME -->\n\n  									<!-- START VAT -->\n  									<div class="form-group">\n  										<label class="control-label">{{\'APPLICATION_VAT\' | translate}}</label>\n  										<input readonly type="text" name="vat" placeholder="{{\'APPLICATION_VAT\' | translate}}" class="form-control" data-ng-model="company.vat"/>\n  									</div>\n  									<!-- END VAT -->\n\n  									<!-- START COMPANYID -->\n  									<div class="form-group">\n  										<label class="control-label">{{\'APPLICATION_COMPANY_ID\' | translate}}</label>\n  										<input readonly type="text" name="companyId" placeholder="{{\'APPLICATION_COMPANY_ID\' | translate}}" class="form-control" data-ng-model="company.companyId"/>\n  									</div>\n  									<!-- END COMPANYID -->\n\n  									<!-- START WEBSITE -->\n  									<div class="form-group">\n  										<label class="control-label">{{\'APPLICATION_WEBSITE\' | translate}}</label>\n  										<input readonly type="text" name="website" placeholder="{{\'APPLICATION_WEBSITE\' | translate}}" class="form-control" data-ng-model="company.website"/>\n  									</div>\n  									<!-- END WEBSITE -->\n\n  									<!-- START EMAIL -->\n  									<div class="form-group" >\n  										<label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}</label>\n  										<input readonly type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="company.email"/>\n  									</div>\n  									<!-- END EMAIL -->\n  								</div>\n  								<div class="col-md-6">\n  									<!-- START PHONE -->\n  									<div class="form-group">\n  										<label class="control-label">{{\'APPLICATION_PHONE\' | translate}}</label>\n  										<input readonly type="text" name="phone" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="company.phone"/>\n  									</div>\n  									<!-- END PHONE -->\n\n  									<!-- START FAX -->\n  									<div class="form-group" >\n  										<label class="control-label">{{\'APPLICATION_FAX\' | translate}}</label>\n  										<input readonly type="text" name="fax" placeholder="{{\'APPLICATION_FAX\' | translate}}" class="form-control" data-ng-model="company.fax"/>\n  									</div>\n  									<!-- END FAX -->\n\n  									<!-- START TYPE -->\n  									<div class="form-group" >\n  										<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}</label>\n  										<input readonly type="text" name="type" placeholder="{{\'APPLICATION_TYPE\' | translate}}" class="form-control" data-ng-model="company.type"/>\n  									</div>\n  									<!-- END TYPE -->\n\n  									<!-- START DESCRIPTION -->\n  									<div class="form-group">\n  										<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n  										<textarea readonly type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="company.description"></textarea>\n  									</div>\n  									<!-- END DESCRIPTION -->\n  								</div>\n  							</div>\n  						</form>\n  					</div>\n  					<!-- END ADVANCED TAB -->\n  					<div class="tab-pane" id="tab_1_2">\n  						<form name="forms.address" novalidate>\n  							<!-- START STREET -->\n  							<div class="form-group" >\n  								<label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n  								<input readonly type="text" name="street" placeholder="{{\'APPLICATION_STREET\' | translate}}" class="form-control" data-ng-model="company.street"/>\n  							</div>\n  							<!-- END STREET -->\n\n  							<!-- START POSTALCODE -->\n  							<div class="form-group" >\n  								<label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n  								<input readonly type="text" name="postalCode" placeholder="{{\'APPLICATION_POSTALCODE\' | translate}}" class="form-control" data-ng-model="company.postalCode"/>\n  							</div>\n  							<!-- END POSTALCODE -->\n\n  							<!-- START CITY -->\n  							<div class="form-group" >\n  								<label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n  								<input readonly type="text" name="city" placeholder="{{\'APPLICATION_CITY\' | translate}}" class="form-control" data-ng-model="company.city"/>\n  							</div>\n  							<!-- END CITY -->\n  							<!-- START COUNTRY -->\n  							<div class="form-group" >\n  								<label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n  								<input readonly type="text" name="country" placeholder="{{\'APPLICATION_COUNTRY\' | translate}}" class="form-control" data-ng-model="company.country"/>\n  							</div>\n  							<!-- END COUNTRY -->\n  						</form>\n  					</div>\n  					<div class="tab-pane" id="tab_1_3">\n  						<form name="forms.shipmentAddress" novalidate>\n  							<!-- START STREET -->\n  							<div class="form-group" >\n  								<label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n  								<input readonly type="text" name="sStreet" placeholder="{{\'APPLICATION_STREET\' | translate}}" class="form-control" data-ng-model="company.sStreet"/>\n  							</div>\n  							<!-- END STREET -->\n\n  							<!-- START POSTALCODE -->\n  							<div class="form-group" >\n  								<label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n  								<input readonly type="text" name="sPostalCode" placeholder="{{\'APPLICATION_POSTALCODE\' | translate}}" class="form-control" data-ng-model="company.sPostalCode"/>\n  							</div>\n  							<!-- END POSTALCODE -->\n\n  							<!-- START CITY -->\n  							<div class="form-group" >\n  								<label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n  								<input readonly type="text" name="sCity" placeholder="{{\'APPLICATION_CITY\' | translate}}" class="form-control" data-ng-model="company.sCity"/>\n  							</div>\n  							<!-- END CITY -->\n  							<!-- START COUNTRY -->\n  							<div class="form-group">\n  								<label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n  								<input readonly type="text" name="sCountry" placeholder="{{\'APPLICATION_COUNTRY\' | translate}}" class="form-control" data-ng-model="company.sCountry"/>\n  							</div>\n  							<!-- END COUNTRY -->\n  						</form>\n  					</div>\n  				</div>\n  			</div>\n  		</div>\n  	</div>\n  </div>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="close()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/main/customDateFilter.modal.html",'<div class="modal-body">\n  <uib-datepicker ng-model="dateTime.filterDate"\n      class="well well-sm">\n  </uib-datepicker>\n  <uib-timepicker data-ng-if="hasTime" ng-model="dateTime.time" show-meridian="false"></uib-timepicker>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="setFilterDate(dateTime.filterDate)">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancelDateFilter()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/main/customDateFilterHeader.html",'<input class="ui-grid-filter-input date-time-filter-buttons pointer-cursor" style="width:90%;padding:inherit;" data-ng-click="openDatePicker(colFilter)" placeholder="{{ colFilter.name }}" readonly value="{{colFilter.term | date:\'dd-MM-yyyy\'}}">\n<span role="button" class="ui-grid-filter-button-select cancel-custom-date-range-filter-button ng-scope" data-ng-click="removeFilter(colFilter, $index)" data-ng-if="!colFilter.disableCancelFilterButton" data-ng-disabled="colFilter.term === undefined || colFilter.term === null || colFilter.term === \'\'" data-ng-show="colFilter.term !== undefined && colFilter.term != null" tabindex="0" aria-hidden="false" aria-disabled="false" style="right:22px;">\n  <i class="ui-grid-icon-cancel cancel-custom-date-range-filter" ui-grid-one-bind-aria-label="aria.removeFilter" aria-label="Remove Filter">&nbsp;</i>\n</span>\n'),a.put("app/main/customTagsFilter.modal.html",'<div class="modal-body" data-ng-init="initModal()">\n  <!-- START TAGS -->\n<div class="form-group">\n  <label class="control-label">{{\'APPLICATION_TAGS\' | translate}}</label>\n  <ui-select multiple=\'true\' data-ng-model="item.myTags" theme="bootstrap">\n    <ui-select-match placeholder="{{ \'APPLICATION_TAGS\' | translate }}">{{$item}}</ui-select-match>\n    <ui-select-choices repeat="tag in tags | filter: $select.search">\n      {{tag}}\n    </ui-select-choices>\n  </ui-select>\n</div>\n<!-- END TAGS -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="setFilterTags()">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancelTagsFilter()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/main/customTagsFilterHeader.html",'<input class="ui-grid-filter-input pointer-cursor" style="width:90%;padding:inherit;" data-ng-click="openTags(colFilter)" placeholder="{{ colFilter.name }}" readonly value="{{colFilter.term}}">\n<span role="button" class="ui-grid-filter-button-select cancel-custom-date-range-filter-button ng-scope" data-ng-click="removeFilter(colFilter, $index)" data-ng-if="!colFilter.disableCancelFilterButton" data-ng-disabled="colFilter.term === undefined || colFilter.term === null || colFilter.term === \'\'" data-ng-show="colFilter.term !== undefined && colFilter.term != null" tabindex="0" aria-hidden="false" aria-disabled="false" style="right:5px;">\n  <i class="ui-grid-icon-cancel cancel-custom-date-range-filter" ui-grid-one-bind-aria-label="aria.removeFilter" aria-label="Remove Filter">&nbsp;</i>\n</span>\n'),a.put("app/main/keepMeLogged.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_WARNING\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <p>{{\'MESSAGE_SOMEONE_LOGGED_YOU_OUT\' | translate}}</p>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="close()">{{ \'APPLICATION_YES\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_NO\' | translate }}</button>\n</div>\n'),a.put("app/main/main.html",'<!-- BEGIN HEADER -->\n<div data-ng-include="\'components/header/header.html\'" data-ng-controller="HeaderController" class="page-header navbar navbar-fixed-top">\n</div>\n<!-- END HEADER -->\n\n<div class="clearfix">\n</div>\n<!-- BEGIN CONTAINER -->\n<div class="page-container">\n\n  <!-- BEGIN SIDEBAR -->\n  <div data-ng-include="\'components/sidebar/sidebar.html\'" data-ng-controller="SidebarController" class="page-sidebar-wrapper">\n  </div>\n  <!-- END SIDEBAR -->\n\n  <!-- BEGIN CONTENT -->\n  <div class="page-content-wrapper">\n    <div class="page-content" data-ng-class="{\'demo\': !license.expiration}">\n\n      <!-- BEGIN PAGE CONTENT -->\n      <uib-tabset>\n        <uib-tab select="addWorkspace()" active="mainTab.active">\n          <uib-tab-heading>\n            Motion <i class="icon-rocket"></i>\n          </uib-tab-heading>\n          <div class="hide" data-ng-if="!Auth.isAgent() && activeTour.main" ng-joy-ride="activeTour.main" config="tourConfig.main" on-finish="onTourFinish()" on-skip="onTourSkip()"></div>\n          <div ui-view class=""></div>\n        </uib-tab>\n        <uib-tab class="motion-{{workspace.type}}-uib-tab" data-ng-repeat="workspace in workspaces" active="workspace.active" data-ng-switch="workspace.type" select="select(workspace)" deselect="deselect(workspace)">\n          <uib-tab-heading data-ng-mouseup="$event.which === 2 && closeTab($index)">\n            <i data-ng-if="workspace.class" class="prova" data-ng-class="workspace.class"></i> {{workspace.name | truncate: 25: \'...\': true}} <span class="badge badge-danger" data-ng-if="workspace.unread">{{workspace.unread}}</span> <i class="icon-close pointer-cursor" data-ng-click="closeTab($index)"></i>\n          </uib-tab-heading>\n          <div class="" data-ng-switch="workspace.type">\n            <new-contact data-ng-switch-when="newContact" workspace="workspace" index="$index" on-submit="createContact(index,item)"></new-contact>\n            <contact data-ng-switch-when="contact" workspace="workspace" index="$index" on-submit="updateContact(index,item)"></contact>\n            <jscripty data-ng-switch-when="jscripty" workspace="workspace" index="$index" on-submit="closeJscriptyTab(index)"></jscripty>\n            <!-- <jscripty data-ng-switch-when="jscripty" workspace="workspace" index="$index" on-submit="closeTab(index,item)"></jscripty> -->\n            <chat-room data-ng-switch-when="chatRoom" workspace="workspace" index="$index" on-submit="closeTab(index)"></chat-room>\n            <fax-room data-ng-switch-when="faxRoom" workspace="workspace" index="$index" on-submit="closeTab(index)"></fax-room>\n            <mail-room data-ng-switch-when="mailRoom" workspace="workspace" index="$index" on-submit="closeTab(index)"></mail-room>\n            <sms-room data-ng-switch-when="smsRoom" workspace="workspace" index="$index" on-submit="closeTab(index)"></sms-room>\n            <openchannel-room data-ng-switch-when="openchannelRoom" workspace="workspace" index="$index" on-submit="closeTab(index)"></openchannel-room>\n            <tiger-dial-disposal data-ng-switch-when="tdDisposal" workspace="workspace" index="$index"></tiger-dial-disposal>\n          </div>\n        </uib-tab>\n      </uib-tabset>\n      <!-- END PAGE CONTENT  -->\n\n    </div>\n  </div>\n  <!-- END CONTENT -->\n\n</div>\n<!-- END CONTAINER -->\n\n<!-- BEGIN FOOTER -->\n<div data-ng-include="\'components/footer/footer.html\'" data-ng-controller="FooterController" class="page-footer">\n</div>\n<!-- END FOOTER -->\n\n<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->\n<!-- BEGIN CORE PLUGINS -->\n<!--[if lt IE 9]>\n<script src="../../assets/global/plugins/respond.min.js"></script>\n<script src="../../assets/global/plugins/excanvas.min.js"></script>\n<![endif]-->\n\n<!-- END JAVASCRIPTS -->\n'),
+a.put("app/main/mergeContact.choose.modal.html",'<div class="modal-header" data-ng-init="initView()">\n  <h3 class="modal-title">{{ \'APPLICATION_CHOOSE_CONTACT_TO_MERGE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START TABLE -->\n<div data-ng-if="gridOptions" ui-grid="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-draggable-rows class="ui-grid">\n  <div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n</div>\n<!-- END TABLE -->\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/main/mergeContact.merge.modal.html",'<div class="modal-header" data-ng-init="initView()">\n  <h3 class="modal-title">{{ \'APPLICATION_MERGE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n      <form name="forms.general" data-ng-submit="submit({index:index,item:contact})" novalidate>\n          <!-- BEGIN PORTLET -->\n          <div class="portlet light ">\n                <div class="portlet-body row">\n                    <div class="col-md-4">\n                      <!-- START FIRSTNAME -->\n                      <div class="form-group" data-ng-class="{\'has-error\': (forms.general.firstName.$touched || forms.general.$submitted) && forms.general.firstName.$invalid}">\n                        <label class="control-label">{{\'APPLICATION_FIRSTNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                        <input data-ng-if="fields.firstName.length <= 1" type="text" name="firstName" placeholder="{{\'APPLICATION_FIRSTNAME\' | translate}}" class="form-control" data-ng-model="contact.firstName" required/>\n                        <ui-select data-ng-if="fields.firstName.length > 1" data-ng-model="contact.firstName" theme="bootstrap" name="firstName" required>\n                          <ui-select-match placeholder="{{ \'APPLICATION_FIRSTNAME\' | translate }}">{{$select.selected}}</ui-select-match>\n                          <ui-select-choices repeat="field in fields.firstName | filter: $select.search track by $index">\n                            <div ng-bind-html="field | highlight: $select.search"></div>\n                          </ui-select-choices>\n                        </ui-select>\n                        <span data-ng-show="(forms.general.firstName.$touched || forms.general.$submitted) && forms.general.firstName.$error.required" class="help-block help-block-error">\n                          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                        </span>\n                      </div>\n                      <!-- END FIRSTNAME -->\n\n                      <!-- START LASTNAME -->\n                      <div class="form-group" data-ng-class="{\'has-error\': (forms.general.lastName.$touched || forms.general.$submitted) && forms.general.lastName.$invalid}">\n                        <label class="control-label">{{\'APPLICATION_LASTNAME\' | translate}}</label>\n                        <input data-ng-if="fields.lastName.length <= 1" type="text" name="lastName" placeholder="{{\'APPLICATION_LASTNAME\' | translate}}" class="form-control" data-ng-model="contact.lastName"/>\n                        <ui-select data-ng-if="fields.lastName.length > 1" data-ng-model="contact.lastName" theme="bootstrap" name="lastName">\n                          <ui-select-match placeholder="{{ \'APPLICATION_LASTNAME\' | translate }}">{{$select.selected}}</ui-select-match>\n                          <ui-select-choices repeat="field in fields.lastName | filter: $select.search track by $index">\n                            <div ng-bind-html="field | highlight: $select.search"></div>\n                          </ui-select-choices>\n                        </ui-select>\n                        <span data-ng-show="(forms.general.lastName.$touched || forms.general.$submitted) && forms.general.lastName.$error.required" class="help-block help-block-error">\n                          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                        </span>\n                      </div>\n                      <!-- END LASTNAME -->\n\n                      <!-- START COMPANY -->\n                      <div class="form-group" data-ng-class="{\'has-error\': forms.general.CompanyId.$invalid && forms.general.$submitted}">\n                        <label class="control-label">{{\'APPLICATION_COMPANY\' | translate}}</label>\n                          <ui-select data-ng-model="contact.CompanyId" theme="bootstrap" name="CompanyId" ng-disabled="!companies.length" required>\n                            <ui-select-match placeholder="{{ \'APPLICATION_COMPANY\' | translate }}">{{$select.selected.name}}</ui-select-match>\n                            <ui-select-choices repeat="company.id as company in companies | filter: $select.search" null-option="scope.noCompany">\n                              <div ng-bind-html="company.name | highlight: $select.search"></div>\n                            </ui-select-choices>\n                          </ui-select>\n                        <div class="note note-warning" data-ng-hide="companies.length">\n                          <h4 class="block">Warning!</h4>\n                          <p>\n                            {{ \'MESSAGE_NO_COMPANIES_AVAILABLE\' | translate }}\n                          </p>\n                          <p>\n                            {{\'APPLICATION_GO_TO\' | translate}} <a href="/contactmanager/companies/list">{{\'APPLICATION_COMPANIES\' | translate}}</a>\n                          </p>\n                        </div>\n                        <span data-ng-show="forms.general.CompanyId.$invalid && forms.general.$submitted" class="help-block help-block-error">\n                          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                        </span>\n                      </div>\n                      <!-- END COMPANY -->\n                    </div>\n                    <div class="col-md-4">\n                      <!-- START PHONE -->\n                      <div class="form-group" data-ng-class="{\'has-error\': (forms.general.phone.$touched || forms.general.$submitted) && forms.general.phone.$invalid}">\n                        <label class="control-label">{{\'APPLICATION_PHONE\' | translate}}</label>\n                        <input data-ng-if="fields.phone.length <= 1" type="text" name="phone" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="contact.phone"/>\n                        <ui-select data-ng-if="fields.phone.length > 1" data-ng-model="contact.phone" theme="bootstrap" name="phone">\n                          <ui-select-match placeholder="{{ \'APPLICATION_PHONE\' | translate }}">{{$select.selected}}</ui-select-match>\n                          <ui-select-choices repeat="field in fields.phone | filter: $select.search track by $index">\n                            <div ng-bind-html="field | highlight: $select.search"></div>\n                          </ui-select-choices>\n                        </ui-select>\n                      <span data-ng-show="(forms.general.phone.$touched || forms.general.$submitted) && forms.general.phone.$error.required" class="help-block help-block-error">\n                        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                      </span>\n                    </div>\n                    <!-- END PHONE -->\n                    <!-- START MOBILE -->\n                    <div class="form-group" data-ng-class="{\'has-error\': (forms.general.mobile.$touched || forms.general.$submitted) && forms.general.mobile.$invalid}">\n                      <label class="control-label">{{\'APPLICATION_MOBILE\' | translate}}</label>\n                      <input data-ng-if="fields.mobile.length <= 1" type="text" name="mobile" placeholder="{{\'APPLICATION_MOBILE\' | translate}}" class="form-control" data-ng-model="contact.mobile"/>\n                      <ui-select data-ng-if="fields.mobile.length > 1" data-ng-model="contact.mobile" theme="bootstrap" name="mobile">\n                        <ui-select-match placeholder="{{ \'APPLICATION_MOBILE\' | translate }}">{{$select.selected}}</ui-select-match>\n                        <ui-select-choices repeat="field in fields.mobile | filter: $select.search track by $index">\n                          <div ng-bind-html="field | highlight: $select.search"></div>\n                        </ui-select-choices>\n                      </ui-select>\n                    <span data-ng-show="(forms.general.mobile.$touched || forms.general.$submitted) && forms.general.mobile.$error.required" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END MOBILE -->\n                  <!-- START EMAIL -->\n                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.email.$touched || forms.general.$submitted) && forms.general.email.$invalid}">\n                    <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}</label>\n                    <input data-ng-if="fields.email.length <= 1" type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="contact.email"/>\n                      <ui-select data-ng-if="fields.email.length > 1" data-ng-model="contact.email" theme="bootstrap" name="email">\n                        <ui-select-match placeholder="{{ \'APPLICATION_EMAIL\' | translate }}">{{$select.selected}}</ui-select-match>\n                        <ui-select-choices repeat="field in fields.email | filter: $select.search track by $index">\n                          <div ng-bind-html="field | highlight: $select.search"></div>\n                        </ui-select-choices>\n                      </ui-select>\n                    <span data-ng-show="(forms.general.email.$touched || forms.general.$submitted) && forms.general.email.$error.required" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END EMAIL -->\n                </div>\n                <div class="col-md-4">\n                  <!-- START FAX -->\n                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.fax.$touched || forms.general.$submitted) && forms.general.fax.$invalid}">\n                    <label class="control-label">{{\'APPLICATION_FAX\' | translate}}</label>\n                    <input data-ng-if="fields.fax.length <= 1" type="text" name="fax" placeholder="{{\'APPLICATION_FAX\' | translate}}" class="form-control" data-ng-model="contact.fax"/>\n                      <ui-select data-ng-if="fields.fax.length > 1" data-ng-model="contact.fax" theme="bootstrap" name="fax">\n                        <ui-select-match placeholder="{{ \'APPLICATION_FAX\' | translate }}">{{$select.selected}}</ui-select-match>\n                        <ui-select-choices repeat="field in fields.fax | filter: $select.search track by $index">\n                          <div ng-bind-html="field | highlight: $select.search"></div>\n                        </ui-select-choices>\n                      </ui-select>\n                    <span data-ng-show="(forms.general.fax.$touched || forms.general.$submitted) && forms.general.fax.$error.required" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END FAX -->\n                  <!-- START TAGS -->\n                  <div class="form-group" data-ng-class="{\'has-error\': forms.general.tags.$invalid && forms.general.$submitted}">\n                    <label class="control-label">{{\'APPLICATION_TAGS\' | translate}}</label>\n                    <ui-select multiple=\'true\' data-ng-model="contact.tags" theme="bootstrap" name="tags" ng-disabled="disabled">\n                      <ui-select-match placeholder="{{ \'APPLICATION_TAGS\' | translate }}">{{$item}}</ui-select-match>\n                      <ui-select-choices repeat="tag in tags | filter: $select.search">\n                        <div ng-bind-html="tag | highlight: $select.search"></div>\n                      </ui-select-choices>\n                    </ui-select>\n                    <span data-ng-show="forms.general.tags.$invalid && forms.general.$submitted" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END TAGS -->\n                  <!-- START LIST -->\n                  <div class="form-group" data-ng-if="contact.id">\n                    <label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n                    <input type="text" name="list" placeholder="{{\'APPLICATION_LIST\' | translate}}" class="form-control" data-ng data-ng-model="contact.List.name" disabled/>\n                  </div>\n                  <!-- END LIST -->\n                </div>\n              </div>\n            </div>\n            <div class="portlet light upborder">\n                <div class="portlet-body row">\n                <div class="col-md-4">\n                  <!-- START STREET -->\n                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.street.$touched || forms.general.$submitted) && forms.general.street.$invalid}">\n                    <label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n                    <input data-ng-if="fields.street.length <= 1" type="text" name="street" placeholder="{{\'APPLICATION_STREET\' | translate}}" class="form-control" data-ng-model="contact.street"/>\n                        <ui-select data-ng-if="fields.street.length > 1" data-ng-model="contact.street" theme="bootstrap" name="street">\n                          <ui-select-match placeholder="{{ \'APPLICATION_STREET\' | translate }}">{{$select.selected}}</ui-select-match>\n                          <ui-select-choices repeat="field in fields.street | filter: $select.search track by $index">\n                            <div ng-bind-html="field | highlight: $select.search"></div>\n                          </ui-select-choices>\n                        </ui-select>\n                    <span data-ng-show="(forms.general.street.$touched || forms.general.$submitted) && forms.general.street.$error.required" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END STREET -->\n\n                  <!-- START POSTALCODE -->\n                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.postalCode.$touched || forms.general.$submitted) && forms.general.postalCode.$invalid}">\n                    <label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n                    <input data-ng-if="fields.postalCode.length <= 1" type="text" name="postalCode" placeholder="{{\'APPLICATION_POSTALCODE\' | translate}}" class="form-control" data-ng-model="contact.postalCode"/>\n                        <ui-select data-ng-if="fields.postalCode.length > 1" data-ng-model="contact.postalCode" theme="bootstrap" name="postalCode">\n                          <ui-select-match placeholder="{{ \'APPLICATION_POSTALCODE\' | translate }}">{{$select.selected}}</ui-select-match>\n                          <ui-select-choices repeat="field in fields.postalCode | filter: $select.search track by $index">\n                            <div ng-bind-html="field | highlight: $select.search"></div>\n                          </ui-select-choices>\n                        </ui-select>\n                    <span data-ng-show="(forms.general.postalCode.$touched || forms.general.$submitted) && forms.general.postalCode.$error.required" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END POSTALCODE -->\n\n                  <!-- START CITY -->\n                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.city.$touched || forms.general.$submitted) && forms.general.city.$invalid}">\n                    <label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n                    <input data-ng-if="fields.city.length <= 1" type="text" name="city" placeholder="{{\'APPLICATION_CITY\' | translate}}" class="form-control" data-ng-model="contact.city"/>\n                        <ui-select data-ng-if="fields.city.length > 1" data-ng-model="contact.city" theme="bootstrap" name="city">\n                          <ui-select-match placeholder="{{ \'APPLICATION_CITY\' | translate }}">{{$select.selected}}</ui-select-match>\n                          <ui-select-choices repeat="field in fields.city | filter: $select.search track by $index">\n                            <div ng-bind-html="field | highlight: $select.search"></div>\n                          </ui-select-choices>\n                        </ui-select>\n                    <span data-ng-show="(forms.general.city.$touched || forms.general.$submitted) && forms.general.city.$error.required" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END CITY -->\n                </div>\n                <div class="col-md-4">\n                  <!-- START COUNTRY -->\n                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.country.$touched || forms.general.$submitted) && forms.general.country.$invalid}">\n                    <label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n                    <input data-ng-if="fields.country.length <= 1" type="text" name="country" placeholder="{{\'APPLICATION_COUNTRY\' | translate}}" class="form-control" data-ng-model="contact.country"/>\n                        <ui-select data-ng-if="fields.country.length > 1" data-ng-model="contact.country" theme="bootstrap" name="country">\n                          <ui-select-match placeholder="{{ \'APPLICATION_COUNTRY\' | translate }}">{{$select.selected}}</ui-select-match>\n                          <ui-select-choices repeat="field in fields.country | filter: $select.search track by $index">\n                            <div ng-bind-html="field | highlight: $select.search"></div>\n                          </ui-select-choices>\n                        </ui-select>\n                    <span data-ng-show="(forms.general.country.$touched || forms.general.$submitted) && forms.general.country.$error.required" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END COUNTRY -->\n\n                  <!-- START DATEOFBIRTH -->\n                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.dateOfBirth.$touched || forms.general.$submitted) && forms.general.dateOfBirth.$invalid}">\n                    <label class="control-label">{{\'APPLICATION_DATEOFBIRTH\' | translate}}</label>\n                    <input data-ng-if="fields.dateOfBirth.length <= 1" type="date" name="dateOfBirth" placeholder="{{\'APPLICATION_DATEOFBIRTH\' | translate}}" class="form-control" data-ng-model="contact.dateOfBirth"/>\n                    <ui-select data-ng-if="fields.dateOfBirth.length > 1" data-ng-model="contact.dateOfBirth" theme="bootstrap" name="dateOfBirth">\n                      <ui-select-match placeholder="{{ \'APPLICATION_DATEOFBIRTH\' | translate }}">{{$select.selected}}</ui-select-match>\n                      <ui-select-choices repeat="field in fields.dateOfBirth | filter: $select.search track by $index">\n                        <div ng-bind-html="field | highlight: $select.search"></div>\n                      </ui-select-choices>\n                    </ui-select>\n                      <span data-ng-show="(forms.general.dateOfBirth.$touched || forms.general.$submitted) && forms.general.dateOfBirth.$error.required" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END DATEOFBIRTH -->\n\n                  <!-- START DESCRIPTION -->\n                  <div class="form-group">\n                    <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                    <textarea  style="resize: vertical;" data-ng-if="fields.description.length <= 1" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="contact.description"/></textarea>\n                        <ui-select data-ng-if="fields.description.length > 1" data-ng-model="contact.description" theme="bootstrap" name="description">\n                          <ui-select-match placeholder="{{ \'APPLICATION_DESCRIPTION\' | translate }}">{{$select.selected}}</ui-select-match>\n                          <ui-select-choices repeat="field in fields.description | filter: $select.search track by $index">\n                            <div ng-bind-html="field | highlight: $select.search"></div>\n                          </ui-select-choices>\n                        </ui-select>\n                  </div>\n                  <!-- END DESCRIPTION -->\n                </div>\n                <div class="col-md-4">\n                  <!-- START URL -->\n                  <div class="form-group" data-ng-class="{\'has-error\': (forms.general.url.$touched || forms.general.$submitted) && forms.general.url.$invalid}">\n                    <label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n                    <input data-ng-if="fields.url.length <= 1" type="text" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="contact.url"/>\n                    <ui-select data-ng-if="fields.url.length > 1" data-ng-model="contact.url" theme="bootstrap" name="url">\n                      <ui-select-match placeholder="{{ \'APPLICATION_URL\' | translate }}">{{$select.selected}}</ui-select-match>\n                      <ui-select-choices repeat="field in fields.url | filter: $select.search track by $index">\n                        <div ng-bind-html="field | highlight: $select.search"></div>\n                      </ui-select-choices>\n                    </ui-select>\n                    <span data-ng-show="(forms.general.url.$touched || forms.general.$submitted) && forms.general.url.$error.required" class="help-block help-block-error">\n                      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                    </span>\n                  </div>\n                  <!-- END URL -->\n                </div>\n              </div>\n            </div>\n          <div class="portlet light upborder" data-ng-if="customFields.length">\n            <div class="portlet-body">\n              <div class="row">\n              <div class="col-md-4" data-ng-repeat="customField in customFields">\n                <div data-ng-if="customField.type==\'text\'" class="form-group" data-ng-class="{\'has-error\': (forms.general[customField.name].$touched || forms.general.$submitted) && forms.general[customField.name].$invalid}">\n                  <label class="control-label">{{customField.alias}}</label>\n                  <input data-ng-if="fields[customField.name].length <= 1" type="text" name="{{customField.name}}" placeholder="{{customField.alias}}" class="form-control" data-ng-model="contact[customField.name]"/>\n                  <ui-select data-ng-if="fields[customField.name].length > 1" data-ng-model="contact[customField.name]" theme="bootstrap" name="{{customField.name}}">\n                    <ui-select-match placeholder="{{customField.name}}">{{$select.selected}}</ui-select-match>\n                    <ui-select-choices repeat="field in fields[customField.name] | filter: $select.search track by $index">\n                      <div ng-bind-html="field | highlight: $select.search"></div>\n                    </ui-select-choices>\n                  </ui-select>\n                  <span data-ng-show="(forms.general[customField.name].$touched || forms.general.$submitted) && forms.general[customField.name].$error.required" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n                <div data-ng-if="customField.type==\'select\'" class="form-group" data-ng-class="{\'has-error\': forms.general[customField.name].$invalid && forms.general.$submitted}">\n                  <label class="control-label">{{customField.alias}}</label>\n                  <ui-select data-ng-model="contact[customField.name]" theme="bootstrap" name="{{customField.name}}" data-ng-disabled="disabled">\n                    <ui-select-match allow-clear placeholder="{{customField.alias}}">{{$select.selected.value}}</ui-select-match>\n                    <ui-select-choices repeat="choice.value as choice in customField.values | filter: $select.search">\n                      <div ng-bind-html="choice.value | highlight: $select.search"></div>\n                    </ui-select-choices>\n                  </ui-select>\n                  <span data-ng-show="forms.general[customField.name].$invalid && forms.general.$submitted" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n              </div>\n            </div>\n            </div>\n          </div>\n          <!-- END PORTLET -->\n        </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="merge()" ng-disabled="forms.general.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/main/template/actionBuilder/template.actionBuilderIntegration.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" data-ng-change="changeIntegration()" required>\n    <ui-select-match placeholder="{{ \'APPLICATION_INTEGRATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="integration.state as integration in integrations | filter: $select.search">\n      <div ng-bind-html="integration.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{\'APPLICATION_INTEGRATION\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="form-group col-md-6" data-ng-if="element.data1 && accounts && randomName" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data2" name="data2{{randomName}}" theme="bootstrap" data-ng-change="changeAccount();" required>\n    <ui-select-match placeholder="{{\'APPLICATION_ACCOUNT\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="account.id as account in accounts | filter: $select.search">\n      <div ng-bind-html="account.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{\'APPLICATION_ACCOUNT\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="form-group col-md-6" data-ng-if="element.data2 && configurations && randomName" data-ng-class="{\'has-error\': (form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data3" name="data3{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{\'APPLICATION_CONFIGURATION\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="config.id as config in configurations | filter: $select.search">\n      <div ng-bind-html="config.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{\'APPLICATION_CONFIGURATION\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("app/main/template/actionBuilder/template.actionBuilderJscripty.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="project.id as project in projects | filter: $select.search">\n      <div ng-bind-html="project.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("app/main/template/actionBuilder/template.actionBuilderMotionBar.html",'<!-- data1: 0 POPUP, 1 URL, 2 WINAPP -->\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required data-ng-change="changeMode();">\n    <ui-select-match placeholder="{{ \'APPLICATION_TYPE\' | translate }}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="motionAction.value as motionAction in motionActions | filter: $select.search">\n      <div ng-bind-html="motionAction.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{ \'APPLICATION_TYPE\' | translate }}\n  </span>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<!-- data1:0 data2:Template -->\n<div data-ng-if="randomName && element.data1==0" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data2" name="data2{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{ \'APPLICATION_TEMPLATE\' | translate }}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n      <div ng-bind-html="template.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{ \'APPLICATION_TEMPLATE\' | translate }}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<!-- data1:1 data2:URL -->\n<div data-ng-if="randomName && element.data1==1" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" required placeholder="{{ \'APPLICATION_URL\' | translate }}"/>\n  <span class="help-block">\n    {{ \'APPLICATION_URL\' | translate }}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<!-- data1:2 data2:Application data3:Arguments -->\n<div data-ng-if="randomName && element.data1==2" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" required placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}"/>\n  <span class="help-block">\n    {{ \'APPLICATION_APPLICATION\' | translate }}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div data-ng-if="randomName && element.data1==2" class="form-group col-md-6">\n  <input type="text" ng-model="element.data3" name="data3{{randomName}}" class="form-control" placeholder="{{ \'APPLICATION_ARGUMENTS\' | translate }}"/>\n  <span class="help-block">\n    {{ \'APPLICATION_ARGUMENTS\' | translate }}\n  </span>\n</div>\n'),
+a.put("app/main/template/actionBuilder/template.actionBuilderStatus.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="status.value as status in states | filter: $select.search">\n      <div ng-bind-html="status.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("app/main/template/actionBuilder/template.actionBuilderTemplate.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n      <div ng-bind-html="template.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" required/>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="col-md-6">\n  <input type="text" ng-model="element.data3" class="form-control"/>\n</div>\n'),a.put("app/main/template/actionBuilder/template.actionBuilderUrlForward.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{ \'APPLICATION_TYPE\' | translate }}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="type.value as type in types | filter: $select.search">\n      <div ng-bind-html="type.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{\'APPLICATION_TYPE\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="form-group col-md-6" data-ng-if="element.data1 && randomName" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="url" ng-model="element.data2" placeholder="{{ \'APPLICATION_URL\' | translate }}" name="data2{{randomName}}" class="form-control" required/>\n  <span class="help-block">\n    {{\'APPLICATION_URL\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("app/main/template/template.conditionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-4" data-ng-class="{\'has-error\': (form[\'field\'+randomName].$touched || form.$submitted) && form[\'field\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.field" name="field{{randomName}}" theme="bootstrap" data-ng-change="checkCondition(element.field)" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="condition.value as condition in service.services[serviceindex].conditions | filter: $select.search">\n      <div ng-bind-html="condition.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'field\'+randomName].$touched || form.$submitted) && form[\'field\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div data-ng-if="randomName && element.field" class="form-group col-md-4" data-ng-class="{\'has-error\': (form[\'operator\'+randomName].$touched || form.$submitted) && form[\'operator\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.operator" name="operator{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="operator.value as operator in _.find(service.services[serviceindex].conditions,{value:element.field}).operators | filter: $select.search">\n      <div ng-bind-html="operator.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'operator\'+randomName].$touched || form.$submitted) && form[\'operator\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="col-md-4" data-ng-if="elementType === \'input\' && randomName && element.field" data-ng-class="{\'has-error\': (form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$invalid}">\n  <input type="text" ng-model="element.value" class="form-control" name="value{{randomName}}" required/>\n  <span data-ng-show="(form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$error.required" class="help-block help-block-error">\n      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n    </span>\n</div>\n<div class="form-group col-md-4" data-ng-if="elementType === \'select\' && randomName && element.field" data-ng-class="{\'has-error\': (form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.value" name="value{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="value.value as value in values| filter: $select.search">\n      <div ng-bind-html="value.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("app/main/template/template.contactTab.html",'<div class="row margin-top-20 contact-tab-container">\n  <div class="col-md-12 contact-tab">\n    <form name="forms.general" data-ng-submit="submit({index:index,item:contact})" novalidate>\n    <!-- BEGIN PROFILE CONTENT -->\n    <div class="profile-content">\n      <ul class="nav nav-tabs">\n  <li class="active">\n    <a href="#tab_1_1{{contact.id || \'\'}}" data-toggle="tab">{{\'APPLICATION_DETAIL\' | translate}}</a>\n  </li>\n  <li data-ng-if="contact.id">\n    <a href="#tab_1_2{{contact.id || \'\'}}" data-toggle="tab">{{\'APPLICATION_CUSTOMER_JOURNEY\' | translate}}</a>\n  </li>\n</ul>\n<div class="tab-content">\n  <div class="tab-pane fade active in" id="tab_1_1{{contact.id || \'\'}}">\n    <!--end add-portfolio-->\n    <div class="row portfolio-block" data-ng-if="workspace.data && workspace.data.uniqueid && workspace.data.agentcalledAt">\n      <div class="col-md-3">\n        <div class="portfolio-text">\n          <img src="assets/images/media/CmCall.png" alt=""/>\n          <div class="portfolio-text-info">\n            <h4>{{\'MESSAGE_INBOUND_CALL_FROM\' | translate}} - {{workspace.data.calleridnum}}</h4>\n            <p>\n              {{\'MESSAGE_CALL_UNIQUEID\' | translate}} : {{workspace.data.uniqueid}}\n            </p>\n          </div>\n        </div>\n      </div>\n      <div class="col-md-2 portfolio-stat">\n        <div>{{\'APPLICATION_QUEUE\' | translate}} </div>\n        <p>  {{workspace.data.queue}} </p>\n      </div>\n      <div class="col-md-3 portfolio-stat">\n        <div>{{\'APPLICATION_AGENT\' | translate}} </div>\n        <p>  {{workspace.data.membername}} </p>\n      </div>\n      <div class="col-md-2 portfolio-stat">\n        <div>{{\'APPLICATION_DATE\' | translate}} </div>\n        <p>  {{workspace.data.agentcalledAt | date:\'dd/MM/yyyy HH:mm:ss\'}} </p>\n      </div>\n      <div class="col-md-2 portfolio-stat">\n        <button class="btn grey-cascade" type="button" data-ng-click="dispose()" data-ng-disabled="contact.disposed">\n          <i class="icon-target"></i> {{\'APPLICATION_DISPOSITION\' | translate}}\n        </button>\n      </div>\n    </div>\n            <!--end row-->\n          <!-- BEGIN PORTLET -->\n          <div class="portlet light ">\n            <div class="portlet-title">\n              <div class="caption caption-md">\n                <i class="icon-bar-chart theme-font hide"></i>\n                <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_DETAIL\' | translate}}</span>\n              </div>\n              <div class="actions">\n                <div class="btn-group btn-group-devided" data-toggle="buttons">\n                  <button type="submit" data-ng-if="contact.id" title="{{\'APPLICATION_COPY\' | translate}}" class="btn btn-circle green btn-sm" data-ng-click="copy(contact.id)"><i class="fa fa-files-o"></i></button>\n                  <button type="submit" data-ng-if="contact.ListId" class="btn btn-circle purple btn-sm" title="{{\'APPLICATION_MERGE\' | translate}}" data-ng-click="merge(contact)"><i class="icon-link"></i></button>\n                  <label class="btn btn-transparent grey-salsa btn-circle btn-sm active" data-ng-click="detail.tab=\'main\'">\n                  <input type="radio" class="toggle">{{\'APPLICATION_MAIN\' | translate}}</label>\n                  <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-click="detail.tab=\'other\'">\n                  <input type="radio" class="toggle">{{\'APPLICATION_OTHER\' | translate}}</label>\n                </div>\n              </div>\n            </div>\n            <div class="portlet-body">\n              <div data-ng-class="{\'hidden\':detail.tab != \'main\'}" class="portlet-body contact-portlet row">\n                <div class="col-md-4">\n              <!-- START FIRSTNAME -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.firstName.$touched || forms.general.$submitted) && forms.general.firstName.$invalid}">\n                <label class="control-label">{{\'APPLICATION_FIRSTNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                <input type="text" name="firstName" placeholder="{{\'APPLICATION_FIRSTNAME\' | translate}}" class="form-control" data-ng-model="contact.firstName" required/>\n                <span data-ng-show="(forms.general.firstName.$touched || forms.general.$submitted) && forms.general.firstName.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END FIRSTNAME -->\n\n              <!-- START LASTNAME -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.lastName.$touched || forms.general.$submitted) && forms.general.lastName.$invalid}">\n                <label class="control-label">{{\'APPLICATION_LASTNAME\' | translate}}</label>\n                <input type="text" name="lastName" placeholder="{{\'APPLICATION_LASTNAME\' | translate}}" class="form-control" data-ng-model="contact.lastName"/>\n                <span data-ng-show="(forms.general.lastName.$touched || forms.general.$submitted) && forms.general.lastName.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END LASTNAME -->\n\n              <!-- START COMPANY -->\n              <div class="form-group" data-ng-class="{\'has-error\': forms.general.CompanyId.$invalid && forms.general.$submitted}">\n                <label class="control-label">{{\'APPLICATION_COMPANY\' | translate}}</label>\n                <div class="input-group">\n                  <ui-select data-ng-model="contact.CompanyId" theme="bootstrap" name="CompanyId" ng-disabled="!companies.length" required>\n                    <ui-select-match placeholder="{{ \'APPLICATION_COMPANY\' | translate }}">{{$select.selected.name}}</ui-select-match>\n                    <ui-select-choices repeat="company.id as company in companies | filter: $select.search" null-option="scope.noCompany">\n                      <div ng-bind-html="company.name | highlight: $select.search"></div>\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-btn">\n                    <button type="button" data-ng-click="companyInfo(contact.CompanyId)" class="btn btn-default" data-ng-disabled="!contact.CompanyId">\n                      <span class="icon-info" data-ng-class="{\'font-blue\':contact.CompanyId}"></span>\n                    </button>\n                  </span>\n                </div>\n                <div class="note note-warning" data-ng-hide="companies.length">\n                  <h4 class="block">Warning!</h4>\n                  <p>\n                    {{ \'MESSAGE_NO_COMPANIES_AVAILABLE\' | translate }}\n                  </p>\n                  <p>\n                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/contactmanager/companies/list">{{\'APPLICATION_COMPANIES\' | translate}}</a>\n                  </p>\n                </div>\n                <span data-ng-show="forms.general.CompanyId.$invalid && forms.general.$submitted" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END COMPANY -->\n            </div>\n            <div class="col-md-4">\n              <!-- START PHONE -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.phone.$touched || forms.general.$submitted) && forms.general.phone.$invalid}">\n                <label class="control-label">{{\'APPLICATION_PHONE\' | translate}}</label>\n                <div class="input-group">\n                  <input type="text" name="phone" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="contact.phone"/>\n                  <span class="input-group-btn" uib-dropdown>\n                    <button data-ng-if="Auth.isAgent()" type="button" uib-dropdown-toggle class="btn btn-default" data-ng-disabled="!contact.phone || !agent.phoneBarRemoteControl" >\n                      <span class="icon-earphones-alt" data-ng-class="{\'font-blue\':contact.phone && agent.phoneBarRemoteControl}" uib-tooltip="{{!agent.phoneBarRemoteControl ? (\'APPLICATION_ENABLE_REMOTE_PHONEBAR\' | translate) : (\'APPLICATION_MOTION_BAR_CONTROLS\' | translate)}}" ></span>\n                    </button>\n                    <ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="single-button">\n                      <li role="menuitem"><a href="#" data-ng-click="callPhoneBar(contact.phone,\'call\')"><i class="icon-phone"></i> {{\'APPLICATION_CALL\' | translate}}</a></li>\n                      <li role="menuitem"><a href="#" data-ng-click="callPhoneBar(contact.phone,\'transfer\')"><i class="glyphicon glyphicon-random"></i> {{\'APPLICATION_TRANSFER\' | translate}}</a></li>\n                    </ul>\n                    <button type="button" data-ng-click="openRoom(null,\'smsRoom\',{to:contact.phone})" class="btn btn-default" data-ng-disabled="!contact.phone || !license.messaging">\n                      <span class="glyphicon glyphicon-comment" data-ng-class="{\'font-blue\':contact.phone && license.messaging}"></span>\n                    </button>\n                  </span>\n                </div>\n                <span data-ng-show="(forms.general.phone.$touched || forms.general.$submitted) && forms.general.phone.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END PHONE -->\n              <!-- START MOBILE -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.mobile.$touched || forms.general.$submitted) && forms.general.mobile.$invalid}">\n                <label class="control-label">{{\'APPLICATION_MOBILE\' | translate}}</label>\n                <div class="input-group">\n                  <input type="text" name="mobile" placeholder="{{\'APPLICATION_MOBILE\' | translate}}" class="form-control" data-ng-model="contact.mobile"/>\n                  <span class="input-group-btn" uib-dropdown>\n                    <button data-ng-if="Auth.isAgent()" type="button" uib-dropdown-toggle class="btn btn-default" data-ng-disabled="!contact.mobile || !agent.phoneBarRemoteControl" >\n                      <span class="icon-earphones-alt" data-ng-class="{\'font-blue\':contact.mobile && agent.phoneBarRemoteControl}" uib-tooltip="{{!agent.phoneBarRemoteControl ? (\'APPLICATION_ENABLE_REMOTE_PHONEBAR\' | translate) : (\'APPLICATION_MOTION_BAR_CONTROLS\' | translate)}}" ></span>\n                    </button>\n                    <ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="single-button">\n                      <li role="menuitem"><a href="#" data-ng-click="callPhoneBar(contact.mobile,\'call\')"><i class="icon-phone"></i> {{\'APPLICATION_CALL\' | translate}}</a></li>\n                      <li role="menuitem"><a href="#" data-ng-click="callPhoneBar(contact.mobile,\'transfer\')"><i class="glyphicon glyphicon-random"></i> {{\'APPLICATION_TRANSFER\' | translate}}</a></li>\n                    </ul>\n                    <button type="button" data-ng-click="openRoom(null,\'smsRoom\',{to:contact.mobile})" class="btn btn-default" data-ng-disabled="!contact.mobile || !license.messaging">\n                      <span class="glyphicon glyphicon-comment" data-ng-class="{\'font-blue\':contact.mobile && license.messaging}"></span>\n                    </button>\n                  </span>\n                </div>\n                <span data-ng-show="(forms.general.mobile.$touched || forms.general.$submitted) && forms.general.mobile.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END MOBILE -->\n              <!-- START EMAIL -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.email.$touched || forms.general.$submitted) && forms.general.email.$invalid}">\n                <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}</label>\n                <div class="input-group">\n                  <input type="text" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="contact.email"/>\n                  <span class="input-group-btn">\n                    <button type="button" data-ng-click="openRoom(null,\'mailRoom\',{to:contact.email})" class="btn btn-default" data-ng-disabled="!contact.email || !license.mail">\n                      <span class="icon-envelope" data-ng-class="{\'font-blue\':contact.email && license.mail}"></span>\n                    </button>\n                  </span>\n                </div>\n                <span data-ng-show="(forms.general.email.$touched || forms.general.$submitted) && forms.general.email.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END EMAIL -->\n            </div>\n            <div class="col-md-4">\n              <!-- START FAX -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.fax.$touched || forms.general.$submitted) && forms.general.fax.$invalid}">\n                <label class="control-label">{{\'APPLICATION_FAX\' | translate}}</label>\n                <div class="input-group">\n                  <input type="text" name="fax" placeholder="{{\'APPLICATION_FAX\' | translate}}" class="form-control" data-ng-model="contact.fax"/>\n                  <span class="input-group-btn">\n                    <button type="button" data-ng-click="openRoom(null,\'faxRoom\',{to:contact.fax})" class="btn btn-default" data-ng-disabled="!contact.fax || !license.fax">\n                      <span class="fa fa-fax" data-ng-class="{\'font-blue\':contact.fax && license.fax}"></span>\n                    </button>\n                  </span>\n                </div>\n                <span data-ng-show="(forms.general.fax.$touched || forms.general.$submitted) && forms.general.fax.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END FAX -->\n              <!-- START TAGS -->\n              <div class="form-group" data-ng-class="{\'has-error\': forms.general.tags.$invalid && forms.general.$submitted}">\n                <label class="control-label">{{\'APPLICATION_TAGS\' | translate}}</label>\n                <ui-select multiple=\'true\' data-ng-model="contact.tags" theme="bootstrap" name="tags" ng-disabled="disabled">\n                  <ui-select-match placeholder="{{ \'APPLICATION_TAGS\' | translate }}">{{$item}}</ui-select-match>\n                  <ui-select-choices repeat="tag in tags | filter: $select.search">\n                    {{tag}}\n                  </ui-select-choices>\n                </ui-select>\n                <span data-ng-show="forms.general.tags.$invalid && forms.general.$submitted" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END TAGS -->\n              <!-- START LIST -->\n              <div class="form-group" data-ng-if="contact.id">\n                <label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n                <input type="text" name="list" placeholder="{{\'APPLICATION_LIST\' | translate}}" class="form-control" data-ng data-ng-model="contact.List.name" disabled/>\n              </div>\n              <!-- END LIST -->\n              <!-- START LIST -->\n              <div data-ng-if="!contact.id" class="form-group" data-ng-class="{\'has-error\': forms.general.ListId.$invalid && forms.general.$submitted}">\n                <label class="control-label">{{\'APPLICATION_LIST\' | translate}}</label>\n                <ui-select data-ng-model="contact.ListId" theme="bootstrap" name="ListId" data-ng-change="getCustomFields()" required>\n                  <ui-select-match placeholder="{{ \'APPLICATION_LIST\' | translate }}">{{$select.selected.name}}</ui-select-match>\n                  <ui-select-choices repeat="list.id as list in lists | filter: $select.search">\n                    <div ng-bind-html="list.name | highlight: $select.search"></div>\n                  </ui-select-choices>\n                </ui-select>\n                <div class="note note-warning" data-ng-hide="lists.length">\n                  <h4 class="block">Warning!</h4>\n                  <p>\n                    {{ \'MESSAGE_NO_LISTS_AVAILABLE\' | translate }}\n                  </p>\n                  <p>\n                    {{\'APPLICATION_GO_TO\' | translate}} <a href="/contactmanager/lists/list">{{\'APPLICATION_LISTS\' | translate}}</a>\n                  </p>\n                </div>\n                <span data-ng-show="forms.general.ListId.$invalid && forms.general.$submitted" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END LIST -->\n            </div>\n            </div>\n            <div data-ng-class="{\'hidden\':detail.tab != \'other\'}" class="portlet-body contact-portlet row">\n              <div class="col-md-4">\n              <!-- START STREET -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.street.$touched || forms.general.$submitted) && forms.general.street.$invalid}">\n                <label class="control-label">{{\'APPLICATION_STREET\' | translate}}</label>\n                <input type="text" name="street" placeholder="{{\'APPLICATION_STREET\' | translate}}" class="form-control" data-ng-model="contact.street"/>\n                <span data-ng-show="(forms.general.street.$touched || forms.general.$submitted) && forms.general.street.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END STREET -->\n\n              <!-- START POSTALCODE -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.postalCode.$touched || forms.general.$submitted) && forms.general.postalCode.$invalid}">\n                <label class="control-label">{{\'APPLICATION_POSTALCODE\' | translate}}</label>\n                <input type="text" name="postalCode" placeholder="{{\'APPLICATION_POSTALCODE\' | translate}}" class="form-control" data-ng-model="contact.postalCode"/>\n                <span data-ng-show="(forms.general.postalCode.$touched || forms.general.$submitted) && forms.general.postalCode.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END POSTALCODE -->\n\n              <!-- START CITY -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.city.$touched || forms.general.$submitted) && forms.general.city.$invalid}">\n                <label class="control-label">{{\'APPLICATION_CITY\' | translate}}</label>\n                <input type="text" name="city" placeholder="{{\'APPLICATION_CITY\' | translate}}" class="form-control" data-ng-model="contact.city"/>\n                <span data-ng-show="(forms.general.city.$touched || forms.general.$submitted) && forms.general.city.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END CITY -->\n            </div>\n            <div class="col-md-4">\n              <!-- START COUNTRY -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.country.$touched || forms.general.$submitted) && forms.general.country.$invalid}">\n                <label class="control-label">{{\'APPLICATION_COUNTRY\' | translate}}</label>\n                <input type="text" name="country" placeholder="{{\'APPLICATION_COUNTRY\' | translate}}" class="form-control" data-ng-model="contact.country"/>\n                <span data-ng-show="(forms.general.country.$touched || forms.general.$submitted) && forms.general.country.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END COUNTRY -->\n\n              <!-- START DATEOFBIRTH -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.dateOfBirth.$touched || forms.general.$submitted) && forms.general.dateOfBirth.$invalid}">\n                <label class="control-label">{{\'APPLICATION_DATEOFBIRTH\' | translate}}</label>\n                <input name="dateOfBirth" type="date" placeholder="{{\'APPLICATION_DATEOFBIRTH\' | translate}}" class="form-control date-picker" data-ng-model="contact.dateOfBirth"/>\n                <span data-ng-show="(forms.general.dateOfBirth.$touched || forms.general.$submitted) && forms.general.dateOfBirth.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END DATEOFBIRTH -->\n\n              <!-- START DESCRIPTION -->\n              <div class="form-group">\n                <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n                <textarea style="resize: vertical;" type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="contact.description"></textarea>\n              </div>\n              <!-- END DESCRIPTION -->\n            </div>\n            <div class="col-md-4">\n              <!-- START URL -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.general.url.$touched || forms.general.$submitted) && forms.general.url.$invalid}">\n                <label class="control-label">{{\'APPLICATION_URL\' | translate}}</label>\n                <input type="text" name="url" placeholder="{{\'APPLICATION_URL\' | translate}}" class="form-control" data-ng-model="contact.url"/>\n                <span data-ng-show="(forms.general.url.$touched || forms.general.$submitted) && forms.general.url.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END URL -->\n\n              <!-- START CREATED_BY -->\n              <div class="form-group" data-ng-if="contact.id">\n                <label class="control-label">{{\'APPLICATION_CREATED_BY\' | translate}}</label>\n                <input type="text" name="createdBy" placeholder="{{\'APPLICATION_CREATED_BY\' | translate}}" class="form-control" data-ng-model="contact.User.name" disabled/>\n              </div>\n              <!-- END CREATED_BY -->\n            </div>\n            </div>\n            </div>\n            <button type="submit" class="btn btn-circle green-haze btn-sm" data-ng-disabled="!contact.firstName || !contact.ListId">{{\'APPLICATION_UPDATE\' | translate}}</button>\n          </div>\n          <!-- END PORTLET -->\n          <!-- BEGIN PORTLET -->\n          <div class="portlet light" data-ng-if="customFields.length">\n            <div class="portlet-title tabbable-line">\n              <div class="caption caption-md">\n                <i class="icon-globe theme-font hide"></i>\n                <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CUSTOM_FIELDS\' | translate}}</span>\n              </div>\n            </div>\n            <div class="portlet-body">\n              <div class="row">\n              <div class="col-md-4" data-ng-repeat="customField in customFields">\n                <div data-ng-if="customField.type==\'text\'" class="form-group" data-ng-class="{\'has-error\': (forms.general[customField.name].$touched || forms.general.$submitted) && forms.general[customField.name].$invalid}">\n                  <label class="control-label">{{customField.alias}}</label>\n                  <input type="text" name="{{customField.name}}" placeholder="{{customField.alias}}" class="form-control" data-ng-model="contact[customField.name]"/>\n                  <span data-ng-show="(forms.general[customField.name].$touched || forms.general.$submitted) && forms.general[customField.name].$error.required" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n                <div data-ng-if="customField.type==\'select\'" class="form-group" data-ng-class="{\'has-error\': forms.general[customField.name].$invalid && forms.general.$submitted}">\n                  <label class="control-label">{{customField.alias}}</label>\n                  <ui-select data-ng-model="contact[customField.name]" theme="bootstrap" name="{{customField.name}}" data-ng-disabled="disabled">\n                    <ui-select-match allow-clear placeholder="{{customField.alias}}">{{$select.selected.value}}</ui-select-match>\n                    <ui-select-choices repeat="choice.value as choice in customField.values | filter: $select.search">\n                      <div ng-bind-html="choice.value | highlight: $select.search"></div>\n                    </ui-select-choices>\n                  </ui-select>\n                  <span data-ng-show="forms.general[customField.name].$invalid && forms.general.$submitted" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n              </div>\n            </div>\n              <button type="submit" class="btn btn-circle green-haze btn-sm" data-ng-disabled="!contact.firstName || !contact.ListId">{{\'APPLICATION_UPDATE\' | translate}}</button>\n            </div>\n        </div>\n        <!-- END PORTLET -->\n      </div>\n      <div class="tab-pane fade" id="tab_1_2{{contact.id || \'\'}}">\n          <!-- BEGIN PORTLET -->\n          <div class="portlet light">\n            <div class="portlet-title tabbable-line">\n              <div class="caption caption-md">\n                <i class="icon-globe theme-font hide"></i>\n                <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CUSTOMER_JOURNEY\' | translate}}</span>\n              </div>\n              <ul class="nav nav-tabs">\n                <li class="active">\n                  <a href="#" data-target="#tab_2_1" data-toggle="tab">{{ \'APPLICATION_DAILY\' | translate}}</a>\n                </li>\n                <li>\n                  <a href="#" data-target="#tab_2_2" data-toggle="tab">{{ \'APPLICATION_HISTORY\' | translate}}</a>\n                </li>\n              </ul>\n            </div>\n            <div class="portlet-body">\n              <!--BEGIN TABS-->\n              <div class="tab-content">\n                <div class="tab-pane active" id="tab_2_1">\n                  <div class="contact-portlet">\n                    <div class="actions">\n                      <div class="btn-group btn-group-devided" data-toggle="buttons">\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.daily.show === \'phone\'}" data-ng-click="updateLog(\'daily\',\'phone\',\'general\',\'inbound\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_PHONES\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.daily.show === \'email\'}" data-ng-click="updateLog(\'daily\',\'email\',\'general\',\'room\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_EMAILS\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.daily.show === \'chat\'}" data-ng-click="updateLog(\'daily\',\'chat\',\'general\',\'room\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_CHAT\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.daily.show === \'fax\'}" data-ng-click="updateLog(\'daily\',\'fax\',\'general\',\'room\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_FAX\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.daily.show === \'sms\'}" data-ng-click="updateLog(\'daily\',\'sms\',\'general\',\'room\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_SMS\' | translate}}</label>\n                      </div><span data-ng-if="log.daily.show==\'phone\'"> |</span>\n                      <div class="btn-group btn-group-devided" data-toggle="buttons" data-ng-if="log.daily.show==\'phone\'">\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.daily.type === \'inbound\'}" data-ng-click="updateLog(\'daily\',false,false,\'inbound\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_INBOUND\' | translate}}</label>\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.daily.type === \'outbound\'}" data-ng-click="updateLog(\'daily\',false,\'general\',\'outbound\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_OUTBOUND\' | translate}}</label>\n                      </div><span data-ng-if="log.daily.show==\'phone\'"> |</span>\n                      <div class="btn-group btn-group-devided" data-toggle="buttons" data-ng-if="log.daily.show==\'phone\'">\n                        <label class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.daily.detail === \'general\'}" data-ng-click="updateLog(\'daily\',false,\'general\',false)">\n                        <input type="radio" class="toggle">{{\'APPLICATION_GENERAL\' | translate}}</label>\n                        <label data-ng-if="log.daily.type===\'inbound\'" class="btn btn-transparent grey-salsa btn-circle btn-sm" data-ng-class="{\'active\':log.daily.detail === \'queue\'}" data-ng-click="updateLog(\'daily\',false,\'queue\',\'inbound\')">\n                        <input type="radio" class="toggle">{{\'APPLICATION_QUEUES\' | translate}}</label>\n                      </div>\n                    </div>\n                    <div data-ng-if="gridOptionsdaily" name="gridOptionsdaily"  ui-grid="gridOptionsdaily"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n                      <div class="watermark" ng-show="!gridOptionsdaily.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n                    </div>\n                  </div>\n              </div>\n                <div class="tab-pane" id="tab_2_2">\n                  <div class="contact-portlet">\n                    <div class="actions">\n                      <div class="btn-group btn-group-devided" data-toggle="buttons">\n'+"                        <label class=\"btn btn-transparent grey-salsa btn-circle btn-sm\" data-ng-class=\"{'active':log.history.show === 'phone'}\" data-ng-click=\"updateLog('history','phone','general','inbound')\">\n                        <input type=\"radio\" class=\"toggle\">{{'APPLICATION_PHONES' | translate}}</label>\n                        <label class=\"btn btn-transparent grey-salsa btn-circle btn-sm\" data-ng-class=\"{'active':log.history.show === 'email'}\" data-ng-click=\"updateLog('history','email','general','room')\">\n                        <input type=\"radio\" class=\"toggle\">{{'APPLICATION_EMAILS' | translate}}</label>\n                        <label class=\"btn btn-transparent grey-salsa btn-circle btn-sm\" data-ng-class=\"{'active':log.history.show === 'chat'}\" data-ng-click=\"updateLog('history','chat','general','room')\">\n                        <input type=\"radio\" class=\"toggle\">{{'APPLICATION_CHAT' | translate}}</label>\n                        <label class=\"btn btn-transparent grey-salsa btn-circle btn-sm\" data-ng-class=\"{'active':log.history.show === 'fax'}\" data-ng-click=\"updateLog('history','fax','general','room')\">\n                        <input type=\"radio\" class=\"toggle\">{{'APPLICATION_FAX' | translate}}</label>\n                        <label class=\"btn btn-transparent grey-salsa btn-circle btn-sm\" data-ng-class=\"{'active':log.history.show === 'sms'}\" data-ng-click=\"updateLog('history','sms','general','room')\">\n                        <input type=\"radio\" class=\"toggle\">{{'APPLICATION_SMS' | translate}}</label>\n                      </div><span data-ng-if=\"log.history.show=='phone'\"> |</span>\n                      <div class=\"btn-group btn-group-devided\" data-toggle=\"buttons\" data-ng-if=\"log.history.show=='phone'\">\n                        <label class=\"btn btn-transparent grey-salsa btn-circle btn-sm\" data-ng-class=\"{'active':log.history.type === 'inbound'}\" data-ng-click=\"updateLog('history',false,false,'inbound')\">\n                        <input type=\"radio\" class=\"toggle\">{{'APPLICATION_INBOUND' | translate}}</label>\n                        <label class=\"btn btn-transparent grey-salsa btn-circle btn-sm\" data-ng-class=\"{'active':log.history.type === 'outbound'}\" data-ng-click=\"updateLog('history',false,'general','outbound')\">\n                        <input type=\"radio\" class=\"toggle\">{{'APPLICATION_OUTBOUND' | translate}}</label>\n                      </div><span data-ng-if=\"log.history.show=='phone'\"> |</span>\n                      <div class=\"btn-group btn-group-devided\" data-toggle=\"buttons\" data-ng-if=\"log.history.show=='phone'\">\n                        <label class=\"btn btn-transparent grey-salsa btn-circle btn-sm\" data-ng-class=\"{'active':log.history.detail === 'general'}\" data-ng-click=\"updateLog('history',false,'general',false)\">\n                        <input type=\"radio\" class=\"toggle\">{{'APPLICATION_GENERAL' | translate}}</label>\n                        <label data-ng-if=\"log.history.type==='inbound'\" class=\"btn btn-transparent grey-salsa btn-circle btn-sm\" data-ng-class=\"{'active':log.history.detail === 'queue'}\" data-ng-click=\"updateLog('history',false,'queue','inbound')\">\n                        <input type=\"radio\" class=\"toggle\">{{'APPLICATION_QUEUES' | translate}}</label>\n                      </div>\n                    </div>\n                    <div data-ng-if=\"gridOptionshistory\" name=\"gridOptionshistory\" ui-grid=\"gridOptionshistory\"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter ui-grid-draggable-rows class=\"ui-grid\">\n                      <div class=\"watermark\" ng-show=\"!gridOptionshistory.data.length\">{{'MESSAGE_NO_RESULTS_AVAILABLE' | translate}}</div>\n                    </div>\n                  </div>\n                </div>\n              </div>\n              <!--END TABS-->\n            </div>\n          </div>\n          <!-- END PORTLET -->\n        </div>\n    <!-- END PROFILE CONTENT -->\n  </form>\n</div>\n  </div>\n</div>\n"),
+a.put("app/main/template/template.jscriptyTab.html",'<div class="portlet light bordered">\n    <!-- BEGIN PORTLET BODY -->\n    <div class="portlet-body">\n          <div class="row">\n              <!-- BEGIN SIDEBAR -->\n                <div  class="profile-sidebar" style="width: 250px;">\n                  <!-- PORTLET MAIN -->\n              				<!-- SIDEBAR MENU -->\n              				<div class="profile-usermenu">\n              					<ul class="nav">\n              						<li  ng-repeat= \'question in questions track by $index\' ng-class="{active: $index == count}">\n              							<a  ng-click="setCurrentQuestion($index)" >\n																<i class="fa fa-check"></i> <label ng-if="attribute.nodeName == \'label\'" ng-repeat=\'attribute in question.value.attributes track by $index\'>{{attribute.value}}</label>\n                            </a>\n              						</li>\n              					</ul>\n              				</div>\n              				<!-- END SIDEBAR MENU -->\n                    <!-- END PORTLET MAIN -->\n                </div>\n                  <!-- END SIDEBAR -->\n                  <div   class="profile-content">\n                        <div class="portlet light bordered">\n                          <div class="portlet-title">\n                            <div class="caption font-green-sharp">\n                              <i class="fa fa-edit font-green-sharp"></i>\n                              <span ng-if="attribute.nodeName ==\'label\'" ng-repeat=\'attribute in currentQuestion.value.attributes\' class="caption-subject">{{attribute.value}} </span>\n                            </div>\n\n                          </div>\n  										    <div class="portlet-body form ">\n                            <div class="row">\n															<div class="col-md-10 col-md-offset-1 ">\n                                  <form >\n                                    <div class="form-body" style="height: 400px; overflow-y: auto;overflow-x:hidden">\n\n                                       <!-- Question  -->\n                                       <div class="form-group" style="word-wrap: break-word;" >\n                                          <h3 ng-if="attribute.nodeName ==\'question\' || attribute.nodeName ==\'text\'" ng-repeat=\'attribute in currentQuestion.value.attributes\'>{{attribute.value}}</h3>\n                                        </div>\n                                        <!-- Buttons  -->\n\n                                        <div  ng-if ="(edge.source.id == currentQuestion.id) && edge.value" ng-repeat=\'edge in currentQuestion.edges track by $index\' class="row">\n                                          <div  class="col-md-8 col-md-offset-2">\n                                            <input    checked="checked"   type="radio"  ng-model="currentQuestion.button" ng-value="edge" >\n                                              <label  ng-show="(edge.source.id == currentQuestion.id) && edge.value">{{edge.value}}</label><br><br>\n                                          </div>\n                                        </div>\n                                               <!-- Question Other Option  -->\n\n                                         <div class="form-group" ng-if= "attribute.nodeName ==\'other\' && attribute.value " ng-repeat=\'attribute in currentQuestion.value.attributes track by $index\'>\n                                            <br>\n                                           <div class="col-md-2">\n                                             <label class="control-label">{{attribute.value}}</label>\n                                           </div>\n                                              <div class="col-md-8">\n                                                <textarea  style="overflow:auto" ng-model="currentQuestion.otheranswer" placeholder="Enter text" rows="8" cols="40" ></textarea>\n                                              </div>\n              													</div>\n                                              <!--  Inputs -->\n                                          <div class="row margin-top-10"  ng-repeat=\'question in currentQuestion.children track by $index\'>\n                                              <div class="col-md-10 col-md-offset-1">\n                                                <div  ng-repeat=\'attribute in question.value.attributes track by $index\'>\n                                                    <div  ng-switch="attribute.nodeName">\n                                                        <div ng-class="col-md-2" ng-switch-when="label">\n                                                          <label class="control-label" style=" display:block;word-break:break-all;" >{{attribute.value}}</label>\n                                                        </div>\n                                                        <div ng-class="attribute.value != \'checkbox\' ? \'col-md-10 pull-right\': \'col-md-2\'" ng-switch-when="type" ng-switch="attribute.value">\n                                                            <input class="form-control" ng-switch-when="text" type="text" ng-model="question.answer" />\n                                                            <input  class="form-control" ng-switch-when="number" type="number" ng-model="question.answer" />\n                                                            <input  class=" pull-right"  ng-switch-when="checkbox" type="checkbox" ng-model="question.answer" />\n                                                            <!-- ng-true-value="\'Selected\'" ng-false-value="\'Not Selected\'" -->\n                                                            <textarea  class="form-control" ng-switch-when="textarea" ng-model="question.answer" rows="8" cols="40"></textarea>\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                              </div>\n                                          </div>\n                                          </div>\n                                          <!-- actions -->\n                                          <div class="form-actions">\n                                            <div  ng-switch="attribute.nodeName" class="btn-set pull-left">\n                                              <button class="btn red-haze "  ng-click="end()">\n                                                <span  class="fa fa-times" > Close</span>\n                                              </button>\n                                              <!-- <button class="btn red-haze "  ng-click="end()">\n                                                <span ng-if="attribute.nodeName ==\'end\'" ng-repeat=\'attribute in currentQuestion.value.attributes\' class="fa fa-times" > Finish</span>\n                                              </button> -->\n                                              <button class="btn blue-haze"  ng-show="count" ng-click="back()"><span class="glyphicon glyphicon-chevron-left"></span>Back</button>\n                                            </div>\n                                            <div class="btn-set pull-right">\n                                              <button  ng-show=" currentQuestion.button" class="btn blue-hoki"   ng-click="next(currentQuestion.button.target, currentQuestion.button.value)">Next<span class="glyphicon glyphicon-chevron-right" ></span></button>\n                                              <button ng-repeat=\'edge in currentQuestion.edges track by $index\' ng-show="(edge.source.id == currentQuestion.id) && !edge.value" class="btn blue-hoki"   ng-click="next(edge.target)">Next<span class="glyphicon glyphicon-chevron-right" ></span></button>\n                                            </div>\n                                          </div>\n                                      </form>\n                                  </div>\n                                </div>\n                            </div>\n                        </div>\n                 </div>\n        </div>\n  </div>\n  <!-- END PORTLET BODY -->\n</div>\n'),a.put("app/main/template/template.notification.html",'<div class="ui-notification alert alert-block" ng-class="class" style="width: 350px; margin-top: 50px;">\n  <h4 ng-show="title" class="alert-heading"><i class="{{icon}}"></i> {{title}}</h4>\n  <hr>\n  <p ng-bind-html="message"></p>\n  <br>\n  <p>\n    <a class="btn btn-success close-notification" href="#" ng-click="nAccept()"><i class="glyphicon glyphicon-ok"></i> {{acceptBtn}} </a>\n    <a class="btn btn-danger close-notification" href="#" ng-click="nReject()"><i class="glyphicon glyphicon-remove"></i> {{rejectBtn}} </a>\n  </p>\n</div>\n'),a.put("app/main/template/template.reportBuilderView.html",'<div class="alert alert-warning alert-group">\n        <div class="form-inline" data-ng-class="{\'has-error\': forms.report.$submitted && !group.rules.length}">\n            <select ng-options="o.name as o.name for o in operators" ng-model="group.operator" class="form-control input-sm"></select>\n            <button style="margin-left: 5px" type="button" ng-click="addCondition()" class="btn btn-sm btn-success"><span class="glyphicon glyphicon-plus-sign"></span> {{\'APPLICATION_ADD_CONDITION\' | translate}}</button>\n            <button style="margin-left: 5px" type="button" ng-click="addGroup()" class="btn btn-sm btn-success"><span class="glyphicon glyphicon-plus-sign"></span> {{\'APPLICATION_ADD_GROUP\' | translate}}</button>\n            <button style="margin-left: 5px" type="button" ng-click="removeGroup()" class="btn btn-sm btn-danger"><span class="glyphicon glyphicon-minus-sign"></span> {{\'APPLICATION_REMOVE_GROUP\' | translate}}</button>\n        </div>\n        <div class="group-conditions">\n            <div ng-repeat="rule in group.rules | orderBy:\'index\'" class="condition">\n                <div ng-switch="rule.hasOwnProperty(\'group\')">\n                    <div ng-switch-when="true">\n                        <report-builder group="rule.group" fields="fields" forms="forms"></report-builder>\n                    </div>\n                    <div ng-switch-default="ng-switch-default">\n                        <div class="row">\n                          <div class="col-md-2" data-ng-class="{\'has-error\': forms.report.$submitted && !rule.field}">\n                          <ui-select data-ng-model="rule.field" theme="bootstrap" dynamic-name="randomName()" required>\n                            <ui-select-match placeholder="" ><span ng-bind-html="$select.selected.name"></span></ui-select-match>\n                            <ui-select-choices repeat="field.value as field in fields | filter: $select.search">\n                              <div ng-bind-html="field.name | highlight: $select.search"></div>\n                            </ui-select-choices>\n                          </ui-select>\n                          <span data-ng-show="forms.report.$submitted && !rule.field" class="help-block help-block-error">\n                            <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                          </span>\n                        </div>\n                        <div class="col-md-1">\n                          <ui-select data-ng-model="rule.condition" theme="bootstrap" dynamic-name="randomName()" data-ng-change="inputIsRequired(rule)" data-ng-init="inputIsRequired(rule)">\n                            <ui-select-match placeholder="">{{$select.selected.name}}</ui-select-match>\n                            <ui-select-choices repeat="condition.name as condition in conditions | filter: $select.search">\n                              <div ng-bind-html="condition.name | highlight: $select.search"></div>\n                            </ui-select-choices>\n                          </ui-select>\n                        </div>\n                          <div class="col-md-2" data-ng-class="{\'has-error\': forms.report.$submitted && !rule.value}" data-ng-if="rule.required">\n                            <input type="text" ng-model="rule.value" class="form-control" dynamic-name="randomName()" data-ng-required="requiredInput"/>\n                            <span data-ng-show="forms.report.$submitted && !rule.value" class="help-block help-block-error">\n															<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n														</span>\n                          </div>\n                            <button style="margin-left: 5px" ng-click="removeCondition($index)" class="btn btn-sm btn-danger" type="button"><span class="glyphicon glyphicon-minus-sign"></span></button>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n'),a.put("app/main/template/template.tigerDialDisposal.html",'<div class="row margin-top-20 contact-tab-container">\n  <div class="portlet light bordered">\n    <div class="row portfolio-block" data-ng-if="workspace.spooler.destcalleridnum && workspace.spooler.queue && workspace.spooler.agentconnectAt">\n      <div class="col-md-2">\n        <div class="portfolio-text">\n          <img src="assets/images/media/outboundroute.png" class="td-disposal-logo" alt=""/>\n        </div>\n      </div>\n      <div class="col-md-3 portfolio-stat">\n        <div>{{\'APPLICATION_CALLED_NUMBER\' | translate}} </div>\n        <p>  {{workspace.spooler.destcalleridnum}} </p>\n      </div>\n      <div class="col-md-3 portfolio-stat">\n        <div>{{\'APPLICATION_QUEUE\' | translate}} </div>\n        <p>  {{workspace.spooler.queue}} </p>\n      </div>\n      <div class="col-md-3 portfolio-stat">\n        <div>{{\'APPLICATION_DATE\' | translate}} </div>\n        <p>  {{workspace.spooler.agentconnectAt | date:\'dd/MM/yyyy HH:mm:ss\'}} </p>\n      </div>\n</div>\n    <div class="portlet-title">\n      <div class="caption font-blue-hoki">\n        <span class="caption-subject">{{ workspace.spooler.calleridname }} {{ \'APPLICATION_MOTION_DIALER\' | translate }} {{ \'APPLICATION_DISPOSITION\' | translate }} </span>\n      </div>\n    </div>\n    <div class="portlet-body">\n      <div class="padding-bottom row">\n        <div class="col-md-12" data-ng-form="tdForm">\n          <!-- START RETRIEVE -->\n          <div class="form-group" data-ng-class="{\'has-error\': (tdForm.retrieve.$touched || tdForm.$submitted) && tdForm.retrieve.$invalid}">\n            <label class="control-label">{{ \'APPLICATION_STATUS\' | translate }}<span class="required" aria-required="true">*</span></label>\n            <select name="retrieve" class="form-control" data-ng-model="entitySpooler.retrieve" required>\n              <option value="CLOSED">CLOSE</option>\n              <option value="OPEN">OPEN</option>\n              <option value="BLACK_LIST">BLACKLIST</option>\n              <option value="PLANNED">PLANNING</option>\n              <option value="PLANNED_PEER">PLANNING AGENT</option>\n            </select>\n            <span data-ng-show="(tdForm.retrieve.$touched || tdForm.$submitted) && tdForm.retrieve.$error.required" class="help-block help-block-error">\n              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n            </span>\n          </div>\n          <!-- END RETRIEVE -->\n          <!-- START PLANNING DATE -->\n          <div class="form-group" data-ng-if="entitySpooler.retrieve == \'PLANNED\' || entitySpooler.retrieve == \'PLANNED_PEER\'" data-ng-class="{\'has-error\': (tdForm.date.$touched || tdForm.$submitted) && tdForm.date.$invalid}">\n            <label class="control-label">PLANNING DATE<span class="required" aria-required="true">*</span></label>\n            <uib-datepicker name="date" ng-model="entitySpooler.planningtime" required="entitySpooler.retrieve == \'PLANNED\' || entitySpooler.retrieve == \'PLANNED_PEER\'" data-ng-init="entitySpooler.planningtime = moment();"></uib-datepicker>\n            <span data-ng-show="(tdForm.date.$touched || tdForm.$submitted) && tdForm.date.$error.required" class="help-block help-block-error">\n              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n            </span>\n          </div>\n          <!-- END PLANNING DATE -->\n          <!-- START PLANNING TIME -->\n          <div class="form-group" data-ng-if="entitySpooler.retrieve == \'PLANNED\' || entitySpooler.retrieve == \'PLANNED_PEER\'" data-ng-class="{\'has-error\': (tdForm.time.$touched || tdForm.$submitted) && tdForm.time.$invalid}">\n            <label class="control-label">PLANNING TIME<span class="required" aria-required="true">*</span></label>\n            <uib-timepicker name="time" ng-model="entitySpooler.planningtime" required="entitySpooler.retrieve == \'PLANNED\' || entitySpooler.retrieve == \'PLANNED_PEER\'" show-meridian="false" show-seconds="false"></uib-timepicker>\n            <span data-ng-show="(tdForm.time.$touched || tdForm.$submitted) && tdForm.time.$error.required" class="help-block help-block-error">\n              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n            </span>\n          </div>\n          <!-- END PLANNING TIME -->\n          <!-- START PLANNING PEER -->\n          <div class="form-group" data-ng-if="entitySpooler.retrieve == \'PLANNED_PEER\'" data-ng-class="{\'has-error\': (tdForm.agent.$touched || tdForm.$submitted) && tdForm.agent.$invalid}">\n            <label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n            <select name="agent" class="form-control" data-ng-model="entitySpooler.planningpeer" ng-options="agent for agent in agents" required="entitySpooler.retrieve == \'PLANNED_PEER\'">\n            </select>\n            <span data-ng-show="(tdForm.agent.$touched || tdForm.$submitted) && tdForm.agent.$error.required" class="help-block help-block-error">\n              <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n            </span>\n          </div>\n          <!-- END PLANNING PEER -->\n          <button type="button" class="btn btn-circle green-haze btn-sm" data-ng-disabled="!tdForm.$valid" data-ng-click="save()">{{\'APPLICATION_SAVE\' | translate}}</button>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n'),a.put("app/market/market.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-handbag"></i>\n						<a href="/market">Market Place</a>\n          </li>\n        </ul>\n			</div>\n		</div>\n</div>\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n  <div class="col-md-12">\n    <!-- Our Integration -->\n    <div class="headline">\n      <h3>Our Integrations</h3>\n    </div>\n    <div class="row thumbnails" data-ng-repeat="group in groupedIntegration">\n      <div class="col-md-3" data-ng-repeat="integration in group">\n        <div class="our-integrations">\n          <h3> {{integration.name}} <small> {{integration.author}}</small></h3>\n          <img data-ng-src="{{integration.logo}}" alt="{{integration.name}}" class="img-responsive"/>\n          <div class="integration-info" data-ng-if="!integration.downloading">\n            <p>\n              {{integration.description}}\n            </p>\n            <div class="pull-right">\n	            <a data-ng-disabled="isProgressing" data-ng-if="!integration.active" data-ng-click="installIntegration(integration)" href="#" class="btn btn-xs green-meadow">Install <i class="fa fa-download"></i></a>\n							<a data-ng-disabled="isProgressing" data-ng-if="integration.active" data-ng-click="uninstallIntegration(integration)" href="#" class="btn btn-xs red-sunglo">Uninstall <i class="fa fa-trash"></i></a>\n	            <a href="{{integration.link}}" class="btn btn-xs grey-cascade" target="_blank">More <i class="fa fa-link"></i></a>\n            </div>\n          </div>\n					<div class="integration-info" data-ng-if="integration.downloading">\n						<div>\n							<uib-progressbar class="progress-striped active" value="percentage" type="success"><i style="color:black;">{{status}}</i></uib-progressbar>\n						</div>\n          </div>\n        </div>\n      </div>\n		</div>\n    <!--/thumbnails-->\n    <!-- //End Meer Our Team -->\n  </div>\n</div>\n'),a.put("app/motiondialer/blacklist/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CONTACT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START PHONE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.phone.$touched || form.$submitted) && form.phone.$invalid}">\n      <label class="control-label">{{\'APPLICATION_PHONE\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="phone" placeholder="{{\'APPLICATION_PHONE\' | translate}}" class="form-control" data-ng-model="item.phone" required/>\n      <span data-ng-show="(form.phone.$touched || form.$submitted) && form.phone.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END PHONE -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/motiondialer/blacklist/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-control-forward"></i>\n					<a href="#">Motion Dialer</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n        <li>\n          <i class="icon-doc"></i>\n          <a href="#">{{ \'APPLICATION_BLACKLIST\' | translate }}</a>\n        </li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-doc font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_BLACKLIST\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONTACT\' | translate }}\n						</button>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/motiondialer/info/view/view.about.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_ABOUT\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n        <form class="form-horizontal form-row-seperated">\n          <div class="form-body">\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Specification</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="{{properties.SpecificationTitle}} ({{properties.SpecificationVersion}}) - {{properties.SpecificationVendor}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Implementation</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="{{properties.ImplementationTitle}} ({{properties.ImplementationVersion}}) - {{properties.ImplementationVendor}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Start Time</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" data-ng-model="properties.StartTime" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Uptime</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" data-ng-model="properties.Uptime" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Operating System</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="{{properties.OsName}} {{properties.OsVersion}} {{properties.OsArch}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Processors</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" data-ng-model="properties.Processors" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">System Start Time</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" data-ng-model="properties.SystemStartTime" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">System Uptime</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" data-ng-model="properties.SystemUptime" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">File System</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="Usable: {{properties.FileSystem.Usable | number:2}} Free: {{properties.FileSystem.Free | number:2}} Total: {{properties.FileSystem.Total | number:2}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n          </div>\n        </form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/motiondialer/info/view/view.details.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_DETAILS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n        <form class="form-horizontal form-row-seperated">\n          <div class="form-body">\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Java Specification Name</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" data-ng-model="properties.JavaSpecificationName" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Java Home</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" data-ng-model="properties.JavaHome" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">JavaVm</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="{{properties.JavaVmName}} ({{properties.JavaVmVersion}} {{properties.JavaVmInfo}}) - {{properties.JavaVmVendor}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Java</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="Java ({{properties.JavaVersion}} {{properties.JavaClassVersion}}) - {{properties.JavaVendor}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Java Runtime</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="{{properties.JavaRuntimeName}} ({{JavaRuntimeVersion}})" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Java Rmi Server Hostname</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="{{properties.JavaRmiServerHostname}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">User</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="{{properties.UserName}} {{properties.UserLanguage}}-{{properties.UserCountry}} {{properties.UserTimezone}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">User Home</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="{{properties.UserHome}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n            <!-- START -->\n            <div class="form-group">\n              <label class="control-label col-md-3">Hostname</label>\n              <div class="col-md-9">\n                <input type="text" class="form-control" value="{{properties.Hostname}}" disabled/>\n                <span class="help-block">\n                </span>\n              </div>\n            </div>\n            <!-- END -->\n          </div>\n        </form>\n			</div>\n		</div>\n	</div>\n</div>\n'),
+a.put("app/motiondialer/info/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getProperties()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-control-forward"></i>\n					<a href="#">Motion Dialer</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-info"></i>\n					<a href="/motiondialer/info/view/properties">{{ \'APPLICATION_INFO\' | translate }}</a>\n					<i data-ng-show="variable" class="fa fa-angle-right"></i>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/template.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ \'APPLICATION_INFO\' | translate }}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.motiondialer.info.view.about\')}">\n							<a data-ng-href="/motiondialer/info/view/about">\n							<i class="icon-globe"></i>\n							{{ \'APPLICATION_ABOUT\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.motiondialer.info.view.details\')}">\n							<a data-ng-href="/motiondialer/info/view/details">\n							<i class="icon-support"></i>\n							{{ \'APPLICATION_DETAILS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/motiondialer/list/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_LIST\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/motiondialer/list/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-control-forward"></i>\n					<a href="#">Motion Dialer</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n        <li>\n          <i class="icon-docs"></i>\n          <a href="#">{{ \'APPLICATION_LISTS\' | translate }}</a>\n        </li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_LISTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_LIST\' | translate }}\n						</button>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="spinner-grid" spinner-start-active="true"></span>\n				<!-- END UI-GRID SPINNER -->\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/motiondialer/list/view/view.contact.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CONTACT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START PHONES -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.phones.$touched || form.$submitted) && form.phones.$invalid}">\n      <label class="control-label">{{\'APPLICATION_PHONES\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="phones" placeholder="{{\'APPLICATION_PHONES\' | translate}}" class="form-control" data-ng-model="item.phones" required/>\n      <span data-ng-show="(form.phones.$touched || form.$submitted) && form.phones.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span class="help-block">\n        <p>Insert one or multiple phones separated by commas, for example:</p>\n        <p>0123455678, 3456785673, 2345667899</p>\n      </span>\n    </div>\n    <!-- END PHONES -->\n\n    <!-- START TIMEZONE -->\n    <div class="form-group">\n      <label class="control-label">Timezone</label><br>\n      <select ng-model="item.timezone">\n        <option value="">--</option>\n        <optgroup ng-repeat="timezone in timezones" label="{{timezone.group}}">\n          <option ng-repeat="zone in timezone.zones" value="{{zone.value}}">{{zone.name}}</option>\n        </optgroup>\n      </select>\n    </div>\n    <!-- END TIMEZONE -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/motiondialer/list/view/view.contact.import.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CONTACT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START PHONES -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.phones.$touched || form.$submitted) && form.phones.$invalid}">\n      <label class="control-label">{{\'APPLICATION_PHONE\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select multiple data-ng-model="item.phones" theme="bootstrap" name="phones" data-ng-disabled="disabled" required>\n        <ui-select-match placeholder="{{ \'APPLICATION_PHONE\' | translate }}">{{$select.selected[$index]}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.phones.$touched || form.$submitted) && form.phones.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END PHONES -->\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}</label>\n      <ui-select data-ng-model="item.name" theme="bootstrap" name="name" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_NAME\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START ACCOUNT_CODE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.account.$touched || form.$submitted) && form.account.$invalid}">\n      <label class="control-label">{{\'APPLICATION_ACCOUNT_CODE\' | translate}}</label>\n      <ui-select data-ng-model="item.account" theme="bootstrap" account="account" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_ACCOUNT_CODE\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n    </div>\n    <!-- END ACCOUNT_CODE -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <ui-select data-ng-model="item.description" theme="bootstrap" name="description" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_DESCRIPTION\' | translate }}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n    </div>\n    <!-- END DESCRIPTION -->\n\n    <!-- START TIMEZONE -->\n    <!-- <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_TIMEZONE\' | translate}}</label><br>\n      <select ng-model="item.timezone">\n        <option value="">--</option>\n        <optgroup ng-repeat="timezone in timezones" label="{{timezone.group}}">\n          <option ng-repeat="zone in timezone.zones" value="{{zone.value}}">{{zone.name}}</option>\n        </optgroup>\n      </select>\n    </div> -->\n    <!-- END TIMEZONE -->\n\n    <!-- START TIMEZONE -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_TIMEZONE\' | translate}}</label>\n      <ui-select data-ng-model="item.timezone" theme="bootstrap" name="description" data-ng-disabled="disabled">\n        <ui-select-match allow-clear placeholder="{{ \'APPLICATION_TIMEZONE\' | translate }}">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="timezone.value as timezone in uiTimeZones | filter: $select.search" group-by="\'group\'">\n          <div ng-bind-html="timezone.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n    </div>\n    <!-- END TIMEZONE -->\n\n    <!-- START VARIABLES -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.variables.$touched || form.$submitted) && form.variables.$invalid}">\n      <label class="control-label">{{\'APPLICATION_VARIABLES\' | translate}}</label>\n      <ui-select multiple data-ng-model="item.variables" theme="bootstrap" name="variables" data-ng-disabled="disabled">\n        <ui-select-match placeholder="{{ \'APPLICATION_VARIABLES\' | translate }}">{{$select.selected[$index]}}</ui-select-match>\n        <ui-select-choices repeat="index in indexes | filter: $select.search">\n          <div ng-bind-html="index | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.variables.$touched || form.$submitted) && form.variables.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END VARIABLES -->\n\n  </form>\n  <!-- START PROGRESS -->\n  <div>\n    <p>{{\'APPLICATION_IMPORT_SUCCEEDED\' | translate}}: {{import.succeeded}}/{{csvLength}}</p>\n    <div class="progress progress-sm" style="">\n      <div class="progress-bar progress-bar-info" role="progressbar" ng-style="{ \'width\': import.success + \'%\' }"></div>\n    </div>\n  </div>\n  <div>\n    <p>{{\'APPLICATION_IMPORT_FAILED\' | translate}}: {{import.failed}}/{{csvLength}}</p>\n    <div class="progress progress-sm" style="">\n      <div class="progress-bar progress-bar-danger" role="progressbar" ng-style="{ \'width\': import.fail + \'%\' }"></div>\n    </div>\n    <div class="has-error" data-ng-if="noPhone.length">\n      <span class="help-block help-block-error">\n        {{\'APPLICATION_CONTACTS_WITHOUT_PHONE\' | translate}}: {{noPhone}}\n      </span>\n    </div>\n  </div>\n  <!-- END PROGRESS -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="start()" ng-disabled="form.$invalid || !form.phones || submitted">{{ \'APPLICATION_SUBMIT\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="close()" data-ng-if="!importing">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="stop()" data-ng-if="importing">{{ \'APPLICATION_STOP\' | translate }}</button>\n</div>\n'),a.put("app/motiondialer/list/view/view.contacts.html",'<div class="row" data-ng-init="getContacts()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_LIST\' | translate}} {{ \'APPLICATION_CONTACTS\' | translate}} </span>\n				</div>\n			</div>\n\n			<div class="portlet-body">\n				<div class="btn-group">\n					<button class="btn green-jungle margin-bottom-10" ng-click="createContact()">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONTACT\' | translate }}\n					</button>\n					<span class="btn default btn-file">\n						<span class="fileinput-new"><i class="icon-cloud-upload"></i> {{\'APPLICATION_IMPORT_FROM_CSV\' | translate}}</span>\n						<input type="file" nv-file-select="" uploader="uploader"/>\n					</span>\n				</div>\n\n				<!-- <div class="btn-group">\n					<button class="btn green-jungle" data-ng-click="newContact();">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONTACT\' | translate }}\n					</button>\n\n				</div> -->\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="spinner-grid" spinner-start-active="true"></span>\n				<!-- END UI-GRID SPINNER -->\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/motiondialer/list/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getList()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-control-forward"></i>\n					<a href="#">Motion Dialer</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-doc"></i>\n					<a href="/motiondialer/lists/list">{{ \'APPLICATION_LISTS\' | translate }}</a>\n					<i data-ng-show="list.name" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="list.name">\n					<a href="#">{{list.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/template.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{list.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.motiondialer.lists.view.settings\')}">\n							<a data-ng-href="/motiondialer/lists/view/{{list.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.motiondialer.lists.view.contacts\')}">\n							<a data-ng-href="/motiondialer/lists/view/{{list.id}}/contacts">\n							<i class="icon-people"></i>\n							{{ \'APPLICATION_CONTACTS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/motiondialer/list/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_LIST\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_general" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- START GENERAL TAB -->\n					<div class="tab-pane active" id="tab_general">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateList()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="list.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="list.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/motiondialer/process/list/list.create.queue.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PROCESS\' | translate }} {{\'APPLICATION_QUEUE\' | translate}}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" ng-init="initModal()" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n    <!-- START LIST -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.list.$touched || form.$submitted) && form.list.$invalid}">\n      <label class="control-label">{{\'APPLICATION_LIST\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <select name="list" class="form-control" data-ng-model="item.list" ng-options="list.name for list in lists" required>\n      </select>\n      <span data-ng-show="(form.list.$touched || form.$submitted) && form.list.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END LIST -->\n    <!-- START QUEUE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.queue.$touched || form.$submitted) && form.queue.$invalid}">\n      <label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <select name="queue" class="form-control" data-ng-model="item.queue" ng-options="queue.name for queue in queues" required>\n      </select>\n      <span data-ng-show="(form.queue.$touched || form.$submitted) && form.queue.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END QUEUE -->\n    <!-- START TIMEOUT QUEUE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.timeout.$touched || form.$submitted) && form.timeout.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="number" min="1" name="timeout" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}}" class="form-control" data-ng-model="item.timeout" required/>\n      <span data-ng-show="(form.timeout.$touched || form.$submitted) && form.timeout.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="form.timeout.$error.max || form.timeout.$error.min" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n      </span>\n    </div>\n    <!-- END MAX RETRIES -->\n    <!-- START TRUNK -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.device.$touched || form.$submitted) && form.device.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TRUNK\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <select name="device" class="form-control" data-ng-model="item.device" ng-options="trunk.name for trunk in trunks" required>\n        <option value="fake">{{\'APPLICATION_SELECT\' | translate}} {{\'APPLICATION_TRUNK\' | translate}}</option>\n      </select>\n      <span data-ng-show="(form.queue.$touched || form.$submitted) && form.queue.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TRUNK -->\n    <!-- START FETCH SORT -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_FETCH_SORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <select name="fetch_sort" class="form-control" data-ng-model="item.fetch_sort" ng-options="fetch_sort for fetch_sort in [\'ASC\', \'DESC\']" required>\n      </select>\n      <span class="help-block">{{\'DESCRIPTION_TD_FETCH_SORT\' | translate}}</span>\n    </div>\n    <!-- END  FETCH SORT-->\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/motiondialer/process/list/list.create.square.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PROCESS\' | translate }} {{\'APPLICATION_CALLYSQUARE\' | translate}}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" ng-init="initModal()" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n    <!-- START LIST -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.list.$touched || form.$submitted) && form.list.$invalid}">\n      <label class="control-label">{{\'APPLICATION_LIST\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <select name="list" class="form-control" data-ng-model="item.list" ng-options="list.name for list in lists" required>\n      </select>\n      <span data-ng-show="(form.list.$touched || form.$submitted) && form.list.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END LIST -->\n    <!-- START PROJECT -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.project.$touched || form.$submitted) && form.project.$invalid}">\n      <label class="control-label">{{\'APPLICATION_PROJECT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <select name="project" class="form-control" data-ng-model="item.project" ng-options="project.name for project in projects" required>\n      </select>\n      <span data-ng-show="(form.project.$touched || form.$submitted) && form.project.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END PROJECT -->\n    <!-- START TRUNK -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.device.$touched || form.$submitted) && form.device.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TRUNK\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <select name="device" class="form-control" data-ng-model="item.device" ng-options="trunk.name for trunk in trunks" required>\n        <option value="fake">{{\'APPLICATION_SELECT\' | translate}} {{\'APPLICATION_TRUNK\' | translate}}</option>\n      </select>\n      <span data-ng-show="(form.device.$touched || form.$submitted) && form.device.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END TRUNK -->\n    <!-- START FETCH SORT -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_FETCH_SORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <select name="fetch_sort" class="form-control" data-ng-model="item.fetch_sort" ng-options="fetch_sort for fetch_sort in [\'ASC\', \'DESC\']" required>\n      </select>\n      <span class="help-block">{{\'DESCRIPTION_TD_FETCH_SORT\' | translate}}</span>\n    </div>\n    <!-- END  FETCH SORT-->\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),
+a.put("app/motiondialer/process/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-control-forward"></i>\n					<a href="#">Motion Dialer</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n        <li>\n          <i class="icon-settings"></i>\n          <a href="#">{{ \'APPLICATION_PROCESSES\' | translate }}</a>\n        </li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_PROCESSES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group">\n						<button class="btn green-jungle dropdown-toggle" data-toggle="dropdown" data-close-others="true">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_PROCESS\' | translate }}\n						</button>\n						<ul class="dropdown-menu pull-right">\n							<li>\n								<a href="#" ng-click="createProcessQueue()">{{ \'APPLICATION_QUEUE\' | translate }}</a>\n							</li>\n							<li>\n								<a href="#" ng-click="createProcessSquare()">{{ \'APPLICATION_CALLYSQUARE\' | translate | trusted}}</a>\n							</li>\n						</ul>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="spinner-grid" spinner-start-active="true"></span>\n				<!-- END UI-GRID SPINNER -->\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/motiondialer/process/view/view.create.interval.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_INTERVAL\' | translate }} </h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n    <!-- START TIME -->\n    <div class="form-group">\n      <label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n      <div class="input-group input-large">\n        <fieldset class="pull-left" ng-disabled="splittedInterval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="splittedInterval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n        <div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n        <fieldset ng-disabled="splittedInterval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="splittedInterval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n        <label class="control-label pointer-cursor"><input type="checkbox" data-ng-model="splittedInterval.alwaysTime">{{\'APPLICATION_ALWAYS\' | translate}}</label>\n      </div>\n    </div>\n    <!-- END TIME -->\n\n    <!-- START WEEKDAY -->\n    <div class="form-group">\n      <label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n      <div class="input-group input-large">\n        <ui-select data-ng-model="splittedInterval.wd_from" theme="bootstrap" name="wd_from">\n          <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n          <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n            {{weekDay.name | translate}}\n          </ui-select-choices>\n        </ui-select>\n        <span class="input-group-addon">to</span>\n        <ui-select data-ng-model="splittedInterval.wd_to" theme="bootstrap" name="wd_to">\n          <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n          <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n            {{weekDay.name | translate}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n    </div>\n    <!-- END WEEKDAY -->\n\n    <!-- START MONTHDAY -->\n    <div class="form-group">\n      <label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n      <div class="input-group input-large">\n        <ui-select data-ng-model="splittedInterval.md_from" theme="bootstrap" name="md_from">\n          <ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n          <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n            {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n          </ui-select-choices>\n        </ui-select>\n        <span class="input-group-addon">to</span>\n        <ui-select data-ng-model="splittedInterval.md_to" theme="bootstrap" name="md_to">\n          <ui-select-match>{{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}</ui-select-match>\n          <ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search">\n            {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n    </div>\n    <!-- END MONTHDAY -->\n\n    <!-- START MONTH -->\n    <div class="form-group">\n      <label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n      <div class="input-group input-large">\n        <ui-select data-ng-model="splittedInterval.m_from" theme="bootstrap" name="m_from">\n          <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n          <ui-select-choices repeat="month.value as month in $interval.monthsNumber | filter: $select.search">\n            {{month.name | translate}}\n          </ui-select-choices>\n        </ui-select>\n        <span class="input-group-addon">to</span>\n        <ui-select data-ng-model="splittedInterval.m_to" theme="bootstrap" name="m_to">\n          <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n          <ui-select-choices repeat="month.value as month in $interval.monthsNumber | filter: $select.search">\n            {{month.name | translate}}\n          </ui-select-choices>\n        </ui-select>\n      </div>\n    </div>\n    <!-- END MONTH -->\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/motiondialer/process/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getProcess()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-control-forward"></i>\n					<a href="#">Motion Dialer</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-settings"></i>\n					<a href="/motiondialer/processes/list">{{ \'APPLICATION_PROCESSES\' | translate }}</a>\n					<i data-ng-show="process.name" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="process.name">\n					<a href="#">{{process.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/account.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{process.name}} ({{ (process.status === \'RUN\') ? \'RUNNING...\' : \'STOPPED\' }})\n					</div>\n					<div class="profile-usertitle-job">\n						<a href="/motiondialer/lists/view/{{process.id_list}}/settings">{{ \'APPLICATION_LIST\' | translate}} #{{process.id_list}} ({{process.fetch_sort}})</a>\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n        <div class="profile-userbuttons">\n					<button data-ng-show="process.status" type="button" class="btn btn-circle btn-sm" data-ng-class="{\'green-meadow\': process.status == \'STOP\', \'red-sunglo\': process.status == \'RUN\'}" data-ng-click="runOrStop()">{{ (process.status === \'RUN\') ? \'STOP\' : \'RUN\' }}</button>\n        </div>\n				<div class="profile-userbuttons">\n					<button style="cursor:default" data-ng-show="process.runtime" type="button" class="btn btn-circle btn-sm" data-ng-class="{\'green-meadow\': process.runtime.completed, \'yellow-crusta\': !process.runtime.completed}">{{process.runtime.completed ? \'Complete\' : \'Incomplete\'}}</button>\n					<button style="cursor:default" class="btn btn-circle btn-sm" data-ng-class="{\'green-meadow\': !process.runtime.outOfTime, \'red-sunglo\': process.runtime.outOfTime}"><i data-ng-class="{\'icon-clock\': !process.runtime.outOfTime, \'icon-close\': process.runtime.outOfTime}"></i> {{process.runtime.outOfTime ? \'Out of time\' : \'On time\'}}</button>\n				</div>\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n            <li data-ng-class="{active: $state.is(\'main.motiondialer.processes.view.overview\')}">\n							<a data-ng-href="/motiondialer/processes/view/{{process.id}}/overview">\n							<i class="icon-home"></i>\n							{{ \'APPLICATION_OVERVIEW\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.motiondialer.processes.view.settings\')}">\n							<a data-ng-href="/motiondialer/processes/view/{{process.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.motiondialer.processes.view.intervals\')}">\n							<a data-ng-href="/motiondialer/processes/view/{{process.id}}/intervals">\n							<i class="icon-clock"></i>\n							{{ \'APPLICATION_INTERVALS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.motiondialer.processes.view.spooler\')}">\n							<a data-ng-href="/motiondialer/processes/view/{{process.id}}/spooler">\n							<i class="icon-options-vertical"></i>\n							{{ \'APPLICATION_SPOOLER\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/motiondialer/process/view/view.intervals.html",'<div class="row" data-ng-init="initIntervals()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-clock  theme-font"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROCESS\' | translate}} {{ \'APPLICATION_INTERVALS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_allow" data-toggle="tab">{{ \'APPLICATION_ALLOW\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_disallow" data-toggle="tab">{{ \'APPLICATION_DISALLOW\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- ALLOW TAB -->\n					<div class="tab-pane active" id="tab_allow">\n						<button class="btn green-jungle margin-bottom-10" ng-click="createInterval(true)">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_INTERVAL\' | translate }} ({{ \'APPLICATION_ALLOW\' | translate }})\n						</button>\n						<table class="table table-bordered table-hover">\n							<thead>\n							<tr role="row" class="heading">\n								<th>\n									 {{ \'APPLICATION_VALUE\' | translate}}\n								</th>\n								<th>\n									 {{ \'APPLICATION_ACTIONS\' | translate}}\n								</th>\n							</tr>\n							</thead>\n							<tbody>\n							<tr ng-repeat="interval in process.intervals track by $index">\n								<td>\n									{{interval}}\n								</td>\n								<td>\n									<button href="javascript:;" data-ng-click="editInterval(true, interval)" class="btn blue-hoki btn-sm"> {{ \'APPLICATION_EDIT\' | translate}} </button>\n									<button data-ng-click="deleteInterval(interval, $index, true)" class="btn red-sunglo btn-sm"> {{ \'APPLICATION_DELETE\' | translate}} </button>\n								</td>\n							</tr>\n							<tr ng-show="!process.intervals.length"><td colspan=2>{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</td></tr>\n							</tbody>\n						</table>\n					</div>\n					<!-- END ALLOW TAB -->\n					<!-- DISALLOW TAB -->\n					<div class="tab-pane" id="tab_disallow">\n						<button class="btn green-jungle margin-bottom-10" ng-click="createInterval(false)">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_INTERVAL\' | translate }} ({{ \'APPLICATION_DISALLOW\' | translate }})\n						</button>\n						<table class="table table-bordered table-hover">\n							<thead>\n							<tr role="row" class="heading">\n								<th>\n									 {{ \'APPLICATION_VALUE\' | translate}}\n								</th>\n								<th>\n									 {{ \'APPLICATION_ACTIONS\' | translate}}\n								</th>\n							</tr>\n							</thead>\n							<tbody>\n							<tr ng-repeat="interval in process.not_intervals track by $index">\n								<td>\n									{{interval}}\n								</td>\n								<td>\n									<button href="javascript:;" data-ng-click="editInterval(false, interval)" class="btn blue-hoki btn-sm"> {{ \'APPLICATION_EDIT\' | translate}} </button>\n									<button href="javascript:;" data-ng-click="deleteInterval($index, interval, false)" class="btn red-sunglo btn-sm"> {{ \'APPLICATION_DELETE\' | translate}} </button>\n								</td>\n							</tr>\n							<tr ng-show="!process.not_intervals.length"><td colspan=2>{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</td></tr>\n							</tbody>\n						</table>\n\n					</div>\n					<!-- END DISALLOW TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/motiondialer/process/view/view.overview.html",'<div class="row" data-ng-init="getSummary()">\n  <div class="col-md-12">\n    <!-- BEGIN PORTLET -->\n    <div class="portlet light">\n      <div class="portlet-title tabbable-line">\n        <div class="caption caption-md">\n          <i class="icon-bar-chart theme-font hide"></i>\n          <span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_OVERVIEW\' | translate}}</span>\n        </div>\n        <ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_summary" data-toggle="tab">{{ \'APPLICATION_SUMMARY\' | translate}}</a>\n					</li>\n          <li ng-show="process.runtime">\n						<a href="#" data-target="#tab_advanced" data-toggle="tab">{{ \'APPLICATION_ADVANCED\' | translate}}</a>\n					</li>\n				</ul>\n      </div>\n      <div class="portlet-body">\n        <div class="tab-content">\n					<!-- START SUMMARY TAB -->\n					<div class="tab-pane active" id="tab_summary">\n            <!-- BEGIN UI-GRID SPINNER -->\n    				<span us-spinner spinner-key="spinner-grid" spinner-start-active="true"></span>\n    				<!-- END UI-GRID SPINNER -->\n            <div class="row number-stats margin-bottom-30">\n              <div class="col-md-6 col-sm-6 col-xs-6">\n                <div class="stat-left">\n                  <div class="stat-number">\n                    <div class="title">\n                       {{\'APPLICATION_TOTAL\' | translate}}\n                    </div>\n                    <div class="number">\n                       {{total}}\n                    </div>\n                  </div>\n                </div>\n              </div>\n              <div class="col-md-6 col-sm-6 col-xs-6">\n                <div class="stat-right">\n                  <div class="stat-number">\n                    <div class="title">\n                       {{\'APPLICATION_FRESH\' | translate}}\n                    </div>\n                    <div class="number">\n                       {{process.runtime.fresh || 0}}\n                    </div>\n                  </div>\n                </div>\n              </div>\n            </div>\n            <div class="table-scrollable table-scrollable-borderless">\n              <table class="table table-hover table-light">\n              <thead>\n              <tr class="uppercase">\n                <th>\n                   {{\'APPLICATION_STATUS\' | translate}}\n                </th>\n                <th>\n                   {{\'APPLICATION_VALUE\' | translate}}\n                </th>\n                <th>\n                   {{\'APPLICATION_RATE\' | translate}}\n                </th>\n                <th>\n                   {{\'APPLICATION_DESCRIPTION\' | translate}}\n                </th>\n              </tr>\n              </thead>\n              <tr ng-repeat="sum in summary">\n                <td>\n                  <a href="#" class="primary-link">{{\'APPLICATION_TD_\' + sum[0] | translate}}</a>\n                </td>\n                <td>\n                   {{sum[1]}}\n                </td>\n                <td>\n                  <span class="bold theme-font">{{ total ? ((sum[1]/total)*100).toFixed(2) : 0 }}%</span>\n                </td>\n                <td>\n                   {{\'DESCRIPTION_TD_\' + sum[0] | translate}}\n                </td>\n              </tr>\n              </table>\n            </div>\n          </div>\n          <!-- END SUMMARY TAB -->\n          <!-- START SUMMARY TAB -->\n					<div class="tab-pane" id="tab_advanced" ng-show="process.runtime">\n            <div class="row number-stats margin-bottom-30">\n              <div class="col-md-6 col-sm-6 col-xs-6">\n                <div class="stat-left">\n                  <div class="stat-number">\n                    <div class="title">\n                       {{\'APPLICATION_SUCCESS\' | translate}}\n                    </div>\n                    <div class="number">\n                       {{process.runtime.success || 0}}\n                    </div>\n                  </div>\n                </div>\n              </div>\n              <div class="col-md-6 col-sm-6 col-xs-6">\n                <div class="stat-right">\n                  <div class="stat-number">\n                    <div class="title">\n                       {{\'APPLICATION_FAILED\' | translate}}\n                    </div>\n                    <div class="number">\n                       {{process.runtime.failed || 0}}\n                    </div>\n                  </div>\n                </div>\n              </div>\n            </div>\n            <div class="table-scrollable table-scrollable-borderless">\n              <table class="table table-hover table-light">\n              <thead>\n              <tr class="uppercase">\n                <th>\n                   {{\'APPLICATION_STATUS\' | translate}}\n                </th>\n                <th>\n                   {{\'APPLICATION_VALUE\' | translate}}\n                </th>\n                <th>\n                   {{\'APPLICATION_DESCRIPTION\' | translate}}\n                </th>\n              </tr>\n              </thead>\n              <tr ng-repeat="(key, value) in process.runtime">\n                <td>\n                  <a href="#" class="primary-link">{{\'APPLICATION_\' + key.toUpperCase() | translate}}</a>\n                </td>\n                <td ng-switch on="key">\n                   <span ng-switch-when="avgDial">{{value | number:2}}</span>\n                   <span ng-switch-when="avgDuration">{{value | number:2}}</span>\n                   <span ng-switch-when="avgProgress">{{value | number:2}}</span>\n                   <span ng-switch-when="completed">{{((value)? \'APPLICATION_YES\' : \'APPLICATION_NO\') | translate}}</span>\n                   <span ng-switch-when="outOfTime">{{((value)? \'APPLICATION_YES\' : \'APPLICATION_NO\') | translate}}</span>\n                   <span ng-switch-default>{{value}}</span>\n                </td>\n                <td>\n                   {{\'DESCRIPTION_TD_\' + key.toUpperCase() | translate}}\n                </td>\n              </tr>\n              </table>\n            </div>\n          </div>\n          <!-- END SUMMARY TAB -->\n        </div>\n      </div>\n    </div>\n    <!-- END PORTLET -->\n  </div>\n</div>\n'),a.put("app/motiondialer/process/view/view.run.process.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_STATUS\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <p>\n    Do you want to {{ status }} the process?\n  </p>\n</div>\n<div class="modal-footer">\n  <button class="btn default green-meadow" type="button" ng-click="yes()">{{ \'APPLICATION_YES\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="no()">{{ \'APPLICATION_NO\' | translate }}</button>\n</div>\n'),a.put("app/motiondialer/process/view/view.settings.html",'<div class="row" data-ng-init="initSettings()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROCESS\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_general" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_channel" data-toggle="tab">{{ \'APPLICATION_CHANNEL\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_advanced" data-toggle="tab">{{ \'APPLICATION_ADVANCED\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_status" data-toggle="tab">{{ \'APPLICATION_STATUS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_general">\n						<form name="form" data-ng-submit="form.$valid && updateProcess()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="process.name" required/>\n								<span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n							<!-- START QUEUE -->\n					    <div data-ng-show="process.queue != \'none\'" class="form-group" data-ng-class="{\'has-error\': (form.queue.$touched || form.$submitted) && form.queue.$invalid}">\n					      <label class="control-label">{{\'APPLICATION_QUEUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="process.queue" name="queue" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices repeat="queue.name as queue in queues | filter: $select.search">\n										<div ng-bind-html="queue.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n					      <span data-ng-show="(form.queue.$touched || form.$submitted) && form.queue.$error.required" class="help-block help-block-error">\n					        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n					      </span>\n					    </div>\n					    <!-- END QUEUE -->\n							<!-- START MAX RETRIES -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.max_retries.$touched || form.$submitted) && form.max_retries.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MAX_RETRIES\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" max="100" name="max_retries" placeholder="{{\'APPLICATION_MAX_RETRIES\' | translate}}" class="form-control" data-ng-model="process.max_retries" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_MAX_RETRIES\' | translate}}</span>\n								<span data-ng-show="(form.max_retries.$touched || form.$submitted) && form.max_retries.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.max_retries.$error.max || form.max_retries.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END MAX RETRIES -->\n							<!-- START RETRY TIME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.retry_time.$touched || form.$submitted) && form.retry_time.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RETRY_TIME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="retry_time" placeholder="{{\'APPLICATION_RETRY_TIME\' | translate}}" class="form-control" data-ng-model="process.retry_time" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_RETRY_TIME\' | translate}}</span>\n								<span data-ng-show="(form.retry_time.$touched || form.$submitted) && form.retry_time.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.retry_time.$error.max || form.retry_time.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END RETRY TIME -->\n							<!-- START RETRY TIME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.wait_time.$touched || form.$submitted) && form.wait_time.$invalid}">\n								<label class="control-label">{{\'APPLICATION_WAIT_TIME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1000" name="wait_time" placeholder="{{\'APPLICATION_WAIT_TIME\' | translate}}" class="form-control" data-ng-model="process.wait_time" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_WAIT_TIME\' | translate}}</span>\n								<span data-ng-show="(form.wait_time.$touched || form.$submitted) && form.wait_time.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.wait_time.$error.max || form.wait_time.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END WAIT TIME -->\n							<!-- START AUTO CLOSED -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_AUTO_CLOSED\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="process.auto_closed"\n								type="checkbox"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-animate="false">\n								<span class="help-block">{{\'DESCRIPTION_TD_AUTO_CLOSED\' | translate}}</span>\n							</div>\n							<!-- END AUTO CLOSED -->\n							<!--	START WEIGHT -->\n							<!-- END WEIGHT -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_AUTODIAL_LEVEL\' | translate}}</label></br>\n								<slider ng-model="process.weight" min="0" step="1" max="50"></slider>\n								<label>{{\'APPLICATION_VALUE\' | translate}}: {{process.weight}}</label>\n								<span class="help-block">{{\'DESCRIPTION_TD_WEIGHT\' | translate}}</span>\n							</div>\n							<!-- START DISPOSAL -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_TD_DISPOSAL\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="process.disposal"\n								type="checkbox"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-animate="false">\n								<span class="help-block">{{\'DESCRIPTION_TD_DISPOSAL\' | translate}}</span>\n							</div>\n							<!-- END DISPOSAL -->\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="process.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n					<!-- CHANNEL TAB -->\n					<div class="tab-pane" id="tab_channel">\n						<form name="form" data-ng-submit="form.$valid && updateProcess()" novalidate>\n							<!-- START CONTEXT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.context.$touched || form.$submitted) && form.context.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="context" placeholder="{{\'APPLICATION_CONTEXT\' | translate}}" class="form-control" data-ng-model="process.context" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_CONTEXT\' | translate}}</span>\n								<span data-ng-show="(form.context.$touched || form.$submitted) && form.context.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CONTEXT -->\n							<!-- START EXTENSION -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.extension.$touched || form.$submitted) && form.extension.$invalid}">\n								<label class="control-label">{{\'APPLICATION_EXTENSION\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="extension" placeholder="{{\'APPLICATION_EXTENSION\' | translate}}" class="form-control" data-ng-model="process.extension" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_EXTENSION\' | translate}}</span><a href="/channels/voice/routes/internal/list">Link {{\'APPLICATION_INTERNAL\' | translate}}</a>\n								<span data-ng-show="(form.extension.$touched || form.$submitted) && form.extension.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END EXTENSION -->\n							<!-- START PRIORITY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.priority.$touched || form.$submitted) && form.priority.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PRIORITY\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="priority" placeholder="{{\'APPLICATION_PRIORITY\' | translate}}" class="form-control" data-ng-model="process.priority" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_PRIORITY\' | translate}}</span>\n								<span data-ng-show="(form.priority.$touched || form.$submitted) && form.priority.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.priority.$error.max || form.priority.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END PRIORITY -->\n							<!-- START PREFIX -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_PREFIX\' | translate}}</label>\n								<input type="text" name="prefix_code" placeholder="{{\'APPLICATION_PREFIX\' | translate}}" class="form-control" data-ng-model="process.prefix_code"/>\n								<span class="help-block">{{\'DESCRIPTION_TD_PREFIX\' | translate}}</span>\n							</div>\n							<!-- END PREFIX -->\n							<!-- START TECHNOLOGY -->\n					    <div class="form-group">\n					      <label class="control-label">{{\'APPLICATION_TECHNOLOGY\' | translate}}<span class="required" aria-required="true">*</span></label>\n					      <select name="tech" class="form-control" data-ng-model="process.tech" ng-options="tech for tech in techs" required>\n					      </select>\n								<span class="help-block">{{\'DESCRIPTION_TD_TECHNOLOGY\' | translate}}</span>\n					    </div>\n					    <!-- END TECHNOLOGY -->\n							<!-- START DEVICE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.device.$touched || form.$submitted) && form.device.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TRUNK\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="device" placeholder="{{\'APPLICATION_TRUNK\' | translate}}" class="form-control" data-ng-model="process.device" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_TRUNK\' | translate}}</span>\n								<span data-ng-show="(form.device.$touched || form.$submitted) && form.device.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END DEVICE -->\n							<!-- START CALLERID -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.callerid.$touched || form.$submitted) && form.callerid.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CALLERID\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="callerid" placeholder="{{\'APPLICATION_CALLERID\' | translate}}" class="form-control" data-ng-model="process.callerid" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_CALLERID\' | translate}}</span>\n								<span data-ng-show="(form.callerid.$touched || form.$submitted) && form.callerid.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CALLERID -->\n							<!-- START CODEC -->\n							<div class="form-group">\n								<label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n								<ui-select multiple data-ng-model="process.codecs" name="codecs" theme="bootstrap" data-ng-disabled="disabled">\n									<ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n									<ui-select-choices repeat="codec in codecs">\n										{{codec}}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n							<!-- END CODEC -->\n							<!-- START DIAL FORMAT -->\n					    <div class="form-group">\n					      <label class="control-label">{{\'APPLICATION_DIAL_FORMAT\' | translate}}<span class="required" aria-required="true">*</span></label>\n					      <select name="dial_format" class="form-control" data-ng-model="process.dial_format" ng-options="dial_format for dial_format in dialFormats" required>\n					      </select>\n								<span class="help-block">{{\'DESCRIPTION_TD_DIAL_FORMAT\' | translate}}</span>\n					    </div>\n					    <!-- END DIAL FORMAT -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CHANNEL TAB -->\n					<!-- ADVANCED TAB -->\n					<div class="tab-pane" id="tab_advanced">\n						<form name="form" data-ng-submit="form.$valid && updateProcess()" novalidate>\n							<!-- START CHECK DUPLICATE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_CHECK_DUPLICATE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<select name="check_duplicate" class="form-control" data-ng-model="process.check_duplicate" ng-options="check_duplicate for check_duplicate in checkDuplicates" required>\n								</select>\n								<span class="help-block">{{\'DESCRIPTION_TD_CHECK_DUPLICATE\' | translate}}</span>\n							</div>\n							<!-- END CHECK DUPLICATE -->\n							<!-- START CHECK BLACKLIST -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_CHECK_BLACKLIST\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="process.check_blacklist"\n								type="checkbox"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-animate="false">\n								<span class="help-block">{{\'DESCRIPTION_TD_CHECK_BLACKLIST\' | translate}}</span>\n							</div>\n							<!-- END CHECK BLACKLIST -->\n							<!-- START CHECK PHONE LENGHT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.check_phone_length.$touched || form.$submitted) && form.check_phone_length.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CHECK_PHONE_LENGHT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="check_phone_length" placeholder="{{\'APPLICATION_CHECK_PHONE_LENGHT\' | translate}}" class="form-control" data-ng-model="process.check_phone_length" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_CHECK_PHONE_LENGHT\' | translate}}</span>\n								<span data-ng-show="(form.check_phone_length.$touched || form.$submitted) && form.check_phone_length.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.check_phone_length.$error.max || form.check_phone_length.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END CHECK PHONE LENGHT -->\n							<!-- START TIME SLICE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.time_slice.$touched || form.$submitted) && form.time_slice.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIME_SLICE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="time_slice" placeholder="{{\'APPLICATION_TIME_SLICE\' | translate}}" class="form-control" data-ng-model="process.time_slice" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_TIME_SLICE\' | translate}}</span>\n								<span data-ng-show="(form.time_slice.$touched || form.$submitted) && form.time_slice.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.time_slice.$error.max || form.time_slice.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIME SLICE -->\n							<!-- START MISSED -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_CHECK_MISSED\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="process.missed"\n								type="checkbox"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-animate="false">\n								<span class="help-block">{{\'DESCRIPTION_TD_CHECK_MISSED\' | translate}}</span>\n							</div>\n							<!-- END MISSED -->\n							<!-- START CHANNEL LIMIT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.channel_limit.$touched || form.$submitted) && form.channel_limit.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CHANNEL_LIMIT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" name="channel_limit" placeholder="{{\'APPLICATION_CHANNEL_LIMIT\' | translate}}" class="form-control" data-ng-model="process.channel_limit" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_CHANNEL_LIMIT\' | translate}}</span>\n								<span data-ng-show="(form.channel_limit.$touched || form.$submitted) && form.channel_limit.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.channel_limit.$error.max || form.channel_limit.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END  CHANNEL LIMIT -->\n							<!-- START CONTEXT FOR OTHER CALLS -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_CONTEXT_FOR_OTHER_CALLS\' | translate}}</label>\n								<input type="text" name="context_for_other_calls" placeholder="{{\'APPLICATION_CONTEXT_FOR_OTHER_CALLS\' | translate}}" class="form-control" data-ng-model="process.context_for_other_calls"/>\n								<span class="help-block">{{\'DESCRIPTION_TD_CONTEXT_FOR_OTHER_CALLS\' | translate}}</span>\n							</div>\n							<!-- END CONTEXT FOR OTHER CALLS -->\n							<!-- START EXTENSION FOR OTHER CALLS-->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_EXTENSION_FOR_OTHER_CALLS\' | translate}}</label>\n								<input type="text" name="extension_for_other_calls" placeholder="{{\'APPLICATION_EXTENSION_FOR_OTHER_CALLS\' | translate}}" class="form-control" data-ng-model="process.extension_for_other_calls"/>\n								<span class="help-block">{{\'DESCRIPTION_TD_EXTENSION_FOR_OTHER_CALLS\' | translate}}</span>\n							</div>\n							<!-- END EXTENSION FOR OTHER CALLS-->\n							<!-- START PRIORITY FOR OTHER CALLS-->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.priority_for_other_calls.$touched || form.$submitted) && form.priority_for_other_calls.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PRIORITY_FOR_OTHER_CALLS\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="priority_for_other_calls" placeholder="{{\'APPLICATION_PRIORITY_FOR_OTHER_CALLS\' | translate}}" class="form-control" data-ng-model="process.priority_for_other_calls"/>\n								<span class="help-block">{{\'DESCRIPTION_TD_PRIORITY_FOR_OTHER_CALLS\' | translate}}</span>\n								<span data-ng-show="form.priority_for_other_calls.$error.max || form.priority_for_other_calls.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END PRIORITY FOR OTHER CALLS -->\n							<!-- START TIMEZONE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_EXTENDED_TIME_INTERVAL\' | translate}}</label>\n								<input type="text" name="timezone" placeholder="08:30-20:30" class="form-control" data-ng-model="process.timezone"/>\n								<span class="help-block">{{\'DESCRIPTION_TD_EXTENDED_TIME_INTERVAL\' | translate}}</span>\n							</div>\n							<!-- END TIMEZONE -->\n\n							<!-- START AUTO TIMEZONE MANAGEMENT -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_AUTO_TIMEZONE_MANAGEMENT\' | translate}}</label></br>\n								<input\n								bs-switch\n								data-ng-model="process.auto_timezone_management"\n								type="checkbox"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-animate="false">\n								<span class="help-block">{{\'DESCRIPTION_TD_AUTO_TIMEZONE_MANAGEMENT\' | translate}}</span>\n							</div>\n							<!-- END AUTO TIMEZONE MANAGEMENT -->\n							<!-- START IGNORE STRINGS-->\n							<!-- COMMENTED: BECAUSE IGNORE_STRINGS IS AN ARRAY NOT A STRING-->\n							<!-- <div class="form-group">\n								<label class="control-label">{{\'APPLICATION_IGNORE_STRINGS\' | translate}}</label>\n								<input type="text" name="ignore_strings" placeholder="{{\'APPLICATION_IGNORE_STRINGS\' | translate}}" class="form-control" data-ng-model="process.ignore_strings"/>\n								<span class="help-block">{{\'DESCRIPTION_TD_IGNORE_STRINGS\' | translate}}</span>\n							</div> -->\n							<!-- END IGNORE STRINGS-->\n							<!-- START MIN OPERATOR -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.min_operator.$touched || form.$submitted) && form.min_operator.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MIN_OPERATOR\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="min_operator" placeholder="{{\'APPLICATION_MIN_OPERATOR\' | translate}}" class="form-control" data-ng-model="process.min_operator" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_MIN_OPERATOR\' | translate}}</span>\n								<span data-ng-show="(form.min_operator.$touched || form.$submitted) && form.min_operator.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.min_operator.$error.max || form.min_operator.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END MIN OPERATOR -->\n							<!-- START ALERT MAX CALLS -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.alert_max_calls.$touched || form.$submitted) && form.alert_max_calls.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ALERT_MAX_CALLS\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" name="alert_max_calls" placeholder="{{\'APPLICATION_ALERT_MAX_CALLS\' | translate}}" class="form-control" data-ng-model="process.alert_max_calls" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_ALERT_MAX_CALLS\' | translate}}</span>\n								<span data-ng-show="(form.alert_max_calls.$touched || form.$submitted) && form.alert_max_calls.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.alert_max_calls.$error.max || form.alert_max_calls.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END ALERT MAX CALLS -->\n							<!-- START ALERT TIME SLICE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.alert_time_slice.$touched || form.$submitted) && form.alert_time_slice.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ALERT_TIME_SLICE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="alert_time_slice" placeholder="{{\'APPLICATION_ALERT_TIME_SLICE\' | translate}}" class="form-control" data-ng-model="process.alert_time_slice" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_ALERT_TIME_SLICE\' | translate}}</span>\n								<span data-ng-show="(form.alert_time_slice.$touched || form.$submitted) && form.alert_time_slice.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.alert_time_slice.$error.max || form.alert_time_slice.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END ALERT TIME SLICE -->\n							<!-- START DROP MAX COUNT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.drop_max_count.$touched || form.$submitted) && form.drop_max_count.$invalid}">\n								<label class="control-label">{{\'APPLICATION_DROP_MAX_COUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" name="drop_max_count" placeholder="{{\'APPLICATION_DROP_MAX_COUNT\' | translate}}" class="form-control" data-ng-model="process.drop_max_count" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_DROP_MAX_COUNT\' | translate}}</span>\n								<span data-ng-show="(form.drop_max_count.$touched || form.$submitted) && form.drop_max_count.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.drop_max_count.$error.max || form.drop_max_count.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END DROP MAX COUNT -->\n							<!-- START SUCCESS CALL SIZE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (form.success_call_size.$touched || form.$submitted) && form.success_call_size.$invalid}">\n								<label class="control-label">{{\'APPLICATION_SUCCESS_CALL_SIZE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="success_call_size" placeholder="{{\'APPLICATION_SUCCESS_CALL_SIZE\' | translate}}" class="form-control" data-ng-model="process.success_call_size" required/>\n								<span class="help-block">{{\'DESCRIPTION_TD_SUCCESS_CALL_SIZE\' | translate}}</span>\n								<span data-ng-show="(form.success_call_size.$touched || form.$submitted) && form.success_call_size.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.success_call_size.$error.max || form.success_call_size.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END SUCCESS CALL SIZE -->\n							<!-- START IGNORE STRINGS-->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_TIME_EXPIRED\' | translate}}</label>\n								<input type="text" name="expiredtime" placeholder="yyyy-MM-dd HH:mm:ss" class="form-control" data-ng-model="process.expiredtime"/>\n								<span class="help-block">{{\'DESCRIPTION_TD_TIME_EXPIRED\' | translate}}</span>\n							</div>\n							<!-- END IGNORE STRINGS-->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ANDVANCED TAB -->\n					<!-- START STATUS TAB -->\n					<div class="tab-pane" id="tab_status">\n						<form name="form" data-ng-submit="form.$valid && updateProcess()" novalidate>\n							<table class="table table-bordered table-hover">\n								<thead>\n								<tr role="row" class="heading">\n									<th>\n										 {{ \'APPLICATION_VALUE\' | translate}}\n									</th>\n									<th>\n										 {{ \'APPLICATION_MAX_RETRIES\' | translate}}\n									</th>\n									<th>\n										 {{ \'APPLICATION_RETRY_TIME\' | translate}} [min]\n									</th>\n									<th>\n										 {{ \'APPLICATION_DESCRIPTION\' | translate}}\n									</th>\n								</tr>\n								</thead>\n								<tbody>\n									<tr>\n										<td>\n											{{ \'APPLICATION_AMD\' | translate}}\n										</td>\n										<td>\n											<input type="number" min="0" name="amd_max_retries"class="form-control" data-ng-model="process.amd_max_retries" required/>\n											<span data-ng-show="(form.amd_max_retries.$touched || form.$submitted) && form.amd_max_retries.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.amd_max_retries.$error.max || form.amd_max_retries.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											<input type="number" min="0" name="amd_retry_time" class="form-control" data-ng-model="process.amd_retry_time" required/>\n											<span data-ng-show="(form.amd_retry_time.$touched || form.$submitted) && form.amd_retry_time.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.amd_retry_time.$error.max || form.amd_retry_time.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											{{ \'DESCRIPTION_TD_STATUS_AMD\' | translate}}\n										</td>\n									</tr>\n									<tr>\n										<td>\n											{{ \'APPLICATION_BUSY\' | translate}}\n										</td>\n										<td>\n											<input type="number" min="0" name="busy_max_retries"class="form-control" data-ng-model="process.busy_max_retries" required/>\n											<span data-ng-show="(form.busy_max_retries.$touched || form.$submitted) && form.busy_max_retries.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.busy_max_retries.$error.max || form.busy_max_retries.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											<input type="number" min="0" name="busy_retry_time"class="form-control" data-ng-model="process.busy_retry_time" required/>\n											<span data-ng-show="(form.busy_retry_time.$touched || form.$submitted) && form.busy_retry_time.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.busy_retry_time.$error.max || form.busy_retry_time.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											{{ \'DESCRIPTION_TD_STATUS_BUSY\' | translate}}\n										</td>\n									</tr>\n									<tr>\n										<td>\n											{{ \'APPLICATION_CONGESTION\' | translate}}\n										</td>\n										<td>\n											<input type="number" min="0" name="congestion_max_retries"class="form-control" data-ng-model="process.congestion_max_retries" required/>\n											<span data-ng-show="(form.congestion_max_retries.$touched || form.$submitted) && form.congestion_max_retries.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.congestion_max_retries.$error.max || form.congestion_max_retries.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											<input type="number" min="0" name="congestion_retry_time"class="form-control" data-ng-model="process.congestion_retry_time" required/>\n											<span data-ng-show="(form.congestion_retry_time.$touched || form.$submitted) && form.congestion_retry_time.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.congestion_retry_time.$error.max || form.congestion_retry_time.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											{{ \'DESCRIPTION_TD_STATUS_CONGESTION\' | translate}}\n										</td>\n									</tr>\n									<tr>\n										<td>\n											{{ \'APPLICATION_DROP\' | translate}}\n										</td>\n										<td>\n											<input type="number" min="0" name="drop_max_retries"class="form-control" data-ng-model="process.drop_max_retries" required/>\n											<span data-ng-show="(form.drop_max_retries.$touched || form.$submitted) && form.drop_max_retries.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.drop_max_retries.$error.max || form.drop_max_retries.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											<input type="number" min="0" name="drop_retry_time"class="form-control" data-ng-model="process.drop_retry_time" required/>\n											<span data-ng-show="(form.drop_retry_time.$touched || form.$submitted) && form.drop_retry_time.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.drop_retry_time.$error.max || form.drop_retry_time.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											{{ \'DESCRIPTION_TD_STATUS_DROP\' | translate}}\n										</td>\n									</tr>\n									<tr>\n										<td>\n											{{ \'APPLICATION_FAILED\' | translate}}\n										</td>\n										<td>\n											<input type="number" min="0" name="failed_max_retries"class="form-control" data-ng-model="process.failed_max_retries" required/>\n											<span data-ng-show="(form.failed_max_retries.$touched || form.$submitted) && form.failed_max_retries.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.failed_max_retries.$error.max || form.failed_max_retries.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											<input type="number" min="0" name="failed_retry_time"class="form-control" data-ng-model="process.failed_retry_time" required/>\n											<span data-ng-show="(form.failed_retry_time.$touched || form.$submitted) && form.failed_retry_time.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.failed_retry_time.$error.max || form.failed_retry_time.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											{{ \'DESCRIPTION_TD_STATUS_FAILED\' | translate}}\n										</td>\n									</tr>\n									<tr>\n										<td>\n											{{ \'APPLICATION_NOANSWER\' | translate}}\n										</td>\n										<td>\n											<input type="number" min="0" name="noanswer_max_retries"class="form-control" data-ng-model="process.noanswer_max_retries" required/>\n											<span data-ng-show="(form.noanswer_max_retries.$touched || form.$submitted) && form.noanswer_max_retries.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.noanswer_max_retries.$error.max || form.noanswer_max_retries.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											<input type="number" min="0" name="noanswer_retry_time"class="form-control" data-ng-model="process.noanswer_retry_time" required/>\n											<span data-ng-show="(form.noanswer_retry_time.$touched || form.$submitted) && form.noanswer_retry_time.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.noanswer_retry_time.$error.max || form.noanswer_retry_time.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											{{ \'DESCRIPTION_TD_STATUS_NOANSWER\' | translate}}\n										</td>\n									</tr>\n									<tr>\n										<td>\n											{{ \'APPLICATION_NOSUCHEXTENSION\' | translate}}\n										</td>\n										<td>\n											<input type="number" min="0" name="nosuchextension_max_retries"class="form-control" data-ng-model="process.nosuchextension_max_retries" required/>\n											<span data-ng-show="(form.nosuchextension_max_retries.$touched || form.$submitted) && form.nosuchextension_max_retries.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.nosuchextension_max_retries.$error.max || form.nosuchextension_max_retries.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											<input type="number" min="0" name="nosuchextension_retry_time"class="form-control" data-ng-model="process.nosuchextension_retry_time" required/>\n											<span data-ng-show="(form.nosuchextension_retry_time.$touched || form.$submitted) && form.nosuchextension_retry_time.$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n											<span data-ng-show="form.nosuchextension_retry_time.$error.max || form.nosuchextension_retry_time.$error.min" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n											</span>\n										</td>\n										<td>\n											{{ \'DESCRIPTION_TD_STATUS_NOSUCHEXTENSION\' | translate}}\n										</td>\n									</tr>\n								</tbody>\n							</table>\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END STATUS TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
+a.put("app/motiondialer/process/view/view.spooler.edit.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_EDIT\' | translate }} {{ \'APPLICATION_CONTACT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <!-- START RETRIEVE -->\n  <div class="form-group" data-ng-class="{\'has-error\': (form.retrieve.$touched || form.$submitted) && form.retrieve.$invalid}" ng-init="initModal()">\n    <label class="control-label">{{ \'APPLICATION_STATUS\' | translate }}<span class="required" aria-required="true">*</span></label>\n    <select name="retrieve" class="form-control" data-ng-model="entitySpooler.retrieve" required>\n      <option value="CLOSED">CLOSE</option>\n      <option value="OPEN">OPEN</option>\n      <option value="BLACK_LIST">BLACKLIST</option>\n      <option value="PLANNED">PLANNING</option>\n      <option value="PLANNED_PEER">PLANNING AGENT</option>\n    </select>\n    <span data-ng-show="(form.retrieve.$touched || form.$submitted) && form.retrieve.$error.required" class="help-block help-block-error">\n      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n    </span>\n  </div>\n  <!-- END RETRIEVE -->\n  <!-- START PLANNING DATE -->\n  <div class="form-group" data-ng-if="entitySpooler.retrieve == \'PLANNED\' || entitySpooler.retrieve == \'PLANNED_PEER\'" data-ng-class="{\'has-error\': (form.date.$touched || form.$submitted) && form.date.$invalid}">\n    <label class="control-label">PLANNING DATE<span class="required" aria-required="true">*</span></label>\n    <uib-datepicker name="date" ng-model="entitySpooler.planningtime" required="entitySpooler.retrieve == \'PLANNED\' || entitySpooler.retrieve == \'PLANNED_PEER\'" data-ng-init="entitySpooler.planningtime = moment()"></uib-datepicker>\n    <span data-ng-show="(form.date.$touched || form.$submitted) && form.date.$error.required" class="help-block help-block-error">\n      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n    </span>\n  </div>\n  <!-- END PLANNING DATE -->\n  <!-- START PLANNING TIME -->\n  <div class="form-group" data-ng-if="entitySpooler.retrieve == \'PLANNED\' || entitySpooler.retrieve == \'PLANNED_PEER\'" data-ng-class="{\'has-error\': (form.time.$touched || form.$submitted) && form.time.$invalid}">\n    <label class="control-label">PLANNING TIME<span class="required" aria-required="true">*</span></label>\n    <uib-timepicker name="time" ng-model="entitySpooler.planningtime" required="entitySpooler.retrieve == \'PLANNED\' || entitySpooler.retrieve == \'PLANNED_PEER\'" show-meridian="false" show-seconds="false"></uib-timepicker>\n    <span data-ng-show="(form.time.$touched || form.$submitted) && form.time.$error.required" class="help-block help-block-error">\n      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n    </span>\n  </div>\n  <!-- END PLANNING TIME -->\n  <!-- START PLANNING PEER -->\n  <div class="form-group" data-ng-if="entitySpooler.retrieve == \'PLANNED_PEER\'" data-ng-class="{\'has-error\': (form.agent.$touched || form.$submitted) && form.agent.$invalid}">\n    <label class="control-label">{{\'APPLICATION_AGENT\' | translate}}<span class="required" aria-required="true">*</span></label>\n    <select name="agent" class="form-control" data-ng-model="entitySpooler.planningpeer" ng-options="agent for agent in agents" required="entitySpooler.retrieve == \'PLANNED_PEER\'">\n    </select>\n    <span data-ng-show="(form.agent.$touched || form.$submitted) && form.agent.$error.required" class="help-block help-block-error">\n      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n    </span>\n  </div>\n  <!-- END PLANNING PEER -->\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/motiondialer/process/view/view.spooler.history.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_HISTORY\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <json-formatter json="historySpooler" open="2"></json-formatter>\n</div>\n<div class="modal-footer">\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CLOSE\' | translate }}</button>\n</div>\n'),a.put("app/motiondialer/process/view/view.spooler.html",'<div class="row" data-ng-init="getSpooler()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_SPOOLER\' | translate}} </span>\n				</div>\n				<div class="actions">\n					<a class="btn btn-default" href="#" data-ng-click="getSpooler()">\n						<i class="icon-refresh"></i>\n					</a>\n				</div>\n			</div>\n\n			<div class="portlet-body">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="spinner-grid" spinner-start-active="true"></span>\n				<!-- END UI-GRID SPINNER -->\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/reset/reset.html",'<!-- BEGIN LOGO -->\n<div class="logo" data-ng-init="getInfo()">\n	<a href="index.html">\n		<img data-ng-if="settings.defaultLoginLogo || !license.custom" ng-src="assets/images/logo-big.png" alt="logo" />\n		<img data-ng-if="license.custom && !settings.defaultLoginLogo" ng-src="api/settings/logo/login/{{settings.loginLogo ? settings.loginLogo : \'logo-big.png\'}}" alt="logo" class="custom-login-logo" onError="this.onerror=null;this.src=\'assets/images/logo-big.png\';"/>\n	</a>\n</div>\n<!-- END LOGO -->\n<!-- BEGIN RESET -->\n<div class="content">\n	<!-- BEGIN RESET FORM -->\n	<form name="resetForm" data-ng-submit="resetForm.$valid && reset()" novalidate>\n		<h3>{{\'APPLICATION_RESET_PASSWORD\' | translate}}</h3>\n		<p>\n			{{\'APPLICATION_INSERT_NEW_PASSWORD_RESET\' | translate}}\n		</p>\n		<div class="form-group" data-ng-class="{\'has-error\': resetForm.$submitted && resetForm.password.$invalid}">\n			<label class="control-label">{{\'APPLICATION_NEW_PASSWORD\' | translate}}</label>\n			<div class="input-icon">\n				<i class="icon-key"></i>\n				<input class="form-control form-control-solid placeholder-no-fix" type="password" placeholder="{{\'APPLICATION_NEW_PASSWORD\' | translate}}" name="password" ng-model="userReset.password"  data-ng-pattern="settings.patternPassword" required/>\n			</div>\n			<span data-ng-show="resetForm.$submitted && resetForm.password.$invalid" class="help-block">{{\'MESSAGE_REQUIRED_FIELD\' | translate}}</span>\n			<span data-ng-show="(resetForm.password.$touched || resetForm.$submitted) && resetForm.password.$error.pattern" class="help-block help-block-error">\n				<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n			</span>\n		</div>\n		<div class="form-group" data-ng-class="{\'has-error\': resetForm.$submitted && resetForm.rePassword.$invalid}">\n			<label class="control-label">{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}</label>\n			<div class="input-icon">\n				<i class="icon-key"></i>\n				<input class="form-control form-control-solid placeholder-no-fix" type="password" placeholder="{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}" name="rePassword" ng-model="userReset.rePassword" nx-equal="userReset.password" required/>\n			</div>\n			<span data-ng-show="resetForm.$submitted && resetForm.rePassword.$invalid" class="help-block">{{\'MESSAGE_REQUIRED_FIELD\' | translate}}</span>\n			<span data-ng-show="(resetForm.password.$touched || resetForm.$submitted) && resetForm.$error.nxEqual" class="help-block help-block-error">\n				<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n			</span>\n		</div>\n		<div class="form-actions">\n			<button type="submit" class="btn btn-success uppercase">{{\'APPLICATION_SUBMIT\' | translate}}</button>\n		</div>\n	</form>\n	<!-- END RESET FORM-->\n		<div class="login-options">\n			<h4>{{\'APPLICATION_FOLLOW_US\' | translate}}</h4>\n			<ul class="social-icons">\n				<li>\n					<a class="social-icon-color facebook" data-original-title="facebook" href="https://www.facebook.com/xenialab"></a>\n				</li>\n				<li>\n					<a class="social-icon-color twitter" data-original-title="Twitter" href="https://twitter.com/xenialab"></a>\n				</li>\n				<li>\n					<a class="social-icon-color googleplus" data-original-title="Goole Plus" href="#"></a>\n				</li>\n				<li>\n					<a class="social-icon-color linkedin" data-original-title="Linkedin" href="#"></a>\n				</li>\n			</ul>\n		</div>\n</div>\n<div class="copyright">\n	xCALLY Motion v. {{info.version}} | 2016 - {{year + 1}} &copy; Powered by Xenialab <ng-bind-html data-ng-if="license.custom && !settings.defaultFooterWhiteLabel && settings.footerWhiteLabel" ng-bind-html="\'| \'+settings.footerWhiteLabel"></ng-bind-html>\n</div>\n<!-- END RESET -->\n'),a.put("app/salesforce/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-cloud"></i>\n					<a href="/salesforce/list">{{ \'APPLICATION_SALESFORCE\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="fa fa-cloud font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_SALESFORCE\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/salesforce/wizard" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/salesforce/view/configuration/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.name.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.name.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START CHANNEL -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.channel.$touched || form.channel.$submitted) && form.channel.$invalid}">\n      <label class="control-label">{{\'APPLICATION_CHANNEL\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.channel" name="channel" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_CHANNEL\' | translate}}">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="channel.value as channel in channels | filter: $select.search">\n          <div data-ng-bind="channel.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.channel.$touched || form.channel.$submitted) && form.channel.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- START CHANNEL -->\n\n    <!-- START VOICE SUBTYPE -->\n    <div data-ng-if="item.channel===\'voice\'" class="form-group" data-ng-class="{\'has-error\': (form.channel.$touched || form.channel.$submitted) && form.channel.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.type" name="type" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_TYPE\' | translate}}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="type in [\'Queue\',\'Outbound\'] | filter: $select.search">\n          <div data-ng-bind="type | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.type.$touched || form.type.$submitted) && form.type.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- START CHANNEL -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/salesforce/view/configuration/list/list.html",'<div ui-view class="profile-content">\r\n	<div class="row">\r\n		<div class="col-md-12">\r\n			<div class="portlet light" data-ng-init="initView()">\r\n				<div class="portlet-title  tabbable-line">\r\n					<div class="caption caption-md">\r\n						<i class="icon-globe theme-font hide"></i>\r\n						<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATIONS\' | translate}}</span>\r\n					</div>\r\n					<div class="actions">\r\n						<div class="btn-group" data-ng-show="id.length">\r\n							<a class="btn red" href="#" data-ng-click="deleteItems()">\r\n								<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\r\n							</a>\r\n						</div>\r\n						<div class="btn-group">\r\n							<a class="btn green-jungle" href="#" data-ng-click="createItem()">\r\n								<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}\r\n							</a>\r\n						</div>\r\n					</div>\r\n				</div>\r\n				<div class="portlet-body">\r\n					<!-- START TABLE -->\r\n					<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\r\n						<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\r\n					</div>\r\n				</div>\r\n			</div>\r\n		</div>\r\n	</div>\r\n</div>\r\n'),a.put("app/salesforce/view/configuration/view/view.html",'<div class="row" data-ng-init="initView();getConfiguration();getCustomVariables();getFields();">\r\n	<div class="col-md-12">\r\n		<div class="portlet light">\r\n			<div class="portlet-title tabbable-line">\r\n				<div class="caption caption-md">\r\n					<i class="icon-globe theme-font hide"></i>\r\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\r\n				</div>\r\n				<ul class="nav nav-tabs">\r\n					<li class="active">\r\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\r\n					</li>\r\n          <li>\r\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\r\n					</li>\r\n          <li>\r\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\r\n					</li>\r\n				</ul>\r\n			</div>\r\n			<div class="portlet-body">\r\n				<div class="tab-content">\r\n					<!-- SUBJECT TAB -->\r\n					<div class="tab-pane ui-padding active" id="tab_1_1">\r\n            <div class="row">\r\n              <div class="col-md-11">\r\n                <span class="caption-subject">All following fields will be join by blank space:</span>\r\n              </div>\r\n              <div class="col-md-1 pull-rigth">\r\n                <button class="btn btn-icon-only green" data-ng-click="addItem(\'subject\')"><i class="fa fa-plus"></i></button>\r\n              </div>\r\n            </div>\r\n            <hr>\r\n						<!-- <div id="subject-item-list" ng-scrollbars ng-scrollbars-config="config"> -->\r\n	            <div class="row" data-ng-repeat="subjectItem in subjectConfig">\r\n	              <div class="col-md-3">\r\n	                <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\r\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\r\n	                  <ui-select-choices repeat="item.type as item in fieldType | filter: $select.search">\r\n	                    <div ng-bind-html="item.title | highlight: $select.search"></div>\r\n	                  </ui-select-choices>\r\n	                </ui-select>\r\n	              </div>\r\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\r\n	                <div class="form-group">\r\n	                  <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\r\n	                </div>\r\n	              </div>\r\n								<div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\r\n	                <div class="form-group">\r\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.variableName" data-ng-change="updateField(subjectItem)">\r\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\r\n	                    <ui-select-choices group-by="groupVariableByGroup" repeat="variable.name as variable in variables | filter: $select.search">\r\n	                      <div ng-bind-html="variable.title | highlight: $select.search"></div>\r\n	                    </ui-select-choices>\r\n	                  </ui-select>\r\n	                </div>\r\n	              </div>\r\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'customVariable\'">\r\n	                <div class="form-group">\r\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\r\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\r\n	                    <ui-select-choices repeat="variable.id as variable in customVariables | filter: $select.search">\r\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\r\n	                    </ui-select-choices>\r\n	                  </ui-select>\r\n	                </div>\r\n	              </div>\r\n	              <div class="col-md-1">\r\n	                <div class="form-group">\r\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\r\n	                </div>\r\n	              </div>\r\n	            </div>\r\n						<!-- </div> -->\r\n					</div>\r\n					<!-- END SUBJECT TAB -->\r\n          <!-- DESCRIPTION TAB -->\r\n					<div class="tab-pane ui-padding" id="tab_1_2">\r\n						<div class="row">\r\n              <div class="col-md-11">\r\n                <span class="caption-subject">All following fields will be join by new line:</span>\r\n              </div>\r\n              <div class="col-md-1 pull-rigth">\r\n                <button class="btn btn-icon-only green" data-ng-click="addItem(\'description\')"><i class="fa fa-plus"></i></button>\r\n              </div>\r\n            </div>\r\n            <hr>\r\n						<!-- <div id="description-item-list" ng-scrollbars ng-scrollbars-config="config"> -->\r\n							<div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\r\n	              <div class="col-md-2">\r\n	                <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\r\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\r\n	                  <ui-select-choices repeat="item.type as item in descFieldType | filter: $select.search">\r\n	                    <div ng-bind-html="item.title | highlight: $select.search"></div>\r\n	                  </ui-select-choices>\r\n	                </ui-select>\r\n	              </div>\r\n	              <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\r\n	                <div class="form-group">\r\n	                  <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\r\n	                </div>\r\n	              </div>\r\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\'">\r\n									<input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\r\n								</div>\r\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\'">\r\n									<ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\r\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\r\n	                  <ui-select-choices repeat="item.type as item in fieldType | filter: $select.search">\r\n	                    <div ng-bind-html="item.title | highlight: $select.search"></div>\r\n	                  </ui-select-choices>\r\n	                </ui-select>\r\n								</div>\r\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\' && descriptionItem.keyType==\'string\'">\r\n									<input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\r\n								</div>\r\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\' && descriptionItem.keyType==\'variable\'">\r\n	                <div class="form-group">\r\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.variableName" data-ng-change="updateField(descriptionItem)">\r\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\r\n	                    <ui-select-choices group-by="groupVariableByGroup" repeat="variable.name as variable in variables | filter: $select.search">\r\n	                      <div ng-bind-html="variable.title | highlight: $select.search"></div>\r\n	                    </ui-select-choices>\r\n	                  </ui-select>\r\n	                </div>\r\n	              </div>\r\n	              <div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\' && descriptionItem.keyType==\'customVariable\'">\r\n	                <div class="form-group">\r\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\r\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\r\n	                    <ui-select-choices repeat="variable.id as variable in customVariables | filter: $select.search">\r\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\r\n	                    </ui-select-choices>\r\n	                  </ui-select>\r\n	                </div>\r\n	              </div>\r\n	              <div class="col-md-1">\r\n	                <div class="form-group">\r\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\r\n	                </div>\r\n	              </div>\r\n	            </div>\r\n						<!-- </div> -->\r\n					</div>\r\n					<!-- END DESCRIPTION TAB -->\r\n          <!-- FIELDS TAB -->\r\n					<div class="tab-pane ui-padding" id="tab_1_3">\r\n						<div class="row">\r\n              <div class="col-md-11">\r\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\r\n              </div>\r\n              <div class="col-md-1 pull-rigth">\r\n                <button class="btn btn-icon-only green" data-ng-click="addItem(\'field\')"><i class="fa fa-plus"></i></button>\r\n              </div>\r\n            </div>\r\n            <hr>\r\n						<!-- <div id="field-item-list" ng-scrollbars ng-scrollbars-config="config"> -->\r\n	            <div class="row" data-ng-repeat="fieldItem in fieldConfig">\r\n	              <div class="col-md-3">\r\n	                <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\r\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\r\n	                  <ui-select-choices repeat="item.name as item in accountFields | filter: $select.search">\r\n	                    <div ng-bind-html="item.label | highlight: $select.search"></div>\r\n	                  </ui-select-choices>\r\n	                </ui-select>\r\n	              </div>\r\n	              <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\r\n	                <div class="form-group">\r\n										<ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\r\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\r\n		                  <ui-select-choices repeat="item.value as item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\r\n		                    <div ng-bind-html="item.label | highlight: $select.search"></div>\r\n		                  </ui-select-choices>\r\n		                </ui-select>\r\n	                </div>\r\n	              </div>\r\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\r\n									<div class="form-group">\r\n										<ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\r\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\r\n		                  <ui-select-choices repeat="item.type as item in fieldType | filter: $select.search">\r\n		                    <div ng-bind-html="item.title | highlight: $select.search | ucfirst"></div>\r\n		                  </ui-select-choices>\r\n		                </ui-select>\r\n									</div>\r\n								</div>\r\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\r\n	                <div class="form-group">\r\n										<input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\r\n	                </div>\r\n	              </div>\r\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\r\n	                <div class="form-group">\r\n										<ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.variableName" data-ng-change="updateField(fieldItem)">\r\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\r\n	                    <ui-select-choices group-by="groupVariableByGroup" repeat="variable.name as variable in variables | filter: $select.search">\r\n	                      <div ng-bind-html="variable.title | highlight: $select.search"></div>\r\n	                    </ui-select-choices>\r\n	                  </ui-select>\r\n	                </div>\r\n	              </div>\r\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'customVariable\'">\r\n	                <div class="form-group">\r\n										<ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\r\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\r\n	                    <ui-select-choices repeat="variable.id as variable in customVariables | filter: $select.search">\r\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\r\n	                    </ui-select-choices>\r\n	                  </ui-select>\r\n	                </div>\r\n	              </div>\r\n	              <div class="col-md-1">\r\n	                <div class="form-group">\r\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\r\n	                </div>\r\n	              </div>\r\n	            </div>\r\n						<!-- </div> -->\r\n					</div>\r\n					<!-- END FIELDS TAB -->\r\n				</div>\r\n			</div>\r\n		</div>\r\n	</div>\r\n</div>\r\n'),a.put("app/salesforce/view/view.account.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_URI\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_URI\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n								<span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n              <!-- START CLIENT ID -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.clientId.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CLIENT_ID\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="clientId" placeholder="{{\'APPLICATION_CLIENT_ID\' | translate}}" class="form-control" data-ng-model="account.clientId" required/>\n								<span data-ng-show="forms.formSetting.clientId.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CLIENT ID -->\n\n              <!-- START CLIENT SECRET -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.clientSecret.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CLIENT_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="clientSecret" placeholder="{{\'APPLICATION_CLIENT_SECRET\' | translate}}" class="form-control" data-ng-model="account.clientSecret" required/>\n								<span data-ng-show="forms.formSetting.clientSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CLIENT SECRET -->\n\n              <!-- START SECURITY TOKEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.securityToken.$invalid}">\n								<label class="control-label">{{\'APPLICATION_SECURITY_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="securityToken" placeholder="{{\'APPLICATION_SECURITY_TOKEN\' | translate}}" class="form-control" data-ng-model="account.securityToken" required/>\n								<span data-ng-show="forms.formSetting.securityToken.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END SECURITY TOKEN -->\n\n							<!-- START SERVER URL -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.serverUrl.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}}</label>\n								<input type="url" name="serverUrl" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.serverUrl"/>\n								<span class="help-block">\n									{{\'DESCRIPTION_SERVER_URL\' | translate}}.\n								</span>\n								<span class="help-block help-block-info">\n									{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n								</span>\n							</div>\n							<!-- END SERVER URL -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
+a.put("app/salesforce/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n          <i class="fa fa-cloud"></i>\n          <a href="/salesforce/list">{{ \'APPLICATION_SALESFORCE\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{account.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img src="assets/images/media/salesforce.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{account.name}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{account.remoteUri}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.salesforce.view.account\')}">\n							<a ng-href="/salesforce/view/{{account.id}}/account">\n							<i class="icon-user"></i>\n							{{ \'APPLICATION_ACCOUNT\' | translate }} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.salesforce.view.configurations\') || $state.is(\'main.salesforce.view.configuration\')}">\n							<a ng-href="/salesforce/view/{{account.id}}/configurations/list">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_CONFIGURATIONS\' | translate }} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/salesforce/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="fa fa-cloud"></i>\n						<a href="/salesforce/list">{{ \'APPLICATION_SALESFORCE\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n						<form name="forms.formSetting" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.username" required ng-remote-validate="/api/salesforce/accounts/validate/username"/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formSetting.username.$touched || forms.formSetting.$submitted) && forms.formSetting.username.$error.ngRemoteValidate" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n				        </span>\n							</div>\n							<!-- END USERNAME -->\n\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_URI\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_URI\' | translate}}" class="form-control" data-ng-model="item.remoteUri" required/>\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n              <!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n								<span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n              <!-- START CLIENT ID -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.clientId.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CLIENT_ID\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="clientId" placeholder="{{\'APPLICATION_CLIENT_ID\' | translate}}" class="form-control" data-ng-model="item.clientId" required/>\n								<span data-ng-show="forms.formSetting.clientId.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CLIENT ID -->\n\n              <!-- START CLIENT SECRET -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.clientSecret.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CLIENT_SECRET\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="clientSecret" placeholder="{{\'APPLICATION_CLIENT_SECRET\' | translate}}" class="form-control" data-ng-model="item.clientSecret" required/>\n								<span data-ng-show="forms.formSetting.clientSecret.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CLIENT SECRET -->\n\n              <!-- START SECURITY TOKEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.securityToken.$invalid}">\n								<label class="control-label">{{\'APPLICATION_SECURITY_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="securityToken" placeholder="{{\'APPLICATION_SECURITY_TOKEN\' | translate}}" class="form-control" data-ng-model="item.securityToken" required/>\n								<span data-ng-show="forms.formSetting.securityToken.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END SECURITY TOKEN -->\n\n							<!-- START SERVER URL -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.serverUrl.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}}</label>\n								<input type="url" name="serverUrl" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.serverUrl"/>\n								<span class="help-block">\n									{{\'DESCRIPTION_SERVER_URL\' | translate}}.\n								</span>\n								<span class="help-block help-block-info">\n									{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n								</span>\n							</div>\n							<!-- END SERVER URL -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n\n				</wizard>\n\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/customization/view/general/general.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_GENERAL_CUSTOMIZATION\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_LOGO\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_FOOTER_WHITE_LABEL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- CHANGE LOGO TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<div class="col-md-6 col-sm-6" >\n							<div class="portlet light bordered" style="min-height:411px;">\n								<div class="portlet-title">\n									<div class="caption font-green-sharp">\n										<i class="icon-pie-chart font-green-sharp"></i>\n										<span class="caption-subject">{{ \'APPLICATION_MAIN\' | translate }}</span>\n									</div>\n									<div class="actions">\n									</div>\n								</div>\n								<div class="portlet-body">\n									<form action="#" role="form" class="row">\n										<!-- START STATUS -->\n										<div class="form-group col-md-6 col-sm-6">\n											<label class="control-label">{{\'APPLICATION_DEFAULT\' | translate}}</label></br>\n											<input\n											bs-switch\n											class="form-control"\n											ng-model="settings.defaultLogo"\n											data-ng-init="settings.defaultLogo = license.custom ? settings.defaultLogo : true"\n											type="checkbox"\n											name="defaultLogo"\n											data-ng-change="update()"\n											switch-active="{{ radioSwitch.isActive }}"\n											switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n											switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n											switch-on-color="{{ radioSwitch.onColor }}"\n											switch-off-color="{{ radioSwitch.offColor }}"\n											switch-animate="{{ radioSwitch.animate }}"\n											switch-size="{{ radioSwitch.size }}"\n											switch-label="{{ radioSwitch.label }}"\n											switch-icon="{{ radioSwitch.icon }}"\n											switch-radio-off="{{ radioSwitch.radioOff }}"\n											switch-label-width="{{ radioSwitch.labelWidth }}"\n											switch-handle-width="{{ radioSwitch.handleWidth }}">\n										</div>\n										<!-- END STATUS -->\n										<div class="form-group col-md-6 col-sm-6" data-ng-if="!settings.defaultLogo && license.custom">\n											<div class="fileinput fileinput-new" data-provides="fileinput">\n												<div class="fileinput-new thumbnail">\n													<img ng-src="assets/images/media/noProfileImage.png" alt=""/>\n												</div>\n												<div class="fileinput-preview fileinput-exists thumbnail">\n												</div>\n												<div>\n													<span class="btn default btn-file" data-ng-show="!uploader.queue[0]">\n														<span> {{ \'APPLICATION_SELECT_IMAGE\' | translate }} </span>\n														<input type="file" nv-file-select="" uploader="uploader"/><br/>\n													</span>\n													<button type="button" class="btn default" data-ng-show="uploader.queue[0]" data-dismiss="fileinput" ng-click="uploader.queue[0].remove()">\n														{{ \'APPLICATION_REMOVE\' | translate }}\n													</button>\n													<button type="button" class="btn green-haze" data-ng-show="uploader.queue[0]" data-ng-click="uploader.queue[0].upload()" ng-disabled="uploader.queue[0].isReady || uploader.queue[0].isUploading || uploader.queue[0].isSuccess">\n														{{ \'APPLICATION_CONFIRM\' | translate }}\n													</button>\n												</div>\n												<p>\n													</br> {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} <b>jpg, png, jpeg</b>.\n												</p>\n											</div>\n										</div>\n									</form>\n									<div data-ng-show="uploader2.isHTML5" >\n										<div data-ng-repeat="item in uploader.queue" nowrap style="border-top-style:none">\n												<strong>{{ item.file.name }}</strong> {{ item.file.size/1024/1024|number:2 }} MB\n												<button type="button" class="btn btn-danger btn-xs" data-ng-click="item.remove()">\n													<span class="glyphicon glyphicon-trash"></span> Remove\n												</button>\n										</div>\n									</div>\n								</div>\n							</div>\n						</div>\n						<div class="col-md-6 col-sm-6">\n							<div class="portlet light bordered"  style="min-height:411px;">\n								<div class="portlet-title">\n									<div class="caption font-green-sharp">\n										<i class="icon-pie-chart font-green-sharp"></i>\n										<span class="caption-subject">{{ \'APPLICATION_LOGIN\' | translate }}</span>\n									</div>\n									<div class="actions">\n									</div>\n								</div>\n								<div class="portlet-body">\n									<form action="#" role="form" class="row">\n										<!-- START STATUS -->\n										<div class="form-group col-md-6 col-sm-6">\n											<label class="control-label">{{\'APPLICATION_DEFAULT\' | translate}}</label></br>\n											<input\n											bs-switch\n											class="form-control"\n											ng-model="settings.defaultLoginLogo"\n											data-ng-init="settings.defaultLoginLogo = license.custom ? settings.defaultLoginLogo : true"\n											type="checkbox"\n											name="defaultLoginLogo"\n											data-ng-change="update()"\n											switch-active="{{ radioSwitch.isActive }}"\n											switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n											switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n											switch-on-color="{{ radioSwitch.onColor }}"\n											switch-off-color="{{ radioSwitch.offColor }}"\n											switch-animate="{{ radioSwitch.animate }}"\n											switch-size="{{ radioSwitch.size }}"\n											switch-label="{{ radioSwitch.label }}"\n											switch-icon="{{ radioSwitch.icon }}"\n											switch-radio-off="{{ radioSwitch.radioOff }}"\n											switch-label-width="{{ radioSwitch.labelWidth }}"\n											switch-handle-width="{{ radioSwitch.handleWidth }}">\n										</div>\n										<!-- END STATUS -->\n										<div class="form-group col-md-6 col-sm-6" data-ng-if="!settings.defaultLoginLogo && license.custom">\n											<div class="fileinput fileinput-new" data-provides="fileinput">\n												<div class="fileinput-new thumbnail">\n													<img ng-src="assets/images/media/noProfileImage.png" alt=""/>\n												</div>\n												<div class="fileinput-preview fileinput-exists thumbnail">\n												</div>\n												<div>\n													<span class="btn default btn-file" data-ng-show="!uploader2.queue[0]">\n														<span> {{ \'APPLICATION_SELECT_IMAGE\' | translate }} </span>\n														<input type="file" nv-file-select="" uploader="uploader2"/><br/>\n													</span>\n													<button type="button" class="btn default" data-ng-show="uploader2.queue[0]" data-dismiss="fileinput" ng-click="uploader2.queue[0].remove()">\n														{{ \'APPLICATION_REMOVE\' | translate }}\n													</button>\n													<button type="button" class="btn green-haze" data-ng-show="uploader2.queue[0]" data-ng-click="uploader2.queue[0].upload()" ng-disabled="uploader2.queue[0].isReady || uploader2.queue[0].isUploading || uploader2.queue[0].isSuccess">\n														{{ \'APPLICATION_CONFIRM\' | translate }}\n													</button>\n												</div>\n												<p>\n													</br> {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} <b>jpg, png, jpeg</b>.\n												</p>\n											</div>\n										</div>\n									</form>\n									<div data-ng-show="uploader2.isHTML5" >\n										<div data-ng-repeat="item in uploader.queue" nowrap style="border-top-style:none">\n												<strong>{{ item.file.name }}</strong> {{ item.file.size/1024/1024|number:2 }} MB\n												<button type="button" class="btn btn-danger btn-xs" data-ng-click="item.remove()">\n													<span class="glyphicon glyphicon-trash"></span> Remove\n												</button>\n										</div>\n									</div>\n								</div>\n							</div>\n						</div>\n					</div>\n					<!-- END CHANGE LOGO TAB -->\n					<!-- CHANGE FOOTER WHITE LABEL TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.footerWhiteLabel" data-ng-submit="forms.footerWhiteLabel.$valid && update()" novalidate>\n							<!-- START DEFAULT -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DEFAULT\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="settings.defaultFooterWhiteLabel"\n								type="checkbox"\n								name="defaultFooterWhiteLabel"\n								data-ng-change="update()"\n								data-ng-init="settings.defaultFooterWhiteLabel = license.custom ? settings.defaultFooterWhiteLabel : true"\n								switch-active="{{ radioSwitch.isActive }}"\n								switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n								switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n								switch-on-color="{{ radioSwitch.onColor }}"\n								switch-off-color="{{ radioSwitch.offColor }}"\n								switch-animate="{{ radioSwitch.animate }}"\n								switch-size="{{ radioSwitch.size }}"\n								switch-label="{{ radioSwitch.label }}"\n								switch-icon="{{ radioSwitch.icon }}"\n								switch-radio-off="{{ radioSwitch.radioOff }}"\n								switch-label-width="{{ radioSwitch.labelWidth }}"\n								switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END DEFAULT -->\n							<!-- START LABEL -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.footerWhiteLabel.footerWhiteLabel.$touched || forms.footerWhiteLabel.$submitted) && forms.footerWhiteLabel.footerWhiteLabel.$invalid}">\n								<label class="control-label">{{\'APPLICATION_FOOTER_WHITE_LABEL\' | translate}}<span data-ng-if="!settings.defaultFooterWhiteLabel" class="required" aria-required="true">*</span></label>\n								<textarea name="footer" placeholder="{{\'APPLICATION_FOOTER_WHITE_LABEL\' | translate}}" class="form-control" data-ng-model="settings.footerWhiteLabel" data-ng-disabled="settings.defaultFooterWhiteLabel || !license.custom" data-ng-required="!settings.defaultFooterWhiteLabel && license.custom"/></textarea>\n								<span data-ng-show="(forms.footerWhiteLabel.footerWhiteLabel.$touched || forms.footerWhiteLabel.$submitted) && forms.footerWhiteLabel.footerWhiteLabel.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END LABEL -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}" data-ng-disabled="!license.custom"/>\n						</form>\n					</div>\n					<!-- END CHANGE FOOTER WHITE LABEL TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/setting/customization/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-settings"></i>\n					<a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n				</li>\n        <li>\n          <i class="icon-globe"></i>\n          <a href="#">{{ \'APPLICATION_CUSTOMIZATION\' | translate }}</a>\n        </li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img src="assets/images/media/customize.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ \'APPLICATION_CUSTOMIZATION\' | translate }}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.setting.customization.view.general\')}">\n							<a ng-href="/setting/customization/view/general">\n							<i class="icon-picture"></i>\n							{{ \'APPLICATION_GENERAL\' | translate }} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/general/view/main/main.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_GENERAL_SETTINGS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.main" data-ng-submit="forms.main.$valid && update()" novalidate>\n					<!-- START MIN INTERNAL -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.main.min_internal.$touched || forms.main.$submitted) && forms.main.min_internal.$invalid}">\n						<label class="control-label">{{\'APPLICATION_MIN_INTERNAL\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" min="1" name="min_internal" placeholder="{{\'APPLICATION_MIN_INTERNAL\' | translate}}" class="form-control" data-ng-model="settings.min_internal" required/>\n						<span data-ng-show="(forms.main.min_internal.$touched || forms.main.$submitted) && forms.main.min_internal.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END MIN INTERNAL -->\n\n					<!-- START MIN MAILBOX  -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.main.min_mailbox.$touched || forms.main.$submitted) && forms.main.min_mailbox.$invalid}">\n						<label class="control-label">{{\'APPLICATION_MIN_MAILBOX\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" min="1" name="min_mailbox" placeholder="{{\'APPLICATION_MIN_MAILBOX\' | translate}}" class="form-control" data-ng-model="settings.min_mailbox" required/>\n						<span data-ng-show="(forms.main.min_mailbox.$touched || forms.main.$submitted) && forms.main.min_mailbox.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END MIN MAILBOX -->\n\n					<!-- START AGI PORT -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.main.agi_port.$touched || forms.main.$submitted) && forms.main.agi_port.$invalid}">\n						<label class="control-label">{{\'APPLICATION_AGI_PORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" min="1" name="agi_port" placeholder="{{\'APPLICATION_AGI_PORT\' | translate}}" class="form-control" data-ng-model="settings.agi_port" required/>\n						<span data-ng-show="(forms.main.agi_port.$touched || forms.main.$submitted) && forms.main.agi_port.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END AGI PORT -->\n\n					<!-- START SSL -->\n					<div class="form-group">\n						<label class="control-label">\n							{{\'APPLICATION_SECURE_PASSWORD\' | translate}}\n						</label><br>\n							<input\n							bs-switch\n							data-ng-model="settings.securePassword"\n							type="checkbox"\n							switch-active="{{ isActive }}"\n							switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n							switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n							switch-on-color="{{ onColor }}"\n							switch-off-color="{{ offColor }}"\n							switch-animate="{{ animate }}"\n							switch-size="{{ size }}"\n							switch-label="{{ label }}"\n							switch-icon="{{ icon }}"\n							switch-radio-off="{{ radioOff }}"\n							switch-label-width="{{ labelWidth }}"\n							switch-handle-width="{{ handleWidth }}">\n					</div>\n					<!-- END SSL -->\n\n					<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/setting/general/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-settings"></i>\n					<a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n				</li>\n        <li>\n          <i class="icon-globe"></i>\n          <a href="#">{{ \'APPLICATION_GENERAL\' | translate }}</a>\n        </li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img src="assets/images/media/customize.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ \'APPLICATION_GENERAL\' | translate }}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.setting.general.view.main\')}">\n							<a ng-href="/setting/general/view/main">\n							<i class="icon-picture"></i>\n							{{ \'APPLICATION_MAIN\' | translate }} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/license/view/update.modal.html",'<div class="modal-header" data-ng-init="getLicense()">\n  <h3 class="modal-title">{{ \'APPLICATION_UPDATE_LICENSE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START LICENSE -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_LICENSE\' | translate}}</label>\n      <textarea type="text" style="min-height:95px;" name="description" placeholder="{{\'APPLICATION_LICENSE\' | translate}}" class="form-control" data-ng-model="item.license"></textarea>\n    </div>\n    <!-- END LICENSE -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="update()" ng-disabled="form.$invalid">{{ \'APPLICATION_UPDATE\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/setting/license/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n  <div class="col-md-12">\n    <div class="page-bar">\n      <ul class="page-breadcrumb">\n        <li>\n          <i class="icon-rocket"></i>\n          <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="icon-settings"></i>\n          <a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="icon-info"></i>\n          <a href="#">{{ \'APPLICATION_LICENSE\' | translate }}</a>\n        </li>\n      </ul>\n    </div>\n\n    <!-- BEGIN PROFILE CONTENT -->\n    <div class="profile-content">\n      <div class="row" data-ng-if="(license.token !== license.token2) && license.expirationTime > -1">\n        <div class="col-md-12">\n          <div class="note note-warning">\n            <h4 class="block"><strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_YOUR_LICENSE_WILL_EXPIRE\' | translate}} <strong>{{license.expirationTime}}</strong> {{\'MESSAGE_DAYS\' | translate}}.</h4>\n            <p>\n              {{\'MESSAGE_SEND_EMAIL_TO\' | translate}} <a href="mailto:[email-masked]?subject=New%20token%20detected&body=Hi xCALLY, my new token is: {{license.token2}}. Old token: {{license.token}}">[email-masked]</a>.\n            </p>\n            <p>\n              {{\'APPLICATION_NEW\' | translate | uppercase}} Token: <strong>{{license.token2}}</strong>\n            </p>\n          </div>\n        </div>\n      </div>\n      <div class="row">\n        <div class="col-md-6">\n          <div class="pricing hover-effect">\n            <div class="pricing-head" data-ng-switch="license.months">\n              <h3 ng-switch-when="1">{{\'APPLICATION_MONTH_TO_MONTH\' | translate}}<span>{{license.token || \'unknown\'}} </span></h3>\n              <h3 ng-switch-when="12">{{\'APPLICATION_YEARLY\' | translate}}<span>{{license.token || \'unknown\'}} </span></h3>\n              <h3 ng-switch-when="36">{{\'APPLICATION_PERPETUAL\' | translate}}<span>{{license.token || \'unknown\'}} </span></h3>\n              <h3 ng-switch-default>{{\'APPLICATION_UNKNOWN\' | translate}}<span>{{license.token || \'unknown\'}} </span></h3>\n              <h4><i>{{license.expiration ? (license.expiration | date:\'medium\') : \'DEMO\'}}</i>\n                <span data-ng-show="license.expiration">Expiration Date </span>\n              </h4>\n            </div>\n            <ul class="pricing-content list-unstyled">\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-eye"></i> {{\'APPLICATION_USERS\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  {{(license.users || license.users >= 0) ? license.users : \'unknown\'}}\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-people"></i> {{\'APPLICATION_AGENTS\' | translate}} ({{\'APPLICATION_CONCURRENTS\' | translate}}):\n                </div>\n                <div class="col-md-3 text-center">\n                  {{(license.agents || license.agents >= 0)  ? license.agents : \'unknown\'}}\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-phone"></i> {{\'APPLICATION_TELEPHONES\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  {{(license.telephones || license.telephones >= 0) ? license.telephones : \'unknown\'}}\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-bubble"></i> {{\'APPLICATION_CHAT\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.chat ? \'label-success\' : \'label-danger\'">{{license.chat ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-envelope"></i> {{\'APPLICATION_MAIL\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.mail ? \'label-success\' : \'label-danger\'">{{license.mail ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="fa fa-fax"></i> {{\'APPLICATION_FAX\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.fax ? \'label-success\' : \'label-danger\'">{{license.fax ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="glyphicon glyphicon-comment"></i> {{\'APPLICATION_SMS\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.messaging ? \'label-success\' : \'label-danger\'">{{license.messaging ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-globe"></i> {{\'APPLICATION_OPEN_CHANNEL\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.openchannel ? \'label-success\' : \'label-danger\'">{{license.openchannel ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-notebook"></i> {{\'APPLICATION_CONTACT_MANAGER\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.cm ? \'label-success\' : \'label-danger\'">{{license.cm ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-control-forward"></i> {{\'APPLICATION_MOTION_DIALER\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.dialer ? \'label-success\' : \'label-danger\'">{{license.dialer ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="fa fa-edit"></i> {{\'APPLICATION_JSCRIPTY\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.jscripty ? \'label-success\' : \'label-danger\'">{{license.jscripty ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-equalizer"></i> {{\'APPLICATION_CUSTOMIZATION\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.custom ? \'label-success\' : \'label-danger\'">{{license.custom ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n              <li class="row">\n                <div class="col-md-9">\n                  <i class="icon-cloud-download"></i> {{\'APPLICATION_UPDATE\' | translate}}:\n                </div>\n                <div class="col-md-3 text-center">\n                  <span class="label label-sm" data-ng-class="license.update ? \'label-success\' : \'label-danger\'">{{license.update ? \'APPLICATION_ENABLED\' : \'APPLICATION_DISABLED\' | translate}}</span>\n                </div>\n              </li>\n            </ul>\n            <div class="pricing-footer">\n              <p>\n                {{license.description}}\n              </p>\n              <a href="https://www.xcallymotion.com/prices" target="_blank" class="btn yellow-crusta">\n                {{\'APPLICATION_PRICES\' | translate}} <i class="m-icon-swapright m-icon-white"></i>\n              </a>\n              <a href="#" class="btn purple-plum" data-ng-click="updateLicense()">\n                {{\'APPLICATION_UPDATE\' | translate}} <i class="icon-refresh m-icon-white"></i>\n              </a>\n            </div>\n          </div>\n        </div>\n        <div class="col-md-6">\n          <div class="portlet light bordered">\n            <div class="portlet-title">\n              <div class="caption font-green-sharp">\n                <i class="icon-info font-green-sharp"></i>\n                <span class="caption-subject">{{ \'APPLICATION_LICENSE_REQUEST\' | translate }}</a> </span>\n              </div>\n            </div>\n            <div class="portlet-body">\n              <form name="form" novalidate data-ng-submit="submitRequest()">\n\n                <!-- START USERS -->\n                <div class="form-group" data-ng-class="{\'has-error\': (form.users.$touched || form.$submitted) && form.users.$invalid}">\n                  <label class="control-label">{{\'APPLICATION_USERS\' | translate}}</label>\n                  <div class="input-icon">\n                    <i class="icon-eye"></i>\n                    <input type="number" name="users" placeholder="{{\'APPLICATION_USERS\' | translate}}" class="form-control" data-ng-model="item.users" min="0" required>\n                  </div>\n                  <span data-ng-show="(form.users.$touched || forms.$submitted) && form.users.$error.required" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n                <!-- END USERS -->\n\n                <!-- START AGENTS -->\n                <div class="form-group" data-ng-class="{\'has-error\': (form.agents.$touched || form.$submitted) && form.agents.$invalid}">\n                  <label class="control-label">{{\'APPLICATION_AGENTS\' | translate}} ({{\'APPLICATION_CONCURRENTS\' | translate}})</label>\n                  <div class="input-icon">\n                    <i class="icon-people"></i>\n                    <input type="number" name="agents" placeholder="{{\'APPLICATION_AGENTS\' | translate}} ({{\'APPLICATION_CONCURRENTS\' | translate}})" class="form-control" data-ng-model="item.agents" min="0" required>\n                  </div>\n                  <span data-ng-show="(form.users.$touched || forms.$submitted) && form.users.$error.required" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n                <!-- END AGENTS -->\n\n                <!-- START TELEPHONES -->\n                <div class="form-group" data-ng-class="{\'has-error\': (form.telephones.$touched || form.$submitted) && form.telephones.$invalid}">\n                  <label class="control-label">{{\'APPLICATION_TELEPHONES\' | translate}}</label>\n                  <div class="input-icon">\n                    <i class="icon-phone"></i>\n                    <input type="number" name="telephones" placeholder="{{\'APPLICATION_TELEPHONES\' | translate}}" class="form-control" data-ng-model="item.telephones" min="0" required>\n                  </div>\n                  <span data-ng-show="(form.telephones.$touched || forms.$submitted) && form.telephones.$error.required" class="help-block help-block-error">\n                    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                  </span>\n                </div>\n                <!-- END TELEPHONES -->\n                <div class="row">\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_CHAT\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.chat"\n                    type="checkbox"\n                    name="chat"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_MAIL\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.mail"\n                    type="checkbox"\n                    name="mail"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_FAX\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.fax"\n                    type="checkbox"\n                    name="fax"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_SMS\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.messaging"\n                    type="checkbox"\n                    name="messaging"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_OPEN_CHANNEL\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.openchannel"\n                    type="checkbox"\n                    name="openchannel"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_CONTACT_MANAGER\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.cm"\n                    type="checkbox"\n                    name="cm"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_MOTION_DIALER\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.dialer"\n                    type="checkbox"\n                    name="dialer"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_JSCRIPTY\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.jscripty"\n                    type="checkbox"\n                    name="jscripty"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_CUSTOMIZATION\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.custom"\n                    type="checkbox"\n                    name="custom"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                  <div class="form-group col-md-4 col-xs-6">\n                    <label class="control-label">{{\'APPLICATION_UPDATE\' | translate}}</label></br>\n                    <input\n                    bs-switch\n                    class="form-control"\n                    ng-model="item.update"\n                    type="checkbox"\n                    name="update"\n                    switch-active="{{ radioSwitch.isActive }}"\n                    switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n                    switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n                    switch-on-color="{{ radioSwitch.onColor }}"\n                    switch-off-color="{{ radioSwitch.offColor }}"\n                    switch-animate="{{ radioSwitch.animate }}"\n                    switch-size="{{ radioSwitch.size }}"\n                    switch-label="{{ radioSwitch.label }}"\n                    switch-icon="{{ radioSwitch.icon }}"\n                    switch-radio-off="{{ radioSwitch.radioOff }}"\n                    switch-label-width="{{ radioSwitch.labelWidth }}"\n                    switch-handle-width="{{ radioSwitch.handleWidth }}">\n                  </div>\n                </div>\n\n                <input class="btn green-haze" type="submit" value="{{\'APPLICATION_SUBMIT\' | translate}} {{\'APPLICATION_REQUEST\' | translate}}"/>\n              </form>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n    <!-- END PROFILE CONTENT -->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/setting/network/view/externip/externip.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{title}}</h3>\n</div>\n<div class="modal-body" data-ng-init="initModal()">\n  <form name="form" novalidate>\n\n    <!-- START ADDRESS -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.address.$touched || form.$submitted) && form.address.$invalid}">\n      <label class="control-label">{{\'APPLICATION_ADDRESS\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="address" placeholder="{{\'APPLICATION_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.value" required data-ng-pattern="/^(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})(.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}$/"/>\n      <span data-ng-show="(form.address.$touched || form.$submitted) && form.address.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.address.$touched || form.$submitted) && form.address.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n      </span>\n    </div>\n    <!-- END ADDRESS -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/setting/network/view/externip/externip.html",'<!-- BEGIN PAGE CONTENT-->\r\n<div class="row">\r\n	<div class="col-md-12">\r\n		<!-- BEGIN Portlet PORTLET-->\r\n		<div class="portlet light bordered" data-ng-init="initView()">\r\n			<div class="portlet-title">\r\n				<div class="caption font-green-sharp">\r\n					<i class="icon-globe font-green-sharp"></i>\r\n					<span class="caption-subject">{{ \'APPLICATION_EXTERNIP\' | translate }}</a> </span>\r\n				</div>\r\n				<div class="actions">\r\n					<div class="btn-group" data-ng-show="id.length">\r\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\r\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\r\n						</a>\r\n					</div>\r\n					<div class="btn-group">\r\n						<a class="btn green-jungle" href="#" data-toggle="dropdown" data-ng-click="createItem()">\r\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_EXTERNIP\' | translate }}\r\n						</a>\r\n					</div>\r\n				</div>\r\n			</div>\r\n			<div class="portlet-body">\r\n				<!-- START TABLE -->\r\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\r\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\r\n				</div>\r\n				<!-- END TABLE -->\r\n			</div>\r\n		</div>\r\n		<!-- END Portlet PORTLET-->\r\n	</div>\r\n</div>\r\n<!-- END PAGE CONTENT-->\r\n'),a.put("app/setting/network/view/localnet/localnet.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{title}}</h3>\n</div>\n<div class="modal-body" data-ng-init="initModal()">\n  <form name="form" novalidate>\n\n    <!-- START ADDRESS -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.address.$touched || form.$submitted) && form.address.$invalid}">\n      <label class="control-label">{{\'APPLICATION_ADDRESS\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="address" placeholder="{{\'APPLICATION_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.address" required data-ng-pattern="/^(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})(.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}$/"/>\n      <span data-ng-show="(form.address.$touched || form.$submitted) && form.address.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.address.$touched || form.$submitted) && form.address.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n      </span>\n    </div>\n    <!-- END ADDRESS -->\n\n    <!-- START MASK -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.mask.$touched || form.$submitted) && form.mask.$invalid}">\n      <label class="control-label">{{\'APPLICATION_MASK\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="mask" placeholder="{{\'APPLICATION_MASK\' | translate}}" class="form-control" data-ng-model="item.mask" required data-ng-pattern="/^(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})(.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}$/"/>\n      <span data-ng-show="(form.mask.$touched || form.$submitted) && form.mask.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.mask.$touched || form.$submitted) && form.mask.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n      </span>\n    </div>\n    <!-- END MASK -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/setting/network/view/localnet/localnet.html",'<!-- BEGIN PAGE CONTENT-->\r\n<div class="row">\r\n	<div class="col-md-12">\r\n		<!-- BEGIN Portlet PORTLET-->\r\n		<div class="portlet light bordered" data-ng-init="initView()">\r\n			<div class="portlet-title">\r\n				<div class="caption font-green-sharp">\r\n					<i class="icon-desktop font-green-sharp"></i>\r\n					<span class="caption-subject">{{ \'APPLICATION_LOCALNET\' | translate }}</a> </span>\r\n				</div>\r\n				<div class="actions">\r\n					<div class="btn-group" data-ng-show="id.length">\r\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\r\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\r\n						</a>\r\n					</div>\r\n					<div class="btn-group">\r\n						<a class="btn green-jungle" href="#" data-toggle="dropdown" data-ng-click="createItem()">\r\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_LOCALNET\' | translate }}\r\n						</a>\r\n					</div>\r\n				</div>\r\n			</div>\r\n			<div class="portlet-body">\r\n				<!-- START TABLE -->\r\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\r\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\r\n				</div>\r\n				<!-- END TABLE -->\r\n			</div>\r\n		</div>\r\n		<!-- END Portlet PORTLET-->\r\n	</div>\r\n</div>\r\n<!-- END PAGE CONTENT-->\r\n'),a.put("app/setting/network/view/view.html",'<!-- BEGIN PAGE CONTENT-->\r\n<div class="row">\r\n	<div class="col-md-12">\r\n		<div class="page-bar">\r\n			<ul class="page-breadcrumb">\r\n				<li>\r\n					<i class="icon-rocket"></i>\r\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\r\n					<i class="fa fa-angle-right"></i>\r\n				</li>\r\n				<li>\r\n					<i class="icon-settings"></i>\r\n					<a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\r\n          <i class="fa fa-angle-right"></i>\r\n				</li>\r\n        <li>\r\n          <i class="icon-globe"></i>\r\n          <a href="#">{{ \'APPLICATION_NETWORK\' | translate }}</a>\r\n        </li>\r\n			</ul>\r\n		</div>\r\n\r\n		<!-- BEGIN PROFILE SIDEBAR -->\r\n		<div class="profile-sidebar">\r\n			<!-- PORTLET MAIN -->\r\n			<div class="portlet light profile-sidebar-portlet">\r\n				<!-- SIDEBAR USERPIC -->\r\n				<div class="profile-image">\r\n					<img src="assets/images/media/business.png" class="img-responsive">\r\n				</div>\r\n				<!-- END SIDEBAR USERPIC -->\r\n				<!-- SIDEBAR USER TITLE -->\r\n				<div class="profile-usertitle">\r\n					<div class="profile-usertitle-name">\r\n						{{ \'APPLICATION_NETWORK\' | translate }}\r\n					</div>\r\n				</div>\r\n				<!-- END SIDEBAR USER TITLE -->\r\n				<!-- SIDEBAR MENU -->\r\n				<div class="profile-usermenu">\r\n					<ul class="nav">\r\n						<li data-ng-class="{active: $state.is(\'main.setting.network.view.localnet\')}">\r\n							<a ng-href="/setting/network/view/localnet">\r\n							<i class="icon-screen-desktop"></i>\r\n							{{ \'APPLICATION_LOCALNET\' | translate }} </a>\r\n						</li>\r\n						<li data-ng-class="{active: $state.is(\'main.setting.network.view.externip\')}">\r\n							<a ng-href="/setting/network/view/externip">\r\n							<i class="icon-globe"></i>\r\n							{{ \'APPLICATION_EXTERNIP\' | translate }} </a>\r\n						</li>\r\n					</ul>\r\n				</div>\r\n				<!-- END MENU -->\r\n			</div>\r\n			<!-- END PORTLET MAIN -->\r\n		</div>\r\n		<!-- END BEGIN PROFILE SIDEBAR -->\r\n		<!-- BEGIN PROFILE CONTENT -->\r\n		<div ui-view class="profile-content">\r\n		</div>\r\n		<!-- END PROFILE CONTENT -->\r\n\r\n	</div>\r\n</div>\r\n<!-- END PAGE CONTENT-->\r\n'),a.put("app/setting/smtp/view/view.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">SMTP</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body" data-ng-init="initView();initMailAccounts();">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="mail-spinner-grid" spinner-start-active="false"></span>\n				<!-- END UI-GRID SPINNER -->\n\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItem()" novalidate>\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.account.name" required/>\n								<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid && forms.info.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<!-- START SERVICE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_SERVICE\' | translate}}</label><br>\n								<input\n								bs-switch\n								data-ng-model="item.account.service"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END SERVICE -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n					<!-- SMTP TAB -->\n					<div class="tab-pane" id="tab_1_2">\n\n						<div class="note note-danger" data-ng-show="item.account.MailServerOut.state === \'DISCONNECTED\' || item.account.MailServerOut.state === \'ERROR\'">\n							<p> ERROR </p>\n							<json-formatter open="1" json="item.account.MailServerOut.source"></json-formatter>\n						</div>\n\n						<div class="note note-success" data-ng-show="item.account.MailServerOut.state === \'CONNECTED\'">\n							<p> CONNECTED </p>\n						</div>\n\n						<div class="note note-info" data-ng-show="item.account.MailServerOut.state === \'CONNECTING\'">\n							<p> TRYING... </p>\n						</div>\n\n						<form name="forms.formOut" data-ng-submit="forms.formOut.$valid && updateItem()" novalidate>\n\n							<!-- START HOST -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formOut.host.$touched || forms.formOut.$submitted) && forms.formOut.host.$invalid}">\n								<label class="control-label">{{\'APPLICATION_HOST\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="item.account.MailServerOut.host" required/>\n								<span data-ng-show="(forms.formOut.host.$touched || forms.formOut.$submitted) && forms.formOut.host.$invalid && forms.formOut.host.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END HOST -->\n\n							<!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formOut.username.$touched || forms.formOut.$submitted) && forms.formOut.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.account.MailServerOut.username" required/>\n								<span data-ng-show="(forms.formOut.username.$touched || forms.formOut.$submitted) && forms.formOut.username.$invalid && forms.formOut.username.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formOut.password.$touched || forms.formOut.$submitted) && forms.formOut.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.account.MailServerOut.password" required/>\n								<span data-ng-show="(forms.formOut.password.$touched || forms.formOut.$submitted) && forms.formOut.password.$invalid && forms.formOut.password.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n							<!-- START PORT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.formOut.port.$touched || forms.formOut.$submitted) && forms.formOut.port.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" name="port" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="item.account.MailServerOut.port" required/>\n								<span data-ng-show="(forms.formOut.form.$touched || forms.formOut.$submitted) && forms.formOut.port.$invalid && forms.formOut.port.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formOut.form.$touched || forms.formOut.$submitted) && forms.formOut.port.$invalid && forms.formOut.port.$error.number" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PORT -->\n\n							<!-- START SSL -->\n							<div class="form-group">\n								<label class="control-label">SSL</label><br>\n								<input\n								bs-switch\n								data-ng-model="item.account.MailServerOut.ssl"\n								type="checkbox"\n								switch-active="{{ isActive }}"\n								switch-on-text="{{ \'APPLICATION_ENABLED\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_DISABLED\' | translate }}"\n								switch-on-color="{{ onColor }}"\n								switch-off-color="{{ offColor }}"\n								switch-animate="{{ animate }}"\n								switch-size="{{ size }}"\n								switch-label="{{ label }}"\n								switch-icon="{{ icon }}"\n								switch-radio-off="{{ radioOff }}"\n								switch-label-width="{{ labelWidth }}"\n								switch-handle-width="{{ handleWidth }}">\n							</div>\n							<!-- END SSL -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n							<input class="btn blue-madison" type="button" value="Test" data-ng-click="test()"/>\n						</form>\n					</div>\n					<!-- END SMTP TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/setting/system/view/console/console.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()" data-ng-click="cmdFocus()">\n	<div class="portlet light">\n		<div class="portlet-title tabbable-line">\n			<div class="caption caption-md">\n				<i class="icon-globe theme-font hide"></i>\n				<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_ASTERISK_CONSOLE\' | translate}}\n					<button class="btn btn-default" href="#" data-ng-click="output = \'\';cmdFocus();">\n						<i class="icon-ban"></i>\n					</button></span>\n				</div>\n		</div>\n		<div class="portlet-body">\n					<span us-spinner spinner-key="console-spinner" spinner-start-active="true"></span>\n					<div class="well" style="height:400px;overflow-y:scroll;" schroll-bottom="output" data-ng-bind-html="output"></div>\n					<form name="forms.console" data-ng-submit="forms.console.$valid && sendCmd() && !busy" novalidate>\n					<!-- START COMMAND -->\n					<div class="form-group">\n						<input type="text" name="command" id="command" placeholder="{{\'APPLICATION_INSERT_COMMAND\' | translate}}" class="form-control" data-ng-model="item.command" data-ng-disabled="busy" autocomplete="off" data-ng-keyup="keyUp($event)"/>\n					</div>\n					<span class="help-block">\n						{{ \'DESCRIPTION_ENTER_TO_COMMAND\' | translate }}\n					</span>\n					<button type="submit" class="hide"></button>\n					<!-- END COMMAND -->\n				</form>\n		</div>\n	</div>\n</div>\n'),a.put("app/setting/system/view/general/general.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="row ">\n				<div class="col-md-6 col-sm-6">\n					<div class="portlet light bordered">\n						<div class="portlet-title">\n							<div class="caption font-green-sharp">\n								<i class="icon-pie-chart font-green-sharp"></i>\n								<span class="caption-subject">{{ \'APPLICATION_MEMORY\' | translate }} (<b>{{ \'APPLICATION_TOTAL\' | translate }}</b>: {{system.memory.Total}} MB)</a> </span>\n							</div>\n							<div class="actions">\n								<a class="btn btn-default" href="#" data-ng-click="initView()">\n									<i class="icon-refresh"></i>\n								</a>\n							</div>\n						</div>\n						<div class="portlet-body">\n							<!-- BEGIN UI-GRID SPINNER -->\n							<span us-spinner spinner-key="memory-spinner" spinner-start-active="true"></span>\n							<!-- END UI-GRID SPINNER -->\n							<canvas  class="chart chart-pie"  chart-data="system.memory.values" chart-labels="system.memory.labels" chart-legend="true">\n							</canvas>\n						</div>\n					</div>\n				</div>\n				<div class="col-md-6 col-sm-6">\n					<div class="portlet light bordered">\n						<div class="portlet-title">\n							<div class="caption font-green-sharp">\n								<i class="icon-pie-chart font-green-sharp"></i>\n								<span class="caption-subject">{{ \'APPLICATION_DISK\' | translate }} (<b>{{ \'APPLICATION_TOTAL\' | translate }}</b>: {{system.mount.size}} GB)</a> </span>\n							</div>\n							<div class="actions">\n								<div class="portlet-input input-inline input-medium">\n									<div class="input-group">\n										<ui-select data-ng-model="system.mount" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_DISK\' | translate}}">{{$select.selected.mount}}</ui-select-match>\n											<ui-select-choices repeat="disk in system.disks | filter: $select.search">\n												<div ng-bind-html="disk.mount | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="input-group-btn">\n											<button class="btn btn-default" href="#" data-ng-click="initView()">\n												<i class="icon-refresh"></i>\n											</button>\n										</span>\n									</div>\n								</div>\n							</div>\n						</div>\n						<div class="portlet-body">\n							<!-- BEGIN UI-GRID SPINNER -->\n							<span us-spinner spinner-key="disk-spinner" spinner-start-active="true"></span>\n							<!-- END UI-GRID SPINNER -->\n							<canvas  class="chart chart-pie"  chart-data="system.mount.values" chart-labels="system.mount.labels" chart-legend="true">\n							</canvas>\n							<!-- END Portlet PORTLET-->\n						</div>\n					</div>\n				</div>\n			</div>\n			<div class="portlet light bordered">\n				<div class="portlet-title">\n					<div class="caption font-green-sharp">\n						<i class="icon-pie-chart font-green-sharp"></i>\n						<span class="caption-subject">CPU (<b>{{ \'APPLICATION_NUMBER_OF_CORES\' | translate }}</b>: {{system.cpu.cores.length}}, <b>MOTION</b>: {{system.cpu.motion}} % )</a> </span>\n					</div>\n					<div class="actions">\n						<a class="btn btn-default" href="#" data-ng-click="initView()">\n							<i class="icon-refresh"></i>\n						</a>\n					</div>\n				</div>\n				<div class="portlet-body">\n					<div class="row">\n						<div class="col-md-2 col-sm-4" data-ng-repeat="cpu in system.cpu.cores">\n							<!-- BEGIN UI-GRID SPINNER -->\n							<span us-spinner spinner-key="cpu-spinner" spinner-start-active="false"></span>\n							<!-- END UI-GRID SPINNER -->\n							<canvas  class="chart chart-doughnut"  chart-data="cpu.values" chart-labels="cpu.labels" chart-colours="cpu.colours" chart-legend="true">\n							</canvas>\n						</div>\n					</div>\n					<!-- END Portlet PORTLET-->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/setting/system/view/logs/logs.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="portlet light">\n		<div class="portlet-title tabbable-line">\n			<div class="caption caption-md">\n				<i class="icon-globe theme-font hide"></i>\n				<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_LOGS\' | translate}}\n					<button class="btn btn-default" href="#" data-ng-click="initView()">\n						<i class="icon-refresh"></i>\n					</button></span>\n				</div>\n			<ul class="nav nav-tabs">\n				<li class="active">\n					<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_OUTPUT\' | translate}}</a>\n				</li>\n				<li>\n					<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_ERRORS\' | translate}}</a>\n				</li>\n			</ul>\n		</div>\n		<div class="portlet-body">\n			<div class="tab-content">\n				<!-- CHANGE LOGO TAB -->\n				<div class="tab-pane active" id="tab_1_1">\n					<pre style="height:700px;overflow-y:scroll;" schroll-bottom="logs.output">\n						<!-- BEGIN UI-GRID SPINNER -->\n						<span us-spinner spinner-key="logs-spinner" spinner-start-active="true"></span>\n						<!-- END UI-GRID SPINNER -->\n						{{logs.output}}\n					</pre>\n				</div>\n				<div class="tab-pane" id="tab_1_2">\n					<pre style="height:700px;overflow-y:scroll;" schroll-bottom="logs.errors">\n						<!-- BEGIN UI-GRID SPINNER -->\n						<span us-spinner spinner-key="logs-spinner" spinner-start-active="true"></span>\n						<!-- END UI-GRID SPINNER -->\n						{{logs.errors}}\n					</pre>\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/setting/system/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-settings"></i>\n					<a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n				</li>\n        <li>\n          <i class="icon-pie-chart"></i>\n          <a href="#">{{ \'APPLICATION_SYSTEM\' | translate }}</a>\n        </li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img src="assets/images/media/customize.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ \'APPLICATION_SYSTEM\' | translate }}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.setting.system.view.general\')}">\n							<a ng-href="/setting/system/view/general">\n								<i class="icon-pie-chart"></i>\n								{{ \'APPLICATION_GENERAL\' | translate }} </a>\n							</li>\n							<li data-ng-class="{active: $state.is(\'main.setting.system.view.logs\')}">\n								<a ng-href="/setting/system/view/logs">\n									<i class="icon-list"></i>\n									{{ \'APPLICATION_LOGS\' | translate }} </a>\n							</li>\n							<li data-ng-class="{active: $state.is(\'main.setting.system.view.console\')}">\n								<a ng-href="/setting/system/view/console">\n									<i class="icon-chemistry"></i>\n									{{ \'APPLICATION_ASTERISK_CONSOLE\' | translate }} </a>\n								</li>\n						</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/update/list/landing.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n  <div class="col-md-12">\n    <div class="page-bar">\n      <ul class="page-breadcrumb">\n        <li>\n          <i class="icon-rocket"></i>\n          <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="icon-settings"></i>\n          <a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n          <i class="fa fa-angle-right"></i>\n        </li>\n        <li>\n          <i class="icon-cloud-download"></i>\n          <a href="#">{{ \'APPLICATION_UPDATES\' | translate }}</a>\n        </li>\n      </ul>\n    </div>\n    <!-- BEGIN PAGE CONTENT--> \n    <div class="row" data-ng-init="initCounter()">\n      <div class="col-md-12 page-500">\n        <div class="number">\n          <timer interval="1000" countdown="120">{{countdown}}</timer>\n        </div>\n        <div class="details">\n          <h3>Wait! We need to restart xCALLY Motion server.</h3>\n          <p>\n            We are updating it!<br/>\n            xCALLY Motion Team<br/><br/>\n          </p>\n        </div>\n      </div>\n    </div>\n    <!-- END PAGE CONTENT-->\n  </div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/setting/update/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-settings"></i>\n					<a href="#">{{ \'APPLICATION_SETTINGS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-cloud-download"></i>\n					<a href="#">{{ \'APPLICATION_UPDATES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<!-- <div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-cloud-download font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_UPDATES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<a class="btn btn-default" href="#" data-ng-click="pull()">\n						<i class="icon-cloud-download"></i> {{ \'APPLICATION_UPDATE\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body" data-ng-init="initView()"> -->\n				<!-- START TABLE -->\n				<!-- <div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div> -->\n				<!-- END TABLE -->\n			<!-- </div> -->\n			<!-- END Portlet PORTLET-->\n		<!-- </div> -->\n		<div class="row">\n			<div class="col-md-12">\n				<!-- BEGIN INLINE NOTIFICATIONS PORTLET-->\n				<div class="portlet">\n					<div class="portlet-title">\n						<div class="caption">\n							<i class="icon-cloud-download font-green-sharp"></i>{{ \'APPLICATION_UPDATE\' | translate }}\n						</div>\n						<div class="actions">\n							<button class="btn btn-default" href="#" data-ng-click="pull()">\n								<i class="icon-cloud-download"></i> {{ \'APPLICATION_UPDATE\' | translate }}\n							</button>\n						</div>\n					</div>\n					<div class="portlet-body" data-ng-init="initView()">\n						<div class="row margin-bottom-40">\n							<!-- Pricing -->\n							<div class="col-md-6">\n								<div class="pricing hover-effect current-version">\n									<div class="pricing-head">\n										<h3>{{ \'APPLICATION_CURRENT_VERSION\' | translate }} <span>\n										{{ \'APPLICATION_LAST_PERFORMED_UPDATE\' | translate }} </span>\n										</h3>\n										<h4>v. {{currentVersion.version}}</h4>\n									</div>\n									<ul class="pricing-content list-unstyled">\n										<li>\n											<i class="icon-clock"></i><b> {{\'APPLICATION_RELEASED_AT\' | translate}}:</b> {{currentVersion.createdAt}}\n										</li>\n										<li>\n											<i class="icon-list"></i> <a href="https://wiki.xcallymotion.com/display/XMD/Motion+GUI#MotionGUI-Version{{currentVersion.version}}">{{\'APPLICATION_CHANGELOG\' | translate}}</a>\n										</li>\n									</ul>\n									<div class="pricing-footer">\n									</div>\n								</div>\n							</div>\n							<div class="col-md-6">\n								<div class="pricing hover-effect" data-ng-class="{\'disabled-update\':currentVersion.version==latestVersion.version}">\n									<div class="pricing-head">\n										<h3>{{ \'APPLICATION_LATEST_VERSION\' | translate }} <span>\n										{{ \'APPLICATION_LAST_SOFTWARE_UPDATE_AVAILABLE\' | translate }} </span>\n										</h3>\n										<h4>v. {{latestVersion.version}}</h4>\n									</div>\n									<ul class="pricing-content list-unstyled">\n										<li>\n											<i class="icon-clock"></i><b> {{\'APPLICATION_RELEASED_AT\' | translate}}:</b> {{latestVersion.createdAt}}\n										</li>\n										<li>\n											<i class="icon-list"></i> <a href="https://wiki.xcallymotion.com/display/XMD/Motion+GUI#MotionGUI-Version{{latestVersion.version}}">{{\'APPLICATION_CHANGELOG\' | translate}}</a>\n										</li>\n									</ul>\n									<div class="pricing-footer">\n									</div>\n								</div>\n							</div>\n							<!--//End Pricing -->\n						</div>\n					</div>\n				</div>\n				<!-- END INLINE NOTIFICATIONS PORTLET-->\n			</div>\n		</div>\n\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/setting/update/list/list.pull.html",'<div class="modal-header">\n  <button data-ng-if="modal.dismissable" type="button" data-ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p data-ng-if="modal.text" data-ng-bind="modal.text"></p>\n  <div data-ng-if="modal.html" data-ng-bind-html="modal.html"></div>\n</div>\n<div class="modal-footer">\n  <button data-ng-repeat="button in modal.buttons" data-ng-class="button.classes" data-ng-click="button.click($event)" data-ng-bind="button.text" class="btn"></button>\n</div>\n'),a.put("app/square/odbc/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PROJECT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DSN -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.dsn.$touched || form.$submitted) && form.dsn.$invalid}">\n      <label class="control-label">{{\'APPLICATION_ODBC\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="dsn" placeholder="DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion" class="form-control" data-ng-model="item.dsn" required/>\n      <p class="help-block">Es. DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion</p>\n      <span data-ng-show="(form.dsn.$touched || form.$submitted) && form.dsn.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END DSN -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/square/odbc/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-superscript"></i>\n					<a>Cally &#178;</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="#">{{ \'APPLICATION_ODBCS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ODBCS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ODBC\' | translate }}\n						</button>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/square/odbc/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getOdbc()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-superscript"></i>\n					<a>Cally &#178;</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/square/odbc/list">{{ \'APPLICATION_ODBCS\' | translate }}</a>\n					<i data-ng-show="odbc" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="odbc">\n					<a href="#">{{odbc.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/odbc.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{odbc.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.square.odbc.view.settings\')}">\n							<a data-ng-href="/square/odbc/view/{{odbc.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/square/odbc/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_ODBC\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateOdbc()" novalidate>\n\n							<!-- START NAME -->\n				      <div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n				        <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n				        <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="odbc.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				        </span>\n				      </div>\n				      <!-- END NAME -->\n\n							<!-- START DSN -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.odbc.dsn.$touched || forms.odbc.$submitted) && forms.odbc.dsn.$invalid}">\n								<label class="control-label">{{\'APPLICATION_ODBC\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="dsn" placeholder="{{\'APPLICATION_DSN\' | translate}}" class="form-control" data-ng-model="odbc.dsn" required/>\n								<p class="help-block">Es. DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion</p>\n					      <span data-ng-show="(forms.odbc.dsn.$touched || forms.odbc.$submitted) && forms.odbc.dsn.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END DSN -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="odbc.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/square/project/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PROJECT\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/square/project/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-superscript"></i>\n					<a>Cally &#178;</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n        <li>\n          <i class="fa fa-slack"></i>\n          <a href="#">{{ \'APPLICATION_PROJECTS\' | translate }}</a>\n        </li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_PROJECTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_PROJECT\' | translate }}\n						</button>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/square/project/view/projectNotes.modal.html",'<div class="yellow-notes">\n<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 class="modal-title">{{\'APPLICATION_NOTES\' | translate}}</h4>\n</div>\n<div class="modal-body" style="text-align:center;">\n<textarea name="name" class="notes-textarea" placeholder="{{\'MESSAGE_INSERT_YOUR_TEXT_HERE\' | translate}}" data-ng-model="notes.value"></textarea>\n</div>\n<div class="modal-footer" >\n  <button class="btn green-haze" type="button" ng-click="close()">{{ \'APPLICATION_SAVE\' | translate }}</button>\n</div>\n</div>\n'),a.put("app/square/project/view/view.html",'<div class="row" data-ng-init="getProject()">\n	<div class="col-md-12">\n		<div class="page-bar" style="margin-bottom: 0px;">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-superscript"></i>\n					<a>Cally &#178;</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-slack"></i>\n					<a href="/square/projects/list">{{ \'APPLICATION_PROJECTS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a ng-href="/square/projects/view/{{squareProject.id}}">{{squareProject.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<h4 class="text-success bold"> {{squareProject.name}} <button class="btn btn-xs yellow-saffron" type="button" data-ng-click="editNotes()"><i class="icon-note"></i> {{\'APPLICATION_NOTES\' | translate}}</button></h4> <p class="text-muted"> {{squareProject.description}} </p>\n\n		<div id="geEditor" class="geEditor"></div>\n	</div>\n</div>\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n\n	</div>\n</div>\n\n<!-- END PAGE CONTENT-->\n<script></script>\n'),a.put("app/square/realtime/view/general/general.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="init()">\n	<div class="col-md-12">\n		<!-- START TABLE -->\n		<div ui-grid="gridOptions"  ui-grid-resize-columns  class="ui-grid" ui-grid-pagination ui-grid-auto-resize>\n			<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n		</div>\n		<!-- END TABLE -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/square/realtime/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-superscript"></i>\n					<a href="#">Cally &#178;</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-energy"></i>\n					<a href="/square/realtime/view/general">{{ \'APPLICATION_REALTIME\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<div>\n		    <nav class="navbar navbar-default" role="navigation">\n					<div class="collapse navbar-collapse">\n						<ul class="nav navbar-nav">\n							<li data-ng-class="{\'active\': $state.is(\'main.square.realtime.view.general\')}">\n								<a href="/square/realtime/view/general">\n									{{\'APPLICATION_GENERAL\' | translate}}\n								</a>\n							</li>\n						</ul>\n					</div>\n		    </nav>\n		</div>\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/square/recording/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-superscript"></i>\n					<a href="#">Cally &#178;</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-microphone"></i>\n					<a href="#">{{ \'APPLICATION_RECORDINGS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="fa fa-play font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_RECORDINGS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-puzzle"></i>\n					<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-people"></i>\n					<a href="#">{{ \'APPLICATION_AGENTS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-people font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_AGENTS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group" data-ng-show="Auth.getCurrentUser().role === \'admin\'">\n						<button type="button" class="btn green-jungle" data-toggle="dropdown" data-hover="dropdown" data-delay="1000" data-close-others="true" aria-expanded="true">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_AGENT\' | translate }} <i class="fa fa-angle-down"></i>\n						</button>\n						<ul class="dropdown-menu" role="menu">\n							<li>\n								<a href="/staff/agents/wizard">\n									Standard\n								</a>\n							</li>\n							<li>\n								<a href="/staff/agents/bulk">\n									{{ \'APPLICATION_BULK\' | translate }}\n								</a>\n							</li>\n						</ul>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/view/view.account.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_ACCOUNT\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li data-ng-class="{\'active\': Auth.isAdmin() || userModules[4]}" data-ng-show="Auth.isAdmin() || userModules[4]">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_PERSONAL_INFO\' | translate}}</a>\n					</li>\n					<li data-ng-show="Auth.isAdmin() || userModules[4]">\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_CHANGE_AVATAR\' | translate}}</a>\n					</li>\n					<li data-ng-show="Auth.isAdmin() || userModules[4] || agent.id === Auth.getCurrentUser().id" data-ng-class="{\'active\': !Auth.isAdmin() && agent.id === Auth.getCurrentUser().id}">\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_CHANGE_PASSWORD\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- PERSONAL INFO TAB -->\n					<div class="tab-pane" data-ng-class="{\'active\': Auth.isAdmin() || userModules[4]}" data-ng-show="Auth.isAdmin() || userModules[4]" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItem()" novalidate>\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n								<label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="agent.fullname" required/>\n								<span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}</label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="agent.name" disabled/>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START EMAIL -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$invalid}">\n								<label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="agent.email" required/>\n								<span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.email" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n								</span>\n							</div>\n							<!-- END EMAIL -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="agent.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<!-- START LOGIN IN PAUSE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_LOGIN_IN_PAUSE\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="agent.loginInPause"\n								type="checkbox"\n								name="auth"\n								switch-active="{{ recordSwitch.isActive }}"\n								switch-on-text="{{ recordSwitch.onText }}"\n								switch-off-text="{{ recordSwitch.offText }}"\n								switch-on-color="{{ recordSwitch.onColor }}"\n								switch-off-color="{{ recordSwitch.offColor }}"\n								switch-animate="{{ recordSwitch.animate }}"\n								switch-size="{{ recordSwitch.size }}"\n								switch-label="{{ recordSwitch.label }}"\n								switch-icon="{{ recordSwitch.icon }}"\n								switch-radio-off="{{ recordSwitch.radioOff }}"\n								switch-label-width="{{ recordSwitch.labelWidth }}"\n								switch-handle-width="{{ recordSwitch.handleWidth }}">\n							</div>\n							<!-- END LOGIN IN PAUSE -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END PERSONAL INFO TAB -->\n					<!-- CHANGE AVATAR TAB -->\n					<div class="tab-pane" data-ng-show="Auth.isAdmin() || userModules[4]" id="tab_1_2">\n						<form action="#" role="form">\n							<div class="form-group">\n								<div class="fileinput fileinput-new" data-provides="fileinput">\n									<div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">\n										<img ng-src="assets/images/media/noProfileImage.png" alt=""/>\n									</div>\n									<div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;">\n									</div>\n									<div>\n										<span class="btn default btn-file" data-ng-show="!uploader.queue[0]">\n											<span> {{ \'APPLICATION_SELECT_IMAGE\' | translate }} </span>\n											<input type="file" nv-file-select="" uploader="uploader" /><br/>\n										</span>\n										<button type="button" class="btn default" data-ng-show="uploader.queue[0]" data-dismiss="fileinput" ng-click="uploader.queue[0].remove()">\n											{{ \'APPLICATION_REMOVE\' | translate }}\n										</button>\n										<button type="button" class="btn green-haze" data-ng-show="uploader.queue[0]" data-ng-click="uploader.queue[0].upload()" ng-disabled="uploader.queue[0].isReady || uploader.queue[0].isUploading || uploader.queue[0].isSuccess">\n											{{ \'APPLICATION_CONFIRM\' | translate }}\n										</button>\n									</div>\n									<p>\n										</br> {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} <b>jpg, png, jpeg</b>.\n									</p>\n								</div>\n							</div>\n						</form>\n						<div class="row">\n							<div class="col-md-2">\n								<table class="table" border="0">\n									<tbody>\n									<tr data-ng-repeat="item in uploader.queue">\n											<td style="border-top-style:none">\n												<strong>\n													{{ item.file.name }}\n												</strong>\n											</td>\n											<td data-ng-show="uploader.isHTML5" nowrap style="border-top-style:none">\n												{{ item.file.size/1024/1024|number:2 }} MB\n											</td>\n											<td nowrap style="border-top-style:none">\n												<button type="button" class="btn btn-danger btn-xs" data-ng-click="item.remove()">\n														<span class="glyphicon glyphicon-trash"></span> Remove\n												</button>\n											</td>\n										</tr>\n									</tbody>\n								</table>\n							</div>\n						</div>\n					</div>\n					<!-- END CHANGE AVATAR TAB -->\n					<!-- CHANGE PASSWORD TAB -->\n					<div class="tab-pane" data-ng-show="Auth.isAdmin() || userModules[4] || agent.id === Auth.getCurrentUser().id" data-ng-class="{\'active\': !Auth.isAdmin() && agent.id === Auth.getCurrentUser().id}" id="tab_1_3">\n						<form name="forms.changePwd" data-ng-submit="forms.changePwd.$valid && updatePassword()" novalidate>\n							<!-- START CURRENT PWD -->\n							<div class="form-group" data-ng-if="!(Auth.isAdmin() || userModules[4])" data-ng-class="{\'has-error\': (forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="current_pwd" placeholder="{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}" class="form-control" data-ng-model="agent.currentPwd" required/>\n								<span data-ng-show="(forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CURRENT PWD -->\n							<!-- START NEW PWD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="new_pwd" placeholder="{{\'APPLICATION_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="agent.newPwd" data-ng-pattern="setting.securePassword ? settings.patternPassword : settings.patternPasswordLight" required/>\n								<span class="help-block">\n									{{setting.securePassword ? \'MESSAGE_PASSWORD_FORMAT\' : \'MESSAGE_PASSWORD_LIGTH_FORMAT\' | translate}}\n								</span>\n								<span data-ng-show="(forms.changePwd.current_pwd.$touched || forms.info.$submitted) && forms.changePwd.current_pwd.$error.pattern" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NEW PWD -->\n							<!-- START RE-NEW PWD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.re_new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.re_new_pwd.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="re_new_pwd" placeholder="{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="agent.reNewPwd" nx-equal="agent.newPwd" required/>\n								<span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END RE-NEW PWD -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CHANGE PASSWORD TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
+a.put("app/staff/agent/view/view.chat.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_CHAT\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body">\n				<!-- START CHAT TAB -->\n				<form name="form" data-ng-submit="patchItem()" novalidate>\n					<!-- START CAPACITY -->\n					<div class="form-group" data-ng-class="{\'has-error\': (form.capacity.$touched || form.$submitted) && form.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_CAPACITY\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" name="chatCapacity" placeholder="{{\'APPLICATION_CAPACITY\' | translate}}" class="form-control" data-ng-model="agent.chatCapacity" min="0" required/>\n						<span class="help-block">\n							{{\'MESSAGE_ZERO_MEANS_UNLIMITED\' | translate}}\n						</span>\n						<span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END CAPACITY -->\n					<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n				<!-- END CHAT TAB -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/staff/agent/view/view.fax.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_FAX\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body">\n				<!-- START CHAT TAB -->\n				<form name="form" data-ng-submit="patchItem()" novalidate>\n					<!-- START CAPACITY -->\n					<div class="form-group" data-ng-class="{\'has-error\': (form.capacity.$touched || form.$submitted) && form.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_CAPACITY\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" name="faxCapacity" placeholder="{{\'APPLICATION_CAPACITY\' | translate}}" class="form-control" data-ng-model="agent.faxCapacity" min="0" required/>\n						<span class="help-block">\n							{{\'MESSAGE_ZERO_MEANS_UNLIMITED\' | translate}}\n						</span>\n						<span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END CAPACITY -->\n					<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n				<!-- END CHAT TAB -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/staff/agent/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-puzzle"></i>\n					<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-people"></i>\n					<a href="/staff/agents/list">{{ \'APPLICATION_AGENTS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{agent.fullname}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-userpic">\n					<img ng-src="api/users/avatar/{{agent.userpic ? agent.userpic : \'unknown_avatar\'}}" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n\n				<!-- START SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{agent.fullname}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{agent.role}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.staff.agents.view.account\')}">\n							<a data-ng-href="/staff/agents/view/{{agent.id}}/account">\n							<i class="icon-user"></i>\n							{{ \'APPLICATION_ACCOUNT\' | translate}} </a>\n						</li>\n\n						<li data-ng-class="{active: $state.includes(\'main.staff.agents.view.queues\')}" data-ng-show="Auth.isAdmin() || userModules[7]">\n							<a data-ng-href="/staff/agents/view/{{agent.id}}/queues/voice">\n							<i class="icon-docs"></i>\n							{{ \'APPLICATION_QUEUES\' | translate}} </a>\n						</li>\n\n						<li data-ng-class="{active: $state.is(\'main.staff.agents.view.voice\')}" data-ng-show="Auth.isAdmin() || userModules[7]">\n							<a data-ng-href="/staff/agents/view/{{agent.id}}/voice">\n							<i class="icon-earphones-alt"></i>\n							{{ \'APPLICATION_VOICE\' | translate}} </a>\n						</li>\n\n						<li data-ng-class="{active: $state.is(\'main.staff.agents.view.chat\'),\'disabled-link\':!license.chat}" data-ng-show="Auth.isAdmin() || userModules[8]">\n							<a data-ng-href="{{license.chat ? \'/staff/agents/view/\'+agent.id+\'/chat\' : \'javascript:;\'}}" class="disable-target">\n							<i class="icon-bubble"></i>\n							{{ \'APPLICATION_CHAT\' | translate}} </a>\n						</li>\n\n						<li data-ng-class="{active: $state.is(\'main.staff.agents.view.mail\'),\'disabled-link\':!license.mail}" data-ng-show="Auth.isAdmin() || userModules[9]">\n							<a data-ng-href="{{license.mail ? \'/staff/agents/view/\'+agent.id+\'/mail\' : \'javascript:;\'}}" class="disable-target">\n							<i class="icon-envelope"></i>\n							{{ \'APPLICATION_MAIL\' | translate}} </a>\n						</li>\n\n						<li data-ng-class="{active: $state.is(\'main.staff.agents.view.fax\'),\'disabled-link\':!license.fax}" data-ng-show="Auth.isAdmin() || userModules[10]">\n							<a data-ng-href="{{license.fax ? \'/staff/agents/view/\'+agent.id+\'/fax\' : \'javascript:;\'}}" class="disable-target">\n							<i class="fa fa-fax"></i>\n							{{ \'APPLICATION_FAX\' | translate}} </a>\n						</li>\n\n						<li data-ng-class="{active: $state.is(\'main.staff.agents.view.sms\'),\'disabled-link\':!license.messaging}" data-ng-show="Auth.isAdmin() || userModules[11]">\n							<a data-ng-href="{{license.messaging ? \'/staff/agents/view/\'+agent.id+\'/sms\' : \'javascript:;\'}}" class="disable-target">\n								<i class="	glyphicon glyphicon-comment	"></i>\n							{{ \'APPLICATION_SMS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.staff.agents.view.openchannel\'),\'disabled-link\':!license.openchannel}" data-ng-show="Auth.isAdmin() || userModules[20]">\n							<a data-ng-href="{{license.openchannel ? \'/staff/agents/view/\'+agent.id+\'/openchannel\' : \'javascript:;\'}}" class="disable-target">\n								<i class="	icon-globe	"></i>\n							{{ \'APPLICATION_OPEN_CHANNEL\' | translate}} </a>\n						</li>\n\n						<li data-ng-class="{active: $state.is(\'main.staff.agents.view.motionbar\')}" data-ng-show="Auth.isAdmin()">\n							<a data-ng-href="/staff/agents/view/{{agent.id}}/motionbar">\n							<i class="icon-screen-desktop"></i>\n							{{ \'APPLICATION_MOTION_BAR\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/view/view.mail.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_MAIL\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body">\n				<!-- START CHAT TAB -->\n				<form name="form" data-ng-submit="patchItem()" novalidate>\n					<!-- START CAPACITY -->\n					<div class="form-group" data-ng-class="{\'has-error\': (form.capacity.$touched || form.$submitted) && form.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_CAPACITY\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" name="mailCapacity" placeholder="{{\'APPLICATION_CAPACITY\' | translate}}" class="form-control" data-ng-model="agent.mailCapacity" min="0" required/>\n						<span class="help-block">\n							{{\'MESSAGE_ZERO_MEANS_UNLIMITED\' | translate}}\n						</span>\n						<span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END CAPACITY -->\n					<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n				<!-- END CHAT TAB -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/staff/agent/view/view.motionbar.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_MOTION_BAR\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li data-ng-class="{\'active\': Auth.isAdmin()}" data-ng-show="Auth.isAdmin()">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n					<li data-ng-show="Auth.isAdmin()">\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_CALL_FORWARDING\' | translate}}</a>\n					</li>\n					<li data-ng-show="Auth.isAdmin()">\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_ADVANCED\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- START GENERAL TAB -->\n					<div class="tab-pane" data-ng-class="{\'active\': Auth.isAdmin()}" data-ng-show="Auth.isAdmin()" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="updateItem()" novalidate>\n\n							<!-- START ENABLE_SETTINGS -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_ENABLE_SETTINGS\' | translate}}</label><br>\n								<input\n								bs-switch\n								ng-model="agent.phoneBarEnableSettings"\n								type="checkbox"\n								switch-active="{{ radioSwitch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ radioSwitch.onColor }}"\n								switch-off-color="{{ radioSwitch.offColor }}"\n								switch-animate="{{ radioSwitch.animate }}"\n								switch-size="{{ radioSwitch.size }}"\n								switch-label="{{ radioSwitch.label }}"\n								switch-icon="{{ radioSwitch.icon }}"\n								switch-radio-off="{{ radioSwitch.radioOff }}"\n								switch-label-width="{{ radioSwitch.labelWidth }}"\n								switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END ENABLE_SETTINGS -->\n\n							<!-- START AUTO_ANSWER -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_AUTO_ANSWER\' | translate}}</label><br>\n								<input\n								bs-switch\n								ng-model="agent.phoneBarAutoAnswer"\n								type="checkbox"\n								switch-active="{{ radioSwitch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ radioSwitch.onColor }}"\n								switch-off-color="{{ radioSwitch.offColor }}"\n								switch-animate="{{ radioSwitch.animate }}"\n								switch-size="{{ radioSwitch.size }}"\n								switch-label="{{ radioSwitch.label }}"\n								switch-icon="{{ radioSwitch.icon }}"\n								switch-radio-off="{{ radioSwitch.radioOff }}"\n								switch-label-width="{{ radioSwitch.labelWidth }}"\n								switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END AUTO_ANSWER -->\n\n							<!-- START APPLICATION_ENABLE_RECORDING -->\n							<!-- <div class="form-group">\n								<label class="control-label">{{\'APPLICATION_ENABLE_RECORDING\' | translate}}</label><br>\n								<input\n								bs-switch\n								ng-model="agent.phoneBarEnableRecording"\n								type="checkbox"\n								switch-active="{{ radioSwitch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ radioSwitch.onColor }}"\n								switch-off-color="{{ radioSwitch.offColor }}"\n								switch-animate="{{ radioSwitch.animate }}"\n								switch-size="{{ radioSwitch.size }}"\n								switch-label="{{ radioSwitch.label }}"\n								switch-icon="{{ radioSwitch.icon }}"\n								switch-radio-off="{{ radioSwitch.radioOff }}"\n								switch-label-width="{{ radioSwitch.labelWidth }}"\n								switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div> -->\n							<!-- END APPLICATION_ENABLE_RECORDING -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n					<!-- START CALL FORWARDING TAB -->\n					<div class="tab-pane" data-ng-show="Auth.isAdmin()" id="tab_1_2">\n						<form name="forms.callForwarding" data-ng-submit="updateItem()" novalidate>\n\n							<!-- START UNCONDITIONAL -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_UNCONDITIONAL\' | translate}}</label><br>\n								<input\n								bs-switch\n								ng-model="agent.phoneBarUnconditional"\n								type="checkbox"\n								switch-active="{{ radioSwitch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ radioSwitch.onColor }}"\n								switch-off-color="{{ radioSwitch.offColor }}"\n								switch-animate="{{ radioSwitch.animate }}"\n								switch-size="{{ radioSwitch.size }}"\n								switch-label="{{ radioSwitch.label }}"\n								switch-icon="{{ radioSwitch.icon }}"\n								switch-radio-off="{{ radioSwitch.radioOff }}"\n								switch-label-width="{{ radioSwitch.labelWidth }}"\n								switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END UNCONDITIONAL -->\n\n\n							<!-- START UNCONDITIONAL NUMBER -->\n							<div class="form-group" data-ng-if="agent.phoneBarUnconditional" data-ng-class="{\'has-error\': (forms.callForwarding.phoneBarUnconditionalNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarUnconditionalNumber.$invalid}">\n								<input type="text" name="phoneBarUnconditionalNumber" placeholder="{{\'APPLICATION_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.phoneBarUnconditionalNumber" required/>\n								<span class="help-block">\n									<!-- {{ \'DESCRIPTION_VOICE_HOST\' | translate }} -->\n								</span>\n								<span data-ng-show="(forms.callForwarding.phoneBarUnconditionalNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarUnconditionalNumber.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END UNCONDITIONAL NUMBER -->\n\n							<!-- START NO REPLY -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_NO_REPLY\' | translate}}</label><br>\n								<input\n								bs-switch\n								ng-model="agent.phoneBarNoReply"\n								type="checkbox"\n								switch-active="{{ radioSwitch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ radioSwitch.onColor }}"\n								switch-off-color="{{ radioSwitch.offColor }}"\n								switch-animate="{{ radioSwitch.animate }}"\n								switch-size="{{ radioSwitch.size }}"\n								switch-label="{{ radioSwitch.label }}"\n								switch-icon="{{ radioSwitch.icon }}"\n								switch-radio-off="{{ radioSwitch.radioOff }}"\n								switch-label-width="{{ radioSwitch.labelWidth }}"\n								switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END NO REPLY -->\n\n							<!-- START NO REPLY -->\n							<div class="form-group" data-ng-if="agent.phoneBarNoReply" data-ng-class="{\'has-error\': (forms.callForwarding.phoneBarNoReplyNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarNoReplyNumber.$invalid}">\n								<input type="text" name="phoneBarNoReplyNumber" placeholder="{{\'APPLICATION_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.phoneBarNoReplyNumber" required/>\n								<span class="help-block">\n									<!-- {{ \'DESCRIPTION_VOICE_HOST\' | translate }} -->\n								</span>\n								<span data-ng-show="(forms.callForwarding.phoneBarNoReplyNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarNoReplyNumber.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END REPLY -->\n\n							<!-- START BUSY -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_BUSY\' | translate}}</label><br>\n								<input\n								bs-switch\n								ng-model="agent.phoneBarBusy"\n								type="checkbox"\n								switch-active="{{ radioSwitch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ radioSwitch.onColor }}"\n								switch-off-color="{{ radioSwitch.offColor }}"\n								switch-animate="{{ radioSwitch.animate }}"\n								switch-size="{{ radioSwitch.size }}"\n								switch-label="{{ radioSwitch.label }}"\n								switch-icon="{{ radioSwitch.icon }}"\n								switch-radio-off="{{ radioSwitch.radioOff }}"\n								switch-label-width="{{ radioSwitch.labelWidth }}"\n								switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END BUSY -->\n\n							<!-- START BUSY NUMBER -->\n							<div class="form-group" data-ng-if="agent.phoneBarBusy" data-ng-class="{\'has-error\': (forms.callForwarding.phoneBarBusyNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarBusyNumber.$invalid}">\n								<input type="text" name="phoneBarBusyNumber" placeholder="{{\'APPLICATION_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.phoneBarBusyNumber" required/>\n								<span class="help-block">\n									<!-- {{ \'DESCRIPTION_VOICE_HOST\' | translate }} -->\n								</span>\n								<span data-ng-show="(forms.callForwarding.phoneBarBusyNumber.$touched || forms.callForwarding.$submitted) && forms.callForwarding.phoneBarBusyNumber.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END BUSY NUMBER -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CALL FORWARDING TAB -->\n					<!-- START ADVANCED TAB -->\n					<div class="tab-pane" data-ng-show="Auth.isAdmin()" id="tab_1_3">\n						<form name="forms.advanced" data-ng-submit="updateItem()" novalidate>\n\n							<!-- START ENABLE REMOTE CONTROL -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_REMOTE_CONTROL\' | translate}}</label><br>\n								<input\n								bs-switch\n								ng-model="agent.phoneBarRemoteControl"\n								type="checkbox"\n								switch-active="{{ radioSwitch.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ radioSwitch.onColor }}"\n								switch-off-color="{{ radioSwitch.offColor }}"\n								switch-animate="{{ radioSwitch.animate }}"\n								switch-size="{{ radioSwitch.size }}"\n								switch-label="{{ radioSwitch.label }}"\n								switch-icon="{{ radioSwitch.icon }}"\n								switch-radio-off="{{ radioSwitch.radioOff }}"\n								switch-label-width="{{ radioSwitch.labelWidth }}"\n								switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END ENABLE REMOTE CONTROL -->\n\n\n							<!-- START REMOTE CONTROL PORT -->\n							<div class="form-group" data-ng-if="agent.phoneBarRemoteControl" data-ng-class="{\'has-error\': (forms.advanced.phoneBarRemoteControlPort.$touched || forms.advanced.$submitted) && forms.advanced.phoneBarRemoteControlPort.$invalid}">\n								<label class="control-label">{{\'APPLICATION_REMOTE_CONTROL\' | translate}} {{\'APPLICATION_PORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="phoneBarRemoteControlPort" placeholder="{{\'APPLICATION_REMOTE_CONTROL\' | translate}} {{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="agent.phoneBarRemoteControlPort" required/>\n								<span class="help-block">Default: 9888</span>\n								<span data-ng-show="(forms.advanced.phoneBarRemoteControlPort.$touched || forms.advanced.$submitted) && forms.advanced.phoneBarRemoteControlPort.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.advanced.phoneBarRemoteControlPort.$error.max || form.advanced.phoneBarRemoteControlPort.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}}.\n								</span>\n							</div>\n							<!-- END REMOTE CONTROL PORT -->\n\n							<!-- START SIP EXPIRES -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.phoneBarExpires.$touched || forms.advanced.$submitted) && forms.advanced.phoneBarExpires.$invalid}">\n								<label class="control-label">SIP {{\'APPLICATION_EXPIRES\' | translate}} [sec]<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="1" name="phoneBarExpires" placeholder="SIP {{\'APPLICATION_EXPIRES\' | translate}}" class="form-control" data-ng-model="agent.phoneBarExpires" required/>\n								<span class="help-block">Default: 160</span>\n								<span data-ng-show="(forms.advanced.phoneBarExpires.$touched || forms.advanced.$submitted) && forms.advanced.phoneBarExpires.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.advanced.phoneBarExpires.$error.max || form.advanced.phoneBarExpires.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}} (min 1).\n								</span>\n							</div>\n							<!-- END SIP EXPIRES -->\n\n							<!-- START SIP PORT -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.phoneBarListenPort.$touched || forms.advanced.$submitted) && forms.advanced.phoneBarListenPort.$invalid}">\n								<label class="control-label">SIP {{\'APPLICATION_PORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="number" min="0" max="65535" name="phoneBarListenPort" placeholder="SIP {{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="agent.phoneBarListenPort" required/>\n								<span class="help-block">Default: 5060</span>\n								<span data-ng-show="(forms.advanced.phoneBarListenPort.$touched || forms.advanced.$submitted) && forms.advanced.phoneBarListenPort.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="form.advanced.phoneBarListenPort.$error.max || form.advanced.phoneBarListenPort.$error.min" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_NUMBER\' | translate}} (0-65535).\n								</span>\n							</div>\n							<!-- END SIP PORT -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/staff/agent/view/view.openchannel.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_OPEN_CHANNEL\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body">\n				<!-- START CHAT TAB -->\n				<form name="form" data-ng-submit="patchItem()" novalidate>\n					<!-- START CAPACITY -->\n					<div class="form-group" data-ng-class="{\'has-error\': (form.capacity.$touched || form.$submitted) && form.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_CAPACITY\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" name="openchannelCapacity" placeholder="{{\'APPLICATION_CAPACITY\' | translate}}" class="form-control" data-ng-model="agent.openchannelCapacity" min="0" required/>\n						<span class="help-block">\n							{{\'MESSAGE_ZERO_MEANS_UNLIMITED\' | translate}}\n						</span>\n						<span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END CAPACITY -->\n					<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n				<!-- END CHAT TAB -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/staff/agent/view/view.queues.chat.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initChatQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-queues-chat">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/view/view.queues.fax.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initFaxQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-queues-fax">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/view/view.queues.html","<!-- BEGIN PAGE CONTENT-->\n<div class=\"row\" data-ng-init=\"initView()\">\n	<div class=\"col-md-12\">\n		<div>\n		    <nav class=\"navbar navbar-default\" role=\"navigation\">\n					<div class=\"collapse navbar-collapse\">\n						<ul class=\"nav navbar-nav\">\n							<li data-ng-class=\"{'active': $state.is('main.staff.agents.view.queues.voice')}\">\n								<a href=\"/staff/agents/view/{{agent.id}}/queues/voice\">\n									<i class=\"icon-earphones-alt\"></i> {{'APPLICATION_VOICE' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.agents.view.queues.chat'),'disabled-link':!license.chat}\" data-ng-show=\"Auth.isAdmin() || userModules[8]\">\n								<a href=\"{{license.chat ? '/staff/agents/view/'+agent.id+'/queues/chat' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"icon-bubble\"></i> {{'APPLICATION_CHAT' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.agents.view.queues.mail'),'disabled-link':!license.mail}\" data-ng-show=\"Auth.isAdmin() || userModules[9]\">\n								<a href=\"{{license.mail ? '/staff/agents/view/'+agent.id+'/queues/mail' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"icon-envelope\"></i>{{'APPLICATION_MAIL' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.agents.view.queues.fax'),'disabled-link':!license.fax}\" data-ng-show=\"Auth.isAdmin() || userModules[10]\">\n								<a href=\"{{license.fax ? '/staff/agents/view/'+agent.id+'/queues/fax' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"fa fa-fax\"></i> {{'APPLICATION_FAX' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.agents.view.queues.sms'),'disabled-link':!license.messaging}\" data-ng-show=\"Auth.isAdmin() || userModules[11]\">\n								<a href=\"{{license.messaging ? '/staff/agents/view/'+agent.id+'/queues/sms' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"glyphicon glyphicon-comment\"></i> {{'APPLICATION_SMS' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.agents.view.queues.openchannel'),'disabled-link':!license.openchannel}\" data-ng-show=\"Auth.isAdmin() || userModules[20]\">\n								<a href=\"{{license.openchannel ? '/staff/agents/view/'+agent.id+'/queues/openchannel' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"icon-globe\"></i> {{'APPLICATION_OPEN_CHANNEL' | translate}}\n								</a>\n							</li>\n						</ul>\n					</div>\n		    </nav>\n		</div>\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n"),a.put("app/staff/agent/view/view.queues.mail.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initMailQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-queues-mail">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/view/view.queues.openchannel.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initOpenchannelQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-queues-openchannel">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/staff/agent/view/view.queues.sms.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initSmsQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-queues-sms">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/view/view.queues.voice.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initVoiceQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-queues-voice">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/agent/view/view.sms.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_SMS\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body">\n				<!-- START CHAT TAB -->\n				<form name="form" data-ng-submit="patchItem()" novalidate>\n					<!-- START CAPACITY -->\n					<div class="form-group" data-ng-class="{\'has-error\': (form.capacity.$touched || form.$submitted) && form.name.$invalid}">\n						<label class="control-label">{{\'APPLICATION_CAPACITY\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" name="smsCapacity" placeholder="{{\'APPLICATION_CAPACITY\' | translate}}" class="form-control" data-ng-model="agent.smsCapacity" min="0" required/>\n						<span class="help-block">\n							{{\'MESSAGE_ZERO_MEANS_UNLIMITED\' | translate}}\n						</span>\n						<span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END CAPACITY -->\n					<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n				<!-- END CHAT TAB -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/staff/agent/view/view.voice.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_VOICE\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.voice" data-ng-submit="updateItem()" novalidate>\n\n					<!-- START INTERNAL -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.voice.internal.$touched || forms.voice.$submitted) && forms.voice.internal.$invalid}">\n						<label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="text" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="agent.internal" required disabled/>\n						<span data-ng-show="(forms.voice.internal.$touched || forms.voice.$submitted) && forms.voice.internal.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END INTERNAL -->\n\n					<!-- START TRANSPORT -->\n					<div class="form-group">\n						<label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n						<ui-select multiple name="transport" ng-model="agent.transport" theme="bootstrap">\n							<ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n							<ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n								{{transport}}\n							</ui-select-choices>\n						</ui-select>\n						<span class="help-block">\n							{{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n						</span>\n					</div>\n					<!-- END TRANSPORT -->\n\n					<!-- START HOST -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.voice.host.$touched || forms.voice.$submitted) && forms.voice.host.$invalid}">\n						<label class="control-label">{{\'APPLICATION_HOST\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="agent.host" required/>\n						<span class="help-block">\n							{{ \'DESCRIPTION_VOICE_HOST\' | translate }}\n						</span>\n						<span data-ng-show="(forms.voice.host.$touched || forms.voice.$submitted) && forms.voice.host.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END HOST -->\n\n					<!-- START NAT -->\n					<div class="form-group">\n						<label class="control-label">{{ \'APPLICATION_NAT\' | translate}}</label>\n						<ui-select multiple data-ng-model="agent.nat" name="nat" theme="bootstrap">\n							<ui-select-match placeholder="{{ \'APPLICATION_SEARCH_FILTER\' | translate }}">{{$item}}</ui-select-match>\n							<ui-select-choices repeat="nat in [\'yes\', \'no\', \'never\', \'route\', \'force_rport\', \'comedia\'] | filter: $select.search">\n								{{nat}}\n							</ui-select-choices>\n						</ui-select>\n						<span class="help-block">\n							{{ \'DESCRIPTION_VOICE_NAT\' | translate }}\n						</span>\n					</div>\n					<!-- END NAT -->\n\n					<!-- START TYPE -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.voice.type.$touched || forms.voice.$submitted) && forms.voice.type.$invalid}">\n						<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<ui-select data-ng-model="agent.type" name="type" theme="bootstrap" required>\n							<ui-select-match placeholder="{{ \'APPLICATION_SEARCH_FILTER\' | translate }}">{{$select.selected}}</ui-select-match>\n							<ui-select-choices repeat="type in [\'friend\', \'user\', \'peer\'] | filter: $select.search">\n								<div ng-bind-html="type | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n						<span class="help-block">\n							{{ \'DESCRIPTION_VOICE_TYPE\' | translate }}\n						</span>\n						<span data-ng-show="(forms.voice.type.$touched || forms.voice.$submitted) && forms.voice.type.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END TYPE -->\n\n					<!-- START CODEC -->\n					<div class="form-group">\n						<label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n						<ui-select multiple ng-model="agent.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n							<ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n							<ui-select-choices repeat="allow in [\'g729\', \'ilbc\', \'gsm\', \'ulaw\', \'alaw\'] | filter: $select.search">\n								{{allow}}\n							</ui-select-choices>\n						</ui-select>\n						<span class="help-block">\n							{{ \'DESCRIPTION_VOICE_CODEC\' | translate }}\n						</span>\n					</div>\n					<!-- END CODEC -->\n\n					<!-- START STATUS -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_CHANSPY\' | translate}}</label></br>\n						<input\n						bs-switch\n						class="form-control"\n						ng-model="agent.chanspy"\n						type="checkbox"\n						name="auth"\n						switch-active="{{ recordSwitch.isActive }}"\n						switch-on-text="{{ recordSwitch.onText }}"\n						switch-off-text="{{ recordSwitch.offText }}"\n						switch-on-color="{{ recordSwitch.onColor }}"\n						switch-off-color="{{ recordSwitch.offColor }}"\n						switch-animate="{{ recordSwitch.animate }}"\n						switch-size="{{ recordSwitch.size }}"\n						switch-label="{{ recordSwitch.label }}"\n						switch-icon="{{ recordSwitch.icon }}"\n						switch-radio-off="{{ recordSwitch.radioOff }}"\n						switch-label-width="{{ recordSwitch.labelWidth }}"\n						switch-handle-width="{{ recordSwitch.handleWidth }}">\n					</div>\n					<!-- END STATUS -->\n\n					<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/staff/agent/wizard/wizard-bulk.html",'<div class="col-md-12">\n	<!-- BEGIN PAGE HEADER-->\n	<div class="page-bar">\n		<ul class="page-breadcrumb">\n			<li>\n				<i class="icon-rocket"></i>\n				<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-people"></i>\n				<a href="/agents/list">{{ \'APPLICATION_AGENTS\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-options"></i>\n				<a href="/agents/wizard">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n			</li>\n		</ul>\n	</div>\n	<!-- END PAGE HEADER-->\n\n	<!-- BEGIN PORTLET-->\n	<div class="portlet light bordered" data-ng-init="getFirstFreeInternal(); item.amount = 2; item.startIndex = 0;">\n		<div class="portlet-title">\n			<div class="caption font-green-sharp">\n				<i class="icon-user font-green-sharp"></i>\n				<span class="caption-subject">{{ \'APPLICATION_AGENT\' | translate }} WIZARD</a> </span>\n			</div>\n		</div>\n		<div class="portlet-body">\n			<wizard on-finish="createItems()">\n				<wz-step title="{{\'APPLICATION_ACCOUNT\' | translate}}" canexit="exitValidation(forms.info.$valid)">\n					<form name="forms.info" novalidate>\n\n						<!-- START AMOUNT -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.amount.$touched || forms.info.$submitted) && forms.info.amount.$invalid}">\n							<label class="control-label">{{\'APPLICATION_AMOUNT\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="number" name="amount" min="2" max="{{maxAmount}}" placeholder="{{\'APPLICATION_AMOUNT\' | translate}}" class="form-control" data-ng-model="item.amount" required>\n							<span data-ng-show="(forms.info.amount.$touched || forms.info.$submitted) && forms.info.amount.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span class="help-block help-block-info">\n							{{\'MESSAGE_STARTING_FROM_INTERNAL\' | translate}} <b>{{item.minInternal}}</b> {{\'MESSAGE_MAX_NUM_OF_BULK_AGENTS_IS\' | translate}} <b>{{maxAmount}}</b>\n						</span>\n						</div>\n						<!-- END AMOUNT -->\n\n						<!-- START START INDEX -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.startIndex.$touched || forms.info.$submitted) && forms.info.startIndex.$invalid}">\n							<label class="control-label">{{\'APPLICATION_START_INDEX\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="number" name="startIndex" min="0" placeholder="{{\'APPLICATION_START_INDEX\' | translate}}" class="form-control" data-ng-model="item.startIndex" required>\n							<span data-ng-show="(forms.info.startIndex.$touched || forms.info.$submitted) && forms.info.startIndex.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END START INDEX -->\n\n						<!-- START MIN INTERNAL-->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.minInternal.$invalid}">\n							<label class="control-label">{{\'APPLICATION_MIN_INTERNAL\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="number" name="minInternal" min="0" placeholder="{{\'APPLICATION_MIN_INTERNAL\' | translate}}" class="form-control" data-ng-change="getAmount()" data-ng-model="item.minInternal" required>\n							<span data-ng-show="(forms.info.minInternal.$touched || forms.info.$submitted) && forms.info.minInternal.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END MIN INTERNAL-->\n\n						<!-- START NAME -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n							<label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n							<span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END NAME -->\n\n						<!-- START USERNAME -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n							<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required>\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n							</span>\n						</div>\n						<!-- END USERNAME -->\n\n						<!-- START EMAIL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$invalid}">\n							<label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="item.email" required>\n							<span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.email" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n							</span>\n						</div>\n						<!-- END EMAIL -->\n\n						<!-- START PASSWORD -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n							<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" data-ng-pattern="setting.securePassword ? settings.patternPassword : settings.patternPasswordLight" required/>\n							<span class="help-block">\n								 {{setting.securePassword ? \'MESSAGE_PASSWORD_FORMAT\' : \'MESSAGE_PASSWORD_LIGTH_FORMAT\' | translate}}\n							</span>\n							<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n							</span>\n						</div>\n						<!-- END PASSWORD -->\n\n						<!-- START RE PASSWORD -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$invalid}">\n							<label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.rpassword" nx-equal="item.password" required/>\n							<span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.nxEqual" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n							</span>\n						</div>\n						<!-- END RE PASSWORD -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n							<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n						</div>\n						<!-- END DESCRIPTION -->\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n					</form>\n				</wz-step>\n\n				<wz-step title="{{\'APPLICATION_VOICE\' | translate}}" canexit="exitValidation(forms.voice.$valid)">\n					<form name="forms.voice" novalidate>\n\n						<!-- START TRANSPORT -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n							<ui-select multiple name="transport" ng-model="item.transport" theme="bootstrap" ng-disabled="disabled">\n								<ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n								<ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n									{{transport}}\n								</ui-select-choices>\n							</ui-select>\n							<span class="help-block">\n								{{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n							</span>\n						</div>\n						<!-- END TRANSPORT -->\n\n						<!-- START CODEC -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n							<ui-select multiple ng-model="item.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n								<ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n								<ui-select-choices repeat="allow in [\'g729\', \'ilbc\', \'gsm\', \'ulaw\', \'alaw\'] | filter: $select.search">\n									{{allow}}\n								</ui-select-choices>\n							</ui-select>\n							<span class="help-block">\n								{{ \'DESCRIPTION_VOICE_CODEC\' | translate }}\n							</span>\n						</div>\n						<!-- END CODEC -->\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					</form>\n				</wz-step>\n\n				<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n					<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n					<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n				</wz-step>\n			</wizard>\n		</div>\n	</div>\n	<!-- END PORTLET-->\n</div>\n'),a.put("app/staff/agent/wizard/wizard.html",'<div class="col-md-12">\n	<!-- BEGIN PAGE HEADER-->\n	<div class="page-bar">\n		<ul class="page-breadcrumb">\n			<li>\n				<i class="icon-rocket"></i>\n				<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-puzzle"></i>\n				<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-people"></i>\n				<a href="/staff/agents/list">{{ \'APPLICATION_AGENTS\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-options"></i>\n				<a href="/agents/wizard">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n			</li>\n		</ul>\n	</div>\n	<!-- END PAGE HEADER-->\n\n	<!-- BEGIN PORTLET-->\n	<div class="portlet light bordered" data-ng-init="getFirstFreeInternal();">\n		<div class="portlet-title">\n			<div class="caption font-green-sharp">\n				<i class="icon-user font-green-sharp"></i>\n				<span class="caption-subject">{{ \'APPLICATION_AGENT\' | translate }} WIZARD</a> </span>\n			</div>\n		</div>\n		<div class="portlet-body">\n			<wizard on-finish="createItem()">\n				<wz-step title="{{\'APPLICATION_ACCOUNT\' | translate}}" canexit="exitValidation(forms.info.$valid)">\n					<form name="forms.info" novalidate>\n\n						<!-- START NAME -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n							<label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n							<span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END NAME -->\n\n						<!-- START USERNAME -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n							<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required>\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n							</span>\n						</div>\n						<!-- END USERNAME -->\n\n						<!-- START EMAIL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$invalid}">\n							<label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="item.email" required>\n							<span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.email" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n							</span>\n						</div>\n						<!-- END EMAIL -->\n\n						<!-- START PASSWORD -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n							<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" data-ng-pattern="setting.securePassword ? settings.patternPassword : settings.patternPasswordLight" required/>\n							<span class="help-block">\n								 {{setting.securePassword ? \'MESSAGE_PASSWORD_FORMAT\' : \'MESSAGE_PASSWORD_LIGTH_FORMAT\' | translate}}\n							</span>\n							<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END PASSWORD -->\n\n						<!-- START RE PASSWORD -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$invalid}">\n							<label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.rpassword" nx-equal="item.password" required/>\n							<span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.nxEqual" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n							</span>\n						</div>\n						<!-- END RE PASSWORD -->\n\n						<!-- START INTERNAL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$invalid}">\n							<label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<div class="input-group">\n								<input type="number" min="1" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="item.internal" data-ng-disabled="!item.internalEnabled" data-ng-required="item.internalEnabled"/>\n								<span class="input-group-addon">\n									<input type="checkbox" data-ng-model="item.internalEnabled">\n								</span>\n							</div>\n							<span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END INTERNAL -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n							<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n						</div>\n						<!-- END DESCRIPTION -->\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n					</form>\n				</wz-step>\n\n				<wz-step title="{{\'APPLICATION_VOICE\' | translate}}" canexit="exitValidation(forms.voice.$valid)">\n					<form name="forms.voice" novalidate>\n\n						<!-- START TRANSPORT -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n							<ui-select multiple name="transport" ng-model="item.transport" theme="bootstrap" ng-disabled="disabled">\n								<ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n								<ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n									{{transport}}\n								</ui-select-choices>\n							</ui-select>\n							<span class="help-block">\n								{{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n							</span>\n						</div>\n						<!-- END TRANSPORT -->\n\n						<!-- START CODEC -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n							<ui-select multiple ng-model="item.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n								<ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n								<ui-select-choices repeat="allow in [\'g729\', \'ilbc\', \'gsm\', \'ulaw\', \'alaw\'] | filter: $select.search">\n									{{allow}}\n								</ui-select-choices>\n							</ui-select>\n							<span class="help-block">\n								{{ \'DESCRIPTION_VOICE_CODEC\' | translate }}\n							</span>\n						</div>\n						<!-- END CODEC -->\n\n						<!-- <div class="form-body" data-ng-init="initVoiceQueues()">\n							<label class="control-label">{{ \'APPLICATION_QUEUES\' | translate}}</label>\n							<div class="form-group last">\n								<div class="col-md-12" id="multi-select-queues-voice">\n								</div>\n							</div>\n						</div> -->\n\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n					</form>\n				</wz-step>\n\n				<!-- <wz-step title="{{\'APPLICATION_CHAT\' | translate}}">\n					<form name="forms.chat">\n						<div class="form-body" data-ng-init="initChatQueues()">\n							<label class="control-label">{{ \'APPLICATION_QUEUES\' | translate}}</label>\n							<div class="form-group last">\n								<div class="col-md-12" id="multi-select-queues-chat">\n								</div>\n							</div>\n						</div>\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					</form>\n				</wz-step> -->\n\n				<!-- <wz-step title="{{\'APPLICATION_MAIL\' | translate}}">\n					<form name="forms.mail">\n						<div class="form-body" data-ng-init="initMailQueues()">\n							<label class="control-label">{{ \'APPLICATION_QUEUES\' | translate}}</label>\n							<div class="form-group last">\n								<div class="col-md-12" id="multi-select-queues-mail">\n								</div>\n							</div>\n						</div>\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					</form>\n				</wz-step> -->\n\n\n				<!-- <wz-step title="{{\'APPLICATION_SMS\' | translate}}">\n					<form name="forms.sms">\n						<div class="form-body" data-ng-init="initSmsQueues()">\n							<label class="control-label">{{ \'APPLICATION_QUEUES\' | translate}}</label>\n							<div class="form-group last">\n								<div class="col-md-12" id="multi-select-queues-sms">\n								</div>\n							</div>\n						</div>\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					</form>\n				</wz-step> -->\n\n				<!-- <wz-step title="{{\'APPLICATION_FAX\' | translate}}">\n					<form name="forms.fax">\n						<div class="form-body" data-ng-init="initFaxQueues()">\n							<label class="control-label">{{ \'APPLICATION_QUEUES\' | translate}}</label>\n							<div class="form-group last">\n								<div class="col-md-12" id="multi-select-queues-fax">\n								</div>\n							</div>\n						</div>\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					</form>\n				</wz-step> -->\n\n				<!-- <wz-step title="{{\'APPLICATION_OPEN_CHANNEL\' | translate}}">\n					<form name="forms.openchannel">\n						<div class="form-body" data-ng-init="initOpenchannelQueues()">\n							<label class="control-label">{{ \'APPLICATION_QUEUES\' | translate}}</label>\n							<div class="form-group last">\n								<div class="col-md-12" id="multi-select-queues-openchannel">\n								</div>\n							</div>\n						</div>\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					</form>\n				</wz-step> -->\n\n				<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n					<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n					<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n				</wz-step>\n			</wizard>\n		</div>\n	</div>\n	<!-- END PORTLET-->\n</div>\n'),
+a.put("app/staff/team/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_TEAM\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/staff/team/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-puzzle"></i>\n					<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-shield"></i>\n					<a href="/staff/teams/list">{{ \'APPLICATION_TEAMS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-shield font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_TEAMS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="#" data-ng-click="createItem()">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_TEAM\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/team/view/view.agents.html",'<div class="row" data-ng-init="initAgents()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_AGENTS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n			<!-- GENERAL TAB -->\n				<!-- BEGIN PORTLET-->\n					<!-- BEGIN FORM-->\n					<form action="index.html" class="form-horizontal form-row-seperated">\n						<div class="form-body">\n							<div class="form-group last">\n								<div class="col-md-12" id="multi-select-team">\n								</div>\n							</div>\n						</div>\n					</form>\n					<!-- END FORM-->\n				<!-- END PORTLET-->\n			<!-- END GENERAL TAB -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/staff/team/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-puzzle"></i>\n					<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-shield"></i>\n					<a href="/staff/teams/list">{{ \'APPLICATION_TEAMS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{team.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img ng-src="assets/images/media/team.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{team.name}}\n					</div>\n\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.staff.teams.view.settings\')}">\n							<a data-ng-href="/staff/teams/view/{{team.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.staff.teams.view.agents\')}">\n							<a data-ng-href="/staff/teams/view/{{team.id}}/agents">\n							<i class="icon-people"></i>\n							{{ \'APPLICATION_AGENTS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content"></div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/team/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_ACCOUNT\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body">\n				<!-- PERSONAL INFO TAB -->\n				<div>\n\n					<form name="forms.info" data-ng-submit="updateItem()" novalidate>\n						<!-- START NAME -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n							<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="team.name" required/>\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END NAME -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n							<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="team.description"/>\n						</div>\n						<!-- END DESCRIPTION -->\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n					</form>\n				</div>\n				<!-- END PERSONAL INFO TAB -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/staff/telephone/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-puzzle"></i>\n					<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-phone"></i>\n					<a href="/staff/telephones/list">{{ \'APPLICATION_TELEPHONES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-phone font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_TELEPHONES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="/staff/telephones/wizard" data-toggle="dropdown">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_TELEPHONE\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/telephone/view/view.account.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_ACCOUNT\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_ACCOUNT\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-ng-show="Auth.isAdmin() || item.id === getCurrentTelephone().id" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_CHANGE_PASSWORD\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- PERSONAL INFO TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="forms.info.$valid && updateItem()" novalidate>\n\n				      <!-- START NAME -->\n				      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n				        <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n				        <input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n								<span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n				        </span>\n				      </div>\n				      <!-- END NAME -->\n\n				      <!-- START USERNAME -->\n				      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n				        <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}</label>\n				        <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.name" disabled/>\n				      </div>\n				      <!-- END USERNAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n				      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				    </form>\n					</div>\n					<!-- END PERSONAL INFO TAB -->\n\n					<!-- CHANGE PASSWORD TAB -->\n					<div class="tab-pane" id="tab_1_2" data-ng-show="Auth.isAdmin() || item.id === getCurrentTelephone().id">\n						<form name="forms.changePwd" data-ng-submit="forms.changePwd.$valid && updatePassword()" novalidate>\n							<!-- START CURRENT PWD -->\n							<!-- <div class="form-group" data-ng-if="!Auth.isAdmin()" data-ng-class="{\'has-error\': (forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="current_pwd" placeholder="{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.currentPwd" required/>\n								<span data-ng-show="(forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div> -->\n							<!-- END CURRENT PWD -->\n							<!-- START NEW PWD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="new_pwd" placeholder="{{\'APPLICATION_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" data-ng-pattern="settings.patternPassword" required/>\n								<span class="help-block">\n									{{setting.securePassword ? \'MESSAGE_PASSWORD_FORMAT\' : \'MESSAGE_PASSWORD_LIGTH_FORMAT\' | translate}}\n								</span>\n								<span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NEW PWD -->\n							<!-- START RE-NEW PWD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.re_new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.re_new_pwd.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="re_new_pwd" placeholder="{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.reNewPwd" nx-equal="item.password" required/>\n								<span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END RE-NEW PWD -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CHANGE PASSWORD TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/staff/telephone/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-puzzle"></i>\n					<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-phone"></i>\n					<a href="/staff/telephones/list">{{ \'APPLICATION_TELEPHONES\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{item.fullname}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR TELEPHONEPIC -->\n				<div class="profile-userpic">\n					<img data-ng-src="assets/images/media/telephone.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR TELEPHONEPIC -->\n				<!-- SIDEBAR TELEPHONE TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{item.fullname}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{item.role}}\n					</div>\n				</div>\n				<!-- END SIDEBAR TELEPHONE TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.staff.telephones.view.account\')}">\n							<a data-ng-href="/staff/telephones/view/{{item.id}}/account">\n							<i class="icon-phone"></i>\n							{{ \'APPLICATION_ACCOUNT\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.staff.telephones.view.voice\')}" data-ng-show="Auth.isAdmin()">\n							<a data-ng-href="/staff/telephones/view/{{item.id}}/voice">\n								<i class="icon-earphones-alt"></i>\n								{{ \'APPLICATION_VOICE\' | translate}} </a>\n							</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/telephone/view/view.voice.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_ACCOUNT\' | translate}} {{ \'APPLICATION_VOICE\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.info" data-ng-submit="updateItem()" novalidate>\n\n					<!-- START INTERNAL -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$invalid}">\n						<label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" min="1" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="item.internal" required readonly/>\n						<span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n						<span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.ngRemoteValidate" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_INTERNAL\' | translate}}.\n						</span>\n					</div>\n					<!-- END INTERNAL -->\n\n					<!-- START TRANSPORT -->\n					<div class="form-group">\n						<label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n						<ui-select multiple name="transport" ng-model="item.transport" theme="bootstrap" ng-disabled="disabled">\n							<ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n							<ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n								{{transport}}\n							</ui-select-choices>\n						</ui-select>\n						<span class="help-block">\n							{{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n						</span>\n					</div>\n					<!-- END TRANSPORT -->\n\n					<!-- START CODEC -->\n					<div class="form-group">\n						<label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n						<ui-select multiple ng-model="item.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n							<ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n'+"							<ui-select-choices repeat=\"allow in ['g729', 'ilbc', 'gsm', 'ulaw', 'alaw'] | filter: $select.search\">\n								{{allow}}\n							</ui-select-choices>\n						</ui-select>\n						<span class=\"help-block\">\n							{{ 'DESCRIPTION_VOICE_CODEC' | translate }}\n						</span>\n					</div>\n					<!-- END CODEC -->\n\n					<input class=\"btn green-haze\" type=\"submit\" value=\"{{'APPLICATION_UPDATE' | translate}}\"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n"),a.put("app/staff/telephone/wizard/wizard.html",'<div class="col-md-12">\n  <!-- BEGIN PAGE HEADER-->\n	<div class="page-bar">\n		<ul class="page-breadcrumb">\n			<li>\n				<i class="icon-rocket"></i>\n				<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-puzzle"></i>\n				<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-phone"></i>\n				<a href="/staff/telephones/list">{{ \'APPLICATION_TELEPHONES\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-options"></i>\n				<a href="/staff/telephones/wizard">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n			</li>\n		</ul>\n	</div>\n  <!-- END PAGE HEADER-->\n\n  <!-- BEGIN PORTLET-->\n  <div class="portlet light bordered" data-ng-init="getFirstFreeInternal();">\n  	<div class="portlet-title">\n  		<div class="caption font-green-sharp">\n  			<i class="icon-phone font-green-sharp"></i>\n  			<span class="caption-subject">{{ \'APPLICATION_TELEPHONE\' | translate }} WIZARD</a> </span>\n  		</div>\n  	</div>\n  	<div class="portlet-body">\n  		<wizard on-finish="createItem()">\n				<wz-step title="{{\'APPLICATION_ACCOUNT\' | translate}}" canexit="exitValidation(forms.info.$valid)">\n			    <form name="forms.info" novalidate>\n\n			      <!-- START NAME -->\n			      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n			        <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n			        <input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n							<span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n			        </span>\n			      </div>\n			      <!-- END NAME -->\n\n			      <!-- START USERNAME -->\n			      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n			        <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n			        <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.name" ata-ng-pattern="settings.patternName"  required />\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n			        </span>\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.ngRemoteValidate" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n			        </span>\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n							</span>\n			      </div>\n			      <!-- END USERNAME -->\n\n			      <!-- START PASSWORD -->\n			      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n			        <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" data-ng-pattern="setting.securePassword ? settings.patternPassword : settings.patternPasswordLight" required/>\n							<span class="help-block">\n								{{setting.securePassword ? \'MESSAGE_PASSWORD_FORMAT\' : \'MESSAGE_PASSWORD_LIGTH_FORMAT\' | translate}}\n							</span>\n							<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n			      </div>\n			      <!-- END PASSWORD -->\n\n			      <!-- START RE PASSWORD -->\n			      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$invalid}">\n			        <label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n			        <input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.rpassword" nx-equal="item.password" required/>\n			        <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.required" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n			        </span>\n			        <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.nxEqual" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n			        </span>\n			      </div>\n			      <!-- END RE PASSWORD -->\n\n						<!-- START INTERNAL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$invalid}">\n							<label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<div class="input-group">\n							<input type="number" min="1" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="item.internal" data-ng-disabled="!item.internalEnabled" data-ng-required="item.internalEnabled"/>\n							<span class="input-group-addon">\n								<input type="checkbox" data-ng-model="item.internalEnabled">\n							</span>\n							</div>\n							<span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END INTERNAL -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n							<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n						</div>\n						<!-- END DESCRIPTION -->\n\n			      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n			    </form>\n			  </wz-step>\n\n				<wz-step title="{{\'APPLICATION_VOICE\' | translate}}" canexit="exitValidation(forms.voice.$valid)">\n					<form name="forms.voice" novalidate>\n\n						<!-- START TRANSPORT -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n							<ui-select multiple name="transport" ng-model="item.transport" theme="bootstrap" ng-disabled="disabled">\n						    <ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n						    <ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n						    	{{transport}}\n						    </ui-select-choices>\n						  </ui-select>\n							<span class="help-block">\n								{{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n							</span>\n						</div>\n						<!-- END TRANSPORT -->\n\n						<!-- START CODEC -->\n						<div class="form-group">\n							<label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n							<ui-select multiple ng-model="item.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n						    <ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n						    <ui-select-choices repeat="allow in [\'g729\', \'ilbc\', \'gsm\', \'ulaw\', \'alaw\'] | filter: $select.search">\n						    	{{allow}}\n						    </ui-select-choices>\n						  </ui-select>\n							<span class="help-block">\n								{{ \'DESCRIPTION_VOICE_CODEC\' | translate }}\n							</span>\n						</div>\n						<!-- END CODEC -->\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					</form>\n				</wz-step>\n\n				<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n					<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n					<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n				</wz-step>\n  		</wizard>\n  	</div>\n  </div>\n  <!-- END PORTLET-->\n</div>\n'),
+a.put("app/staff/user/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-puzzle"></i>\n					<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-eye"></i>\n					<a href="#">{{ \'APPLICATION_USERS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-eye font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_USERS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="/staff/users/wizard" data-toggle="dropdown">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_USER\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.account.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PROFILE\' | translate}} {{ \'APPLICATION_ACCOUNT\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_PERSONAL_INFO\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_CHANGE_AVATAR\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-ng-show="Auth.isAdmin() || user.id === getCurrentUser().id" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_CHANGE_PASSWORD\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- PERSONAL INFO TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.info" data-ng-submit="updateItem()" novalidate>\n\n							<!-- START ROLE -->\n							<div class="form-group" data-ng-if="Auth.getCurrentUser().role === \'admin\' && Auth.getCurrentUser().id !== user.id">\n								<label class="control-label">{{ \'APPLICATION_ROLE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<ui-select name="role" data-ng-model="user.role" theme="bootstrap" required>\n									<ui-select-match placeholder="Select role...">{{$select.selected | uppercase}}</ui-select-match>\n									<ui-select-choices repeat="role in [\'user\', \'admin\'] | filter: $select.search">\n										{{role | uppercase}}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n							<!-- END ROLE -->\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n								<label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="user.fullname" required/>\n								<span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}</label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="user.name" disabled/>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START EMAIL -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$invalid}">\n								<label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="user.email" required/>\n								<span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.email" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n								</span>\n							</div>\n							<!-- END EMAIL -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="user.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END PERSONAL INFO TAB -->\n\n					<!-- CHANGE AVATAR TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form action="#" role="form">\n							<div class="form-group">\n								<div class="fileinput fileinput-new" data-provides="fileinput">\n									<div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">\n										<img ng-src="assets/images/media/noProfileImage.png" alt=""/>\n									</div>\n									<div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;">\n									</div>\n									<div>\n										<span class="btn default btn-file" data-ng-show="!uploader.queue[0]">\n											<span> {{ \'APPLICATION_SELECT_IMAGE\' | translate }} </span>\n											<input type="file" nv-file-select="" uploader="uploader" /><br/>\n										</span>\n										<button type="button" class="btn default" data-ng-show="uploader.queue[0]" data-dismiss="fileinput" ng-click="uploader.queue[0].remove()">\n											<span> {{ \'APPLICATION_REMOVE\' | translate }} </span>\n										</button>\n										<button type="button" class="btn green-haze" data-ng-show="uploader.queue[0]" data-ng-click="uploader.queue[0].upload()" ng-disabled="uploader.queue[0].isReady || uploader.queue[0].isUploading || uploader.queue[0].isSuccess">\n											<span> {{ \'APPLICATION_CONFIRM\' | translate }} </span>\n										</button>\n									</div>\n									<p>\n										</br> {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} <b>jpg, png, jpeg</b>.\n									</p>\n								</div>\n							</div>\n						</form>\n						<div class="row">\n							<div class="col-md-2">\n								<table class="table" border="0">\n									<tbody>\n									<tr data-ng-repeat="item in uploader.queue">\n											<td style="border-top-style:none">\n												<strong>\n													{{ item.file.name }}\n												</strong>\n											</td>\n											<td data-ng-show="uploader.isHTML5" nowrap style="border-top-style:none">\n												{{ item.file.size/1024/1024|number:2 }} MB\n											</td>\n											<td nowrap style="border-top-style:none">\n												<button type="button" class="btn btn-danger btn-xs" data-ng-click="item.remove()">\n														<span class="glyphicon glyphicon-trash"></span> Remove\n												</button>\n											</td>\n										</tr>\n									</tbody>\n								</table>\n							</div>\n						</div>\n					</div>\n					<!-- END CHANGE AVATAR TAB -->\n					<!-- CHANGE PASSWORD TAB -->\n					<div class="tab-pane" id="tab_1_3" data-ng-show="Auth.isAdmin() || user.id === getCurrentUser().id">\n						<form name="forms.changePwd" data-ng-submit="forms.changePwd.$valid && updatePassword()" novalidate>\n							<!-- START CURRENT PWD -->\n							<div class="form-group" data-ng-if="!Auth.isAdmin()" data-ng-class="{\'has-error\': (forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="current_pwd" placeholder="{{\'APPLICATION_CURRENT_PASSWORD\' | translate}}" class="form-control" data-ng-model="user.currentPwd" required/>\n								<span data-ng-show="(forms.changePwd.current_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.current_pwd.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CURRENT PWD -->\n							<!-- START NEW PWD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="new_pwd" placeholder="{{\'APPLICATION_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="user.newPwd" data-ng-pattern="setting.securePassword ? settings.patternPassword : settings.patternPasswordLight" required/>\n								<span class="help-block">\n									{{setting.securePassword ? \'MESSAGE_PASSWORD_FORMAT\' : \'MESSAGE_PASSWORD_LIGTH_FORMAT\' | translate}}\n								</span>\n								<span data-ng-show="(forms.changePwd.current_pwd.$touched || forms.info.$submitted) && forms.changePwd.current_pwd.$error.pattern" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NEW PWD -->\n							<!-- START RE-NEW PWD -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.changePwd.re_new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.re_new_pwd.$invalid}">\n								<label class="control-label">{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="password" name="re_new_pwd" placeholder="{{\'APPLICATION_RE_TYPE_NEW_PASSWORD\' | translate}}" class="form-control" data-ng-model="user.reNewPwd" nx-equal="user.newPwd" required/>\n								<span data-ng-show="(forms.changePwd.new_pwd.$touched || forms.changePwd.$submitted) && forms.changePwd.new_pwd.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END RE-NEW PWD -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CHANGE PASSWORD TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/staff/user/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-puzzle"></i>\n					<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-eye"></i>\n					<a href="/staff/users/list">{{ \'APPLICATION_USERS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{user.fullname}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-userpic">\n					<img ng-src="api/users/avatar/{{user.userpic ? user.userpic : \'unknown_avatar\'}}" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{user.fullname}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{user.role}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.staff.users.view.account\')}">\n							<a data-ng-href="/staff/users/view/{{user.id}}/account">\n								<i class="icon-user"></i>\n								{{ \'APPLICATION_ACCOUNT\' | translate}}\n							</a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.staff.users.view.voice\')}" data-ng-show="Auth.isAdmin()">\n							<a data-ng-href="/staff/users/view/{{user.id}}/voice">\n								<i class="icon-earphones-alt"></i>\n								{{ \'APPLICATION_VOICE\' | translate}}\n							</a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.staff.users.view.permit\')}" data-ng-show="Auth.isAdmin() && user.role === \'user\'">\n							<a data-ng-href="/staff/users/view/{{user.id}}/permit/voice">\n								<i class="icon-key"></i>\n								{{ \'APPLICATION_PERMITS\' | translate}}\n							</a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.permit.chat.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initChatQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-permit">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.permit.fax.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initFaxQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-permit">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.permit.html","<!-- BEGIN PAGE CONTENT-->\n<div class=\"row\">\n	<div class=\"col-md-12\">\n		<div>\n		    <nav class=\"navbar navbar-default\" role=\"navigation\">\n					<div class=\"collapse navbar-collapse\">\n						<ul class=\"nav navbar-nav\">\n							<li data-ng-class=\"{'active': $state.is('main.staff.users.view.permit.voice')}\">\n								<a href=\"/staff/users/view/{{user.id}}/permit/voice\">\n									<i class=\"icon-earphones-alt\"></i> {{'APPLICATION_VOICE' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.users.view.permit.chat'),'disabled-link':!license.chat}\" data-ng-show=\"Auth.isAdmin() || userModules[8]\">\n								<a href=\"{{license.chat ? '/staff/users/view/'+user.id+'/permit/chat' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"icon-bubble\"></i> {{'APPLICATION_CHAT' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.users.view.permit.mail'),'disabled-link':!license.mail}\" data-ng-show=\"Auth.isAdmin() || userModules[9]\">\n								<a href=\"{{license.mail ? '/staff/users/view/'+user.id+'/permit/mail' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"icon-envelope\"></i>{{'APPLICATION_MAIL' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.users.view.permit.fax'),'disabled-link':!license.fax}\" data-ng-show=\"Auth.isAdmin() || userModules[10]\">\n								<a href=\"{{license.fax ? '/staff/users/view/'+user.id+'/permit/fax' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"fa fa-fax\"></i> {{'APPLICATION_FAX' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.users.view.permit.sms'),'disabled-link':!license.messaging}\" data-ng-show=\"Auth.isAdmin() || userModules[11]\">\n								<a href=\"{{license.messaging ? '/staff/users/view/'+user.id+'/permit/sms' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"glyphicon glyphicon-comment\"></i> {{'APPLICATION_SMS' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.users.view.permit.openchannel'),'disabled-link':!license.openchannel}\" data-ng-show=\"Auth.isAdmin() || userModules[20]\">\n								<a href=\"{{license.openchannel ? '/staff/users/view/'+user.id+'/permit/openchannel' : 'javascript:;'}}\" class=\"disable-target\">\n									<i class=\"icon-globe\"></i> {{'APPLICATION_OPEN_CHANNEL' | translate}}\n								</a>\n							</li>\n							<li data-ng-class=\"{'active': $state.is('main.staff.users.view.permit.modules')}\" data-ng-if=\"user.role !== 'admin'\">\n								<a href=\"/staff/users/view/{{user.id}}/permit/modules\">\n									<i class=\"icon-menu\"></i> {{'APPLICATION_MODULES' | translate}}\n								</a>\n							</li>\n						</ul>\n					</div>\n		    </nav>\n		</div>\n		<div ui-view></div>\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n"),a.put("app/staff/user/view/view.permit.mail.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initMailQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-permit">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.permit.modules.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row left-margin" data-ng-init="getModules()">\n	<div data-ng-repeat="module in modules" data-ng-if="!module.ModuleId && ((module.id === 8 && license.chat) || (module.id === 9 && license.mail) || (module.id === 10 && license.fax) || (module.id === 11 && license.messaging) || (module.id === 20 && license.openchannel)  || !_.includes([8,9,10,11,20],module.id))">\n		<div class="form-group" data-ng-class="{\'left-margin-40\':module.ModuleId}">\n			<span data-ng-if="module.ModuleId">âââ</span> <input\n			bs-switch\n			class="form-control"\n			ng-model="module.status"\n			type="checkbox"\n			data-ng-change="updatePermissions(module)"\n			switch-active="{{ moduleSwitch.isActive }}"\n			switch-on-text="{{ moduleSwitch.onText }}"\n			switch-off-text="{{ moduleSwitch.offText }}"\n			switch-on-color="{{ moduleSwitch.onColor }}"\n			switch-off-color="{{ moduleSwitch.offColor }}"\n			switch-animate="{{ moduleSwitch.animate }}"\n			switch-size="{{ moduleSwitch.size }}"\n			switch-label="{{ moduleSwitch.label }}"\n			switch-icon="{{ moduleSwitch.icon }}"\n			switch-radio-off="{{ moduleSwitch.radioOff }}"\n			switch-label-width="{{ moduleSwitch.labelWidth }}"\n			switch-handle-width="{{ moduleSwitch.handleWidth }}">\n			<label class="control-label">{{module.title | translate | trusted}}</label>\n		</div>\n		<div ng-slide-down="module.status" lazy-render duration="0.5">\n			<div data-ng-repeat="subModule in module.SubModules" data-ng-if="(subModule.id === 8 && license.chat) || (subModule.id === 9 && license.mail) || (subModule.id === 10 && license.fax) || (subModule.id === 11 && license.messaging) || (subModule.id === 20 && license.openchannel)  || !_.includes([8,9,10,11,20],subModule.id)">\n				<div class="form-group" data-ng-class="{\'left-margin-40\':module.ModuleId}">\n					<span>âââ</span> <input\n					bs-switch\n					class="form-control"\n					ng-model="subModule.status"\n					type="checkbox"\n					data-ng-change="updatePermissions(subModule)"\n					switch-active="{{ moduleSwitch.isActive }}"\n					switch-on-text="{{ moduleSwitch.onText }}"\n					switch-off-text="{{ moduleSwitch.offText }}"\n					switch-on-color="{{ moduleSwitch.onColor }}"\n					switch-off-color="{{ moduleSwitch.offColor }}"\n					switch-animate="{{ moduleSwitch.animate }}"\n					switch-size="{{ moduleSwitch.size }}"\n					switch-label="{{ moduleSwitch.label }}"\n					switch-icon="{{ moduleSwitch.icon }}"\n					switch-radio-off="{{ moduleSwitch.radioOff }}"\n					switch-label-width="{{ moduleSwitch.labelWidth }}"\n					switch-handle-width="{{ moduleSwitch.handleWidth }}">\n					<label class="control-label">{{subModule.title | translate}}</label>\n				</div>\n				<div ng-slide-down="subModule.status" lazy-render duration="0.5">\n					<div data-ng-repeat="subModule2 in subModule.SubModules" class="form-group" data-ng-class="{\'left-margin-40\':module.ModuleId}">\n						<span style="margin-left:40px">âââ</span> <input\n						bs-switch\n						class="form-control"\n						ng-model="subModule2.status"\n						type="checkbox"\n						data-ng-change="updatePermissions(subModule2)"\n						switch-active="{{ moduleSwitch.isActive }}"\n						switch-on-text="{{ moduleSwitch.onText }}"\n						switch-off-text="{{ moduleSwitch.offText }}"\n						switch-on-color="{{ moduleSwitch.onColor }}"\n						switch-off-color="{{ moduleSwitch.offColor }}"\n						switch-animate="{{ moduleSwitch.animate }}"\n						switch-size="{{ moduleSwitch.size }}"\n						switch-label="{{ moduleSwitch.label }}"\n						switch-icon="{{ moduleSwitch.icon }}"\n						switch-radio-off="{{ moduleSwitch.radioOff }}"\n						switch-label-width="{{ moduleSwitch.labelWidth }}"\n						switch-handle-width="{{ moduleSwitch.handleWidth }}">\n						<label class="control-label">{{subModule2.title | translate}}</label>\n					</div>\n				</div>\n			</div>\n		</div>\n	</div>\n	<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.permit.openchannel.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initOpenchannelQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-permit">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.permit.sms.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initSmsQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-permit">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.permit.voice.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12" data-ng-init="initVoiceQueues()">\n		<!-- BEGIN FORM-->\n		<form action="#" class="form-horizontal form-row-seperated">\n			<div class="form-body">\n				<div class="form-group last">\n					<div class="col-md-12" id="multi-select-permit">\n					</div>\n				</div>\n			</div>\n		</form>\n		<!-- END FORM-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/staff/user/view/view.voice.html",'<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_ACCOUNT\' | translate}} {{ \'APPLICATION_VOICE\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.info" data-ng-submit="updateItem()" novalidate>\n\n					<!-- START INTERNAL -->\n					<div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$invalid}">\n						<label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n						<input type="number" min="1" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="user.internal" required readonly/>\n						<span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n						<span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.ngRemoteValidate" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_INTERNAL\' | translate}}.\n						</span>\n					</div>\n					<!-- END INTERNAL -->\n\n					<!-- START TRANSPORT -->\n					<div class="form-group">\n						<label class="control-label">{{ \'APPLICATION_TRANSPORT\' | translate}}</label>\n						<ui-select multiple name="transport" ng-model="user.transport" theme="bootstrap" ng-disabled="disabled">\n							<ui-select-match placeholder="Select transport...">{{$item}}</ui-select-match>\n							<ui-select-choices repeat="transport in [\'udp\', \'tcp\', \'ws\', \'wss\'] | filter: $select.search">\n								{{transport}}\n							</ui-select-choices>\n						</ui-select>\n						<span class="help-block">\n							{{ \'DESCRIPTION_VOICE_TRANSPORT\' | translate }}\n						</span>\n					</div>\n					<!-- END TRANSPORT -->\n\n					<!-- START CODEC -->\n					<div class="form-group">\n						<label class="control-label">{{ \'APPLICATION_ALLOWED_CODECS\' | translate}}</label>\n						<ui-select multiple ng-model="user.allow" name="allow" theme="bootstrap" ng-disabled="disabled">\n							<ui-select-match placeholder="Select codec...">{{$item}}</ui-select-match>\n'+"							<ui-select-choices repeat=\"allow in ['g729', 'ilbc', 'gsm', 'ulaw', 'alaw'] | filter: $select.search\">\n								{{allow}}\n							</ui-select-choices>\n						</ui-select>\n						<span class=\"help-block\">\n							{{ 'DESCRIPTION_VOICE_CODEC' | translate }}\n						</span>\n					</div>\n					<!-- END CODEC -->\n\n					<input class=\"btn green-haze\" type=\"submit\" value=\"{{'APPLICATION_UPDATE' | translate}}\"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n"),a.put("app/staff/user/wizard/wizard.html",'<div class="col-md-12">\n  <!-- BEGIN PAGE HEADER-->\n	<div class="page-bar">\n		<ul class="page-breadcrumb">\n			<li>\n				<i class="icon-rocket"></i>\n				<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-puzzle"></i>\n				<a href="#">{{ \'APPLICATION_STAFF\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-eye"></i>\n				<a href="/staff/users/list">{{ \'APPLICATION_USERS\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-options"></i>\n				<a href="/staff/users/wizard">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n			</li>\n		</ul>\n	</div>\n  <!-- END PAGE HEADER-->\n\n  <!-- BEGIN PORTLET-->\n  <div class="portlet light bordered" data-ng-init="initWizard();">\n  	<div class="portlet-title">\n  		<div class="caption font-green-sharp">\n  			<i class="icon-user font-green-sharp"></i>\n  			<span class="caption-subject">{{ \'APPLICATION_USER\' | translate }} WIZARD</a> </span>\n  		</div>\n  	</div>\n  	<div class="portlet-body">\n  		<wizard on-finish="createItem()">\n				<wz-step title="{{\'APPLICATION_ACCOUNT\' | translate}}" canexit="exitValidation(forms.info.$valid)">\n			    <form name="forms.info" novalidate>\n\n						<!-- START ROLE -->\n						<div class="form-group" data-ng-if="Auth.getCurrentUser().role === \'admin\'">\n							<label class="control-label">{{ \'APPLICATION_ROLE\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<ui-select name="role" data-ng-model="item.role" theme="bootstrap" required>\n								<ui-select-match placeholder="Select role...">{{$select.selected | uppercase}}</ui-select-match>\n								<ui-select-choices repeat="role in [\'user\', \'admin\'] | filter: $select.search">\n									{{role | uppercase}}\n								</ui-select-choices>\n							</ui-select>\n						</div>\n						<!-- END ROLE -->\n\n			      <!-- START NAME -->\n			      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$invalid}">\n			        <label class="control-label">{{\'APPLICATION_FULLNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n			        <input type="text" name="fullname" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.fullname" required/>\n							<span data-ng-show="(forms.info.fullname.$touched || forms.info.$submitted) && forms.info.fullname.$error.required" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n			        </span>\n			      </div>\n			      <!-- END NAME -->\n\n			      <!-- START USERNAME -->\n			      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$invalid}">\n			        <label class="control-label">{{\'APPLICATION_USERNAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n			        <input type="text" name="name" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required />\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.required" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n			        </span>\n							<span data-ng-show="(forms.info.name.$touched || forms.info.$submitted) && forms.info.name.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n							</span>\n			      </div>\n			      <!-- END USERNAME -->\n\n			      <!-- START EMAIL -->\n			      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$invalid}">\n			        <label class="control-label">{{\'APPLICATION_EMAIL\' | translate}}<span class="required" aria-required="true">*</span></label>\n			        <input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL\' | translate}}" class="form-control" data-ng-model="item.email" required />\n			        <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.required" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n			        </span>\n			        <span data-ng-show="(forms.info.email.$touched || forms.info.$submitted) && forms.info.email.$error.email" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n			        </span>\n			      </div>\n			      <!-- END EMAIL -->\n\n			      <!-- START PASSWORD -->\n			      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$invalid}">\n			        <label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" data-ng-pattern="setting.securePassword ? settings.patternPassword : settings.patternPasswordLight" required/>\n							<span class="help-block">\n								{{setting.securePassword ? \'MESSAGE_PASSWORD_FORMAT\' : \'MESSAGE_PASSWORD_LIGTH_FORMAT\' | translate}}\n							</span>\n							<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.info.password.$touched || forms.info.$submitted) && forms.info.password.$error.required" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n			        </span>\n			      </div>\n			      <!-- END PASSWORD -->\n\n			      <!-- START RE PASSWORD -->\n			      <div class="form-group" data-ng-class="{\'has-error\': (forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$invalid}">\n			        <label class="control-label">{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}<span class="required" aria-required="true">*</span></label>\n			        <input type="password" name="rpassword" placeholder="{{\'APPLICATION_CONFIRM_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.rpassword" nx-equal="item.password" required/>\n			        <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.required" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n			        </span>\n			        <span data-ng-show="(forms.info.rpassword.$touched || forms.info.$submitted) && forms.info.rpassword.$error.nxEqual" class="help-block help-block-error">\n			          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n			        </span>\n			      </div>\n			      <!-- END RE PASSWORD -->\n\n						<!-- START INTERNAL -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$invalid}">\n							<label class="control-label">{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<div class="input-group">\n								<input type="number" min="1" name="internal" placeholder="{{\'APPLICATION_INTERNAL_NUMBER\' | translate}}" class="form-control" data-ng-model="item.internal" data-ng-disabled="!item.internalEnabled" data-ng-required="item.internalEnabled"/>\n								<span class="input-group-addon">\n									<input type="checkbox" data-ng-model="item.internalEnabled">\n								</span>\n							</div>\n							<span data-ng-show="(forms.info.internal.$touched || forms.info.$submitted) && forms.info.internal.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END INTERNAL -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n							<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n						</div>\n						<!-- END DESCRIPTION -->\n\n			      <input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n			    </form>\n			  </wz-step>\n\n				<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n					<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n					<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n					<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n				</wz-step>\n  		</wizard>\n  	</div>\n  </div>\n  <!-- END PORTLET-->\n</div>\n'),
+a.put("app/sugarcrm/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-handbag"></i>\n					<a href="/sugarcrm/list">{{ \'APPLICATION_SUGARCRM\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-handbag font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_SUGARCRM\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/sugarcrm/wizard" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/sugarcrm/view/view.account.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n								<span data-ng-show="forms.formSetting.apiKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END API KEY -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/sugarcrm/view/view.configuration.html",'<div class="row" data-ng-init="initConfiguration()">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_CONFIGURATION\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createConfiguration()">\n	        <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="formValidation(formsConfiguration.info.$valid)">\n							<form name="formsConfiguration.info" novalidate>\n								<!-- START NAME -->\n								<div class="form-group" data-ng-class="{\'has-error\': formsConfiguration.info.$submitted && formsConfiguration.info.name.$invalid}">\n									<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n									<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="configuration.name" required/>\n									<span data-ng-show="formsConfiguration.info.name.$invalid && formsConfiguration.info.$submitted" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END NAME -->\n								<!-- START DESCRIPTION -->\n								<div class="form-group">\n									<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n									<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="configuration.description"/>\n								</div>\n								<!-- END DESCRIPTION -->\n\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n							</form>\n						</wz-step>\n\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/sugarcrm/view/view.configurationSettings.html",'<div class="row" data-ng-init="getConfiguration();getVariables();getFields();">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\n					</li>\n          <li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\n					</li>\n          <li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- SUBJECT TAB -->\n					<div class="tab-pane ui-padding active" id="tab_1_1">\n            <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by blank space:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemSubject()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n	            <div class="row" data-ng-repeat="subjectItem in subjectConfig">\n	              <div class="col-md-3">\n	                <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n	                  <ui-select-choices repeat="item in fieldType | filter: $select.search">\n	                    <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\n	                <div class="form-group">\n	                  <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\n	                </div>\n	              </div>\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END SUBJECT TAB -->\n          <!-- DESCRIPTION TAB -->\n					<div class="tab-pane ui-padding" id="tab_1_2">\n						<div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by new line:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemDescription()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n							<div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\n								<!-- <pre>\n									{{descriptionItem|json}}\n								</pre> -->\n	              <div class="col-md-2">\n	                <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n	                  <ui-select-choices repeat="item in descFieldType | filter: $select.search">\n	                    <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\n	                <div class="form-group">\n	                  <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\n	                </div>\n	              </div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n									<input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\n								</div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\'">\n									<ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n	                  <ui-select-choices repeat="item in fieldType | filter: $select.search">\n	                    <div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n								</div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'string\'">\n									<input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\n								</div>\n	              <div class="col-md-3" data-ng-if="descriptionItem.type==\'key_value\' && descriptionItem.keyType==\'variable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END DESCRIPTION TAB -->\n          <!-- FIELDS TAB -->\n					<div class="tab-pane ui-padding" id="tab_1_3">\n						<div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItemField()"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div ng-scrollbars ng-scrollbars-config="config"> -->\n	            <div class="row" data-ng-repeat="fieldItem in fieldConfig">\n	              <div class="col-md-3">\n	                <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.label}}</ui-select-match>\n	                  <ui-select-choices repeat="item.name as item in accountFields | filter: $select.search">\n	                    <div ng-bind-html="item.label | highlight: $select.search"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\n	                <div class="form-group">\n										<ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n		                  <ui-select-choices repeat="item.value as item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\n		                    <div ng-bind-html="item.name | highlight: $select.search"></div>\n		                  </ui-select-choices>\n		                </ui-select>\n	                </div>\n	              </div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\n									<div class="form-group">\n										<ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected | ucfirst}}</ui-select-match>\n		                  <ui-select-choices repeat="item in fieldType | filter: $select.search">\n		                    <div ng-bind-html="item | highlight: $select.search | ucfirst"></div>\n		                  </ui-select-choices>\n		                </ui-select>\n									</div>\n								</div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\n	                <div class="form-group">\n										<input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\n	                </div>\n	              </div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\n	                <div class="form-group">\n										<ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END FIELDS TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/sugarcrm/view/view.configurations.html",'<div ui-view class="profile-content">\n	<div class="row" data-ng-init="getConfigurations()">\n		<div class="col-md-12">\n			<div class="portlet light">\n				<div class="portlet-title  tabbable-line">\n					<div class="caption caption-md">\n						<i class="icon-globe theme-font hide"></i>\n						<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATIONS\' | translate}}</span>\n					</div>\n					<div class="actions">\n						<div class="btn-group">\n							<a class="btn green-jungle " href="/sugarcrm/view/{{account.id}}/configuration" data-toggle="dropdown">\n								<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}\n							</a>\n						</div>\n					</div>\n				</div>\n				<div class="portlet-body">\n					<!-- START TABLE -->\n					<table class="table table-striped table-bordered table-hover">\n						  <thead>\n							  <tr>\n							    <th>{{\'APPLICATION_NAME\' | translate}}</th>\n									<th>{{\'APPLICATION_DESCRIPTION\' | translate}}</th>\n									<th>{{ \'APPLICATION_ACTIONS\' | translate }}</th>\n							  </tr>\n						  </thead>\n							<tbody>\n						    <tr data-ng-repeat="configuration in configurations">\n									<td>{{configuration.name}}</td>\n									<td>{{configuration.description}}</td>\n						      <td>\n										<a class="btn default btn-xs blue-stripe" data-ng-href="/sugarcrm/view/{{account.id}}/configurations/settings/{{configuration.id}}">\n											{{ \'APPLICATION_SETTINGS\' | translate}}\n						        </a>\n						        <a class="btn default btn-xs red-stripe" data-ng-click="deleteConfiguration(configuration.name,configuration.id)">\n											{{ \'APPLICATION_DELETE\' | translate }}\n						        </a>\n						      </td>\n						    </tr>\n								<tr data-ng-hide="configurations.length">\n									<td colspan="5" style="text-align:center;">\n										<i>No configuration available</i>\n									</td>\n								</tr>\n						  </tbody>\n					</table>\n					<!-- END TABLE -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/sugarcrm/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n          <i class="icon-handbag"></i>\n          <a href="/sugarcrm/list">{{ \'APPLICATION_SUGARCRM\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{account.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img src="assets/images/media/sugarcrm.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{account.name}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{account.remoteUri}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.sugarcrm.view.account\')}">\n							<a ng-href="/sugarcrm/view/{{account.id}}/account">\n							<i class="icon-user"></i>\n							{{ \'APPLICATION_ACCOUNT\' | translate }} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.sugarcrm.view.configurations\') || $state.is(\'main.sugarcrm.view.configuration\')}">\n							<a ng-href="/sugarcrm/view/{{account.id}}/configurations">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_CONFIGURATIONS\' | translate }} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/sugarcrm/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-handbag"></i>\n						<a href="/sugarcrm/list">{{ \'APPLICATION_SUGARCRM\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n						<form name="forms.formSetting" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_USERNAME\' | translate}}" class="form-control" data-ng-model="item.username" required/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_REMOTE_ADDRESS\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_REMOTE_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.remoteUri" required ng-remote-validate="/api/sugarcrm/accounts/validate/remoteUri"/>\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n                <span data-ng-show="(forms.formSetting.remoteUri.$touched || forms.formSetting.$submitted) && forms.formSetting.remoteUri.$error.ngRemoteValidate" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_DOMAIN\' | translate}}.\n				        </span>\n							</div>\n							<!-- END USERNAME -->\n\n              <!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n								<span data-ng-show="forms.formSetting.apiKey.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n\n				</wizard>\n\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/answer/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CANNED_ANSWER\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.key.$touched || form.$submitted) && form.key.$invalid}">\n      <label class="control-label">{{\'APPLICATION_KEY\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="key" placeholder="{{\'APPLICATION_KEY\' | translate}}" class="form-control" data-ng-model="item.key" required/>\n      <span data-ng-show="(form.key.$touched || form.$submitted) && form.key.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START VALUE -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.value.$touched || form.$submitted) && form.value.$invalid}">\n      <label class="control-label">{{\'APPLICATION_VALUE\' | translate}}<span class="required" aria-required="true">*</span></label></label>\n      <textarea type="text" name="value" placeholder="{{\'APPLICATION_VALUE\' | translate}}" class="form-control" data-ng-model="item.value" required></textarea>\n      <span data-ng-show="(form.value.$touched || form.$submitted) && form.value.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END VALUE -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),
+a.put("app/tools/answer/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-magic-wand"></i>\n					<a href="#">{{ \'APPLICATION_CANNED_ANSWERS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-magic-wand font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_CANNED_ANSWERS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="#" data-toggle="dropdown" data-ng-click="createItem()">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CANNED_ANSWER\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n						<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/answer/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getAnswer()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-magic-wand"></i>\n					<a href="/tools/answers/list">{{ \'APPLICATION_CANNED_ANSWER\' | translate }}</a>\n					<i data-ng-show="answer" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="answer">\n					<a href="#">{{answer.key}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/answer.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{answer.name}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.answers.view.settings\')}">\n							<a data-ng-href="/tools/answers/view/{{answer.id}}/settings">\n								<i class="icon-settings"></i>\n								{{ \'APPLICATION_SETTINGS\' | translate}}\n							</a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/answer/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_CANNED_ANSWER\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateAnswer()" novalidate>\n\n							<!-- START KEY -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.key.$touched || forms.general.$submitted) && forms.general.key.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="key" placeholder="{{\'APPLICATION_KEY\' | translate}}" class="form-control" data-ng-model="answer.key" required/>\n								<span data-ng-show="(forms.general.key.$touched || forms.general.$submitted) && forms.general.key.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END KEY -->\n\n							<!-- START VALUE -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.value.$touched || forms.general.$submitted) && forms.general.value.$invalid}">\n								<label class="control-label">{{\'APPLICATION_VALUE\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<textarea type="text" name="value" placeholder="{{\'APPLICATION_VALUE\' | translate}}" class="form-control" data-ng-model="answer.value" required></textarea>\n								<span data-ng-show="(forms.general.value.$touched || forms.general.$submitted) && forms.general.value.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END VALUE -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="answer.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/automation/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-wrench"></i>\n						<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-bulb"></i>\n						<a href="#">{{ \'APPLICATION_AUTOMATIONS\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-bulb font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_AUTOMATIONS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle " href="/tools/automations/wizard">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_AUTOMATION\' | translate }}\n						</a>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/automation/view/view.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-settings"></i>\n					<a href="/tools/automations/list">{{ \'APPLICATION_AUTOMATIONS\' | translate }}</a>\n					<i class="fa fa-angle-right" data-ng-show="automation"></i>\n				</li>\n				<li data-ng-show="automation">\n					<a href="#">{{ automation.description || automation.name }}</a>\n				</li>\n			</ul>\n		</div>\n\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/automation.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ automation.name }}\n					</div>\n					<div class="profile-usertitle-job">\n						{{ automation.description }}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.automations.view.settings\')}">\n							<a href="/tools/automations/view/{{automation.id}}/settings">\n							<i class="icon-bulb"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate }} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/automation/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_CONDITIONS\' | translate}} & {{\'APPLICATION_ACTIONS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.general" data-ng-submit="exitValidation(forms.general.$valid) && updateAutomation()" novalidate>\n					<div class="tab-content">\n						<!-- GENERAL TAB -->\n						<div class="tab-pane active" id="tab_1_1">\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="automation.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START CHANNEL -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.channel.$touched || forms.general.$submitted) && forms.general.channel.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CHANNEL\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="channel" placeholder="{{\'APPLICATION_CHANNEL\' | translate}}" class="form-control" data-ng-model="automation.channel" required readonly/>\n								<span data-ng-show="(forms.general.channel.$touched || forms.general.$submitted) && forms.general.channel.$invalid && forms.general.channel.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CHANNEL -->\n\n							<!-- START TIMEOUT -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.general.timeout.$touched && forms.general.timeout.$invalid}">\n								<label class="control-label">{{\'APPLICATION_TIMEOUT\' | translate}} ({{\'APPLICATION_MINUTES\' | translate}})</label>\n								<input type="number" name="timeout" min="10" placeholder="{{\'APPLICATION_TIMEOUT\' | translate}} (min 10 {{\'APPLICATION_MINUTES\' | translate}})" class="form-control" data-ng-model="automation.timeout" data-ng-init="item.timeout = 10" required/>\n								<span data-ng-show="forms.general.timeout.$touched && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TIMEOUT -->\n\n							<!-- START STATUS -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_STATUS\' | translate}}</label>\n								</br>\n								<input bs-switch class="form-control" ng-model="automation.status" type="checkbox" name="status" switch-active="{{ recordSwitch.isActive }}" switch-on-text="{{ recordSwitch.onText }}" switch-off-text="{{ recordSwitch.offText }}" switch-on-color="{{ recordSwitch.onColor }}"\n												switch-off-color="{{ recordSwitch.offColor }}" switch-animate="{{ recordSwitch.animate }}" switch-size="{{ recordSwitch.size }}" switch-label="{{ recordSwitch.label }}" switch-icon="{{ recordSwitch.icon }}" switch-radio-off="{{ recordSwitch.radioOff }}"\n												switch-label-width="{{ recordSwitch.labelWidth }}" switch-handle-width="{{ recordSwitch.handleWidth }}">\n							</div>\n							<!-- END STATUS -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="automation.description" />\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}" />\n						</div>\n						<!-- END GENERAL TAB -->\n						<div class="tab-pane" id="tab_1_2">\n							<!-- All -->\n							<div class="portlet light bordered">\n								<div class="portlet-title">\n									<div class="caption font-blue-hoki">\n										<i class="icon-tag font-blue-hoki"></i>\n										<span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ALL_CONDITIONS\' | translate"></span>:\n									</div>\n								</div>\n								<div class="portlet-body">\n									<div class="portlet light bordered" ng-repeat="all in automation.All">\n										<div class="portlet-title">\n											<div class="caption font-blue-hoki">\n												<span class="caption-subject">{{ \'APPLICATION_ALL\' | translate }} #{{$index+1}}</span>\n											</div>\n											<div class="actions">\n												<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeCondition(\'All\',$index)"><i class="fa fa-trash"></i></a>\n											</div>\n										</div>\n										<div class="portlet-body">\n											<div class="padding-bottom row">\n												<div class="col-md-12">\n													<condition-builder element="all" serviceindex="automation.channel" service="$automations" form="forms.general"></condition-builder>\n												</div>\n											</div>\n										</div>\n									</div>\n									<div class="row">\n										<div class="col-md-12">\n											<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'All\')">\n												<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n											</button>\n										</div>\n									</div>\n								</div>\n							</div>\n\n							<!-- Any -->\n							<div class="portlet light bordered">\n								<div class="portlet-title">\n									<div class="caption font-blue-hoki">\n										<i class="icon-tag font-blue-hoki"></i>\n										<span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ANY_CONDITIONS\' | translate"></span>:\n									</div>\n								</div>\n								<div class="portlet-body">\n									<div class="portlet light bordered" ng-repeat="any in automation.Any">\n										<div class="portlet-title">\n											<div class="caption font-blue-hoki">\n												<span class="caption-subject">{{ \'APPLICATION_ANY\' | translate }} #{{$index+1}}</span>\n											</div>\n											<div class="actions">\n												<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeCondition(\'Any\',$index)"><i class="fa fa-trash"></i></a>\n											</div>\n										</div>\n										<div class="portlet-body">\n											<div class="padding-bottom row">\n												<div class="col-md-12">\n													<condition-builder element="any" serviceindex="automation.channel" service="$automations" form="forms.general"></condition-builder>\n												</div>\n											</div>\n										</div>\n									</div>\n									<div class="row">\n										<div class="col-md-12">\n											<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'Any\')">\n												<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n											</button>\n										</div>\n									</div>\n								</div>\n							</div>\n\n							<!-- Actions -->\n							<div class="portlet light bordered">\n								<div class="portlet-title">\n									<div class="caption font-blue-hoki">\n										<i class="icon-tag font-blue-hoki"></i>\n										<span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }}</span>:\n									</div>\n								</div>\n								<div class="portlet-body">\n									<div class="portlet light bordered" ng-repeat="action in automation.Actions">\n										<div class="portlet-title">\n											<div class="caption font-blue-hoki">\n												<span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }} #{{$index+1}}</span>\n											</div>\n											<div class="actions">\n												<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeAction($index)"><i class="fa fa-trash"></i></a>\n											</div>\n										</div>\n										<div class="portlet-body">\n											<div class="padding-bottom row">\n												<div class="col-md-12">\n													<div class="form-group col-md-6" data-ng-class="{\'has-error\': (forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$invalid}">\n														<ui-select data-ng-model="action.action" theme="bootstrap" data-ng-change="resetActionData(action)" name="action{{$index}}" required>\n															<ui-select-match placeholder="{{ \'APPLICATION_ACTION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n															<ui-select-choices repeat="tAction.value as tAction in $automations.services[automation.channel].actions | filter: $select.search">\n																<div ng-bind-html="tAction.name | translate | highlight: $select.search"></div>\n															</ui-select-choices>\n														</ui-select>\n														<span class="help-block">\n												{{ \'APPLICATION_ACTION\' | translate }}\n											</span>\n														<span data-ng-show="(forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n													</div>\n													<div ng-switch="action.action">\n														<action-builder-status ng-switch-when="status" element="action" form="forms.settings"></action-builder-status>\n													</div>\n												</div>\n											</div>\n										</div>\n									</div>\n									<div class="row">\n										<div class="col-md-12">\n											<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addAction()">\n												<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_ACTION\' | translate}}\n											</button>\n										</div>\n									</div>\n								</div>\n							</div>\n							<div class="has-error" data-ng-show="forms.general.$submitted && !automation.All.length && !automation.Any.length">\n								<span class="help-block help-block-error form-control">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_CONDITION\' | translate}}.\n							</span>\n							</div>\n							<div class="has-error" data-ng-show="forms.general.$submitted && !automation.Actions.length">\n								<span class="help-block help-block-error form-control">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_ACTION\' | translate}}.\n							</span>\n							</div>\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}" />\n						</div>\n					</div>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/automation/wizard/wizard.html",'<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN PAGE HEADER-->\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-settings"></i>\n					<a href="/tools/automations/list">{{ \'APPLICATION_AUTOMATIONS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n		<!-- END PAGE HEADER-->\n\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-bulb font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_AUTOMATIONS\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n					<wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(forms.general.$valid)">\n						<form name="forms.general" data-ng-submit="submit()" novalidate>\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.general.name.$touched && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="forms.general.name.$touched && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START STATUS -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_STATUS\' | translate}}</label></br>\n							<input\n								    bs-switch\n										class="form-control"\n								    ng-model="item.status"\n								    type="checkbox"\n										name="status"\n										data-ng-init="item.status = 0"\n								    switch-active="{{ statusSwitch.isActive }}"\n								    switch-on-text="{{ statusSwitch.onText }}"\n								    switch-off-text="{{ statusSwitch.offText }}"\n								    switch-on-color="{{ statusSwitch.onColor }}"\n								    switch-off-color="{{ statusSwitch.offColor }}"\n								    switch-animate="{{ statusSwitch.animate }}"\n								    switch-size="{{ statusSwitch.size }}"\n								    switch-label="{{ statusSwitch.label }}"\n								    switch-icon="{{ statusSwitch.icon }}"\n								    switch-radio-off="{{ statusSwitch.radioOff }}"\n								    switch-label-width="{{ statusSwitch.labelWidth }}"\n								    switch-handle-width="{{ statusSwitch.handleWidth }}">\n							</div>\n							<!-- END STATUS -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n						</form>\n					</wz-step>\n					<wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitSettingsValidation(forms.settings.$valid)">\n						<form name="forms.settings" novalidate>\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject">{{ \'APPLICATION_CHANNEL\' | translate }}</span>\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.channel.$touched || forms.settings.$submitted) && forms.settings.channel.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_CHANNEL\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="item.channel" name="channel" theme="bootstrap" required>\n										<ui-select-match placeholder="{{ \'APPLICATION_CHANNEL\' | translate }}">{{$select.selected | capitalize}}</ui-select-match>\n										<ui-select-choices repeat="channel in $automations.channels | filter: $select.search">\n											<div ng-bind-html="channel | highlight: $select.search | capitalize"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.settings.channel.$touched || forms.settings.$submitted) && forms.settings.channel.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n						</div>\n\n						<!-- All -->\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ALL_CONDITIONS\' | translate"></span>:\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="portlet light bordered" ng-repeat="all in item.All">\n									<div class="portlet-title">\n										<div class="caption font-blue-hoki">\n											<span class="caption-subject">{{ \'APPLICATION_ALL\' | translate }} #{{$index+1}}</span>\n										</div>\n										<div class="actions">\n											<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeCondition(\'All\',$index)"><i class="fa fa-trash"></i></a>\n										</div>\n									</div>\n									<div class="portlet-body">\n										<div class="padding-bottom row">\n											<div class="col-md-12">\n												<condition-builder element="all" serviceindex="item.channel" service="$automations" form="forms.general"></condition-builder>\n											</div>\n										</div>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-12">\n										<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'All\')">\n											<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n										</button>\n									</div>\n								</div>\n							</div>\n						</div>\n\n						<!-- Any -->\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ANY_CONDITIONS\' | translate"></span>:\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="portlet light bordered" ng-repeat="any in item.Any">\n									<div class="portlet-title">\n										<div class="caption font-blue-hoki">\n											<span class="caption-subject">{{ \'APPLICATION_ANY\' | translate }} #{{$index+1}}</span>\n										</div>\n										<div class="actions">\n											<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeCondition(\'Any\',$index)"><i class="fa fa-trash"></i></a>\n										</div>\n									</div>\n									<div class="portlet-body">\n										<div class="padding-bottom row">\n											<div class="col-md-12">\n												<condition-builder element="any" serviceindex="item.channel" service="$automations" form="forms.general"></condition-builder>\n											</div>\n										</div>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-12">\n										<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'Any\')">\n											<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n										</button>\n									</div>\n								</div>\n							</div>\n						</div>\n\n						<!-- Actions -->\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }}</span>:\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="portlet light bordered" ng-repeat="action in item.Actions">\n									<div class="portlet-title">\n										<div class="caption font-blue-hoki">\n											<span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }} #{{$index+1}}</span>\n										</div>\n										<div class="actions">\n											<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeAction($index)"><i class="fa fa-trash"></i></a>\n										</div>\n									</div>\n									<div class="portlet-body">\n										<div class="padding-bottom row">\n											<div class="col-md-12">\n												<div class="form-group col-md-6" data-ng-class="{\'has-error\': (forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$invalid}">\n													<ui-select data-ng-model="action.action" theme="bootstrap" data-ng-change="resetActionData(action)" name="action{{$index}}" required>\n														<ui-select-match placeholder="{{ \'APPLICATION_ACTION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n														<ui-select-choices repeat="tAction.value as tAction in $automations.services[item.channel].actions | filter: $select.search">\n															<div ng-bind-html="tAction.name | translate | highlight: $select.search"></div>\n														</ui-select-choices>\n													</ui-select>\n													<span class="help-block">\n												{{ \'APPLICATION_ACTION\' | translate }}\n											</span>\n													<span data-ng-show="(forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$error.required" class="help-block help-block-error">\n												<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n											</span>\n												</div>\n												<div ng-switch="action.action">\n													<action-builder-status ng-switch-when="status" element="action" form="forms.settings"></action-builder-status>\n												</div>\n											</div>\n										</div>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-12">\n										<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addAction()">\n											<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_ACTION\' | translate}}\n										</button>\n									</div>\n								</div>\n							</div>\n						</div>\n						<div class="has-error" data-ng-show="forms.settings.$submitted && !item.All.length && !item.Any.length">\n							<span class="help-block help-block-error form-control">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_CONDITION\' | translate}}.\n							</span>\n						</div>\n						<div class="has-error" data-ng-show="forms.settings.$submitted && !item.Actions.length">\n							<span class="help-block help-block-error form-control">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_ACTION\' | translate}}.\n							</span>\n						</div>\n						<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()"/>\n					</form>\n					</wz-step>\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n						<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/tools/interval/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_INTERVAL\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/interval/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-clock"></i>\n					<a href="#">{{ \'APPLICATION_INTERVALS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_INTERVALS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_INTERVAL\' | translate }}\n						</button>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/interval/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getInterval()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-clock"></i>\n					<a href="/tools/intervals/list">{{ \'APPLICATION_INTERVALS\' | translate }}</a>\n					<i data-ng-show="interval" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="interval">\n					<a href="#">{{interval.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/interval.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{interval.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.intervals.view.settings\')}">\n							<a data-ng-click="deselectAndRedirect(\'/tools/intervals/view/\'+interval.id+\'/settings\')">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n'+"						<li data-ng-class=\"{active: $state.is('main.tools.intervals.view.subintervals') || $state.is('main.tools.intervals.view.subinterval') || $state.is('main.tools.intervals.view.subintervals.settings')}\">\n							<a data-ng-click=\"deselectAndRedirect('/tools/intervals/view/'+interval.id+'/subintervals')\">\n							<i class=\"icon-list\"></i>\n							{{ 'APPLICATION_SUBINTERVALS' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class=\"profile-content\">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n"),a.put("app/tools/interval/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_INTERVAL\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateInterval()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="interval.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="interval.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/interval/view/view.subinterval.html",'\n<div class="row" data-ng-init="initSubInterval(true)">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_NEW_SUBINTERVAL\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="addSubInterval()">\n          <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitValidation(forms.subinterval.name.$valid)">\n            <form name="forms.subinterval" novalidate>\n\n              <!-- START NAME -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.subinterval.name.$touched || forms.subinterval.$submitted) && forms.subinterval.name.$invalid}">\n                <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="subinterval.name" required/>\n                <span data-ng-show="(forms.subinterval.name.$touched || forms.subinterval.$submitted) && forms.subinterval.name.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END NAME -->\n\n							<!-- START TIME -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n                <div class="input-group input-large">\n									<fieldset class="pull-left" ng-disabled="splittedInterval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="splittedInterval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n                  <div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n									<fieldset ng-disabled="splittedInterval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="splittedInterval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n									<label class="control-label pointer-cursor margin-top20"><input\n									bs-switch\n									class="form-control"\n									ng-model="splittedInterval.alwaysTime"\n									type="checkbox"\n									switch-active="{{ switch.isActive }}"\n									switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n									switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n									switch-on-color="{{ switch.onColor }}"\n									switch-off-color="{{ switch.offColor }}"\n									switch-animate="{{ switch.animate }}"\n									switch-size="{{ switch.size }}"\n									switch-label="{{ switch.label }}"\n									switch-icon="{{ switch.icon }}"\n									switch-radio-off="{{ switch.radioOff }}"\n									switch-label-width="{{ switch.labelWidth }}"\n									switch-handle-width="{{ switch.handleWidth }}"> {{\'APPLICATION_ALWAYS\' | translate}}</label>\n                </div>\n              </div>\n              <!-- END TIME -->\n\n              <!-- START WEEKDAY -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.wd_from" theme="bootstrap" name="wd_from">\n                    <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{weekDay.name | translate}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.wd_to" theme="bootstrap" name="wd_to">\n                    <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{weekDay.name | translate}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END WEEKDAY -->\n\n							<!-- START MONTHDAY -->\n							<div class="form-group">\n								<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n								<div class="input-group input-large">\n									<ui-select data-ng-model="splittedInterval.md_from" theme="bootstrap" name="md_from">\n										<ui-select-match>{{$select.selected===\'always\' ? ($select.selected | capitalize) : $select.selected}}</ui-select-match>\n										<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="splittedInterval.md_to && splittedInterval.md_to!==\'always\' && monthDay>splittedInterval.md_to && monthDay!==\'always\'">\n											{{monthDay===\'always\' ? (monthDay | capitalize) : monthDay}}\n										</ui-select-choices>\n									</ui-select>\n									<span class="input-group-addon">to</span>\n									<ui-select data-ng-model="splittedInterval.md_to" theme="bootstrap" name="md_to">\n										<ui-select-match>{{$select.selected===\'always\' ? ($select.selected | capitalize) : $select.selected}}</ui-select-match>\n										<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="splittedInterval.md_from && splittedInterval.md_from!==\'always\' && monthDay<splittedInterval.md_from && monthDay!==\'always\'">\n											{{monthDay===\'always\' ? (monthDay | capitalize) : monthDay}}\n										</ui-select-choices>\n									</ui-select>\n								</div>\n							</div>\n							<!-- END MONTHDAY -->\n\n\n              <!-- START MONTH -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.m_from" theme="bootstrap" name="m_from">\n                    <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{month.name | translate}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.m_to" theme="bootstrap" name="m_to">\n                    <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{month.name | translate}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END MONTH -->\n\n\n\n							<button class="btn green-haze" type="submit" ng-click="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n            </form>\n          </wz-step>\n\n\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/interval/view/view.subintervalSettings.html",'\n<div class="row" data-ng-init="initSubInterval();getSubInterval();">\n	<div class="col-md-12">\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_SUBINTERVAL_SETTINGS\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="updateInterval(\'subintervals\')">\n					<div class="profile-usertitle-name">\n						{{subinterval.name}}\n					</div>\n          <wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitValidation(forms.subinterval.name.$valid)">\n            <form name="forms.subinterval" novalidate>\n\n              <!-- START NAME -->\n              <div class="form-group" data-ng-class="{\'has-error\': (forms.subinterval.name.$touched || forms.subinterval.$submitted) && forms.subinterval.name.$invalid}">\n                <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n                <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="interval.SubIntervals[selectedSubInterval].name" required/>\n                <span data-ng-show="(forms.subinterval.name.$touched || forms.subinterval.$submitted) && forms.subinterval.name.$error.required" class="help-block help-block-error">\n                  <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n                </span>\n              </div>\n              <!-- END NAME -->\n\n              <!-- START TIME -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_TIME\' | translate }}</label>\n                <div class="input-group input-large">\n									<fieldset class="pull-left" ng-disabled="splittedInterval.alwaysTime"><uib-timepicker name="t_from" data-ng-model="splittedInterval.t_from" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n                  <div class="input-group-addon col-md-1 interval-to pull-left">to</div>\n									<fieldset ng-disabled="splittedInterval.alwaysTime"><uib-timepicker  name="t_to" data-ng-model="splittedInterval.t_to" show-meridian="false" show-spinners="false"></uib-timepicker></fieldset>\n									<label class="control-label pointer-cursor margin-top20"><input\n									bs-switch\n									class="form-control"\n									ng-model="splittedInterval.alwaysTime"\n									type="checkbox"\n									switch-active="{{ switch.isActive }}"\n									switch-on-text="{{\'APPLICATION_YES\' | translate}}"\n									switch-off-text="{{\'APPLICATION_NO\' | translate}}"\n									switch-on-color="{{ switch.onColor }}"\n									switch-off-color="{{ switch.offColor }}"\n									switch-animate="{{ switch.animate }}"\n									switch-size="{{ switch.size }}"\n									switch-label="{{ switch.label }}"\n									switch-icon="{{ switch.icon }}"\n									switch-radio-off="{{ switch.radioOff }}"\n									switch-label-width="{{ switch.labelWidth }}"\n									switch-handle-width="{{ switch.handleWidth }}"> {{\'APPLICATION_ALWAYS\' | translate}}</label>\n                </div>\n              </div>\n              <!-- END TIME -->\n\n              <!-- START WEEKDAY -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_WEEKDAY\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.wd_from" theme="bootstrap" name="wd_from">\n                    <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{weekDay.name | translate}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.wd_to" theme="bootstrap" name="wd_to">\n                    <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n                    <ui-select-choices repeat="weekDay.value as weekDay in $interval.daysOfWeek | filter: $select.search">\n                      {{weekDay.name | translate}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END WEEKDAY -->\n\n							<!-- START MONTHDAY -->\n							<div class="form-group">\n								<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}</label>\n								<div class="input-group input-large">\n									<ui-select data-ng-model="splittedInterval.md_from" theme="bootstrap" name="md_from">\n										<ui-select-match>{{$select.selected===\'always\' ? ($select.selected | capitalize) : $select.selected}}</ui-select-match>\n										<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="splittedInterval.md_to && splittedInterval.md_to!==\'always\' && monthDay>splittedInterval.md_to && monthDay!==\'always\'">\n											{{monthDay===\'always\' ? (monthDay | capitalize) : monthDay}}\n										</ui-select-choices>\n									</ui-select>\n									<span class="input-group-addon">to</span>\n									<ui-select data-ng-model="splittedInterval.md_to" theme="bootstrap" name="md_to">\n										<ui-select-match>{{$select.selected===\'always\' ? ($select.selected | capitalize) : $select.selected}}</ui-select-match>\n										<ui-select-choices repeat="monthDay in $interval.daysOfMonth | filter: $select.search" ui-disable-choice="splittedInterval.md_from && splittedInterval.md_from!==\'always\' && monthDay<splittedInterval.md_from && monthDay!==\'always\'">\n											{{monthDay===\'always\' ? (monthDay | capitalize) : monthDay}}\n										</ui-select-choices>\n									</ui-select>\n								</div>\n							</div>\n							<!-- END MONTHDAY -->\n\n              <!-- START MONTH -->\n              <div class="form-group">\n                <label class="control-label">{{ \'APPLICATION_MONTH\' | translate }}</label>\n                <div class="input-group input-large">\n                  <ui-select data-ng-model="splittedInterval.m_from" theme="bootstrap" name="m_from">\n                    <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{month.name | translate}}\n                    </ui-select-choices>\n                  </ui-select>\n                  <span class="input-group-addon">to</span>\n                  <ui-select data-ng-model="splittedInterval.m_to" theme="bootstrap" name="m_to">\n                    <ui-select-match placeholder="">{{$select.selected.name | translate}}</ui-select-match>\n                    <ui-select-choices repeat="month.value as month in $interval.months | filter: $select.search">\n                      {{month.name | translate}}\n                    </ui-select-choices>\n                  </ui-select>\n                </div>\n              </div>\n              <!-- END MONTH -->\n\n\n\n							<button class="btn green-haze" type="submit" ng-click="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n            </form>\n          </wz-step>\n\n\n						<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n							<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n							<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n							<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n						</wz-step>\n				</wizard>\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/interval/view/view.subintervals.html",'<div ui-view class="profile-content">\n<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title  tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SUBINTERVALS\' | translate}}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group">\n						<a class="btn green-jungle " href="/tools/intervals/view/{{interval.id}}/subinterval" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_SUBINTERVAL\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div data-ng-if="selectedSubInterval === undefined" ui-grid="gridOptions"  ui-grid-resize-columns class="grid" ui-grid-draggable-rows>\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/tools/pause/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_PAUSE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/pause/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-pause"></i>\n					<a href="#">{{ \'APPLICATION_PAUSES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="fa fa-pause font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_PAUSES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="#" data-toggle="dropdown" data-ng-click="createItem()">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_PAUSE\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n						<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/pause/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getPause()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-control-pause"></i>\n					<a href="/tools/pauses/list">{{ \'APPLICATION_PAUSES\' | translate }}</a>\n					<i data-ng-show="pause" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="pause">\n					<a href="#">{{pause.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/pause.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{pause.name}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.pauses.view.settings\')}">\n							<a data-ng-href="/tools/pauses/view/{{pause.id}}/settings">\n								<i class="icon-settings"></i>\n								{{ \'APPLICATION_SETTINGS\' | translate}}\n							</a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/pause/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_PAUSE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updatePause()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="pause.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="pause.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
+a.put("app/tools/scheduler/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-calendar"></i>\n					<a href="#">{{ \'APPLICATION_SCHEDULER\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-link font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_SCHEDULES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="/tools/scheduler/wizard" data-toggle="dropdown">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_SCHEDULE\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/scheduler/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-calendar"></i>\n					<a href="/tools/scheduler/list">{{ \'APPLICATION_SCHEDULER\' | translate }}</a>\n					<i data-ng-show="schedule" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="schedule">\n					<a href="#">{{schedule.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/scheduler.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{schedule.name}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.scheduler.view.settings\')}">\n							<a data-ng-href="/tools/scheduler/view/{{schedule.id}}/settings"><i class="icon-settings"></i> {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/scheduler/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_SCHEDULE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab" data-ng-click="refreshSlider()">{{ \'APPLICATION_CONFIGURATION\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && forms.config.$valid && updateSchedule()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.$submitted && forms.general.name.$invalid) || forms.general.name.$error.pattern}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="schedule.name" data-ng-pattern="settings.patternName" required/>\n								<span data-ng-show="forms.general.$submitted && forms.general.name.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.pattern" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START ACTIVE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_ACTIVE\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="schedule.active"\n								type="checkbox"\n								name="status"\n								switch-active="{{ switches.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ switches.onColor }}"\n								switch-off-color="{{ switches.offColor }}"\n								switch-animate="{{ switches.animate }}"\n								switch-size="{{ switches.size }}"\n								switch-label="{{ switches.label }}"\n								switch-icon="{{ switches.icon }}"\n								switch-radio-off="{{ switches.radioOff }}"\n								switch-label-width="{{ switches.labelWidth }}"\n								switch-handle-width="{{ switches.handleWidth }}">\n							</div>\n							<!-- END ACTIVE -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="schedule.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n					<!-- CONFIG TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.config" data-ng-switch="schedule.reportType" data-ng-submit="forms.config.$valid && forms.general.$valid && updateSchedule()" data-ng-if="schedule.type===\'report\'" data-ng-init="initReports()" novalidate>\n\n							<div class="row">\n\n								<!-- START TYPE -->\n								<div class="form-group col-md-2" data-ng-class="{\'has-error\': (forms.config.type.$touched || forms.config.$submitted) && forms.config.type.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="schedule.reportType" name="type" theme="bootstrap" required>\n										<ui-select-match placeholder="{{ \'APPLICATION_TYPE\' | translate }}">{{$select.selected | capitalize}}</ui-select-match>\n										<ui-select-choices repeat="report in [\'default\', \'custom\'] | filter: $select.search">\n											<div ng-bind-html="report | capitalize | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.config.type.$touched || forms.config.$submitted) && forms.config.type.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END TYPE -->\n\n\n								<!-- START REPORT -->\n								<div data-ng-switch-when="default" class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.config.reportId.$touched || forms.config.$submitted) && forms.config.reportId.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_REPORT\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="schedule.reportId" name="reportId" theme="bootstrap" on-select="setReportTree($item,$model)" required>\n										<ui-select-match placeholder="{{ \'APPLICATION_REPORT\' | translate }}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices group-by="\'parent\'" repeat="report.id as report in defRep | filter: $select.search">\n											<div ng-bind-html="report.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.config.reportId.$touched || forms.config.$submitted) && forms.config.reportId.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END REPORT -->\n\n								<!-- START REPORT -->\n								<div data-ng-switch-when="custom" class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.config.reportId.$touched || forms.config.$submitted) && forms.config.reportId.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_REPORT\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="schedule.reportId" name="reportId" theme="bootstrap" on-select="setReportTree($item,$model)" required>\n										<ui-select-match placeholder="{{ \'APPLICATION_REPORT\' | translate }}">{{$select.selected.name}}</ui-select-match>\n										<ui-select-choices group-by="\'parent\'" repeat="report.id as report in cusRep | filter: $select.search">\n											<div ng-bind-html="report.name | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.config.reportId.$touched || forms.config.$submitted) && forms.config.reportId.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END REPORT -->\n\n								<!-- START REPORT -->\n								<div class="form-group col-md-2" data-ng-class="{\'has-error\': (forms.config.reportOutput.$touched || forms.config.$submitted) && forms.config.reportOutput.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_OUTPUT\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="schedule.reportOutput" name="reportOutput" theme="bootstrap" required>\n										<ui-select-match placeholder="{{ \'APPLICATION_OUTPUT\' | translate }}">{{$select.selected}}</ui-select-match>\n										<ui-select-choices repeat="output in [\'CSV\',\'PDF\'] | filter: $select.search">\n											<div ng-bind-html="output | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.config.reportOutput.$touched || forms.config.$submitted) && forms.config.reportOutput.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END REPORT -->\n\n							</div>\n\n							<!-- START TODAY -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_RUN_ON\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								data-ng-model="switchValues.today"\n								type="checkbox"\n								name="status"\n								data-ng-change="checkToday()"\n								switch-active="{{ switches.isActive }}"\n								switch-on-text="{{ \'APPLICATION_TODAY\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_RANGE\' | translate }}"\n								switch-on-color="{{ switches.onColor }}"\n								switch-off-color="{{ switches.offColor }}"\n								switch-animate="{{ switches.animate }}"\n								switch-size="{{ switches.size }}"\n								switch-label="{{ switches.label }}"\n								switch-icon="{{ switches.icon }}"\n								switch-radio-off="{{ switches.radioOff }}"\n								switch-label-width="{{ switches.labelWidth }}"\n								switch-handle-width="{{ switches.handleWidth }}">\n							</div>\n							<!-- END TODAY -->\n\n							<!-- START VALIDITY -->\n							<div class="form-group" data-ng-if="switchValues.today">\n								<label class="control-label">{{\'APPLICATION_VALIDITY\' | translate}}</label>\n								<rzslider rz-slider-model="schedule.validityStart" rz-slider-high="schedule.validityEnd" rz-slider-options="validitySlider"></rzslider>\n							</div>\n							<!-- END VALIDITY -->\n\n							<!-- START RANGE -->\n							<div class="form-group" data-ng-if="!switchValues.today" data-ng-class="{\'has-error\': (forms.config.range.$touched || forms.config.$submitted) && forms.config.range.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_REPORT_RANGE\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="schedule.reportRange" name="range" theme="bootstrap" required>\n									<ui-select-match placeholder="{{ \'APPLICATION_RANGE\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n									<ui-select-choices repeat="range.value as range in reportRanges | filter: $select.search">\n										<div ng-bind-html="range.name | highlight: $select.search | translate"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.config.range.$touched || forms.config.$submitted) && forms.config.range.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END RANGE -->\n\n							<!-- START TODAY CRON -->\n							<div class="form-group" data-ng-if="switchValues.today" data-ng-class="{\'has-error\': (forms.config.cron.$touched || forms.config.$submitted) && forms.config.cron.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_EXECUTE_EVERY\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="schedule.cron" name="cron" theme="bootstrap" data-ng-required="switchValues.today">\n									<ui-select-match placeholder="{{ \'APPLICATION_EXECUTE_EVERY\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n									<ui-select-choices repeat="cron.value as cron in todayCron | filter: $select.search">\n										<div ng-bind-html="cron.name | highlight: $select.search | translate"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.config.cron.$touched || forms.config.$submitted) && forms.config.cron.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TODAY -->\n							<div class="row" data-ng-if="!switchValues.today">\n								<!-- START CRONTYPE EXEC -->\n								<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.config.cronType.$touched || forms.config.$submitted) && forms.config.cronType.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_EXECUTE_EVERY\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="rangeExec.type" name="cronType" theme="bootstrap" required>\n										<ui-select-match placeholder="{{ \'APPLICATION_EXECUTE_EVERY\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n										<ui-select-choices repeat="type.value as type in cronTypes | filter: $select.search">\n											<div ng-bind-html="type.name | highlight: $select.search | translate"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.config.cronType.$touched || forms.config.$submitted) && forms.config.cronType.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END CRONTYPE -->\n\n								<!-- START WEEKDAY -->\n								<div class="form-group col-md-4" data-ng-if="schedule.cronType === \'weekly\'" data-ng-class="{\'has-error\': (forms.config.weekDay.$touched || forms.config.$submitted) && forms.config.weekDay.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_WEEKDAYS\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select multiple data-ng-model="rangeExec.weekDays" name="weekDay" theme="bootstrap" data-ng-required="schedule.cronType === \'weekly\'">\n										<ui-select-match placeholder="{{ \'APPLICATION_WEEKDAYS\' | translate }}">{{$item.name | translate}}</ui-select-match>\n										<ui-select-choices repeat="day.value as day in weekDays | filter: $select.search">\n											<div ng-bind-html="day.name | highlight: $select.search | translate"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.config.weekDay.$touched || forms.config.$submitted) && forms.config.weekDay.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END WEEKDAY -->\n\n								<!-- START MONTHDAY -->\n								<div class="form-group col-md-4" data-ng-if="schedule.cronType === \'monthly\'" data-ng-class="{\'has-error\': (forms.config.monthDay.$touched || forms.config.$submitted) && forms.config.monthDay.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="rangeExec.monthDay" name="monthDay" theme="bootstrap" data-ng-required="schedule.cronType === \'monthly\'">\n										<ui-select-match placeholder="{{ \'APPLICATION_MONTHDAY\' | translate }}">{{$select.selected}}</ui-select-match>\n										<ui-select-choices repeat="day in monthDays | filter: $select.search">\n											<div ng-bind-html="day | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.config.monthDay.$touched || forms.config.$submitted) && forms.config.monthDay.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END MONTHDAY -->\n\n								<!-- START HOUR -->\n								<div class="form-group col-md-4" data-ng-if="schedule.cronType" data-ng-class="{\'has-error\': (forms.config.hour.$touched || forms.config.$submitted) && forms.config.hour.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_HOUR\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="rangeExec.hour" name="hour" theme="bootstrap" required>\n										<ui-select-match placeholder="{{ \'APPLICATION_HOUR\' | translate }}">{{$select.selected}}</ui-select-match>\n										<ui-select-choices repeat="hour in hours | filter: $select.search">\n											<div ng-bind-html="hour | highlight: $select.search"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.config.hour.$touched || forms.config.$submitted) && forms.config.hour.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n								<!-- END HOUR -->\n							</div>\n\n							<!-- START SEND MAIL -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_SEND_MAIL\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								data-ng-model="schedule.sendMail"\n								type="checkbox"\n								name="status"\n								switch-active="{{ switches.isActive }}"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-on-color="{{ switches.onColor }}"\n								switch-off-color="{{ switches.offColor }}"\n								switch-animate="{{ switches.animate }}"\n								switch-size="{{ switches.size }}"\n								switch-label="{{ switches.label }}"\n								switch-icon="{{ switches.icon }}"\n								switch-radio-off="{{ switches.radioOff }}"\n								switch-label-width="{{ switches.labelWidth }}"\n								switch-handle-width="{{ switches.handleWidth }}">\n							</div>\n							<!-- END SEND MAIL -->\n							<div class="row">\n							<!-- START ACCOUNT -->\n							<div class="form-group col-md-6" data-ng-class="{\'has-error\': (forms.config.MailServerOutId.$touched || forms.config.$submitted) && forms.config.MailServerOutId.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_ACCOUNT\' | translate }}<span class="required" data-ng-if="schedule.sendMail" aria-required="true">*</span></label>\n								<ui-select data-ng-model="schedule.MailServerOutId" name="MailServerOutId" theme="bootstrap" data-ng-disabled="!schedule.sendMail" data-ng-required="schedule.sendMail">\n									<ui-select-match placeholder="{{ \'APPLICATION_ACCOUNT\' | translate }}">{{$select.selected.username}}</ui-select-match>\n									<ui-select-choices repeat="account.id as account in mailServers | filter: $select.search">\n										<div ng-bind-html="account.username | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.config.MailServerOutId.$touched || forms.config.$submitted) && forms.config.MailServerOutId.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<div class="note note-warning" data-ng-hide="mailServers.length">\n									<h4 class="block">Warning!</h4>\n									<p>\n										{{ \'MESSAGE_NO_ACCOUNTS_AVAILABLE\' | translate }}\n									</p>\n								</div>\n							</div>\n							<!-- END ACCOUNT -->\n\n							<!-- START EMAIL -->\n							<div class="form-group col-md-6" data-ng-class="{\'has-error\': (forms.config.$submitted && forms.config.email.$invalid) || forms.config.email.$error.pattern}">\n								<label class="control-label">{{\'APPLICATION_EMAIL_ADDRESS\' | translate}}<span data-ng-if="schedule.sendMail" class="required" aria-required="true">*</span></label>\n								<input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL_ADDRESS\' | translate}}" class="form-control" data-ng-model="schedule.email" data-ng-disabled="!schedule.sendMail" data-ng-required="schedule.sendMail"/>\n								<span data-ng-show="forms.config.$submitted && forms.config.email.$invalid" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END EMAIL -->\n\n						</div>\n								<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END CONFIG TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n<!-- <pre>\n	{{rangeExec | json}}\n</pre>\n<pre>\n	{{schedule | json}}\n</pre> -->\n'),a.put("app/tools/scheduler/wizard/wizard.html",'<div class="col-md-12">\n	<!-- BEGIN PAGE HEADER-->\n	<div class="page-bar">\n		<ul class="page-breadcrumb">\n			<li>\n				<i class="icon-rocket"></i>\n				<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-wrench"></i>\n				<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-calendar"></i>\n				<a href="/tools/scheduler/list">{{ \'APPLICATION_SCHEDULER\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-options"></i>\n				<a href="#">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n			</li>\n		</ul>\n	</div>\n	<!-- END PAGE HEADER-->\n\n	<!-- BEGIN PORTLET-->\n	<div class="portlet light bordered">\n		<div class="portlet-title">\n			<div class="caption font-green-sharp">\n				<i class="icon-link font-green-sharp"></i>\n				<span class="caption-subject">{{ \'APPLICATION_SCHEDULE\' | translate }} WIZARD</a> </span>\n			</div>\n		</div>\n		<div class="portlet-body">\n			<wizard on-finish="createItem()">\n				<wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(forms.general.$valid)">\n					<form name="forms.general" novalidate>\n\n						<!-- START NAME -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.general.$submitted && forms.general.name.$invalid) || forms.general.name.$error.pattern}">\n							<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required/>\n							<span data-ng-show="forms.general.$submitted && forms.general.name.$invalid" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n							</span>\n						</div>\n						<!-- END NAME -->\n\n						<!-- START ACTIVE -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_ACTIVE\' | translate}}</label></br>\n							<input\n							bs-switch\n							class="form-control"\n							ng-model="item.active"\n							type="checkbox"\n							name="status"\n							data-ng-init="item.active = 0"\n							switch-active="{{ switches.isActive }}"\n							switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n							switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n							switch-on-color="{{ switches.onColor }}"\n							switch-off-color="{{ switches.offColor }}"\n							switch-animate="{{ switches.animate }}"\n							switch-size="{{ switches.size }}"\n							switch-label="{{ switches.label }}"\n							switch-icon="{{ switches.icon }}"\n							switch-radio-off="{{ switches.radioOff }}"\n							switch-label-width="{{ switches.labelWidth }}"\n							switch-handle-width="{{ switches.handleWidth }}">\n						</div>\n						<!-- END ACTIVE -->\n\n						<!-- START TYPE -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.general.type.$touched || forms.general.$submitted) && forms.general.type.$invalid}">\n							<label class="control-label">{{ \'APPLICATION_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="item.type" name="type" theme="bootstrap" required>\n								<ui-select-match placeholder="{{ \'APPLICATION_TYPE\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n								<ui-select-choices repeat="type.value as type in scheduleTypes | filter: $select.search">\n									<div ng-bind-html="type.name | highlight: $select.search | translate"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.general.type.$touched || forms.general.$submitted) && forms.general.type.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TYPE -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n							<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n						</div>\n						<!-- END DESCRIPTION -->\n\n						<button class="btn green-haze" type="submit" ng-click="next(true)">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n					</form>\n				</wz-step>\n\n				<wz-step title="{{\'APPLICATION_CONFIGURATION\' | translate}}" canexit="exitValidation(forms.config.$valid)">\n					<form name="forms.config" data-ng-switch="item.reportType" data-ng-if="item.type===\'report\'" data-ng-init="initReports()" novalidate>\n						<div class="row">\n\n							<!-- START TYPE -->\n							<div class="form-group col-md-2" data-ng-class="{\'has-error\': (forms.config.type.$touched || forms.config.$submitted) && forms.config.type.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_TYPE\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="item.reportType" name="type" theme="bootstrap" required>\n									<ui-select-match placeholder="{{ \'APPLICATION_TYPE\' | translate }}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="report in [\'default\', \'custom\'] | filter: $select.search">\n										<div ng-bind-html="report | capitalize | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.config.type.$touched || forms.config.$submitted) && forms.config.type.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TYPE -->\n\n							<!-- START DEFAULT REPORT -->\n							<div data-ng-switch-when="default" class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.config.reportId.$touched || forms.config.$submitted) && forms.config.reportId.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_REPORT\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="item.reportId" name="reportId" theme="bootstrap" on-select="setReportTree($item,$model)" required>\n									<ui-select-match placeholder="{{ \'APPLICATION_REPORT\' | translate }}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices group-by="\'parent\'" repeat="report.id as report in defRep | filter: $select.search">\n										<div ng-bind-html="report.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.config.reportId.$touched || forms.config.$submitted) && forms.config.reportId.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END DEFAULT REPORT -->\n\n							<!-- START CUSTOM REPORT -->\n							<div data-ng-switch-when="custom" class="form-group col-md-8" data-ng-class="{\'has-error\': (forms.config.reportId.$touched || forms.config.$submitted) && forms.config.reportId.$invalid}">\n								<label class="control-label">{{ \'APPLICATION_REPORT\' | translate }}<span class="required" aria-required="true">*</span></label>\n								<ui-select data-ng-model="item.reportId" name="reportId" theme="bootstrap" on-select="setReportTree($item,$model)" required>\n									<ui-select-match placeholder="{{ \'APPLICATION_REPORT\' | translate }}">{{$select.selected.name}}</ui-select-match>\n									<ui-select-choices group-by="\'parent\'" repeat="report.id as report in cusRep | filter: $select.search">\n										<div ng-bind-html="report.name | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="(forms.config.reportId.$touched || forms.config.$submitted) && forms.config.reportId.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CUSTOM REPORT -->\n\n						<!-- START OUTPUT -->\n						<div class="form-group col-md-2" data-ng-class="{\'has-error\': (forms.config.reportOutput.$touched || forms.config.$submitted) && forms.config.reportOutput.$invalid}">\n							<label class="control-label">{{ \'APPLICATION_OUTPUT\' | translate }}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="item.reportOutput" name="reportOutput" theme="bootstrap" required>\n								<ui-select-match placeholder="{{ \'APPLICATION_OUTPUT\' | translate }}">{{$select.selected}}</ui-select-match>\n								<ui-select-choices repeat="output in [\'CSV\',\'PDF\'] | filter: $select.search">\n									<div ng-bind-html="output | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.config.reportOutput.$touched || forms.config.$submitted) && forms.config.reportOutput.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END OUTPUT -->\n\n					</div>\n\n						<!-- START TODAY -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_RUN_ON\' | translate}}</label></br>\n							<input\n							bs-switch\n							class="form-control"\n							data-ng-model="switchValues.today"\n							type="checkbox"\n							name="status"\n							data-ng-change="checkToday()"\n							switch-active="{{ switches.isActive }}"\n							switch-on-text="{{ \'APPLICATION_TODAY\' | translate }}"\n							switch-off-text="{{ \'APPLICATION_RANGE\' | translate }}"\n							switch-on-color="{{ switches.onColor }}"\n							switch-off-color="{{ switches.offColor }}"\n							switch-animate="{{ switches.animate }}"\n							switch-size="{{ switches.size }}"\n							switch-label="{{ switches.label }}"\n							switch-icon="{{ switches.icon }}"\n							switch-radio-off="{{ switches.radioOff }}"\n							switch-label-width="{{ switches.labelWidth }}"\n							switch-handle-width="{{ switches.handleWidth }}">\n						</div>\n						<!-- END TODAY -->\n\n						<!-- START VALIDITY -->\n						<div class="form-group" data-ng-if="switchValues.today">\n							<label class="control-label">{{\'APPLICATION_VALIDITY\' | translate}}</label>\n							<rzslider rz-slider-model="item.validityStart" rz-slider-high="item.validityEnd" rz-slider-options="validitySlider" data-ng-init="item.validityStart = 8;item.validityEnd = 16;"></rzslider>\n						</div>\n						<!-- END VALIDITY -->\n\n						<!-- START RANGE -->\n						<div class="form-group" data-ng-if="!switchValues.today" data-ng-class="{\'has-error\': (forms.config.range.$touched || forms.config.$submitted) && forms.config.range.$invalid}">\n							<label class="control-label">{{ \'APPLICATION_REPORT_RANGE\' | translate }}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="item.reportRange" name="range" theme="bootstrap" required>\n								<ui-select-match placeholder="{{ \'APPLICATION_RANGE\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n								<ui-select-choices repeat="range.value as range in reportRanges | filter: $select.search">\n									<div ng-bind-html="range.name | highlight: $select.search | translate"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.config.range.$touched || forms.config.$submitted) && forms.config.range.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END RANGE -->\n\n						<!-- START TODAY CRON EXEC -->\n						<div class="form-group" data-ng-if="switchValues.today" data-ng-class="{\'has-error\': (forms.config.cron.$touched || forms.config.$submitted) && forms.config.cron.$invalid}">\n							<label class="control-label">{{ \'APPLICATION_EXECUTE_EVERY\' | translate }}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="item.cron" name="cron" theme="bootstrap" data-ng-required="switchValues.today">\n								<ui-select-match placeholder="{{ \'APPLICATION_EXECUTE_EVERY\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n								<ui-select-choices repeat="cron.value as cron in todayCron | filter: $select.search">\n									<div ng-bind-html="cron.name | highlight: $select.search | translate"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.config.cron.$touched || forms.config.$submitted) && forms.config.cron.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END TODAY CRON -->\n						<div class="row" data-ng-if="!switchValues.today">\n						<!-- START CRONTYPE EXEC -->\n						<div class="form-group col-md-4" data-ng-class="{\'has-error\': (forms.config.cronType.$touched || forms.config.$submitted) && forms.config.cronType.$invalid}">\n							<label class="control-label">{{ \'APPLICATION_EXECUTE_EVERY\' | translate }}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="rangeExec.type" name="cronType" theme="bootstrap" required>\n								<ui-select-match placeholder="{{ \'APPLICATION_EXECUTE_EVERY\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n								<ui-select-choices repeat="type.value as type in cronTypes | filter: $select.search">\n									<div ng-bind-html="type.name | highlight: $select.search | translate"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.config.cronType.$touched || forms.config.$submitted) && forms.config.cronType.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END CRONTYPE -->\n\n						<!-- START WEEKDAY -->\n						<div class="form-group col-md-4" data-ng-if="item.cronType === \'weekly\'" data-ng-class="{\'has-error\': (forms.config.weekDay.$touched || forms.config.$submitted) && forms.config.weekDay.$invalid}">\n							<label class="control-label">{{ \'APPLICATION_WEEKDAYS\' | translate }}<span class="required" aria-required="true">*</span></label>\n							<ui-select multiple data-ng-model="rangeExec.weekDays" name="weekDay" theme="bootstrap" data-ng-required="item.cronType === \'weekly\'">\n								<ui-select-match placeholder="{{ \'APPLICATION_WEEKDAYS\' | translate }}">{{$item.name | translate}}</ui-select-match>\n								<ui-select-choices repeat="day.value as day in weekDays | filter: $select.search">\n									<div ng-bind-html="day.name | highlight: $select.search | translate"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.config.weekDay.$touched || forms.config.$submitted) && forms.config.weekDay.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END WEEKDAY -->\n\n						<!-- START MONTHDAY -->\n						<div class="form-group col-md-4" data-ng-if="item.cronType === \'monthly\'" data-ng-class="{\'has-error\': (forms.config.monthDay.$touched || forms.config.$submitted) && forms.config.monthDay.$invalid}">\n							<label class="control-label">{{ \'APPLICATION_MONTHDAY\' | translate }}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="rangeExec.monthDay" name="monthDay" theme="bootstrap" data-ng-required="item.cronType === \'monthly\'">\n								<ui-select-match placeholder="{{ \'APPLICATION_MONTHDAY\' | translate }}">{{$select.selected}}</ui-select-match>\n								<ui-select-choices repeat="day in monthDays | filter: $select.search">\n									<div ng-bind-html="day | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.config.monthDay.$touched || forms.config.$submitted) && forms.config.monthDay.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END MONTHDAY -->\n\n						<!-- START HOUR -->\n						<div class="form-group col-md-4" data-ng-if="item.cronType" data-ng-class="{\'has-error\': (forms.config.hour.$touched || forms.config.$submitted) && forms.config.hour.$invalid}">\n							<label class="control-label">{{ \'APPLICATION_HOUR\' | translate }}<span class="required" aria-required="true">*</span></label>\n							<ui-select data-ng-model="rangeExec.hour" name="hour" theme="bootstrap" required>\n								<ui-select-match placeholder="{{ \'APPLICATION_HOUR\' | translate }}">{{$select.selected}}</ui-select-match>\n								<ui-select-choices repeat="hour in hours | filter: $select.search">\n									<div ng-bind-html="hour | highlight: $select.search"></div>\n								</ui-select-choices>\n							</ui-select>\n							<span data-ng-show="(forms.config.hour.$touched || forms.config.$submitted) && forms.config.hour.$error.required" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END HOUR -->\n					</div>\n\n					<!-- START SEND MAIL -->\n					<div class="form-group">\n						<label class="control-label">{{\'APPLICATION_SEND_MAIL\' | translate}}</label></br>\n						<input\n						bs-switch\n						class="form-control"\n						data-ng-model="item.sendMail"\n						type="checkbox"\n						name="status"\n						data-ng-init="item.sendMail = 0"\n						switch-active="{{ switches.isActive }}"\n						switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n						switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n						switch-on-color="{{ switches.onColor }}"\n						switch-off-color="{{ switches.offColor }}"\n						switch-animate="{{ switches.animate }}"\n						switch-size="{{ switches.size }}"\n						switch-label="{{ switches.label }}"\n						switch-icon="{{ switches.icon }}"\n						switch-radio-off="{{ switches.radioOff }}"\n						switch-label-width="{{ switches.labelWidth }}"\n						switch-handle-width="{{ switches.handleWidth }}">\n					</div>\n					<!-- END SEND MAIL -->\n					<div class="row">\n					<!-- START ACCOUNT -->\n					<div class="form-group col-md-6" data-ng-class="{\'has-error\': (forms.config.MailServerOutId.$touched || forms.config.$submitted) && forms.config.MailServerOutId.$invalid}">\n						<label class="control-label">{{ \'APPLICATION_ACCOUNT\' | translate }}<span class="required" data-ng-if="item.sendMail" aria-required="true">*</span></label>\n						<ui-select data-ng-model="item.MailServerOutId" name="MailServerOutId" theme="bootstrap" data-ng-disabled="!item.sendMail" data-ng-required="item.sendMail">\n							<ui-select-match placeholder="{{ \'APPLICATION_ACCOUNT\' | translate }}">{{$select.selected.username}}</ui-select-match>\n							<ui-select-choices repeat="account.id as account in mailServers | filter: $select.search">\n								<div ng-bind-html="account.username | highlight: $select.search"></div>\n							</ui-select-choices>\n						</ui-select>\n						<span data-ng-show="(forms.config.MailServerOutId.$touched || forms.config.$submitted) && forms.config.MailServerOutId.$error.required" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n						<div class="note note-warning" data-ng-hide="mailServers.length">\n							<h4 class="block">Warning!</h4>\n							<p>\n								{{ \'MESSAGE_NO_ACCOUNTS_AVAILABLE\' | translate }}\n							</p>\n						</div>\n					</div>\n					<!-- END ACCOUNT -->\n\n					<!-- START EMAIL -->\n					<div class="form-group col-md-6" data-ng-class="{\'has-error\': (forms.config.$submitted && forms.config.email.$invalid) || forms.config.email.$error.pattern}">\n						<label class="control-label">{{\'APPLICATION_EMAIL_ADDRESS\' | translate}}<span data-ng-if="item.sendMail" class="required" aria-required="true">*</span></label>\n						<input type="email" name="email" placeholder="{{\'APPLICATION_EMAIL_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.email" required data-ng-disabled="!item.sendMail" data-ng-required="item.sendMail"/>\n						<span data-ng-show="forms.config.$submitted && forms.config.email.$invalid" class="help-block help-block-error">\n							<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n						</span>\n					</div>\n					<!-- END EMAIL -->\n				</div>\n\n						<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n						<button class="btn green-haze" type="submit" ng-click="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n					</form>\n				</wz-step>\n\n				<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n					<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n					<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n					<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n				</wz-step>\n			</wizard>\n		</div>\n	</div>\n	<!-- END PORTLET-->\n</div>\n<!-- <pre>\n	{{rangeExec | json}}\n</pre>\n<pre>\n	{{item | json}}\n</pre> -->\n'),
+a.put("app/tools/sound/list/list.html",'<div class="page-bar">\n  <ul class="page-breadcrumb">\n    <li>\n      <i class="icon-rocket"></i>\n      <a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n      <i class="fa fa-angle-right"></i>\n    </li>\n    <li>\n      <i class="icon-music-tone-alt"></i>\n      <a href="#">{{ \'APPLICATION_SOUNDS\' | translate }}</a>\n    </li>\n  </ul>\n  <div class="page-toolbar">\n  </div>\n</div>\n<!-- END PAGE HEADER-->\n<!-- BEGIN PAGE CONTENT-->\n<!-- Audio Portlets -->\n<div class="headline">\n  <h3><i class="icon-music-tone-alt sounds-title-icon"></i> {{ \'APPLICATION_SOUNDS\' | translate }}</h3>\n</div>\n<div class="portlet light bg-inverse">\n  <div class="portlet-title collapsible" ng-click="isCollapsed = !isCollapsed">\n    <div class="caption">\n      <i class="icon-puzzle font-red-flamingo"></i>\n      <span class="caption-subject bold font-red-flamingo uppercase">\n      {{\'APPLICATION_FILE_UPLOAD\' | translate}} </span>\n    </div>\n    <div class="tools">\n      <a href="" ng-class="{\'collapse\': !isCollapsed, \'expand\' : isCollapsed}">\n      </a>\n    </div>\n  </div>\n  <div class="portlet-body" ng-slide-down="!isCollapsed">\n    <div class="row" nv-file-drop="" uploader="uploader" filters="queueLimit, customFilter">\n    	<div class="col-md-4">\n    		<div class="portlet light bordered">\n    			<div class="portlet-title">\n    				<div class="caption font-green-sharp">\n    					<i class="icon-settings font-green-sharp"></i>\n    					<span class="caption-subject bold uppercase">{{\'APPLICATION_SELECT_FILES\' | translate}}</span>\n    					<span class="caption-helper hide"></span>\n    				</div>\n    				<div class="actions">\n    				</div>\n    			</div>\n    			<div class="portlet-body">\n    				<div ng-show="uploader.isHTML5">\n    					<div class="file-drop-zone margin-bottom-20" nv-file-over="" uploader="uploader" over-class="file-drop-zone-over">\n    						Base drop zone\n    					</div>\n    				</div>\n    				<span class="btn default btn-file">\n    				<span class="fileinput-new">\n    				{{\'APPLICATION_FILE_UPLOAD\' | translate}}</span>\n    				<input type="file" nv-file-select="" uploader="uploader" />\n    				</span>\n    				<span class="btn default btn-file">\n    				<span class="fileinput-new">\n    				{{\'APPLICATION_MULTI_FILE_UPLOAD\' | translate}}</span>\n    				<input type="file" nv-file-select="" uploader="uploader" multiple  /><br/>\n          </span>\n          <p>\n            </br>\n            {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} <b>wav, mp3, gsm, ogg</b>.\n          </p>\n          <p>\n            {{ \'MESSAGE_MAXIMUM_SOUND_UPLOAD_SIZE\' | translate }} <b>15 Mb</b>.\n          </p>\n    			</div>\n    		</div>\n    	</div>\n    	<div class="col-md-8">\n    		<div class="portlet light bordered">\n    			<div class="portlet-title">\n    				<div class="caption font-green-sharp">\n    					<i class="icon-settings font-green-sharp"></i>\n    					<span class="caption-subject bold uppercase">{{\'APPLICATION_UPLOAD_QUEUE\' | translate}}</span>\n    					<span class="caption-helper">{{\'APPLICATION_QUEUE_LENGTH\' | translate}}: {{ uploader.queue.length }}</span>\n    				</div>\n    				<div class="actions">\n    				</div>\n    			</div>\n    			<div class="portlet-body">\n    				<div class="table-scrollable table-scrollable-borderless">\n    					<table class="table table-hover table-light">\n    						<thead>\n    							<tr class="uppercase">\n    								<th width="50%">{{\'APPLICATION_NAME\' | translate}}</th>\n    								<th ng-show="uploader.isHTML5">{{\'APPLICATION_SIZE\' | translate}}</th>\n    								<th ng-show="uploader.isHTML5">{{\'APPLICATION_PROGRESS\' | translate}}</th>\n    								<th>{{\'APPLICATION_STATUS\' | translate}}</th>\n    								<th>{{\'APPLICATION_MESSAGE\' | translate}}</th>\n    								<th>{{\'APPLICATION_ACTIONS\' | translate}}</th>\n    							</tr>\n    						</thead>\n    						<tbody>\n    							<tr ng-repeat="item in uploader.queue">\n    								<td><strong>{{ item.file.name }}</strong></td>\n    								<td ng-show="uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB</td>\n    								<td ng-show="uploader.isHTML5">\n    									<div class="progress progress-sm" style="margin-bottom: 0;">\n    										<div class="progress-bar progress-bar-info" role="progressbar" ng-style="{ \'width\': item.progress + \'%\' }"></div>\n    									</div>\n    								</td>\n    								<td class="text-center">\n    									<span ng-show="item.isSuccess" class="text-success"><i class="glyphicon glyphicon-ok"></i></span>\n    									<span ng-show="item.isCancel" class="text-info"><i class="glyphicon glyphicon-ban-circle"></i></span>\n    									<span ng-show="item.isError" class="text-danger"><i class="glyphicon glyphicon-remove"></i></span>\n    									<span ng-show="item.isUploading" class="text-info"><i class="glyphicon glyphicon-upload"></i></span>\n    								</td>\n    								<td class="text-center">\n    									<span ng-show="item.responseMessage" class="text-danger">{{item.responseMessage}}</span>\n    								</td>\n    								<td nowrap>\n    									<button type="button" class="btn btn-success btn-xs" ng-click="item.upload()" ng-disabled="item.isReady || item.isUploading || item.isSuccess">\n    									<span class="glyphicon glyphicon-upload"></span> {{\'APPLICATION_UPLOAD\' | translate}}\n    									</button>\n    									<button type="button" class="btn btn-warning btn-xs" ng-click="item.cancel()" ng-disabled="!item.isUploading">\n    									<span class="glyphicon glyphicon-ban-circle"></span> {{\'APPLICATION_CANCEL\' | translate}}\n    									</button>\n    									<button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">\n    									<span class="glyphicon glyphicon-trash"></span> {{\'APPLICATION_REMOVE\' | translate}}\n    									</button>\n    								</td>\n    							</tr>\n    						</tbody>\n    					</table>\n    				</div>\n    				<div>\n    					<p>{{\'APPLICATION_UPLOAD_QUEUE_PROGRESS\' | translate}}:</p>\n    					<div class="progress progress-sm" style="">\n    						<div class="progress-bar progress-bar-info" role="progressbar" ng-style="{ \'width\': uploader.progress + \'%\' }"></div>\n    					</div>\n    				</div>\n    				<button type="button" class="btn btn-success btn-s" ng-click="uploader.uploadAll()" ng-disabled="!uploader.getNotUploadedItems().length">\n    				<span class="glyphicon glyphicon-upload"></span> {{\'APPLICATION_UPLOAD_ALL\' | translate}}\n    				</button>\n    				<button type="button" class="btn btn-warning btn-s" ng-click="uploader.cancelAll()" ng-disabled="!uploader.isUploading">\n    				<span class="glyphicon glyphicon-ban-circle"></span> {{\'APPLICATION_CANCEL_ALL\' | translate}}\n    				</button>\n    				<button type="button" class="btn btn-danger btn-s" ng-click="uploader.clearQueue()" ng-disabled="!uploader.queue.length">\n    				<span class="glyphicon glyphicon-trash"></span> {{\'APPLICATION_REMOVE_ALL\' | translate}}\n    				</button>\n    			</div>\n    		</div>\n    	</div>\n    </div>\n  </div>\n</div>\n<div class="row thumbnails" data-ng-init="initList()">\n  <div class="row" ng-show="sounds.length == 0">\n    <div class="col-md-12 page-404">\n      <div class="details">\n        <h3>{{ \'MESSAGE_NO_SOUNDS\' | translate }}</h3>\n        <p>\n          <a href="/">\n          {{ \'MESSAGE_RETURN_HOME\' | translate }} </a>\n          {{ \'MESSAGE_OR_UPLOAD_SOUND_FILE\' | translate }}\n        </p>\n      </div>\n    </div>\n  </div>\n  <div class="audio-portlet-wrapper animate-repeat" ng-repeat="sound in sounds">\n    <div class="audio-portlet">\n      <div class="audio-portlet-title"><a href="#" editable-text="sound.display_name" onbeforesave="updateAudio(sound.id,{display_name : $data})">{{ sound.display_name || "Empty" }}</a></div>\n      <img src="../assets/images/note_placeholder.png" alt="" class="img-responsive"/>\n      <div class="file-info">\n        <div class="audio-tag-wrapper">\n          <audio-file-download params="{id:sound.id,controller:\'stream\'}" resource="Sound"></audio-file-download>\n        </div>\n        <p id="description_div">\n          <a href="#" editable-text="sound.description" onbeforesave="updateAudio(sound.id,{description : $data})">{{ sound.description || "Empty" }}</a>\n        </p>\n        <p class="float-right">\n            <button class="btn btn-xs green-meadow" uib-tooltip-template="\'audioInfoTemplate.html\'"><i class="icon-list"></i></button>\n            <motion-file-download  params="{id:sound.id,controller:\'download\'}" resource="Sound" mimetype="\'audio/\'+sound.original_format" tooltiptext="Download" filename="sound.display_name+\'.\'+sound.original_format" btnclass="{{downloadButtonClass}}" btncontent=\'{{downloadButtonContent}}\'></motion-file-download>\n            <button uib-tooltip="Delete" class="btn btn-xs red-sunglo" ng-click="delete(sound.display_name, sound.id)" tooltip="Delete"><i class="icon-close" ></i></button>\n        </p>\n      </div>\n    </div>\n  </div>\n  <script type="text/ng-template" id="audioInfoTemplate.html">\n    <div>\n      <ul class="list-unstyled">\n        <li><b>Format : </b>{{sound.original_format}}</li>\n        <li><b>Duration : </b>{{sound.original_duration | date: \'mm:ss\'}}</li>\n        <li><b>Channels : </b>{{sound.original_channelCount}}</li>\n        <li><b>Bitrate : </b>{{sound.original_bitRate/1024}} kbs</li>\n        <li><b>Sample Rate : </b>{{sound.original_sampleRate/1000}} KHz</li>\n      </ul>\n    </div>\n  </script>\n</div>\n<!-- End Audio Portlets -->\n'),a.put("app/tools/tag/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_TAG\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required data-ng-pattern="settings.patternName"/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.pattern" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/tag/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-tag"></i>\n					<a href="#">{{ \'APPLICATION_TAGS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_TAGS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_TAG\' | translate }}\n						</button>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/tag/view/view.chat.html",'<div class="row" >\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_TAGGED_CHAT\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body" data-ng-if="tag" data-ng-init="initChat()">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="spinner-grid" spinner-start-active="false"></span>\n				<!-- END UI-GRID SPINNER -->\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/tag/view/view.contacts.html",'<div class="row" >\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_TAGGED_CONTACTS\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body" data-ng-if="tag" data-ng-init="initContacts()">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="spinner-grid" spinner-start-active="false"></span>\n				<!-- END UI-GRID SPINNER -->\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions" data-ng-if="readyGrid && gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/tag/view/view.fax.html",'<div class="row" >\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_TAGGED_FAX\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body" data-ng-if="tag" data-ng-init="initFax()">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="spinner-grid" spinner-start-active="false"></span>\n				<!-- END UI-GRID SPINNER -->\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/tag/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getTag()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-tag"></i>\n					<a href="/tools/tags/list">{{ \'APPLICATION_TAGS\' | translate }}</a>\n					<i data-ng-show="tag" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="tag">\n					<a href="#">{{tag.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/tag.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{tag.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.tags.view.settings\')}">\n							<a data-ng-href="/tools/tags/view/{{tag.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.tools.tags.view.chat\')}">\n							<a data-ng-href="{{license.chat ? \'/tools/tags/view/\'+tag.id+\'/chat\' : \'#\'}}" data-ng-class="{\'disabled-link\':!license.chat}">\n							<i class="icon-bubble"></i>\n							{{ \'APPLICATION_CHAT\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.tools.tags.view.mail\')}">\n							<a data-ng-href="{{license.mail ? \'/tools/tags/view/\'+tag.id+\'/mail\' : \'#\'}}" data-ng-class="{\'disabled-link\':!license.mail}">\n							<i class="icon-envelope"></i>\n							{{ \'APPLICATION_MAIL\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.tools.tags.view.fax\')}">\n							<a data-ng-href="{{license.fax ? \'/tools/tags/view/\'+tag.id+\'/fax\' : \'#\'}}" data-ng-class="{\'disabled-link\':!license.fax}">\n							<i class="fa fa-fax"></i>\n							{{ \'APPLICATION_FAX\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.tools.tags.view.sms\')}" >\n							<a data-ng-href="{{license.messaging ? \'/tools/tags/view/\'+tag.id+\'/sms\' : \'#\'}}" data-ng-class="{\'disabled-link\':!license.messaging}">\n							<i class="glyphicon glyphicon-comment"></i>\n							{{ \'APPLICATION_SMS\' | translate}} </a>\n						</li>\n						<li data-ng-class="{active: $state.is(\'main.tools.tags.view.contacts\')}">\n							<a data-ng-href="{{license.cm ? \'/tools/tags/view/\'+tag.id+\'/contacts\' : \'#\'}}" data-ng-class="{\'disabled-link\':!license.cm}">\n							<i class="fa fa-users"></i>\n							{{ \'APPLICATION_CONTACTS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/tag/view/view.mail.html",'<div class="row" >\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_TAGGED_MAIL\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body" data-ng-if="tag" data-ng-init="initMail()">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="spinner-grid" spinner-start-active="false"></span>\n				<!-- END UI-GRID SPINNER -->\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/tag/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_TAG\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<!-- BEGIN UI-GRID SPINNER -->\n				<span us-spinner spinner-key="spinner-grid" spinner-start-active="false"></span>\n				<!-- END UI-GRID SPINNER -->\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateTag()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="tag.name" required data-ng-pattern="settings.patternName"/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.pattern" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="tag.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/tag/view/view.sms.html",'<div class="row" >\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_TAGGED_SMS\' | translate}}</span>\n				</div>\n			</div>\n\n			<div class="portlet-body" data-ng-if="tag" data-ng-init="initSms()">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/template/list/list.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="#">{{ \'APPLICATION_TEMPLATES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n	</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-wrench font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_TEMPLATES\' | translate }}</span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/tools/templates/wizard">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_TEMPLATE\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/template/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initItem()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/tools/templates/list">{{ \'APPLICATION_TEMPLATES\' | translate }}</a>\n					<i data-ng-show="item" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="item">\n					<a href="#">{{item.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/template.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{item.name}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.templates.view.settings\')}">\n							<a data-ng-href="/tools/templates/view/{{item.id}}/settings">\n								<i class="icon-settings"></i>\n								{{ \'APPLICATION_SETTINGS\' | translate}}\n							</a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/template/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n\n				<form name="form" data-ng-submit="form.$valid && updateItem()" class="form-horizontal" novalidate>\n					<!-- START NAME -->\n					<div class="form-group" data-ng-class="{\'has-error\': form.name.$invalid && form.$submitted}">\n						<div class="col-md-12">\n							<div class="row">\n								<div class="col-md-2">\n									<label class="control-label">{{\'APPLICATION_NAME\' | translate}}:<span class="required" aria-required="true">*</span></label>\n								</div>\n								<div class="col-md-10">\n									<input type="text" name="name" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_NAME\' | translate}}..." data-ng-model="item.name" required>\n									<span data-ng-show="form.name.$invalid && form.$submitted" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n						</div>\n					</div>\n					<!-- END NAME -->\n\n					<!-- START DESCRIPTION -->\n					<div class="form-group" data-ng-class="{\'has-error\': form.description.$invalid && form.$submitted}">\n						<div class="col-md-12">\n							<div class="row">\n								<div class="col-md-2">\n									<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}:</label>\n								</div>\n								<div class="col-md-10">\n									<input type="text" name="description" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}..." rows="8" data-ng-model="item.description">\n									<span data-ng-show="form.description.$invalid && form.$submitted" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n						</div>\n					</div>\n					<!-- END NAME -->\n\n					<hr>\n\n					<!-- START SUBJECT -->\n					<div class="form-group row" data-ng-class="{\'has-error\': form.subject.$invalid && form.$submitted}">\n						<div class="col-md-12">\n							<div class="row">\n								<div class="col-md-2">\n									<label class="control-label">{{\'APPLICATION_SUBJECT\' | translate}}:</label>\n								</div>\n								<div class="col-md-10">\n									<input type="text" name="subject" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_SUBJECT\' | translate}}..." rows="8" data-ng-model="item.subject">\n									<span data-ng-show="form.subject.$invalid && form.$submitted" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n						</div>\n					</div>\n					<!-- END SUJBECT -->\n\n					<!-- START HTML -->\n					<div class="form-group row" data-ng-class="{\'has-error\': form.text.$invalid && form.$submitted}">\n						<div class="col-md-12">\n							<div ckeditor="options" ng-model="item.html"></div>\n							<span data-ng-show="form.text.$invalid && form.$submitted" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n					</div>\n					<!-- END HTML -->\n\n					<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n				</form>\n			</div>\n		</div>\n	</div>\n</div>\n'),
+a.put("app/tools/template/wizard/wizard.html",'<div class="row">\n	<div class="col-md-12">\n	  <!-- BEGIN PAGE HEADER-->\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-docs"></i>\n					<a href="/tools/templates/list">{{ \'APPLICATION_TEMPLATES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n	  <!-- END PAGE HEADER-->\n\n	  <!-- BEGIN PORTLET-->\n	  <div class="portlet light bordered" data-ng-init="initWizard()">\n	  	<div class="portlet-title">\n	  		<div class="caption font-green-sharp">\n	  			<i class="icon-docs font-green-sharp"></i>\n	  			<span class="caption-subject">{{ \'APPLICATION_TEMPLATES\' | translate }} FORM</a> </span>\n	  		</div>\n	  	</div>\n	  	<div class="portlet-body">\n				<form name="form" data-ng-submit="form.$valid && createItem()" class="form-horizontal" novalidate>\n					<!-- START HEAD -->\n					<div class="form">\n						<!-- START NAME -->\n						<div class="form-group" data-ng-class="{\'has-error\': form.name.$invalid && form.$submitted}">\n							<div class="col-md-12">\n								<div class="row">\n									<div class="col-md-1">\n										<label class="control-label">{{\'APPLICATION_NAME\' | translate}}:<span class="required" aria-required="true">*</span></label>\n									</div>\n									<div class="col-md-11">\n										<input type="text" name="name" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_NAME\' | translate}}..." data-ng-model="item.name" required>\n										<span data-ng-show="form.name.$invalid && form.$submitted" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n							</div>\n						</div>\n						<!-- END NAME -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group" data-ng-class="{\'has-error\': form.description.$invalid && form.$submitted}">\n							<div class="col-md-12">\n								<div class="row">\n									<div class="col-md-1">\n										<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}:</label>\n									</div>\n									<div class="col-md-11">\n										<input type="text" name="description" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}..." rows="8" data-ng-model="item.description">\n										<span data-ng-show="form.description.$invalid && form.$submitted" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n							</div>\n						</div>\n						<!-- END NAME -->\n\n						<!-- START SUBJECT -->\n						<div class="form-group" data-ng-class="{\'has-error\': form.subject.$invalid && form.$submitted}">\n							<div class="col-md-12">\n								<div class="row">\n									<div class="col-md-1">\n										<label class="control-label">{{\'APPLICATION_SUBJECT\' | translate}}:</label>\n									</div>\n									<div class="col-md-11">\n										<input type="text" name="subject" class="form-control todo-taskbody-taskdesc" placeholder="{{\'APPLICATION_SUBJECT\' | translate}}..." rows="8" data-ng-model="item.subject">\n										<span data-ng-show="form.subject.$invalid && form.$submitted" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n								</div>\n							</div>\n						</div>\n						<!-- END SUJBECT -->\n\n						<!-- START HTML -->\n						<div class="form-group row" data-ng-class="{\'has-error\': form.text.$invalid && form.$submitted}">\n							<div class="col-md-12">\n								<div ckeditor="options" ng-model="item.html"></div>\n									<span data-ng-show="form.text.$invalid && form.$submitted" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n							</div>\n						</div>\n						<!-- END HTML -->\n\n					</div>\n					<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="goNext()"/>\n				</form>\n	  	</div>\n	  </div>\n	  <!-- END PORTLET-->\n	</div>\n</div>\n'),a.put("app/tools/trigger/list/list.html",'<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-wrench"></i>\n						<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-bulb"></i>\n						<a href="#">{{ \'APPLICATION_TRIGGERS\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-bulb font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_TRIGGERS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle " href="/tools/triggers/wizard">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_TRIGGER\' | translate }}\n						</a>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/trigger/view/view.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row" data-ng-init="initView();">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-bulb"></i>\n					<a href="/tools/triggers/list">{{ \'APPLICATION_TRIGGERS\' | translate }}</a>\n					<i class="fa fa-angle-right" data-ng-show="trigger"></i>\n				</li>\n				<li data-ng-show="trigger">\n					<a href="#">{{ trigger.description || trigger.name }}</a>\n				</li>\n			</ul>\n		</div>\n\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/trigger.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{ trigger.name }}\n					</div>\n					<div class="profile-usertitle-job">\n						{{ trigger.description }}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.triggers.view.settings\')}">\n							<a href="/tools/triggers/view/{{trigger.id}}/settings">\n							<i class="icon-bulb"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate }} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/trigger/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_SETTINGS\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_CONDITIONS\' | translate}} & {{\'APPLICATION_ACTIONS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<form name="forms.general" data-ng-submit="exitValidation(forms.general.$valid) && updateTrigger()" novalidate>\n					<div class="tab-content">\n						<!-- GENERAL TAB -->\n						<div class="tab-pane active" id="tab_1_1">\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="trigger.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START CHANNEL -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.channel.$touched || forms.general.$submitted) && forms.general.channel.$invalid}">\n								<label class="control-label">{{\'APPLICATION_CHANNEL\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="channel" placeholder="{{\'APPLICATION_CHANNEL\' | translate}}" class="form-control" data-ng-model="trigger.channel" required readonly/>\n								<span data-ng-show="(forms.general.channel.$touched || forms.general.$submitted) && forms.general.channel.$invalid && forms.general.channel.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END CHANNEL -->\n\n							<!-- START STATUS -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_STATUS\' | translate}}</label>\n							</br>\n							<input bs-switch class="form-control" ng-model="trigger.status" type="checkbox" name="status" switch-active="{{ recordSwitch.isActive }}" switch-on-text="{{ recordSwitch.onText }}" switch-off-text="{{ recordSwitch.offText }}" switch-on-color="{{ recordSwitch.onColor }}"\n							switch-off-color="{{ recordSwitch.offColor }}" switch-animate="{{ recordSwitch.animate }}" switch-size="{{ recordSwitch.size }}" switch-label="{{ recordSwitch.label }}" switch-icon="{{ recordSwitch.icon }}" switch-radio-off="{{ recordSwitch.radioOff }}"\n							switch-label-width="{{ recordSwitch.labelWidth }}" switch-handle-width="{{ recordSwitch.handleWidth }}">\n						</div>\n						<!-- END STATUS -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n							<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="trigger.description" />\n						</div>\n						<!-- END DESCRIPTION -->\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}" />\n					</div>\n					<!-- END GENERAL TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ALL_CONDITIONS\' | translate"></span>:\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="portlet light bordered" ng-repeat="all in trigger.All">\n									<div class="portlet-title">\n										<div class="caption font-blue-hoki">\n											<span class="caption-subject">{{ \'APPLICATION_ALL\' | translate }} #{{$index+1}}</span>\n										</div>\n										<div class="actions">\n											<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeCondition(\'All\',$index)"><i class="fa fa-trash"></i></a>\n										</div>\n									</div>\n									<div class="portlet-body">\n										<div class="padding-bottom row">\n											<div class="col-md-12">\n												<condition-builder element="all" serviceindex="trigger.channel" service="$triggers" form="forms.general"></condition-builder>\n											</div>\n										</div>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-12">\n										<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'All\')">\n											<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n										</button>\n									</div>\n								</div>\n							</div>\n						</div>\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ANY_CONDITIONS\' | translate"></span>:\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="portlet light bordered" ng-repeat="any in trigger.Any">\n									<div class="portlet-title">\n										<div class="caption font-blue-hoki">\n											<span class="caption-subject">{{ \'APPLICATION_ANY\' | translate }} #{{$index+1}}</span>\n										</div>\n										<div class="actions">\n											<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeCondition(\'Any\',$index)"><i class="fa fa-trash"></i></a>\n										</div>\n									</div>\n									<div class="portlet-body">\n										<div class="padding-bottom row">\n											<div class="col-md-12">\n												<condition-builder element="any" serviceindex="trigger.channel" service="$triggers" form="forms.general"></condition-builder>\n											</div>\n										</div>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-12">\n										<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'Any\')">\n											<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n										</button>\n									</div>\n								</div>\n							</div>\n						</div>\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }}</span>:\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="portlet light bordered" ng-repeat="action in trigger.Actions">\n									<div class="portlet-title">\n										<div class="caption font-blue-hoki">\n											<span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }} #{{$index+1}}</span>\n										</div>\n										<div class="actions">\n											<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeAction($index)"><i class="fa fa-trash"></i></a>\n										</div>\n									</div>\n									<div class="portlet-body">\n										<div class="padding-bottom row">\n											<div class="col-md-12">\n												<div class="form-group col-md-6" data-ng-class="{\'has-error\': (forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$invalid}">\n													<ui-select data-ng-model="action.action" theme="bootstrap" name="action{{$index}}" data-ng-change="resetActionData(action)" required>\n														<ui-select-match placeholder="{{ \'APPLICATION_ACTION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n														<ui-select-choices repeat="tAction.value as tAction in $triggers.services[trigger.channel].actions | filter: $select.search">\n															<div ng-bind-html="tAction.name | translate | highlight: $select.search"></div>\n														</ui-select-choices>\n													</ui-select>\n													<span data-ng-show="(forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$error.required" class="help-block help-block-error">\n														<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n													</span>\n												</div>\n												<div ng-switch="action.action">\n													<action-builder-template ng-switch-when="template" element="action" form="forms.general"></action-builder-template>\n													<action-builder-account-template ng-switch-when="accountTemplate" element="action" form="forms.general"></action-builder-account-template>\n													<action-builder-integration ng-switch-when="integration" element="action" form="forms.general"></action-builder-integration>\n													<action-builder-motion-bar ng-switch-when="motionbar" element="action" form="forms.general"></action-builder-motion-bar>\n													<action-builder-jscripty ng-switch-when="jscripty" element="action" form="forms.general"></action-builder-jscripty>\n													<action-builder-url-forward ng-switch-when="urlForward" element="action" form="forms.general"></action-builder-url-forward>\n													<action-builder-close ng-switch-when="close" element="action" form="forms.general"></action-builder-close>\n													<action-builder-forward ng-switch-when="forward" element="action" form="forms.general"></action-builder-forward>\n													<action-builder-tag ng-switch-when="tag" element="action" form="forms.general"></action-builder-tag>\n													<action-builder-http ng-switch-when="http" element="action" form="forms.general"></action-builder-http>\n													<action-builder-email ng-switch-when="email" element="action" form="forms.general"></action-builder-email>\n													<action-builder-account-email ng-switch-when="accountEmail" element="action" form="forms.general"></action-builder-account-email>\n													<action-builder-account-sms ng-switch-when="accountSms" element="action" form="forms.general"></action-builder-account-sms>\n												</div>\n											</div>\n										</div>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-12">\n										<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addAction()">\n											<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_ACTION\' | translate}}\n										</button>\n									</div>\n								</div>\n							</div>\n						</div>\n						<div class="has-error" data-ng-show="forms.general.$submitted && !trigger.All.length && !trigger.Any.length">\n							<span class="help-block help-block-error form-control">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_CONDITION\' | translate}}.\n							</span>\n						</div>\n						<div class="has-error" data-ng-show="forms.general.$submitted && !trigger.Actions.length">\n							<span class="help-block help-block-error form-control">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_ACTION\' | translate}}.\n							</span>\n						</div>\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}" />\n					</div>\n				</div>\n			</form>\n		</div>\n	</div>\n</div>\n</div>\n'),a.put("app/tools/trigger/wizard/wizard.html",'<div class="row">\n	<div class="col-md-12">\n		<!-- BEGIN PAGE HEADER-->\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-bulb"></i>\n					<a href="/tools/triggers/list">{{ \'APPLICATION_TRIGGERS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n		<!-- END PAGE HEADER-->\n\n		<!-- BEGIN  PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-bulb font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_TRIGGERS\' | translate }} WIZARD</span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n					<wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(forms.general.$valid)">\n						<form name="forms.general" novalidate>\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START STATUS -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_STATUS\' | translate}}</label>\n							</br>\n							<input bs-switch class="form-control" ng-model="item.status" type="checkbox" name="status" data-ng-init="item.status = 0" switch-active="{{ statusSwitch.isActive }}" switch-on-text="{{ statusSwitch.onText }}" switch-off-text="{{ statusSwitch.offText }}"\n							switch-on-color="{{ statusSwitch.onColor }}" switch-off-color="{{ statusSwitch.offColor }}" switch-animate="{{ statusSwitch.animate }}" switch-size="{{ statusSwitch.size }}" switch-label="{{ statusSwitch.label }}" switch-icon="{{ statusSwitch.icon }}"\n							switch-radio-off="{{ statusSwitch.radioOff }}" switch-label-width="{{ statusSwitch.labelWidth }}" switch-handle-width="{{ statusSwitch.handleWidth }}">\n						</div>\n						<!-- END STATUS -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n							<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description" />\n						</div>\n						<!-- END DESCRIPTION -->\n\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()" />\n					</form>\n				</wz-step>\n				<wz-step title="{{\'APPLICATION_SETTINGS\' | translate}}" canexit="exitSettingsValidation(forms.settings.$valid)">\n					<form name="forms.settings" novalidate>\n\n						<!-- Channel -->\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject">{{ \'APPLICATION_CHANNEL\' | translate }}</span>\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="form-group" data-ng-class="{\'has-error\': (forms.settings.channel.$touched || forms.settings.$submitted) && forms.settings.channel.$invalid}">\n									<label class="control-label">{{ \'APPLICATION_CHANNEL\' | translate }}<span class="required" aria-required="true">*</span></label>\n									<ui-select data-ng-model="item.channel" name="channel" theme="bootstrap" required>\n										<ui-select-match placeholder="{{ \'APPLICATION_CHANNEL\' | translate }}">{{$select.selected | capitalize}}</ui-select-match>\n										<ui-select-choices repeat="channel in $triggers.channels | filter: $select.search">\n											<div ng-bind-html="channel | highlight: $select.search | capitalize"></div>\n										</ui-select-choices>\n									</ui-select>\n									<span data-ng-show="(forms.settings.channel.$touched || forms.settings.$submitted) && forms.settings.channel.$error.required" class="help-block help-block-error">\n										<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n									</span>\n								</div>\n							</div>\n						</div>\n\n						<!-- All -->\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ALL_CONDITIONS\' | translate"></span>:\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="portlet light bordered" ng-repeat="all in item.All">\n									<div class="portlet-title">\n										<div class="caption font-blue-hoki">\n											<span class="caption-subject">{{ \'APPLICATION_ALL\' | translate }} #{{$index+1}}</span>\n										</div>\n										<div class="actions">\n											<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeCondition(\'All\',$index)"><i class="fa fa-trash"></i></a>\n										</div>\n									</div>\n									<div class="portlet-body">\n										<div class="padding-bottom row">\n											<div class="col-md-12">\n												<condition-builder element="all" serviceindex="item.channel" service="$triggers" form="forms.general"></condition-builder>\n											</div>\n										</div>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-12">\n										<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'All\')">\n											<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n										</button>\n									</div>\n								</div>\n							</div>\n						</div>\n\n						<!-- Any -->\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject" ng-bind-html="\'APPLICATION_MEET_ANY_CONDITIONS\' | translate"></span>:\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="portlet light bordered" ng-repeat="any in item.Any">\n									<div class="portlet-title">\n										<div class="caption font-blue-hoki">\n											<span class="caption-subject">{{ \'APPLICATION_ANY\' | translate }} #{{$index+1}}</span>\n										</div>\n										<div class="actions">\n											<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeCondition(\'Any\',$index)"><i class="fa fa-trash"></i></a>\n										</div>\n									</div>\n									<div class="portlet-body">\n										<div class="padding-bottom row">\n											<div class="col-md-12">\n												<condition-builder element="any" serviceindex="item.channel" service="$triggers" form="forms.general"></condition-builder>\n											</div>\n										</div>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-12">\n										<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addCondition(\'Any\')">\n											<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_CONDITION\' | translate}}\n										</button>\n									</div>\n								</div>\n							</div>\n						</div>\n\n						<!-- Actions -->\n						<div class="portlet light bordered">\n							<div class="portlet-title">\n								<div class="caption font-blue-hoki">\n									<i class="icon-tag font-blue-hoki"></i>\n									<span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }}</span>:\n								</div>\n							</div>\n							<div class="portlet-body">\n								<div class="portlet light bordered" ng-repeat="action in item.Actions">\n									<div class="portlet-title">\n										<div class="caption font-blue-hoki">\n											<span class="caption-subject">{{ \'APPLICATION_ACTIONS\' | translate }} #{{$index+1}}</span>\n										</div>\n										<div class="actions">\n											<a href="#" class="btn red-sunglo btn-icon-only" ng-click="removeAction($index)"><i class="fa fa-trash"></i></a>\n										</div>\n									</div>\n									<div class="portlet-body">\n										<div class="padding-bottom row">\n											<!-- <div class="col-md-12"> -->\n												<div class="form-group col-md-6" data-ng-class="{\'has-error\': (forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$invalid}">\n													<ui-select data-ng-model="action.action" theme="bootstrap" data-ng-change="resetActionData(action)" name="action{{$index}}" required>\n														<ui-select-match placeholder="{{ \'APPLICATION_ACTION\' | translate }}">{{$select.selected.name | translate}}</ui-select-match>\n														<ui-select-choices repeat="tAction.value as tAction in $triggers.services[item.channel].actions | filter: $select.search">\n															<div ng-bind-html="tAction.name | translate | highlight: $select.search"></div>\n														</ui-select-choices>\n													</ui-select>\n													<!-- <span class="help-block">\n														{{ \'APPLICATION_ACTION\' | translate }}\n													</span> -->\n													<span data-ng-show="(forms.general[\'action\'+$index].$touched || forms.general.$submitted) && forms.general[\'action\'+$index].$error.required" class="help-block help-block-error">\n														<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n													</span>\n												</div>\n												<div ng-switch="action.action">\n													<action-builder-template ng-switch-when="template" element="action" form="forms.general"></action-builder-template>\n													<action-builder-account-template ng-switch-when="accountTemplate" element="action" form="forms.general"></action-builder-account-template>\n													<action-builder-integration ng-switch-when="integration" element="action" form="forms.general"></action-builder-integration>\n													<action-builder-motion-bar ng-switch-when="motionbar" element="action" form="forms.general"></action-builder-motion-bar>\n													<action-builder-jscripty ng-switch-when="jscripty" element="action" form="forms.general"></action-builder-jscripty>\n													<action-builder-url-forward ng-switch-when="urlForward" element="action" form="forms.general"></action-builder-url-forward>\n													<action-builder-close ng-switch-when="close" element="action" form="forms.general"></action-builder-close>\n													<action-builder-forward ng-switch-when="forward" element="action" form="forms.general"></action-builder-forward>\n													<action-builder-tag ng-switch-when="tag" element="action" form="forms.general"></action-builder-tag>\n													<action-builder-http ng-switch-when="http" element="action" form="forms.general"></action-builder-http>\n													<action-builder-email ng-switch-when="email" element="action" form="forms.general"></action-builder-email>\n													<action-builder-account-email ng-switch-when="accountEmail" element="action" form="forms.general"></action-builder-account-email>\n													<action-builder-account-sms ng-switch-when="accountSms" element="action" form="forms.general"></action-builder-account-sms>\n												</div>\n											<!-- </div> -->\n										</div>\n									</div>\n								</div>\n								<div class="row">\n									<div class="col-md-12">\n										<button type="button" class="btn btn-sm green padding-bottom" data-ng-click="addAction()">\n											<i class="fa fa-plus"></i> {{\'APPLICATION_ADD_ACTION\' | translate}}\n										</button>\n									</div>\n								</div>\n							</div>\n						</div>\n\n						<div class="has-error" data-ng-show="forms.settings.$submitted && !item.All.length && !item.Any.length">\n							<span class="help-block help-block-error form-control">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_CONDITION\' | translate}}.\n							</span>\n						</div>\n						<div class="has-error" data-ng-show="forms.settings.$submitted && !item.Actions.length">\n							<span class="help-block help-block-error form-control">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INSERT_AT_LEAST_ONE_ACTION\' | translate}}.\n							</span>\n						</div>\n						<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n						<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" ng-click="next()" />\n					</form>\n				</wz-step>\n				<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n					<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n					<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n					<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}" />\n				</wz-step>\n			</wizard>\n		</div>\n	</div>\n	<!-- END PORTLET-->\n</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("app/tools/trunk/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-link"></i>\n					<a href="#">{{ \'APPLICATION_TRUNKS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-link font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_TRUNKS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<a class="btn green-jungle" href="/tools/trunks/wizard" data-toggle="dropdown">\n						<i class="icon-plus"></i> {{ \'APPLICATION_NEW_TRUNK\' | translate }}\n					</a>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/trunk/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-link"></i>\n					<a href="/tools/trunks/list">{{ \'APPLICATION_TRUNKS\' | translate }}</a>\n					<i data-ng-show="trunk" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="trunk">\n					<a href="#">{{trunk.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/trunk.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{trunk.name}}\n					</div>\n					<p data-ng-if="trunk.active && trunk.registry && trunk.status">({{trunk.status}})</p>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.trunks.view.settings\')}">\n							<a data-ng-href="/tools/trunks/view/{{trunk.name}}/settings"><i class="icon-settings"></i> {{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/trunk/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_TRUNK\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_ADVANCED\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{ \'APPLICATION_OTHER_FIELDS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body" data-ng-init="getContexts();">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateTrunk()" novalidate>\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="trunk.name" data-ng-pattern="settings.patternName" required readonly/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.pattern" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START ACTIVE -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_ACTIVE\' | translate}}</label></br>\n								<input\n								bs-switch\n								class="form-control"\n								ng-model="trunk.active"\n								type="checkbox"\n								name="auth"\n								switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n								switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n								switch-off-color="{{ activeSwitch.offColor }}"\n								switch-on-color="{{ activeSwitch.onColor }}"\n								switch-animate="{{ activeSwitch.animate }}"\n								switch-size="{{ activeSwitch.size }}"\n								switch-label="{{ activeSwitch.label }}"\n								switch-icon="{{ activeSwitch.icon }}"\n								switch-radio-off="{{ activeSwitch.radioOff }}"\n								switch-label-width="{{ activeSwitch.labelWidth }}"\n								switch-handle-width="{{ activeSwitch.handleWidth }}">\n							</div>\n							<!-- END ACTIVE -->\n							<div class="row">\n\n								<div class="col-md-6">\n\n									<!-- START HOST -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.host.$touched || forms.general.$submitted) && forms.general.host.$invalid}">\n										<label class="control-label">{{\'APPLICATION_HOST\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="trunk.host" required/>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_HOST\' | translate }}\n										</span>\n										<span data-ng-show="(forms.general.host.$touched || forms.general.$submitted) && forms.general.host.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END HOST -->\n\n									<!-- START SECRET -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.secret.$touched || forms.general.$submitted) && forms.general.secret.$invalid}">\n										<label class="control-label">{{\'APPLICATION_SECRET\' | translate}}</label>\n										<input type="password" name="secret" placeholder="{{\'APPLICATION_SECRET\' | translate}}" class="form-control" data-ng-model="trunk.secret">\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_SECRET\' | translate }}\n										</span>\n										<span data-ng-show="(forms.general.secret.$touched || forms.general.$submitted) && forms.general.secret.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END SECRET -->\n\n									<!-- START CONTEXT -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$invalid}">\n										<label class="control-label">{{\'APPLICATION_CONTEXT\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.context" name="context" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected.name}}</ui-select-match>\n											<ui-select-choices repeat="context.name as context in voiceContexts | filter: $select.search">\n												<div ng-bind-html="context.name | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_VOICE_CONTEXT\' | translate }}\n										</span>\n										<span data-ng-show="(forms.general.context.$touched || forms.general.$submitted) && forms.general.context.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END CONTEXT -->\n\n									<!-- START CALLERID -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.callerid.$touched || forms.general.$submitted) && forms.general.callerid.$invalid}">\n										<label class="control-label">{{\'APPLICATION_CALLERID\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<input type="text" name="callerid" pattern=\'^"[a-zA-Z0-9_.-]*" <[a-zA-Z0-9_.-]*>\' placeholder="{{\'APPLICATION_CALLERID\' | translate}}" class="form-control" data-ng-model="trunk.callerid"/>\n										<span class="help-block">\n												{{ \'DESCRIPTION_OUTBOUND_CALLERID\' | translate }} "name" &lt;number&gt;\n											</span>\n										<span data-ng-show="(forms.general.callerid.$touched || forms.general.$submitted) && forms.general.callerid.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END CALLERID -->\n\n									<!-- START TYPE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.type.$touched || forms.general.$submitted) && forms.general.type.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.type" name="type" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'user\',\'peer\',\'friend\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_TYPE\' | translate }}\n										</span>\n										<span data-ng-show="(forms.general.type.$touched || forms.general.$submitted) && forms.general.type.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END TYPE -->\n\n									<!-- START DTMFMODE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.dtmfmode.$touched || forms.general.$submitted) && forms.general.dtmfmode.$invalid}">\n										<label class="control-label">{{\'APPLICATION_DTMFMODE\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.dtmfmode" name="dtmfmode" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'rfc2833\', \'info\', \'shortinfo\', \'inband\',\'auto\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_DTMFMODE\' | translate }}\n										</span>\n										<span data-ng-show="(forms.general.dtmfmode.$touched || forms.general.$submitted) && forms.general.dtmfmode.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END DTMFMODE -->\n\n								</div>\n\n								<div class="col-md-6">\n\n									<!-- START DEFAULT USER -->\n									<div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.defaultuser.$invalid}">\n										<label class="control-label">{{\'APPLICATION_DEFAULT_USER\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<input type="text" name="defaultuser" placeholder="{{\'APPLICATION_DEFAULT_USER\' | translate}}" class="form-control" data-ng-model="trunk.defaultuser" required/>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_DEFAULT_USER\' | translate }}\n										</span>\n										<span data-ng-show="forms.general.$submitted && (forms.general.defaultuser.$invalid)" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END DEFAULT USER -->\n\n									<!-- START NAT -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.nat.$touched || forms.general.$submitted) && forms.general.nat.$invalid}">\n										<label class="control-label">{{\'APPLICATION_NAT\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select multiple data-ng-model="trunk.nat" name="nat" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'yes\', \'no\', \'never\', \'route\', \'force_rport\', \'comedia\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_NAT\' | translate }}\n										</span>\n										<span data-ng-show="(forms.general.nat.$touched || forms.general.$submitted) && forms.general.nat.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END NAT -->\n\n									<!-- START QUALIFY -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.qualify.$touched || forms.general.$submitted) && forms.general.qualify.$invalid}">\n										<label class="control-label">{{\'APPLICATION_QUALIFY\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.qualify" name="qualify" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_QUALIFY\' | translate }}\n										</span>\n										<span data-ng-show="(forms.general.qualify.$touched || forms.general.$submitted) && forms.general.qualify.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END QUALIFY -->\n\n									<!-- START ALLOW -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.allow.$touched || forms.general.$submitted) && forms.general.allow.$invalid}">\n										<label class="control-label">{{\'APPLICATION_ALLOW_CODEC\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select multiple data-ng-model="trunk.allow" name="allow" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'g723\',\'gsm\',\'ulaw\',\'alaw\',\'g726\',\'g722\',\'g729\',\'ilbc\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_ALLOW_CODEC\' | translate }}\n										</span>\n										<span data-ng-show="(forms.general.allow.$touched || forms.general.$submitted) && forms.general.allow.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END ALLOW -->\n\n									<!-- START INSECURE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.insecure.$touched || forms.general.$submitted) && forms.general.insecure.$invalid}">\n										<label class="control-label">{{\'APPLICATION_INSECURE\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select multiple data-ng-model="trunk.insecure" name="insecure" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'port\',\'invite\',\'very\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_INSECURE\' | translate }}\n										</span>\n										<span data-ng-show="(forms.general.insecure.$touched || forms.general.$submitted) && forms.general.insecure.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END INSECURE -->\n\n									<!-- START CALLLIMIT -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.general.call_limit.$touched || forms.general.$submitted) && forms.general.call_limit.$invalid}">\n										<label class="control-label">{{\'APPLICATION_CALLLIMIT\' | translate}}</label>\n										<input type="number" min="0" name="call-limit" placeholder="{{\'APPLICATION_CALLLIMIT\' | translate}}" class="form-control" data-ng-model="trunk.call_limit"/>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_CALLLIMIT\' | translate }}\n										</span>\n									</div>\n									<!-- END CALLLIMIT -->\n\n								</div>\n							</div>\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="trunk.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n					<!-- ADVANCED TAB -->\n					<div class="tab-pane" id="tab_1_2">\n						<form name="forms.advanced" data-ng-submit="forms.advanced.$valid && updateTrunk()" novalidate>\n							<div class="row">\n								<div class="col-md-6">\n\n									<!-- START REGISTRY -->\n									<div class="form-group">\n										<label class="control-label">{{\'APPLICATION_REGISTRY\' | translate}}</label>\n										<input type="text" name="registry" placeholder="{{\'APPLICATION_REGISTRY\' | translate}}" class="form-control" data-ng-model="trunk.registry"/>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_REGISTRY\' | translate }}\n										</span>\n									</div>\n									<!-- END REGISTRY -->\n\n									<!-- START DIRECTMEDIA -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.directmedia.$touched || forms.advanced.$submitted) && forms.advanced.directmedia.$invalid}">\n										<label class="control-label">{{\'APPLICATION_DIRECTMEDIA\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.directmedia" name="directmedia" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'yes\', \'no\', \'nonat\', \'update\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_DIRECTMEDIA\' | translate }}\n										</span>\n										<span data-ng-show="(forms.advanced.directmedia.$touched || forms.advanced.$submitted) && forms.advanced.directmedia.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END DIRECTMEDIA -->\n\n									<!-- START CALLCOUNTER -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.callcounter.$touched || forms.advanced.$submitted) && forms.advanced.callcounter.$invalid}">\n										<label class="control-label">{{\'APPLICATION_CALLCOUNTER\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.callcounter" name="callcounter" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_CALLCOUNTER\' | translate }}\n										</span>\n										<span data-ng-show="(forms.advanced.callcounter.$touched || forms.advanced.$submitted) && forms.advanced.callcounter.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END CALLCOUNTER -->\n\n									<!-- START FROMDOMAIN -->\n									<div class="form-group" data-ng-class="{\'has-error\': forms.advanced.$submitted && forms.advanced.fromdomain.$invalid}">\n										<label class="control-label">{{\'APPLICATION_FROMDOMAIN\' | translate}}</label>\n										<input type="text" name="fromdomain" placeholder="{{\'APPLICATION_FROMDOMAIN\' | translate}}" class="form-control" data-ng-model="trunk.fromdomain" />\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_FROMDOMAIN\' | translate }}\n										</span>\n										<span data-ng-show="forms.advanced.$submitted && (forms.advanced.fromdomain.$invalid)" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END FROMDOMAIN -->\n\n									<!-- START FROMUSER -->\n									<div class="form-group" data-ng-class="{\'has-error\': forms.advanced.$submitted && forms.advanced.fromuser.$invalid}">\n										<label class="control-label">{{\'APPLICATION_FROMUSER\' | translate}}</label>\n										<input type="text" name="fromuser" placeholder="{{\'APPLICATION_FROMUSER\' | translate}}" class="form-control" data-ng-model="trunk.fromuser" />\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_FROMUSER\' | translate }}\n										</span>\n										<span data-ng-show="forms.advanced.$submitted && (forms.advanced.fromuser.$invalid)" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END FROMUSER -->\n\n								</div>\n								<div class="col-md-6">\n\n									<!-- START OUTBOUNDPROXY -->\n									<div class="form-group" data-ng-class="{\'has-error\': forms.advanced.$submitted && forms.advanced.outboundproxy.$invalid}">\n										<label class="control-label">{{\'APPLICATION_OUTBOUNDPROXY\' | translate}}</label>\n										<input type="text" name="outboundproxy" placeholder="{{\'APPLICATION_OUTBOUNDPROXY\' | translate}}" class="form-control" data-ng-model="trunk.outboundproxy" />\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_OUTBOUNDPROXY\' | translate }}\n										</span>\n										<span data-ng-show="forms.advanced.$submitted && (forms.advanced.outboundproxy.$invalid)" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END OUTBOUNDPROXY -->\n\n									<!-- START USEREQPHONE -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.usereqphone.$touched || forms.advanced.$submitted) && forms.advanced.usereqphone.$invalid}">\n										<label class="control-label">{{\'APPLICATION_USEREQPHONE\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.usereqphone" name="usereqphone" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_USEREQPHONE\' | translate }}\n										</span>\n										<span data-ng-show="(forms.advanced.usereqphone.$touched || forms.advanced.$submitted) && forms.advanced.usereqphone.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END USEREQPHONE -->\n\n									<!-- START TRUSTRPID -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.trustrpid.$touched || forms.advanced.$submitted) && forms.advanced.trustrpid.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TRUSTRPID\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.trustrpid" name="trustrpid" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_TRUSTRPID\' | translate }}\n										</span>\n										<span data-ng-show="(forms.advanced.trustrpid.$touched || forms.advanced.$submitted) && forms.advanced.trustrpid.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END TRUSTRPID -->\n\n									<!-- START SENDRPID -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.sendrpid.$touched || forms.advanced.$submitted) && forms.advanced.sendrpid.$invalid}">\n										<label class="control-label">{{\'APPLICATION_SENDRPID\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.sendrpid" name="sendrpid" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_SENDRPID\' | translate }}\n										</span>\n										<span data-ng-show="(forms.advanced.sendrpid.$touched || forms.advanced.$submitted) && forms.advanced.sendrpid.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END SENDRPID -->\n\n									<!-- START ENCRYPTION -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.encryption.$touched || forms.advanced.$submitted) && forms.advanced.encryption.$invalid}">\n										<label class="control-label">{{\'APPLICATION_ENCRYPTION\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select data-ng-model="trunk.encryption" name="encryption" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'yes\',\'no\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search | capitalize"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_ENCRYPTION\' | translate }}\n										</span>\n										<span data-ng-show="(forms.advanced.encryption.$touched || forms.advanced.$submitted) && forms.advanced.encryption.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END ENCRYPTION -->\n\n									<!-- START PORT -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.port.$touched || forms.advanced.$submitted) && forms.advanced.port.$invalid}">\n										<label class="control-label">{{\'APPLICATION_PORT\' | translate}}</label>\n										<input type="number" min="0" name="port" placeholder="{{\'APPLICATION_PORT\' | translate}}" class="form-control" data-ng-model="trunk.port"/>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_PORT\' | translate }}\n										</span>\n										<span data-ng-show="(forms.advanced.port.$touched || forms.advanced.$submitted) && forms.advanced.port.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END PORT -->\n\n									<!-- START TRANSPORT -->\n									<div class="form-group" data-ng-class="{\'has-error\': (forms.advanced.transport.$touched || forms.advanced.$submitted) && forms.advanced.transport.$invalid}">\n										<label class="control-label">{{\'APPLICATION_TRANSPORT\' | translate}}<span class="required" aria-required="true">*</span></label>\n										<ui-select multiple data-ng-model="trunk.transport" name="transport" theme="bootstrap" required>\n											<ui-select-match placeholder="{{\'APPLICATION_SEARCH_FILTER\' | translate}}">{{$item}}</ui-select-match>\n											<ui-select-choices repeat="item in [\'udp\',\'wss\',\'ws\',\'tcp\',\'tls\'] | filter: $select.search">\n												<div ng-bind-html="item | highlight: $select.search"></div>\n											</ui-select-choices>\n										</ui-select>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_TRANSPORT\' | translate }}\n										</span>\n										<span data-ng-show="(forms.advanced.transport.$touched || forms.advanced.$submitted) && forms.advanced.transport.$error.required" class="help-block help-block-error">\n											<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n										</span>\n									</div>\n									<!-- END TRANSPORT -->\n\n								</div>\n							</div>\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n					<!-- START OTHER FIELDS TAB -->\n					<div class="tab-pane" id="tab_1_3">\n						<form name="forms.otherFields" data-ng-submit="forms.otherFields.$valid && updateTrunk()" novalidate>\n							<div class="row">\n								<div class="col-md-6">\n									<!-- START OTHER FIELDS-->\n									<div class="form-group">\n										<label class="control-label">{{\'APPLICATION_OTHER_FIELDS\' | translate}}</label>\n										<textarea name="otherFields" placeholder="{{\'APPLICATION_OTHER_FIELDS\' | translate}}" class="form-control otherfields-col" data-ng-model="trunk.otherFields"></textarea>\n										<span class="help-block">\n											{{ \'DESCRIPTION_TRUNK_OTHER_FIELDS\' | translate }}\n										</span>\n									</div>\n									<!-- END OTHER FIELDS -->\n								</div>\n								<div class="col-md-6">\n									<div class="form-group">\n										<label class="control-label">{{\'APPLICATION_EXAMPLE\' | translate}}</label>\n										<div class="well">\n											<div>host=dynamicp</div>\n											<div>secret=********</div>\n											<div>regcontext=tammari-internal</div>\n											<div>regexten=1005</div>\n											<div>dtmfmode=rfc2833</div>\n											<div>insecure=invite,port</div>\n											<div>canreinvite=yes</div>\n											<div>nat=yes</div>\n											<div>qualify=yes</div>\n											<div>context=merus-sipphone</div>\n											<div>pickupgroup=1</div>\n											<div>callgroup=1</div>\n											<div>mailbox=1000@default</div>\n										</div>\n									</div>\n								</div>\n							</div>\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n\n					</div>\n					<!-- END OTHER FIELDS TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),
+a.put("app/tools/trunk/wizard/wizard.html",'<div class="col-md-12" data-ng-init="initWizard()">\n	<!-- BEGIN PAGE HEADER-->\n	<div class="page-bar">\n		<ul class="page-breadcrumb">\n			<li>\n				<i class="icon-rocket"></i>\n				<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-wrench"></i>\n				<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-link"></i>\n				<a href="/tools/trunks/list">{{ \'APPLICATION_TRUNKS\' | translate }}</a>\n				<i class="fa fa-angle-right"></i>\n			</li>\n			<li>\n				<i class="icon-options"></i>\n				<a href="#">{{ \'APPLICATION_WIZARD\' | translate }}</a>\n			</li>\n		</ul>\n	</div>\n	<!-- END PAGE HEADER-->\n\n	<!-- BEGIN PORTLET-->\n	<div class="portlet light bordered">\n		<div class="portlet-title">\n			<div class="caption font-green-sharp">\n				<i class="icon-link font-green-sharp"></i>\n				<span class="caption-subject">{{ \'APPLICATION_TRUNK\' | translate }} WIZARD</a> </span>\n			</div>\n		</div>\n		<div class="portlet-body">\n			<wizard on-finish="createItem()">\n				<wz-step title="{{\'APPLICATION_GENERAL\' | translate}}" canexit="exitValidation(forms.general.$valid)">\n					<form name="forms.general" novalidate>\n\n						<!-- START NAME -->\n						<div class="form-group" data-ng-class="{\'has-error\': (forms.general.$submitted && forms.general.name.$invalid) || forms.general.name.$error.pattern}">\n							<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" data-ng-pattern="settings.patternName" required/>\n							<span data-ng-show="forms.general.$submitted && forms.general.name.$invalid" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n							<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.pattern" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n							</span>\n						</div>\n						<!-- END NAME -->\n\n						<!-- START HOST -->\n						<div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.host.$invalid}">\n							<label class="control-label">{{\'APPLICATION_HOST\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="host" placeholder="{{\'APPLICATION_HOST\' | translate}}" class="form-control" data-ng-model="item.host" required/>\n							<span class="help-block">\n								{{ \'DESCRIPTION_TRUNK_HOST\' | translate }}\n							</span>\n							<span data-ng-show="forms.general.$submitted && forms.general.host.$invalid" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END HOST -->\n\n						<!-- START PASSWORD -->\n						<div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.password.$invalid}">\n							<label class="control-label">{{\'APPLICATION_SECRET\' | translate}}</label>\n							<input type="password" name="password" placeholder="{{\'APPLICATION_PASSWORD\' | translate}}" class="form-control" data-ng-model="item.secret"/>\n							<span class="help-block">\n								{{ \'DESCRIPTION_TRUNK_SECRET\' | translate }}\n							</span>\n							<span data-ng-show="forms.general.$submitted && forms.general.password.$invalid" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n							</span>\n						</div>\n						<!-- END PASSWORD -->\n\n						<!-- START DEFAULT USER -->\n						<div class="form-group" data-ng-class="{\'has-error\': forms.general.$submitted && forms.general.defaultuser.$invalid}">\n							<label class="control-label">{{\'APPLICATION_DEFAULT_USER\' | translate}}<span class="required" aria-required="true">*</span></label>\n							<input type="text" name="defaultuser" placeholder="{{\'APPLICATION_DEFAULT\' | translate}} {{\'APPLICATION_USER\' | translate}}" class="form-control" data-ng-model="item.defaultuser" required/>\n							<span class="help-block">\n								{{ \'DESCRIPTION_TRUNK_DEFAULT_USER\' | translate }}\n							</span>\n							<span data-ng-show="forms.general.$submitted && (forms.general.defaultuser.$invalid)" class="help-block help-block-error">\n								<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n							</span>\n						</div>\n						<!-- END DEFAULT USER -->\n\n						<!-- START DESCRIPTION -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n							<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n						</div>\n						<!-- END DESCRIPTION -->\n\n						<button class="btn green-haze" type="submit" ng-click="next(true)">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n					</form>\n				</wz-step>\n\n				<wz-step title="{{\'APPLICATION_ADVANCED\' | translate}}" canexit="exitValidation(forms.advanced.$valid)">\n					<form name="forms.advanced" novalidate>\n\n						<!-- START REGISTRY -->\n						<div class="form-group">\n							<label class="control-label">{{\'APPLICATION_REGISTRY\' | translate}}</label>\n							<input type="text" name="registry" placeholder="{{\'APPLICATION_REGISTRY\' | translate}}" class="form-control" data-ng-model="item.registry"/>\n							<span class="help-block">\n								{{ \'DESCRIPTION_TRUNK_REGISTRY\' | translate }}\n							</span>\n						</div>\n						<!-- END REGISTRY -->\n						<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n						<button class="btn green-haze" type="submit" ng-click="next()">{{\'APPLICATION_CONTINUE\' | translate}} <i class="fa fa-angle-right"></i></button>\n					</form>\n				</wz-step>\n\n				<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n					<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n					<button class="btn green-haze" type="button" ng-click="previous()"><i class="fa fa-angle-left"></i> {{\'APPLICATION_BACK\' | translate}}</button>\n					<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n				</wz-step>\n			</wizard>\n		</div>\n	</div>\n	<!-- END PORTLET-->\n</div>\n'),a.put("app/tools/variable/list/list.create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_VARIABLE\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/variable/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-eye"></i>\n					<a href="#">{{ \'APPLICATION_VARIABLES\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_VARIABLES\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="createItem()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_VARIABLE\' | translate }}\n						</button>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/variable/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getVariable()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-wrench"></i>\n					<a href="#">{{ \'APPLICATION_TOOLS\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-eye"></i>\n					<a href="/tools/variables/list">{{ \'APPLICATION_VARIABLES\' | translate }}</a>\n					<i data-ng-show="variable" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="variable">\n					<a href="#">{{variable.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/variable.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{variable.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.variables.view.settings\')}">\n							<a data-ng-href="/tools/variables/view/{{variable.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/variable/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_VARIABLE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateVariable()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="variable.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="variable.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/tools/yourdashboard/list/clone.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_CLONE_DASHBOARD\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.dashboard" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.dashboard.name.$touched || forms.dashboard.$submitted) && forms.dashboard.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.dashboard.name.$touched || forms.dashboard.$submitted) && forms.dashboard.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.dashboard.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/yourdashboard/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_DASHBOARD\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="forms.dashboard" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (forms.dashboard.name.$touched || forms.dashboard.$submitted) && forms.dashboard.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(forms.dashboard.name.$touched || forms.dashboard.$submitted) && forms.dashboard.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="ok()" ng-disabled="forms.dashboard.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/yourdashboard/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-tachometer"></i>\n					<a href="/tools/yourdashboards/list">{{ \'APPLICATION_YOUR_DASHBOARDS\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-docs font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_YOUR_DASHBOARDS\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<button class="btn green-jungle " ng-click="create()">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_DASHBOARD\' | translate }}\n						</button>\n					</div>\n					<!-- <a class="btn btn-icon-only btn-default fullscreen" href="#"></a> -->\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/yourdashboard/show/leaveEditedDashboard.modal.html",'<div class="modal-header" data-ng-init="getContacts()">\n  <h3 class="modal-title">{{ \'APPLICATION_WARNING\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <p>{{\'MESSAGE_LEAVE_EDITED_PAGE\' | translate}}</p>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-danger" type="button" ng-click="close()">{{ \'APPLICATION_CONTINUE\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),a.put("app/tools/yourdashboard/show/show.html",'<div class="row" style="min-height: 466px;" id="yourDashboardView">\n  <div class="col-md-12" ng-init="getDashboard()">\n    <adf-dashboard\n    data-ng-if="dashboard"\n    name="{{dashboard.name}}"\n    collapsible="{{dashboard.collapsible}}"\n    maximizable="{{dashboard.maximizable}}"\n    enableconfirmdelete="{{dashboard.enableconfirmdelete}}"\n    structure="{{dashboard.structure}}"\n    editable="{{dashboard.editable}}"\n    adf-model="dashboard.model"/>\n  </div>\n</div>\n'),a.put("app/tools/yourdashboard/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="getDashboard()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="fa fa-tachometer"></i>\n					<a href="/tools/yourdashboards/list">{{ \'APPLICATION_YOUR_DASHBOARDS\' | translate }}</a>\n					<i data-ng-show="dashboard" class="fa fa-angle-right"></i>\n				</li>\n				<li data-ng-show="dashboard">\n					<a href="#">{{dashboard.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img data-ng-src="assets/images/media/dashboard.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{dashboard.name}}\n					</div>\n					<!-- <div class="profile-usertitle-job">\n						{{user.role}}\n					</div> -->\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.tools.yourdashboards.view.settings\')}">\n							<a data-ng-href="/tools/yourdashboards/view/{{dashboard.id}}/settings">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_SETTINGS\' | translate}} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/tools/yourdashboard/view/view.settings.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{ \'APPLICATION_DASHBOARD\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} </span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_GENERAL\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.general" data-ng-submit="forms.general.$valid && updateDashboard()" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': (forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="dashboard.name" required/>\n								<span data-ng-show="(forms.general.name.$touched || forms.general.$submitted) && forms.general.name.$error.required" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START VISIBLE TO ADMIN -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_VISIBLE_TO_ADMIN\' | translate}}</label><br>\n								<input\n									bs-switch\n									ng-model="dashboard.admin"\n									type="checkbox"\n									switch-active="{{ radioSwitch.isActive }}"\n									switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n									switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n									switch-on-color="{{ radioSwitch.onColor }}"\n									switch-off-color="{{ radioSwitch.offColor }}"\n									switch-animate="{{ radioSwitch.animate }}"\n									switch-size="{{ radioSwitch.size }}"\n									switch-label="{{ radioSwitch.label }}"\n									switch-icon="{{ radioSwitch.icon }}"\n									switch-radio-off="{{ radioSwitch.radioOff }}"\n									switch-label-width="{{ radioSwitch.labelWidth }}"\n									switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END VISIBLE TO ADMIN -->\n\n							<!-- START VISIBLE TO USER -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_VISIBLE_TO_USER\' | translate}}</label><br>\n								<input\n									bs-switch\n									ng-model="dashboard.user"\n									type="checkbox"\n									switch-active="{{ radioSwitch.isActive }}"\n									switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n									switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n									switch-on-color="{{ radioSwitch.onColor }}"\n									switch-off-color="{{ radioSwitch.offColor }}"\n									switch-animate="{{ radioSwitch.animate }}"\n									switch-size="{{ radioSwitch.size }}"\n									switch-label="{{ radioSwitch.label }}"\n									switch-icon="{{ radioSwitch.icon }}"\n									switch-radio-off="{{ radioSwitch.radioOff }}"\n									switch-label-width="{{ radioSwitch.labelWidth }}"\n									switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END VISIBLE TO USER -->\n\n							<!-- START VISIBLE TO AGENT -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_VISIBLE_TO_AGENT\' | translate}}</label><br>\n								<input\n									bs-switch\n									ng-model="dashboard.agent"\n									type="checkbox"\n									switch-active="{{ radioSwitch.isActive }}"\n									switch-on-text="{{ \'APPLICATION_YES\' | translate }}"\n									switch-off-text="{{ \'APPLICATION_NO\' | translate }}"\n									switch-on-color="{{ radioSwitch.onColor }}"\n									switch-off-color="{{ radioSwitch.offColor }}"\n									switch-animate="{{ radioSwitch.animate }}"\n									switch-size="{{ radioSwitch.size }}"\n									switch-label="{{ radioSwitch.label }}"\n									switch-icon="{{ radioSwitch.icon }}"\n									switch-radio-off="{{ radioSwitch.radioOff }}"\n									switch-label-width="{{ radioSwitch.labelWidth }}"\n									switch-handle-width="{{ radioSwitch.handleWidth }}">\n							</div>\n							<!-- END VISIBLE TO AGENT -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="dashboard.description"></textarea>\n							</div>\n							<!-- END DESCRIPTION -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END ADVANCED TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/zendesk/list/list.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<i class="icon-heart"></i>\n					<a href="/zendesk/list">{{ \'APPLICATION_ZENDESK\' | translate }}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered" data-ng-init="initView()">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-heart font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ZENDESK\' | translate }}</a> </span>\n				</div>\n				<div class="actions">\n					<div class="btn-group" data-ng-show="id.length">\n						<a class="btn red" href="#" data-ng-click="deleteItems()">\n							<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n						</a>\n					</div>\n					<div class="btn-group">\n						<a class="btn green-jungle" href="/zendesk/wizard" data-toggle="dropdown">\n							<i class="icon-plus"></i> {{ \'APPLICATION_NEW_ACCOUNT\' | translate }}\n						</a>\n					</div>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<!-- START TABLE -->\n				<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n					<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n				</div>\n				<!-- END TABLE -->\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/zendesk/view/configuration/list/create.modal.html",'<div class="modal-header">\n  <h3 class="modal-title">{{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}</h3>\n</div>\n<div class="modal-body">\n  <form name="form" novalidate>\n\n    <!-- START NAME -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.name.$touched || form.name.$submitted) && form.name.$invalid}">\n      <label class="control-label">{{\'APPLICATION_NAME\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n      <span data-ng-show="(form.name.$touched || form.name.$submitted) && form.name.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- END NAME -->\n\n    <!-- START CHANNEL -->\n    <div class="form-group" data-ng-class="{\'has-error\': (form.channel.$touched || form.channel.$submitted) && form.channel.$invalid}">\n      <label class="control-label">{{\'APPLICATION_CHANNEL\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.channel" name="channel" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_CHANNEL\' | translate}}">{{$select.selected.name}}</ui-select-match>\n        <ui-select-choices repeat="channel.value as channel in channels | filter: $select.search">\n          <div data-ng-bind="channel.name | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.channel.$touched || form.channel.$submitted) && form.channel.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- START CHANNEL -->\n\n    <!-- START VOICE SUBTYPE -->\n    <div data-ng-if="item.channel===\'voice\'" class="form-group" data-ng-class="{\'has-error\': (form.channel.$touched || form.channel.$submitted) && form.channel.$invalid}">\n      <label class="control-label">{{\'APPLICATION_TYPE\' | translate}}<span class="required" aria-required="true">*</span></label>\n      <ui-select data-ng-model="item.type" name="type" theme="bootstrap" required>\n        <ui-select-match placeholder="{{\'APPLICATION_TYPE\' | translate}}">{{$select.selected}}</ui-select-match>\n        <ui-select-choices repeat="type in [\'Queue\',\'Outbound\'] | filter: $select.search">\n          <div data-ng-bind="type | highlight: $select.search"></div>\n        </ui-select-choices>\n      </ui-select>\n      <span data-ng-show="(form.type.$touched || form.type.$submitted) && form.type.$error.required" class="help-block help-block-error">\n        <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n      </span>\n    </div>\n    <!-- START CHANNEL -->\n\n    <!-- START DESCRIPTION -->\n    <div class="form-group">\n      <label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n      <textarea type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/></textarea>\n    </div>\n    <!-- END DESCRIPTION -->\n\n  </form>\n</div>\n<div class="modal-footer">\n  <button class="btn btn-success" type="button" ng-click="save()" ng-disabled="form.$invalid">{{ \'APPLICATION_CONFIRM\' | translate }}</button>\n  <button class="btn default" type="button" ng-click="cancel()">{{ \'APPLICATION_CANCEL\' | translate }}</button>\n</div>\n'),
+a.put("app/zendesk/view/configuration/list/list.html",'<div ui-view class="profile-content">\n	<div class="row">\n		<div class="col-md-12">\n			<div class="portlet light" data-ng-init="initView()">\n				<div class="portlet-title  tabbable-line">\n					<div class="caption caption-md">\n						<i class="icon-globe theme-font hide"></i>\n						<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATIONS\' | translate}}</span>\n					</div>\n					<div class="actions">\n						<div class="btn-group" data-ng-show="id.length">\n							<a class="btn red" href="#" data-ng-click="deleteItems()">\n								<i class="icon-trash"></i> {{ \'APPLICATION_DELETE\' | translate }}\n							</a>\n						</div>\n						<div class="btn-group">\n							<a class="btn green-jungle" href="#" data-ng-click="createItem()">\n								<i class="icon-plus"></i> {{ \'APPLICATION_NEW_CONFIGURATION\' | translate }}\n							</a>\n						</div>\n					</div>\n				</div>\n				<div class="portlet-body">\n					<!-- START TABLE -->\n					<div ui-grid="gridOptions"  ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-draggable-rows class="ui-grid">\n						<div class="watermark" ng-show="!gridOptions.data.length">{{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}</div>\n					</div>\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/zendesk/view/configuration/view/view.html",'<div class="row" data-ng-init="initView();getConfiguration();getCustomVariables();getFields();getTags();">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_SUBJECT\' | translate}}</a>\n					</li>\n          <li>\n						<a href="#" data-target="#tab_1_2" data-toggle="tab">{{\'APPLICATION_DESCRIPTION\' | translate}}</a>\n					</li>\n          <li>\n						<a href="#" data-target="#tab_1_3" data-toggle="tab">{{\'APPLICATION_FIELDS\' | translate}}</a>\n					</li>\n					<li>\n						<a href="#" data-target="#tab_1_4" data-toggle="tab">{{\'APPLICATION_TAGS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- SUBJECT TAB -->\n					<div class="tab-pane ui-padding active" id="tab_1_1">\n            <div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by blank space:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItem(\'subject\')"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div id="subject-item-list" ng-scrollbars ng-scrollbars-config="config"> -->\n	            <div class="row" data-ng-repeat="subjectItem in subjectConfig">\n	              <div class="col-md-3">\n	                <ui-select ng-model="subjectItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(subjectItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n	                  <ui-select-choices repeat="item.type as item in fieldType | filter: $select.search">\n	                    <div ng-bind-html="item.title | highlight: $select.search"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'string\'">\n	                <div class="form-group">\n	                  <input type="text" class="form-control" data-ng-model="subjectItem.content" data-ng-change="updateField(subjectItem)">\n	                </div>\n	              </div>\n								<div class="col-md-8" data-ng-if="subjectItem.type==\'variable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.variableName" data-ng-change="updateField(subjectItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n	                    <ui-select-choices group-by="groupVariableByGroup" repeat="variable.name as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.title | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-8" data-ng-if="subjectItem.type==\'customVariable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="subjectItem.VariableId" data-ng-change="updateField(subjectItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in customVariables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(subjectItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END SUBJECT TAB -->\n          <!-- DESCRIPTION TAB -->\n					<div class="tab-pane ui-padding" id="tab_1_2">\n						<div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">All following fields will be join by new line:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItem(\'description\')"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div id="description-item-list" ng-scrollbars ng-scrollbars-config="config"> -->\n							<div class="row" data-ng-repeat="descriptionItem in descriptionConfig">\n	              <div class="col-md-2">\n	                <ui-select ng-model="descriptionItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n	                  <ui-select-choices repeat="item.type as item in descFieldType | filter: $select.search">\n	                    <div ng-bind-html="item.title | highlight: $select.search"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-9" data-ng-if="descriptionItem.type==\'string\'">\n	                <div class="form-group">\n	                  <input type="text" class="form-control" data-ng-model="descriptionItem.content" data-ng-change="updateField(descriptionItem)">\n	                </div>\n	              </div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\'">\n									<input type="text" class="form-control" placeholder="Key" data-ng-model="descriptionItem.key" data-ng-change="updateField(descriptionItem)">\n								</div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\'">\n									<ui-select ng-model="descriptionItem.keyType" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeDescType(descriptionItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n	                  <ui-select-choices repeat="item.type as item in fieldType | filter: $select.search">\n	                    <div ng-bind-html="item.title | highlight: $select.search"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n								</div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\' && descriptionItem.keyType==\'string\'">\n									<input type="text" class="form-control" placeholder="Value" data-ng-model="descriptionItem.keyContent" data-ng-change="updateField(descriptionItem)">\n								</div>\n								<div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\' && descriptionItem.keyType==\'variable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.variableName" data-ng-change="updateField(descriptionItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n	                    <ui-select-choices group-by="groupVariableByGroup" repeat="variable.name as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.title | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-3" data-ng-if="descriptionItem.type==\'keyValue\' && descriptionItem.keyType==\'customVariable\'">\n	                <div class="form-group">\n	                  <ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="descriptionItem.VariableId" data-ng-change="updateField(descriptionItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in customVariables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(descriptionItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END DESCRIPTION TAB -->\n          <!-- FIELDS TAB -->\n					<div class="tab-pane ui-padding" id="tab_1_3">\n						<div class="row">\n              <div class="col-md-11">\n                <span class="caption-subject">Add how to fill the fields present in your account:</span>\n              </div>\n              <div class="col-md-1 pull-rigth">\n                <button class="btn btn-icon-only green" data-ng-click="addItem(\'field\')"><i class="fa fa-plus"></i></button>\n              </div>\n            </div>\n            <hr>\n						<!-- <div id="field-item-list" ng-scrollbars ng-scrollbars-config="config"> -->\n	            <div class="row" data-ng-repeat="fieldItem in fieldConfig">\n	              <div class="col-md-3">\n	                <ui-select ng-model="fieldItem.idField" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeFieldType(fieldItem)">\n	                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n	                  <ui-select-choices repeat="item.id as item in accountFields | filter: $select.search">\n	                    <div ng-bind-html="item.title | highlight: $select.search"></div>\n	                  </ui-select-choices>\n	                </ui-select>\n	              </div>\n	              <div class="col-md-8" data-ng-if="getSystemFieldOptions(fieldItem.idField)">\n	                <div class="form-group">\n										<ui-select ng-model="fieldItem.content" theme="bootstrap" ng-disabled="disabled" data-ng-change="updateField(fieldItem)">\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n		                  <ui-select-choices repeat="item.value as item in getSystemFieldOptions(fieldItem.idField) | filter: $select.search">\n		                    <div ng-bind-html="item.name | highlight: $select.search"></div>\n		                  </ui-select-choices>\n		                </ui-select>\n	                </div>\n	              </div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField)">\n									<div class="form-group">\n										<ui-select ng-model="fieldItem.type" theme="bootstrap" ng-disabled="disabled" data-ng-change="changeType(fieldItem)">\n		                  <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n		                  <ui-select-choices repeat="item.type as item in fieldType | filter: $select.search">\n		                    <div ng-bind-html="item.title | highlight: $select.search | ucfirst"></div>\n		                  </ui-select-choices>\n		                </ui-select>\n									</div>\n								</div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'string\'">\n	                <div class="form-group">\n										<input type="text" class="form-control" data-ng-model="fieldItem.content" data-ng-change="updateField(fieldItem)">\n	                </div>\n	              </div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'variable\'">\n	                <div class="form-group">\n										<ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.variableName" data-ng-change="updateField(fieldItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.title}}</ui-select-match>\n	                    <ui-select-choices group-by="groupVariableByGroup" repeat="variable.name as variable in variables | filter: $select.search">\n	                      <div ng-bind-html="variable.title | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n								<div class="col-md-4" data-ng-if="!getSystemFieldOptions(fieldItem.idField) && fieldItem.type === \'customVariable\'">\n	                <div class="form-group">\n										<ui-select theme="bootstrap" ng-disabled="disabled" data-ng-model="fieldItem.VariableId" data-ng-change="updateField(fieldItem)">\n	                    <ui-select-match placeholder="{{\'APPLICATION_SEARCH\' | translate}}">{{$select.selected.name}}</ui-select-match>\n	                    <ui-select-choices repeat="variable.id as variable in customVariables | filter: $select.search">\n	                      <div ng-bind-html="variable.name | highlight: $select.search"></div>\n	                    </ui-select-choices>\n	                  </ui-select>\n	                </div>\n	              </div>\n	              <div class="col-md-1">\n	                <div class="form-group">\n	                  <button class="btn btn-icon-only red" data-ng-click="removeItem(fieldItem)"><i class="fa fa-times"></i></button>\n	                </div>\n	              </div>\n	            </div>\n						<!-- </div> -->\n					</div>\n					<!-- END FIELDS TAB -->\n					<!-- TAG TAB -->\n					<div class="tab-pane ui-padding" id="tab_1_4">\n						<div class="row">\n              <div class="col-md-12">\n                <span class="caption-subject">Select tags that you want add in the ticket:</span>\n              </div>\n            </div>\n            <hr>\n						<form name="forms.tags" data-ng-submit="updateTags()" novalidate>\n							<!-- TAG -->\n							<div class="form-group">\n								<ui-select multiple data-ng-model="selectedTags.tags" theme="bootstrap" name="tags" ng-disabled="disabled">\n									<ui-select-match placeholder="{{ \'APPLICATION_TAGS\' | translate }}">{{$item.name}}</ui-select-match>\n									<ui-select-choices repeat="tag.id as tag in tags | filter: $select.search">\n										{{tag.name}}\n									</ui-select-choices>\n								</ui-select>\n							</div>\n							<!-- END TAG -->\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END TAG TAB -->\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/zendesk/view/view.account.html",'<div class="row">\n	<div class="col-md-12">\n		<div class="portlet light">\n			<div class="portlet-title tabbable-line">\n				<div class="caption caption-md">\n					<i class="icon-globe theme-font hide"></i>\n					<span class="caption-subject font-blue-madison bold uppercase">{{\'APPLICATION_ACCOUNT\' | translate}}</span>\n				</div>\n				<ul class="nav nav-tabs">\n					<li class="active">\n						<a href="#" data-target="#tab_1_1" data-toggle="tab">{{\'APPLICATION_GENERALS\' | translate}}</a>\n					</li>\n				</ul>\n			</div>\n			<div class="portlet-body">\n				<div class="tab-content">\n					<!-- GENERAL TAB -->\n					<div class="tab-pane active" id="tab_1_1">\n						<form name="forms.formSetting" data-ng-submit="forms.formSetting.$valid && updateItem()" novalidate>\n              <!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="account.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.username" required/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_URI\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_URI\' | translate}}" class="form-control" data-ng-model="account.remoteUri" required />\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START AUTH TYPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.authType.$invalid}">\n								<label class="control-label">{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}</label>\n								<ui-select data-ng-model="account.authType" name="authType" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="type in [\'password\', \'token\'] | filter: $select.search">\n										<div data-ng-bind="type | capitalize | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="forms.formSetting.authType.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- START AUTH TYPE -->\n\n              <!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}" ng-slide-down="account.authType == \'password\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.password" required/>\n								<span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n              <!-- START TOKEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.token.$invalid}" ng-slide-down="account.authType == \'token\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="token" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="account.token" required/>\n								<span data-ng-show="forms.formSetting.token.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TOKEN -->\n\n							<!-- START SERVER URL -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.serverUrl.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}}</label>\n								<input type="url" name="serverUrl" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="account.serverUrl"/>\n								<span class="help-block">\n									{{\'DESCRIPTION_SERVER_URL\' | translate}}.\n								</span>\n								<span class="help-block help-block-info">\n									{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n								</span>\n							</div>\n							<!-- END SERVER URL -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_UPDATE\' | translate}}"/>\n						</form>\n					</div>\n					<!-- END GENERAL TAB -->\n\n				</div>\n			</div>\n		</div>\n	</div>\n</div>\n'),a.put("app/zendesk/view/view.html",'<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initView()">\n	<div class="col-md-12">\n		<div class="page-bar">\n			<ul class="page-breadcrumb">\n				<li>\n					<i class="icon-rocket"></i>\n					<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n          <i class="icon-heart"></i>\n          <a href="/zendesk/list">{{ \'APPLICATION_ZENDESK\' | translate }}</a>\n					<i class="fa fa-angle-right"></i>\n				</li>\n				<li>\n					<a href="#">{{account.name}}</a>\n				</li>\n			</ul>\n		</div>\n\n		<!-- BEGIN PROFILE SIDEBAR -->\n		<div class="profile-sidebar">\n			<!-- PORTLET MAIN -->\n			<div class="portlet light profile-sidebar-portlet">\n				<!-- SIDEBAR USERPIC -->\n				<div class="profile-image">\n					<img src="assets/images/media/zendesk.png" class="img-responsive">\n				</div>\n				<!-- END SIDEBAR USERPIC -->\n				<!-- SIDEBAR USER TITLE -->\n				<div class="profile-usertitle">\n					<div class="profile-usertitle-name">\n						{{account.name}}\n					</div>\n					<div class="profile-usertitle-job">\n						{{account.remoteUri}}\n					</div>\n				</div>\n				<!-- END SIDEBAR USER TITLE -->\n				<!-- SIDEBAR MENU -->\n				<div class="profile-usermenu">\n					<ul class="nav">\n						<li data-ng-class="{active: $state.is(\'main.zendesk.view.account\')}">\n							<a ng-href="/zendesk/view/{{account.id}}/account">\n							<i class="icon-user"></i>\n							{{ \'APPLICATION_ACCOUNT\' | translate }} </a>\n						</li>\n						<li data-ng-class="{active: $state.includes(\'main.zendesk.view.configurations\') || $state.is(\'main.zendesk.view.configuration\')}">\n							<a ng-href="/zendesk/view/{{account.id}}/configurations/list">\n							<i class="icon-settings"></i>\n							{{ \'APPLICATION_CONFIGURATIONS\' | translate }} </a>\n						</li>\n					</ul>\n				</div>\n				<!-- END MENU -->\n			</div>\n			<!-- END PORTLET MAIN -->\n		</div>\n		<!-- END BEGIN PROFILE SIDEBAR -->\n		<!-- BEGIN PROFILE CONTENT -->\n		<div ui-view class="profile-content">\n		</div>\n		<!-- END PROFILE CONTENT -->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),a.put("app/zendesk/wizard/wizard.html",'<!-- BEGIN PAGE HEADER-->\n<div class="row">\n	<div class="col-md-12">\n			<div class="page-bar">\n				<ul class="page-breadcrumb">\n					<li>\n						<i class="icon-rocket"></i>\n						<a href="/">{{ \'APPLICATION_DASHBOARD\' | translate }}</a>\n						<i class="fa fa-angle-right"></i>\n					</li>\n					<li>\n						<i class="icon-heart"></i>\n						<a href="/zendesk/list">{{ \'APPLICATION_ZENDESK\' | translate }}</a>\n					</li>\n				</ul>\n			</div>\n		</div>\n</div>\n<!-- END PAGE HEADER-->\n\n<!-- BEGIN PAGE CONTENT-->\n<div class="row" data-ng-init="initWizard()">\n	<div class="col-md-12">\n		<!-- BEGIN Portlet PORTLET-->\n		<div class="portlet light bordered">\n			<div class="portlet-title">\n				<div class="caption font-green-sharp">\n					<i class="icon-notebook font-green-sharp"></i>\n					<span class="caption-subject">{{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD</a> </span>\n				</div>\n			</div>\n			<div class="portlet-body">\n				<wizard on-finish="createItem()">\n          <wz-step title="{{\'APPLICATION_ACCOUNT_INFO\' | translate}}" canexit="exitValidation(forms.formSetting.$valid)">\n						<form name="forms.formSetting" novalidate>\n\n							<!-- START NAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.name.$invalid}">\n								<label class="control-label">{{\'APPLICATION_NAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="name" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.name" required/>\n								<span data-ng-show="forms.formSetting.name.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END NAME -->\n\n							<!-- START DESCRIPTION -->\n							<div class="form-group">\n								<label class="control-label">{{\'APPLICATION_DESCRIPTION\' | translate}}</label>\n								<input type="text" name="description" placeholder="{{\'APPLICATION_DESCRIPTION\' | translate}}" class="form-control" data-ng-model="item.description"/>\n							</div>\n							<!-- END DESCRIPTION -->\n\n              <!-- START USERNAME -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.username.$invalid}">\n								<label class="control-label">{{\'APPLICATION_USERNAME\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="username" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.username" required ng-remote-validate="/api/zendesk/accounts/validate/username"/>\n								<span data-ng-show="forms.formSetting.username.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formSetting.username.$touched || forms.formSetting.$submitted) && forms.formSetting.username.$error.ngRemoteValidate" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n				        </span>\n							</div>\n							<!-- END USERNAME -->\n\n              <!-- START REMOTE ADDRESS -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.remoteUri.$invalid}">\n								<label class="control-label">{{\'APPLICATION_URI\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="url" name="remoteUri" placeholder="{{\'APPLICATION_URI\' | translate}}" class="form-control" data-ng-model="item.remoteUri" required ng-remote-validate="/api/zendesk/accounts/validate/remoteUri"/>\n								<span data-ng-show="forms.formSetting.remoteUri.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n								<span data-ng-show="(forms.formSetting.remoteUri.$touched || forms.formSetting.$submitted) && forms.formSetting.remoteUri.$error.ngRemoteValidate" class="help-block help-block-error">\n				          <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_EXIST_DOMAIN\' | translate}}.\n				        </span>\n							</div>\n							<!-- END USERNAME -->\n\n							<!-- START AUTH TYPE -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.authType.$invalid}">\n								<label class="control-label">{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}</label>\n								<ui-select data-ng-model="item.authType" name="authType" theme="bootstrap" required>\n									<ui-select-match placeholder="{{\'APPLICATION_AUTHENTICATION_TYPE\' | translate}}">{{$select.selected | capitalize}}</ui-select-match>\n									<ui-select-choices repeat="type in [\'password\', \'token\'] | filter: $select.search">\n										<div data-ng-bind="type | capitalize | highlight: $select.search"></div>\n									</ui-select-choices>\n								</ui-select>\n								<span data-ng-show="forms.formSetting.authType.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- START AUTH TYPE -->\n\n              <!-- START PASSWORD -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.password.$invalid}" ng-slide-down="item.authType == \'password\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_PASSWORD\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="password" name="password" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.password" required/>\n								<span data-ng-show="forms.formSetting.password.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END PASSWORD -->\n\n              <!-- START TOKEN -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.token.$invalid}" ng-slide-down="item.authType == \'token\'" lazy-render duration="1">\n								<label class="control-label">{{\'APPLICATION_TOKEN\' | translate}} <span class="required" aria-required="true">*</span></label>\n								<input type="text" name="token" placeholder="{{\'APPLICATION_NAME\' | translate}}" class="form-control" data-ng-model="item.token" required/>\n								<span data-ng-show="forms.formSetting.token.$invalid && forms.formSetting.$submitted" class="help-block help-block-error">\n									<strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n								</span>\n							</div>\n							<!-- END TOKEN -->\n\n							<!-- START SERVER URL -->\n							<div class="form-group" data-ng-class="{\'has-error\': forms.formSetting.$submitted && forms.formSetting.serverUrl.$invalid}">\n								<label class="control-label">{{\'APPLICATION_MOTION_ADDRESS\' | translate}}</label>\n								<input type="url" name="serverUrl" placeholder="{{\'APPLICATION_MOTION_ADDRESS\' | translate}}" class="form-control" data-ng-model="item.serverUrl"/>\n								<span class="help-block">\n									{{\'DESCRIPTION_SERVER_URL\' | translate}}.\n								</span>\n								<span class="help-block help-block-info">\n									{{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n								</span>\n							</div>\n							<!-- END SERVER URL -->\n\n							<input class="btn green-haze" type="submit" value="{{\'APPLICATION_CONTINUE\' | translate}}" data-ng-click="next()"/>\n\n						</form>\n					</wz-step>\n\n					<wz-step title="{{\'APPLICATION_CONFIRM\' | translate}}">\n						<p>{{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}</p>\n						<input class="btn default" type="button" value="{{\'APPLICATION_BACK\' | translate}}" wz-previous/>\n						<input type="submit" class="btn green-haze" wz-next value="{{\'APPLICATION_CONFIRM\' | translate}}"/>\n					</wz-step>\n\n				</wizard>\n\n			</div>\n		</div>\n		<!-- END Portlet PORTLET-->\n	</div>\n</div>\n<!-- END PAGE CONTENT-->\n'),
+a.put("components/directives/action/accountEmail/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{\'APPLICATION_ACCOUNT\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="account.id as account in accounts.rows | filter: $select.search">\n      <div ng-bind-html="account.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data6\'+randomName].$touched || form.$submitted) && form[\'data6\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data6" name="data6{{randomName}}" theme="bootstrap">\n    <ui-select-match allow-clear placeholder="{{\'APPLICATION_TEMPLATE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n      <div ng-bind-html="template.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data6\'+randomName].$touched || form.$submitted) && form[\'data6\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_TO\' | translate}}" required/>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data3" name="data3{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_CC\' | translate}}"/>\n  <span data-ng-show="(form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName  && !element.data6" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data4\'+randomName].$touched || form.$submitted) && form[\'data4\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data4" name="data4{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_SUBJECT\' | translate}}"/>\n  <span data-ng-show="(form[\'data4\'+randomName].$touched || form.$submitted) && form[\'data4\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-12" data-ng-class="{\'has-error\': (form[\'data5\'+randomName].$touched || form.$submitted) && form[\'data5\'+randomName].$invalid}">\n  <textarea rows="10" ng-model="element.data5" name="data5{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_TEXT\' | translate}}" data-ng-required="!element.data6"></textarea>\n  <span data-ng-show="(form[\'data5\'+randomName].$touched || form.$submitted) && form[\'data5\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/accountSms/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{\'APPLICATION_ACCOUNT\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="account.id as account in accounts.rows | filter: $select.search">\n      <div ng-bind-html="account.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_TO\' | translate}}" required/>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-12" data-ng-class="{\'has-error\': (form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$invalid}">\n  <textarea rows="10" ng-model="element.data3" name="data3{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_TEXT\' | translate}}"></textarea>\n  <span data-ng-show="(form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/accountTemplate/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{\'APPLICATION_ACCOUNT\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="account.id as account in accounts.rows | filter: $select.search">\n      <div ng-bind-html="account.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data2" name="data2{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{\'APPLICATION_TEMPLATE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="template.id as template in templates.rows | filter: $select.search">\n      <div ng-bind-html="template.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data3" name="data3{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_TO\' | translate}}" required/>\n  <span data-ng-show="(form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/close/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data1" name="data1{{randomName}}" class="form-control" placeholder="{{ \'APPLICATION_DISPOSITION\' | translate }}" required/>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/email/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data5\'+randomName].$touched || form.$submitted) && form[\'data5\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data5" name="data5{{randomName}}" theme="bootstrap">\n    <ui-select-match allow-clear placeholder="{{\'APPLICATION_TEMPLATE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n      <div ng-bind-html="template.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data5\'+randomName].$touched || form.$submitted) && form[\'data5\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data1" name="data1{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_TO\' | translate}}" required/>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_CC\' | translate}}"/>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName && !element.data5" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data3" name="data3{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_SUBJECT\' | translate}}"/>\n  <span data-ng-show="(form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-12" data-ng-class="{\'has-error\': (form[\'data4\'+randomName].$touched || form.$submitted) && form[\'data4\'+randomName].$invalid}">\n  <textarea rows="10" ng-model="element.data4" name="data4{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_TEXT\' | translate}}" data-ng-required="!element.data5"></textarea>\n  <span data-ng-show="(form[\'data4\'+randomName].$touched || form.$submitted) && form[\'data4\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/forward/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data1" name="data1{{randomName}}" class="form-control" placeholder="{{ \'APPLICATION_TO\' | translate }}" required/>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/http/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{\'APPLICATION_METHOD\' | translate}}">{{$select.selected}}</ui-select-match>\n    <ui-select-choices repeat="method in methods | filter: $select.search">\n      <div ng-bind-html="method | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" placeholder="URL" required/>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/integration/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" data-ng-change="changeIntegration()" required>\n    <ui-select-match placeholder="{{ \'APPLICATION_INTEGRATION\' | translate }}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="integration.state as integration in integrations | filter: $select.search">\n      <div ng-bind-html="integration.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{\'APPLICATION_INTEGRATION\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="form-group col-md-6" data-ng-if="element.data1 && accounts && randomName" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data2" name="data2{{randomName}}" theme="bootstrap" data-ng-change="changeAccount();" required>\n    <ui-select-match placeholder="{{\'APPLICATION_ACCOUNT\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="account.id as account in accounts | filter: $select.search">\n      <div ng-bind-html="account.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{\'APPLICATION_ACCOUNT\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="form-group col-md-6" data-ng-if="element.data2 && configurations && randomName" data-ng-class="{\'has-error\': (form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data3" name="data3{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{\'APPLICATION_CONFIGURATION\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="config.id as config in configurations | filter: $select.search">\n      <div ng-bind-html="config.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{\'APPLICATION_CONFIGURATION\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data3\'+randomName].$touched || form.$submitted) && form[\'data3\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/jscripty/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="project.id as project in projects | filter: $select.search">\n      <div ng-bind-html="project.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/motionbar/actionBuilder.html",'<!-- data1: 0 POPUP, 1 URL, 2 WINAPP -->\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required data-ng-change="changeMode();">\n    <ui-select-match placeholder="{{ \'APPLICATION_TYPE\' | translate }}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="motionAction.value as motionAction in motionActions | filter: $select.search">\n      <div ng-bind-html="motionAction.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{ \'APPLICATION_TYPE\' | translate }}\n  </span>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<!-- data1:0 data2:Template -->\n<div data-ng-if="randomName && element.data1==0" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data2" name="data2{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{ \'APPLICATION_TEMPLATE\' | translate }}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n      <div ng-bind-html="template.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{ \'APPLICATION_TEMPLATE\' | translate }}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<!-- data1:1 data2:URL -->\n<div data-ng-if="randomName && element.data1==1" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" required placeholder="{{ \'APPLICATION_URL\' | translate }}"/>\n  <span class="help-block">\n    {{ \'APPLICATION_URL\' | translate }}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<!-- data1:2 data2:Application data3:Arguments -->\n<div data-ng-if="randomName && element.data1==2" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" required placeholder="{{ \'APPLICATION_APPLICATION\' | translate }}"/>\n  <span class="help-block">\n    {{ \'APPLICATION_APPLICATION\' | translate }}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div data-ng-if="randomName && element.data1==2" class="form-group col-md-6">\n  <input type="text" ng-model="element.data3" name="data3{{randomName}}" class="form-control" placeholder="{{ \'APPLICATION_ARGUMENTS\' | translate }}"/>\n  <span class="help-block">\n    {{ \'APPLICATION_ARGUMENTS\' | translate }}\n  </span>\n</div>\n'),a.put("components/directives/action/status/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="status.value as status in states | filter: $select.search">\n      <div ng-bind-html="status.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/tag/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select multiple data-ng-model="data.tags" theme="bootstrap">\n    <ui-select-match placeholder="{{\'APPLICATION_TAG\' | translate}}">{{$item.name}}</ui-select-match>\n    <ui-select-choices repeat="tag.name as tag in tags | filter:$select.search" class="">\n      {{tag.name}}\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/template/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{\'APPLICATION_TEMPLATE\' | translate}}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="template.id as template in templates | filter: $select.search">\n      <div ng-bind-html="template.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n\n<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="text" ng-model="element.data2" name="data2{{randomName}}" class="form-control" placeholder="{{\'APPLICATION_TO\' | translate}}" required/>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/action/urlforward/actionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-6" data-ng-class="{\'has-error\': (form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.data1" name="data1{{randomName}}" theme="bootstrap" required>\n    <ui-select-match placeholder="{{ \'APPLICATION_TYPE\' | translate }}">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="type.value as type in types | filter: $select.search">\n      <div ng-bind-html="type.name | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span class="help-block">\n    {{\'APPLICATION_TYPE\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data1\'+randomName].$touched || form.$submitted) && form[\'data1\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="form-group col-md-6" data-ng-if="element.data1 && randomName" data-ng-class="{\'has-error\': (form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$invalid}">\n  <input type="url" ng-model="element.data2" placeholder="{{ \'APPLICATION_URL\' | translate }}" name="data2{{randomName}}" class="form-control" required/>\n  <span class="help-block">\n    {{\'APPLICATION_URL\' | translate}}\n  </span>\n  <span data-ng-show="(form[\'data2\'+randomName].$touched || form.$submitted) && form[\'data2\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),a.put("components/directives/condition/conditionBuilder.html",'<div data-ng-if="randomName" class="form-group col-md-4" data-ng-class="{\'has-error\': (form[\'field\'+randomName].$touched || form.$submitted) && form[\'field\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.field" name="field{{randomName}}" theme="bootstrap" data-ng-change="checkCondition(element.field)" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="condition.value as condition in service.services[serviceindex].conditions | filter: $select.search">\n      <div ng-bind-html="condition.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'field\'+randomName].$touched || form.$submitted) && form[\'field\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div data-ng-if="randomName && element.field" class="form-group col-md-4" data-ng-class="{\'has-error\': (form[\'operator\'+randomName].$touched || form.$submitted) && form[\'operator\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.operator" name="operator{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="operator.value as operator in _.find(service.services[serviceindex].conditions,{value:element.field}).operators | filter: $select.search">\n      <div ng-bind-html="operator.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'operator\'+randomName].$touched || form.$submitted) && form[\'operator\'+randomName].$error.required" class="help-block help-block-error">\n    <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n  </span>\n</div>\n<div class="col-md-4" data-ng-if="elementType === \'input\' && randomName && element.field" data-ng-class="{\'has-error\': (form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$invalid}">\n  <input type="text" ng-model="element.value" class="form-control" name="value{{randomName}}" required/>\n  <span data-ng-show="(form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$error.required" class="help-block help-block-error">\n      <strong>{{\'APPLICATION_WARNING\' | translate}}!</strong> {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n    </span>\n</div>\n<div class="form-group col-md-4" data-ng-if="elementType === \'select\' && randomName && element.field" data-ng-class="{\'has-error\': (form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$invalid}">\n  <ui-select data-ng-model="element.value" name="value{{randomName}}" theme="bootstrap" required>\n    <ui-select-match>{{$select.selected.name | translate}}</ui-select-match>\n    <ui-select-choices repeat="value.value as value in values| filter: $select.search">\n      <div ng-bind-html="value.name | translate | highlight: $select.search"></div>\n    </ui-select-choices>\n  </ui-select>\n  <span data-ng-show="(form[\'value\'+randomName].$touched || form.$submitted) && form[\'value\'+randomName].$error.required" class="help-block help-block-error">\n'+"    <strong>{{'APPLICATION_WARNING' | translate}}!</strong> {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n  </span>\n</div>\n"),
+a.put("components/factories/xNotificationLicense/xNotificationLicense.html",'<div class="ui-notification alert alert-block" ng-class="class" style="width: 410px;">\n  <h4 class="alert-heading">\n    <i class="{{icon}}"></i> {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_YOUR_LICENSE_IS_GOING_TO_EXPIRE\' | translate}}! <a ng-click="more()" style="color: blue;">More.</a>\n  </h4>\n</div>\n'),a.put("components/footer/footer.html",'<!-- BEGIN FOOTER -->\n<div class="page-footer" data-ng-init="initFooter()">\n  <div class="page-footer-inner">\n     xCALLY Motion v. {{info.version}} | 2016 - {{year + 1}} &copy; Powered by Xenialab <ng-bind-html data-ng-if="license.custom && !settings.defaultFooterWhiteLabel && settings.footerWhiteLabel" ng-bind-html="\'| \'+settings.footerWhiteLabel"></ng-bind-html>\n  </div>\n  <div class="scroll-to-top">\n    <i class="icon-arrow-up"></i>\n  </div>\n</div>\n<!-- END FOOTER -->\n'),a.put("components/header/header.html",'<!-- BEGIN HEADER INNER -->\n<div class="page-header-inner" data-ng-init="initHeader()">\n  <!-- BEGIN LOGO -->\n  <div class="page-logo">\n    <a href="/">\n      <img data-ng-if="settings.defaultLogo || !license.custom" ng-src="assets/images/logo.png" alt="logo" class="logo-default"/>\n      <img data-ng-if="!settings.defaultLogo && license.custom" ng-src="api/settings/logo/main/{{settings.logo ? settings.logo : \'logo\'}}" alt="logo" class="logo-default custom-logo" onError="this.onerror=null;this.src=\'assets/images/logo.png\';"/>\n    </a>\n    <div class="menu-toggler sidebar-toggler" data-ng-click="toggleSidebar()"></div>\n  </div>\n\n  <!-- END LOGO -->\n  <!-- BEGIN HEADER SEARCH BOX -->\n  <!-- DOC: Apply "search-form-expanded" right after the "search-form" class to have half expanded search box -->\n  <form ng-repeat="call in activeCalls | limitTo:2" class="search-form search-form-expanded">\n    <div class="input-group">\n      <input type="text" class="form-control" value="{{call.calleridnum}}" readonly>\n      <span class="input-group-btn">\n        <a href="javascript:;" class="btn submit inactive-link"><i class="icon-earphones-alt"></i></a>\n      </span>\n    </div>\n  </form>\n  <!-- END HEADER SEARCH BOX -->\n  <!-- BEGIN RESPONSIVE MENU TOGGLER -->\n  <a href="javascript:;" class="menu-toggler responsive-toggler" data-toggle="collapse" data-target=".navbar-collapse"></a>\n  <!-- END RESPONSIVE MENU TOGGLER -->\n  <!-- BEGIN TOP NAVIGATION MENU -->\n  <div class="top-menu">\n    <ul class="nav navbar-nav pull-right">\n      <!-- DOC: Apply "dropdown-dark" class after below "dropdown-extended" to change the dropdown styte -->\n\n      <!-- BEGIN USER LOGIN DROPDOWN -->\n      <!-- DOC: Apply "dropdown-dark" class after below "dropdown-extended" to change the dropdown styte -->\n      <li class="dropdown dropdown-user">\n        <a href="#" class="dropdown-toggle" dropdown-menu-hover data-toggle="dropdown" data-close-others="true">\n          <img class="img-circle" data-ng-src="api/users/avatar/{{getCurrentUser().userpic || \'unknown_avatar\'}}" alt="...">\n          <span class="username username-hide-on-mobile">\n            {{ getCurrentUser().fullname }}\n          </span>\n          <i class="fa fa-angle-down"></i>\n        </a>\n        <ul class="dropdown-menu dropdown-menu-default">\n          <li>\n            <a ng-href=" {{isAdmin() ? \'/staff/users/view/\'+getCurrentUser().id+\'/account\' : \'/staff/agents/view/\'+getCurrentUser().id+\'/account\'}}">\n              <i class="icon-key"></i>{{\'APPLICATION_CHANGE_PASSWORD\' | translate}}\n            </a>\n          </li>\n          <li data-ng-click="logout()">\n            <a href="#">\n              <i class="icon-logout"></i> Log Out\n            </a>\n          </li>\n        </ul>\n      </li>\n      <!-- END USER LOGIN DROPDOWN -->\n      <!-- BEGIN QUICK SIDEBAR TOGGLER -->\n      <!-- DOC: Apply "dropdown-dark" class after below "dropdown-extended" to change the dropdown styte -->\n      <!-- <li class="dropdown dropdown-quick-sidebar-toggler" data-ng-click="toggleQuickSidebar()">\n      <a href="#" class="dropdown-toggle">\n      <i class="icon-logout"></i>\n    </a>\n  </li> -->\n  <!-- END QUICK SIDEBAR TOGGLER -->\n</ul>\n<ul class="nav navbar-nav pull-right">\n  <!-- BEGIN LANGUAGE BAR -->\n  <li class="dropdown dropdown-language">\n    <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n      <img ng-src="assets/images/flags/{{ language }}.png">\n      <i class="fa fa-angle-down"></i>\n    </a>\n    <ul class="dropdown-menu dropdown-menu-default scrollable-menu">\n      <li>\n        <a href="#" ng-click="changeLanguage(\'ar\')">\n          <img alt="" src="assets/images/flags/ar.png"> {{\'APPLICATION_ARABIC\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'da\')">\n          <img alt="" src="assets/images/flags/da.png"> {{\'APPLICATION_DANISH\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'de\')">\n          <img alt="" src="assets/images/flags/de.png"> {{\'APPLICATION_GERMAN\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'en_EN\')">\n          <img alt="" src="assets/images/flags/en_EN.png"> {{\'APPLICATION_ENGLISH\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'es\')">\n          <img alt="" src="assets/images/flags/es.png"> {{\'APPLICATION_SPANISH\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'fi\')">\n          <img alt="" src="assets/images/flags/fi.png"> {{\'APPLICATION_FINNISH\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'fr\')">\n          <img alt="" src="assets/images/flags/fr.png"> {{\'APPLICATION_FRENCH\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'hi\')">\n          <img alt="" src="assets/images/flags/hi.png"> {{\'APPLICATION_HINDI\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'it\')">\n          <img alt="" src="assets/images/flags/it.png"> {{\'APPLICATION_ITALIAN\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'ja\')">\n          <img alt="" src="assets/images/flags/ja.png"> {{\'APPLICATION_JAPANASE\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'ko\')">\n          <img alt="" src="assets/images/flags/ko.png"> {{\'APPLICATION_KOREAN\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'nl\')">\n          <img alt="" src="assets/images/flags/nl.png"> {{\'APPLICATION_DUTCH\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'no\')">\n          <img alt="" src="assets/images/flags/no.png"> {{\'APPLICATION_NORWEGIAN\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'pt-BR\')">\n          <img alt="" src="assets/images/flags/pt-BR.png"> {{\'APPLICATION_PORTUGUESE_BRAZIL\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'pt-PT\')">\n          <img alt="" src="assets/images/flags/pt-PT.png"> {{\'APPLICATION_PORTUGUESE_PORTUGAL\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'ru\')">\n          <img alt="" src="assets/images/flags/ru.png"> {{\'APPLICATION_RUSSIAN\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'sv\')">\n          <img alt="" src="assets/images/flags/sv.png"> {{\'APPLICATION_SWEDISH\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'tr\')">\n          <img alt="" src="assets/images/flags/tr.png"> {{\'APPLICATION_TURKISH\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'fa\')">\n          <img alt="" src="assets/images/flags/fa.png"> {{\'APPLICATION_PERSIAN\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'zh-CN\')">\n          <img alt="" src="assets/images/flags/zh-CN.png"> {{\'APPLICATION_CHINESE_SIMPLIFIED\' | translate}}\n        </a>\n      </li>\n      <li>\n        <a href="#" ng-click="changeLanguage(\'zh-TW\')">\n          <img alt="" src="assets/images/flags/zh-TW.png"> {{\'APPLICATION_CHINESE_TRADITIONAL\' | translate}}\n        </a>\n      </li>\n    </ul>\n  </li>\n  <!-- END LANGUAGE BAR -->\n</ul>\n<ul data-ng-if="getCurrentUser().role === \'agent\'" class="nav navbar-nav pull-right header-ul-with-separator padding-side-7" data-ng-class="{\'paused-header\':headerAgent.voicePause || headerAgent.mailPause || headerAgent.chatPause || headerAgent.faxPause || headerAgent.smsPause || headerAgent.openchannelPause}">\n  <li class="dropdown dropdown-user" >\n    <a href="#" class="dropdown-toggle custom-header-a" dropdown-menu-hover data-toggle="dropdown" data-close-others="true" style="cursor:default;">\n      <div>{{(headerAgent.voicePause || headerAgent.mailPause || headerAgent.chatPause || headerAgent.faxPause || headerAgent.smsPause || headerAgent.openchannelPause) ? ((!headerAgent.voicePause || !headerAgent.mailPause || !headerAgent.chatPause || !headerAgent.faxPause || !headerAgent.smsPause || !headerAgent.openchannelPause) ? \'(\'+(\'APPLICATION_PARTIAL\' | translate) + \') \'+headerAgent.pauseType : headerAgent.pauseType) : \'READY\'}}</div>\n      <div data-ng-if="headerAgent.voicePause || headerAgent.mailPause || headerAgent.chatPause || headerAgent.faxPause || headerAgent.smsPause || headerAgent.openchannelPause"><css-timer start-time="headerAgent.lastPauseAt"></css-timer></div>\n    </a>\n  </li>\n  <li class="dropdown dropdown-user" data-ng-if="headerAgent.voicePause || headerAgent.mailPause || headerAgent.chatPause || headerAgent.faxPause || headerAgent.smsPause || headerAgent.openchannelPause">\n    <a href="#" class="dropdown-toggle padding-side-7 header-bar-button header-bar-button-controls" dropdown-menu-hover data-toggle="dropdown" data-close-others="true" data-ng-click="headerPause(\'unpause\')">\n      <i class="fa fa-play font-green"></i></a>\n    </li>\n    <li class="dropdown dropdown-user" data-ng-if="headerAgent.voicePause || headerAgent.mailPause || headerAgent.chatPause || headerAgent.faxPause || headerAgent.smsPause || headerAgent.openchannelPause">\n      <a href="#" class="dropdown-toggle header-bar-button" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n        <i class="fa fa-angle-down"></i>\n      </a>\n      <ul class="dropdown-menu dropdown-menu-default scrollable-menu">\n        <li data-ng-if="headerAgent.voicePause">\n          <a href="#" data-ng-click="headerPause(\'unpause\',null,\'voice\')">\n            <i class="fa fa-play font-green"></i> {{\'APPLICATION_VOICE\' | translate}}\n          </a>\n        </li>\n        <li data-ng-if="headerAgent.mailPause">\n          <a href="#" data-ng-click="headerPause(\'unpause\',null,\'mail\')">\n            <i class="fa fa-play font-green"></i> {{\'APPLICATION_MAIL\' | translate}}\n          </a>\n        </li>\n        <li data-ng-if="headerAgent.chatPause">\n          <a href="#" data-ng-click="headerPause(\'unpause\',null,\'chat\')">\n            <i class="fa fa-play font-green"></i> {{\'APPLICATION_CHAT\' | translate}}\n          </a>\n        </li>\n        <li data-ng-if="headerAgent.faxPause">\n          <a href="#" data-ng-click="headerPause(\'unpause\',null,\'fax\')">\n            <i class="fa fa-play font-green"></i> {{\'APPLICATION_FAX\' | translate}}\n          </a>\n        </li>\n        <li data-ng-if="headerAgent.smsPause">\n          <a href="#" data-ng-click="headerPause(\'unpause\',null,\'sms\')">\n            <i class="fa fa-play font-green"></i> {{\'APPLICATION_SMS\' | translate}}\n          </a>\n        </li>\n        <li data-ng-if="headerAgent.openchannelPause">\n          <a href="#" data-ng-click="headerPause(\'unpause\',null,\'openchannel\')">\n            <i class="fa fa-play font-green"></i> {{\'APPLICATION_OPEN_CHANNEL\' | translate}}\n          </a>\n        </li>\n      </ul>\n    </li>\n    <li class="dropdown dropdown-user">\n      <a href="#" class="dropdown-toggle padding-side-7 header-bar-button header-bar-button-controls" dropdown-menu-hover data-toggle="dropdown" data-close-others="true" data-ng-click="headerPause(\'pause\',\'DEFAULT PAUSE\')">\n        <i class="fa fa-pause font-yellow"></i></a>\n      </li>\n      <li class="dropdown dropdown-user" data-ng-if="headerPauses.length">\n        <a href="#" class="dropdown-toggle header-bar-button" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n          <i class="fa fa-angle-down"></i>\n        </a>\n        <ul class="dropdown-menu dropdown-menu-default scrollable-menu">\n          <li data-ng-repeat="pause in headerPauses">\n            <a href="#" data-ng-click="headerPause(\'pause\',pause.name)">\n              {{pause.name}}\n            </a>\n          </li>\n        </ul>\n      </li>\n    </ul>\n    <ul class="nav navbar-nav pull-right" data-ng-if="getCurrentUser().role === \'agent\'" >\n      <li data class="dropdown dropdown-extended dropdown-notification" id="header_agent_notification_bar" data-ng-click="agentNotifications.agent.new = 0;">\n        <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n          <i class="icon-earphones-alt"></i>\n          <span class="badge badge-default" data-ng-if="agentNotifications.agent.new">\n            {{agentNotifications.agent.new}} </span>\n          </a>\n          <ul class="dropdown-menu tabbed-dropdown">\n            <li class="external">\n              <h3><span class="bold">{{\'APPLICATION_LAST_VOICE_NOTIFICATIONS\' | translate}}</span></h3>\n            </li>\n            <li>\n              <ul class="nav nav-tabs">\n                <li class="active">\n                  <a href="#" data-target="#tab_1_1" data-toggle="tab">{{ \'APPLICATION_INBOUND\' | translate}}</a>\n                </li>\n                <li>\n                  <a href="#" data-target="#tab_1_2" data-toggle="tab">{{ \'APPLICATION_OUTBOUND\' | translate}}</a>\n                </li>\n              </ul>\n\n              <div class="tab-content">\n                <!-- GENERAL TAB -->\n                <div class="tab-pane active" id="tab_1_1">\n                  <!-- BEGIN UI-GRID SPINNER -->\n                  <span us-spinner spinner-key="agent-spinner-grid" data-ng-if="busyLoad.agent.busy" spinner-start-active="true"></span>\n                  <!-- END UI-GRID SPINNER -->\n                  <ul class="dropdown-menu-list scrollable-menu" style="height: 250px;" data-handle-color="#637283" infinite-scroll="loadNotifications(\'agent\')" can-load=\'!busyLoad.agent.busy\' treshold="261">\n                    <li data-ng-repeat="notification in agentNotifications.agent.rows">\n                      <a href="javascript:;" style="cursor:default;">\n                        <div class="row">\n                          <div class="col-md-1">\n                            <img src="assets/images/media/inboundroute.png" style="width:25px;height:25px;" alt="">\n                          </div>\n                          <div class="col-md-10">\n                            <div>{{\'APPLICATION_VOICE_NEW_CALL\' | translate}}<span data-ng-if="notification.status && notification.status !== \'none\'" class="badge float-right" data-ng-class="{\'badge-success\':notification.status === \'taken\',\'badge-danger\':notification.status === \'lost\',\'badge-warning\':notification.status === \'rejected\' || notification.status === \'busy\',\'badge-info\':notification.status === \'taken_elsewhere\'}">{{\'APPLICATION_VOICE_\'+notification.status.toUpperCase() | translate}}</span></div>\n                            <div><span class="time float-left" style="max-width:none !important;"><span am-time-ago="notification.updatedAt"></span></span></div>\n                          </div>\n                        </div>\n                        <div>\n                          <span class="message">{{notification.dialstring ? \'APPLICATION_TO\' : \'APPLICATION_FROM\' | translate}}: <span class="span-link" data-ng-click="chooseContact(notification.calleridnum)">{{notification.calleridnum}}</span></span>\n                        </div>\n                        <div data-ng-if="notification.status === \'taken_elsewhere\'">\n                          <span class="message">{{\'APPLICATION_AGENT_NAME\' | translate}}: <span ><b>{{notification.answeredelsewheremembername}}</b></span></span>\n                        </div>\n                        <div data-ng-if="notification.status === \'taken\' && notification.lastevent === \'complete\'">\n                          <span class="message">{{\'APPLICATION_COMPLETED_BY\' | translate}}: <span ><b>{{\'APPLICATION_VOICE_\'+notification.reason.toUpperCase() | translate}}</b></span></span>\n                        </div>\n                      </a>\n                    </li>\n                  </ul>\n                </div>\n                <div class="tab-pane" id="tab_1_2">\n                  <!-- BEGIN UI-GRID SPINNER -->\n                  <span us-spinner spinner-key="dial-spinner-grid" data-ng-if="busyLoad.dial.busy" spinner-start-active="true"></span>\n                  <!-- END UI-GRID SPINNER -->\n                  <ul class="dropdown-menu-list scrollable-menu" style="height: 250px;" data-handle-color="#637283" infinite-scroll="loadNotifications(\'dial\')" can-load=\'!busyLoad.dial.busy\' treshold="261">\n                    <li data-ng-repeat="notification in agentNotifications.dial.rows">\n                      <a href="javascript:;" style="cursor:default;">\n                        <div class="row">\n                          <div class="col-md-1">\n                            <img src="assets/images/media/outboundroute.png" style="width:25px;height:25px;" alt="">\n                          </div>\n                          <div class="col-md-10">\n                            <div>{{\'APPLICATION_VOICE_NEW_CALL\' | translate}}<span data-ng-if="notification.status && notification.status !== \'none\'" class="badge float-right" data-ng-class="{\'badge-success\':notification.status === \'taken\',\'badge-danger\':notification.status === \'lost\',\'badge-warning\':notification.status === \'rejected\',\'badge-info\':notification.status === \'taken_elsewhere\'}">{{\'APPLICATION_VOICE_\'+notification.status.toUpperCase() | translate}}</span></div>\n                            <div><span class="time float-left" style="max-width:none !important;"><span am-time-ago="notification.updatedAt"></span></span></div>\n                          </div>\n                        </div>\n                        <div>\n                          <span class="message">{{\'APPLICATION_TO\' | translate}}: <span class="span-link" data-ng-click="chooseContact(notification.destcalleridnum)">{{notification.destcalleridnum}}</span></span>\n                        </div>\n                      </a>\n                    </li>\n                  </ul>\n                </div>\n              </div>\n            </li>\n          </ul>\n        </li>\n        <li data ng-if="license.mail" class="dropdown dropdown-extended dropdown-notification" id="header_mail_notification_bar" data-ng-click="agentNotifications.mail.new = 0;">\n          <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n            <i class="icon-envelope-open"></i>\n            <span class="badge badge-default" data-ng-if="agentNotifications.mail.new">\n              {{agentNotifications.mail.new}} </span>\n            </a>\n            <ul class="dropdown-menu">\n              <li class="external">\n                <h3><span class="bold">{{\'APPLICATION_LAST_MAIL_NOTIFICATIONS\' | translate}}</span></h3>\n              </li>\n              <li>\n                <!-- BEGIN UI-GRID SPINNER -->\n                <span us-spinner spinner-key="mail-spinner-grid" data-ng-if="busyLoad.mail.busy" spinner-start-active="true"></span>\n                <!-- END UI-GRID SPINNER -->\n                <ul class="dropdown-menu-list scrollable-menu" style="height: 250px;" data-handle-color="#637283" infinite-scroll="loadNotifications(\'mail\')" can-load=\'!busyLoad.mail.busy\' treshold="261">\n                  <li data-ng-repeat="notification in agentNotifications.mail.rows">\n                    <a href="javascript:;" style="cursor:default;">\n                      <div class="row">\n                        <div class="col-md-1">\n                          <img src="assets/images/media/enquiry.png" style="width:25px;height:25px;" alt="">\n                        </div>\n                        <div class="col-md-10">\n                          <div>{{\'APPLICATION_NEW_MESSAGE\' | translate}}<span data-ng-if="notification.status && notification.status !== \'none\'" class="badge float-right" data-ng-class="{\'badge-success pointer-cursor\':notification.status === \'taken\',\'badge-danger\':notification.status === \'lost\',\'badge-warning\':notification.status === \'rejected\'}" data-ng-click="notification.status === \'taken\' && openRoom(notification.roomid, \'mailRoom\')">{{\'APPLICATION_MESSAGE_\'+notification.status.toUpperCase() | translate}} <i data-ng-if="notification.status === \'taken\'" class="fa fa-envelope"></i></span></div>\n                          <div><span class="time float-left" style="max-width:none !important;"><span am-time-ago="notification.updatedAt"></span></span></div>\n                        </div>\n                      </div>\n                      <div>\n                        <span class="message">{{\'APPLICATION_FROM\' | translate}}: <span class="span-link" data-ng-click="openContact(\'mail\',notification.accountid,notification.from)">{{notification.from}}</span></span>\n                      </div>\n                    </a>\n                  </li>\n                </ul>\n              </li>\n            </ul>\n          </li>\n          <li data ng-if="license.chat" class="dropdown dropdown-extended dropdown-notification" id="header_chat_notification_bar" data-ng-click="agentNotifications.chat.new = 0;">\n            <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n              <i class="icon-bubble"></i>\n              <span class="badge badge-default" data-ng-if="agentNotifications.chat.new">\n                {{agentNotifications.chat.new}} </span>\n              </a>\n              <ul class="dropdown-menu">\n                <li class="external">\n                  <h3><span class="bold">{{\'APPLICATION_LAST_CHAT_NOTIFICATIONS\' | translate}}</span></h3>\n                </li>\n                <li>\n                  <!-- BEGIN UI-GRID SPINNER -->\n                  <span us-spinner spinner-key="chat-spinner-grid" data-ng-if="busyLoad.chat.busy" spinner-start-active="true"></span>\n                  <!-- END UI-GRID SPINNER -->\n                  <ul class="dropdown-menu-list scrollable-menu" style="height: 250px;" data-handle-color="#637283" infinite-scroll="loadNotifications(\'chat\')" can-load=\'!busyLoad.chat.busy\' treshold="261">\n                    <li data-ng-repeat="notification in agentNotifications.chat.rows">\n                      <a href="javascript:;" style="cursor:default;">\n                        <div class="row">\n                          <div class="col-md-1">\n                            <img src="assets/images/media/website.png" style="width:25px;height:25px;" alt="">\n                          </div>\n                          <div class="col-md-10">\n                            <div>{{\'APPLICATION_NEW_CHAT_REQUEST\' | translate}}<span data-ng-if="notification.status && notification.status !== \'none\'" class="badge float-right" data-ng-class="{\'badge-success pointer-cursor\':notification.status === \'taken\',\'badge-danger\':notification.status === \'lost\',\'badge-warning\':notification.status === \'rejected\'}" data-ng-click="notification.status === \'taken\' && openRoom(notification.roomid, \'chatRoom\')">{{\'APPLICATION_CHAT_\'+notification.status.toUpperCase() | translate}} <i data-ng-if="notification.status === \'taken\'" class="fa fa-envelope"></i></span></div>\n                            <div><span class="time float-left" style="max-width:none !important;"><span am-time-ago="notification.updatedAt"></span></span></div>\n                          </div>\n                        </div>\n                        <div>\n                          <span class="message">{{\'APPLICATION_FROM\' | translate}}: <span class="span-link" data-ng-click="openContact(\'chat\',notification.websiteid,notification.visitoremail)">{{notification.visitoremail}}</span></span>\n                        </div>\n                      </a>\n                    </li>\n                  </ul>\n                </li>\n              </ul>\n            </li>\n            <li data ng-if="license.fax" class="dropdown dropdown-extended dropdown-notification" id="header_fax_notification_bar" data-ng-click="agentNotifications.fax.new = 0;">\n              <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n                <i class="fa fa-fax"></i>\n                <span class="badge badge-default" data-ng-if="agentNotifications.fax.new">\n                  {{agentNotifications.fax.new}} </span>\n                </a>\n                <ul class="dropdown-menu">\n                  <li class="external">\n                    <h3><span class="bold">{{\'APPLICATION_LAST_FAX_NOTIFICATIONS\' | translate}}</span></h3>\n                  </li>\n                  <li>\n                    <!-- BEGIN UI-GRID SPINNER -->\n                    <span us-spinner spinner-key="fax-spinner-grid" data-ng-if="busyLoad.fax.busy" spinner-start-active="true"></span>\n                    <!-- END UI-GRID SPINNER -->\n                    <ul class="dropdown-menu-list scrollable-menu" style="height: 250px;" data-handle-color="#637283" infinite-scroll="loadNotifications(\'fax\')" can-load=\'!busyLoad.fax.busy\' treshold="261">\n                      <li data-ng-repeat="notification in agentNotifications.fax.rows">\n                        <a href="javascript:;" style="cursor:default;">\n                          <div class="row">\n                            <div class="col-md-1">\n                              <img src="assets/images/media/fax.png" style="width:25px;height:25px;" alt="">\n                            </div>\n                            <div class="col-md-10">\n                              <div>{{\'APPLICATION_NEW_FAX_REQUEST\' | translate}}<span data-ng-if="notification.status && notification.status !== \'none\'" class="badge float-right" data-ng-class="{\'badge-success pointer-cursor\':notification.status === \'taken\',\'badge-danger\':notification.status === \'lost\',\'badge-warning\':notification.status === \'rejected\'}" data-ng-click="notification.status === \'taken\' && openRoom(notification.roomid, \'faxRoom\')">{{\'APPLICATION_FAX_\'+notification.status.toUpperCase() | translate}} <i data-ng-if="notification.status === \'taken\'" class="fa fa-envelope"></i></span></div>\n                              <div><span class="time float-left" style="max-width:none !important;"><span am-time-ago="notification.updatedAt"></span></span></div>\n                            </div>\n                          </div>\n                          <div>\n                            <span class="message">{{\'APPLICATION_FROM\' | translate}}: <span class="span-link" data-ng-click="openContact(\'fax\',notification.accountid,notification.from)">{{notification.from}}</span></span>\n                          </div>\n                        </a>\n                      </li>\n                    </ul>\n                  </li>\n                </ul>\n              </li>\n              <li data ng-if="license.messaging" class="dropdown dropdown-extended dropdown-notification" id="header_sms_notification_bar" data-ng-click="agentNotifications.sms.new = 0;">\n                <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n                  <i class="glyphicon glyphicon-comment"></i>\n                  <span class="badge badge-default" data-ng-if="agentNotifications.sms.new">\n                    {{agentNotifications.sms.new}} </span>\n                  </a>\n                  <ul class="dropdown-menu">\n                    <li class="external">\n                      <h3><span class="bold">{{\'APPLICATION_LAST_SMS_NOTIFICATIONS\' | translate}}</span></h3>\n                    </li>\n                    <li>\n                      <!-- BEGIN UI-GRID SPINNER -->\n                      <span us-spinner spinner-key="sms-spinner-grid" data-ng-if="busyLoad.sms.busy" spinner-start-active="true"></span>\n                      <!-- END UI-GRID SPINNER -->\n                      <ul class="dropdown-menu-list scrollable-menu" style="height: 250px;" data-handle-color="#637283" infinite-scroll="loadNotifications(\'sms\')" can-load=\'!busyLoad.sms.busy\' treshold="261">\n                        <li data-ng-repeat="notification in agentNotifications.sms.rows">\n                          <a href="javascript:;" style="cursor:default;">\n                            <div class="row">\n                              <div class="col-md-1">\n                                <img src="assets/images/media/sms.png" style="width:25px;height:25px;" alt="">\n                              </div>\n                              <div class="col-md-10">\n                                <div>{{\'APPLICATION_NEW_SMS_REQUEST\' | translate}}<span data-ng-if="notification.status && notification.status !== \'none\'" class="badge float-right" data-ng-class="{\'badge-success pointer-cursor\':notification.status === \'taken\',\'badge-danger\':notification.status === \'lost\',\'badge-warning\':notification.status === \'rejected\'}" data-ng-click="notification.status === \'taken\' && openRoom(notification.roomid, \'smsRoom\')">{{\'APPLICATION_SMS_\'+notification.status.toUpperCase() | translate}} <i data-ng-if="notification.status === \'taken\'" class="fa fa-envelope"></i></span></div>\n                                <div><span class="time float-left" style="max-width:none !important;"><span am-time-ago="notification.updatedAt"></span></span></div>\n                              </div>\n                            </div>\n                            <div>\n                              <span class="message">{{\'APPLICATION_FROM\' | translate}}: <span class="span-link" data-ng-click="openContact(\'sms\',notification.accountid,notification.from)">{{notification.from}}</span></span>\n                            </div>\n                          </a>\n                        </li>\n                      </ul>\n                    </li>\n                  </ul>\n                </li>\n                <li data ng-if="license.openchannel" class="dropdown dropdown-extended dropdown-notification" id="header_openchannel_notification_bar" data-ng-click="agentNotifications.openchannel.new = 0;">\n                  <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">\n                    <i class="icon-globe"></i>\n                    <span class="badge badge-default" data-ng-if="agentNotifications.openchannel.new">\n                      {{agentNotifications.openchannel.new}} </span>\n                    </a>\n                    <ul class="dropdown-menu">\n                      <li class="external">\n                        <h3><span class="bold">{{\'APPLICATION_LAST_OPENCHANNEL_NOTIFICATIONS\' | translate}}</span></h3>\n                      </li>\n                      <li>\n                        <!-- BEGIN UI-GRID SPINNER -->\n                        <span us-spinner spinner-key="openchannel-spinner-grid" data-ng-if="busyLoad.openchannel.busy" spinner-start-active="true"></span>\n                        <!-- END UI-GRID SPINNER -->\n                        <ul class="dropdown-menu-list scrollable-menu" style="height: 250px;" data-handle-color="#637283" infinite-scroll="loadNotifications(\'openchannel\')" can-load=\'!busyLoad.openchannel.busy\' treshold="261">\n                          <li data-ng-repeat="notification in agentNotifications.openchannel.rows">\n                            <a href="javascript:;" style="cursor:default;">\n                              <div class="row">\n                                <div class="col-md-1">\n                                  <img src="assets/images/media/openchannel.png" style="width:25px;height:25px;" alt="">\n                                </div>\n                                <div class="col-md-10">\n'+"                                  <div>{{'APPLICATION_NEW_OPENCHANNEL_REQUEST' | translate}}<span data-ng-if=\"notification.status && notification.status !== 'none'\" class=\"badge float-right\" data-ng-class=\"{'badge-success pointer-cursor':notification.status === 'taken','badge-danger':notification.status === 'lost','badge-warning':notification.status === 'rejected'}\" data-ng-click=\"notification.status === 'taken' && openRoom(notification.roomid, 'openchannelRoom')\">{{'APPLICATION_OPENCHANNEL_'+notification.status.toUpperCase() | translate}} <i data-ng-if=\"notification.status === 'taken'\" class=\"fa fa-envelope\"></i></span></div>\n                                  <div><span class=\"time float-left\" style=\"max-width:none !important;\"><span am-time-ago=\"notification.updatedAt\"></span></span></div>\n                                </div>\n                              </div>\n                              <!-- <div>\n                              <span class=\"message\">{{'APPLICATION_FROM' | translate}}: <span class=\"span-link\" data-ng-click=\"openContact('openchannel',notification.accountid,notification.from)\">{{notification.from}}</span></span>\n                            </div> -->\n                          </a>\n                        </li>\n                      </ul>\n                    </li>\n                  </ul>\n                </li>\n              </ul>\n            </div>\n            <!-- END TOP NAVIGATION MENU -->\n          </div>\n          <!-- END HEADER INNER -->\n"),
+a.put("components/modal/delete.html",'<div class="modal-header">\n  <button ng-if="modal.dismissable" type="button" ng-click="$dismiss()" class="close">&times;</button>\n  <h4 ng-if="modal.title" ng-bind="modal.title" class="modal-title"></h4>\n</div>\n<div class="modal-body">\n  <p ng-if="modal.text" ng-bind="modal.text"></p>\n  <div ng-if="modal.html" ng-bind-html="modal.html"></div>\n</div>\n<div class="modal-footer">\n  <button ng-repeat="button in modal.buttons" ng-class="button.classes" ng-click="button.click($event)" ng-bind="button.text" class="btn"></button>\n</div>\n'),a.put("components/sidebar/sidebar.html",'<div id="page-sidebar" class="page-sidebar navbar-collapse collapse" data-ng-init="initSidebar()">\n  <!-- BEGIN SIDEBAR MENU -->\n  <!-- DOC: Apply "page-sidebar-menu-light" class right after "page-sidebar-menu" to enable light sidebar menu style(without borders) -->\n  <!-- DOC: Apply "page-sidebar-menu-hover-submenu" class right after "page-sidebar-menu" to enable hoverable(hover vs accordion) sub menu mode -->\n  <!-- DOC: Apply "page-sidebar-menu-closed" class right after "page-sidebar-menu" to collapse("page-sidebar-closed" class must be applied to the body element) the sidebar sub menu mode -->\n  <!-- DOC: Set data-auto-scroll="false" to disable the sidebar from auto scrolling/focusing -->\n  <!-- DOC: Set data-keep-expand="true" to keep the submenues expanded -->\n  <!-- DOC: Set data-auto-speed="200" to adjust the sub menu slide up/down speed -->\n  <ul data-ng-click="mainTab.active=true" class="page-sidebar-menu" data-keep-expanded="false" data-auto-scroll="true" data-slide-speed="200" data-ng-class="{\'page-sidebar-menu-closed\': settings.layout.pageSidebarClosed}" data-ng-init="getSidebarIntegrations()">\n    <!-- DOC: To remove the search box from the sidebar you just need to completely remove the below "sidebar-search-wrapper" LI element -->\n    <li class="sidebar-search-wrapper">\n      <!-- BEGIN RESPONSIVE QUICK SEARCH FORM -->\n      <!-- DOC: Apply "sidebar-search-bordered" class the below search form to have bordered search box -->\n      <!-- DOC: Apply "sidebar-search-bordered sidebar-search-solid" class the below search form to have bordered & solid search box -->\n      <form class="sidebar-search sidebar-search-bordered" action="extra_search.html" method="POST">\n        <a href="javascript:;" class="remove">\n          <i class="icon-close"></i>\n        </a>\n      </form>\n      <!-- END RESPONSIVE QUICK SEARCH FORM -->\n    </li>\n\n    <!-- START DASHBOARD CASE -->\n    <li class="start" data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[1])" data-ng-class="{active: $state.includes(\'main.dashboard\')}">\n      <a href="/dashboard/voice">\n        <i class="icon-rocket"></i>\n        <span class="title">{{\'APPLICATION_DASHBOARD\' | translate}}</span>\n        <span data-ng-if="$state.includes(\'main.dashboard\')" class="selected"></span>\n      </a>\n    </li>\n    <!-- END DASHBOARD CASE -->\n\n    <!-- START YOURDASHBOARD LIST CASE -->\n    <li data-ng-if="::(!Auth.isUser() || userModules[2])" data-ng-class="{active: $state.is(\'main.tools.yourdashboards.show\')}">\n      <a href="javascript:;">\n        <i class="fa fa-tachometer"></i>\n        <span class="title" >{{\'APPLICATION_YOUR_DASHBOARDS\' | translate}}</span>\n        <span class="arrow" data-ng-class="{ open: $state.includes(\'main.tools.yourdashboards.show\') }"></span>\n      </a>\n      <ul class="sub-menu" data-ng-init="getSidebarDashboards()">\n        <li data-ng-class="{active: $stateParams.id == dashboard.id && $state.includes(\'main.tools.yourdashboards.show\')}" data-ng-repeat="dashboard in dashboards" data-ng-if="dashboard[Auth.getRole()]">\n          <a href="/tools/yourdashboards/show/{{dashboard.id}}" >\n            <i class="icon-screen-desktop"></i>\n            <span class="title" >{{dashboard.name}}  </span>\n          </a>\n        </li>\n      </ul>\n    </li>\n    <!-- END YOURDASHBOARD LIST CASE -->\n\n    <!-- START STAFF LIST CASE -->\n    <li data-ng-class="{active: $state.includes(\'main.staff\')}">\n      <a href="javascript:;" data-ng-if="::(Auth.isAdmin() || userModules[3])">\n        <i class="icon-puzzle"></i>\n        <span class="title" >{{\'APPLICATION_STAFF\' | translate}}</span>\n        <span class="arrow" data-ng-class="{open: $state.includes(\'main.staff\')}"></span>\n      </a>\n      <ul class="sub-menu">\n        <!-- START USERS CASE -->\n        <li data-ng-if="::(Auth.isAdmin())" data-ng-class="{active: $state.includes(\'main.staff.users\')}">\n          <a href="/staff/users/list">\n            <i class="icon-eye"></i>\n            <span class="title" >{{\'APPLICATION_USERS\' | translate}}</span>\n            <span data-ng-if="$state.includes(\'main.staff.users\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END USERS CASE -->\n\n        <!-- START AGENTS CASE -->\n        <li data-ng-if="::(Auth.isAdmin() || userModules[4])" data-ng-class="{active: $state.includes(\'main.staff.agents\')}">\n          <a href="/staff/agents/list">\n            <i class="icon-people"></i>\n            <span class="title" >{{\'APPLICATION_AGENTS\' | translate}}</span>\n            <span data-ng-if="$state.includes(\'main.staff.agents\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END AGENTS CASE -->\n\n        <!-- START TELEPHONES CASE -->\n        <li data-ng-if="::(Auth.isAdmin())" data-ng-class="{active: $state.includes(\'main.staff.telephones\')}">\n          <a href="/staff/telephones/list">\n            <i class="icon-phone"></i>\n            <span class="title" >{{\'APPLICATION_TELEPHONES\' | translate}}</span>\n            <span data-ng-if="$state.includes(\'main.staff.telephones\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END TELEPHONES CASE -->\n\n        <!-- START TEAMS CASE -->\n        <li data-ng-if="::(Auth.isAdmin())" data-ng-class="{active: $state.includes(\'main.staff.teams\')}">\n          <a href="/staff/teams/list">\n            <i class="icon-shield"></i>\n            <span class="title" >{{\'APPLICATION_TEAMS\' | translate}}</span>\n            <span data-ng-if="$state.includes(\'main.staff.teams\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END TEAMS CASE -->\n      </ul>\n    </li>\n    <!-- END STAFF LIST CASE -->\n\n    <!-- START CONTACT MANAGER LIST CASE -->\n    <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[5])" data-ng-class="{active: $state.includes(\'main.contactmanager\')}">\n      <a href="javascript:;" data-ng-class="{\'disabled-link\':!license.cm}">\n        <i class="icon-notebook"></i>\n        <span class="title disable-target" >{{\'APPLICATION_CONTACT_MANAGER\' | translate}}</span>\n        <span class="arrow" data-ng-class="{ open: $state.includes(\'main.contactmanager.contacts\')\n        || $state.includes(\'main.contactmanager.companies\')\n        || $state.includes(\'main.contactmanager.listss\') }"></span>\n      </a>\n      <ul class="sub-menu" data-ng-if="license.cm">\n        <!-- START CONTACTS CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.contactmanager.contacts\')}">\n          <a href="/contactmanager/contacts/list">\n            <i class=" fa fa-users"></i>\n            <span class="title" >{{\'APPLICATION_CONTACTS\' | translate}}</span>\n            <span data-ng-if="$state.includes(\'main.contactmanager.contacts\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END CONTACTS CASE -->\n        <!-- START COMPANIES CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.contactmanager.companies\')}" data-ng-if="::(Auth.isAdmin() || Auth.isUser())">\n          <a href="/contactmanager/companies/list">\n            <i class="icon-briefcase"></i>\n            <span class="title" >{{\'APPLICATION_COMPANIES\' | translate}}</span>\n            <span data-ng-if="$state.includes(\'main.contactmanager.companies\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END COMPANIES CASE -->\n        <!-- START LISTS CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.contactmanager.lists\')}" data-ng-if="::(Auth.isAdmin() || Auth.isUser())">\n          <a href="/contactmanager/lists/list">\n            <i class="fa fa-list-ul"></i>\n            <span class="title" >{{\'APPLICATION_LISTS\' | translate}}</span>\n            <span data-ng-if="$state.includes(\'main.contactmanager.lists\')" class="selected"></span>\n          </a>\n        </li>\n        <!-- END LISTS CASE -->\n      </ul>\n    </li>\n    <!-- END CONTACT MANAGER LIST CASE -->\n\n    <!-- START CHANNEL LIST CASE -->\n    <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[6])" data-ng-class="{active: $state.includes(\'main.channels\')}">\n      <a href="javascript:;">\n        <i class="fa fa-spinner"></i>\n        <span class="title" >{{\'APPLICATION_CHANNELS\' | translate}}</span>\n        <span class="arrow" data-ng-class="{open: $state.includes(\'main.channels\')}"></span>\n      </a>\n      <ul class="sub-menu">\n        <!-- START VOICE CASE -->\n        <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[7])" data-ng-class="{ active: $state.includes(\'main.channels.voice\') }">\n          <a href="javascript:;">\n            <i class="icon-earphones-alt"></i>\n            <span class="title">{{ \'APPLICATION_VOICE\' | translate}}</span>\n            <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.voice\') }"></span>\n          </a>\n\n          <ul class="sub-menu">\n            <li data-ng-if="::(Auth.isAdmin())" data-ng-class="{active: $state.includes(\'main.channels.voice.queues\')}">\n              <a href="/channels/voice/queues/list">\n                <i class="icon-docs"></i>\n                <span class="title">{{\'APPLICATION_QUEUES\' | translate}}</span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || userModules[21])">\n              <a href="javascript:;">\n                <i class="icon-directions"></i>\n                <span class="title"> {{ \'APPLICATION_ROUTES\' | translate}} </span>\n                <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.voice.routes\') }"></span>\n                <ul class="sub-menu">\n                  <li data-ng-class="{active: $state.includes(\'main.channels.voice.routes.inbound\')}">\n                    <a href="/channels/voice/routes/inbound/list">\n                      <i class="icon-call-in"></i>\n                      <span class="title"> {{\'APPLICATION_INBOUND\' | translate}} </span>\n                    </a>\n                  </li>\n                  <li data-ng-class="{active: $state.includes(\'main.channels.voice.routes.outbound\')}">\n                    <a href="/channels/voice/routes/outbound/list">\n                      <i class="icon-call-out"></i>\n                      <span class="title"> {{\'APPLICATION_OUTBOUND\' | translate}} </span>\n                    </a>\n                  </li>\n                  <li data-ng-class="{active: $state.includes(\'main.channels.voice.routes.internal\')}">\n                    <a href="/channels/voice/routes/internal/list">\n                      <i class="icon-reload"></i>\n                      <span class="title"> {{\'APPLICATION_INTERNALS\' | translate}} </span>\n                    </a>\n                  </li>\n                </ul>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || userModules[22])" data-ng-class="{active: $state.includes(\'main.channels.voice.contexts\')}">\n              <a href="/channels/voice/contexts/list">\n                <i class="icon-docs"></i>\n                <span class="title"> {{\'APPLICATION_CONTEXTS\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || userModules[23])" data-ng-class="{active: $state.includes(\'main.channels.voice.voicemails\')}">\n              <a href="/channels/voice/voicemails/list">\n                <i class="icon-envelope-letter"></i>\n                <span class="title"> {{\'APPLICATION_VOICEMAILS\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || userModules[24])" data-ng-class="{active: $state.includes(\'main.channels.voice.mohs\')}">\n              <a href="/channels/voice/mohs/list">\n                <i class="icon-music-tone"></i>\n                <span class="title"> {{\'APPLICATION_MOH\' | translate}} </span>\n              </a>\n            </li>\n            <!-- START RECORDING CASE -->\n            <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[25])" data-ng-class="{active: $state.includes(\'main.channels.voice.recordings\')}">\n              <a href="/channels/voice/recordings/list">\n                <i class="icon-control-play"></i>\n                <span class="title">{{\'APPLICATION_RECORDINGS\' | translate}}</span>\n              </a>\n            </li>\n            <!-- END RECORDING CASE -->\n            <!-- START REALTIME CASE -->\n            <li data-ng-if="::(Auth.isAdmin() || userModules[26])" data-ng-class="{active: $state.includes(\'main.channels.voice.realtime\')}">\n              <a href="/channels/voice/realtime/view/agents">\n                <i class="icon-energy"></i>\n                <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n              </a>\n            </li>\n            <!-- END REALTIME CASE -->\n            <!-- START CHANSPY CASE -->\n            <li data-ng-if="::(Auth.isAdmin() || userModules[27])" data-ng-class="{active: $state.includes(\'main.channels.voice.chanspy\')}">\n              <a href="/channels/voice/chanspy/list">\n                <i class="fa fa-user-secret"></i>\n                <span class="title" >{{\'APPLICATION_CHANSPY\' | translate}}</span>\n                <!-- <span data-ng-if="$state.includes(\'main.chanspy\')" class="selected"></span> -->\n              </a>\n            </li>\n            <!-- END CHANSPY CASE -->\n            <!-- START CHANSPY CASE -->\n            <li data-ng-if="::(Auth.isAdmin() || userModules[28])" data-ng-class="{active: $state.includes(\'main.channels.voice.dispositions\')}">\n              <a href="/channels/voice/dispositions/list">\n                <i class="icon-target"></i>\n                <span class="title" >{{\'APPLICATION_DISPOSITIONS\' | translate}}</span>\n              </a>\n            </li>\n            <!-- END CHANSPY CASE -->\n          </ul>\n        </li>\n        <!-- END VOICE CASE -->\n\n        <!-- START CHAT CASE -->\n        <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[8])" data-ng-class="{active: $state.includes(\'main.channels.chat\')}">\n          <a href="javascript:;" data-ng-class="{\'disabled-link\':!license.chat}">\n            <i class="icon-bubble"></i>\n            <span class="title disable-target">{{\'APPLICATION_CHAT\' | translate}}</span>\n            <span class="arrow" data-ng-class="{open: $state.includes(\'main.channels.chat\')}"></span>\n          </a>\n          <ul class="sub-menu" data-ng-if="license.chat">\n            <li data-ng-if="::(Auth.isAdmin() || userModules[29])" data-ng-class="{active: $state.includes(\'main.channels.chat.websites\')}">\n              <a href="/channels/chat/websites/list">\n                <i class="icon-globe"></i>\n                <span class="title"> {{\'APPLICATION_WEB_SITES\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || userModules[30])" data-ng-class="{active: $state.includes(\'main.channels.chat.queues\')}">\n              <a href="/channels/chat/queues/list">\n                <i class="icon-docs"></i>\n                <span class="title"> {{\'APPLICATION_QUEUES\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[31])" data-ng-class="{active: $state.includes(\'main.channels.chat.room\')}">\n              <a href="/channels/chat/room/internal/list">\n                <i class="fa fa-users"></i>\n                <span class="title"> {{\'APPLICATION_INTERACTIONS\' | translate}} </span>\n              </a>\n            </li>\n            <!-- <li data-ng-if="::(Auth.isAdmin() || userModules[8])" data-ng-class="{active: $state.includes(\'main.channels.chat.online\')}">\n              <a href="/channels/chat/online/list">\n                <i class="icon-login"></i>\n                <span class="title"> {{\'APPLICATION_ONLINE_MESSAGES\' | translate}} </span>\n              </a>\n            </li> -->\n            <li data-ng-if="::(Auth.isAdmin() || userModules[32])" data-ng-class="{active: $state.includes(\'main.channels.chat.offline\')}">\n              <a href="/channels/chat/offline/list">\n                <i class="icon-logout"></i>\n                <span class="title"> {{\'APPLICATION_OFFLINE_MESSAGES\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || userModules[33])" data-ng-class="{active: $state.includes(\'main.channels.chat.realtime\')}">\n              <a href="/channels/chat/realtime/view/agents">\n                <i class="icon-energy"></i>\n                <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n              </a>\n            </li>\n          </ul>\n        </li>\n        <!-- END CHAT CASE -->\n\n        <!-- START MAIL CASE -->\n        <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[9])" data-ng-class="{active: $state.includes(\'main.channels.mail\')}" >\n          <a href="javascript:;" data-ng-class="{\'disabled-link\':!license.mail}">\n            <i class="icon-envelope"></i>\n            <span class="title disable-target">{{\'APPLICATION_MAIL\' | translate}}</span>\n            <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.mail\') }"></span>\n          </a>\n\n          <ul class="sub-menu" data-ng-if="license.mail">\n            <li data-ng-if="::(Auth.isAdmin() || userModules[34])" data-ng-class="{active: $state.includes(\'main.channels.mail.accounts\') || $state.includes(\'main.channels.mail.account\')}">\n              <a href="/channels/mail/accounts/list">\n                <i class="icon-notebook"></i>\n                <span class="title"> {{\'APPLICATION_ACCOUNTS\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || userModules[35])" data-ng-class="{active: $state.includes(\'main.channels.mail.queues\') || $state.includes(\'main.channels.mail.queue\')}">\n              <a href="/channels/mail/queues/list">\n                <i class="icon-docs"></i>\n                <span class="title"> {{\'APPLICATION_QUEUES\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[36])" data-ng-class="{active: $state.includes(\'main.channels.mail.inbox\')}">\n              <a href="/channels/mail/inbox/view">\n                <i class="icon-note"></i>\n                <span class="title"> {{\'APPLICATION_INBOX\' | translate}} </span>\n              </a>\n            </li>\n            <!-- START REALTIME CASE -->\n            <li data-ng-if="::(Auth.isAdmin() || userModules[37])" data-ng-class="{active: $state.includes(\'main.channels.mail.realtime\')}">\n              <a href="/channels/mail/realtime/view/agents">\n                <i class="icon-energy"></i>\n                <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n              </a>\n            </li>\n            <!-- END REALTIME CASE -->\n          </ul>\n        </li>\n        <!-- END MAIL CASE -->\n\n        <!-- START FAX CASE -->\n        <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[10])" data-ng-class="{active: $state.includes(\'main.channels.fax\')}">\n          <a href="javascript:;" data-ng-class="{\'disabled-link\':!license.fax}">\n            <i class="fa fa-fax"></i>\n            <span class="title disable-target"> {{ \'APPLICATION_FAX\' | translate}}</span>\n            <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.fax\') }"></span>\n          </a>\n          <ul class="sub-menu" data-ng-if="license.fax">\n            <li data-ng-if="::(Auth.isAdmin() || userModules[38])" data-ng-class="{active: $state.includes(\'main.channels.fax.accounts\')}">\n              <a href="/channels/fax/accounts/list">\n                <i class="icon-notebook"></i>\n                <span class="title"> {{ \'APPLICATION_ACCOUNTS\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || userModules[39])" data-ng-class="{active: $state.includes(\'main.channels.fax.queues\')}">\n              <a href="/channels/fax/queues/list">\n                <i class="icon-docs"></i>\n                <span class="title"> {{ \'APPLICATION_QUEUES\' | translate }} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[40])" data-ng-class="{active: $state.includes(\'main.channels.fax.inbox\')}">\n              <a href="/channels/fax/inbox/view">\n                <i class="icon-note"></i>\n                <span class="title"> {{ \'APPLICATION_INBOX\' | translate }} </span>\n              </a>\n            </li>\n            <!-- START REALTIME CASE -->\n            <li data-ng-if="::(Auth.isAdmin() || userModules[41])" data-ng-class="{active: $state.includes(\'main.channels.fax.realtime\')}">\n              <a href="/channels/fax/realtime/view/agents">\n                <i class="icon-energy"></i>\n                <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n              </a>\n            </li>\n            <!-- END REALTIME CASE -->\n          </ul>\n        </li>\n        <!-- END FAX CASE -->\n\n        <!-- START SMS CASE -->\n        <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[11])" data-ng-class="{active: $state.includes(\'main.channels.sms\')}">\n          <a href="javascript:;" data-ng-class="{\'disabled-link\':!license.messaging}">\n            <i class="glyphicon glyphicon-comment"></i>\n            <span class="title disable-target">{{\'APPLICATION_SMS\' | translate}}</span>\n            <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.sms\') }"></span>\n          </a>\n\n          <ul class="sub-menu" data-ng-if="license.messaging">\n            <li data-ng-if="::(Auth.isAdmin() || userModules[42])" data-ng-class="{active: $state.includes(\'main.channels.sms.accounts\') || $state.includes(\'main.channels.sms.account\')}">\n              <a href="/channels/sms/accounts/list">\n                <i class="icon-notebook"></i>\n                <span class="title"> {{\'APPLICATION_ACCOUNTS\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || userModules[43])" data-ng-class="{active: $state.includes(\'main.channels.sms.queues\') || $state.includes(\'main.channels.sms.queue\')}">\n              <a href="/channels/sms/queues/list">\n                <i class="icon-docs"></i>\n                <span class="title"> {{\'APPLICATION_QUEUES\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent() || userModules[44])" data-ng-class="{active: $state.includes(\'main.channels.sms.inbox\')}">\n              <a href="/channels/sms/inbox/view">\n                <i class="icon-note"></i>\n                <span class="title"> {{\'APPLICATION_INBOX\' | translate}} </span>\n              </a>\n            </li>\n            <!-- START REALTIME CASE -->\n            <li data-ng-if="::(Auth.isAdmin() ||  userModules[45])"  data-ng-class="{active: $state.includes(\'main.channels.sms.realtime\')}">\n              <a href="/channels/sms/realtime/view/agents">\n                <i class="icon-energy"></i>\n                <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n              </a>\n            </li>\n            <!-- END REALTIME CASE -->\n          </ul>\n        </li>\n\n        <!-- END SMS CASE -->\n\n        <!-- START OPENCHANNEL CASE -->\n        <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent()|| userModules[20])" data-ng-class="{active: $state.includes(\'main.channels.openchannel\')}">\n          <a href="javascript:;" data-ng-class="{\'disabled-link\':!license.openchannel}" >\n            <i class="icon-globe"></i>\n            <span class="title disable-target">{{\'APPLICATION_OPEN_CHANNEL\' | translate}}</span>\n            <span class="arrow" data-ng-class="{ open: $state.includes(\'main.channels.openchannel\') }"></span>\n          </a>\n          <ul class="sub-menu" data-ng-if="license.openchannel" >\n            <li data-ng-if="::(Auth.isAdmin()|| userModules[46])" data-ng-class="{active: $state.includes(\'main.channels.openchannel.accounts\') || $state.includes(\'main.channels.openchannel.account\')}">\n              <a href="/channels/openchannel/accounts/list">\n                <i class="icon-notebook"></i>\n                <span class="title"> {{\'APPLICATION_ACCOUNTS\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin()|| userModules[47])" data-ng-class="{active: $state.includes(\'main.channels.openchannel.queues\') || $state.includes(\'main.channels.openchannel.queue\')}">\n              <a href="/channels/openchannel/queues/list">\n                <i class="icon-docs"></i>\n                <span class="title"> {{\'APPLICATION_QUEUES\' | translate}} </span>\n              </a>\n            </li>\n            <li data-ng-if="::(Auth.isAdmin() || Auth.isAgent()|| userModules[48])" data-ng-class="{active: $state.includes(\'main.channels.openchannel.inbox\')}">\n              <a href="/channels/openchannel/inbox/view">\n                <i class="icon-note"></i>\n                <span class="title"> {{\'APPLICATION_INBOX\' | translate}} </span>\n              </a>\n            </li>\n            <!-- START REALTIME CASE -->\n            <li data-ng-if="::(Auth.isAdmin() ||  userModules[49])"  data-ng-class="{active: $state.includes(\'main.channels.openchannel.realtime\')}">\n              <a href="/channels/openchannel/realtime/view/agents">\n                <i class="icon-energy"></i>\n                <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n              </a>\n            </li>\n            <!-- END REALTIME CASE -->\n          </ul>\n        </li>\n\n        <!-- END OPENCHANNEL CASE -->\n        <!-- START REALTIME CASE -->\n        <li data-ng-if="::(Auth.isAdmin() || userModules[12])" data-ng-class="{active: $state.includes(\'main.channels.realtime\')}">\n          <a href="/channels/realtime/view/agents">\n            <i class="icon-energy"></i>\n            <span class="title">{{\'APPLICATION_REALTIME\' | translate}}</span>\n          </a>\n        </li>\n        <!-- END REALTIME CASE -->\n      </ul>\n    </li>\n    <!-- END CHANNEL LIST CASE -->\n\n    <!-- START TOOLS LIST CASE -->\n    <li data-ng-if="::(Auth.isAdmin() || userModules[13])" data-ng-class="{active: $state.includes(\'main.tools\') && !$state.is(\'main.tools.yourdashboards.show\')}">\n      <a href="javascript:;">\n        <i class="icon-wrench"></i>\n        <span class="title" >{{\'APPLICATION_TOOLS\' | translate}}</span>\n        <span class="arrow" data-ng-class="{ open: $state.includes(\'main.tools\') && !$state.is(\'main.tools.yourdashboards.show\')}"></span>\n      </a>\n      <ul class="sub-menu">\n        <li data-ng-class="{active: $state.includes(\'main.tools.triggers\')}" data-ng-if="::(Auth.isAdmin() || userModules[50])">\n          <a href="/tools/triggers/list">\n            <i class="icon-bulb"></i>\n            <span class="title"> {{\'APPLICATION_TRIGGERS\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.tools.automations\')}" data-ng-if="::(Auth.isAdmin() || userModules[51])">\n          <a href="/tools/automations/list">\n            <i class="icon-settings"></i>\n            <span class="title"> {{\'APPLICATION_AUTOMATIONS\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.tools.trunks\')}" data-ng-if="::(Auth.isAdmin() || userModules[52])">\n          <a href="/tools/trunks/list">\n            <i class="icon-link"></i>\n            <span class="title"> {{\'APPLICATION_TRUNKS\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.tools.intervals\')}" data-ng-if="::(Auth.isAdmin() || userModules[53])">\n          <a href="/tools/intervals/list">\n            <i class="icon-clock"></i>\n            <span class="title"> {{\'APPLICATION_INTERVALS\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.tools.variables\')}" data-ng-if="::(Auth.isAdmin() || userModules[54])">\n          <a href="/tools/variables/list">\n            <i class="fa fa-eye"></i>\n            <span class="title" >{{\'APPLICATION_VARIABLES\' | translate}}  </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.tools.tags\')}" data-ng-if="::(Auth.isAdmin() || userModules[55])">\n          <a href="/tools/tags/list">\n            <i class="icon-tag"></i>\n            <span class="title" >{{\'APPLICATION_TAGS\' | translate}}  </span>\n          </a>\n        </li>\n        <!-- START TEMPLATE CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.tools.templates\')}" data-ng-if="::(Auth.isAdmin() || userModules[56])">\n          <a href="/tools/templates/list">\n            <i class="icon-docs"></i>\n            <span class="title"> {{\'APPLICATION_TEMPLATES\' | translate}} </span>\n          </a>\n        </li>\n        <!-- END TEMPLATE CASE -->\n\n        <!-- START PAUSE CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.tools.pauses\')}" data-ng-if="::(Auth.isAdmin() || userModules[57])">\n          <a href="/tools/pauses/list">\n            <i class="icon-control-pause"></i>\n            <span class="title"> {{\'APPLICATION_PAUSES\' | translate}} </span>\n          </a>\n        </li>\n        <!-- END PAUSE CASE -->\n\n        <!-- START ANSWER CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.tools.answers\')}" data-ng-if="::(Auth.isAdmin() || userModules[58])">\n          <a href="/tools/answers/list">\n            <i class="icon-magic-wand"></i>\n            <span class="title"> {{\'APPLICATION_CANNED_ANSWERS\' | translate}} </span>\n          </a>\n        </li>\n        <!-- END ANSWER CASE -->\n\n        <!-- START DASHBOARD MANAGER CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.tools.yourdashboards\') && !$state.is(\'main.tools.yourdashboards.show\')}" data-ng-if="::(Auth.isAdmin() || userModules[59])">\n          <a href="/tools/yourdashboards/list">\n            <i class="fa fa-tachometer"></i>\n            <span class="title"> {{\'APPLICATION_DASHBOARDS_MANAGER\' | translate}} </span>\n          </a>\n        </li>\n        <!-- END DASHBOARD MANAGER CASE -->\n\n        <!-- START SOUND CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.tools.sounds\')}" data-ng-if="::(Auth.isAdmin() || userModules[60])">\n          <a href="/tools/sounds/list">\n            <i class="icon-music-tone-alt"></i>\n            <span class="title" >{{\'APPLICATION_SOUNDS\' | translate}}</span>\n            <!-- <span data-ng-if="$state.includes(\'main.sounds\')" class="selected"></span> -->\n          </a>\n        </li>\n        <!-- END SOUND CASE -->\n\n        <!-- START SCHEDULE CASE -->\n        <li data-ng-class="{active: $state.includes(\'main.tools.scheduler\')}" data-ng-if="::(Auth.isAdmin() || userModules[61])">\n          <a href="/tools/scheduler/list">\n            <i class="icon-calendar"></i>\n            <span class="title" >{{\'APPLICATION_SCHEDULER\' | translate}}</span>\n            <!-- <span data-ng-if="$state.includes(\'main.sounds\')" class="selected"></span> -->\n          </a>\n        </li>\n        <!-- END SCHEDULE CASE -->\n      </ul>\n    </li>\n    <!-- END TOOLS LIST CASE -->\n\n    <!-- START CALLYSQUARE CASE -->\n    <li data-ng-if="::(Auth.isAdmin() || userModules[14])" data-ng-class="{active: $state.includes(\'main.square\')}">\n      <a href="javascript:;">\n        <i class="fa fa-superscript"></i>\n        <span class="title" >Cally &#178;</span>\n        <span class="arrow"></span>\n      </a>\n      <ul class="sub-menu">\n        <li data-ng-class="{active: $state.includes(\'main.square.projects\')}">\n          <a href="/square/projects/list">\n            <i class="fa fa-slack"></i>\n            <span class="title" >{{\'APPLICATION_PROJECTS\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.square.odbc\')}">\n          <a href="/square/odbc/list">\n            <i class="fa fa-database"></i>\n            <span class="title" >{{\'APPLICATION_ODBC\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.square.recordings\')}">\n          <a href="/square/recordings/list">\n            <i class="icon-microphone"></i>\n            <span class="title" >{{\'APPLICATION_RECORDINGS\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.square.realtime.view.general\')}">\n          <a href="/square/realtime/view/general">\n            <i class="icon-energy"></i>\n            <span class="title" >{{\'APPLICATION_REALTIME\' | translate}} </span>\n          </a>\n        </li>\n      </ul>\n    </li>\n    <!-- END CALLYSQUARE CASE -->\n    <!-- START JSCRIPTY LIST -->\n    <li data-ng-show="::(Auth.isAdmin() || Auth.isAgent() || userModules[15])" data-ng-class="{active: $state.includes(\'main.jscripty\')}">\n      <a href="javascript:;" data-ng-class="{\'disabled-link\':!license.jscripty}" >\n        <i class="icon-note"></i>\n        <span class="title disable-target" >{{\'APPLICATION_JSCRIPTY\' | translate}} </span>\n        <span class="arrow"></span>\n      </a>\n      <ul class="sub-menu" data-ng-if="license.jscripty">\n        <!--  -->\n        <!-- START PROJECTS CASE -->\n        <li data-ng-show="Auth.isAdmin() || Auth.isAgent() || userModules[15]"  data-ng-class="{active: $state.includes(\'main.jscripty.projects\')}">\n          <a href="/jscripty/projects/list">\n            <i class="fa fa-slack"></i>\n            <span class="title" >{{\'APPLICATION_PROJECTS\' | translate}} </span>\n          </a>\n        </li>\n        <!-- END PROJECTS CASE -->\n      </ul>\n    </li>\n    <!-- END JSCRIPTY LIST -->\n\n    <!-- START MOTION DIALER LIST CASE-->\n    <li data-ng-if="::(Auth.isAdmin() || userModules[16])" data-ng-class="{active: $state.includes(\'main.motiondialer\')}">\n      <a href="javascript:;" data-ng-class="{\'disabled-link\':!license.dialer}">\n        <i class="icon-control-forward"></i>\n        <span class="title disable-target" >{{\'APPLICATION_MOTION_DIALER\' | translate}} </span>\n        <span class="arrow"></span>\n      </a>\n      <ul class="sub-menu" data-ng-if="license.dialer">\n        <li data-ng-class="{active: $state.includes(\'main.motiondialer.lists\')}">\n          <a href="/motiondialer/lists/list">\n            <i class="icon-docs"></i>\n            <span class="title" >{{\'APPLICATION_LISTS\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.motiondialer.blacklist\')}">\n          <a href="/motiondialer/blacklist/list">\n            <i class="icon-doc"></i>\n            <span class="title" >{{\'APPLICATION_BLACKLIST\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.motiondialer.processes\')}">\n          <a href="/motiondialer/processes/list">\n            <i class="icon-settings"></i>\n            <span class="title" >{{\'APPLICATION_PROCESSES\' | translate}} </span>\n          </a>\n        </li>\n        <li data-ng-class="{active: $state.includes(\'main.motiondialer.info\')}">\n          <a href="/motiondialer/info/view/about">\n            <i class="icon-info"></i>\n            <span class="title" >{{\'APPLICATION_INFO\' | translate}} </span>\n          </a>\n        </li>\n      </ul>\n    </li>\n    <!-- END MOTION DIALER LIST CASE-->\n\n    <!-- START ANALYTIC LIST CASE -->\n    <li data-ng-if="::(Auth.isAdmin() || userModules[17])" data-ng-class="{active: $state.includes(\'main.analytics.reports\')\n    || $state.includes(\'main.analytics.extracted\')\n    || $state.includes(\'main.analytics.metrics\')}" data-ng-if="::(Auth.isAdmin())">\n    <a href="javascript:;">\n      <i class="icon-calculator"></i>\n      <span class="title" >{{\'APPLICATION_ANALYTICS\' | translate}}</span>\n      <span class="arrow" data-ng-class="{ open: $state.includes(\'main.analytics.reports\')\n      || $state.includes(\'main.analytics.extracted\')\n      || $state.includes(\'main.analytics.metrics\') }"></span>\n    </a>\n    <ul class="sub-menu">\n      <!-- START REPORT CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.analytics.reports\')}">\n        <a href="/analytics/reports/list">\n          <i class="icon-book-open"></i>\n          <span class="title" >{{\'APPLICATION_REPORTS\' | translate}}</span>\n          <span data-ng-if="$state.includes(\'main.analytics.reports\')" class="selected"></span>\n        </a>\n      </li>\n      <!-- END REPORT CASE -->\n      <!-- START EXTRA REPORT CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.analytics.extracted\')}">\n        <a href="/analytics/extracted/list">\n          <i class="fa fa-file-pdf-o"></i>\n          <span class="title" >{{\'APPLICATION_EXTRACTED_REPORTS\' | translate}}</span>\n          <span data-ng-if="$state.includes(\'main.analytics.extracted\')" class="selected"></span>\n        </a>\n      </li>\n      <!-- END EXTRA REPORT CASE -->\n      <!-- START METRICS CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.analytics.metrics\')}">\n        <a href="/analytics/metrics/list">\n          <i class="icon-calculator"></i>\n          <span class="title" >{{\'APPLICATION_METRICS\' | translate}}</span>\n          <span data-ng-if="$state.includes(\'main.metrics.reports\')" class="selected"></span>\n        </a>\n      </li>\n      <!-- END METRICS CASE -->\n    </ul>\n  </li>\n  <!-- END ANALYTIC LIST CASE -->\n\n  <!-- START SETTINGS LIST -->\n  <li data-ng-if="::(Auth.isAdmin() || userModules[18])" data-ng-class="{active: $state.includes(\'main.setting\')}">\n    <a href="javascript:;">\n      <i class="icon-settings"></i>\n      <span class="title" >{{\'APPLICATION_SETTINGS\' | translate}}</span>\n      <span class="arrow"></span>\n    </a>\n    <ul class="sub-menu">\n      <!-- START GENERAL CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.setting.general\')}">\n        <a href="/setting/general/view/main">\n          <i class="icon-settings"></i>\n          <span class="title"> {{\'APPLICATION_GENERAL\' | translate}} </span>\n        </a>\n      </li>\n      <!-- END GENERAL CASE -->\n\n      <!-- START UPDATES CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.setting.updates\')}">\n        <a href="{{license.update ? \'/setting/updates/list\' : \'javascript:;\'}}" data-ng-class="{\'disabled-link\':!license.update}">\n          <i class="icon-cloud-download"></i>\n          <span class="title disable-target" >{{\'APPLICATION_UPDATES\' | translate}}</span>\n          <!-- <span data-ng-if="$state.includes(\'main.updates\')" class="selected"></span> -->\n        </a>\n      </li>\n      <!-- END UPDATES CASE -->\n\n      <!-- START SMTP CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.setting.smtp\')}">\n        <a href="/setting/smtp/view">\n          <i class="icon-envelope"></i>\n          <span class="title">SMTP</span>\n          <!-- <span data-ng-if="$state.includes(\'main.smtp\')" class="selected"></span> -->\n        </a>\n      </li>\n      <!-- END SMTP CASE -->\n\n      <!-- START LICENSE CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.setting.license\')}">\n        <a href="/setting/license/view">\n          <i class="icon-info"></i>\n          <span class="title"> {{\'APPLICATION_LICENSE\' | translate}} </span>\n        </a>\n      </li>\n      <!-- END LICENSE CASE -->\n\n      <!-- START NETWORK CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.setting.network\')}">\n        <a href="/setting/network/view/localnet">\n          <i class="icon-globe"></i>\n          <span class="title"> {{\'APPLICATION_NETWORK\' | translate}} </span>\n        </a>\n      </li>\n      <!-- END NETWORK CASE -->\n\n      <!-- START SYSTEM CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.setting.system\')}">\n        <a href="/setting/system/view/general">\n          <i class="icon-pie-chart"></i>\n          <span class="title"> {{\'APPLICATION_SYSTEM\' | translate}} </span>\n        </a>\n      </li>\n      <!-- END SYSTEM CASE -->\n\n      <!-- START CUSTOMIZATION CASE -->\n      <li data-ng-class="{active: $state.includes(\'main.setting.customization\')}">\n        <a href="/setting/customization/view/general">\n          <i class="icon-equalizer"></i>\n          <span class="title"> {{\'APPLICATION_CUSTOMIZATION\' | translate}} </span>\n        </a>\n      </li>\n      <!-- END CUSTOMIZATION CASE -->\n    </ul>\n  </li>\n  <!-- END SETTINGS LIST -->\n\n  <!-- START INTEGRATION CASE -->\n  <li data-ng-if=" (Auth.isAdmin() || Auth.isAgent() || userModules[19]) && integration.active" data-ng-repeat="integration in integrations" data-ng-class="{active: $state.includes(\'main.{{integration.state}}\')}">\n    <a href="/{{integration.state}}/list" ng-switch on="integration.state" data-ng-if="integration.state !== \'iframe\' && (Auth.isAdmin() || userModules[19])">\n      <i ng-switch-when="zendesk" class="icon-heart"></i>\n      <i ng-switch-when="salesforce" class="fa fa-cloud"></i>\n      <i ng-switch-default class="icon-handbag"></i>\n      <span class="title" >{{integration.name}}</span>\n      <span data-ng-if="$state.includes(\'main.{{integration.state}}\')" class="selected"></span>\n    </a>\n    <a href="/{{integration.state}}/view" data-ng-if="integration.state === \'iframe\'">\n      <i class="fa fa-chrome"></i>\n      <span class="title" data-ng-if="Auth.isAdmin() || userModules[19]">{{integration.name}}</span>\n      <span class="title" data-ng-if="Auth.isAgent()">{{integration.title || integration.name}}</span>\n      <span data-ng-if="$state.includes(\'main.{{integration.state}}\')" class="selected"></span>\n    </a>\n  </li>\n\n  <li data-ng-if="::(Auth.isAdmin())" data-ng-class="{active: $state.is(\'main.market\')}">\n    <a href="/market">\n      <i class="icon-handbag"></i>\n      <span class="title" translate>Market Place</span>\n      <span data-ng-if="$state.includes(\'main.market\')" class="selected"></span>\n    </a>\n  </li>\n  <!-- END INTEGRATIONS CASE -->\n  <li>\n  <a href="javascript:;" data-ng-click="activeTour.main = true" data-ng-if="::(!Auth.isAgent())">\n    <i class="icon-location-pin"></i>\n    <span class="title">{{\'APPLICATION_TAKE_A_TOUR\' | translate}}</span>\n  </a>\n  </li>\n  <li>\n    <a href="javascript:;" data-ng-click="about()">\n      <i class="icon-info"></i>\n      <span class="title">{{\'APPLICATION_ABOUT\' | translate}}</span>\n    </a>\n  </li>\n\n</ul>\n<!-- END SIDEBAR MENU -->\n</div>\n');
+}]);
\ No newline at end of file
diff --git a/public/assets/plugins/jscripty/js/Actions.js b/public/assets/plugins/jscripty/js/Actions.js
index aeaa420..67e33c5 100644
--- a/public/assets/plugins/jscripty/js/Actions.js
+++ b/public/assets/plugins/jscripty/js/Actions.js
@@ -1,634 +1 @@
-'use strict';
-/**
- * $Id: Actions.js,v 1.7 2013-02-14 07:48:01 gaudenz Exp $
- * Copyright (c) 2006-2012, JGraph Ltd
- */
-/**
- * Constructs the actions object for the given UI.
- */
-function Actions(editorUi) {
-	this.editorUi = editorUi;
-	this.actions = new Object();
-	this.init();
-};
-
-/**
- * Adds the default actions.
- */
-Actions.prototype.init = function() {
-	var ui = this.editorUi;
-	var editor = ui.editor;
-	var graph = editor.graph;
-
-	// File actions
-	this.addAction('new', function() {
-		ui.showDialog(new NewDialog(ui).container, 300, 180, true, true);
-	});
-	this.addAction('open', function() {
-		ui.showDialog(new OpenDialog(ui).container, 300, 180, true, true);
-	});
-	this.addAction('save', function() {
-		ui.saveFile(false);
-	}, null, null, 'Ctrl+S');
-	this.addAction('saveAs', function() {
-		ui.saveFile(true);
-	}, null, null, 'Ctrl+Shift-S');
-	this.addAction('publish', function() {
-		ui.publishFile(false);
-	}, null, null, 'Ctrl+Shift+P');
-	this.addAction('variable', function() {
-		ui.showDialog(new VariableDialog(ui).container, 300, 180, true, true);
-	});
-	this.addAction('import', function() {
-		ui.showDialog(new ImportDialog(ui).container, 300, 200, true, true);
-	});
-	this.addAction('export', function() {
-		ui.showDialog(new ExportDialog(ui).container, 300, 200, true, true);
-	}, null, null, 'Ctrl+E');
-	this.put('editFile', new Action(mxResources.get('edit'), mxUtils.bind(this,
-		function() {
-			this.editorUi.showDialog(new EditFileDialog(ui).container, 620, 420,
-				true, true);
-		})));
-	this.addAction('rename', function() {
-		ui.showDialog(new RenameDialog(ui).container, 300, 180, true, true);
-	});
-	this.addAction('print', function() {
-		mxUtils.printScreen(graph);
-	}, null, 'sprite-print', 'Ctrl+P');
-	this.addAction('preview', function() {
-		mxUtils.show(graph, null, 10, 10);
-	});
-
-	// Edit actions
-	this.addAction('undo', function() {
-		editor.undoManager.undo();
-	}, null, 'sprite-undo', 'Ctrl+Z');
-	this.addAction('redo', function() {
-		editor.undoManager.redo();
-	}, null, 'sprite-redo', 'Ctrl+Y');
-	this.addAction('cut', function() {
-		mxClipboard.cut(graph);
-	}, null, 'sprite-cut', 'Ctrl+X');
-	this.addAction('copy', function() {
-		mxClipboard.copy(graph);
-	}, null, 'sprite-copy', 'Ctrl+C');
-	this.addAction('paste', function() {
-		mxClipboard.paste(graph);
-	}, false, 'sprite-paste', 'Ctrl+V');
-	this.addAction('delete', function() {
-		graph.removeCells();
-	}, null, null, 'Delete');
-	this.addAction('duplicate', function() {
-		var s = graph.gridSize;
-		graph.setSelectionCells(graph.moveCells(graph.getSelectionCells(), s, s,
-			true));
-	}, null, null, 'Ctrl+D');
-	this.addAction('selectVertices', function() {
-		graph.selectVertices();
-	}, null, null, 'Ctrl+Shift+V');
-	this.addAction('selectEdges', function() {
-		graph.selectEdges();
-	}, null, null, 'Ctrl+Shift+E');
-	this.addAction('selectAll', function() {
-		graph.selectAll();
-	}, null, null, 'Ctrl+A');
-
-	// Navigation actions
-	this.addAction('home', function() {
-		graph.home();
-	}, null, null, 'Home');
-	this.addAction('exitGroup', function() {
-		graph.exitGroup();
-	}, null, null, 'Page Up');
-	this.addAction('enterGroup', function() {
-		graph.enterGroup();
-	}, null, null, 'Page Down');
-	this.addAction('expand', function() {
-		graph.foldCells(false);
-	}, null, null, 'Enter');
-	this.addAction('collapse', function() {
-		graph.foldCells(true);
-	}, null, null, 'Backspace');
-
-	// Arrange actions
-	this.addAction('toFront', function() {
-		graph.orderCells(false);
-	}, null, null, 'Ctrl+F');
-	this.addAction('toBack', function() {
-		graph.orderCells(true);
-	}, null, null, 'Ctrl+B');
-	this.addAction('group', function() {
-		graph.setSelectionCell(graph.groupCells(null, 0));
-	}, null, null, 'Ctrl+G');
-	this.addAction('ungroup', function() {
-		graph.setSelectionCells(graph.ungroupCells());
-	}, null, null, 'Ctrl+U');
-	this.addAction('removeFromGroup', function() {
-		graph.removeCellsFromParent();
-	});
-	this.addAction('editLink', function() {
-		var cell = graph.getSelectionCell();
-		var link = graph.getLinkForCell(cell);
-
-		if (link == null) {
-			link = '';
-		}
-
-		link = mxUtils.prompt(mxResources.get('enterValue'), link);
-
-		if (link != null) {
-			graph.setLinkForCell(cell, link);
-		}
-	});
-	this.addAction('openLink', function() {
-		var cell = graph.getSelectionCell();
-		var link = graph.getLinkForCell(cell);
-
-		if (link != null) {
-			window.open(link);
-		}
-	});
-	this.addAction('autosize', function() {
-		var cells = graph.getSelectionCells();
-
-		if (cells != null) {
-			graph.getModel().beginUpdate();
-			try {
-				for (var i = 0; i < cells.length; i++) {
-					var cell = cells[i];
-
-					if (graph.getModel().getChildCount(cell)) {
-						graph.updateGroupBounds([cell], 20);
-					} else {
-						graph.updateCellSize(cell);
-					}
-				}
-			} finally {
-				graph.getModel().endUpdate();
-			}
-		}
-	});
-	this.addAction('wordWrap', function() {
-		var state = graph.getView().getState(graph.getSelectionCell());
-		var value = 'wrap';
-
-		if (state != null && state.style[mxConstants.STYLE_WHITE_SPACE] == 'wrap') {
-			value = null;
-		}
-
-		graph.setCellStyles(mxConstants.STYLE_WHITE_SPACE, value);
-	});
-	this.addAction('rotation', function() {
-		var value = '0';
-		var state = graph.getView().getState(graph.getSelectionCell());
-
-		if (state != null) {
-			value = state.style[mxConstants.STYLE_ROTATION] || value;
-		}
-
-		value = mxUtils.prompt(mxResources.get('enterValue') + ' (' +
-			mxResources.get('rotation') + ' 0-360)', value);
-
-		if (value != null) {
-			graph.setCellStyles(mxConstants.STYLE_ROTATION, value);
-		}
-	});
-	this.addAction('tilt', function() {
-		var cells = graph.getSelectionCells();
-
-		if (cells != null) {
-			graph.getModel().beginUpdate();
-			try {
-				for (var i = 0; i < cells.length; i++) {
-					var cell = cells[i];
-
-					if (graph.getModel().isVertex(cell) && graph.getModel().getChildCount(
-							cell) == 0) {
-						var geo = graph.getCellGeometry(cell);
-
-						if (geo != null) {
-							// Rotates the size and position in the geometry
-							geo = geo.clone();
-							geo.x += geo.width / 2 - geo.height / 2;
-							geo.y += geo.height / 2 - geo.width / 2;
-							var tmp = geo.width;
-							geo.width = geo.height;
-							geo.height = tmp;
-							graph.getModel().setGeometry(cell, geo);
-
-							// Reads the current direction and advances by 90 degrees
-							var state = graph.view.getState(cell);
-
-							if (state != null) {
-								var dir = state.style[mxConstants.STYLE_DIRECTION] || 'east' /*default*/ ;
-
-								if (dir == 'east') {
-									dir = 'south';
-								} else if (dir == 'south') {
-									dir = 'west';
-								} else if (dir == 'west') {
-									dir = 'north';
-								} else if (dir == 'north') {
-									dir = 'east';
-								}
-
-								graph.setCellStyles(mxConstants.STYLE_DIRECTION, dir, [cell]);
-							}
-						}
-					}
-				}
-			} finally {
-				graph.getModel().endUpdate();
-			}
-		}
-	}, null, null, 'Ctrl+R');
-
-	// View actions
-	this.addAction('actualSize', function() {
-		graph.zoomTo(1);
-	});
-	this.addAction('zoomIn', function() {
-		graph.zoomIn();
-	}, null, null, 'Add');
-	this.addAction('zoomOut', function() {
-		graph.zoomOut();
-	}, null, null, 'Subtract');
-	this.addAction('fitWindow', function() {
-		graph.fit();
-	});
-
-	this.addAction('fitPage', mxUtils.bind(this, function() {
-		if (!graph.pageVisible) {
-			this.get('pageView').funct();
-		}
-
-		var fmt = graph.pageFormat;
-		var ps = graph.pageScale;
-		var cw = graph.container.clientWidth - 20;
-		var ch = graph.container.clientHeight - 20;
-
-		var scale = Math.floor(100 * Math.min(cw / fmt.width / ps, ch / fmt.height /
-			ps)) / 100;
-		graph.zoomTo(scale);
-
-		graph.container.scrollLeft = Math.round(graph.view.translate.x * scale -
-			Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2)
-		);
-		graph.container.scrollTop = Math.round(graph.view.translate.y * scale -
-			Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) /
-				2));
-	}));
-	this.addAction('fitPageWidth', mxUtils.bind(this, function() {
-		if (!graph.pageVisible) {
-			this.get('pageView').funct();
-		}
-
-		var fmt = graph.pageFormat;
-		var ps = graph.pageScale;
-		var cw = graph.container.clientWidth - 20;
-
-		var scale = Math.floor(100 * cw / fmt.width / ps) / 100;
-		graph.zoomTo(scale);
-
-		graph.container.scrollLeft = Math.round(graph.view.translate.x * scale -
-			Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2)
-		);
-		graph.container.scrollTop = Math.round(graph.view.translate.y * scale -
-			Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) /
-				2));
-	}));
-	this.put('customZoom', new Action(mxResources.get('custom'), function() {
-		var value = mxUtils.prompt(mxResources.get('enterValue') + ' (%)',
-			parseInt(graph.getView().getScale() * 100));
-
-		if (value != null && value.length > 0 && !isNaN(parseInt(value))) {
-			graph.zoomTo(parseInt(value) / 100);
-		}
-	}));
-
-	// Option actions
-	var action = null;
-	action = this.addAction('grid', function() {
-		graph.setGridEnabled(!graph.isGridEnabled());
-		editor.updateGraphComponents();
-	}, null, null, 'Ctrl+Shift+G');
-	action.setToggleAction(true);
-	action.setSelectedCallback(function() {
-		return graph.isGridEnabled();
-	});
-	action = this.addAction('guides', function() {
-		graph.graphHandler.guidesEnabled = !graph.graphHandler.guidesEnabled;
-	});
-	action.setToggleAction(true);
-	action.setSelectedCallback(function() {
-		return graph.graphHandler.guidesEnabled;
-	});
-	action = this.addAction('tooltips', function() {
-		graph.tooltipHandler.setEnabled(!graph.tooltipHandler.isEnabled());
-	});
-	action.setToggleAction(true);
-	action.setSelectedCallback(function() {
-		return graph.tooltipHandler.isEnabled();
-	});
-	action = this.addAction('navigation', function() {
-		graph.foldingEnabled = !graph.foldingEnabled;
-		graph.view.revalidate();
-	});
-	action.setToggleAction(true);
-	action.setSelectedCallback(function() {
-		return graph.foldingEnabled;
-	});
-	action = this.addAction('scrollbars', function() {
-		graph.scrollbars = !graph.scrollbars;
-		editor.updateGraphComponents();
-
-		if (!graph.scrollbars) {
-			var t = graph.view.translate;
-			graph.view.setTranslate(t.x - graph.container.scrollLeft / graph.view.scale,
-				t.y - graph.container.scrollTop / graph.view.scale);
-			graph.container.scrollLeft = 0;
-			graph.container.scrollTop = 0;
-			graph.sizeDidChange();
-		} else {
-			var dx = graph.view.translate.x;
-			var dy = graph.view.translate.y;
-
-			graph.view.translate.x = 0;
-			graph.view.translate.y = 0;
-			graph.sizeDidChange();
-			graph.container.scrollLeft -= Math.round(dx * graph.view.scale);
-			graph.container.scrollTop -= Math.round(dy * graph.view.scale);
-		}
-	}, !mxClient.IS_TOUCH);
-	action.setToggleAction(true);
-	action.setSelectedCallback(function() {
-		return graph.container.style.overflow == 'auto';
-	});
-	action = this.addAction('pageView', mxUtils.bind(this, function() {
-		graph.pageVisible = !graph.pageVisible;
-		graph.pageBreaksVisible = graph.pageVisible;
-		graph.preferPageSize = graph.pageBreaksVisible;
-		graph.view.validate();
-		graph.sizeDidChange();
-
-		editor.updateGraphComponents();
-		editor.outline.update();
-
-		if (mxUtils.hasScrollbars(graph.container)) {
-			if (graph.pageVisible) {
-				graph.container.scrollLeft -= 20;
-				graph.container.scrollTop -= 20;
-			} else {
-				graph.container.scrollLeft += 20;
-				graph.container.scrollTop += 20;
-			}
-		}
-	}));
-	action.setToggleAction(true);
-	action.setSelectedCallback(function() {
-		return graph.pageVisible;
-	});
-	action = this.addAction('connect', function() {
-		graph.setConnectable(!graph.connectionHandler.isEnabled());
-	}, null, null, 'Ctrl+Q');
-	action.setToggleAction(true);
-	action.setSelectedCallback(function() {
-		return graph.connectionHandler.isEnabled();
-	});
-	action = this.addAction('copyConnect', function() {
-		graph.connectionHandler.setCreateTarget(!graph.connectionHandler.isCreateTarget());
-	});
-	action.setToggleAction(true);
-	action.setSelectedCallback(function() {
-		return graph.connectionHandler.isCreateTarget();
-	});
-
-	// Help actions
-	this.addAction('help', function() {
-		var ext = '';
-
-		if (mxResources.isLanguageSupported(mxClient.language)) {
-			ext = '_' + mxClient.language;
-		}
-
-		window.open(RESOURCES_PATH + '/help' + ext + '.html');
-	});
-	this.put('about', new Action(mxResources.get('about') + ' Cally Square',
-		function() {
-			ui.showDialog(new AboutDialog(ui).container, 320, 280, true, true);
-		}, null, null, 'F1'));
-
-	// Font style actions
-	var toggleFontStyle = mxUtils.bind(this, function(key, style) {
-		this.addAction(key, function() {
-			graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, style);
-		});
-	});
-
-	toggleFontStyle('bold', mxConstants.FONT_BOLD);
-	toggleFontStyle('italic', mxConstants.FONT_ITALIC);
-	toggleFontStyle('underline', mxConstants.FONT_UNDERLINE);
-
-	// Format actions
-	this.addAction('shadow', function() {
-		graph.toggleCellStyles(mxConstants.STYLE_SHADOW);
-	});
-	this.addAction('dashed', function() {
-		graph.toggleCellStyles(mxConstants.STYLE_DASHED);
-	});
-	this.addAction('rounded', function() {
-		graph.toggleCellStyles(mxConstants.STYLE_ROUNDED);
-	});
-	this.addAction('curved', function() {
-		graph.toggleCellStyles(mxConstants.STYLE_CURVED);
-	});
-	this.addAction('style', function() {
-		var cells = graph.getSelectionCells();
-
-		if (cells != null && cells.length > 0) {
-			var model = graph.getModel();
-			var style = mxUtils.prompt(mxResources.get('enterValue') + ' (' +
-				mxResources.get('style') + ')',
-				model.getStyle(cells[0]) || '');
-
-			if (style != null) {
-				graph.setCellStyle(style, cells);
-			}
-		}
-	});
-	this.addAction('setAsDefaultEdge', function() {
-		graph.setDefaultEdge(graph.getSelectionCell());
-	});
-	this.addAction('addWaypoint', function() {
-		var cell = graph.getSelectionCell();
-
-		if (cell != null && graph.getModel().isEdge(cell)) {
-			var handler = editor.graph.selectionCellsHandler.getHandler(cell);
-
-			if (handler instanceof mxEdgeHandler) {
-				var t = graph.view.translate;
-				var s = graph.view.scale;
-				var dx = t.x;
-				var dy = t.y;
-
-				var parent = graph.getModel().getParent(cell);
-				var pgeo = graph.getCellGeometry(parent);
-
-				if (graph.getModel().isVertex(parent) && pgeo != null) {
-					dx += pgeo.x;
-					dy += pgeo.y;
-				}
-
-				handler.addPointAt(handler.state, graph.panningHandler.triggerX / s - dx,
-					graph.panningHandler.triggerY / s - dy);
-			}
-		}
-	});
-	this.addAction('removeWaypoint', function() {
-		// TODO: Action should run with "this" set to action
-		var rmWaypointAction = ui.actions.get('removeWaypoint');
-
-		if (rmWaypointAction.handler != null) {
-			// NOTE: Popupevent handled and action updated in Menus.createPopupMenu
-			rmWaypointAction.handler.removePoint(rmWaypointAction.handler.state,
-				rmWaypointAction.index);
-		}
-	});
-	this.addAction('image', function() {
-		function updateImage(value, w, h) {
-			var select = null;
-			var cells = graph.getSelectionCells();
-
-			graph.getModel().beginUpdate();
-			try {
-				// Inserts new cell if no cell is selected
-				if (cells.length == 0) {
-					var gs = graph.getGridSize();
-					cells = [graph.insertVertex(graph.getDefaultParent(), null, '', gs, gs,
-						w, h)];
-					select = cells;
-				}
-
-				graph.setCellStyles(mxConstants.STYLE_IMAGE, value, cells);
-				graph.setCellStyles(mxConstants.STYLE_SHAPE, 'image', cells);
-
-				if (graph.getSelectionCount() == 1) {
-					if (w != null && h != null) {
-						var cell = cells[0];
-						var geo = graph.getModel().getGeometry(cell);
-
-						if (geo != null) {
-							geo = geo.clone();
-							geo.width = w;
-							geo.height = h;
-							graph.getModel().setGeometry(cell, geo);
-						}
-					}
-				}
-			} finally {
-				graph.getModel().endUpdate();
-			}
-
-			if (select != null) {
-				graph.setSelectionCells(select);
-				graph.scrollCellToVisible(select[0]);
-			}
-		};
-
-		var value = '';
-		var state = graph.getView().getState(graph.getSelectionCell());
-
-		if (state != null) {
-			value = state.style[mxConstants.STYLE_IMAGE] || value;
-		}
-
-		value = mxUtils.prompt(mxResources.get('enterValue') + ' (' + mxResources.get(
-			'url') + ')', value);
-
-		if (value != null) {
-			if (value.length > 0) {
-				var img = new Image();
-
-				img.onload = function() {
-					updateImage(value, img.width, img.height);
-				};
-				img.onerror = function() {
-					mxUtils.alert(mxResources.get('fileNotFound'));
-				};
-
-				img.src = value;
-			}
-		}
-	});
-};
-
-/**
- * Registers the given action under the given name.
- */
-Actions.prototype.addAction = function(key, funct, enabled, iconCls, shortcut) {
-	return this.put(key, new Action(mxResources.get(key), funct, enabled, iconCls,
-		shortcut));
-};
-
-/**
- * Registers the given action under the given name.
- */
-Actions.prototype.put = function(name, action) {
-	this.actions[name] = action;
-
-	return action;
-};
-
-/**
- * Returns the action for the given name or null if no such action exists.
- */
-Actions.prototype.get = function(name) {
-	return this.actions[name];
-};
-
-/**
- * Constructs a new action for the given parameters.
- */
-function Action(label, funct, enabled, iconCls, shortcut) {
-	mxEventSource.call(this);
-	this.label = label;
-	this.funct = funct;
-	this.enabled = (enabled != null) ? enabled : true;
-	this.iconCls = iconCls;
-	this.shortcut = shortcut;
-};
-
-// Action inherits from mxEventSource
-mxUtils.extend(Action, mxEventSource);
-
-/**
- * Sets the enabled state of the action and fires a stateChanged event.
- */
-Action.prototype.setEnabled = function(value) {
-	if (this.enabled != value) {
-		this.enabled = value;
-		this.fireEvent(new mxEventObject('stateChanged'));
-	}
-};
-
-/**
- * Sets the enabled state of the action and fires a stateChanged event.
- */
-Action.prototype.setToggleAction = function(value) {
-	this.toggleAction = value;
-};
-
-/**
- * Sets the enabled state of the action and fires a stateChanged event.
- */
-Action.prototype.setSelectedCallback = function(funct) {
-	this.selectedCallback = funct;
-};
-
-/**
- * Sets the enabled state of the action and fires a stateChanged event.
- */
-Action.prototype.isSelected = function() {
-	return this.selectedCallback();
-};
+var _0x7635=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x64\x69\x74\x6F\x72\x55\x69","\x61\x63\x74\x69\x6F\x6E\x73","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x64\x69\x74\x6F\x72","\x67\x72\x61\x70\x68","\x6E\x65\x77","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x68\x6F\x77\x44\x69\x61\x6C\x6F\x67","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E","\x6F\x70\x65\x6E","\x73\x61\x76\x65","\x73\x61\x76\x65\x46\x69\x6C\x65","\x43\x74\x72\x6C\x2B\x53","\x73\x61\x76\x65\x41\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2D\x53","\x70\x75\x62\x6C\x69\x73\x68","\x70\x75\x62\x6C\x69\x73\x68\x46\x69\x6C\x65","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x50","\x76\x61\x72\x69\x61\x62\x6C\x65","\x69\x6D\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x43\x74\x72\x6C\x2B\x45","\x65\x64\x69\x74\x46\x69\x6C\x65","\x65\x64\x69\x74","\x67\x65\x74","\x62\x69\x6E\x64","\x70\x75\x74","\x72\x65\x6E\x61\x6D\x65","\x70\x72\x69\x6E\x74","\x70\x72\x69\x6E\x74\x53\x63\x72\x65\x65\x6E","\x73\x70\x72\x69\x74\x65\x2D\x70\x72\x69\x6E\x74","\x43\x74\x72\x6C\x2B\x50","\x70\x72\x65\x76\x69\x65\x77","\x73\x68\x6F\x77","\x75\x6E\x64\x6F","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x73\x70\x72\x69\x74\x65\x2D\x75\x6E\x64\x6F","\x43\x74\x72\x6C\x2B\x5A","\x72\x65\x64\x6F","\x73\x70\x72\x69\x74\x65\x2D\x72\x65\x64\x6F","\x43\x74\x72\x6C\x2B\x59","\x63\x75\x74","\x73\x70\x72\x69\x74\x65\x2D\x63\x75\x74","\x43\x74\x72\x6C\x2B\x58","\x63\x6F\x70\x79","\x73\x70\x72\x69\x74\x65\x2D\x63\x6F\x70\x79","\x43\x74\x72\x6C\x2B\x43","\x70\x61\x73\x74\x65","\x73\x70\x72\x69\x74\x65\x2D\x70\x61\x73\x74\x65","\x43\x74\x72\x6C\x2B\x56","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x44\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x67\x72\x69\x64\x53\x69\x7A\x65","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x43\x74\x72\x6C\x2B\x44","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x56","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x45","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x43\x74\x72\x6C\x2B\x41","\x68\x6F\x6D\x65","\x48\x6F\x6D\x65","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x50\x61\x67\x65\x20\x55\x70","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x50\x61\x67\x65\x20\x44\x6F\x77\x6E","\x65\x78\x70\x61\x6E\x64","\x66\x6F\x6C\x64\x43\x65\x6C\x6C\x73","\x45\x6E\x74\x65\x72","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x42\x61\x63\x6B\x73\x70\x61\x63\x65","\x74\x6F\x46\x72\x6F\x6E\x74","\x6F\x72\x64\x65\x72\x43\x65\x6C\x6C\x73","\x43\x74\x72\x6C\x2B\x46","\x74\x6F\x42\x61\x63\x6B","\x43\x74\x72\x6C\x2B\x42","\x67\x72\x6F\x75\x70","\x67\x72\x6F\x75\x70\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x43\x74\x72\x6C\x2B\x47","\x75\x6E\x67\x72\x6F\x75\x70","\x75\x6E\x67\x72\x6F\x75\x70\x43\x65\x6C\x6C\x73","\x43\x74\x72\x6C\x2B\x55","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x47\x72\x6F\x75\x70","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x65\x64\x69\x74\x4C\x69\x6E\x6B","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","","\x65\x6E\x74\x65\x72\x56\x61\x6C\x75\x65","\x70\x72\x6F\x6D\x70\x74","\x73\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x6F\x70\x65\x6E\x4C\x69\x6E\x6B","\x61\x75\x74\x6F\x73\x69\x7A\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x6F\x75\x6E\x74","\x75\x70\x64\x61\x74\x65\x47\x72\x6F\x75\x70\x42\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x43\x65\x6C\x6C\x53\x69\x7A\x65","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x77\x6F\x72\x64\x57\x72\x61\x70","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x77\x72\x61\x70","\x53\x54\x59\x4C\x45\x5F\x57\x48\x49\x54\x45\x5F\x53\x50\x41\x43\x45","\x73\x74\x79\x6C\x65","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x30","\x53\x54\x59\x4C\x45\x5F\x52\x4F\x54\x41\x54\x49\x4F\x4E","\x20\x28","\x20\x30\x2D\x33\x36\x30\x29","\x74\x69\x6C\x74","\x69\x73\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x43\x65\x6C\x6C\x47\x65\x6F\x6D\x65\x74\x72\x79","\x63\x6C\x6F\x6E\x65","\x78","\x77\x69\x64\x74\x68","\x68\x65\x69\x67\x68\x74","\x79","\x73\x65\x74\x47\x65\x6F\x6D\x65\x74\x72\x79","\x76\x69\x65\x77","\x53\x54\x59\x4C\x45\x5F\x44\x49\x52\x45\x43\x54\x49\x4F\x4E","\x65\x61\x73\x74","\x73\x6F\x75\x74\x68","\x77\x65\x73\x74","\x6E\x6F\x72\x74\x68","\x43\x74\x72\x6C\x2B\x52","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x7A\x6F\x6F\x6D\x54\x6F","\x7A\x6F\x6F\x6D\x49\x6E","\x41\x64\x64","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x53\x75\x62\x74\x72\x61\x63\x74","\x66\x69\x74\x57\x69\x6E\x64\x6F\x77","\x66\x69\x74","\x66\x69\x74\x50\x61\x67\x65","\x70\x61\x67\x65\x56\x69\x73\x69\x62\x6C\x65","\x66\x75\x6E\x63\x74","\x70\x61\x67\x65\x56\x69\x65\x77","\x70\x61\x67\x65\x46\x6F\x72\x6D\x61\x74","\x70\x61\x67\x65\x53\x63\x61\x6C\x65","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x63\x6C\x69\x65\x6E\x74\x48\x65\x69\x67\x68\x74","\x6D\x69\x6E","\x66\x6C\x6F\x6F\x72","\x73\x63\x72\x6F\x6C\x6C\x4C\x65\x66\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65","\x6D\x61\x78","\x72\x6F\x75\x6E\x64","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x66\x69\x74\x50\x61\x67\x65\x57\x69\x64\x74\x68","\x63\x75\x73\x74\x6F\x6D\x5A\x6F\x6F\x6D","\x63\x75\x73\x74\x6F\x6D","\x20\x28\x25\x29","\x67\x65\x74\x53\x63\x61\x6C\x65","\x67\x72\x69\x64","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x75\x70\x64\x61\x74\x65\x47\x72\x61\x70\x68\x43\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x47","\x73\x65\x74\x54\x6F\x67\x67\x6C\x65\x41\x63\x74\x69\x6F\x6E","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x65\x64\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x67\x75\x69\x64\x65\x73","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x74\x6F\x6F\x6C\x74\x69\x70\x73","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x6E\x61\x76\x69\x67\x61\x74\x69\x6F\x6E","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x72\x65\x76\x61\x6C\x69\x64\x61\x74\x65","\x73\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x73\x63\x61\x6C\x65","\x73\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x73\x69\x7A\x65\x44\x69\x64\x43\x68\x61\x6E\x67\x65","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x61\x75\x74\x6F","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x73\x56\x69\x73\x69\x62\x6C\x65","\x70\x72\x65\x66\x65\x72\x50\x61\x67\x65\x53\x69\x7A\x65","\x76\x61\x6C\x69\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x6F\x75\x74\x6C\x69\x6E\x65","\x68\x61\x73\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x43\x74\x72\x6C\x2B\x51","\x63\x6F\x70\x79\x43\x6F\x6E\x6E\x65\x63\x74","\x69\x73\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x73\x65\x74\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x68\x65\x6C\x70","\x6C\x61\x6E\x67\x75\x61\x67\x65","\x69\x73\x4C\x61\x6E\x67\x75\x61\x67\x65\x53\x75\x70\x70\x6F\x72\x74\x65\x64","\x5F","\x2F\x68\x65\x6C\x70","\x2E\x68\x74\x6D\x6C","\x61\x62\x6F\x75\x74","\x20\x43\x61\x6C\x6C\x79\x20\x53\x71\x75\x61\x72\x65","\x46\x31","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x46\x6C\x61\x67\x73","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x73\x68\x61\x64\x6F\x77","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x64\x61\x73\x68\x65\x64","\x72\x6F\x75\x6E\x64\x65\x64","\x63\x75\x72\x76\x65\x64","\x29","\x67\x65\x74\x53\x74\x79\x6C\x65","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x73\x65\x74\x41\x73\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x61\x64\x64\x57\x61\x79\x70\x6F\x69\x6E\x74","\x69\x73\x45\x64\x67\x65","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x73\x74\x61\x74\x65","\x74\x72\x69\x67\x67\x65\x72\x58","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x74\x72\x69\x67\x67\x65\x72\x59","\x61\x64\x64\x50\x6F\x69\x6E\x74\x41\x74","\x72\x65\x6D\x6F\x76\x65\x57\x61\x79\x70\x6F\x69\x6E\x74","\x68\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x64\x65\x78","\x72\x65\x6D\x6F\x76\x65\x50\x6F\x69\x6E\x74","\x69\x6D\x61\x67\x65","\x67\x65\x74\x47\x72\x69\x64\x53\x69\x7A\x65","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x69\x6E\x73\x65\x72\x74\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x67\x65\x74\x47\x65\x6F\x6D\x65\x74\x72\x79","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x49\x4D\x41\x47\x45","\x75\x72\x6C","\x6F\x6E\x6C\x6F\x61\x64","\x6F\x6E\x65\x72\x72\x6F\x72","\x66\x69\x6C\x65\x4E\x6F\x74\x46\x6F\x75\x6E\x64","\x61\x6C\x65\x72\x74","\x73\x72\x63","\x63\x61\x6C\x6C","\x6C\x61\x62\x65\x6C","\x65\x6E\x61\x62\x6C\x65\x64","\x69\x63\x6F\x6E\x43\x6C\x73","\x73\x68\x6F\x72\x74\x63\x75\x74","\x65\x78\x74\x65\x6E\x64","\x73\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x64","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x74\x6F\x67\x67\x6C\x65\x41\x63\x74\x69\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x65\x64\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x69\x73\x53\x65\x6C\x65\x63\x74\x65\x64"];_0x7635[0];function Actions(_0x50cbx2){this[_0x7635[1]]= _0x50cbx2;this[_0x7635[2]]=  new Object();this[_0x7635[3]]()}Actions[_0x7635[4]][_0x7635[3]]= function(){var _0x50cbx3=this[_0x7635[1]];var _0x50cbx4=_0x50cbx3[_0x7635[5]];var _0x50cbx5=_0x50cbx4[_0x7635[6]];this[_0x7635[10]](_0x7635[7],function(){_0x50cbx3[_0x7635[9]]( new NewDialog(_0x50cbx3)[_0x7635[8]],300,180,true,true)});this[_0x7635[10]](_0x7635[11],function(){_0x50cbx3[_0x7635[9]]( new OpenDialog(_0x50cbx3)[_0x7635[8]],300,180,true,true)});this[_0x7635[10]](_0x7635[12],function(){_0x50cbx3[_0x7635[13]](false)},null,null,_0x7635[14]);this[_0x7635[10]](_0x7635[15],function(){_0x50cbx3[_0x7635[13]](true)},null,null,_0x7635[16]);this[_0x7635[10]](_0x7635[17],function(){_0x50cbx3[_0x7635[18]](false)},null,null,_0x7635[19]);this[_0x7635[10]](_0x7635[20],function(){_0x50cbx3[_0x7635[9]]( new VariableDialog(_0x50cbx3)[_0x7635[8]],300,180,true,true)});this[_0x7635[10]](_0x7635[21],function(){_0x50cbx3[_0x7635[9]]( new ImportDialog(_0x50cbx3)[_0x7635[8]],300,200,true,true)});this[_0x7635[10]](_0x7635[22],function(){_0x50cbx3[_0x7635[9]]( new ExportDialog(_0x50cbx3)[_0x7635[8]],300,200,true,true)},null,null,_0x7635[23]);this[_0x7635[28]](_0x7635[24], new Action(mxResources[_0x7635[26]](_0x7635[25]),mxUtils[_0x7635[27]](this,function(){this[_0x7635[1]][_0x7635[9]]( new EditFileDialog(_0x50cbx3)[_0x7635[8]],620,420,true,true)})));this[_0x7635[10]](_0x7635[29],function(){_0x50cbx3[_0x7635[9]]( new RenameDialog(_0x50cbx3)[_0x7635[8]],300,180,true,true)});this[_0x7635[10]](_0x7635[30],function(){mxUtils[_0x7635[31]](_0x50cbx5)},null,_0x7635[32],_0x7635[33]);this[_0x7635[10]](_0x7635[34],function(){mxUtils[_0x7635[35]](_0x50cbx5,null,10,10)});this[_0x7635[10]](_0x7635[36],function(){_0x50cbx4[_0x7635[37]][_0x7635[36]]()},null,_0x7635[38],_0x7635[39]);this[_0x7635[10]](_0x7635[40],function(){_0x50cbx4[_0x7635[37]][_0x7635[40]]()},null,_0x7635[41],_0x7635[42]);this[_0x7635[10]](_0x7635[43],function(){mxClipboard[_0x7635[43]](_0x50cbx5)},null,_0x7635[44],_0x7635[45]);this[_0x7635[10]](_0x7635[46],function(){mxClipboard[_0x7635[46]](_0x50cbx5)},null,_0x7635[47],_0x7635[48]);this[_0x7635[10]](_0x7635[49],function(){mxClipboard[_0x7635[49]](_0x50cbx5)},false,_0x7635[50],_0x7635[51]);this[_0x7635[10]](_0x7635[52],function(){_0x50cbx5[_0x7635[53]]()},null,null,_0x7635[54]);this[_0x7635[10]](_0x7635[55],function(){var _0x50cbx6=_0x50cbx5[_0x7635[56]];_0x50cbx5[_0x7635[59]](_0x50cbx5[_0x7635[58]](_0x50cbx5[_0x7635[57]](),_0x50cbx6,_0x50cbx6,true))},null,null,_0x7635[60]);this[_0x7635[10]](_0x7635[61],function(){_0x50cbx5[_0x7635[61]]()},null,null,_0x7635[62]);this[_0x7635[10]](_0x7635[63],function(){_0x50cbx5[_0x7635[63]]()},null,null,_0x7635[64]);this[_0x7635[10]](_0x7635[65],function(){_0x50cbx5[_0x7635[65]]()},null,null,_0x7635[66]);this[_0x7635[10]](_0x7635[67],function(){_0x50cbx5[_0x7635[67]]()},null,null,_0x7635[68]);this[_0x7635[10]](_0x7635[69],function(){_0x50cbx5[_0x7635[69]]()},null,null,_0x7635[70]);this[_0x7635[10]](_0x7635[71],function(){_0x50cbx5[_0x7635[71]]()},null,null,_0x7635[72]);this[_0x7635[10]](_0x7635[73],function(){_0x50cbx5[_0x7635[74]](false)},null,null,_0x7635[75]);this[_0x7635[10]](_0x7635[76],function(){_0x50cbx5[_0x7635[74]](true)},null,null,_0x7635[77]);this[_0x7635[10]](_0x7635[78],function(){_0x50cbx5[_0x7635[79]](false)},null,null,_0x7635[80]);this[_0x7635[10]](_0x7635[81],function(){_0x50cbx5[_0x7635[79]](true)},null,null,_0x7635[82]);this[_0x7635[10]](_0x7635[83],function(){_0x50cbx5[_0x7635[85]](_0x50cbx5[_0x7635[84]](null,0))},null,null,_0x7635[86]);this[_0x7635[10]](_0x7635[87],function(){_0x50cbx5[_0x7635[59]](_0x50cbx5[_0x7635[88]]())},null,null,_0x7635[89]);this[_0x7635[10]](_0x7635[90],function(){_0x50cbx5[_0x7635[91]]()});this[_0x7635[10]](_0x7635[92],function(){var _0x50cbx7=_0x50cbx5[_0x7635[93]]();var _0x50cbx8=_0x50cbx5[_0x7635[94]](_0x50cbx7);if(_0x50cbx8== null){_0x50cbx8= _0x7635[95]};_0x50cbx8= mxUtils[_0x7635[97]](mxResources[_0x7635[26]](_0x7635[96]),_0x50cbx8);if(_0x50cbx8!= null){_0x50cbx5[_0x7635[98]](_0x50cbx7,_0x50cbx8)}});this[_0x7635[10]](_0x7635[99],function(){var _0x50cbx7=_0x50cbx5[_0x7635[93]]();var _0x50cbx8=_0x50cbx5[_0x7635[94]](_0x50cbx7);if(_0x50cbx8!= null){window[_0x7635[11]](_0x50cbx8)}});this[_0x7635[10]](_0x7635[100],function(){var _0x50cbx9=_0x50cbx5[_0x7635[57]]();if(_0x50cbx9!= null){_0x50cbx5[_0x7635[102]]()[_0x7635[101]]();try{for(var _0x50cbxa=0;_0x50cbxa< _0x50cbx9[_0x7635[103]];_0x50cbxa++){var _0x50cbx7=_0x50cbx9[_0x50cbxa];if(_0x50cbx5[_0x7635[102]]()[_0x7635[104]](_0x50cbx7)){_0x50cbx5[_0x7635[105]]([_0x50cbx7],20)}else {_0x50cbx5[_0x7635[106]](_0x50cbx7)}}}finally{_0x50cbx5[_0x7635[102]]()[_0x7635[107]]()}}});this[_0x7635[10]](_0x7635[108],function(){var _0x50cbxb=_0x50cbx5[_0x7635[110]]()[_0x7635[109]](_0x50cbx5[_0x7635[93]]());var _0x50cbxc=_0x7635[111];if(_0x50cbxb!= null&& _0x50cbxb[_0x7635[113]][mxConstants[_0x7635[112]]]== _0x7635[111]){_0x50cbxc= null};_0x50cbx5[_0x7635[114]](mxConstants.STYLE_WHITE_SPACE,_0x50cbxc)});this[_0x7635[10]](_0x7635[115],function(){var _0x50cbxc=_0x7635[116];var _0x50cbxb=_0x50cbx5[_0x7635[110]]()[_0x7635[109]](_0x50cbx5[_0x7635[93]]());if(_0x50cbxb!= null){_0x50cbxc= _0x50cbxb[_0x7635[113]][mxConstants[_0x7635[117]]]|| _0x50cbxc};_0x50cbxc= mxUtils[_0x7635[97]](mxResources[_0x7635[26]](_0x7635[96])+ _0x7635[118]+ mxResources[_0x7635[26]](_0x7635[115])+ _0x7635[119],_0x50cbxc);if(_0x50cbxc!= null){_0x50cbx5[_0x7635[114]](mxConstants.STYLE_ROTATION,_0x50cbxc)}});this[_0x7635[10]](_0x7635[120],function(){var _0x50cbx9=_0x50cbx5[_0x7635[57]]();if(_0x50cbx9!= null){_0x50cbx5[_0x7635[102]]()[_0x7635[101]]();try{for(var _0x50cbxa=0;_0x50cbxa< _0x50cbx9[_0x7635[103]];_0x50cbxa++){var _0x50cbx7=_0x50cbx9[_0x50cbxa];if(_0x50cbx5[_0x7635[102]]()[_0x7635[121]](_0x50cbx7)&& _0x50cbx5[_0x7635[102]]()[_0x7635[104]](_0x50cbx7)== 0){var _0x50cbxd=_0x50cbx5[_0x7635[122]](_0x50cbx7);if(_0x50cbxd!= null){_0x50cbxd= _0x50cbxd[_0x7635[123]]();_0x50cbxd[_0x7635[124]]+= _0x50cbxd[_0x7635[125]]/ 2- _0x50cbxd[_0x7635[126]]/ 2;_0x50cbxd[_0x7635[127]]+= _0x50cbxd[_0x7635[126]]/ 2- _0x50cbxd[_0x7635[125]]/ 2;var _0x50cbxe=_0x50cbxd[_0x7635[125]];_0x50cbxd[_0x7635[125]]= _0x50cbxd[_0x7635[126]];_0x50cbxd[_0x7635[126]]= _0x50cbxe;_0x50cbx5[_0x7635[102]]()[_0x7635[128]](_0x50cbx7,_0x50cbxd);var _0x50cbxb=_0x50cbx5[_0x7635[129]][_0x7635[109]](_0x50cbx7);if(_0x50cbxb!= null){var _0x50cbxf=_0x50cbxb[_0x7635[113]][mxConstants[_0x7635[130]]]|| _0x7635[131];if(_0x50cbxf== _0x7635[131]){_0x50cbxf= _0x7635[132]}else {if(_0x50cbxf== _0x7635[132]){_0x50cbxf= _0x7635[133]}else {if(_0x50cbxf== _0x7635[133]){_0x50cbxf= _0x7635[134]}else {if(_0x50cbxf== _0x7635[134]){_0x50cbxf= _0x7635[131]}}}};_0x50cbx5[_0x7635[114]](mxConstants.STYLE_DIRECTION,_0x50cbxf,[_0x50cbx7])}}}}}finally{_0x50cbx5[_0x7635[102]]()[_0x7635[107]]()}}},null,null,_0x7635[135]);this[_0x7635[10]](_0x7635[136],function(){_0x50cbx5[_0x7635[137]](1)});this[_0x7635[10]](_0x7635[138],function(){_0x50cbx5[_0x7635[138]]()},null,null,_0x7635[139]);this[_0x7635[10]](_0x7635[140],function(){_0x50cbx5[_0x7635[140]]()},null,null,_0x7635[141]);this[_0x7635[10]](_0x7635[142],function(){_0x50cbx5[_0x7635[143]]()});this[_0x7635[10]](_0x7635[144],mxUtils[_0x7635[27]](this,function(){if(!_0x50cbx5[_0x7635[145]]){this[_0x7635[26]](_0x7635[147])[_0x7635[146]]()};var _0x50cbx10=_0x50cbx5[_0x7635[148]];var _0x50cbx11=_0x50cbx5[_0x7635[149]];var _0x50cbx12=_0x50cbx5[_0x7635[8]][_0x7635[150]]- 20;var _0x50cbx13=_0x50cbx5[_0x7635[8]][_0x7635[151]]- 20;var _0x50cbx14=Math[_0x7635[153]](100* Math[_0x7635[152]](_0x50cbx12/ _0x50cbx10[_0x7635[125]]/ _0x50cbx11,_0x50cbx13/ _0x50cbx10[_0x7635[126]]/ _0x50cbx11))/ 100;_0x50cbx5[_0x7635[137]](_0x50cbx14);_0x50cbx5[_0x7635[8]][_0x7635[154]]= Math[_0x7635[157]](_0x50cbx5[_0x7635[129]][_0x7635[155]][_0x7635[124]]* _0x50cbx14- Math[_0x7635[156]](10,(_0x50cbx5[_0x7635[8]][_0x7635[150]]- _0x50cbx10[_0x7635[125]]* _0x50cbx11* _0x50cbx14)/ 2));_0x50cbx5[_0x7635[8]][_0x7635[158]]= Math[_0x7635[157]](_0x50cbx5[_0x7635[129]][_0x7635[155]][_0x7635[127]]* _0x50cbx14- Math[_0x7635[156]](10,(_0x50cbx5[_0x7635[8]][_0x7635[151]]- _0x50cbx10[_0x7635[126]]* _0x50cbx11* _0x50cbx14)/ 2))}));this[_0x7635[10]](_0x7635[159],mxUtils[_0x7635[27]](this,function(){if(!_0x50cbx5[_0x7635[145]]){this[_0x7635[26]](_0x7635[147])[_0x7635[146]]()};var _0x50cbx10=_0x50cbx5[_0x7635[148]];var _0x50cbx11=_0x50cbx5[_0x7635[149]];var _0x50cbx12=_0x50cbx5[_0x7635[8]][_0x7635[150]]- 20;var _0x50cbx14=Math[_0x7635[153]](100* _0x50cbx12/ _0x50cbx10[_0x7635[125]]/ _0x50cbx11)/ 100;_0x50cbx5[_0x7635[137]](_0x50cbx14);_0x50cbx5[_0x7635[8]][_0x7635[154]]= Math[_0x7635[157]](_0x50cbx5[_0x7635[129]][_0x7635[155]][_0x7635[124]]* _0x50cbx14- Math[_0x7635[156]](10,(_0x50cbx5[_0x7635[8]][_0x7635[150]]- _0x50cbx10[_0x7635[125]]* _0x50cbx11* _0x50cbx14)/ 2));_0x50cbx5[_0x7635[8]][_0x7635[158]]= Math[_0x7635[157]](_0x50cbx5[_0x7635[129]][_0x7635[155]][_0x7635[127]]* _0x50cbx14- Math[_0x7635[156]](10,(_0x50cbx5[_0x7635[8]][_0x7635[151]]- _0x50cbx10[_0x7635[126]]* _0x50cbx11* _0x50cbx14)/ 2))}));this[_0x7635[28]](_0x7635[160], new Action(mxResources[_0x7635[26]](_0x7635[161]),function(){var _0x50cbxc=mxUtils[_0x7635[97]](mxResources[_0x7635[26]](_0x7635[96])+ _0x7635[162],parseInt(_0x50cbx5[_0x7635[110]]()[_0x7635[163]]()* 100));if(_0x50cbxc!= null&& _0x50cbxc[_0x7635[103]]> 0&& !isNaN(parseInt(_0x50cbxc))){_0x50cbx5[_0x7635[137]](parseInt(_0x50cbxc)/ 100)}}));var _0x50cbx15=null;_0x50cbx15= this[_0x7635[10]](_0x7635[164],function(){_0x50cbx5[_0x7635[166]](!_0x50cbx5[_0x7635[165]]());_0x50cbx4[_0x7635[167]]()},null,null,_0x7635[168]);_0x50cbx15[_0x7635[169]](true);_0x50cbx15[_0x7635[170]](function(){return _0x50cbx5[_0x7635[165]]()});_0x50cbx15= this[_0x7635[10]](_0x7635[171],function(){_0x50cbx5[_0x7635[173]][_0x7635[172]]= !_0x50cbx5[_0x7635[173]][_0x7635[172]]});_0x50cbx15[_0x7635[169]](true);_0x50cbx15[_0x7635[170]](function(){return _0x50cbx5[_0x7635[173]][_0x7635[172]]});_0x50cbx15= this[_0x7635[10]](_0x7635[174],function(){_0x50cbx5[_0x7635[176]][_0x7635[177]](!_0x50cbx5[_0x7635[176]][_0x7635[175]]())});_0x50cbx15[_0x7635[169]](true);_0x50cbx15[_0x7635[170]](function(){return _0x50cbx5[_0x7635[176]][_0x7635[175]]()});_0x50cbx15= this[_0x7635[10]](_0x7635[178],function(){_0x50cbx5[_0x7635[179]]= !_0x50cbx5[_0x7635[179]];_0x50cbx5[_0x7635[129]][_0x7635[180]]()});_0x50cbx15[_0x7635[169]](true);_0x50cbx15[_0x7635[170]](function(){return _0x50cbx5[_0x7635[179]]});_0x50cbx15= this[_0x7635[10]](_0x7635[181],function(){_0x50cbx5[_0x7635[181]]= !_0x50cbx5[_0x7635[181]];_0x50cbx4[_0x7635[167]]();if(!_0x50cbx5[_0x7635[181]]){var _0x50cbx16=_0x50cbx5[_0x7635[129]][_0x7635[155]];_0x50cbx5[_0x7635[129]][_0x7635[183]](_0x50cbx16[_0x7635[124]]- _0x50cbx5[_0x7635[8]][_0x7635[154]]/ _0x50cbx5[_0x7635[129]][_0x7635[182]],_0x50cbx16[_0x7635[127]]- _0x50cbx5[_0x7635[8]][_0x7635[158]]/ _0x50cbx5[_0x7635[129]][_0x7635[182]]);_0x50cbx5[_0x7635[8]][_0x7635[154]]= 0;_0x50cbx5[_0x7635[8]][_0x7635[158]]= 0;_0x50cbx5[_0x7635[184]]()}else {var _0x50cbx17=_0x50cbx5[_0x7635[129]][_0x7635[155]][_0x7635[124]];var _0x50cbx18=_0x50cbx5[_0x7635[129]][_0x7635[155]][_0x7635[127]];_0x50cbx5[_0x7635[129]][_0x7635[155]][_0x7635[124]]= 0;_0x50cbx5[_0x7635[129]][_0x7635[155]][_0x7635[127]]= 0;_0x50cbx5[_0x7635[184]]();_0x50cbx5[_0x7635[8]][_0x7635[154]]-= Math[_0x7635[157]](_0x50cbx17* _0x50cbx5[_0x7635[129]][_0x7635[182]]);_0x50cbx5[_0x7635[8]][_0x7635[158]]-= Math[_0x7635[157]](_0x50cbx18* _0x50cbx5[_0x7635[129]][_0x7635[182]])}},!mxClient.IS_TOUCH);_0x50cbx15[_0x7635[169]](true);_0x50cbx15[_0x7635[170]](function(){return _0x50cbx5[_0x7635[8]][_0x7635[113]][_0x7635[185]]== _0x7635[186]});_0x50cbx15= this[_0x7635[10]](_0x7635[147],mxUtils[_0x7635[27]](this,function(){_0x50cbx5[_0x7635[145]]= !_0x50cbx5[_0x7635[145]];_0x50cbx5[_0x7635[187]]= _0x50cbx5[_0x7635[145]];_0x50cbx5[_0x7635[188]]= _0x50cbx5[_0x7635[187]];_0x50cbx5[_0x7635[129]][_0x7635[189]]();_0x50cbx5[_0x7635[184]]();_0x50cbx4[_0x7635[167]]();_0x50cbx4[_0x7635[191]][_0x7635[190]]();if(mxUtils[_0x7635[192]](_0x50cbx5[_0x7635[8]])){if(_0x50cbx5[_0x7635[145]]){_0x50cbx5[_0x7635[8]][_0x7635[154]]-= 20;_0x50cbx5[_0x7635[8]][_0x7635[158]]-= 20}else {_0x50cbx5[_0x7635[8]][_0x7635[154]]+= 20;_0x50cbx5[_0x7635[8]][_0x7635[158]]+= 20}}}));_0x50cbx15[_0x7635[169]](true);_0x50cbx15[_0x7635[170]](function(){return _0x50cbx5[_0x7635[145]]});_0x50cbx15= this[_0x7635[10]](_0x7635[193],function(){_0x50cbx5[_0x7635[195]](!_0x50cbx5[_0x7635[194]][_0x7635[175]]())},null,null,_0x7635[196]);_0x50cbx15[_0x7635[169]](true);_0x50cbx15[_0x7635[170]](function(){return _0x50cbx5[_0x7635[194]][_0x7635[175]]()});_0x50cbx15= this[_0x7635[10]](_0x7635[197],function(){_0x50cbx5[_0x7635[194]][_0x7635[199]](!_0x50cbx5[_0x7635[194]][_0x7635[198]]())});_0x50cbx15[_0x7635[169]](true);_0x50cbx15[_0x7635[170]](function(){return _0x50cbx5[_0x7635[194]][_0x7635[198]]()});this[_0x7635[10]](_0x7635[200],function(){var _0x50cbx19=_0x7635[95];if(mxResources[_0x7635[202]](mxClient[_0x7635[201]])){_0x50cbx19= _0x7635[203]+ mxClient[_0x7635[201]]};window[_0x7635[11]](RESOURCES_PATH+ _0x7635[204]+ _0x50cbx19+ _0x7635[205])});this[_0x7635[28]](_0x7635[206], new Action(mxResources[_0x7635[26]](_0x7635[206])+ _0x7635[207],function(){_0x50cbx3[_0x7635[9]]( new AboutDialog(_0x50cbx3)[_0x7635[8]],320,280,true,true)},null,null,_0x7635[208]));var _0x50cbx1a=mxUtils[_0x7635[27]](this,function(_0x50cbx1b,_0x50cbx1c){this[_0x7635[10]](_0x50cbx1b,function(){_0x50cbx5[_0x7635[209]](mxConstants.STYLE_FONTSTYLE,_0x50cbx1c)})});_0x50cbx1a(_0x7635[210],mxConstants.FONT_BOLD);_0x50cbx1a(_0x7635[211],mxConstants.FONT_ITALIC);_0x50cbx1a(_0x7635[212],mxConstants.FONT_UNDERLINE);this[_0x7635[10]](_0x7635[213],function(){_0x50cbx5[_0x7635[214]](mxConstants.STYLE_SHADOW)});this[_0x7635[10]](_0x7635[215],function(){_0x50cbx5[_0x7635[214]](mxConstants.STYLE_DASHED)});this[_0x7635[10]](_0x7635[216],function(){_0x50cbx5[_0x7635[214]](mxConstants.STYLE_ROUNDED)});this[_0x7635[10]](_0x7635[217],function(){_0x50cbx5[_0x7635[214]](mxConstants.STYLE_CURVED)});this[_0x7635[10]](_0x7635[113],function(){var _0x50cbx9=_0x50cbx5[_0x7635[57]]();if(_0x50cbx9!= null&& _0x50cbx9[_0x7635[103]]> 0){var _0x50cbx1d=_0x50cbx5[_0x7635[102]]();var _0x50cbx1c=mxUtils[_0x7635[97]](mxResources[_0x7635[26]](_0x7635[96])+ _0x7635[118]+ mxResources[_0x7635[26]](_0x7635[113])+ _0x7635[218],_0x50cbx1d[_0x7635[219]](_0x50cbx9[0])|| _0x7635[95]);if(_0x50cbx1c!= null){_0x50cbx5[_0x7635[220]](_0x50cbx1c,_0x50cbx9)}}});this[_0x7635[10]](_0x7635[221],function(){_0x50cbx5[_0x7635[222]](_0x50cbx5[_0x7635[93]]())});this[_0x7635[10]](_0x7635[223],function(){var _0x50cbx7=_0x50cbx5[_0x7635[93]]();if(_0x50cbx7!= null&& _0x50cbx5[_0x7635[102]]()[_0x7635[224]](_0x50cbx7)){var _0x50cbx1e=_0x50cbx4[_0x7635[6]][_0x7635[226]][_0x7635[225]](_0x50cbx7);if(_0x50cbx1e instanceof  mxEdgeHandler){var _0x50cbx16=_0x50cbx5[_0x7635[129]][_0x7635[155]];var _0x50cbx6=_0x50cbx5[_0x7635[129]][_0x7635[182]];var _0x50cbx17=_0x50cbx16[_0x7635[124]];var _0x50cbx18=_0x50cbx16[_0x7635[127]];var _0x50cbx1f=_0x50cbx5[_0x7635[102]]()[_0x7635[227]](_0x50cbx7);var _0x50cbx20=_0x50cbx5[_0x7635[122]](_0x50cbx1f);if(_0x50cbx5[_0x7635[102]]()[_0x7635[121]](_0x50cbx1f)&& _0x50cbx20!= null){_0x50cbx17+= _0x50cbx20[_0x7635[124]];_0x50cbx18+= _0x50cbx20[_0x7635[127]]};_0x50cbx1e[_0x7635[232]](_0x50cbx1e[_0x7635[228]],_0x50cbx5[_0x7635[230]][_0x7635[229]]/ _0x50cbx6- _0x50cbx17,_0x50cbx5[_0x7635[230]][_0x7635[231]]/ _0x50cbx6- _0x50cbx18)}}});this[_0x7635[10]](_0x7635[233],function(){var _0x50cbx21=_0x50cbx3[_0x7635[2]][_0x7635[26]](_0x7635[233]);if(_0x50cbx21[_0x7635[234]]!= null){_0x50cbx21[_0x7635[234]][_0x7635[236]](_0x50cbx21[_0x7635[234]][_0x7635[228]],_0x50cbx21[_0x7635[235]])}});this[_0x7635[10]](_0x7635[237],function(){function _0x50cbx22(_0x50cbxc,_0x50cbx23,_0x50cbx24){var _0x50cbx25=null;var _0x50cbx9=_0x50cbx5[_0x7635[57]]();_0x50cbx5[_0x7635[102]]()[_0x7635[101]]();try{if(_0x50cbx9[_0x7635[103]]== 0){var _0x50cbx26=_0x50cbx5[_0x7635[238]]();_0x50cbx9= [_0x50cbx5[_0x7635[240]](_0x50cbx5[_0x7635[239]](),null,_0x7635[95],_0x50cbx26,_0x50cbx26,_0x50cbx23,_0x50cbx24)];_0x50cbx25= _0x50cbx9};_0x50cbx5[_0x7635[114]](mxConstants.STYLE_IMAGE,_0x50cbxc,_0x50cbx9);_0x50cbx5[_0x7635[114]](mxConstants.STYLE_SHAPE,_0x7635[237],_0x50cbx9);if(_0x50cbx5[_0x7635[241]]()== 1){if(_0x50cbx23!= null&& _0x50cbx24!= null){var _0x50cbx7=_0x50cbx9[0];var _0x50cbxd=_0x50cbx5[_0x7635[102]]()[_0x7635[242]](_0x50cbx7);if(_0x50cbxd!= null){_0x50cbxd= _0x50cbxd[_0x7635[123]]();_0x50cbxd[_0x7635[125]]= _0x50cbx23;_0x50cbxd[_0x7635[126]]= _0x50cbx24;_0x50cbx5[_0x7635[102]]()[_0x7635[128]](_0x50cbx7,_0x50cbxd)}}}}finally{_0x50cbx5[_0x7635[102]]()[_0x7635[107]]()};if(_0x50cbx25!= null){_0x50cbx5[_0x7635[59]](_0x50cbx25);_0x50cbx5[_0x7635[243]](_0x50cbx25[0])}}var _0x50cbxc=_0x7635[95];var _0x50cbxb=_0x50cbx5[_0x7635[110]]()[_0x7635[109]](_0x50cbx5[_0x7635[93]]());if(_0x50cbxb!= null){_0x50cbxc= _0x50cbxb[_0x7635[113]][mxConstants[_0x7635[244]]]|| _0x50cbxc};_0x50cbxc= mxUtils[_0x7635[97]](mxResources[_0x7635[26]](_0x7635[96])+ _0x7635[118]+ mxResources[_0x7635[26]](_0x7635[245])+ _0x7635[218],_0x50cbxc);if(_0x50cbxc!= null){if(_0x50cbxc[_0x7635[103]]> 0){var _0x50cbx27= new Image();_0x50cbx27[_0x7635[246]]= function(){_0x50cbx22(_0x50cbxc,_0x50cbx27[_0x7635[125]],_0x50cbx27[_0x7635[126]])};_0x50cbx27[_0x7635[247]]= function(){mxUtils[_0x7635[249]](mxResources[_0x7635[26]](_0x7635[248]))};_0x50cbx27[_0x7635[250]]= _0x50cbxc}}})};Actions[_0x7635[4]][_0x7635[10]]= function(_0x50cbx1b,_0x50cbx28,_0x50cbx29,_0x50cbx2a,_0x50cbx2b){return this[_0x7635[28]](_0x50cbx1b, new Action(mxResources[_0x7635[26]](_0x50cbx1b),_0x50cbx28,_0x50cbx29,_0x50cbx2a,_0x50cbx2b))};Actions[_0x7635[4]][_0x7635[28]]= function(_0x50cbx2c,_0x50cbx15){this[_0x7635[2]][_0x50cbx2c]= _0x50cbx15;return _0x50cbx15};Actions[_0x7635[4]][_0x7635[26]]= function(_0x50cbx2c){return this[_0x7635[2]][_0x50cbx2c]};function Action(_0x50cbx2e,_0x50cbx28,_0x50cbx29,_0x50cbx2a,_0x50cbx2b){mxEventSource[_0x7635[251]](this);this[_0x7635[252]]= _0x50cbx2e;this[_0x7635[146]]= _0x50cbx28;this[_0x7635[253]]= (_0x50cbx29!= null)?_0x50cbx29:true;this[_0x7635[254]]= _0x50cbx2a;this[_0x7635[255]]= _0x50cbx2b}mxUtils[_0x7635[256]](Action,mxEventSource);Action[_0x7635[4]][_0x7635[177]]= function(_0x50cbxc){if(this[_0x7635[253]]!= _0x50cbxc){this[_0x7635[253]]= _0x50cbxc;this[_0x7635[258]]( new mxEventObject(_0x7635[257]))}};Action[_0x7635[4]][_0x7635[169]]= function(_0x50cbxc){this[_0x7635[259]]= _0x50cbxc};Action[_0x7635[4]][_0x7635[170]]= function(_0x50cbx28){this[_0x7635[260]]= _0x50cbx28};Action[_0x7635[4]][_0x7635[261]]= function(){return this[_0x7635[260]]()}
\ No newline at end of file
diff --git a/public/assets/plugins/jscripty/js/Dialogs.js b/public/assets/plugins/jscripty/js/Dialogs.js
index 791874e..2cd4c52 100644
--- a/public/assets/plugins/jscripty/js/Dialogs.js
+++ b/public/assets/plugins/jscripty/js/Dialogs.js
@@ -1,1194 +1 @@
-'use strict';
-/**
- * $Id: Dialogs.js,v 1.5 2013-01-29 17:23:31 gaudenz Exp $
- * Copyright (c) 2006-2012, JGraph Ltd
- */
-/**
- * Constructs a new dialog.
- */
-
-function createCheckbox(value) {
-	var input = document.createElement('input');
-	input.setAttribute('type', 'checkbox');
-	if (value) {
-		input.setAttribute('checked', true);
-	}
-	return input;
-}
-
-function createDropdownFromApi(path, value, option_name, option_value, editorUi,
-	keys, pattern) {
-	var req = new XMLHttpRequest();
-	req.open('GET', path, false); // `false` makes the request synchronous
-	req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token);
-	req.send(null);
-	var res = [];
-	if (req.status === 200) {
-		res = JSON.parse(req.response);
-	}
-	var input = document.createElement('select');
-	var option = document.createElement('option');
-	option.text = '-- None --';
-	option.value = '-1';
-	input.appendChild(option);
-	res.rows.forEach(function(elem) {
-		option = document.createElement('option');
-		option.text = elem[option_name];
-		if (keys && pattern) {
-			keys.forEach(function(key) {
-				pattern = pattern.replace('%' + key + '%', elem[key]);
-			});
-			option.value = pattern;
-			option.selected = (pattern == value);
-		} else {
-			option.value = elem[option_value];
-			option.selected = (elem[option_value] == value);
-		}
-		input.appendChild(option);
-	});
-	input.className = 'form-control select2';
-
-	return input;
-}
-
-function createGroupedDropdownFromApi(path, value, option_name, option_value, editorUi, paginated, associationField) {
-	var req = new XMLHttpRequest();
-	req.open('GET', path, false); // `false` makes the request synchronous
-	req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token);
-	req.send(null);
-	var res = [];
-	if (req.status === 200) {
-		res = JSON.parse(req.response);
-	}
-	var input = document.createElement('select');
-	var option = document.createElement('option');
-	option.text = '-- None --';
-	option.value = '0';
-	input.appendChild(option);
-	var selectValues = paginated ? res.rows : res;
-	var mainFilter = {};
-	var groupFilter = {};
-	mainFilter[associationField] = null;
-	var mainValues = _.filter(selectValues, mainFilter);
-	var groupValues = {};
-	mainValues.forEach(function(elem) {
-		option = document.createElement('option');
-		option.className = 'select-group-father';
-		option.text = elem[option_name].toUpperCase();
-		option.value = elem[option_value];
-		option.selected = (elem[option_value] == value);
-		input.appendChild(option);
-		groupFilter[associationField] = elem[option_value];
-		groupValues = _.filter(selectValues, groupFilter);
-		groupValues.forEach(function(elem) {
-			option = document.createElement('option');
-			option.className = 'select-group-son';
-			option.text = '-' + _.capitalize(elem[option_name]);
-			option.value = elem[option_value];
-			option.selected = (elem[option_value] == value);
-			input.appendChild(option);
-		});
-	})
-	input.className = 'form-control select2';
-
-	return input;
-}
-
-function createDropdownFromArray(array, value) {
-	var input = document.createElement('select');
-
-	for (var item in array) {
-		var option = document.createElement('option');
-		option.text = array[item];
-		option.value = item;
-		if (value > 0 || value != '')
-			option.selected = (value === item) ? true : false;
-
-		input.appendChild(option);
-	}
-
-	input.className = 'form-control select2';
-
-	return input;
-}
-
-function Dialog(editorUi, elt, w, h, modal, closable, onClose) {
-	var dx = 0;
-
-	if (mxClient.IS_IE && document.documentMode != 9) {
-		dx = 60;
-	}
-
-	w += dx;
-	h += dx;
-
-	var left = Math.max(0, Math.round((document.body.scrollWidth - w) / 2));
-	var top = Math.max(0, Math.round((Math.max(document.body.scrollHeight,
-		document.documentElement.scrollHeight) - h) / 3));
-
-	var div = editorUi.createDiv('geDialog');
-	div.className = 'modal fade in center';
-	div.style.display = 'block';
-	div.style.paddingRight = '12px';
-	// div.style.width = w + 'px';
-	// div.style.height = h + 'px';
-	// div.style.left = left + 'px';
-	// div.style.top = top + 'px';
-
-	var divModalDialog = editorUi.createDiv('geModalDialog');
-	divModalDialog.className = 'modal-dialog';
-	divModalDialog.appendChild(elt);
-	div.appendChild(divModalDialog);
-
-	if (this.bg == null) {
-		this.bg = editorUi.createDiv('background');
-		this.bg.className = 'modal-backdrop fade in';
-
-		if (mxClient.IS_QUIRKS) {
-			new mxDivResizer(this.bg);
-		}
-	}
-
-	if (modal) {
-		document.body.appendChild(this.bg);
-	}
-
-	document.body.appendChild(div);
-
-	this.onDialogClose = onClose;
-	this.container = div;
-};
-
-/**
- * Removes the dialog from the DOM.
- */
-Dialog.prototype.close = function() {
-	if (this.onDialogClose != null) {
-		this.onDialogClose();
-		this.onDialogClose = null;
-	}
-
-	this.container.parentNode.removeChild(this.container);
-	this.bg.parentNode.removeChild(this.bg);
-};
-
-/**
- * Constructs a new open dialog.
- */
-function ImportDialog(editorUi) {
-
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('import') + ' XML');
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var row = editorUi.createDiv('row');
-	var col1 = editorUi.createDiv('col-md-12');
-
-	var textarea = document.createElement('textarea');
-	textarea.style.width = '100%';
-	textarea.style.height = '374px';
-
-	var input = document.createElement('input');
-	input.type = 'file';
-	input.setAttribute('accept', 'text/xml');
-
-	input.addEventListener('change', function readSingleFile(evt) {
-		//Retrieve the first (and only!) File from the FileList object
-		var f = evt.target.files[0];
-		console.log(f);
-		if (f) {
-			if (f.type === 'text/xml') {
-				var r = new FileReader();
-				r.onload = function(e) {
-					var contents = e.target.result;
-					mxUtils.write(textarea, contents);
-				};
-				r.readAsText(f);
-			} else {
-				alert('Failed to load format file');
-			}
-		} else {
-			alert('Failed to load file');
-		}
-	}, false);
-
-	col1.appendChild(input);
-	col1.appendChild(textarea);
-
-	row.appendChild(col1);
-	body.appendChild(row);
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('import'), mxUtils.bind(this,
-		function(data) {
-			var doc = mxUtils.parseXml(textarea.value);
-			editorUi.editor.setGraphXml(doc.documentElement);
-			editorUi.hideDialog();
-		}));
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-
-};
-
-/**
- * Constructs a new about dialog.
- */
-function AboutDialog(editorUi) {
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('about') + ' Cally Square');
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var img = document.createElement('img');
-	img.style.border = '0px';
-	img.setAttribute('width', '176');
-	img.setAttribute('width', '151');
-	img.setAttribute('src', IMAGE_PATH + '/logo.png');
-	body.appendChild(img);
-	mxUtils.br(body);
-	mxUtils.write(body, 'Powered by Xenialab ' + mxClient.VERSION);
-	mxUtils.br(body);
-	var link = document.createElement('a');
-	link.setAttribute('href', 'http://www.callysquare.com/');
-	link.setAttribute('target', '_blank');
-	mxUtils.write(link, 'www.callysquare.com');
-	body.appendChild(link);
-	mxUtils.br(body);
-	mxUtils.br(body);
-	//--- END BODY
-
-	var close = mxUtils.button(mxResources.get('close'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-};
-
-/**
- * Constructs a new save dialog.
- */
-function SaveDialog(editorUi) {
-
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('saveAs'));
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var name = 'name';
-	var id = '_' + name;
-	var value = editorUi.editor.getOrCreateFilename();
-
-	var row = editorUi.createDiv('row');
-	var col1 = editorUi.createDiv('col-md-4');
-	var col2 = editorUi.createDiv('col-md-8');
-
-	var label = document.createElement('label');
-	label.className = 'control-label pull-right';
-	mxUtils.write(label, mxResources.get(name));
-	col1.appendChild(label);
-
-	var select = document.createElement('input');
-	select.setAttribute('value', value + '_copy');
-	select.setAttribute('id', id)
-	select.className = 'form-control';
-	col2.appendChild(select);
-
-	row.appendChild(col1);
-	row.appendChild(col2);
-	body.appendChild(row);
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('save'), function() {
-		editorUi.saveAs(select.value);
-		editorUi.hideDialog();
-	});
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-	//nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
-};
-
-/**
- * Constructs a new save dialog.
- */
-function NewDialog(editorUi) {
-
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('new'));
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var name = 'name';
-	var id = '_' + name;
-	var value = editorUi.editor.getOrCreateFilename();
-
-	var row = editorUi.createDiv('row');
-	var col1 = editorUi.createDiv('col-md-4');
-	var col2 = editorUi.createDiv('col-md-8');
-
-	var label = document.createElement('label');
-	label.className = 'control-label pull-right';
-	mxUtils.write(label, mxResources.get(name));
-	col1.appendChild(label);
-
-	var select = document.createElement('input');
-	select.setAttribute('value', value + '_new');
-	select.setAttribute('id', id)
-	select.className = 'form-control';
-	col2.appendChild(select);
-
-	row.appendChild(col1);
-	row.appendChild(col2);
-	body.appendChild(row);
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('new'), function() {
-		editorUi.new(select.value);
-		editorUi.hideDialog();
-	});
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-	//nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
-};
-
-/**
- * Constructs a new save dialog.
- */
-function VariableDialog(editorUi) {
-
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('variable'));
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var name = 'name';
-	var id = '_' + name;
-	var value = editorUi.editor.getOrCreateFilename();
-
-	var row = editorUi.createDiv('row');
-	var col1 = editorUi.createDiv('col-md-4');
-	var col2 = editorUi.createDiv('col-md-8');
-
-	var label = document.createElement('label');
-	label.className = 'control-label pull-right';
-	mxUtils.write(label, mxResources.get(name));
-	col1.appendChild(label);
-
-	var select = document.createElement('input');
-	select.setAttribute('value', 'variable name');
-	select.setAttribute('id', id)
-	select.className = 'form-control';
-	col2.appendChild(select);
-
-	row.appendChild(col1);
-	row.appendChild(col2);
-	body.appendChild(row);
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('new'), function() {
-		editorUi.variable(select.value);
-		editorUi.hideDialog();
-	});
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-	//nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
-};
-
-/**
- * Constructs a new save dialog.
- */
-function OpenDialog(editorUi) {
-
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('open'));
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var row = editorUi.createDiv('row');
-	var col1 = editorUi.createDiv('col-md-4');
-	var col2 = editorUi.createDiv('col-md-8');
-
-	var label = document.createElement('label');
-	label.className = 'control-label pull-right';
-	mxUtils.write(label, mxResources.get('name'));
-	col1.appendChild(label);
-
-	var req = new XMLHttpRequest();
-	req.open('GET', '/api/jscripty/projects', false); // `false` makes the request synchronous
-	req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token);
-	req.send(null);
-	var res = [];
-	if (req.status === 200) {
-		res = JSON.parse(req.response).rows;
-	}
-
-	var select = document.createElement('select');
-
-	for (var j = 0; j < res.length; j++) {
-		var option = document.createElement('option');
-		option.text = res[j].name;
-		option.value = res[j].id;
-		select.appendChild(option);
-	}
-	select.className = 'form-control';
-	col2.appendChild(select);
-
-	row.appendChild(col1);
-	row.appendChild(col2);
-	body.appendChild(row);
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('open'), function() {
-		console.log(select);
-		console.log(select.value);
-		window.open('jscripty/projects/view/' + select.value, '_blank');
-		editorUi.hideDialog();
-	});
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-	//nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
-};
-
-/**
- * Constructs a new rename dialog.
- */
-function RenameDialog(editorUi) {
-
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('rename'));
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var row = editorUi.createDiv('row');
-	var col1 = editorUi.createDiv('col-md-4');
-	var col2 = editorUi.createDiv('col-md-8');
-
-	var label = document.createElement('label');
-	label.className = 'control-label pull-right';
-	mxUtils.write(label, mxResources.get('name'));
-	col1.appendChild(label);
-	var name = editorUi.editor.filename;
-	var input = document.createElement('input');
-	input.setAttribute('value', name);
-	input.className = 'form-control';
-
-	col2.appendChild(input);
-
-	row.appendChild(col1);
-	row.appendChild(col2);
-	body.appendChild(row);
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('save'), function() {
-		var req = new XMLHttpRequest();
-
-		req.open("PUT", SAVE_URL + editorUi.editor.data.id, true);
-		req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-		req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token);
-		req.send('name=' + input.value);
-
-		req.onload = function(e) {
-			if (req.status === 200) {
-				editorUi.editor.setStatus('Project successfully renamed');
-				editorUi.editor.filename = input.value;
-
-			} else {
-				editorUi.editor.setStatus(JSON.parse(req.response).errors[0].message)
-			}
-		}
-		req.onerror = function(e) {
-			mxUtils.alert(req.statusText);
-		};
-		editorUi.hideDialog();
-	});
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-	//nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
-};
-/**
- * Constructs a new edit file dialog.
- */
-function EditFileDialog(editorUi) {
-
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('edit'));
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var row = editorUi.createDiv('row');
-	var col1 = editorUi.createDiv('col-md-12');
-
-	var textarea = document.createElement('textarea');
-	textarea.style.width = '100%';
-	textarea.style.height = '374px';
-	textarea.value = mxUtils.getPrettyXml(editorUi.editor.getGraphXml());
-
-	// Enables dropping files
-	if (fileSupport) {
-		function handleDrop(evt) {
-			evt.stopPropagation();
-			evt.preventDefault();
-
-			if (evt.dataTransfer.files.length > 0) {
-				var file = evt.dataTransfer.files[0];
-
-				var reader = new FileReader();
-				reader.onload = function(e) {
-					textarea.value = e.target.result;
-				};
-				reader.readAsText(file);
-			}
-		};
-
-		function handleDragOver(evt) {
-			evt.stopPropagation();
-			evt.preventDefault();
-		};
-
-		// Setup the dnd listeners.
-		textarea.addEventListener('dragover', handleDragOver, false);
-		textarea.addEventListener('drop', handleDrop, false);
-	}
-	col1.appendChild(textarea);
-
-	row.appendChild(col1);
-	body.appendChild(row);
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('save'), function() {
-		var doc = mxUtils.parseXml(textarea.value);
-		editorUi.editor.setGraphXml(doc.documentElement);
-		editorUi.hideDialog();
-	});
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-};
-
-/**
- * Constructs a new export dialog.
- */
-function ExportDialog(editorUi) {
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body form');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('export') + ' XML');
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var form = editorUi.createDiv('form-horizontal form-row-seperated');
-	var group = editorUi.createDiv('form-group last');
-
-	var label = document.createElement('label');
-	label.className = 'col-sm-4 control-label';
-	mxUtils.write(label, mxResources.get('filename'));
-
-	var input = document.createElement('input');
-	input.setAttribute('value', editorUi.editor.getOrCreateFilename());
-	input.className = 'form-control';
-
-	var div = editorUi.createDiv('col-sm-8');
-	div.appendChild(input);
-
-	group.appendChild(label);
-	group.appendChild(div);
-	form.appendChild(group);
-
-	body.appendChild(form);
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('export'), mxUtils.bind(this,
-		function(data) {
-			editorUi.save(false);
-
-			var xml = encodeURIComponent(mxUtils.getXml(editorUi.editor.getGraphXml()));
-			new mxXmlRequest(SAVE_URL + editorUi.editor.data.id + '/download',
-				'filename=' + input.value, 'GET').simulate(document, "_blank");
-			editorUi.hideDialog();
-		}));
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-};
-
-/**
- * Giuseppe Careri
- * Constructs a new general dialog.
- */
-
-function GeneralDialog(editorUi, cell) {
-	var graph = editorUi.editor.graph;
-
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body form modal-body-scroll');
-	var footer = editorUi.createDiv('modal-footer');
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('edit') + ' ' + mxResources.get(cell.value
-		.nodeName));
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var inputGroup = editorUi.createDiv('form-horizontal form-row-seperated');
-	inputGroup.setAttribute('id', 'inputGroup');
-	var length = cell.value.attributes.length;
-	var form = editorUi.createDiv('form-horizontal form-row-seperated');
-
-	for (var i = 0; i < length; i++) {
-		var name = cell.value.attributes[i].name;
-		var id = '_' + name;
-		var value = cell.value.attributes[i].value;
-		console.log(name);
-		var group = editorUi.createDiv((i == length - 1) ? 'form-group last' :
-			'form-group');
-
-		var label = document.createElement('label');
-		label.className = 'col-sm-4 control-label';
-		mxUtils.write(label, mxResources.get(name));
-		group.appendChild(label);
-
-		var input;
-
-		switch (name) {
-			case 'id':
-				input = document.createElement('input');
-				value = cell.id;
-				input.setAttribute('value', value);
-				input.setAttribute('disabled', true)
-				input.className = 'form-control';
-				break;
-			case 'state':
-				input = document.createElement('input');
-				input.setAttribute('type', 'button')
-				input.onclick = function() {
-					if (this.value == 'ON') {
-						this.setAttribute('value', 'OFF');
-						this.className = 'btn btn-danger btn-md';
-					} else {
-						this.className = 'btn btn-success btn-md';
-						this.setAttribute('value', 'ON');
-					}
-
-				};
-				input.setAttribute('value', value);
-				input.className = (value == 'ON' ? 'btn btn-success btn-md' : 'btn btn-danger btn-md');
-
-				break;
-			case 'text':
-				input = document.createElement('textarea');
-				input.innerHTML = value;
-				input.className = 'form-control';
-				break;
-			case 'Body':
-				input = document.createElement('textarea');
-				input.innerHTML = value;
-				input.className = 'form-control';
-				break;
-			case 'question':
-				input = document.createElement('textarea');
-				input.innerHTML = value;
-				input.className = 'form-control';
-
-				break;
-			case 'other':
-				input = document.createElement('input');
-				input.setAttribute('value', value);
-				input.setAttribute('placeholder', 'Insert label for "Other" answer option');
-				input.className = 'form-control';
-				break;
-				// case 'addtext':
-				// 	var input = document.createElement('input');
-				// 	input.setAttribute('type', 'checkbox');
-				// 	console.log('value', value);
-				// 	if (value == 'true') {
-				// 		input.setAttribute('checked', true);
-				//
-				// 	} else {
-				// 		input.removeAttribute("checked");
-				//
-				// 	}
-				// 	// input.value = input.checked;
-				//
-				// 	input.onclick = function() {
-				// 		this.value = this.checked;
-				//
-				// 		console.log(input);
-				// 		if (this.checked) {
-				// 			console.log(this.checked);
-				// 			var rowdiv = editorUi.createDiv('form-group');
-				// 			rowdiv.setAttribute('id', 'rowdiv');
-				// 			var col1 = editorUi.createDiv('col-md-4');
-				// 			var col2 = editorUi.createDiv('col-md-8');
-				// 			var label = document.createElement('label');
-				// 			// input.setAttribute('placeholder', 'Insert label');
-				// 			label.className = 'pull-right control-label';
-				// 			mxUtils.write(label, 'Texarea Label');
-				// 			col1.appendChild(label);
-				// 			var input = document.createElement('input');
-				// 			// input.setAttribute('placeholder', 'Insert label');
-				// 			// input.value = inputValue;
-				// 			input.className = 'form-control';
-				// 			col2.appendChild(input);
-				// 			rowdiv.appendChild(col1);
-				// 			rowdiv.appendChild(col2);
-				// 			inputGroup.appendChild(rowdiv);
-				// 			body.appendChild(inputGroup);
-				// 		} else {
-				// 			console.log(this.checked);
-				// 			document.getElementById('inputGroup').removeChild(document.getElementById('rowdiv'));
-				// 		}
-				// 	};
-				//
-				//
-				// 	input.className = 'btn green';
-				// 	break;
-			case 'account_id':
-				input = createDropdownFromApi('/api/sms/accounts', value, 'name', 'id',
-					editorUi);
-				break;
-			case 'sms_text':
-				input = document.createElement('textarea');
-				input.innerHTML = value;
-				input.className = 'form-control';
-				input.setAttribute('maxlength', "160");
-
-				break;
-			case 'add':
-				var input = mxUtils.button('+', function() {
-					var rowdiv = createDynamicInput(null, null, editorUi);
-					inputGroup.appendChild(rowdiv);
-					body.appendChild(inputGroup);
-				})
-
-				input.className = 'btn green';
-				break;
-			default:
-				input = document.createElement('input');
-				input.setAttribute('value', value);
-				input.className = 'form-control';
-				break;
-		}
-
-		input.setAttribute('id', id)
-		var div = editorUi.createDiv('col-sm-8');
-		div.appendChild(input);
-		// Help
-		if (mxResources.get('help_' + name)) {
-			var help = editorUi.createDiv('p');
-			help.className = 'help-block';
-			mxUtils.write(help, mxResources.get('help_' + name));
-			div.appendChild(help);
-		}
-
-		group.appendChild(div);
-		form.appendChild(group);
-	}
-	body.appendChild(form);
-	// console.log(cell);
-	if (cell.value.nodeName == 'input') {
-
-		if (cell.children) {
-			for (var j = 0; j < cell.children.length; j++) {
-				var selectValue = '';
-				var inputValue = '';
-				_.forEach(cell.children[j].value.attributes, function(element) {
-					// console.log(element);
-					if (element.name == 'type') {
-						selectValue = element.value;
-
-					} else if (element.name == 'label') {
-						inputValue = element.value;
-
-					}
-				})
-				var rowdiv = createDynamicInput(selectValue, inputValue, editorUi);
-				inputGroup.appendChild(rowdiv);
-
-			}
-		}
-
-	}
-	body.appendChild(inputGroup);
-
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('save'), mxUtils.bind(this,
-		function(data) {
-			for (var i = 0; i < cell.value.attributes.length; i++) {
-				var id = '_' + cell.value.attributes[i].name;
-				var name = cell.value.attributes[i].name;
-				console.log(name);
-
-				cell.setAttribute(name, document.getElementById(id).value);
-				console.log(document.getElementById(id).value);
-
-
-			};
-
-			if (cell.value.nodeName == 'input') {
-				if (graph.model.getChildCount(cell)) {
-					cell.children = [];
-				}
-				if (document.getElementById('inputGroup')) {
-					var inputGroup = document.getElementById('inputGroup').children;
-					for (var j = 0; j < inputGroup.length; j++) {
-
-						var divSelect = inputGroup[j].children[1];
-						var divInput = inputGroup[j].children[0];
-						var doc = mxUtils.createXmlDocument();
-						var node = doc.createElement('inputGroup');
-						node.setAttribute('type', inputGroup[j].getElementsByTagName('select')[0].value);
-						node.setAttribute('label', inputGroup[j].getElementsByTagName('input')[0].value);
-						var cells = new mxCell(node);
-						graph.model.add(cell, cells);
-					}
-				}
-			}
-
-			graph.refresh(cell);
-			editorUi.hideDialog();
-		}));
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-};
-
-
-
-function createDynamicInput(selectValue, inputValue, editorUi) {
-
-	var rowdiv = editorUi.createDiv('form-group');
-	var col1 = editorUi.createDiv('col-md-5');
-	var col2 = editorUi.createDiv('col-md-5');
-	var col3 = editorUi.createDiv('col-md-2');
-
-	var input = document.createElement('input');
-	input.setAttribute('placeholder', 'Insert label');
-	input.value = inputValue;
-	input.className = 'form-control';
-	col1.appendChild(input);
-
-	var select = document.createElement('select');
-	var option = document.createElement('option');
-	option.text = '-- None --';
-	option.value = '';
-	select.appendChild(option);
-
-	var selectValues = ['text', 'number', 'textarea', 'checkbox'];
-	selectValues.forEach(function(elem) {
-		option = document.createElement('option');
-		option.text = elem;
-		option.value = elem;
-		option.selected = (elem == selectValue);
-		select.appendChild(option);
-	})
-	select.className = 'form-control';
-	col2.appendChild(select);
-	var button = mxUtils.button('x', function() {
-		var buttonParent = button.parentElement;
-		var divParent = buttonParent.parentElement;
-		document.getElementById('inputGroup').removeChild(divParent);
-	})
-
-	button.className = 'btn red';
-	col3.appendChild(button);
-	rowdiv.appendChild(col1);
-	rowdiv.appendChild(col2);
-	rowdiv.appendChild(col3);
-	return rowdiv;
-
-
-}
+var _0xa97b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x6E\x70\x75\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x74\x79\x70\x65","\x63\x68\x65\x63\x6B\x62\x6F\x78","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x68\x65\x63\x6B\x65\x64","\x47\x45\x54","\x6F\x70\x65\x6E","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x65\x61\x72\x65\x72\x20","\x74\x6F\x6B\x65\x6E","\x64\x61\x74\x61","\x65\x64\x69\x74\x6F\x72","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x70\x61\x72\x73\x65","\x73\x65\x6C\x65\x63\x74","\x6F\x70\x74\x69\x6F\x6E","\x74\x65\x78\x74","\x2D\x2D\x20\x4E\x6F\x6E\x65\x20\x2D\x2D","\x76\x61\x6C\x75\x65","\x2D\x31","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x25","\x72\x65\x70\x6C\x61\x63\x65","\x66\x6F\x72\x45\x61\x63\x68","\x73\x65\x6C\x65\x63\x74\x65\x64","\x72\x6F\x77\x73","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x73\x65\x6C\x65\x63\x74\x32","\x30","\x66\x69\x6C\x74\x65\x72","\x73\x65\x6C\x65\x63\x74\x2D\x67\x72\x6F\x75\x70\x2D\x66\x61\x74\x68\x65\x72","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x73\x65\x6C\x65\x63\x74\x2D\x67\x72\x6F\x75\x70\x2D\x73\x6F\x6E","\x2D","\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65","","\x49\x53\x5F\x49\x45","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x73\x63\x72\x6F\x6C\x6C\x57\x69\x64\x74\x68","\x62\x6F\x64\x79","\x72\x6F\x75\x6E\x64","\x6D\x61\x78","\x73\x63\x72\x6F\x6C\x6C\x48\x65\x69\x67\x68\x74","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x44\x69\x61\x6C\x6F\x67","\x63\x72\x65\x61\x74\x65\x44\x69\x76","\x6D\x6F\x64\x61\x6C\x20\x66\x61\x64\x65\x20\x69\x6E\x20\x63\x65\x6E\x74\x65\x72","\x64\x69\x73\x70\x6C\x61\x79","\x73\x74\x79\x6C\x65","\x62\x6C\x6F\x63\x6B","\x70\x61\x64\x64\x69\x6E\x67\x52\x69\x67\x68\x74","\x31\x32\x70\x78","\x67\x65\x4D\x6F\x64\x61\x6C\x44\x69\x61\x6C\x6F\x67","\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67","\x62\x67","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x6D\x6F\x64\x61\x6C\x2D\x62\x61\x63\x6B\x64\x72\x6F\x70\x20\x66\x61\x64\x65\x20\x69\x6E","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x6F\x6E\x44\x69\x61\x6C\x6F\x67\x43\x6C\x6F\x73\x65","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x63\x6C\x6F\x73\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x6D\x6F\x64\x61\x6C\x2D\x63\x6F\x6E\x74\x65\x6E\x74","\x6D\x6F\x64\x61\x6C\x2D\x68\x65\x61\x64\x65\x72","\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79","\x6D\x6F\x64\x61\x6C\x2D\x66\x6F\x6F\x74\x65\x72","\x68\x34","\x63\x72\x65\x61\x74\x65\x48\x65\x61\x64\x65\x72","\x69\x6D\x70\x6F\x72\x74","\x67\x65\x74","\x20\x58\x4D\x4C","\x77\x72\x69\x74\x65","\x68\x69\x64\x65\x44\x69\x61\x6C\x6F\x67","\x62\x75\x74\x74\x6F\x6E","\x72\x6F\x77","\x63\x6F\x6C\x2D\x6D\x64\x2D\x31\x32","\x74\x65\x78\x74\x61\x72\x65\x61","\x77\x69\x64\x74\x68","\x31\x30\x30\x25","\x68\x65\x69\x67\x68\x74","\x33\x37\x34\x70\x78","\x66\x69\x6C\x65","\x61\x63\x63\x65\x70\x74","\x74\x65\x78\x74\x2F\x78\x6D\x6C","\x63\x68\x61\x6E\x67\x65","\x66\x69\x6C\x65\x73","\x74\x61\x72\x67\x65\x74","\x6C\x6F\x67","\x6F\x6E\x6C\x6F\x61\x64","\x72\x65\x73\x75\x6C\x74","\x72\x65\x61\x64\x41\x73\x54\x65\x78\x74","\x46\x61\x69\x6C\x65\x64\x20\x74\x6F\x20\x6C\x6F\x61\x64\x20\x66\x6F\x72\x6D\x61\x74\x20\x66\x69\x6C\x65","\x46\x61\x69\x6C\x65\x64\x20\x74\x6F\x20\x6C\x6F\x61\x64\x20\x66\x69\x6C\x65","\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x72\x73\x65\x58\x6D\x6C","\x73\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x62\x69\x6E\x64","\x62\x74\x6E\x20\x62\x6C\x75\x65","\x63\x61\x6E\x63\x65\x6C","\x62\x74\x6E\x20\x64\x65\x66\x61\x75\x6C\x74","\x61\x62\x6F\x75\x74","\x20\x43\x61\x6C\x6C\x79\x20\x53\x71\x75\x61\x72\x65","\x69\x6D\x67","\x62\x6F\x72\x64\x65\x72","\x30\x70\x78","\x31\x37\x36","\x31\x35\x31","\x73\x72\x63","\x2F\x6C\x6F\x67\x6F\x2E\x70\x6E\x67","\x62\x72","\x50\x6F\x77\x65\x72\x65\x64\x20\x62\x79\x20\x58\x65\x6E\x69\x61\x6C\x61\x62\x20","\x56\x45\x52\x53\x49\x4F\x4E","\x61","\x68\x72\x65\x66","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x63\x61\x6C\x6C\x79\x73\x71\x75\x61\x72\x65\x2E\x63\x6F\x6D\x2F","\x5F\x62\x6C\x61\x6E\x6B","\x77\x77\x77\x2E\x63\x61\x6C\x6C\x79\x73\x71\x75\x61\x72\x65\x2E\x63\x6F\x6D","\x73\x61\x76\x65\x41\x73","\x6E\x61\x6D\x65","\x5F","\x67\x65\x74\x4F\x72\x43\x72\x65\x61\x74\x65\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x63\x6F\x6C\x2D\x6D\x64\x2D\x34","\x63\x6F\x6C\x2D\x6D\x64\x2D\x38","\x6C\x61\x62\x65\x6C","\x63\x6F\x6E\x74\x72\x6F\x6C\x2D\x6C\x61\x62\x65\x6C\x20\x70\x75\x6C\x6C\x2D\x72\x69\x67\x68\x74","\x5F\x63\x6F\x70\x79","\x69\x64","\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C","\x73\x61\x76\x65","\x6E\x65\x77","\x5F\x6E\x65\x77","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x6E\x61\x6D\x65","\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x76\x69\x65\x77\x2F","\x72\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x50\x55\x54","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x6E\x61\x6D\x65\x3D","\x50\x72\x6F\x6A\x65\x63\x74\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79\x20\x72\x65\x6E\x61\x6D\x65\x64","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x6D\x65\x73\x73\x61\x67\x65","\x65\x72\x72\x6F\x72\x73","\x6F\x6E\x65\x72\x72\x6F\x72","\x73\x74\x61\x74\x75\x73\x54\x65\x78\x74","\x61\x6C\x65\x72\x74","\x65\x64\x69\x74","\x67\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x67\x65\x74\x50\x72\x65\x74\x74\x79\x58\x6D\x6C","\x73\x74\x6F\x70\x50\x72\x6F\x70\x61\x67\x61\x74\x69\x6F\x6E","\x70\x72\x65\x76\x65\x6E\x74\x44\x65\x66\x61\x75\x6C\x74","\x64\x61\x74\x61\x54\x72\x61\x6E\x73\x66\x65\x72","\x64\x72\x61\x67\x6F\x76\x65\x72","\x64\x72\x6F\x70","\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x20\x66\x6F\x72\x6D","\x65\x78\x70\x6F\x72\x74","\x66\x6F\x72\x6D\x2D\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x20\x66\x6F\x72\x6D\x2D\x72\x6F\x77\x2D\x73\x65\x70\x65\x72\x61\x74\x65\x64","\x66\x6F\x72\x6D\x2D\x67\x72\x6F\x75\x70\x20\x6C\x61\x73\x74","\x63\x6F\x6C\x2D\x73\x6D\x2D\x34\x20\x63\x6F\x6E\x74\x72\x6F\x6C\x2D\x6C\x61\x62\x65\x6C","\x63\x6F\x6C\x2D\x73\x6D\x2D\x38","\x67\x65\x74\x58\x6D\x6C","\x73\x69\x6D\x75\x6C\x61\x74\x65","\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D","\x67\x72\x61\x70\x68","\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x20\x66\x6F\x72\x6D\x20\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x2D\x73\x63\x72\x6F\x6C\x6C","\x20","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x69\x6E\x70\x75\x74\x47\x72\x6F\x75\x70","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x6F\x72\x6D\x2D\x67\x72\x6F\x75\x70","\x64\x69\x73\x61\x62\x6C\x65\x64","\x6F\x6E\x63\x6C\x69\x63\x6B","\x4F\x4E","\x4F\x46\x46","\x62\x74\x6E\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x20\x62\x74\x6E\x2D\x6D\x64","\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x20\x62\x74\x6E\x2D\x6D\x64","\x73\x74\x61\x74\x65","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x42\x6F\x64\x79","\x71\x75\x65\x73\x74\x69\x6F\x6E","\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x49\x6E\x73\x65\x72\x74\x20\x6C\x61\x62\x65\x6C\x20\x66\x6F\x72\x20\x22\x4F\x74\x68\x65\x72\x22\x20\x61\x6E\x73\x77\x65\x72\x20\x6F\x70\x74\x69\x6F\x6E","\x6F\x74\x68\x65\x72","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x61\x63\x63\x6F\x75\x6E\x74\x5F\x69\x64","\x6D\x61\x78\x6C\x65\x6E\x67\x74\x68","\x31\x36\x30","\x73\x6D\x73\x5F\x74\x65\x78\x74","\x2B","\x62\x74\x6E\x20\x67\x72\x65\x65\x6E","\x61\x64\x64","\x68\x65\x6C\x70\x5F","\x70","\x68\x65\x6C\x70\x2D\x62\x6C\x6F\x63\x6B","\x63\x68\x69\x6C\x64\x72\x65\x6E","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x6F\x75\x6E\x74","\x6D\x6F\x64\x65\x6C","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x72\x65\x66\x72\x65\x73\x68","\x63\x6F\x6C\x2D\x6D\x64\x2D\x35","\x63\x6F\x6C\x2D\x6D\x64\x2D\x32","\x49\x6E\x73\x65\x72\x74\x20\x6C\x61\x62\x65\x6C","\x6E\x75\x6D\x62\x65\x72","\x78","\x70\x61\x72\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x62\x74\x6E\x20\x72\x65\x64"];_0xa97b[0];function createCheckbox(_0x9d0ax2){var _0x9d0ax3=document[_0xa97b[2]](_0xa97b[1]);_0x9d0ax3[_0xa97b[5]](_0xa97b[3],_0xa97b[4]);if(_0x9d0ax2){_0x9d0ax3[_0xa97b[5]](_0xa97b[6],true)};return _0x9d0ax3}function createDropdownFromApi(_0x9d0ax5,_0x9d0ax2,_0x9d0ax6,_0x9d0ax7,_0x9d0ax8,_0x9d0ax9,_0x9d0axa){var _0x9d0axb= new XMLHttpRequest();_0x9d0axb[_0xa97b[8]](_0xa97b[7],_0x9d0ax5,false);_0x9d0axb[_0xa97b[14]](_0xa97b[9],_0xa97b[10]+ _0x9d0ax8[_0xa97b[13]][_0xa97b[12]][_0xa97b[11]]);_0x9d0axb[_0xa97b[15]](null);var _0x9d0axc=[];if(_0x9d0axb[_0xa97b[16]]=== 200){_0x9d0axc= JSON[_0xa97b[18]](_0x9d0axb[_0xa97b[17]])};var _0x9d0ax3=document[_0xa97b[2]](_0xa97b[19]);var _0x9d0axd=document[_0xa97b[2]](_0xa97b[20]);_0x9d0axd[_0xa97b[21]]= _0xa97b[22];_0x9d0axd[_0xa97b[23]]= _0xa97b[24];_0x9d0ax3[_0xa97b[25]](_0x9d0axd);_0x9d0axc[_0xa97b[30]][_0xa97b[28]](function(_0x9d0axe){_0x9d0axd= document[_0xa97b[2]](_0xa97b[20]);_0x9d0axd[_0xa97b[21]]= _0x9d0axe[_0x9d0ax6];if(_0x9d0ax9&& _0x9d0axa){_0x9d0ax9[_0xa97b[28]](function(_0x9d0axf){_0x9d0axa= _0x9d0axa[_0xa97b[27]](_0xa97b[26]+ _0x9d0axf+ _0xa97b[26],_0x9d0axe[_0x9d0axf])});_0x9d0axd[_0xa97b[23]]= _0x9d0axa;_0x9d0axd[_0xa97b[29]]= (_0x9d0axa== _0x9d0ax2)}else {_0x9d0axd[_0xa97b[23]]= _0x9d0axe[_0x9d0ax7];_0x9d0axd[_0xa97b[29]]= (_0x9d0axe[_0x9d0ax7]== _0x9d0ax2)};_0x9d0ax3[_0xa97b[25]](_0x9d0axd)});_0x9d0ax3[_0xa97b[31]]= _0xa97b[32];return _0x9d0ax3}function createGroupedDropdownFromApi(_0x9d0ax5,_0x9d0ax2,_0x9d0ax6,_0x9d0ax7,_0x9d0ax8,_0x9d0ax11,_0x9d0ax12){var _0x9d0axb= new XMLHttpRequest();_0x9d0axb[_0xa97b[8]](_0xa97b[7],_0x9d0ax5,false);_0x9d0axb[_0xa97b[14]](_0xa97b[9],_0xa97b[10]+ _0x9d0ax8[_0xa97b[13]][_0xa97b[12]][_0xa97b[11]]);_0x9d0axb[_0xa97b[15]](null);var _0x9d0axc=[];if(_0x9d0axb[_0xa97b[16]]=== 200){_0x9d0axc= JSON[_0xa97b[18]](_0x9d0axb[_0xa97b[17]])};var _0x9d0ax3=document[_0xa97b[2]](_0xa97b[19]);var _0x9d0axd=document[_0xa97b[2]](_0xa97b[20]);_0x9d0axd[_0xa97b[21]]= _0xa97b[22];_0x9d0axd[_0xa97b[23]]= _0xa97b[33];_0x9d0ax3[_0xa97b[25]](_0x9d0axd);var _0x9d0ax13=_0x9d0ax11?_0x9d0axc[_0xa97b[30]]:_0x9d0axc;var _0x9d0ax14={};var _0x9d0ax15={};_0x9d0ax14[_0x9d0ax12]= null;var _0x9d0ax16=_[_0xa97b[34]](_0x9d0ax13,_0x9d0ax14);var _0x9d0ax17={};_0x9d0ax16[_0xa97b[28]](function(_0x9d0axe){_0x9d0axd= document[_0xa97b[2]](_0xa97b[20]);_0x9d0axd[_0xa97b[31]]= _0xa97b[35];_0x9d0axd[_0xa97b[21]]= _0x9d0axe[_0x9d0ax6][_0xa97b[36]]();_0x9d0axd[_0xa97b[23]]= _0x9d0axe[_0x9d0ax7];_0x9d0axd[_0xa97b[29]]= (_0x9d0axe[_0x9d0ax7]== _0x9d0ax2);_0x9d0ax3[_0xa97b[25]](_0x9d0axd);_0x9d0ax15[_0x9d0ax12]= _0x9d0axe[_0x9d0ax7];_0x9d0ax17= _[_0xa97b[34]](_0x9d0ax13,_0x9d0ax15);_0x9d0ax17[_0xa97b[28]](function(_0x9d0axe){_0x9d0axd= document[_0xa97b[2]](_0xa97b[20]);_0x9d0axd[_0xa97b[31]]= _0xa97b[37];_0x9d0axd[_0xa97b[21]]= _0xa97b[38]+ _[_0xa97b[39]](_0x9d0axe[_0x9d0ax6]);_0x9d0axd[_0xa97b[23]]= _0x9d0axe[_0x9d0ax7];_0x9d0axd[_0xa97b[29]]= (_0x9d0axe[_0x9d0ax7]== _0x9d0ax2);_0x9d0ax3[_0xa97b[25]](_0x9d0axd)})});_0x9d0ax3[_0xa97b[31]]= _0xa97b[32];return _0x9d0ax3}function createDropdownFromArray(_0x9d0ax19,_0x9d0ax2){var _0x9d0ax3=document[_0xa97b[2]](_0xa97b[19]);for(var _0x9d0ax1a in _0x9d0ax19){var _0x9d0axd=document[_0xa97b[2]](_0xa97b[20]);_0x9d0axd[_0xa97b[21]]= _0x9d0ax19[_0x9d0ax1a];_0x9d0axd[_0xa97b[23]]= _0x9d0ax1a;if(_0x9d0ax2> 0|| _0x9d0ax2!= _0xa97b[40]){_0x9d0axd[_0xa97b[29]]= (_0x9d0ax2=== _0x9d0ax1a)?true:false};_0x9d0ax3[_0xa97b[25]](_0x9d0axd)};_0x9d0ax3[_0xa97b[31]]= _0xa97b[32];return _0x9d0ax3}function Dialog(_0x9d0ax8,_0x9d0ax1c,_0x9d0ax1d,_0x9d0ax1e,_0x9d0ax1f,_0x9d0ax20,_0x9d0ax21){var _0x9d0ax22=0;if(mxClient[_0xa97b[41]]&& document[_0xa97b[42]]!= 9){_0x9d0ax22= 60};_0x9d0ax1d+= _0x9d0ax22;_0x9d0ax1e+= _0x9d0ax22;var _0x9d0ax23=Math[_0xa97b[46]](0,Math[_0xa97b[45]]((document[_0xa97b[44]][_0xa97b[43]]- _0x9d0ax1d)/ 2));var _0x9d0ax24=Math[_0xa97b[46]](0,Math[_0xa97b[45]]((Math[_0xa97b[46]](document[_0xa97b[44]][_0xa97b[47]],document[_0xa97b[48]][_0xa97b[47]])- _0x9d0ax1e)/ 3));var _0x9d0ax25=_0x9d0ax8[_0xa97b[50]](_0xa97b[49]);_0x9d0ax25[_0xa97b[31]]= _0xa97b[51];_0x9d0ax25[_0xa97b[53]][_0xa97b[52]]= _0xa97b[54];_0x9d0ax25[_0xa97b[53]][_0xa97b[55]]= _0xa97b[56];var _0x9d0ax26=_0x9d0ax8[_0xa97b[50]](_0xa97b[57]);_0x9d0ax26[_0xa97b[31]]= _0xa97b[58];_0x9d0ax26[_0xa97b[25]](_0x9d0ax1c);_0x9d0ax25[_0xa97b[25]](_0x9d0ax26);if(this[_0xa97b[59]]== null){this[_0xa97b[59]]= _0x9d0ax8[_0xa97b[50]](_0xa97b[60]);this[_0xa97b[59]][_0xa97b[31]]= _0xa97b[61];if(mxClient[_0xa97b[62]]){ new mxDivResizer(this[_0xa97b[59]])}};if(_0x9d0ax1f){document[_0xa97b[44]][_0xa97b[25]](this[_0xa97b[59]])};document[_0xa97b[44]][_0xa97b[25]](_0x9d0ax25);this[_0xa97b[63]]= _0x9d0ax21;this[_0xa97b[64]]= _0x9d0ax25}Dialog[_0xa97b[66]][_0xa97b[65]]= function(){if(this[_0xa97b[63]]!= null){this[_0xa97b[63]]();this[_0xa97b[63]]= null};this[_0xa97b[64]][_0xa97b[68]][_0xa97b[67]](this[_0xa97b[64]]);this[_0xa97b[59]][_0xa97b[68]][_0xa97b[67]](this[_0xa97b[59]])};function ImportDialog(_0x9d0ax8){var _0x9d0ax28=_0x9d0ax8[_0xa97b[50]](_0xa97b[69]);var _0x9d0ax29=_0x9d0ax8[_0xa97b[50]](_0xa97b[70]);var _0x9d0ax2a=_0x9d0ax8[_0xa97b[50]](_0xa97b[71]);var _0x9d0ax2b=_0x9d0ax8[_0xa97b[50]](_0xa97b[72]);var _0x9d0ax2c=_0x9d0ax8[_0xa97b[74]](_0xa97b[73]);mxUtils[_0xa97b[78]](_0x9d0ax2c,mxResources[_0xa97b[76]](_0xa97b[75])+ _0xa97b[77]);var _0x9d0ax2d=mxUtils[_0xa97b[80]](_0xa97b[40],function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax2d[_0xa97b[31]]= _0xa97b[65];_0x9d0ax29[_0xa97b[25]](_0x9d0ax2d);_0x9d0ax29[_0xa97b[25]](_0x9d0ax2c);var _0x9d0ax2e=_0x9d0ax8[_0xa97b[50]](_0xa97b[81]);var _0x9d0ax2f=_0x9d0ax8[_0xa97b[50]](_0xa97b[82]);var _0x9d0ax30=document[_0xa97b[2]](_0xa97b[83]);_0x9d0ax30[_0xa97b[53]][_0xa97b[84]]= _0xa97b[85];_0x9d0ax30[_0xa97b[53]][_0xa97b[86]]= _0xa97b[87];var _0x9d0ax3=document[_0xa97b[2]](_0xa97b[1]);_0x9d0ax3[_0xa97b[3]]= _0xa97b[88];_0x9d0ax3[_0xa97b[5]](_0xa97b[89],_0xa97b[90]);_0x9d0ax3[_0xa97b[100]](_0xa97b[91],function _0x9d0ax31(_0x9d0ax32){var _0x9d0ax33=_0x9d0ax32[_0xa97b[93]][_0xa97b[92]][0];console[_0xa97b[94]](_0x9d0ax33);if(_0x9d0ax33){if(_0x9d0ax33[_0xa97b[3]]=== _0xa97b[90]){var _0x9d0ax34= new FileReader();_0x9d0ax34[_0xa97b[95]]= function(_0x9d0ax35){var _0x9d0ax36=_0x9d0ax35[_0xa97b[93]][_0xa97b[96]];mxUtils[_0xa97b[78]](_0x9d0ax30,_0x9d0ax36)};_0x9d0ax34[_0xa97b[97]](_0x9d0ax33)}else {alert(_0xa97b[98])}}else {alert(_0xa97b[99])}},false);_0x9d0ax2f[_0xa97b[25]](_0x9d0ax3);_0x9d0ax2f[_0xa97b[25]](_0x9d0ax30);_0x9d0ax2e[_0xa97b[25]](_0x9d0ax2f);_0x9d0ax2a[_0xa97b[25]](_0x9d0ax2e);var _0x9d0ax37=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[75]),mxUtils[_0xa97b[103]](this,function(_0x9d0ax38){var _0x9d0ax39=mxUtils[_0xa97b[101]](_0x9d0ax30[_0xa97b[23]]);_0x9d0ax8[_0xa97b[13]][_0xa97b[102]](_0x9d0ax39[_0xa97b[48]]);_0x9d0ax8[_0xa97b[79]]()}));_0x9d0ax37[_0xa97b[31]]= _0xa97b[104];var _0x9d0ax3a=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[105]),function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax3a[_0xa97b[31]]= _0xa97b[106];_0x9d0ax2b[_0xa97b[25]](_0x9d0ax37);_0x9d0ax2b[_0xa97b[25]](_0x9d0ax3a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax29);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2b);this[_0xa97b[64]]= _0x9d0ax28}function AboutDialog(_0x9d0ax8){var _0x9d0ax28=_0x9d0ax8[_0xa97b[50]](_0xa97b[69]);var _0x9d0ax29=_0x9d0ax8[_0xa97b[50]](_0xa97b[70]);var _0x9d0ax2a=_0x9d0ax8[_0xa97b[50]](_0xa97b[71]);var _0x9d0ax2b=_0x9d0ax8[_0xa97b[50]](_0xa97b[72]);var _0x9d0ax2c=_0x9d0ax8[_0xa97b[74]](_0xa97b[73]);mxUtils[_0xa97b[78]](_0x9d0ax2c,mxResources[_0xa97b[76]](_0xa97b[107])+ _0xa97b[108]);var _0x9d0ax2d=mxUtils[_0xa97b[80]](_0xa97b[40],function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax2d[_0xa97b[31]]= _0xa97b[65];_0x9d0ax29[_0xa97b[25]](_0x9d0ax2d);_0x9d0ax29[_0xa97b[25]](_0x9d0ax2c);var _0x9d0ax3c=document[_0xa97b[2]](_0xa97b[109]);_0x9d0ax3c[_0xa97b[53]][_0xa97b[110]]= _0xa97b[111];_0x9d0ax3c[_0xa97b[5]](_0xa97b[84],_0xa97b[112]);_0x9d0ax3c[_0xa97b[5]](_0xa97b[84],_0xa97b[113]);_0x9d0ax3c[_0xa97b[5]](_0xa97b[114],IMAGE_PATH+ _0xa97b[115]);_0x9d0ax2a[_0xa97b[25]](_0x9d0ax3c);mxUtils[_0xa97b[116]](_0x9d0ax2a);mxUtils[_0xa97b[78]](_0x9d0ax2a,_0xa97b[117]+ mxClient[_0xa97b[118]]);mxUtils[_0xa97b[116]](_0x9d0ax2a);var _0x9d0ax3d=document[_0xa97b[2]](_0xa97b[119]);_0x9d0ax3d[_0xa97b[5]](_0xa97b[120],_0xa97b[121]);_0x9d0ax3d[_0xa97b[5]](_0xa97b[93],_0xa97b[122]);mxUtils[_0xa97b[78]](_0x9d0ax3d,_0xa97b[123]);_0x9d0ax2a[_0xa97b[25]](_0x9d0ax3d);mxUtils[_0xa97b[116]](_0x9d0ax2a);mxUtils[_0xa97b[116]](_0x9d0ax2a);var _0x9d0ax3a=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[65]),function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax3a[_0xa97b[31]]= _0xa97b[106];_0x9d0ax2b[_0xa97b[25]](_0x9d0ax3a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax29);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2b);this[_0xa97b[64]]= _0x9d0ax28}function SaveDialog(_0x9d0ax8){var _0x9d0ax28=_0x9d0ax8[_0xa97b[50]](_0xa97b[69]);var _0x9d0ax29=_0x9d0ax8[_0xa97b[50]](_0xa97b[70]);var _0x9d0ax2a=_0x9d0ax8[_0xa97b[50]](_0xa97b[71]);var _0x9d0ax2b=_0x9d0ax8[_0xa97b[50]](_0xa97b[72]);var _0x9d0ax2c=_0x9d0ax8[_0xa97b[74]](_0xa97b[73]);mxUtils[_0xa97b[78]](_0x9d0ax2c,mxResources[_0xa97b[76]](_0xa97b[124]));var _0x9d0ax2d=mxUtils[_0xa97b[80]](_0xa97b[40],function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax2d[_0xa97b[31]]= _0xa97b[65];_0x9d0ax29[_0xa97b[25]](_0x9d0ax2d);_0x9d0ax29[_0xa97b[25]](_0x9d0ax2c);var _0x9d0ax3f=_0xa97b[125];var _0x9d0ax40=_0xa97b[126]+ _0x9d0ax3f;var _0x9d0ax2=_0x9d0ax8[_0xa97b[13]][_0xa97b[127]]();var _0x9d0ax2e=_0x9d0ax8[_0xa97b[50]](_0xa97b[81]);var _0x9d0ax2f=_0x9d0ax8[_0xa97b[50]](_0xa97b[128]);var _0x9d0ax41=_0x9d0ax8[_0xa97b[50]](_0xa97b[129]);var _0x9d0ax42=document[_0xa97b[2]](_0xa97b[130]);_0x9d0ax42[_0xa97b[31]]= _0xa97b[131];mxUtils[_0xa97b[78]](_0x9d0ax42,mxResources[_0xa97b[76]](_0x9d0ax3f));_0x9d0ax2f[_0xa97b[25]](_0x9d0ax42);var _0x9d0ax43=document[_0xa97b[2]](_0xa97b[1]);_0x9d0ax43[_0xa97b[5]](_0xa97b[23],_0x9d0ax2+ _0xa97b[132]);_0x9d0ax43[_0xa97b[5]](_0xa97b[133],_0x9d0ax40);_0x9d0ax43[_0xa97b[31]]= _0xa97b[134];_0x9d0ax41[_0xa97b[25]](_0x9d0ax43);_0x9d0ax2e[_0xa97b[25]](_0x9d0ax2f);_0x9d0ax2e[_0xa97b[25]](_0x9d0ax41);_0x9d0ax2a[_0xa97b[25]](_0x9d0ax2e);var _0x9d0ax37=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[135]),function(){_0x9d0ax8[_0xa97b[124]](_0x9d0ax43[_0xa97b[23]]);_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax37[_0xa97b[31]]= _0xa97b[104];var _0x9d0ax3a=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[105]),function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax3a[_0xa97b[31]]= _0xa97b[106];_0x9d0ax2b[_0xa97b[25]](_0x9d0ax37);_0x9d0ax2b[_0xa97b[25]](_0x9d0ax3a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax29);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2b);this[_0xa97b[64]]= _0x9d0ax28}function NewDialog(_0x9d0ax8){var _0x9d0ax28=_0x9d0ax8[_0xa97b[50]](_0xa97b[69]);var _0x9d0ax29=_0x9d0ax8[_0xa97b[50]](_0xa97b[70]);var _0x9d0ax2a=_0x9d0ax8[_0xa97b[50]](_0xa97b[71]);var _0x9d0ax2b=_0x9d0ax8[_0xa97b[50]](_0xa97b[72]);var _0x9d0ax2c=_0x9d0ax8[_0xa97b[74]](_0xa97b[73]);mxUtils[_0xa97b[78]](_0x9d0ax2c,mxResources[_0xa97b[76]](_0xa97b[136]));var _0x9d0ax2d=mxUtils[_0xa97b[80]](_0xa97b[40],function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax2d[_0xa97b[31]]= _0xa97b[65];_0x9d0ax29[_0xa97b[25]](_0x9d0ax2d);_0x9d0ax29[_0xa97b[25]](_0x9d0ax2c);var _0x9d0ax3f=_0xa97b[125];var _0x9d0ax40=_0xa97b[126]+ _0x9d0ax3f;var _0x9d0ax2=_0x9d0ax8[_0xa97b[13]][_0xa97b[127]]();var _0x9d0ax2e=_0x9d0ax8[_0xa97b[50]](_0xa97b[81]);var _0x9d0ax2f=_0x9d0ax8[_0xa97b[50]](_0xa97b[128]);var _0x9d0ax41=_0x9d0ax8[_0xa97b[50]](_0xa97b[129]);var _0x9d0ax42=document[_0xa97b[2]](_0xa97b[130]);_0x9d0ax42[_0xa97b[31]]= _0xa97b[131];mxUtils[_0xa97b[78]](_0x9d0ax42,mxResources[_0xa97b[76]](_0x9d0ax3f));_0x9d0ax2f[_0xa97b[25]](_0x9d0ax42);var _0x9d0ax43=document[_0xa97b[2]](_0xa97b[1]);_0x9d0ax43[_0xa97b[5]](_0xa97b[23],_0x9d0ax2+ _0xa97b[137]);_0x9d0ax43[_0xa97b[5]](_0xa97b[133],_0x9d0ax40);_0x9d0ax43[_0xa97b[31]]= _0xa97b[134];_0x9d0ax41[_0xa97b[25]](_0x9d0ax43);_0x9d0ax2e[_0xa97b[25]](_0x9d0ax2f);_0x9d0ax2e[_0xa97b[25]](_0x9d0ax41);_0x9d0ax2a[_0xa97b[25]](_0x9d0ax2e);var _0x9d0ax37=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[136]),function(){_0x9d0ax8[_0xa97b[136]](_0x9d0ax43[_0xa97b[23]]);_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax37[_0xa97b[31]]= _0xa97b[104];var _0x9d0ax3a=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[105]),function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax3a[_0xa97b[31]]= _0xa97b[106];_0x9d0ax2b[_0xa97b[25]](_0x9d0ax37);_0x9d0ax2b[_0xa97b[25]](_0x9d0ax3a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax29);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2b);this[_0xa97b[64]]= _0x9d0ax28}function VariableDialog(_0x9d0ax8){var _0x9d0ax28=_0x9d0ax8[_0xa97b[50]](_0xa97b[69]);var _0x9d0ax29=_0x9d0ax8[_0xa97b[50]](_0xa97b[70]);var _0x9d0ax2a=_0x9d0ax8[_0xa97b[50]](_0xa97b[71]);var _0x9d0ax2b=_0x9d0ax8[_0xa97b[50]](_0xa97b[72]);var _0x9d0ax2c=_0x9d0ax8[_0xa97b[74]](_0xa97b[73]);mxUtils[_0xa97b[78]](_0x9d0ax2c,mxResources[_0xa97b[76]](_0xa97b[138]));var _0x9d0ax2d=mxUtils[_0xa97b[80]](_0xa97b[40],function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax2d[_0xa97b[31]]= _0xa97b[65];_0x9d0ax29[_0xa97b[25]](_0x9d0ax2d);_0x9d0ax29[_0xa97b[25]](_0x9d0ax2c);var _0x9d0ax3f=_0xa97b[125];var _0x9d0ax40=_0xa97b[126]+ _0x9d0ax3f;var _0x9d0ax2=_0x9d0ax8[_0xa97b[13]][_0xa97b[127]]();var _0x9d0ax2e=_0x9d0ax8[_0xa97b[50]](_0xa97b[81]);var _0x9d0ax2f=_0x9d0ax8[_0xa97b[50]](_0xa97b[128]);var _0x9d0ax41=_0x9d0ax8[_0xa97b[50]](_0xa97b[129]);var _0x9d0ax42=document[_0xa97b[2]](_0xa97b[130]);_0x9d0ax42[_0xa97b[31]]= _0xa97b[131];mxUtils[_0xa97b[78]](_0x9d0ax42,mxResources[_0xa97b[76]](_0x9d0ax3f));_0x9d0ax2f[_0xa97b[25]](_0x9d0ax42);var _0x9d0ax43=document[_0xa97b[2]](_0xa97b[1]);_0x9d0ax43[_0xa97b[5]](_0xa97b[23],_0xa97b[139]);_0x9d0ax43[_0xa97b[5]](_0xa97b[133],_0x9d0ax40);_0x9d0ax43[_0xa97b[31]]= _0xa97b[134];_0x9d0ax41[_0xa97b[25]](_0x9d0ax43);_0x9d0ax2e[_0xa97b[25]](_0x9d0ax2f);_0x9d0ax2e[_0xa97b[25]](_0x9d0ax41);_0x9d0ax2a[_0xa97b[25]](_0x9d0ax2e);var _0x9d0ax37=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[136]),function(){_0x9d0ax8[_0xa97b[138]](_0x9d0ax43[_0xa97b[23]]);_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax37[_0xa97b[31]]= _0xa97b[104];var _0x9d0ax3a=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[105]),function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax3a[_0xa97b[31]]= _0xa97b[106];_0x9d0ax2b[_0xa97b[25]](_0x9d0ax37);_0x9d0ax2b[_0xa97b[25]](_0x9d0ax3a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax29);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2b);this[_0xa97b[64]]= _0x9d0ax28}function OpenDialog(_0x9d0ax8){var _0x9d0ax28=_0x9d0ax8[_0xa97b[50]](_0xa97b[69]);var _0x9d0ax29=_0x9d0ax8[_0xa97b[50]](_0xa97b[70]);var _0x9d0ax2a=_0x9d0ax8[_0xa97b[50]](_0xa97b[71]);var _0x9d0ax2b=_0x9d0ax8[_0xa97b[50]](_0xa97b[72]);var _0x9d0ax2c=_0x9d0ax8[_0xa97b[74]](_0xa97b[73]);mxUtils[_0xa97b[78]](_0x9d0ax2c,mxResources[_0xa97b[76]](_0xa97b[8]));var _0x9d0ax2d=mxUtils[_0xa97b[80]](_0xa97b[40],function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax2d[_0xa97b[31]]= _0xa97b[65];_0x9d0ax29[_0xa97b[25]](_0x9d0ax2d);_0x9d0ax29[_0xa97b[25]](_0x9d0ax2c);var _0x9d0ax2e=_0x9d0ax8[_0xa97b[50]](_0xa97b[81]);var _0x9d0ax2f=_0x9d0ax8[_0xa97b[50]](_0xa97b[128]);var _0x9d0ax41=_0x9d0ax8[_0xa97b[50]](_0xa97b[129]);var _0x9d0ax42=document[_0xa97b[2]](_0xa97b[130]);_0x9d0ax42[_0xa97b[31]]= _0xa97b[131];mxUtils[_0xa97b[78]](_0x9d0ax42,mxResources[_0xa97b[76]](_0xa97b[125]));_0x9d0ax2f[_0xa97b[25]](_0x9d0ax42);var _0x9d0axb= new XMLHttpRequest();_0x9d0axb[_0xa97b[8]](_0xa97b[7],_0xa97b[140],false);_0x9d0axb[_0xa97b[14]](_0xa97b[9],_0xa97b[10]+ _0x9d0ax8[_0xa97b[13]][_0xa97b[12]][_0xa97b[11]]);_0x9d0axb[_0xa97b[15]](null);var _0x9d0axc=[];if(_0x9d0axb[_0xa97b[16]]=== 200){_0x9d0axc= JSON[_0xa97b[18]](_0x9d0axb[_0xa97b[17]])[_0xa97b[30]]};var _0x9d0ax43=document[_0xa97b[2]](_0xa97b[19]);for(var _0x9d0ax47=0;_0x9d0ax47< _0x9d0axc[_0xa97b[141]];_0x9d0ax47++){var _0x9d0axd=document[_0xa97b[2]](_0xa97b[20]);_0x9d0axd[_0xa97b[21]]= _0x9d0axc[_0x9d0ax47][_0xa97b[125]];_0x9d0axd[_0xa97b[23]]= _0x9d0axc[_0x9d0ax47][_0xa97b[133]];_0x9d0ax43[_0xa97b[25]](_0x9d0axd)};_0x9d0ax43[_0xa97b[31]]= _0xa97b[134];_0x9d0ax41[_0xa97b[25]](_0x9d0ax43);_0x9d0ax2e[_0xa97b[25]](_0x9d0ax2f);_0x9d0ax2e[_0xa97b[25]](_0x9d0ax41);_0x9d0ax2a[_0xa97b[25]](_0x9d0ax2e);var _0x9d0ax37=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[8]),function(){console[_0xa97b[94]](_0x9d0ax43);console[_0xa97b[94]](_0x9d0ax43[_0xa97b[23]]);window[_0xa97b[8]](_0xa97b[142]+ _0x9d0ax43[_0xa97b[23]],_0xa97b[122]);_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax37[_0xa97b[31]]= _0xa97b[104];var _0x9d0ax3a=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[105]),function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax3a[_0xa97b[31]]= _0xa97b[106];_0x9d0ax2b[_0xa97b[25]](_0x9d0ax37);_0x9d0ax2b[_0xa97b[25]](_0x9d0ax3a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax29);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2b);this[_0xa97b[64]]= _0x9d0ax28}function RenameDialog(_0x9d0ax8){var _0x9d0ax28=_0x9d0ax8[_0xa97b[50]](_0xa97b[69]);var _0x9d0ax29=_0x9d0ax8[_0xa97b[50]](_0xa97b[70]);var _0x9d0ax2a=_0x9d0ax8[_0xa97b[50]](_0xa97b[71]);var _0x9d0ax2b=_0x9d0ax8[_0xa97b[50]](_0xa97b[72]);var _0x9d0ax2c=_0x9d0ax8[_0xa97b[74]](_0xa97b[73]);mxUtils[_0xa97b[78]](_0x9d0ax2c,mxResources[_0xa97b[76]](_0xa97b[143]));var _0x9d0ax2d=mxUtils[_0xa97b[80]](_0xa97b[40],function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax2d[_0xa97b[31]]= _0xa97b[65];_0x9d0ax29[_0xa97b[25]](_0x9d0ax2d);_0x9d0ax29[_0xa97b[25]](_0x9d0ax2c);var _0x9d0ax2e=_0x9d0ax8[_0xa97b[50]](_0xa97b[81]);var _0x9d0ax2f=_0x9d0ax8[_0xa97b[50]](_0xa97b[128]);var _0x9d0ax41=_0x9d0ax8[_0xa97b[50]](_0xa97b[129]);var _0x9d0ax42=document[_0xa97b[2]](_0xa97b[130]);_0x9d0ax42[_0xa97b[31]]= _0xa97b[131];mxUtils[_0xa97b[78]](_0x9d0ax42,mxResources[_0xa97b[76]](_0xa97b[125]));_0x9d0ax2f[_0xa97b[25]](_0x9d0ax42);var _0x9d0ax3f=_0x9d0ax8[_0xa97b[13]][_0xa97b[144]];var _0x9d0ax3=document[_0xa97b[2]](_0xa97b[1]);_0x9d0ax3[_0xa97b[5]](_0xa97b[23],_0x9d0ax3f);_0x9d0ax3[_0xa97b[31]]= _0xa97b[134];_0x9d0ax41[_0xa97b[25]](_0x9d0ax3);_0x9d0ax2e[_0xa97b[25]](_0x9d0ax2f);_0x9d0ax2e[_0xa97b[25]](_0x9d0ax41);_0x9d0ax2a[_0xa97b[25]](_0x9d0ax2e);var _0x9d0ax37=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[135]),function(){var _0x9d0axb= new XMLHttpRequest();_0x9d0axb[_0xa97b[8]](_0xa97b[145],SAVE_URL+ _0x9d0ax8[_0xa97b[13]][_0xa97b[12]][_0xa97b[133]],true);_0x9d0axb[_0xa97b[14]](_0xa97b[146],_0xa97b[147]);_0x9d0axb[_0xa97b[14]](_0xa97b[9],_0xa97b[10]+ _0x9d0ax8[_0xa97b[13]][_0xa97b[12]][_0xa97b[11]]);_0x9d0axb[_0xa97b[15]](_0xa97b[148]+ _0x9d0ax3[_0xa97b[23]]);_0x9d0axb[_0xa97b[95]]= function(_0x9d0ax35){if(_0x9d0axb[_0xa97b[16]]=== 200){_0x9d0ax8[_0xa97b[13]][_0xa97b[150]](_0xa97b[149]);_0x9d0ax8[_0xa97b[13]][_0xa97b[144]]= _0x9d0ax3[_0xa97b[23]]}else {_0x9d0ax8[_0xa97b[13]][_0xa97b[150]](JSON[_0xa97b[18]](_0x9d0axb[_0xa97b[17]])[_0xa97b[152]][0][_0xa97b[151]])}};_0x9d0axb[_0xa97b[153]]= function(_0x9d0ax35){mxUtils[_0xa97b[155]](_0x9d0axb[_0xa97b[154]])};_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax37[_0xa97b[31]]= _0xa97b[104];var _0x9d0ax3a=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[105]),function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax3a[_0xa97b[31]]= _0xa97b[106];_0x9d0ax2b[_0xa97b[25]](_0x9d0ax37);_0x9d0ax2b[_0xa97b[25]](_0x9d0ax3a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax29);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2b);this[_0xa97b[64]]= _0x9d0ax28}function EditFileDialog(_0x9d0ax8){var _0x9d0ax28=_0x9d0ax8[_0xa97b[50]](_0xa97b[69]);var _0x9d0ax29=_0x9d0ax8[_0xa97b[50]](_0xa97b[70]);var _0x9d0ax2a=_0x9d0ax8[_0xa97b[50]](_0xa97b[71]);var _0x9d0ax2b=_0x9d0ax8[_0xa97b[50]](_0xa97b[72]);var _0x9d0ax2c=_0x9d0ax8[_0xa97b[74]](_0xa97b[73]);mxUtils[_0xa97b[78]](_0x9d0ax2c,mxResources[_0xa97b[76]](_0xa97b[156]));var _0x9d0ax2d=mxUtils[_0xa97b[80]](_0xa97b[40],function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax2d[_0xa97b[31]]= _0xa97b[65];_0x9d0ax29[_0xa97b[25]](_0x9d0ax2d);_0x9d0ax29[_0xa97b[25]](_0x9d0ax2c);var _0x9d0ax2e=_0x9d0ax8[_0xa97b[50]](_0xa97b[81]);var _0x9d0ax2f=_0x9d0ax8[_0xa97b[50]](_0xa97b[82]);var _0x9d0ax30=document[_0xa97b[2]](_0xa97b[83]);_0x9d0ax30[_0xa97b[53]][_0xa97b[84]]= _0xa97b[85];_0x9d0ax30[_0xa97b[53]][_0xa97b[86]]= _0xa97b[87];_0x9d0ax30[_0xa97b[23]]= mxUtils[_0xa97b[158]](_0x9d0ax8[_0xa97b[13]][_0xa97b[157]]());if(fileSupport){function _0x9d0ax4a(_0x9d0ax32){_0x9d0ax32[_0xa97b[159]]();_0x9d0ax32[_0xa97b[160]]();if(_0x9d0ax32[_0xa97b[161]][_0xa97b[92]][_0xa97b[141]]> 0){var _0x9d0ax4b=_0x9d0ax32[_0xa97b[161]][_0xa97b[92]][0];var _0x9d0ax4c= new FileReader();_0x9d0ax4c[_0xa97b[95]]= function(_0x9d0ax35){_0x9d0ax30[_0xa97b[23]]= _0x9d0ax35[_0xa97b[93]][_0xa97b[96]]};_0x9d0ax4c[_0xa97b[97]](_0x9d0ax4b)}}function _0x9d0ax4d(_0x9d0ax32){_0x9d0ax32[_0xa97b[159]]();_0x9d0ax32[_0xa97b[160]]()}_0x9d0ax30[_0xa97b[100]](_0xa97b[162],_0x9d0ax4d,false);_0x9d0ax30[_0xa97b[100]](_0xa97b[163],_0x9d0ax4a,false)};_0x9d0ax2f[_0xa97b[25]](_0x9d0ax30);_0x9d0ax2e[_0xa97b[25]](_0x9d0ax2f);_0x9d0ax2a[_0xa97b[25]](_0x9d0ax2e);var _0x9d0ax37=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[135]),function(){var _0x9d0ax39=mxUtils[_0xa97b[101]](_0x9d0ax30[_0xa97b[23]]);_0x9d0ax8[_0xa97b[13]][_0xa97b[102]](_0x9d0ax39[_0xa97b[48]]);_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax37[_0xa97b[31]]= _0xa97b[104];var _0x9d0ax3a=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[105]),function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax3a[_0xa97b[31]]= _0xa97b[106];_0x9d0ax2b[_0xa97b[25]](_0x9d0ax37);_0x9d0ax2b[_0xa97b[25]](_0x9d0ax3a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax29);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2b);this[_0xa97b[64]]= _0x9d0ax28}function ExportDialog(_0x9d0ax8){var _0x9d0ax28=_0x9d0ax8[_0xa97b[50]](_0xa97b[69]);var _0x9d0ax29=_0x9d0ax8[_0xa97b[50]](_0xa97b[70]);var _0x9d0ax2a=_0x9d0ax8[_0xa97b[50]](_0xa97b[164]);var _0x9d0ax2b=_0x9d0ax8[_0xa97b[50]](_0xa97b[72]);var _0x9d0ax2c=_0x9d0ax8[_0xa97b[74]](_0xa97b[73]);mxUtils[_0xa97b[78]](_0x9d0ax2c,mxResources[_0xa97b[76]](_0xa97b[165])+ _0xa97b[77]);var _0x9d0ax2d=mxUtils[_0xa97b[80]](_0xa97b[40],function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax2d[_0xa97b[31]]= _0xa97b[65];_0x9d0ax29[_0xa97b[25]](_0x9d0ax2d);_0x9d0ax29[_0xa97b[25]](_0x9d0ax2c);var _0x9d0ax4f=_0x9d0ax8[_0xa97b[50]](_0xa97b[166]);var _0x9d0ax50=_0x9d0ax8[_0xa97b[50]](_0xa97b[167]);var _0x9d0ax42=document[_0xa97b[2]](_0xa97b[130]);_0x9d0ax42[_0xa97b[31]]= _0xa97b[168];mxUtils[_0xa97b[78]](_0x9d0ax42,mxResources[_0xa97b[76]](_0xa97b[144]));var _0x9d0ax3=document[_0xa97b[2]](_0xa97b[1]);_0x9d0ax3[_0xa97b[5]](_0xa97b[23],_0x9d0ax8[_0xa97b[13]][_0xa97b[127]]());_0x9d0ax3[_0xa97b[31]]= _0xa97b[134];var _0x9d0ax25=_0x9d0ax8[_0xa97b[50]](_0xa97b[169]);_0x9d0ax25[_0xa97b[25]](_0x9d0ax3);_0x9d0ax50[_0xa97b[25]](_0x9d0ax42);_0x9d0ax50[_0xa97b[25]](_0x9d0ax25);_0x9d0ax4f[_0xa97b[25]](_0x9d0ax50);_0x9d0ax2a[_0xa97b[25]](_0x9d0ax4f);var _0x9d0ax37=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[165]),mxUtils[_0xa97b[103]](this,function(_0x9d0ax38){_0x9d0ax8[_0xa97b[135]](false);var _0x9d0ax51=encodeURIComponent(mxUtils[_0xa97b[170]](_0x9d0ax8[_0xa97b[13]][_0xa97b[157]]())); new mxXmlRequest(SAVE_URL+ _0x9d0ax8[_0xa97b[13]][_0xa97b[12]][_0xa97b[133]]+ _0xa97b[172],_0xa97b[173]+ _0x9d0ax3[_0xa97b[23]],_0xa97b[7])[_0xa97b[171]](document,_0xa97b[122]);_0x9d0ax8[_0xa97b[79]]()}));_0x9d0ax37[_0xa97b[31]]= _0xa97b[104];var _0x9d0ax3a=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[105]),function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax3a[_0xa97b[31]]= _0xa97b[106];_0x9d0ax2b[_0xa97b[25]](_0x9d0ax37);_0x9d0ax2b[_0xa97b[25]](_0x9d0ax3a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax29);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2b);this[_0xa97b[64]]= _0x9d0ax28}function GeneralDialog(_0x9d0ax8,_0x9d0ax53){var _0x9d0ax54=_0x9d0ax8[_0xa97b[13]][_0xa97b[174]];var _0x9d0ax28=_0x9d0ax8[_0xa97b[50]](_0xa97b[69]);var _0x9d0ax29=_0x9d0ax8[_0xa97b[50]](_0xa97b[70]);var _0x9d0ax2a=_0x9d0ax8[_0xa97b[50]](_0xa97b[175]);var _0x9d0ax2b=_0x9d0ax8[_0xa97b[50]](_0xa97b[72]);var _0x9d0ax2c=_0x9d0ax8[_0xa97b[74]](_0xa97b[73]);mxUtils[_0xa97b[78]](_0x9d0ax2c,mxResources[_0xa97b[76]](_0xa97b[156])+ _0xa97b[176]+ mxResources[_0xa97b[76]](_0x9d0ax53[_0xa97b[23]][_0xa97b[177]]));var _0x9d0ax2d=mxUtils[_0xa97b[80]](_0xa97b[40],function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax2d[_0xa97b[31]]= _0xa97b[65];_0x9d0ax29[_0xa97b[25]](_0x9d0ax2d);_0x9d0ax29[_0xa97b[25]](_0x9d0ax2c);var _0x9d0ax55=_0x9d0ax8[_0xa97b[50]](_0xa97b[166]);_0x9d0ax55[_0xa97b[5]](_0xa97b[133],_0xa97b[178]);var _0x9d0ax56=_0x9d0ax53[_0xa97b[23]][_0xa97b[179]][_0xa97b[141]];var _0x9d0ax4f=_0x9d0ax8[_0xa97b[50]](_0xa97b[166]);for(var _0x9d0ax57=0;_0x9d0ax57< _0x9d0ax56;_0x9d0ax57++){var _0x9d0ax3f=_0x9d0ax53[_0xa97b[23]][_0xa97b[179]][_0x9d0ax57][_0xa97b[125]];var _0x9d0ax40=_0xa97b[126]+ _0x9d0ax3f;var _0x9d0ax2=_0x9d0ax53[_0xa97b[23]][_0xa97b[179]][_0x9d0ax57][_0xa97b[23]];console[_0xa97b[94]](_0x9d0ax3f);var _0x9d0ax50=_0x9d0ax8[_0xa97b[50]]((_0x9d0ax57== _0x9d0ax56- 1)?_0xa97b[167]:_0xa97b[180]);var _0x9d0ax42=document[_0xa97b[2]](_0xa97b[130]);_0x9d0ax42[_0xa97b[31]]= _0xa97b[168];mxUtils[_0xa97b[78]](_0x9d0ax42,mxResources[_0xa97b[76]](_0x9d0ax3f));_0x9d0ax50[_0xa97b[25]](_0x9d0ax42);var _0x9d0ax3;switch(_0x9d0ax3f){case _0xa97b[133]:_0x9d0ax3= document[_0xa97b[2]](_0xa97b[1]);_0x9d0ax2= _0x9d0ax53[_0xa97b[133]];_0x9d0ax3[_0xa97b[5]](_0xa97b[23],_0x9d0ax2);_0x9d0ax3[_0xa97b[5]](_0xa97b[181],true);_0x9d0ax3[_0xa97b[31]]= _0xa97b[134];break;case _0xa97b[187]:_0x9d0ax3= document[_0xa97b[2]](_0xa97b[1]);_0x9d0ax3[_0xa97b[5]](_0xa97b[3],_0xa97b[80]);_0x9d0ax3[_0xa97b[182]]= function(){if(this[_0xa97b[23]]== _0xa97b[183]){this[_0xa97b[5]](_0xa97b[23],_0xa97b[184]);this[_0xa97b[31]]= _0xa97b[185]}else {this[_0xa97b[31]]= _0xa97b[186];this[_0xa97b[5]](_0xa97b[23],_0xa97b[183])}};_0x9d0ax3[_0xa97b[5]](_0xa97b[23],_0x9d0ax2);_0x9d0ax3[_0xa97b[31]]= (_0x9d0ax2== _0xa97b[183]?_0xa97b[186]:_0xa97b[185]);break;case _0xa97b[21]:_0x9d0ax3= document[_0xa97b[2]](_0xa97b[83]);_0x9d0ax3[_0xa97b[188]]= _0x9d0ax2;_0x9d0ax3[_0xa97b[31]]= _0xa97b[134];break;case _0xa97b[189]:_0x9d0ax3= document[_0xa97b[2]](_0xa97b[83]);_0x9d0ax3[_0xa97b[188]]= _0x9d0ax2;_0x9d0ax3[_0xa97b[31]]= _0xa97b[134];break;case _0xa97b[190]:_0x9d0ax3= document[_0xa97b[2]](_0xa97b[83]);_0x9d0ax3[_0xa97b[188]]= _0x9d0ax2;_0x9d0ax3[_0xa97b[31]]= _0xa97b[134];break;case _0xa97b[193]:_0x9d0ax3= document[_0xa97b[2]](_0xa97b[1]);_0x9d0ax3[_0xa97b[5]](_0xa97b[23],_0x9d0ax2);_0x9d0ax3[_0xa97b[5]](_0xa97b[191],_0xa97b[192]);_0x9d0ax3[_0xa97b[31]]= _0xa97b[134];break;case _0xa97b[195]:_0x9d0ax3= createDropdownFromApi(_0xa97b[194],_0x9d0ax2,_0xa97b[125],_0xa97b[133],_0x9d0ax8);break;case _0xa97b[198]:_0x9d0ax3= document[_0xa97b[2]](_0xa97b[83]);_0x9d0ax3[_0xa97b[188]]= _0x9d0ax2;_0x9d0ax3[_0xa97b[31]]= _0xa97b[134];_0x9d0ax3[_0xa97b[5]](_0xa97b[196],_0xa97b[197]);break;case _0xa97b[201]:var _0x9d0ax3=mxUtils[_0xa97b[80]](_0xa97b[199],function(){var _0x9d0ax58=createDynamicInput(null,null,_0x9d0ax8);_0x9d0ax55[_0xa97b[25]](_0x9d0ax58);_0x9d0ax2a[_0xa97b[25]](_0x9d0ax55)});_0x9d0ax3[_0xa97b[31]]= _0xa97b[200];break;default:_0x9d0ax3= document[_0xa97b[2]](_0xa97b[1]);_0x9d0ax3[_0xa97b[5]](_0xa97b[23],_0x9d0ax2);_0x9d0ax3[_0xa97b[31]]= _0xa97b[134];break};_0x9d0ax3[_0xa97b[5]](_0xa97b[133],_0x9d0ax40);var _0x9d0ax25=_0x9d0ax8[_0xa97b[50]](_0xa97b[169]);_0x9d0ax25[_0xa97b[25]](_0x9d0ax3);if(mxResources[_0xa97b[76]](_0xa97b[202]+ _0x9d0ax3f)){var _0x9d0ax59=_0x9d0ax8[_0xa97b[50]](_0xa97b[203]);_0x9d0ax59[_0xa97b[31]]= _0xa97b[204];mxUtils[_0xa97b[78]](_0x9d0ax59,mxResources[_0xa97b[76]](_0xa97b[202]+ _0x9d0ax3f));_0x9d0ax25[_0xa97b[25]](_0x9d0ax59)};_0x9d0ax50[_0xa97b[25]](_0x9d0ax25);_0x9d0ax4f[_0xa97b[25]](_0x9d0ax50)};_0x9d0ax2a[_0xa97b[25]](_0x9d0ax4f);if(_0x9d0ax53[_0xa97b[23]][_0xa97b[177]]== _0xa97b[1]){if(_0x9d0ax53[_0xa97b[205]]){for(var _0x9d0ax47=0;_0x9d0ax47< _0x9d0ax53[_0xa97b[205]][_0xa97b[141]];_0x9d0ax47++){var _0x9d0ax5a=_0xa97b[40];var _0x9d0ax5b=_0xa97b[40];_[_0xa97b[28]](_0x9d0ax53[_0xa97b[205]][_0x9d0ax47][_0xa97b[23]][_0xa97b[179]],function(_0x9d0ax5c){if(_0x9d0ax5c[_0xa97b[125]]== _0xa97b[3]){_0x9d0ax5a= _0x9d0ax5c[_0xa97b[23]]}else {if(_0x9d0ax5c[_0xa97b[125]]== _0xa97b[130]){_0x9d0ax5b= _0x9d0ax5c[_0xa97b[23]]}}});var _0x9d0ax58=createDynamicInput(_0x9d0ax5a,_0x9d0ax5b,_0x9d0ax8);_0x9d0ax55[_0xa97b[25]](_0x9d0ax58)}}};_0x9d0ax2a[_0xa97b[25]](_0x9d0ax55);var _0x9d0ax37=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[135]),mxUtils[_0xa97b[103]](this,function(_0x9d0ax38){for(var _0x9d0ax57=0;_0x9d0ax57< _0x9d0ax53[_0xa97b[23]][_0xa97b[179]][_0xa97b[141]];_0x9d0ax57++){var _0x9d0ax40=_0xa97b[126]+ _0x9d0ax53[_0xa97b[23]][_0xa97b[179]][_0x9d0ax57][_0xa97b[125]];var _0x9d0ax3f=_0x9d0ax53[_0xa97b[23]][_0xa97b[179]][_0x9d0ax57][_0xa97b[125]];console[_0xa97b[94]](_0x9d0ax3f);_0x9d0ax53[_0xa97b[5]](_0x9d0ax3f,document[_0xa97b[206]](_0x9d0ax40)[_0xa97b[23]]);console[_0xa97b[94]](document[_0xa97b[206]](_0x9d0ax40)[_0xa97b[23]])};if(_0x9d0ax53[_0xa97b[23]][_0xa97b[177]]== _0xa97b[1]){if(_0x9d0ax54[_0xa97b[208]][_0xa97b[207]](_0x9d0ax53)){_0x9d0ax53[_0xa97b[205]]= []};if(document[_0xa97b[206]](_0xa97b[178])){var _0x9d0ax55=document[_0xa97b[206]](_0xa97b[178])[_0xa97b[205]];for(var _0x9d0ax47=0;_0x9d0ax47< _0x9d0ax55[_0xa97b[141]];_0x9d0ax47++){var _0x9d0ax5d=_0x9d0ax55[_0x9d0ax47][_0xa97b[205]][1];var _0x9d0ax5e=_0x9d0ax55[_0x9d0ax47][_0xa97b[205]][0];var _0x9d0ax39=mxUtils[_0xa97b[209]]();var _0x9d0ax5f=_0x9d0ax39[_0xa97b[2]](_0xa97b[178]);_0x9d0ax5f[_0xa97b[5]](_0xa97b[3],_0x9d0ax55[_0x9d0ax47][_0xa97b[210]](_0xa97b[19])[0][_0xa97b[23]]);_0x9d0ax5f[_0xa97b[5]](_0xa97b[130],_0x9d0ax55[_0x9d0ax47][_0xa97b[210]](_0xa97b[1])[0][_0xa97b[23]]);var _0x9d0ax60= new mxCell(_0x9d0ax5f);_0x9d0ax54[_0xa97b[208]][_0xa97b[201]](_0x9d0ax53,_0x9d0ax60)}}};_0x9d0ax54[_0xa97b[211]](_0x9d0ax53);_0x9d0ax8[_0xa97b[79]]()}));_0x9d0ax37[_0xa97b[31]]= _0xa97b[104];var _0x9d0ax3a=mxUtils[_0xa97b[80]](mxResources[_0xa97b[76]](_0xa97b[105]),function(){_0x9d0ax8[_0xa97b[79]]()});_0x9d0ax3a[_0xa97b[31]]= _0xa97b[106];_0x9d0ax2b[_0xa97b[25]](_0x9d0ax37);_0x9d0ax2b[_0xa97b[25]](_0x9d0ax3a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax29);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2a);_0x9d0ax28[_0xa97b[25]](_0x9d0ax2b);this[_0xa97b[64]]= _0x9d0ax28}function createDynamicInput(_0x9d0ax5a,_0x9d0ax5b,_0x9d0ax8){var _0x9d0ax58=_0x9d0ax8[_0xa97b[50]](_0xa97b[180]);var _0x9d0ax2f=_0x9d0ax8[_0xa97b[50]](_0xa97b[212]);var _0x9d0ax41=_0x9d0ax8[_0xa97b[50]](_0xa97b[212]);var _0x9d0ax62=_0x9d0ax8[_0xa97b[50]](_0xa97b[213]);var _0x9d0ax3=document[_0xa97b[2]](_0xa97b[1]);_0x9d0ax3[_0xa97b[5]](_0xa97b[191],_0xa97b[214]);_0x9d0ax3[_0xa97b[23]]= _0x9d0ax5b;_0x9d0ax3[_0xa97b[31]]= _0xa97b[134];_0x9d0ax2f[_0xa97b[25]](_0x9d0ax3);var _0x9d0ax43=document[_0xa97b[2]](_0xa97b[19]);var _0x9d0axd=document[_0xa97b[2]](_0xa97b[20]);_0x9d0axd[_0xa97b[21]]= _0xa97b[22];_0x9d0axd[_0xa97b[23]]= _0xa97b[40];_0x9d0ax43[_0xa97b[25]](_0x9d0axd);var _0x9d0ax13=[_0xa97b[21],_0xa97b[215],_0xa97b[83],_0xa97b[4]];_0x9d0ax13[_0xa97b[28]](function(_0x9d0axe){_0x9d0axd= document[_0xa97b[2]](_0xa97b[20]);_0x9d0axd[_0xa97b[21]]= _0x9d0axe;_0x9d0axd[_0xa97b[23]]= _0x9d0axe;_0x9d0axd[_0xa97b[29]]= (_0x9d0axe== _0x9d0ax5a);_0x9d0ax43[_0xa97b[25]](_0x9d0axd)});_0x9d0ax43[_0xa97b[31]]= _0xa97b[134];_0x9d0ax41[_0xa97b[25]](_0x9d0ax43);var _0x9d0ax63=mxUtils[_0xa97b[80]](_0xa97b[216],function(){var _0x9d0ax64=_0x9d0ax63[_0xa97b[217]];var _0x9d0ax65=_0x9d0ax64[_0xa97b[217]];document[_0xa97b[206]](_0xa97b[178])[_0xa97b[67]](_0x9d0ax65)});_0x9d0ax63[_0xa97b[31]]= _0xa97b[218];_0x9d0ax62[_0xa97b[25]](_0x9d0ax63);_0x9d0ax58[_0xa97b[25]](_0x9d0ax2f);_0x9d0ax58[_0xa97b[25]](_0x9d0ax41);_0x9d0ax58[_0xa97b[25]](_0x9d0ax62);return _0x9d0ax58}
\ No newline at end of file
diff --git a/public/assets/plugins/jscripty/js/Editor.js b/public/assets/plugins/jscripty/js/Editor.js
index 9858989..f935892 100644
--- a/public/assets/plugins/jscripty/js/Editor.js
+++ b/public/assets/plugins/jscripty/js/Editor.js
@@ -1,888 +1 @@
-/**
- * $Id: Editor.js,v 1.14 2013/03/06 17:57:10 boris Exp $
- * Copyright (c) 2006-2012, JGraph Ltd
- */
-// Specifies if local storage should be used (eg. on the iPad which has no filesystem)
-var useLocalStorage = (mxClient.IS_TOUCH || urlParams['storage'] == 'local') && typeof(localStorage) != 'undefined';
-var fileSupport = window.File != null && window.FileReader != null && window.FileList != null;
-
-// Specifies if connector should be shown on selected cells
-var touchStyle = mxClient.IS_TOUCH || urlParams['touch'] == '1';
-
-// Counts open editor tabs (must be global for cross-window access)
-var counter = 0;
-
-// Cross-domain window access is not allowed in FF, so if we
-// were opened from another domain then this will fail.
-try {
-	var op = window;
-
-	while (op.opener != null && !isNaN(op.opener.counter)) {
-		op = op.opener;
-	}
-
-	// Increments the counter in the first opener in the chain
-	if (op != null) {
-		op.counter++;
-		counter = op.counter;
-	}
-} catch (e) {
-	// ignore
-}
-
-/**
- * Editor constructor executed on page load.
- */
-Editor = function() {
-	mxEventSource.call(this);
-	this.init();
-	this.initStencilRegistry();
-	this.graph = new Graph();
-	this.outline = new mxOutline(this.graph);
-	this.outline.updateOnPan = true;
-	this.undoManager = this.createUndoManager();
-	this.status = '';
-
-	// Contains the name which was used for the last save. Default value is null.
-	this.filename = null;
-
-	this.getOrCreateFilename = function() {
-		return this.filename || mxResources.get('drawing', [counter]) + '.xml';
-	};
-
-	this.getFilename = function() {
-		return this.filename;
-	};
-
-	// Sets the status and fires a statusChanged event
-	this.setStatus = function(value) {
-		this.status = value;
-		this.fireEvent(new mxEventObject('statusChanged'));
-	};
-
-	// Returns the current status
-	this.getStatus = function() {
-		return this.status;
-	};
-
-	// Contains the current modified state of the diagram. This is false for
-	// new diagrams and after the diagram was saved.
-	this.modified = false;
-
-	// Updates modified state if graph changes
-	this.graphChangeListener = function() {
-		this.modified = true;
-	};
-	this.graph.getModel().addListener(mxEvent.CHANGE, mxUtils.bind(this, function() {
-		this.graphChangeListener.apply(this, arguments);
-	}));
-
-	// Installs dialog if browser window is closed without saving
-	// This must be disabled during save and image export
-	window.onbeforeunload = mxUtils.bind(this, function() {
-		if (this.modified) {
-			return mxResources.get('allChangesLost');
-		}
-	});
-
-	// Sets persistent graph state defaults
-	this.graph.resetViewOnRootChange = false;
-	this.graph.scrollbars = true;
-	this.graph.background = null;
-};
-
-// Editor inherits from mxEventSource
-mxUtils.extend(Editor, mxEventSource);
-
-/**
- * Specifies the image URL to be used for the grid.
- */
-Editor.prototype.gridImage = IMAGE_PATH + '/grid.gif';
-
-/**
- * Specifies the image URL to be used for the transparent background.
- */
-Editor.prototype.transparentImage = IMAGE_PATH + '/transparent.gif';
-
-/**
- * Sets the XML node for the current diagram.
- */
-Editor.prototype.setGraphXml = function(node) {
-	var dec = new mxCodec(node.ownerDocument);
-
-	if (node.nodeName == 'mxGraphModel') {
-		this.graph.view.scale = 1;
-		this.graph.gridEnabled = node.getAttribute('grid') != '0';
-		this.graph.graphHandler.guidesEnabled = node.getAttribute('guides') != '0';
-		this.graph.setTooltips(node.getAttribute('tooltips') != '0');
-		this.graph.setConnectable(node.getAttribute('connect') != '0');
-		this.graph.foldingEnabled = node.getAttribute('fold') != '0';
-		this.graph.scrollbars = node.getAttribute('scrollbars') != '0';
-
-		if (!this.graph.scrollbars) {
-			this.graph.container.scrollLeft = 0;
-			this.graph.container.scrollTop = 0;
-			this.graph.view.translate.x = Number(node.getAttribute('dx') || 0);
-			this.graph.view.translate.y = Number(node.getAttribute('dy') || 0);
-		}
-
-		this.graph.pageVisible = node.getAttribute('page') == '1';
-		this.graph.pageBreaksVisible = this.graph.pageVisible;
-		this.graph.preferPageSize = this.graph.pageBreaksVisible;
-
-		// Loads the persistent state settings
-		var ps = node.getAttribute('pageScale');
-
-		if (ps != null) {
-			this.graph.pageScale = ps;
-		} else {
-			this.graph.pageScale = 1.5;
-		}
-
-		var pw = node.getAttribute('pageWidth');
-		var ph = node.getAttribute('pageHeight');
-
-		if (pw != null && ph != null) {
-			this.graph.pageFormat = new mxRectangle(0, 0, parseFloat(pw), parseFloat(ph));
-			this.outline.outline.pageFormat = this.graph.pageFormat;
-		}
-
-		// Loads the persistent state settings
-		var bg = node.getAttribute('background');
-
-		if (bg != null && bg.length > 0) {
-			this.graph.background = bg;
-		}
-
-		dec.decode(node, this.graph.getModel());
-		this.updateGraphComponents();
-	}
-};
-
-/**
- * Returns the XML node that represents the current diagram.
- */
-Editor.prototype.getGraphXml = function() {
-	var enc = new mxCodec(mxUtils.createXmlDocument());
-	var node = enc.encode(this.graph.getModel());
-
-	if (this.graph.view.translate.x != 0 || this.graph.view.translate.y != 0) {
-		node.setAttribute('dx', Math.round(this.graph.view.translate.x * 100) / 100);
-		node.setAttribute('dy', Math.round(this.graph.view.translate.y * 100) / 100);
-	}
-
-	node.setAttribute('grid', (this.graph.isGridEnabled()) ? '1' : '0');
-	node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
-	node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
-	node.setAttribute('tooltips', (this.graph.tooltipHandler.isEnabled()) ? '1' : '0');
-	node.setAttribute('connect', (this.graph.connectionHandler.isEnabled()) ? '1' : '0');
-	node.setAttribute('fold', (this.graph.foldingEnabled) ? '1' : '0');
-	node.setAttribute('page', (this.graph.pageVisible) ? '1' : '0');
-	node.setAttribute('pageScale', this.graph.pageScale);
-	node.setAttribute('pageWidth', this.graph.pageFormat.width);
-	node.setAttribute('pageHeight', this.graph.pageFormat.height);
-
-	if (!this.graph.scrollbars) {
-		node.setAttribute('scrollbars', '0');
-	}
-
-	if (this.graph.background != null) {
-		node.setAttribute('background', this.graph.background);
-	}
-
-	return node;
-};
-
-/**
- * Keeps the graph container in sync with the persistent graph state
- */
-Editor.prototype.updateGraphComponents = function() {
-	var graph = this.graph;
-	var outline = this.outline;
-
-	if (graph.container != null && outline.outline.container != null) {
-		if (graph.background != null) {
-			if (graph.background == 'none') {
-				graph.container.style.backgroundColor = 'transparent';
-			} else {
-				if (graph.view.backgroundPageShape != null) {
-					graph.view.backgroundPageShape.fill = graph.background;
-					graph.view.backgroundPageShape.reconfigure();
-				}
-
-				graph.container.style.backgroundColor = graph.background;
-			}
-		} else {
-			graph.container.style.backgroundColor = '';
-		}
-
-		if (graph.pageVisible) {
-			graph.container.style.backgroundColor = '#ebebeb';
-			graph.container.style.borderStyle = 'solid';
-			graph.container.style.borderColor = '#e5e5e5';
-			graph.container.style.borderTopWidth = '1px';
-			graph.container.style.borderLeftWidth = '1px';
-			graph.container.style.borderRightWidth = '0px';
-			graph.container.style.borderBottomWidth = '0px';
-		} else {
-			graph.container.style.border = '';
-		}
-
-		outline.outline.container.style.backgroundColor = graph.container.style.backgroundColor;
-
-		if (outline.outline.pageVisible != graph.pageVisible ||
-			outline.outline.pageScale != graph.pageScale) {
-			outline.outline.pageScale = graph.pageScale;
-			outline.outline.pageVisible = graph.pageVisible;
-			outline.outline.view.validate();
-		}
-
-		if (graph.scrollbars && graph.container.style.overflow == 'hidden' && !touchStyle) {
-			graph.container.style.overflow = 'auto';
-		} else if (!graph.scrollbars || touchStyle) {
-			graph.container.style.overflow = 'hidden';
-		}
-
-		// Transparent.gif is a workaround for focus repaint problems in IE
-		var noBackground = (mxClient.IS_IE && document.documentMode >= 9) ? 'url(' + this.transparentImage + ')' : 'none';
-		graph.container.style.backgroundImage = (!graph.pageVisible && graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : noBackground;
-
-		if (graph.view.backgroundPageShape != null) {
-			graph.view.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : 'none';
-		}
-	}
-};
-
-/**
- * Initializes the environment.
- */
-Editor.prototype.init = function() {
-	// Adds stylesheet for IE6
-	if (mxClient.IS_IE6) {
-		mxClient.link('stylesheet', CSS_PATH + '/grapheditor-ie6.css');
-	}
-
-	// Adds required resources (disables loading of fallback properties, this can only
-	// be used if we know that all keys are defined in the language specific file)
-	mxResources.loadDefaultBundle = false;
-	mxResources.add(RESOURCE_BASE);
-
-	// Makes the connection hotspot smaller
-	mxConstants.DEFAULT_HOTSPOT = 0.3;
-
-	var mxConnectionHandlerCreateMarker = mxConnectionHandler.prototype.createMarker;
-	mxConnectionHandler.prototype.createMarker = function() {
-		var marker = mxConnectionHandlerCreateMarker.apply(this, arguments);
-
-		// Overrides to ignore hotspot only for target terminal
-		marker.intersects = mxUtils.bind(this, function(state, evt) {
-			if (this.isConnecting()) {
-				return true;
-			}
-
-			return mxCellMarker.prototype.intersects.apply(marker, arguments);
-		});
-
-		return marker;
-	};
-
-	// Makes the shadow brighter
-	mxConstants.SHADOWCOLOR = '#d0d0d0';
-
-	// Changes some default colors
-	mxConstants.HANDLE_FILLCOLOR = '#99ccff';
-	mxConstants.HANDLE_STROKECOLOR = '#0088cf';
-	mxConstants.VERTEX_SELECTION_COLOR = '#00a8ff';
-	mxConstants.OUTLINE_COLOR = '#00a8ff';
-	mxConstants.OUTLINE_HANDLE_FILLCOLOR = '#99ccff';
-	mxConstants.OUTLINE_HANDLE_STROKECOLOR = '#00a8ff';
-	mxConstants.CONNECT_HANDLE_FILLCOLOR = '#cee7ff';
-	mxConstants.EDGE_SELECTION_COLOR = '#00a8ff';
-	mxConstants.DEFAULT_VALID_COLOR = '#00a8ff';
-	mxConstants.LABEL_HANDLE_FILLCOLOR = '#cee7ff';
-	mxConstants.GUIDE_COLOR = '#0088cf';
-
-	mxGraph.prototype.pageBreakColor = '#c0c0c0';
-	mxGraph.prototype.pageScale = 1;
-
-	// Increases default rubberband opacity (default is 20)
-	mxRubberband.prototype.defaultOpacity = 30;
-
-	// Changes border color of background page shape
-	mxGraphView.prototype.createBackgroundPageShape = function(bounds) {
-		return new mxRectangleShape(bounds, this.graph.background || 'white', '#cacaca');
-	};
-
-	// Fits the number of background pages to the graph
-	mxGraphView.prototype.getBackgroundPageBounds = function() {
-		var gb = this.getGraphBounds();
-
-		// Computes unscaled, untranslated graph bounds
-		var x = (gb.width > 0) ? gb.x / this.scale - this.translate.x : 0;
-		var y = (gb.height > 0) ? gb.y / this.scale - this.translate.y : 0;
-		var w = gb.width / this.scale;
-		var h = gb.height / this.scale;
-
-		var fmt = this.graph.pageFormat;
-		var ps = this.graph.pageScale;
-
-		var pw = fmt.width * ps;
-		var ph = fmt.height * ps;
-
-		var x0 = Math.floor(Math.min(0, x) / pw);
-		var y0 = Math.floor(Math.min(0, y) / ph);
-		var xe = Math.ceil(Math.max(1, x + w) / pw);
-		var ye = Math.ceil(Math.max(1, y + h) / ph);
-
-		var rows = xe - x0;
-		var cols = ye - y0;
-
-		var bounds = new mxRectangle(this.scale * (this.translate.x + x0 * pw), this.scale *
-			(this.translate.y + y0 * ph), this.scale * rows * pw, this.scale * cols * ph);
-
-		return bounds;
-	};
-
-	// Add panning for background page in VML
-	var graphPanGraph = mxGraph.prototype.panGraph;
-	mxGraph.prototype.panGraph = function(dx, dy) {
-		graphPanGraph.apply(this, arguments);
-
-		if ((this.dialect != mxConstants.DIALECT_SVG && this.view.backgroundPageShape != null) &&
-			(!this.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.container))) {
-			this.view.backgroundPageShape.node.style.marginLeft = dx + 'px';
-			this.view.backgroundPageShape.node.style.marginTop = dy + 'px';
-		}
-	};
-
-	var editor = this;
-
-	// Uses HTML for background pages (to support grid background image)
-	mxGraphView.prototype.validateBackground = function() {
-		var bg = this.graph.getBackgroundImage();
-
-		if (bg != null) {
-			if (this.backgroundImage == null || this.backgroundImage.image != bg.src) {
-				if (this.backgroundImage != null) {
-					this.backgroundImage.destroy();
-				}
-
-				var bounds = new mxRectangle(0, 0, 1, 1);
-
-				this.backgroundImage = new mxImageShape(bounds, bg.src);
-				this.backgroundImage.dialect = this.graph.dialect;
-				this.backgroundImage.init(this.backgroundPane);
-				this.backgroundImage.redraw();
-			}
-
-			this.redrawBackgroundImage(this.backgroundImage, bg);
-		} else if (this.backgroundImage != null) {
-			this.backgroundImage.destroy();
-			this.backgroundImage = null;
-		}
-
-		if (this.graph.pageVisible) {
-			var bounds = this.getBackgroundPageBounds();
-
-			if (this.backgroundPageShape == null) {
-				this.backgroundPageShape = this.createBackgroundPageShape(bounds);
-				this.backgroundPageShape.scale = 1;
-				this.backgroundPageShape.isShadow = true;
-				this.backgroundPageShape.dialect = mxConstants.DIALECT_STRICTHTML;
-				this.backgroundPageShape.init(this.graph.container);
-				// Required for the browser to render the background page in correct order
-				this.graph.container.firstChild.style.position = 'absolute';
-				this.graph.container.insertBefore(this.backgroundPageShape.node, this.graph.container.firstChild);
-				this.backgroundPageShape.redraw();
-
-				this.backgroundPageShape.node.className = 'geBackgroundPage';
-				this.backgroundPageShape.node.style.backgroundPosition = '-1px -1px';
-
-				// Adds listener for double click handling on background
-				mxEvent.addListener(this.backgroundPageShape.node, 'dblclick',
-					mxUtils.bind(this, function(evt) {
-						this.graph.dblClick(evt);
-					})
-				);
-
-				// Adds basic listeners for graph event dispatching outside of the
-				// container and finishing the handling of a single gesture
-				mxEvent.addGestureListeners(this.backgroundPageShape.node,
-					mxUtils.bind(this, function(evt) {
-						this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt));
-					}),
-					mxUtils.bind(this, function(evt) {
-						// Hides the tooltip if mouse is outside container
-						if (this.graph.tooltipHandler != null &&
-							this.graph.tooltipHandler.isHideOnHover()) {
-							this.graph.tooltipHandler.hide();
-						}
-
-						if (this.graph.isMouseDown &&
-							!mxEvent.isConsumed(evt)) {
-							this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,
-								new mxMouseEvent(evt));
-						}
-					}),
-					mxUtils.bind(this, function(evt) {
-						this.graph.fireMouseEvent(mxEvent.MOUSE_UP,
-							new mxMouseEvent(evt));
-					}));
-			} else {
-				this.backgroundPageShape.scale = 1;
-				this.backgroundPageShape.bounds = bounds;
-				this.backgroundPageShape.redraw();
-			}
-
-			this.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ?
-				'url(' + editor.gridImage + ')' : 'none';
-		} else if (this.backgroundPageShape != null) {
-			this.backgroundPageShape.destroy();
-			this.backgroundPageShape = null;
-		}
-	};
-
-	// Draws page breaks only within the page
-	mxGraph.prototype.updatePageBreaks = function(visible, width, height) {
-		var scale = this.view.scale;
-		var tr = this.view.translate;
-		var fmt = this.pageFormat;
-		var ps = scale * this.pageScale;
-
-		var bounds2 = this.view.getBackgroundPageBounds();
-
-		width = bounds2.width;
-		height = bounds2.height;
-		var bounds = new mxRectangle(scale * tr.x, scale * tr.y,
-			fmt.width * ps, fmt.height * ps);
-
-		// Does not show page breaks if the scale is too small
-		visible = visible && Math.min(bounds.width, bounds.height) > this.minPageBreakDist;
-
-		var horizontalCount = (visible) ? Math.ceil(width / bounds.width) - 1 : 0;
-		var verticalCount = (visible) ? Math.ceil(height / bounds.height) - 1 : 0;
-		var right = bounds2.x + width;
-		var bottom = bounds2.y + height;
-
-		if (this.horizontalPageBreaks == null && horizontalCount > 0) {
-			this.horizontalPageBreaks = [];
-		}
-
-		if (this.horizontalPageBreaks != null) {
-			for (var i = 0; i <= horizontalCount; i++) {
-				var pts = [new mxPoint(bounds2.x + (i + 1) * bounds.width, bounds2.y),
-					new mxPoint(bounds2.x + (i + 1) * bounds.width, bottom)
-				];
-
-				if (this.horizontalPageBreaks[i] != null) {
-					this.horizontalPageBreaks[i].scale = 1;
-					this.horizontalPageBreaks[i].points = pts;
-					this.horizontalPageBreaks[i].redraw();
-				} else {
-					var pageBreak = new mxPolyline(pts, this.pageBreakColor, this.scale);
-					pageBreak.dialect = this.dialect;
-					pageBreak.isDashed = this.pageBreakDashed;
-					pageBreak.addPipe = false;
-					pageBreak.scale = scale;
-					pageBreak.init(this.view.backgroundPane);
-					pageBreak.redraw();
-
-					this.horizontalPageBreaks[i] = pageBreak;
-				}
-			}
-
-			for (var i = horizontalCount; i < this.horizontalPageBreaks.length; i++) {
-				this.horizontalPageBreaks[i].destroy();
-			}
-
-			this.horizontalPageBreaks.splice(horizontalCount, this.horizontalPageBreaks.length - horizontalCount);
-		}
-
-		if (this.verticalPageBreaks == null && verticalCount > 0) {
-			this.verticalPageBreaks = [];
-		}
-
-		if (this.verticalPageBreaks != null) {
-			for (var i = 0; i <= verticalCount; i++) {
-				var pts = [new mxPoint(bounds2.x, bounds2.y + (i + 1) * bounds.height),
-					new mxPoint(right, bounds2.y + (i + 1) * bounds.height)
-				];
-
-				if (this.verticalPageBreaks[i] != null) {
-					this.verticalPageBreaks[i].scale = 1; //scale;
-					this.verticalPageBreaks[i].points = pts;
-					this.verticalPageBreaks[i].redraw();
-				} else {
-					var pageBreak = new mxPolyline(pts, this.pageBreakColor, scale);
-					pageBreak.dialect = this.dialect;
-					pageBreak.isDashed = this.pageBreakDashed;
-					pageBreak.addPipe = false;
-					pageBreak.scale = scale;
-					pageBreak.init(this.view.backgroundPane);
-					pageBreak.redraw();
-
-					this.verticalPageBreaks[i] = pageBreak;
-				}
-			}
-
-			for (var i = verticalCount; i < this.verticalPageBreaks.length; i++) {
-				this.verticalPageBreaks[i].destroy();
-			}
-
-			this.verticalPageBreaks.splice(verticalCount, this.verticalPageBreaks.length - verticalCount);
-		}
-	};
-
-	// Enables snapping to off-grid terminals for edge waypoints
-	mxEdgeHandler.prototype.snapToTerminals = true;
-
-	// Enables guides
-	mxGraphHandler.prototype.guidesEnabled = true;
-
-	// Disables removing relative children from parents
-	var mxGraphHandlerShouldRemoveCellsFromParent = mxGraphHandler.prototype.shouldRemoveCellsFromParent;
-	mxGraphHandler.prototype.shouldRemoveCellsFromParent = function(parent, cells, evt) {
-		for (var i = 0; i < cells.length; i++) {
-			if (this.graph.getModel().isVertex(cells[i])) {
-				var geo = this.graph.getCellGeometry(cells[i]);
-
-				if (geo != null && geo.relative) {
-					return false;
-				}
-			}
-		}
-
-		return mxGraphHandlerShouldRemoveCellsFromParent.apply(this, arguments);
-	};
-
-	// Alt-move disables guides
-	mxGuide.prototype.isEnabledForEvent = function(evt) {
-		return !mxEvent.isAltDown(evt);
-	};
-
-	// Consumes click events for disabled menu items
-	mxPopupMenuAddItem = mxPopupMenu.prototype.addItem;
-	mxPopupMenu.prototype.addItem = function(title, image, funct, parent, iconCls, enabled) {
-		var result = mxPopupMenuAddItem.apply(this, arguments);
-
-		if (enabled != null && !enabled) {
-			mxEvent.addListener(result, 'mousedown', function(evt) {
-				mxEvent.consume(evt);
-			});
-		}
-
-		return result;
-	};
-
-	// Selects descendants before children selection mode
-	var graphHandlerGetInitialCellForEvent = mxGraphHandler.prototype.getInitialCellForEvent;
-	mxGraphHandler.prototype.getInitialCellForEvent = function(me) {
-		var model = this.graph.getModel();
-		var psel = model.getParent(this.graph.getSelectionCell());
-		var cell = graphHandlerGetInitialCellForEvent.apply(this, arguments);
-		var parent = model.getParent(cell);
-
-		if (psel == null || (psel != cell && psel != parent)) {
-			while (!this.graph.isCellSelected(cell) && !this.graph.isCellSelected(parent) &&
-				model.isVertex(parent) && !this.graph.isValidRoot(parent)) {
-				cell = parent;
-				parent = this.graph.getModel().getParent(cell);
-			}
-		}
-
-		return cell;
-	};
-
-	// Selection is delayed to mouseup if child selected
-	var graphHandlerIsDelayedSelection = mxGraphHandler.prototype.isDelayedSelection;
-	mxGraphHandler.prototype.isDelayedSelection = function(cell) {
-		var result = graphHandlerIsDelayedSelection.apply(this, arguments);
-		var model = this.graph.getModel();
-		var psel = model.getParent(this.graph.getSelectionCell());
-		var parent = model.getParent(cell);
-
-		if (psel == null || (psel != cell && psel != parent)) {
-			if (!this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent)) {
-				result = true;
-			}
-		}
-
-		return result;
-	};
-
-	// Delayed selection of parent group
-	mxGraphHandler.prototype.selectDelayed = function(me) {
-		var cell = me.getCell();
-
-		if (cell == null) {
-			cell = this.cell;
-		}
-
-		var model = this.graph.getModel();
-		var parent = model.getParent(cell);
-
-		while (this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent)) {
-			cell = parent;
-			parent = model.getParent(cell);
-		}
-
-		this.graph.selectCellForEvent(cell, me.getEvent());
-	};
-
-	// Returns last selected ancestor
-	mxPanningHandler.prototype.getCellForPopupEvent = function(me) {
-		var cell = me.getCell();
-		var model = this.graph.getModel();
-		var parent = model.getParent(cell);
-
-		while (model.isVertex(parent) && !this.graph.isValidRoot(parent)) {
-			if (this.graph.isCellSelected(parent)) {
-				cell = parent;
-			}
-
-			parent = model.getParent(parent);
-		}
-
-		return cell;
-	};
-};
-
-/**
- * Creates and returns a new undo manager.
- */
-Editor.prototype.createUndoManager = function() {
-	var graph = this.graph;
-	var undoMgr = new mxUndoManager();
-
-	// Installs the command history
-	var listener = function(sender, evt) {
-		undoMgr.undoableEditHappened(evt.getProperty('edit'));
-	};
-
-	graph.getModel().addListener(mxEvent.UNDO, listener);
-	graph.getView().addListener(mxEvent.UNDO, listener);
-
-	// Keeps the selection in sync with the history
-	var undoHandler = function(sender, evt) {
-		var cand = graph.getSelectionCellsForChanges(evt.getProperty('edit').changes);
-		var cells = [];
-
-		for (var i = 1; i < cand.length; i++) {
-			if (graph.view.getState(cand[i]) != null) {
-				cells.push(cand[i]);
-			}
-		}
-
-		graph.setSelectionCells(cells);
-	};
-
-	undoMgr.addListener(mxEvent.UNDO, undoHandler);
-	undoMgr.addListener(mxEvent.REDO, undoHandler);
-
-	return undoMgr;
-};
-
-/**
- * Adds basic stencil set (no namespace).
- */
-Editor.prototype.initStencilRegistry = function() {
-	// Loads default stencils
-	mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/general.xml');
-};
-
-/**
- * Overrides stencil registry for dynamic loading of stencils.
- */
-(function() {
-	/**
-	 * Maps from library names to an array of Javascript filenames,
-	 * which are synchronously loaded. Currently only stencil files
-	 * (.xml) and JS files (.js) are supported.
-	 * IMPORTANT: For embedded diagrams to work entries must also
-	 * be added in EmbedServlet.java.
-	 */
-	mxStencilRegistry.libraries = {};
-
-	/**
-	 * Stores all package names that have been dynamically loaded.
-	 * Each package is only loaded once.
-	 */
-	mxStencilRegistry.packages = [];
-
-	// Extends the default stencil registry to add dynamic loading
-	mxStencilRegistry.getStencil = function(name) {
-		var result = mxStencilRegistry.stencils[name];
-
-		if (result == null) {
-			var basename = mxStencilRegistry.getBasenameForStencil(name);
-
-			// Loads stencil files and tries again
-			if (basename != null) {
-				var libs = mxStencilRegistry.libraries[basename];
-
-				if (libs != null) {
-					if (mxStencilRegistry.packages[basename] == null) {
-						mxStencilRegistry.packages[basename] = 1;
-
-						for (var i = 0; i < libs.length; i++) {
-							var fname = libs[i];
-
-							if (fname.toLowerCase().substring(fname.length - 4, fname.length) == '.xml') {
-								mxStencilRegistry.loadStencilSet(fname, null);
-							} else if (fname.toLowerCase().substring(fname.length - 3, fname.length) == '.js') {
-								var req = mxUtils.load(fname);
-
-								if (req != null) {
-									eval.call(window, req.getText());
-								}
-							} else {
-								// FIXME: This does not yet work as the loading is triggered after
-								// the shape was used in the graph, at which point the keys have
-								// typically been translated in the calling method.
-								//mxResources.add(fname);
-							}
-						}
-					}
-				} else {
-					mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/' + basename + '.xml', null);
-				}
-
-				result = mxStencilRegistry.stencils[name];
-			}
-		}
-
-		return result;
-	};
-
-	// Returns the basename for the given stencil or null if no file must be
-	// loaded to render the given stencil.
-	mxStencilRegistry.getBasenameForStencil = function(name) {
-		var parts = name.split('.');
-		var tmp = null;
-
-		if (parts.length > 0 && parts[0] == 'mxgraph') {
-			tmp = parts[1];
-
-			for (var i = 2; i < parts.length - 1; i++) {
-				tmp += '/' + parts[i];
-			}
-		}
-
-		return tmp;
-	};
-
-	// Loads the given stencil set
-	mxStencilRegistry.loadStencilSet = function(stencilFile, postStencilLoad, force) {
-		force = (force != null) ? force : false;
-
-		// Uses additional cache for detecting previous load attempts
-		var xmlDoc = mxStencilRegistry.packages[stencilFile];
-
-		if (force || xmlDoc == null) {
-			var install = false;
-
-			if (xmlDoc == null) {
-				var req = mxUtils.load(stencilFile);
-				xmlDoc = req.getXml();
-				mxStencilRegistry.packages[stencilFile] = xmlDoc;
-				install = true;
-			}
-
-			mxStencilRegistry.parseStencilSet(xmlDoc, postStencilLoad, install);
-		}
-	};
-
-	// Parses the given stencil set
-	mxStencilRegistry.parseStencilSet = function(xmlDocument, postStencilLoad, install) {
-		install = (install != null) ? install : true;
-		var root = xmlDocument.documentElement;
-		var shape = root.firstChild;
-		var packageName = '';
-		var name = root.getAttribute('name');
-
-		if (name != null) {
-			packageName = name + '.';
-		}
-
-		while (shape != null) {
-			if (shape.nodeType == mxConstants.NODETYPE_ELEMENT) {
-				name = shape.getAttribute('name');
-
-				if (name != null) {
-					packageName = packageName.toLowerCase();
-					var stencilName = name.replace(/ /g, "_");
-
-					if (install) {
-						mxStencilRegistry.addStencil(packageName + stencilName.toLowerCase(), new mxStencil(shape));
-					}
-
-					if (postStencilLoad != null) {
-						var w = shape.getAttribute('w');
-						var h = shape.getAttribute('h');
-
-						w = (w == null) ? 80 : parseInt(w, 10);
-						h = (h == null) ? 80 : parseInt(h, 10);
-
-						postStencilLoad(packageName, stencilName, name, w, h);
-					}
-				}
-			}
-
-			shape = shape.nextSibling;
-		}
-	};
-})();
-
-/**
- * Class for asynchronously opening a new window and loading a file at the same
- * time. This acts as a bridge between the open dialog and the new editor.
- */
-OpenFile = function(done) {
-	this.producer = null;
-	this.consumer = null;
-	this.done = done;
-};
-
-/**
- * Registers the editor from the new window.
- */
-OpenFile.prototype.setConsumer = function(value) {
-	this.consumer = value;
-	this.execute();
-};
-
-/**
- * Sets the data from the loaded file.
- */
-OpenFile.prototype.setData = function(value, filename) {
-	this.data = value;
-	this.filename = filename;
-	this.execute();
-};
-
-/**
- * Displays an error message.
- */
-OpenFile.prototype.error = function(msg) {
-	this.cancel();
-	mxUtils.alert(msg);
-};
-
-/**
- * Consumes the data.
- */
-OpenFile.prototype.execute = function() {
-	if (this.consumer != null && this.data != null) {
-		this.consumer(this.data, this.filename);
-		this.cancel();
-	}
-};
-
-/**
- * Cancels the operation.
- */
-OpenFile.prototype.cancel = function() {
-	if (this.done != null) {
-		this.done();
-	}
-};
+var _0x290a=["\x49\x53\x5F\x54\x4F\x55\x43\x48","\x73\x74\x6F\x72\x61\x67\x65","\x6C\x6F\x63\x61\x6C","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x46\x69\x6C\x65","\x46\x69\x6C\x65\x52\x65\x61\x64\x65\x72","\x46\x69\x6C\x65\x4C\x69\x73\x74","\x74\x6F\x75\x63\x68","\x31","\x6F\x70\x65\x6E\x65\x72","\x63\x6F\x75\x6E\x74\x65\x72","\x63\x61\x6C\x6C","\x69\x6E\x69\x74","\x69\x6E\x69\x74\x53\x74\x65\x6E\x63\x69\x6C\x52\x65\x67\x69\x73\x74\x72\x79","\x67\x72\x61\x70\x68","\x6F\x75\x74\x6C\x69\x6E\x65","\x75\x70\x64\x61\x74\x65\x4F\x6E\x50\x61\x6E","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x63\x72\x65\x61\x74\x65\x55\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x73\x74\x61\x74\x75\x73","","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x67\x65\x74\x4F\x72\x43\x72\x65\x61\x74\x65\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x64\x72\x61\x77\x69\x6E\x67","\x67\x65\x74","\x2E\x78\x6D\x6C","\x67\x65\x74\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73\x43\x68\x61\x6E\x67\x65\x64","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x6D\x6F\x64\x69\x66\x69\x65\x64","\x67\x72\x61\x70\x68\x43\x68\x61\x6E\x67\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x61\x70\x70\x6C\x79","\x62\x69\x6E\x64","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x6F\x6E\x62\x65\x66\x6F\x72\x65\x75\x6E\x6C\x6F\x61\x64","\x61\x6C\x6C\x43\x68\x61\x6E\x67\x65\x73\x4C\x6F\x73\x74","\x72\x65\x73\x65\x74\x56\x69\x65\x77\x4F\x6E\x52\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65","\x73\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x65\x78\x74\x65\x6E\x64","\x67\x72\x69\x64\x49\x6D\x61\x67\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x2F\x67\x72\x69\x64\x2E\x67\x69\x66","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x49\x6D\x61\x67\x65","\x2F\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x2E\x67\x69\x66","\x73\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x6F\x77\x6E\x65\x72\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C","\x73\x63\x61\x6C\x65","\x76\x69\x65\x77","\x67\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x69\x64","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x30","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x67\x75\x69\x64\x65\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x66\x6F\x6C\x64","\x73\x63\x72\x6F\x6C\x6C\x4C\x65\x66\x74","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x78","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65","\x64\x78","\x79","\x64\x79","\x70\x61\x67\x65\x56\x69\x73\x69\x62\x6C\x65","\x70\x61\x67\x65","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x73\x56\x69\x73\x69\x62\x6C\x65","\x70\x72\x65\x66\x65\x72\x50\x61\x67\x65\x53\x69\x7A\x65","\x70\x61\x67\x65\x53\x63\x61\x6C\x65","\x70\x61\x67\x65\x57\x69\x64\x74\x68","\x70\x61\x67\x65\x48\x65\x69\x67\x68\x74","\x70\x61\x67\x65\x46\x6F\x72\x6D\x61\x74","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x63\x6F\x64\x65","\x75\x70\x64\x61\x74\x65\x47\x72\x61\x70\x68\x43\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73","\x67\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x65\x6E\x63\x6F\x64\x65","\x72\x6F\x75\x6E\x64","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x77\x69\x64\x74\x68","\x68\x65\x69\x67\x68\x74","\x6E\x6F\x6E\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x73\x74\x79\x6C\x65","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x53\x68\x61\x70\x65","\x66\x69\x6C\x6C","\x72\x65\x63\x6F\x6E\x66\x69\x67\x75\x72\x65","\x23\x65\x62\x65\x62\x65\x62","\x62\x6F\x72\x64\x65\x72\x53\x74\x79\x6C\x65","\x73\x6F\x6C\x69\x64","\x62\x6F\x72\x64\x65\x72\x43\x6F\x6C\x6F\x72","\x23\x65\x35\x65\x35\x65\x35","\x62\x6F\x72\x64\x65\x72\x54\x6F\x70\x57\x69\x64\x74\x68","\x31\x70\x78","\x62\x6F\x72\x64\x65\x72\x4C\x65\x66\x74\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72\x52\x69\x67\x68\x74\x57\x69\x64\x74\x68","\x30\x70\x78","\x62\x6F\x72\x64\x65\x72\x42\x6F\x74\x74\x6F\x6D\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72","\x76\x61\x6C\x69\x64\x61\x74\x65","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x68\x69\x64\x64\x65\x6E","\x61\x75\x74\x6F","\x49\x53\x5F\x49\x45","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x75\x72\x6C\x28","\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x6E\x6F\x64\x65","\x49\x53\x5F\x49\x45\x36","\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x2F\x67\x72\x61\x70\x68\x65\x64\x69\x74\x6F\x72\x2D\x69\x65\x36\x2E\x63\x73\x73","\x6C\x69\x6E\x6B","\x6C\x6F\x61\x64\x44\x65\x66\x61\x75\x6C\x74\x42\x75\x6E\x64\x6C\x65","\x61\x64\x64","\x44\x45\x46\x41\x55\x4C\x54\x5F\x48\x4F\x54\x53\x50\x4F\x54","\x63\x72\x65\x61\x74\x65\x4D\x61\x72\x6B\x65\x72","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x73","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6E\x67","\x53\x48\x41\x44\x4F\x57\x43\x4F\x4C\x4F\x52","\x23\x64\x30\x64\x30\x64\x30","\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x23\x39\x39\x63\x63\x66\x66","\x48\x41\x4E\x44\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x43\x4F\x4C\x4F\x52","\x23\x30\x30\x38\x38\x63\x66","\x56\x45\x52\x54\x45\x58\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x43\x4F\x4C\x4F\x52","\x23\x30\x30\x61\x38\x66\x66","\x4F\x55\x54\x4C\x49\x4E\x45\x5F\x43\x4F\x4C\x4F\x52","\x4F\x55\x54\x4C\x49\x4E\x45\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x4F\x55\x54\x4C\x49\x4E\x45\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x43\x4F\x4C\x4F\x52","\x43\x4F\x4E\x4E\x45\x43\x54\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x23\x63\x65\x65\x37\x66\x66","\x45\x44\x47\x45\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x43\x4F\x4C\x4F\x52","\x44\x45\x46\x41\x55\x4C\x54\x5F\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4C\x4F\x52","\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x47\x55\x49\x44\x45\x5F\x43\x4F\x4C\x4F\x52","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x43\x6F\x6C\x6F\x72","\x23\x63\x30\x63\x30\x63\x30","\x64\x65\x66\x61\x75\x6C\x74\x4F\x70\x61\x63\x69\x74\x79","\x63\x72\x65\x61\x74\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x53\x68\x61\x70\x65","\x77\x68\x69\x74\x65","\x23\x63\x61\x63\x61\x63\x61","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x6D\x69\x6E","\x66\x6C\x6F\x6F\x72","\x6D\x61\x78","\x63\x65\x69\x6C","\x70\x61\x6E\x47\x72\x61\x70\x68","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x75\x73\x65\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73\x46\x6F\x72\x50\x61\x6E\x6E\x69\x6E\x67","\x68\x61\x73\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x6D\x61\x72\x67\x69\x6E\x4C\x65\x66\x74","\x70\x78","\x6D\x61\x72\x67\x69\x6E\x54\x6F\x70","\x76\x61\x6C\x69\x64\x61\x74\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x69\x6D\x61\x67\x65","\x73\x72\x63","\x64\x65\x73\x74\x72\x6F\x79","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x6E\x65","\x72\x65\x64\x72\x61\x77","\x72\x65\x64\x72\x61\x77\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x69\x73\x53\x68\x61\x64\x6F\x77","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x54\x52\x49\x43\x54\x48\x54\x4D\x4C","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x69\x6E\x73\x65\x72\x74\x42\x65\x66\x6F\x72\x65","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x2D\x31\x70\x78\x20\x2D\x31\x70\x78","\x64\x62\x6C\x63\x6C\x69\x63\x6B","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x69\x73\x48\x69\x64\x65\x4F\x6E\x48\x6F\x76\x65\x72","\x68\x69\x64\x65","\x69\x73\x4D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x62\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x6D\x69\x6E\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x44\x69\x73\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x70\x6F\x69\x6E\x74\x73","\x69\x73\x44\x61\x73\x68\x65\x64","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x44\x61\x73\x68\x65\x64","\x61\x64\x64\x50\x69\x70\x65","\x73\x70\x6C\x69\x63\x65","\x76\x65\x72\x74\x69\x63\x61\x6C\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x73\x6E\x61\x70\x54\x6F\x54\x65\x72\x6D\x69\x6E\x61\x6C\x73","\x73\x68\x6F\x75\x6C\x64\x52\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x69\x73\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x43\x65\x6C\x6C\x47\x65\x6F\x6D\x65\x74\x72\x79","\x72\x65\x6C\x61\x74\x69\x76\x65","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64\x46\x6F\x72\x45\x76\x65\x6E\x74","\x69\x73\x41\x6C\x74\x44\x6F\x77\x6E","\x61\x64\x64\x49\x74\x65\x6D","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x63\x6F\x6E\x73\x75\x6D\x65","\x67\x65\x74\x49\x6E\x69\x74\x69\x61\x6C\x43\x65\x6C\x6C\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x69\x73\x43\x65\x6C\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x69\x73\x44\x65\x6C\x61\x79\x65\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x44\x65\x6C\x61\x79\x65\x64","\x67\x65\x74\x43\x65\x6C\x6C","\x63\x65\x6C\x6C","\x67\x65\x74\x45\x76\x65\x6E\x74","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x65\x74\x43\x65\x6C\x6C\x46\x6F\x72\x50\x6F\x70\x75\x70\x45\x76\x65\x6E\x74","\x65\x64\x69\x74","\x67\x65\x74\x50\x72\x6F\x70\x65\x72\x74\x79","\x75\x6E\x64\x6F\x61\x62\x6C\x65\x45\x64\x69\x74\x48\x61\x70\x70\x65\x6E\x65\x64","\x67\x65\x74\x56\x69\x65\x77","\x63\x68\x61\x6E\x67\x65\x73","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x46\x6F\x72\x43\x68\x61\x6E\x67\x65\x73","\x67\x65\x74\x53\x74\x61\x74\x65","\x70\x75\x73\x68","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x2F\x67\x65\x6E\x65\x72\x61\x6C\x2E\x78\x6D\x6C","\x6C\x6F\x61\x64\x53\x74\x65\x6E\x63\x69\x6C\x53\x65\x74","\x6C\x69\x62\x72\x61\x72\x69\x65\x73","\x70\x61\x63\x6B\x61\x67\x65\x73","\x67\x65\x74\x53\x74\x65\x6E\x63\x69\x6C","\x73\x74\x65\x6E\x63\x69\x6C\x73","\x67\x65\x74\x42\x61\x73\x65\x6E\x61\x6D\x65\x46\x6F\x72\x53\x74\x65\x6E\x63\x69\x6C","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x2E\x6A\x73","\x6C\x6F\x61\x64","\x67\x65\x74\x54\x65\x78\x74","\x2F","\x2E","\x73\x70\x6C\x69\x74","\x6D\x78\x67\x72\x61\x70\x68","\x67\x65\x74\x58\x6D\x6C","\x70\x61\x72\x73\x65\x53\x74\x65\x6E\x63\x69\x6C\x53\x65\x74","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x6E\x61\x6D\x65","\x6E\x6F\x64\x65\x54\x79\x70\x65","\x4E\x4F\x44\x45\x54\x59\x50\x45\x5F\x45\x4C\x45\x4D\x45\x4E\x54","\x5F","\x72\x65\x70\x6C\x61\x63\x65","\x61\x64\x64\x53\x74\x65\x6E\x63\x69\x6C","\x77","\x68","\x6E\x65\x78\x74\x53\x69\x62\x6C\x69\x6E\x67","\x70\x72\x6F\x64\x75\x63\x65\x72","\x63\x6F\x6E\x73\x75\x6D\x65\x72","\x64\x6F\x6E\x65","\x73\x65\x74\x43\x6F\x6E\x73\x75\x6D\x65\x72","\x65\x78\x65\x63\x75\x74\x65","\x73\x65\x74\x44\x61\x74\x61","\x64\x61\x74\x61","\x65\x72\x72\x6F\x72","\x63\x61\x6E\x63\x65\x6C","\x61\x6C\x65\x72\x74"];var useLocalStorage=(mxClient[_0x290a[0]]|| urlParams[_0x290a[1]]== _0x290a[2])&&  typeof (localStorage)!= _0x290a[3];var fileSupport=window[_0x290a[4]]!= null&& window[_0x290a[5]]!= null&& window[_0x290a[6]]!= null;var touchStyle=mxClient[_0x290a[0]]|| urlParams[_0x290a[7]]== _0x290a[8];var counter=0;try{var op=window;while(op[_0x290a[9]]!= null&& !isNaN(op[_0x290a[9]][_0x290a[10]])){op= op[_0x290a[9]]};if(op!= null){op[_0x290a[10]]++;counter= op[_0x290a[10]]}}catch(e){};Editor= function(){mxEventSource[_0x290a[11]](this);this[_0x290a[12]]();this[_0x290a[13]]();this[_0x290a[14]]=  new Graph();this[_0x290a[15]]=  new mxOutline(this[_0x290a[14]]);this[_0x290a[15]][_0x290a[16]]= true;this[_0x290a[17]]= this[_0x290a[18]]();this[_0x290a[19]]= _0x290a[20];this[_0x290a[21]]= null;this[_0x290a[22]]= function(){return this[_0x290a[21]]|| mxResources[_0x290a[24]](_0x290a[23],[counter])+ _0x290a[25]};this[_0x290a[26]]= function(){return this[_0x290a[21]]};this[_0x290a[27]]= function(_0x8478x6){this[_0x290a[19]]= _0x8478x6;this[_0x290a[29]]( new mxEventObject(_0x290a[28]))};this[_0x290a[30]]= function(){return this[_0x290a[19]]};this[_0x290a[31]]= false;this[_0x290a[32]]= function(){this[_0x290a[31]]= true};this[_0x290a[14]][_0x290a[36]]()[_0x290a[35]](mxEvent.CHANGE,mxUtils[_0x290a[34]](this,function(){this[_0x290a[32]][_0x290a[33]](this,arguments)}));window[_0x290a[37]]= mxUtils[_0x290a[34]](this,function(){if(this[_0x290a[31]]){return mxResources[_0x290a[24]](_0x290a[38])}});this[_0x290a[14]][_0x290a[39]]= false;this[_0x290a[14]][_0x290a[40]]= true;this[_0x290a[14]][_0x290a[41]]= null};mxUtils[_0x290a[42]](Editor,mxEventSource);Editor[_0x290a[44]][_0x290a[43]]= IMAGE_PATH+ _0x290a[45];Editor[_0x290a[44]][_0x290a[46]]= IMAGE_PATH+ _0x290a[47];Editor[_0x290a[44]][_0x290a[48]]= function(_0x8478x7){var _0x8478x8= new mxCodec(_0x8478x7[_0x290a[49]]);if(_0x8478x7[_0x290a[50]]== _0x290a[51]){this[_0x290a[14]][_0x290a[53]][_0x290a[52]]= 1;this[_0x290a[14]][_0x290a[54]]= _0x8478x7[_0x290a[56]](_0x290a[55])!= _0x290a[57];this[_0x290a[14]][_0x290a[59]][_0x290a[58]]= _0x8478x7[_0x290a[56]](_0x290a[60])!= _0x290a[57];this[_0x290a[14]][_0x290a[62]](_0x8478x7[_0x290a[56]](_0x290a[61])!= _0x290a[57]);this[_0x290a[14]][_0x290a[64]](_0x8478x7[_0x290a[56]](_0x290a[63])!= _0x290a[57]);this[_0x290a[14]][_0x290a[65]]= _0x8478x7[_0x290a[56]](_0x290a[66])!= _0x290a[57];this[_0x290a[14]][_0x290a[40]]= _0x8478x7[_0x290a[56]](_0x290a[40])!= _0x290a[57];if(!this[_0x290a[14]][_0x290a[40]]){this[_0x290a[14]][_0x290a[68]][_0x290a[67]]= 0;this[_0x290a[14]][_0x290a[68]][_0x290a[69]]= 0;this[_0x290a[14]][_0x290a[53]][_0x290a[71]][_0x290a[70]]= Number(_0x8478x7[_0x290a[56]](_0x290a[72])|| 0);this[_0x290a[14]][_0x290a[53]][_0x290a[71]][_0x290a[73]]= Number(_0x8478x7[_0x290a[56]](_0x290a[74])|| 0)};this[_0x290a[14]][_0x290a[75]]= _0x8478x7[_0x290a[56]](_0x290a[76])== _0x290a[8];this[_0x290a[14]][_0x290a[77]]= this[_0x290a[14]][_0x290a[75]];this[_0x290a[14]][_0x290a[78]]= this[_0x290a[14]][_0x290a[77]];var _0x8478x9=_0x8478x7[_0x290a[56]](_0x290a[79]);if(_0x8478x9!= null){this[_0x290a[14]][_0x290a[79]]= _0x8478x9}else {this[_0x290a[14]][_0x290a[79]]= 1.5};var _0x8478xa=_0x8478x7[_0x290a[56]](_0x290a[80]);var _0x8478xb=_0x8478x7[_0x290a[56]](_0x290a[81]);if(_0x8478xa!= null&& _0x8478xb!= null){this[_0x290a[14]][_0x290a[82]]=  new mxRectangle(0,0,parseFloat(_0x8478xa),parseFloat(_0x8478xb));this[_0x290a[15]][_0x290a[15]][_0x290a[82]]= this[_0x290a[14]][_0x290a[82]]};var _0x8478xc=_0x8478x7[_0x290a[56]](_0x290a[41]);if(_0x8478xc!= null&& _0x8478xc[_0x290a[83]]> 0){this[_0x290a[14]][_0x290a[41]]= _0x8478xc};_0x8478x8[_0x290a[84]](_0x8478x7,this[_0x290a[14]][_0x290a[36]]());this[_0x290a[85]]()}};Editor[_0x290a[44]][_0x290a[86]]= function(){var _0x8478xd= new mxCodec(mxUtils[_0x290a[87]]());var _0x8478x7=_0x8478xd[_0x290a[88]](this[_0x290a[14]][_0x290a[36]]());if(this[_0x290a[14]][_0x290a[53]][_0x290a[71]][_0x290a[70]]!= 0|| this[_0x290a[14]][_0x290a[53]][_0x290a[71]][_0x290a[73]]!= 0){_0x8478x7[_0x290a[90]](_0x290a[72],Math[_0x290a[89]](this[_0x290a[14]][_0x290a[53]][_0x290a[71]][_0x290a[70]]* 100)/ 100);_0x8478x7[_0x290a[90]](_0x290a[74],Math[_0x290a[89]](this[_0x290a[14]][_0x290a[53]][_0x290a[71]][_0x290a[73]]* 100)/ 100)};_0x8478x7[_0x290a[90]](_0x290a[55],(this[_0x290a[14]][_0x290a[91]]())?_0x290a[8]:_0x290a[57]);_0x8478x7[_0x290a[90]](_0x290a[60],(this[_0x290a[14]][_0x290a[59]][_0x290a[58]])?_0x290a[8]:_0x290a[57]);_0x8478x7[_0x290a[90]](_0x290a[60],(this[_0x290a[14]][_0x290a[59]][_0x290a[58]])?_0x290a[8]:_0x290a[57]);_0x8478x7[_0x290a[90]](_0x290a[61],(this[_0x290a[14]][_0x290a[93]][_0x290a[92]]())?_0x290a[8]:_0x290a[57]);_0x8478x7[_0x290a[90]](_0x290a[63],(this[_0x290a[14]][_0x290a[94]][_0x290a[92]]())?_0x290a[8]:_0x290a[57]);_0x8478x7[_0x290a[90]](_0x290a[66],(this[_0x290a[14]][_0x290a[65]])?_0x290a[8]:_0x290a[57]);_0x8478x7[_0x290a[90]](_0x290a[76],(this[_0x290a[14]][_0x290a[75]])?_0x290a[8]:_0x290a[57]);_0x8478x7[_0x290a[90]](_0x290a[79],this[_0x290a[14]][_0x290a[79]]);_0x8478x7[_0x290a[90]](_0x290a[80],this[_0x290a[14]][_0x290a[82]][_0x290a[95]]);_0x8478x7[_0x290a[90]](_0x290a[81],this[_0x290a[14]][_0x290a[82]][_0x290a[96]]);if(!this[_0x290a[14]][_0x290a[40]]){_0x8478x7[_0x290a[90]](_0x290a[40],_0x290a[57])};if(this[_0x290a[14]][_0x290a[41]]!= null){_0x8478x7[_0x290a[90]](_0x290a[41],this[_0x290a[14]][_0x290a[41]])};return _0x8478x7};Editor[_0x290a[44]][_0x290a[85]]= function(){var _0x8478xe=this[_0x290a[14]];var _0x8478xf=this[_0x290a[15]];if(_0x8478xe[_0x290a[68]]!= null&& _0x8478xf[_0x290a[15]][_0x290a[68]]!= null){if(_0x8478xe[_0x290a[41]]!= null){if(_0x8478xe[_0x290a[41]]== _0x290a[97]){_0x8478xe[_0x290a[68]][_0x290a[99]][_0x290a[98]]= _0x290a[100]}else {if(_0x8478xe[_0x290a[53]][_0x290a[101]]!= null){_0x8478xe[_0x290a[53]][_0x290a[101]][_0x290a[102]]= _0x8478xe[_0x290a[41]];_0x8478xe[_0x290a[53]][_0x290a[101]][_0x290a[103]]()};_0x8478xe[_0x290a[68]][_0x290a[99]][_0x290a[98]]= _0x8478xe[_0x290a[41]]}}else {_0x8478xe[_0x290a[68]][_0x290a[99]][_0x290a[98]]= _0x290a[20]};if(_0x8478xe[_0x290a[75]]){_0x8478xe[_0x290a[68]][_0x290a[99]][_0x290a[98]]= _0x290a[104];_0x8478xe[_0x290a[68]][_0x290a[99]][_0x290a[105]]= _0x290a[106];_0x8478xe[_0x290a[68]][_0x290a[99]][_0x290a[107]]= _0x290a[108];_0x8478xe[_0x290a[68]][_0x290a[99]][_0x290a[109]]= _0x290a[110];_0x8478xe[_0x290a[68]][_0x290a[99]][_0x290a[111]]= _0x290a[110];_0x8478xe[_0x290a[68]][_0x290a[99]][_0x290a[112]]= _0x290a[113];_0x8478xe[_0x290a[68]][_0x290a[99]][_0x290a[114]]= _0x290a[113]}else {_0x8478xe[_0x290a[68]][_0x290a[99]][_0x290a[115]]= _0x290a[20]};_0x8478xf[_0x290a[15]][_0x290a[68]][_0x290a[99]][_0x290a[98]]= _0x8478xe[_0x290a[68]][_0x290a[99]][_0x290a[98]];if(_0x8478xf[_0x290a[15]][_0x290a[75]]!= _0x8478xe[_0x290a[75]]|| _0x8478xf[_0x290a[15]][_0x290a[79]]!= _0x8478xe[_0x290a[79]]){_0x8478xf[_0x290a[15]][_0x290a[79]]= _0x8478xe[_0x290a[79]];_0x8478xf[_0x290a[15]][_0x290a[75]]= _0x8478xe[_0x290a[75]];_0x8478xf[_0x290a[15]][_0x290a[53]][_0x290a[116]]()};if(_0x8478xe[_0x290a[40]]&& _0x8478xe[_0x290a[68]][_0x290a[99]][_0x290a[117]]== _0x290a[118]&&  !touchStyle){_0x8478xe[_0x290a[68]][_0x290a[99]][_0x290a[117]]= _0x290a[119]}else {if(!_0x8478xe[_0x290a[40]]|| touchStyle){_0x8478xe[_0x290a[68]][_0x290a[99]][_0x290a[117]]= _0x290a[118]}};var _0x8478x10=(mxClient[_0x290a[120]]&& document[_0x290a[121]]>= 9)?_0x290a[122]+ this[_0x290a[46]]+ _0x290a[123]:_0x290a[97];_0x8478xe[_0x290a[68]][_0x290a[99]][_0x290a[124]]= (!_0x8478xe[_0x290a[75]]&& _0x8478xe[_0x290a[91]]())?_0x290a[122]+ this[_0x290a[43]]+ _0x290a[123]:_0x8478x10;if(_0x8478xe[_0x290a[53]][_0x290a[101]]!= null){_0x8478xe[_0x290a[53]][_0x290a[101]][_0x290a[125]][_0x290a[99]][_0x290a[124]]= (this[_0x290a[14]][_0x290a[91]]())?_0x290a[122]+ this[_0x290a[43]]+ _0x290a[123]:_0x290a[97]}}};Editor[_0x290a[44]][_0x290a[12]]= function(){if(mxClient[_0x290a[126]]){mxClient[_0x290a[129]](_0x290a[127],CSS_PATH+ _0x290a[128])};mxResources[_0x290a[130]]= false;mxResources[_0x290a[131]](RESOURCE_BASE);mxConstants[_0x290a[132]]= 0.3;var _0x8478x11=mxConnectionHandler[_0x290a[44]][_0x290a[133]];mxConnectionHandler[_0x290a[44]][_0x290a[133]]= function(){var _0x8478x12=_0x8478x11[_0x290a[33]](this,arguments);_0x8478x12[_0x290a[134]]= mxUtils[_0x290a[34]](this,function(_0x8478x13,_0x8478x14){if(this[_0x290a[135]]()){return true};return mxCellMarker[_0x290a[44]][_0x290a[134]][_0x290a[33]](_0x8478x12,arguments)});return _0x8478x12};mxConstants[_0x290a[136]]= _0x290a[137];mxConstants[_0x290a[138]]= _0x290a[139];mxConstants[_0x290a[140]]= _0x290a[141];mxConstants[_0x290a[142]]= _0x290a[143];mxConstants[_0x290a[144]]= _0x290a[143];mxConstants[_0x290a[145]]= _0x290a[139];mxConstants[_0x290a[146]]= _0x290a[143];mxConstants[_0x290a[147]]= _0x290a[148];mxConstants[_0x290a[149]]= _0x290a[143];mxConstants[_0x290a[150]]= _0x290a[143];mxConstants[_0x290a[151]]= _0x290a[148];mxConstants[_0x290a[152]]= _0x290a[141];mxGraph[_0x290a[44]][_0x290a[153]]= _0x290a[154];mxGraph[_0x290a[44]][_0x290a[79]]= 1;mxRubberband[_0x290a[44]][_0x290a[155]]= 30;mxGraphView[_0x290a[44]][_0x290a[156]]= function(_0x8478x15){return  new mxRectangleShape(_0x8478x15,this[_0x290a[14]][_0x290a[41]]|| _0x290a[157],_0x290a[158])};mxGraphView[_0x290a[44]][_0x290a[159]]= function(){var _0x8478x16=this[_0x290a[160]]();var _0x8478x17=(_0x8478x16[_0x290a[95]]> 0)?_0x8478x16[_0x290a[70]]/ this[_0x290a[52]]- this[_0x290a[71]][_0x290a[70]]:0;var _0x8478x18=(_0x8478x16[_0x290a[96]]> 0)?_0x8478x16[_0x290a[73]]/ this[_0x290a[52]]- this[_0x290a[71]][_0x290a[73]]:0;var _0x8478x19=_0x8478x16[_0x290a[95]]/ this[_0x290a[52]];var _0x8478x1a=_0x8478x16[_0x290a[96]]/ this[_0x290a[52]];var _0x8478x1b=this[_0x290a[14]][_0x290a[82]];var _0x8478x9=this[_0x290a[14]][_0x290a[79]];var _0x8478xa=_0x8478x1b[_0x290a[95]]* _0x8478x9;var _0x8478xb=_0x8478x1b[_0x290a[96]]* _0x8478x9;var _0x8478x1c=Math[_0x290a[162]](Math[_0x290a[161]](0,_0x8478x17)/ _0x8478xa);var _0x8478x1d=Math[_0x290a[162]](Math[_0x290a[161]](0,_0x8478x18)/ _0x8478xb);var _0x8478x1e=Math[_0x290a[164]](Math[_0x290a[163]](1,_0x8478x17+ _0x8478x19)/ _0x8478xa);var _0x8478x1f=Math[_0x290a[164]](Math[_0x290a[163]](1,_0x8478x18+ _0x8478x1a)/ _0x8478xb);var _0x8478x20=_0x8478x1e- _0x8478x1c;var _0x8478x21=_0x8478x1f- _0x8478x1d;var _0x8478x15= new mxRectangle(this[_0x290a[52]]* (this[_0x290a[71]][_0x290a[70]]+ _0x8478x1c* _0x8478xa),this[_0x290a[52]]* (this[_0x290a[71]][_0x290a[73]]+ _0x8478x1d* _0x8478xb),this[_0x290a[52]]* _0x8478x20* _0x8478xa,this[_0x290a[52]]* _0x8478x21* _0x8478xb);return _0x8478x15};var _0x8478x22=mxGraph[_0x290a[44]][_0x290a[165]];mxGraph[_0x290a[44]][_0x290a[165]]= function(_0x8478x23,_0x8478x24){_0x8478x22[_0x290a[33]](this,arguments);if((this[_0x290a[166]]!= mxConstants[_0x290a[167]]&& this[_0x290a[53]][_0x290a[101]]!= null)&& (!this[_0x290a[168]]|| !mxUtils[_0x290a[169]](this[_0x290a[68]]))){this[_0x290a[53]][_0x290a[101]][_0x290a[125]][_0x290a[99]][_0x290a[170]]= _0x8478x23+ _0x290a[171];this[_0x290a[53]][_0x290a[101]][_0x290a[125]][_0x290a[99]][_0x290a[172]]= _0x8478x24+ _0x290a[171]}};var _0x8478x25=this;mxGraphView[_0x290a[44]][_0x290a[173]]= function(){var _0x8478xc=this[_0x290a[14]][_0x290a[174]]();if(_0x8478xc!= null){if(this[_0x290a[124]]== null|| this[_0x290a[124]][_0x290a[175]]!= _0x8478xc[_0x290a[176]]){if(this[_0x290a[124]]!= null){this[_0x290a[124]][_0x290a[177]]()};var _0x8478x15= new mxRectangle(0,0,1,1);this[_0x290a[124]]=  new mxImageShape(_0x8478x15,_0x8478xc[_0x290a[176]]);this[_0x290a[124]][_0x290a[166]]= this[_0x290a[14]][_0x290a[166]];this[_0x290a[124]][_0x290a[12]](this[_0x290a[178]]);this[_0x290a[124]][_0x290a[179]]()};this[_0x290a[180]](this[_0x290a[124]],_0x8478xc)}else {if(this[_0x290a[124]]!= null){this[_0x290a[124]][_0x290a[177]]();this[_0x290a[124]]= null}};if(this[_0x290a[14]][_0x290a[75]]){var _0x8478x15=this[_0x290a[159]]();if(this[_0x290a[101]]== null){this[_0x290a[101]]= this[_0x290a[156]](_0x8478x15);this[_0x290a[101]][_0x290a[52]]= 1;this[_0x290a[101]][_0x290a[181]]= true;this[_0x290a[101]][_0x290a[166]]= mxConstants[_0x290a[182]];this[_0x290a[101]][_0x290a[12]](this[_0x290a[14]][_0x290a[68]]);this[_0x290a[14]][_0x290a[68]][_0x290a[184]][_0x290a[99]][_0x290a[183]]= _0x290a[185];this[_0x290a[14]][_0x290a[68]][_0x290a[186]](this[_0x290a[101]][_0x290a[125]],this[_0x290a[14]][_0x290a[68]][_0x290a[184]]);this[_0x290a[101]][_0x290a[179]]();this[_0x290a[101]][_0x290a[125]][_0x290a[187]]= _0x290a[188];this[_0x290a[101]][_0x290a[125]][_0x290a[99]][_0x290a[189]]= _0x290a[190];mxEvent[_0x290a[35]](this[_0x290a[101]][_0x290a[125]],_0x290a[191],mxUtils[_0x290a[34]](this,function(_0x8478x14){this[_0x290a[14]][_0x290a[192]](_0x8478x14)}));mxEvent[_0x290a[198]](this[_0x290a[101]][_0x290a[125]],mxUtils[_0x290a[34]](this,function(_0x8478x14){this[_0x290a[14]][_0x290a[193]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x8478x14))}),mxUtils[_0x290a[34]](this,function(_0x8478x14){if(this[_0x290a[14]][_0x290a[93]]!= null&& this[_0x290a[14]][_0x290a[93]][_0x290a[194]]()){this[_0x290a[14]][_0x290a[93]][_0x290a[195]]()};if(this[_0x290a[14]][_0x290a[196]]&& !mxEvent[_0x290a[197]](_0x8478x14)){this[_0x290a[14]][_0x290a[193]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x8478x14))}}),mxUtils[_0x290a[34]](this,function(_0x8478x14){this[_0x290a[14]][_0x290a[193]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x8478x14))}))}else {this[_0x290a[101]][_0x290a[52]]= 1;this[_0x290a[101]][_0x290a[199]]= _0x8478x15;this[_0x290a[101]][_0x290a[179]]()};this[_0x290a[101]][_0x290a[125]][_0x290a[99]][_0x290a[124]]= (this[_0x290a[14]][_0x290a[91]]())?_0x290a[122]+ _0x8478x25[_0x290a[43]]+ _0x290a[123]:_0x290a[97]}else {if(this[_0x290a[101]]!= null){this[_0x290a[101]][_0x290a[177]]();this[_0x290a[101]]= null}}};mxGraph[_0x290a[44]][_0x290a[200]]= function(_0x8478x26,_0x8478x27,_0x8478x28){var _0x8478x29=this[_0x290a[53]][_0x290a[52]];var _0x8478x2a=this[_0x290a[53]][_0x290a[71]];var _0x8478x1b=this[_0x290a[82]];var _0x8478x9=_0x8478x29* this[_0x290a[79]];var _0x8478x2b=this[_0x290a[53]][_0x290a[159]]();_0x8478x27= _0x8478x2b[_0x290a[95]];_0x8478x28= _0x8478x2b[_0x290a[96]];var _0x8478x15= new mxRectangle(_0x8478x29* _0x8478x2a[_0x290a[70]],_0x8478x29* _0x8478x2a[_0x290a[73]],_0x8478x1b[_0x290a[95]]* _0x8478x9,_0x8478x1b[_0x290a[96]]* _0x8478x9);_0x8478x26= _0x8478x26&& Math[_0x290a[161]](_0x8478x15[_0x290a[95]],_0x8478x15[_0x290a[96]])> this[_0x290a[201]];var _0x8478x2c=(_0x8478x26)?Math[_0x290a[164]](_0x8478x27/ _0x8478x15[_0x290a[95]])- 1:0;var _0x8478x2d=(_0x8478x26)?Math[_0x290a[164]](_0x8478x28/ _0x8478x15[_0x290a[96]])- 1:0;var _0x8478x2e=_0x8478x2b[_0x290a[70]]+ _0x8478x27;var _0x8478x2f=_0x8478x2b[_0x290a[73]]+ _0x8478x28;if(this[_0x290a[202]]== null&& _0x8478x2c> 0){this[_0x290a[202]]= []};if(this[_0x290a[202]]!= null){for(var _0x8478x30=0;_0x8478x30<= _0x8478x2c;_0x8478x30++){var _0x8478x31=[ new mxPoint(_0x8478x2b[_0x290a[70]]+ (_0x8478x30+ 1)* _0x8478x15[_0x290a[95]],_0x8478x2b[_0x290a[73]]), new mxPoint(_0x8478x2b[_0x290a[70]]+ (_0x8478x30+ 1)* _0x8478x15[_0x290a[95]],_0x8478x2f)];if(this[_0x290a[202]][_0x8478x30]!= null){this[_0x290a[202]][_0x8478x30][_0x290a[52]]= 1;this[_0x290a[202]][_0x8478x30][_0x290a[203]]= _0x8478x31;this[_0x290a[202]][_0x8478x30][_0x290a[179]]()}else {var _0x8478x32= new mxPolyline(_0x8478x31,this[_0x290a[153]],this[_0x290a[52]]);_0x8478x32[_0x290a[166]]= this[_0x290a[166]];_0x8478x32[_0x290a[204]]= this[_0x290a[205]];_0x8478x32[_0x290a[206]]= false;_0x8478x32[_0x290a[52]]= _0x8478x29;_0x8478x32[_0x290a[12]](this[_0x290a[53]][_0x290a[178]]);_0x8478x32[_0x290a[179]]();this[_0x290a[202]][_0x8478x30]= _0x8478x32}};for(var _0x8478x30=_0x8478x2c;_0x8478x30< this[_0x290a[202]][_0x290a[83]];_0x8478x30++){this[_0x290a[202]][_0x8478x30][_0x290a[177]]()};this[_0x290a[202]][_0x290a[207]](_0x8478x2c,this[_0x290a[202]][_0x290a[83]]- _0x8478x2c)};if(this[_0x290a[208]]== null&& _0x8478x2d> 0){this[_0x290a[208]]= []};if(this[_0x290a[208]]!= null){for(var _0x8478x30=0;_0x8478x30<= _0x8478x2d;_0x8478x30++){var _0x8478x31=[ new mxPoint(_0x8478x2b[_0x290a[70]],_0x8478x2b[_0x290a[73]]+ (_0x8478x30+ 1)* _0x8478x15[_0x290a[96]]), new mxPoint(_0x8478x2e,_0x8478x2b[_0x290a[73]]+ (_0x8478x30+ 1)* _0x8478x15[_0x290a[96]])];if(this[_0x290a[208]][_0x8478x30]!= null){this[_0x290a[208]][_0x8478x30][_0x290a[52]]= 1;this[_0x290a[208]][_0x8478x30][_0x290a[203]]= _0x8478x31;this[_0x290a[208]][_0x8478x30][_0x290a[179]]()}else {var _0x8478x32= new mxPolyline(_0x8478x31,this[_0x290a[153]],_0x8478x29);_0x8478x32[_0x290a[166]]= this[_0x290a[166]];_0x8478x32[_0x290a[204]]= this[_0x290a[205]];_0x8478x32[_0x290a[206]]= false;_0x8478x32[_0x290a[52]]= _0x8478x29;_0x8478x32[_0x290a[12]](this[_0x290a[53]][_0x290a[178]]);_0x8478x32[_0x290a[179]]();this[_0x290a[208]][_0x8478x30]= _0x8478x32}};for(var _0x8478x30=_0x8478x2d;_0x8478x30< this[_0x290a[208]][_0x290a[83]];_0x8478x30++){this[_0x290a[208]][_0x8478x30][_0x290a[177]]()};this[_0x290a[208]][_0x290a[207]](_0x8478x2d,this[_0x290a[208]][_0x290a[83]]- _0x8478x2d)}};mxEdgeHandler[_0x290a[44]][_0x290a[209]]= true;mxGraphHandler[_0x290a[44]][_0x290a[58]]= true;var _0x8478x33=mxGraphHandler[_0x290a[44]][_0x290a[210]];mxGraphHandler[_0x290a[44]][_0x290a[210]]= function(_0x8478x34,_0x8478x35,_0x8478x14){for(var _0x8478x30=0;_0x8478x30< _0x8478x35[_0x290a[83]];_0x8478x30++){if(this[_0x290a[14]][_0x290a[36]]()[_0x290a[211]](_0x8478x35[_0x8478x30])){var _0x8478x36=this[_0x290a[14]][_0x290a[212]](_0x8478x35[_0x8478x30]);if(_0x8478x36!= null&& _0x8478x36[_0x290a[213]]){return false}}};return _0x8478x33[_0x290a[33]](this,arguments)};mxGuide[_0x290a[44]][_0x290a[214]]= function(_0x8478x14){return !mxEvent[_0x290a[215]](_0x8478x14)};mxPopupMenuAddItem= mxPopupMenu[_0x290a[44]][_0x290a[216]];mxPopupMenu[_0x290a[44]][_0x290a[216]]= function(_0x8478x37,_0x8478x38,_0x8478x39,_0x8478x34,_0x8478x3a,_0x8478x3b){var _0x8478x3c=mxPopupMenuAddItem[_0x290a[33]](this,arguments);if(_0x8478x3b!= null&&  !_0x8478x3b){mxEvent[_0x290a[35]](_0x8478x3c,_0x290a[217],function(_0x8478x14){mxEvent[_0x290a[218]](_0x8478x14)})};return _0x8478x3c};var _0x8478x3d=mxGraphHandler[_0x290a[44]][_0x290a[219]];mxGraphHandler[_0x290a[44]][_0x290a[219]]= function(_0x8478x3e){var _0x8478x3f=this[_0x290a[14]][_0x290a[36]]();var _0x8478x40=_0x8478x3f[_0x290a[221]](this[_0x290a[14]][_0x290a[220]]());var _0x8478x41=_0x8478x3d[_0x290a[33]](this,arguments);var _0x8478x34=_0x8478x3f[_0x290a[221]](_0x8478x41);if(_0x8478x40== null|| (_0x8478x40!= _0x8478x41&& _0x8478x40!= _0x8478x34)){while(!this[_0x290a[14]][_0x290a[222]](_0x8478x41)&& !this[_0x290a[14]][_0x290a[222]](_0x8478x34)&& _0x8478x3f[_0x290a[211]](_0x8478x34)&& !this[_0x290a[14]][_0x290a[223]](_0x8478x34)){_0x8478x41= _0x8478x34;_0x8478x34= this[_0x290a[14]][_0x290a[36]]()[_0x290a[221]](_0x8478x41)}};return _0x8478x41};var _0x8478x42=mxGraphHandler[_0x290a[44]][_0x290a[224]];mxGraphHandler[_0x290a[44]][_0x290a[224]]= function(_0x8478x41){var _0x8478x3c=_0x8478x42[_0x290a[33]](this,arguments);var _0x8478x3f=this[_0x290a[14]][_0x290a[36]]();var _0x8478x40=_0x8478x3f[_0x290a[221]](this[_0x290a[14]][_0x290a[220]]());var _0x8478x34=_0x8478x3f[_0x290a[221]](_0x8478x41);if(_0x8478x40== null|| (_0x8478x40!= _0x8478x41&& _0x8478x40!= _0x8478x34)){if(!this[_0x290a[14]][_0x290a[222]](_0x8478x41)&& _0x8478x3f[_0x290a[211]](_0x8478x34)&& !this[_0x290a[14]][_0x290a[223]](_0x8478x34)){_0x8478x3c= true}};return _0x8478x3c};mxGraphHandler[_0x290a[44]][_0x290a[225]]= function(_0x8478x3e){var _0x8478x41=_0x8478x3e[_0x290a[226]]();if(_0x8478x41== null){_0x8478x41= this[_0x290a[227]]};var _0x8478x3f=this[_0x290a[14]][_0x290a[36]]();var _0x8478x34=_0x8478x3f[_0x290a[221]](_0x8478x41);while(this[_0x290a[14]][_0x290a[222]](_0x8478x41)&& _0x8478x3f[_0x290a[211]](_0x8478x34)&& !this[_0x290a[14]][_0x290a[223]](_0x8478x34)){_0x8478x41= _0x8478x34;_0x8478x34= _0x8478x3f[_0x290a[221]](_0x8478x41)};this[_0x290a[14]][_0x290a[229]](_0x8478x41,_0x8478x3e[_0x290a[228]]())};mxPanningHandler[_0x290a[44]][_0x290a[230]]= function(_0x8478x3e){var _0x8478x41=_0x8478x3e[_0x290a[226]]();var _0x8478x3f=this[_0x290a[14]][_0x290a[36]]();var _0x8478x34=_0x8478x3f[_0x290a[221]](_0x8478x41);while(_0x8478x3f[_0x290a[211]](_0x8478x34)&& !this[_0x290a[14]][_0x290a[223]](_0x8478x34)){if(this[_0x290a[14]][_0x290a[222]](_0x8478x34)){_0x8478x41= _0x8478x34};_0x8478x34= _0x8478x3f[_0x290a[221]](_0x8478x34)};return _0x8478x41}};Editor[_0x290a[44]][_0x290a[18]]= function(){var _0x8478xe=this[_0x290a[14]];var _0x8478x43= new mxUndoManager();var _0x8478x44=function(_0x8478x45,_0x8478x14){_0x8478x43[_0x290a[233]](_0x8478x14[_0x290a[232]](_0x290a[231]))};_0x8478xe[_0x290a[36]]()[_0x290a[35]](mxEvent.UNDO,_0x8478x44);_0x8478xe[_0x290a[234]]()[_0x290a[35]](mxEvent.UNDO,_0x8478x44);var _0x8478x46=function(_0x8478x45,_0x8478x14){var _0x8478x47=_0x8478xe[_0x290a[236]](_0x8478x14[_0x290a[232]](_0x290a[231])[_0x290a[235]]);var _0x8478x35=[];for(var _0x8478x30=1;_0x8478x30< _0x8478x47[_0x290a[83]];_0x8478x30++){if(_0x8478xe[_0x290a[53]][_0x290a[237]](_0x8478x47[_0x8478x30])!= null){_0x8478x35[_0x290a[238]](_0x8478x47[_0x8478x30])}};_0x8478xe[_0x290a[239]](_0x8478x35)};_0x8478x43[_0x290a[35]](mxEvent.UNDO,_0x8478x46);_0x8478x43[_0x290a[35]](mxEvent.REDO,_0x8478x46);return _0x8478x43};Editor[_0x290a[44]][_0x290a[13]]= function(){mxStencilRegistry[_0x290a[241]](STENCIL_PATH+ _0x290a[240])};(function(){mxStencilRegistry[_0x290a[242]]= {};mxStencilRegistry[_0x290a[243]]= [];mxStencilRegistry[_0x290a[244]]= function(_0x8478x48){var _0x8478x3c=mxStencilRegistry[_0x290a[245]][_0x8478x48];if(_0x8478x3c== null){var _0x8478x49=mxStencilRegistry[_0x290a[246]](_0x8478x48);if(_0x8478x49!= null){var _0x8478x4a=mxStencilRegistry[_0x290a[242]][_0x8478x49];if(_0x8478x4a!= null){if(mxStencilRegistry[_0x290a[243]][_0x8478x49]== null){mxStencilRegistry[_0x290a[243]][_0x8478x49]= 1;for(var _0x8478x30=0;_0x8478x30< _0x8478x4a[_0x290a[83]];_0x8478x30++){var _0x8478x4b=_0x8478x4a[_0x8478x30];if(_0x8478x4b[_0x290a[248]]()[_0x290a[247]](_0x8478x4b[_0x290a[83]]- 4,_0x8478x4b[_0x290a[83]])== _0x290a[25]){mxStencilRegistry[_0x290a[241]](_0x8478x4b,null)}else {if(_0x8478x4b[_0x290a[248]]()[_0x290a[247]](_0x8478x4b[_0x290a[83]]- 3,_0x8478x4b[_0x290a[83]])== _0x290a[249]){var _0x8478x4c=mxUtils[_0x290a[250]](_0x8478x4b);if(_0x8478x4c!= null){eval[_0x290a[11]](window,_0x8478x4c[_0x290a[251]]())}}else {}}}}}else {mxStencilRegistry[_0x290a[241]](STENCIL_PATH+ _0x290a[252]+ _0x8478x49+ _0x290a[25],null)};_0x8478x3c= mxStencilRegistry[_0x290a[245]][_0x8478x48]}};return _0x8478x3c};mxStencilRegistry[_0x290a[246]]= function(_0x8478x48){var _0x8478x4d=_0x8478x48[_0x290a[254]](_0x290a[253]);var _0x8478x4e=null;if(_0x8478x4d[_0x290a[83]]> 0&& _0x8478x4d[0]== _0x290a[255]){_0x8478x4e= _0x8478x4d[1];for(var _0x8478x30=2;_0x8478x30< _0x8478x4d[_0x290a[83]]- 1;_0x8478x30++){_0x8478x4e+= _0x290a[252]+ _0x8478x4d[_0x8478x30]}};return _0x8478x4e};mxStencilRegistry[_0x290a[241]]= function(_0x8478x4f,_0x8478x50,_0x8478x51){_0x8478x51= (_0x8478x51!= null)?_0x8478x51:false;var _0x8478x52=mxStencilRegistry[_0x290a[243]][_0x8478x4f];if(_0x8478x51|| _0x8478x52== null){var _0x8478x53=false;if(_0x8478x52== null){var _0x8478x4c=mxUtils[_0x290a[250]](_0x8478x4f);_0x8478x52= _0x8478x4c[_0x290a[256]]();mxStencilRegistry[_0x290a[243]][_0x8478x4f]= _0x8478x52;_0x8478x53= true};mxStencilRegistry[_0x290a[257]](_0x8478x52,_0x8478x50,_0x8478x53)}};mxStencilRegistry[_0x290a[257]]= function(_0x8478x54,_0x8478x50,_0x8478x53){_0x8478x53= (_0x8478x53!= null)?_0x8478x53:true;var _0x8478x55=_0x8478x54[_0x290a[258]];var _0x8478x56=_0x8478x55[_0x290a[184]];var _0x8478x57=_0x290a[20];var _0x8478x48=_0x8478x55[_0x290a[56]](_0x290a[259]);if(_0x8478x48!= null){_0x8478x57= _0x8478x48+ _0x290a[253]};while(_0x8478x56!= null){if(_0x8478x56[_0x290a[260]]== mxConstants[_0x290a[261]]){_0x8478x48= _0x8478x56[_0x290a[56]](_0x290a[259]);if(_0x8478x48!= null){_0x8478x57= _0x8478x57[_0x290a[248]]();var _0x8478x58=_0x8478x48[_0x290a[263]](/ /g,_0x290a[262]);if(_0x8478x53){mxStencilRegistry[_0x290a[264]](_0x8478x57+ _0x8478x58[_0x290a[248]](), new mxStencil(_0x8478x56))};if(_0x8478x50!= null){var _0x8478x19=_0x8478x56[_0x290a[56]](_0x290a[265]);var _0x8478x1a=_0x8478x56[_0x290a[56]](_0x290a[266]);_0x8478x19= (_0x8478x19== null)?80:parseInt(_0x8478x19,10);_0x8478x1a= (_0x8478x1a== null)?80:parseInt(_0x8478x1a,10);_0x8478x50(_0x8478x57,_0x8478x58,_0x8478x48,_0x8478x19,_0x8478x1a)}}};_0x8478x56= _0x8478x56[_0x290a[267]]}}})();OpenFile= function(_0x8478x59){this[_0x290a[268]]= null;this[_0x290a[269]]= null;this[_0x290a[270]]= _0x8478x59};OpenFile[_0x290a[44]][_0x290a[271]]= function(_0x8478x6){this[_0x290a[269]]= _0x8478x6;this[_0x290a[272]]()};OpenFile[_0x290a[44]][_0x290a[273]]= function(_0x8478x6,_0x8478x5a){this[_0x290a[274]]= _0x8478x6;this[_0x290a[21]]= _0x8478x5a;this[_0x290a[272]]()};OpenFile[_0x290a[44]][_0x290a[275]]= function(_0x8478x5b){this[_0x290a[276]]();mxUtils[_0x290a[277]](_0x8478x5b)};OpenFile[_0x290a[44]][_0x290a[272]]= function(){if(this[_0x290a[269]]!= null&& this[_0x290a[274]]!= null){this[_0x290a[269]](this[_0x290a[274]],this[_0x290a[21]]);this[_0x290a[276]]()}};OpenFile[_0x290a[44]][_0x290a[276]]= function(){if(this[_0x290a[270]]!= null){this[_0x290a[270]]()}}
\ No newline at end of file
diff --git a/public/assets/plugins/jscripty/js/EditorUi.js b/public/assets/plugins/jscripty/js/EditorUi.js
index 8d5d72b..3c98f01 100644
--- a/public/assets/plugins/jscripty/js/EditorUi.js
+++ b/public/assets/plugins/jscripty/js/EditorUi.js
@@ -1,1345 +1 @@
-/**
- * $Id: EditorUi.js,v 1.21 2013/03/14 20:46:36 david Exp $
- * Copyright (c) 2006-2012, JGraph Ltd
- */
-/**
- * Constructs a new graph editor
- */
-EditorUi = function(editor, container) {
-	this.editor = editor || new Editor();
-	this.container = container || document.getElementById('geEditor');
-	var graph = editor.graph;
-	var self = this;
-
-	// Disables scrollbars
-	this.container.style.overflow = 'hidden';
-
-	// Pre-fetches submenu image
-	new Image().src = mxPopupMenu.prototype.submenuImage;
-
-	// Pre-fetches connect image
-	if (mxConnectionHandler.prototype.connectImage != null) {
-		new Image().src = mxConnectionHandler.prototype.connectImage.src;
-	}
-
-	// Creates the user interface
-	this.actions = new Actions(this);
-	this.menus = new Menus(this);
-	this.createDivs();
-	this.refresh();
-	this.createUi();
-
-	// Disables HTML and text selection
-	var textEditing = mxUtils.bind(this, function(evt) {
-		if (evt == null) {
-			evt = window.event;
-		}
-
-		if (this.isSelectionAllowed(evt)) {
-			return true;
-		}
-
-		return graph.isEditing();
-	});
-
-	// Disables text selection while not editing and no dialog visible
-	if (this.container == document.body) {
-		this.menubarContainer.onselectstart = textEditing;
-		this.menubarContainer.onmousedown = textEditing;
-		this.toolbarContainer.onselectstart = textEditing;
-		this.toolbarContainer.onmousedown = textEditing;
-		this.diagramContainer.onselectstart = textEditing;
-		this.diagramContainer.onmousedown = textEditing;
-		this.sidebarContainer.onselectstart = textEditing;
-		this.sidebarContainer.onmousedown = textEditing;
-		this.footerContainer.onselectstart = textEditing;
-		this.footerContainer.onmousedown = textEditing;
-	}
-
-	// And uses built-in context menu while editing
-	if (mxClient.IS_IE && (typeof(document.documentMode) === 'undefined' ||
-			document.documentMode < 9)) {
-		mxEvent.addListener(this.diagramContainer, 'contextmenu', textEditing);
-		mxEvent.addListener(this.sidebarContainer, 'contextmenu', textEditing);
-	} else {
-		// Allows browser context menu outside of diagram and sidebar
-		this.diagramContainer.oncontextmenu = textEditing;
-		this.sidebarContainer.oncontextmenu = textEditing;
-	}
-
-	// Contains the main graph instance inside the given panel
-	graph.init(this.diagramContainer);
-	graph.refresh();
-
-	// Enables scrollbars and sets cursor style for the container
-	graph.container.setAttribute('tabindex', '0');
-	// graph.container.style.overflow = (touchStyle) ? 'hidden' : 'auto';
-	graph.container.style.cursor = 'default';
-	graph.container.style.backgroundImage = 'url(' + editor.gridImage + ')';
-	graph.container.style.backgroundPosition = '-1px -1px';
-	graph.container.focus();
-
-	// Keeps graph container focused on mouse down
-	var graphFireMouseEvent = graph.fireMouseEvent;
-	graph.fireMouseEvent = function(evtName, me, sender) {
-		if (evtName == mxEvent.MOUSE_DOWN) {
-			this.container.focus();
-		}
-
-		graphFireMouseEvent.apply(this, arguments);
-	};
-
-	// Giuseppe Careri
-	// Defines invalid connections along with the error messages that they produce.
-
-	this.createMultiplicities(graph.multiplicities, ['start', 'end', 'input',
-		'question', 'email'
-	], [
-		[1, 1],
-		[0, 0],
-		[1, 1],
-		[1, 'n'],
-		[1, 'n']
-	], [
-		[0, 0],
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n']
-
-	]);
-
-
-	// Giuseppe Careri
-	// Processes a doubleclick on an optional cell and fires a <dblclick> event.
-	// The event is fired initially.
-	// If the graph is enabled and the event has not been consumed, then <edit> is called with the given cell.
-	// The event is ignored if no cell was specified.
-	graph.dblClick = function(evt, cell) {
-		var edges = ['question'];
-		var mxe = new mxEventObject(mxEvent.DOUBLE_CLICK, 'event', evt, 'cell',
-			cell);
-		this.fireEvent(mxe);
-
-		if (this.isEnabled() && !mxEvent.isConsumed(evt) && !mxe.isConsumed()) {
-			// Override dblClick Vertices and Edges
-			if (this.getModel().isEdge(cell)) {
-				if (edges.indexOf(cell.source.value.tagName) >= 0)
-					this.startEditingAtCell(cell);
-			} else if (this.getModel().isVertex(cell)) {
-				console.log(self);
-				console.log(cell);
-				self.showDialog(new GeneralDialog(self, cell).container, 320, 280, true,
-					true);
-			}
-			mxe.consume();
-		}
-	}
-
-	// Configures automatic expand on mouseover
-	graph.panningHandler.autoExpand = true;
-
-	// Installs context menu
-	graph.panningHandler.factoryMethod = mxUtils.bind(this, function(menu, cell,
-		evt) {
-		this.menus.createPopupMenu(menu, cell, evt);
-	});
-
-	// Initializes the outline
-	editor.outline.init(this.outlineContainer);
-
-	// Hides context menu
-	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt) {
-		graph.panningHandler.hideMenu();
-	}));
-
-	// Adds gesture handling (pinch to zoom)
-	if (mxClient.IS_TOUCH) {
-		mxEvent.addListener(graph.container, 'gesturechange',
-			mxUtils.bind(this, function(evt) {
-				graph.view.getDrawPane().setAttribute('transform', 'scale(' + evt.scale +
-					')');
-				graph.view.getOverlayPane().style.visibility = 'hidden';
-			})
-		);
-
-		mxEvent.addListener(graph.container, 'gestureend',
-			mxUtils.bind(this, function(evt) {
-				graph.view.getDrawPane().removeAttribute('transform');
-				graph.zoomToCenter = true;
-				graph.zoom(evt.scale);
-				graph.view.getOverlayPane().style.visibility = 'visible';
-			})
-		);
-	}
-
-	// Create handler for key events
-	var keyHandler = this.createKeyHandler(editor);
-
-	// Getter for key handler
-	this.getKeyHandler = function() {
-		return keyHandler;
-	};
-
-	// Updates the editor UI after the window has been resized
-	mxEvent.addListener(window, 'resize', mxUtils.bind(this, function() {
-		this.refresh();
-		graph.sizeDidChange();
-		this.editor.outline.update(false);
-		this.editor.outline.outline.sizeDidChange();
-	}));
-
-	// Updates action and menu states
-	this.init();
-	this.open();
-};
-
-/**
- * Specifies the size of the split bar.
- */
-EditorUi.prototype.splitSize = (mxClient.IS_TOUCH) ? 16 : 8;
-
-/**
- * Specifies the height of the menubar. Default is 34.
- */
-EditorUi.prototype.menubarHeight = 33;
-
-/**
- * Specifies the height of the toolbar. Default is 36.
- */
-EditorUi.prototype.toolbarHeight = 36;
-
-/**
- * Specifies the height of the footer. Default is 28.
- */
-EditorUi.prototype.footerHeight = 28;
-
-/**
- * Specifies the position of the horizontal split bar. Default is 212.
- */
-EditorUi.prototype.hsplitPosition = 204;
-
-/**
- * Specifies the position of the vertical split bar. Default is 190.
- */
-EditorUi.prototype.vsplitPosition = 190;
-
-/**
- * Installs the listeners to update the action states.
- */
-EditorUi.prototype.init = function() {
-	// Updates action states
-	this.addUndoListener();
-	this.addSelectionListener();
-
-	// Overrides clipboard to update paste action state
-	var paste = this.actions.get('paste');
-
-	var updatePaste = function() {
-		paste.setEnabled(!mxClipboard.isEmpty());
-	};
-
-	var mxClipboardCut = mxClipboard.cut;
-	mxClipboard.cut = function() {
-		mxClipboardCut.apply(this, arguments);
-		updatePaste();
-	};
-
-	var mxClipboardCopy = mxClipboard.copy;
-	mxClipboard.copy = function() {
-		mxClipboardCopy.apply(this, arguments);
-		updatePaste();
-	};
-};
-
-/**
- * Hook for allowing selection and context menu for certain events.
- */
-EditorUi.prototype.isSelectionAllowed = function(evt) {
-	return false;
-};
-
-/**
- * Opens the current diagram via the window.opener if one exists.
- */
-EditorUi.prototype.open = function() {
-	// Cross-domain window access is not allowed in FF, so if we
-	// were opened from another domain then this will fail.
-	try {
-		if (window.opener != null && window.opener.openFile != null) {
-			window.opener.openFile.setConsumer(mxUtils.bind(this, function(xml,
-				filename) {
-				try {
-					var doc = mxUtils.parseXml(xml);
-					this.editor.setGraphXml(doc.documentElement);
-					this.editor.modified = false;
-					this.editor.undoManager.clear();
-
-					if (filename != null) {
-						this.editor.filename = filename;
-					}
-				} catch (e) {
-					mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);
-				}
-			}));
-		}
-	} catch (e) {
-		// ignore
-	}
-};
-
-/**
- * Giuseppe Careri
- * Opens the current diagram via string.
- */
-EditorUi.prototype.openString = function(xml, filename, data) {
-	try {
-		var doc = mxUtils.parseXml(xml);
-		this.editor.setGraphXml(doc.documentElement);
-		this.editor.modified = false;
-		this.editor.undoManager.clear();
-
-		if (filename != null) {
-			this.editor.filename = filename;
-		}
-
-		if (data != null) {
-			this.editor.data = data;
-		}
-	} catch (e) {
-		mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);
-	}
-};
-
-/**
- * Saves As the current graph under the given project name.
- */
-EditorUi.prototype.new = function(name) {
-	var editor = this.editor;
-
-	if (name != null) {
-		var xml = mxUtils.getPrettyXml(this.editor.getGraphXml());
-		try {
-			if (useLocalStorage) {
-				if (localStorage.getItem(name) != null &&
-					!mxUtils.confirm(mxResources.get('replace', [name]))) {
-					return;
-				}
-
-				localStorage.setItem(name, xml);
-				this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
-			} else {
-				console.log(xml.length);
-				console.log(MAX_REQUEST_SIZE);
-				if (xml.length < MAX_REQUEST_SIZE) {
-					xml = encodeURIComponent(xml);
-					name = encodeURIComponent(name);
-
-					var xhr = new XMLHttpRequest();
-					xhr.open("POST", SAVE_URL, true);
-					xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-					xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
-					xhr.onload = function(e) {
-						if (xhr.readyState === 4) {
-							if (xhr.status === 201) {
-								editor.setStatus('Project ' + JSON.parse(xhr.response).name +
-									' is opening in new window!');
-								setTimeout(function() {
-									window.open('jscripty/projects/view/' + JSON.parse(xhr.response).id,
-										'_blank');
-								}, 1500);
-							} else {
-								try {
-									var response = JSON.parse(xhr.response);
-									editor.setStatus('Error creating project: ' + response.errors[0].message);
-								} catch (e) {
-									editor.setStatus('Error creating project' + ' (' + xhr.status + ' ' + xhr.statusText + ')');
-								}
-							}
-						}
-					};
-					xhr.onerror = function(e) {
-						mxUtils.alert(xhr.statusText);
-					};
-					xhr.send('description=project_new&name=' + name);
-				} else {
-					mxUtils.alert(mxResources.get('drawingTooLarge'));
-					mxUtils.popup(xml);
-
-					return;
-				}
-			}
-
-			this.editor.filename = name;
-			this.editor.modified = false;
-		} catch (e) {
-			this.editor.setStatus('Error creating project');
-		}
-	} else {
-		this.editor.setStatus('Error creating project');
-	}
-};
-
-
-/**
- * Saves the current graph under the given project name.
- */
-EditorUi.prototype.save = function(name) {
-	var editor = this.editor;
-
-	if (name != null) {
-		var xml = mxUtils.getPrettyXml(this.editor.getGraphXml());
-		try {
-			if (useLocalStorage) {
-				if (localStorage.getItem(name) != null &&
-					!mxUtils.confirm(mxResources.get('replace', [name]))) {
-					return;
-				}
-
-				localStorage.setItem(name, xml);
-				this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
-			} else {
-				console.log(xml.length);
-				console.log(MAX_REQUEST_SIZE);
-				if (xml.length < MAX_REQUEST_SIZE) {
-					xml = encodeURIComponent(xml);
-
-					var xhr = new XMLHttpRequest();
-					xhr.open("PUT", SAVE_URL + this.editor.data.id, true);
-					xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-					xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
-					xhr.onload = function(e) {
-						if (xhr.readyState === 4) {
-							if (xhr.status === 200) {
-								editor.setStatus('Updated at ' + JSON.parse(xhr.response).updatedAt +
-									' (' + xhr.status + ' ' + xhr.statusText + ')');
-							} else {
-								try {
-									var response = JSON.parse(xhr.response);
-									editor.setStatus('Error saving project: ' + response.errors[0].message);
-								} catch (e) {
-									editor.setStatus('Error saving project' + ' (' + xhr.status + ' ' + xhr.statusText + ')');
-								}
-							}
-						}
-					};
-					xhr.onerror = function(e) {
-						mxUtils.alert(xhr.statusText);
-					};
-					xhr.send('draft=' + xml);
-				} else {
-					mxUtils.alert(mxResources.get('drawingTooLarge'));
-					mxUtils.popup(xml);
-
-					return;
-				}
-			}
-
-			this.editor.filename = name;
-			this.editor.modified = false;
-		} catch (e) {
-			this.editor.setStatus('Error saving file');
-		}
-	} else {
-		this.editor.setStatus('Error saving file');
-	}
-};
-
-/**
- * Saves As the current graph under the given project name.
- */
-EditorUi.prototype.saveAs = function(name) {
-	var editor = this.editor;
-	console.log(name);
-	if (name != null) {
-		var xml = mxUtils.getPrettyXml(this.editor.getGraphXml());
-		try {
-			if (useLocalStorage) {
-				if (localStorage.getItem(name) != null &&
-					!mxUtils.confirm(mxResources.get('replace', [name]))) {
-					return;
-				}
-
-				localStorage.setItem(name, xml);
-				this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
-			} else {
-				console.log(xml.length);
-				console.log(MAX_REQUEST_SIZE);
-				if (xml.length < MAX_REQUEST_SIZE) {
-					xml = encodeURIComponent(xml);
-					name = encodeURIComponent(name);
-
-					var xhr = new XMLHttpRequest();
-					xhr.open("POST", SAVE_URL, true);
-					xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-					xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
-					xhr.onload = function(e) {
-						if (xhr.readyState === 4) {
-							if (xhr.status === 201) {
-								editor.setStatus('Project ' + JSON.parse(xhr.response).name +
-									' is opening in new window!');
-								setTimeout(function() {
-									window.open('jscripty/project/' + JSON.parse(xhr.response).id,
-										'_blank');
-								}, 1500);
-							} else {
-								try {
-									var response = JSON.parse(xhr.response);
-									editor.setStatus('Error cloning project: ' + response.errors[0].message);
-								} catch (e) {
-									editor.setStatus('Error cloning project' + ' (' + xhr.status + ' ' + xhr.statusText + ')');
-								}
-							}
-						}
-					};
-					xhr.onerror = function(e) {
-						mxUtils.alert(xhr.statusText);
-					};
-					xhr.send('description=project_cloned&name=' + name +
-						'&draft=' + xml + '&production=' + xml);
-				} else {
-					mxUtils.alert(mxResources.get('drawingTooLarge'));
-					mxUtils.popup(xml);
-
-					return;
-				}
-			}
-
-			this.editor.filename = name;
-			this.editor.modified = false;
-		} catch (e) {
-			this.editor.setStatus('Error saving file');
-		}
-	} else {
-		this.editor.setStatus('Error saving file');
-	}
-};
-
-/**
- * Plush the current graph under the given project name.
- */
-EditorUi.prototype.validate = function(a, b) {
-	var graph = this.editor.graph;
-	a = null != a ? a : graph.model.getRoot();
-	b = null != b ? b : {};
-	for (var c = !0, d = graph.model.getChildCount(a), e = 0; e < d; e++) {
-		var f = graph.model.getChildAt(a, e),
-			g = b;
-		graph.isValidRoot(f) && (g = {});
-		g = this.validate(f, g);
-		null != g ? graph.setCellWarning(f, g.replace(/\n/g, "\x3cbr\x3e")) : graph.setCellWarning(f, null);
-		c = c && null == g
-	}
-	d = "";
-	if (graph.model.isVertex(a)) {
-		switch (a.value.nodeName) {
-			case 'question':
-				d = (a.value.getAttribute('question') !== "") ? "" :
-					'Question can not be empty' + "\n";
-				d += (a.value.getAttribute('label') !== "") ? "" : 'Label can not be empty' + "\n";
-
-				break;
-			case 'input':
-				d = (a.value.getAttribute('question') !== "") ? "" : 'Question can not be empty' + "\n";
-				d += (a.value.getAttribute('label') !== "") ? "" : 'Label can not be empty' + "\n";
-
-				break;
-			case 'start':
-				d = this.validateBlock('start') ? '' : "Only one Start block is allowed" + "\n";
-				d += (a.value.getAttribute('label') !== "") ? "" : 'Label can not be empty' + "\n";
-
-				break;
-		}
-	}
-
-	if (graph.model.isEdge(a)) {
-		var z = graph.model.getCell(a.source.getId());
-		switch (z.value.nodeName) {
-			case 'question':
-				// var patt = /^[a-zA-Z0-9][a-zA-Z0-9\s]*$/;
-				var str = String(a.getValue());
-				console.log(str);
-				if (str === 'null' || str === 'undefined') {
-					d = "Value can not be empty" + "\n";
-				} else {
-					var result = str.split(",");
-					result.forEach(function(entry, key) {
-						d = d + ((entry.trim() !== "") ? "" : 'Value' + (key + 1) + ' can not be empty' + "\n");
-					});
-				}
-				// console.log(a.getValue());
-				// if ((str == 'undefined') || (str == 'null')) {
-				// 	str = ' ';
-				// }
-				// d = ((a.getValue() !== "") && (a.getValue() !== 'undefined') && (a.getValue() !== null)) ? '' : "Value can not be empty" + "\n";
-				// d = d + ((patt.test(str.trim())) ? "" : 'Value can not be empty' + "\n");
-				//
-				// res.forEach(function(entry) {
-				// d = d + ((patt.test(entry.trim())) ? "" : 'Can not be empty' + "\n");
-				// });
-				break;
-
-		}
-	}
-
-	graph.isCellCollapsed(a) && !c && (d += (mxResources.get(graph.containsValidationErrorsResource) || graph.containsValidationErrorsResource) + "\n");
-	d = graph.model.isEdge(a) ? d + (graph.getEdgeValidationError(a, graph.model.getTerminal(a, !0), graph.model.getTerminal(a, !1)) || "") : d + (graph.getCellValidationError(a) || "");
-	e = graph.validateCell(a, b);
-	null != e && (d += e);
-	null == graph.model.getParent(a) && graph.view.validate();
-	return 0 < d.length || !c ? d : null
-}
-
-EditorUi.prototype.validateBlock = function(blockName) {
-	var graph = this.editor.graph;
-	var parent = graph.getDefaultParent();
-	var count = 0;
-	// var model = graph.getModel();
-	//We can also use model.getChildren(parent)
-	parent.children.forEach(function(n) {
-		if (graph.model.isVertex(n) && n.value.nodeName == blockName) {
-			count++;
-		}
-	});
-	return count > 1 ? false : true;
-}
-
-EditorUi.prototype.publish = function(name) {
-
-	var editor = this.editor;
-
-	if (name != null) {
-
-		var response = this.validate();
-		if (response === null) {
-			var xml = mxUtils.getPrettyXml(this.editor.getGraphXml());
-			try {
-				if (useLocalStorage) {
-					if (localStorage.getItem(name) != null &&
-						!mxUtils.confirm(mxResources.get('replace', [name]))) {
-						return;
-					}
-
-					localStorage.setItem(name, xml);
-					this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
-				} else {
-					console.log(xml.length);
-					console.log(MAX_REQUEST_SIZE);
-					if (xml.length < MAX_REQUEST_SIZE) {
-						xml = encodeURIComponent(xml);
-
-						var xhr = new XMLHttpRequest();
-						xhr.open("PUT", SAVE_URL + this.editor.data.id, true);
-						xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-						xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
-						xhr.onload = function(e) {
-							if (xhr.readyState === 4) {
-								if (xhr.status === 200) {
-									editor.setStatus('Published at ' + JSON.parse(xhr.response).updatedAt +
-										' (' + xhr.status + ' ' + xhr.statusText + ')');
-								} else {
-									try {
-										var response = JSON.parse(xhr.response);
-										editor.setStatus('Error publishing project: ' + response.errors[0].message);
-									} catch (e) {
-										editor.setStatus('Error publishing project' + ' (' + xhr.status + ' ' + xhr.statusText + ')');
-									}
-								}
-							}
-						};
-						xhr.onerror = function(e) {
-							mxUtils.alert(xhr.statusText);
-						};
-						xhr.send('draft=' + xml + '&production=' + xml);
-					} else {
-						mxUtils.alert(mxResources.get('drawingTooLarge'));
-						mxUtils.popup(xml);
-
-						return;
-					}
-				}
-
-				this.editor.filename = name;
-				this.editor.modified = false;
-			} catch (e) {
-				this.editor.setStatus('Error publishing file');
-			}
-		} else {
-			editor.setStatus('Error publishing project: ');
-		}
-	} else {
-		this.editor.setStatus('Error publishing file');
-	}
-	// }
-
-
-
-};
-
-/**
- * Create variable
- */
-EditorUi.prototype.variable = function(name) {
-	var editor = this.editor;
-
-	if (name != null) {
-		try {
-
-			var xhr = new XMLHttpRequest();
-			xhr.open("POST", VARIABLE_URL, true);
-			xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-			xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
-			xhr.onload = function(e) {
-				if (xhr.readyState === 4) {
-					if (xhr.status === 201) {
-						editor.setStatus('Variable created at ' + JSON.parse(xhr.response).createdAt +
-							' (' + xhr.status + ' ' + xhr.statusText + ')');
-					} else {
-						try {
-							var response = JSON.parse(xhr.response);
-							editor.setStatus('Error creating variable: ' + response.errors[0].message);
-						} catch (e) {
-							editor.setStatus('Error creating variable' + ' (' + xhr.status + ' ' + xhr.statusText + ')');
-						}
-					}
-				}
-			};
-			xhr.onerror = function(e) {
-				mxUtils.alert(xhr.statusText);
-			};
-			xhr.send('name=' + name);
-		} catch (e) {
-			this.editor.setStatus('Error creating variable');
-		}
-	} else {
-		this.editor.setStatus('Error creating variable');
-	}
-};
-
-/**
- * Returns the URL for a copy of this editor with no state.
- */
-EditorUi.prototype.getUrl = function(pathname) {
-	var href = (pathname != null) ? pathname : window.location.pathname;
-	var parms = (href.indexOf('?') > 0) ? 1 : 0;
-
-	// Removes template URL parameter for new blank diagram
-	for (var key in urlParams) {
-		if (parms == 0) {
-			href += '?';
-		} else {
-			href += '&';
-		}
-
-		href += key + '=' + urlParams[key];
-		parms++;
-	}
-
-	return href;
-};
-
-/**
- * Updates the states of the given undo/redo items.
- */
-EditorUi.prototype.addUndoListener = function() {
-	var undo = this.actions.get('undo');
-	var redo = this.actions.get('redo');
-
-	var undoMgr = this.editor.undoManager;
-
-	var undoListener = function() {
-		undo.setEnabled(undoMgr.canUndo());
-		redo.setEnabled(undoMgr.canRedo());
-	};
-
-	undoMgr.addListener(mxEvent.ADD, undoListener);
-	undoMgr.addListener(mxEvent.UNDO, undoListener);
-	undoMgr.addListener(mxEvent.REDO, undoListener);
-	undoMgr.addListener(mxEvent.CLEAR, undoListener);
-
-	// Updates the button states once
-	undoListener();
-};
-
-/**
- * Updates the states of the given toolbar items based on the selection.
- */
-EditorUi.prototype.addSelectionListener = function() {
-	var selectionListener = mxUtils.bind(this, function() {
-		var graph = this.editor.graph;
-		var selected = !graph.isSelectionEmpty();
-		var vertexSelected = false;
-		var edgeSelected = false;
-
-		var cells = graph.getSelectionCells();
-
-		if (cells != null) {
-			for (var i = 0; i < cells.length; i++) {
-				var cell = cells[i];
-
-				if (graph.getModel().isEdge(cell)) {
-					edgeSelected = true;
-				}
-
-				if (graph.getModel().isVertex(cell)) {
-					vertexSelected = true;
-				}
-
-				if (edgeSelected && vertexSelected) {
-					break;
-				}
-			}
-		}
-
-		// Updates action states
-		var actions = ['cut', 'copy', 'delete', 'duplicate', 'bold', 'italic',
-			'style', 'underline', 'toFront', 'toBack', 'dashed', 'rounded',
-			'shadow',
-			'tilt', 'autosize'
-		];
-
-		for (var i = 0; i < actions.length; i++) {
-			this.actions.get(actions[i]).setEnabled(selected);
-		}
-
-		this.actions.get('curved').setEnabled(edgeSelected);
-		this.actions.get('rotation').setEnabled(vertexSelected);
-		this.actions.get('wordWrap').setEnabled(vertexSelected);
-		this.actions.get('group').setEnabled(graph.getSelectionCount() > 1);
-		this.actions.get('ungroup').setEnabled(graph.getSelectionCount() == 1 &&
-			graph.getModel().getChildCount(graph.getSelectionCell()) > 0);
-		var oneVertexSelected = vertexSelected && graph.getSelectionCount() == 1;
-		this.actions.get('removeFromGroup').setEnabled(oneVertexSelected &&
-			graph.getModel().isVertex(graph.getModel().getParent(graph.getSelectionCell()))
-		);
-
-		// Updates menu states
-		var menus = ['fontFamily', 'fontSize', 'alignment', 'position', 'text',
-			'format',
-			'arrange', 'linewidth', 'spacing'
-		];
-
-		for (var i = 0; i < menus.length; i++) {
-			this.menus.get(menus[i]).setEnabled(selected);
-		}
-
-		menus = ['line', 'lineend', 'linestart'];
-
-		for (var i = 0; i < menus.length; i++) {
-			this.menus.get(menus[i]).setEnabled(edgeSelected);
-		}
-
-		this.actions.get('setAsDefaultEdge').setEnabled(edgeSelected);
-
-		this.menus.get('align').setEnabled(graph.getSelectionCount() > 1);
-		this.menus.get('direction').setEnabled(vertexSelected || (edgeSelected &&
-			graph.isLoop(graph.view.getState(graph.getSelectionCell()))));
-		this.menus.get('navigation').setEnabled(graph.foldingEnabled && ((graph.view
-				.currentRoot != null) ||
-			(graph.getSelectionCount() == 1 && graph.isValidRoot(graph.getSelectionCell()))
-		));
-		this.actions.get('home').setEnabled(graph.view.currentRoot != null);
-		this.actions.get('exitGroup').setEnabled(graph.view.currentRoot != null);
-		var groupEnabled = graph.getSelectionCount() == 1 && graph.isValidRoot(
-			graph.getSelectionCell());
-		this.actions.get('enterGroup').setEnabled(groupEnabled);
-		this.actions.get('expand').setEnabled(groupEnabled);
-		this.actions.get('collapse').setEnabled(groupEnabled);
-		this.actions.get('editLink').setEnabled(graph.getSelectionCount() == 1);
-		this.actions.get('openLink').setEnabled(graph.getSelectionCount() == 1 &&
-			graph.getLinkForCell(graph.getSelectionCell()) != null);
-	});
-
-	this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,
-		selectionListener);
-	selectionListener();
-};
-
-/**
- * Refreshes the viewport.
- */
-EditorUi.prototype.refresh = function() {
-	var quirks = mxClient.IS_IE && (document.documentMode == null || document.documentMode ==
-		5);
-	var w = this.container.clientWidth;
-	var h = this.container.clientHeight;
-
-	if (this.container == document.body) {
-		w = document.body.clientWidth || document.documentElement.clientWidth;
-		h = (quirks) ? document.body.clientHeight || document.documentElement.clientHeight :
-			document.documentElement.clientHeight;
-	}
-
-	var effHsplitPosition = Math.max(0, Math.min(this.hsplitPosition, w - this.splitSize -
-		20));
-	var effVsplitPosition = Math.max(0, Math.min(this.vsplitPosition, h - this.menubarHeight -
-		this.toolbarHeight - this.footerHeight - this.splitSize - 1));
-
-	this.menubarContainer.style.height = this.menubarHeight + 'px';
-	this.toolbarContainer.style.top = this.menubarHeight + 'px';
-	this.toolbarContainer.style.height = this.toolbarHeight + 'px';
-
-	var tmp = this.menubarHeight + this.toolbarHeight;
-
-	if (!mxClient.IS_QUIRKS) {
-		tmp += 1;
-	}
-
-	this.sidebarContainer.style.top = tmp + 'px';
-	this.sidebarContainer.style.width = effHsplitPosition + 'px';
-	this.outlineContainer.style.width = effHsplitPosition + 'px';
-	this.outlineContainer.style.height = effVsplitPosition + 'px';
-	this.outlineContainer.style.bottom = this.footerHeight + 'px';
-	this.diagramContainer.style.left = (effHsplitPosition + this.splitSize) +
-		'px';
-	this.diagramContainer.style.top = this.sidebarContainer.style.top;
-	this.footerContainer.style.height = this.footerHeight + 'px';
-	this.footerContainer.style.display = 'none';
-	this.hsplit.style.top = this.sidebarContainer.style.top;
-	this.hsplit.style.bottom = this.outlineContainer.style.bottom;
-	this.hsplit.style.left = effHsplitPosition + 'px';
-	this.vsplit.style.width = this.sidebarContainer.style.width;
-	this.vsplit.style.bottom = (effVsplitPosition + this.footerHeight) + 'px';
-
-	if (quirks) {
-		this.menubarContainer.style.width = w + 'px';
-		this.toolbarContainer.style.width = this.menubarContainer.style.width;
-		var sidebarHeight = (h - effVsplitPosition - this.splitSize - this.footerHeight -
-			this.menubarHeight - this.toolbarHeight);
-		this.sidebarContainer.style.height = sidebarHeight + 'px';
-		this.diagramContainer.style.width = (w - effHsplitPosition - this.splitSize) +
-			'px';
-		var diagramHeight = (h - this.footerHeight - this.menubarHeight - this.toolbarHeight);
-		this.diagramContainer.style.height = diagramHeight + 'px';
-		this.footerContainer.style.width = this.menubarContainer.style.width;
-		this.hsplit.style.height = diagramHeight + 'px';
-	} else {
-		this.sidebarContainer.style.bottom = (effVsplitPosition + this.splitSize +
-			this.footerHeight) + 'px';
-		this.diagramContainer.style.bottom = this.outlineContainer.style.bottom;
-	}
-};
-
-/**
- * Creates the required containers.
- */
-EditorUi.prototype.createDivs = function() {
-	this.menubarContainer = this.createDiv('geMenubarContainer');
-	this.toolbarContainer = this.createDiv('geToolbarContainer');
-	this.sidebarContainer = this.createDiv('geSidebarContainer');
-	this.outlineContainer = this.createDiv('geOutlineContainer');
-	this.diagramContainer = this.createDiv('geDiagramContainer');
-	this.footerContainer = this.createDiv('geFooterContainer');
-	this.hsplit = this.createDiv('geHsplit');
-	this.vsplit = this.createDiv('geVsplit');
-
-	// Sets static style for containers
-	this.menubarContainer.style.top = '0px';
-	this.menubarContainer.style.left = '0px';
-	this.menubarContainer.style.right = '0px';
-	this.toolbarContainer.style.left = '0px';
-	this.toolbarContainer.style.right = '0px';
-	this.sidebarContainer.style.left = '0px';
-	this.outlineContainer.style.left = '0px';
-	this.diagramContainer.style.right = '0px';
-	this.footerContainer.style.left = '0px';
-	this.footerContainer.style.right = '0px';
-	this.footerContainer.style.bottom = '0px';
-	this.vsplit.style.left = '0px';
-	this.vsplit.style.height = this.splitSize + 'px';
-	this.hsplit.style.width = this.splitSize + 'px';
-};
-
-/**
- * Creates the required containers.
- */
-EditorUi.prototype.createUi = function() {
-	// Creates menubar
-	this.menubar = this.menus.createMenubar(this.createDiv('geMenubar'));
-	this.menubarContainer.appendChild(this.menubar.container);
-
-	// Creates toolbar
-	this.toolbar = this.createToolbar(this.createDiv('geToolbar'));
-	this.toolbarContainer.appendChild(this.toolbar.container);
-
-	// Creates the sidebar
-	this.sidebar = this.createSidebar(this.sidebarContainer);
-
-	// Creates the footer
-	this.footerContainer.appendChild(this.createFooter());
-
-	// Adds status bar in menubar
-	this.statusContainer = this.createStatusContainer();
-
-	// Connects the status bar to the editor status
-	this.editor.addListener('statusChanged', mxUtils.bind(this, function() {
-		this.setStatusText(this.editor.getStatus());
-	}));
-
-	this.setStatusText(this.editor.getStatus());
-	this.menubar.container.appendChild(this.statusContainer);
-
-	// Inserts into DOM
-	this.container.appendChild(this.menubarContainer);
-	this.container.appendChild(this.toolbarContainer);
-	this.container.appendChild(this.sidebarContainer);
-	this.container.appendChild(this.outlineContainer);
-	this.container.appendChild(this.diagramContainer);
-	this.container.appendChild(this.footerContainer);
-	this.container.appendChild(this.hsplit);
-	this.container.appendChild(this.vsplit);
-
-	// HSplit
-	this.addSplitHandler(this.hsplit, true, 0, mxUtils.bind(this, function(
-		value) {
-		this.hsplitPosition = value;
-		this.refresh();
-		this.editor.graph.sizeDidChange();
-		this.editor.outline.update(false);
-		this.editor.outline.outline.sizeDidChange();
-	}));
-
-	// VSplit
-	this.addSplitHandler(this.vsplit, false, this.footerHeight, mxUtils.bind(
-		this,
-		function(value) {
-			this.vsplitPosition = value;
-			this.refresh();
-			this.editor.outline.update(false);
-			this.editor.outline.outline.sizeDidChange();
-		}));
-};
-
-/**
- * Creates a new toolbar for the given container.
- */
-EditorUi.prototype.createStatusContainer = function() {
-	var container = document.createElement('a');
-	container.className = 'geItem geStatus';
-
-	return container;
-};
-
-/**
- * Creates a new toolbar for the given container.
- */
-EditorUi.prototype.createStatusContainer = function() {
-	var container = document.createElement('a');
-	container.className = 'geItem geStatus';
-
-	return container;
-};
-
-/**
- * Creates a new toolbar for the given container.
- */
-EditorUi.prototype.setStatusText = function(value) {
-	this.statusContainer.innerHTML = value;
-};
-
-/**
- * Creates a new toolbar for the given container.
- */
-EditorUi.prototype.createToolbar = function(container) {
-	return new Toolbar(this, container);
-};
-
-/**
- * Creates a new sidebar for the given container.
- */
-EditorUi.prototype.createSidebar = function(container) {
-	return new Sidebar(this, container);
-};
-
-/**
- * Creates and returns a new footer.
- */
-EditorUi.prototype.createFooter = function() {
-	return this.createDiv('geFooter');
-};
-
-/**
- * Creates the actual toolbar for the toolbar container.
- */
-EditorUi.prototype.createDiv = function(classname) {
-	var elt = document.createElement('div');
-	elt.className = classname;
-
-	return elt;
-};
-
-/**
- * Creates the custom header.
- */
-EditorUi.prototype.createHeader = function(classname) {
-	var elt = document.createElement(classname);
-	return elt;
-};
-
-/**
- * Creates the custom header.
- */
-EditorUi.prototype.createForm = function(classname) {
-	var elt = document.createElement('form');
-	elt.className = classname;
-
-	return elt;
-};
-
-/**
- * Updates the states of the given undo/redo items.
- */
-EditorUi.prototype.addSplitHandler = function(elt, horizontal, dx, onChange) {
-	var start = null;
-	var initial = null;
-
-	function getValue() {
-		return parseInt(((horizontal) ? elt.style.left : elt.style.bottom));
-	};
-
-	function moveHandler(evt) {
-		if (start != null) {
-			var pt = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
-			onChange(Math.max(0, initial + ((horizontal) ? (pt.x - start.x) : (start.y -
-				pt.y)) - dx));
-			mxEvent.consume(evt);
-		}
-	};
-
-	function dropHandler(evt) {
-		moveHandler(evt);
-		start = null;
-		initial = null;
-	};
-
-	mxEvent.addGestureListeners(elt, function(evt) {
-		start = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
-		initial = getValue();
-		mxEvent.consume(evt);
-	});
-
-	mxEvent.addListener(document, 'mousemove', moveHandler);
-	mxEvent.addListener(document, 'touchmove', moveHandler);
-	mxEvent.addListener(document, 'mouseup', dropHandler);
-	mxEvent.addListener(document, 'touchend', dropHandler);
-};
-
-/**
- * Displays a print dialog.
- */
-EditorUi.prototype.showDialog = function(elt, w, h, modal, closable, onClose) {
-	this.hideDialog();
-	this.dialog = new Dialog(this, elt, w, (mxClient.IS_VML) ? h - 12 : h,
-		modal,
-		closable, onClose);
-};
-
-/**
- * Displays a print dialog.
- */
-EditorUi.prototype.hideDialog = function() {
-	if (this.dialog != null) {
-		this.dialog.close();
-		this.dialog = null;
-		this.editor.graph.container.focus();
-	}
-};
-
-/**
- * Adds the label menu items to the given menu and parent.
- */
-EditorUi.prototype.saveFile = function(forceDialog) {
-	if (!forceDialog && this.editor.filename != null) {
-		this.save(this.editor.getOrCreateFilename());
-	} else {
-		this.showDialog(new SaveDialog(this).container, 300, 100, true, true);
-	}
-};
-
-/**
- * Adds the label menu items to the given menu and parent.
- */
-EditorUi.prototype.publishFile = function(forceDialog) {
-	if (!forceDialog && this.editor.filename != null) {
-		this.publish(this.editor.getOrCreateFilename());
-	} else {
-		//this.showDialog(new SaveDialog(this).container, 300, 100, true, true);
-	}
-};
-
-/**
- * Executes the given layout.
- */
-EditorUi.prototype.executeLayout = function(layout, animate, ignoreChildCount) {
-	var graph = this.editor.graph;
-	var cell = graph.getSelectionCell();
-
-	// Allow global overridding of animation
-	animate = this.animate != null ? this.animate : animate;
-
-	graph.getModel().beginUpdate();
-	try {
-		layout.execute(graph.getDefaultParent(), cell);
-	} catch (e) {
-		throw e;
-	} finally {
-		// Animates the changes in the graph model except
-		// for Camino, where animation is too slow
-		if (animate && navigator.userAgent.indexOf('Camino') < 0) {
-			// New API for animating graph layout results asynchronously
-			var morph = new mxMorphing(graph);
-			morph.addListener(mxEvent.DONE, mxUtils.bind(this, function() {
-				graph.getModel().endUpdate();
-			}));
-
-			morph.startAnimation();
-		} else {
-			graph.getModel().endUpdate();
-		}
-	}
-};
-
-/**
- * Creates the keyboard event handler for the current graph and history.
- */
-EditorUi.prototype.createKeyHandler = function(editor) {
-	var graph = this.editor.graph;
-	var keyHandler = new mxKeyHandler(graph);
-
-	// Routes command-key to control-key on Mac
-	keyHandler.isControlDown = function(evt) {
-		return mxEvent.isControlDown(evt) || (mxClient.IS_MAC && evt.metaKey);
-	};
-
-	// Helper function to move cells with the cursor keys
-	function nudge(keyCode) {
-		if (!graph.isSelectionEmpty()) {
-			var dx = 0;
-			var dy = 0;
-
-			if (keyCode == 37) {
-				dx = -1;
-			} else if (keyCode == 38) {
-				dy = -1;
-			} else if (keyCode == 39) {
-				dx = 1;
-			} else if (keyCode == 40) {
-				dy = 1;
-			}
-
-			graph.moveCells(graph.getSelectionCells(), dx, dy);
-			graph.scrollCellToVisible(graph.getSelectionCell());
-		}
-	};
-
-	// Binds keystrokes to actions
-	var bindAction = mxUtils.bind(this, function(code, control, key, shift) {
-		var action = this.actions.get(key);
-
-		if (action != null) {
-			var f = function() {
-				if (action.enabled) {
-					action.funct();
-				}
-			};
-
-			if (control) {
-				if (shift) {
-					keyHandler.bindControlShiftKey(code, f);
-				} else {
-					keyHandler.bindControlKey(code, f);
-				}
-			} else {
-				if (shift) {
-					keyHandler.bindShiftKey(code, f);
-				} else {
-					keyHandler.bindKey(code, f);
-				}
-			}
-		}
-	});
-
-	var ui = this;
-	var keyHandleEscape = keyHandler.escape;
-	keyHandler.escape = function(evt) {
-		ui.hideDialog();
-		keyHandleEscape.apply(this, arguments);
-	};
-
-	// Ignores enter keystroke. Remove this line if you want the
-	// enter keystroke to stop editing.
-	keyHandler.enter = function() {};
-	keyHandler.bindKey(8, function() {
-		graph.foldCells(true);
-	}); // Backspace
-	keyHandler.bindKey(13, function() {
-		graph.foldCells(false);
-	}); // Enter
-	keyHandler.bindKey(33, function() {
-		graph.exitGroup();
-	}); // Page Up
-	keyHandler.bindKey(34, function() {
-		graph.enterGroup();
-	}); // Page Down
-	keyHandler.bindKey(36, function() {
-		graph.home();
-	}); // Home
-	keyHandler.bindKey(35, function() {
-		graph.refresh();
-	}); // End
-	keyHandler.bindKey(37, function() {
-		nudge(37);
-	}); // Left arrow
-	keyHandler.bindKey(38, function() {
-		nudge(38);
-	}); // Up arrow
-	keyHandler.bindKey(39, function() {
-		nudge(39);
-	}); // Right arrow
-	keyHandler.bindKey(40, function() {
-		nudge(40);
-	}); // Down arrow
-	keyHandler.bindKey(113, function() {
-		graph.startEditingAtCell();
-	});
-	bindAction(46, false, 'delete'); // Delete
-	bindAction(82, true, 'tilt'); // Ctrl+R
-	bindAction(83, true, 'save'); // Ctrl+S
-	bindAction(83, true, 'saveAs', true); // Ctrl+Shift+S
-	bindAction(107, false, 'zoomIn'); // Add
-	bindAction(109, false, 'zoomOut'); // Subtract
-	bindAction(65, true, 'selectAll'); // Ctrl+A
-	bindAction(86, true, 'selectVertices', true); // Ctrl+Shift+V
-	bindAction(69, true, 'selectEdges', true); // Ctrl+Shift+E
-	bindAction(69, true, 'export'); // Ctrl+Shift+E
-	bindAction(66, true, 'toBack'); // Ctrl+B
-	bindAction(70, true, 'toFront'); // Ctrl+F
-	bindAction(68, true, 'duplicate'); // Ctrl+D
-	bindAction(90, true, 'undo'); // Ctrl+Z
-	bindAction(89, true, 'redo'); // Ctrl+Y
-	bindAction(88, true, 'cut'); // Ctrl+X
-	bindAction(67, true, 'copy'); // Ctrl+C
-	bindAction(81, true, 'connect'); // Ctrl+Q
-	bindAction(86, true, 'paste'); // Ctrl+V
-	bindAction(71, true, 'group'); // Ctrl+G
-	bindAction(71, true, 'grid', true); // Ctrl+Shift+G
-	bindAction(85, true, 'ungroup'); // Ctrl+U
-	bindAction(112, false, 'about'); // F1
-	bindAction(80, true, 'publish', true); // Ctrl+Shift+P
-
-	return keyHandler;
-};
-
-/**
- * Giuseppe Careri
- * Creates a new toolbar for the given container.
- */
-EditorUi.prototype.createMultiplicities = function(graph, cells, source,
-	target) {
-	for (var i = 0; i < cells.length; i++) {
-		graph.push(new mxMultiplicity(true, cells[i], null, null, source[i][0],
-			source[i][1], null, mxResources.get(cells[i]) + ' must have ' + source[i][0] + ' outgoing edge.', null));
-		graph.push(new mxMultiplicity(false, cells[i], null, null, target[i][0],
-			target[i][1], null, mxResources.get(cells[i]) + ' must have ' + target[i][0] + ' incoming edge.', null));
-	};
-};
+var _0x74c6=["\x65\x64\x69\x74\x6F\x72","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x45\x64\x69\x74\x6F\x72","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x67\x72\x61\x70\x68","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x73\x74\x79\x6C\x65","\x68\x69\x64\x64\x65\x6E","\x73\x72\x63","\x73\x75\x62\x6D\x65\x6E\x75\x49\x6D\x61\x67\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x65\x6E\x75\x73","\x63\x72\x65\x61\x74\x65\x44\x69\x76\x73","\x72\x65\x66\x72\x65\x73\x68","\x63\x72\x65\x61\x74\x65\x55\x69","\x65\x76\x65\x6E\x74","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x41\x6C\x6C\x6F\x77\x65\x64","\x69\x73\x45\x64\x69\x74\x69\x6E\x67","\x62\x69\x6E\x64","\x62\x6F\x64\x79","\x6F\x6E\x73\x65\x6C\x65\x63\x74\x73\x74\x61\x72\x74","\x6D\x65\x6E\x75\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6F\x6E\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x74\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x64\x69\x61\x67\x72\x61\x6D\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x69\x64\x65\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x66\x6F\x6F\x74\x65\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x49\x53\x5F\x49\x45","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x63\x6F\x6E\x74\x65\x78\x74\x6D\x65\x6E\x75","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x6F\x6E\x63\x6F\x6E\x74\x65\x78\x74\x6D\x65\x6E\x75","\x69\x6E\x69\x74","\x74\x61\x62\x69\x6E\x64\x65\x78","\x30","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x75\x72\x73\x6F\x72","\x64\x65\x66\x61\x75\x6C\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x67\x72\x69\x64\x49\x6D\x61\x67\x65","\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x2D\x31\x70\x78\x20\x2D\x31\x70\x78","\x66\x6F\x63\x75\x73","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x4D\x4F\x55\x53\x45\x5F\x44\x4F\x57\x4E","\x61\x70\x70\x6C\x79","\x6D\x75\x6C\x74\x69\x70\x6C\x69\x63\x69\x74\x69\x65\x73","\x73\x74\x61\x72\x74","\x65\x6E\x64","\x69\x6E\x70\x75\x74","\x71\x75\x65\x73\x74\x69\x6F\x6E","\x65\x6D\x61\x69\x6C","\x6E","\x63\x72\x65\x61\x74\x65\x4D\x75\x6C\x74\x69\x70\x6C\x69\x63\x69\x74\x69\x65\x73","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x63\x65\x6C\x6C","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x69\x73\x45\x64\x67\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x74\x61\x67\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x73\x6F\x75\x72\x63\x65","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x74\x61\x72\x74\x45\x64\x69\x74\x69\x6E\x67\x41\x74\x43\x65\x6C\x6C","\x69\x73\x56\x65\x72\x74\x65\x78","\x6C\x6F\x67","\x73\x68\x6F\x77\x44\x69\x61\x6C\x6F\x67","\x63\x6F\x6E\x73\x75\x6D\x65","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x66\x61\x63\x74\x6F\x72\x79\x4D\x65\x74\x68\x6F\x64","\x63\x72\x65\x61\x74\x65\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75","\x6F\x75\x74\x6C\x69\x6E\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6F\x75\x74\x6C\x69\x6E\x65","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x67\x65\x73\x74\x75\x72\x65\x63\x68\x61\x6E\x67\x65","\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x73\x63\x61\x6C\x65\x28","\x73\x63\x61\x6C\x65","\x67\x65\x74\x44\x72\x61\x77\x50\x61\x6E\x65","\x76\x69\x65\x77","\x76\x69\x73\x69\x62\x69\x6C\x69\x74\x79","\x67\x65\x74\x4F\x76\x65\x72\x6C\x61\x79\x50\x61\x6E\x65","\x67\x65\x73\x74\x75\x72\x65\x65\x6E\x64","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x7A\x6F\x6F\x6D\x54\x6F\x43\x65\x6E\x74\x65\x72","\x7A\x6F\x6F\x6D","\x76\x69\x73\x69\x62\x6C\x65","\x63\x72\x65\x61\x74\x65\x4B\x65\x79\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x4B\x65\x79\x48\x61\x6E\x64\x6C\x65\x72","\x72\x65\x73\x69\x7A\x65","\x73\x69\x7A\x65\x44\x69\x64\x43\x68\x61\x6E\x67\x65","\x75\x70\x64\x61\x74\x65","\x6F\x70\x65\x6E","\x73\x70\x6C\x69\x74\x53\x69\x7A\x65","\x6D\x65\x6E\x75\x62\x61\x72\x48\x65\x69\x67\x68\x74","\x74\x6F\x6F\x6C\x62\x61\x72\x48\x65\x69\x67\x68\x74","\x66\x6F\x6F\x74\x65\x72\x48\x65\x69\x67\x68\x74","\x68\x73\x70\x6C\x69\x74\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x76\x73\x70\x6C\x69\x74\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x55\x6E\x64\x6F\x4C\x69\x73\x74\x65\x6E\x65\x72","\x61\x64\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x73\x74\x65","\x67\x65\x74","\x69\x73\x45\x6D\x70\x74\x79","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x75\x74","\x63\x6F\x70\x79","\x6F\x70\x65\x6E\x65\x72","\x6F\x70\x65\x6E\x46\x69\x6C\x65","\x70\x61\x72\x73\x65\x58\x6D\x6C","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x73\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x6D\x6F\x64\x69\x66\x69\x65\x64","\x63\x6C\x65\x61\x72","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x69\x6E\x76\x61\x6C\x69\x64\x4F\x72\x4D\x69\x73\x73\x69\x6E\x67\x46\x69\x6C\x65","\x3A\x20","\x6D\x65\x73\x73\x61\x67\x65","\x61\x6C\x65\x72\x74","\x73\x65\x74\x43\x6F\x6E\x73\x75\x6D\x65\x72","\x6F\x70\x65\x6E\x53\x74\x72\x69\x6E\x67","\x64\x61\x74\x61","\x6E\x65\x77","\x67\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x67\x65\x74\x50\x72\x65\x74\x74\x79\x58\x6D\x6C","\x67\x65\x74\x49\x74\x65\x6D","\x72\x65\x70\x6C\x61\x63\x65","\x63\x6F\x6E\x66\x69\x72\x6D","\x73\x65\x74\x49\x74\x65\x6D","\x73\x61\x76\x65\x64","\x20","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x6C\x65\x6E\x67\x74\x68","\x50\x4F\x53\x54","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x65\x61\x72\x65\x72\x20","\x74\x6F\x6B\x65\x6E","\x6F\x6E\x6C\x6F\x61\x64","\x72\x65\x61\x64\x79\x53\x74\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x50\x72\x6F\x6A\x65\x63\x74\x20","\x6E\x61\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x70\x61\x72\x73\x65","\x20\x69\x73\x20\x6F\x70\x65\x6E\x69\x6E\x67\x20\x69\x6E\x20\x6E\x65\x77\x20\x77\x69\x6E\x64\x6F\x77\x21","\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x76\x69\x65\x77\x2F","\x69\x64","\x5F\x62\x6C\x61\x6E\x6B","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x65\x72\x72\x6F\x72\x73","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74","\x20\x28","\x73\x74\x61\x74\x75\x73\x54\x65\x78\x74","\x6F\x6E\x65\x72\x72\x6F\x72","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3D\x70\x72\x6F\x6A\x65\x63\x74\x5F\x6E\x65\x77\x26\x6E\x61\x6D\x65\x3D","\x73\x65\x6E\x64","\x64\x72\x61\x77\x69\x6E\x67\x54\x6F\x6F\x4C\x61\x72\x67\x65","\x70\x6F\x70\x75\x70","\x73\x61\x76\x65","\x50\x55\x54","\x55\x70\x64\x61\x74\x65\x64\x20\x61\x74\x20","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74","\x64\x72\x61\x66\x74\x3D","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x66\x69\x6C\x65","\x73\x61\x76\x65\x41\x73","\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x2F","\x45\x72\x72\x6F\x72\x20\x63\x6C\x6F\x6E\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x45\x72\x72\x6F\x72\x20\x63\x6C\x6F\x6E\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3D\x70\x72\x6F\x6A\x65\x63\x74\x5F\x63\x6C\x6F\x6E\x65\x64\x26\x6E\x61\x6D\x65\x3D","\x26\x64\x72\x61\x66\x74\x3D","\x26\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E\x3D","\x76\x61\x6C\x69\x64\x61\x74\x65","\x67\x65\x74\x52\x6F\x6F\x74","\x6D\x6F\x64\x65\x6C","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x6F\x75\x6E\x74","\x67\x65\x74\x43\x68\x69\x6C\x64\x41\x74","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x3C\x62\x72\x3E","\x73\x65\x74\x43\x65\x6C\x6C\x57\x61\x72\x6E\x69\x6E\x67","","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x51\x75\x65\x73\x74\x69\x6F\x6E\x20\x63\x61\x6E\x20\x6E\x6F\x74\x20\x62\x65\x20\x65\x6D\x70\x74\x79","\x0A","\x6C\x61\x62\x65\x6C","\x4C\x61\x62\x65\x6C\x20\x63\x61\x6E\x20\x6E\x6F\x74\x20\x62\x65\x20\x65\x6D\x70\x74\x79","\x76\x61\x6C\x69\x64\x61\x74\x65\x42\x6C\x6F\x63\x6B","\x4F\x6E\x6C\x79\x20\x6F\x6E\x65\x20\x53\x74\x61\x72\x74\x20\x62\x6C\x6F\x63\x6B\x20\x69\x73\x20\x61\x6C\x6C\x6F\x77\x65\x64","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x67\x65\x74\x49\x64","\x67\x65\x74\x43\x65\x6C\x6C","\x67\x65\x74\x56\x61\x6C\x75\x65","\x6E\x75\x6C\x6C","\x56\x61\x6C\x75\x65\x20\x63\x61\x6E\x20\x6E\x6F\x74\x20\x62\x65\x20\x65\x6D\x70\x74\x79","\x2C","\x73\x70\x6C\x69\x74","\x74\x72\x69\x6D","\x56\x61\x6C\x75\x65","\x20\x63\x61\x6E\x20\x6E\x6F\x74\x20\x62\x65\x20\x65\x6D\x70\x74\x79","\x66\x6F\x72\x45\x61\x63\x68","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x6C\x6C\x61\x70\x73\x65\x64","\x63\x6F\x6E\x74\x61\x69\x6E\x73\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72\x73\x52\x65\x73\x6F\x75\x72\x63\x65","\x67\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x67\x65\x74\x45\x64\x67\x65\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72","\x67\x65\x74\x43\x65\x6C\x6C\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72","\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x65\x6C\x6C","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x63\x68\x69\x6C\x64\x72\x65\x6E","\x70\x75\x62\x6C\x69\x73\x68","\x50\x75\x62\x6C\x69\x73\x68\x65\x64\x20\x61\x74\x20","\x45\x72\x72\x6F\x72\x20\x70\x75\x62\x6C\x69\x73\x68\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x45\x72\x72\x6F\x72\x20\x70\x75\x62\x6C\x69\x73\x68\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74","\x45\x72\x72\x6F\x72\x20\x70\x75\x62\x6C\x69\x73\x68\x69\x6E\x67\x20\x66\x69\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64\x20\x61\x74\x20","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x3A\x20","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x6C\x65","\x6E\x61\x6D\x65\x3D","\x67\x65\x74\x55\x72\x6C","\x70\x61\x74\x68\x6E\x61\x6D\x65","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x3F","\x26","\x3D","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x61\x6E\x55\x6E\x64\x6F","\x63\x61\x6E\x52\x65\x64\x6F","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x64\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x74\x6F\x46\x72\x6F\x6E\x74","\x74\x6F\x42\x61\x63\x6B","\x64\x61\x73\x68\x65\x64","\x72\x6F\x75\x6E\x64\x65\x64","\x73\x68\x61\x64\x6F\x77","\x74\x69\x6C\x74","\x61\x75\x74\x6F\x73\x69\x7A\x65","\x63\x75\x72\x76\x65\x64","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x77\x6F\x72\x64\x57\x72\x61\x70","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x67\x72\x6F\x75\x70","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x75\x6E\x67\x72\x6F\x75\x70","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x47\x72\x6F\x75\x70","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x61\x6C\x69\x67\x6E\x6D\x65\x6E\x74","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x74\x65\x78\x74","\x66\x6F\x72\x6D\x61\x74","\x61\x72\x72\x61\x6E\x67\x65","\x6C\x69\x6E\x65\x77\x69\x64\x74\x68","\x73\x70\x61\x63\x69\x6E\x67","\x6C\x69\x6E\x65","\x6C\x69\x6E\x65\x65\x6E\x64","\x6C\x69\x6E\x65\x73\x74\x61\x72\x74","\x73\x65\x74\x41\x73\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x61\x6C\x69\x67\x6E","\x67\x65\x74\x53\x74\x61\x74\x65","\x69\x73\x4C\x6F\x6F\x70","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x63\x75\x72\x72\x65\x6E\x74\x52\x6F\x6F\x74","\x6E\x61\x76\x69\x67\x61\x74\x69\x6F\x6E","\x68\x6F\x6D\x65","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x65\x78\x70\x61\x6E\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x65\x64\x69\x74\x4C\x69\x6E\x6B","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x6F\x70\x65\x6E\x4C\x69\x6E\x6B","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x63\x6C\x69\x65\x6E\x74\x48\x65\x69\x67\x68\x74","\x6D\x69\x6E","\x6D\x61\x78","\x68\x65\x69\x67\x68\x74","\x70\x78","\x74\x6F\x70","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x77\x69\x64\x74\x68","\x62\x6F\x74\x74\x6F\x6D","\x6C\x65\x66\x74","\x64\x69\x73\x70\x6C\x61\x79","\x6E\x6F\x6E\x65","\x68\x73\x70\x6C\x69\x74","\x76\x73\x70\x6C\x69\x74","\x67\x65\x4D\x65\x6E\x75\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x63\x72\x65\x61\x74\x65\x44\x69\x76","\x67\x65\x54\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x53\x69\x64\x65\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x4F\x75\x74\x6C\x69\x6E\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x44\x69\x61\x67\x72\x61\x6D\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x46\x6F\x6F\x74\x65\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x48\x73\x70\x6C\x69\x74","\x67\x65\x56\x73\x70\x6C\x69\x74","\x30\x70\x78","\x72\x69\x67\x68\x74","\x6D\x65\x6E\x75\x62\x61\x72","\x67\x65\x4D\x65\x6E\x75\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x4D\x65\x6E\x75\x62\x61\x72","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x74\x6F\x6F\x6C\x62\x61\x72","\x67\x65\x54\x6F\x6F\x6C\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x54\x6F\x6F\x6C\x62\x61\x72","\x73\x69\x64\x65\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x53\x69\x64\x65\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x46\x6F\x6F\x74\x65\x72","\x73\x74\x61\x74\x75\x73\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x74\x61\x74\x75\x73\x43\x68\x61\x6E\x67\x65\x64","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x65\x74\x53\x74\x61\x74\x75\x73\x54\x65\x78\x74","\x61\x64\x64\x53\x70\x6C\x69\x74\x48\x61\x6E\x64\x6C\x65\x72","\x61","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x49\x74\x65\x6D\x20\x67\x65\x53\x74\x61\x74\x75\x73","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x67\x65\x46\x6F\x6F\x74\x65\x72","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x48\x65\x61\x64\x65\x72","\x63\x72\x65\x61\x74\x65\x46\x6F\x72\x6D","\x66\x6F\x72\x6D","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x78","\x79","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x74\x6F\x75\x63\x68\x6D\x6F\x76\x65","\x6D\x6F\x75\x73\x65\x75\x70","\x74\x6F\x75\x63\x68\x65\x6E\x64","\x68\x69\x64\x65\x44\x69\x61\x6C\x6F\x67","\x64\x69\x61\x6C\x6F\x67","\x49\x53\x5F\x56\x4D\x4C","\x63\x6C\x6F\x73\x65","\x73\x61\x76\x65\x46\x69\x6C\x65","\x67\x65\x74\x4F\x72\x43\x72\x65\x61\x74\x65\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x70\x75\x62\x6C\x69\x73\x68\x46\x69\x6C\x65","\x65\x78\x65\x63\x75\x74\x65\x4C\x61\x79\x6F\x75\x74","\x61\x6E\x69\x6D\x61\x74\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x65\x78\x65\x63\x75\x74\x65","\x43\x61\x6D\x69\x6E\x6F","\x75\x73\x65\x72\x41\x67\x65\x6E\x74","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x72\x74\x41\x6E\x69\x6D\x61\x74\x69\x6F\x6E","\x69\x73\x43\x6F\x6E\x74\x72\x6F\x6C\x44\x6F\x77\x6E","\x49\x53\x5F\x4D\x41\x43","\x6D\x65\x74\x61\x4B\x65\x79","\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x65\x6E\x61\x62\x6C\x65\x64","\x66\x75\x6E\x63\x74","\x62\x69\x6E\x64\x43\x6F\x6E\x74\x72\x6F\x6C\x53\x68\x69\x66\x74\x4B\x65\x79","\x62\x69\x6E\x64\x43\x6F\x6E\x74\x72\x6F\x6C\x4B\x65\x79","\x62\x69\x6E\x64\x53\x68\x69\x66\x74\x4B\x65\x79","\x62\x69\x6E\x64\x4B\x65\x79","\x65\x73\x63\x61\x70\x65","\x65\x6E\x74\x65\x72","\x66\x6F\x6C\x64\x43\x65\x6C\x6C\x73","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x65\x78\x70\x6F\x72\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x67\x72\x69\x64","\x61\x62\x6F\x75\x74","\x20\x6D\x75\x73\x74\x20\x68\x61\x76\x65\x20","\x20\x6F\x75\x74\x67\x6F\x69\x6E\x67\x20\x65\x64\x67\x65\x2E","\x70\x75\x73\x68","\x20\x69\x6E\x63\x6F\x6D\x69\x6E\x67\x20\x65\x64\x67\x65\x2E"];EditorUi= function(_0xb12dx1,_0xb12dx2){this[_0x74c6[0]]= _0xb12dx1||  new Editor();this[_0x74c6[1]]= _0xb12dx2|| document[_0x74c6[3]](_0x74c6[2]);var _0xb12dx3=_0xb12dx1[_0x74c6[4]];var _0xb12dx4=this;this[_0x74c6[1]][_0x74c6[6]][_0x74c6[5]]= _0x74c6[7]; new Image()[_0x74c6[8]]= mxPopupMenu[_0x74c6[10]][_0x74c6[9]];if(mxConnectionHandler[_0x74c6[10]][_0x74c6[11]]!= null){ new Image()[_0x74c6[8]]= mxConnectionHandler[_0x74c6[10]][_0x74c6[11]][_0x74c6[8]]};this[_0x74c6[12]]=  new Actions(this);this[_0x74c6[13]]=  new Menus(this);this[_0x74c6[14]]();this[_0x74c6[15]]();this[_0x74c6[16]]();var _0xb12dx5=mxUtils[_0x74c6[20]](this,function(_0xb12dx6){if(_0xb12dx6== null){_0xb12dx6= window[_0x74c6[17]]};if(this[_0x74c6[18]](_0xb12dx6)){return true};return _0xb12dx3[_0x74c6[19]]()});if(this[_0x74c6[1]]== document[_0x74c6[21]]){this[_0x74c6[23]][_0x74c6[22]]= _0xb12dx5;this[_0x74c6[23]][_0x74c6[24]]= _0xb12dx5;this[_0x74c6[25]][_0x74c6[22]]= _0xb12dx5;this[_0x74c6[25]][_0x74c6[24]]= _0xb12dx5;this[_0x74c6[26]][_0x74c6[22]]= _0xb12dx5;this[_0x74c6[26]][_0x74c6[24]]= _0xb12dx5;this[_0x74c6[27]][_0x74c6[22]]= _0xb12dx5;this[_0x74c6[27]][_0x74c6[24]]= _0xb12dx5;this[_0x74c6[28]][_0x74c6[22]]= _0xb12dx5;this[_0x74c6[28]][_0x74c6[24]]= _0xb12dx5};if(mxClient[_0x74c6[29]]&& ( typeof (document[_0x74c6[30]])=== _0x74c6[31]|| document[_0x74c6[30]]< 9)){mxEvent[_0x74c6[33]](this[_0x74c6[26]],_0x74c6[32],_0xb12dx5);mxEvent[_0x74c6[33]](this[_0x74c6[27]],_0x74c6[32],_0xb12dx5)}else {this[_0x74c6[26]][_0x74c6[34]]= _0xb12dx5;this[_0x74c6[27]][_0x74c6[34]]= _0xb12dx5};_0xb12dx3[_0x74c6[35]](this[_0x74c6[26]]);_0xb12dx3[_0x74c6[15]]();_0xb12dx3[_0x74c6[1]][_0x74c6[38]](_0x74c6[36],_0x74c6[37]);_0xb12dx3[_0x74c6[1]][_0x74c6[6]][_0x74c6[39]]= _0x74c6[40];_0xb12dx3[_0x74c6[1]][_0x74c6[6]][_0x74c6[41]]= _0x74c6[42]+ _0xb12dx1[_0x74c6[43]]+ _0x74c6[44];_0xb12dx3[_0x74c6[1]][_0x74c6[6]][_0x74c6[45]]= _0x74c6[46];_0xb12dx3[_0x74c6[1]][_0x74c6[47]]();var _0xb12dx7=_0xb12dx3[_0x74c6[48]];_0xb12dx3[_0x74c6[48]]= function(_0xb12dx8,_0xb12dx9,_0xb12dxa){if(_0xb12dx8== mxEvent[_0x74c6[49]]){this[_0x74c6[1]][_0x74c6[47]]()};_0xb12dx7[_0x74c6[50]](this,arguments)};this[_0x74c6[58]](_0xb12dx3[_0x74c6[51]],[_0x74c6[52],_0x74c6[53],_0x74c6[54],_0x74c6[55],_0x74c6[56]],[[1,1],[0,0],[1,1],[1,_0x74c6[57]],[1,_0x74c6[57]]],[[0,0],[1,_0x74c6[57]],[1,_0x74c6[57]],[1,_0x74c6[57]],[1,_0x74c6[57]]]);_0xb12dx3[_0x74c6[59]]= function(_0xb12dx6,_0xb12dxb){var _0xb12dxc=[_0x74c6[55]];var _0xb12dxd= new mxEventObject(mxEvent.DOUBLE_CLICK,_0x74c6[17],_0xb12dx6,_0x74c6[60],_0xb12dxb);this[_0x74c6[61]](_0xb12dxd);if(this[_0x74c6[62]]()&& !mxEvent[_0x74c6[63]](_0xb12dx6)&& !_0xb12dxd[_0x74c6[63]]()){if(this[_0x74c6[65]]()[_0x74c6[64]](_0xb12dxb)){if(_0xb12dxc[_0x74c6[69]](_0xb12dxb[_0x74c6[68]][_0x74c6[67]][_0x74c6[66]])>= 0){this[_0x74c6[70]](_0xb12dxb)}}else {if(this[_0x74c6[65]]()[_0x74c6[71]](_0xb12dxb)){console[_0x74c6[72]](_0xb12dx4);console[_0x74c6[72]](_0xb12dxb);_0xb12dx4[_0x74c6[73]]( new GeneralDialog(_0xb12dx4,_0xb12dxb)[_0x74c6[1]],320,280,true,true)}};_0xb12dxd[_0x74c6[74]]()}};_0xb12dx3[_0x74c6[76]][_0x74c6[75]]= true;_0xb12dx3[_0x74c6[76]][_0x74c6[77]]= mxUtils[_0x74c6[20]](this,function(_0xb12dxe,_0xb12dxb,_0xb12dx6){this[_0x74c6[13]][_0x74c6[78]](_0xb12dxe,_0xb12dxb,_0xb12dx6)});_0xb12dx1[_0x74c6[80]][_0x74c6[35]](this[_0x74c6[79]]);mxEvent[_0x74c6[82]](document,mxUtils[_0x74c6[20]](this,function(_0xb12dx6){_0xb12dx3[_0x74c6[76]][_0x74c6[81]]()}));if(mxClient[_0x74c6[83]]){mxEvent[_0x74c6[33]](_0xb12dx3[_0x74c6[1]],_0x74c6[84],mxUtils[_0x74c6[20]](this,function(_0xb12dx6){_0xb12dx3[_0x74c6[89]][_0x74c6[88]]()[_0x74c6[38]](_0x74c6[85],_0x74c6[86]+ _0xb12dx6[_0x74c6[87]]+ _0x74c6[44]);_0xb12dx3[_0x74c6[89]][_0x74c6[91]]()[_0x74c6[6]][_0x74c6[90]]= _0x74c6[7]}));mxEvent[_0x74c6[33]](_0xb12dx3[_0x74c6[1]],_0x74c6[92],mxUtils[_0x74c6[20]](this,function(_0xb12dx6){_0xb12dx3[_0x74c6[89]][_0x74c6[88]]()[_0x74c6[93]](_0x74c6[85]);_0xb12dx3[_0x74c6[94]]= true;_0xb12dx3[_0x74c6[95]](_0xb12dx6[_0x74c6[87]]);_0xb12dx3[_0x74c6[89]][_0x74c6[91]]()[_0x74c6[6]][_0x74c6[90]]= _0x74c6[96]}))};var _0xb12dxf=this[_0x74c6[97]](_0xb12dx1);this[_0x74c6[98]]= function(){return _0xb12dxf};mxEvent[_0x74c6[33]](window,_0x74c6[99],mxUtils[_0x74c6[20]](this,function(){this[_0x74c6[15]]();_0xb12dx3[_0x74c6[100]]();this[_0x74c6[0]][_0x74c6[80]][_0x74c6[101]](false);this[_0x74c6[0]][_0x74c6[80]][_0x74c6[80]][_0x74c6[100]]()}));this[_0x74c6[35]]();this[_0x74c6[102]]()};EditorUi[_0x74c6[10]][_0x74c6[103]]= (mxClient[_0x74c6[83]])?16:8;EditorUi[_0x74c6[10]][_0x74c6[104]]= 33;EditorUi[_0x74c6[10]][_0x74c6[105]]= 36;EditorUi[_0x74c6[10]][_0x74c6[106]]= 28;EditorUi[_0x74c6[10]][_0x74c6[107]]= 204;EditorUi[_0x74c6[10]][_0x74c6[108]]= 190;EditorUi[_0x74c6[10]][_0x74c6[35]]= function(){this[_0x74c6[109]]();this[_0x74c6[110]]();var _0xb12dx10=this[_0x74c6[12]][_0x74c6[112]](_0x74c6[111]);var _0xb12dx11=function(){_0xb12dx10[_0x74c6[114]](!mxClipboard[_0x74c6[113]]())};var _0xb12dx12=mxClipboard[_0x74c6[115]];mxClipboard[_0x74c6[115]]= function(){_0xb12dx12[_0x74c6[50]](this,arguments);_0xb12dx11()};var _0xb12dx13=mxClipboard[_0x74c6[116]];mxClipboard[_0x74c6[116]]= function(){_0xb12dx13[_0x74c6[50]](this,arguments);_0xb12dx11()}};EditorUi[_0x74c6[10]][_0x74c6[18]]= function(_0xb12dx6){return false};EditorUi[_0x74c6[10]][_0x74c6[102]]= function(){try{if(window[_0x74c6[117]]!= null&& window[_0x74c6[117]][_0x74c6[118]]!= null){window[_0x74c6[117]][_0x74c6[118]][_0x74c6[130]](mxUtils[_0x74c6[20]](this,function(_0xb12dx14,_0xb12dx15){try{var _0xb12dx16=mxUtils[_0x74c6[119]](_0xb12dx14);this[_0x74c6[0]][_0x74c6[121]](_0xb12dx16[_0x74c6[120]]);this[_0x74c6[0]][_0x74c6[122]]= false;this[_0x74c6[0]][_0x74c6[124]][_0x74c6[123]]();if(_0xb12dx15!= null){this[_0x74c6[0]][_0x74c6[125]]= _0xb12dx15}}catch(e){mxUtils[_0x74c6[129]](mxResources[_0x74c6[112]](_0x74c6[126])+ _0x74c6[127]+ e[_0x74c6[128]])}}))}}catch(e){}};EditorUi[_0x74c6[10]][_0x74c6[131]]= function(_0xb12dx14,_0xb12dx15,_0xb12dx17){try{var _0xb12dx16=mxUtils[_0x74c6[119]](_0xb12dx14);this[_0x74c6[0]][_0x74c6[121]](_0xb12dx16[_0x74c6[120]]);this[_0x74c6[0]][_0x74c6[122]]= false;this[_0x74c6[0]][_0x74c6[124]][_0x74c6[123]]();if(_0xb12dx15!= null){this[_0x74c6[0]][_0x74c6[125]]= _0xb12dx15};if(_0xb12dx17!= null){this[_0x74c6[0]][_0x74c6[132]]= _0xb12dx17}}catch(e){mxUtils[_0x74c6[129]](mxResources[_0x74c6[112]](_0x74c6[126])+ _0x74c6[127]+ e[_0x74c6[128]])}};EditorUi[_0x74c6[10]][_0x74c6[133]]= function(_0xb12dx18){var _0xb12dx1=this[_0x74c6[0]];if(_0xb12dx18!= null){var _0xb12dx14=mxUtils[_0x74c6[135]](this[_0x74c6[0]][_0x74c6[134]]());try{if(useLocalStorage){if(localStorage[_0x74c6[136]](_0xb12dx18)!= null&& !mxUtils[_0x74c6[138]](mxResources[_0x74c6[112]](_0x74c6[137],[_0xb12dx18]))){return};localStorage[_0x74c6[139]](_0xb12dx18,_0xb12dx14);this[_0x74c6[0]][_0x74c6[142]](mxResources[_0x74c6[112]](_0x74c6[140])+ _0x74c6[141]+  new Date())}else {console[_0x74c6[72]](_0xb12dx14[_0x74c6[143]]);console[_0x74c6[72]](MAX_REQUEST_SIZE);if(_0xb12dx14[_0x74c6[143]]< MAX_REQUEST_SIZE){_0xb12dx14= encodeURIComponent(_0xb12dx14);_0xb12dx18= encodeURIComponent(_0xb12dx18);var _0xb12dx19= new XMLHttpRequest();_0xb12dx19[_0x74c6[102]](_0x74c6[144],SAVE_URL,true);_0xb12dx19[_0x74c6[147]](_0x74c6[145],_0x74c6[146]);_0xb12dx19[_0x74c6[147]](_0x74c6[148],_0x74c6[149]+ _0xb12dx1[_0x74c6[132]][_0x74c6[150]]);_0xb12dx19[_0x74c6[151]]= function(_0xb12dx1a){if(_0xb12dx19[_0x74c6[152]]=== 4){if(_0xb12dx19[_0x74c6[153]]=== 201){_0xb12dx1[_0x74c6[142]](_0x74c6[154]+ JSON[_0x74c6[157]](_0xb12dx19[_0x74c6[156]])[_0x74c6[155]]+ _0x74c6[158]);setTimeout(function(){window[_0x74c6[102]](_0x74c6[159]+ JSON[_0x74c6[157]](_0xb12dx19[_0x74c6[156]])[_0x74c6[160]],_0x74c6[161])},1500)}else {try{var _0xb12dx1b=JSON[_0x74c6[157]](_0xb12dx19[_0x74c6[156]]);_0xb12dx1[_0x74c6[142]](_0x74c6[162]+ _0xb12dx1b[_0x74c6[163]][0][_0x74c6[128]])}catch(_0xb12dx1a){_0xb12dx1[_0x74c6[142]](_0x74c6[164]+ _0x74c6[165]+ _0xb12dx19[_0x74c6[153]]+ _0x74c6[141]+ _0xb12dx19[_0x74c6[166]]+ _0x74c6[44])}}}};_0xb12dx19[_0x74c6[167]]= function(_0xb12dx1a){mxUtils[_0x74c6[129]](_0xb12dx19[_0x74c6[166]])};_0xb12dx19[_0x74c6[169]](_0x74c6[168]+ _0xb12dx18)}else {mxUtils[_0x74c6[129]](mxResources[_0x74c6[112]](_0x74c6[170]));mxUtils[_0x74c6[171]](_0xb12dx14);return}};this[_0x74c6[0]][_0x74c6[125]]= _0xb12dx18;this[_0x74c6[0]][_0x74c6[122]]= false}catch(e){this[_0x74c6[0]][_0x74c6[142]](_0x74c6[164])}}else {this[_0x74c6[0]][_0x74c6[142]](_0x74c6[164])}};EditorUi[_0x74c6[10]][_0x74c6[172]]= function(_0xb12dx18){var _0xb12dx1=this[_0x74c6[0]];if(_0xb12dx18!= null){var _0xb12dx14=mxUtils[_0x74c6[135]](this[_0x74c6[0]][_0x74c6[134]]());try{if(useLocalStorage){if(localStorage[_0x74c6[136]](_0xb12dx18)!= null&& !mxUtils[_0x74c6[138]](mxResources[_0x74c6[112]](_0x74c6[137],[_0xb12dx18]))){return};localStorage[_0x74c6[139]](_0xb12dx18,_0xb12dx14);this[_0x74c6[0]][_0x74c6[142]](mxResources[_0x74c6[112]](_0x74c6[140])+ _0x74c6[141]+  new Date())}else {console[_0x74c6[72]](_0xb12dx14[_0x74c6[143]]);console[_0x74c6[72]](MAX_REQUEST_SIZE);if(_0xb12dx14[_0x74c6[143]]< MAX_REQUEST_SIZE){_0xb12dx14= encodeURIComponent(_0xb12dx14);var _0xb12dx19= new XMLHttpRequest();_0xb12dx19[_0x74c6[102]](_0x74c6[173],SAVE_URL+ this[_0x74c6[0]][_0x74c6[132]][_0x74c6[160]],true);_0xb12dx19[_0x74c6[147]](_0x74c6[145],_0x74c6[146]);_0xb12dx19[_0x74c6[147]](_0x74c6[148],_0x74c6[149]+ _0xb12dx1[_0x74c6[132]][_0x74c6[150]]);_0xb12dx19[_0x74c6[151]]= function(_0xb12dx1a){if(_0xb12dx19[_0x74c6[152]]=== 4){if(_0xb12dx19[_0x74c6[153]]=== 200){_0xb12dx1[_0x74c6[142]](_0x74c6[174]+ JSON[_0x74c6[157]](_0xb12dx19[_0x74c6[156]])[_0x74c6[175]]+ _0x74c6[165]+ _0xb12dx19[_0x74c6[153]]+ _0x74c6[141]+ _0xb12dx19[_0x74c6[166]]+ _0x74c6[44])}else {try{var _0xb12dx1b=JSON[_0x74c6[157]](_0xb12dx19[_0x74c6[156]]);_0xb12dx1[_0x74c6[142]](_0x74c6[176]+ _0xb12dx1b[_0x74c6[163]][0][_0x74c6[128]])}catch(_0xb12dx1a){_0xb12dx1[_0x74c6[142]](_0x74c6[177]+ _0x74c6[165]+ _0xb12dx19[_0x74c6[153]]+ _0x74c6[141]+ _0xb12dx19[_0x74c6[166]]+ _0x74c6[44])}}}};_0xb12dx19[_0x74c6[167]]= function(_0xb12dx1a){mxUtils[_0x74c6[129]](_0xb12dx19[_0x74c6[166]])};_0xb12dx19[_0x74c6[169]](_0x74c6[178]+ _0xb12dx14)}else {mxUtils[_0x74c6[129]](mxResources[_0x74c6[112]](_0x74c6[170]));mxUtils[_0x74c6[171]](_0xb12dx14);return}};this[_0x74c6[0]][_0x74c6[125]]= _0xb12dx18;this[_0x74c6[0]][_0x74c6[122]]= false}catch(e){this[_0x74c6[0]][_0x74c6[142]](_0x74c6[179])}}else {this[_0x74c6[0]][_0x74c6[142]](_0x74c6[179])}};EditorUi[_0x74c6[10]][_0x74c6[180]]= function(_0xb12dx18){var _0xb12dx1=this[_0x74c6[0]];console[_0x74c6[72]](_0xb12dx18);if(_0xb12dx18!= null){var _0xb12dx14=mxUtils[_0x74c6[135]](this[_0x74c6[0]][_0x74c6[134]]());try{if(useLocalStorage){if(localStorage[_0x74c6[136]](_0xb12dx18)!= null&& !mxUtils[_0x74c6[138]](mxResources[_0x74c6[112]](_0x74c6[137],[_0xb12dx18]))){return};localStorage[_0x74c6[139]](_0xb12dx18,_0xb12dx14);this[_0x74c6[0]][_0x74c6[142]](mxResources[_0x74c6[112]](_0x74c6[140])+ _0x74c6[141]+  new Date())}else {console[_0x74c6[72]](_0xb12dx14[_0x74c6[143]]);console[_0x74c6[72]](MAX_REQUEST_SIZE);if(_0xb12dx14[_0x74c6[143]]< MAX_REQUEST_SIZE){_0xb12dx14= encodeURIComponent(_0xb12dx14);_0xb12dx18= encodeURIComponent(_0xb12dx18);var _0xb12dx19= new XMLHttpRequest();_0xb12dx19[_0x74c6[102]](_0x74c6[144],SAVE_URL,true);_0xb12dx19[_0x74c6[147]](_0x74c6[145],_0x74c6[146]);_0xb12dx19[_0x74c6[147]](_0x74c6[148],_0x74c6[149]+ _0xb12dx1[_0x74c6[132]][_0x74c6[150]]);_0xb12dx19[_0x74c6[151]]= function(_0xb12dx1a){if(_0xb12dx19[_0x74c6[152]]=== 4){if(_0xb12dx19[_0x74c6[153]]=== 201){_0xb12dx1[_0x74c6[142]](_0x74c6[154]+ JSON[_0x74c6[157]](_0xb12dx19[_0x74c6[156]])[_0x74c6[155]]+ _0x74c6[158]);setTimeout(function(){window[_0x74c6[102]](_0x74c6[181]+ JSON[_0x74c6[157]](_0xb12dx19[_0x74c6[156]])[_0x74c6[160]],_0x74c6[161])},1500)}else {try{var _0xb12dx1b=JSON[_0x74c6[157]](_0xb12dx19[_0x74c6[156]]);_0xb12dx1[_0x74c6[142]](_0x74c6[182]+ _0xb12dx1b[_0x74c6[163]][0][_0x74c6[128]])}catch(_0xb12dx1a){_0xb12dx1[_0x74c6[142]](_0x74c6[183]+ _0x74c6[165]+ _0xb12dx19[_0x74c6[153]]+ _0x74c6[141]+ _0xb12dx19[_0x74c6[166]]+ _0x74c6[44])}}}};_0xb12dx19[_0x74c6[167]]= function(_0xb12dx1a){mxUtils[_0x74c6[129]](_0xb12dx19[_0x74c6[166]])};_0xb12dx19[_0x74c6[169]](_0x74c6[184]+ _0xb12dx18+ _0x74c6[185]+ _0xb12dx14+ _0x74c6[186]+ _0xb12dx14)}else {mxUtils[_0x74c6[129]](mxResources[_0x74c6[112]](_0x74c6[170]));mxUtils[_0x74c6[171]](_0xb12dx14);return}};this[_0x74c6[0]][_0x74c6[125]]= _0xb12dx18;this[_0x74c6[0]][_0x74c6[122]]= false}catch(e){this[_0x74c6[0]][_0x74c6[142]](_0x74c6[179])}}else {this[_0x74c6[0]][_0x74c6[142]](_0x74c6[179])}};EditorUi[_0x74c6[10]][_0x74c6[187]]= function(_0xb12dx1c,_0xb12dx1d){var _0xb12dx3=this[_0x74c6[0]][_0x74c6[4]];_0xb12dx1c= null!= _0xb12dx1c?_0xb12dx1c:_0xb12dx3[_0x74c6[189]][_0x74c6[188]]();_0xb12dx1d= null!= _0xb12dx1d?_0xb12dx1d:{};for(var _0xb12dx1e=!0,_0xb12dx1f=_0xb12dx3[_0x74c6[189]][_0x74c6[190]](_0xb12dx1c),_0xb12dx1a=0;_0xb12dx1a< _0xb12dx1f;_0xb12dx1a++){var _0xb12dx20=_0xb12dx3[_0x74c6[189]][_0x74c6[191]](_0xb12dx1c,_0xb12dx1a),_0xb12dx21=_0xb12dx1d;_0xb12dx3[_0x74c6[192]](_0xb12dx20)&& (_0xb12dx21= {});_0xb12dx21= this[_0x74c6[187]](_0xb12dx20,_0xb12dx21);null!= _0xb12dx21?_0xb12dx3[_0x74c6[194]](_0xb12dx20,_0xb12dx21[_0x74c6[137]](/\n/g,_0x74c6[193])):_0xb12dx3[_0x74c6[194]](_0xb12dx20,null);_0xb12dx1e= _0xb12dx1e&& null== _0xb12dx21};_0xb12dx1f= _0x74c6[195];if(_0xb12dx3[_0x74c6[189]][_0x74c6[71]](_0xb12dx1c)){switch(_0xb12dx1c[_0x74c6[67]][_0x74c6[203]]){case _0x74c6[55]:_0xb12dx1f= (_0xb12dx1c[_0x74c6[67]][_0x74c6[196]](_0x74c6[55])!== _0x74c6[195])?_0x74c6[195]:_0x74c6[197]+ _0x74c6[198];_0xb12dx1f+= (_0xb12dx1c[_0x74c6[67]][_0x74c6[196]](_0x74c6[199])!== _0x74c6[195])?_0x74c6[195]:_0x74c6[200]+ _0x74c6[198];break;case _0x74c6[54]:_0xb12dx1f= (_0xb12dx1c[_0x74c6[67]][_0x74c6[196]](_0x74c6[55])!== _0x74c6[195])?_0x74c6[195]:_0x74c6[197]+ _0x74c6[198];_0xb12dx1f+= (_0xb12dx1c[_0x74c6[67]][_0x74c6[196]](_0x74c6[199])!== _0x74c6[195])?_0x74c6[195]:_0x74c6[200]+ _0x74c6[198];break;case _0x74c6[52]:_0xb12dx1f= this[_0x74c6[201]](_0x74c6[52])?_0x74c6[195]:_0x74c6[202]+ _0x74c6[198];_0xb12dx1f+= (_0xb12dx1c[_0x74c6[67]][_0x74c6[196]](_0x74c6[199])!== _0x74c6[195])?_0x74c6[195]:_0x74c6[200]+ _0x74c6[198];break}};if(_0xb12dx3[_0x74c6[189]][_0x74c6[64]](_0xb12dx1c)){var _0xb12dx22=_0xb12dx3[_0x74c6[189]][_0x74c6[205]](_0xb12dx1c[_0x74c6[68]][_0x74c6[204]]());switch(_0xb12dx22[_0x74c6[67]][_0x74c6[203]]){case _0x74c6[55]:var _0xb12dx23=String(_0xb12dx1c[_0x74c6[206]]());console[_0x74c6[72]](_0xb12dx23);if(_0xb12dx23=== _0x74c6[207]|| _0xb12dx23=== _0x74c6[31]){_0xb12dx1f= _0x74c6[208]+ _0x74c6[198]}else {var _0xb12dx24=_0xb12dx23[_0x74c6[210]](_0x74c6[209]);_0xb12dx24[_0x74c6[214]](function(_0xb12dx25,_0xb12dx26){_0xb12dx1f= _0xb12dx1f+ ((_0xb12dx25[_0x74c6[211]]()!== _0x74c6[195])?_0x74c6[195]:_0x74c6[212]+ (_0xb12dx26+ 1)+ _0x74c6[213]+ _0x74c6[198])})};break}};_0xb12dx3[_0x74c6[215]](_0xb12dx1c)&& !_0xb12dx1e&& (_0xb12dx1f+= (mxResources[_0x74c6[112]](_0xb12dx3[_0x74c6[216]])|| _0xb12dx3[_0x74c6[216]])+ _0x74c6[198]);_0xb12dx1f= _0xb12dx3[_0x74c6[189]][_0x74c6[64]](_0xb12dx1c)?_0xb12dx1f+ (_0xb12dx3[_0x74c6[218]](_0xb12dx1c,_0xb12dx3[_0x74c6[189]][_0x74c6[217]](_0xb12dx1c,!0),_0xb12dx3[_0x74c6[189]][_0x74c6[217]](_0xb12dx1c,!1))|| _0x74c6[195]):_0xb12dx1f+ (_0xb12dx3[_0x74c6[219]](_0xb12dx1c)|| _0x74c6[195]);_0xb12dx1a= _0xb12dx3[_0x74c6[220]](_0xb12dx1c,_0xb12dx1d);null!= _0xb12dx1a&& (_0xb12dx1f+= _0xb12dx1a);null== _0xb12dx3[_0x74c6[189]][_0x74c6[221]](_0xb12dx1c)&& _0xb12dx3[_0x74c6[89]][_0x74c6[187]]();return 0< _0xb12dx1f[_0x74c6[143]]|| !_0xb12dx1e?_0xb12dx1f:null};EditorUi[_0x74c6[10]][_0x74c6[201]]= function(_0xb12dx27){var _0xb12dx3=this[_0x74c6[0]][_0x74c6[4]];var _0xb12dx28=_0xb12dx3[_0x74c6[222]]();var _0xb12dx29=0;_0xb12dx28[_0x74c6[223]][_0x74c6[214]](function(_0xb12dx2a){if(_0xb12dx3[_0x74c6[189]][_0x74c6[71]](_0xb12dx2a)&& _0xb12dx2a[_0x74c6[67]][_0x74c6[203]]== _0xb12dx27){_0xb12dx29++}});return _0xb12dx29> 1?false:true};EditorUi[_0x74c6[10]][_0x74c6[224]]= function(_0xb12dx18){var _0xb12dx1=this[_0x74c6[0]];if(_0xb12dx18!= null){var _0xb12dx1b=this[_0x74c6[187]]();if(_0xb12dx1b=== null){var _0xb12dx14=mxUtils[_0x74c6[135]](this[_0x74c6[0]][_0x74c6[134]]());try{if(useLocalStorage){if(localStorage[_0x74c6[136]](_0xb12dx18)!= null&& !mxUtils[_0x74c6[138]](mxResources[_0x74c6[112]](_0x74c6[137],[_0xb12dx18]))){return};localStorage[_0x74c6[139]](_0xb12dx18,_0xb12dx14);this[_0x74c6[0]][_0x74c6[142]](mxResources[_0x74c6[112]](_0x74c6[140])+ _0x74c6[141]+  new Date())}else {console[_0x74c6[72]](_0xb12dx14[_0x74c6[143]]);console[_0x74c6[72]](MAX_REQUEST_SIZE);if(_0xb12dx14[_0x74c6[143]]< MAX_REQUEST_SIZE){_0xb12dx14= encodeURIComponent(_0xb12dx14);var _0xb12dx19= new XMLHttpRequest();_0xb12dx19[_0x74c6[102]](_0x74c6[173],SAVE_URL+ this[_0x74c6[0]][_0x74c6[132]][_0x74c6[160]],true);_0xb12dx19[_0x74c6[147]](_0x74c6[145],_0x74c6[146]);_0xb12dx19[_0x74c6[147]](_0x74c6[148],_0x74c6[149]+ _0xb12dx1[_0x74c6[132]][_0x74c6[150]]);_0xb12dx19[_0x74c6[151]]= function(_0xb12dx1a){if(_0xb12dx19[_0x74c6[152]]=== 4){if(_0xb12dx19[_0x74c6[153]]=== 200){_0xb12dx1[_0x74c6[142]](_0x74c6[225]+ JSON[_0x74c6[157]](_0xb12dx19[_0x74c6[156]])[_0x74c6[175]]+ _0x74c6[165]+ _0xb12dx19[_0x74c6[153]]+ _0x74c6[141]+ _0xb12dx19[_0x74c6[166]]+ _0x74c6[44])}else {try{var _0xb12dx1b=JSON[_0x74c6[157]](_0xb12dx19[_0x74c6[156]]);_0xb12dx1[_0x74c6[142]](_0x74c6[226]+ _0xb12dx1b[_0x74c6[163]][0][_0x74c6[128]])}catch(_0xb12dx1a){_0xb12dx1[_0x74c6[142]](_0x74c6[227]+ _0x74c6[165]+ _0xb12dx19[_0x74c6[153]]+ _0x74c6[141]+ _0xb12dx19[_0x74c6[166]]+ _0x74c6[44])}}}};_0xb12dx19[_0x74c6[167]]= function(_0xb12dx1a){mxUtils[_0x74c6[129]](_0xb12dx19[_0x74c6[166]])};_0xb12dx19[_0x74c6[169]](_0x74c6[178]+ _0xb12dx14+ _0x74c6[186]+ _0xb12dx14)}else {mxUtils[_0x74c6[129]](mxResources[_0x74c6[112]](_0x74c6[170]));mxUtils[_0x74c6[171]](_0xb12dx14);return}};this[_0x74c6[0]][_0x74c6[125]]= _0xb12dx18;this[_0x74c6[0]][_0x74c6[122]]= false}catch(e){this[_0x74c6[0]][_0x74c6[142]](_0x74c6[228])}}else {_0xb12dx1[_0x74c6[142]](_0x74c6[226])}}else {this[_0x74c6[0]][_0x74c6[142]](_0x74c6[228])}};EditorUi[_0x74c6[10]][_0x74c6[229]]= function(_0xb12dx18){var _0xb12dx1=this[_0x74c6[0]];if(_0xb12dx18!= null){try{var _0xb12dx19= new XMLHttpRequest();_0xb12dx19[_0x74c6[102]](_0x74c6[144],VARIABLE_URL,true);_0xb12dx19[_0x74c6[147]](_0x74c6[145],_0x74c6[146]);_0xb12dx19[_0x74c6[147]](_0x74c6[148],_0x74c6[149]+ _0xb12dx1[_0x74c6[132]][_0x74c6[150]]);_0xb12dx19[_0x74c6[151]]= function(_0xb12dx1a){if(_0xb12dx19[_0x74c6[152]]=== 4){if(_0xb12dx19[_0x74c6[153]]=== 201){_0xb12dx1[_0x74c6[142]](_0x74c6[230]+ JSON[_0x74c6[157]](_0xb12dx19[_0x74c6[156]])[_0x74c6[231]]+ _0x74c6[165]+ _0xb12dx19[_0x74c6[153]]+ _0x74c6[141]+ _0xb12dx19[_0x74c6[166]]+ _0x74c6[44])}else {try{var _0xb12dx1b=JSON[_0x74c6[157]](_0xb12dx19[_0x74c6[156]]);_0xb12dx1[_0x74c6[142]](_0x74c6[232]+ _0xb12dx1b[_0x74c6[163]][0][_0x74c6[128]])}catch(_0xb12dx1a){_0xb12dx1[_0x74c6[142]](_0x74c6[233]+ _0x74c6[165]+ _0xb12dx19[_0x74c6[153]]+ _0x74c6[141]+ _0xb12dx19[_0x74c6[166]]+ _0x74c6[44])}}}};_0xb12dx19[_0x74c6[167]]= function(_0xb12dx1a){mxUtils[_0x74c6[129]](_0xb12dx19[_0x74c6[166]])};_0xb12dx19[_0x74c6[169]](_0x74c6[234]+ _0xb12dx18)}catch(e){this[_0x74c6[0]][_0x74c6[142]](_0x74c6[233])}}else {this[_0x74c6[0]][_0x74c6[142]](_0x74c6[233])}};EditorUi[_0x74c6[10]][_0x74c6[235]]= function(_0xb12dx2b){var _0xb12dx2c=(_0xb12dx2b!= null)?_0xb12dx2b:window[_0x74c6[237]][_0x74c6[236]];var _0xb12dx2d=(_0xb12dx2c[_0x74c6[69]](_0x74c6[238])> 0)?1:0;for(var _0xb12dx26 in urlParams){if(_0xb12dx2d== 0){_0xb12dx2c+= _0x74c6[238]}else {_0xb12dx2c+= _0x74c6[239]};_0xb12dx2c+= _0xb12dx26+ _0x74c6[240]+ urlParams[_0xb12dx26];_0xb12dx2d++};return _0xb12dx2c};EditorUi[_0x74c6[10]][_0x74c6[109]]= function(){var _0xb12dx2e=this[_0x74c6[12]][_0x74c6[112]](_0x74c6[241]);var _0xb12dx2f=this[_0x74c6[12]][_0x74c6[112]](_0x74c6[242]);var _0xb12dx30=this[_0x74c6[0]][_0x74c6[124]];var _0xb12dx31=function(){_0xb12dx2e[_0x74c6[114]](_0xb12dx30[_0x74c6[243]]());_0xb12dx2f[_0x74c6[114]](_0xb12dx30[_0x74c6[244]]())};_0xb12dx30[_0x74c6[33]](mxEvent.ADD,_0xb12dx31);_0xb12dx30[_0x74c6[33]](mxEvent.UNDO,_0xb12dx31);_0xb12dx30[_0x74c6[33]](mxEvent.REDO,_0xb12dx31);_0xb12dx30[_0x74c6[33]](mxEvent.CLEAR,_0xb12dx31);_0xb12dx31()};EditorUi[_0x74c6[10]][_0x74c6[110]]= function(){var _0xb12dx32=mxUtils[_0x74c6[20]](this,function(){var _0xb12dx3=this[_0x74c6[0]][_0x74c6[4]];var _0xb12dx33=!_0xb12dx3[_0x74c6[245]]();var _0xb12dx34=false;var _0xb12dx35=false;var _0xb12dx36=_0xb12dx3[_0x74c6[246]]();if(_0xb12dx36!= null){for(var _0xb12dx37=0;_0xb12dx37< _0xb12dx36[_0x74c6[143]];_0xb12dx37++){var _0xb12dxb=_0xb12dx36[_0xb12dx37];if(_0xb12dx3[_0x74c6[65]]()[_0x74c6[64]](_0xb12dxb)){_0xb12dx35= true};if(_0xb12dx3[_0x74c6[65]]()[_0x74c6[71]](_0xb12dxb)){_0xb12dx34= true};if(_0xb12dx35&& _0xb12dx34){break}}};var _0xb12dx38=[_0x74c6[115],_0x74c6[116],_0x74c6[247],_0x74c6[248],_0x74c6[249],_0x74c6[250],_0x74c6[6],_0x74c6[251],_0x74c6[252],_0x74c6[253],_0x74c6[254],_0x74c6[255],_0x74c6[256],_0x74c6[257],_0x74c6[258]];for(var _0xb12dx37=0;_0xb12dx37< _0xb12dx38[_0x74c6[143]];_0xb12dx37++){this[_0x74c6[12]][_0x74c6[112]](_0xb12dx38[_0xb12dx37])[_0x74c6[114]](_0xb12dx33)};this[_0x74c6[12]][_0x74c6[112]](_0x74c6[259])[_0x74c6[114]](_0xb12dx35);this[_0x74c6[12]][_0x74c6[112]](_0x74c6[260])[_0x74c6[114]](_0xb12dx34);this[_0x74c6[12]][_0x74c6[112]](_0x74c6[261])[_0x74c6[114]](_0xb12dx34);this[_0x74c6[12]][_0x74c6[112]](_0x74c6[263])[_0x74c6[114]](_0xb12dx3[_0x74c6[262]]()> 1);this[_0x74c6[12]][_0x74c6[112]](_0x74c6[265])[_0x74c6[114]](_0xb12dx3[_0x74c6[262]]()== 1&& _0xb12dx3[_0x74c6[65]]()[_0x74c6[190]](_0xb12dx3[_0x74c6[264]]())> 0);var _0xb12dx39=_0xb12dx34&& _0xb12dx3[_0x74c6[262]]()== 1;this[_0x74c6[12]][_0x74c6[112]](_0x74c6[266])[_0x74c6[114]](_0xb12dx39&& _0xb12dx3[_0x74c6[65]]()[_0x74c6[71]](_0xb12dx3[_0x74c6[65]]()[_0x74c6[221]](_0xb12dx3[_0x74c6[264]]())));var _0xb12dx3a=[_0x74c6[267],_0x74c6[268],_0x74c6[269],_0x74c6[270],_0x74c6[271],_0x74c6[272],_0x74c6[273],_0x74c6[274],_0x74c6[275]];for(var _0xb12dx37=0;_0xb12dx37< _0xb12dx3a[_0x74c6[143]];_0xb12dx37++){this[_0x74c6[13]][_0x74c6[112]](_0xb12dx3a[_0xb12dx37])[_0x74c6[114]](_0xb12dx33)};_0xb12dx3a= [_0x74c6[276],_0x74c6[277],_0x74c6[278]];for(var _0xb12dx37=0;_0xb12dx37< _0xb12dx3a[_0x74c6[143]];_0xb12dx37++){this[_0x74c6[13]][_0x74c6[112]](_0xb12dx3a[_0xb12dx37])[_0x74c6[114]](_0xb12dx35)};this[_0x74c6[12]][_0x74c6[112]](_0x74c6[279])[_0x74c6[114]](_0xb12dx35);this[_0x74c6[13]][_0x74c6[112]](_0x74c6[280])[_0x74c6[114]](_0xb12dx3[_0x74c6[262]]()> 1);this[_0x74c6[13]][_0x74c6[112]](_0x74c6[283])[_0x74c6[114]](_0xb12dx34|| (_0xb12dx35&& _0xb12dx3[_0x74c6[282]](_0xb12dx3[_0x74c6[89]][_0x74c6[281]](_0xb12dx3[_0x74c6[264]]()))));this[_0x74c6[13]][_0x74c6[112]](_0x74c6[286])[_0x74c6[114]](_0xb12dx3[_0x74c6[284]]&& ((_0xb12dx3[_0x74c6[89]][_0x74c6[285]]!= null)|| (_0xb12dx3[_0x74c6[262]]()== 1&& _0xb12dx3[_0x74c6[192]](_0xb12dx3[_0x74c6[264]]()))));this[_0x74c6[12]][_0x74c6[112]](_0x74c6[287])[_0x74c6[114]](_0xb12dx3[_0x74c6[89]][_0x74c6[285]]!= null);this[_0x74c6[12]][_0x74c6[112]](_0x74c6[288])[_0x74c6[114]](_0xb12dx3[_0x74c6[89]][_0x74c6[285]]!= null);var _0xb12dx3b=_0xb12dx3[_0x74c6[262]]()== 1&& _0xb12dx3[_0x74c6[192]](_0xb12dx3[_0x74c6[264]]());this[_0x74c6[12]][_0x74c6[112]](_0x74c6[289])[_0x74c6[114]](_0xb12dx3b);this[_0x74c6[12]][_0x74c6[112]](_0x74c6[290])[_0x74c6[114]](_0xb12dx3b);this[_0x74c6[12]][_0x74c6[112]](_0x74c6[291])[_0x74c6[114]](_0xb12dx3b);this[_0x74c6[12]][_0x74c6[112]](_0x74c6[292])[_0x74c6[114]](_0xb12dx3[_0x74c6[262]]()== 1);this[_0x74c6[12]][_0x74c6[112]](_0x74c6[294])[_0x74c6[114]](_0xb12dx3[_0x74c6[262]]()== 1&& _0xb12dx3[_0x74c6[293]](_0xb12dx3[_0x74c6[264]]())!= null)});this[_0x74c6[0]][_0x74c6[4]][_0x74c6[295]]()[_0x74c6[33]](mxEvent.CHANGE,_0xb12dx32);_0xb12dx32()};EditorUi[_0x74c6[10]][_0x74c6[15]]= function(){var _0xb12dx3c=mxClient[_0x74c6[29]]&& (document[_0x74c6[30]]== null|| document[_0x74c6[30]]== 5);var _0xb12dx3d=this[_0x74c6[1]][_0x74c6[296]];var _0xb12dx3e=this[_0x74c6[1]][_0x74c6[297]];if(this[_0x74c6[1]]== document[_0x74c6[21]]){_0xb12dx3d= document[_0x74c6[21]][_0x74c6[296]]|| document[_0x74c6[120]][_0x74c6[296]];_0xb12dx3e= (_0xb12dx3c)?document[_0x74c6[21]][_0x74c6[297]]|| document[_0x74c6[120]][_0x74c6[297]]:document[_0x74c6[120]][_0x74c6[297]]};var _0xb12dx3f=Math[_0x74c6[299]](0,Math[_0x74c6[298]](this[_0x74c6[107]],_0xb12dx3d- this[_0x74c6[103]]- 20));var _0xb12dx40=Math[_0x74c6[299]](0,Math[_0x74c6[298]](this[_0x74c6[108]],_0xb12dx3e- this[_0x74c6[104]]- this[_0x74c6[105]]- this[_0x74c6[106]]- this[_0x74c6[103]]- 1));this[_0x74c6[23]][_0x74c6[6]][_0x74c6[300]]= this[_0x74c6[104]]+ _0x74c6[301];this[_0x74c6[25]][_0x74c6[6]][_0x74c6[302]]= this[_0x74c6[104]]+ _0x74c6[301];this[_0x74c6[25]][_0x74c6[6]][_0x74c6[300]]= this[_0x74c6[105]]+ _0x74c6[301];var _0xb12dx41=this[_0x74c6[104]]+ this[_0x74c6[105]];if(!mxClient[_0x74c6[303]]){_0xb12dx41+= 1};this[_0x74c6[27]][_0x74c6[6]][_0x74c6[302]]= _0xb12dx41+ _0x74c6[301];this[_0x74c6[27]][_0x74c6[6]][_0x74c6[304]]= _0xb12dx3f+ _0x74c6[301];this[_0x74c6[79]][_0x74c6[6]][_0x74c6[304]]= _0xb12dx3f+ _0x74c6[301];this[_0x74c6[79]][_0x74c6[6]][_0x74c6[300]]= _0xb12dx40+ _0x74c6[301];this[_0x74c6[79]][_0x74c6[6]][_0x74c6[305]]= this[_0x74c6[106]]+ _0x74c6[301];this[_0x74c6[26]][_0x74c6[6]][_0x74c6[306]]= (_0xb12dx3f+ this[_0x74c6[103]])+ _0x74c6[301];this[_0x74c6[26]][_0x74c6[6]][_0x74c6[302]]= this[_0x74c6[27]][_0x74c6[6]][_0x74c6[302]];this[_0x74c6[28]][_0x74c6[6]][_0x74c6[300]]= this[_0x74c6[106]]+ _0x74c6[301];this[_0x74c6[28]][_0x74c6[6]][_0x74c6[307]]= _0x74c6[308];this[_0x74c6[309]][_0x74c6[6]][_0x74c6[302]]= this[_0x74c6[27]][_0x74c6[6]][_0x74c6[302]];this[_0x74c6[309]][_0x74c6[6]][_0x74c6[305]]= this[_0x74c6[79]][_0x74c6[6]][_0x74c6[305]];this[_0x74c6[309]][_0x74c6[6]][_0x74c6[306]]= _0xb12dx3f+ _0x74c6[301];this[_0x74c6[310]][_0x74c6[6]][_0x74c6[304]]= this[_0x74c6[27]][_0x74c6[6]][_0x74c6[304]];this[_0x74c6[310]][_0x74c6[6]][_0x74c6[305]]= (_0xb12dx40+ this[_0x74c6[106]])+ _0x74c6[301];if(_0xb12dx3c){this[_0x74c6[23]][_0x74c6[6]][_0x74c6[304]]= _0xb12dx3d+ _0x74c6[301];this[_0x74c6[25]][_0x74c6[6]][_0x74c6[304]]= this[_0x74c6[23]][_0x74c6[6]][_0x74c6[304]];var _0xb12dx42=(_0xb12dx3e- _0xb12dx40- this[_0x74c6[103]]- this[_0x74c6[106]]- this[_0x74c6[104]]- this[_0x74c6[105]]);this[_0x74c6[27]][_0x74c6[6]][_0x74c6[300]]= _0xb12dx42+ _0x74c6[301];this[_0x74c6[26]][_0x74c6[6]][_0x74c6[304]]= (_0xb12dx3d- _0xb12dx3f- this[_0x74c6[103]])+ _0x74c6[301];var _0xb12dx43=(_0xb12dx3e- this[_0x74c6[106]]- this[_0x74c6[104]]- this[_0x74c6[105]]);this[_0x74c6[26]][_0x74c6[6]][_0x74c6[300]]= _0xb12dx43+ _0x74c6[301];this[_0x74c6[28]][_0x74c6[6]][_0x74c6[304]]= this[_0x74c6[23]][_0x74c6[6]][_0x74c6[304]];this[_0x74c6[309]][_0x74c6[6]][_0x74c6[300]]= _0xb12dx43+ _0x74c6[301]}else {this[_0x74c6[27]][_0x74c6[6]][_0x74c6[305]]= (_0xb12dx40+ this[_0x74c6[103]]+ this[_0x74c6[106]])+ _0x74c6[301];this[_0x74c6[26]][_0x74c6[6]][_0x74c6[305]]= this[_0x74c6[79]][_0x74c6[6]][_0x74c6[305]]}};EditorUi[_0x74c6[10]][_0x74c6[14]]= function(){this[_0x74c6[23]]= this[_0x74c6[312]](_0x74c6[311]);this[_0x74c6[25]]= this[_0x74c6[312]](_0x74c6[313]);this[_0x74c6[27]]= this[_0x74c6[312]](_0x74c6[314]);this[_0x74c6[79]]= this[_0x74c6[312]](_0x74c6[315]);this[_0x74c6[26]]= this[_0x74c6[312]](_0x74c6[316]);this[_0x74c6[28]]= this[_0x74c6[312]](_0x74c6[317]);this[_0x74c6[309]]= this[_0x74c6[312]](_0x74c6[318]);this[_0x74c6[310]]= this[_0x74c6[312]](_0x74c6[319]);this[_0x74c6[23]][_0x74c6[6]][_0x74c6[302]]= _0x74c6[320];this[_0x74c6[23]][_0x74c6[6]][_0x74c6[306]]= _0x74c6[320];this[_0x74c6[23]][_0x74c6[6]][_0x74c6[321]]= _0x74c6[320];this[_0x74c6[25]][_0x74c6[6]][_0x74c6[306]]= _0x74c6[320];this[_0x74c6[25]][_0x74c6[6]][_0x74c6[321]]= _0x74c6[320];this[_0x74c6[27]][_0x74c6[6]][_0x74c6[306]]= _0x74c6[320];this[_0x74c6[79]][_0x74c6[6]][_0x74c6[306]]= _0x74c6[320];this[_0x74c6[26]][_0x74c6[6]][_0x74c6[321]]= _0x74c6[320];this[_0x74c6[28]][_0x74c6[6]][_0x74c6[306]]= _0x74c6[320];this[_0x74c6[28]][_0x74c6[6]][_0x74c6[321]]= _0x74c6[320];this[_0x74c6[28]][_0x74c6[6]][_0x74c6[305]]= _0x74c6[320];this[_0x74c6[310]][_0x74c6[6]][_0x74c6[306]]= _0x74c6[320];this[_0x74c6[310]][_0x74c6[6]][_0x74c6[300]]= this[_0x74c6[103]]+ _0x74c6[301];this[_0x74c6[309]][_0x74c6[6]][_0x74c6[304]]= this[_0x74c6[103]]+ _0x74c6[301]};EditorUi[_0x74c6[10]][_0x74c6[16]]= function(){this[_0x74c6[322]]= this[_0x74c6[13]][_0x74c6[324]](this[_0x74c6[312]](_0x74c6[323]));this[_0x74c6[23]][_0x74c6[325]](this[_0x74c6[322]][_0x74c6[1]]);this[_0x74c6[326]]= this[_0x74c6[328]](this[_0x74c6[312]](_0x74c6[327]));this[_0x74c6[25]][_0x74c6[325]](this[_0x74c6[326]][_0x74c6[1]]);this[_0x74c6[329]]= this[_0x74c6[330]](this[_0x74c6[27]]);this[_0x74c6[28]][_0x74c6[325]](this[_0x74c6[331]]());this[_0x74c6[332]]= this[_0x74c6[333]]();this[_0x74c6[0]][_0x74c6[33]](_0x74c6[334],mxUtils[_0x74c6[20]](this,function(){this[_0x74c6[336]](this[_0x74c6[0]][_0x74c6[335]]())}));this[_0x74c6[336]](this[_0x74c6[0]][_0x74c6[335]]());this[_0x74c6[322]][_0x74c6[1]][_0x74c6[325]](this[_0x74c6[332]]);this[_0x74c6[1]][_0x74c6[325]](this[_0x74c6[23]]);this[_0x74c6[1]][_0x74c6[325]](this[_0x74c6[25]]);this[_0x74c6[1]][_0x74c6[325]](this[_0x74c6[27]]);this[_0x74c6[1]][_0x74c6[325]](this[_0x74c6[79]]);this[_0x74c6[1]][_0x74c6[325]](this[_0x74c6[26]]);this[_0x74c6[1]][_0x74c6[325]](this[_0x74c6[28]]);this[_0x74c6[1]][_0x74c6[325]](this[_0x74c6[309]]);this[_0x74c6[1]][_0x74c6[325]](this[_0x74c6[310]]);this[_0x74c6[337]](this[_0x74c6[309]],true,0,mxUtils[_0x74c6[20]](this,function(_0xb12dx44){this[_0x74c6[107]]= _0xb12dx44;this[_0x74c6[15]]();this[_0x74c6[0]][_0x74c6[4]][_0x74c6[100]]();this[_0x74c6[0]][_0x74c6[80]][_0x74c6[101]](false);this[_0x74c6[0]][_0x74c6[80]][_0x74c6[80]][_0x74c6[100]]()}));this[_0x74c6[337]](this[_0x74c6[310]],false,this[_0x74c6[106]],mxUtils[_0x74c6[20]](this,function(_0xb12dx44){this[_0x74c6[108]]= _0xb12dx44;this[_0x74c6[15]]();this[_0x74c6[0]][_0x74c6[80]][_0x74c6[101]](false);this[_0x74c6[0]][_0x74c6[80]][_0x74c6[80]][_0x74c6[100]]()}))};EditorUi[_0x74c6[10]][_0x74c6[333]]= function(){var _0xb12dx2=document[_0x74c6[339]](_0x74c6[338]);_0xb12dx2[_0x74c6[340]]= _0x74c6[341];return _0xb12dx2};EditorUi[_0x74c6[10]][_0x74c6[333]]= function(){var _0xb12dx2=document[_0x74c6[339]](_0x74c6[338]);_0xb12dx2[_0x74c6[340]]= _0x74c6[341];return _0xb12dx2};EditorUi[_0x74c6[10]][_0x74c6[336]]= function(_0xb12dx44){this[_0x74c6[332]][_0x74c6[342]]= _0xb12dx44};EditorUi[_0x74c6[10]][_0x74c6[328]]= function(_0xb12dx2){return  new Toolbar(this,_0xb12dx2)};EditorUi[_0x74c6[10]][_0x74c6[330]]= function(_0xb12dx2){return  new Sidebar(this,_0xb12dx2)};EditorUi[_0x74c6[10]][_0x74c6[331]]= function(){return this[_0x74c6[312]](_0x74c6[343])};EditorUi[_0x74c6[10]][_0x74c6[312]]= function(_0xb12dx45){var _0xb12dx46=document[_0x74c6[339]](_0x74c6[344]);_0xb12dx46[_0x74c6[340]]= _0xb12dx45;return _0xb12dx46};EditorUi[_0x74c6[10]][_0x74c6[345]]= function(_0xb12dx45){var _0xb12dx46=document[_0x74c6[339]](_0xb12dx45);return _0xb12dx46};EditorUi[_0x74c6[10]][_0x74c6[346]]= function(_0xb12dx45){var _0xb12dx46=document[_0x74c6[339]](_0x74c6[347]);_0xb12dx46[_0x74c6[340]]= _0xb12dx45;return _0xb12dx46};EditorUi[_0x74c6[10]][_0x74c6[337]]= function(_0xb12dx46,_0xb12dx47,_0xb12dx48,_0xb12dx49){var _0xb12dx4a=null;var _0xb12dx4b=null;function _0xb12dx4c(){return parseInt(((_0xb12dx47)?_0xb12dx46[_0x74c6[6]][_0x74c6[306]]:_0xb12dx46[_0x74c6[6]][_0x74c6[305]]))}function _0xb12dx4d(_0xb12dx6){if(_0xb12dx4a!= null){var _0xb12dx4e= new mxPoint(mxEvent[_0x74c6[348]](_0xb12dx6),mxEvent[_0x74c6[349]](_0xb12dx6));_0xb12dx49(Math[_0x74c6[299]](0,_0xb12dx4b+ ((_0xb12dx47)?(_0xb12dx4e[_0x74c6[350]]- _0xb12dx4a[_0x74c6[350]]):(_0xb12dx4a[_0x74c6[351]]- _0xb12dx4e[_0x74c6[351]]))- _0xb12dx48));mxEvent[_0x74c6[74]](_0xb12dx6)}}function _0xb12dx4f(_0xb12dx6){_0xb12dx4d(_0xb12dx6);_0xb12dx4a= null;_0xb12dx4b= null}mxEvent[_0x74c6[82]](_0xb12dx46,function(_0xb12dx6){_0xb12dx4a=  new mxPoint(mxEvent[_0x74c6[348]](_0xb12dx6),mxEvent[_0x74c6[349]](_0xb12dx6));_0xb12dx4b= _0xb12dx4c();mxEvent[_0x74c6[74]](_0xb12dx6)});mxEvent[_0x74c6[33]](document,_0x74c6[352],_0xb12dx4d);mxEvent[_0x74c6[33]](document,_0x74c6[353],_0xb12dx4d);mxEvent[_0x74c6[33]](document,_0x74c6[354],_0xb12dx4f);mxEvent[_0x74c6[33]](document,_0x74c6[355],_0xb12dx4f)};EditorUi[_0x74c6[10]][_0x74c6[73]]= function(_0xb12dx46,_0xb12dx3d,_0xb12dx3e,_0xb12dx50,_0xb12dx51,_0xb12dx52){this[_0x74c6[356]]();this[_0x74c6[357]]=  new Dialog(this,_0xb12dx46,_0xb12dx3d,(mxClient[_0x74c6[358]])?_0xb12dx3e- 12:_0xb12dx3e,_0xb12dx50,_0xb12dx51,_0xb12dx52)};EditorUi[_0x74c6[10]][_0x74c6[356]]= function(){if(this[_0x74c6[357]]!= null){this[_0x74c6[357]][_0x74c6[359]]();this[_0x74c6[357]]= null;this[_0x74c6[0]][_0x74c6[4]][_0x74c6[1]][_0x74c6[47]]()}};EditorUi[_0x74c6[10]][_0x74c6[360]]= function(_0xb12dx53){if(!_0xb12dx53&& this[_0x74c6[0]][_0x74c6[125]]!= null){this[_0x74c6[172]](this[_0x74c6[0]][_0x74c6[361]]())}else {this[_0x74c6[73]]( new SaveDialog(this)[_0x74c6[1]],300,100,true,true)}};EditorUi[_0x74c6[10]][_0x74c6[362]]= function(_0xb12dx53){if(!_0xb12dx53&& this[_0x74c6[0]][_0x74c6[125]]!= null){this[_0x74c6[224]](this[_0x74c6[0]][_0x74c6[361]]())}else {}};EditorUi[_0x74c6[10]][_0x74c6[363]]= function(_0xb12dx54,_0xb12dx55,_0xb12dx56){var _0xb12dx3=this[_0x74c6[0]][_0x74c6[4]];var _0xb12dxb=_0xb12dx3[_0x74c6[264]]();_0xb12dx55= this[_0x74c6[364]]!= null?this[_0x74c6[364]]:_0xb12dx55;_0xb12dx3[_0x74c6[65]]()[_0x74c6[365]]();try{_0xb12dx54[_0x74c6[366]](_0xb12dx3[_0x74c6[222]](),_0xb12dxb)}catch(e){throw e}finally{if(_0xb12dx55&& navigator[_0x74c6[368]][_0x74c6[69]](_0x74c6[367])< 0){var _0xb12dx57= new mxMorphing(_0xb12dx3);_0xb12dx57[_0x74c6[33]](mxEvent.DONE,mxUtils[_0x74c6[20]](this,function(){_0xb12dx3[_0x74c6[65]]()[_0x74c6[369]]()}));_0xb12dx57[_0x74c6[370]]()}else {_0xb12dx3[_0x74c6[65]]()[_0x74c6[369]]()}}};EditorUi[_0x74c6[10]][_0x74c6[97]]= function(_0xb12dx1){var _0xb12dx3=this[_0x74c6[0]][_0x74c6[4]];var _0xb12dxf= new mxKeyHandler(_0xb12dx3);_0xb12dxf[_0x74c6[371]]= function(_0xb12dx6){return mxEvent[_0x74c6[371]](_0xb12dx6)|| (mxClient[_0x74c6[372]]&& _0xb12dx6[_0x74c6[373]])};function _0xb12dx58(_0xb12dx59){if(!_0xb12dx3[_0x74c6[245]]()){var _0xb12dx48=0;var _0xb12dx5a=0;if(_0xb12dx59== 37){_0xb12dx48=  -1}else {if(_0xb12dx59== 38){_0xb12dx5a=  -1}else {if(_0xb12dx59== 39){_0xb12dx48= 1}else {if(_0xb12dx59== 40){_0xb12dx5a= 1}}}};_0xb12dx3[_0x74c6[374]](_0xb12dx3[_0x74c6[246]](),_0xb12dx48,_0xb12dx5a);_0xb12dx3[_0x74c6[375]](_0xb12dx3[_0x74c6[264]]())}}var _0xb12dx5b=mxUtils[_0x74c6[20]](this,function(_0xb12dx5c,_0xb12dx5d,_0xb12dx26,_0xb12dx5e){var _0xb12dx5f=this[_0x74c6[12]][_0x74c6[112]](_0xb12dx26);if(_0xb12dx5f!= null){var _0xb12dx20=function(){if(_0xb12dx5f[_0x74c6[376]]){_0xb12dx5f[_0x74c6[377]]()}};if(_0xb12dx5d){if(_0xb12dx5e){_0xb12dxf[_0x74c6[378]](_0xb12dx5c,_0xb12dx20)}else {_0xb12dxf[_0x74c6[379]](_0xb12dx5c,_0xb12dx20)}}else {if(_0xb12dx5e){_0xb12dxf[_0x74c6[380]](_0xb12dx5c,_0xb12dx20)}else {_0xb12dxf[_0x74c6[381]](_0xb12dx5c,_0xb12dx20)}}}});var _0xb12dx60=this;var _0xb12dx61=_0xb12dxf[_0x74c6[382]];_0xb12dxf[_0x74c6[382]]= function(_0xb12dx6){_0xb12dx60[_0x74c6[356]]();_0xb12dx61[_0x74c6[50]](this,arguments)};_0xb12dxf[_0x74c6[383]]= function(){};_0xb12dxf[_0x74c6[381]](8,function(){_0xb12dx3[_0x74c6[384]](true)});_0xb12dxf[_0x74c6[381]](13,function(){_0xb12dx3[_0x74c6[384]](false)});_0xb12dxf[_0x74c6[381]](33,function(){_0xb12dx3[_0x74c6[288]]()});_0xb12dxf[_0x74c6[381]](34,function(){_0xb12dx3[_0x74c6[289]]()});_0xb12dxf[_0x74c6[381]](36,function(){_0xb12dx3[_0x74c6[287]]()});_0xb12dxf[_0x74c6[381]](35,function(){_0xb12dx3[_0x74c6[15]]()});_0xb12dxf[_0x74c6[381]](37,function(){_0xb12dx58(37)});_0xb12dxf[_0x74c6[381]](38,function(){_0xb12dx58(38)});_0xb12dxf[_0x74c6[381]](39,function(){_0xb12dx58(39)});_0xb12dxf[_0x74c6[381]](40,function(){_0xb12dx58(40)});_0xb12dxf[_0x74c6[381]](113,function(){_0xb12dx3[_0x74c6[70]]()});_0xb12dx5b(46,false,_0x74c6[247]);_0xb12dx5b(82,true,_0x74c6[257]);_0xb12dx5b(83,true,_0x74c6[172]);_0xb12dx5b(83,true,_0x74c6[180],true);_0xb12dx5b(107,false,_0x74c6[385]);_0xb12dx5b(109,false,_0x74c6[386]);_0xb12dx5b(65,true,_0x74c6[387]);_0xb12dx5b(86,true,_0x74c6[388],true);_0xb12dx5b(69,true,_0x74c6[389],true);_0xb12dx5b(69,true,_0x74c6[390]);_0xb12dx5b(66,true,_0x74c6[253]);_0xb12dx5b(70,true,_0x74c6[252]);_0xb12dx5b(68,true,_0x74c6[248]);_0xb12dx5b(90,true,_0x74c6[241]);_0xb12dx5b(89,true,_0x74c6[242]);_0xb12dx5b(88,true,_0x74c6[115]);_0xb12dx5b(67,true,_0x74c6[116]);_0xb12dx5b(81,true,_0x74c6[391]);_0xb12dx5b(86,true,_0x74c6[111]);_0xb12dx5b(71,true,_0x74c6[263]);_0xb12dx5b(71,true,_0x74c6[392],true);_0xb12dx5b(85,true,_0x74c6[265]);_0xb12dx5b(112,false,_0x74c6[393]);_0xb12dx5b(80,true,_0x74c6[224],true);return _0xb12dxf};EditorUi[_0x74c6[10]][_0x74c6[58]]= function(_0xb12dx3,_0xb12dx36,_0xb12dx62,_0xb12dx63){for(var _0xb12dx37=0;_0xb12dx37< _0xb12dx36[_0x74c6[143]];_0xb12dx37++){_0xb12dx3[_0x74c6[396]]( new mxMultiplicity(true,_0xb12dx36[_0xb12dx37],null,null,_0xb12dx62[_0xb12dx37][0],_0xb12dx62[_0xb12dx37][1],null,mxResources[_0x74c6[112]](_0xb12dx36[_0xb12dx37])+ _0x74c6[394]+ _0xb12dx62[_0xb12dx37][0]+ _0x74c6[395],null));_0xb12dx3[_0x74c6[396]]( new mxMultiplicity(false,_0xb12dx36[_0xb12dx37],null,null,_0xb12dx63[_0xb12dx37][0],_0xb12dx63[_0xb12dx37][1],null,mxResources[_0x74c6[112]](_0xb12dx36[_0xb12dx37])+ _0x74c6[394]+ _0xb12dx63[_0xb12dx37][0]+ _0x74c6[397],null))}}
\ No newline at end of file
diff --git a/public/assets/plugins/jscripty/js/Graph.js b/public/assets/plugins/jscripty/js/Graph.js
index dda2a33..5626052 100644
--- a/public/assets/plugins/jscripty/js/Graph.js
+++ b/public/assets/plugins/jscripty/js/Graph.js
@@ -1,644 +1 @@
-/**
- * $Id: Graph.js,v 1.14 2013-02-16 10:19:54 gaudenz Exp $
- * Copyright (c) 2006-2012, JGraph Ltd
- */
-/**
- * Constructs a new graph instance. Note that the constructor does not take a
- * container because the graph instance is needed for creating the UI, which
- * in turn will create the container for the graph. Hence, the container is
- * assigned later in EditorUi.
- */
-Graph = function(container, model, renderHint, stylesheet) {
-	mxGraph.call(this, container, model, renderHint, stylesheet);
-
-	this.setConnectable(true);
-	this.setDropEnabled(false);
-	this.setPanning(true);
-	this.setTooltips(!mxClient.IS_TOUCH);
-	this.setAllowLoops(false);
-	this.setMultigraph(false);
-	this.allowAutoPanning = true;
-	this.resetEdgesOnConnect = false;
-	this.constrainChildren = false;
-
-	// Centers the port icon on the target port
-	this.connectionHandler.targetConnectImage = true;
-
-	// Does not allow dangling edges
-	this.setAllowDanglingEdges(false);
-
-	// Enables cloning of connection sources
-	this.connectionHandler.setCreateTarget(false);
-
-	// Disables built-in connection starts
-	this.connectionHandler.isValidSource = function() {
-		return mxConnectionHandler.prototype.isValidSource.apply(this, arguments) && urlParams['connect'] != '2';
-	};
-
-	// Sets the style to be used when an elbow edge is double clicked
-	this.alternateEdgeStyle = 'vertical';
-
-	if (stylesheet == null) {
-		this.loadStylesheet();
-	}
-
-	// Creates rubberband selection
-	var rubberband = new mxRubberband(this);
-
-	this.getRubberband = function() {
-		return rubberband;
-	};
-
-	// Shows hand cursor while panning
-	this.panningHandler.addListener(mxEvent.PAN_START, mxUtils.bind(this, function() {
-		this.container.style.cursor = 'pointer';
-	}));
-
-	this.panningHandler.addListener(mxEvent.PAN_END, mxUtils.bind(this, function() {
-		this.container.style.cursor = 'default';
-	}));
-
-	// Adds support for HTML labels via style. Note: Currently, only the Java
-	// backend supports HTML labels but CSS support is limited to the following:
-	// http://docs.oracle.com/javase/6/docs/api/index.html?javax/swing/text/html/CSS.html
-	this.isHtmlLabel = function(cell) {
-		var state = this.view.getState(cell);
-		var style = (state != null) ? state.style : this.getCellStyle(cell);
-
-		return style['html'] == '1' || style['whiteSpace'] == 'wrap';
-	};
-
-	// HTML entities are displayed as plain text in wrapped plain text labels
-	this.cellRenderer.getLabelValue = function(state) {
-		var result = mxCellRenderer.prototype.getLabelValue.apply(this, arguments);
-
-		if (state.style['whiteSpace'] == 'wrap' && state.style['html'] != 1) {
-			result = mxUtils.htmlEntities(result, false);
-		}
-
-		return result;
-	};
-
-	// Unlocks all cells
-	this.isCellLocked = function(cell) {
-		return false;
-	};
-
-	// Tap and hold brings up context menu.
-	// Tolerance slightly below graph tolerance is better.
-	this.connectionHandler.tapAndHoldTolerance = 16;
-
-	//  Tap and hold on background starts rubberband on cell starts connecting
-	var connectionHandlerTapAndHold = this.connectionHandler.tapAndHold;
-	this.connectionHandler.tapAndHold = function(me, state) {
-		if (state == null) {
-			if (!this.graph.panningHandler.active) {
-				rubberband.start(me.getGraphX(), me.getGraphY());
-				this.graph.panningHandler.panningTrigger = false;
-			}
-		} else if (tapAndHoldStartsConnection) {
-			connectionHandlerTapAndHold.apply(this, arguments);
-		} else if (this.graph.isCellSelected(state.cell) && this.graph.getSelectionCount() > 1) {
-			this.graph.removeSelectionCell(state.cell);
-		}
-	};
-
-	if (touchStyle) {
-		this.initTouch();
-	}
-};
-
-// Graph inherits from mxGraph
-mxUtils.extend(Graph, mxGraph);
-
-/**
- * Allows to all values in fit.
- */
-Graph.prototype.minFitScale = null;
-
-/**
- * Allows to all values in fit.
- */
-Graph.prototype.maxFitScale = null;
-
-/**
- * Loads the stylesheet for this graph.
- */
-Graph.prototype.loadStylesheet = function() {
-	var node = mxUtils.load(STYLE_PATH + '/default.xml').getDocumentElement();
-	var dec = new mxCodec(node.ownerDocument);
-	dec.decode(node, this.getStylesheet());
-};
-
-/**
- * Inverts the elbow edge style without removing existing styles.
- */
-Graph.prototype.flipEdge = function(edge) {
-	if (edge != null) {
-		var state = this.view.getState(edge);
-		var style = (state != null) ? state.style : this.getCellStyle(edge);
-
-		if (style != null) {
-			var elbow = mxUtils.getValue(style, mxConstants.STYLE_ELBOW,
-				mxConstants.ELBOW_HORIZONTAL);
-			var value = (elbow == mxConstants.ELBOW_HORIZONTAL) ?
-				mxConstants.ELBOW_VERTICAL : mxConstants.ELBOW_HORIZONTAL;
-			this.setCellStyles(mxConstants.STYLE_ELBOW, value, [edge]);
-		}
-	}
-};
-
-/**
- * Sets the default edge for future connections.
- */
-Graph.prototype.setDefaultEdge = function(cell) {
-	if (cell != null && this.getModel().isEdge(cell)) {
-		// Take a snapshot of the cell at the moment of calling
-		var proto = this.getModel().cloneCells([cell])[0];
-
-		// Delete existing points
-		if (proto.geometry != null) {
-			proto.geometry.points = null;
-		}
-
-		// Delete entry-/exitXY styles
-		var style = proto.getStyle();
-		style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_X, null);
-		style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_Y, null);
-		style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_X, null);
-		style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_Y, null);
-		proto.setStyle(style);
-
-		// Uses edge template for connect preview
-		this.connectionHandler.createEdgeState = function(me) {
-			return this.graph.view.createState(proto);
-		};
-
-		// Creates new connections from edge template
-		this.connectionHandler.factoryMethod = function() {
-			return this.graph.cloneCells([proto])[0];
-		};
-	}
-};
-
-/**
- * Disables folding for non-swimlanes.
- */
-Graph.prototype.isCellFoldable = function(cell) {
-	return this.foldingEnabled && this.isSwimlane(cell);
-};
-
-/**
- * Disables drill-down for non-swimlanes.
- */
-Graph.prototype.isValidRoot = function(cell) {
-	return this.isSwimlane(cell);
-};
-
-/**
- * Overrides createGroupCell to set the group style for new groups to 'group'.
- */
-Graph.prototype.createGroupCell = function() {
-	var group = mxGraph.prototype.createGroupCell.apply(this, arguments);
-	group.setStyle('group');
-
-	return group;
-};
-
-/**
- * Giuseppe Careri
- * Overrides tooltips to show position and size
- */
-Graph.prototype.getTooltipForCell = function(cell) {
-	var tip = '';
-
-	if (this.getModel().isVertex(cell)) {
-		// var geo = this.getCellGeometry(cell);
-
-		// var f2 = function(x)
-		// {
-		// 	return Math.round(parseFloat(x) * 100) / 100;
-		// };
-
-		// if (geo != null)
-		// {
-		// 	if (tip == null)
-		// 	{
-		// 		tip = '';
-		// 	}
-		// 	else if (tip.length > 0)
-		// 	{
-		// 		tip += '\n';
-		// 	}
-
-		// 	tip += 'X: ' + f2(geo.x) + '\nY: ' + f2(geo.y) + '\nW: ' + f2(geo.width) + '\nH: ' + f2(geo.height);
-		// }
-
-		tip += mxResources.get('description_' + cell.value.nodeName) || '';
-	} else if (this.getModel().isEdge(cell)) {
-		tip = mxGraph.prototype.getTooltipForCell.apply(this, arguments);
-	}
-
-	return tip;
-};
-
-/**
- * Giuseppe Careri
- * Returns the label for the given cell.
- */
-Graph.prototype.convertValueToString = function(cell) {
-	if (cell.value != null && typeof(cell.value) == 'object') {
-		return cell.value.getAttribute('label');
-	}
-
-	return mxGraph.prototype.convertValueToString.apply(this, arguments);
-};
-
-/**
- * Giuseppe Careri
- * Handles label changes for XML user objects.
- */
-Graph.prototype.cellLabelChanged = function(cell, value, autoSize) {
-	if (cell.value != null && typeof(cell.value) == 'object') {
-		var tmp = cell.value.cloneNode(true);
-		tmp.setAttribute('label', value);
-		value = tmp;
-	}
-
-	mxGraph.prototype.cellLabelChanged.apply(this, arguments);
-};
-
-/**
- * Sets the link for the given cell.
- */
-Graph.prototype.setLinkForCell = function(cell, link) {
-	var value = null;
-
-	if (cell.value != null && typeof(cell.value) == 'object') {
-		value = cell.value.cloneNode(true);
-	} else {
-		var doc = mxUtils.createXmlDocument();
-
-		value = doc.createElement('UserObject');
-		value.setAttribute('label', cell.value);
-	}
-
-	if (link != null && link.length > 0) {
-		value.setAttribute('link', link);
-	} else {
-		value.removeAttribute('link');
-	}
-
-	this.model.setValue(cell, value);
-};
-
-/**
- * Returns the link for the given cell.
- */
-Graph.prototype.getLinkForCell = function(cell) {
-	if (cell.value != null && typeof(cell.value) == 'object') {
-		return cell.value.getAttribute('link');
-	}
-
-	return null;
-};
-
-/**
- * Customized graph for touch devices.
- */
-Graph.prototype.initTouch = function() {
-	// Disables new connections via "hotspot"
-	this.connectionHandler.marker.isEnabled = function() {
-		return this.graph.connectionHandler.first != null;
-	};
-
-	// Hides menu when editing starts
-	this.addListener(mxEvent.START_EDITING, function(sender, evt) {
-		this.panningHandler.hideMenu();
-	});
-
-	// Context menu for touchstyle
-	var showMenu = false;
-	var menuCell = null;
-
-	// Checks if native hit detection did not return anything and does custom
-	// hit detection for edges to take into account the tolerance
-	this.updateMouseEvent = function(me) {
-		mxGraph.prototype.updateMouseEvent.apply(this, arguments);
-
-		if (me.getState() == null) {
-			var cell = this.getCellAt(me.graphX, me.graphY);
-
-			if (this.getModel().isEdge(cell)) {
-				me.state = this.view.getState(cell);
-
-				if (me.state != null && me.state.shape != null) {
-					this.container.style.cursor = me.state.shape.node.style.cursor;
-				}
-			}
-		}
-
-		if (me.getState() == null) {
-			this.container.style.cursor = 'default';
-		}
-	};
-
-	// Handles popup menu on touch devices (tap selected cell)
-	this.fireMouseEvent = function(evtName, me, sender) {
-		if (evtName == mxEvent.MOUSE_DOWN) {
-			if (!this.panningHandler.isMenuShowing()) {
-				menuCell = me.getCell();
-				showMenu = (menuCell != null) ? this.isCellSelected(menuCell) : this.isSelectionEmpty();
-			} else {
-				showMenu = false;
-				menuCell = null;
-			}
-		} else if (evtName == mxEvent.MOUSE_UP) {
-			if (showMenu && !this.isEditing()) {
-				if (!this.panningHandler.isMenuShowing()) {
-					var x = mxEvent.getClientX(me.getEvent());
-					var y = mxEvent.getClientY(me.getEvent());
-
-					this.panningHandler.popup(x + 16, y, menuCell, me.getEvent());
-				}
-
-				showMenu = false;
-				menuCell = null;
-				me.consume();
-
-				return;
-			}
-
-			showMenu = false;
-			menuCell = null;
-		}
-
-		mxGraph.prototype.fireMouseEvent.apply(this, arguments);
-
-		if (evtName == mxEvent.MOUSE_MOVE && me.isConsumed()) {
-			showMenu = false;
-			menuCell = null;
-		}
-	};
-};
-
-/**
- * Implements touch devices.
- */
-(function() {
-	// Enables rotation handle
-	mxVertexHandler.prototype.rotationEnabled = true;
-
-	// Matches label positions of mxGraph 1.x
-	mxText.prototype.baseSpacingTop = 5;
-	mxText.prototype.baseSpacingBottom = 1;
-
-	// Touch-specific static overrides
-	if (touchStyle) {
-		// Sets constants for touch style
-		mxConstants.HANDLE_SIZE = 16;
-		mxConstants.LABEL_HANDLE_SIZE = 7;
-
-		// Larger tolerance and grid for real touch devices
-		if (mxClient.IS_TOUCH) {
-			mxVertexHandler.prototype.tolerance = 4;
-			mxEdgeHandler.prototype.tolerance = 6;
-			Graph.prototype.tolerance = 14;
-			Graph.prototype.gridSize = 20;
-
-			// One finger pans (no rubberband selection) must start regardless of mouse button
-			mxPanningHandler.prototype.selectOnPopup = false;
-			mxPanningHandler.prototype.useLeftButtonForPanning = true;
-			mxPanningHandler.prototype.isPanningTrigger = function(me) {
-				var evt = me.getEvent();
-
-				return (this.useLeftButtonForPanning && (this.ignoreCell || me.getState() == null)
-					/* &&
-								 			mxEvent.isLeftMouseButton(evt)*/
-				) || (mxEvent.isControlDown(evt) &&
-					mxEvent.isShiftDown(evt)) || (this.usePopupTrigger &&
-					mxEvent.isPopupTrigger(evt));
-			};
-		}
-
-		// Don't clear selection if multiple cells selected
-		var graphHandlerMouseDown = mxGraphHandler.prototype.mouseDown;
-		mxGraphHandler.prototype.mouseDown = function(sender, me) {
-			graphHandlerMouseDown.apply(this, arguments);
-
-			if (this.graph.isCellSelected(me.getCell()) && this.graph.getSelectionCount() > 1) {
-				this.delayedSelection = false;
-			}
-		};
-
-		// Changes order of panninghandler
-		Graph.prototype.createHandlers = function(container) {
-			this.tooltipHandler = new mxTooltipHandler(this);
-			this.tooltipHandler.setEnabled(false);
-			// Selection cells first
-			this.selectionCellsHandler = new mxSelectionCellsHandler(this);
-			this.panningHandler = new mxPanningHandler(this);
-			this.panningHandler.panningEnabled = false;
-			this.connectionHandler = new mxConnectionHandler(this);
-			this.connectionHandler.setEnabled(false);
-			this.graphHandler = new mxGraphHandler(this);
-		};
-
-		// On connect the target is selected and we clone the cell of the preview edge for insert
-		mxConnectionHandler.prototype.selectCells = function(edge, target) {
-			if (touchStyle && target != null) {
-				this.graph.setSelectionCell(target);
-			} else {
-				this.graph.setSelectionCell(edge);
-			}
-		};
-
-		// Overrides double click handling to use the tolerance
-		// FIXME: Double click on edges in iPad needs focus on textarea
-		var graphDblClick = mxGraph.prototype.dblClick;
-		Graph.prototype.dblClick = function(evt, cell) {
-			if (cell == null) {
-				var pt = mxUtils.convertPoint(this.container,
-					mxEvent.getClientX(evt), mxEvent.getClientY(evt));
-				cell = this.getCellAt(pt.x, pt.y);
-			}
-
-			graphDblClick.call(this, evt, cell);
-		};
-
-		// Rounded edge and vertex handles
-		var touchHandle = new mxImage(IMAGE_PATH + '/touch-handle.png', 16, 16);
-		mxVertexHandler.prototype.handleImage = touchHandle;
-		mxEdgeHandler.prototype.handleImage = touchHandle;
-		mxOutline.prototype.sizerImage = touchHandle;
-
-		// Pre-fetches touch handle
-		new Image().src = touchHandle.src;
-
-		// Adds connect icon to selected vertices
-		var connectorSrc = IMAGE_PATH + '/touch-connector.png';
-
-		var vertexHandlerInit = mxVertexHandler.prototype.init;
-		mxVertexHandler.prototype.init = function() {
-			vertexHandlerInit.apply(this, arguments);
-
-			// Only show connector image on one cell and do not show on containers
-			if (showConnectorImg && this.graph.connectionHandler.isEnabled() &&
-				this.graph.isCellConnectable(this.state.cell) &&
-				!this.graph.isValidRoot(this.state.cell) &&
-				this.graph.getSelectionCount() == 1) {
-				this.connectorImg = mxUtils.createImage(connectorSrc);
-				this.connectorImg.style.cursor = 'pointer';
-				this.connectorImg.style.width = '29px';
-				this.connectorImg.style.height = '29px';
-				this.connectorImg.style.position = 'absolute';
-
-				if (!mxClient.IS_TOUCH) {
-					this.connectorImg.setAttribute('title', mxResources.get('connect'));
-					mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state);
-				}
-
-				// Adds 2px tolerance
-				this.connectorImg.style.padding = '2px';
-
-				// Starts connecting on touch/mouse down
-				mxEvent.addGestureListeners(this.connectorImg,
-					mxUtils.bind(this, function(evt) {
-						this.graph.panningHandler.hideMenu();
-						var pt = mxUtils.convertPoint(this.graph.container,
-							mxEvent.getClientX(evt), mxEvent.getClientY(evt));
-						this.graph.connectionHandler.start(this.state, pt.x, pt.y);
-						this.graph.isMouseDown = true;
-						mxEvent.consume(evt);
-					})
-				);
-
-				this.graph.container.appendChild(this.connectorImg);
-			}
-
-			this.redrawTools();
-		};
-
-		var vertexHandlerRedraw = mxVertexHandler.prototype.redraw;
-		mxVertexHandler.prototype.redraw = function() {
-			vertexHandlerRedraw.apply(this);
-			this.redrawTools();
-		};
-
-		mxVertexHandler.prototype.redrawTools = function() {
-			if (this.state != null && this.connectorImg != null) {
-				// Top right for single-sizer
-				if (mxVertexHandler.prototype.singleSizer) {
-					this.connectorImg.style.left = (this.state.x + this.state.width - this.connectorImg.offsetWidth / 2) + 'px';
-					this.connectorImg.style.top = (this.state.y - this.connectorImg.offsetHeight / 2) + 'px';
-				} else {
-					this.connectorImg.style.left = (this.state.x + this.state.width + mxConstants.HANDLE_SIZE / 2 + 4 /* - 2 padding*/ ) + 'px';
-					this.connectorImg.style.top = (this.state.y + (this.state.height - this.connectorImg.offsetHeight) / 2) + 'px';
-				}
-			}
-		};
-
-		var vertexHandlerDestroy = mxVertexHandler.prototype.destroy;
-		mxVertexHandler.prototype.destroy = function(sender, me) {
-			vertexHandlerDestroy.apply(this, arguments);
-
-			if (this.connectorImg != null) {
-				this.connectorImg.parentNode.removeChild(this.connectorImg);
-				this.connectorImg = null;
-			}
-		};
-
-		// Pre-fetches touch connector
-		new Image().src = connectorSrc;
-	} else {
-		var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15);
-		mxConnectionHandler.prototype.connectImage = img;
-
-		// Pre-fetches img
-		new Image().src = img.src;
-
-		if (urlParams['connect'] == '2') // not touchStyle
-		{
-			var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15);
-
-			var vertexHandlerInit = mxVertexHandler.prototype.init;
-			mxVertexHandler.prototype.init = function() {
-				vertexHandlerInit.apply(this, arguments);
-
-				// Only show connector image on one cell and do not show on containers
-				if (showConnectorImg && this.graph.connectionHandler.isEnabled() &&
-					this.graph.isCellConnectable(this.state.cell) &&
-					!this.graph.isValidRoot(this.state.cell) &&
-					this.graph.getSelectionCount() == 1) {
-					// Workaround for event redirection via image tag in quirks and IE8
-					if (mxClient.IS_IE && !mxClient.IS_SVG) {
-						this.connectorImg = document.createElement('div');
-						this.connectorImg.style.backgroundImage = 'url(' + img.src + ')';
-						this.connectorImg.style.backgroundPosition = 'center';
-						this.connectorImg.style.backgroundRepeat = 'no-repeat';
-						this.connectorImg.style.width = (img.width + 4) + 'px';
-						this.connectorImg.style.height = (img.height + 4) + 'px';
-						this.connectorImg.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
-					} else {
-						this.connectorImg = mxUtils.createImage(img.src);
-						this.connectorImg.style.width = img.width + 'px';
-						this.connectorImg.style.height = img.height + 'px';
-					}
-
-					this.connectorImg.style.cursor = 'pointer';
-					this.connectorImg.style.position = 'absolute';
-					this.connectorImg.setAttribute('title', mxResources.get('connect'));
-					mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state);
-
-					// Adds 2px tolerance
-					this.connectorImg.style.padding = '2px';
-
-					// Starts connecting on touch/mouse down
-					mxEvent.addListener(this.connectorImg, 'mousedown',
-						mxUtils.bind(this, function(evt) {
-							this.graph.panningHandler.hideMenu();
-							var pt = mxUtils.convertPoint(this.graph.container,
-								mxEvent.getClientX(evt), mxEvent.getClientY(evt));
-							this.graph.connectionHandler.start(this.state, pt.x, pt.y);
-							this.graph.isMouseDown = true;
-							mxEvent.consume(evt);
-						})
-					);
-
-					this.graph.container.appendChild(this.connectorImg);
-				}
-
-				this.redrawTools();
-			};
-
-			var vertexHandlerRedraw = mxVertexHandler.prototype.redraw;
-			mxVertexHandler.prototype.redraw = function() {
-				vertexHandlerRedraw.apply(this);
-				this.redrawTools();
-			};
-
-			mxVertexHandler.prototype.redrawTools = function() {
-				if (this.state != null && this.connectorImg != null) {
-					// Top right for single-sizer
-					if (mxVertexHandler.prototype.singleSizer) {
-						this.connectorImg.style.left = (this.state.x + this.state.width - this.connectorImg.offsetWidth / 2) + 'px';
-						this.connectorImg.style.top = (this.state.y - this.connectorImg.offsetHeight / 2) + 'px';
-					} else {
-						this.connectorImg.style.left = (this.state.x + this.state.width + mxConstants.HANDLE_SIZE / 2 + 2 /* - 2 padding*/ ) + 'px';
-						this.connectorImg.style.top = (this.state.y + (this.state.height - this.connectorImg.offsetHeight) / 2) + 'px';
-					}
-				}
-			};
-
-			var vertexHandlerDestroy = mxVertexHandler.prototype.destroy;
-			mxVertexHandler.prototype.destroy = function(sender, me) {
-				vertexHandlerDestroy.apply(this, arguments);
-
-				if (this.connectorImg != null) {
-					this.connectorImg.parentNode.removeChild(this.connectorImg);
-					this.connectorImg = null;
-				}
-			};
-		}
-	}
-})();
+var _0x31e9=["\x63\x61\x6C\x6C","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x73\x65\x74\x44\x72\x6F\x70\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x50\x61\x6E\x6E\x69\x6E\x67","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x4C\x6F\x6F\x70\x73","\x73\x65\x74\x4D\x75\x6C\x74\x69\x67\x72\x61\x70\x68","\x61\x6C\x6C\x6F\x77\x41\x75\x74\x6F\x50\x61\x6E\x6E\x69\x6E\x67","\x72\x65\x73\x65\x74\x45\x64\x67\x65\x73\x4F\x6E\x43\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64\x72\x65\x6E","\x74\x61\x72\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x44\x61\x6E\x67\x6C\x69\x6E\x67\x45\x64\x67\x65\x73","\x73\x65\x74\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x69\x73\x56\x61\x6C\x69\x64\x53\x6F\x75\x72\x63\x65","\x61\x70\x70\x6C\x79","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x6E\x65\x63\x74","\x32","\x61\x6C\x74\x65\x72\x6E\x61\x74\x65\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x76\x65\x72\x74\x69\x63\x61\x6C","\x6C\x6F\x61\x64\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x67\x65\x74\x52\x75\x62\x62\x65\x72\x62\x61\x6E\x64","\x63\x75\x72\x73\x6F\x72","\x73\x74\x79\x6C\x65","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x70\x6F\x69\x6E\x74\x65\x72","\x62\x69\x6E\x64","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x64\x65\x66\x61\x75\x6C\x74","\x69\x73\x48\x74\x6D\x6C\x4C\x61\x62\x65\x6C","\x67\x65\x74\x53\x74\x61\x74\x65","\x76\x69\x65\x77","\x67\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x68\x74\x6D\x6C","\x31","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x77\x72\x61\x70","\x67\x65\x74\x4C\x61\x62\x65\x6C\x56\x61\x6C\x75\x65","\x63\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72","\x68\x74\x6D\x6C\x45\x6E\x74\x69\x74\x69\x65\x73","\x69\x73\x43\x65\x6C\x6C\x4C\x6F\x63\x6B\x65\x64","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64","\x61\x63\x74\x69\x76\x65","\x67\x72\x61\x70\x68","\x67\x65\x74\x47\x72\x61\x70\x68\x58","\x67\x65\x74\x47\x72\x61\x70\x68\x59","\x73\x74\x61\x72\x74","\x70\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x63\x65\x6C\x6C","\x69\x73\x43\x65\x6C\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x72\x65\x6D\x6F\x76\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x69\x6E\x69\x74\x54\x6F\x75\x63\x68","\x65\x78\x74\x65\x6E\x64","\x6D\x69\x6E\x46\x69\x74\x53\x63\x61\x6C\x65","\x6D\x61\x78\x46\x69\x74\x53\x63\x61\x6C\x65","\x67\x65\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x2F\x64\x65\x66\x61\x75\x6C\x74\x2E\x78\x6D\x6C","\x6C\x6F\x61\x64","\x6F\x77\x6E\x65\x72\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x67\x65\x74\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x64\x65\x63\x6F\x64\x65","\x66\x6C\x69\x70\x45\x64\x67\x65","\x67\x65\x74\x56\x61\x6C\x75\x65","\x45\x4C\x42\x4F\x57\x5F\x48\x4F\x52\x49\x5A\x4F\x4E\x54\x41\x4C","\x45\x4C\x42\x4F\x57\x5F\x56\x45\x52\x54\x49\x43\x41\x4C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x69\x73\x45\x64\x67\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x63\x6C\x6F\x6E\x65\x43\x65\x6C\x6C\x73","\x67\x65\x6F\x6D\x65\x74\x72\x79","\x70\x6F\x69\x6E\x74\x73","\x67\x65\x74\x53\x74\x79\x6C\x65","\x73\x65\x74\x53\x74\x79\x6C\x65","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x53\x74\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x65","\x66\x61\x63\x74\x6F\x72\x79\x4D\x65\x74\x68\x6F\x64","\x69\x73\x43\x65\x6C\x6C\x46\x6F\x6C\x64\x61\x62\x6C\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x63\x72\x65\x61\x74\x65\x47\x72\x6F\x75\x70\x43\x65\x6C\x6C","\x67\x72\x6F\x75\x70","\x67\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x46\x6F\x72\x43\x65\x6C\x6C","","\x69\x73\x56\x65\x72\x74\x65\x78","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x5F","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x67\x65\x74","\x63\x6F\x6E\x76\x65\x72\x74\x56\x61\x6C\x75\x65\x54\x6F\x53\x74\x72\x69\x6E\x67","\x6F\x62\x6A\x65\x63\x74","\x6C\x61\x62\x65\x6C","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x65\x6C\x6C\x4C\x61\x62\x65\x6C\x43\x68\x61\x6E\x67\x65\x64","\x63\x6C\x6F\x6E\x65\x4E\x6F\x64\x65","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x73\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x55\x73\x65\x72\x4F\x62\x6A\x65\x63\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6E\x6B","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x73\x65\x74\x56\x61\x6C\x75\x65","\x6D\x6F\x64\x65\x6C","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x6D\x61\x72\x6B\x65\x72","\x66\x69\x72\x73\x74","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x75\x70\x64\x61\x74\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x67\x72\x61\x70\x68\x58","\x67\x72\x61\x70\x68\x59","\x67\x65\x74\x43\x65\x6C\x6C\x41\x74","\x73\x74\x61\x74\x65","\x73\x68\x61\x70\x65","\x6E\x6F\x64\x65","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x4D\x4F\x55\x53\x45\x5F\x44\x4F\x57\x4E","\x69\x73\x4D\x65\x6E\x75\x53\x68\x6F\x77\x69\x6E\x67","\x67\x65\x74\x43\x65\x6C\x6C","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x4D\x4F\x55\x53\x45\x5F\x55\x50","\x69\x73\x45\x64\x69\x74\x69\x6E\x67","\x67\x65\x74\x45\x76\x65\x6E\x74","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x70\x6F\x70\x75\x70","\x63\x6F\x6E\x73\x75\x6D\x65","\x4D\x4F\x55\x53\x45\x5F\x4D\x4F\x56\x45","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x45\x6E\x61\x62\x6C\x65\x64","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x54\x6F\x70","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x42\x6F\x74\x74\x6F\x6D","\x48\x41\x4E\x44\x4C\x45\x5F\x53\x49\x5A\x45","\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x53\x49\x5A\x45","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x74\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x67\x72\x69\x64\x53\x69\x7A\x65","\x73\x65\x6C\x65\x63\x74\x4F\x6E\x50\x6F\x70\x75\x70","\x75\x73\x65\x4C\x65\x66\x74\x42\x75\x74\x74\x6F\x6E\x46\x6F\x72\x50\x61\x6E\x6E\x69\x6E\x67","\x69\x73\x50\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x69\x67\x6E\x6F\x72\x65\x43\x65\x6C\x6C","\x69\x73\x43\x6F\x6E\x74\x72\x6F\x6C\x44\x6F\x77\x6E","\x69\x73\x53\x68\x69\x66\x74\x44\x6F\x77\x6E","\x75\x73\x65\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x69\x73\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x6D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x64\x65\x6C\x61\x79\x65\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x63\x6F\x6E\x76\x65\x72\x74\x50\x6F\x69\x6E\x74","\x78","\x79","\x2F\x74\x6F\x75\x63\x68\x2D\x68\x61\x6E\x64\x6C\x65\x2E\x70\x6E\x67","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x67\x65","\x73\x69\x7A\x65\x72\x49\x6D\x61\x67\x65","\x73\x72\x63","\x2F\x74\x6F\x75\x63\x68\x2D\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72\x2E\x70\x6E\x67","\x69\x6E\x69\x74","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72\x49\x6D\x67","\x63\x72\x65\x61\x74\x65\x49\x6D\x61\x67\x65","\x77\x69\x64\x74\x68","\x32\x39\x70\x78","\x68\x65\x69\x67\x68\x74","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x74\x69\x74\x6C\x65","\x72\x65\x64\x69\x72\x65\x63\x74\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74\x73","\x70\x61\x64\x64\x69\x6E\x67","\x32\x70\x78","\x69\x73\x4D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x72\x65\x64\x72\x61\x77\x54\x6F\x6F\x6C\x73","\x72\x65\x64\x72\x61\x77","\x73\x69\x6E\x67\x6C\x65\x53\x69\x7A\x65\x72","\x6C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x57\x69\x64\x74\x68","\x70\x78","\x74\x6F\x70","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x2F\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72\x2E\x70\x6E\x67","\x63\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x49\x53\x5F\x49\x45","\x49\x53\x5F\x53\x56\x47","\x64\x69\x76","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x65\x6E\x74\x65\x72","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x70\x65\x61\x74","\x6E\x6F\x2D\x72\x65\x70\x65\x61\x74","\x64\x69\x73\x70\x6C\x61\x79","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x69\x6E\x6C\x69\x6E\x65","\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E"];Graph= function(_0xd562x1,_0xd562x2,_0xd562x3,_0xd562x4){mxGraph[_0x31e9[0]](this,_0xd562x1,_0xd562x2,_0xd562x3,_0xd562x4);this[_0x31e9[1]](true);this[_0x31e9[2]](false);this[_0x31e9[3]](true);this[_0x31e9[4]](!mxClient.IS_TOUCH);this[_0x31e9[5]](false);this[_0x31e9[6]](false);this[_0x31e9[7]]= true;this[_0x31e9[8]]= false;this[_0x31e9[9]]= false;this[_0x31e9[11]][_0x31e9[10]]= true;this[_0x31e9[12]](false);this[_0x31e9[11]][_0x31e9[13]](false);this[_0x31e9[11]][_0x31e9[14]]= function(){return mxConnectionHandler[_0x31e9[16]][_0x31e9[14]][_0x31e9[15]](this,arguments)&& urlParams[_0x31e9[17]]!= _0x31e9[18]};this[_0x31e9[19]]= _0x31e9[20];if(_0xd562x4== null){this[_0x31e9[21]]()};var _0xd562x5= new mxRubberband(this);this[_0x31e9[22]]= function(){return _0xd562x5};this[_0x31e9[29]][_0x31e9[28]](mxEvent.PAN_START,mxUtils[_0x31e9[27]](this,function(){this[_0x31e9[25]][_0x31e9[24]][_0x31e9[23]]= _0x31e9[26]}));this[_0x31e9[29]][_0x31e9[28]](mxEvent.PAN_END,mxUtils[_0x31e9[27]](this,function(){this[_0x31e9[25]][_0x31e9[24]][_0x31e9[23]]= _0x31e9[30]}));this[_0x31e9[31]]= function(_0xd562x6){var _0xd562x7=this[_0x31e9[33]][_0x31e9[32]](_0xd562x6);var _0xd562x8=(_0xd562x7!= null)?_0xd562x7[_0x31e9[24]]:this[_0x31e9[34]](_0xd562x6);return _0xd562x8[_0x31e9[35]]== _0x31e9[36]|| _0xd562x8[_0x31e9[37]]== _0x31e9[38]};this[_0x31e9[40]][_0x31e9[39]]= function(_0xd562x7){var _0xd562x9=mxCellRenderer[_0x31e9[16]][_0x31e9[39]][_0x31e9[15]](this,arguments);if(_0xd562x7[_0x31e9[24]][_0x31e9[37]]== _0x31e9[38]&& _0xd562x7[_0x31e9[24]][_0x31e9[35]]!= 1){_0xd562x9= mxUtils[_0x31e9[41]](_0xd562x9,false)};return _0xd562x9};this[_0x31e9[42]]= function(_0xd562x6){return false};this[_0x31e9[11]][_0x31e9[43]]= 16;var _0xd562xa=this[_0x31e9[11]][_0x31e9[44]];this[_0x31e9[11]][_0x31e9[44]]= function(_0xd562xb,_0xd562x7){if(_0xd562x7== null){if(!this[_0x31e9[46]][_0x31e9[29]][_0x31e9[45]]){_0xd562x5[_0x31e9[49]](_0xd562xb[_0x31e9[47]](),_0xd562xb[_0x31e9[48]]());this[_0x31e9[46]][_0x31e9[29]][_0x31e9[50]]= false}}else {if(tapAndHoldStartsConnection){_0xd562xa[_0x31e9[15]](this,arguments)}else {if(this[_0x31e9[46]][_0x31e9[52]](_0xd562x7[_0x31e9[51]])&& this[_0x31e9[46]][_0x31e9[53]]()> 1){this[_0x31e9[46]][_0x31e9[54]](_0xd562x7[_0x31e9[51]])}}}};if(touchStyle){this[_0x31e9[55]]()}};mxUtils[_0x31e9[56]](Graph,mxGraph);Graph[_0x31e9[16]][_0x31e9[57]]= null;Graph[_0x31e9[16]][_0x31e9[58]]= null;Graph[_0x31e9[16]][_0x31e9[21]]= function(){var _0xd562xc=mxUtils[_0x31e9[61]](STYLE_PATH+ _0x31e9[60])[_0x31e9[59]]();var _0xd562xd= new mxCodec(_0xd562xc[_0x31e9[62]]);_0xd562xd[_0x31e9[64]](_0xd562xc,this[_0x31e9[63]]())};Graph[_0x31e9[16]][_0x31e9[65]]= function(_0xd562xe){if(_0xd562xe!= null){var _0xd562x7=this[_0x31e9[33]][_0x31e9[32]](_0xd562xe);var _0xd562x8=(_0xd562x7!= null)?_0xd562x7[_0x31e9[24]]:this[_0x31e9[34]](_0xd562xe);if(_0xd562x8!= null){var _0xd562xf=mxUtils[_0x31e9[66]](_0xd562x8,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL);var _0xd562x10=(_0xd562xf== mxConstants[_0x31e9[67]])?mxConstants[_0x31e9[68]]:mxConstants[_0x31e9[67]];this[_0x31e9[69]](mxConstants.STYLE_ELBOW,_0xd562x10,[_0xd562xe])}}};Graph[_0x31e9[16]][_0x31e9[70]]= function(_0xd562x6){if(_0xd562x6!= null&& this[_0x31e9[72]]()[_0x31e9[71]](_0xd562x6)){var _0xd562x11=this[_0x31e9[72]]()[_0x31e9[73]]([_0xd562x6])[0];if(_0xd562x11[_0x31e9[74]]!= null){_0xd562x11[_0x31e9[74]][_0x31e9[75]]= null};var _0xd562x8=_0xd562x11[_0x31e9[76]]();_0xd562x8= mxUtils[_0x31e9[77]](_0xd562x8,mxConstants.STYLE_ENTRY_X,null);_0xd562x8= mxUtils[_0x31e9[77]](_0xd562x8,mxConstants.STYLE_ENTRY_Y,null);_0xd562x8= mxUtils[_0x31e9[77]](_0xd562x8,mxConstants.STYLE_EXIT_X,null);_0xd562x8= mxUtils[_0x31e9[77]](_0xd562x8,mxConstants.STYLE_EXIT_Y,null);_0xd562x11[_0x31e9[77]](_0xd562x8);this[_0x31e9[11]][_0x31e9[78]]= function(_0xd562xb){return this[_0x31e9[46]][_0x31e9[33]][_0x31e9[79]](_0xd562x11)};this[_0x31e9[11]][_0x31e9[80]]= function(){return this[_0x31e9[46]][_0x31e9[73]]([_0xd562x11])[0]}}};Graph[_0x31e9[16]][_0x31e9[81]]= function(_0xd562x6){return this[_0x31e9[82]]&& this[_0x31e9[83]](_0xd562x6)};Graph[_0x31e9[16]][_0x31e9[84]]= function(_0xd562x6){return this[_0x31e9[83]](_0xd562x6)};Graph[_0x31e9[16]][_0x31e9[85]]= function(){var _0xd562x12=mxGraph[_0x31e9[16]][_0x31e9[85]][_0x31e9[15]](this,arguments);_0xd562x12[_0x31e9[77]](_0x31e9[86]);return _0xd562x12};Graph[_0x31e9[16]][_0x31e9[87]]= function(_0xd562x6){var _0xd562x13=_0x31e9[88];if(this[_0x31e9[72]]()[_0x31e9[89]](_0xd562x6)){_0xd562x13+= mxResources[_0x31e9[93]](_0x31e9[90]+ _0xd562x6[_0x31e9[92]][_0x31e9[91]])|| _0x31e9[88]}else {if(this[_0x31e9[72]]()[_0x31e9[71]](_0xd562x6)){_0xd562x13= mxGraph[_0x31e9[16]][_0x31e9[87]][_0x31e9[15]](this,arguments)}};return _0xd562x13};Graph[_0x31e9[16]][_0x31e9[94]]= function(_0xd562x6){if(_0xd562x6[_0x31e9[92]]!= null&&  typeof (_0xd562x6[_0x31e9[92]])== _0x31e9[95]){return _0xd562x6[_0x31e9[92]][_0x31e9[97]](_0x31e9[96])};return mxGraph[_0x31e9[16]][_0x31e9[94]][_0x31e9[15]](this,arguments)};Graph[_0x31e9[16]][_0x31e9[98]]= function(_0xd562x6,_0xd562x10,_0xd562x14){if(_0xd562x6[_0x31e9[92]]!= null&&  typeof (_0xd562x6[_0x31e9[92]])== _0x31e9[95]){var _0xd562x15=_0xd562x6[_0x31e9[92]][_0x31e9[99]](true);_0xd562x15[_0x31e9[100]](_0x31e9[96],_0xd562x10);_0xd562x10= _0xd562x15};mxGraph[_0x31e9[16]][_0x31e9[98]][_0x31e9[15]](this,arguments)};Graph[_0x31e9[16]][_0x31e9[101]]= function(_0xd562x6,_0xd562x16){var _0xd562x10=null;if(_0xd562x6[_0x31e9[92]]!= null&&  typeof (_0xd562x6[_0x31e9[92]])== _0x31e9[95]){_0xd562x10= _0xd562x6[_0x31e9[92]][_0x31e9[99]](true)}else {var _0xd562x17=mxUtils[_0x31e9[102]]();_0xd562x10= _0xd562x17[_0x31e9[104]](_0x31e9[103]);_0xd562x10[_0x31e9[100]](_0x31e9[96],_0xd562x6[_0x31e9[92]])};if(_0xd562x16!= null&& _0xd562x16[_0x31e9[105]]> 0){_0xd562x10[_0x31e9[100]](_0x31e9[106],_0xd562x16)}else {_0xd562x10[_0x31e9[107]](_0x31e9[106])};this[_0x31e9[109]][_0x31e9[108]](_0xd562x6,_0xd562x10)};Graph[_0x31e9[16]][_0x31e9[110]]= function(_0xd562x6){if(_0xd562x6[_0x31e9[92]]!= null&&  typeof (_0xd562x6[_0x31e9[92]])== _0x31e9[95]){return _0xd562x6[_0x31e9[92]][_0x31e9[97]](_0x31e9[106])};return null};Graph[_0x31e9[16]][_0x31e9[55]]= function(){this[_0x31e9[11]][_0x31e9[112]][_0x31e9[111]]= function(){return this[_0x31e9[46]][_0x31e9[11]][_0x31e9[113]]!= null};this[_0x31e9[28]](mxEvent.START_EDITING,function(_0xd562x18,_0xd562x19){this[_0x31e9[29]][_0x31e9[114]]()});var _0xd562x1a=false;var _0xd562x1b=null;this[_0x31e9[115]]= function(_0xd562xb){mxGraph[_0x31e9[16]][_0x31e9[115]][_0x31e9[15]](this,arguments);if(_0xd562xb[_0x31e9[32]]()== null){var _0xd562x6=this[_0x31e9[118]](_0xd562xb[_0x31e9[116]],_0xd562xb[_0x31e9[117]]);if(this[_0x31e9[72]]()[_0x31e9[71]](_0xd562x6)){_0xd562xb[_0x31e9[119]]= this[_0x31e9[33]][_0x31e9[32]](_0xd562x6);if(_0xd562xb[_0x31e9[119]]!= null&& _0xd562xb[_0x31e9[119]][_0x31e9[120]]!= null){this[_0x31e9[25]][_0x31e9[24]][_0x31e9[23]]= _0xd562xb[_0x31e9[119]][_0x31e9[120]][_0x31e9[121]][_0x31e9[24]][_0x31e9[23]]}}};if(_0xd562xb[_0x31e9[32]]()== null){this[_0x31e9[25]][_0x31e9[24]][_0x31e9[23]]= _0x31e9[30]}};this[_0x31e9[122]]= function(_0xd562x1c,_0xd562xb,_0xd562x18){if(_0xd562x1c== mxEvent[_0x31e9[123]]){if(!this[_0x31e9[29]][_0x31e9[124]]()){_0xd562x1b= _0xd562xb[_0x31e9[125]]();_0xd562x1a= (_0xd562x1b!= null)?this[_0x31e9[52]](_0xd562x1b):this[_0x31e9[126]]()}else {_0xd562x1a= false;_0xd562x1b= null}}else {if(_0xd562x1c== mxEvent[_0x31e9[127]]){if(_0xd562x1a&& !this[_0x31e9[128]]()){if(!this[_0x31e9[29]][_0x31e9[124]]()){var _0xd562x1d=mxEvent[_0x31e9[130]](_0xd562xb[_0x31e9[129]]());var _0xd562x1e=mxEvent[_0x31e9[131]](_0xd562xb[_0x31e9[129]]());this[_0x31e9[29]][_0x31e9[132]](_0xd562x1d+ 16,_0xd562x1e,_0xd562x1b,_0xd562xb[_0x31e9[129]]())};_0xd562x1a= false;_0xd562x1b= null;_0xd562xb[_0x31e9[133]]();return};_0xd562x1a= false;_0xd562x1b= null}};mxGraph[_0x31e9[16]][_0x31e9[122]][_0x31e9[15]](this,arguments);if(_0xd562x1c== mxEvent[_0x31e9[134]]&& _0xd562xb[_0x31e9[135]]()){_0xd562x1a= false;_0xd562x1b= null}}};(function(){mxVertexHandler[_0x31e9[16]][_0x31e9[136]]= true;mxText[_0x31e9[16]][_0x31e9[137]]= 5;mxText[_0x31e9[16]][_0x31e9[138]]= 1;if(touchStyle){mxConstants[_0x31e9[139]]= 16;mxConstants[_0x31e9[140]]= 7;if(mxClient[_0x31e9[141]]){mxVertexHandler[_0x31e9[16]][_0x31e9[142]]= 4;mxEdgeHandler[_0x31e9[16]][_0x31e9[142]]= 6;Graph[_0x31e9[16]][_0x31e9[142]]= 14;Graph[_0x31e9[16]][_0x31e9[143]]= 20;mxPanningHandler[_0x31e9[16]][_0x31e9[144]]= false;mxPanningHandler[_0x31e9[16]][_0x31e9[145]]= true;mxPanningHandler[_0x31e9[16]][_0x31e9[146]]= function(_0xd562xb){var _0xd562x19=_0xd562xb[_0x31e9[129]]();return (this[_0x31e9[145]]&& (this[_0x31e9[147]]|| _0xd562xb[_0x31e9[32]]()== null))|| (mxEvent[_0x31e9[148]](_0xd562x19)&& mxEvent[_0x31e9[149]](_0xd562x19))|| (this[_0x31e9[150]]&& mxEvent[_0x31e9[151]](_0xd562x19))}};var _0xd562x1f=mxGraphHandler[_0x31e9[16]][_0x31e9[152]];mxGraphHandler[_0x31e9[16]][_0x31e9[152]]= function(_0xd562x18,_0xd562xb){_0xd562x1f[_0x31e9[15]](this,arguments);if(this[_0x31e9[46]][_0x31e9[52]](_0xd562xb[_0x31e9[125]]())&& this[_0x31e9[46]][_0x31e9[53]]()> 1){this[_0x31e9[153]]= false}};Graph[_0x31e9[16]][_0x31e9[154]]= function(_0xd562x1){this[_0x31e9[155]]=  new mxTooltipHandler(this);this[_0x31e9[155]][_0x31e9[156]](false);this[_0x31e9[157]]=  new mxSelectionCellsHandler(this);this[_0x31e9[29]]=  new mxPanningHandler(this);this[_0x31e9[29]][_0x31e9[158]]= false;this[_0x31e9[11]]=  new mxConnectionHandler(this);this[_0x31e9[11]][_0x31e9[156]](false);this[_0x31e9[159]]=  new mxGraphHandler(this)};mxConnectionHandler[_0x31e9[16]][_0x31e9[160]]= function(_0xd562xe,_0xd562x20){if(touchStyle&& _0xd562x20!= null){this[_0x31e9[46]][_0x31e9[161]](_0xd562x20)}else {this[_0x31e9[46]][_0x31e9[161]](_0xd562xe)}};var _0xd562x21=mxGraph[_0x31e9[16]][_0x31e9[162]];Graph[_0x31e9[16]][_0x31e9[162]]= function(_0xd562x19,_0xd562x6){if(_0xd562x6== null){var _0xd562x22=mxUtils[_0x31e9[163]](this[_0x31e9[25]],mxEvent[_0x31e9[130]](_0xd562x19),mxEvent[_0x31e9[131]](_0xd562x19));_0xd562x6= this[_0x31e9[118]](_0xd562x22[_0x31e9[164]],_0xd562x22[_0x31e9[165]])};_0xd562x21[_0x31e9[0]](this,_0xd562x19,_0xd562x6)};var _0xd562x23= new mxImage(IMAGE_PATH+ _0x31e9[166],16,16);mxVertexHandler[_0x31e9[16]][_0x31e9[167]]= _0xd562x23;mxEdgeHandler[_0x31e9[16]][_0x31e9[167]]= _0xd562x23;mxOutline[_0x31e9[16]][_0x31e9[168]]= _0xd562x23; new Image()[_0x31e9[169]]= _0xd562x23[_0x31e9[169]];var _0xd562x24=IMAGE_PATH+ _0x31e9[170];var _0xd562x25=mxVertexHandler[_0x31e9[16]][_0x31e9[171]];mxVertexHandler[_0x31e9[16]][_0x31e9[171]]= function(){_0xd562x25[_0x31e9[15]](this,arguments);if(showConnectorImg&& this[_0x31e9[46]][_0x31e9[11]][_0x31e9[111]]()&& this[_0x31e9[46]][_0x31e9[172]](this[_0x31e9[119]][_0x31e9[51]])&& !this[_0x31e9[46]][_0x31e9[84]](this[_0x31e9[119]][_0x31e9[51]])&& this[_0x31e9[46]][_0x31e9[53]]()== 1){this[_0x31e9[173]]= mxUtils[_0x31e9[174]](_0xd562x24);this[_0x31e9[173]][_0x31e9[24]][_0x31e9[23]]= _0x31e9[26];this[_0x31e9[173]][_0x31e9[24]][_0x31e9[175]]= _0x31e9[176];this[_0x31e9[173]][_0x31e9[24]][_0x31e9[177]]= _0x31e9[176];this[_0x31e9[173]][_0x31e9[24]][_0x31e9[178]]= _0x31e9[179];if(!mxClient[_0x31e9[141]]){this[_0x31e9[173]][_0x31e9[100]](_0x31e9[180],mxResources[_0x31e9[93]](_0x31e9[17]));mxEvent[_0x31e9[181]](this[_0x31e9[173]],this[_0x31e9[46]],this[_0x31e9[119]])};this[_0x31e9[173]][_0x31e9[24]][_0x31e9[182]]= _0x31e9[183];mxEvent[_0x31e9[185]](this[_0x31e9[173]],mxUtils[_0x31e9[27]](this,function(_0xd562x19){this[_0x31e9[46]][_0x31e9[29]][_0x31e9[114]]();var _0xd562x22=mxUtils[_0x31e9[163]](this[_0x31e9[46]][_0x31e9[25]],mxEvent[_0x31e9[130]](_0xd562x19),mxEvent[_0x31e9[131]](_0xd562x19));this[_0x31e9[46]][_0x31e9[11]][_0x31e9[49]](this[_0x31e9[119]],_0xd562x22[_0x31e9[164]],_0xd562x22[_0x31e9[165]]);this[_0x31e9[46]][_0x31e9[184]]= true;mxEvent[_0x31e9[133]](_0xd562x19)}));this[_0x31e9[46]][_0x31e9[25]][_0x31e9[186]](this[_0x31e9[173]])};this[_0x31e9[187]]()};var _0xd562x26=mxVertexHandler[_0x31e9[16]][_0x31e9[188]];mxVertexHandler[_0x31e9[16]][_0x31e9[188]]= function(){_0xd562x26[_0x31e9[15]](this);this[_0x31e9[187]]()};mxVertexHandler[_0x31e9[16]][_0x31e9[187]]= function(){if(this[_0x31e9[119]]!= null&& this[_0x31e9[173]]!= null){if(mxVertexHandler[_0x31e9[16]][_0x31e9[189]]){this[_0x31e9[173]][_0x31e9[24]][_0x31e9[190]]= (this[_0x31e9[119]][_0x31e9[164]]+ this[_0x31e9[119]][_0x31e9[175]]- this[_0x31e9[173]][_0x31e9[191]]/ 2)+ _0x31e9[192];this[_0x31e9[173]][_0x31e9[24]][_0x31e9[193]]= (this[_0x31e9[119]][_0x31e9[165]]- this[_0x31e9[173]][_0x31e9[194]]/ 2)+ _0x31e9[192]}else {this[_0x31e9[173]][_0x31e9[24]][_0x31e9[190]]= (this[_0x31e9[119]][_0x31e9[164]]+ this[_0x31e9[119]][_0x31e9[175]]+ mxConstants[_0x31e9[139]]/ 2+ 4)+ _0x31e9[192];this[_0x31e9[173]][_0x31e9[24]][_0x31e9[193]]= (this[_0x31e9[119]][_0x31e9[165]]+ (this[_0x31e9[119]][_0x31e9[177]]- this[_0x31e9[173]][_0x31e9[194]])/ 2)+ _0x31e9[192]}}};var _0xd562x27=mxVertexHandler[_0x31e9[16]][_0x31e9[195]];mxVertexHandler[_0x31e9[16]][_0x31e9[195]]= function(_0xd562x18,_0xd562xb){_0xd562x27[_0x31e9[15]](this,arguments);if(this[_0x31e9[173]]!= null){this[_0x31e9[173]][_0x31e9[197]][_0x31e9[196]](this[_0x31e9[173]]);this[_0x31e9[173]]= null}}; new Image()[_0x31e9[169]]= _0xd562x24}else {var _0xd562x28= new mxImage(IMAGE_PATH+ _0x31e9[198],15,15);mxConnectionHandler[_0x31e9[16]][_0x31e9[199]]= _0xd562x28; new Image()[_0x31e9[169]]= _0xd562x28[_0x31e9[169]];if(urlParams[_0x31e9[17]]== _0x31e9[18]){var _0xd562x28= new mxImage(IMAGE_PATH+ _0x31e9[198],15,15);var _0xd562x25=mxVertexHandler[_0x31e9[16]][_0x31e9[171]];mxVertexHandler[_0x31e9[16]][_0x31e9[171]]= function(){_0xd562x25[_0x31e9[15]](this,arguments);if(showConnectorImg&& this[_0x31e9[46]][_0x31e9[11]][_0x31e9[111]]()&& this[_0x31e9[46]][_0x31e9[172]](this[_0x31e9[119]][_0x31e9[51]])&& !this[_0x31e9[46]][_0x31e9[84]](this[_0x31e9[119]][_0x31e9[51]])&& this[_0x31e9[46]][_0x31e9[53]]()== 1){if(mxClient[_0x31e9[200]]&& !mxClient[_0x31e9[201]]){this[_0x31e9[173]]= document[_0x31e9[104]](_0x31e9[202]);this[_0x31e9[173]][_0x31e9[24]][_0x31e9[203]]= _0x31e9[204]+ _0xd562x28[_0x31e9[169]]+ _0x31e9[205];this[_0x31e9[173]][_0x31e9[24]][_0x31e9[206]]= _0x31e9[207];this[_0x31e9[173]][_0x31e9[24]][_0x31e9[208]]= _0x31e9[209];this[_0x31e9[173]][_0x31e9[24]][_0x31e9[175]]= (_0xd562x28[_0x31e9[175]]+ 4)+ _0x31e9[192];this[_0x31e9[173]][_0x31e9[24]][_0x31e9[177]]= (_0xd562x28[_0x31e9[177]]+ 4)+ _0x31e9[192];this[_0x31e9[173]][_0x31e9[24]][_0x31e9[210]]= (mxClient[_0x31e9[211]])?_0x31e9[212]:_0x31e9[213]}else {this[_0x31e9[173]]= mxUtils[_0x31e9[174]](_0xd562x28[_0x31e9[169]]);this[_0x31e9[173]][_0x31e9[24]][_0x31e9[175]]= _0xd562x28[_0x31e9[175]]+ _0x31e9[192];this[_0x31e9[173]][_0x31e9[24]][_0x31e9[177]]= _0xd562x28[_0x31e9[177]]+ _0x31e9[192]};this[_0x31e9[173]][_0x31e9[24]][_0x31e9[23]]= _0x31e9[26];this[_0x31e9[173]][_0x31e9[24]][_0x31e9[178]]= _0x31e9[179];this[_0x31e9[173]][_0x31e9[100]](_0x31e9[180],mxResources[_0x31e9[93]](_0x31e9[17]));mxEvent[_0x31e9[181]](this[_0x31e9[173]],this[_0x31e9[46]],this[_0x31e9[119]]);this[_0x31e9[173]][_0x31e9[24]][_0x31e9[182]]= _0x31e9[183];mxEvent[_0x31e9[28]](this[_0x31e9[173]],_0x31e9[214],mxUtils[_0x31e9[27]](this,function(_0xd562x19){this[_0x31e9[46]][_0x31e9[29]][_0x31e9[114]]();var _0xd562x22=mxUtils[_0x31e9[163]](this[_0x31e9[46]][_0x31e9[25]],mxEvent[_0x31e9[130]](_0xd562x19),mxEvent[_0x31e9[131]](_0xd562x19));this[_0x31e9[46]][_0x31e9[11]][_0x31e9[49]](this[_0x31e9[119]],_0xd562x22[_0x31e9[164]],_0xd562x22[_0x31e9[165]]);this[_0x31e9[46]][_0x31e9[184]]= true;mxEvent[_0x31e9[133]](_0xd562x19)}));this[_0x31e9[46]][_0x31e9[25]][_0x31e9[186]](this[_0x31e9[173]])};this[_0x31e9[187]]()};var _0xd562x26=mxVertexHandler[_0x31e9[16]][_0x31e9[188]];mxVertexHandler[_0x31e9[16]][_0x31e9[188]]= function(){_0xd562x26[_0x31e9[15]](this);this[_0x31e9[187]]()};mxVertexHandler[_0x31e9[16]][_0x31e9[187]]= function(){if(this[_0x31e9[119]]!= null&& this[_0x31e9[173]]!= null){if(mxVertexHandler[_0x31e9[16]][_0x31e9[189]]){this[_0x31e9[173]][_0x31e9[24]][_0x31e9[190]]= (this[_0x31e9[119]][_0x31e9[164]]+ this[_0x31e9[119]][_0x31e9[175]]- this[_0x31e9[173]][_0x31e9[191]]/ 2)+ _0x31e9[192];this[_0x31e9[173]][_0x31e9[24]][_0x31e9[193]]= (this[_0x31e9[119]][_0x31e9[165]]- this[_0x31e9[173]][_0x31e9[194]]/ 2)+ _0x31e9[192]}else {this[_0x31e9[173]][_0x31e9[24]][_0x31e9[190]]= (this[_0x31e9[119]][_0x31e9[164]]+ this[_0x31e9[119]][_0x31e9[175]]+ mxConstants[_0x31e9[139]]/ 2+ 2)+ _0x31e9[192];this[_0x31e9[173]][_0x31e9[24]][_0x31e9[193]]= (this[_0x31e9[119]][_0x31e9[165]]+ (this[_0x31e9[119]][_0x31e9[177]]- this[_0x31e9[173]][_0x31e9[194]])/ 2)+ _0x31e9[192]}}};var _0xd562x27=mxVertexHandler[_0x31e9[16]][_0x31e9[195]];mxVertexHandler[_0x31e9[16]][_0x31e9[195]]= function(_0xd562x18,_0xd562xb){_0xd562x27[_0x31e9[15]](this,arguments);if(this[_0x31e9[173]]!= null){this[_0x31e9[173]][_0x31e9[197]][_0x31e9[196]](this[_0x31e9[173]]);this[_0x31e9[173]]= null}}}}})()
\ No newline at end of file
diff --git a/public/assets/plugins/jscripty/js/Menus.js b/public/assets/plugins/jscripty/js/Menus.js
index 7d33b9e..55b47c7 100644
--- a/public/assets/plugins/jscripty/js/Menus.js
+++ b/public/assets/plugins/jscripty/js/Menus.js
@@ -1,716 +1 @@
-/**
- * $Id: Menus.js,v 1.13 2013-02-20 16:21:29 gaudenz Exp $
- * Copyright (c) 2006-2012, JGraph Ltd
- */
-/**
- * Constructs a new graph editor
- */
-Menus = function(editorUi) {
-	this.editorUi = editorUi;
-	this.menus = new Object();
-	this.init();
-
-	// Pre-fetches checkmark image
-	new Image().src = IMAGE_PATH + '/checkmark.gif';
-};
-
-/**
- * Adds the label menu items to the given menu and parent.
- */
-Menus.prototype.init = function() {
-	var graph = this.editorUi.editor.graph;
-
-	this.put('fontFamily', new Menu(mxUtils.bind(this, function(menu, parent) {
-		var fonts = ['Helvetica', 'Verdana', 'Times New Roman', 'Garamond',
-			'Comic Sans MS',
-			'Courier New', 'Georgia', 'Lucida Console', 'Tahoma'
-		];
-
-		for (var i = 0; i < fonts.length; i++) {
-			var tr = this.styleChange(menu, fonts[i], [mxConstants.STYLE_FONTFAMILY], [
-				fonts[i]
-			], null, parent);
-			tr.firstChild.nextSibling.style.fontFamily = fonts[i];
-		}
-
-		menu.addSeparator(parent);
-		this.promptChange(menu, mxResources.get('custom'), '', mxConstants.DEFAULT_FONTFAMILY,
-			mxConstants.STYLE_FONTFAMILY, parent);
-	})));
-	this.put('fontSize', new Menu(mxUtils.bind(this, function(menu, parent) {
-		var sizes = [6, 8, 9, 10, 11, 12, 14, 18, 24, 36, 48, 72];
-
-		for (var i = 0; i < sizes.length; i++) {
-			this.styleChange(menu, sizes[i], [mxConstants.STYLE_FONTSIZE], [sizes[i]],
-				null, parent);
-		}
-
-		menu.addSeparator(parent);
-		this.promptChange(menu, mxResources.get('custom'), '(pt)', '12',
-			mxConstants.STYLE_FONTSIZE, parent);
-	})));
-	this.put('linewidth', new Menu(mxUtils.bind(this, function(menu, parent) {
-		var sizes = [1, 2, 3, 4, 8, 12, 16, 24];
-
-		for (var i = 0; i < sizes.length; i++) {
-			this.styleChange(menu, sizes[i] + 'px', [mxConstants.STYLE_STROKEWIDTH], [
-				sizes[i]
-			], null, parent);
-		}
-
-		menu.addSeparator(parent);
-		this.promptChange(menu, mxResources.get('custom'), '(px)', '1',
-			mxConstants.STYLE_STROKEWIDTH, parent);
-	})));
-	this.put('line', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.styleChange(menu, mxResources.get('straight'), [mxConstants.STYLE_EDGE], [
-			null
-		], null, parent);
-		this.styleChange(menu, mxResources.get('entityRelation'), [mxConstants.STYLE_EDGE], [
-			'entityRelationEdgeStyle'
-		], null, parent);
-		menu.addSeparator(parent);
-		this.styleChange(menu, mxResources.get('horizontal'), [mxConstants.STYLE_EDGE,
-			mxConstants.STYLE_ELBOW
-		], ['elbowEdgeStyle', 'horizontal'], null, parent);
-		this.styleChange(menu, mxResources.get('vertical'), [mxConstants.STYLE_EDGE,
-			mxConstants.STYLE_ELBOW
-		], ['elbowEdgeStyle', 'vertical'], null, parent);
-		menu.addSeparator(parent);
-		this.styleChange(menu, mxResources.get('manual'), [mxConstants.STYLE_EDGE], [
-			'segmentEdgeStyle'
-		], null, parent);
-		this.styleChange(menu, mxResources.get('automatic'), [mxConstants.STYLE_EDGE], [
-			'orthogonalEdgeStyle'
-		], null, parent);
-	})));
-	this.put('lineend', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_ENDARROW], [
-			mxConstants.ARROW_CLASSIC
-		], null, parent);
-		this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_ENDARROW], [
-			mxConstants.ARROW_OPEN
-		], null, parent);
-		this.styleChange(menu, mxResources.get('block'), [mxConstants.STYLE_ENDARROW], [
-			mxConstants.ARROW_BLOCK
-		], null, parent);
-		menu.addSeparator(parent);
-		this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_ENDARROW], [
-			mxConstants.ARROW_OVAL
-		], null, parent);
-		this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_ENDARROW], [
-			mxConstants.ARROW_DIAMOND
-		], null, parent);
-		this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_ENDARROW], [
-			mxConstants.ARROW_DIAMOND_THIN
-		], null, parent);
-		menu.addSeparator(parent);
-		this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_ENDARROW], [
-			mxConstants.NONE
-		], null, parent);
-		menu.addSeparator(parent);
-		menu.addItem(mxResources.get('transparent'), null, function() {
-			graph.toggleCellStyles('endFill', true);
-		}, parent, null, true);
-		menu.addSeparator(parent);
-		this.promptChange(menu, mxResources.get('size'), '(px)', mxConstants.DEFAULT_MARKERSIZE,
-			mxConstants.STYLE_ENDSIZE, parent);
-	})));
-	this.put('linestart', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_STARTARROW], [
-			mxConstants.ARROW_CLASSIC
-		], null, parent);
-		this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_STARTARROW], [
-			mxConstants.ARROW_OPEN
-		], null, parent);
-		this.styleChange(menu, mxResources.get('block'), [mxConstants.STYLE_STARTARROW], [
-			mxConstants.ARROW_BLOCK
-		], null, parent);
-		menu.addSeparator(parent);
-		this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_STARTARROW], [
-			mxConstants.ARROW_OVAL
-		], null, parent);
-		this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_STARTARROW], [
-			mxConstants.ARROW_DIAMOND
-		], null, parent);
-		this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_STARTARROW], [
-			mxConstants.ARROW_DIAMOND_THIN
-		], null, parent);
-		menu.addSeparator(parent);
-		this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_STARTARROW], [
-			mxConstants.NONE
-		], null, parent);
-		menu.addSeparator(parent);
-		menu.addItem(mxResources.get('transparent'), null, function() {
-			graph.toggleCellStyles('startFill', true);
-		}, parent, null, true);
-		menu.addSeparator(parent);
-		this.promptChange(menu, mxResources.get('size'), '(px)', mxConstants.DEFAULT_MARKERSIZE,
-			mxConstants.STYLE_STARTSIZE, parent);
-	})));
-	this.put('spacing', new Menu(mxUtils.bind(this, function(menu, parent) {
-		// Uses shadow action and line menu to analyze selection
-		var vertexSelected = this.editorUi.actions.get('shadow').enabled;
-		var edgeSelected = this.get('line').enabled;
-
-		if (vertexSelected || menu.showDisabled) {
-			this.promptChange(menu, mxResources.get('top'), '(px)', '0',
-				mxConstants.STYLE_SPACING_TOP, parent, vertexSelected);
-			this.promptChange(menu, mxResources.get('right'), '(px)', '0',
-				mxConstants.STYLE_SPACING_RIGHT, parent, vertexSelected);
-			this.promptChange(menu, mxResources.get('bottom'), '(px)', '0',
-				mxConstants.STYLE_SPACING_BOTTOM, parent, vertexSelected);
-			this.promptChange(menu, mxResources.get('left'), '(px)', '0',
-				mxConstants.STYLE_SPACING_LEFT, parent, vertexSelected);
-			menu.addSeparator(parent);
-			this.promptChange(menu, mxResources.get('global'), '(px)', '0',
-				mxConstants.STYLE_SPACING, parent, vertexSelected);
-			this.promptChange(menu, mxResources.get('perimeter'), '(px)', '0',
-				mxConstants.STYLE_PERIMETER_SPACING, parent, vertexSelected);
-		}
-
-		if (edgeSelected || menu.showDisabled) {
-			menu.addSeparator(parent);
-			this.promptChange(menu, mxResources.get('sourceSpacing'), '(px)', '0',
-				mxConstants.STYLE_SOURCE_PERIMETER_SPACING, parent, edgeSelected);
-			this.promptChange(menu, mxResources.get('targetSpacing'), '(px)', '0',
-				mxConstants.STYLE_TARGET_PERIMETER_SPACING, parent, edgeSelected);
-		}
-	})));
-	this.put('format', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.addMenuItem(menu, 'style', parent);
-	})));
-	this.put('text', new Menu(mxUtils.bind(this, function(menu, parent) {
-		var enabled = this.get('text').enabled;
-		menu.addSeparator(parent);
-		this.addSubmenu('fontFamily', menu, parent);
-		this.addSubmenu('fontSize', menu, parent);
-		this.addMenuItems(menu, ['-', 'bold', 'italic', 'underline', '-'],
-			parent);
-		this.addSubmenu('alignment', menu, parent);
-		this.addMenuItem(menu, 'wordWrap', parent);
-		menu.addSeparator(parent);
-		this.promptChange(menu, mxResources.get('textOpacity'), '(%)', '100',
-			mxConstants.STYLE_TEXT_OPACITY, parent, enabled);
-		menu.addItem(mxResources.get('hide'), null, function() {
-			graph.toggleCellStyles(mxConstants.STYLE_NOLABEL, false);
-		}, parent, null, enabled);
-	})));
-	this.put('alignment', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.styleChange(menu, mxResources.get('leftAlign'), [mxConstants.STYLE_ALIGN], [
-			mxConstants.ALIGN_LEFT
-		], null, parent);
-		this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_ALIGN], [
-			mxConstants.ALIGN_CENTER
-		], null, parent);
-		this.styleChange(menu, mxResources.get('rightAlign'), [mxConstants.STYLE_ALIGN], [
-			mxConstants.ALIGN_RIGHT
-		], null, parent);
-		menu.addSeparator(parent);
-		this.styleChange(menu, mxResources.get('topAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [
-			mxConstants.ALIGN_TOP
-		], null, parent);
-		this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_ALIGN], [
-			mxConstants.ALIGN_MIDDLE
-		], null, parent);
-		this.styleChange(menu, mxResources.get('bottomAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [
-			mxConstants.ALIGN_BOTTOM
-		], null, parent);
-		menu.addSeparator(parent);
-		this.addSubmenu('position', menu, parent);
-		this.addSubmenu('spacing', menu, parent);
-		menu.addSeparator(parent);
-		var enabled = this.get('text').enabled;
-		menu.addItem(mxResources.get('vertical'), null, function() {
-			graph.toggleCellStyles(mxConstants.STYLE_HORIZONTAL, true);
-		}, parent, null, enabled);
-	})));
-	this.put('position', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.styleChange(menu, mxResources.get('left'), [mxConstants.STYLE_LABEL_POSITION,
-			mxConstants.STYLE_ALIGN
-		], [mxConstants.ALIGN_LEFT, mxConstants.ALIGN_RIGHT], null, parent);
-		this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_LABEL_POSITION,
-			mxConstants.STYLE_ALIGN
-		], [mxConstants.ALIGN_CENTER, mxConstants.ALIGN_CENTER], null, parent);
-		this.styleChange(menu, mxResources.get('right'), [mxConstants.STYLE_LABEL_POSITION,
-			mxConstants.STYLE_ALIGN
-		], [mxConstants.ALIGN_RIGHT, mxConstants.ALIGN_LEFT], null, parent);
-		menu.addSeparator(parent);
-		this.styleChange(menu, mxResources.get('top'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION,
-			mxConstants.STYLE_VERTICAL_ALIGN
-		], [mxConstants.ALIGN_TOP, mxConstants.ALIGN_BOTTOM], null, parent);
-		this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION,
-			mxConstants.STYLE_VERTICAL_ALIGN
-		], [mxConstants.ALIGN_MIDDLE, mxConstants.ALIGN_MIDDLE], null, parent);
-		this.styleChange(menu, mxResources.get('bottom'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION,
-			mxConstants.STYLE_VERTICAL_ALIGN
-		], [mxConstants.ALIGN_BOTTOM, mxConstants.ALIGN_TOP], null, parent);
-	})));
-	this.put('direction', new Menu(mxUtils.bind(this, function(menu, parent) {
-		menu.addItem(mxResources.get('flipH'), null, function() {
-			graph.toggleCellStyles(mxConstants.STYLE_FLIPH, false);
-		}, parent);
-		menu.addItem(mxResources.get('flipV'), null, function() {
-			graph.toggleCellStyles(mxConstants.STYLE_FLIPV, false);
-		}, parent);
-		this.addMenuItems(menu, ['-', 'tilt', 'rotation'], parent);
-	})));
-	this.put('align', new Menu(mxUtils.bind(this, function(menu, parent) {
-		menu.addItem(mxResources.get('leftAlign'), null, function() {
-			graph.alignCells(mxConstants.ALIGN_LEFT);
-		}, parent);
-		menu.addItem(mxResources.get('center'), null, function() {
-			graph.alignCells(mxConstants.ALIGN_CENTER);
-		}, parent);
-		menu.addItem(mxResources.get('rightAlign'), null, function() {
-			graph.alignCells(mxConstants.ALIGN_RIGHT);
-		}, parent);
-		menu.addSeparator(parent);
-		menu.addItem(mxResources.get('topAlign'), null, function() {
-			graph.alignCells(mxConstants.ALIGN_TOP);
-		}, parent);
-		menu.addItem(mxResources.get('middle'), null, function() {
-			graph.alignCells(mxConstants.ALIGN_MIDDLE);
-		}, parent);
-		menu.addItem(mxResources.get('bottomAlign'), null, function() {
-			graph.alignCells(mxConstants.ALIGN_BOTTOM);
-		}, parent);
-	})));
-	this.put('layout', new Menu(mxUtils.bind(this, function(menu, parent) {
-		// menu.addItem(mxResources.get('horizontalTree'), null, mxUtils.bind(this, function()
-		// {
-		// 	if (!graph.isSelectionEmpty())
-		// 	{
-		// 		var layout = new mxCompactTreeLayout(graph, true);
-		// 		layout.edgeRouting = false;
-		// 		layout.levelDistance = 30;
-		//    		this.editorUi.executeLayout(layout, true, true);
-		// 	}
-		// }), parent);
-		// menu.addItem(mxResources.get('verticalTree'), null, mxUtils.bind(this, function()
-		// {
-		// 	if (!graph.isSelectionEmpty())
-		// 	{
-		// 		var layout = new mxCompactTreeLayout(graph, false);
-		// 		layout.edgeRouting = false;
-		// 		layout.levelDistance = 30;
-		//    		this.editorUi.executeLayout(layout, true, true);
-		// 	}
-		// }), parent);
-		// menu.addSeparator(parent);
-		menu.addItem(mxResources.get('horizontalFlow'), null, mxUtils.bind(this,
-			function() {
-				var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_WEST);
-				this.editorUi.executeLayout(layout, true, true);
-			}), parent);
-		menu.addItem(mxResources.get('verticalFlow'), null, mxUtils.bind(this,
-			function() {
-				var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_NORTH);
-				this.editorUi.executeLayout(layout, true, true);
-			}), parent);
-		//menu.addSeparator(parent);
-		// menu.addItem(mxResources.get('organic'), null, mxUtils.bind(this, function()
-		// {
-		// 	var layout = new mxFastOrganicLayout(graph);
-		//   		this.editorUi.executeLayout(layout, true, true);
-		// }), parent);
-		// menu.addItem(mxResources.get('circle'), null, mxUtils.bind(this, function()
-		// {
-		// 	var layout = new mxCircleLayout(graph);
-		//   		this.editorUi.executeLayout(layout, true, true, graph.getSelectionCells());
-		// }), parent);
-	})));
-	this.put('navigation', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.addMenuItems(menu, ['home', '-', 'exitGroup', 'enterGroup', '-',
-			'expand', 'collapse'
-		], parent);
-	})));
-	this.put('arrange', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.addMenuItems(menu, ['toFront', 'toBack', '-'], parent);
-		//this.addSubmenu('direction', menu, parent);
-		this.addSubmenu('layout', menu, parent);
-		//this.addSubmenu('align', menu, parent);
-		menu.addSeparator(parent);
-		//this.addSubmenu('navigation', menu, parent);
-		this.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup'],
-			parent);
-		//this.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup', '-', 'autosize'], parent);
-	})));
-	this.put('view', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.addMenuItems(menu, ['actualSize'], parent);
-		menu.addSeparator();
-		var scales = [0.25, 0.5, 0.75, 1, 2, 4];
-
-		for (var i = 0; i < scales.length; i++) {
-			(function(scale) {
-				menu.addItem((scale * 100) + '%', null, function() {
-					graph.zoomTo(scale);
-				}, parent);
-			})(scales[i]);
-		}
-
-		this.addMenuItems(menu, ['-', 'zoomIn', 'zoomOut', '-', 'fitWindow',
-			'customZoom', '-', 'fitPage', 'fitPageWidth'
-		], parent);
-	})));
-	this.put('file', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.addMenuItems(menu, ['new', 'open', '-', 'save', 'saveAs', 'publish',
-			'-', 'variable', '-', 'import', 'export', '-', 'editFile', 'rename', '-',
-			'print'
-		], parent);
-	})));
-	this.put('edit', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.addMenuItems(menu, ['undo', 'redo', '-', 'cut', 'copy', 'paste',
-			'delete', '-', 'duplicate', '-',
-			'selectVertices', 'selectEdges', 'selectAll'
-		]);
-	})));
-	this.put('help', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.addMenuItems(menu, ['help', '-', 'about']);
-	})));
-};
-
-/**
- * Adds the label menu items to the given menu and parent.
- */
-Menus.prototype.put = function(name, menu) {
-	this.menus[name] = menu;
-};
-
-/**
- * Adds the label menu items to the given menu and parent.
- */
-Menus.prototype.get = function(name) {
-	return this.menus[name];
-};
-
-/**
- * Adds the given submenu.
- */
-Menus.prototype.addSubmenu = function(name, menu, parent) {
-	var enabled = this.get(name).enabled;
-
-	if (menu.showDisabled || enabled) {
-		var submenu = menu.addItem(mxResources.get(name), null, null, parent, null,
-			enabled);
-		this.addMenu(name, menu, submenu);
-	}
-};
-
-/**
- * Adds the label menu items to the given menu and parent.
- */
-Menus.prototype.addMenu = function(name, popupMenu, parent) {
-	var menu = this.get(name);
-
-	if (menu != null && (popupMenu.showDisabled || menu.enabled)) {
-		this.get(name).execute(popupMenu, parent);
-	}
-};
-
-/**
- * Adds a style change item to the given menu.
- */
-Menus.prototype.styleChange = function(menu, label, keys, values, sprite,
-	parent) {
-	return menu.addItem(label, null, mxUtils.bind(this, function() {
-		var graph = this.editorUi.editor.graph;
-
-		graph.getModel().beginUpdate();
-		try {
-			for (var i = 0; i < keys.length; i++) {
-				graph.setCellStyles(keys[i], values[i]);
-			}
-		} finally {
-			graph.getModel().endUpdate();
-		}
-	}), parent, sprite);
-};
-
-/**
- * Adds a style change item with a prompt to the given menu.
- */
-Menus.prototype.promptChange = function(menu, label, hint, defaultValue, key,
-	parent, enabled) {
-	return menu.addItem(label, null, mxUtils.bind(this, function() {
-		var graph = this.editorUi.editor.graph;
-		var value = defaultValue;
-		var state = graph.getView().getState(graph.getSelectionCell());
-
-		if (state != null) {
-			value = state.style[key] || value;
-		}
-
-		value = mxUtils.prompt(mxResources.get('enterValue') + ((hint.length > 0) ?
-			(' ' + hint) : ''), value);
-
-		if (value != null && value.length > 0) {
-			graph.setCellStyles(key, value);
-		}
-	}), parent, null, enabled);
-};
-
-/**
- * Creates the keyboard event handler for the current graph and history.
- */
-Menus.prototype.addMenuItem = function(menu, key, parent) {
-	var action = this.editorUi.actions.get(key);
-
-	if (action != null && (menu.showDisabled || action.enabled)) {
-		var item = menu.addItem(action.label, null, action.funct, parent, null,
-			action.enabled);
-
-		// Adds checkmark image
-		if (action.toggleAction && action.isSelected()) {
-			this.addCheckmark(item);
-		}
-
-		this.addShortcut(item, action);
-
-		return item;
-	}
-
-	return null;
-};
-
-/**
- * Adds a checkmark to the given menuitem.
- */
-Menus.prototype.addShortcut = function(item, action) {
-	if (action.shortcut != null) {
-		var td = item.firstChild.nextSibling.nextSibling;
-		var span = document.createElement('span');
-		span.style.color = 'gray';
-		mxUtils.write(span, action.shortcut);
-		td.appendChild(span);
-	}
-};
-
-/**
- * Adds a checkmark to the given menuitem.
- */
-Menus.prototype.addCheckmark = function(item) {
-	var td = item.firstChild.nextSibling;
-	td.style.backgroundImage = 'url(' + IMAGE_PATH + '/checkmark.gif)';
-	td.style.backgroundRepeat = 'no-repeat';
-	td.style.backgroundPosition = '2px 50%';
-};
-
-/**
- * Creates the keyboard event handler for the current graph and history.
- */
-Menus.prototype.addMenuItems = function(menu, keys, parent) {
-	for (var i = 0; i < keys.length; i++) {
-		if (keys[i] == '-') {
-			menu.addSeparator(parent);
-		} else {
-			this.addMenuItem(menu, keys[i], parent);
-		}
-	}
-};
-
-/**
- * Creates the keyboard event handler for the current graph and history.
- */
-Menus.prototype.createPopupMenu = function(menu, cell, evt) {
-	var graph = this.editorUi.editor.graph;
-	menu.smartSeparators = true;
-
-	if (graph.isSelectionEmpty()) {
-		this.addMenuItems(menu, ['undo', 'redo', '-', 'paste', '-']);
-	} else {
-		this.addMenuItems(menu, ['delete', '-', 'cut', 'copy', '-', 'duplicate']);
-
-		if (graph.getSelectionCount() == 1 && graph.getModel().isEdge(graph.getSelectionCell())) {
-			this.addMenuItems(menu, ['setAsDefaultEdge']);
-		}
-
-		menu.addSeparator();
-	}
-
-	if (graph.getSelectionCount() > 0) {
-		this.addMenuItems(menu, ['toFront', 'toBack', '-']);
-
-		if (graph.getModel().isEdge(graph.getSelectionCell())) {
-			var isWaypoint = false;
-			var cell = graph.getSelectionCell();
-
-			if (cell != null && graph.getModel().isEdge(cell)) {
-				var handler = graph.selectionCellsHandler.getHandler(cell);
-
-				if (handler instanceof mxEdgeHandler && handler.bends != null && handler.bends
-					.length > 2) {
-					var index = handler.getHandleForEvent(new mxMouseEvent(evt));
-
-					// Configures removeWaypoint action before execution
-					var rmWaypointAction = this.editorUi.actions.get('removeWaypoint');
-					rmWaypointAction.handler = handler;
-					rmWaypointAction.index = index;
-
-					isWaypoint = index > 0 && index < handler.bends.length;
-				}
-			}
-
-			this.addMenuItems(menu, ['-', (isWaypoint) ? 'removeWaypoint' :
-				'addWaypoint'
-			]);
-		} else if (graph.getSelectionCount() > 1) {
-			menu.addSeparator();
-			this.addMenuItems(menu, ['group']);
-		}
-
-		menu.addSeparator();
-
-		if (graph.getSelectionCount() == 1) {
-			var link = graph.getLinkForCell(graph.getSelectionCell());
-
-			if (link != null) {
-				this.addMenuItems(menu, ['openLink']);
-			}
-		}
-	} else {
-		this.addMenuItems(menu, ['-', 'selectVertices', 'selectEdges', '-',
-			'selectAll'
-		]);
-	}
-};
-
-/**
- * Creates the keyboard event handler for the current graph and history.
- */
-Menus.prototype.createMenubar = function(container) {
-	var menubar = new Menubar(this.editorUi, container);
-	// var menus = ['file', 'edit', 'view', 'format', 'text', 'arrange',
-	// 	'help'
-	// ];
-	var menus = ['file', 'edit', 'view', 'format', 'text', 'arrange'];
-	for (var i = 0; i < menus.length; i++) {
-		menubar.addMenu(mxResources.get(menus[i]), this.get(menus[i]).funct);
-	}
-
-	return menubar;
-};
-
-/**
- * Construcs a new menubar for the given editor.
- */
-function Menubar(editorUi, container) {
-	this.editorUi = editorUi;
-	this.container = container;
-
-	// Global handler to hide the current menu
-	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt) {
-		this.hideMenu();
-	}));
-};
-
-/**
- * Adds the menubar elements.
- */
-Menubar.prototype.hideMenu = function() {
-	if (this.currentMenu != null) {
-		this.currentMenu.hideMenu();
-	}
-};
-
-/**
- * Adds a submenu to this menubar.
- */
-Menubar.prototype.addMenu = function(label, funct) {
-	var elt = document.createElement('a');
-	elt.setAttribute('href', 'javascript:void(0);');
-	elt.className = 'geItem';
-	mxUtils.write(elt, label);
-
-	this.addMenuHandler(elt, funct);
-	this.container.appendChild(elt);
-
-	return elt;
-};
-
-/**
- * Adds a handler for showing a menu in the given element.
- */
-Menubar.prototype.addMenuHandler = function(elt, funct) {
-	if (funct != null) {
-		var show = true;
-
-		var clickHandler = mxUtils.bind(this, function(evt) {
-			if (show && elt.enabled == null || elt.enabled) {
-				this.editorUi.editor.graph.panningHandler.hideMenu();
-				var menu = new mxPopupMenu(funct);
-				menu.div.className += ' geMenubarMenu';
-				menu.smartSeparators = true;
-				menu.showDisabled = true;
-				menu.autoExpand = true;
-
-				// Disables autoexpand and destroys menu when hidden
-				menu.hideMenu = mxUtils.bind(this, function() {
-					mxPopupMenu.prototype.hideMenu.apply(menu, arguments);
-					menu.destroy();
-					this.currentMenu = null;
-					this.currentElt = null;
-				});
-
-				// Added width of the page-sidebar
-				var x = elt.offsetLeft + document.getElementById('page-sidebar').offsetWidth +
-					22;
-				// Added static height of the page-navbar
-				var y = elt.offsetTop + elt.offsetHeight + 140;
-
-				menu.popup(x, y, null, evt);
-
-				//menu.popup(elt.offsetLeft + 4, elt.offsetTop + elt.offsetHeight + 4, null, evt);
-				this.currentMenu = menu;
-				this.currentElt = elt;
-			}
-
-			show = true;
-			mxEvent.consume(evt);
-		});
-
-		// Shows menu automatically while in expanded state
-		mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt) {
-			if (this.currentMenu != null && this.currentElt != elt) {
-				this.hideMenu();
-				clickHandler(evt);
-			}
-		}));
-
-		// Hides menu if already showing
-		mxEvent.addListener(elt, 'mousedown', mxUtils.bind(this, function() {
-			show = this.currentElt != elt;
-		}));
-
-		mxEvent.addListener(elt, 'click', clickHandler);
-	}
-};
-
-/**
- * Constructs a new action for the given parameters.
- */
-function Menu(funct, enabled) {
-	mxEventSource.call(this);
-	this.funct = funct;
-	this.enabled = (enabled != null) ? enabled : true;
-};
-
-// Menu inherits from mxEventSource
-mxUtils.extend(Menu, mxEventSource);
-
-/**
- * Sets the enabled state of the action and fires a stateChanged event.
- */
-Menu.prototype.setEnabled = function(value) {
-	if (this.enabled != value) {
-		this.enabled = value;
-		this.fireEvent(new mxEventObject('stateChanged'));
-	}
-};
-
-/**
- * Sets the enabled state of the action and fires a stateChanged event.
- */
-Menu.prototype.execute = function(menu, parent) {
-	this.funct(menu, parent);
-};
+var _0xe8e0=["\x65\x64\x69\x74\x6F\x72\x55\x69","\x6D\x65\x6E\x75\x73","\x69\x6E\x69\x74","\x73\x72\x63","\x2F\x63\x68\x65\x63\x6B\x6D\x61\x72\x6B\x2E\x67\x69\x66","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x67\x72\x61\x70\x68","\x65\x64\x69\x74\x6F\x72","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x48\x65\x6C\x76\x65\x74\x69\x63\x61","\x56\x65\x72\x64\x61\x6E\x61","\x54\x69\x6D\x65\x73\x20\x4E\x65\x77\x20\x52\x6F\x6D\x61\x6E","\x47\x61\x72\x61\x6D\x6F\x6E\x64","\x43\x6F\x6D\x69\x63\x20\x53\x61\x6E\x73\x20\x4D\x53","\x43\x6F\x75\x72\x69\x65\x72\x20\x4E\x65\x77","\x47\x65\x6F\x72\x67\x69\x61","\x4C\x75\x63\x69\x64\x61\x20\x43\x6F\x6E\x73\x6F\x6C\x65","\x54\x61\x68\x6F\x6D\x61","\x6C\x65\x6E\x67\x74\x68","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x46\x41\x4D\x49\x4C\x59","\x73\x74\x79\x6C\x65\x43\x68\x61\x6E\x67\x65","\x73\x74\x79\x6C\x65","\x6E\x65\x78\x74\x53\x69\x62\x6C\x69\x6E\x67","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x61\x64\x64\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x63\x75\x73\x74\x6F\x6D","\x67\x65\x74","","\x70\x72\x6F\x6D\x70\x74\x43\x68\x61\x6E\x67\x65","\x62\x69\x6E\x64","\x70\x75\x74","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x53\x49\x5A\x45","\x28\x70\x74\x29","\x31\x32","\x6C\x69\x6E\x65\x77\x69\x64\x74\x68","\x70\x78","\x53\x54\x59\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x57\x49\x44\x54\x48","\x28\x70\x78\x29","\x31","\x6C\x69\x6E\x65","\x73\x74\x72\x61\x69\x67\x68\x74","\x53\x54\x59\x4C\x45\x5F\x45\x44\x47\x45","\x65\x6E\x74\x69\x74\x79\x52\x65\x6C\x61\x74\x69\x6F\x6E","\x65\x6E\x74\x69\x74\x79\x52\x65\x6C\x61\x74\x69\x6F\x6E\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x53\x54\x59\x4C\x45\x5F\x45\x4C\x42\x4F\x57","\x65\x6C\x62\x6F\x77\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x76\x65\x72\x74\x69\x63\x61\x6C","\x6D\x61\x6E\x75\x61\x6C","\x73\x65\x67\x6D\x65\x6E\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x61\x75\x74\x6F\x6D\x61\x74\x69\x63","\x6F\x72\x74\x68\x6F\x67\x6F\x6E\x61\x6C\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x6C\x69\x6E\x65\x65\x6E\x64","\x63\x6C\x61\x73\x73\x69\x63","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x44\x41\x52\x52\x4F\x57","\x41\x52\x52\x4F\x57\x5F\x43\x4C\x41\x53\x53\x49\x43","\x6F\x70\x65\x6E\x41\x72\x72\x6F\x77","\x41\x52\x52\x4F\x57\x5F\x4F\x50\x45\x4E","\x62\x6C\x6F\x63\x6B","\x41\x52\x52\x4F\x57\x5F\x42\x4C\x4F\x43\x4B","\x6F\x76\x61\x6C","\x41\x52\x52\x4F\x57\x5F\x4F\x56\x41\x4C","\x64\x69\x61\x6D\x6F\x6E\x64","\x41\x52\x52\x4F\x57\x5F\x44\x49\x41\x4D\x4F\x4E\x44","\x64\x69\x61\x6D\x6F\x6E\x64\x54\x68\x69\x6E","\x41\x52\x52\x4F\x57\x5F\x44\x49\x41\x4D\x4F\x4E\x44\x5F\x54\x48\x49\x4E","\x6E\x6F\x6E\x65","\x4E\x4F\x4E\x45","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x65\x6E\x64\x46\x69\x6C\x6C","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x61\x64\x64\x49\x74\x65\x6D","\x73\x69\x7A\x65","\x6C\x69\x6E\x65\x73\x74\x61\x72\x74","\x53\x54\x59\x4C\x45\x5F\x53\x54\x41\x52\x54\x41\x52\x52\x4F\x57","\x73\x74\x61\x72\x74\x46\x69\x6C\x6C","\x73\x70\x61\x63\x69\x6E\x67","\x65\x6E\x61\x62\x6C\x65\x64","\x73\x68\x61\x64\x6F\x77","\x61\x63\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x44\x69\x73\x61\x62\x6C\x65\x64","\x74\x6F\x70","\x30","\x72\x69\x67\x68\x74","\x62\x6F\x74\x74\x6F\x6D","\x6C\x65\x66\x74","\x67\x6C\x6F\x62\x61\x6C","\x70\x65\x72\x69\x6D\x65\x74\x65\x72","\x73\x6F\x75\x72\x63\x65\x53\x70\x61\x63\x69\x6E\x67","\x74\x61\x72\x67\x65\x74\x53\x70\x61\x63\x69\x6E\x67","\x66\x6F\x72\x6D\x61\x74","\x61\x64\x64\x4D\x65\x6E\x75\x49\x74\x65\x6D","\x74\x65\x78\x74","\x61\x64\x64\x53\x75\x62\x6D\x65\x6E\x75","\x2D","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x61\x64\x64\x4D\x65\x6E\x75\x49\x74\x65\x6D\x73","\x61\x6C\x69\x67\x6E\x6D\x65\x6E\x74","\x77\x6F\x72\x64\x57\x72\x61\x70","\x74\x65\x78\x74\x4F\x70\x61\x63\x69\x74\x79","\x28\x25\x29","\x31\x30\x30","\x68\x69\x64\x65","\x6C\x65\x66\x74\x41\x6C\x69\x67\x6E","\x53\x54\x59\x4C\x45\x5F\x41\x4C\x49\x47\x4E","\x41\x4C\x49\x47\x4E\x5F\x4C\x45\x46\x54","\x63\x65\x6E\x74\x65\x72","\x41\x4C\x49\x47\x4E\x5F\x43\x45\x4E\x54\x45\x52","\x72\x69\x67\x68\x74\x41\x6C\x69\x67\x6E","\x41\x4C\x49\x47\x4E\x5F\x52\x49\x47\x48\x54","\x74\x6F\x70\x41\x6C\x69\x67\x6E","\x53\x54\x59\x4C\x45\x5F\x56\x45\x52\x54\x49\x43\x41\x4C\x5F\x41\x4C\x49\x47\x4E","\x41\x4C\x49\x47\x4E\x5F\x54\x4F\x50","\x6D\x69\x64\x64\x6C\x65","\x41\x4C\x49\x47\x4E\x5F\x4D\x49\x44\x44\x4C\x45","\x62\x6F\x74\x74\x6F\x6D\x41\x6C\x69\x67\x6E","\x41\x4C\x49\x47\x4E\x5F\x42\x4F\x54\x54\x4F\x4D","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x53\x54\x59\x4C\x45\x5F\x4C\x41\x42\x45\x4C\x5F\x50\x4F\x53\x49\x54\x49\x4F\x4E","\x53\x54\x59\x4C\x45\x5F\x56\x45\x52\x54\x49\x43\x41\x4C\x5F\x4C\x41\x42\x45\x4C\x5F\x50\x4F\x53\x49\x54\x49\x4F\x4E","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x66\x6C\x69\x70\x48","\x66\x6C\x69\x70\x56","\x74\x69\x6C\x74","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x61\x6C\x69\x67\x6E","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73","\x6C\x61\x79\x6F\x75\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x46\x6C\x6F\x77","\x65\x78\x65\x63\x75\x74\x65\x4C\x61\x79\x6F\x75\x74","\x76\x65\x72\x74\x69\x63\x61\x6C\x46\x6C\x6F\x77","\x6E\x61\x76\x69\x67\x61\x74\x69\x6F\x6E","\x68\x6F\x6D\x65","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x65\x78\x70\x61\x6E\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x61\x72\x72\x61\x6E\x67\x65","\x74\x6F\x46\x72\x6F\x6E\x74","\x74\x6F\x42\x61\x63\x6B","\x67\x72\x6F\x75\x70","\x75\x6E\x67\x72\x6F\x75\x70","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x47\x72\x6F\x75\x70","\x76\x69\x65\x77","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x25","\x7A\x6F\x6F\x6D\x54\x6F","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x66\x69\x74\x57\x69\x6E\x64\x6F\x77","\x63\x75\x73\x74\x6F\x6D\x5A\x6F\x6F\x6D","\x66\x69\x74\x50\x61\x67\x65","\x66\x69\x74\x50\x61\x67\x65\x57\x69\x64\x74\x68","\x66\x69\x6C\x65","\x6E\x65\x77","\x6F\x70\x65\x6E","\x73\x61\x76\x65","\x73\x61\x76\x65\x41\x73","\x70\x75\x62\x6C\x69\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x69\x6D\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x65\x64\x69\x74\x46\x69\x6C\x65","\x72\x65\x6E\x61\x6D\x65","\x70\x72\x69\x6E\x74","\x65\x64\x69\x74","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x75\x74","\x63\x6F\x70\x79","\x70\x61\x73\x74\x65","\x64\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x68\x65\x6C\x70","\x61\x62\x6F\x75\x74","\x61\x64\x64\x4D\x65\x6E\x75","\x65\x78\x65\x63\x75\x74\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x65\x6E\x74\x65\x72\x56\x61\x6C\x75\x65","\x20","\x70\x72\x6F\x6D\x70\x74","\x6C\x61\x62\x65\x6C","\x66\x75\x6E\x63\x74","\x74\x6F\x67\x67\x6C\x65\x41\x63\x74\x69\x6F\x6E","\x69\x73\x53\x65\x6C\x65\x63\x74\x65\x64","\x61\x64\x64\x43\x68\x65\x63\x6B\x6D\x61\x72\x6B","\x61\x64\x64\x53\x68\x6F\x72\x74\x63\x75\x74","\x73\x68\x6F\x72\x74\x63\x75\x74","\x73\x70\x61\x6E","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6F\x6C\x6F\x72","\x67\x72\x61\x79","\x77\x72\x69\x74\x65","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x2F\x63\x68\x65\x63\x6B\x6D\x61\x72\x6B\x2E\x67\x69\x66\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x70\x65\x61\x74","\x6E\x6F\x2D\x72\x65\x70\x65\x61\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x32\x70\x78\x20\x35\x30\x25","\x63\x72\x65\x61\x74\x65\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75","\x73\x6D\x61\x72\x74\x53\x65\x70\x61\x72\x61\x74\x6F\x72\x73","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x69\x73\x45\x64\x67\x65","\x73\x65\x74\x41\x73\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x62\x65\x6E\x64\x73","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x46\x6F\x72\x45\x76\x65\x6E\x74","\x72\x65\x6D\x6F\x76\x65\x57\x61\x79\x70\x6F\x69\x6E\x74","\x68\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x64\x65\x78","\x61\x64\x64\x57\x61\x79\x70\x6F\x69\x6E\x74","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x6F\x70\x65\x6E\x4C\x69\x6E\x6B","\x63\x72\x65\x61\x74\x65\x4D\x65\x6E\x75\x62\x61\x72","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x63\x75\x72\x72\x65\x6E\x74\x4D\x65\x6E\x75","\x61","\x68\x72\x65\x66","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x49\x74\x65\x6D","\x61\x64\x64\x4D\x65\x6E\x75\x48\x61\x6E\x64\x6C\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x64\x69\x76","\x20\x67\x65\x4D\x65\x6E\x75\x62\x61\x72\x4D\x65\x6E\x75","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x61\x70\x70\x6C\x79","\x64\x65\x73\x74\x72\x6F\x79","\x63\x75\x72\x72\x65\x6E\x74\x45\x6C\x74","\x6F\x66\x66\x73\x65\x74\x4C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x57\x69\x64\x74\x68","\x70\x61\x67\x65\x2D\x73\x69\x64\x65\x62\x61\x72","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x70\x6F\x70\x75\x70","\x63\x6F\x6E\x73\x75\x6D\x65","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x63\x6C\x69\x63\x6B","\x63\x61\x6C\x6C","\x65\x78\x74\x65\x6E\x64","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x73\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x64","\x66\x69\x72\x65\x45\x76\x65\x6E\x74"];Menus= function(_0xeee1x1){this[_0xe8e0[0]]= _0xeee1x1;this[_0xe8e0[1]]=  new Object();this[_0xe8e0[2]](); new Image()[_0xe8e0[3]]= IMAGE_PATH+ _0xe8e0[4]};Menus[_0xe8e0[5]][_0xe8e0[2]]= function(){var _0xeee1x2=this[_0xe8e0[0]][_0xe8e0[7]][_0xe8e0[6]];this[_0xe8e0[30]](_0xe8e0[8], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){var _0xeee1x5=[_0xe8e0[9],_0xe8e0[10],_0xe8e0[11],_0xe8e0[12],_0xe8e0[13],_0xe8e0[14],_0xe8e0[15],_0xe8e0[16],_0xe8e0[17]];for(var _0xeee1x6=0;_0xeee1x6< _0xeee1x5[_0xe8e0[18]];_0xeee1x6++){var _0xeee1x7=this[_0xe8e0[20]](_0xeee1x3,_0xeee1x5[_0xeee1x6],[mxConstants[_0xe8e0[19]]],[_0xeee1x5[_0xeee1x6]],null,_0xeee1x4);_0xeee1x7[_0xe8e0[23]][_0xe8e0[22]][_0xe8e0[21]][_0xe8e0[8]]= _0xeee1x5[_0xeee1x6]};_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[28]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[25]),_0xe8e0[27],mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,_0xeee1x4)})));this[_0xe8e0[30]](_0xe8e0[31], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){var _0xeee1x8=[6,8,9,10,11,12,14,18,24,36,48,72];for(var _0xeee1x6=0;_0xeee1x6< _0xeee1x8[_0xe8e0[18]];_0xeee1x6++){this[_0xe8e0[20]](_0xeee1x3,_0xeee1x8[_0xeee1x6],[mxConstants[_0xe8e0[32]]],[_0xeee1x8[_0xeee1x6]],null,_0xeee1x4)};_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[28]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[25]),_0xe8e0[33],_0xe8e0[34],mxConstants.STYLE_FONTSIZE,_0xeee1x4)})));this[_0xe8e0[30]](_0xe8e0[35], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){var _0xeee1x8=[1,2,3,4,8,12,16,24];for(var _0xeee1x6=0;_0xeee1x6< _0xeee1x8[_0xe8e0[18]];_0xeee1x6++){this[_0xe8e0[20]](_0xeee1x3,_0xeee1x8[_0xeee1x6]+ _0xe8e0[36],[mxConstants[_0xe8e0[37]]],[_0xeee1x8[_0xeee1x6]],null,_0xeee1x4)};_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[28]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[25]),_0xe8e0[38],_0xe8e0[39],mxConstants.STYLE_STROKEWIDTH,_0xeee1x4)})));this[_0xe8e0[30]](_0xe8e0[40], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[41]),[mxConstants[_0xe8e0[42]]],[null],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[43]),[mxConstants[_0xe8e0[42]]],[_0xe8e0[44]],null,_0xeee1x4);_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[45]),[mxConstants[_0xe8e0[42]],mxConstants[_0xe8e0[46]]],[_0xe8e0[47],_0xe8e0[45]],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[48]),[mxConstants[_0xe8e0[42]],mxConstants[_0xe8e0[46]]],[_0xe8e0[47],_0xe8e0[48]],null,_0xeee1x4);_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[49]),[mxConstants[_0xe8e0[42]]],[_0xe8e0[50]],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[51]),[mxConstants[_0xe8e0[42]]],[_0xe8e0[52]],null,_0xeee1x4)})));this[_0xe8e0[30]](_0xe8e0[53], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[54]),[mxConstants[_0xe8e0[55]]],[mxConstants[_0xe8e0[56]]],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[57]),[mxConstants[_0xe8e0[55]]],[mxConstants[_0xe8e0[58]]],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[59]),[mxConstants[_0xe8e0[55]]],[mxConstants[_0xe8e0[60]]],null,_0xeee1x4);_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[61]),[mxConstants[_0xe8e0[55]]],[mxConstants[_0xe8e0[62]]],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[63]),[mxConstants[_0xe8e0[55]]],[mxConstants[_0xe8e0[64]]],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[65]),[mxConstants[_0xe8e0[55]]],[mxConstants[_0xe8e0[66]]],null,_0xeee1x4);_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[67]),[mxConstants[_0xe8e0[55]]],[mxConstants[_0xe8e0[68]]],null,_0xeee1x4);_0xeee1x3[_0xe8e0[24]](_0xeee1x4);_0xeee1x3[_0xe8e0[72]](mxResources[_0xe8e0[26]](_0xe8e0[69]),null,function(){_0xeee1x2[_0xe8e0[71]](_0xe8e0[70],true)},_0xeee1x4,null,true);_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[28]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[73]),_0xe8e0[38],mxConstants.DEFAULT_MARKERSIZE,mxConstants.STYLE_ENDSIZE,_0xeee1x4)})));this[_0xe8e0[30]](_0xe8e0[74], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[54]),[mxConstants[_0xe8e0[75]]],[mxConstants[_0xe8e0[56]]],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[57]),[mxConstants[_0xe8e0[75]]],[mxConstants[_0xe8e0[58]]],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[59]),[mxConstants[_0xe8e0[75]]],[mxConstants[_0xe8e0[60]]],null,_0xeee1x4);_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[61]),[mxConstants[_0xe8e0[75]]],[mxConstants[_0xe8e0[62]]],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[63]),[mxConstants[_0xe8e0[75]]],[mxConstants[_0xe8e0[64]]],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[65]),[mxConstants[_0xe8e0[75]]],[mxConstants[_0xe8e0[66]]],null,_0xeee1x4);_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[67]),[mxConstants[_0xe8e0[75]]],[mxConstants[_0xe8e0[68]]],null,_0xeee1x4);_0xeee1x3[_0xe8e0[24]](_0xeee1x4);_0xeee1x3[_0xe8e0[72]](mxResources[_0xe8e0[26]](_0xe8e0[69]),null,function(){_0xeee1x2[_0xe8e0[71]](_0xe8e0[76],true)},_0xeee1x4,null,true);_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[28]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[73]),_0xe8e0[38],mxConstants.DEFAULT_MARKERSIZE,mxConstants.STYLE_STARTSIZE,_0xeee1x4)})));this[_0xe8e0[30]](_0xe8e0[77], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){var _0xeee1x9=this[_0xe8e0[0]][_0xe8e0[80]][_0xe8e0[26]](_0xe8e0[79])[_0xe8e0[78]];var _0xeee1xa=this[_0xe8e0[26]](_0xe8e0[40])[_0xe8e0[78]];if(_0xeee1x9|| _0xeee1x3[_0xe8e0[81]]){this[_0xe8e0[28]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[82]),_0xe8e0[38],_0xe8e0[83],mxConstants.STYLE_SPACING_TOP,_0xeee1x4,_0xeee1x9);this[_0xe8e0[28]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[84]),_0xe8e0[38],_0xe8e0[83],mxConstants.STYLE_SPACING_RIGHT,_0xeee1x4,_0xeee1x9);this[_0xe8e0[28]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[85]),_0xe8e0[38],_0xe8e0[83],mxConstants.STYLE_SPACING_BOTTOM,_0xeee1x4,_0xeee1x9);this[_0xe8e0[28]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[86]),_0xe8e0[38],_0xe8e0[83],mxConstants.STYLE_SPACING_LEFT,_0xeee1x4,_0xeee1x9);_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[28]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[87]),_0xe8e0[38],_0xe8e0[83],mxConstants.STYLE_SPACING,_0xeee1x4,_0xeee1x9);this[_0xe8e0[28]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[88]),_0xe8e0[38],_0xe8e0[83],mxConstants.STYLE_PERIMETER_SPACING,_0xeee1x4,_0xeee1x9)};if(_0xeee1xa|| _0xeee1x3[_0xe8e0[81]]){_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[28]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[89]),_0xe8e0[38],_0xe8e0[83],mxConstants.STYLE_SOURCE_PERIMETER_SPACING,_0xeee1x4,_0xeee1xa);this[_0xe8e0[28]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[90]),_0xe8e0[38],_0xe8e0[83],mxConstants.STYLE_TARGET_PERIMETER_SPACING,_0xeee1x4,_0xeee1xa)}})));this[_0xe8e0[30]](_0xe8e0[91], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){this[_0xe8e0[92]](_0xeee1x3,_0xe8e0[21],_0xeee1x4)})));this[_0xe8e0[30]](_0xe8e0[93], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){var _0xeee1xb=this[_0xe8e0[26]](_0xe8e0[93])[_0xe8e0[78]];_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[94]](_0xe8e0[8],_0xeee1x3,_0xeee1x4);this[_0xe8e0[94]](_0xe8e0[31],_0xeee1x3,_0xeee1x4);this[_0xe8e0[99]](_0xeee1x3,[_0xe8e0[95],_0xe8e0[96],_0xe8e0[97],_0xe8e0[98],_0xe8e0[95]],_0xeee1x4);this[_0xe8e0[94]](_0xe8e0[100],_0xeee1x3,_0xeee1x4);this[_0xe8e0[92]](_0xeee1x3,_0xe8e0[101],_0xeee1x4);_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[28]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[102]),_0xe8e0[103],_0xe8e0[104],mxConstants.STYLE_TEXT_OPACITY,_0xeee1x4,_0xeee1xb);_0xeee1x3[_0xe8e0[72]](mxResources[_0xe8e0[26]](_0xe8e0[105]),null,function(){_0xeee1x2[_0xe8e0[71]](mxConstants.STYLE_NOLABEL,false)},_0xeee1x4,null,_0xeee1xb)})));this[_0xe8e0[30]](_0xe8e0[100], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[106]),[mxConstants[_0xe8e0[107]]],[mxConstants[_0xe8e0[108]]],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[109]),[mxConstants[_0xe8e0[107]]],[mxConstants[_0xe8e0[110]]],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[111]),[mxConstants[_0xe8e0[107]]],[mxConstants[_0xe8e0[112]]],null,_0xeee1x4);_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[113]),[mxConstants[_0xe8e0[114]]],[mxConstants[_0xe8e0[115]]],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[116]),[mxConstants[_0xe8e0[114]]],[mxConstants[_0xe8e0[117]]],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[118]),[mxConstants[_0xe8e0[114]]],[mxConstants[_0xe8e0[119]]],null,_0xeee1x4);_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[94]](_0xe8e0[120],_0xeee1x3,_0xeee1x4);this[_0xe8e0[94]](_0xe8e0[77],_0xeee1x3,_0xeee1x4);_0xeee1x3[_0xe8e0[24]](_0xeee1x4);var _0xeee1xb=this[_0xe8e0[26]](_0xe8e0[93])[_0xe8e0[78]];_0xeee1x3[_0xe8e0[72]](mxResources[_0xe8e0[26]](_0xe8e0[48]),null,function(){_0xeee1x2[_0xe8e0[71]](mxConstants.STYLE_HORIZONTAL,true)},_0xeee1x4,null,_0xeee1xb)})));this[_0xe8e0[30]](_0xe8e0[120], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[86]),[mxConstants[_0xe8e0[121]],mxConstants[_0xe8e0[107]]],[mxConstants[_0xe8e0[108]],mxConstants[_0xe8e0[112]]],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[109]),[mxConstants[_0xe8e0[121]],mxConstants[_0xe8e0[107]]],[mxConstants[_0xe8e0[110]],mxConstants[_0xe8e0[110]]],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[84]),[mxConstants[_0xe8e0[121]],mxConstants[_0xe8e0[107]]],[mxConstants[_0xe8e0[112]],mxConstants[_0xe8e0[108]]],null,_0xeee1x4);_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[82]),[mxConstants[_0xe8e0[122]],mxConstants[_0xe8e0[114]]],[mxConstants[_0xe8e0[115]],mxConstants[_0xe8e0[119]]],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[116]),[mxConstants[_0xe8e0[122]],mxConstants[_0xe8e0[114]]],[mxConstants[_0xe8e0[117]],mxConstants[_0xe8e0[117]]],null,_0xeee1x4);this[_0xe8e0[20]](_0xeee1x3,mxResources[_0xe8e0[26]](_0xe8e0[85]),[mxConstants[_0xe8e0[122]],mxConstants[_0xe8e0[114]]],[mxConstants[_0xe8e0[119]],mxConstants[_0xe8e0[115]]],null,_0xeee1x4)})));this[_0xe8e0[30]](_0xe8e0[123], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){_0xeee1x3[_0xe8e0[72]](mxResources[_0xe8e0[26]](_0xe8e0[124]),null,function(){_0xeee1x2[_0xe8e0[71]](mxConstants.STYLE_FLIPH,false)},_0xeee1x4);_0xeee1x3[_0xe8e0[72]](mxResources[_0xe8e0[26]](_0xe8e0[125]),null,function(){_0xeee1x2[_0xe8e0[71]](mxConstants.STYLE_FLIPV,false)},_0xeee1x4);this[_0xe8e0[99]](_0xeee1x3,[_0xe8e0[95],_0xe8e0[126],_0xe8e0[127]],_0xeee1x4)})));this[_0xe8e0[30]](_0xe8e0[128], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){_0xeee1x3[_0xe8e0[72]](mxResources[_0xe8e0[26]](_0xe8e0[106]),null,function(){_0xeee1x2[_0xe8e0[129]](mxConstants.ALIGN_LEFT)},_0xeee1x4);_0xeee1x3[_0xe8e0[72]](mxResources[_0xe8e0[26]](_0xe8e0[109]),null,function(){_0xeee1x2[_0xe8e0[129]](mxConstants.ALIGN_CENTER)},_0xeee1x4);_0xeee1x3[_0xe8e0[72]](mxResources[_0xe8e0[26]](_0xe8e0[111]),null,function(){_0xeee1x2[_0xe8e0[129]](mxConstants.ALIGN_RIGHT)},_0xeee1x4);_0xeee1x3[_0xe8e0[24]](_0xeee1x4);_0xeee1x3[_0xe8e0[72]](mxResources[_0xe8e0[26]](_0xe8e0[113]),null,function(){_0xeee1x2[_0xe8e0[129]](mxConstants.ALIGN_TOP)},_0xeee1x4);_0xeee1x3[_0xe8e0[72]](mxResources[_0xe8e0[26]](_0xe8e0[116]),null,function(){_0xeee1x2[_0xe8e0[129]](mxConstants.ALIGN_MIDDLE)},_0xeee1x4);_0xeee1x3[_0xe8e0[72]](mxResources[_0xe8e0[26]](_0xe8e0[118]),null,function(){_0xeee1x2[_0xe8e0[129]](mxConstants.ALIGN_BOTTOM)},_0xeee1x4)})));this[_0xe8e0[30]](_0xe8e0[130], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){_0xeee1x3[_0xe8e0[72]](mxResources[_0xe8e0[26]](_0xe8e0[131]),null,mxUtils[_0xe8e0[29]](this,function(){var _0xeee1xc= new mxHierarchicalLayout(_0xeee1x2,mxConstants.DIRECTION_WEST);this[_0xe8e0[0]][_0xe8e0[132]](_0xeee1xc,true,true)}),_0xeee1x4);_0xeee1x3[_0xe8e0[72]](mxResources[_0xe8e0[26]](_0xe8e0[133]),null,mxUtils[_0xe8e0[29]](this,function(){var _0xeee1xc= new mxHierarchicalLayout(_0xeee1x2,mxConstants.DIRECTION_NORTH);this[_0xe8e0[0]][_0xe8e0[132]](_0xeee1xc,true,true)}),_0xeee1x4)})));this[_0xe8e0[30]](_0xe8e0[134], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){this[_0xe8e0[99]](_0xeee1x3,[_0xe8e0[135],_0xe8e0[95],_0xe8e0[136],_0xe8e0[137],_0xe8e0[95],_0xe8e0[138],_0xe8e0[139]],_0xeee1x4)})));this[_0xe8e0[30]](_0xe8e0[140], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){this[_0xe8e0[99]](_0xeee1x3,[_0xe8e0[141],_0xe8e0[142],_0xe8e0[95]],_0xeee1x4);this[_0xe8e0[94]](_0xe8e0[130],_0xeee1x3,_0xeee1x4);_0xeee1x3[_0xe8e0[24]](_0xeee1x4);this[_0xe8e0[99]](_0xeee1x3,[_0xe8e0[95],_0xe8e0[143],_0xe8e0[144],_0xe8e0[145]],_0xeee1x4)})));this[_0xe8e0[30]](_0xe8e0[146], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){this[_0xe8e0[99]](_0xeee1x3,[_0xe8e0[147]],_0xeee1x4);_0xeee1x3[_0xe8e0[24]]();var _0xeee1xd=[0.25,0.5,0.75,1,2,4];for(var _0xeee1x6=0;_0xeee1x6< _0xeee1xd[_0xe8e0[18]];_0xeee1x6++){(function(_0xeee1xe){_0xeee1x3[_0xe8e0[72]]((_0xeee1xe* 100)+ _0xe8e0[148],null,function(){_0xeee1x2[_0xe8e0[149]](_0xeee1xe)},_0xeee1x4)})(_0xeee1xd[_0xeee1x6])};this[_0xe8e0[99]](_0xeee1x3,[_0xe8e0[95],_0xe8e0[150],_0xe8e0[151],_0xe8e0[95],_0xe8e0[152],_0xe8e0[153],_0xe8e0[95],_0xe8e0[154],_0xe8e0[155]],_0xeee1x4)})));this[_0xe8e0[30]](_0xe8e0[156], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){this[_0xe8e0[99]](_0xeee1x3,[_0xe8e0[157],_0xe8e0[158],_0xe8e0[95],_0xe8e0[159],_0xe8e0[160],_0xe8e0[161],_0xe8e0[95],_0xe8e0[162],_0xe8e0[95],_0xe8e0[163],_0xe8e0[164],_0xe8e0[95],_0xe8e0[165],_0xe8e0[166],_0xe8e0[95],_0xe8e0[167]],_0xeee1x4)})));this[_0xe8e0[30]](_0xe8e0[168], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){this[_0xe8e0[99]](_0xeee1x3,[_0xe8e0[169],_0xe8e0[170],_0xe8e0[95],_0xe8e0[171],_0xe8e0[172],_0xe8e0[173],_0xe8e0[174],_0xe8e0[95],_0xe8e0[175],_0xe8e0[95],_0xe8e0[176],_0xe8e0[177],_0xe8e0[178]])})));this[_0xe8e0[30]](_0xe8e0[179], new Menu(mxUtils[_0xe8e0[29]](this,function(_0xeee1x3,_0xeee1x4){this[_0xe8e0[99]](_0xeee1x3,[_0xe8e0[179],_0xe8e0[95],_0xe8e0[180]])})))};Menus[_0xe8e0[5]][_0xe8e0[30]]= function(_0xeee1xf,_0xeee1x3){this[_0xe8e0[1]][_0xeee1xf]= _0xeee1x3};Menus[_0xe8e0[5]][_0xe8e0[26]]= function(_0xeee1xf){return this[_0xe8e0[1]][_0xeee1xf]};Menus[_0xe8e0[5]][_0xe8e0[94]]= function(_0xeee1xf,_0xeee1x3,_0xeee1x4){var _0xeee1xb=this[_0xe8e0[26]](_0xeee1xf)[_0xe8e0[78]];if(_0xeee1x3[_0xe8e0[81]]|| _0xeee1xb){var _0xeee1x10=_0xeee1x3[_0xe8e0[72]](mxResources[_0xe8e0[26]](_0xeee1xf),null,null,_0xeee1x4,null,_0xeee1xb);this[_0xe8e0[181]](_0xeee1xf,_0xeee1x3,_0xeee1x10)}};Menus[_0xe8e0[5]][_0xe8e0[181]]= function(_0xeee1xf,_0xeee1x11,_0xeee1x4){var _0xeee1x3=this[_0xe8e0[26]](_0xeee1xf);if(_0xeee1x3!= null&& (_0xeee1x11[_0xe8e0[81]]|| _0xeee1x3[_0xe8e0[78]])){this[_0xe8e0[26]](_0xeee1xf)[_0xe8e0[182]](_0xeee1x11,_0xeee1x4)}};Menus[_0xe8e0[5]][_0xe8e0[20]]= function(_0xeee1x3,_0xeee1x12,_0xeee1x13,_0xeee1x14,_0xeee1x15,_0xeee1x4){return _0xeee1x3[_0xe8e0[72]](_0xeee1x12,null,mxUtils[_0xe8e0[29]](this,function(){var _0xeee1x2=this[_0xe8e0[0]][_0xe8e0[7]][_0xe8e0[6]];_0xeee1x2[_0xe8e0[184]]()[_0xe8e0[183]]();try{for(var _0xeee1x6=0;_0xeee1x6< _0xeee1x13[_0xe8e0[18]];_0xeee1x6++){_0xeee1x2[_0xe8e0[185]](_0xeee1x13[_0xeee1x6],_0xeee1x14[_0xeee1x6])}}finally{_0xeee1x2[_0xe8e0[184]]()[_0xe8e0[186]]()}}),_0xeee1x4,_0xeee1x15)};Menus[_0xe8e0[5]][_0xe8e0[28]]= function(_0xeee1x3,_0xeee1x12,_0xeee1x16,_0xeee1x17,_0xeee1x18,_0xeee1x4,_0xeee1xb){return _0xeee1x3[_0xe8e0[72]](_0xeee1x12,null,mxUtils[_0xe8e0[29]](this,function(){var _0xeee1x2=this[_0xe8e0[0]][_0xe8e0[7]][_0xe8e0[6]];var _0xeee1x19=_0xeee1x17;var _0xeee1x1a=_0xeee1x2[_0xe8e0[189]]()[_0xe8e0[188]](_0xeee1x2[_0xe8e0[187]]());if(_0xeee1x1a!= null){_0xeee1x19= _0xeee1x1a[_0xe8e0[21]][_0xeee1x18]|| _0xeee1x19};_0xeee1x19= mxUtils[_0xe8e0[192]](mxResources[_0xe8e0[26]](_0xe8e0[190])+ ((_0xeee1x16[_0xe8e0[18]]> 0)?(_0xe8e0[191]+ _0xeee1x16):_0xe8e0[27]),_0xeee1x19);if(_0xeee1x19!= null&& _0xeee1x19[_0xe8e0[18]]> 0){_0xeee1x2[_0xe8e0[185]](_0xeee1x18,_0xeee1x19)}}),_0xeee1x4,null,_0xeee1xb)};Menus[_0xe8e0[5]][_0xe8e0[92]]= function(_0xeee1x3,_0xeee1x18,_0xeee1x4){var _0xeee1x1b=this[_0xe8e0[0]][_0xe8e0[80]][_0xe8e0[26]](_0xeee1x18);if(_0xeee1x1b!= null&& (_0xeee1x3[_0xe8e0[81]]|| _0xeee1x1b[_0xe8e0[78]])){var _0xeee1x1c=_0xeee1x3[_0xe8e0[72]](_0xeee1x1b[_0xe8e0[193]],null,_0xeee1x1b[_0xe8e0[194]],_0xeee1x4,null,_0xeee1x1b[_0xe8e0[78]]);if(_0xeee1x1b[_0xe8e0[195]]&& _0xeee1x1b[_0xe8e0[196]]()){this[_0xe8e0[197]](_0xeee1x1c)};this[_0xe8e0[198]](_0xeee1x1c,_0xeee1x1b);return _0xeee1x1c};return null};Menus[_0xe8e0[5]][_0xe8e0[198]]= function(_0xeee1x1c,_0xeee1x1b){if(_0xeee1x1b[_0xe8e0[199]]!= null){var _0xeee1x1d=_0xeee1x1c[_0xe8e0[23]][_0xe8e0[22]][_0xe8e0[22]];var _0xeee1x1e=document[_0xe8e0[201]](_0xe8e0[200]);_0xeee1x1e[_0xe8e0[21]][_0xe8e0[202]]= _0xe8e0[203];mxUtils[_0xe8e0[204]](_0xeee1x1e,_0xeee1x1b[_0xe8e0[199]]);_0xeee1x1d[_0xe8e0[205]](_0xeee1x1e)}};Menus[_0xe8e0[5]][_0xe8e0[197]]= function(_0xeee1x1c){var _0xeee1x1d=_0xeee1x1c[_0xe8e0[23]][_0xe8e0[22]];_0xeee1x1d[_0xe8e0[21]][_0xe8e0[206]]= _0xe8e0[207]+ IMAGE_PATH+ _0xe8e0[208];_0xeee1x1d[_0xe8e0[21]][_0xe8e0[209]]= _0xe8e0[210];_0xeee1x1d[_0xe8e0[21]][_0xe8e0[211]]= _0xe8e0[212]};Menus[_0xe8e0[5]][_0xe8e0[99]]= function(_0xeee1x3,_0xeee1x13,_0xeee1x4){for(var _0xeee1x6=0;_0xeee1x6< _0xeee1x13[_0xe8e0[18]];_0xeee1x6++){if(_0xeee1x13[_0xeee1x6]== _0xe8e0[95]){_0xeee1x3[_0xe8e0[24]](_0xeee1x4)}else {this[_0xe8e0[92]](_0xeee1x3,_0xeee1x13[_0xeee1x6],_0xeee1x4)}}};Menus[_0xe8e0[5]][_0xe8e0[213]]= function(_0xeee1x3,_0xeee1x1f,_0xeee1x20){var _0xeee1x2=this[_0xe8e0[0]][_0xe8e0[7]][_0xe8e0[6]];_0xeee1x3[_0xe8e0[214]]= true;if(_0xeee1x2[_0xe8e0[215]]()){this[_0xe8e0[99]](_0xeee1x3,[_0xe8e0[169],_0xe8e0[170],_0xe8e0[95],_0xe8e0[173],_0xe8e0[95]])}else {this[_0xe8e0[99]](_0xeee1x3,[_0xe8e0[174],_0xe8e0[95],_0xe8e0[171],_0xe8e0[172],_0xe8e0[95],_0xe8e0[175]]);if(_0xeee1x2[_0xe8e0[216]]()== 1&& _0xeee1x2[_0xe8e0[184]]()[_0xe8e0[217]](_0xeee1x2[_0xe8e0[187]]())){this[_0xe8e0[99]](_0xeee1x3,[_0xe8e0[218]])};_0xeee1x3[_0xe8e0[24]]()};if(_0xeee1x2[_0xe8e0[216]]()> 0){this[_0xe8e0[99]](_0xeee1x3,[_0xe8e0[141],_0xe8e0[142],_0xe8e0[95]]);if(_0xeee1x2[_0xe8e0[184]]()[_0xe8e0[217]](_0xeee1x2[_0xe8e0[187]]())){var _0xeee1x21=false;var _0xeee1x1f=_0xeee1x2[_0xe8e0[187]]();if(_0xeee1x1f!= null&& _0xeee1x2[_0xe8e0[184]]()[_0xe8e0[217]](_0xeee1x1f)){var _0xeee1x22=_0xeee1x2[_0xe8e0[220]][_0xe8e0[219]](_0xeee1x1f);if(_0xeee1x22 instanceof  mxEdgeHandler&& _0xeee1x22[_0xe8e0[221]]!= null&& _0xeee1x22[_0xe8e0[221]][_0xe8e0[18]]> 2){var _0xeee1x23=_0xeee1x22[_0xe8e0[222]]( new mxMouseEvent(_0xeee1x20));var _0xeee1x24=this[_0xe8e0[0]][_0xe8e0[80]][_0xe8e0[26]](_0xe8e0[223]);_0xeee1x24[_0xe8e0[224]]= _0xeee1x22;_0xeee1x24[_0xe8e0[225]]= _0xeee1x23;_0xeee1x21= _0xeee1x23> 0&& _0xeee1x23< _0xeee1x22[_0xe8e0[221]][_0xe8e0[18]]}};this[_0xe8e0[99]](_0xeee1x3,[_0xe8e0[95],(_0xeee1x21)?_0xe8e0[223]:_0xe8e0[226]])}else {if(_0xeee1x2[_0xe8e0[216]]()> 1){_0xeee1x3[_0xe8e0[24]]();this[_0xe8e0[99]](_0xeee1x3,[_0xe8e0[143]])}};_0xeee1x3[_0xe8e0[24]]();if(_0xeee1x2[_0xe8e0[216]]()== 1){var _0xeee1x25=_0xeee1x2[_0xe8e0[227]](_0xeee1x2[_0xe8e0[187]]());if(_0xeee1x25!= null){this[_0xe8e0[99]](_0xeee1x3,[_0xe8e0[228]])}}}else {this[_0xe8e0[99]](_0xeee1x3,[_0xe8e0[95],_0xe8e0[176],_0xe8e0[177],_0xe8e0[95],_0xe8e0[178]])}};Menus[_0xe8e0[5]][_0xe8e0[229]]= function(_0xeee1x26){var _0xeee1x27= new Menubar(this[_0xe8e0[0]],_0xeee1x26);var _0xeee1x28=[_0xe8e0[156],_0xe8e0[168],_0xe8e0[146],_0xe8e0[91],_0xe8e0[93],_0xe8e0[140]];for(var _0xeee1x6=0;_0xeee1x6< _0xeee1x28[_0xe8e0[18]];_0xeee1x6++){_0xeee1x27[_0xe8e0[181]](mxResources[_0xe8e0[26]](_0xeee1x28[_0xeee1x6]),this[_0xe8e0[26]](_0xeee1x28[_0xeee1x6])[_0xe8e0[194]])};return _0xeee1x27};function Menubar(_0xeee1x1,_0xeee1x26){this[_0xe8e0[0]]= _0xeee1x1;this[_0xe8e0[230]]= _0xeee1x26;mxEvent[_0xe8e0[232]](document,mxUtils[_0xe8e0[29]](this,function(_0xeee1x20){this[_0xe8e0[231]]()}))}Menubar[_0xe8e0[5]][_0xe8e0[231]]= function(){if(this[_0xe8e0[233]]!= null){this[_0xe8e0[233]][_0xe8e0[231]]()}};Menubar[_0xe8e0[5]][_0xe8e0[181]]= function(_0xeee1x12,_0xeee1x2a){var _0xeee1x2b=document[_0xe8e0[201]](_0xe8e0[234]);_0xeee1x2b[_0xe8e0[237]](_0xe8e0[235],_0xe8e0[236]);_0xeee1x2b[_0xe8e0[238]]= _0xe8e0[239];mxUtils[_0xe8e0[204]](_0xeee1x2b,_0xeee1x12);this[_0xe8e0[240]](_0xeee1x2b,_0xeee1x2a);this[_0xe8e0[230]][_0xe8e0[205]](_0xeee1x2b);return _0xeee1x2b};Menubar[_0xe8e0[5]][_0xe8e0[240]]= function(_0xeee1x2b,_0xeee1x2a){if(_0xeee1x2a!= null){var _0xeee1x2c=true;var _0xeee1x2d=mxUtils[_0xe8e0[29]](this,function(_0xeee1x20){if(_0xeee1x2c&& _0xeee1x2b[_0xe8e0[78]]== null|| _0xeee1x2b[_0xe8e0[78]]){this[_0xe8e0[0]][_0xe8e0[7]][_0xe8e0[6]][_0xe8e0[241]][_0xe8e0[231]]();var _0xeee1x3= new mxPopupMenu(_0xeee1x2a);_0xeee1x3[_0xe8e0[242]][_0xe8e0[238]]+= _0xe8e0[243];_0xeee1x3[_0xe8e0[214]]= true;_0xeee1x3[_0xe8e0[81]]= true;_0xeee1x3[_0xe8e0[244]]= true;_0xeee1x3[_0xe8e0[231]]= mxUtils[_0xe8e0[29]](this,function(){mxPopupMenu[_0xe8e0[5]][_0xe8e0[231]][_0xe8e0[245]](_0xeee1x3,arguments);_0xeee1x3[_0xe8e0[246]]();this[_0xe8e0[233]]= null;this[_0xe8e0[247]]= null});var _0xeee1x2e=_0xeee1x2b[_0xe8e0[248]]+ document[_0xe8e0[251]](_0xe8e0[250])[_0xe8e0[249]]+ 22;var _0xeee1x2f=_0xeee1x2b[_0xe8e0[252]]+ _0xeee1x2b[_0xe8e0[253]]+ 140;_0xeee1x3[_0xe8e0[254]](_0xeee1x2e,_0xeee1x2f,null,_0xeee1x20);this[_0xe8e0[233]]= _0xeee1x3;this[_0xe8e0[247]]= _0xeee1x2b};_0xeee1x2c= true;mxEvent[_0xe8e0[255]](_0xeee1x20)});mxEvent[_0xe8e0[257]](_0xeee1x2b,_0xe8e0[256],mxUtils[_0xe8e0[29]](this,function(_0xeee1x20){if(this[_0xe8e0[233]]!= null&& this[_0xe8e0[247]]!= _0xeee1x2b){this[_0xe8e0[231]]();_0xeee1x2d(_0xeee1x20)}}));mxEvent[_0xe8e0[257]](_0xeee1x2b,_0xe8e0[258],mxUtils[_0xe8e0[29]](this,function(){_0xeee1x2c= this[_0xe8e0[247]]!= _0xeee1x2b}));mxEvent[_0xe8e0[257]](_0xeee1x2b,_0xe8e0[259],_0xeee1x2d)}};function Menu(_0xeee1x2a,_0xeee1xb){mxEventSource[_0xe8e0[260]](this);this[_0xe8e0[194]]= _0xeee1x2a;this[_0xe8e0[78]]= (_0xeee1xb!= null)?_0xeee1xb:true}mxUtils[_0xe8e0[261]](Menu,mxEventSource);Menu[_0xe8e0[5]][_0xe8e0[262]]= function(_0xeee1x19){if(this[_0xe8e0[78]]!= _0xeee1x19){this[_0xe8e0[78]]= _0xeee1x19;this[_0xe8e0[264]]( new mxEventObject(_0xe8e0[263]))}};Menu[_0xe8e0[5]][_0xe8e0[182]]= function(_0xeee1x3,_0xeee1x4){this[_0xe8e0[194]](_0xeee1x3,_0xeee1x4)}
\ No newline at end of file
diff --git a/public/assets/plugins/jscripty/js/Shapes.js b/public/assets/plugins/jscripty/js/Shapes.js
index 42e13ca..3db09d0 100644
--- a/public/assets/plugins/jscripty/js/Shapes.js
+++ b/public/assets/plugins/jscripty/js/Shapes.js
@@ -1,1234 +1 @@
-/**
- * $Id: Shapes.js,v 1.13 2013-02-02 06:44:30 gaudenz Exp $
- * Copyright (c) 2006-2012, JGraph Ltd
- */
-
-/**
- * Registers shapes.
- */
-(function()
-{
-	// Cube Shape, supports size style
-	function CubeShape() { };
-	CubeShape.prototype = new mxCylinder();
-	CubeShape.prototype.constructor = CubeShape;
-	CubeShape.prototype.size = 20;
-	CubeShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
-
-		if (isForeground)
-		{
-			path.moveTo(s, h);
-			path.lineTo(s, s);
-			path.lineTo(0, 0);
-			path.moveTo(s, s);
-			path.lineTo(w, s);
-			path.end();
-		}
-		else
-		{
-			path.moveTo(0, 0);
-			path.lineTo(w - s, 0);
-			path.lineTo(w, s);
-			path.lineTo(w, h);
-			path.lineTo(s, h);
-			path.lineTo(0, h - s);
-			path.lineTo(0, 0);
-			path.close();
-			path.end();
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['cube'] = CubeShape;
-
-	// Note Shape, supports size style
-	function NoteShape() { };
-	NoteShape.prototype = new mxCylinder();
-	NoteShape.prototype.constructor = NoteShape;
-	NoteShape.prototype.size = 30;
-	NoteShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
-
-		if (isForeground)
-		{
-			path.moveTo(w - s, 0);
-			path.lineTo(w - s, s);
-			path.lineTo(w, s);
-			path.end();
-		}
-		else
-		{
-			path.moveTo(0, 0);
-			path.lineTo(w - s, 0);
-			path.lineTo(w, s);
-			path.lineTo(w, h);
-			path.lineTo(0, h);
-			path.lineTo(0, 0);
-			path.close();
-			path.end();
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['note'] = NoteShape;
-
-	// Folder Shape, supports tabWidth, tabHeight styles
-	function FolderShape() { };
-	FolderShape.prototype = new mxCylinder();
-	FolderShape.prototype.constructor = FolderShape;
-	FolderShape.prototype.tabWidth = 60;
-	FolderShape.prototype.tabHeight = 20;
-	FolderShape.prototype.tabPosition = 'right';
-	FolderShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		var tw = mxUtils.getValue(this.style, 'tabWidth', this.tabWidth);
-		var th = mxUtils.getValue(this.style, 'tabHeight', this.tabHeight);
-		var tp = mxUtils.getValue(this.style, 'tabPosition', this.tabPosition);
-		var dx = Math.min(w, tw);
-		var dy = Math.min(h, th);
-
-		if (isForeground)
-		{
-			if (tp == 'left')
-			{
-				path.moveTo(0, dy);
-				path.lineTo(dx, dy);
-			}
-			// Right is default
-			else
-			{
-				path.moveTo(w - dx, dy);
-				path.lineTo(w, dy);
-			}
-			
-			path.end();
-		}
-		else
-		{
-			if (tp == 'left')
-			{
-				path.moveTo(0, 0);
-				path.lineTo(dx, 0);
-				path.lineTo(dx, dy);
-				path.lineTo(w, dy);
-			}
-			// Right is default
-			else
-			{
-				path.moveTo(0, dy);
-				path.lineTo(w - dx, dy);
-				path.lineTo(w - dx, 0);
-				path.lineTo(w, 0);
-			}
-			
-			path.lineTo(w, h);
-			path.lineTo(0, h);
-			path.lineTo(0, dy);
-			path.close();
-			path.end();
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['folder'] = FolderShape;
-
-	// Card Shape, supports size style
-	function CardShape() { };
-	CardShape.prototype = new mxCylinder();
-	CardShape.prototype.constructor = CardShape;
-	CardShape.prototype.size = 30;
-	CardShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
-
-		if (!isForeground)
-		{
-			path.moveTo(s, 0);
-			path.lineTo(w, 0);
-			path.lineTo(w, h);
-			path.lineTo(0, h);
-			path.lineTo(0, s);
-			path.lineTo(s, 0);
-			path.close();
-			path.end();
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['card'] = CardShape;
-
-	// Tape Shape, supports size style
-	function TapeShape() { };
-	TapeShape.prototype = new mxCylinder();
-	TapeShape.prototype.constructor = TapeShape;
-	TapeShape.prototype.size = 0.4;
-	TapeShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		var s = mxUtils.getValue(this.style, 'size', this.size);
-		var dy = h * s;
-		var fy = 1.4;
-
-		if (!isForeground)
-		{
-			path.moveTo(0, dy / 2);
-			path.quadTo(w / 4, dy * fy, w / 2, dy / 2);
-			path.quadTo(w * 3 / 4, dy * (1 - fy), w, dy / 2);
-			path.lineTo(w, h - dy / 2);
-			path.quadTo(w * 3 / 4, h - dy * fy, w / 2, h - dy / 2);
-			path.quadTo(w / 4, h - dy * (1 - fy), 0, h - dy / 2);
-			path.lineTo(0, dy / 2);
-			path.close();
-			path.end();
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['tape'] = TapeShape;
-
-	// Tape Shape, supports size style
-	function StepShape() { };
-	StepShape.prototype = new mxCylinder();
-	StepShape.prototype.constructor = StepShape;
-	StepShape.prototype.size = 0.2;
-	StepShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		var s =  w * mxUtils.getValue(this.style, 'size', this.size);
-
-		if (!isForeground)
-		{
-			path.moveTo(0, 0);
-			path.lineTo(w - s, 0);
-			path.lineTo(w, h / 2);
-			path.lineTo(w - s, h);
-			path.lineTo(0, h);
-			path.lineTo(s, h / 2);
-			path.close();
-			path.end();
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['step'] = StepShape;
-
-	// Plus Shape
-	function PlusShape()
-	{
-		mxRectangleShape.call(this);
-	};
-	mxUtils.extend(PlusShape, mxRectangleShape);
-	PlusShape.prototype.isHtmlAllowed = function()
-	{
-		return false;
-	};
-	PlusShape.prototype.paintForeground = function(c, x, y, w, h)
-	{
-		var border = Math.min(w / 5, h / 5) + 1;
-		
-		c.begin();
-		c.moveTo(x + w / 2, y + border);
-		c.lineTo(x + w / 2, y + h - border);
-		c.moveTo(x + border, y + h / 2);
-		c.lineTo(x + w - border, y + h / 2);
-		c.end();
-		c.stroke();
-		mxRectangleShape.prototype.paintForeground.apply(this, arguments);
-	};
-
-	mxCellRenderer.prototype.defaultShapes['plus'] = PlusShape;
-
-	// CompositeShape
-	function ExtendedShape()
-	{
-		mxRectangleShape.call(this);
-	};
-	mxUtils.extend(ExtendedShape, mxRectangleShape);
-	ExtendedShape.prototype.isHtmlAllowed = function()
-	{
-		return false;
-	};
-	ExtendedShape.prototype.paintForeground = function(c, x, y, w, h)
-	{
-		if (this.style != null)
-		{
-			if (this.style['double'] == 1)
-			{
-				var inset = Math.max(2, this.strokewidth + 1);
-	
-				mxRectangleShape.prototype.paintBackground.call(this, c, x + inset, y + inset, w - 2 * inset, h - 2 * inset);
-				mxRectangleShape.prototype.paintForeground.apply(this, arguments);
-				
-				x += inset;
-				y += inset;
-				w -= 2 * inset;
-				h -= 2 * inset;
-			}
-			
-			c.setDashed(false);
-			
-			// Draws the symbols defined in the style. The symbols are
-			// numbered from 1...n. Possible postfixes are align,
-			// verticalAlign, spacing, arcSpacing, width, height
-			var counter = 0;
-			var shape = null;
-			
-			do
-			{
-				shape = mxCellRenderer.prototype.defaultShapes[this.style['symbol' + counter]];
-				
-				if (shape != null)
-				{
-					var align = this.style['symbol' + counter + 'Align'];
-					var valign = this.style['symbol' + counter + 'VerticalAlign'];
-					var width = this.style['symbol' + counter + 'Width'];
-					var height = this.style['symbol' + counter + 'Height'];
-					var spacing = this.style['symbol' + counter + 'Spacing'] || 0;
-					var arcspacing = this.style['symbol' + counter + 'ArcSpacing'];
-					
-					if (arcspacing != null)
-					{
-						spacing += this.getArcSize(w + this.strokewidth, h + this.strokewidth) * arcspacing;
-					}
-					
-					var x2 = x;
-					var y2 = y;
-					
-					if (align == mxConstants.ALIGN_CENTER)
-					{
-						x2 += (w - width) / 2;
-					}
-					else if (align == mxConstants.ALIGN_RIGHT)
-					{
-						x2 += w - width - spacing;
-					}
-					else
-					{
-						x2 += spacing;
-					}
-					
-					if (valign == mxConstants.ALIGN_MIDDLE)
-					{
-						y2 += (h - height) / 2;
-					}
-					else if (valign == mxConstants.ALIGN_BOTTOM)
-					{
-						y2 += h - height - spacing;
-					}
-					else
-					{
-						y2 += spacing;
-					}
-					
-					c.save();
-					
-					// Small hack to pass style along into subshape
-					var tmp = new shape();
-					// TODO: Clone style and override settings (eg. strokewidth)
-					tmp.style = this.style;
-					shape.prototype.paintVertexShape.call(tmp, c, x2, y2, width, height);
-					c.restore();
-				}
-				
-				counter++;
-			}
-			while (shape != null);
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['ext'] = ExtendedShape;
-	
-	// Tape Shape, supports size style
-	function MessageShape() { };
-	MessageShape.prototype = new mxCylinder();
-	MessageShape.prototype.constructor = MessageShape;
-	MessageShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		if (isForeground)
-		{
-			path.moveTo(0, 0);
-			path.lineTo(w / 2, h / 2);
-			path.lineTo(w, 0);
-			path.end();
-		}
-		else
-		{
-			path.moveTo(0, 0);
-			path.lineTo(w, 0);
-			path.lineTo(w, h);
-			path.lineTo(0, h);
-			path.close();
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['message'] = MessageShape;
-	
-	// New Actor Shape
-	function UmlActorShape() { };
-	UmlActorShape.prototype = new mxCylinder();
-	UmlActorShape.prototype.constructor = UmlActorShape;
-	UmlActorShape.prototype.addPipe = true;
-	UmlActorShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		var width = w / 3;
-		var height = h / 4;
-		
-		if (!isForeground)
-		{
-			path.moveTo(w / 2, height);
-			path.curveTo(w / 2 - width, height, w / 2 - width, 0, w / 2, 0);
-			path.curveTo(w / 2 + width, 0, w / 2 + width, height, w / 2, height);
-			path.close();
-
-			path.moveTo(w / 2, height);
-			path.lineTo(w / 2, 2 * h / 3);
-			
-			// Arms
-			path.moveTo(w / 2, h / 3);
-			path.lineTo(0, h / 3);
-			path.moveTo(w / 2, h / 3);
-			path.lineTo(w, h / 3);
-			
-			// Legs
-			path.moveTo(w / 2, 2 * h / 3);
-			path.lineTo(0, h);
-			path.moveTo(w / 2, 2 * h / 3);
-			path.lineTo(w, h);
-			path.end();
-		}
-	};
-
-	// Replaces existing actor shape
-	mxCellRenderer.prototype.defaultShapes['umlActor'] = UmlActorShape;
-
-	// New Actor Shape
-	function LollipopShape() { };
-	LollipopShape.prototype = new mxCylinder();
-	LollipopShape.prototype.constructor = LollipopShape;
-	LollipopShape.prototype.size = 10;
-	LollipopShape.prototype.addPipe = true;
-	LollipopShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		var ss = mxUtils.getValue(this.style, 'size', this.size);
-		var width = ss * 2 / 3;
-		var height = ss;
-		
-		if (!isForeground)
-		{
-			path.moveTo(w / 2, height);
-			path.curveTo(w / 2 - width, height, w / 2 - width, 0, w / 2, 0);
-			path.curveTo(w / 2 + width, 0, w / 2 + width, height, w / 2, height);
-			path.close();
-
-			path.moveTo(w / 2, height);
-			path.lineTo(w / 2, h);
-			path.end();
-		}
-	};
-
-	// Replaces existing actor shape
-	mxCellRenderer.prototype.defaultShapes['lollipop'] = LollipopShape;
-	
-	// Folder Shape, supports tabWidth, tabHeight styles
-	function ComponentShape() { };
-	ComponentShape.prototype = new mxCylinder();
-	ComponentShape.prototype.constructor = ComponentShape;
-	ComponentShape.prototype.jettyWidth = 32;
-	ComponentShape.prototype.jettyHeight = 12;
-	ComponentShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		var dx = mxUtils.getValue(this.style, 'jettyWidth', this.jettyWidth);
-		var dy = mxUtils.getValue(this.style, 'jettyHeight', this.jettyHeight);
-		var x0 = dx / 2;
-		var x1 = x0 + dx / 2;
-		var y0 = 0.3 * h - dy / 2;
-		var y1 = 0.7 * h - dy / 2;
-
-		if (isForeground)
-		{
-			path.moveTo(x0, y0);
-			path.lineTo(x1, y0);
-			path.lineTo(x1, y0 + dy);
-			path.lineTo(x0, y0 + dy);
-			path.moveTo(x0, y1);
-			path.lineTo(x1, y1);
-			path.lineTo(x1, y1 + dy);
-			path.lineTo(x0, y1 + dy);
-			path.end();
-		}
-		else
-		{
-			path.moveTo(x0, 0);
-			path.lineTo(w, 0);
-			path.lineTo(w, h);
-			path.lineTo(x0, h);
-			path.lineTo(x0, y1 + dy);
-			path.lineTo(0, y1 + dy);
-			path.lineTo(0, y1);
-			path.lineTo(x0, y1);
-			path.lineTo(x0, y0 + dy);
-			path.lineTo(0, y0 + dy);
-			path.lineTo(0, y0);
-			path.lineTo(x0, y0);
-			path.close();
-			path.end();
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['component'] = ComponentShape;
-	
-	// State Shapes derives from double ellipse
-	function StateShape() { };
-	StateShape.prototype = new mxDoubleEllipse();
-	StateShape.prototype.constructor = StateShape;
-	StateShape.prototype.outerStroke = true;
-	StateShape.prototype.paintVertexShape = function(c, x, y, w, h)
-	{
-		var inset = Math.min(4, Math.min(w / 5, h / 5));
-		
-		if (w > 0 && h > 0)
-		{
-			c.ellipse(x + inset, y + inset, w - 2 * inset, h - 2 * inset);
-			c.fillAndStroke();
-		}
-		
-		c.setShadow(false);
-
-		if (this.outerStroke)
-		{
-			c.ellipse(x, y, w, h);
-			c.stroke();			
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['endState'] = StateShape;
-
-	function StartStateShape() { };
-	StartStateShape.prototype = new StateShape();
-	StartStateShape.prototype.constructor = StartStateShape;
-	StartStateShape.prototype.outerStroke = false;
-	
-	mxCellRenderer.prototype.defaultShapes['startState'] = StartStateShape;
-
-	// Image export for state shapes
-	var imageExportInitShapes = mxImageExport.prototype.initShapes;
-	mxImageExport.prototype.initShapes = function()
-	{
-		imageExportInitShapes.apply(this, arguments);
-
-		function createStateShape(outerStroke)
-		{
-			return {
-				drawShape: function(canvas, state, bounds, background)
-				{
-					var x = bounds.x;
-					var y = bounds.y;
-					var w = bounds.width;
-					var h = bounds.height;
-					
-					if (background)
-					{
-						var inset = Math.min(4, Math.min(w / 5, h / 5));
-						x += inset;
-						y += inset;
-						w -= 2 * inset;
-						h -= 2 * inset;
-						
-						if (w > 0 && h > 0)
-						{
-							canvas.ellipse(x, y, w, h);
-						}
-						
-						return true;
-					}
-					else
-					{
-						canvas.fillAndStroke();
-		
-						if (outerStroke)
-						{
-							canvas.ellipse(x, y, w, h);
-							canvas.stroke();
-						}
-					}
-				}
-			};
-		};
-		
-		this.shapes['endState'] = createStateShape(true);
-		this.shapes['startState'] = createStateShape(false);
-	};
-
-	// Defines custom edge shape
-	function LinkShape()
-	{
-		mxArrow.call(this);
-	};
-	mxUtils.extend(LinkShape, mxArrow);
-	LinkShape.prototype.paintEdgeShape = function(c, pts)
-	{
-		var width = 10;
-
-		// Base vector (between end points)
-		var p0 = pts[0];
-		var pe = pts[pts.length - 1];
-		
-		var dx = pe.x - p0.x;
-		var dy = pe.y - p0.y;
-		var dist = Math.sqrt(dx * dx + dy * dy);
-		var length = dist;
-		
-		// Computes the norm and the inverse norm
-		var nx = dx / dist;
-		var ny = dy / dist;
-		var basex = length * nx;
-		var basey = length * ny;
-		var floorx = width * ny/3;
-		var floory = -width * nx/3;
-		
-		// Computes points
-		var p0x = p0.x - floorx / 2;
-		var p0y = p0.y - floory / 2;
-		var p1x = p0x + floorx;
-		var p1y = p0y + floory;
-		var p2x = p1x + basex;
-		var p2y = p1y + basey;
-		var p3x = p2x + floorx;
-		var p3y = p2y + floory;
-		// p4 not necessary
-		var p5x = p3x - 3 * floorx;
-		var p5y = p3y - 3 * floory;
-		
-		c.begin();
-		c.moveTo(p1x, p1y);
-		c.lineTo(p2x, p2y);
-		c.moveTo(p5x + floorx, p5y + floory);
-		c.lineTo(p0x, p0y);
-		c.stroke();
-	};
-
-	// Registers the link shape
-	mxCellRenderer.prototype.defaultShapes['link'] = LinkShape;
-
-	// Registers and defines the custom marker
-	mxMarker.addMarker('dash', function(canvas, shape, type, pe, unitX, unitY, size, source, sw, filled)
-	{
-		var nx = unitX * (size + sw + 1);
-		var ny = unitY * (size + sw + 1);
-
-		return function()
-		{
-			canvas.begin();
-			canvas.moveTo(pe.x - nx / 2 - ny / 2, pe.y - ny / 2 + nx / 2);
-			canvas.lineTo(pe.x + ny / 2 - 3 * nx / 2, pe.y - 3 * ny / 2 - nx / 2);
-			canvas.stroke();
-		};
-	});
-
-	// Implements custom handlers
-	var SPECIAL_HANDLE_INDEX = -99;
-
-	// Handlers are only added if mxVertexHandler is defined (ie. not in embedded graph)
-	if (typeof(mxVertexHandler) != 'undefined')
-	{
-		function mxExtVertexHandler(state)
-		{
-			mxVertexHandler.call(this, state);
-		};
-	
-		mxUtils.extend(mxExtVertexHandler, mxVertexHandler);
-	
-		mxExtVertexHandler.prototype.useGridForSpecialHandle = false;
-		
-		mxExtVertexHandler.prototype.init = function()
-		{
-			this.horizontal = mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true);
-			var graph = this.state.view.graph;
-	
-			if (this.handleImage != null)
-			{
-				var bounds = new mxRectangle(0, 0, this.handleImage.width, this.handleImage.height);
-				this.specialHandle = new mxImageShape(bounds, this.handleImage.src);
-			}
-			else
-			{
-				var size = 10;
-				var bounds = new mxRectangle(0, 0, size, size);
-				this.specialHandle = new mxRhombus(bounds, mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);
-			}
-			
-			this.specialHandle.dialect = (graph.dialect != mxConstants.DIALECT_SVG) ?
-					mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;
-			this.specialHandle.init(graph.getView().getOverlayPane());
-			this.specialHandle.node.style.cursor = this.getSpecialHandleCursor();
-	
-			mxEvent.redirectMouseEvents(this.specialHandle.node, graph, this.state);
-			mxVertexHandler.prototype.init.apply(this, arguments);
-		};
-		
-		mxExtVertexHandler.prototype.getSpecialHandleCursor = function()
-		{
-			return 'default';
-		};
-		
-		mxExtVertexHandler.prototype.redraw = function()
-		{
-			mxVertexHandler.prototype.redraw.apply(this, arguments);
-	
-			var size = this.specialHandle.bounds.width;
-			this.specialHandle.bounds = this.getSpecialHandleBounds(size);
-			this.specialHandle.redraw();
-		};
-
-		mxExtVertexHandler.prototype.destroy = function()
-		{
-			mxVertexHandler.prototype.destroy.apply(this, arguments);
-			
-			if (this.specialHandle != null)
-			{
-				this.specialHandle.destroy();
-				this.specialHandle = null;
-			}
-		};
-		
-		mxExtVertexHandler.prototype.getHandleForEvent = function(me)
-		{
-			if (me.isSource(this.specialHandle))
-			{
-				return SPECIAL_HANDLE_INDEX;
-			}
-			
-			return mxVertexHandler.prototype.getHandleForEvent.apply(this, arguments);
-		};
-
-		mxExtVertexHandler.prototype.mouseMove = function(sender, me)
-		{
-			if (!me.isConsumed() && this.index == SPECIAL_HANDLE_INDEX)
-			{
-				var point = new mxPoint(me.getGraphX(), me.getGraphY());
-				this.constrainPoint(point);
-				var gridEnabled = this.graph.isGridEnabledEvent(me.getEvent());
-				var scale = this.graph.getView().scale;
-				
-				if (gridEnabled && this.useGridForSpecialHandle)
-				{
-					point.x = this.graph.snap(point.x / scale) * scale;
-					point.y = this.graph.snap(point.y / scale) * scale;
-				}
-				
-				this.updateStyle(point);			
-				this.moveSizerTo(this.specialHandle, point.x, point.y);
-				this.state.view.graph.cellRenderer.redraw(this.state, true);
-				me.consume();
-			}
-			else
-			{
-				mxVertexHandler.prototype.mouseMove.apply(this, arguments);
-			}
-		};
-
-		mxExtVertexHandler.prototype.mouseUp = function(sender, me)
-		{
-			if (!me.isConsumed() && this.index == SPECIAL_HANDLE_INDEX)
-			{
-				this.applyStyle();
-				this.reset();
-				me.consume();
-			}
-			else
-			{
-				mxVertexHandler.prototype.mouseUp.apply(this, arguments);
-			}
-		};
-
-		mxExtVertexHandler.prototype.getSpecialHandleBounds = function(size)
-		{
-			var rotation = this.state.shape.getShapeRotation();
-			var alpha = mxUtils.toRadians(rotation);
-			var cos = Math.cos(alpha);
-			var sin = Math.sin(alpha);
-			
-			var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
-			
-			if (this.state.shape.isPaintBoundsInverted())
-			{
-				var t = (bounds.width - bounds.height) / 2;
-				bounds.x += t;
-				bounds.y -= t;
-				var tmp = bounds.width;
-				bounds.width = bounds.height;
-				bounds.height = tmp;
-			}
-	
-			var pt = this.getSpecialHandlePoint(bounds);
-
-			if (this.state.shape.flipH)
-			{
-				pt.x = 2 * bounds.x + bounds.width - pt.x;
-			}
-			
-			if (this.state.shape.flipV)
-			{
-				pt.y = 2 * bounds.y + bounds.height - pt.y;
-			}
-			
-			pt = mxUtils.getRotatedPoint(pt, cos, sin,
-				new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
-
-			return new mxRectangle(pt.x - size / 2, pt.y - size / 2, size, size);
-		};
-		
-		mxExtVertexHandler.prototype.getSpecialHandlePoint = function(bounds)
-		{
-			// Hook for subclassers
-			return null;
-		};
-	
-		mxExtVertexHandler.prototype.updateStyle = function(point)
-		{
-			// Hook for subclassers
-		};
-		
-		mxExtVertexHandler.prototype.constrainPoint = function(point)
-		{
-			point.x = Math.max(this.state.x, Math.min(this.state.x + this.state.width, point.x));
-			point.y = Math.max(this.state.y, Math.min(this.state.y + this.state.height, point.y));
-		};
-		
-		mxExtVertexHandler.prototype.applyStyle = function()
-		{
-			// Hook for subclassers
-		};
-
-		// Folder Handler
-		function mxFolderHandler(state)
-		{
-			mxExtVertexHandler.call(this, state);
-		};
-	
-		mxUtils.extend(mxFolderHandler, mxExtVertexHandler);
-
-		mxFolderHandler.prototype.getSpecialHandlePoint = function(bounds)
-		{
-			var scale = this.graph.getView().scale;
-			var tw = Math.min(bounds.width, mxUtils.getValue(this.state.style, 'tabWidth', 60) * scale);
-			var th = Math.min(bounds.height, mxUtils.getValue(this.state.style, 'tabHeight', 20) * scale);
-			
-			var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right');
-			var x = (tp == 'left') ? bounds.x + tw : bounds.x + bounds.width - tw;
-	
-			return new mxPoint(x, bounds.y + th);
-		};
-		
-		mxFolderHandler.prototype.updateStyle = function(point)
-		{
-			var rotation = this.state.shape.getShapeRotation();
-			var alpha = mxUtils.toRadians(rotation);
-			var cos = Math.cos(-alpha);
-			var sin = Math.sin(-alpha);
-
-			var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
-			
-			if (this.state.shape.isPaintBoundsInverted())
-			{
-				var t = (bounds.width - bounds.height) / 2;
-				bounds.x += t;
-				bounds.y -= t;
-				var tmp = bounds.width;
-				bounds.width = bounds.height;
-				bounds.height = tmp;
-			}
-	
-			var pt = new mxPoint(point.x, point.y);
-			pt = mxUtils.getRotatedPoint(pt, cos, sin,
-				new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
-
-			if (this.state.shape.flipH)
-			{
-				pt.x = 2 * bounds.x + bounds.width - pt.x;
-			}
-			
-			if (this.state.shape.flipV)
-			{
-				pt.y = 2 * bounds.y + bounds.height - pt.y;
-			}
-			
-			var result = this.updateStyleUnrotated(pt, bounds);
-		
-			// Modifies point to use rotated coordinates of return value
-			if (result != null)
-			{
-				if (this.state.shape.flipH)
-				{
-					result.x = 2 * bounds.x + bounds.width - result.x;
-				}
-				
-				if (this.state.shape.flipV)
-				{
-					result.y = 2 * bounds.y + bounds.height - result.y;
-				}
-				
-				cos = Math.cos(alpha);
-				sin = Math.sin(alpha);
-				result = mxUtils.getRotatedPoint(result, cos, sin,
-						new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
-				point.x = result.x;
-				point.y = result.y;
-			}
-		};
-		
-		mxFolderHandler.prototype.updateStyleUnrotated = function(pt, bounds)
-		{
-			var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right');
-			var tw = (tp == 'left') ? pt.x - bounds.x : bounds.x + bounds.width - pt.x;
-			var th = pt.y - bounds.y;
-			
-			var scale = this.graph.getView().scale;
-			this.state.style['tabWidth'] = Math.round(Math.max(1, tw) / scale);
-			this.state.style['tabHeight'] =  Math.round(Math.max(1, th) / scale);
-		};
-		
-		mxFolderHandler.prototype.applyStyle = function()
-		{
-			var model = this.graph.getModel();
-			model.beginUpdate();
-			try
-			{
-				this.state.view.graph.setCellStyles('tabWidth', this.state.style['tabWidth'], [this.state.cell]);
-				this.state.view.graph.setCellStyles('tabHeight', this.state.style['tabHeight'], [this.state.cell]);
-			}
-			finally
-			{
-				model.endUpdate();
-			}
-		};
-		
-		// Swimlane Handler
-		function mxSwimlaneHandler(state)
-		{
-			mxFolderHandler.call(this, state);
-		};
-		
-		mxUtils.extend(mxSwimlaneHandler, mxFolderHandler);
-		
-		mxSwimlaneHandler.prototype.getSpecialHandlePoint = function(bounds)
-		{
-			var scale = this.graph.getView().scale;
-			var startSize = mxUtils.getValue(this.state.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE);
-
-			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + Math.min(bounds.height, startSize * scale));
-		};
-		
-		mxSwimlaneHandler.prototype.updateStyleUnrotated = function(point, bounds)
-		{
-			point.x = bounds.x + bounds.width / 2;
-			startSize = point.y - bounds.y;
-			var scale = this.graph.getView().scale;
-			this.state.style['startSize'] = Math.round(Math.max(1, startSize) / scale);
-			
-			return point;
-		};
-		
-		mxSwimlaneHandler.prototype.applyStyle = function()
-		{
-			this.state.view.graph.setCellStyles('startSize', this.state.style['startSize'], [this.state.cell]);
-		};
-
-		// Cube Handler
-		function mxCubeHandler(state)
-		{
-			mxFolderHandler.call(this, state);
-		};
-	
-		mxUtils.extend(mxCubeHandler, mxFolderHandler);
-		
-		mxCubeHandler.prototype.defaultValue = 20;
-	
-		mxCubeHandler.prototype.scaleFactor = 1;
-		
-		mxCubeHandler.prototype.getSpecialHandlePoint = function(bounds)
-		{
-			var scale = this.graph.getView().scale;
-			var sz = Math.min(bounds.width, Math.min(bounds.height,
-				mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor));
-			
-			return new mxPoint(bounds.x + sz, bounds.y + sz);
-		};
-	
-		mxCubeHandler.prototype.updateStyleUnrotated = function(pt, bounds)
-		{
-			var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x),
-					Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y)));
-			var scale = this.graph.getView().scale;
-			this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor;
-			
-			// Stays on the diagonal
-			return new mxPoint(bounds.x + size, bounds.y + size);
-		};
-		
-		mxCubeHandler.prototype.applyStyle = function()
-		{
-			this.state.view.graph.setCellStyles('size', this.state.style['size'], [this.state.cell]);
-		};
-		
-		// Card Handler
-		function mxCardHandler(state)
-		{
-			mxCubeHandler.call(this, state);
-		};
-	
-		mxUtils.extend(mxCardHandler, mxCubeHandler);
-		
-		mxCardHandler.prototype.defaultValue = 30;
-	
-		mxCardHandler.prototype.scaleFactor = 2;
-		
-		// Note Handler
-		function mxNoteHandler(state)
-		{
-			mxCubeHandler.call(this, state);
-		};
-	
-		mxUtils.extend(mxNoteHandler, mxCubeHandler);
-		
-		mxNoteHandler.prototype.defaultValue = 30;
-	
-		mxNoteHandler.prototype.scaleFactor = 1;
-		
-		mxNoteHandler.prototype.getSpecialHandlePoint = function(bounds)
-		{
-			var scale = this.graph.getView().scale;
-			var sz = Math.min(bounds.width, Math.min(bounds.height,
-					mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor));
-			
-			return new mxPoint(bounds.x + bounds.width - sz, bounds.y + sz);
-		};
-		
-		mxNoteHandler.prototype.updateStyleUnrotated = function(pt, bounds)
-		{
-			var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x + bounds.width),
-					Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y)));
-			var scale = this.graph.getView().scale;
-			this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor;
-			
-			// Stays on the diagonal
-			return new mxPoint(bounds.x + bounds.width - size, bounds.y + size);
-		};
-		
-		// Step Handler
-		function mxStepHandler(state)
-		{
-			mxCubeHandler.call(this, state);
-		};
-	
-		mxUtils.extend(mxStepHandler, mxCubeHandler);
-		
-		mxStepHandler.prototype.defaultValue = 0.2;
-	
-		mxStepHandler.prototype.scaleFactor = 1;
-		
-		mxStepHandler.prototype.getSpecialHandlePoint = function(bounds)
-		{
-			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
-			
-			return new mxPoint(bounds.x + bounds.width * sz, bounds.y + bounds.height / 2);
-		};
-	
-		mxStepHandler.prototype.updateStyleUnrotated = function(pt, bounds)
-		{
-			var size = Math.min(1, (pt.x - bounds.x) / bounds.width);
-			this.state.style['size'] = size;
-			
-			return new mxPoint(bounds.x + size * bounds.width, bounds.y + bounds.height / 2);
-		};
-		
-		// Tape Handler
-		function mxTapeHandler(state)
-		{
-			mxCubeHandler.call(this, state);
-		};
-	
-		mxUtils.extend(mxTapeHandler, mxCubeHandler);
-		
-		mxTapeHandler.prototype.defaultValue = 0.4;
-	
-		mxTapeHandler.prototype.scaleFactor = 1;
-		
-		mxTapeHandler.prototype.getSpecialHandlePoint = function(bounds)
-		{
-			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
-	
-			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + sz * bounds.height / 2);
-		};
-	
-		mxTapeHandler.prototype.updateStyleUnrotated = function(pt, bounds)
-		{
-			var size = Math.max(0, Math.min(1, ((pt.y - bounds.y) / bounds.height) * 2));
-			this.state.style['size'] = size;
-			
-			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + size * bounds.height / 2);
-		};
-		
-		var handlers = {'swimlane': mxSwimlaneHandler, 'folder': mxFolderHandler, 'cube': mxCubeHandler,
-				'card': mxCardHandler, 'note': mxNoteHandler, 'step': mxStepHandler, 'tape': mxTapeHandler};
-
-		var mxGraphCreateHandler = mxGraph.prototype.createHandler;
-		mxGraph.prototype.createHandler = function(state)
-		{
-			if (state != null)
-			{
-				var ctor = handlers[state.style['shape']];
-
-				if (ctor != null)
-				{
-					return new ctor(state);
-				}
-			}
-			
-			return mxGraphCreateHandler.apply(this, arguments);
-		};
-	}
-	
-	// Constraints
-	mxGraph.prototype.getAllConnectionConstraints = function(terminal, source)
-	{
-		if (terminal != null && terminal.shape != null)
-		{
-			if (terminal.shape.stencil != null)
-			{
-				if (terminal.shape.stencil != null)
-				{
-					return terminal.shape.stencil.constraints;
-				}
-			}
-			else if (terminal.shape.constraints != null)
-			{
-				return terminal.shape.constraints;
-			}
-		}
-
-		return null;
-	};
-
-	mxRectangleShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
-	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
-	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
-	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.25), true),
-	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
-	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
-	mxLabel.prototype.constraints = mxRectangleShape.prototype.constraints;
-	mxImageShape.prototype.constraints = mxRectangleShape.prototype.constraints;
-	mxSwimlane.prototype.constraints = mxRectangleShape.prototype.constraints;
-	PlusShape.prototype.constraints = mxRectangleShape.prototype.constraints;
-	NoteShape.prototype.constraints = mxRectangleShape.prototype.constraints;
-	CardShape.prototype.constraints = mxRectangleShape.prototype.constraints;
-	CubeShape.prototype.constraints = mxRectangleShape.prototype.constraints;
-	FolderShape.prototype.constraints = mxRectangleShape.prototype.constraints;
-	mxCylinder.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.15, 0.05), false),
-                                        new mxConnectionConstraint(new mxPoint(0.5, 0), true),
-                                        new mxConnectionConstraint(new mxPoint(0.85, 0.05), false),
-      	              		 new mxConnectionConstraint(new mxPoint(0, 0.3), true),
-      	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
-      	              		 new mxConnectionConstraint(new mxPoint(0, 0.7), true),
-      	            		 new mxConnectionConstraint(new mxPoint(1, 0.3), true),
-      	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
-      	            		 new mxConnectionConstraint(new mxPoint(1, 0.7), true),
-      	            		 new mxConnectionConstraint(new mxPoint(0.15, 0.95), false),
-      	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
-      	            		 new mxConnectionConstraint(new mxPoint(0.85, 0.95), false)];
-	UmlActorShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.1), false),
-	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), false),
-	                                          new mxConnectionConstraint(new mxPoint(0.75, 0.1), false),
-	        	              		 new mxConnectionConstraint(new mxPoint(0, 1/3), false),
-	        	              		 new mxConnectionConstraint(new mxPoint(0, 1), false),
-	        	            		 new mxConnectionConstraint(new mxPoint(1, 1/3), false),
-	        	            		 new mxConnectionConstraint(new mxPoint(1, 1), false),
-	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 0.5), false)];
-	ComponentShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
-	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
-	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
-	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.3), true),
-	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.7), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
-	mxActor.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), true),
-   	              		 new mxConnectionConstraint(new mxPoint(0.25, 0.2), false),
-   	              		 new mxConnectionConstraint(new mxPoint(0.1, 0.5), false),
-   	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
-   	            		 new mxConnectionConstraint(new mxPoint(0.75, 0.25), false),
-   	            		 new mxConnectionConstraint(new mxPoint(0.9, 0.5), false),
-   	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
-   	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
-   	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
-   	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
-	TapeShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.35), false),
-	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), false),
-	                                   new mxConnectionConstraint(new mxPoint(0, 0.65), false),
-	                                   new mxConnectionConstraint(new mxPoint(1, 0.35), false),
-		                                new mxConnectionConstraint(new mxPoint(1, 0.5), false),
-		                                new mxConnectionConstraint(new mxPoint(1, 0.65), false),
-										new mxConnectionConstraint(new mxPoint(0.25, 1), false),
-										new mxConnectionConstraint(new mxPoint(0.75, 0), false)];
-	// TODO: Relative ports
-	StepShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
-                                       new mxConnectionConstraint(new mxPoint(0.5, 0), true),
-                                       new mxConnectionConstraint(new mxPoint(0.75, 0), true),
-                                       new mxConnectionConstraint(new mxPoint(0.25, 1), true),
-  	        	            		 	new mxConnectionConstraint(new mxPoint(0.5, 1), true),
-  	        	            		 	new mxConnectionConstraint(new mxPoint(0.75, 1), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.1, 0.25), false),
-	                                   new mxConnectionConstraint(new mxPoint(0.2, 0.5), false),
-	                                   new mxConnectionConstraint(new mxPoint(0.1, 0.75), false),
-	                                   new mxConnectionConstraint(new mxPoint(0.9, 0.25), false),
-		                                new mxConnectionConstraint(new mxPoint(1, 0.5), false),
-		                                new mxConnectionConstraint(new mxPoint(0.9, 0.75), false)];
-	mxLine.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.5), false),
-	                                new mxConnectionConstraint(new mxPoint(0.25, 0.5), false),
-	                                new mxConnectionConstraint(new mxPoint(0.75, 0.5), false),
-									new mxConnectionConstraint(new mxPoint(1, 0.5), false)];
-	LollipopShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), false),
-										new mxConnectionConstraint(new mxPoint(0.5, 1), false)];
-	mxEllipse.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0), true), new mxConnectionConstraint(new mxPoint(1, 0), true),
-	                                   new mxConnectionConstraint(new mxPoint(0, 1), true), new mxConnectionConstraint(new mxPoint(1, 1), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.5, 0), true), new mxConnectionConstraint(new mxPoint(0.5, 1), true),
-	          	              		   new mxConnectionConstraint(new mxPoint(0, 0.5), true), new mxConnectionConstraint(new mxPoint(1, 0.5))];
-	mxDoubleEllipse.prototype.constraints = mxEllipse.prototype.constraints;
-	mxRhombus.prototype.constraints = mxEllipse.prototype.constraints;
-	mxTriangle.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.25), true),
-	                                    new mxConnectionConstraint(new mxPoint(0, 0.5), true),
-	                                   new mxConnectionConstraint(new mxPoint(0, 0.75), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.5, 0), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.5, 1), true),
-	                                   new mxConnectionConstraint(new mxPoint(1, 0.5), true)];
-	mxHexagon.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.375, 0), true),
-	                                    new mxConnectionConstraint(new mxPoint(0.5, 0), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.625, 0), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.125, 0.25), false),
-	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.125, 0.75), false),
-	                                   new mxConnectionConstraint(new mxPoint(0.875, 0.25), false),
-	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), true),
-	                                   new mxConnectionConstraint(new mxPoint(1, 0.5), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.875, 0.75), false),
-	                                   new mxConnectionConstraint(new mxPoint(0.375, 1), true),
-	                                    new mxConnectionConstraint(new mxPoint(0.5, 1), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.625, 1), true)];
-	mxCloud.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.25), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.4, 0.1), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.16, 0.55), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.07, 0.4), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.31, 0.8), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.13, 0.77), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.8, 0.8), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.55, 0.95), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.875, 0.5), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.96, 0.7), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.625, 0.2), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.88, 0.25), false)];
-	mxArrow.prototype.constraints = null;
-})();
+var _0x961e=["\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x73\x74\x72\x75\x63\x74\x6F\x72","\x73\x69\x7A\x65","\x72\x65\x64\x72\x61\x77\x50\x61\x74\x68","\x73\x74\x79\x6C\x65","\x67\x65\x74\x56\x61\x6C\x75\x65","\x6D\x69\x6E","\x6D\x6F\x76\x65\x54\x6F","\x6C\x69\x6E\x65\x54\x6F","\x65\x6E\x64","\x63\x6C\x6F\x73\x65","\x63\x75\x62\x65","\x64\x65\x66\x61\x75\x6C\x74\x53\x68\x61\x70\x65\x73","\x6E\x6F\x74\x65","\x74\x61\x62\x57\x69\x64\x74\x68","\x74\x61\x62\x48\x65\x69\x67\x68\x74","\x74\x61\x62\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x72\x69\x67\x68\x74","\x6C\x65\x66\x74","\x66\x6F\x6C\x64\x65\x72","\x63\x61\x72\x64","\x71\x75\x61\x64\x54\x6F","\x74\x61\x70\x65","\x73\x74\x65\x70","\x63\x61\x6C\x6C","\x65\x78\x74\x65\x6E\x64","\x69\x73\x48\x74\x6D\x6C\x41\x6C\x6C\x6F\x77\x65\x64","\x70\x61\x69\x6E\x74\x46\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64","\x62\x65\x67\x69\x6E","\x73\x74\x72\x6F\x6B\x65","\x61\x70\x70\x6C\x79","\x70\x6C\x75\x73","\x64\x6F\x75\x62\x6C\x65","\x73\x74\x72\x6F\x6B\x65\x77\x69\x64\x74\x68","\x6D\x61\x78","\x70\x61\x69\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x73\x65\x74\x44\x61\x73\x68\x65\x64","\x73\x79\x6D\x62\x6F\x6C","\x41\x6C\x69\x67\x6E","\x56\x65\x72\x74\x69\x63\x61\x6C\x41\x6C\x69\x67\x6E","\x57\x69\x64\x74\x68","\x48\x65\x69\x67\x68\x74","\x53\x70\x61\x63\x69\x6E\x67","\x41\x72\x63\x53\x70\x61\x63\x69\x6E\x67","\x67\x65\x74\x41\x72\x63\x53\x69\x7A\x65","\x41\x4C\x49\x47\x4E\x5F\x43\x45\x4E\x54\x45\x52","\x41\x4C\x49\x47\x4E\x5F\x52\x49\x47\x48\x54","\x41\x4C\x49\x47\x4E\x5F\x4D\x49\x44\x44\x4C\x45","\x41\x4C\x49\x47\x4E\x5F\x42\x4F\x54\x54\x4F\x4D","\x73\x61\x76\x65","\x70\x61\x69\x6E\x74\x56\x65\x72\x74\x65\x78\x53\x68\x61\x70\x65","\x72\x65\x73\x74\x6F\x72\x65","\x65\x78\x74","\x6D\x65\x73\x73\x61\x67\x65","\x61\x64\x64\x50\x69\x70\x65","\x63\x75\x72\x76\x65\x54\x6F","\x75\x6D\x6C\x41\x63\x74\x6F\x72","\x6C\x6F\x6C\x6C\x69\x70\x6F\x70","\x6A\x65\x74\x74\x79\x57\x69\x64\x74\x68","\x6A\x65\x74\x74\x79\x48\x65\x69\x67\x68\x74","\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74","\x6F\x75\x74\x65\x72\x53\x74\x72\x6F\x6B\x65","\x65\x6C\x6C\x69\x70\x73\x65","\x66\x69\x6C\x6C\x41\x6E\x64\x53\x74\x72\x6F\x6B\x65","\x73\x65\x74\x53\x68\x61\x64\x6F\x77","\x65\x6E\x64\x53\x74\x61\x74\x65","\x73\x74\x61\x72\x74\x53\x74\x61\x74\x65","\x69\x6E\x69\x74\x53\x68\x61\x70\x65\x73","\x78","\x79","\x77\x69\x64\x74\x68","\x68\x65\x69\x67\x68\x74","\x73\x68\x61\x70\x65\x73","\x70\x61\x69\x6E\x74\x45\x64\x67\x65\x53\x68\x61\x70\x65","\x6C\x65\x6E\x67\x74\x68","\x73\x71\x72\x74","\x6C\x69\x6E\x6B","\x64\x61\x73\x68","\x61\x64\x64\x4D\x61\x72\x6B\x65\x72","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x75\x73\x65\x47\x72\x69\x64\x46\x6F\x72\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65","\x69\x6E\x69\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x73\x74\x61\x74\x65","\x67\x72\x61\x70\x68","\x76\x69\x65\x77","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x67\x65","\x73\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65","\x73\x72\x63","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x44\x49\x41\x4C\x45\x43\x54\x5F\x56\x4D\x4C","\x67\x65\x74\x4F\x76\x65\x72\x6C\x61\x79\x50\x61\x6E\x65","\x67\x65\x74\x56\x69\x65\x77","\x63\x75\x72\x73\x6F\x72","\x6E\x6F\x64\x65","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65\x43\x75\x72\x73\x6F\x72","\x72\x65\x64\x69\x72\x65\x63\x74\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74\x73","\x64\x65\x66\x61\x75\x6C\x74","\x72\x65\x64\x72\x61\x77","\x62\x6F\x75\x6E\x64\x73","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65\x42\x6F\x75\x6E\x64\x73","\x64\x65\x73\x74\x72\x6F\x79","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x46\x6F\x72\x45\x76\x65\x6E\x74","\x69\x73\x53\x6F\x75\x72\x63\x65","\x6D\x6F\x75\x73\x65\x4D\x6F\x76\x65","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74\x47\x72\x61\x70\x68\x58","\x67\x65\x74\x47\x72\x61\x70\x68\x59","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x50\x6F\x69\x6E\x74","\x67\x65\x74\x45\x76\x65\x6E\x74","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64\x45\x76\x65\x6E\x74","\x73\x63\x61\x6C\x65","\x73\x6E\x61\x70","\x75\x70\x64\x61\x74\x65\x53\x74\x79\x6C\x65","\x6D\x6F\x76\x65\x53\x69\x7A\x65\x72\x54\x6F","\x63\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72","\x63\x6F\x6E\x73\x75\x6D\x65","\x6D\x6F\x75\x73\x65\x55\x70","\x61\x70\x70\x6C\x79\x53\x74\x79\x6C\x65","\x72\x65\x73\x65\x74","\x67\x65\x74\x53\x68\x61\x70\x65\x52\x6F\x74\x61\x74\x69\x6F\x6E","\x73\x68\x61\x70\x65","\x74\x6F\x52\x61\x64\x69\x61\x6E\x73","\x63\x6F\x73","\x73\x69\x6E","\x69\x73\x50\x61\x69\x6E\x74\x42\x6F\x75\x6E\x64\x73\x49\x6E\x76\x65\x72\x74\x65\x64","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65\x50\x6F\x69\x6E\x74","\x66\x6C\x69\x70\x48","\x66\x6C\x69\x70\x56","\x67\x65\x74\x43\x65\x6E\x74\x65\x72\x58","\x67\x65\x74\x43\x65\x6E\x74\x65\x72\x59","\x67\x65\x74\x52\x6F\x74\x61\x74\x65\x64\x50\x6F\x69\x6E\x74","\x75\x70\x64\x61\x74\x65\x53\x74\x79\x6C\x65\x55\x6E\x72\x6F\x74\x61\x74\x65\x64","\x72\x6F\x75\x6E\x64","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x63\x65\x6C\x6C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x72\x74\x53\x69\x7A\x65","\x64\x65\x66\x61\x75\x6C\x74\x56\x61\x6C\x75\x65","\x73\x63\x61\x6C\x65\x46\x61\x63\x74\x6F\x72","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x41\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x73\x74\x65\x6E\x63\x69\x6C","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73"];(function(){function _0x7d89x1(){}_0x7d89x1[_0x961e[0]]=  new mxCylinder();_0x7d89x1[_0x961e[0]][_0x961e[1]]= _0x7d89x1;_0x7d89x1[_0x961e[0]][_0x961e[2]]= 20;_0x7d89x1[_0x961e[0]][_0x961e[3]]= function(_0x7d89x2,_0x7d89x3,_0x7d89x4,_0x7d89x5,_0x7d89x6,_0x7d89x7){var _0x7d89x8=Math[_0x961e[6]](_0x7d89x5,Math[_0x961e[6]](_0x7d89x6,mxUtils[_0x961e[5]](this[_0x961e[4]],_0x961e[2],this[_0x961e[2]])));if(_0x7d89x7){_0x7d89x2[_0x961e[7]](_0x7d89x8,_0x7d89x6);_0x7d89x2[_0x961e[8]](_0x7d89x8,_0x7d89x8);_0x7d89x2[_0x961e[8]](0,0);_0x7d89x2[_0x961e[7]](_0x7d89x8,_0x7d89x8);_0x7d89x2[_0x961e[8]](_0x7d89x5,_0x7d89x8);_0x7d89x2[_0x961e[9]]()}else {_0x7d89x2[_0x961e[7]](0,0);_0x7d89x2[_0x961e[8]](_0x7d89x5- _0x7d89x8,0);_0x7d89x2[_0x961e[8]](_0x7d89x5,_0x7d89x8);_0x7d89x2[_0x961e[8]](_0x7d89x5,_0x7d89x6);_0x7d89x2[_0x961e[8]](_0x7d89x8,_0x7d89x6);_0x7d89x2[_0x961e[8]](0,_0x7d89x6- _0x7d89x8);_0x7d89x2[_0x961e[8]](0,0);_0x7d89x2[_0x961e[10]]();_0x7d89x2[_0x961e[9]]()}};mxCellRenderer[_0x961e[0]][_0x961e[12]][_0x961e[11]]= _0x7d89x1;function _0x7d89x9(){}_0x7d89x9[_0x961e[0]]=  new mxCylinder();_0x7d89x9[_0x961e[0]][_0x961e[1]]= _0x7d89x9;_0x7d89x9[_0x961e[0]][_0x961e[2]]= 30;_0x7d89x9[_0x961e[0]][_0x961e[3]]= function(_0x7d89x2,_0x7d89x3,_0x7d89x4,_0x7d89x5,_0x7d89x6,_0x7d89x7){var _0x7d89x8=Math[_0x961e[6]](_0x7d89x5,Math[_0x961e[6]](_0x7d89x6,mxUtils[_0x961e[5]](this[_0x961e[4]],_0x961e[2],this[_0x961e[2]])));if(_0x7d89x7){_0x7d89x2[_0x961e[7]](_0x7d89x5- _0x7d89x8,0);_0x7d89x2[_0x961e[8]](_0x7d89x5- _0x7d89x8,_0x7d89x8);_0x7d89x2[_0x961e[8]](_0x7d89x5,_0x7d89x8);_0x7d89x2[_0x961e[9]]()}else {_0x7d89x2[_0x961e[7]](0,0);_0x7d89x2[_0x961e[8]](_0x7d89x5- _0x7d89x8,0);_0x7d89x2[_0x961e[8]](_0x7d89x5,_0x7d89x8);_0x7d89x2[_0x961e[8]](_0x7d89x5,_0x7d89x6);_0x7d89x2[_0x961e[8]](0,_0x7d89x6);_0x7d89x2[_0x961e[8]](0,0);_0x7d89x2[_0x961e[10]]();_0x7d89x2[_0x961e[9]]()}};mxCellRenderer[_0x961e[0]][_0x961e[12]][_0x961e[13]]= _0x7d89x9;function _0x7d89xa(){}_0x7d89xa[_0x961e[0]]=  new mxCylinder();_0x7d89xa[_0x961e[0]][_0x961e[1]]= _0x7d89xa;_0x7d89xa[_0x961e[0]][_0x961e[14]]= 60;_0x7d89xa[_0x961e[0]][_0x961e[15]]= 20;_0x7d89xa[_0x961e[0]][_0x961e[16]]= _0x961e[17];_0x7d89xa[_0x961e[0]][_0x961e[3]]= function(_0x7d89x2,_0x7d89x3,_0x7d89x4,_0x7d89x5,_0x7d89x6,_0x7d89x7){var _0x7d89xb=mxUtils[_0x961e[5]](this[_0x961e[4]],_0x961e[14],this[_0x961e[14]]);var _0x7d89xc=mxUtils[_0x961e[5]](this[_0x961e[4]],_0x961e[15],this[_0x961e[15]]);var _0x7d89xd=mxUtils[_0x961e[5]](this[_0x961e[4]],_0x961e[16],this[_0x961e[16]]);var _0x7d89xe=Math[_0x961e[6]](_0x7d89x5,_0x7d89xb);var _0x7d89xf=Math[_0x961e[6]](_0x7d89x6,_0x7d89xc);if(_0x7d89x7){if(_0x7d89xd== _0x961e[18]){_0x7d89x2[_0x961e[7]](0,_0x7d89xf);_0x7d89x2[_0x961e[8]](_0x7d89xe,_0x7d89xf)}else {_0x7d89x2[_0x961e[7]](_0x7d89x5- _0x7d89xe,_0x7d89xf);_0x7d89x2[_0x961e[8]](_0x7d89x5,_0x7d89xf)};_0x7d89x2[_0x961e[9]]()}else {if(_0x7d89xd== _0x961e[18]){_0x7d89x2[_0x961e[7]](0,0);_0x7d89x2[_0x961e[8]](_0x7d89xe,0);_0x7d89x2[_0x961e[8]](_0x7d89xe,_0x7d89xf);_0x7d89x2[_0x961e[8]](_0x7d89x5,_0x7d89xf)}else {_0x7d89x2[_0x961e[7]](0,_0x7d89xf);_0x7d89x2[_0x961e[8]](_0x7d89x5- _0x7d89xe,_0x7d89xf);_0x7d89x2[_0x961e[8]](_0x7d89x5- _0x7d89xe,0);_0x7d89x2[_0x961e[8]](_0x7d89x5,0)};_0x7d89x2[_0x961e[8]](_0x7d89x5,_0x7d89x6);_0x7d89x2[_0x961e[8]](0,_0x7d89x6);_0x7d89x2[_0x961e[8]](0,_0x7d89xf);_0x7d89x2[_0x961e[10]]();_0x7d89x2[_0x961e[9]]()}};mxCellRenderer[_0x961e[0]][_0x961e[12]][_0x961e[19]]= _0x7d89xa;function _0x7d89x10(){}_0x7d89x10[_0x961e[0]]=  new mxCylinder();_0x7d89x10[_0x961e[0]][_0x961e[1]]= _0x7d89x10;_0x7d89x10[_0x961e[0]][_0x961e[2]]= 30;_0x7d89x10[_0x961e[0]][_0x961e[3]]= function(_0x7d89x2,_0x7d89x3,_0x7d89x4,_0x7d89x5,_0x7d89x6,_0x7d89x7){var _0x7d89x8=Math[_0x961e[6]](_0x7d89x5,Math[_0x961e[6]](_0x7d89x6,mxUtils[_0x961e[5]](this[_0x961e[4]],_0x961e[2],this[_0x961e[2]])));if(!_0x7d89x7){_0x7d89x2[_0x961e[7]](_0x7d89x8,0);_0x7d89x2[_0x961e[8]](_0x7d89x5,0);_0x7d89x2[_0x961e[8]](_0x7d89x5,_0x7d89x6);_0x7d89x2[_0x961e[8]](0,_0x7d89x6);_0x7d89x2[_0x961e[8]](0,_0x7d89x8);_0x7d89x2[_0x961e[8]](_0x7d89x8,0);_0x7d89x2[_0x961e[10]]();_0x7d89x2[_0x961e[9]]()}};mxCellRenderer[_0x961e[0]][_0x961e[12]][_0x961e[20]]= _0x7d89x10;function _0x7d89x11(){}_0x7d89x11[_0x961e[0]]=  new mxCylinder();_0x7d89x11[_0x961e[0]][_0x961e[1]]= _0x7d89x11;_0x7d89x11[_0x961e[0]][_0x961e[2]]= 0.4;_0x7d89x11[_0x961e[0]][_0x961e[3]]= function(_0x7d89x2,_0x7d89x3,_0x7d89x4,_0x7d89x5,_0x7d89x6,_0x7d89x7){var _0x7d89x8=mxUtils[_0x961e[5]](this[_0x961e[4]],_0x961e[2],this[_0x961e[2]]);var _0x7d89xf=_0x7d89x6* _0x7d89x8;var _0x7d89x12=1.4;if(!_0x7d89x7){_0x7d89x2[_0x961e[7]](0,_0x7d89xf/ 2);_0x7d89x2[_0x961e[21]](_0x7d89x5/ 4,_0x7d89xf* _0x7d89x12,_0x7d89x5/ 2,_0x7d89xf/ 2);_0x7d89x2[_0x961e[21]](_0x7d89x5* 3/ 4,_0x7d89xf* (1- _0x7d89x12),_0x7d89x5,_0x7d89xf/ 2);_0x7d89x2[_0x961e[8]](_0x7d89x5,_0x7d89x6- _0x7d89xf/ 2);_0x7d89x2[_0x961e[21]](_0x7d89x5* 3/ 4,_0x7d89x6- _0x7d89xf* _0x7d89x12,_0x7d89x5/ 2,_0x7d89x6- _0x7d89xf/ 2);_0x7d89x2[_0x961e[21]](_0x7d89x5/ 4,_0x7d89x6- _0x7d89xf* (1- _0x7d89x12),0,_0x7d89x6- _0x7d89xf/ 2);_0x7d89x2[_0x961e[8]](0,_0x7d89xf/ 2);_0x7d89x2[_0x961e[10]]();_0x7d89x2[_0x961e[9]]()}};mxCellRenderer[_0x961e[0]][_0x961e[12]][_0x961e[22]]= _0x7d89x11;function _0x7d89x13(){}_0x7d89x13[_0x961e[0]]=  new mxCylinder();_0x7d89x13[_0x961e[0]][_0x961e[1]]= _0x7d89x13;_0x7d89x13[_0x961e[0]][_0x961e[2]]= 0.2;_0x7d89x13[_0x961e[0]][_0x961e[3]]= function(_0x7d89x2,_0x7d89x3,_0x7d89x4,_0x7d89x5,_0x7d89x6,_0x7d89x7){var _0x7d89x8=_0x7d89x5* mxUtils[_0x961e[5]](this[_0x961e[4]],_0x961e[2],this[_0x961e[2]]);if(!_0x7d89x7){_0x7d89x2[_0x961e[7]](0,0);_0x7d89x2[_0x961e[8]](_0x7d89x5- _0x7d89x8,0);_0x7d89x2[_0x961e[8]](_0x7d89x5,_0x7d89x6/ 2);_0x7d89x2[_0x961e[8]](_0x7d89x5- _0x7d89x8,_0x7d89x6);_0x7d89x2[_0x961e[8]](0,_0x7d89x6);_0x7d89x2[_0x961e[8]](_0x7d89x8,_0x7d89x6/ 2);_0x7d89x2[_0x961e[10]]();_0x7d89x2[_0x961e[9]]()}};mxCellRenderer[_0x961e[0]][_0x961e[12]][_0x961e[23]]= _0x7d89x13;function _0x7d89x14(){mxRectangleShape[_0x961e[24]](this)}mxUtils[_0x961e[25]](_0x7d89x14,mxRectangleShape);_0x7d89x14[_0x961e[0]][_0x961e[26]]= function(){return false};_0x7d89x14[_0x961e[0]][_0x961e[27]]= function(_0x7d89x15,_0x7d89x3,_0x7d89x4,_0x7d89x5,_0x7d89x6){var _0x7d89x16=Math[_0x961e[6]](_0x7d89x5/ 5,_0x7d89x6/ 5)+ 1;_0x7d89x15[_0x961e[28]]();_0x7d89x15[_0x961e[7]](_0x7d89x3+ _0x7d89x5/ 2,_0x7d89x4+ _0x7d89x16);_0x7d89x15[_0x961e[8]](_0x7d89x3+ _0x7d89x5/ 2,_0x7d89x4+ _0x7d89x6- _0x7d89x16);_0x7d89x15[_0x961e[7]](_0x7d89x3+ _0x7d89x16,_0x7d89x4+ _0x7d89x6/ 2);_0x7d89x15[_0x961e[8]](_0x7d89x3+ _0x7d89x5- _0x7d89x16,_0x7d89x4+ _0x7d89x6/ 2);_0x7d89x15[_0x961e[9]]();_0x7d89x15[_0x961e[29]]();mxRectangleShape[_0x961e[0]][_0x961e[27]][_0x961e[30]](this,arguments)};mxCellRenderer[_0x961e[0]][_0x961e[12]][_0x961e[31]]= _0x7d89x14;function _0x7d89x17(){mxRectangleShape[_0x961e[24]](this)}mxUtils[_0x961e[25]](_0x7d89x17,mxRectangleShape);_0x7d89x17[_0x961e[0]][_0x961e[26]]= function(){return false};_0x7d89x17[_0x961e[0]][_0x961e[27]]= function(_0x7d89x15,_0x7d89x3,_0x7d89x4,_0x7d89x5,_0x7d89x6){if(this[_0x961e[4]]!= null){if(this[_0x961e[4]][_0x961e[32]]== 1){var _0x7d89x18=Math[_0x961e[34]](2,this[_0x961e[33]]+ 1);mxRectangleShape[_0x961e[0]][_0x961e[35]][_0x961e[24]](this,_0x7d89x15,_0x7d89x3+ _0x7d89x18,_0x7d89x4+ _0x7d89x18,_0x7d89x5- 2* _0x7d89x18,_0x7d89x6- 2* _0x7d89x18);mxRectangleShape[_0x961e[0]][_0x961e[27]][_0x961e[30]](this,arguments);_0x7d89x3+= _0x7d89x18;_0x7d89x4+= _0x7d89x18;_0x7d89x5-= 2* _0x7d89x18;_0x7d89x6-= 2* _0x7d89x18};_0x7d89x15[_0x961e[36]](false);var _0x7d89x19=0;var _0x7d89x1a=null;do{_0x7d89x1a= mxCellRenderer[_0x961e[0]][_0x961e[12]][this[_0x961e[4]][_0x961e[37]+ _0x7d89x19]];if(_0x7d89x1a!= null){var _0x7d89x1b=this[_0x961e[4]][_0x961e[37]+ _0x7d89x19+ _0x961e[38]];var _0x7d89x1c=this[_0x961e[4]][_0x961e[37]+ _0x7d89x19+ _0x961e[39]];var _0x7d89x1d=this[_0x961e[4]][_0x961e[37]+ _0x7d89x19+ _0x961e[40]];var _0x7d89x1e=this[_0x961e[4]][_0x961e[37]+ _0x7d89x19+ _0x961e[41]];var _0x7d89x1f=this[_0x961e[4]][_0x961e[37]+ _0x7d89x19+ _0x961e[42]]|| 0;var _0x7d89x20=this[_0x961e[4]][_0x961e[37]+ _0x7d89x19+ _0x961e[43]];if(_0x7d89x20!= null){_0x7d89x1f+= this[_0x961e[44]](_0x7d89x5+ this[_0x961e[33]],_0x7d89x6+ this[_0x961e[33]])* _0x7d89x20};var _0x7d89x21=_0x7d89x3;var _0x7d89x22=_0x7d89x4;if(_0x7d89x1b== mxConstants[_0x961e[45]]){_0x7d89x21+= (_0x7d89x5- _0x7d89x1d)/ 2}else {if(_0x7d89x1b== mxConstants[_0x961e[46]]){_0x7d89x21+= _0x7d89x5- _0x7d89x1d- _0x7d89x1f}else {_0x7d89x21+= _0x7d89x1f}};if(_0x7d89x1c== mxConstants[_0x961e[47]]){_0x7d89x22+= (_0x7d89x6- _0x7d89x1e)/ 2}else {if(_0x7d89x1c== mxConstants[_0x961e[48]]){_0x7d89x22+= _0x7d89x6- _0x7d89x1e- _0x7d89x1f}else {_0x7d89x22+= _0x7d89x1f}};_0x7d89x15[_0x961e[49]]();var _0x7d89x23= new _0x7d89x1a();_0x7d89x23[_0x961e[4]]= this[_0x961e[4]];_0x7d89x1a[_0x961e[0]][_0x961e[50]][_0x961e[24]](_0x7d89x23,_0x7d89x15,_0x7d89x21,_0x7d89x22,_0x7d89x1d,_0x7d89x1e);_0x7d89x15[_0x961e[51]]()};_0x7d89x19++}while(_0x7d89x1a!= null);}};mxCellRenderer[_0x961e[0]][_0x961e[12]][_0x961e[52]]= _0x7d89x17;function _0x7d89x24(){}_0x7d89x24[_0x961e[0]]=  new mxCylinder();_0x7d89x24[_0x961e[0]][_0x961e[1]]= _0x7d89x24;_0x7d89x24[_0x961e[0]][_0x961e[3]]= function(_0x7d89x2,_0x7d89x3,_0x7d89x4,_0x7d89x5,_0x7d89x6,_0x7d89x7){if(_0x7d89x7){_0x7d89x2[_0x961e[7]](0,0);_0x7d89x2[_0x961e[8]](_0x7d89x5/ 2,_0x7d89x6/ 2);_0x7d89x2[_0x961e[8]](_0x7d89x5,0);_0x7d89x2[_0x961e[9]]()}else {_0x7d89x2[_0x961e[7]](0,0);_0x7d89x2[_0x961e[8]](_0x7d89x5,0);_0x7d89x2[_0x961e[8]](_0x7d89x5,_0x7d89x6);_0x7d89x2[_0x961e[8]](0,_0x7d89x6);_0x7d89x2[_0x961e[10]]()}};mxCellRenderer[_0x961e[0]][_0x961e[12]][_0x961e[53]]= _0x7d89x24;function _0x7d89x25(){}_0x7d89x25[_0x961e[0]]=  new mxCylinder();_0x7d89x25[_0x961e[0]][_0x961e[1]]= _0x7d89x25;_0x7d89x25[_0x961e[0]][_0x961e[54]]= true;_0x7d89x25[_0x961e[0]][_0x961e[3]]= function(_0x7d89x2,_0x7d89x3,_0x7d89x4,_0x7d89x5,_0x7d89x6,_0x7d89x7){var _0x7d89x1d=_0x7d89x5/ 3;var _0x7d89x1e=_0x7d89x6/ 4;if(!_0x7d89x7){_0x7d89x2[_0x961e[7]](_0x7d89x5/ 2,_0x7d89x1e);_0x7d89x2[_0x961e[55]](_0x7d89x5/ 2- _0x7d89x1d,_0x7d89x1e,_0x7d89x5/ 2- _0x7d89x1d,0,_0x7d89x5/ 2,0);_0x7d89x2[_0x961e[55]](_0x7d89x5/ 2+ _0x7d89x1d,0,_0x7d89x5/ 2+ _0x7d89x1d,_0x7d89x1e,_0x7d89x5/ 2,_0x7d89x1e);_0x7d89x2[_0x961e[10]]();_0x7d89x2[_0x961e[7]](_0x7d89x5/ 2,_0x7d89x1e);_0x7d89x2[_0x961e[8]](_0x7d89x5/ 2,2* _0x7d89x6/ 3);_0x7d89x2[_0x961e[7]](_0x7d89x5/ 2,_0x7d89x6/ 3);_0x7d89x2[_0x961e[8]](0,_0x7d89x6/ 3);_0x7d89x2[_0x961e[7]](_0x7d89x5/ 2,_0x7d89x6/ 3);_0x7d89x2[_0x961e[8]](_0x7d89x5,_0x7d89x6/ 3);_0x7d89x2[_0x961e[7]](_0x7d89x5/ 2,2* _0x7d89x6/ 3);_0x7d89x2[_0x961e[8]](0,_0x7d89x6);_0x7d89x2[_0x961e[7]](_0x7d89x5/ 2,2* _0x7d89x6/ 3);_0x7d89x2[_0x961e[8]](_0x7d89x5,_0x7d89x6);_0x7d89x2[_0x961e[9]]()}};mxCellRenderer[_0x961e[0]][_0x961e[12]][_0x961e[56]]= _0x7d89x25;function _0x7d89x26(){}_0x7d89x26[_0x961e[0]]=  new mxCylinder();_0x7d89x26[_0x961e[0]][_0x961e[1]]= _0x7d89x26;_0x7d89x26[_0x961e[0]][_0x961e[2]]= 10;_0x7d89x26[_0x961e[0]][_0x961e[54]]= true;_0x7d89x26[_0x961e[0]][_0x961e[3]]= function(_0x7d89x2,_0x7d89x3,_0x7d89x4,_0x7d89x5,_0x7d89x6,_0x7d89x7){var _0x7d89x27=mxUtils[_0x961e[5]](this[_0x961e[4]],_0x961e[2],this[_0x961e[2]]);var _0x7d89x1d=_0x7d89x27* 2/ 3;var _0x7d89x1e=_0x7d89x27;if(!_0x7d89x7){_0x7d89x2[_0x961e[7]](_0x7d89x5/ 2,_0x7d89x1e);_0x7d89x2[_0x961e[55]](_0x7d89x5/ 2- _0x7d89x1d,_0x7d89x1e,_0x7d89x5/ 2- _0x7d89x1d,0,_0x7d89x5/ 2,0);_0x7d89x2[_0x961e[55]](_0x7d89x5/ 2+ _0x7d89x1d,0,_0x7d89x5/ 2+ _0x7d89x1d,_0x7d89x1e,_0x7d89x5/ 2,_0x7d89x1e);_0x7d89x2[_0x961e[10]]();_0x7d89x2[_0x961e[7]](_0x7d89x5/ 2,_0x7d89x1e);_0x7d89x2[_0x961e[8]](_0x7d89x5/ 2,_0x7d89x6);_0x7d89x2[_0x961e[9]]()}};mxCellRenderer[_0x961e[0]][_0x961e[12]][_0x961e[57]]= _0x7d89x26;function _0x7d89x28(){}_0x7d89x28[_0x961e[0]]=  new mxCylinder();_0x7d89x28[_0x961e[0]][_0x961e[1]]= _0x7d89x28;_0x7d89x28[_0x961e[0]][_0x961e[58]]= 32;_0x7d89x28[_0x961e[0]][_0x961e[59]]= 12;_0x7d89x28[_0x961e[0]][_0x961e[3]]= function(_0x7d89x2,_0x7d89x3,_0x7d89x4,_0x7d89x5,_0x7d89x6,_0x7d89x7){var _0x7d89xe=mxUtils[_0x961e[5]](this[_0x961e[4]],_0x961e[58],this[_0x961e[58]]);var _0x7d89xf=mxUtils[_0x961e[5]](this[_0x961e[4]],_0x961e[59],this[_0x961e[59]]);var _0x7d89x29=_0x7d89xe/ 2;var _0x7d89x2a=_0x7d89x29+ _0x7d89xe/ 2;var _0x7d89x2b=0.3* _0x7d89x6- _0x7d89xf/ 2;var _0x7d89x2c=0.7* _0x7d89x6- _0x7d89xf/ 2;if(_0x7d89x7){_0x7d89x2[_0x961e[7]](_0x7d89x29,_0x7d89x2b);_0x7d89x2[_0x961e[8]](_0x7d89x2a,_0x7d89x2b);_0x7d89x2[_0x961e[8]](_0x7d89x2a,_0x7d89x2b+ _0x7d89xf);_0x7d89x2[_0x961e[8]](_0x7d89x29,_0x7d89x2b+ _0x7d89xf);_0x7d89x2[_0x961e[7]](_0x7d89x29,_0x7d89x2c);_0x7d89x2[_0x961e[8]](_0x7d89x2a,_0x7d89x2c);_0x7d89x2[_0x961e[8]](_0x7d89x2a,_0x7d89x2c+ _0x7d89xf);_0x7d89x2[_0x961e[8]](_0x7d89x29,_0x7d89x2c+ _0x7d89xf);_0x7d89x2[_0x961e[9]]()}else {_0x7d89x2[_0x961e[7]](_0x7d89x29,0);_0x7d89x2[_0x961e[8]](_0x7d89x5,0);_0x7d89x2[_0x961e[8]](_0x7d89x5,_0x7d89x6);_0x7d89x2[_0x961e[8]](_0x7d89x29,_0x7d89x6);_0x7d89x2[_0x961e[8]](_0x7d89x29,_0x7d89x2c+ _0x7d89xf);_0x7d89x2[_0x961e[8]](0,_0x7d89x2c+ _0x7d89xf);_0x7d89x2[_0x961e[8]](0,_0x7d89x2c);_0x7d89x2[_0x961e[8]](_0x7d89x29,_0x7d89x2c);_0x7d89x2[_0x961e[8]](_0x7d89x29,_0x7d89x2b+ _0x7d89xf);_0x7d89x2[_0x961e[8]](0,_0x7d89x2b+ _0x7d89xf);_0x7d89x2[_0x961e[8]](0,_0x7d89x2b);_0x7d89x2[_0x961e[8]](_0x7d89x29,_0x7d89x2b);_0x7d89x2[_0x961e[10]]();_0x7d89x2[_0x961e[9]]()}};mxCellRenderer[_0x961e[0]][_0x961e[12]][_0x961e[60]]= _0x7d89x28;function _0x7d89x2d(){}_0x7d89x2d[_0x961e[0]]=  new mxDoubleEllipse();_0x7d89x2d[_0x961e[0]][_0x961e[1]]= _0x7d89x2d;_0x7d89x2d[_0x961e[0]][_0x961e[61]]= true;_0x7d89x2d[_0x961e[0]][_0x961e[50]]= function(_0x7d89x15,_0x7d89x3,_0x7d89x4,_0x7d89x5,_0x7d89x6){var _0x7d89x18=Math[_0x961e[6]](4,Math[_0x961e[6]](_0x7d89x5/ 5,_0x7d89x6/ 5));if(_0x7d89x5> 0&& _0x7d89x6> 0){_0x7d89x15[_0x961e[62]](_0x7d89x3+ _0x7d89x18,_0x7d89x4+ _0x7d89x18,_0x7d89x5- 2* _0x7d89x18,_0x7d89x6- 2* _0x7d89x18);_0x7d89x15[_0x961e[63]]()};_0x7d89x15[_0x961e[64]](false);if(this[_0x961e[61]]){_0x7d89x15[_0x961e[62]](_0x7d89x3,_0x7d89x4,_0x7d89x5,_0x7d89x6);_0x7d89x15[_0x961e[29]]()}};mxCellRenderer[_0x961e[0]][_0x961e[12]][_0x961e[65]]= _0x7d89x2d;function _0x7d89x2e(){}_0x7d89x2e[_0x961e[0]]=  new _0x7d89x2d();_0x7d89x2e[_0x961e[0]][_0x961e[1]]= _0x7d89x2e;_0x7d89x2e[_0x961e[0]][_0x961e[61]]= false;mxCellRenderer[_0x961e[0]][_0x961e[12]][_0x961e[66]]= _0x7d89x2e;var _0x7d89x2f=mxImageExport[_0x961e[0]][_0x961e[67]];mxImageExport[_0x961e[0]][_0x961e[67]]= function(){_0x7d89x2f[_0x961e[30]](this,arguments);function _0x7d89x30(_0x7d89x31){return {drawShape:function(_0x7d89x32,_0x7d89x33,_0x7d89x34,_0x7d89x35){var _0x7d89x3=_0x7d89x34[_0x961e[68]];var _0x7d89x4=_0x7d89x34[_0x961e[69]];var _0x7d89x5=_0x7d89x34[_0x961e[70]];var _0x7d89x6=_0x7d89x34[_0x961e[71]];if(_0x7d89x35){var _0x7d89x18=Math[_0x961e[6]](4,Math[_0x961e[6]](_0x7d89x5/ 5,_0x7d89x6/ 5));_0x7d89x3+= _0x7d89x18;_0x7d89x4+= _0x7d89x18;_0x7d89x5-= 2* _0x7d89x18;_0x7d89x6-= 2* _0x7d89x18;if(_0x7d89x5> 0&& _0x7d89x6> 0){_0x7d89x32[_0x961e[62]](_0x7d89x3,_0x7d89x4,_0x7d89x5,_0x7d89x6)};return true}else {_0x7d89x32[_0x961e[63]]();if(_0x7d89x31){_0x7d89x32[_0x961e[62]](_0x7d89x3,_0x7d89x4,_0x7d89x5,_0x7d89x6);_0x7d89x32[_0x961e[29]]()}}}}}this[_0x961e[72]][_0x961e[65]]= _0x7d89x30(true);this[_0x961e[72]][_0x961e[66]]= _0x7d89x30(false)};function _0x7d89x36(){mxArrow[_0x961e[24]](this)}mxUtils[_0x961e[25]](_0x7d89x36,mxArrow);_0x7d89x36[_0x961e[0]][_0x961e[73]]= function(_0x7d89x15,_0x7d89x37){var _0x7d89x1d=10;var _0x7d89x38=_0x7d89x37[0];var _0x7d89x39=_0x7d89x37[_0x7d89x37[_0x961e[74]]- 1];var _0x7d89xe=_0x7d89x39[_0x961e[68]]- _0x7d89x38[_0x961e[68]];var _0x7d89xf=_0x7d89x39[_0x961e[69]]- _0x7d89x38[_0x961e[69]];var _0x7d89x3a=Math[_0x961e[75]](_0x7d89xe* _0x7d89xe+ _0x7d89xf* _0x7d89xf);var _0x7d89x3b=_0x7d89x3a;var _0x7d89x3c=_0x7d89xe/ _0x7d89x3a;var _0x7d89x3d=_0x7d89xf/ _0x7d89x3a;var _0x7d89x3e=_0x7d89x3b* _0x7d89x3c;var _0x7d89x3f=_0x7d89x3b* _0x7d89x3d;var _0x7d89x40=_0x7d89x1d* _0x7d89x3d/ 3;var _0x7d89x41=-_0x7d89x1d* _0x7d89x3c/ 3;var _0x7d89x42=_0x7d89x38[_0x961e[68]]- _0x7d89x40/ 2;var _0x7d89x43=_0x7d89x38[_0x961e[69]]- _0x7d89x41/ 2;var _0x7d89x44=_0x7d89x42+ _0x7d89x40;var _0x7d89x45=_0x7d89x43+ _0x7d89x41;var _0x7d89x46=_0x7d89x44+ _0x7d89x3e;var _0x7d89x47=_0x7d89x45+ _0x7d89x3f;var _0x7d89x48=_0x7d89x46+ _0x7d89x40;var _0x7d89x49=_0x7d89x47+ _0x7d89x41;var _0x7d89x4a=_0x7d89x48- 3* _0x7d89x40;var _0x7d89x4b=_0x7d89x49- 3* _0x7d89x41;_0x7d89x15[_0x961e[28]]();_0x7d89x15[_0x961e[7]](_0x7d89x44,_0x7d89x45);_0x7d89x15[_0x961e[8]](_0x7d89x46,_0x7d89x47);_0x7d89x15[_0x961e[7]](_0x7d89x4a+ _0x7d89x40,_0x7d89x4b+ _0x7d89x41);_0x7d89x15[_0x961e[8]](_0x7d89x42,_0x7d89x43);_0x7d89x15[_0x961e[29]]()};mxCellRenderer[_0x961e[0]][_0x961e[12]][_0x961e[76]]= _0x7d89x36;mxMarker[_0x961e[78]](_0x961e[77],function(_0x7d89x32,_0x7d89x1a,_0x7d89x4c,_0x7d89x39,_0x7d89x4d,_0x7d89x4e,_0x7d89x4f,_0x7d89x50,_0x7d89x51,_0x7d89x52){var _0x7d89x3c=_0x7d89x4d* (_0x7d89x4f+ _0x7d89x51+ 1);var _0x7d89x3d=_0x7d89x4e* (_0x7d89x4f+ _0x7d89x51+ 1);return function(){_0x7d89x32[_0x961e[28]]();_0x7d89x32[_0x961e[7]](_0x7d89x39[_0x961e[68]]- _0x7d89x3c/ 2- _0x7d89x3d/ 2,_0x7d89x39[_0x961e[69]]- _0x7d89x3d/ 2+ _0x7d89x3c/ 2);_0x7d89x32[_0x961e[8]](_0x7d89x39[_0x961e[68]]+ _0x7d89x3d/ 2- 3* _0x7d89x3c/ 2,_0x7d89x39[_0x961e[69]]- 3* _0x7d89x3d/ 2- _0x7d89x3c/ 2);_0x7d89x32[_0x961e[29]]()}});var _0x7d89x53=-99;if( typeof (mxVertexHandler)!= _0x961e[79]){function _0x7d89x54(_0x7d89x33){mxVertexHandler[_0x961e[24]](this,_0x7d89x33)}mxUtils[_0x961e[25]](_0x7d89x54,mxVertexHandler);_0x7d89x54[_0x961e[0]][_0x961e[80]]= false;_0x7d89x54[_0x961e[0]][_0x961e[81]]= function(){this[_0x961e[82]]= mxUtils[_0x961e[5]](this[_0x961e[83]][_0x961e[4]],mxConstants.STYLE_HORIZONTAL,true);var _0x7d89x55=this[_0x961e[83]][_0x961e[85]][_0x961e[84]];if(this[_0x961e[86]]!= null){var _0x7d89x34= new mxRectangle(0,0,this[_0x961e[86]][_0x961e[70]],this[_0x961e[86]][_0x961e[71]]);this[_0x961e[87]]=  new mxImageShape(_0x7d89x34,this[_0x961e[86]][_0x961e[88]])}else {var _0x7d89x4f=10;var _0x7d89x34= new mxRectangle(0,0,_0x7d89x4f,_0x7d89x4f);this[_0x961e[87]]=  new mxRhombus(_0x7d89x34,mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};this[_0x961e[87]][_0x961e[89]]= (_0x7d89x55[_0x961e[89]]!= mxConstants[_0x961e[90]])?mxConstants[_0x961e[91]]:mxConstants[_0x961e[90]];this[_0x961e[87]][_0x961e[81]](_0x7d89x55[_0x961e[93]]()[_0x961e[92]]());this[_0x961e[87]][_0x961e[95]][_0x961e[4]][_0x961e[94]]= this[_0x961e[96]]();mxEvent[_0x961e[97]](this[_0x961e[87]][_0x961e[95]],_0x7d89x55,this[_0x961e[83]]);mxVertexHandler[_0x961e[0]][_0x961e[81]][_0x961e[30]](this,arguments)};_0x7d89x54[_0x961e[0]][_0x961e[96]]= function(){return _0x961e[98]};_0x7d89x54[_0x961e[0]][_0x961e[99]]= function(){mxVertexHandler[_0x961e[0]][_0x961e[99]][_0x961e[30]](this,arguments);var _0x7d89x4f=this[_0x961e[87]][_0x961e[100]][_0x961e[70]];this[_0x961e[87]][_0x961e[100]]= this[_0x961e[101]](_0x7d89x4f);this[_0x961e[87]][_0x961e[99]]()};_0x7d89x54[_0x961e[0]][_0x961e[102]]= function(){mxVertexHandler[_0x961e[0]][_0x961e[102]][_0x961e[30]](this,arguments);if(this[_0x961e[87]]!= null){this[_0x961e[87]][_0x961e[102]]();this[_0x961e[87]]= null}};_0x7d89x54[_0x961e[0]][_0x961e[103]]= function(_0x7d89x56){if(_0x7d89x56[_0x961e[104]](this[_0x961e[87]])){return _0x7d89x53};return mxVertexHandler[_0x961e[0]][_0x961e[103]][_0x961e[30]](this,arguments)};_0x7d89x54[_0x961e[0]][_0x961e[105]]= function(_0x7d89x57,_0x7d89x56){if(!_0x7d89x56[_0x961e[106]]()&& this[_0x961e[107]]== _0x7d89x53){var _0x7d89x58= new mxPoint(_0x7d89x56[_0x961e[108]](),_0x7d89x56[_0x961e[109]]());this[_0x961e[110]](_0x7d89x58);var _0x7d89x59=this[_0x961e[84]][_0x961e[112]](_0x7d89x56[_0x961e[111]]());var _0x7d89x5a=this[_0x961e[84]][_0x961e[93]]()[_0x961e[113]];if(_0x7d89x59&& this[_0x961e[80]]){_0x7d89x58[_0x961e[68]]= this[_0x961e[84]][_0x961e[114]](_0x7d89x58[_0x961e[68]]/ _0x7d89x5a)* _0x7d89x5a;_0x7d89x58[_0x961e[69]]= this[_0x961e[84]][_0x961e[114]](_0x7d89x58[_0x961e[69]]/ _0x7d89x5a)* _0x7d89x5a};this[_0x961e[115]](_0x7d89x58);this[_0x961e[116]](this[_0x961e[87]],_0x7d89x58[_0x961e[68]],_0x7d89x58[_0x961e[69]]);this[_0x961e[83]][_0x961e[85]][_0x961e[84]][_0x961e[117]][_0x961e[99]](this[_0x961e[83]],true);_0x7d89x56[_0x961e[118]]()}else {mxVertexHandler[_0x961e[0]][_0x961e[105]][_0x961e[30]](this,arguments)}};_0x7d89x54[_0x961e[0]][_0x961e[119]]= function(_0x7d89x57,_0x7d89x56){if(!_0x7d89x56[_0x961e[106]]()&& this[_0x961e[107]]== _0x7d89x53){this[_0x961e[120]]();this[_0x961e[121]]();_0x7d89x56[_0x961e[118]]()}else {mxVertexHandler[_0x961e[0]][_0x961e[119]][_0x961e[30]](this,arguments)}};_0x7d89x54[_0x961e[0]][_0x961e[101]]= function(_0x7d89x4f){var _0x7d89x5b=this[_0x961e[83]][_0x961e[123]][_0x961e[122]]();var _0x7d89x5c=mxUtils[_0x961e[124]](_0x7d89x5b);var _0x7d89x5d=Math[_0x961e[125]](_0x7d89x5c);var _0x7d89x5e=Math[_0x961e[126]](_0x7d89x5c);var _0x7d89x34= new mxRectangle(this[_0x961e[83]][_0x961e[68]],this[_0x961e[83]][_0x961e[69]],this[_0x961e[83]][_0x961e[70]],this[_0x961e[83]][_0x961e[71]]);if(this[_0x961e[83]][_0x961e[123]][_0x961e[127]]()){var _0x7d89x5f=(_0x7d89x34[_0x961e[70]]- _0x7d89x34[_0x961e[71]])/ 2;_0x7d89x34[_0x961e[68]]+= _0x7d89x5f;_0x7d89x34[_0x961e[69]]-= _0x7d89x5f;var _0x7d89x23=_0x7d89x34[_0x961e[70]];_0x7d89x34[_0x961e[70]]= _0x7d89x34[_0x961e[71]];_0x7d89x34[_0x961e[71]]= _0x7d89x23};var _0x7d89x60=this[_0x961e[128]](_0x7d89x34);if(this[_0x961e[83]][_0x961e[123]][_0x961e[129]]){_0x7d89x60[_0x961e[68]]= 2* _0x7d89x34[_0x961e[68]]+ _0x7d89x34[_0x961e[70]]- _0x7d89x60[_0x961e[68]]};if(this[_0x961e[83]][_0x961e[123]][_0x961e[130]]){_0x7d89x60[_0x961e[69]]= 2* _0x7d89x34[_0x961e[69]]+ _0x7d89x34[_0x961e[71]]- _0x7d89x60[_0x961e[69]]};_0x7d89x60= mxUtils[_0x961e[133]](_0x7d89x60,_0x7d89x5d,_0x7d89x5e, new mxPoint(this[_0x961e[83]][_0x961e[131]](),this[_0x961e[83]][_0x961e[132]]()));return  new mxRectangle(_0x7d89x60[_0x961e[68]]- _0x7d89x4f/ 2,_0x7d89x60[_0x961e[69]]- _0x7d89x4f/ 2,_0x7d89x4f,_0x7d89x4f)};_0x7d89x54[_0x961e[0]][_0x961e[128]]= function(_0x7d89x34){return null};_0x7d89x54[_0x961e[0]][_0x961e[115]]= function(_0x7d89x58){};_0x7d89x54[_0x961e[0]][_0x961e[110]]= function(_0x7d89x58){_0x7d89x58[_0x961e[68]]= Math[_0x961e[34]](this[_0x961e[83]][_0x961e[68]],Math[_0x961e[6]](this[_0x961e[83]][_0x961e[68]]+ this[_0x961e[83]][_0x961e[70]],_0x7d89x58[_0x961e[68]]));_0x7d89x58[_0x961e[69]]= Math[_0x961e[34]](this[_0x961e[83]][_0x961e[69]],Math[_0x961e[6]](this[_0x961e[83]][_0x961e[69]]+ this[_0x961e[83]][_0x961e[71]],_0x7d89x58[_0x961e[69]]))};_0x7d89x54[_0x961e[0]][_0x961e[120]]= function(){};function _0x7d89x61(_0x7d89x33){_0x7d89x54[_0x961e[24]](this,_0x7d89x33)}mxUtils[_0x961e[25]](_0x7d89x61,_0x7d89x54);_0x7d89x61[_0x961e[0]][_0x961e[128]]= function(_0x7d89x34){var _0x7d89x5a=this[_0x961e[84]][_0x961e[93]]()[_0x961e[113]];var _0x7d89xb=Math[_0x961e[6]](_0x7d89x34[_0x961e[70]],mxUtils[_0x961e[5]](this[_0x961e[83]][_0x961e[4]],_0x961e[14],60)* _0x7d89x5a);var _0x7d89xc=Math[_0x961e[6]](_0x7d89x34[_0x961e[71]],mxUtils[_0x961e[5]](this[_0x961e[83]][_0x961e[4]],_0x961e[15],20)* _0x7d89x5a);var _0x7d89xd=mxUtils[_0x961e[5]](this[_0x961e[83]][_0x961e[4]],_0x961e[16],_0x961e[17]);var _0x7d89x3=(_0x7d89xd== _0x961e[18])?_0x7d89x34[_0x961e[68]]+ _0x7d89xb:_0x7d89x34[_0x961e[68]]+ _0x7d89x34[_0x961e[70]]- _0x7d89xb;return  new mxPoint(_0x7d89x3,_0x7d89x34[_0x961e[69]]+ _0x7d89xc)};_0x7d89x61[_0x961e[0]][_0x961e[115]]= function(_0x7d89x58){var _0x7d89x5b=this[_0x961e[83]][_0x961e[123]][_0x961e[122]]();var _0x7d89x5c=mxUtils[_0x961e[124]](_0x7d89x5b);var _0x7d89x5d=Math[_0x961e[125]](-_0x7d89x5c);var _0x7d89x5e=Math[_0x961e[126]](-_0x7d89x5c);var _0x7d89x34= new mxRectangle(this[_0x961e[83]][_0x961e[68]],this[_0x961e[83]][_0x961e[69]],this[_0x961e[83]][_0x961e[70]],this[_0x961e[83]][_0x961e[71]]);if(this[_0x961e[83]][_0x961e[123]][_0x961e[127]]()){var _0x7d89x5f=(_0x7d89x34[_0x961e[70]]- _0x7d89x34[_0x961e[71]])/ 2;_0x7d89x34[_0x961e[68]]+= _0x7d89x5f;_0x7d89x34[_0x961e[69]]-= _0x7d89x5f;var _0x7d89x23=_0x7d89x34[_0x961e[70]];_0x7d89x34[_0x961e[70]]= _0x7d89x34[_0x961e[71]];_0x7d89x34[_0x961e[71]]= _0x7d89x23};var _0x7d89x60= new mxPoint(_0x7d89x58[_0x961e[68]],_0x7d89x58[_0x961e[69]]);_0x7d89x60= mxUtils[_0x961e[133]](_0x7d89x60,_0x7d89x5d,_0x7d89x5e, new mxPoint(this[_0x961e[83]][_0x961e[131]](),this[_0x961e[83]][_0x961e[132]]()));if(this[_0x961e[83]][_0x961e[123]][_0x961e[129]]){_0x7d89x60[_0x961e[68]]= 2* _0x7d89x34[_0x961e[68]]+ _0x7d89x34[_0x961e[70]]- _0x7d89x60[_0x961e[68]]};if(this[_0x961e[83]][_0x961e[123]][_0x961e[130]]){_0x7d89x60[_0x961e[69]]= 2* _0x7d89x34[_0x961e[69]]+ _0x7d89x34[_0x961e[71]]- _0x7d89x60[_0x961e[69]]};var _0x7d89x62=this[_0x961e[134]](_0x7d89x60,_0x7d89x34);if(_0x7d89x62!= null){if(this[_0x961e[83]][_0x961e[123]][_0x961e[129]]){_0x7d89x62[_0x961e[68]]= 2* _0x7d89x34[_0x961e[68]]+ _0x7d89x34[_0x961e[70]]- _0x7d89x62[_0x961e[68]]};if(this[_0x961e[83]][_0x961e[123]][_0x961e[130]]){_0x7d89x62[_0x961e[69]]= 2* _0x7d89x34[_0x961e[69]]+ _0x7d89x34[_0x961e[71]]- _0x7d89x62[_0x961e[69]]};_0x7d89x5d= Math[_0x961e[125]](_0x7d89x5c);_0x7d89x5e= Math[_0x961e[126]](_0x7d89x5c);_0x7d89x62= mxUtils[_0x961e[133]](_0x7d89x62,_0x7d89x5d,_0x7d89x5e, new mxPoint(this[_0x961e[83]][_0x961e[131]](),this[_0x961e[83]][_0x961e[132]]()));_0x7d89x58[_0x961e[68]]= _0x7d89x62[_0x961e[68]];_0x7d89x58[_0x961e[69]]= _0x7d89x62[_0x961e[69]]}};_0x7d89x61[_0x961e[0]][_0x961e[134]]= function(_0x7d89x60,_0x7d89x34){var _0x7d89xd=mxUtils[_0x961e[5]](this[_0x961e[83]][_0x961e[4]],_0x961e[16],_0x961e[17]);var _0x7d89xb=(_0x7d89xd== _0x961e[18])?_0x7d89x60[_0x961e[68]]- _0x7d89x34[_0x961e[68]]:_0x7d89x34[_0x961e[68]]+ _0x7d89x34[_0x961e[70]]- _0x7d89x60[_0x961e[68]];var _0x7d89xc=_0x7d89x60[_0x961e[69]]- _0x7d89x34[_0x961e[69]];var _0x7d89x5a=this[_0x961e[84]][_0x961e[93]]()[_0x961e[113]];this[_0x961e[83]][_0x961e[4]][_0x961e[14]]= Math[_0x961e[135]](Math[_0x961e[34]](1,_0x7d89xb)/ _0x7d89x5a);this[_0x961e[83]][_0x961e[4]][_0x961e[15]]= Math[_0x961e[135]](Math[_0x961e[34]](1,_0x7d89xc)/ _0x7d89x5a)};_0x7d89x61[_0x961e[0]][_0x961e[120]]= function(){var _0x7d89x63=this[_0x961e[84]][_0x961e[136]]();_0x7d89x63[_0x961e[137]]();try{this[_0x961e[83]][_0x961e[85]][_0x961e[84]][_0x961e[139]](_0x961e[14],this[_0x961e[83]][_0x961e[4]][_0x961e[14]],[this[_0x961e[83]][_0x961e[138]]]);this[_0x961e[83]][_0x961e[85]][_0x961e[84]][_0x961e[139]](_0x961e[15],this[_0x961e[83]][_0x961e[4]][_0x961e[15]],[this[_0x961e[83]][_0x961e[138]]])}finally{_0x7d89x63[_0x961e[140]]()}};function _0x7d89x64(_0x7d89x33){_0x7d89x61[_0x961e[24]](this,_0x7d89x33)}mxUtils[_0x961e[25]](_0x7d89x64,_0x7d89x61);_0x7d89x64[_0x961e[0]][_0x961e[128]]= function(_0x7d89x34){var _0x7d89x5a=this[_0x961e[84]][_0x961e[93]]()[_0x961e[113]];var _0x7d89x65=mxUtils[_0x961e[5]](this[_0x961e[83]][_0x961e[4]],mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);return  new mxPoint(_0x7d89x34[_0x961e[68]]+ _0x7d89x34[_0x961e[70]]/ 2,_0x7d89x34[_0x961e[69]]+ Math[_0x961e[6]](_0x7d89x34[_0x961e[71]],_0x7d89x65* _0x7d89x5a))};_0x7d89x64[_0x961e[0]][_0x961e[134]]= function(_0x7d89x58,_0x7d89x34){_0x7d89x58[_0x961e[68]]= _0x7d89x34[_0x961e[68]]+ _0x7d89x34[_0x961e[70]]/ 2;startSize= _0x7d89x58[_0x961e[69]]- _0x7d89x34[_0x961e[69]];var _0x7d89x5a=this[_0x961e[84]][_0x961e[93]]()[_0x961e[113]];this[_0x961e[83]][_0x961e[4]][_0x961e[141]]= Math[_0x961e[135]](Math[_0x961e[34]](1,startSize)/ _0x7d89x5a);return _0x7d89x58};_0x7d89x64[_0x961e[0]][_0x961e[120]]= function(){this[_0x961e[83]][_0x961e[85]][_0x961e[84]][_0x961e[139]](_0x961e[141],this[_0x961e[83]][_0x961e[4]][_0x961e[141]],[this[_0x961e[83]][_0x961e[138]]])};function _0x7d89x66(_0x7d89x33){_0x7d89x61[_0x961e[24]](this,_0x7d89x33)}mxUtils[_0x961e[25]](_0x7d89x66,_0x7d89x61);_0x7d89x66[_0x961e[0]][_0x961e[142]]= 20;_0x7d89x66[_0x961e[0]][_0x961e[143]]= 1;_0x7d89x66[_0x961e[0]][_0x961e[128]]= function(_0x7d89x34){var _0x7d89x5a=this[_0x961e[84]][_0x961e[93]]()[_0x961e[113]];var _0x7d89x67=Math[_0x961e[6]](_0x7d89x34[_0x961e[70]],Math[_0x961e[6]](_0x7d89x34[_0x961e[71]],mxUtils[_0x961e[5]](this[_0x961e[83]][_0x961e[4]],_0x961e[2],this[_0x961e[142]])* _0x7d89x5a/ this[_0x961e[143]]));return  new mxPoint(_0x7d89x34[_0x961e[68]]+ _0x7d89x67,_0x7d89x34[_0x961e[69]]+ _0x7d89x67)};_0x7d89x66[_0x961e[0]][_0x961e[134]]= function(_0x7d89x60,_0x7d89x34){var _0x7d89x4f=Math[_0x961e[34]](0,Math[_0x961e[6]](Math[_0x961e[6]](_0x7d89x34[_0x961e[70]]/ this[_0x961e[143]],_0x7d89x60[_0x961e[68]]- _0x7d89x34[_0x961e[68]]),Math[_0x961e[6]](_0x7d89x34[_0x961e[71]]/ this[_0x961e[143]],_0x7d89x60[_0x961e[69]]- _0x7d89x34[_0x961e[69]])));var _0x7d89x5a=this[_0x961e[84]][_0x961e[93]]()[_0x961e[113]];this[_0x961e[83]][_0x961e[4]][_0x961e[2]]= Math[_0x961e[135]](Math[_0x961e[34]](1,_0x7d89x4f)/ _0x7d89x5a)* this[_0x961e[143]];return  new mxPoint(_0x7d89x34[_0x961e[68]]+ _0x7d89x4f,_0x7d89x34[_0x961e[69]]+ _0x7d89x4f)};_0x7d89x66[_0x961e[0]][_0x961e[120]]= function(){this[_0x961e[83]][_0x961e[85]][_0x961e[84]][_0x961e[139]](_0x961e[2],this[_0x961e[83]][_0x961e[4]][_0x961e[2]],[this[_0x961e[83]][_0x961e[138]]])};function _0x7d89x68(_0x7d89x33){_0x7d89x66[_0x961e[24]](this,_0x7d89x33)}mxUtils[_0x961e[25]](_0x7d89x68,_0x7d89x66);_0x7d89x68[_0x961e[0]][_0x961e[142]]= 30;_0x7d89x68[_0x961e[0]][_0x961e[143]]= 2;function _0x7d89x69(_0x7d89x33){_0x7d89x66[_0x961e[24]](this,_0x7d89x33)}mxUtils[_0x961e[25]](_0x7d89x69,_0x7d89x66);_0x7d89x69[_0x961e[0]][_0x961e[142]]= 30;_0x7d89x69[_0x961e[0]][_0x961e[143]]= 1;_0x7d89x69[_0x961e[0]][_0x961e[128]]= function(_0x7d89x34){var _0x7d89x5a=this[_0x961e[84]][_0x961e[93]]()[_0x961e[113]];var _0x7d89x67=Math[_0x961e[6]](_0x7d89x34[_0x961e[70]],Math[_0x961e[6]](_0x7d89x34[_0x961e[71]],mxUtils[_0x961e[5]](this[_0x961e[83]][_0x961e[4]],_0x961e[2],this[_0x961e[142]])* _0x7d89x5a/ this[_0x961e[143]]));return  new mxPoint(_0x7d89x34[_0x961e[68]]+ _0x7d89x34[_0x961e[70]]- _0x7d89x67,_0x7d89x34[_0x961e[69]]+ _0x7d89x67)};_0x7d89x69[_0x961e[0]][_0x961e[134]]= function(_0x7d89x60,_0x7d89x34){var _0x7d89x4f=Math[_0x961e[34]](0,Math[_0x961e[6]](Math[_0x961e[6]](_0x7d89x34[_0x961e[70]]/ this[_0x961e[143]],_0x7d89x60[_0x961e[68]]- _0x7d89x34[_0x961e[68]]+ _0x7d89x34[_0x961e[70]]),Math[_0x961e[6]](_0x7d89x34[_0x961e[71]]/ this[_0x961e[143]],_0x7d89x60[_0x961e[69]]- _0x7d89x34[_0x961e[69]])));var _0x7d89x5a=this[_0x961e[84]][_0x961e[93]]()[_0x961e[113]];this[_0x961e[83]][_0x961e[4]][_0x961e[2]]= Math[_0x961e[135]](Math[_0x961e[34]](1,_0x7d89x4f)/ _0x7d89x5a)* this[_0x961e[143]];return  new mxPoint(_0x7d89x34[_0x961e[68]]+ _0x7d89x34[_0x961e[70]]- _0x7d89x4f,_0x7d89x34[_0x961e[69]]+ _0x7d89x4f)};function _0x7d89x6a(_0x7d89x33){_0x7d89x66[_0x961e[24]](this,_0x7d89x33)}mxUtils[_0x961e[25]](_0x7d89x6a,_0x7d89x66);_0x7d89x6a[_0x961e[0]][_0x961e[142]]= 0.2;_0x7d89x6a[_0x961e[0]][_0x961e[143]]= 1;_0x7d89x6a[_0x961e[0]][_0x961e[128]]= function(_0x7d89x34){var _0x7d89x67=mxUtils[_0x961e[5]](this[_0x961e[83]][_0x961e[4]],_0x961e[2],this[_0x961e[142]]);return  new mxPoint(_0x7d89x34[_0x961e[68]]+ _0x7d89x34[_0x961e[70]]* _0x7d89x67,_0x7d89x34[_0x961e[69]]+ _0x7d89x34[_0x961e[71]]/ 2)};_0x7d89x6a[_0x961e[0]][_0x961e[134]]= function(_0x7d89x60,_0x7d89x34){var _0x7d89x4f=Math[_0x961e[6]](1,(_0x7d89x60[_0x961e[68]]- _0x7d89x34[_0x961e[68]])/ _0x7d89x34[_0x961e[70]]);this[_0x961e[83]][_0x961e[4]][_0x961e[2]]= _0x7d89x4f;return  new mxPoint(_0x7d89x34[_0x961e[68]]+ _0x7d89x4f* _0x7d89x34[_0x961e[70]],_0x7d89x34[_0x961e[69]]+ _0x7d89x34[_0x961e[71]]/ 2)};function _0x7d89x6b(_0x7d89x33){_0x7d89x66[_0x961e[24]](this,_0x7d89x33)}mxUtils[_0x961e[25]](_0x7d89x6b,_0x7d89x66);_0x7d89x6b[_0x961e[0]][_0x961e[142]]= 0.4;_0x7d89x6b[_0x961e[0]][_0x961e[143]]= 1;_0x7d89x6b[_0x961e[0]][_0x961e[128]]= function(_0x7d89x34){var _0x7d89x67=mxUtils[_0x961e[5]](this[_0x961e[83]][_0x961e[4]],_0x961e[2],this[_0x961e[142]]);return  new mxPoint(_0x7d89x34[_0x961e[68]]+ _0x7d89x34[_0x961e[70]]/ 2,_0x7d89x34[_0x961e[69]]+ _0x7d89x67* _0x7d89x34[_0x961e[71]]/ 2)};_0x7d89x6b[_0x961e[0]][_0x961e[134]]= function(_0x7d89x60,_0x7d89x34){var _0x7d89x4f=Math[_0x961e[34]](0,Math[_0x961e[6]](1,((_0x7d89x60[_0x961e[69]]- _0x7d89x34[_0x961e[69]])/ _0x7d89x34[_0x961e[71]])* 2));this[_0x961e[83]][_0x961e[4]][_0x961e[2]]= _0x7d89x4f;return  new mxPoint(_0x7d89x34[_0x961e[68]]+ _0x7d89x34[_0x961e[70]]/ 2,_0x7d89x34[_0x961e[69]]+ _0x7d89x4f* _0x7d89x34[_0x961e[71]]/ 2)};var _0x7d89x6c={"\x73\x77\x69\x6D\x6C\x61\x6E\x65":_0x7d89x64,"\x66\x6F\x6C\x64\x65\x72":_0x7d89x61,"\x63\x75\x62\x65":_0x7d89x66,"\x63\x61\x72\x64":_0x7d89x68,"\x6E\x6F\x74\x65":_0x7d89x69,"\x73\x74\x65\x70":_0x7d89x6a,"\x74\x61\x70\x65":_0x7d89x6b};var _0x7d89x6d=mxGraph[_0x961e[0]][_0x961e[144]];mxGraph[_0x961e[0]][_0x961e[144]]= function(_0x7d89x33){if(_0x7d89x33!= null){var _0x7d89x6e=_0x7d89x6c[_0x7d89x33[_0x961e[4]][_0x961e[123]]];if(_0x7d89x6e!= null){return  new _0x7d89x6e(_0x7d89x33)}};return _0x7d89x6d[_0x961e[30]](this,arguments)}};mxGraph[_0x961e[0]][_0x961e[145]]= function(_0x7d89x6f,_0x7d89x50){if(_0x7d89x6f!= null&& _0x7d89x6f[_0x961e[123]]!= null){if(_0x7d89x6f[_0x961e[123]][_0x961e[146]]!= null){if(_0x7d89x6f[_0x961e[123]][_0x961e[146]]!= null){return _0x7d89x6f[_0x961e[123]][_0x961e[146]][_0x961e[147]]}}else {if(_0x7d89x6f[_0x961e[123]][_0x961e[147]]!= null){return _0x7d89x6f[_0x961e[123]][_0x961e[147]]}}};return null};mxRectangleShape[_0x961e[0]][_0x961e[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.75,0),true), new mxConnectionConstraint( new mxPoint(0,0.25),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0,0.75),true), new mxConnectionConstraint( new mxPoint(1,0.25),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.75),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true)];mxLabel[_0x961e[0]][_0x961e[147]]= mxRectangleShape[_0x961e[0]][_0x961e[147]];mxImageShape[_0x961e[0]][_0x961e[147]]= mxRectangleShape[_0x961e[0]][_0x961e[147]];mxSwimlane[_0x961e[0]][_0x961e[147]]= mxRectangleShape[_0x961e[0]][_0x961e[147]];_0x7d89x14[_0x961e[0]][_0x961e[147]]= mxRectangleShape[_0x961e[0]][_0x961e[147]];_0x7d89x9[_0x961e[0]][_0x961e[147]]= mxRectangleShape[_0x961e[0]][_0x961e[147]];_0x7d89x10[_0x961e[0]][_0x961e[147]]= mxRectangleShape[_0x961e[0]][_0x961e[147]];_0x7d89x1[_0x961e[0]][_0x961e[147]]= mxRectangleShape[_0x961e[0]][_0x961e[147]];_0x7d89xa[_0x961e[0]][_0x961e[147]]= mxRectangleShape[_0x961e[0]][_0x961e[147]];mxCylinder[_0x961e[0]][_0x961e[147]]= [ new mxConnectionConstraint( new mxPoint(0.15,0.05),false), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.85,0.05),false), new mxConnectionConstraint( new mxPoint(0,0.3),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0,0.7),true), new mxConnectionConstraint( new mxPoint(1,0.3),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.7),true), new mxConnectionConstraint( new mxPoint(0.15,0.95),false), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.85,0.95),false)];_0x7d89x25[_0x961e[0]][_0x961e[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0.1),false), new mxConnectionConstraint( new mxPoint(0.5,0),false), new mxConnectionConstraint( new mxPoint(0.75,0.1),false), new mxConnectionConstraint( new mxPoint(0,1/ 3),false), new mxConnectionConstraint( new mxPoint(0,1),false), new mxConnectionConstraint( new mxPoint(1,1/ 3),false), new mxConnectionConstraint( new mxPoint(1,1),false), new mxConnectionConstraint( new mxPoint(0.5,0.5),false)];_0x7d89x28[_0x961e[0]][_0x961e[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.75,0),true), new mxConnectionConstraint( new mxPoint(0,0.3),true), new mxConnectionConstraint( new mxPoint(0,0.7),true), new mxConnectionConstraint( new mxPoint(1,0.25),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.75),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true)];mxActor[_0x961e[0]][_0x961e[147]]= [ new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.25,0.2),false), new mxConnectionConstraint( new mxPoint(0.1,0.5),false), new mxConnectionConstraint( new mxPoint(0,0.75),true), new mxConnectionConstraint( new mxPoint(0.75,0.25),false), new mxConnectionConstraint( new mxPoint(0.9,0.5),false), new mxConnectionConstraint( new mxPoint(1,0.75),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true)];_0x7d89x11[_0x961e[0]][_0x961e[147]]= [ new mxConnectionConstraint( new mxPoint(0,0.35),false), new mxConnectionConstraint( new mxPoint(0,0.5),false), new mxConnectionConstraint( new mxPoint(0,0.65),false), new mxConnectionConstraint( new mxPoint(1,0.35),false), new mxConnectionConstraint( new mxPoint(1,0.5),false), new mxConnectionConstraint( new mxPoint(1,0.65),false), new mxConnectionConstraint( new mxPoint(0.25,1),false), new mxConnectionConstraint( new mxPoint(0.75,0),false)];_0x7d89x13[_0x961e[0]][_0x961e[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.75,0),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true), new mxConnectionConstraint( new mxPoint(0.1,0.25),false), new mxConnectionConstraint( new mxPoint(0.2,0.5),false), new mxConnectionConstraint( new mxPoint(0.1,0.75),false), new mxConnectionConstraint( new mxPoint(0.9,0.25),false), new mxConnectionConstraint( new mxPoint(1,0.5),false), new mxConnectionConstraint( new mxPoint(0.9,0.75),false)];mxLine[_0x961e[0]][_0x961e[147]]= [ new mxConnectionConstraint( new mxPoint(0,0.5),false), new mxConnectionConstraint( new mxPoint(0.25,0.5),false), new mxConnectionConstraint( new mxPoint(0.75,0.5),false), new mxConnectionConstraint( new mxPoint(1,0.5),false)];_0x7d89x26[_0x961e[0]][_0x961e[147]]= [ new mxConnectionConstraint( new mxPoint(0.5,0),false), new mxConnectionConstraint( new mxPoint(0.5,1),false)];mxEllipse[_0x961e[0]][_0x961e[147]]= [ new mxConnectionConstraint( new mxPoint(0,0),true), new mxConnectionConstraint( new mxPoint(1,0),true), new mxConnectionConstraint( new mxPoint(0,1),true), new mxConnectionConstraint( new mxPoint(1,1),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.5))];mxDoubleEllipse[_0x961e[0]][_0x961e[147]]= mxEllipse[_0x961e[0]][_0x961e[147]];mxRhombus[_0x961e[0]][_0x961e[147]]= mxEllipse[_0x961e[0]][_0x961e[147]];mxTriangle[_0x961e[0]][_0x961e[147]]= [ new mxConnectionConstraint( new mxPoint(0,0.25),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0,0.75),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(1,0.5),true)];mxHexagon[_0x961e[0]][_0x961e[147]]= [ new mxConnectionConstraint( new mxPoint(0.375,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.625,0),true), new mxConnectionConstraint( new mxPoint(0.125,0.25),false), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0.125,0.75),false), new mxConnectionConstraint( new mxPoint(0.875,0.25),false), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(0.875,0.75),false), new mxConnectionConstraint( new mxPoint(0.375,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.625,1),true)];mxCloud[_0x961e[0]][_0x961e[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0.25),false), new mxConnectionConstraint( new mxPoint(0.4,0.1),false), new mxConnectionConstraint( new mxPoint(0.16,0.55),false), new mxConnectionConstraint( new mxPoint(0.07,0.4),false), new mxConnectionConstraint( new mxPoint(0.31,0.8),false), new mxConnectionConstraint( new mxPoint(0.13,0.77),false), new mxConnectionConstraint( new mxPoint(0.8,0.8),false), new mxConnectionConstraint( new mxPoint(0.55,0.95),false), new mxConnectionConstraint( new mxPoint(0.875,0.5),false), new mxConnectionConstraint( new mxPoint(0.96,0.7),false), new mxConnectionConstraint( new mxPoint(0.625,0.2),false), new mxConnectionConstraint( new mxPoint(0.88,0.25),false)];mxArrow[_0x961e[0]][_0x961e[147]]= null})()
\ No newline at end of file
diff --git a/public/assets/plugins/jscripty/js/Sidebar.js b/public/assets/plugins/jscripty/js/Sidebar.js
index 8b618e6..7337cb4 100644
--- a/public/assets/plugins/jscripty/js/Sidebar.js
+++ b/public/assets/plugins/jscripty/js/Sidebar.js
@@ -1,793 +1 @@
-'use strict';
-
-/**
- * Construcs a new sidebar for the given editor.
- */
-function Sidebar(editorUi, container) {
-	this.editorUi = editorUi;
-	this.container = container;
-	this.palettes = new Object();
-	this.showTooltips = true;
-	this.graph = new Graph(document.createElement('div'), null, null, this.editorUi
-		.editor.graph.getStylesheet());
-	this.graph.resetViewOnRootChange = false;
-	this.graph.foldingEnabled = false;
-	this.graph.setConnectable(false);
-	this.graph.autoScroll = false;
-	this.graph.setTooltips(false);
-	this.graph.setEnabled(false);
-
-	// Container must be in the DOM for correct HTML rendering
-	this.graph.container.style.visibility = 'hidden';
-	this.graph.container.style.position = 'absolute';
-	document.body.appendChild(this.graph.container);
-
-	if (!mxClient.IS_TOUCH) {
-		mxEvent.addListener(document, 'mouseup', mxUtils.bind(this, function() {
-			this.showTooltips = true;
-		}));
-
-		// Enables tooltips after scroll
-		mxEvent.addListener(container, 'scroll', mxUtils.bind(this, function() {
-			this.showTooltips = true;
-		}));
-
-		mxEvent.addListener(document, 'mousedown', mxUtils.bind(this, function() {
-			this.showTooltips = false;
-			this.hideTooltip();
-		}));
-
-		mxEvent.addListener(document, 'mousemove', mxUtils.bind(this, function(evt) {
-			var src = mxEvent.getSource(evt);
-
-			while (src != null) {
-				if (src == this.currentElt) {
-					return;
-				}
-
-				src = src.parentNode;
-			}
-
-			this.hideTooltip();
-		}));
-
-		// Handles mouse leaving the window
-		mxEvent.addListener(document, 'mouseout', mxUtils.bind(this, function(evt) {
-			if (evt.toElement == null && evt.relatedTarget == null) {
-				this.hideTooltip();
-			}
-		}));
-	}
-
-	this.init();
-
-	// Pre-fetches tooltip image
-	new Image().src = IMAGE_PATH + '/tooltip.png';
-};
-
-/**
- * Adds all palettes to the sidebar.
- */
-Sidebar.prototype.init = function() {
-	var dir = STENCIL_PATH;
-	console.log(dir);
-
-	// this.addImagePalette('entry', mxResources.get('application'), dir + '/',
-	// 	'_128x128.png', ['start', 'question', 'input', 'end', 'email'], [mxResources.get('start'),
-	// 		mxResources.get('question'), mxResources.get('input'), mxResources.get('end'), mxResources.get('email')
-	// 	]);
-	this.addImagePalette('entry', mxResources.get('application'), dir + '/',
-		'_128x128.png', ['start', 'question', 'input', 'end'], [mxResources.get('start'),
-			mxResources.get('question'), mxResources.get('input'), mxResources.get('end')
-		]);
-	// this.addBpmnPalette(dir, false);
-
-};
-
-/**
- * Specifies if tooltips should be visible. Default is true.
- */
-Sidebar.prototype.enableTooltips = !mxClient.IS_TOUCH;
-
-/**
- * Specifies the delay for the tooltip. Default is 16 px.
- */
-Sidebar.prototype.tooltipBorder = 16;
-
-/**
- * Specifies the delay for the tooltip. Default is 3 px.
- */
-Sidebar.prototype.thumbBorder = 3;
-
-/**
- * Specifies the delay for the tooltip. Default is 300 ms.
- */
-Sidebar.prototype.tooltipDelay = 300;
-
-/**
- * Specifies if edges should be used as templates if clicked. Default is true.
- */
-Sidebar.prototype.installEdges = true;
-
-/**
- * Specifies the URL of the gear image.
- */
-Sidebar.prototype.gearImage = STENCIL_PATH + '/clipart/Gear_128x128.png';
-
-/**
- * Specifies the width of the thumbnails.
- */
-Sidebar.prototype.thumbWidth = 34;
-
-/**
- * Specifies the height of the thumbnails.
- */
-Sidebar.prototype.thumbHeight = 34;
-
-/**
- * Specifies the padding for the thumbnails. Default is 3.
- */
-Sidebar.prototype.thumbPadding = 2;
-
-/**
- * Specifies the size of the sidebar titles.
- */
-Sidebar.prototype.sidebarTitleSize = 9;
-
-/**
- * Specifies if titles in the sidebar should be enabled.
- */
-Sidebar.prototype.sidebarTitles = false;
-
-/**
- * Specifies if titles in the tooltips should be enabled.
- */
-Sidebar.prototype.tooltipTitles = false;
-
-/**
- * Adds all palettes to the sidebar.
- */
-Sidebar.prototype.showTooltip = function(elt, cells, title, showLabel) {
-	if (this.enableTooltips && this.showTooltips) {
-		if (this.currentElt != elt) {
-			if (this.thread != null) {
-				window.clearTimeout(this.thread);
-				this.thread = null;
-			}
-
-			var show = mxUtils.bind(this, function() {
-				// Lazy creation of the DOM nodes and graph instance
-				if (this.tooltip == null) {
-					this.tooltip = document.createElement('div');
-					this.tooltip.className = 'geSidebarTooltip';
-					document.body.appendChild(this.tooltip);
-
-					this.graph2 = new Graph(this.tooltip, null, null, this.editorUi.editor.graph
-						.getStylesheet());
-					this.graph2.view.setTranslate(this.tooltipBorder, this.tooltipBorder);
-					this.graph2.resetViewOnRootChange = false;
-					this.graph2.foldingEnabled = false;
-					this.graph2.autoScroll = false;
-					this.graph2.setTooltips(false);
-					this.graph2.setConnectable(false);
-					this.graph2.setEnabled(false);
-
-					if (!mxClient.IS_SVG) {
-						this.graph2.view.canvas.style.position = 'relative';
-					}
-
-					this.tooltipImage = mxUtils.createImage(IMAGE_PATH + '/tooltip.png');
-					this.tooltipImage.style.position = 'absolute';
-					this.tooltipImage.style.width = '14px';
-					this.tooltipImage.style.height = '27px';
-
-					document.body.appendChild(this.tooltipImage);
-				}
-
-				this.tooltip.style.display = 'block';
-				this.graph2.labelsVisible = (showLabel == null || showLabel);
-				this.graph2.model.clear();
-				this.graph2.addCells(cells);
-
-				var bounds = this.graph2.getGraphBounds();
-				var width = bounds.width + 2 * this.tooltipBorder;
-				var height = bounds.height + 2 * this.tooltipBorder;
-
-				if (mxClient.IS_QUIRKS) {
-					width += 4;
-					height += 4;
-					this.tooltip.style.overflow = 'hidden';
-				} else {
-					this.tooltip.style.overflow = 'visible';
-				}
-
-				this.tooltipImage.style.visibility = 'visible';
-				this.tooltip.style.width = width + 'px';
-
-				// Adds title for entry
-				if (this.tooltipTitles && title != null && title.length > 0) {
-					if (this.tooltipTitle == null) {
-						this.tooltipTitle = document.createElement('div');
-						this.tooltipTitle.style.borderTop = '1px solid gray';
-						this.tooltipTitle.style.textAlign = 'center';
-						this.tooltipTitle.style.width = '100%';
-
-						// Oversize titles are cut-off currently. Should make tooltip wider later.
-						this.tooltipTitle.style.overflow = 'hidden';
-
-						if (mxClient.IS_SVG) {
-							this.tooltipTitle.style.paddingTop = '2px';
-						} else {
-							this.tooltipTitle.style.position = 'absolute';
-							this.tooltipTitle.style.paddingTop = '6px';
-						}
-
-						this.tooltip.appendChild(this.tooltipTitle);
-					} else {
-						this.tooltipTitle.innerHTML = '';
-					}
-
-					this.tooltipTitle.style.display = '';
-					mxUtils.write(this.tooltipTitle, title);
-
-					var dy = this.tooltipTitle.offsetHeight + 10;
-					height += dy;
-
-					if (mxClient.IS_SVG) {
-						this.tooltipTitle.style.marginTop = (-dy) + 'px';
-					} else {
-						height -= 6;
-						this.tooltipTitle.style.top = (height - dy) + 'px';
-					}
-				} else if (this.tooltipTitle != null && this.tooltipTitle.parentNode !=
-					null) {
-					this.tooltipTitle.style.display = 'none';
-				}
-
-				this.tooltip.style.height = height + 'px';
-				var x0 = -Math.min(0, bounds.x - this.tooltipBorder);
-				var y0 = -Math.min(0, bounds.y - this.tooltipBorder);
-
-				var left = this.container.clientWidth + this.editorUi.splitSize + 3;
-				var top = Math.max(0, (this.container.offsetTop + elt.offsetTop - this.container
-					.scrollTop - height / 2 + 16));
-
-				if (mxClient.IS_SVG) {
-					this.graph2.view.canvas.setAttribute('transform', 'translate(' + x0 +
-						',' + y0 + ')');
-				} else {
-					this.graph2.view.drawPane.style.left = x0 + 'px';
-					this.graph2.view.drawPane.style.top = y0 + 'px';
-				}
-
-				// Workaround for ignored position CSS style in IE9
-				// (changes to relative without the following line)
-				// Added width of the page-sidebar
-				//		left += document.getElementById('page-sidebar').offsetWidth;
-				// Added static height of the page-navbar
-				top += 90;
-
-				this.tooltip.style.position = 'absolute';
-				this.tooltip.style.left = left + 'px';
-				this.tooltip.style.top = top + 'px';
-				this.tooltipImage.style.left = (left - 13) + 'px';
-				this.tooltipImage.style.top = (top + height / 2 - 13) + 'px';
-			});
-
-			if (this.tooltip != null && this.tooltip.style.display != 'none') {
-				show();
-			} else {
-				this.thread = window.setTimeout(show, this.tooltipDelay);
-			}
-
-			this.currentElt = elt;
-		}
-	}
-};
-
-/**
- * Hides the current tooltip.
- */
-Sidebar.prototype.hideTooltip = function() {
-	if (this.thread != null) {
-		window.clearTimeout(this.thread);
-		this.thread = null;
-	}
-
-	if (this.tooltip != null) {
-		this.tooltip.style.display = 'none';
-		this.tooltipImage.style.visibility = 'hidden';
-		this.currentElt = null;
-	}
-};
-
-/**
- * Creates and returns the given title element.
- */
-Sidebar.prototype.createTitle = function(label) {
-	var elt = document.createElement('a');
-	elt.setAttribute('href', 'javascript:void(0);');
-	elt.className = 'geTitle';
-	mxUtils.write(elt, label);
-
-	return elt;
-};
-
-/**
- * Creates a thumbnail for the given cells.
- */
-Sidebar.prototype.createThumb = function(cells, width, height, parent, title,
-	showLabel) {
-	this.graph.labelsVisible = (showLabel == null || showLabel);
-	this.graph.view.scaleAndTranslate(1, 0, 0);
-	this.graph.addCells(cells);
-	var bounds = this.graph.getGraphBounds();
-	var corr = this.thumbBorder;
-	var s = Math.min((width - 2) / (bounds.width - bounds.x + corr), (height - 2) /
-		(bounds.height - bounds.y + corr));
-	var x0 = -Math.min(bounds.x, 0);
-	var y0 = -Math.min(bounds.y, 0);
-	this.graph.view.scaleAndTranslate(s, x0, y0);
-
-	bounds = this.graph.getGraphBounds();
-	var dx = Math.max(0, Math.floor((width - bounds.width - bounds.x) / 2));
-	var dy = Math.max(0, Math.floor((height - bounds.height - bounds.y) / 2));
-
-	var node = null;
-
-	// For supporting HTML labels in IE9 standards mode the container is cloned instead
-	if (this.graph.dialect == mxConstants.DIALECT_SVG && !mxClient.NO_FO) {
-		node = this.graph.view.getCanvas().ownerSVGElement.cloneNode(true);
-	}
-	// LATER: Check if deep clone can be used for quirks if container in DOM
-	else {
-		node = this.graph.container.cloneNode(false);
-		node.innerHTML = this.graph.container.innerHTML;
-	}
-
-	this.graph.getModel().clear();
-
-	// Catch-all event handling
-	if (mxClient.IS_IE6) {
-		parent.style.backgroundImage = 'url(' + this.editorUi.editor.transparentImage +
-			')';
-	}
-
-	var dd = 3;
-	node.style.position = 'relative';
-	node.style.overflow = 'hidden';
-	node.style.cursor = 'pointer';
-	node.style.left = (dx + dd) + 'px';
-	node.style.top = (dy + dd) + 'px';
-	node.style.width = width + 'px';
-	node.style.height = height + 'px';
-	node.style.visibility = '';
-	node.style.minWidth = '';
-	node.style.minHeight = '';
-
-	parent.appendChild(node);
-
-	// Adds title for sidebar entries
-	if (this.sidebarTitles && title != null) {
-		var border = (mxClient.IS_QUIRKS) ? 2 * this.thumbPadding + 2 : 0;
-		parent.style.height = (this.thumbHeight + border + this.sidebarTitleSize + 8) +
-			'px';
-
-		var div = document.createElement('div');
-		div.style.fontSize = this.sidebarTitleSize + 'px';
-		div.style.textAlign = 'center';
-		div.style.whiteSpace = 'nowrap';
-
-		if (mxClient.IS_IE) {
-			div.style.height = (this.sidebarTitleSize + 12) + 'px';
-		}
-
-		div.style.paddingTop = '4px';
-		mxUtils.write(div, title);
-		parent.appendChild(div);
-	}
-};
-
-/**
- * Creates and returns a new palette item for the given image.
- */
-Sidebar.prototype.createItem = function(cells, title, showLabel) {
-	var elt = document.createElement('a');
-	elt.setAttribute('href', 'javascript:void(0);');
-	elt.className = 'geItem';
-	elt.style.overflow = 'hidden';
-	var border = (mxClient.IS_QUIRKS) ? 8 + 2 * this.thumbPadding : 6;
-	elt.style.width = (this.thumbWidth + border) + 'px';
-	elt.style.height = (this.thumbHeight + border) + 'px';
-	elt.style.padding = this.thumbPadding + 'px';
-
-	// Blocks default click action
-	mxEvent.addListener(elt, 'click', function(evt) {
-		mxEvent.consume(evt);
-	});
-
-	this.createThumb(cells, this.thumbWidth, this.thumbHeight, elt, title,
-		showLabel);
-
-	return elt;
-};
-
-
-/**
- * Creates a drop handler for inserting the given cells.
- */
-Sidebar.prototype.createDropHandler = function(cells, allowSplit) {
-	return function(graph, evt, target, x, y) {
-		if (graph.isEnabled()) {
-			cells = graph.getImportableCells(cells);
-
-			if (cells.length > 0) {
-				var validDropTarget = (target != null) ?
-					graph.isValidDropTarget(target, cells, evt) : false;
-				var select = null;
-
-				if (target != null && !validDropTarget) {
-					target = null;
-				}
-
-				// Splits the target edge or inserts into target group
-				if (allowSplit && graph.isSplitEnabled() && graph.isSplitTarget(target,
-						cells, evt)) {
-					graph.splitEdge(target, cells, null, x, y);
-					select = cells;
-				} else if (cells.length > 0) {
-					select = graph.importCells(cells, x, y, target);
-				}
-
-				if (select != null && select.length > 0) {
-					graph.scrollCellToVisible(select[0]);
-					graph.setSelectionCells(select);
-				}
-			}
-		}
-	};
-};
-
-/**
- * Creates and returns a preview element for the given width and height.
- */
-Sidebar.prototype.createDragPreview = function(width, height) {
-	var elt = document.createElement('div');
-	elt.style.border = '1px dashed black';
-	elt.style.width = width + 'px';
-	elt.style.height = height + 'px';
-
-	return elt;
-};
-
-/**
- * Creates a drag source for the given element.
- */
-Sidebar.prototype.createDragSource = function(elt, dropHandler, preview) {
-	var dragSource = mxUtils.makeDraggable(elt, this.editorUi.editor.graph,
-		dropHandler,
-		preview, 0, 0, this.editorUi.editor.graph.autoscroll, true, true);
-
-
-
-	// Allows drop into cell only if target is a valid root
-	dragSource.getDropTarget = function(graph, x, y) {
-		var target = mxDragSource.prototype.getDropTarget.apply(this, arguments);
-		if (!graph.isValidRoot(target)) {
-			target = null;
-		}
-
-		return target;
-	};
-
-	return dragSource;
-};
-
-
-
-/**
- * Adds a handler for inserting the cell with a single click.
- */
-Sidebar.prototype.addClickHandler = function(elt, ds) {
-	var graph = this.editorUi.editor.graph;
-	var first = null;
-
-	mxEvent.addGestureListeners(elt, function(evt) {
-		first = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
-	});
-
-	var oldMouseUp = ds.mouseUp;
-	ds.mouseUp = function(evt) {
-		if (!mxEvent.isPopupTrigger(evt) && this.currentGraph == null && first !=
-			null) {
-			var tol = graph.tolerance;
-
-			if (Math.abs(first.x - mxEvent.getClientX(evt)) <= tol &&
-				Math.abs(first.y - mxEvent.getClientY(evt)) <= tol) {
-				var gs = graph.getGridSize();
-				ds.drop(graph, evt, null, gs, gs);
-			}
-		}
-
-		oldMouseUp.apply(this, arguments);
-		first = null;
-	};
-};
-
-/**
- * Giuseppe Careri
- * Create xml document vertex
- */
-Sidebar.prototype.createXmlDocument = function(element, label, variables,
-	values) {
-	var doc = mxUtils.createXmlDocument();
-	var node = doc.createElement(element)
-	node.setAttribute('label', label);
-
-	variables.forEach(function(variable, index) {
-		node.setAttribute(variable, values[index] ? values[index] : '');
-	});
-
-	return node;
-}
-
-/**
- * Giuseppe Careri
- * Creates a drop handler for inserting the given cells.
- */
-Sidebar.prototype.createVertexTemplate = function(style, width, height, value,
-	title, showLabel) {
-	var variables = [];
-	var values = [];
-
-	switch (value) {
-		case 'start':
-			variables = ['id', 'text', 'state'];
-			values = ['0', '', "OFF"];
-			break;
-		case 'end':
-			variables = ['id', 'text'];
-			values = ['0', ''];
-			break;
-		case 'question':
-			variables = ['id', 'question', 'other'];
-			values = ['0', ''];
-			break;
-		case 'input':
-			variables = ['id', 'question', 'add'];
-			values = ['0', ''];
-			break;
-			// case 'email':
-			// 	variables = ["Host", "Username", "Password", "To", "Subject", "Body"];
-			// 	values = [''];
-			// 	break;
-			// case 'sms':
-			// 	variables = ['account_id', 'to', 'sms_text'];
-			// 	values = ['0'];
-			// 	break;
-
-		default:
-			variables = [];
-			values = [];
-			break;
-	}
-
-	var node = this.createXmlDocument(value, title, variables, values);
-
-	//var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, width, height), style)];
-	var cells = [new mxCell(node, new mxGeometry(0, 0, width, height), style)];
-	cells[0].vertex = true;
-	return this.createVertexTemplateFromCells(cells, width, height, title,
-		showLabel);
-};
-
-
-
-/**
- * Creates a drop handler for inserting the given cells.
- */
-Sidebar.prototype.createVertexTemplateFromCells = function(cells, width, height,
-	title, showLabel) {
-	var elt = this.createItem(cells, title, showLabel);
-	var ds = this.createDragSource(elt, this.createDropHandler(cells, true), this
-		.createDragPreview(width, height));
-	this.addClickHandler(elt, ds);
-
-	// Uses guides for vertices only if enabled in graph
-	ds.isGuidesEnabled = mxUtils.bind(this, function() {
-		return this.editorUi.editor.graph.graphHandler.guidesEnabled;
-	});
-
-	// Shows a tooltip with the rendered cell
-	if (!touchStyle) {
-		mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt) {
-			this.showTooltip(elt, cells, title, showLabel);
-		}));
-	}
-
-	return elt;
-};
-
-/**
- * Creates a drop handler for inserting the given cells.
- */
-Sidebar.prototype.createEdgeTemplate = function(style, width, height, value,
-	title, showLabel) {
-	var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0,
-		width, height), style)];
-	cells[0].geometry.setTerminalPoint(new mxPoint(0, height), true);
-	cells[0].geometry.setTerminalPoint(new mxPoint(width, 0), false);
-	cells[0].geometry.relative = true;
-	cells[0].edge = true;
-
-	return this.createEdgeTemplateFromCells(cells, width, height, title,
-		showLabel);
-};
-
-/**
- * Creates a drop handler for inserting the given cells.
- */
-Sidebar.prototype.createEdgeTemplateFromCells = function(cells, width, height,
-	title, showLabel) {
-	var elt = this.createItem(cells, title, showLabel);
-	this.createDragSource(elt, this.createDropHandler(cells, false), this.createDragPreview(
-		width, height));
-
-	// Installs the default edge
-	var graph = this.editorUi.editor.graph;
-	mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt) {
-		if (this.installEdges) {
-			graph.setDefaultEdge(cells[0]);
-		}
-
-		// Highlights the entry for 200ms
-		elt.style.backgroundColor = '#ffffff';
-
-		window.setTimeout(function() {
-			elt.style.backgroundColor = '';
-		}, 300);
-
-		mxEvent.consume(evt);
-	}));
-
-	// Shows a tooltip with the rendered cell
-	touchStyle = false;
-	if (!touchStyle) {
-		mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt) {
-			this.showTooltip(elt, cells, title, showLabel);
-		}));
-	}
-
-	return elt;
-};
-
-/**
- * Adds the given palette.
- */
-Sidebar.prototype.addPalette = function(id, title, expanded, onInit) {
-	var elt = this.createTitle(title);
-	this.container.appendChild(elt);
-
-	var div = document.createElement('div');
-	div.className = 'geSidebar';
-
-	if (expanded) {
-		onInit(div);
-		onInit = null;
-	} else {
-		div.style.display = 'none';
-	}
-
-	this.addFoldingHandler(elt, div, onInit);
-
-	var outer = document.createElement('div');
-	outer.appendChild(div);
-	this.container.appendChild(outer);
-
-	// Keeps references to the DOM nodes
-	if (id != null) {
-		this.palettes[id] = [elt, outer];
-	}
-};
-
-/**
- * Create the given title element.
- */
-Sidebar.prototype.addFoldingHandler = function(title, content, funct) {
-	var initialized = false;
-
-	title.style.backgroundImage = (content.style.display == 'none') ?
-		'url(' + IMAGE_PATH + '/collapsed.gif)' : 'url(' + IMAGE_PATH +
-		'/expanded.gif)';
-	title.style.backgroundRepeat = 'no-repeat';
-	title.style.backgroundPosition = '100% 50%';
-
-	mxEvent.addListener(title, 'click', function(evt) {
-		if (content.style.display == 'none') {
-			if (!initialized) {
-				initialized = true;
-
-				if (funct != null) {
-					title.style.cursor = 'wait';
-					window.setTimeout(function() {
-						funct(content);
-						title.style.cursor = '';
-					}, 0);
-				}
-			}
-
-			title.style.backgroundImage = 'url(' + IMAGE_PATH + '/expanded.gif)';
-			content.style.display = 'block';
-		} else {
-			title.style.backgroundImage = 'url(' + IMAGE_PATH + '/collapsed.gif)';
-			content.style.display = 'none';
-		}
-
-		mxEvent.consume(evt);
-	});
-};
-
-/**
- * Removes the palette for the given ID.
- */
-Sidebar.prototype.removePalette = function(id) {
-	var elts = this.palettes[id];
-
-	if (elts != null) {
-		this.palettes[id] = null;
-
-		for (var i = 0; i < elts.length; i++) {
-			this.container.removeChild(elts[i]);
-		}
-
-		return true;
-	}
-
-	return false;
-};
-
-/**
- * Adds the given image palette.
- */
-Sidebar.prototype.addImagePalette = function(id, title, prefix, postfix, items,
-	titles) {
-	// Giuseppe Careri
-	// Expanded Sidebar only entry
-	this.addPalette(id, title, (id === 'entry'), mxUtils.bind(this, function(
-		content) {
-		var showTitles = titles != null;
-
-		for (var i = 0; i < items.length; i++) {
-			var icon = prefix + items[i] + postfix;
-			content.appendChild(this.createVertexTemplate('image;image=' + icon, 80,
-				80, items[i], (showTitles) ? titles[i] : null, showTitles));
-		}
-	}));
-};
-// ***********modified***************
-// Sidebar.prototype.addBpmnPalette = function(dir, expand) {
-// 	//Abigael Dawit
-//
-// 	var fns = [
-// 		this.createVertexTemplate(
-// 			'text;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;',
-// 			40, 20, 'Text', 'Text', null),
-// 		//this.createVertexTemplate('shape=ext;rounded=1;whiteSpace=wrap;dashed=1;dashPattern=1 4;', 120, 80, 'Event\nSub-Process', 'Event Sub-Process', null),
-// 		this.createVertexTemplate('shape=swimlane;whiteSpace=wrap;startSize=60;',
-// 			120, 160, 'Container', 'Container', null),
-// 		//	this.createVertexTemplate('shape=ellipse;', 120, 160, 'Ellips', 'Ellipse', null)
-// 		this.createVertexTemplate(
-// 			'shape=swimlane;html=1;horizontal=0;swimlaneFillColor=white;swimlaneLine=0;fillColor=none;rounded=1;verticalAlign=middle',
-// 			300, 120, 'Lane', 'Lane', null)
-//
-// 	]
-//
-// 	this.addPalette('utility', 'Utility ', false, mxUtils.bind(this, function(
-// 		content) {
-// 		//var showTitles = titles != null;
-// 		for (var i = 0; i < fns.length; i++) {
-// 			content.appendChild(fns[i]);
-// 		}
-// 	}));
-//
-// };
+var _0x30a6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x64\x69\x74\x6F\x72\x55\x69","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x70\x61\x6C\x65\x74\x74\x65\x73","\x73\x68\x6F\x77\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x67\x72\x61\x70\x68","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x74\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x65\x64\x69\x74\x6F\x72","\x72\x65\x73\x65\x74\x56\x69\x65\x77\x4F\x6E\x52\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x61\x75\x74\x6F\x53\x63\x72\x6F\x6C\x6C","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x76\x69\x73\x69\x62\x69\x6C\x69\x74\x79","\x73\x74\x79\x6C\x65","\x68\x69\x64\x64\x65\x6E","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x62\x6F\x64\x79","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x6D\x6F\x75\x73\x65\x75\x70","\x62\x69\x6E\x64","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x73\x63\x72\x6F\x6C\x6C","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x68\x69\x64\x65\x54\x6F\x6F\x6C\x74\x69\x70","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x67\x65\x74\x53\x6F\x75\x72\x63\x65","\x63\x75\x72\x72\x65\x6E\x74\x45\x6C\x74","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x6D\x6F\x75\x73\x65\x6F\x75\x74","\x74\x6F\x45\x6C\x65\x6D\x65\x6E\x74","\x72\x65\x6C\x61\x74\x65\x64\x54\x61\x72\x67\x65\x74","\x69\x6E\x69\x74","\x73\x72\x63","\x2F\x74\x6F\x6F\x6C\x74\x69\x70\x2E\x70\x6E\x67","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6C\x6F\x67","\x65\x6E\x74\x72\x79","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x67\x65\x74","\x2F","\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67","\x73\x74\x61\x72\x74","\x71\x75\x65\x73\x74\x69\x6F\x6E","\x69\x6E\x70\x75\x74","\x65\x6E\x64","\x61\x64\x64\x49\x6D\x61\x67\x65\x50\x61\x6C\x65\x74\x74\x65","\x65\x6E\x61\x62\x6C\x65\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x42\x6F\x72\x64\x65\x72","\x74\x68\x75\x6D\x62\x42\x6F\x72\x64\x65\x72","\x74\x6F\x6F\x6C\x74\x69\x70\x44\x65\x6C\x61\x79","\x69\x6E\x73\x74\x61\x6C\x6C\x45\x64\x67\x65\x73","\x67\x65\x61\x72\x49\x6D\x61\x67\x65","\x2F\x63\x6C\x69\x70\x61\x72\x74\x2F\x47\x65\x61\x72\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67","\x74\x68\x75\x6D\x62\x57\x69\x64\x74\x68","\x74\x68\x75\x6D\x62\x48\x65\x69\x67\x68\x74","\x74\x68\x75\x6D\x62\x50\x61\x64\x64\x69\x6E\x67","\x73\x69\x64\x65\x62\x61\x72\x54\x69\x74\x6C\x65\x53\x69\x7A\x65","\x73\x69\x64\x65\x62\x61\x72\x54\x69\x74\x6C\x65\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x54\x69\x74\x6C\x65\x73","\x73\x68\x6F\x77\x54\x6F\x6F\x6C\x74\x69\x70","\x74\x68\x72\x65\x61\x64","\x63\x6C\x65\x61\x72\x54\x69\x6D\x65\x6F\x75\x74","\x74\x6F\x6F\x6C\x74\x69\x70","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x53\x69\x64\x65\x62\x61\x72\x54\x6F\x6F\x6C\x74\x69\x70","\x67\x72\x61\x70\x68\x32","\x73\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x76\x69\x65\x77","\x49\x53\x5F\x53\x56\x47","\x63\x61\x6E\x76\x61\x73","\x72\x65\x6C\x61\x74\x69\x76\x65","\x74\x6F\x6F\x6C\x74\x69\x70\x49\x6D\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x49\x6D\x61\x67\x65","\x77\x69\x64\x74\x68","\x31\x34\x70\x78","\x68\x65\x69\x67\x68\x74","\x32\x37\x70\x78","\x64\x69\x73\x70\x6C\x61\x79","\x62\x6C\x6F\x63\x6B","\x6C\x61\x62\x65\x6C\x73\x56\x69\x73\x69\x62\x6C\x65","\x63\x6C\x65\x61\x72","\x6D\x6F\x64\x65\x6C","\x61\x64\x64\x43\x65\x6C\x6C\x73","\x67\x65\x74\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x76\x69\x73\x69\x62\x6C\x65","\x70\x78","\x6C\x65\x6E\x67\x74\x68","\x74\x6F\x6F\x6C\x74\x69\x70\x54\x69\x74\x6C\x65","\x62\x6F\x72\x64\x65\x72\x54\x6F\x70","\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x67\x72\x61\x79","\x74\x65\x78\x74\x41\x6C\x69\x67\x6E","\x63\x65\x6E\x74\x65\x72","\x31\x30\x30\x25","\x70\x61\x64\x64\x69\x6E\x67\x54\x6F\x70","\x32\x70\x78","\x36\x70\x78","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","","\x77\x72\x69\x74\x65","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x6D\x61\x72\x67\x69\x6E\x54\x6F\x70","\x74\x6F\x70","\x6E\x6F\x6E\x65","\x78","\x6D\x69\x6E","\x79","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x73\x70\x6C\x69\x74\x53\x69\x7A\x65","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x6D\x61\x78","\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x28","\x2C","\x29","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x6C\x65\x66\x74","\x64\x72\x61\x77\x50\x61\x6E\x65","\x73\x65\x74\x54\x69\x6D\x65\x6F\x75\x74","\x63\x72\x65\x61\x74\x65\x54\x69\x74\x6C\x65","\x61","\x68\x72\x65\x66","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B","\x67\x65\x54\x69\x74\x6C\x65","\x63\x72\x65\x61\x74\x65\x54\x68\x75\x6D\x62","\x73\x63\x61\x6C\x65\x41\x6E\x64\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x66\x6C\x6F\x6F\x72","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x4E\x4F\x5F\x46\x4F","\x63\x6C\x6F\x6E\x65\x4E\x6F\x64\x65","\x6F\x77\x6E\x65\x72\x53\x56\x47\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x74\x43\x61\x6E\x76\x61\x73","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x49\x53\x5F\x49\x45\x36","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x49\x6D\x61\x67\x65","\x63\x75\x72\x73\x6F\x72","\x70\x6F\x69\x6E\x74\x65\x72","\x6D\x69\x6E\x57\x69\x64\x74\x68","\x6D\x69\x6E\x48\x65\x69\x67\x68\x74","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x6E\x6F\x77\x72\x61\x70","\x49\x53\x5F\x49\x45","\x34\x70\x78","\x63\x72\x65\x61\x74\x65\x49\x74\x65\x6D","\x67\x65\x49\x74\x65\x6D","\x70\x61\x64\x64\x69\x6E\x67","\x63\x6C\x69\x63\x6B","\x63\x6F\x6E\x73\x75\x6D\x65","\x63\x72\x65\x61\x74\x65\x44\x72\x6F\x70\x48\x61\x6E\x64\x6C\x65\x72","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x49\x6D\x70\x6F\x72\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x69\x73\x56\x61\x6C\x69\x64\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x69\x73\x53\x70\x6C\x69\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x70\x6C\x69\x74\x54\x61\x72\x67\x65\x74","\x73\x70\x6C\x69\x74\x45\x64\x67\x65","\x69\x6D\x70\x6F\x72\x74\x43\x65\x6C\x6C\x73","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x63\x72\x65\x61\x74\x65\x44\x72\x61\x67\x50\x72\x65\x76\x69\x65\x77","\x62\x6F\x72\x64\x65\x72","\x31\x70\x78\x20\x64\x61\x73\x68\x65\x64\x20\x62\x6C\x61\x63\x6B","\x63\x72\x65\x61\x74\x65\x44\x72\x61\x67\x53\x6F\x75\x72\x63\x65","\x61\x75\x74\x6F\x73\x63\x72\x6F\x6C\x6C","\x6D\x61\x6B\x65\x44\x72\x61\x67\x67\x61\x62\x6C\x65","\x67\x65\x74\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x61\x70\x70\x6C\x79","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x61\x64\x64\x43\x6C\x69\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x6D\x6F\x75\x73\x65\x55\x70","\x69\x73\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x63\x75\x72\x72\x65\x6E\x74\x47\x72\x61\x70\x68","\x74\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x61\x62\x73","\x67\x65\x74\x47\x72\x69\x64\x53\x69\x7A\x65","\x64\x72\x6F\x70","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x6C\x61\x62\x65\x6C","\x66\x6F\x72\x45\x61\x63\x68","\x63\x72\x65\x61\x74\x65\x56\x65\x72\x74\x65\x78\x54\x65\x6D\x70\x6C\x61\x74\x65","\x69\x64","\x74\x65\x78\x74","\x73\x74\x61\x74\x65","\x30","\x4F\x46\x46","\x6F\x74\x68\x65\x72","\x61\x64\x64","\x76\x65\x72\x74\x65\x78","\x63\x72\x65\x61\x74\x65\x56\x65\x72\x74\x65\x78\x54\x65\x6D\x70\x6C\x61\x74\x65\x46\x72\x6F\x6D\x43\x65\x6C\x6C\x73","\x69\x73\x47\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x54\x65\x6D\x70\x6C\x61\x74\x65","\x73\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x67\x65\x6F\x6D\x65\x74\x72\x79","\x65\x64\x67\x65","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x46\x72\x6F\x6D\x43\x65\x6C\x6C\x73","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x23\x66\x66\x66\x66\x66\x66","\x61\x64\x64\x50\x61\x6C\x65\x74\x74\x65","\x67\x65\x53\x69\x64\x65\x62\x61\x72","\x61\x64\x64\x46\x6F\x6C\x64\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x2F\x63\x6F\x6C\x6C\x61\x70\x73\x65\x64\x2E\x67\x69\x66\x29","\x2F\x65\x78\x70\x61\x6E\x64\x65\x64\x2E\x67\x69\x66\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x70\x65\x61\x74","\x6E\x6F\x2D\x72\x65\x70\x65\x61\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x31\x30\x30\x25\x20\x35\x30\x25","\x77\x61\x69\x74","\x72\x65\x6D\x6F\x76\x65\x50\x61\x6C\x65\x74\x74\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D"];_0x30a6[0];function Sidebar(_0x968cx2,_0x968cx3){this[_0x30a6[1]]= _0x968cx2;this[_0x30a6[2]]= _0x968cx3;this[_0x30a6[3]]=  new Object();this[_0x30a6[4]]= true;this[_0x30a6[5]]=  new Graph(document[_0x30a6[7]](_0x30a6[6]),null,null,this[_0x30a6[1]][_0x30a6[9]][_0x30a6[5]][_0x30a6[8]]());this[_0x30a6[5]][_0x30a6[10]]= false;this[_0x30a6[5]][_0x30a6[11]]= false;this[_0x30a6[5]][_0x30a6[12]](false);this[_0x30a6[5]][_0x30a6[13]]= false;this[_0x30a6[5]][_0x30a6[14]](false);this[_0x30a6[5]][_0x30a6[15]](false);this[_0x30a6[5]][_0x30a6[2]][_0x30a6[17]][_0x30a6[16]]= _0x30a6[18];this[_0x30a6[5]][_0x30a6[2]][_0x30a6[17]][_0x30a6[19]]= _0x30a6[20];document[_0x30a6[22]][_0x30a6[21]](this[_0x30a6[5]][_0x30a6[2]]);if(!mxClient[_0x30a6[23]]){mxEvent[_0x30a6[26]](document,_0x30a6[24],mxUtils[_0x30a6[25]](this,function(){this[_0x30a6[4]]= true}));mxEvent[_0x30a6[26]](_0x968cx3,_0x30a6[27],mxUtils[_0x30a6[25]](this,function(){this[_0x30a6[4]]= true}));mxEvent[_0x30a6[26]](document,_0x30a6[28],mxUtils[_0x30a6[25]](this,function(){this[_0x30a6[4]]= false;this[_0x30a6[29]]()}));mxEvent[_0x30a6[26]](document,_0x30a6[30],mxUtils[_0x30a6[25]](this,function(_0x968cx4){var _0x968cx5=mxEvent[_0x30a6[31]](_0x968cx4);while(_0x968cx5!= null){if(_0x968cx5== this[_0x30a6[32]]){return};_0x968cx5= _0x968cx5[_0x30a6[33]]};this[_0x30a6[29]]()}));mxEvent[_0x30a6[26]](document,_0x30a6[34],mxUtils[_0x30a6[25]](this,function(_0x968cx4){if(_0x968cx4[_0x30a6[35]]== null&& _0x968cx4[_0x30a6[36]]== null){this[_0x30a6[29]]()}}))};this[_0x30a6[37]](); new Image()[_0x30a6[38]]= IMAGE_PATH+ _0x30a6[39]}Sidebar[_0x30a6[40]][_0x30a6[37]]= function(){var _0x968cx6=STENCIL_PATH;console[_0x30a6[41]](_0x968cx6);this[_0x30a6[51]](_0x30a6[42],mxResources[_0x30a6[44]](_0x30a6[43]),_0x968cx6+ _0x30a6[45],_0x30a6[46],[_0x30a6[47],_0x30a6[48],_0x30a6[49],_0x30a6[50]],[mxResources[_0x30a6[44]](_0x30a6[47]),mxResources[_0x30a6[44]](_0x30a6[48]),mxResources[_0x30a6[44]](_0x30a6[49]),mxResources[_0x30a6[44]](_0x30a6[50])])};Sidebar[_0x30a6[40]][_0x30a6[52]]= !mxClient[_0x30a6[23]];Sidebar[_0x30a6[40]][_0x30a6[53]]= 16;Sidebar[_0x30a6[40]][_0x30a6[54]]= 3;Sidebar[_0x30a6[40]][_0x30a6[55]]= 300;Sidebar[_0x30a6[40]][_0x30a6[56]]= true;Sidebar[_0x30a6[40]][_0x30a6[57]]= STENCIL_PATH+ _0x30a6[58];Sidebar[_0x30a6[40]][_0x30a6[59]]= 34;Sidebar[_0x30a6[40]][_0x30a6[60]]= 34;Sidebar[_0x30a6[40]][_0x30a6[61]]= 2;Sidebar[_0x30a6[40]][_0x30a6[62]]= 9;Sidebar[_0x30a6[40]][_0x30a6[63]]= false;Sidebar[_0x30a6[40]][_0x30a6[64]]= false;Sidebar[_0x30a6[40]][_0x30a6[65]]= function(_0x968cx7,_0x968cx8,_0x968cx9,_0x968cxa){if(this[_0x30a6[52]]&& this[_0x30a6[4]]){if(this[_0x30a6[32]]!= _0x968cx7){if(this[_0x30a6[66]]!= null){window[_0x30a6[67]](this[_0x30a6[66]]);this[_0x30a6[66]]= null};var _0x968cxb=mxUtils[_0x30a6[25]](this,function(){if(this[_0x30a6[68]]== null){this[_0x30a6[68]]= document[_0x30a6[7]](_0x30a6[6]);this[_0x30a6[68]][_0x30a6[69]]= _0x30a6[70];document[_0x30a6[22]][_0x30a6[21]](this[_0x30a6[68]]);this[_0x30a6[71]]=  new Graph(this[_0x30a6[68]],null,null,this[_0x30a6[1]][_0x30a6[9]][_0x30a6[5]][_0x30a6[8]]());this[_0x30a6[71]][_0x30a6[73]][_0x30a6[72]](this[_0x30a6[53]],this[_0x30a6[53]]);this[_0x30a6[71]][_0x30a6[10]]= false;this[_0x30a6[71]][_0x30a6[11]]= false;this[_0x30a6[71]][_0x30a6[13]]= false;this[_0x30a6[71]][_0x30a6[14]](false);this[_0x30a6[71]][_0x30a6[12]](false);this[_0x30a6[71]][_0x30a6[15]](false);if(!mxClient[_0x30a6[74]]){this[_0x30a6[71]][_0x30a6[73]][_0x30a6[75]][_0x30a6[17]][_0x30a6[19]]= _0x30a6[76]};this[_0x30a6[77]]= mxUtils[_0x30a6[78]](IMAGE_PATH+ _0x30a6[39]);this[_0x30a6[77]][_0x30a6[17]][_0x30a6[19]]= _0x30a6[20];this[_0x30a6[77]][_0x30a6[17]][_0x30a6[79]]= _0x30a6[80];this[_0x30a6[77]][_0x30a6[17]][_0x30a6[81]]= _0x30a6[82];document[_0x30a6[22]][_0x30a6[21]](this[_0x30a6[77]])};this[_0x30a6[68]][_0x30a6[17]][_0x30a6[83]]= _0x30a6[84];this[_0x30a6[71]][_0x30a6[85]]= (_0x968cxa== null|| _0x968cxa);this[_0x30a6[71]][_0x30a6[87]][_0x30a6[86]]();this[_0x30a6[71]][_0x30a6[88]](_0x968cx8);var _0x968cxc=this[_0x30a6[71]][_0x30a6[89]]();var _0x968cxd=_0x968cxc[_0x30a6[79]]+ 2* this[_0x30a6[53]];var _0x968cxe=_0x968cxc[_0x30a6[81]]+ 2* this[_0x30a6[53]];if(mxClient[_0x30a6[90]]){_0x968cxd+= 4;_0x968cxe+= 4;this[_0x30a6[68]][_0x30a6[17]][_0x30a6[91]]= _0x30a6[18]}else {this[_0x30a6[68]][_0x30a6[17]][_0x30a6[91]]= _0x30a6[92]};this[_0x30a6[77]][_0x30a6[17]][_0x30a6[16]]= _0x30a6[92];this[_0x30a6[68]][_0x30a6[17]][_0x30a6[79]]= _0x968cxd+ _0x30a6[93];if(this[_0x30a6[64]]&& _0x968cx9!= null&& _0x968cx9[_0x30a6[94]]> 0){if(this[_0x30a6[95]]== null){this[_0x30a6[95]]= document[_0x30a6[7]](_0x30a6[6]);this[_0x30a6[95]][_0x30a6[17]][_0x30a6[96]]= _0x30a6[97];this[_0x30a6[95]][_0x30a6[17]][_0x30a6[98]]= _0x30a6[99];this[_0x30a6[95]][_0x30a6[17]][_0x30a6[79]]= _0x30a6[100];this[_0x30a6[95]][_0x30a6[17]][_0x30a6[91]]= _0x30a6[18];if(mxClient[_0x30a6[74]]){this[_0x30a6[95]][_0x30a6[17]][_0x30a6[101]]= _0x30a6[102]}else {this[_0x30a6[95]][_0x30a6[17]][_0x30a6[19]]= _0x30a6[20];this[_0x30a6[95]][_0x30a6[17]][_0x30a6[101]]= _0x30a6[103]};this[_0x30a6[68]][_0x30a6[21]](this[_0x30a6[95]])}else {this[_0x30a6[95]][_0x30a6[104]]= _0x30a6[105]};this[_0x30a6[95]][_0x30a6[17]][_0x30a6[83]]= _0x30a6[105];mxUtils[_0x30a6[106]](this[_0x30a6[95]],_0x968cx9);var _0x968cxf=this[_0x30a6[95]][_0x30a6[107]]+ 10;_0x968cxe+= _0x968cxf;if(mxClient[_0x30a6[74]]){this[_0x30a6[95]][_0x30a6[17]][_0x30a6[108]]= (-_0x968cxf) + _0x30a6[93]}else {_0x968cxe-= 6;this[_0x30a6[95]][_0x30a6[17]][_0x30a6[109]]= (_0x968cxe- _0x968cxf)+ _0x30a6[93]}}else {if(this[_0x30a6[95]]!= null&& this[_0x30a6[95]][_0x30a6[33]]!= null){this[_0x30a6[95]][_0x30a6[17]][_0x30a6[83]]= _0x30a6[110]}};this[_0x30a6[68]][_0x30a6[17]][_0x30a6[81]]= _0x968cxe+ _0x30a6[93];var _0x968cx10=-Math[_0x30a6[112]](0,_0x968cxc[_0x30a6[111]]- this[_0x30a6[53]]);var _0x968cx11=-Math[_0x30a6[112]](0,_0x968cxc[_0x30a6[113]]- this[_0x30a6[53]]);var _0x968cx12=this[_0x30a6[2]][_0x30a6[114]]+ this[_0x30a6[1]][_0x30a6[115]]+ 3;var _0x968cx13=Math[_0x30a6[118]](0,(this[_0x30a6[2]][_0x30a6[116]]+ _0x968cx7[_0x30a6[116]]- this[_0x30a6[2]][_0x30a6[117]]- _0x968cxe/ 2+ 16));if(mxClient[_0x30a6[74]]){this[_0x30a6[71]][_0x30a6[73]][_0x30a6[75]][_0x30a6[123]](_0x30a6[119],_0x30a6[120]+ _0x968cx10+ _0x30a6[121]+ _0x968cx11+ _0x30a6[122])}else {this[_0x30a6[71]][_0x30a6[73]][_0x30a6[125]][_0x30a6[17]][_0x30a6[124]]= _0x968cx10+ _0x30a6[93];this[_0x30a6[71]][_0x30a6[73]][_0x30a6[125]][_0x30a6[17]][_0x30a6[109]]= _0x968cx11+ _0x30a6[93]};_0x968cx13+= 90;this[_0x30a6[68]][_0x30a6[17]][_0x30a6[19]]= _0x30a6[20];this[_0x30a6[68]][_0x30a6[17]][_0x30a6[124]]= _0x968cx12+ _0x30a6[93];this[_0x30a6[68]][_0x30a6[17]][_0x30a6[109]]= _0x968cx13+ _0x30a6[93];this[_0x30a6[77]][_0x30a6[17]][_0x30a6[124]]= (_0x968cx12- 13)+ _0x30a6[93];this[_0x30a6[77]][_0x30a6[17]][_0x30a6[109]]= (_0x968cx13+ _0x968cxe/ 2- 13)+ _0x30a6[93]});if(this[_0x30a6[68]]!= null&& this[_0x30a6[68]][_0x30a6[17]][_0x30a6[83]]!= _0x30a6[110]){_0x968cxb()}else {this[_0x30a6[66]]= window[_0x30a6[126]](_0x968cxb,this[_0x30a6[55]])};this[_0x30a6[32]]= _0x968cx7}}};Sidebar[_0x30a6[40]][_0x30a6[29]]= function(){if(this[_0x30a6[66]]!= null){window[_0x30a6[67]](this[_0x30a6[66]]);this[_0x30a6[66]]= null};if(this[_0x30a6[68]]!= null){this[_0x30a6[68]][_0x30a6[17]][_0x30a6[83]]= _0x30a6[110];this[_0x30a6[77]][_0x30a6[17]][_0x30a6[16]]= _0x30a6[18];this[_0x30a6[32]]= null}};Sidebar[_0x30a6[40]][_0x30a6[127]]= function(_0x968cx14){var _0x968cx7=document[_0x30a6[7]](_0x30a6[128]);_0x968cx7[_0x30a6[123]](_0x30a6[129],_0x30a6[130]);_0x968cx7[_0x30a6[69]]= _0x30a6[131];mxUtils[_0x30a6[106]](_0x968cx7,_0x968cx14);return _0x968cx7};Sidebar[_0x30a6[40]][_0x30a6[132]]= function(_0x968cx8,_0x968cxd,_0x968cxe,_0x968cx15,_0x968cx9,_0x968cxa){this[_0x30a6[5]][_0x30a6[85]]= (_0x968cxa== null|| _0x968cxa);this[_0x30a6[5]][_0x30a6[73]][_0x30a6[133]](1,0,0);this[_0x30a6[5]][_0x30a6[88]](_0x968cx8);var _0x968cxc=this[_0x30a6[5]][_0x30a6[89]]();var _0x968cx16=this[_0x30a6[54]];var _0x968cx17=Math[_0x30a6[112]]((_0x968cxd- 2)/ (_0x968cxc[_0x30a6[79]]- _0x968cxc[_0x30a6[111]]+ _0x968cx16),(_0x968cxe- 2)/ (_0x968cxc[_0x30a6[81]]- _0x968cxc[_0x30a6[113]]+ _0x968cx16));var _0x968cx10=-Math[_0x30a6[112]](_0x968cxc[_0x30a6[111]],0);var _0x968cx11=-Math[_0x30a6[112]](_0x968cxc[_0x30a6[113]],0);this[_0x30a6[5]][_0x30a6[73]][_0x30a6[133]](_0x968cx17,_0x968cx10,_0x968cx11);_0x968cxc= this[_0x30a6[5]][_0x30a6[89]]();var _0x968cx18=Math[_0x30a6[118]](0,Math[_0x30a6[134]]((_0x968cxd- _0x968cxc[_0x30a6[79]]- _0x968cxc[_0x30a6[111]])/ 2));var _0x968cxf=Math[_0x30a6[118]](0,Math[_0x30a6[134]]((_0x968cxe- _0x968cxc[_0x30a6[81]]- _0x968cxc[_0x30a6[113]])/ 2));var _0x968cx19=null;if(this[_0x30a6[5]][_0x30a6[135]]== mxConstants[_0x30a6[136]]&& !mxClient[_0x30a6[137]]){_0x968cx19= this[_0x30a6[5]][_0x30a6[73]][_0x30a6[140]]()[_0x30a6[139]][_0x30a6[138]](true)}else {_0x968cx19= this[_0x30a6[5]][_0x30a6[2]][_0x30a6[138]](false);_0x968cx19[_0x30a6[104]]= this[_0x30a6[5]][_0x30a6[2]][_0x30a6[104]]};this[_0x30a6[5]][_0x30a6[141]]()[_0x30a6[86]]();if(mxClient[_0x30a6[142]]){_0x968cx15[_0x30a6[17]][_0x30a6[143]]= _0x30a6[144]+ this[_0x30a6[1]][_0x30a6[9]][_0x30a6[145]]+ _0x30a6[122]};var _0x968cx1a=3;_0x968cx19[_0x30a6[17]][_0x30a6[19]]= _0x30a6[76];_0x968cx19[_0x30a6[17]][_0x30a6[91]]= _0x30a6[18];_0x968cx19[_0x30a6[17]][_0x30a6[146]]= _0x30a6[147];_0x968cx19[_0x30a6[17]][_0x30a6[124]]= (_0x968cx18+ _0x968cx1a)+ _0x30a6[93];_0x968cx19[_0x30a6[17]][_0x30a6[109]]= (_0x968cxf+ _0x968cx1a)+ _0x30a6[93];_0x968cx19[_0x30a6[17]][_0x30a6[79]]= _0x968cxd+ _0x30a6[93];_0x968cx19[_0x30a6[17]][_0x30a6[81]]= _0x968cxe+ _0x30a6[93];_0x968cx19[_0x30a6[17]][_0x30a6[16]]= _0x30a6[105];_0x968cx19[_0x30a6[17]][_0x30a6[148]]= _0x30a6[105];_0x968cx19[_0x30a6[17]][_0x30a6[149]]= _0x30a6[105];_0x968cx15[_0x30a6[21]](_0x968cx19);if(this[_0x30a6[63]]&& _0x968cx9!= null){var _0x968cx1b=(mxClient[_0x30a6[90]])?2* this[_0x30a6[61]]+ 2:0;_0x968cx15[_0x30a6[17]][_0x30a6[81]]= (this[_0x30a6[60]]+ _0x968cx1b+ this[_0x30a6[62]]+ 8)+ _0x30a6[93];var _0x968cx1c=document[_0x30a6[7]](_0x30a6[6]);_0x968cx1c[_0x30a6[17]][_0x30a6[150]]= this[_0x30a6[62]]+ _0x30a6[93];_0x968cx1c[_0x30a6[17]][_0x30a6[98]]= _0x30a6[99];_0x968cx1c[_0x30a6[17]][_0x30a6[151]]= _0x30a6[152];if(mxClient[_0x30a6[153]]){_0x968cx1c[_0x30a6[17]][_0x30a6[81]]= (this[_0x30a6[62]]+ 12)+ _0x30a6[93]};_0x968cx1c[_0x30a6[17]][_0x30a6[101]]= _0x30a6[154];mxUtils[_0x30a6[106]](_0x968cx1c,_0x968cx9);_0x968cx15[_0x30a6[21]](_0x968cx1c)}};Sidebar[_0x30a6[40]][_0x30a6[155]]= function(_0x968cx8,_0x968cx9,_0x968cxa){var _0x968cx7=document[_0x30a6[7]](_0x30a6[128]);_0x968cx7[_0x30a6[123]](_0x30a6[129],_0x30a6[130]);_0x968cx7[_0x30a6[69]]= _0x30a6[156];_0x968cx7[_0x30a6[17]][_0x30a6[91]]= _0x30a6[18];var _0x968cx1b=(mxClient[_0x30a6[90]])?8+ 2* this[_0x30a6[61]]:6;_0x968cx7[_0x30a6[17]][_0x30a6[79]]= (this[_0x30a6[59]]+ _0x968cx1b)+ _0x30a6[93];_0x968cx7[_0x30a6[17]][_0x30a6[81]]= (this[_0x30a6[60]]+ _0x968cx1b)+ _0x30a6[93];_0x968cx7[_0x30a6[17]][_0x30a6[157]]= this[_0x30a6[61]]+ _0x30a6[93];mxEvent[_0x30a6[26]](_0x968cx7,_0x30a6[158],function(_0x968cx4){mxEvent[_0x30a6[159]](_0x968cx4)});this[_0x30a6[132]](_0x968cx8,this[_0x30a6[59]],this[_0x30a6[60]],_0x968cx7,_0x968cx9,_0x968cxa);return _0x968cx7};Sidebar[_0x30a6[40]][_0x30a6[160]]= function(_0x968cx8,_0x968cx1d){return function(_0x968cx1e,_0x968cx4,_0x968cx1f,_0x968cx20,_0x968cx21){if(_0x968cx1e[_0x30a6[161]]()){_0x968cx8= _0x968cx1e[_0x30a6[162]](_0x968cx8);if(_0x968cx8[_0x30a6[94]]> 0){var _0x968cx22=(_0x968cx1f!= null)?_0x968cx1e[_0x30a6[163]](_0x968cx1f,_0x968cx8,_0x968cx4):false;var _0x968cx23=null;if(_0x968cx1f!= null&&  !_0x968cx22){_0x968cx1f= null};if(_0x968cx1d&& _0x968cx1e[_0x30a6[164]]()&& _0x968cx1e[_0x30a6[165]](_0x968cx1f,_0x968cx8,_0x968cx4)){_0x968cx1e[_0x30a6[166]](_0x968cx1f,_0x968cx8,null,_0x968cx20,_0x968cx21);_0x968cx23= _0x968cx8}else {if(_0x968cx8[_0x30a6[94]]> 0){_0x968cx23= _0x968cx1e[_0x30a6[167]](_0x968cx8,_0x968cx20,_0x968cx21,_0x968cx1f)}};if(_0x968cx23!= null&& _0x968cx23[_0x30a6[94]]> 0){_0x968cx1e[_0x30a6[168]](_0x968cx23[0]);_0x968cx1e[_0x30a6[169]](_0x968cx23)}}}}};Sidebar[_0x30a6[40]][_0x30a6[170]]= function(_0x968cxd,_0x968cxe){var _0x968cx7=document[_0x30a6[7]](_0x30a6[6]);_0x968cx7[_0x30a6[17]][_0x30a6[171]]= _0x30a6[172];_0x968cx7[_0x30a6[17]][_0x30a6[79]]= _0x968cxd+ _0x30a6[93];_0x968cx7[_0x30a6[17]][_0x30a6[81]]= _0x968cxe+ _0x30a6[93];return _0x968cx7};Sidebar[_0x30a6[40]][_0x30a6[173]]= function(_0x968cx7,_0x968cx24,_0x968cx25){var _0x968cx26=mxUtils[_0x30a6[175]](_0x968cx7,this[_0x30a6[1]][_0x30a6[9]][_0x30a6[5]],_0x968cx24,_0x968cx25,0,0,this[_0x30a6[1]][_0x30a6[9]][_0x30a6[5]][_0x30a6[174]],true,true);_0x968cx26[_0x30a6[176]]= function(_0x968cx1e,_0x968cx20,_0x968cx21){var _0x968cx1f=mxDragSource[_0x30a6[40]][_0x30a6[176]][_0x30a6[177]](this,arguments);if(!_0x968cx1e[_0x30a6[178]](_0x968cx1f)){_0x968cx1f= null};return _0x968cx1f};return _0x968cx26};Sidebar[_0x30a6[40]][_0x30a6[179]]= function(_0x968cx7,_0x968cx27){var _0x968cx1e=this[_0x30a6[1]][_0x30a6[9]][_0x30a6[5]];var _0x968cx28=null;mxEvent[_0x30a6[182]](_0x968cx7,function(_0x968cx4){_0x968cx28=  new mxPoint(mxEvent[_0x30a6[180]](_0x968cx4),mxEvent[_0x30a6[181]](_0x968cx4))});var _0x968cx29=_0x968cx27[_0x30a6[183]];_0x968cx27[_0x30a6[183]]= function(_0x968cx4){if(!mxEvent[_0x30a6[184]](_0x968cx4)&& this[_0x30a6[185]]== null&& _0x968cx28!= null){var _0x968cx2a=_0x968cx1e[_0x30a6[186]];if(Math[_0x30a6[187]](_0x968cx28[_0x30a6[111]]- mxEvent[_0x30a6[180]](_0x968cx4))<= _0x968cx2a&& Math[_0x30a6[187]](_0x968cx28[_0x30a6[113]]- mxEvent[_0x30a6[181]](_0x968cx4))<= _0x968cx2a){var _0x968cx2b=_0x968cx1e[_0x30a6[188]]();_0x968cx27[_0x30a6[189]](_0x968cx1e,_0x968cx4,null,_0x968cx2b,_0x968cx2b)}};_0x968cx29[_0x30a6[177]](this,arguments);_0x968cx28= null}};Sidebar[_0x30a6[40]][_0x30a6[190]]= function(_0x968cx2c,_0x968cx14,_0x968cx2d,_0x968cx2e){var _0x968cx2f=mxUtils[_0x30a6[190]]();var _0x968cx19=_0x968cx2f[_0x30a6[7]](_0x968cx2c);_0x968cx19[_0x30a6[123]](_0x30a6[191],_0x968cx14);_0x968cx2d[_0x30a6[192]](function(_0x968cx30,_0x968cx31){_0x968cx19[_0x30a6[123]](_0x968cx30,_0x968cx2e[_0x968cx31]?_0x968cx2e[_0x968cx31]:_0x30a6[105])});return _0x968cx19};Sidebar[_0x30a6[40]][_0x30a6[193]]= function(_0x968cx32,_0x968cxd,_0x968cxe,_0x968cx33,_0x968cx9,_0x968cxa){var _0x968cx2d=[];var _0x968cx2e=[];switch(_0x968cx33){case _0x30a6[47]:_0x968cx2d= [_0x30a6[194],_0x30a6[195],_0x30a6[196]];_0x968cx2e= [_0x30a6[197],_0x30a6[105],_0x30a6[198]];break;case _0x30a6[50]:_0x968cx2d= [_0x30a6[194],_0x30a6[195]];_0x968cx2e= [_0x30a6[197],_0x30a6[105]];break;case _0x30a6[48]:_0x968cx2d= [_0x30a6[194],_0x30a6[48],_0x30a6[199]];_0x968cx2e= [_0x30a6[197],_0x30a6[105]];break;case _0x30a6[49]:_0x968cx2d= [_0x30a6[194],_0x30a6[48],_0x30a6[200]];_0x968cx2e= [_0x30a6[197],_0x30a6[105]];break;default:_0x968cx2d= [];_0x968cx2e= [];break};var _0x968cx19=this[_0x30a6[190]](_0x968cx33,_0x968cx9,_0x968cx2d,_0x968cx2e);var _0x968cx8=[ new mxCell(_0x968cx19, new mxGeometry(0,0,_0x968cxd,_0x968cxe),_0x968cx32)];_0x968cx8[0][_0x30a6[201]]= true;return this[_0x30a6[202]](_0x968cx8,_0x968cxd,_0x968cxe,_0x968cx9,_0x968cxa)};Sidebar[_0x30a6[40]][_0x30a6[202]]= function(_0x968cx8,_0x968cxd,_0x968cxe,_0x968cx9,_0x968cxa){var _0x968cx7=this[_0x30a6[155]](_0x968cx8,_0x968cx9,_0x968cxa);var _0x968cx27=this[_0x30a6[173]](_0x968cx7,this[_0x30a6[160]](_0x968cx8,true),this[_0x30a6[170]](_0x968cxd,_0x968cxe));this[_0x30a6[179]](_0x968cx7,_0x968cx27);_0x968cx27[_0x30a6[203]]= mxUtils[_0x30a6[25]](this,function(){return this[_0x30a6[1]][_0x30a6[9]][_0x30a6[5]][_0x30a6[205]][_0x30a6[204]]});if(!touchStyle){mxEvent[_0x30a6[26]](_0x968cx7,_0x30a6[30],mxUtils[_0x30a6[25]](this,function(_0x968cx4){this[_0x30a6[65]](_0x968cx7,_0x968cx8,_0x968cx9,_0x968cxa)}))};return _0x968cx7};Sidebar[_0x30a6[40]][_0x30a6[206]]= function(_0x968cx32,_0x968cxd,_0x968cxe,_0x968cx33,_0x968cx9,_0x968cxa){var _0x968cx8=[ new mxCell((_0x968cx33!= null)?_0x968cx33:_0x30a6[105], new mxGeometry(0,0,_0x968cxd,_0x968cxe),_0x968cx32)];_0x968cx8[0][_0x30a6[208]][_0x30a6[207]]( new mxPoint(0,_0x968cxe),true);_0x968cx8[0][_0x30a6[208]][_0x30a6[207]]( new mxPoint(_0x968cxd,0),false);_0x968cx8[0][_0x30a6[208]][_0x30a6[76]]= true;_0x968cx8[0][_0x30a6[209]]= true;return this[_0x30a6[210]](_0x968cx8,_0x968cxd,_0x968cxe,_0x968cx9,_0x968cxa)};Sidebar[_0x30a6[40]][_0x30a6[210]]= function(_0x968cx8,_0x968cxd,_0x968cxe,_0x968cx9,_0x968cxa){var _0x968cx7=this[_0x30a6[155]](_0x968cx8,_0x968cx9,_0x968cxa);this[_0x30a6[173]](_0x968cx7,this[_0x30a6[160]](_0x968cx8,false),this[_0x30a6[170]](_0x968cxd,_0x968cxe));var _0x968cx1e=this[_0x30a6[1]][_0x30a6[9]][_0x30a6[5]];mxEvent[_0x30a6[26]](_0x968cx7,_0x30a6[158],mxUtils[_0x30a6[25]](this,function(_0x968cx4){if(this[_0x30a6[56]]){_0x968cx1e[_0x30a6[211]](_0x968cx8[0])};_0x968cx7[_0x30a6[17]][_0x30a6[212]]= _0x30a6[213];window[_0x30a6[126]](function(){_0x968cx7[_0x30a6[17]][_0x30a6[212]]= _0x30a6[105]},300);mxEvent[_0x30a6[159]](_0x968cx4)}));touchStyle= false;if(!touchStyle){mxEvent[_0x30a6[26]](_0x968cx7,_0x30a6[30],mxUtils[_0x30a6[25]](this,function(_0x968cx4){this[_0x30a6[65]](_0x968cx7,_0x968cx8,_0x968cx9,_0x968cxa)}))};return _0x968cx7};Sidebar[_0x30a6[40]][_0x30a6[214]]= function(_0x968cx34,_0x968cx9,_0x968cx35,_0x968cx36){var _0x968cx7=this[_0x30a6[127]](_0x968cx9);this[_0x30a6[2]][_0x30a6[21]](_0x968cx7);var _0x968cx1c=document[_0x30a6[7]](_0x30a6[6]);_0x968cx1c[_0x30a6[69]]= _0x30a6[215];if(_0x968cx35){_0x968cx36(_0x968cx1c);_0x968cx36= null}else {_0x968cx1c[_0x30a6[17]][_0x30a6[83]]= _0x30a6[110]};this[_0x30a6[216]](_0x968cx7,_0x968cx1c,_0x968cx36);var _0x968cx37=document[_0x30a6[7]](_0x30a6[6]);_0x968cx37[_0x30a6[21]](_0x968cx1c);this[_0x30a6[2]][_0x30a6[21]](_0x968cx37);if(_0x968cx34!= null){this[_0x30a6[3]][_0x968cx34]= [_0x968cx7,_0x968cx37]}};Sidebar[_0x30a6[40]][_0x30a6[216]]= function(_0x968cx9,_0x968cx38,_0x968cx39){var _0x968cx3a=false;_0x968cx9[_0x30a6[17]][_0x30a6[143]]= (_0x968cx38[_0x30a6[17]][_0x30a6[83]]== _0x30a6[110])?_0x30a6[144]+ IMAGE_PATH+ _0x30a6[217]:_0x30a6[144]+ IMAGE_PATH+ _0x30a6[218];_0x968cx9[_0x30a6[17]][_0x30a6[219]]= _0x30a6[220];_0x968cx9[_0x30a6[17]][_0x30a6[221]]= _0x30a6[222];mxEvent[_0x30a6[26]](_0x968cx9,_0x30a6[158],function(_0x968cx4){if(_0x968cx38[_0x30a6[17]][_0x30a6[83]]== _0x30a6[110]){if(!_0x968cx3a){_0x968cx3a= true;if(_0x968cx39!= null){_0x968cx9[_0x30a6[17]][_0x30a6[146]]= _0x30a6[223];window[_0x30a6[126]](function(){_0x968cx39(_0x968cx38);_0x968cx9[_0x30a6[17]][_0x30a6[146]]= _0x30a6[105]},0)}};_0x968cx9[_0x30a6[17]][_0x30a6[143]]= _0x30a6[144]+ IMAGE_PATH+ _0x30a6[218];_0x968cx38[_0x30a6[17]][_0x30a6[83]]= _0x30a6[84]}else {_0x968cx9[_0x30a6[17]][_0x30a6[143]]= _0x30a6[144]+ IMAGE_PATH+ _0x30a6[217];_0x968cx38[_0x30a6[17]][_0x30a6[83]]= _0x30a6[110]};mxEvent[_0x30a6[159]](_0x968cx4)})};Sidebar[_0x30a6[40]][_0x30a6[224]]= function(_0x968cx34){var _0x968cx3b=this[_0x30a6[3]][_0x968cx34];if(_0x968cx3b!= null){this[_0x30a6[3]][_0x968cx34]= null;for(var _0x968cx3c=0;_0x968cx3c< _0x968cx3b[_0x30a6[94]];_0x968cx3c++){this[_0x30a6[2]][_0x30a6[225]](_0x968cx3b[_0x968cx3c])};return true};return false};Sidebar[_0x30a6[40]][_0x30a6[51]]= function(_0x968cx34,_0x968cx9,_0x968cx3d,_0x968cx3e,_0x968cx3f,_0x968cx40){this[_0x30a6[214]](_0x968cx34,_0x968cx9,(_0x968cx34=== _0x30a6[42]),mxUtils[_0x30a6[25]](this,function(_0x968cx38){var _0x968cx41=_0x968cx40!= null;for(var _0x968cx3c=0;_0x968cx3c< _0x968cx3f[_0x30a6[94]];_0x968cx3c++){var _0x968cx42=_0x968cx3d+ _0x968cx3f[_0x968cx3c]+ _0x968cx3e;_0x968cx38[_0x30a6[21]](this[_0x30a6[193]](_0x30a6[226]+ _0x968cx42,80,80,_0x968cx3f[_0x968cx3c],(_0x968cx41)?_0x968cx40[_0x968cx3c]:null,_0x968cx41))}}))}
\ No newline at end of file
diff --git a/public/assets/plugins/jscripty/js/Toolbar.js b/public/assets/plugins/jscripty/js/Toolbar.js
index 7eab562..10a5094 100644
--- a/public/assets/plugins/jscripty/js/Toolbar.js
+++ b/public/assets/plugins/jscripty/js/Toolbar.js
@@ -1,407 +1 @@
-/**
- * $Id: Toolbar.js,v 1.3 2013-02-20 16:21:29 gaudenz Exp $
- * Copyright (c) 2006-2012, JGraph Ltd
- */
-/**
- * Construcs a new toolbar for the given editor.
- */
-function Toolbar(editorUi, container)
-{
-	this.editorUi = editorUi;
-	this.container = container;
-	this.init();
-
-	// Global handler to hide the current menu
-	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
-	{
-		this.hideMenu();
-	}));
-};
-
-/**
- * Adds the toolbar elements.
- */
-Toolbar.prototype.init = function()
-{
-	this.addItems(['save', 'publish', '-', 'print', 'undo', 'redo', '-', 'copy', 'cut', 'paste', 'delete', '-', 'duplicate', '-', 'actualSize', 'zoomIn', 'zoomOut', '-']);
-	var fontElt = this.addMenu('Helvetica', mxResources.get('fontFamily'), true, 'fontFamily');
-	fontElt.style.whiteSpace = 'nowrap';
-	fontElt.style.overflow = 'hidden';
-	fontElt.style.width = '70px';
-	this.addSeparator();
-	var sizeElt = this.addMenu('12', mxResources.get('fontSize'), true, 'fontSize');
-	sizeElt.style.whiteSpace = 'nowrap';
-	sizeElt.style.overflow = 'hidden';
-	sizeElt.style.width = '30px';
-
-	this.addItems(['-', 'bold', 'italic', 'underline']);
-	// Giuseppe Careri
-	// var align = this.addMenuFunction('geSprite-left', mxResources.get('align'), false, mxUtils.bind(this, function(menu)
-	// {
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], 'geIcon geSprite geSprite-left', null).setAttribute('title', mxResources.get('left'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], 'geIcon geSprite geSprite-center', null).setAttribute('title', mxResources.get('center'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], 'geIcon geSprite geSprite-right', null).setAttribute('title', mxResources.get('right'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP], 'geIcon geSprite geSprite-top', null).setAttribute('title', mxResources.get('top'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE], 'geIcon geSprite geSprite-middle', null).setAttribute('title', mxResources.get('middle'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM], 'geIcon geSprite geSprite-bottom', null).setAttribute('title', mxResources.get('bottom'));
-	// }));
-	// this.addItems(['fontColor', '-']);
-	// var line = this.addMenuFunction('geSprite-straight', mxResources.get('line'), false, mxUtils.bind(this, function(menu)
-	// {
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], [null], 'geIcon geSprite geSprite-straight', null).setAttribute('title', mxResources.get('straight'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['entityRelationEdgeStyle'], 'geIcon geSprite geSprite-entity', null).setAttribute('title', mxResources.get('entityRelation'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'horizontal'], 'geIcon geSprite geSprite-helbow', null).setAttribute('title', mxResources.get('horizontal'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'vertical'], 'geIcon geSprite geSprite-velbow', null).setAttribute('title', mxResources.get('vertical'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['segmentEdgeStyle'], 'geIcon geSprite geSprite-segment', null).setAttribute('title', mxResources.get('manual'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['orthogonalEdgeStyle'], 'geIcon geSprite geSprite-orthogonal', null).setAttribute('title', mxResources.get('automatic'));
-	// }));
-	// var linestart = this.addMenuFunction('geSprite-startclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)
-	// {
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-startclassic', null).setAttribute('title', mxResources.get('classic'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-startopen', null).setAttribute('title', mxResources.get('openArrow'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-startblock', null).setAttribute('title', mxResources.get('block'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-startoval', null).setAttribute('title', mxResources.get('oval'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-startdiamond', null).setAttribute('title', mxResources.get('diamond'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-startthindiamond', null).setAttribute('title', mxResources.get('diamondThin'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-startclassictrans', null).setAttribute('title', mxResources.get('classic'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-startblocktrans', null).setAttribute('title', mxResources.get('block'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-startovaltrans', null).setAttribute('title', mxResources.get('oval'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-startdiamondtrans', null).setAttribute('title', mxResources.get('diamond'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-startthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin'));
-	// }));
-	// var lineend = this.addMenuFunction('geSprite-endclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)
-	// {
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-endclassic', null).setAttribute('title', mxResources.get('classic'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-endopen', null).setAttribute('title', mxResources.get('openArrow'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-endblock', null).setAttribute('title', mxResources.get('block'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-endoval', null).setAttribute('title', mxResources.get('oval'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-enddiamond', null).setAttribute('title', mxResources.get('diamond'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-endthindiamond', null).setAttribute('title', mxResources.get('diamondThin'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-endclassictrans', null).setAttribute('title', mxResources.get('classic'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-endblocktrans', null).setAttribute('title', mxResources.get('block'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-endovaltrans', null).setAttribute('title', mxResources.get('oval'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-enddiamondtrans', null).setAttribute('title', mxResources.get('diamond'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-endthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin'));
-	// }));
-	// this.addItems(['-', 'strokeColor', 'image', 'fillColor']);
-	// this.addItem('geSprite-gradientcolor', 'gradientColor').setAttribute('title', mxResources.get('gradient'));
-	// this.addItems(['shadow']);
-
-	var graph = this.editorUi.editor.graph;
-
-	// Update font size and font family labels
-	var update = mxUtils.bind(this, function()
-	{
-		var ff = 'Helvetica';
-		var fs = '12';
-    	var state = graph.getView().getState(graph.getSelectionCell());
-
-    	if (state != null)
-    	{
-    		ff = state.style[mxConstants.STYLE_FONTFAMILY] || ff;
-    		fs = state.style[mxConstants.STYLE_FONTSIZE] || fs;
-
-    		if (ff.length > 10)
-    		{
-    			ff = ff.substring(0, 8) + '...';
-    		}
-
-    		fontElt.innerHTML = ff;
-    		sizeElt.innerHTML = fs;
-    	}
-	});
-
-    graph.getSelectionModel().addListener(mxEvent.CHANGE, update);
-    graph.getModel().addListener(mxEvent.CHANGE, update);
-
-	// Giuseppe Careri
-	// Updates button states
-  //this.addEdgeSelectionHandler([line, linestart, lineend]);
-	//this.addSelectionHandler([align]);
-};
-
-/**
- * Hides the current menu.
- */
-Toolbar.prototype.hideMenu = function()
-{
-	if (this.currentMenu != null)
-	{
-		this.currentMenu.hideMenu();
-		this.currentMenu.destroy();
-		this.currentMenu = null;
-	}
-};
-
-/**
- * Adds a label to the toolbar.
- */
-Toolbar.prototype.addMenu = function(label, tooltip, showLabels, name)
-{
-	var menu = this.editorUi.menus.get(name);
-	var elt = this.addMenuFunction(label, tooltip, showLabels, menu.funct);
-
-	menu.addListener('stateChanged', function()
-	{
-		elt.setEnabled(menu.enabled);
-	});
-
-	return elt;
-};
-
-/**
- * Adds a label to the toolbar.
- */
-Toolbar.prototype.addMenuFunction = function(label, tooltip, showLabels, funct)
-{
-	var elt = (showLabels) ? this.createLabel(label) : this.createButton(label);
-	this.initElement(elt, tooltip);
-	this.addMenuHandler(elt, showLabels, funct);
-	this.container.appendChild(elt);
-
-	return elt;
-};
-
-/**
- * Adds a separator to the separator.
- */
-Toolbar.prototype.addSeparator = function()
-{
-	var elt = document.createElement('div');
-	elt.className = 'geSeparator';
-	this.container.appendChild(elt);
-
-	return elt;
-};
-
-/**
- * Adds given action item
- */
-Toolbar.prototype.addItems = function(keys)
-{
-	for (var i = 0; i < keys.length; i++)
-	{
-		var key = keys[i];
-
-		if (key == '-')
-		{
-			this.addSeparator();
-		}
-		else
-		{
-			this.addItem('geSprite-' + key.toLowerCase(), key);
-		}
-	}
-};
-
-/**
- * Adds given action item
- */
-Toolbar.prototype.addItem = function(sprite, key)
-{
-	var action = this.editorUi.actions.get(key);
-	var elt = null;
-
-	if (action != null)
-	{
-		elt = this.addButton(sprite, action.label, action.funct);
-		elt.setEnabled(action.enabled);
-
-		action.addListener('stateChanged', function()
-		{
-			elt.setEnabled(action.enabled);
-		});
-	}
-
-	return elt;
-};
-
-/**
- * Adds a button to the toolbar.
- */
-Toolbar.prototype.addButton = function(classname, tooltip, funct)
-{
-	var elt = this.createButton(classname);
-
-	this.initElement(elt, tooltip);
-	this.addClickHandler(elt, funct);
-	this.container.appendChild(elt);
-
-	return elt;
-};
-
-/**
- * Updates the states of the given toolbar items based on the selection.
- */
-Toolbar.prototype.addSelectionHandler = function(items)
-{
-	var graph = this.editorUi.editor.graph;
-
-	var selectionListener = function()
-    {
-    	var selected = !graph.isSelectionEmpty();
-
-    	for (var i = 0; i < items.length; i++)
-    	{
-    		items[i].setEnabled(selected);
-    	}
-    };
-
-    graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
-    selectionListener();
-};
-
-/**
- * Updates the states of the given toolbar items based on the selection.
- */
-Toolbar.prototype.addEdgeSelectionHandler = function(items)
-{
-	var graph = this.editorUi.editor.graph;
-
-	var selectionListener = function()
-    {
-		var edgeSelected = false;
-
-		if (!graph.isSelectionEmpty())
-		{
-			var cells = graph.getSelectionCells();
-
-			for (var i = 0; i < cells.length; i++)
-			{
-				if (graph.getModel().isEdge(cells[i]))
-				{
-					edgeSelected = true;
-					break;
-				}
-			}
-		}
-
-    	for (var i = 0; i < items.length; i++)
-    	{
-    		items[i].setEnabled(edgeSelected);
-    	}
-    };
-
-    graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
-    selectionListener();
-};
-
-/**
- * Initializes the given toolbar element.
- */
-Toolbar.prototype.initElement = function(elt, tooltip)
-{
-	elt.setAttribute('tabindex', '0');
-
-	// Adds tooltip
-	if (tooltip != null)
-	{
-		elt.setAttribute('title', tooltip);
-	}
-
-	this.addEnabledState(elt);
-};
-
-/**
- * Adds enabled state with setter to DOM node (avoids JS wrapper).
- */
-Toolbar.prototype.addEnabledState = function(elt)
-{
-	var classname = elt.className;
-
-	elt.setEnabled = function(value)
-	{
-		elt.enabled = value;
-
-		if (value)
-		{
-			elt.className = classname;
-		}
-		else
-		{
-			elt.className = classname + ' geDisabled';
-		}
-	};
-
-	elt.setEnabled(true);
-};
-
-/**
- * Adds enabled state with setter to DOM node (avoids JS wrapper).
- */
-Toolbar.prototype.addClickHandler = function(elt, funct)
-{
-	if (funct != null)
-	{
-		mxEvent.addListener(elt, 'click', function(evt)
-		{
-			if (elt.enabled)
-			{
-				funct(evt);
-			}
-
-			mxEvent.consume(evt);
-		});
-	}
-};
-
-/**
- * Creates and returns a new button.
- */
-Toolbar.prototype.createButton = function(classname)
-{
-	var elt = document.createElement('a');
-	elt.setAttribute('href', 'javascript:void(0);');
-	elt.className = 'geButton';
-
-	var inner = document.createElement('div');
-	inner.className = 'geSprite ' + classname;
-	elt.appendChild(inner);
-
-	return elt;
-};
-
-/**
- * Creates and returns a new button.
- */
-Toolbar.prototype.createLabel = function(label, tooltip)
-{
-	var elt = document.createElement('a');
-	elt.setAttribute('href', 'javascript:void(0);');
-	elt.className = 'geLabel';
-	mxUtils.write(elt, label);
-
-	return elt;
-};
-
-/**
- * Adds a handler for showing a menu in the given element.
- */
-Toolbar.prototype.addMenuHandler = function(elt, showLabels, funct, showAll)
-{
-	if (funct != null)
-	{
-		var graph = this.editorUi.editor.graph;
-		var menu = null;
-
-		mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)
-		{
-			if (elt.enabled == null || elt.enabled)
-			{
-				graph.panningHandler.hideMenu();
-				menu = new mxPopupMenu(funct);
-				menu.div.className += ' geToolbarMenu';
-				menu.showDisabled = showAll;
-				menu.labels = showLabels;
-				menu.autoExpand = true;
-
-				menu.popup(elt.offsetLeft, elt.offsetTop + elt.offsetHeight + 34, null, evt);
-				this.currentMenu = menu;
-			}
-
-			mxEvent.consume(evt);
-		}));
-	}
-};
+var _0x3a71=["\x65\x64\x69\x74\x6F\x72\x55\x69","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x69\x6E\x69\x74","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x62\x69\x6E\x64","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x73\x61\x76\x65","\x70\x75\x62\x6C\x69\x73\x68","\x2D","\x70\x72\x69\x6E\x74","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x6F\x70\x79","\x63\x75\x74","\x70\x61\x73\x74\x65","\x64\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x61\x64\x64\x49\x74\x65\x6D\x73","\x48\x65\x6C\x76\x65\x74\x69\x63\x61","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x67\x65\x74","\x61\x64\x64\x4D\x65\x6E\x75","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x73\x74\x79\x6C\x65","\x6E\x6F\x77\x72\x61\x70","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x68\x69\x64\x64\x65\x6E","\x77\x69\x64\x74\x68","\x37\x30\x70\x78","\x61\x64\x64\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x31\x32","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x33\x30\x70\x78","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x67\x72\x61\x70\x68","\x65\x64\x69\x74\x6F\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x46\x41\x4D\x49\x4C\x59","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x53\x49\x5A\x45","\x6C\x65\x6E\x67\x74\x68","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x2E\x2E\x2E","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x63\x75\x72\x72\x65\x6E\x74\x4D\x65\x6E\x75","\x64\x65\x73\x74\x72\x6F\x79","\x6D\x65\x6E\x75\x73","\x66\x75\x6E\x63\x74","\x61\x64\x64\x4D\x65\x6E\x75\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x73\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x64","\x65\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x72\x65\x61\x74\x65\x4C\x61\x62\x65\x6C","\x63\x72\x65\x61\x74\x65\x42\x75\x74\x74\x6F\x6E","\x69\x6E\x69\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x61\x64\x64\x4D\x65\x6E\x75\x48\x61\x6E\x64\x6C\x65\x72","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x67\x65\x53\x70\x72\x69\x74\x65\x2D","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x64\x64\x49\x74\x65\x6D","\x61\x63\x74\x69\x6F\x6E\x73","\x6C\x61\x62\x65\x6C","\x61\x64\x64\x42\x75\x74\x74\x6F\x6E","\x61\x64\x64\x43\x6C\x69\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72","\x61\x64\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x61\x64\x64\x45\x64\x67\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x69\x73\x45\x64\x67\x65","\x74\x61\x62\x69\x6E\x64\x65\x78","\x30","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x74\x69\x74\x6C\x65","\x61\x64\x64\x45\x6E\x61\x62\x6C\x65\x64\x53\x74\x61\x74\x65","\x20\x67\x65\x44\x69\x73\x61\x62\x6C\x65\x64","\x63\x6C\x69\x63\x6B","\x63\x6F\x6E\x73\x75\x6D\x65","\x61","\x68\x72\x65\x66","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B","\x67\x65\x42\x75\x74\x74\x6F\x6E","\x67\x65\x53\x70\x72\x69\x74\x65\x20","\x67\x65\x4C\x61\x62\x65\x6C","\x77\x72\x69\x74\x65","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x20\x67\x65\x54\x6F\x6F\x6C\x62\x61\x72\x4D\x65\x6E\x75","\x73\x68\x6F\x77\x44\x69\x73\x61\x62\x6C\x65\x64","\x6C\x61\x62\x65\x6C\x73","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x6F\x66\x66\x73\x65\x74\x4C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x70\x6F\x70\x75\x70"];function Toolbar(_0x64dbx2,_0x64dbx3){this[_0x3a71[0]]= _0x64dbx2;this[_0x3a71[1]]= _0x64dbx3;this[_0x3a71[2]]();mxEvent[_0x3a71[5]](document,mxUtils[_0x3a71[4]](this,function(_0x64dbx4){this[_0x3a71[3]]()}))}Toolbar[_0x3a71[6]][_0x3a71[2]]= function(){this[_0x3a71[21]]([_0x3a71[7],_0x3a71[8],_0x3a71[9],_0x3a71[10],_0x3a71[11],_0x3a71[12],_0x3a71[9],_0x3a71[13],_0x3a71[14],_0x3a71[15],_0x3a71[16],_0x3a71[9],_0x3a71[17],_0x3a71[9],_0x3a71[18],_0x3a71[19],_0x3a71[20],_0x3a71[9]]);var _0x64dbx5=this[_0x3a71[25]](_0x3a71[22],mxResources[_0x3a71[24]](_0x3a71[23]),true,_0x3a71[23]);_0x64dbx5[_0x3a71[27]][_0x3a71[26]]= _0x3a71[28];_0x64dbx5[_0x3a71[27]][_0x3a71[29]]= _0x3a71[30];_0x64dbx5[_0x3a71[27]][_0x3a71[31]]= _0x3a71[32];this[_0x3a71[33]]();var _0x64dbx6=this[_0x3a71[25]](_0x3a71[34],mxResources[_0x3a71[24]](_0x3a71[35]),true,_0x3a71[35]);_0x64dbx6[_0x3a71[27]][_0x3a71[26]]= _0x3a71[28];_0x64dbx6[_0x3a71[27]][_0x3a71[29]]= _0x3a71[30];_0x64dbx6[_0x3a71[27]][_0x3a71[31]]= _0x3a71[36];this[_0x3a71[21]]([_0x3a71[9],_0x3a71[37],_0x3a71[38],_0x3a71[39]]);var _0x64dbx7=this[_0x3a71[0]][_0x3a71[41]][_0x3a71[40]];var _0x64dbx8=mxUtils[_0x3a71[4]](this,function(){var _0x64dbx9=_0x3a71[22];var _0x64dbxa=_0x3a71[34];var _0x64dbxb=_0x64dbx7[_0x3a71[44]]()[_0x3a71[43]](_0x64dbx7[_0x3a71[42]]());if(_0x64dbxb!= null){_0x64dbx9= _0x64dbxb[_0x3a71[27]][mxConstants[_0x3a71[45]]]|| _0x64dbx9;_0x64dbxa= _0x64dbxb[_0x3a71[27]][mxConstants[_0x3a71[46]]]|| _0x64dbxa;if(_0x64dbx9[_0x3a71[47]]> 10){_0x64dbx9= _0x64dbx9[_0x3a71[48]](0,8)+ _0x3a71[49]};_0x64dbx5[_0x3a71[50]]= _0x64dbx9;_0x64dbx6[_0x3a71[50]]= _0x64dbxa}});_0x64dbx7[_0x3a71[52]]()[_0x3a71[51]](mxEvent.CHANGE,_0x64dbx8);_0x64dbx7[_0x3a71[53]]()[_0x3a71[51]](mxEvent.CHANGE,_0x64dbx8)};Toolbar[_0x3a71[6]][_0x3a71[3]]= function(){if(this[_0x3a71[54]]!= null){this[_0x3a71[54]][_0x3a71[3]]();this[_0x3a71[54]][_0x3a71[55]]();this[_0x3a71[54]]= null}};Toolbar[_0x3a71[6]][_0x3a71[25]]= function(_0x64dbxc,_0x64dbxd,_0x64dbxe,_0x64dbxf){var _0x64dbx10=this[_0x3a71[0]][_0x3a71[56]][_0x3a71[24]](_0x64dbxf);var _0x64dbx11=this[_0x3a71[58]](_0x64dbxc,_0x64dbxd,_0x64dbxe,_0x64dbx10[_0x3a71[57]]);_0x64dbx10[_0x3a71[51]](_0x3a71[59],function(){_0x64dbx11[_0x3a71[61]](_0x64dbx10[_0x3a71[60]])});return _0x64dbx11};Toolbar[_0x3a71[6]][_0x3a71[58]]= function(_0x64dbxc,_0x64dbxd,_0x64dbxe,_0x64dbx12){var _0x64dbx11=(_0x64dbxe)?this[_0x3a71[62]](_0x64dbxc):this[_0x3a71[63]](_0x64dbxc);this[_0x3a71[64]](_0x64dbx11,_0x64dbxd);this[_0x3a71[65]](_0x64dbx11,_0x64dbxe,_0x64dbx12);this[_0x3a71[1]][_0x3a71[66]](_0x64dbx11);return _0x64dbx11};Toolbar[_0x3a71[6]][_0x3a71[33]]= function(){var _0x64dbx11=document[_0x3a71[68]](_0x3a71[67]);_0x64dbx11[_0x3a71[69]]= _0x3a71[70];this[_0x3a71[1]][_0x3a71[66]](_0x64dbx11);return _0x64dbx11};Toolbar[_0x3a71[6]][_0x3a71[21]]= function(_0x64dbx13){for(var _0x64dbx14=0;_0x64dbx14< _0x64dbx13[_0x3a71[47]];_0x64dbx14++){var _0x64dbx15=_0x64dbx13[_0x64dbx14];if(_0x64dbx15== _0x3a71[9]){this[_0x3a71[33]]()}else {this[_0x3a71[73]](_0x3a71[71]+ _0x64dbx15[_0x3a71[72]](),_0x64dbx15)}}};Toolbar[_0x3a71[6]][_0x3a71[73]]= function(_0x64dbx16,_0x64dbx15){var _0x64dbx17=this[_0x3a71[0]][_0x3a71[74]][_0x3a71[24]](_0x64dbx15);var _0x64dbx11=null;if(_0x64dbx17!= null){_0x64dbx11= this[_0x3a71[76]](_0x64dbx16,_0x64dbx17[_0x3a71[75]],_0x64dbx17[_0x3a71[57]]);_0x64dbx11[_0x3a71[61]](_0x64dbx17[_0x3a71[60]]);_0x64dbx17[_0x3a71[51]](_0x3a71[59],function(){_0x64dbx11[_0x3a71[61]](_0x64dbx17[_0x3a71[60]])})};return _0x64dbx11};Toolbar[_0x3a71[6]][_0x3a71[76]]= function(_0x64dbx18,_0x64dbxd,_0x64dbx12){var _0x64dbx11=this[_0x3a71[63]](_0x64dbx18);this[_0x3a71[64]](_0x64dbx11,_0x64dbxd);this[_0x3a71[77]](_0x64dbx11,_0x64dbx12);this[_0x3a71[1]][_0x3a71[66]](_0x64dbx11);return _0x64dbx11};Toolbar[_0x3a71[6]][_0x3a71[78]]= function(_0x64dbx19){var _0x64dbx7=this[_0x3a71[0]][_0x3a71[41]][_0x3a71[40]];var _0x64dbx1a=function(){var _0x64dbx1b=!_0x64dbx7[_0x3a71[79]]();for(var _0x64dbx14=0;_0x64dbx14< _0x64dbx19[_0x3a71[47]];_0x64dbx14++){_0x64dbx19[_0x64dbx14][_0x3a71[61]](_0x64dbx1b)}};_0x64dbx7[_0x3a71[52]]()[_0x3a71[51]](mxEvent.CHANGE,_0x64dbx1a);_0x64dbx1a()};Toolbar[_0x3a71[6]][_0x3a71[80]]= function(_0x64dbx19){var _0x64dbx7=this[_0x3a71[0]][_0x3a71[41]][_0x3a71[40]];var _0x64dbx1a=function(){var _0x64dbx1c=false;if(!_0x64dbx7[_0x3a71[79]]()){var _0x64dbx1d=_0x64dbx7[_0x3a71[81]]();for(var _0x64dbx14=0;_0x64dbx14< _0x64dbx1d[_0x3a71[47]];_0x64dbx14++){if(_0x64dbx7[_0x3a71[53]]()[_0x3a71[82]](_0x64dbx1d[_0x64dbx14])){_0x64dbx1c= true;break}}};for(var _0x64dbx14=0;_0x64dbx14< _0x64dbx19[_0x3a71[47]];_0x64dbx14++){_0x64dbx19[_0x64dbx14][_0x3a71[61]](_0x64dbx1c)}};_0x64dbx7[_0x3a71[52]]()[_0x3a71[51]](mxEvent.CHANGE,_0x64dbx1a);_0x64dbx1a()};Toolbar[_0x3a71[6]][_0x3a71[64]]= function(_0x64dbx11,_0x64dbxd){_0x64dbx11[_0x3a71[85]](_0x3a71[83],_0x3a71[84]);if(_0x64dbxd!= null){_0x64dbx11[_0x3a71[85]](_0x3a71[86],_0x64dbxd)};this[_0x3a71[87]](_0x64dbx11)};Toolbar[_0x3a71[6]][_0x3a71[87]]= function(_0x64dbx11){var _0x64dbx18=_0x64dbx11[_0x3a71[69]];_0x64dbx11[_0x3a71[61]]= function(_0x64dbx1e){_0x64dbx11[_0x3a71[60]]= _0x64dbx1e;if(_0x64dbx1e){_0x64dbx11[_0x3a71[69]]= _0x64dbx18}else {_0x64dbx11[_0x3a71[69]]= _0x64dbx18+ _0x3a71[88]}};_0x64dbx11[_0x3a71[61]](true)};Toolbar[_0x3a71[6]][_0x3a71[77]]= function(_0x64dbx11,_0x64dbx12){if(_0x64dbx12!= null){mxEvent[_0x3a71[51]](_0x64dbx11,_0x3a71[89],function(_0x64dbx4){if(_0x64dbx11[_0x3a71[60]]){_0x64dbx12(_0x64dbx4)};mxEvent[_0x3a71[90]](_0x64dbx4)})}};Toolbar[_0x3a71[6]][_0x3a71[63]]= function(_0x64dbx18){var _0x64dbx11=document[_0x3a71[68]](_0x3a71[91]);_0x64dbx11[_0x3a71[85]](_0x3a71[92],_0x3a71[93]);_0x64dbx11[_0x3a71[69]]= _0x3a71[94];var _0x64dbx1f=document[_0x3a71[68]](_0x3a71[67]);_0x64dbx1f[_0x3a71[69]]= _0x3a71[95]+ _0x64dbx18;_0x64dbx11[_0x3a71[66]](_0x64dbx1f);return _0x64dbx11};Toolbar[_0x3a71[6]][_0x3a71[62]]= function(_0x64dbxc,_0x64dbxd){var _0x64dbx11=document[_0x3a71[68]](_0x3a71[91]);_0x64dbx11[_0x3a71[85]](_0x3a71[92],_0x3a71[93]);_0x64dbx11[_0x3a71[69]]= _0x3a71[96];mxUtils[_0x3a71[97]](_0x64dbx11,_0x64dbxc);return _0x64dbx11};Toolbar[_0x3a71[6]][_0x3a71[65]]= function(_0x64dbx11,_0x64dbxe,_0x64dbx12,_0x64dbx20){if(_0x64dbx12!= null){var _0x64dbx7=this[_0x3a71[0]][_0x3a71[41]][_0x3a71[40]];var _0x64dbx10=null;mxEvent[_0x3a71[51]](_0x64dbx11,_0x3a71[89],mxUtils[_0x3a71[4]](this,function(_0x64dbx4){if(_0x64dbx11[_0x3a71[60]]== null|| _0x64dbx11[_0x3a71[60]]){_0x64dbx7[_0x3a71[98]][_0x3a71[3]]();_0x64dbx10=  new mxPopupMenu(_0x64dbx12);_0x64dbx10[_0x3a71[67]][_0x3a71[69]]+= _0x3a71[99];_0x64dbx10[_0x3a71[100]]= _0x64dbx20;_0x64dbx10[_0x3a71[101]]= _0x64dbxe;_0x64dbx10[_0x3a71[102]]= true;_0x64dbx10[_0x3a71[106]](_0x64dbx11[_0x3a71[103]],_0x64dbx11[_0x3a71[104]]+ _0x64dbx11[_0x3a71[105]]+ 34,null,_0x64dbx4);this[_0x3a71[54]]= _0x64dbx10};mxEvent[_0x3a71[90]](_0x64dbx4)}))}}
\ No newline at end of file
diff --git a/public/assets/plugins/jscripty/js/custom.js b/public/assets/plugins/jscripty/js/custom.js
index a53e30b..ed6daa0 100644
--- a/public/assets/plugins/jscripty/js/custom.js
+++ b/public/assets/plugins/jscripty/js/custom.js
@@ -1,283 +1 @@
-var urlParams = (function(url) {
-	var result = new Object();
-	var idx = url.lastIndexOf('?');
-
-	if (idx > 0) {
-		var params = url.substring(idx + 1).split('&');
-
-		for (var i = 0; i < params.length; i++) {
-			idx = params[i].indexOf('=');
-
-			if (idx > 0) {
-				result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
-			}
-		}
-	}
-
-	return result;
-})(window.location.href);
-
-var t0 = new Date();
-
-// Public global variables
-var MAX_REQUEST_SIZE = 10485760;
-var MAX_WIDTH = 12000;
-var MAX_HEIGHT = 12000;
-
-// CUSTOM_PARAMETERS - URLs for save and export
-var EXPORT_URL = 'http://exp.draw.io/ImageExport2/export';
-var SHARE_HOST = 'http://localhost:3000';
-
-var SAVE_URL = 'api/jscripty/projects/';
-var VARIABLE_URL = 'api/square/variables/';
-
-// Paths and files
-var STENCIL_PATH = '/assets/plugins/jscripty/stencils';
-var SHAPES_PATH = '/assets/plugins/mxgraph/shapes';
-var IMAGE_PATH = '/assets/plugins/mxgraph/images';
-// Path for images inside the diagram
-//var GRAPH_IMAGE_PATH = 'assets/plugins/mxgraph/img';
-//var ICONFINDER_PATH = 'iconfinder';
-var STYLE_PATH = '/assets/plugins/mxgraph/styles';
-var CSS_PATH = '/assets/plugins/mxgraph/styles';
-var OPEN_FORM = 'api/jscripty/projects/open';
-var TEMPLATE_PATH = '/assets/plugins/jscripty/templates';
-
-// Directory for i18 files and basename for main i18n file
-var RESOURCES_PATH = '/assets/plugins/jscripty/resources';
-var RESOURCE_BASE = RESOURCES_PATH + '/dia';
-
-// Specifies connection mode for touch devices (at least one should be true)
-var tapAndHoldStartsConnection = true;
-var showConnectorImg = true;
-
-var mxLoadResources = false;
-// var mxLanguage = '';
-console.log('custom', localStorage.getItem("NG_TRANSLATE_LANG_KEY"));
-switch (localStorage.getItem("NG_TRANSLATE_LANG_KEY")) {
-	case 'en_EN':
-		mxLanguage = 'en';
-		break;
-	case 'it':
-		mxLanguage = 'it';
-		break;
-	default:
-		mxLanguage = 'it';
-}
-console.log('mxLanguage', mxLanguage);
-
-var mxLanguages = ['ar', 'bs', 'cs', 'da', 'de', 'el', 'es', 'es-ar', 'fr',
-	'hu', 'id', 'it', 'ja', 'ko', 'nl', 'no', 'pl', 'pt-br', 'pt', 'ro', 'ru',
-	'sr', 'sv', 'th', 'tr', 'uk', 'zh'
-];
-var mxBasePath = 'assets/plugins/mxgraph';
-var geBasePath = 'assets/plugins/mxgraph/js';
-
-var ISPEECHLANG = {
-	usenglishfemale: "US English Female",
-	usenglishmale: "US English Male",
-	ukenglishfemale: "UK English Female",
-	ukenglishmale: "UK English Male",
-	auenglishfemale: "Australian English",
-	usspanishfemale: "US Spanish Female",
-	usspanishmale: "US Spanish Male",
-	chchinesefemale: "Chinese Female",
-	chchinesemale: "Chinese Male",
-	hkchinesefemale: "Hong Kong Cantonese Female",
-	twchinesefemale: "Taiwan Chinese Female",
-	jpjapanesefemale: "Japanese Female",
-	jpjapanesemale: "Japanese Male",
-	krkoreanfemale: "Korean Female",
-	krkoreanmale: "Korean Male",
-	caenglishfemale: "Canadian English Female",
-	huhungarianfemale: "Hungarian Female",
-	brportuguesefemale: "Brazilian Portuguese Female",
-	eurportuguesefemale: "European Portuguese Female",
-	eurportuguesemale: "European Portuguese Male",
-	eurspanishfemale: "European Spanish Female",
-	eurspanishmale: "European Spanish Male",
-	eurcatalanfemale: "European Catalan Female",
-	eurczechfemale: "European Czech Female",
-	eurdanishfemale: "European Danish Female",
-	eurfinnishfemale: "European Finnish Female",
-	eurfrenchfemale: "European French Female",
-	eurfrenchmale: "European French Male",
-	eurnorwegianfemale: "European Norwegian Female",
-	eurdutchfemale: "European Dutch Female",
-	eurpolishfemale: "European Polish Female",
-	euritalianfemale: "European Italian Female",
-	eurturkishfemale: "European Turkish Female	",
-	eurturkishmale: "European Turkish Male",
-	eurgermanfemale: "European German Female",
-	eurgermanmale: "European German Male",
-	rurussianfemale: "Russian Female",
-	rurussianmale: "Russian Male",
-	swswedishfemale: "Swedish Female",
-	cafrenchfemale: "Canadian French Female",
-	cafrenchmale: "Canadian French Male"
-};
-
-var ISPEECHASRLANG = {
-	"en-US": "English (US)",
-	"en-CA": "English (Canada)",
-	"en-GB": "English (UK)",
-	"en-AU": "English (Australia)",
-	"es-ES": "Spanish (Spain)",
-	"es-MX": "Spanish (Mexico)",
-	"it-IT": "Italian (Italy) / Finnish (Finland)",
-	"fr-FR": "French (France)",
-	"fr-CA": "French (Canada)",
-	"pl-PL": "Polish (Poland)",
-	"pt-PT": "Portuguese (Portugal)",
-	"ca-ES": "Catalan (Catalan)",
-	"zh-TW": "Chinese (Taiwan)",
-	"da-DK": "Danish (Denmark)",
-	"fr-FR": "German (Germany)",
-	"ja-JP": "Japanese (Japan)",
-	"ko-KR": "Korean (Korea)",
-	"nl-NL": "Dutch (Netherlands)",
-	"nb-NO": "Norwegian (Norway)",
-	"pt-BR": "Portuguese (Brazil)",
-	"ru-RU": "Russian (Russia)",
-	"sv-SE": "Swedish (Sweden)",
-	"zh-CN": "Chinese (China)",
-	"zh-HK": "Chinese (Hong Kong)"
-};
-
-var ISPEECHASRMODEL = {
-	0: "Default",
-	date: "Date",
-	usmoney: "US Money",
-	numbersto9: "Numbers to 9",
-	numbersto99: "Numbers to 99",
-	numbersto999: "Numbers to 999",
-	time: "Time",
-	phonenumber: "Phone number",
-	streets: "Streets",
-	citystate: "US City/States"
-};
-
-var GOOGLETTSLANG = {
-	"af": "Afrikaans",
-	"sq": "Albanian",
-	"am": "Amharic",
-	"ar": "Arabic",
-	"hy": "Armenian",
-	"az": "Azerbaijani",
-	"eu": "Basque",
-	"be": "Belarusian",
-	"bn": "Bengali",
-	"bh": "Bihari",
-	"bs": "Bosnian",
-	"br": "Breton",
-	"bg": "Bulgarian",
-	"km": "Cambodian",
-	"ca": "Catalan",
-	"zh-CN": "Chinese (Simplified)",
-	"zh-TW": "Chinese (Traditional)",
-	"co": "Corsican",
-	"hr": "Croatian",
-	"cs": "Czech",
-	"da": "Danish",
-	"nl": "Dutch",
-	"en": "English",
-	"eo": "Esperanto",
-	"et": "Estonian",
-	"fo": "Faroese",
-	"tl": "Filipino",
-	"fi": "Finnish",
-	"fr": "French",
-	"fy": "Frisian",
-	"gl": "Galician",
-	"ka": "Georgian",
-	"de": "German",
-	"el": "Greek",
-	"gn": "Guarani",
-	"gu": "Gujarati",
-	"xx-hacker": "Hacker",
-	"ha": "Hausa",
-	"iw": "Hebrew",
-	"hi": "Hindi",
-	"hu": "Hungarian",
-	"is": "Icelandic",
-	"id": "Indonesian",
-	"ia": "Interlingua",
-	"ga": "Irish",
-	"it": "Italian",
-	"jw": "Javanese",
-	"ja": "Japanese",
-	"kn": "Kannada",
-	"kk": "Kazakh",
-	"rw": "Kinyarwanda",
-	"rn": "Kirundi",
-	"xx-klingon": "Klingon",
-	"ku": "Kurdish",
-	"ko": "Korean",
-	"ky": "Kyrgyz",
-	"lo": "Laothian",
-	"la": "Latin",
-	"lv": "Latvian",
-	"ln": "Lingala",
-	"lt": "Lithuanian",
-	"mk": "Macedonian",
-	"mg": "Malagasy",
-	"ms": "Malay",
-	"ml": "Malayalam",
-	"mt": "Maltese",
-	"mi": "Maori",
-	"mr": "Marathi",
-	"mo": "Moldavian",
-	"mn": "Mongolian",
-	"sr-ME": "Montenegrin",
-	"ne": "Nepali",
-	"no": "Norwegian",
-	"nn": "Norwegian (Nynorsk)",
-	"oc": "Occitan",
-	"or": "Oriya",
-	"om": "Oromo",
-	"ps": "Pashto",
-	"fa": "Persian",
-	"xx-pirate": "Pirate",
-	"pl": "Polish",
-	"pt-BR": "Portuguese (Brazil)",
-	"pt-PT": "Portuguese (Portugal)",
-	"pa": "Punjabi",
-	"qu": "Quechua",
-	"ro": "Romanian",
-	"rm": "Romansh",
-	"ru": "Russian",
-	"gd": "Scots Gaelic",
-	"sr": "Serbian",
-	"sh": "Serbo-Croatian",
-	"st": "Sesotho",
-	"sn": "Shona",
-	"sd": "Sindhi",
-	"si": "Sinhalese",
-	"sk": "Slovak",
-	"sl": "Slovenian",
-	"so": "Somali",
-	"es": "Spanish",
-	"su": "Sundanese",
-	"sw": "Swahili",
-	"sv": "Swedish",
-	"tg": "Tajik",
-	"ta": "Tamil",
-	"tt": "Tatar",
-	"te": "Telugu",
-	"th": "Thai",
-	"ti": "Tigrinya",
-	"to": "Tonga",
-	"tr": "Turkish",
-	"tk": "Turkmen",
-	"tw": "Twi",
-	"ug": "Uighur",
-	"uk": "Ukrainian",
-	"ur": "Urdu",
-	"uz": "Uzbek",
-	"vi": "Vietnamese",
-	"cy": "Welsh",
-	"xh": "Xhosa",
-	"yi": "Yiddish",
-	"yo": "Yoruba",
-	"zu": "Zulu"
-};
+var _0x11c7=["\x68\x72\x65\x66","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x3F","\x6C\x61\x73\x74\x49\x6E\x64\x65\x78\x4F\x66","\x26","\x73\x70\x6C\x69\x74","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x6C\x65\x6E\x67\x74\x68","\x3D","\x69\x6E\x64\x65\x78\x4F\x66","\x68\x74\x74\x70\x3A\x2F\x2F\x65\x78\x70\x2E\x64\x72\x61\x77\x2E\x69\x6F\x2F\x49\x6D\x61\x67\x65\x45\x78\x70\x6F\x72\x74\x32\x2F\x65\x78\x70\x6F\x72\x74","\x68\x74\x74\x70\x3A\x2F\x2F\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x3A\x33\x30\x30\x30","\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F","\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x2F","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x73\x68\x61\x70\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x69\x6D\x61\x67\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x73\x74\x79\x6C\x65\x73","\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x6F\x70\x65\x6E","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x72\x65\x73\x6F\x75\x72\x63\x65\x73","\x2F\x64\x69\x61","\x63\x75\x73\x74\x6F\x6D","\x4E\x47\x5F\x54\x52\x41\x4E\x53\x4C\x41\x54\x45\x5F\x4C\x41\x4E\x47\x5F\x4B\x45\x59","\x67\x65\x74\x49\x74\x65\x6D","\x6C\x6F\x67","\x65\x6E","\x65\x6E\x5F\x45\x4E","\x69\x74","\x6D\x78\x4C\x61\x6E\x67\x75\x61\x67\x65","\x61\x72","\x62\x73","\x63\x73","\x64\x61","\x64\x65","\x65\x6C","\x65\x73","\x65\x73\x2D\x61\x72","\x66\x72","\x68\x75","\x69\x64","\x6A\x61","\x6B\x6F","\x6E\x6C","\x6E\x6F","\x70\x6C","\x70\x74\x2D\x62\x72","\x70\x74","\x72\x6F","\x72\x75","\x73\x72","\x73\x76","\x74\x68","\x74\x72","\x75\x6B","\x7A\x68","\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68","\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x6A\x73","\x55\x53\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x55\x53\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x4D\x61\x6C\x65","\x55\x4B\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x55\x4B\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x4D\x61\x6C\x65","\x41\x75\x73\x74\x72\x61\x6C\x69\x61\x6E\x20\x45\x6E\x67\x6C\x69\x73\x68","\x55\x53\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x55\x53\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x4D\x61\x6C\x65","\x43\x68\x69\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x43\x68\x69\x6E\x65\x73\x65\x20\x4D\x61\x6C\x65","\x48\x6F\x6E\x67\x20\x4B\x6F\x6E\x67\x20\x43\x61\x6E\x74\x6F\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x54\x61\x69\x77\x61\x6E\x20\x43\x68\x69\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x4A\x61\x70\x61\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x4A\x61\x70\x61\x6E\x65\x73\x65\x20\x4D\x61\x6C\x65","\x4B\x6F\x72\x65\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x4B\x6F\x72\x65\x61\x6E\x20\x4D\x61\x6C\x65","\x43\x61\x6E\x61\x64\x69\x61\x6E\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x48\x75\x6E\x67\x61\x72\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x42\x72\x61\x7A\x69\x6C\x69\x61\x6E\x20\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x43\x61\x74\x61\x6C\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x43\x7A\x65\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x44\x61\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x46\x69\x6E\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x44\x75\x74\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x50\x6F\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x49\x74\x61\x6C\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x54\x75\x72\x6B\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65\x09","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x54\x75\x72\x6B\x69\x73\x68\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x47\x65\x72\x6D\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x47\x65\x72\x6D\x61\x6E\x20\x4D\x61\x6C\x65","\x52\x75\x73\x73\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x52\x75\x73\x73\x69\x61\x6E\x20\x4D\x61\x6C\x65","\x53\x77\x65\x64\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x43\x61\x6E\x61\x64\x69\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x43\x61\x6E\x61\x64\x69\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x4D\x61\x6C\x65","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x55\x53\x29","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x43\x61\x6E\x61\x64\x61\x29","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x55\x4B\x29","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x41\x75\x73\x74\x72\x61\x6C\x69\x61\x29","\x53\x70\x61\x6E\x69\x73\x68\x20\x28\x53\x70\x61\x69\x6E\x29","\x53\x70\x61\x6E\x69\x73\x68\x20\x28\x4D\x65\x78\x69\x63\x6F\x29","\x49\x74\x61\x6C\x69\x61\x6E\x20\x28\x49\x74\x61\x6C\x79\x29\x20\x2F\x20\x46\x69\x6E\x6E\x69\x73\x68\x20\x28\x46\x69\x6E\x6C\x61\x6E\x64\x29","\x46\x72\x65\x6E\x63\x68\x20\x28\x46\x72\x61\x6E\x63\x65\x29","\x46\x72\x65\x6E\x63\x68\x20\x28\x43\x61\x6E\x61\x64\x61\x29","\x50\x6F\x6C\x69\x73\x68\x20\x28\x50\x6F\x6C\x61\x6E\x64\x29","\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x28\x50\x6F\x72\x74\x75\x67\x61\x6C\x29","\x43\x61\x74\x61\x6C\x61\x6E\x20\x28\x43\x61\x74\x61\x6C\x61\x6E\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x54\x61\x69\x77\x61\x6E\x29","\x44\x61\x6E\x69\x73\x68\x20\x28\x44\x65\x6E\x6D\x61\x72\x6B\x29","\x47\x65\x72\x6D\x61\x6E\x20\x28\x47\x65\x72\x6D\x61\x6E\x79\x29","\x4A\x61\x70\x61\x6E\x65\x73\x65\x20\x28\x4A\x61\x70\x61\x6E\x29","\x4B\x6F\x72\x65\x61\x6E\x20\x28\x4B\x6F\x72\x65\x61\x29","\x44\x75\x74\x63\x68\x20\x28\x4E\x65\x74\x68\x65\x72\x6C\x61\x6E\x64\x73\x29","\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E\x20\x28\x4E\x6F\x72\x77\x61\x79\x29","\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x28\x42\x72\x61\x7A\x69\x6C\x29","\x52\x75\x73\x73\x69\x61\x6E\x20\x28\x52\x75\x73\x73\x69\x61\x29","\x53\x77\x65\x64\x69\x73\x68\x20\x28\x53\x77\x65\x64\x65\x6E\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x43\x68\x69\x6E\x61\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x48\x6F\x6E\x67\x20\x4B\x6F\x6E\x67\x29","\x44\x65\x66\x61\x75\x6C\x74","\x44\x61\x74\x65","\x55\x53\x20\x4D\x6F\x6E\x65\x79","\x4E\x75\x6D\x62\x65\x72\x73\x20\x74\x6F\x20\x39","\x4E\x75\x6D\x62\x65\x72\x73\x20\x74\x6F\x20\x39\x39","\x4E\x75\x6D\x62\x65\x72\x73\x20\x74\x6F\x20\x39\x39\x39","\x54\x69\x6D\x65","\x50\x68\x6F\x6E\x65\x20\x6E\x75\x6D\x62\x65\x72","\x53\x74\x72\x65\x65\x74\x73","\x55\x53\x20\x43\x69\x74\x79\x2F\x53\x74\x61\x74\x65\x73","\x41\x66\x72\x69\x6B\x61\x61\x6E\x73","\x41\x6C\x62\x61\x6E\x69\x61\x6E","\x41\x6D\x68\x61\x72\x69\x63","\x41\x72\x61\x62\x69\x63","\x41\x72\x6D\x65\x6E\x69\x61\x6E","\x41\x7A\x65\x72\x62\x61\x69\x6A\x61\x6E\x69","\x42\x61\x73\x71\x75\x65","\x42\x65\x6C\x61\x72\x75\x73\x69\x61\x6E","\x42\x65\x6E\x67\x61\x6C\x69","\x42\x69\x68\x61\x72\x69","\x42\x6F\x73\x6E\x69\x61\x6E","\x42\x72\x65\x74\x6F\x6E","\x42\x75\x6C\x67\x61\x72\x69\x61\x6E","\x43\x61\x6D\x62\x6F\x64\x69\x61\x6E","\x43\x61\x74\x61\x6C\x61\x6E","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x53\x69\x6D\x70\x6C\x69\x66\x69\x65\x64\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x54\x72\x61\x64\x69\x74\x69\x6F\x6E\x61\x6C\x29","\x43\x6F\x72\x73\x69\x63\x61\x6E","\x43\x72\x6F\x61\x74\x69\x61\x6E","\x43\x7A\x65\x63\x68","\x44\x61\x6E\x69\x73\x68","\x44\x75\x74\x63\x68","\x45\x6E\x67\x6C\x69\x73\x68","\x45\x73\x70\x65\x72\x61\x6E\x74\x6F","\x45\x73\x74\x6F\x6E\x69\x61\x6E","\x46\x61\x72\x6F\x65\x73\x65","\x46\x69\x6C\x69\x70\x69\x6E\x6F","\x46\x69\x6E\x6E\x69\x73\x68","\x46\x72\x65\x6E\x63\x68","\x46\x72\x69\x73\x69\x61\x6E","\x47\x61\x6C\x69\x63\x69\x61\x6E","\x47\x65\x6F\x72\x67\x69\x61\x6E","\x47\x65\x72\x6D\x61\x6E","\x47\x72\x65\x65\x6B","\x47\x75\x61\x72\x61\x6E\x69","\x47\x75\x6A\x61\x72\x61\x74\x69","\x48\x61\x63\x6B\x65\x72","\x48\x61\x75\x73\x61","\x48\x65\x62\x72\x65\x77","\x48\x69\x6E\x64\x69","\x48\x75\x6E\x67\x61\x72\x69\x61\x6E","\x49\x63\x65\x6C\x61\x6E\x64\x69\x63","\x49\x6E\x64\x6F\x6E\x65\x73\x69\x61\x6E","\x49\x6E\x74\x65\x72\x6C\x69\x6E\x67\x75\x61","\x49\x72\x69\x73\x68","\x49\x74\x61\x6C\x69\x61\x6E","\x4A\x61\x76\x61\x6E\x65\x73\x65","\x4A\x61\x70\x61\x6E\x65\x73\x65","\x4B\x61\x6E\x6E\x61\x64\x61","\x4B\x61\x7A\x61\x6B\x68","\x4B\x69\x6E\x79\x61\x72\x77\x61\x6E\x64\x61","\x4B\x69\x72\x75\x6E\x64\x69","\x4B\x6C\x69\x6E\x67\x6F\x6E","\x4B\x75\x72\x64\x69\x73\x68","\x4B\x6F\x72\x65\x61\x6E","\x4B\x79\x72\x67\x79\x7A","\x4C\x61\x6F\x74\x68\x69\x61\x6E","\x4C\x61\x74\x69\x6E","\x4C\x61\x74\x76\x69\x61\x6E","\x4C\x69\x6E\x67\x61\x6C\x61","\x4C\x69\x74\x68\x75\x61\x6E\x69\x61\x6E","\x4D\x61\x63\x65\x64\x6F\x6E\x69\x61\x6E","\x4D\x61\x6C\x61\x67\x61\x73\x79","\x4D\x61\x6C\x61\x79","\x4D\x61\x6C\x61\x79\x61\x6C\x61\x6D","\x4D\x61\x6C\x74\x65\x73\x65","\x4D\x61\x6F\x72\x69","\x4D\x61\x72\x61\x74\x68\x69","\x4D\x6F\x6C\x64\x61\x76\x69\x61\x6E","\x4D\x6F\x6E\x67\x6F\x6C\x69\x61\x6E","\x4D\x6F\x6E\x74\x65\x6E\x65\x67\x72\x69\x6E","\x4E\x65\x70\x61\x6C\x69","\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E","\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E\x20\x28\x4E\x79\x6E\x6F\x72\x73\x6B\x29","\x4F\x63\x63\x69\x74\x61\x6E","\x4F\x72\x69\x79\x61","\x4F\x72\x6F\x6D\x6F","\x50\x61\x73\x68\x74\x6F","\x50\x65\x72\x73\x69\x61\x6E","\x50\x69\x72\x61\x74\x65","\x50\x6F\x6C\x69\x73\x68","\x50\x75\x6E\x6A\x61\x62\x69","\x51\x75\x65\x63\x68\x75\x61","\x52\x6F\x6D\x61\x6E\x69\x61\x6E","\x52\x6F\x6D\x61\x6E\x73\x68","\x52\x75\x73\x73\x69\x61\x6E","\x53\x63\x6F\x74\x73\x20\x47\x61\x65\x6C\x69\x63","\x53\x65\x72\x62\x69\x61\x6E","\x53\x65\x72\x62\x6F\x2D\x43\x72\x6F\x61\x74\x69\x61\x6E","\x53\x65\x73\x6F\x74\x68\x6F","\x53\x68\x6F\x6E\x61","\x53\x69\x6E\x64\x68\x69","\x53\x69\x6E\x68\x61\x6C\x65\x73\x65","\x53\x6C\x6F\x76\x61\x6B","\x53\x6C\x6F\x76\x65\x6E\x69\x61\x6E","\x53\x6F\x6D\x61\x6C\x69","\x53\x70\x61\x6E\x69\x73\x68","\x53\x75\x6E\x64\x61\x6E\x65\x73\x65","\x53\x77\x61\x68\x69\x6C\x69","\x53\x77\x65\x64\x69\x73\x68","\x54\x61\x6A\x69\x6B","\x54\x61\x6D\x69\x6C","\x54\x61\x74\x61\x72","\x54\x65\x6C\x75\x67\x75","\x54\x68\x61\x69","\x54\x69\x67\x72\x69\x6E\x79\x61","\x54\x6F\x6E\x67\x61","\x54\x75\x72\x6B\x69\x73\x68","\x54\x75\x72\x6B\x6D\x65\x6E","\x54\x77\x69","\x55\x69\x67\x68\x75\x72","\x55\x6B\x72\x61\x69\x6E\x69\x61\x6E","\x55\x72\x64\x75","\x55\x7A\x62\x65\x6B","\x56\x69\x65\x74\x6E\x61\x6D\x65\x73\x65","\x57\x65\x6C\x73\x68","\x58\x68\x6F\x73\x61","\x59\x69\x64\x64\x69\x73\x68","\x59\x6F\x72\x75\x62\x61","\x5A\x75\x6C\x75"];var urlParams=(function(_0x8e68x2){var _0x8e68x3= new Object();var _0x8e68x4=_0x8e68x2[_0x11c7[3]](_0x11c7[2]);if(_0x8e68x4> 0){var _0x8e68x5=_0x8e68x2[_0x11c7[6]](_0x8e68x4+ 1)[_0x11c7[5]](_0x11c7[4]);for(var _0x8e68x6=0;_0x8e68x6< _0x8e68x5[_0x11c7[7]];_0x8e68x6++){_0x8e68x4= _0x8e68x5[_0x8e68x6][_0x11c7[9]](_0x11c7[8]);if(_0x8e68x4> 0){_0x8e68x3[_0x8e68x5[_0x8e68x6][_0x11c7[6]](0,_0x8e68x4)]= _0x8e68x5[_0x8e68x6][_0x11c7[6]](_0x8e68x4+ 1)}}};return _0x8e68x3})(window[_0x11c7[1]][_0x11c7[0]]);var t0= new Date();var MAX_REQUEST_SIZE=10485760;var MAX_WIDTH=12000;var MAX_HEIGHT=12000;var EXPORT_URL=_0x11c7[10];var SHARE_HOST=_0x11c7[11];var SAVE_URL=_0x11c7[12];var VARIABLE_URL=_0x11c7[13];var STENCIL_PATH=_0x11c7[14];var SHAPES_PATH=_0x11c7[15];var IMAGE_PATH=_0x11c7[16];var STYLE_PATH=_0x11c7[17];var CSS_PATH=_0x11c7[17];var OPEN_FORM=_0x11c7[18];var TEMPLATE_PATH=_0x11c7[19];var RESOURCES_PATH=_0x11c7[20];var RESOURCE_BASE=RESOURCES_PATH+ _0x11c7[21];var tapAndHoldStartsConnection=true;var showConnectorImg=true;var mxLoadResources=false;console[_0x11c7[25]](_0x11c7[22],localStorage[_0x11c7[24]](_0x11c7[23]));switch(localStorage[_0x11c7[24]](_0x11c7[23])){case _0x11c7[27]:mxLanguage= _0x11c7[26];break;case _0x11c7[28]:mxLanguage= _0x11c7[28];break;default:mxLanguage= _0x11c7[28]};console[_0x11c7[25]](_0x11c7[29],mxLanguage);var mxLanguages=[_0x11c7[30],_0x11c7[31],_0x11c7[32],_0x11c7[33],_0x11c7[34],_0x11c7[35],_0x11c7[36],_0x11c7[37],_0x11c7[38],_0x11c7[39],_0x11c7[40],_0x11c7[28],_0x11c7[41],_0x11c7[42],_0x11c7[43],_0x11c7[44],_0x11c7[45],_0x11c7[46],_0x11c7[47],_0x11c7[48],_0x11c7[49],_0x11c7[50],_0x11c7[51],_0x11c7[52],_0x11c7[53],_0x11c7[54],_0x11c7[55]];var mxBasePath=_0x11c7[56];var geBasePath=_0x11c7[57];var ISPEECHLANG={usenglishfemale:_0x11c7[58],usenglishmale:_0x11c7[59],ukenglishfemale:_0x11c7[60],ukenglishmale:_0x11c7[61],auenglishfemale:_0x11c7[62],usspanishfemale:_0x11c7[63],usspanishmale:_0x11c7[64],chchinesefemale:_0x11c7[65],chchinesemale:_0x11c7[66],hkchinesefemale:_0x11c7[67],twchinesefemale:_0x11c7[68],jpjapanesefemale:_0x11c7[69],jpjapanesemale:_0x11c7[70],krkoreanfemale:_0x11c7[71],krkoreanmale:_0x11c7[72],caenglishfemale:_0x11c7[73],huhungarianfemale:_0x11c7[74],brportuguesefemale:_0x11c7[75],eurportuguesefemale:_0x11c7[76],eurportuguesemale:_0x11c7[77],eurspanishfemale:_0x11c7[78],eurspanishmale:_0x11c7[79],eurcatalanfemale:_0x11c7[80],eurczechfemale:_0x11c7[81],eurdanishfemale:_0x11c7[82],eurfinnishfemale:_0x11c7[83],eurfrenchfemale:_0x11c7[84],eurfrenchmale:_0x11c7[85],eurnorwegianfemale:_0x11c7[86],eurdutchfemale:_0x11c7[87],eurpolishfemale:_0x11c7[88],euritalianfemale:_0x11c7[89],eurturkishfemale:_0x11c7[90],eurturkishmale:_0x11c7[91],eurgermanfemale:_0x11c7[92],eurgermanmale:_0x11c7[93],rurussianfemale:_0x11c7[94],rurussianmale:_0x11c7[95],swswedishfemale:_0x11c7[96],cafrenchfemale:_0x11c7[97],cafrenchmale:_0x11c7[98]};var ISPEECHASRLANG={"\x65\x6E\x2D\x55\x53":_0x11c7[99],"\x65\x6E\x2D\x43\x41":_0x11c7[100],"\x65\x6E\x2D\x47\x42":_0x11c7[101],"\x65\x6E\x2D\x41\x55":_0x11c7[102],"\x65\x73\x2D\x45\x53":_0x11c7[103],"\x65\x73\x2D\x4D\x58":_0x11c7[104],"\x69\x74\x2D\x49\x54":_0x11c7[105],"\x66\x72\x2D\x46\x52":_0x11c7[106],"\x66\x72\x2D\x43\x41":_0x11c7[107],"\x70\x6C\x2D\x50\x4C":_0x11c7[108],"\x70\x74\x2D\x50\x54":_0x11c7[109],"\x63\x61\x2D\x45\x53":_0x11c7[110],"\x7A\x68\x2D\x54\x57":_0x11c7[111],"\x64\x61\x2D\x44\x4B":_0x11c7[112],"\x66\x72\x2D\x46\x52":_0x11c7[113],"\x6A\x61\x2D\x4A\x50":_0x11c7[114],"\x6B\x6F\x2D\x4B\x52":_0x11c7[115],"\x6E\x6C\x2D\x4E\x4C":_0x11c7[116],"\x6E\x62\x2D\x4E\x4F":_0x11c7[117],"\x70\x74\x2D\x42\x52":_0x11c7[118],"\x72\x75\x2D\x52\x55":_0x11c7[119],"\x73\x76\x2D\x53\x45":_0x11c7[120],"\x7A\x68\x2D\x43\x4E":_0x11c7[121],"\x7A\x68\x2D\x48\x4B":_0x11c7[122]};var ISPEECHASRMODEL={0:_0x11c7[123],date:_0x11c7[124],usmoney:_0x11c7[125],numbersto9:_0x11c7[126],numbersto99:_0x11c7[127],numbersto999:_0x11c7[128],time:_0x11c7[129],phonenumber:_0x11c7[130],streets:_0x11c7[131],citystate:_0x11c7[132]};var GOOGLETTSLANG={"\x61\x66":_0x11c7[133],"\x73\x71":_0x11c7[134],"\x61\x6D":_0x11c7[135],"\x61\x72":_0x11c7[136],"\x68\x79":_0x11c7[137],"\x61\x7A":_0x11c7[138],"\x65\x75":_0x11c7[139],"\x62\x65":_0x11c7[140],"\x62\x6E":_0x11c7[141],"\x62\x68":_0x11c7[142],"\x62\x73":_0x11c7[143],"\x62\x72":_0x11c7[144],"\x62\x67":_0x11c7[145],"\x6B\x6D":_0x11c7[146],"\x63\x61":_0x11c7[147],"\x7A\x68\x2D\x43\x4E":_0x11c7[148],"\x7A\x68\x2D\x54\x57":_0x11c7[149],"\x63\x6F":_0x11c7[150],"\x68\x72":_0x11c7[151],"\x63\x73":_0x11c7[152],"\x64\x61":_0x11c7[153],"\x6E\x6C":_0x11c7[154],"\x65\x6E":_0x11c7[155],"\x65\x6F":_0x11c7[156],"\x65\x74":_0x11c7[157],"\x66\x6F":_0x11c7[158],"\x74\x6C":_0x11c7[159],"\x66\x69":_0x11c7[160],"\x66\x72":_0x11c7[161],"\x66\x79":_0x11c7[162],"\x67\x6C":_0x11c7[163],"\x6B\x61":_0x11c7[164],"\x64\x65":_0x11c7[165],"\x65\x6C":_0x11c7[166],"\x67\x6E":_0x11c7[167],"\x67\x75":_0x11c7[168],"\x78\x78\x2D\x68\x61\x63\x6B\x65\x72":_0x11c7[169],"\x68\x61":_0x11c7[170],"\x69\x77":_0x11c7[171],"\x68\x69":_0x11c7[172],"\x68\x75":_0x11c7[173],"\x69\x73":_0x11c7[174],"\x69\x64":_0x11c7[175],"\x69\x61":_0x11c7[176],"\x67\x61":_0x11c7[177],"\x69\x74":_0x11c7[178],"\x6A\x77":_0x11c7[179],"\x6A\x61":_0x11c7[180],"\x6B\x6E":_0x11c7[181],"\x6B\x6B":_0x11c7[182],"\x72\x77":_0x11c7[183],"\x72\x6E":_0x11c7[184],"\x78\x78\x2D\x6B\x6C\x69\x6E\x67\x6F\x6E":_0x11c7[185],"\x6B\x75":_0x11c7[186],"\x6B\x6F":_0x11c7[187],"\x6B\x79":_0x11c7[188],"\x6C\x6F":_0x11c7[189],"\x6C\x61":_0x11c7[190],"\x6C\x76":_0x11c7[191],"\x6C\x6E":_0x11c7[192],"\x6C\x74":_0x11c7[193],"\x6D\x6B":_0x11c7[194],"\x6D\x67":_0x11c7[195],"\x6D\x73":_0x11c7[196],"\x6D\x6C":_0x11c7[197],"\x6D\x74":_0x11c7[198],"\x6D\x69":_0x11c7[199],"\x6D\x72":_0x11c7[200],"\x6D\x6F":_0x11c7[201],"\x6D\x6E":_0x11c7[202],"\x73\x72\x2D\x4D\x45":_0x11c7[203],"\x6E\x65":_0x11c7[204],"\x6E\x6F":_0x11c7[205],"\x6E\x6E":_0x11c7[206],"\x6F\x63":_0x11c7[207],"\x6F\x72":_0x11c7[208],"\x6F\x6D":_0x11c7[209],"\x70\x73":_0x11c7[210],"\x66\x61":_0x11c7[211],"\x78\x78\x2D\x70\x69\x72\x61\x74\x65":_0x11c7[212],"\x70\x6C":_0x11c7[213],"\x70\x74\x2D\x42\x52":_0x11c7[118],"\x70\x74\x2D\x50\x54":_0x11c7[109],"\x70\x61":_0x11c7[214],"\x71\x75":_0x11c7[215],"\x72\x6F":_0x11c7[216],"\x72\x6D":_0x11c7[217],"\x72\x75":_0x11c7[218],"\x67\x64":_0x11c7[219],"\x73\x72":_0x11c7[220],"\x73\x68":_0x11c7[221],"\x73\x74":_0x11c7[222],"\x73\x6E":_0x11c7[223],"\x73\x64":_0x11c7[224],"\x73\x69":_0x11c7[225],"\x73\x6B":_0x11c7[226],"\x73\x6C":_0x11c7[227],"\x73\x6F":_0x11c7[228],"\x65\x73":_0x11c7[229],"\x73\x75":_0x11c7[230],"\x73\x77":_0x11c7[231],"\x73\x76":_0x11c7[232],"\x74\x67":_0x11c7[233],"\x74\x61":_0x11c7[234],"\x74\x74":_0x11c7[235],"\x74\x65":_0x11c7[236],"\x74\x68":_0x11c7[237],"\x74\x69":_0x11c7[238],"\x74\x6F":_0x11c7[239],"\x74\x72":_0x11c7[240],"\x74\x6B":_0x11c7[241],"\x74\x77":_0x11c7[242],"\x75\x67":_0x11c7[243],"\x75\x6B":_0x11c7[244],"\x75\x72":_0x11c7[245],"\x75\x7A":_0x11c7[246],"\x76\x69":_0x11c7[247],"\x63\x79":_0x11c7[248],"\x78\x68":_0x11c7[249],"\x79\x69":_0x11c7[250],"\x79\x6F":_0x11c7[251],"\x7A\x75":_0x11c7[252]}
\ No newline at end of file
diff --git a/public/assets/plugins/mxgraph/js/mxClient.js b/public/assets/plugins/mxgraph/js/mxClient.js
index e795889..f387e43 100644
--- a/public/assets/plugins/mxgraph/js/mxClient.js
+++ b/public/assets/plugins/mxgraph/js/mxClient.js
@@ -1,18737 +1 @@
-var mxClient = {
-  VERSION: "2.0.0.0",
-  IS_IE: 0 <= navigator.userAgent.indexOf("MSIE"),
-  IS_IE6: 0 <= navigator.userAgent.indexOf("MSIE 6"),
-  IS_QUIRKS: 0 <= navigator.userAgent.indexOf("MSIE") && (null == document.documentMode || 5 == document.documentMode),
-  VML_PREFIX: "v",
-  OFFICE_PREFIX: "o",
-  IS_NS: 0 <= navigator.userAgent.indexOf("Mozilla/") && 0 > navigator.userAgent.indexOf("MSIE"),
-  IS_OP: 0 <= navigator.userAgent.indexOf("Opera/"),
-  IS_OT: 0 > navigator.userAgent.indexOf("Presto/2.4.") && 0 > navigator.userAgent.indexOf("Presto/2.3.") && 0 > navigator.userAgent.indexOf("Presto/2.2.") &&
-    0 > navigator.userAgent.indexOf("Presto/2.1.") && 0 > navigator.userAgent.indexOf("Presto/2.0.") && 0 > navigator.userAgent.indexOf("Presto/1."),
-  IS_SF: 0 <= navigator.userAgent.indexOf("AppleWebKit/") && 0 > navigator.userAgent.indexOf("Chrome/"),
-  IS_GC: 0 <= navigator.userAgent.indexOf("Chrome/"),
-  IS_MT: 0 <= navigator.userAgent.indexOf("Firefox/") && 0 > navigator.userAgent.indexOf("Firefox/1.") && 0 > navigator.userAgent.indexOf("Firefox/2.") || 0 <= navigator.userAgent.indexOf(
-      "Iceweasel/") && 0 > navigator.userAgent.indexOf("Iceweasel/1.") &&
-    0 > navigator.userAgent.indexOf("Iceweasel/2.") || 0 <= navigator.userAgent.indexOf("SeaMonkey/") && 0 > navigator.userAgent.indexOf("SeaMonkey/1.") || 0 <= navigator.userAgent.indexOf(
-      "Iceape/") && 0 > navigator.userAgent.indexOf("Iceape/1."),
-  IS_SVG: 0 <= navigator.userAgent.indexOf("Firefox/") || 0 <= navigator.userAgent.indexOf("Iceweasel/") || 0 <= navigator.userAgent.indexOf("Seamonkey/") || 0 <= navigator.userAgent.indexOf(
-      "Iceape/") || 0 <= navigator.userAgent.indexOf("Galeon/") || 0 <= navigator.userAgent.indexOf("Epiphany/") || 0 <=
-    navigator.userAgent.indexOf("AppleWebKit/") || 0 <= navigator.userAgent.indexOf("Gecko/") || 0 <= navigator.userAgent.indexOf("Opera/"),
-  NO_FO: 0 <= navigator.userAgent.indexOf("Firefox/1.") || 0 <= navigator.userAgent.indexOf("Iceweasel/1.") || 0 <= navigator.userAgent.indexOf("Firefox/2.") || 0 <= navigator.userAgent.indexOf(
-      "Iceweasel/2.") || 0 <= navigator.userAgent.indexOf("SeaMonkey/1.") || 0 <= navigator.userAgent.indexOf("Iceape/1.") || 0 <= navigator.userAgent.indexOf("Camino/1.") || 0 <= navigator.userAgent
-    .indexOf("Epiphany/2.") ||
-    0 <= navigator.userAgent.indexOf("Opera/") || 0 <= navigator.userAgent.indexOf("MSIE") || 0 <= navigator.userAgent.indexOf("Mozilla/2."),
-  IS_VML: "MICROSOFT INTERNET EXPLORER" == navigator.appName.toUpperCase(),
-  IS_MAC: 0 < navigator.userAgent.toUpperCase().indexOf("MACINTOSH"),
-  IS_TOUCH: 0 < navigator.userAgent.toUpperCase().indexOf("IPAD") || 0 < navigator.userAgent.toUpperCase().indexOf("IPOD") || 0 < navigator.userAgent.toUpperCase().indexOf("IPHONE") || 0 <
-    navigator.userAgent.toUpperCase().indexOf("ANDROID"),
-  IS_LOCAL: 0 > document.location.href.indexOf("http://") &&
-    0 > document.location.href.indexOf("https://"),
-  isBrowserSupported: function() {
-    return mxClient.IS_VML || mxClient.IS_SVG
-  },
-  link: function(a, b, c) {
-    c = c || document;
-    if (mxClient.IS_IE6) c.write('\x3clink rel\x3d"' + a + '" href\x3d"' + b + '" charset\x3d"ISO-8859-1" type\x3d"text/css"/\x3e');
-    else {
-      var d = c.createElement("link");
-      d.setAttribute("rel", a);
-      d.setAttribute("href", b);
-      d.setAttribute("charset", "ISO-8859-1");
-      d.setAttribute("type", "text/css");
-      c.getElementsByTagName("head")[0].appendChild(d)
-    }
-  },
-  include: function(a) {
-    document.write('\x3cscript src\x3d"' +
-      a + '"\x3e\x3c/script\x3e')
-  },
-  dispose: function() {
-    for (var a = 0; a < mxEvent.objects.length; a++) null != mxEvent.objects[a].mxListenerList && mxEvent.removeAllListeners(mxEvent.objects[a])
-  }
-};
-mxClient.IS_OP && mxClient.IS_OT ? mxClient.CSS_PREFIX = "O" : mxClient.IS_SF || mxClient.IS_GC ? mxClient.CSS_PREFIX = "Webkit" : mxClient.IS_MT ? mxClient.CSS_PREFIX = "Moz" : mxClient.IS_IE && 9 <=
-  document.documentMode && (mxClient.CSS_PREFIX = "ms");
-"undefined" == typeof mxLoadResources && (mxLoadResources = !0);
-"undefined" == typeof mxResourceExtension && (mxResourceExtension = ".txt");
-"undefined" == typeof mxLoadStylesheets && (mxLoadStylesheets = !0);
-"undefined" != typeof mxBasePath && 0 < mxBasePath.length ? ("/" == mxBasePath.substring(mxBasePath.length - 1) && (mxBasePath = mxBasePath.substring(0, mxBasePath.length - 1)), mxClient.basePath =
-  mxBasePath) : mxClient.basePath = ".";
-"undefined" != typeof mxImageBasePath && 0 < mxImageBasePath.length ? ("/" == mxImageBasePath.substring(mxImageBasePath.length - 1) && (mxImageBasePath = mxImageBasePath.substring(0, mxImageBasePath.length -
-  1)), mxClient.imageBasePath = mxImageBasePath) : mxClient.imageBasePath = mxClient.basePath + "/images";
-mxClient.language = "undefined" != typeof mxLanguage ? mxLanguage : mxClient.IS_IE ? navigator.userLanguage : navigator.language;
-mxClient.defaultLanguage = "undefined" != typeof mxDefaultLanguage ? mxDefaultLanguage : "en";
-mxLoadStylesheets && mxClient.link("stylesheet", mxClient.basePath + "/css/common.css");
-"undefined" != typeof mxLanguages && (mxClient.languages = mxLanguages);
-if (mxClient.IS_IE) {
-  if (9 <= document.documentMode) mxClient.IS_VML = !1, mxClient.IS_SVG = !0;
-  else {
-    8 == document.documentMode ? (document.namespaces.add(mxClient.VML_PREFIX, "urn:schemas-microsoft-com:vml", "#default#VML"), document.namespaces.add(mxClient.OFFICE_PREFIX,
-      "urn:schemas-microsoft-com:office:office", "#default#VML")) : (document.namespaces.add(mxClient.VML_PREFIX, "urn:schemas-microsoft-com:vml"), document.namespaces.add(mxClient.OFFICE_PREFIX,
-      "urn:schemas-microsoft-com:office:office"));
-    var ss = document.createStyleSheet();
-    ss.cssText = "v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}";
-    mxLoadStylesheets && mxClient.link("stylesheet", mxClient.basePath + "/css/explorer.css")
-  }
-  window.attachEvent("onunload", mxClient.dispose)
-}
-var mxLog = {
-    consoleName: "Console",
-    TRACE: !1,
-    DEBUG: !0,
-    WARN: !0,
-    buffer: "",
-    init: function() {
-      if (null == mxLog.window && null != document.body) {
-        var a = mxLog.consoleName + " - mxGraph " + mxClient.VERSION,
-          b = document.createElement("table");
-        b.setAttribute("width", "100%");
-        b.setAttribute("height", "100%");
-        var c = document.createElement("tbody"),
-          d = document.createElement("tr"),
-          e = document.createElement("td");
-        e.style.verticalAlign = "top";
-        mxLog.textarea = document.createElement("textarea");
-        mxLog.textarea.setAttribute("readOnly", "true");
-        mxLog.textarea.style.height = "100%";
-        mxLog.textarea.style.resize = "none";
-        mxLog.textarea.value = mxLog.buffer;
-        mxLog.textarea.style.width = mxClient.IS_NS && "BackCompat" != document.compatMode ? "99%" : "100%";
-        e.appendChild(mxLog.textarea);
-        d.appendChild(e);
-        c.appendChild(d);
-        d = document.createElement("tr");
-        mxLog.td = document.createElement("td");
-        mxLog.td.style.verticalAlign = "top";
-        mxLog.td.setAttribute("height", "30px");
-        d.appendChild(mxLog.td);
-        c.appendChild(d);
-        b.appendChild(c);
-        mxLog.addButton("Info", function(a) {
-          mxLog.info()
-        });
-        mxLog.addButton("DOM", function(a) {
-          a = mxUtils.getInnerHtml(document.body);
-          mxLog.debug(a)
-        });
-        mxLog.addButton("Trace", function(a) {
-          mxLog.TRACE = !mxLog.TRACE;
-          mxLog.TRACE ? mxLog.debug("Tracing enabled") : mxLog.debug("Tracing disabled")
-        });
-        mxLog.addButton("Copy", function(a) {
-          try {
-            mxUtils.copy(mxLog.textarea.value)
-          } catch (b) {
-            mxUtils.alert(b)
-          }
-        });
-        mxLog.addButton("Show", function(a) {
-          try {
-            mxUtils.popup(mxLog.textarea.value)
-          } catch (b) {
-            mxUtils.alert(b)
-          }
-        });
-        mxLog.addButton("Clear", function(a) {
-          mxLog.textarea.value = ""
-        });
-        d = c = 0;
-        "number" === typeof window.innerWidth ? (c = window.innerHeight, d = window.innerWidth) : (c = document.documentElement.clientHeight || document.body.clientHeight, d = document.body.clientWidth);
-        mxLog.window = new mxWindow(a, b, Math.max(0, d - 320), Math.max(0, c - 210), 300, 160);
-        mxLog.window.setMaximizable(!0);
-        mxLog.window.setScrollable(!1);
-        mxLog.window.setResizable(!0);
-        mxLog.window.setClosable(!0);
-        mxLog.window.destroyOnClose = !1;
-        if ((mxClient.IS_NS || mxClient.IS_IE) && !mxClient.IS_GC && !mxClient.IS_SF && "BackCompat" != document.compatMode) {
-          var f =
-            mxLog.window.getElement(),
-            a = function(a, b) {
-              mxLog.textarea.style.height = Math.max(0, f.offsetHeight - 70) + "px"
-            };
-          mxLog.window.addListener(mxEvent.RESIZE_END, a);
-          mxLog.window.addListener(mxEvent.MAXIMIZE, a);
-          mxLog.window.addListener(mxEvent.NORMALIZE, a);
-          mxLog.textarea.style.height = "92px"
-        }
-      }
-    },
-    info: function() {
-      mxLog.writeln(mxUtils.toString(navigator))
-    },
-    addButton: function(a, b) {
-      var c = document.createElement("button");
-      mxUtils.write(c, a);
-      mxEvent.addListener(c, "click", b);
-      mxLog.td.appendChild(c)
-    },
-    isVisible: function() {
-      return null !=
-        mxLog.window ? mxLog.window.isVisible() : !1
-    },
-    show: function() {
-      mxLog.setVisible(!0)
-    },
-    setVisible: function(a) {
-      null == mxLog.window && mxLog.init();
-      null != mxLog.window && mxLog.window.setVisible(a)
-    },
-    enter: function(a) {
-      if (mxLog.TRACE) return mxLog.writeln("Entering " + a), (new Date).getTime()
-    },
-    leave: function(a, b) {
-      if (mxLog.TRACE) {
-        var c = 0 != b ? " (" + ((new Date).getTime() - b) + " ms)" : "";
-        mxLog.writeln("Leaving " + a + c)
-      }
-    },
-    debug: function() {
-      mxLog.DEBUG && mxLog.writeln.apply(this, arguments)
-    },
-    warn: function() {
-      mxLog.WARN && mxLog.writeln.apply(this,
-        arguments)
-    },
-    write: function() {
-      for (var a = "", b = 0; b < arguments.length; b++) a += arguments[b], b < arguments.length - 1 && (a += " ");
-      null != mxLog.textarea ? (mxLog.textarea.value += a, 0 <= navigator.userAgent.indexOf("Presto/2.5") && (mxLog.textarea.style.visibility = "hidden", mxLog.textarea.style.visibility = "visible"),
-        mxLog.textarea.scrollTop = mxLog.textarea.scrollHeight) : mxLog.buffer += a
-    },
-    writeln: function() {
-      for (var a = "", b = 0; b < arguments.length; b++) a += arguments[b], b < arguments.length - 1 && (a += " ");
-      mxLog.write(a + "\n")
-    }
-  },
-  mxObjectIdentity = {
-    FIELD_NAME: "mxObjectId",
-    counter: 0,
-    get: function(a) {
-      if ("object" == typeof a && null == a[mxObjectIdentity.FIELD_NAME]) {
-        var b = mxUtils.getFunctionName(a.constructor);
-        a[mxObjectIdentity.FIELD_NAME] = b + "#" + mxObjectIdentity.counter++
-      }
-      return a[mxObjectIdentity.FIELD_NAME]
-    },
-    clear: function(a) {
-      "object" == typeof a && delete a[mxObjectIdentity.FIELD_NAME]
-    }
-  };
-
-function mxDictionary() {
-  this.clear()
-}
-mxDictionary.prototype.map = null;
-mxDictionary.prototype.clear = function() {
-  this.map = {}
-};
-mxDictionary.prototype.get = function(a) {
-  a = mxObjectIdentity.get(a);
-  return this.map[a]
-};
-mxDictionary.prototype.put = function(a, b) {
-  var c = mxObjectIdentity.get(a),
-    d = this.map[c];
-  this.map[c] = b;
-  return d
-};
-mxDictionary.prototype.remove = function(a) {
-  a = mxObjectIdentity.get(a);
-  var b = this.map[a];
-  delete this.map[a];
-  return b
-};
-mxDictionary.prototype.getKeys = function() {
-  var a = [],
-    b;
-  for (b in this.map) a.push(b);
-  return a
-};
-mxDictionary.prototype.getValues = function() {
-  var a = [],
-    b;
-  for (b in this.map) a.push(this.map[b]);
-  return a
-};
-mxDictionary.prototype.visit = function(a) {
-  for (var b in this.map) a(b, this.map[b])
-};
-var mxResources = {
-  resources: [],
-  extension: mxResourceExtension,
-  resourcesEncoded: !1,
-  loadDefaultBundle: !0,
-  loadSpecialBundle: !0,
-  isLanguageSupported: function(a) {
-    return null != mxClient.languages ? 0 <= mxUtils.indexOf(mxClient.languages, a) : !0
-  },
-  getDefaultBundle: function(a, b) {
-    return mxResources.loadDefaultBundle || !mxResources.isLanguageSupported(b) ? a + mxResources.extension : null
-  },
-  getSpecialBundle: function(a, b) {
-    if (null == mxClient.languages || !this.isLanguageSupported(b)) {
-      var c = b.indexOf("-");
-      0 < c && (b = b.substring(0, c))
-    }
-    return mxResources.loadSpecialBundle &&
-      mxResources.isLanguageSupported(b) && b != mxClient.defaultLanguage ? a + "_" + b + mxResources.extension : null
-  },
-  add: function(a, b) {
-    b = null != b ? b : mxClient.language.toLowerCase();
-    if (b != mxConstants.NONE) {
-      var c = mxResources.getDefaultBundle(a, b);
-      if (null != c) try {
-        var d = mxUtils.load(c);
-        d.isReady() && mxResources.parse(d.getText())
-      } catch (e) {}
-      c = mxResources.getSpecialBundle(a, b);
-      if (null != c) try {
-        d = mxUtils.load(c), d.isReady() && mxResources.parse(d.getText())
-      } catch (f) {}
-    }
-  },
-  parse: function(a) {
-    if (null != a) {
-      a = a.split("\n");
-      for (var b = 0; b <
-        a.length; b++)
-        if ("#" != a[b].charAt(0)) {
-          var c = a[b].indexOf("\x3d");
-          if (0 < c) {
-            var d = a[b].substring(0, c),
-              e = a[b].length;
-            13 == a[b].charCodeAt(e - 1) && e--;
-            c = a[b].substring(c + 1, e);
-            this.resourcesEncoded ? (c = c.replace(/\\(?=u[a-fA-F\d]{4})/g, "%"), mxResources.resources[d] = unescape(c)) : mxResources.resources[d] = c
-          }
-        }
-    }
-  },
-  get: function(a, b, c) {
-    a = mxResources.resources[a];
-    null == a && (a = c);
-    if (null != a && null != b) {
-      c = [];
-      for (var d = null, e = 0; e < a.length; e++) {
-        var f = a.charAt(e);
-        "{" == f ? d = "" : null != d && "}" == f ? (d = parseInt(d) - 1, 0 <= d && d < b.length &&
-          c.push(b[d]), d = null) : null != d ? d += f : c.push(f)
-      }
-      a = c.join("")
-    }
-    return a
-  }
-};
-
-function mxPoint(a, b) {
-  this.x = null != a ? a : 0;
-  this.y = null != b ? b : 0
-}
-mxPoint.prototype.x = null;
-mxPoint.prototype.y = null;
-mxPoint.prototype.equals = function(a) {
-  return a.x == this.x && a.y == this.y
-};
-mxPoint.prototype.clone = function() {
-  return mxUtils.clone(this)
-};
-
-function mxRectangle(a, b, c, d) {
-  mxPoint.call(this, a, b);
-  this.width = null != c ? c : 0;
-  this.height = null != d ? d : 0
-}
-mxRectangle.prototype = new mxPoint;
-mxRectangle.prototype.constructor = mxRectangle;
-mxRectangle.prototype.width = null;
-mxRectangle.prototype.height = null;
-mxRectangle.prototype.setRect = function(a, b, c, d) {
-  this.x = a;
-  this.y = b;
-  this.width = c;
-  this.height = d
-};
-mxRectangle.prototype.getCenterX = function() {
-  return this.x + this.width / 2
-};
-mxRectangle.prototype.getCenterY = function() {
-  return this.y + this.height / 2
-};
-mxRectangle.prototype.add = function(a) {
-  if (null != a) {
-    var b = Math.min(this.x, a.x),
-      c = Math.min(this.y, a.y),
-      d = Math.max(this.x + this.width, a.x + a.width);
-    a = Math.max(this.y + this.height, a.y + a.height);
-    this.x = b;
-    this.y = c;
-    this.width = d - b;
-    this.height = a - c
-  }
-};
-mxRectangle.prototype.grow = function(a) {
-  this.x -= a;
-  this.y -= a;
-  this.width += 2 * a;
-  this.height += 2 * a
-};
-mxRectangle.prototype.getPoint = function() {
-  return new mxPoint(this.x, this.y)
-};
-mxRectangle.prototype.equals = function(a) {
-  return a.x == this.x && a.y == this.y && a.width == this.width && a.height == this.height
-};
-var mxEffects = {
-    animateChanges: function(a, b, c) {
-      var d = 0,
-        e = function() {
-          for (var g = !1, h = 0; h < b.length; h++) {
-            var k = b[h];
-            if (k instanceof mxGeometryChange || k instanceof mxTerminalChange || k instanceof mxValueChange || k instanceof mxChildChange || k instanceof mxStyleChange) {
-              var l = a.getView().getState(k.cell || k.child, !1);
-              if (null != l)
-                if (g = !0, k.constructor != mxGeometryChange || a.model.isEdge(k.cell)) mxUtils.setOpacity(l.shape.node, 100 * d / 10);
-                else {
-                  var m = a.getView().scale,
-                    n = (k.geometry.x - k.previous.x) * m,
-                    p = (k.geometry.y -
-                      k.previous.y) * m,
-                    q = (k.geometry.width - k.previous.width) * m,
-                    m = (k.geometry.height - k.previous.height) * m;
-                  0 == d ? (l.x -= n, l.y -= p, l.width -= q, l.height -= m) : (l.x += n / 10, l.y += p / 10, l.width += q / 10, l.height += m / 10);
-                  a.cellRenderer.redraw(l);
-                  mxEffects.cascadeOpacity(a, k.cell, 100 * d / 10)
-                }
-            }
-          }
-          10 > d && g ? (d++, window.setTimeout(e, f)) : null != c && c()
-        },
-        f = 30;
-      e()
-    },
-    cascadeOpacity: function(a, b, c) {
-      for (var d = a.model.getChildCount(b), e = 0; e < d; e++) {
-        var f = a.model.getChildAt(b, e),
-          g = a.getView().getState(f);
-        null != g && (mxUtils.setOpacity(g.shape.node,
-          c), mxEffects.cascadeOpacity(a, f, c))
-      }
-      b = a.model.getEdges(b);
-      if (null != b)
-        for (e = 0; e < b.length; e++) d = a.getView().getState(b[e]), null != d && mxUtils.setOpacity(d.shape.node, c)
-    },
-    fadeOut: function(a, b, c, d, e, f) {
-      d = d || 40;
-      e = e || 30;
-      var g = b || 100;
-      mxUtils.setOpacity(a, g);
-      if (f || null == f) {
-        var h = function() {
-          g = Math.max(g - d, 0);
-          mxUtils.setOpacity(a, g);
-          0 < g ? window.setTimeout(h, e) : (a.style.visibility = "hidden", c && a.parentNode && a.parentNode.removeChild(a))
-        };
-        window.setTimeout(h, e)
-      } else a.style.visibility = "hidden", c && a.parentNode && a.parentNode.removeChild(a)
-    }
-  },
-  mxUtils = {
-    errorResource: "none" != mxClient.language ? "error" : "",
-    closeResource: "none" != mxClient.language ? "close" : "",
-    errorImage: mxClient.imageBasePath + "/error.gif",
-    removeCursors: function(a) {
-      null != a.style && (a.style.cursor = "");
-      a = a.childNodes;
-      if (null != a)
-        for (var b = a.length, c = 0; c < b; c += 1) mxUtils.removeCursors(a[c])
-    },
-    getCurrentStyle: function() {
-      return mxClient.IS_IE ? function(a) {
-        return null != a ? a.currentStyle : null
-      } : function(a) {
-        return null != a ? window.getComputedStyle(a, "") : null
-      }
-    }(),
-    hasScrollbars: function(a) {
-      a = mxUtils.getCurrentStyle(a);
-      return null != a && ("scroll" == a.overflow || "auto" == a.overflow)
-    },
-    bind: function(a, b) {
-      return function() {
-        return b.apply(a, arguments)
-      }
-    },
-    eval: function(a) {
-      var b = null;
-      if (0 <= a.indexOf("function")) try {
-        eval("var _mxJavaScriptExpression\x3d" + a), b = _mxJavaScriptExpression, _mxJavaScriptExpression = null
-      } catch (c) {
-        mxLog.warn(c.message + " while evaluating " + a)
-      } else try {
-        b = eval(a)
-      } catch (d) {
-        mxLog.warn(d.message + " while evaluating " + a)
-      }
-      return b
-    },
-    findNode: function(a, b, c) {
-      var d = a.getAttribute(b);
-      if (null != d && d == c) return a;
-      for (a =
-        a.firstChild; null != a;) {
-        d = mxUtils.findNode(a, b, c);
-        if (null != d) return d;
-        a = a.nextSibling
-      }
-      return null
-    },
-    findNodeByAttribute: function() {
-      return 9 <= document.documentMode ? function(a, b, c) {
-        var d = null;
-        if (null != a)
-          if (a.nodeType == mxConstants.NODETYPE_ELEMENT && a.getAttribute(b) == c) d = a;
-          else
-            for (a = a.firstChild; null != a && null == d;) d = mxUtils.findNodeByAttribute(a, b, c), a = a.nextSibling;
-        return d
-      } : mxClient.IS_IE ? function(a, b, c) {
-        return null == a ? null : a.ownerDocument.selectSingleNode("//*[@" + b + "\x3d'" + c + "']")
-      } : function(a, b, c) {
-        return null ==
-          a ? null : a.ownerDocument.evaluate("//*[@" + b + "\x3d'" + c + "']", a.ownerDocument, null, XPathResult.ANY_TYPE, null).iterateNext()
-      }
-    }(),
-    getFunctionName: function(a) {
-      var b = null;
-      if (null != a)
-        if (null != a.name) b = a.name;
-        else {
-          a = a.toString();
-          for (b = 9;
-            " " == a.charAt(b);) b++;
-          var c = a.indexOf("(", b),
-            b = a.substring(b, c)
-        }
-      return b
-    },
-    indexOf: function(a, b) {
-      if (null != a && null != b)
-        for (var c = 0; c < a.length; c++)
-          if (a[c] == b) return c;
-      return -1
-    },
-    remove: function(a, b) {
-      var c = null;
-      if ("object" == typeof b)
-        for (var d = mxUtils.indexOf(b, a); 0 <= d;) b.splice(d,
-          1), c = a, d = mxUtils.indexOf(b, a);
-      for (var e in b) b[e] == a && (delete b[e], c = a);
-      return c
-    },
-    isNode: function(a, b, c, d) {
-      return null != a && !isNaN(a.nodeType) && (null == b || a.nodeName.toLowerCase() == b.toLowerCase()) ? null == c || a.getAttribute(c) == d : !1
-    },
-    getChildNodes: function(a, b) {
-      b = b || mxConstants.NODETYPE_ELEMENT;
-      for (var c = [], d = a.firstChild; null != d;) d.nodeType == b && c.push(d), d = d.nextSibling;
-      return c
-    },
-    createXmlDocument: function() {
-      var a = null;
-      document.implementation && document.implementation.createDocument ? a = document.implementation.createDocument("",
-        "", null) : window.ActiveXObject && (a = new ActiveXObject("Microsoft.XMLDOM"));
-      return a
-    },
-    parseXml: function() {
-      return mxClient.IS_IE && ("undefined" === typeof document.documentMode || 9 > document.documentMode) ? function(a) {
-        var b = mxUtils.createXmlDocument();
-        b.async = "false";
-        b.loadXML(a);
-        return b
-      } : function(a) {
-        return (new DOMParser).parseFromString(a, "text/xml")
-      }
-    }(),
-    clearSelection: function() {
-      if (document.selection) return function() {
-        document.selection.empty()
-      };
-      if (window.getSelection) return function() {
-        window.getSelection().removeAllRanges()
-      }
-    }(),
-    getPrettyXml: function(a, b, c) {
-      var d = [];
-      if (null != a)
-        if (b = b || "  ", c = c || "", a.nodeType == mxConstants.NODETYPE_TEXT) d.push(a.nodeValue);
-        else {
-          d.push(c + "\x3c" + a.nodeName);
-          var e = a.attributes;
-          if (null != e)
-            for (var f = 0; f < e.length; f++) {
-              var g = mxUtils.htmlEntities(e[f].nodeValue);
-              d.push(" " + e[f].nodeName + '\x3d"' + g + '"')
-            }
-          e = a.firstChild;
-          if (null != e) {
-            for (d.push("\x3e\n"); null != e;) d.push(mxUtils.getPrettyXml(e, b, c + b)), e = e.nextSibling;
-            d.push(c + "\x3c/" + a.nodeName + "\x3e\n")
-          } else d.push("/\x3e\n")
-        }
-      return d.join("")
-    },
-    removeWhitespace: function(a,
-      b) {
-      for (var c = b ? a.previousSibling : a.nextSibling; null != c && c.nodeType == mxConstants.NODETYPE_TEXT;) {
-        var d = b ? c.previousSibling : c.nextSibling,
-          e = mxUtils.getTextContent(c);
-        0 == mxUtils.trim(e).length && c.parentNode.removeChild(c);
-        c = d
-      }
-    },
-    htmlEntities: function(a, b) {
-      a = (a || "").replace(/&/g, "\x26amp;");
-      a = a.replace(/"/g, "\x26quot;");
-      a = a.replace(/\'/g, "\x26#39;");
-      a = a.replace(/</g, "\x26lt;");
-      a = a.replace(/>/g, "\x26gt;");
-      if (null == b || b) a = a.replace(/\n/g, "\x26#xa;");
-      return a
-    },
-    isVml: function(a) {
-      return null != a && "urn:schemas-microsoft-com:vml" ==
-        a.tagUrn
-    },
-    getXml: function(a, b) {
-      var c = "";
-      null != a && (c = a.xml, c = null == c ? a.innerHTML ? a.innerHTML : (new XMLSerializer).serializeToString(a) : c.replace(/\r\n\t[\t]*/g, "").replace(/>\r\n/g, "\x3e").replace(/\r\n/g, "\n"));
-      return c = c.replace(/\n/g, b || "\x26#xa;")
-    },
-    getTextContent: function(a) {
-      var b = "";
-      null != a && (null != a.firstChild && (a = a.firstChild), b = a.nodeValue || "");
-      return b
-    },
-    getInnerHtml: function() {
-      return mxClient.IS_IE ? function(a) {
-        return null != a ? a.innerHTML : ""
-      } : function(a) {
-        return null != a ? (new XMLSerializer).serializeToString(a) :
-          ""
-      }
-    }(),
-    getOuterHtml: function() {
-      return mxClient.IS_IE ? function(a) {
-        if (null != a) {
-          if (null != a.outerHTML) return a.outerHTML;
-          var b = [];
-          b.push("\x3c" + a.nodeName);
-          var c = a.attributes;
-          if (null != c)
-            for (var d = 0; d < c.length; d++) {
-              var e = c[d].nodeValue;
-              null != e && 0 < e.length && (b.push(" "), b.push(c[d].nodeName), b.push('\x3d"'), b.push(e), b.push('"'))
-            }
-          0 == a.innerHTML.length ? b.push("/\x3e") : (b.push("\x3e"), b.push(a.innerHTML), b.push("\x3c/" + a.nodeName + "\x3e"));
-          return b.join("")
-        }
-        return ""
-      } : function(a) {
-        return null != a ? (new XMLSerializer).serializeToString(a) :
-          ""
-      }
-    }(),
-    write: function(a, b) {
-      var c = a.ownerDocument.createTextNode(b);
-      null != a && a.appendChild(c);
-      return c
-    },
-    writeln: function(a, b) {
-      var c = a.ownerDocument.createTextNode(b);
-      null != a && (a.appendChild(c), a.appendChild(document.createElement("br")));
-      return c
-    },
-    br: function(a, b) {
-      b = b || 1;
-      for (var c = null, d = 0; d < b; d++) null != a && (c = a.ownerDocument.createElement("br"), a.appendChild(c));
-      return c
-    },
-    button: function(a, b, c) {
-      c = null != c ? c : document;
-      c = c.createElement("button");
-      mxUtils.write(c, a);
-      mxEvent.addListener(c, "click", function(a) {
-        b(a)
-      });
-      return c
-    },
-    para: function(a, b) {
-      var c = document.createElement("p");
-      mxUtils.write(c, b);
-      null != a && a.appendChild(c);
-      return c
-    },
-    addTransparentBackgroundFilter: function(a) {
-      a.style.filter += "progid:DXImageTransform.Microsoft.AlphaImageLoader(src\x3d'" + mxClient.imageBasePath + "/transparent.gif', sizingMethod\x3d'scale')"
-    },
-    linkAction: function(a, b, c, d, e) {
-      return mxUtils.link(a, b, function() {
-        c.execute(d)
-      }, e)
-    },
-    linkInvoke: function(a, b, c, d, e, f) {
-      return mxUtils.link(a, b, function() {
-        c[d](e)
-      }, f)
-    },
-    link: function(a, b, c, d) {
-      var e =
-        document.createElement("span");
-      e.style.color = "blue";
-      e.style.textDecoration = "underline";
-      e.style.cursor = "pointer";
-      null != d && (e.style.paddingLeft = d + "px");
-      mxEvent.addListener(e, "click", c);
-      mxUtils.write(e, b);
-      null != a && a.appendChild(e);
-      return e
-    },
-    fit: function(a) {
-      var b = parseInt(a.offsetLeft),
-        c = parseInt(a.offsetWidth),
-        d = document.body,
-        e = document.documentElement,
-        f = (d.scrollLeft || e.scrollLeft) + (d.clientWidth || e.clientWidth);
-      b + c > f && (a.style.left = Math.max(d.scrollLeft || e.scrollLeft, f - c) + "px");
-      b = parseInt(a.offsetTop);
-      c = parseInt(a.offsetHeight);
-      f = (d.scrollTop || e.scrollTop) + Math.max(d.clientHeight || 0, e.clientHeight);
-      b + c > f && (a.style.top = Math.max(d.scrollTop || e.scrollTop, f - c) + "px")
-    },
-    open: function(a) {
-      if (mxClient.IS_NS) {
-        try {
-          netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
-        } catch (b) {
-          return mxUtils.alert("Permission to read file denied."), ""
-        }
-        var c = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
-        c.initWithPath(a);
-        if (!c.exists()) return mxUtils.alert("File not found."),
-          "";
-        a = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);
-        a.init(c, 1, 4, null);
-        c = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(Components.interfaces.nsIScriptableInputStream);
-        c.init(a);
-        return c.read(c.available())
-      }
-      c = (new ActiveXObject("Scripting.FileSystemObject")).OpenTextFile(a, 1);
-      a = c.readAll();
-      c.close();
-      return a
-    },
-    save: function(a, b) {
-      if (mxClient.IS_NS) {
-        try {
-          netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
-        } catch (c) {
-          mxUtils.alert("Permission to write file denied.");
-          return
-        }
-        var d = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
-        d.initWithPath(a);
-        d.exists() || d.create(0, 420);
-        var e = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);
-        e.init(d, 34, 4, null);
-        e.write(b, b.length);
-        e.flush();
-        e.close()
-      } else d = (new ActiveXObject("Scripting.FileSystemObject")).CreateTextFile(a, !0), d.Write(b), d.Close()
-    },
-    saveAs: function(a) {
-      var b = document.createElement("iframe");
-      b.setAttribute("src", "");
-      b.style.visibility = "hidden";
-      document.body.appendChild(b);
-      try {
-        if (mxClient.IS_NS) {
-          var c = b.contentDocument;
-          c.open();
-          c.write(a);
-          c.close();
-          try {
-            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"), b.focus(), saveDocument(c)
-          } catch (d) {
-            mxUtils.alert("Permission to save document denied.")
-          }
-        } else c = b.contentWindow.document, c.write(a), c.execCommand("SaveAs", !1, document.location)
-      } finally {
-        document.body.removeChild(b)
-      }
-    },
-    copy: function(a) {
-      if (window.clipboardData) window.clipboardData.setData("Text",
-        a);
-      else {
-        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-        var b = Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);
-        if (b) {
-          var c = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
-          if (c) {
-            c.addDataFlavor("text/unicode");
-            var d = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
-            d.data = a;
-            c.setTransferData("text/unicode",
-              d, 2 * a.length);
-            b.setData(c, null, Components.interfaces.nsIClipboard.kGlobalClipboard)
-          }
-        }
-      }
-    },
-    load: function(a) {
-      a = new mxXmlRequest(a, null, "GET", !1);
-      a.send();
-      return a
-    },
-    get: function(a, b, c) {
-      return (new mxXmlRequest(a, null, "GET")).send(b, c)
-    },
-    post: function(a, b, c, d) {
-      return (new mxXmlRequest(a, b)).send(c, d)
-    },
-    submit: function(a, b, c, d) {
-      return (new mxXmlRequest(a, b)).simulate(c, d)
-    },
-    loadInto: function(a, b, c) {
-      mxClient.IS_IE ? b.onreadystatechange = function() {
-        4 == b.readyState && c()
-      } : b.addEventListener("load", c, !1);
-      b.load(a)
-    },
-    getValue: function(a, b, c) {
-      a = null != a ? a[b] : null;
-      null == a && (a = c);
-      return a
-    },
-    getNumber: function(a, b, c) {
-      a = null != a ? a[b] : null;
-      null == a && (a = c || 0);
-      return Number(a)
-    },
-    getColor: function(a, b, c) {
-      a = null != a ? a[b] : null;
-      null == a ? a = c : a == mxConstants.NONE && (a = null);
-      return a
-    },
-    clone: function(a, b, c) {
-      c = null != c ? c : !1;
-      var d = null;
-      if (null != a && "function" == typeof a.constructor) {
-        var d = new a.constructor,
-          e;
-        for (e in a)
-          if (e != mxObjectIdentity.FIELD_NAME && (null == b || 0 > mxUtils.indexOf(b, e))) d[e] = !c && "object" == typeof a[e] ? mxUtils.clone(a[e]) : a[e]
-      }
-      return d
-    },
-    equalPoints: function(a, b) {
-      if (null == a && null != b || null != a && null == b || null != a && null != b && a.length != b.length) return !1;
-      if (null != a && null != b)
-        for (var c = 0; c < a.length; c++)
-          if (a[c] == b[c] || null != a[c] && !a[c].equals(b[c])) return !1;
-      return !0
-    },
-    equalEntries: function(a, b) {
-      if (null == a && null != b || null != a && null == b || null != a && null != b && a.length != b.length) return !1;
-      if (null != a && null != b)
-        for (var c in a)
-          if (a[c] != b[c]) return !1;
-      return !0
-    },
-    extend: function(a, b) {
-      var c = function() {};
-      c.prototype = b.prototype;
-      a.prototype = new c;
-      a.prototype.constructor =
-        a
-    },
-    toString: function(a) {
-      var b = "",
-        c;
-      for (c in a) try {
-        if (null == a[c]) b += c + " \x3d [null]\n";
-        else if ("function" == typeof a[c]) b += c + " \x3d\x3e [Function]\n";
-        else if ("object" == typeof a[c]) var d = mxUtils.getFunctionName(a[c].constructor),
-          b = b + (c + " \x3d\x3e [" + d + "]\n");
-        else b += c + " \x3d " + a[c] + "\n"
-      } catch (e) {
-        b += c + "\x3d" + e.message
-      }
-      return b
-    },
-    toRadians: function(a) {
-      return Math.PI * a / 180
-    },
-    arcToCurves: function(a, b, c, d, e, f, g, h, k) {
-      h -= a;
-      k -= b;
-      if (0 === c || 0 === d) return p;
-      c = Math.abs(c);
-      d = Math.abs(d);
-      var l = -h / 2,
-        m = -k / 2,
-        n = Math.cos(e *
-          Math.PI / 180),
-        p = Math.sin(e * Math.PI / 180);
-      e = n * l + p * m;
-      var l = -1 * p * l + n * m,
-        m = e * e,
-        q = l * l,
-        s = c * c,
-        r = d * d,
-        t = m / s + q / r;
-      1 < t ? (c *= Math.sqrt(t), d *= Math.sqrt(t), f = 0) : (t = 1, f === g && (t = -1), f = t * Math.sqrt((s * r - s * q - r * m) / (s * q + r * m)));
-      m = f * c * l / d;
-      q = -1 * f * d * e / c;
-      h = n * m - p * q + h / 2;
-      k = p * m + n * q + k / 2;
-      s = Math.atan2((l - q) / d, (e - m) / c) - Math.atan2(0, 1);
-      f = 0 <= s ? s : 2 * Math.PI + s;
-      s = Math.atan2((-l - q) / d, (-e - m) / c) - Math.atan2((l - q) / d, (e - m) / c);
-      e = 0 <= s ? s : 2 * Math.PI + s;
-      0 == g && 0 < e ? e -= 2 * Math.PI : 0 != g && 0 > e && (e += 2 * Math.PI);
-      g = 2 * e / Math.PI;
-      g = Math.ceil(0 > g ? -1 * g : g);
-      e /= g;
-      l = 8 / 3 * Math.sin(e /
-        4) * Math.sin(e / 4) / Math.sin(e / 2);
-      m = n * c;
-      n *= d;
-      c *= p;
-      d *= p;
-      for (var v = Math.cos(f), w = Math.sin(f), q = -l * (m * w + d * v), s = -l * (c * w - n * v), t = r = 0, p = [], u = 0; u < g; ++u) {
-        f += e;
-        var v = Math.cos(f),
-          w = Math.sin(f),
-          r = m * v - d * w + h,
-          t = c * v + n * w + k,
-          y = -l * (m * w + d * v),
-          v = -l * (c * w - n * v),
-          w = 6 * u;
-        p[w] = Number(q + a);
-        p[w + 1] = Number(s + b);
-        p[w + 2] = Number(r - y + a);
-        p[w + 3] = Number(t - v + b);
-        p[w + 4] = Number(r + a);
-        p[w + 5] = Number(t + b);
-        q = r + y;
-        s = t + v
-      }
-      return p
-    },
-    getBoundingBox: function(a, b) {
-      var c = null;
-      if (null != a && null != b && 0 != b) {
-        var d = mxUtils.toRadians(b),
-          c = Math.cos(d),
-          e = Math.sin(d),
-          f =
-          new mxPoint(a.x + a.width / 2, a.y + a.height / 2),
-          g = new mxPoint(a.x, a.y),
-          d = new mxPoint(a.x + a.width, a.y),
-          h = new mxPoint(d.x, a.y + a.height),
-          k = new mxPoint(a.x, h.y),
-          g = mxUtils.getRotatedPoint(g, c, e, f),
-          d = mxUtils.getRotatedPoint(d, c, e, f),
-          h = mxUtils.getRotatedPoint(h, c, e, f),
-          k = mxUtils.getRotatedPoint(k, c, e, f),
-          c = new mxRectangle(g.x, g.y, 0, 0);
-        c.add(new mxRectangle(d.x, d.y, 0, 0));
-        c.add(new mxRectangle(h.x, h.y, 0, 0));
-        c.add(new mxRectangle(k.x, k.y, 0, 0))
-      }
-      return c
-    },
-    getRotatedPoint: function(a, b, c, d) {
-      d = null != d ? d : new mxPoint;
-      var e =
-        a.x - d.x;
-      a = a.y - d.y;
-      return new mxPoint(e * b - a * c + d.x, a * b + e * c + d.y)
-    },
-    getPortConstraints: function(a, b, c, d) {
-      a = mxUtils.getValue(a.style, mxConstants.STYLE_PORT_CONSTRAINT, null);
-      if (null == a) return d;
-      d = a.toString();
-      a = mxConstants.DIRECTION_MASK_NONE;
-      0 <= d.indexOf(mxConstants.DIRECTION_NORTH) && (a |= mxConstants.DIRECTION_MASK_NORTH);
-      0 <= d.indexOf(mxConstants.DIRECTION_WEST) && (a |= mxConstants.DIRECTION_MASK_WEST);
-      0 <= d.indexOf(mxConstants.DIRECTION_SOUTH) && (a |= mxConstants.DIRECTION_MASK_SOUTH);
-      0 <= d.indexOf(mxConstants.DIRECTION_EAST) &&
-        (a |= mxConstants.DIRECTION_MASK_EAST);
-      return a
-    },
-    reversePortConstraints: function(a) {
-      var b = 0,
-        b = (a & mxConstants.DIRECTION_MASK_WEST) << 3,
-        b = b | (a & mxConstants.DIRECTION_MASK_NORTH) << 1,
-        b = b | (a & mxConstants.DIRECTION_MASK_SOUTH) >> 1;
-      return b |= (a & mxConstants.DIRECTION_MASK_EAST) >> 3
-    },
-    findNearestSegment: function(a, b, c) {
-      var d = -1;
-      if (0 < a.absolutePoints.length)
-        for (var e = a.absolutePoints[0], f = null, g = 1; g < a.absolutePoints.length; g++) {
-          var h = a.absolutePoints[g],
-            e = mxUtils.ptSegDistSq(e.x, e.y, h.x, h.y, b, c);
-          if (null == f || e < f) f =
-            e, d = g - 1;
-          e = h
-        }
-      return d
-    },
-    rectangleIntersectsSegment: function(a, b, c) {
-      var d = a.y,
-        e = a.x,
-        f = d + a.height,
-        g = e + a.width;
-      a = b.x;
-      var h = c.x;
-      b.x > c.x && (a = c.x, h = b.x);
-      h > g && (h = g);
-      a < e && (a = e);
-      if (a > h) return !1;
-      var e = b.y,
-        g = c.y,
-        k = c.x - b.x;
-      1E-7 < Math.abs(k) && (c = (c.y - b.y) / k, b = b.y - c * b.x, e = c * a + b, g = c * h + b);
-      e > g && (b = g, g = e, e = b);
-      g > f && (g = f);
-      e < d && (e = d);
-      return e > g ? !1 : !0
-    },
-    contains: function(a, b, c) {
-      return a.x <= b && a.x + a.width >= b && a.y <= c && a.y + a.height >= c
-    },
-    intersects: function(a, b) {
-      var c = a.width,
-        d = a.height,
-        e = b.width,
-        f = b.height;
-      if (0 >= e || 0 >= f || 0 >= c ||
-        0 >= d) return !1;
-      var g = a.x,
-        h = a.y,
-        k = b.x,
-        l = b.y,
-        e = e + k,
-        f = f + l,
-        c = c + g,
-        d = d + h;
-      return (e < k || e > g) && (f < l || f > h) && (c < g || c > k) && (d < h || d > l)
-    },
-    intersectsHotspot: function(a, b, c, d, e, f) {
-      d = null != d ? d : 1;
-      e = null != e ? e : 0;
-      f = null != f ? f : 0;
-      if (0 < d) {
-        var g = a.getCenterX(),
-          h = a.getCenterY(),
-          k = a.width,
-          l = a.height,
-          m = mxUtils.getValue(a.style, mxConstants.STYLE_STARTSIZE) * a.view.scale;
-        0 < m && (mxUtils.getValue(a.style, mxConstants.STYLE_HORIZONTAL, !0) ? (h = a.y + m / 2, l = m) : (g = a.x + m / 2, k = m));
-        k = Math.max(e, k * d);
-        l = Math.max(e, l * d);
-        0 < f && (k = Math.min(k, f), l = Math.min(l,
-          f));
-        d = new mxRectangle(g - k / 2, h - l / 2, k, l);
-        g = mxUtils.toRadians(mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION) || 0);
-        0 != g && (e = Math.cos(-g), f = Math.sin(-g), g = new mxPoint(a.getCenterX(), a.getCenterY()), a = mxUtils.getRotatedPoint(new mxPoint(b, c), e, f, g), b = a.x, c = a.y);
-        return mxUtils.contains(d, b, c)
-      }
-      return !0
-    },
-    getOffset: function(a, b) {
-      var c = 0,
-        d = 0;
-      if (null != b && b) var e = document.body,
-        f = document.documentElement,
-        c = c + (e.scrollLeft || f.scrollLeft),
-        d = d + (e.scrollTop || f.scrollTop);
-      for (; a.offsetParent;) c += a.offsetLeft, d +=
-        a.offsetTop, a = a.offsetParent;
-      return new mxPoint(c, d)
-    },
-    getScrollOrigin: function(a) {
-      for (var b = document.body, c = document.documentElement, d = new mxPoint(b.scrollLeft || c.scrollLeft, b.scrollTop || c.scrollTop); null != a && a != b && a != c;) !isNaN(a.scrollLeft) && !
-        isNaN(a.scrollTop) && (d.x += a.scrollLeft, d.y += a.scrollTop), a = a.parentNode;
-      return d
-    },
-    convertPoint: function(a, b, c) {
-      var d = mxUtils.getScrollOrigin(a);
-      a = mxUtils.getOffset(a);
-      a.x -= d.x;
-      a.y -= d.y;
-      return new mxPoint(b - a.x, c - a.y)
-    },
-    ltrim: function(a, b) {
-      return a.replace(RegExp("^[" +
-        (b || "\\s") + "]+", "g"), "")
-    },
-    rtrim: function(a, b) {
-      return a.replace(RegExp("[" + (b || "\\s") + "]+$", "g"), "")
-    },
-    trim: function(a, b) {
-      return mxUtils.ltrim(mxUtils.rtrim(a, b), b)
-    },
-    isNumeric: function(a) {
-      return null != a && (null == a.length || 0 < a.length && 0 > a.indexOf("0x") && 0 > a.indexOf("0X")) && !isNaN(a)
-    },
-    mod: function(a, b) {
-      return (a % b + b) % b
-    },
-    intersection: function(a, b, c, d, e, f, g, h) {
-      var k = (h - f) * (c - a) - (g - e) * (d - b);
-      g = ((g - e) * (b - f) - (h - f) * (a - e)) / k;
-      e = ((c - a) * (b - f) - (d - b) * (a - e)) / k;
-      return 0 <= g && 1 >= g && 0 <= e && 1 >= e ? new mxPoint(a + g * (c - a), b + g *
-        (d - b)) : null
-    },
-    ptSegDistSq: function(a, b, c, d, e, f) {
-      c -= a;
-      d -= b;
-      e -= a;
-      f -= b;
-      0 >= e * c + f * d ? c = 0 : (e = c - e, f = d - f, a = e * c + f * d, c = 0 >= a ? 0 : a * a / (c * c + d * d));
-      e = e * e + f * f - c;
-      0 > e && (e = 0);
-      return e
-    },
-    relativeCcw: function(a, b, c, d, e, f) {
-      c -= a;
-      d -= b;
-      e -= a;
-      f -= b;
-      a = e * d - f * c;
-      0 == a && (a = e * c + f * d, 0 < a && (a = (e - c) * c + (f - d) * d, 0 > a && (a = 0)));
-      return 0 > a ? -1 : 0 < a ? 1 : 0
-    },
-    animateChanges: function(a, b) {
-      mxEffects.animateChanges.apply(this, arguments)
-    },
-    cascadeOpacity: function(a, b, c) {
-      mxEffects.cascadeOpacity.apply(this, arguments)
-    },
-    fadeOut: function(a, b, c, d, e, f) {
-      mxEffects.fadeOut.apply(this,
-        arguments)
-    },
-    setOpacity: function(a, b) {
-      mxUtils.isVml(a) ? a.style.filter = 100 <= b ? null : "alpha(opacity\x3d" + b / 5 + ")" : mxClient.IS_IE && ("undefined" === typeof document.documentMode || 9 > document.documentMode) ? a.style
-        .filter = 100 <= b ? null : "alpha(opacity\x3d" + b + ")" : a.style.opacity = b / 100
-    },
-    createImage: function(a) {
-      var b = null;
-      mxClient.IS_IE6 && "CSS1Compat" != document.compatMode ? (b = document.createElement(mxClient.VML_PREFIX + ":image"), b.setAttribute("src", a), b.style.borderStyle = "none") : (b = document.createElement(
-        "img"), b.setAttribute("src",
-        a), b.setAttribute("border", "0"));
-      return b
-    },
-    sortCells: function(a, b) {
-      b = null != b ? b : !0;
-      var c = new mxDictionary;
-      a.sort(function(a, e) {
-        var f = c.get(a);
-        null == f && (f = mxCellPath.create(a).split(mxCellPath.PATH_SEPARATOR), c.put(a, f));
-        var g = c.get(e);
-        null == g && (g = mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR), c.put(e, g));
-        f = mxCellPath.compare(f, g);
-        return 0 == f ? 0 : 0 < f == b ? 1 : -1
-      });
-      return a
-    },
-    getStylename: function(a) {
-      return null != a && (a = a.split(";")[0], 0 > a.indexOf("\x3d")) ? a : ""
-    },
-    getStylenames: function(a) {
-      var b = [];
-      if (null !=
-        a) {
-        a = a.split(";");
-        for (var c = 0; c < a.length; c++) 0 > a[c].indexOf("\x3d") && b.push(a[c])
-      }
-      return b
-    },
-    indexOfStylename: function(a, b) {
-      if (null != a && null != b)
-        for (var c = a.split(";"), d = 0, e = 0; e < c.length; e++) {
-          if (c[e] == b) return d;
-          d += c[e].length + 1
-        }
-      return -1
-    },
-    addStylename: function(a, b) {
-      0 > mxUtils.indexOfStylename(a, b) && (null == a ? a = "" : 0 < a.length && ";" != a.charAt(a.length - 1) && (a += ";"), a += b);
-      return a
-    },
-    removeStylename: function(a, b) {
-      var c = [];
-      if (null != a)
-        for (var d = a.split(";"), e = 0; e < d.length; e++) d[e] != b && c.push(d[e]);
-      return c.join(";")
-    },
-    removeAllStylenames: function(a) {
-      var b = [];
-      if (null != a) {
-        a = a.split(";");
-        for (var c = 0; c < a.length; c++) 0 <= a[c].indexOf("\x3d") && b.push(a[c])
-      }
-      return b.join(";")
-    },
-    setCellStyles: function(a, b, c, d) {
-      if (null != b && 0 < b.length) {
-        a.beginUpdate();
-        try {
-          for (var e = 0; e < b.length; e++)
-            if (null != b[e]) {
-              var f = mxUtils.setStyle(a.getStyle(b[e]), c, d);
-              a.setStyle(b[e], f)
-            }
-        } finally {
-          a.endUpdate()
-        }
-      }
-    },
-    setStyle: function(a, b, c) {
-      var d = null != c && ("undefined" == typeof c.length || 0 < c.length);
-      if (null == a || 0 == a.length) d && (a = b + "\x3d" + c);
-      else {
-        var e = a.indexOf(b +
-          "\x3d");
-        0 > e ? d && (d = ";" == a.charAt(a.length - 1) ? "" : ";", a = a + d + b + "\x3d" + c) : (b = d ? b + "\x3d" + c : "", c = a.indexOf(";", e), d || c++, a = a.substring(0, e) + b + (c > e ?
-          a.substring(c) : ""))
-      }
-      return a
-    },
-    setCellStyleFlags: function(a, b, c, d, e) {
-      if (null != b && 0 < b.length) {
-        a.beginUpdate();
-        try {
-          for (var f = 0; f < b.length; f++)
-            if (null != b[f]) {
-              var g = mxUtils.setStyleFlag(a.getStyle(b[f]), c, d, e);
-              a.setStyle(b[f], g)
-            }
-        } finally {
-          a.endUpdate()
-        }
-      }
-    },
-    setStyleFlag: function(a, b, c, d) {
-      if (null == a || 0 == a.length) a = d || null == d ? b + "\x3d" + c : b + "\x3d0";
-      else {
-        var e = a.indexOf(b +
-          "\x3d");
-        if (0 > e) e = ";" == a.charAt(a.length - 1) ? "" : ";", a = d || null == d ? a + e + b + "\x3d" + c : a + e + b + "\x3d0";
-        else {
-          var f = a.indexOf(";", e),
-            g = "",
-            g = 0 > f ? a.substring(e + b.length + 1) : a.substring(e + b.length + 1, f),
-            g = null == d ? parseInt(g) ^ c : d ? parseInt(g) | c : parseInt(g) & ~c;
-          a = a.substring(0, e) + b + "\x3d" + g + (0 <= f ? a.substring(f) : "")
-        }
-      }
-      return a
-    },
-    getAlignmentAsPoint: function(a, b) {
-      var c = 0,
-        d = 0;
-      a == mxConstants.ALIGN_CENTER ? c = -0.5 : a == mxConstants.ALIGN_RIGHT && (c = -1);
-      b == mxConstants.ALIGN_MIDDLE ? d = -0.5 : b == mxConstants.ALIGN_BOTTOM && (d = -1);
-      return new mxPoint(c,
-        d)
-    },
-    getSizeForString: function(a, b, c) {
-      b = null != b ? b : mxConstants.DEFAULT_FONTSIZE;
-      c = null != c ? c : mxConstants.DEFAULT_FONTFAMILY;
-      var d = document.createElement("div");
-      d.style.fontFamily = c;
-      d.style.fontSize = Math.round(b) + "px";
-      d.style.lineHeight = Math.round(b * mxConstants.LINE_HEIGHT) + "px";
-      d.style.position = "absolute";
-      d.style.whiteSpace = "nowrap";
-      d.style.visibility = "hidden";
-      d.style.display = mxClient.IS_QUIRKS ? "inline" : "inline-block";
-      d.style.zoom = "1";
-      d.innerHTML = a;
-      document.body.appendChild(d);
-      a = new mxRectangle(0, 0,
-        d.offsetWidth, d.offsetHeight);
-      document.body.removeChild(d);
-      return a
-    },
-    getViewXml: function(a, b, c, d, e) {
-      d = null != d ? d : 0;
-      e = null != e ? e : 0;
-      b = null != b ? b : 1;
-      null == c && (c = [a.getModel().getRoot()]);
-      var f = a.getView(),
-        g = null,
-        h = f.isEventsEnabled();
-      f.setEventsEnabled(!1);
-      var k = f.drawPane,
-        l = f.overlayPane;
-      a.dialect == mxConstants.DIALECT_SVG ? (f.drawPane = document.createElementNS(mxConstants.NS_SVG, "g"), f.canvas.appendChild(f.drawPane), f.overlayPane = document.createElementNS(mxConstants.NS_SVG,
-        "g")) : (f.drawPane = f.drawPane.cloneNode(!1),
-        f.canvas.appendChild(f.drawPane), f.overlayPane = f.overlayPane.cloneNode(!1));
-      f.canvas.appendChild(f.overlayPane);
-      var m = f.getTranslate();
-      f.translate = new mxPoint(d, e);
-      b = new mxTemporaryCellStates(a.getView(), b, c);
-      try {
-        g = (new mxCodec).encode(a.getView())
-      } finally {
-        b.destroy(), f.translate = m, f.canvas.removeChild(f.drawPane), f.canvas.removeChild(f.overlayPane), f.drawPane = k, f.overlayPane = l, f.setEventsEnabled(h)
-      }
-      return g
-    },
-    getScaleForPageCount: function(a, b, c, d) {
-      if (1 > a) return 1;
-      c = null != c ? c : mxConstants.PAGE_FORMAT_A4_PORTRAIT;
-      d = null != d ? d : 0;
-      var e = c.width - 2 * d;
-      c = c.height - 2 * d;
-      d = b.getGraphBounds().clone();
-      b = b.getView().getScale();
-      d.width /= b;
-      d.height /= b;
-      b = d.width;
-      c = b / d.height / (e / c);
-      d = Math.sqrt(a);
-      var f = Math.sqrt(c);
-      c = d * f;
-      d /= f;
-      if (1 > c && d > a) {
-        var g = d / a;
-        d = a;
-        c /= g
-      }
-      1 > d && c > a && (g = c / a, c = a, d /= g);
-      g = Math.ceil(c) * Math.ceil(d);
-      for (f = 0; g > a;) {
-        var g = Math.floor(c) / c,
-          h = Math.floor(d) / d;
-        1 == g && (g = Math.floor(c - 1) / c);
-        1 == h && (h = Math.floor(d - 1) / d);
-        g = g > h ? g : h;
-        c *= g;
-        d *= g;
-        g = Math.ceil(c) * Math.ceil(d);
-        f++;
-        if (10 < f) break
-      }
-      return 0.99999 * (e * c / b)
-    },
-    show: function(a,
-      b, c, d) {
-      c = null != c ? c : 0;
-      d = null != d ? d : 0;
-      null == b ? b = window.open().document : b.open();
-      var e = a.getGraphBounds();
-      c = -e.x + c;
-      d = -e.y + d;
-      if (mxClient.IS_IE) {
-        for (var e = "\x3chtml\x3e\x3chead\x3e", f = document.getElementsByTagName("base"), g = 0; g < f.length; g++) e += f[g].outerHTML;
-        e += "\x3cstyle\x3e";
-        for (g = 0; g < document.styleSheets.length; g++) try {
-          e += document.styleSheets(g).cssText
-        } catch (h) {}
-        e += "\x3c/style\x3e\x3c/head\x3e";
-        e += "\x3cbody\x3e";
-        e += a.container.innerHTML;
-        e += "\x3c/body\x3e";
-        e += "\x3chtml\x3e";
-        b.writeln(e);
-        b.close();
-        a =
-          b.body.getElementsByTagName("DIV")[0];
-        null != a && (a.style.position = "absolute", a.style.left = c + "px", a.style.top = d + "px")
-      } else {
-        b.writeln("\x3chtml");
-        b.writeln("\x3chead\x3e");
-        f = document.getElementsByTagName("base");
-        for (g = 0; g < f.length; g++) b.writeln(mxUtils.getOuterHtml(f[g]));
-        f = document.getElementsByTagName("link");
-        for (g = 0; g < f.length; g++) b.writeln(mxUtils.getOuterHtml(f[g]));
-        f = document.getElementsByTagName("style");
-        for (g = 0; g < f.length; g++) b.writeln(mxUtils.getOuterHtml(f[g]));
-        b.writeln("\x3c/head\x3e");
-        b.writeln("\x3c/html\x3e");
-        b.close();
-        null == b.body && b.documentElement.appendChild(b.createElement("body"));
-        b.body.style.overflow = "auto";
-        for (a = a.container.firstChild; null != a;) g = a.cloneNode(!0), b.body.appendChild(g), a = a.nextSibling;
-        a = b.getElementsByTagName("g")[0];
-        null != a && (a.setAttribute("transform", "translate(" + c + "," + d + ")"), c = a.ownerSVGElement, c.setAttribute("width", e.width + Math.max(e.x, 0) + 3), c.setAttribute("height", e.height +
-          Math.max(e.y, 0) + 3))
-      }
-      mxUtils.removeCursors(b.body);
-      return b
-    },
-    printScreen: function(a) {
-      var b = window.open();
-      mxUtils.show(a, b.document);
-      a = function() {
-        b.focus();
-        b.print();
-        b.close()
-      };
-      mxClient.IS_GC ? b.setTimeout(a, 500) : a()
-    },
-    popup: function(a, b) {
-      if (b) {
-        var c = document.createElement("div");
-        c.style.overflow = "scroll";
-        c.style.width = "636px";
-        c.style.height = "460px";
-        var d = document.createElement("pre");
-        d.innerHTML = mxUtils.htmlEntities(a, !1).replace(/\n/g, "\x3cbr\x3e").replace(/ /g, "\x26nbsp;");
-        c.appendChild(d);
-        c = new mxWindow("Popup Window", c, document.body.clientWidth / 2 - 320, (document.body.clientHeight || document.documentElement.clientHeight) /
-          2 - 240, 640, 480, !1, !0);
-        c.setClosable(!0);
-        c.setVisible(!0)
-      } else mxClient.IS_NS ? (c = window.open(), c.document.writeln("\x3cpre\x3e" + mxUtils.htmlEntities(a) + "\x3c/pre"), c.document.close()) : (c = window.open(), d = c.document.createElement(
-        "pre"), d.innerHTML = mxUtils.htmlEntities(a, !1).replace(/\n/g, "\x3cbr\x3e").replace(/ /g, "\x26nbsp;"), c.document.body.appendChild(d))
-    },
-    alert: function(a) {
-      alert(a)
-    },
-    prompt: function(a, b) {
-      return prompt(a, b)
-    },
-    confirm: function(a) {
-      return confirm(a)
-    },
-    error: function(a, b, c, d) {
-      var e = document.createElement("div");
-      e.style.padding = "20px";
-      var f = document.createElement("img");
-      f.setAttribute("src", d || mxUtils.errorImage);
-      f.setAttribute("valign", "bottom");
-      f.style.verticalAlign = "middle";
-      e.appendChild(f);
-      e.appendChild(document.createTextNode("\u00a0"));
-      e.appendChild(document.createTextNode("\u00a0"));
-      e.appendChild(document.createTextNode("\u00a0"));
-      mxUtils.write(e, a);
-      a = document.body.clientWidth;
-      d = document.body.clientHeight || document.documentElement.clientHeight;
-      var g = new mxWindow(mxResources.get(mxUtils.errorResource) ||
-        mxUtils.errorResource, e, (a - b) / 2, d / 4, b, null, !1, !0);
-      c && (mxUtils.br(e), b = document.createElement("p"), c = document.createElement("button"), mxClient.IS_IE ? c.style.cssText = "float:right" : c.setAttribute("style", "float:right"), mxEvent.addListener(
-        c, "click",
-        function(a) {
-          g.destroy()
-        }), mxUtils.write(c, mxResources.get(mxUtils.closeResource) || mxUtils.closeResource), b.appendChild(c), e.appendChild(b), mxUtils.br(e), g.setClosable(!0));
-      g.setVisible(!0);
-      return g
-    },
-    makeDraggable: function(a, b, c, d, e, f, g, h, k, l) {
-      a = new mxDragSource(a,
-        c);
-      a.dragOffset = new mxPoint(null != e ? e : 0, null != f ? f : mxConstants.TOOLTIP_VERTICAL_OFFSET);
-      a.autoscroll = g;
-      a.setGuidesEnabled(!1);
-      null != k && (a.highlightDropTargets = k);
-      null != l && (a.getDropTarget = l);
-      a.getGraphForEvent = function(a) {
-        return "function" == typeof b ? b(a) : b
-      };
-      null != d && (a.createDragElement = function() {
-        return d.cloneNode(!0)
-      }, h && (a.createPreviewElement = function(a) {
-        var b = d.cloneNode(!0),
-          c = parseInt(b.style.width),
-          e = parseInt(b.style.height);
-        b.style.width = Math.round(c * a.view.scale) + "px";
-        b.style.height = Math.round(e *
-          a.view.scale) + "px";
-        return b
-      }));
-      return a
-    }
-  },
-  mxConstants = {
-    DEFAULT_HOTSPOT: 0.3,
-    MIN_HOTSPOT_SIZE: 8,
-    MAX_HOTSPOT_SIZE: 0,
-    RENDERING_HINT_EXACT: "exact",
-    RENDERING_HINT_FASTER: "faster",
-    RENDERING_HINT_FASTEST: "fastest",
-    DIALECT_SVG: "svg",
-    DIALECT_VML: "vml",
-    DIALECT_MIXEDHTML: "mixedHtml",
-    DIALECT_PREFERHTML: "preferHtml",
-    DIALECT_STRICTHTML: "strictHtml",
-    NS_SVG: "http://www.w3.org/2000/svg",
-    NS_XHTML: "http://www.w3.org/1999/xhtml",
-    NS_XLINK: "http://www.w3.org/1999/xlink",
-    SHADOWCOLOR: "gray",
-    SHADOW_OFFSET_X: 2,
-    SHADOW_OFFSET_Y: 3,
-    SHADOW_OPACITY: 1,
-    NODETYPE_ELEMENT: 1,
-    NODETYPE_ATTRIBUTE: 2,
-    NODETYPE_TEXT: 3,
-    NODETYPE_CDATA: 4,
-    NODETYPE_ENTITY_REFERENCE: 5,
-    NODETYPE_ENTITY: 6,
-    NODETYPE_PROCESSING_INSTRUCTION: 7,
-    NODETYPE_COMMENT: 8,
-    NODETYPE_DOCUMENT: 9,
-    NODETYPE_DOCUMENTTYPE: 10,
-    NODETYPE_DOCUMENT_FRAGMENT: 11,
-    NODETYPE_NOTATION: 12,
-    TOOLTIP_VERTICAL_OFFSET: 16,
-    DEFAULT_VALID_COLOR: "#00FF00",
-    DEFAULT_INVALID_COLOR: "#FF0000",
-    HIGHLIGHT_STROKEWIDTH: 3,
-    CURSOR_MOVABLE_VERTEX: "move",
-    CURSOR_MOVABLE_EDGE: "move",
-    CURSOR_LABEL_HANDLE: "default",
-    CURSOR_BEND_HANDLE: "pointer",
-    CURSOR_CONNECT: "pointer",
-    HIGHLIGHT_COLOR: "#00FF00",
-    CONNECT_TARGET_COLOR: "#0000FF",
-    INVALID_CONNECT_TARGET_COLOR: "#FF0000",
-    DROP_TARGET_COLOR: "#0000FF",
-    VALID_COLOR: "#00FF00",
-    INVALID_COLOR: "#FF0000",
-    EDGE_SELECTION_COLOR: "#00FF00",
-    VERTEX_SELECTION_COLOR: "#00FF00",
-    VERTEX_SELECTION_STROKEWIDTH: 1,
-    EDGE_SELECTION_STROKEWIDTH: 1,
-    VERTEX_SELECTION_DASHED: !0,
-    EDGE_SELECTION_DASHED: !0,
-    GUIDE_COLOR: "#FF0000",
-    GUIDE_STROKEWIDTH: 1,
-    OUTLINE_COLOR: "#0099FF",
-    OUTLINE_STROKEWIDTH: mxClient.IS_IE ? 2 : 3,
-    HANDLE_SIZE: 7,
-    LABEL_HANDLE_SIZE: 4,
-    HANDLE_FILLCOLOR: "#00FF00",
-    HANDLE_STROKECOLOR: "black",
-    LABEL_HANDLE_FILLCOLOR: "yellow",
-    CONNECT_HANDLE_FILLCOLOR: "#0000FF",
-    LOCKED_HANDLE_FILLCOLOR: "#FF0000",
-    OUTLINE_HANDLE_FILLCOLOR: "#00FFFF",
-    OUTLINE_HANDLE_STROKECOLOR: "#0033FF",
-    DEFAULT_FONTFAMILY: "Arial,Helvetica",
-    DEFAULT_FONTSIZE: 11,
-    LINE_HEIGHT: 1.2,
-    DEFAULT_FONTSTYLE: 0,
-    DEFAULT_STARTSIZE: 40,
-    DEFAULT_MARKERSIZE: 6,
-    DEFAULT_IMAGESIZE: 24,
-    ENTITY_SEGMENT: 30,
-    RECTANGLE_ROUNDING_FACTOR: 0.15,
-    LINE_ARCSIZE: 20,
-    ARROW_SPACING: 10,
-    ARROW_WIDTH: 30,
-    ARROW_SIZE: 30,
-    PAGE_FORMAT_A4_PORTRAIT: new mxRectangle(0,
-      0, 826, 1169),
-    PAGE_FORMAT_A4_LANDSCAPE: new mxRectangle(0, 0, 1169, 826),
-    PAGE_FORMAT_LETTER_PORTRAIT: new mxRectangle(0, 0, 850, 1100),
-    PAGE_FORMAT_LETTER_LANDSCAPE: new mxRectangle(0, 0, 1100, 850),
-    NONE: "none",
-    STYLE_PERIMETER: "perimeter",
-    STYLE_SOURCE_PORT: "sourcePort",
-    STYLE_TARGET_PORT: "targetPort",
-    STYLE_PORT_CONSTRAINT: "portConstraint",
-    STYLE_OPACITY: "opacity",
-    STYLE_TEXT_OPACITY: "textOpacity",
-    STYLE_OVERFLOW: "overflow",
-    STYLE_ORTHOGONAL: "orthogonal",
-    STYLE_EXIT_X: "exitX",
-    STYLE_EXIT_Y: "exitY",
-    STYLE_EXIT_PERIMETER: "exitPerimeter",
-    STYLE_ENTRY_X: "entryX",
-    STYLE_ENTRY_Y: "entryY",
-    STYLE_ENTRY_PERIMETER: "entryPerimeter",
-    STYLE_WHITE_SPACE: "whiteSpace",
-    STYLE_ROTATION: "rotation",
-    STYLE_FILLCOLOR: "fillColor",
-    STYLE_SWIMLANE_FILLCOLOR: "swimlaneFillColor",
-    STYLE_GRADIENTCOLOR: "gradientColor",
-    STYLE_GRADIENT_DIRECTION: "gradientDirection",
-    STYLE_STROKECOLOR: "strokeColor",
-    STYLE_SEPARATORCOLOR: "separatorColor",
-    STYLE_STROKEWIDTH: "strokeWidth",
-    STYLE_ALIGN: "align",
-    STYLE_VERTICAL_ALIGN: "verticalAlign",
-    STYLE_LABEL_POSITION: "labelPosition",
-    STYLE_VERTICAL_LABEL_POSITION: "verticalLabelPosition",
-    STYLE_IMAGE_ASPECT: "imageAspect",
-    STYLE_IMAGE_ALIGN: "imageAlign",
-    STYLE_IMAGE_VERTICAL_ALIGN: "imageVerticalAlign",
-    STYLE_GLASS: "glass",
-    STYLE_IMAGE: "image",
-    STYLE_IMAGE_WIDTH: "imageWidth",
-    STYLE_IMAGE_HEIGHT: "imageHeight",
-    STYLE_IMAGE_BACKGROUND: "imageBackground",
-    STYLE_IMAGE_BORDER: "imageBorder",
-    STYLE_FLIPH: "flipH",
-    STYLE_FLIPV: "flipV",
-    STYLE_NOLABEL: "noLabel",
-    STYLE_NOEDGESTYLE: "noEdgeStyle",
-    STYLE_LABEL_BACKGROUNDCOLOR: "labelBackgroundColor",
-    STYLE_LABEL_BORDERCOLOR: "labelBorderColor",
-    STYLE_LABEL_PADDING: "labelPadding",
-    STYLE_INDICATOR_SHAPE: "indicatorShape",
-    STYLE_INDICATOR_IMAGE: "indicatorImage",
-    STYLE_INDICATOR_COLOR: "indicatorColor",
-    STYLE_INDICATOR_STROKECOLOR: "indicatorStrokeColor",
-    STYLE_INDICATOR_GRADIENTCOLOR: "indicatorGradientColor",
-    STYLE_INDICATOR_SPACING: "indicatorSpacing",
-    STYLE_INDICATOR_WIDTH: "indicatorWidth",
-    STYLE_INDICATOR_HEIGHT: "indicatorHeight",
-    STYLE_INDICATOR_DIRECTION: "indicatorDirection",
-    STYLE_SHADOW: "shadow",
-    STYLE_SEGMENT: "segment",
-    STYLE_ENDARROW: "endArrow",
-    STYLE_STARTARROW: "startArrow",
-    STYLE_ENDSIZE: "endSize",
-    STYLE_STARTSIZE: "startSize",
-    STYLE_SWIMLANE_LINE: "swimlaneLine",
-    STYLE_ENDFILL: "endFill",
-    STYLE_STARTFILL: "startFill",
-    STYLE_DASHED: "dashed",
-    STYLE_DASH_PATTERN: "dashPattern",
-    STYLE_ROUNDED: "rounded",
-    STYLE_CURVED: "curved",
-    STYLE_ARCSIZE: "arcSize",
-    STYLE_SMOOTH: "smooth",
-    STYLE_SOURCE_PERIMETER_SPACING: "sourcePerimeterSpacing",
-    STYLE_TARGET_PERIMETER_SPACING: "targetPerimeterSpacing",
-    STYLE_PERIMETER_SPACING: "perimeterSpacing",
-    STYLE_SPACING: "spacing",
-    STYLE_SPACING_TOP: "spacingTop",
-    STYLE_SPACING_LEFT: "spacingLeft",
-    STYLE_SPACING_BOTTOM: "spacingBottom",
-    STYLE_SPACING_RIGHT: "spacingRight",
-    STYLE_HORIZONTAL: "horizontal",
-    STYLE_DIRECTION: "direction",
-    STYLE_ELBOW: "elbow",
-    STYLE_FONTCOLOR: "fontColor",
-    STYLE_FONTFAMILY: "fontFamily",
-    STYLE_FONTSIZE: "fontSize",
-    STYLE_FONTSTYLE: "fontStyle",
-    STYLE_AUTOSIZE: "autosize",
-    STYLE_FOLDABLE: "foldable",
-    STYLE_EDITABLE: "editable",
-    STYLE_BENDABLE: "bendable",
-    STYLE_MOVABLE: "movable",
-    STYLE_RESIZABLE: "resizable",
-    STYLE_CLONEABLE: "cloneable",
-    STYLE_DELETABLE: "deletable",
-    STYLE_SHAPE: "shape",
-    STYLE_EDGE: "edgeStyle",
-    STYLE_LOOP: "loopStyle",
-    STYLE_ROUTING_CENTER_X: "routingCenterX",
-    STYLE_ROUTING_CENTER_Y: "routingCenterY",
-    FONT_BOLD: 1,
-    FONT_ITALIC: 2,
-    FONT_UNDERLINE: 4,
-    FONT_SHADOW: 8,
-    SHAPE_RECTANGLE: "rectangle",
-    SHAPE_ELLIPSE: "ellipse",
-    SHAPE_DOUBLE_ELLIPSE: "doubleEllipse",
-    SHAPE_RHOMBUS: "rhombus",
-    SHAPE_LINE: "line",
-    SHAPE_IMAGE: "image",
-    SHAPE_ARROW: "arrow",
-    SHAPE_LABEL: "label",
-    SHAPE_CYLINDER: "cylinder",
-    SHAPE_SWIMLANE: "swimlane",
-    SHAPE_CONNECTOR: "connector",
-    SHAPE_ACTOR: "actor",
-    SHAPE_CLOUD: "cloud",
-    SHAPE_TRIANGLE: "triangle",
-    SHAPE_HEXAGON: "hexagon",
-    ARROW_CLASSIC: "classic",
-    ARROW_BLOCK: "block",
-    ARROW_OPEN: "open",
-    ARROW_OVAL: "oval",
-    ARROW_DIAMOND: "diamond",
-    ARROW_DIAMOND_THIN: "diamondThin",
-    ALIGN_LEFT: "left",
-    ALIGN_CENTER: "center",
-    ALIGN_RIGHT: "right",
-    ALIGN_TOP: "top",
-    ALIGN_MIDDLE: "middle",
-    ALIGN_BOTTOM: "bottom",
-    DIRECTION_NORTH: "north",
-    DIRECTION_SOUTH: "south",
-    DIRECTION_EAST: "east",
-    DIRECTION_WEST: "west",
-    DIRECTION_MASK_NONE: 0,
-    DIRECTION_MASK_WEST: 1,
-    DIRECTION_MASK_NORTH: 2,
-    DIRECTION_MASK_SOUTH: 4,
-    DIRECTION_MASK_EAST: 8,
-    DIRECTION_MASK_ALL: 15,
-    ELBOW_VERTICAL: "vertical",
-    ELBOW_HORIZONTAL: "horizontal",
-    EDGESTYLE_ELBOW: "elbowEdgeStyle",
-    EDGESTYLE_ENTITY_RELATION: "entityRelationEdgeStyle",
-    EDGESTYLE_LOOP: "loopEdgeStyle",
-    EDGESTYLE_SIDETOSIDE: "sideToSideEdgeStyle",
-    EDGESTYLE_TOPTOBOTTOM: "topToBottomEdgeStyle",
-    EDGESTYLE_ORTHOGONAL: "orthogonalEdgeStyle",
-    EDGESTYLE_SEGMENT: "segmentEdgeStyle",
-    PERIMETER_ELLIPSE: "ellipsePerimeter",
-    PERIMETER_RECTANGLE: "rectanglePerimeter",
-    PERIMETER_RHOMBUS: "rhombusPerimeter",
-    PERIMETER_TRIANGLE: "trianglePerimeter"
-  };
-
-function mxEventObject(a) {
-  this.name = a;
-  this.properties = [];
-  for (var b = 1; b < arguments.length; b += 2) null != arguments[b + 1] && (this.properties[arguments[b]] = arguments[b + 1])
-}
-mxEventObject.prototype.name = null;
-mxEventObject.prototype.properties = null;
-mxEventObject.prototype.consumed = !1;
-mxEventObject.prototype.getName = function() {
-  return this.name
-};
-mxEventObject.prototype.getProperties = function() {
-  return this.properties
-};
-mxEventObject.prototype.getProperty = function(a) {
-  return this.properties[a]
-};
-mxEventObject.prototype.isConsumed = function() {
-  return this.consumed
-};
-mxEventObject.prototype.consume = function() {
-  this.consumed = !0
-};
-
-function mxMouseEvent(a, b) {
-  this.evt = a;
-  this.state = b
-}
-mxMouseEvent.prototype.consumed = !1;
-mxMouseEvent.prototype.evt = null;
-mxMouseEvent.prototype.graphX = null;
-mxMouseEvent.prototype.graphY = null;
-mxMouseEvent.prototype.state = null;
-mxMouseEvent.prototype.getEvent = function() {
-  return this.evt
-};
-mxMouseEvent.prototype.getSource = function() {
-  return mxEvent.getSource(this.evt)
-};
-mxMouseEvent.prototype.isSource = function(a) {
-  if (null != a)
-    for (var b = this.getSource(); null != b;) {
-      if (b == a.node) return !0;
-      b = b.parentNode
-    }
-  return !1
-};
-mxMouseEvent.prototype.getX = function() {
-  return mxEvent.getClientX(this.getEvent())
-};
-mxMouseEvent.prototype.getY = function() {
-  return mxEvent.getClientY(this.getEvent())
-};
-mxMouseEvent.prototype.getGraphX = function() {
-  return this.graphX
-};
-mxMouseEvent.prototype.getGraphY = function() {
-  return this.graphY
-};
-mxMouseEvent.prototype.getState = function() {
-  return this.state
-};
-mxMouseEvent.prototype.getCell = function() {
-  var a = this.getState();
-  return null != a ? a.cell : null
-};
-mxMouseEvent.prototype.isPopupTrigger = function() {
-  return mxEvent.isPopupTrigger(this.getEvent())
-};
-mxMouseEvent.prototype.isConsumed = function() {
-  return this.consumed
-};
-mxMouseEvent.prototype.consume = function(a) {
-  (null != a ? a : 1) && this.evt.preventDefault && this.evt.preventDefault();
-  this.evt.returnValue = !1;
-  this.consumed = !0
-};
-
-function mxEventSource(a) {
-  this.setEventSource(a)
-}
-mxEventSource.prototype.eventListeners = null;
-mxEventSource.prototype.eventsEnabled = !0;
-mxEventSource.prototype.eventSource = null;
-mxEventSource.prototype.isEventsEnabled = function() {
-  return this.eventsEnabled
-};
-mxEventSource.prototype.setEventsEnabled = function(a) {
-  this.eventsEnabled = a
-};
-mxEventSource.prototype.getEventSource = function() {
-  return this.eventSource
-};
-mxEventSource.prototype.setEventSource = function(a) {
-  this.eventSource = a
-};
-mxEventSource.prototype.addListener = function(a, b) {
-  null == this.eventListeners && (this.eventListeners = []);
-  this.eventListeners.push(a);
-  this.eventListeners.push(b)
-};
-mxEventSource.prototype.removeListener = function(a) {
-  if (null != this.eventListeners)
-    for (var b = 0; b < this.eventListeners.length;) this.eventListeners[b + 1] == a ? this.eventListeners.splice(b, 2) : b += 2
-};
-mxEventSource.prototype.fireEvent = function(a, b) {
-  if (null != this.eventListeners && this.isEventsEnabled()) {
-    null == a && (a = new mxEventObject);
-    null == b && (b = this.getEventSource());
-    null == b && (b = this);
-    for (var c = [b, a], d = 0; d < this.eventListeners.length; d += 2) {
-      var e = this.eventListeners[d];
-      (null == e || e == a.getName()) && this.eventListeners[d + 1].apply(this, c)
-    }
-  }
-};
-var mxEvent = {
-  objects: [],
-  addListener: function() {
-    var a = function(a, c, d) {
-      null == a.mxListenerList && (a.mxListenerList = [], mxEvent.objects.push(a));
-      a.mxListenerList.push({
-        name: c,
-        f: d
-      })
-    };
-    return window.addEventListener ? function(b, c, d) {
-      b.addEventListener(c, d, !1);
-      a(b, c, d)
-    } : function(b, c, d) {
-      b.attachEvent("on" + c, d);
-      a(b, c, d)
-    }
-  }(),
-  removeListener: function() {
-    var a = function(a, c, d) {
-      if (null != a.mxListenerList) {
-        c = a.mxListenerList.length;
-        for (var e = 0; e < c; e++)
-          if (a.mxListenerList[e].f == d) {
-            a.mxListenerList.splice(e, 1);
-            break
-          }
-        0 ==
-          a.mxListenerList.length && (a.mxListenerList = null)
-      }
-    };
-    return window.removeEventListener ? function(b, c, d) {
-      b.removeEventListener(c, d, !1);
-      a(b, c, d)
-    } : function(b, c, d) {
-      b.detachEvent("on" + c, d);
-      a(b, c, d)
-    }
-  }(),
-  removeAllListeners: function(a) {
-    var b = a.mxListenerList;
-    if (null != b)
-      for (; 0 < b.length;) {
-        var c = b[0];
-        mxEvent.removeListener(a, c.name, c.f)
-      }
-  },
-  addGestureListeners: function(a, b, c, d) {
-    null != b && mxEvent.addListener(a, "mousedown", b);
-    null != c && mxEvent.addListener(a, "mousemove", c);
-    null != d && mxEvent.addListener(a, "mouseup", d);
-    mxClient.IS_TOUCH && (null != b && mxEvent.addListener(a, "touchstart", b), null != c && mxEvent.addListener(a, "touchmove", c), null != d && mxEvent.addListener(a, "touchend", d))
-  },
-  removeGestureListeners: function(a, b, c, d) {
-    null != b && mxEvent.removeListener(a, "mousedown", b);
-    null != c && mxEvent.removeListener(a, "mousemove", c);
-    null != d && mxEvent.removeListener(a, "mouseup", d);
-    mxClient.IS_TOUCH && (null != b && mxEvent.removeListener(a, "touchstart", b), null != c && mxEvent.removeListener(a, "touchmove", c), null != d && mxEvent.removeListener(a, "touchend",
-      d))
-  },
-  redirectMouseEvents: function(a, b, c, d, e, f, g) {
-    var h = function(a) {
-      return "function" == typeof c ? c(a) : c
-    };
-    mxEvent.addGestureListeners(a, function(a) {
-      null != d ? d(a) : mxEvent.isConsumed(a) || b.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(a, h(a)))
-    }, function(a) {
-      null != e ? e(a) : mxEvent.isConsumed(a) || b.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(a, h(a)))
-    }, function(a) {
-      null != f ? f(a) : mxEvent.isConsumed(a) || b.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(a, h(a)))
-    });
-    mxEvent.addListener(a, "dblclick", function(a) {
-      if (null !=
-        g) g(a);
-      else if (!mxEvent.isConsumed(a)) {
-        var c = h(a);
-        b.dblClick(a, null != c ? c.cell : null)
-      }
-    })
-  },
-  release: function(a) {
-    if (null != a && (mxEvent.removeAllListeners(a), a = a.childNodes, null != a))
-      for (var b = a.length, c = 0; c < b; c += 1) mxEvent.release(a[c])
-  },
-  addMouseWheelListener: function(a) {
-    if (null != a) {
-      var b = function(b) {
-        null == b && (b = window.event);
-        var d = 0,
-          d = mxClient.IS_NS && !mxClient.IS_SF && !mxClient.IS_GC ? -b.detail / 2 : b.wheelDelta / 120;
-        0 != d && a(b, 0 < d)
-      };
-      mxClient.IS_NS ? mxEvent.addListener(window, mxClient.IS_SF || mxClient.IS_GC ? "mousewheel" :
-        "DOMMouseScroll", b) : mxEvent.addListener(document, "mousewheel", b)
-    }
-  },
-  disableContextMenu: function() {
-    return mxClient.IS_IE && ("undefined" === typeof document.documentMode || 9 > document.documentMode) ? function(a) {
-      mxEvent.addListener(a, "contextmenu", function() {
-        return !1
-      })
-    } : function(a) {
-      a.setAttribute("oncontextmenu", "return false;")
-    }
-  }(),
-  getSource: function(a) {
-    return null != a.srcElement ? a.srcElement : a.target
-  },
-  isConsumed: function(a) {
-    return null != a.isConsumed && a.isConsumed
-  },
-  isLeftMouseButton: function(a) {
-    return a.button ==
-      (mxClient.IS_IE && ("undefined" === typeof document.documentMode || 9 > document.documentMode) ? 1 : 0)
-  },
-  isRightMouseButton: function(a) {
-    return 2 == a.button
-  },
-  isPopupTrigger: function(a) {
-    return mxEvent.isRightMouseButton(a) || mxEvent.isShiftDown(a) && !mxEvent.isControlDown(a)
-  },
-  isShiftDown: function(a) {
-    return null != a ? a.shiftKey : !1
-  },
-  isAltDown: function(a) {
-    return null != a ? a.altKey : !1
-  },
-  isControlDown: function(a) {
-    return null != a ? a.ctrlKey : !1
-  },
-  isMetaDown: function(a) {
-    return null != a ? a.metaKey : !1
-  },
-  getMainEvent: function(a) {
-    ("touchstart" ==
-      a.type || "touchmove" == a.type) && null != a.touches && null != a.touches[0] ? a = a.touches[0] : "touchend" == a.type && (null != a.changedTouches && null != a.changedTouches[0]) && (a =
-      a.changedTouches[0]);
-    return a
-  },
-  getClientX: function(a) {
-    return mxEvent.getMainEvent(a).clientX
-  },
-  getClientY: function(a) {
-    return mxEvent.getMainEvent(a).clientY
-  },
-  consume: function(a, b, c) {
-    c = null != c ? c : !0;
-    if (null != b ? b : 1) a.preventDefault ? (c && a.stopPropagation(), a.preventDefault()) : c && (a.cancelBubble = !0);
-    a.isConsumed = !0;
-    a.returnValue = !1
-  },
-  LABEL_HANDLE: -1,
-  ROTATION_HANDLE: -2,
-  MOUSE_DOWN: "mouseDown",
-  MOUSE_MOVE: "mouseMove",
-  MOUSE_UP: "mouseUp",
-  ACTIVATE: "activate",
-  RESIZE_START: "resizeStart",
-  RESIZE: "resize",
-  RESIZE_END: "resizeEnd",
-  MOVE_START: "moveStart",
-  MOVE: "move",
-  MOVE_END: "moveEnd",
-  PAN_START: "panStart",
-  PAN: "pan",
-  PAN_END: "panEnd",
-  MINIMIZE: "minimize",
-  NORMALIZE: "normalize",
-  MAXIMIZE: "maximize",
-  HIDE: "hide",
-  SHOW: "show",
-  CLOSE: "close",
-  DESTROY: "destroy",
-  REFRESH: "refresh",
-  SIZE: "size",
-  SELECT: "select",
-  FIRED: "fired",
-  GET: "get",
-  RECEIVE: "receive",
-  CONNECT: "connect",
-  DISCONNECT: "disconnect",
-  SUSPEND: "suspend",
-  RESUME: "resume",
-  MARK: "mark",
-  SESSION: "session",
-  ROOT: "root",
-  POST: "post",
-  OPEN: "open",
-  SAVE: "save",
-  BEFORE_ADD_VERTEX: "beforeAddVertex",
-  ADD_VERTEX: "addVertex",
-  AFTER_ADD_VERTEX: "afterAddVertex",
-  DONE: "done",
-  EXECUTE: "execute",
-  EXECUTED: "executed",
-  BEGIN_UPDATE: "beginUpdate",
-  START_EDIT: "startEdit",
-  END_UPDATE: "endUpdate",
-  END_EDIT: "endEdit",
-  BEFORE_UNDO: "beforeUndo",
-  UNDO: "undo",
-  REDO: "redo",
-  CHANGE: "change",
-  NOTIFY: "notify",
-  LAYOUT_CELLS: "layoutCells",
-  CLICK: "click",
-  SCALE: "scale",
-  TRANSLATE: "translate",
-  SCALE_AND_TRANSLATE: "scaleAndTranslate",
-  UP: "up",
-  DOWN: "down",
-  ADD: "add",
-  REMOVE: "remove",
-  CLEAR: "clear",
-  ADD_CELLS: "addCells",
-  CELLS_ADDED: "cellsAdded",
-  MOVE_CELLS: "moveCells",
-  CELLS_MOVED: "cellsMoved",
-  RESIZE_CELLS: "resizeCells",
-  CELLS_RESIZED: "cellsResized",
-  TOGGLE_CELLS: "toggleCells",
-  CELLS_TOGGLED: "cellsToggled",
-  ORDER_CELLS: "orderCells",
-  CELLS_ORDERED: "cellsOrdered",
-  REMOVE_CELLS: "removeCells",
-  CELLS_REMOVED: "cellsRemoved",
-  GROUP_CELLS: "groupCells",
-  UNGROUP_CELLS: "ungroupCells",
-  REMOVE_CELLS_FROM_PARENT: "removeCellsFromParent",
-  FOLD_CELLS: "foldCells",
-  CELLS_FOLDED: "cellsFolded",
-  ALIGN_CELLS: "alignCells",
-  LABEL_CHANGED: "labelChanged",
-  CONNECT_CELL: "connectCell",
-  CELL_CONNECTED: "cellConnected",
-  SPLIT_EDGE: "splitEdge",
-  FLIP_EDGE: "flipEdge",
-  START_EDITING: "startEditing",
-  ADD_OVERLAY: "addOverlay",
-  REMOVE_OVERLAY: "removeOverlay",
-  UPDATE_CELL_SIZE: "updateCellSize",
-  ESCAPE: "escape",
-  CLICK: "click",
-  DOUBLE_CLICK: "doubleClick",
-  START: "start",
-  RESET: "reset"
-};
-
-function mxXmlRequest(a, b, c, d, e, f) {
-  this.url = a;
-  this.params = b;
-  this.method = c || "POST";
-  this.async = null != d ? d : !0;
-  this.username = e;
-  this.password = f
-}
-mxXmlRequest.prototype.url = null;
-mxXmlRequest.prototype.params = null;
-mxXmlRequest.prototype.method = null;
-mxXmlRequest.prototype.async = null;
-mxXmlRequest.prototype.binary = !1;
-mxXmlRequest.prototype.username = null;
-mxXmlRequest.prototype.password = null;
-mxXmlRequest.prototype.request = null;
-mxXmlRequest.prototype.isBinary = function() {
-  return this.binary
-};
-mxXmlRequest.prototype.setBinary = function(a) {
-  this.binary = a
-};
-mxXmlRequest.prototype.getText = function() {
-  return this.request.responseText
-};
-mxXmlRequest.prototype.isReady = function() {
-  return 4 == this.request.readyState
-};
-mxXmlRequest.prototype.getDocumentElement = function() {
-  var a = this.getXml();
-  return null != a ? a.documentElement : null
-};
-mxXmlRequest.prototype.getXml = function() {
-  var a = this.request.responseXML;
-  if (9 <= document.documentMode || null == a || null == a.documentElement) a = mxUtils.parseXml(this.request.responseText);
-  return a
-};
-mxXmlRequest.prototype.getText = function() {
-  return this.request.responseText
-};
-mxXmlRequest.prototype.getStatus = function() {
-  return this.request.status
-};
-mxXmlRequest.prototype.create = function() {
-  if (window.XMLHttpRequest) return function() {
-    var a = new XMLHttpRequest;
-    this.isBinary() && a.overrideMimeType && a.overrideMimeType("text/plain; charset\x3dx-user-defined");
-    return a
-  };
-  if ("undefined" != typeof ActiveXObject) return function() {
-    return new ActiveXObject("Microsoft.XMLHTTP")
-  }
-}();
-mxXmlRequest.prototype.send = function(a, b) {
-  this.request = this.create();
-  null != this.request && (null != a && (this.request.onreadystatechange = mxUtils.bind(this, function() {
-    this.isReady() && (a(this), this.onreadystatechaange = null)
-  })), this.request.open(this.method, this.url, this.async, this.username, this.password), this.setRequestHeaders(this.request, this.params), this.request.send(this.params))
-};
-mxXmlRequest.prototype.setRequestHeaders = function(a, b) {
-  null != b && a.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
-};
-mxXmlRequest.prototype.simulate = function(a, b) {
-  a = a || document;
-  var c = null;
-  a == document && (c = window.onbeforeunload, window.onbeforeunload = null);
-  var d = a.createElement("form");
-  d.setAttribute("method", this.method);
-  d.setAttribute("action", this.url);
-  null != b && d.setAttribute("target", b);
-  d.style.display = "none";
-  d.style.visibility = "hidden";
-  for (var e = 0 < this.params.indexOf("\x26") ? this.params.split("\x26") : this.params.split(), f = 0; f < e.length; f++) {
-    var g = e[f].indexOf("\x3d");
-    if (0 < g) {
-      var h = e[f].substring(0, g),
-        k = e[f].substring(g +
-          1),
-        g = a.createElement("textarea");
-      g.setAttribute("name", h);
-      k = k.replace(/\n/g, "\x26#xa;");
-      h = a.createTextNode(k);
-      g.appendChild(h);
-      d.appendChild(g)
-    }
-  }
-  a.body.appendChild(d);
-  d.submit();
-  a.body.removeChild(d);
-  null != c && (window.onbeforeunload = c)
-};
-var mxClipboard = {
-  STEPSIZE: 10,
-  insertCount: 1,
-  cells: null,
-  isEmpty: function() {
-    return null == mxClipboard.cells
-  },
-  cut: function(a, b) {
-    b = mxClipboard.copy(a, b);
-    mxClipboard.insertCount = 0;
-    mxClipboard.removeCells(a, b);
-    return b
-  },
-  removeCells: function(a, b) {
-    a.removeCells(b)
-  },
-  copy: function(a, b) {
-    b = b || a.getSelectionCells();
-    var c = a.getExportableCells(b);
-    mxClipboard.insertCount = 1;
-    mxClipboard.cells = a.cloneCells(c);
-    return c
-  },
-  paste: function(a) {
-    if (null != mxClipboard.cells) {
-      var b = a.getImportableCells(mxClipboard.cells),
-        c = mxClipboard.insertCount *
-        mxClipboard.STEPSIZE,
-        d = a.getDefaultParent(),
-        b = a.importCells(b, c, c, d);
-      mxClipboard.insertCount++;
-      a.setSelectionCells(b)
-    }
-  }
-};
-
-function mxWindow(a, b, c, d, e, f, g, h, k, l) {
-  null != b && (g = null != g ? g : !0, this.content = b, this.init(c, d, e, f, l), this.installMaximizeHandler(), this.installMinimizeHandler(), this.installCloseHandler(), this.setMinimizable(g),
-    this.setTitle(a), (null == h || h) && this.installMoveHandler(), null != k && null != k.parentNode ? k.parentNode.replaceChild(this.div, k) : document.body.appendChild(this.div))
-}
-mxWindow.prototype = new mxEventSource;
-mxWindow.prototype.constructor = mxWindow;
-mxWindow.prototype.closeImage = mxClient.imageBasePath + "/close.gif";
-mxWindow.prototype.minimizeImage = mxClient.imageBasePath + "/minimize.gif";
-mxWindow.prototype.normalizeImage = mxClient.imageBasePath + "/normalize.gif";
-mxWindow.prototype.maximizeImage = mxClient.imageBasePath + "/maximize.gif";
-mxWindow.prototype.resizeImage = mxClient.imageBasePath + "/resize.gif";
-mxWindow.prototype.visible = !1;
-mxWindow.prototype.content = !1;
-mxWindow.prototype.minimumSize = new mxRectangle(0, 0, 50, 40);
-mxWindow.prototype.title = !1;
-mxWindow.prototype.content = !1;
-mxWindow.prototype.destroyOnClose = !0;
-mxWindow.prototype.init = function(a, b, c, d, e) {
-  e = null != e ? e : "mxWindow";
-  this.div = document.createElement("div");
-  this.div.className = e;
-  this.div.style.left = a + "px";
-  this.div.style.top = b + "px";
-  this.table = document.createElement("table");
-  this.table.className = e;
-  null != c && (mxClient.IS_IE || (this.div.style.width = c + "px"), this.table.style.width = c + "px");
-  null != d && (mxClient.IS_IE || (this.div.style.height = d + "px"), this.table.style.height = d + "px");
-  a = document.createElement("tbody");
-  b = document.createElement("tr");
-  this.title = document.createElement("td");
-  this.title.className = e + "Title";
-  b.appendChild(this.title);
-  a.appendChild(b);
-  b = document.createElement("tr");
-  this.td = document.createElement("td");
-  this.td.className = e + "Pane";
-  this.contentWrapper = document.createElement("div");
-  this.contentWrapper.className = e + "Pane";
-  this.contentWrapper.style.width = "100%";
-  this.contentWrapper.appendChild(this.content);
-  if (mxClient.IS_IE || "DIV" != this.content.nodeName.toUpperCase()) this.contentWrapper.style.height = "100%";
-  this.td.appendChild(this.contentWrapper);
-  b.appendChild(this.td);
-  a.appendChild(b);
-  this.table.appendChild(a);
-  this.div.appendChild(this.table);
-  e = mxUtils.bind(this, function(a) {
-    this.activate()
-  });
-  mxEvent.addListener(this.title, "mousedown", e);
-  mxEvent.addListener(this.table, "mousedown", e);
-  mxClient.IS_TOUCH && (mxEvent.addListener(this.title, "touchstart", e), mxEvent.addListener(this.table, "touchstart", e));
-  this.hide()
-};
-mxWindow.prototype.setTitle = function(a) {
-  for (var b = this.title.firstChild; null != b;) {
-    var c = b.nextSibling;
-    b.nodeType == mxConstants.NODETYPE_TEXT && b.parentNode.removeChild(b);
-    b = c
-  }
-  mxUtils.write(this.title, a || "")
-};
-mxWindow.prototype.setScrollable = function(a) {
-  0 > navigator.userAgent.indexOf("Presto/2.5") && (this.contentWrapper.style.overflow = a ? "auto" : "hidden")
-};
-mxWindow.prototype.activate = function() {
-  if (mxWindow.activeWindow != this) {
-    var a = mxUtils.getCurrentStyle(this.getElement()),
-      a = null != a ? a.zIndex : 3;
-    if (mxWindow.activeWindow) {
-      var b = mxWindow.activeWindow.getElement();
-      null != b && null != b.style && (b.style.zIndex = a)
-    }
-    b = mxWindow.activeWindow;
-    this.getElement().style.zIndex = parseInt(a) + 1;
-    mxWindow.activeWindow = this;
-    this.fireEvent(new mxEventObject(mxEvent.ACTIVATE, "previousWindow", b))
-  }
-};
-mxWindow.prototype.getElement = function() {
-  return this.div
-};
-mxWindow.prototype.fit = function() {
-  mxUtils.fit(this.div)
-};
-mxWindow.prototype.isResizable = function() {
-  return null != this.resize ? "none" != this.resize.style.display : !1
-};
-mxWindow.prototype.setResizable = function(a) {
-  a ? null == this.resize ? (this.resize = document.createElement("img"), this.resize.style.position = "absolute", this.resize.style.bottom = "2px", this.resize.style.right = "2px", this.resize.setAttribute(
-      "src", mxClient.imageBasePath + "/resize.gif"), this.resize.style.cursor = "nw-resize", mxEvent.addGestureListeners(this.resize, mxUtils.bind(this, function(a) {
-      this.activate();
-      var c = mxEvent.getClientX(a),
-        d = mxEvent.getClientY(a),
-        e = this.div.offsetWidth,
-        f = this.div.offsetHeight,
-        g = mxUtils.bind(this,
-          function(a) {
-            var b = mxEvent.getClientX(a) - c,
-              g = mxEvent.getClientY(a) - d;
-            this.setSize(e + b, f + g);
-            this.fireEvent(new mxEventObject(mxEvent.RESIZE, "event", a));
-            mxEvent.consume(a)
-          }),
-        h = mxUtils.bind(this, function(a) {
-          mxEvent.removeGestureListeners(document, null, g, h);
-          this.fireEvent(new mxEventObject(mxEvent.RESIZE_END, "event", a));
-          mxEvent.consume(a)
-        });
-      mxEvent.addGestureListeners(document, null, g, h);
-      this.fireEvent(new mxEventObject(mxEvent.RESIZE_START, "event", a));
-      mxEvent.consume(a)
-    }), null, null), this.div.appendChild(this.resize)) :
-    this.resize.style.display = "inline" : null != this.resize && (this.resize.style.display = "none")
-};
-mxWindow.prototype.setSize = function(a, b) {
-  a = Math.max(this.minimumSize.width, a);
-  b = Math.max(this.minimumSize.height, b);
-  mxClient.IS_IE || (this.div.style.width = a + "px", this.div.style.height = b + "px");
-  this.table.style.width = a + "px";
-  this.table.style.height = b + "px";
-  mxClient.IS_IE || (this.contentWrapper.style.height = this.div.offsetHeight - this.title.offsetHeight - 2 + "px")
-};
-mxWindow.prototype.setMinimizable = function(a) {
-  this.minimize.style.display = a ? "" : "none"
-};
-mxWindow.prototype.getMinimumSize = function() {
-  return new mxRectangle(0, 0, 0, this.title.offsetHeight)
-};
-mxWindow.prototype.installMinimizeHandler = function() {
-  this.minimize = document.createElement("img");
-  this.minimize.setAttribute("src", this.minimizeImage);
-  this.minimize.setAttribute("align", "right");
-  this.minimize.setAttribute("title", "Minimize");
-  this.minimize.style.cursor = "pointer";
-  this.minimize.style.marginRight = "1px";
-  this.minimize.style.display = "none";
-  this.title.appendChild(this.minimize);
-  var a = !1,
-    b = null,
-    c = null,
-    d = mxUtils.bind(this, function(d) {
-      this.activate();
-      if (a) a = !1, this.minimize.setAttribute("src",
-        this.minimizeImage), this.minimize.setAttribute("title", "Minimize"), this.contentWrapper.style.display = "", this.maximize.style.display = b, mxClient.IS_IE || (this.div.style.height =
-        c), this.table.style.height = c, null != this.resize && (this.resize.style.visibility = ""), this.fireEvent(new mxEventObject(mxEvent.NORMALIZE, "event", d));
-      else {
-        a = !0;
-        this.minimize.setAttribute("src", this.normalizeImage);
-        this.minimize.setAttribute("title", "Normalize");
-        this.contentWrapper.style.display = "none";
-        b = this.maximize.style.display;
-        this.maximize.style.display = "none";
-        c = this.table.style.height;
-        var f = this.getMinimumSize();
-        0 < f.height && (mxClient.IS_IE || (this.div.style.height = f.height + "px"), this.table.style.height = f.height + "px");
-        0 < f.width && (mxClient.IS_IE || (this.div.style.width = f.width + "px"), this.table.style.width = f.width + "px");
-        null != this.resize && (this.resize.style.visibility = "hidden");
-        this.fireEvent(new mxEventObject(mxEvent.MINIMIZE, "event", d))
-      }
-      mxEvent.consume(d)
-    });
-  mxEvent.addListener(this.minimize, "mousedown", d);
-  mxClient.IS_TOUCH &&
-    mxEvent.addListener(this.minimize, "touchstart", d)
-};
-mxWindow.prototype.setMaximizable = function(a) {
-  this.maximize.style.display = a ? "" : "none"
-};
-mxWindow.prototype.installMaximizeHandler = function() {
-  this.maximize = document.createElement("img");
-  this.maximize.setAttribute("src", this.maximizeImage);
-  this.maximize.setAttribute("align", "right");
-  this.maximize.setAttribute("title", "Maximize");
-  this.maximize.style.cursor = "default";
-  this.maximize.style.marginLeft = "1px";
-  this.maximize.style.cursor = "pointer";
-  this.maximize.style.display = "none";
-  this.title.appendChild(this.maximize);
-  var a = !1,
-    b = null,
-    c = null,
-    d = null,
-    e = null,
-    f = mxUtils.bind(this, function(f) {
-      this.activate();
-      if ("none" != this.maximize.style.display) {
-        if (a) {
-          a = !1;
-          this.maximize.setAttribute("src", this.maximizeImage);
-          this.maximize.setAttribute("title", "Maximize");
-          this.contentWrapper.style.display = "";
-          this.minimize.style.visibility = "";
-          this.div.style.left = b + "px";
-          this.div.style.top = c + "px";
-          if (!mxClient.IS_IE && (this.div.style.height = d, this.div.style.width = e, h = mxUtils.getCurrentStyle(this.contentWrapper), "auto" == h.overflow || null != this.resize)) this.contentWrapper
-            .style.height = this.div.offsetHeight - this.title.offsetHeight -
-            2 + "px";
-          this.table.style.height = d;
-          this.table.style.width = e;
-          null != this.resize && (this.resize.style.visibility = "");
-          this.fireEvent(new mxEventObject(mxEvent.NORMALIZE, "event", f))
-        } else {
-          a = !0;
-          this.maximize.setAttribute("src", this.normalizeImage);
-          this.maximize.setAttribute("title", "Normalize");
-          this.contentWrapper.style.display = "";
-          this.minimize.style.visibility = "hidden";
-          b = parseInt(this.div.style.left);
-          c = parseInt(this.div.style.top);
-          d = this.table.style.height;
-          e = this.table.style.width;
-          this.div.style.left = "0px";
-          this.div.style.top = "0px";
-          mxClient.IS_IE || (this.div.style.height = document.body.clientHeight - 2 + "px", this.div.style.width = document.body.clientWidth - 2 + "px");
-          this.table.style.width = document.body.clientWidth - 2 + "px";
-          this.table.style.height = document.body.clientHeight - 2 + "px";
-          null != this.resize && (this.resize.style.visibility = "hidden");
-          if (!mxClient.IS_IE) {
-            var h = mxUtils.getCurrentStyle(this.contentWrapper);
-            if ("auto" == h.overflow || null != this.resize) this.contentWrapper.style.height = this.div.offsetHeight - this.title.offsetHeight -
-              2 + "px"
-          }
-          this.fireEvent(new mxEventObject(mxEvent.MAXIMIZE, "event", f))
-        }
-        mxEvent.consume(f)
-      }
-    });
-  mxEvent.addGestureListeners(this.maximize, f);
-  mxEvent.addListener(this.title, "dblclick", f)
-};
-mxWindow.prototype.installMoveHandler = function() {
-  this.title.style.cursor = "move";
-  mxEvent.addGestureListeners(this.title, mxUtils.bind(this, function(a) {
-    var b = mxEvent.getClientX(a),
-      c = mxEvent.getClientY(a),
-      d = this.getX(),
-      e = this.getY(),
-      f = mxUtils.bind(this, function(a) {
-        var f = mxEvent.getClientX(a) - b,
-          g = mxEvent.getClientY(a) - c;
-        this.setLocation(d + f, e + g);
-        this.fireEvent(new mxEventObject(mxEvent.MOVE, "event", a));
-        mxEvent.consume(a)
-      }),
-      g = mxUtils.bind(this, function(a) {
-        mxEvent.removeGestureListeners(document, null, f,
-          g);
-        this.fireEvent(new mxEventObject(mxEvent.MOVE_END, "event", a));
-        mxEvent.consume(a)
-      });
-    mxEvent.addGestureListeners(document, null, f, g);
-    this.fireEvent(new mxEventObject(mxEvent.MOVE_START, "event", a));
-    mxEvent.consume(a)
-  }))
-};
-mxWindow.prototype.setLocation = function(a, b) {
-  this.div.style.left = a + "px";
-  this.div.style.top = b + "px"
-};
-mxWindow.prototype.getX = function() {
-  return parseInt(this.div.style.left)
-};
-mxWindow.prototype.getY = function() {
-  return parseInt(this.div.style.top)
-};
-mxWindow.prototype.installCloseHandler = function() {
-  this.closeImg = document.createElement("img");
-  this.closeImg.setAttribute("src", this.closeImage);
-  this.closeImg.setAttribute("align", "right");
-  this.closeImg.setAttribute("title", "Close");
-  this.closeImg.style.marginLeft = "2px";
-  this.closeImg.style.cursor = "pointer";
-  this.closeImg.style.display = "none";
-  this.title.insertBefore(this.closeImg, this.title.firstChild);
-  mxEvent.addGestureListeners(this.closeImg, mxUtils.bind(this, function(a) {
-    this.fireEvent(new mxEventObject(mxEvent.CLOSE,
-      "event", a));
-    this.destroyOnClose ? this.destroy() : this.setVisible(!1);
-    mxEvent.consume(a)
-  }))
-};
-mxWindow.prototype.setImage = function(a) {
-  this.image = document.createElement("img");
-  this.image.setAttribute("src", a);
-  this.image.setAttribute("align", "left");
-  this.image.style.marginRight = "4px";
-  this.image.style.marginLeft = "0px";
-  this.image.style.marginTop = "-2px";
-  this.title.insertBefore(this.image, this.title.firstChild)
-};
-mxWindow.prototype.setClosable = function(a) {
-  this.closeImg.style.display = a ? "" : "none"
-};
-mxWindow.prototype.isVisible = function() {
-  return null != this.div ? "hidden" != this.div.style.visibility : !1
-};
-mxWindow.prototype.setVisible = function(a) {
-  null != this.div && this.isVisible() != a && (a ? this.show() : this.hide())
-};
-mxWindow.prototype.show = function() {
-  this.div.style.visibility = "";
-  this.activate();
-  var a = mxUtils.getCurrentStyle(this.contentWrapper);
-  if (!mxClient.IS_IE && ("auto" == a.overflow || null != this.resize)) this.contentWrapper.style.height = this.div.offsetHeight - this.title.offsetHeight - 2 + "px";
-  this.fireEvent(new mxEventObject(mxEvent.SHOW))
-};
-mxWindow.prototype.hide = function() {
-  this.div.style.visibility = "hidden";
-  this.fireEvent(new mxEventObject(mxEvent.HIDE))
-};
-mxWindow.prototype.destroy = function() {
-  this.fireEvent(new mxEventObject(mxEvent.DESTROY));
-  null != this.div && (mxEvent.release(this.div), this.div.parentNode.removeChild(this.div), this.div = null);
-  this.contentWrapper = this.content = this.title = null
-};
-
-function mxForm(a) {
-  this.table = document.createElement("table");
-  this.table.className = a;
-  this.body = document.createElement("tbody");
-  this.table.appendChild(this.body)
-}
-mxForm.prototype.table = null;
-mxForm.prototype.body = !1;
-mxForm.prototype.getTable = function() {
-  return this.table
-};
-mxForm.prototype.addButtons = function(a, b) {
-  var c = document.createElement("tr"),
-    d = document.createElement("td");
-  c.appendChild(d);
-  var d = document.createElement("td"),
-    e = document.createElement("button");
-  mxUtils.write(e, mxResources.get("ok") || "OK");
-  d.appendChild(e);
-  mxEvent.addListener(e, "click", function() {
-    a()
-  });
-  e = document.createElement("button");
-  mxUtils.write(e, mxResources.get("cancel") || "Cancel");
-  d.appendChild(e);
-  mxEvent.addListener(e, "click", function() {
-    b()
-  });
-  c.appendChild(d);
-  this.body.appendChild(c)
-};
-mxForm.prototype.addText = function(a, b) {
-  var c = document.createElement("input");
-  c.setAttribute("type", "text");
-  c.value = b;
-  return this.addField(a, c)
-};
-mxForm.prototype.addCheckbox = function(a, b) {
-  var c = document.createElement("input");
-  c.setAttribute("type", "checkbox");
-  this.addField(a, c);
-  b && (c.checked = !0);
-  return c
-};
-mxForm.prototype.addTextarea = function(a, b, c) {
-  var d = document.createElement("textarea");
-  mxClient.IS_NS && c--;
-  d.setAttribute("rows", c || 2);
-  d.value = b;
-  return this.addField(a, d)
-};
-mxForm.prototype.addCombo = function(a, b, c) {
-  var d = document.createElement("select");
-  null != c && d.setAttribute("size", c);
-  b && d.setAttribute("multiple", "true");
-  return this.addField(a, d)
-};
-mxForm.prototype.addOption = function(a, b, c, d) {
-  var e = document.createElement("option");
-  mxUtils.writeln(e, b);
-  e.setAttribute("value", c);
-  d && e.setAttribute("selected", d);
-  a.appendChild(e)
-};
-mxForm.prototype.addField = function(a, b) {
-  var c = document.createElement("tr"),
-    d = document.createElement("td");
-  mxUtils.write(d, a);
-  c.appendChild(d);
-  d = document.createElement("td");
-  d.appendChild(b);
-  c.appendChild(d);
-  this.body.appendChild(c);
-  return b
-};
-
-function mxImage(a, b, c) {
-  this.src = a;
-  this.width = b;
-  this.height = c
-}
-mxImage.prototype.src = null;
-mxImage.prototype.width = null;
-mxImage.prototype.height = null;
-
-function mxDivResizer(a, b) {
-  if ("div" == a.nodeName.toLowerCase()) {
-    null == b && (b = window);
-    this.div = a;
-    var c = mxUtils.getCurrentStyle(a);
-    null != c && (this.resizeWidth = "auto" == c.width, this.resizeHeight = "auto" == c.height);
-    mxEvent.addListener(b, "resize", mxUtils.bind(this, function(a) {
-      this.handlingResize || (this.handlingResize = !0, this.resize(), this.handlingResize = !1)
-    }));
-    this.resize()
-  }
-}
-mxDivResizer.prototype.resizeWidth = !0;
-mxDivResizer.prototype.resizeHeight = !0;
-mxDivResizer.prototype.handlingResize = !1;
-mxDivResizer.prototype.resize = function() {
-  var a = this.getDocumentWidth(),
-    b = this.getDocumentHeight(),
-    c = parseInt(this.div.style.left),
-    d = parseInt(this.div.style.right),
-    e = parseInt(this.div.style.top),
-    f = parseInt(this.div.style.bottom);
-  this.resizeWidth && (!isNaN(c) && !isNaN(d) && 0 <= c && 0 <= d && 0 < a - d - c) && (this.div.style.width = a - d - c + "px");
-  this.resizeHeight && (!isNaN(e) && !isNaN(f) && 0 <= e && 0 <= f && 0 < b - e - f) && (this.div.style.height = b - e - f + "px")
-};
-mxDivResizer.prototype.getDocumentWidth = function() {
-  return document.body.clientWidth
-};
-mxDivResizer.prototype.getDocumentHeight = function() {
-  return document.body.clientHeight
-};
-
-function mxDragSource(a, b) {
-  this.element = a;
-  this.dropHandler = b;
-  mxEvent.addGestureListeners(a, mxUtils.bind(this, this.mouseDown))
-}
-mxDragSource.prototype.element = null;
-mxDragSource.prototype.dropHandler = null;
-mxDragSource.prototype.dragOffset = null;
-mxDragSource.prototype.dragElement = null;
-mxDragSource.prototype.previewElement = null;
-mxDragSource.prototype.enabled = !0;
-mxDragSource.prototype.currentGraph = null;
-mxDragSource.prototype.currentDropTarget = null;
-mxDragSource.prototype.currentPoint = null;
-mxDragSource.prototype.currentGuide = null;
-mxDragSource.prototype.currentHighlight = null;
-mxDragSource.prototype.autoscroll = !0;
-mxDragSource.prototype.guidesEnabled = !0;
-mxDragSource.prototype.gridEnabled = !0;
-mxDragSource.prototype.highlightDropTargets = !0;
-mxDragSource.prototype.dragElementZIndex = 100;
-mxDragSource.prototype.dragElementOpacity = 70;
-mxDragSource.prototype.isEnabled = function() {
-  return this.enabled
-};
-mxDragSource.prototype.setEnabled = function(a) {
-  this.enabled = a
-};
-mxDragSource.prototype.isGuidesEnabled = function() {
-  return this.guidesEnabled
-};
-mxDragSource.prototype.setGuidesEnabled = function(a) {
-  this.guidesEnabled = a
-};
-mxDragSource.prototype.isGridEnabled = function() {
-  return this.gridEnabled
-};
-mxDragSource.prototype.setGridEnabled = function(a) {
-  this.gridEnabled = a
-};
-mxDragSource.prototype.getGraphForEvent = function(a) {
-  return null
-};
-mxDragSource.prototype.getDropTarget = function(a, b, c) {
-  return a.getCellAt(b, c)
-};
-mxDragSource.prototype.createDragElement = function(a) {
-  return this.element.cloneNode(!0)
-};
-mxDragSource.prototype.createPreviewElement = function(a) {
-  return null
-};
-mxDragSource.prototype.mouseDown = function(a) {
-  this.enabled && (!mxEvent.isConsumed(a) && null == this.mouseMoveHandler) && (this.startDrag(a), this.mouseMoveHandler = mxUtils.bind(this, this.mouseMove), this.mouseUpHandler = mxUtils.bind(
-    this, this.mouseUp), mxEvent.addGestureListeners(document, null, this.mouseMoveHandler, this.mouseUpHandler), mxEvent.consume(a, !0, !1))
-};
-mxDragSource.prototype.startDrag = function(a) {
-  this.dragElement = this.createDragElement(a);
-  this.dragElement.style.position = "absolute";
-  this.dragElement.style.zIndex = this.dragElementZIndex;
-  mxUtils.setOpacity(this.dragElement, this.dragElementOpacity)
-};
-mxDragSource.prototype.stopDrag = function(a) {
-  null != this.dragElement && (null != this.dragElement.parentNode && this.dragElement.parentNode.removeChild(this.dragElement), this.dragElement = null)
-};
-mxDragSource.prototype.graphContainsEvent = function(a, b) {
-  var c = mxEvent.getClientX(b),
-    d = mxEvent.getClientY(b),
-    e = mxUtils.getOffset(a.container),
-    f = mxUtils.getScrollOrigin();
-  return c >= e.x - f.x && d >= e.y - f.y && c <= e.x - f.x + a.container.offsetWidth && d <= e.y - f.y + a.container.offsetHeight
-};
-mxDragSource.prototype.mouseMove = function(a) {
-  var b = this.getGraphForEvent(a);
-  null != b && !this.graphContainsEvent(b, a) && (b = null);
-  b != this.currentGraph && (null != this.currentGraph && this.dragExit(this.currentGraph), this.currentGraph = b, null != this.currentGraph && this.dragEnter(this.currentGraph));
-  null != this.currentGraph && this.dragOver(this.currentGraph, a);
-  if (null != this.dragElement && (null == this.previewElement || "visible" != this.previewElement.style.visibility)) {
-    var b = mxEvent.getClientX(a),
-      c = mxEvent.getClientY(a);
-    null == this.dragElement.parentNode && document.body.appendChild(this.dragElement);
-    this.dragElement.style.visibility = "visible";
-    null != this.dragOffset && (b += this.dragOffset.x, c += this.dragOffset.y);
-    b += document.body.scrollLeft || document.documentElement.scrollLeft;
-    c += document.body.scrollTop || document.documentElement.scrollTop;
-    this.dragElement.style.left = b + "px";
-    this.dragElement.style.top = c + "px"
-  } else null != this.dragElement && (this.dragElement.style.visibility = "hidden");
-  mxEvent.consume(a)
-};
-mxDragSource.prototype.mouseUp = function(a) {
-  if (null != this.currentGraph) {
-    if (null != this.currentPoint && (null == this.previewElement || "hidden" != this.previewElement.style.visibility)) {
-      var b = this.currentGraph.view.scale,
-        c = this.currentGraph.view.translate;
-      this.drop(this.currentGraph, a, this.currentDropTarget, this.currentPoint.x / b - c.x, this.currentPoint.y / b - c.y)
-    }
-    this.dragExit(this.currentGraph)
-  }
-  this.stopDrag(a);
-  mxEvent.removeGestureListeners(document, null, this.mouseMoveHandler, this.mouseUpHandler);
-  this.currentGraph =
-    this.mouseUpHandler = this.mouseMoveHandler = null;
-  mxEvent.consume(a)
-};
-mxDragSource.prototype.dragEnter = function(a) {
-  a.isMouseDown = !0;
-  this.previewElement = this.createPreviewElement(a);
-  this.isGuidesEnabled() && null != this.previewElement && (this.currentGuide = new mxGuide(a, a.graphHandler.getGuideStates()));
-  this.highlightDropTargets && (this.currentHighlight = new mxCellHighlight(a, mxConstants.DROP_TARGET_COLOR))
-};
-mxDragSource.prototype.dragExit = function(a) {
-  this.currentPoint = this.currentDropTarget = null;
-  a.isMouseDown = !1;
-  null != this.previewElement && (null != this.previewElement.parentNode && this.previewElement.parentNode.removeChild(this.previewElement), this.previewElement = null);
-  null != this.currentGuide && (this.currentGuide.destroy(), this.currentGuide = null);
-  null != this.currentHighlight && (this.currentHighlight.destroy(), this.currentHighlight = null)
-};
-mxDragSource.prototype.dragOver = function(a, b) {
-  var c = mxUtils.getOffset(a.container),
-    d = mxUtils.getScrollOrigin(a.container),
-    e = mxEvent.getClientX(b) - c.x + d.x,
-    c = mxEvent.getClientY(b) - c.y + d.y;
-  a.autoScroll && (null == this.autoscroll || this.autoscroll) && a.scrollPointToVisible(e, c, a.autoExtend);
-  null != this.currentHighlight && a.isDropEnabled() && (this.currentDropTarget = this.getDropTarget(a, e, c), d = a.getView().getState(this.currentDropTarget), this.currentHighlight.highlight(d));
-  if (null != this.previewElement) {
-    null == this.previewElement.parentNode &&
-      (a.container.appendChild(this.previewElement), this.previewElement.style.zIndex = "3", this.previewElement.style.position = "absolute");
-    var d = this.isGridEnabled() && a.isGridEnabledEvent(b),
-      f = !0;
-    if (null != this.currentGuide && this.currentGuide.isEnabledForEvent(b)) var f = parseInt(this.previewElement.style.width),
-      g = parseInt(this.previewElement.style.height),
-      f = new mxRectangle(0, 0, f, g),
-      c = new mxPoint(e, c),
-      c = this.currentGuide.move(f, c, d),
-      f = !1,
-      e = c.x,
-      c = c.y;
-    else if (d) var d = a.view.scale,
-      g = a.view.translate,
-      h = a.gridSize /
-      2,
-      e = (a.snap(e / d - g.x - h) + g.x) * d,
-      c = (a.snap(c / d - g.y - h) + g.y) * d;
-    null != this.currentGuide && f && this.currentGuide.hide();
-    null != this.previewOffset && (e += this.previewOffset.x, c += this.previewOffset.y);
-    this.previewElement.style.left = Math.round(e) + "px";
-    this.previewElement.style.top = Math.round(c) + "px";
-    this.previewElement.style.visibility = "visible"
-  }
-  this.currentPoint = new mxPoint(e, c)
-};
-mxDragSource.prototype.drop = function(a, b, c, d, e) {
-  this.dropHandler(a, b, c, d, e);
-  a.container.focus()
-};
-
-function mxToolbar(a) {
-  this.container = a
-}
-mxToolbar.prototype = new mxEventSource;
-mxToolbar.prototype.constructor = mxToolbar;
-mxToolbar.prototype.container = null;
-mxToolbar.prototype.enabled = !0;
-mxToolbar.prototype.noReset = !1;
-mxToolbar.prototype.updateDefaultMode = !0;
-mxToolbar.prototype.addItem = function(a, b, c, d, e, f) {
-  var g = document.createElement(null != b ? "img" : "button"),
-    h = e || (null != f ? "mxToolbarMode" : "mxToolbarItem");
-  g.className = h;
-  g.setAttribute("src", b);
-  null != a && (null != b ? g.setAttribute("title", a) : mxUtils.write(g, a));
-  this.container.appendChild(g);
-  null != c && (mxEvent.addListener(g, "click", c), mxClient.IS_TOUCH && mxEvent.addListener(g, "touchend", c));
-  a = mxUtils.bind(this, function(a) {
-    null != d ? g.setAttribute("src", b) : g.style.backgroundColor = ""
-  });
-  mxEvent.addGestureListeners(g,
-    mxUtils.bind(this, function(a) {
-      null != d ? g.setAttribute("src", d) : g.style.backgroundColor = "gray";
-      if (null != f) {
-        null == this.menu && (this.menu = new mxPopupMenu, this.menu.init());
-        var b = this.currentImg;
-        this.menu.isMenuShowing() && this.menu.hideMenu();
-        b != g && (this.currentImg = g, this.menu.factoryMethod = f, b = new mxPoint(g.offsetLeft, g.offsetTop + g.offsetHeight), this.menu.popup(b.x, b.y, null, a), this.menu.isMenuShowing() &&
-          (g.className = h + "Selected", this.menu.hideMenu = function() {
-            mxPopupMenu.prototype.hideMenu.apply(this);
-            g.className = h;
-            this.currentImg = null
-          }))
-      }
-    }), null, a);
-  mxEvent.addListener(g, "mouseout", a);
-  return g
-};
-mxToolbar.prototype.addCombo = function(a) {
-  var b = document.createElement("div");
-  b.style.display = "inline";
-  b.className = "mxToolbarComboContainer";
-  var c = document.createElement("select");
-  c.className = a || "mxToolbarCombo";
-  b.appendChild(c);
-  this.container.appendChild(b);
-  return c
-};
-mxToolbar.prototype.addActionCombo = function(a, b) {
-  var c = document.createElement("select");
-  c.className = b || "mxToolbarCombo";
-  this.addOption(c, a, null);
-  mxEvent.addListener(c, "change", function(a) {
-    var b = c.options[c.selectedIndex];
-    c.selectedIndex = 0;
-    null != b.funct && b.funct(a)
-  });
-  this.container.appendChild(c);
-  return c
-};
-mxToolbar.prototype.addOption = function(a, b, c) {
-  var d = document.createElement("option");
-  mxUtils.writeln(d, b);
-  "function" == typeof c ? d.funct = c : d.setAttribute("value", c);
-  a.appendChild(d);
-  return d
-};
-mxToolbar.prototype.addSwitchMode = function(a, b, c, d, e) {
-  var f = document.createElement("img");
-  f.initialClassName = e || "mxToolbarMode";
-  f.className = f.initialClassName;
-  f.setAttribute("src", b);
-  f.altIcon = d;
-  null != a && f.setAttribute("title", a);
-  mxEvent.addListener(f, "click", mxUtils.bind(this, function(a) {
-    a = this.selectedMode.altIcon;
-    null != a ? (this.selectedMode.altIcon = this.selectedMode.getAttribute("src"), this.selectedMode.setAttribute("src", a)) : this.selectedMode.className = this.selectedMode.initialClassName;
-    this.updateDefaultMode &&
-      (this.defaultMode = f);
-    this.selectedMode = f;
-    a = f.altIcon;
-    null != a ? (f.altIcon = f.getAttribute("src"), f.setAttribute("src", a)) : f.className = f.initialClassName + "Selected";
-    this.fireEvent(new mxEventObject(mxEvent.SELECT));
-    c()
-  }));
-  this.container.appendChild(f);
-  null == this.defaultMode && (this.defaultMode = f, this.selectMode(f), c());
-  return f
-};
-mxToolbar.prototype.addMode = function(a, b, c, d, e, f) {
-  f = null != f ? f : !0;
-  var g = document.createElement(null != b ? "img" : "button");
-  g.initialClassName = e || "mxToolbarMode";
-  g.className = g.initialClassName;
-  g.setAttribute("src", b);
-  g.altIcon = d;
-  null != a && g.setAttribute("title", a);
-  this.enabled && f && (mxEvent.addListener(g, "click", mxUtils.bind(this, function(a) {
-      this.selectMode(g, c);
-      this.noReset = !1
-    })), mxEvent.addListener(g, "dblclick", mxUtils.bind(this, function(a) {
-      this.selectMode(g, c);
-      this.noReset = !0
-    })), null == this.defaultMode &&
-    (this.defaultMode = g, this.defaultFunction = c, this.selectMode(g, c)));
-  this.container.appendChild(g);
-  return g
-};
-mxToolbar.prototype.selectMode = function(a, b) {
-  if (this.selectedMode != a) {
-    if (null != this.selectedMode) {
-      var c = this.selectedMode.altIcon;
-      null != c ? (this.selectedMode.altIcon = this.selectedMode.getAttribute("src"), this.selectedMode.setAttribute("src", c)) : this.selectedMode.className = this.selectedMode.initialClassName
-    }
-    this.selectedMode = a;
-    c = this.selectedMode.altIcon;
-    null != c ? (this.selectedMode.altIcon = this.selectedMode.getAttribute("src"), this.selectedMode.setAttribute("src", c)) : this.selectedMode.className = this.selectedMode.initialClassName +
-      "Selected";
-    this.fireEvent(new mxEventObject(mxEvent.SELECT, "function", b))
-  }
-};
-mxToolbar.prototype.resetMode = function(a) {
-  (a || !this.noReset) && this.selectedMode != this.defaultMode && this.selectMode(this.defaultMode, this.defaultFunction)
-};
-mxToolbar.prototype.addSeparator = function(a) {
-  return this.addItem(null, a, null)
-};
-mxToolbar.prototype.addBreak = function() {
-  mxUtils.br(this.container)
-};
-mxToolbar.prototype.addLine = function() {
-  var a = document.createElement("hr");
-  a.style.marginRight = "6px";
-  a.setAttribute("size", "1");
-  this.container.appendChild(a)
-};
-mxToolbar.prototype.destroy = function() {
-  mxEvent.release(this.container);
-  this.selectedMode = this.defaultFunction = this.defaultMode = this.container = null;
-  null != this.menu && this.menu.destroy()
-};
-
-function mxSession(a, b, c, d) {
-  this.model = a;
-  this.urlInit = b;
-  this.urlPoll = c;
-  this.urlNotify = d;
-  null != a && (this.codec = new mxCodec, this.codec.lookup = function(b) {
-    return a.getCell(b)
-  });
-  a.addListener(mxEvent.NOTIFY, mxUtils.bind(this, function(a, b) {
-    var c = b.getProperty("edit");
-    (null != c && this.debug || this.connected && !this.suspended) && this.notify("\x3cedit\x3e" + this.encodeChanges(c.changes, c.undone) + "\x3c/edit\x3e")
-  }))
-}
-mxSession.prototype = new mxEventSource;
-mxSession.prototype.constructor = mxSession;
-mxSession.prototype.model = null;
-mxSession.prototype.urlInit = null;
-mxSession.prototype.urlPoll = null;
-mxSession.prototype.urlNotify = null;
-mxSession.prototype.codec = null;
-mxSession.prototype.linefeed = "\x26#xa;";
-mxSession.prototype.escapePostData = !0;
-mxSession.prototype.significantRemoteChanges = !0;
-mxSession.prototype.sent = 0;
-mxSession.prototype.received = 0;
-mxSession.prototype.debug = !1;
-mxSession.prototype.connected = !1;
-mxSession.prototype.suspended = !1;
-mxSession.prototype.polling = !1;
-mxSession.prototype.start = function() {
-  this.debug ? (this.connected = !0, this.fireEvent(new mxEventObject(mxEvent.CONNECT))) : this.connected || this.get(this.urlInit, mxUtils.bind(this, function(a) {
-    this.connected = !0;
-    this.fireEvent(new mxEventObject(mxEvent.CONNECT));
-    this.poll()
-  }))
-};
-mxSession.prototype.suspend = function() {
-  this.connected && !this.suspended && (this.suspended = !0, this.fireEvent(new mxEventObject(mxEvent.SUSPEND)))
-};
-mxSession.prototype.resume = function(a, b, c) {
-  this.connected && this.suspended && (this.suspended = !1, this.fireEvent(new mxEventObject(mxEvent.RESUME)), this.polling || this.poll())
-};
-mxSession.prototype.stop = function(a) {
-  this.connected && (this.connected = !1);
-  this.fireEvent(new mxEventObject(mxEvent.DISCONNECT, "reason", a))
-};
-mxSession.prototype.poll = function() {
-  this.connected && !this.suspended && null != this.urlPoll ? (this.polling = !0, this.get(this.urlPoll, mxUtils.bind(this, function() {
-    this.poll()
-  }))) : this.polling = !1
-};
-mxSession.prototype.notify = function(a, b, c) {
-  null != a && 0 < a.length && (null != this.urlNotify && (this.debug ? (mxLog.show(), mxLog.debug("mxSession.notify: " + this.urlNotify + " xml\x3d" + a)) : (a = "\x3cmessage\x3e\x3cdelta\x3e" + a +
-    "\x3c/delta\x3e\x3c/message\x3e", this.escapePostData && (a = encodeURIComponent(a)), mxUtils.post(this.urlNotify, "xml\x3d" + a, b, c))), this.sent += a.length, this.fireEvent(new mxEventObject(
-    mxEvent.NOTIFY, "url", this.urlNotify, "xml", a)))
-};
-mxSession.prototype.get = function(a, b, c) {
-  if ("undefined" != typeof mxUtils) {
-    var d = mxUtils.bind(this, function(a) {
-      null != c ? c(a) : this.stop(a)
-    });
-    mxUtils.get(a, mxUtils.bind(this, function(c) {
-        if ("undefined" != typeof mxUtils)
-          if (c.isReady() && 404 != c.getStatus()) {
-            if (this.received += c.getText().length, this.fireEvent(new mxEventObject(mxEvent.GET, "url", a, "request", c)), this.isValidResponse(c)) {
-              if (0 < c.getText().length) {
-                var f = c.getDocumentElement();
-                null == f ? d("Invalid response: " + c.getText()) : this.receive(f)
-              }
-              null != b && b(c)
-            }
-          } else d("Response not ready")
-      }),
-      function(a) {
-        d("Transmission error")
-      })
-  }
-};
-mxSession.prototype.isValidResponse = function(a) {
-  return 0 > a.getText().indexOf("\x3c?php")
-};
-mxSession.prototype.encodeChanges = function(a, b) {
-  for (var c = "", d = b ? -1 : 1, e = b ? a.length - 1 : 0; 0 <= e && e < a.length; e += d) var f = this.codec.encode(a[e]),
-    c = c + mxUtils.getXml(f, this.linefeed);
-  return c
-};
-mxSession.prototype.receive = function(a) {
-  if (null != a && a.nodeType == mxConstants.NODETYPE_ELEMENT) {
-    var b = a.getAttribute("namespace");
-    null != b && (this.model.prefix = b + "-");
-    for (b = a.firstChild; null != b;) {
-      var c = b.nodeName.toLowerCase();
-      "state" == c ? this.processState(b) : "delta" == c && this.processDelta(b);
-      b = b.nextSibling
-    }
-    this.fireEvent(new mxEventObject(mxEvent.RECEIVE, "node", a))
-  }
-};
-mxSession.prototype.processState = function(a) {
-  (new mxCodec(a.ownerDocument)).decode(a.firstChild, this.model)
-};
-mxSession.prototype.processDelta = function(a) {
-  for (a = a.firstChild; null != a;) "edit" == a.nodeName && this.processEdit(a), a = a.nextSibling
-};
-mxSession.prototype.processEdit = function(a) {
-  a = this.decodeChanges(a);
-  if (0 < a.length) {
-    var b = this.createUndoableEdit(a);
-    this.model.fireEvent(new mxEventObject(mxEvent.CHANGE, "edit", b, "changes", a));
-    this.model.fireEvent(new mxEventObject(mxEvent.UNDO, "edit", b));
-    this.fireEvent(new mxEventObject(mxEvent.FIRED, "edit", b))
-  }
-};
-mxSession.prototype.createUndoableEdit = function(a) {
-  var b = new mxUndoableEdit(this.model, this.significantRemoteChanges);
-  b.changes = a;
-  b.notify = function() {
-    b.source.fireEvent(new mxEventObject(mxEvent.CHANGE, "edit", b, "changes", b.changes));
-    b.source.fireEvent(new mxEventObject(mxEvent.NOTIFY, "edit", b, "changes", b.changes))
-  };
-  return b
-};
-mxSession.prototype.decodeChanges = function(a) {
-  this.codec.document = a.ownerDocument;
-  var b = [];
-  for (a = a.firstChild; null != a;) {
-    var c = this.decodeChange(a);
-    null != c && b.push(c);
-    a = a.nextSibling
-  }
-  return b
-};
-mxSession.prototype.decodeChange = function(a) {
-  var b = null;
-  a.nodeType == mxConstants.NODETYPE_ELEMENT && (b = "mxRootChange" == a.nodeName ? (new mxCodec(a.ownerDocument)).decode(a) : this.codec.decode(a), null != b && (b.model = this.model, b.execute(),
-    "mxChildChange" == a.nodeName && null == b.parent && this.cellRemoved(b.child)));
-  return b
-};
-mxSession.prototype.cellRemoved = function(a, b) {
-  this.codec.putObject(a.getId(), a);
-  for (var c = this.model.getChildCount(a), d = 0; d < c; d++) this.cellRemoved(this.model.getChildAt(a, d))
-};
-
-function mxUndoableEdit(a, b) {
-  this.source = a;
-  this.changes = [];
-  this.significant = null != b ? b : !0
-}
-mxUndoableEdit.prototype.source = null;
-mxUndoableEdit.prototype.changes = null;
-mxUndoableEdit.prototype.significant = null;
-mxUndoableEdit.prototype.undone = !1;
-mxUndoableEdit.prototype.redone = !1;
-mxUndoableEdit.prototype.isEmpty = function() {
-  return 0 == this.changes.length
-};
-mxUndoableEdit.prototype.isSignificant = function() {
-  return this.significant
-};
-mxUndoableEdit.prototype.add = function(a) {
-  this.changes.push(a)
-};
-mxUndoableEdit.prototype.notify = function() {};
-mxUndoableEdit.prototype.die = function() {};
-mxUndoableEdit.prototype.undo = function() {
-  if (!this.undone) {
-    this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));
-    for (var a = this.changes.length - 1; 0 <= a; a--) {
-      var b = this.changes[a];
-      null != b.execute ? b.execute() : null != b.undo && b.undo();
-      this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED, "change", b))
-    }
-    this.undone = !0;
-    this.redone = !1;
-    this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))
-  }
-  this.notify()
-};
-mxUndoableEdit.prototype.redo = function() {
-  if (!this.redone) {
-    this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));
-    for (var a = this.changes.length, b = 0; b < a; b++) {
-      var c = this.changes[b];
-      null != c.execute ? c.execute() : null != c.redo && c.redo();
-      this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED, "change", c))
-    }
-    this.undone = !1;
-    this.redone = !0;
-    this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))
-  }
-  this.notify()
-};
-
-function mxUndoManager(a) {
-  this.size = null != a ? a : 100;
-  this.clear()
-}
-mxUndoManager.prototype = new mxEventSource;
-mxUndoManager.prototype.constructor = mxUndoManager;
-mxUndoManager.prototype.size = null;
-mxUndoManager.prototype.history = null;
-mxUndoManager.prototype.indexOfNextAdd = 0;
-mxUndoManager.prototype.isEmpty = function() {
-  return 0 == this.history.length
-};
-mxUndoManager.prototype.clear = function() {
-  this.history = [];
-  this.indexOfNextAdd = 0;
-  this.fireEvent(new mxEventObject(mxEvent.CLEAR))
-};
-mxUndoManager.prototype.canUndo = function() {
-  return 0 < this.indexOfNextAdd
-};
-mxUndoManager.prototype.undo = function() {
-  for (; 0 < this.indexOfNextAdd;) {
-    var a = this.history[--this.indexOfNextAdd];
-    a.undo();
-    if (a.isSignificant()) {
-      this.fireEvent(new mxEventObject(mxEvent.UNDO, "edit", a));
-      break
-    }
-  }
-};
-mxUndoManager.prototype.canRedo = function() {
-  return this.indexOfNextAdd < this.history.length
-};
-mxUndoManager.prototype.redo = function() {
-  for (var a = this.history.length; this.indexOfNextAdd < a;) {
-    var b = this.history[this.indexOfNextAdd++];
-    b.redo();
-    if (b.isSignificant()) {
-      this.fireEvent(new mxEventObject(mxEvent.REDO, "edit", b));
-      break
-    }
-  }
-};
-mxUndoManager.prototype.undoableEditHappened = function(a) {
-  this.trim();
-  0 < this.size && this.size == this.history.length && this.history.shift();
-  this.history.push(a);
-  this.indexOfNextAdd = this.history.length;
-  this.fireEvent(new mxEventObject(mxEvent.ADD, "edit", a))
-};
-mxUndoManager.prototype.trim = function() {
-  if (this.history.length > this.indexOfNextAdd)
-    for (var a = this.history.splice(this.indexOfNextAdd, this.history.length - this.indexOfNextAdd), b = 0; b < a.length; b++) a[b].die()
-};
-var mxUrlConverter = function(a) {
-  var b = !0,
-    c = null,
-    d = null;
-  return {
-    isEnabled: function() {
-      return b
-    },
-    setEnabled: function(a) {
-      b = a
-    },
-    getBaseUrl: function() {
-      return c
-    },
-    setBaseUrl: function(a) {
-      c = a
-    },
-    getBaseDomain: function() {
-      return c
-    },
-    setBaseDomain: function(a) {
-      c = a
-    },
-    isRelativeUrl: function(a) {
-      return "http://" != a.substring(0, 7) && "https://" != a.substring(0, 8) && "data:image" != a.substring(0, 10)
-    },
-    convert: function(a) {
-      if (b && this.isRelativeUrl(a)) {
-        if (null == c) {
-          d = location.protocol + "//" + location.host;
-          c = d + location.pathname;
-          var f = c.lastIndexOf("/");
-          0 < f && (c = c.substring(0, f + 1))
-        }
-        a = "/" == a.charAt(0) ? d + a : c + a
-      }
-      return a
-    }
-  }
-};
-
-function mxPanningManager(a) {
-  this.thread = null;
-  this.active = !1;
-  this.dy = this.dx = this.t0y = this.t0x = this.tdy = this.tdx = 0;
-  this.scrollbars = !1;
-  this.scrollTop = this.scrollLeft = 0;
-  this.mouseListener = {
-    mouseDown: function(a, b) {},
-    mouseMove: function(a, b) {},
-    mouseUp: mxUtils.bind(this, function(a, b) {
-      this.active && this.stop()
-    })
-  };
-  a.addMouseListener(this.mouseListener);
-  mxEvent.addListener(document, "mouseup", mxUtils.bind(this, function() {
-    this.active && this.stop()
-  }));
-  var b = mxUtils.bind(this, function() {
-    this.scrollbars = mxUtils.hasScrollbars(a.container);
-    this.scrollLeft = a.container.scrollLeft;
-    this.scrollTop = a.container.scrollTop;
-    return window.setInterval(mxUtils.bind(this, function() {
-      this.tdx -= this.dx;
-      this.tdy -= this.dy;
-      if (this.scrollbars) {
-        var b = -a.container.scrollLeft - Math.ceil(this.dx),
-          d = -a.container.scrollTop - Math.ceil(this.dy);
-        a.panGraph(b, d);
-        a.panDx = this.scrollLeft - a.container.scrollLeft;
-        a.panDy = this.scrollTop - a.container.scrollTop;
-        a.fireEvent(new mxEventObject(mxEvent.PAN))
-      } else a.panGraph(this.getDx(), this.getDy())
-    }), this.delay)
-  });
-  this.isActive =
-    function() {
-      return active
-    };
-  this.getDx = function() {
-    return Math.round(this.tdx)
-  };
-  this.getDy = function() {
-    return Math.round(this.tdy)
-  };
-  this.start = function() {
-    this.t0x = a.view.translate.x;
-    this.t0y = a.view.translate.y;
-    this.active = !0
-  };
-  this.panTo = function(c, d, e, f) {
-    this.active || this.start();
-    this.scrollLeft = a.container.scrollLeft;
-    this.scrollTop = a.container.scrollTop;
-    f = null != f ? f : 0;
-    var g = a.container;
-    this.dx = c + (null != e ? e : 0) - g.scrollLeft - g.clientWidth;
-    0 > this.dx && Math.abs(this.dx) < this.border ? this.dx = this.border + this.dx :
-      this.dx = this.handleMouseOut ? Math.max(this.dx, 0) : 0;
-    0 == this.dx && (this.dx = c - g.scrollLeft, this.dx = 0 < this.dx && this.dx < this.border ? this.dx - this.border : this.handleMouseOut ? Math.min(0, this.dx) : 0);
-    this.dy = d + f - g.scrollTop - g.clientHeight;
-    0 > this.dy && Math.abs(this.dy) < this.border ? this.dy = this.border + this.dy : this.dy = this.handleMouseOut ? Math.max(this.dy, 0) : 0;
-    0 == this.dy && (this.dy = d - g.scrollTop, this.dy = 0 < this.dy && this.dy < this.border ? this.dy - this.border : this.handleMouseOut ? Math.min(0, this.dy) : 0);
-    0 != this.dx || 0 != this.dy ?
-      (this.dx *= this.damper, this.dy *= this.damper, null == this.thread && (this.thread = b())) : null != this.thread && (window.clearInterval(this.thread), this.thread = null)
-  };
-  this.stop = function() {
-    if (this.active)
-      if (this.active = !1, null != this.thread && (window.clearInterval(this.thread), this.thread = null), this.tdy = this.tdx = 0, this.scrollbars) a.panDx = 0, a.panDy = 0, a.fireEvent(new mxEventObject(
-        mxEvent.PAN));
-      else {
-        var b = a.panDx,
-          d = a.panDy;
-        if (0 != b || 0 != d) a.panGraph(0, 0), a.view.setTranslate(this.t0x + b / a.view.scale, this.t0y + d / a.view.scale)
-      }
-  };
-  this.destroy = function() {
-    a.removeMouseListener(this.mouseListener)
-  }
-}
-mxPanningManager.prototype.damper = 1 / 6;
-mxPanningManager.prototype.delay = 10;
-mxPanningManager.prototype.handleMouseOut = !0;
-mxPanningManager.prototype.border = 0;
-
-function mxPopupMenu(a) {
-  this.factoryMethod = a;
-  null != a && this.init()
-}
-mxPopupMenu.prototype = new mxEventSource;
-mxPopupMenu.prototype.constructor = mxPopupMenu;
-mxPopupMenu.prototype.submenuImage = mxClient.imageBasePath + "/submenu.gif";
-mxPopupMenu.prototype.zIndex = 10006;
-mxPopupMenu.prototype.factoryMethod = null;
-mxPopupMenu.prototype.useLeftButtonForPopup = !1;
-mxPopupMenu.prototype.enabled = !0;
-mxPopupMenu.prototype.itemCount = 0;
-mxPopupMenu.prototype.autoExpand = !1;
-mxPopupMenu.prototype.smartSeparators = !1;
-mxPopupMenu.prototype.labels = !0;
-mxPopupMenu.prototype.init = function() {
-  this.table = document.createElement("table");
-  this.table.className = "mxPopupMenu";
-  this.tbody = document.createElement("tbody");
-  this.table.appendChild(this.tbody);
-  this.div = document.createElement("div");
-  this.div.className = "mxPopupMenu";
-  this.div.style.display = "inline";
-  this.div.style.zIndex = this.zIndex;
-  this.div.appendChild(this.table);
-  mxEvent.disableContextMenu(this.div)
-};
-mxPopupMenu.prototype.isEnabled = function() {
-  return this.enabled
-};
-mxPopupMenu.prototype.setEnabled = function(a) {
-  this.enabled = a
-};
-mxPopupMenu.prototype.isPopupTrigger = function(a) {
-  return a.isPopupTrigger() || this.useLeftButtonForPopup && mxEvent.isLeftMouseButton(a.getEvent())
-};
-mxPopupMenu.prototype.addItem = function(a, b, c, d, e, f) {
-  d = d || this;
-  this.itemCount++;
-  d.willAddSeparator && (d.containsItems && this.addSeparator(d, !0), d.willAddSeparator = !1);
-  d.containsItems = !0;
-  var g = document.createElement("tr");
-  g.className = "mxPopupMenuItem";
-  var h = document.createElement("td");
-  h.className = "mxPopupMenuIcon";
-  null != b ? (e = document.createElement("img"), e.src = b, h.appendChild(e)) : null != e && (b = document.createElement("div"), b.className = e, h.appendChild(b));
-  g.appendChild(h);
-  this.labels && (h = document.createElement("td"),
-    h.className = "mxPopupMenuItem" + (null != f && !f ? " disabled" : ""), mxUtils.write(h, a), h.align = "left", g.appendChild(h), a = document.createElement("td"), a.className =
-    "mxPopupMenuItem" + (null != f && !f ? " disabled" : ""), a.style.paddingRight = "6px", a.style.textAlign = "right", g.appendChild(a), null == d.div && this.createSubmenu(d));
-  d.tbody.appendChild(g);
-  if (null == f || f) mxEvent.addGestureListeners(g, mxUtils.bind(this, function(a) {
-    this.eventReceiver = g;
-    d.activeRow != g && d.activeRow != d && (null != d.activeRow && null != d.activeRow.div.parentNode &&
-      this.hideSubmenu(d), null != g.div && (this.showSubmenu(d, g), d.activeRow = g));
-    mxEvent.consume(a)
-  }), mxUtils.bind(this, function(a) {
-    d.activeRow != g && d.activeRow != d && (null != d.activeRow && null != d.activeRow.div.parentNode && this.hideSubmenu(d), this.autoExpand && null != g.div && (this.showSubmenu(d, g), d.activeRow =
-      g));
-    g.className = "mxPopupMenuItemHover"
-  }), mxUtils.bind(this, function(a) {
-    this.eventReceiver == g && (d.activeRow != g && this.hideMenu(), null != c && c(a));
-    this.eventReceiver = null;
-    mxEvent.consume(a)
-  })), mxEvent.addListener(g,
-    "mouseout", mxUtils.bind(this, function(a) {
-      g.className = "mxPopupMenuItem"
-    }));
-  return g
-};
-mxPopupMenu.prototype.createSubmenu = function(a) {
-  a.table = document.createElement("table");
-  a.table.className = "mxPopupMenu";
-  a.tbody = document.createElement("tbody");
-  a.table.appendChild(a.tbody);
-  a.div = document.createElement("div");
-  a.div.className = "mxPopupMenu";
-  a.div.style.position = "absolute";
-  a.div.style.display = "inline";
-  a.div.style.zIndex = this.zIndex;
-  a.div.appendChild(a.table);
-  var b = document.createElement("img");
-  b.setAttribute("src", this.submenuImage);
-  td = a.firstChild.nextSibling.nextSibling;
-  td.appendChild(b)
-};
-mxPopupMenu.prototype.showSubmenu = function(a, b) {
-  if (null != b.div) {
-    b.div.style.left = a.div.offsetLeft + b.offsetLeft + b.offsetWidth - 1 + "px";
-    b.div.style.top = a.div.offsetTop + b.offsetTop + "px";
-    document.body.appendChild(b.div);
-    var c = parseInt(b.div.offsetLeft),
-      d = parseInt(b.div.offsetWidth),
-      e = document.body,
-      f = document.documentElement;
-    if (c + d > (e.scrollLeft || f.scrollLeft) + (e.clientWidth || f.clientWidth)) b.div.style.left = a.div.offsetLeft - d + (mxClient.IS_IE ? 6 : -6) + "px";
-    mxUtils.fit(b.div)
-  }
-};
-mxPopupMenu.prototype.addSeparator = function(a, b) {
-  a = a || this;
-  if (this.smartSeparators && !b) a.willAddSeparator = !0;
-  else if (null != a.tbody) {
-    a.willAddSeparator = !1;
-    var c = document.createElement("tr"),
-      d = document.createElement("td");
-    d.className = "mxPopupMenuIcon";
-    d.style.padding = "0 0 0 0px";
-    c.appendChild(d);
-    d = document.createElement("td");
-    d.style.padding = "0 0 0 0px";
-    d.setAttribute("colSpan", "2");
-    var e = document.createElement("hr");
-    e.setAttribute("size", "1");
-    d.appendChild(e);
-    c.appendChild(d);
-    a.tbody.appendChild(c)
-  }
-};
-mxPopupMenu.prototype.popup = function(a, b, c, d) {
-  if (null != this.div && null != this.tbody && null != this.factoryMethod) {
-    this.div.style.left = a + "px";
-    for (this.div.style.top = b + "px"; null != this.tbody.firstChild;) mxEvent.release(this.tbody.firstChild), this.tbody.removeChild(this.tbody.firstChild);
-    this.itemCount = 0;
-    this.factoryMethod(this, c, d);
-    0 < this.itemCount && (this.showMenu(), this.fireEvent(new mxEventObject(mxEvent.SHOW)))
-  }
-};
-mxPopupMenu.prototype.isMenuShowing = function() {
-  return null != this.div && this.div.parentNode == document.body
-};
-mxPopupMenu.prototype.showMenu = function() {
-  9 <= document.documentMode && (this.div.style.filter = "none");
-  document.body.appendChild(this.div);
-  mxUtils.fit(this.div)
-};
-mxPopupMenu.prototype.hideMenu = function() {
-  null != this.div && (null != this.div.parentNode && this.div.parentNode.removeChild(this.div), this.hideSubmenu(this), this.containsItems = !1)
-};
-mxPopupMenu.prototype.hideSubmenu = function(a) {
-  null != a.activeRow && (this.hideSubmenu(a.activeRow), null != a.activeRow.div.parentNode && a.activeRow.div.parentNode.removeChild(a.activeRow.div), a.activeRow = null)
-};
-mxPopupMenu.prototype.destroy = function() {
-  null != this.div && (mxEvent.release(this.div), null != this.div.parentNode && this.div.parentNode.removeChild(this.div), this.div = null)
-};
-
-function mxAutoSaveManager(a) {
-  this.changeHandler = mxUtils.bind(this, function(a, c) {
-    this.isEnabled() && this.graphModelChanged(c.getProperty("edit").changes)
-  });
-  this.setGraph(a)
-}
-mxAutoSaveManager.prototype = new mxEventSource;
-mxAutoSaveManager.prototype.constructor = mxAutoSaveManager;
-mxAutoSaveManager.prototype.graph = null;
-mxAutoSaveManager.prototype.autoSaveDelay = 10;
-mxAutoSaveManager.prototype.autoSaveThrottle = 2;
-mxAutoSaveManager.prototype.autoSaveThreshold = 5;
-mxAutoSaveManager.prototype.ignoredChanges = 0;
-mxAutoSaveManager.prototype.lastSnapshot = 0;
-mxAutoSaveManager.prototype.enabled = !0;
-mxAutoSaveManager.prototype.changeHandler = null;
-mxAutoSaveManager.prototype.isEnabled = function() {
-  return this.enabled
-};
-mxAutoSaveManager.prototype.setEnabled = function(a) {
-  this.enabled = a
-};
-mxAutoSaveManager.prototype.setGraph = function(a) {
-  null != this.graph && this.graph.getModel().removeListener(this.changeHandler);
-  this.graph = a;
-  null != this.graph && this.graph.getModel().addListener(mxEvent.CHANGE, this.changeHandler)
-};
-mxAutoSaveManager.prototype.save = function() {};
-mxAutoSaveManager.prototype.graphModelChanged = function(a) {
-  a = ((new Date).getTime() - this.lastSnapshot) / 1E3;
-  a > this.autoSaveDelay || this.ignoredChanges >= this.autoSaveThreshold && a > this.autoSaveThrottle ? (this.save(), this.reset()) : this.ignoredChanges++
-};
-mxAutoSaveManager.prototype.reset = function() {
-  this.lastSnapshot = (new Date).getTime();
-  this.ignoredChanges = 0
-};
-mxAutoSaveManager.prototype.destroy = function() {
-  this.setGraph(null)
-};
-
-function mxAnimation(a) {
-  this.delay = null != a ? a : 20
-}
-mxAnimation.prototype = new mxEventSource;
-mxAnimation.prototype.constructor = mxAnimation;
-mxAnimation.prototype.delay = null;
-mxAnimation.prototype.thread = null;
-mxAnimation.prototype.startAnimation = function() {
-  null == this.thread && (this.thread = window.setInterval(mxUtils.bind(this, this.updateAnimation), this.delay))
-};
-mxAnimation.prototype.updateAnimation = function() {
-  this.fireEvent(new mxEventObject(mxEvent.EXECUTE))
-};
-mxAnimation.prototype.stopAnimation = function() {
-  null != this.thread && (window.clearInterval(this.thread), this.thread = null, this.fireEvent(new mxEventObject(mxEvent.DONE)))
-};
-
-function mxMorphing(a, b, c, d) {
-  mxAnimation.call(this, d);
-  this.graph = a;
-  this.steps = null != b ? b : 6;
-  this.ease = null != c ? c : 1.5
-}
-mxMorphing.prototype = new mxAnimation;
-mxMorphing.prototype.constructor = mxMorphing;
-mxMorphing.prototype.graph = null;
-mxMorphing.prototype.steps = null;
-mxMorphing.prototype.step = 0;
-mxMorphing.prototype.ease = null;
-mxMorphing.prototype.cells = null;
-mxMorphing.prototype.updateAnimation = function() {
-  var a = new mxCellStatePreview(this.graph);
-  if (null != this.cells)
-    for (var b = 0; b < this.cells.length; b++) this.animateCell(cells[b], a, !1);
-  else this.animateCell(this.graph.getModel().getRoot(), a, !0);
-  this.show(a);
-  (a.isEmpty() || this.step++ >= this.steps) && this.stopAnimation()
-};
-mxMorphing.prototype.show = function(a) {
-  a.show()
-};
-mxMorphing.prototype.animateCell = function(a, b, c) {
-  var d = this.graph.getView().getState(a),
-    e = null;
-  if (null != d && (e = this.getDelta(d), this.graph.getModel().isVertex(a) && (0 != e.x || 0 != e.y))) {
-    var f = this.graph.view.getTranslate(),
-      g = this.graph.view.getScale();
-    e.x += f.x * g;
-    e.y += f.y * g;
-    b.moveState(d, -e.x / this.ease, -e.y / this.ease)
-  }
-  if (c && !this.stopRecursion(d, e)) {
-    d = this.graph.getModel().getChildCount(a);
-    for (e = 0; e < d; e++) this.animateCell(this.graph.getModel().getChildAt(a, e), b, c)
-  }
-};
-mxMorphing.prototype.stopRecursion = function(a, b) {
-  return null != b && (0 != b.x || 0 != b.y)
-};
-mxMorphing.prototype.getDelta = function(a) {
-  var b = this.getOriginForCell(a.cell),
-    c = this.graph.getView().getTranslate(),
-    d = this.graph.getView().getScale();
-  a = new mxPoint(a.x / d - c.x, a.y / d - c.y);
-  return new mxPoint((b.x - a.x) * d, (b.y - a.y) * d)
-};
-mxMorphing.prototype.getOriginForCell = function(a) {
-  var b = null;
-  null != a && (b = this.getOriginForCell(this.graph.getModel().getParent(a)), a = this.graph.getCellGeometry(a), null != a && (b.x += a.x, b.y += a.y));
-  null == b && (b = this.graph.view.getTranslate(), b = new mxPoint(-b.x, -b.y));
-  return b
-};
-
-function mxImageBundle(a) {
-  this.images = [];
-  this.alt = null != a ? a : !1
-}
-mxImageBundle.prototype.images = null;
-mxImageBundle.prototype.images = null;
-mxImageBundle.prototype.putImage = function(a, b, c) {
-  this.images[a] = {
-    value: b,
-    fallback: c
-  }
-};
-mxImageBundle.prototype.getImage = function(a) {
-  var b = null;
-  null != a && (a = this.images[a], null != a && (b = this.alt ? a.fallback : a.value));
-  return b
-};
-
-function mxImageExport() {}
-mxImageExport.prototype.includeOverlays = !1;
-mxImageExport.prototype.drawState = function(a, b) {
-  null != a && (this.visitStatesRecursive(a, b, this.drawCellState), this.includeOverlays && this.visitStatesRecursive(a, b, this.drawOverlays))
-};
-mxImageExport.prototype.visitStatesRecursive = function(a, b, c) {
-  if (null != a) {
-    c(a, b);
-    for (var d = a.view.graph, e = d.model.getChildCount(a.cell), f = 0; f < e; f++) {
-      var g = d.view.getState(d.model.getChildAt(a.cell, f));
-      this.visitStatesRecursive(g, b, c)
-    }
-  }
-};
-mxImageExport.prototype.drawCellState = function(a, b) {
-  a.shape instanceof mxShape && (b.save(), a.shape.paint(b), b.restore());
-  null != a.text && (b.save(), a.text.paint(b), b.restore())
-};
-mxImageExport.prototype.drawOverlays = function(a, b) {
-  null != a.overlays && a.overlays.visit(function(a, d) {
-    d instanceof mxShape && d.paint(b)
-  })
-};
-
-function mxAbstractCanvas2D() {
-  this.converter = this.createUrlConverter();
-  this.reset()
-}
-mxAbstractCanvas2D.prototype.state = null;
-mxAbstractCanvas2D.prototype.states = null;
-mxAbstractCanvas2D.prototype.path = null;
-mxAbstractCanvas2D.prototype.rotateHtml = !0;
-mxAbstractCanvas2D.prototype.lastX = 0;
-mxAbstractCanvas2D.prototype.lastY = 0;
-mxAbstractCanvas2D.prototype.moveOp = "M";
-mxAbstractCanvas2D.prototype.lineOp = "L";
-mxAbstractCanvas2D.prototype.quadOp = "Q";
-mxAbstractCanvas2D.prototype.curveOp = "C";
-mxAbstractCanvas2D.prototype.closeOp = "Z";
-mxAbstractCanvas2D.prototype.pointerEvents = !1;
-mxAbstractCanvas2D.prototype.createUrlConverter = function() {
-  return new mxUrlConverter
-};
-mxAbstractCanvas2D.prototype.reset = function() {
-  this.state = this.createState();
-  this.states = []
-};
-mxAbstractCanvas2D.prototype.createState = function() {
-  return {
-    dx: 0,
-    dy: 0,
-    scale: 1,
-    alpha: 1,
-    fillColor: null,
-    fillAlpha: 1,
-    gradientColor: null,
-    gradientAlpha: 1,
-    gradientDirection: null,
-    strokeColor: null,
-    strokeWidth: 1,
-    dashed: !1,
-    dashPattern: "3 3",
-    lineCap: "flat",
-    lineJoin: "miter",
-    miterLimit: 10,
-    fontColor: "#000000",
-    fontBackgroundColor: null,
-    fontBorderColor: null,
-    fontSize: mxConstants.DEFAULT_FONTSIZE,
-    fontFamily: mxConstants.DEFAULT_FONTFAMILY,
-    fontStyle: 0,
-    shadow: !1,
-    shadowColor: mxConstants.SHADOWCOLOR,
-    shadowAlpha: mxConstants.SHADOW_OPACITY,
-    shadowDx: mxConstants.SHADOW_OFFSET_X,
-    shadowDy: mxConstants.SHADOW_OFFSET_Y,
-    rotation: 0,
-    rotationCx: 0,
-    rotationCy: 0
-  }
-};
-mxAbstractCanvas2D.prototype.format = function(a) {
-  return Math.round(parseFloat(a))
-};
-mxAbstractCanvas2D.prototype.addOp = function() {
-  if (null != this.path && (this.path.push(arguments[0]), 2 < arguments.length))
-    for (var a = this.state, b = 2; b < arguments.length; b += 2) this.lastX = arguments[b - 1], this.lastY = arguments[b], this.path.push(this.format((this.lastX + a.dx) * a.scale)), this.path.push(
-      this.format((this.lastY + a.dy) * a.scale))
-};
-mxAbstractCanvas2D.prototype.rotatePoint = function(a, b, c, d, e) {
-  c *= Math.PI / 180;
-  return mxUtils.getRotatedPoint(new mxPoint(a, b), Math.cos(c), Math.sin(c), new mxPoint(d, e))
-};
-mxAbstractCanvas2D.prototype.save = function() {
-  this.states.push(this.state);
-  this.state = mxUtils.clone(this.state)
-};
-mxAbstractCanvas2D.prototype.restore = function() {
-  this.state = this.states.pop()
-};
-mxAbstractCanvas2D.prototype.scale = function(a) {
-  this.state.scale *= a;
-  this.state.strokeWidth *= a
-};
-mxAbstractCanvas2D.prototype.translate = function(a, b) {
-  this.state.dx += a;
-  this.state.dy += b
-};
-mxAbstractCanvas2D.prototype.setAlpha = function(a) {
-  this.state.alpha = a
-};
-mxAbstractCanvas2D.prototype.setFillColor = function(a) {
-  a == mxConstants.NONE && (a = null);
-  this.state.fillColor = a;
-  this.state.gradientColor = null
-};
-mxAbstractCanvas2D.prototype.setGradient = function(a, b, c, d, e, f, g, h, k) {
-  c = this.state;
-  c.fillColor = a;
-  c.fillAlpha = null != h ? h : 1;
-  c.gradientColor = b;
-  c.gradientAlpha = null != k ? k : 1;
-  c.gradientDirection = g
-};
-mxAbstractCanvas2D.prototype.setStrokeColor = function(a) {
-  a == mxConstants.NONE && (a = null);
-  this.state.strokeColor = a
-};
-mxAbstractCanvas2D.prototype.setStrokeWidth = function(a) {
-  this.state.strokeWidth = a
-};
-mxAbstractCanvas2D.prototype.setDashed = function(a) {
-  this.state.dashed = a
-};
-mxAbstractCanvas2D.prototype.setDashPattern = function(a) {
-  this.state.dashPattern = a
-};
-mxAbstractCanvas2D.prototype.setLineCap = function(a) {
-  this.state.lineCap = a
-};
-mxAbstractCanvas2D.prototype.setLineJoin = function(a) {
-  this.state.lineJoin = a
-};
-mxAbstractCanvas2D.prototype.setMiterLimit = function(a) {
-  this.state.miterLimit = a
-};
-mxAbstractCanvas2D.prototype.setFontColor = function(a) {
-  a == mxConstants.NONE && (a = null);
-  this.state.fontColor = a
-};
-mxAbstractCanvas2D.prototype.setFontBackgroundColor = function(a) {
-  a == mxConstants.NONE && (a = null);
-  this.state.fontBackgroundColor = a
-};
-mxAbstractCanvas2D.prototype.setFontBorderColor = function(a) {
-  a == mxConstants.NONE && (a = null);
-  this.state.fontBorderColor = a
-};
-mxAbstractCanvas2D.prototype.setFontSize = function(a) {
-  this.state.fontSize = a
-};
-mxAbstractCanvas2D.prototype.setFontFamily = function(a) {
-  this.state.fontFamily = a
-};
-mxAbstractCanvas2D.prototype.setFontStyle = function(a) {
-  null == a && (a = 0);
-  this.state.fontStyle = a
-};
-mxAbstractCanvas2D.prototype.setShadow = function(a) {
-  this.state.shadow = a
-};
-mxAbstractCanvas2D.prototype.setShadowColor = function(a) {
-  a == mxConstants.NONE && (a = null);
-  this.state.shadowColor = a
-};
-mxAbstractCanvas2D.prototype.setShadowAlpha = function(a) {
-  this.state.shadowAlpha = a
-};
-mxAbstractCanvas2D.prototype.setShadowOffset = function(a, b) {
-  this.state.shadowDx = a;
-  this.state.shadowDy = b
-};
-mxAbstractCanvas2D.prototype.begin = function() {
-  this.lastY = this.lastX = 0;
-  this.path = []
-};
-mxAbstractCanvas2D.prototype.moveTo = function(a, b) {
-  this.addOp(this.moveOp, a, b)
-};
-mxAbstractCanvas2D.prototype.lineTo = function(a, b) {
-  this.addOp(this.lineOp, a, b)
-};
-mxAbstractCanvas2D.prototype.quadTo = function(a, b, c, d) {
-  this.addOp(this.quadOp, a, b, c, d)
-};
-mxAbstractCanvas2D.prototype.curveTo = function(a, b, c, d, e, f) {
-  this.addOp(this.curveOp, a, b, c, d, e, f)
-};
-mxAbstractCanvas2D.prototype.arcTo = function(a, b, c, d, e, f, g) {
-  a = mxUtils.arcToCurves(this.lastX, this.lastY, a, b, c, d, e, f, g);
-  for (b = 0; b < a.length; b += 6) this.curveTo(a[b], a[b + 1], a[b + 2], a[b + 3], a[b + 4], a[b + 5])
-};
-mxAbstractCanvas2D.prototype.close = function(a, b, c, d, e, f) {
-  this.addOp(this.closeOp)
-};
-mxAbstractCanvas2D.prototype.end = function() {};
-
-function mxXmlCanvas2D(a) {
-  mxAbstractCanvas2D.call(this);
-  this.root = a;
-  this.writeDefaults()
-}
-mxUtils.extend(mxXmlCanvas2D, mxAbstractCanvas2D);
-mxXmlCanvas2D.prototype.textEnabled = !0;
-mxXmlCanvas2D.prototype.compressed = !0;
-mxXmlCanvas2D.prototype.writeDefaults = function() {
-  var a;
-  a = this.createElement("fontfamily");
-  a.setAttribute("family", mxConstants.DEFAULT_FONTFAMILY);
-  this.root.appendChild(a);
-  a = this.createElement("fontsize");
-  a.setAttribute("size", mxConstants.DEFAULT_FONTSIZE);
-  this.root.appendChild(a);
-  a = this.createElement("shadowcolor");
-  a.setAttribute("color", mxConstants.SHADOWCOLOR);
-  this.root.appendChild(a);
-  a = this.createElement("shadowalpha");
-  a.setAttribute("alpha", mxConstants.SHADOW_OPACITY);
-  this.root.appendChild(a);
-  a = this.createElement("shadowoffset");
-  a.setAttribute("dx", mxConstants.SHADOW_OFFSET_X);
-  a.setAttribute("dy", mxConstants.SHADOW_OFFSET_Y);
-  this.root.appendChild(a)
-};
-mxXmlCanvas2D.prototype.format = function(a) {
-  return parseFloat(parseFloat(a).toFixed(2))
-};
-mxXmlCanvas2D.prototype.createElement = function(a) {
-  return this.root.ownerDocument.createElement(a)
-};
-mxXmlCanvas2D.prototype.save = function() {
-  this.compressed && mxAbstractCanvas2D.prototype.save.apply(this, arguments);
-  this.root.appendChild(this.createElement("save"))
-};
-mxXmlCanvas2D.prototype.restore = function() {
-  this.compressed && mxAbstractCanvas2D.prototype.restore.apply(this, arguments);
-  this.root.appendChild(this.createElement("restore"))
-};
-mxXmlCanvas2D.prototype.scale = function(a) {
-  if (this.compressed) {
-    if (this.state.scale == a) return;
-    mxAbstractCanvas2D.prototype.setAlpha.apply(this, arguments)
-  }
-  var b = this.createElement("scale");
-  b.setAttribute("scale", a);
-  this.root.appendChild(b)
-};
-mxXmlCanvas2D.prototype.translate = function(a, b) {
-  var c = this.createElement("translate");
-  c.setAttribute("dx", this.format(a));
-  c.setAttribute("dy", this.format(b));
-  this.root.appendChild(c)
-};
-mxXmlCanvas2D.prototype.rotate = function(a, b, c, d, e) {
-  var f = this.createElement("rotate");
-  if (0 != a || b || c) f.setAttribute("theta", this.format(a)), f.setAttribute("flipH", b ? "1" : "0"), f.setAttribute("flipV", c ? "1" : "0"), f.setAttribute("cx", this.format(d)), f.setAttribute(
-    "cy", this.format(e)), this.root.appendChild(f)
-};
-mxXmlCanvas2D.prototype.setAlpha = function(a) {
-  if (this.compressed) {
-    if (this.state.alpha == a) return;
-    mxAbstractCanvas2D.prototype.setAlpha.apply(this, arguments)
-  }
-  var b = this.createElement("alpha");
-  b.setAttribute("alpha", this.format(a));
-  this.root.appendChild(b)
-};
-mxXmlCanvas2D.prototype.setFillColor = function(a) {
-  a == mxConstants.NONE && (a = null);
-  if (this.compressed) {
-    if (this.state.fillColor == a) return;
-    mxAbstractCanvas2D.prototype.setFillColor.apply(this, arguments)
-  }
-  var b = this.createElement("fillcolor");
-  b.setAttribute("color", null != a ? a : mxConstants.NONE);
-  this.root.appendChild(b)
-};
-mxXmlCanvas2D.prototype.setGradient = function(a, b, c, d, e, f, g, h, k) {
-  if (null != a && null != b) {
-    mxAbstractCanvas2D.prototype.setGradient.apply(this, arguments);
-    var l = this.createElement("gradient");
-    l.setAttribute("c1", a);
-    l.setAttribute("c2", b);
-    l.setAttribute("x", this.format(c));
-    l.setAttribute("y", this.format(d));
-    l.setAttribute("w", this.format(e));
-    l.setAttribute("h", this.format(f));
-    null != g && l.setAttribute("direction", g);
-    null != h && l.setAttribute("alpha1", h);
-    null != k && l.setAttribute("alpha2", k);
-    this.root.appendChild(l)
-  }
-};
-mxXmlCanvas2D.prototype.setStrokeColor = function(a) {
-  a == mxConstants.NONE && (a = null);
-  if (this.compressed) {
-    if (this.state.strokeColor == a) return;
-    mxAbstractCanvas2D.prototype.setStrokeColor.apply(this, arguments)
-  }
-  var b = this.createElement("strokecolor");
-  b.setAttribute("color", null != a ? a : mxConstants.NONE);
-  this.root.appendChild(b)
-};
-mxXmlCanvas2D.prototype.setStrokeWidth = function(a) {
-  if (this.compressed) {
-    if (this.state.strokeWidth == a) return;
-    mxAbstractCanvas2D.prototype.setStrokeWidth.apply(this, arguments)
-  }
-  var b = this.createElement("strokewidth");
-  b.setAttribute("width", this.format(a));
-  this.root.appendChild(b)
-};
-mxXmlCanvas2D.prototype.setDashed = function(a) {
-  if (this.compressed) {
-    if (this.state.dashed == a) return;
-    mxAbstractCanvas2D.prototype.setDashed.apply(this, arguments)
-  }
-  var b = this.createElement("dashed");
-  b.setAttribute("dashed", a ? "1" : "0");
-  this.root.appendChild(b)
-};
-mxXmlCanvas2D.prototype.setDashPattern = function(a) {
-  if (this.compressed) {
-    if (this.state.dashPattern == a) return;
-    mxAbstractCanvas2D.prototype.setDashPattern.apply(this, arguments)
-  }
-  var b = this.createElement("dashpattern");
-  b.setAttribute("pattern", a);
-  this.root.appendChild(b)
-};
-mxXmlCanvas2D.prototype.setLineCap = function(a) {
-  if (this.compressed) {
-    if (this.state.lineCap == a) return;
-    mxAbstractCanvas2D.prototype.setLineCap.apply(this, arguments)
-  }
-  var b = this.createElement("linecap");
-  b.setAttribute("cap", a);
-  this.root.appendChild(b)
-};
-mxXmlCanvas2D.prototype.setLineJoin = function(a) {
-  if (this.compressed) {
-    if (this.state.lineJoin == a) return;
-    mxAbstractCanvas2D.prototype.setLineJoin.apply(this, arguments)
-  }
-  var b = this.createElement("linejoin");
-  b.setAttribute("join", a);
-  this.root.appendChild(b)
-};
-mxXmlCanvas2D.prototype.setMiterLimit = function(a) {
-  if (this.compressed) {
-    if (this.state.miterLimit == a) return;
-    mxAbstractCanvas2D.prototype.setMiterLimit.apply(this, arguments)
-  }
-  var b = this.createElement("miterlimit");
-  b.setAttribute("limit", a);
-  this.root.appendChild(b)
-};
-mxXmlCanvas2D.prototype.setFontColor = function(a) {
-  if (this.textEnabled) {
-    a == mxConstants.NONE && (a = null);
-    if (this.compressed) {
-      if (this.state.fontColor == a) return;
-      mxAbstractCanvas2D.prototype.setFontColor.apply(this, arguments)
-    }
-    var b = this.createElement("fontcolor");
-    b.setAttribute("color", null != a ? a : mxConstants.NONE);
-    this.root.appendChild(b)
-  }
-};
-mxXmlCanvas2D.prototype.setFontBackgroundColor = function(a) {
-  if (this.textEnabled) {
-    a == mxConstants.NONE && (a = null);
-    if (this.compressed) {
-      if (this.state.fontBackgroundColor == a) return;
-      mxAbstractCanvas2D.prototype.setFontBackgroundColor.apply(this, arguments)
-    }
-    var b = this.createElement("fontbackgroundcolor");
-    b.setAttribute("color", null != a ? a : mxConstants.NONE);
-    this.root.appendChild(b)
-  }
-};
-mxXmlCanvas2D.prototype.setFontBorderColor = function(a) {
-  if (this.textEnabled) {
-    a == mxConstants.NONE && (a = null);
-    if (this.compressed) {
-      if (this.state.fontBorderColor == a) return;
-      mxAbstractCanvas2D.prototype.setFontBorderColor.apply(this, arguments)
-    }
-    var b = this.createElement("fontbordercolor");
-    b.setAttribute("color", null != a ? a : mxConstants.NONE);
-    this.root.appendChild(b)
-  }
-};
-mxXmlCanvas2D.prototype.setFontSize = function(a) {
-  if (this.textEnabled) {
-    if (this.compressed) {
-      if (this.state.fontSize == a) return;
-      mxAbstractCanvas2D.prototype.setFontSize.apply(this, arguments)
-    }
-    var b = this.createElement("fontsize");
-    b.setAttribute("size", a);
-    this.root.appendChild(b)
-  }
-};
-mxXmlCanvas2D.prototype.setFontFamily = function(a) {
-  if (this.textEnabled) {
-    if (this.compressed) {
-      if (this.state.fontFamily == a) return;
-      mxAbstractCanvas2D.prototype.setFontFamily.apply(this, arguments)
-    }
-    var b = this.createElement("fontfamily");
-    b.setAttribute("family", a);
-    this.root.appendChild(b)
-  }
-};
-mxXmlCanvas2D.prototype.setFontStyle = function(a) {
-  if (this.textEnabled) {
-    null == a && (a = 0);
-    if (this.compressed) {
-      if (this.state.fontStyle == a) return;
-      mxAbstractCanvas2D.prototype.setFontStyle.apply(this, arguments)
-    }
-    var b = this.createElement("fontstyle");
-    b.setAttribute("style", a);
-    this.root.appendChild(b)
-  }
-};
-mxXmlCanvas2D.prototype.setShadow = function(a) {
-  if (this.compressed) {
-    if (this.state.shadow == a) return;
-    mxAbstractCanvas2D.prototype.setShadow.apply(this, arguments)
-  }
-  var b = this.createElement("shadow");
-  b.setAttribute("enabled", a ? "1" : "0");
-  this.root.appendChild(b)
-};
-mxXmlCanvas2D.prototype.setShadowColor = function(a) {
-  if (this.compressed) {
-    a == mxConstants.NONE && (a = null);
-    if (this.state.shadowColor == a) return;
-    mxAbstractCanvas2D.prototype.setShadowColor.apply(this, arguments)
-  }
-  var b = this.createElement("shadowcolor");
-  b.setAttribute("color", null != a ? a : mxConstants.NONE);
-  this.root.appendChild(b)
-};
-mxXmlCanvas2D.prototype.setShadowAlpha = function(a) {
-  if (this.compressed) {
-    if (this.state.shadowAlpha == a) return;
-    mxAbstractCanvas2D.prototype.setShadowAlpha.apply(this, arguments)
-  }
-  var b = this.createElement("shadowalpha");
-  b.setAttribute("alpha", a);
-  this.root.appendChild(b)
-};
-mxXmlCanvas2D.prototype.setShadowOffset = function(a, b) {
-  if (this.compressed) {
-    if (this.state.shadowDx == a && this.state.shadowDy == b) return;
-    mxAbstractCanvas2D.prototype.setShadowOffset.apply(this, arguments)
-  }
-  var c = this.createElement("shadowoffset");
-  c.setAttribute("dx", a);
-  c.setAttribute("dy", b);
-  this.root.appendChild(c)
-};
-mxXmlCanvas2D.prototype.rect = function(a, b, c, d) {
-  var e = this.createElement("rect");
-  e.setAttribute("x", this.format(a));
-  e.setAttribute("y", this.format(b));
-  e.setAttribute("w", this.format(c));
-  e.setAttribute("h", this.format(d));
-  this.root.appendChild(e)
-};
-mxXmlCanvas2D.prototype.roundrect = function(a, b, c, d, e, f) {
-  var g = this.createElement("roundrect");
-  g.setAttribute("x", this.format(a));
-  g.setAttribute("y", this.format(b));
-  g.setAttribute("w", this.format(c));
-  g.setAttribute("h", this.format(d));
-  g.setAttribute("dx", this.format(e));
-  g.setAttribute("dy", this.format(f));
-  this.root.appendChild(g)
-};
-mxXmlCanvas2D.prototype.ellipse = function(a, b, c, d) {
-  var e = this.createElement("ellipse");
-  e.setAttribute("x", this.format(a));
-  e.setAttribute("y", this.format(b));
-  e.setAttribute("w", this.format(c));
-  e.setAttribute("h", this.format(d));
-  this.root.appendChild(e)
-};
-mxXmlCanvas2D.prototype.image = function(a, b, c, d, e, f, g, h) {
-  e = this.converter.convert(e);
-  var k = this.createElement("image");
-  k.setAttribute("x", this.format(a));
-  k.setAttribute("y", this.format(b));
-  k.setAttribute("w", this.format(c));
-  k.setAttribute("h", this.format(d));
-  k.setAttribute("src", e);
-  k.setAttribute("aspect", f ? "1" : "0");
-  k.setAttribute("flipH", g ? "1" : "0");
-  k.setAttribute("flipV", h ? "1" : "0");
-  this.root.appendChild(k)
-};
-mxXmlCanvas2D.prototype.begin = function() {
-  this.root.appendChild(this.createElement("begin"));
-  this.lastY = this.lastX = 0
-};
-mxXmlCanvas2D.prototype.moveTo = function(a, b) {
-  var c = this.createElement("move");
-  c.setAttribute("x", this.format(a));
-  c.setAttribute("y", this.format(b));
-  this.root.appendChild(c);
-  this.lastX = a;
-  this.lastY = b
-};
-mxXmlCanvas2D.prototype.lineTo = function(a, b) {
-  var c = this.createElement("line");
-  c.setAttribute("x", this.format(a));
-  c.setAttribute("y", this.format(b));
-  this.root.appendChild(c);
-  this.lastX = a;
-  this.lastY = b
-};
-mxXmlCanvas2D.prototype.quadTo = function(a, b, c, d) {
-  var e = this.createElement("quad");
-  e.setAttribute("x1", this.format(a));
-  e.setAttribute("y1", this.format(b));
-  e.setAttribute("x2", this.format(c));
-  e.setAttribute("y2", this.format(d));
-  this.root.appendChild(e);
-  this.lastX = c;
-  this.lastY = d
-};
-mxXmlCanvas2D.prototype.curveTo = function(a, b, c, d, e, f) {
-  var g = this.createElement("curve");
-  g.setAttribute("x1", this.format(a));
-  g.setAttribute("y1", this.format(b));
-  g.setAttribute("x2", this.format(c));
-  g.setAttribute("y2", this.format(d));
-  g.setAttribute("x3", this.format(e));
-  g.setAttribute("y3", this.format(f));
-  this.root.appendChild(g);
-  this.lastX = e;
-  this.lastY = f
-};
-mxXmlCanvas2D.prototype.close = function() {
-  this.root.appendChild(this.createElement("close"))
-};
-mxXmlCanvas2D.prototype.text = function(a, b, c, d, e, f, g, h, k, l, m, n) {
-  if (this.textEnabled && null != e) {
-    mxUtils.isNode(e) && (e = mxUtils.getOuterHtml(e));
-    var p = this.createElement("text");
-    p.setAttribute("x", this.format(a));
-    p.setAttribute("y", this.format(b));
-    p.setAttribute("w", this.format(c));
-    p.setAttribute("h", this.format(d));
-    p.setAttribute("str", e);
-    null != f && p.setAttribute("align", f);
-    null != g && p.setAttribute("valign", g);
-    p.setAttribute("wrap", h ? "1" : "0");
-    null == k && (k = "");
-    p.setAttribute("format", k);
-    null != l && p.setAttribute("fill",
-      l ? "1" : "0");
-    null != m && p.setAttribute("clip", m ? "1" : "0");
-    null != n && p.setAttribute("rotation", n);
-    this.root.appendChild(p)
-  }
-};
-mxXmlCanvas2D.prototype.stroke = function() {
-  this.root.appendChild(this.createElement("stroke"))
-};
-mxXmlCanvas2D.prototype.fill = function() {
-  this.root.appendChild(this.createElement("fill"))
-};
-mxXmlCanvas2D.prototype.fillAndStroke = function() {
-  this.root.appendChild(this.createElement("fillstroke"))
-};
-
-function mxSvgCanvas2D(a, b) {
-  mxAbstractCanvas2D.call(this);
-  this.root = a;
-  this.gradients = [];
-  this.defs = null;
-  this.styleEnabled = null != b ? b : !1;
-  var c = null;
-  if (a.ownerDocument != document)
-    for (c = a; null != c && "svg" != c.nodeName;) c = c.parentNode;
-  null != c && (0 < c.getElementsByTagName("defs").length && (this.defs = c.getElementsByTagName("defs")[0]), null == this.defs && (this.defs = this.createElement("defs"), null != c.firstChild ? c.insertBefore(
-    this.defs, c.firstChild) : c.appendChild(this.defs)), this.styleEnabled && this.defs.appendChild(this.createStyle()))
-}
-mxUtils.extend(mxSvgCanvas2D, mxAbstractCanvas2D);
-mxSvgCanvas2D.prototype.node = null;
-mxSvgCanvas2D.prototype.matchHtmlAlignment = !0;
-mxSvgCanvas2D.prototype.textEnabled = !0;
-mxSvgCanvas2D.prototype.foEnabled = !0;
-mxSvgCanvas2D.prototype.strokeTolerance = 0;
-mxSvgCanvas2D.prototype.refCount = 0;
-mxSvgCanvas2D.prototype.blockImagePointerEvents = !1;
-mxSvgCanvas2D.prototype.reset = function() {
-  mxAbstractCanvas2D.prototype.reset.apply(this, arguments);
-  this.gradients = []
-};
-mxSvgCanvas2D.prototype.createStyle = function(a) {
-  a = this.createElement("style");
-  a.setAttribute("type", "text/css");
-  mxUtils.write(a, "svg{font-family:" + mxConstants.DEFAULT_FONTFAMILY + ";font-size:" + mxConstants.DEFAULT_FONTSIZE + ";fill:none;stroke-miterlimit:10}");
-  return a
-};
-mxSvgCanvas2D.prototype.createElement = function(a, b) {
-  if (null != this.root.ownerDocument.createElementNS) return this.root.ownerDocument.createElementNS(b || mxConstants.NS_SVG, a);
-  var c = this.root.ownerDocument.createElement(a);
-  null != b && c.setAttribute("xmlns", b);
-  return c
-};
-mxSvgCanvas2D.prototype.createGradientId = function(a, b, c, d, e) {
-  "#" == a.charAt(0) && (a = a.substring(1));
-  "#" == b.charAt(0) && (b = b.substring(1));
-  a = a.toLowerCase() + "-" + c;
-  b = b.toLowerCase() + "-" + d;
-  c = null;
-  null == e || e == mxConstants.DIRECTION_SOUTH ? c = "s" : e == mxConstants.DIRECTION_EAST ? c = "e" : (d = a, a = b, b = d, e == mxConstants.DIRECTION_NORTH ? c = "s" : e == mxConstants.DIRECTION_WEST &&
-    (c = "e"));
-  return "mx-gradient-" + a + "-" + b + "-" + c
-};
-mxSvgCanvas2D.prototype.getSvgGradient = function(a, b, c, d, e) {
-  var f = this.createGradientId(a, b, c, d, e),
-    g = this.gradients[f];
-  if (null == g) {
-    var h = this.root.ownerSVGElement,
-      k = 0,
-      l = f + "-" + k;
-    if (null != h)
-      for (g = h.ownerDocument.getElementById(l); null != g && g.ownerSVGElement != h;) l = f + "-" + k++, g = h.ownerDocument.getElementById(l);
-    else l = "id" + ++this.refCount;
-    null == g && (g = this.createSvgGradient(a, b, c, d, e), g.setAttribute("id", l), null != this.defs ? this.defs.appendChild(g) : h.appendChild(g));
-    this.gradients[f] = g
-  }
-  return g.getAttribute("id")
-};
-mxSvgCanvas2D.prototype.createSvgGradient = function(a, b, c, d, e) {
-  var f = this.createElement("linearGradient");
-  f.setAttribute("x1", "0%");
-  f.setAttribute("y1", "0%");
-  f.setAttribute("x2", "0%");
-  f.setAttribute("y2", "0%");
-  null == e || e == mxConstants.DIRECTION_SOUTH ? f.setAttribute("y2", "100%") : e == mxConstants.DIRECTION_EAST ? f.setAttribute("x2", "100%") : e == mxConstants.DIRECTION_NORTH ? f.setAttribute(
-    "y1", "100%") : e == mxConstants.DIRECTION_WEST && f.setAttribute("x1", "100%");
-  c = 1 > c ? ";stop-opacity:" + c : "";
-  e = this.createElement("stop");
-  e.setAttribute("offset", "0%");
-  e.setAttribute("style", "stop-color:" + a + c);
-  f.appendChild(e);
-  c = 1 > d ? ";stop-opacity:" + d : "";
-  e = this.createElement("stop");
-  e.setAttribute("offset", "100%");
-  e.setAttribute("style", "stop-color:" + b + c);
-  f.appendChild(e);
-  return f
-};
-mxSvgCanvas2D.prototype.addNode = function(a, b) {
-  var c = this.node,
-    d = this.state;
-  if (null != c) {
-    if ("path" == c.nodeName)
-      if (null != this.path && 0 < this.path.length) c.setAttribute("d", this.path.join(" "));
-      else return;
-    a && null != d.fillColor ? this.updateFill() : this.styleEnabled || ("ellipse" == c.nodeName && mxClient.IS_NS && !mxClient.IS_GC && !mxClient.IS_SF ? c.setAttribute("fill", "transparent") : c.setAttribute(
-      "fill", "none"), a = !1);
-    b && null != d.strokeColor ? this.updateStroke() : this.styleEnabled || c.setAttribute("stroke", "none");
-    null !=
-      d.transform && 0 < d.transform.length && c.setAttribute("transform", d.transform);
-    d.shadow && this.root.appendChild(this.createShadow(c));
-    0 < this.strokeTolerance && !a && this.root.appendChild(this.createTolerance(c));
-    this.pointerEvents && ("path" != c.nodeName || this.path[this.path.length - 1] == this.closeOp) && c.setAttribute("pointer-events", "all");
-    this.root.appendChild(c)
-  }
-};
-mxSvgCanvas2D.prototype.updateFill = function() {
-  var a = this.state;
-  1 > a.alpha && this.node.setAttribute("fill-opacity", a.alpha);
-  null != a.fillColor && (null != a.gradientColor ? (a = this.getSvgGradient(a.fillColor, a.gradientColor, a.fillAlpha, a.gradientAlpha, a.gradientDirection), this.node.setAttribute("fill", "url(#" +
-    a + ")")) : this.node.setAttribute("fill", a.fillColor.toLowerCase()))
-};
-mxSvgCanvas2D.prototype.updateStroke = function() {
-  var a = this.state;
-  this.node.setAttribute("stroke", a.strokeColor.toLowerCase());
-  1 > a.alpha && this.node.setAttribute("stroke-opacity", a.alpha);
-  var b = Math.max(1, this.format(a.strokeWidth * a.scale));
-  1 != b && this.node.setAttribute("stroke-width", b);
-  "path" == this.node.nodeName && this.updateStrokeAttributes();
-  a.dashed && this.node.setAttribute("stroke-dasharray", this.createDashPattern(b))
-};
-mxSvgCanvas2D.prototype.updateStrokeAttributes = function() {
-  var a = this.state;
-  null != a.lineJoin && "miter" != a.lineJoin && this.node.setAttribute("stroke-linejoin", a.lineJoin);
-  if (null != a.lineCap) {
-    var b = a.lineCap;
-    "flat" == b && (b = "butt");
-    "butt" != b && this.node.setAttribute("stroke-linecap", b)
-  }
-  null != a.miterLimit && (!this.styleEnabled || 10 != a.miterLimit) && this.node.setAttribute("stroke-miterlimit", a.miterLimit)
-};
-mxSvgCanvas2D.prototype.createDashPattern = function(a) {
-  var b = this.state.dashPattern.split(" "),
-    c = [];
-  if (0 < b.length)
-    for (var d = 0; d < b.length; d++) c[d] = Number(b[d]) * a;
-  return c.join(" ")
-};
-mxSvgCanvas2D.prototype.createTolerance = function(a) {
-  a = a.cloneNode(!0);
-  var b = parseFloat(a.getAttribute("stroke-width") || 1) + this.strokeTolerance;
-  a.setAttribute("pointer-events", "stroke");
-  a.setAttribute("visibility", "hidden");
-  a.removeAttribute("stroke-dasharray");
-  a.setAttribute("stroke-width", b);
-  a.setAttribute("fill", "none");
-  a.setAttribute("stroke", mxClient.IS_OP ? "none" : "white");
-  return a
-};
-mxSvgCanvas2D.prototype.createShadow = function(a) {
-  a = a.cloneNode(!0);
-  var b = this.state;
-  "none" != a.getAttribute("fill") && a.setAttribute("fill", b.shadowColor);
-  "none" != a.getAttribute("stroke") && a.setAttribute("stroke", b.shadowColor);
-  a.setAttribute("transform", "translate(" + this.format(b.shadowDx * b.scale) + "," + this.format(b.shadowDy * b.scale) + ")" + (b.transform || ""));
-  a.setAttribute("opacity", b.shadowAlpha);
-  return a
-};
-mxSvgCanvas2D.prototype.rotate = function(a, b, c, d, e) {
-  if (0 != a || b || c) {
-    var f = this.state;
-    d += f.dx;
-    e += f.dy;
-    d *= f.scale;
-    e *= f.scale;
-    f.transform = f.transform || "";
-    if (b && c) a += 180;
-    else if (b ^ c) {
-      var g = b ? d : 0,
-        h = b ? -1 : 1,
-        k = c ? e : 0,
-        l = c ? -1 : 1;
-      f.transform += "translate(" + this.format(g) + "," + this.format(k) + ")scale(" + this.format(h) + "," + this.format(l) + ")translate(" + this.format(-g) + "," + this.format(-k) + ")"
-    }
-    if (b ? !c : c) a *= -1;
-    0 != a && (f.transform += "rotate(" + this.format(a) + "," + this.format(d) + "," + this.format(e) + ")");
-    f.rotation += a;
-    f.rotationCx =
-      d;
-    f.rotationCy = e
-  }
-};
-mxSvgCanvas2D.prototype.begin = function() {
-  mxAbstractCanvas2D.prototype.begin.apply(this, arguments);
-  this.node = this.createElement("path")
-};
-mxSvgCanvas2D.prototype.rect = function(a, b, c, d) {
-  var e = this.state,
-    f = this.createElement("rect");
-  f.setAttribute("x", this.format((a + e.dx) * e.scale));
-  f.setAttribute("y", this.format((b + e.dy) * e.scale));
-  f.setAttribute("width", this.format(c * e.scale));
-  f.setAttribute("height", this.format(d * e.scale));
-  this.node = f
-};
-mxSvgCanvas2D.prototype.roundrect = function(a, b, c, d, e, f) {
-  this.rect(a, b, c, d);
-  0 < e && this.node.setAttribute("rx", this.format(e * this.state.scale));
-  0 < f && this.node.setAttribute("ry", this.format(f * this.state.scale))
-};
-mxSvgCanvas2D.prototype.ellipse = function(a, b, c, d) {
-  var e = this.state,
-    f = this.createElement("ellipse");
-  f.setAttribute("cx", Math.round((a + c / 2 + e.dx) * e.scale));
-  f.setAttribute("cy", Math.round((b + d / 2 + e.dy) * e.scale));
-  f.setAttribute("rx", c / 2 * e.scale);
-  f.setAttribute("ry", d / 2 * e.scale);
-  this.node = f
-};
-mxSvgCanvas2D.prototype.image = function(a, b, c, d, e, f, g, h) {
-  e = this.converter.convert(e);
-  f = null != f ? f : !0;
-  g = null != g ? g : !1;
-  h = null != h ? h : !1;
-  var k = this.state;
-  a += k.dx;
-  b += k.dy;
-  var l = this.createElement("image");
-  l.setAttribute("x", this.format(a * k.scale));
-  l.setAttribute("y", this.format(b * k.scale));
-  l.setAttribute("width", this.format(c * k.scale));
-  l.setAttribute("height", this.format(d * k.scale));
-  null == l.setAttributeNS ? l.setAttribute("xlink:href", e) : l.setAttributeNS(mxConstants.NS_XLINK, "href", e);
-  f || l.setAttribute("preserveAspectRatio",
-    "none");
-  1 > k.alpha && l.setAttribute("opacity", k.alpha);
-  e = this.state.transform || "";
-  if (g || h) {
-    var m = f = 1,
-      n = 0,
-      p = 0;
-    g && (f = -1, n = -c - 2 * a);
-    h && (m = -1, p = -d - 2 * b);
-    e += "scale(" + f + "," + m + ")translate(" + n + "," + p + ")"
-  }
-  0 < e.length && l.setAttribute("transform", e);
-  this.root.appendChild(l);
-  this.blockImagePointerEvents && (l.setAttribute("style", "pointer-events:none"), l = this.createElement("rect"), l.setAttribute("visibility", "hidden"), l.setAttribute("pointer-events", "fill"),
-    l.setAttribute("x", this.format(a * k.scale)), l.setAttribute("y",
-      this.format(b * k.scale)), l.setAttribute("width", this.format(c * k.scale)), l.setAttribute("height", this.format(d * k.scale)), this.root.appendChild(l))
-};
-mxSvgCanvas2D.prototype.createDiv = function(a, b, c, d, e) {
-  c = this.state;
-  d = "display:inline-block;font-size:" + Math.round(c.fontSize) + "px;font-family:" + c.fontFamily + ";color:" + c.fontColor + ";line-height:" + Math.round(c.fontSize * mxConstants.LINE_HEIGHT) +
-    "px;" + d;
-  (c.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD && (d += "font-weight:bold;");
-  (c.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC && (d += "font-style:italic;");
-  (c.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE && (d += "font-decoration:underline;");
-  b == mxConstants.ALIGN_CENTER ? d += "text-align:center;" : b == mxConstants.ALIGN_RIGHT && (d += "text-align:right;");
-  b = "";
-  null != c.fontBackgroundColor && (b += "background-color:" + c.fontBackgroundColor + ";");
-  null != c.fontBorderColor && (b += "border:1px solid " + c.fontBorderColor + ";");
-  mxUtils.isNode(a) || (c = document.createElement("textarea"), c.innerHTML = a.replace(/&lt;/g, "\x26amp;lt;").replace(/&gt;/g, "\x26amp;gt;").replace(/</g, "\x26lt;").replace(/>/g, "\x26gt;"), a =
-    c.value, e ? d += b : 0 < b.length && (a = '\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"display:inline-block;' +
-      b + '"\x3e' + a + "\x3c/div\x3e"));
-  if (!mxClient.IS_IE && document.createElementNS) return e = document.createElementNS("http://www.w3.org/1999/xhtml", "div"), e.setAttribute("style", d), mxUtils.isNode(a) ? this.root.ownerDocument !=
-    document ? e.appendChild(a.cloneNode(!0)) : e.appendChild(a) : e.innerHTML = a, e;
-  mxUtils.isNode(a) && this.root.ownerDocument != document && (a = a.outerHTML);
-  a = a.replace(/<br>/g, "\x3cbr /\x3e").replace(/<hr>/g, "\x3chr /\x3e");
-  return mxUtils.parseXml('\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"' +
-    d + '"\x3e' + a + "\x3c/div\x3e").documentElement
-};
-mxSvgCanvas2D.prototype.text = function(a, b, c, d, e, f, g, h, k, l, m, n) {
-  if (this.textEnabled && null != e) {
-    n = null != n ? n : 0;
-    var p = this.state;
-    a += p.dx;
-    b += p.dy;
-    if (this.foEnabled && "html" == k) {
-      var q = "vertical-align:top;";
-      m ? (q += "overflow:hidden;", 0 < d && (q += "max-height:" + Math.round(d) + "px;"), 0 < c && (q += "width:" + Math.round(c) + "px;")) : l && (q += "width:" + Math.round(c) + "px;", 0 < d &&
-        (q += "max-height:" + Math.round(d) + "px;"));
-      h ? (!m && 0 < c && (q += "width:" + Math.round(c) + "px;"), q += "white-space:normal;") : q += "white-space:nowrap;";
-      h = this.createElement("g");
-      1 > p.alpha && h.setAttribute("opacity", p.alpha);
-      k = this.createElement("foreignObject");
-      k.setAttribute("pointer-events", "all");
-      q = this.createDiv(e, f, g, q, l);
-      if (null != q) {
-        h.appendChild(k);
-        this.root.appendChild(h);
-        var s = 0;
-        if (mxClient.IS_IE && !mxClient.IS_SVG) {
-          var r = document.createElement("div");
-          r.style.cssText = q.getAttribute("style");
-          r.style.display = mxClient.IS_QUIRKS ? "inline" : "inline-block";
-          r.style.visibility = "hidden";
-          r.innerHTML = mxUtils.isNode(e) ? e.outerHTML : e;
-          document.body.appendChild(r);
-          s = r.offsetWidth;
-          d = mxClient.IS_QUIRKS && 0 < d && m ? Math.min(d, r.offsetHeight + 2) : r.offsetHeight;
-          r.parentNode.removeChild(r);
-          k.appendChild(q)
-        } else this.root.ownerDocument != document ? (q.style.visibility = "hidden", document.body.appendChild(q), s = q.offsetWidth, d = q.offsetHeight, k.appendChild(q), q.style.visibility = "") :
-          (k.appendChild(q), s = q.offsetWidth, d = q.offsetHeight);
-        c = l ? Math.max(c, s) : s;
-        1 > p.alpha && h.setAttribute("opacity", p.alpha);
-        l = e = 0;
-        f == mxConstants.ALIGN_CENTER ? e -= c / 2 : f == mxConstants.ALIGN_RIGHT && (e -= c);
-        a += e;
-        g == mxConstants.ALIGN_MIDDLE ?
-          l -= d / 2 : g == mxConstants.ALIGN_BOTTOM && (l -= d);
-        b += l;
-        f = 1 != p.scale ? "scale(" + p.scale + ")" : "";
-        0 != p.rotation && this.rotateHtml ? (f += "rotate(" + p.rotation + "," + c / 2 + "," + d / 2 + ")", b = this.rotatePoint((a + c / 2) * p.scale, (b + d / 2) * p.scale, p.rotation, p.rotationCx,
-          p.rotationCy), a = b.x - c * p.scale / 2, b = b.y - d * p.scale / 2) : (a *= p.scale, b *= p.scale);
-        0 != n && (f += "rotate(" + n + "," + -e + "," + -l + ")");
-        h.setAttribute("transform", "translate(" + Math.round(a) + "," + Math.round(b) + ")" + f);
-        k.setAttribute("width", Math.round(Math.max(1, c)));
-        k.setAttribute("height",
-          Math.round(Math.max(1, d)))
-      }
-    } else this.plainText(a, b, c, d, e, f, g, h, l, m, n)
-  }
-};
-mxSvgCanvas2D.prototype.createClip = function(a, b, c, d) {
-  a = Math.round(a);
-  b = Math.round(b);
-  c = Math.round(c);
-  d = Math.round(d);
-  for (var e = "mx-clip-" + a + "-" + b + "-" + c + "-" + d, f = 0, g = e + "-" + f; null != document.getElementById(g);) g = e + "-" + ++f;
-  clip = this.createElement("clipPath");
-  clip.setAttribute("id", g);
-  e = this.createElement("rect");
-  e.setAttribute("x", a);
-  e.setAttribute("y", b);
-  e.setAttribute("width", c);
-  e.setAttribute("height", d);
-  clip.appendChild(e);
-  return clip
-};
-mxSvgCanvas2D.prototype.plainText = function(a, b, c, d, e, f, g, h, k, l, m) {
-  m = null != m ? m : 0;
-  h = this.state;
-  var n = Math.round(h.fontSize),
-    p = this.createElement("g"),
-    q = h.transform || "";
-  0 != m && (q += "rotate(" + m + "," + this.format(a * h.scale) + "," + this.format(b * h.scale) + ")");
-  if (l && 0 < c && 0 < d) {
-    var s = a;
-    m = b;
-    f == mxConstants.ALIGN_CENTER ? s -= c / 2 : f == mxConstants.ALIGN_RIGHT && (s -= c);
-    g == mxConstants.ALIGN_MIDDLE ? m -= d / 2 : g == mxConstants.ALIGN_BOTTOM && (m -= d);
-    m = this.createClip(s * h.scale - 2, m * h.scale - 2, c * h.scale + 4, d * h.scale + 4);
-    null != this.defs ? this.defs.appendChild(m) :
-      this.root.appendChild(m);
-    p.setAttribute("clip-path", "url(#" + m.getAttribute("id") + ")")
-  }
-  this.updateFont(p, f);
-  m = f == mxConstants.ALIGN_RIGHT ? "end" : f == mxConstants.ALIGN_CENTER ? "middle" : "start";
-  "start" != m && p.setAttribute("text-anchor", m);
-  (!this.styleEnabled || n != mxConstants.DEFAULT_FONTSIZE) && p.setAttribute("font-size", Math.round(n * h.scale) + "px");
-  0 < q.length && p.setAttribute("transform", q);
-  1 > h.alpha && p.setAttribute("opacity", h.alpha);
-  var q = e.split("\n"),
-    s = Math.round(n * mxConstants.LINE_HEIGHT),
-    r = n + (q.length -
-      1) * s;
-  m = b + n - 1;
-  g == mxConstants.ALIGN_MIDDLE ? (d = (this.matchHtmlAlignment && l && 0 < d ? Math.min(r, d) : r) / 2, m -= d + 1) : g == mxConstants.ALIGN_BOTTOM && (d = this.matchHtmlAlignment && l && 0 < d ?
-    Math.min(r, d) : r, m -= d + 2);
-  for (d = 0; d < q.length; d++) 0 < q[d].length && 0 < mxUtils.trim(q[d]).length && (l = this.createElement("text"), l.setAttribute("x", this.format(a * h.scale)), l.setAttribute("y", this.format(
-    m * h.scale)), mxUtils.write(l, q[d]), p.appendChild(l)), m += s;
-  this.root.appendChild(p);
-  this.addTextBackground(p, e, a, b, c, r, f, g, k)
-};
-mxSvgCanvas2D.prototype.updateFont = function(a) {
-  var b = this.state;
-  a.setAttribute("fill", b.fontColor);
-  (!this.styleEnabled || b.fontFamily != mxConstants.DEFAULT_FONTFAMILY) && a.setAttribute("font-family", b.fontFamily);
-  (b.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD && a.setAttribute("font-weight", "bold");
-  (b.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC && a.setAttribute("font-style", "italic");
-  (b.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE && a.setAttribute("text-decoration",
-    "underline")
-};
-mxSvgCanvas2D.prototype.addTextBackground = function(a, b, c, d, e, f, g, h, k) {
-  var l = this.state;
-  if (null != l.fontBackgroundColor || null != l.fontBorderColor) {
-    var m = null;
-    k ? (g == mxConstants.ALIGN_CENTER ? c -= e / 2 : g == mxConstants.ALIGN_RIGHT && (c -= e), h == mxConstants.ALIGN_MIDDLE ? d -= f / 2 : h == mxConstants.ALIGN_BOTTOM && (d -= f), m = new mxRectangle(
-      (c + 1) * l.scale, d * l.scale, (e - 2) * l.scale, (f + 2) * l.scale)) : null != a.getBBox && this.root.ownerDocument == document ? (m = a.getBBox(), b = mxClient.IS_IE && mxClient.IS_SVG,
-      m = new mxRectangle(m.x, m.y + (b ? 0 :
-        1), m.width, m.height + (b ? 1 : 0))) : (m = document.createElement("div"), m.style.lineHeight = Math.round(l.fontSize * mxConstants.LINE_HEIGHT) + "px", m.style.fontSize = Math.round(l.fontSize) +
-      "px", m.style.fontFamily = l.fontFamily, m.style.whiteSpace = "nowrap", m.style.position = "absolute", m.style.visibility = "hidden", m.style.display = mxClient.IS_QUIRKS ? "inline" :
-      "inline-block", m.style.zoom = "1", (l.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD && (m.style.fontWeight = "bold"), (l.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC &&
-      (m.style.fontStyle = "italic"), b = mxUtils.htmlEntities(b, !1), m.innerHTML = b.replace(/\n/g, "\x3cbr/\x3e"), document.body.appendChild(m), e = m.offsetWidth, f = m.offsetHeight, m.parentNode
-      .removeChild(m), g == mxConstants.ALIGN_CENTER ? c -= e / 2 : g == mxConstants.ALIGN_RIGHT && (c -= e), h == mxConstants.ALIGN_MIDDLE ? d -= f / 2 : h == mxConstants.ALIGN_BOTTOM && (d -= f),
-      m = new mxRectangle((c + 1) * l.scale, (d + 2) * l.scale, e * l.scale, (f + 1) * l.scale));
-    null != m && (b = this.createElement("rect"), b.setAttribute("fill", l.fontBackgroundColor || "none"), b.setAttribute("stroke",
-      l.fontBorderColor || "none"), b.setAttribute("x", Math.floor(m.x - 1)), b.setAttribute("y", Math.floor(m.y - 1)), b.setAttribute("width", Math.ceil(m.width + 2)), b.setAttribute("height",
-      Math.ceil(m.height)), l = null != l.fontBorderColor ? Math.max(1, this.format(l.scale)) : 0, b.setAttribute("stroke-width", l), this.root.ownerDocument == document && 1 == mxUtils.mod(l,
-      2) && b.setAttribute("transform", "translate(0.5, 0.5)"), a.insertBefore(b, a.firstChild))
-  }
-};
-mxSvgCanvas2D.prototype.stroke = function() {
-  this.addNode(!1, !0)
-};
-mxSvgCanvas2D.prototype.fill = function() {
-  this.addNode(!0, !1)
-};
-mxSvgCanvas2D.prototype.fillAndStroke = function() {
-  this.addNode(!0, !0)
-};
-var mxVmlCanvas2D = function(a) {
-  mxAbstractCanvas2D.call(this);
-  this.root = a
-};
-mxUtils.extend(mxVmlCanvas2D, mxAbstractCanvas2D);
-mxVmlCanvas2D.prototype.node = null;
-mxVmlCanvas2D.prototype.textEnabled = !0;
-mxVmlCanvas2D.prototype.moveOp = "m";
-mxVmlCanvas2D.prototype.lineOp = "l";
-mxVmlCanvas2D.prototype.curveOp = "c";
-mxVmlCanvas2D.prototype.closeOp = "x";
-mxVmlCanvas2D.prototype.rotatedHtmlBackground = "";
-mxVmlCanvas2D.prototype.vmlScale = 1;
-mxVmlCanvas2D.prototype.addNode = function(a, b) {
-  var c = this.node,
-    d = this.state;
-  if (null != c) {
-    if ("shape" == c.nodeName)
-      if (null != this.path && 0 < this.path.length) c.path = this.path.join(" ") + " e", c.style.width = this.root.style.width, c.style.height = this.root.style.height, c.coordsize = parseInt(c.style
-        .width) + " " + parseInt(c.style.height);
-      else return;
-    c.strokeweight = this.format(Math.max(1, d.strokeWidth * d.scale / this.vmlScale)) + "px";
-    d.shadow && this.root.appendChild(this.createShadow(c, a && null != d.fillColor, b && null != d.strokeColor));
-    b && null != d.strokeColor ? (c.stroked = "true", c.strokecolor = d.strokeColor) : c.stroked = "false";
-    c.appendChild(this.createStroke());
-    a && null != d.fillColor ? c.appendChild(this.createFill()) : this.pointerEvents && ("shape" != c.nodeName || this.path[this.path.length - 1] == this.closeOp) ? c.appendChild(this.createTransparentFill()) :
-      c.filled = "false";
-    this.root.appendChild(c)
-  }
-};
-mxVmlCanvas2D.prototype.createTransparentFill = function() {
-  var a = document.createElement(mxClient.VML_PREFIX + ":fill");
-  a.src = mxClient.imageBasePath + "/transparent.gif";
-  a.type = "tile";
-  return a
-};
-mxVmlCanvas2D.prototype.createFill = function() {
-  var a = this.state,
-    b = document.createElement(mxClient.VML_PREFIX + ":fill");
-  b.color = a.fillColor;
-  if (null != a.gradientColor) {
-    b.type = "gradient";
-    b.method = "none";
-    b.color2 = a.gradientColor;
-    var c = 180 - a.rotation,
-      c = a.gradientDirection == mxConstants.DIRECTION_WEST ? c - (90 + ("x" == this.root.style.flip ? 180 : 0)) : a.gradientDirection == mxConstants.DIRECTION_EAST ? c + (90 + ("x" == this.root.style
-        .flip ? 180 : 0)) : a.gradientDirection == mxConstants.DIRECTION_NORTH ? c - (180 + ("y" == this.root.style.flip ?
-        -180 : 0)) : c + ("y" == this.root.style.flip ? -180 : 0);
-    if ("x" == this.root.style.flip || "y" == this.root.style.flip) c *= -1;
-    b.angle = mxUtils.mod(c, 360);
-    b.opacity = 100 * a.alpha * a.fillAlpha + "%";
-    b.setAttribute(mxClient.OFFICE_PREFIX + ":opacity2", 100 * a.alpha * a.gradientAlpha + "%")
-  } else 1 > a.alpha && (b.opacity = 100 * a.alpha + "%");
-  return b
-};
-mxVmlCanvas2D.prototype.createStroke = function() {
-  var a = this.state,
-    b = document.createElement(mxClient.VML_PREFIX + ":stroke");
-  b.endcap = a.lineCap || "flat";
-  b.joinstyle = a.lineJoin || "miter";
-  b.miterlimit = a.miterLimit || "10";
-  1 > a.alpha && (b.opacity = 100 * a.alpha + "%");
-  a.dashed && (b.dashstyle = this.getVmlDashStyle());
-  return b
-};
-mxVmlCanvas2D.prototype.getVmlDashStyle = function() {
-  var a = "dash";
-  if (null != this.state.dashPattern) {
-    var b = this.state.dashPattern.split(" ");
-    0 < b.length && 1 == b[0] && (a = "0 2")
-  }
-  return a
-};
-mxVmlCanvas2D.prototype.createShadow = function(a, b, c) {
-  var d = this.state,
-    e = -d.rotation * (Math.PI / 180),
-    f = Math.cos(e),
-    e = Math.sin(e),
-    g = d.shadowDx * d.scale,
-    h = d.shadowDy * d.scale;
-  "x" == this.root.style.flip ? g *= -1 : "y" == this.root.style.flip && (h *= -1);
-  var k = a.cloneNode(!0);
-  k.style.marginLeft = Math.round(g * f - h * e) + "px";
-  k.style.marginTop = Math.round(g * e + h * f) + "px";
-  8 == document.documentMode && (k.strokeweight = a.strokeweight, "shape" == a.nodeName && (k.path = this.path.join(" ") + " e", k.style.width = this.root.style.width, k.style.height =
-    this.root.style.height, k.coordsize = parseInt(a.style.width) + " " + parseInt(a.style.height)));
-  c ? (k.strokecolor = d.shadowColor, k.appendChild(this.createShadowStroke())) : k.stroked = "false";
-  b ? k.appendChild(this.createShadowFill()) : k.filled = "false";
-  return k
-};
-mxVmlCanvas2D.prototype.createShadowFill = function() {
-  var a = document.createElement(mxClient.VML_PREFIX + ":fill");
-  a.color = this.state.shadowColor;
-  a.opacity = 100 * this.state.alpha * this.state.shadowAlpha + "%";
-  return a
-};
-mxVmlCanvas2D.prototype.createShadowStroke = function() {
-  var a = this.createStroke();
-  a.opacity = 100 * this.state.alpha * this.state.shadowAlpha + "%";
-  return a
-};
-mxVmlCanvas2D.prototype.rotate = function(a, b, c, d, e) {
-  b && c ? a += 180 : b ? this.root.style.flip = "x" : c && (this.root.style.flip = "y");
-  if (b ? !c : c) a *= -1;
-  this.root.style.rotation = a;
-  this.state.rotation += a;
-  this.state.rotationCx = d;
-  this.state.rotationCy = e
-};
-mxVmlCanvas2D.prototype.begin = function() {
-  mxAbstractCanvas2D.prototype.begin.apply(this, arguments);
-  this.node = document.createElement(mxClient.VML_PREFIX + ":shape");
-  this.node.style.position = "absolute"
-};
-mxVmlCanvas2D.prototype.quadTo = function(a, b, c, d) {
-  var e = this.state,
-    f = (this.lastX + e.dx) * e.scale,
-    g = (this.lastY + e.dy) * e.scale;
-  a = (a + e.dx) * e.scale;
-  b = (b + e.dy) * e.scale;
-  c = (c + e.dx) * e.scale;
-  d = (d + e.dy) * e.scale;
-  var g = g + 2 / 3 * (b - g),
-    h = c + 2 / 3 * (a - c);
-  b = d + 2 / 3 * (b - d);
-  this.path.push("c " + this.format(f + 2 / 3 * (a - f)) + " " + this.format(g) + " " + this.format(h) + " " + this.format(b) + " " + this.format(c) + " " + this.format(d));
-  this.lastX = c / e.scale - e.dx;
-  this.lastY = d / e.scale - e.dy
-};
-mxVmlCanvas2D.prototype.createRect = function(a, b, c, d, e) {
-  var f = this.state;
-  a = document.createElement(a);
-  a.style.position = "absolute";
-  a.style.left = this.format((b + f.dx) * f.scale) + "px";
-  a.style.top = this.format((c + f.dy) * f.scale) + "px";
-  a.style.width = this.format(d * f.scale) + "px";
-  a.style.height = this.format(e * f.scale) + "px";
-  return a
-};
-mxVmlCanvas2D.prototype.rect = function(a, b, c, d) {
-  this.node = this.createRect(mxClient.VML_PREFIX + ":rect", a, b, c, d)
-};
-mxVmlCanvas2D.prototype.roundrect = function(a, b, c, d, e, f) {
-  this.node = this.createRect(mxClient.VML_PREFIX + ":roundrect", a, b, c, d);
-  this.node.setAttribute("arcsize", Math.max(100 * e / c, 100 * f / d) + "%")
-};
-mxVmlCanvas2D.prototype.ellipse = function(a, b, c, d) {
-  this.node = this.createRect(mxClient.VML_PREFIX + ":oval", a, b, c, d)
-};
-mxVmlCanvas2D.prototype.image = function(a, b, c, d, e, f, g, h) {
-  var k = null;
-  f ? (k = this.createRect(mxClient.VML_PREFIX + ":rect", a, b, c, d), k.stroked = "false", a = document.createElement(mxClient.VML_PREFIX + ":fill"), a.aspect = f ? "atmost" : "ignore", a.rotate =
-    "true", a.type = "frame", a.src = e, k.appendChild(a)) : (k = this.createRect(mxClient.VML_PREFIX + ":image", a, b, c, d), k.src = e);
-  g && h ? k.style.rotation = "180" : g ? k.style.flip = "x" : h && (k.style.flip = "y");
-  1 > this.state.alpha && (k.style.filter += "alpha(opacity\x3d" + 100 * this.state.alpha + ")");
-  this.root.appendChild(k)
-};
-mxVmlCanvas2D.prototype.createDiv = function(a, b, c, d) {
-  c = document.createElement("div");
-  var e = this.state,
-    f = "";
-  null != e.fontBackgroundColor && (f += "background-color:" + e.fontBackgroundColor + ";");
-  null != e.fontBorderColor && (f += "border:1px solid " + e.fontBorderColor + ";");
-  mxUtils.isNode(a) ? c.appendChild(a) : 0 < f.length && !d ? (d = document.createElement("div"), d.style.cssText = f, d.style.display = mxClient.IS_QUIRKS ? "inline" : "inline-block", d.style.zoom =
-    "1", d.innerHTML = a, c.appendChild(d)) : (c.style.cssText = f, c.innerHTML = a);
-  a = c.style;
-  a.fontSize = Math.round(e.fontSize / this.vmlScale) + "px";
-  a.fontFamily = e.fontFamily;
-  a.color = e.fontColor;
-  a.verticalAlign = "top";
-  a.textAlign = b || "left";
-  a.lineHeight = Math.round(e.fontSize * mxConstants.LINE_HEIGHT / this.vmlScale) + "px";
-  (e.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD && (a.fontWeight = "bold");
-  (e.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC && (a.fontStyle = "italic");
-  (e.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE && (a.fontDecoration = "underline");
-  return c
-};
-mxVmlCanvas2D.prototype.text = function(a, b, c, d, e, f, g, h, k, l, m, n) {
-  if (this.textEnabled && null != e) {
-    var p = this.state;
-    if ("html" == k) {
-      null != p.rotation && (b = this.rotatePoint(a, b, p.rotation, p.rotationCx, p.rotationCy), a = b.x, b = b.y);
-      8 == document.documentMode ? (a += p.dx, b += p.dy) : (a *= p.scale, b *= p.scale);
-      k = 8 == document.documentMode ? document.createElement(mxClient.VML_PREFIX + ":group") : document.createElement("div");
-      k.style.position = "absolute";
-      k.style.display = "inline";
-      k.style.left = this.format(a) + "px";
-      k.style.top = this.format(b) +
-        "px";
-      k.style.zoom = p.scale;
-      var q = document.createElement("div");
-      q.style.position = "relative";
-      q.style.display = "inline";
-      var s = mxUtils.getAlignmentAsPoint(f, g),
-        r = s.x,
-        s = s.y;
-      e = this.createDiv(e, f, g, l);
-      f = document.createElement("div");
-      h ? (!m && 0 < c && (e.style.width = Math.round(c) + "px"), e.style.whiteSpace = "normal") : e.style.whiteSpace = "nowrap";
-      h = p.rotation + (n || 0);
-      this.rotateHtml && 0 != h ? (f.style.display = "inline", f.style.zoom = "1", f.appendChild(e), 8 == document.documentMode && "DIV" != this.root.nodeName ? (q.appendChild(f), k.appendChild(q)) :
-        k.appendChild(f)) : 8 == document.documentMode ? (q.appendChild(e), k.appendChild(q)) : (e.style.display = "inline", k.appendChild(e));
-      "DIV" != this.root.nodeName ? (n = document.createElement(mxClient.VML_PREFIX + ":rect"), n.stroked = "false", n.filled = "false", n.appendChild(k), this.root.appendChild(n)) : this.root.appendChild(
-        k);
-      m ? (e.style.overflow = "hidden", 0 < c && (e.style.width = Math.round(c) + "px"), 0 < d && 8 == document.documentMode && (e.style.maxHeight = Math.round(d) + "px")) : l && (e.style.width = c +
-        "px", 0 < d && (e.style.maxHeight = Math.round(d) +
-          "px"));
-      if (this.rotateHtml && 0 != h) {
-        c = h * (Math.PI / 180);
-        h = parseFloat(parseFloat(Math.cos(c)).toFixed(8));
-        n = parseFloat(parseFloat(Math.sin(-c)).toFixed(8));
-        c %= 2 * Math.PI;
-        0 > c && (c += 2 * Math.PI);
-        c %= Math.PI;
-        c > Math.PI / 2 && (c = Math.PI - c);
-        g = Math.cos(c);
-        var t = Math.sin(c);
-        8 == document.documentMode && (e.style.display = "inline-block", f.style.display = "inline-block", q.style.display = "inline-block");
-        e.style.visibility = "hidden";
-        document.body.appendChild(e);
-        c = e.offsetWidth;
-        q = e.offsetHeight;
-        if (mxClient.IS_QUIRKS && (m || l) && q > d) q =
-          d, e.style.height = q + "px";
-        d = q;
-        m = (d - d * g + c * -t) / 2 - n * c * (r + 0.5) + h * d * (s + 0.5);
-        l = (c - c * g + d * -t) / 2 + h * c * (r + 0.5) + n * d * (s + 0.5);
-        "group" == k.nodeName && "DIV" == this.root.nodeName ? (r = document.createElement("div"), r.style.display = "inline-block", r.style.position = "absolute", r.style.left = this.format(a + (l -
-          c / 2) * p.scale) + "px", r.style.top = this.format(b + (m - d / 2) * p.scale) + "px", k.parentNode.appendChild(r), r.appendChild(k)) : (p = 8 == document.documentMode ? 1 : p.scale, k.style
-          .left = this.format(a + (l - c / 2) * p) + "px", k.style.top = this.format(b + (m -
-            d / 2) * p) + "px");
-        f.style.filter = "progid:DXImageTransform.Microsoft.Matrix(M11\x3d" + h + ", M12\x3d" + n + ", M21\x3d" + -n + ", M22\x3d" + h + ", sizingMethod\x3d'auto expand')";
-        f.style.backgroundColor = this.rotatedHtmlBackground;
-        1 > this.state.alpha && (f.style.filter += "alpha(opacity\x3d" + 100 * this.state.alpha + ")");
-        e.style.visibility = "";
-        f.appendChild(e)
-      } else 8 != document.documentMode ? (e.style.verticalAlign = "top", 1 > this.state.alpha && (k.style.filter = "alpha(opacity\x3d" + 100 * this.state.alpha + ")"), p = e.parentNode, e.style.visibility =
-        "hidden", document.body.appendChild(e), c = e.offsetWidth, q = e.offsetHeight, mxClient.IS_QUIRKS && (m && q > d) && (q = d, e.style.height = q + "px"), d = q, e.style.visibility = "", p.appendChild(
-          e), k.style.left = this.format(a + c * r * this.state.scale) + "px", k.style.top = this.format(b + d * s * this.state.scale) + "px") : (1 > this.state.alpha && (e.style.filter =
-        "alpha(opacity\x3d" + 100 * this.state.alpha + ")"), q.style.left = 100 * r + "%", q.style.top = 100 * s + "%")
-    } else this.plainText(a, b, c, d, mxUtils.htmlEntities(e, !1), f, g, h, k, l, m, n)
-  }
-};
-mxVmlCanvas2D.prototype.plainText = function(a, b, c, d, e, f, g, h, k, l, m, n) {
-  d = this.state;
-  a = (a + d.dx) * d.scale;
-  b = (b + d.dy) * d.scale;
-  c = document.createElement(mxClient.VML_PREFIX + ":shape");
-  c.style.width = "1px";
-  c.style.height = "1px";
-  c.stroked = "false";
-  l = document.createElement(mxClient.VML_PREFIX + ":fill");
-  l.color = d.fontColor;
-  l.opacity = 100 * d.alpha + "%";
-  c.appendChild(l);
-  l = document.createElement(mxClient.VML_PREFIX + ":path");
-  l.textpathok = "true";
-  l.v = "m " + this.format(0) + " " + this.format(0) + " l " + this.format(1) + " " + this.format(0);
-  c.appendChild(l);
-  l = document.createElement(mxClient.VML_PREFIX + ":textpath");
-  l.style.cssText = "v-text-align:" + f;
-  l.style.align = f;
-  l.style.fontFamily = d.fontFamily;
-  l.string = e;
-  l.on = "true";
-  f = Math.round(d.fontSize * d.scale / this.vmlScale);
-  l.style.fontSize = f + "px";
-  (d.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD && (l.style.fontWeight = "bold");
-  (d.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC && (l.style.fontStyle = "italic");
-  (d.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE &&
-    (l.style.textDecoration = "underline");
-  e = e.split("\n");
-  d = f + (e.length - 1) * f * mxConstants.LINE_HEIGHT;
-  f = e = 0;
-  g == mxConstants.ALIGN_BOTTOM ? f = -d / 2 : g != mxConstants.ALIGN_MIDDLE && (f = d / 2);
-  null != n && (c.style.rotation = n, g = n * (Math.PI / 180), e = Math.sin(g) * f, f *= Math.cos(g));
-  c.appendChild(l);
-  c.style.left = this.format(a - e) + "px";
-  c.style.top = this.format(b + f) + "px";
-  this.root.appendChild(c)
-};
-mxVmlCanvas2D.prototype.stroke = function() {
-  this.addNode(!1, !0)
-};
-mxVmlCanvas2D.prototype.fill = function() {
-  this.addNode(!0, !1)
-};
-mxVmlCanvas2D.prototype.fillAndStroke = function() {
-  this.addNode(!0, !0)
-};
-
-function mxGuide(a, b) {
-  this.graph = a;
-  this.setStates(b)
-}
-mxGuide.prototype.graph = null;
-mxGuide.prototype.states = null;
-mxGuide.prototype.horizontal = !0;
-mxGuide.prototype.vertical = !0;
-mxGuide.prototype.guideX = null;
-mxGuide.prototype.guideY = null;
-mxGuide.prototype.setStates = function(a) {
-  this.states = a
-};
-mxGuide.prototype.isEnabledForEvent = function(a) {
-  return !0
-};
-mxGuide.prototype.getGuideTolerance = function() {
-  return this.graph.gridSize * this.graph.view.scale / 2
-};
-mxGuide.prototype.createGuideShape = function(a) {
-  a = new mxPolyline([], mxConstants.GUIDE_COLOR, mxConstants.GUIDE_STROKEWIDTH);
-  a.isDashed = !0;
-  return a
-};
-mxGuide.prototype.move = function(a, b, c) {
-  if (null != this.states && (this.horizontal || this.vertical) && null != a && null != b) {
-    var d = this.graph.getView().translate,
-      e = this.graph.getView().scale,
-      f = b.x,
-      g = b.y,
-      h = !1,
-      k = !1,
-      l = this.getGuideTolerance(),
-      m = l,
-      n = l,
-      l = a.clone();
-    l.x += b.x;
-    l.y += b.y;
-    var p = l.x,
-      q = l.x + l.width,
-      s = l.getCenterX(),
-      r = l.y,
-      t = l.y + l.height,
-      v = l.getCenterY();
-    b = function(b) {
-      b += this.graph.panDx;
-      var c = !1;
-      Math.abs(b - s) < m ? (f = b - a.getCenterX(), m = Math.abs(b - s), c = !0) : Math.abs(b - p) < m ? (f = b - a.x, m = Math.abs(b - p), c = !0) : Math.abs(b -
-        q) < m && (f = b - a.x - a.width, m = Math.abs(b - q), c = !0);
-      if (c) {
-        null == this.guideX && (this.guideX = this.createGuideShape(!0), this.guideX.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG,
-          this.guideX.pointerEvents = !1, this.guideX.init(this.graph.getView().getOverlayPane()));
-        var d = this.graph.container;
-        b -= this.graph.panDx;
-        this.guideX.points = [new mxPoint(b, -this.graph.panDy), new mxPoint(b, d.scrollHeight - 3 - this.graph.panDy)]
-      }
-      h = h || c
-    };
-    for (var l = function(b) {
-        b += this.graph.panDy;
-        var c = !1;
-        Math.abs(b - v) < n ? (g = b - a.getCenterY(), n = Math.abs(b - v), c = !0) : Math.abs(b - r) < n ? (g = b - a.y, n = Math.abs(b - r), c = !0) : Math.abs(b - t) < n && (g = b - a.y - a.height,
-          n = Math.abs(b - t), c = !0);
-        if (c) {
-          null == this.guideY && (this.guideY = this.createGuideShape(!1), this.guideY.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG,
-            this.guideY.pointerEvents = !1, this.guideY.init(this.graph.getView().getOverlayPane()));
-          var d = this.graph.container;
-          b -= this.graph.panDy;
-          this.guideY.points = [new mxPoint(-this.graph.panDx,
-            b), new mxPoint(d.scrollWidth - 3 - this.graph.panDx, b)]
-        }
-        k = k || c
-      }, w = 0; w < this.states.length; w++) {
-      var u = this.states[w];
-      null != u && (this.horizontal && (b.call(this, u.getCenterX()), b.call(this, u.x), b.call(this, u.x + u.width)), this.vertical && (l.call(this, u.getCenterY()), l.call(this, u.y), l.call(this,
-        u.y + u.height)))
-    }!h && null != this.guideX ? this.guideX.node.style.visibility = "hidden" : null != this.guideX && (this.guideX.node.style.visibility = "visible", this.guideX.redraw());
-    !k && null != this.guideY ? this.guideY.node.style.visibility =
-      "hidden" : null != this.guideY && (this.guideY.node.style.visibility = "visible", this.guideY.redraw());
-    c && (h || (c = a.x - (this.graph.snap(a.x / e - d.x) + d.x) * e, f = this.graph.snap(f / e) * e - c), k || (d = a.y - (this.graph.snap(a.y / e - d.y) + d.y) * e, g = this.graph.snap(g / e) * e -
-      d));
-    b = new mxPoint(f, g)
-  }
-  return b
-};
-mxGuide.prototype.hide = function() {
-  null != this.guideX && (this.guideX.node.style.visibility = "hidden");
-  null != this.guideY && (this.guideY.node.style.visibility = "hidden")
-};
-mxGuide.prototype.destroy = function() {
-  null != this.guideX && (this.guideX.destroy(), this.guideX = null);
-  null != this.guideY && (this.guideY.destroy(), this.guideY = null)
-};
-
-function mxStencil(a) {
-  this.desc = a;
-  this.parseDescription();
-  this.parseConstraints()
-}
-mxStencil.defaultLocalized = !1;
-mxStencil.prototype.desc = null;
-mxStencil.prototype.constraints = null;
-mxStencil.prototype.aspect = null;
-mxStencil.prototype.w0 = null;
-mxStencil.prototype.h0 = null;
-mxStencil.prototype.bgNode = null;
-mxStencil.prototype.fgNode = null;
-mxStencil.prototype.strokewidth = null;
-mxStencil.prototype.parseDescription = function() {
-  this.fgNode = this.desc.getElementsByTagName("foreground")[0];
-  this.bgNode = this.desc.getElementsByTagName("background")[0];
-  this.w0 = Number(this.desc.getAttribute("w") || 100);
-  this.h0 = Number(this.desc.getAttribute("h") || 100);
-  var a = this.desc.getAttribute("aspect");
-  this.aspect = null != a ? a : "variable";
-  a = this.desc.getAttribute("strokewidth");
-  this.strokewidth = null != a ? a : "1"
-};
-mxStencil.prototype.parseConstraints = function() {
-  var a = this.desc.getElementsByTagName("connections")[0];
-  if (null != a && (a = mxUtils.getChildNodes(a), null != a && 0 < a.length)) {
-    this.constraints = [];
-    for (var b = 0; b < a.length; b++) this.constraints.push(this.parseConstraint(a[b]))
-  }
-};
-mxStencil.prototype.parseConstraint = function(a) {
-  var b = Number(a.getAttribute("x")),
-    c = Number(a.getAttribute("y"));
-  a = "1" == a.getAttribute("perimeter");
-  return new mxConnectionConstraint(new mxPoint(b, c), a)
-};
-mxStencil.prototype.evaluateTextAttribute = function(a, b, c) {
-  b = this.evaluateAttribute(a, b, c);
-  a = a.getAttribute("localized");
-  if (mxStencil.defaultLocalized && null == a || "1" == a) b = mxResources.get(b);
-  return b
-};
-mxStencil.prototype.evaluateAttribute = function(a, b, c) {
-  b = a.getAttribute(b);
-  null == b && (a = mxUtils.getTextContent(a), null != a && (a = mxUtils.eval(a), "function" == typeof a && (b = a(c))));
-  return b
-};
-mxStencil.prototype.drawShape = function(a, b, c, d, e, f) {
-  this.drawChildren(a, b, c, d, e, f, this.bgNode, !1);
-  this.drawChildren(a, b, c, d, e, f, this.fgNode, !0)
-};
-mxStencil.prototype.drawChildren = function(a, b, c, d, e, f, g, h) {
-  if (null != g) {
-    var k = mxUtils.getValue(b.style, mxConstants.STYLE_DIRECTION, null);
-    c = this.computeAspect(b.style, c, d, e, f, k);
-    d = Math.min(c.width, c.height);
-    d = "inherit" == this.strokewidth ? Number(mxUtils.getNumber(b.style, mxConstants.STYLE_STROKEWIDTH, 1)) : Number(this.strokewidth) * d;
-    a.setStrokeWidth(d);
-    for (g = g.firstChild; null != g;) g.nodeType == mxConstants.NODETYPE_ELEMENT && this.drawNode(a, b, g, c, h), g = g.nextSibling
-  }
-};
-mxStencil.prototype.computeAspect = function(a, b, c, d, e, f) {
-  a = b;
-  b = d / this.w0;
-  var g = e / this.h0;
-  if (f = "north" == f || "south" == f) {
-    g = d / this.h0;
-    b = e / this.w0;
-    var h = (d - e) / 2;
-    a += h;
-    c -= h
-  }
-  "fixed" == this.aspect && (b = g = Math.min(b, g), f ? (a += (e - this.w0 * b) / 2, c += (d - this.h0 * g) / 2) : (a += (d - this.w0 * b) / 2, c += (e - this.h0 * g) / 2));
-  return new mxRectangle(a, c, b, g)
-};
-mxStencil.prototype.drawNode = function(a, b, c, d, e) {
-  var f = c.nodeName,
-    g = d.x,
-    h = d.y,
-    k = d.width,
-    l = d.height,
-    m = Math.min(k, l);
-  if ("save" == f) a.save();
-  else if ("restore" == f) a.restore();
-  else if ("path" == f) {
-    a.begin();
-    for (c = c.firstChild; null != c;) c.nodeType == mxConstants.NODETYPE_ELEMENT && this.drawNode(a, b, c, d, e), c = c.nextSibling
-  } else if ("close" == f) a.close();
-  else if ("move" == f) a.moveTo(g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l);
-  else if ("line" == f) a.lineTo(g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) *
-    l);
-  else if ("quad" == f) a.quadTo(g + Number(c.getAttribute("x1")) * k, h + Number(c.getAttribute("y1")) * l, g + Number(c.getAttribute("x2")) * k, h + Number(c.getAttribute("y2")) * l);
-  else if ("curve" == f) a.curveTo(g + Number(c.getAttribute("x1")) * k, h + Number(c.getAttribute("y1")) * l, g + Number(c.getAttribute("x2")) * k, h + Number(c.getAttribute("y2")) * l, g + Number(
-    c.getAttribute("x3")) * k, h + Number(c.getAttribute("y3")) * l);
-  else if ("arc" == f) a.arcTo(Number(c.getAttribute("rx")) * k, Number(c.getAttribute("ry")) * l, Number(c.getAttribute("x-axis-rotation")),
-    Number(c.getAttribute("large-arc-flag")), Number(c.getAttribute("sweep-flag")), g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l);
-  else if ("rect" == f) a.rect(g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l, Number(c.getAttribute("w")) * k, Number(c.getAttribute("h")) * l);
-  else if ("roundrect" == f) b = c.getAttribute("arcsize"), 0 == b && (b = 100 * mxConstants.RECTANGLE_ROUNDING_FACTOR), m = Number(c.getAttribute("w")) * k, d = Number(c.getAttribute("h")) * l, b =
-    Number(b) / 100, b = Math.min(m * b, d * b), a.roundrect(g +
-      Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l, m, d, b, b);
-  else if ("ellipse" == f) a.ellipse(g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l, Number(c.getAttribute("w")) * k, Number(c.getAttribute("h")) * l);
-  else if ("image" == f) b = this.evaluateAttribute(c, "src", b), a.image(g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l, Number(c.getAttribute("w")) * k, Number(c.getAttribute(
-    "h")) * l, b, !1, "1" == c.getAttribute("flipH"), "1" == c.getAttribute("flipV"));
-  else if ("text" == f) {
-    m = this.evaluateTextAttribute(c,
-      "str", b);
-    d = "1" == c.getAttribute("vertical") ? -90 : 0;
-    if ("0" == c.getAttribute("align-shape")) {
-      var n = b.rotation,
-        p = 1 == mxUtils.getValue(b.style, mxConstants.STYLE_FLIPH, 0);
-      b = 1 == mxUtils.getValue(b.style, mxConstants.STYLE_FLIPV, 0);
-      d = p && b ? d - n : p || b ? d + n : d - n
-    }
-    d -= c.getAttribute("rotation");
-    a.text(g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l, 0, 0, m, c.getAttribute("align") || "left", c.getAttribute("valign") || "top", !1, "", !1, !1, d)
-  } else if ("include-shape" == f) n = mxStencilRegistry.getStencil(c.getAttribute("name")),
-    null != n && (g += Number(c.getAttribute("x")) * k, h += Number(c.getAttribute("y")) * l, m = Number(c.getAttribute("w")) * k, d = Number(c.getAttribute("h")) * l, n.drawShape(a, b, g, h, m, d));
-  else if ("fillstroke" == f) a.fillAndStroke();
-  else if ("fill" == f) a.fill();
-  else if ("stroke" == f) a.stroke();
-  else if ("strokewidth" == f) a.setStrokeWidth(Number(c.getAttribute("width")) * m);
-  else if ("dashed" == f) a.setDashed("1" == c.getAttribute("dashed"));
-  else if ("dashpattern" == f) {
-    if (c = c.getAttribute("pattern"), null != c) {
-      c = c.split(" ");
-      k = [];
-      for (l = 0; l <
-        c.length; l++) 0 < c[l].length && k.push(Number(c[l]) * m);
-      c = k.join(" ");
-      a.setDashPattern(c)
-    }
-  } else "strokecolor" == f ? a.setStrokeColor(c.getAttribute("color")) : "linecap" == f ? a.setLineCap(c.getAttribute("cap")) : "linejoin" == f ? a.setLineJoin(c.getAttribute("join")) :
-    "miterlimit" == f ? a.setMiterLimit(Number(c.getAttribute("limit"))) : "fillcolor" == f ? a.setFillColor(c.getAttribute("color")) : "alpha" == f ? a.setAlpha(c.getAttribute("alpha")) :
-    "fontcolor" == f ? a.setFontColor(c.getAttribute("color")) : "fontstyle" == f ? a.setFontStyle(c.getAttribute("style")) :
-    "fontfamily" == f ? a.setFontFamily(c.getAttribute("family")) : "fontsize" == f && a.setFontSize(Number(c.getAttribute("size")) * m);
-  e && ("fillstroke" == f || "fill" == f || "stroke" == f) && a.setShadow(!1)
-};
-
-function mxShape(a) {
-  this.stencil = a;
-  this.strokewidth = 1;
-  this.rotation = 0;
-  this.opacity = 100;
-  this.flipV = this.flipH = !1
-}
-mxShape.prototype.dialect = null;
-mxShape.prototype.scale = 1;
-mxShape.prototype.bounds = null;
-mxShape.prototype.points = null;
-mxShape.prototype.node = null;
-mxShape.prototype.style = null;
-mxShape.prototype.style = null;
-mxShape.prototype.boundingBox = null;
-mxShape.prototype.stencil = null;
-mxShape.prototype.svgStrokeTolerance = 6;
-mxShape.prototype.pointerEvents = !0;
-mxShape.prototype.stencilPointerEvents = !1;
-mxShape.prototype.vmlScale = 1;
-mxShape.prototype.init = function(a) {
-  null == this.node && (this.node = this.create(a), null != a && a.appendChild(this.node))
-};
-mxShape.prototype.isParseVml = function() {
-  return !0
-};
-mxShape.prototype.isHtmlAllowed = function() {
-  return !1
-};
-mxShape.prototype.getSvgScreenOffset = function() {
-  return 1 == mxUtils.mod(Math.max(1, Math.round(this.strokewidth * this.scale)), 2) ? 0.5 : 0
-};
-mxShape.prototype.create = function(a) {
-  var b = null;
-  return b = null != a.ownerSVGElement ? this.createSvg(a) : 8 == document.documentMode || this.dialect == mxConstants.DIALECT_SVG || this.dialect != mxConstants.DIALECT_VML && this.isHtmlAllowed() ?
-    this.createHtml(a) : this.createVml(a)
-};
-mxShape.prototype.createSvg = function() {
-  return document.createElementNS(mxConstants.NS_SVG, "g")
-};
-mxShape.prototype.createVml = function() {
-  var a = document.createElement(mxClient.VML_PREFIX + ":group");
-  a.style.position = "absolute";
-  return a
-};
-mxShape.prototype.createHtml = function() {
-  var a = document.createElement("div");
-  a.style.position = "absolute";
-  return a
-};
-mxShape.prototype.reconfigure = function() {
-  this.redraw()
-};
-mxShape.prototype.redraw = function() {
-  this.updateBoundsFromPoints();
-  this.checkBounds() ? (this.node.style.visibility = "", "DIV" == this.node.nodeName && this.isHtmlAllowed() ? this.redrawHtmlShape() : this.redrawShape(), this.updateBoundingBox()) : (this.node.style
-    .visibility = "hidden", this.boundingBox = null)
-};
-mxShape.prototype.updateBoundsFromPoints = function() {
-  var a = this.points;
-  if (null != a && 0 < a.length && null != a[0]) {
-    this.bounds = new mxRectangle(Number(a[0].x), Number(a[0].y), 1, 1);
-    for (var b = 1; b < this.points.length; b++) null != a[b] && this.bounds.add(new mxRectangle(Number(a[b].x), Number(a[b].y), 1, 1))
-  }
-};
-mxShape.prototype.checkBounds = function() {
-  return null != this.bounds && !isNaN(this.bounds.x) && !isNaN(this.bounds.y) && !isNaN(this.bounds.width) && !isNaN(this.bounds.height) && 0 < this.bounds.width && 0 < this.bounds.height
-};
-mxShape.prototype.createVmlGroup = function() {
-  var a = document.createElement(mxClient.VML_PREFIX + ":group");
-  a.style.position = "absolute";
-  a.style.width = this.node.style.width;
-  a.style.height = this.node.style.height;
-  return a
-};
-mxShape.prototype.redrawShape = function() {
-  var a = this.createCanvas();
-  for (a.pointerEvents = this.pointerEvents; this.node.hasChildNodes();) this.node.removeChild(this.node.lastChild);
-  this.paint(a);
-  this.node != a.root && this.node.insertAdjacentHTML("beforeend", a.root.outerHTML);
-  "DIV" == this.node.nodeName && 8 == document.documentMode && (this.node.style.filter = "", (null == this.stencil || !this.stencilPointerEvents) && mxUtils.addTransparentBackgroundFilter(this.node));
-  this.destroyCanvas(a)
-};
-mxShape.prototype.createCanvas = function() {
-  var a = null,
-    b = null;
-  if (null != this.node.ownerSVGElement) a = new mxSvgCanvas2D(this.node, !1), a.strokeTolerance = this.svgStrokeTolerance, a.blockImagePointerEvents = mxClient.IS_NS && !mxClient.IS_SF && !
-    mxClient.IS_GC, b = this.getSvgScreenOffset(), 0 != b ? this.node.setAttribute("transform", "translate(" + b + "," + b + ")") : this.node.removeAttribute("transform");
-  else {
-    this.updateVmlContainer();
-    var c = Math.max(1, Math.round(this.bounds.width)),
-      d = Math.max(1, Math.round(this.bounds.height)),
-      b = 8 == document.documentMode && this.isParseVml() ? this.createVmlGroup() : this.node,
-      a = new mxVmlCanvas2D(b, !1);
-    "" != b.tagUrn && (b.coordsize = c * this.vmlScale + "," + d * this.vmlScale, a.scale(this.vmlScale), a.vmlScale = this.vmlScale);
-    b = this.scale;
-    a.translate(-Math.round(this.bounds.x / b), -Math.round(this.bounds.y / b))
-  }
-  return a
-};
-mxShape.prototype.updateVmlContainer = function() {
-  this.node.style.left = Math.round(this.bounds.x) + "px";
-  this.node.style.top = Math.round(this.bounds.y) + "px";
-  var a = Math.max(1, Math.round(this.bounds.width)),
-    b = Math.max(1, Math.round(this.bounds.height));
-  this.node.style.width = a + "px";
-  this.node.style.height = b + "px";
-  this.node.style.overflow = "visible"
-};
-mxShape.prototype.destroyCanvas = function(a) {
-  if (a instanceof mxSvgCanvas2D) {
-    for (var b in a.gradients) {
-      var c = a.gradients[b];
-      c.mxRefCount = (c.mxRefCount || 0) + 1
-    }
-    this.releaseSvgGradients(this.oldGradients);
-    this.oldGradients = a.gradients
-  }
-};
-mxShape.prototype.paint = function(a) {
-  var b = this.scale,
-    c = this.bounds.x / b,
-    d = this.bounds.y / b,
-    e = this.bounds.width / b,
-    f = this.bounds.height / b;
-  if (this.isPaintBoundsInverted()) var g = (e - f) / 2,
-    c = c + g,
-    d = d - g,
-    g = e,
-    e = f,
-    f = g;
-  this.updateTransform(a, c, d, e, f);
-  this.configureCanvas(a, c, d, e, f);
-  if (null != this.stencil) this.paintStencilShape(a, c, d, e, f);
-  else if (a.setStrokeWidth(this.strokewidth), null != this.points) {
-    c = [];
-    for (d = 0; d < this.points.length; d++) c.push(new mxPoint(this.points[d].x / b, this.points[d].y / b));
-    this.paintEdgeShape(a,
-      c)
-  } else this.paintVertexShape(a, c, d, e, f)
-};
-mxShape.prototype.configureCanvas = function(a, b, c, d, e) {
-  var f = null;
-  null != this.style && (f = this.style.dashPattern);
-  a.setAlpha(this.opacity / 100);
-  null != this.isShadow && a.setShadow(this.isShadow);
-  null != this.isDashed && a.setDashed(this.isDashed);
-  null != f && a.setDashPattern(f);
-  null != this.gradient ? (b = this.getGradientBounds(a, b, c, d, e), a.setGradient(this.fill, this.gradient, b.x, b.y, b.width, b.height, this.gradientDirection)) : a.setFillColor(this.fill);
-  a.setStrokeColor(this.stroke)
-};
-mxShape.prototype.getGradientBounds = function(a, b, c, d, e) {
-  return new mxRectangle(b, c, d, e)
-};
-mxShape.prototype.updateTransform = function(a, b, c, d, e) {
-  a.scale(this.scale);
-  a.rotate(this.getShapeRotation(), this.flipH, this.flipV, b + d / 2, c + e / 2)
-};
-mxShape.prototype.paintStencilShape = function(a, b, c, d, e) {
-  this.stencilPointerEvents && (this.dialect == mxConstants.DIALECT_SVG ? this.addTransparentBackgroundRectangle(this.node, b, c, d, e) : 8 != document.documentMode && this.setTransparentBackgroundImage(
-    this.node));
-  this.stencil.drawShape(a, this, b, c, d, e)
-};
-mxShape.prototype.paintVertexShape = function(a, b, c, d, e) {
-  this.paintBackground(a, b, c, d, e);
-  a.setShadow(!1);
-  this.paintForeground(a, b, c, d, e)
-};
-mxShape.prototype.paintBackground = function(a, b, c, d, e) {};
-mxShape.prototype.paintForeground = function(a, b, c, d, e) {};
-mxShape.prototype.paintEdgeShape = function(a, b) {};
-mxShape.prototype.getArcSize = function(a, b) {
-  var c = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, 100 * mxConstants.RECTANGLE_ROUNDING_FACTOR) / 100;
-  return Math.min(a * c, b * c)
-};
-mxShape.prototype.paintGlassEffect = function(a, b, c, d, e, f) {
-  var g = Math.ceil(this.strokewidth / 2);
-  a.setGradient("#ffffff", "#ffffff", b, c, d, 0.6 * e, "south", 0.9, 0.1);
-  a.begin();
-  f += 2 * g;
-  this.isRounded ? (a.moveTo(b - g + f, c - g), a.quadTo(b - g, c - g, b - g, c - g + f), a.lineTo(b - g, c + 0.4 * e), a.quadTo(b + 0.5 * d, c + 0.7 * e, b + d + g, c + 0.4 * e), a.lineTo(b + d +
-    g, c - g + f), a.quadTo(b + d + g, c - g, b + d + g - f, c - g)) : (a.moveTo(b - g, c - g), a.lineTo(b - g, c + 0.4 * e), a.quadTo(b + 0.5 * d, c + 0.7 * e, b + d + g, c + 0.4 * e), a.lineTo(
-    b + d + g, c - g));
-  a.close();
-  a.fill()
-};
-mxShape.prototype.apply = function(a) {
-  this.state = a;
-  this.style = a.style;
-  if (null != this.style) {
-    this.fill = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, this.fill);
-    this.gradient = mxUtils.getValue(this.style, mxConstants.STYLE_GRADIENTCOLOR, this.gradient);
-    this.gradientDirection = mxUtils.getValue(this.style, mxConstants.STYLE_GRADIENT_DIRECTION, this.gradientDirection);
-    this.opacity = mxUtils.getValue(this.style, mxConstants.STYLE_OPACITY, this.opacity);
-    this.stroke = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR,
-      this.stroke);
-    this.strokewidth = mxUtils.getNumber(this.style, mxConstants.STYLE_STROKEWIDTH, this.strokewidth);
-    this.spacing = mxUtils.getValue(this.style, mxConstants.STYLE_SPACING, this.spacing);
-    this.startSize = mxUtils.getNumber(this.style, mxConstants.STYLE_STARTSIZE, this.startSize);
-    this.endSize = mxUtils.getNumber(this.style, mxConstants.STYLE_ENDSIZE, this.endSize);
-    this.startArrow = mxUtils.getValue(this.style, mxConstants.STYLE_STARTARROW, this.startArrow);
-    this.endArrow = mxUtils.getValue(this.style, mxConstants.STYLE_ENDARROW,
-      this.endArrow);
-    this.rotation = mxUtils.getValue(this.style, mxConstants.STYLE_ROTATION, this.rotation);
-    this.direction = mxUtils.getValue(this.style, mxConstants.STYLE_DIRECTION, this.direction);
-    this.flipH = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_FLIPH, 0);
-    this.flipV = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_FLIPV, 0);
-    null != this.stencil && (this.flipH = 1 == mxUtils.getValue(this.style, "stencilFlipH", 0) || this.flipH, this.flipV = 1 == mxUtils.getValue(this.style, "stencilFlipV", 0) || this.flipV);
-    if ("north" ==
-      this.direction || "south" == this.direction) a = this.flipH, this.flipH = this.flipV, this.flipV = a;
-    this.isShadow = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_SHADOW, this.isShadow);
-    this.isDashed = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_DASHED, this.isDashed);
-    this.isRounded = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_ROUNDED, this.isRounded);
-    this.glass = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_GLASS, this.glass);
-    "none" == this.fill && (this.fill = null);
-    "none" == this.gradient && (this.gradient = null);
-    "none" == this.stroke && (this.stroke = null)
-  }
-};
-mxShape.prototype.setCursor = function(a) {
-  null == a && (a = "");
-  this.cursor = a;
-  null != this.node && (this.node.style.cursor = a)
-};
-mxShape.prototype.getCursor = function() {
-  return this.cursor
-};
-mxShape.prototype.updateBoundingBox = function() {
-  if (null != this.bounds) {
-    var a = this.createBoundingBox();
-    if (null != a) {
-      this.augmentBoundingBox(a);
-      var b = this.getShapeRotation();
-      0 != b && (a = mxUtils.getBoundingBox(a, b));
-      a.x = Math.floor(a.x);
-      a.y = Math.floor(a.y);
-      a.width = Math.ceil(a.width);
-      a.height = Math.ceil(a.height)
-    }
-    this.boundingBox = a
-  }
-};
-mxShape.prototype.createBoundingBox = function() {
-  var a = this.bounds.clone();
-  if (this.isPaintBoundsInverted()) {
-    var b = (a.width - a.height) / 2;
-    a.x += b;
-    a.y -= b;
-    b = a.width;
-    a.width = a.height;
-    a.height = b
-  }
-  return a
-};
-mxShape.prototype.augmentBoundingBox = function(a) {
-  this.isShadow && (a.width += Math.ceil(mxConstants.SHADOW_OFFSET_X * this.scale), a.height += Math.ceil(mxConstants.SHADOW_OFFSET_Y * this.scale));
-  var b = Math.ceil(this.strokewidth * this.scale);
-  a.grow(Math.ceil(b / 2))
-};
-mxShape.prototype.isPaintBoundsInverted = function() {
-  return null == this.stencil && ("north" == this.direction || "south" == this.direction)
-};
-mxShape.prototype.getRotation = function() {
-  return null != this.rotation ? this.rotation : 0
-};
-mxShape.prototype.getTextRotation = function() {
-  var a = this.getRotation();
-  1 != mxUtils.getValue(this.style, mxConstants.STYLE_HORIZONTAL, 1) && (a += mxText.prototype.verticalTextRotation);
-  return a
-};
-mxShape.prototype.getShapeRotation = function() {
-  var a = this.getRotation();
-  null != this.direction && ("north" == this.direction ? a += 270 : "west" == this.direction ? a += 180 : "south" == this.direction && (a += 90));
-  return a
-};
-mxShape.prototype.addTransparentBackgroundRectangle = function(a, b, c, d, e) {
-  a = document.createElementNS(mxConstants.NS_SVG, "rect");
-  a.setAttribute("x", b);
-  a.setAttribute("y", c);
-  a.setAttribute("width", d);
-  a.setAttribute("height", e);
-  a.setAttribute("fill", "none");
-  a.setAttribute("stroke", "none");
-  a.setAttribute("pointer-events", "all");
-  this.node.appendChild(a)
-};
-mxShape.prototype.setTransparentBackgroundImage = function(a) {
-  a.style.backgroundImage = "url('" + mxClient.imageBasePath + "/transparent.gif')"
-};
-mxShape.prototype.releaseSvgGradients = function(a) {
-  if (null != a)
-    for (var b in a) {
-      var c = a[b];
-      c.mxRefCount = (c.mxRefCount || 0) - 1;
-      0 == c.mxRefCount && null != c.parentNode && c.parentNode.removeChild(c)
-    }
-};
-mxShape.prototype.destroy = function() {
-  null != this.node && (mxEvent.release(this.node), null != this.node.parentNode && this.node.parentNode.removeChild(this.node), this.node = null);
-  this.releaseSvgGradients(this.oldGradients);
-  this.oldGradients = null
-};
-var mxStencilRegistry = {
-    stencils: [],
-    addStencil: function(a, b) {
-      mxStencilRegistry.stencils[a] = b
-    },
-    getStencil: function(a) {
-      return mxStencilRegistry.stencils[a]
-    }
-  },
-  mxMarker = {
-    markers: [],
-    addMarker: function(a, b) {
-      mxMarker.markers[a] = b
-    },
-    createMarker: function(a, b, c, d, e, f, g, h, k, l) {
-      var m = mxMarker.markers[c];
-      return null != m ? m(a, b, c, d, e, f, g, h, k, l) : null
-    }
-  };
-(function() {
-  function a(a, b, e, f, g, h, k, l, m, n) {
-    b = 1.118 * g * m;
-    l = 1.118 * h * m;
-    g *= k + m;
-    h *= k + m;
-    var p = f.clone();
-    p.x -= b;
-    p.y -= l;
-    k = e != mxConstants.ARROW_CLASSIC ? 1 : 0.75;
-    f.x += -g * k - b;
-    f.y += -h * k - l;
-    return function() {
-      a.begin();
-      a.moveTo(p.x, p.y);
-      a.lineTo(p.x - g - h / 2, p.y - h + g / 2);
-      e == mxConstants.ARROW_CLASSIC && a.lineTo(p.x - 3 * g / 4, p.y - 3 * h / 4);
-      a.lineTo(p.x + h / 2 - g, p.y - h - g / 2);
-      a.close();
-      n ? a.fillAndStroke() : a.stroke()
-    }
-  }
-
-  function b(a, b, e, f, g, h, k, l, m, n) {
-    l = e == mxConstants.ARROW_DIAMOND ? 0.7071 : 0.9862;
-    b = g * m * l;
-    l *= h * m;
-    g *= k + m;
-    h *= k + m;
-    var p = f.clone();
-    p.x -= b;
-    p.y -= l;
-    f.x += -g - b;
-    f.y += -h - l;
-    var q = e == mxConstants.ARROW_DIAMOND ? 2 : 3.4;
-    return function() {
-      a.begin();
-      a.moveTo(p.x, p.y);
-      a.lineTo(p.x - g / 2 - h / q, p.y + g / q - h / 2);
-      a.lineTo(p.x - g, p.y - h);
-      a.lineTo(p.x - g / 2 + h / q, p.y - h / 2 - g / q);
-      a.close();
-      n ? a.fillAndStroke() : a.stroke()
-    }
-  }
-  mxMarker.addMarker("classic", a);
-  mxMarker.addMarker("block", a);
-  mxMarker.addMarker("open", function(a, b, e, f, g, h, k, l, m, n) {
-    b = 1.118 * g * m;
-    e = 1.118 * h * m;
-    g *= k + m;
-    h *= k + m;
-    var p = f.clone();
-    p.x -= b;
-    p.y -= e;
-    f.x += 2 * -b;
-    f.y += 2 * -e;
-    return function() {
-      a.begin();
-      a.moveTo(p.x - g -
-        h / 2, p.y - h + g / 2);
-      a.lineTo(p.x, p.y);
-      a.lineTo(p.x + h / 2 - g, p.y - h - g / 2);
-      a.stroke()
-    }
-  });
-  mxMarker.addMarker("oval", function(a, b, e, f, g, h, k, l, m, n) {
-    var p = k / 2,
-      q = f.clone();
-    f.x -= g * p;
-    f.y -= h * p;
-    return function() {
-      a.ellipse(q.x - p, q.y - p, k, k);
-      n ? a.fillAndStroke() : a.stroke()
-    }
-  });
-  mxMarker.addMarker("diamond", b);
-  mxMarker.addMarker("diamondThin", b)
-})();
-
-function mxActor(a, b, c, d) {
-  mxShape.call(this);
-  this.bounds = a;
-  this.fill = b;
-  this.stroke = c;
-  this.strokewidth = null != d ? d : 1
-}
-mxUtils.extend(mxActor, mxShape);
-mxActor.prototype.paintVertexShape = function(a, b, c, d, e) {
-  a.translate(b, c);
-  a.begin();
-  this.redrawPath(a, b, c, d, e);
-  a.fillAndStroke()
-};
-mxActor.prototype.redrawPath = function(a, b, c, d, e) {
-  b = d / 3;
-  a.moveTo(0, e);
-  a.curveTo(0, 3 * e / 5, 0, 2 * e / 5, d / 2, 2 * e / 5);
-  a.curveTo(d / 2 - b, 2 * e / 5, d / 2 - b, 0, d / 2, 0);
-  a.curveTo(d / 2 + b, 0, d / 2 + b, 2 * e / 5, d / 2, 2 * e / 5);
-  a.curveTo(d, 2 * e / 5, d, 3 * e / 5, d, e);
-  a.close()
-};
-
-function mxCloud(a, b, c, d) {
-  mxActor.call(this);
-  this.bounds = a;
-  this.fill = b;
-  this.stroke = c;
-  this.strokewidth = null != d ? d : 1
-}
-mxUtils.extend(mxCloud, mxActor);
-mxCloud.prototype.redrawPath = function(a, b, c, d, e) {
-  a.moveTo(0.25 * d, 0.25 * e);
-  a.curveTo(0.05 * d, 0.25 * e, 0, 0.5 * e, 0.16 * d, 0.55 * e);
-  a.curveTo(0, 0.66 * e, 0.18 * d, 0.9 * e, 0.31 * d, 0.8 * e);
-  a.curveTo(0.4 * d, e, 0.7 * d, e, 0.8 * d, 0.8 * e);
-  a.curveTo(d, 0.8 * e, d, 0.6 * e, 0.875 * d, 0.5 * e);
-  a.curveTo(d, 0.3 * e, 0.8 * d, 0.1 * e, 0.625 * d, 0.2 * e);
-  a.curveTo(0.5 * d, 0.05 * e, 0.3 * d, 0.05 * e, 0.25 * d, 0.25 * e);
-  a.close()
-};
-
-function mxRectangleShape(a, b, c, d) {
-  mxShape.call(this);
-  this.bounds = a;
-  this.fill = b;
-  this.stroke = c;
-  this.strokewidth = null != d ? d : 1
-}
-mxUtils.extend(mxRectangleShape, mxShape);
-mxRectangleShape.prototype.isHtmlAllowed = function() {
-  return !this.isRounded && !this.glass && 0 == this.rotation
-};
-mxRectangleShape.prototype.paintBackground = function(a, b, c, d, e) {
-  if (this.isRounded) {
-    var f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, 100 * mxConstants.RECTANGLE_ROUNDING_FACTOR) / 100,
-      f = Math.min(d * f, e * f);
-    a.roundrect(b, c, d, e, f, f)
-  } else a.rect(b, c, d, e);
-  a.fillAndStroke()
-};
-mxRectangleShape.prototype.paintForeground = function(a, b, c, d, e) {
-  this.glass && this.paintGlassEffect(a, b, c, d, e, this.getArcSize(d + this.strokewidth, e + this.strokewidth))
-};
-mxRectangleShape.prototype.redrawHtmlShape = function() {
-  this.updateHtmlBounds(this.node);
-  this.updateHtmlFilters(this.node);
-  this.updateHtmlColors(this.node)
-};
-mxRectangleShape.prototype.updateHtmlBounds = function(a) {
-  var b = 9 <= document.documentMode ? 0 : Math.ceil(this.strokewidth * this.scale);
-  a.style.borderWidth = Math.max(1, b) + "px";
-  a.style.overflow = "hidden";
-  a.style.left = Math.round(this.bounds.x - b / 2) + "px";
-  a.style.top = Math.round(this.bounds.y - b / 2) + "px";
-  "CSS1Compat" == document.compatMode && (b = -b);
-  a.style.width = Math.round(Math.max(0, this.bounds.width + b)) + "px";
-  a.style.height = Math.round(Math.max(0, this.bounds.height + b)) + "px"
-};
-mxRectangleShape.prototype.updateHtmlColors = function(a) {
-  var b = this.stroke;
-  null != b && b != mxConstants.NONE ? (a.style.borderColor = b, this.isDashed ? a.style.borderStyle = "dashed" : 0 < this.strokewidth && (a.style.borderStyle = "solid"), a.style.borderWidth = Math
-    .max(1, Math.ceil(this.strokewidth * this.scale)) + "px") : a.style.borderWidth = "0px";
-  b = this.fill;
-  null != b && b != mxConstants.NONE ? (a.style.backgroundColor = b, a.style.backgroundImage = "none") : this.pointerEvents ? a.style.backgroundColor = "transparent" : 8 == document.documentMode ?
-    mxUtils.addTransparentBackgroundFilter(a) : this.setTransparentBackgroundImage(a)
-};
-mxRectangleShape.prototype.updateHtmlFilters = function(a) {
-  var b = "";
-  100 > this.opacity && (b += "alpha(opacity\x3d" + this.opacity + ")");
-  this.isShadow && (b += "progid:DXImageTransform.Microsoft.dropShadow (OffX\x3d'" + Math.round(mxConstants.SHADOW_OFFSET_X * this.scale) + "', OffY\x3d'" + Math.round(mxConstants.SHADOW_OFFSET_Y *
-    this.scale) + "', Color\x3d'" + mxConstants.SHADOWCOLOR + "')");
-  if (this.gradient) {
-    var c = this.fill,
-      d = this.gradient,
-      e = "0",
-      f = {
-        east: 0,
-        south: 1,
-        west: 2,
-        north: 3
-      },
-      g = null != this.direction ? f[this.direction] : 0;
-    null !=
-      this.gradientDirection && (g = mxUtils.mod(g + f[this.gradientDirection] - 1, 4));
-    1 == g ? (e = "1", f = c, c = d, d = f) : 2 == g ? (f = c, c = d, d = f) : 3 == g && (e = "1");
-    b += "progid:DXImageTransform.Microsoft.gradient(startColorStr\x3d'" + c + "', endColorStr\x3d'" + d + "', gradientType\x3d'" + e + "')"
-  }
-  a.style.filter = b
-};
-
-function mxEllipse(a, b, c, d) {
-  mxShape.call(this);
-  this.bounds = a;
-  this.fill = b;
-  this.stroke = c;
-  this.strokewidth = null != d ? d : 1
-}
-mxUtils.extend(mxEllipse, mxShape);
-mxEllipse.prototype.paintVertexShape = function(a, b, c, d, e) {
-  a.ellipse(b, c, d, e);
-  a.fillAndStroke()
-};
-
-function mxDoubleEllipse(a, b, c, d) {
-  mxShape.call(this);
-  this.bounds = a;
-  this.fill = b;
-  this.stroke = c;
-  this.strokewidth = null != d ? d : 1
-}
-mxUtils.extend(mxDoubleEllipse, mxShape);
-mxDoubleEllipse.prototype.vmlScale = 10;
-mxDoubleEllipse.prototype.paintBackground = function(a, b, c, d, e) {
-  a.ellipse(b, c, d, e);
-  a.fillAndStroke()
-};
-mxDoubleEllipse.prototype.paintForeground = function(a, b, c, d, e) {
-  var f = Math.min(4, Math.min(d / 5, e / 5));
-  d -= 2 * f;
-  e -= 2 * f;
-  0 < d && 0 < e && a.ellipse(b + f, c + f, d, e);
-  a.stroke()
-};
-
-function mxRhombus(a, b, c, d) {
-  mxShape.call(this);
-  this.bounds = a;
-  this.fill = b;
-  this.stroke = c;
-  this.strokewidth = null != d ? d : 1
-}
-mxUtils.extend(mxRhombus, mxShape);
-mxRhombus.prototype.paintVertexShape = function(a, b, c, d, e) {
-  var f = d / 2,
-    g = e / 2;
-  a.begin();
-  a.moveTo(b + f, c);
-  a.lineTo(b + d, c + g);
-  a.lineTo(b + f, c + e);
-  a.lineTo(b, c + g);
-  a.close();
-  a.fillAndStroke()
-};
-
-function mxPolyline(a, b, c) {
-  mxShape.call(this);
-  this.points = a;
-  this.stroke = b;
-  this.strokewidth = null != c ? c : 1
-}
-mxUtils.extend(mxPolyline, mxShape);
-mxPolyline.prototype.getRotation = function() {
-  return 0
-};
-mxPolyline.prototype.paintEdgeShape = function(a, b) {
-  this.paintLine(a, b, this.isRounded)
-};
-mxPolyline.prototype.paintLine = function(a, b, c) {
-  var d = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2,
-    e = b[0],
-    f = b[b.length - 1];
-  a.begin();
-  a.moveTo(e.x, e.y);
-  for (var g = 1; g < b.length - 1; g++) {
-    var h = b[g],
-      k = e.x - h.x,
-      e = e.y - h.y;
-    if (c && g < b.length - 1 && (0 != k || 0 != e)) {
-      var l = Math.sqrt(k * k + e * e),
-        k = k * Math.min(d, l / 2) / l,
-        e = e * Math.min(d, l / 2) / l;
-      a.lineTo(h.x + k, h.y + e);
-      e = b[g + 1];
-      k = e.x - h.x;
-      e = e.y - h.y;
-      l = Math.max(1, Math.sqrt(k * k + e * e));
-      k = k * Math.min(d, l / 2) / l;
-      e = e * Math.min(d, l / 2) / l;
-      k = h.x + k;
-      e = h.y + e;
-      a.quadTo(h.x,
-        h.y, k, e);
-      h = new mxPoint(k, e)
-    } else a.lineTo(h.x, h.y);
-    e = h
-  }
-  a.lineTo(f.x, f.y);
-  a.stroke()
-};
-
-function mxArrow(a, b, c, d, e, f, g) {
-  mxShape.call(this);
-  this.points = a;
-  this.fill = b;
-  this.stroke = c;
-  this.strokewidth = null != d ? d : 1;
-  this.arrowWidth = null != e ? e : mxConstants.ARROW_WIDTH;
-  this.spacing = null != f ? f : mxConstants.ARROW_SPACING;
-  this.endSize = null != g ? g : mxConstants.ARROW_SIZE
-}
-mxUtils.extend(mxArrow, mxShape);
-mxArrow.prototype.paintEdgeShape = function(a, b) {
-  var c = mxConstants.ARROW_SPACING,
-    d = mxConstants.ARROW_WIDTH,
-    e = mxConstants.ARROW_SIZE,
-    f = b[0],
-    g = b[b.length - 1],
-    h = g.x - f.x,
-    k = g.y - f.y,
-    l = Math.sqrt(h * h + k * k),
-    m = l - 2 * c - e,
-    h = h / l,
-    k = k / l,
-    l = d * k / 3,
-    d = -d * h / 3,
-    e = f.x - l / 2 + c * h,
-    f = f.y - d / 2 + c * k,
-    n = e + l,
-    p = f + d,
-    q = n + m * h,
-    m = p + m * k,
-    s = q + l,
-    r = m + d,
-    t = s - 3 * l,
-    v = r - 3 * d;
-  a.begin();
-  a.moveTo(e, f);
-  a.lineTo(n, p);
-  a.lineTo(q, m);
-  a.lineTo(s, r);
-  a.lineTo(g.x - c * h, g.y - c * k);
-  a.lineTo(t, v);
-  a.lineTo(t + l, v + d);
-  a.close();
-  a.fillAndStroke()
-};
-
-function mxText(a, b, c, d, e, f, g, h, k, l, m, n, p, q, s, r, t, v, w, u) {
-  mxShape.call(this);
-  this.value = a;
-  this.bounds = b;
-  this.color = null != e ? e : "black";
-  this.align = null != c ? c : "";
-  this.valign = null != d ? d : "";
-  this.family = null != f ? f : mxConstants.DEFAULT_FONTFAMILY;
-  this.size = null != g ? g : mxConstants.DEFAULT_FONTSIZE;
-  this.fontStyle = null != h ? h : mxConstants.DEFAULT_FONTSTYLE;
-  this.spacing = parseInt(k || 2);
-  this.spacingTop = this.spacing + parseInt(l || 0);
-  this.spacingRight = this.spacing + parseInt(m || 0);
-  this.spacingBottom = this.spacing + parseInt(n || 0);
-  this.spacingLeft = this.spacing + parseInt(p || 0);
-  this.horizontal = null != q ? q : !0;
-  this.background = s;
-  this.border = r;
-  this.wrap = null != t ? t : !1;
-  this.clipped = null != v ? v : !1;
-  this.overflow = null != w ? w : "visible";
-  this.labelPadding = null != u ? u : 0;
-  this.rotation = 0
-}
-mxUtils.extend(mxText, mxShape);
-mxText.prototype.baseSpacingTop = 0;
-mxText.prototype.baseSpacingBottom = 0;
-mxText.prototype.baseSpacingLeft = 0;
-mxText.prototype.baseSpacingRight = 0;
-mxText.prototype.replaceLinefeeds = !0;
-mxText.prototype.verticalTextRotation = -90;
-mxText.prototype.ignoreClippedStringSize = !0;
-mxText.prototype.ignoreStringSize = !1;
-mxText.prototype.isParseVml = function() {
-  return !1
-};
-mxText.prototype.isHtmlAllowed = function() {
-  return 8 != document.documentMode
-};
-mxText.prototype.getSvgScreenOffset = function() {
-  return 0
-};
-mxText.prototype.checkBounds = function() {
-  return null != this.bounds && !isNaN(this.bounds.x) && !isNaN(this.bounds.y) && !isNaN(this.bounds.width) && !isNaN(this.bounds.height)
-};
-mxText.prototype.updateBoundingBox = function() {
-  var a = this.node;
-  8 == document.documentMode && null != a.firstChild && (a = a.firstChild, null != a.firstChild && (a = a.firstChild));
-  this.boundingBox = this.bounds.clone();
-  var b = this.getTextRotation();
-  if (!this.ignoreStringSize && null != a && "fill" != this.overflow && (!this.clipped || !this.ignoreClippedStringSize)) {
-    var c = null,
-      d = null;
-    if (null != a.ownerSVGElement)
-      if (null != a.firstChild && null != a.firstChild.firstChild && "foreignObject" == a.firstChild.firstChild.nodeName) a = a.firstChild.firstChild,
-        c = this.wrap ? this.bounds.width : parseInt(a.getAttribute("width")) * this.scale, d = parseInt(a.getAttribute("height")) * this.scale;
-      else {
-        b = a.getBBox();
-        if (0 == b.width && 0 == b.height) return;
-        this.boundingBox = new mxRectangle(b.x, b.y, b.width, b.height);
-        b = 0
-      } else d = this.state.view.textDiv, null != this.offsetWidth && null != this.offsetHeight ? (c = this.wrap ? this.bounds.width : this.offsetWidth * this.scale, d = this.offsetHeight * this.scale) :
-      null != d ? (this.updateFont(d), this.updateSize(d), mxUtils.isNode(this.value) ? d.innerHTML = this.value.outerHTML :
-        (c = this.replaceLinefeeds ? this.value.replace(/\n/g, "\x3cbr/\x3e") : this.value, d.innerHTML = c), c = this.wrap ? this.bounds.width : d.offsetWidth * this.scale, d = d.offsetHeight *
-        this.scale) : (c = this.wrap ? this.bounds.width : a.offsetWidth * this.scale, d = a.offsetHeight * this.scale);
-    null != c && null != d && (this.boundingBox = new mxRectangle(this.bounds.x + this.margin.x * c, this.bounds.y + this.margin.y * d, c, d))
-  } else this.boundingBox.x += this.margin.x * this.boundingBox.width, this.boundingBox.y += this.margin.y * this.boundingBox.height;
-  null !=
-    this.boundingBox && (0 != b && (b = mxUtils.getBoundingBox(this.boundingBox, b), this.boundingBox.x = b.x, this.boundingBox.y = b.y, mxClient.IS_QUIRKS || (this.boundingBox.width = b.width,
-      this.boundingBox.height = b.height)), this.boundingBox.x = Math.floor(this.boundingBox.x), this.boundingBox.y = Math.floor(this.boundingBox.y), this.boundingBox.width = Math.ceil(this.boundingBox
-      .width), this.boundingBox.height = Math.ceil(this.boundingBox.height))
-};
-mxText.prototype.getShapeRotation = function() {
-  return 0
-};
-mxText.prototype.getTextRotation = function() {
-  return null != this.state && null != this.state.shape ? this.state.shape.getTextRotation() : 0
-};
-mxText.prototype.isPaintBoundsInverted = function() {
-  return !this.horizontal && null != this.state && this.state.view.graph.model.isVertex(this.state.cell)
-};
-mxText.prototype.configureCanvas = function(a, b, c, d, e) {
-  mxShape.prototype.configureCanvas.apply(this, arguments);
-  a.setFontColor(this.color);
-  a.setFontBackgroundColor(this.background);
-  a.setFontBorderColor(this.border);
-  a.setFontFamily(this.family);
-  a.setFontSize(this.size);
-  a.setFontStyle(this.fontStyle)
-};
-mxText.prototype.updateVmlContainer = function() {
-  this.node.style.left = Math.round(this.bounds.x) + "px";
-  this.node.style.top = Math.round(this.bounds.y) + "px";
-  this.node.style.width = "1px";
-  this.node.style.height = "1px";
-  this.node.style.overflow = "visible"
-};
-mxText.prototype.paint = function(a) {
-  var b = this.scale,
-    c = this.bounds.x / b,
-    d = this.bounds.y / b,
-    e = this.bounds.width / b,
-    b = this.bounds.height / b;
-  this.updateTransform(a, c, d, e, b);
-  this.configureCanvas(a, c, d, e, b);
-  var f = mxUtils.isNode(this.value) || this.dialect == mxConstants.DIALECT_STRICTHTML,
-    g = f || a instanceof mxVmlCanvas2D ? "html" : "",
-    h = this.value;
-  !f && "html" == g && (h = mxUtils.htmlEntities(h, !1));
-  h = !mxUtils.isNode(this.value) && this.replaceLinefeeds && "html" == g ? h.replace(/\n/g, "\x3cbr/\x3e") : h;
-  a.text(c, d, e, b, h, this.align,
-    this.valign, this.wrap, g, "fill" == this.overflow, this.clipped, this.getTextRotation())
-};
-mxText.prototype.redrawHtmlShape = function() {
-  var a = this.node.style;
-  a.opacity = 1 > this.opacity ? this.opacity : "";
-  a.overflow = "";
-  a.width = "";
-  a.height = "";
-  this.updateFont(this.node);
-  this.updateSize(this.node);
-  this.updateValue();
-  this.offsetHeight = this.offsetWidth = null;
-  null != mxClient.CSS_PREFIX ? this.updateHtmlTransform() : this.updateHtmlFilter()
-};
-mxText.prototype.updateHtmlTransform = function() {
-  var a = this.getTextRotation(),
-    b = this.node.style,
-    c = this.margin.x,
-    d = this.margin.y;
-  0 != a ? (b[mxClient.CSS_PREFIX + "TransformOrigin"] = 100 * -c + "% " + 100 * -d + "%", b[mxClient.CSS_PREFIX + "Transform"] = "translate(" + 100 * c + "%," + 100 * d + "%)scale(" + this.scale +
-    ") rotate(" + a + "deg)") : (b[mxClient.CSS_PREFIX + "TransformOrigin"] = "0% 0%", b[mxClient.CSS_PREFIX + "Transform"] = "scale(" + this.scale + ")translate(" + 100 * c + "%," + 100 * d +
-    "%)");
-  b.left = Math.round(this.bounds.x) + "px";
-  b.top = Math.round(this.bounds.y) +
-    "px"
-};
-mxText.prototype.updateHtmlFilter = function() {
-  var a = this.node.style,
-    b = this.margin.x,
-    c = this.margin.y,
-    d = this.scale;
-  a.filter = "";
-  var e = 0,
-    f = 0,
-    g = null != this.state ? this.state.view.textDiv : null;
-  if (null != g) {
-    g.style.overflow = "";
-    g.style.height = "";
-    g.style.width = "";
-    this.updateFont(g);
-    this.updateSize(g);
-    if (mxUtils.isNode(this.value)) g.innerHTML = this.value.outerHTML;
-    else {
-      var h = this.value;
-      this.dialect != mxConstants.DIALECT_STRICTHTML && (h = mxUtils.htmlEntities(h, !1));
-      h = this.replaceLinefeeds ? h.replace(/\n/g, "\x3cbr/\x3e") : h;
-      g.innerHTML = h
-    }
-    e = g.offsetWidth + 2;
-    f = g.offsetHeight + 2
-  } else e = this.node.offsetWidth, f = this.node.offsetHeight + 1;
-  this.offsetWidth = e;
-  this.offsetHeight = f;
-  g = this.bounds.width / d;
-  h = this.bounds.height / d;
-  mxClient.IS_QUIRKS && (this.clipped || "fill" == this.overflow) && 0 < h ? (h = Math.min(h, f), a.height = Math.round(h + 1) + "px") : h = f;
-  "fill" != this.overflow && (mxClient.IS_QUIRKS && (this.clipped || this.wrap) && 0 < g ? (g = Math.min(g, e), a.width = Math.round(g) + "px") : g = e);
-  var h = h * d,
-    g = g * d,
-    e = this.getTextRotation() * (Math.PI / 180),
-    f = parseFloat(parseFloat(Math.cos(e)).toFixed(8)),
-    k = parseFloat(parseFloat(Math.sin(-e)).toFixed(8)),
-    e = e % (2 * Math.PI);
-  0 > e && (e += 2 * Math.PI);
-  e %= Math.PI;
-  e > Math.PI / 2 && (e = Math.PI - e);
-  var l = Math.cos(e),
-    m = Math.sin(-e),
-    b = g * -(b + 0.5),
-    c = h * -(c + 0.5),
-    n = (h - h * l + g * m) / 2 + k * b - f * c;
-  0 != e && (a.filter = "progid:DXImageTransform.Microsoft.Matrix(M11\x3d" + f + ", M12\x3d" + k + ", M21\x3d" + -k + ", M22\x3d" + f + ", sizingMethod\x3d'auto expand')");
-  a.zoom = d;
-  a.left = Math.round(this.bounds.x + ((g - g * l + h * m) / 2 - f * b - k * c) - g / 2) + "px";
-  a.top = Math.round(this.bounds.y + n - h / 2) + "px"
-};
-mxText.prototype.updateValue = function() {
-  if (mxUtils.isNode(this.value)) this.node.innerHTML = "", this.node.appendChild(this.value);
-  else {
-    var a = this.value;
-    this.dialect != mxConstants.DIALECT_STRICTHTML && (a = mxUtils.htmlEntities(a, !1));
-    var a = this.replaceLinefeeds ? a.replace(/\n/g, "\x3cbr/\x3e") : a,
-      b = null != this.background && this.background != mxConstants.NONE ? this.background : null,
-      c = null != this.border && this.border != mxConstants.NONE ? this.border : null;
-    if (null != b || null != c)
-      if ("fill" == this.overflow) null != b && (this.node.style.backgroundColor =
-        b), null != c && (this.node.style.border = "1px solid " + c);
-      else {
-        var d = "";
-        null != b && (d += "background-color:" + b + ";");
-        null != c && (d += "border:1px solid " + c + ";");
-        a = '\x3cdiv style\x3d"zoom:1;' + d + "display:inline-block;_display:inline;padding-bottom:1px;padding-right:1px;line-height:" + this.node.style.lineHeight + '"\x3e' + a + "\x3c/div\x3e";
-        this.node.style.lineHeight = ""
-      }
-    this.node.innerHTML = a
-  }
-};
-mxText.prototype.updateFont = function(a) {
-  a = a.style;
-  a.lineHeight = Math.round(this.size * mxConstants.LINE_HEIGHT) + "px";
-  a.fontSize = Math.round(this.size) + "px";
-  a.fontFamily = this.family;
-  a.verticalAlign = "top";
-  a.color = this.color;
-  a.fontWeight = (this.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD ? "bold" : "";
-  a.fontStyle = (this.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC ? "italic" : "";
-  a.fontDecoration = (this.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE ? "underline" : "";
-  a.textAlign =
-    this.align == mxConstants.ALIGN_CENTER ? "center" : this.align == mxConstants.ALIGN_RIGHT ? "right" : "left"
-};
-mxText.prototype.updateSize = function(a) {
-  var b = Math.round(this.bounds.width / this.scale),
-    c = Math.round(this.bounds.height / this.scale);
-  a = a.style;
-  this.clipped ? (a.overflow = "hidden", 0 < c && (a.maxHeight = c + "px"), 0 < b && (a.width = b + "px")) : "fill" == this.overflow && (a.width = b + "px", 0 < c && (a.maxHeight = c + "px"));
-  this.wrap ? (!this.clipped && 0 < b && (a.width = b + "px"), a.whiteSpace = "normal") : a.whiteSpace = "nowrap"
-};
-mxText.prototype.updateMargin = function() {
-  this.margin = mxUtils.getAlignmentAsPoint(this.align, this.valign)
-};
-mxText.prototype.getSpacing = function() {
-  var a = 0,
-    b = 0,
-    a = this.align == mxConstants.ALIGN_CENTER ? (this.spacingLeft - this.spacingRight) / 2 : this.align == mxConstants.ALIGN_RIGHT ? -this.spacingRight - this.baseSpacingRight : this.spacingLeft +
-    this.baseSpacingLeft,
-    b = this.valign == mxConstants.ALIGN_MIDDLE ? (this.spacingTop - this.spacingBottom) / 2 : this.valign == mxConstants.ALIGN_BOTTOM ? -this.spacingBottom - this.baseSpacingBottom : this.spacingTop +
-    this.baseSpacingTop;
-  return new mxPoint(a, b)
-};
-
-function mxTriangle() {
-  mxActor.call(this)
-}
-mxUtils.extend(mxTriangle, mxActor);
-mxTriangle.prototype.redrawPath = function(a, b, c, d, e) {
-  a.moveTo(0, 0);
-  a.lineTo(d, 0.5 * e);
-  a.lineTo(0, e);
-  a.close()
-};
-
-function mxHexagon() {
-  mxActor.call(this)
-}
-mxUtils.extend(mxHexagon, mxActor);
-mxHexagon.prototype.redrawPath = function(a, b, c, d, e) {
-  a.moveTo(0.25 * d, 0);
-  a.lineTo(0.75 * d, 0);
-  a.lineTo(d, 0.5 * e);
-  a.lineTo(0.75 * d, e);
-  a.lineTo(0.25 * d, e);
-  a.lineTo(0, 0.5 * e);
-  a.close()
-};
-
-function mxLine(a, b, c) {
-  mxShape.call(this);
-  this.bounds = a;
-  this.stroke = b;
-  this.strokewidth = null != c ? c : 1
-}
-mxUtils.extend(mxLine, mxShape);
-mxLine.prototype.paintVertexShape = function(a, b, c, d, e) {
-  c += e / 2;
-  a.begin();
-  a.moveTo(b, c);
-  a.lineTo(b + d, c);
-  a.stroke()
-};
-
-function mxImageShape(a, b, c, d, e) {
-  mxShape.call(this);
-  this.bounds = a;
-  this.image = b;
-  this.fill = c;
-  this.stroke = d;
-  this.strokewidth = null != e ? e : 1;
-  this.shadow = !1
-}
-mxUtils.extend(mxImageShape, mxRectangleShape);
-mxImageShape.prototype.preserveImageAspect = !0;
-mxImageShape.prototype.getSvgScreenOffset = function() {
-  return !mxClient.IS_IE ? 0.5 : 0
-};
-mxImageShape.prototype.apply = function(a) {
-  mxShape.prototype.apply.apply(this, arguments);
-  this.gradient = this.stroke = this.fill = null;
-  null != this.style && (this.fill = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_BACKGROUND), this.stroke = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_BORDER), this.preserveImageAspect =
-    1 == mxUtils.getNumber(this.style, mxConstants.STYLE_IMAGE_ASPECT, 1), this.flipH = this.flipH || 1 == mxUtils.getValue(this.style, "imageFlipH", 0), this.flipV = this.flipV || 1 == mxUtils.getValue(
-      this.style,
-      "imageFlipV", 0))
-};
-mxImageShape.prototype.isHtmlAllowed = function() {
-  return !this.preserveImageAspect
-};
-mxImageShape.prototype.createHtml = function() {
-  var a = document.createElement("div");
-  a.style.position = "absolute";
-  return a
-};
-mxImageShape.prototype.paintVertexShape = function(a, b, c, d, e) {
-  if (null != this.image) {
-    var f = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_BACKGROUND, null),
-      g = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_BORDER, null);
-    if (null != f || null != g) a.setFillColor(f), a.setStrokeColor(g), a.rect(b, c, d, e), a.fillAndStroke();
-    a.image(b, c, d, e, this.image, this.preserveImageAspect, !1, !1)
-  } else mxRectangleShape.prototype.paintBackground.apply(this, arguments)
-};
-mxImageShape.prototype.redrawHtmlShape = function() {
-  this.node.style.left = Math.round(this.bounds.x) + "px";
-  this.node.style.top = Math.round(this.bounds.y) + "px";
-  this.node.style.width = Math.max(0, Math.round(this.bounds.width)) + "px";
-  this.node.style.height = Math.max(0, Math.round(this.bounds.height)) + "px";
-  this.node.style.backgroundColor = this.fill || "";
-  this.node.style.borderColor = this.stroke || "";
-  this.node.innerHTML = "";
-  if (null != this.image) {
-    var a = document.createElement(mxClient.IS_IE6 || null == mxClient.CSS_PREFIX && 0 !=
-      this.rotation ? mxClient.VML_PREFIX + ":image" : "img");
-    a.style.position = "absolute";
-    a.src = this.image;
-    var b = 100 > this.opacity ? "alpha(opacity\x3d" + this.opacity + ")" : "";
-    this.node.style.filter = b;
-    this.flipH && this.flipV ? b += "progid:DXImageTransform.Microsoft.BasicImage(rotation\x3d2)" : this.flipH ? b += "progid:DXImageTransform.Microsoft.BasicImage(mirror\x3d1)" : this.flipV && (b +=
-      "progid:DXImageTransform.Microsoft.BasicImage(rotation\x3d2, mirror\x3d1)");
-    a.style.filter != b && (a.style.filter = b);
-    "image" == a.nodeName ? a.style.rotation =
-      this.rotation : a.style[mxClient.CSS_PREFIX + "Transform"] = "rotate(" + this.rotation + "deg)";
-    a.style.width = this.node.style.width;
-    a.style.height = this.node.style.height;
-    this.node.style.backgroundImage = "";
-    this.node.appendChild(a)
-  } else this.setTransparentBackgroundImage(this.node)
-};
-
-function mxLabel(a, b, c, d) {
-  mxRectangleShape.call(this, a, b, c, d)
-}
-mxUtils.extend(mxLabel, mxRectangleShape);
-mxLabel.prototype.imageSize = mxConstants.DEFAULT_IMAGESIZE;
-mxLabel.prototype.spacing = 2;
-mxLabel.prototype.indicatorSize = 10;
-mxLabel.prototype.indicatorSpacing = 2;
-mxLabel.prototype.init = function(a) {
-  mxShape.prototype.init.apply(this, arguments);
-  null != this.indicatorColor && null != this.indicatorShape && (this.indicator = new this.indicatorShape, this.indicator.dialect = this.dialect, this.indicator.bounds = this.bounds, this.indicator
-    .fill = this.indicatorColor, this.indicator.stroke = this.indicatorColor, this.indicator.gradient = this.indicatorGradientColor, this.indicator.direction = this.indicatorDirection, this.indicator
-    .init(this.node))
-};
-mxLabel.prototype.redraw = function() {
-  null != this.indicator && (this.indicator.fill = this.indicatorColor, this.indicator.stroke = this.indicatorColor, this.indicator.gradient = this.indicatorGradientColor, this.indicator.direction =
-    this.indicatorDirection);
-  mxShape.prototype.redraw.apply(this, arguments)
-};
-mxLabel.prototype.isHtmlAllowed = function() {
-  return mxRectangleShape.prototype.isHtmlAllowed.apply(this, arguments) && null == this.indicatorColor && null == this.indicatorShape
-};
-mxLabel.prototype.paintForeground = function(a, b, c, d, e) {
-  this.paintImage(a, b, c, d, e);
-  this.paintIndicator(a, b, c, d, e);
-  mxRectangleShape.prototype.paintForeground.apply(this, arguments)
-};
-mxLabel.prototype.paintImage = function(a, b, c, d, e) {
-  null != this.image && (b = this.getImageBounds(b, c, d, e), a.image(b.x, b.y, b.width, b.height, this.image, !1, !1, !1))
-};
-mxLabel.prototype.getImageBounds = function(a, b, c, d) {
-  var e = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_ALIGN, mxConstants.ALIGN_LEFT),
-    f = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE),
-    g = mxUtils.getNumber(this.style, mxConstants.STYLE_IMAGE_WIDTH, mxConstants.DEFAULT_IMAGESIZE),
-    h = mxUtils.getNumber(this.style, mxConstants.STYLE_IMAGE_HEIGHT, mxConstants.DEFAULT_IMAGESIZE),
-    k = mxUtils.getNumber(this.style, mxConstants.STYLE_SPACING, this.spacing) + 5;
-  a = e == mxConstants.ALIGN_CENTER ?
-    a + (c - g) / 2 : e == mxConstants.ALIGN_RIGHT ? a + (c - g - k) : a + k;
-  b = f == mxConstants.ALIGN_TOP ? b + k : f == mxConstants.ALIGN_BOTTOM ? b + (d - h - k) : b + (d - h) / 2;
-  return new mxRectangle(a, b, g, h)
-};
-mxLabel.prototype.paintIndicator = function(a, b, c, d, e) {
-  null != this.indicator ? (this.indicator.bounds = this.getIndicatorBounds(b, c, d, e), this.indicator.paint(a)) : null != this.indicatorImage && (b = this.getIndicatorBounds(b, c, d, e), a.image(
-    b.x, b.y, b.width, b.height, this.indicatorImage, !1, !1, !1))
-};
-mxLabel.prototype.getIndicatorBounds = function(a, b, c, d) {
-  var e = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_ALIGN, mxConstants.ALIGN_LEFT),
-    f = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE),
-    g = mxUtils.getNumber(this.style, mxConstants.STYLE_INDICATOR_WIDTH, this.indicatorSize),
-    h = mxUtils.getNumber(this.style, mxConstants.STYLE_INDICATOR_HEIGHT, this.indicatorSize),
-    k = this.spacing + 5;
-  a = e == mxConstants.ALIGN_RIGHT ? a + (c - g - k) : e == mxConstants.ALIGN_CENTER ? a + (c - g) /
-    2 : a + k;
-  b = f == mxConstants.ALIGN_BOTTOM ? b + (d - h - k) : f == mxConstants.ALIGN_TOP ? b + k : b + (d - h) / 2;
-  return new mxRectangle(a, b, g, h)
-};
-mxLabel.prototype.redrawHtmlShape = function() {
-  for (mxRectangleShape.prototype.redrawHtmlShape.apply(this, arguments); this.node.hasChildNodes();) this.node.removeChild(this.node.lastChild);
-  if (null != this.image) {
-    var a = document.createElement("img");
-    a.style.position = "relative";
-    a.setAttribute("border", "0");
-    var b = this.getImageBounds(this.bounds.x, this.bounds.y, this.bounds.width, this.bounds.height);
-    b.x -= this.bounds.x;
-    b.y -= this.bounds.y;
-    a.style.left = Math.round(b.x) + "px";
-    a.style.top = Math.round(b.y) + "px";
-    a.style.width =
-      Math.round(b.width) + "px";
-    a.style.height = Math.round(b.height) + "px";
-    a.src = this.image;
-    this.node.appendChild(a)
-  }
-};
-
-function mxCylinder(a, b, c, d) {
-  mxShape.call(this);
-  this.bounds = a;
-  this.fill = b;
-  this.stroke = c;
-  this.strokewidth = null != d ? d : 1
-}
-mxUtils.extend(mxCylinder, mxShape);
-mxCylinder.prototype.maxHeight = 40;
-mxCylinder.prototype.svgStrokeTolerance = 0;
-mxCylinder.prototype.paintVertexShape = function(a, b, c, d, e) {
-  a.translate(b, c);
-  a.begin();
-  this.redrawPath(a, b, c, d, e, !1);
-  a.fillAndStroke();
-  a.setShadow(!1);
-  a.begin();
-  this.redrawPath(a, b, c, d, e, !0);
-  a.stroke()
-};
-mxCylinder.prototype.redrawPath = function(a, b, c, d, e, f) {
-  b = Math.min(this.maxHeight, Math.round(e / 5));
-  if (f && null != this.fill || !f && null == this.fill) a.moveTo(0, b), a.curveTo(0, 2 * b, d, 2 * b, d, b), f || (a.stroke(), a.begin());
-  f || (a.moveTo(0, b), a.curveTo(0, -b / 3, d, -b / 3, d, b), a.lineTo(d, e - b), a.curveTo(d, e + b / 3, 0, e + b / 3, 0, e - b), a.close())
-};
-
-function mxConnector(a, b, c) {
-  mxPolyline.call(this, a, b, c)
-}
-mxUtils.extend(mxConnector, mxPolyline);
-mxConnector.prototype.paintEdgeShape = function(a, b) {
-  var c = this.createMarker(a, b, !0),
-    d = this.createMarker(a, b, !1);
-  null == this.style || 1 != this.style[mxConstants.STYLE_CURVED] ? this.paintLine(a, b, this.isRounded) : this.paintCurvedLine(a, b);
-  a.setFillColor(this.stroke);
-  a.setShadow(!1);
-  a.setDashed(!1);
-  null != c && c();
-  null != d && d()
-};
-mxConnector.prototype.paintCurvedLine = function(a, b) {
-  a.begin();
-  var c = b[0],
-    d = b.length;
-  a.moveTo(c.x, c.y);
-  for (c = 1; c < d - 2; c++) {
-    var e = b[c],
-      f = b[c + 1];
-    a.quadTo(e.x, e.y, (e.x + f.x) / 2, (e.y + f.y) / 2)
-  }
-  e = b[d - 2];
-  f = b[d - 1];
-  a.quadTo(e.x, e.y, f.x, f.y);
-  a.stroke()
-};
-mxConnector.prototype.createMarker = function(a, b, c) {
-  var d = b.length,
-    e = c ? b[1] : b[d - 2];
-  b = c ? b[0] : b[d - 1];
-  var d = b.x - e.x,
-    f = b.y - e.y,
-    g = Math.max(1, Math.sqrt(d * d + f * f)),
-    e = d / g,
-    d = f / g,
-    f = mxUtils.getNumber(this.style, c ? mxConstants.STYLE_STARTSIZE : mxConstants.STYLE_ENDSIZE, mxConstants.DEFAULT_MARKERSIZE),
-    g = mxUtils.getValue(this.style, c ? mxConstants.STYLE_STARTARROW : mxConstants.STYLE_ENDARROW);
-  return mxMarker.createMarker(a, this, g, b, e, d, f, c, this.strokewidth, 0 != this.style[c ? mxConstants.STYLE_STARTFILL : mxConstants.STYLE_ENDFILL])
-};
-mxConnector.prototype.augmentBoundingBox = function(a) {
-  mxShape.prototype.augmentBoundingBox.apply(this, arguments);
-  var b = 0;
-  mxUtils.getValue(this.style, mxConstants.STYLE_STARTARROW, mxConstants.NONE) != mxConstants.NONE && (b = mxUtils.getNumber(this.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_MARKERSIZE) +
-    1);
-  mxUtils.getValue(this.style, mxConstants.STYLE_ENDARROW, mxConstants.NONE) != mxConstants.NONE && (b = Math.max(b, mxUtils.getNumber(this.style, mxConstants.STYLE_ENDSIZE, mxConstants.DEFAULT_MARKERSIZE)) +
-    1);
-  a.grow(Math.ceil(b * this.scale))
-};
-
-function mxSwimlane(a, b, c, d) {
-  mxShape.call(this);
-  this.bounds = a;
-  this.fill = b;
-  this.stroke = c;
-  this.strokewidth = null != d ? d : 1
-}
-mxUtils.extend(mxSwimlane, mxShape);
-mxSwimlane.prototype.imageSize = 16;
-mxSwimlane.prototype.getGradientBounds = function(a, b, c, d, e) {
-  a = Math.min(e, mxUtils.getValue(this.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE));
-  return new mxRectangle(b, c, d, a)
-};
-mxSwimlane.prototype.getRotation = function() {
-  var a = mxShape.prototype.getRotation.apply(this, arguments);
-  1 != mxUtils.getValue(this.style, mxConstants.STYLE_HORIZONTAL, 1) && (a += mxText.prototype.verticalTextRotation);
-  return a
-};
-mxSwimlane.prototype.getTextRotation = function() {
-  return this.getRotation()
-};
-mxSwimlane.prototype.isPaintBoundsInverted = function() {
-  return mxShape.prototype.isPaintBoundsInverted.apply(this, arguments) || 1 != mxUtils.getValue(this.style, mxConstants.STYLE_HORIZONTAL, 1)
-};
-mxSwimlane.prototype.getArcSize = function(a, b, c) {
-  a = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, 100 * mxConstants.RECTANGLE_ROUNDING_FACTOR) / 100;
-  return 3 * c * a
-};
-mxSwimlane.prototype.paintVertexShape = function(a, b, c, d, e) {
-  var f = Math.min(e, mxUtils.getValue(this.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE)),
-    g = mxUtils.getValue(this.style, mxConstants.STYLE_SWIMLANE_FILLCOLOR, mxConstants.NONE),
-    h = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_SWIMLANE_LINE, 1),
-    k = 0;
-  a.translate(b, c);
-  this.isRounded ? (k = this.getArcSize(d, e, f), this.paintRoundedSwimlane(a, b, c, d, e, f, k, g, h)) : this.paintSwimlane(a, b, c, d, e, f, g, h);
-  g = mxUtils.getValue(this.style, mxConstants.STYLE_SEPARATORCOLOR,
-    mxConstants.NONE);
-  this.paintSeparator(a, d, f, e, g);
-  null != this.image && (e = this.getImageBounds(b, f, d, e), a.image(e.x - b, e.y - c, e.width, e.height, this.image, !1, !1, !1));
-  this.glass && (a.setShadow(!1), this.paintGlassEffect(a, 0, 0, d, f, k))
-};
-mxSwimlane.prototype.paintSwimlane = function(a, b, c, d, e, f, g, h) {
-  g != mxConstants.NONE && (a.save(), a.setFillColor(g), a.rect(0, 0, d, e), a.fillAndStroke(), a.restore(), a.setShadow(!1));
-  a.begin();
-  a.moveTo(0, f);
-  a.lineTo(0, 0);
-  a.lineTo(d, 0);
-  a.lineTo(d, f);
-  h && a.close();
-  a.fillAndStroke();
-  f < e && g == mxConstants.NONE && (a.pointerEvents = !1, a.begin(), a.moveTo(0, f), a.lineTo(0, e), a.lineTo(d, e), a.lineTo(d, f), a.stroke())
-};
-mxSwimlane.prototype.paintRoundedSwimlane = function(a, b, c, d, e, f, g, h, k) {
-  h != mxConstants.NONE && (a.save(), a.setFillColor(h), a.roundrect(0, 0, d, e, g, g), a.fillAndStroke(), a.restore(), a.setShadow(!1));
-  a.begin();
-  a.moveTo(d, f);
-  a.lineTo(d, g);
-  a.quadTo(d, 0, d - Math.min(d / 2, g), 0);
-  a.lineTo(Math.min(d / 2, g), 0);
-  a.quadTo(0, 0, 0, g);
-  a.lineTo(0, f);
-  k && a.close();
-  a.fillAndStroke();
-  f < e && h == mxConstants.NONE && (a.pointerEvents = !1, a.begin(), a.moveTo(0, f), a.lineTo(0, e - g), a.quadTo(0, e, Math.min(d / 2, g), e), a.lineTo(d - Math.min(d / 2, g), e),
-    a.quadTo(d, e, d, e - g), a.lineTo(d, f), a.stroke())
-};
-mxSwimlane.prototype.paintSeparator = function(a, b, c, d, e) {
-  e != mxConstants.NONE && (a.setStrokeColor(e), a.setDashed(!0), a.begin(), a.moveTo(b, c), a.lineTo(b, d), a.stroke(), a.setDashed(!1))
-};
-mxSwimlane.prototype.getImageBounds = function(a, b, c, d) {
-  return new mxRectangle(a + c - this.imageSize, b, this.imageSize, this.imageSize)
-};
-
-function mxGraphLayout(a) {
-  this.graph = a
-}
-mxGraphLayout.prototype.graph = null;
-mxGraphLayout.prototype.useBoundingBox = !0;
-mxGraphLayout.prototype.parent = null;
-mxGraphLayout.prototype.moveCell = function(a, b, c) {};
-mxGraphLayout.prototype.execute = function(a) {};
-mxGraphLayout.prototype.getGraph = function() {
-  return this.graph
-};
-mxGraphLayout.prototype.getConstraint = function(a, b, c, d) {
-  c = this.graph.view.getState(b);
-  b = null != c ? c.style : this.graph.getCellStyle(b);
-  return null != b ? b[a] : null
-};
-mxGraphLayout.traverse = function(a, b, c, d, e) {
-  if (null != c && null != a) {
-    b = null != b ? b : !0;
-    e = e || [];
-    var f = mxCellPath.create(a);
-    if (null == e[f] && (e[f] = a, d = c(a, d), null == d || d))
-      if (d = this.graph.model.getEdgeCount(a), 0 < d)
-        for (f = 0; f < d; f++) {
-          var g = this.graph.model.getEdgeAt(a, f),
-            h = this.graph.model.getTerminal(g, !0) == a;
-          if (!b || h) h = this.graph.view.getVisibleTerminal(g, !h), this.traverse(h, b, c, g, e)
-        }
-  }
-};
-mxGraphLayout.prototype.isVertexMovable = function(a) {
-  return this.graph.isCellMovable(a)
-};
-mxGraphLayout.prototype.isVertexIgnored = function(a) {
-  return !this.graph.getModel().isVertex(a) || !this.graph.isCellVisible(a)
-};
-mxGraphLayout.prototype.isEdgeIgnored = function(a) {
-  var b = this.graph.getModel();
-  return !b.isEdge(a) || !this.graph.isCellVisible(a) || null == b.getTerminal(a, !0) || null == b.getTerminal(a, !1)
-};
-mxGraphLayout.prototype.setEdgeStyleEnabled = function(a, b) {
-  this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE, b ? "0" : "1", [a])
-};
-mxGraphLayout.prototype.setOrthogonalEdge = function(a, b) {
-  this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL, b ? "1" : "0", [a])
-};
-mxGraphLayout.prototype.getParentOffset = function(a) {
-  var b = new mxPoint;
-  if (null != a && a != this.parent) {
-    var c = this.graph.getModel();
-    if (c.isAncestor(this.parent, a))
-      for (var d = c.getGeometry(a); a != this.parent;) b.x += d.x, b.y += d.y, a = c.getParent(a), d = c.getGeometry(a)
-  }
-  return b
-};
-mxGraphLayout.prototype.setEdgePoints = function(a, b) {
-  if (null != a) {
-    var c = this.graph.model,
-      d = c.getGeometry(a);
-    null == d ? (d = new mxGeometry, d.setRelative(!0)) : d = d.clone();
-    if (null != this.parent && null != b)
-      for (var e = c.getParent(a), e = this.getParentOffset(e), f = 0; f < b.length; f++) b[f].x -= e.x, b[f].y -= e.y;
-    d.points = b;
-    c.setGeometry(a, d)
-  }
-};
-mxGraphLayout.prototype.setVertexLocation = function(a, b, c) {
-  var d = this.graph.getModel(),
-    e = d.getGeometry(a),
-    f = null;
-  if (null != e) {
-    f = new mxRectangle(b, c, e.width, e.height);
-    if (this.useBoundingBox) {
-      var g = this.graph.getView().getState(a);
-      if (null != g && null != g.text && null != g.text.boundingBox) {
-        var h = this.graph.getView().scale,
-          k = g.text.boundingBox;
-        g.text.boundingBox.x < g.x && (b += (g.x - k.x) / h, f.width = k.width);
-        g.text.boundingBox.y < g.y && (c += (g.y - k.y) / h, f.height = k.height)
-      }
-    }
-    null != this.parent && (g = d.getParent(a), null != g && g !=
-      this.parent && (g = this.getParentOffset(g), b -= g.x, c -= g.y));
-    if (e.x != b || e.y != c) e = e.clone(), e.x = b, e.y = c, d.setGeometry(a, e)
-  }
-  return f
-};
-mxGraphLayout.prototype.getVertexBounds = function(a) {
-  var b = this.graph.getModel().getGeometry(a);
-  if (this.useBoundingBox) {
-    var c = this.graph.getView().getState(a);
-    if (null != c && null != c.text && null != c.text.boundingBox) var d = this.graph.getView().scale,
-      e = c.text.boundingBox,
-      f = Math.max(c.x - e.x, 0) / d,
-      g = Math.max(c.y - e.y, 0) / d,
-      h = Math.max(e.x + e.width - (c.x + c.width), 0) / d,
-      c = Math.max(e.y + e.height - (c.y + c.height), 0) / d,
-      b = new mxRectangle(b.x - f, b.y - g, b.width + f + h, b.height + g + c)
-  }
-  null != this.parent && (a = this.graph.getModel().getParent(a),
-    b = b.clone(), null != a && a != this.parent && (a = this.getParentOffset(a), b.x += a.x, b.y += a.y));
-  return new mxRectangle(b.x, b.y, b.width, b.height)
-};
-mxGraphLayout.prototype.arrangeGroups = function(a, b) {
-  this.graph.getModel().beginUpdate();
-  try {
-    for (var c = a.length - 1; 0 <= c; c--) {
-      var d = a[c],
-        e = this.graph.getChildVertices(d),
-        f = this.graph.getBoundingBoxFromGeometry(e),
-        g = this.graph.getCellGeometry(d),
-        h = 0,
-        k = 0;
-      if (this.graph.isSwimlane(d)) var l = this.graph.getStartSize(d),
-        h = l.width,
-        k = l.height;
-      null != f && null != g && (g = g.clone(), g.x = g.x + f.x - b - h, g.y = g.y + f.y - b - k, g.width = f.width + 2 * b + h, g.height = f.height + 2 * b + k, this.graph.getModel().setGeometry(d,
-        g), this.graph.moveCells(e,
-        b + h - f.x, b + k - f.y))
-    }
-  } finally {
-    this.graph.getModel().endUpdate()
-  }
-};
-
-function mxStackLayout(a, b, c, d, e, f) {
-  mxGraphLayout.call(this, a);
-  this.horizontal = null != b ? b : !0;
-  this.spacing = null != c ? c : 0;
-  this.x0 = null != d ? d : 0;
-  this.y0 = null != e ? e : 0;
-  this.border = null != f ? f : 0
-}
-mxStackLayout.prototype = new mxGraphLayout;
-mxStackLayout.prototype.constructor = mxStackLayout;
-mxStackLayout.prototype.horizontal = null;
-mxStackLayout.prototype.spacing = null;
-mxStackLayout.prototype.x0 = null;
-mxStackLayout.prototype.y0 = null;
-mxStackLayout.prototype.border = 0;
-mxStackLayout.prototype.keepFirstLocation = !1;
-mxStackLayout.prototype.fill = !1;
-mxStackLayout.prototype.resizeParent = !1;
-mxStackLayout.prototype.resizeLast = !1;
-mxStackLayout.prototype.wrap = null;
-mxStackLayout.prototype.isHorizontal = function() {
-  return this.horizontal
-};
-mxStackLayout.prototype.moveCell = function(a, b, c) {
-  var d = this.graph.getModel(),
-    e = d.getParent(a),
-    f = this.isHorizontal();
-  if (null != a && null != e) {
-    var g = 0,
-      h = 0,
-      k = d.getChildCount(e);
-    b = f ? b : c;
-    g = this.graph.getView().getState(e);
-    null != g && (b -= f ? g.x : g.y);
-    for (g = 0; g < k; g++)
-      if (c = d.getChildAt(e, g), c != a && (c = d.getGeometry(c), null != c)) {
-        c = f ? c.x + c.width / 2 : c.y + c.height / 2;
-        if (h < b && c > b) break;
-        h = c
-      }
-    f = e.getIndex(a);
-    f = Math.max(0, g - (g > f ? 1 : 0));
-    d.add(e, a, f)
-  }
-};
-mxStackLayout.prototype.getParentSize = function(a) {
-  var b = this.graph.getModel(),
-    c = b.getGeometry(a);
-  if (null != this.graph.container && (null == c && b.isLayer(a) || a == this.graph.getView().currentRoot)) c = new mxRectangle(0, 0, this.graph.container.offsetWidth - 1, this.graph.container.offsetHeight -
-    1);
-  return c
-};
-mxStackLayout.prototype.execute = function(a) {
-  if (null != a) {
-    var b = this.isHorizontal(),
-      c = this.graph.getModel(),
-      d = this.getParentSize(a),
-      e = 0;
-    null != d && (e = b ? d.height : d.width);
-    var e = e - (2 * this.spacing + 2 * this.border),
-      f = this.x0 + this.border,
-      g = this.y0 + this.border;
-    if (this.graph.isSwimlane(a)) {
-      var h = this.graph.getCellStyle(a),
-        k = mxUtils.getValue(h, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE),
-        h = mxUtils.getValue(h, mxConstants.STYLE_HORIZONTAL, !0);
-      b == h && (e -= k);
-      b ? g += k : f += k
-    }
-    c.beginUpdate();
-    try {
-      for (var k = 0,
-          h = null, l = c.getChildCount(a), m = 0; m < l; m++) {
-        var n = c.getChildAt(a, m);
-        if (!this.isVertexIgnored(n) && this.isVertexMovable(n)) {
-          var p = c.getGeometry(n);
-          if (null != p) {
-            p = p.clone();
-            if (null != this.wrap && null != h && (b && h.x + h.width + p.width + 2 * this.spacing > this.wrap || !b && h.y + h.height + p.height + 2 * this.spacing > this.wrap)) h = null, b ? g +=
-              k + this.spacing : f += k + this.spacing, k = 0;
-            k = Math.max(k, b ? p.height : p.width);
-            null != h ? b ? p.x = h.x + h.width + this.spacing : p.y = h.y + h.height + this.spacing : this.keepFirstLocation || (b ? p.x = f : p.y = g);
-            b ? p.y = g : p.x = f;
-            this.fill && 0 < e && (b ? p.height = e : p.width = e);
-            c.setGeometry(n, p);
-            h = p
-          }
-        }
-      }
-      this.resizeParent && null != d && null != h && !this.graph.isCellCollapsed(a) ? (d = d.clone(), b ? d.width = h.x + h.width + this.spacing : d.height = h.y + h.height + this.spacing, c.setGeometry(
-        a, d)) : this.resizeLast && (null != d && null != h) && (b ? h.width = d.width - h.x - this.spacing : h.height = d.height - h.y - this.spacing)
-    } finally {
-      c.endUpdate()
-    }
-  }
-};
-
-function mxPartitionLayout(a, b, c, d) {
-  mxGraphLayout.call(this, a);
-  this.horizontal = null != b ? b : !0;
-  this.spacing = c || 0;
-  this.border = d || 0
-}
-mxPartitionLayout.prototype = new mxGraphLayout;
-mxPartitionLayout.prototype.constructor = mxPartitionLayout;
-mxPartitionLayout.prototype.horizontal = null;
-mxPartitionLayout.prototype.spacing = null;
-mxPartitionLayout.prototype.border = null;
-mxPartitionLayout.prototype.resizeVertices = !0;
-mxPartitionLayout.prototype.isHorizontal = function() {
-  return this.horizontal
-};
-mxPartitionLayout.prototype.moveCell = function(a, b, c) {
-  c = this.graph.getModel();
-  var d = c.getParent(a);
-  if (null != a && null != d) {
-    for (var e = 0, f = 0, g = c.getChildCount(d), e = 0; e < g; e++) {
-      var h = c.getChildAt(d, e),
-        h = this.getVertexBounds(h);
-      if (null != h) {
-        h = h.x + h.width / 2;
-        if (f < b && h > b) break;
-        f = h
-      }
-    }
-    b = d.getIndex(a);
-    b = Math.max(0, e - (e > b ? 1 : 0));
-    c.add(d, a, b)
-  }
-};
-mxPartitionLayout.prototype.execute = function(a) {
-  var b = this.isHorizontal(),
-    c = this.graph.getModel(),
-    d = c.getGeometry(a);
-  if (null != this.graph.container && (null == d && c.isLayer(a) || a == this.graph.getView().currentRoot)) d = new mxRectangle(0, 0, this.graph.container.offsetWidth - 1, this.graph.container.offsetHeight -
-    1);
-  if (null != d) {
-    for (var e = [], f = c.getChildCount(a), g = 0; g < f; g++) {
-      var h = c.getChildAt(a, g);
-      !this.isVertexIgnored(h) && this.isVertexMovable(h) && e.push(h)
-    }
-    f = e.length;
-    if (0 < f) {
-      var k = this.border,
-        l = this.border,
-        m = b ?
-        d.height : d.width,
-        m = m - 2 * this.border;
-      a = this.graph.isSwimlane(a) ? this.graph.getStartSize(a) : new mxRectangle;
-      m -= b ? a.height : a.width;
-      k += a.width;
-      l += a.height;
-      a = this.border + (f - 1) * this.spacing;
-      d = b ? (d.width - k - a) / f : (d.height - l - a) / f;
-      if (0 < d) {
-        c.beginUpdate();
-        try {
-          for (g = 0; g < f; g++) {
-            var h = e[g],
-              n = c.getGeometry(h);
-            null != n && (n = n.clone(), n.x = k, n.y = l, b ? (this.resizeVertices && (n.width = d, n.height = m), k += d + this.spacing) : (this.resizeVertices && (n.height = d, n.width = m), l +=
-              d + this.spacing), c.setGeometry(h, n))
-          }
-        } finally {
-          c.endUpdate()
-        }
-      }
-    }
-  }
-};
-
-function mxCompactTreeLayout(a, b, c) {
-  mxGraphLayout.call(this, a);
-  this.horizontal = null != b ? b : !0;
-  this.invert = null != c ? c : !1
-}
-mxCompactTreeLayout.prototype = new mxGraphLayout;
-mxCompactTreeLayout.prototype.constructor = mxCompactTreeLayout;
-mxCompactTreeLayout.prototype.horizontal = null;
-mxCompactTreeLayout.prototype.invert = null;
-mxCompactTreeLayout.prototype.resizeParent = !0;
-mxCompactTreeLayout.prototype.groupPadding = 10;
-mxCompactTreeLayout.prototype.parentsChanged = null;
-mxCompactTreeLayout.prototype.moveTree = !1;
-mxCompactTreeLayout.prototype.levelDistance = 10;
-mxCompactTreeLayout.prototype.nodeDistance = 20;
-mxCompactTreeLayout.prototype.resetEdges = !0;
-mxCompactTreeLayout.prototype.prefHozEdgeSep = 5;
-mxCompactTreeLayout.prototype.prefVertEdgeOff = 4;
-mxCompactTreeLayout.prototype.minEdgeJetty = 8;
-mxCompactTreeLayout.prototype.channelBuffer = 4;
-mxCompactTreeLayout.prototype.edgeRouting = !0;
-mxCompactTreeLayout.prototype.isVertexIgnored = function(a) {
-  return mxGraphLayout.prototype.isVertexIgnored.apply(this, arguments) || 0 == this.graph.getConnections(a).length
-};
-mxCompactTreeLayout.prototype.isHorizontal = function() {
-  return this.horizontal
-};
-mxCompactTreeLayout.prototype.execute = function(a, b) {
-  this.parent = a;
-  var c = this.graph.getModel();
-  if (null == b)
-    if (0 < this.graph.getEdges(a, c.getParent(a), this.invert, !this.invert, !1).length) b = a;
-    else {
-      var d = this.graph.findTreeRoots(a, !0, this.invert);
-      if (0 < d.length)
-        for (var e = 0; e < d.length; e++)
-          if (!this.isVertexIgnored(d[e]) && 0 < this.graph.getEdges(d[e], null, this.invert, !this.invert, !1).length) {
-            b = d[e];
-            break
-          }
-    }
-  if (null != b) {
-    this.parentsChanged = this.resizeParent ? {} : null;
-    c.beginUpdate();
-    try {
-      var f = this.dfs(b, a);
-      if (null !=
-        f) {
-        this.layout(f);
-        var g = this.graph.gridSize,
-          d = g;
-        if (!this.moveTree) {
-          var h = this.getVertexBounds(b);
-          null != h && (g = h.x, d = h.y)
-        }
-        h = null;
-        h = this.isHorizontal() ? this.horizontalLayout(f, g, d) : this.verticalLayout(f, null, g, d);
-        if (null != h) {
-          var k = e = 0;
-          0 > h.x && (e = Math.abs(g - h.x));
-          0 > h.y && (k = Math.abs(d - h.y));
-          (0 != e || 0 != k) && this.moveNode(f, e, k);
-          this.resizeParent && this.adjustParents();
-          this.edgeRouting && this.localEdgeProcessing(f)
-        }
-      }
-    } finally {
-      c.endUpdate()
-    }
-  }
-};
-mxCompactTreeLayout.prototype.moveNode = function(a, b, c) {
-  a.x += b;
-  a.y += c;
-  this.apply(a);
-  for (a = a.child; null != a;) this.moveNode(a, b, c), a = a.next
-};
-mxCompactTreeLayout.prototype.dfs = function(a, b, c) {
-  c = null != c ? c : [];
-  var d = mxCellPath.create(a),
-    e = null;
-  if (null != a && null == c[d] && !this.isVertexIgnored(a)) {
-    c[d] = a;
-    var e = this.createNode(a),
-      d = this.graph.getModel(),
-      f = null;
-    a = this.graph.getEdges(a, b, this.invert, !this.invert, !1, !0);
-    for (var g = this.graph.getView(), h = 0; h < a.length; h++) {
-      var k = a[h];
-      if (!this.isEdgeIgnored(k)) {
-        this.resetEdges && this.setEdgePoints(k, null);
-        this.edgeRouting && (this.setEdgeStyleEnabled(k, !1), this.setEdgePoints(k, null));
-        var l = g.getState(k),
-          k = null != l ? l.getVisibleTerminal(this.invert) : g.getVisibleTerminal(k, this.invert),
-          l = this.dfs(k, b, c);
-        null != l && null != d.getGeometry(k) && (null == f ? e.child = l : f.next = l, f = l)
-      }
-    }
-  }
-  return e
-};
-mxCompactTreeLayout.prototype.layout = function(a) {
-  if (null != a) {
-    for (var b = a.child; null != b;) this.layout(b), b = b.next;
-    null != a.child ? this.attachParent(a, this.join(a)) : this.layoutLeaf(a)
-  }
-};
-mxCompactTreeLayout.prototype.horizontalLayout = function(a, b, c, d) {
-  a.x += b + a.offsetX;
-  a.y += c + a.offsetY;
-  d = this.apply(a, d);
-  b = a.child;
-  if (null != b) {
-    d = this.horizontalLayout(b, a.x, a.y, d);
-    c = a.y + b.offsetY;
-    for (var e = b.next; null != e;) d = this.horizontalLayout(e, a.x + b.offsetX, c, d), c += e.offsetY, e = e.next
-  }
-  return d
-};
-mxCompactTreeLayout.prototype.verticalLayout = function(a, b, c, d, e) {
-  a.x += c + a.offsetY;
-  a.y += d + a.offsetX;
-  e = this.apply(a, e);
-  b = a.child;
-  if (null != b) {
-    e = this.verticalLayout(b, a, a.x, a.y, e);
-    c = a.x + b.offsetY;
-    for (d = b.next; null != d;) e = this.verticalLayout(d, a, c, a.y + b.offsetX, e), c += d.offsetY, d = d.next
-  }
-  return e
-};
-mxCompactTreeLayout.prototype.attachParent = function(a, b) {
-  var c = this.nodeDistance + this.levelDistance,
-    d = (b - a.width) / 2 - this.nodeDistance,
-    e = d + a.width + 2 * this.nodeDistance - b;
-  a.child.offsetX = c + a.height;
-  a.child.offsetY = e;
-  a.contour.upperHead = this.createLine(a.height, 0, this.createLine(c, e, a.contour.upperHead));
-  a.contour.lowerHead = this.createLine(a.height, 0, this.createLine(c, d, a.contour.lowerHead))
-};
-mxCompactTreeLayout.prototype.layoutLeaf = function(a) {
-  var b = 2 * this.nodeDistance;
-  a.contour.upperTail = this.createLine(a.height + b, 0);
-  a.contour.upperHead = a.contour.upperTail;
-  a.contour.lowerTail = this.createLine(0, -a.width - b);
-  a.contour.lowerHead = this.createLine(a.height + b, 0, a.contour.lowerTail)
-};
-mxCompactTreeLayout.prototype.join = function(a) {
-  var b = 2 * this.nodeDistance,
-    c = a.child;
-  a.contour = c.contour;
-  for (var d = c.width + b, e = d, c = c.next; null != c;) {
-    var f = this.merge(a.contour, c.contour);
-    c.offsetY = f + d;
-    c.offsetX = 0;
-    d = c.width + b;
-    e += f + d;
-    c = c.next
-  }
-  return e
-};
-mxCompactTreeLayout.prototype.merge = function(a, b) {
-  for (var c = 0, d = 0, e = 0, f = a.lowerHead, g = b.upperHead; null != g && null != f;) {
-    var h = this.offset(c, d, g.dx, g.dy, f.dx, f.dy),
-      d = d + h,
-      e = e + h;
-    c + g.dx <= f.dx ? (c += g.dx, d += g.dy, g = g.next) : (c -= f.dx, d -= f.dy, f = f.next)
-  }
-  null != g ? (c = this.bridge(a.upperTail, 0, 0, g, c, d), a.upperTail = null != c.next ? b.upperTail : c, a.lowerTail = b.lowerTail) : (c = this.bridge(b.lowerTail, c, d, f, 0, 0), null == c.next &&
-    (a.lowerTail = c));
-  a.lowerHead = b.lowerHead;
-  return e
-};
-mxCompactTreeLayout.prototype.offset = function(a, b, c, d, e, f) {
-  var g = 0;
-  if (e <= a || 0 >= a + c) return 0;
-  g = 0 < e * d - c * f ? 0 > a ? a * d / c - b : 0 < a ? a * f / e - b : -b : e < a + c ? f - (b + (e - a) * d / c) : e > a + c ? (c + a) * f / e - (b + d) : f - (b + d);
-  return 0 < g ? g : 0
-};
-mxCompactTreeLayout.prototype.bridge = function(a, b, c, d, e, f) {
-  b = e + d.dx - b;
-  e = e = 0;
-  0 == d.dx ? e = d.dy : (e = b * d.dy, e /= d.dx);
-  b = this.createLine(b, e, d.next);
-  a.next = this.createLine(0, f + d.dy - e - c, b);
-  return b
-};
-mxCompactTreeLayout.prototype.createNode = function(a) {
-  var b = {};
-  b.cell = a;
-  b.x = 0;
-  b.y = 0;
-  b.width = 0;
-  b.height = 0;
-  a = this.getVertexBounds(a);
-  null != a && (this.isHorizontal() ? (b.width = a.height, b.height = a.width) : (b.width = a.width, b.height = a.height));
-  b.offsetX = 0;
-  b.offsetY = 0;
-  b.contour = {};
-  return b
-};
-mxCompactTreeLayout.prototype.apply = function(a, b) {
-  var c = this.graph.getModel(),
-    d = a.cell,
-    e = c.getGeometry(d);
-  null != d && null != e && (this.isVertexMovable(d) && (e = this.setVertexLocation(d, a.x, a.y), this.resizeParent && (c = c.getParent(d), d = mxCellPath.create(c), null == this.parentsChanged[d] &&
-    (this.parentsChanged[d] = c))), b = null == b ? new mxRectangle(e.x, e.y, e.width, e.height) : new mxRectangle(Math.min(b.x, e.x), Math.min(b.y, e.y), Math.max(b.x + b.width, e.x + e.width),
-    Math.max(b.y + b.height, e.y + e.height)));
-  return b
-};
-mxCompactTreeLayout.prototype.createLine = function(a, b, c) {
-  var d = {};
-  d.dx = a;
-  d.dy = b;
-  d.next = c;
-  return d
-};
-mxCompactTreeLayout.prototype.adjustParents = function() {
-  var a = [],
-    b;
-  for (b in this.parentsChanged) a.push(this.parentsChanged[b]);
-  this.arrangeGroups(mxUtils.sortCells(a, !0), this.groupPadding)
-};
-mxCompactTreeLayout.prototype.localEdgeProcessing = function(a) {
-  this.processNodeOutgoing(a);
-  for (a = a.child; null != a;) this.localEdgeProcessing(a), a = a.next
-};
-mxCompactTreeLayout.prototype.processNodeOutgoing = function(a) {
-  for (var b = a.child, c = a.cell, d = 0, e = []; null != b;) {
-    d++;
-    var f = b.x;
-    this.horizontal && (f = b.y);
-    e.push(new WeightedCellSorter(b, f));
-    b = b.next
-  }
-  e.sort(WeightedCellSorter.prototype.compare);
-  var f = a.width,
-    g = (d + 1) * this.prefHozEdgeSep;
-  f > g + 2 * this.prefHozEdgeSep && (f -= 2 * this.prefHozEdgeSep);
-  a = f / d;
-  b = a / 2;
-  f > g + 2 * this.prefHozEdgeSep && (b += this.prefHozEdgeSep);
-  for (var f = this.minEdgeJetty - this.prefVertEdgeOff, g = 0, h = this.getVertexBounds(c), k = 0; k < e.length; k++) {
-    for (var l =
-        e[k].cell.cell, m = this.getVertexBounds(l), l = this.graph.getEdgesBetween(c, l, !1), n = [], p = 0, q = 0, s = 0; s < l.length; s++) this.horizontal ? (p = h.x + h.width, q = h.y + b, n.push(
-      new mxPoint(p, q)), p = h.x + h.width + f, n.push(new mxPoint(p, q)), q = m.y + m.height / 2) : (p = h.x + b, q = h.y + h.height, n.push(new mxPoint(p, q)), q = h.y + h.height + f, n.push(
-      new mxPoint(p, q)), p = m.x + m.width / 2), n.push(new mxPoint(p, q)), this.setEdgePoints(l[s], n);
-    k < d / 2 ? f += this.prefVertEdgeOff : k > d / 2 && (f -= this.prefVertEdgeOff);
-    b += a;
-    g = Math.max(g, f)
-  }
-};
-
-function WeightedCellSorter(a, b) {
-  this.cell = a;
-  this.weightedValue = b
-}
-WeightedCellSorter.prototype.weightedValue = 0;
-WeightedCellSorter.prototype.nudge = !1;
-WeightedCellSorter.prototype.visited = !1;
-WeightedCellSorter.prototype.rankIndex = null;
-WeightedCellSorter.prototype.cell = null;
-WeightedCellSorter.prototype.compare = function(a, b) {
-  return null != a && null != b ? b.weightedValue > a.weightedValue ? 1 : b.weightedValue < a.weightedValue ? -1 : b.nudge ? 1 : -1 : 0
-};
-
-function mxFastOrganicLayout(a) {
-  mxGraphLayout.call(this, a)
-}
-mxFastOrganicLayout.prototype = new mxGraphLayout;
-mxFastOrganicLayout.prototype.constructor = mxFastOrganicLayout;
-mxFastOrganicLayout.prototype.useInputOrigin = !0;
-mxFastOrganicLayout.prototype.resetEdges = !0;
-mxFastOrganicLayout.prototype.disableEdgeStyle = !0;
-mxFastOrganicLayout.prototype.forceConstant = 50;
-mxFastOrganicLayout.prototype.forceConstantSquared = 0;
-mxFastOrganicLayout.prototype.minDistanceLimit = 2;
-mxFastOrganicLayout.prototype.maxDistanceLimit = 500;
-mxFastOrganicLayout.prototype.minDistanceLimitSquared = 4;
-mxFastOrganicLayout.prototype.initialTemp = 200;
-mxFastOrganicLayout.prototype.temperature = 0;
-mxFastOrganicLayout.prototype.maxIterations = 0;
-mxFastOrganicLayout.prototype.iteration = 0;
-mxFastOrganicLayout.prototype.allowedToRun = !0;
-mxFastOrganicLayout.prototype.isVertexIgnored = function(a) {
-  return mxGraphLayout.prototype.isVertexIgnored.apply(this, arguments) || 0 == this.graph.getConnections(a).length
-};
-mxFastOrganicLayout.prototype.execute = function(a) {
-  var b = this.graph.getModel();
-  this.vertexArray = [];
-  for (var c = this.graph.getChildVertices(a), d = 0; d < c.length; d++) this.isVertexIgnored(c[d]) || this.vertexArray.push(c[d]);
-  var e = this.useInputOrigin ? this.graph.view.getBounds(this.vertexArray) : null,
-    f = this.vertexArray.length;
-  this.indices = [];
-  this.dispX = [];
-  this.dispY = [];
-  this.cellLocation = [];
-  this.isMoveable = [];
-  this.neighbours = [];
-  this.radius = [];
-  this.radiusSquared = [];
-  0.0010 > this.forceConstant && (this.forceConstant =
-    0.0010);
-  this.forceConstantSquared = this.forceConstant * this.forceConstant;
-  for (d = 0; d < this.vertexArray.length; d++) {
-    var g = this.vertexArray[d];
-    this.cellLocation[d] = [];
-    var h = mxCellPath.create(g);
-    this.indices[h] = d;
-    var k = this.getVertexBounds(g),
-      l = k.width,
-      m = k.height,
-      n = k.x,
-      p = k.y;
-    this.cellLocation[d][0] = n + l / 2;
-    this.cellLocation[d][1] = p + m / 2;
-    this.radius[d] = Math.min(l, m);
-    this.radiusSquared[d] = this.radius[d] * this.radius[d]
-  }
-  b.beginUpdate();
-  try {
-    for (d = 0; d < f; d++) {
-      this.dispX[d] = 0;
-      this.dispY[d] = 0;
-      this.isMoveable[d] = this.isVertexMovable(this.vertexArray[d]);
-      var q = this.graph.getConnections(this.vertexArray[d], a),
-        c = this.graph.getOpposites(q, this.vertexArray[d]);
-      this.neighbours[d] = [];
-      for (l = 0; l < c.length; l++) {
-        this.resetEdges && this.graph.resetEdge(q[l]);
-        this.disableEdgeStyle && this.setEdgeStyleEnabled(q[l], !1);
-        var h = mxCellPath.create(c[l]),
-          s = this.indices[h];
-        this.neighbours[d][l] = null != s ? s : d
-      }
-    }
-    this.temperature = this.initialTemp;
-    0 == this.maxIterations && (this.maxIterations = 20 * Math.sqrt(f));
-    for (this.iteration = 0; this.iteration < this.maxIterations; this.iteration++) {
-      if (!this.allowedToRun) return;
-      this.calcRepulsion();
-      this.calcAttraction();
-      this.calcPositions();
-      this.reduceTemperature()
-    }
-    a = c = null;
-    for (d = 0; d < this.vertexArray.length; d++) g = this.vertexArray[d], this.isVertexMovable(g) && (k = this.getVertexBounds(g), null != k && (this.cellLocation[d][0] -= k.width / 2, this.cellLocation[
-        d][1] -= k.height / 2, n = this.graph.snap(this.cellLocation[d][0]), p = this.graph.snap(this.cellLocation[d][1]), this.setVertexLocation(g, n, p), c = null == c ? n : Math.min(c, n), a =
-      null == a ? p : Math.min(a, p)));
-    d = -(c || 0) + 1;
-    g = -(a || 0) + 1;
-    null != e && (d += e.x,
-      g += e.y);
-    this.graph.moveCells(this.vertexArray, d, g)
-  } finally {
-    b.endUpdate()
-  }
-};
-mxFastOrganicLayout.prototype.calcPositions = function() {
-  for (var a = 0; a < this.vertexArray.length; a++)
-    if (this.isMoveable[a]) {
-      var b = Math.sqrt(this.dispX[a] * this.dispX[a] + this.dispY[a] * this.dispY[a]);
-      0.0010 > b && (b = 0.0010);
-      var c = this.dispX[a] / b * Math.min(b, this.temperature),
-        b = this.dispY[a] / b * Math.min(b, this.temperature);
-      this.dispX[a] = 0;
-      this.dispY[a] = 0;
-      this.cellLocation[a][0] += c;
-      this.cellLocation[a][1] += b
-    }
-};
-mxFastOrganicLayout.prototype.calcAttraction = function() {
-  for (var a = 0; a < this.vertexArray.length; a++)
-    for (var b = 0; b < this.neighbours[a].length; b++) {
-      var c = this.neighbours[a][b];
-      if (a != c && this.isMoveable[a] && this.isMoveable[c]) {
-        var d = this.cellLocation[a][0] - this.cellLocation[c][0],
-          e = this.cellLocation[a][1] - this.cellLocation[c][1],
-          f = d * d + e * e - this.radiusSquared[a] - this.radiusSquared[c];
-        f < this.minDistanceLimitSquared && (f = this.minDistanceLimitSquared);
-        var g = Math.sqrt(f),
-          f = f / this.forceConstant,
-          d = d / g * f,
-          e = e / g * f;
-        this.dispX[a] -= d;
-        this.dispY[a] -= e;
-        this.dispX[c] += d;
-        this.dispY[c] += e
-      }
-    }
-};
-mxFastOrganicLayout.prototype.calcRepulsion = function() {
-  for (var a = this.vertexArray.length, b = 0; b < a; b++)
-    for (var c = b; c < a; c++) {
-      if (!this.allowedToRun) return;
-      if (c != b && this.isMoveable[b] && this.isMoveable[c]) {
-        var d = this.cellLocation[b][0] - this.cellLocation[c][0],
-          e = this.cellLocation[b][1] - this.cellLocation[c][1];
-        0 == d && (d = 0.01 + Math.random());
-        0 == e && (e = 0.01 + Math.random());
-        var f = Math.sqrt(d * d + e * e),
-          g = f - this.radius[b] - this.radius[c];
-        g > this.maxDistanceLimit || (g < this.minDistanceLimit && (g = this.minDistanceLimit), g = this.forceConstantSquared /
-          g, d = d / f * g, e = e / f * g, this.dispX[b] += d, this.dispY[b] += e, this.dispX[c] -= d, this.dispY[c] -= e)
-      }
-    }
-};
-mxFastOrganicLayout.prototype.reduceTemperature = function() {
-  this.temperature = this.initialTemp * (1 - this.iteration / this.maxIterations)
-};
-
-function mxCircleLayout(a, b) {
-  mxGraphLayout.call(this, a);
-  this.radius = null != b ? b : 100
-}
-mxCircleLayout.prototype = new mxGraphLayout;
-mxCircleLayout.prototype.constructor = mxCircleLayout;
-mxCircleLayout.prototype.radius = null;
-mxCircleLayout.prototype.moveCircle = !1;
-mxCircleLayout.prototype.x0 = 0;
-mxCircleLayout.prototype.y0 = 0;
-mxCircleLayout.prototype.resetEdges = !0;
-mxCircleLayout.prototype.disableEdgeStyle = !0;
-mxCircleLayout.prototype.execute = function(a) {
-  var b = this.graph.getModel();
-  b.beginUpdate();
-  try {
-    for (var c = 0, d = null, e = null, f = [], g = b.getChildCount(a), h = 0; h < g; h++) {
-      var k = b.getChildAt(a, h);
-      if (this.isVertexIgnored(k)) this.isEdgeIgnored(k) || (this.resetEdges && this.graph.resetEdge(k), this.disableEdgeStyle && this.setEdgeStyleEnabled(k, !1));
-      else {
-        f.push(k);
-        var l = this.getVertexBounds(k),
-          d = null == d ? l.y : Math.min(d, l.y),
-          e = null == e ? l.x : Math.min(e, l.x),
-          c = Math.max(c, Math.max(l.width, l.height))
-      }
-    }
-    var m = this.getRadius(f.length,
-      c);
-    this.moveCircle && (e = this.x0, d = this.y0);
-    this.circle(f, m, e, d)
-  } finally {
-    b.endUpdate()
-  }
-};
-mxCircleLayout.prototype.getRadius = function(a, b) {
-  return Math.max(a * b / Math.PI, this.radius)
-};
-mxCircleLayout.prototype.circle = function(a, b, c, d) {
-  for (var e = a.length, f = 2 * Math.PI / e, g = 0; g < e; g++) this.isVertexMovable(a[g]) && this.setVertexLocation(a[g], c + b + b * Math.sin(g * f), d + b + b * Math.cos(g * f))
-};
-
-function mxParallelEdgeLayout(a) {
-  mxGraphLayout.call(this, a)
-}
-mxParallelEdgeLayout.prototype = new mxGraphLayout;
-mxParallelEdgeLayout.prototype.constructor = mxParallelEdgeLayout;
-mxParallelEdgeLayout.prototype.spacing = 20;
-mxParallelEdgeLayout.prototype.execute = function(a) {
-  a = this.findParallels(a);
-  this.graph.model.beginUpdate();
-  try {
-    for (var b in a) {
-      var c = a[b];
-      1 < c.length && this.layout(c)
-    }
-  } finally {
-    this.graph.model.endUpdate()
-  }
-};
-mxParallelEdgeLayout.prototype.findParallels = function(a) {
-  for (var b = this.graph.getModel(), c = [], d = b.getChildCount(a), e = 0; e < d; e++) {
-    var f = b.getChildAt(a, e);
-    if (!this.isEdgeIgnored(f)) {
-      var g = this.getEdgeId(f);
-      null != g && (null == c[g] && (c[g] = []), c[g].push(f))
-    }
-  }
-  return c
-};
-mxParallelEdgeLayout.prototype.getEdgeId = function(a) {
-  var b = this.graph.getView(),
-    c = b.getState(a),
-    d = null != c ? c.getVisibleTerminal(!0) : b.getVisibleTerminal(a, !0);
-  a = null != c ? c.getVisibleTerminal(!1) : b.getVisibleTerminal(a, !1);
-  return null != d && null != a ? (d = mxCellPath.create(d), a = mxCellPath.create(a), d > a ? a + "-" + d : d + "-" + a) : null
-};
-mxParallelEdgeLayout.prototype.layout = function(a) {
-  var b = a[0],
-    c = this.graph.getModel(),
-    d = c.getGeometry(c.getTerminal(b, !0)),
-    e = c.getGeometry(c.getTerminal(b, !1));
-  if (d == e)
-    for (var b = d.x + d.width + this.spacing, c = d.y + d.height / 2, f = 0; f < a.length; f++) this.route(a[f], b, c), b += this.spacing;
-  else if (null != d && null != e)
-    for (var b = d.x + d.width / 2, c = d.y + d.height / 2, f = e.x + e.width / 2 - b, g = e.y + e.height / 2 - c, e = Math.sqrt(f * f + g * g), d = g * this.spacing / e, e = f * this.spacing / e,
-        b = b + f / 2 + d * (a.length - 1) / 2, c = c + g / 2 - e * (a.length - 1) / 2, f = 0; f < a.length; f++) this.route(a[f],
-      b, c), b -= d, c += e
-};
-mxParallelEdgeLayout.prototype.route = function(a, b, c) {
-  this.graph.isCellMovable(a) && this.setEdgePoints(a, [new mxPoint(b, c)])
-};
-
-function mxCompositeLayout(a, b, c) {
-  mxGraphLayout.call(this, a);
-  this.layouts = b;
-  this.master = c
-}
-mxCompositeLayout.prototype = new mxGraphLayout;
-mxCompositeLayout.prototype.constructor = mxCompositeLayout;
-mxCompositeLayout.prototype.layouts = null;
-mxCompositeLayout.prototype.master = null;
-mxCompositeLayout.prototype.moveCell = function(a, b, c) {
-  null != this.master ? this.master.move.apply(this.master, arguments) : this.layouts[0].move.apply(this.layouts[0], arguments)
-};
-mxCompositeLayout.prototype.execute = function(a) {
-  var b = this.graph.getModel();
-  b.beginUpdate();
-  try {
-    for (var c = 0; c < this.layouts.length; c++) this.layouts[c].execute.apply(this.layouts[c], arguments)
-  } finally {
-    b.endUpdate()
-  }
-};
-
-function mxEdgeLabelLayout(a, b) {
-  mxGraphLayout.call(this, a)
-}
-mxEdgeLabelLayout.prototype = new mxGraphLayout;
-mxEdgeLabelLayout.prototype.constructor = mxEdgeLabelLayout;
-mxEdgeLabelLayout.prototype.execute = function(a) {
-  for (var b = this.graph.view, c = this.graph.getModel(), d = [], e = [], f = c.getChildCount(a), g = 0; g < f; g++) {
-    var h = c.getChildAt(a, g),
-      k = b.getState(h);
-    null != k && (this.isVertexIgnored(h) ? this.isEdgeIgnored(h) || d.push(k) : e.push(k))
-  }
-  this.placeLabels(e, d)
-};
-mxEdgeLabelLayout.prototype.placeLabels = function(a, b) {
-  var c = this.graph.getModel();
-  c.beginUpdate();
-  try {
-    for (var d = 0; d < b.length; d++) {
-      var e = b[d];
-      if (null != e && null != e.text && null != e.text.boundingBox)
-        for (var f = 0; f < a.length; f++) {
-          var g = a[f];
-          null != g && this.avoid(e, g)
-        }
-    }
-  } finally {
-    c.endUpdate()
-  }
-};
-mxEdgeLabelLayout.prototype.avoid = function(a, b) {
-  var c = this.graph.getModel(),
-    d = a.text.boundingBox;
-  if (mxUtils.intersects(d, b)) {
-    var e = -d.y - d.height + b.y,
-      f = -d.y + b.y + b.height,
-      e = Math.abs(e) < Math.abs(f) ? e : f,
-      f = -d.x - d.width + b.x,
-      d = -d.x + b.x + b.width,
-      d = Math.abs(f) < Math.abs(d) ? f : d;
-    Math.abs(d) < Math.abs(e) ? e = 0 : d = 0;
-    f = c.getGeometry(a.cell);
-    null != f && (f = f.clone(), null != f.offset ? (f.offset.x += d, f.offset.y += e) : f.offset = new mxPoint(d, e), c.setGeometry(a.cell, f))
-  }
-};
-
-function mxGraphAbstractHierarchyCell() {
-  this.x = [];
-  this.y = [];
-  this.temp = []
-}
-mxGraphAbstractHierarchyCell.prototype.maxRank = -1;
-mxGraphAbstractHierarchyCell.prototype.minRank = -1;
-mxGraphAbstractHierarchyCell.prototype.x = null;
-mxGraphAbstractHierarchyCell.prototype.y = null;
-mxGraphAbstractHierarchyCell.prototype.width = 0;
-mxGraphAbstractHierarchyCell.prototype.height = 0;
-mxGraphAbstractHierarchyCell.prototype.nextLayerConnectedCells = null;
-mxGraphAbstractHierarchyCell.prototype.previousLayerConnectedCells = null;
-mxGraphAbstractHierarchyCell.prototype.temp = null;
-mxGraphAbstractHierarchyCell.prototype.getNextLayerConnectedCells = function(a) {
-  return null
-};
-mxGraphAbstractHierarchyCell.prototype.getPreviousLayerConnectedCells = function(a) {
-  return null
-};
-mxGraphAbstractHierarchyCell.prototype.isEdge = function() {
-  return !1
-};
-mxGraphAbstractHierarchyCell.prototype.isVertex = function() {
-  return !1
-};
-mxGraphAbstractHierarchyCell.prototype.getGeneralPurposeVariable = function(a) {
-  return null
-};
-mxGraphAbstractHierarchyCell.prototype.setGeneralPurposeVariable = function(a, b) {
-  return null
-};
-mxGraphAbstractHierarchyCell.prototype.setX = function(a, b) {
-  this.isVertex() ? this.x[0] = b : this.isEdge() && (this.x[a - this.minRank - 1] = b)
-};
-mxGraphAbstractHierarchyCell.prototype.getX = function(a) {
-  return this.isVertex() ? this.x[0] : this.isEdge() ? this.x[a - this.minRank - 1] : 0
-};
-mxGraphAbstractHierarchyCell.prototype.setY = function(a, b) {
-  this.isVertex() ? this.y[0] = b : this.isEdge() && (this.y[a - this.minRank - 1] = b)
-};
-
-function mxGraphHierarchyNode(a) {
-  mxGraphAbstractHierarchyCell.apply(this, arguments);
-  this.cell = a
-}
-mxGraphHierarchyNode.prototype = new mxGraphAbstractHierarchyCell;
-mxGraphHierarchyNode.prototype.constructor = mxGraphHierarchyNode;
-mxGraphHierarchyNode.prototype.cell = null;
-mxGraphHierarchyNode.prototype.connectsAsTarget = [];
-mxGraphHierarchyNode.prototype.connectsAsSource = [];
-mxGraphHierarchyNode.prototype.hashCode = !1;
-mxGraphHierarchyNode.prototype.getRankValue = function(a) {
-  return this.maxRank
-};
-mxGraphHierarchyNode.prototype.getNextLayerConnectedCells = function(a) {
-  if (null == this.nextLayerConnectedCells) {
-    this.nextLayerConnectedCells = [];
-    this.nextLayerConnectedCells[0] = [];
-    for (var b = 0; b < this.connectsAsTarget.length; b++) {
-      var c = this.connectsAsTarget[b]; - 1 == c.maxRank || c.maxRank == a + 1 ? this.nextLayerConnectedCells[0].push(c.source) : this.nextLayerConnectedCells[0].push(c)
-    }
-  }
-  return this.nextLayerConnectedCells[0]
-};
-mxGraphHierarchyNode.prototype.getPreviousLayerConnectedCells = function(a) {
-  if (null == this.previousLayerConnectedCells) {
-    this.previousLayerConnectedCells = [];
-    this.previousLayerConnectedCells[0] = [];
-    for (var b = 0; b < this.connectsAsSource.length; b++) {
-      var c = this.connectsAsSource[b]; - 1 == c.minRank || c.minRank == a - 1 ? this.previousLayerConnectedCells[0].push(c.target) : this.previousLayerConnectedCells[0].push(c)
-    }
-  }
-  return this.previousLayerConnectedCells[0]
-};
-mxGraphHierarchyNode.prototype.isVertex = function() {
-  return !0
-};
-mxGraphHierarchyNode.prototype.getGeneralPurposeVariable = function(a) {
-  return this.temp[0]
-};
-mxGraphHierarchyNode.prototype.setGeneralPurposeVariable = function(a, b) {
-  this.temp[0] = b
-};
-mxGraphHierarchyNode.prototype.isAncestor = function(a) {
-  if (null != a && null != this.hashCode && null != a.hashCode && this.hashCode.length < a.hashCode.length) {
-    if (this.hashCode == a.hashCode) return !0;
-    if (null == this.hashCode || null == this.hashCode) return !1;
-    for (var b = 0; b < this.hashCode.length; b++)
-      if (this.hashCode[b] != a.hashCode[b]) return !1;
-    return !0
-  }
-  return !1
-};
-mxGraphHierarchyNode.prototype.getCoreCell = function() {
-  return this.cell
-};
-
-function mxGraphHierarchyEdge(a) {
-  mxGraphAbstractHierarchyCell.apply(this, arguments);
-  this.edges = a
-}
-mxGraphHierarchyEdge.prototype = new mxGraphAbstractHierarchyCell;
-mxGraphHierarchyEdge.prototype.constructor = mxGraphHierarchyEdge;
-mxGraphHierarchyEdge.prototype.edges = null;
-mxGraphHierarchyEdge.prototype.source = null;
-mxGraphHierarchyEdge.prototype.target = null;
-mxGraphHierarchyEdge.prototype.isReversed = !1;
-mxGraphHierarchyEdge.prototype.invert = function(a) {
-  a = this.source;
-  this.source = this.target;
-  this.target = a;
-  this.isReversed = !this.isReversed
-};
-mxGraphHierarchyEdge.prototype.getNextLayerConnectedCells = function(a) {
-  if (null == this.nextLayerConnectedCells) {
-    this.nextLayerConnectedCells = [];
-    for (var b = 0; b < this.temp.length; b++) this.nextLayerConnectedCells[b] = [], b == this.temp.length - 1 ? this.nextLayerConnectedCells[b].push(this.source) : this.nextLayerConnectedCells[b].push(
-      this)
-  }
-  return this.nextLayerConnectedCells[a - this.minRank - 1]
-};
-mxGraphHierarchyEdge.prototype.getPreviousLayerConnectedCells = function(a) {
-  if (null == this.previousLayerConnectedCells) {
-    this.previousLayerConnectedCells = [];
-    for (var b = 0; b < this.temp.length; b++) this.previousLayerConnectedCells[b] = [], 0 == b ? this.previousLayerConnectedCells[b].push(this.target) : this.previousLayerConnectedCells[b].push(
-      this)
-  }
-  return this.previousLayerConnectedCells[a - this.minRank - 1]
-};
-mxGraphHierarchyEdge.prototype.isEdge = function() {
-  return !0
-};
-mxGraphHierarchyEdge.prototype.getGeneralPurposeVariable = function(a) {
-  return this.temp[a - this.minRank - 1]
-};
-mxGraphHierarchyEdge.prototype.setGeneralPurposeVariable = function(a, b) {
-  this.temp[a - this.minRank - 1] = b
-};
-mxGraphHierarchyEdge.prototype.getCoreCell = function() {
-  return null != this.edges && 0 < this.edges.length ? this.edges[0] : null
-};
-
-function mxGraphHierarchyModel(a, b, c, d, e) {
-  a.getGraph();
-  this.tightenToSource = e;
-  this.roots = c;
-  this.parent = d;
-  this.vertexMapper = {};
-  this.edgeMapper = {};
-  this.maxRank = 0;
-  c = [];
-  null == b && (b = this.graph.getChildVertices(d));
-  this.maxRank = this.SOURCESCANSTARTRANK;
-  this.createInternalCells(a, b, c);
-  for (d = 0; d < b.length; d++) {
-    e = c[d].connectsAsSource;
-    for (var f = 0; f < e.length; f++) {
-      var g = e[f],
-        h = g.edges;
-      if (null != h && 0 < h.length) {
-        var h = h[0],
-          k = a.getVisibleTerminal(h, !1),
-          k = mxCellPath.create(k),
-          k = this.vertexMapper[k];
-        c[d] == k && (k = a.getVisibleTerminal(h, !0), k = mxCellPath.create(k), k = this.vertexMapper[k]);
-        null != k && c[d] != k && (g.target = k, 0 == k.connectsAsTarget.length && (k.connectsAsTarget = []), 0 > mxUtils.indexOf(k.connectsAsTarget, g) && k.connectsAsTarget.push(g))
-      }
-    }
-    c[d].temp[0] = 1
-  }
-}
-mxGraphHierarchyModel.prototype.maxRank = null;
-mxGraphHierarchyModel.prototype.vertexMapper = null;
-mxGraphHierarchyModel.prototype.edgeMapper = null;
-mxGraphHierarchyModel.prototype.ranks = null;
-mxGraphHierarchyModel.prototype.roots = null;
-mxGraphHierarchyModel.prototype.parent = null;
-mxGraphHierarchyModel.prototype.dfsCount = 0;
-mxGraphHierarchyModel.prototype.SOURCESCANSTARTRANK = 1E8;
-mxGraphHierarchyModel.prototype.tightenToSource = !1;
-mxGraphHierarchyModel.prototype.createInternalCells = function(a, b, c) {
-  for (var d = a.getGraph(), e = 0; e < b.length; e++) {
-    c[e] = new mxGraphHierarchyNode(b[e]);
-    var f = mxCellPath.create(b[e]);
-    this.vertexMapper[f] = c[e];
-    f = a.getEdges(b[e]);
-    c[e].connectsAsSource = [];
-    for (var g = 0; g < f.length; g++) {
-      var h = a.getVisibleTerminal(f[g], !1);
-      if (h != b[e] && h != b[e] && a.graph.model.isVertex(h) && !a.isVertexIgnored(h)) {
-        var k = a.getEdgesBetween(b[e], h, !1),
-          l = a.getEdgesBetween(b[e], h, !0),
-          h = mxCellPath.create(k[0]);
-        if (null != k && 0 < k.length && null ==
-          this.edgeMapper[h] && 2 * l.length >= k.length) {
-          for (var l = new mxGraphHierarchyEdge(k), m = 0; m < k.length; m++) {
-            var n = k[m],
-              h = mxCellPath.create(n);
-            this.edgeMapper[h] = l;
-            d.resetEdge(n);
-            a.disableEdgeStyle && (a.setEdgeStyleEnabled(n, !1), a.setOrthogonalEdge(n, !0))
-          }
-          l.source = c[e];
-          0 > mxUtils.indexOf(c[e].connectsAsSource, l) && c[e].connectsAsSource.push(l)
-        }
-      }
-    }
-    c[e].temp[0] = 0
-  }
-};
-mxGraphHierarchyModel.prototype.initialRank = function() {
-  var a = [];
-  if (null != this.roots)
-    for (var b = 0; b < this.roots.length; b++) {
-      var c = mxCellPath.create(this.roots[b]),
-        c = this.vertexMapper[c];
-      null != c && a.push(c)
-    }
-  for (var d in this.vertexMapper) c = this.vertexMapper[d], c.temp[0] = -1;
-  for (var e = a.slice(); 0 < a.length;) {
-    var c = a[0],
-      f, g;
-    f = c.connectsAsTarget;
-    g = c.connectsAsSource;
-    for (var h = !0, k = this.SOURCESCANSTARTRANK, b = 0; b < f.length; b++) {
-      var l = f[b];
-      if (5270620 == l.temp[0]) l = l.source, k = Math.min(k, l.temp[0] - 1);
-      else {
-        h = !1;
-        break
-      }
-    }
-    if (h) {
-      c.temp[0] =
-        k;
-      this.maxRank = Math.min(this.maxRank, k);
-      if (null != g)
-        for (b = 0; b < g.length; b++) l = g[b], l.temp[0] = 5270620, l = l.target, -1 == l.temp[0] && (a.push(l), l.temp[0] = -2);
-      a.shift()
-    } else if (b = a.shift(), a.push(c), b == c && 1 == a.length) break
-  }
-  for (d in this.vertexMapper) c = this.vertexMapper[d], c.temp[0] -= this.maxRank;
-  for (b = 0; b < e.length; b++) {
-    c = e[b];
-    a = 0;
-    f = c.connectsAsSource;
-    for (d = 0; d < f.length; d++) l = f[d], l = l.target, c.temp[0] = Math.max(a, l.temp[0] + 1), a = c.temp[0]
-  }
-  this.maxRank = this.SOURCESCANSTARTRANK - this.maxRank
-};
-mxGraphHierarchyModel.prototype.fixRanks = function() {
-  var a = [];
-  this.ranks = [];
-  for (var b = 0; b < this.maxRank + 1; b++) a[b] = [], this.ranks[b] = a[b];
-  var c = null;
-  if (null != this.roots)
-    for (var d = this.roots, c = [], b = 0; b < d.length; b++) {
-      var e = mxCellPath.create(d[b]);
-      c[b] = this.vertexMapper[e]
-    }
-  this.visit(function(b, c, d, e, l) {
-    0 == l && (0 > c.maxRank && 0 > c.minRank) && (a[c.temp[0]].push(c), c.maxRank = c.temp[0], c.minRank = c.temp[0], c.temp[0] = a[c.maxRank].length - 1);
-    if (null != b && null != d && 1 < b.maxRank - c.maxRank) {
-      d.maxRank = b.maxRank;
-      d.minRank =
-        c.maxRank;
-      d.temp = [];
-      d.x = [];
-      d.y = [];
-      for (b = d.minRank + 1; b < d.maxRank; b++) a[b].push(d), d.setGeneralPurposeVariable(b, a[b].length - 1)
-    }
-  }, c, !1, null)
-};
-mxGraphHierarchyModel.prototype.visit = function(a, b, c, d) {
-  if (null != b) {
-    for (var e = 0; e < b.length; e++) {
-      var f = b[e];
-      null != f && (null == d && (d = {}), c ? (f.hashCode = [], f.hashCode[0] = this.dfsCount, f.hashCode[1] = e, this.extendedDfs(null, f, null, a, d, f.hashCode, e, 0)) : this.dfs(null, f, null,
-        a, d, 0))
-    }
-    this.dfsCount++
-  }
-};
-mxGraphHierarchyModel.prototype.dfs = function(a, b, c, d, e, f) {
-  if (null != b) {
-    var g = mxCellPath.create(b.cell);
-    if (null == e[g]) {
-      e[g] = b;
-      d(a, b, c, f, 0);
-      a = b.connectsAsSource.slice();
-      for (c = 0; c < a.length; c++) g = a[c], this.dfs(b, g.target, g, d, e, f + 1)
-    } else d(a, b, c, f, 1)
-  }
-};
-mxGraphHierarchyModel.prototype.extendedDfs = function(a, b, c, d, e, f, g, h) {
-  if (null != b) {
-    if (null != a && (null == b.hashCode || b.hashCode[0] != a.hashCode[0])) f = a.hashCode.length + 1, b.hashCode = a.hashCode.slice(), b.hashCode[f - 1] = g;
-    g = mxCellPath.create(b.cell);
-    if (null == e[g]) {
-      e[g] = b;
-      d(a, b, c, h, 0);
-      a = b.connectsAsSource.slice();
-      for (c = 0; c < a.length; c++) g = a[c], this.extendedDfs(b, g.target, g, d, e, b.hashCode, c, h + 1)
-    } else d(a, b, c, h, 1)
-  }
-};
-
-function mxHierarchicalLayoutStage() {}
-mxHierarchicalLayoutStage.prototype.execute = function(a) {};
-
-function mxMedianHybridCrossingReduction(a) {
-  this.layout = a
-}
-mxMedianHybridCrossingReduction.prototype = new mxHierarchicalLayoutStage;
-mxMedianHybridCrossingReduction.prototype.constructor = mxMedianHybridCrossingReduction;
-mxMedianHybridCrossingReduction.prototype.layout = null;
-mxMedianHybridCrossingReduction.prototype.maxIterations = 24;
-mxMedianHybridCrossingReduction.prototype.nestedBestRanks = null;
-mxMedianHybridCrossingReduction.prototype.currentBestCrossings = 0;
-mxMedianHybridCrossingReduction.prototype.iterationsWithoutImprovement = 0;
-mxMedianHybridCrossingReduction.prototype.maxNoImprovementIterations = 2;
-mxMedianHybridCrossingReduction.prototype.execute = function(a) {
-  a = this.layout.getModel();
-  this.nestedBestRanks = [];
-  for (var b = 0; b < a.ranks.length; b++) this.nestedBestRanks[b] = a.ranks[b].slice();
-  for (var c = 0, d = this.calculateCrossings(a), b = 0; b < this.maxIterations && c < this.maxNoImprovementIterations; b++) {
-    this.weightedMedian(b, a);
-    this.transpose(b, a);
-    var e = this.calculateCrossings(a);
-    if (e < d) {
-      d = e;
-      for (e = c = 0; e < this.nestedBestRanks.length; e++)
-        for (var f = a.ranks[e], g = 0; g < f.length; g++) {
-          var h = f[g];
-          this.nestedBestRanks[e][h.getGeneralPurposeVariable(e)] =
-            h
-        }
-    } else {
-      c++;
-      for (e = 0; e < this.nestedBestRanks.length; e++) {
-        f = a.ranks[e];
-        for (g = 0; g < f.length; g++) h = f[g], h.setGeneralPurposeVariable(e, g)
-      }
-    }
-    if (0 == d) break
-  }
-  c = [];
-  d = [];
-  for (b = 0; b < a.maxRank + 1; b++) d[b] = [], c[b] = d[b];
-  for (b = 0; b < this.nestedBestRanks.length; b++)
-    for (e = 0; e < this.nestedBestRanks[b].length; e++) d[b].push(this.nestedBestRanks[b][e]);
-  a.ranks = c
-};
-mxMedianHybridCrossingReduction.prototype.calculateCrossings = function(a) {
-  for (var b = a.ranks.length, c = 0, d = 1; d < b; d++) c += this.calculateRankCrossing(d, a);
-  return c
-};
-mxMedianHybridCrossingReduction.prototype.calculateRankCrossing = function(a, b) {
-  for (var c = 0, d = b.ranks[a], e = d.length, f = b.ranks[a - 1].length, g = [], h = 0; h < e; h++) g[h] = [];
-  for (h = 0; h < d.length; h++)
-    for (var k = d[h], l = k.getGeneralPurposeVariable(a), m = k.getPreviousLayerConnectedCells(a), k = 0; k < m.length; k++) {
-      var n = m[k].getGeneralPurposeVariable(a - 1);
-      g[l][n] = 201207
-    }
-  for (h = 0; h < e; h++)
-    for (k = 0; k < f; k++)
-      if (201207 == g[h][k]) {
-        for (d = h + 1; d < e; d++)
-          for (l = 0; l < k; l++) 201207 == g[d][l] && c++;
-        for (d = 0; d < h; d++)
-          for (l = k + 1; l < f; l++) 201207 == g[d][l] &&
-            c++
-      }
-  return c / 2
-};
-mxMedianHybridCrossingReduction.prototype.transpose = function(a, b) {
-  for (var c = !0, d = 0; c && 10 > d++;)
-    for (var e = 1 == a % 2 && 1 == d % 2, c = !1, f = 0; f < b.ranks.length; f++) {
-      for (var g = b.ranks[f], h = [], k = 0; k < g.length; k++) {
-        var l = g[k],
-          m = l.getGeneralPurposeVariable(f);
-        0 > m && (m = k);
-        h[m] = l
-      }
-      for (var n = m = l = null, p = null, q = null, s = null, r = null, t = null, v = null, w = null, k = 0; k < g.length - 1; k++) {
-        if (0 == k) {
-          for (var v = h[k], l = v.getNextLayerConnectedCells(f), m = v.getPreviousLayerConnectedCells(f), q = [], s = [], u = 0; u < l.length; u++) q[u] = l[u].getGeneralPurposeVariable(f + 1);
-          for (u = 0; u < m.length; u++) s[u] = m[u].getGeneralPurposeVariable(f - 1)
-        } else l = n, m = p, q = r, s = t, v = w;
-        w = h[k + 1];
-        n = w.getNextLayerConnectedCells(f);
-        p = w.getPreviousLayerConnectedCells(f);
-        r = [];
-        t = [];
-        for (u = 0; u < n.length; u++) r[u] = n[u].getGeneralPurposeVariable(f + 1);
-        for (u = 0; u < p.length; u++) t[u] = p[u].getGeneralPurposeVariable(f - 1);
-        for (var y = 0, z = 0, u = 0; u < q.length; u++)
-          for (var x = 0; x < r.length; x++) q[u] > r[x] && y++, q[u] < r[x] && z++;
-        for (u = 0; u < s.length; u++)
-          for (x = 0; x < t.length; x++) s[u] > t[x] && y++, s[u] < t[x] && z++;
-        if (z < y || z == y && e) n = v.getGeneralPurposeVariable(f),
-          v.setGeneralPurposeVariable(f, w.getGeneralPurposeVariable(f)), w.setGeneralPurposeVariable(f, n), n = l, p = m, r = q, t = s, w = v, e || (c = !0)
-      }
-    }
-};
-mxMedianHybridCrossingReduction.prototype.weightedMedian = function(a, b) {
-  var c = 0 == a % 2;
-  if (c)
-    for (var d = b.maxRank - 1; 0 <= d; d--) this.medianRank(d, c);
-  else
-    for (d = 1; d < b.maxRank; d++) this.medianRank(d, c)
-};
-mxMedianHybridCrossingReduction.prototype.medianRank = function(a, b) {
-  for (var c = this.nestedBestRanks[a].length, d = [], e = [], f = 0; f < c; f++) {
-    var g = this.nestedBestRanks[a][f],
-      h = new MedianCellSorter;
-    h.cell = g;
-    var k;
-    k = b ? g.getNextLayerConnectedCells(a) : g.getPreviousLayerConnectedCells(a);
-    var l;
-    l = b ? a + 1 : a - 1;
-    null != k && 0 != k.length ? (h.medianValue = this.medianValue(k, l), d.push(h)) : e[g.getGeneralPurposeVariable(a)] = !0
-  }
-  d.sort(MedianCellSorter.prototype.compare);
-  for (f = 0; f < c; f++) null == e[f] && (g = d.shift().cell, g.setGeneralPurposeVariable(a,
-    f))
-};
-mxMedianHybridCrossingReduction.prototype.medianValue = function(a, b) {
-  for (var c = [], d = 0, e = 0; e < a.length; e++) {
-    var f = a[e];
-    c[d++] = f.getGeneralPurposeVariable(b)
-  }
-  c.sort(function(a, b) {
-    return a - b
-  });
-  if (1 == d % 2) return c[Math.floor(d / 2)];
-  if (2 == d) return (c[0] + c[1]) / 2;
-  e = d / 2;
-  f = c[e - 1] - c[0];
-  d = c[d - 1] - c[e];
-  return (c[e - 1] * d + c[e] * f) / (f + d)
-};
-
-function MedianCellSorter() {}
-MedianCellSorter.prototype.medianValue = 0;
-MedianCellSorter.prototype.cell = !1;
-MedianCellSorter.prototype.compare = function(a, b) {
-  return null != a && null != b ? b.medianValue > a.medianValue ? -1 : b.medianValue < a.medianValue ? 1 : 0 : 0
-};
-
-function mxMinimumCycleRemover(a) {
-  this.layout = a
-}
-mxMinimumCycleRemover.prototype = new mxHierarchicalLayoutStage;
-mxMinimumCycleRemover.prototype.constructor = mxMinimumCycleRemover;
-mxMinimumCycleRemover.prototype.layout = null;
-mxMinimumCycleRemover.prototype.execute = function(a) {
-  var b = this.layout.getModel(),
-    c = {},
-    d = mxUtils.clone(b.vertexMapper, null, !0),
-    e = null;
-  if (null != b.roots) {
-    var f = b.roots,
-      e = [];
-    for (a = 0; a < f.length; a++) {
-      var g = mxCellPath.create(f[a]);
-      e[a] = b.vertexMapper[g]
-    }
-  }
-  b.visit(function(a, b, e, f, g) {
-    b.isAncestor(a) && (e.invert(), mxUtils.remove(e, a.connectsAsSource), a.connectsAsTarget.push(e), mxUtils.remove(e, b.connectsAsTarget), b.connectsAsSource.push(e));
-    a = mxCellPath.create(b.cell);
-    c[a] = b;
-    delete d[a]
-  }, e, !0, null);
-  e = null;
-  0 <
-    d.lenth && (e = mxUtils.clone(d, null, !0));
-  a = mxUtils.clone(c, null, !0);
-  b.visit(function(a, b, e, f, g) {
-    b.isAncestor(a) && (e.invert(), mxUtils.remove(e, a.connectsAsSource), b.connectsAsSource.push(e), a.connectsAsTarget.push(e), mxUtils.remove(e, b.connectsAsTarget));
-    a = mxCellPath.create(b.cell);
-    c[a] = b;
-    delete d[a]
-  }, d, !0, a);
-  f = this.layout.getGraph();
-  if (null != e && 0 < e.length) {
-    b = b.roots;
-    for (a = 0; a < e.length; a++) g = e[a].cell, 0 == f.getIncomingEdges(g).length && b.push(g)
-  }
-};
-
-function mxCoordinateAssignment(a, b, c, d, e, f) {
-  this.layout = a;
-  this.intraCellSpacing = b;
-  this.interRankCellSpacing = c;
-  this.orientation = d;
-  this.initialX = e;
-  this.parallelEdgeSpacing = f
-}
-var mxHierarchicalEdgeStyle = {
-  ORTHOGONAL: 1,
-  POLYLINE: 2,
-  STRAIGHT: 3,
-  CURVE: 4
-};
-mxCoordinateAssignment.prototype = new mxHierarchicalLayoutStage;
-mxCoordinateAssignment.prototype.constructor = mxCoordinateAssignment;
-mxCoordinateAssignment.prototype.layout = null;
-mxCoordinateAssignment.prototype.intraCellSpacing = 30;
-mxCoordinateAssignment.prototype.interRankCellSpacing = 100;
-mxCoordinateAssignment.prototype.parallelEdgeSpacing = 10;
-mxCoordinateAssignment.prototype.maxIterations = 8;
-mxCoordinateAssignment.prototype.prefHozEdgeSep = 5;
-mxCoordinateAssignment.prototype.prefVertEdgeOff = 2;
-mxCoordinateAssignment.prototype.minEdgeJetty = 12;
-mxCoordinateAssignment.prototype.channelBuffer = 4;
-mxCoordinateAssignment.prototype.jettyPositions = null;
-mxCoordinateAssignment.prototype.orientation = mxConstants.DIRECTION_NORTH;
-mxCoordinateAssignment.prototype.initialX = null;
-mxCoordinateAssignment.prototype.limitX = null;
-mxCoordinateAssignment.prototype.currentXDelta = null;
-mxCoordinateAssignment.prototype.widestRank = null;
-mxCoordinateAssignment.prototype.rankTopY = null;
-mxCoordinateAssignment.prototype.rankBottomY = null;
-mxCoordinateAssignment.prototype.widestRankValue = null;
-mxCoordinateAssignment.prototype.rankWidths = null;
-mxCoordinateAssignment.prototype.rankY = null;
-mxCoordinateAssignment.prototype.fineTuning = !0;
-mxCoordinateAssignment.prototype.edgeStyle = mxHierarchicalEdgeStyle.POLYLINE;
-mxCoordinateAssignment.prototype.nextLayerConnectedCache = null;
-mxCoordinateAssignment.prototype.previousLayerConnectedCache = null;
-mxCoordinateAssignment.prototype.groupPadding = 10;
-mxCoordinateAssignment.prototype.printStatus = function() {
-  var a = this.layout.getModel();
-  mxLog.show();
-  mxLog.writeln("\x3d\x3d\x3d\x3d\x3d\x3dCoord assignment debug\x3d\x3d\x3d\x3d\x3d\x3d\x3d");
-  for (var b = 0; b < a.ranks.length; b++) {
-    mxLog.write("Rank ", b, " : ");
-    for (var c = a.ranks[b], d = 0; d < c.length; d++) mxLog.write(c[d].getGeneralPurposeVariable(b), "  ");
-    mxLog.writeln()
-  }
-  mxLog.writeln("\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d")
-};
-mxCoordinateAssignment.prototype.execute = function(a) {
-  this.jettyPositions = [];
-  a = this.layout.getModel();
-  this.currentXDelta = 0;
-  this.initialCoords(this.layout.getGraph(), a);
-  this.fineTuning && this.minNode(a);
-  var b = 1E8;
-  if (this.fineTuning)
-    for (var c = 0; c < this.maxIterations; c++) {
-      0 != c && (this.medianPos(c, a), this.minNode(a));
-      if (this.currentXDelta < b) {
-        for (var d = 0; d < a.ranks.length; d++)
-          for (var e = a.ranks[d], f = 0; f < e.length; f++) {
-            var g = e[f];
-            g.setX(d, g.getGeneralPurposeVariable(d))
-          }
-        b = this.currentXDelta
-      } else
-        for (d = 0; d < a.ranks.length; d++) {
-          e =
-            a.ranks[d];
-          for (f = 0; f < e.length; f++) g = e[f], g.setGeneralPurposeVariable(d, g.getX(d))
-        }
-      this.minPath(this.layout.getGraph(), a);
-      this.currentXDelta = 0
-    }
-  this.setCellLocations(this.layout.getGraph(), a)
-};
-mxCoordinateAssignment.prototype.minNode = function(a) {
-  for (var b = [], c = [], d = [], e = 0; e <= a.maxRank; e++) {
-    d[e] = a.ranks[e];
-    for (var f = 0; f < d[e].length; f++) {
-      var g = d[e][f],
-        h = new WeightedCellSorter(g, e);
-      h.rankIndex = f;
-      h.visited = !0;
-      b.push(h);
-      g = mxCellPath.create(g.getCoreCell());
-      c[g] = h
-    }
-  }
-  a = 10 * b.length;
-  for (f = 0; 0 < b.length && f <= a;) {
-    var h = b.shift(),
-      e = h.cell,
-      k = h.weightedValue,
-      l = parseInt(h.rankIndex),
-      g = e.getNextLayerConnectedCells(k),
-      m = e.getPreviousLayerConnectedCells(k),
-      n = g.length,
-      p = m.length,
-      q = this.medianXValue(g, k + 1),
-      s =
-      this.medianXValue(m, k - 1),
-      r = n + p,
-      t = e.getGeneralPurposeVariable(k),
-      v = t;
-    0 < r && (v = (q * n + s * p) / r);
-    n = !1;
-    v < t - 1 ? 0 == l ? (e.setGeneralPurposeVariable(k, v), n = !0) : (l = d[k][l - 1], t = l.getGeneralPurposeVariable(k), t = t + l.width / 2 + this.intraCellSpacing + e.width / 2, t < v ? (e.setGeneralPurposeVariable(
-      k, v), n = !0) : t < e.getGeneralPurposeVariable(k) - 1 && (e.setGeneralPurposeVariable(k, t), n = !0)) : v > t + 1 && (l == d[k].length - 1 ? (e.setGeneralPurposeVariable(k, v), n = !0) :
-      (l = d[k][l + 1], t = l.getGeneralPurposeVariable(k), t = t - l.width / 2 - this.intraCellSpacing -
-        e.width / 2, t > v ? (e.setGeneralPurposeVariable(k, v), n = !0) : t > e.getGeneralPurposeVariable(k) + 1 && (e.setGeneralPurposeVariable(k, t), n = !0)));
-    if (n) {
-      for (e = 0; e < g.length; e++) k = g[e], k = mxCellPath.create(k.getCoreCell()), k = c[k], null != k && !1 == k.visited && (k.visited = !0, b.push(k));
-      for (e = 0; e < m.length; e++) k = m[e], k = mxCellPath.create(k.getCoreCell()), k = c[k], null != k && !1 == k.visited && (k.visited = !0, b.push(k))
-    }
-    h.visited = !1;
-    f++
-  }
-};
-mxCoordinateAssignment.prototype.medianPos = function(a, b) {
-  if (0 == a % 2)
-    for (var c = b.maxRank; 0 < c; c--) this.rankMedianPosition(c - 1, b, c);
-  else
-    for (c = 0; c < b.maxRank - 1; c++) this.rankMedianPosition(c + 1, b, c)
-};
-mxCoordinateAssignment.prototype.rankMedianPosition = function(a, b, c) {
-  b = b.ranks[a];
-  for (var d = [], e = [], f = 0; f < b.length; f++) {
-    var g = b[f];
-    d[f] = new WeightedCellSorter;
-    d[f].cell = g;
-    d[f].rankIndex = f;
-    var h = mxCellPath.create(g.getCoreCell());
-    e[h] = d[f];
-    var k = null,
-      k = c < a ? g.getPreviousLayerConnectedCells(a) : g.getNextLayerConnectedCells(a);
-    d[f].weightedValue = this.calculatedWeightedValue(g, k)
-  }
-  d.sort(WeightedCellSorter.prototype.compare);
-  for (f = 0; f < d.length; f++) {
-    h = 0;
-    g = d[f].cell;
-    h = 0;
-    k = c < a ? g.getPreviousLayerConnectedCells(a).slice() :
-      g.getNextLayerConnectedCells(a).slice();
-    null != k && (h = k.length, h = 0 < h ? this.medianXValue(k, c) : g.getGeneralPurposeVariable(a));
-    for (var l = 0, k = -1E8, m = d[f].rankIndex - 1; 0 <= m;) {
-      var n = mxCellPath.create(b[m].getCoreCell()),
-        n = e[n];
-      if (null != n) {
-        var p = n.cell;
-        n.visited ? (k = p.getGeneralPurposeVariable(a) + p.width / 2 + this.intraCellSpacing + l + g.width / 2, m = -1) : (l += p.width + this.intraCellSpacing, m--)
-      }
-    }
-    l = 0;
-    p = 1E8;
-    for (m = d[f].rankIndex + 1; m < d.length;)
-      if (n = mxCellPath.create(b[m].getCoreCell()), n = e[n], null != n) {
-        var q = n.cell;
-        n.visited ?
-          (p = q.getGeneralPurposeVariable(a) - q.width / 2 - this.intraCellSpacing - l - g.width / 2, m = d.length) : (l += q.width + this.intraCellSpacing, m++)
-      }
-    h >= k && h <= p ? g.setGeneralPurposeVariable(a, h) : h < k ? (g.setGeneralPurposeVariable(a, k), this.currentXDelta += k - h) : h > p && (g.setGeneralPurposeVariable(a, p), this.currentXDelta +=
-      h - p);
-    d[f].visited = !0
-  }
-};
-mxCoordinateAssignment.prototype.calculatedWeightedValue = function(a, b) {
-  for (var c = 0, d = 0; d < b.length; d++) {
-    var e = b[d];
-    a.isVertex() && e.isVertex() ? c++ : c = a.isEdge() && e.isEdge() ? c + 8 : c + 2
-  }
-  return c
-};
-mxCoordinateAssignment.prototype.medianXValue = function(a, b) {
-  if (0 == a.length) return 0;
-  for (var c = [], d = 0; d < a.length; d++) c[d] = a[d].getGeneralPurposeVariable(b);
-  c.sort(function(a, b) {
-    return a - b
-  });
-  if (1 == a.length % 2) return c[Math.floor(a.length / 2)];
-  d = a.length / 2;
-  return (c[d - 1] + c[d]) / 2
-};
-mxCoordinateAssignment.prototype.initialCoords = function(a, b) {
-  this.calculateWidestRank(a, b);
-  for (var c = this.widestRank; 0 <= c; c--) c < b.maxRank && this.rankCoordinates(c, a, b);
-  for (c = this.widestRank + 1; c <= b.maxRank; c++) 0 < c && this.rankCoordinates(c, a, b)
-};
-mxCoordinateAssignment.prototype.rankCoordinates = function(a, b, c) {
-  b = c.ranks[a];
-  c = 0;
-  for (var d = this.initialX + (this.widestRankValue - this.rankWidths[a]) / 2, e = !1, f = 0; f < b.length; f++) {
-    var g = b[f];
-    if (g.isVertex()) {
-      var h = this.layout.getVertexBounds(g.cell);
-      null != h ? this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == mxConstants.DIRECTION_SOUTH ? (g.width = h.width, g.height = h.height) : (g.width = h.height, g.height = h.width) :
-        e = !0;
-      c = Math.max(c, g.height)
-    } else g.isEdge() && (h = 1, null != g.edges ? h = g.edges.length : mxLog.warn("edge.edges is null"),
-      g.width = (h - 1) * this.parallelEdgeSpacing);
-    d += g.width / 2;
-    g.setX(a, d);
-    g.setGeneralPurposeVariable(a, d);
-    d += g.width / 2;
-    d += this.intraCellSpacing
-  }!0 == e && mxLog.warn("At least one cell has no bounds")
-};
-mxCoordinateAssignment.prototype.calculateWidestRank = function(a, b) {
-  var c = -this.interRankCellSpacing,
-    d = 0;
-  this.rankWidths = [];
-  this.rankY = [];
-  for (var e = b.maxRank; 0 <= e; e--) {
-    for (var f = 0, g = b.ranks[e], h = this.initialX, k = !1, l = 0; l < g.length; l++) {
-      var m = g[l];
-      if (m.isVertex()) {
-        var n = this.layout.getVertexBounds(m.cell);
-        null != n ? this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == mxConstants.DIRECTION_SOUTH ? (m.width = n.width, m.height = n.height) : (m.width = n.height, m.height = n
-          .width) : k = !0;
-        f = Math.max(f, m.height)
-      } else m.isEdge() &&
-        (n = 1, null != m.edges ? n = m.edges.length : mxLog.warn("edge.edges is null"), m.width = (n - 1) * this.parallelEdgeSpacing);
-      h += m.width / 2;
-      m.setX(e, h);
-      m.setGeneralPurposeVariable(e, h);
-      h += m.width / 2;
-      h += this.intraCellSpacing;
-      h > this.widestRankValue && (this.widestRankValue = h, this.widestRank = e);
-      this.rankWidths[e] = h
-    }!0 == k && mxLog.warn("At least one cell has no bounds");
-    this.rankY[e] = c;
-    h = f / 2 + d / 2 + this.interRankCellSpacing;
-    d = f;
-    c = this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == mxConstants.DIRECTION_WEST ? c + h : c -
-      h;
-    for (l = 0; l < g.length; l++) g[l].setY(e, c)
-  }
-};
-mxCoordinateAssignment.prototype.minPath = function(a, b) {
-  var c = b.edgeMapper,
-    d;
-  for (d in c) {
-    var e = c[d];
-    if (!(1 > e.maxRank - e.minRank - 1)) {
-      for (var f = e.getGeneralPurposeVariable(e.minRank + 1), g = !0, h = 0, k = e.minRank + 2; k < e.maxRank; k++) {
-        var l = e.getGeneralPurposeVariable(k);
-        f != l ? (g = !1, f = l) : h++
-      }
-      if (!g) {
-        for (var g = f = 0, l = [], m = [], n = e.getGeneralPurposeVariable(e.minRank + 1), k = e.minRank + 1; k < e.maxRank - 1; k++) {
-          var p = e.getX(k + 1);
-          n == p ? (l[k - e.minRank - 1] = n, f++) : this.repositionValid(b, e, k + 1, n) ? (l[k - e.minRank - 1] = n, f++) : n = l[k - e.minRank -
-            1] = p
-        }
-        n = e.getX(k);
-        for (k = e.maxRank - 1; k > e.minRank + 1; k--) p = e.getX(k - 1), n == p ? (m[k - e.minRank - 2] = n, g++) : this.repositionValid(b, e, k - 1, n) ? (m[k - e.minRank - 2] = n, g++) : (m[k -
-          e.minRank - 2] = e.getX(k - 1), n = p);
-        if (g > h || f > h)
-          if (g >= f)
-            for (k = e.maxRank - 2; k > e.minRank; k--) e.setX(k, m[k - e.minRank - 1]);
-          else if (f > g)
-          for (k = e.minRank + 2; k < e.maxRank; k++) e.setX(k, l[k - e.minRank - 2])
-      }
-    }
-  }
-};
-mxCoordinateAssignment.prototype.repositionValid = function(a, b, c, d) {
-  a = a.ranks[c];
-  for (var e = -1, f = 0; f < a.length; f++)
-    if (b == a[f]) {
-      e = f;
-      break
-    }
-  if (0 > e) return !1;
-  f = b.getGeneralPurposeVariable(c);
-  if (d < f) {
-    if (0 == e) return !0;
-    a = a[e - 1];
-    c = a.getGeneralPurposeVariable(c);
-    c = c + a.width / 2 + this.intraCellSpacing + b.width / 2;
-    if (!(c <= d)) return !1
-  } else if (d > f) {
-    if (e == a.length - 1) return !0;
-    a = a[e + 1];
-    c = a.getGeneralPurposeVariable(c);
-    c = c - a.width / 2 - this.intraCellSpacing - b.width / 2;
-    if (!(c >= d)) return !1
-  }
-  return !0
-};
-mxCoordinateAssignment.prototype.setCellLocations = function(a, b) {
-  this.rankTopY = [];
-  this.rankBottomY = [];
-  for (var c = 0; c < b.ranks.length; c++) this.rankTopY[c] = Number.MAX_VALUE, this.rankBottomY[c] = 0;
-  c = null;
-  this.layout.resizeParent && (c = {});
-  var d = b.edgeMapper,
-    e = b.vertexMapper,
-    f;
-  for (f in e) {
-    var g = e[f];
-    this.setVertexLocation(g);
-    if (this.layout.resizeParent) {
-      var g = a.model.getParent(g.cell),
-        h = mxCellPath.create(g);
-      null == c[h] && (c[h] = g)
-    }
-  }
-  this.layout.resizeParent && null != c && this.adjustParents(c);
-  (this.edgeStyle == mxHierarchicalEdgeStyle.ORTHOGONAL ||
-    this.edgeStyle == mxHierarchicalEdgeStyle.POLYLINE || this.edgeStyle == mxHierarchicalEdgeStyle.CURVE) && this.localEdgeProcessing(b);
-  for (f in d) this.setEdgePosition(d[f])
-};
-mxCoordinateAssignment.prototype.adjustParents = function(a) {
-  var b = [],
-    c;
-  for (c in a) b.push(a[c]);
-  this.layout.arrangeGroups(mxUtils.sortCells(b, !0), this.groupPadding)
-};
-mxCoordinateAssignment.prototype.localEdgeProcessing = function(a) {
-  for (var b = 0; b < a.ranks.length; b++)
-    for (var c = a.ranks[b], d = 0; d < c.length; d++) {
-      var e = c[d];
-      if (e.isVertex())
-        for (var f = e.getPreviousLayerConnectedCells(b), g = b - 1, h = 0; 2 > h; h++) {
-          if (-1 < g && g < a.ranks.length && null != f && 0 < f.length) {
-            for (var k = [], l = 0; l < f.length; l++) {
-              var m = new WeightedCellSorter(f[l], f[l].getX(g));
-              k.push(m)
-            }
-            k.sort(WeightedCellSorter.prototype.compare);
-            for (var m = e.x[0] - e.width / 2, n = m + e.width, p = f = 0, g = [], l = 0; l < k.length; l++) {
-              var q = k[l].cell,
-                s;
-              if (q.isVertex()) {
-                s = 0 == h ? e.connectsAsSource : e.connectsAsTarget;
-                for (var r = 0; r < s.length; r++)
-                  if (s[r].source == q || s[r].target == q) f += s[r].edges.length, p++, g.push(s[r])
-              } else f += q.edges.length, p++, g.push(q)
-            }
-            e.width > (f + 1) * this.prefHozEdgeSep + 2 * this.prefHozEdgeSep && (m += this.prefHozEdgeSep, n -= this.prefHozEdgeSep);
-            k = (n - m) / f;
-            m += k / 2;
-            n = this.minEdgeJetty - this.prefVertEdgeOff;
-            for (l = p = 0; l < g.length; l++) {
-              q = g[l].edges.length;
-              r = mxCellPath.create(g[l].edges[0]);
-              s = this.jettyPositions[r];
-              null == s && (s = [], this.jettyPositions[r] =
-                s);
-              l < f / 2 ? n += this.prefVertEdgeOff : l > f / 2 && (n -= this.prefVertEdgeOff);
-              for (r = 0; r < q; r++) s[4 * r + 2 * h] = m, m += k, s[4 * r + 2 * h + 1] = n;
-              p = Math.max(p, n)
-            }
-          }
-          f = e.getNextLayerConnectedCells(b);
-          g = b + 1
-        }
-    }
-};
-mxCoordinateAssignment.prototype.setEdgePosition = function(a) {
-  var b = 0;
-  if (101207 != a.temp[0]) {
-    var c = a.maxRank,
-      d = a.minRank;
-    c == d && (c = a.source.maxRank, d = a.target.minRank);
-    for (var e = 0, f = mxCellPath.create(a.edges[0]), f = this.jettyPositions[f], g = a.isReversed ? a.target.cell : a.source.cell, h = this.layout.graph, k = 0; k < a.edges.length; k++) {
-      var l = a.edges[k],
-        m = this.layout.getVisibleTerminal(l, !0),
-        n = h.model.getTerminal(l, !0),
-        p = [],
-        q = a.isReversed;
-      m != g && (q = !q);
-      if (null != f) {
-        var s = q ? 2 : 0,
-          r = q ? this.rankTopY[d] : this.rankBottomY[c],
-          t = f[4 * e + 1 + s];
-        q && (t = -t);
-        r += t;
-        s = f[4 * e + s];
-        n = h.model.getTerminal(l, !0);
-        this.layout.isPort(n) && h.model.getParent(n) == m && (s = h.view.getState(n), s = null != s ? s.x : m.geometry.x + a.source.width * n.geometry.x);
-        this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == mxConstants.DIRECTION_SOUTH ? (p.push(new mxPoint(s, r)), this.edgeStyle == mxHierarchicalEdgeStyle.CURVE && p.push(
-          new mxPoint(s, r + t))) : (p.push(new mxPoint(r, s)), this.edgeStyle == mxHierarchicalEdgeStyle.CURVE && p.push(new mxPoint(r + t, s)))
-      }
-      s = a.x.length -
-        1;
-      r = t = -1;
-      m = a.maxRank - 1;
-      q && (s = 0, t = a.x.length, r = 1, m = a.minRank + 1);
-      for (; a.maxRank != a.minRank && s != t; s += r) {
-        var n = a.x[s] + b,
-          v = (this.rankTopY[m] + this.rankBottomY[m + 1]) / 2,
-          w = (this.rankTopY[m - 1] + this.rankBottomY[m]) / 2;
-        if (q) var u = v,
-          v = w,
-          w = u;
-        this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == mxConstants.DIRECTION_SOUTH ? (p.push(new mxPoint(n, v)), p.push(new mxPoint(n, w))) : (p.push(new mxPoint(v, n)), p.push(
-          new mxPoint(w, n)));
-        this.limitX = Math.max(this.limitX, n);
-        m += r
-      }
-      null != f && (s = q ? 2 : 0, r = q ? this.rankBottomY[c] :
-        this.rankTopY[d], t = f[4 * e + 3 - s], q && (t = -t), r -= t, s = f[4 * e + 2 - s], q = h.model.getTerminal(l, !1), m = this.layout.getVisibleTerminal(l, !1), this.layout.isPort(q) && h.model
-        .getParent(q) == m && (s = h.view.getState(q), s = null != s ? s.x : m.geometry.x + a.target.width * q.geometry.x), this.orientation == mxConstants.DIRECTION_NORTH || this.orientation ==
-        mxConstants.DIRECTION_SOUTH ? (this.edgeStyle == mxHierarchicalEdgeStyle.CURVE && p.push(new mxPoint(s, r - t)), p.push(new mxPoint(s, r))) : (this.edgeStyle == mxHierarchicalEdgeStyle.CURVE &&
-          p.push(new mxPoint(r -
-            t, s)), p.push(new mxPoint(r, s))));
-      a.isReversed && this.processReversedEdge(a, l);
-      this.layout.setEdgePoints(l, p);
-      b = 0 == b ? this.parallelEdgeSpacing : 0 < b ? -b : -b + this.parallelEdgeSpacing;
-      e++
-    }
-    a.temp[0] = 101207
-  }
-};
-mxCoordinateAssignment.prototype.setVertexLocation = function(a) {
-  var b = a.cell,
-    c = a.x[0] - a.width / 2,
-    d = a.y[0] - a.height / 2;
-  this.rankTopY[a.minRank] = Math.min(this.rankTopY[a.minRank], d);
-  this.rankBottomY[a.minRank] = Math.max(this.rankBottomY[a.minRank], d + a.height);
-  this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == mxConstants.DIRECTION_SOUTH ? this.layout.setVertexLocation(b, c, d) : this.layout.setVertexLocation(b, d, c);
-  this.limitX = Math.max(this.limitX, c + a.width)
-};
-mxCoordinateAssignment.prototype.processReversedEdge = function(a, b) {};
-
-function WeightedCellSorter(a, b) {
-  this.cell = a;
-  this.weightedValue = b
-}
-WeightedCellSorter.prototype.weightedValue = 0;
-WeightedCellSorter.prototype.nudge = !1;
-WeightedCellSorter.prototype.visited = !1;
-WeightedCellSorter.prototype.rankIndex = null;
-WeightedCellSorter.prototype.cell = null;
-WeightedCellSorter.prototype.compare = function(a, b) {
-  return null != a && null != b ? b.weightedValue > a.weightedValue ? -1 : b.weightedValue < a.weightedValue ? 1 : b.nudge ? -1 : 1 : 0
-};
-
-function mxHierarchicalLayout(a, b, c) {
-  mxGraphLayout.call(this, a);
-  this.orientation = null != b ? b : mxConstants.DIRECTION_NORTH;
-  this.deterministic = null != c ? c : !0
-}
-mxHierarchicalLayout.prototype = new mxGraphLayout;
-mxHierarchicalLayout.prototype.constructor = mxHierarchicalLayout;
-mxHierarchicalLayout.prototype.roots = null;
-mxHierarchicalLayout.prototype.resizeParent = !1;
-mxHierarchicalLayout.prototype.moveParent = !1;
-mxHierarchicalLayout.prototype.parentBorder = 0;
-mxHierarchicalLayout.prototype.intraCellSpacing = 30;
-mxHierarchicalLayout.prototype.interRankCellSpacing = 100;
-mxHierarchicalLayout.prototype.interHierarchySpacing = 60;
-mxHierarchicalLayout.prototype.parallelEdgeSpacing = 10;
-mxHierarchicalLayout.prototype.orientation = mxConstants.DIRECTION_NORTH;
-mxHierarchicalLayout.prototype.fineTuning = !0;
-mxHierarchicalLayout.prototype.tightenToSource = !0;
-mxHierarchicalLayout.prototype.disableEdgeStyle = !0;
-mxHierarchicalLayout.prototype.traverseAncestors = !0;
-mxHierarchicalLayout.prototype.model = null;
-mxHierarchicalLayout.prototype.edgesCache = null;
-mxHierarchicalLayout.prototype.getModel = function() {
-  return this.model
-};
-mxHierarchicalLayout.prototype.execute = function(a, b) {
-  this.parent = a;
-  var c = this.graph.model;
-  this.edgesCache = {};
-  if (!(null == b && null == a)) {
-    if (null != b && null != a) {
-      for (var d = [], e = 0; e < b.length; e++) c.isAncestor(a, b[e]) && d.push(b[e]);
-      this.roots = d
-    } else this.roots = b;
-    c.beginUpdate();
-    try {
-      this.run(a), this.resizeParent && !this.graph.isCellCollapsed(a) && this.graph.updateGroupBounds([a], this.parentBorder, this.moveParent)
-    } finally {
-      c.endUpdate()
-    }
-  }
-};
-mxHierarchicalLayout.prototype.findRoots = function(a, b) {
-  var c = [];
-  if (null != a && null != b) {
-    var d = this.graph.model,
-      e = null,
-      f = -1E5,
-      g;
-    for (g in b) {
-      var h = b[g];
-      if (d.isVertex(h) && this.graph.isCellVisible(h)) {
-        for (var k = this.getEdges(h), l = 0, m = 0, n = 0; n < k.length; n++) this.getVisibleTerminal(k[n], !0) == h ? l++ : m++;
-        0 == m && 0 < l && c.push(h);
-        k = l - m;
-        k > f && (f = k, e = h)
-      }
-    }
-    0 == c.length && null != e && c.push(e)
-  }
-  return c
-};
-mxHierarchicalLayout.prototype.getEdges = function(a) {
-  var b = mxCellPath.create(a);
-  if (null != this.edgesCache[b]) return this.edgesCache[b];
-  for (var c = this.graph.model, d = [], e = this.graph.isCellCollapsed(a), f = c.getChildCount(a), g = 0; g < f; g++) {
-    var h = c.getChildAt(a, g);
-    if (this.isPort(h)) d = d.concat(c.getEdges(h, !0, !0));
-    else if (e || !this.graph.isCellVisible(h)) d = d.concat(c.getEdges(h, !0, !0))
-  }
-  d = d.concat(c.getEdges(a, !0, !0));
-  c = [];
-  for (g = 0; g < d.length; g++) e = this.getVisibleTerminal(d[g], !0), f = this.getVisibleTerminal(d[g], !1), (e == f || e != f && (f == a && (null == this.parent || this.graph.isValidAncestor(e,
-    this.parent, this.traverseAncestors)) || e == a && (null == this.parent || this.graph.isValidAncestor(f, this.parent, this.traverseAncestors)))) && c.push(d[g]);
-  return this.edgesCache[b] = c
-};
-mxHierarchicalLayout.prototype.getVisibleTerminal = function(a, b) {
-  var c = this.graph.view.getState(a),
-    c = null != c ? c.getVisibleTerminal(b) : this.graph.view.getVisibleTerminal(a, b);
-  this.isPort(c) && (c = this.graph.model.getParent(c));
-  return c
-};
-mxHierarchicalLayout.prototype.run = function(a) {
-  var b = [],
-    c = [];
-  if (null == this.roots && null != a) {
-    var d = {};
-    this.filterDescendants(a, d);
-    this.roots = [];
-    var e = !0,
-      f;
-    for (f in d)
-      if (null != d[f]) {
-        e = !1;
-        break
-      }
-    for (; !e;) {
-      for (var g = this.findRoots(a, d), e = 0; e < g.length; e++) {
-        var h = [];
-        b.push(h);
-        this.traverse(g[e], !0, null, c, h, b, d)
-      }
-      for (e = 0; e < g.length; e++) this.roots.push(g[e]);
-      e = !0;
-      for (f in d)
-        if (null != d[f]) {
-          e = !1;
-          break
-        }
-    }
-  } else
-    for (e = 0; e < roots.length; e++) h = [], b.push(h), traverse(roots.get(e), !0, null, c, h, b, null);
-  for (e = c = 0; e < b.length; e++) {
-    h =
-      b[e];
-    d = [];
-    for (f in h) d.push(h[f]);
-    this.model = new mxGraphHierarchyModel(this, d, this.roots, a, this.tightenToSource);
-    this.cycleStage(a);
-    this.layeringStage();
-    this.crossingStage(a);
-    c = this.placementStage(c, a)
-  }
-};
-mxHierarchicalLayout.prototype.filterDescendants = function(a, b) {
-  var c = this.graph.model;
-  c.isVertex(a) && (a != this.parent && this.graph.isCellVisible(a)) && (b[mxCellPath.create(a)] = a);
-  if (this.traverseAncestors || a == this.parent && this.graph.isCellVisible(a))
-    for (var d = c.getChildCount(a), e = 0; e < d; e++) {
-      var f = c.getChildAt(a, e);
-      this.isPort(f) || this.filterDescendants(f, b)
-    }
-};
-mxHierarchicalLayout.prototype.isPort = function(a) {
-  return a.geometry.relative ? !0 : !1
-};
-mxHierarchicalLayout.prototype.getEdgesBetween = function(a, b, c) {
-  c = null != c ? c : !1;
-  for (var d = this.getEdges(a), e = [], f = 0; f < d.length; f++) {
-    var g = this.getVisibleTerminal(d[f], !0),
-      h = this.getVisibleTerminal(d[f], !1);
-    (g == a && h == b || !c && g == b && h == a) && e.push(d[f])
-  }
-  return e
-};
-mxHierarchicalLayout.prototype.traverse = function(a, b, c, d, e, f, g) {
-  if (null != a && null != d) {
-    var h = mxCellPath.create(a);
-    if (null == d[h] && (null == g || null != g[h])) {
-      null == e[h] && (e[h] = a);
-      null == d[h] && (d[h] = a);
-      delete g[h];
-      var k = this.getEdges(a);
-      for (c = 0; c < k.length; c++)
-        if (h = this.getVisibleTerminal(k[c], !0) == a, !b || h) h = this.getVisibleTerminal(k[c], !h), e = this.traverse(h, b, k[c], d, e, f, g)
-    } else if (null == e[h])
-      for (c = 0; c < f.length; c++)
-        if (a = f[c], null != a[h]) {
-          for (k in e) a[k] = e[k];
-          f.pop();
-          return a
-        }
-  }
-  return e
-};
-mxHierarchicalLayout.prototype.cycleStage = function(a) {
-  (new mxMinimumCycleRemover(this)).execute(a)
-};
-mxHierarchicalLayout.prototype.layeringStage = function() {
-  this.model.initialRank();
-  this.model.fixRanks()
-};
-mxHierarchicalLayout.prototype.crossingStage = function(a) {
-  (new mxMedianHybridCrossingReduction(this)).execute(a)
-};
-mxHierarchicalLayout.prototype.placementStage = function(a, b) {
-  var c = new mxCoordinateAssignment(this, this.intraCellSpacing, this.interRankCellSpacing, this.orientation, a, this.parallelEdgeSpacing);
-  c.fineTuning = this.fineTuning;
-  c.execute(b);
-  return c.limitX + this.interHierarchySpacing
-};
-
-function mxGraphModel(a) {
-  this.currentEdit = this.createUndoableEdit();
-  null != a ? this.setRoot(a) : this.clear()
-}
-mxGraphModel.prototype = new mxEventSource;
-mxGraphModel.prototype.constructor = mxGraphModel;
-mxGraphModel.prototype.root = null;
-mxGraphModel.prototype.cells = null;
-mxGraphModel.prototype.maintainEdgeParent = !0;
-mxGraphModel.prototype.createIds = !0;
-mxGraphModel.prototype.prefix = "";
-mxGraphModel.prototype.postfix = "";
-mxGraphModel.prototype.nextId = 0;
-mxGraphModel.prototype.currentEdit = null;
-mxGraphModel.prototype.updateLevel = 0;
-mxGraphModel.prototype.endingUpdate = !1;
-mxGraphModel.prototype.clear = function() {
-  this.setRoot(this.createRoot())
-};
-mxGraphModel.prototype.isCreateIds = function() {
-  return this.createIds
-};
-mxGraphModel.prototype.setCreateIds = function(a) {
-  this.createIds = a
-};
-mxGraphModel.prototype.createRoot = function() {
-  var a = new mxCell;
-  a.insert(new mxCell);
-  return a
-};
-mxGraphModel.prototype.getCell = function(a) {
-  return null != this.cells ? this.cells[a] : null
-};
-mxGraphModel.prototype.filterCells = function(a, b) {
-  var c = null;
-  if (null != a)
-    for (var c = [], d = 0; d < a.length; d++) b(a[d]) && c.push(a[d]);
-  return c
-};
-mxGraphModel.prototype.getDescendants = function(a) {
-  return this.filterDescendants(null, a)
-};
-mxGraphModel.prototype.filterDescendants = function(a, b) {
-  var c = [];
-  b = b || this.getRoot();
-  (null == a || a(b)) && c.push(b);
-  for (var d = this.getChildCount(b), e = 0; e < d; e++) var f = this.getChildAt(b, e),
-    c = c.concat(this.filterDescendants(a, f));
-  return c
-};
-mxGraphModel.prototype.getRoot = function(a) {
-  var b = a || this.root;
-  if (null != a)
-    for (; null != a;) b = a, a = this.getParent(a);
-  return b
-};
-mxGraphModel.prototype.setRoot = function(a) {
-  this.execute(new mxRootChange(this, a));
-  return a
-};
-mxGraphModel.prototype.rootChanged = function(a) {
-  var b = this.root;
-  this.root = a;
-  this.nextId = 0;
-  this.cells = null;
-  this.cellAdded(a);
-  return b
-};
-mxGraphModel.prototype.isRoot = function(a) {
-  return null != a && this.root == a
-};
-mxGraphModel.prototype.isLayer = function(a) {
-  return this.isRoot(this.getParent(a))
-};
-mxGraphModel.prototype.isAncestor = function(a, b) {
-  for (; null != b && b != a;) b = this.getParent(b);
-  return b == a
-};
-mxGraphModel.prototype.contains = function(a) {
-  return this.isAncestor(this.root, a)
-};
-mxGraphModel.prototype.getParent = function(a) {
-  return null != a ? a.getParent() : null
-};
-mxGraphModel.prototype.add = function(a, b, c) {
-  if (b != a && null != a && null != b) {
-    null == c && (c = this.getChildCount(a));
-    var d = a != this.getParent(b);
-    this.execute(new mxChildChange(this, a, b, c));
-    this.maintainEdgeParent && d && this.updateEdgeParents(b)
-  }
-  return b
-};
-mxGraphModel.prototype.cellAdded = function(a) {
-  if (null != a) {
-    null == a.getId() && this.createIds && a.setId(this.createId(a));
-    if (null != a.getId()) {
-      var b = this.getCell(a.getId());
-      if (b != a) {
-        for (; null != b;) a.setId(this.createId(a)), b = this.getCell(a.getId());
-        null == this.cells && (this.cells = {});
-        this.cells[a.getId()] = a
-      }
-    }
-    mxUtils.isNumeric(a.getId()) && (this.nextId = Math.max(this.nextId, a.getId()));
-    for (var b = this.getChildCount(a), c = 0; c < b; c++) this.cellAdded(this.getChildAt(a, c))
-  }
-};
-mxGraphModel.prototype.createId = function(a) {
-  a = this.nextId;
-  this.nextId++;
-  return this.prefix + a + this.postfix
-};
-mxGraphModel.prototype.updateEdgeParents = function(a, b) {
-  b = b || this.getRoot(a);
-  for (var c = this.getChildCount(a), d = 0; d < c; d++) {
-    var e = this.getChildAt(a, d);
-    this.updateEdgeParents(e, b)
-  }
-  e = this.getEdgeCount(a);
-  c = [];
-  for (d = 0; d < e; d++) c.push(this.getEdgeAt(a, d));
-  for (d = 0; d < c.length; d++) e = c[d], this.isAncestor(b, e) && this.updateEdgeParent(e, b)
-};
-mxGraphModel.prototype.updateEdgeParent = function(a, b) {
-  for (var c = this.getTerminal(a, !0), d = this.getTerminal(a, !1), e = null; null != c && !this.isEdge(c) && null != c.geometry && c.geometry.relative;) c = this.getParent(c);
-  for (; null != d && !this.isEdge(d) && null != d.geometry && d.geometry.relative;) d = this.getParent(d);
-  if (this.isAncestor(b, c) && this.isAncestor(b, d) && (e = c == d ? this.getParent(c) : this.getNearestCommonAncestor(c, d), null != e && (this.getParent(e) != this.root || this.isAncestor(e, a)) &&
-      this.getParent(a) != e)) {
-    c = this.getGeometry(a);
-    if (null != c) {
-      var f = this.getOrigin(this.getParent(a)),
-        g = this.getOrigin(e),
-        d = g.x - f.x,
-        f = g.y - f.y,
-        c = c.clone();
-      c.translate(-d, -f);
-      this.setGeometry(a, c)
-    }
-    this.add(e, a, this.getChildCount(e))
-  }
-};
-mxGraphModel.prototype.getOrigin = function(a) {
-  var b = null;
-  null != a ? (b = this.getOrigin(this.getParent(a)), this.isEdge(a) || (a = this.getGeometry(a), null != a && (b.x += a.x, b.y += a.y))) : b = new mxPoint;
-  return b
-};
-mxGraphModel.prototype.getNearestCommonAncestor = function(a, b) {
-  if (null != a && null != b) {
-    var c = mxCellPath.create(b);
-    if (null != c && 0 < c.length) {
-      var d = a,
-        e = mxCellPath.create(d);
-      if (c.length < e.length) var d = b,
-        f = e,
-        e = c,
-        c = f;
-      for (; null != d;) {
-        f = this.getParent(d);
-        if (0 == c.indexOf(e + mxCellPath.PATH_SEPARATOR) && null != f) return d;
-        e = mxCellPath.getParentPath(e);
-        d = f
-      }
-    }
-  }
-  return null
-};
-mxGraphModel.prototype.remove = function(a) {
-  a == this.root ? this.setRoot(null) : null != this.getParent(a) && this.execute(new mxChildChange(this, null, a));
-  return a
-};
-mxGraphModel.prototype.cellRemoved = function(a) {
-  if (null != a && null != this.cells) {
-    for (var b = this.getChildCount(a) - 1; 0 <= b; b--) this.cellRemoved(this.getChildAt(a, b));
-    null != this.cells && null != a.getId() && delete this.cells[a.getId()]
-  }
-};
-mxGraphModel.prototype.parentForCellChanged = function(a, b, c) {
-  var d = this.getParent(a);
-  null != b ? (b != d || d.getIndex(a) != c) && b.insert(a, c) : null != d && (c = d.getIndex(a), d.remove(c));
-  !this.contains(d) && null != b ? this.cellAdded(a) : null == b && this.cellRemoved(a);
-  return d
-};
-mxGraphModel.prototype.getChildCount = function(a) {
-  return null != a ? a.getChildCount() : 0
-};
-mxGraphModel.prototype.getChildAt = function(a, b) {
-  return null != a ? a.getChildAt(b) : null
-};
-mxGraphModel.prototype.getChildren = function(a) {
-  return null != a ? a.children : null
-};
-mxGraphModel.prototype.getChildVertices = function(a) {
-  return this.getChildCells(a, !0, !1)
-};
-mxGraphModel.prototype.getChildEdges = function(a) {
-  return this.getChildCells(a, !1, !0)
-};
-mxGraphModel.prototype.getChildCells = function(a, b, c) {
-  b = null != b ? b : !1;
-  c = null != c ? c : !1;
-  for (var d = this.getChildCount(a), e = [], f = 0; f < d; f++) {
-    var g = this.getChildAt(a, f);
-    (!c && !b || c && this.isEdge(g) || b && this.isVertex(g)) && e.push(g)
-  }
-  return e
-};
-mxGraphModel.prototype.getTerminal = function(a, b) {
-  return null != a ? a.getTerminal(b) : null
-};
-mxGraphModel.prototype.setTerminal = function(a, b, c) {
-  var d = b != this.getTerminal(a, c);
-  this.execute(new mxTerminalChange(this, a, b, c));
-  this.maintainEdgeParent && d && this.updateEdgeParent(a, this.getRoot());
-  return b
-};
-mxGraphModel.prototype.setTerminals = function(a, b, c) {
-  this.beginUpdate();
-  try {
-    this.setTerminal(a, b, !0), this.setTerminal(a, c, !1)
-  } finally {
-    this.endUpdate()
-  }
-};
-mxGraphModel.prototype.terminalForCellChanged = function(a, b, c) {
-  var d = this.getTerminal(a, c);
-  null != b ? b.insertEdge(a, c) : null != d && d.removeEdge(a, c);
-  return d
-};
-mxGraphModel.prototype.getEdgeCount = function(a) {
-  return null != a ? a.getEdgeCount() : 0
-};
-mxGraphModel.prototype.getEdgeAt = function(a, b) {
-  return null != a ? a.getEdgeAt(b) : null
-};
-mxGraphModel.prototype.getDirectedEdgeCount = function(a, b, c) {
-  for (var d = 0, e = this.getEdgeCount(a), f = 0; f < e; f++) {
-    var g = this.getEdgeAt(a, f);
-    g != c && this.getTerminal(g, b) == a && d++
-  }
-  return d
-};
-mxGraphModel.prototype.getConnections = function(a) {
-  return this.getEdges(a, !0, !0, !1)
-};
-mxGraphModel.prototype.getIncomingEdges = function(a) {
-  return this.getEdges(a, !0, !1, !1)
-};
-mxGraphModel.prototype.getOutgoingEdges = function(a) {
-  return this.getEdges(a, !1, !0, !1)
-};
-mxGraphModel.prototype.getEdges = function(a, b, c, d) {
-  b = null != b ? b : !0;
-  c = null != c ? c : !0;
-  d = null != d ? d : !0;
-  for (var e = this.getEdgeCount(a), f = [], g = 0; g < e; g++) {
-    var h = this.getEdgeAt(a, g),
-      k = this.getTerminal(h, !0),
-      l = this.getTerminal(h, !1);
-    (d && k == l || k != l && (b && l == a || c && k == a)) && f.push(h)
-  }
-  return f
-};
-mxGraphModel.prototype.getEdgesBetween = function(a, b, c) {
-  c = null != c ? c : !1;
-  var d = this.getEdgeCount(a),
-    e = this.getEdgeCount(b),
-    f = a,
-    g = d;
-  e < d && (g = e, f = b);
-  d = [];
-  for (e = 0; e < g; e++) {
-    var h = this.getEdgeAt(f, e),
-      k = this.getTerminal(h, !0),
-      l = this.getTerminal(h, !1),
-      m = l == a && k == b;
-    (k == a && l == b || !c && m) && d.push(h)
-  }
-  return d
-};
-mxGraphModel.prototype.getOpposites = function(a, b, c, d) {
-  c = null != c ? c : !0;
-  d = null != d ? d : !0;
-  var e = [];
-  if (null != a)
-    for (var f = 0; f < a.length; f++) {
-      var g = this.getTerminal(a[f], !0),
-        h = this.getTerminal(a[f], !1);
-      g == b && null != h && h != b && d ? e.push(h) : h == b && (null != g && g != b && c) && e.push(g)
-    }
-  return e
-};
-mxGraphModel.prototype.getTopmostCells = function(a) {
-  for (var b = [], c = 0; c < a.length; c++) {
-    for (var d = a[c], e = !0, f = this.getParent(d); null != f;) {
-      if (0 <= mxUtils.indexOf(a, f)) {
-        e = !1;
-        break
-      }
-      f = this.getParent(f)
-    }
-    e && b.push(d)
-  }
-  return b
-};
-mxGraphModel.prototype.isVertex = function(a) {
-  return null != a ? a.isVertex() : !1
-};
-mxGraphModel.prototype.isEdge = function(a) {
-  return null != a ? a.isEdge() : !1
-};
-mxGraphModel.prototype.isConnectable = function(a) {
-  return null != a ? a.isConnectable() : !1
-};
-mxGraphModel.prototype.getValue = function(a) {
-  return null != a ? a.getValue() : null
-};
-mxGraphModel.prototype.setValue = function(a, b) {
-  this.execute(new mxValueChange(this, a, b));
-  return b
-};
-mxGraphModel.prototype.valueForCellChanged = function(a, b) {
-  return a.valueChanged(b)
-};
-mxGraphModel.prototype.getGeometry = function(a, b) {
-  return null != a ? a.getGeometry() : null
-};
-mxGraphModel.prototype.setGeometry = function(a, b) {
-  b != this.getGeometry(a) && this.execute(new mxGeometryChange(this, a, b));
-  return b
-};
-mxGraphModel.prototype.geometryForCellChanged = function(a, b) {
-  var c = this.getGeometry(a);
-  a.setGeometry(b);
-  return c
-};
-mxGraphModel.prototype.getStyle = function(a) {
-  return null != a ? a.getStyle() : null
-};
-mxGraphModel.prototype.setStyle = function(a, b) {
-  b != this.getStyle(a) && this.execute(new mxStyleChange(this, a, b));
-  return b
-};
-mxGraphModel.prototype.styleForCellChanged = function(a, b) {
-  var c = this.getStyle(a);
-  a.setStyle(b);
-  return c
-};
-mxGraphModel.prototype.isCollapsed = function(a) {
-  return null != a ? a.isCollapsed() : !1
-};
-mxGraphModel.prototype.setCollapsed = function(a, b) {
-  b != this.isCollapsed(a) && this.execute(new mxCollapseChange(this, a, b));
-  return b
-};
-mxGraphModel.prototype.collapsedStateForCellChanged = function(a, b) {
-  var c = this.isCollapsed(a);
-  a.setCollapsed(b);
-  return c
-};
-mxGraphModel.prototype.isVisible = function(a) {
-  return null != a ? a.isVisible() : !1
-};
-mxGraphModel.prototype.setVisible = function(a, b) {
-  b != this.isVisible(a) && this.execute(new mxVisibleChange(this, a, b));
-  return b
-};
-mxGraphModel.prototype.visibleStateForCellChanged = function(a, b) {
-  var c = this.isVisible(a);
-  a.setVisible(b);
-  return c
-};
-mxGraphModel.prototype.execute = function(a) {
-  a.execute();
-  this.beginUpdate();
-  this.currentEdit.add(a);
-  this.fireEvent(new mxEventObject(mxEvent.EXECUTE, "change", a));
-  this.fireEvent(new mxEventObject(mxEvent.EXECUTED, "change", a));
-  this.endUpdate()
-};
-mxGraphModel.prototype.beginUpdate = function() {
-  this.updateLevel++;
-  this.fireEvent(new mxEventObject(mxEvent.BEGIN_UPDATE));
-  1 == this.updateLevel && this.fireEvent(new mxEventObject(mxEvent.START_EDIT))
-};
-mxGraphModel.prototype.endUpdate = function() {
-  this.updateLevel--;
-  0 == this.updateLevel && this.fireEvent(new mxEventObject(mxEvent.END_EDIT));
-  if (!this.endingUpdate) {
-    this.endingUpdate = 0 == this.updateLevel;
-    this.fireEvent(new mxEventObject(mxEvent.END_UPDATE, "edit", this.currentEdit));
-    try {
-      if (this.endingUpdate && !this.currentEdit.isEmpty()) {
-        this.fireEvent(new mxEventObject(mxEvent.BEFORE_UNDO, "edit", this.currentEdit));
-        var a = this.currentEdit;
-        this.currentEdit = this.createUndoableEdit();
-        a.notify();
-        this.fireEvent(new mxEventObject(mxEvent.UNDO,
-          "edit", a))
-      }
-    } finally {
-      this.endingUpdate = !1
-    }
-  }
-};
-mxGraphModel.prototype.createUndoableEdit = function() {
-  var a = new mxUndoableEdit(this, !0);
-  a.notify = function() {
-    a.source.fireEvent(new mxEventObject(mxEvent.CHANGE, "edit", a, "changes", a.changes));
-    a.source.fireEvent(new mxEventObject(mxEvent.NOTIFY, "edit", a, "changes", a.changes))
-  };
-  return a
-};
-mxGraphModel.prototype.mergeChildren = function(a, b, c) {
-  c = null != c ? c : !0;
-  this.beginUpdate();
-  try {
-    var d = {};
-    this.mergeChildrenImpl(a, b, c, d);
-    for (var e in d) {
-      var f = d[e],
-        g = this.getTerminal(f, !0);
-      null != g && (g = d[mxCellPath.create(g)], this.setTerminal(f, g, !0));
-      g = this.getTerminal(f, !1);
-      null != g && (g = d[mxCellPath.create(g)], this.setTerminal(f, g, !1))
-    }
-  } finally {
-    this.endUpdate()
-  }
-};
-mxGraphModel.prototype.mergeChildrenImpl = function(a, b, c, d) {
-  this.beginUpdate();
-  try {
-    for (var e = a.getChildCount(), f = 0; f < e; f++) {
-      var g = a.getChildAt(f);
-      if ("function" == typeof g.getId) {
-        var h = g.getId(),
-          k = null != h && (!this.isEdge(g) || !c) ? this.getCell(h) : null;
-        if (null == k) {
-          var l = g.clone();
-          l.setId(h);
-          l.setTerminal(g.getTerminal(!0), !0);
-          l.setTerminal(g.getTerminal(!1), !1);
-          k = b.insert(l);
-          this.cellAdded(k)
-        }
-        d[mxCellPath.create(g)] = k;
-        this.mergeChildrenImpl(g, k, c, d)
-      }
-    }
-  } finally {
-    this.endUpdate()
-  }
-};
-mxGraphModel.prototype.getParents = function(a) {
-  var b = [];
-  if (null != a)
-    for (var c = {}, d = 0; d < a.length; d++) {
-      var e = this.getParent(a[d]);
-      if (null != e) {
-        var f = mxCellPath.create(e);
-        null == c[f] && (c[f] = e, b.push(e))
-      }
-    }
-  return b
-};
-mxGraphModel.prototype.cloneCell = function(a) {
-  return null != a ? this.cloneCells([a], !0)[0] : null
-};
-mxGraphModel.prototype.cloneCells = function(a, b) {
-  for (var c = {}, d = [], e = 0; e < a.length; e++) null != a[e] ? d.push(this.cloneCellImpl(a[e], c, b)) : d.push(null);
-  for (e = 0; e < d.length; e++) null != d[e] && this.restoreClone(d[e], a[e], c);
-  return d
-};
-mxGraphModel.prototype.cloneCellImpl = function(a, b, c) {
-  var d = this.cellCloned(a);
-  b[mxObjectIdentity.get(a)] = d;
-  if (c) {
-    c = this.getChildCount(a);
-    for (var e = 0; e < c; e++) {
-      var f = this.cloneCellImpl(this.getChildAt(a, e), b, !0);
-      d.insert(f)
-    }
-  }
-  return d
-};
-mxGraphModel.prototype.cellCloned = function(a) {
-  return a.clone()
-};
-mxGraphModel.prototype.restoreClone = function(a, b, c) {
-  var d = this.getTerminal(b, !0);
-  null != d && (d = c[mxObjectIdentity.get(d)], null != d && d.insertEdge(a, !0));
-  d = this.getTerminal(b, !1);
-  null != d && (d = c[mxObjectIdentity.get(d)], null != d && d.insertEdge(a, !1));
-  for (var d = this.getChildCount(a), e = 0; e < d; e++) this.restoreClone(this.getChildAt(a, e), this.getChildAt(b, e), c)
-};
-
-function mxRootChange(a, b) {
-  this.model = a;
-  this.previous = this.root = b
-}
-mxRootChange.prototype.execute = function() {
-  this.root = this.previous;
-  this.previous = this.model.rootChanged(this.previous)
-};
-
-function mxChildChange(a, b, c, d) {
-  this.model = a;
-  this.previous = this.parent = b;
-  this.child = c;
-  this.previousIndex = this.index = d
-}
-mxChildChange.prototype.execute = function() {
-  var a = this.model.getParent(this.child),
-    b = null != a ? a.getIndex(this.child) : 0;
-  null == this.previous && this.connect(this.child, !1);
-  a = this.model.parentForCellChanged(this.child, this.previous, this.previousIndex);
-  null != this.previous && this.connect(this.child, !0);
-  this.parent = this.previous;
-  this.previous = a;
-  this.index = this.previousIndex;
-  this.previousIndex = b
-};
-mxChildChange.prototype.connect = function(a, b) {
-  b = null != b ? b : !0;
-  var c = a.getTerminal(!0),
-    d = a.getTerminal(!1);
-  null != c && (b ? this.model.terminalForCellChanged(a, c, !0) : this.model.terminalForCellChanged(a, null, !0));
-  null != d && (b ? this.model.terminalForCellChanged(a, d, !1) : this.model.terminalForCellChanged(a, null, !1));
-  a.setTerminal(c, !0);
-  a.setTerminal(d, !1);
-  c = this.model.getChildCount(a);
-  for (d = 0; d < c; d++) this.connect(this.model.getChildAt(a, d), b)
-};
-
-function mxTerminalChange(a, b, c, d) {
-  this.model = a;
-  this.cell = b;
-  this.previous = this.terminal = c;
-  this.source = d
-}
-mxTerminalChange.prototype.execute = function() {
-  this.terminal = this.previous;
-  this.previous = this.model.terminalForCellChanged(this.cell, this.previous, this.source)
-};
-
-function mxValueChange(a, b, c) {
-  this.model = a;
-  this.cell = b;
-  this.previous = this.value = c
-}
-mxValueChange.prototype.execute = function() {
-  this.value = this.previous;
-  this.previous = this.model.valueForCellChanged(this.cell, this.previous)
-};
-
-function mxStyleChange(a, b, c) {
-  this.model = a;
-  this.cell = b;
-  this.previous = this.style = c
-}
-mxStyleChange.prototype.execute = function() {
-  this.style = this.previous;
-  this.previous = this.model.styleForCellChanged(this.cell, this.previous)
-};
-
-function mxGeometryChange(a, b, c) {
-  this.model = a;
-  this.cell = b;
-  this.previous = this.geometry = c
-}
-mxGeometryChange.prototype.execute = function() {
-  this.geometry = this.previous;
-  this.previous = this.model.geometryForCellChanged(this.cell, this.previous)
-};
-
-function mxCollapseChange(a, b, c) {
-  this.model = a;
-  this.cell = b;
-  this.previous = this.collapsed = c
-}
-mxCollapseChange.prototype.execute = function() {
-  this.collapsed = this.previous;
-  this.previous = this.model.collapsedStateForCellChanged(this.cell, this.previous)
-};
-
-function mxVisibleChange(a, b, c) {
-  this.model = a;
-  this.cell = b;
-  this.previous = this.visible = c
-}
-mxVisibleChange.prototype.execute = function() {
-  this.visible = this.previous;
-  this.previous = this.model.visibleStateForCellChanged(this.cell, this.previous)
-};
-
-function mxCellAttributeChange(a, b, c) {
-  this.cell = a;
-  this.attribute = b;
-  this.previous = this.value = c
-}
-mxCellAttributeChange.prototype.execute = function() {
-  var a = this.cell.getAttribute(this.attribute);
-  null == this.previous ? this.cell.value.removeAttribute(this.attribute) : this.cell.setAttribute(this.attribute, this.previous);
-  this.previous = a
-};
-
-function mxCell(a, b, c) {
-  this.value = a;
-  this.setGeometry(b);
-  this.setStyle(c);
-  if (null != this.onInit) this.onInit()
-}
-mxCell.prototype.id = null;
-mxCell.prototype.value = null;
-mxCell.prototype.geometry = null;
-mxCell.prototype.style = null;
-mxCell.prototype.vertex = !1;
-mxCell.prototype.edge = !1;
-mxCell.prototype.connectable = !0;
-mxCell.prototype.visible = !0;
-mxCell.prototype.collapsed = !1;
-mxCell.prototype.parent = null;
-mxCell.prototype.source = null;
-mxCell.prototype.target = null;
-mxCell.prototype.children = null;
-mxCell.prototype.edges = null;
-mxCell.prototype.mxTransient = "id value parent source target children edges".split(" ");
-mxCell.prototype.getId = function() {
-  return this.id
-};
-mxCell.prototype.setId = function(a) {
-  this.id = a
-};
-mxCell.prototype.getValue = function() {
-  return this.value
-};
-mxCell.prototype.setValue = function(a) {
-  this.value = a
-};
-mxCell.prototype.valueChanged = function(a) {
-  var b = this.getValue();
-  this.setValue(a);
-  return b
-};
-mxCell.prototype.getGeometry = function() {
-  return this.geometry
-};
-mxCell.prototype.setGeometry = function(a) {
-  this.geometry = a
-};
-mxCell.prototype.getStyle = function() {
-  return this.style
-};
-mxCell.prototype.setStyle = function(a) {
-  this.style = a
-};
-mxCell.prototype.isVertex = function() {
-  return this.vertex
-};
-mxCell.prototype.setVertex = function(a) {
-  this.vertex = a
-};
-mxCell.prototype.isEdge = function() {
-  return this.edge
-};
-mxCell.prototype.setEdge = function(a) {
-  this.edge = a
-};
-mxCell.prototype.isConnectable = function() {
-  return this.connectable
-};
-mxCell.prototype.setConnectable = function(a) {
-  this.connectable = a
-};
-mxCell.prototype.isVisible = function() {
-  return this.visible
-};
-mxCell.prototype.setVisible = function(a) {
-  this.visible = a
-};
-mxCell.prototype.isCollapsed = function() {
-  return this.collapsed
-};
-mxCell.prototype.setCollapsed = function(a) {
-  this.collapsed = a
-};
-mxCell.prototype.getParent = function() {
-  return this.parent
-};
-mxCell.prototype.setParent = function(a) {
-  this.parent = a
-};
-mxCell.prototype.getTerminal = function(a) {
-  return a ? this.source : this.target
-};
-mxCell.prototype.setTerminal = function(a, b) {
-  b ? this.source = a : this.target = a;
-  return a
-};
-mxCell.prototype.getChildCount = function() {
-  return null == this.children ? 0 : this.children.length
-};
-mxCell.prototype.getIndex = function(a) {
-  return mxUtils.indexOf(this.children, a)
-};
-mxCell.prototype.getChildAt = function(a) {
-  return null == this.children ? null : this.children[a]
-};
-mxCell.prototype.insert = function(a, b) {
-  null != a && (null == b && (b = this.getChildCount(), a.getParent() == this && b--), a.removeFromParent(), a.setParent(this), null == this.children ? (this.children = [], this.children.push(a)) :
-    this.children.splice(b, 0, a));
-  return a
-};
-mxCell.prototype.remove = function(a) {
-  var b = null;
-  null != this.children && 0 <= a && (b = this.getChildAt(a), null != b && (this.children.splice(a, 1), b.setParent(null)));
-  return b
-};
-mxCell.prototype.removeFromParent = function() {
-  if (null != this.parent) {
-    var a = this.parent.getIndex(this);
-    this.parent.remove(a)
-  }
-};
-mxCell.prototype.getEdgeCount = function() {
-  return null == this.edges ? 0 : this.edges.length
-};
-mxCell.prototype.getEdgeIndex = function(a) {
-  return mxUtils.indexOf(this.edges, a)
-};
-mxCell.prototype.getEdgeAt = function(a) {
-  return null == this.edges ? null : this.edges[a]
-};
-mxCell.prototype.insertEdge = function(a, b) {
-  if (null != a && (a.removeFromTerminal(b), a.setTerminal(this, b), null == this.edges || a.getTerminal(!b) != this || 0 > mxUtils.indexOf(this.edges, a))) null == this.edges && (this.edges = []),
-    this.edges.push(a);
-  return a
-};
-mxCell.prototype.removeEdge = function(a, b) {
-  if (null != a) {
-    if (a.getTerminal(!b) != this && null != this.edges) {
-      var c = this.getEdgeIndex(a);
-      0 <= c && this.edges.splice(c, 1)
-    }
-    a.setTerminal(null, b)
-  }
-  return a
-};
-mxCell.prototype.removeFromTerminal = function(a) {
-  var b = this.getTerminal(a);
-  null != b && b.removeEdge(this, a)
-};
-mxCell.prototype.getAttribute = function(a, b) {
-  var c = this.getValue();
-  return (null != c && c.nodeType == mxConstants.NODETYPE_ELEMENT ? c.getAttribute(a) : null) || b
-};
-mxCell.prototype.setAttribute = function(a, b) {
-  var c = this.getValue();
-  null != c && c.nodeType == mxConstants.NODETYPE_ELEMENT && c.setAttribute(a, b)
-};
-mxCell.prototype.clone = function() {
-  var a = mxUtils.clone(this, this.mxTransient);
-  a.setValue(this.cloneValue());
-  return a
-};
-mxCell.prototype.cloneValue = function() {
-  var a = this.getValue();
-  null != a && ("function" == typeof a.clone ? a = a.clone() : isNaN(a.nodeType) || (a = a.cloneNode(!0)));
-  return a
-};
-
-function mxGeometry(a, b, c, d) {
-  mxRectangle.call(this, a, b, c, d)
-}
-mxGeometry.prototype = new mxRectangle;
-mxGeometry.prototype.constructor = mxGeometry;
-mxGeometry.prototype.TRANSLATE_CONTROL_POINTS = !0;
-mxGeometry.prototype.alternateBounds = null;
-mxGeometry.prototype.sourcePoint = null;
-mxGeometry.prototype.targetPoint = null;
-mxGeometry.prototype.points = null;
-mxGeometry.prototype.offset = null;
-mxGeometry.prototype.relative = !1;
-mxGeometry.prototype.swap = function() {
-  if (null != this.alternateBounds) {
-    var a = new mxRectangle(this.x, this.y, this.width, this.height);
-    this.x = this.alternateBounds.x;
-    this.y = this.alternateBounds.y;
-    this.width = this.alternateBounds.width;
-    this.height = this.alternateBounds.height;
-    this.alternateBounds = a
-  }
-};
-mxGeometry.prototype.getTerminalPoint = function(a) {
-  return a ? this.sourcePoint : this.targetPoint
-};
-mxGeometry.prototype.setTerminalPoint = function(a, b) {
-  b ? this.sourcePoint = a : this.targetPoint = a;
-  return a
-};
-mxGeometry.prototype.translate = function(a, b) {
-  this.clone();
-  this.relative || (this.x += a, this.y += b);
-  null != this.sourcePoint && (this.sourcePoint.x += a, this.sourcePoint.y += b);
-  null != this.targetPoint && (this.targetPoint.x += a, this.targetPoint.y += b);
-  if (this.TRANSLATE_CONTROL_POINTS && null != this.points)
-    for (var c = this.points.length, d = 0; d < c; d++) {
-      var e = this.points[d];
-      null != e && (e.x += a, e.y += b)
-    }
-};
-var mxCellPath = {
-    PATH_SEPARATOR: ".",
-    create: function(a) {
-      var b = "";
-      if (null != a)
-        for (var c = a.getParent(); null != c;) b = c.getIndex(a) + mxCellPath.PATH_SEPARATOR + b, a = c, c = a.getParent();
-      a = b.length;
-      1 < a && (b = b.substring(0, a - 1));
-      return b
-    },
-    getParentPath: function(a) {
-      if (null != a) {
-        var b = a.lastIndexOf(mxCellPath.PATH_SEPARATOR);
-        if (0 <= b) return a.substring(0, b);
-        if (0 < a.length) return ""
-      }
-      return null
-    },
-    resolve: function(a, b) {
-      var c = a;
-      if (null != b)
-        for (var d = b.split(mxCellPath.PATH_SEPARATOR), e = 0; e < d.length; e++) c = c.getChildAt(parseInt(d[e]));
-      return c
-    },
-    compare: function(a, b) {
-      for (var c = Math.min(a.length, b.length), d = 0, e = 0; e < c; e++)
-        if (a[e] != b[e]) {
-          0 == a[e].length || 0 == b[e].length ? d = a[e] == b[e] ? 0 : a[e] > b[e] ? 1 : -1 : (c = parseInt(a[e]), e = parseInt(b[e]), d = c == e ? 0 : c > e ? 1 : -1);
-          break
-        }
-      0 == d && (c = a.length, e = b.length, c != e && (d = c > e ? 1 : -1));
-      return d
-    }
-  },
-  mxPerimeter = {
-    RectanglePerimeter: function(a, b, c, d) {
-      b = a.getCenterX();
-      var e = a.getCenterY(),
-        f = Math.atan2(c.y - e, c.x - b),
-        g = new mxPoint(0, 0),
-        h = Math.PI,
-        k = Math.PI / 2 - f,
-        l = Math.atan2(a.height, a.width);
-      f < -h + l || f > h - l ? (g.x = a.x, g.y = e - a.width *
-        Math.tan(f) / 2) : f < -l ? (g.y = a.y, g.x = b - a.height * Math.tan(k) / 2) : f < l ? (g.x = a.x + a.width, g.y = e + a.width * Math.tan(f) / 2) : (g.y = a.y + a.height, g.x = b + a.height *
-        Math.tan(k) / 2);
-      d && (c.x >= a.x && c.x <= a.x + a.width ? g.x = c.x : c.y >= a.y && c.y <= a.y + a.height && (g.y = c.y), c.x < a.x ? g.x = a.x : c.x > a.x + a.width && (g.x = a.x + a.width), c.y < a.y ? g.y =
-        a.y : c.y > a.y + a.height && (g.y = a.y + a.height));
-      return g
-    },
-    EllipsePerimeter: function(a, b, c, d) {
-      var e = a.x,
-        f = a.y,
-        g = a.width / 2,
-        h = a.height / 2,
-        k = e + g,
-        l = f + h;
-      b = c.x;
-      c = c.y;
-      var m = parseInt(b - k),
-        n = parseInt(c - l);
-      if (0 == m && 0 != n) return new mxPoint(k,
-        l + h * n / Math.abs(n));
-      if (0 == m && 0 == n) return new mxPoint(b, c);
-      if (d) {
-        if (c >= f && c <= f + a.height) return a = c - l, a = Math.sqrt(g * g * (1 - a * a / (h * h))) || 0, b <= e && (a = -a), new mxPoint(k + a, c);
-        if (b >= e && b <= e + a.width) return a = b - k, a = Math.sqrt(h * h * (1 - a * a / (g * g))) || 0, c <= f && (a = -a), new mxPoint(b, l + a)
-      }
-      e = n / m;
-      l -= e * k;
-      f = g * g * e * e + h * h;
-      a = -2 * k * f;
-      h = Math.sqrt(a * a - 4 * f * (g * g * e * e * k * k + h * h * k * k - g * g * h * h));
-      g = (-a + h) / (2 * f);
-      h = (-a - h) / (2 * f);
-      k = e * g + l;
-      l = e * h + l;
-      e = Math.sqrt(Math.pow(g - b, 2) + Math.pow(k - c, 2));
-      b = Math.sqrt(Math.pow(h - b, 2) + Math.pow(l - c, 2));
-      f = c = 0;
-      e < b ? (c =
-        g, f = k) : (c = h, f = l);
-      return new mxPoint(c, f)
-    },
-    RhombusPerimeter: function(a, b, c, d) {
-      b = a.x;
-      var e = a.y,
-        f = a.width;
-      a = a.height;
-      var g = b + f / 2,
-        h = e + a / 2,
-        k = c.x;
-      c = c.y;
-      if (g == k) return h > c ? new mxPoint(g, e) : new mxPoint(g, e + a);
-      if (h == c) return g > k ? new mxPoint(b, h) : new mxPoint(b + f, h);
-      var l = g,
-        m = h;
-      d && (k >= b && k <= b + f ? l = k : c >= e && c <= e + a && (m = c));
-      return k < g ? c < h ? mxUtils.intersection(k, c, l, m, g, e, b, h) : mxUtils.intersection(k, c, l, m, g, e + a, b, h) : c < h ? mxUtils.intersection(k, c, l, m, g, e, b + f, h) : mxUtils.intersection(
-        k, c, l, m, g, e + a, b + f, h)
-    },
-    TrianglePerimeter: function(a,
-      b, c, d) {
-      b = null != b ? b.style[mxConstants.STYLE_DIRECTION] : null;
-      var e = b == mxConstants.DIRECTION_NORTH || b == mxConstants.DIRECTION_SOUTH,
-        f = a.x,
-        g = a.y,
-        h = a.width;
-      a = a.height;
-      var k = f + h / 2,
-        l = g + a / 2,
-        m = new mxPoint(f, g),
-        n = new mxPoint(f + h, l),
-        p = new mxPoint(f, g + a);
-      b == mxConstants.DIRECTION_NORTH ? (m = p, n = new mxPoint(k, g), p = new mxPoint(f + h, g + a)) : b == mxConstants.DIRECTION_SOUTH ? (n = new mxPoint(k, g + a), p = new mxPoint(f + h, g)) :
-        b == mxConstants.DIRECTION_WEST && (m = new mxPoint(f + h, g), n = new mxPoint(f, l), p = new mxPoint(f + h, g + a));
-      var q = c.x -
-        k,
-        s = c.y - l,
-        q = e ? Math.atan2(q, s) : Math.atan2(s, q),
-        r = e ? Math.atan2(h, a) : Math.atan2(a, h),
-        s = !1,
-        s = b == mxConstants.DIRECTION_NORTH || b == mxConstants.DIRECTION_WEST ? q > -r && q < r : q < -Math.PI + r || q > Math.PI - r,
-        r = null;
-      s ? r = d && (e && c.x >= m.x && c.x <= p.x || !e && c.y >= m.y && c.y <= p.y) ? e ? new mxPoint(c.x, m.y) : new mxPoint(m.x, c.y) : b == mxConstants.DIRECTION_NORTH ? new mxPoint(f + h / 2 +
-        a * Math.tan(q) / 2, g + a) : b == mxConstants.DIRECTION_SOUTH ? new mxPoint(f + h / 2 - a * Math.tan(q) / 2, g) : b == mxConstants.DIRECTION_WEST ? new mxPoint(f + h, g + a / 2 + h *
-        Math.tan(q) / 2) : new mxPoint(f,
-        g + a / 2 - h * Math.tan(q) / 2) : (d && (d = new mxPoint(k, l), c.y >= g && c.y <= g + a ? (d.x = e ? k : b == mxConstants.DIRECTION_WEST ? f + h : f, d.y = c.y) : c.x >= f && c.x <= f +
-        h && (d.x = c.x, d.y = !e ? l : b == mxConstants.DIRECTION_NORTH ? g + a : g), k = d.x, l = d.y), r = e && c.x <= f + h / 2 || !e && c.y <= g + a / 2 ? mxUtils.intersection(c.x, c.y, k,
-        l, m.x, m.y, n.x, n.y) : mxUtils.intersection(c.x, c.y, k, l, n.x, n.y, p.x, p.y));
-      null == r && (r = new mxPoint(k, l));
-      return r
-    }
-  };
-
-function mxPrintPreview(a, b, c, d, e, f, g, h, k) {
-  this.graph = a;
-  this.scale = null != b ? b : 1 / a.pageScale;
-  this.border = null != d ? d : 0;
-  this.pageFormat = null != c ? c : a.pageFormat;
-  this.title = null != h ? h : "Printer-friendly version";
-  this.x0 = null != e ? e : 0;
-  this.y0 = null != f ? f : 0;
-  this.borderColor = g;
-  this.pageSelector = null != k ? k : !0
-}
-mxPrintPreview.prototype.graph = null;
-mxPrintPreview.prototype.pageFormat = null;
-mxPrintPreview.prototype.scale = null;
-mxPrintPreview.prototype.border = 0;
-mxPrintPreview.prototype.x0 = 0;
-mxPrintPreview.prototype.y0 = 0;
-mxPrintPreview.prototype.autoOrigin = !0;
-mxPrintPreview.prototype.printOverlays = !1;
-mxPrintPreview.prototype.borderColor = null;
-mxPrintPreview.prototype.title = null;
-mxPrintPreview.prototype.pageSelector = null;
-mxPrintPreview.prototype.wnd = null;
-mxPrintPreview.prototype.pageCount = 0;
-mxPrintPreview.prototype.getWindow = function() {
-  return this.wnd
-};
-mxPrintPreview.prototype.getDoctype = function() {
-  var a = "";
-  8 == document.documentMode && (a = '\x3cmeta http-equiv\x3d"X-UA-Compatible" content\x3d"IE\x3d8"\x3e');
-  return a
-};
-mxPrintPreview.prototype.open = function(a) {
-  var b = this.graph.cellRenderer.initializeOverlay,
-    c = null;
-  try {
-    this.printOverlays && (this.graph.cellRenderer.initializeOverlay = function(a, b) {
-      b.init(a.view.getDrawPane())
-    });
-    if (null == this.wnd) {
-      this.wnd = window.open();
-      var d = this.wnd.document,
-        e = this.getDoctype();
-      null != e && 0 < e.length && d.writeln(e);
-      d.writeln("\x3chtml\x3e");
-      d.writeln("\x3chead\x3e");
-      this.writeHead(d, a);
-      d.writeln("\x3c/head\x3e");
-      d.writeln('\x3cbody class\x3d"mxPage"\x3e');
-      mxClient.link("stylesheet", mxClient.basePath +
-        "/css/common.css", d);
-      mxClient.IS_VML && (d.namespaces.add("v", "urn:schemas-microsoft-com:vml"), d.namespaces.add("o", "urn:schemas-microsoft-com:office:office"), d.createStyleSheet().cssText =
-        "v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}", mxClient.link("stylesheet", mxClient.basePath + "/css/explorer.css", d));
-      var f = this.graph.getGraphBounds().clone(),
-        g = this.graph.getView().getScale(),
-        h = g / this.scale,
-        k = this.graph.getView().getTranslate();
-      this.autoOrigin || (this.x0 = -k.x * this.scale, this.y0 = -k.y * this.scale, f.width += f.x, f.height += f.y, f.x = 0, this.border = f.y = 0);
-      f.width /= h;
-      f.height /= h;
-      var l = this.pageFormat.width - 2 * this.border,
-        m = this.pageFormat.height - 2 * this.border,
-        n = Math.max(1, Math.ceil((f.width + this.x0) / l)),
-        p = Math.max(1, Math.ceil((f.height + this.y0) / m));
-      this.pageCount = n * p;
-      var q = mxUtils.bind(this, function() {
-        if (this.pageSelector && (1 < p || 1 < n)) {
-          var a = this.createPageSelector(p, n);
-          d.body.appendChild(a);
-          if (mxClient.IS_IE) {
-            a.style.position = "absolute";
-            var b = function() {
-              a.style.top = d.body.scrollTop +
-                10 + "px"
-            };
-            mxEvent.addListener(this.wnd, "scroll", function(a) {
-              b()
-            });
-            mxEvent.addListener(this.wnd, "resize", function(a) {
-              b()
-            })
-          }
-        }
-      });
-      a = function(a, b) {
-        null != this.borderColor && (a.style.borderColor = this.borderColor, a.style.borderStyle = "solid", a.style.borderWidth = "1px");
-        a.style.background = "white";
-        b && (a.style.pageBreakAfter = "always");
-        mxClient.IS_IE ? (d.writeln(a.outerHTML), a.parentNode.removeChild(a)) : (a.parentNode.removeChild(a), d.body.appendChild(a));
-        if (b) {
-          var c = d.createElement("hr");
-          c.className = "mxPageBreak";
-          d.body.appendChild(c)
-        }
-      };
-      var s = this.getCoverPages(this.pageFormat.width, this.pageFormat.height);
-      if (null != s)
-        for (var r = 0; r < s.length; r++) a(s[r], !0);
-      for (var t = this.getAppendices(this.pageFormat.width, this.pageFormat.height), r = 0; r < p; r++)
-        for (var v = r * m / this.scale - this.y0 / this.scale + (f.y - k.y * g) / g, s = 0; s < n; s++) {
-          if (null == this.wnd) return null;
-          var w = s * l / this.scale - this.x0 / this.scale + (f.x - k.x * g) / g,
-            u = r * n + s + 1,
-            c = this.renderPage(this.pageFormat.width, this.pageFormat.height, mxUtils.bind(this, function(a) {
-              this.addGraphFragment(-w, -v, this.scale, u, a)
-            }));
-          c.setAttribute("id", "mxPage-" + u);
-          a(c, null != t || r < p - 1 || s < n - 1)
-        }
-      if (null != t)
-        for (r = 0; r < t.length; r++) a(t[r], r < t.length);
-      d.writeln("\x3c/body\x3e");
-      d.writeln("\x3c/html\x3e");
-      d.close();
-      q();
-      mxEvent.release(d.body)
-    }
-    this.wnd.focus()
-  } catch (y) {
-    null != c && null != c.parentNode && c.parentNode.removeChild(c)
-  } finally {
-    this.graph.cellRenderer.initializeOverlay = b
-  }
-  return this.wnd
-};
-mxPrintPreview.prototype.writeHead = function(a, b) {
-  null != this.title && a.writeln("\x3ctitle\x3e" + this.title + "\x3c/title\x3e");
-  a.writeln('\x3cstyle type\x3d"text/css"\x3e');
-  a.writeln("@media print {");
-  a.writeln("  table.mxPageSelector { display: none; }");
-  a.writeln("  hr.mxPageBreak { display: none; }");
-  a.writeln("}");
-  a.writeln("@media screen {");
-  a.writeln("  table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");
-  a.writeln("  table.mxPageSelector td { border: solid 1px gray; padding:4px; }");
-  a.writeln("  body.mxPage { background: gray; }");
-  a.writeln("}");
-  null != b && a.writeln(b);
-  a.writeln("\x3c/style\x3e")
-};
-mxPrintPreview.prototype.createPageSelector = function(a, b) {
-  var c = this.wnd.document,
-    d = c.createElement("table");
-  d.className = "mxPageSelector";
-  d.setAttribute("border", "0");
-  for (var e = c.createElement("tbody"), f = 0; f < a; f++) {
-    for (var g = c.createElement("tr"), h = 0; h < b; h++) {
-      var k = f * b + h + 1,
-        l = c.createElement("td");
-      if (!mxClient.IS_NS || mxClient.IS_SF || mxClient.IS_GC) {
-        var m = c.createElement("a");
-        m.setAttribute("href", "#mxPage-" + k);
-        mxUtils.write(m, k, c);
-        l.appendChild(m)
-      } else mxUtils.write(l, k, c);
-      g.appendChild(l)
-    }
-    e.appendChild(g)
-  }
-  d.appendChild(e);
-  return d
-};
-mxPrintPreview.prototype.renderPage = function(a, b, c) {
-  var d = document.createElement("div");
-  try {
-    d.style.width = a + "px";
-    d.style.height = b + "px";
-    d.style.overflow = "hidden";
-    d.style.pageBreakInside = "avoid";
-    d.style.position = "relative";
-    var e = document.createElement("div");
-    e.style.top = this.border + "px";
-    e.style.left = this.border + "px";
-    e.style.width = a - 2 * this.border + "px";
-    e.style.height = b - 2 * this.border + "px";
-    e.style.overflow = "hidden";
-    this.graph.dialect == mxConstants.DIALECT_VML && (e.style.position = "absolute");
-    d.appendChild(e);
-    document.body.appendChild(d);
-    c(e)
-  } catch (f) {
-    throw d.parentNode.removeChild(d), f;
-  }
-  return d
-};
-mxPrintPreview.prototype.addGraphFragment = function(a, b, c, d, e) {
-  d = this.graph.getView();
-  var f = this.graph.container;
-  this.graph.container = e;
-  var g = d.getCanvas(),
-    h = d.getBackgroundPane(),
-    k = d.getDrawPane(),
-    l = d.getOverlayPane();
-  this.graph.dialect == mxConstants.DIALECT_SVG ? d.createSvg() : this.graph.dialect == mxConstants.DIALECT_VML ? d.createVml() : d.createHtml();
-  var m = d.isEventsEnabled();
-  d.setEventsEnabled(!1);
-  var n = this.graph.isEnabled();
-  this.graph.setEnabled(!1);
-  var p = d.getTranslate();
-  d.translate = new mxPoint(a,
-    b);
-  a = null;
-  try {
-    var q = [this.graph.getModel().getRoot()];
-    a = new mxTemporaryCellStates(d, c, q)
-  } finally {
-    if (mxClient.IS_IE) d.overlayPane.innerHTML = "";
-    else
-      for (c = e.firstChild; null != c;) q = c.nextSibling, b = c.nodeName.toLowerCase(), "svg" == b ? (c.setAttribute("width", parseInt(e.style.width)), c.setAttribute("height", parseInt(e.style.height))) :
-        "default" != c.style.cursor && "table" != b && c.parentNode.removeChild(c), c = q;
-    d.overlayPane.parentNode.removeChild(d.overlayPane);
-    this.graph.setEnabled(n);
-    this.graph.container = f;
-    d.canvas =
-      g;
-    d.backgroundPane = h;
-    d.drawPane = k;
-    d.overlayPane = l;
-    d.translate = p;
-    a.destroy();
-    d.setEventsEnabled(m)
-  }
-};
-mxPrintPreview.prototype.getCoverPages = function() {
-  return null
-};
-mxPrintPreview.prototype.getAppendices = function() {
-  return null
-};
-mxPrintPreview.prototype.print = function() {
-  var a = this.open();
-  null != a && a.print()
-};
-mxPrintPreview.prototype.close = function() {
-  null != this.wnd && (this.wnd.close(), this.wnd = null)
-};
-
-function mxStylesheet() {
-  this.styles = {};
-  this.putDefaultVertexStyle(this.createDefaultVertexStyle());
-  this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())
-}
-mxStylesheet.prototype.createDefaultVertexStyle = function() {
-  var a = {};
-  a[mxConstants.STYLE_SHAPE] = mxConstants.SHAPE_RECTANGLE;
-  a[mxConstants.STYLE_PERIMETER] = mxPerimeter.RectanglePerimeter;
-  a[mxConstants.STYLE_VERTICAL_ALIGN] = mxConstants.ALIGN_MIDDLE;
-  a[mxConstants.STYLE_ALIGN] = mxConstants.ALIGN_CENTER;
-  a[mxConstants.STYLE_FILLCOLOR] = "#C3D9FF";
-  a[mxConstants.STYLE_STROKECOLOR] = "#6482B9";
-  a[mxConstants.STYLE_FONTCOLOR] = "#774400";
-  return a
-};
-mxStylesheet.prototype.createDefaultEdgeStyle = function() {
-  var a = {};
-  a[mxConstants.STYLE_SHAPE] = mxConstants.SHAPE_CONNECTOR;
-  a[mxConstants.STYLE_ENDARROW] = mxConstants.ARROW_CLASSIC;
-  a[mxConstants.STYLE_VERTICAL_ALIGN] = mxConstants.ALIGN_MIDDLE;
-  a[mxConstants.STYLE_ALIGN] = mxConstants.ALIGN_CENTER;
-  a[mxConstants.STYLE_STROKECOLOR] = "#6482B9";
-  a[mxConstants.STYLE_FONTCOLOR] = "#446299";
-  return a
-};
-mxStylesheet.prototype.putDefaultVertexStyle = function(a) {
-  this.putCellStyle("defaultVertex", a)
-};
-mxStylesheet.prototype.putDefaultEdgeStyle = function(a) {
-  this.putCellStyle("defaultEdge", a)
-};
-mxStylesheet.prototype.getDefaultVertexStyle = function() {
-  return this.styles.defaultVertex
-};
-mxStylesheet.prototype.getDefaultEdgeStyle = function() {
-  return this.styles.defaultEdge
-};
-mxStylesheet.prototype.putCellStyle = function(a, b) {
-  this.styles[a] = b
-};
-mxStylesheet.prototype.getCellStyle = function(a, b) {
-  var c = b;
-  if (null != a && 0 < a.length)
-    for (var d = a.split(";"), c = null != c && ";" != a.charAt(0) ? mxUtils.clone(c) : {}, e = 0; e < d.length; e++) {
-      var f = d[e],
-        g = f.indexOf("\x3d");
-      if (0 <= g) {
-        var h = f.substring(0, g),
-          f = f.substring(g + 1);
-        f == mxConstants.NONE ? delete c[h] : mxUtils.isNumeric(f) ? c[h] = parseFloat(f) : c[h] = f
-      } else if (f = this.styles[f], null != f)
-        for (h in f) c[h] = f[h]
-    }
-  return c
-};
-
-function mxCellState(a, b, c) {
-  this.view = a;
-  this.cell = b;
-  this.style = c;
-  this.origin = new mxPoint;
-  this.absoluteOffset = new mxPoint
-}
-mxCellState.prototype = new mxRectangle;
-mxCellState.prototype.constructor = mxCellState;
-mxCellState.prototype.view = null;
-mxCellState.prototype.cell = null;
-mxCellState.prototype.style = null;
-mxCellState.prototype.invalid = !0;
-mxCellState.prototype.invalidOrder = !1;
-mxCellState.prototype.orderChanged = !1;
-mxCellState.prototype.origin = null;
-mxCellState.prototype.absolutePoints = null;
-mxCellState.prototype.absoluteOffset = null;
-mxCellState.prototype.visibleSourceState = null;
-mxCellState.prototype.visibleTargetState = null;
-mxCellState.prototype.terminalDistance = 0;
-mxCellState.prototype.length = 0;
-mxCellState.prototype.segments = null;
-mxCellState.prototype.shape = null;
-mxCellState.prototype.text = null;
-mxCellState.prototype.getPerimeterBounds = function(a, b) {
-  a = a || 0;
-  b = null != b ? b : new mxRectangle(this.x, this.y, this.width, this.height);
-  if (null != this.shape && null != this.shape.stencil) {
-    var c = this.shape.stencil.computeAspect(this.style, b.x, b.y, b.width, b.height);
-    b.x = c.x;
-    b.y = c.y;
-    b.width = this.shape.stencil.w0 * c.width;
-    b.height = this.shape.stencil.h0 * c.height
-  }
-  0 != a && b.grow(a);
-  return b
-};
-mxCellState.prototype.setAbsoluteTerminalPoint = function(a, b) {
-  b ? (null == this.absolutePoints && (this.absolutePoints = []), 0 == this.absolutePoints.length ? this.absolutePoints.push(a) : this.absolutePoints[0] = a) : null == this.absolutePoints ? (this.absolutePoints = [],
-    this.absolutePoints.push(null), this.absolutePoints.push(a)) : 1 == this.absolutePoints.length ? this.absolutePoints.push(a) : this.absolutePoints[this.absolutePoints.length - 1] = a
-};
-mxCellState.prototype.setCursor = function(a) {
-  null != this.shape && this.shape.setCursor(a);
-  null != this.text && this.text.setCursor(a)
-};
-mxCellState.prototype.getVisibleTerminal = function(a) {
-  a = this.getVisibleTerminalState(a);
-  return null != a ? a.cell : null
-};
-mxCellState.prototype.getVisibleTerminalState = function(a) {
-  return a ? this.visibleSourceState : this.visibleTargetState
-};
-mxCellState.prototype.setVisibleTerminalState = function(a, b) {
-  b ? this.visibleSourceState = a : this.visibleTargetState = a
-};
-mxCellState.prototype.destroy = function() {
-  this.view.graph.cellRenderer.destroy(this)
-};
-mxCellState.prototype.clone = function() {
-  var a = new mxCellState(this.view, this.cell, this.style);
-  if (null != this.absolutePoints) {
-    a.absolutePoints = [];
-    for (var b = 0; b < this.absolutePoints.length; b++) a.absolutePoints[b] = this.absolutePoints[b].clone()
-  }
-  null != this.origin && (a.origin = this.origin.clone());
-  null != this.absoluteOffset && (a.absoluteOffset = this.absoluteOffset.clone());
-  null != this.boundingBox && (a.boundingBox = this.boundingBox.clone());
-  a.terminalDistance = this.terminalDistance;
-  a.segments = this.segments;
-  a.length =
-    this.length;
-  a.x = this.x;
-  a.y = this.y;
-  a.width = this.width;
-  a.height = this.height;
-  return a
-};
-
-function mxGraphSelectionModel(a) {
-  this.graph = a;
-  this.cells = []
-}
-mxGraphSelectionModel.prototype = new mxEventSource;
-mxGraphSelectionModel.prototype.constructor = mxGraphSelectionModel;
-mxGraphSelectionModel.prototype.doneResource = "none" != mxClient.language ? "done" : "";
-mxGraphSelectionModel.prototype.updatingSelectionResource = "none" != mxClient.language ? "updatingSelection" : "";
-mxGraphSelectionModel.prototype.graph = null;
-mxGraphSelectionModel.prototype.singleSelection = !1;
-mxGraphSelectionModel.prototype.isSingleSelection = function() {
-  return this.singleSelection
-};
-mxGraphSelectionModel.prototype.setSingleSelection = function(a) {
-  this.singleSelection = a
-};
-mxGraphSelectionModel.prototype.isSelected = function(a) {
-  return null != a ? 0 <= mxUtils.indexOf(this.cells, a) : !1
-};
-mxGraphSelectionModel.prototype.isEmpty = function() {
-  return 0 == this.cells.length
-};
-mxGraphSelectionModel.prototype.clear = function() {
-  this.changeSelection(null, this.cells)
-};
-mxGraphSelectionModel.prototype.setCell = function(a) {
-  null != a && this.setCells([a])
-};
-mxGraphSelectionModel.prototype.setCells = function(a) {
-  if (null != a) {
-    this.singleSelection && (a = [this.getFirstSelectableCell(a)]);
-    for (var b = [], c = 0; c < a.length; c++) this.graph.isCellSelectable(a[c]) && b.push(a[c]);
-    this.changeSelection(b, this.cells)
-  }
-};
-mxGraphSelectionModel.prototype.getFirstSelectableCell = function(a) {
-  if (null != a)
-    for (var b = 0; b < a.length; b++)
-      if (this.graph.isCellSelectable(a[b])) return a[b];
-  return null
-};
-mxGraphSelectionModel.prototype.addCell = function(a) {
-  null != a && this.addCells([a])
-};
-mxGraphSelectionModel.prototype.addCells = function(a) {
-  if (null != a) {
-    var b = null;
-    this.singleSelection && (b = this.cells, a = [this.getFirstSelectableCell(a)]);
-    for (var c = [], d = 0; d < a.length; d++) !this.isSelected(a[d]) && this.graph.isCellSelectable(a[d]) && c.push(a[d]);
-    this.changeSelection(c, b)
-  }
-};
-mxGraphSelectionModel.prototype.removeCell = function(a) {
-  null != a && this.removeCells([a])
-};
-mxGraphSelectionModel.prototype.removeCells = function(a) {
-  if (null != a) {
-    for (var b = [], c = 0; c < a.length; c++) this.isSelected(a[c]) && b.push(a[c]);
-    this.changeSelection(null, b)
-  }
-};
-mxGraphSelectionModel.prototype.changeSelection = function(a, b) {
-  if (null != a && 0 < a.length && null != a[0] || null != b && 0 < b.length && null != b[0]) {
-    var c = new mxSelectionChange(this, a, b);
-    c.execute();
-    var d = new mxUndoableEdit(this, !1);
-    d.add(c);
-    this.fireEvent(new mxEventObject(mxEvent.UNDO, "edit", d))
-  }
-};
-mxGraphSelectionModel.prototype.cellAdded = function(a) {
-  null != a && !this.isSelected(a) && this.cells.push(a)
-};
-mxGraphSelectionModel.prototype.cellRemoved = function(a) {
-  null != a && (a = mxUtils.indexOf(this.cells, a), 0 <= a && this.cells.splice(a, 1))
-};
-
-function mxSelectionChange(a, b, c) {
-  this.selectionModel = a;
-  this.added = null != b ? b.slice() : null;
-  this.removed = null != c ? c.slice() : null
-}
-mxSelectionChange.prototype.execute = function() {
-  var a = mxLog.enter("mxSelectionChange.execute");
-  window.status = mxResources.get(this.selectionModel.updatingSelectionResource) || this.selectionModel.updatingSelectionResource;
-  if (null != this.removed)
-    for (var b = 0; b < this.removed.length; b++) this.selectionModel.cellRemoved(this.removed[b]);
-  if (null != this.added)
-    for (b = 0; b < this.added.length; b++) this.selectionModel.cellAdded(this.added[b]);
-  b = this.added;
-  this.added = this.removed;
-  this.removed = b;
-  window.status = mxResources.get(this.selectionModel.doneResource) ||
-    this.selectionModel.doneResource;
-  mxLog.leave("mxSelectionChange.execute", a);
-  this.selectionModel.fireEvent(new mxEventObject(mxEvent.CHANGE, "added", this.added, "removed", this.removed))
-};
-
-function mxCellEditor(a) {
-  this.graph = a
-}
-mxCellEditor.prototype.graph = null;
-mxCellEditor.prototype.textarea = null;
-mxCellEditor.prototype.editingCell = null;
-mxCellEditor.prototype.trigger = null;
-mxCellEditor.prototype.modified = !1;
-mxCellEditor.prototype.autoSize = !0;
-mxCellEditor.prototype.emptyLabelText = "";
-mxCellEditor.prototype.textNode = "";
-mxCellEditor.prototype.init = function() {
-  this.textarea = document.createElement("textarea");
-  this.textarea.className = "mxCellEditor";
-  this.textarea.style.position = "absolute";
-  this.textarea.style.overflow = "visible";
-  this.textarea.setAttribute("cols", "20");
-  this.textarea.setAttribute("rows", "4");
-  mxClient.IS_NS && (this.textarea.style.resize = "none");
-  mxEvent.addListener(this.textarea, "blur", mxUtils.bind(this, function(a) {
-    this.focusLost()
-  }));
-  mxEvent.addListener(this.textarea, "keydown", mxUtils.bind(this, function(a) {
-    mxEvent.isConsumed(a) ||
-      (113 == a.keyCode || this.graph.isEnterStopsCellEditing() && 13 == a.keyCode && !mxEvent.isControlDown(a) && !mxEvent.isShiftDown(a) ? (this.graph.stopEditing(!1), mxEvent.consume(a)) :
-        27 == a.keyCode ? (this.graph.stopEditing(!0), mxEvent.consume(a)) : (this.clearOnChange && (this.clearOnChange = !1, this.textarea.value = ""), this.setModified(!0)))
-  }));
-  mxEvent.addListener(this.textarea, "keypress", mxUtils.bind(this, function(a) {
-    this.autoSize && !mxEvent.isConsumed(a) && setTimeout(mxUtils.bind(this, function() {
-      this.resize()
-    }), 0)
-  }))
-};
-mxCellEditor.prototype.resize = function() {
-  if (null != this.textDiv) {
-    var a = this.graph.getView().getState(this.editingCell),
-      b = this.graph.isLabelClipped(a.cell),
-      c = this.graph.isWrapping(a.cell);
-    if (this.graph.getModel().isEdge(a.cell)) this.bounds.x = a.absoluteOffset.x, this.bounds.y = a.absoluteOffset.y, this.bounds.width = 0, this.bounds.height = 0;
-    else if (null != this.bounds) {
-      this.bounds.x = a.x;
-      this.bounds.y = a.y;
-      this.bounds.width = a.width;
-      this.bounds.height = a.height;
-      var d = mxUtils.getValue(a.style, mxConstants.STYLE_LABEL_POSITION,
-        mxConstants.ALIGN_CENTER);
-      d == mxConstants.ALIGN_LEFT ? this.bounds.x -= a.width : d == mxConstants.ALIGN_RIGHT && (this.bounds.x += a.width);
-      d = mxUtils.getValue(a.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE);
-      d == mxConstants.ALIGN_TOP ? this.bounds.y -= a.height : d == mxConstants.ALIGN_BOTTOM && (this.bounds.y += a.height)
-    }
-    d = this.textarea.value;
-    if ("\n" == d.charAt(d.length - 1) || "" == d) d += "\x26nbsp;";
-    d = mxUtils.htmlEntities(d, !1);
-    c ? (this.textDiv.style.whiteSpace = "normal", this.textDiv.style.width = this.bounds.width +
-      "px") : d = d.replace(/ /g, "\x26nbsp;");
-    d = d.replace(/\n/g, "\x3cbr/\x3e");
-    this.textDiv.innerHTML = d;
-    var d = this.textDiv.offsetWidth + 30,
-      e = this.textDiv.offsetHeight + 16,
-      d = Math.max(d, 40),
-      e = Math.max(e, 20);
-    b && (d = Math.min(this.bounds.width - 4, d), e = Math.min(this.bounds.height, e));
-    var f = null != a.text ? a.text.margin : null;
-    null == f && (f = mxUtils.getValue(a.style, mxConstants.STYLE_ALIGN, mxConstants.ALIGN_CENTER), a = mxUtils.getValue(a.style, mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE), f =
-      mxUtils.getAlignmentAsPoint(f,
-        a));
-    if (null != f) {
-      if (b || !c) this.textarea.style.left = Math.max(0, Math.round(this.bounds.x - f.x * this.bounds.width + f.x * d) - 3) + "px";
-      this.textarea.style.top = Math.max(0, Math.round(this.bounds.y - f.y * this.bounds.height + f.y * e) + 4) + "px"
-    }
-    if (b || !c) this.textarea.style.width = d + "px";
-    this.textarea.style.height = e + "px"
-  }
-};
-mxCellEditor.prototype.isModified = function() {
-  return this.modified
-};
-mxCellEditor.prototype.setModified = function(a) {
-  this.modified = a
-};
-mxCellEditor.prototype.focusLost = function() {
-  this.stopEditing(!this.graph.isInvokesStopCellEditing())
-};
-mxCellEditor.prototype.startEditing = function(a, b) {
-  null == this.textarea && this.init();
-  this.stopEditing(!0);
-  var c = this.graph.getView().getState(a);
-  if (null != c) {
-    this.editingCell = a;
-    this.trigger = b;
-    this.textNode = null;
-    null != c.text && this.isHideLabel(c) && (this.textNode = c.text.node, this.textNode.style.visibility = "hidden");
-    var d = this.graph.getView().scale,
-      d = mxUtils.getValue(c.style, mxConstants.STYLE_FONTSIZE, mxConstants.DEFAULT_FONTSIZE) * d,
-      e = mxUtils.getValue(c.style, mxConstants.STYLE_FONTFAMILY, mxConstants.DEFAULT_FONTFAMILY),
-      f = mxUtils.getValue(c.style, mxConstants.STYLE_FONTCOLOR, "black"),
-      g = mxUtils.getValue(c.style, mxConstants.STYLE_ALIGN, mxConstants.ALIGN_LEFT),
-      h = (mxUtils.getValue(c.style, mxConstants.STYLE_FONTSTYLE, 0) & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD,
-      k = (mxUtils.getValue(c.style, mxConstants.STYLE_FONTSTYLE, 0) & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC,
-      l = (mxUtils.getValue(c.style, mxConstants.STYLE_FONTSTYLE, 0) & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE;
-    this.textarea.style.fontSize = Math.round(d) +
-      "px";
-    this.textarea.style.lineHeight = Math.round(d * mxConstants.LINE_HEIGHT) + "px";
-    this.textarea.style.fontFamily = e;
-    this.textarea.style.textAlign = g;
-    this.textarea.style.color = f;
-    this.textarea.style.fontWeight = h ? "bold" : "normal";
-    this.textarea.style.fontStyle = k ? "italic" : "";
-    this.textarea.style.textDecoration = l ? "underline" : "";
-    this.textarea.style.overflow = "auto";
-    this.textarea.style.outline = "none";
-    this.bounds = d = this.getEditorBounds(c);
-    this.textarea.style.left = d.x + "px";
-    this.textarea.style.top = d.y + "px";
-    this.textarea.style.width =
-      d.width + "px";
-    this.textarea.style.height = d.height + "px";
-    this.textarea.style.zIndex = 5;
-    c = this.getInitialValue(c, b);
-    null == c || 0 == c.length ? (c = this.getEmptyLabelText(), this.clearOnChange = !0) : this.clearOnChange = !1;
-    this.setModified(!1);
-    this.textarea.value = c;
-    this.graph.container.appendChild(this.textarea);
-    "none" != this.textarea.style.display && (this.autoSize && (this.textDiv = this.createTextDiv(), document.body.appendChild(this.textDiv), this.resize()), this.textarea.focus(), this.textarea.select())
-  }
-};
-mxCellEditor.prototype.createTextDiv = function() {
-  var a = document.createElement("div"),
-    b = a.style;
-  b.position = "absolute";
-  b.whiteSpace = "nowrap";
-  b.visibility = "hidden";
-  b.display = mxClient.IS_QUIRKS ? "inline" : "inline-block";
-  b.zoom = "1";
-  b.verticalAlign = "top";
-  b.lineHeight = this.textarea.style.lineHeight;
-  b.fontSize = this.textarea.style.fontSize;
-  b.fontFamily = this.textarea.style.fontFamily;
-  b.fontWeight = this.textarea.style.fontWeight;
-  b.textAlign = this.textarea.style.textAlign;
-  b.fontStyle = this.textarea.style.fontStyle;
-  b.textDecoration = this.textarea.style.textDecoration;
-  return a
-};
-mxCellEditor.prototype.stopEditing = function(a) {
-  null != this.editingCell && (null != this.textNode && (this.textNode.style.visibility = "visible", this.textNode = null), !a && this.isModified() && this.graph.labelChanged(this.editingCell, this
-      .getCurrentValue(), this.trigger), null != this.textDiv && (document.body.removeChild(this.textDiv), this.textDiv = null), this.bounds = this.trigger = this.editingCell = null, this.textarea
-    .blur(), this.textarea.parentNode.removeChild(this.textarea))
-};
-mxCellEditor.prototype.getInitialValue = function(a, b) {
-  return this.graph.getEditingValue(a.cell, b)
-};
-mxCellEditor.prototype.getCurrentValue = function() {
-  return this.textarea.value.replace(/\r/g, "")
-};
-mxCellEditor.prototype.isHideLabel = function(a) {
-  return !0
-};
-mxCellEditor.prototype.getMinimumSize = function(a) {
-  var b = this.graph.getView().scale;
-  return new mxRectangle(0, 0, null == a.text ? 30 : a.text.size * b + 20, "left" == this.textarea.style.textAlign ? 120 : 40)
-};
-mxCellEditor.prototype.getEditorBounds = function(a) {
-  var b = this.graph.getModel().isEdge(a.cell),
-    c = this.graph.getView().scale,
-    d = this.getMinimumSize(a),
-    e = d.width,
-    d = d.height,
-    f = parseInt(a.style[mxConstants.STYLE_SPACING] || 2) * c,
-    g = parseInt(a.style[mxConstants.STYLE_SPACING_TOP] || 0) * c + f,
-    h = parseInt(a.style[mxConstants.STYLE_SPACING_RIGHT] || 0) * c + f,
-    k = parseInt(a.style[mxConstants.STYLE_SPACING_BOTTOM] || 0) * c + f,
-    c = parseInt(a.style[mxConstants.STYLE_SPACING_LEFT] || 0) * c + f,
-    h = new mxRectangle(a.x, a.y, Math.max(e, a.width -
-      c - h), Math.max(d, a.height - g - k));
-  b ? (h.x = a.absoluteOffset.x, h.y = a.absoluteOffset.y, null != a.text && null != a.text.boundingBox && (0 < a.text.boundingBox.x && (h.x = a.text.boundingBox.x), 0 < a.text.boundingBox.y && (h.y =
-    a.text.boundingBox.y))) : null != a.text && null != a.text.boundingBox && (h.x = Math.min(h.x, a.text.boundingBox.x), h.y = Math.min(h.y, a.text.boundingBox.y));
-  h.x += c;
-  h.y += g;
-  null != a.text && null != a.text.boundingBox && (b ? (h.width = Math.max(e, a.text.boundingBox.width), h.height = Math.max(d, a.text.boundingBox.height)) : (h.width =
-    Math.max(h.width, a.text.boundingBox.width), h.height = Math.max(h.height, a.text.boundingBox.height)));
-  this.graph.getModel().isVertex(a.cell) && (b = mxUtils.getValue(a.style, mxConstants.STYLE_LABEL_POSITION, mxConstants.ALIGN_CENTER), b == mxConstants.ALIGN_LEFT ? h.x -= a.width : b ==
-    mxConstants.ALIGN_RIGHT && (h.x += a.width), b = mxUtils.getValue(a.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE), b == mxConstants.ALIGN_TOP ? h.y -= a.height :
-    b == mxConstants.ALIGN_BOTTOM && (h.y += a.height));
-  return h
-};
-mxCellEditor.prototype.getEmptyLabelText = function(a) {
-  return this.emptyLabelText
-};
-mxCellEditor.prototype.getEditingCell = function() {
-  return this.editingCell
-};
-mxCellEditor.prototype.destroy = function() {
-  null != this.textarea && (mxEvent.release(this.textarea), null != this.textarea.parentNode && this.textarea.parentNode.removeChild(this.textarea), this.textarea = null)
-};
-
-function mxCellRenderer() {}
-mxCellRenderer.prototype.defaultEdgeShape = mxConnector;
-mxCellRenderer.prototype.defaultVertexShape = mxRectangleShape;
-mxCellRenderer.prototype.defaultTextShape = mxText;
-mxCellRenderer.prototype.legacyControlPosition = !0;
-mxCellRenderer.prototype.defaultShapes = {};
-mxCellRenderer.registerShape = function(a, b) {
-  mxCellRenderer.prototype.defaultShapes[a] = b
-};
-mxCellRenderer.registerShape(mxConstants.SHAPE_RECTANGLE, mxRectangleShape);
-mxCellRenderer.registerShape(mxConstants.SHAPE_ELLIPSE, mxEllipse);
-mxCellRenderer.registerShape(mxConstants.SHAPE_RHOMBUS, mxRhombus);
-mxCellRenderer.registerShape(mxConstants.SHAPE_CYLINDER, mxCylinder);
-mxCellRenderer.registerShape(mxConstants.SHAPE_CONNECTOR, mxConnector);
-mxCellRenderer.registerShape(mxConstants.SHAPE_ACTOR, mxActor);
-mxCellRenderer.registerShape(mxConstants.SHAPE_TRIANGLE, mxTriangle);
-mxCellRenderer.registerShape(mxConstants.SHAPE_HEXAGON, mxHexagon);
-mxCellRenderer.registerShape(mxConstants.SHAPE_CLOUD, mxCloud);
-mxCellRenderer.registerShape(mxConstants.SHAPE_LINE, mxLine);
-mxCellRenderer.registerShape(mxConstants.SHAPE_ARROW, mxArrow);
-mxCellRenderer.registerShape(mxConstants.SHAPE_DOUBLE_ELLIPSE, mxDoubleEllipse);
-mxCellRenderer.registerShape(mxConstants.SHAPE_SWIMLANE, mxSwimlane);
-mxCellRenderer.registerShape(mxConstants.SHAPE_IMAGE, mxImageShape);
-mxCellRenderer.registerShape(mxConstants.SHAPE_LABEL, mxLabel);
-mxCellRenderer.prototype.initialize = function(a, b) {
-  var c = a.view.graph.getModel();
-  if (null != a.view.graph.container && null == a.shape && a.cell != a.view.currentRoot && (c.isVertex(a.cell) || c.isEdge(a.cell)))
-    if (this.createShape(a), null != a.shape && (null == b || b)) this.initializeShape(a), a.view.graph.ordered || c.isEdge(a.cell) ? a.invalidOrder = !0 : a.view.graph.keepEdgesInForeground &&
-      null != this.firstEdge && (this.firstEdge.parentNode == a.shape.node.parentNode ? this.insertState(a, this.firstEdge) : this.firstEdge = null), a.shape.scale =
-      a.view.scale, this.createCellOverlays(a), this.installListeners(a)
-};
-mxCellRenderer.prototype.initializeShape = function(a) {
-  a.shape.init(a.view.getDrawPane())
-};
-mxCellRenderer.prototype.getPreviousStateInContainer = function(a, b) {
-  for (var c = null, d = a.view.graph, e = d.getModel(), f = a.cell, g = e.getParent(f); null != g && null == c;) c = this.findPreviousStateInContainer(d, g, f, b), f = g, g = e.getParent(f);
-  return c
-};
-mxCellRenderer.prototype.findPreviousStateInContainer = function(a, b, c, d) {
-  var e = null,
-    f = a.getModel();
-  for (c = null != c ? b.getIndex(c) - 1 : f.getChildCount(b) - 1; 0 <= c && null == e; c--) e = this.findPreviousStateInContainer(a, f.getChildAt(b, c), null, d);
-  if (null == e && (e = a.view.getState(b), null != e && (null == e.shape || null == e.shape.node || e.shape.node.parentNode != d))) e = null;
-  return e
-};
-mxCellRenderer.prototype.order = function(a) {
-  var b = a.shape.node.parentNode,
-    c = this.getPreviousStateInContainer(a, b),
-    d = b.firstChild;
-  null != c && (d = c.shape.node, null != c.text && (null != c.text.node && c.text.node.parentNode == b) && (d = c.text.node), d = d.nextSibling);
-  this.insertState(a, d)
-};
-mxCellRenderer.prototype.orderEdge = function(a) {
-  var b = a.view,
-    c = b.graph.getModel();
-  if (b.graph.keepEdgesInForeground) {
-    if (null == this.firstEdge || null == this.firstEdge.parentNode || this.firstEdge.parentNode != a.shape.node.parentNode) this.firstEdge = a.shape.node
-  } else if (b.graph.keepEdgesInBackground) {
-    var d = a.shape.node,
-      e = d.parentNode,
-      c = c.getParent(a.cell),
-      b = b.getState(c),
-      e = null != b && null != b.shape && null != b.shape.node ? b.shape.node.nextSibling : e.firstChild;
-    null != e && e != d && this.insertState(a, e)
-  }
-};
-mxCellRenderer.prototype.insertState = function(a, b) {
-  a.shape.node.parentNode.insertBefore(a.shape.node, b);
-  null != a.text && (null != a.text.node && a.text.node.parentNode == a.shape.node.parentNode) && a.shape.node.parentNode.insertBefore(a.text.node, a.shape.node.nextSibling)
-};
-mxCellRenderer.prototype.createShape = function(a) {
-  if (null != a.style) {
-    var b = mxStencilRegistry.getStencil(a.style[mxConstants.STYLE_SHAPE]);
-    null != b ? a.shape = new mxShape(b) : (b = this.getShapeConstructor(a), a.shape = new b);
-    a.shape.points = a.absolutePoints;
-    a.shape.bounds = new mxRectangle(a.x, a.y, a.width, a.height);
-    a.shape.dialect = a.view.graph.dialect;
-    this.configureShape(a)
-  }
-};
-mxCellRenderer.prototype.getShape = function(a) {
-  return null != a ? mxCellRenderer.prototype.defaultShapes[a] : null
-};
-mxCellRenderer.prototype.getShapeConstructor = function(a) {
-  var b = this.getShape(a.style[mxConstants.STYLE_SHAPE]);
-  null == b && (b = a.view.graph.getModel().isEdge(a.cell) ? this.defaultEdgeShape : this.defaultVertexShape);
-  return b
-};
-mxCellRenderer.prototype.configureShape = function(a) {
-  a.shape.apply(a);
-  a.shape.image = a.view.graph.getImage(a);
-  a.shape.indicatorShape = this.getShape(a.view.graph.getIndicatorShape(a));
-  a.shape.indicatorColor = a.view.graph.getIndicatorColor(a);
-  a.shape.indicatorGradientColor = a.view.graph.getIndicatorGradientColor(a);
-  a.shape.indicatorDirection = a.style[mxConstants.STYLE_INDICATOR_DIRECTION];
-  a.shape.indicatorImage = a.view.graph.getIndicatorImage(a);
-  this.postConfigureShape(a)
-};
-mxCellRenderer.prototype.postConfigureShape = function(a) {
-  null != a.shape && (this.resolveColor(a, "indicatorColor", mxConstants.STYLE_FILLCOLOR), this.resolveColor(a, "indicatorGradientColor", mxConstants.STYLE_GRADIENTCOLOR), this.resolveColor(a,
-    "fill", mxConstants.STYLE_FILLCOLOR), this.resolveColor(a, "stroke", mxConstants.STYLE_STROKECOLOR), this.resolveColor(a, "gradient", mxConstants.STYLE_GRADIENTCOLOR))
-};
-mxCellRenderer.prototype.resolveColor = function(a, b, c) {
-  var d = a.shape[b],
-    e = a.view.graph,
-    f = null;
-  "inherit" == d ? f = e.model.getParent(a.cell) : "swimlane" == d ? (f = null != e.model.getTerminal(a.cell, !1) ? e.model.getTerminal(a.cell, !1) : a.cell, f = e.getSwimlane(f), c = e.swimlaneIndicatorColorAttribute) :
-    "indicated" == d && (a.shape[b] = a.shape.indicatorColor);
-  null != f && (d = e.getView().getState(f), a.shape[b] = null, null != d && (a.shape[b] = null != d.shape && "indicatorColor" != b ? d.shape[b] : d.style[c]))
-};
-mxCellRenderer.prototype.getLabelValue = function(a) {
-  return a.view.graph.getLabel(a.cell)
-};
-mxCellRenderer.prototype.createLabel = function(a, b) {
-  var c = a.view.graph;
-  c.getModel().isEdge(a.cell);
-  if (0 < a.style[mxConstants.STYLE_FONTSIZE] || null == a.style[mxConstants.STYLE_FONTSIZE]) {
-    var d = c.isHtmlLabel(a.cell) || null != b && mxUtils.isNode(b);
-    a.text = new this.defaultTextShape(b, new mxRectangle, a.style[mxConstants.STYLE_ALIGN] || mxConstants.ALIGN_CENTER, c.getVerticalAlign(a), a.style[mxConstants.STYLE_FONTCOLOR], a.style[
-        mxConstants.STYLE_FONTFAMILY], a.style[mxConstants.STYLE_FONTSIZE], a.style[mxConstants.STYLE_FONTSTYLE],
-      a.style[mxConstants.STYLE_SPACING], a.style[mxConstants.STYLE_SPACING_TOP], a.style[mxConstants.STYLE_SPACING_RIGHT], a.style[mxConstants.STYLE_SPACING_BOTTOM], a.style[mxConstants.STYLE_SPACING_LEFT],
-      a.style[mxConstants.STYLE_HORIZONTAL], a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR], a.style[mxConstants.STYLE_LABEL_BORDERCOLOR], c.isWrapping(a.cell) && c.isHtmlLabel(a.cell), c.isLabelClipped(
-        a.cell), a.style[mxConstants.STYLE_OVERFLOW], a.style[mxConstants.STYLE_LABEL_PADDING]);
-    a.text.opacity = mxUtils.getValue(a.style,
-      mxConstants.STYLE_TEXT_OPACITY, 100);
-    a.text.dialect = d ? mxConstants.DIALECT_STRICTHTML : a.view.graph.dialect;
-    a.text.state = a;
-    this.initializeLabel(a);
-    var e = !1,
-      f = function(b) {
-        var d = a;
-        if (mxClient.IS_TOUCH || e) d = mxEvent.getClientX(b), b = mxEvent.getClientY(b), b = mxUtils.convertPoint(c.container, d, b), d = c.view.getState(c.getCellAt(b.x, b.y));
-        return d
-      };
-    mxEvent.addGestureListeners(a.text.node, mxUtils.bind(this, function(b) {
-      this.isLabelEvent(a, b) && (c.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(b, a)), e = c.dialect !=
-        mxConstants.DIALECT_SVG && "IMG" == mxEvent.getSource(b).nodeName)
-    }), mxUtils.bind(this, function(b) {
-      this.isLabelEvent(a, b) && c.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(b, f(b)))
-    }), mxUtils.bind(this, function(b) {
-      this.isLabelEvent(a, b) && (c.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(b, f(b))), e = !1)
-    }));
-    mxEvent.addListener(a.text.node, "dblclick", mxUtils.bind(this, function(b) {
-      this.isLabelEvent(a, b) && (c.dblClick(b, a.cell), mxEvent.consume(b))
-    }))
-  }
-};
-mxCellRenderer.prototype.initializeLabel = function(a) {
-  var b = a.view.graph;
-  a.text.dialect != mxConstants.DIALECT_SVG && (mxClient.IS_SVG && mxClient.NO_FO ? a.text.init(b.container) : mxUtils.isVml(a.view.getDrawPane()) && (null != a.shape.label ? a.text.init(a.shape.label) :
-    a.text.init(a.shape.node)));
-  null == a.text.node && (a.text.init(a.view.getDrawPane()), null != a.shape && null != a.text && a.shape.node.parentNode.insertBefore(a.text.node, a.shape.node.nextSibling))
-};
-mxCellRenderer.prototype.createCellOverlays = function(a) {
-  var b = a.view.graph.getCellOverlays(a.cell),
-    c = null;
-  if (null != b)
-    for (var c = new mxDictionary, d = 0; d < b.length; d++) {
-      var e = null != a.overlays ? a.overlays.remove(b[d]) : null;
-      null == e && (e = new mxImageShape(new mxRectangle, b[d].image.src), e.dialect = a.view.graph.dialect, e.preserveImageAspect = !1, e.overlay = b[d], this.initializeOverlay(a, e), this.installCellOverlayListeners(
-        a, b[d], e), null != b[d].cursor && (e.node.style.cursor = b[d].cursor));
-      c.put(b[d], e)
-    }
-  null != a.overlays &&
-    a.overlays.visit(function(a, b) {
-      b.destroy()
-    });
-  a.overlays = c
-};
-mxCellRenderer.prototype.initializeOverlay = function(a, b) {
-  b.init(a.view.getOverlayPane())
-};
-mxCellRenderer.prototype.installCellOverlayListeners = function(a, b, c) {
-  var d = a.view.graph;
-  mxEvent.addListener(c.node, "click", function(c) {
-    d.isEditing() && d.stopEditing(!d.isInvokesStopCellEditing());
-    b.fireEvent(new mxEventObject(mxEvent.CLICK, "event", c, "cell", a.cell))
-  });
-  mxEvent.addGestureListeners(c.node, function(a) {
-    mxEvent.consume(a)
-  }, function(b) {
-    d.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(b, a))
-  });
-  mxClient.IS_TOUCH && mxEvent.addListener(c.node, "touchend", function(c) {
-    b.fireEvent(new mxEventObject(mxEvent.CLICK,
-      "event", c, "cell", a.cell))
-  })
-};
-mxCellRenderer.prototype.createControl = function(a) {
-  var b = a.view.graph,
-    c = b.getFoldingImage(a);
-  if (b.foldingEnabled && null != c) {
-    if (null == a.control) {
-      var d = new mxRectangle(0, 0, c.width, c.height);
-      a.control = new mxImageShape(d, c.src);
-      a.control.preserveImageAspect = !1;
-      a.control.dialect = b.dialect;
-      this.initControl(a, a.control, !0, function(c) {
-        if (b.isEnabled()) {
-          var d = !b.isCellCollapsed(a.cell);
-          b.foldCells(d, !1, [a.cell]);
-          mxEvent.consume(c)
-        }
-      })
-    }
-  } else null != a.control && (a.control.destroy(), a.control = null)
-};
-mxCellRenderer.prototype.initControl = function(a, b, c, d) {
-  var e = a.view.graph;
-  e.isHtmlLabel(a.cell) && mxClient.NO_FO && e.dialect == mxConstants.DIALECT_SVG ? (b.dialect = mxConstants.DIALECT_PREFERHTML, b.init(e.container), b.node.style.zIndex = 1) : b.init(a.view.getOverlayPane());
-  b = b.innerNode || b.node;
-  d && (e.isEnabled() && (b.style.cursor = "pointer"), mxEvent.addListener(b, "click", d));
-  c && mxEvent.addGestureListeners(b, function(b) {
-    e.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(b, a));
-    mxEvent.consume(b)
-  }, function(b) {
-    e.fireMouseEvent(mxEvent.MOUSE_MOVE,
-      new mxMouseEvent(b, a))
-  });
-  return b
-};
-mxCellRenderer.prototype.isShapeEvent = function(a, b) {
-  return !0
-};
-mxCellRenderer.prototype.isLabelEvent = function(a, b) {
-  return !0
-};
-mxCellRenderer.prototype.installListeners = function(a) {
-  var b = a.view.graph,
-    c = function(c) {
-      var d = a;
-      if (b.dialect != mxConstants.DIALECT_SVG && "IMG" == mxEvent.getSource(c).nodeName || mxClient.IS_TOUCH) d = mxEvent.getClientX(c), c = mxEvent.getClientY(c), c = mxUtils.convertPoint(b.container,
-        d, c), d = b.view.getState(b.getCellAt(c.x, c.y));
-      return d
-    },
-    d = !1;
-  mxEvent.addListener(a.shape.node, "gesturestart", mxUtils.bind(this, function(a) {
-    b.lastTouchTime = 0;
-    d = !0;
-    mxEvent.consume(a)
-  }));
-  mxEvent.addGestureListeners(a.shape.node, mxUtils.bind(this,
-    function(c) {
-      this.isShapeEvent(a, c) && !d ? b.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(c, null != a.shape && mxEvent.getSource(c) == a.shape.content ? null : a)) : d && mxEvent.consume(c)
-    }), mxUtils.bind(this, function(e) {
-    this.isShapeEvent(a, e) && !d ? b.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(e, null != a.shape && mxEvent.getSource(e) == a.shape.content ? null : c(e))) : d && mxEvent.consume(
-      e)
-  }), mxUtils.bind(this, function(e) {
-    this.isShapeEvent(a, e) && !d ? b.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(e, null != a.shape &&
-      mxEvent.getSource(e) == a.shape.content ? null : c(e))) : d && mxEvent.consume(e)
-  }));
-  var e = mxClient.IS_TOUCH ? "gestureend" : "dblclick";
-  mxEvent.addListener(a.shape.node, e, mxUtils.bind(this, function(c) {
-    d = !1;
-    "gestureend" == e ? (b.lastTouchTime = 0, b.gestureEnabled && (b.handleGesture(a, c), mxEvent.consume(c))) : this.isShapeEvent(a, c) && (b.dblClick(c, null != a.shape && mxEvent.getSource(
-      c) == a.shape.content ? null : a.cell), mxEvent.consume(c))
-  }))
-};
-mxCellRenderer.prototype.redrawLabel = function(a, b) {
-  var c = this.getLabelValue(a);
-  if (null == a.text && null != c && (mxUtils.isNode(c) || 0 < c.length)) this.createLabel(a, c);
-  else if (null != a.text && (null == c || 0 == c.length)) a.text.destroy(), a.text = null;
-  if (null != a.text) {
-    var d = a.view.graph,
-      e = d.isWrapping(a.cell),
-      d = d.isLabelClipped(a.cell),
-      f = this.getLabelBounds(a);
-    if (b || a.text.value != c || a.text.isWrapping != e || a.text.isClipping != d || a.text.scale != a.view.scale || !a.text.bounds.equals(f)) a.text.value = c, a.text.bounds = f, a.text.scale =
-      this.getTextScale(a), a.text.isWrapping = e, a.text.isClipping = d, a.text.redraw()
-  }
-};
-mxCellRenderer.prototype.getTextScale = function(a) {
-  return a.view.scale
-};
-mxCellRenderer.prototype.getLabelBounds = function(a) {
-  var b = a.view.graph,
-    c = a.view.scale,
-    d = b.getModel().isEdge(a.cell),
-    e = new mxRectangle(a.absoluteOffset.x, a.absoluteOffset.y);
-  a.text.updateMargin();
-  d ? (d = a.text.getSpacing(), e.x += d.x * c, e.y += d.y * c, b = b.getCellGeometry(a.cell), null != b && (e.width = Math.max(0, a.text.margin.x * b.width * c - a.text.spacingLeft * c - a.text.spacingRight *
-    c), e.height = Math.max(0, a.text.margin.y * b.height * c - a.text.spacingTop * c - a.text.spacingBottom * c))) : (a.text.isPaintBoundsInverted() && (d = e.x,
-      e.x = e.y, e.y = d), e.x += a.x, e.y += a.y, e.width = Math.max(1, a.width), e.height = Math.max(1, a.height), b.isSwimlane(a.cell) && (b = b.getStartSize(a.cell), 0 < b.width ? (d = Math.min(
-      e.width, b.width * c), a.shape.flipH && (e.x += e.width - d), e.width = d) : 0 < b.height && (d = Math.min(e.height, b.height * c), a.shape.flipV && (e.y += e.height - d), e.height = d)),
-    this.rotateLabelBounds(a, e));
-  return e
-};
-mxCellRenderer.prototype.rotateLabelBounds = function(a, b) {
-  if (a.text.isPaintBoundsInverted()) {
-    var c = (a.width - a.height) / 2;
-    b.x += c;
-    b.y -= c;
-    c = b.width;
-    b.width = b.height;
-    b.height = c
-  }
-  b.x -= a.text.margin.x * b.width;
-  b.y -= a.text.margin.y * b.height;
-  if ("fill" != a.style[mxConstants.STYLE_OVERFLOW]) {
-    var c = a.view.scale,
-      d = a.text.getSpacing();
-    b.x += d.x * c;
-    b.y += d.y * c;
-    b.width = Math.max(0, b.width - a.text.spacingLeft * c - a.text.spacingRight * c);
-    b.height = Math.max(0, b.height - a.text.spacingTop * c - a.text.spacingBottom * c)
-  }
-  var e = a.text.getTextRotation();
-  if (0 != e && (null != a && a.view.graph.model.isVertex(a.cell)) && (c = a.getCenterX(), d = a.getCenterY(), b.x != c || b.y != d)) e *= Math.PI / 180, pt = mxUtils.getRotatedPoint(new mxPoint(b.x,
-    b.y), Math.cos(e), Math.sin(e), new mxPoint(c, d)), b.x = pt.x, b.y = pt.y
-};
-mxCellRenderer.prototype.redrawCellOverlays = function(a, b) {
-  this.createCellOverlays(a);
-  if (null != a.overlays) {
-    var c = mxUtils.mod(mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION, 0), 90),
-      d = mxUtils.toRadians(c),
-      e = Math.cos(d),
-      f = Math.sin(d);
-    a.overlays.visit(function(d, h) {
-      var k = h.overlay.getBounds(a);
-      if (!a.view.graph.getModel().isEdge(a.cell) && null != a.shape && 0 != c) {
-        var l = k.getCenterX(),
-          m = k.getCenterY(),
-          m = mxUtils.getRotatedPoint(new mxPoint(l, m), e, f, new mxPoint(a.getCenterX(), a.getCenterY())),
-          l = m.x,
-          m = m.y;
-        k.x =
-          Math.round(l - k.width / 2);
-        k.y = Math.round(m - k.height / 2)
-      }
-      if (b || null == h.bounds || h.scale != a.view.scale || !h.bounds.equals(k)) h.bounds = k, h.scale = a.view.scale, h.redraw()
-    })
-  }
-};
-mxCellRenderer.prototype.redrawControl = function(a, b) {
-  if (null != a.control) {
-    var c = this.getControlBounds(a),
-      d = this.legacyControlPosition ? mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION, 0) : a.shape.getTextRotation(),
-      e = a.view.scale;
-    if (b || a.control.scale != e || !a.control.bounds.equals(c) || a.control.rotation != d) a.control.rotation = d, a.control.bounds = c, a.control.scale = e, a.control.redraw()
-  }
-};
-mxCellRenderer.prototype.getControlBounds = function(a) {
-  if (null != a.control) {
-    var b = a.control.scale,
-      c = a.control.bounds.width / b,
-      b = a.control.bounds.height / b,
-      d = a.view.scale,
-      e = a.getCenterX(),
-      f = a.getCenterY();
-    if (!a.view.graph.getModel().isEdge(a.cell) && (e = a.x + c * d, f = a.y + b * d, null != a.shape)) {
-      var g = a.shape.getShapeRotation();
-      if (this.legacyControlPosition) g = mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION, 0);
-      else if (a.shape.isPaintBoundsInverted()) var h = (a.width - a.height) / 2,
-        e = e + h,
-        f = f - h;
-      0 != g && (h = mxUtils.toRadians(g),
-        g = Math.cos(h), h = Math.sin(h), f = mxUtils.getRotatedPoint(new mxPoint(e, f), g, h, new mxPoint(a.getCenterX(), a.getCenterY())), e = f.x, f = f.y)
-    }
-    return a.view.graph.getModel().isEdge(a.cell), new mxRectangle(Math.round(e - c / 2 * d), Math.round(f - b / 2 * d), Math.round(c * d), Math.round(b * d))
-  }
-  return null
-};
-mxCellRenderer.prototype.redraw = function(a, b, c) {
-  if (null != a.shape) {
-    var d = !1;
-    a.view.graph.getModel().isEdge(a.cell);
-    reconfigure = null != b ? b : !1;
-    this.createControl(a);
-    if (a.orderChanged || a.invalidOrder) a.view.graph.ordered ? this.order(a) : this.orderEdge(a);
-    if (a.orderChanged || !mxUtils.equalEntries(a.shape.style, a.style)) this.configureShape(a), b = !0;
-    delete a.invalidOrder;
-    delete a.orderChanged;
-    if (b || null == a.shape.bounds || a.shape.scale != a.view.scale || !a.shape.bounds.equals(a) || !mxUtils.equalPoints(a.shape.points,
-        a.absolutePoints)) d = !0, a.shape.points = null != a.absolutePoints ? a.absolutePoints.slice() : null, a.shape.bounds = new mxRectangle(a.x, a.y, a.width, a.height), a.shape.scale = a.view
-      .scale, null == c || c ? a.shape.redraw() : a.shape.updateBoundingBox();
-    if (null == c || c) this.redrawLabel(a, d), this.redrawCellOverlays(a, d), this.redrawControl(a, d)
-  }
-};
-mxCellRenderer.prototype.destroy = function(a) {
-  null != a.shape && (null != a.text && (a.text.destroy(), a.text = null), null != a.overlays && (a.overlays.visit(function(a, c) {
-    c.destroy()
-  }), a.overlays = null), null != a.control && (a.control.destroy(), a.control = null), a.shape.destroy(), a.shape = null)
-};
-var mxEdgeStyle = {
-    EntityRelation: function(a, b, c, d, e) {
-      var f = a.view,
-        g = f.graph;
-      d = mxUtils.getValue(a.style, mxConstants.STYLE_SEGMENT, mxConstants.ENTITY_SEGMENT) * f.scale;
-      var h = a.absolutePoints,
-        k = h[0],
-        l = h[h.length - 1],
-        h = !1;
-      if (null != k) b = new mxCellState, b.x = k.x, b.y = k.y;
-      else if (null != b) {
-        var m = mxUtils.getPortConstraints(b, a, !0, mxConstants.DIRECTION_MASK_NONE);
-        m != mxConstants.DIRECTION_MASK_NONE ? h = m == mxConstants.DIRECTION_MASK_WEST : (k = g.getCellGeometry(b.cell), k.relative ? h = 0.5 >= k.x : null != c && (h = c.x + c.width < b.x))
-      } else return;
-      k = !0;
-      null != l ? (c = new mxCellState, c.x = l.x, c.y = l.y) : null != c && (m = mxUtils.getPortConstraints(c, a, !1, mxConstants.DIRECTION_MASK_NONE), m != mxConstants.DIRECTION_MASK_NONE ? k = m ==
-        mxConstants.DIRECTION_MASK_WEST : (a = g.getCellGeometry(c.cell), a.relative ? k = 0.5 >= a.x : null != b && (k = b.x + b.width < c.x)));
-      null != b && null != c && (a = h ? b.x : b.x + b.width, b = f.getRoutingCenterY(b), g = k ? c.x : c.x + c.width, c = f.getRoutingCenterY(c), f = new mxPoint(a + (h ? -d : d), b), l = new mxPoint(
-        g + (k ? -d : d), c), h == k ? (d = h ? Math.min(a, g) - d : Math.max(a, g) + d, e.push(new mxPoint(d,
-        b)), e.push(new mxPoint(d, c))) : (f.x < l.x == h ? (d = b + (c - b) / 2, e.push(f), e.push(new mxPoint(f.x, d)), e.push(new mxPoint(l.x, d))) : e.push(f), e.push(l)))
-    },
-    Loop: function(a, b, c, d, e) {
-      if (null != b) {
-        c = a.view;
-        var f = c.graph;
-        d = null != d && 0 < d.length ? d[0] : null;
-        null != d && (d = c.transformControlPoint(a, d), mxUtils.contains(b, d.x, d.y) && (d = null));
-        var g = 0,
-          h = 0,
-          k = 0,
-          l = 0,
-          f = mxUtils.getValue(a.style, mxConstants.STYLE_SEGMENT, f.gridSize) * c.scale;
-        a = mxUtils.getValue(a.style, mxConstants.STYLE_DIRECTION, mxConstants.DIRECTION_WEST);
-        a == mxConstants.DIRECTION_NORTH ||
-          a == mxConstants.DIRECTION_SOUTH ? (g = c.getRoutingCenterX(b), h = f) : (k = c.getRoutingCenterY(b), l = f);
-        null == d || d.x < b.x || d.x > b.x + b.width ? null != d ? (g = d.x, l = Math.max(Math.abs(k - d.y), l)) : a == mxConstants.DIRECTION_NORTH ? k = b.y - 2 * h : a == mxConstants.DIRECTION_SOUTH ?
-          k = b.y + b.height + 2 * h : g = a == mxConstants.DIRECTION_EAST ? b.x - 2 * l : b.x + b.width + 2 * l : null != d && (g = c.getRoutingCenterX(b), h = Math.max(Math.abs(g - d.x), l), k =
-            d.y, l = 0);
-        e.push(new mxPoint(g - h, k - l));
-        e.push(new mxPoint(g + h, k + l))
-      }
-    },
-    ElbowConnector: function(a, b, c, d, e) {
-      var f = null !=
-        d && 0 < d.length ? d[0] : null,
-        g = !1,
-        h = !1;
-      if (null != b && null != c)
-        if (null != f) var k = Math.min(b.x, c.x),
-          l = Math.max(b.x + b.width, c.x + c.width),
-          h = Math.min(b.y, c.y),
-          m = Math.max(b.y + b.height, c.y + c.height),
-          f = a.view.transformControlPoint(a, f),
-          g = f.y < h || f.y > m,
-          h = f.x < k || f.x > l;
-        else k = Math.max(b.x, c.x), l = Math.min(b.x + b.width, c.x + c.width), g = k == l, g || (h = Math.max(b.y, c.y), m = Math.min(b.y + b.height, c.y + c.height), h = h == m);
-        !h && (g || a.style[mxConstants.STYLE_ELBOW] == mxConstants.ELBOW_VERTICAL) ? mxEdgeStyle.TopToBottom(a, b, c, d, e) : mxEdgeStyle.SideToSide(a,
-        b, c, d, e)
-    },
-    SideToSide: function(a, b, c, d, e) {
-      var f = a.view;
-      d = null != d && 0 < d.length ? d[0] : null;
-      var g = a.absolutePoints,
-        h = g[0],
-        g = g[g.length - 1];
-      null != d && (d = f.transformControlPoint(a, d));
-      null != h && (b = new mxCellState, b.x = h.x, b.y = h.y);
-      null != g && (c = new mxCellState, c.x = g.x, c.y = g.y);
-      null != b && null != c && (a = Math.max(b.x, c.x), h = Math.min(b.x + b.width, c.x + c.width), a = null != d ? d.x : h + (a - h) / 2, h = f.getRoutingCenterY(b), f = f.getRoutingCenterY(c),
-        null != d && (d.y >= b.y && d.y <= b.y + b.height && (h = d.y), d.y >= c.y && d.y <= c.y + c.height && (f = d.y)), !mxUtils.contains(c,
-          a, h) && !mxUtils.contains(b, a, h) && e.push(new mxPoint(a, h)), !mxUtils.contains(c, a, f) && !mxUtils.contains(b, a, f) && e.push(new mxPoint(a, f)), 1 == e.length && (null != d ? !
-          mxUtils.contains(c, a, d.y) && !mxUtils.contains(b, a, d.y) && e.push(new mxPoint(a, d.y)) : (f = Math.max(b.y, c.y), b = Math.min(b.y + b.height, c.y + c.height), e.push(new mxPoint(a,
-            f + (b - f) / 2)))))
-    },
-    TopToBottom: function(a, b, c, d, e) {
-      var f = a.view;
-      d = null != d && 0 < d.length ? d[0] : null;
-      var g = a.absolutePoints,
-        h = g[0],
-        g = g[g.length - 1];
-      null != d && (d = f.transformControlPoint(a, d));
-      null !=
-        h && (b = new mxCellState, b.x = h.x, b.y = h.y);
-      null != g && (c = new mxCellState, c.x = g.x, c.y = g.y);
-      null != b && null != c && (h = Math.max(b.y, c.y), g = Math.min(b.y + b.height, c.y + c.height), a = f.getRoutingCenterX(b), null != d && (d.x >= b.x && d.x <= b.x + b.width) && (a = d.x), h =
-        null != d ? d.y : g + (h - g) / 2, !mxUtils.contains(c, a, h) && !mxUtils.contains(b, a, h) && e.push(new mxPoint(a, h)), a = null != d && d.x >= c.x && d.x <= c.x + c.width ? d.x : f.getRoutingCenterX(
-          c), !mxUtils.contains(c, a, h) && !mxUtils.contains(b, a, h) && e.push(new mxPoint(a, h)), 1 == e.length && (null != d && 1 ==
-          e.length ? !mxUtils.contains(c, d.x, h) && !mxUtils.contains(b, d.x, h) && e.push(new mxPoint(d.x, h)) : (f = Math.max(b.x, c.x), b = Math.min(b.x + b.width, c.x + c.width), e.push(new mxPoint(
-            f + (b - f) / 2, h)))))
-    },
-    SegmentConnector: function(a, b, c, d, e) {
-      var f = a.absolutePoints,
-        g = !0,
-        h = null,
-        k = f[0];
-      null == k && null != b ? k = new mxPoint(a.view.getRoutingCenterX(b), a.view.getRoutingCenterY(b)) : null != k && (k = k.clone());
-      var l = f.length - 1;
-      if (null != d && 0 < d.length) {
-        for (var h = a.view.transformControlPoint(a, d[0]), m = b, n = f[0], p = !1, q = !1, p = h, s = d.length, r =
-            0; 2 > r; r++) {
-          var t = null != n && n.x == p.x,
-            v = null != n && n.y == p.y,
-            w = null != m && p.y >= m.y && p.y <= m.y + m.height,
-            m = null != m && p.x >= m.x && p.x <= m.x + m.width,
-            p = v || null == n && w,
-            q = t || null == n && m;
-          if (null != n && !v && !t && (w || m)) {
-            g = w ? !1 : !0;
-            break
-          }
-          if (q || p) {
-            g = p;
-            1 == r && (g = 0 == d.length % 2 ? p : q);
-            break
-          }
-          m = c;
-          n = f[l];
-          p = a.view.transformControlPoint(a, d[s - 1])
-        }
-        g && (null != f[0] && f[0].y != h.y || null == f[0] && null != b && (h.y < b.y || h.y > b.y + b.height)) ? e.push(new mxPoint(k.x, h.y)) : !g && (null != f[0] && f[0].x != h.x || null == f[
-          0] && null != b && (h.x < b.x || h.x > b.x + b.width)) && e.push(new mxPoint(h.x,
-          k.y));
-        g ? k.y = h.y : k.x = h.x;
-        for (r = 0; r < d.length; r++) g = !g, h = a.view.transformControlPoint(a, d[r]), g ? k.y = h.y : k.x = h.x, e.push(k.clone())
-      } else h = k, g = !0;
-      k = f[l];
-      null == k && null != c && (k = new mxPoint(a.view.getRoutingCenterX(c), a.view.getRoutingCenterY(c)));
-      g && (null != f[l] && f[l].y != h.y || null == f[l] && null != c && (h.y < c.y || h.y > c.y + c.height)) ? e.push(new mxPoint(k.x, h.y)) : !g && (null != f[l] && f[l].x != h.x || null == f[l] &&
-        null != c && (h.x < c.x || h.x > c.x + c.width)) && e.push(new mxPoint(h.x, k.y));
-      if (null == f[0] && null != b)
-        for (; 1 < e.length && mxUtils.contains(b,
-            e[1].x, e[1].y);) e = e.splice(1, 1);
-      if (null == f[l] && null != c)
-        for (; 1 < e.length && mxUtils.contains(c, e[e.length - 1].x, e[e.length - 1].y);) e = e.splice(e.length - 1, 1)
-    },
-    orthBuffer: 10,
-    dirVectors: [
-      [-1, 0],
-      [0, -1],
-      [1, 0],
-      [0, 1],
-      [-1, 0],
-      [0, -1],
-      [1, 0]
-    ],
-    wayPoints1: [
-      [0, 0],
-      [0, 0],
-      [0, 0],
-      [0, 0],
-      [0, 0],
-      [0, 0],
-      [0, 0],
-      [0, 0],
-      [0, 0],
-      [0, 0],
-      [0, 0],
-      [0, 0]
-    ],
-    routePatterns: [
-      [
-        [513, 2308, 2081, 2562],
-        [513, 1090, 514, 2184, 2114, 2561],
-        [513, 1090, 514, 2564, 2184, 2562],
-        [513, 2308, 2561, 1090, 514, 2568, 2308]
-      ],
-      [
-        [514, 1057, 513, 2308, 2081, 2562],
-        [514, 2184, 2114, 2561],
-        [514, 2184,
-          2562, 1057, 513, 2564, 2184
-        ],
-        [514, 1057, 513, 2568, 2308, 2561]
-      ],
-      [
-        [1090, 514, 1057, 513, 2308, 2081, 2562],
-        [2114, 2561],
-        [1090, 2562, 1057, 513, 2564, 2184],
-        [1090, 514, 1057, 513, 2308, 2561, 2568]
-      ],
-      [
-        [2081, 2562],
-        [1057, 513, 1090, 514, 2184, 2114, 2561],
-        [1057, 513, 1090, 514, 2184, 2562, 2564],
-        [1057, 2561, 1090, 514, 2568, 2308]
-      ]
-    ],
-    inlineRoutePatterns: [
-      [null, [2114, 2568], null, null],
-      [null, [514, 2081, 2114, 2568], null, null],
-      [null, [2114, 2561], null, null],
-      [
-        [2081, 2562],
-        [1057, 2114, 2568],
-        [2184, 2562], null
-      ]
-    ],
-    vertexSeperations: [],
-    limits: [
-      [0, 0, 0, 0, 0, 0, 0, 0, 0],
-      [0, 0, 0, 0, 0, 0, 0, 0, 0]
-    ],
-    LEFT_MASK: 32,
-    TOP_MASK: 64,
-    RIGHT_MASK: 128,
-    BOTTOM_MASK: 256,
-    LEFT: 1,
-    TOP: 2,
-    RIGHT: 4,
-    BOTTOM: 8,
-    SIDE_MASK: 480,
-    CENTER_MASK: 512,
-    SOURCE_MASK: 1024,
-    TARGET_MASK: 2048,
-    VERTEX_MASK: 3072,
-    OrthConnector: function(a, b, c, d, e) {
-      var f = a.view.graph,
-        g = null == b ? !1 : f.getModel().isEdge(b.cell),
-        f = null == c ? !1 : f.getModel().isEdge(c.cell);
-      if (null != d && 0 < d.length || g || f) mxEdgeStyle.SegmentConnector(a, b, c, d, e);
-      else {
-        d = a.absolutePoints;
-        var h = d[0],
-          k = d[d.length - 1];
-        d = null != b ? b.x : h.x;
-        var g = null != b ? b.y : h.y,
-          l = null != b ? b.width :
-          1,
-          m = null != b ? b.height : 1,
-          n = null != c ? c.x : k.x,
-          p = null != c ? c.y : k.y,
-          q = null != c ? c.width : 1,
-          s = null != c ? c.height : 1,
-          f = a.view.scale * mxEdgeStyle.orthBuffer,
-          r = [mxConstants.DIRECTION_MASK_ALL, mxConstants.DIRECTION_MASK_ALL];
-        null != b && (r[0] = mxUtils.getPortConstraints(b, a, !0, mxConstants.DIRECTION_MASK_ALL));
-        null != c && (r[1] = mxUtils.getPortConstraints(c, a, !1, mxConstants.DIRECTION_MASK_ALL));
-        a = [0, 0];
-        d = [
-          [d, g, l, m],
-          [n, p, q, s]
-        ];
-        for (l = 0; 2 > l; l++) mxEdgeStyle.limits[l][1] = d[l][0] - f, mxEdgeStyle.limits[l][2] = d[l][1] - f, mxEdgeStyle.limits[l][4] =
-          d[l][0] + d[l][2] + f, mxEdgeStyle.limits[l][8] = d[l][1] + d[l][3] + f;
-        l = d[0][0] + d[0][2] / 2 - (d[1][0] + d[1][2] / 2);
-        m = d[0][1] + d[0][3] / 2 - (d[1][1] + d[1][3] / 2);
-        g = 0;
-        0 > l ? g = 0 > m ? 2 : 1 : 0 >= m && (g = 3, 0 == l && (g = 2));
-        m = null;
-        null != b && (m = h);
-        b = [
-          [0.5, 0.5],
-          [0.5, 0.5]
-        ];
-        for (l = 0; 2 > l; l++) null != m && (b[l][0] = (m.x - d[l][0]) / d[l][2], 0.01 > b[l][0] ? a[l] = mxConstants.DIRECTION_MASK_WEST : 0.99 < b[l][0] && (a[l] = mxConstants.DIRECTION_MASK_EAST),
-            b[l][1] = (m.y - d[l][1]) / d[l][3], 0.01 > b[l][1] ? a[l] = mxConstants.DIRECTION_MASK_NORTH : 0.99 < b[l][1] && (a[l] = mxConstants.DIRECTION_MASK_SOUTH)),
-          m = null, null != c && (m = k);
-        l = d[0][1] - (d[1][1] + d[1][3]);
-        m = d[0][0] - (d[1][0] + d[1][2]);
-        n = d[1][1] - (d[0][1] + d[0][3]);
-        p = d[1][0] - (d[0][0] + d[0][2]);
-        mxEdgeStyle.vertexSeperations[1] = Math.max(m - 2 * f, 0);
-        mxEdgeStyle.vertexSeperations[2] = Math.max(l - 2 * f, 0);
-        mxEdgeStyle.vertexSeperations[4] = Math.max(n - 2 * f, 0);
-        mxEdgeStyle.vertexSeperations[3] = Math.max(p - 2 * f, 0);
-        c = [];
-        h = [];
-        k = [];
-        h[0] = m >= p ? mxConstants.DIRECTION_MASK_WEST : mxConstants.DIRECTION_MASK_EAST;
-        k[0] = l >= n ? mxConstants.DIRECTION_MASK_NORTH : mxConstants.DIRECTION_MASK_SOUTH;
-        h[1] = mxUtils.reversePortConstraints(h[0]);
-        k[1] = mxUtils.reversePortConstraints(k[0]);
-        m = m >= p ? m : p;
-        n = l >= n ? l : n;
-        p = [
-          [0, 0],
-          [0, 0]
-        ];
-        q = !1;
-        for (l = 0; 2 > l; l++) 0 == a[l] && (0 == (h[l] & r[l]) && (h[l] = mxUtils.reversePortConstraints(h[l])), 0 == (k[l] & r[l]) && (k[l] = mxUtils.reversePortConstraints(k[l])), p[l][0] = k[l],
-          p[l][1] = h[l]);
-        n > 2 * f && m > 2 * f && (0 < (h[0] & r[0]) && 0 < (k[1] & r[1]) ? (p[0][0] = h[0], p[0][1] = k[0], p[1][0] = k[1], p[1][1] = h[1], q = !0) : 0 < (k[0] & r[0]) && 0 < (h[1] & r[1]) && (p[0]
-          [0] = k[0], p[0][1] = h[0], p[1][0] = h[1], p[1][1] = k[1], q = !0));
-        n > 2 * f && !q &&
-          (p[0][0] = k[0], p[0][1] = h[0], p[1][0] = k[1], p[1][1] = h[1], q = !0);
-        m > 2 * f && !q && (p[0][0] = h[0], p[0][1] = k[0], p[1][0] = h[1], p[1][1] = k[1]);
-        for (l = 0; 2 > l; l++)
-          if (0 == a[l] && (0 == (p[l][0] & r[l]) && (p[l][0] = p[l][1]), c[l] = p[l][0] & r[l], c[l] |= (p[l][1] & r[l]) << 8, c[l] |= (p[1 - l][l] & r[l]) << 16, c[l] |= (p[1 - l][1 - l] & r[l]) <<
-              24, 0 == (c[l] & 15) && (c[l] <<= 8), 0 == (c[l] & 3840) && (c[l] = c[l] & 15 | c[l] >> 8), 0 == (c[l] & 983040) && (c[l] = c[l] & 65535 | (c[l] & 251658240) >> 8), a[l] = c[l] & 15,
-              r[l] == mxConstants.DIRECTION_MASK_WEST || r[l] == mxConstants.DIRECTION_MASK_NORTH || r[l] ==
-              mxConstants.DIRECTION_MASK_EAST || r[l] == mxConstants.DIRECTION_MASK_SOUTH)) a[l] = r[l];
-        l = a[0] == mxConstants.DIRECTION_MASK_EAST ? 3 : a[0];
-        r = a[1] == mxConstants.DIRECTION_MASK_EAST ? 3 : a[1];
-        l -= g;
-        r -= g;
-        1 > l && (l += 4);
-        1 > r && (r += 4);
-        r = mxEdgeStyle.routePatterns[l - 1][r - 1];
-        mxEdgeStyle.wayPoints1[0][0] = d[0][0];
-        mxEdgeStyle.wayPoints1[0][1] = d[0][1];
-        switch (a[0]) {
-          case mxConstants.DIRECTION_MASK_WEST:
-            mxEdgeStyle.wayPoints1[0][0] -= f;
-            mxEdgeStyle.wayPoints1[0][1] += b[0][1] * d[0][3];
-            break;
-          case mxConstants.DIRECTION_MASK_SOUTH:
-            mxEdgeStyle.wayPoints1[0][0] +=
-              b[0][0] * d[0][2];
-            mxEdgeStyle.wayPoints1[0][1] += d[0][3] + f;
-            break;
-          case mxConstants.DIRECTION_MASK_EAST:
-            mxEdgeStyle.wayPoints1[0][0] += d[0][2] + f;
-            mxEdgeStyle.wayPoints1[0][1] += b[0][1] * d[0][3];
-            break;
-          case mxConstants.DIRECTION_MASK_NORTH:
-            mxEdgeStyle.wayPoints1[0][0] += b[0][0] * d[0][2], mxEdgeStyle.wayPoints1[0][1] -= f
-        }
-        f = 0;
-        h = c = 0 < (a[0] & (mxConstants.DIRECTION_MASK_EAST | mxConstants.DIRECTION_MASK_WEST)) ? 0 : 1;
-        for (l = k = 0; l < r.length; l++) {
-          k = r[l] & 15;
-          s = k == mxConstants.DIRECTION_MASK_EAST ? 3 : k;
-          s += g;
-          4 < s && (s -= 4);
-          m = mxEdgeStyle.dirVectors[s -
-            1];
-          k = 0 < s % 2 ? 0 : 1;
-          k != c && (f++, mxEdgeStyle.wayPoints1[f][0] = mxEdgeStyle.wayPoints1[f - 1][0], mxEdgeStyle.wayPoints1[f][1] = mxEdgeStyle.wayPoints1[f - 1][1]);
-          var t = 0 < (r[l] & mxEdgeStyle.TARGET_MASK),
-            q = 0 < (r[l] & mxEdgeStyle.SOURCE_MASK),
-            n = (r[l] & mxEdgeStyle.SIDE_MASK) >> 5,
-            n = n << g;
-          15 < n && (n >>= 4);
-          p = 0 < (r[l] & mxEdgeStyle.CENTER_MASK);
-          (q || t) && 9 > n ? (s = 0, q = q ? 0 : 1, s = p && 0 == k ? d[q][0] + b[q][0] * d[q][2] : p ? d[q][1] + b[q][1] * d[q][3] : mxEdgeStyle.limits[q][n], 0 == k ? (n = (s - mxEdgeStyle.wayPoints1[
-            f][0]) * m[0], 0 < n && (mxEdgeStyle.wayPoints1[f][0] +=
-            m[0] * n)) : (n = (s - mxEdgeStyle.wayPoints1[f][1]) * m[1], 0 < n && (mxEdgeStyle.wayPoints1[f][1] += m[1] * n))) : p && (mxEdgeStyle.wayPoints1[f][0] += m[0] * Math.abs(mxEdgeStyle.vertexSeperations[
-            s] / 2), mxEdgeStyle.wayPoints1[f][1] += m[1] * Math.abs(mxEdgeStyle.vertexSeperations[s] / 2));
-          0 < f && mxEdgeStyle.wayPoints1[f][k] == mxEdgeStyle.wayPoints1[f - 1][k] ? f-- : c = k
-        }
-        for (l = 0; l <= f && !(l == f && ((0 < (a[1] & (mxConstants.DIRECTION_MASK_EAST | mxConstants.DIRECTION_MASK_WEST)) ? 0 : 1) == h ? 0 : 1) != (f + 1) % 2); l++) e.push(new mxPoint(
-          mxEdgeStyle.wayPoints1[l][0],
-          mxEdgeStyle.wayPoints1[l][1]))
-      }
-    },
-    getRoutePattern: function(a, b, c, d) {
-      var e = a[0] == mxConstants.DIRECTION_MASK_EAST ? 3 : a[0];
-      a = a[1] == mxConstants.DIRECTION_MASK_EAST ? 3 : a[1];
-      e -= b;
-      a -= b;
-      1 > e && (e += 4);
-      1 > a && (a += 4);
-      b = routePatterns[e - 1][a - 1];
-      if (0 == c || 0 == d) null != inlineRoutePatterns[e - 1][a - 1] && (b = inlineRoutePatterns[e - 1][a - 1]);
-      return b
-    }
-  },
-  mxStyleRegistry = {
-    values: [],
-    putValue: function(a, b) {
-      mxStyleRegistry.values[a] = b
-    },
-    getValue: function(a) {
-      return mxStyleRegistry.values[a]
-    },
-    getName: function(a) {
-      for (var b in mxStyleRegistry.values)
-        if (mxStyleRegistry.values[b] ==
-          a) return b;
-      return null
-    }
-  };
-mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW, mxEdgeStyle.ElbowConnector);
-mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION, mxEdgeStyle.EntityRelation);
-mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP, mxEdgeStyle.Loop);
-mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE, mxEdgeStyle.SideToSide);
-mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM, mxEdgeStyle.TopToBottom);
-mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL, mxEdgeStyle.OrthConnector);
-mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT, mxEdgeStyle.SegmentConnector);
-mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE, mxPerimeter.EllipsePerimeter);
-mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE, mxPerimeter.RectanglePerimeter);
-mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS, mxPerimeter.RhombusPerimeter);
-mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE, mxPerimeter.TrianglePerimeter);
-
-function mxGraphView(a) {
-  this.graph = a;
-  this.translate = new mxPoint;
-  this.graphBounds = new mxRectangle;
-  this.states = new mxDictionary
-}
-mxGraphView.prototype = new mxEventSource;
-mxGraphView.prototype.constructor = mxGraphView;
-mxGraphView.prototype.EMPTY_POINT = new mxPoint;
-mxGraphView.prototype.doneResource = "none" != mxClient.language ? "done" : "";
-mxGraphView.prototype.updatingDocumentResource = "none" != mxClient.language ? "updatingDocument" : "";
-mxGraphView.prototype.allowEval = !1;
-mxGraphView.prototype.captureDocumentGesture = !0;
-mxGraphView.prototype.optimizeVmlReflows = !0;
-mxGraphView.prototype.rendering = !0;
-mxGraphView.prototype.graph = null;
-mxGraphView.prototype.currentRoot = null;
-mxGraphView.prototype.graphBounds = null;
-mxGraphView.prototype.scale = 1;
-mxGraphView.prototype.translate = null;
-mxGraphView.prototype.updateStyle = !1;
-mxGraphView.prototype.getGraphBounds = function() {
-  return this.graphBounds
-};
-mxGraphView.prototype.setGraphBounds = function(a) {
-  this.graphBounds = a
-};
-mxGraphView.prototype.getBounds = function(a) {
-  var b = null;
-  if (null != a && 0 < a.length)
-    for (var c = this.graph.getModel(), d = 0; d < a.length; d++)
-      if (c.isVertex(a[d]) || c.isEdge(a[d])) {
-        var e = this.getState(a[d]);
-        null != e && (null == b ? b = new mxRectangle(e.x, e.y, e.width, e.height) : b.add(e))
-      }
-  return b
-};
-mxGraphView.prototype.setCurrentRoot = function(a) {
-  if (this.currentRoot != a) {
-    var b = new mxCurrentRootChange(this, a);
-    b.execute();
-    var c = new mxUndoableEdit(this, !1);
-    c.add(b);
-    this.fireEvent(new mxEventObject(mxEvent.UNDO, "edit", c));
-    this.graph.sizeDidChange()
-  }
-  return a
-};
-mxGraphView.prototype.scaleAndTranslate = function(a, b, c) {
-  var d = this.scale,
-    e = new mxPoint(this.translate.x, this.translate.y);
-  if (this.scale != a || this.translate.x != b || this.translate.y != c) this.scale = a, this.translate.x = b, this.translate.y = c, this.isEventsEnabled() && (this.revalidate(), this.graph.sizeDidChange());
-  this.fireEvent(new mxEventObject(mxEvent.SCALE_AND_TRANSLATE, "scale", a, "previousScale", d, "translate", this.translate, "previousTranslate", e))
-};
-mxGraphView.prototype.getScale = function() {
-  return this.scale
-};
-mxGraphView.prototype.setScale = function(a) {
-  var b = this.scale;
-  this.scale != a && (this.scale = a, this.isEventsEnabled() && (this.revalidate(), this.graph.sizeDidChange()));
-  this.fireEvent(new mxEventObject(mxEvent.SCALE, "scale", a, "previousScale", b))
-};
-mxGraphView.prototype.getTranslate = function() {
-  return this.translate
-};
-mxGraphView.prototype.setTranslate = function(a, b) {
-  var c = new mxPoint(this.translate.x, this.translate.y);
-  if (this.translate.x != a || this.translate.y != b) this.translate.x = a, this.translate.y = b, this.isEventsEnabled() && (this.revalidate(), this.graph.sizeDidChange());
-  this.fireEvent(new mxEventObject(mxEvent.TRANSLATE, "translate", this.translate, "previousTranslate", c))
-};
-mxGraphView.prototype.refresh = function() {
-  null != this.currentRoot && this.clear();
-  this.revalidate()
-};
-mxGraphView.prototype.revalidate = function() {
-  this.invalidate();
-  this.validate()
-};
-mxGraphView.prototype.clear = function(a, b, c) {
-  var d = this.graph.getModel();
-  a = a || d.getRoot();
-  b = null != b ? b : !1;
-  c = null != c ? c : !0;
-  this.removeState(a);
-  if (c && (b || a != this.currentRoot)) {
-    c = d.getChildCount(a);
-    for (var e = 0; e < c; e++) this.clear(d.getChildAt(a, e), b)
-  } else this.invalidate(a)
-};
-mxGraphView.prototype.invalidate = function(a, b, c, d) {
-  var e = this.graph.getModel();
-  a = a || e.getRoot();
-  b = null != b ? b : !0;
-  c = null != c ? c : !0;
-  d = null != d ? d : !1;
-  var f = this.getState(a);
-  null != f && (f.invalid = !0, d && (f.orderChanged = !0));
-  if (b)
-    for (var g = e.getChildCount(a), f = 0; f < g; f++) {
-      var h = e.getChildAt(a, f);
-      this.invalidate(h, b, c, d)
-    }
-  if (c) {
-    d = e.getEdgeCount(a);
-    for (f = 0; f < d; f++) this.invalidate(e.getEdgeAt(a, f), b, c)
-  }
-};
-mxGraphView.prototype.validate = function(a) {
-  var b = mxLog.enter("mxGraphView.validate");
-  window.status = mxResources.get(this.updatingDocumentResource) || this.updatingDocumentResource;
-  var c = null;
-  if (this.optimizeVmlReflows && null != this.canvas && null == this.textDiv && (8 == document.documentMode || mxClient.IS_QUIRKS)) {
-    c = this.canvas.style.display;
-    this.canvas.style.display = "none";
-    var d = document.createElement("div");
-    d.style.position = "absolute";
-    d.style.whiteSpace = "nowrap";
-    d.style.visibility = "hidden";
-    d.style.display = mxClient.IS_QUIRKS ?
-      "inline" : "inline-block";
-    d.style.zoom = "1";
-    document.body.appendChild(d);
-    this.textDiv = d
-  }
-  a = a || (null != this.currentRoot ? this.currentRoot : this.graph.getModel().getRoot());
-  this.validateBounds(null, a);
-  a = this.validatePoints(null, a);
-  null == a && (a = new mxRectangle);
-  this.setGraphBounds(a);
-  this.validateBackground();
-  null != c && (this.canvas.style.display = c, document.body.removeChild(this.textDiv), this.textDiv = null);
-  window.status = mxResources.get(this.doneResource) || this.doneResource;
-  mxLog.leave("mxGraphView.validate", b)
-};
-mxGraphView.prototype.createBackgroundPageShape = function(a) {
-  return new mxRectangleShape(a, "white", "black")
-};
-mxGraphView.prototype.validateBackground = function() {
-  var a = this.graph.getBackgroundImage();
-  if (null != a) {
-    if (null == this.backgroundImage || this.backgroundImage.image != a.src) {
-      null != this.backgroundImage && this.backgroundImage.destroy();
-      var b = new mxRectangle(0, 0, 1, 1);
-      this.backgroundImage = new mxImageShape(b, a.src);
-      this.backgroundImage.dialect = this.graph.dialect;
-      this.backgroundImage.init(this.backgroundPane);
-      this.backgroundImage.redraw()
-    }
-    this.redrawBackgroundImage(this.backgroundImage, a)
-  } else null != this.backgroundImage &&
-    (this.backgroundImage.destroy(), this.backgroundImage = null);
-  this.graph.pageVisible ? (b = this.getBackgroundPageBounds(), null == this.backgroundPageShape ? (this.backgroundPageShape = this.createBackgroundPageShape(b), this.backgroundPageShape.scale =
-    this.scale, this.backgroundPageShape.isShadow = !0, this.backgroundPageShape.dialect = this.graph.dialect, this.backgroundPageShape.init(this.backgroundPane), this.backgroundPageShape.redraw(),
-    mxEvent.addListener(this.backgroundPageShape.node, "dblclick", mxUtils.bind(this,
-      function(a) {
-        this.graph.dblClick(a)
-      })), mxEvent.addGestureListeners(this.backgroundPageShape.node, mxUtils.bind(this, function(a) {
-      this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(a))
-    }), mxUtils.bind(this, function(a) {
-      null != this.graph.tooltipHandler && this.graph.tooltipHandler.isHideOnHover() && this.graph.tooltipHandler.hide();
-      this.graph.isMouseDown && !mxEvent.isConsumed(a) && this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(a))
-    }), mxUtils.bind(this, function(a) {
-      this.graph.fireMouseEvent(mxEvent.MOUSE_UP,
-        new mxMouseEvent(a))
-    }))) : (this.backgroundPageShape.scale = this.scale, this.backgroundPageShape.bounds = b, this.backgroundPageShape.redraw())) : null != this.backgroundPageShape && (this.backgroundPageShape.destroy(),
-    this.backgroundPageShape = null)
-};
-mxGraphView.prototype.getBackgroundPageBounds = function() {
-  var a = this.graph.pageFormat,
-    b = this.scale * this.graph.pageScale;
-  return new mxRectangle(this.scale * this.translate.x, this.scale * this.translate.y, a.width * b, a.height * b)
-};
-mxGraphView.prototype.redrawBackgroundImage = function(a, b) {
-  a.scale = this.scale;
-  a.bounds.x = this.scale * this.translate.x;
-  a.bounds.y = this.scale * this.translate.y;
-  a.bounds.width = this.scale * b.width;
-  a.bounds.height = this.scale * b.height;
-  a.redraw()
-};
-mxGraphView.prototype.validateBounds = function(a, b) {
-  var c = this.graph.getModel(),
-    d = this.getState(b, !0);
-  if (null != d && d.invalid) {
-    if (this.graph.isCellVisible(b)) {
-      if (b != this.currentRoot && null != a) {
-        d.absoluteOffset.x = 0;
-        d.absoluteOffset.y = 0;
-        d.origin.x = a.origin.x;
-        d.origin.y = a.origin.y;
-        var e = this.graph.getCellGeometry(b);
-        if (null != e) {
-          if (!c.isEdge(b)) {
-            var f = e.offset || this.EMPTY_POINT;
-            e.relative ? (d.origin.x += e.x * a.width / this.scale + f.x, d.origin.y += e.y * a.height / this.scale + f.y) : (d.absoluteOffset.x = this.scale * f.x, d.absoluteOffset.y =
-              this.scale * f.y, d.origin.x += e.x, d.origin.y += e.y)
-          }
-          d.x = this.scale * (this.translate.x + d.origin.x);
-          d.y = this.scale * (this.translate.y + d.origin.y);
-          d.width = this.scale * e.width;
-          d.height = this.scale * e.height;
-          if (c.isVertex(b)) {
-            if (e.relative && (f = mxUtils.toRadians(a.style[mxConstants.STYLE_ROTATION] || "0"), 0 != f)) {
-              var e = Math.cos(f),
-                f = Math.sin(f),
-                g = new mxPoint(d.getCenterX(), d.getCenterY()),
-                h = new mxPoint(a.getCenterX(), a.getCenterY()),
-                e = mxUtils.getRotatedPoint(g, e, f, h);
-              d.x = e.x - d.width / 2;
-              d.y = e.y - d.height / 2
-            }
-            this.updateVertexLabelOffset(d)
-          }
-        }
-      }
-    } else this.removeState(b);
-    f = this.graph.getChildOffsetForCell(b);
-    null != f && (d.origin.x += f.x, d.origin.y += f.y)
-  }
-  if (null != d && (!this.graph.isCellCollapsed(b) || b == this.currentRoot)) {
-    e = c.getChildCount(b);
-    for (f = 0; f < e; f++) g = c.getChildAt(b, f), this.validateBounds(d, g)
-  }
-};
-mxGraphView.prototype.updateVertexLabelOffset = function(a) {
-  var b = mxUtils.getValue(a.style, mxConstants.STYLE_LABEL_POSITION, mxConstants.ALIGN_CENTER);
-  b == mxConstants.ALIGN_LEFT ? a.absoluteOffset.x -= a.width : b == mxConstants.ALIGN_RIGHT && (a.absoluteOffset.x += a.width);
-  b = mxUtils.getValue(a.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE);
-  b == mxConstants.ALIGN_TOP ? a.absoluteOffset.y -= a.height : b == mxConstants.ALIGN_BOTTOM && (a.absoluteOffset.y += a.height)
-};
-mxGraphView.prototype.validatePoints = function(a, b) {
-  var c = this.graph.getModel(),
-    d = this.getState(b),
-    e = null;
-  if (null != d) {
-    if (d.invalid) {
-      var f = this.graph.getCellGeometry(b);
-      if (null != f && c.isEdge(b)) {
-        var g = this.getState(this.getVisibleTerminal(b, !0));
-        d.setVisibleTerminalState(g, !0);
-        if (null != g && c.isEdge(g.cell) && !c.isAncestor(g.cell, b)) {
-          var h = this.getState(c.getParent(g.cell));
-          this.validatePoints(h, g.cell)
-        }
-        var k = this.getState(this.getVisibleTerminal(b, !1));
-        d.setVisibleTerminalState(k, !1);
-        null != k && (c.isEdge(k.cell) &&
-          !c.isAncestor(k.cell, b)) && (h = this.getState(c.getParent(k.cell)), this.validatePoints(h, k.cell));
-        this.updateFixedTerminalPoints(d, g, k);
-        this.updatePoints(d, f.points, g, k);
-        this.updateFloatingTerminalPoints(d, g, k);
-        this.updateEdgeBounds(d);
-        this.updateEdgeLabelOffset(d)
-      } else null != f && (f.relative && null != a && c.isEdge(a.cell)) && (f = this.getPoint(a, f), null != f && (d.x = f.x, d.y = f.y, f.x = f.x / this.scale - this.translate.x, f.y = f.y / this.scale -
-        this.translate.y, d.origin = f, this.childMoved(a, d)));
-      d.invalid = !1;
-      b != this.currentRoot &&
-        this.graph.cellRenderer.redraw(d, !1, this.isRendering())
-    }
-    if (c.isEdge(b) || c.isVertex(b)) null != d.shape && null != d.shape.boundingBox && (e = d.shape.boundingBox.clone()), null != d.text && !this.graph.isLabelClipped(d.cell) && null != d.text.boundingBox &&
-      (null != e ? e.add(d.text.boundingBox) : e = d.text.boundingBox.clone())
-  }
-  if (null != d && (!this.graph.isCellCollapsed(b) || b == this.currentRoot)) {
-    f = c.getChildCount(b);
-    for (g = 0; g < f; g++) h = c.getChildAt(b, g), h = this.validatePoints(d, h), null != h && (null == e ? e = h : e.add(h))
-  }
-  return e
-};
-mxGraphView.prototype.childMoved = function(a, b) {
-  var c = b.cell;
-  if (!this.graph.isCellCollapsed(c) || c == this.currentRoot)
-    for (var d = this.graph.getModel(), e = d.getChildCount(c), f = 0; f < e; f++) this.validateBounds(b, d.getChildAt(c, f))
-};
-mxGraphView.prototype.updateFixedTerminalPoints = function(a, b, c) {
-  this.updateFixedTerminalPoint(a, b, !0, this.graph.getConnectionConstraint(a, b, !0));
-  this.updateFixedTerminalPoint(a, c, !1, this.graph.getConnectionConstraint(a, c, !1))
-};
-mxGraphView.prototype.updateFixedTerminalPoint = function(a, b, c, d) {
-  var e = null;
-  null != d && (e = this.graph.getConnectionPoint(b, d));
-  if (null == e && null == b) {
-    b = this.scale;
-    d = this.translate;
-    var f = a.origin,
-      e = this.graph.getCellGeometry(a.cell).getTerminalPoint(c);
-    null != e && (e = new mxPoint(b * (d.x + e.x + f.x), b * (d.y + e.y + f.y)))
-  }
-  a.setAbsoluteTerminalPoint(e, c)
-};
-mxGraphView.prototype.updatePoints = function(a, b, c, d) {
-  if (null != a) {
-    var e = [];
-    e.push(a.absolutePoints[0]);
-    var f = this.getEdgeStyle(a, b, c, d);
-    if (null != f) c = this.getTerminalPort(a, c, !0), d = this.getTerminalPort(a, d, !1), f(a, c, d, b, e);
-    else if (null != b)
-      for (f = 0; f < b.length; f++) null != b[f] && (d = mxUtils.clone(b[f]), e.push(this.transformControlPoint(a, d)));
-    b = a.absolutePoints;
-    e.push(b[b.length - 1]);
-    a.absolutePoints = e
-  }
-};
-mxGraphView.prototype.transformControlPoint = function(a, b) {
-  var c = a.origin;
-  return new mxPoint(this.scale * (b.x + this.translate.x + c.x), this.scale * (b.y + this.translate.y + c.y))
-};
-mxGraphView.prototype.getEdgeStyle = function(a, b, c, d) {
-  a = null != c && c == d ? mxUtils.getValue(a.style, mxConstants.STYLE_LOOP, this.graph.defaultLoopStyle) : !mxUtils.getValue(a.style, mxConstants.STYLE_NOEDGESTYLE, !1) ? a.style[mxConstants.STYLE_EDGE] :
-    null;
-  "string" == typeof a && (b = mxStyleRegistry.getValue(a), null == b && this.isAllowEval() && (b = mxUtils.eval(a)), a = b);
-  return "function" == typeof a ? a : null
-};
-mxGraphView.prototype.updateFloatingTerminalPoints = function(a, b, c) {
-  var d = a.absolutePoints,
-    e = d[0];
-  null == d[d.length - 1] && null != c && this.updateFloatingTerminalPoint(a, c, b, !1);
-  null == e && null != b && this.updateFloatingTerminalPoint(a, b, c, !0)
-};
-mxGraphView.prototype.updateFloatingTerminalPoint = function(a, b, c, d) {
-  b = this.getTerminalPort(a, b, d);
-  var e = this.getNextPoint(a, c, d),
-    f = this.graph.isOrthogonal(a);
-  c = mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION] || "0"));
-  var g = new mxPoint(b.getCenterX(), b.getCenterY());
-  if (0 != c) var h = Math.cos(-c),
-    k = Math.sin(-c),
-    e = mxUtils.getRotatedPoint(e, h, k, g);
-  h = parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING] || 0);
-  h += parseFloat(a.style[d ? mxConstants.STYLE_SOURCE_PERIMETER_SPACING : mxConstants.STYLE_TARGET_PERIMETER_SPACING] ||
-    0);
-  b = this.getPerimeterPoint(b, e, 0 == c && f, h);
-  0 != c && (h = Math.cos(c), k = Math.sin(c), b = mxUtils.getRotatedPoint(b, h, k, g));
-  a.setAbsoluteTerminalPoint(b, d)
-};
-mxGraphView.prototype.getTerminalPort = function(a, b, c) {
-  a = mxUtils.getValue(a.style, c ? mxConstants.STYLE_SOURCE_PORT : mxConstants.STYLE_TARGET_PORT);
-  null != a && (a = this.getState(this.graph.getModel().getCell(a)), null != a && (b = a));
-  return b
-};
-mxGraphView.prototype.getPerimeterPoint = function(a, b, c, d) {
-  var e = null;
-  if (null != a) {
-    var f = this.getPerimeterFunction(a);
-    if (null != f && null != b && (d = this.getPerimeterBounds(a, d), 0 < d.width || 0 < d.height)) e = f(d, a, b, c);
-    null == e && (e = this.getPoint(a))
-  }
-  return e
-};
-mxGraphView.prototype.getRoutingCenterX = function(a) {
-  var b = null != a.style ? parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X]) || 0 : 0;
-  return a.getCenterX() + b * a.width
-};
-mxGraphView.prototype.getRoutingCenterY = function(a) {
-  var b = null != a.style ? parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y]) || 0 : 0;
-  return a.getCenterY() + b * a.height
-};
-mxGraphView.prototype.getPerimeterBounds = function(a, b) {
-  b = null != b ? b : 0;
-  null != a && (b += parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING] || 0));
-  return a.getPerimeterBounds(b * this.scale)
-};
-mxGraphView.prototype.getPerimeterFunction = function(a) {
-  a = a.style[mxConstants.STYLE_PERIMETER];
-  if ("string" == typeof a) {
-    var b = mxStyleRegistry.getValue(a);
-    null == b && this.isAllowEval() && (b = mxUtils.eval(a));
-    a = b
-  }
-  return "function" == typeof a ? a : null
-};
-mxGraphView.prototype.getNextPoint = function(a, b, c) {
-  a = a.absolutePoints;
-  var d = null;
-  if (null != a && (c || 2 < a.length || null == b)) d = a.length, d = a[c ? Math.min(1, d - 1) : Math.max(0, d - 2)];
-  null == d && null != b && (d = new mxPoint(b.getCenterX(), b.getCenterY()));
-  return d
-};
-mxGraphView.prototype.getVisibleTerminal = function(a, b) {
-  for (var c = this.graph.getModel(), d = c.getTerminal(a, b), e = d; null != d && d != this.currentRoot;) {
-    if (!this.graph.isCellVisible(e) || this.graph.isCellCollapsed(d)) e = d;
-    d = c.getParent(d)
-  }
-  c.getParent(e) == c.getRoot() && (e = null);
-  return e
-};
-mxGraphView.prototype.updateEdgeBounds = function(a) {
-  var b = a.absolutePoints;
-  a.length = 0;
-  if (null != b && 0 < b.length) {
-    var c = b[0],
-      d = b[b.length - 1];
-    if (null == c || null == d) a.cell != this.currentRoot && this.clear(a.cell, !0);
-    else {
-      if (c.x != d.x || c.y != d.y) {
-        var e = d.x - c.x,
-          f = d.y - c.y;
-        a.terminalDistance = Math.sqrt(e * e + f * f)
-      } else a.terminalDistance = 0;
-      var d = 0,
-        g = [],
-        f = c;
-      if (null != f) {
-        for (var c = f.x, h = f.y, k = c, l = h, m = 1; m < b.length; m++) {
-          var n = b[m];
-          null != n && (e = f.x - n.x, f = f.y - n.y, e = Math.sqrt(e * e + f * f), g.push(e), d += e, f = n, c = Math.min(f.x, c), h = Math.min(f.y,
-            h), k = Math.max(f.x, k), l = Math.max(f.y, l))
-        }
-        a.length = d;
-        a.segments = g;
-        a.x = c;
-        a.y = h;
-        a.width = Math.max(1, k - c);
-        a.height = Math.max(1, l - h)
-      }
-    }
-  }
-};
-mxGraphView.prototype.getPoint = function(a, b) {
-  var c = a.getCenterX(),
-    d = a.getCenterY();
-  if (null != a.segments && (null == b || b.relative)) {
-    for (var e = a.absolutePoints.length, f = ((null != b ? b.x / 2 : 0) + 0.5) * a.length, g = a.segments[0], h = 0, k = 1; f > h + g && k < e - 1;) h += g, g = a.segments[k++];
-    e = 0 == g ? 0 : (f - h) / g;
-    f = a.absolutePoints[k - 1];
-    k = a.absolutePoints[k];
-    if (null != f && null != k) {
-      h = c = d = 0;
-      if (null != b) {
-        var d = b.y,
-          l = b.offset;
-        null != l && (c = l.x, h = l.y)
-      }
-      l = k.x - f.x;
-      k = k.y - f.y;
-      c = f.x + l * e + ((0 == g ? 0 : k / g) * d + c) * this.scale;
-      d = f.y + k * e - ((0 == g ? 0 : l / g) * d - h) * this.scale
-    }
-  } else null !=
-    b && (l = b.offset, null != l && (c += l.x, d += l.y));
-  return new mxPoint(c, d)
-};
-mxGraphView.prototype.getRelativePoint = function(a, b, c) {
-  var d = this.graph.getModel().getGeometry(a.cell);
-  if (null != d) {
-    var e = a.absolutePoints.length;
-    if (d.relative && 1 < e) {
-      for (var d = a.length, f = a.segments, g = a.absolutePoints[0], h = a.absolutePoints[1], k = mxUtils.ptSegDistSq(g.x, g.y, h.x, h.y, b, c), l = 0, m = 0, n = 0, p = 2; p < e; p++) m += f[p -
-        2], h = a.absolutePoints[p], g = mxUtils.ptSegDistSq(g.x, g.y, h.x, h.y, b, c), g <= k && (k = g, l = p - 1, n = m), g = h;
-      e = f[l];
-      g = a.absolutePoints[l];
-      h = a.absolutePoints[l + 1];
-      k = h.x;
-      f = h.y;
-      a = g.x - k;
-      l = g.y - f;
-      k = b - k;
-      f = c - f;
-      k = a - k;
-      f = l - f;
-      f = k * a + f * l;
-      a = Math.sqrt(0 >= f ? 0 : f * f / (a * a + l * l));
-      a > e && (a = e);
-      e = Math.sqrt(mxUtils.ptSegDistSq(g.x, g.y, h.x, h.y, b, c)); - 1 == mxUtils.relativeCcw(g.x, g.y, h.x, h.y, b, c) && (e = -e);
-      return new mxPoint(-2 * ((d / 2 - n - a) / d), e / this.scale)
-    }
-  }
-  return new mxPoint
-};
-mxGraphView.prototype.updateEdgeLabelOffset = function(a) {
-  var b = a.absolutePoints;
-  a.absoluteOffset.x = a.getCenterX();
-  a.absoluteOffset.y = a.getCenterY();
-  if (null != b && 0 < b.length && null != a.segments) {
-    var c = this.graph.getCellGeometry(a.cell);
-    if (c.relative) {
-      var d = this.getPoint(a, c);
-      null != d && (a.absoluteOffset = d)
-    } else {
-      var d = b[0],
-        e = b[b.length - 1];
-      if (null != d && null != e) {
-        var b = e.x - d.x,
-          f = e.y - d.y,
-          g = e = 0,
-          c = c.offset;
-        null != c && (e = c.x, g = c.y);
-        c = d.y + f / 2 + g * this.scale;
-        a.absoluteOffset.x = d.x + b / 2 + e * this.scale;
-        a.absoluteOffset.y = c
-      }
-    }
-  }
-};
-mxGraphView.prototype.getState = function(a, b) {
-  b = b || !1;
-  var c = null;
-  null != a && (c = this.states.get(a), this.graph.isCellVisible(a) && (null == c && b && this.graph.isCellVisible(a) ? (c = this.createState(a), this.states.put(a, c)) : b && (null != c && this.updateStyle) &&
-    (c.style = this.graph.getCellStyle(a))));
-  return c
-};
-mxGraphView.prototype.isRendering = function() {
-  return this.rendering
-};
-mxGraphView.prototype.setRendering = function(a) {
-  this.rendering = a
-};
-mxGraphView.prototype.isAllowEval = function() {
-  return this.allowEval
-};
-mxGraphView.prototype.setAllowEval = function(a) {
-  this.allowEval = a
-};
-mxGraphView.prototype.getStates = function() {
-  return this.states
-};
-mxGraphView.prototype.setStates = function(a) {
-  this.states = a
-};
-mxGraphView.prototype.getCellStates = function(a) {
-  if (null == a) return this.states;
-  for (var b = [], c = 0; c < a.length; c++) {
-    var d = this.getState(a[c]);
-    null != d && b.push(d)
-  }
-  return b
-};
-mxGraphView.prototype.removeState = function(a) {
-  var b = null;
-  null != a && (b = this.states.remove(a), null != b && (this.graph.cellRenderer.destroy(b), b.destroy()));
-  return b
-};
-mxGraphView.prototype.createState = function(a) {
-  var b = this.graph.getCellStyle(a);
-  a = new mxCellState(this, a, b);
-  this.graph.cellRenderer.initialize(a, this.isRendering());
-  return a
-};
-mxGraphView.prototype.getCanvas = function() {
-  return this.canvas
-};
-mxGraphView.prototype.getBackgroundPane = function() {
-  return this.backgroundPane
-};
-mxGraphView.prototype.getDrawPane = function() {
-  return this.drawPane
-};
-mxGraphView.prototype.getOverlayPane = function() {
-  return this.overlayPane
-};
-mxGraphView.prototype.isContainerEvent = function(a) {
-  a = mxEvent.getSource(a);
-  return a == this.graph.container || a.parentNode == this.backgroundPane || null != a.parentNode && a.parentNode.parentNode == this.backgroundPane || a == this.canvas.parentNode || a == this.canvas ||
-    a == this.backgroundPane || a == this.drawPane || a == this.overlayPane
-};
-mxGraphView.prototype.isScrollEvent = function(a) {
-  var b = mxUtils.getOffset(this.graph.container);
-  a = new mxPoint(a.clientX - b.x, a.clientY - b.y);
-  var b = this.graph.container.offsetWidth,
-    c = this.graph.container.clientWidth;
-  if (b > c && a.x > c + 2 && a.x <= b) return !0;
-  b = this.graph.container.offsetHeight;
-  c = this.graph.container.clientHeight;
-  return b > c && a.y > c + 2 && a.y <= b ? !0 : !1
-};
-mxGraphView.prototype.init = function() {
-  this.installListeners();
-  var a = this.graph;
-  a.dialect == mxConstants.DIALECT_SVG ? this.createSvg() : a.dialect == mxConstants.DIALECT_VML ? this.createVml() : this.createHtml()
-};
-mxGraphView.prototype.installListeners = function() {
-  var a = this.graph,
-    b = a.container;
-  if (null != b) {
-    mxEvent.addGestureListeners(b, mxUtils.bind(this, function(b) {
-      mxClient.IS_TOUCH && a.isEditing() && a.stopEditing(!a.isInvokesStopCellEditing());
-      this.isContainerEvent(b) && (!mxClient.IS_IE && !mxClient.IS_GC && !mxClient.IS_OP && !mxClient.IS_SF || !this.isScrollEvent(b)) && a.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(
-        b))
-    }), mxUtils.bind(this, function(b) {
-      this.isContainerEvent(b) && a.fireMouseEvent(mxEvent.MOUSE_MOVE,
-        new mxMouseEvent(b))
-    }), mxUtils.bind(this, function(b) {
-      this.isContainerEvent(b) && a.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(b))
-    }));
-    mxEvent.addListener(b, "dblclick", mxUtils.bind(this, function(b) {
-      a.dblClick(b)
-    }));
-    var c = function(c) {
-      var e = null;
-      mxClient.IS_TOUCH && (e = mxEvent.getClientX(c), c = mxEvent.getClientY(c), c = mxUtils.convertPoint(b, e, c), e = a.view.getState(a.getCellAt(c.x, c.y)));
-      return e
-    };
-    a.addMouseListener({
-      mouseDown: function(b, c) {
-        a.panningHandler.hideMenu()
-      },
-      mouseMove: function() {},
-      mouseUp: function() {}
-    });
-    this.moveHandler = mxUtils.bind(this, function(b) {
-      null != a.tooltipHandler && a.tooltipHandler.isHideOnHover() && a.tooltipHandler.hide();
-      this.captureDocumentGesture && (a.isMouseDown && !mxEvent.isConsumed(b)) && a.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(b, c(b)))
-    });
-    this.endHandler = mxUtils.bind(this, function(b) {
-      this.captureDocumentGesture && a.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(b))
-    });
-    mxEvent.addGestureListeners(document, null, this.moveHandler, this.endHandler)
-  }
-};
-mxGraphView.prototype.createHtml = function() {
-  var a = this.graph.container;
-  null != a && (this.canvas = this.createHtmlPane("100%", "100%"), this.backgroundPane = this.createHtmlPane("1px", "1px"), this.drawPane = this.createHtmlPane("1px", "1px"), this.overlayPane =
-    this.createHtmlPane("1px", "1px"), this.canvas.appendChild(this.backgroundPane), this.canvas.appendChild(this.drawPane), this.canvas.appendChild(this.overlayPane), a.appendChild(this.canvas),
-    mxClient.IS_QUIRKS && (a = mxUtils.bind(this, function(a) {
-      a = this.getGraphBounds();
-      this.updateHtmlCanvasSize(a.x + a.width + this.graph.border, a.y + a.height + this.graph.border)
-    }), mxEvent.addListener(window, "resize", a)))
-};
-mxGraphView.prototype.updateHtmlCanvasSize = function(a, b) {
-  if (null != this.graph.container) {
-    var c = this.graph.container.offsetHeight;
-    this.canvas.style.width = this.graph.container.offsetWidth < a ? a + "px" : "100%";
-    this.canvas.style.height = c < b ? b + "px" : "100%"
-  }
-};
-mxGraphView.prototype.createHtmlPane = function(a, b) {
-  var c = document.createElement("DIV");
-  null != a && null != b ? (c.style.position = "absolute", c.style.left = "0px", c.style.top = "0px", c.style.width = a, c.style.height = b) : c.style.position = "relative";
-  return c
-};
-mxGraphView.prototype.createVml = function() {
-  var a = this.graph.container;
-  if (null != a) {
-    var b = a.offsetWidth,
-      c = a.offsetHeight;
-    this.canvas = this.createVmlPane(b, c);
-    this.backgroundPane = this.createVmlPane(b, c);
-    this.drawPane = this.createVmlPane(b, c);
-    this.overlayPane = this.createVmlPane(b, c);
-    this.canvas.appendChild(this.backgroundPane);
-    this.canvas.appendChild(this.drawPane);
-    this.canvas.appendChild(this.overlayPane);
-    a.appendChild(this.canvas)
-  }
-};
-mxGraphView.prototype.createVmlPane = function(a, b) {
-  var c = document.createElement(mxClient.VML_PREFIX + ":group");
-  c.style.position = "absolute";
-  c.style.left = "0px";
-  c.style.top = "0px";
-  c.style.width = a + "px";
-  c.style.height = b + "px";
-  c.setAttribute("coordsize", a + "," + b);
-  c.setAttribute("coordorigin", "0,0");
-  return c
-};
-mxGraphView.prototype.createSvg = function() {
-  var a = this.graph.container;
-  this.canvas = document.createElementNS(mxConstants.NS_SVG, "g");
-  this.backgroundPane = document.createElementNS(mxConstants.NS_SVG, "g");
-  this.canvas.appendChild(this.backgroundPane);
-  this.drawPane = document.createElementNS(mxConstants.NS_SVG, "g");
-  this.canvas.appendChild(this.drawPane);
-  this.overlayPane = document.createElementNS(mxConstants.NS_SVG, "g");
-  this.canvas.appendChild(this.overlayPane);
-  var b = document.createElementNS(mxConstants.NS_SVG,
-    "svg");
-  b.style.width = "100%";
-  b.style.height = "100%";
-  b.style.display = "block";
-  b.appendChild(this.canvas);
-  null != a && (a.appendChild(b), "static" == mxUtils.getCurrentStyle(a).position && (a.style.position = "relative"))
-};
-mxGraphView.prototype.destroy = function() {
-  var a = null != this.canvas ? this.canvas.ownerSVGElement : null;
-  null == a && (a = this.canvas);
-  null != a && null != a.parentNode && (this.clear(this.currentRoot, !0), mxEvent.removeGestureListeners(document, null, this.moveHandler, this.endHandler), mxEvent.release(this.graph.container), a
-    .parentNode.removeChild(a), this.overlayPane = this.drawPane = this.backgroundPane = this.canvas = this.endHandler = this.moveHandler = null)
-};
-
-function mxCurrentRootChange(a, b) {
-  this.view = a;
-  this.previous = this.root = b;
-  this.isUp = null == b;
-  if (!this.isUp)
-    for (var c = this.view.currentRoot, d = this.view.graph.getModel(); null != c;) {
-      if (c == b) {
-        this.isUp = !0;
-        break
-      }
-      c = d.getParent(c)
-    }
-}
-mxCurrentRootChange.prototype.execute = function() {
-  var a = this.view.currentRoot;
-  this.view.currentRoot = this.previous;
-  this.previous = a;
-  a = this.view.graph.getTranslateForRoot(this.view.currentRoot);
-  null != a && (this.view.translate = new mxPoint(-a.x, -a.y));
-  this.view.fireEvent(new mxEventObject(this.isUp ? mxEvent.UP : mxEvent.DOWN, "root", this.view.currentRoot, "previous", this.previous));
-  this.isUp ? (this.view.clear(this.view.currentRoot, !0), this.view.validate()) : this.view.refresh();
-  this.isUp = !this.isUp
-};
-
-function mxGraph(a, b, c, d) {
-  this.mouseListeners = null;
-  this.renderHint = c;
-  this.dialect = mxClient.IS_SVG ? mxConstants.DIALECT_SVG : c == mxConstants.RENDERING_HINT_EXACT && mxClient.IS_VML ? mxConstants.DIALECT_VML : c == mxConstants.RENDERING_HINT_FASTEST ? mxConstants
-    .DIALECT_STRICTHTML : c == mxConstants.RENDERING_HINT_FASTER ? mxConstants.DIALECT_PREFERHTML : mxConstants.DIALECT_MIXEDHTML;
-  this.model = null != b ? b : new mxGraphModel;
-  this.multiplicities = [];
-  this.imageBundles = [];
-  this.cellRenderer = this.createCellRenderer();
-  this.setSelectionModel(this.createSelectionModel());
-  this.setStylesheet(null != d ? d : this.createStylesheet());
-  this.view = this.createGraphView();
-  this.graphModelChangeListener = mxUtils.bind(this, function(a, b) {
-    this.graphModelChanged(b.getProperty("edit").changes)
-  });
-  this.model.addListener(mxEvent.CHANGE, this.graphModelChangeListener);
-  this.createHandlers();
-  null != a && this.init(a);
-  this.view.revalidate()
-}
-mxLoadResources && mxResources.add(mxClient.basePath + "/resources/graph");
-mxGraph.prototype = new mxEventSource;
-mxGraph.prototype.constructor = mxGraph;
-mxGraph.prototype.EMPTY_ARRAY = [];
-mxGraph.prototype.mouseListeners = null;
-mxGraph.prototype.isMouseDown = !1;
-mxGraph.prototype.model = null;
-mxGraph.prototype.view = null;
-mxGraph.prototype.stylesheet = null;
-mxGraph.prototype.selectionModel = null;
-mxGraph.prototype.cellEditor = null;
-mxGraph.prototype.cellRenderer = null;
-mxGraph.prototype.multiplicities = null;
-mxGraph.prototype.renderHint = null;
-mxGraph.prototype.dialect = null;
-mxGraph.prototype.gridSize = 10;
-mxGraph.prototype.gridEnabled = !0;
-mxGraph.prototype.portsEnabled = !0;
-mxGraph.prototype.doubleTapEnabled = !0;
-mxGraph.prototype.doubleTapTimeout = 700;
-mxGraph.prototype.doubleTapTolerance = 25;
-mxGraph.prototype.lastTouchY = 0;
-mxGraph.prototype.lastTouchY = 0;
-mxGraph.prototype.lastTouchTime = 0;
-mxGraph.prototype.gestureEnabled = !0;
-mxGraph.prototype.tolerance = 4;
-mxGraph.prototype.defaultOverlap = 0.5;
-mxGraph.prototype.defaultParent = null;
-mxGraph.prototype.alternateEdgeStyle = null;
-mxGraph.prototype.backgroundImage = null;
-mxGraph.prototype.pageVisible = !1;
-mxGraph.prototype.pageBreaksVisible = !1;
-mxGraph.prototype.pageBreakColor = "gray";
-mxGraph.prototype.pageBreakDashed = !0;
-mxGraph.prototype.minPageBreakDist = 20;
-mxGraph.prototype.preferPageSize = !1;
-mxGraph.prototype.pageFormat = mxConstants.PAGE_FORMAT_A4_PORTRAIT;
-mxGraph.prototype.pageScale = 1.5;
-mxGraph.prototype.enabled = !0;
-mxGraph.prototype.escapeEnabled = !0;
-mxGraph.prototype.invokesStopCellEditing = !0;
-mxGraph.prototype.enterStopsCellEditing = !1;
-mxGraph.prototype.useScrollbarsForPanning = !0;
-mxGraph.prototype.exportEnabled = !0;
-mxGraph.prototype.importEnabled = !0;
-mxGraph.prototype.cellsLocked = !1;
-mxGraph.prototype.cellsCloneable = !0;
-mxGraph.prototype.foldingEnabled = !0;
-mxGraph.prototype.cellsEditable = !0;
-mxGraph.prototype.cellsDeletable = !0;
-mxGraph.prototype.cellsMovable = !0;
-mxGraph.prototype.edgeLabelsMovable = !0;
-mxGraph.prototype.vertexLabelsMovable = !1;
-mxGraph.prototype.dropEnabled = !1;
-mxGraph.prototype.splitEnabled = !0;
-mxGraph.prototype.cellsResizable = !0;
-mxGraph.prototype.cellsBendable = !0;
-mxGraph.prototype.cellsSelectable = !0;
-mxGraph.prototype.cellsDisconnectable = !0;
-mxGraph.prototype.autoSizeCells = !1;
-mxGraph.prototype.autoScroll = !0;
-mxGraph.prototype.timerAutoScroll = !1;
-mxGraph.prototype.allowAutoPanning = !1;
-mxGraph.prototype.ignoreScrollbars = !1;
-mxGraph.prototype.autoExtend = !0;
-mxGraph.prototype.maximumGraphBounds = null;
-mxGraph.prototype.minimumGraphSize = null;
-mxGraph.prototype.minimumContainerSize = null;
-mxGraph.prototype.maximumContainerSize = null;
-mxGraph.prototype.resizeContainer = !1;
-mxGraph.prototype.border = 0;
-mxGraph.prototype.ordered = !0;
-mxGraph.prototype.keepEdgesInForeground = !1;
-mxGraph.prototype.keepEdgesInBackground = !0;
-mxGraph.prototype.allowNegativeCoordinates = !0;
-mxGraph.prototype.constrainChildren = !0;
-mxGraph.prototype.extendParents = !0;
-mxGraph.prototype.extendParentsOnAdd = !0;
-mxGraph.prototype.collapseToPreferredSize = !0;
-mxGraph.prototype.zoomFactor = 1.2;
-mxGraph.prototype.keepSelectionVisibleOnZoom = !1;
-mxGraph.prototype.centerZoom = !0;
-mxGraph.prototype.resetViewOnRootChange = !0;
-mxGraph.prototype.resetEdgesOnResize = !1;
-mxGraph.prototype.resetEdgesOnMove = !1;
-mxGraph.prototype.resetEdgesOnConnect = !0;
-mxGraph.prototype.allowLoops = !1;
-mxGraph.prototype.defaultLoopStyle = mxEdgeStyle.Loop;
-mxGraph.prototype.multigraph = !0;
-mxGraph.prototype.connectableEdges = !1;
-mxGraph.prototype.allowDanglingEdges = !0;
-mxGraph.prototype.cloneInvalidEdges = !1;
-mxGraph.prototype.disconnectOnMove = !0;
-mxGraph.prototype.labelsVisible = !0;
-mxGraph.prototype.htmlLabels = !1;
-mxGraph.prototype.swimlaneSelectionEnabled = !0;
-mxGraph.prototype.swimlaneNesting = !0;
-mxGraph.prototype.swimlaneIndicatorColorAttribute = mxConstants.STYLE_FILLCOLOR;
-mxGraph.prototype.imageBundles = null;
-mxGraph.prototype.minFitScale = 0.1;
-mxGraph.prototype.maxFitScale = 8;
-mxGraph.prototype.panDx = 0;
-mxGraph.prototype.panDy = 0;
-mxGraph.prototype.collapsedImage = new mxImage(mxClient.imageBasePath + "/collapsed.gif", 9, 9);
-mxGraph.prototype.expandedImage = new mxImage(mxClient.imageBasePath + "/expanded.gif", 9, 9);
-// mxGraph.prototype.warningImage = new mxImage(mxClient.imageBasePath + "/warning" + (mxClient.IS_MAC ? ".png" : ".gif"), 16, 16);
-mxGraph.prototype.warningImage = new mxImage("/assets/plugins/mxgraph/images/warning.gif", 16, 16);
-
-
-mxGraph.prototype.alreadyConnectedResource = "none" != mxClient.language ? "alreadyConnected" : "";
-mxGraph.prototype.containsValidationErrorsResource = "none" != mxClient.language ? "containsValidationErrors" : "";
-mxGraph.prototype.collapseExpandResource = "none" != mxClient.language ? "collapse-expand" : "";
-mxGraph.prototype.init = function(a) {
-  this.container = a;
-  this.cellEditor = this.createCellEditor();
-  this.view.init();
-  this.sizeDidChange();
-  mxClient.IS_IE && (mxEvent.addListener(window, "unload", mxUtils.bind(this, function() {
-    this.destroy()
-  })), mxEvent.addListener(a, "selectstart", mxUtils.bind(this, function() {
-    return this.isEditing()
-  })));
-  8 == document.documentMode && a.insertAdjacentHTML("beforeend", '\x3cv:group style\x3d"DISPLAY: none;"\x3e\x3c/v:group\x3e')
-};
-mxGraph.prototype.createHandlers = function(a) {
-  this.tooltipHandler = new mxTooltipHandler(this);
-  this.tooltipHandler.setEnabled(!1);
-  this.panningHandler = new mxPanningHandler(this);
-  this.panningHandler.panningEnabled = !1;
-  this.selectionCellsHandler = new mxSelectionCellsHandler(this);
-  this.connectionHandler = new mxConnectionHandler(this);
-  this.connectionHandler.setEnabled(!1);
-  this.graphHandler = new mxGraphHandler(this)
-};
-mxGraph.prototype.createSelectionModel = function() {
-  return new mxGraphSelectionModel(this)
-};
-mxGraph.prototype.createStylesheet = function() {
-  return new mxStylesheet
-};
-mxGraph.prototype.createGraphView = function() {
-  return new mxGraphView(this)
-};
-mxGraph.prototype.createCellRenderer = function() {
-  return new mxCellRenderer
-};
-mxGraph.prototype.createCellEditor = function() {
-  return new mxCellEditor(this)
-};
-mxGraph.prototype.getModel = function() {
-  return this.model
-};
-mxGraph.prototype.getView = function() {
-  return this.view
-};
-mxGraph.prototype.getStylesheet = function() {
-  return this.stylesheet
-};
-mxGraph.prototype.setStylesheet = function(a) {
-  this.stylesheet = a
-};
-mxGraph.prototype.getSelectionModel = function() {
-  return this.selectionModel
-};
-mxGraph.prototype.setSelectionModel = function(a) {
-  this.selectionModel = a
-};
-mxGraph.prototype.getSelectionCellsForChanges = function(a) {
-  for (var b = [], c = 0; c < a.length; c++) {
-    var d = a[c];
-    if (d.constructor != mxRootChange) {
-      var e = null;
-      d instanceof mxChildChange && null == d.previous ? e = d.child : null != d.cell && d.cell instanceof mxCell && (e = d.cell);
-      null != e && 0 > mxUtils.indexOf(b, e) && b.push(e)
-    }
-  }
-  return this.getModel().getTopmostCells(b)
-};
-mxGraph.prototype.graphModelChanged = function(a) {
-  for (var b = 0; b < a.length; b++) this.processChange(a[b]);
-  this.removeSelectionCells(this.getRemovedCellsForChanges(a));
-  this.view.validate();
-  this.sizeDidChange()
-};
-mxGraph.prototype.getRemovedCellsForChanges = function(a) {
-  for (var b = [], c = 0; c < a.length; c++) {
-    var d = a[c];
-    if (d instanceof mxRootChange) break;
-    else d instanceof mxChildChange ? null != d.previous && null == d.parent && (b = b.concat(this.model.getDescendants(d.child))) : d instanceof mxVisibleChange && (b = b.concat(this.model.getDescendants(
-      d.cell)))
-  }
-  return b
-};
-mxGraph.prototype.processChange = function(a) {
-  if (a instanceof mxRootChange) this.clearSelection(), this.removeStateForCell(a.previous), this.resetViewOnRootChange && (this.view.scale = 1, this.view.translate.x = 0, this.view.translate.y = 0),
-    this.fireEvent(new mxEventObject(mxEvent.ROOT));
-  else if (a instanceof mxChildChange) {
-    var b = this.model.getParent(a.child);
-    null != b ? this.view.invalidate(a.child, !0, !1, null != a.previous) : (this.removeStateForCell(a.child), this.view.currentRoot == a.child && this.home());
-    b != a.previous &&
-      (null != b && this.view.invalidate(b, !1, !1), null != a.previous && this.view.invalidate(a.previous, !1, !1))
-  } else a instanceof mxTerminalChange || a instanceof mxGeometryChange ? this.view.invalidate(a.cell) : a instanceof mxValueChange ? this.view.invalidate(a.cell, !1, !1) : a instanceof mxStyleChange ?
-    (this.view.invalidate(a.cell, !0, !0, !1), this.view.removeState(a.cell)) : null != a.cell && a.cell instanceof mxCell && this.removeStateForCell(a.cell)
-};
-mxGraph.prototype.removeStateForCell = function(a) {
-  for (var b = this.model.getChildCount(a), c = 0; c < b; c++) this.removeStateForCell(this.model.getChildAt(a, c));
-  this.view.removeState(a)
-};
-mxGraph.prototype.addCellOverlay = function(a, b) {
-  null == a.overlays && (a.overlays = []);
-  a.overlays.push(b);
-  var c = this.view.getState(a);
-  null != c && this.cellRenderer.redraw(c);
-  this.fireEvent(new mxEventObject(mxEvent.ADD_OVERLAY, "cell", a, "overlay", b));
-  return b
-};
-mxGraph.prototype.getCellOverlays = function(a) {
-  return a.overlays
-};
-mxGraph.prototype.removeCellOverlay = function(a, b) {
-  if (null == b) this.removeCellOverlays(a);
-  else {
-    var c = mxUtils.indexOf(a.overlays, b);
-    0 <= c ? (a.overlays.splice(c, 1), 0 == a.overlays.length && (a.overlays = null), c = this.view.getState(a), null != c && this.cellRenderer.redraw(c), this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,
-      "cell", a, "overlay", b))) : b = null
-  }
-  return b
-};
-mxGraph.prototype.removeCellOverlays = function(a) {
-  var b = a.overlays;
-  if (null != b) {
-    a.overlays = null;
-    var c = this.view.getState(a);
-    null != c && this.cellRenderer.redraw(c);
-    for (c = 0; c < b.length; c++) this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY, "cell", a, "overlay", b[c]))
-  }
-  return b
-};
-mxGraph.prototype.clearCellOverlays = function(a) {
-  a = null != a ? a : this.model.getRoot();
-  this.removeCellOverlays(a);
-  for (var b = this.model.getChildCount(a), c = 0; c < b; c++) {
-    var d = this.model.getChildAt(a, c);
-    this.clearCellOverlays(d)
-  }
-};
-mxGraph.prototype.setCellWarning = function(a, b, c, d) {
-  if (null != b && 0 < b.length) return c = null != c ? c : this.warningImage, b = new mxCellOverlay(c, "\x3cfont color\x3dred\x3e" + b + "\x3c/font\x3e"), d && b.addListener(mxEvent.CLICK, mxUtils
-    .bind(this, function(b, c) {
-      this.isEnabled() && this.setSelectionCell(a)
-    })), this.addCellOverlay(a, b);
-  this.removeCellOverlays(a);
-  return null
-};
-mxGraph.prototype.startEditing = function(a) {
-  this.startEditingAtCell(null, a)
-};
-mxGraph.prototype.startEditingAtCell = function(a, b) {
-  null == a && (a = this.getSelectionCell(), null != a && !this.isCellEditable(a) && (a = null));
-  null != a && (this.fireEvent(new mxEventObject(mxEvent.START_EDITING, "cell", a, "event", b)), this.cellEditor.startEditing(a, b))
-};
-mxGraph.prototype.getEditingValue = function(a, b) {
-  return this.convertValueToString(a)
-};
-mxGraph.prototype.stopEditing = function(a) {
-  this.cellEditor.stopEditing(a)
-};
-mxGraph.prototype.labelChanged = function(a, b, c) {
-  this.model.beginUpdate();
-  try {
-    this.cellLabelChanged(a, b, this.isAutoSizeCell(a)), this.fireEvent(new mxEventObject(mxEvent.LABEL_CHANGED, "cell", a, "value", b, "event", c))
-  } finally {
-    this.model.endUpdate()
-  }
-  return a
-};
-mxGraph.prototype.cellLabelChanged = function(a, b, c) {
-  this.model.beginUpdate();
-  try {
-    this.model.setValue(a, b), c && this.cellSizeUpdated(a, !1)
-  } finally {
-    this.model.endUpdate()
-  }
-};
-mxGraph.prototype.escape = function(a) {
-  this.stopEditing(!0);
-  this.connectionHandler.reset();
-  this.graphHandler.reset();
-  a = this.getSelectionCells();
-  for (var b = 0; b < a.length; b++) {
-    var c = this.view.getState(a[b]);
-    null != c && null != c.handler && c.handler.reset()
-  }
-};
-mxGraph.prototype.click = function(a) {
-  var b = a.getEvent(),
-    c = a.getCell(),
-    d = new mxEventObject(mxEvent.CLICK, "event", b, "cell", c);
-  a.isConsumed() && d.consume();
-  this.fireEvent(d);
-  this.isEnabled() && (!mxEvent.isConsumed(b) && !d.isConsumed()) && (null != c ? this.selectCellForEvent(c, b) : (c = null, this.isSwimlaneSelectionEnabled() && (c = this.getSwimlaneAt(a.getGraphX(),
-    a.getGraphY())), null != c ? this.selectCellForEvent(c, b) : this.isToggleEvent(b) || this.clearSelection()))
-};
-mxGraph.prototype.dblClick = function(a, b) {
-  var c = new mxEventObject(mxEvent.DOUBLE_CLICK, "event", a, "cell", b);
-  this.fireEvent(c);
-  this.isEnabled() && (!mxEvent.isConsumed(a) && !c.isConsumed() && null != b && this.isCellEditable(b)) && this.startEditingAtCell(b, a)
-};
-mxGraph.prototype.scrollPointToVisible = function(a, b, c, d) {
-  if (!this.timerAutoScroll && (this.ignoreScrollbars || mxUtils.hasScrollbars(this.container))) {
-    var e = this.container;
-    d = null != d ? d : 20;
-    if (a >= e.scrollLeft && b >= e.scrollTop && a <= e.scrollLeft + e.clientWidth && b <= e.scrollTop + e.clientHeight) {
-      var f = e.scrollLeft + e.clientWidth - a;
-      if (f < d) {
-        if (a = e.scrollLeft, e.scrollLeft += d - f, c && a == e.scrollLeft) {
-          if (this.dialect == mxConstants.DIALECT_SVG) {
-            a = this.view.getDrawPane().ownerSVGElement;
-            var g = this.container.scrollWidth + d - f
-          } else g =
-            Math.max(e.clientWidth, e.scrollWidth) + d - f, a = this.view.getCanvas();
-          a.style.width = g + "px";
-          e.scrollLeft += d - f
-        }
-      } else f = a - e.scrollLeft, f < d && (e.scrollLeft -= d - f);
-      f = e.scrollTop + e.clientHeight - b;
-      f < d ? (a = e.scrollTop, e.scrollTop += d - f, a == e.scrollTop && c && (this.dialect == mxConstants.DIALECT_SVG ? (a = this.view.getDrawPane().ownerSVGElement, b = this.container.scrollHeight +
-        d - f) : (b = Math.max(e.clientHeight, e.scrollHeight) + d - f, a = this.view.getCanvas()), a.style.height = b + "px", e.scrollTop += d - f)) : (f = b - e.scrollTop, f < d && (e.scrollTop -=
-        d - f))
-    }
-  } else this.allowAutoPanning && !this.panningHandler.active && (null == this.panningManager && (this.panningManager = this.createPanningManager()), this.panningManager.panTo(a + this.panDx, b +
-    this.panDy))
-};
-mxGraph.prototype.createPanningManager = function() {
-  return new mxPanningManager(this)
-};
-mxGraph.prototype.getBorderSizes = function() {
-  function a(a) {
-    var b = 0,
-      b = "thin" == a ? 2 : "medium" == a ? 4 : "thick" == a ? 6 : parseInt(a);
-    isNaN(b) && (b = 0);
-    return b
-  }
-  var b = mxUtils.getCurrentStyle(this.container),
-    c = new mxRectangle;
-  c.x = a(b.borderLeftWidth) + parseInt(b.paddingLeft || 0);
-  c.y = a(b.borderTopWidth) + parseInt(b.paddingTop || 0);
-  c.width = a(b.borderRightWidth) + parseInt(b.paddingRight || 0);
-  c.height = a(b.borderBottomWidth) + parseInt(b.paddingBottom || 0);
-  return c
-};
-mxGraph.prototype.getPreferredPageSize = function(a, b, c) {
-  a = this.view.scale;
-  var d = this.view.translate,
-    e = this.pageFormat,
-    f = a * this.pageScale,
-    e = new mxRectangle(0, 0, e.width * f, e.height * f);
-  b = this.pageBreaksVisible ? Math.ceil(b / e.width) : 1;
-  c = this.pageBreaksVisible ? Math.ceil(c / e.height) : 1;
-  return new mxRectangle(0, 0, b * e.width + 2 + d.x / a, c * e.height + 2 + d.y / a)
-};
-mxGraph.prototype.sizeDidChange = function() {
-  var a = this.getGraphBounds();
-  if (null != this.container) {
-    var b = this.getBorder(),
-      c = Math.max(0, a.x + a.width + 1 + b),
-      b = Math.max(0, a.y + a.height + 1 + b);
-    null != this.minimumContainerSize && (c = Math.max(c, this.minimumContainerSize.width), b = Math.max(b, this.minimumContainerSize.height));
-    this.resizeContainer && this.doResizeContainer(c, b);
-    if (this.preferPageSize || !mxClient.IS_IE && this.pageVisible) {
-      var d = this.getPreferredPageSize(a, c, b);
-      null != d && (c = d.width, b = d.height)
-    }
-    null != this.minimumGraphSize &&
-      (c = Math.max(c, this.minimumGraphSize.width * this.view.scale), b = Math.max(b, this.minimumGraphSize.height * this.view.scale));
-    c = Math.ceil(c - 1);
-    b = Math.ceil(b - 1);
-    this.dialect == mxConstants.DIALECT_SVG ? (d = this.view.getDrawPane().ownerSVGElement, d.style.minWidth = Math.max(1, c) + "px", d.style.minHeight = Math.max(1, b) + "px", d.style.width =
-      "100%", d.style.height = "100%") : mxClient.IS_QUIRKS ? this.view.updateHtmlCanvasSize(Math.max(1, c), Math.max(1, b)) : (this.view.canvas.style.minWidth = Math.max(1, c) + "px", this.view.canvas
-      .style.minHeight =
-      Math.max(1, b) + "px");
-    this.updatePageBreaks(this.pageBreaksVisible, c - 1, b - 1)
-  }
-  this.fireEvent(new mxEventObject(mxEvent.SIZE, "bounds", a))
-};
-mxGraph.prototype.doResizeContainer = function(a, b) {
-  if (mxClient.IS_IE)
-    if (mxClient.IS_QUIRKS) {
-      var c = this.getBorderSizes();
-      a += Math.max(2, c.x + c.width + 1);
-      b += Math.max(2, c.y + c.height + 1)
-    } else 9 <= document.documentMode ? (a += 3, b += 5) : (a += 1, b += 1);
-  else b += 1;
-  null != this.maximumContainerSize && (a = Math.min(this.maximumContainerSize.width, a), b = Math.min(this.maximumContainerSize.height, b));
-  this.container.style.width = Math.ceil(a) + "px";
-  this.container.style.height = Math.ceil(b) + "px"
-};
-mxGraph.prototype.updatePageBreaks = function(a, b, c) {
-  var d = this.view.scale,
-    e = this.view.translate,
-    f = this.pageFormat,
-    g = d * this.pageScale,
-    e = new mxRectangle(d * e.x, d * e.y, f.width * g, f.height * g);
-  a = a && Math.min(e.width, e.height) > this.minPageBreakDist;
-  e.x = mxUtils.mod(e.x, e.width);
-  e.y = mxUtils.mod(e.y, e.height);
-  f = a ? Math.ceil((b - e.x) / e.width) : 0;
-  a = a ? Math.ceil((c - e.y) / e.height) : 0;
-  null == this.horizontalPageBreaks && 0 < f && (this.horizontalPageBreaks = []);
-  if (null != this.horizontalPageBreaks) {
-    for (g = 0; g <= f; g++) {
-      var h = [new mxPoint(e.x +
-        g * e.width, 1), new mxPoint(e.x + g * e.width, c)];
-      null != this.horizontalPageBreaks[g] ? (this.horizontalPageBreaks[g].scale = 1, this.horizontalPageBreaks[g].points = h, this.horizontalPageBreaks[g].redraw()) : (h = new mxPolyline(h, this.pageBreakColor,
-        this.scale), h.dialect = this.dialect, h.isDashed = this.pageBreakDashed, h.scale = d, h.init(this.view.backgroundPane), h.redraw(), this.horizontalPageBreaks[g] = h)
-    }
-    for (g = f; g < this.horizontalPageBreaks.length; g++) this.horizontalPageBreaks[g].destroy();
-    this.horizontalPageBreaks.splice(f,
-      this.horizontalPageBreaks.length - f)
-  }
-  null == this.verticalPageBreaks && 0 < a && (this.verticalPageBreaks = []);
-  if (null != this.verticalPageBreaks) {
-    for (g = 0; g <= a; g++) h = [new mxPoint(1, e.y + g * e.height), new mxPoint(b, e.y + g * e.height)], null != this.verticalPageBreaks[g] ? (this.verticalPageBreaks[g].scale = 1, this.verticalPageBreaks[
-      g].points = h, this.verticalPageBreaks[g].redraw()) : (h = new mxPolyline(h, this.pageBreakColor, d), h.dialect = this.dialect, h.isDashed = this.pageBreakDashed, h.scale = d, h.init(this.view
-        .backgroundPane), h.redraw(),
-      this.verticalPageBreaks[g] = h);
-    for (g = a; g < this.verticalPageBreaks.length; g++) this.verticalPageBreaks[g].destroy();
-    this.verticalPageBreaks.splice(a, this.verticalPageBreaks.length - a)
-  }
-};
-mxGraph.prototype.getCellStyle = function(a) {
-  var b = this.model.getStyle(a),
-    c = null,
-    c = this.model.isEdge(a) ? this.stylesheet.getDefaultEdgeStyle() : this.stylesheet.getDefaultVertexStyle();
-  null != b && (c = this.postProcessCellStyle(this.stylesheet.getCellStyle(b, c)));
-  null == c && (c = mxGraph.prototype.EMPTY_ARRAY);
-  return c
-};
-mxGraph.prototype.postProcessCellStyle = function(a) {
-  if (null != a) {
-    var b = a[mxConstants.STYLE_IMAGE],
-      c = this.getImageFromBundles(b);
-    null != c ? a[mxConstants.STYLE_IMAGE] = c : c = b;
-    null != c && "data:image/" == c.substring(0, 11) && (b = c.indexOf(","), 0 < b && (c = c.substring(0, b) + ";base64," + c.substring(b + 1)), a[mxConstants.STYLE_IMAGE] = c)
-  }
-  return a
-};
-mxGraph.prototype.setCellStyle = function(a, b) {
-  b = b || this.getSelectionCells();
-  if (null != b) {
-    this.model.beginUpdate();
-    try {
-      for (var c = 0; c < b.length; c++) this.model.setStyle(b[c], a)
-    } finally {
-      this.model.endUpdate()
-    }
-  }
-};
-mxGraph.prototype.toggleCellStyle = function(a, b, c) {
-  c = c || this.getSelectionCell();
-  this.toggleCellStyles(a, b, [c])
-};
-mxGraph.prototype.toggleCellStyles = function(a, b, c) {
-  b = null != b ? b : !1;
-  c = c || this.getSelectionCells();
-  if (null != c && 0 < c.length) {
-    var d = this.view.getState(c[0]),
-      d = null != d ? d.style : this.getCellStyle(c[0]);
-    null != d && (b = mxUtils.getValue(d, a, b) ? 0 : 1, this.setCellStyles(a, b, c))
-  }
-};
-mxGraph.prototype.setCellStyles = function(a, b, c) {
-  c = c || this.getSelectionCells();
-  mxUtils.setCellStyles(this.model, c, a, b)
-};
-mxGraph.prototype.toggleCellStyleFlags = function(a, b, c) {
-  this.setCellStyleFlags(a, b, null, c)
-};
-mxGraph.prototype.setCellStyleFlags = function(a, b, c, d) {
-  d = d || this.getSelectionCells();
-  if (null != d && 0 < d.length) {
-    if (null == c) {
-      var e = this.view.getState(d[0]),
-        e = null != e ? e.style : this.getCellStyle(d[0]);
-      null != e && (c = (parseInt(e[a] || 0) & b) != b)
-    }
-    mxUtils.setCellStyleFlags(this.model, d, a, b, c)
-  }
-};
-mxGraph.prototype.alignCells = function(a, b, c) {
-  null == b && (b = this.getSelectionCells());
-  if (null != b && 1 < b.length) {
-    if (null == c)
-      for (var d = 0; d < b.length; d++) {
-        var e = this.getCellGeometry(b[d]);
-        if (null != e && !this.model.isEdge(b[d]))
-          if (null == c)
-            if (a == mxConstants.ALIGN_CENTER) {
-              c = e.x + e.width / 2;
-              break
-            } else if (a == mxConstants.ALIGN_RIGHT) c = e.x + e.width;
-        else if (a == mxConstants.ALIGN_TOP) c = e.y;
-        else if (a == mxConstants.ALIGN_MIDDLE) {
-          c = e.y + e.height / 2;
-          break
-        } else c = a == mxConstants.ALIGN_BOTTOM ? e.y + e.height : e.x;
-        else c = a == mxConstants.ALIGN_RIGHT ?
-          Math.max(c, e.x + e.width) : a == mxConstants.ALIGN_TOP ? Math.min(c, e.y) : a == mxConstants.ALIGN_BOTTOM ? Math.max(c, e.y + e.height) : Math.min(c, e.x)
-      }
-    if (null != c) {
-      this.model.beginUpdate();
-      try {
-        for (d = 0; d < b.length; d++) e = this.getCellGeometry(b[d]), null != e && !this.model.isEdge(b[d]) && (e = e.clone(), a == mxConstants.ALIGN_CENTER ? e.x = c - e.width / 2 : a ==
-          mxConstants.ALIGN_RIGHT ? e.x = c - e.width : a == mxConstants.ALIGN_TOP ? e.y = c : a == mxConstants.ALIGN_MIDDLE ? e.y = c - e.height / 2 : a == mxConstants.ALIGN_BOTTOM ? e.y = c - e
-          .height : e.x = c, this.model.setGeometry(b[d],
-            e));
-        this.fireEvent(new mxEventObject(mxEvent.ALIGN_CELLS, "align", a, "cells", b))
-      } finally {
-        this.model.endUpdate()
-      }
-    }
-  }
-  return b
-};
-mxGraph.prototype.flipEdge = function(a) {
-  if (null != a && null != this.alternateEdgeStyle) {
-    this.model.beginUpdate();
-    try {
-      var b = this.model.getStyle(a);
-      null == b || 0 == b.length ? this.model.setStyle(a, this.alternateEdgeStyle) : this.model.setStyle(a, null);
-      this.resetEdge(a);
-      this.fireEvent(new mxEventObject(mxEvent.FLIP_EDGE, "edge", a))
-    } finally {
-      this.model.endUpdate()
-    }
-  }
-  return a
-};
-mxGraph.prototype.addImageBundle = function(a) {
-  this.imageBundles.push(a)
-};
-mxGraph.prototype.removeImageBundle = function(a) {
-  for (var b = [], c = 0; c < this.imageBundles.length; c++) this.imageBundles[c] != a && b.push(this.imageBundles[c]);
-  this.imageBundles = b
-};
-mxGraph.prototype.getImageFromBundles = function(a) {
-  if (null != a)
-    for (var b = 0; b < this.imageBundles.length; b++) {
-      var c = this.imageBundles[b].getImage(a);
-      if (null != c) return c
-    }
-  return null
-};
-mxGraph.prototype.orderCells = function(a, b) {
-  null == b && (b = mxUtils.sortCells(this.getSelectionCells(), !0));
-  this.model.beginUpdate();
-  try {
-    this.cellsOrdered(b, a), this.fireEvent(new mxEventObject(mxEvent.ORDER_CELLS, "back", a, "cells", b))
-  } finally {
-    this.model.endUpdate()
-  }
-  return b
-};
-mxGraph.prototype.cellsOrdered = function(a, b) {
-  if (null != a) {
-    this.model.beginUpdate();
-    try {
-      for (var c = 0; c < a.length; c++) {
-        var d = this.model.getParent(a[c]);
-        b ? this.model.add(d, a[c], c) : this.model.add(d, a[c], this.model.getChildCount(d) - 1)
-      }
-      this.fireEvent(new mxEventObject(mxEvent.CELLS_ORDERED, "back", b, "cells", a))
-    } finally {
-      this.model.endUpdate()
-    }
-  }
-};
-mxGraph.prototype.groupCells = function(a, b, c) {
-  null == c && (c = mxUtils.sortCells(this.getSelectionCells(), !0));
-  c = this.getCellsForGroup(c);
-  null == a && (a = this.createGroupCell(c));
-  var d = this.getBoundsForGroup(a, c, b);
-  if (0 < c.length && null != d) {
-    var e = this.model.getParent(a);
-    null == e && (e = this.model.getParent(c[0]));
-    this.model.beginUpdate();
-    try {
-      null == this.getCellGeometry(a) && this.model.setGeometry(a, new mxGeometry);
-      var f = this.model.getChildCount(e);
-      this.cellsAdded([a], e, f, null, null, !1);
-      f = this.model.getChildCount(a);
-      this.cellsAdded(c, a, f, null, null, !1, !1);
-      this.cellsMoved(c, -d.x, -d.y, !1, !0);
-      this.cellsResized([a], [d]);
-      this.fireEvent(new mxEventObject(mxEvent.GROUP_CELLS, "group", a, "border", b, "cells", c))
-    } finally {
-      this.model.endUpdate()
-    }
-  }
-  return a
-};
-mxGraph.prototype.getCellsForGroup = function(a) {
-  var b = [];
-  if (null != a && 0 < a.length) {
-    var c = this.model.getParent(a[0]);
-    b.push(a[0]);
-    for (var d = 1; d < a.length; d++) this.model.getParent(a[d]) == c && b.push(a[d])
-  }
-  return b
-};
-mxGraph.prototype.getBoundsForGroup = function(a, b, c) {
-  b = this.getBoundingBoxFromGeometry(b);
-  null != b && (this.isSwimlane(a) && (a = this.getStartSize(a), b.x -= a.width, b.y -= a.height, b.width += a.width, b.height += a.height), b.x -= c, b.y -= c, b.width += 2 * c, b.height += 2 * c);
-  return b
-};
-mxGraph.prototype.createGroupCell = function(a) {
-  a = new mxCell("");
-  a.setVertex(!0);
-  a.setConnectable(!1);
-  return a
-};
-mxGraph.prototype.ungroupCells = function(a) {
-  var b = [];
-  if (null == a) {
-    a = this.getSelectionCells();
-    for (var c = [], d = 0; d < a.length; d++) 0 < this.model.getChildCount(a[d]) && c.push(a[d]);
-    a = c
-  }
-  if (null != a && 0 < a.length) {
-    this.model.beginUpdate();
-    try {
-      for (d = 0; d < a.length; d++) {
-        var e = this.model.getChildren(a[d]);
-        if (null != e && 0 < e.length) {
-          var e = e.slice(),
-            f = this.model.getParent(a[d]),
-            g = this.model.getChildCount(f);
-          this.cellsAdded(e, f, g, null, null, !0);
-          b = b.concat(e)
-        }
-      }
-      this.cellsRemoved(this.addAllEdges(a));
-      this.fireEvent(new mxEventObject(mxEvent.UNGROUP_CELLS,
-        "cells", a))
-    } finally {
-      this.model.endUpdate()
-    }
-  }
-  return b
-};
-mxGraph.prototype.removeCellsFromParent = function(a) {
-  null == a && (a = this.getSelectionCells());
-  this.model.beginUpdate();
-  try {
-    var b = this.getDefaultParent(),
-      c = this.model.getChildCount(b);
-    this.cellsAdded(a, b, c, null, null, !0);
-    this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT, "cells", a))
-  } finally {
-    this.model.endUpdate()
-  }
-  return a
-};
-mxGraph.prototype.updateGroupBounds = function(a, b, c) {
-  null == a && (a = this.getSelectionCells());
-  b = null != b ? b : 0;
-  c = null != c ? c : !1;
-  this.model.beginUpdate();
-  try {
-    for (var d = 0; d < a.length; d++) {
-      var e = this.getCellGeometry(a[d]);
-      if (null != e) {
-        var f = this.getChildCells(a[d]);
-        if (null != f && 0 < f.length) {
-          var g = this.getBoundingBoxFromGeometry(f);
-          if (0 < g.width && 0 < g.height) {
-            var h = this.isSwimlane(a[d]) ? this.getStartSize(a[d]) : new mxRectangle,
-              e = e.clone();
-            c && (e.x += g.x - h.width - b, e.y += g.y - h.height - b);
-            e.width = g.width + h.width + 2 * b;
-            e.height =
-              g.height + h.height + 2 * b;
-            this.model.setGeometry(a[d], e);
-            this.moveCells(f, -g.x + h.width + b, -g.y + h.height + b)
-          }
-        }
-      }
-    }
-  } finally {
-    this.model.endUpdate()
-  }
-  return a
-};
-mxGraph.prototype.cloneCells = function(a, b) {
-  b = null != b ? b : !0;
-  var c = null;
-  if (null != a) {
-    for (var d = {}, c = [], e = 0; e < a.length; e++) {
-      var f = mxCellPath.create(a[e]);
-      d[f] = a[e];
-      c.push(a[e])
-    }
-    if (0 < c.length)
-      for (var f = this.view.scale, g = this.view.translate, c = this.model.cloneCells(a, !0), e = 0; e < a.length; e++)
-        if (!b && this.model.isEdge(c[e]) && null != this.getEdgeValidationError(c[e], this.model.getTerminal(c[e], !0), this.model.getTerminal(c[e], !1))) c[e] = null;
-        else {
-          var h = this.model.getGeometry(c[e]);
-          if (null != h) {
-            var k = this.view.getState(a[e]),
-              l = this.view.getState(this.model.getParent(a[e]));
-            if (null != k && null != l) {
-              var m = l.origin.x,
-                l = l.origin.y;
-              if (this.model.isEdge(c[e])) {
-                for (var k = k.absolutePoints, n = this.model.getTerminal(a[e], !0), p = mxCellPath.create(n); null != n && null == d[p];) n = this.model.getParent(n), p = mxCellPath.create(n);
-                null == n && h.setTerminalPoint(new mxPoint(k[0].x / f - g.x, k[0].y / f - g.y), !0);
-                n = this.model.getTerminal(a[e], !1);
-                for (p = mxCellPath.create(n); null != n && null == d[p];) n = this.model.getParent(n), p = mxCellPath.create(n);
-                null == n && (n = k.length -
-                  1, h.setTerminalPoint(new mxPoint(k[n].x / f - g.x, k[n].y / f - g.y), !1));
-                h = h.points;
-                if (null != h)
-                  for (k = 0; k < h.length; k++) h[k].x += m, h[k].y += l
-              } else h.x += m, h.y += l
-            }
-          }
-        } else c = []
-  }
-  return c
-};
-mxGraph.prototype.insertVertex = function(a, b, c, d, e, f, g, h, k) {
-  b = this.createVertex(a, b, c, d, e, f, g, h, k);
-  return this.addCell(b, a)
-};
-mxGraph.prototype.createVertex = function(a, b, c, d, e, f, g, h, k) {
-  a = new mxGeometry(d, e, f, g);
-  a.relative = null != k ? k : !1;
-  c = new mxCell(c, a, h);
-  c.setId(b);
-  c.setVertex(!0);
-  c.setConnectable(!0);
-  return c
-};
-mxGraph.prototype.insertEdge = function(a, b, c, d, e, f) {
-  b = this.createEdge(a, b, c, d, e, f);
-  return this.addEdge(b, a, d, e)
-};
-mxGraph.prototype.createEdge = function(a, b, c, d, e, f) {
-  a = new mxCell(c, new mxGeometry, f);
-  a.setId(b);
-  a.setEdge(!0);
-  a.geometry.relative = !0;
-  return a
-};
-mxGraph.prototype.addEdge = function(a, b, c, d, e) {
-  return this.addCell(a, b, e, c, d)
-};
-mxGraph.prototype.addCell = function(a, b, c, d, e) {
-  return this.addCells([a], b, c, d, e)[0]
-};
-mxGraph.prototype.addCells = function(a, b, c, d, e) {
-  null == b && (b = this.getDefaultParent());
-  null == c && (c = this.model.getChildCount(b));
-  this.model.beginUpdate();
-  try {
-    this.cellsAdded(a, b, c, d, e, !1, !0), this.fireEvent(new mxEventObject(mxEvent.ADD_CELLS, "cells", a, "parent", b, "index", c, "source", d, "target", e))
-  } finally {
-    this.model.endUpdate()
-  }
-  return a
-};
-mxGraph.prototype.cellsAdded = function(a, b, c, d, e, f, g) {
-  if (null != a && null != b && null != c) {
-    this.model.beginUpdate();
-    try {
-      for (var h = f ? this.view.getState(b) : null, k = null != h ? h.origin : null, l = new mxPoint(0, 0), h = 0; h < a.length; h++)
-        if (null == a[h]) c--;
-        else {
-          var m = this.model.getParent(a[h]);
-          if (null != k && a[h] != b && b != m) {
-            var n = this.view.getState(m),
-              p = null != n ? n.origin : l,
-              q = this.model.getGeometry(a[h]);
-            if (null != q) {
-              var s = p.x - k.x,
-                r = p.y - k.y,
-                q = q.clone();
-              q.translate(s, r);
-              !q.relative && (this.model.isVertex(a[h]) && !this.isAllowNegativeCoordinates()) &&
-                (q.x = Math.max(0, q.x), q.y = Math.max(0, q.y));
-              this.model.setGeometry(a[h], q)
-            }
-          }
-          b == m && c + h > this.model.getChildCount(b) && c--;
-          this.model.add(b, a[h], c + h);
-          this.isExtendParentsOnAdd() && this.isExtendParent(a[h]) && this.extendParent(a[h]);
-          (null == g || g) && this.constrainChild(a[h]);
-          null != d && this.cellConnected(a[h], d, !0);
-          null != e && this.cellConnected(a[h], e, !1)
-        }
-      this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED, "cells", a, "parent", b, "index", c, "source", d, "target", e, "absolute", f))
-    } finally {
-      this.model.endUpdate()
-    }
-  }
-};
-mxGraph.prototype.removeCells = function(a, b) {
-  b = null != b ? b : !0;
-  null == a && (a = this.getDeletableCells(this.getSelectionCells()));
-  b && (a = this.getDeletableCells(this.addAllEdges(a)));
-  this.model.beginUpdate();
-  try {
-    this.cellsRemoved(a), this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS, "cells", a, "includeEdges", b))
-  } finally {
-    this.model.endUpdate()
-  }
-  return a
-};
-mxGraph.prototype.cellsRemoved = function(a) {
-  if (null != a && 0 < a.length) {
-    var b = this.view.scale,
-      c = this.view.translate;
-    this.model.beginUpdate();
-    try {
-      for (var d = {}, e = 0; e < a.length; e++) {
-        var f = mxCellPath.create(a[e]);
-        d[f] = a[e]
-      }
-      for (e = 0; e < a.length; e++) {
-        for (var g = this.getConnections(a[e]), h = 0; h < g.length; h++)
-          if (f = mxCellPath.create(g[h]), null == d[f]) {
-            var k = this.model.getGeometry(g[h]);
-            if (null != k) {
-              var l = this.view.getState(g[h]);
-              if (null != l) {
-                var k = k.clone(),
-                  m = l.getVisibleTerminal(!0) == a[e],
-                  n = l.absolutePoints,
-                  p = m ? 0 : n.length -
-                  1;
-                k.setTerminalPoint(new mxPoint(n[p].x / b - c.x, n[p].y / b - c.y), m);
-                this.model.setTerminal(g[h], null, m);
-                this.model.setGeometry(g[h], k)
-              }
-            }
-          }
-        this.model.remove(a[e])
-      }
-      this.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED, "cells", a))
-    } finally {
-      this.model.endUpdate()
-    }
-  }
-};
-mxGraph.prototype.splitEdge = function(a, b, c, d, e) {
-  d = d || 0;
-  e = e || 0;
-  null == c && (c = this.cloneCells([a])[0]);
-  var f = this.model.getParent(a),
-    g = this.model.getTerminal(a, !0);
-  this.model.beginUpdate();
-  try {
-    this.cellsMoved(b, d, e, !1, !1), this.cellsAdded(b, f, this.model.getChildCount(f), null, null, !0), this.cellsAdded([c], f, this.model.getChildCount(f), g, b[0], !1), this.cellConnected(a, b[
-      0], !0), this.fireEvent(new mxEventObject(mxEvent.SPLIT_EDGE, "edge", a, "cells", b, "newEdge", c, "dx", d, "dy", e))
-  } finally {
-    this.model.endUpdate()
-  }
-  return c
-};
-mxGraph.prototype.toggleCells = function(a, b, c) {
-  null == b && (b = this.getSelectionCells());
-  c && (b = this.addAllEdges(b));
-  this.model.beginUpdate();
-  try {
-    this.cellsToggled(b, a), this.fireEvent(new mxEventObject(mxEvent.TOGGLE_CELLS, "show", a, "cells", b, "includeEdges", c))
-  } finally {
-    this.model.endUpdate()
-  }
-  return b
-};
-mxGraph.prototype.cellsToggled = function(a, b) {
-  if (null != a && 0 < a.length) {
-    this.model.beginUpdate();
-    try {
-      for (var c = 0; c < a.length; c++) this.model.setVisible(a[c], b)
-    } finally {
-      this.model.endUpdate()
-    }
-  }
-};
-mxGraph.prototype.foldCells = function(a, b, c, d) {
-  b = null != b ? b : !1;
-  null == c && (c = this.getFoldableCells(this.getSelectionCells(), a));
-  this.stopEditing(!1);
-  this.model.beginUpdate();
-  try {
-    this.cellsFolded(c, a, b, d), this.fireEvent(new mxEventObject(mxEvent.FOLD_CELLS, "collapse", a, "recurse", b, "cells", c))
-  } finally {
-    this.model.endUpdate()
-  }
-  return c
-};
-mxGraph.prototype.cellsFolded = function(a, b, c, d) {
-  if (null != a && 0 < a.length) {
-    this.model.beginUpdate();
-    try {
-      for (var e = 0; e < a.length; e++)
-        if ((!d || this.isCellFoldable(a[e], b)) && b != this.isCellCollapsed(a[e]))
-          if (this.model.setCollapsed(a[e], b), this.swapBounds(a[e], b), this.isExtendParent(a[e]) && this.extendParent(a[e]), c) {
-            var f = this.model.getChildren(a[e]);
-            this.foldCells(f, b, c)
-          }
-      this.fireEvent(new mxEventObject(mxEvent.CELLS_FOLDED, "cells", a, "collapse", b, "recurse", c))
-    } finally {
-      this.model.endUpdate()
-    }
-  }
-};
-mxGraph.prototype.swapBounds = function(a, b) {
-  if (null != a) {
-    var c = this.model.getGeometry(a);
-    null != c && (c = c.clone(), this.updateAlternateBounds(a, c, b), c.swap(), this.model.setGeometry(a, c))
-  }
-};
-mxGraph.prototype.updateAlternateBounds = function(a, b, c) {
-  if (null != a && null != b) {
-    c = this.view.getState(a);
-    c = null != c ? c.style : this.getCellStyle(a);
-    if (null == b.alternateBounds) {
-      var d = b;
-      this.collapseToPreferredSize && (a = this.getPreferredSizeForCell(a), null != a && (d = a, a = mxUtils.getValue(c, mxConstants.STYLE_STARTSIZE), 0 < a && (d.height = Math.max(d.height, a))));
-      b.alternateBounds = new mxRectangle(0, 0, d.width, d.height)
-    }
-    if (null != b.alternateBounds) {
-      b.alternateBounds.x = b.x;
-      b.alternateBounds.y = b.y;
-      var e = mxUtils.toRadians(c[mxConstants.STYLE_ROTATION] ||
-        "0");
-      0 != e && (a = b.alternateBounds.getCenterX() - b.getCenterX(), c = b.alternateBounds.getCenterY() - b.getCenterY(), d = Math.cos(e), e = Math.sin(e), b.alternateBounds.x += d * a - e * c - a,
-        b.alternateBounds.y += e * a + d * c - c)
-    }
-  }
-};
-mxGraph.prototype.addAllEdges = function(a) {
-  var b = a.slice();
-  return b = b.concat(this.getAllEdges(a))
-};
-mxGraph.prototype.getAllEdges = function(a) {
-  var b = [];
-  if (null != a)
-    for (var c = 0; c < a.length; c++) {
-      for (var d = this.model.getEdgeCount(a[c]), e = 0; e < d; e++) b.push(this.model.getEdgeAt(a[c], e));
-      d = this.model.getChildren(a[c]);
-      b = b.concat(this.getAllEdges(d))
-    }
-  return b
-};
-mxGraph.prototype.updateCellSize = function(a, b) {
-  b = null != b ? b : !1;
-  this.model.beginUpdate();
-  try {
-    this.cellSizeUpdated(a, b), this.fireEvent(new mxEventObject(mxEvent.UPDATE_CELL_SIZE, "cell", a, "ignoreChildren", b))
-  } finally {
-    this.model.endUpdate()
-  }
-  return a
-};
-mxGraph.prototype.cellSizeUpdated = function(a, b) {
-  if (null != a) {
-    this.model.beginUpdate();
-    try {
-      var c = this.getPreferredSizeForCell(a),
-        d = this.model.getGeometry(a);
-      if (null != c && null != d) {
-        var e = this.isCellCollapsed(a),
-          d = d.clone();
-        if (this.isSwimlane(a)) {
-          var f = this.view.getState(a),
-            g = null != f ? f.style : this.getCellStyle(a),
-            h = this.model.getStyle(a);
-          null == h && (h = "");
-          mxUtils.getValue(g, mxConstants.STYLE_HORIZONTAL, !0) ? (h = mxUtils.setStyle(h, mxConstants.STYLE_STARTSIZE, c.height + 8), e && (d.height = c.height + 8), d.width = c.width) :
-            (h = mxUtils.setStyle(h, mxConstants.STYLE_STARTSIZE, c.width + 8), e && (d.width = c.width + 8), d.height = c.height);
-          this.model.setStyle(a, h)
-        } else d.width = c.width, d.height = c.height;
-        if (!b && !e) {
-          var k = this.view.getBounds(this.model.getChildren(a));
-          if (null != k) {
-            var l = this.view.translate,
-              m = this.view.scale,
-              n = (k.y + k.height) / m - d.y - l.y;
-            d.width = Math.max(d.width, (k.x + k.width) / m - d.x - l.x);
-            d.height = Math.max(d.height, n)
-          }
-        }
-        this.cellsResized([a], [d])
-      }
-    } finally {
-      this.model.endUpdate()
-    }
-  }
-};
-mxGraph.prototype.getPreferredSizeForCell = function(a) {
-  var b = null;
-  if (null != a) {
-    var c = this.view.getState(a),
-      d = null != c ? c.style : this.getCellStyle(a);
-    if (null != d && !this.model.isEdge(a)) {
-      var e = d[mxConstants.STYLE_FONTSIZE] || mxConstants.DEFAULT_FONTSIZE,
-        f = 0,
-        b = 0;
-      if ((null != this.getImage(c) || null != d[mxConstants.STYLE_IMAGE]) && d[mxConstants.STYLE_SHAPE] == mxConstants.SHAPE_LABEL) d[mxConstants.STYLE_VERTICAL_ALIGN] == mxConstants.ALIGN_MIDDLE &&
-        (f += parseFloat(d[mxConstants.STYLE_IMAGE_WIDTH]) || mxLabel.prototype.imageSize),
-        d[mxConstants.STYLE_ALIGN] != mxConstants.ALIGN_CENTER && (b += parseFloat(d[mxConstants.STYLE_IMAGE_HEIGHT]) || mxLabel.prototype.imageSize);
-      f += 2 * (d[mxConstants.STYLE_SPACING] || 0);
-      f += d[mxConstants.STYLE_SPACING_LEFT] || 0;
-      f += d[mxConstants.STYLE_SPACING_RIGHT] || 0;
-      b += 2 * (d[mxConstants.STYLE_SPACING] || 0);
-      b += d[mxConstants.STYLE_SPACING_TOP] || 0;
-      b += d[mxConstants.STYLE_SPACING_BOTTOM] || 0;
-      c = this.getFoldingImage(c);
-      null != c && (f += c.width + 8);
-      c = this.getLabel(a);
-      null != c && 0 < c.length ? (this.isHtmlLabel(a) || (c = c.replace(/\n/g,
-        "\x3cbr\x3e")), e = mxUtils.getSizeForString(c, e, d[mxConstants.STYLE_FONTFAMILY]), a = e.width + f, b = e.height + b, mxUtils.getValue(d, mxConstants.STYLE_HORIZONTAL, !0) || (d = b,
-        b = a, a = d), this.gridEnabled && (a = this.snap(a + this.gridSize / 2), b = this.snap(b + this.gridSize / 2)), b = new mxRectangle(0, 0, a, b)) : (d = 4 * this.gridSize, b = new mxRectangle(
-        0, 0, d, d))
-    }
-  }
-  return b
-};
-mxGraph.prototype.handleGesture = function(a, b) {
-  if (0.2 < Math.abs(1 - b.scale)) {
-    var c = this.view.scale,
-      d = this.view.translate,
-      e = a.width * b.scale,
-      f = a.height * b.scale,
-      g = a.y - (f - a.height) / 2,
-      c = new mxRectangle(this.snap((a.x - (e - a.width) / 2) / c) - d.x, this.snap(g / c) - d.y, this.snap(e / c), this.snap(f / c));
-    this.resizeCell(a.cell, c)
-  }
-};
-mxGraph.prototype.resizeCell = function(a, b) {
-  return this.resizeCells([a], [b])[0]
-};
-mxGraph.prototype.resizeCells = function(a, b) {
-  this.model.beginUpdate();
-  try {
-    this.cellsResized(a, b), this.fireEvent(new mxEventObject(mxEvent.RESIZE_CELLS, "cells", a, "bounds", b))
-  } finally {
-    this.model.endUpdate()
-  }
-  return a
-};
-mxGraph.prototype.cellsResized = function(a, b) {
-  if (null != a && null != b && a.length == b.length) {
-    this.model.beginUpdate();
-    try {
-      for (var c = 0; c < a.length; c++) {
-        var d = b[c],
-          e = this.model.getGeometry(a[c]);
-        if (null != e && (e.x != d.x || e.y != d.y || e.width != d.width || e.height != d.height)) {
-          e = e.clone();
-          if (e.relative) {
-            var f = e.offset;
-            null != f && (f.x += d.x - e.x, f.y += d.y - e.y)
-          } else e.x = d.x, e.y = d.y;
-          e.width = d.width;
-          e.height = d.height;
-          !e.relative && (this.model.isVertex(a[c]) && !this.isAllowNegativeCoordinates()) && (e.x = Math.max(0, e.x), e.y = Math.max(0,
-            e.y));
-          this.model.setGeometry(a[c], e);
-          this.isExtendParent(a[c]) && this.extendParent(a[c])
-        }
-      }
-      this.resetEdgesOnResize && this.resetEdges(a);
-      this.fireEvent(new mxEventObject(mxEvent.CELLS_RESIZED, "cells", a, "bounds", b))
-    } finally {
-      this.model.endUpdate()
-    }
-  }
-};
-mxGraph.prototype.extendParent = function(a) {
-  if (null != a) {
-    var b = this.model.getParent(a),
-      c = this.model.getGeometry(b);
-    if (null != b && (null != c && !this.isCellCollapsed(b)) && (a = this.model.getGeometry(a), null != a && (c.width < a.x + a.width || c.height < a.y + a.height))) c = c.clone(), c.width = Math.max(
-      c.width, a.x + a.width), c.height = Math.max(c.height, a.y + a.height), this.cellsResized([b], [c])
-  }
-};
-mxGraph.prototype.importCells = function(a, b, c, d, e) {
-  return this.moveCells(a, b, c, !0, d, e)
-};
-mxGraph.prototype.moveCells = function(a, b, c, d, e, f) {
-  b = null != b ? b : 0;
-  c = null != c ? c : 0;
-  d = null != d ? d : !1;
-  if (null != a && (0 != b || 0 != c || d || null != e)) {
-    this.model.beginUpdate();
-    try {
-      d && (a = this.cloneCells(a, this.isCloneInvalidEdges()), null == e && (e = this.getDefaultParent()));
-      var g = this.isAllowNegativeCoordinates();
-      null != e && this.setAllowNegativeCoordinates(!0);
-      this.cellsMoved(a, b, c, !d && this.isDisconnectOnMove() && this.isAllowDanglingEdges(), null == e);
-      this.setAllowNegativeCoordinates(g);
-      if (null != e) {
-        var h = this.model.getChildCount(e);
-        this.cellsAdded(a, e, h, null, null, !0)
-      }
-      this.fireEvent(new mxEventObject(mxEvent.MOVE_CELLS, "cells", a, "dx", b, "dy", c, "clone", d, "target", e, "event", f))
-    } finally {
-      this.model.endUpdate()
-    }
-  }
-  return a
-};
-mxGraph.prototype.cellsMoved = function(a, b, c, d, e) {
-  if (null != a && (0 != b || 0 != c)) {
-    this.model.beginUpdate();
-    try {
-      d && this.disconnectGraph(a);
-      for (var f = 0; f < a.length; f++) this.translateCell(a[f], b, c), e && this.constrainChild(a[f]);
-      this.resetEdgesOnMove && this.resetEdges(a);
-      this.fireEvent(new mxEventObject(mxEvent.CELLS_MOVED, "cells", a, "dx", c, "dy", c, "disconnect", d))
-    } finally {
-      this.model.endUpdate()
-    }
-  }
-};
-mxGraph.prototype.translateCell = function(a, b, c) {
-  var d = this.model.getGeometry(a);
-  null != d && (d = d.clone(), d.translate(b, c), !d.relative && (this.model.isVertex(a) && !this.isAllowNegativeCoordinates()) && (d.x = Math.max(0, d.x), d.y = Math.max(0, d.y)), d.relative && !
-    this.model.isEdge(a) && (null == d.offset ? d.offset = new mxPoint(b, c) : (d.offset.x += b, d.offset.y += c)), this.model.setGeometry(a, d))
-};
-mxGraph.prototype.getCellContainmentArea = function(a) {
-  if (null != a && !this.model.isEdge(a)) {
-    var b = this.model.getParent(a);
-    if (b == this.getDefaultParent() || b == this.getCurrentRoot()) return this.getMaximumGraphBounds();
-    if (null != b && b != this.getDefaultParent()) {
-      var c = this.model.getGeometry(b);
-      if (null != c) {
-        var d = a = 0,
-          e = c.width,
-          c = c.height;
-        this.isSwimlane(b) && (b = this.getStartSize(b), a = b.width, e -= b.width, d = b.height, c -= b.height);
-        return new mxRectangle(a, d, e, c)
-      }
-    }
-  }
-  return null
-};
-mxGraph.prototype.getMaximumGraphBounds = function() {
-  return this.maximumGraphBounds
-};
-mxGraph.prototype.constrainChild = function(a) {
-  if (null != a) {
-    var b = this.model.getGeometry(a),
-      c = this.isConstrainChild(a) ? this.getCellContainmentArea(a) : this.getMaximumGraphBounds();
-    if (null != b && null != c && !b.relative && (b.x < c.x || b.y < c.y || c.width < b.x + b.width || c.height < b.y + b.height)) a = this.getOverlap(a), 0 < c.width && (b.x = Math.min(b.x, c.x +
-      c.width - (1 - a) * b.width)), 0 < c.height && (b.y = Math.min(b.y, c.y + c.height - (1 - a) * b.height)), b.x = Math.max(b.x, c.x - b.width * a), b.y = Math.max(b.y, c.y - b.height * a)
-  }
-};
-mxGraph.prototype.resetEdges = function(a) {
-  if (null != a) {
-    for (var b = {}, c = 0; c < a.length; c++) {
-      var d = mxCellPath.create(a[c]);
-      b[d] = a[c]
-    }
-    this.model.beginUpdate();
-    try {
-      for (c = 0; c < a.length; c++) {
-        var e = this.model.getEdges(a[c]);
-        if (null != e)
-          for (d = 0; d < e.length; d++) {
-            var f = this.view.getState(e[d]),
-              g = null != f ? f.getVisibleTerminal(!0) : this.view.getVisibleTerminal(e[d], !0),
-              h = null != f ? f.getVisibleTerminal(!1) : this.view.getVisibleTerminal(e[d], !1),
-              k = mxCellPath.create(g),
-              l = mxCellPath.create(h);
-            (null == b[k] || null == b[l]) && this.resetEdge(e[d])
-          }
-        this.resetEdges(this.model.getChildren(a[c]))
-      }
-    } finally {
-      this.model.endUpdate()
-    }
-  }
-};
-mxGraph.prototype.resetEdge = function(a) {
-  var b = this.model.getGeometry(a);
-  null != b && (null != b.points && 0 < b.points.length) && (b = b.clone(), b.points = [], this.model.setGeometry(a, b));
-  return a
-};
-mxGraph.prototype.getAllConnectionConstraints = function(a, b) {
-  return null != a && null != a.shape && null != a.shape.stencil ? a.shape.stencil.constraints : null
-};
-mxGraph.prototype.getConnectionConstraint = function(a, b, c) {
-  b = null;
-  var d = a.style[c ? mxConstants.STYLE_EXIT_X : mxConstants.STYLE_ENTRY_X];
-  if (null != d) {
-    var e = a.style[c ? mxConstants.STYLE_EXIT_Y : mxConstants.STYLE_ENTRY_Y];
-    null != e && (b = new mxPoint(parseFloat(d), parseFloat(e)))
-  }
-  d = !1;
-  null != b && (d = mxUtils.getValue(a.style, c ? mxConstants.STYLE_EXIT_PERIMETER : mxConstants.STYLE_ENTRY_PERIMETER, !0));
-  return new mxConnectionConstraint(b, d)
-};
-mxGraph.prototype.setConnectionConstraint = function(a, b, c, d) {
-  if (null != d) {
-    this.model.beginUpdate();
-    try {
-      null == d || null == d.point ? (this.setCellStyles(c ? mxConstants.STYLE_EXIT_X : mxConstants.STYLE_ENTRY_X, null, [a]), this.setCellStyles(c ? mxConstants.STYLE_EXIT_Y : mxConstants.STYLE_ENTRY_Y,
-        null, [a]), this.setCellStyles(c ? mxConstants.STYLE_EXIT_PERIMETER : mxConstants.STYLE_ENTRY_PERIMETER, null, [a])) : null != d.point && (this.setCellStyles(c ? mxConstants.STYLE_EXIT_X :
-        mxConstants.STYLE_ENTRY_X, d.point.x, [a]), this.setCellStyles(c ?
-        mxConstants.STYLE_EXIT_Y : mxConstants.STYLE_ENTRY_Y, d.point.y, [a]), d.perimeter ? this.setCellStyles(c ? mxConstants.STYLE_EXIT_PERIMETER : mxConstants.STYLE_ENTRY_PERIMETER, null, [
-        a
-      ]) : this.setCellStyles(c ? mxConstants.STYLE_EXIT_PERIMETER : mxConstants.STYLE_ENTRY_PERIMETER, "0", [a]))
-    } finally {
-      this.model.endUpdate()
-    }
-  }
-};
-mxGraph.prototype.getConnectionPoint = function(a, b) {
-  var c = null;
-  if (null != a) {
-    var d = this.view.getPerimeterBounds(a),
-      e = new mxPoint(d.getCenterX(), d.getCenterY()),
-      f = a.style[mxConstants.STYLE_DIRECTION],
-      g = 0;
-    if (null != f && ("north" == f ? g += 270 : "west" == f ? g += 180 : "south" == f && (g += 90), "north" == f || "south" == f)) {
-      d.x += d.width / 2 - d.height / 2;
-      d.y += d.height / 2 - d.width / 2;
-      var h = d.width;
-      d.width = d.height;
-      d.height = h
-    }
-    if (null != b.point) {
-      var k = c = 1,
-        l = 0,
-        m = 0;
-      if (this.getModel().isVertex(a.cell)) {
-        var n = a.style[mxConstants.STYLE_FLIPH],
-          p =
-          a.style[mxConstants.STYLE_FLIPV];
-        null != a.shape.stencil && (n = 1 == mxUtils.getValue(a.style, "stencilFlipH", 0) || n, p = 1 == mxUtils.getValue(a.style, "stencilFlipV", 0) || p);
-        if ("north" == f || "south" == f) h = n, n = p, p = h;
-        n && (c = -1, l = -d.width);
-        p && (k = -1, m = -d.height)
-      }
-      c = new mxPoint(d.x + b.point.x * d.width * c - l, d.y + b.point.y * d.height * k - m)
-    }
-    f = a.style[mxConstants.STYLE_ROTATION] || 0;
-    b.perimeter ? (0 != g && null != c && (h = d = 0, 90 == g ? h = 1 : 180 == g ? d = -1 : 270 == f && (h = -1), c = mxUtils.getRotatedPoint(c, d, h, e)), null != c && b.perimeter && (c = this.view
-      .getPerimeterPoint(a,
-        c, !1))) : f += g;
-    0 != f && null != c && (g = mxUtils.toRadians(f), d = Math.cos(g), h = Math.sin(g), c = mxUtils.getRotatedPoint(c, d, h, e))
-  }
-  return c
-};
-mxGraph.prototype.connectCell = function(a, b, c, d) {
-  this.model.beginUpdate();
-  try {
-    var e = this.model.getTerminal(a, c);
-    this.cellConnected(a, b, c, d);
-    this.fireEvent(new mxEventObject(mxEvent.CONNECT_CELL, "edge", a, "terminal", b, "source", c, "previous", e))
-  } finally {
-    this.model.endUpdate()
-  }
-  return a
-};
-mxGraph.prototype.cellConnected = function(a, b, c, d) {
-  if (null != a) {
-    this.model.beginUpdate();
-    try {
-      var e = this.model.getTerminal(a, c);
-      this.setConnectionConstraint(a, b, c, d);
-      this.isPortsEnabled() && (d = null, this.isPort(b) && (d = b.getId(), b = this.getTerminalForPort(b, c)), this.setCellStyles(c ? mxConstants.STYLE_SOURCE_PORT : mxConstants.STYLE_TARGET_PORT,
-        d, [a]));
-      this.model.setTerminal(a, b, c);
-      this.resetEdgesOnConnect && this.resetEdge(a);
-      this.fireEvent(new mxEventObject(mxEvent.CELL_CONNECTED, "edge", a, "terminal", b, "source",
-        c, "previous", e))
-    } finally {
-      this.model.endUpdate()
-    }
-  }
-};
-mxGraph.prototype.disconnectGraph = function(a) {
-  if (null != a) {
-    this.model.beginUpdate();
-    try {
-      for (var b = this.view.scale, c = this.view.translate, d = {}, e = 0; e < a.length; e++) {
-        var f = mxCellPath.create(a[e]);
-        d[f] = a[e]
-      }
-      for (e = 0; e < a.length; e++)
-        if (this.model.isEdge(a[e])) {
-          var g = this.model.getGeometry(a[e]);
-          if (null != g) {
-            var h = this.view.getState(a[e]),
-              k = this.view.getState(this.model.getParent(a[e]));
-            if (null != h && null != k) {
-              var g = g.clone(),
-                l = -k.origin.x,
-                m = -k.origin.y,
-                n = h.absolutePoints,
-                p = this.model.getTerminal(a[e], !0);
-              if (null !=
-                p && this.isCellDisconnectable(a[e], p, !0)) {
-                for (var q = mxCellPath.create(p); null != p && null == d[q];) p = this.model.getParent(p), q = mxCellPath.create(p);
-                null == p && (g.setTerminalPoint(new mxPoint(n[0].x / b - c.x + l, n[0].y / b - c.y + m), !0), this.model.setTerminal(a[e], null, !0))
-              }
-              var s = this.model.getTerminal(a[e], !1);
-              if (null != s && this.isCellDisconnectable(a[e], s, !1)) {
-                for (var r = mxCellPath.create(s); null != s && null == d[r];) s = this.model.getParent(s), r = mxCellPath.create(s);
-                if (null == s) {
-                  var t = n.length - 1;
-                  g.setTerminalPoint(new mxPoint(n[t].x /
-                    b - c.x + l, n[t].y / b - c.y + m), !1);
-                  this.model.setTerminal(a[e], null, !1)
-                }
-              }
-              this.model.setGeometry(a[e], g)
-            }
-          }
-        }
-    } finally {
-      this.model.endUpdate()
-    }
-  }
-};
-mxGraph.prototype.getCurrentRoot = function() {
-  return this.view.currentRoot
-};
-mxGraph.prototype.getTranslateForRoot = function(a) {
-  return null
-};
-mxGraph.prototype.isPort = function(a) {
-  return !1
-};
-mxGraph.prototype.getTerminalForPort = function(a, b) {
-  return this.model.getParent(a)
-};
-mxGraph.prototype.getChildOffsetForCell = function(a) {
-  return null
-};
-mxGraph.prototype.enterGroup = function(a) {
-  a = a || this.getSelectionCell();
-  null != a && this.isValidRoot(a) && (this.view.setCurrentRoot(a), this.clearSelection())
-};
-mxGraph.prototype.exitGroup = function() {
-  var a = this.model.getRoot(),
-    b = this.getCurrentRoot();
-  if (null != b) {
-    for (var c = this.model.getParent(b); c != a && !this.isValidRoot(c) && this.model.getParent(c) != a;) c = this.model.getParent(c);
-    c == a || this.model.getParent(c) == a ? this.view.setCurrentRoot(null) : this.view.setCurrentRoot(c);
-    null != this.view.getState(b) && this.setSelectionCell(b)
-  }
-};
-mxGraph.prototype.home = function() {
-  var a = this.getCurrentRoot();
-  null != a && (this.view.setCurrentRoot(null), null != this.view.getState(a) && this.setSelectionCell(a))
-};
-mxGraph.prototype.isValidRoot = function(a) {
-  return null != a
-};
-mxGraph.prototype.getGraphBounds = function() {
-  return this.view.getGraphBounds()
-};
-mxGraph.prototype.getCellBounds = function(a, b, c) {
-  var d = [a];
-  b && (d = d.concat(this.model.getEdges(a)));
-  d = this.view.getBounds(d);
-  if (c) {
-    c = this.model.getChildCount(a);
-    for (var e = 0; e < c; e++) {
-      var f = this.getCellBounds(this.model.getChildAt(a, e), b, !0);
-      null != d ? d.add(f) : d = f
-    }
-  }
-  return d
-};
-mxGraph.prototype.getBoundingBoxFromGeometry = function(a, b) {
-  b = null != b ? b : !1;
-  var c = null;
-  if (null != a)
-    for (var d = 0; d < a.length; d++)
-      if (b || this.model.isVertex(a[d])) {
-        var e = this.getCellGeometry(a[d]);
-        if (null != e) {
-          var f = e.points;
-          if (null != f && 0 < f.length) {
-            for (var g = new mxRectangle(f[0].x, f[0].y, 0, 0), h = function(a) {
-                null != a && g.add(new mxRectangle(a.x, a.y, 0, 0))
-              }, k = 1; k < f.length; k++) h(f[k]);
-            h(e.getTerminalPoint(!0));
-            h(e.getTerminalPoint(!1))
-          }
-          null == c ? c = new mxRectangle(e.x, e.y, e.width, e.height) : c.add(e)
-        }
-      }
-  return c
-};
-mxGraph.prototype.refresh = function(a) {
-  this.view.clear(a, null == a);
-  this.view.validate();
-  this.sizeDidChange();
-  this.fireEvent(new mxEventObject(mxEvent.REFRESH))
-};
-mxGraph.prototype.snap = function(a) {
-  this.gridEnabled && (a = Math.round(a / this.gridSize) * this.gridSize);
-  return a
-};
-mxGraph.prototype.panGraph = function(a, b) {
-  if (this.useScrollbarsForPanning && mxUtils.hasScrollbars(this.container)) this.container.scrollLeft = -a, this.container.scrollTop = -b;
-  else {
-    var c = this.view.getCanvas();
-    if (this.dialect == mxConstants.DIALECT_SVG)
-      if (0 == a && 0 == b) {
-        if (mxClient.IS_IE ? c.setAttribute("transform", "translate(" + a + "," + b + ")") : c.removeAttribute("transform"), null != this.shiftPreview1) {
-          for (var d = this.shiftPreview1.firstChild; null != d;) {
-            var e = d.nextSibling;
-            this.container.appendChild(d);
-            d = e
-          }
-          this.shiftPreview1.parentNode.removeChild(this.shiftPreview1);
-          this.shiftPreview1 = null;
-          this.container.appendChild(c.parentNode);
-          for (d = this.shiftPreview2.firstChild; null != d;) e = d.nextSibling, this.container.appendChild(d), d = e;
-          this.shiftPreview2.parentNode.removeChild(this.shiftPreview2);
-          this.shiftPreview2 = null
-        }
-      } else {
-        c.setAttribute("transform", "translate(" + a + "," + b + ")");
-        if (null == this.shiftPreview1) {
-          this.shiftPreview1 = document.createElement("div");
-          this.shiftPreview1.style.position = "absolute";
-          this.shiftPreview1.style.overflow = "visible";
-          this.shiftPreview2 = document.createElement("div");
-          this.shiftPreview2.style.position = "absolute";
-          this.shiftPreview2.style.overflow = "visible";
-          for (var f = this.shiftPreview1, d = this.container.firstChild; null != d;) e = d.nextSibling, d != c.parentNode ? f.appendChild(d) : f = this.shiftPreview2, d = e;
-          this.container.insertBefore(this.shiftPreview1, c.parentNode);
-          this.container.appendChild(this.shiftPreview2)
-        }
-        this.shiftPreview1.style.left = a + "px";
-        this.shiftPreview1.style.top = b + "px";
-        this.shiftPreview2.style.left = a + "px";
-        this.shiftPreview2.style.top = b + "px"
-      } else c.style.left =
-      a + "px", c.style.top = b + "px";
-    this.panDx = a;
-    this.panDy = b;
-    this.fireEvent(new mxEventObject(mxEvent.PAN))
-  }
-};
-mxGraph.prototype.zoomIn = function() {
-  this.zoom(this.zoomFactor)
-};
-mxGraph.prototype.zoomOut = function() {
-  this.zoom(1 / this.zoomFactor)
-};
-mxGraph.prototype.zoomActual = function() {
-  1 == this.view.scale ? this.view.setTranslate(0, 0) : (this.view.translate.x = 0, this.view.translate.y = 0, this.view.setScale(1))
-};
-mxGraph.prototype.zoomTo = function(a, b) {
-  this.zoom(a / this.view.scale, b)
-};
-mxGraph.prototype.zoom = function(a, b) {
-  b = null != b ? b : this.centerZoom;
-  var c = this.view.scale * a,
-    d = this.view.getState(this.getSelectionCell());
-  if (this.keepSelectionVisibleOnZoom && null != d) d = new mxRectangle(d.x * a, d.y * a, d.width * a, d.height * a), this.view.scale = c, this.scrollRectToVisible(d) || (this.view.revalidate(),
-    this.view.setScale(c));
-  else if (b && !mxUtils.hasScrollbars(this.container)) {
-    var d = this.container.offsetWidth,
-      e = this.container.offsetHeight;
-    if (1 < a) var f = (a - 1) / (2 * c),
-      d = d * -f,
-      e = e * -f;
-    else f = (1 / a - 1) / (2 * this.view.scale),
-      d *= f, e *= f;
-    this.view.scaleAndTranslate(c, this.view.translate.x + d, this.view.translate.y + e)
-  } else this.view.setScale(c), mxUtils.hasScrollbars(this.container) && (e = d = 0, b && (d = this.container.offsetWidth * (a - 1) / 2, e = this.container.offsetHeight * (a - 1) / 2), this.container
-    .scrollLeft = Math.round(this.container.scrollLeft * a + d), this.container.scrollTop = Math.round(this.container.scrollTop * a + e))
-};
-mxGraph.prototype.zoomToRect = function(a) {
-  var b = this.container.clientWidth / a.width / (this.container.clientHeight / a.height);
-  a.x = Math.max(0, a.x);
-  a.y = Math.max(0, a.y);
-  var c = Math.min(this.container.scrollWidth, a.x + a.width),
-    d = Math.min(this.container.scrollHeight, a.y + a.height);
-  a.width = c - a.x;
-  a.height = d - a.y;
-  1 > b ? (b = a.height / b, c = (b - a.height) / 2, a.height = b, b = Math.min(a.y, c), a.y -= b, d = Math.min(this.container.scrollHeight, a.y + a.height), a.height = d - a.y) : (b *= a.width, c =
-    (b - a.width) / 2, a.width = b, b = Math.min(a.x, c), a.x -= b,
-    c = Math.min(this.container.scrollWidth, a.x + a.width), a.width = c - a.x);
-  b = this.container.clientWidth / a.width;
-  c = this.view.scale * b;
-  mxUtils.hasScrollbars(this.container) ? (this.view.setScale(c), this.container.scrollLeft = Math.round(a.x * b), this.container.scrollTop = Math.round(a.y * b)) : this.view.scaleAndTranslate(c,
-    this.view.translate.x - a.x / this.view.scale, this.view.translate.y - a.y / this.view.scale)
-};
-mxGraph.prototype.fit = function(a, b) {
-  if (null != this.container) {
-    a = null != a ? a : 0;
-    b = null != b ? b : !1;
-    var c = this.container.clientWidth,
-      d = this.container.clientHeight,
-      e = this.view.getGraphBounds();
-    b && (null != e.x && null != e.y) && (e.width += e.x, e.height += e.y, e.x = 0, e.y = 0);
-    var f = this.view.scale,
-      g = e.width / f,
-      h = e.height / f;
-    null != this.backgroundImage && (g = Math.max(g, this.backgroundImage.width - e.x / f), h = Math.max(h, this.backgroundImage.height - e.y / f));
-    var k = b ? a : 2 * a,
-      c = Math.floor(100 * Math.min(c / (g + k), d / (h + k))) / 100;
-    null != this.minFitScale &&
-      (c = Math.max(c, this.minFitScale));
-    null != this.maxFitScale && (c = Math.min(c, this.maxFitScale));
-    b ? this.view.scale != c && this.view.setScale(c) : mxUtils.hasScrollbars(this.container) ? (this.view.setScale(c), null != e.x && (this.container.scrollLeft = Math.round(e.x / f) * c - a -
-        Math.max(0, (this.container.clientWidth - g * c) / 2)), null != e.y && (this.container.scrollTop = Math.round(e.y / f) * c - a - Math.max(0, (this.container.clientHeight - h * c) / 2))) :
-      this.view.scaleAndTranslate(c, null != e.x ? Math.floor(this.view.translate.x - e.x / f + a + 1) : a, null !=
-        e.y ? Math.floor(this.view.translate.y - e.y / f + a + 1) : a)
-  }
-  return this.view.scale
-};
-mxGraph.prototype.scrollCellToVisible = function(a, b) {
-  var c = -this.view.translate.x,
-    d = -this.view.translate.y,
-    e = this.view.getState(a);
-  null != e && (c = new mxRectangle(c + e.x, d + e.y, e.width, e.height), b && null != this.container && (d = this.container.clientWidth, e = this.container.clientHeight, c.x = c.getCenterX() - d /
-    2, c.width = d, c.y = c.getCenterY() - e / 2, c.height = e), this.scrollRectToVisible(c) && this.view.setTranslate(this.view.translate.x, this.view.translate.y))
-};
-mxGraph.prototype.scrollRectToVisible = function(a) {
-  var b = !1;
-  if (null != a) {
-    var c = this.container.offsetWidth,
-      d = this.container.offsetHeight,
-      e = Math.min(c, a.width),
-      f = Math.min(d, a.height);
-    if (mxUtils.hasScrollbars(this.container)) {
-      c = this.container;
-      a.x += this.view.translate.x;
-      a.y += this.view.translate.y;
-      var g = c.scrollLeft - a.x,
-        d = Math.max(g - c.scrollLeft, 0);
-      0 < g ? c.scrollLeft -= g + 2 : (g = a.x + e - c.scrollLeft - c.clientWidth, 0 < g && (c.scrollLeft += g + 2));
-      e = c.scrollTop - a.y;
-      g = Math.max(0, e - c.scrollTop);
-      0 < e ? c.scrollTop -= e + 2 : (e = a.y +
-        f - c.scrollTop - c.clientHeight, 0 < e && (c.scrollTop += e + 2));
-      !this.useScrollbarsForPanning && (0 != d || 0 != g) && this.view.setTranslate(d, g)
-    } else {
-      var g = -this.view.translate.x,
-        h = -this.view.translate.y,
-        k = this.view.scale;
-      a.x + e > g + c && (this.view.translate.x -= (a.x + e - c - g) / k, b = !0);
-      a.y + f > h + d && (this.view.translate.y -= (a.y + f - d - h) / k, b = !0);
-      a.x < g && (this.view.translate.x += (g - a.x) / k, b = !0);
-      a.y < h && (this.view.translate.y += (h - a.y) / k, b = !0);
-      b && (this.view.refresh(), null != this.selectionCellsHandler && this.selectionCellsHandler.refresh())
-    }
-  }
-  return b
-};
-mxGraph.prototype.getCellGeometry = function(a) {
-  return this.model.getGeometry(a)
-};
-mxGraph.prototype.isCellVisible = function(a) {
-  return this.model.isVisible(a)
-};
-mxGraph.prototype.isCellCollapsed = function(a) {
-  return this.model.isCollapsed(a)
-};
-mxGraph.prototype.isCellConnectable = function(a) {
-  return this.model.isConnectable(a)
-};
-mxGraph.prototype.isOrthogonal = function(a) {
-  var b = a.style[mxConstants.STYLE_ORTHOGONAL];
-  if (null != b) return b;
-  a = this.view.getEdgeStyle(a);
-  return a == mxEdgeStyle.SegmentConnector || a == mxEdgeStyle.ElbowConnector || a == mxEdgeStyle.SideToSide || a == mxEdgeStyle.TopToBottom || a == mxEdgeStyle.EntityRelation || a == mxEdgeStyle.OrthConnector
-};
-mxGraph.prototype.isLoop = function(a) {
-  var b = a.getVisibleTerminalState(!0);
-  a = a.getVisibleTerminalState(!1);
-  return null != b && b == a
-};
-mxGraph.prototype.isCloneEvent = function(a) {
-  return mxEvent.isControlDown(a)
-};
-mxGraph.prototype.isToggleEvent = function(a) {
-  return mxClient.IS_MAC ? mxEvent.isMetaDown(a) : mxEvent.isControlDown(a)
-};
-mxGraph.prototype.isGridEnabledEvent = function(a) {
-  return null != a && !mxEvent.isAltDown(a)
-};
-mxGraph.prototype.isConstrainedEvent = function(a) {
-  return mxEvent.isShiftDown(a)
-};
-mxGraph.prototype.isForceMarqueeEvent = function(a) {
-  return mxEvent.isAltDown(a)
-};
-mxGraph.prototype.validationAlert = function(a) {
-  mxUtils.alert(a)
-};
-mxGraph.prototype.isEdgeValid = function(a, b, c) {
-  return null == this.getEdgeValidationError(a, b, c)
-};
-mxGraph.prototype.getEdgeValidationError = function(a, b, c) {
-  if (null != a && !this.isAllowDanglingEdges() && (null == b || null == c)) return "";
-  if (null != a && null == this.model.getTerminal(a, !0) && null == this.model.getTerminal(a, !1)) return null;
-  if (!this.allowLoops && b == c && null != b || !this.isValidConnection(b, c)) return "";
-  if (null != b && null != c) {
-    var d = "";
-    if (!this.multigraph) {
-      var e = this.model.getEdgesBetween(b, c, !0);
-      if (1 < e.length || 1 == e.length && e[0] != a) d += (mxResources.get(this.alreadyConnectedResource) || this.alreadyConnectedResource) +
-        "\n"
-    }
-    var e = this.model.getDirectedEdgeCount(b, !0, a),
-      f = this.model.getDirectedEdgeCount(c, !1, a);
-    if (null != this.multiplicities)
-      for (var g = 0; g < this.multiplicities.length; g++) {
-        var h = this.multiplicities[g].check(this, a, b, c, e, f);
-        null != h && (d += h)
-      }
-    h = this.validateEdge(a, b, c);
-    null != h && (d += h);
-    return 0 < d.length ? d : null
-  }
-  return this.allowDanglingEdges ? null : ""
-};
-mxGraph.prototype.validateEdge = function(a, b, c) {
-  return null
-};
-mxGraph.prototype.validateGraph = function(a, b) {
-  a = null != a ? a : this.model.getRoot();
-  b = null != b ? b : {};
-  for (var c = !0, d = this.model.getChildCount(a), e = 0; e < d; e++) {
-    var f = this.model.getChildAt(a, e),
-      g = b;
-    this.isValidRoot(f) && (g = {});
-    g = this.validateGraph(f, g);
-    null != g ? this.setCellWarning(f, g.replace(/\n/g, "\x3cbr\x3e")) : this.setCellWarning(f, null);
-    c = c && null == g
-  }
-  d = "";
-  this.isCellCollapsed(a) && !c && (d += (mxResources.get(this.containsValidationErrorsResource) || this.containsValidationErrorsResource) + "\n");
-  d = this.model.isEdge(a) ?
-    d + (this.getEdgeValidationError(a, this.model.getTerminal(a, !0), this.model.getTerminal(a, !1)) || "") : d + (this.getCellValidationError(a) || "");
-  e = this.validateCell(a, b);
-  null != e && (d += e);
-  null == this.model.getParent(a) && this.view.validate();
-  return 0 < d.length || !c ? d : null
-};
-mxGraph.prototype.getCellValidationError = function(a) {
-  var b = this.model.getDirectedEdgeCount(a, !0),
-    c = this.model.getDirectedEdgeCount(a, !1);
-  a = this.model.getValue(a);
-  var d = "";
-  if (null != this.multiplicities)
-    for (var e = 0; e < this.multiplicities.length; e++) {
-      var f = this.multiplicities[e];
-      if (f.source && mxUtils.isNode(a, f.type, f.attr, f.value) && (0 == f.max && 0 < b || 1 == f.min && 0 == b || 1 == f.max && 1 < b)) d += f.countError + "\n";
-      else if (!f.source && mxUtils.isNode(a, f.type, f.attr, f.value) && (0 == f.max && 0 < c || 1 == f.min && 0 == c || 1 == f.max && 1 <
-          c)) d += f.countError + "\n"
-    }
-  return 0 < d.length ? d : null
-};
-mxGraph.prototype.validateCell = function(a, b) {
-  return null
-};
-mxGraph.prototype.getBackgroundImage = function() {
-  return this.backgroundImage
-};
-mxGraph.prototype.setBackgroundImage = function(a) {
-  this.backgroundImage = a
-};
-mxGraph.prototype.getFoldingImage = function(a) {
-  if (null != a && this.foldingEnabled && !this.getModel().isEdge(a.cell)) {
-    var b = this.isCellCollapsed(a.cell);
-    if (this.isCellFoldable(a.cell, !b)) return b ? this.collapsedImage : this.expandedImage
-  }
-  return null
-};
-mxGraph.prototype.convertValueToString = function(a) {
-  a = this.model.getValue(a);
-  if (null != a) {
-    if (mxUtils.isNode(a)) return a.nodeName;
-    if ("function" == typeof a.toString) return a.toString()
-  }
-  return ""
-};
-mxGraph.prototype.getLabel = function(a) {
-  var b = "";
-  if (this.labelsVisible && null != a) {
-    var c = this.view.getState(a),
-      c = null != c ? c.style : this.getCellStyle(a);
-    mxUtils.getValue(c, mxConstants.STYLE_NOLABEL, !1) || (b = this.convertValueToString(a))
-  }
-  return b
-};
-mxGraph.prototype.isHtmlLabel = function(a) {
-  return this.isHtmlLabels()
-};
-mxGraph.prototype.isHtmlLabels = function() {
-  return this.htmlLabels
-};
-mxGraph.prototype.setHtmlLabels = function(a) {
-  this.htmlLabels = a
-};
-mxGraph.prototype.isWrapping = function(a) {
-  var b = this.view.getState(a);
-  a = null != b ? b.style : this.getCellStyle(a);
-  return null != a ? "wrap" == a[mxConstants.STYLE_WHITE_SPACE] : !1
-};
-mxGraph.prototype.isLabelClipped = function(a) {
-  var b = this.view.getState(a);
-  a = null != b ? b.style : this.getCellStyle(a);
-  return null != a ? "hidden" == a[mxConstants.STYLE_OVERFLOW] : !1
-};
-mxGraph.prototype.getTooltip = function(a, b, c, d) {
-  var e = null;
-  if (null != a) {
-    if (null != a.control && (b == a.control.node || b.parentNode == a.control.node)) e = this.collapseExpandResource, e = mxResources.get(e) || e;
-    null == e && null != a.overlays && a.overlays.visit(function(a, c) {
-      if (null == e && (b == c.node || b.parentNode == c.node)) e = c.overlay.toString()
-    });
-    null == e && (c = this.selectionCellsHandler.getHandler(a.cell), null != c && "function" == typeof c.getTooltipForNode && (e = c.getTooltipForNode(b)));
-    null == e && (e = this.getTooltipForCell(a.cell))
-  }
-  return e
-};
-mxGraph.prototype.getTooltipForCell = function(a) {
-  var b = null;
-  return b = null != a && null != a.getTooltip ? a.getTooltip() : this.convertValueToString(a)
-};
-mxGraph.prototype.getCursorForCell = function(a) {
-  return null
-};
-mxGraph.prototype.getStartSize = function(a) {
-  var b = new mxRectangle,
-    c = this.view.getState(a);
-  a = null != c ? c.style : this.getCellStyle(a);
-  null != a && (c = parseInt(mxUtils.getValue(a, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE)), mxUtils.getValue(a, mxConstants.STYLE_HORIZONTAL, !0) ? b.height = c : b.width = c);
-  return b
-};
-mxGraph.prototype.getImage = function(a) {
-  return null != a && null != a.style ? a.style[mxConstants.STYLE_IMAGE] : null
-};
-mxGraph.prototype.getVerticalAlign = function(a) {
-  return null != a && null != a.style ? a.style[mxConstants.STYLE_VERTICAL_ALIGN] || mxConstants.ALIGN_MIDDLE : null
-};
-mxGraph.prototype.getIndicatorColor = function(a) {
-  return null != a && null != a.style ? a.style[mxConstants.STYLE_INDICATOR_COLOR] : null
-};
-mxGraph.prototype.getIndicatorGradientColor = function(a) {
-  return null != a && null != a.style ? a.style[mxConstants.STYLE_INDICATOR_GRADIENTCOLOR] : null
-};
-mxGraph.prototype.getIndicatorShape = function(a) {
-  return null != a && null != a.style ? a.style[mxConstants.STYLE_INDICATOR_SHAPE] : null
-};
-mxGraph.prototype.getIndicatorImage = function(a) {
-  return null != a && null != a.style ? a.style[mxConstants.STYLE_INDICATOR_IMAGE] : null
-};
-mxGraph.prototype.getBorder = function() {
-  return this.border
-};
-mxGraph.prototype.setBorder = function(a) {
-  this.border = a
-};
-mxGraph.prototype.isSwimlane = function(a) {
-  if (null != a && this.model.getParent(a) != this.model.getRoot()) {
-    var b = this.view.getState(a),
-      b = null != b ? b.style : this.getCellStyle(a);
-    if (null != b && !this.model.isEdge(a)) return b[mxConstants.STYLE_SHAPE] == mxConstants.SHAPE_SWIMLANE
-  }
-  return !1
-};
-mxGraph.prototype.isResizeContainer = function() {
-  return this.resizeContainer
-};
-mxGraph.prototype.setResizeContainer = function(a) {
-  this.resizeContainer = a
-};
-mxGraph.prototype.isEnabled = function() {
-  return this.enabled
-};
-mxGraph.prototype.setEnabled = function(a) {
-  this.enabled = a
-};
-mxGraph.prototype.isEscapeEnabled = function() {
-  return this.escapeEnabled
-};
-mxGraph.prototype.setEscapeEnabled = function(a) {
-  this.escapeEnabled = a
-};
-mxGraph.prototype.isInvokesStopCellEditing = function() {
-  return this.invokesStopCellEditing
-};
-mxGraph.prototype.setInvokesStopCellEditing = function(a) {
-  this.invokesStopCellEditing = a
-};
-mxGraph.prototype.isEnterStopsCellEditing = function() {
-  return this.enterStopsCellEditing
-};
-mxGraph.prototype.setEnterStopsCellEditing = function(a) {
-  this.enterStopsCellEditing = a
-};
-mxGraph.prototype.isCellLocked = function(a) {
-  var b = this.model.getGeometry(a);
-  return this.isCellsLocked() || null != b && this.model.isVertex(a) && b.relative
-};
-mxGraph.prototype.isCellsLocked = function() {
-  return this.cellsLocked
-};
-mxGraph.prototype.setCellsLocked = function(a) {
-  this.cellsLocked = a
-};
-mxGraph.prototype.getCloneableCells = function(a) {
-  return this.model.filterCells(a, mxUtils.bind(this, function(a) {
-    return this.isCellCloneable(a)
-  }))
-};
-mxGraph.prototype.isCellCloneable = function(a) {
-  var b = this.view.getState(a);
-  a = null != b ? b.style : this.getCellStyle(a);
-  return this.isCellsCloneable() && 0 != a[mxConstants.STYLE_CLONEABLE]
-};
-mxGraph.prototype.isCellsCloneable = function() {
-  return this.cellsCloneable
-};
-mxGraph.prototype.setCellsCloneable = function(a) {
-  this.cellsCloneable = a
-};
-mxGraph.prototype.getExportableCells = function(a) {
-  return this.model.filterCells(a, mxUtils.bind(this, function(a) {
-    return this.canExportCell(a)
-  }))
-};
-mxGraph.prototype.canExportCell = function(a) {
-  return this.exportEnabled
-};
-mxGraph.prototype.getImportableCells = function(a) {
-  return this.model.filterCells(a, mxUtils.bind(this, function(a) {
-    return this.canImportCell(a)
-  }))
-};
-mxGraph.prototype.canImportCell = function(a) {
-  return this.importEnabled
-};
-mxGraph.prototype.isCellSelectable = function(a) {
-  return this.isCellsSelectable()
-};
-mxGraph.prototype.isCellsSelectable = function() {
-  return this.cellsSelectable
-};
-mxGraph.prototype.setCellsSelectable = function(a) {
-  this.cellsSelectable = a
-};
-mxGraph.prototype.getDeletableCells = function(a) {
-  return this.model.filterCells(a, mxUtils.bind(this, function(a) {
-    return this.isCellDeletable(a)
-  }))
-};
-mxGraph.prototype.isCellDeletable = function(a) {
-  var b = this.view.getState(a);
-  a = null != b ? b.style : this.getCellStyle(a);
-  return this.isCellsDeletable() && 0 != a[mxConstants.STYLE_DELETABLE]
-};
-mxGraph.prototype.isCellsDeletable = function() {
-  return this.cellsDeletable
-};
-mxGraph.prototype.setCellsDeletable = function(a) {
-  this.cellsDeletable = a
-};
-mxGraph.prototype.isLabelMovable = function(a) {
-  return !this.isCellLocked(a) && (this.model.isEdge(a) && this.edgeLabelsMovable || this.model.isVertex(a) && this.vertexLabelsMovable)
-};
-mxGraph.prototype.getMovableCells = function(a) {
-  return this.model.filterCells(a, mxUtils.bind(this, function(a) {
-    return this.isCellMovable(a)
-  }))
-};
-mxGraph.prototype.isCellMovable = function(a) {
-  var b = this.view.getState(a),
-    b = null != b ? b.style : this.getCellStyle(a);
-  return this.isCellsMovable() && !this.isCellLocked(a) && 0 != b[mxConstants.STYLE_MOVABLE]
-};
-mxGraph.prototype.isCellsMovable = function() {
-  return this.cellsMovable
-};
-mxGraph.prototype.setCellsMovable = function(a) {
-  this.cellsMovable = a
-};
-mxGraph.prototype.isGridEnabled = function() {
-  return this.gridEnabled
-};
-mxGraph.prototype.setGridEnabled = function(a) {
-  this.gridEnabled = a
-};
-mxGraph.prototype.isPortsEnabled = function() {
-  return this.portsEnabled
-};
-mxGraph.prototype.setPortsEnabled = function(a) {
-  this.portsEnabled = a
-};
-mxGraph.prototype.getGridSize = function() {
-  return this.gridSize
-};
-mxGraph.prototype.setGridSize = function(a) {
-  this.gridSize = a
-};
-mxGraph.prototype.getTolerance = function() {
-  return this.tolerance
-};
-mxGraph.prototype.setTolerance = function(a) {
-  this.tolerance = a
-};
-mxGraph.prototype.isVertexLabelsMovable = function() {
-  return this.vertexLabelsMovable
-};
-mxGraph.prototype.setVertexLabelsMovable = function(a) {
-  this.vertexLabelsMovable = a
-};
-mxGraph.prototype.isEdgeLabelsMovable = function() {
-  return this.edgeLabelsMovable
-};
-mxGraph.prototype.setEdgeLabelsMovable = function(a) {
-  this.edgeLabelsMovable = a
-};
-mxGraph.prototype.isSwimlaneNesting = function() {
-  return this.swimlaneNesting
-};
-mxGraph.prototype.setSwimlaneNesting = function(a) {
-  this.swimlaneNesting = a
-};
-mxGraph.prototype.isSwimlaneSelectionEnabled = function() {
-  return this.swimlaneSelectionEnabled
-};
-mxGraph.prototype.setSwimlaneSelectionEnabled = function(a) {
-  this.swimlaneSelectionEnabled = a
-};
-mxGraph.prototype.isMultigraph = function() {
-  return this.multigraph
-};
-mxGraph.prototype.setMultigraph = function(a) {
-  this.multigraph = a
-};
-mxGraph.prototype.isAllowLoops = function() {
-  return this.allowLoops
-};
-mxGraph.prototype.setAllowDanglingEdges = function(a) {
-  this.allowDanglingEdges = a
-};
-mxGraph.prototype.isAllowDanglingEdges = function() {
-  return this.allowDanglingEdges
-};
-mxGraph.prototype.setConnectableEdges = function(a) {
-  this.connectableEdges = a
-};
-mxGraph.prototype.isConnectableEdges = function() {
-  return this.connectableEdges
-};
-mxGraph.prototype.setCloneInvalidEdges = function(a) {
-  this.cloneInvalidEdges = a
-};
-mxGraph.prototype.isCloneInvalidEdges = function() {
-  return this.cloneInvalidEdges
-};
-mxGraph.prototype.setAllowLoops = function(a) {
-  this.allowLoops = a
-};
-mxGraph.prototype.isDisconnectOnMove = function() {
-  return this.disconnectOnMove
-};
-mxGraph.prototype.setDisconnectOnMove = function(a) {
-  this.disconnectOnMove = a
-};
-mxGraph.prototype.isDropEnabled = function() {
-  return this.dropEnabled
-};
-mxGraph.prototype.setDropEnabled = function(a) {
-  this.dropEnabled = a
-};
-mxGraph.prototype.isSplitEnabled = function() {
-  return this.splitEnabled
-};
-mxGraph.prototype.setSplitEnabled = function(a) {
-  this.splitEnabled = a
-};
-mxGraph.prototype.isCellResizable = function(a) {
-  var b = this.view.getState(a),
-    b = null != b ? b.style : this.getCellStyle(a);
-  return this.isCellsResizable() && !this.isCellLocked(a) && 0 != b[mxConstants.STYLE_RESIZABLE]
-};
-mxGraph.prototype.isCellsResizable = function() {
-  return this.cellsResizable
-};
-mxGraph.prototype.setCellsResizable = function(a) {
-  this.cellsResizable = a
-};
-mxGraph.prototype.isTerminalPointMovable = function(a, b) {
-  return !0
-};
-mxGraph.prototype.isCellBendable = function(a) {
-  var b = this.view.getState(a),
-    b = null != b ? b.style : this.getCellStyle(a);
-  return this.isCellsBendable() && !this.isCellLocked(a) && 0 != b[mxConstants.STYLE_BENDABLE]
-};
-mxGraph.prototype.isCellsBendable = function() {
-  return this.cellsBendable
-};
-mxGraph.prototype.setCellsBendable = function(a) {
-  this.cellsBendable = a
-};
-mxGraph.prototype.isCellEditable = function(a) {
-  var b = this.view.getState(a),
-    b = null != b ? b.style : this.getCellStyle(a);
-  return this.isCellsEditable() && !this.isCellLocked(a) && 0 != b[mxConstants.STYLE_EDITABLE]
-};
-mxGraph.prototype.isCellsEditable = function() {
-  return this.cellsEditable
-};
-mxGraph.prototype.setCellsEditable = function(a) {
-  this.cellsEditable = a
-};
-mxGraph.prototype.isCellDisconnectable = function(a, b, c) {
-  return this.isCellsDisconnectable() && !this.isCellLocked(a)
-};
-mxGraph.prototype.isCellsDisconnectable = function() {
-  return this.cellsDisconnectable
-};
-mxGraph.prototype.setCellsDisconnectable = function(a) {
-  this.cellsDisconnectable = a
-};
-mxGraph.prototype.isValidSource = function(a) {
-  return null == a && this.allowDanglingEdges || null != a && (!this.model.isEdge(a) || this.connectableEdges) && this.isCellConnectable(a)
-};
-mxGraph.prototype.isValidTarget = function(a) {
-  return this.isValidSource(a)
-};
-mxGraph.prototype.isValidConnection = function(a, b) {
-  return this.isValidSource(a) && this.isValidTarget(b)
-};
-mxGraph.prototype.setConnectable = function(a) {
-  this.connectionHandler.setEnabled(a)
-};
-mxGraph.prototype.isConnectable = function(a) {
-  return this.connectionHandler.isEnabled()
-};
-mxGraph.prototype.setTooltips = function(a) {
-  this.tooltipHandler.setEnabled(a)
-};
-mxGraph.prototype.setPanning = function(a) {
-  this.panningHandler.panningEnabled = a
-};
-mxGraph.prototype.isEditing = function(a) {
-  if (null != this.cellEditor) {
-    var b = this.cellEditor.getEditingCell();
-    return null == a ? null != b : a == b
-  }
-  return !1
-};
-mxGraph.prototype.isAutoSizeCell = function(a) {
-  var b = this.view.getState(a);
-  a = null != b ? b.style : this.getCellStyle(a);
-  return this.isAutoSizeCells() || 1 == a[mxConstants.STYLE_AUTOSIZE]
-};
-mxGraph.prototype.isAutoSizeCells = function() {
-  return this.autoSizeCells
-};
-mxGraph.prototype.setAutoSizeCells = function(a) {
-  this.autoSizeCells = a
-};
-mxGraph.prototype.isExtendParent = function(a) {
-  return !this.getModel().isEdge(a) && this.isExtendParents()
-};
-mxGraph.prototype.isExtendParents = function() {
-  return this.extendParents
-};
-mxGraph.prototype.setExtendParents = function(a) {
-  this.extendParents = a
-};
-mxGraph.prototype.isExtendParentsOnAdd = function() {
-  return this.extendParentsOnAdd
-};
-mxGraph.prototype.setExtendParentsOnAdd = function(a) {
-  this.extendParentsOnAdd = a
-};
-mxGraph.prototype.isConstrainChild = function(a) {
-  return this.isConstrainChildren() && !this.getModel().isEdge(this.getModel().getParent(a))
-};
-mxGraph.prototype.isConstrainChildren = function() {
-  return this.constrainChildren
-};
-mxGraph.prototype.setConstrainChildren = function(a) {
-  this.constrainChildren = a
-};
-mxGraph.prototype.isAllowNegativeCoordinates = function() {
-  return this.allowNegativeCoordinates
-};
-mxGraph.prototype.setAllowNegativeCoordinates = function(a) {
-  this.allowNegativeCoordinates = a
-};
-mxGraph.prototype.getOverlap = function(a) {
-  return this.isAllowOverlapParent(a) ? this.defaultOverlap : 0
-};
-mxGraph.prototype.isAllowOverlapParent = function(a) {
-  return !1
-};
-mxGraph.prototype.getFoldableCells = function(a, b) {
-  return this.model.filterCells(a, mxUtils.bind(this, function(a) {
-    return this.isCellFoldable(a, b)
-  }))
-};
-mxGraph.prototype.isCellFoldable = function(a, b) {
-  var c = this.view.getState(a),
-    c = null != c ? c.style : this.getCellStyle(a);
-  return 0 < this.model.getChildCount(a) && 0 != c[mxConstants.STYLE_FOLDABLE]
-};
-mxGraph.prototype.isValidDropTarget = function(a, b, c) {
-  return null != a && (this.isSplitEnabled() && this.isSplitTarget(a, b, c) || !this.model.isEdge(a) && (this.isSwimlane(a) || 0 < this.model.getChildCount(a) && !this.isCellCollapsed(a)))
-};
-mxGraph.prototype.isSplitTarget = function(a, b, c) {
-  return this.model.isEdge(a) && null != b && 1 == b.length && this.isCellConnectable(b[0]) && null == this.getEdgeValidationError(a, this.model.getTerminal(a, !0), b[0]) ? (c = this.model.getTerminal(
-    a, !0), a = this.model.getTerminal(a, !1), !this.model.isAncestor(b[0], c) && !this.model.isAncestor(b[0], a)) : !1
-};
-mxGraph.prototype.getDropTarget = function(a, b, c) {
-  if (!this.isSwimlaneNesting())
-    for (var d = 0; d < a.length; d++)
-      if (this.isSwimlane(a[d])) return null;
-  d = mxUtils.convertPoint(this.container, mxEvent.getClientX(b), mxEvent.getClientY(b));
-  d.x -= this.panDx;
-  d.y -= this.panDy;
-  d = this.getSwimlaneAt(d.x, d.y);
-  if (null == c) c = d;
-  else if (null != d) {
-    for (var e = this.model.getParent(d); null != e && this.isSwimlane(e) && e != c;) e = this.model.getParent(e);
-    e == c && (c = d)
-  }
-  for (; null != c && !this.isValidDropTarget(c, a, b) && !this.model.isLayer(c);) c = this.model.getParent(c);
-  return !this.model.isLayer(c) && 0 > mxUtils.indexOf(a, c) ? c : null
-};
-mxGraph.prototype.getDefaultParent = function() {
-  var a = this.defaultParent;
-  null == a && (a = this.getCurrentRoot(), null == a && (a = this.model.getRoot(), a = this.model.getChildAt(a, 0)));
-  return a
-};
-mxGraph.prototype.setDefaultParent = function(a) {
-  this.defaultParent = a
-};
-mxGraph.prototype.getSwimlane = function(a) {
-  for (; null != a && !this.isSwimlane(a);) a = this.model.getParent(a);
-  return a
-};
-mxGraph.prototype.getSwimlaneAt = function(a, b, c) {
-  c = c || this.getDefaultParent();
-  if (null != c)
-    for (var d = this.model.getChildCount(c), e = 0; e < d; e++) {
-      var f = this.model.getChildAt(c, e),
-        g = this.getSwimlaneAt(a, b, f);
-      if (null != g) return g;
-      if (this.isSwimlane(f) && (g = this.view.getState(f), this.intersects(g, a, b))) return f
-    }
-  return null
-};
-mxGraph.prototype.getCellAt = function(a, b, c, d, e) {
-  d = null != d ? d : !0;
-  e = null != e ? e : !0;
-  c = null != c ? c : this.getDefaultParent();
-  if (null != c)
-    for (var f = this.model.getChildCount(c) - 1; 0 <= f; f--) {
-      var g = this.model.getChildAt(c, f),
-        h = this.getCellAt(a, b, g, d, e);
-      if (null != h) return h;
-      if (this.isCellVisible(g) && (e && this.model.isEdge(g) || d && this.model.isVertex(g)))
-        if (h = this.view.getState(g), this.intersects(h, a, b)) return g
-    }
-  return null
-};
-mxGraph.prototype.intersects = function(a, b, c) {
-  if (null != a) {
-    var d = a.absolutePoints;
-    if (null != d) {
-      a = this.tolerance * this.tolerance;
-      for (var e = d[0], f = 1; f < d.length; f++) {
-        var g = d[f];
-        if (mxUtils.ptSegDistSq(e.x, e.y, g.x, g.y, b, c) <= a) return !0;
-        e = g
-      }
-    } else if (e = mxUtils.toRadians(mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION) || 0), 0 != e && (d = Math.cos(-e), e = Math.sin(-e), f = new mxPoint(a.getCenterX(), a.getCenterY()), e =
-        mxUtils.getRotatedPoint(new mxPoint(b, c), d, e, f), b = e.x, c = e.y), mxUtils.contains(a, b, c)) return !0
-  }
-  return !1
-};
-mxGraph.prototype.hitsSwimlaneContent = function(a, b, c) {
-  var d = this.getView().getState(a);
-  a = this.getStartSize(a);
-  if (null != d) {
-    var e = this.getView().getScale();
-    b -= d.x;
-    c -= d.y;
-    if (0 < a.width && 0 < b && b > a.width * e || 0 < a.height && 0 < c && c > a.height * e) return !0
-  }
-  return !1
-};
-mxGraph.prototype.getChildVertices = function(a) {
-  return this.getChildCells(a, !0, !1)
-};
-mxGraph.prototype.getChildEdges = function(a) {
-  return this.getChildCells(a, !1, !0)
-};
-mxGraph.prototype.getChildCells = function(a, b, c) {
-  a = null != a ? a : this.getDefaultParent();
-  a = this.model.getChildCells(a, null != b ? b : !1, null != c ? c : !1);
-  b = [];
-  for (c = 0; c < a.length; c++) this.isCellVisible(a[c]) && b.push(a[c]);
-  return b
-};
-mxGraph.prototype.getConnections = function(a, b) {
-  return this.getEdges(a, b, !0, !0, !1)
-};
-mxGraph.prototype.getIncomingEdges = function(a, b) {
-  return this.getEdges(a, b, !0, !1, !1)
-};
-mxGraph.prototype.getOutgoingEdges = function(a, b) {
-  return this.getEdges(a, b, !1, !0, !1)
-};
-mxGraph.prototype.getEdges = function(a, b, c, d, e, f) {
-  c = null != c ? c : !0;
-  d = null != d ? d : !0;
-  e = null != e ? e : !0;
-  f = null != f ? f : !1;
-  for (var g = [], h = this.isCellCollapsed(a), k = this.model.getChildCount(a), l = 0; l < k; l++) {
-    var m = this.model.getChildAt(a, l);
-    if (h || !this.isCellVisible(m)) g = g.concat(this.model.getEdges(m, c, d))
-  }
-  g = g.concat(this.model.getEdges(a, c, d));
-  h = [];
-  for (l = 0; l < g.length; l++) m = this.view.getState(g[l]), k = null != m ? m.getVisibleTerminal(!0) : this.view.getVisibleTerminal(g[l], !0), m = null != m ? m.getVisibleTerminal(!1) : this.view
-    .getVisibleTerminal(g[l], !1), (e && k == m || k != m && (c && m == a && (null == b || this.isValidAncestor(k, b, f)) || d && k == a && (null == b || this.isValidAncestor(m, b, f)))) && h.push(
-      g[l]);
-  return h
-};
-mxGraph.prototype.isValidAncestor = function(a, b, c) {
-  return c ? this.model.isAncestor(b, a) : this.model.getParent(a) == b
-};
-mxGraph.prototype.getOpposites = function(a, b, c, d) {
-  c = null != c ? c : !0;
-  d = null != d ? d : !0;
-  var e = [],
-    f = {};
-  if (null != a)
-    for (var g = 0; g < a.length; g++) {
-      var h = this.view.getState(a[g]),
-        k = null != h ? h.getVisibleTerminal(!0) : this.view.getVisibleTerminal(a[g], !0),
-        h = null != h ? h.getVisibleTerminal(!1) : this.view.getVisibleTerminal(a[g], !1);
-      if (k == b && null != h && h != b && d) {
-        var l = mxCellPath.create(h);
-        null == f[l] && (f[l] = h, e.push(h))
-      } else h == b && (null != k && k != b && c) && (l = mxCellPath.create(k), null == f[l] && (f[l] = k, e.push(k)))
-    }
-  return e
-};
-mxGraph.prototype.getEdgesBetween = function(a, b, c) {
-  c = null != c ? c : !1;
-  for (var d = this.getEdges(a), e = [], f = 0; f < d.length; f++) {
-    var g = this.view.getState(d[f]),
-      h = null != g ? g.getVisibleTerminal(!0) : this.view.getVisibleTerminal(d[f], !0),
-      g = null != g ? g.getVisibleTerminal(!1) : this.view.getVisibleTerminal(d[f], !1);
-    (h == a && g == b || !c && h == b && g == a) && e.push(d[f])
-  }
-  return e
-};
-mxGraph.prototype.getPointForEvent = function(a, b) {
-  var c = mxUtils.convertPoint(this.container, mxEvent.getClientX(a), mxEvent.getClientY(a)),
-    d = this.view.scale,
-    e = this.view.translate,
-    f = !1 != b ? this.gridSize / 2 : 0;
-  c.x = this.snap(c.x / d - e.x - f);
-  c.y = this.snap(c.y / d - e.y - f);
-  return c
-};
-mxGraph.prototype.getCells = function(a, b, c, d, e, f) {
-  f = null != f ? f : [];
-  if (0 < c || 0 < d) {
-    var g = a + c,
-      h = b + d;
-    e = e || this.getDefaultParent();
-    if (null != e)
-      for (var k = this.model.getChildCount(e), l = 0; l < k; l++) {
-        var m = this.model.getChildAt(e, l),
-          n = this.view.getState(m);
-        if (this.isCellVisible(m) && null != n) {
-          var p = n,
-            n = mxUtils.getValue(n.style, mxConstants.STYLE_ROTATION) || 0;
-          0 != n && (p = mxUtils.getBoundingBox(p, n));
-          p.x >= a && p.y + p.height <= h && p.y >= b && p.x + p.width <= g ? f.push(m) : this.getCells(a, b, c, d, m, f)
-        }
-      }
-  }
-  return f
-};
-mxGraph.prototype.getCellsBeyond = function(a, b, c, d, e) {
-  var f = [];
-  if (d || e)
-    if (null == c && (c = this.getDefaultParent()), null != c)
-      for (var g = this.model.getChildCount(c), h = 0; h < g; h++) {
-        var k = this.model.getChildAt(c, h),
-          l = this.view.getState(k);
-        this.isCellVisible(k) && null != l && (!d || l.x >= a) && (!e || l.y >= b) && f.push(k)
-      }
-  return f
-};
-mxGraph.prototype.findTreeRoots = function(a, b, c) {
-  b = null != b ? b : !1;
-  c = null != c ? c : !1;
-  var d = [];
-  if (null != a) {
-    for (var e = this.getModel(), f = e.getChildCount(a), g = null, h = 0, k = 0; k < f; k++) {
-      var l = e.getChildAt(a, k);
-      if (this.model.isVertex(l) && this.isCellVisible(l)) {
-        for (var m = this.getConnections(l, b ? a : null), n = 0, p = 0, q = 0; q < m.length; q++) this.view.getVisibleTerminal(m[q], !0) == l ? n++ : p++;
-        (c && 0 == n && 0 < p || !c && 0 == p && 0 < n) && d.push(l);
-        m = c ? p - n : n - p;
-        m > h && (h = m, g = l)
-      }
-    }
-    0 == d.length && null != g && d.push(g)
-  }
-  return d
-};
-mxGraph.prototype.traverse = function(a, b, c, d, e) {
-  if (null != c && null != a) {
-    b = null != b ? b : !0;
-    e = e || [];
-    var f = mxCellPath.create(a);
-    if (null == e[f] && (e[f] = a, d = c(a, d), null == d || d))
-      if (d = this.model.getEdgeCount(a), 0 < d)
-        for (f = 0; f < d; f++) {
-          var g = this.model.getEdgeAt(a, f),
-            h = this.model.getTerminal(g, !0) == a;
-          if (!b || h) h = this.model.getTerminal(g, !h), this.traverse(h, b, c, g, e)
-        }
-  }
-};
-mxGraph.prototype.isCellSelected = function(a) {
-  return this.getSelectionModel().isSelected(a)
-};
-mxGraph.prototype.isSelectionEmpty = function() {
-  return this.getSelectionModel().isEmpty()
-};
-mxGraph.prototype.clearSelection = function() {
-  return this.getSelectionModel().clear()
-};
-mxGraph.prototype.getSelectionCount = function() {
-  return this.getSelectionModel().cells.length
-};
-mxGraph.prototype.getSelectionCell = function() {
-  return this.getSelectionModel().cells[0]
-};
-mxGraph.prototype.getSelectionCells = function() {
-  return this.getSelectionModel().cells.slice()
-};
-mxGraph.prototype.setSelectionCell = function(a) {
-  this.getSelectionModel().setCell(a)
-};
-mxGraph.prototype.setSelectionCells = function(a) {
-  this.getSelectionModel().setCells(a)
-};
-mxGraph.prototype.addSelectionCell = function(a) {
-  this.getSelectionModel().addCell(a)
-};
-mxGraph.prototype.addSelectionCells = function(a) {
-  this.getSelectionModel().addCells(a)
-};
-mxGraph.prototype.removeSelectionCell = function(a) {
-  this.getSelectionModel().removeCell(a)
-};
-mxGraph.prototype.removeSelectionCells = function(a) {
-  this.getSelectionModel().removeCells(a)
-};
-mxGraph.prototype.selectRegion = function(a, b) {
-  var c = this.getCells(a.x, a.y, a.width, a.height);
-  this.selectCellsForEvent(c, b);
-  return c
-};
-mxGraph.prototype.selectNextCell = function() {
-  this.selectCell(!0)
-};
-mxGraph.prototype.selectPreviousCell = function() {
-  this.selectCell()
-};
-mxGraph.prototype.selectParentCell = function() {
-  this.selectCell(!1, !0)
-};
-mxGraph.prototype.selectChildCell = function() {
-  this.selectCell(!1, !1, !0)
-};
-mxGraph.prototype.selectCell = function(a, b, c) {
-  var d = this.selectionModel,
-    e = 0 < d.cells.length ? d.cells[0] : null;
-  1 < d.cells.length && d.clear();
-  var d = null != e ? this.model.getParent(e) : this.getDefaultParent(),
-    f = this.model.getChildCount(d);
-  null == e && 0 < f ? (a = this.model.getChildAt(d, 0), this.setSelectionCell(a)) : (null == e || b) && null != this.view.getState(d) && null != this.model.getGeometry(d) ? this.getCurrentRoot() !=
-    d && this.setSelectionCell(d) : null != e && c ? 0 < this.model.getChildCount(e) && (a = this.model.getChildAt(e, 0), this.setSelectionCell(a)) :
-    0 < f && (b = d.getIndex(e), a ? (b++, a = this.model.getChildAt(d, b % f)) : (b--, a = this.model.getChildAt(d, 0 > b ? f - 1 : b)), this.setSelectionCell(a))
-};
-mxGraph.prototype.selectAll = function(a) {
-  a = a || this.getDefaultParent();
-  a = this.model.getChildren(a);
-  null != a && this.setSelectionCells(a)
-};
-mxGraph.prototype.selectVertices = function(a) {
-  this.selectCells(!0, !1, a)
-};
-mxGraph.prototype.selectEdges = function(a) {
-  this.selectCells(!1, !0, a)
-};
-mxGraph.prototype.selectCells = function(a, b, c) {
-  c = c || this.getDefaultParent();
-  var d = mxUtils.bind(this, function(c) {
-    return null != this.view.getState(c) && 0 == this.model.getChildCount(c) && (this.model.isVertex(c) && a || this.model.isEdge(c) && b)
-  });
-  c = this.model.filterDescendants(d, c);
-  this.setSelectionCells(c)
-};
-mxGraph.prototype.selectCellForEvent = function(a, b) {
-  var c = this.isCellSelected(a);
-  this.isToggleEvent(b) ? c ? this.removeSelectionCell(a) : this.addSelectionCell(a) : (!c || 1 != this.getSelectionCount()) && this.setSelectionCell(a)
-};
-mxGraph.prototype.selectCellsForEvent = function(a, b) {
-  this.isToggleEvent(b) ? this.addSelectionCells(a) : this.setSelectionCells(a)
-};
-mxGraph.prototype.createHandler = function(a) {
-  var b = null;
-  null != a && (this.model.isEdge(a.cell) ? (b = this.view.getEdgeStyle(a), b = this.isLoop(a) || b == mxEdgeStyle.ElbowConnector || b == mxEdgeStyle.SideToSide || b == mxEdgeStyle.TopToBottom ?
-    new mxElbowEdgeHandler(a) : b == mxEdgeStyle.SegmentConnector || b == mxEdgeStyle.OrthConnector ? new mxEdgeSegmentHandler(a) : new mxEdgeHandler(a)) : b = new mxVertexHandler(a));
-  return b
-};
-mxGraph.prototype.addMouseListener = function(a) {
-  null == this.mouseListeners && (this.mouseListeners = []);
-  this.mouseListeners.push(a)
-};
-mxGraph.prototype.removeMouseListener = function(a) {
-  if (null != this.mouseListeners)
-    for (var b = 0; b < this.mouseListeners.length; b++)
-      if (this.mouseListeners[b] == a) {
-        this.mouseListeners.splice(b, 1);
-        break
-      }
-};
-mxGraph.prototype.updateMouseEvent = function(a) {
-  if (null == a.graphX || null == a.graphY) {
-    var b = mxUtils.convertPoint(this.container, a.getX(), a.getY());
-    a.graphX = b.x - this.panDx;
-    a.graphY = b.y - this.panDy
-  }
-};
-mxGraph.prototype.fireMouseEvent = function(a, b, c) {
-  null == c && (c = this);
-  this.updateMouseEvent(b);
-  a == mxEvent.MOUSE_DOWN && (this.isMouseDown = !0);
-  if (mxClient.IS_TOUCH && this.doubleTapEnabled && a == mxEvent.MOUSE_DOWN) {
-    var d = (new Date).getTime();
-    d - this.lastTouchTime < this.doubleTapTimeout && Math.abs(this.lastTouchX - b.getX()) < this.doubleTapTolerance && Math.abs(this.lastTouchY - b.getY()) < this.doubleTapTolerance ? (this.lastTouchTime =
-      0, this.dblClick(b.getEvent(), b.getCell()), b.getEvent().cancelBubble = !0) : (this.lastTouchX =
-      b.getX(), this.lastTouchY = b.getY(), this.lastTouchTime = d)
-  }
-  d = 2 != b.getEvent().detail;
-  if (mxClient.IS_IE && "CSS1Compat" == document.compatMode) {
-    if (null != this.lastMouseX && Math.abs(this.lastMouseX - b.getX()) > this.doubleTapTolerance || null != this.lastMouseY && Math.abs(this.lastMouseY - b.getY()) > this.doubleTapTolerance) d = !
-      0;
-    a == mxEvent.MOUSE_UP && (this.lastMouseX = b.getX(), this.lastMouseY = b.getY())
-  }
-  if ((a != mxEvent.MOUSE_UP || this.isMouseDown) && d) {
-    if (a == mxEvent.MOUSE_UP && (this.isMouseDown = !1), !this.isEditing() && (mxClient.IS_OP ||
-        mxClient.IS_SF || mxClient.IS_GC || mxClient.IS_IE && mxClient.IS_SVG || b.getEvent().target != this.container)) {
-      a == mxEvent.MOUSE_MOVE && (this.isMouseDown && this.autoScroll) && this.scrollPointToVisible(b.getGraphX(), b.getGraphY(), this.autoExtend);
-      if (null != this.mouseListeners) {
-        c = [c, b];
-        b.getEvent().returnValue = !0;
-        for (d = 0; d < this.mouseListeners.length; d++) {
-          var e = this.mouseListeners[d];
-          a == mxEvent.MOUSE_DOWN ? e.mouseDown.apply(e, c) : a == mxEvent.MOUSE_MOVE ? e.mouseMove.apply(e, c) : a == mxEvent.MOUSE_UP && e.mouseUp.apply(e, c)
-        }
-      }
-      a ==
-        mxEvent.MOUSE_UP && this.click(b)
-    }
-  } else a == mxEvent.MOUSE_UP && (this.isMouseDown = !1)
-};
-mxGraph.prototype.destroy = function() {
-  this.destroyed || (this.destroyed = !0, null != this.tooltipHandler && this.tooltipHandler.destroy(), null != this.selectionCellsHandler && this.selectionCellsHandler.destroy(), null != this.panningHandler &&
-    this.panningHandler.destroy(), null != this.connectionHandler && this.connectionHandler.destroy(), null != this.graphHandler && this.graphHandler.destroy(), null != this.cellEditor && this.cellEditor
-    .destroy(), null != this.view && this.view.destroy(), null != this.model && null != this.graphModelChangeListener &&
-    (this.model.removeListener(this.graphModelChangeListener), this.graphModelChangeListener = null), this.container = null)
-};
-
-function mxCellOverlay(a, b, c, d, e, f) {
-  this.image = a;
-  this.tooltip = b;
-  this.align = null != c ? c : this.align;
-  this.verticalAlign = null != d ? d : this.verticalAlign;
-  this.offset = null != e ? e : new mxPoint;
-  this.cursor = null != f ? f : "help"
-}
-mxCellOverlay.prototype = new mxEventSource;
-mxCellOverlay.prototype.constructor = mxCellOverlay;
-mxCellOverlay.prototype.image = null;
-mxCellOverlay.prototype.tooltip = null;
-mxCellOverlay.prototype.align = mxConstants.ALIGN_RIGHT;
-mxCellOverlay.prototype.verticalAlign = mxConstants.ALIGN_BOTTOM;
-mxCellOverlay.prototype.offset = null;
-mxCellOverlay.prototype.cursor = null;
-mxCellOverlay.prototype.defaultOverlap = 0.5;
-mxCellOverlay.prototype.getBounds = function(a) {
-  var b = a.view.graph.getModel().isEdge(a.cell),
-    c = a.view.scale,
-    d = null,
-    e = this.image.width,
-    f = this.image.height;
-  b ? (b = a.absolutePoints, 1 == b.length % 2 ? d = b[Math.floor(b.length / 2)] : (d = b.length / 2, a = b[d - 1], b = b[d], d = new mxPoint(a.x + (b.x - a.x) / 2, a.y + (b.y - a.y) / 2))) : (d =
-    new mxPoint, d.x = this.align == mxConstants.ALIGN_LEFT ? a.x : this.align == mxConstants.ALIGN_CENTER ? a.x + a.width / 2 : a.x + a.width, d.y = this.verticalAlign == mxConstants.ALIGN_TOP ?
-    a.y : this.verticalAlign == mxConstants.ALIGN_MIDDLE ?
-    a.y + a.height / 2 : a.y + a.height);
-  return new mxRectangle(Math.round(d.x - (e * this.defaultOverlap - this.offset.x) * c), Math.round(d.y - (f * this.defaultOverlap - this.offset.y) * c), e * c, f * c)
-};
-mxCellOverlay.prototype.toString = function() {
-  return this.tooltip
-};
-
-function mxOutline(a, b) {
-  this.source = a;
-  null != b && this.init(b)
-}
-mxOutline.prototype.source = null;
-mxOutline.prototype.outline = null;
-mxOutline.prototype.graphRenderHint = mxConstants.RENDERING_HINT_FASTER;
-mxOutline.prototype.enabled = !0;
-mxOutline.prototype.showViewport = !0;
-mxOutline.prototype.border = 10;
-mxOutline.prototype.sizerSize = 8;
-mxOutline.prototype.updateOnPan = !1;
-mxOutline.prototype.sizerImage = null;
-mxOutline.prototype.suspended = !1;
-mxOutline.prototype.init = function(a) {
-  this.outline = new mxGraph(a, this.source.getModel(), this.graphRenderHint, this.source.getStylesheet());
-  this.outline.foldingEnabled = !1;
-  this.outline.autoScroll = !1;
-  var b = this.outline.graphModelChanged;
-  this.outline.graphModelChanged = mxUtils.bind(this, function(a) {
-    !this.suspended && null != this.outline && b.apply(this.outline, arguments)
-  });
-  mxClient.IS_SVG && (a = this.outline.getView().getCanvas().parentNode, a.setAttribute("shape-rendering", "optimizeSpeed"), a.setAttribute("image-rendering",
-    "optimizeSpeed"));
-  this.outline.labelsVisible = !1;
-  this.outline.setEnabled(!1);
-  this.updateHandler = mxUtils.bind(this, function(a, b) {
-    !this.suspended && !this.active && this.update()
-  });
-  this.source.getModel().addListener(mxEvent.CHANGE, this.updateHandler);
-  this.outline.addMouseListener(this);
-  a = this.source.getView();
-  a.addListener(mxEvent.SCALE, this.updateHandler);
-  a.addListener(mxEvent.TRANSLATE, this.updateHandler);
-  a.addListener(mxEvent.SCALE_AND_TRANSLATE, this.updateHandler);
-  a.addListener(mxEvent.DOWN, this.updateHandler);
-  a.addListener(mxEvent.UP, this.updateHandler);
-  mxEvent.addListener(this.source.container, "scroll", this.updateHandler);
-  this.panHandler = mxUtils.bind(this, function(a) {
-    this.updateOnPan && this.updateHandler.apply(this, arguments)
-  });
-  this.source.addListener(mxEvent.PAN, this.panHandler);
-  this.refreshHandler = mxUtils.bind(this, function(a) {
-    this.outline.setStylesheet(this.source.getStylesheet());
-    this.outline.refresh()
-  });
-  this.source.addListener(mxEvent.REFRESH, this.refreshHandler);
-  this.bounds = new mxRectangle(0, 0, 0,
-    0);
-  this.selectionBorder = new mxRectangleShape(this.bounds, null, mxConstants.OUTLINE_COLOR, mxConstants.OUTLINE_STROKEWIDTH);
-  this.selectionBorder.dialect = this.outline.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;
-  this.selectionBorder.init(this.outline.getView().getOverlayPane());
-  mxEvent.redirectMouseEvents(this.selectionBorder.node, this.outline);
-  this.selectionBorder.node.style.background = "";
-  this.sizer = this.createSizer();
-  this.sizer.init(this.outline.getView().getOverlayPane());
-  this.enabled && (this.sizer.node.style.cursor = "pointer");
-  mxEvent.addListener(this.sizer.node, mxClient.IS_TOUCH ? "touchstart" : "mousedown", mxUtils.bind(this, function(a) {
-    this.outline.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(a))
-  }));
-  this.selectionBorder.node.style.display = this.showViewport ? "" : "none";
-  this.sizer.node.style.display = this.selectionBorder.node.style.display;
-  this.selectionBorder.node.style.cursor = "move";
-  this.update(!1)
-};
-mxOutline.prototype.isEnabled = function() {
-  return this.enabled
-};
-mxOutline.prototype.setEnabled = function(a) {
-  this.enabled = a
-};
-mxOutline.prototype.setZoomEnabled = function(a) {
-  this.sizer.node.style.visibility = a ? "visible" : "hidden"
-};
-mxOutline.prototype.refresh = function() {
-  this.update(!0)
-};
-mxOutline.prototype.createSizer = function() {
-  var a = null != this.sizerImage ? new mxImageShape(new mxRectangle(0, 0, this.sizerImage.width, this.sizerImage.height), this.sizerImage.src) : new mxRectangleShape(new mxRectangle(0, 0, this.sizerSize,
-    this.sizerSize), mxConstants.OUTLINE_HANDLE_FILLCOLOR, mxConstants.OUTLINE_HANDLE_STROKECOLOR);
-  a.dialect = this.outline.dialect;
-  return a
-};
-mxOutline.prototype.getSourceContainerSize = function() {
-  return new mxRectangle(0, 0, this.source.container.scrollWidth, this.source.container.scrollHeight)
-};
-mxOutline.prototype.getOutlineOffset = function(a) {
-  return null
-};
-mxOutline.prototype.update = function(a) {
-  if (null != this.source) {
-    var b = this.source.view.scale,
-      c = this.source.getGraphBounds(),
-      c = new mxRectangle(c.x / b + this.source.panDx, c.y / b + this.source.panDy, c.width / b, c.height / b),
-      d = new mxRectangle(0, 0, this.source.container.clientWidth / b, this.source.container.clientHeight / b),
-      e = c.clone();
-    e.add(d);
-    var f = this.getSourceContainerSize(),
-      d = Math.max(f.width / b, e.width),
-      b = Math.max(f.height / b, e.height),
-      e = Math.max(0, this.outline.container.clientWidth - this.border),
-      f = Math.max(0, this.outline.container.clientHeight -
-        this.border),
-      e = Math.min(e / d, f / b);
-    if (0 < e) {
-      this.outline.getView().scale != e && (this.outline.getView().scale = e, a = !0);
-      d = this.outline.getView();
-      d.currentRoot != this.source.getView().currentRoot && d.setCurrentRoot(this.source.getView().currentRoot);
-      var b = this.source.view.translate,
-        f = b.x + this.source.panDx,
-        g = b.y + this.source.panDy,
-        e = this.getOutlineOffset(e);
-      null != e && (f += e.x, g += e.y);
-      0 > c.x && (f -= c.x);
-      0 > c.y && (g -= c.y);
-      if (d.translate.x != f || d.translate.y != g) d.translate.x = f, d.translate.y = g, a = !0;
-      var c = d.translate,
-        e = this.source.getView().scale,
-        f = e / d.scale,
-        g = 1 / d.scale,
-        h = this.source.container;
-      this.bounds = new mxRectangle((c.x - b.x - this.source.panDx) / g, (c.y - b.y - this.source.panDy) / g, h.clientWidth / f, h.clientHeight / f);
-      this.bounds.x += this.source.container.scrollLeft * d.scale / e;
-      this.bounds.y += this.source.container.scrollTop * d.scale / e;
-      c = this.selectionBorder.bounds;
-      if (c.x != this.bounds.x || c.y != this.bounds.y || c.width != this.bounds.width || c.height != this.bounds.height) this.selectionBorder.bounds = this.bounds, this.selectionBorder.redraw();
-      c = this.sizer.bounds;
-      d = new mxRectangle(this.bounds.x + this.bounds.width - c.width / 2, this.bounds.y + this.bounds.height - c.height / 2, c.width, c.height);
-      if (c.x != d.x || c.y != d.y || c.width != d.width || c.height != d.height) this.sizer.bounds = d, "hidden" != this.sizer.node.style.visibility && this.sizer.redraw();
-      a && this.outline.view.revalidate()
-    }
-  }
-};
-mxOutline.prototype.mouseDown = function(a, b) {
-  this.enabled && this.showViewport && (this.zoom = b.isSource(this.sizer), this.startX = b.getX(), this.startY = b.getY(), this.active = !0, this.source.useScrollbarsForPanning && mxUtils.hasScrollbars(
-    this.source.container) ? (this.dx0 = this.source.container.scrollLeft, this.dy0 = this.source.container.scrollTop) : this.dy0 = this.dx0 = 0);
-  b.consume()
-};
-mxOutline.prototype.mouseMove = function(a, b) {
-  if (this.active) {
-    this.selectionBorder.node.style.display = this.showViewport ? "" : "none";
-    this.sizer.node.style.display = this.selectionBorder.node.style.display;
-    var c = b.getX() - this.startX,
-      d = b.getY() - this.startY,
-      e = null;
-    if (this.zoom) e = this.source.container, d = c / (e.clientWidth / e.clientHeight), e = new mxRectangle(this.bounds.x, this.bounds.y, Math.max(1, this.bounds.width + c), Math.max(1, this.bounds
-      .height + d)), this.selectionBorder.bounds = e, this.selectionBorder.redraw();
-    else {
-      var f =
-        this.outline.getView().scale,
-        e = new mxRectangle(this.bounds.x + c, this.bounds.y + d, this.bounds.width, this.bounds.height);
-      this.selectionBorder.bounds = e;
-      this.selectionBorder.redraw();
-      c = c / f * this.source.getView().scale;
-      d = d / f * this.source.getView().scale;
-      this.source.panGraph(-c - this.dx0, -d - this.dy0)
-    }
-    c = this.sizer.bounds;
-    this.sizer.bounds = new mxRectangle(e.x + e.width - c.width / 2, e.y + e.height - c.height / 2, c.width, c.height);
-    "hidden" != this.sizer.node.style.visibility && this.sizer.redraw();
-    b.consume()
-  }
-};
-mxOutline.prototype.mouseUp = function(a, b) {
-  if (this.active) {
-    var c = b.getX() - this.startX,
-      d = b.getY() - this.startY;
-    if (0 < Math.abs(c) || 0 < Math.abs(d)) {
-      if (this.zoom) {
-        var d = this.selectionBorder.bounds.width,
-          e = this.source.getView().scale;
-        this.source.zoomTo(e - c * e / d, !1)
-      } else if (!this.source.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.source.container)) this.source.panGraph(0, 0), c /= this.outline.getView().scale, d /= this.outline.getView().scale,
-        e = this.source.getView().translate, this.source.getView().setTranslate(e.x -
-          c, e.y - d);
-      this.update();
-      b.consume()
-    }
-    this.index = null;
-    this.active = !1
-  }
-};
-mxOutline.prototype.destroy = function() {
-  null != this.source && (this.source.removeListener(this.panHandler), this.source.removeListener(this.refreshHandler), this.source.getModel().removeListener(this.updateHandler), this.source.getView()
-    .removeListener(this.updateHandler), mxEvent.addListener(this.source.container, "scroll", this.updateHandler), this.source = null);
-  null != this.outline && (this.outline.removeMouseListener(this), this.outline.destroy(), this.outline = null);
-  null != this.selectionBorder && (this.selectionBorder.destroy(),
-    this.selectionBorder = null);
-  null != this.sizer && (this.sizer.destroy(), this.sizer = null)
-};
-
-function mxMultiplicity(a, b, c, d, e, f, g, h, k, l) {
-  this.source = a;
-  this.type = b;
-  this.attr = c;
-  this.value = d;
-  this.min = null != e ? e : 0;
-  this.max = null != f ? f : "n";
-  this.validNeighbors = g;
-  this.countError = mxResources.get(h) || h;
-  this.typeError = mxResources.get(k) || k;
-  this.validNeighborsAllowed = null != l ? l : !0
-}
-mxMultiplicity.prototype.type = null;
-mxMultiplicity.prototype.attr = null;
-mxMultiplicity.prototype.value = null;
-mxMultiplicity.prototype.source = null;
-mxMultiplicity.prototype.min = null;
-mxMultiplicity.prototype.max = null;
-mxMultiplicity.prototype.validNeighbors = null;
-mxMultiplicity.prototype.validNeighborsAllowed = !0;
-mxMultiplicity.prototype.countError = null;
-mxMultiplicity.prototype.typeError = null;
-mxMultiplicity.prototype.check = function(a, b, c, d, e, f) {
-  var g = "";
-  if (this.source && this.checkTerminal(a, c, b) || !this.source && this.checkTerminal(a, d, b)) {
-    if (null != this.countError && (this.source && (0 == this.max || e >= this.max) || !this.source && (0 == this.max || f >= this.max))) g += this.countError + "\n";
-    null != this.validNeighbors && (null != this.typeError && 0 < this.validNeighbors.length) && (this.checkNeighbors(a, b, c, d) || (g += this.typeError + "\n"))
-  }
-  return 0 < g.length ? g : null
-};
-mxMultiplicity.prototype.checkNeighbors = function(a, b, c, d) {
-  b = a.model.getValue(c);
-  d = a.model.getValue(d);
-  c = !this.validNeighborsAllowed;
-  for (var e = this.validNeighbors, f = 0; f < e.length; f++)
-    if (this.source && this.checkType(a, d, e[f])) {
-      c = this.validNeighborsAllowed;
-      break
-    } else if (!this.source && this.checkType(a, b, e[f])) {
-    c = this.validNeighborsAllowed;
-    break
-  }
-  return c
-};
-mxMultiplicity.prototype.checkTerminal = function(a, b, c) {
-  b = a.model.getValue(b);
-  return this.checkType(a, b, this.type, this.attr, this.value)
-};
-mxMultiplicity.prototype.checkType = function(a, b, c, d, e) {
-  return null != b ? isNaN(b.nodeType) ? b == c : mxUtils.isNode(b, c, d, e) : !1
-};
-
-function mxLayoutManager(a) {
-  this.undoHandler = mxUtils.bind(this, function(a, c) {
-    this.isEnabled() && this.beforeUndo(c.getProperty("edit"))
-  });
-  this.moveHandler = mxUtils.bind(this, function(a, c) {
-    this.isEnabled() && this.cellsMoved(c.getProperty("cells"), c.getProperty("event"))
-  });
-  this.setGraph(a)
-}
-mxLayoutManager.prototype = new mxEventSource;
-mxLayoutManager.prototype.constructor = mxLayoutManager;
-mxLayoutManager.prototype.graph = null;
-mxLayoutManager.prototype.bubbling = !0;
-mxLayoutManager.prototype.enabled = !0;
-mxLayoutManager.prototype.updateHandler = null;
-mxLayoutManager.prototype.moveHandler = null;
-mxLayoutManager.prototype.isEnabled = function() {
-  return this.enabled
-};
-mxLayoutManager.prototype.setEnabled = function(a) {
-  this.enabled = a
-};
-mxLayoutManager.prototype.isBubbling = function() {
-  return this.bubbling
-};
-mxLayoutManager.prototype.setBubbling = function(a) {
-  this.bubbling = a
-};
-mxLayoutManager.prototype.getGraph = function() {
-  return this.graph
-};
-mxLayoutManager.prototype.setGraph = function(a) {
-  if (null != this.graph) {
-    var b = this.graph.getModel();
-    b.removeListener(this.undoHandler);
-    this.graph.removeListener(this.moveHandler)
-  }
-  this.graph = a;
-  null != this.graph && (b = this.graph.getModel(), b.addListener(mxEvent.BEFORE_UNDO, this.undoHandler), this.graph.addListener(mxEvent.MOVE_CELLS, this.moveHandler))
-};
-mxLayoutManager.prototype.getLayout = function(a) {
-  return null
-};
-mxLayoutManager.prototype.beforeUndo = function(a) {
-  a = this.getCellsForChanges(a.changes);
-  var b = this.getGraph().getModel();
-  if (this.isBubbling())
-    for (var c = b.getParents(a); 0 < c.length;) a = a.concat(c), c = b.getParents(c);
-  this.layoutCells(mxUtils.sortCells(a, !1))
-};
-mxLayoutManager.prototype.cellsMoved = function(a, b) {
-  if (null != a && null != b)
-    for (var c = mxUtils.convertPoint(this.getGraph().container, mxEvent.getClientX(b), mxEvent.getClientY(b)), d = this.getGraph().getModel(), e = 0; e < a.length; e++) {
-      var f = this.getLayout(d.getParent(a[e]));
-      null != f && f.moveCell(a[e], c.x, c.y)
-    }
-};
-mxLayoutManager.prototype.getCellsForChanges = function(a) {
-  for (var b = [], c = {}, d = 0; d < a.length; d++) {
-    var e = a[d];
-    if (e instanceof mxRootChange) return [];
-    for (var e = this.getCellsForChange(e), f = 0; f < e.length; f++)
-      if (null != e[f]) {
-        var g = mxCellPath.create(e[f]);
-        null == c[g] && (c[g] = e[f], b.push(e[f]))
-      }
-  }
-  return b
-};
-mxLayoutManager.prototype.getCellsForChange = function(a) {
-  var b = this.getGraph().getModel();
-  return a instanceof mxChildChange ? [a.child, a.previous, b.getParent(a.child)] : a instanceof mxTerminalChange || a instanceof mxGeometryChange ? [a.cell, b.getParent(a.cell)] : []
-};
-mxLayoutManager.prototype.layoutCells = function(a) {
-  if (0 < a.length) {
-    var b = this.getGraph().getModel();
-    b.beginUpdate();
-    try {
-      for (var c = null, d = 0; d < a.length; d++) a[d] != b.getRoot() && a[d] != c && (c = a[d], this.executeLayout(this.getLayout(c), c));
-      this.fireEvent(new mxEventObject(mxEvent.LAYOUT_CELLS, "cells", a))
-    } finally {
-      b.endUpdate()
-    }
-  }
-};
-mxLayoutManager.prototype.executeLayout = function(a, b) {
-  null != a && null != b && a.execute(b)
-};
-mxLayoutManager.prototype.destroy = function() {
-  this.setGraph(null)
-};
-
-function mxSpaceManager(a, b, c, d) {
-  this.resizeHandler = mxUtils.bind(this, function(a, b) {
-    this.isEnabled() && this.cellsResized(b.getProperty("cells"))
-  });
-  this.foldHandler = mxUtils.bind(this, function(a, b) {
-    this.isEnabled() && this.cellsResized(b.getProperty("cells"))
-  });
-  this.shiftRightwards = null != b ? b : !0;
-  this.shiftDownwards = null != c ? c : !0;
-  this.extendParents = null != d ? d : !0;
-  this.setGraph(a)
-}
-mxSpaceManager.prototype = new mxEventSource;
-mxSpaceManager.prototype.constructor = mxSpaceManager;
-mxSpaceManager.prototype.graph = null;
-mxSpaceManager.prototype.enabled = !0;
-mxSpaceManager.prototype.shiftRightwards = !0;
-mxSpaceManager.prototype.shiftDownwards = !0;
-mxSpaceManager.prototype.extendParents = !0;
-mxSpaceManager.prototype.resizeHandler = null;
-mxSpaceManager.prototype.foldHandler = null;
-mxSpaceManager.prototype.isCellIgnored = function(a) {
-  return !this.getGraph().getModel().isVertex(a)
-};
-mxSpaceManager.prototype.isCellShiftable = function(a) {
-  return this.getGraph().getModel().isVertex(a) && this.getGraph().isCellMovable(a)
-};
-mxSpaceManager.prototype.isEnabled = function() {
-  return this.enabled
-};
-mxSpaceManager.prototype.setEnabled = function(a) {
-  this.enabled = a
-};
-mxSpaceManager.prototype.isShiftRightwards = function() {
-  return this.shiftRightwards
-};
-mxSpaceManager.prototype.setShiftRightwards = function(a) {
-  this.shiftRightwards = a
-};
-mxSpaceManager.prototype.isShiftDownwards = function() {
-  return this.shiftDownwards
-};
-mxSpaceManager.prototype.setShiftDownwards = function(a) {
-  this.shiftDownwards = a
-};
-mxSpaceManager.prototype.isExtendParents = function() {
-  return this.extendParents
-};
-mxSpaceManager.prototype.setExtendParents = function(a) {
-  this.extendParents = a
-};
-mxSpaceManager.prototype.getGraph = function() {
-  return this.graph
-};
-mxSpaceManager.prototype.setGraph = function(a) {
-  null != this.graph && (this.graph.removeListener(this.resizeHandler), this.graph.removeListener(this.foldHandler));
-  this.graph = a;
-  null != this.graph && (this.graph.addListener(mxEvent.RESIZE_CELLS, this.resizeHandler), this.graph.addListener(mxEvent.FOLD_CELLS, this.foldHandler))
-};
-mxSpaceManager.prototype.cellsResized = function(a) {
-  if (null != a) {
-    var b = this.graph.getModel();
-    b.beginUpdate();
-    try {
-      for (var c = 0; c < a.length; c++)
-        if (!this.isCellIgnored(a[c])) {
-          this.cellResized(a[c]);
-          break
-        }
-    } finally {
-      b.endUpdate()
-    }
-  }
-};
-mxSpaceManager.prototype.cellResized = function(a) {
-  var b = this.getGraph(),
-    c = b.getView(),
-    d = b.getModel(),
-    e = c.getState(a),
-    f = c.getState(d.getParent(a));
-  if (null != e && null != f) {
-    var g = this.getCellsToShift(e),
-      h = d.getGeometry(a);
-    if (null != g && null != h) {
-      var k = c.translate,
-        l = c.scale,
-        c = e.x - f.origin.x - k.x * l,
-        f = e.y - f.origin.y - k.y * l,
-        k = e.x + e.width,
-        m = e.y + e.height,
-        n = e.width - h.width * l + c - h.x * l,
-        p = e.height - h.height * l + f - h.y * l,
-        q = 1 - h.width * l / e.width,
-        e = 1 - h.height * l / e.height;
-      d.beginUpdate();
-      try {
-        for (h = 0; h < g.length; h++) g[h] != a && this.isCellShiftable(g[h]) &&
-          this.shiftCell(g[h], n, p, c, f, k, m, q, e, this.isExtendParents() && b.isExtendParent(g[h]))
-      } finally {
-        d.endUpdate()
-      }
-    }
-  }
-};
-mxSpaceManager.prototype.shiftCell = function(a, b, c, d, e, f, g, h, k, l) {
-  d = this.getGraph();
-  var m = d.getView().getState(a);
-  if (null != m) {
-    var n = d.getModel(),
-      p = n.getGeometry(a);
-    if (null != p) {
-      n.beginUpdate();
-      try {
-        if (this.isShiftRightwards())
-          if (m.x >= f) p = p.clone(), p.translate(-b, 0);
-          else {
-            var q = Math.max(0, m.x - x0),
-              p = p.clone();
-            p.translate(-h * q, 0)
-          }
-        if (this.isShiftDownwards())
-          if (m.y >= g) p = p.clone(), p.translate(0, -c);
-          else {
-            var s = Math.max(0, m.y - e),
-              p = p.clone();
-            p.translate(0, -k * s)
-          }
-        p != n.getGeometry(a) && (n.setGeometry(a, p), l && d.extendParent(a))
-      } finally {
-        n.endUpdate()
-      }
-    }
-  }
-};
-mxSpaceManager.prototype.getCellsToShift = function(a) {
-  var b = this.getGraph(),
-    c = b.getModel().getParent(a.cell),
-    d = this.isShiftDownwards(),
-    e = this.isShiftRightwards();
-  return b.getCellsBeyond(a.x + (d ? 0 : a.width), a.y + (d && e ? 0 : a.height), c, e, d)
-};
-mxSpaceManager.prototype.destroy = function() {
-  this.setGraph(null)
-};
-
-function mxSwimlaneManager(a, b, c, d) {
-  this.horizontal = null != b ? b : !0;
-  this.addEnabled = null != c ? c : !0;
-  this.resizeEnabled = null != d ? d : !0;
-  this.addHandler = mxUtils.bind(this, function(a, b) {
-    this.isEnabled() && this.isAddEnabled() && this.cellsAdded(b.getProperty("cells"))
-  });
-  this.resizeHandler = mxUtils.bind(this, function(a, b) {
-    this.isEnabled() && this.isResizeEnabled() && this.cellsResized(b.getProperty("cells"))
-  });
-  this.setGraph(a)
-}
-mxSwimlaneManager.prototype = new mxEventSource;
-mxSwimlaneManager.prototype.constructor = mxSwimlaneManager;
-mxSwimlaneManager.prototype.graph = null;
-mxSwimlaneManager.prototype.enabled = !0;
-mxSwimlaneManager.prototype.horizontal = !0;
-mxSwimlaneManager.prototype.addEnabled = !0;
-mxSwimlaneManager.prototype.resizeEnabled = !0;
-mxSwimlaneManager.prototype.addHandler = null;
-mxSwimlaneManager.prototype.resizeHandler = null;
-mxSwimlaneManager.prototype.isEnabled = function() {
-  return this.enabled
-};
-mxSwimlaneManager.prototype.setEnabled = function(a) {
-  this.enabled = a
-};
-mxSwimlaneManager.prototype.isHorizontal = function() {
-  return this.horizontal
-};
-mxSwimlaneManager.prototype.setHorizontal = function(a) {
-  this.horizontal = a
-};
-mxSwimlaneManager.prototype.isAddEnabled = function() {
-  return this.addEnabled
-};
-mxSwimlaneManager.prototype.setAddEnabled = function(a) {
-  this.addEnabled = a
-};
-mxSwimlaneManager.prototype.isResizeEnabled = function() {
-  return this.resizeEnabled
-};
-mxSwimlaneManager.prototype.setResizeEnabled = function(a) {
-  this.resizeEnabled = a
-};
-mxSwimlaneManager.prototype.getGraph = function() {
-  return this.graph
-};
-mxSwimlaneManager.prototype.setGraph = function(a) {
-  null != this.graph && (this.graph.removeListener(this.addHandler), this.graph.removeListener(this.resizeHandler));
-  this.graph = a;
-  null != this.graph && (this.graph.addListener(mxEvent.ADD_CELLS, this.addHandler), this.graph.addListener(mxEvent.CELLS_RESIZED, this.resizeHandler))
-};
-mxSwimlaneManager.prototype.isSwimlaneIgnored = function(a) {
-  return !this.getGraph().isSwimlane(a)
-};
-mxSwimlaneManager.prototype.isCellHorizontal = function(a) {
-  if (this.graph.isSwimlane(a)) {
-    var b = this.graph.view.getState(a);
-    a = null != b ? b.style : this.graph.getCellStyle(a);
-    return 1 == mxUtils.getValue(a, mxConstants.STYLE_HORIZONTAL, 1)
-  }
-  return !this.isHorizontal()
-};
-mxSwimlaneManager.prototype.cellsAdded = function(a) {
-  if (null != a) {
-    var b = this.getGraph().getModel();
-    b.beginUpdate();
-    try {
-      for (var c = 0; c < a.length; c++) this.isSwimlaneIgnored(a[c]) || this.swimlaneAdded(a[c])
-    } finally {
-      b.endUpdate()
-    }
-  }
-};
-mxSwimlaneManager.prototype.swimlaneAdded = function(a) {
-  for (var b = this.getGraph().getModel(), c = b.getParent(a), d = b.getChildCount(c), e = null, f = 0; f < d; f++) {
-    var g = b.getChildAt(c, f);
-    if (g != a && !this.isSwimlaneIgnored(g) && (e = b.getGeometry(g), null != e)) break
-  }
-  null != e && this.resizeSwimlane(a, e.width, e.height)
-};
-mxSwimlaneManager.prototype.cellsResized = function(a) {
-  if (null != a) {
-    var b = this.getGraph().getModel();
-    b.beginUpdate();
-    try {
-      for (var c = 0; c < a.length; c++)
-        if (!this.isSwimlaneIgnored(a[c])) {
-          var d = b.getGeometry(a[c]);
-          if (null != d) {
-            for (var e = new mxRectangle(0, 0, d.width, d.height), f = a[c], g = f; null != g;) {
-              var f = g,
-                g = b.getParent(g),
-                h = this.graph.isSwimlane(g) ? this.graph.getStartSize(g) : new mxRectangle;
-              e.width += h.width;
-              e.height += h.height
-            }
-            this.resizeSwimlane(f, e.width, e.height)
-          }
-        }
-    } finally {
-      b.endUpdate()
-    }
-  }
-};
-mxSwimlaneManager.prototype.resizeSwimlane = function(a, b, c) {
-  var d = this.getGraph().getModel();
-  d.beginUpdate();
-  try {
-    if (!this.isSwimlaneIgnored(a)) {
-      var e = d.getGeometry(a);
-      if (null != e) {
-        var f = this.isCellHorizontal(a);
-        if (f && e.height != c || !f && e.width != b) e = e.clone(), f ? e.height = c : e.width = b, d.setGeometry(a, e)
-      }
-    }
-    var g = this.graph.isSwimlane(a) ? this.graph.getStartSize(a) : new mxRectangle;
-    b -= g.width;
-    c -= g.height;
-    for (var h = d.getChildCount(a), e = 0; e < h; e++) {
-      var k = d.getChildAt(a, e);
-      this.resizeSwimlane(k, b, c)
-    }
-  } finally {
-    d.endUpdate()
-  }
-};
-mxSwimlaneManager.prototype.destroy = function() {
-  this.setGraph(null)
-};
-
-function mxTemporaryCellStates(a, b, c) {
-  this.view = a;
-  b = null != b ? b : 1;
-  this.oldBounds = a.getGraphBounds();
-  this.oldStates = a.getStates();
-  this.oldScale = a.getScale();
-  a.setStates(new mxDictionary);
-  a.setScale(b);
-  if (null != c) {
-    b = a.createState(new mxCell);
-    for (var d = 0; d < c.length; d++) a.validateBounds(b, c[d]);
-    for (var e = null, d = 0; d < c.length; d++) {
-      var f = a.validatePoints(b, c[d]);
-      null == e ? e = f : e.add(f)
-    }
-    null == e && (e = new mxRectangle);
-    a.setGraphBounds(e)
-  }
-}
-mxTemporaryCellStates.prototype.view = null;
-mxTemporaryCellStates.prototype.oldStates = null;
-mxTemporaryCellStates.prototype.oldBounds = null;
-mxTemporaryCellStates.prototype.oldScale = null;
-mxTemporaryCellStates.prototype.destroy = function() {
-  this.view.setScale(this.oldScale);
-  this.view.setStates(this.oldStates);
-  this.view.setGraphBounds(this.oldBounds)
-};
-
-function mxCellStatePreview(a) {
-  this.graph = a;
-  this.deltas = {}
-}
-mxCellStatePreview.prototype.graph = null;
-mxCellStatePreview.prototype.deltas = null;
-mxCellStatePreview.prototype.count = 0;
-mxCellStatePreview.prototype.isEmpty = function() {
-  return 0 == this.count
-};
-mxCellStatePreview.prototype.moveState = function(a, b, c, d, e) {
-  d = null != d ? d : !0;
-  e = null != e ? e : !0;
-  var f = mxCellPath.create(a.cell),
-    g = this.deltas[f];
-  null == g ? (g = new mxPoint(b, c), this.deltas[f] = g, this.count++) : d ? (g.X += b, g.Y += c) : (g.X = b, g.Y = c);
-  e && this.addEdges(a);
-  return g
-};
-mxCellStatePreview.prototype.show = function(a) {
-  var b = this.graph.getModel(),
-    c = b.getRoot(),
-    d;
-  for (d in this.deltas) {
-    var e = mxCellPath.resolve(c, d),
-      f = this.graph.view.getState(e),
-      g = this.deltas[d],
-      e = this.graph.view.getState(b.getParent(e));
-    this.translateState(e, f, g.x, g.y)
-  }
-  for (d in this.deltas) e = mxCellPath.resolve(c, d), f = this.graph.view.getState(e), g = this.deltas[d], e = this.graph.view.getState(b.getParent(e)), this.revalidateState(e, f, g.x, g.y, a)
-};
-mxCellStatePreview.prototype.translateState = function(a, b, c, d) {
-  if (null != b) {
-    var e = this.graph.getModel();
-    if (e.isVertex(b.cell)) {
-      b.invalid = !0;
-      this.graph.view.validateBounds(a, b.cell);
-      a = e.getGeometry(b.cell);
-      var f = mxCellPath.create(b.cell);
-      if ((0 != c || 0 != d) && null != a && (!a.relative || null != this.deltas[f])) b.x += c, b.y += d
-    }
-    a = e.getChildCount(b.cell);
-    for (f = 0; f < a; f++) this.translateState(b, this.graph.view.getState(e.getChildAt(b.cell, f)), c, d)
-  }
-};
-mxCellStatePreview.prototype.revalidateState = function(a, b, c, d, e) {
-  if (null != b) {
-    b.invalid = !0;
-    this.graph.view.validatePoints(a, b.cell);
-    var f = mxCellPath.create(b.cell),
-      g = this.graph.getModel(),
-      h = this.graph.getCellGeometry(b.cell);
-    if ((0 != c || 0 != d) && null != h && h.relative && g.isVertex(b.cell) && (null == a || g.isVertex(a.cell) || null != this.deltas[f])) b.x += c, b.y += d, this.graph.cellRenderer.redraw(b);
-    null != e && e(b);
-    a = g.getChildCount(b.cell);
-    for (f = 0; f < a; f++) this.revalidateState(b, this.graph.view.getState(g.getChildAt(b.cell,
-      f)), c, d, e)
-  }
-};
-mxCellStatePreview.prototype.addEdges = function(a) {
-  for (var b = this.graph.getModel(), c = b.getEdgeCount(a.cell), d = 0; d < c; d++) {
-    var e = this.graph.view.getState(b.getEdgeAt(a.cell, d));
-    null != e && this.moveState(e, 0, 0)
-  }
-};
-
-function mxConnectionConstraint(a, b) {
-  this.point = a;
-  this.perimeter = null != b ? b : !0
-}
-mxConnectionConstraint.prototype.point = null;
-mxConnectionConstraint.prototype.perimeter = null;
-
-function mxGraphHandler(a) {
-  this.graph = a;
-  this.graph.addMouseListener(this);
-  this.panHandler = mxUtils.bind(this, function() {
-    this.updatePreviewShape()
-  });
-  this.graph.addListener(mxEvent.PAN, this.panHandler)
-}
-mxGraphHandler.prototype.graph = null;
-mxGraphHandler.prototype.maxCells = mxClient.IS_IE ? 20 : 50;
-mxGraphHandler.prototype.enabled = !0;
-mxGraphHandler.prototype.highlightEnabled = !0;
-mxGraphHandler.prototype.cloneEnabled = !0;
-mxGraphHandler.prototype.moveEnabled = !0;
-mxGraphHandler.prototype.guidesEnabled = !1;
-mxGraphHandler.prototype.guide = null;
-mxGraphHandler.prototype.currentDx = null;
-mxGraphHandler.prototype.currentDy = null;
-mxGraphHandler.prototype.updateCursor = !0;
-mxGraphHandler.prototype.selectEnabled = !0;
-mxGraphHandler.prototype.removeCellsFromParent = !0;
-mxGraphHandler.prototype.connectOnDrop = !1;
-mxGraphHandler.prototype.scrollOnMove = !0;
-mxGraphHandler.prototype.minimumSize = 6;
-mxGraphHandler.prototype.previewColor = "black";
-mxGraphHandler.prototype.htmlPreview = !1;
-mxGraphHandler.prototype.shape = null;
-mxGraphHandler.prototype.scaleGrid = !1;
-mxGraphHandler.prototype.rotationEnabled = !0;
-mxGraphHandler.prototype.isEnabled = function() {
-  return this.enabled
-};
-mxGraphHandler.prototype.setEnabled = function(a) {
-  this.enabled = a
-};
-mxGraphHandler.prototype.isCloneEnabled = function() {
-  return this.cloneEnabled
-};
-mxGraphHandler.prototype.setCloneEnabled = function(a) {
-  this.cloneEnabled = a
-};
-mxGraphHandler.prototype.isMoveEnabled = function() {
-  return this.moveEnabled
-};
-mxGraphHandler.prototype.setMoveEnabled = function(a) {
-  this.moveEnabled = a
-};
-mxGraphHandler.prototype.isSelectEnabled = function() {
-  return this.selectEnabled
-};
-mxGraphHandler.prototype.setSelectEnabled = function(a) {
-  this.selectEnabled = a
-};
-mxGraphHandler.prototype.isRemoveCellsFromParent = function() {
-  return this.removeCellsFromParent
-};
-mxGraphHandler.prototype.setRemoveCellsFromParent = function(a) {
-  this.removeCellsFromParent = a
-};
-mxGraphHandler.prototype.getInitialCellForEvent = function(a) {
-  return a.getCell()
-};
-mxGraphHandler.prototype.isDelayedSelection = function(a) {
-  return this.graph.isCellSelected(a)
-};
-mxGraphHandler.prototype.mouseDown = function(a, b) {
-  if (!b.isConsumed() && this.isEnabled() && this.graph.isEnabled() && !this.graph.isForceMarqueeEvent(b.getEvent()) && null != b.getState()) {
-    var c = this.getInitialCellForEvent(b);
-    this.cell = null;
-    this.delayedSelection = this.isDelayedSelection(c);
-    this.isSelectEnabled() && !this.delayedSelection && this.graph.selectCellForEvent(c, b.getEvent());
-    if (this.isMoveEnabled()) {
-      var d = this.graph.model,
-        e = d.getGeometry(c);
-      this.graph.isCellMovable(c) && (!d.isEdge(c) || 1 < this.graph.getSelectionCount() ||
-        null != e.points && 0 < e.points.length || null == d.getTerminal(c, !0) || null == d.getTerminal(c, !1) || this.graph.allowDanglingEdges || this.graph.isCloneEvent(b.getEvent()) && this.graph
-        .isCellsCloneable()) && this.start(c, b.getX(), b.getY());
-      this.cellWasClicked = !0;
-      !mxClient.IS_SF && !mxClient.IS_GC || "SELECT" != b.getSource().nodeName ? b.consume() : mxClient.IS_SF && "SELECT" == b.getSource().nodeName && (this.cellWasClicked = !1, this.first = null)
-    }
-  }
-};
-mxGraphHandler.prototype.getGuideStates = function() {
-  var a = this.graph.getDefaultParent(),
-    b = this.graph.getModel(),
-    c = mxUtils.bind(this, function(a) {
-      return null != this.graph.view.getState(a) && b.isVertex(a) && null != b.getGeometry(a) && !b.getGeometry(a).relative
-    });
-  return this.graph.view.getCellStates(b.filterDescendants(c, a))
-};
-mxGraphHandler.prototype.getCells = function(a) {
-  return !this.delayedSelection && this.graph.isCellMovable(a) ? [a] : this.graph.getMovableCells(this.graph.getSelectionCells())
-};
-mxGraphHandler.prototype.getPreviewBounds = function(a) {
-  a = this.getBoundingBox(a);
-  null != a && (a.grow(-1, -1), a.width < this.minimumSize && (a.x -= (this.minimumSize - a.width) / 2, a.width = this.minimumSize), a.height < this.minimumSize && (a.y -= (this.minimumSize - a.height) /
-    2, a.height = this.minimumSize));
-  return a
-};
-mxGraphHandler.prototype.getBoundingBox = function(a) {
-  var b = null;
-  if (null != a && 0 < a.length)
-    for (var c = this.graph.getModel(), d = 0; d < a.length; d++)
-      if (c.isVertex(a[d]) || c.isEdge(a[d])) {
-        var e = this.graph.view.getState(a[d]);
-        if (null != e) {
-          var f = e;
-          c.isVertex(a[d]) && (null != e.shape && null != e.shape.boundingBox) && (f = e.shape.boundingBox);
-          null == b ? b = new mxRectangle(f.x, f.y, f.width, f.height) : b.add(f)
-        }
-      }
-  return b
-};
-mxGraphHandler.prototype.createPreviewShape = function(a) {
-  a = new mxRectangleShape(a, null, this.previewColor);
-  a.isDashed = !0;
-  this.htmlPreview ? (a.dialect = mxConstants.DIALECT_STRICTHTML, a.init(this.graph.container)) : (a.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG,
-    a.init(this.graph.getView().getOverlayPane()), a.pointerEvents = !1);
-  return a
-};
-mxGraphHandler.prototype.start = function(a, b, c) {
-  this.cell = a;
-  this.first = mxUtils.convertPoint(this.graph.container, b, c);
-  this.cells = this.getCells(this.cell);
-  this.bounds = this.graph.getView().getBounds(this.cells);
-  this.pBounds = this.getPreviewBounds(this.cells);
-  this.guidesEnabled && (this.guide = new mxGuide(this.graph, this.getGuideStates()))
-};
-mxGraphHandler.prototype.useGuidesForEvent = function(a) {
-  return null != this.guide ? this.guide.isEnabledForEvent(a.getEvent()) : !0
-};
-mxGraphHandler.prototype.snap = function(a) {
-  var b = this.scaleGrid ? this.graph.view.scale : 1;
-  a.x = this.graph.snap(a.x / b) * b;
-  a.y = this.graph.snap(a.y / b) * b;
-  return a
-};
-mxGraphHandler.prototype.mouseMove = function(a, b) {
-  var c = this.graph;
-  if (!b.isConsumed() && c.isMouseDown && null != this.cell && null != this.first && null != this.bounds) {
-    var d = mxUtils.convertPoint(c.container, b.getX(), b.getY()),
-      e = d.x - this.first.x,
-      f = d.y - this.first.y,
-      d = c.tolerance;
-    if (null != this.shape || Math.abs(e) > d || Math.abs(f) > d) {
-      null == this.highlight && (this.highlight = new mxCellHighlight(this.graph, mxConstants.DROP_TARGET_COLOR, 3));
-      null == this.shape && (this.shape = this.createPreviewShape(this.bounds));
-      var g = c.isGridEnabledEvent(b.getEvent()),
-        d = !0;
-      if (null != this.guide && this.useGuidesForEvent(b)) f = this.guide.move(this.bounds, new mxPoint(e, f), g), d = !1, e = f.x, f = f.y;
-      else if (g) var h = c.getView().translate,
-        k = c.getView().scale,
-        g = this.bounds.x - (c.snap(this.bounds.x / k - h.x) + h.x) * k,
-        h = this.bounds.y - (c.snap(this.bounds.y / k - h.y) + h.y) * k,
-        f = this.snap(new mxPoint(e, f)),
-        e = f.x - g,
-        f = f.y - h;
-      null != this.guide && d && this.guide.hide();
-      c.isConstrainedEvent(b.getEvent()) && (Math.abs(e) > Math.abs(f) ? f = 0 : e = 0);
-      this.currentDx = e;
-      this.currentDy = f;
-      this.updatePreviewShape();
-      d = null;
-      f = b.getCell();
-      c.isDropEnabled() && this.highlightEnabled && (d = c.getDropTarget(this.cells, b.getEvent(), f));
-      g = d;
-      for (h = c.getModel(); null != g && g != this.cells[0];) g = h.getParent(g);
-      var k = c.isCloneEvent(b.getEvent()) && c.isCellsCloneable() && this.isCloneEnabled(),
-        e = c.getView().getState(d),
-        l = !1;
-      null != e && null == g && (h.getParent(this.cell) != d || k) ? (this.target != d && (this.target = d, this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)), l = !0) : (this.target = null,
-        this.connectOnDrop && (null != f && 1 == this.cells.length && c.getModel().isVertex(f) &&
-          c.isCellConnectable(f)) && (e = c.getView().getState(f), null != e && (c = null == c.getEdgeValidationError(null, this.cell, f) ? mxConstants.VALID_COLOR : mxConstants.INVALID_CONNECT_TARGET_COLOR,
-          this.setHighlightColor(c), l = !0)));
-      null != e && l ? this.highlight.highlight(e) : this.highlight.hide()
-    }
-    b.consume();
-    mxEvent.consume(b.getEvent())
-  } else if ((this.isMoveEnabled() || this.isCloneEnabled()) && this.updateCursor && !b.isConsumed() && null != b.getState() && !c.isMouseDown) e = c.getCursorForCell(b.getCell()), null == e && (c.isEnabled() &&
-      c.isCellMovable(b.getCell())) &&
-    (e = c.getModel().isEdge(b.getCell()) ? mxConstants.CURSOR_MOVABLE_EDGE : mxConstants.CURSOR_MOVABLE_VERTEX), b.getState().setCursor(e), b.consume()
-};
-mxGraphHandler.prototype.updatePreviewShape = function() {
-  null != this.shape && (this.shape.bounds = new mxRectangle(Math.round(this.pBounds.x + this.currentDx - this.graph.panDx), Math.round(this.pBounds.y + this.currentDy - this.graph.panDy), this.pBounds
-    .width, this.pBounds.height), this.shape.redraw())
-};
-mxGraphHandler.prototype.setHighlightColor = function(a) {
-  null != this.highlight && this.highlight.setHighlightColor(a)
-};
-mxGraphHandler.prototype.mouseUp = function(a, b) {
-  if (!b.isConsumed()) {
-    var c = this.graph;
-    if (null != this.cell && null != this.first && null != this.shape && null != this.currentDx && null != this.currentDy) {
-      var d = c.getView().scale,
-        e = c.isCloneEvent(b.getEvent()) && c.isCellsCloneable() && this.isCloneEnabled(),
-        f = this.currentDx / d,
-        d = this.currentDy / d,
-        g = b.getCell();
-      this.connectOnDrop && null == this.target && null != g && c.getModel().isVertex(g) && c.isCellConnectable(g) && c.isEdgeValid(null, this.cell, g) ? c.connectionHandler.connect(this.cell,
-        g, b.getEvent()) : (g = this.target, c.isSplitEnabled() && c.isSplitTarget(g, this.cells, b.getEvent()) ? c.splitEdge(g, this.cells, null, f, d) : this.moveCells(this.cells, f, d, e, this
-        .target, b.getEvent()))
-    } else this.isSelectEnabled() && (this.delayedSelection && null != this.cell) && this.selectDelayed(b)
-  }
-  this.cellWasClicked && b.consume();
-  this.reset()
-};
-mxGraphHandler.prototype.selectDelayed = function(a) {
-  this.graph.selectCellForEvent(this.cell, a.getEvent())
-};
-mxGraphHandler.prototype.reset = function() {
-  this.destroyShapes();
-  this.delayedSelection = this.cellWasClicked = !1;
-  this.target = this.cell = this.first = this.guides = this.currentDy = this.currentDx = null
-};
-mxGraphHandler.prototype.shouldRemoveCellsFromParent = function(a, b, c) {
-  if (this.graph.getModel().isVertex(a)) {
-    a = this.graph.getView().getState(a);
-    c = mxUtils.convertPoint(this.graph.container, mxEvent.getClientX(c), mxEvent.getClientY(c));
-    var d = mxUtils.toRadians(mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION) || 0);
-    if (0 != d) {
-      b = Math.cos(-d);
-      var d = Math.sin(-d),
-        e = new mxPoint(a.getCenterX(), a.getCenterY());
-      c = mxUtils.getRotatedPoint(c, b, d, e)
-    }
-    return null != a && !mxUtils.contains(a, c.x, c.y)
-  }
-  return !1
-};
-mxGraphHandler.prototype.moveCells = function(a, b, c, d, e, f) {
-  d && (a = this.graph.getCloneableCells(a));
-  null == e && (this.isRemoveCellsFromParent() && this.shouldRemoveCellsFromParent(this.graph.getModel().getParent(this.cell), a, f)) && (e = this.graph.getDefaultParent());
-  a = this.graph.moveCells(a, b - this.graph.panDx / this.graph.view.scale, c - this.graph.panDy / this.graph.view.scale, d, e, f);
-  this.isSelectEnabled() && this.scrollOnMove && this.graph.scrollCellToVisible(a[0]);
-  d && this.graph.setSelectionCells(a)
-};
-mxGraphHandler.prototype.destroyShapes = function() {
-  null != this.shape && (this.shape.destroy(), this.shape = null);
-  null != this.guide && (this.guide.destroy(), this.guide = null);
-  null != this.highlight && (this.highlight.destroy(), this.highlight = null)
-};
-mxGraphHandler.prototype.destroy = function() {
-  this.graph.removeMouseListener(this);
-  this.graph.removeListener(this.panHandler);
-  this.destroyShapes()
-};
-
-function mxPanningHandler(a, b) {
-  null != a && (this.graph = a, this.factoryMethod = b, this.graph.addMouseListener(this), this.init())
-}
-mxPanningHandler.prototype = new mxPopupMenu;
-mxPanningHandler.prototype.constructor = mxPanningHandler;
-mxPanningHandler.prototype.graph = null;
-mxPanningHandler.prototype.triggerX = null;
-mxPanningHandler.prototype.triggerY = null;
-mxPanningHandler.prototype.usePopupTrigger = !0;
-mxPanningHandler.prototype.useLeftButtonForPanning = !1;
-mxPanningHandler.prototype.selectOnPopup = !0;
-mxPanningHandler.prototype.clearSelectionOnBackground = !0;
-mxPanningHandler.prototype.ignoreCell = !1;
-mxPanningHandler.prototype.previewEnabled = !0;
-mxPanningHandler.prototype.useGrid = !1;
-mxPanningHandler.prototype.panningEnabled = !0;
-mxPanningHandler.prototype.isPanningEnabled = function() {
-  return this.panningEnabled
-};
-mxPanningHandler.prototype.setPanningEnabled = function(a) {
-  this.panningEnabled = a
-};
-mxPanningHandler.prototype.init = function() {
-  mxPopupMenu.prototype.init.apply(this);
-  mxEvent.addListener(this.div, mxClient.IS_TOUCH ? "touchmove" : "mousemove", mxUtils.bind(this, function(a) {
-    this.graph.tooltipHandler.hide()
-  }))
-};
-mxPanningHandler.prototype.isPanningTrigger = function(a) {
-  var b = a.getEvent();
-  return this.useLeftButtonForPanning && (this.ignoreCell || null == a.getState()) && mxEvent.isLeftMouseButton(b) || mxEvent.isControlDown(b) && mxEvent.isShiftDown(b) || this.usePopupTrigger &&
-    mxEvent.isPopupTrigger(b)
-};
-mxPanningHandler.prototype.mouseDown = function(a, b) {
-  if (!b.isConsumed() && this.isEnabled()) {
-    this.hideMenu();
-    this.dx0 = -this.graph.container.scrollLeft;
-    this.dy0 = -this.graph.container.scrollTop;
-    var c = mxUtils.convertPoint(this.graph.container, b.getX(), b.getY());
-    this.triggerX = c.x;
-    this.triggerY = c.y;
-    this.popupTrigger = this.isPopupTrigger(b);
-    this.panningTrigger = this.isPanningEnabled() && this.isPanningTrigger(b);
-    this.startX = b.getX();
-    this.startY = b.getY();
-    this.panningTrigger && this.consumePanningTrigger(b)
-  }
-};
-mxPanningHandler.prototype.consumePanningTrigger = function(a) {
-  a.consume()
-};
-mxPanningHandler.prototype.mouseMove = function(a, b) {
-  var c = b.getX() - this.startX,
-    d = b.getY() - this.startY;
-  if (this.active) this.previewEnabled && (this.useGrid && (c = this.graph.snap(c), d = this.graph.snap(d)), this.graph.panGraph(c + this.dx0, d + this.dy0)), this.fireEvent(new mxEventObject(
-    mxEvent.PAN, "event", b)), b.consume();
-  else if (this.panningTrigger) {
-    var e = this.active;
-    this.active = Math.abs(c) > this.graph.tolerance || Math.abs(d) > this.graph.tolerance;
-    !e && this.active && this.fireEvent(new mxEventObject(mxEvent.PAN_START,
-      "event", b))
-  }
-};
-mxPanningHandler.prototype.mouseUp = function(a, b) {
-  var c = Math.abs(b.getX() - this.startX),
-    d = Math.abs(b.getY() - this.startY);
-  if (this.active) {
-    if (!this.graph.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.graph.container)) {
-      c = b.getX() - this.startX;
-      d = b.getY() - this.startY;
-      this.useGrid && (c = this.graph.snap(c), d = this.graph.snap(d));
-      var e = this.graph.getView().scale,
-        f = this.graph.getView().translate;
-      this.graph.panGraph(0, 0);
-      this.panGraph(f.x + c / e, f.y + d / e)
-    }
-    this.active = !1;
-    this.fireEvent(new mxEventObject(mxEvent.PAN_END, "event",
-      b));
-    b.consume()
-  } else this.popupTrigger && (c < this.graph.tolerance && d < this.graph.tolerance) && (c = this.getCellForPopupEvent(b), this.graph.isEnabled() && this.selectOnPopup && null != c && !this.graph.isCellSelected(
-    c) ? this.graph.setSelectionCell(c) : this.clearSelectionOnBackground && null == c && this.graph.clearSelection(), this.graph.tooltipHandler.hide(), d = mxUtils.getScrollOrigin(), d = new mxPoint(
-    b.getX() + d.x, b.getY() + d.y), this.popup(d.x + 1, d.y + 1, c, b.getEvent()), b.consume());
-  this.popupTrigger = this.panningTrigger = !1
-};
-mxPanningHandler.prototype.getCellForPopupEvent = function(a) {
-  return a.getCell()
-};
-mxPanningHandler.prototype.panGraph = function(a, b) {
-  this.graph.getView().setTranslate(a, b)
-};
-mxPanningHandler.prototype.destroy = function() {
-  this.graph.removeMouseListener(this);
-  mxPopupMenu.prototype.destroy.apply(this)
-};
-
-function mxCellMarker(a, b, c, d) {
-  mxEventSource.call(this);
-  null != a && (this.graph = a, this.validColor = null != b ? b : mxConstants.DEFAULT_VALID_COLOR, this.invalidColor = null != b ? c : mxConstants.DEFAULT_INVALID_COLOR, this.hotspot = null != d ? d :
-    mxConstants.DEFAULT_HOTSPOT, this.highlight = new mxCellHighlight(a))
-}
-mxUtils.extend(mxCellMarker, mxEventSource);
-mxCellMarker.prototype.graph = null;
-mxCellMarker.prototype.enabled = !0;
-mxCellMarker.prototype.hotspot = mxConstants.DEFAULT_HOTSPOT;
-mxCellMarker.prototype.hotspotEnabled = !1;
-mxCellMarker.prototype.validColor = null;
-mxCellMarker.prototype.invalidColor = null;
-mxCellMarker.prototype.currentColor = null;
-mxCellMarker.prototype.validState = null;
-mxCellMarker.prototype.markedState = null;
-mxCellMarker.prototype.setEnabled = function(a) {
-  this.enabled = a
-};
-mxCellMarker.prototype.isEnabled = function() {
-  return this.enabled
-};
-mxCellMarker.prototype.setHotspot = function(a) {
-  this.hotspot = a
-};
-mxCellMarker.prototype.getHotspot = function() {
-  return this.hotspot
-};
-mxCellMarker.prototype.setHotspotEnabled = function(a) {
-  this.hotspotEnabled = a
-};
-mxCellMarker.prototype.isHotspotEnabled = function() {
-  return this.hotspotEnabled
-};
-mxCellMarker.prototype.hasValidState = function() {
-  return null != this.validState
-};
-mxCellMarker.prototype.getValidState = function() {
-  return this.validState
-};
-mxCellMarker.prototype.getMarkedState = function() {
-  return this.markedState
-};
-mxCellMarker.prototype.reset = function() {
-  this.validState = null;
-  null != this.markedState && (this.markedState = null, this.unmark())
-};
-mxCellMarker.prototype.process = function(a) {
-  var b = null;
-  if (this.isEnabled()) {
-    var b = this.getState(a),
-      c = null != b ? this.isValidState(b) : !1;
-    a = this.getMarkerColor(a.getEvent(), b, c);
-    this.validState = c ? b : null;
-    if (b != this.markedState || a != this.currentColor) this.currentColor = a, null != b && null != this.currentColor ? (this.markedState = b, this.mark()) : null != this.markedState && (this.markedState =
-      null, this.unmark())
-  }
-  return b
-};
-mxCellMarker.prototype.markCell = function(a, b) {
-  var c = this.graph.getView().getState(a);
-  null != c && (this.currentColor = null != b ? b : this.validColor, this.markedState = c, this.mark())
-};
-mxCellMarker.prototype.mark = function() {
-  this.highlight.setHighlightColor(this.currentColor);
-  this.highlight.highlight(this.markedState);
-  this.fireEvent(new mxEventObject(mxEvent.MARK, "state", this.markedState))
-};
-mxCellMarker.prototype.unmark = function() {
-  this.mark()
-};
-mxCellMarker.prototype.isValidState = function(a) {
-  return !0
-};
-mxCellMarker.prototype.getMarkerColor = function(a, b, c) {
-  return c ? this.validColor : this.invalidColor
-};
-mxCellMarker.prototype.getState = function(a) {
-  var b = this.graph.getView();
-  cell = this.getCell(a);
-  b = this.getStateToMark(b.getState(cell));
-  return null != b && this.intersects(b, a) ? b : null
-};
-mxCellMarker.prototype.getCell = function(a) {
-  return a.getCell()
-};
-mxCellMarker.prototype.getStateToMark = function(a) {
-  return a
-};
-mxCellMarker.prototype.intersects = function(a, b) {
-  return this.hotspotEnabled ? mxUtils.intersectsHotspot(a, b.getGraphX(), b.getGraphY(), this.hotspot, mxConstants.MIN_HOTSPOT_SIZE, mxConstants.MAX_HOTSPOT_SIZE) : !0
-};
-mxCellMarker.prototype.destroy = function() {
-  this.graph.getView().removeListener(this.resetHandler);
-  this.graph.getModel().removeListener(this.resetHandler);
-  this.highlight.destroy()
-};
-
-function mxSelectionCellsHandler(a) {
-  mxEventSource.call(this);
-  this.graph = a;
-  this.handlers = new mxDictionary;
-  this.graph.addMouseListener(this);
-  this.refreshHandler = mxUtils.bind(this, function(a, c) {
-    this.isEnabled() && this.refresh()
-  });
-  this.graph.getSelectionModel().addListener(mxEvent.CHANGE, this.refreshHandler);
-  this.graph.getModel().addListener(mxEvent.CHANGE, this.refreshHandler);
-  this.graph.getView().addListener(mxEvent.SCALE, this.refreshHandler);
-  this.graph.getView().addListener(mxEvent.TRANSLATE, this.refreshHandler);
-  this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE, this.refreshHandler);
-  this.graph.getView().addListener(mxEvent.DOWN, this.refreshHandler);
-  this.graph.getView().addListener(mxEvent.UP, this.refreshHandler)
-}
-mxUtils.extend(mxSelectionCellsHandler, mxEventSource);
-mxSelectionCellsHandler.prototype.graph = null;
-mxSelectionCellsHandler.prototype.enabled = !0;
-mxSelectionCellsHandler.prototype.refreshHandler = null;
-mxSelectionCellsHandler.prototype.maxHandlers = 100;
-mxSelectionCellsHandler.prototype.handlers = null;
-mxSelectionCellsHandler.prototype.isEnabled = function() {
-  return this.enabled
-};
-mxSelectionCellsHandler.prototype.setEnabled = function(a) {
-  this.enabled = a
-};
-mxSelectionCellsHandler.prototype.getHandler = function(a) {
-  return this.handlers.get(a)
-};
-mxSelectionCellsHandler.prototype.reset = function() {
-  this.handlers.visit(function(a, b) {
-    b.reset.apply(b)
-  })
-};
-mxSelectionCellsHandler.prototype.refresh = function() {
-  var a = this.handlers;
-  this.handlers = new mxDictionary;
-  for (var b = this.graph.getSelectionCells(), c = 0; c < b.length; c++) {
-    var d = this.graph.view.getState(b[c]);
-    if (null != d) {
-      var e = a.remove(b[c]);
-      null != e && (e.state != d ? (e.destroy(), e = null) : e.redraw());
-      null == e && (e = this.graph.createHandler(d), this.fireEvent(new mxEventObject(mxEvent.ADD, "state", d)));
-      null != e && this.handlers.put(b[c], e)
-    }
-  }
-  a.visit(mxUtils.bind(this, function(a, b) {
-    this.fireEvent(new mxEventObject(mxEvent.REMOVE,
-      "state", b.state));
-    b.destroy()
-  }))
-};
-mxSelectionCellsHandler.prototype.mouseDown = function(a, b) {
-  if (this.graph.isEnabled() && this.isEnabled()) {
-    var c = [a, b];
-    this.handlers.visit(function(a, b) {
-      b.mouseDown.apply(b, c)
-    })
-  }
-};
-mxSelectionCellsHandler.prototype.mouseMove = function(a, b) {
-  if (this.graph.isEnabled() && this.isEnabled()) {
-    var c = [a, b];
-    this.handlers.visit(function(a, b) {
-      b.mouseMove.apply(b, c)
-    })
-  }
-};
-mxSelectionCellsHandler.prototype.mouseUp = function(a, b) {
-  if (this.graph.isEnabled() && this.isEnabled()) {
-    var c = [a, b];
-    this.handlers.visit(function(a, b) {
-      b.mouseUp.apply(b, c)
-    })
-  }
-};
-mxSelectionCellsHandler.prototype.destroy = function() {
-  this.graph.removeMouseListener(this);
-  null != this.refreshHandler && (this.graph.getSelectionModel().removeListener(this.refreshHandler), this.graph.getModel().removeListener(this.refreshHandler), this.graph.getView().removeListener(
-    this.refreshHandler), this.refreshHandler = null)
-};
-
-function mxConnectionHandler(a, b) {
-  mxEventSource.call(this);
-  null != a && (this.graph = a, this.factoryMethod = b, this.init())
-}
-mxUtils.extend(mxConnectionHandler, mxEventSource);
-mxConnectionHandler.prototype.graph = null;
-mxConnectionHandler.prototype.factoryMethod = !0;
-mxConnectionHandler.prototype.moveIconFront = !1;
-mxConnectionHandler.prototype.moveIconBack = !1;
-mxConnectionHandler.prototype.connectImage = null;
-mxConnectionHandler.prototype.targetConnectImage = !1;
-mxConnectionHandler.prototype.enabled = !0;
-mxConnectionHandler.prototype.select = !0;
-mxConnectionHandler.prototype.createTarget = !1;
-mxConnectionHandler.prototype.marker = null;
-mxConnectionHandler.prototype.constraintHandler = null;
-mxConnectionHandler.prototype.error = null;
-mxConnectionHandler.prototype.waypointsEnabled = !1;
-mxConnectionHandler.prototype.tapAndHoldEnabled = !0;
-mxConnectionHandler.prototype.tapAndHoldDelay = 500;
-mxConnectionHandler.prototype.tapAndHoldInProgress = !1;
-mxConnectionHandler.prototype.tapAndHoldValid = !1;
-mxConnectionHandler.prototype.tapAndHoldTolerance = 4;
-mxConnectionHandler.prototype.initialTouchX = 0;
-mxConnectionHandler.prototype.initialTouchY = 0;
-mxConnectionHandler.prototype.ignoreMouseDown = !1;
-mxConnectionHandler.prototype.first = null;
-mxConnectionHandler.prototype.connectIconOffset = new mxPoint(0, mxConstants.TOOLTIP_VERTICAL_OFFSET);
-mxConnectionHandler.prototype.edgeState = null;
-mxConnectionHandler.prototype.changeHandler = null;
-mxConnectionHandler.prototype.drillHandler = null;
-mxConnectionHandler.prototype.mouseDownCounter = 0;
-mxConnectionHandler.prototype.movePreviewAway = mxClient.IS_VML;
-mxConnectionHandler.prototype.isEnabled = function() {
-  return this.enabled
-};
-mxConnectionHandler.prototype.setEnabled = function(a) {
-  this.enabled = a
-};
-mxConnectionHandler.prototype.isCreateTarget = function() {
-  return this.createTarget
-};
-mxConnectionHandler.prototype.setCreateTarget = function(a) {
-  this.createTarget = a
-};
-mxConnectionHandler.prototype.createShape = function() {
-  var a = new mxPolyline([], mxConstants.INVALID_COLOR);
-  a.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;
-  a.init(this.graph.getView().getOverlayPane());
-  a.svgStrokeTolerance = 0;
-  a.pointerEvents = !1;
-  a.isDashed = !0;
-  if (this.graph.dialect == mxConstants.DIALECT_SVG) a.node.setAttribute("pointer-events", "none");
-  else {
-    var b = mxUtils.bind(this, function(a) {
-      a = mxUtils.convertPoint(this.graph.container, mxEvent.getClientX(a),
-        mxEvent.getClientY(a));
-      return this.graph.view.getState(this.graph.getCellAt(a.x, a.y))
-    });
-    mxEvent.redirectMouseEvents(a.node, this.graph, b)
-  }
-  return a
-};
-mxConnectionHandler.prototype.init = function() {
-  this.graph.addMouseListener(this);
-  this.marker = this.createMarker();
-  this.constraintHandler = new mxConstraintHandler(this.graph);
-  this.changeHandler = mxUtils.bind(this, function(a) {
-    null != this.iconState && (this.iconState = this.graph.getView().getState(this.iconState.cell));
-    null != this.iconState ? this.redrawIcons(this.icons, this.iconState) : (this.destroyIcons(this.icons), this.previous = null);
-    this.constraintHandler.reset()
-  });
-  this.graph.getModel().addListener(mxEvent.CHANGE,
-    this.changeHandler);
-  this.graph.getView().addListener(mxEvent.SCALE, this.changeHandler);
-  this.graph.getView().addListener(mxEvent.TRANSLATE, this.changeHandler);
-  this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE, this.changeHandler);
-  this.drillHandler = mxUtils.bind(this, function(a) {
-    this.destroyIcons(this.icons)
-  });
-  this.graph.addListener(mxEvent.START_EDITING, this.drillHandler);
-  this.graph.getView().addListener(mxEvent.DOWN, this.drillHandler);
-  this.graph.getView().addListener(mxEvent.UP, this.drillHandler)
-};
-mxConnectionHandler.prototype.isConnectableCell = function(a) {
-  return !0
-};
-mxConnectionHandler.prototype.createMarker = function() {
-  var a = new mxCellMarker(this.graph);
-  a.hotspotEnabled = !0;
-  a.getCell = mxUtils.bind(this, function(b, c) {
-    c = mxCellMarker.prototype.getCell.apply(a, arguments);
-    this.error = null;
-    if (!this.isConnectableCell(c)) return null;
-    null != c ? this.isConnecting() ? null != this.previous && (this.error = this.validateConnection(this.previous.cell, c), null != this.error && 0 == this.error.length && (c = null, this.isCreateTarget() &&
-        (this.error = null))) : this.isValidSource(c) || (c = null) : this.isConnecting() &&
-      (!this.isCreateTarget() && !this.graph.allowDanglingEdges) && (this.error = "");
-    return c
-  });
-  a.isValidState = mxUtils.bind(this, function(b) {
-    return this.isConnecting() ? null == this.error : mxCellMarker.prototype.isValidState.apply(a, arguments)
-  });
-  a.getMarkerColor = mxUtils.bind(this, function(b, c, d) {
-    return null == this.connectImage || this.isConnecting() ? mxCellMarker.prototype.getMarkerColor.apply(a, arguments) : null
-  });
-  a.intersects = mxUtils.bind(this, function(b, c) {
-    return null != this.connectImage || this.isConnecting() ? !0 : mxCellMarker.prototype.intersects.apply(a,
-      arguments)
-  });
-  return a
-};
-mxConnectionHandler.prototype.start = function(a, b, c, d) {
-  this.previous = a;
-  this.first = new mxPoint(b, c);
-  this.edgeState = null != d ? d : this.createEdgeState(null);
-  this.marker.currentColor = this.marker.validColor;
-  this.marker.markedState = a;
-  this.marker.mark();
-  this.fireEvent(new mxEventObject(mxEvent.START, "state", this.previous))
-};
-mxConnectionHandler.prototype.isConnecting = function() {
-  return null != this.first && null != this.shape
-};
-mxConnectionHandler.prototype.isValidSource = function(a) {
-  return this.graph.isValidSource(a)
-};
-mxConnectionHandler.prototype.isValidTarget = function(a) {
-  return !0
-};
-mxConnectionHandler.prototype.validateConnection = function(a, b) {
-  return !this.isValidTarget(b) ? "" : this.graph.getEdgeValidationError(null, a, b)
-};
-mxConnectionHandler.prototype.getConnectImage = function(a) {
-  return this.connectImage
-};
-mxConnectionHandler.prototype.isMoveIconToFrontForState = function(a) {
-  return null != a.text && a.text.node.parentNode == this.graph.container ? !0 : this.moveIconFront
-};
-mxConnectionHandler.prototype.createIcons = function(a) {
-  var b = this.getConnectImage(a);
-  if (null != b && null != a) {
-    this.iconState = a;
-    var c = [],
-      d = new mxRectangle(0, 0, b.width, b.height),
-      e = new mxImageShape(d, b.src, null, null, 0);
-    e.preserveImageAspect = !1;
-    this.isMoveIconToFrontForState(a) ? (e.dialect = mxConstants.DIALECT_STRICTHTML, e.init(this.graph.container)) : (e.dialect = this.graph.dialect == mxConstants.DIALECT_SVG ? mxConstants.DIALECT_SVG :
-      mxConstants.DIALECT_VML, e.init(this.graph.getView().getOverlayPane()), this.moveIconBack &&
-      null != e.node.previousSibling && e.node.parentNode.insertBefore(e.node, e.node.parentNode.firstChild));
-    e.node.style.cursor = mxConstants.CURSOR_CONNECT;
-    var f = mxUtils.bind(this, function() {
-        return null != this.currentState ? this.currentState : a
-      }),
-      b = mxUtils.bind(this, function(a) {
-        mxEvent.isConsumed(a) || (this.icon = e, this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(a, f())))
-      });
-    mxEvent.redirectMouseEvents(e.node, this.graph, f, b);
-    c.push(e);
-    this.redrawIcons(c, this.iconState);
-    return c
-  }
-  return null
-};
-mxConnectionHandler.prototype.redrawIcons = function(a, b) {
-  if (null != a && null != a[0] && null != b) {
-    var c = this.getIconPosition(a[0], b);
-    a[0].bounds.x = c.x;
-    a[0].bounds.y = c.y;
-    a[0].redraw()
-  }
-};
-mxConnectionHandler.prototype.getIconPosition = function(a, b) {
-  var c = this.graph.getView().scale,
-    d = b.getCenterX(),
-    e = b.getCenterY();
-  if (this.graph.isSwimlane(b.cell)) {
-    var f = this.graph.getStartSize(b.cell),
-      d = 0 != f.width ? b.x + f.width * c / 2 : d,
-      e = 0 != f.height ? b.y + f.height * c / 2 : e,
-      f = mxUtils.toRadians(mxUtils.getValue(b.style, mxConstants.STYLE_ROTATION) || 0);
-    if (0 != f) var c = Math.cos(f),
-      f = Math.sin(f),
-      g = new mxPoint(b.getCenterX(), b.getCenterY()),
-      e = mxUtils.getRotatedPoint(new mxPoint(d, e), c, f, g),
-      d = e.x,
-      e = e.y
-  }
-  return new mxPoint(d -
-    a.bounds.width / 2, e - a.bounds.height / 2)
-};
-mxConnectionHandler.prototype.destroyIcons = function(a) {
-  if (null != a) {
-    this.iconState = null;
-    for (var b = 0; b < a.length; b++) a[b].destroy()
-  }
-};
-mxConnectionHandler.prototype.isStartEvent = function(a) {
-  return !this.graph.isForceMarqueeEvent(a.getEvent()) && (null != this.constraintHandler.currentFocus && null != this.constraintHandler.currentConstraint || null != this.previous && null == this.error &&
-    (null == this.icons || null != this.icons && null != this.icon))
-};
-mxConnectionHandler.prototype.mouseDown = function(a, b) {
-  this.mouseDownCounter++;
-  if (this.isEnabled() && this.graph.isEnabled() && !b.isConsumed() && !this.isConnecting() && this.isStartEvent(b)) {
-    null != this.constraintHandler.currentConstraint && null != this.constraintHandler.currentFocus && null != this.constraintHandler.currentPoint ? (this.sourceConstraint = this.constraintHandler.currentConstraint,
-      this.previous = this.constraintHandler.currentFocus, this.first = this.constraintHandler.currentPoint.clone()) : this.first = new mxPoint(b.getGraphX(),
-      b.getGraphY());
-    this.edgeState = this.createEdgeState(b);
-    this.mouseDownCounter = 1;
-    this.waypointsEnabled && null == this.shape && (this.waypoints = null, this.shape = this.createShape());
-    if (null == this.previous && null != this.edgeState) {
-      var c = this.graph.getPointForEvent(b.getEvent());
-      this.edgeState.cell.geometry.setTerminalPoint(c, !0)
-    }
-    this.fireEvent(new mxEventObject(mxEvent.START, "state", this.previous));
-    b.consume()
-  } else if (mxClient.IS_TOUCH && this.tapAndHoldEnabled && !this.tapAndHoldInProgress && this.isEnabled() && this.graph.isEnabled() &&
-    !this.isConnecting()) {
-    this.tapAndHoldInProgress = !0;
-    this.initialTouchX = b.getX();
-    this.initialTouchY = b.getY();
-    var d = this.graph.view.getState(this.marker.getCell(b));
-    this.tapAndHoldThread && window.clearTimeout(this.tapAndHoldThread);
-    this.tapAndHoldThread = window.setTimeout(mxUtils.bind(this, function() {
-      this.tapAndHoldValid && this.tapAndHold(b, d);
-      this.tapAndHoldValid = this.tapAndHoldInProgress = !1
-    }), this.tapAndHoldDelay);
-    this.tapAndHoldValid = !0
-  }
-  this.selectedIcon = this.icon;
-  this.icon = null
-};
-mxConnectionHandler.prototype.tapAndHold = function(a, b) {
-  null != b && (this.marker.currentColor = this.marker.validColor, this.marker.markedState = b, this.marker.mark(), this.first = new mxPoint(a.getGraphX(), a.getGraphY()), this.edgeState = this.createEdgeState(
-    a), this.previous = b, this.fireEvent(new mxEventObject(mxEvent.START, "state", this.previous)))
-};
-mxConnectionHandler.prototype.isImmediateConnectSource = function(a) {
-  return !this.graph.isCellMovable(a.cell)
-};
-mxConnectionHandler.prototype.createEdgeState = function(a) {
-  return null
-};
-mxConnectionHandler.prototype.updateCurrentState = function(a) {
-  var b = this.marker.process(a);
-  this.constraintHandler.update(a, null == this.first);
-  this.currentState = b
-};
-mxConnectionHandler.prototype.convertWaypoint = function(a) {
-  var b = this.graph.getView().getScale(),
-    c = this.graph.getView().getTranslate();
-  a.x = a.x / b - c.x;
-  a.y = a.y / b - c.y
-};
-mxConnectionHandler.prototype.mouseMove = function(a, b) {
-  this.tapAndHoldValid && (this.tapAndHoldValid = Math.abs(this.initialTouchX - b.getX()) < this.tapAndHoldTolerance && Math.abs(this.initialTouchY - b.getY()) < this.tapAndHoldTolerance);
-  if (!b.isConsumed() && (this.ignoreMouseDown || null != this.first || !this.graph.isMouseDown)) {
-    !this.isEnabled() && null != this.currentState && (this.destroyIcons(this.icons), this.currentState = null);
-    (null != this.first || this.isEnabled() && this.graph.isEnabled()) && this.updateCurrentState(b);
-    if (null != this.first) {
-      var c = this.graph.getView().scale,
-        c = new mxPoint(this.graph.snap(b.getGraphX() / c) * c, this.graph.snap(b.getGraphY() / c) * c),
-        d = null,
-        e = c;
-      null != this.constraintHandler.currentConstraint && (null != this.constraintHandler.currentFocus && null != this.constraintHandler.currentPoint) && (d = this.constraintHandler.currentConstraint,
-        e = this.constraintHandler.currentPoint.clone());
-      var f = this.first;
-      if (null != this.selectedIcon) {
-        var g = this.selectedIcon.bounds.width,
-          h = this.selectedIcon.bounds.height;
-        null != this.currentState &&
-          this.targetConnectImage ? (g = this.getIconPosition(this.selectedIcon, this.currentState), this.selectedIcon.bounds.x = g.x, this.selectedIcon.bounds.y = g.y) : (g = new mxRectangle(b.getGraphX() +
-            this.connectIconOffset.x, b.getGraphY() + this.connectIconOffset.y, g, h), this.selectedIcon.bounds = g);
-        this.selectedIcon.redraw()
-      }
-      if (null != this.edgeState) {
-        this.edgeState.absolutePoints = [null, null != this.currentState ? null : e];
-        this.graph.view.updateFixedTerminalPoint(this.edgeState, this.previous, !0, this.sourceConstraint);
-        null != this.currentState &&
-          (null == d && (d = this.graph.getConnectionConstraint(this.edgeState, this.previous, !1)), this.edgeState.setAbsoluteTerminalPoint(null, !1), this.graph.view.updateFixedTerminalPoint(this
-            .edgeState, this.currentState, !1, d));
-        f = null;
-        if (null != this.waypoints) {
-          f = [];
-          for (e = 0; e < this.waypoints.length; e++) d = this.waypoints[e].clone(), this.convertWaypoint(d), f[e] = d
-        }
-        this.graph.view.updatePoints(this.edgeState, f, this.previous, this.currentState);
-        this.graph.view.updateFloatingTerminalPoints(this.edgeState, this.previous, this.currentState);
-        e = this.edgeState.absolutePoints[this.edgeState.absolutePoints.length - 1];
-        f = this.edgeState.absolutePoints[0]
-      } else null != this.currentState && null == this.constraintHandler.currentConstraint && (g = this.getTargetPerimeterPoint(this.currentState, b), null != g && (e = g)), null == this.sourceConstraint &&
-        null != this.previous && (g = this.getSourcePerimeterPoint(this.previous, null != this.waypoints && 0 < this.waypoints.length ? this.waypoints[0] : e, b), null != g && (f = g));
-      if (null == this.currentState && this.movePreviewAway) {
-        g = f;
-        null != this.edgeState &&
-          2 < this.edgeState.absolutePoints.length && (d = this.edgeState.absolutePoints[this.edgeState.absolutePoints.length - 2], null != d && (g = d));
-        d = e.x - g.x;
-        g = e.y - g.y;
-        h = Math.sqrt(d * d + g * g);
-        if (0 == h) return;
-        e.x -= 4 * d / h;
-        e.y -= 4 * g / h
-      }
-      if (null == this.shape && (d = Math.abs(c.x - this.first.x), g = Math.abs(c.y - this.first.y), d > this.graph.tolerance || g > this.graph.tolerance)) this.shape = this.createShape(), this.updateCurrentState(
-        b);
-      null != this.shape && (null != this.edgeState ? this.shape.points = this.edgeState.absolutePoints : (c = [f], null != this.waypoints &&
-        (c = c.concat(this.waypoints)), c.push(e), this.shape.points = c), this.drawPreview());
-      mxEvent.consume(b.getEvent());
-      b.consume()
-    } else !this.isEnabled() || !this.graph.isEnabled() ? this.constraintHandler.reset() : this.previous != this.currentState && null == this.edgeState ? (this.destroyIcons(this.icons), this.icons =
-        null, null != this.currentState && null == this.error && (this.icons = this.createIcons(this.currentState), null == this.icons && (this.currentState.setCursor(mxConstants.CURSOR_CONNECT), b
-          .consume())), this.previous = this.currentState) :
-      this.previous == this.currentState && (null != this.currentState && null == this.icons && !this.graph.isMouseDown) && b.consume();
-    null != this.constraintHandler.currentConstraint && this.marker.reset();
-    if (!this.graph.isMouseDown && null != this.currentState && null != this.icons) {
-      c = !1;
-      f = b.getSource();
-      for (e = 0; e < this.icons.length && !c; e++) c = f == this.icons[e].node || f.parentNode == this.icons[e].node;
-      c || this.updateIcons(this.currentState, this.icons, b)
-    }
-  } else this.constraintHandler.reset()
-};
-mxConnectionHandler.prototype.getTargetPerimeterPoint = function(a, b) {
-  var c = null,
-    d = a.view,
-    e = d.getPerimeterFunction(a);
-  if (null != e) {
-    var f = null != this.waypoints && 0 < this.waypoints.length ? this.waypoints[this.waypoints.length - 1] : new mxPoint(this.previous.getCenterX(), this.previous.getCenterY()),
-      d = e(d.getPerimeterBounds(a), this.edgeState, f, !1);
-    null != d && (c = d)
-  } else c = new mxPoint(a.getCenterX(), a.getCenterY());
-  return c
-};
-mxConnectionHandler.prototype.getSourcePerimeterPoint = function(a, b, c) {
-  c = null;
-  var d = a.view,
-    e = d.getPerimeterFunction(a),
-    f = new mxPoint(a.getCenterX(), a.getCenterY());
-  if (null != e) {
-    var g = mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION, 0),
-      h = -g * (Math.PI / 180);
-    0 != g && (b = mxUtils.getRotatedPoint(new mxPoint(b.x, b.y), Math.cos(h), Math.sin(h), f));
-    a = e(d.getPerimeterBounds(a), a, b, !1);
-    null != a && (0 != g && (a = mxUtils.getRotatedPoint(new mxPoint(a.x, a.y), Math.cos(-h), Math.sin(-h), f)), c = a)
-  } else c = f;
-  return c
-};
-mxConnectionHandler.prototype.updateIcons = function(a, b, c) {};
-mxConnectionHandler.prototype.isStopEvent = function(a) {
-  return null != a.getState()
-};
-mxConnectionHandler.prototype.addWaypointForEvent = function(a) {
-  var b = mxUtils.convertPoint(this.graph.container, a.getX(), a.getY()),
-    c = Math.abs(b.x - this.first.x),
-    b = Math.abs(b.y - this.first.y);
-  if (null != this.waypoints || 1 < this.mouseDownCounter && (c > this.graph.tolerance || b > this.graph.tolerance)) null == this.waypoints && (this.waypoints = []), c = this.graph.view.scale, b =
-    new mxPoint(this.graph.snap(a.getGraphX() / c) * c, this.graph.snap(a.getGraphY() / c) * c), this.waypoints.push(b)
-};
-mxConnectionHandler.prototype.mouseUp = function(a, b) {
-  if (!b.isConsumed() && this.isConnecting()) {
-    if (this.waypointsEnabled && !this.isStopEvent(b)) {
-      this.addWaypointForEvent(b);
-      b.consume();
-      return
-    }
-    if (null == this.error) {
-      var c = null != this.previous ? this.previous.cell : null,
-        d = null;
-      null != this.constraintHandler.currentConstraint && null != this.constraintHandler.currentFocus && (d = this.constraintHandler.currentFocus.cell);
-      null == d && this.marker.hasValidState() && (d = this.marker.validState.cell);
-      this.connect(c, d, b.getEvent(),
-        b.getCell())
-    } else null != this.previous && (null != this.marker.validState && this.previous.cell == this.marker.validState.cell) && this.graph.selectCellForEvent(this.marker.source, evt), 0 < this.error.length &&
-      this.graph.validationAlert(this.error);
-    this.destroyIcons(this.icons);
-    b.consume()
-  }
-  null != this.first && this.reset();
-  this.tapAndHoldValid = this.tapAndHoldInProgress = !1
-};
-mxConnectionHandler.prototype.reset = function() {
-  null != this.shape && (this.shape.destroy(), this.shape = null);
-  this.destroyIcons(this.icons);
-  this.icons = null;
-  this.marker.reset();
-  this.constraintHandler.reset();
-  this.sourceConstraint = this.error = this.previous = this.edgeState = this.selectedIcon = null;
-  this.mouseDownCounter = 0;
-  this.icon = this.first = null;
-  this.fireEvent(new mxEventObject(mxEvent.RESET))
-};
-mxConnectionHandler.prototype.drawPreview = function() {
-  var a = null == this.error;
-  this.shape.strokewidth = this.getEdgeWidth(a);
-  a = this.getEdgeColor(a);
-  this.shape.stroke = a;
-  this.shape.redraw()
-};
-mxConnectionHandler.prototype.getEdgeColor = function(a) {
-  return a ? mxConstants.VALID_COLOR : mxConstants.INVALID_COLOR
-};
-mxConnectionHandler.prototype.getEdgeWidth = function(a) {
-  return a ? 3 : 1
-};
-mxConnectionHandler.prototype.connect = function(a, b, c, d) {
-  if (null != b || this.isCreateTarget() || this.graph.allowDanglingEdges) {
-    var e = this.graph.getModel(),
-      f = null;
-    e.beginUpdate();
-    try {
-      if (null != a && (null == b && this.isCreateTarget()) && (b = this.createTargetVertex(c, a), null != b)) {
-        d = this.graph.getDropTarget([b], c, d);
-        if (null == d || !this.graph.getModel().isEdge(d)) {
-          var g = this.graph.getView().getState(d);
-          if (null != g) {
-            var h = e.getGeometry(b);
-            h.x -= g.origin.x;
-            h.y -= g.origin.y
-          }
-        } else d = this.graph.getDefaultParent();
-        this.graph.addCell(b,
-          d)
-      }
-      var k = this.graph.getDefaultParent();
-      null != a && (null != b && e.getParent(a) == e.getParent(b) && e.getParent(e.getParent(a)) != e.getRoot()) && (k = e.getParent(a), null != a.geometry && a.geometry.relative && (null != b.geometry &&
-        b.geometry.relative) && (k = e.getParent(k)));
-      h = g = null;
-      null != this.edgeState && (g = this.edgeState.cell.value, h = this.edgeState.cell.style);
-      f = this.insertEdge(k, null, g, a, b, h);
-      if (null != f) {
-        this.graph.setConnectionConstraint(f, a, !0, this.sourceConstraint);
-        this.graph.setConnectionConstraint(f, b, !1, this.constraintHandler.currentConstraint);
-        null != this.edgeState && e.setGeometry(f, this.edgeState.cell.geometry);
-        var l = e.getGeometry(f);
-        null == l && (l = new mxGeometry, l.relative = !0, e.setGeometry(f, l));
-        if (null != this.waypoints && 0 < this.waypoints.length) {
-          var m = this.graph.view.scale,
-            n = this.graph.view.translate;
-          l.points = [];
-          for (a = 0; a < this.waypoints.length; a++) {
-            var p = this.waypoints[a];
-            l.points.push(new mxPoint(p.x / m - n.x, p.y / m - n.y))
-          }
-        }
-        null == b && (p = this.graph.getPointForEvent(c, !1), p.x -= this.graph.panDx / this.graph.view.scale, p.y -= this.graph.panDy / this.graph.view.scale,
-          l.setTerminalPoint(p, !1));
-        this.fireEvent(new mxEventObject(mxEvent.CONNECT, "cell", f, "event", c, "target", d))
-      }
-    } catch (q) {
-      mxLog.show(), mxLog.debug(q.message)
-    } finally {
-      e.endUpdate()
-    }
-    this.select && this.selectCells(f, b)
-  }
-};
-mxConnectionHandler.prototype.selectCells = function(a, b) {
-  this.graph.setSelectionCell(a)
-};
-mxConnectionHandler.prototype.insertEdge = function(a, b, c, d, e, f) {
-  if (null == this.factoryMethod) return this.graph.insertEdge(a, b, c, d, e, f);
-  b = this.createEdge(c, d, e, f);
-  return b = this.graph.addEdge(b, a, d, e)
-};
-mxConnectionHandler.prototype.createTargetVertex = function(a, b) {
-  for (var c = this.graph.getCellGeometry(b); null != c && c.relative;) b = this.graph.getModel().getParent(b), c = this.graph.getCellGeometry(b);
-  var d = this.graph.cloneCells([b])[0],
-    c = this.graph.getModel().getGeometry(d);
-  if (null != c) {
-    var e = this.graph.getPointForEvent(a);
-    c.x = this.graph.snap(e.x - c.width / 2) - this.graph.panDx / this.graph.view.scale;
-    c.y = this.graph.snap(e.y - c.height / 2) - this.graph.panDy / this.graph.view.scale;
-    if (null != this.first) {
-      var f = this.graph.view.getState(b);
-      if (null != f) {
-        var g = this.getAlignmentTolerance();
-        Math.abs(this.graph.snap(this.first.x) - this.graph.snap(e.x)) <= g ? c.x = f.x : Math.abs(this.graph.snap(this.first.y) - this.graph.snap(e.y)) <= g && (c.y = f.y)
-      }
-    }
-  }
-  return d
-};
-mxConnectionHandler.prototype.getAlignmentTolerance = function() {
-  return this.graph.isGridEnabled() ? this.graph.gridSize : this.graph.tolerance
-};
-mxConnectionHandler.prototype.createEdge = function(a, b, c, d) {
-  var e = null;
-  null != this.factoryMethod && (e = this.factoryMethod(b, c, d));
-  null == e && (e = new mxCell(a || ""), e.setEdge(!0), e.setStyle(d), a = new mxGeometry, a.relative = !0, e.setGeometry(a));
-  return e
-};
-mxConnectionHandler.prototype.destroy = function() {
-  this.graph.removeMouseListener(this);
-  null != this.shape && (this.shape.destroy(), this.shape = null);
-  null != this.marker && (this.marker.destroy(), this.marker = null);
-  null != this.constraintHandler && (this.constraintHandler.destroy(), this.constraintHandler = null);
-  null != this.changeHandler && (this.graph.getModel().removeListener(this.changeHandler), this.graph.getView().removeListener(this.changeHandler), this.changeHandler = null);
-  null != this.drillHandler && (this.graph.removeListener(this.drillHandler),
-    this.graph.getView().removeListener(this.drillHandler), this.drillHandler = null)
-};
-
-function mxConstraintHandler(a) {
-  this.graph = a
-}
-mxConstraintHandler.prototype.pointImage = new mxImage(mxClient.imageBasePath + "/point.gif", 5, 5);
-mxConstraintHandler.prototype.graph = null;
-mxConstraintHandler.prototype.enabled = !0;
-mxConstraintHandler.prototype.highlightColor = mxConstants.DEFAULT_VALID_COLOR;
-mxConstraintHandler.prototype.isEnabled = function() {
-  return this.enabled
-};
-mxConstraintHandler.prototype.setEnabled = function(a) {
-  this.enabled = a
-};
-mxConstraintHandler.prototype.reset = function() {
-  if (null != this.focusIcons) {
-    for (var a = 0; a < this.focusIcons.length; a++) this.focusIcons[a].destroy();
-    this.focusIcons = null
-  }
-  null != this.focusHighlight && (this.focusHighlight.destroy(), this.focusHighlight = null);
-  this.focusPoints = this.currentFocus = this.currentPoint = this.currentFocusArea = this.currentConstraint = null
-};
-mxConstraintHandler.prototype.getTolerance = function() {
-  return this.graph.getTolerance()
-};
-mxConstraintHandler.prototype.getImageForConstraint = function(a, b, c) {
-  return this.pointImage
-};
-mxConstraintHandler.prototype.isEventIgnored = function(a, b) {
-  return !1
-};
-mxConstraintHandler.prototype.update = function(a, b) {
-  if (this.isEnabled() && !this.isEventIgnored(a)) {
-    var c = this.getTolerance(),
-      d = new mxRectangle(a.getGraphX() - c, a.getGraphY() - c, 2 * c, 2 * c),
-      e = null != a.getCell() ? this.graph.isCellConnectable(a.getCell()) : !1;
-    if (null == this.currentFocusArea || !mxUtils.intersects(this.currentFocusArea, d) || null != a.getState() && null != this.currentFocus && e)
-      if (this.currentFocusArea = null, a.getState() != this.currentFocus)
-        if (this.currentFocus = null, this.constraints = null != a.getState() && e ? this.graph.getAllConnectionConstraints(a.getState(),
-            b) : null, null != this.constraints) {
-          this.currentFocus = a.getState();
-          this.currentFocusArea = new mxRectangle(a.getState().x, a.getState().y, a.getState().width, a.getState().height);
-          if (null != this.focusIcons) {
-            for (e = 0; e < this.focusIcons.length; e++) this.focusIcons[e].destroy();
-            this.focusPoints = this.focusIcons = null
-          }
-          this.focusIcons = [];
-          this.focusPoints = [];
-          for (e = 0; e < this.constraints.length; e++) {
-            var f = this.graph.getConnectionPoint(a.getState(), this.constraints[e]),
-              g = this.getImageForConstraint(a.getState(), this.constraints[e],
-                f),
-              h = g.src,
-              g = new mxRectangle(f.x - g.width / 2, f.y - g.height / 2, g.width, g.height),
-              g = new mxImageShape(g, h);
-            g.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG;
-            g.preserveImageAspect = !1;
-            g.init(this.graph.getView().getOverlayPane());
-            null != g.node.previousSibling && g.node.parentNode.insertBefore(g.node, g.node.parentNode.firstChild);
-            h = mxUtils.bind(this, function() {
-              return null != this.currentFocus ? this.currentFocus : a.getState()
-            });
-            g.redraw();
-            mxEvent.redirectMouseEvents(g.node,
-              this.graph, h);
-            this.currentFocusArea.add(g.bounds);
-            this.focusIcons.push(g);
-            this.focusPoints.push(f)
-          }
-          this.currentFocusArea.grow(c)
-        } else if (null != this.focusIcons) {
-      null != this.focusHighlight && (this.focusHighlight.destroy(), this.focusHighlight = null);
-      for (e = 0; e < this.focusIcons.length; e++) this.focusIcons[e].destroy();
-      this.focusPoints = this.focusIcons = null
-    }
-    this.currentPoint = this.currentConstraint = null;
-    if (null != this.focusIcons && null != this.constraints && (null == a.getState() || this.currentFocus == a.getState()))
-      for (e =
-        0; e < this.focusIcons.length; e++)
-        if (mxUtils.intersects(this.focusIcons[e].bounds, d)) {
-          this.currentConstraint = this.constraints[e];
-          this.currentPoint = this.focusPoints[e];
-          c = this.focusIcons[e].bounds.clone();
-          c.grow(mxClient.IS_IE ? 3 : 2);
-          mxClient.IS_IE && (c.width -= 1, c.height -= 1);
-          null == this.focusHighlight ? (c = new mxRectangleShape(c, null, this.highlightColor, 3), c.dialect = this.graph.dialect == mxConstants.DIALECT_SVG ? mxConstants.DIALECT_SVG : mxConstants
-            .DIALECT_VML, c.init(this.graph.getView().getOverlayPane()), this.focusHighlight =
-            c, h = mxUtils.bind(this, function() {
-              return null != this.currentFocus ? this.currentFocus : a.getState()
-            }), mxEvent.redirectMouseEvents(c.node, this.graph, h)) : (this.focusHighlight.bounds = c, this.focusHighlight.redraw());
-          break
-        }
-    null == this.currentConstraint && null != this.focusHighlight && (this.focusHighlight.destroy(), this.focusHighlight = null)
-  }
-};
-mxConstraintHandler.prototype.destroy = function() {
-  this.reset()
-};
-
-function mxRubberband(a) {
-  null != a && (this.graph = a, this.graph.addMouseListener(this), this.panHandler = mxUtils.bind(this, function() {
-    this.repaint()
-  }), this.graph.addListener(mxEvent.PAN, this.panHandler), mxClient.IS_IE && mxEvent.addListener(window, "unload", mxUtils.bind(this, function() {
-    this.destroy()
-  })))
-}
-mxRubberband.prototype.defaultOpacity = 20;
-mxRubberband.prototype.enabled = !0;
-mxRubberband.prototype.div = null;
-mxRubberband.prototype.sharedDiv = null;
-mxRubberband.prototype.currentX = 0;
-mxRubberband.prototype.currentY = 0;
-mxRubberband.prototype.isEnabled = function() {
-  return this.enabled
-};
-mxRubberband.prototype.setEnabled = function(a) {
-  this.enabled = a
-};
-mxRubberband.prototype.mouseDown = function(a, b) {
-  if (!b.isConsumed() && this.isEnabled() && this.graph.isEnabled() && (this.graph.isForceMarqueeEvent(b.getEvent()) || null == b.getState())) {
-    var c = mxUtils.getOffset(this.graph.container),
-      d = mxUtils.getScrollOrigin(this.graph.container);
-    d.x -= c.x;
-    d.y -= c.y;
-    this.start(b.getX() + d.x, b.getY() + d.y);
-    if (mxClient.IS_NS && !mxClient.IS_SF && !mxClient.IS_GC) {
-      var e = this.graph.container,
-        f = function(a) {
-          a = new mxMouseEvent(a);
-          var b = mxUtils.convertPoint(e, a.getX(), a.getY());
-          a.graphX = b.x;
-          a.graphY = b.y;
-          return a
-        };
-      this.dragHandler = mxUtils.bind(this, function(a) {
-        this.mouseMove(this.graph, f(a))
-      });
-      this.dropHandler = mxUtils.bind(this, function(a) {
-        this.mouseUp(this.graph, f(a))
-      });
-      mxEvent.addListener(document, "mousemove", this.dragHandler);
-      mxEvent.addListener(document, "mouseup", this.dropHandler)
-    }
-    b.consume(!1)
-  }
-};
-mxRubberband.prototype.start = function(a, b) {
-  this.first = new mxPoint(a, b)
-};
-mxRubberband.prototype.mouseMove = function(a, b) {
-  if (!b.isConsumed() && null != this.first) {
-    var c = mxUtils.getScrollOrigin(this.graph.container),
-      d = mxUtils.getOffset(this.graph.container);
-    c.x -= d.x;
-    c.y -= d.y;
-    var d = b.getX() + c.x,
-      c = b.getY() + c.y,
-      e = this.first.x - d,
-      f = this.first.y - c,
-      g = this.graph.tolerance;
-    if (null != this.div || Math.abs(e) > g || Math.abs(f) > g) null == this.div && (this.div = this.createShape()), mxUtils.clearSelection(), this.update(d, c), b.consume()
-  }
-};
-mxRubberband.prototype.createShape = function() {
-  null == this.sharedDiv && (this.sharedDiv = document.createElement("div"), this.sharedDiv.className = "mxRubberband", mxUtils.setOpacity(this.sharedDiv, this.defaultOpacity));
-  this.graph.container.appendChild(this.sharedDiv);
-  return this.sharedDiv
-};
-mxRubberband.prototype.mouseUp = function(a, b) {
-  var c = null != this.div;
-  this.reset();
-  c && (c = new mxRectangle(this.x, this.y, this.width, this.height), this.graph.selectRegion(c, b.getEvent()), b.consume())
-};
-mxRubberband.prototype.reset = function() {
-  null != this.div && this.div.parentNode.removeChild(this.div);
-  null != this.dragHandler && (mxEvent.removeListener(document, "mousemove", this.dragHandler), this.dragHandler = null);
-  null != this.dropHandler && (mxEvent.removeListener(document, "mouseup", this.dropHandler), this.dropHandler = null);
-  this.currentY = this.currentX = 0;
-  this.div = this.first = null
-};
-mxRubberband.prototype.update = function(a, b) {
-  this.currentX = a;
-  this.currentY = b;
-  this.repaint()
-};
-mxRubberband.prototype.repaint = function() {
-  if (null != this.div) {
-    var a = this.currentX - this.graph.panDx,
-      b = this.currentY - this.graph.panDy;
-    this.x = Math.min(this.first.x, a);
-    this.y = Math.min(this.first.y, b);
-    this.width = Math.max(this.first.x, a) - this.x;
-    this.height = Math.max(this.first.y, b) - this.y;
-    a = mxClient.IS_VML ? this.graph.panDy : 0;
-    this.div.style.left = this.x + (mxClient.IS_VML ? this.graph.panDx : 0) + "px";
-    this.div.style.top = this.y + a + "px";
-    this.div.style.width = Math.max(1, this.width) + "px";
-    this.div.style.height = Math.max(1,
-      this.height) + "px"
-  }
-};
-mxRubberband.prototype.destroy = function() {
-  this.destroyed || (this.destroyed = !0, this.graph.removeMouseListener(this), this.graph.removeListener(this.panHandler), this.reset(), null != this.sharedDiv && (this.sharedDiv = null))
-};
-
-function mxVertexHandler(a) {
-  null != a && (this.state = a, this.init())
-}
-mxVertexHandler.prototype.graph = null;
-mxVertexHandler.prototype.state = null;
-mxVertexHandler.prototype.singleSizer = !1;
-mxVertexHandler.prototype.index = null;
-mxVertexHandler.prototype.allowHandleBoundsCheck = !0;
-mxVertexHandler.prototype.handleImage = null;
-mxVertexHandler.prototype.tolerance = 0;
-mxVertexHandler.prototype.rotationEnabled = !1;
-mxVertexHandler.prototype.rotationRaster = !0;
-mxVertexHandler.prototype.init = function() {
-  this.graph = this.state.view.graph;
-  this.selectionBounds = this.getSelectionBounds(this.state);
-  this.bounds = new mxRectangle(this.selectionBounds.x, this.selectionBounds.y, this.selectionBounds.width, this.selectionBounds.height);
-  this.selectionBorder = this.createSelectionShape(this.bounds);
-  this.selectionBorder.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;
-  this.selectionBorder.pointerEvents = !1;
-  this.selectionBorder.init(this.graph.getView().getOverlayPane());
-  this.graph.isCellMovable(this.state.cell) && (this.selectionBorder.node.style.cursor = mxConstants.CURSOR_MOVABLE_VERTEX);
-  mxEvent.redirectMouseEvents(this.selectionBorder.node, this.graph, this.state);
-  if (0 >= mxGraphHandler.prototype.maxCells || this.graph.getSelectionCount() < mxGraphHandler.prototype.maxCells) {
-    var a = this.graph.isCellResizable(this.state.cell);
-    this.sizers = [];
-    if (a || this.graph.isLabelMovable(this.state.cell) && 2 <= this.state.width && 2 <= this.state.height) {
-      var b = 0;
-      a && (this.singleSizer || (this.sizers.push(this.createSizer("nw-resize",
-        b++)), this.sizers.push(this.createSizer("n-resize", b++)), this.sizers.push(this.createSizer("ne-resize", b++)), this.sizers.push(this.createSizer("w-resize", b++)), this.sizers.push(
-        this.createSizer("e-resize", b++)), this.sizers.push(this.createSizer("sw-resize", b++)), this.sizers.push(this.createSizer("s-resize", b++))), this.sizers.push(this.createSizer(
-        "se-resize", b++)));
-      a = this.graph.model.getGeometry(this.state.cell);
-      null != a && (!a.relative && !this.graph.isSwimlane(this.state.cell) && this.graph.isLabelMovable(this.state.cell)) &&
-        (this.labelShape = this.createSizer(mxConstants.CURSOR_LABEL_HANDLE, mxEvent.LABEL_HANDLE, mxConstants.LABEL_HANDLE_SIZE, mxConstants.LABEL_HANDLE_FILLCOLOR), this.sizers.push(this.labelShape))
-    } else this.graph.isCellMovable(this.state.cell) && (!this.graph.isCellResizable(this.state.cell) && 2 > this.state.width && 2 > this.state.height) && (this.labelShape = this.createSizer(
-      mxConstants.CURSOR_MOVABLE_VERTEX, null, null, mxConstants.LABEL_HANDLE_FILLCOLOR), this.sizers.push(this.labelShape))
-  }
-  if (this.rotationEnabled && (0 >=
-      mxGraphHandler.prototype.maxCells || this.graph.getSelectionCount() < mxGraphHandler.prototype.maxCells)) this.rotationShape = this.createSizer("pointer", mxEvent.ROTATION_HANDLE, mxConstants
-    .HANDLE_SIZE + 3, mxConstants.HANDLE_FILLCOLOR), this.sizers.push(this.rotationShape);
-  this.redraw()
-};
-mxVertexHandler.prototype.getSelectionBounds = function(a) {
-  return new mxRectangle(Math.round(a.x), Math.round(a.y), Math.round(a.width), Math.round(a.height))
-};
-mxVertexHandler.prototype.createSelectionShape = function(a) {
-  a = new mxRectangleShape(a, null, this.getSelectionColor());
-  a.strokewidth = this.getSelectionStrokeWidth();
-  a.isDashed = this.isSelectionDashed();
-  return a
-};
-mxVertexHandler.prototype.getSelectionColor = function() {
-  return mxConstants.VERTEX_SELECTION_COLOR
-};
-mxVertexHandler.prototype.getSelectionStrokeWidth = function() {
-  return mxConstants.VERTEX_SELECTION_STROKEWIDTH
-};
-mxVertexHandler.prototype.isSelectionDashed = function() {
-  return mxConstants.VERTEX_SELECTION_DASHED
-};
-mxVertexHandler.prototype.createSizer = function(a, b, c, d) {
-  c = c || mxConstants.HANDLE_SIZE;
-  c = new mxRectangle(0, 0, c, c);
-  d = this.createSizerShape(c, b, d);
-  d.isHtmlAllowed() && null != this.state.text && this.state.text.node.parentNode == this.graph.container ? (d.bounds.height -= 1, d.bounds.width -= 1, d.dialect = mxConstants.DIALECT_STRICTHTML, d
-    .init(this.graph.container)) : (d.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG, d.init(this.graph.getView().getOverlayPane()));
-  mxEvent.redirectMouseEvents(d.node, this.graph, this.state);
-  this.graph.isEnabled() && (d.node.style.cursor = a);
-  this.isSizerVisible(b) || (d.node.style.visibility = "hidden");
-  return d
-};
-mxVertexHandler.prototype.isSizerVisible = function(a) {
-  return !0
-};
-mxVertexHandler.prototype.createSizerShape = function(a, b, c) {
-  return null != this.handleImage ? (a.width = this.handleImage.width, a.height = this.handleImage.height, new mxImageShape(a, this.handleImage.src)) : b == mxEvent.ROTATION_HANDLE ? new mxEllipse(
-    a, c || mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR) : new mxRectangleShape(a, c || mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR)
-};
-mxVertexHandler.prototype.moveSizerTo = function(a, b, c) {
-  null != a && (a.bounds.x = Math.round(b - a.bounds.width / 2), a.bounds.y = Math.round(c - a.bounds.height / 2), a.redraw())
-};
-mxVertexHandler.prototype.getHandleForEvent = function(a) {
-  if (a.isSource(this.rotationShape)) return mxEvent.ROTATION_HANDLE;
-  if (a.isSource(this.labelShape)) return mxEvent.LABEL_HANDLE;
-  if (null != this.sizers)
-    for (var b = this.tolerance, b = this.allowHandleBoundsCheck && (mxClient.IS_IE || 0 < b) ? new mxRectangle(a.getGraphX() - b, a.getGraphY() - b, 2 * b, 2 * b) : null, c = 0; c < this.sizers.length; c++)
-      if (a.isSource(this.sizers[c]) || null != b && mxUtils.intersects(this.sizers[c].bounds, b)) return c;
-  return null
-};
-mxVertexHandler.prototype.mouseDown = function(a, b) {
-  if (!b.isConsumed() && this.graph.isEnabled() && !this.graph.isForceMarqueeEvent(b.getEvent()) && (0 < this.tolerance || b.getState() == this.state)) {
-    var c = this.getHandleForEvent(b);
-    null != c && (this.start(b.getX(), b.getY(), c), b.consume())
-  }
-};
-mxVertexHandler.prototype.start = function(a, b, c) {
-  a = mxUtils.convertPoint(this.graph.container, a, b);
-  this.startX = a.x;
-  this.startY = a.y;
-  this.index = c;
-  this.selectionBorder.node.style.display = c == mxEvent.ROTATION_HANDLE ? "inline" : "none";
-  this.preview = this.createSelectionShape(this.bounds);
-  !(mxClient.IS_SVG && 0 != Number(this.state.style[mxConstants.STYLE_ROTATION] || "0")) && null != this.state.text && this.state.text.node.parentNode == this.graph.container ? (this.preview.dialect =
-      mxConstants.DIALECT_STRICTHTML, this.preview.init(this.graph.container)) :
-    (this.preview.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG, this.preview.init(this.graph.view.getOverlayPane()))
-};
-mxVertexHandler.prototype.mouseMove = function(a, b) {
-  if (!b.isConsumed() && null != this.index) {
-    var c = new mxPoint(b.getGraphX(), b.getGraphY()),
-      d = this.graph.isGridEnabledEvent(b.getEvent()),
-      e = this.graph.getView().scale;
-    if (this.index == mxEvent.LABEL_HANDLE) d && (c.x = this.graph.snap(c.x / e) * e, c.y = this.graph.snap(c.y / e) * e), this.moveSizerTo(this.sizers[this.sizers.length - 1], c.x, c.y);
-    else if (this.index == mxEvent.ROTATION_HANDLE) {
-      var f = this.state.x + this.state.width / 2 - c.x,
-        g = this.state.y + this.state.height / 2 - c.y;
-      this.currentAlpha =
-        0 != f ? 180 * Math.atan(g / f) / Math.PI + 90 : 0 > g ? 180 : 0;
-      0 < f && (this.currentAlpha -= 180);
-      this.rotationRaster && (f = c.x - this.state.getCenterX(), g = c.y - this.state.getCenterY(), f = Math.abs(Math.sqrt(f * f + g * g) - this.state.height / 2 - 20), f = Math.max(1, 5 * Math.min(
-        3, Math.max(0, Math.round(80 / Math.abs(f))))), this.currentAlpha = Math.round(this.currentAlpha / f) * f);
-      this.selectionBorder.rotation = this.currentAlpha;
-      this.selectionBorder.redraw()
-    } else {
-      var h = mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION] || "0"),
-        k = Math.cos(-h),
-        l = Math.sin(-h),
-        m = new mxPoint(this.state.getCenterX(), this.state.getCenterY()),
-        f = c.x - this.startX,
-        g = c.y - this.startY,
-        c = this.graph.view.translate,
-        n = l * f + k * g,
-        f = k * f - l * g;
-      this.bounds = this.union(this.selectionBounds, f, n, this.index, d, e, c);
-      k = Math.cos(h);
-      l = Math.sin(h);
-      g = new mxPoint(this.bounds.getCenterX(), this.bounds.getCenterY());
-      f = g.x - m.x;
-      g = g.y - m.y;
-      m = l * f + k * g - g;
-      this.bounds.x += k * f - l * g - f;
-      this.bounds.y += m;
-      this.drawPreview()
-    }
-    b.consume()
-  } else null != this.getHandleForEvent(b) && b.consume(!1)
-};
-mxVertexHandler.prototype.mouseUp = function(a, b) {
-  if (!b.isConsumed() && null != this.index && null != this.state) {
-    var c = new mxPoint(b.getGraphX(), b.getGraphY());
-    this.graph.getModel().beginUpdate();
-    try {
-      if (this.index == mxEvent.ROTATION_HANDLE) null != this.currentAlpha && this.rotateCell(this.state.cell, this.currentAlpha - (this.state.style[mxConstants.STYLE_ROTATION] || 0));
-      else {
-        var d = this.graph.isGridEnabledEvent(b.getEvent()),
-          e = mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION] || "0"),
-          f = Math.cos(-e),
-          g = Math.sin(-e),
-          h = c.x - this.startX,
-          k = c.y - this.startY,
-          c = g * h + f * k,
-          h = f * h - g * k,
-          k = c,
-          l = this.graph.view.scale;
-        this.resizeCell(this.state.cell, h / l, k / l, this.index, d)
-      }
-    } finally {
-      this.graph.getModel().endUpdate()
-    }
-    this.reset();
-    b.consume()
-  }
-};
-mxVertexHandler.prototype.rotateCell = function(a, b) {
-  var c = this.graph.getModel();
-  if (c.isVertex(a)) {
-    var d = a == this.state ? this.state : this.graph.view.getState(a);
-    null != d && this.graph.setCellStyles(mxConstants.STYLE_ROTATION, (d.style[mxConstants.STYLE_ROTATION] || 0) + b, [a]);
-    if (this.state.cell != a && (d = this.graph.getCellGeometry(a), null != d && !d.relative))
-      if (0 != b) {
-        var e = this.graph.getModel().getParent(a),
-          f = this.graph.getCellGeometry(e);
-        if (!d.relative && null != f) {
-          var g = mxUtils.toRadians(b),
-            e = Math.cos(g),
-            g = Math.sin(g),
-            h = new mxPoint(d.getCenterX(), d.getCenterY()),
-            f = new mxPoint(f.width / 2, f.height / 2),
-            e = mxUtils.getRotatedPoint(h, e, g, f),
-            d = d.clone();
-          d.x = e.x - d.width / 2;
-          d.y = e.y - d.height / 2;
-          c.setGeometry(a, d)
-        }
-      } else d = d.clone(), d.x += dx, d.y += dy, c.setGeometry(a, d);
-    d = c.getChildCount(a);
-    for (e = 0; e < d; e++) this.rotateCell(c.getChildAt(a, e), b)
-  }
-};
-mxVertexHandler.prototype.reset = function() {
-  this.index = this.currentAlpha = null;
-  null != this.preview && (this.preview.destroy(), this.preview = null);
-  null != this.selectionBorder && (this.selectionBorder.node.style.display = "inline", this.selectionBounds = this.getSelectionBounds(this.state), this.bounds = new mxRectangle(this.selectionBounds
-    .x, this.selectionBounds.y, this.selectionBounds.width, this.selectionBounds.height), this.drawPreview())
-};
-mxVertexHandler.prototype.resizeCell = function(a, b, c, d, e) {
-  var f = this.graph.model.getGeometry(a);
-  if (null != f)
-    if (d == mxEvent.LABEL_HANDLE) d = this.graph.view.scale, b = (this.labelShape.bounds.getCenterX() - this.startX) / d, c = (this.labelShape.bounds.getCenterY() - this.startY) / d, f = f.clone(),
-      null == f.offset ? f.offset = new mxPoint(b, c) : (f.offset.x += b, f.offset.y += c), this.graph.model.setGeometry(a, f);
-    else {
-      d = this.union(f, b, c, d, e, 1, new mxPoint(0, 0));
-      var g = mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION] || "0");
-      if (0 != g) {
-        b = d.getCenterX() - f.getCenterX();
-        c = d.getCenterY() - f.getCenterY();
-        e = Math.cos(g);
-        var h = Math.sin(g),
-          g = e * b - h * c - b;
-        b = h * b + e * c - c;
-        c = d.x - f.x;
-        var k = d.y - f.y,
-          l = e * c - h * k;
-        e = h * c + e * k;
-        d.x += g;
-        d.y += b;
-        if (!this.graph.isCellCollapsed(a) && (0 != g || 0 != b)) c = f.x - d.x + l, k = f.y - d.y + e, this.moveChildren(a, c, k)
-      }
-      this.graph.resizeCell(a, d)
-    }
-};
-mxVertexHandler.prototype.moveChildren = function(a, b, c) {
-  for (var d = this.graph.getModel(), e = d.getChildCount(a), f = 0; f < e; f++) {
-    var g = d.getChildAt(a, f);
-    if (d.isVertex(g)) {
-      var h = this.graph.getCellGeometry(g);
-      null != h && !h.relative && (h = h.clone(), h.x += b, h.y += c, d.setGeometry(g, h))
-    }
-  }
-};
-mxVertexHandler.prototype.union = function(a, b, c, d, e, f, g) {
-  if (this.singleSizer) {
-    g = a.x + a.width + b;
-    var h = a.y + a.height + c;
-    e && (g = this.graph.snap(g / f) * f, h = this.graph.snap(h / f) * f);
-    f = new mxRectangle(a.x, a.y, 0, 0);
-    f.add(new mxRectangle(g, h, 0, 0));
-    return f
-  }
-  var h = a.x - g.x * f,
-    k = h + a.width,
-    l = a.y - g.y * f;
-  a = l + a.height;
-  4 < d ? (a += c, e && (a = this.graph.snap(a / f) * f)) : 3 > d && (l += c, e && (l = this.graph.snap(l / f) * f));
-  if (0 == d || 3 == d || 5 == d) h += b, e && (h = this.graph.snap(h / f) * f);
-  else if (2 == d || 4 == d || 7 == d) k += b, e && (k = this.graph.snap(k / f) * f);
-  e = k - h;
-  a -=
-    l;
-  0 > e && (h += e, e = Math.abs(e));
-  0 > a && (l += a, a = Math.abs(a));
-  return new mxRectangle(h + g.x * f, l + g.y * f, e, a)
-};
-mxVertexHandler.prototype.redraw = function() {
-  this.selectionBounds = this.getSelectionBounds(this.state);
-  this.bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
-  var a = this.state;
-  if (null != this.sizers) {
-    var b = a.x + a.width,
-      c = a.y + a.height;
-    if (this.singleSizer) this.moveSizerTo(this.sizers[0], b, c);
-    else {
-      var d = a.x + a.width / 2,
-        e = a.y + a.height / 2;
-      if (1 < this.sizers.length) {
-        var f = mxUtils.toRadians(a.style[mxConstants.STYLE_ROTATION] || "0"),
-          g = Math.cos(f),
-          f = Math.sin(f),
-          h = new mxPoint(a.getCenterX(),
-            a.getCenterY()),
-          k = mxUtils.getRotatedPoint(new mxPoint(a.x, a.y), g, f, h);
-        this.moveSizerTo(this.sizers[0], k.x, k.y);
-        k.x = d;
-        k.y = a.y;
-        k = mxUtils.getRotatedPoint(k, g, f, h);
-        this.moveSizerTo(this.sizers[1], k.x, k.y);
-        k.x = b;
-        k.y = a.y;
-        k = mxUtils.getRotatedPoint(k, g, f, h);
-        this.moveSizerTo(this.sizers[2], k.x, k.y);
-        k.x = a.x;
-        k.y = e;
-        k = mxUtils.getRotatedPoint(k, g, f, h);
-        this.moveSizerTo(this.sizers[3], k.x, k.y);
-        k.x = b;
-        k.y = e;
-        k = mxUtils.getRotatedPoint(k, g, f, h);
-        this.moveSizerTo(this.sizers[4], k.x, k.y);
-        k.x = a.x;
-        k.y = c;
-        k = mxUtils.getRotatedPoint(k,
-          g, f, h);
-        this.moveSizerTo(this.sizers[5], k.x, k.y);
-        k.x = d;
-        k.y = c;
-        k = mxUtils.getRotatedPoint(k, g, f, h);
-        this.moveSizerTo(this.sizers[6], k.x, k.y);
-        k.x = b;
-        k.y = c;
-        k = mxUtils.getRotatedPoint(k, g, f, h);
-        this.moveSizerTo(this.sizers[7], k.x, k.y);
-        this.moveSizerTo(this.sizers[8], d + a.absoluteOffset.x, e + a.absoluteOffset.y)
-      } else 2 <= this.state.width && 2 <= this.state.height ? this.moveSizerTo(this.sizers[0], d + a.absoluteOffset.x, e + a.absoluteOffset.y) : this.moveSizerTo(this.sizers[0], a.x, a.y)
-    }
-  }
-  null != this.rotationShape && (f = mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION] ||
-      "0"), g = Math.cos(f), f = Math.sin(f), h = new mxPoint(this.state.getCenterX(), this.state.getCenterY()), k = mxUtils.getRotatedPoint(new mxPoint(a.x + a.width / 2, a.y - 16), g, f, h),
-    this.moveSizerTo(this.rotationShape, k.x, k.y));
-  this.selectionBorder.rotation = Number(this.state.style[mxConstants.STYLE_ROTATION] || "0");
-  this.drawPreview()
-};
-mxVertexHandler.prototype.drawPreview = function() {
-  null != this.preview && (this.preview.bounds = this.bounds, this.preview.node.parentNode == this.graph.container && (this.preview.bounds.width = Math.max(0, this.preview.bounds.width - 1), this.preview
-    .bounds.height = Math.max(0, this.preview.bounds.height - 1)), this.preview.rotation = Number(this.state.style[mxConstants.STYLE_ROTATION] || "0"), this.preview.redraw());
-  this.selectionBorder.bounds = this.bounds;
-  this.selectionBorder.redraw()
-};
-mxVertexHandler.prototype.destroy = function() {
-  null != this.preview && (this.preview.destroy(), this.preview = null);
-  this.selectionBorder.destroy();
-  this.labelShape = this.selectionBorder = null;
-  if (null != this.sizers)
-    for (var a = 0; a < this.sizers.length; a++) this.sizers[a].destroy(), this.sizers[a] = null
-};
-
-function mxEdgeHandler(a) {
-  null != a && (this.state = a, this.init())
-}
-mxEdgeHandler.prototype.graph = null;
-mxEdgeHandler.prototype.state = null;
-mxEdgeHandler.prototype.marker = null;
-mxEdgeHandler.prototype.constraintHandler = null;
-mxEdgeHandler.prototype.error = null;
-mxEdgeHandler.prototype.shape = null;
-mxEdgeHandler.prototype.bends = null;
-mxEdgeHandler.prototype.labelShape = null;
-mxEdgeHandler.prototype.cloneEnabled = !0;
-mxEdgeHandler.prototype.addEnabled = !1;
-mxEdgeHandler.prototype.removeEnabled = !1;
-mxEdgeHandler.prototype.preferHtml = !1;
-mxEdgeHandler.prototype.allowHandleBoundsCheck = !0;
-mxEdgeHandler.prototype.snapToTerminals = !1;
-mxEdgeHandler.prototype.handleImage = null;
-mxEdgeHandler.prototype.tolerance = 0;
-mxEdgeHandler.prototype.init = function() {
-  this.graph = this.state.view.graph;
-  this.marker = this.createMarker();
-  this.constraintHandler = new mxConstraintHandler(this.graph);
-  this.points = [];
-  this.abspoints = this.getSelectionPoints(this.state);
-  this.shape = this.createSelectionShape(this.abspoints);
-  this.shape.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG;
-  this.shape.init(this.graph.getView().getOverlayPane());
-  this.shape.svgStrokeTolerance = 0;
-  this.shape.node.style.cursor =
-    mxConstants.CURSOR_MOVABLE_EDGE;
-  mxEvent.addListener(this.shape.node, "dblclick", mxUtils.bind(this, function(a) {
-    this.graph.dblClick(a, this.state.cell)
-  }));
-  mxEvent.addGestureListeners(this.shape.node, mxUtils.bind(this, function(a) {
-    this.addEnabled && this.isAddPointEvent(a) ? this.addPoint(this.state, a) : this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(a, this.state))
-  }), mxUtils.bind(this, function(a) {
-    var c = this.state.cell;
-    if (null != this.index) {
-      var d = mxUtils.convertPoint(this.graph.container, mxEvent.getClientX(a),
-          mxEvent.getClientY(a)),
-        c = this.graph.getCellAt(d.x, d.y);
-      this.graph.isSwimlane(c) && this.graph.hitsSwimlaneContent(c, d.x, d.y) && (c = null)
-    }
-    this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(a, this.graph.getView().getState(c)))
-  }), mxUtils.bind(this, function(a) {
-    this.graph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(a, this.state))
-  }));
-  this.preferHtml = null != this.state.text && this.state.text.node.parentNode == this.graph.container;
-  if (!this.preferHtml) {
-    var a = this.state.getVisibleTerminalState(!0);
-    null != a && (this.preferHtml = null != a.text && a.text.node.parentNode == this.graph.container);
-    this.preferHtml || (a = this.state.getVisibleTerminalState(!1), null != a && (this.preferHtml = null != a.text && a.text.node.parentNode == this.graph.container))
-  }
-  if (this.graph.getSelectionCount() < mxGraphHandler.prototype.maxCells || 0 >= mxGraphHandler.prototype.maxCells) this.bends = this.createBends();
-  this.label = new mxPoint(this.state.absoluteOffset.x, this.state.absoluteOffset.y);
-  this.labelShape = new mxRectangleShape(new mxRectangle,
-    mxConstants.LABEL_HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);
-  this.labelShape.pointerEvents = !1;
-  this.initBend(this.labelShape);
-  this.labelShape.node.style.cursor = mxConstants.CURSOR_LABEL_HANDLE;
-  mxEvent.redirectMouseEvents(this.labelShape.node, this.graph, this.state);
-  this.redraw()
-};
-mxEdgeHandler.prototype.isAddPointEvent = function(a) {
-  return mxEvent.isShiftDown(a)
-};
-mxEdgeHandler.prototype.isRemovePointEvent = function(a) {
-  return mxEvent.isShiftDown(a)
-};
-mxEdgeHandler.prototype.getSelectionPoints = function(a) {
-  return a.absolutePoints
-};
-mxEdgeHandler.prototype.createSelectionShape = function(a) {
-  a = new mxPolyline(a, this.getSelectionColor());
-  a.strokewidth = this.getSelectionStrokeWidth();
-  a.isDashed = this.isSelectionDashed();
-  return a
-};
-mxEdgeHandler.prototype.getSelectionColor = function() {
-  return mxConstants.EDGE_SELECTION_COLOR
-};
-mxEdgeHandler.prototype.getSelectionStrokeWidth = function() {
-  return mxConstants.EDGE_SELECTION_STROKEWIDTH
-};
-mxEdgeHandler.prototype.isSelectionDashed = function() {
-  return mxConstants.EDGE_SELECTION_DASHED
-};
-mxEdgeHandler.prototype.isConnectableCell = function(a) {
-  return !0
-};
-mxEdgeHandler.prototype.createMarker = function() {
-  var a = new mxCellMarker(this.graph),
-    b = this;
-  a.getCell = function(a) {
-    var d = mxCellMarker.prototype.getCell.apply(this, arguments);
-    if (!b.isConnectableCell(d)) return null;
-    var e = b.graph.getModel();
-    if (d == b.state.cell || null != d && !b.graph.connectableEdges && e.isEdge(d)) d = null;
-    return d
-  };
-  a.isValidState = function(a) {
-    var d = b.graph.getModel(),
-      d = b.graph.view.getTerminalPort(a, b.graph.view.getState(d.getTerminal(b.state.cell, !b.isSource)), !b.isSource),
-      d = null != d ? d.cell : null;
-    b.error = b.validateConnection(b.isSource ? a.cell : d, b.isSource ? d : a.cell);
-    return null == b.error
-  };
-  return a
-};
-mxEdgeHandler.prototype.validateConnection = function(a, b) {
-  return this.graph.getEdgeValidationError(this.state.cell, a, b)
-};
-mxEdgeHandler.prototype.createBends = function() {
-  for (var a = this.state.cell, b = [], c = 0; c < this.abspoints.length; c++)
-    if (this.isHandleVisible(c)) {
-      var d = c == this.abspoints.length - 1;
-      if ((d = 0 == c || d) || this.graph.isCellBendable(a)) {
-        var e = this.createHandleShape(c);
-        this.initBend(e);
-        mxClient.IS_TOUCH && e.node.setAttribute("pointer-events", "none");
-        if (this.isHandleEnabled(c))
-          if (mxClient.IS_TOUCH) {
-            var f = mxUtils.bind(this, function(a) {
-              a = mxUtils.convertPoint(this.graph.container, mxEvent.getClientX(a), mxEvent.getClientY(a));
-              return this.graph.view.getState(this.graph.getCellAt(a.x, a.y))
-            });
-            mxEvent.redirectMouseEvents(e.node, this.graph, f)
-          } else e.node.style.cursor = mxConstants.CURSOR_BEND_HANDLE, mxEvent.redirectMouseEvents(e.node, this.graph, this.state);
-        b.push(e);
-        d || (this.points.push(new mxPoint(0, 0)), e.node.style.visibility = "hidden")
-      }
-    }
-  return b
-};
-mxEdgeHandler.prototype.isHandleEnabled = function(a) {
-  return !0
-};
-mxEdgeHandler.prototype.isHandleVisible = function(a) {
-  return !0
-};
-mxEdgeHandler.prototype.createHandleShape = function(a) {
-  if (null != this.handleImage) return new mxImageShape(new mxRectangle(0, 0, this.handleImage.width, this.handleImage.height), this.handleImage.src);
-  a = mxConstants.HANDLE_SIZE;
-  this.preferHtml && (a -= 1);
-  return new mxRectangleShape(new mxRectangle(0, 0, a, a), mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR)
-};
-mxEdgeHandler.prototype.initBend = function(a) {
-  this.preferHtml ? (a.dialect = mxConstants.DIALECT_STRICTHTML, a.init(this.graph.container)) : (a.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_MIXEDHTML :
-    mxConstants.DIALECT_SVG, a.init(this.graph.getView().getOverlayPane()))
-};
-mxEdgeHandler.prototype.getHandleForEvent = function(a) {
-  if (null != this.bends)
-    for (var b = this.tolerance, b = this.allowHandleBoundsCheck && (mxClient.IS_IE || 0 < b) ? new mxRectangle(a.getGraphX() - b, a.getGraphY() - b, 2 * b, 2 * b) : null, c = 0; c < this.bends.length; c++)
-      if ((a.isSource(this.bends[c]) || null != b && mxUtils.intersects(this.bends[c].bounds, b)) && "hidden" != this.bends[c].node.style.visibility) return c;
-  if (a.isSource(this.labelShape) && "hidden" != this.labelShape.node.style.visibility || a.isSource(this.state.text))
-    if (!mxClient.IS_SF &&
-      !mxClient.IS_GC || "SELECT" != a.getSource().nodeName) return mxEvent.LABEL_HANDLE;
-  return null
-};
-mxEdgeHandler.prototype.mouseDown = function(a, b) {
-  var c = null,
-    c = this.getHandleForEvent(b);
-  null != c && (!b.isConsumed() && this.graph.isEnabled() && !this.graph.isForceMarqueeEvent(b.getEvent())) && (this.removeEnabled && this.isRemovePointEvent(b.getEvent()) ? this.removePoint(this.state,
-    c) : (c != mxEvent.LABEL_HANDLE || this.graph.isLabelMovable(b.getCell())) && this.start(b.getX(), b.getY(), c), b.consume())
-};
-mxEdgeHandler.prototype.start = function(a, b, c) {
-  this.startX = a;
-  this.startY = b;
-  this.isSource = null == this.bends ? !1 : 0 == c;
-  this.isTarget = null == this.bends ? !1 : c == this.bends.length - 1;
-  this.isLabel = c == mxEvent.LABEL_HANDLE;
-  if (this.isSource || this.isTarget) {
-    if (a = this.state.cell, b = this.graph.model.getTerminal(a, this.isSource), null == b && this.graph.isTerminalPointMovable(a, this.isSource) || null != b && this.graph.isCellDisconnectable(a,
-        b, this.isSource)) this.index = c
-  } else this.index = c
-};
-mxEdgeHandler.prototype.clonePreviewState = function(a, b) {
-  return this.state.clone()
-};
-mxEdgeHandler.prototype.getSnapToTerminalTolerance = function() {
-  return this.graph.gridSize * this.graph.view.scale / 2
-};
-mxEdgeHandler.prototype.getPointForEvent = function(a) {
-  var b = new mxPoint(a.getGraphX(), a.getGraphY()),
-    c = this.getSnapToTerminalTolerance(),
-    d = this.graph.getView(),
-    e = !1,
-    f = !1;
-  if (this.snapToTerminals && 0 < c) {
-    var g = function(a) {
-        if (null != a) {
-          var d = a.x;
-          Math.abs(b.x - d) < c && (b.x = d, e = !0);
-          a = a.y;
-          Math.abs(b.y - a) < c && (b.y = a, f = !0)
-        }
-      },
-      h = function(a) {
-        null != a && g.call(this, new mxPoint(d.getRoutingCenterX(a), d.getRoutingCenterY(a)))
-      };
-    h.call(this, this.state.getVisibleTerminalState(!0));
-    h.call(this, this.state.getVisibleTerminalState(!1));
-    if (null != this.abspoints)
-      for (h = 0; h < this.abspoints; h++) h != this.index && g.call(this, this.abspoints[h])
-  }
-  this.graph.isGridEnabledEvent(a.getEvent()) && (a = d.scale, h = d.translate, e || (b.x = (this.graph.snap(b.x / a - h.x) + h.x) * a), f || (b.y = (this.graph.snap(b.y / a - h.y) + h.y) * a));
-  return b
-};
-mxEdgeHandler.prototype.getPreviewTerminalState = function(a) {
-  this.constraintHandler.update(a, this.isSource);
-  this.marker.process(a);
-  a = this.marker.getValidState();
-  var b = null;
-  null != this.constraintHandler.currentFocus && null != this.constraintHandler.currentConstraint && this.marker.reset();
-  null != a ? b = a : null != this.constraintHandler.currentConstraint && null != this.constraintHandler.currentFocus && (b = this.constraintHandler.currentFocus);
-  return b
-};
-mxEdgeHandler.prototype.getPreviewPoints = function(a) {
-  var b = this.graph.getCellGeometry(this.state.cell),
-    b = null != b.points ? b.points.slice() : null;
-  !this.isSource && !this.isTarget ? (this.convertPoint(a, !1), null == b ? b = [a] : b[this.index - 1] = a) : this.graph.resetEdgesOnConnect && (b = null);
-  return b
-};
-mxEdgeHandler.prototype.updatePreviewState = function(a, b, c) {
-  var d = this.isSource ? c : this.state.getVisibleTerminalState(!0),
-    e = this.isTarget ? c : this.state.getVisibleTerminalState(!1),
-    f = this.graph.getConnectionConstraint(a, d, !0),
-    g = this.graph.getConnectionConstraint(a, e, !1),
-    h = this.constraintHandler.currentConstraint;
-  null == h && (h = new mxConnectionConstraint);
-  this.isSource ? f = h : this.isTarget && (g = h);
-  (!this.isSource || null != d) && a.view.updateFixedTerminalPoint(a, d, !0, f);
-  (!this.isTarget || null != e) && a.view.updateFixedTerminalPoint(a,
-    e, !1, g);
-  if ((this.isSource || this.isTarget) && null == c) a.setAbsoluteTerminalPoint(b, this.isSource), null == this.marker.getMarkedState() && (this.error = this.graph.allowDanglingEdges ? null : "");
-  a.view.updatePoints(a, this.points, d, e);
-  a.view.updateFloatingTerminalPoints(a, d, e)
-};
-mxEdgeHandler.prototype.mouseMove = function(a, b) {
-  if (null != this.index && null != this.marker) {
-    var c = this.getPointForEvent(b);
-    if (this.isLabel) this.label.x = c.x, this.label.y = c.y;
-    else {
-      this.points = this.getPreviewPoints(c);
-      var d = this.isSource || this.isTarget ? this.getPreviewTerminalState(b) : null,
-        e = this.clonePreviewState(c, null != d ? d.cell : null);
-      this.updatePreviewState(e, c, d);
-      this.setPreviewColor(null == this.error ? this.marker.validColor : this.marker.invalidColor);
-      this.abspoints = e.absolutePoints;
-      this.active = !0
-    }
-    this.drawPreview();
-    mxEvent.consume(b.getEvent());
-    b.consume()
-  } else mxClient.IS_IE && null != this.getHandleForEvent(b) && b.consume(!1)
-};
-mxEdgeHandler.prototype.mouseUp = function(a, b) {
-  if (null != this.index && null != this.marker) {
-    var c = this.state.cell;
-    if (b.getX() != this.startX || b.getY() != this.startY)
-      if (null != this.error) 0 < this.error.length && this.graph.validationAlert(this.error);
-      else if (this.isLabel) this.moveLabel(this.state, this.label.x, this.label.y);
-    else if (this.isSource || this.isTarget) {
-      var d = null;
-      null != this.constraintHandler.currentConstraint && null != this.constraintHandler.currentFocus && (d = this.constraintHandler.currentFocus.cell);
-      null ==
-        d && this.marker.hasValidState() && (d = this.marker.validState.cell);
-      if (null != d) c = this.connect(c, d, this.isSource, this.graph.isCloneEvent(b.getEvent()) && this.cloneEnabled && this.graph.isCellsCloneable(), b);
-      else if (this.graph.isAllowDanglingEdges()) {
-        d = this.abspoints[this.isSource ? 0 : this.abspoints.length - 1];
-        d.x = d.x / this.graph.view.scale - this.graph.view.translate.x;
-        d.y = d.y / this.graph.view.scale - this.graph.view.translate.y;
-        var e = this.graph.getView().getState(this.graph.getModel().getParent(c));
-        null != e && (d.x -=
-          e.origin.x, d.y -= e.origin.y);
-        d.x -= this.graph.panDx / this.graph.view.scale;
-        d.y -= this.graph.panDy / this.graph.view.scale;
-        this.changeTerminalPoint(c, d, this.isSource)
-      }
-    } else this.active ? this.changePoints(c, this.points) : (this.graph.getView().invalidate(this.state.cell), this.graph.getView().revalidate(this.state.cell));
-    null != this.marker && (this.reset(), c != this.state.cell && this.graph.setSelectionCell(c));
-    b.consume()
-  }
-};
-mxEdgeHandler.prototype.reset = function() {
-  this.points = this.label = this.index = this.error = null;
-  this.isTarget = this.isSource = this.isLabel = this.active = !1;
-  this.marker.reset();
-  this.constraintHandler.reset();
-  this.setPreviewColor(mxConstants.EDGE_SELECTION_COLOR);
-  this.redraw()
-};
-mxEdgeHandler.prototype.setPreviewColor = function(a) {
-  null != this.shape && (this.shape.stroke = a)
-};
-mxEdgeHandler.prototype.convertPoint = function(a, b) {
-  var c = this.graph.getView().getScale(),
-    d = this.graph.getView().getTranslate();
-  b && (a.x = this.graph.snap(a.x), a.y = this.graph.snap(a.y));
-  a.x = Math.round(a.x / c - d.x);
-  a.y = Math.round(a.y / c - d.y);
-  c = this.graph.getView().getState(this.graph.getModel().getParent(this.state.cell));
-  null != c && (a.x -= c.origin.x, a.y -= c.origin.y);
-  return a
-};
-mxEdgeHandler.prototype.moveLabel = function(a, b, c) {
-  var d = this.graph.getModel(),
-    e = d.getGeometry(a.cell);
-  if (null != e) {
-    var e = e.clone(),
-      f = this.graph.getView().getRelativePoint(a, b, c);
-    e.x = f.x;
-    e.y = f.y;
-    var g = this.graph.getView().scale;
-    e.offset = new mxPoint(0, 0);
-    f = this.graph.view.getPoint(a, e);
-    e.offset = new mxPoint((b - f.x) / g, (c - f.y) / g);
-    d.setGeometry(a.cell, e)
-  }
-};
-mxEdgeHandler.prototype.connect = function(a, b, c, d, e) {
-  e = this.graph.getModel();
-  var f = e.getParent(a);
-  e.beginUpdate();
-  try {
-    if (d) {
-      var g = a.clone();
-      e.add(f, g, e.getChildCount(f));
-      var h = e.getTerminal(a, !c);
-      this.graph.connectCell(g, h, !c);
-      a = g
-    }
-    var k = this.constraintHandler.currentConstraint;
-    null == k && (k = new mxConnectionConstraint);
-    this.graph.connectCell(a, b, c, k)
-  } finally {
-    e.endUpdate()
-  }
-  return a
-};
-mxEdgeHandler.prototype.changeTerminalPoint = function(a, b, c) {
-  var d = this.graph.getModel(),
-    e = d.getGeometry(a);
-  if (null != e) {
-    d.beginUpdate();
-    try {
-      e = e.clone(), e.setTerminalPoint(b, c), d.setGeometry(a, e), this.graph.connectCell(a, null, c, new mxConnectionConstraint)
-    } finally {
-      d.endUpdate()
-    }
-  }
-};
-mxEdgeHandler.prototype.changePoints = function(a, b) {
-  var c = this.graph.getModel(),
-    d = c.getGeometry(a);
-  null != d && (d = d.clone(), d.points = b, c.setGeometry(a, d))
-};
-mxEdgeHandler.prototype.addPoint = function(a, b) {
-  var c = mxUtils.convertPoint(this.graph.container, mxEvent.getClientX(b), mxEvent.getClientY(b)),
-    d = this.graph.isGridEnabledEvent(b);
-  this.convertPoint(c, d);
-  this.addPointAt(a, c.x, c.y);
-  mxEvent.consume(b)
-};
-mxEdgeHandler.prototype.addPointAt = function(a, b, c) {
-  var d = this.graph.getCellGeometry(a.cell);
-  b = new mxPoint(b, c);
-  if (null != d) {
-    d = d.clone();
-    c = this.graph.view.translate;
-    var e = this.graph.view.scale;
-    c = mxUtils.findNearestSegment(a, (b.x + c.x) * e, (b.y + c.y) * e);
-    null == d.points ? d.points = [b] : d.points.splice(c, 0, b);
-    this.graph.getModel().setGeometry(a.cell, d);
-    this.destroy();
-    this.init()
-  }
-};
-mxEdgeHandler.prototype.removePoint = function(a, b) {
-  if (0 < b && b < this.abspoints.length - 1) {
-    var c = this.graph.getCellGeometry(this.state.cell);
-    null != c && null != c.points && (c = c.clone(), c.points.splice(b - 1, 1), this.graph.getModel().setGeometry(a.cell, c), this.destroy(), this.init())
-  }
-};
-mxEdgeHandler.prototype.getHandleFillColor = function(a) {
-  a = 0 == a;
-  var b = this.state.cell,
-    c = this.graph.getModel().getTerminal(b, a),
-    d = mxConstants.HANDLE_FILLCOLOR;
-  null != c && !this.graph.isCellDisconnectable(b, c, a) || null == c && !this.graph.isTerminalPointMovable(b, a) ? d = mxConstants.LOCKED_HANDLE_FILLCOLOR : null != c && this.graph.isCellDisconnectable(
-    b, c, a) && (d = mxConstants.CONNECT_HANDLE_FILLCOLOR);
-  return d
-};
-mxEdgeHandler.prototype.redraw = function() {
-  this.abspoints = this.state.absolutePoints.slice();
-  var a = this.state.cell,
-    b = mxConstants.LABEL_HANDLE_SIZE;
-  this.label = new mxPoint(this.state.absoluteOffset.x, this.state.absoluteOffset.y);
-  this.labelShape.bounds = new mxRectangle(Math.round(this.label.x - b / 2), Math.round(this.label.y - b / 2), b, b);
-  this.labelShape.redraw();
-  b = this.graph.getLabel(a);
-  null != b && 0 < b.length && this.graph.isLabelMovable(a) ? this.labelShape.node.style.visibility = "visible" : this.labelShape.node.style.visibility =
-    "hidden";
-  if (null != this.bends && 0 < this.bends.length) {
-    var c = this.abspoints.length - 1,
-      a = this.abspoints[0],
-      d = this.abspoints[0].y,
-      b = this.bends[0].bounds;
-    this.bends[0].bounds = new mxRectangle(Math.round(this.abspoints[0].x - b.width / 2), Math.round(d - b.height / 2), b.width, b.height);
-    this.bends[0].fill = this.getHandleFillColor(0);
-    this.bends[0].redraw();
-    var d = this.abspoints[c],
-      e = this.abspoints[c].x,
-      c = this.abspoints[c].y,
-      f = this.bends.length - 1,
-      b = this.bends[f].bounds;
-    this.bends[f].bounds = new mxRectangle(Math.round(e - b.width /
-      2), Math.round(c - b.height / 2), b.width, b.height);
-    this.bends[f].fill = this.getHandleFillColor(f);
-    this.bends[f].redraw();
-    this.redrawInnerBends(a, d)
-  }
-  this.drawPreview()
-};
-mxEdgeHandler.prototype.redrawInnerBends = function(a, b) {
-  var c = this.graph.getModel().getGeometry(this.state.cell).points;
-  if (null != c) {
-    null == this.points && (this.points = []);
-    for (var d = 1; d < this.bends.length - 1; d++)
-      if (null != this.bends[d])
-        if (null != this.abspoints[d]) {
-          var e = this.abspoints[d].x,
-            f = this.abspoints[d].y,
-            g = this.bends[d].bounds;
-          this.bends[d].node.style.visibility = "visible";
-          this.bends[d].bounds = new mxRectangle(Math.round(e - g.width / 2), Math.round(f - g.height / 2), g.width, g.height);
-          this.bends[d].redraw();
-          this.points[d -
-            1] = c[d - 1]
-        } else this.bends[d].destroy(), this.bends[d] = null
-  }
-};
-mxEdgeHandler.prototype.drawPreview = function() {
-  if (this.isLabel) {
-    var a = mxConstants.LABEL_HANDLE_SIZE,
-      a = new mxRectangle(Math.round(this.label.x - a / 2), Math.round(this.label.y - a / 2), a, a);
-    this.labelShape.bounds = a;
-    this.labelShape.redraw()
-  } else this.shape.points = this.abspoints, this.shape.redraw()
-};
-mxEdgeHandler.prototype.destroy = function() {
-  null != this.marker && (this.marker.destroy(), this.marker = null);
-  null != this.shape && (this.shape.destroy(), this.shape = null);
-  null != this.labelShape && (this.labelShape.destroy(), this.labelShape = null);
-  null != this.constraintHandler && (this.constraintHandler.destroy(), this.constraintHandler = null);
-  if (null != this.bends)
-    for (var a = 0; a < this.bends.length; a++) null != this.bends[a] && (this.bends[a].destroy(), this.bends[a] = null)
-};
-
-function mxElbowEdgeHandler(a) {
-  mxEdgeHandler.call(this, a)
-}
-mxUtils.extend(mxElbowEdgeHandler, mxEdgeHandler);
-mxElbowEdgeHandler.prototype = new mxEdgeHandler;
-mxElbowEdgeHandler.prototype.constructor = mxElbowEdgeHandler;
-mxElbowEdgeHandler.prototype.flipEnabled = !0;
-mxElbowEdgeHandler.prototype.doubleClickOrientationResource = "none" != mxClient.language ? "doubleClickOrientation" : "";
-mxElbowEdgeHandler.prototype.createBends = function() {
-  var a = [],
-    b = this.createHandleShape(0);
-  this.initBend(b);
-  b.node.style.cursor = mxConstants.CURSOR_BEND_HANDLE;
-  mxEvent.redirectMouseEvents(b.node, this.graph, this.state);
-  a.push(b);
-  mxClient.IS_TOUCH && b.node.setAttribute("pointer-events", "none");
-  a.push(this.createVirtualBend());
-  this.points.push(new mxPoint(0, 0));
-  b = this.createHandleShape(2);
-  this.initBend(b);
-  b.node.style.cursor = mxConstants.CURSOR_BEND_HANDLE;
-  mxEvent.redirectMouseEvents(b.node, this.graph, this.state);
-  a.push(b);
-  mxClient.IS_TOUCH && b.node.setAttribute("pointer-events", "none");
-  return a
-};
-mxElbowEdgeHandler.prototype.createVirtualBend = function() {
-  var a = this.createHandleShape();
-  this.initBend(a);
-  var b = this.getCursorForBend();
-  a.node.style.cursor = b;
-  b = mxUtils.bind(this, function(a) {
-    !mxEvent.isConsumed(a) && this.flipEnabled && (this.graph.flipEdge(this.state.cell, a), mxEvent.consume(a))
-  });
-  mxEvent.redirectMouseEvents(a.node, this.graph, this.state, null, null, null, b);
-  this.graph.isCellBendable(this.state.cell) || (a.node.style.display = "none");
-  return a
-};
-mxElbowEdgeHandler.prototype.getCursorForBend = function() {
-  return this.state.style[mxConstants.STYLE_EDGE] == mxEdgeStyle.TopToBottom || this.state.style[mxConstants.STYLE_EDGE] == mxConstants.EDGESTYLE_TOPTOBOTTOM || (this.state.style[mxConstants.STYLE_EDGE] ==
-      mxEdgeStyle.ElbowConnector || this.state.style[mxConstants.STYLE_EDGE] == mxConstants.EDGESTYLE_ELBOW) && this.state.style[mxConstants.STYLE_ELBOW] == mxConstants.ELBOW_VERTICAL ?
-    "row-resize" : "col-resize"
-};
-mxElbowEdgeHandler.prototype.getTooltipForNode = function(a) {
-  var b = null;
-  if (null != this.bends && null != this.bends[1] && (a == this.bends[1].node || a.parentNode == this.bends[1].node)) b = this.doubleClickOrientationResource, b = mxResources.get(b) || b;
-  return b
-};
-mxElbowEdgeHandler.prototype.convertPoint = function(a, b) {
-  var c = this.graph.getView().getScale(),
-    d = this.graph.getView().getTranslate(),
-    e = this.state.origin;
-  b && (a.x = this.graph.snap(a.x), a.y = this.graph.snap(a.y));
-  a.x = Math.round(a.x / c - d.x - e.x);
-  a.y = Math.round(a.y / c - d.y - e.y)
-};
-mxElbowEdgeHandler.prototype.redrawInnerBends = function(a, b) {
-  var c = this.graph.getModel().getGeometry(this.state.cell).points,
-    c = null != c ? c[0] : null,
-    c = null == c ? new mxPoint(a.x + (b.x - a.x) / 2, a.y + (b.y - a.y) / 2) : new mxPoint(this.graph.getView().scale * (c.x + this.graph.getView().translate.x + this.state.origin.x), this.graph.getView()
-      .scale * (c.y + this.graph.getView().translate.y + this.state.origin.y)),
-    d = this.bends[1].bounds,
-    e = d.width,
-    d = d.height;
-  null == this.handleImage && (d = e = mxConstants.HANDLE_SIZE);
-  var f = new mxRectangle(Math.round(c.x -
-    e / 2), Math.round(c.y - d / 2), e, d);
-  null == this.handleImage && ("hidden" != this.labelShape.node.style.visibility && mxUtils.intersects(f, this.labelShape.bounds)) && (e += 3, d += 3, f = new mxRectangle(Math.round(c.x - e / 2),
-    Math.round(c.y - d / 2), e, d));
-  this.bends[1].bounds = f;
-  this.bends[1].redraw()
-};
-
-function mxEdgeSegmentHandler(a) {
-  mxEdgeHandler.call(this, a)
-}
-mxUtils.extend(mxEdgeSegmentHandler, mxEdgeHandler);
-mxEdgeSegmentHandler.prototype = new mxElbowEdgeHandler;
-mxEdgeSegmentHandler.prototype.constructor = mxEdgeSegmentHandler;
-mxEdgeSegmentHandler.prototype.getPreviewPoints = function(a) {
-  if (this.isSource || this.isTarget) return mxElbowEdgeHandler.prototype.getPreviewPoints.apply(this, arguments);
-  this.convertPoint(a, !1);
-  var b = this.state.absolutePoints,
-    c = b[0].clone();
-  this.convertPoint(c, !1);
-  for (var d = [], e = 1; e < b.length; e++) {
-    var f = b[e].clone();
-    this.convertPoint(f, !1);
-    e == this.index && (c.x == f.x ? (c.x = a.x, f.x = a.x) : (c.y = a.y, f.y = a.y));
-    e < b.length - 1 && d.push(f);
-    c = f
-  }
-  if (1 == d.length) {
-    if (c = this.state.view, e = this.state.getVisibleTerminalState(!0),
-      f = this.state.getVisibleTerminalState(!1), null != f & null != e) {
-      var g = this.state.origin.x,
-        h = this.state.origin.y;
-      mxUtils.contains(f, d[0].x + g, d[0].y + h) ? b[1].y == b[2].y ? d[0].y = c.getRoutingCenterY(e) - h : d[0].x = c.getRoutingCenterX(e) - g : mxUtils.contains(e, d[0].x + g, d[0].y + h) && (b[
-        1].y == b[0].y ? d[0].y = c.getRoutingCenterY(f) - h : d[0].x = c.getRoutingCenterX(f) - g)
-    }
-  } else 0 == d.length && (d = [a]);
-  return d
-};
-mxEdgeSegmentHandler.prototype.createBends = function() {
-  var a = [],
-    b = this.createHandleShape(0);
-  this.initBend(b);
-  b.node.style.cursor = mxConstants.CURSOR_BEND_HANDLE;
-  mxEvent.redirectMouseEvents(b.node, this.graph, this.state);
-  a.push(b);
-  mxClient.IS_TOUCH && b.node.setAttribute("pointer-events", "none");
-  var c = this.state.absolutePoints;
-  if (this.graph.isCellBendable(this.state.cell)) {
-    null == this.points && (this.points = []);
-    for (var d = 0; d < c.length - 1; d++) b = this.createVirtualBend(), a.push(b), b.node.style.cursor = 0 == c[d].x -
-      c[d + 1].x ? "col-resize" : "row-resize", this.points.push(new mxPoint(0, 0)), mxClient.IS_TOUCH && b.node.setAttribute("pointer-events", "none")
-  }
-  b = this.createHandleShape(c.length);
-  this.initBend(b);
-  b.node.style.cursor = mxConstants.CURSOR_BEND_HANDLE;
-  mxEvent.redirectMouseEvents(b.node, this.graph, this.state);
-  a.push(b);
-  mxClient.IS_TOUCH && b.node.setAttribute("pointer-events", "none");
-  return a
-};
-mxEdgeSegmentHandler.prototype.redraw = function() {
-  this.refresh();
-  mxEdgeHandler.prototype.redraw.apply(this, arguments)
-};
-mxEdgeSegmentHandler.prototype.refresh = function() {
-  if (null != this.bends) {
-    for (var a = 0; a < this.bends.length; a++) null != this.bends[a] && (this.bends[a].destroy(), this.bends[a] = null);
-    this.bends = this.createBends()
-  }
-};
-mxEdgeSegmentHandler.prototype.redrawInnerBends = function(a, b) {
-  if (this.graph.isCellBendable(this.state.cell)) {
-    var c = mxConstants.HANDLE_SIZE,
-      d = this.state.absolutePoints;
-    if (null != d && 1 < d.length)
-      for (var e = 0; e < this.state.absolutePoints.length - 1; e++)
-        if (null != this.bends[e + 1]) {
-          a = d[e];
-          b = d[e + 1];
-          var f = new mxPoint(a.x + (b.x - a.x) / 2, a.y + (b.y - a.y) / 2);
-          this.bends[e + 1].bounds = new mxRectangle(Math.round(f.x - c / 2), Math.round(f.y - c / 2), c, c);
-          this.bends[e + 1].redraw()
-        }
-  }
-};
-mxEdgeSegmentHandler.prototype.changePoints = function(a, b) {
-  b = [];
-  var c = this.abspoints;
-  if (1 < c.length)
-    for (var d = c[0], e = c[1], f = 2; f < c.length; f++) {
-      var g = c[f];
-      if ((Math.round(d.x) != Math.round(e.x) || Math.round(e.x) != Math.round(g.x)) && (Math.round(d.y) != Math.round(e.y) || Math.round(e.y) != Math.round(g.y))) d = e, e = e.clone(), this.convertPoint(
-        e, !1), b.push(e);
-      e = g
-    }
-  mxElbowEdgeHandler.prototype.changePoints.apply(this, arguments)
-};
-
-function mxKeyHandler(a, b) {
-  null != a && (this.graph = a, this.target = b || document.documentElement, this.normalKeys = [], this.shiftKeys = [], this.controlKeys = [], this.controlShiftKeys = [], mxEvent.addListener(this.target,
-    "keydown", mxUtils.bind(this, function(a) {
-      this.keyDown(a)
-    })), mxClient.IS_IE && mxEvent.addListener(window, "unload", mxUtils.bind(this, function() {
-    this.destroy()
-  })))
-}
-mxKeyHandler.prototype.graph = null;
-mxKeyHandler.prototype.target = null;
-mxKeyHandler.prototype.normalKeys = null;
-mxKeyHandler.prototype.shiftKeys = null;
-mxKeyHandler.prototype.controlKeys = null;
-mxKeyHandler.prototype.controlShiftKeys = null;
-mxKeyHandler.prototype.enabled = !0;
-mxKeyHandler.prototype.isEnabled = function() {
-  return this.enabled
-};
-mxKeyHandler.prototype.setEnabled = function(a) {
-  this.enabled = a
-};
-mxKeyHandler.prototype.bindKey = function(a, b) {
-  this.normalKeys[a] = b
-};
-mxKeyHandler.prototype.bindShiftKey = function(a, b) {
-  this.shiftKeys[a] = b
-};
-mxKeyHandler.prototype.bindControlKey = function(a, b) {
-  this.controlKeys[a] = b
-};
-mxKeyHandler.prototype.bindControlShiftKey = function(a, b) {
-  this.controlShiftKeys[a] = b
-};
-mxKeyHandler.prototype.isControlDown = function(a) {
-  return mxEvent.isControlDown(a)
-};
-mxKeyHandler.prototype.getFunction = function(a) {
-  return null != a ? this.isControlDown(a) ? mxEvent.isShiftDown(a) ? this.controlShiftKeys[a.keyCode] : this.controlKeys[a.keyCode] : mxEvent.isShiftDown(a) ? this.shiftKeys[a.keyCode] : this.normalKeys[
-    a.keyCode] : null
-};
-mxKeyHandler.prototype.isGraphEvent = function(a) {
-  a = mxEvent.getSource(a);
-  if (a == this.target || a.parentNode == this.target || null != this.graph.cellEditor && a == this.graph.cellEditor.textarea) return !0;
-  for (; null != a;) {
-    if (a == this.graph.container) return !0;
-    a = a.parentNode
-  }
-  return !1
-};
-mxKeyHandler.prototype.keyDown = function(a) {
-  if (this.graph.isEnabled() && !mxEvent.isConsumed(a) && this.isGraphEvent(a) && this.isEnabled())
-    if (27 == a.keyCode) this.escape(a);
-    else if (!this.graph.isEditing()) {
-    var b = this.getFunction(a);
-    null != b && (b(a), mxEvent.consume(a))
-  }
-};
-mxKeyHandler.prototype.escape = function(a) {
-  this.graph.isEscapeEnabled() && this.graph.escape(a)
-};
-mxKeyHandler.prototype.destroy = function() {
-  this.target = null
-};
-
-function mxTooltipHandler(a, b) {
-  null != a && (this.graph = a, this.delay = b || 500, this.graph.addMouseListener(this))
-}
-mxTooltipHandler.prototype.zIndex = 10005;
-mxTooltipHandler.prototype.graph = null;
-mxTooltipHandler.prototype.delay = null;
-mxTooltipHandler.prototype.hideOnHover = !1;
-mxTooltipHandler.prototype.enabled = !0;
-mxTooltipHandler.prototype.isEnabled = function() {
-  return this.enabled
-};
-mxTooltipHandler.prototype.setEnabled = function(a) {
-  this.enabled = a
-};
-mxTooltipHandler.prototype.isHideOnHover = function() {
-  return this.hideOnHover
-};
-mxTooltipHandler.prototype.setHideOnHover = function(a) {
-  this.hideOnHover = a
-};
-mxTooltipHandler.prototype.init = function() {
-  null != document.body && (this.div = document.createElement("div"), this.div.className = "mxTooltip", this.div.style.visibility = "hidden", this.div.style.zIndex = this.zIndex, document.body.appendChild(
-    this.div), mxEvent.addListener(this.div, "mousedown", mxUtils.bind(this, function(a) {
-    this.hideTooltip()
-  })))
-};
-mxTooltipHandler.prototype.mouseDown = function(a, b) {
-  this.reset(b, !1);
-  this.hideTooltip()
-};
-mxTooltipHandler.prototype.mouseMove = function(a, b) {
-  if (b.getX() != this.lastX || b.getY() != this.lastY) this.reset(b, !0), (this.isHideOnHover() || b.getState() != this.state || b.getSource() != this.node && (!this.stateSource || null != b.getState() &&
-    this.stateSource == (b.isSource(b.getState().shape) || !b.isSource(b.getState().text)))) && this.hideTooltip();
-  this.lastX = b.getX();
-  this.lastY = b.getY()
-};
-mxTooltipHandler.prototype.mouseUp = function(a, b) {
-  this.reset(b, !0);
-  this.hideTooltip()
-};
-mxTooltipHandler.prototype.resetTimer = function() {
-  null != this.thread && (window.clearTimeout(this.thread), this.thread = null)
-};
-mxTooltipHandler.prototype.reset = function(a, b) {
-  this.resetTimer();
-  if (b && this.isEnabled() && null != a.getState() && (null == this.div || "hidden" == this.div.style.visibility)) {
-    var c = a.getState(),
-      d = a.getSource(),
-      e = a.getX(),
-      f = a.getY(),
-      g = a.isSource(c.shape) || a.isSource(c.text);
-    this.thread = window.setTimeout(mxUtils.bind(this, function() {
-      if (!this.graph.isEditing() && !this.graph.panningHandler.isMenuShowing()) {
-        var a = this.graph.getTooltip(c, d, e, f);
-        this.show(a, e, f);
-        this.state = c;
-        this.node = d;
-        this.stateSource = g
-      }
-    }), this.delay)
-  }
-};
-mxTooltipHandler.prototype.hide = function() {
-  this.resetTimer();
-  this.hideTooltip()
-};
-mxTooltipHandler.prototype.hideTooltip = function() {
-  null != this.div && (this.div.style.visibility = "hidden")
-};
-mxTooltipHandler.prototype.show = function(a, b, c) {
-  if (null != a && 0 < a.length) {
-    null == this.div && this.init();
-    var d = mxUtils.getScrollOrigin();
-    this.div.style.left = b + d.x + "px";
-    this.div.style.top = c + mxConstants.TOOLTIP_VERTICAL_OFFSET + d.y + "px";
-    mxUtils.isNode(a) ? (this.div.innerHTML = "", this.div.appendChild(a)) : this.div.innerHTML = a.replace(/\n/g, "\x3cbr\x3e");
-    this.div.style.visibility = "";
-    mxUtils.fit(this.div)
-  }
-};
-mxTooltipHandler.prototype.destroy = function() {
-  this.graph.removeMouseListener(this);
-  mxEvent.release(this.div);
-  null != this.div && null != this.div.parentNode && this.div.parentNode.removeChild(this.div);
-  this.div = null
-};
-
-function mxCellTracker(a, b, c) {
-  mxCellMarker.call(this, a, b);
-  this.graph.addMouseListener(this);
-  null != c && (this.getCell = c);
-  mxClient.IS_IE && mxEvent.addListener(window, "unload", mxUtils.bind(this, function() {
-    this.destroy()
-  }))
-}
-mxUtils.extend(mxCellTracker, mxCellMarker);
-mxCellTracker.prototype.mouseDown = function(a, b) {};
-mxCellTracker.prototype.mouseMove = function(a, b) {
-  this.isEnabled() && this.process(b)
-};
-mxCellTracker.prototype.mouseUp = function(a, b) {
-  this.reset()
-};
-mxCellTracker.prototype.destroy = function() {
-  this.destroyed || (this.destroyed = !0, this.graph.removeMouseListener(this), mxCellMarker.prototype.destroy.apply(this))
-};
-
-function mxCellHighlight(a, b, c, d) {
-  null != a && (this.graph = a, this.highlightColor = null != b ? b : mxConstants.DEFAULT_VALID_COLOR, this.strokeWidth = null != c ? c : mxConstants.HIGHLIGHT_STROKEWIDTH, this.dashed = null != d ?
-    d : !1, this.repaintHandler = mxUtils.bind(this, function() {
-      this.repaint()
-    }), this.graph.getView().addListener(mxEvent.SCALE, this.repaintHandler), this.graph.getView().addListener(mxEvent.TRANSLATE, this.repaintHandler), this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,
-      this.repaintHandler), this.graph.getModel().addListener(mxEvent.CHANGE,
-      this.repaintHandler), this.resetHandler = mxUtils.bind(this, function() {
-      this.hide()
-    }), this.graph.getView().addListener(mxEvent.DOWN, this.resetHandler), this.graph.getView().addListener(mxEvent.UP, this.resetHandler))
-}
-mxCellHighlight.prototype.keepOnTop = !1;
-mxCellHighlight.prototype.graph = !0;
-mxCellHighlight.prototype.state = null;
-mxCellHighlight.prototype.spacing = 2;
-mxCellHighlight.prototype.resetHandler = null;
-mxCellHighlight.prototype.setHighlightColor = function(a) {
-  this.highlightColor = a;
-  null != this.shape && (this.shape.stroke = a)
-};
-mxCellHighlight.prototype.drawHighlight = function() {
-  this.shape = this.createShape();
-  this.repaint();
-  !this.keepOnTop && this.shape.node.parentNode.firstChild != this.shape.node && this.shape.node.parentNode.insertBefore(this.shape.node, this.shape.node.parentNode.firstChild)
-};
-mxCellHighlight.prototype.createShape = function() {
-  var a = null,
-    a = this.graph.model.isEdge(this.state.cell) ? new mxPolyline(this.state.absolutePoints, this.highlightColor, this.strokeWidth) : new mxRectangleShape(new mxRectangle, null, this.highlightColor,
-      this.strokeWidth);
-  a.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;
-  a.init(this.graph.getView().getOverlayPane());
-  mxEvent.redirectMouseEvents(a.node, this.graph, this.state);
-  a.svgStrokeTolerance = 0;
-  a.pointerEvents = !1;
-  a.isDashed = this.dashed;
-  return a
-};
-mxCellHighlight.prototype.repaint = function() {
-  if (null != this.state && null != this.shape) {
-    var a = 0;
-    this.graph.model.isEdge(this.state.cell) ? this.shape.points = this.state.absolutePoints : (this.shape.bounds = new mxRectangle(this.state.x - this.spacing, this.state.y - this.spacing, this.state
-      .width + 2 * this.spacing, this.state.height + 2 * this.spacing), a = Number(this.state.style[mxConstants.STYLE_ROTATION] || "0"));
-    null != this.state.shape && this.shape.setCursor(this.state.shape.getCursor());
-    0 != a && (this.shape.rotation = a);
-    this.shape.redraw()
-  }
-};
-mxCellHighlight.prototype.hide = function() {
-  this.highlight(null)
-};
-mxCellHighlight.prototype.highlight = function(a) {
-  this.state != a && (null != this.shape && (this.shape.destroy(), this.shape = null), this.state = a, null != this.state && this.drawHighlight())
-};
-mxCellHighlight.prototype.destroy = function() {
-  this.graph.getView().removeListener(this.repaintHandler);
-  this.graph.getModel().removeListener(this.repaintHandler);
-  this.graph.getView().removeListener(this.resetHandler);
-  this.graph.getModel().removeListener(this.resetHandler);
-  null != this.shape && (this.shape.destroy(), this.shape = null)
-};
-
-function mxDefaultKeyHandler(a) {
-  if (null != a) {
-    this.editor = a;
-    this.handler = new mxKeyHandler(a.graph);
-    var b = this.handler.escape;
-    this.handler.escape = function(c) {
-      b.apply(this, arguments);
-      a.hideProperties();
-      a.fireEvent(new mxEventObject(mxEvent.ESCAPE, "event", c))
-    }
-  }
-}
-mxDefaultKeyHandler.prototype.editor = null;
-mxDefaultKeyHandler.prototype.handler = null;
-mxDefaultKeyHandler.prototype.bindAction = function(a, b, c) {
-  var d = mxUtils.bind(this, function() {
-    this.editor.execute(b)
-  });
-  c ? this.handler.bindControlKey(a, d) : this.handler.bindKey(a, d)
-};
-mxDefaultKeyHandler.prototype.destroy = function() {
-  this.handler.destroy();
-  this.handler = null
-};
-
-function mxDefaultPopupMenu(a) {
-  this.config = a
-}
-mxDefaultPopupMenu.prototype.imageBasePath = null;
-mxDefaultPopupMenu.prototype.config = null;
-mxDefaultPopupMenu.prototype.createMenu = function(a, b, c, d) {
-  if (null != this.config) {
-    var e = this.createConditions(a, c, d);
-    this.addItems(a, b, c, d, e, this.config.firstChild, null)
-  }
-};
-mxDefaultPopupMenu.prototype.addItems = function(a, b, c, d, e, f, g) {
-  for (var h = !1; null != f;) {
-    if ("add" == f.nodeName) {
-      var k = f.getAttribute("if");
-      if (null == k || e[k]) {
-        var k = f.getAttribute("as"),
-          k = mxResources.get(k) || k,
-          l = mxUtils.eval(mxUtils.getTextContent(f)),
-          m = f.getAttribute("action"),
-          n = f.getAttribute("icon"),
-          p = f.getAttribute("iconCls");
-        h && (b.addSeparator(g), h = !1);
-        null != n && this.imageBasePath && (n = this.imageBasePath + n);
-        k = this.addAction(b, a, k, n, l, m, c, g, p);
-        this.addItems(a, b, c, d, e, f.firstChild, k)
-      }
-    } else "separator" ==
-      f.nodeName && (h = !0);
-    f = f.nextSibling
-  }
-};
-mxDefaultPopupMenu.prototype.addAction = function(a, b, c, d, e, f, g, h, k) {
-  return a.addItem(c, d, function(a) {
-    "function" == typeof e && e.call(b, b, g, a);
-    null != f && b.execute(f, g, a)
-  }, h, k)
-};
-mxDefaultPopupMenu.prototype.createConditions = function(a, b, c) {
-  var d = a.graph.getModel(),
-    e = d.getChildCount(b),
-    f = [];
-  f.nocell = null == b;
-  f.ncells = 1 < a.graph.getSelectionCount();
-  f.notRoot = d.getRoot() != d.getParent(a.graph.getDefaultParent());
-  f.cell = null != b;
-  d = null != b && 1 == a.graph.getSelectionCount();
-  f.nonEmpty = d && 0 < e;
-  f.expandable = d && a.graph.isCellFoldable(b, !1);
-  f.collapsable = d && a.graph.isCellFoldable(b, !0);
-  f.validRoot = d && a.graph.isValidRoot(b);
-  f.emptyValidRoot = f.validRoot && 0 == e;
-  f.swimlane = d && a.graph.isSwimlane(b);
-  e = this.config.getElementsByTagName("condition");
-  for (d = 0; d < e.length; d++) {
-    var g = mxUtils.eval(mxUtils.getTextContent(e[d])),
-      h = e[d].getAttribute("name");
-    null != h && "function" == typeof g && (f[h] = g(a, b, c))
-  }
-  return f
-};
-
-function mxDefaultToolbar(a, b) {
-  this.editor = b;
-  null != a && null != b && this.init(a)
-}
-mxDefaultToolbar.prototype.editor = null;
-mxDefaultToolbar.prototype.toolbar = null;
-mxDefaultToolbar.prototype.resetHandler = null;
-mxDefaultToolbar.prototype.spacing = 4;
-mxDefaultToolbar.prototype.connectOnDrop = !1;
-mxDefaultToolbar.prototype.init = function(a) {
-  null != a && (this.toolbar = new mxToolbar(a), this.toolbar.addListener(mxEvent.SELECT, mxUtils.bind(this, function(a, c) {
-    var d = c.getProperty("function");
-    this.editor.insertFunction = null != d ? mxUtils.bind(this, function() {
-      d.apply(this, arguments);
-      this.toolbar.resetMode()
-    }) : null
-  })), this.resetHandler = mxUtils.bind(this, function() {
-    null != this.toolbar && this.toolbar.resetMode(!0)
-  }), this.editor.graph.addListener(mxEvent.DOUBLE_CLICK, this.resetHandler), this.editor.addListener(mxEvent.ESCAPE,
-    this.resetHandler))
-};
-mxDefaultToolbar.prototype.addItem = function(a, b, c, d) {
-  var e = mxUtils.bind(this, function() {
-    null != c && 0 < c.length && this.editor.execute(c)
-  });
-  return this.toolbar.addItem(a, b, e, d)
-};
-mxDefaultToolbar.prototype.addSeparator = function(a) {
-  a = a || mxClient.imageBasePath + "/separator.gif";
-  this.toolbar.addSeparator(a)
-};
-mxDefaultToolbar.prototype.addCombo = function() {
-  return this.toolbar.addCombo()
-};
-mxDefaultToolbar.prototype.addActionCombo = function(a) {
-  return this.toolbar.addActionCombo(a)
-};
-mxDefaultToolbar.prototype.addActionOption = function(a, b, c) {
-  var d = mxUtils.bind(this, function() {
-    this.editor.execute(c)
-  });
-  this.addOption(a, b, d)
-};
-mxDefaultToolbar.prototype.addOption = function(a, b, c) {
-  return this.toolbar.addOption(a, b, c)
-};
-mxDefaultToolbar.prototype.addMode = function(a, b, c, d, e) {
-  var f = mxUtils.bind(this, function() {
-    this.editor.setMode(c);
-    null != e && e(this.editor)
-  });
-  return this.toolbar.addSwitchMode(a, b, f, d)
-};
-mxDefaultToolbar.prototype.addPrototype = function(a, b, c, d, e, f) {
-  var g = function() {
-      return "function" == typeof c ? c() : null != c ? c.clone() : null
-    },
-    h = mxUtils.bind(this, function(a, b) {
-      "function" == typeof e ? e(this.editor, g(), a, b) : this.drop(g(), a, b);
-      this.toolbar.resetMode();
-      mxEvent.consume(a)
-    });
-  a = this.toolbar.addMode(a, b, h, d, null, f);
-  this.installDropHandler(a, function(a, b, c) {
-    h(b, c)
-  });
-  return a
-};
-mxDefaultToolbar.prototype.drop = function(a, b, c) {
-  var d = this.editor.graph,
-    e = d.getModel();
-  if (null == c || e.isEdge(c) || !this.connectOnDrop || !d.isCellConnectable(c)) {
-    for (; null != c && !d.isValidDropTarget(c, [a], b);) c = e.getParent(c);
-    this.insert(a, b, c)
-  } else this.connect(a, b, c)
-};
-mxDefaultToolbar.prototype.insert = function(a, b, c) {
-  var d = this.editor.graph;
-  if (d.canImportCell(a)) {
-    var e = mxEvent.getClientX(b),
-      f = mxEvent.getClientY(b),
-      e = mxUtils.convertPoint(d.container, e, f);
-    return d.isSplitEnabled() && d.isSplitTarget(c, [a], b) ? d.splitEdge(c, [a], null, e.x, e.y) : this.editor.addVertex(c, a, e.x, e.y)
-  }
-  return null
-};
-mxDefaultToolbar.prototype.connect = function(a, b, c) {
-  b = this.editor.graph;
-  var d = b.getModel();
-  if (null != c && b.isCellConnectable(a) && b.isEdgeValid(null, c, a)) {
-    var e = null;
-    d.beginUpdate();
-    try {
-      var f = d.getGeometry(c),
-        g = d.getGeometry(a).clone();
-      g.x = f.x + (f.width - g.width) / 2;
-      g.y = f.y + (f.height - g.height) / 2;
-      var h = this.spacing * b.gridSize,
-        k = 20 * d.getDirectedEdgeCount(c, !0);
-      this.editor.horizontalFlow ? g.x += (g.width + f.width) / 2 + h + k : g.y += (g.height + f.height) / 2 + h + k;
-      a.setGeometry(g);
-      var l = d.getParent(c);
-      b.addCell(a, l);
-      b.constrainChild(a);
-      e = this.editor.createEdge(c, a);
-      if (null == d.getGeometry(e)) {
-        var m = new mxGeometry;
-        m.relative = !0;
-        d.setGeometry(e, m)
-      }
-      b.addEdge(e, l, c, a)
-    } finally {
-      d.endUpdate()
-    }
-    b.setSelectionCells([a, e]);
-    b.scrollCellToVisible(a)
-  }
-};
-mxDefaultToolbar.prototype.installDropHandler = function(a, b) {
-  var c = document.createElement("img");
-  c.setAttribute("src", a.getAttribute("src"));
-  var d = mxUtils.bind(this, function(e) {
-    c.style.width = 2 * a.offsetWidth + "px";
-    c.style.height = 2 * a.offsetHeight + "px";
-    mxUtils.makeDraggable(a, this.editor.graph, b, c);
-    mxEvent.removeListener(c, "load", d)
-  });
-  mxClient.IS_IE ? d() : mxEvent.addListener(c, "load", d)
-};
-mxDefaultToolbar.prototype.destroy = function() {
-  null != this.resetHandler && (this.editor.graph.removeListener("dblclick", this.resetHandler), this.editor.removeListener("escape", this.resetHandler), this.resetHandler = null);
-  null != this.toolbar && (this.toolbar.destroy(), this.toolbar = null)
-};
-
-function mxEditor(a) {
-  this.actions = [];
-  this.addActions();
-  if (null != document.body) {
-    this.cycleAttributeValues = [];
-    this.popupHandler = new mxDefaultPopupMenu;
-    this.undoManager = new mxUndoManager;
-    this.graph = this.createGraph();
-    this.toolbar = this.createToolbar();
-    this.keyHandler = new mxDefaultKeyHandler(this);
-    this.configure(a);
-    this.graph.swimlaneIndicatorColorAttribute = this.cycleAttributeName;
-    !mxClient.IS_LOCAL && null != this.urlInit && (this.session = this.createSession());
-    if (null != this.onInit) this.onInit();
-    mxClient.IS_IE &&
-      mxEvent.addListener(window, "unload", mxUtils.bind(this, function() {
-        this.destroy()
-      }))
-  }
-}
-mxLoadResources && mxResources.add(mxClient.basePath + "/resources/editor");
-mxEditor.prototype = new mxEventSource;
-mxEditor.prototype.constructor = mxEditor;
-mxEditor.prototype.askZoomResource = "none" != mxClient.language ? "askZoom" : "";
-mxEditor.prototype.lastSavedResource = "none" != mxClient.language ? "lastSaved" : "";
-mxEditor.prototype.currentFileResource = "none" != mxClient.language ? "currentFile" : "";
-mxEditor.prototype.propertiesResource = "none" != mxClient.language ? "properties" : "";
-mxEditor.prototype.tasksResource = "none" != mxClient.language ? "tasks" : "";
-mxEditor.prototype.helpResource = "none" != mxClient.language ? "help" : "";
-mxEditor.prototype.outlineResource = "none" != mxClient.language ? "outline" : "";
-mxEditor.prototype.outline = null;
-mxEditor.prototype.graph = null;
-mxEditor.prototype.graphRenderHint = null;
-mxEditor.prototype.toolbar = null;
-mxEditor.prototype.session = null;
-mxEditor.prototype.status = null;
-mxEditor.prototype.popupHandler = null;
-mxEditor.prototype.undoManager = null;
-mxEditor.prototype.keyHandler = null;
-mxEditor.prototype.actions = null;
-mxEditor.prototype.dblClickAction = "edit";
-mxEditor.prototype.swimlaneRequired = !1;
-mxEditor.prototype.disableContextMenu = !0;
-mxEditor.prototype.insertFunction = null;
-mxEditor.prototype.forcedInserting = !1;
-mxEditor.prototype.templates = null;
-mxEditor.prototype.defaultEdge = null;
-mxEditor.prototype.defaultEdgeStyle = null;
-mxEditor.prototype.defaultGroup = null;
-mxEditor.prototype.groupBorderSize = null;
-mxEditor.prototype.filename = null;
-mxEditor.prototype.linefeed = "\x26#xa;";
-mxEditor.prototype.postParameterName = "xml";
-mxEditor.prototype.escapePostData = !0;
-mxEditor.prototype.urlPost = null;
-mxEditor.prototype.urlImage = null;
-mxEditor.prototype.urlInit = null;
-mxEditor.prototype.urlNotify = null;
-mxEditor.prototype.urlPoll = null;
-mxEditor.prototype.horizontalFlow = !1;
-mxEditor.prototype.layoutDiagram = !1;
-mxEditor.prototype.swimlaneSpacing = 0;
-mxEditor.prototype.maintainSwimlanes = !1;
-mxEditor.prototype.layoutSwimlanes = !1;
-mxEditor.prototype.cycleAttributeValues = null;
-mxEditor.prototype.cycleAttributeIndex = 0;
-mxEditor.prototype.cycleAttributeName = "fillColor";
-mxEditor.prototype.tasks = null;
-mxEditor.prototype.tasksWindowImage = null;
-mxEditor.prototype.tasksTop = 20;
-mxEditor.prototype.help = null;
-mxEditor.prototype.helpWindowImage = null;
-mxEditor.prototype.urlHelp = null;
-mxEditor.prototype.helpWidth = 300;
-mxEditor.prototype.helpHeight = 260;
-mxEditor.prototype.propertiesWidth = 240;
-mxEditor.prototype.propertiesHeight = null;
-mxEditor.prototype.movePropertiesDialog = !1;
-mxEditor.prototype.validating = !1;
-mxEditor.prototype.modified = !1;
-mxEditor.prototype.isModified = function() {
-  return this.modified
-};
-mxEditor.prototype.setModified = function(a) {
-  this.modified = a
-};
-mxEditor.prototype.addActions = function() {
-  this.addAction("save", function(a) {
-    a.save()
-  });
-  this.addAction("print", function(a) {
-    (new mxPrintPreview(a.graph, 1)).open()
-  });
-  this.addAction("show", function(a) {
-    mxUtils.show(a.graph, null, 10, 10)
-  });
-  this.addAction("exportImage", function(a) {
-    var b = a.getUrlImage();
-    if (null == b || mxClient.IS_LOCAL) a.execute("show");
-    else {
-      var c = mxUtils.getViewXml(a.graph, 1),
-        c = mxUtils.getXml(c, "\n");
-      mxUtils.submit(b, a.postParameterName + "\x3d" + encodeURIComponent(c), document, "_blank")
-    }
-  });
-  this.addAction("refresh",
-    function(a) {
-      a.graph.refresh()
-    });
-  this.addAction("cut", function(a) {
-    a.graph.isEnabled() && mxClipboard.cut(a.graph)
-  });
-  this.addAction("copy", function(a) {
-    a.graph.isEnabled() && mxClipboard.copy(a.graph)
-  });
-  this.addAction("paste", function(a) {
-    a.graph.isEnabled() && mxClipboard.paste(a.graph)
-  });
-  this.addAction("delete", function(a) {
-    a.graph.isEnabled() && a.graph.removeCells()
-  });
-  this.addAction("group", function(a) {
-    a.graph.isEnabled() && a.graph.setSelectionCell(a.groupCells())
-  });
-  this.addAction("ungroup", function(a) {
-    a.graph.isEnabled() &&
-      a.graph.setSelectionCells(a.graph.ungroupCells())
-  });
-  this.addAction("removeFromParent", function(a) {
-    a.graph.isEnabled() && a.graph.removeCellsFromParent()
-  });
-  this.addAction("undo", function(a) {
-    a.graph.isEnabled() && a.undo()
-  });
-  this.addAction("redo", function(a) {
-    a.graph.isEnabled() && a.redo()
-  });
-  this.addAction("zoomIn", function(a) {
-    a.graph.zoomIn()
-  });
-  this.addAction("zoomOut", function(a) {
-    a.graph.zoomOut()
-  });
-  this.addAction("actualSize", function(a) {
-    a.graph.zoomActual()
-  });
-  this.addAction("fit", function(a) {
-    a.graph.fit()
-  });
-  this.addAction("showProperties", function(a, b) {
-    a.showProperties(b)
-  });
-  this.addAction("selectAll", function(a) {
-    a.graph.isEnabled() && a.graph.selectAll()
-  });
-  this.addAction("selectNone", function(a) {
-    a.graph.isEnabled() && a.graph.clearSelection()
-  });
-  this.addAction("selectVertices", function(a) {
-    a.graph.isEnabled() && a.graph.selectVertices()
-  });
-  this.addAction("selectEdges", function(a) {
-    a.graph.isEnabled() && a.graph.selectEdges()
-  });
-  this.addAction("edit", function(a, b) {
-    a.graph.isEnabled() && a.graph.isCellEditable(b) && a.graph.startEditingAtCell(b)
-  });
-  this.addAction("toBack", function(a, b) {
-    a.graph.isEnabled() && a.graph.orderCells(!0)
-  });
-  this.addAction("toFront", function(a, b) {
-    a.graph.isEnabled() && a.graph.orderCells(!1)
-  });
-  this.addAction("enterGroup", function(a, b) {
-    a.graph.enterGroup(b)
-  });
-  this.addAction("exitGroup", function(a) {
-    a.graph.exitGroup()
-  });
-  this.addAction("home", function(a) {
-    a.graph.home()
-  });
-  this.addAction("selectPrevious", function(a) {
-    a.graph.isEnabled() && a.graph.selectPreviousCell()
-  });
-  this.addAction("selectNext", function(a) {
-    a.graph.isEnabled() &&
-      a.graph.selectNextCell()
-  });
-  this.addAction("selectParent", function(a) {
-    a.graph.isEnabled() && a.graph.selectParentCell()
-  });
-  this.addAction("selectChild", function(a) {
-    a.graph.isEnabled() && a.graph.selectChildCell()
-  });
-  this.addAction("collapse", function(a) {
-    a.graph.isEnabled() && a.graph.foldCells(!0)
-  });
-  this.addAction("collapseAll", function(a) {
-    if (a.graph.isEnabled()) {
-      var b = a.graph.getChildVertices();
-      a.graph.foldCells(!0, !1, b)
-    }
-  });
-  this.addAction("expand", function(a) {
-    a.graph.isEnabled() && a.graph.foldCells(!1)
-  });
-  this.addAction("expandAll", function(a) {
-    if (a.graph.isEnabled()) {
-      var b = a.graph.getChildVertices();
-      a.graph.foldCells(!1, !1, b)
-    }
-  });
-  this.addAction("bold", function(a) {
-    a.graph.isEnabled() && a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, mxConstants.FONT_BOLD)
-  });
-  this.addAction("italic", function(a) {
-    a.graph.isEnabled() && a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, mxConstants.FONT_ITALIC)
-  });
-  this.addAction("underline", function(a) {
-    a.graph.isEnabled() && a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
-      mxConstants.FONT_UNDERLINE)
-  });
-  this.addAction("shadow", function(a) {
-    a.graph.isEnabled() && a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, mxConstants.FONT_SHADOW)
-  });
-  this.addAction("alignCellsLeft", function(a) {
-    a.graph.isEnabled() && a.graph.alignCells(mxConstants.ALIGN_LEFT)
-  });
-  this.addAction("alignCellsCenter", function(a) {
-    a.graph.isEnabled() && a.graph.alignCells(mxConstants.ALIGN_CENTER)
-  });
-  this.addAction("alignCellsRight", function(a) {
-    a.graph.isEnabled() && a.graph.alignCells(mxConstants.ALIGN_RIGHT)
-  });
-  this.addAction("alignCellsTop", function(a) {
-    a.graph.isEnabled() && a.graph.alignCells(mxConstants.ALIGN_TOP)
-  });
-  this.addAction("alignCellsMiddle", function(a) {
-    a.graph.isEnabled() && a.graph.alignCells(mxConstants.ALIGN_MIDDLE)
-  });
-  this.addAction("alignCellsBottom", function(a) {
-    a.graph.isEnabled() && a.graph.alignCells(mxConstants.ALIGN_BOTTOM)
-  });
-  this.addAction("alignFontLeft", function(a) {
-    a.graph.setCellStyles(mxConstants.STYLE_ALIGN, mxConstants.ALIGN_LEFT)
-  });
-  this.addAction("alignFontCenter", function(a) {
-    a.graph.isEnabled() &&
-      a.graph.setCellStyles(mxConstants.STYLE_ALIGN, mxConstants.ALIGN_CENTER)
-  });
-  this.addAction("alignFontRight", function(a) {
-    a.graph.isEnabled() && a.graph.setCellStyles(mxConstants.STYLE_ALIGN, mxConstants.ALIGN_RIGHT)
-  });
-  this.addAction("alignFontTop", function(a) {
-    a.graph.isEnabled() && a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_TOP)
-  });
-  this.addAction("alignFontMiddle", function(a) {
-    a.graph.isEnabled() && a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE)
-  });
-  this.addAction("alignFontBottom", function(a) {
-    a.graph.isEnabled() && a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_BOTTOM)
-  });
-  this.addAction("zoom", function(a) {
-    var b = 100 * a.graph.getView().scale,
-      b = parseFloat(mxUtils.prompt(mxResources.get(a.askZoomResource) || a.askZoomResource, b)) / 100;
-    isNaN(b) || a.graph.getView().setScale(b)
-  });
-  this.addAction("toggleTasks", function(a) {
-    null != a.tasks ? a.tasks.setVisible(!a.tasks.isVisible()) : a.showTasks()
-  });
-  this.addAction("toggleHelp", function(a) {
-    null !=
-      a.help ? a.help.setVisible(!a.help.isVisible()) : a.showHelp()
-  });
-  this.addAction("toggleOutline", function(a) {
-    null == a.outline ? a.showOutline() : a.outline.setVisible(!a.outline.isVisible())
-  });
-  this.addAction("toggleConsole", function(a) {
-    mxLog.setVisible(!mxLog.isVisible())
-  })
-};
-mxEditor.prototype.createSession = function() {
-  var a = mxUtils.bind(this, function(a) {
-    this.fireEvent(new mxEventObject(mxEvent.SESSION, "session", a))
-  });
-  return this.connect(this.urlInit, this.urlPoll, this.urlNotify, a)
-};
-mxEditor.prototype.configure = function(a) {
-  null != a && ((new mxCodec(a.ownerDocument)).decode(a, this), this.resetHistory())
-};
-mxEditor.prototype.resetFirstTime = function() {
-  document.cookie = "mxgraph\x3dseen; expires\x3dFri, 27 Jul 2001 02:47:11 UTC; path\x3d/"
-};
-mxEditor.prototype.resetHistory = function() {
-  this.lastSnapshot = (new Date).getTime();
-  this.undoManager.clear();
-  this.ignoredChanges = 0;
-  this.setModified(!1)
-};
-mxEditor.prototype.addAction = function(a, b) {
-  this.actions[a] = b
-};
-mxEditor.prototype.execute = function(a, b, c) {
-  var d = this.actions[a];
-  if (null != d) try {
-    var e = arguments;
-    e[0] = this;
-    d.apply(this, e)
-  } catch (f) {
-    throw mxUtils.error("Cannot execute " + a + ": " + f.message, 280, !0), f;
-  } else mxUtils.error("Cannot find action " + a, 280, !0)
-};
-mxEditor.prototype.addTemplate = function(a, b) {
-  this.templates[a] = b
-};
-mxEditor.prototype.getTemplate = function(a) {
-  return this.templates[a]
-};
-mxEditor.prototype.createGraph = function() {
-  var a = new mxGraph(null, null, this.graphRenderHint);
-  a.setTooltips(!0);
-  a.setPanning(!0);
-  this.installDblClickHandler(a);
-  this.installUndoHandler(a);
-  this.installDrillHandler(a);
-  this.installChangeHandler(a);
-  this.installInsertHandler(a);
-  a.panningHandler.factoryMethod = mxUtils.bind(this, function(a, c, d) {
-    return this.createPopupMenu(a, c, d)
-  });
-  a.connectionHandler.factoryMethod = mxUtils.bind(this, function(a, c) {
-    return this.createEdge(a, c)
-  });
-  this.createSwimlaneManager(a);
-  this.createLayoutManager(a);
-  return a
-};
-mxEditor.prototype.createSwimlaneManager = function(a) {
-  a = new mxSwimlaneManager(a, !1);
-  a.isHorizontal = mxUtils.bind(this, function() {
-    return this.horizontalFlow
-  });
-  a.isEnabled = mxUtils.bind(this, function() {
-    return this.maintainSwimlanes
-  });
-  return a
-};
-mxEditor.prototype.createLayoutManager = function(a) {
-  var b = new mxLayoutManager(a),
-    c = this;
-  b.getLayout = function(b) {
-    var e = null,
-      f = c.graph.getModel();
-    if (null != f.getParent(b))
-      if (c.layoutSwimlanes && a.isSwimlane(b)) null == c.swimlaneLayout && (c.swimlaneLayout = c.createSwimlaneLayout()), e = c.swimlaneLayout;
-      else if (c.layoutDiagram && (a.isValidRoot(b) || null == f.getParent(f.getParent(b)))) null == c.diagramLayout && (c.diagramLayout = c.createDiagramLayout()), e = c.diagramLayout;
-    return e
-  };
-  return b
-};
-mxEditor.prototype.setGraphContainer = function(a) {
-  null == this.graph.container && (this.graph.init(a), this.rubberband = new mxRubberband(this.graph), this.disableContextMenu && mxEvent.disableContextMenu(a), mxClient.IS_QUIRKS && new mxDivResizer(
-    a))
-};
-mxEditor.prototype.installDblClickHandler = function(a) {
-  a.addListener(mxEvent.DOUBLE_CLICK, mxUtils.bind(this, function(b, c) {
-    var d = c.getProperty("cell");
-    null != d && (a.isEnabled() && null != this.dblClickAction) && (this.execute(this.dblClickAction, d), c.consume())
-  }))
-};
-mxEditor.prototype.installUndoHandler = function(a) {
-  var b = mxUtils.bind(this, function(a, b) {
-    var e = b.getProperty("edit");
-    this.undoManager.undoableEditHappened(e)
-  });
-  a.getModel().addListener(mxEvent.UNDO, b);
-  a.getView().addListener(mxEvent.UNDO, b);
-  b = function(b, d) {
-    var e = d.getProperty("edit").changes;
-    a.setSelectionCells(a.getSelectionCellsForChanges(e))
-  };
-  this.undoManager.addListener(mxEvent.UNDO, b);
-  this.undoManager.addListener(mxEvent.REDO, b)
-};
-mxEditor.prototype.installDrillHandler = function(a) {
-  var b = mxUtils.bind(this, function(a) {
-    this.fireEvent(new mxEventObject(mxEvent.ROOT))
-  });
-  a.getView().addListener(mxEvent.DOWN, b);
-  a.getView().addListener(mxEvent.UP, b)
-};
-mxEditor.prototype.installChangeHandler = function(a) {
-  var b = mxUtils.bind(this, function(b, d) {
-    this.setModified(!0);
-    !0 == this.validating && a.validateGraph();
-    for (var e = d.getProperty("edit").changes, f = 0; f < e.length; f++) {
-      var g = e[f];
-      if (g instanceof mxRootChange || g instanceof mxValueChange && g.cell == this.graph.model.root || g instanceof mxCellAttributeChange && g.cell == this.graph.model.root) {
-        this.fireEvent(new mxEventObject(mxEvent.ROOT));
-        break
-      }
-    }
-  });
-  a.getModel().addListener(mxEvent.CHANGE, b)
-};
-mxEditor.prototype.installInsertHandler = function(a) {
-  var b = this;
-  a.addMouseListener({
-    mouseDown: function(a, d) {
-      if (null != b.insertFunction && !d.isPopupTrigger() && (b.forcedInserting || null == d.getState())) b.graph.clearSelection(), b.insertFunction(d.getEvent(), d.getCell()), this.isActive = !
-        0, d.consume()
-    },
-    mouseMove: function(a, b) {
-      this.isActive && b.consume()
-    },
-    mouseUp: function(a, b) {
-      this.isActive && (this.isActive = !1, b.consume())
-    }
-  })
-};
-mxEditor.prototype.createDiagramLayout = function() {
-  var a = this.graph.gridSize,
-    b = new mxStackLayout(this.graph, !this.horizontalFlow, this.swimlaneSpacing, 2 * a, 2 * a);
-  b.isVertexIgnored = function(a) {
-    return !b.graph.isSwimlane(a)
-  };
-  return b
-};
-mxEditor.prototype.createSwimlaneLayout = function() {
-  return new mxCompactTreeLayout(this.graph, this.horizontalFlow)
-};
-mxEditor.prototype.createToolbar = function() {
-  return new mxDefaultToolbar(null, this)
-};
-mxEditor.prototype.setToolbarContainer = function(a) {
-  this.toolbar.init(a);
-  mxClient.IS_QUIRKS && new mxDivResizer(a)
-};
-mxEditor.prototype.setStatusContainer = function(a) {
-  null == this.status && (this.status = a, this.addListener(mxEvent.SAVE, mxUtils.bind(this, function() {
-    var a = (new Date).toLocaleString();
-    this.setStatus((mxResources.get(this.lastSavedResource) || this.lastSavedResource) + ": " + a)
-  })), this.addListener(mxEvent.OPEN, mxUtils.bind(this, function() {
-    this.setStatus((mxResources.get(this.currentFileResource) || this.currentFileResource) + ": " + this.filename)
-  })), mxClient.IS_QUIRKS && new mxDivResizer(a))
-};
-mxEditor.prototype.setStatus = function(a) {
-  null != this.status && null != a && (this.status.innerHTML = a)
-};
-mxEditor.prototype.setTitleContainer = function(a) {
-  this.addListener(mxEvent.ROOT, mxUtils.bind(this, function(b) {
-    a.innerHTML = this.getTitle()
-  }));
-  mxClient.IS_QUIRKS && new mxDivResizer(a)
-};
-mxEditor.prototype.treeLayout = function(a, b) {
-  null != a && (new mxCompactTreeLayout(this.graph, b)).execute(a)
-};
-mxEditor.prototype.getTitle = function() {
-  for (var a = "", b = this.graph, c = b.getCurrentRoot(); null != c && null != b.getModel().getParent(b.getModel().getParent(c));) b.isValidRoot(c) && (a = " \x3e " + b.convertValueToString(c) + a),
-    c = b.getModel().getParent(c);
-  return this.getRootTitle() + a
-};
-mxEditor.prototype.getRootTitle = function() {
-  var a = this.graph.getModel().getRoot();
-  return this.graph.convertValueToString(a)
-};
-mxEditor.prototype.undo = function() {
-  this.undoManager.undo()
-};
-mxEditor.prototype.redo = function() {
-  this.undoManager.redo()
-};
-mxEditor.prototype.groupCells = function() {
-  var a = null != this.groupBorderSize ? this.groupBorderSize : this.graph.gridSize;
-  return this.graph.groupCells(this.createGroup(), a)
-};
-mxEditor.prototype.createGroup = function() {
-  return this.graph.getModel().cloneCell(this.defaultGroup)
-};
-mxEditor.prototype.open = function(a) {
-  if (null != a) {
-    var b = mxUtils.load(a).getXml();
-    this.readGraphModel(b.documentElement);
-    this.filename = a;
-    this.fireEvent(new mxEventObject(mxEvent.OPEN, "filename", a))
-  }
-};
-mxEditor.prototype.readGraphModel = function(a) {
-  (new mxCodec(a.ownerDocument)).decode(a, this.graph.getModel());
-  this.resetHistory()
-};
-mxEditor.prototype.save = function(a, b) {
-  a = a || this.getUrlPost();
-  if (null != a && 0 < a.length) {
-    var c = this.writeGraphModel(b);
-    this.postDiagram(a, c);
-    this.setModified(!1)
-  }
-  this.fireEvent(new mxEventObject(mxEvent.SAVE, "url", a))
-};
-mxEditor.prototype.postDiagram = function(a, b) {
-  this.escapePostData && (b = encodeURIComponent(b));
-  mxUtils.post(a, this.postParameterName + "\x3d" + b, mxUtils.bind(this, function(c) {
-    this.fireEvent(new mxEventObject(mxEvent.POST, "request", c, "url", a, "data", b))
-  }))
-};
-mxEditor.prototype.writeGraphModel = function(a) {
-  a = null != a ? a : this.linefeed;
-  var b = (new mxCodec).encode(this.graph.getModel());
-  return mxUtils.getXml(b, a)
-};
-mxEditor.prototype.getUrlPost = function() {
-  return this.urlPost
-};
-mxEditor.prototype.getUrlImage = function() {
-  return this.urlImage
-};
-mxEditor.prototype.connect = function(a, b, c, d) {
-  var e = null;
-  mxClient.IS_LOCAL || (e = new mxSession(this.graph.getModel(), a, b, c), e.addListener(mxEvent.RECEIVE, mxUtils.bind(this, function(a, b) {
-    null != b.getProperty("node").getAttribute("namespace") && this.resetHistory()
-  })), e.addListener(mxEvent.DISCONNECT, d), e.addListener(mxEvent.CONNECT, d), e.addListener(mxEvent.NOTIFY, d), e.addListener(mxEvent.GET, d), e.start());
-  return e
-};
-mxEditor.prototype.swapStyles = function(a, b) {
-  var c = this.graph.getStylesheet().styles[b];
-  this.graph.getView().getStylesheet().putCellStyle(b, this.graph.getStylesheet().styles[a]);
-  this.graph.getStylesheet().putCellStyle(a, c);
-  this.graph.refresh()
-};
-mxEditor.prototype.showProperties = function(a) {
-  a = a || this.graph.getSelectionCell();
-  null == a && (a = this.graph.getCurrentRoot(), null == a && (a = this.graph.getModel().getRoot()));
-  if (null != a) {
-    this.graph.stopEditing(!0);
-    var b = mxUtils.getOffset(this.graph.container),
-      c = b.x + 10,
-      b = b.y;
-    if (null != this.properties && !this.movePropertiesDialog) c = this.properties.getX(), b = this.properties.getY();
-    else {
-      var d = this.graph.getCellBounds(a);
-      null != d && (c += d.x + Math.min(200, d.width), b += d.y)
-    }
-    this.hideProperties();
-    a = this.createProperties(a);
-    null != a && (this.properties = new mxWindow(mxResources.get(this.propertiesResource) || this.propertiesResource, a, c, b, this.propertiesWidth, this.propertiesHeight, !1), this.properties.setVisible(!
-      0))
-  }
-};
-mxEditor.prototype.isPropertiesVisible = function() {
-  return null != this.properties
-};
-mxEditor.prototype.createProperties = function(a) {
-  var b = this.graph.getModel(),
-    c = b.getValue(a);
-  if (mxUtils.isNode(c)) {
-    var d = new mxForm("properties");
-    d.addText("ID", a.getId()).setAttribute("readonly", "true");
-    var e = null,
-      f = null,
-      g = null,
-      h = null,
-      k = null;
-    b.isVertex(a) && (e = b.getGeometry(a), null != e && (f = d.addText("top", e.y), g = d.addText("left", e.x), h = d.addText("width", e.width), k = d.addText("height", e.height)));
-    for (var l = b.getStyle(a), m = d.addText("Style", l || ""), n = c.attributes, p = [], c = 0; c < n.length; c++) p[c] = d.addTextarea(n[c].nodeName,
-      n[c].nodeValue, "label" == n[c].nodeName ? 4 : 2);
-    c = mxUtils.bind(this, function() {
-      this.hideProperties();
-      b.beginUpdate();
-      try {
-        null != e && (e = e.clone(), e.x = parseFloat(g.value), e.y = parseFloat(f.value), e.width = parseFloat(h.value), e.height = parseFloat(k.value), b.setGeometry(a, e));
-        0 < m.value.length ? b.setStyle(a, m.value) : b.setStyle(a, null);
-        for (var c = 0; c < n.length; c++) {
-          var d = new mxCellAttributeChange(a, n[c].nodeName, p[c].value);
-          b.execute(d)
-        }
-        this.graph.isAutoSizeCell(a) && this.graph.updateCellSize(a)
-      } finally {
-        b.endUpdate()
-      }
-    });
-    l = mxUtils.bind(this, function() {
-      this.hideProperties()
-    });
-    d.addButtons(c, l);
-    return d.table
-  }
-  return null
-};
-mxEditor.prototype.hideProperties = function() {
-  null != this.properties && (this.properties.destroy(), this.properties = null)
-};
-mxEditor.prototype.showTasks = function() {
-  if (null == this.tasks) {
-    var a = document.createElement("div");
-    a.style.padding = "4px";
-    a.style.paddingLeft = "20px";
-    var b = document.body.clientWidth,
-      b = new mxWindow(mxResources.get(this.tasksResource) || this.tasksResource, a, b - 220, this.tasksTop, 200);
-    b.setClosable(!0);
-    b.destroyOnClose = !1;
-    var c = mxUtils.bind(this, function(b) {
-      mxEvent.release(a);
-      a.innerHTML = "";
-      this.createTasks(a)
-    });
-    this.graph.getModel().addListener(mxEvent.CHANGE, c);
-    this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
-      c);
-    this.graph.addListener(mxEvent.ROOT, c);
-    null != this.tasksWindowImage && b.setImage(this.tasksWindowImage);
-    this.tasks = b;
-    this.createTasks(a)
-  }
-  this.tasks.setVisible(!0)
-};
-mxEditor.prototype.refreshTasks = function(a) {
-  null != this.tasks && (a = this.tasks.content, mxEvent.release(a), a.innerHTML = "", this.createTasks(a))
-};
-mxEditor.prototype.createTasks = function(a) {};
-mxEditor.prototype.showHelp = function(a) {
-  if (null == this.help) {
-    var b = document.createElement("iframe");
-    b.setAttribute("src", mxResources.get("urlHelp") || this.urlHelp);
-    b.setAttribute("height", "100%");
-    b.setAttribute("width", "100%");
-    b.setAttribute("frameBorder", "0");
-    b.style.backgroundColor = "white";
-    a = document.body.clientWidth;
-    var c = document.body.clientHeight || document.documentElement.clientHeight,
-      d = new mxWindow(mxResources.get(this.helpResource) || this.helpResource, b, (a - this.helpWidth) / 2, (c - this.helpHeight) /
-        3, this.helpWidth, this.helpHeight);
-    d.setMaximizable(!0);
-    d.setClosable(!0);
-    d.destroyOnClose = !1;
-    d.setResizable(!0);
-    null != this.helpWindowImage && d.setImage(this.helpWindowImage);
-    mxClient.IS_NS && (a = function(a) {
-      b.setAttribute("height", d.div.offsetHeight - 26 + "px")
-    }, d.addListener(mxEvent.RESIZE_END, a), d.addListener(mxEvent.MAXIMIZE, a), d.addListener(mxEvent.NORMALIZE, a), d.addListener(mxEvent.SHOW, a));
-    this.help = d
-  }
-  this.help.setVisible(!0)
-};
-mxEditor.prototype.showOutline = function() {
-  if (null == this.outline) {
-    var a = document.createElement("div");
-    a.style.overflow = "hidden";
-    a.style.width = "100%";
-    a.style.height = "100%";
-    a.style.background = "white";
-    a.style.cursor = "move";
-    var b = new mxWindow(mxResources.get(this.outlineResource) || this.outlineResource, a, 600, 480, 200, 200, !1),
-      c = new mxOutline(this.graph, a);
-    b.setClosable(!0);
-    b.setResizable(!0);
-    b.destroyOnClose = !1;
-    b.addListener(mxEvent.RESIZE_END, function() {
-      c.update()
-    });
-    this.outline = b;
-    this.outline.outline = c
-  }
-  this.outline.setVisible(!0);
-  this.outline.outline.update(!0)
-};
-mxEditor.prototype.setMode = function(a) {
-  "select" == a ? (this.graph.panningHandler.useLeftButtonForPanning = !1, this.graph.setConnectable(!1)) : "connect" == a ? (this.graph.panningHandler.useLeftButtonForPanning = !1, this.graph.setConnectable(!
-    0)) : "pan" == a && (this.graph.panningHandler.useLeftButtonForPanning = !0, this.graph.setConnectable(!1))
-};
-mxEditor.prototype.createPopupMenu = function(a, b, c) {
-  this.popupHandler.createMenu(this, a, b, c)
-};
-mxEditor.prototype.createEdge = function(a, b) {
-  var c = null;
-  if (null != this.defaultEdge) c = this.graph.getModel().cloneCell(this.defaultEdge);
-  else {
-    c = new mxCell("");
-    c.setEdge(!0);
-    var d = new mxGeometry;
-    d.relative = !0;
-    c.setGeometry(d)
-  }
-  d = this.getEdgeStyle();
-  null != d && c.setStyle(d);
-  return c
-};
-mxEditor.prototype.getEdgeStyle = function() {
-  return this.defaultEdgeStyle
-};
-mxEditor.prototype.consumeCycleAttribute = function(a) {
-  return null != this.cycleAttributeValues && 0 < this.cycleAttributeValues.length && this.graph.isSwimlane(a) ? this.cycleAttributeValues[this.cycleAttributeIndex++ % this.cycleAttributeValues.length] :
-    null
-};
-mxEditor.prototype.cycleAttribute = function(a) {
-  if (null != this.cycleAttributeName) {
-    var b = this.consumeCycleAttribute(a);
-    null != b && a.setStyle(a.getStyle() + ";" + this.cycleAttributeName + "\x3d" + b)
-  }
-};
-mxEditor.prototype.addVertex = function(a, b, c, d) {
-  for (var e = this.graph.getModel(); null != a && !this.graph.isValidDropTarget(a);) a = e.getParent(a);
-  a = null != a ? a : this.graph.getSwimlaneAt(c, d);
-  var f = this.graph.getView().scale,
-    g = e.getGeometry(b),
-    h = e.getGeometry(a);
-  if (this.graph.isSwimlane(b) && !this.graph.swimlaneNesting) a = null;
-  else {
-    if (null == a && this.swimlaneRequired) return null;
-    if (null != a && null != h) {
-      var k = this.graph.getView().getState(a);
-      if (null != k) {
-        if (c -= k.origin.x * f, d -= k.origin.y * f, this.graph.isConstrainedMoving) {
-          var h =
-            g.width,
-            l = g.height,
-            m = k.x + k.width;
-          c + h > m && (c -= c + h - m);
-          m = k.y + k.height;
-          d + l > m && (d -= d + l - m)
-        }
-      } else null != h && (c -= h.x * f, d -= h.y * f)
-    }
-  }
-  g = g.clone();
-  g.x = this.graph.snap(c / f - this.graph.getView().translate.x - this.graph.gridSize / 2);
-  g.y = this.graph.snap(d / f - this.graph.getView().translate.y - this.graph.gridSize / 2);
-  b.setGeometry(g);
-  null == a && (a = this.graph.getDefaultParent());
-  this.cycleAttribute(b);
-  this.fireEvent(new mxEventObject(mxEvent.BEFORE_ADD_VERTEX, "vertex", b, "parent", a));
-  e.beginUpdate();
-  try {
-    b = this.graph.addCell(b,
-      a), null != b && (this.graph.constrainChild(b), this.fireEvent(new mxEventObject(mxEvent.ADD_VERTEX, "vertex", b)))
-  } finally {
-    e.endUpdate()
-  }
-  null != b && (this.graph.setSelectionCell(b), this.graph.scrollCellToVisible(b), this.fireEvent(new mxEventObject(mxEvent.AFTER_ADD_VERTEX, "vertex", b)));
-  return b
-};
-mxEditor.prototype.destroy = function() {
-  this.destroyed || (this.destroyed = !0, null != this.tasks && this.tasks.destroy(), null != this.outline && this.outline.destroy(), null != this.properties && this.properties.destroy(), null !=
-    this.keyHandler && this.keyHandler.destroy(), null != this.rubberband && this.rubberband.destroy(), null != this.toolbar && this.toolbar.destroy(), null != this.graph && this.graph.destroy(),
-    this.templates = this.status = null)
-};
-var mxCodecRegistry = {
-  codecs: [],
-  aliases: [],
-  register: function(a) {
-    if (null != a) {
-      var b = a.getName();
-      mxCodecRegistry.codecs[b] = a;
-      var c = mxUtils.getFunctionName(a.template.constructor);
-      c != b && mxCodecRegistry.addAlias(c, b)
-    }
-    return a
-  },
-  addAlias: function(a, b) {
-    mxCodecRegistry.aliases[a] = b
-  },
-  getCodec: function(a) {
-    var b = null;
-    if (null != a) {
-      var b = mxUtils.getFunctionName(a),
-        c = mxCodecRegistry.aliases[b];
-      null != c && (b = c);
-      b = mxCodecRegistry.codecs[b];
-      if (null == b) try {
-        b = new mxObjectCodec(new a), mxCodecRegistry.register(b)
-      } catch (d) {}
-    }
-    return b
-  }
-};
-
-function mxCodec(a) {
-  this.document = a || mxUtils.createXmlDocument();
-  this.objects = []
-}
-mxCodec.prototype.document = null;
-mxCodec.prototype.objects = null;
-mxCodec.prototype.encodeDefaults = !1;
-mxCodec.prototype.putObject = function(a, b) {
-  return this.objects[a] = b
-};
-mxCodec.prototype.getObject = function(a) {
-  var b = null;
-  null != a && (b = this.objects[a], null == b && (b = this.lookup(a), null == b && (a = this.getElementById(a), null != a && (b = this.decode(a)))));
-  return b
-};
-mxCodec.prototype.lookup = function(a) {
-  return null
-};
-mxCodec.prototype.getElementById = function(a, b) {
-  return mxUtils.findNodeByAttribute(this.document.documentElement, null != b ? b : "id", a)
-};
-mxCodec.prototype.getId = function(a) {
-  var b = null;
-  null != a && (b = this.reference(a), null == b && a instanceof mxCell && (b = a.getId(), null == b && (b = mxCellPath.create(a), 0 == b.length && (b = "root"))));
-  return b
-};
-mxCodec.prototype.reference = function(a) {
-  return null
-};
-mxCodec.prototype.encode = function(a) {
-  var b = null;
-  if (null != a && null != a.constructor) {
-    var c = mxCodecRegistry.getCodec(a.constructor);
-    null != c ? b = c.encode(this, a) : mxUtils.isNode(a) ? b = mxClient.IS_IE ? a.cloneNode(!0) : this.document.importNode(a, !0) : mxLog.warn("mxCodec.encode: No codec for " + mxUtils.getFunctionName(
-      a.constructor))
-  }
-  return b
-};
-mxCodec.prototype.decode = function(a, b) {
-  var c = null;
-  if (null != a && a.nodeType == mxConstants.NODETYPE_ELEMENT) {
-    var d = null;
-    try {
-      d = eval(a.nodeName)
-    } catch (e) {}
-    try {
-      var f = mxCodecRegistry.getCodec(d);
-      null != f ? c = f.decode(this, a, b) : (c = a.cloneNode(!0), c.removeAttribute("as"))
-    } catch (g) {
-      mxLog.debug("Cannot decode " + a.nodeName + ": " + g.message)
-    }
-  }
-  return c
-};
-mxCodec.prototype.encodeCell = function(a, b, c) {
-  b.appendChild(this.encode(a));
-  if (null == c || c) {
-    c = a.getChildCount();
-    for (var d = 0; d < c; d++) this.encodeCell(a.getChildAt(d), b)
-  }
-};
-mxCodec.prototype.isCellCodec = function(a) {
-  return null != a && "function" == typeof a.isCellCodec ? a.isCellCodec() : !1
-};
-mxCodec.prototype.decodeCell = function(a, b) {
-  b = null != b ? b : !0;
-  var c = null;
-  if (null != a && a.nodeType == mxConstants.NODETYPE_ELEMENT) {
-    c = mxCodecRegistry.getCodec(a.nodeName);
-    if (!this.isCellCodec(c))
-      for (var d = a.firstChild; null != d && !this.isCellCodec(c);) c = mxCodecRegistry.getCodec(d.nodeName), d = d.nextSibling;
-    this.isCellCodec(c) || (c = mxCodecRegistry.getCodec(mxCell));
-    c = c.decode(this, a);
-    b && this.insertIntoGraph(c)
-  }
-  return c
-};
-mxCodec.prototype.insertIntoGraph = function(a) {
-  var b = a.parent,
-    c = a.getTerminal(!0),
-    d = a.getTerminal(!1);
-  a.setTerminal(null, !1);
-  a.setTerminal(null, !0);
-  a.parent = null;
-  null != b && b.insert(a);
-  null != c && c.insertEdge(a, !0);
-  null != d && d.insertEdge(a, !1)
-};
-mxCodec.prototype.setAttribute = function(a, b, c) {
-  null != b && null != c && a.setAttribute(b, c)
-};
-
-function mxObjectCodec(a, b, c, d) {
-  this.template = a;
-  this.exclude = null != b ? b : [];
-  this.idrefs = null != c ? c : [];
-  this.mapping = null != d ? d : [];
-  this.reverse = {};
-  for (var e in this.mapping) this.reverse[this.mapping[e]] = e
-}
-mxObjectCodec.prototype.template = null;
-mxObjectCodec.prototype.exclude = null;
-mxObjectCodec.prototype.idrefs = null;
-mxObjectCodec.prototype.mapping = null;
-mxObjectCodec.prototype.reverse = null;
-mxObjectCodec.prototype.getName = function() {
-  return mxUtils.getFunctionName(this.template.constructor)
-};
-mxObjectCodec.prototype.cloneTemplate = function() {
-  return new this.template.constructor
-};
-mxObjectCodec.prototype.getFieldName = function(a) {
-  if (null != a) {
-    var b = this.reverse[a];
-    null != b && (a = b)
-  }
-  return a
-};
-mxObjectCodec.prototype.getAttributeName = function(a) {
-  if (null != a) {
-    var b = this.mapping[a];
-    null != b && (a = b)
-  }
-  return a
-};
-mxObjectCodec.prototype.isExcluded = function(a, b, c, d) {
-  return b == mxObjectIdentity.FIELD_NAME || 0 <= mxUtils.indexOf(this.exclude, b)
-};
-mxObjectCodec.prototype.isReference = function(a, b, c, d) {
-  return 0 <= mxUtils.indexOf(this.idrefs, b)
-};
-mxObjectCodec.prototype.encode = function(a, b) {
-  var c = a.document.createElement(this.getName());
-  b = this.beforeEncode(a, b, c);
-  this.encodeObject(a, b, c);
-  return this.afterEncode(a, b, c)
-};
-mxObjectCodec.prototype.encodeObject = function(a, b, c) {
-  a.setAttribute(c, "id", a.getId(b));
-  for (var d in b) {
-    var e = d,
-      f = b[e];
-    null != f && !this.isExcluded(b, e, f, !0) && (mxUtils.isNumeric(e) && (e = null), this.encodeValue(a, b, e, f, c))
-  }
-};
-mxObjectCodec.prototype.encodeValue = function(a, b, c, d, e) {
-  if (null != d) {
-    if (this.isReference(b, c, d, !0)) {
-      var f = a.getId(d);
-      if (null == f) {
-        mxLog.warn("mxObjectCodec.encode: No ID for " + this.getName() + "." + c + "\x3d" + d);
-        return
-      }
-      d = f
-    }
-    f = this.template[c];
-    if (null == c || a.encodeDefaults || f != d) c = this.getAttributeName(c), this.writeAttribute(a, b, c, d, e)
-  }
-};
-mxObjectCodec.prototype.writeAttribute = function(a, b, c, d, e) {
-  "object" != typeof d ? this.writePrimitiveAttribute(a, b, c, d, e) : this.writeComplexAttribute(a, b, c, d, e)
-};
-mxObjectCodec.prototype.writePrimitiveAttribute = function(a, b, c, d, e) {
-  d = this.convertValueToXml(d);
-  null == c ? (b = a.document.createElement("add"), "function" == typeof d ? b.appendChild(a.document.createTextNode(d)) : a.setAttribute(b, "value", d), e.appendChild(b)) : "function" != typeof d &&
-    a.setAttribute(e, c, d)
-};
-mxObjectCodec.prototype.writeComplexAttribute = function(a, b, c, d, e) {
-  a = a.encode(d);
-  null != a ? (null != c && a.setAttribute("as", c), e.appendChild(a)) : mxLog.warn("mxObjectCodec.encode: No node for " + this.getName() + "." + c + ": " + d)
-};
-mxObjectCodec.prototype.convertValueToXml = function(a) {
-  if ("undefined" == typeof a.length && (!0 == a || !1 == a)) a = !0 == a ? "1" : "0";
-  return a
-};
-mxObjectCodec.prototype.convertValueFromXml = function(a) {
-  mxUtils.isNumeric(a) && (a = parseFloat(a));
-  //
-  // Marco ([email-masked]) + Andrea Bianco ([email-masked])
-  // 2016-02-24
-  //
-  // mxUtils.isNumeric(a) && (a = ((Number(a) === a) && (a % 1 !== 0)) ? parseFloat(a) : a);
-  return a
-};
-mxObjectCodec.prototype.beforeEncode = function(a, b, c) {
-  return b
-};
-mxObjectCodec.prototype.afterEncode = function(a, b, c) {
-  return c
-};
-mxObjectCodec.prototype.decode = function(a, b, c) {
-  var d = b.getAttribute("id"),
-    e = a.objects[d];
-  null == e && (e = c || this.cloneTemplate(), null != d && a.putObject(d, e));
-  b = this.beforeDecode(a, b, e);
-  this.decodeNode(a, b, e);
-  return this.afterDecode(a, b, e)
-};
-mxObjectCodec.prototype.decodeNode = function(a, b, c) {
-  null != b && (this.decodeAttributes(a, b, c), this.decodeChildren(a, b, c))
-};
-mxObjectCodec.prototype.decodeAttributes = function(a, b, c) {
-  b = b.attributes;
-  if (null != b)
-    for (var d = 0; d < b.length; d++) this.decodeAttribute(a, b[d], c)
-};
-mxObjectCodec.prototype.decodeAttribute = function(a, b, c) {
-  var d = b.nodeName;
-  if ("as" != d && "id" != d) {
-    b = this.convertValueFromXml(b.nodeValue);
-    var e = this.getFieldName(d);
-    if (this.isReference(c, e, b, !1)) {
-      a = a.getObject(b);
-      if (null == a) {
-        mxLog.warn("mxObjectCodec.decode: No object for " + this.getName() + "." + d + "\x3d" + b);
-        return
-      }
-      b = a
-    }
-    this.isExcluded(c, d, b, !1) || (c[d] = b)
-  }
-};
-mxObjectCodec.prototype.decodeChildren = function(a, b, c) {
-  for (b = b.firstChild; null != b;) {
-    var d = b.nextSibling;
-    b.nodeType == mxConstants.NODETYPE_ELEMENT && !this.processInclude(a, b, c) && this.decodeChild(a, b, c);
-    b = d
-  }
-};
-mxObjectCodec.prototype.decodeChild = function(a, b, c) {
-  var d = this.getFieldName(b.getAttribute("as"));
-  if (null == d || !this.isExcluded(c, d, b, !1)) {
-    var e = this.getFieldTemplate(c, d, b),
-      f = null;
-    "add" == b.nodeName ? (f = b.getAttribute("value"), null == f && (f = mxUtils.eval(mxUtils.getTextContent(b)))) : f = a.decode(b, e);
-    this.addObjectValue(c, d, f, e)
-  }
-};
-mxObjectCodec.prototype.getFieldTemplate = function(a, b, c) {
-  a = a[b];
-  a instanceof Array && 0 < a.length && (a = null);
-  return a
-};
-mxObjectCodec.prototype.addObjectValue = function(a, b, c, d) {
-  null != c && c != d && (null != b && 0 < b.length ? a[b] = c : a.push(c))
-};
-mxObjectCodec.prototype.processInclude = function(a, b, c) {
-  if ("include" == b.nodeName) {
-    b = b.getAttribute("name");
-    if (null != b) try {
-      var d = mxUtils.load(b).getDocumentElement();
-      null != d && a.decode(d, c)
-    } catch (e) {}
-    return !0
-  }
-  return !1
-};
-mxObjectCodec.prototype.beforeDecode = function(a, b, c) {
-  return b
-};
-mxObjectCodec.prototype.afterDecode = function(a, b, c) {
-  return c
-};
-mxCodecRegistry.register(function() {
-  var a = new mxObjectCodec(new mxCell, ["children", "edges", "overlays", "mxTransient"], ["parent", "source", "target"]);
-  a.isCellCodec = function() {
-    return !0
-  };
-  a.isExcluded = function(a, c, d, e) {
-    return mxObjectCodec.prototype.isExcluded.apply(this, arguments) || e && "value" == c && d.nodeType == mxConstants.NODETYPE_ELEMENT
-  };
-  a.afterEncode = function(a, c, d) {
-    if (null != c.value && c.value.nodeType == mxConstants.NODETYPE_ELEMENT) {
-      var e = d;
-      d = mxClient.IS_IE ? c.value.cloneNode(!0) : a.document.importNode(c.value, !0);
-      d.appendChild(e);
-      a = e.getAttribute("id");
-      d.setAttribute("id", a);
-      e.removeAttribute("id")
-    }
-    return d
-  };
-  a.beforeDecode = function(a, c, d) {
-    var e = c,
-      f = this.getName();
-    c.nodeName != f ? (e = c.getElementsByTagName(f)[0], null != e && e.parentNode == c ? (mxUtils.removeWhitespace(e, !0), mxUtils.removeWhitespace(e, !1), e.parentNode.removeChild(e)) : e =
-      null, d.value = c.cloneNode(!0), c = d.value.getAttribute("id"), null != c && (d.setId(c), d.value.removeAttribute("id"))) : d.setId(c.getAttribute("id"));
-    if (null != e)
-      for (c = 0; c < this.idrefs.length; c++) {
-        var f =
-          this.idrefs[c],
-          g = e.getAttribute(f);
-        if (null != g) {
-          e.removeAttribute(f);
-          var h = a.objects[g] || a.lookup(g);
-          null == h && (g = a.getElementById(g), null != g && (h = (mxCodecRegistry.codecs[g.nodeName] || this).decode(a, g)));
-          d[f] = h
-        }
-      }
-    return e
-  };
-  return a
-}());
-mxCodecRegistry.register(function() {
-  var a = new mxObjectCodec(new mxGraphModel);
-  a.encodeObject = function(a, c, d) {
-    var e = a.document.createElement("root");
-    a.encodeCell(c.getRoot(), e);
-    d.appendChild(e)
-  };
-  a.decodeChild = function(a, c, d) {
-    "root" == c.nodeName ? this.decodeRoot(a, c, d) : mxObjectCodec.prototype.decodeChild.apply(this, arguments)
-  };
-  a.decodeRoot = function(a, c, d) {
-    var e = null;
-    for (c = c.firstChild; null != c;) {
-      var f = a.decodeCell(c);
-      null != f && null == f.getParent() && (e = f);
-      c = c.nextSibling
-    }
-    null != e && d.setRoot(e)
-  };
-  return a
-}());
-mxCodecRegistry.register(function() {
-  var a = new mxObjectCodec(new mxRootChange, ["model", "previous", "root"]);
-  a.afterEncode = function(a, c, d) {
-    a.encodeCell(c.root, d);
-    return d
-  };
-  a.beforeDecode = function(a, c, d) {
-    if (null != c.firstChild && c.firstChild.nodeType == mxConstants.NODETYPE_ELEMENT) {
-      c = c.cloneNode(!0);
-      var e = c.firstChild;
-      d.root = a.decodeCell(e, !1);
-      d = e.nextSibling;
-      e.parentNode.removeChild(e);
-      for (e = d; null != e;) d = e.nextSibling, a.decodeCell(e), e.parentNode.removeChild(e), e = d
-    }
-    return c
-  };
-  a.afterDecode = function(a, c,
-    d) {
-    d.previous = d.root;
-    return d
-  };
-  return a
-}());
-mxCodecRegistry.register(function() {
-  var a = new mxObjectCodec(new mxChildChange, ["model", "child", "previousIndex"], ["parent", "previous"]);
-  a.isReference = function(a, c, d, e) {
-    return "child" == c && (null != a.previous || !e) ? !0 : 0 <= mxUtils.indexOf(this.idrefs, c)
-  };
-  a.afterEncode = function(a, c, d) {
-    this.isReference(c, "child", c.child, !0) ? d.setAttribute("child", a.getId(c.child)) : a.encodeCell(c.child, d);
-    return d
-  };
-  a.beforeDecode = function(a, c, d) {
-    if (null != c.firstChild && c.firstChild.nodeType == mxConstants.NODETYPE_ELEMENT) {
-      c = c.cloneNode(!0);
-      var e = c.firstChild;
-      d.child = a.decodeCell(e, !1);
-      d = e.nextSibling;
-      e.parentNode.removeChild(e);
-      for (e = d; null != e;) {
-        d = e.nextSibling;
-        if (e.nodeType == mxConstants.NODETYPE_ELEMENT) {
-          var f = e.getAttribute("id");
-          null == a.lookup(f) && a.decodeCell(e)
-        }
-        e.parentNode.removeChild(e);
-        e = d
-      }
-    } else e = c.getAttribute("child"), d.child = a.getObject(e);
-    return c
-  };
-  a.afterDecode = function(a, c, d) {
-    d.child.parent = d.previous;
-    d.previous = d.parent;
-    d.previousIndex = d.index;
-    return d
-  };
-  return a
-}());
-mxCodecRegistry.register(function() {
-  var a = new mxObjectCodec(new mxTerminalChange, ["model", "previous"], ["cell", "terminal"]);
-  a.afterDecode = function(a, c, d) {
-    d.previous = d.terminal;
-    return d
-  };
-  return a
-}());
-var mxGenericChangeCodec = function(a, b) {
-  var c = new mxObjectCodec(a, ["model", "previous"], ["cell"]);
-  c.afterDecode = function(a, c, f) {
-    mxUtils.isNode(f.cell) && (f.cell = a.decodeCell(f.cell, !1));
-    f.previous = f[b];
-    return f
-  };
-  return c
-};
-mxCodecRegistry.register(mxGenericChangeCodec(new mxValueChange, "value"));
-mxCodecRegistry.register(mxGenericChangeCodec(new mxStyleChange, "style"));
-mxCodecRegistry.register(mxGenericChangeCodec(new mxGeometryChange, "geometry"));
-mxCodecRegistry.register(mxGenericChangeCodec(new mxCollapseChange, "collapsed"));
-mxCodecRegistry.register(mxGenericChangeCodec(new mxVisibleChange, "visible"));
-mxCodecRegistry.register(mxGenericChangeCodec(new mxCellAttributeChange, "value"));
-mxCodecRegistry.register(function() {
-  return new mxObjectCodec(new mxGraph, "graphListeners eventListeners view container cellRenderer editor selection".split(" "))
-}());
-mxCodecRegistry.register(function() {
-  var a = new mxObjectCodec(new mxGraphView);
-  a.encode = function(a, c) {
-    return this.encodeCell(a, c, c.graph.getModel().getRoot())
-  };
-  a.encodeCell = function(a, c, d) {
-    var e = c.graph.getModel(),
-      f = c.getState(d),
-      g = e.getParent(d);
-    if (null == g || null != f) {
-      var h = e.getChildCount(d),
-        k = c.graph.getCellGeometry(d),
-        l = null;
-      g == e.getRoot() ? l = "layer" : null == g ? l = "graph" : e.isEdge(d) ? l = "edge" : 0 < h && null != k ? l = "group" : e.isVertex(d) && (l = "vertex");
-      if (null != l) {
-        var m = a.document.createElement(l);
-        null != c.graph.getLabel(d) &&
-          (m.setAttribute("label", c.graph.getLabel(d)), c.graph.isHtmlLabel(d) && m.setAttribute("html", !0));
-        if (null == g) {
-          var n = c.getGraphBounds();
-          null != n && (m.setAttribute("x", Math.round(n.x)), m.setAttribute("y", Math.round(n.y)), m.setAttribute("width", Math.round(n.width)), m.setAttribute("height", Math.round(n.height)));
-          m.setAttribute("scale", c.scale)
-        } else if (null != f && null != k) {
-          for (n in f.style) g = f.style[n], "function" == typeof g && "object" == typeof g && (g = mxStyleRegistry.getName(g)), null != g && ("function" != typeof g && "object" !=
-            typeof g) && m.setAttribute(n, g);
-          g = f.absolutePoints;
-          if (null != g && 0 < g.length) {
-            k = Math.round(g[0].x) + "," + Math.round(g[0].y);
-            for (n = 1; n < g.length; n++) k += " " + Math.round(g[n].x) + "," + Math.round(g[n].y);
-            m.setAttribute("points", k)
-          } else m.setAttribute("x", Math.round(f.x)), m.setAttribute("y", Math.round(f.y)), m.setAttribute("width", Math.round(f.width)), m.setAttribute("height", Math.round(f.height));
-          n = f.absoluteOffset;
-          null != n && (0 != n.x && m.setAttribute("dx", Math.round(n.x)), 0 != n.y && m.setAttribute("dy", Math.round(n.y)))
-        }
-        for (n =
-          0; n < h; n++) f = this.encodeCell(a, c, e.getChildAt(d, n)), null != f && m.appendChild(f)
-      }
-    }
-    return m
-  };
-  return a
-}());
-mxCodecRegistry.register(function() {
-  var a = new mxObjectCodec(new mxStylesheet);
-  a.encode = function(a, c) {
-    var d = a.document.createElement(this.getName()),
-      e;
-    for (e in c.styles) {
-      var f = c.styles[e],
-        g = a.document.createElement("add");
-      if (null != e) {
-        g.setAttribute("as", e);
-        for (var h in f) {
-          var k = this.getStringValue(h, f[h]);
-          if (null != k) {
-            var l = a.document.createElement("add");
-            l.setAttribute("value", k);
-            l.setAttribute("as", h);
-            g.appendChild(l)
-          }
-        }
-        0 < g.childNodes.length && d.appendChild(g)
-      }
-    }
-    return d
-  };
-  a.getStringValue = function(a,
-    c) {
-    var d = typeof c;
-    "function" == d ? c = mxStyleRegistry.getName(style[j]) : "object" == d && (c = null);
-    return c
-  };
-  a.decode = function(a, c, d) {
-    d = d || new this.template.constructor;
-    var e = c.getAttribute("id");
-    null != e && (a.objects[e] = d);
-    for (c = c.firstChild; null != c;) {
-      if (!this.processInclude(a, c, d) && "add" == c.nodeName && (e = c.getAttribute("as"), null != e)) {
-        var f = c.getAttribute("extend"),
-          g = null != f ? mxUtils.clone(d.styles[f]) : null;
-        null == g && (null != f && mxLog.warn("mxStylesheetCodec.decode: stylesheet " + f + " not found to extend"), g = {});
-        for (f = c.firstChild; null != f;) {
-          if (f.nodeType == mxConstants.NODETYPE_ELEMENT) {
-            var h = f.getAttribute("as");
-            if ("add" == f.nodeName) {
-              var k = mxUtils.getTextContent(f),
-                l = null;
-              null != k && 0 < k.length ? l = mxUtils.eval(k) : (l = f.getAttribute("value"), mxUtils.isNumeric(l) && (l = parseFloat(l)));
-              null != l && (g[h] = l)
-            } else "remove" == f.nodeName && delete g[h]
-          }
-          f = f.nextSibling
-        }
-        d.putCellStyle(e, g)
-      }
-      c = c.nextSibling
-    }
-    return d
-  };
-  return a
-}());
-mxCodecRegistry.register(function() {
-  var a = new mxObjectCodec(new mxDefaultKeyHandler);
-  a.encode = function(a, c) {
-    return null
-  };
-  a.decode = function(a, c, d) {
-    if (null != d)
-      for (c = c.firstChild; null != c;) {
-        if (!this.processInclude(a, c, d) && "add" == c.nodeName) {
-          var e = c.getAttribute("as"),
-            f = c.getAttribute("action"),
-            g = c.getAttribute("control");
-          d.bindAction(e, f, g)
-        }
-        c = c.nextSibling
-      }
-    return d
-  };
-  return a
-}());
-mxCodecRegistry.register(function() {
-  var a = new mxObjectCodec(new mxDefaultToolbar);
-  a.encode = function(a, c) {
-    return null
-  };
-  a.decode = function(a, c, d) {
-    if (null != d) {
-      var e = d.editor;
-      for (c = c.firstChild; null != c;) {
-        if (c.nodeType == mxConstants.NODETYPE_ELEMENT && !this.processInclude(a, c, d))
-          if ("separator" == c.nodeName) d.addSeparator();
-          else if ("br" == c.nodeName) d.toolbar.addBreak();
-        else if ("hr" == c.nodeName) d.toolbar.addLine();
-        else if ("add" == c.nodeName) {
-          var f = c.getAttribute("as"),
-            f = mxResources.get(f) || f,
-            g = c.getAttribute("icon"),
-            h = c.getAttribute("pressedIcon"),
-            k = c.getAttribute("action"),
-            l = c.getAttribute("mode"),
-            m = c.getAttribute("template"),
-            n = "0" != c.getAttribute("toggle"),
-            p = mxUtils.getTextContent(c),
-            q = null;
-          if (null != k) q = d.addItem(f, g, k, h);
-          else if (null != l) var s = mxUtils.eval(p),
-            q = d.addMode(f, g, l, h, s);
-          else if (null != m || null != p && 0 < p.length) q = e.templates[m], m = c.getAttribute("style"), null != q && null != m && (q = q.clone(), q.setStyle(m)), m = null, null != p && 0 <
-            p.length && (m = mxUtils.eval(p)), q = d.addPrototype(f, g, q, h, m, n);
-          else if (h = mxUtils.getChildNodes(c),
-            0 < h.length)
-            if (null == g) {
-              m = d.addActionCombo(f);
-              for (f = 0; f < h.length; f++) n = h[f], "separator" == n.nodeName ? d.addOption(m, "---") : "add" == n.nodeName && (g = n.getAttribute("as"), n = n.getAttribute("action"), d.addActionOption(
-                m, g, n))
-            } else {
-              var r = null,
-                t = d.addPrototype(f, g, function() {
-                  var a = e.templates[r.value];
-                  if (null != a) {
-                    var a = a.clone(),
-                      b = r.options[r.selectedIndex].cellStyle;
-                    null != b && a.setStyle(b);
-                    return a
-                  }
-                  mxLog.warn("Template " + a + " not found");
-                  return null
-                }, null, null, n),
-                r = d.addCombo();
-              mxEvent.addListener(r, "change",
-                function() {
-                  d.toolbar.selectMode(t, function(a) {
-                    a = mxUtils.convertPoint(e.graph.container, mxEvent.getClientX(a), mxEvent.getClientY(a));
-                    return e.addVertex(null, s(), a.x, a.y)
-                  });
-                  d.toolbar.noReset = !1
-                });
-              for (f = 0; f < h.length; f++) n = h[f], "separator" == n.nodeName ? d.addOption(r, "---") : "add" == n.nodeName && (g = n.getAttribute("as"), p = n.getAttribute("template"), d.addOption(
-                r, g, p || m).cellStyle = n.getAttribute("style"))
-            }
-          null != q && (m = c.getAttribute("id"), null != m && 0 < m.length && q.setAttribute("id", m))
-        }
-        c = c.nextSibling
-      }
-    }
-    return d
-  };
-  return a
-}());
-mxCodecRegistry.register(function() {
-  var a = new mxObjectCodec(new mxDefaultPopupMenu);
-  a.encode = function(a, c) {
-    return null
-  };
-  a.decode = function(a, c, d) {
-    var e = c.getElementsByTagName("include")[0];
-    null != e ? this.processInclude(a, e, d) : null != d && (d.config = c);
-    return d
-  };
-  return a
-}());
-mxCodecRegistry.register(function() {
-  var a = new mxObjectCodec(new mxEditor, "modified lastSnapshot ignoredChanges undoManager graphContainer toolbarContainer".split(" "));
-  a.afterDecode = function(a, c, d) {
-    a = c.getAttribute("defaultEdge");
-    null != a && (c.removeAttribute("defaultEdge"), d.defaultEdge = d.templates[a]);
-    a = c.getAttribute("defaultGroup");
-    null != a && (c.removeAttribute("defaultGroup"), d.defaultGroup = d.templates[a]);
-    return d
-  };
-  a.decodeChild = function(a, c, d) {
-    if ("Array" == c.nodeName) {
-      if ("templates" == c.getAttribute("as")) {
-        this.decodeTemplates(a,
-          c, d);
-        return
-      }
-    } else if ("ui" == c.nodeName) {
-      this.decodeUi(a, c, d);
-      return
-    }
-    mxObjectCodec.prototype.decodeChild.apply(this, arguments)
-  };
-  a.decodeUi = function(a, c, d) {
-    for (a = c.firstChild; null != a;) {
-      if ("add" == a.nodeName) {
-        c = a.getAttribute("as");
-        var e = a.getAttribute("element"),
-          f = a.getAttribute("style"),
-          g = null;
-        if (null != e) g = document.getElementById(e), null != g && null != f && (g.style.cssText += ";" + f);
-        else {
-          var e = parseInt(a.getAttribute("x")),
-            h = parseInt(a.getAttribute("y")),
-            k = a.getAttribute("width"),
-            l = a.getAttribute("height"),
-            g = document.createElement("div");
-          g.style.cssText = f;
-          (new mxWindow(mxResources.get(c) || c, g, e, h, k, l, !1, !0)).setVisible(!0)
-        }
-        "graph" == c ? d.setGraphContainer(g) : "toolbar" == c ? d.setToolbarContainer(g) : "title" == c ? d.setTitleContainer(g) : "status" == c ? d.setStatusContainer(g) : "map" == c && d.setMapContainer(
-          g)
-      } else "resource" == a.nodeName ? mxResources.add(a.getAttribute("basename")) : "stylesheet" == a.nodeName && mxClient.link("stylesheet", a.getAttribute("name"));
-      a = a.nextSibling
-    }
-  };
-  a.decodeTemplates = function(a, c, d) {
-    null == d.templates &&
-      (d.templates = []);
-    c = mxUtils.getChildNodes(c);
-    for (var e = 0; e < c.length; e++) {
-      for (var f = c[e].getAttribute("as"), g = c[e].firstChild; null != g && 1 != g.nodeType;) g = g.nextSibling;
-      null != g && (d.templates[f] = a.decodeCell(g))
-    }
-  };
-  return a
-}());
+var _0xd587=["\x32\x2E\x30\x2E\x30\x2E\x30","\x4D\x53\x49\x45","\x69\x6E\x64\x65\x78\x4F\x66","\x75\x73\x65\x72\x41\x67\x65\x6E\x74","\x4D\x53\x49\x45\x20\x36","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x76","\x6F","\x4D\x6F\x7A\x69\x6C\x6C\x61\x2F","\x4F\x70\x65\x72\x61\x2F","\x50\x72\x65\x73\x74\x6F\x2F\x32\x2E\x34\x2E","\x50\x72\x65\x73\x74\x6F\x2F\x32\x2E\x33\x2E","\x50\x72\x65\x73\x74\x6F\x2F\x32\x2E\x32\x2E","\x50\x72\x65\x73\x74\x6F\x2F\x32\x2E\x31\x2E","\x50\x72\x65\x73\x74\x6F\x2F\x32\x2E\x30\x2E","\x50\x72\x65\x73\x74\x6F\x2F\x31\x2E","\x41\x70\x70\x6C\x65\x57\x65\x62\x4B\x69\x74\x2F","\x43\x68\x72\x6F\x6D\x65\x2F","\x46\x69\x72\x65\x66\x6F\x78\x2F","\x46\x69\x72\x65\x66\x6F\x78\x2F\x31\x2E","\x46\x69\x72\x65\x66\x6F\x78\x2F\x32\x2E","\x49\x63\x65\x77\x65\x61\x73\x65\x6C\x2F","\x49\x63\x65\x77\x65\x61\x73\x65\x6C\x2F\x31\x2E","\x49\x63\x65\x77\x65\x61\x73\x65\x6C\x2F\x32\x2E","\x53\x65\x61\x4D\x6F\x6E\x6B\x65\x79\x2F","\x53\x65\x61\x4D\x6F\x6E\x6B\x65\x79\x2F\x31\x2E","\x49\x63\x65\x61\x70\x65\x2F","\x49\x63\x65\x61\x70\x65\x2F\x31\x2E","\x53\x65\x61\x6D\x6F\x6E\x6B\x65\x79\x2F","\x47\x61\x6C\x65\x6F\x6E\x2F","\x45\x70\x69\x70\x68\x61\x6E\x79\x2F","\x47\x65\x63\x6B\x6F\x2F","\x43\x61\x6D\x69\x6E\x6F\x2F\x31\x2E","\x45\x70\x69\x70\x68\x61\x6E\x79\x2F\x32\x2E","\x4D\x6F\x7A\x69\x6C\x6C\x61\x2F\x32\x2E","\x4D\x49\x43\x52\x4F\x53\x4F\x46\x54\x20\x49\x4E\x54\x45\x52\x4E\x45\x54\x20\x45\x58\x50\x4C\x4F\x52\x45\x52","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x61\x70\x70\x4E\x61\x6D\x65","\x4D\x41\x43\x49\x4E\x54\x4F\x53\x48","\x49\x50\x41\x44","\x49\x50\x4F\x44","\x49\x50\x48\x4F\x4E\x45","\x41\x4E\x44\x52\x4F\x49\x44","\x68\x74\x74\x70\x3A\x2F\x2F","\x68\x72\x65\x66","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x68\x74\x74\x70\x73\x3A\x2F\x2F","\x49\x53\x5F\x56\x4D\x4C","\x49\x53\x5F\x53\x56\x47","\x49\x53\x5F\x49\x45\x36","\x3C\x6C\x69\x6E\x6B\x20\x72\x65\x6C\x3D\x22","\x22\x20\x68\x72\x65\x66\x3D\x22","\x22\x20\x63\x68\x61\x72\x73\x65\x74\x3D\x22\x49\x53\x4F\x2D\x38\x38\x35\x39\x2D\x31\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x2F\x3E","\x77\x72\x69\x74\x65","\x6C\x69\x6E\x6B","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x72\x65\x6C","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x68\x61\x72\x73\x65\x74","\x49\x53\x4F\x2D\x38\x38\x35\x39\x2D\x31","\x74\x79\x70\x65","\x74\x65\x78\x74\x2F\x63\x73\x73","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x68\x65\x61\x64","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x3C\x73\x63\x72\x69\x70\x74\x20\x73\x72\x63\x3D\x22","\x22\x3E\x3C\x2F\x73\x63\x72\x69\x70\x74\x3E","\x6C\x65\x6E\x67\x74\x68","\x6F\x62\x6A\x65\x63\x74\x73","\x6D\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x4C\x69\x73\x74","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x49\x53\x5F\x4F\x50","\x49\x53\x5F\x4F\x54","\x43\x53\x53\x5F\x50\x52\x45\x46\x49\x58","\x4F","\x49\x53\x5F\x53\x46","\x49\x53\x5F\x47\x43","\x57\x65\x62\x6B\x69\x74","\x49\x53\x5F\x4D\x54","\x4D\x6F\x7A","\x49\x53\x5F\x49\x45","\x6D\x73","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x2E\x74\x78\x74","\x2F","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x62\x61\x73\x65\x50\x61\x74\x68","\x2E","\x69\x6D\x61\x67\x65\x42\x61\x73\x65\x50\x61\x74\x68","\x2F\x69\x6D\x61\x67\x65\x73","\x6C\x61\x6E\x67\x75\x61\x67\x65","\x75\x73\x65\x72\x4C\x61\x6E\x67\x75\x61\x67\x65","\x64\x65\x66\x61\x75\x6C\x74\x4C\x61\x6E\x67\x75\x61\x67\x65","\x65\x6E","\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x2F\x63\x73\x73\x2F\x63\x6F\x6D\x6D\x6F\x6E\x2E\x63\x73\x73","\x6C\x61\x6E\x67\x75\x61\x67\x65\x73","\x75\x72\x6E\x3A\x73\x63\x68\x65\x6D\x61\x73\x2D\x6D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2D\x63\x6F\x6D\x3A\x76\x6D\x6C","\x23\x64\x65\x66\x61\x75\x6C\x74\x23\x56\x4D\x4C","\x61\x64\x64","\x6E\x61\x6D\x65\x73\x70\x61\x63\x65\x73","\x75\x72\x6E\x3A\x73\x63\x68\x65\x6D\x61\x73\x2D\x6D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2D\x63\x6F\x6D\x3A\x6F\x66\x66\x69\x63\x65\x3A\x6F\x66\x66\x69\x63\x65","\x63\x72\x65\x61\x74\x65\x53\x74\x79\x6C\x65\x53\x68\x65\x65\x74","\x63\x73\x73\x54\x65\x78\x74","\x76\x5C\x3A\x2A\x7B\x62\x65\x68\x61\x76\x69\x6F\x72\x3A\x75\x72\x6C\x28\x23\x64\x65\x66\x61\x75\x6C\x74\x23\x56\x4D\x4C\x29\x7D\x6F\x5C\x3A\x2A\x7B\x62\x65\x68\x61\x76\x69\x6F\x72\x3A\x75\x72\x6C\x28\x23\x64\x65\x66\x61\x75\x6C\x74\x23\x56\x4D\x4C\x29\x7D","\x2F\x63\x73\x73\x2F\x65\x78\x70\x6C\x6F\x72\x65\x72\x2E\x63\x73\x73","\x6F\x6E\x75\x6E\x6C\x6F\x61\x64","\x64\x69\x73\x70\x6F\x73\x65","\x61\x74\x74\x61\x63\x68\x45\x76\x65\x6E\x74","\x43\x6F\x6E\x73\x6F\x6C\x65","","\x77\x69\x6E\x64\x6F\x77","\x62\x6F\x64\x79","\x63\x6F\x6E\x73\x6F\x6C\x65\x4E\x61\x6D\x65","\x20\x2D\x20\x6D\x78\x47\x72\x61\x70\x68\x20","\x56\x45\x52\x53\x49\x4F\x4E","\x74\x61\x62\x6C\x65","\x77\x69\x64\x74\x68","\x31\x30\x30\x25","\x68\x65\x69\x67\x68\x74","\x74\x62\x6F\x64\x79","\x74\x72","\x74\x64","\x76\x65\x72\x74\x69\x63\x61\x6C\x41\x6C\x69\x67\x6E","\x73\x74\x79\x6C\x65","\x74\x6F\x70","\x74\x65\x78\x74\x61\x72\x65\x61","\x72\x65\x61\x64\x4F\x6E\x6C\x79","\x74\x72\x75\x65","\x72\x65\x73\x69\x7A\x65","\x6E\x6F\x6E\x65","\x76\x61\x6C\x75\x65","\x62\x75\x66\x66\x65\x72","\x49\x53\x5F\x4E\x53","\x42\x61\x63\x6B\x43\x6F\x6D\x70\x61\x74","\x63\x6F\x6D\x70\x61\x74\x4D\x6F\x64\x65","\x39\x39\x25","\x33\x30\x70\x78","\x49\x6E\x66\x6F","\x69\x6E\x66\x6F","\x61\x64\x64\x42\x75\x74\x74\x6F\x6E","\x44\x4F\x4D","\x67\x65\x74\x49\x6E\x6E\x65\x72\x48\x74\x6D\x6C","\x64\x65\x62\x75\x67","\x54\x72\x61\x63\x65","\x54\x52\x41\x43\x45","\x54\x72\x61\x63\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64","\x54\x72\x61\x63\x69\x6E\x67\x20\x64\x69\x73\x61\x62\x6C\x65\x64","\x43\x6F\x70\x79","\x63\x6F\x70\x79","\x61\x6C\x65\x72\x74","\x53\x68\x6F\x77","\x70\x6F\x70\x75\x70","\x43\x6C\x65\x61\x72","\x6E\x75\x6D\x62\x65\x72","\x69\x6E\x6E\x65\x72\x57\x69\x64\x74\x68","\x69\x6E\x6E\x65\x72\x48\x65\x69\x67\x68\x74","\x63\x6C\x69\x65\x6E\x74\x48\x65\x69\x67\x68\x74","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x6D\x61\x78","\x73\x65\x74\x4D\x61\x78\x69\x6D\x69\x7A\x61\x62\x6C\x65","\x73\x65\x74\x53\x63\x72\x6F\x6C\x6C\x61\x62\x6C\x65","\x73\x65\x74\x52\x65\x73\x69\x7A\x61\x62\x6C\x65","\x73\x65\x74\x43\x6C\x6F\x73\x61\x62\x6C\x65","\x64\x65\x73\x74\x72\x6F\x79\x4F\x6E\x43\x6C\x6F\x73\x65","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x70\x78","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x39\x32\x70\x78","\x77\x72\x69\x74\x65\x6C\x6E","\x62\x75\x74\x74\x6F\x6E","\x63\x6C\x69\x63\x6B","\x69\x73\x56\x69\x73\x69\x62\x6C\x65","\x73\x65\x74\x56\x69\x73\x69\x62\x6C\x65","\x69\x6E\x69\x74","\x45\x6E\x74\x65\x72\x69\x6E\x67\x20","\x67\x65\x74\x54\x69\x6D\x65","\x20\x28","\x20\x6D\x73\x29","\x4C\x65\x61\x76\x69\x6E\x67\x20","\x44\x45\x42\x55\x47","\x61\x70\x70\x6C\x79","\x57\x41\x52\x4E","\x20","\x50\x72\x65\x73\x74\x6F\x2F\x32\x2E\x35","\x76\x69\x73\x69\x62\x69\x6C\x69\x74\x79","\x68\x69\x64\x64\x65\x6E","\x76\x69\x73\x69\x62\x6C\x65","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x73\x63\x72\x6F\x6C\x6C\x48\x65\x69\x67\x68\x74","\x0A","\x6D\x78\x4F\x62\x6A\x65\x63\x74\x49\x64","\x6F\x62\x6A\x65\x63\x74","\x46\x49\x45\x4C\x44\x5F\x4E\x41\x4D\x45","\x63\x6F\x6E\x73\x74\x72\x75\x63\x74\x6F\x72","\x67\x65\x74\x46\x75\x6E\x63\x74\x69\x6F\x6E\x4E\x61\x6D\x65","\x23","\x63\x6F\x75\x6E\x74\x65\x72","\x63\x6C\x65\x61\x72","\x6D\x61\x70","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x67\x65\x74","\x70\x75\x74","\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x4B\x65\x79\x73","\x70\x75\x73\x68","\x67\x65\x74\x56\x61\x6C\x75\x65\x73","\x76\x69\x73\x69\x74","\x6C\x6F\x61\x64\x44\x65\x66\x61\x75\x6C\x74\x42\x75\x6E\x64\x6C\x65","\x69\x73\x4C\x61\x6E\x67\x75\x61\x67\x65\x53\x75\x70\x70\x6F\x72\x74\x65\x64","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2D","\x6C\x6F\x61\x64\x53\x70\x65\x63\x69\x61\x6C\x42\x75\x6E\x64\x6C\x65","\x5F","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x4E\x4F\x4E\x45","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x42\x75\x6E\x64\x6C\x65","\x6C\x6F\x61\x64","\x69\x73\x52\x65\x61\x64\x79","\x67\x65\x74\x54\x65\x78\x74","\x70\x61\x72\x73\x65","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x42\x75\x6E\x64\x6C\x65","\x73\x70\x6C\x69\x74","\x63\x68\x61\x72\x41\x74","\x3D","\x63\x68\x61\x72\x43\x6F\x64\x65\x41\x74","\x72\x65\x73\x6F\x75\x72\x63\x65\x73\x45\x6E\x63\x6F\x64\x65\x64","\x25","\x72\x65\x70\x6C\x61\x63\x65","\x72\x65\x73\x6F\x75\x72\x63\x65\x73","\x7B","\x7D","\x6A\x6F\x69\x6E","\x78","\x79","\x65\x71\x75\x61\x6C\x73","\x63\x6C\x6F\x6E\x65","\x63\x61\x6C\x6C","\x73\x65\x74\x52\x65\x63\x74","\x67\x65\x74\x43\x65\x6E\x74\x65\x72\x58","\x67\x65\x74\x43\x65\x6E\x74\x65\x72\x59","\x6D\x69\x6E","\x67\x72\x6F\x77","\x67\x65\x74\x50\x6F\x69\x6E\x74","\x63\x65\x6C\x6C","\x63\x68\x69\x6C\x64","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x69\x73\x45\x64\x67\x65","\x6D\x6F\x64\x65\x6C","\x6E\x6F\x64\x65","\x73\x68\x61\x70\x65","\x73\x65\x74\x4F\x70\x61\x63\x69\x74\x79","\x73\x63\x61\x6C\x65","\x67\x65\x6F\x6D\x65\x74\x72\x79","\x70\x72\x65\x76\x69\x6F\x75\x73","\x72\x65\x64\x72\x61\x77","\x63\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72","\x63\x61\x73\x63\x61\x64\x65\x4F\x70\x61\x63\x69\x74\x79","\x73\x65\x74\x54\x69\x6D\x65\x6F\x75\x74","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x6F\x75\x6E\x74","\x67\x65\x74\x43\x68\x69\x6C\x64\x41\x74","\x67\x65\x74\x45\x64\x67\x65\x73","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x65\x72\x72\x6F\x72","\x63\x6C\x6F\x73\x65","\x2F\x65\x72\x72\x6F\x72\x2E\x67\x69\x66","\x63\x75\x72\x73\x6F\x72","\x63\x68\x69\x6C\x64\x4E\x6F\x64\x65\x73","\x72\x65\x6D\x6F\x76\x65\x43\x75\x72\x73\x6F\x72\x73","\x63\x75\x72\x72\x65\x6E\x74\x53\x74\x79\x6C\x65","\x67\x65\x74\x43\x6F\x6D\x70\x75\x74\x65\x64\x53\x74\x79\x6C\x65","\x67\x65\x74\x43\x75\x72\x72\x65\x6E\x74\x53\x74\x79\x6C\x65","\x73\x63\x72\x6F\x6C\x6C","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x61\x75\x74\x6F","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x76\x61\x72\x20\x5F\x6D\x78\x4A\x61\x76\x61\x53\x63\x72\x69\x70\x74\x45\x78\x70\x72\x65\x73\x73\x69\x6F\x6E\x3D","\x6D\x65\x73\x73\x61\x67\x65","\x20\x77\x68\x69\x6C\x65\x20\x65\x76\x61\x6C\x75\x61\x74\x69\x6E\x67\x20","\x77\x61\x72\x6E","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x66\x69\x6E\x64\x4E\x6F\x64\x65","\x6E\x65\x78\x74\x53\x69\x62\x6C\x69\x6E\x67","\x6E\x6F\x64\x65\x54\x79\x70\x65","\x4E\x4F\x44\x45\x54\x59\x50\x45\x5F\x45\x4C\x45\x4D\x45\x4E\x54","\x66\x69\x6E\x64\x4E\x6F\x64\x65\x42\x79\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x2F\x2F\x2A\x5B\x40","\x3D\x27","\x27\x5D","\x73\x65\x6C\x65\x63\x74\x53\x69\x6E\x67\x6C\x65\x4E\x6F\x64\x65","\x6F\x77\x6E\x65\x72\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x69\x74\x65\x72\x61\x74\x65\x4E\x65\x78\x74","\x65\x76\x61\x6C\x75\x61\x74\x65","\x6E\x61\x6D\x65","\x28","\x73\x70\x6C\x69\x63\x65","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x69\x6D\x70\x6C\x65\x6D\x65\x6E\x74\x61\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x41\x63\x74\x69\x76\x65\x58\x4F\x62\x6A\x65\x63\x74","\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x58\x4D\x4C\x44\x4F\x4D","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x61\x73\x79\x6E\x63","\x66\x61\x6C\x73\x65","\x6C\x6F\x61\x64\x58\x4D\x4C","\x74\x65\x78\x74\x2F\x78\x6D\x6C","\x70\x61\x72\x73\x65\x46\x72\x6F\x6D\x53\x74\x72\x69\x6E\x67","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x65\x6D\x70\x74\x79","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x52\x61\x6E\x67\x65\x73","\x20\x20","\x4E\x4F\x44\x45\x54\x59\x50\x45\x5F\x54\x45\x58\x54","\x6E\x6F\x64\x65\x56\x61\x6C\x75\x65","\x3C","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x68\x74\x6D\x6C\x45\x6E\x74\x69\x74\x69\x65\x73","\x3D\x22","\x22","\x3E\x0A","\x67\x65\x74\x50\x72\x65\x74\x74\x79\x58\x6D\x6C","\x3C\x2F","\x2F\x3E\x0A","\x70\x72\x65\x76\x69\x6F\x75\x73\x53\x69\x62\x6C\x69\x6E\x67","\x67\x65\x74\x54\x65\x78\x74\x43\x6F\x6E\x74\x65\x6E\x74","\x74\x72\x69\x6D","\x26\x61\x6D\x70\x3B","\x26\x71\x75\x6F\x74\x3B","\x26\x23\x33\x39\x3B","\x26\x6C\x74\x3B","\x26\x67\x74\x3B","\x26\x23\x78\x61\x3B","\x74\x61\x67\x55\x72\x6E","\x78\x6D\x6C","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x73\x65\x72\x69\x61\x6C\x69\x7A\x65\x54\x6F\x53\x74\x72\x69\x6E\x67","\x3E","\x6F\x75\x74\x65\x72\x48\x54\x4D\x4C","\x2F\x3E","\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x4E\x6F\x64\x65","\x62\x72","\x70","\x66\x69\x6C\x74\x65\x72","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x41\x6C\x70\x68\x61\x49\x6D\x61\x67\x65\x4C\x6F\x61\x64\x65\x72\x28\x73\x72\x63\x3D\x27","\x2F\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x2E\x67\x69\x66\x27\x2C\x20\x73\x69\x7A\x69\x6E\x67\x4D\x65\x74\x68\x6F\x64\x3D\x27\x73\x63\x61\x6C\x65\x27\x29","\x65\x78\x65\x63\x75\x74\x65","\x73\x70\x61\x6E","\x63\x6F\x6C\x6F\x72","\x62\x6C\x75\x65","\x74\x65\x78\x74\x44\x65\x63\x6F\x72\x61\x74\x69\x6F\x6E","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x70\x6F\x69\x6E\x74\x65\x72","\x70\x61\x64\x64\x69\x6E\x67\x4C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x4C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x57\x69\x64\x74\x68","\x73\x63\x72\x6F\x6C\x6C\x4C\x65\x66\x74","\x6C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x55\x6E\x69\x76\x65\x72\x73\x61\x6C\x58\x50\x43\x6F\x6E\x6E\x65\x63\x74","\x65\x6E\x61\x62\x6C\x65\x50\x72\x69\x76\x69\x6C\x65\x67\x65","\x50\x72\x69\x76\x69\x6C\x65\x67\x65\x4D\x61\x6E\x61\x67\x65\x72","\x73\x65\x63\x75\x72\x69\x74\x79","\x50\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x20\x74\x6F\x20\x72\x65\x61\x64\x20\x66\x69\x6C\x65\x20\x64\x65\x6E\x69\x65\x64\x2E","\x6E\x73\x49\x4C\x6F\x63\x61\x6C\x46\x69\x6C\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65\x73","\x63\x72\x65\x61\x74\x65\x49\x6E\x73\x74\x61\x6E\x63\x65","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x66\x69\x6C\x65\x2F\x6C\x6F\x63\x61\x6C\x3B\x31","\x63\x6C\x61\x73\x73\x65\x73","\x69\x6E\x69\x74\x57\x69\x74\x68\x50\x61\x74\x68","\x65\x78\x69\x73\x74\x73","\x46\x69\x6C\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E","\x6E\x73\x49\x46\x69\x6C\x65\x49\x6E\x70\x75\x74\x53\x74\x72\x65\x61\x6D","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2F\x66\x69\x6C\x65\x2D\x69\x6E\x70\x75\x74\x2D\x73\x74\x72\x65\x61\x6D\x3B\x31","\x6E\x73\x49\x53\x63\x72\x69\x70\x74\x61\x62\x6C\x65\x49\x6E\x70\x75\x74\x53\x74\x72\x65\x61\x6D","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x73\x63\x72\x69\x70\x74\x61\x62\x6C\x65\x69\x6E\x70\x75\x74\x73\x74\x72\x65\x61\x6D\x3B\x31","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x72\x65\x61\x64","\x53\x63\x72\x69\x70\x74\x69\x6E\x67\x2E\x46\x69\x6C\x65\x53\x79\x73\x74\x65\x6D\x4F\x62\x6A\x65\x63\x74","\x72\x65\x61\x64\x41\x6C\x6C","\x50\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x20\x74\x6F\x20\x77\x72\x69\x74\x65\x20\x66\x69\x6C\x65\x20\x64\x65\x6E\x69\x65\x64\x2E","\x63\x72\x65\x61\x74\x65","\x6E\x73\x49\x46\x69\x6C\x65\x4F\x75\x74\x70\x75\x74\x53\x74\x72\x65\x61\x6D","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2F\x66\x69\x6C\x65\x2D\x6F\x75\x74\x70\x75\x74\x2D\x73\x74\x72\x65\x61\x6D\x3B\x31","\x66\x6C\x75\x73\x68","\x69\x66\x72\x61\x6D\x65","\x73\x72\x63","\x63\x6F\x6E\x74\x65\x6E\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x6F\x70\x65\x6E","\x66\x6F\x63\x75\x73","\x50\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x20\x74\x6F\x20\x73\x61\x76\x65\x20\x64\x6F\x63\x75\x6D\x65\x6E\x74\x20\x64\x65\x6E\x69\x65\x64\x2E","\x64\x6F\x63\x75\x6D\x65\x6E\x74","\x63\x6F\x6E\x74\x65\x6E\x74\x57\x69\x6E\x64\x6F\x77","\x53\x61\x76\x65\x41\x73","\x65\x78\x65\x63\x43\x6F\x6D\x6D\x61\x6E\x64","\x63\x6C\x69\x70\x62\x6F\x61\x72\x64\x44\x61\x74\x61","\x54\x65\x78\x74","\x73\x65\x74\x44\x61\x74\x61","\x6E\x73\x49\x43\x6C\x69\x70\x62\x6F\x61\x72\x64","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x77\x69\x64\x67\x65\x74\x2F\x63\x6C\x69\x70\x62\x6F\x61\x72\x64\x3B\x31","\x6E\x73\x49\x54\x72\x61\x6E\x73\x66\x65\x72\x61\x62\x6C\x65","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x77\x69\x64\x67\x65\x74\x2F\x74\x72\x61\x6E\x73\x66\x65\x72\x61\x62\x6C\x65\x3B\x31","\x74\x65\x78\x74\x2F\x75\x6E\x69\x63\x6F\x64\x65","\x61\x64\x64\x44\x61\x74\x61\x46\x6C\x61\x76\x6F\x72","\x6E\x73\x49\x53\x75\x70\x70\x6F\x72\x74\x73\x53\x74\x72\x69\x6E\x67","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x73\x75\x70\x70\x6F\x72\x74\x73\x2D\x73\x74\x72\x69\x6E\x67\x3B\x31","\x64\x61\x74\x61","\x73\x65\x74\x54\x72\x61\x6E\x73\x66\x65\x72\x44\x61\x74\x61","\x6B\x47\x6C\x6F\x62\x61\x6C\x43\x6C\x69\x70\x62\x6F\x61\x72\x64","\x47\x45\x54","\x73\x65\x6E\x64","\x73\x69\x6D\x75\x6C\x61\x74\x65","\x6F\x6E\x72\x65\x61\x64\x79\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65","\x72\x65\x61\x64\x79\x53\x74\x61\x74\x65","\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72","\x20\x3D\x20\x5B\x6E\x75\x6C\x6C\x5D\x0A","\x20\x3D\x3E\x20\x5B\x46\x75\x6E\x63\x74\x69\x6F\x6E\x5D\x0A","\x20\x3D\x3E\x20\x5B","\x5D\x0A","\x20\x3D\x20","\x50\x49","\x61\x62\x73","\x63\x6F\x73","\x73\x69\x6E","\x73\x71\x72\x74","\x61\x74\x61\x6E\x32","\x63\x65\x69\x6C","\x74\x6F\x52\x61\x64\x69\x61\x6E\x73","\x67\x65\x74\x52\x6F\x74\x61\x74\x65\x64\x50\x6F\x69\x6E\x74","\x67\x65\x74\x56\x61\x6C\x75\x65","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4D\x41\x53\x4B\x5F\x4E\x4F\x4E\x45","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4D\x41\x53\x4B\x5F\x4E\x4F\x52\x54\x48","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4D\x41\x53\x4B\x5F\x57\x45\x53\x54","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4D\x41\x53\x4B\x5F\x53\x4F\x55\x54\x48","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4D\x41\x53\x4B\x5F\x45\x41\x53\x54","\x61\x62\x73\x6F\x6C\x75\x74\x65\x50\x6F\x69\x6E\x74\x73","\x70\x74\x53\x65\x67\x44\x69\x73\x74\x53\x71","\x76\x69\x65\x77","\x63\x6F\x6E\x74\x61\x69\x6E\x73","\x6F\x66\x66\x73\x65\x74\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x53\x63\x72\x6F\x6C\x6C\x4F\x72\x69\x67\x69\x6E","\x67\x65\x74\x4F\x66\x66\x73\x65\x74","\x5E\x5B","\x5C\x73","\x5D\x2B","\x67","\x5B","\x5D\x2B\x24","\x72\x74\x72\x69\x6D","\x6C\x74\x72\x69\x6D","\x30\x78","\x30\x58","\x61\x6E\x69\x6D\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x73","\x66\x61\x64\x65\x4F\x75\x74","\x69\x73\x56\x6D\x6C","\x61\x6C\x70\x68\x61\x28\x6F\x70\x61\x63\x69\x74\x79\x3D","\x29","\x6F\x70\x61\x63\x69\x74\x79","\x43\x53\x53\x31\x43\x6F\x6D\x70\x61\x74","\x56\x4D\x4C\x5F\x50\x52\x45\x46\x49\x58","\x3A\x69\x6D\x61\x67\x65","\x62\x6F\x72\x64\x65\x72\x53\x74\x79\x6C\x65","\x69\x6D\x67","\x62\x6F\x72\x64\x65\x72","\x30","\x63\x6F\x6D\x70\x61\x72\x65","\x73\x6F\x72\x74","\x3B","\x69\x6E\x64\x65\x78\x4F\x66\x53\x74\x79\x6C\x65\x6E\x61\x6D\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x53\x74\x79\x6C\x65","\x73\x65\x74\x53\x74\x79\x6C\x65","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x73\x65\x74\x53\x74\x79\x6C\x65\x46\x6C\x61\x67","\x3D\x30","\x41\x4C\x49\x47\x4E\x5F\x43\x45\x4E\x54\x45\x52","\x41\x4C\x49\x47\x4E\x5F\x52\x49\x47\x48\x54","\x41\x4C\x49\x47\x4E\x5F\x4D\x49\x44\x44\x4C\x45","\x41\x4C\x49\x47\x4E\x5F\x42\x4F\x54\x54\x4F\x4D","\x44\x45\x46\x41\x55\x4C\x54\x5F\x46\x4F\x4E\x54\x53\x49\x5A\x45","\x44\x45\x46\x41\x55\x4C\x54\x5F\x46\x4F\x4E\x54\x46\x41\x4D\x49\x4C\x59","\x64\x69\x76","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x72\x6F\x75\x6E\x64","\x6C\x69\x6E\x65\x48\x65\x69\x67\x68\x74","\x4C\x49\x4E\x45\x5F\x48\x45\x49\x47\x48\x54","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x6E\x6F\x77\x72\x61\x70","\x64\x69\x73\x70\x6C\x61\x79","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x69\x6E\x6C\x69\x6E\x65","\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B","\x7A\x6F\x6F\x6D","\x31","\x67\x65\x74\x52\x6F\x6F\x74","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x69\x73\x45\x76\x65\x6E\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x45\x76\x65\x6E\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x64\x72\x61\x77\x50\x61\x6E\x65","\x6F\x76\x65\x72\x6C\x61\x79\x50\x61\x6E\x65","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74\x4E\x53","\x63\x61\x6E\x76\x61\x73","\x63\x6C\x6F\x6E\x65\x4E\x6F\x64\x65","\x67\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65","\x65\x6E\x63\x6F\x64\x65","\x64\x65\x73\x74\x72\x6F\x79","\x50\x41\x47\x45\x5F\x46\x4F\x52\x4D\x41\x54\x5F\x41\x34\x5F\x50\x4F\x52\x54\x52\x41\x49\x54","\x67\x65\x74\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x53\x63\x61\x6C\x65","\x66\x6C\x6F\x6F\x72","\x3C\x68\x74\x6D\x6C\x3E\x3C\x68\x65\x61\x64\x3E","\x62\x61\x73\x65","\x3C\x73\x74\x79\x6C\x65\x3E","\x73\x74\x79\x6C\x65\x53\x68\x65\x65\x74\x73","\x3C\x2F\x73\x74\x79\x6C\x65\x3E\x3C\x2F\x68\x65\x61\x64\x3E","\x3C\x62\x6F\x64\x79\x3E","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x3C\x2F\x62\x6F\x64\x79\x3E","\x3C\x68\x74\x6D\x6C\x3E","\x44\x49\x56","\x3C\x68\x74\x6D\x6C","\x3C\x68\x65\x61\x64\x3E","\x67\x65\x74\x4F\x75\x74\x65\x72\x48\x74\x6D\x6C","\x3C\x2F\x68\x65\x61\x64\x3E","\x3C\x2F\x68\x74\x6D\x6C\x3E","\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x28","\x2C","\x6F\x77\x6E\x65\x72\x53\x56\x47\x45\x6C\x65\x6D\x65\x6E\x74","\x73\x68\x6F\x77","\x70\x72\x69\x6E\x74","\x36\x33\x36\x70\x78","\x34\x36\x30\x70\x78","\x70\x72\x65","\x26\x6E\x62\x73\x70\x3B","\x3C\x62\x72\x3E","\x50\x6F\x70\x75\x70\x20\x57\x69\x6E\x64\x6F\x77","\x3C\x70\x72\x65\x3E","\x3C\x2F\x70\x72\x65","\x70\x61\x64\x64\x69\x6E\x67","\x32\x30\x70\x78","\x65\x72\x72\x6F\x72\x49\x6D\x61\x67\x65","\x76\x61\x6C\x69\x67\x6E","\x62\x6F\x74\x74\x6F\x6D","\x6D\x69\x64\x64\x6C\x65","\xA0","\x65\x72\x72\x6F\x72\x52\x65\x73\x6F\x75\x72\x63\x65","\x66\x6C\x6F\x61\x74\x3A\x72\x69\x67\x68\x74","\x63\x6C\x6F\x73\x65\x52\x65\x73\x6F\x75\x72\x63\x65","\x64\x72\x61\x67\x4F\x66\x66\x73\x65\x74","\x54\x4F\x4F\x4C\x54\x49\x50\x5F\x56\x45\x52\x54\x49\x43\x41\x4C\x5F\x4F\x46\x46\x53\x45\x54","\x61\x75\x74\x6F\x73\x63\x72\x6F\x6C\x6C","\x73\x65\x74\x47\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x68\x69\x67\x68\x6C\x69\x67\x68\x74\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74\x73","\x67\x65\x74\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x67\x65\x74\x47\x72\x61\x70\x68\x46\x6F\x72\x45\x76\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x44\x72\x61\x67\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x50\x72\x65\x76\x69\x65\x77\x45\x6C\x65\x6D\x65\x6E\x74","\x65\x78\x61\x63\x74","\x66\x61\x73\x74\x65\x72","\x66\x61\x73\x74\x65\x73\x74","\x73\x76\x67","\x76\x6D\x6C","\x6D\x69\x78\x65\x64\x48\x74\x6D\x6C","\x70\x72\x65\x66\x65\x72\x48\x74\x6D\x6C","\x73\x74\x72\x69\x63\x74\x48\x74\x6D\x6C","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x32\x30\x30\x30\x2F\x73\x76\x67","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x31\x39\x39\x39\x2F\x78\x68\x74\x6D\x6C","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x31\x39\x39\x39\x2F\x78\x6C\x69\x6E\x6B","\x67\x72\x61\x79","\x23\x30\x30\x46\x46\x30\x30","\x23\x46\x46\x30\x30\x30\x30","\x6D\x6F\x76\x65","\x64\x65\x66\x61\x75\x6C\x74","\x23\x30\x30\x30\x30\x46\x46","\x23\x30\x30\x39\x39\x46\x46","\x62\x6C\x61\x63\x6B","\x79\x65\x6C\x6C\x6F\x77","\x23\x30\x30\x46\x46\x46\x46","\x23\x30\x30\x33\x33\x46\x46","\x41\x72\x69\x61\x6C\x2C\x48\x65\x6C\x76\x65\x74\x69\x63\x61","\x70\x65\x72\x69\x6D\x65\x74\x65\x72","\x73\x6F\x75\x72\x63\x65\x50\x6F\x72\x74","\x74\x61\x72\x67\x65\x74\x50\x6F\x72\x74","\x70\x6F\x72\x74\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x74\x65\x78\x74\x4F\x70\x61\x63\x69\x74\x79","\x6F\x72\x74\x68\x6F\x67\x6F\x6E\x61\x6C","\x65\x78\x69\x74\x58","\x65\x78\x69\x74\x59","\x65\x78\x69\x74\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x65\x6E\x74\x72\x79\x58","\x65\x6E\x74\x72\x79\x59","\x65\x6E\x74\x72\x79\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x66\x69\x6C\x6C\x43\x6F\x6C\x6F\x72","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x46\x69\x6C\x6C\x43\x6F\x6C\x6F\x72","\x67\x72\x61\x64\x69\x65\x6E\x74\x43\x6F\x6C\x6F\x72","\x67\x72\x61\x64\x69\x65\x6E\x74\x44\x69\x72\x65\x63\x74\x69\x6F\x6E","\x73\x74\x72\x6F\x6B\x65\x43\x6F\x6C\x6F\x72","\x73\x65\x70\x61\x72\x61\x74\x6F\x72\x43\x6F\x6C\x6F\x72","\x73\x74\x72\x6F\x6B\x65\x57\x69\x64\x74\x68","\x61\x6C\x69\x67\x6E","\x6C\x61\x62\x65\x6C\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x76\x65\x72\x74\x69\x63\x61\x6C\x4C\x61\x62\x65\x6C\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x69\x6D\x61\x67\x65\x41\x73\x70\x65\x63\x74","\x69\x6D\x61\x67\x65\x41\x6C\x69\x67\x6E","\x69\x6D\x61\x67\x65\x56\x65\x72\x74\x69\x63\x61\x6C\x41\x6C\x69\x67\x6E","\x67\x6C\x61\x73\x73","\x69\x6D\x61\x67\x65","\x69\x6D\x61\x67\x65\x57\x69\x64\x74\x68","\x69\x6D\x61\x67\x65\x48\x65\x69\x67\x68\x74","\x69\x6D\x61\x67\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x69\x6D\x61\x67\x65\x42\x6F\x72\x64\x65\x72","\x66\x6C\x69\x70\x48","\x66\x6C\x69\x70\x56","\x6E\x6F\x4C\x61\x62\x65\x6C","\x6E\x6F\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x6C\x61\x62\x65\x6C\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x6C\x61\x62\x65\x6C\x42\x6F\x72\x64\x65\x72\x43\x6F\x6C\x6F\x72","\x6C\x61\x62\x65\x6C\x50\x61\x64\x64\x69\x6E\x67","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x53\x68\x61\x70\x65","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x49\x6D\x61\x67\x65","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x43\x6F\x6C\x6F\x72","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x53\x74\x72\x6F\x6B\x65\x43\x6F\x6C\x6F\x72","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x47\x72\x61\x64\x69\x65\x6E\x74\x43\x6F\x6C\x6F\x72","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x53\x70\x61\x63\x69\x6E\x67","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x57\x69\x64\x74\x68","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x48\x65\x69\x67\x68\x74","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x44\x69\x72\x65\x63\x74\x69\x6F\x6E","\x73\x68\x61\x64\x6F\x77","\x73\x65\x67\x6D\x65\x6E\x74","\x65\x6E\x64\x41\x72\x72\x6F\x77","\x73\x74\x61\x72\x74\x41\x72\x72\x6F\x77","\x65\x6E\x64\x53\x69\x7A\x65","\x73\x74\x61\x72\x74\x53\x69\x7A\x65","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x4C\x69\x6E\x65","\x65\x6E\x64\x46\x69\x6C\x6C","\x73\x74\x61\x72\x74\x46\x69\x6C\x6C","\x64\x61\x73\x68\x65\x64","\x64\x61\x73\x68\x50\x61\x74\x74\x65\x72\x6E","\x72\x6F\x75\x6E\x64\x65\x64","\x63\x75\x72\x76\x65\x64","\x61\x72\x63\x53\x69\x7A\x65","\x73\x6D\x6F\x6F\x74\x68","\x73\x6F\x75\x72\x63\x65\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x53\x70\x61\x63\x69\x6E\x67","\x74\x61\x72\x67\x65\x74\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x53\x70\x61\x63\x69\x6E\x67","\x70\x65\x72\x69\x6D\x65\x74\x65\x72\x53\x70\x61\x63\x69\x6E\x67","\x73\x70\x61\x63\x69\x6E\x67","\x73\x70\x61\x63\x69\x6E\x67\x54\x6F\x70","\x73\x70\x61\x63\x69\x6E\x67\x4C\x65\x66\x74","\x73\x70\x61\x63\x69\x6E\x67\x42\x6F\x74\x74\x6F\x6D","\x73\x70\x61\x63\x69\x6E\x67\x52\x69\x67\x68\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x65\x6C\x62\x6F\x77","\x66\x6F\x6E\x74\x43\x6F\x6C\x6F\x72","\x66\x6F\x6E\x74\x53\x74\x79\x6C\x65","\x61\x75\x74\x6F\x73\x69\x7A\x65","\x66\x6F\x6C\x64\x61\x62\x6C\x65","\x65\x64\x69\x74\x61\x62\x6C\x65","\x62\x65\x6E\x64\x61\x62\x6C\x65","\x6D\x6F\x76\x61\x62\x6C\x65","\x72\x65\x73\x69\x7A\x61\x62\x6C\x65","\x63\x6C\x6F\x6E\x65\x61\x62\x6C\x65","\x64\x65\x6C\x65\x74\x61\x62\x6C\x65","\x65\x64\x67\x65\x53\x74\x79\x6C\x65","\x6C\x6F\x6F\x70\x53\x74\x79\x6C\x65","\x72\x6F\x75\x74\x69\x6E\x67\x43\x65\x6E\x74\x65\x72\x58","\x72\x6F\x75\x74\x69\x6E\x67\x43\x65\x6E\x74\x65\x72\x59","\x72\x65\x63\x74\x61\x6E\x67\x6C\x65","\x65\x6C\x6C\x69\x70\x73\x65","\x64\x6F\x75\x62\x6C\x65\x45\x6C\x6C\x69\x70\x73\x65","\x72\x68\x6F\x6D\x62\x75\x73","\x6C\x69\x6E\x65","\x61\x72\x72\x6F\x77","\x6C\x61\x62\x65\x6C","\x63\x79\x6C\x69\x6E\x64\x65\x72","\x73\x77\x69\x6D\x6C\x61\x6E\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72","\x61\x63\x74\x6F\x72","\x63\x6C\x6F\x75\x64","\x74\x72\x69\x61\x6E\x67\x6C\x65","\x68\x65\x78\x61\x67\x6F\x6E","\x63\x6C\x61\x73\x73\x69\x63","\x62\x6C\x6F\x63\x6B","\x6F\x76\x61\x6C","\x64\x69\x61\x6D\x6F\x6E\x64","\x64\x69\x61\x6D\x6F\x6E\x64\x54\x68\x69\x6E","\x63\x65\x6E\x74\x65\x72","\x72\x69\x67\x68\x74","\x6E\x6F\x72\x74\x68","\x73\x6F\x75\x74\x68","\x65\x61\x73\x74","\x77\x65\x73\x74","\x76\x65\x72\x74\x69\x63\x61\x6C","\x65\x6C\x62\x6F\x77\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x65\x6E\x74\x69\x74\x79\x52\x65\x6C\x61\x74\x69\x6F\x6E\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x6C\x6F\x6F\x70\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x73\x69\x64\x65\x54\x6F\x53\x69\x64\x65\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x74\x6F\x70\x54\x6F\x42\x6F\x74\x74\x6F\x6D\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x6F\x72\x74\x68\x6F\x67\x6F\x6E\x61\x6C\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x73\x65\x67\x6D\x65\x6E\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x65\x6C\x6C\x69\x70\x73\x65\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x72\x65\x63\x74\x61\x6E\x67\x6C\x65\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x72\x68\x6F\x6D\x62\x75\x73\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x74\x72\x69\x61\x6E\x67\x6C\x65\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x70\x72\x6F\x70\x65\x72\x74\x69\x65\x73","\x63\x6F\x6E\x73\x75\x6D\x65\x64","\x67\x65\x74\x4E\x61\x6D\x65","\x67\x65\x74\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73","\x67\x65\x74\x50\x72\x6F\x70\x65\x72\x74\x79","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x63\x6F\x6E\x73\x75\x6D\x65","\x65\x76\x74","\x73\x74\x61\x74\x65","\x67\x72\x61\x70\x68\x58","\x67\x72\x61\x70\x68\x59","\x67\x65\x74\x45\x76\x65\x6E\x74","\x67\x65\x74\x53\x6F\x75\x72\x63\x65","\x69\x73\x53\x6F\x75\x72\x63\x65","\x67\x65\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x59","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x67\x65\x74\x47\x72\x61\x70\x68\x58","\x67\x65\x74\x47\x72\x61\x70\x68\x59","\x67\x65\x74\x43\x65\x6C\x6C","\x69\x73\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x70\x72\x65\x76\x65\x6E\x74\x44\x65\x66\x61\x75\x6C\x74","\x72\x65\x74\x75\x72\x6E\x56\x61\x6C\x75\x65","\x73\x65\x74\x45\x76\x65\x6E\x74\x53\x6F\x75\x72\x63\x65","\x65\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x65\x76\x65\x6E\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x65\x76\x65\x6E\x74\x53\x6F\x75\x72\x63\x65","\x67\x65\x74\x45\x76\x65\x6E\x74\x53\x6F\x75\x72\x63\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x6F\x6E","\x66","\x72\x65\x6D\x6F\x76\x65\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72","\x64\x65\x74\x61\x63\x68\x45\x76\x65\x6E\x74","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x6D\x6F\x75\x73\x65\x75\x70","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x74\x6F\x75\x63\x68\x73\x74\x61\x72\x74","\x74\x6F\x75\x63\x68\x6D\x6F\x76\x65","\x74\x6F\x75\x63\x68\x65\x6E\x64","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x64\x62\x6C\x63\x6C\x69\x63\x6B","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x72\x65\x6C\x65\x61\x73\x65","\x65\x76\x65\x6E\x74","\x64\x65\x74\x61\x69\x6C","\x77\x68\x65\x65\x6C\x44\x65\x6C\x74\x61","\x6D\x6F\x75\x73\x65\x77\x68\x65\x65\x6C","\x44\x4F\x4D\x4D\x6F\x75\x73\x65\x53\x63\x72\x6F\x6C\x6C","\x63\x6F\x6E\x74\x65\x78\x74\x6D\x65\x6E\x75","\x6F\x6E\x63\x6F\x6E\x74\x65\x78\x74\x6D\x65\x6E\x75","\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B","\x73\x72\x63\x45\x6C\x65\x6D\x65\x6E\x74","\x74\x61\x72\x67\x65\x74","\x69\x73\x52\x69\x67\x68\x74\x4D\x6F\x75\x73\x65\x42\x75\x74\x74\x6F\x6E","\x69\x73\x53\x68\x69\x66\x74\x44\x6F\x77\x6E","\x69\x73\x43\x6F\x6E\x74\x72\x6F\x6C\x44\x6F\x77\x6E","\x73\x68\x69\x66\x74\x4B\x65\x79","\x61\x6C\x74\x4B\x65\x79","\x63\x74\x72\x6C\x4B\x65\x79","\x6D\x65\x74\x61\x4B\x65\x79","\x74\x6F\x75\x63\x68\x65\x73","\x63\x68\x61\x6E\x67\x65\x64\x54\x6F\x75\x63\x68\x65\x73","\x63\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x4D\x61\x69\x6E\x45\x76\x65\x6E\x74","\x63\x6C\x69\x65\x6E\x74\x59","\x73\x74\x6F\x70\x50\x72\x6F\x70\x61\x67\x61\x74\x69\x6F\x6E","\x63\x61\x6E\x63\x65\x6C\x42\x75\x62\x62\x6C\x65","\x6D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x6D\x6F\x75\x73\x65\x4D\x6F\x76\x65","\x6D\x6F\x75\x73\x65\x55\x70","\x61\x63\x74\x69\x76\x61\x74\x65","\x72\x65\x73\x69\x7A\x65\x53\x74\x61\x72\x74","\x72\x65\x73\x69\x7A\x65\x45\x6E\x64","\x6D\x6F\x76\x65\x53\x74\x61\x72\x74","\x6D\x6F\x76\x65\x45\x6E\x64","\x70\x61\x6E\x53\x74\x61\x72\x74","\x70\x61\x6E","\x70\x61\x6E\x45\x6E\x64","\x6D\x69\x6E\x69\x6D\x69\x7A\x65","\x6E\x6F\x72\x6D\x61\x6C\x69\x7A\x65","\x6D\x61\x78\x69\x6D\x69\x7A\x65","\x68\x69\x64\x65","\x72\x65\x66\x72\x65\x73\x68","\x73\x69\x7A\x65","\x73\x65\x6C\x65\x63\x74","\x66\x69\x72\x65\x64","\x72\x65\x63\x65\x69\x76\x65","\x63\x6F\x6E\x6E\x65\x63\x74","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x75\x73\x70\x65\x6E\x64","\x72\x65\x73\x75\x6D\x65","\x6D\x61\x72\x6B","\x73\x65\x73\x73\x69\x6F\x6E","\x72\x6F\x6F\x74","\x70\x6F\x73\x74","\x73\x61\x76\x65","\x62\x65\x66\x6F\x72\x65\x41\x64\x64\x56\x65\x72\x74\x65\x78","\x61\x64\x64\x56\x65\x72\x74\x65\x78","\x61\x66\x74\x65\x72\x41\x64\x64\x56\x65\x72\x74\x65\x78","\x64\x6F\x6E\x65","\x65\x78\x65\x63\x75\x74\x65\x64","\x73\x74\x61\x72\x74\x45\x64\x69\x74","\x65\x6E\x64\x45\x64\x69\x74","\x62\x65\x66\x6F\x72\x65\x55\x6E\x64\x6F","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x68\x61\x6E\x67\x65","\x6E\x6F\x74\x69\x66\x79","\x6C\x61\x79\x6F\x75\x74\x43\x65\x6C\x6C\x73","\x73\x63\x61\x6C\x65\x41\x6E\x64\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x75\x70","\x64\x6F\x77\x6E","\x61\x64\x64\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x41\x64\x64\x65\x64","\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x4D\x6F\x76\x65\x64","\x72\x65\x73\x69\x7A\x65\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x52\x65\x73\x69\x7A\x65\x64","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x54\x6F\x67\x67\x6C\x65\x64","\x6F\x72\x64\x65\x72\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x4F\x72\x64\x65\x72\x65\x64","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x52\x65\x6D\x6F\x76\x65\x64","\x67\x72\x6F\x75\x70\x43\x65\x6C\x6C\x73","\x75\x6E\x67\x72\x6F\x75\x70\x43\x65\x6C\x6C\x73","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x66\x6F\x6C\x64\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x46\x6F\x6C\x64\x65\x64","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73","\x6C\x61\x62\x65\x6C\x43\x68\x61\x6E\x67\x65\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x43\x65\x6C\x6C","\x63\x65\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x73\x70\x6C\x69\x74\x45\x64\x67\x65","\x66\x6C\x69\x70\x45\x64\x67\x65","\x73\x74\x61\x72\x74\x45\x64\x69\x74\x69\x6E\x67","\x61\x64\x64\x4F\x76\x65\x72\x6C\x61\x79","\x72\x65\x6D\x6F\x76\x65\x4F\x76\x65\x72\x6C\x61\x79","\x75\x70\x64\x61\x74\x65\x43\x65\x6C\x6C\x53\x69\x7A\x65","\x65\x73\x63\x61\x70\x65","\x64\x6F\x75\x62\x6C\x65\x43\x6C\x69\x63\x6B","\x73\x74\x61\x72\x74","\x72\x65\x73\x65\x74","\x75\x72\x6C","\x70\x61\x72\x61\x6D\x73","\x6D\x65\x74\x68\x6F\x64","\x50\x4F\x53\x54","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x62\x69\x6E\x61\x72\x79","\x72\x65\x71\x75\x65\x73\x74","\x69\x73\x42\x69\x6E\x61\x72\x79","\x73\x65\x74\x42\x69\x6E\x61\x72\x79","\x72\x65\x73\x70\x6F\x6E\x73\x65\x54\x65\x78\x74","\x67\x65\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x74\x58\x6D\x6C","\x72\x65\x73\x70\x6F\x6E\x73\x65\x58\x4D\x4C","\x70\x61\x72\x73\x65\x58\x6D\x6C","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73","\x58\x4D\x4C\x48\x74\x74\x70\x52\x65\x71\x75\x65\x73\x74","\x6F\x76\x65\x72\x72\x69\x64\x65\x4D\x69\x6D\x65\x54\x79\x70\x65","\x74\x65\x78\x74\x2F\x70\x6C\x61\x69\x6E\x3B\x20\x63\x68\x61\x72\x73\x65\x74\x3D\x78\x2D\x75\x73\x65\x72\x2D\x64\x65\x66\x69\x6E\x65\x64","\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x58\x4D\x4C\x48\x54\x54\x50","\x6F\x6E\x72\x65\x61\x64\x79\x73\x74\x61\x74\x65\x63\x68\x61\x61\x6E\x67\x65","\x62\x69\x6E\x64","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72\x73","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x6F\x6E\x62\x65\x66\x6F\x72\x65\x75\x6E\x6C\x6F\x61\x64","\x66\x6F\x72\x6D","\x61\x63\x74\x69\x6F\x6E","\x26","\x73\x75\x62\x6D\x69\x74","\x63\x65\x6C\x6C\x73","\x69\x6E\x73\x65\x72\x74\x43\x6F\x75\x6E\x74","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x67\x65\x74\x45\x78\x70\x6F\x72\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x63\x6C\x6F\x6E\x65\x43\x65\x6C\x6C\x73","\x67\x65\x74\x49\x6D\x70\x6F\x72\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x53\x54\x45\x50\x53\x49\x5A\x45","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x69\x6D\x70\x6F\x72\x74\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x63\x6F\x6E\x74\x65\x6E\x74","\x69\x6E\x73\x74\x61\x6C\x6C\x4D\x61\x78\x69\x6D\x69\x7A\x65\x48\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x73\x74\x61\x6C\x6C\x4D\x69\x6E\x69\x6D\x69\x7A\x65\x48\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x73\x74\x61\x6C\x6C\x43\x6C\x6F\x73\x65\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x4D\x69\x6E\x69\x6D\x69\x7A\x61\x62\x6C\x65","\x73\x65\x74\x54\x69\x74\x6C\x65","\x69\x6E\x73\x74\x61\x6C\x6C\x4D\x6F\x76\x65\x48\x61\x6E\x64\x6C\x65\x72","\x72\x65\x70\x6C\x61\x63\x65\x43\x68\x69\x6C\x64","\x63\x6C\x6F\x73\x65\x49\x6D\x61\x67\x65","\x2F\x63\x6C\x6F\x73\x65\x2E\x67\x69\x66","\x6D\x69\x6E\x69\x6D\x69\x7A\x65\x49\x6D\x61\x67\x65","\x2F\x6D\x69\x6E\x69\x6D\x69\x7A\x65\x2E\x67\x69\x66","\x6E\x6F\x72\x6D\x61\x6C\x69\x7A\x65\x49\x6D\x61\x67\x65","\x2F\x6E\x6F\x72\x6D\x61\x6C\x69\x7A\x65\x2E\x67\x69\x66","\x6D\x61\x78\x69\x6D\x69\x7A\x65\x49\x6D\x61\x67\x65","\x2F\x6D\x61\x78\x69\x6D\x69\x7A\x65\x2E\x67\x69\x66","\x72\x65\x73\x69\x7A\x65\x49\x6D\x61\x67\x65","\x2F\x72\x65\x73\x69\x7A\x65\x2E\x67\x69\x66","\x6D\x69\x6E\x69\x6D\x75\x6D\x53\x69\x7A\x65","\x74\x69\x74\x6C\x65","\x6D\x78\x57\x69\x6E\x64\x6F\x77","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x54\x69\x74\x6C\x65","\x50\x61\x6E\x65","\x63\x6F\x6E\x74\x65\x6E\x74\x57\x72\x61\x70\x70\x65\x72","\x61\x63\x74\x69\x76\x65\x57\x69\x6E\x64\x6F\x77","\x7A\x49\x6E\x64\x65\x78","\x70\x72\x65\x76\x69\x6F\x75\x73\x57\x69\x6E\x64\x6F\x77","\x66\x69\x74","\x69\x73\x52\x65\x73\x69\x7A\x61\x62\x6C\x65","\x32\x70\x78","\x6E\x77\x2D\x72\x65\x73\x69\x7A\x65","\x73\x65\x74\x53\x69\x7A\x65","\x72\x65\x6D\x6F\x76\x65\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x67\x65\x74\x4D\x69\x6E\x69\x6D\x75\x6D\x53\x69\x7A\x65","\x4D\x69\x6E\x69\x6D\x69\x7A\x65","\x6D\x61\x72\x67\x69\x6E\x52\x69\x67\x68\x74","\x31\x70\x78","\x4E\x6F\x72\x6D\x61\x6C\x69\x7A\x65","\x4D\x61\x78\x69\x6D\x69\x7A\x65","\x6D\x61\x72\x67\x69\x6E\x4C\x65\x66\x74","\x30\x70\x78","\x73\x65\x74\x4C\x6F\x63\x61\x74\x69\x6F\x6E","\x63\x6C\x6F\x73\x65\x49\x6D\x67","\x43\x6C\x6F\x73\x65","\x69\x6E\x73\x65\x72\x74\x42\x65\x66\x6F\x72\x65","\x73\x65\x74\x49\x6D\x61\x67\x65","\x34\x70\x78","\x6D\x61\x72\x67\x69\x6E\x54\x6F\x70","\x2D\x32\x70\x78","\x67\x65\x74\x54\x61\x62\x6C\x65","\x61\x64\x64\x42\x75\x74\x74\x6F\x6E\x73","\x6F\x6B","\x4F\x4B","\x63\x61\x6E\x63\x65\x6C","\x43\x61\x6E\x63\x65\x6C","\x61\x64\x64\x54\x65\x78\x74","\x69\x6E\x70\x75\x74","\x74\x65\x78\x74","\x61\x64\x64\x46\x69\x65\x6C\x64","\x61\x64\x64\x43\x68\x65\x63\x6B\x62\x6F\x78","\x63\x68\x65\x63\x6B\x62\x6F\x78","\x63\x68\x65\x63\x6B\x65\x64","\x61\x64\x64\x54\x65\x78\x74\x61\x72\x65\x61","\x72\x6F\x77\x73","\x61\x64\x64\x43\x6F\x6D\x62\x6F","\x6D\x75\x6C\x74\x69\x70\x6C\x65","\x61\x64\x64\x4F\x70\x74\x69\x6F\x6E","\x6F\x70\x74\x69\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x65\x64","\x72\x65\x73\x69\x7A\x65\x57\x69\x64\x74\x68","\x72\x65\x73\x69\x7A\x65\x48\x65\x69\x67\x68\x74","\x68\x61\x6E\x64\x6C\x69\x6E\x67\x52\x65\x73\x69\x7A\x65","\x67\x65\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74\x57\x69\x64\x74\x68","\x67\x65\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74\x48\x65\x69\x67\x68\x74","\x65\x6C\x65\x6D\x65\x6E\x74","\x64\x72\x6F\x70\x48\x61\x6E\x64\x6C\x65\x72","\x64\x72\x61\x67\x45\x6C\x65\x6D\x65\x6E\x74","\x70\x72\x65\x76\x69\x65\x77\x45\x6C\x65\x6D\x65\x6E\x74","\x65\x6E\x61\x62\x6C\x65\x64","\x63\x75\x72\x72\x65\x6E\x74\x47\x72\x61\x70\x68","\x63\x75\x72\x72\x65\x6E\x74\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x63\x75\x72\x72\x65\x6E\x74\x50\x6F\x69\x6E\x74","\x63\x75\x72\x72\x65\x6E\x74\x47\x75\x69\x64\x65","\x63\x75\x72\x72\x65\x6E\x74\x48\x69\x67\x68\x6C\x69\x67\x68\x74","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x64\x72\x61\x67\x45\x6C\x65\x6D\x65\x6E\x74\x5A\x49\x6E\x64\x65\x78","\x64\x72\x61\x67\x45\x6C\x65\x6D\x65\x6E\x74\x4F\x70\x61\x63\x69\x74\x79","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x47\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x43\x65\x6C\x6C\x41\x74","\x6D\x6F\x75\x73\x65\x4D\x6F\x76\x65\x48\x61\x6E\x64\x6C\x65\x72","\x73\x74\x61\x72\x74\x44\x72\x61\x67","\x6D\x6F\x75\x73\x65\x55\x70\x48\x61\x6E\x64\x6C\x65\x72","\x73\x74\x6F\x70\x44\x72\x61\x67","\x67\x72\x61\x70\x68\x43\x6F\x6E\x74\x61\x69\x6E\x73\x45\x76\x65\x6E\x74","\x64\x72\x61\x67\x45\x78\x69\x74","\x64\x72\x61\x67\x45\x6E\x74\x65\x72","\x64\x72\x61\x67\x4F\x76\x65\x72","\x64\x72\x6F\x70","\x69\x73\x4D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x67\x65\x74\x47\x75\x69\x64\x65\x53\x74\x61\x74\x65\x73","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x61\x75\x74\x6F\x53\x63\x72\x6F\x6C\x6C","\x61\x75\x74\x6F\x45\x78\x74\x65\x6E\x64","\x73\x63\x72\x6F\x6C\x6C\x50\x6F\x69\x6E\x74\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x69\x73\x44\x72\x6F\x70\x45\x6E\x61\x62\x6C\x65\x64","\x68\x69\x67\x68\x6C\x69\x67\x68\x74","\x33","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64\x45\x76\x65\x6E\x74","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x72\x69\x64\x53\x69\x7A\x65","\x73\x6E\x61\x70","\x70\x72\x65\x76\x69\x65\x77\x4F\x66\x66\x73\x65\x74","\x6E\x6F\x52\x65\x73\x65\x74","\x75\x70\x64\x61\x74\x65\x44\x65\x66\x61\x75\x6C\x74\x4D\x6F\x64\x65","\x61\x64\x64\x49\x74\x65\x6D","\x6D\x78\x54\x6F\x6F\x6C\x62\x61\x72\x4D\x6F\x64\x65","\x6D\x78\x54\x6F\x6F\x6C\x62\x61\x72\x49\x74\x65\x6D","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x6D\x65\x6E\x75","\x63\x75\x72\x72\x65\x6E\x74\x49\x6D\x67","\x69\x73\x4D\x65\x6E\x75\x53\x68\x6F\x77\x69\x6E\x67","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x66\x61\x63\x74\x6F\x72\x79\x4D\x65\x74\x68\x6F\x64","\x53\x65\x6C\x65\x63\x74\x65\x64","\x6D\x6F\x75\x73\x65\x6F\x75\x74","\x6D\x78\x54\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6D\x62\x6F\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6D\x78\x54\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6D\x62\x6F","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E\x43\x6F\x6D\x62\x6F","\x73\x65\x6C\x65\x63\x74\x65\x64\x49\x6E\x64\x65\x78","\x6F\x70\x74\x69\x6F\x6E\x73","\x66\x75\x6E\x63\x74","\x61\x64\x64\x53\x77\x69\x74\x63\x68\x4D\x6F\x64\x65","\x69\x6E\x69\x74\x69\x61\x6C\x43\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x61\x6C\x74\x49\x63\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x65\x64\x4D\x6F\x64\x65","\x64\x65\x66\x61\x75\x6C\x74\x4D\x6F\x64\x65","\x73\x65\x6C\x65\x63\x74\x4D\x6F\x64\x65","\x61\x64\x64\x4D\x6F\x64\x65","\x64\x65\x66\x61\x75\x6C\x74\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x72\x65\x73\x65\x74\x4D\x6F\x64\x65","\x61\x64\x64\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x61\x64\x64\x42\x72\x65\x61\x6B","\x61\x64\x64\x4C\x69\x6E\x65","\x68\x72","\x36\x70\x78","\x75\x72\x6C\x49\x6E\x69\x74","\x75\x72\x6C\x50\x6F\x6C\x6C","\x75\x72\x6C\x4E\x6F\x74\x69\x66\x79","\x63\x6F\x64\x65\x63","\x6C\x6F\x6F\x6B\x75\x70","\x65\x64\x69\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x73\x75\x73\x70\x65\x6E\x64\x65\x64","\x3C\x65\x64\x69\x74\x3E","\x63\x68\x61\x6E\x67\x65\x73","\x75\x6E\x64\x6F\x6E\x65","\x65\x6E\x63\x6F\x64\x65\x43\x68\x61\x6E\x67\x65\x73","\x3C\x2F\x65\x64\x69\x74\x3E","\x6C\x69\x6E\x65\x66\x65\x65\x64","\x65\x73\x63\x61\x70\x65\x50\x6F\x73\x74\x44\x61\x74\x61","\x73\x69\x67\x6E\x69\x66\x69\x63\x61\x6E\x74\x52\x65\x6D\x6F\x74\x65\x43\x68\x61\x6E\x67\x65\x73","\x73\x65\x6E\x74","\x72\x65\x63\x65\x69\x76\x65\x64","\x70\x6F\x6C\x6C\x69\x6E\x67","\x70\x6F\x6C\x6C","\x73\x74\x6F\x70","\x72\x65\x61\x73\x6F\x6E","\x6D\x78\x53\x65\x73\x73\x69\x6F\x6E\x2E\x6E\x6F\x74\x69\x66\x79\x3A\x20","\x20\x78\x6D\x6C\x3D","\x3C\x6D\x65\x73\x73\x61\x67\x65\x3E\x3C\x64\x65\x6C\x74\x61\x3E","\x3C\x2F\x64\x65\x6C\x74\x61\x3E\x3C\x2F\x6D\x65\x73\x73\x61\x67\x65\x3E","\x78\x6D\x6C\x3D","\x69\x73\x56\x61\x6C\x69\x64\x52\x65\x73\x70\x6F\x6E\x73\x65","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x3A\x20","\x52\x65\x73\x70\x6F\x6E\x73\x65\x20\x6E\x6F\x74\x20\x72\x65\x61\x64\x79","\x54\x72\x61\x6E\x73\x6D\x69\x73\x73\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x3C\x3F\x70\x68\x70","\x6E\x61\x6D\x65\x73\x70\x61\x63\x65","\x70\x72\x65\x66\x69\x78","\x70\x72\x6F\x63\x65\x73\x73\x53\x74\x61\x74\x65","\x64\x65\x6C\x74\x61","\x70\x72\x6F\x63\x65\x73\x73\x44\x65\x6C\x74\x61","\x64\x65\x63\x6F\x64\x65","\x70\x72\x6F\x63\x65\x73\x73\x45\x64\x69\x74","\x64\x65\x63\x6F\x64\x65\x43\x68\x61\x6E\x67\x65\x73","\x63\x72\x65\x61\x74\x65\x55\x6E\x64\x6F\x61\x62\x6C\x65\x45\x64\x69\x74","\x73\x6F\x75\x72\x63\x65","\x64\x65\x63\x6F\x64\x65\x43\x68\x61\x6E\x67\x65","\x6D\x78\x52\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65","\x6D\x78\x43\x68\x69\x6C\x64\x43\x68\x61\x6E\x67\x65","\x70\x61\x72\x65\x6E\x74","\x63\x65\x6C\x6C\x52\x65\x6D\x6F\x76\x65\x64","\x67\x65\x74\x49\x64","\x70\x75\x74\x4F\x62\x6A\x65\x63\x74","\x73\x69\x67\x6E\x69\x66\x69\x63\x61\x6E\x74","\x72\x65\x64\x6F\x6E\x65","\x69\x73\x45\x6D\x70\x74\x79","\x69\x73\x53\x69\x67\x6E\x69\x66\x69\x63\x61\x6E\x74","\x64\x69\x65","\x68\x69\x73\x74\x6F\x72\x79","\x69\x6E\x64\x65\x78\x4F\x66\x4E\x65\x78\x74\x41\x64\x64","\x63\x61\x6E\x55\x6E\x64\x6F","\x63\x61\x6E\x52\x65\x64\x6F","\x75\x6E\x64\x6F\x61\x62\x6C\x65\x45\x64\x69\x74\x48\x61\x70\x70\x65\x6E\x65\x64","\x73\x68\x69\x66\x74","\x64\x61\x74\x61\x3A\x69\x6D\x61\x67\x65","\x69\x73\x52\x65\x6C\x61\x74\x69\x76\x65\x55\x72\x6C","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x2F\x2F","\x68\x6F\x73\x74","\x70\x61\x74\x68\x6E\x61\x6D\x65","\x6C\x61\x73\x74\x49\x6E\x64\x65\x78\x4F\x66","\x74\x68\x72\x65\x61\x64","\x61\x63\x74\x69\x76\x65","\x64\x79","\x64\x78","\x74\x30\x79","\x74\x30\x78","\x74\x64\x79","\x74\x64\x78","\x73\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x6D\x6F\x75\x73\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x61\x64\x64\x4D\x6F\x75\x73\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x68\x61\x73\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x70\x61\x6E\x47\x72\x61\x70\x68","\x70\x61\x6E\x44\x78","\x70\x61\x6E\x44\x79","\x67\x65\x74\x44\x78","\x67\x65\x74\x44\x79","\x64\x65\x6C\x61\x79","\x73\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C","\x69\x73\x41\x63\x74\x69\x76\x65","\x70\x61\x6E\x54\x6F","\x68\x61\x6E\x64\x6C\x65\x4D\x6F\x75\x73\x65\x4F\x75\x74","\x64\x61\x6D\x70\x65\x72","\x63\x6C\x65\x61\x72\x49\x6E\x74\x65\x72\x76\x61\x6C","\x73\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x4D\x6F\x75\x73\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x73\x75\x62\x6D\x65\x6E\x75\x49\x6D\x61\x67\x65","\x2F\x73\x75\x62\x6D\x65\x6E\x75\x2E\x67\x69\x66","\x75\x73\x65\x4C\x65\x66\x74\x42\x75\x74\x74\x6F\x6E\x46\x6F\x72\x50\x6F\x70\x75\x70","\x69\x74\x65\x6D\x43\x6F\x75\x6E\x74","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x73\x6D\x61\x72\x74\x53\x65\x70\x61\x72\x61\x74\x6F\x72\x73","\x6C\x61\x62\x65\x6C\x73","\x6D\x78\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75","\x64\x69\x73\x61\x62\x6C\x65\x43\x6F\x6E\x74\x65\x78\x74\x4D\x65\x6E\x75","\x69\x73\x4C\x65\x66\x74\x4D\x6F\x75\x73\x65\x42\x75\x74\x74\x6F\x6E","\x77\x69\x6C\x6C\x41\x64\x64\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x63\x6F\x6E\x74\x61\x69\x6E\x73\x49\x74\x65\x6D\x73","\x6D\x78\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75\x49\x74\x65\x6D","\x6D\x78\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75\x49\x63\x6F\x6E","\x20\x64\x69\x73\x61\x62\x6C\x65\x64","\x70\x61\x64\x64\x69\x6E\x67\x52\x69\x67\x68\x74","\x74\x65\x78\x74\x41\x6C\x69\x67\x6E","\x63\x72\x65\x61\x74\x65\x53\x75\x62\x6D\x65\x6E\x75","\x65\x76\x65\x6E\x74\x52\x65\x63\x65\x69\x76\x65\x72","\x61\x63\x74\x69\x76\x65\x52\x6F\x77","\x68\x69\x64\x65\x53\x75\x62\x6D\x65\x6E\x75","\x73\x68\x6F\x77\x53\x75\x62\x6D\x65\x6E\x75","\x6D\x78\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75\x49\x74\x65\x6D\x48\x6F\x76\x65\x72","\x30\x20\x30\x20\x30\x20\x30\x70\x78","\x63\x6F\x6C\x53\x70\x61\x6E","\x32","\x73\x68\x6F\x77\x4D\x65\x6E\x75","\x63\x68\x61\x6E\x67\x65\x48\x61\x6E\x64\x6C\x65\x72","\x67\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x43\x68\x61\x6E\x67\x65\x64","\x73\x65\x74\x47\x72\x61\x70\x68","\x67\x72\x61\x70\x68","\x61\x75\x74\x6F\x53\x61\x76\x65\x44\x65\x6C\x61\x79","\x61\x75\x74\x6F\x53\x61\x76\x65\x54\x68\x72\x6F\x74\x74\x6C\x65","\x61\x75\x74\x6F\x53\x61\x76\x65\x54\x68\x72\x65\x73\x68\x6F\x6C\x64","\x69\x67\x6E\x6F\x72\x65\x64\x43\x68\x61\x6E\x67\x65\x73","\x6C\x61\x73\x74\x53\x6E\x61\x70\x73\x68\x6F\x74","\x73\x74\x61\x72\x74\x41\x6E\x69\x6D\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x41\x6E\x69\x6D\x61\x74\x69\x6F\x6E","\x73\x74\x6F\x70\x41\x6E\x69\x6D\x61\x74\x69\x6F\x6E","\x73\x74\x65\x70\x73","\x65\x61\x73\x65","\x73\x74\x65\x70","\x61\x6E\x69\x6D\x61\x74\x65\x43\x65\x6C\x6C","\x67\x65\x74\x44\x65\x6C\x74\x61","\x69\x73\x56\x65\x72\x74\x65\x78","\x6D\x6F\x76\x65\x53\x74\x61\x74\x65","\x73\x74\x6F\x70\x52\x65\x63\x75\x72\x73\x69\x6F\x6E","\x67\x65\x74\x4F\x72\x69\x67\x69\x6E\x46\x6F\x72\x43\x65\x6C\x6C","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x43\x65\x6C\x6C\x47\x65\x6F\x6D\x65\x74\x72\x79","\x69\x6D\x61\x67\x65\x73","\x61\x6C\x74","\x70\x75\x74\x49\x6D\x61\x67\x65","\x67\x65\x74\x49\x6D\x61\x67\x65","\x66\x61\x6C\x6C\x62\x61\x63\x6B","\x69\x6E\x63\x6C\x75\x64\x65\x4F\x76\x65\x72\x6C\x61\x79\x73","\x64\x72\x61\x77\x53\x74\x61\x74\x65","\x64\x72\x61\x77\x43\x65\x6C\x6C\x53\x74\x61\x74\x65","\x76\x69\x73\x69\x74\x53\x74\x61\x74\x65\x73\x52\x65\x63\x75\x72\x73\x69\x76\x65","\x64\x72\x61\x77\x4F\x76\x65\x72\x6C\x61\x79\x73","\x70\x61\x69\x6E\x74","\x72\x65\x73\x74\x6F\x72\x65","\x6F\x76\x65\x72\x6C\x61\x79\x73","\x63\x6F\x6E\x76\x65\x72\x74\x65\x72","\x63\x72\x65\x61\x74\x65\x55\x72\x6C\x43\x6F\x6E\x76\x65\x72\x74\x65\x72","\x73\x74\x61\x74\x65\x73","\x70\x61\x74\x68","\x72\x6F\x74\x61\x74\x65\x48\x74\x6D\x6C","\x6C\x61\x73\x74\x58","\x6C\x61\x73\x74\x59","\x6D\x6F\x76\x65\x4F\x70","\x4D","\x6C\x69\x6E\x65\x4F\x70","\x4C","\x71\x75\x61\x64\x4F\x70","\x51","\x63\x75\x72\x76\x65\x4F\x70","\x43","\x63\x6C\x6F\x73\x65\x4F\x70","\x5A","\x70\x6F\x69\x6E\x74\x65\x72\x45\x76\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x65","\x33\x20\x33","\x66\x6C\x61\x74","\x6D\x69\x74\x65\x72","\x23\x30\x30\x30\x30\x30\x30","\x53\x48\x41\x44\x4F\x57\x43\x4F\x4C\x4F\x52","\x53\x48\x41\x44\x4F\x57\x5F\x4F\x50\x41\x43\x49\x54\x59","\x53\x48\x41\x44\x4F\x57\x5F\x4F\x46\x46\x53\x45\x54\x5F\x58","\x53\x48\x41\x44\x4F\x57\x5F\x4F\x46\x46\x53\x45\x54\x5F\x59","\x66\x6F\x72\x6D\x61\x74","\x61\x64\x64\x4F\x70","\x72\x6F\x74\x61\x74\x65\x50\x6F\x69\x6E\x74","\x70\x6F\x70","\x73\x65\x74\x41\x6C\x70\x68\x61","\x61\x6C\x70\x68\x61","\x73\x65\x74\x46\x69\x6C\x6C\x43\x6F\x6C\x6F\x72","\x73\x65\x74\x47\x72\x61\x64\x69\x65\x6E\x74","\x66\x69\x6C\x6C\x41\x6C\x70\x68\x61","\x67\x72\x61\x64\x69\x65\x6E\x74\x41\x6C\x70\x68\x61","\x73\x65\x74\x53\x74\x72\x6F\x6B\x65\x43\x6F\x6C\x6F\x72","\x73\x65\x74\x53\x74\x72\x6F\x6B\x65\x57\x69\x64\x74\x68","\x73\x65\x74\x44\x61\x73\x68\x65\x64","\x73\x65\x74\x44\x61\x73\x68\x50\x61\x74\x74\x65\x72\x6E","\x73\x65\x74\x4C\x69\x6E\x65\x43\x61\x70","\x6C\x69\x6E\x65\x43\x61\x70","\x73\x65\x74\x4C\x69\x6E\x65\x4A\x6F\x69\x6E","\x6C\x69\x6E\x65\x4A\x6F\x69\x6E","\x73\x65\x74\x4D\x69\x74\x65\x72\x4C\x69\x6D\x69\x74","\x6D\x69\x74\x65\x72\x4C\x69\x6D\x69\x74","\x73\x65\x74\x46\x6F\x6E\x74\x43\x6F\x6C\x6F\x72","\x73\x65\x74\x46\x6F\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x66\x6F\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x73\x65\x74\x46\x6F\x6E\x74\x42\x6F\x72\x64\x65\x72\x43\x6F\x6C\x6F\x72","\x66\x6F\x6E\x74\x42\x6F\x72\x64\x65\x72\x43\x6F\x6C\x6F\x72","\x73\x65\x74\x46\x6F\x6E\x74\x53\x69\x7A\x65","\x73\x65\x74\x46\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x73\x65\x74\x46\x6F\x6E\x74\x53\x74\x79\x6C\x65","\x73\x65\x74\x53\x68\x61\x64\x6F\x77","\x73\x65\x74\x53\x68\x61\x64\x6F\x77\x43\x6F\x6C\x6F\x72","\x73\x68\x61\x64\x6F\x77\x43\x6F\x6C\x6F\x72","\x73\x65\x74\x53\x68\x61\x64\x6F\x77\x41\x6C\x70\x68\x61","\x73\x68\x61\x64\x6F\x77\x41\x6C\x70\x68\x61","\x73\x65\x74\x53\x68\x61\x64\x6F\x77\x4F\x66\x66\x73\x65\x74","\x73\x68\x61\x64\x6F\x77\x44\x78","\x73\x68\x61\x64\x6F\x77\x44\x79","\x62\x65\x67\x69\x6E","\x6D\x6F\x76\x65\x54\x6F","\x6C\x69\x6E\x65\x54\x6F","\x71\x75\x61\x64\x54\x6F","\x63\x75\x72\x76\x65\x54\x6F","\x61\x72\x63\x54\x6F","\x61\x72\x63\x54\x6F\x43\x75\x72\x76\x65\x73","\x65\x6E\x64","\x77\x72\x69\x74\x65\x44\x65\x66\x61\x75\x6C\x74\x73","\x65\x78\x74\x65\x6E\x64","\x74\x65\x78\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x6F\x6D\x70\x72\x65\x73\x73\x65\x64","\x66\x6F\x6E\x74\x66\x61\x6D\x69\x6C\x79","\x66\x61\x6D\x69\x6C\x79","\x66\x6F\x6E\x74\x73\x69\x7A\x65","\x73\x68\x61\x64\x6F\x77\x63\x6F\x6C\x6F\x72","\x73\x68\x61\x64\x6F\x77\x61\x6C\x70\x68\x61","\x73\x68\x61\x64\x6F\x77\x6F\x66\x66\x73\x65\x74","\x74\x6F\x46\x69\x78\x65\x64","\x72\x6F\x74\x61\x74\x65","\x74\x68\x65\x74\x61","\x63\x78","\x63\x79","\x66\x69\x6C\x6C\x63\x6F\x6C\x6F\x72","\x67\x72\x61\x64\x69\x65\x6E\x74","\x63\x31","\x63\x32","\x77","\x68","\x61\x6C\x70\x68\x61\x31","\x61\x6C\x70\x68\x61\x32","\x73\x74\x72\x6F\x6B\x65\x63\x6F\x6C\x6F\x72","\x73\x74\x72\x6F\x6B\x65\x77\x69\x64\x74\x68","\x64\x61\x73\x68\x70\x61\x74\x74\x65\x72\x6E","\x70\x61\x74\x74\x65\x72\x6E","\x6C\x69\x6E\x65\x63\x61\x70","\x63\x61\x70","\x6C\x69\x6E\x65\x6A\x6F\x69\x6E","\x6D\x69\x74\x65\x72\x6C\x69\x6D\x69\x74","\x6C\x69\x6D\x69\x74","\x66\x6F\x6E\x74\x63\x6F\x6C\x6F\x72","\x66\x6F\x6E\x74\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x63\x6F\x6C\x6F\x72","\x66\x6F\x6E\x74\x62\x6F\x72\x64\x65\x72\x63\x6F\x6C\x6F\x72","\x66\x6F\x6E\x74\x73\x74\x79\x6C\x65","\x72\x65\x63\x74","\x72\x6F\x75\x6E\x64\x72\x65\x63\x74","\x63\x6F\x6E\x76\x65\x72\x74","\x61\x73\x70\x65\x63\x74","\x71\x75\x61\x64","\x78\x31","\x79\x31","\x78\x32","\x79\x32","\x63\x75\x72\x76\x65","\x78\x33","\x79\x33","\x69\x73\x4E\x6F\x64\x65","\x73\x74\x72","\x77\x72\x61\x70","\x66\x69\x6C\x6C","\x63\x6C\x69\x70","\x73\x74\x72\x6F\x6B\x65","\x66\x69\x6C\x6C\x41\x6E\x64\x53\x74\x72\x6F\x6B\x65","\x66\x69\x6C\x6C\x73\x74\x72\x6F\x6B\x65","\x67\x72\x61\x64\x69\x65\x6E\x74\x73","\x64\x65\x66\x73","\x73\x74\x79\x6C\x65\x45\x6E\x61\x62\x6C\x65\x64","\x63\x72\x65\x61\x74\x65\x53\x74\x79\x6C\x65","\x6D\x61\x74\x63\x68\x48\x74\x6D\x6C\x41\x6C\x69\x67\x6E\x6D\x65\x6E\x74","\x66\x6F\x45\x6E\x61\x62\x6C\x65\x64","\x73\x74\x72\x6F\x6B\x65\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x72\x65\x66\x43\x6F\x75\x6E\x74","\x62\x6C\x6F\x63\x6B\x49\x6D\x61\x67\x65\x50\x6F\x69\x6E\x74\x65\x72\x45\x76\x65\x6E\x74\x73","\x73\x76\x67\x7B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A","\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A","\x3B\x66\x69\x6C\x6C\x3A\x6E\x6F\x6E\x65\x3B\x73\x74\x72\x6F\x6B\x65\x2D\x6D\x69\x74\x65\x72\x6C\x69\x6D\x69\x74\x3A\x31\x30\x7D","\x4E\x53\x5F\x53\x56\x47","\x78\x6D\x6C\x6E\x73","\x63\x72\x65\x61\x74\x65\x47\x72\x61\x64\x69\x65\x6E\x74\x49\x64","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x53\x4F\x55\x54\x48","\x73","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x45\x41\x53\x54","\x65","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4E\x4F\x52\x54\x48","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x57\x45\x53\x54","\x6D\x78\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x2D","\x67\x65\x74\x53\x76\x67\x47\x72\x61\x64\x69\x65\x6E\x74","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x69\x64","\x63\x72\x65\x61\x74\x65\x53\x76\x67\x47\x72\x61\x64\x69\x65\x6E\x74","\x6C\x69\x6E\x65\x61\x72\x47\x72\x61\x64\x69\x65\x6E\x74","\x30\x25","\x3B\x73\x74\x6F\x70\x2D\x6F\x70\x61\x63\x69\x74\x79\x3A","\x6F\x66\x66\x73\x65\x74","\x73\x74\x6F\x70\x2D\x63\x6F\x6C\x6F\x72\x3A","\x61\x64\x64\x4E\x6F\x64\x65","\x64","\x75\x70\x64\x61\x74\x65\x46\x69\x6C\x6C","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x75\x70\x64\x61\x74\x65\x53\x74\x72\x6F\x6B\x65","\x63\x72\x65\x61\x74\x65\x53\x68\x61\x64\x6F\x77","\x63\x72\x65\x61\x74\x65\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73","\x61\x6C\x6C","\x66\x69\x6C\x6C\x2D\x6F\x70\x61\x63\x69\x74\x79","\x75\x72\x6C\x28\x23","\x73\x74\x72\x6F\x6B\x65\x2D\x6F\x70\x61\x63\x69\x74\x79","\x73\x74\x72\x6F\x6B\x65\x2D\x77\x69\x64\x74\x68","\x75\x70\x64\x61\x74\x65\x53\x74\x72\x6F\x6B\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x73\x74\x72\x6F\x6B\x65\x2D\x64\x61\x73\x68\x61\x72\x72\x61\x79","\x63\x72\x65\x61\x74\x65\x44\x61\x73\x68\x50\x61\x74\x74\x65\x72\x6E","\x73\x74\x72\x6F\x6B\x65\x2D\x6C\x69\x6E\x65\x6A\x6F\x69\x6E","\x62\x75\x74\x74","\x73\x74\x72\x6F\x6B\x65\x2D\x6C\x69\x6E\x65\x63\x61\x70","\x73\x74\x72\x6F\x6B\x65\x2D\x6D\x69\x74\x65\x72\x6C\x69\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x77\x68\x69\x74\x65","\x29\x73\x63\x61\x6C\x65\x28","\x29\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x28","\x72\x6F\x74\x61\x74\x65\x28","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x43\x78","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x43\x79","\x72\x78","\x72\x79","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x4E\x53","\x78\x6C\x69\x6E\x6B\x3A\x68\x72\x65\x66","\x70\x72\x65\x73\x65\x72\x76\x65\x41\x73\x70\x65\x63\x74\x52\x61\x74\x69\x6F","\x73\x63\x61\x6C\x65\x28","\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x6E\x6F\x6E\x65","\x63\x72\x65\x61\x74\x65\x44\x69\x76","\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A","\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A","\x3B\x63\x6F\x6C\x6F\x72\x3A","\x3B\x6C\x69\x6E\x65\x2D\x68\x65\x69\x67\x68\x74\x3A","\x70\x78\x3B","\x46\x4F\x4E\x54\x5F\x42\x4F\x4C\x44","\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x62\x6F\x6C\x64\x3B","\x46\x4F\x4E\x54\x5F\x49\x54\x41\x4C\x49\x43","\x66\x6F\x6E\x74\x2D\x73\x74\x79\x6C\x65\x3A\x69\x74\x61\x6C\x69\x63\x3B","\x46\x4F\x4E\x54\x5F\x55\x4E\x44\x45\x52\x4C\x49\x4E\x45","\x66\x6F\x6E\x74\x2D\x64\x65\x63\x6F\x72\x61\x74\x69\x6F\x6E\x3A\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65\x3B","\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x63\x65\x6E\x74\x65\x72\x3B","\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x72\x69\x67\x68\x74\x3B","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A","\x62\x6F\x72\x64\x65\x72\x3A\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20","\x26\x61\x6D\x70\x3B\x67\x74\x3B","\x26\x61\x6D\x70\x3B\x6C\x74\x3B","\x3C\x64\x69\x76\x20\x78\x6D\x6C\x6E\x73\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x31\x39\x39\x39\x2F\x78\x68\x74\x6D\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B","\x22\x3E","\x3C\x2F\x64\x69\x76\x3E","\x3C\x68\x72\x20\x2F\x3E","\x3C\x62\x72\x20\x2F\x3E","\x3C\x64\x69\x76\x20\x78\x6D\x6C\x6E\x73\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x31\x39\x39\x39\x2F\x78\x68\x74\x6D\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22","\x68\x74\x6D\x6C","\x76\x65\x72\x74\x69\x63\x61\x6C\x2D\x61\x6C\x69\x67\x6E\x3A\x74\x6F\x70\x3B","\x6F\x76\x65\x72\x66\x6C\x6F\x77\x3A\x68\x69\x64\x64\x65\x6E\x3B","\x6D\x61\x78\x2D\x68\x65\x69\x67\x68\x74\x3A","\x77\x69\x64\x74\x68\x3A","\x77\x68\x69\x74\x65\x2D\x73\x70\x61\x63\x65\x3A\x6E\x6F\x72\x6D\x61\x6C\x3B","\x77\x68\x69\x74\x65\x2D\x73\x70\x61\x63\x65\x3A\x6E\x6F\x77\x72\x61\x70\x3B","\x66\x6F\x72\x65\x69\x67\x6E\x4F\x62\x6A\x65\x63\x74","\x70\x6C\x61\x69\x6E\x54\x65\x78\x74","\x63\x72\x65\x61\x74\x65\x43\x6C\x69\x70","\x6D\x78\x2D\x63\x6C\x69\x70\x2D","\x63\x6C\x69\x70\x50\x61\x74\x68","\x63\x6C\x69\x70\x2D\x70\x61\x74\x68","\x75\x70\x64\x61\x74\x65\x46\x6F\x6E\x74","\x74\x65\x78\x74\x2D\x61\x6E\x63\x68\x6F\x72","\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65","\x61\x64\x64\x54\x65\x78\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79","\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74","\x62\x6F\x6C\x64","\x66\x6F\x6E\x74\x2D\x73\x74\x79\x6C\x65","\x69\x74\x61\x6C\x69\x63","\x74\x65\x78\x74\x2D\x64\x65\x63\x6F\x72\x61\x74\x69\x6F\x6E","\x67\x65\x74\x42\x42\x6F\x78","\x66\x6F\x6E\x74\x57\x65\x69\x67\x68\x74","\x3C\x62\x72\x2F\x3E","\x6D\x6F\x64","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x28\x30\x2E\x35\x2C\x20\x30\x2E\x35\x29","\x6D","\x6C","\x63","\x72\x6F\x74\x61\x74\x65\x64\x48\x74\x6D\x6C\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x76\x6D\x6C\x53\x63\x61\x6C\x65","\x20\x65","\x63\x6F\x6F\x72\x64\x73\x69\x7A\x65","\x73\x74\x72\x6F\x6B\x65\x77\x65\x69\x67\x68\x74","\x73\x74\x72\x6F\x6B\x65\x64","\x63\x72\x65\x61\x74\x65\x53\x74\x72\x6F\x6B\x65","\x63\x72\x65\x61\x74\x65\x46\x69\x6C\x6C","\x63\x72\x65\x61\x74\x65\x54\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x46\x69\x6C\x6C","\x66\x69\x6C\x6C\x65\x64","\x3A\x66\x69\x6C\x6C","\x2F\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x2E\x67\x69\x66","\x74\x69\x6C\x65","\x63\x6F\x6C\x6F\x72\x32","\x66\x6C\x69\x70","\x61\x6E\x67\x6C\x65","\x4F\x46\x46\x49\x43\x45\x5F\x50\x52\x45\x46\x49\x58","\x3A\x6F\x70\x61\x63\x69\x74\x79\x32","\x3A\x73\x74\x72\x6F\x6B\x65","\x65\x6E\x64\x63\x61\x70","\x6A\x6F\x69\x6E\x73\x74\x79\x6C\x65","\x31\x30","\x64\x61\x73\x68\x73\x74\x79\x6C\x65","\x67\x65\x74\x56\x6D\x6C\x44\x61\x73\x68\x53\x74\x79\x6C\x65","\x64\x61\x73\x68","\x30\x20\x32","\x63\x72\x65\x61\x74\x65\x53\x68\x61\x64\x6F\x77\x53\x74\x72\x6F\x6B\x65","\x63\x72\x65\x61\x74\x65\x53\x68\x61\x64\x6F\x77\x46\x69\x6C\x6C","\x3A\x73\x68\x61\x70\x65","\x63\x20","\x63\x72\x65\x61\x74\x65\x52\x65\x63\x74","\x3A\x72\x65\x63\x74","\x3A\x72\x6F\x75\x6E\x64\x72\x65\x63\x74","\x61\x72\x63\x73\x69\x7A\x65","\x3A\x6F\x76\x61\x6C","\x61\x74\x6D\x6F\x73\x74","\x69\x67\x6E\x6F\x72\x65","\x66\x72\x61\x6D\x65","\x31\x38\x30","\x66\x6F\x6E\x74\x44\x65\x63\x6F\x72\x61\x74\x69\x6F\x6E","\x3A\x67\x72\x6F\x75\x70","\x72\x65\x6C\x61\x74\x69\x76\x65","\x67\x65\x74\x41\x6C\x69\x67\x6E\x6D\x65\x6E\x74\x41\x73\x50\x6F\x69\x6E\x74","\x6E\x6F\x72\x6D\x61\x6C","\x6D\x61\x78\x48\x65\x69\x67\x68\x74","\x67\x72\x6F\x75\x70","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x4D\x61\x74\x72\x69\x78\x28\x4D\x31\x31\x3D","\x2C\x20\x4D\x31\x32\x3D","\x2C\x20\x4D\x32\x31\x3D","\x2C\x20\x4D\x32\x32\x3D","\x2C\x20\x73\x69\x7A\x69\x6E\x67\x4D\x65\x74\x68\x6F\x64\x3D\x27\x61\x75\x74\x6F\x20\x65\x78\x70\x61\x6E\x64\x27\x29","\x3A\x70\x61\x74\x68","\x74\x65\x78\x74\x70\x61\x74\x68\x6F\x6B","\x6D\x20","\x20\x6C\x20","\x3A\x74\x65\x78\x74\x70\x61\x74\x68","\x76\x2D\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A","\x73\x74\x72\x69\x6E\x67","\x73\x65\x74\x53\x74\x61\x74\x65\x73","\x67\x75\x69\x64\x65\x58","\x67\x75\x69\x64\x65\x59","\x67\x65\x74\x47\x75\x69\x64\x65\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x63\x72\x65\x61\x74\x65\x47\x75\x69\x64\x65\x53\x68\x61\x70\x65","\x69\x73\x44\x61\x73\x68\x65\x64","\x44\x49\x41\x4C\x45\x43\x54\x5F\x56\x4D\x4C","\x67\x65\x74\x4F\x76\x65\x72\x6C\x61\x79\x50\x61\x6E\x65","\x70\x6F\x69\x6E\x74\x73","\x73\x63\x72\x6F\x6C\x6C\x57\x69\x64\x74\x68","\x64\x65\x73\x63","\x70\x61\x72\x73\x65\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x70\x61\x72\x73\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x64\x65\x66\x61\x75\x6C\x74\x4C\x6F\x63\x61\x6C\x69\x7A\x65\x64","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x77\x30","\x68\x30","\x62\x67\x4E\x6F\x64\x65","\x66\x67\x4E\x6F\x64\x65","\x66\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x76\x61\x72\x69\x61\x62\x6C\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x68\x69\x6C\x64\x4E\x6F\x64\x65\x73","\x70\x61\x72\x73\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x65\x76\x61\x6C\x75\x61\x74\x65\x54\x65\x78\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x65\x76\x61\x6C\x75\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x6C\x6F\x63\x61\x6C\x69\x7A\x65\x64","\x65\x76\x61\x6C","\x64\x72\x61\x77\x53\x68\x61\x70\x65","\x64\x72\x61\x77\x43\x68\x69\x6C\x64\x72\x65\x6E","\x63\x6F\x6D\x70\x75\x74\x65\x41\x73\x70\x65\x63\x74","\x69\x6E\x68\x65\x72\x69\x74","\x67\x65\x74\x4E\x75\x6D\x62\x65\x72","\x64\x72\x61\x77\x4E\x6F\x64\x65","\x66\x69\x78\x65\x64","\x61\x72\x63","\x78\x2D\x61\x78\x69\x73\x2D\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x6C\x61\x72\x67\x65\x2D\x61\x72\x63\x2D\x66\x6C\x61\x67","\x73\x77\x65\x65\x70\x2D\x66\x6C\x61\x67","\x52\x45\x43\x54\x41\x4E\x47\x4C\x45\x5F\x52\x4F\x55\x4E\x44\x49\x4E\x47\x5F\x46\x41\x43\x54\x4F\x52","\x61\x6C\x69\x67\x6E\x2D\x73\x68\x61\x70\x65","\x69\x6E\x63\x6C\x75\x64\x65\x2D\x73\x68\x61\x70\x65","\x67\x65\x74\x53\x74\x65\x6E\x63\x69\x6C","\x73\x74\x65\x6E\x63\x69\x6C","\x62\x6F\x75\x6E\x64\x73","\x62\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78","\x73\x76\x67\x53\x74\x72\x6F\x6B\x65\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x73\x74\x65\x6E\x63\x69\x6C\x50\x6F\x69\x6E\x74\x65\x72\x45\x76\x65\x6E\x74\x73","\x69\x73\x50\x61\x72\x73\x65\x56\x6D\x6C","\x69\x73\x48\x74\x6D\x6C\x41\x6C\x6C\x6F\x77\x65\x64","\x67\x65\x74\x53\x76\x67\x53\x63\x72\x65\x65\x6E\x4F\x66\x66\x73\x65\x74","\x63\x72\x65\x61\x74\x65\x53\x76\x67","\x63\x72\x65\x61\x74\x65\x48\x74\x6D\x6C","\x63\x72\x65\x61\x74\x65\x56\x6D\x6C","\x72\x65\x63\x6F\x6E\x66\x69\x67\x75\x72\x65","\x75\x70\x64\x61\x74\x65\x42\x6F\x75\x6E\x64\x73\x46\x72\x6F\x6D\x50\x6F\x69\x6E\x74\x73","\x63\x68\x65\x63\x6B\x42\x6F\x75\x6E\x64\x73","\x72\x65\x64\x72\x61\x77\x48\x74\x6D\x6C\x53\x68\x61\x70\x65","\x72\x65\x64\x72\x61\x77\x53\x68\x61\x70\x65","\x75\x70\x64\x61\x74\x65\x42\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78","\x63\x72\x65\x61\x74\x65\x56\x6D\x6C\x47\x72\x6F\x75\x70","\x63\x72\x65\x61\x74\x65\x43\x61\x6E\x76\x61\x73","\x68\x61\x73\x43\x68\x69\x6C\x64\x4E\x6F\x64\x65\x73","\x6C\x61\x73\x74\x43\x68\x69\x6C\x64","\x62\x65\x66\x6F\x72\x65\x65\x6E\x64","\x69\x6E\x73\x65\x72\x74\x41\x64\x6A\x61\x63\x65\x6E\x74\x48\x54\x4D\x4C","\x61\x64\x64\x54\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x46\x69\x6C\x74\x65\x72","\x64\x65\x73\x74\x72\x6F\x79\x43\x61\x6E\x76\x61\x73","\x75\x70\x64\x61\x74\x65\x56\x6D\x6C\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6D\x78\x52\x65\x66\x43\x6F\x75\x6E\x74","\x6F\x6C\x64\x47\x72\x61\x64\x69\x65\x6E\x74\x73","\x72\x65\x6C\x65\x61\x73\x65\x53\x76\x67\x47\x72\x61\x64\x69\x65\x6E\x74\x73","\x69\x73\x50\x61\x69\x6E\x74\x42\x6F\x75\x6E\x64\x73\x49\x6E\x76\x65\x72\x74\x65\x64","\x75\x70\x64\x61\x74\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x43\x61\x6E\x76\x61\x73","\x70\x61\x69\x6E\x74\x53\x74\x65\x6E\x63\x69\x6C\x53\x68\x61\x70\x65","\x70\x61\x69\x6E\x74\x45\x64\x67\x65\x53\x68\x61\x70\x65","\x70\x61\x69\x6E\x74\x56\x65\x72\x74\x65\x78\x53\x68\x61\x70\x65","\x69\x73\x53\x68\x61\x64\x6F\x77","\x67\x65\x74\x47\x72\x61\x64\x69\x65\x6E\x74\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x53\x68\x61\x70\x65\x52\x6F\x74\x61\x74\x69\x6F\x6E","\x61\x64\x64\x54\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x63\x74\x61\x6E\x67\x6C\x65","\x73\x65\x74\x54\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x70\x61\x69\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x70\x61\x69\x6E\x74\x46\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64","\x67\x65\x74\x41\x72\x63\x53\x69\x7A\x65","\x70\x61\x69\x6E\x74\x47\x6C\x61\x73\x73\x45\x66\x66\x65\x63\x74","\x23\x66\x66\x66\x66\x66\x66","\x69\x73\x52\x6F\x75\x6E\x64\x65\x64","\x73\x74\x65\x6E\x63\x69\x6C\x46\x6C\x69\x70\x48","\x73\x74\x65\x6E\x63\x69\x6C\x46\x6C\x69\x70\x56","\x73\x65\x74\x43\x75\x72\x73\x6F\x72","\x67\x65\x74\x43\x75\x72\x73\x6F\x72","\x63\x72\x65\x61\x74\x65\x42\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78","\x61\x75\x67\x6D\x65\x6E\x74\x42\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78","\x67\x65\x74\x42\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78","\x67\x65\x74\x52\x6F\x74\x61\x74\x69\x6F\x6E","\x67\x65\x74\x54\x65\x78\x74\x52\x6F\x74\x61\x74\x69\x6F\x6E","\x76\x65\x72\x74\x69\x63\x61\x6C\x54\x65\x78\x74\x52\x6F\x74\x61\x74\x69\x6F\x6E","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28\x27","\x2F\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x2E\x67\x69\x66\x27\x29","\x73\x74\x65\x6E\x63\x69\x6C\x73","\x6D\x61\x72\x6B\x65\x72\x73","\x41\x52\x52\x4F\x57\x5F\x43\x4C\x41\x53\x53\x49\x43","\x41\x52\x52\x4F\x57\x5F\x44\x49\x41\x4D\x4F\x4E\x44","\x61\x64\x64\x4D\x61\x72\x6B\x65\x72","\x72\x65\x64\x72\x61\x77\x50\x61\x74\x68","\x75\x70\x64\x61\x74\x65\x48\x74\x6D\x6C\x42\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x48\x74\x6D\x6C\x46\x69\x6C\x74\x65\x72\x73","\x75\x70\x64\x61\x74\x65\x48\x74\x6D\x6C\x43\x6F\x6C\x6F\x72\x73","\x62\x6F\x72\x64\x65\x72\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72\x43\x6F\x6C\x6F\x72","\x73\x6F\x6C\x69\x64","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x64\x72\x6F\x70\x53\x68\x61\x64\x6F\x77\x20\x28\x4F\x66\x66\x58\x3D\x27","\x27\x2C\x20\x4F\x66\x66\x59\x3D\x27","\x27\x2C\x20\x43\x6F\x6C\x6F\x72\x3D\x27","\x27\x29","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x73\x74\x61\x72\x74\x43\x6F\x6C\x6F\x72\x53\x74\x72\x3D\x27","\x27\x2C\x20\x65\x6E\x64\x43\x6F\x6C\x6F\x72\x53\x74\x72\x3D\x27","\x27\x2C\x20\x67\x72\x61\x64\x69\x65\x6E\x74\x54\x79\x70\x65\x3D\x27","\x70\x61\x69\x6E\x74\x4C\x69\x6E\x65","\x61\x72\x72\x6F\x77\x57\x69\x64\x74\x68","\x41\x52\x52\x4F\x57\x5F\x57\x49\x44\x54\x48","\x41\x52\x52\x4F\x57\x5F\x53\x50\x41\x43\x49\x4E\x47","\x41\x52\x52\x4F\x57\x5F\x53\x49\x5A\x45","\x44\x45\x46\x41\x55\x4C\x54\x5F\x46\x4F\x4E\x54\x53\x54\x59\x4C\x45","\x63\x6C\x69\x70\x70\x65\x64","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x54\x6F\x70","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x42\x6F\x74\x74\x6F\x6D","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x4C\x65\x66\x74","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x52\x69\x67\x68\x74","\x72\x65\x70\x6C\x61\x63\x65\x4C\x69\x6E\x65\x66\x65\x65\x64\x73","\x69\x67\x6E\x6F\x72\x65\x43\x6C\x69\x70\x70\x65\x64\x53\x74\x72\x69\x6E\x67\x53\x69\x7A\x65","\x69\x67\x6E\x6F\x72\x65\x53\x74\x72\x69\x6E\x67\x53\x69\x7A\x65","\x74\x65\x78\x74\x44\x69\x76","\x75\x70\x64\x61\x74\x65\x53\x69\x7A\x65","\x6D\x61\x72\x67\x69\x6E","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x54\x52\x49\x43\x54\x48\x54\x4D\x4C","\x75\x70\x64\x61\x74\x65\x56\x61\x6C\x75\x65","\x75\x70\x64\x61\x74\x65\x48\x74\x6D\x6C\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x75\x70\x64\x61\x74\x65\x48\x74\x6D\x6C\x46\x69\x6C\x74\x65\x72","\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x4F\x72\x69\x67\x69\x6E","\x25\x20","\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x25\x2C","\x25\x29\x73\x63\x61\x6C\x65\x28","\x29\x20\x72\x6F\x74\x61\x74\x65\x28","\x64\x65\x67\x29","\x30\x25\x20\x30\x25","\x25\x29","\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20","\x3C\x64\x69\x76\x20\x73\x74\x79\x6C\x65\x3D\x22\x7A\x6F\x6F\x6D\x3A\x31\x3B","\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x5F\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x70\x61\x64\x64\x69\x6E\x67\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x31\x70\x78\x3B\x70\x61\x64\x64\x69\x6E\x67\x2D\x72\x69\x67\x68\x74\x3A\x31\x70\x78\x3B\x6C\x69\x6E\x65\x2D\x68\x65\x69\x67\x68\x74\x3A","\x75\x70\x64\x61\x74\x65\x4D\x61\x72\x67\x69\x6E","\x67\x65\x74\x53\x70\x61\x63\x69\x6E\x67","\x70\x72\x65\x73\x65\x72\x76\x65\x49\x6D\x61\x67\x65\x41\x73\x70\x65\x63\x74","\x69\x6D\x61\x67\x65\x46\x6C\x69\x70\x48","\x69\x6D\x61\x67\x65\x46\x6C\x69\x70\x56","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x42\x61\x73\x69\x63\x49\x6D\x61\x67\x65\x28\x72\x6F\x74\x61\x74\x69\x6F\x6E\x3D\x32\x29","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x42\x61\x73\x69\x63\x49\x6D\x61\x67\x65\x28\x6D\x69\x72\x72\x6F\x72\x3D\x31\x29","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x42\x61\x73\x69\x63\x49\x6D\x61\x67\x65\x28\x72\x6F\x74\x61\x74\x69\x6F\x6E\x3D\x32\x2C\x20\x6D\x69\x72\x72\x6F\x72\x3D\x31\x29","\x69\x6D\x61\x67\x65\x53\x69\x7A\x65","\x44\x45\x46\x41\x55\x4C\x54\x5F\x49\x4D\x41\x47\x45\x53\x49\x5A\x45","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x53\x69\x7A\x65","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72","\x70\x61\x69\x6E\x74\x49\x6D\x61\x67\x65","\x70\x61\x69\x6E\x74\x49\x6E\x64\x69\x63\x61\x74\x6F\x72","\x67\x65\x74\x49\x6D\x61\x67\x65\x42\x6F\x75\x6E\x64\x73","\x41\x4C\x49\x47\x4E\x5F\x54\x4F\x50","\x67\x65\x74\x49\x6E\x64\x69\x63\x61\x74\x6F\x72\x42\x6F\x75\x6E\x64\x73","\x63\x72\x65\x61\x74\x65\x4D\x61\x72\x6B\x65\x72","\x53\x54\x59\x4C\x45\x5F\x43\x55\x52\x56\x45\x44","\x70\x61\x69\x6E\x74\x43\x75\x72\x76\x65\x64\x4C\x69\x6E\x65","\x53\x54\x59\x4C\x45\x5F\x53\x54\x41\x52\x54\x53\x49\x5A\x45","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x44\x53\x49\x5A\x45","\x53\x54\x59\x4C\x45\x5F\x53\x54\x41\x52\x54\x41\x52\x52\x4F\x57","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x44\x41\x52\x52\x4F\x57","\x53\x54\x59\x4C\x45\x5F\x53\x54\x41\x52\x54\x46\x49\x4C\x4C","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x44\x46\x49\x4C\x4C","\x70\x61\x69\x6E\x74\x52\x6F\x75\x6E\x64\x65\x64\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x70\x61\x69\x6E\x74\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x70\x61\x69\x6E\x74\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x75\x73\x65\x42\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78","\x6D\x6F\x76\x65\x43\x65\x6C\x6C","\x67\x65\x74\x47\x72\x61\x70\x68","\x67\x65\x74\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x67\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x74\x72\x61\x76\x65\x72\x73\x65","\x67\x65\x74\x45\x64\x67\x65\x43\x6F\x75\x6E\x74","\x67\x65\x74\x45\x64\x67\x65\x41\x74","\x67\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x67\x65\x74\x56\x69\x73\x69\x62\x6C\x65\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x69\x73\x56\x65\x72\x74\x65\x78\x4D\x6F\x76\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x4D\x6F\x76\x61\x62\x6C\x65","\x69\x73\x56\x65\x72\x74\x65\x78\x49\x67\x6E\x6F\x72\x65\x64","\x69\x73\x43\x65\x6C\x6C\x56\x69\x73\x69\x62\x6C\x65","\x69\x73\x45\x64\x67\x65\x49\x67\x6E\x6F\x72\x65\x64","\x73\x65\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x73\x65\x74\x4F\x72\x74\x68\x6F\x67\x6F\x6E\x61\x6C\x45\x64\x67\x65","\x67\x65\x74\x50\x61\x72\x65\x6E\x74\x4F\x66\x66\x73\x65\x74","\x69\x73\x41\x6E\x63\x65\x73\x74\x6F\x72","\x67\x65\x74\x47\x65\x6F\x6D\x65\x74\x72\x79","\x73\x65\x74\x45\x64\x67\x65\x50\x6F\x69\x6E\x74\x73","\x73\x65\x74\x52\x65\x6C\x61\x74\x69\x76\x65","\x73\x65\x74\x47\x65\x6F\x6D\x65\x74\x72\x79","\x73\x65\x74\x56\x65\x72\x74\x65\x78\x4C\x6F\x63\x61\x74\x69\x6F\x6E","\x67\x65\x74\x56\x65\x72\x74\x65\x78\x42\x6F\x75\x6E\x64\x73","\x61\x72\x72\x61\x6E\x67\x65\x47\x72\x6F\x75\x70\x73","\x67\x65\x74\x43\x68\x69\x6C\x64\x56\x65\x72\x74\x69\x63\x65\x73","\x67\x65\x74\x42\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78\x46\x72\x6F\x6D\x47\x65\x6F\x6D\x65\x74\x72\x79","\x69\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x67\x65\x74\x53\x74\x61\x72\x74\x53\x69\x7A\x65","\x78\x30","\x79\x30","\x6B\x65\x65\x70\x46\x69\x72\x73\x74\x4C\x6F\x63\x61\x74\x69\x6F\x6E","\x72\x65\x73\x69\x7A\x65\x50\x61\x72\x65\x6E\x74","\x72\x65\x73\x69\x7A\x65\x4C\x61\x73\x74","\x69\x73\x48\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x67\x65\x74\x49\x6E\x64\x65\x78","\x67\x65\x74\x50\x61\x72\x65\x6E\x74\x53\x69\x7A\x65","\x69\x73\x4C\x61\x79\x65\x72","\x63\x75\x72\x72\x65\x6E\x74\x52\x6F\x6F\x74","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x6C\x6C\x61\x70\x73\x65\x64","\x72\x65\x73\x69\x7A\x65\x56\x65\x72\x74\x69\x63\x65\x73","\x69\x6E\x76\x65\x72\x74","\x67\x72\x6F\x75\x70\x50\x61\x64\x64\x69\x6E\x67","\x70\x61\x72\x65\x6E\x74\x73\x43\x68\x61\x6E\x67\x65\x64","\x6D\x6F\x76\x65\x54\x72\x65\x65","\x6C\x65\x76\x65\x6C\x44\x69\x73\x74\x61\x6E\x63\x65","\x6E\x6F\x64\x65\x44\x69\x73\x74\x61\x6E\x63\x65","\x72\x65\x73\x65\x74\x45\x64\x67\x65\x73","\x70\x72\x65\x66\x48\x6F\x7A\x45\x64\x67\x65\x53\x65\x70","\x70\x72\x65\x66\x56\x65\x72\x74\x45\x64\x67\x65\x4F\x66\x66","\x6D\x69\x6E\x45\x64\x67\x65\x4A\x65\x74\x74\x79","\x63\x68\x61\x6E\x6E\x65\x6C\x42\x75\x66\x66\x65\x72","\x65\x64\x67\x65\x52\x6F\x75\x74\x69\x6E\x67","\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x54\x72\x65\x65\x52\x6F\x6F\x74\x73","\x64\x66\x73","\x6C\x61\x79\x6F\x75\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x4C\x61\x79\x6F\x75\x74","\x76\x65\x72\x74\x69\x63\x61\x6C\x4C\x61\x79\x6F\x75\x74","\x6D\x6F\x76\x65\x4E\x6F\x64\x65","\x61\x64\x6A\x75\x73\x74\x50\x61\x72\x65\x6E\x74\x73","\x6C\x6F\x63\x61\x6C\x45\x64\x67\x65\x50\x72\x6F\x63\x65\x73\x73\x69\x6E\x67","\x6E\x65\x78\x74","\x63\x72\x65\x61\x74\x65\x4E\x6F\x64\x65","\x61\x74\x74\x61\x63\x68\x50\x61\x72\x65\x6E\x74","\x6C\x61\x79\x6F\x75\x74\x4C\x65\x61\x66","\x6F\x66\x66\x73\x65\x74\x58","\x6F\x66\x66\x73\x65\x74\x59","\x75\x70\x70\x65\x72\x48\x65\x61\x64","\x63\x6F\x6E\x74\x6F\x75\x72","\x63\x72\x65\x61\x74\x65\x4C\x69\x6E\x65","\x6C\x6F\x77\x65\x72\x48\x65\x61\x64","\x75\x70\x70\x65\x72\x54\x61\x69\x6C","\x6C\x6F\x77\x65\x72\x54\x61\x69\x6C","\x6D\x65\x72\x67\x65","\x62\x72\x69\x64\x67\x65","\x73\x6F\x72\x74\x43\x65\x6C\x6C\x73","\x70\x72\x6F\x63\x65\x73\x73\x4E\x6F\x64\x65\x4F\x75\x74\x67\x6F\x69\x6E\x67","\x67\x65\x74\x45\x64\x67\x65\x73\x42\x65\x74\x77\x65\x65\x6E","\x77\x65\x69\x67\x68\x74\x65\x64\x56\x61\x6C\x75\x65","\x6E\x75\x64\x67\x65","\x76\x69\x73\x69\x74\x65\x64","\x72\x61\x6E\x6B\x49\x6E\x64\x65\x78","\x75\x73\x65\x49\x6E\x70\x75\x74\x4F\x72\x69\x67\x69\x6E","\x64\x69\x73\x61\x62\x6C\x65\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x66\x6F\x72\x63\x65\x43\x6F\x6E\x73\x74\x61\x6E\x74","\x66\x6F\x72\x63\x65\x43\x6F\x6E\x73\x74\x61\x6E\x74\x53\x71\x75\x61\x72\x65\x64","\x6D\x69\x6E\x44\x69\x73\x74\x61\x6E\x63\x65\x4C\x69\x6D\x69\x74","\x6D\x61\x78\x44\x69\x73\x74\x61\x6E\x63\x65\x4C\x69\x6D\x69\x74","\x6D\x69\x6E\x44\x69\x73\x74\x61\x6E\x63\x65\x4C\x69\x6D\x69\x74\x53\x71\x75\x61\x72\x65\x64","\x69\x6E\x69\x74\x69\x61\x6C\x54\x65\x6D\x70","\x74\x65\x6D\x70\x65\x72\x61\x74\x75\x72\x65","\x6D\x61\x78\x49\x74\x65\x72\x61\x74\x69\x6F\x6E\x73","\x69\x74\x65\x72\x61\x74\x69\x6F\x6E","\x61\x6C\x6C\x6F\x77\x65\x64\x54\x6F\x52\x75\x6E","\x76\x65\x72\x74\x65\x78\x41\x72\x72\x61\x79","\x67\x65\x74\x42\x6F\x75\x6E\x64\x73","\x69\x6E\x64\x69\x63\x65\x73","\x64\x69\x73\x70\x58","\x64\x69\x73\x70\x59","\x63\x65\x6C\x6C\x4C\x6F\x63\x61\x74\x69\x6F\x6E","\x69\x73\x4D\x6F\x76\x65\x61\x62\x6C\x65","\x6E\x65\x69\x67\x68\x62\x6F\x75\x72\x73","\x72\x61\x64\x69\x75\x73","\x72\x61\x64\x69\x75\x73\x53\x71\x75\x61\x72\x65\x64","\x67\x65\x74\x4F\x70\x70\x6F\x73\x69\x74\x65\x73","\x72\x65\x73\x65\x74\x45\x64\x67\x65","\x63\x61\x6C\x63\x52\x65\x70\x75\x6C\x73\x69\x6F\x6E","\x63\x61\x6C\x63\x41\x74\x74\x72\x61\x63\x74\x69\x6F\x6E","\x63\x61\x6C\x63\x50\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x72\x65\x64\x75\x63\x65\x54\x65\x6D\x70\x65\x72\x61\x74\x75\x72\x65","\x72\x61\x6E\x64\x6F\x6D","\x6D\x6F\x76\x65\x43\x69\x72\x63\x6C\x65","\x67\x65\x74\x52\x61\x64\x69\x75\x73","\x63\x69\x72\x63\x6C\x65","\x66\x69\x6E\x64\x50\x61\x72\x61\x6C\x6C\x65\x6C\x73","\x67\x65\x74\x45\x64\x67\x65\x49\x64","\x72\x6F\x75\x74\x65","\x6C\x61\x79\x6F\x75\x74\x73","\x6D\x61\x73\x74\x65\x72","\x70\x6C\x61\x63\x65\x4C\x61\x62\x65\x6C\x73","\x61\x76\x6F\x69\x64","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x73","\x74\x65\x6D\x70","\x6D\x61\x78\x52\x61\x6E\x6B","\x6D\x69\x6E\x52\x61\x6E\x6B","\x6E\x65\x78\x74\x4C\x61\x79\x65\x72\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x43\x65\x6C\x6C\x73","\x70\x72\x65\x76\x69\x6F\x75\x73\x4C\x61\x79\x65\x72\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x43\x65\x6C\x6C\x73","\x67\x65\x74\x4E\x65\x78\x74\x4C\x61\x79\x65\x72\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x43\x65\x6C\x6C\x73","\x67\x65\x74\x50\x72\x65\x76\x69\x6F\x75\x73\x4C\x61\x79\x65\x72\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x43\x65\x6C\x6C\x73","\x67\x65\x74\x47\x65\x6E\x65\x72\x61\x6C\x50\x75\x72\x70\x6F\x73\x65\x56\x61\x72\x69\x61\x62\x6C\x65","\x73\x65\x74\x47\x65\x6E\x65\x72\x61\x6C\x50\x75\x72\x70\x6F\x73\x65\x56\x61\x72\x69\x61\x62\x6C\x65","\x73\x65\x74\x58","\x73\x65\x74\x59","\x63\x6F\x6E\x6E\x65\x63\x74\x73\x41\x73\x54\x61\x72\x67\x65\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x73\x41\x73\x53\x6F\x75\x72\x63\x65","\x68\x61\x73\x68\x43\x6F\x64\x65","\x67\x65\x74\x52\x61\x6E\x6B\x56\x61\x6C\x75\x65","\x67\x65\x74\x43\x6F\x72\x65\x43\x65\x6C\x6C","\x65\x64\x67\x65\x73","\x69\x73\x52\x65\x76\x65\x72\x73\x65\x64","\x74\x69\x67\x68\x74\x65\x6E\x54\x6F\x53\x6F\x75\x72\x63\x65","\x72\x6F\x6F\x74\x73","\x76\x65\x72\x74\x65\x78\x4D\x61\x70\x70\x65\x72","\x65\x64\x67\x65\x4D\x61\x70\x70\x65\x72","\x53\x4F\x55\x52\x43\x45\x53\x43\x41\x4E\x53\x54\x41\x52\x54\x52\x41\x4E\x4B","\x63\x72\x65\x61\x74\x65\x49\x6E\x74\x65\x72\x6E\x61\x6C\x43\x65\x6C\x6C\x73","\x72\x61\x6E\x6B\x73","\x64\x66\x73\x43\x6F\x75\x6E\x74","\x69\x6E\x69\x74\x69\x61\x6C\x52\x61\x6E\x6B","\x73\x6C\x69\x63\x65","\x66\x69\x78\x52\x61\x6E\x6B\x73","\x65\x78\x74\x65\x6E\x64\x65\x64\x44\x66\x73","\x6E\x65\x73\x74\x65\x64\x42\x65\x73\x74\x52\x61\x6E\x6B\x73","\x63\x75\x72\x72\x65\x6E\x74\x42\x65\x73\x74\x43\x72\x6F\x73\x73\x69\x6E\x67\x73","\x69\x74\x65\x72\x61\x74\x69\x6F\x6E\x73\x57\x69\x74\x68\x6F\x75\x74\x49\x6D\x70\x72\x6F\x76\x65\x6D\x65\x6E\x74","\x6D\x61\x78\x4E\x6F\x49\x6D\x70\x72\x6F\x76\x65\x6D\x65\x6E\x74\x49\x74\x65\x72\x61\x74\x69\x6F\x6E\x73","\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x43\x72\x6F\x73\x73\x69\x6E\x67\x73","\x77\x65\x69\x67\x68\x74\x65\x64\x4D\x65\x64\x69\x61\x6E","\x74\x72\x61\x6E\x73\x70\x6F\x73\x65","\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x52\x61\x6E\x6B\x43\x72\x6F\x73\x73\x69\x6E\x67","\x6D\x65\x64\x69\x61\x6E\x52\x61\x6E\x6B","\x6D\x65\x64\x69\x61\x6E\x56\x61\x6C\x75\x65","\x6C\x65\x6E\x74\x68","\x67\x65\x74\x49\x6E\x63\x6F\x6D\x69\x6E\x67\x45\x64\x67\x65\x73","\x69\x6E\x74\x72\x61\x43\x65\x6C\x6C\x53\x70\x61\x63\x69\x6E\x67","\x69\x6E\x74\x65\x72\x52\x61\x6E\x6B\x43\x65\x6C\x6C\x53\x70\x61\x63\x69\x6E\x67","\x6F\x72\x69\x65\x6E\x74\x61\x74\x69\x6F\x6E","\x69\x6E\x69\x74\x69\x61\x6C\x58","\x70\x61\x72\x61\x6C\x6C\x65\x6C\x45\x64\x67\x65\x53\x70\x61\x63\x69\x6E\x67","\x6A\x65\x74\x74\x79\x50\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x6C\x69\x6D\x69\x74\x58","\x63\x75\x72\x72\x65\x6E\x74\x58\x44\x65\x6C\x74\x61","\x77\x69\x64\x65\x73\x74\x52\x61\x6E\x6B","\x72\x61\x6E\x6B\x54\x6F\x70\x59","\x72\x61\x6E\x6B\x42\x6F\x74\x74\x6F\x6D\x59","\x77\x69\x64\x65\x73\x74\x52\x61\x6E\x6B\x56\x61\x6C\x75\x65","\x72\x61\x6E\x6B\x57\x69\x64\x74\x68\x73","\x72\x61\x6E\x6B\x59","\x66\x69\x6E\x65\x54\x75\x6E\x69\x6E\x67","\x50\x4F\x4C\x59\x4C\x49\x4E\x45","\x6E\x65\x78\x74\x4C\x61\x79\x65\x72\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x43\x61\x63\x68\x65","\x70\x72\x65\x76\x69\x6F\x75\x73\x4C\x61\x79\x65\x72\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x43\x61\x63\x68\x65","\x70\x72\x69\x6E\x74\x53\x74\x61\x74\x75\x73","\x3D\x3D\x3D\x3D\x3D\x3D\x43\x6F\x6F\x72\x64\x20\x61\x73\x73\x69\x67\x6E\x6D\x65\x6E\x74\x20\x64\x65\x62\x75\x67\x3D\x3D\x3D\x3D\x3D\x3D\x3D","\x52\x61\x6E\x6B\x20","\x20\x3A\x20","\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D","\x69\x6E\x69\x74\x69\x61\x6C\x43\x6F\x6F\x72\x64\x73","\x6D\x69\x6E\x4E\x6F\x64\x65","\x6D\x65\x64\x69\x61\x6E\x50\x6F\x73","\x6D\x69\x6E\x50\x61\x74\x68","\x73\x65\x74\x43\x65\x6C\x6C\x4C\x6F\x63\x61\x74\x69\x6F\x6E\x73","\x6D\x65\x64\x69\x61\x6E\x58\x56\x61\x6C\x75\x65","\x72\x61\x6E\x6B\x4D\x65\x64\x69\x61\x6E\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x64\x57\x65\x69\x67\x68\x74\x65\x64\x56\x61\x6C\x75\x65","\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x57\x69\x64\x65\x73\x74\x52\x61\x6E\x6B","\x72\x61\x6E\x6B\x43\x6F\x6F\x72\x64\x69\x6E\x61\x74\x65\x73","\x65\x64\x67\x65\x2E\x65\x64\x67\x65\x73\x20\x69\x73\x20\x6E\x75\x6C\x6C","\x41\x74\x20\x6C\x65\x61\x73\x74\x20\x6F\x6E\x65\x20\x63\x65\x6C\x6C\x20\x68\x61\x73\x20\x6E\x6F\x20\x62\x6F\x75\x6E\x64\x73","\x72\x65\x70\x6F\x73\x69\x74\x69\x6F\x6E\x56\x61\x6C\x69\x64","\x4D\x41\x58\x5F\x56\x41\x4C\x55\x45","\x4F\x52\x54\x48\x4F\x47\x4F\x4E\x41\x4C","\x43\x55\x52\x56\x45","\x73\x65\x74\x45\x64\x67\x65\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x69\x73\x50\x6F\x72\x74","\x70\x72\x6F\x63\x65\x73\x73\x52\x65\x76\x65\x72\x73\x65\x64\x45\x64\x67\x65","\x64\x65\x74\x65\x72\x6D\x69\x6E\x69\x73\x74\x69\x63","\x6D\x6F\x76\x65\x50\x61\x72\x65\x6E\x74","\x70\x61\x72\x65\x6E\x74\x42\x6F\x72\x64\x65\x72","\x69\x6E\x74\x65\x72\x48\x69\x65\x72\x61\x72\x63\x68\x79\x53\x70\x61\x63\x69\x6E\x67","\x74\x72\x61\x76\x65\x72\x73\x65\x41\x6E\x63\x65\x73\x74\x6F\x72\x73","\x65\x64\x67\x65\x73\x43\x61\x63\x68\x65","\x72\x75\x6E","\x75\x70\x64\x61\x74\x65\x47\x72\x6F\x75\x70\x42\x6F\x75\x6E\x64\x73","\x66\x69\x6E\x64\x52\x6F\x6F\x74\x73","\x63\x6F\x6E\x63\x61\x74","\x69\x73\x56\x61\x6C\x69\x64\x41\x6E\x63\x65\x73\x74\x6F\x72","\x66\x69\x6C\x74\x65\x72\x44\x65\x73\x63\x65\x6E\x64\x61\x6E\x74\x73","\x63\x79\x63\x6C\x65\x53\x74\x61\x67\x65","\x6C\x61\x79\x65\x72\x69\x6E\x67\x53\x74\x61\x67\x65","\x63\x72\x6F\x73\x73\x69\x6E\x67\x53\x74\x61\x67\x65","\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x53\x74\x61\x67\x65","\x63\x75\x72\x72\x65\x6E\x74\x45\x64\x69\x74","\x73\x65\x74\x52\x6F\x6F\x74","\x6D\x61\x69\x6E\x74\x61\x69\x6E\x45\x64\x67\x65\x50\x61\x72\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x49\x64\x73","\x70\x6F\x73\x74\x66\x69\x78","\x6E\x65\x78\x74\x49\x64","\x75\x70\x64\x61\x74\x65\x4C\x65\x76\x65\x6C","\x65\x6E\x64\x69\x6E\x67\x55\x70\x64\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x52\x6F\x6F\x74","\x69\x73\x43\x72\x65\x61\x74\x65\x49\x64\x73","\x73\x65\x74\x43\x72\x65\x61\x74\x65\x49\x64\x73","\x69\x6E\x73\x65\x72\x74","\x66\x69\x6C\x74\x65\x72\x43\x65\x6C\x6C\x73","\x67\x65\x74\x44\x65\x73\x63\x65\x6E\x64\x61\x6E\x74\x73","\x72\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65\x64","\x63\x65\x6C\x6C\x41\x64\x64\x65\x64","\x69\x73\x52\x6F\x6F\x74","\x75\x70\x64\x61\x74\x65\x45\x64\x67\x65\x50\x61\x72\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65\x49\x64","\x73\x65\x74\x49\x64","\x69\x73\x4E\x75\x6D\x65\x72\x69\x63","\x75\x70\x64\x61\x74\x65\x45\x64\x67\x65\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x4E\x65\x61\x72\x65\x73\x74\x43\x6F\x6D\x6D\x6F\x6E\x41\x6E\x63\x65\x73\x74\x6F\x72","\x67\x65\x74\x4F\x72\x69\x67\x69\x6E","\x50\x41\x54\x48\x5F\x53\x45\x50\x41\x52\x41\x54\x4F\x52","\x67\x65\x74\x50\x61\x72\x65\x6E\x74\x50\x61\x74\x68","\x70\x61\x72\x65\x6E\x74\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x67\x65\x74\x43\x68\x69\x6C\x64\x72\x65\x6E","\x63\x68\x69\x6C\x64\x72\x65\x6E","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x65\x6C\x6C\x73","\x67\x65\x74\x43\x68\x69\x6C\x64\x45\x64\x67\x65\x73","\x73\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x73\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x73","\x74\x65\x72\x6D\x69\x6E\x61\x6C\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x69\x6E\x73\x65\x72\x74\x45\x64\x67\x65","\x72\x65\x6D\x6F\x76\x65\x45\x64\x67\x65","\x67\x65\x74\x44\x69\x72\x65\x63\x74\x65\x64\x45\x64\x67\x65\x43\x6F\x75\x6E\x74","\x67\x65\x74\x4F\x75\x74\x67\x6F\x69\x6E\x67\x45\x64\x67\x65\x73","\x67\x65\x74\x54\x6F\x70\x6D\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x73\x65\x74\x56\x61\x6C\x75\x65","\x76\x61\x6C\x75\x65\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x76\x61\x6C\x75\x65\x43\x68\x61\x6E\x67\x65\x64","\x67\x65\x6F\x6D\x65\x74\x72\x79\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x73\x74\x79\x6C\x65\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x69\x73\x43\x6F\x6C\x6C\x61\x70\x73\x65\x64","\x73\x65\x74\x43\x6F\x6C\x6C\x61\x70\x73\x65\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x64\x53\x74\x61\x74\x65\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x76\x69\x73\x69\x62\x6C\x65\x53\x74\x61\x74\x65\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x6D\x65\x72\x67\x65\x43\x68\x69\x6C\x64\x72\x65\x6E","\x6D\x65\x72\x67\x65\x43\x68\x69\x6C\x64\x72\x65\x6E\x49\x6D\x70\x6C","\x67\x65\x74\x50\x61\x72\x65\x6E\x74\x73","\x63\x6C\x6F\x6E\x65\x43\x65\x6C\x6C","\x63\x6C\x6F\x6E\x65\x43\x65\x6C\x6C\x49\x6D\x70\x6C","\x72\x65\x73\x74\x6F\x72\x65\x43\x6C\x6F\x6E\x65","\x63\x65\x6C\x6C\x43\x6C\x6F\x6E\x65\x64","\x70\x72\x65\x76\x69\x6F\x75\x73\x49\x6E\x64\x65\x78","\x69\x6E\x64\x65\x78","\x74\x65\x72\x6D\x69\x6E\x61\x6C","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x64","\x61\x74\x74\x72\x69\x62\x75\x74\x65","\x6F\x6E\x49\x6E\x69\x74","\x76\x65\x72\x74\x65\x78","\x65\x64\x67\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x6D\x78\x54\x72\x61\x6E\x73\x69\x65\x6E\x74","\x69\x64\x20\x76\x61\x6C\x75\x65\x20\x70\x61\x72\x65\x6E\x74\x20\x73\x6F\x75\x72\x63\x65\x20\x74\x61\x72\x67\x65\x74\x20\x63\x68\x69\x6C\x64\x72\x65\x6E\x20\x65\x64\x67\x65\x73","\x73\x65\x74\x56\x65\x72\x74\x65\x78","\x73\x65\x74\x45\x64\x67\x65","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x73\x65\x74\x50\x61\x72\x65\x6E\x74","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x45\x64\x67\x65\x49\x6E\x64\x65\x78","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x63\x6C\x6F\x6E\x65\x56\x61\x6C\x75\x65","\x54\x52\x41\x4E\x53\x4C\x41\x54\x45\x5F\x43\x4F\x4E\x54\x52\x4F\x4C\x5F\x50\x4F\x49\x4E\x54\x53","\x61\x6C\x74\x65\x72\x6E\x61\x74\x65\x42\x6F\x75\x6E\x64\x73","\x73\x6F\x75\x72\x63\x65\x50\x6F\x69\x6E\x74","\x74\x61\x72\x67\x65\x74\x50\x6F\x69\x6E\x74","\x73\x77\x61\x70","\x67\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x73\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x74\x61\x6E","\x70\x6F\x77","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x53\x54\x59\x4C\x45\x5F\x44\x49\x52\x45\x43\x54\x49\x4F\x4E","\x70\x61\x67\x65\x53\x63\x61\x6C\x65","\x70\x61\x67\x65\x46\x6F\x72\x6D\x61\x74","\x50\x72\x69\x6E\x74\x65\x72\x2D\x66\x72\x69\x65\x6E\x64\x6C\x79\x20\x76\x65\x72\x73\x69\x6F\x6E","\x70\x61\x67\x65\x53\x65\x6C\x65\x63\x74\x6F\x72","\x61\x75\x74\x6F\x4F\x72\x69\x67\x69\x6E","\x70\x72\x69\x6E\x74\x4F\x76\x65\x72\x6C\x61\x79\x73","\x77\x6E\x64","\x70\x61\x67\x65\x43\x6F\x75\x6E\x74","\x67\x65\x74\x57\x69\x6E\x64\x6F\x77","\x67\x65\x74\x44\x6F\x63\x74\x79\x70\x65","\x3C\x6D\x65\x74\x61\x20\x68\x74\x74\x70\x2D\x65\x71\x75\x69\x76\x3D\x22\x58\x2D\x55\x41\x2D\x43\x6F\x6D\x70\x61\x74\x69\x62\x6C\x65\x22\x20\x63\x6F\x6E\x74\x65\x6E\x74\x3D\x22\x49\x45\x3D\x38\x22\x3E","\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65\x4F\x76\x65\x72\x6C\x61\x79","\x67\x65\x74\x44\x72\x61\x77\x50\x61\x6E\x65","\x77\x72\x69\x74\x65\x48\x65\x61\x64","\x3C\x62\x6F\x64\x79\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x78\x50\x61\x67\x65\x22\x3E","\x63\x72\x65\x61\x74\x65\x50\x61\x67\x65\x53\x65\x6C\x65\x63\x74\x6F\x72","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x41\x66\x74\x65\x72","\x61\x6C\x77\x61\x79\x73","\x6D\x78\x50\x61\x67\x65\x42\x72\x65\x61\x6B","\x67\x65\x74\x43\x6F\x76\x65\x72\x50\x61\x67\x65\x73","\x67\x65\x74\x41\x70\x70\x65\x6E\x64\x69\x63\x65\x73","\x61\x64\x64\x47\x72\x61\x70\x68\x46\x72\x61\x67\x6D\x65\x6E\x74","\x72\x65\x6E\x64\x65\x72\x50\x61\x67\x65","\x6D\x78\x50\x61\x67\x65\x2D","\x3C\x74\x69\x74\x6C\x65\x3E","\x3C\x2F\x74\x69\x74\x6C\x65\x3E","\x3C\x73\x74\x79\x6C\x65\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x3E","\x40\x6D\x65\x64\x69\x61\x20\x70\x72\x69\x6E\x74\x20\x7B","\x20\x20\x74\x61\x62\x6C\x65\x2E\x6D\x78\x50\x61\x67\x65\x53\x65\x6C\x65\x63\x74\x6F\x72\x20\x7B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x7D","\x20\x20\x68\x72\x2E\x6D\x78\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x20\x7B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x7D","\x40\x6D\x65\x64\x69\x61\x20\x73\x63\x72\x65\x65\x6E\x20\x7B","\x20\x20\x74\x61\x62\x6C\x65\x2E\x6D\x78\x50\x61\x67\x65\x53\x65\x6C\x65\x63\x74\x6F\x72\x20\x7B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x20\x41\x72\x69\x61\x6C\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x30\x70\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x73\x6F\x6C\x69\x64\x20\x31\x70\x78\x20\x64\x61\x72\x6B\x67\x72\x61\x79\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x77\x68\x69\x74\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6C\x61\x70\x73\x65\x3A\x63\x6F\x6C\x6C\x61\x70\x73\x65\x3B\x20\x7D","\x20\x20\x74\x61\x62\x6C\x65\x2E\x6D\x78\x50\x61\x67\x65\x53\x65\x6C\x65\x63\x74\x6F\x72\x20\x74\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x73\x6F\x6C\x69\x64\x20\x31\x70\x78\x20\x67\x72\x61\x79\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x34\x70\x78\x3B\x20\x7D","\x20\x20\x62\x6F\x64\x79\x2E\x6D\x78\x50\x61\x67\x65\x20\x7B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x67\x72\x61\x79\x3B\x20\x7D","\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x6D\x78\x50\x61\x67\x65\x53\x65\x6C\x65\x63\x74\x6F\x72","\x61","\x23\x6D\x78\x50\x61\x67\x65\x2D","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x49\x6E\x73\x69\x64\x65","\x67\x65\x74\x43\x61\x6E\x76\x61\x73","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x6E\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x6E\x65","\x73\x74\x79\x6C\x65\x73","\x63\x72\x65\x61\x74\x65\x44\x65\x66\x61\x75\x6C\x74\x56\x65\x72\x74\x65\x78\x53\x74\x79\x6C\x65","\x70\x75\x74\x44\x65\x66\x61\x75\x6C\x74\x56\x65\x72\x74\x65\x78\x53\x74\x79\x6C\x65","\x63\x72\x65\x61\x74\x65\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x70\x75\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x53\x48\x41\x50\x45","\x53\x48\x41\x50\x45\x5F\x52\x45\x43\x54\x41\x4E\x47\x4C\x45","\x53\x54\x59\x4C\x45\x5F\x50\x45\x52\x49\x4D\x45\x54\x45\x52","\x52\x65\x63\x74\x61\x6E\x67\x6C\x65\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x53\x54\x59\x4C\x45\x5F\x56\x45\x52\x54\x49\x43\x41\x4C\x5F\x41\x4C\x49\x47\x4E","\x53\x54\x59\x4C\x45\x5F\x41\x4C\x49\x47\x4E","\x53\x54\x59\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x23\x43\x33\x44\x39\x46\x46","\x53\x54\x59\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x43\x4F\x4C\x4F\x52","\x23\x36\x34\x38\x32\x42\x39","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x43\x4F\x4C\x4F\x52","\x23\x37\x37\x34\x34\x30\x30","\x53\x48\x41\x50\x45\x5F\x43\x4F\x4E\x4E\x45\x43\x54\x4F\x52","\x23\x34\x34\x36\x32\x39\x39","\x64\x65\x66\x61\x75\x6C\x74\x56\x65\x72\x74\x65\x78","\x70\x75\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x64\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x56\x65\x72\x74\x65\x78\x53\x74\x79\x6C\x65","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x6F\x72\x69\x67\x69\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65\x4F\x66\x66\x73\x65\x74","\x69\x6E\x76\x61\x6C\x69\x64","\x69\x6E\x76\x61\x6C\x69\x64\x4F\x72\x64\x65\x72","\x6F\x72\x64\x65\x72\x43\x68\x61\x6E\x67\x65\x64","\x76\x69\x73\x69\x62\x6C\x65\x53\x6F\x75\x72\x63\x65\x53\x74\x61\x74\x65","\x76\x69\x73\x69\x62\x6C\x65\x54\x61\x72\x67\x65\x74\x53\x74\x61\x74\x65","\x74\x65\x72\x6D\x69\x6E\x61\x6C\x44\x69\x73\x74\x61\x6E\x63\x65","\x73\x65\x67\x6D\x65\x6E\x74\x73","\x67\x65\x74\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x42\x6F\x75\x6E\x64\x73","\x73\x65\x74\x41\x62\x73\x6F\x6C\x75\x74\x65\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x67\x65\x74\x56\x69\x73\x69\x62\x6C\x65\x54\x65\x72\x6D\x69\x6E\x61\x6C\x53\x74\x61\x74\x65","\x73\x65\x74\x56\x69\x73\x69\x62\x6C\x65\x54\x65\x72\x6D\x69\x6E\x61\x6C\x53\x74\x61\x74\x65","\x64\x6F\x6E\x65\x52\x65\x73\x6F\x75\x72\x63\x65","\x75\x70\x64\x61\x74\x69\x6E\x67\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x52\x65\x73\x6F\x75\x72\x63\x65","\x75\x70\x64\x61\x74\x69\x6E\x67\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x73\x69\x6E\x67\x6C\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x69\x73\x53\x69\x6E\x67\x6C\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x73\x65\x74\x53\x69\x6E\x67\x6C\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x69\x73\x53\x65\x6C\x65\x63\x74\x65\x64","\x63\x68\x61\x6E\x67\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x73\x65\x74\x43\x65\x6C\x6C","\x73\x65\x74\x43\x65\x6C\x6C\x73","\x67\x65\x74\x46\x69\x72\x73\x74\x53\x65\x6C\x65\x63\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C","\x69\x73\x43\x65\x6C\x6C\x53\x65\x6C\x65\x63\x74\x61\x62\x6C\x65","\x61\x64\x64\x43\x65\x6C\x6C","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x61\x64\x64\x65\x64","\x72\x65\x6D\x6F\x76\x65\x64","\x6D\x78\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x68\x61\x6E\x67\x65\x2E\x65\x78\x65\x63\x75\x74\x65","\x65\x6E\x74\x65\x72","\x6C\x65\x61\x76\x65","\x65\x64\x69\x74\x69\x6E\x67\x43\x65\x6C\x6C","\x74\x72\x69\x67\x67\x65\x72","\x6D\x6F\x64\x69\x66\x69\x65\x64","\x61\x75\x74\x6F\x53\x69\x7A\x65","\x65\x6D\x70\x74\x79\x4C\x61\x62\x65\x6C\x54\x65\x78\x74","\x74\x65\x78\x74\x4E\x6F\x64\x65","\x6D\x78\x43\x65\x6C\x6C\x45\x64\x69\x74\x6F\x72","\x63\x6F\x6C\x73","\x32\x30","\x34","\x62\x6C\x75\x72","\x66\x6F\x63\x75\x73\x4C\x6F\x73\x74","\x6B\x65\x79\x64\x6F\x77\x6E","\x6B\x65\x79\x43\x6F\x64\x65","\x69\x73\x45\x6E\x74\x65\x72\x53\x74\x6F\x70\x73\x43\x65\x6C\x6C\x45\x64\x69\x74\x69\x6E\x67","\x73\x74\x6F\x70\x45\x64\x69\x74\x69\x6E\x67","\x63\x6C\x65\x61\x72\x4F\x6E\x43\x68\x61\x6E\x67\x65","\x73\x65\x74\x4D\x6F\x64\x69\x66\x69\x65\x64","\x6B\x65\x79\x70\x72\x65\x73\x73","\x69\x73\x4C\x61\x62\x65\x6C\x43\x6C\x69\x70\x70\x65\x64","\x69\x73\x57\x72\x61\x70\x70\x69\x6E\x67","\x41\x4C\x49\x47\x4E\x5F\x4C\x45\x46\x54","\x69\x73\x4D\x6F\x64\x69\x66\x69\x65\x64","\x69\x73\x49\x6E\x76\x6F\x6B\x65\x73\x53\x74\x6F\x70\x43\x65\x6C\x6C\x45\x64\x69\x74\x69\x6E\x67","\x69\x73\x48\x69\x64\x65\x4C\x61\x62\x65\x6C","\x6F\x75\x74\x6C\x69\x6E\x65","\x67\x65\x74\x45\x64\x69\x74\x6F\x72\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x49\x6E\x69\x74\x69\x61\x6C\x56\x61\x6C\x75\x65","\x67\x65\x74\x45\x6D\x70\x74\x79\x4C\x61\x62\x65\x6C\x54\x65\x78\x74","\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x44\x69\x76","\x67\x65\x74\x43\x75\x72\x72\x65\x6E\x74\x56\x61\x6C\x75\x65","\x67\x65\x74\x45\x64\x69\x74\x69\x6E\x67\x56\x61\x6C\x75\x65","\x53\x54\x59\x4C\x45\x5F\x53\x50\x41\x43\x49\x4E\x47","\x53\x54\x59\x4C\x45\x5F\x53\x50\x41\x43\x49\x4E\x47\x5F\x54\x4F\x50","\x53\x54\x59\x4C\x45\x5F\x53\x50\x41\x43\x49\x4E\x47\x5F\x52\x49\x47\x48\x54","\x53\x54\x59\x4C\x45\x5F\x53\x50\x41\x43\x49\x4E\x47\x5F\x42\x4F\x54\x54\x4F\x4D","\x53\x54\x59\x4C\x45\x5F\x53\x50\x41\x43\x49\x4E\x47\x5F\x4C\x45\x46\x54","\x67\x65\x74\x45\x64\x69\x74\x69\x6E\x67\x43\x65\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65\x53\x68\x61\x70\x65","\x64\x65\x66\x61\x75\x6C\x74\x56\x65\x72\x74\x65\x78\x53\x68\x61\x70\x65","\x64\x65\x66\x61\x75\x6C\x74\x54\x65\x78\x74\x53\x68\x61\x70\x65","\x6C\x65\x67\x61\x63\x79\x43\x6F\x6E\x74\x72\x6F\x6C\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x65\x66\x61\x75\x6C\x74\x53\x68\x61\x70\x65\x73","\x72\x65\x67\x69\x73\x74\x65\x72\x53\x68\x61\x70\x65","\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65","\x63\x72\x65\x61\x74\x65\x53\x68\x61\x70\x65","\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65\x53\x68\x61\x70\x65","\x6F\x72\x64\x65\x72\x65\x64","\x6B\x65\x65\x70\x45\x64\x67\x65\x73\x49\x6E\x46\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64","\x66\x69\x72\x73\x74\x45\x64\x67\x65","\x69\x6E\x73\x65\x72\x74\x53\x74\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79\x73","\x69\x6E\x73\x74\x61\x6C\x6C\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x67\x65\x74\x50\x72\x65\x76\x69\x6F\x75\x73\x53\x74\x61\x74\x65\x49\x6E\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x66\x69\x6E\x64\x50\x72\x65\x76\x69\x6F\x75\x73\x53\x74\x61\x74\x65\x49\x6E\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6F\x72\x64\x65\x72","\x6F\x72\x64\x65\x72\x45\x64\x67\x65","\x6B\x65\x65\x70\x45\x64\x67\x65\x73\x49\x6E\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x67\x65\x74\x53\x68\x61\x70\x65\x43\x6F\x6E\x73\x74\x72\x75\x63\x74\x6F\x72","\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x53\x68\x61\x70\x65","\x67\x65\x74\x53\x68\x61\x70\x65","\x67\x65\x74\x49\x6E\x64\x69\x63\x61\x74\x6F\x72\x53\x68\x61\x70\x65","\x67\x65\x74\x49\x6E\x64\x69\x63\x61\x74\x6F\x72\x43\x6F\x6C\x6F\x72","\x67\x65\x74\x49\x6E\x64\x69\x63\x61\x74\x6F\x72\x47\x72\x61\x64\x69\x65\x6E\x74\x43\x6F\x6C\x6F\x72","\x53\x54\x59\x4C\x45\x5F\x49\x4E\x44\x49\x43\x41\x54\x4F\x52\x5F\x44\x49\x52\x45\x43\x54\x49\x4F\x4E","\x67\x65\x74\x49\x6E\x64\x69\x63\x61\x74\x6F\x72\x49\x6D\x61\x67\x65","\x70\x6F\x73\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x65\x53\x68\x61\x70\x65","\x72\x65\x73\x6F\x6C\x76\x65\x43\x6F\x6C\x6F\x72","\x67\x65\x74\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x49\x6E\x64\x69\x63\x61\x74\x6F\x72\x43\x6F\x6C\x6F\x72\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x69\x6E\x64\x69\x63\x61\x74\x65\x64","\x67\x65\x74\x4C\x61\x62\x65\x6C\x56\x61\x6C\x75\x65","\x67\x65\x74\x4C\x61\x62\x65\x6C","\x63\x72\x65\x61\x74\x65\x4C\x61\x62\x65\x6C","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x53\x49\x5A\x45","\x69\x73\x48\x74\x6D\x6C\x4C\x61\x62\x65\x6C","\x67\x65\x74\x56\x65\x72\x74\x69\x63\x61\x6C\x41\x6C\x69\x67\x6E","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x46\x41\x4D\x49\x4C\x59","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x53\x54\x59\x4C\x45","\x53\x54\x59\x4C\x45\x5F\x48\x4F\x52\x49\x5A\x4F\x4E\x54\x41\x4C","\x53\x54\x59\x4C\x45\x5F\x4C\x41\x42\x45\x4C\x5F\x42\x41\x43\x4B\x47\x52\x4F\x55\x4E\x44\x43\x4F\x4C\x4F\x52","\x53\x54\x59\x4C\x45\x5F\x4C\x41\x42\x45\x4C\x5F\x42\x4F\x52\x44\x45\x52\x43\x4F\x4C\x4F\x52","\x53\x54\x59\x4C\x45\x5F\x4F\x56\x45\x52\x46\x4C\x4F\x57","\x53\x54\x59\x4C\x45\x5F\x4C\x41\x42\x45\x4C\x5F\x50\x41\x44\x44\x49\x4E\x47","\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65\x4C\x61\x62\x65\x6C","\x63\x6F\x6E\x76\x65\x72\x74\x50\x6F\x69\x6E\x74","\x69\x73\x4C\x61\x62\x65\x6C\x45\x76\x65\x6E\x74","\x49\x4D\x47","\x4E\x4F\x5F\x46\x4F","\x67\x65\x74\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79\x73","\x6F\x76\x65\x72\x6C\x61\x79","\x69\x6E\x73\x74\x61\x6C\x6C\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x69\x73\x45\x64\x69\x74\x69\x6E\x67","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x74\x72\x6F\x6C","\x67\x65\x74\x46\x6F\x6C\x64\x69\x6E\x67\x49\x6D\x61\x67\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x63\x6F\x6E\x74\x72\x6F\x6C","\x69\x6E\x69\x74\x43\x6F\x6E\x74\x72\x6F\x6C","\x44\x49\x41\x4C\x45\x43\x54\x5F\x50\x52\x45\x46\x45\x52\x48\x54\x4D\x4C","\x69\x6E\x6E\x65\x72\x4E\x6F\x64\x65","\x69\x73\x53\x68\x61\x70\x65\x45\x76\x65\x6E\x74","\x67\x65\x73\x74\x75\x72\x65\x73\x74\x61\x72\x74","\x6C\x61\x73\x74\x54\x6F\x75\x63\x68\x54\x69\x6D\x65","\x67\x65\x73\x74\x75\x72\x65\x65\x6E\x64","\x67\x65\x73\x74\x75\x72\x65\x45\x6E\x61\x62\x6C\x65\x64","\x68\x61\x6E\x64\x6C\x65\x47\x65\x73\x74\x75\x72\x65","\x72\x65\x64\x72\x61\x77\x4C\x61\x62\x65\x6C","\x67\x65\x74\x4C\x61\x62\x65\x6C\x42\x6F\x75\x6E\x64\x73","\x69\x73\x43\x6C\x69\x70\x70\x69\x6E\x67","\x67\x65\x74\x54\x65\x78\x74\x53\x63\x61\x6C\x65","\x72\x6F\x74\x61\x74\x65\x4C\x61\x62\x65\x6C\x42\x6F\x75\x6E\x64\x73","\x72\x65\x64\x72\x61\x77\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79\x73","\x72\x65\x64\x72\x61\x77\x43\x6F\x6E\x74\x72\x6F\x6C","\x67\x65\x74\x43\x6F\x6E\x74\x72\x6F\x6C\x42\x6F\x75\x6E\x64\x73","\x65\x71\x75\x61\x6C\x45\x6E\x74\x72\x69\x65\x73","\x65\x71\x75\x61\x6C\x50\x6F\x69\x6E\x74\x73","\x67\x65\x74\x50\x6F\x72\x74\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x67\x65\x74\x52\x6F\x75\x74\x69\x6E\x67\x43\x65\x6E\x74\x65\x72\x59","\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x43\x6F\x6E\x74\x72\x6F\x6C\x50\x6F\x69\x6E\x74","\x67\x65\x74\x52\x6F\x75\x74\x69\x6E\x67\x43\x65\x6E\x74\x65\x72\x58","\x53\x54\x59\x4C\x45\x5F\x45\x4C\x42\x4F\x57","\x45\x4C\x42\x4F\x57\x5F\x56\x45\x52\x54\x49\x43\x41\x4C","\x6F\x72\x74\x68\x42\x75\x66\x66\x65\x72","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4D\x41\x53\x4B\x5F\x41\x4C\x4C","\x6C\x69\x6D\x69\x74\x73","\x76\x65\x72\x74\x65\x78\x53\x65\x70\x65\x72\x61\x74\x69\x6F\x6E\x73","\x72\x65\x76\x65\x72\x73\x65\x50\x6F\x72\x74\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x72\x6F\x75\x74\x65\x50\x61\x74\x74\x65\x72\x6E\x73","\x77\x61\x79\x50\x6F\x69\x6E\x74\x73\x31","\x64\x69\x72\x56\x65\x63\x74\x6F\x72\x73","\x54\x41\x52\x47\x45\x54\x5F\x4D\x41\x53\x4B","\x53\x4F\x55\x52\x43\x45\x5F\x4D\x41\x53\x4B","\x53\x49\x44\x45\x5F\x4D\x41\x53\x4B","\x43\x45\x4E\x54\x45\x52\x5F\x4D\x41\x53\x4B","\x76\x61\x6C\x75\x65\x73","\x70\x75\x74\x56\x61\x6C\x75\x65","\x67\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x45\x4D\x50\x54\x59\x5F\x50\x4F\x49\x4E\x54","\x75\x70\x64\x61\x74\x69\x6E\x67\x44\x6F\x63\x75\x6D\x65\x6E\x74\x52\x65\x73\x6F\x75\x72\x63\x65","\x75\x70\x64\x61\x74\x69\x6E\x67\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x61\x6C\x6C\x6F\x77\x45\x76\x61\x6C","\x63\x61\x70\x74\x75\x72\x65\x44\x6F\x63\x75\x6D\x65\x6E\x74\x47\x65\x73\x74\x75\x72\x65","\x6F\x70\x74\x69\x6D\x69\x7A\x65\x56\x6D\x6C\x52\x65\x66\x6C\x6F\x77\x73","\x72\x65\x6E\x64\x65\x72\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x53\x74\x79\x6C\x65","\x73\x65\x74\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x73\x65\x74\x43\x75\x72\x72\x65\x6E\x74\x52\x6F\x6F\x74","\x73\x69\x7A\x65\x44\x69\x64\x43\x68\x61\x6E\x67\x65","\x72\x65\x76\x61\x6C\x69\x64\x61\x74\x65","\x70\x72\x65\x76\x69\x6F\x75\x73\x53\x63\x61\x6C\x65","\x70\x72\x65\x76\x69\x6F\x75\x73\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x73\x65\x74\x53\x63\x61\x6C\x65","\x69\x6E\x76\x61\x6C\x69\x64\x61\x74\x65","\x76\x61\x6C\x69\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x53\x74\x61\x74\x65","\x6D\x78\x47\x72\x61\x70\x68\x56\x69\x65\x77\x2E\x76\x61\x6C\x69\x64\x61\x74\x65","\x76\x61\x6C\x69\x64\x61\x74\x65\x42\x6F\x75\x6E\x64\x73","\x76\x61\x6C\x69\x64\x61\x74\x65\x50\x6F\x69\x6E\x74\x73","\x76\x61\x6C\x69\x64\x61\x74\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x63\x72\x65\x61\x74\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x53\x68\x61\x70\x65","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x72\x65\x64\x72\x61\x77\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x70\x61\x67\x65\x56\x69\x73\x69\x62\x6C\x65","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x42\x6F\x75\x6E\x64\x73","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x53\x68\x61\x70\x65","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x69\x73\x48\x69\x64\x65\x4F\x6E\x48\x6F\x76\x65\x72","\x53\x54\x59\x4C\x45\x5F\x52\x4F\x54\x41\x54\x49\x4F\x4E","\x75\x70\x64\x61\x74\x65\x56\x65\x72\x74\x65\x78\x4C\x61\x62\x65\x6C\x4F\x66\x66\x73\x65\x74","\x67\x65\x74\x43\x68\x69\x6C\x64\x4F\x66\x66\x73\x65\x74\x46\x6F\x72\x43\x65\x6C\x6C","\x75\x70\x64\x61\x74\x65\x46\x69\x78\x65\x64\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74\x73","\x75\x70\x64\x61\x74\x65\x50\x6F\x69\x6E\x74\x73","\x75\x70\x64\x61\x74\x65\x46\x6C\x6F\x61\x74\x69\x6E\x67\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74\x73","\x75\x70\x64\x61\x74\x65\x45\x64\x67\x65\x42\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x45\x64\x67\x65\x4C\x61\x62\x65\x6C\x4F\x66\x66\x73\x65\x74","\x63\x68\x69\x6C\x64\x4D\x6F\x76\x65\x64","\x69\x73\x52\x65\x6E\x64\x65\x72\x69\x6E\x67","\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x75\x70\x64\x61\x74\x65\x46\x69\x78\x65\x64\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x50\x6F\x69\x6E\x74","\x67\x65\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x67\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x72\x74","\x64\x65\x66\x61\x75\x6C\x74\x4C\x6F\x6F\x70\x53\x74\x79\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x45\x44\x47\x45","\x69\x73\x41\x6C\x6C\x6F\x77\x45\x76\x61\x6C","\x75\x70\x64\x61\x74\x65\x46\x6C\x6F\x61\x74\x69\x6E\x67\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x67\x65\x74\x4E\x65\x78\x74\x50\x6F\x69\x6E\x74","\x69\x73\x4F\x72\x74\x68\x6F\x67\x6F\x6E\x61\x6C","\x53\x54\x59\x4C\x45\x5F\x50\x45\x52\x49\x4D\x45\x54\x45\x52\x5F\x53\x50\x41\x43\x49\x4E\x47","\x53\x54\x59\x4C\x45\x5F\x53\x4F\x55\x52\x43\x45\x5F\x50\x45\x52\x49\x4D\x45\x54\x45\x52\x5F\x53\x50\x41\x43\x49\x4E\x47","\x53\x54\x59\x4C\x45\x5F\x54\x41\x52\x47\x45\x54\x5F\x50\x45\x52\x49\x4D\x45\x54\x45\x52\x5F\x53\x50\x41\x43\x49\x4E\x47","\x67\x65\x74\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x50\x6F\x69\x6E\x74","\x53\x54\x59\x4C\x45\x5F\x53\x4F\x55\x52\x43\x45\x5F\x50\x4F\x52\x54","\x53\x54\x59\x4C\x45\x5F\x54\x41\x52\x47\x45\x54\x5F\x50\x4F\x52\x54","\x67\x65\x74\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x53\x54\x59\x4C\x45\x5F\x52\x4F\x55\x54\x49\x4E\x47\x5F\x43\x45\x4E\x54\x45\x52\x5F\x58","\x53\x54\x59\x4C\x45\x5F\x52\x4F\x55\x54\x49\x4E\x47\x5F\x43\x45\x4E\x54\x45\x52\x5F\x59","\x67\x65\x74\x52\x65\x6C\x61\x74\x69\x76\x65\x50\x6F\x69\x6E\x74","\x72\x65\x6C\x61\x74\x69\x76\x65\x43\x63\x77","\x73\x65\x74\x52\x65\x6E\x64\x65\x72\x69\x6E\x67","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x45\x76\x61\x6C","\x67\x65\x74\x53\x74\x61\x74\x65\x73","\x67\x65\x74\x43\x65\x6C\x6C\x53\x74\x61\x74\x65\x73","\x69\x73\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x45\x76\x65\x6E\x74","\x69\x73\x53\x63\x72\x6F\x6C\x6C\x45\x76\x65\x6E\x74","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x6D\x6F\x76\x65\x48\x61\x6E\x64\x6C\x65\x72","\x65\x6E\x64\x48\x61\x6E\x64\x6C\x65\x72","\x63\x72\x65\x61\x74\x65\x48\x74\x6D\x6C\x50\x61\x6E\x65","\x75\x70\x64\x61\x74\x65\x48\x74\x6D\x6C\x43\x61\x6E\x76\x61\x73\x53\x69\x7A\x65","\x63\x72\x65\x61\x74\x65\x56\x6D\x6C\x50\x61\x6E\x65","\x63\x6F\x6F\x72\x64\x6F\x72\x69\x67\x69\x6E","\x30\x2C\x30","\x73\x74\x61\x74\x69\x63","\x69\x73\x55\x70","\x67\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65\x46\x6F\x72\x52\x6F\x6F\x74","\x55\x50","\x44\x4F\x57\x4E","\x6D\x6F\x75\x73\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x72\x65\x6E\x64\x65\x72\x48\x69\x6E\x74","\x52\x45\x4E\x44\x45\x52\x49\x4E\x47\x5F\x48\x49\x4E\x54\x5F\x45\x58\x41\x43\x54","\x52\x45\x4E\x44\x45\x52\x49\x4E\x47\x5F\x48\x49\x4E\x54\x5F\x46\x41\x53\x54\x45\x53\x54","\x52\x45\x4E\x44\x45\x52\x49\x4E\x47\x5F\x48\x49\x4E\x54\x5F\x46\x41\x53\x54\x45\x52","\x44\x49\x41\x4C\x45\x43\x54\x5F\x4D\x49\x58\x45\x44\x48\x54\x4D\x4C","\x6D\x75\x6C\x74\x69\x70\x6C\x69\x63\x69\x74\x69\x65\x73","\x69\x6D\x61\x67\x65\x42\x75\x6E\x64\x6C\x65\x73","\x63\x72\x65\x61\x74\x65\x43\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72","\x63\x72\x65\x61\x74\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x63\x72\x65\x61\x74\x65\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x73\x65\x74\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x63\x72\x65\x61\x74\x65\x47\x72\x61\x70\x68\x56\x69\x65\x77","\x67\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x43\x68\x61\x6E\x67\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72\x73","\x2F\x72\x65\x73\x6F\x75\x72\x63\x65\x73\x2F\x67\x72\x61\x70\x68","\x45\x4D\x50\x54\x59\x5F\x41\x52\x52\x41\x59","\x63\x65\x6C\x6C\x45\x64\x69\x74\x6F\x72","\x70\x6F\x72\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x64\x6F\x75\x62\x6C\x65\x54\x61\x70\x45\x6E\x61\x62\x6C\x65\x64","\x64\x6F\x75\x62\x6C\x65\x54\x61\x70\x54\x69\x6D\x65\x6F\x75\x74","\x64\x6F\x75\x62\x6C\x65\x54\x61\x70\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x6C\x61\x73\x74\x54\x6F\x75\x63\x68\x59","\x74\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x64\x65\x66\x61\x75\x6C\x74\x4F\x76\x65\x72\x6C\x61\x70","\x64\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x61\x6C\x74\x65\x72\x6E\x61\x74\x65\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x73\x56\x69\x73\x69\x62\x6C\x65","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x43\x6F\x6C\x6F\x72","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x44\x61\x73\x68\x65\x64","\x6D\x69\x6E\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x44\x69\x73\x74","\x70\x72\x65\x66\x65\x72\x50\x61\x67\x65\x53\x69\x7A\x65","\x65\x73\x63\x61\x70\x65\x45\x6E\x61\x62\x6C\x65\x64","\x69\x6E\x76\x6F\x6B\x65\x73\x53\x74\x6F\x70\x43\x65\x6C\x6C\x45\x64\x69\x74\x69\x6E\x67","\x65\x6E\x74\x65\x72\x53\x74\x6F\x70\x73\x43\x65\x6C\x6C\x45\x64\x69\x74\x69\x6E\x67","\x75\x73\x65\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73\x46\x6F\x72\x50\x61\x6E\x6E\x69\x6E\x67","\x65\x78\x70\x6F\x72\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x6D\x70\x6F\x72\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x65\x6C\x6C\x73\x4C\x6F\x63\x6B\x65\x64","\x63\x65\x6C\x6C\x73\x43\x6C\x6F\x6E\x65\x61\x62\x6C\x65","\x63\x65\x6C\x6C\x73\x45\x64\x69\x74\x61\x62\x6C\x65","\x63\x65\x6C\x6C\x73\x44\x65\x6C\x65\x74\x61\x62\x6C\x65","\x63\x65\x6C\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x65\x64\x67\x65\x4C\x61\x62\x65\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x76\x65\x72\x74\x65\x78\x4C\x61\x62\x65\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x64\x72\x6F\x70\x45\x6E\x61\x62\x6C\x65\x64","\x73\x70\x6C\x69\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x65\x6C\x6C\x73\x52\x65\x73\x69\x7A\x61\x62\x6C\x65","\x63\x65\x6C\x6C\x73\x42\x65\x6E\x64\x61\x62\x6C\x65","\x63\x65\x6C\x6C\x73\x53\x65\x6C\x65\x63\x74\x61\x62\x6C\x65","\x63\x65\x6C\x6C\x73\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x61\x75\x74\x6F\x53\x69\x7A\x65\x43\x65\x6C\x6C\x73","\x74\x69\x6D\x65\x72\x41\x75\x74\x6F\x53\x63\x72\x6F\x6C\x6C","\x61\x6C\x6C\x6F\x77\x41\x75\x74\x6F\x50\x61\x6E\x6E\x69\x6E\x67","\x69\x67\x6E\x6F\x72\x65\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x6D\x61\x78\x69\x6D\x75\x6D\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x6D\x69\x6E\x69\x6D\x75\x6D\x47\x72\x61\x70\x68\x53\x69\x7A\x65","\x6D\x69\x6E\x69\x6D\x75\x6D\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x53\x69\x7A\x65","\x6D\x61\x78\x69\x6D\x75\x6D\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x53\x69\x7A\x65","\x72\x65\x73\x69\x7A\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x61\x6C\x6C\x6F\x77\x4E\x65\x67\x61\x74\x69\x76\x65\x43\x6F\x6F\x72\x64\x69\x6E\x61\x74\x65\x73","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64\x72\x65\x6E","\x65\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74\x73","\x65\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74\x73\x4F\x6E\x41\x64\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x54\x6F\x50\x72\x65\x66\x65\x72\x72\x65\x64\x53\x69\x7A\x65","\x7A\x6F\x6F\x6D\x46\x61\x63\x74\x6F\x72","\x6B\x65\x65\x70\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x56\x69\x73\x69\x62\x6C\x65\x4F\x6E\x5A\x6F\x6F\x6D","\x63\x65\x6E\x74\x65\x72\x5A\x6F\x6F\x6D","\x72\x65\x73\x65\x74\x56\x69\x65\x77\x4F\x6E\x52\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65","\x72\x65\x73\x65\x74\x45\x64\x67\x65\x73\x4F\x6E\x52\x65\x73\x69\x7A\x65","\x72\x65\x73\x65\x74\x45\x64\x67\x65\x73\x4F\x6E\x4D\x6F\x76\x65","\x72\x65\x73\x65\x74\x45\x64\x67\x65\x73\x4F\x6E\x43\x6F\x6E\x6E\x65\x63\x74","\x61\x6C\x6C\x6F\x77\x4C\x6F\x6F\x70\x73","\x4C\x6F\x6F\x70","\x6D\x75\x6C\x74\x69\x67\x72\x61\x70\x68","\x63\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65\x45\x64\x67\x65\x73","\x61\x6C\x6C\x6F\x77\x44\x61\x6E\x67\x6C\x69\x6E\x67\x45\x64\x67\x65\x73","\x63\x6C\x6F\x6E\x65\x49\x6E\x76\x61\x6C\x69\x64\x45\x64\x67\x65\x73","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x4F\x6E\x4D\x6F\x76\x65","\x6C\x61\x62\x65\x6C\x73\x56\x69\x73\x69\x62\x6C\x65","\x68\x74\x6D\x6C\x4C\x61\x62\x65\x6C\x73","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6E\x61\x62\x6C\x65\x64","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x4E\x65\x73\x74\x69\x6E\x67","\x6D\x69\x6E\x46\x69\x74\x53\x63\x61\x6C\x65","\x6D\x61\x78\x46\x69\x74\x53\x63\x61\x6C\x65","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x64\x49\x6D\x61\x67\x65","\x2F\x63\x6F\x6C\x6C\x61\x70\x73\x65\x64\x2E\x67\x69\x66","\x65\x78\x70\x61\x6E\x64\x65\x64\x49\x6D\x61\x67\x65","\x2F\x65\x78\x70\x61\x6E\x64\x65\x64\x2E\x67\x69\x66","\x77\x61\x72\x6E\x69\x6E\x67\x49\x6D\x61\x67\x65","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x69\x6D\x61\x67\x65\x73\x2F\x77\x61\x72\x6E\x69\x6E\x67\x2E\x67\x69\x66","\x61\x6C\x72\x65\x61\x64\x79\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x52\x65\x73\x6F\x75\x72\x63\x65","\x61\x6C\x72\x65\x61\x64\x79\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x63\x6F\x6E\x74\x61\x69\x6E\x73\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72\x73\x52\x65\x73\x6F\x75\x72\x63\x65","\x63\x6F\x6E\x74\x61\x69\x6E\x73\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72\x73","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x45\x78\x70\x61\x6E\x64\x52\x65\x73\x6F\x75\x72\x63\x65","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x2D\x65\x78\x70\x61\x6E\x64","\x63\x72\x65\x61\x74\x65\x43\x65\x6C\x6C\x45\x64\x69\x74\x6F\x72","\x75\x6E\x6C\x6F\x61\x64","\x73\x65\x6C\x65\x63\x74\x73\x74\x61\x72\x74","\x3C\x76\x3A\x67\x72\x6F\x75\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x44\x49\x53\x50\x4C\x41\x59\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x2F\x76\x3A\x67\x72\x6F\x75\x70\x3E","\x70\x61\x6E\x6E\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x46\x6F\x72\x43\x68\x61\x6E\x67\x65\x73","\x70\x72\x6F\x63\x65\x73\x73\x43\x68\x61\x6E\x67\x65","\x67\x65\x74\x52\x65\x6D\x6F\x76\x65\x64\x43\x65\x6C\x6C\x73\x46\x6F\x72\x43\x68\x61\x6E\x67\x65\x73","\x72\x65\x6D\x6F\x76\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x63\x6C\x65\x61\x72\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65\x53\x74\x61\x74\x65\x46\x6F\x72\x43\x65\x6C\x6C","\x68\x6F\x6D\x65","\x61\x64\x64\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79\x73","\x63\x6C\x65\x61\x72\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79\x73","\x73\x65\x74\x43\x65\x6C\x6C\x57\x61\x72\x6E\x69\x6E\x67","\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x72\x65\x64\x3E","\x3C\x2F\x66\x6F\x6E\x74\x3E","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x73\x74\x61\x72\x74\x45\x64\x69\x74\x69\x6E\x67\x41\x74\x43\x65\x6C\x6C","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x69\x73\x43\x65\x6C\x6C\x45\x64\x69\x74\x61\x62\x6C\x65","\x63\x6F\x6E\x76\x65\x72\x74\x56\x61\x6C\x75\x65\x54\x6F\x53\x74\x72\x69\x6E\x67","\x69\x73\x41\x75\x74\x6F\x53\x69\x7A\x65\x43\x65\x6C\x6C","\x63\x65\x6C\x6C\x4C\x61\x62\x65\x6C\x43\x68\x61\x6E\x67\x65\x64","\x63\x65\x6C\x6C\x53\x69\x7A\x65\x55\x70\x64\x61\x74\x65\x64","\x68\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x46\x6F\x72\x45\x76\x65\x6E\x74","\x69\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x53\x77\x69\x6D\x6C\x61\x6E\x65\x41\x74","\x69\x73\x54\x6F\x67\x67\x6C\x65\x45\x76\x65\x6E\x74","\x70\x61\x6E\x6E\x69\x6E\x67\x4D\x61\x6E\x61\x67\x65\x72","\x63\x72\x65\x61\x74\x65\x50\x61\x6E\x6E\x69\x6E\x67\x4D\x61\x6E\x61\x67\x65\x72","\x67\x65\x74\x42\x6F\x72\x64\x65\x72\x53\x69\x7A\x65\x73","\x74\x68\x69\x6E","\x6D\x65\x64\x69\x75\x6D","\x74\x68\x69\x63\x6B","\x62\x6F\x72\x64\x65\x72\x4C\x65\x66\x74\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72\x54\x6F\x70\x57\x69\x64\x74\x68","\x70\x61\x64\x64\x69\x6E\x67\x54\x6F\x70","\x62\x6F\x72\x64\x65\x72\x52\x69\x67\x68\x74\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72\x42\x6F\x74\x74\x6F\x6D\x57\x69\x64\x74\x68","\x70\x61\x64\x64\x69\x6E\x67\x42\x6F\x74\x74\x6F\x6D","\x67\x65\x74\x50\x72\x65\x66\x65\x72\x72\x65\x64\x50\x61\x67\x65\x53\x69\x7A\x65","\x67\x65\x74\x42\x6F\x72\x64\x65\x72","\x64\x6F\x52\x65\x73\x69\x7A\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6D\x69\x6E\x57\x69\x64\x74\x68","\x6D\x69\x6E\x48\x65\x69\x67\x68\x74","\x75\x70\x64\x61\x74\x65\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x76\x65\x72\x74\x69\x63\x61\x6C\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x70\x6F\x73\x74\x50\x72\x6F\x63\x65\x73\x73\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x49\x4D\x41\x47\x45","\x67\x65\x74\x49\x6D\x61\x67\x65\x46\x72\x6F\x6D\x42\x75\x6E\x64\x6C\x65\x73","\x64\x61\x74\x61\x3A\x69\x6D\x61\x67\x65\x2F","\x3B\x62\x61\x73\x65\x36\x34\x2C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x46\x6C\x61\x67\x73","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x46\x6C\x61\x67\x73","\x61\x64\x64\x49\x6D\x61\x67\x65\x42\x75\x6E\x64\x6C\x65","\x72\x65\x6D\x6F\x76\x65\x49\x6D\x61\x67\x65\x42\x75\x6E\x64\x6C\x65","\x62\x61\x63\x6B","\x67\x65\x74\x43\x65\x6C\x6C\x73\x46\x6F\x72\x47\x72\x6F\x75\x70","\x63\x72\x65\x61\x74\x65\x47\x72\x6F\x75\x70\x43\x65\x6C\x6C","\x67\x65\x74\x42\x6F\x75\x6E\x64\x73\x46\x6F\x72\x47\x72\x6F\x75\x70","\x61\x64\x64\x41\x6C\x6C\x45\x64\x67\x65\x73","\x67\x65\x74\x45\x64\x67\x65\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72","\x69\x6E\x73\x65\x72\x74\x56\x65\x72\x74\x65\x78","\x63\x72\x65\x61\x74\x65\x56\x65\x72\x74\x65\x78","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65","\x61\x64\x64\x45\x64\x67\x65","\x69\x73\x41\x6C\x6C\x6F\x77\x4E\x65\x67\x61\x74\x69\x76\x65\x43\x6F\x6F\x72\x64\x69\x6E\x61\x74\x65\x73","\x69\x73\x45\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74\x73\x4F\x6E\x41\x64\x64","\x69\x73\x45\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74","\x65\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64","\x67\x65\x74\x44\x65\x6C\x65\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x69\x6E\x63\x6C\x75\x64\x65\x45\x64\x67\x65\x73","\x6E\x65\x77\x45\x64\x67\x65","\x67\x65\x74\x46\x6F\x6C\x64\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x72\x65\x63\x75\x72\x73\x65","\x69\x73\x43\x65\x6C\x6C\x46\x6F\x6C\x64\x61\x62\x6C\x65","\x73\x77\x61\x70\x42\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x41\x6C\x74\x65\x72\x6E\x61\x74\x65\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x50\x72\x65\x66\x65\x72\x72\x65\x64\x53\x69\x7A\x65\x46\x6F\x72\x43\x65\x6C\x6C","\x67\x65\x74\x41\x6C\x6C\x45\x64\x67\x65\x73","\x69\x67\x6E\x6F\x72\x65\x43\x68\x69\x6C\x64\x72\x65\x6E","\x53\x48\x41\x50\x45\x5F\x4C\x41\x42\x45\x4C","\x53\x54\x59\x4C\x45\x5F\x49\x4D\x41\x47\x45\x5F\x57\x49\x44\x54\x48","\x53\x54\x59\x4C\x45\x5F\x49\x4D\x41\x47\x45\x5F\x48\x45\x49\x47\x48\x54","\x67\x65\x74\x53\x69\x7A\x65\x46\x6F\x72\x53\x74\x72\x69\x6E\x67","\x72\x65\x73\x69\x7A\x65\x43\x65\x6C\x6C","\x69\x73\x43\x6C\x6F\x6E\x65\x49\x6E\x76\x61\x6C\x69\x64\x45\x64\x67\x65\x73","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x4E\x65\x67\x61\x74\x69\x76\x65\x43\x6F\x6F\x72\x64\x69\x6E\x61\x74\x65\x73","\x69\x73\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x4F\x6E\x4D\x6F\x76\x65","\x69\x73\x41\x6C\x6C\x6F\x77\x44\x61\x6E\x67\x6C\x69\x6E\x67\x45\x64\x67\x65\x73","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x47\x72\x61\x70\x68","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x43\x65\x6C\x6C","\x67\x65\x74\x43\x65\x6C\x6C\x43\x6F\x6E\x74\x61\x69\x6E\x6D\x65\x6E\x74\x41\x72\x65\x61","\x67\x65\x74\x43\x75\x72\x72\x65\x6E\x74\x52\x6F\x6F\x74","\x67\x65\x74\x4D\x61\x78\x69\x6D\x75\x6D\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x69\x73\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64","\x67\x65\x74\x4F\x76\x65\x72\x6C\x61\x70","\x67\x65\x74\x41\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x53\x54\x59\x4C\x45\x5F\x45\x58\x49\x54\x5F\x58","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x54\x52\x59\x5F\x58","\x53\x54\x59\x4C\x45\x5F\x45\x58\x49\x54\x5F\x59","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x54\x52\x59\x5F\x59","\x53\x54\x59\x4C\x45\x5F\x45\x58\x49\x54\x5F\x50\x45\x52\x49\x4D\x45\x54\x45\x52","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x54\x52\x59\x5F\x50\x45\x52\x49\x4D\x45\x54\x45\x52","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x70\x6F\x69\x6E\x74","\x53\x54\x59\x4C\x45\x5F\x46\x4C\x49\x50\x48","\x53\x54\x59\x4C\x45\x5F\x46\x4C\x49\x50\x56","\x69\x73\x50\x6F\x72\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x46\x6F\x72\x50\x6F\x72\x74","\x69\x73\x43\x65\x6C\x6C\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x67\x65\x74\x43\x65\x6C\x6C\x42\x6F\x75\x6E\x64\x73","\x73\x68\x69\x66\x74\x50\x72\x65\x76\x69\x65\x77\x31","\x73\x68\x69\x66\x74\x50\x72\x65\x76\x69\x65\x77\x32","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x7A\x6F\x6F\x6D\x41\x63\x74\x75\x61\x6C","\x7A\x6F\x6F\x6D\x54\x6F","\x73\x63\x72\x6F\x6C\x6C\x52\x65\x63\x74\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x7A\x6F\x6F\x6D\x54\x6F\x52\x65\x63\x74","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x4F\x52\x54\x48\x4F\x47\x4F\x4E\x41\x4C","\x53\x65\x67\x6D\x65\x6E\x74\x43\x6F\x6E\x6E\x65\x63\x74\x6F\x72","\x45\x6C\x62\x6F\x77\x43\x6F\x6E\x6E\x65\x63\x74\x6F\x72","\x53\x69\x64\x65\x54\x6F\x53\x69\x64\x65","\x54\x6F\x70\x54\x6F\x42\x6F\x74\x74\x6F\x6D","\x45\x6E\x74\x69\x74\x79\x52\x65\x6C\x61\x74\x69\x6F\x6E","\x4F\x72\x74\x68\x43\x6F\x6E\x6E\x65\x63\x74\x6F\x72","\x69\x73\x4C\x6F\x6F\x70","\x69\x73\x43\x6C\x6F\x6E\x65\x45\x76\x65\x6E\x74","\x49\x53\x5F\x4D\x41\x43","\x69\x73\x4D\x65\x74\x61\x44\x6F\x77\x6E","\x69\x73\x41\x6C\x74\x44\x6F\x77\x6E","\x69\x73\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x65\x64\x45\x76\x65\x6E\x74","\x69\x73\x46\x6F\x72\x63\x65\x4D\x61\x72\x71\x75\x65\x65\x45\x76\x65\x6E\x74","\x76\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x41\x6C\x65\x72\x74","\x69\x73\x45\x64\x67\x65\x56\x61\x6C\x69\x64","\x69\x73\x56\x61\x6C\x69\x64\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x63\x68\x65\x63\x6B","\x76\x61\x6C\x69\x64\x61\x74\x65\x45\x64\x67\x65","\x76\x61\x6C\x69\x64\x61\x74\x65\x47\x72\x61\x70\x68","\x67\x65\x74\x43\x65\x6C\x6C\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72","\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x65\x6C\x6C","\x61\x74\x74\x72","\x63\x6F\x75\x6E\x74\x45\x72\x72\x6F\x72","\x73\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x74\x6F\x53\x74\x72\x69\x6E\x67","\x69\x73\x48\x74\x6D\x6C\x4C\x61\x62\x65\x6C\x73","\x73\x65\x74\x48\x74\x6D\x6C\x4C\x61\x62\x65\x6C\x73","\x53\x54\x59\x4C\x45\x5F\x57\x48\x49\x54\x45\x5F\x53\x50\x41\x43\x45","\x67\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x46\x6F\x72\x4E\x6F\x64\x65","\x67\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x46\x6F\x72\x43\x65\x6C\x6C","\x67\x65\x74\x43\x75\x72\x73\x6F\x72\x46\x6F\x72\x43\x65\x6C\x6C","\x53\x54\x59\x4C\x45\x5F\x49\x4E\x44\x49\x43\x41\x54\x4F\x52\x5F\x43\x4F\x4C\x4F\x52","\x53\x54\x59\x4C\x45\x5F\x49\x4E\x44\x49\x43\x41\x54\x4F\x52\x5F\x47\x52\x41\x44\x49\x45\x4E\x54\x43\x4F\x4C\x4F\x52","\x53\x54\x59\x4C\x45\x5F\x49\x4E\x44\x49\x43\x41\x54\x4F\x52\x5F\x53\x48\x41\x50\x45","\x53\x54\x59\x4C\x45\x5F\x49\x4E\x44\x49\x43\x41\x54\x4F\x52\x5F\x49\x4D\x41\x47\x45","\x73\x65\x74\x42\x6F\x72\x64\x65\x72","\x53\x48\x41\x50\x45\x5F\x53\x57\x49\x4D\x4C\x41\x4E\x45","\x69\x73\x52\x65\x73\x69\x7A\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x65\x74\x52\x65\x73\x69\x7A\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x69\x73\x45\x73\x63\x61\x70\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x45\x73\x63\x61\x70\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x49\x6E\x76\x6F\x6B\x65\x73\x53\x74\x6F\x70\x43\x65\x6C\x6C\x45\x64\x69\x74\x69\x6E\x67","\x73\x65\x74\x45\x6E\x74\x65\x72\x53\x74\x6F\x70\x73\x43\x65\x6C\x6C\x45\x64\x69\x74\x69\x6E\x67","\x69\x73\x43\x65\x6C\x6C\x4C\x6F\x63\x6B\x65\x64","\x69\x73\x43\x65\x6C\x6C\x73\x4C\x6F\x63\x6B\x65\x64","\x73\x65\x74\x43\x65\x6C\x6C\x73\x4C\x6F\x63\x6B\x65\x64","\x67\x65\x74\x43\x6C\x6F\x6E\x65\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x69\x73\x43\x65\x6C\x6C\x43\x6C\x6F\x6E\x65\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x73\x43\x6C\x6F\x6E\x65\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x43\x4C\x4F\x4E\x45\x41\x42\x4C\x45","\x73\x65\x74\x43\x65\x6C\x6C\x73\x43\x6C\x6F\x6E\x65\x61\x62\x6C\x65","\x63\x61\x6E\x45\x78\x70\x6F\x72\x74\x43\x65\x6C\x6C","\x63\x61\x6E\x49\x6D\x70\x6F\x72\x74\x43\x65\x6C\x6C","\x69\x73\x43\x65\x6C\x6C\x73\x53\x65\x6C\x65\x63\x74\x61\x62\x6C\x65","\x73\x65\x74\x43\x65\x6C\x6C\x73\x53\x65\x6C\x65\x63\x74\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x44\x65\x6C\x65\x74\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x73\x44\x65\x6C\x65\x74\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x44\x45\x4C\x45\x54\x41\x42\x4C\x45","\x73\x65\x74\x43\x65\x6C\x6C\x73\x44\x65\x6C\x65\x74\x61\x62\x6C\x65","\x69\x73\x4C\x61\x62\x65\x6C\x4D\x6F\x76\x61\x62\x6C\x65","\x67\x65\x74\x4D\x6F\x76\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x69\x73\x43\x65\x6C\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x4D\x4F\x56\x41\x42\x4C\x45","\x73\x65\x74\x43\x65\x6C\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x73\x65\x74\x50\x6F\x72\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x47\x72\x69\x64\x53\x69\x7A\x65","\x73\x65\x74\x47\x72\x69\x64\x53\x69\x7A\x65","\x67\x65\x74\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x73\x65\x74\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x69\x73\x56\x65\x72\x74\x65\x78\x4C\x61\x62\x65\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x73\x65\x74\x56\x65\x72\x74\x65\x78\x4C\x61\x62\x65\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x69\x73\x45\x64\x67\x65\x4C\x61\x62\x65\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x73\x65\x74\x45\x64\x67\x65\x4C\x61\x62\x65\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x69\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65\x4E\x65\x73\x74\x69\x6E\x67","\x73\x65\x74\x53\x77\x69\x6D\x6C\x61\x6E\x65\x4E\x65\x73\x74\x69\x6E\x67","\x73\x65\x74\x53\x77\x69\x6D\x6C\x61\x6E\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x4D\x75\x6C\x74\x69\x67\x72\x61\x70\x68","\x73\x65\x74\x4D\x75\x6C\x74\x69\x67\x72\x61\x70\x68","\x69\x73\x41\x6C\x6C\x6F\x77\x4C\x6F\x6F\x70\x73","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x44\x61\x6E\x67\x6C\x69\x6E\x67\x45\x64\x67\x65\x73","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65\x45\x64\x67\x65\x73","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65\x45\x64\x67\x65\x73","\x73\x65\x74\x43\x6C\x6F\x6E\x65\x49\x6E\x76\x61\x6C\x69\x64\x45\x64\x67\x65\x73","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x4C\x6F\x6F\x70\x73","\x73\x65\x74\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x4F\x6E\x4D\x6F\x76\x65","\x73\x65\x74\x44\x72\x6F\x70\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x70\x6C\x69\x74\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x53\x70\x6C\x69\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x43\x65\x6C\x6C\x52\x65\x73\x69\x7A\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x73\x52\x65\x73\x69\x7A\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x52\x45\x53\x49\x5A\x41\x42\x4C\x45","\x73\x65\x74\x43\x65\x6C\x6C\x73\x52\x65\x73\x69\x7A\x61\x62\x6C\x65","\x69\x73\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74\x4D\x6F\x76\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x42\x65\x6E\x64\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x73\x42\x65\x6E\x64\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x42\x45\x4E\x44\x41\x42\x4C\x45","\x73\x65\x74\x43\x65\x6C\x6C\x73\x42\x65\x6E\x64\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x73\x45\x64\x69\x74\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x45\x44\x49\x54\x41\x42\x4C\x45","\x73\x65\x74\x43\x65\x6C\x6C\x73\x45\x64\x69\x74\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x73\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x73\x65\x74\x43\x65\x6C\x6C\x73\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x69\x73\x56\x61\x6C\x69\x64\x53\x6F\x75\x72\x63\x65","\x69\x73\x56\x61\x6C\x69\x64\x54\x61\x72\x67\x65\x74","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x50\x61\x6E\x6E\x69\x6E\x67","\x69\x73\x41\x75\x74\x6F\x53\x69\x7A\x65\x43\x65\x6C\x6C\x73","\x53\x54\x59\x4C\x45\x5F\x41\x55\x54\x4F\x53\x49\x5A\x45","\x73\x65\x74\x41\x75\x74\x6F\x53\x69\x7A\x65\x43\x65\x6C\x6C\x73","\x69\x73\x45\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74\x73","\x73\x65\x74\x45\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74\x73","\x73\x65\x74\x45\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74\x73\x4F\x6E\x41\x64\x64","\x69\x73\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64\x72\x65\x6E","\x73\x65\x74\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64\x72\x65\x6E","\x69\x73\x41\x6C\x6C\x6F\x77\x4F\x76\x65\x72\x6C\x61\x70\x50\x61\x72\x65\x6E\x74","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4C\x44\x41\x42\x4C\x45","\x69\x73\x56\x61\x6C\x69\x64\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x69\x73\x53\x70\x6C\x69\x74\x54\x61\x72\x67\x65\x74","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x68\x69\x74\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65\x43\x6F\x6E\x74\x65\x6E\x74","\x67\x65\x74\x50\x6F\x69\x6E\x74\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x65\x74\x43\x65\x6C\x6C\x73","\x67\x65\x74\x43\x65\x6C\x6C\x73\x42\x65\x79\x6F\x6E\x64","\x69\x73\x43\x65\x6C\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x61\x64\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x61\x64\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x72\x65\x6D\x6F\x76\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x52\x65\x67\x69\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x73\x46\x6F\x72\x45\x76\x65\x6E\x74","\x73\x65\x6C\x65\x63\x74\x4E\x65\x78\x74\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x50\x72\x65\x76\x69\x6F\x75\x73\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x50\x61\x72\x65\x6E\x74\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x43\x68\x69\x6C\x64\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x73","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72","\x75\x70\x64\x61\x74\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x4D\x4F\x55\x53\x45\x5F\x44\x4F\x57\x4E","\x6C\x61\x73\x74\x54\x6F\x75\x63\x68\x58","\x6C\x61\x73\x74\x4D\x6F\x75\x73\x65\x58","\x6C\x61\x73\x74\x4D\x6F\x75\x73\x65\x59","\x4D\x4F\x55\x53\x45\x5F\x55\x50","\x4D\x4F\x55\x53\x45\x5F\x4D\x4F\x56\x45","\x64\x65\x73\x74\x72\x6F\x79\x65\x64","\x74\x6F\x6F\x6C\x74\x69\x70","\x68\x65\x6C\x70","\x67\x72\x61\x70\x68\x52\x65\x6E\x64\x65\x72\x48\x69\x6E\x74","\x73\x68\x6F\x77\x56\x69\x65\x77\x70\x6F\x72\x74","\x73\x69\x7A\x65\x72\x53\x69\x7A\x65","\x75\x70\x64\x61\x74\x65\x4F\x6E\x50\x61\x6E","\x73\x69\x7A\x65\x72\x49\x6D\x61\x67\x65","\x73\x68\x61\x70\x65\x2D\x72\x65\x6E\x64\x65\x72\x69\x6E\x67","\x6F\x70\x74\x69\x6D\x69\x7A\x65\x53\x70\x65\x65\x64","\x69\x6D\x61\x67\x65\x2D\x72\x65\x6E\x64\x65\x72\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72","\x75\x70\x64\x61\x74\x65","\x70\x61\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x72\x65\x66\x72\x65\x73\x68\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x42\x6F\x72\x64\x65\x72","\x72\x65\x64\x69\x72\x65\x63\x74\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74\x73","\x73\x69\x7A\x65\x72","\x63\x72\x65\x61\x74\x65\x53\x69\x7A\x65\x72","\x73\x65\x74\x5A\x6F\x6F\x6D\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x53\x6F\x75\x72\x63\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x53\x69\x7A\x65","\x67\x65\x74\x4F\x75\x74\x6C\x69\x6E\x65\x4F\x66\x66\x73\x65\x74","\x73\x74\x61\x72\x74\x58","\x73\x74\x61\x72\x74\x59","\x64\x78\x30","\x64\x79\x30","\x6E","\x76\x61\x6C\x69\x64\x4E\x65\x69\x67\x68\x62\x6F\x72\x73","\x74\x79\x70\x65\x45\x72\x72\x6F\x72","\x76\x61\x6C\x69\x64\x4E\x65\x69\x67\x68\x62\x6F\x72\x73\x41\x6C\x6C\x6F\x77\x65\x64","\x63\x68\x65\x63\x6B\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x63\x68\x65\x63\x6B\x4E\x65\x69\x67\x68\x62\x6F\x72\x73","\x63\x68\x65\x63\x6B\x54\x79\x70\x65","\x75\x6E\x64\x6F\x48\x61\x6E\x64\x6C\x65\x72","\x62\x75\x62\x62\x6C\x69\x6E\x67","\x69\x73\x42\x75\x62\x62\x6C\x69\x6E\x67","\x73\x65\x74\x42\x75\x62\x62\x6C\x69\x6E\x67","\x67\x65\x74\x4C\x61\x79\x6F\x75\x74","\x67\x65\x74\x43\x65\x6C\x6C\x73\x46\x6F\x72\x43\x68\x61\x6E\x67\x65\x73","\x67\x65\x74\x43\x65\x6C\x6C\x73\x46\x6F\x72\x43\x68\x61\x6E\x67\x65","\x65\x78\x65\x63\x75\x74\x65\x4C\x61\x79\x6F\x75\x74","\x72\x65\x73\x69\x7A\x65\x48\x61\x6E\x64\x6C\x65\x72","\x66\x6F\x6C\x64\x48\x61\x6E\x64\x6C\x65\x72","\x73\x68\x69\x66\x74\x52\x69\x67\x68\x74\x77\x61\x72\x64\x73","\x73\x68\x69\x66\x74\x44\x6F\x77\x6E\x77\x61\x72\x64\x73","\x69\x73\x43\x65\x6C\x6C\x49\x67\x6E\x6F\x72\x65\x64","\x69\x73\x43\x65\x6C\x6C\x53\x68\x69\x66\x74\x61\x62\x6C\x65","\x69\x73\x53\x68\x69\x66\x74\x52\x69\x67\x68\x74\x77\x61\x72\x64\x73","\x73\x65\x74\x53\x68\x69\x66\x74\x52\x69\x67\x68\x74\x77\x61\x72\x64\x73","\x69\x73\x53\x68\x69\x66\x74\x44\x6F\x77\x6E\x77\x61\x72\x64\x73","\x73\x65\x74\x53\x68\x69\x66\x74\x44\x6F\x77\x6E\x77\x61\x72\x64\x73","\x63\x65\x6C\x6C\x52\x65\x73\x69\x7A\x65\x64","\x67\x65\x74\x43\x65\x6C\x6C\x73\x54\x6F\x53\x68\x69\x66\x74","\x73\x68\x69\x66\x74\x43\x65\x6C\x6C","\x61\x64\x64\x45\x6E\x61\x62\x6C\x65\x64","\x72\x65\x73\x69\x7A\x65\x45\x6E\x61\x62\x6C\x65\x64","\x61\x64\x64\x48\x61\x6E\x64\x6C\x65\x72","\x69\x73\x41\x64\x64\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x52\x65\x73\x69\x7A\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x48\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x73\x65\x74\x41\x64\x64\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x52\x65\x73\x69\x7A\x65\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65\x49\x67\x6E\x6F\x72\x65\x64","\x69\x73\x43\x65\x6C\x6C\x48\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x41\x64\x64\x65\x64","\x72\x65\x73\x69\x7A\x65\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x6F\x6C\x64\x42\x6F\x75\x6E\x64\x73","\x6F\x6C\x64\x53\x74\x61\x74\x65\x73","\x6F\x6C\x64\x53\x63\x61\x6C\x65","\x64\x65\x6C\x74\x61\x73","\x63\x6F\x75\x6E\x74","\x58","\x59","\x61\x64\x64\x45\x64\x67\x65\x73","\x72\x65\x73\x6F\x6C\x76\x65","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x53\x74\x61\x74\x65","\x72\x65\x76\x61\x6C\x69\x64\x61\x74\x65\x53\x74\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x50\x72\x65\x76\x69\x65\x77\x53\x68\x61\x70\x65","\x6D\x61\x78\x43\x65\x6C\x6C\x73","\x68\x69\x67\x68\x6C\x69\x67\x68\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x6C\x6F\x6E\x65\x45\x6E\x61\x62\x6C\x65\x64","\x6D\x6F\x76\x65\x45\x6E\x61\x62\x6C\x65\x64","\x67\x75\x69\x64\x65","\x63\x75\x72\x72\x65\x6E\x74\x44\x78","\x63\x75\x72\x72\x65\x6E\x74\x44\x79","\x75\x70\x64\x61\x74\x65\x43\x75\x72\x73\x6F\x72","\x73\x65\x6C\x65\x63\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x4F\x6E\x44\x72\x6F\x70","\x73\x63\x72\x6F\x6C\x6C\x4F\x6E\x4D\x6F\x76\x65","\x70\x72\x65\x76\x69\x65\x77\x43\x6F\x6C\x6F\x72","\x68\x74\x6D\x6C\x50\x72\x65\x76\x69\x65\x77","\x73\x63\x61\x6C\x65\x47\x72\x69\x64","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x43\x6C\x6F\x6E\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x43\x6C\x6F\x6E\x65\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x4D\x6F\x76\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x4D\x6F\x76\x65\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x65\x6C\x65\x63\x74\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x52\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x73\x65\x74\x52\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x49\x6E\x69\x74\x69\x61\x6C\x43\x65\x6C\x6C\x46\x6F\x72\x45\x76\x65\x6E\x74","\x69\x73\x44\x65\x6C\x61\x79\x65\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x64\x65\x6C\x61\x79\x65\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x63\x65\x6C\x6C\x57\x61\x73\x43\x6C\x69\x63\x6B\x65\x64","\x53\x45\x4C\x45\x43\x54","\x66\x69\x72\x73\x74","\x67\x65\x74\x50\x72\x65\x76\x69\x65\x77\x42\x6F\x75\x6E\x64\x73","\x63\x72\x65\x61\x74\x65\x50\x72\x65\x76\x69\x65\x77\x53\x68\x61\x70\x65","\x70\x42\x6F\x75\x6E\x64\x73","\x75\x73\x65\x47\x75\x69\x64\x65\x73\x46\x6F\x72\x45\x76\x65\x6E\x74","\x73\x65\x74\x48\x69\x67\x68\x6C\x69\x67\x68\x74\x43\x6F\x6C\x6F\x72","\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4C\x4F\x52","\x49\x4E\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4E\x4E\x45\x43\x54\x5F\x54\x41\x52\x47\x45\x54\x5F\x43\x4F\x4C\x4F\x52","\x43\x55\x52\x53\x4F\x52\x5F\x4D\x4F\x56\x41\x42\x4C\x45\x5F\x45\x44\x47\x45","\x43\x55\x52\x53\x4F\x52\x5F\x4D\x4F\x56\x41\x42\x4C\x45\x5F\x56\x45\x52\x54\x45\x58","\x73\x65\x6C\x65\x63\x74\x44\x65\x6C\x61\x79\x65\x64","\x64\x65\x73\x74\x72\x6F\x79\x53\x68\x61\x70\x65\x73","\x67\x75\x69\x64\x65\x73","\x73\x68\x6F\x75\x6C\x64\x52\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x74\x72\x69\x67\x67\x65\x72\x58","\x74\x72\x69\x67\x67\x65\x72\x59","\x75\x73\x65\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x75\x73\x65\x4C\x65\x66\x74\x42\x75\x74\x74\x6F\x6E\x46\x6F\x72\x50\x61\x6E\x6E\x69\x6E\x67","\x73\x65\x6C\x65\x63\x74\x4F\x6E\x50\x6F\x70\x75\x70","\x63\x6C\x65\x61\x72\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4F\x6E\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x69\x67\x6E\x6F\x72\x65\x43\x65\x6C\x6C","\x70\x72\x65\x76\x69\x65\x77\x45\x6E\x61\x62\x6C\x65\x64","\x75\x73\x65\x47\x72\x69\x64","\x69\x73\x50\x61\x6E\x6E\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x50\x61\x6E\x6E\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x50\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x70\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x63\x6F\x6E\x73\x75\x6D\x65\x50\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x67\x65\x74\x43\x65\x6C\x6C\x46\x6F\x72\x50\x6F\x70\x75\x70\x45\x76\x65\x6E\x74","\x76\x61\x6C\x69\x64\x43\x6F\x6C\x6F\x72","\x44\x45\x46\x41\x55\x4C\x54\x5F\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4C\x4F\x52","\x69\x6E\x76\x61\x6C\x69\x64\x43\x6F\x6C\x6F\x72","\x44\x45\x46\x41\x55\x4C\x54\x5F\x49\x4E\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4C\x4F\x52","\x68\x6F\x74\x73\x70\x6F\x74","\x44\x45\x46\x41\x55\x4C\x54\x5F\x48\x4F\x54\x53\x50\x4F\x54","\x68\x6F\x74\x73\x70\x6F\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x75\x72\x72\x65\x6E\x74\x43\x6F\x6C\x6F\x72","\x76\x61\x6C\x69\x64\x53\x74\x61\x74\x65","\x6D\x61\x72\x6B\x65\x64\x53\x74\x61\x74\x65","\x73\x65\x74\x48\x6F\x74\x73\x70\x6F\x74","\x67\x65\x74\x48\x6F\x74\x73\x70\x6F\x74","\x73\x65\x74\x48\x6F\x74\x73\x70\x6F\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x48\x6F\x74\x73\x70\x6F\x74\x45\x6E\x61\x62\x6C\x65\x64","\x68\x61\x73\x56\x61\x6C\x69\x64\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x61\x6C\x69\x64\x53\x74\x61\x74\x65","\x67\x65\x74\x4D\x61\x72\x6B\x65\x64\x53\x74\x61\x74\x65","\x75\x6E\x6D\x61\x72\x6B","\x70\x72\x6F\x63\x65\x73\x73","\x69\x73\x56\x61\x6C\x69\x64\x53\x74\x61\x74\x65","\x67\x65\x74\x4D\x61\x72\x6B\x65\x72\x43\x6F\x6C\x6F\x72","\x6D\x61\x72\x6B\x43\x65\x6C\x6C","\x67\x65\x74\x53\x74\x61\x74\x65\x54\x6F\x4D\x61\x72\x6B","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x73\x48\x6F\x74\x73\x70\x6F\x74","\x72\x65\x73\x65\x74\x48\x61\x6E\x64\x6C\x65\x72","\x68\x61\x6E\x64\x6C\x65\x72\x73","\x6D\x61\x78\x48\x61\x6E\x64\x6C\x65\x72\x73","\x6D\x6F\x76\x65\x49\x63\x6F\x6E\x46\x72\x6F\x6E\x74","\x6D\x6F\x76\x65\x49\x63\x6F\x6E\x42\x61\x63\x6B","\x63\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x74\x61\x72\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x6D\x61\x72\x6B\x65\x72","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x48\x61\x6E\x64\x6C\x65\x72","\x77\x61\x79\x70\x6F\x69\x6E\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x45\x6E\x61\x62\x6C\x65\x64","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x44\x65\x6C\x61\x79","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x49\x6E\x50\x72\x6F\x67\x72\x65\x73\x73","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x56\x61\x6C\x69\x64","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x69\x6E\x69\x74\x69\x61\x6C\x54\x6F\x75\x63\x68\x58","\x69\x6E\x69\x74\x69\x61\x6C\x54\x6F\x75\x63\x68\x59","\x69\x67\x6E\x6F\x72\x65\x4D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x63\x6F\x6E\x6E\x65\x63\x74\x49\x63\x6F\x6E\x4F\x66\x66\x73\x65\x74","\x65\x64\x67\x65\x53\x74\x61\x74\x65","\x64\x72\x69\x6C\x6C\x48\x61\x6E\x64\x6C\x65\x72","\x6D\x6F\x75\x73\x65\x44\x6F\x77\x6E\x43\x6F\x75\x6E\x74\x65\x72","\x6D\x6F\x76\x65\x50\x72\x65\x76\x69\x65\x77\x41\x77\x61\x79","\x69\x73\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x73\x65\x74\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x69\x63\x6F\x6E\x53\x74\x61\x74\x65","\x69\x63\x6F\x6E\x73","\x72\x65\x64\x72\x61\x77\x49\x63\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x49\x63\x6F\x6E\x73","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6E\x67","\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x53\x74\x61\x74\x65","\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x69\x73\x4D\x6F\x76\x65\x49\x63\x6F\x6E\x54\x6F\x46\x72\x6F\x6E\x74\x46\x6F\x72\x53\x74\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x49\x63\x6F\x6E\x73","\x43\x55\x52\x53\x4F\x52\x5F\x43\x4F\x4E\x4E\x45\x43\x54","\x63\x75\x72\x72\x65\x6E\x74\x53\x74\x61\x74\x65","\x69\x63\x6F\x6E","\x67\x65\x74\x49\x63\x6F\x6E\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x69\x73\x53\x74\x61\x72\x74\x45\x76\x65\x6E\x74","\x63\x75\x72\x72\x65\x6E\x74\x46\x6F\x63\x75\x73","\x63\x75\x72\x72\x65\x6E\x74\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x73\x6F\x75\x72\x63\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x77\x61\x79\x70\x6F\x69\x6E\x74\x73","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x54\x68\x72\x65\x61\x64","\x63\x6C\x65\x61\x72\x54\x69\x6D\x65\x6F\x75\x74","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64","\x73\x65\x6C\x65\x63\x74\x65\x64\x49\x63\x6F\x6E","\x69\x73\x49\x6D\x6D\x65\x64\x69\x61\x74\x65\x43\x6F\x6E\x6E\x65\x63\x74\x53\x6F\x75\x72\x63\x65","\x75\x70\x64\x61\x74\x65\x43\x75\x72\x72\x65\x6E\x74\x53\x74\x61\x74\x65","\x63\x6F\x6E\x76\x65\x72\x74\x57\x61\x79\x70\x6F\x69\x6E\x74","\x67\x65\x74\x54\x61\x72\x67\x65\x74\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x50\x6F\x69\x6E\x74","\x67\x65\x74\x53\x6F\x75\x72\x63\x65\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x50\x6F\x69\x6E\x74","\x64\x72\x61\x77\x50\x72\x65\x76\x69\x65\x77","\x75\x70\x64\x61\x74\x65\x49\x63\x6F\x6E\x73","\x69\x73\x53\x74\x6F\x70\x45\x76\x65\x6E\x74","\x61\x64\x64\x57\x61\x79\x70\x6F\x69\x6E\x74\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x65\x74\x45\x64\x67\x65\x57\x69\x64\x74\x68","\x67\x65\x74\x45\x64\x67\x65\x43\x6F\x6C\x6F\x72","\x49\x4E\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4C\x4F\x52","\x63\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x41\x6C\x69\x67\x6E\x6D\x65\x6E\x74\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x70\x6F\x69\x6E\x74\x49\x6D\x61\x67\x65","\x2F\x70\x6F\x69\x6E\x74\x2E\x67\x69\x66","\x68\x69\x67\x68\x6C\x69\x67\x68\x74\x43\x6F\x6C\x6F\x72","\x66\x6F\x63\x75\x73\x49\x63\x6F\x6E\x73","\x66\x6F\x63\x75\x73\x48\x69\x67\x68\x6C\x69\x67\x68\x74","\x66\x6F\x63\x75\x73\x50\x6F\x69\x6E\x74\x73","\x63\x75\x72\x72\x65\x6E\x74\x46\x6F\x63\x75\x73\x41\x72\x65\x61","\x67\x65\x74\x49\x6D\x61\x67\x65\x46\x6F\x72\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x69\x73\x45\x76\x65\x6E\x74\x49\x67\x6E\x6F\x72\x65\x64","\x72\x65\x70\x61\x69\x6E\x74","\x64\x65\x66\x61\x75\x6C\x74\x4F\x70\x61\x63\x69\x74\x79","\x73\x68\x61\x72\x65\x64\x44\x69\x76","\x63\x75\x72\x72\x65\x6E\x74\x58","\x63\x75\x72\x72\x65\x6E\x74\x59","\x64\x72\x61\x67\x48\x61\x6E\x64\x6C\x65\x72","\x6D\x78\x52\x75\x62\x62\x65\x72\x62\x61\x6E\x64","\x73\x69\x6E\x67\x6C\x65\x53\x69\x7A\x65\x72","\x61\x6C\x6C\x6F\x77\x48\x61\x6E\x64\x6C\x65\x42\x6F\x75\x6E\x64\x73\x43\x68\x65\x63\x6B","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x67\x65","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x52\x61\x73\x74\x65\x72","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x42\x6F\x75\x6E\x64\x73","\x63\x72\x65\x61\x74\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x53\x68\x61\x70\x65","\x73\x69\x7A\x65\x72\x73","\x6E\x2D\x72\x65\x73\x69\x7A\x65","\x6E\x65\x2D\x72\x65\x73\x69\x7A\x65","\x77\x2D\x72\x65\x73\x69\x7A\x65","\x65\x2D\x72\x65\x73\x69\x7A\x65","\x73\x77\x2D\x72\x65\x73\x69\x7A\x65","\x73\x2D\x72\x65\x73\x69\x7A\x65","\x73\x65\x2D\x72\x65\x73\x69\x7A\x65","\x6C\x61\x62\x65\x6C\x53\x68\x61\x70\x65","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x53\x68\x61\x70\x65","\x48\x41\x4E\x44\x4C\x45\x5F\x53\x49\x5A\x45","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x6C\x6F\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x53\x74\x72\x6F\x6B\x65\x57\x69\x64\x74\x68","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x44\x61\x73\x68\x65\x64","\x56\x45\x52\x54\x45\x58\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x43\x4F\x4C\x4F\x52","\x56\x45\x52\x54\x45\x58\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x53\x54\x52\x4F\x4B\x45\x57\x49\x44\x54\x48","\x56\x45\x52\x54\x45\x58\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x44\x41\x53\x48\x45\x44","\x63\x72\x65\x61\x74\x65\x53\x69\x7A\x65\x72\x53\x68\x61\x70\x65","\x69\x73\x53\x69\x7A\x65\x72\x56\x69\x73\x69\x62\x6C\x65","\x52\x4F\x54\x41\x54\x49\x4F\x4E\x5F\x48\x41\x4E\x44\x4C\x45","\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x6D\x6F\x76\x65\x53\x69\x7A\x65\x72\x54\x6F","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x46\x6F\x72\x45\x76\x65\x6E\x74","\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45","\x70\x72\x65\x76\x69\x65\x77","\x63\x75\x72\x72\x65\x6E\x74\x41\x6C\x70\x68\x61","\x61\x74\x61\x6E","\x75\x6E\x69\x6F\x6E","\x72\x6F\x74\x61\x74\x65\x43\x65\x6C\x6C","\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64\x72\x65\x6E","\x62\x65\x6E\x64\x73","\x72\x65\x6D\x6F\x76\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x6E\x61\x70\x54\x6F\x54\x65\x72\x6D\x69\x6E\x61\x6C\x73","\x61\x62\x73\x70\x6F\x69\x6E\x74\x73","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x50\x6F\x69\x6E\x74\x73","\x69\x73\x41\x64\x64\x50\x6F\x69\x6E\x74\x45\x76\x65\x6E\x74","\x61\x64\x64\x50\x6F\x69\x6E\x74","\x63\x72\x65\x61\x74\x65\x42\x65\x6E\x64\x73","\x69\x6E\x69\x74\x42\x65\x6E\x64","\x43\x55\x52\x53\x4F\x52\x5F\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45","\x69\x73\x52\x65\x6D\x6F\x76\x65\x50\x6F\x69\x6E\x74\x45\x76\x65\x6E\x74","\x45\x44\x47\x45\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x43\x4F\x4C\x4F\x52","\x45\x44\x47\x45\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x53\x54\x52\x4F\x4B\x45\x57\x49\x44\x54\x48","\x45\x44\x47\x45\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x44\x41\x53\x48\x45\x44","\x69\x73\x48\x61\x6E\x64\x6C\x65\x56\x69\x73\x69\x62\x6C\x65","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x53\x68\x61\x70\x65","\x69\x73\x48\x61\x6E\x64\x6C\x65\x45\x6E\x61\x62\x6C\x65\x64","\x43\x55\x52\x53\x4F\x52\x5F\x42\x45\x4E\x44\x5F\x48\x41\x4E\x44\x4C\x45","\x72\x65\x6D\x6F\x76\x65\x50\x6F\x69\x6E\x74","\x69\x73\x54\x61\x72\x67\x65\x74","\x69\x73\x4C\x61\x62\x65\x6C","\x63\x6C\x6F\x6E\x65\x50\x72\x65\x76\x69\x65\x77\x53\x74\x61\x74\x65","\x67\x65\x74\x53\x6E\x61\x70\x54\x6F\x54\x65\x72\x6D\x69\x6E\x61\x6C\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x67\x65\x74\x50\x72\x65\x76\x69\x65\x77\x54\x65\x72\x6D\x69\x6E\x61\x6C\x53\x74\x61\x74\x65","\x67\x65\x74\x50\x72\x65\x76\x69\x65\x77\x50\x6F\x69\x6E\x74\x73","\x75\x70\x64\x61\x74\x65\x50\x72\x65\x76\x69\x65\x77\x53\x74\x61\x74\x65","\x73\x65\x74\x50\x72\x65\x76\x69\x65\x77\x43\x6F\x6C\x6F\x72","\x6D\x6F\x76\x65\x4C\x61\x62\x65\x6C","\x63\x68\x61\x6E\x67\x65\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x63\x68\x61\x6E\x67\x65\x50\x6F\x69\x6E\x74\x73","\x61\x64\x64\x50\x6F\x69\x6E\x74\x41\x74","\x66\x69\x6E\x64\x4E\x65\x61\x72\x65\x73\x74\x53\x65\x67\x6D\x65\x6E\x74","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x46\x69\x6C\x6C\x43\x6F\x6C\x6F\x72","\x4C\x4F\x43\x4B\x45\x44\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x43\x4F\x4E\x4E\x45\x43\x54\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x53\x49\x5A\x45","\x72\x65\x64\x72\x61\x77\x49\x6E\x6E\x65\x72\x42\x65\x6E\x64\x73","\x66\x6C\x69\x70\x45\x6E\x61\x62\x6C\x65\x64","\x64\x6F\x75\x62\x6C\x65\x43\x6C\x69\x63\x6B\x4F\x72\x69\x65\x6E\x74\x61\x74\x69\x6F\x6E\x52\x65\x73\x6F\x75\x72\x63\x65","\x64\x6F\x75\x62\x6C\x65\x43\x6C\x69\x63\x6B\x4F\x72\x69\x65\x6E\x74\x61\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x56\x69\x72\x74\x75\x61\x6C\x42\x65\x6E\x64","\x67\x65\x74\x43\x75\x72\x73\x6F\x72\x46\x6F\x72\x42\x65\x6E\x64","\x45\x44\x47\x45\x53\x54\x59\x4C\x45\x5F\x54\x4F\x50\x54\x4F\x42\x4F\x54\x54\x4F\x4D","\x45\x44\x47\x45\x53\x54\x59\x4C\x45\x5F\x45\x4C\x42\x4F\x57","\x72\x6F\x77\x2D\x72\x65\x73\x69\x7A\x65","\x63\x6F\x6C\x2D\x72\x65\x73\x69\x7A\x65","\x6E\x6F\x72\x6D\x61\x6C\x4B\x65\x79\x73","\x73\x68\x69\x66\x74\x4B\x65\x79\x73","\x63\x6F\x6E\x74\x72\x6F\x6C\x4B\x65\x79\x73","\x63\x6F\x6E\x74\x72\x6F\x6C\x53\x68\x69\x66\x74\x4B\x65\x79\x73","\x6B\x65\x79\x44\x6F\x77\x6E","\x62\x69\x6E\x64\x4B\x65\x79","\x62\x69\x6E\x64\x53\x68\x69\x66\x74\x4B\x65\x79","\x62\x69\x6E\x64\x43\x6F\x6E\x74\x72\x6F\x6C\x4B\x65\x79","\x62\x69\x6E\x64\x43\x6F\x6E\x74\x72\x6F\x6C\x53\x68\x69\x66\x74\x4B\x65\x79","\x67\x65\x74\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x69\x73\x47\x72\x61\x70\x68\x45\x76\x65\x6E\x74","\x68\x69\x64\x65\x4F\x6E\x48\x6F\x76\x65\x72","\x73\x65\x74\x48\x69\x64\x65\x4F\x6E\x48\x6F\x76\x65\x72","\x6D\x78\x54\x6F\x6F\x6C\x74\x69\x70","\x68\x69\x64\x65\x54\x6F\x6F\x6C\x74\x69\x70","\x73\x74\x61\x74\x65\x53\x6F\x75\x72\x63\x65","\x72\x65\x73\x65\x74\x54\x69\x6D\x65\x72","\x48\x49\x47\x48\x4C\x49\x47\x48\x54\x5F\x53\x54\x52\x4F\x4B\x45\x57\x49\x44\x54\x48","\x72\x65\x70\x61\x69\x6E\x74\x48\x61\x6E\x64\x6C\x65\x72","\x6B\x65\x65\x70\x4F\x6E\x54\x6F\x70","\x64\x72\x61\x77\x48\x69\x67\x68\x6C\x69\x67\x68\x74","\x65\x64\x69\x74\x6F\x72","\x68\x69\x64\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73","\x62\x69\x6E\x64\x41\x63\x74\x69\x6F\x6E","\x63\x6F\x6E\x66\x69\x67","\x63\x72\x65\x61\x74\x65\x4D\x65\x6E\x75","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x61\x64\x64\x49\x74\x65\x6D\x73","\x69\x66","\x61\x73","\x69\x63\x6F\x6E\x43\x6C\x73","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E","\x73\x65\x70\x61\x72\x61\x74\x6F\x72","\x6E\x6F\x63\x65\x6C\x6C","\x6E\x63\x65\x6C\x6C\x73","\x6E\x6F\x74\x52\x6F\x6F\x74","\x6E\x6F\x6E\x45\x6D\x70\x74\x79","\x65\x78\x70\x61\x6E\x64\x61\x62\x6C\x65","\x63\x6F\x6C\x6C\x61\x70\x73\x61\x62\x6C\x65","\x76\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x65\x6D\x70\x74\x79\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x74\x6F\x6F\x6C\x62\x61\x72","\x69\x6E\x73\x65\x72\x74\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x2F\x73\x65\x70\x61\x72\x61\x74\x6F\x72\x2E\x67\x69\x66","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E\x4F\x70\x74\x69\x6F\x6E","\x73\x65\x74\x4D\x6F\x64\x65","\x61\x64\x64\x50\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x6E\x73\x74\x61\x6C\x6C\x44\x72\x6F\x70\x48\x61\x6E\x64\x6C\x65\x72","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x46\x6C\x6F\x77","\x6D\x61\x6B\x65\x44\x72\x61\x67\x67\x61\x62\x6C\x65","\x61\x63\x74\x69\x6F\x6E\x73","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E\x73","\x63\x79\x63\x6C\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x56\x61\x6C\x75\x65\x73","\x70\x6F\x70\x75\x70\x48\x61\x6E\x64\x6C\x65\x72","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x63\x72\x65\x61\x74\x65\x47\x72\x61\x70\x68","\x63\x72\x65\x61\x74\x65\x54\x6F\x6F\x6C\x62\x61\x72","\x6B\x65\x79\x48\x61\x6E\x64\x6C\x65\x72","\x63\x6F\x6E\x66\x69\x67\x75\x72\x65","\x63\x79\x63\x6C\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x4E\x61\x6D\x65","\x49\x53\x5F\x4C\x4F\x43\x41\x4C","\x63\x72\x65\x61\x74\x65\x53\x65\x73\x73\x69\x6F\x6E","\x2F\x72\x65\x73\x6F\x75\x72\x63\x65\x73\x2F\x65\x64\x69\x74\x6F\x72","\x61\x73\x6B\x5A\x6F\x6F\x6D\x52\x65\x73\x6F\x75\x72\x63\x65","\x61\x73\x6B\x5A\x6F\x6F\x6D","\x6C\x61\x73\x74\x53\x61\x76\x65\x64\x52\x65\x73\x6F\x75\x72\x63\x65","\x6C\x61\x73\x74\x53\x61\x76\x65\x64","\x63\x75\x72\x72\x65\x6E\x74\x46\x69\x6C\x65\x52\x65\x73\x6F\x75\x72\x63\x65","\x63\x75\x72\x72\x65\x6E\x74\x46\x69\x6C\x65","\x70\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x52\x65\x73\x6F\x75\x72\x63\x65","\x74\x61\x73\x6B\x73\x52\x65\x73\x6F\x75\x72\x63\x65","\x74\x61\x73\x6B\x73","\x68\x65\x6C\x70\x52\x65\x73\x6F\x75\x72\x63\x65","\x6F\x75\x74\x6C\x69\x6E\x65\x52\x65\x73\x6F\x75\x72\x63\x65","\x64\x62\x6C\x43\x6C\x69\x63\x6B\x41\x63\x74\x69\x6F\x6E","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x52\x65\x71\x75\x69\x72\x65\x64","\x66\x6F\x72\x63\x65\x64\x49\x6E\x73\x65\x72\x74\x69\x6E\x67","\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x64\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x64\x65\x66\x61\x75\x6C\x74\x47\x72\x6F\x75\x70","\x67\x72\x6F\x75\x70\x42\x6F\x72\x64\x65\x72\x53\x69\x7A\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x70\x6F\x73\x74\x50\x61\x72\x61\x6D\x65\x74\x65\x72\x4E\x61\x6D\x65","\x75\x72\x6C\x50\x6F\x73\x74","\x75\x72\x6C\x49\x6D\x61\x67\x65","\x6C\x61\x79\x6F\x75\x74\x44\x69\x61\x67\x72\x61\x6D","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x53\x70\x61\x63\x69\x6E\x67","\x6D\x61\x69\x6E\x74\x61\x69\x6E\x53\x77\x69\x6D\x6C\x61\x6E\x65\x73","\x6C\x61\x79\x6F\x75\x74\x53\x77\x69\x6D\x6C\x61\x6E\x65\x73","\x63\x79\x63\x6C\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x49\x6E\x64\x65\x78","\x74\x61\x73\x6B\x73\x57\x69\x6E\x64\x6F\x77\x49\x6D\x61\x67\x65","\x74\x61\x73\x6B\x73\x54\x6F\x70","\x68\x65\x6C\x70\x57\x69\x6E\x64\x6F\x77\x49\x6D\x61\x67\x65","\x75\x72\x6C\x48\x65\x6C\x70","\x68\x65\x6C\x70\x57\x69\x64\x74\x68","\x68\x65\x6C\x70\x48\x65\x69\x67\x68\x74","\x70\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x57\x69\x64\x74\x68","\x70\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x48\x65\x69\x67\x68\x74","\x6D\x6F\x76\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x44\x69\x61\x6C\x6F\x67","\x76\x61\x6C\x69\x64\x61\x74\x69\x6E\x67","\x65\x78\x70\x6F\x72\x74\x49\x6D\x61\x67\x65","\x67\x65\x74\x55\x72\x6C\x49\x6D\x61\x67\x65","\x67\x65\x74\x56\x69\x65\x77\x58\x6D\x6C","\x5F\x62\x6C\x61\x6E\x6B","\x63\x75\x74","\x70\x61\x73\x74\x65","\x64\x65\x6C\x65\x74\x65","\x75\x6E\x67\x72\x6F\x75\x70","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x73\x68\x6F\x77\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73","\x73\x65\x6C\x65\x63\x74\x4E\x6F\x6E\x65","\x74\x6F\x42\x61\x63\x6B","\x74\x6F\x46\x72\x6F\x6E\x74","\x73\x65\x6C\x65\x63\x74\x50\x72\x65\x76\x69\x6F\x75\x73","\x73\x65\x6C\x65\x63\x74\x4E\x65\x78\x74","\x73\x65\x6C\x65\x63\x74\x50\x61\x72\x65\x6E\x74","\x73\x65\x6C\x65\x63\x74\x43\x68\x69\x6C\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x41\x6C\x6C","\x65\x78\x70\x61\x6E\x64","\x65\x78\x70\x61\x6E\x64\x41\x6C\x6C","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73\x4C\x65\x66\x74","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73\x43\x65\x6E\x74\x65\x72","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73\x52\x69\x67\x68\x74","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73\x54\x6F\x70","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73\x4D\x69\x64\x64\x6C\x65","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73\x42\x6F\x74\x74\x6F\x6D","\x61\x6C\x69\x67\x6E\x46\x6F\x6E\x74\x4C\x65\x66\x74","\x61\x6C\x69\x67\x6E\x46\x6F\x6E\x74\x43\x65\x6E\x74\x65\x72","\x61\x6C\x69\x67\x6E\x46\x6F\x6E\x74\x52\x69\x67\x68\x74","\x61\x6C\x69\x67\x6E\x46\x6F\x6E\x74\x54\x6F\x70","\x61\x6C\x69\x67\x6E\x46\x6F\x6E\x74\x4D\x69\x64\x64\x6C\x65","\x61\x6C\x69\x67\x6E\x46\x6F\x6E\x74\x42\x6F\x74\x74\x6F\x6D","\x70\x72\x6F\x6D\x70\x74","\x74\x6F\x67\x67\x6C\x65\x54\x61\x73\x6B\x73","\x73\x68\x6F\x77\x54\x61\x73\x6B\x73","\x74\x6F\x67\x67\x6C\x65\x48\x65\x6C\x70","\x73\x68\x6F\x77\x48\x65\x6C\x70","\x74\x6F\x67\x67\x6C\x65\x4F\x75\x74\x6C\x69\x6E\x65","\x73\x68\x6F\x77\x4F\x75\x74\x6C\x69\x6E\x65","\x74\x6F\x67\x67\x6C\x65\x43\x6F\x6E\x73\x6F\x6C\x65","\x72\x65\x73\x65\x74\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x73\x65\x74\x46\x69\x72\x73\x74\x54\x69\x6D\x65","\x63\x6F\x6F\x6B\x69\x65","\x6D\x78\x67\x72\x61\x70\x68\x3D\x73\x65\x65\x6E\x3B\x20\x65\x78\x70\x69\x72\x65\x73\x3D\x46\x72\x69\x2C\x20\x32\x37\x20\x4A\x75\x6C\x20\x32\x30\x30\x31\x20\x30\x32\x3A\x34\x37\x3A\x31\x31\x20\x55\x54\x43\x3B\x20\x70\x61\x74\x68\x3D\x2F","\x43\x61\x6E\x6E\x6F\x74\x20\x65\x78\x65\x63\x75\x74\x65\x20","\x3A\x20","\x43\x61\x6E\x6E\x6F\x74\x20\x66\x69\x6E\x64\x20\x61\x63\x74\x69\x6F\x6E\x20","\x61\x64\x64\x54\x65\x6D\x70\x6C\x61\x74\x65","\x67\x65\x74\x54\x65\x6D\x70\x6C\x61\x74\x65","\x69\x6E\x73\x74\x61\x6C\x6C\x44\x62\x6C\x43\x6C\x69\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x73\x74\x61\x6C\x6C\x55\x6E\x64\x6F\x48\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x73\x74\x61\x6C\x6C\x44\x72\x69\x6C\x6C\x48\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x73\x74\x61\x6C\x6C\x43\x68\x61\x6E\x67\x65\x48\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x73\x74\x61\x6C\x6C\x49\x6E\x73\x65\x72\x74\x48\x61\x6E\x64\x6C\x65\x72","\x63\x72\x65\x61\x74\x65\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75","\x63\x72\x65\x61\x74\x65\x53\x77\x69\x6D\x6C\x61\x6E\x65\x4D\x61\x6E\x61\x67\x65\x72","\x63\x72\x65\x61\x74\x65\x4C\x61\x79\x6F\x75\x74\x4D\x61\x6E\x61\x67\x65\x72","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x4C\x61\x79\x6F\x75\x74","\x63\x72\x65\x61\x74\x65\x53\x77\x69\x6D\x6C\x61\x6E\x65\x4C\x61\x79\x6F\x75\x74","\x64\x69\x61\x67\x72\x61\x6D\x4C\x61\x79\x6F\x75\x74","\x63\x72\x65\x61\x74\x65\x44\x69\x61\x67\x72\x61\x6D\x4C\x61\x79\x6F\x75\x74","\x73\x65\x74\x47\x72\x61\x70\x68\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x72\x75\x62\x62\x65\x72\x62\x61\x6E\x64","\x73\x65\x74\x54\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x65\x74\x53\x74\x61\x74\x75\x73\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x74\x6F\x4C\x6F\x63\x61\x6C\x65\x53\x74\x72\x69\x6E\x67","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x65\x74\x54\x69\x74\x6C\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x74\x54\x69\x74\x6C\x65","\x74\x72\x65\x65\x4C\x61\x79\x6F\x75\x74","\x20\x3E\x20","\x67\x65\x74\x52\x6F\x6F\x74\x54\x69\x74\x6C\x65","\x63\x72\x65\x61\x74\x65\x47\x72\x6F\x75\x70","\x72\x65\x61\x64\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C","\x67\x65\x74\x55\x72\x6C\x50\x6F\x73\x74","\x77\x72\x69\x74\x65\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C","\x70\x6F\x73\x74\x44\x69\x61\x67\x72\x61\x6D","\x73\x77\x61\x70\x53\x74\x79\x6C\x65\x73","\x63\x72\x65\x61\x74\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73","\x69\x73\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x56\x69\x73\x69\x62\x6C\x65","\x72\x65\x61\x64\x6F\x6E\x6C\x79","\x49\x44","\x53\x74\x79\x6C\x65","\x63\x72\x65\x61\x74\x65\x54\x61\x73\x6B\x73","\x72\x65\x66\x72\x65\x73\x68\x54\x61\x73\x6B\x73","\x66\x72\x61\x6D\x65\x42\x6F\x72\x64\x65\x72","\x63\x6F\x6E\x73\x75\x6D\x65\x43\x79\x63\x6C\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x79\x63\x6C\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x69\x73\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x65\x64\x4D\x6F\x76\x69\x6E\x67","\x63\x6F\x64\x65\x63\x73","\x74\x65\x6D\x70\x6C\x61\x74\x65","\x61\x64\x64\x41\x6C\x69\x61\x73","\x61\x6C\x69\x61\x73\x65\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x65\x6E\x63\x6F\x64\x65\x44\x65\x66\x61\x75\x6C\x74\x73","\x67\x65\x74\x4F\x62\x6A\x65\x63\x74","\x72\x65\x66\x65\x72\x65\x6E\x63\x65","\x67\x65\x74\x43\x6F\x64\x65\x63","\x69\x6D\x70\x6F\x72\x74\x4E\x6F\x64\x65","\x6D\x78\x43\x6F\x64\x65\x63\x2E\x65\x6E\x63\x6F\x64\x65\x3A\x20\x4E\x6F\x20\x63\x6F\x64\x65\x63\x20\x66\x6F\x72\x20","\x43\x61\x6E\x6E\x6F\x74\x20\x64\x65\x63\x6F\x64\x65\x20","\x65\x6E\x63\x6F\x64\x65\x43\x65\x6C\x6C","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x64\x65\x63","\x64\x65\x63\x6F\x64\x65\x43\x65\x6C\x6C","\x69\x6E\x73\x65\x72\x74\x49\x6E\x74\x6F\x47\x72\x61\x70\x68","\x65\x78\x63\x6C\x75\x64\x65","\x69\x64\x72\x65\x66\x73","\x6D\x61\x70\x70\x69\x6E\x67","\x72\x65\x76\x65\x72\x73\x65","\x63\x6C\x6F\x6E\x65\x54\x65\x6D\x70\x6C\x61\x74\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x4E\x61\x6D\x65","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x4E\x61\x6D\x65","\x69\x73\x45\x78\x63\x6C\x75\x64\x65\x64","\x69\x73\x52\x65\x66\x65\x72\x65\x6E\x63\x65","\x62\x65\x66\x6F\x72\x65\x45\x6E\x63\x6F\x64\x65","\x65\x6E\x63\x6F\x64\x65\x4F\x62\x6A\x65\x63\x74","\x61\x66\x74\x65\x72\x45\x6E\x63\x6F\x64\x65","\x65\x6E\x63\x6F\x64\x65\x56\x61\x6C\x75\x65","\x6D\x78\x4F\x62\x6A\x65\x63\x74\x43\x6F\x64\x65\x63\x2E\x65\x6E\x63\x6F\x64\x65\x3A\x20\x4E\x6F\x20\x49\x44\x20\x66\x6F\x72\x20","\x77\x72\x69\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x77\x72\x69\x74\x65\x50\x72\x69\x6D\x69\x74\x69\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x77\x72\x69\x74\x65\x43\x6F\x6D\x70\x6C\x65\x78\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x6F\x6E\x76\x65\x72\x74\x56\x61\x6C\x75\x65\x54\x6F\x58\x6D\x6C","\x6D\x78\x4F\x62\x6A\x65\x63\x74\x43\x6F\x64\x65\x63\x2E\x65\x6E\x63\x6F\x64\x65\x3A\x20\x4E\x6F\x20\x6E\x6F\x64\x65\x20\x66\x6F\x72\x20","\x63\x6F\x6E\x76\x65\x72\x74\x56\x61\x6C\x75\x65\x46\x72\x6F\x6D\x58\x6D\x6C","\x62\x65\x66\x6F\x72\x65\x44\x65\x63\x6F\x64\x65","\x64\x65\x63\x6F\x64\x65\x4E\x6F\x64\x65","\x61\x66\x74\x65\x72\x44\x65\x63\x6F\x64\x65","\x64\x65\x63\x6F\x64\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x63\x6F\x64\x65\x43\x68\x69\x6C\x64\x72\x65\x6E","\x64\x65\x63\x6F\x64\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x6D\x78\x4F\x62\x6A\x65\x63\x74\x43\x6F\x64\x65\x63\x2E\x64\x65\x63\x6F\x64\x65\x3A\x20\x4E\x6F\x20\x6F\x62\x6A\x65\x63\x74\x20\x66\x6F\x72\x20","\x70\x72\x6F\x63\x65\x73\x73\x49\x6E\x63\x6C\x75\x64\x65","\x64\x65\x63\x6F\x64\x65\x43\x68\x69\x6C\x64","\x67\x65\x74\x46\x69\x65\x6C\x64\x54\x65\x6D\x70\x6C\x61\x74\x65","\x61\x64\x64\x4F\x62\x6A\x65\x63\x74\x56\x61\x6C\x75\x65","\x69\x6E\x63\x6C\x75\x64\x65","\x72\x65\x6D\x6F\x76\x65\x57\x68\x69\x74\x65\x73\x70\x61\x63\x65","\x64\x65\x63\x6F\x64\x65\x52\x6F\x6F\x74","\x67\x72\x61\x70\x68\x4C\x69\x73\x74\x65\x6E\x65\x72\x73\x20\x65\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72\x73\x20\x76\x69\x65\x77\x20\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x20\x63\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72\x20\x65\x64\x69\x74\x6F\x72\x20\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x6C\x61\x79\x65\x72","\x67\x65\x74\x53\x74\x72\x69\x6E\x67\x56\x61\x6C\x75\x65","\x6D\x78\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74\x43\x6F\x64\x65\x63\x2E\x64\x65\x63\x6F\x64\x65\x3A\x20\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74\x20","\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x64","\x70\x72\x65\x73\x73\x65\x64\x49\x63\x6F\x6E","\x6D\x6F\x64\x65","\x74\x6F\x67\x67\x6C\x65","\x2D\x2D\x2D","\x63\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x54\x65\x6D\x70\x6C\x61\x74\x65\x20","\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x6D\x6F\x64\x69\x66\x69\x65\x64\x20\x6C\x61\x73\x74\x53\x6E\x61\x70\x73\x68\x6F\x74\x20\x69\x67\x6E\x6F\x72\x65\x64\x43\x68\x61\x6E\x67\x65\x73\x20\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72\x20\x67\x72\x61\x70\x68\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x20\x74\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x41\x72\x72\x61\x79","\x64\x65\x63\x6F\x64\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x73","\x75\x69","\x64\x65\x63\x6F\x64\x65\x55\x69","\x73\x65\x74\x4D\x61\x70\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x72\x65\x73\x6F\x75\x72\x63\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65"];var mxClient={VERSION:_0xd587[0],IS_IE:0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[1]),IS_IE6:0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[4]),IS_QUIRKS:0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[1])&& (null== document[_0xd587[5]]|| 5== document[_0xd587[5]]),VML_PREFIX:_0xd587[6],OFFICE_PREFIX:_0xd587[7],IS_NS:0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[8])&& 0> navigator[_0xd587[3]][_0xd587[2]](_0xd587[1]),IS_OP:0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[9]),IS_OT:0> navigator[_0xd587[3]][_0xd587[2]](_0xd587[10])&& 0> navigator[_0xd587[3]][_0xd587[2]](_0xd587[11])&& 0> navigator[_0xd587[3]][_0xd587[2]](_0xd587[12])&& 0> navigator[_0xd587[3]][_0xd587[2]](_0xd587[13])&& 0> navigator[_0xd587[3]][_0xd587[2]](_0xd587[14])&& 0> navigator[_0xd587[3]][_0xd587[2]](_0xd587[15]),IS_SF:0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[16])&& 0> navigator[_0xd587[3]][_0xd587[2]](_0xd587[17]),IS_GC:0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[17]),IS_MT:0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[18])&& 0> navigator[_0xd587[3]][_0xd587[2]](_0xd587[19])&& 0> navigator[_0xd587[3]][_0xd587[2]](_0xd587[20])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[21])&& 0> navigator[_0xd587[3]][_0xd587[2]](_0xd587[22])&& 0> navigator[_0xd587[3]][_0xd587[2]](_0xd587[23])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[24])&& 0> navigator[_0xd587[3]][_0xd587[2]](_0xd587[25])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[26])&& 0> navigator[_0xd587[3]][_0xd587[2]](_0xd587[27]),IS_SVG:0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[18])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[21])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[28])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[26])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[29])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[30])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[16])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[31])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[9]),NO_FO:0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[19])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[22])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[20])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[23])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[25])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[27])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[32])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[33])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[9])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[1])|| 0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[34]),IS_VML:_0xd587[35]== navigator[_0xd587[37]][_0xd587[36]](),IS_MAC:0< navigator[_0xd587[3]][_0xd587[36]]()[_0xd587[2]](_0xd587[38]),IS_TOUCH:0< navigator[_0xd587[3]][_0xd587[36]]()[_0xd587[2]](_0xd587[39])|| 0< navigator[_0xd587[3]][_0xd587[36]]()[_0xd587[2]](_0xd587[40])|| 0< navigator[_0xd587[3]][_0xd587[36]]()[_0xd587[2]](_0xd587[41])|| 0< navigator[_0xd587[3]][_0xd587[36]]()[_0xd587[2]](_0xd587[42]),IS_LOCAL:0> document[_0xd587[45]][_0xd587[44]][_0xd587[2]](_0xd587[43])&& 0> document[_0xd587[45]][_0xd587[44]][_0xd587[2]](_0xd587[46]),isBrowserSupported:function(){return mxClient[_0xd587[47]]|| mxClient[_0xd587[48]]},link:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x4= _0x5c29x4|| document;if(mxClient[_0xd587[49]]){_0x5c29x4[_0xd587[53]](_0xd587[50]+ _0x5c29x2+ _0xd587[51]+ _0x5c29x3+ _0xd587[52])}else {var _0x5c29x5=_0x5c29x4[_0xd587[55]](_0xd587[54]);_0x5c29x5[_0xd587[57]](_0xd587[56],_0x5c29x2);_0x5c29x5[_0xd587[57]](_0xd587[44],_0x5c29x3);_0x5c29x5[_0xd587[57]](_0xd587[58],_0xd587[59]);_0x5c29x5[_0xd587[57]](_0xd587[60],_0xd587[61]);_0x5c29x4[_0xd587[64]](_0xd587[63])[0][_0xd587[62]](_0x5c29x5)}},include:function(_0x5c29x2){document[_0xd587[53]](_0xd587[65]+ _0x5c29x2+ _0xd587[66])},dispose:function(){for(var _0x5c29x2=0;_0x5c29x2< mxEvent[_0xd587[68]][_0xd587[67]];_0x5c29x2++){null!= mxEvent[_0xd587[68]][_0x5c29x2][_0xd587[69]]&& mxEvent[_0xd587[70]](mxEvent[_0xd587[68]][_0x5c29x2])}}};mxClient[_0xd587[71]]&& mxClient[_0xd587[72]]?mxClient[_0xd587[73]]= _0xd587[74]:mxClient[_0xd587[75]]|| mxClient[_0xd587[76]]?mxClient[_0xd587[73]]= _0xd587[77]:mxClient[_0xd587[78]]?mxClient[_0xd587[73]]= _0xd587[79]:mxClient[_0xd587[80]]&& 9<= document[_0xd587[5]]&& (mxClient[_0xd587[73]]= _0xd587[81]);_0xd587[82]==  typeof mxLoadResources&& (mxLoadResources=  !0);_0xd587[82]==  typeof mxResourceExtension&& (mxResourceExtension= _0xd587[83]);_0xd587[82]==  typeof mxLoadStylesheets&& (mxLoadStylesheets=  !0);_0xd587[82]!=  typeof mxBasePath&& 0< mxBasePath[_0xd587[67]]?(_0xd587[84]== mxBasePath[_0xd587[85]](mxBasePath[_0xd587[67]]- 1)&& (mxBasePath= mxBasePath[_0xd587[85]](0,mxBasePath[_0xd587[67]]- 1)),mxClient[_0xd587[86]]= mxBasePath):mxClient[_0xd587[86]]= _0xd587[87];_0xd587[82]!=  typeof mxImageBasePath&& 0< mxImageBasePath[_0xd587[67]]?(_0xd587[84]== mxImageBasePath[_0xd587[85]](mxImageBasePath[_0xd587[67]]- 1)&& (mxImageBasePath= mxImageBasePath[_0xd587[85]](0,mxImageBasePath[_0xd587[67]]- 1)),mxClient[_0xd587[88]]= mxImageBasePath):mxClient[_0xd587[88]]= mxClient[_0xd587[86]]+ _0xd587[89];mxClient[_0xd587[90]]= _0xd587[82]!=  typeof mxLanguage?mxLanguage:mxClient[_0xd587[80]]?navigator[_0xd587[91]]:navigator[_0xd587[90]];mxClient[_0xd587[92]]= _0xd587[82]!=  typeof mxDefaultLanguage?mxDefaultLanguage:_0xd587[93];mxLoadStylesheets&& mxClient[_0xd587[54]](_0xd587[94],mxClient[_0xd587[86]]+ _0xd587[95]);_0xd587[82]!=  typeof mxLanguages&& (mxClient[_0xd587[96]]= mxLanguages);if(mxClient[_0xd587[80]]){if(9<= document[_0xd587[5]]){mxClient[_0xd587[47]]=  !1,mxClient[_0xd587[48]]=  !0}else {8== document[_0xd587[5]]?(document[_0xd587[100]][_0xd587[99]](mxClient.VML_PREFIX,_0xd587[97],_0xd587[98]),document[_0xd587[100]][_0xd587[99]](mxClient.OFFICE_PREFIX,_0xd587[101],_0xd587[98])):(document[_0xd587[100]][_0xd587[99]](mxClient.VML_PREFIX,_0xd587[97]),document[_0xd587[100]][_0xd587[99]](mxClient.OFFICE_PREFIX,_0xd587[101]));var ss=document[_0xd587[102]]();ss[_0xd587[103]]= _0xd587[104];mxLoadStylesheets&& mxClient[_0xd587[54]](_0xd587[94],mxClient[_0xd587[86]]+ _0xd587[105])};window[_0xd587[108]](_0xd587[106],mxClient[_0xd587[107]])};var mxLog={consoleName:_0xd587[109],TRACE:!1,DEBUG:!0,WARN:!0,buffer:_0xd587[110],init:function(){if(null== mxLog[_0xd587[111]]&& null!= document[_0xd587[112]]){var _0x5c29x2=mxLog[_0xd587[113]]+ _0xd587[114]+ mxClient[_0xd587[115]],_0x5c29x3=document[_0xd587[55]](_0xd587[116]);_0x5c29x3[_0xd587[57]](_0xd587[117],_0xd587[118]);_0x5c29x3[_0xd587[57]](_0xd587[119],_0xd587[118]);var _0x5c29x4=document[_0xd587[55]](_0xd587[120]),_0x5c29x5=document[_0xd587[55]](_0xd587[121]),_0x5c29x9=document[_0xd587[55]](_0xd587[122]);_0x5c29x9[_0xd587[124]][_0xd587[123]]= _0xd587[125];mxLog[_0xd587[126]]= document[_0xd587[55]](_0xd587[126]);mxLog[_0xd587[126]][_0xd587[57]](_0xd587[127],_0xd587[128]);mxLog[_0xd587[126]][_0xd587[124]][_0xd587[119]]= _0xd587[118];mxLog[_0xd587[126]][_0xd587[124]][_0xd587[129]]= _0xd587[130];mxLog[_0xd587[126]][_0xd587[131]]= mxLog[_0xd587[132]];mxLog[_0xd587[126]][_0xd587[124]][_0xd587[117]]= mxClient[_0xd587[133]]&& _0xd587[134]!= document[_0xd587[135]]?_0xd587[136]:_0xd587[118];_0x5c29x9[_0xd587[62]](mxLog[_0xd587[126]]);_0x5c29x5[_0xd587[62]](_0x5c29x9);_0x5c29x4[_0xd587[62]](_0x5c29x5);_0x5c29x5= document[_0xd587[55]](_0xd587[121]);mxLog[_0xd587[122]]= document[_0xd587[55]](_0xd587[122]);mxLog[_0xd587[122]][_0xd587[124]][_0xd587[123]]= _0xd587[125];mxLog[_0xd587[122]][_0xd587[57]](_0xd587[119],_0xd587[137]);_0x5c29x5[_0xd587[62]](mxLog[_0xd587[122]]);_0x5c29x4[_0xd587[62]](_0x5c29x5);_0x5c29x3[_0xd587[62]](_0x5c29x4);mxLog[_0xd587[140]](_0xd587[138],function(_0x5c29x2){mxLog[_0xd587[139]]()});mxLog[_0xd587[140]](_0xd587[141],function(_0x5c29x2){_0x5c29x2= mxUtils[_0xd587[142]](document[_0xd587[112]]);mxLog[_0xd587[143]](_0x5c29x2)});mxLog[_0xd587[140]](_0xd587[144],function(_0x5c29x2){mxLog[_0xd587[145]]= !mxLog[_0xd587[145]];mxLog[_0xd587[145]]?mxLog[_0xd587[143]](_0xd587[146]):mxLog[_0xd587[143]](_0xd587[147])});mxLog[_0xd587[140]](_0xd587[148],function(_0x5c29x2){try{mxUtils[_0xd587[149]](mxLog[_0xd587[126]][_0xd587[131]])}catch(_0x5c29x3){mxUtils[_0xd587[150]](_0x5c29x3)}});mxLog[_0xd587[140]](_0xd587[151],function(_0x5c29x2){try{mxUtils[_0xd587[152]](mxLog[_0xd587[126]][_0xd587[131]])}catch(_0x5c29x3){mxUtils[_0xd587[150]](_0x5c29x3)}});mxLog[_0xd587[140]](_0xd587[153],function(_0x5c29x2){mxLog[_0xd587[126]][_0xd587[131]]= _0xd587[110]});_0x5c29x5= _0x5c29x4= 0;_0xd587[154]===  typeof window[_0xd587[155]]?(_0x5c29x4= window[_0xd587[156]],_0x5c29x5= window[_0xd587[155]]):(_0x5c29x4= document[_0xd587[158]][_0xd587[157]]|| document[_0xd587[112]][_0xd587[157]],_0x5c29x5= document[_0xd587[112]][_0xd587[159]]);mxLog[_0xd587[111]]=  new mxWindow(_0x5c29x2,_0x5c29x3,Math[_0xd587[160]](0,_0x5c29x5- 320),Math[_0xd587[160]](0,_0x5c29x4- 210),300,160);mxLog[_0xd587[111]][_0xd587[161]](!0);mxLog[_0xd587[111]][_0xd587[162]](!1);mxLog[_0xd587[111]][_0xd587[163]](!0);mxLog[_0xd587[111]][_0xd587[164]](!0);mxLog[_0xd587[111]][_0xd587[165]]=  !1;if((mxClient[_0xd587[133]]|| mxClient[_0xd587[80]])&& !mxClient[_0xd587[76]]&& !mxClient[_0xd587[75]]&& _0xd587[134]!= document[_0xd587[135]]){var _0x5c29xa=mxLog[_0xd587[111]][_0xd587[166]](),_0x5c29x2=function(_0x5c29x2,_0x5c29x3){mxLog[_0xd587[126]][_0xd587[124]][_0xd587[119]]= Math[_0xd587[160]](0,_0x5c29xa[_0xd587[167]]- 70)+ _0xd587[168]};mxLog[_0xd587[111]][_0xd587[169]](mxEvent.RESIZE_END,_0x5c29x2);mxLog[_0xd587[111]][_0xd587[169]](mxEvent.MAXIMIZE,_0x5c29x2);mxLog[_0xd587[111]][_0xd587[169]](mxEvent.NORMALIZE,_0x5c29x2);mxLog[_0xd587[126]][_0xd587[124]][_0xd587[119]]= _0xd587[170]}}},info:function(){mxLog[_0xd587[171]](mxUtils.toString(navigator))},addButton:function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=document[_0xd587[55]](_0xd587[172]);mxUtils[_0xd587[53]](_0x5c29x4,_0x5c29x2);mxEvent[_0xd587[169]](_0x5c29x4,_0xd587[173],_0x5c29x3);mxLog[_0xd587[122]][_0xd587[62]](_0x5c29x4)},isVisible:function(){return null!= mxLog[_0xd587[111]]?mxLog[_0xd587[111]][_0xd587[174]]():!1},show:function(){mxLog[_0xd587[175]](!0)},setVisible:function(_0x5c29x2){null== mxLog[_0xd587[111]]&& mxLog[_0xd587[176]]();null!= mxLog[_0xd587[111]]&& mxLog[_0xd587[111]][_0xd587[175]](_0x5c29x2)},enter:function(_0x5c29x2){if(mxLog[_0xd587[145]]){return mxLog[_0xd587[171]](_0xd587[177]+ _0x5c29x2),( new Date)[_0xd587[178]]()}},leave:function(_0x5c29x2,_0x5c29x3){if(mxLog[_0xd587[145]]){var _0x5c29x4=0!= _0x5c29x3?_0xd587[179]+ (( new Date)[_0xd587[178]]()- _0x5c29x3)+ _0xd587[180]:_0xd587[110];mxLog[_0xd587[171]](_0xd587[181]+ _0x5c29x2+ _0x5c29x4)}},debug:function(){mxLog[_0xd587[182]]&& mxLog[_0xd587[171]][_0xd587[183]](this,arguments)},warn:function(){mxLog[_0xd587[184]]&& mxLog[_0xd587[171]][_0xd587[183]](this,arguments)},write:function(){for(var _0x5c29x2=_0xd587[110],_0x5c29x3=0;_0x5c29x3< arguments[_0xd587[67]];_0x5c29x3++){_0x5c29x2+= arguments[_0x5c29x3],_0x5c29x3< arguments[_0xd587[67]]- 1&& (_0x5c29x2+= _0xd587[185])};null!= mxLog[_0xd587[126]]?(mxLog[_0xd587[126]][_0xd587[131]]+= _0x5c29x2,0<= navigator[_0xd587[3]][_0xd587[2]](_0xd587[186])&& (mxLog[_0xd587[126]][_0xd587[124]][_0xd587[187]]= _0xd587[188],mxLog[_0xd587[126]][_0xd587[124]][_0xd587[187]]= _0xd587[189]),mxLog[_0xd587[126]][_0xd587[190]]= mxLog[_0xd587[126]][_0xd587[191]]):mxLog[_0xd587[132]]+= _0x5c29x2},writeln:function(){for(var _0x5c29x2=_0xd587[110],_0x5c29x3=0;_0x5c29x3< arguments[_0xd587[67]];_0x5c29x3++){_0x5c29x2+= arguments[_0x5c29x3],_0x5c29x3< arguments[_0xd587[67]]- 1&& (_0x5c29x2+= _0xd587[185])};mxLog[_0xd587[53]](_0x5c29x2+ _0xd587[192])}},mxObjectIdentity={FIELD_NAME:_0xd587[193],counter:0,get:function(_0x5c29x2){if(_0xd587[194]==  typeof _0x5c29x2&& null== _0x5c29x2[mxObjectIdentity[_0xd587[195]]]){var _0x5c29x3=mxUtils[_0xd587[197]](_0x5c29x2[_0xd587[196]]);_0x5c29x2[mxObjectIdentity[_0xd587[195]]]= _0x5c29x3+ _0xd587[198]+ mxObjectIdentity[_0xd587[199]]++};return _0x5c29x2[mxObjectIdentity[_0xd587[195]]]},clear:function(_0x5c29x2){_0xd587[194]==  typeof _0x5c29x2&&  delete _0x5c29x2[mxObjectIdentity[_0xd587[195]]]}};function mxDictionary(){this[_0xd587[200]]()}mxDictionary[_0xd587[202]][_0xd587[201]]= null;mxDictionary[_0xd587[202]][_0xd587[200]]= function(){this[_0xd587[201]]= {}};mxDictionary[_0xd587[202]][_0xd587[203]]= function(_0x5c29x2){_0x5c29x2= mxObjectIdentity[_0xd587[203]](_0x5c29x2);return this[_0xd587[201]][_0x5c29x2]};mxDictionary[_0xd587[202]][_0xd587[204]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=mxObjectIdentity[_0xd587[203]](_0x5c29x2),_0x5c29x5=this[_0xd587[201]][_0x5c29x4];this[_0xd587[201]][_0x5c29x4]= _0x5c29x3;return _0x5c29x5};mxDictionary[_0xd587[202]][_0xd587[205]]= function(_0x5c29x2){_0x5c29x2= mxObjectIdentity[_0xd587[203]](_0x5c29x2);var _0x5c29x3=this[_0xd587[201]][_0x5c29x2];delete this[_0xd587[201]][_0x5c29x2];return _0x5c29x3};mxDictionary[_0xd587[202]][_0xd587[206]]= function(){var _0x5c29x2=[],_0x5c29x3;for(_0x5c29x3 in this[_0xd587[201]]){_0x5c29x2[_0xd587[207]](_0x5c29x3)};return _0x5c29x2};mxDictionary[_0xd587[202]][_0xd587[208]]= function(){var _0x5c29x2=[],_0x5c29x3;for(_0x5c29x3 in this[_0xd587[201]]){_0x5c29x2[_0xd587[207]](this[_0xd587[201]][_0x5c29x3])};return _0x5c29x2};mxDictionary[_0xd587[202]][_0xd587[209]]= function(_0x5c29x2){for(var _0x5c29x3 in this[_0xd587[201]]){_0x5c29x2(_0x5c29x3,this[_0xd587[201]][_0x5c29x3])}};var mxResources={resources:[],extension:mxResourceExtension,resourcesEncoded:!1,loadDefaultBundle:!0,loadSpecialBundle:!0,isLanguageSupported:function(_0x5c29x2){return null!= mxClient[_0xd587[96]]?0<= mxUtils[_0xd587[2]](mxClient[_0xd587[96]],_0x5c29x2):!0},getDefaultBundle:function(_0x5c29x2,_0x5c29x3){return mxResources[_0xd587[210]]|| !mxResources[_0xd587[211]](_0x5c29x3)?_0x5c29x2+ mxResources[_0xd587[212]]:null},getSpecialBundle:function(_0x5c29x2,_0x5c29x3){if(null== mxClient[_0xd587[96]]|| !this[_0xd587[211]](_0x5c29x3)){var _0x5c29x4=_0x5c29x3[_0xd587[2]](_0xd587[213]);0< _0x5c29x4&& (_0x5c29x3= _0x5c29x3[_0xd587[85]](0,_0x5c29x4))};return mxResources[_0xd587[214]]&& mxResources[_0xd587[211]](_0x5c29x3)&& _0x5c29x3!= mxClient[_0xd587[92]]?_0x5c29x2+ _0xd587[215]+ _0x5c29x3+ mxResources[_0xd587[212]]:null},add:function(_0x5c29x2,_0x5c29x3){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:mxClient[_0xd587[90]][_0xd587[216]]();if(_0x5c29x3!= mxConstants[_0xd587[217]]){var _0x5c29x4=mxResources[_0xd587[218]](_0x5c29x2,_0x5c29x3);if(null!= _0x5c29x4){try{var _0x5c29x5=mxUtils[_0xd587[219]](_0x5c29x4);_0x5c29x5[_0xd587[220]]()&& mxResources[_0xd587[222]](_0x5c29x5[_0xd587[221]]())}catch(e){}};_0x5c29x4= mxResources[_0xd587[223]](_0x5c29x2,_0x5c29x3);if(null!= _0x5c29x4){try{_0x5c29x5= mxUtils[_0xd587[219]](_0x5c29x4),_0x5c29x5[_0xd587[220]]()&& mxResources[_0xd587[222]](_0x5c29x5[_0xd587[221]]())}catch(f){}}}},parse:function(_0x5c29x2){if(null!= _0x5c29x2){_0x5c29x2= _0x5c29x2[_0xd587[224]](_0xd587[192]);for(var _0x5c29x3=0;_0x5c29x3< _0x5c29x2[_0xd587[67]];_0x5c29x3++){if(_0xd587[198]!= _0x5c29x2[_0x5c29x3][_0xd587[225]](0)){var _0x5c29x4=_0x5c29x2[_0x5c29x3][_0xd587[2]](_0xd587[226]);if(0< _0x5c29x4){var _0x5c29x5=_0x5c29x2[_0x5c29x3][_0xd587[85]](0,_0x5c29x4),_0x5c29x9=_0x5c29x2[_0x5c29x3][_0xd587[67]];13== _0x5c29x2[_0x5c29x3][_0xd587[227]](_0x5c29x9- 1)&& _0x5c29x9--;_0x5c29x4= _0x5c29x2[_0x5c29x3][_0xd587[85]](_0x5c29x4+ 1,_0x5c29x9);this[_0xd587[228]]?(_0x5c29x4= _0x5c29x4[_0xd587[230]](/\\(?=u[a-fA-F\d]{4})/g,_0xd587[229]),mxResources[_0xd587[231]][_0x5c29x5]= unescape(_0x5c29x4)):mxResources[_0xd587[231]][_0x5c29x5]= _0x5c29x4}}}}},get:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x2= mxResources[_0xd587[231]][_0x5c29x2];null== _0x5c29x2&& (_0x5c29x2= _0x5c29x4);if(null!= _0x5c29x2&& null!= _0x5c29x3){_0x5c29x4= [];for(var _0x5c29x5=null,_0x5c29x9=0;_0x5c29x9< _0x5c29x2[_0xd587[67]];_0x5c29x9++){var _0x5c29xa=_0x5c29x2[_0xd587[225]](_0x5c29x9);_0xd587[232]== _0x5c29xa?_0x5c29x5= _0xd587[110]:null!= _0x5c29x5&& _0xd587[233]== _0x5c29xa?(_0x5c29x5= parseInt(_0x5c29x5)- 1,0<= _0x5c29x5&& _0x5c29x5< _0x5c29x3[_0xd587[67]]&& _0x5c29x4[_0xd587[207]](_0x5c29x3[_0x5c29x5]),_0x5c29x5= null):null!= _0x5c29x5?_0x5c29x5+= _0x5c29xa:_0x5c29x4[_0xd587[207]](_0x5c29xa)};_0x5c29x2= _0x5c29x4[_0xd587[234]](_0xd587[110])};return _0x5c29x2}};function mxPoint(_0x5c29x2,_0x5c29x3){this[_0xd587[235]]= null!= _0x5c29x2?_0x5c29x2:0;this[_0xd587[236]]= null!= _0x5c29x3?_0x5c29x3:0}mxPoint[_0xd587[202]][_0xd587[235]]= null;mxPoint[_0xd587[202]][_0xd587[236]]= null;mxPoint[_0xd587[202]][_0xd587[237]]= function(_0x5c29x2){return _0x5c29x2[_0xd587[235]]== this[_0xd587[235]]&& _0x5c29x2[_0xd587[236]]== this[_0xd587[236]]};mxPoint[_0xd587[202]][_0xd587[238]]= function(){return mxUtils[_0xd587[238]](this)};function mxRectangle(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){mxPoint[_0xd587[239]](this,_0x5c29x2,_0x5c29x3);this[_0xd587[117]]= null!= _0x5c29x4?_0x5c29x4:0;this[_0xd587[119]]= null!= _0x5c29x5?_0x5c29x5:0}mxRectangle[_0xd587[202]]=  new mxPoint;mxRectangle[_0xd587[202]][_0xd587[196]]= mxRectangle;mxRectangle[_0xd587[202]][_0xd587[117]]= null;mxRectangle[_0xd587[202]][_0xd587[119]]= null;mxRectangle[_0xd587[202]][_0xd587[240]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){this[_0xd587[235]]= _0x5c29x2;this[_0xd587[236]]= _0x5c29x3;this[_0xd587[117]]= _0x5c29x4;this[_0xd587[119]]= _0x5c29x5};mxRectangle[_0xd587[202]][_0xd587[241]]= function(){return this[_0xd587[235]]+ this[_0xd587[117]]/ 2};mxRectangle[_0xd587[202]][_0xd587[242]]= function(){return this[_0xd587[236]]+ this[_0xd587[119]]/ 2};mxRectangle[_0xd587[202]][_0xd587[99]]= function(_0x5c29x2){if(null!= _0x5c29x2){var _0x5c29x3=Math[_0xd587[243]](this[_0xd587[235]],_0x5c29x2[_0xd587[235]]),_0x5c29x4=Math[_0xd587[243]](this[_0xd587[236]],_0x5c29x2[_0xd587[236]]),_0x5c29x5=Math[_0xd587[160]](this[_0xd587[235]]+ this[_0xd587[117]],_0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]]);_0x5c29x2= Math[_0xd587[160]](this[_0xd587[236]]+ this[_0xd587[119]],_0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]]);this[_0xd587[235]]= _0x5c29x3;this[_0xd587[236]]= _0x5c29x4;this[_0xd587[117]]= _0x5c29x5- _0x5c29x3;this[_0xd587[119]]= _0x5c29x2- _0x5c29x4}};mxRectangle[_0xd587[202]][_0xd587[244]]= function(_0x5c29x2){this[_0xd587[235]]-= _0x5c29x2;this[_0xd587[236]]-= _0x5c29x2;this[_0xd587[117]]+= 2* _0x5c29x2;this[_0xd587[119]]+= 2* _0x5c29x2};mxRectangle[_0xd587[202]][_0xd587[245]]= function(){return  new mxPoint(this[_0xd587[235]],this[_0xd587[236]])};mxRectangle[_0xd587[202]][_0xd587[237]]= function(_0x5c29x2){return _0x5c29x2[_0xd587[235]]== this[_0xd587[235]]&& _0x5c29x2[_0xd587[236]]== this[_0xd587[236]]&& _0x5c29x2[_0xd587[117]]== this[_0xd587[117]]&& _0x5c29x2[_0xd587[119]]== this[_0xd587[119]]};var mxEffects={animateChanges:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=0,_0x5c29x9=function(){for(var _0x5c29x12=!1,_0x5c29x13=0;_0x5c29x13< _0x5c29x3[_0xd587[67]];_0x5c29x13++){var _0x5c29x14=_0x5c29x3[_0x5c29x13];if(_0x5c29x14 instanceof  mxGeometryChange|| _0x5c29x14 instanceof  mxTerminalChange|| _0x5c29x14 instanceof  mxValueChange|| _0x5c29x14 instanceof  mxChildChange|| _0x5c29x14 instanceof  mxStyleChange){var _0x5c29x15=_0x5c29x2[_0xd587[249]]()[_0xd587[248]](_0x5c29x14[_0xd587[246]]|| _0x5c29x14[_0xd587[247]],!1);if(null!= _0x5c29x15){if(_0x5c29x12=  !0,_0x5c29x14[_0xd587[196]]!= mxGeometryChange|| _0x5c29x2[_0xd587[251]][_0xd587[250]](_0x5c29x14[_0xd587[246]])){mxUtils[_0xd587[254]](_0x5c29x15[_0xd587[253]][_0xd587[252]],100* _0x5c29x5/ 10)}else {var _0x5c29x16=_0x5c29x2[_0xd587[249]]()[_0xd587[255]],_0x5c29x17=(_0x5c29x14[_0xd587[256]][_0xd587[235]]- _0x5c29x14[_0xd587[257]][_0xd587[235]])* _0x5c29x16,_0x5c29x18=(_0x5c29x14[_0xd587[256]][_0xd587[236]]- _0x5c29x14[_0xd587[257]][_0xd587[236]])* _0x5c29x16,_0x5c29x19=(_0x5c29x14[_0xd587[256]][_0xd587[117]]- _0x5c29x14[_0xd587[257]][_0xd587[117]])* _0x5c29x16,_0x5c29x16=(_0x5c29x14[_0xd587[256]][_0xd587[119]]- _0x5c29x14[_0xd587[257]][_0xd587[119]])* _0x5c29x16;0== _0x5c29x5?(_0x5c29x15[_0xd587[235]]-= _0x5c29x17,_0x5c29x15[_0xd587[236]]-= _0x5c29x18,_0x5c29x15[_0xd587[117]]-= _0x5c29x19,_0x5c29x15[_0xd587[119]]-= _0x5c29x16):(_0x5c29x15[_0xd587[235]]+= _0x5c29x17/ 10,_0x5c29x15[_0xd587[236]]+= _0x5c29x18/ 10,_0x5c29x15[_0xd587[117]]+= _0x5c29x19/ 10,_0x5c29x15[_0xd587[119]]+= _0x5c29x16/ 10);_0x5c29x2[_0xd587[259]][_0xd587[258]](_0x5c29x15);mxEffects[_0xd587[260]](_0x5c29x2,_0x5c29x14[_0xd587[246]],100* _0x5c29x5/ 10)}}}};10> _0x5c29x5&& _0x5c29x12?(_0x5c29x5++,window[_0xd587[261]](_0x5c29x9,_0x5c29xa)):null!= _0x5c29x4&& _0x5c29x4()},_0x5c29xa=30;_0x5c29x9()},cascadeOpacity:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){for(var _0x5c29x5=_0x5c29x2[_0xd587[251]][_0xd587[262]](_0x5c29x3),_0x5c29x9=0;_0x5c29x9< _0x5c29x5;_0x5c29x9++){var _0x5c29xa=_0x5c29x2[_0xd587[251]][_0xd587[263]](_0x5c29x3,_0x5c29x9),_0x5c29x12=_0x5c29x2[_0xd587[249]]()[_0xd587[248]](_0x5c29xa);null!= _0x5c29x12&& (mxUtils[_0xd587[254]](_0x5c29x12[_0xd587[253]][_0xd587[252]],_0x5c29x4),mxEffects[_0xd587[260]](_0x5c29x2,_0x5c29xa,_0x5c29x4))};_0x5c29x3= _0x5c29x2[_0xd587[251]][_0xd587[264]](_0x5c29x3);if(null!= _0x5c29x3){for(_0x5c29x9= 0;_0x5c29x9< _0x5c29x3[_0xd587[67]];_0x5c29x9++){_0x5c29x5= _0x5c29x2[_0xd587[249]]()[_0xd587[248]](_0x5c29x3[_0x5c29x9]),null!= _0x5c29x5&& mxUtils[_0xd587[254]](_0x5c29x5[_0xd587[253]][_0xd587[252]],_0x5c29x4)}}},fadeOut:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){_0x5c29x5= _0x5c29x5|| 40;_0x5c29x9= _0x5c29x9|| 30;var _0x5c29x12=_0x5c29x3|| 100;mxUtils[_0xd587[254]](_0x5c29x2,_0x5c29x12);if(_0x5c29xa|| null== _0x5c29xa){var _0x5c29x13=function(){_0x5c29x12= Math[_0xd587[160]](_0x5c29x12- _0x5c29x5,0);mxUtils[_0xd587[254]](_0x5c29x2,_0x5c29x12);0< _0x5c29x12?window[_0xd587[261]](_0x5c29x13,_0x5c29x9):(_0x5c29x2[_0xd587[124]][_0xd587[187]]= _0xd587[188],_0x5c29x4&& _0x5c29x2[_0xd587[265]]&& _0x5c29x2[_0xd587[265]][_0xd587[266]](_0x5c29x2))};window[_0xd587[261]](_0x5c29x13,_0x5c29x9)}else {_0x5c29x2[_0xd587[124]][_0xd587[187]]= _0xd587[188],_0x5c29x4&& _0x5c29x2[_0xd587[265]]&& _0x5c29x2[_0xd587[265]][_0xd587[266]](_0x5c29x2)}}},mxUtils={errorResource:_0xd587[130]!= mxClient[_0xd587[90]]?_0xd587[267]:_0xd587[110],closeResource:_0xd587[130]!= mxClient[_0xd587[90]]?_0xd587[268]:_0xd587[110],errorImage:mxClient[_0xd587[88]]+ _0xd587[269],removeCursors:function(_0x5c29x2){null!= _0x5c29x2[_0xd587[124]]&& (_0x5c29x2[_0xd587[124]][_0xd587[270]]= _0xd587[110]);_0x5c29x2= _0x5c29x2[_0xd587[271]];if(null!= _0x5c29x2){for(var _0x5c29x3=_0x5c29x2[_0xd587[67]],_0x5c29x4=0;_0x5c29x4< _0x5c29x3;_0x5c29x4+= 1){mxUtils[_0xd587[272]](_0x5c29x2[_0x5c29x4])}}},getCurrentStyle:function(){return mxClient[_0xd587[80]]?function(_0x5c29x2){return null!= _0x5c29x2?_0x5c29x2[_0xd587[273]]:null}:function(_0x5c29x2){return null!= _0x5c29x2?window[_0xd587[274]](_0x5c29x2,_0xd587[110]):null}}(),hasScrollbars:function(_0x5c29x2){_0x5c29x2= mxUtils[_0xd587[275]](_0x5c29x2);return null!= _0x5c29x2&& (_0xd587[276]== _0x5c29x2[_0xd587[277]]|| _0xd587[278]== _0x5c29x2[_0xd587[277]])},bind:function(_0x5c29x2,_0x5c29x3){return function(){return _0x5c29x3[_0xd587[183]](_0x5c29x2,arguments)}},eval:function(_0x5c29x2){var _0x5c29x3=null;if(0<= _0x5c29x2[_0xd587[2]](_0xd587[279])){try{eval(_0xd587[280]+ _0x5c29x2),_0x5c29x3= _mxJavaScriptExpression,_mxJavaScriptExpression= null}catch(c){mxLog[_0xd587[283]](c[_0xd587[281]]+ _0xd587[282]+ _0x5c29x2)}}else {try{_0x5c29x3= eval(_0x5c29x2)}catch(d){mxLog[_0xd587[283]](d[_0xd587[281]]+ _0xd587[282]+ _0x5c29x2)}};return _0x5c29x3},findNode:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=_0x5c29x2[_0xd587[284]](_0x5c29x3);if(null!= _0x5c29x5&& _0x5c29x5== _0x5c29x4){return _0x5c29x2};for(_0x5c29x2= _0x5c29x2[_0xd587[285]];null!= _0x5c29x2;){_0x5c29x5= mxUtils[_0xd587[286]](_0x5c29x2,_0x5c29x3,_0x5c29x4);if(null!= _0x5c29x5){return _0x5c29x5};_0x5c29x2= _0x5c29x2[_0xd587[287]]};return null},findNodeByAttribute:function(){return 9<= document[_0xd587[5]]?function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=null;if(null!= _0x5c29x2){if(_0x5c29x2[_0xd587[288]]== mxConstants[_0xd587[289]]&& _0x5c29x2[_0xd587[284]](_0x5c29x3)== _0x5c29x4){_0x5c29x5= _0x5c29x2}else {for(_0x5c29x2= _0x5c29x2[_0xd587[285]];null!= _0x5c29x2&& null== _0x5c29x5;){_0x5c29x5= mxUtils[_0xd587[290]](_0x5c29x2,_0x5c29x3,_0x5c29x4),_0x5c29x2= _0x5c29x2[_0xd587[287]]}}};return _0x5c29x5}:mxClient[_0xd587[80]]?function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return null== _0x5c29x2?null:_0x5c29x2[_0xd587[295]][_0xd587[294]](_0xd587[291]+ _0x5c29x3+ _0xd587[292]+ _0x5c29x4+ _0xd587[293])}:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return null== _0x5c29x2?null:_0x5c29x2[_0xd587[295]][_0xd587[297]](_0xd587[291]+ _0x5c29x3+ _0xd587[292]+ _0x5c29x4+ _0xd587[293],_0x5c29x2[_0xd587[295]],null,XPathResult.ANY_TYPE,null)[_0xd587[296]]()}}(),getFunctionName:function(_0x5c29x2){var _0x5c29x3=null;if(null!= _0x5c29x2){if(null!= _0x5c29x2[_0xd587[298]]){_0x5c29x3= _0x5c29x2[_0xd587[298]]}else {_0x5c29x2= _0x5c29x2.toString();for(_0x5c29x3= 9;_0xd587[185]== _0x5c29x2[_0xd587[225]](_0x5c29x3);){_0x5c29x3++};var _0x5c29x4=_0x5c29x2[_0xd587[2]](_0xd587[299],_0x5c29x3),_0x5c29x3=_0x5c29x2[_0xd587[85]](_0x5c29x3,_0x5c29x4)}};return _0x5c29x3},indexOf:function(_0x5c29x2,_0x5c29x3){if(null!= _0x5c29x2&& null!= _0x5c29x3){for(var _0x5c29x4=0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){if(_0x5c29x2[_0x5c29x4]== _0x5c29x3){return _0x5c29x4}}};return -1},remove:function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=null;if(_0xd587[194]==  typeof _0x5c29x3){for(var _0x5c29x5=mxUtils[_0xd587[2]](_0x5c29x3,_0x5c29x2);0<= _0x5c29x5;){_0x5c29x3[_0xd587[300]](_0x5c29x5,1),_0x5c29x4= _0x5c29x2,_0x5c29x5= mxUtils[_0xd587[2]](_0x5c29x3,_0x5c29x2)}};for(var _0x5c29x9 in _0x5c29x3){_0x5c29x3[_0x5c29x9]== _0x5c29x2&& ( delete _0x5c29x3[_0x5c29x9],_0x5c29x4= _0x5c29x2)};return _0x5c29x4},isNode:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){return null!= _0x5c29x2&& !isNaN(_0x5c29x2[_0xd587[288]])&& (null== _0x5c29x3|| _0x5c29x2[_0xd587[301]][_0xd587[216]]()== _0x5c29x3[_0xd587[216]]())?null== _0x5c29x4|| _0x5c29x2[_0xd587[284]](_0x5c29x4)== _0x5c29x5:!1},getChildNodes:function(_0x5c29x2,_0x5c29x3){_0x5c29x3= _0x5c29x3|| mxConstants[_0xd587[289]];for(var _0x5c29x4=[],_0x5c29x5=_0x5c29x2[_0xd587[285]];null!= _0x5c29x5;){_0x5c29x5[_0xd587[288]]== _0x5c29x3&& _0x5c29x4[_0xd587[207]](_0x5c29x5),_0x5c29x5= _0x5c29x5[_0xd587[287]]};return _0x5c29x4},createXmlDocument:function(){var _0x5c29x2=null;document[_0xd587[302]]&& document[_0xd587[302]][_0xd587[303]]?_0x5c29x2= document[_0xd587[302]][_0xd587[303]](_0xd587[110],_0xd587[110],null):window[_0xd587[304]]&& (_0x5c29x2=  new ActiveXObject(_0xd587[305]));return _0x5c29x2},parseXml:function(){return mxClient[_0xd587[80]]&& (_0xd587[82]===  typeof document[_0xd587[5]]|| 9> document[_0xd587[5]])?function(_0x5c29x2){var _0x5c29x3=mxUtils[_0xd587[306]]();_0x5c29x3[_0xd587[307]]= _0xd587[308];_0x5c29x3[_0xd587[309]](_0x5c29x2);return _0x5c29x3}:function(_0x5c29x2){return ( new DOMParser)[_0xd587[311]](_0x5c29x2,_0xd587[310])}}(),clearSelection:function(){if(document[_0xd587[312]]){return function(){document[_0xd587[312]][_0xd587[313]]()}};if(window[_0xd587[314]]){return function(){window[_0xd587[314]]()[_0xd587[315]]()}}}(),getPrettyXml:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=[];if(null!= _0x5c29x2){if(_0x5c29x3= _0x5c29x3|| _0xd587[316],_0x5c29x4= _0x5c29x4|| _0xd587[110],_0x5c29x2[_0xd587[288]]== mxConstants[_0xd587[317]]){_0x5c29x5[_0xd587[207]](_0x5c29x2[_0xd587[318]])}else {_0x5c29x5[_0xd587[207]](_0x5c29x4+ _0xd587[319]+ _0x5c29x2[_0xd587[301]]);var _0x5c29x9=_0x5c29x2[_0xd587[320]];if(null!= _0x5c29x9){for(var _0x5c29xa=0;_0x5c29xa< _0x5c29x9[_0xd587[67]];_0x5c29xa++){var _0x5c29x12=mxUtils[_0xd587[321]](_0x5c29x9[_0x5c29xa][_0xd587[318]]);_0x5c29x5[_0xd587[207]](_0xd587[185]+ _0x5c29x9[_0x5c29xa][_0xd587[301]]+ _0xd587[322]+ _0x5c29x12+ _0xd587[323])}};_0x5c29x9= _0x5c29x2[_0xd587[285]];if(null!= _0x5c29x9){for(_0x5c29x5[_0xd587[207]](_0xd587[324]);null!= _0x5c29x9;){_0x5c29x5[_0xd587[207]](mxUtils[_0xd587[325]](_0x5c29x9,_0x5c29x3,_0x5c29x4+ _0x5c29x3)),_0x5c29x9= _0x5c29x9[_0xd587[287]]};_0x5c29x5[_0xd587[207]](_0x5c29x4+ _0xd587[326]+ _0x5c29x2[_0xd587[301]]+ _0xd587[324])}else {_0x5c29x5[_0xd587[207]](_0xd587[327])}}};return _0x5c29x5[_0xd587[234]](_0xd587[110])},removeWhitespace:function(_0x5c29x2,_0x5c29x3){for(var _0x5c29x4=_0x5c29x3?_0x5c29x2[_0xd587[328]]:_0x5c29x2[_0xd587[287]];null!= _0x5c29x4&& _0x5c29x4[_0xd587[288]]== mxConstants[_0xd587[317]];){var _0x5c29x5=_0x5c29x3?_0x5c29x4[_0xd587[328]]:_0x5c29x4[_0xd587[287]],_0x5c29x9=mxUtils[_0xd587[329]](_0x5c29x4);0== mxUtils[_0xd587[330]](_0x5c29x9)[_0xd587[67]]&& _0x5c29x4[_0xd587[265]][_0xd587[266]](_0x5c29x4);_0x5c29x4= _0x5c29x5}},htmlEntities:function(_0x5c29x2,_0x5c29x3){_0x5c29x2= (_0x5c29x2|| _0xd587[110])[_0xd587[230]](/&/g,_0xd587[331]);_0x5c29x2= _0x5c29x2[_0xd587[230]](/"/g,_0xd587[332]);_0x5c29x2= _0x5c29x2[_0xd587[230]](/\'/g,_0xd587[333]);_0x5c29x2= _0x5c29x2[_0xd587[230]](/</g,_0xd587[334]);_0x5c29x2= _0x5c29x2[_0xd587[230]](/>/g,_0xd587[335]);if(null== _0x5c29x3|| _0x5c29x3){_0x5c29x2= _0x5c29x2[_0xd587[230]](/\n/g,_0xd587[336])};return _0x5c29x2},isVml:function(_0x5c29x2){return null!= _0x5c29x2&& _0xd587[97]== _0x5c29x2[_0xd587[337]]},getXml:function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=_0xd587[110];null!= _0x5c29x2&& (_0x5c29x4= _0x5c29x2[_0xd587[338]],_0x5c29x4= null== _0x5c29x4?_0x5c29x2[_0xd587[339]]?_0x5c29x2[_0xd587[339]]:( new XMLSerializer)[_0xd587[340]](_0x5c29x2):_0x5c29x4[_0xd587[230]](/\r\n\t[\t]*/g,_0xd587[110])[_0xd587[230]](/>\r\n/g,_0xd587[341])[_0xd587[230]](/\r\n/g,_0xd587[192]));return _0x5c29x4= _0x5c29x4[_0xd587[230]](/\n/g,_0x5c29x3|| _0xd587[336])},getTextContent:function(_0x5c29x2){var _0x5c29x3=_0xd587[110];null!= _0x5c29x2&& (null!= _0x5c29x2[_0xd587[285]]&& (_0x5c29x2= _0x5c29x2[_0xd587[285]]),_0x5c29x3= _0x5c29x2[_0xd587[318]]|| _0xd587[110]);return _0x5c29x3},getInnerHtml:function(){return mxClient[_0xd587[80]]?function(_0x5c29x2){return null!= _0x5c29x2?_0x5c29x2[_0xd587[339]]:_0xd587[110]}:function(_0x5c29x2){return null!= _0x5c29x2?( new XMLSerializer)[_0xd587[340]](_0x5c29x2):_0xd587[110]}}(),getOuterHtml:function(){return mxClient[_0xd587[80]]?function(_0x5c29x2){if(null!= _0x5c29x2){if(null!= _0x5c29x2[_0xd587[342]]){return _0x5c29x2[_0xd587[342]]};var _0x5c29x3=[];_0x5c29x3[_0xd587[207]](_0xd587[319]+ _0x5c29x2[_0xd587[301]]);var _0x5c29x4=_0x5c29x2[_0xd587[320]];if(null!= _0x5c29x4){for(var _0x5c29x5=0;_0x5c29x5< _0x5c29x4[_0xd587[67]];_0x5c29x5++){var _0x5c29x9=_0x5c29x4[_0x5c29x5][_0xd587[318]];null!= _0x5c29x9&& 0< _0x5c29x9[_0xd587[67]]&& (_0x5c29x3[_0xd587[207]](_0xd587[185]),_0x5c29x3[_0xd587[207]](_0x5c29x4[_0x5c29x5][_0xd587[301]]),_0x5c29x3[_0xd587[207]](_0xd587[322]),_0x5c29x3[_0xd587[207]](_0x5c29x9),_0x5c29x3[_0xd587[207]](_0xd587[323]))}};0== _0x5c29x2[_0xd587[339]][_0xd587[67]]?_0x5c29x3[_0xd587[207]](_0xd587[343]):(_0x5c29x3[_0xd587[207]](_0xd587[341]),_0x5c29x3[_0xd587[207]](_0x5c29x2[_0xd587[339]]),_0x5c29x3[_0xd587[207]](_0xd587[326]+ _0x5c29x2[_0xd587[301]]+ _0xd587[341]));return _0x5c29x3[_0xd587[234]](_0xd587[110])};return _0xd587[110]}:function(_0x5c29x2){return null!= _0x5c29x2?( new XMLSerializer)[_0xd587[340]](_0x5c29x2):_0xd587[110]}}(),write:function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=_0x5c29x2[_0xd587[295]][_0xd587[344]](_0x5c29x3);null!= _0x5c29x2&& _0x5c29x2[_0xd587[62]](_0x5c29x4);return _0x5c29x4},writeln:function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=_0x5c29x2[_0xd587[295]][_0xd587[344]](_0x5c29x3);null!= _0x5c29x2&& (_0x5c29x2[_0xd587[62]](_0x5c29x4),_0x5c29x2[_0xd587[62]](document[_0xd587[55]](_0xd587[345])));return _0x5c29x4},br:function(_0x5c29x2,_0x5c29x3){_0x5c29x3= _0x5c29x3|| 1;for(var _0x5c29x4=null,_0x5c29x5=0;_0x5c29x5< _0x5c29x3;_0x5c29x5++){null!= _0x5c29x2&& (_0x5c29x4= _0x5c29x2[_0xd587[295]][_0xd587[55]](_0xd587[345]),_0x5c29x2[_0xd587[62]](_0x5c29x4))};return _0x5c29x4},button:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:document;_0x5c29x4= _0x5c29x4[_0xd587[55]](_0xd587[172]);mxUtils[_0xd587[53]](_0x5c29x4,_0x5c29x2);mxEvent[_0xd587[169]](_0x5c29x4,_0xd587[173],function(_0x5c29x2){_0x5c29x3(_0x5c29x2)});return _0x5c29x4},para:function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=document[_0xd587[55]](_0xd587[346]);mxUtils[_0xd587[53]](_0x5c29x4,_0x5c29x3);null!= _0x5c29x2&& _0x5c29x2[_0xd587[62]](_0x5c29x4);return _0x5c29x4},addTransparentBackgroundFilter:function(_0x5c29x2){_0x5c29x2[_0xd587[124]][_0xd587[347]]+= _0xd587[348]+ mxClient[_0xd587[88]]+ _0xd587[349]},linkAction:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){return mxUtils[_0xd587[54]](_0x5c29x2,_0x5c29x3,function(){_0x5c29x4[_0xd587[350]](_0x5c29x5)},_0x5c29x9)},linkInvoke:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){return mxUtils[_0xd587[54]](_0x5c29x2,_0x5c29x3,function(){_0x5c29x4[_0x5c29x5](_0x5c29x9)},_0x5c29xa)},link:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=document[_0xd587[55]](_0xd587[351]);_0x5c29x9[_0xd587[124]][_0xd587[352]]= _0xd587[353];_0x5c29x9[_0xd587[124]][_0xd587[354]]= _0xd587[355];_0x5c29x9[_0xd587[124]][_0xd587[270]]= _0xd587[356];null!= _0x5c29x5&& (_0x5c29x9[_0xd587[124]][_0xd587[357]]= _0x5c29x5+ _0xd587[168]);mxEvent[_0xd587[169]](_0x5c29x9,_0xd587[173],_0x5c29x4);mxUtils[_0xd587[53]](_0x5c29x9,_0x5c29x3);null!= _0x5c29x2&& _0x5c29x2[_0xd587[62]](_0x5c29x9);return _0x5c29x9},fit:function(_0x5c29x2){var _0x5c29x3=parseInt(_0x5c29x2[_0xd587[358]]),_0x5c29x4=parseInt(_0x5c29x2[_0xd587[359]]),_0x5c29x5=document[_0xd587[112]],_0x5c29x9=document[_0xd587[158]],_0x5c29xa=(_0x5c29x5[_0xd587[360]]|| _0x5c29x9[_0xd587[360]])+ (_0x5c29x5[_0xd587[159]]|| _0x5c29x9[_0xd587[159]]);_0x5c29x3+ _0x5c29x4> _0x5c29xa&& (_0x5c29x2[_0xd587[124]][_0xd587[361]]= Math[_0xd587[160]](_0x5c29x5[_0xd587[360]]|| _0x5c29x9[_0xd587[360]],_0x5c29xa- _0x5c29x4)+ _0xd587[168]);_0x5c29x3= parseInt(_0x5c29x2[_0xd587[362]]);_0x5c29x4= parseInt(_0x5c29x2[_0xd587[167]]);_0x5c29xa= (_0x5c29x5[_0xd587[190]]|| _0x5c29x9[_0xd587[190]])+ Math[_0xd587[160]](_0x5c29x5[_0xd587[157]]|| 0,_0x5c29x9[_0xd587[157]]);_0x5c29x3+ _0x5c29x4> _0x5c29xa&& (_0x5c29x2[_0xd587[124]][_0xd587[125]]= Math[_0xd587[160]](_0x5c29x5[_0xd587[190]]|| _0x5c29x9[_0xd587[190]],_0x5c29xa- _0x5c29x4)+ _0xd587[168])},open:function(_0x5c29x2){if(mxClient[_0xd587[133]]){try{netscape[_0xd587[366]][_0xd587[365]][_0xd587[364]](_0xd587[363])}catch(b){return mxUtils[_0xd587[150]](_0xd587[367]),_0xd587[110]};var _0x5c29x4=Components[_0xd587[372]][_0xd587[371]][_0xd587[370]](Components[_0xd587[369]][_0xd587[368]]);_0x5c29x4[_0xd587[373]](_0x5c29x2);if(!_0x5c29x4[_0xd587[374]]()){return mxUtils[_0xd587[150]](_0xd587[375]),_0xd587[110]};_0x5c29x2= Components[_0xd587[372]][_0xd587[377]][_0xd587[370]](Components[_0xd587[369]][_0xd587[376]]);_0x5c29x2[_0xd587[176]](_0x5c29x4,1,4,null);_0x5c29x4= Components[_0xd587[372]][_0xd587[379]][_0xd587[370]](Components[_0xd587[369]][_0xd587[378]]);_0x5c29x4[_0xd587[176]](_0x5c29x2);return _0x5c29x4[_0xd587[381]](_0x5c29x4[_0xd587[380]]())};_0x5c29x4= ( new ActiveXObject(_0xd587[382])).OpenTextFile(_0x5c29x2,1);_0x5c29x2= _0x5c29x4[_0xd587[383]]();_0x5c29x4[_0xd587[268]]();return _0x5c29x2},save:function(_0x5c29x2,_0x5c29x3){if(mxClient[_0xd587[133]]){try{netscape[_0xd587[366]][_0xd587[365]][_0xd587[364]](_0xd587[363])}catch(c){mxUtils[_0xd587[150]](_0xd587[384]);return};var _0x5c29x5=Components[_0xd587[372]][_0xd587[371]][_0xd587[370]](Components[_0xd587[369]][_0xd587[368]]);_0x5c29x5[_0xd587[373]](_0x5c29x2);_0x5c29x5[_0xd587[374]]()|| _0x5c29x5[_0xd587[385]](0,420);var _0x5c29x9=Components[_0xd587[372]][_0xd587[387]][_0xd587[370]](Components[_0xd587[369]][_0xd587[386]]);_0x5c29x9[_0xd587[176]](_0x5c29x5,34,4,null);_0x5c29x9[_0xd587[53]](_0x5c29x3,_0x5c29x3[_0xd587[67]]);_0x5c29x9[_0xd587[388]]();_0x5c29x9[_0xd587[268]]()}else {_0x5c29x5= ( new ActiveXObject(_0xd587[382])).CreateTextFile(_0x5c29x2,!0),_0x5c29x5.Write(_0x5c29x3),_0x5c29x5.Close()}},saveAs:function(_0x5c29x2){var _0x5c29x3=document[_0xd587[55]](_0xd587[389]);_0x5c29x3[_0xd587[57]](_0xd587[390],_0xd587[110]);_0x5c29x3[_0xd587[124]][_0xd587[187]]= _0xd587[188];document[_0xd587[112]][_0xd587[62]](_0x5c29x3);try{if(mxClient[_0xd587[133]]){var _0x5c29x4=_0x5c29x3[_0xd587[391]];_0x5c29x4[_0xd587[392]]();_0x5c29x4[_0xd587[53]](_0x5c29x2);_0x5c29x4[_0xd587[268]]();try{netscape[_0xd587[366]][_0xd587[365]][_0xd587[364]](_0xd587[363]),_0x5c29x3[_0xd587[393]](),saveDocument(_0x5c29x4)}catch(d){mxUtils[_0xd587[150]](_0xd587[394])}}else {_0x5c29x4= _0x5c29x3[_0xd587[396]][_0xd587[395]],_0x5c29x4[_0xd587[53]](_0x5c29x2),_0x5c29x4[_0xd587[398]](_0xd587[397],!1,document[_0xd587[45]])}}finally{document[_0xd587[112]][_0xd587[266]](_0x5c29x3)}},copy:function(_0x5c29x2){if(window[_0xd587[399]]){window[_0xd587[399]][_0xd587[401]](_0xd587[400],_0x5c29x2)}else {netscape[_0xd587[366]][_0xd587[365]][_0xd587[364]](_0xd587[363]);var _0x5c29x3=Components[_0xd587[372]][_0xd587[403]][_0xd587[370]](Components[_0xd587[369]][_0xd587[402]]);if(_0x5c29x3){var _0x5c29x4=Components[_0xd587[372]][_0xd587[405]][_0xd587[370]](Components[_0xd587[369]][_0xd587[404]]);if(_0x5c29x4){_0x5c29x4[_0xd587[407]](_0xd587[406]);var _0x5c29x5=Components[_0xd587[372]][_0xd587[409]][_0xd587[370]](Components[_0xd587[369]][_0xd587[408]]);_0x5c29x5[_0xd587[410]]= _0x5c29x2;_0x5c29x4[_0xd587[411]](_0xd587[406],_0x5c29x5,2* _0x5c29x2[_0xd587[67]]);_0x5c29x3[_0xd587[401]](_0x5c29x4,null,Components[_0xd587[369]][_0xd587[402]][_0xd587[412]])}}}},load:function(_0x5c29x2){_0x5c29x2=  new mxXmlRequest(_0x5c29x2,null,_0xd587[413],!1);_0x5c29x2[_0xd587[414]]();return _0x5c29x2},get:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return ( new mxXmlRequest(_0x5c29x2,null,_0xd587[413]))[_0xd587[414]](_0x5c29x3,_0x5c29x4)},post:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){return ( new mxXmlRequest(_0x5c29x2,_0x5c29x3))[_0xd587[414]](_0x5c29x4,_0x5c29x5)},submit:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){return ( new mxXmlRequest(_0x5c29x2,_0x5c29x3))[_0xd587[415]](_0x5c29x4,_0x5c29x5)},loadInto:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){mxClient[_0xd587[80]]?_0x5c29x3[_0xd587[416]]= function(){4== _0x5c29x3[_0xd587[417]]&& _0x5c29x4()}:_0x5c29x3[_0xd587[418]](_0xd587[219],_0x5c29x4,!1);_0x5c29x3[_0xd587[219]](_0x5c29x2)},getValue:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x2= null!= _0x5c29x2?_0x5c29x2[_0x5c29x3]:null;null== _0x5c29x2&& (_0x5c29x2= _0x5c29x4);return _0x5c29x2},getNumber:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x2= null!= _0x5c29x2?_0x5c29x2[_0x5c29x3]:null;null== _0x5c29x2&& (_0x5c29x2= _0x5c29x4|| 0);return Number(_0x5c29x2)},getColor:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x2= null!= _0x5c29x2?_0x5c29x2[_0x5c29x3]:null;null== _0x5c29x2?_0x5c29x2= _0x5c29x4:_0x5c29x2== mxConstants[_0xd587[217]]&& (_0x5c29x2= null);return _0x5c29x2},clone:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:!1;var _0x5c29x5=null;if(null!= _0x5c29x2&& _0xd587[279]==  typeof _0x5c29x2[_0xd587[196]]){var _0x5c29x5= new _0x5c29x2[_0xd587[196]],_0x5c29x9;for(_0x5c29x9 in _0x5c29x2){if(_0x5c29x9!= mxObjectIdentity[_0xd587[195]]&& (null== _0x5c29x3|| 0> mxUtils[_0xd587[2]](_0x5c29x3,_0x5c29x9))){_0x5c29x5[_0x5c29x9]= !_0x5c29x4&& _0xd587[194]==  typeof _0x5c29x2[_0x5c29x9]?mxUtils[_0xd587[238]](_0x5c29x2[_0x5c29x9]):_0x5c29x2[_0x5c29x9]}}};return _0x5c29x5},equalPoints:function(_0x5c29x2,_0x5c29x3){if(null== _0x5c29x2&& null!= _0x5c29x3|| null!= _0x5c29x2&& null== _0x5c29x3|| null!= _0x5c29x2&& null!= _0x5c29x3&& _0x5c29x2[_0xd587[67]]!= _0x5c29x3[_0xd587[67]]){return !1};if(null!= _0x5c29x2&& null!= _0x5c29x3){for(var _0x5c29x4=0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){if(_0x5c29x2[_0x5c29x4]== _0x5c29x3[_0x5c29x4]|| null!= _0x5c29x2[_0x5c29x4]&& !_0x5c29x2[_0x5c29x4][_0xd587[237]](_0x5c29x3[_0x5c29x4])){return !1}}};return !0},equalEntries:function(_0x5c29x2,_0x5c29x3){if(null== _0x5c29x2&& null!= _0x5c29x3|| null!= _0x5c29x2&& null== _0x5c29x3|| null!= _0x5c29x2&& null!= _0x5c29x3&& _0x5c29x2[_0xd587[67]]!= _0x5c29x3[_0xd587[67]]){return !1};if(null!= _0x5c29x2&& null!= _0x5c29x3){for(var _0x5c29x4 in _0x5c29x2){if(_0x5c29x2[_0x5c29x4]!= _0x5c29x3[_0x5c29x4]){return !1}}};return !0},extend:function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=function(){};_0x5c29x4[_0xd587[202]]= _0x5c29x3[_0xd587[202]];_0x5c29x2[_0xd587[202]]=  new _0x5c29x4;_0x5c29x2[_0xd587[202]][_0xd587[196]]= _0x5c29x2},toString:function(_0x5c29x2){var _0x5c29x3=_0xd587[110],_0x5c29x4;for(_0x5c29x4 in _0x5c29x2){try{if(null== _0x5c29x2[_0x5c29x4]){_0x5c29x3+= _0x5c29x4+ _0xd587[419]}else {if(_0xd587[279]==  typeof _0x5c29x2[_0x5c29x4]){_0x5c29x3+= _0x5c29x4+ _0xd587[420]}else {if(_0xd587[194]==  typeof _0x5c29x2[_0x5c29x4]){var _0x5c29x5=mxUtils[_0xd587[197]](_0x5c29x2[_0x5c29x4][_0xd587[196]]),_0x5c29x3=_0x5c29x3+ (_0x5c29x4+ _0xd587[421]+ _0x5c29x5+ _0xd587[422])}else {_0x5c29x3+= _0x5c29x4+ _0xd587[423]+ _0x5c29x2[_0x5c29x4]+ _0xd587[192]}}}}catch(e){_0x5c29x3+= _0x5c29x4+ _0xd587[226]+ e[_0xd587[281]]}};return _0x5c29x3},toRadians:function(_0x5c29x2){return Math[_0xd587[424]]* _0x5c29x2/ 180},arcToCurves:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14){_0x5c29x13-= _0x5c29x2;_0x5c29x14-= _0x5c29x3;if(0=== _0x5c29x4|| 0=== _0x5c29x5){return _0x5c29x18};_0x5c29x4= Math[_0xd587[425]](_0x5c29x4);_0x5c29x5= Math[_0xd587[425]](_0x5c29x5);var _0x5c29x15=-_0x5c29x13/ 2,_0x5c29x16=-_0x5c29x14/ 2,_0x5c29x17=Math[_0xd587[426]](_0x5c29x9* Math[_0xd587[424]]/ 180),_0x5c29x18=Math[_0xd587[427]](_0x5c29x9* Math[_0xd587[424]]/ 180);_0x5c29x9= _0x5c29x17* _0x5c29x15+ _0x5c29x18* _0x5c29x16;var _0x5c29x15=-1* _0x5c29x18* _0x5c29x15+ _0x5c29x17* _0x5c29x16,_0x5c29x16=_0x5c29x9* _0x5c29x9,_0x5c29x19=_0x5c29x15* _0x5c29x15,_0x5c29x1a=_0x5c29x4* _0x5c29x4,_0x5c29x1b=_0x5c29x5* _0x5c29x5,_0x5c29x1c=_0x5c29x16/ _0x5c29x1a+ _0x5c29x19/ _0x5c29x1b;1< _0x5c29x1c?(_0x5c29x4*= Math[_0xd587[428]](_0x5c29x1c),_0x5c29x5*= Math[_0xd587[428]](_0x5c29x1c),_0x5c29xa= 0):(_0x5c29x1c= 1,_0x5c29xa=== _0x5c29x12&& (_0x5c29x1c=  -1),_0x5c29xa= _0x5c29x1c* Math[_0xd587[428]]((_0x5c29x1a* _0x5c29x1b- _0x5c29x1a* _0x5c29x19- _0x5c29x1b* _0x5c29x16)/ (_0x5c29x1a* _0x5c29x19+ _0x5c29x1b* _0x5c29x16)));_0x5c29x16= _0x5c29xa* _0x5c29x4* _0x5c29x15/ _0x5c29x5;_0x5c29x19= -1* _0x5c29xa* _0x5c29x5* _0x5c29x9/ _0x5c29x4;_0x5c29x13= _0x5c29x17* _0x5c29x16- _0x5c29x18* _0x5c29x19+ _0x5c29x13/ 2;_0x5c29x14= _0x5c29x18* _0x5c29x16+ _0x5c29x17* _0x5c29x19+ _0x5c29x14/ 2;_0x5c29x1a= Math[_0xd587[429]]((_0x5c29x15- _0x5c29x19)/ _0x5c29x5,(_0x5c29x9- _0x5c29x16)/ _0x5c29x4)- Math[_0xd587[429]](0,1);_0x5c29xa= 0<= _0x5c29x1a?_0x5c29x1a:2* Math[_0xd587[424]]+ _0x5c29x1a;_0x5c29x1a= Math[_0xd587[429]]((-_0x5c29x15- _0x5c29x19) / _0x5c29x5,(-_0x5c29x9- _0x5c29x16) / _0x5c29x4) - Math[_0xd587[429]]((_0x5c29x15- _0x5c29x19)/ _0x5c29x5,(_0x5c29x9- _0x5c29x16)/ _0x5c29x4);_0x5c29x9= 0<= _0x5c29x1a?_0x5c29x1a:2* Math[_0xd587[424]]+ _0x5c29x1a;0== _0x5c29x12&& 0< _0x5c29x9?_0x5c29x9-= 2* Math[_0xd587[424]]:0!= _0x5c29x12&& 0> _0x5c29x9&& (_0x5c29x9+= 2* Math[_0xd587[424]]);_0x5c29x12= 2* _0x5c29x9/ Math[_0xd587[424]];_0x5c29x12= Math[_0xd587[430]](0> _0x5c29x12?-1* _0x5c29x12:_0x5c29x12);_0x5c29x9/= _0x5c29x12;_0x5c29x15= 8/ 3* Math[_0xd587[427]](_0x5c29x9/ 4)* Math[_0xd587[427]](_0x5c29x9/ 4)/ Math[_0xd587[427]](_0x5c29x9/ 2);_0x5c29x16= _0x5c29x17* _0x5c29x4;_0x5c29x17*= _0x5c29x5;_0x5c29x4*= _0x5c29x18;_0x5c29x5*= _0x5c29x18;for(var _0x5c29x1d=Math[_0xd587[426]](_0x5c29xa),_0x5c29x1e=Math[_0xd587[427]](_0x5c29xa),_0x5c29x19=-_0x5c29x15* (_0x5c29x16* _0x5c29x1e+ _0x5c29x5* _0x5c29x1d),_0x5c29x1a=-_0x5c29x15* (_0x5c29x4* _0x5c29x1e- _0x5c29x17* _0x5c29x1d),_0x5c29x1c=_0x5c29x1b= 0,_0x5c29x18=[],_0x5c29x1f=0;_0x5c29x1f< _0x5c29x12;++_0x5c29x1f){_0x5c29xa+= _0x5c29x9;var _0x5c29x1d=Math[_0xd587[426]](_0x5c29xa),_0x5c29x1e=Math[_0xd587[427]](_0x5c29xa),_0x5c29x1b=_0x5c29x16* _0x5c29x1d- _0x5c29x5* _0x5c29x1e+ _0x5c29x13,_0x5c29x1c=_0x5c29x4* _0x5c29x1d+ _0x5c29x17* _0x5c29x1e+ _0x5c29x14,_0x5c29x20=-_0x5c29x15* (_0x5c29x16* _0x5c29x1e+ _0x5c29x5* _0x5c29x1d),_0x5c29x1d=-_0x5c29x15* (_0x5c29x4* _0x5c29x1e- _0x5c29x17* _0x5c29x1d),_0x5c29x1e=6* _0x5c29x1f;_0x5c29x18[_0x5c29x1e]= Number(_0x5c29x19+ _0x5c29x2);_0x5c29x18[_0x5c29x1e+ 1]= Number(_0x5c29x1a+ _0x5c29x3);_0x5c29x18[_0x5c29x1e+ 2]= Number(_0x5c29x1b- _0x5c29x20+ _0x5c29x2);_0x5c29x18[_0x5c29x1e+ 3]= Number(_0x5c29x1c- _0x5c29x1d+ _0x5c29x3);_0x5c29x18[_0x5c29x1e+ 4]= Number(_0x5c29x1b+ _0x5c29x2);_0x5c29x18[_0x5c29x1e+ 5]= Number(_0x5c29x1c+ _0x5c29x3);_0x5c29x19= _0x5c29x1b+ _0x5c29x20;_0x5c29x1a= _0x5c29x1c+ _0x5c29x1d};return _0x5c29x18},getBoundingBox:function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=null;if(null!= _0x5c29x2&& null!= _0x5c29x3&& 0!= _0x5c29x3){var _0x5c29x5=mxUtils[_0xd587[431]](_0x5c29x3),_0x5c29x4=Math[_0xd587[426]](_0x5c29x5),_0x5c29x9=Math[_0xd587[427]](_0x5c29x5),_0x5c29xa= new mxPoint(_0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]]/ 2,_0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]]/ 2),_0x5c29x12= new mxPoint(_0x5c29x2[_0xd587[235]],_0x5c29x2[_0xd587[236]]),_0x5c29x5= new mxPoint(_0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]],_0x5c29x2[_0xd587[236]]),_0x5c29x13= new mxPoint(_0x5c29x5[_0xd587[235]],_0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]]),_0x5c29x14= new mxPoint(_0x5c29x2[_0xd587[235]],_0x5c29x13[_0xd587[236]]),_0x5c29x12=mxUtils[_0xd587[432]](_0x5c29x12,_0x5c29x4,_0x5c29x9,_0x5c29xa),_0x5c29x5=mxUtils[_0xd587[432]](_0x5c29x5,_0x5c29x4,_0x5c29x9,_0x5c29xa),_0x5c29x13=mxUtils[_0xd587[432]](_0x5c29x13,_0x5c29x4,_0x5c29x9,_0x5c29xa),_0x5c29x14=mxUtils[_0xd587[432]](_0x5c29x14,_0x5c29x4,_0x5c29x9,_0x5c29xa),_0x5c29x4= new mxRectangle(_0x5c29x12[_0xd587[235]],_0x5c29x12[_0xd587[236]],0,0);_0x5c29x4[_0xd587[99]]( new mxRectangle(_0x5c29x5[_0xd587[235]],_0x5c29x5[_0xd587[236]],0,0));_0x5c29x4[_0xd587[99]]( new mxRectangle(_0x5c29x13[_0xd587[235]],_0x5c29x13[_0xd587[236]],0,0));_0x5c29x4[_0xd587[99]]( new mxRectangle(_0x5c29x14[_0xd587[235]],_0x5c29x14[_0xd587[236]],0,0))};return _0x5c29x4},getRotatedPoint:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x5= null!= _0x5c29x5?_0x5c29x5: new mxPoint;var _0x5c29x9=_0x5c29x2[_0xd587[235]]- _0x5c29x5[_0xd587[235]];_0x5c29x2= _0x5c29x2[_0xd587[236]]- _0x5c29x5[_0xd587[236]];return  new mxPoint(_0x5c29x9* _0x5c29x3- _0x5c29x2* _0x5c29x4+ _0x5c29x5[_0xd587[235]],_0x5c29x2* _0x5c29x3+ _0x5c29x9* _0x5c29x4+ _0x5c29x5[_0xd587[236]])},getPortConstraints:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x2= mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_PORT_CONSTRAINT,null);if(null== _0x5c29x2){return _0x5c29x5};_0x5c29x5= _0x5c29x2.toString();_0x5c29x2= mxConstants[_0xd587[434]];0<= _0x5c29x5[_0xd587[2]](mxConstants.DIRECTION_NORTH)&& (_0x5c29x2|= mxConstants[_0xd587[435]]);0<= _0x5c29x5[_0xd587[2]](mxConstants.DIRECTION_WEST)&& (_0x5c29x2|= mxConstants[_0xd587[436]]);0<= _0x5c29x5[_0xd587[2]](mxConstants.DIRECTION_SOUTH)&& (_0x5c29x2|= mxConstants[_0xd587[437]]);0<= _0x5c29x5[_0xd587[2]](mxConstants.DIRECTION_EAST)&& (_0x5c29x2|= mxConstants[_0xd587[438]]);return _0x5c29x2},reversePortConstraints:function(_0x5c29x2){var _0x5c29x3=0,_0x5c29x3=(_0x5c29x2& mxConstants[_0xd587[436]])<< 3,_0x5c29x3=_0x5c29x3| (_0x5c29x2& mxConstants[_0xd587[435]])<< 1,_0x5c29x3=_0x5c29x3| (_0x5c29x2& mxConstants[_0xd587[437]])>> 1;return _0x5c29x3|= (_0x5c29x2& mxConstants[_0xd587[438]])>> 3},findNearestSegment:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=-1;if(0< _0x5c29x2[_0xd587[439]][_0xd587[67]]){for(var _0x5c29x9=_0x5c29x2[_0xd587[439]][0],_0x5c29xa=null,_0x5c29x12=1;_0x5c29x12< _0x5c29x2[_0xd587[439]][_0xd587[67]];_0x5c29x12++){var _0x5c29x13=_0x5c29x2[_0xd587[439]][_0x5c29x12],_0x5c29x9=mxUtils[_0xd587[440]](_0x5c29x9[_0xd587[235]],_0x5c29x9[_0xd587[236]],_0x5c29x13[_0xd587[235]],_0x5c29x13[_0xd587[236]],_0x5c29x3,_0x5c29x4);if(null== _0x5c29xa|| _0x5c29x9< _0x5c29xa){_0x5c29xa= _0x5c29x9,_0x5c29x5= _0x5c29x12- 1};_0x5c29x9= _0x5c29x13}};return _0x5c29x5},rectangleIntersectsSegment:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=_0x5c29x2[_0xd587[236]],_0x5c29x9=_0x5c29x2[_0xd587[235]],_0x5c29xa=_0x5c29x5+ _0x5c29x2[_0xd587[119]],_0x5c29x12=_0x5c29x9+ _0x5c29x2[_0xd587[117]];_0x5c29x2= _0x5c29x3[_0xd587[235]];var _0x5c29x13=_0x5c29x4[_0xd587[235]];_0x5c29x3[_0xd587[235]]> _0x5c29x4[_0xd587[235]]&& (_0x5c29x2= _0x5c29x4[_0xd587[235]],_0x5c29x13= _0x5c29x3[_0xd587[235]]);_0x5c29x13> _0x5c29x12&& (_0x5c29x13= _0x5c29x12);_0x5c29x2< _0x5c29x9&& (_0x5c29x2= _0x5c29x9);if(_0x5c29x2> _0x5c29x13){return !1};var _0x5c29x9=_0x5c29x3[_0xd587[236]],_0x5c29x12=_0x5c29x4[_0xd587[236]],_0x5c29x14=_0x5c29x4[_0xd587[235]]- _0x5c29x3[_0xd587[235]];1E-7< Math[_0xd587[425]](_0x5c29x14)&& (_0x5c29x4= (_0x5c29x4[_0xd587[236]]- _0x5c29x3[_0xd587[236]])/ _0x5c29x14,_0x5c29x3= _0x5c29x3[_0xd587[236]]- _0x5c29x4* _0x5c29x3[_0xd587[235]],_0x5c29x9= _0x5c29x4* _0x5c29x2+ _0x5c29x3,_0x5c29x12= _0x5c29x4* _0x5c29x13+ _0x5c29x3);_0x5c29x9> _0x5c29x12&& (_0x5c29x3= _0x5c29x12,_0x5c29x12= _0x5c29x9,_0x5c29x9= _0x5c29x3);_0x5c29x12> _0x5c29xa&& (_0x5c29x12= _0x5c29xa);_0x5c29x9< _0x5c29x5&& (_0x5c29x9= _0x5c29x5);return _0x5c29x9> _0x5c29x12?!1:!0},contains:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return _0x5c29x2[_0xd587[235]]<= _0x5c29x3&& _0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]]>= _0x5c29x3&& _0x5c29x2[_0xd587[236]]<= _0x5c29x4&& _0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]]>= _0x5c29x4},intersects:function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=_0x5c29x2[_0xd587[117]],_0x5c29x5=_0x5c29x2[_0xd587[119]],_0x5c29x9=_0x5c29x3[_0xd587[117]],_0x5c29xa=_0x5c29x3[_0xd587[119]];if(0>= _0x5c29x9|| 0>= _0x5c29xa|| 0>= _0x5c29x4|| 0>= _0x5c29x5){return !1};var _0x5c29x12=_0x5c29x2[_0xd587[235]],_0x5c29x13=_0x5c29x2[_0xd587[236]],_0x5c29x14=_0x5c29x3[_0xd587[235]],_0x5c29x15=_0x5c29x3[_0xd587[236]],_0x5c29x9=_0x5c29x9+ _0x5c29x14,_0x5c29xa=_0x5c29xa+ _0x5c29x15,_0x5c29x4=_0x5c29x4+ _0x5c29x12,_0x5c29x5=_0x5c29x5+ _0x5c29x13;return (_0x5c29x9< _0x5c29x14|| _0x5c29x9> _0x5c29x12)&& (_0x5c29xa< _0x5c29x15|| _0x5c29xa> _0x5c29x13)&& (_0x5c29x4< _0x5c29x12|| _0x5c29x4> _0x5c29x14)&& (_0x5c29x5< _0x5c29x13|| _0x5c29x5> _0x5c29x15)},intersectsHotspot:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){_0x5c29x5= null!= _0x5c29x5?_0x5c29x5:1;_0x5c29x9= null!= _0x5c29x9?_0x5c29x9:0;_0x5c29xa= null!= _0x5c29xa?_0x5c29xa:0;if(0< _0x5c29x5){var _0x5c29x12=_0x5c29x2[_0xd587[241]](),_0x5c29x13=_0x5c29x2[_0xd587[242]](),_0x5c29x14=_0x5c29x2[_0xd587[117]],_0x5c29x15=_0x5c29x2[_0xd587[119]],_0x5c29x16=mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_STARTSIZE)* _0x5c29x2[_0xd587[441]][_0xd587[255]];0< _0x5c29x16&& (mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_HORIZONTAL,!0)?(_0x5c29x13= _0x5c29x2[_0xd587[236]]+ _0x5c29x16/ 2,_0x5c29x15= _0x5c29x16):(_0x5c29x12= _0x5c29x2[_0xd587[235]]+ _0x5c29x16/ 2,_0x5c29x14= _0x5c29x16));_0x5c29x14= Math[_0xd587[160]](_0x5c29x9,_0x5c29x14* _0x5c29x5);_0x5c29x15= Math[_0xd587[160]](_0x5c29x9,_0x5c29x15* _0x5c29x5);0< _0x5c29xa&& (_0x5c29x14= Math[_0xd587[243]](_0x5c29x14,_0x5c29xa),_0x5c29x15= Math[_0xd587[243]](_0x5c29x15,_0x5c29xa));_0x5c29x5=  new mxRectangle(_0x5c29x12- _0x5c29x14/ 2,_0x5c29x13- _0x5c29x15/ 2,_0x5c29x14,_0x5c29x15);_0x5c29x12= mxUtils[_0xd587[431]](mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_ROTATION)|| 0);0!= _0x5c29x12&& (_0x5c29x9= Math[_0xd587[426]](-_0x5c29x12),_0x5c29xa= Math[_0xd587[427]](-_0x5c29x12),_0x5c29x12=  new mxPoint(_0x5c29x2[_0xd587[241]](),_0x5c29x2[_0xd587[242]]()),_0x5c29x2= mxUtils[_0xd587[432]]( new mxPoint(_0x5c29x3,_0x5c29x4),_0x5c29x9,_0x5c29xa,_0x5c29x12),_0x5c29x3= _0x5c29x2[_0xd587[235]],_0x5c29x4= _0x5c29x2[_0xd587[236]]);return mxUtils[_0xd587[442]](_0x5c29x5,_0x5c29x3,_0x5c29x4)};return !0},getOffset:function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=0,_0x5c29x5=0;if(null!= _0x5c29x3&& _0x5c29x3){var _0x5c29x9=document[_0xd587[112]],_0x5c29xa=document[_0xd587[158]],_0x5c29x4=_0x5c29x4+ (_0x5c29x9[_0xd587[360]]|| _0x5c29xa[_0xd587[360]]),_0x5c29x5=_0x5c29x5+ (_0x5c29x9[_0xd587[190]]|| _0x5c29xa[_0xd587[190]])};for(;_0x5c29x2[_0xd587[443]];){_0x5c29x4+= _0x5c29x2[_0xd587[358]],_0x5c29x5+= _0x5c29x2[_0xd587[362]],_0x5c29x2= _0x5c29x2[_0xd587[443]]};return  new mxPoint(_0x5c29x4,_0x5c29x5)},getScrollOrigin:function(_0x5c29x2){for(var _0x5c29x3=document[_0xd587[112]],_0x5c29x4=document[_0xd587[158]],_0x5c29x5= new mxPoint(_0x5c29x3[_0xd587[360]]|| _0x5c29x4[_0xd587[360]],_0x5c29x3[_0xd587[190]]|| _0x5c29x4[_0xd587[190]]);null!= _0x5c29x2&& _0x5c29x2!= _0x5c29x3&& _0x5c29x2!= _0x5c29x4;){!isNaN(_0x5c29x2[_0xd587[360]])&& !isNaN(_0x5c29x2[_0xd587[190]])&& (_0x5c29x5[_0xd587[235]]+= _0x5c29x2[_0xd587[360]],_0x5c29x5[_0xd587[236]]+= _0x5c29x2[_0xd587[190]]),_0x5c29x2= _0x5c29x2[_0xd587[265]]};return _0x5c29x5},convertPoint:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=mxUtils[_0xd587[444]](_0x5c29x2);_0x5c29x2= mxUtils[_0xd587[445]](_0x5c29x2);_0x5c29x2[_0xd587[235]]-= _0x5c29x5[_0xd587[235]];_0x5c29x2[_0xd587[236]]-= _0x5c29x5[_0xd587[236]];return  new mxPoint(_0x5c29x3- _0x5c29x2[_0xd587[235]],_0x5c29x4- _0x5c29x2[_0xd587[236]])},ltrim:function(_0x5c29x2,_0x5c29x3){return _0x5c29x2[_0xd587[230]](RegExp(_0xd587[446]+ (_0x5c29x3|| _0xd587[447])+ _0xd587[448],_0xd587[449]),_0xd587[110])},rtrim:function(_0x5c29x2,_0x5c29x3){return _0x5c29x2[_0xd587[230]](RegExp(_0xd587[450]+ (_0x5c29x3|| _0xd587[447])+ _0xd587[451],_0xd587[449]),_0xd587[110])},trim:function(_0x5c29x2,_0x5c29x3){return mxUtils[_0xd587[453]](mxUtils[_0xd587[452]](_0x5c29x2,_0x5c29x3),_0x5c29x3)},isNumeric:function(_0x5c29x2){return null!= _0x5c29x2&& (null== _0x5c29x2[_0xd587[67]]|| 0< _0x5c29x2[_0xd587[67]]&& 0> _0x5c29x2[_0xd587[2]](_0xd587[454])&& 0> _0x5c29x2[_0xd587[2]](_0xd587[455]))&& !isNaN(_0x5c29x2)},mod:function(_0x5c29x2,_0x5c29x3){return (_0x5c29x2% _0x5c29x3+ _0x5c29x3)% _0x5c29x3},intersection:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13){var _0x5c29x14=(_0x5c29x13- _0x5c29xa)* (_0x5c29x4- _0x5c29x2)- (_0x5c29x12- _0x5c29x9)* (_0x5c29x5- _0x5c29x3);_0x5c29x12= ((_0x5c29x12- _0x5c29x9)* (_0x5c29x3- _0x5c29xa)- (_0x5c29x13- _0x5c29xa)* (_0x5c29x2- _0x5c29x9))/ _0x5c29x14;_0x5c29x9= ((_0x5c29x4- _0x5c29x2)* (_0x5c29x3- _0x5c29xa)- (_0x5c29x5- _0x5c29x3)* (_0x5c29x2- _0x5c29x9))/ _0x5c29x14;return 0<= _0x5c29x12&& 1>= _0x5c29x12&& 0<= _0x5c29x9&& 1>= _0x5c29x9? new mxPoint(_0x5c29x2+ _0x5c29x12* (_0x5c29x4- _0x5c29x2),_0x5c29x3+ _0x5c29x12* (_0x5c29x5- _0x5c29x3)):null},ptSegDistSq:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){_0x5c29x4-= _0x5c29x2;_0x5c29x5-= _0x5c29x3;_0x5c29x9-= _0x5c29x2;_0x5c29xa-= _0x5c29x3;0>= _0x5c29x9* _0x5c29x4+ _0x5c29xa* _0x5c29x5?_0x5c29x4= 0:(_0x5c29x9= _0x5c29x4- _0x5c29x9,_0x5c29xa= _0x5c29x5- _0x5c29xa,_0x5c29x2= _0x5c29x9* _0x5c29x4+ _0x5c29xa* _0x5c29x5,_0x5c29x4= 0>= _0x5c29x2?0:_0x5c29x2* _0x5c29x2/ (_0x5c29x4* _0x5c29x4+ _0x5c29x5* _0x5c29x5));_0x5c29x9= _0x5c29x9* _0x5c29x9+ _0x5c29xa* _0x5c29xa- _0x5c29x4;0> _0x5c29x9&& (_0x5c29x9= 0);return _0x5c29x9},relativeCcw:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){_0x5c29x4-= _0x5c29x2;_0x5c29x5-= _0x5c29x3;_0x5c29x9-= _0x5c29x2;_0x5c29xa-= _0x5c29x3;_0x5c29x2= _0x5c29x9* _0x5c29x5- _0x5c29xa* _0x5c29x4;0== _0x5c29x2&& (_0x5c29x2= _0x5c29x9* _0x5c29x4+ _0x5c29xa* _0x5c29x5,0< _0x5c29x2&& (_0x5c29x2= (_0x5c29x9- _0x5c29x4)* _0x5c29x4+ (_0x5c29xa- _0x5c29x5)* _0x5c29x5,0> _0x5c29x2&& (_0x5c29x2= 0)));return 0> _0x5c29x2?-1:0< _0x5c29x2?1:0},animateChanges:function(_0x5c29x2,_0x5c29x3){mxEffects[_0xd587[456]][_0xd587[183]](this,arguments)},cascadeOpacity:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){mxEffects[_0xd587[260]][_0xd587[183]](this,arguments)},fadeOut:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){mxEffects[_0xd587[457]][_0xd587[183]](this,arguments)},setOpacity:function(_0x5c29x2,_0x5c29x3){mxUtils[_0xd587[458]](_0x5c29x2)?_0x5c29x2[_0xd587[124]][_0xd587[347]]= 100<= _0x5c29x3?null:_0xd587[459]+ _0x5c29x3/ 5+ _0xd587[460]:mxClient[_0xd587[80]]&& (_0xd587[82]===  typeof document[_0xd587[5]]|| 9> document[_0xd587[5]])?_0x5c29x2[_0xd587[124]][_0xd587[347]]= 100<= _0x5c29x3?null:_0xd587[459]+ _0x5c29x3+ _0xd587[460]:_0x5c29x2[_0xd587[124]][_0xd587[461]]= _0x5c29x3/ 100},createImage:function(_0x5c29x2){var _0x5c29x3=null;mxClient[_0xd587[49]]&& _0xd587[462]!= document[_0xd587[135]]?(_0x5c29x3= document[_0xd587[55]](mxClient[_0xd587[463]]+ _0xd587[464]),_0x5c29x3[_0xd587[57]](_0xd587[390],_0x5c29x2),_0x5c29x3[_0xd587[124]][_0xd587[465]]= _0xd587[130]):(_0x5c29x3= document[_0xd587[55]](_0xd587[466]),_0x5c29x3[_0xd587[57]](_0xd587[390],_0x5c29x2),_0x5c29x3[_0xd587[57]](_0xd587[467],_0xd587[468]));return _0x5c29x3},sortCells:function(_0x5c29x2,_0x5c29x3){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:!0;var _0x5c29x4= new mxDictionary;_0x5c29x2[_0xd587[470]](function(_0x5c29x2,_0x5c29x9){var _0x5c29xa=_0x5c29x4[_0xd587[203]](_0x5c29x2);null== _0x5c29xa&& (_0x5c29xa= mxCellPath[_0xd587[385]](_0x5c29x2)[_0xd587[224]](mxCellPath.PATH_SEPARATOR),_0x5c29x4[_0xd587[204]](_0x5c29x2,_0x5c29xa));var _0x5c29x12=_0x5c29x4[_0xd587[203]](_0x5c29x9);null== _0x5c29x12&& (_0x5c29x12= mxCellPath[_0xd587[385]](_0x5c29x9)[_0xd587[224]](mxCellPath.PATH_SEPARATOR),_0x5c29x4[_0xd587[204]](_0x5c29x9,_0x5c29x12));_0x5c29xa= mxCellPath[_0xd587[469]](_0x5c29xa,_0x5c29x12);return 0== _0x5c29xa?0:0< _0x5c29xa== _0x5c29x3?1:-1});return _0x5c29x2},getStylename:function(_0x5c29x2){return null!= _0x5c29x2&& (_0x5c29x2= _0x5c29x2[_0xd587[224]](_0xd587[471])[0],0> _0x5c29x2[_0xd587[2]](_0xd587[226]))?_0x5c29x2:_0xd587[110]},getStylenames:function(_0x5c29x2){var _0x5c29x3=[];if(null!= _0x5c29x2){_0x5c29x2= _0x5c29x2[_0xd587[224]](_0xd587[471]);for(var _0x5c29x4=0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){0> _0x5c29x2[_0x5c29x4][_0xd587[2]](_0xd587[226])&& _0x5c29x3[_0xd587[207]](_0x5c29x2[_0x5c29x4])}};return _0x5c29x3},indexOfStylename:function(_0x5c29x2,_0x5c29x3){if(null!= _0x5c29x2&& null!= _0x5c29x3){for(var _0x5c29x4=_0x5c29x2[_0xd587[224]](_0xd587[471]),_0x5c29x5=0,_0x5c29x9=0;_0x5c29x9< _0x5c29x4[_0xd587[67]];_0x5c29x9++){if(_0x5c29x4[_0x5c29x9]== _0x5c29x3){return _0x5c29x5};_0x5c29x5+= _0x5c29x4[_0x5c29x9][_0xd587[67]]+ 1}};return -1},addStylename:function(_0x5c29x2,_0x5c29x3){0> mxUtils[_0xd587[472]](_0x5c29x2,_0x5c29x3)&& (null== _0x5c29x2?_0x5c29x2= _0xd587[110]:0< _0x5c29x2[_0xd587[67]]&& _0xd587[471]!= _0x5c29x2[_0xd587[225]](_0x5c29x2[_0xd587[67]]- 1)&& (_0x5c29x2+= _0xd587[471]),_0x5c29x2+= _0x5c29x3);return _0x5c29x2},removeStylename:function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=[];if(null!= _0x5c29x2){for(var _0x5c29x5=_0x5c29x2[_0xd587[224]](_0xd587[471]),_0x5c29x9=0;_0x5c29x9< _0x5c29x5[_0xd587[67]];_0x5c29x9++){_0x5c29x5[_0x5c29x9]!= _0x5c29x3&& _0x5c29x4[_0xd587[207]](_0x5c29x5[_0x5c29x9])}};return _0x5c29x4[_0xd587[234]](_0xd587[471])},removeAllStylenames:function(_0x5c29x2){var _0x5c29x3=[];if(null!= _0x5c29x2){_0x5c29x2= _0x5c29x2[_0xd587[224]](_0xd587[471]);for(var _0x5c29x4=0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){0<= _0x5c29x2[_0x5c29x4][_0xd587[2]](_0xd587[226])&& _0x5c29x3[_0xd587[207]](_0x5c29x2[_0x5c29x4])}};return _0x5c29x3[_0xd587[234]](_0xd587[471])},setCellStyles:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){if(null!= _0x5c29x3&& 0< _0x5c29x3[_0xd587[67]]){_0x5c29x2[_0xd587[473]]();try{for(var _0x5c29x9=0;_0x5c29x9< _0x5c29x3[_0xd587[67]];_0x5c29x9++){if(null!= _0x5c29x3[_0x5c29x9]){var _0x5c29xa=mxUtils[_0xd587[475]](_0x5c29x2[_0xd587[474]](_0x5c29x3[_0x5c29x9]),_0x5c29x4,_0x5c29x5);_0x5c29x2[_0xd587[475]](_0x5c29x3[_0x5c29x9],_0x5c29xa)}}}finally{_0x5c29x2[_0xd587[476]]()}}},setStyle:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=null!= _0x5c29x4&& (_0xd587[82]==  typeof _0x5c29x4[_0xd587[67]]|| 0< _0x5c29x4[_0xd587[67]]);if(null== _0x5c29x2|| 0== _0x5c29x2[_0xd587[67]]){_0x5c29x5&& (_0x5c29x2= _0x5c29x3+ _0xd587[226]+ _0x5c29x4)}else {var _0x5c29x9=_0x5c29x2[_0xd587[2]](_0x5c29x3+ _0xd587[226]);0> _0x5c29x9?_0x5c29x5&& (_0x5c29x5= _0xd587[471]== _0x5c29x2[_0xd587[225]](_0x5c29x2[_0xd587[67]]- 1)?_0xd587[110]:_0xd587[471],_0x5c29x2= _0x5c29x2+ _0x5c29x5+ _0x5c29x3+ _0xd587[226]+ _0x5c29x4):(_0x5c29x3= _0x5c29x5?_0x5c29x3+ _0xd587[226]+ _0x5c29x4:_0xd587[110],_0x5c29x4= _0x5c29x2[_0xd587[2]](_0xd587[471],_0x5c29x9),_0x5c29x5|| _0x5c29x4++,_0x5c29x2= _0x5c29x2[_0xd587[85]](0,_0x5c29x9)+ _0x5c29x3+ (_0x5c29x4> _0x5c29x9?_0x5c29x2[_0xd587[85]](_0x5c29x4):_0xd587[110]))};return _0x5c29x2},setCellStyleFlags:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){if(null!= _0x5c29x3&& 0< _0x5c29x3[_0xd587[67]]){_0x5c29x2[_0xd587[473]]();try{for(var _0x5c29xa=0;_0x5c29xa< _0x5c29x3[_0xd587[67]];_0x5c29xa++){if(null!= _0x5c29x3[_0x5c29xa]){var _0x5c29x12=mxUtils[_0xd587[477]](_0x5c29x2[_0xd587[474]](_0x5c29x3[_0x5c29xa]),_0x5c29x4,_0x5c29x5,_0x5c29x9);_0x5c29x2[_0xd587[475]](_0x5c29x3[_0x5c29xa],_0x5c29x12)}}}finally{_0x5c29x2[_0xd587[476]]()}}},setStyleFlag:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){if(null== _0x5c29x2|| 0== _0x5c29x2[_0xd587[67]]){_0x5c29x2= _0x5c29x5|| null== _0x5c29x5?_0x5c29x3+ _0xd587[226]+ _0x5c29x4:_0x5c29x3+ _0xd587[478]}else {var _0x5c29x9=_0x5c29x2[_0xd587[2]](_0x5c29x3+ _0xd587[226]);if(0> _0x5c29x9){_0x5c29x9= _0xd587[471]== _0x5c29x2[_0xd587[225]](_0x5c29x2[_0xd587[67]]- 1)?_0xd587[110]:_0xd587[471],_0x5c29x2= _0x5c29x5|| null== _0x5c29x5?_0x5c29x2+ _0x5c29x9+ _0x5c29x3+ _0xd587[226]+ _0x5c29x4:_0x5c29x2+ _0x5c29x9+ _0x5c29x3+ _0xd587[478]}else {var _0x5c29xa=_0x5c29x2[_0xd587[2]](_0xd587[471],_0x5c29x9),_0x5c29x12=_0xd587[110],_0x5c29x12=0> _0x5c29xa?_0x5c29x2[_0xd587[85]](_0x5c29x9+ _0x5c29x3[_0xd587[67]]+ 1):_0x5c29x2[_0xd587[85]](_0x5c29x9+ _0x5c29x3[_0xd587[67]]+ 1,_0x5c29xa),_0x5c29x12=null== _0x5c29x5?parseInt(_0x5c29x12)^ _0x5c29x4:_0x5c29x5?parseInt(_0x5c29x12)| _0x5c29x4:parseInt(_0x5c29x12)&  ~_0x5c29x4;_0x5c29x2= _0x5c29x2[_0xd587[85]](0,_0x5c29x9)+ _0x5c29x3+ _0xd587[226]+ _0x5c29x12+ (0<= _0x5c29xa?_0x5c29x2[_0xd587[85]](_0x5c29xa):_0xd587[110])}};return _0x5c29x2},getAlignmentAsPoint:function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=0,_0x5c29x5=0;_0x5c29x2== mxConstants[_0xd587[479]]?_0x5c29x4=  -0.5:_0x5c29x2== mxConstants[_0xd587[480]]&& (_0x5c29x4=  -1);_0x5c29x3== mxConstants[_0xd587[481]]?_0x5c29x5=  -0.5:_0x5c29x3== mxConstants[_0xd587[482]]&& (_0x5c29x5=  -1);return  new mxPoint(_0x5c29x4,_0x5c29x5)},getSizeForString:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:mxConstants[_0xd587[483]];_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:mxConstants[_0xd587[484]];var _0x5c29x5=document[_0xd587[55]](_0xd587[485]);_0x5c29x5[_0xd587[124]][_0xd587[486]]= _0x5c29x4;_0x5c29x5[_0xd587[124]][_0xd587[487]]= Math[_0xd587[488]](_0x5c29x3)+ _0xd587[168];_0x5c29x5[_0xd587[124]][_0xd587[489]]= Math[_0xd587[488]](_0x5c29x3* mxConstants[_0xd587[490]])+ _0xd587[168];_0x5c29x5[_0xd587[124]][_0xd587[491]]= _0xd587[492];_0x5c29x5[_0xd587[124]][_0xd587[493]]= _0xd587[494];_0x5c29x5[_0xd587[124]][_0xd587[187]]= _0xd587[188];_0x5c29x5[_0xd587[124]][_0xd587[495]]= mxClient[_0xd587[496]]?_0xd587[497]:_0xd587[498];_0x5c29x5[_0xd587[124]][_0xd587[499]]= _0xd587[500];_0x5c29x5[_0xd587[339]]= _0x5c29x2;document[_0xd587[112]][_0xd587[62]](_0x5c29x5);_0x5c29x2=  new mxRectangle(0,0,_0x5c29x5[_0xd587[359]],_0x5c29x5[_0xd587[167]]);document[_0xd587[112]][_0xd587[266]](_0x5c29x5);return _0x5c29x2},getViewXml:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x5= null!= _0x5c29x5?_0x5c29x5:0;_0x5c29x9= null!= _0x5c29x9?_0x5c29x9:0;_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:1;null== _0x5c29x4&& (_0x5c29x4= [_0x5c29x2[_0xd587[502]]()[_0xd587[501]]()]);var _0x5c29xa=_0x5c29x2[_0xd587[249]](),_0x5c29x12=null,_0x5c29x13=_0x5c29xa[_0xd587[503]]();_0x5c29xa[_0xd587[504]](!1);var _0x5c29x14=_0x5c29xa[_0xd587[505]],_0x5c29x15=_0x5c29xa[_0xd587[506]];_0x5c29x2[_0xd587[507]]== mxConstants[_0xd587[508]]?(_0x5c29xa[_0xd587[505]]= document[_0xd587[509]](mxConstants.NS_SVG,_0xd587[449]),_0x5c29xa[_0xd587[510]][_0xd587[62]](_0x5c29xa[_0xd587[505]]),_0x5c29xa[_0xd587[506]]= document[_0xd587[509]](mxConstants.NS_SVG,_0xd587[449])):(_0x5c29xa[_0xd587[505]]= _0x5c29xa[_0xd587[505]][_0xd587[511]](!1),_0x5c29xa[_0xd587[510]][_0xd587[62]](_0x5c29xa[_0xd587[505]]),_0x5c29xa[_0xd587[506]]= _0x5c29xa[_0xd587[506]][_0xd587[511]](!1));_0x5c29xa[_0xd587[510]][_0xd587[62]](_0x5c29xa[_0xd587[506]]);var _0x5c29x16=_0x5c29xa[_0xd587[512]]();_0x5c29xa[_0xd587[513]]=  new mxPoint(_0x5c29x5,_0x5c29x9);_0x5c29x3=  new mxTemporaryCellStates(_0x5c29x2[_0xd587[249]](),_0x5c29x3,_0x5c29x4);try{_0x5c29x12= ( new mxCodec)[_0xd587[514]](_0x5c29x2[_0xd587[249]]())}finally{_0x5c29x3[_0xd587[515]](),_0x5c29xa[_0xd587[513]]= _0x5c29x16,_0x5c29xa[_0xd587[510]][_0xd587[266]](_0x5c29xa[_0xd587[505]]),_0x5c29xa[_0xd587[510]][_0xd587[266]](_0x5c29xa[_0xd587[506]]),_0x5c29xa[_0xd587[505]]= _0x5c29x14,_0x5c29xa[_0xd587[506]]= _0x5c29x15,_0x5c29xa[_0xd587[504]](_0x5c29x13)};return _0x5c29x12},getScaleForPageCount:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){if(1> _0x5c29x2){return 1};_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:mxConstants[_0xd587[516]];_0x5c29x5= null!= _0x5c29x5?_0x5c29x5:0;var _0x5c29x9=_0x5c29x4[_0xd587[117]]- 2* _0x5c29x5;_0x5c29x4= _0x5c29x4[_0xd587[119]]- 2* _0x5c29x5;_0x5c29x5= _0x5c29x3[_0xd587[517]]()[_0xd587[238]]();_0x5c29x3= _0x5c29x3[_0xd587[249]]()[_0xd587[518]]();_0x5c29x5[_0xd587[117]]/= _0x5c29x3;_0x5c29x5[_0xd587[119]]/= _0x5c29x3;_0x5c29x3= _0x5c29x5[_0xd587[117]];_0x5c29x4= _0x5c29x3/ _0x5c29x5[_0xd587[119]]/ (_0x5c29x9/ _0x5c29x4);_0x5c29x5= Math[_0xd587[428]](_0x5c29x2);var _0x5c29xa=Math[_0xd587[428]](_0x5c29x4);_0x5c29x4= _0x5c29x5* _0x5c29xa;_0x5c29x5/= _0x5c29xa;if(1> _0x5c29x4&& _0x5c29x5> _0x5c29x2){var _0x5c29x12=_0x5c29x5/ _0x5c29x2;_0x5c29x5= _0x5c29x2;_0x5c29x4/= _0x5c29x12};1> _0x5c29x5&& _0x5c29x4> _0x5c29x2&& (_0x5c29x12= _0x5c29x4/ _0x5c29x2,_0x5c29x4= _0x5c29x2,_0x5c29x5/= _0x5c29x12);_0x5c29x12= Math[_0xd587[430]](_0x5c29x4)* Math[_0xd587[430]](_0x5c29x5);for(_0x5c29xa= 0;_0x5c29x12> _0x5c29x2;){var _0x5c29x12=Math[_0xd587[519]](_0x5c29x4)/ _0x5c29x4,_0x5c29x13=Math[_0xd587[519]](_0x5c29x5)/ _0x5c29x5;1== _0x5c29x12&& (_0x5c29x12= Math[_0xd587[519]](_0x5c29x4- 1)/ _0x5c29x4);1== _0x5c29x13&& (_0x5c29x13= Math[_0xd587[519]](_0x5c29x5- 1)/ _0x5c29x5);_0x5c29x12= _0x5c29x12> _0x5c29x13?_0x5c29x12:_0x5c29x13;_0x5c29x4*= _0x5c29x12;_0x5c29x5*= _0x5c29x12;_0x5c29x12= Math[_0xd587[430]](_0x5c29x4)* Math[_0xd587[430]](_0x5c29x5);_0x5c29xa++;if(10< _0x5c29xa){break}};return 0.99999* (_0x5c29x9* _0x5c29x4/ _0x5c29x3)},show:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:0;_0x5c29x5= null!= _0x5c29x5?_0x5c29x5:0;null== _0x5c29x3?_0x5c29x3= window[_0xd587[392]]()[_0xd587[395]]:_0x5c29x3[_0xd587[392]]();var _0x5c29x9=_0x5c29x2[_0xd587[517]]();_0x5c29x4= -_0x5c29x9[_0xd587[235]]+ _0x5c29x4;_0x5c29x5= -_0x5c29x9[_0xd587[236]]+ _0x5c29x5;if(mxClient[_0xd587[80]]){for(var _0x5c29x9=_0xd587[520],_0x5c29xa=document[_0xd587[64]](_0xd587[521]),_0x5c29x12=0;_0x5c29x12< _0x5c29xa[_0xd587[67]];_0x5c29x12++){_0x5c29x9+= _0x5c29xa[_0x5c29x12][_0xd587[342]]};_0x5c29x9+= _0xd587[522];for(_0x5c29x12= 0;_0x5c29x12< document[_0xd587[523]][_0xd587[67]];_0x5c29x12++){try{_0x5c29x9+= document[_0xd587[523]](_0x5c29x12)[_0xd587[103]]}catch(h){}};_0x5c29x9+= _0xd587[524];_0x5c29x9+= _0xd587[525];_0x5c29x9+= _0x5c29x2[_0xd587[526]][_0xd587[339]];_0x5c29x9+= _0xd587[527];_0x5c29x9+= _0xd587[528];_0x5c29x3[_0xd587[171]](_0x5c29x9);_0x5c29x3[_0xd587[268]]();_0x5c29x2= _0x5c29x3[_0xd587[112]][_0xd587[64]](_0xd587[529])[0];null!= _0x5c29x2&& (_0x5c29x2[_0xd587[124]][_0xd587[491]]= _0xd587[492],_0x5c29x2[_0xd587[124]][_0xd587[361]]= _0x5c29x4+ _0xd587[168],_0x5c29x2[_0xd587[124]][_0xd587[125]]= _0x5c29x5+ _0xd587[168])}else {_0x5c29x3[_0xd587[171]](_0xd587[530]);_0x5c29x3[_0xd587[171]](_0xd587[531]);_0x5c29xa= document[_0xd587[64]](_0xd587[521]);for(_0x5c29x12= 0;_0x5c29x12< _0x5c29xa[_0xd587[67]];_0x5c29x12++){_0x5c29x3[_0xd587[171]](mxUtils[_0xd587[532]](_0x5c29xa[_0x5c29x12]))};_0x5c29xa= document[_0xd587[64]](_0xd587[54]);for(_0x5c29x12= 0;_0x5c29x12< _0x5c29xa[_0xd587[67]];_0x5c29x12++){_0x5c29x3[_0xd587[171]](mxUtils[_0xd587[532]](_0x5c29xa[_0x5c29x12]))};_0x5c29xa= document[_0xd587[64]](_0xd587[124]);for(_0x5c29x12= 0;_0x5c29x12< _0x5c29xa[_0xd587[67]];_0x5c29x12++){_0x5c29x3[_0xd587[171]](mxUtils[_0xd587[532]](_0x5c29xa[_0x5c29x12]))};_0x5c29x3[_0xd587[171]](_0xd587[533]);_0x5c29x3[_0xd587[171]](_0xd587[534]);_0x5c29x3[_0xd587[268]]();null== _0x5c29x3[_0xd587[112]]&& _0x5c29x3[_0xd587[158]][_0xd587[62]](_0x5c29x3[_0xd587[55]](_0xd587[112]));_0x5c29x3[_0xd587[112]][_0xd587[124]][_0xd587[277]]= _0xd587[278];for(_0x5c29x2= _0x5c29x2[_0xd587[526]][_0xd587[285]];null!= _0x5c29x2;){_0x5c29x12= _0x5c29x2[_0xd587[511]](!0),_0x5c29x3[_0xd587[112]][_0xd587[62]](_0x5c29x12),_0x5c29x2= _0x5c29x2[_0xd587[287]]};_0x5c29x2= _0x5c29x3[_0xd587[64]](_0xd587[449])[0];null!= _0x5c29x2&& (_0x5c29x2[_0xd587[57]](_0xd587[535],_0xd587[536]+ _0x5c29x4+ _0xd587[537]+ _0x5c29x5+ _0xd587[460]),_0x5c29x4= _0x5c29x2[_0xd587[538]],_0x5c29x4[_0xd587[57]](_0xd587[117],_0x5c29x9[_0xd587[117]]+ Math[_0xd587[160]](_0x5c29x9[_0xd587[235]],0)+ 3),_0x5c29x4[_0xd587[57]](_0xd587[119],_0x5c29x9[_0xd587[119]]+ Math[_0xd587[160]](_0x5c29x9[_0xd587[236]],0)+ 3))};mxUtils[_0xd587[272]](_0x5c29x3[_0xd587[112]]);return _0x5c29x3},printScreen:function(_0x5c29x2){var _0x5c29x3=window[_0xd587[392]]();mxUtils[_0xd587[539]](_0x5c29x2,_0x5c29x3[_0xd587[395]]);_0x5c29x2= function(){_0x5c29x3[_0xd587[393]]();_0x5c29x3[_0xd587[540]]();_0x5c29x3[_0xd587[268]]()};mxClient[_0xd587[76]]?_0x5c29x3[_0xd587[261]](_0x5c29x2,500):_0x5c29x2()},popup:function(_0x5c29x2,_0x5c29x3){if(_0x5c29x3){var _0x5c29x4=document[_0xd587[55]](_0xd587[485]);_0x5c29x4[_0xd587[124]][_0xd587[277]]= _0xd587[276];_0x5c29x4[_0xd587[124]][_0xd587[117]]= _0xd587[541];_0x5c29x4[_0xd587[124]][_0xd587[119]]= _0xd587[542];var _0x5c29x5=document[_0xd587[55]](_0xd587[543]);_0x5c29x5[_0xd587[339]]= mxUtils[_0xd587[321]](_0x5c29x2,!1)[_0xd587[230]](/\n/g,_0xd587[545])[_0xd587[230]](/ /g,_0xd587[544]);_0x5c29x4[_0xd587[62]](_0x5c29x5);_0x5c29x4=  new mxWindow(_0xd587[546],_0x5c29x4,document[_0xd587[112]][_0xd587[159]]/ 2- 320,(document[_0xd587[112]][_0xd587[157]]|| document[_0xd587[158]][_0xd587[157]])/ 2- 240,640,480,!1,!0);_0x5c29x4[_0xd587[164]](!0);_0x5c29x4[_0xd587[175]](!0)}else {mxClient[_0xd587[133]]?(_0x5c29x4= window[_0xd587[392]](),_0x5c29x4[_0xd587[395]][_0xd587[171]](_0xd587[547]+ mxUtils[_0xd587[321]](_0x5c29x2)+ _0xd587[548]),_0x5c29x4[_0xd587[395]][_0xd587[268]]()):(_0x5c29x4= window[_0xd587[392]](),_0x5c29x5= _0x5c29x4[_0xd587[395]][_0xd587[55]](_0xd587[543]),_0x5c29x5[_0xd587[339]]= mxUtils[_0xd587[321]](_0x5c29x2,!1)[_0xd587[230]](/\n/g,_0xd587[545])[_0xd587[230]](/ /g,_0xd587[544]),_0x5c29x4[_0xd587[395]][_0xd587[112]][_0xd587[62]](_0x5c29x5))}},alert:function(_0x5c29x2){alert(_0x5c29x2)},prompt:function(_0x5c29x2,_0x5c29x3){return prompt(_0x5c29x2,_0x5c29x3)},confirm:function(_0x5c29x2){return confirm(_0x5c29x2)},error:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=document[_0xd587[55]](_0xd587[485]);_0x5c29x9[_0xd587[124]][_0xd587[549]]= _0xd587[550];var _0x5c29xa=document[_0xd587[55]](_0xd587[466]);_0x5c29xa[_0xd587[57]](_0xd587[390],_0x5c29x5|| mxUtils[_0xd587[551]]);_0x5c29xa[_0xd587[57]](_0xd587[552],_0xd587[553]);_0x5c29xa[_0xd587[124]][_0xd587[123]]= _0xd587[554];_0x5c29x9[_0xd587[62]](_0x5c29xa);_0x5c29x9[_0xd587[62]](document[_0xd587[344]](_0xd587[555]));_0x5c29x9[_0xd587[62]](document[_0xd587[344]](_0xd587[555]));_0x5c29x9[_0xd587[62]](document[_0xd587[344]](_0xd587[555]));mxUtils[_0xd587[53]](_0x5c29x9,_0x5c29x2);_0x5c29x2= document[_0xd587[112]][_0xd587[159]];_0x5c29x5= document[_0xd587[112]][_0xd587[157]]|| document[_0xd587[158]][_0xd587[157]];var _0x5c29x12= new mxWindow(mxResources[_0xd587[203]](mxUtils[_0xd587[556]])|| mxUtils[_0xd587[556]],_0x5c29x9,(_0x5c29x2- _0x5c29x3)/ 2,_0x5c29x5/ 4,_0x5c29x3,null,!1,!0);_0x5c29x4&& (mxUtils[_0xd587[345]](_0x5c29x9),_0x5c29x3= document[_0xd587[55]](_0xd587[346]),_0x5c29x4= document[_0xd587[55]](_0xd587[172]),mxClient[_0xd587[80]]?_0x5c29x4[_0xd587[124]][_0xd587[103]]= _0xd587[557]:_0x5c29x4[_0xd587[57]](_0xd587[124],_0xd587[557]),mxEvent[_0xd587[169]](_0x5c29x4,_0xd587[173],function(_0x5c29x2){_0x5c29x12[_0xd587[515]]()}),mxUtils[_0xd587[53]](_0x5c29x4,mxResources[_0xd587[203]](mxUtils[_0xd587[558]])|| mxUtils[_0xd587[558]]),_0x5c29x3[_0xd587[62]](_0x5c29x4),_0x5c29x9[_0xd587[62]](_0x5c29x3),mxUtils[_0xd587[345]](_0x5c29x9),_0x5c29x12[_0xd587[164]](!0));_0x5c29x12[_0xd587[175]](!0);return _0x5c29x12},makeDraggable:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14,_0x5c29x15){_0x5c29x2=  new mxDragSource(_0x5c29x2,_0x5c29x4);_0x5c29x2[_0xd587[559]]=  new mxPoint(null!= _0x5c29x9?_0x5c29x9:0,null!= _0x5c29xa?_0x5c29xa:mxConstants[_0xd587[560]]);_0x5c29x2[_0xd587[561]]= _0x5c29x12;_0x5c29x2[_0xd587[562]](!1);null!= _0x5c29x14&& (_0x5c29x2[_0xd587[563]]= _0x5c29x14);null!= _0x5c29x15&& (_0x5c29x2[_0xd587[564]]= _0x5c29x15);_0x5c29x2[_0xd587[565]]= function(_0x5c29x2){return _0xd587[279]==  typeof _0x5c29x3?_0x5c29x3(_0x5c29x2):_0x5c29x3};null!= _0x5c29x5&& (_0x5c29x2[_0xd587[566]]= function(){return _0x5c29x5[_0xd587[511]](!0)},_0x5c29x13&& (_0x5c29x2[_0xd587[567]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x5[_0xd587[511]](!0),_0x5c29x4=parseInt(_0x5c29x3[_0xd587[124]][_0xd587[117]]),_0x5c29x9=parseInt(_0x5c29x3[_0xd587[124]][_0xd587[119]]);_0x5c29x3[_0xd587[124]][_0xd587[117]]= Math[_0xd587[488]](_0x5c29x4* _0x5c29x2[_0xd587[441]][_0xd587[255]])+ _0xd587[168];_0x5c29x3[_0xd587[124]][_0xd587[119]]= Math[_0xd587[488]](_0x5c29x9* _0x5c29x2[_0xd587[441]][_0xd587[255]])+ _0xd587[168];return _0x5c29x3}));return _0x5c29x2}},mxConstants={DEFAULT_HOTSPOT:0.3,MIN_HOTSPOT_SIZE:8,MAX_HOTSPOT_SIZE:0,RENDERING_HINT_EXACT:_0xd587[568],RENDERING_HINT_FASTER:_0xd587[569],RENDERING_HINT_FASTEST:_0xd587[570],DIALECT_SVG:_0xd587[571],DIALECT_VML:_0xd587[572],DIALECT_MIXEDHTML:_0xd587[573],DIALECT_PREFERHTML:_0xd587[574],DIALECT_STRICTHTML:_0xd587[575],NS_SVG:_0xd587[576],NS_XHTML:_0xd587[577],NS_XLINK:_0xd587[578],SHADOWCOLOR:_0xd587[579],SHADOW_OFFSET_X:2,SHADOW_OFFSET_Y:3,SHADOW_OPACITY:1,NODETYPE_ELEMENT:1,NODETYPE_ATTRIBUTE:2,NODETYPE_TEXT:3,NODETYPE_CDATA:4,NODETYPE_ENTITY_REFERENCE:5,NODETYPE_ENTITY:6,NODETYPE_PROCESSING_INSTRUCTION:7,NODETYPE_COMMENT:8,NODETYPE_DOCUMENT:9,NODETYPE_DOCUMENTTYPE:10,NODETYPE_DOCUMENT_FRAGMENT:11,NODETYPE_NOTATION:12,TOOLTIP_VERTICAL_OFFSET:16,DEFAULT_VALID_COLOR:_0xd587[580],DEFAULT_INVALID_COLOR:_0xd587[581],HIGHLIGHT_STROKEWIDTH:3,CURSOR_MOVABLE_VERTEX:_0xd587[582],CURSOR_MOVABLE_EDGE:_0xd587[582],CURSOR_LABEL_HANDLE:_0xd587[583],CURSOR_BEND_HANDLE:_0xd587[356],CURSOR_CONNECT:_0xd587[356],HIGHLIGHT_COLOR:_0xd587[580],CONNECT_TARGET_COLOR:_0xd587[584],INVALID_CONNECT_TARGET_COLOR:_0xd587[581],DROP_TARGET_COLOR:_0xd587[584],VALID_COLOR:_0xd587[580],INVALID_COLOR:_0xd587[581],EDGE_SELECTION_COLOR:_0xd587[580],VERTEX_SELECTION_COLOR:_0xd587[580],VERTEX_SELECTION_STROKEWIDTH:1,EDGE_SELECTION_STROKEWIDTH:1,VERTEX_SELECTION_DASHED:!0,EDGE_SELECTION_DASHED:!0,GUIDE_COLOR:_0xd587[581],GUIDE_STROKEWIDTH:1,OUTLINE_COLOR:_0xd587[585],OUTLINE_STROKEWIDTH:mxClient[_0xd587[80]]?2:3,HANDLE_SIZE:7,LABEL_HANDLE_SIZE:4,HANDLE_FILLCOLOR:_0xd587[580],HANDLE_STROKECOLOR:_0xd587[586],LABEL_HANDLE_FILLCOLOR:_0xd587[587],CONNECT_HANDLE_FILLCOLOR:_0xd587[584],LOCKED_HANDLE_FILLCOLOR:_0xd587[581],OUTLINE_HANDLE_FILLCOLOR:_0xd587[588],OUTLINE_HANDLE_STROKECOLOR:_0xd587[589],DEFAULT_FONTFAMILY:_0xd587[590],DEFAULT_FONTSIZE:11,LINE_HEIGHT:1.2,DEFAULT_FONTSTYLE:0,DEFAULT_STARTSIZE:40,DEFAULT_MARKERSIZE:6,DEFAULT_IMAGESIZE:24,ENTITY_SEGMENT:30,RECTANGLE_ROUNDING_FACTOR:0.15,LINE_ARCSIZE:20,ARROW_SPACING:10,ARROW_WIDTH:30,ARROW_SIZE:30,PAGE_FORMAT_A4_PORTRAIT: new mxRectangle(0,0,826,1169),PAGE_FORMAT_A4_LANDSCAPE: new mxRectangle(0,0,1169,826),PAGE_FORMAT_LETTER_PORTRAIT: new mxRectangle(0,0,850,1100),PAGE_FORMAT_LETTER_LANDSCAPE: new mxRectangle(0,0,1100,850),NONE:_0xd587[130],STYLE_PERIMETER:_0xd587[591],STYLE_SOURCE_PORT:_0xd587[592],STYLE_TARGET_PORT:_0xd587[593],STYLE_PORT_CONSTRAINT:_0xd587[594],STYLE_OPACITY:_0xd587[461],STYLE_TEXT_OPACITY:_0xd587[595],STYLE_OVERFLOW:_0xd587[277],STYLE_ORTHOGONAL:_0xd587[596],STYLE_EXIT_X:_0xd587[597],STYLE_EXIT_Y:_0xd587[598],STYLE_EXIT_PERIMETER:_0xd587[599],STYLE_ENTRY_X:_0xd587[600],STYLE_ENTRY_Y:_0xd587[601],STYLE_ENTRY_PERIMETER:_0xd587[602],STYLE_WHITE_SPACE:_0xd587[493],STYLE_ROTATION:_0xd587[603],STYLE_FILLCOLOR:_0xd587[604],STYLE_SWIMLANE_FILLCOLOR:_0xd587[605],STYLE_GRADIENTCOLOR:_0xd587[606],STYLE_GRADIENT_DIRECTION:_0xd587[607],STYLE_STROKECOLOR:_0xd587[608],STYLE_SEPARATORCOLOR:_0xd587[609],STYLE_STROKEWIDTH:_0xd587[610],STYLE_ALIGN:_0xd587[611],STYLE_VERTICAL_ALIGN:_0xd587[123],STYLE_LABEL_POSITION:_0xd587[612],STYLE_VERTICAL_LABEL_POSITION:_0xd587[613],STYLE_IMAGE_ASPECT:_0xd587[614],STYLE_IMAGE_ALIGN:_0xd587[615],STYLE_IMAGE_VERTICAL_ALIGN:_0xd587[616],STYLE_GLASS:_0xd587[617],STYLE_IMAGE:_0xd587[618],STYLE_IMAGE_WIDTH:_0xd587[619],STYLE_IMAGE_HEIGHT:_0xd587[620],STYLE_IMAGE_BACKGROUND:_0xd587[621],STYLE_IMAGE_BORDER:_0xd587[622],STYLE_FLIPH:_0xd587[623],STYLE_FLIPV:_0xd587[624],STYLE_NOLABEL:_0xd587[625],STYLE_NOEDGESTYLE:_0xd587[626],STYLE_LABEL_BACKGROUNDCOLOR:_0xd587[627],STYLE_LABEL_BORDERCOLOR:_0xd587[628],STYLE_LABEL_PADDING:_0xd587[629],STYLE_INDICATOR_SHAPE:_0xd587[630],STYLE_INDICATOR_IMAGE:_0xd587[631],STYLE_INDICATOR_COLOR:_0xd587[632],STYLE_INDICATOR_STROKECOLOR:_0xd587[633],STYLE_INDICATOR_GRADIENTCOLOR:_0xd587[634],STYLE_INDICATOR_SPACING:_0xd587[635],STYLE_INDICATOR_WIDTH:_0xd587[636],STYLE_INDICATOR_HEIGHT:_0xd587[637],STYLE_INDICATOR_DIRECTION:_0xd587[638],STYLE_SHADOW:_0xd587[639],STYLE_SEGMENT:_0xd587[640],STYLE_ENDARROW:_0xd587[641],STYLE_STARTARROW:_0xd587[642],STYLE_ENDSIZE:_0xd587[643],STYLE_STARTSIZE:_0xd587[644],STYLE_SWIMLANE_LINE:_0xd587[645],STYLE_ENDFILL:_0xd587[646],STYLE_STARTFILL:_0xd587[647],STYLE_DASHED:_0xd587[648],STYLE_DASH_PATTERN:_0xd587[649],STYLE_ROUNDED:_0xd587[650],STYLE_CURVED:_0xd587[651],STYLE_ARCSIZE:_0xd587[652],STYLE_SMOOTH:_0xd587[653],STYLE_SOURCE_PERIMETER_SPACING:_0xd587[654],STYLE_TARGET_PERIMETER_SPACING:_0xd587[655],STYLE_PERIMETER_SPACING:_0xd587[656],STYLE_SPACING:_0xd587[657],STYLE_SPACING_TOP:_0xd587[658],STYLE_SPACING_LEFT:_0xd587[659],STYLE_SPACING_BOTTOM:_0xd587[660],STYLE_SPACING_RIGHT:_0xd587[661],STYLE_HORIZONTAL:_0xd587[662],STYLE_DIRECTION:_0xd587[663],STYLE_ELBOW:_0xd587[664],STYLE_FONTCOLOR:_0xd587[665],STYLE_FONTFAMILY:_0xd587[486],STYLE_FONTSIZE:_0xd587[487],STYLE_FONTSTYLE:_0xd587[666],STYLE_AUTOSIZE:_0xd587[667],STYLE_FOLDABLE:_0xd587[668],STYLE_EDITABLE:_0xd587[669],STYLE_BENDABLE:_0xd587[670],STYLE_MOVABLE:_0xd587[671],STYLE_RESIZABLE:_0xd587[672],STYLE_CLONEABLE:_0xd587[673],STYLE_DELETABLE:_0xd587[674],STYLE_SHAPE:_0xd587[253],STYLE_EDGE:_0xd587[675],STYLE_LOOP:_0xd587[676],STYLE_ROUTING_CENTER_X:_0xd587[677],STYLE_ROUTING_CENTER_Y:_0xd587[678],FONT_BOLD:1,FONT_ITALIC:2,FONT_UNDERLINE:4,FONT_SHADOW:8,SHAPE_RECTANGLE:_0xd587[679],SHAPE_ELLIPSE:_0xd587[680],SHAPE_DOUBLE_ELLIPSE:_0xd587[681],SHAPE_RHOMBUS:_0xd587[682],SHAPE_LINE:_0xd587[683],SHAPE_IMAGE:_0xd587[618],SHAPE_ARROW:_0xd587[684],SHAPE_LABEL:_0xd587[685],SHAPE_CYLINDER:_0xd587[686],SHAPE_SWIMLANE:_0xd587[687],SHAPE_CONNECTOR:_0xd587[688],SHAPE_ACTOR:_0xd587[689],SHAPE_CLOUD:_0xd587[690],SHAPE_TRIANGLE:_0xd587[691],SHAPE_HEXAGON:_0xd587[692],ARROW_CLASSIC:_0xd587[693],ARROW_BLOCK:_0xd587[694],ARROW_OPEN:_0xd587[392],ARROW_OVAL:_0xd587[695],ARROW_DIAMOND:_0xd587[696],ARROW_DIAMOND_THIN:_0xd587[697],ALIGN_LEFT:_0xd587[361],ALIGN_CENTER:_0xd587[698],ALIGN_RIGHT:_0xd587[699],ALIGN_TOP:_0xd587[125],ALIGN_MIDDLE:_0xd587[554],ALIGN_BOTTOM:_0xd587[553],DIRECTION_NORTH:_0xd587[700],DIRECTION_SOUTH:_0xd587[701],DIRECTION_EAST:_0xd587[702],DIRECTION_WEST:_0xd587[703],DIRECTION_MASK_NONE:0,DIRECTION_MASK_WEST:1,DIRECTION_MASK_NORTH:2,DIRECTION_MASK_SOUTH:4,DIRECTION_MASK_EAST:8,DIRECTION_MASK_ALL:15,ELBOW_VERTICAL:_0xd587[704],ELBOW_HORIZONTAL:_0xd587[662],EDGESTYLE_ELBOW:_0xd587[705],EDGESTYLE_ENTITY_RELATION:_0xd587[706],EDGESTYLE_LOOP:_0xd587[707],EDGESTYLE_SIDETOSIDE:_0xd587[708],EDGESTYLE_TOPTOBOTTOM:_0xd587[709],EDGESTYLE_ORTHOGONAL:_0xd587[710],EDGESTYLE_SEGMENT:_0xd587[711],PERIMETER_ELLIPSE:_0xd587[712],PERIMETER_RECTANGLE:_0xd587[713],PERIMETER_RHOMBUS:_0xd587[714],PERIMETER_TRIANGLE:_0xd587[715]};function mxEventObject(_0x5c29x2){this[_0xd587[298]]= _0x5c29x2;this[_0xd587[716]]= [];for(var _0x5c29x3=1;_0x5c29x3< arguments[_0xd587[67]];_0x5c29x3+= 2){null!= arguments[_0x5c29x3+ 1]&& (this[_0xd587[716]][arguments[_0x5c29x3]]= arguments[_0x5c29x3+ 1])}}mxEventObject[_0xd587[202]][_0xd587[298]]= null;mxEventObject[_0xd587[202]][_0xd587[716]]= null;mxEventObject[_0xd587[202]][_0xd587[717]]=  !1;mxEventObject[_0xd587[202]][_0xd587[718]]= function(){return this[_0xd587[298]]};mxEventObject[_0xd587[202]][_0xd587[719]]= function(){return this[_0xd587[716]]};mxEventObject[_0xd587[202]][_0xd587[720]]= function(_0x5c29x2){return this[_0xd587[716]][_0x5c29x2]};mxEventObject[_0xd587[202]][_0xd587[721]]= function(){return this[_0xd587[717]]};mxEventObject[_0xd587[202]][_0xd587[722]]= function(){this[_0xd587[717]]=  !0};function mxMouseEvent(_0x5c29x2,_0x5c29x3){this[_0xd587[723]]= _0x5c29x2;this[_0xd587[724]]= _0x5c29x3}mxMouseEvent[_0xd587[202]][_0xd587[717]]=  !1;mxMouseEvent[_0xd587[202]][_0xd587[723]]= null;mxMouseEvent[_0xd587[202]][_0xd587[725]]= null;mxMouseEvent[_0xd587[202]][_0xd587[726]]= null;mxMouseEvent[_0xd587[202]][_0xd587[724]]= null;mxMouseEvent[_0xd587[202]][_0xd587[727]]= function(){return this[_0xd587[723]]};mxMouseEvent[_0xd587[202]][_0xd587[728]]= function(){return mxEvent[_0xd587[728]](this[_0xd587[723]])};mxMouseEvent[_0xd587[202]][_0xd587[729]]= function(_0x5c29x2){if(null!= _0x5c29x2){for(var _0x5c29x3=this[_0xd587[728]]();null!= _0x5c29x3;){if(_0x5c29x3== _0x5c29x2[_0xd587[252]]){return !0};_0x5c29x3= _0x5c29x3[_0xd587[265]]}};return !1};mxMouseEvent[_0xd587[202]][_0xd587[730]]= function(){return mxEvent[_0xd587[731]](this[_0xd587[727]]())};mxMouseEvent[_0xd587[202]][_0xd587[732]]= function(){return mxEvent[_0xd587[733]](this[_0xd587[727]]())};mxMouseEvent[_0xd587[202]][_0xd587[734]]= function(){return this[_0xd587[725]]};mxMouseEvent[_0xd587[202]][_0xd587[735]]= function(){return this[_0xd587[726]]};mxMouseEvent[_0xd587[202]][_0xd587[248]]= function(){return this[_0xd587[724]]};mxMouseEvent[_0xd587[202]][_0xd587[736]]= function(){var _0x5c29x2=this[_0xd587[248]]();return null!= _0x5c29x2?_0x5c29x2[_0xd587[246]]:null};mxMouseEvent[_0xd587[202]][_0xd587[737]]= function(){return mxEvent[_0xd587[737]](this[_0xd587[727]]())};mxMouseEvent[_0xd587[202]][_0xd587[721]]= function(){return this[_0xd587[717]]};mxMouseEvent[_0xd587[202]][_0xd587[722]]= function(_0x5c29x2){(null!= _0x5c29x2?_0x5c29x2:1)&& this[_0xd587[723]][_0xd587[738]]&& this[_0xd587[723]][_0xd587[738]]();this[_0xd587[723]][_0xd587[739]]=  !1;this[_0xd587[717]]=  !0};function mxEventSource(_0x5c29x2){this[_0xd587[740]](_0x5c29x2)}mxEventSource[_0xd587[202]][_0xd587[741]]= null;mxEventSource[_0xd587[202]][_0xd587[742]]=  !0;mxEventSource[_0xd587[202]][_0xd587[743]]= null;mxEventSource[_0xd587[202]][_0xd587[503]]= function(){return this[_0xd587[742]]};mxEventSource[_0xd587[202]][_0xd587[504]]= function(_0x5c29x2){this[_0xd587[742]]= _0x5c29x2};mxEventSource[_0xd587[202]][_0xd587[744]]= function(){return this[_0xd587[743]]};mxEventSource[_0xd587[202]][_0xd587[740]]= function(_0x5c29x2){this[_0xd587[743]]= _0x5c29x2};mxEventSource[_0xd587[202]][_0xd587[169]]= function(_0x5c29x2,_0x5c29x3){null== this[_0xd587[741]]&& (this[_0xd587[741]]= []);this[_0xd587[741]][_0xd587[207]](_0x5c29x2);this[_0xd587[741]][_0xd587[207]](_0x5c29x3)};mxEventSource[_0xd587[202]][_0xd587[745]]= function(_0x5c29x2){if(null!= this[_0xd587[741]]){for(var _0x5c29x3=0;_0x5c29x3< this[_0xd587[741]][_0xd587[67]];){this[_0xd587[741]][_0x5c29x3+ 1]== _0x5c29x2?this[_0xd587[741]][_0xd587[300]](_0x5c29x3,2):_0x5c29x3+= 2}}};mxEventSource[_0xd587[202]][_0xd587[746]]= function(_0x5c29x2,_0x5c29x3){if(null!= this[_0xd587[741]]&& this[_0xd587[503]]()){null== _0x5c29x2&& (_0x5c29x2=  new mxEventObject);null== _0x5c29x3&& (_0x5c29x3= this[_0xd587[744]]());null== _0x5c29x3&& (_0x5c29x3= this);for(var _0x5c29x4=[_0x5c29x3,_0x5c29x2],_0x5c29x5=0;_0x5c29x5< this[_0xd587[741]][_0xd587[67]];_0x5c29x5+= 2){var _0x5c29x9=this[_0xd587[741]][_0x5c29x5];(null== _0x5c29x9|| _0x5c29x9== _0x5c29x2[_0xd587[718]]())&& this[_0xd587[741]][_0x5c29x5+ 1][_0xd587[183]](this,_0x5c29x4)}}};var mxEvent={objects:[],addListener:function(){var _0x5c29x2=function(_0x5c29x2,_0x5c29x4,_0x5c29x5){null== _0x5c29x2[_0xd587[69]]&& (_0x5c29x2[_0xd587[69]]= [],mxEvent[_0xd587[68]][_0xd587[207]](_0x5c29x2));_0x5c29x2[_0xd587[69]][_0xd587[207]]({name:_0x5c29x4,f:_0x5c29x5})};return window[_0xd587[418]]?function(_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x3[_0xd587[418]](_0x5c29x4,_0x5c29x5,!1);_0x5c29x2(_0x5c29x3,_0x5c29x4,_0x5c29x5)}:function(_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x3[_0xd587[108]](_0xd587[747]+ _0x5c29x4,_0x5c29x5);_0x5c29x2(_0x5c29x3,_0x5c29x4,_0x5c29x5)}}(),removeListener:function(){var _0x5c29x2=function(_0x5c29x2,_0x5c29x4,_0x5c29x5){if(null!= _0x5c29x2[_0xd587[69]]){_0x5c29x4= _0x5c29x2[_0xd587[69]][_0xd587[67]];for(var _0x5c29x9=0;_0x5c29x9< _0x5c29x4;_0x5c29x9++){if(_0x5c29x2[_0xd587[69]][_0x5c29x9][_0xd587[748]]== _0x5c29x5){_0x5c29x2[_0xd587[69]][_0xd587[300]](_0x5c29x9,1);break}};0== _0x5c29x2[_0xd587[69]][_0xd587[67]]&& (_0x5c29x2[_0xd587[69]]= null)}};return window[_0xd587[749]]?function(_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x3[_0xd587[749]](_0x5c29x4,_0x5c29x5,!1);_0x5c29x2(_0x5c29x3,_0x5c29x4,_0x5c29x5)}:function(_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x3[_0xd587[750]](_0xd587[747]+ _0x5c29x4,_0x5c29x5);_0x5c29x2(_0x5c29x3,_0x5c29x4,_0x5c29x5)}}(),removeAllListeners:function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[69]];if(null!= _0x5c29x3){for(;0< _0x5c29x3[_0xd587[67]];){var _0x5c29x4=_0x5c29x3[0];mxEvent[_0xd587[745]](_0x5c29x2,_0x5c29x4[_0xd587[298]],_0x5c29x4[_0xd587[748]])}}},addGestureListeners:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){null!= _0x5c29x3&& mxEvent[_0xd587[169]](_0x5c29x2,_0xd587[751],_0x5c29x3);null!= _0x5c29x4&& mxEvent[_0xd587[169]](_0x5c29x2,_0xd587[752],_0x5c29x4);null!= _0x5c29x5&& mxEvent[_0xd587[169]](_0x5c29x2,_0xd587[753],_0x5c29x5);mxClient[_0xd587[754]]&& (null!= _0x5c29x3&& mxEvent[_0xd587[169]](_0x5c29x2,_0xd587[755],_0x5c29x3),null!= _0x5c29x4&& mxEvent[_0xd587[169]](_0x5c29x2,_0xd587[756],_0x5c29x4),null!= _0x5c29x5&& mxEvent[_0xd587[169]](_0x5c29x2,_0xd587[757],_0x5c29x5))},removeGestureListeners:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){null!= _0x5c29x3&& mxEvent[_0xd587[745]](_0x5c29x2,_0xd587[751],_0x5c29x3);null!= _0x5c29x4&& mxEvent[_0xd587[745]](_0x5c29x2,_0xd587[752],_0x5c29x4);null!= _0x5c29x5&& mxEvent[_0xd587[745]](_0x5c29x2,_0xd587[753],_0x5c29x5);mxClient[_0xd587[754]]&& (null!= _0x5c29x3&& mxEvent[_0xd587[745]](_0x5c29x2,_0xd587[755],_0x5c29x3),null!= _0x5c29x4&& mxEvent[_0xd587[745]](_0x5c29x2,_0xd587[756],_0x5c29x4),null!= _0x5c29x5&& mxEvent[_0xd587[745]](_0x5c29x2,_0xd587[757],_0x5c29x5))},redirectMouseEvents:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12){var _0x5c29x13=function(_0x5c29x2){return _0xd587[279]==  typeof _0x5c29x4?_0x5c29x4(_0x5c29x2):_0x5c29x4};mxEvent[_0xd587[759]](_0x5c29x2,function(_0x5c29x2){null!= _0x5c29x5?_0x5c29x5(_0x5c29x2):mxEvent[_0xd587[721]](_0x5c29x2)|| _0x5c29x3[_0xd587[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x5c29x2,_0x5c29x13(_0x5c29x2)))},function(_0x5c29x2){null!= _0x5c29x9?_0x5c29x9(_0x5c29x2):mxEvent[_0xd587[721]](_0x5c29x2)|| _0x5c29x3[_0xd587[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x5c29x2,_0x5c29x13(_0x5c29x2)))},function(_0x5c29x2){null!= _0x5c29xa?_0x5c29xa(_0x5c29x2):mxEvent[_0xd587[721]](_0x5c29x2)|| _0x5c29x3[_0xd587[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x5c29x2,_0x5c29x13(_0x5c29x2)))});mxEvent[_0xd587[169]](_0x5c29x2,_0xd587[760],function(_0x5c29x2){if(null!= _0x5c29x12){_0x5c29x12(_0x5c29x2)}else {if(!mxEvent[_0xd587[721]](_0x5c29x2)){var _0x5c29x4=_0x5c29x13(_0x5c29x2);_0x5c29x3[_0xd587[761]](_0x5c29x2,null!= _0x5c29x4?_0x5c29x4[_0xd587[246]]:null)}}})},release:function(_0x5c29x2){if(null!= _0x5c29x2&& (mxEvent[_0xd587[70]](_0x5c29x2),_0x5c29x2= _0x5c29x2[_0xd587[271]],null!= _0x5c29x2)){for(var _0x5c29x3=_0x5c29x2[_0xd587[67]],_0x5c29x4=0;_0x5c29x4< _0x5c29x3;_0x5c29x4+= 1){mxEvent[_0xd587[762]](_0x5c29x2[_0x5c29x4])}}},addMouseWheelListener:function(_0x5c29x2){if(null!= _0x5c29x2){var _0x5c29x3=function(_0x5c29x3){null== _0x5c29x3&& (_0x5c29x3= window[_0xd587[763]]);var _0x5c29x5=0,_0x5c29x5=mxClient[_0xd587[133]]&& !mxClient[_0xd587[75]]&& !mxClient[_0xd587[76]]?-_0x5c29x3[_0xd587[764]]/ 2:_0x5c29x3[_0xd587[765]]/ 120;0!= _0x5c29x5&& _0x5c29x2(_0x5c29x3,0< _0x5c29x5)};mxClient[_0xd587[133]]?mxEvent[_0xd587[169]](window,mxClient[_0xd587[75]]|| mxClient[_0xd587[76]]?_0xd587[766]:_0xd587[767],_0x5c29x3):mxEvent[_0xd587[169]](document,_0xd587[766],_0x5c29x3)}},disableContextMenu:function(){return mxClient[_0xd587[80]]&& (_0xd587[82]===  typeof document[_0xd587[5]]|| 9> document[_0xd587[5]])?function(_0x5c29x2){mxEvent[_0xd587[169]](_0x5c29x2,_0xd587[768],function(){return !1})}:function(_0x5c29x2){_0x5c29x2[_0xd587[57]](_0xd587[769],_0xd587[770])}}(),getSource:function(_0x5c29x2){return null!= _0x5c29x2[_0xd587[771]]?_0x5c29x2[_0xd587[771]]:_0x5c29x2[_0xd587[772]]},isConsumed:function(_0x5c29x2){return null!= _0x5c29x2[_0xd587[721]]&& _0x5c29x2[_0xd587[721]]},isLeftMouseButton:function(_0x5c29x2){return _0x5c29x2[_0xd587[172]]== (mxClient[_0xd587[80]]&& (_0xd587[82]===  typeof document[_0xd587[5]]|| 9> document[_0xd587[5]])?1:0)},isRightMouseButton:function(_0x5c29x2){return 2== _0x5c29x2[_0xd587[172]]},isPopupTrigger:function(_0x5c29x2){return mxEvent[_0xd587[773]](_0x5c29x2)|| mxEvent[_0xd587[774]](_0x5c29x2)&& !mxEvent[_0xd587[775]](_0x5c29x2)},isShiftDown:function(_0x5c29x2){return null!= _0x5c29x2?_0x5c29x2[_0xd587[776]]:!1},isAltDown:function(_0x5c29x2){return null!= _0x5c29x2?_0x5c29x2[_0xd587[777]]:!1},isControlDown:function(_0x5c29x2){return null!= _0x5c29x2?_0x5c29x2[_0xd587[778]]:!1},isMetaDown:function(_0x5c29x2){return null!= _0x5c29x2?_0x5c29x2[_0xd587[779]]:!1},getMainEvent:function(_0x5c29x2){(_0xd587[755]== _0x5c29x2[_0xd587[60]]|| _0xd587[756]== _0x5c29x2[_0xd587[60]])&& null!= _0x5c29x2[_0xd587[780]]&& null!= _0x5c29x2[_0xd587[780]][0]?_0x5c29x2= _0x5c29x2[_0xd587[780]][0]:_0xd587[757]== _0x5c29x2[_0xd587[60]]&& (null!= _0x5c29x2[_0xd587[781]]&& null!= _0x5c29x2[_0xd587[781]][0])&& (_0x5c29x2= _0x5c29x2[_0xd587[781]][0]);return _0x5c29x2},getClientX:function(_0x5c29x2){return mxEvent[_0xd587[783]](_0x5c29x2)[_0xd587[782]]},getClientY:function(_0x5c29x2){return mxEvent[_0xd587[783]](_0x5c29x2)[_0xd587[784]]},consume:function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:!0;if(null!= _0x5c29x3?_0x5c29x3:1){_0x5c29x2[_0xd587[738]]?(_0x5c29x4&& _0x5c29x2[_0xd587[785]](),_0x5c29x2[_0xd587[738]]()):_0x5c29x4&& (_0x5c29x2[_0xd587[786]]=  !0)};_0x5c29x2[_0xd587[721]]=  !0;_0x5c29x2[_0xd587[739]]=  !1},LABEL_HANDLE:-1,ROTATION_HANDLE:-2,MOUSE_DOWN:_0xd587[787],MOUSE_MOVE:_0xd587[788],MOUSE_UP:_0xd587[789],ACTIVATE:_0xd587[790],RESIZE_START:_0xd587[791],RESIZE:_0xd587[129],RESIZE_END:_0xd587[792],MOVE_START:_0xd587[793],MOVE:_0xd587[582],MOVE_END:_0xd587[794],PAN_START:_0xd587[795],PAN:_0xd587[796],PAN_END:_0xd587[797],MINIMIZE:_0xd587[798],NORMALIZE:_0xd587[799],MAXIMIZE:_0xd587[800],HIDE:_0xd587[801],SHOW:_0xd587[539],CLOSE:_0xd587[268],DESTROY:_0xd587[515],REFRESH:_0xd587[802],SIZE:_0xd587[803],SELECT:_0xd587[804],FIRED:_0xd587[805],GET:_0xd587[203],RECEIVE:_0xd587[806],CONNECT:_0xd587[807],DISCONNECT:_0xd587[808],SUSPEND:_0xd587[809],RESUME:_0xd587[810],MARK:_0xd587[811],SESSION:_0xd587[812],ROOT:_0xd587[813],POST:_0xd587[814],OPEN:_0xd587[392],SAVE:_0xd587[815],BEFORE_ADD_VERTEX:_0xd587[816],ADD_VERTEX:_0xd587[817],AFTER_ADD_VERTEX:_0xd587[818],DONE:_0xd587[819],EXECUTE:_0xd587[350],EXECUTED:_0xd587[820],BEGIN_UPDATE:_0xd587[473],START_EDIT:_0xd587[821],END_UPDATE:_0xd587[476],END_EDIT:_0xd587[822],BEFORE_UNDO:_0xd587[823],UNDO:_0xd587[824],REDO:_0xd587[825],CHANGE:_0xd587[826],NOTIFY:_0xd587[827],LAYOUT_CELLS:_0xd587[828],CLICK:_0xd587[173],SCALE:_0xd587[255],TRANSLATE:_0xd587[513],SCALE_AND_TRANSLATE:_0xd587[829],UP:_0xd587[830],DOWN:_0xd587[831],ADD:_0xd587[99],REMOVE:_0xd587[205],CLEAR:_0xd587[200],ADD_CELLS:_0xd587[832],CELLS_ADDED:_0xd587[833],MOVE_CELLS:_0xd587[834],CELLS_MOVED:_0xd587[835],RESIZE_CELLS:_0xd587[836],CELLS_RESIZED:_0xd587[837],TOGGLE_CELLS:_0xd587[838],CELLS_TOGGLED:_0xd587[839],ORDER_CELLS:_0xd587[840],CELLS_ORDERED:_0xd587[841],REMOVE_CELLS:_0xd587[842],CELLS_REMOVED:_0xd587[843],GROUP_CELLS:_0xd587[844],UNGROUP_CELLS:_0xd587[845],REMOVE_CELLS_FROM_PARENT:_0xd587[846],FOLD_CELLS:_0xd587[847],CELLS_FOLDED:_0xd587[848],ALIGN_CELLS:_0xd587[849],LABEL_CHANGED:_0xd587[850],CONNECT_CELL:_0xd587[851],CELL_CONNECTED:_0xd587[852],SPLIT_EDGE:_0xd587[853],FLIP_EDGE:_0xd587[854],START_EDITING:_0xd587[855],ADD_OVERLAY:_0xd587[856],REMOVE_OVERLAY:_0xd587[857],UPDATE_CELL_SIZE:_0xd587[858],ESCAPE:_0xd587[859],CLICK:_0xd587[173],DOUBLE_CLICK:_0xd587[860],START:_0xd587[861],RESET:_0xd587[862]};function mxXmlRequest(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){this[_0xd587[863]]= _0x5c29x2;this[_0xd587[864]]= _0x5c29x3;this[_0xd587[865]]= _0x5c29x4|| _0xd587[866];this[_0xd587[307]]= null!= _0x5c29x5?_0x5c29x5:!0;this[_0xd587[867]]= _0x5c29x9;this[_0xd587[868]]= _0x5c29xa}mxXmlRequest[_0xd587[202]][_0xd587[863]]= null;mxXmlRequest[_0xd587[202]][_0xd587[864]]= null;mxXmlRequest[_0xd587[202]][_0xd587[865]]= null;mxXmlRequest[_0xd587[202]][_0xd587[307]]= null;mxXmlRequest[_0xd587[202]][_0xd587[869]]=  !1;mxXmlRequest[_0xd587[202]][_0xd587[867]]= null;mxXmlRequest[_0xd587[202]][_0xd587[868]]= null;mxXmlRequest[_0xd587[202]][_0xd587[870]]= null;mxXmlRequest[_0xd587[202]][_0xd587[871]]= function(){return this[_0xd587[869]]};mxXmlRequest[_0xd587[202]][_0xd587[872]]= function(_0x5c29x2){this[_0xd587[869]]= _0x5c29x2};mxXmlRequest[_0xd587[202]][_0xd587[221]]= function(){return this[_0xd587[870]][_0xd587[873]]};mxXmlRequest[_0xd587[202]][_0xd587[220]]= function(){return 4== this[_0xd587[870]][_0xd587[417]]};mxXmlRequest[_0xd587[202]][_0xd587[874]]= function(){var _0x5c29x2=this[_0xd587[875]]();return null!= _0x5c29x2?_0x5c29x2[_0xd587[158]]:null};mxXmlRequest[_0xd587[202]][_0xd587[875]]= function(){var _0x5c29x2=this[_0xd587[870]][_0xd587[876]];if(9<= document[_0xd587[5]]|| null== _0x5c29x2|| null== _0x5c29x2[_0xd587[158]]){_0x5c29x2= mxUtils[_0xd587[877]](this[_0xd587[870]][_0xd587[873]])};return _0x5c29x2};mxXmlRequest[_0xd587[202]][_0xd587[221]]= function(){return this[_0xd587[870]][_0xd587[873]]};mxXmlRequest[_0xd587[202]][_0xd587[878]]= function(){return this[_0xd587[870]][_0xd587[879]]};mxXmlRequest[_0xd587[202]][_0xd587[385]]= function(){if(window[_0xd587[880]]){return function(){var _0x5c29x2= new XMLHttpRequest;this[_0xd587[871]]()&& _0x5c29x2[_0xd587[881]]&& _0x5c29x2[_0xd587[881]](_0xd587[882]);return _0x5c29x2}};if(_0xd587[82]!=  typeof ActiveXObject){return function(){return  new ActiveXObject(_0xd587[883])}}}();mxXmlRequest[_0xd587[202]][_0xd587[414]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[870]]= this[_0xd587[385]]();null!= this[_0xd587[870]]&& (null!= _0x5c29x2&& (this[_0xd587[870]][_0xd587[416]]= mxUtils[_0xd587[885]](this,function(){this[_0xd587[220]]()&& (_0x5c29x2(this),this[_0xd587[884]]= null)})),this[_0xd587[870]][_0xd587[392]](this[_0xd587[865]],this[_0xd587[863]],this[_0xd587[307]],this[_0xd587[867]],this[_0xd587[868]]),this[_0xd587[886]](this[_0xd587[870]],this[_0xd587[864]]),this[_0xd587[870]][_0xd587[414]](this[_0xd587[864]]))};mxXmlRequest[_0xd587[202]][_0xd587[886]]= function(_0x5c29x2,_0x5c29x3){null!= _0x5c29x3&& _0x5c29x2[_0xd587[889]](_0xd587[887],_0xd587[888])};mxXmlRequest[_0xd587[202]][_0xd587[415]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x2= _0x5c29x2|| document;var _0x5c29x4=null;_0x5c29x2== document&& (_0x5c29x4= window[_0xd587[890]],window[_0xd587[890]]= null);var _0x5c29x5=_0x5c29x2[_0xd587[55]](_0xd587[891]);_0x5c29x5[_0xd587[57]](_0xd587[865],this[_0xd587[865]]);_0x5c29x5[_0xd587[57]](_0xd587[892],this[_0xd587[863]]);null!= _0x5c29x3&& _0x5c29x5[_0xd587[57]](_0xd587[772],_0x5c29x3);_0x5c29x5[_0xd587[124]][_0xd587[495]]= _0xd587[130];_0x5c29x5[_0xd587[124]][_0xd587[187]]= _0xd587[188];for(var _0x5c29x9=0< this[_0xd587[864]][_0xd587[2]](_0xd587[893])?this[_0xd587[864]][_0xd587[224]](_0xd587[893]):this[_0xd587[864]][_0xd587[224]](),_0x5c29xa=0;_0x5c29xa< _0x5c29x9[_0xd587[67]];_0x5c29xa++){var _0x5c29x12=_0x5c29x9[_0x5c29xa][_0xd587[2]](_0xd587[226]);if(0< _0x5c29x12){var _0x5c29x13=_0x5c29x9[_0x5c29xa][_0xd587[85]](0,_0x5c29x12),_0x5c29x14=_0x5c29x9[_0x5c29xa][_0xd587[85]](_0x5c29x12+ 1),_0x5c29x12=_0x5c29x2[_0xd587[55]](_0xd587[126]);_0x5c29x12[_0xd587[57]](_0xd587[298],_0x5c29x13);_0x5c29x14= _0x5c29x14[_0xd587[230]](/\n/g,_0xd587[336]);_0x5c29x13= _0x5c29x2[_0xd587[344]](_0x5c29x14);_0x5c29x12[_0xd587[62]](_0x5c29x13);_0x5c29x5[_0xd587[62]](_0x5c29x12)}};_0x5c29x2[_0xd587[112]][_0xd587[62]](_0x5c29x5);_0x5c29x5[_0xd587[894]]();_0x5c29x2[_0xd587[112]][_0xd587[266]](_0x5c29x5);null!= _0x5c29x4&& (window[_0xd587[890]]= _0x5c29x4)};var mxClipboard={STEPSIZE:10,insertCount:1,cells:null,isEmpty:function(){return null== mxClipboard[_0xd587[895]]},cut:function(_0x5c29x2,_0x5c29x3){_0x5c29x3= mxClipboard[_0xd587[149]](_0x5c29x2,_0x5c29x3);mxClipboard[_0xd587[896]]= 0;mxClipboard[_0xd587[842]](_0x5c29x2,_0x5c29x3);return _0x5c29x3},removeCells:function(_0x5c29x2,_0x5c29x3){_0x5c29x2[_0xd587[842]](_0x5c29x3)},copy:function(_0x5c29x2,_0x5c29x3){_0x5c29x3= _0x5c29x3|| _0x5c29x2[_0xd587[897]]();var _0x5c29x4=_0x5c29x2[_0xd587[898]](_0x5c29x3);mxClipboard[_0xd587[896]]= 1;mxClipboard[_0xd587[895]]= _0x5c29x2[_0xd587[899]](_0x5c29x4);return _0x5c29x4},paste:function(_0x5c29x2){if(null!= mxClipboard[_0xd587[895]]){var _0x5c29x3=_0x5c29x2[_0xd587[900]](mxClipboard[_0xd587[895]]),_0x5c29x4=mxClipboard[_0xd587[896]]* mxClipboard[_0xd587[901]],_0x5c29x5=_0x5c29x2[_0xd587[902]](),_0x5c29x3=_0x5c29x2[_0xd587[903]](_0x5c29x3,_0x5c29x4,_0x5c29x4,_0x5c29x5);mxClipboard[_0xd587[896]]++;_0x5c29x2[_0xd587[904]](_0x5c29x3)}}};function mxWindow(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14,_0x5c29x15){null!= _0x5c29x3&& (_0x5c29x12= null!= _0x5c29x12?_0x5c29x12:!0,this[_0xd587[905]]= _0x5c29x3,this[_0xd587[176]](_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x15),this[_0xd587[906]](),this[_0xd587[907]](),this[_0xd587[908]](),this[_0xd587[909]](_0x5c29x12),this[_0xd587[910]](_0x5c29x2),(null== _0x5c29x13|| _0x5c29x13)&& this[_0xd587[911]](),null!= _0x5c29x14&& null!= _0x5c29x14[_0xd587[265]]?_0x5c29x14[_0xd587[265]][_0xd587[912]](this[_0xd587[485]],_0x5c29x14):document[_0xd587[112]][_0xd587[62]](this[_0xd587[485]]))}mxWindow[_0xd587[202]]=  new mxEventSource;mxWindow[_0xd587[202]][_0xd587[196]]= mxWindow;mxWindow[_0xd587[202]][_0xd587[913]]= mxClient[_0xd587[88]]+ _0xd587[914];mxWindow[_0xd587[202]][_0xd587[915]]= mxClient[_0xd587[88]]+ _0xd587[916];mxWindow[_0xd587[202]][_0xd587[917]]= mxClient[_0xd587[88]]+ _0xd587[918];mxWindow[_0xd587[202]][_0xd587[919]]= mxClient[_0xd587[88]]+ _0xd587[920];mxWindow[_0xd587[202]][_0xd587[921]]= mxClient[_0xd587[88]]+ _0xd587[922];mxWindow[_0xd587[202]][_0xd587[189]]=  !1;mxWindow[_0xd587[202]][_0xd587[905]]=  !1;mxWindow[_0xd587[202]][_0xd587[923]]=  new mxRectangle(0,0,50,40);mxWindow[_0xd587[202]][_0xd587[924]]=  !1;mxWindow[_0xd587[202]][_0xd587[905]]=  !1;mxWindow[_0xd587[202]][_0xd587[165]]=  !0;mxWindow[_0xd587[202]][_0xd587[176]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x9= null!= _0x5c29x9?_0x5c29x9:_0xd587[925];this[_0xd587[485]]= document[_0xd587[55]](_0xd587[485]);this[_0xd587[485]][_0xd587[926]]= _0x5c29x9;this[_0xd587[485]][_0xd587[124]][_0xd587[361]]= _0x5c29x2+ _0xd587[168];this[_0xd587[485]][_0xd587[124]][_0xd587[125]]= _0x5c29x3+ _0xd587[168];this[_0xd587[116]]= document[_0xd587[55]](_0xd587[116]);this[_0xd587[116]][_0xd587[926]]= _0x5c29x9;null!= _0x5c29x4&& (mxClient[_0xd587[80]]|| (this[_0xd587[485]][_0xd587[124]][_0xd587[117]]= _0x5c29x4+ _0xd587[168]),this[_0xd587[116]][_0xd587[124]][_0xd587[117]]= _0x5c29x4+ _0xd587[168]);null!= _0x5c29x5&& (mxClient[_0xd587[80]]|| (this[_0xd587[485]][_0xd587[124]][_0xd587[119]]= _0x5c29x5+ _0xd587[168]),this[_0xd587[116]][_0xd587[124]][_0xd587[119]]= _0x5c29x5+ _0xd587[168]);_0x5c29x2= document[_0xd587[55]](_0xd587[120]);_0x5c29x3= document[_0xd587[55]](_0xd587[121]);this[_0xd587[924]]= document[_0xd587[55]](_0xd587[122]);this[_0xd587[924]][_0xd587[926]]= _0x5c29x9+ _0xd587[927];_0x5c29x3[_0xd587[62]](this[_0xd587[924]]);_0x5c29x2[_0xd587[62]](_0x5c29x3);_0x5c29x3= document[_0xd587[55]](_0xd587[121]);this[_0xd587[122]]= document[_0xd587[55]](_0xd587[122]);this[_0xd587[122]][_0xd587[926]]= _0x5c29x9+ _0xd587[928];this[_0xd587[929]]= document[_0xd587[55]](_0xd587[485]);this[_0xd587[929]][_0xd587[926]]= _0x5c29x9+ _0xd587[928];this[_0xd587[929]][_0xd587[124]][_0xd587[117]]= _0xd587[118];this[_0xd587[929]][_0xd587[62]](this[_0xd587[905]]);if(mxClient[_0xd587[80]]|| _0xd587[529]!= this[_0xd587[905]][_0xd587[301]][_0xd587[36]]()){this[_0xd587[929]][_0xd587[124]][_0xd587[119]]= _0xd587[118]};this[_0xd587[122]][_0xd587[62]](this[_0xd587[929]]);_0x5c29x3[_0xd587[62]](this[_0xd587[122]]);_0x5c29x2[_0xd587[62]](_0x5c29x3);this[_0xd587[116]][_0xd587[62]](_0x5c29x2);this[_0xd587[485]][_0xd587[62]](this[_0xd587[116]]);_0x5c29x9= mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[790]]()});mxEvent[_0xd587[169]](this[_0xd587[924]],_0xd587[751],_0x5c29x9);mxEvent[_0xd587[169]](this[_0xd587[116]],_0xd587[751],_0x5c29x9);mxClient[_0xd587[754]]&& (mxEvent[_0xd587[169]](this[_0xd587[924]],_0xd587[755],_0x5c29x9),mxEvent[_0xd587[169]](this[_0xd587[116]],_0xd587[755],_0x5c29x9));this[_0xd587[801]]()};mxWindow[_0xd587[202]][_0xd587[910]]= function(_0x5c29x2){for(var _0x5c29x3=this[_0xd587[924]][_0xd587[285]];null!= _0x5c29x3;){var _0x5c29x4=_0x5c29x3[_0xd587[287]];_0x5c29x3[_0xd587[288]]== mxConstants[_0xd587[317]]&& _0x5c29x3[_0xd587[265]][_0xd587[266]](_0x5c29x3);_0x5c29x3= _0x5c29x4};mxUtils[_0xd587[53]](this[_0xd587[924]],_0x5c29x2|| _0xd587[110])};mxWindow[_0xd587[202]][_0xd587[162]]= function(_0x5c29x2){0> navigator[_0xd587[3]][_0xd587[2]](_0xd587[186])&& (this[_0xd587[929]][_0xd587[124]][_0xd587[277]]= _0x5c29x2?_0xd587[278]:_0xd587[188])};mxWindow[_0xd587[202]][_0xd587[790]]= function(){if(mxWindow[_0xd587[930]]!= this){var _0x5c29x2=mxUtils[_0xd587[275]](this[_0xd587[166]]()),_0x5c29x2=null!= _0x5c29x2?_0x5c29x2[_0xd587[931]]:3;if(mxWindow[_0xd587[930]]){var _0x5c29x3=mxWindow[_0xd587[930]][_0xd587[166]]();null!= _0x5c29x3&& null!= _0x5c29x3[_0xd587[124]]&& (_0x5c29x3[_0xd587[124]][_0xd587[931]]= _0x5c29x2)};_0x5c29x3= mxWindow[_0xd587[930]];this[_0xd587[166]]()[_0xd587[124]][_0xd587[931]]= parseInt(_0x5c29x2)+ 1;mxWindow[_0xd587[930]]= this;this[_0xd587[746]]( new mxEventObject(mxEvent.ACTIVATE,_0xd587[932],_0x5c29x3))}};mxWindow[_0xd587[202]][_0xd587[166]]= function(){return this[_0xd587[485]]};mxWindow[_0xd587[202]][_0xd587[933]]= function(){mxUtils[_0xd587[933]](this[_0xd587[485]])};mxWindow[_0xd587[202]][_0xd587[934]]= function(){return null!= this[_0xd587[129]]?_0xd587[130]!= this[_0xd587[129]][_0xd587[124]][_0xd587[495]]:!1};mxWindow[_0xd587[202]][_0xd587[163]]= function(_0x5c29x2){_0x5c29x2?null== this[_0xd587[129]]?(this[_0xd587[129]]= document[_0xd587[55]](_0xd587[466]),this[_0xd587[129]][_0xd587[124]][_0xd587[491]]= _0xd587[492],this[_0xd587[129]][_0xd587[124]][_0xd587[553]]= _0xd587[935],this[_0xd587[129]][_0xd587[124]][_0xd587[699]]= _0xd587[935],this[_0xd587[129]][_0xd587[57]](_0xd587[390],mxClient[_0xd587[88]]+ _0xd587[922]),this[_0xd587[129]][_0xd587[124]][_0xd587[270]]= _0xd587[936],mxEvent[_0xd587[759]](this[_0xd587[129]],mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[790]]();var _0x5c29x4=mxEvent[_0xd587[731]](_0x5c29x2),_0x5c29x5=mxEvent[_0xd587[733]](_0x5c29x2),_0x5c29x9=this[_0xd587[485]][_0xd587[359]],_0x5c29xa=this[_0xd587[485]][_0xd587[167]],_0x5c29x12=mxUtils[_0xd587[885]](this,function(_0x5c29x2){var _0x5c29x3=mxEvent[_0xd587[731]](_0x5c29x2)- _0x5c29x4,_0x5c29x12=mxEvent[_0xd587[733]](_0x5c29x2)- _0x5c29x5;this[_0xd587[937]](_0x5c29x9+ _0x5c29x3,_0x5c29xa+ _0x5c29x12);this[_0xd587[746]]( new mxEventObject(mxEvent.RESIZE,_0xd587[763],_0x5c29x2));mxEvent[_0xd587[722]](_0x5c29x2)}),_0x5c29x13=mxUtils[_0xd587[885]](this,function(_0x5c29x2){mxEvent[_0xd587[938]](document,null,_0x5c29x12,_0x5c29x13);this[_0xd587[746]]( new mxEventObject(mxEvent.RESIZE_END,_0xd587[763],_0x5c29x2));mxEvent[_0xd587[722]](_0x5c29x2)});mxEvent[_0xd587[759]](document,null,_0x5c29x12,_0x5c29x13);this[_0xd587[746]]( new mxEventObject(mxEvent.RESIZE_START,_0xd587[763],_0x5c29x2));mxEvent[_0xd587[722]](_0x5c29x2)}),null,null),this[_0xd587[485]][_0xd587[62]](this[_0xd587[129]])):this[_0xd587[129]][_0xd587[124]][_0xd587[495]]= _0xd587[497]:null!= this[_0xd587[129]]&& (this[_0xd587[129]][_0xd587[124]][_0xd587[495]]= _0xd587[130])};mxWindow[_0xd587[202]][_0xd587[937]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x2= Math[_0xd587[160]](this[_0xd587[923]][_0xd587[117]],_0x5c29x2);_0x5c29x3= Math[_0xd587[160]](this[_0xd587[923]][_0xd587[119]],_0x5c29x3);mxClient[_0xd587[80]]|| (this[_0xd587[485]][_0xd587[124]][_0xd587[117]]= _0x5c29x2+ _0xd587[168],this[_0xd587[485]][_0xd587[124]][_0xd587[119]]= _0x5c29x3+ _0xd587[168]);this[_0xd587[116]][_0xd587[124]][_0xd587[117]]= _0x5c29x2+ _0xd587[168];this[_0xd587[116]][_0xd587[124]][_0xd587[119]]= _0x5c29x3+ _0xd587[168];mxClient[_0xd587[80]]|| (this[_0xd587[929]][_0xd587[124]][_0xd587[119]]= this[_0xd587[485]][_0xd587[167]]- this[_0xd587[924]][_0xd587[167]]- 2+ _0xd587[168])};mxWindow[_0xd587[202]][_0xd587[909]]= function(_0x5c29x2){this[_0xd587[798]][_0xd587[124]][_0xd587[495]]= _0x5c29x2?_0xd587[110]:_0xd587[130]};mxWindow[_0xd587[202]][_0xd587[939]]= function(){return  new mxRectangle(0,0,0,this[_0xd587[924]][_0xd587[167]])};mxWindow[_0xd587[202]][_0xd587[907]]= function(){this[_0xd587[798]]= document[_0xd587[55]](_0xd587[466]);this[_0xd587[798]][_0xd587[57]](_0xd587[390],this[_0xd587[915]]);this[_0xd587[798]][_0xd587[57]](_0xd587[611],_0xd587[699]);this[_0xd587[798]][_0xd587[57]](_0xd587[924],_0xd587[940]);this[_0xd587[798]][_0xd587[124]][_0xd587[270]]= _0xd587[356];this[_0xd587[798]][_0xd587[124]][_0xd587[941]]= _0xd587[942];this[_0xd587[798]][_0xd587[124]][_0xd587[495]]= _0xd587[130];this[_0xd587[924]][_0xd587[62]](this[_0xd587[798]]);var _0x5c29x2=!1,_0x5c29x3=null,_0x5c29x4=null,_0x5c29x5=mxUtils[_0xd587[885]](this,function(_0x5c29x5){this[_0xd587[790]]();if(_0x5c29x2){_0x5c29x2=  !1,this[_0xd587[798]][_0xd587[57]](_0xd587[390],this[_0xd587[915]]),this[_0xd587[798]][_0xd587[57]](_0xd587[924],_0xd587[940]),this[_0xd587[929]][_0xd587[124]][_0xd587[495]]= _0xd587[110],this[_0xd587[800]][_0xd587[124]][_0xd587[495]]= _0x5c29x3,mxClient[_0xd587[80]]|| (this[_0xd587[485]][_0xd587[124]][_0xd587[119]]= _0x5c29x4),this[_0xd587[116]][_0xd587[124]][_0xd587[119]]= _0x5c29x4,null!= this[_0xd587[129]]&& (this[_0xd587[129]][_0xd587[124]][_0xd587[187]]= _0xd587[110]),this[_0xd587[746]]( new mxEventObject(mxEvent.NORMALIZE,_0xd587[763],_0x5c29x5))}else {_0x5c29x2=  !0;this[_0xd587[798]][_0xd587[57]](_0xd587[390],this[_0xd587[917]]);this[_0xd587[798]][_0xd587[57]](_0xd587[924],_0xd587[943]);this[_0xd587[929]][_0xd587[124]][_0xd587[495]]= _0xd587[130];_0x5c29x3= this[_0xd587[800]][_0xd587[124]][_0xd587[495]];this[_0xd587[800]][_0xd587[124]][_0xd587[495]]= _0xd587[130];_0x5c29x4= this[_0xd587[116]][_0xd587[124]][_0xd587[119]];var _0x5c29xa=this[_0xd587[939]]();0< _0x5c29xa[_0xd587[119]]&& (mxClient[_0xd587[80]]|| (this[_0xd587[485]][_0xd587[124]][_0xd587[119]]= _0x5c29xa[_0xd587[119]]+ _0xd587[168]),this[_0xd587[116]][_0xd587[124]][_0xd587[119]]= _0x5c29xa[_0xd587[119]]+ _0xd587[168]);0< _0x5c29xa[_0xd587[117]]&& (mxClient[_0xd587[80]]|| (this[_0xd587[485]][_0xd587[124]][_0xd587[117]]= _0x5c29xa[_0xd587[117]]+ _0xd587[168]),this[_0xd587[116]][_0xd587[124]][_0xd587[117]]= _0x5c29xa[_0xd587[117]]+ _0xd587[168]);null!= this[_0xd587[129]]&& (this[_0xd587[129]][_0xd587[124]][_0xd587[187]]= _0xd587[188]);this[_0xd587[746]]( new mxEventObject(mxEvent.MINIMIZE,_0xd587[763],_0x5c29x5))};mxEvent[_0xd587[722]](_0x5c29x5)});mxEvent[_0xd587[169]](this[_0xd587[798]],_0xd587[751],_0x5c29x5);mxClient[_0xd587[754]]&& mxEvent[_0xd587[169]](this[_0xd587[798]],_0xd587[755],_0x5c29x5)};mxWindow[_0xd587[202]][_0xd587[161]]= function(_0x5c29x2){this[_0xd587[800]][_0xd587[124]][_0xd587[495]]= _0x5c29x2?_0xd587[110]:_0xd587[130]};mxWindow[_0xd587[202]][_0xd587[906]]= function(){this[_0xd587[800]]= document[_0xd587[55]](_0xd587[466]);this[_0xd587[800]][_0xd587[57]](_0xd587[390],this[_0xd587[919]]);this[_0xd587[800]][_0xd587[57]](_0xd587[611],_0xd587[699]);this[_0xd587[800]][_0xd587[57]](_0xd587[924],_0xd587[944]);this[_0xd587[800]][_0xd587[124]][_0xd587[270]]= _0xd587[583];this[_0xd587[800]][_0xd587[124]][_0xd587[945]]= _0xd587[942];this[_0xd587[800]][_0xd587[124]][_0xd587[270]]= _0xd587[356];this[_0xd587[800]][_0xd587[124]][_0xd587[495]]= _0xd587[130];this[_0xd587[924]][_0xd587[62]](this[_0xd587[800]]);var _0x5c29x2=!1,_0x5c29x3=null,_0x5c29x4=null,_0x5c29x5=null,_0x5c29x9=null,_0x5c29xa=mxUtils[_0xd587[885]](this,function(_0x5c29xa){this[_0xd587[790]]();if(_0xd587[130]!= this[_0xd587[800]][_0xd587[124]][_0xd587[495]]){if(_0x5c29x2){_0x5c29x2=  !1;this[_0xd587[800]][_0xd587[57]](_0xd587[390],this[_0xd587[919]]);this[_0xd587[800]][_0xd587[57]](_0xd587[924],_0xd587[944]);this[_0xd587[929]][_0xd587[124]][_0xd587[495]]= _0xd587[110];this[_0xd587[798]][_0xd587[124]][_0xd587[187]]= _0xd587[110];this[_0xd587[485]][_0xd587[124]][_0xd587[361]]= _0x5c29x3+ _0xd587[168];this[_0xd587[485]][_0xd587[124]][_0xd587[125]]= _0x5c29x4+ _0xd587[168];if(!mxClient[_0xd587[80]]&& (this[_0xd587[485]][_0xd587[124]][_0xd587[119]]= _0x5c29x5,this[_0xd587[485]][_0xd587[124]][_0xd587[117]]= _0x5c29x9,_0x5c29x13= mxUtils[_0xd587[275]](this[_0xd587[929]]),_0xd587[278]== _0x5c29x13[_0xd587[277]]|| null!= this[_0xd587[129]])){this[_0xd587[929]][_0xd587[124]][_0xd587[119]]= this[_0xd587[485]][_0xd587[167]]- this[_0xd587[924]][_0xd587[167]]- 2+ _0xd587[168]};this[_0xd587[116]][_0xd587[124]][_0xd587[119]]= _0x5c29x5;this[_0xd587[116]][_0xd587[124]][_0xd587[117]]= _0x5c29x9;null!= this[_0xd587[129]]&& (this[_0xd587[129]][_0xd587[124]][_0xd587[187]]= _0xd587[110]);this[_0xd587[746]]( new mxEventObject(mxEvent.NORMALIZE,_0xd587[763],_0x5c29xa))}else {_0x5c29x2=  !0;this[_0xd587[800]][_0xd587[57]](_0xd587[390],this[_0xd587[917]]);this[_0xd587[800]][_0xd587[57]](_0xd587[924],_0xd587[943]);this[_0xd587[929]][_0xd587[124]][_0xd587[495]]= _0xd587[110];this[_0xd587[798]][_0xd587[124]][_0xd587[187]]= _0xd587[188];_0x5c29x3= parseInt(this[_0xd587[485]][_0xd587[124]][_0xd587[361]]);_0x5c29x4= parseInt(this[_0xd587[485]][_0xd587[124]][_0xd587[125]]);_0x5c29x5= this[_0xd587[116]][_0xd587[124]][_0xd587[119]];_0x5c29x9= this[_0xd587[116]][_0xd587[124]][_0xd587[117]];this[_0xd587[485]][_0xd587[124]][_0xd587[361]]= _0xd587[946];this[_0xd587[485]][_0xd587[124]][_0xd587[125]]= _0xd587[946];mxClient[_0xd587[80]]|| (this[_0xd587[485]][_0xd587[124]][_0xd587[119]]= document[_0xd587[112]][_0xd587[157]]- 2+ _0xd587[168],this[_0xd587[485]][_0xd587[124]][_0xd587[117]]= document[_0xd587[112]][_0xd587[159]]- 2+ _0xd587[168]);this[_0xd587[116]][_0xd587[124]][_0xd587[117]]= document[_0xd587[112]][_0xd587[159]]- 2+ _0xd587[168];this[_0xd587[116]][_0xd587[124]][_0xd587[119]]= document[_0xd587[112]][_0xd587[157]]- 2+ _0xd587[168];null!= this[_0xd587[129]]&& (this[_0xd587[129]][_0xd587[124]][_0xd587[187]]= _0xd587[188]);if(!mxClient[_0xd587[80]]){var _0x5c29x13=mxUtils[_0xd587[275]](this[_0xd587[929]]);if(_0xd587[278]== _0x5c29x13[_0xd587[277]]|| null!= this[_0xd587[129]]){this[_0xd587[929]][_0xd587[124]][_0xd587[119]]= this[_0xd587[485]][_0xd587[167]]- this[_0xd587[924]][_0xd587[167]]- 2+ _0xd587[168]}};this[_0xd587[746]]( new mxEventObject(mxEvent.MAXIMIZE,_0xd587[763],_0x5c29xa))};mxEvent[_0xd587[722]](_0x5c29xa)}});mxEvent[_0xd587[759]](this[_0xd587[800]],_0x5c29xa);mxEvent[_0xd587[169]](this[_0xd587[924]],_0xd587[760],_0x5c29xa)};mxWindow[_0xd587[202]][_0xd587[911]]= function(){this[_0xd587[924]][_0xd587[124]][_0xd587[270]]= _0xd587[582];mxEvent[_0xd587[759]](this[_0xd587[924]],mxUtils[_0xd587[885]](this,function(_0x5c29x2){var _0x5c29x3=mxEvent[_0xd587[731]](_0x5c29x2),_0x5c29x4=mxEvent[_0xd587[733]](_0x5c29x2),_0x5c29x5=this[_0xd587[730]](),_0x5c29x9=this[_0xd587[732]](),_0x5c29xa=mxUtils[_0xd587[885]](this,function(_0x5c29x2){var _0x5c29xa=mxEvent[_0xd587[731]](_0x5c29x2)- _0x5c29x3,_0x5c29x12=mxEvent[_0xd587[733]](_0x5c29x2)- _0x5c29x4;this[_0xd587[947]](_0x5c29x5+ _0x5c29xa,_0x5c29x9+ _0x5c29x12);this[_0xd587[746]]( new mxEventObject(mxEvent.MOVE,_0xd587[763],_0x5c29x2));mxEvent[_0xd587[722]](_0x5c29x2)}),_0x5c29x12=mxUtils[_0xd587[885]](this,function(_0x5c29x2){mxEvent[_0xd587[938]](document,null,_0x5c29xa,_0x5c29x12);this[_0xd587[746]]( new mxEventObject(mxEvent.MOVE_END,_0xd587[763],_0x5c29x2));mxEvent[_0xd587[722]](_0x5c29x2)});mxEvent[_0xd587[759]](document,null,_0x5c29xa,_0x5c29x12);this[_0xd587[746]]( new mxEventObject(mxEvent.MOVE_START,_0xd587[763],_0x5c29x2));mxEvent[_0xd587[722]](_0x5c29x2)}))};mxWindow[_0xd587[202]][_0xd587[947]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[485]][_0xd587[124]][_0xd587[361]]= _0x5c29x2+ _0xd587[168];this[_0xd587[485]][_0xd587[124]][_0xd587[125]]= _0x5c29x3+ _0xd587[168]};mxWindow[_0xd587[202]][_0xd587[730]]= function(){return parseInt(this[_0xd587[485]][_0xd587[124]][_0xd587[361]])};mxWindow[_0xd587[202]][_0xd587[732]]= function(){return parseInt(this[_0xd587[485]][_0xd587[124]][_0xd587[125]])};mxWindow[_0xd587[202]][_0xd587[908]]= function(){this[_0xd587[948]]= document[_0xd587[55]](_0xd587[466]);this[_0xd587[948]][_0xd587[57]](_0xd587[390],this[_0xd587[913]]);this[_0xd587[948]][_0xd587[57]](_0xd587[611],_0xd587[699]);this[_0xd587[948]][_0xd587[57]](_0xd587[924],_0xd587[949]);this[_0xd587[948]][_0xd587[124]][_0xd587[945]]= _0xd587[935];this[_0xd587[948]][_0xd587[124]][_0xd587[270]]= _0xd587[356];this[_0xd587[948]][_0xd587[124]][_0xd587[495]]= _0xd587[130];this[_0xd587[924]][_0xd587[950]](this[_0xd587[948]],this[_0xd587[924]][_0xd587[285]]);mxEvent[_0xd587[759]](this[_0xd587[948]],mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[746]]( new mxEventObject(mxEvent.CLOSE,_0xd587[763],_0x5c29x2));this[_0xd587[165]]?this[_0xd587[515]]():this[_0xd587[175]](!1);mxEvent[_0xd587[722]](_0x5c29x2)}))};mxWindow[_0xd587[202]][_0xd587[951]]= function(_0x5c29x2){this[_0xd587[618]]= document[_0xd587[55]](_0xd587[466]);this[_0xd587[618]][_0xd587[57]](_0xd587[390],_0x5c29x2);this[_0xd587[618]][_0xd587[57]](_0xd587[611],_0xd587[361]);this[_0xd587[618]][_0xd587[124]][_0xd587[941]]= _0xd587[952];this[_0xd587[618]][_0xd587[124]][_0xd587[945]]= _0xd587[946];this[_0xd587[618]][_0xd587[124]][_0xd587[953]]= _0xd587[954];this[_0xd587[924]][_0xd587[950]](this[_0xd587[618]],this[_0xd587[924]][_0xd587[285]])};mxWindow[_0xd587[202]][_0xd587[164]]= function(_0x5c29x2){this[_0xd587[948]][_0xd587[124]][_0xd587[495]]= _0x5c29x2?_0xd587[110]:_0xd587[130]};mxWindow[_0xd587[202]][_0xd587[174]]= function(){return null!= this[_0xd587[485]]?_0xd587[188]!= this[_0xd587[485]][_0xd587[124]][_0xd587[187]]:!1};mxWindow[_0xd587[202]][_0xd587[175]]= function(_0x5c29x2){null!= this[_0xd587[485]]&& this[_0xd587[174]]()!= _0x5c29x2&& (_0x5c29x2?this[_0xd587[539]]():this[_0xd587[801]]())};mxWindow[_0xd587[202]][_0xd587[539]]= function(){this[_0xd587[485]][_0xd587[124]][_0xd587[187]]= _0xd587[110];this[_0xd587[790]]();var _0x5c29x2=mxUtils[_0xd587[275]](this[_0xd587[929]]);if(!mxClient[_0xd587[80]]&& (_0xd587[278]== _0x5c29x2[_0xd587[277]]|| null!= this[_0xd587[129]])){this[_0xd587[929]][_0xd587[124]][_0xd587[119]]= this[_0xd587[485]][_0xd587[167]]- this[_0xd587[924]][_0xd587[167]]- 2+ _0xd587[168]};this[_0xd587[746]]( new mxEventObject(mxEvent.SHOW))};mxWindow[_0xd587[202]][_0xd587[801]]= function(){this[_0xd587[485]][_0xd587[124]][_0xd587[187]]= _0xd587[188];this[_0xd587[746]]( new mxEventObject(mxEvent.HIDE))};mxWindow[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[746]]( new mxEventObject(mxEvent.DESTROY));null!= this[_0xd587[485]]&& (mxEvent[_0xd587[762]](this[_0xd587[485]]),this[_0xd587[485]][_0xd587[265]][_0xd587[266]](this[_0xd587[485]]),this[_0xd587[485]]= null);this[_0xd587[929]]= this[_0xd587[905]]= this[_0xd587[924]]= null};function mxForm(_0x5c29x2){this[_0xd587[116]]= document[_0xd587[55]](_0xd587[116]);this[_0xd587[116]][_0xd587[926]]= _0x5c29x2;this[_0xd587[112]]= document[_0xd587[55]](_0xd587[120]);this[_0xd587[116]][_0xd587[62]](this[_0xd587[112]])}mxForm[_0xd587[202]][_0xd587[116]]= null;mxForm[_0xd587[202]][_0xd587[112]]=  !1;mxForm[_0xd587[202]][_0xd587[955]]= function(){return this[_0xd587[116]]};mxForm[_0xd587[202]][_0xd587[956]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=document[_0xd587[55]](_0xd587[121]),_0x5c29x5=document[_0xd587[55]](_0xd587[122]);_0x5c29x4[_0xd587[62]](_0x5c29x5);var _0x5c29x5=document[_0xd587[55]](_0xd587[122]),_0x5c29x9=document[_0xd587[55]](_0xd587[172]);mxUtils[_0xd587[53]](_0x5c29x9,mxResources[_0xd587[203]](_0xd587[957])|| _0xd587[958]);_0x5c29x5[_0xd587[62]](_0x5c29x9);mxEvent[_0xd587[169]](_0x5c29x9,_0xd587[173],function(){_0x5c29x2()});_0x5c29x9= document[_0xd587[55]](_0xd587[172]);mxUtils[_0xd587[53]](_0x5c29x9,mxResources[_0xd587[203]](_0xd587[959])|| _0xd587[960]);_0x5c29x5[_0xd587[62]](_0x5c29x9);mxEvent[_0xd587[169]](_0x5c29x9,_0xd587[173],function(){_0x5c29x3()});_0x5c29x4[_0xd587[62]](_0x5c29x5);this[_0xd587[112]][_0xd587[62]](_0x5c29x4)};mxForm[_0xd587[202]][_0xd587[961]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=document[_0xd587[55]](_0xd587[962]);_0x5c29x4[_0xd587[57]](_0xd587[60],_0xd587[963]);_0x5c29x4[_0xd587[131]]= _0x5c29x3;return this[_0xd587[964]](_0x5c29x2,_0x5c29x4)};mxForm[_0xd587[202]][_0xd587[965]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=document[_0xd587[55]](_0xd587[962]);_0x5c29x4[_0xd587[57]](_0xd587[60],_0xd587[966]);this[_0xd587[964]](_0x5c29x2,_0x5c29x4);_0x5c29x3&& (_0x5c29x4[_0xd587[967]]=  !0);return _0x5c29x4};mxForm[_0xd587[202]][_0xd587[968]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=document[_0xd587[55]](_0xd587[126]);mxClient[_0xd587[133]]&& _0x5c29x4--;_0x5c29x5[_0xd587[57]](_0xd587[969],_0x5c29x4|| 2);_0x5c29x5[_0xd587[131]]= _0x5c29x3;return this[_0xd587[964]](_0x5c29x2,_0x5c29x5)};mxForm[_0xd587[202]][_0xd587[970]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=document[_0xd587[55]](_0xd587[804]);null!= _0x5c29x4&& _0x5c29x5[_0xd587[57]](_0xd587[803],_0x5c29x4);_0x5c29x3&& _0x5c29x5[_0xd587[57]](_0xd587[971],_0xd587[128]);return this[_0xd587[964]](_0x5c29x2,_0x5c29x5)};mxForm[_0xd587[202]][_0xd587[972]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=document[_0xd587[55]](_0xd587[973]);mxUtils[_0xd587[171]](_0x5c29x9,_0x5c29x3);_0x5c29x9[_0xd587[57]](_0xd587[131],_0x5c29x4);_0x5c29x5&& _0x5c29x9[_0xd587[57]](_0xd587[974],_0x5c29x5);_0x5c29x2[_0xd587[62]](_0x5c29x9)};mxForm[_0xd587[202]][_0xd587[964]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=document[_0xd587[55]](_0xd587[121]),_0x5c29x5=document[_0xd587[55]](_0xd587[122]);mxUtils[_0xd587[53]](_0x5c29x5,_0x5c29x2);_0x5c29x4[_0xd587[62]](_0x5c29x5);_0x5c29x5= document[_0xd587[55]](_0xd587[122]);_0x5c29x5[_0xd587[62]](_0x5c29x3);_0x5c29x4[_0xd587[62]](_0x5c29x5);this[_0xd587[112]][_0xd587[62]](_0x5c29x4);return _0x5c29x3};function mxImage(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[390]]= _0x5c29x2;this[_0xd587[117]]= _0x5c29x3;this[_0xd587[119]]= _0x5c29x4}mxImage[_0xd587[202]][_0xd587[390]]= null;mxImage[_0xd587[202]][_0xd587[117]]= null;mxImage[_0xd587[202]][_0xd587[119]]= null;function mxDivResizer(_0x5c29x2,_0x5c29x3){if(_0xd587[485]== _0x5c29x2[_0xd587[301]][_0xd587[216]]()){null== _0x5c29x3&& (_0x5c29x3= window);this[_0xd587[485]]= _0x5c29x2;var _0x5c29x4=mxUtils[_0xd587[275]](_0x5c29x2);null!= _0x5c29x4&& (this[_0xd587[975]]= _0xd587[278]== _0x5c29x4[_0xd587[117]],this[_0xd587[976]]= _0xd587[278]== _0x5c29x4[_0xd587[119]]);mxEvent[_0xd587[169]](_0x5c29x3,_0xd587[129],mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[977]]|| (this[_0xd587[977]]=  !0,this[_0xd587[129]](),this[_0xd587[977]]=  !1)}));this[_0xd587[129]]()}}mxDivResizer[_0xd587[202]][_0xd587[975]]=  !0;mxDivResizer[_0xd587[202]][_0xd587[976]]=  !0;mxDivResizer[_0xd587[202]][_0xd587[977]]=  !1;mxDivResizer[_0xd587[202]][_0xd587[129]]= function(){var _0x5c29x2=this[_0xd587[978]](),_0x5c29x3=this[_0xd587[979]](),_0x5c29x4=parseInt(this[_0xd587[485]][_0xd587[124]][_0xd587[361]]),_0x5c29x5=parseInt(this[_0xd587[485]][_0xd587[124]][_0xd587[699]]),_0x5c29x9=parseInt(this[_0xd587[485]][_0xd587[124]][_0xd587[125]]),_0x5c29xa=parseInt(this[_0xd587[485]][_0xd587[124]][_0xd587[553]]);this[_0xd587[975]]&& (!isNaN(_0x5c29x4)&& !isNaN(_0x5c29x5)&& 0<= _0x5c29x4&& 0<= _0x5c29x5&& 0< _0x5c29x2- _0x5c29x5- _0x5c29x4)&& (this[_0xd587[485]][_0xd587[124]][_0xd587[117]]= _0x5c29x2- _0x5c29x5- _0x5c29x4+ _0xd587[168]);this[_0xd587[976]]&& (!isNaN(_0x5c29x9)&& !isNaN(_0x5c29xa)&& 0<= _0x5c29x9&& 0<= _0x5c29xa&& 0< _0x5c29x3- _0x5c29x9- _0x5c29xa)&& (this[_0xd587[485]][_0xd587[124]][_0xd587[119]]= _0x5c29x3- _0x5c29x9- _0x5c29xa+ _0xd587[168])};mxDivResizer[_0xd587[202]][_0xd587[978]]= function(){return document[_0xd587[112]][_0xd587[159]]};mxDivResizer[_0xd587[202]][_0xd587[979]]= function(){return document[_0xd587[112]][_0xd587[157]]};function mxDragSource(_0x5c29x2,_0x5c29x3){this[_0xd587[980]]= _0x5c29x2;this[_0xd587[981]]= _0x5c29x3;mxEvent[_0xd587[759]](_0x5c29x2,mxUtils[_0xd587[885]](this,this[_0xd587[787]]))}mxDragSource[_0xd587[202]][_0xd587[980]]= null;mxDragSource[_0xd587[202]][_0xd587[981]]= null;mxDragSource[_0xd587[202]][_0xd587[559]]= null;mxDragSource[_0xd587[202]][_0xd587[982]]= null;mxDragSource[_0xd587[202]][_0xd587[983]]= null;mxDragSource[_0xd587[202]][_0xd587[984]]=  !0;mxDragSource[_0xd587[202]][_0xd587[985]]= null;mxDragSource[_0xd587[202]][_0xd587[986]]= null;mxDragSource[_0xd587[202]][_0xd587[987]]= null;mxDragSource[_0xd587[202]][_0xd587[988]]= null;mxDragSource[_0xd587[202]][_0xd587[989]]= null;mxDragSource[_0xd587[202]][_0xd587[561]]=  !0;mxDragSource[_0xd587[202]][_0xd587[990]]=  !0;mxDragSource[_0xd587[202]][_0xd587[991]]=  !0;mxDragSource[_0xd587[202]][_0xd587[563]]=  !0;mxDragSource[_0xd587[202]][_0xd587[992]]= 100;mxDragSource[_0xd587[202]][_0xd587[993]]= 70;mxDragSource[_0xd587[202]][_0xd587[994]]= function(){return this[_0xd587[984]]};mxDragSource[_0xd587[202]][_0xd587[995]]= function(_0x5c29x2){this[_0xd587[984]]= _0x5c29x2};mxDragSource[_0xd587[202]][_0xd587[996]]= function(){return this[_0xd587[990]]};mxDragSource[_0xd587[202]][_0xd587[562]]= function(_0x5c29x2){this[_0xd587[990]]= _0x5c29x2};mxDragSource[_0xd587[202]][_0xd587[997]]= function(){return this[_0xd587[991]]};mxDragSource[_0xd587[202]][_0xd587[998]]= function(_0x5c29x2){this[_0xd587[991]]= _0x5c29x2};mxDragSource[_0xd587[202]][_0xd587[565]]= function(_0x5c29x2){return null};mxDragSource[_0xd587[202]][_0xd587[564]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return _0x5c29x2[_0xd587[999]](_0x5c29x3,_0x5c29x4)};mxDragSource[_0xd587[202]][_0xd587[566]]= function(_0x5c29x2){return this[_0xd587[980]][_0xd587[511]](!0)};mxDragSource[_0xd587[202]][_0xd587[567]]= function(_0x5c29x2){return null};mxDragSource[_0xd587[202]][_0xd587[787]]= function(_0x5c29x2){this[_0xd587[984]]&& (!mxEvent[_0xd587[721]](_0x5c29x2)&& null== this[_0xd587[1000]])&& (this[_0xd587[1001]](_0x5c29x2),this[_0xd587[1000]]= mxUtils[_0xd587[885]](this,this[_0xd587[788]]),this[_0xd587[1002]]= mxUtils[_0xd587[885]](this,this[_0xd587[789]]),mxEvent[_0xd587[759]](document,null,this[_0xd587[1000]],this[_0xd587[1002]]),mxEvent[_0xd587[722]](_0x5c29x2,!0,!1))};mxDragSource[_0xd587[202]][_0xd587[1001]]= function(_0x5c29x2){this[_0xd587[982]]= this[_0xd587[566]](_0x5c29x2);this[_0xd587[982]][_0xd587[124]][_0xd587[491]]= _0xd587[492];this[_0xd587[982]][_0xd587[124]][_0xd587[931]]= this[_0xd587[992]];mxUtils[_0xd587[254]](this[_0xd587[982]],this[_0xd587[993]])};mxDragSource[_0xd587[202]][_0xd587[1003]]= function(_0x5c29x2){null!= this[_0xd587[982]]&& (null!= this[_0xd587[982]][_0xd587[265]]&& this[_0xd587[982]][_0xd587[265]][_0xd587[266]](this[_0xd587[982]]),this[_0xd587[982]]= null)};mxDragSource[_0xd587[202]][_0xd587[1004]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=mxEvent[_0xd587[731]](_0x5c29x3),_0x5c29x5=mxEvent[_0xd587[733]](_0x5c29x3),_0x5c29x9=mxUtils[_0xd587[445]](_0x5c29x2[_0xd587[526]]),_0x5c29xa=mxUtils[_0xd587[444]]();return _0x5c29x4>= _0x5c29x9[_0xd587[235]]- _0x5c29xa[_0xd587[235]]&& _0x5c29x5>= _0x5c29x9[_0xd587[236]]- _0x5c29xa[_0xd587[236]]&& _0x5c29x4<= _0x5c29x9[_0xd587[235]]- _0x5c29xa[_0xd587[235]]+ _0x5c29x2[_0xd587[526]][_0xd587[359]]&& _0x5c29x5<= _0x5c29x9[_0xd587[236]]- _0x5c29xa[_0xd587[236]]+ _0x5c29x2[_0xd587[526]][_0xd587[167]]};mxDragSource[_0xd587[202]][_0xd587[788]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[565]](_0x5c29x2);null!= _0x5c29x3&& !this[_0xd587[1004]](_0x5c29x3,_0x5c29x2)&& (_0x5c29x3= null);_0x5c29x3!= this[_0xd587[985]]&& (null!= this[_0xd587[985]]&& this[_0xd587[1005]](this[_0xd587[985]]),this[_0xd587[985]]= _0x5c29x3,null!= this[_0xd587[985]]&& this[_0xd587[1006]](this[_0xd587[985]]));null!= this[_0xd587[985]]&& this[_0xd587[1007]](this[_0xd587[985]],_0x5c29x2);if(null!= this[_0xd587[982]]&& (null== this[_0xd587[983]]|| _0xd587[189]!= this[_0xd587[983]][_0xd587[124]][_0xd587[187]])){var _0x5c29x3=mxEvent[_0xd587[731]](_0x5c29x2),_0x5c29x4=mxEvent[_0xd587[733]](_0x5c29x2);null== this[_0xd587[982]][_0xd587[265]]&& document[_0xd587[112]][_0xd587[62]](this[_0xd587[982]]);this[_0xd587[982]][_0xd587[124]][_0xd587[187]]= _0xd587[189];null!= this[_0xd587[559]]&& (_0x5c29x3+= this[_0xd587[559]][_0xd587[235]],_0x5c29x4+= this[_0xd587[559]][_0xd587[236]]);_0x5c29x3+= document[_0xd587[112]][_0xd587[360]]|| document[_0xd587[158]][_0xd587[360]];_0x5c29x4+= document[_0xd587[112]][_0xd587[190]]|| document[_0xd587[158]][_0xd587[190]];this[_0xd587[982]][_0xd587[124]][_0xd587[361]]= _0x5c29x3+ _0xd587[168];this[_0xd587[982]][_0xd587[124]][_0xd587[125]]= _0x5c29x4+ _0xd587[168]}else {null!= this[_0xd587[982]]&& (this[_0xd587[982]][_0xd587[124]][_0xd587[187]]= _0xd587[188])};mxEvent[_0xd587[722]](_0x5c29x2)};mxDragSource[_0xd587[202]][_0xd587[789]]= function(_0x5c29x2){if(null!= this[_0xd587[985]]){if(null!= this[_0xd587[987]]&& (null== this[_0xd587[983]]|| _0xd587[188]!= this[_0xd587[983]][_0xd587[124]][_0xd587[187]])){var _0x5c29x3=this[_0xd587[985]][_0xd587[441]][_0xd587[255]],_0x5c29x4=this[_0xd587[985]][_0xd587[441]][_0xd587[513]];this[_0xd587[1008]](this[_0xd587[985]],_0x5c29x2,this[_0xd587[986]],this[_0xd587[987]][_0xd587[235]]/ _0x5c29x3- _0x5c29x4[_0xd587[235]],this[_0xd587[987]][_0xd587[236]]/ _0x5c29x3- _0x5c29x4[_0xd587[236]])};this[_0xd587[1005]](this[_0xd587[985]])};this[_0xd587[1003]](_0x5c29x2);mxEvent[_0xd587[938]](document,null,this[_0xd587[1000]],this[_0xd587[1002]]);this[_0xd587[985]]= this[_0xd587[1002]]= this[_0xd587[1000]]= null;mxEvent[_0xd587[722]](_0x5c29x2)};mxDragSource[_0xd587[202]][_0xd587[1006]]= function(_0x5c29x2){_0x5c29x2[_0xd587[1009]]=  !0;this[_0xd587[983]]= this[_0xd587[567]](_0x5c29x2);this[_0xd587[996]]()&& null!= this[_0xd587[983]]&& (this[_0xd587[988]]=  new mxGuide(_0x5c29x2,_0x5c29x2[_0xd587[1011]][_0xd587[1010]]()));this[_0xd587[563]]&& (this[_0xd587[989]]=  new mxCellHighlight(_0x5c29x2,mxConstants.DROP_TARGET_COLOR))};mxDragSource[_0xd587[202]][_0xd587[1005]]= function(_0x5c29x2){this[_0xd587[987]]= this[_0xd587[986]]= null;_0x5c29x2[_0xd587[1009]]=  !1;null!= this[_0xd587[983]]&& (null!= this[_0xd587[983]][_0xd587[265]]&& this[_0xd587[983]][_0xd587[265]][_0xd587[266]](this[_0xd587[983]]),this[_0xd587[983]]= null);null!= this[_0xd587[988]]&& (this[_0xd587[988]][_0xd587[515]](),this[_0xd587[988]]= null);null!= this[_0xd587[989]]&& (this[_0xd587[989]][_0xd587[515]](),this[_0xd587[989]]= null)};mxDragSource[_0xd587[202]][_0xd587[1007]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=mxUtils[_0xd587[445]](_0x5c29x2[_0xd587[526]]),_0x5c29x5=mxUtils[_0xd587[444]](_0x5c29x2[_0xd587[526]]),_0x5c29x9=mxEvent[_0xd587[731]](_0x5c29x3)- _0x5c29x4[_0xd587[235]]+ _0x5c29x5[_0xd587[235]],_0x5c29x4=mxEvent[_0xd587[733]](_0x5c29x3)- _0x5c29x4[_0xd587[236]]+ _0x5c29x5[_0xd587[236]];_0x5c29x2[_0xd587[1012]]&& (null== this[_0xd587[561]]|| this[_0xd587[561]])&& _0x5c29x2[_0xd587[1014]](_0x5c29x9,_0x5c29x4,_0x5c29x2[_0xd587[1013]]);null!= this[_0xd587[989]]&& _0x5c29x2[_0xd587[1015]]()&& (this[_0xd587[986]]= this[_0xd587[564]](_0x5c29x2,_0x5c29x9,_0x5c29x4),_0x5c29x5= _0x5c29x2[_0xd587[249]]()[_0xd587[248]](this[_0xd587[986]]),this[_0xd587[989]][_0xd587[1016]](_0x5c29x5));if(null!= this[_0xd587[983]]){null== this[_0xd587[983]][_0xd587[265]]&& (_0x5c29x2[_0xd587[526]][_0xd587[62]](this[_0xd587[983]]),this[_0xd587[983]][_0xd587[124]][_0xd587[931]]= _0xd587[1017],this[_0xd587[983]][_0xd587[124]][_0xd587[491]]= _0xd587[492]);var _0x5c29x5=this[_0xd587[997]]()&& _0x5c29x2[_0xd587[1018]](_0x5c29x3),_0x5c29xa=!0;if(null!= this[_0xd587[988]]&& this[_0xd587[988]][_0xd587[1019]](_0x5c29x3)){var _0x5c29xa=parseInt(this[_0xd587[983]][_0xd587[124]][_0xd587[117]]),_0x5c29x12=parseInt(this[_0xd587[983]][_0xd587[124]][_0xd587[119]]),_0x5c29xa= new mxRectangle(0,0,_0x5c29xa,_0x5c29x12),_0x5c29x4= new mxPoint(_0x5c29x9,_0x5c29x4),_0x5c29x4=this[_0xd587[988]][_0xd587[582]](_0x5c29xa,_0x5c29x4,_0x5c29x5),_0x5c29xa=!1,_0x5c29x9=_0x5c29x4[_0xd587[235]],_0x5c29x4=_0x5c29x4[_0xd587[236]]}else {if(_0x5c29x5){var _0x5c29x5=_0x5c29x2[_0xd587[441]][_0xd587[255]],_0x5c29x12=_0x5c29x2[_0xd587[441]][_0xd587[513]],_0x5c29x13=_0x5c29x2[_0xd587[1020]]/ 2,_0x5c29x9=(_0x5c29x2[_0xd587[1021]](_0x5c29x9/ _0x5c29x5- _0x5c29x12[_0xd587[235]]- _0x5c29x13)+ _0x5c29x12[_0xd587[235]])* _0x5c29x5,_0x5c29x4=(_0x5c29x2[_0xd587[1021]](_0x5c29x4/ _0x5c29x5- _0x5c29x12[_0xd587[236]]- _0x5c29x13)+ _0x5c29x12[_0xd587[236]])* _0x5c29x5}};null!= this[_0xd587[988]]&& _0x5c29xa&& this[_0xd587[988]][_0xd587[801]]();null!= this[_0xd587[1022]]&& (_0x5c29x9+= this[_0xd587[1022]][_0xd587[235]],_0x5c29x4+= this[_0xd587[1022]][_0xd587[236]]);this[_0xd587[983]][_0xd587[124]][_0xd587[361]]= Math[_0xd587[488]](_0x5c29x9)+ _0xd587[168];this[_0xd587[983]][_0xd587[124]][_0xd587[125]]= Math[_0xd587[488]](_0x5c29x4)+ _0xd587[168];this[_0xd587[983]][_0xd587[124]][_0xd587[187]]= _0xd587[189]};this[_0xd587[987]]=  new mxPoint(_0x5c29x9,_0x5c29x4)};mxDragSource[_0xd587[202]][_0xd587[1008]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){this[_0xd587[981]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9);_0x5c29x2[_0xd587[526]][_0xd587[393]]()};function mxToolbar(_0x5c29x2){this[_0xd587[526]]= _0x5c29x2}mxToolbar[_0xd587[202]]=  new mxEventSource;mxToolbar[_0xd587[202]][_0xd587[196]]= mxToolbar;mxToolbar[_0xd587[202]][_0xd587[526]]= null;mxToolbar[_0xd587[202]][_0xd587[984]]=  !0;mxToolbar[_0xd587[202]][_0xd587[1023]]=  !1;mxToolbar[_0xd587[202]][_0xd587[1024]]=  !0;mxToolbar[_0xd587[202]][_0xd587[1025]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){var _0x5c29x12=document[_0xd587[55]](null!= _0x5c29x3?_0xd587[466]:_0xd587[172]),_0x5c29x13=_0x5c29x9|| (null!= _0x5c29xa?_0xd587[1026]:_0xd587[1027]);_0x5c29x12[_0xd587[926]]= _0x5c29x13;_0x5c29x12[_0xd587[57]](_0xd587[390],_0x5c29x3);null!= _0x5c29x2&& (null!= _0x5c29x3?_0x5c29x12[_0xd587[57]](_0xd587[924],_0x5c29x2):mxUtils[_0xd587[53]](_0x5c29x12,_0x5c29x2));this[_0xd587[526]][_0xd587[62]](_0x5c29x12);null!= _0x5c29x4&& (mxEvent[_0xd587[169]](_0x5c29x12,_0xd587[173],_0x5c29x4),mxClient[_0xd587[754]]&& mxEvent[_0xd587[169]](_0x5c29x12,_0xd587[757],_0x5c29x4));_0x5c29x2= mxUtils[_0xd587[885]](this,function(_0x5c29x2){null!= _0x5c29x5?_0x5c29x12[_0xd587[57]](_0xd587[390],_0x5c29x3):_0x5c29x12[_0xd587[124]][_0xd587[1028]]= _0xd587[110]});mxEvent[_0xd587[759]](_0x5c29x12,mxUtils[_0xd587[885]](this,function(_0x5c29x2){null!= _0x5c29x5?_0x5c29x12[_0xd587[57]](_0xd587[390],_0x5c29x5):_0x5c29x12[_0xd587[124]][_0xd587[1028]]= _0xd587[579];if(null!= _0x5c29xa){null== this[_0xd587[1029]]&& (this[_0xd587[1029]]=  new mxPopupMenu,this[_0xd587[1029]][_0xd587[176]]());var _0x5c29x3=this[_0xd587[1030]];this[_0xd587[1029]][_0xd587[1031]]()&& this[_0xd587[1029]][_0xd587[1032]]();_0x5c29x3!= _0x5c29x12&& (this[_0xd587[1030]]= _0x5c29x12,this[_0xd587[1029]][_0xd587[1033]]= _0x5c29xa,_0x5c29x3=  new mxPoint(_0x5c29x12[_0xd587[358]],_0x5c29x12[_0xd587[362]]+ _0x5c29x12[_0xd587[167]]),this[_0xd587[1029]][_0xd587[152]](_0x5c29x3[_0xd587[235]],_0x5c29x3[_0xd587[236]],null,_0x5c29x2),this[_0xd587[1029]][_0xd587[1031]]()&& (_0x5c29x12[_0xd587[926]]= _0x5c29x13+ _0xd587[1034],this[_0xd587[1029]][_0xd587[1032]]= function(){mxPopupMenu[_0xd587[202]][_0xd587[1032]][_0xd587[183]](this);_0x5c29x12[_0xd587[926]]= _0x5c29x13;this[_0xd587[1030]]= null}))}}),null,_0x5c29x2);mxEvent[_0xd587[169]](_0x5c29x12,_0xd587[1035],_0x5c29x2);return _0x5c29x12};mxToolbar[_0xd587[202]][_0xd587[970]]= function(_0x5c29x2){var _0x5c29x3=document[_0xd587[55]](_0xd587[485]);_0x5c29x3[_0xd587[124]][_0xd587[495]]= _0xd587[497];_0x5c29x3[_0xd587[926]]= _0xd587[1036];var _0x5c29x4=document[_0xd587[55]](_0xd587[804]);_0x5c29x4[_0xd587[926]]= _0x5c29x2|| _0xd587[1037];_0x5c29x3[_0xd587[62]](_0x5c29x4);this[_0xd587[526]][_0xd587[62]](_0x5c29x3);return _0x5c29x4};mxToolbar[_0xd587[202]][_0xd587[1038]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=document[_0xd587[55]](_0xd587[804]);_0x5c29x4[_0xd587[926]]= _0x5c29x3|| _0xd587[1037];this[_0xd587[972]](_0x5c29x4,_0x5c29x2,null);mxEvent[_0xd587[169]](_0x5c29x4,_0xd587[826],function(_0x5c29x2){var _0x5c29x3=_0x5c29x4[_0xd587[1040]][_0x5c29x4[_0xd587[1039]]];_0x5c29x4[_0xd587[1039]]= 0;null!= _0x5c29x3[_0xd587[1041]]&& _0x5c29x3[_0xd587[1041]](_0x5c29x2)});this[_0xd587[526]][_0xd587[62]](_0x5c29x4);return _0x5c29x4};mxToolbar[_0xd587[202]][_0xd587[972]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=document[_0xd587[55]](_0xd587[973]);mxUtils[_0xd587[171]](_0x5c29x5,_0x5c29x3);_0xd587[279]==  typeof _0x5c29x4?_0x5c29x5[_0xd587[1041]]= _0x5c29x4:_0x5c29x5[_0xd587[57]](_0xd587[131],_0x5c29x4);_0x5c29x2[_0xd587[62]](_0x5c29x5);return _0x5c29x5};mxToolbar[_0xd587[202]][_0xd587[1042]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=document[_0xd587[55]](_0xd587[466]);_0x5c29xa[_0xd587[1043]]= _0x5c29x9|| _0xd587[1026];_0x5c29xa[_0xd587[926]]= _0x5c29xa[_0xd587[1043]];_0x5c29xa[_0xd587[57]](_0xd587[390],_0x5c29x3);_0x5c29xa[_0xd587[1044]]= _0x5c29x5;null!= _0x5c29x2&& _0x5c29xa[_0xd587[57]](_0xd587[924],_0x5c29x2);mxEvent[_0xd587[169]](_0x5c29xa,_0xd587[173],mxUtils[_0xd587[885]](this,function(_0x5c29x2){_0x5c29x2= this[_0xd587[1045]][_0xd587[1044]];null!= _0x5c29x2?(this[_0xd587[1045]][_0xd587[1044]]= this[_0xd587[1045]][_0xd587[284]](_0xd587[390]),this[_0xd587[1045]][_0xd587[57]](_0xd587[390],_0x5c29x2)):this[_0xd587[1045]][_0xd587[926]]= this[_0xd587[1045]][_0xd587[1043]];this[_0xd587[1024]]&& (this[_0xd587[1046]]= _0x5c29xa);this[_0xd587[1045]]= _0x5c29xa;_0x5c29x2= _0x5c29xa[_0xd587[1044]];null!= _0x5c29x2?(_0x5c29xa[_0xd587[1044]]= _0x5c29xa[_0xd587[284]](_0xd587[390]),_0x5c29xa[_0xd587[57]](_0xd587[390],_0x5c29x2)):_0x5c29xa[_0xd587[926]]= _0x5c29xa[_0xd587[1043]]+ _0xd587[1034];this[_0xd587[746]]( new mxEventObject(mxEvent.SELECT));_0x5c29x4()}));this[_0xd587[526]][_0xd587[62]](_0x5c29xa);null== this[_0xd587[1046]]&& (this[_0xd587[1046]]= _0x5c29xa,this[_0xd587[1047]](_0x5c29xa),_0x5c29x4());return _0x5c29xa};mxToolbar[_0xd587[202]][_0xd587[1048]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){_0x5c29xa= null!= _0x5c29xa?_0x5c29xa:!0;var _0x5c29x12=document[_0xd587[55]](null!= _0x5c29x3?_0xd587[466]:_0xd587[172]);_0x5c29x12[_0xd587[1043]]= _0x5c29x9|| _0xd587[1026];_0x5c29x12[_0xd587[926]]= _0x5c29x12[_0xd587[1043]];_0x5c29x12[_0xd587[57]](_0xd587[390],_0x5c29x3);_0x5c29x12[_0xd587[1044]]= _0x5c29x5;null!= _0x5c29x2&& _0x5c29x12[_0xd587[57]](_0xd587[924],_0x5c29x2);this[_0xd587[984]]&& _0x5c29xa&& (mxEvent[_0xd587[169]](_0x5c29x12,_0xd587[173],mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[1047]](_0x5c29x12,_0x5c29x4);this[_0xd587[1023]]=  !1})),mxEvent[_0xd587[169]](_0x5c29x12,_0xd587[760],mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[1047]](_0x5c29x12,_0x5c29x4);this[_0xd587[1023]]=  !0})),null== this[_0xd587[1046]]&& (this[_0xd587[1046]]= _0x5c29x12,this[_0xd587[1049]]= _0x5c29x4,this[_0xd587[1047]](_0x5c29x12,_0x5c29x4)));this[_0xd587[526]][_0xd587[62]](_0x5c29x12);return _0x5c29x12};mxToolbar[_0xd587[202]][_0xd587[1047]]= function(_0x5c29x2,_0x5c29x3){if(this[_0xd587[1045]]!= _0x5c29x2){if(null!= this[_0xd587[1045]]){var _0x5c29x4=this[_0xd587[1045]][_0xd587[1044]];null!= _0x5c29x4?(this[_0xd587[1045]][_0xd587[1044]]= this[_0xd587[1045]][_0xd587[284]](_0xd587[390]),this[_0xd587[1045]][_0xd587[57]](_0xd587[390],_0x5c29x4)):this[_0xd587[1045]][_0xd587[926]]= this[_0xd587[1045]][_0xd587[1043]]};this[_0xd587[1045]]= _0x5c29x2;_0x5c29x4= this[_0xd587[1045]][_0xd587[1044]];null!= _0x5c29x4?(this[_0xd587[1045]][_0xd587[1044]]= this[_0xd587[1045]][_0xd587[284]](_0xd587[390]),this[_0xd587[1045]][_0xd587[57]](_0xd587[390],_0x5c29x4)):this[_0xd587[1045]][_0xd587[926]]= this[_0xd587[1045]][_0xd587[1043]]+ _0xd587[1034];this[_0xd587[746]]( new mxEventObject(mxEvent.SELECT,_0xd587[279],_0x5c29x3))}};mxToolbar[_0xd587[202]][_0xd587[1050]]= function(_0x5c29x2){(_0x5c29x2|| !this[_0xd587[1023]])&& this[_0xd587[1045]]!= this[_0xd587[1046]]&& this[_0xd587[1047]](this[_0xd587[1046]],this[_0xd587[1049]])};mxToolbar[_0xd587[202]][_0xd587[1051]]= function(_0x5c29x2){return this[_0xd587[1025]](null,_0x5c29x2,null)};mxToolbar[_0xd587[202]][_0xd587[1052]]= function(){mxUtils[_0xd587[345]](this[_0xd587[526]])};mxToolbar[_0xd587[202]][_0xd587[1053]]= function(){var _0x5c29x2=document[_0xd587[55]](_0xd587[1054]);_0x5c29x2[_0xd587[124]][_0xd587[941]]= _0xd587[1055];_0x5c29x2[_0xd587[57]](_0xd587[803],_0xd587[500]);this[_0xd587[526]][_0xd587[62]](_0x5c29x2)};mxToolbar[_0xd587[202]][_0xd587[515]]= function(){mxEvent[_0xd587[762]](this[_0xd587[526]]);this[_0xd587[1045]]= this[_0xd587[1049]]= this[_0xd587[1046]]= this[_0xd587[526]]= null;null!= this[_0xd587[1029]]&& this[_0xd587[1029]][_0xd587[515]]()};function mxSession(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){this[_0xd587[251]]= _0x5c29x2;this[_0xd587[1056]]= _0x5c29x3;this[_0xd587[1057]]= _0x5c29x4;this[_0xd587[1058]]= _0x5c29x5;null!= _0x5c29x2&& (this[_0xd587[1059]]=  new mxCodec,this[_0xd587[1059]][_0xd587[1060]]= function(_0x5c29x3){return _0x5c29x2[_0xd587[736]](_0x5c29x3)});_0x5c29x2[_0xd587[169]](mxEvent.NOTIFY,mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=_0x5c29x3[_0xd587[720]](_0xd587[1061]);(null!= _0x5c29x4&& this[_0xd587[143]]|| this[_0xd587[1062]]&& !this[_0xd587[1063]])&& this[_0xd587[827]](_0xd587[1064]+ this[_0xd587[1067]](_0x5c29x4[_0xd587[1065]],_0x5c29x4[_0xd587[1066]])+ _0xd587[1068])}))}mxSession[_0xd587[202]]=  new mxEventSource;mxSession[_0xd587[202]][_0xd587[196]]= mxSession;mxSession[_0xd587[202]][_0xd587[251]]= null;mxSession[_0xd587[202]][_0xd587[1056]]= null;mxSession[_0xd587[202]][_0xd587[1057]]= null;mxSession[_0xd587[202]][_0xd587[1058]]= null;mxSession[_0xd587[202]][_0xd587[1059]]= null;mxSession[_0xd587[202]][_0xd587[1069]]= _0xd587[336];mxSession[_0xd587[202]][_0xd587[1070]]=  !0;mxSession[_0xd587[202]][_0xd587[1071]]=  !0;mxSession[_0xd587[202]][_0xd587[1072]]= 0;mxSession[_0xd587[202]][_0xd587[1073]]= 0;mxSession[_0xd587[202]][_0xd587[143]]=  !1;mxSession[_0xd587[202]][_0xd587[1062]]=  !1;mxSession[_0xd587[202]][_0xd587[1063]]=  !1;mxSession[_0xd587[202]][_0xd587[1074]]=  !1;mxSession[_0xd587[202]][_0xd587[861]]= function(){this[_0xd587[143]]?(this[_0xd587[1062]]=  !0,this[_0xd587[746]]( new mxEventObject(mxEvent.CONNECT))):this[_0xd587[1062]]|| this[_0xd587[203]](this[_0xd587[1056]],mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[1062]]=  !0;this[_0xd587[746]]( new mxEventObject(mxEvent.CONNECT));this[_0xd587[1075]]()}))};mxSession[_0xd587[202]][_0xd587[809]]= function(){this[_0xd587[1062]]&& !this[_0xd587[1063]]&& (this[_0xd587[1063]]=  !0,this[_0xd587[746]]( new mxEventObject(mxEvent.SUSPEND)))};mxSession[_0xd587[202]][_0xd587[810]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[1062]]&& this[_0xd587[1063]]&& (this[_0xd587[1063]]=  !1,this[_0xd587[746]]( new mxEventObject(mxEvent.RESUME)),this[_0xd587[1074]]|| this[_0xd587[1075]]())};mxSession[_0xd587[202]][_0xd587[1076]]= function(_0x5c29x2){this[_0xd587[1062]]&& (this[_0xd587[1062]]=  !1);this[_0xd587[746]]( new mxEventObject(mxEvent.DISCONNECT,_0xd587[1077],_0x5c29x2))};mxSession[_0xd587[202]][_0xd587[1075]]= function(){this[_0xd587[1062]]&& !this[_0xd587[1063]]&& null!= this[_0xd587[1057]]?(this[_0xd587[1074]]=  !0,this[_0xd587[203]](this[_0xd587[1057]],mxUtils[_0xd587[885]](this,function(){this[_0xd587[1075]]()}))):this[_0xd587[1074]]=  !1};mxSession[_0xd587[202]][_0xd587[827]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){null!= _0x5c29x2&& 0< _0x5c29x2[_0xd587[67]]&& (null!= this[_0xd587[1058]]&& (this[_0xd587[143]]?(mxLog[_0xd587[539]](),mxLog[_0xd587[143]](_0xd587[1078]+ this[_0xd587[1058]]+ _0xd587[1079]+ _0x5c29x2)):(_0x5c29x2= _0xd587[1080]+ _0x5c29x2+ _0xd587[1081],this[_0xd587[1070]]&& (_0x5c29x2= encodeURIComponent(_0x5c29x2)),mxUtils[_0xd587[814]](this[_0xd587[1058]],_0xd587[1082]+ _0x5c29x2,_0x5c29x3,_0x5c29x4))),this[_0xd587[1072]]+= _0x5c29x2[_0xd587[67]],this[_0xd587[746]]( new mxEventObject(mxEvent.NOTIFY,_0xd587[863],this[_0xd587[1058]],_0xd587[338],_0x5c29x2)))};mxSession[_0xd587[202]][_0xd587[203]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){if(_0xd587[82]!=  typeof mxUtils){var _0x5c29x5=mxUtils[_0xd587[885]](this,function(_0x5c29x2){null!= _0x5c29x4?_0x5c29x4(_0x5c29x2):this[_0xd587[1076]](_0x5c29x2)});mxUtils[_0xd587[203]](_0x5c29x2,mxUtils[_0xd587[885]](this,function(_0x5c29x4){if(_0xd587[82]!=  typeof mxUtils){if(_0x5c29x4[_0xd587[220]]()&& 404!= _0x5c29x4[_0xd587[878]]()){if(this[_0xd587[1073]]+= _0x5c29x4[_0xd587[221]]()[_0xd587[67]],this[_0xd587[746]]( new mxEventObject(mxEvent.GET,_0xd587[863],_0x5c29x2,_0xd587[870],_0x5c29x4)),this[_0xd587[1083]](_0x5c29x4)){if(0< _0x5c29x4[_0xd587[221]]()[_0xd587[67]]){var _0x5c29xa=_0x5c29x4[_0xd587[874]]();null== _0x5c29xa?_0x5c29x5(_0xd587[1084]+ _0x5c29x4[_0xd587[221]]()):this[_0xd587[806]](_0x5c29xa)};null!= _0x5c29x3&& _0x5c29x3(_0x5c29x4)}}else {_0x5c29x5(_0xd587[1085])}}}),function(_0x5c29x2){_0x5c29x5(_0xd587[1086])})}};mxSession[_0xd587[202]][_0xd587[1083]]= function(_0x5c29x2){return 0> _0x5c29x2[_0xd587[221]]()[_0xd587[2]](_0xd587[1087])};mxSession[_0xd587[202]][_0xd587[1067]]= function(_0x5c29x2,_0x5c29x3){for(var _0x5c29x4=_0xd587[110],_0x5c29x5=_0x5c29x3?-1:1,_0x5c29x9=_0x5c29x3?_0x5c29x2[_0xd587[67]]- 1:0;0<= _0x5c29x9&& _0x5c29x9< _0x5c29x2[_0xd587[67]];_0x5c29x9+= _0x5c29x5){var _0x5c29xa=this[_0xd587[1059]][_0xd587[514]](_0x5c29x2[_0x5c29x9]),_0x5c29x4=_0x5c29x4+ mxUtils[_0xd587[875]](_0x5c29xa,this[_0xd587[1069]])};return _0x5c29x4};mxSession[_0xd587[202]][_0xd587[806]]= function(_0x5c29x2){if(null!= _0x5c29x2&& _0x5c29x2[_0xd587[288]]== mxConstants[_0xd587[289]]){var _0x5c29x3=_0x5c29x2[_0xd587[284]](_0xd587[1088]);null!= _0x5c29x3&& (this[_0xd587[251]][_0xd587[1089]]= _0x5c29x3+ _0xd587[213]);for(_0x5c29x3= _0x5c29x2[_0xd587[285]];null!= _0x5c29x3;){var _0x5c29x4=_0x5c29x3[_0xd587[301]][_0xd587[216]]();_0xd587[724]== _0x5c29x4?this[_0xd587[1090]](_0x5c29x3):_0xd587[1091]== _0x5c29x4&& this[_0xd587[1092]](_0x5c29x3);_0x5c29x3= _0x5c29x3[_0xd587[287]]};this[_0xd587[746]]( new mxEventObject(mxEvent.RECEIVE,_0xd587[252],_0x5c29x2))}};mxSession[_0xd587[202]][_0xd587[1090]]= function(_0x5c29x2){( new mxCodec(_0x5c29x2[_0xd587[295]]))[_0xd587[1093]](_0x5c29x2[_0xd587[285]],this[_0xd587[251]])};mxSession[_0xd587[202]][_0xd587[1092]]= function(_0x5c29x2){for(_0x5c29x2= _0x5c29x2[_0xd587[285]];null!= _0x5c29x2;){_0xd587[1061]== _0x5c29x2[_0xd587[301]]&& this[_0xd587[1094]](_0x5c29x2),_0x5c29x2= _0x5c29x2[_0xd587[287]]}};mxSession[_0xd587[202]][_0xd587[1094]]= function(_0x5c29x2){_0x5c29x2= this[_0xd587[1095]](_0x5c29x2);if(0< _0x5c29x2[_0xd587[67]]){var _0x5c29x3=this[_0xd587[1096]](_0x5c29x2);this[_0xd587[251]][_0xd587[746]]( new mxEventObject(mxEvent.CHANGE,_0xd587[1061],_0x5c29x3,_0xd587[1065],_0x5c29x2));this[_0xd587[251]][_0xd587[746]]( new mxEventObject(mxEvent.UNDO,_0xd587[1061],_0x5c29x3));this[_0xd587[746]]( new mxEventObject(mxEvent.FIRED,_0xd587[1061],_0x5c29x3))}};mxSession[_0xd587[202]][_0xd587[1096]]= function(_0x5c29x2){var _0x5c29x3= new mxUndoableEdit(this[_0xd587[251]],this[_0xd587[1071]]);_0x5c29x3[_0xd587[1065]]= _0x5c29x2;_0x5c29x3[_0xd587[827]]= function(){_0x5c29x3[_0xd587[1097]][_0xd587[746]]( new mxEventObject(mxEvent.CHANGE,_0xd587[1061],_0x5c29x3,_0xd587[1065],_0x5c29x3[_0xd587[1065]]));_0x5c29x3[_0xd587[1097]][_0xd587[746]]( new mxEventObject(mxEvent.NOTIFY,_0xd587[1061],_0x5c29x3,_0xd587[1065],_0x5c29x3[_0xd587[1065]]))};return _0x5c29x3};mxSession[_0xd587[202]][_0xd587[1095]]= function(_0x5c29x2){this[_0xd587[1059]][_0xd587[395]]= _0x5c29x2[_0xd587[295]];var _0x5c29x3=[];for(_0x5c29x2= _0x5c29x2[_0xd587[285]];null!= _0x5c29x2;){var _0x5c29x4=this[_0xd587[1098]](_0x5c29x2);null!= _0x5c29x4&& _0x5c29x3[_0xd587[207]](_0x5c29x4);_0x5c29x2= _0x5c29x2[_0xd587[287]]};return _0x5c29x3};mxSession[_0xd587[202]][_0xd587[1098]]= function(_0x5c29x2){var _0x5c29x3=null;_0x5c29x2[_0xd587[288]]== mxConstants[_0xd587[289]]&& (_0x5c29x3= _0xd587[1099]== _0x5c29x2[_0xd587[301]]?( new mxCodec(_0x5c29x2[_0xd587[295]]))[_0xd587[1093]](_0x5c29x2):this[_0xd587[1059]][_0xd587[1093]](_0x5c29x2),null!= _0x5c29x3&& (_0x5c29x3[_0xd587[251]]= this[_0xd587[251]],_0x5c29x3[_0xd587[350]](),_0xd587[1100]== _0x5c29x2[_0xd587[301]]&& null== _0x5c29x3[_0xd587[1101]]&& this[_0xd587[1102]](_0x5c29x3[_0xd587[247]])));return _0x5c29x3};mxSession[_0xd587[202]][_0xd587[1102]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[1059]][_0xd587[1104]](_0x5c29x2[_0xd587[1103]](),_0x5c29x2);for(var _0x5c29x4=this[_0xd587[251]][_0xd587[262]](_0x5c29x2),_0x5c29x5=0;_0x5c29x5< _0x5c29x4;_0x5c29x5++){this[_0xd587[1102]](this[_0xd587[251]][_0xd587[263]](_0x5c29x2,_0x5c29x5))}};function mxUndoableEdit(_0x5c29x2,_0x5c29x3){this[_0xd587[1097]]= _0x5c29x2;this[_0xd587[1065]]= [];this[_0xd587[1105]]= null!= _0x5c29x3?_0x5c29x3:!0}mxUndoableEdit[_0xd587[202]][_0xd587[1097]]= null;mxUndoableEdit[_0xd587[202]][_0xd587[1065]]= null;mxUndoableEdit[_0xd587[202]][_0xd587[1105]]= null;mxUndoableEdit[_0xd587[202]][_0xd587[1066]]=  !1;mxUndoableEdit[_0xd587[202]][_0xd587[1106]]=  !1;mxUndoableEdit[_0xd587[202]][_0xd587[1107]]= function(){return 0== this[_0xd587[1065]][_0xd587[67]]};mxUndoableEdit[_0xd587[202]][_0xd587[1108]]= function(){return this[_0xd587[1105]]};mxUndoableEdit[_0xd587[202]][_0xd587[99]]= function(_0x5c29x2){this[_0xd587[1065]][_0xd587[207]](_0x5c29x2)};mxUndoableEdit[_0xd587[202]][_0xd587[827]]= function(){};mxUndoableEdit[_0xd587[202]][_0xd587[1109]]= function(){};mxUndoableEdit[_0xd587[202]][_0xd587[824]]= function(){if(!this[_0xd587[1066]]){this[_0xd587[1097]][_0xd587[746]]( new mxEventObject(mxEvent.START_EDIT));for(var _0x5c29x2=this[_0xd587[1065]][_0xd587[67]]- 1;0<= _0x5c29x2;_0x5c29x2--){var _0x5c29x3=this[_0xd587[1065]][_0x5c29x2];null!= _0x5c29x3[_0xd587[350]]?_0x5c29x3[_0xd587[350]]():null!= _0x5c29x3[_0xd587[824]]&& _0x5c29x3[_0xd587[824]]();this[_0xd587[1097]][_0xd587[746]]( new mxEventObject(mxEvent.EXECUTED,_0xd587[826],_0x5c29x3))};this[_0xd587[1066]]=  !0;this[_0xd587[1106]]=  !1;this[_0xd587[1097]][_0xd587[746]]( new mxEventObject(mxEvent.END_EDIT))};this[_0xd587[827]]()};mxUndoableEdit[_0xd587[202]][_0xd587[825]]= function(){if(!this[_0xd587[1106]]){this[_0xd587[1097]][_0xd587[746]]( new mxEventObject(mxEvent.START_EDIT));for(var _0x5c29x2=this[_0xd587[1065]][_0xd587[67]],_0x5c29x3=0;_0x5c29x3< _0x5c29x2;_0x5c29x3++){var _0x5c29x4=this[_0xd587[1065]][_0x5c29x3];null!= _0x5c29x4[_0xd587[350]]?_0x5c29x4[_0xd587[350]]():null!= _0x5c29x4[_0xd587[825]]&& _0x5c29x4[_0xd587[825]]();this[_0xd587[1097]][_0xd587[746]]( new mxEventObject(mxEvent.EXECUTED,_0xd587[826],_0x5c29x4))};this[_0xd587[1066]]=  !1;this[_0xd587[1106]]=  !0;this[_0xd587[1097]][_0xd587[746]]( new mxEventObject(mxEvent.END_EDIT))};this[_0xd587[827]]()};function mxUndoManager(_0x5c29x2){this[_0xd587[803]]= null!= _0x5c29x2?_0x5c29x2:100;this[_0xd587[200]]()}mxUndoManager[_0xd587[202]]=  new mxEventSource;mxUndoManager[_0xd587[202]][_0xd587[196]]= mxUndoManager;mxUndoManager[_0xd587[202]][_0xd587[803]]= null;mxUndoManager[_0xd587[202]][_0xd587[1110]]= null;mxUndoManager[_0xd587[202]][_0xd587[1111]]= 0;mxUndoManager[_0xd587[202]][_0xd587[1107]]= function(){return 0== this[_0xd587[1110]][_0xd587[67]]};mxUndoManager[_0xd587[202]][_0xd587[200]]= function(){this[_0xd587[1110]]= [];this[_0xd587[1111]]= 0;this[_0xd587[746]]( new mxEventObject(mxEvent.CLEAR))};mxUndoManager[_0xd587[202]][_0xd587[1112]]= function(){return 0< this[_0xd587[1111]]};mxUndoManager[_0xd587[202]][_0xd587[824]]= function(){for(;0< this[_0xd587[1111]];){var _0x5c29x2=this[_0xd587[1110]][--this[_0xd587[1111]]];_0x5c29x2[_0xd587[824]]();if(_0x5c29x2[_0xd587[1108]]()){this[_0xd587[746]]( new mxEventObject(mxEvent.UNDO,_0xd587[1061],_0x5c29x2));break}}};mxUndoManager[_0xd587[202]][_0xd587[1113]]= function(){return this[_0xd587[1111]]< this[_0xd587[1110]][_0xd587[67]]};mxUndoManager[_0xd587[202]][_0xd587[825]]= function(){for(var _0x5c29x2=this[_0xd587[1110]][_0xd587[67]];this[_0xd587[1111]]< _0x5c29x2;){var _0x5c29x3=this[_0xd587[1110]][this[_0xd587[1111]]++];_0x5c29x3[_0xd587[825]]();if(_0x5c29x3[_0xd587[1108]]()){this[_0xd587[746]]( new mxEventObject(mxEvent.REDO,_0xd587[1061],_0x5c29x3));break}}};mxUndoManager[_0xd587[202]][_0xd587[1114]]= function(_0x5c29x2){this[_0xd587[330]]();0< this[_0xd587[803]]&& this[_0xd587[803]]== this[_0xd587[1110]][_0xd587[67]]&& this[_0xd587[1110]][_0xd587[1115]]();this[_0xd587[1110]][_0xd587[207]](_0x5c29x2);this[_0xd587[1111]]= this[_0xd587[1110]][_0xd587[67]];this[_0xd587[746]]( new mxEventObject(mxEvent.ADD,_0xd587[1061],_0x5c29x2))};mxUndoManager[_0xd587[202]][_0xd587[330]]= function(){if(this[_0xd587[1110]][_0xd587[67]]> this[_0xd587[1111]]){for(var _0x5c29x2=this[_0xd587[1110]][_0xd587[300]](this[_0xd587[1111]],this[_0xd587[1110]][_0xd587[67]]- this[_0xd587[1111]]),_0x5c29x3=0;_0x5c29x3< _0x5c29x2[_0xd587[67]];_0x5c29x3++){_0x5c29x2[_0x5c29x3][_0xd587[1109]]()}}};var mxUrlConverter=function(_0x5c29x2){var _0x5c29x3=!0,_0x5c29x4=null,_0x5c29x5=null;return {isEnabled:function(){return _0x5c29x3},setEnabled:function(_0x5c29x2){_0x5c29x3= _0x5c29x2},getBaseUrl:function(){return _0x5c29x4},setBaseUrl:function(_0x5c29x2){_0x5c29x4= _0x5c29x2},getBaseDomain:function(){return _0x5c29x4},setBaseDomain:function(_0x5c29x2){_0x5c29x4= _0x5c29x2},isRelativeUrl:function(_0x5c29x2){return _0xd587[43]!= _0x5c29x2[_0xd587[85]](0,7)&& _0xd587[46]!= _0x5c29x2[_0xd587[85]](0,8)&& _0xd587[1116]!= _0x5c29x2[_0xd587[85]](0,10)},convert:function(_0x5c29x2){if(_0x5c29x3&& this[_0xd587[1117]](_0x5c29x2)){if(null== _0x5c29x4){_0x5c29x5= location[_0xd587[1118]]+ _0xd587[1119]+ location[_0xd587[1120]];_0x5c29x4= _0x5c29x5+ location[_0xd587[1121]];var _0x5c29xa=_0x5c29x4[_0xd587[1122]](_0xd587[84]);0< _0x5c29xa&& (_0x5c29x4= _0x5c29x4[_0xd587[85]](0,_0x5c29xa+ 1))};_0x5c29x2= _0xd587[84]== _0x5c29x2[_0xd587[225]](0)?_0x5c29x5+ _0x5c29x2:_0x5c29x4+ _0x5c29x2};return _0x5c29x2}}};function mxPanningManager(_0x5c29x2){this[_0xd587[1123]]= null;this[_0xd587[1124]]=  !1;this[_0xd587[1125]]= this[_0xd587[1126]]= this[_0xd587[1127]]= this[_0xd587[1128]]= this[_0xd587[1129]]= this[_0xd587[1130]]= 0;this[_0xd587[1131]]=  !1;this[_0xd587[190]]= this[_0xd587[360]]= 0;this[_0xd587[1132]]= {mouseDown:function(_0x5c29x2,_0x5c29x3){},mouseMove:function(_0x5c29x2,_0x5c29x3){},mouseUp:mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x3){this[_0xd587[1124]]&& this[_0xd587[1076]]()})};_0x5c29x2[_0xd587[1133]](this[_0xd587[1132]]);mxEvent[_0xd587[169]](document,_0xd587[753],mxUtils[_0xd587[885]](this,function(){this[_0xd587[1124]]&& this[_0xd587[1076]]()}));var _0x5c29x3=mxUtils[_0xd587[885]](this,function(){this[_0xd587[1131]]= mxUtils[_0xd587[1134]](_0x5c29x2[_0xd587[526]]);this[_0xd587[360]]= _0x5c29x2[_0xd587[526]][_0xd587[360]];this[_0xd587[190]]= _0x5c29x2[_0xd587[526]][_0xd587[190]];return window[_0xd587[1141]](mxUtils[_0xd587[885]](this,function(){this[_0xd587[1130]]-= this[_0xd587[1126]];this[_0xd587[1129]]-= this[_0xd587[1125]];if(this[_0xd587[1131]]){var _0x5c29x3=-_0x5c29x2[_0xd587[526]][_0xd587[360]]- Math[_0xd587[430]](this[_0xd587[1126]]),_0x5c29x5=-_0x5c29x2[_0xd587[526]][_0xd587[190]]- Math[_0xd587[430]](this[_0xd587[1125]]);_0x5c29x2[_0xd587[1135]](_0x5c29x3,_0x5c29x5);_0x5c29x2[_0xd587[1136]]= this[_0xd587[360]]- _0x5c29x2[_0xd587[526]][_0xd587[360]];_0x5c29x2[_0xd587[1137]]= this[_0xd587[190]]- _0x5c29x2[_0xd587[526]][_0xd587[190]];_0x5c29x2[_0xd587[746]]( new mxEventObject(mxEvent.PAN))}else {_0x5c29x2[_0xd587[1135]](this[_0xd587[1138]](),this[_0xd587[1139]]())}}),this[_0xd587[1140]])});this[_0xd587[1142]]= function(){return active};this[_0xd587[1138]]= function(){return Math[_0xd587[488]](this[_0xd587[1130]])};this[_0xd587[1139]]= function(){return Math[_0xd587[488]](this[_0xd587[1129]])};this[_0xd587[861]]= function(){this[_0xd587[1128]]= _0x5c29x2[_0xd587[441]][_0xd587[513]][_0xd587[235]];this[_0xd587[1127]]= _0x5c29x2[_0xd587[441]][_0xd587[513]][_0xd587[236]];this[_0xd587[1124]]=  !0};this[_0xd587[1143]]= function(_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){this[_0xd587[1124]]|| this[_0xd587[861]]();this[_0xd587[360]]= _0x5c29x2[_0xd587[526]][_0xd587[360]];this[_0xd587[190]]= _0x5c29x2[_0xd587[526]][_0xd587[190]];_0x5c29xa= null!= _0x5c29xa?_0x5c29xa:0;var _0x5c29x12=_0x5c29x2[_0xd587[526]];this[_0xd587[1126]]= _0x5c29x4+ (null!= _0x5c29x9?_0x5c29x9:0)- _0x5c29x12[_0xd587[360]]- _0x5c29x12[_0xd587[159]];0> this[_0xd587[1126]]&& Math[_0xd587[425]](this[_0xd587[1126]])< this[_0xd587[467]]?this[_0xd587[1126]]= this[_0xd587[467]]+ this[_0xd587[1126]]:this[_0xd587[1126]]= this[_0xd587[1144]]?Math[_0xd587[160]](this[_0xd587[1126]],0):0;0== this[_0xd587[1126]]&& (this[_0xd587[1126]]= _0x5c29x4- _0x5c29x12[_0xd587[360]],this[_0xd587[1126]]= 0< this[_0xd587[1126]]&& this[_0xd587[1126]]< this[_0xd587[467]]?this[_0xd587[1126]]- this[_0xd587[467]]:this[_0xd587[1144]]?Math[_0xd587[243]](0,this[_0xd587[1126]]):0);this[_0xd587[1125]]= _0x5c29x5+ _0x5c29xa- _0x5c29x12[_0xd587[190]]- _0x5c29x12[_0xd587[157]];0> this[_0xd587[1125]]&& Math[_0xd587[425]](this[_0xd587[1125]])< this[_0xd587[467]]?this[_0xd587[1125]]= this[_0xd587[467]]+ this[_0xd587[1125]]:this[_0xd587[1125]]= this[_0xd587[1144]]?Math[_0xd587[160]](this[_0xd587[1125]],0):0;0== this[_0xd587[1125]]&& (this[_0xd587[1125]]= _0x5c29x5- _0x5c29x12[_0xd587[190]],this[_0xd587[1125]]= 0< this[_0xd587[1125]]&& this[_0xd587[1125]]< this[_0xd587[467]]?this[_0xd587[1125]]- this[_0xd587[467]]:this[_0xd587[1144]]?Math[_0xd587[243]](0,this[_0xd587[1125]]):0);0!= this[_0xd587[1126]]|| 0!= this[_0xd587[1125]]?(this[_0xd587[1126]]*= this[_0xd587[1145]],this[_0xd587[1125]]*= this[_0xd587[1145]],null== this[_0xd587[1123]]&& (this[_0xd587[1123]]= _0x5c29x3())):null!= this[_0xd587[1123]]&& (window[_0xd587[1146]](this[_0xd587[1123]]),this[_0xd587[1123]]= null)};this[_0xd587[1076]]= function(){if(this[_0xd587[1124]]){if(this[_0xd587[1124]]=  !1,null!= this[_0xd587[1123]]&& (window[_0xd587[1146]](this[_0xd587[1123]]),this[_0xd587[1123]]= null),this[_0xd587[1129]]= this[_0xd587[1130]]= 0,this[_0xd587[1131]]){_0x5c29x2[_0xd587[1136]]= 0,_0x5c29x2[_0xd587[1137]]= 0,_0x5c29x2[_0xd587[746]]( new mxEventObject(mxEvent.PAN))}else {var _0x5c29x3=_0x5c29x2[_0xd587[1136]],_0x5c29x5=_0x5c29x2[_0xd587[1137]];if(0!= _0x5c29x3|| 0!= _0x5c29x5){_0x5c29x2[_0xd587[1135]](0,0),_0x5c29x2[_0xd587[441]][_0xd587[1147]](this[_0xd587[1128]]+ _0x5c29x3/ _0x5c29x2[_0xd587[441]][_0xd587[255]],this[_0xd587[1127]]+ _0x5c29x5/ _0x5c29x2[_0xd587[441]][_0xd587[255]])}}}};this[_0xd587[515]]= function(){_0x5c29x2[_0xd587[1148]](this[_0xd587[1132]])}}mxPanningManager[_0xd587[202]][_0xd587[1145]]= 1/ 6;mxPanningManager[_0xd587[202]][_0xd587[1140]]= 10;mxPanningManager[_0xd587[202]][_0xd587[1144]]=  !0;mxPanningManager[_0xd587[202]][_0xd587[467]]= 0;function mxPopupMenu(_0x5c29x2){this[_0xd587[1033]]= _0x5c29x2;null!= _0x5c29x2&& this[_0xd587[176]]()}mxPopupMenu[_0xd587[202]]=  new mxEventSource;mxPopupMenu[_0xd587[202]][_0xd587[196]]= mxPopupMenu;mxPopupMenu[_0xd587[202]][_0xd587[1149]]= mxClient[_0xd587[88]]+ _0xd587[1150];mxPopupMenu[_0xd587[202]][_0xd587[931]]= 10006;mxPopupMenu[_0xd587[202]][_0xd587[1033]]= null;mxPopupMenu[_0xd587[202]][_0xd587[1151]]=  !1;mxPopupMenu[_0xd587[202]][_0xd587[984]]=  !0;mxPopupMenu[_0xd587[202]][_0xd587[1152]]= 0;mxPopupMenu[_0xd587[202]][_0xd587[1153]]=  !1;mxPopupMenu[_0xd587[202]][_0xd587[1154]]=  !1;mxPopupMenu[_0xd587[202]][_0xd587[1155]]=  !0;mxPopupMenu[_0xd587[202]][_0xd587[176]]= function(){this[_0xd587[116]]= document[_0xd587[55]](_0xd587[116]);this[_0xd587[116]][_0xd587[926]]= _0xd587[1156];this[_0xd587[120]]= document[_0xd587[55]](_0xd587[120]);this[_0xd587[116]][_0xd587[62]](this[_0xd587[120]]);this[_0xd587[485]]= document[_0xd587[55]](_0xd587[485]);this[_0xd587[485]][_0xd587[926]]= _0xd587[1156];this[_0xd587[485]][_0xd587[124]][_0xd587[495]]= _0xd587[497];this[_0xd587[485]][_0xd587[124]][_0xd587[931]]= this[_0xd587[931]];this[_0xd587[485]][_0xd587[62]](this[_0xd587[116]]);mxEvent[_0xd587[1157]](this[_0xd587[485]])};mxPopupMenu[_0xd587[202]][_0xd587[994]]= function(){return this[_0xd587[984]]};mxPopupMenu[_0xd587[202]][_0xd587[995]]= function(_0x5c29x2){this[_0xd587[984]]= _0x5c29x2};mxPopupMenu[_0xd587[202]][_0xd587[737]]= function(_0x5c29x2){return _0x5c29x2[_0xd587[737]]()|| this[_0xd587[1151]]&& mxEvent[_0xd587[1158]](_0x5c29x2[_0xd587[727]]())};mxPopupMenu[_0xd587[202]][_0xd587[1025]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){_0x5c29x5= _0x5c29x5|| this;this[_0xd587[1152]]++;_0x5c29x5[_0xd587[1159]]&& (_0x5c29x5[_0xd587[1160]]&& this[_0xd587[1051]](_0x5c29x5,!0),_0x5c29x5[_0xd587[1159]]=  !1);_0x5c29x5[_0xd587[1160]]=  !0;var _0x5c29x12=document[_0xd587[55]](_0xd587[121]);_0x5c29x12[_0xd587[926]]= _0xd587[1161];var _0x5c29x13=document[_0xd587[55]](_0xd587[122]);_0x5c29x13[_0xd587[926]]= _0xd587[1162];null!= _0x5c29x3?(_0x5c29x9= document[_0xd587[55]](_0xd587[466]),_0x5c29x9[_0xd587[390]]= _0x5c29x3,_0x5c29x13[_0xd587[62]](_0x5c29x9)):null!= _0x5c29x9&& (_0x5c29x3= document[_0xd587[55]](_0xd587[485]),_0x5c29x3[_0xd587[926]]= _0x5c29x9,_0x5c29x13[_0xd587[62]](_0x5c29x3));_0x5c29x12[_0xd587[62]](_0x5c29x13);this[_0xd587[1155]]&& (_0x5c29x13= document[_0xd587[55]](_0xd587[122]),_0x5c29x13[_0xd587[926]]= _0xd587[1161]+ (null!= _0x5c29xa&& !_0x5c29xa?_0xd587[1163]:_0xd587[110]),mxUtils[_0xd587[53]](_0x5c29x13,_0x5c29x2),_0x5c29x13[_0xd587[611]]= _0xd587[361],_0x5c29x12[_0xd587[62]](_0x5c29x13),_0x5c29x2= document[_0xd587[55]](_0xd587[122]),_0x5c29x2[_0xd587[926]]= _0xd587[1161]+ (null!= _0x5c29xa&& !_0x5c29xa?_0xd587[1163]:_0xd587[110]),_0x5c29x2[_0xd587[124]][_0xd587[1164]]= _0xd587[1055],_0x5c29x2[_0xd587[124]][_0xd587[1165]]= _0xd587[699],_0x5c29x12[_0xd587[62]](_0x5c29x2),null== _0x5c29x5[_0xd587[485]]&& this[_0xd587[1166]](_0x5c29x5));_0x5c29x5[_0xd587[120]][_0xd587[62]](_0x5c29x12);if(null== _0x5c29xa|| _0x5c29xa){mxEvent[_0xd587[759]](_0x5c29x12,mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[1167]]= _0x5c29x12;_0x5c29x5[_0xd587[1168]]!= _0x5c29x12&& _0x5c29x5[_0xd587[1168]]!= _0x5c29x5&& (null!= _0x5c29x5[_0xd587[1168]]&& null!= _0x5c29x5[_0xd587[1168]][_0xd587[485]][_0xd587[265]]&& this[_0xd587[1169]](_0x5c29x5),null!= _0x5c29x12[_0xd587[485]]&& (this[_0xd587[1170]](_0x5c29x5,_0x5c29x12),_0x5c29x5[_0xd587[1168]]= _0x5c29x12));mxEvent[_0xd587[722]](_0x5c29x2)}),mxUtils[_0xd587[885]](this,function(_0x5c29x2){_0x5c29x5[_0xd587[1168]]!= _0x5c29x12&& _0x5c29x5[_0xd587[1168]]!= _0x5c29x5&& (null!= _0x5c29x5[_0xd587[1168]]&& null!= _0x5c29x5[_0xd587[1168]][_0xd587[485]][_0xd587[265]]&& this[_0xd587[1169]](_0x5c29x5),this[_0xd587[1153]]&& null!= _0x5c29x12[_0xd587[485]]&& (this[_0xd587[1170]](_0x5c29x5,_0x5c29x12),_0x5c29x5[_0xd587[1168]]= _0x5c29x12));_0x5c29x12[_0xd587[926]]= _0xd587[1171]}),mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[1167]]== _0x5c29x12&& (_0x5c29x5[_0xd587[1168]]!= _0x5c29x12&& this[_0xd587[1032]](),null!= _0x5c29x4&& _0x5c29x4(_0x5c29x2));this[_0xd587[1167]]= null;mxEvent[_0xd587[722]](_0x5c29x2)})),mxEvent[_0xd587[169]](_0x5c29x12,_0xd587[1035],mxUtils[_0xd587[885]](this,function(_0x5c29x2){_0x5c29x12[_0xd587[926]]= _0xd587[1161]}))};return _0x5c29x12};mxPopupMenu[_0xd587[202]][_0xd587[1166]]= function(_0x5c29x2){_0x5c29x2[_0xd587[116]]= document[_0xd587[55]](_0xd587[116]);_0x5c29x2[_0xd587[116]][_0xd587[926]]= _0xd587[1156];_0x5c29x2[_0xd587[120]]= document[_0xd587[55]](_0xd587[120]);_0x5c29x2[_0xd587[116]][_0xd587[62]](_0x5c29x2[_0xd587[120]]);_0x5c29x2[_0xd587[485]]= document[_0xd587[55]](_0xd587[485]);_0x5c29x2[_0xd587[485]][_0xd587[926]]= _0xd587[1156];_0x5c29x2[_0xd587[485]][_0xd587[124]][_0xd587[491]]= _0xd587[492];_0x5c29x2[_0xd587[485]][_0xd587[124]][_0xd587[495]]= _0xd587[497];_0x5c29x2[_0xd587[485]][_0xd587[124]][_0xd587[931]]= this[_0xd587[931]];_0x5c29x2[_0xd587[485]][_0xd587[62]](_0x5c29x2[_0xd587[116]]);var _0x5c29x3=document[_0xd587[55]](_0xd587[466]);_0x5c29x3[_0xd587[57]](_0xd587[390],this[_0xd587[1149]]);td= _0x5c29x2[_0xd587[285]][_0xd587[287]][_0xd587[287]];td[_0xd587[62]](_0x5c29x3)};mxPopupMenu[_0xd587[202]][_0xd587[1170]]= function(_0x5c29x2,_0x5c29x3){if(null!= _0x5c29x3[_0xd587[485]]){_0x5c29x3[_0xd587[485]][_0xd587[124]][_0xd587[361]]= _0x5c29x2[_0xd587[485]][_0xd587[358]]+ _0x5c29x3[_0xd587[358]]+ _0x5c29x3[_0xd587[359]]- 1+ _0xd587[168];_0x5c29x3[_0xd587[485]][_0xd587[124]][_0xd587[125]]= _0x5c29x2[_0xd587[485]][_0xd587[362]]+ _0x5c29x3[_0xd587[362]]+ _0xd587[168];document[_0xd587[112]][_0xd587[62]](_0x5c29x3[_0xd587[485]]);var _0x5c29x4=parseInt(_0x5c29x3[_0xd587[485]][_0xd587[358]]),_0x5c29x5=parseInt(_0x5c29x3[_0xd587[485]][_0xd587[359]]),_0x5c29x9=document[_0xd587[112]],_0x5c29xa=document[_0xd587[158]];if(_0x5c29x4+ _0x5c29x5> (_0x5c29x9[_0xd587[360]]|| _0x5c29xa[_0xd587[360]])+ (_0x5c29x9[_0xd587[159]]|| _0x5c29xa[_0xd587[159]])){_0x5c29x3[_0xd587[485]][_0xd587[124]][_0xd587[361]]= _0x5c29x2[_0xd587[485]][_0xd587[358]]- _0x5c29x5+ (mxClient[_0xd587[80]]?6:-6)+ _0xd587[168]};mxUtils[_0xd587[933]](_0x5c29x3[_0xd587[485]])}};mxPopupMenu[_0xd587[202]][_0xd587[1051]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x2= _0x5c29x2|| this;if(this[_0xd587[1154]]&&  !_0x5c29x3){_0x5c29x2[_0xd587[1159]]=  !0}else {if(null!= _0x5c29x2[_0xd587[120]]){_0x5c29x2[_0xd587[1159]]=  !1;var _0x5c29x4=document[_0xd587[55]](_0xd587[121]),_0x5c29x5=document[_0xd587[55]](_0xd587[122]);_0x5c29x5[_0xd587[926]]= _0xd587[1162];_0x5c29x5[_0xd587[124]][_0xd587[549]]= _0xd587[1172];_0x5c29x4[_0xd587[62]](_0x5c29x5);_0x5c29x5= document[_0xd587[55]](_0xd587[122]);_0x5c29x5[_0xd587[124]][_0xd587[549]]= _0xd587[1172];_0x5c29x5[_0xd587[57]](_0xd587[1173],_0xd587[1174]);var _0x5c29x9=document[_0xd587[55]](_0xd587[1054]);_0x5c29x9[_0xd587[57]](_0xd587[803],_0xd587[500]);_0x5c29x5[_0xd587[62]](_0x5c29x9);_0x5c29x4[_0xd587[62]](_0x5c29x5);_0x5c29x2[_0xd587[120]][_0xd587[62]](_0x5c29x4)}}};mxPopupMenu[_0xd587[202]][_0xd587[152]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){if(null!= this[_0xd587[485]]&& null!= this[_0xd587[120]]&& null!= this[_0xd587[1033]]){this[_0xd587[485]][_0xd587[124]][_0xd587[361]]= _0x5c29x2+ _0xd587[168];for(this[_0xd587[485]][_0xd587[124]][_0xd587[125]]= _0x5c29x3+ _0xd587[168];null!= this[_0xd587[120]][_0xd587[285]];){mxEvent[_0xd587[762]](this[_0xd587[120]][_0xd587[285]]),this[_0xd587[120]][_0xd587[266]](this[_0xd587[120]][_0xd587[285]])};this[_0xd587[1152]]= 0;this[_0xd587[1033]](this,_0x5c29x4,_0x5c29x5);0< this[_0xd587[1152]]&& (this[_0xd587[1175]](),this[_0xd587[746]]( new mxEventObject(mxEvent.SHOW)))}};mxPopupMenu[_0xd587[202]][_0xd587[1031]]= function(){return null!= this[_0xd587[485]]&& this[_0xd587[485]][_0xd587[265]]== document[_0xd587[112]]};mxPopupMenu[_0xd587[202]][_0xd587[1175]]= function(){9<= document[_0xd587[5]]&& (this[_0xd587[485]][_0xd587[124]][_0xd587[347]]= _0xd587[130]);document[_0xd587[112]][_0xd587[62]](this[_0xd587[485]]);mxUtils[_0xd587[933]](this[_0xd587[485]])};mxPopupMenu[_0xd587[202]][_0xd587[1032]]= function(){null!= this[_0xd587[485]]&& (null!= this[_0xd587[485]][_0xd587[265]]&& this[_0xd587[485]][_0xd587[265]][_0xd587[266]](this[_0xd587[485]]),this[_0xd587[1169]](this),this[_0xd587[1160]]=  !1)};mxPopupMenu[_0xd587[202]][_0xd587[1169]]= function(_0x5c29x2){null!= _0x5c29x2[_0xd587[1168]]&& (this[_0xd587[1169]](_0x5c29x2[_0xd587[1168]]),null!= _0x5c29x2[_0xd587[1168]][_0xd587[485]][_0xd587[265]]&& _0x5c29x2[_0xd587[1168]][_0xd587[485]][_0xd587[265]][_0xd587[266]](_0x5c29x2[_0xd587[1168]][_0xd587[485]]),_0x5c29x2[_0xd587[1168]]= null)};mxPopupMenu[_0xd587[202]][_0xd587[515]]= function(){null!= this[_0xd587[485]]&& (mxEvent[_0xd587[762]](this[_0xd587[485]]),null!= this[_0xd587[485]][_0xd587[265]]&& this[_0xd587[485]][_0xd587[265]][_0xd587[266]](this[_0xd587[485]]),this[_0xd587[485]]= null)};function mxAutoSaveManager(_0x5c29x2){this[_0xd587[1176]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x4){this[_0xd587[994]]()&& this[_0xd587[1177]](_0x5c29x4[_0xd587[720]](_0xd587[1061])[_0xd587[1065]])});this[_0xd587[1178]](_0x5c29x2)}mxAutoSaveManager[_0xd587[202]]=  new mxEventSource;mxAutoSaveManager[_0xd587[202]][_0xd587[196]]= mxAutoSaveManager;mxAutoSaveManager[_0xd587[202]][_0xd587[1179]]= null;mxAutoSaveManager[_0xd587[202]][_0xd587[1180]]= 10;mxAutoSaveManager[_0xd587[202]][_0xd587[1181]]= 2;mxAutoSaveManager[_0xd587[202]][_0xd587[1182]]= 5;mxAutoSaveManager[_0xd587[202]][_0xd587[1183]]= 0;mxAutoSaveManager[_0xd587[202]][_0xd587[1184]]= 0;mxAutoSaveManager[_0xd587[202]][_0xd587[984]]=  !0;mxAutoSaveManager[_0xd587[202]][_0xd587[1176]]= null;mxAutoSaveManager[_0xd587[202]][_0xd587[994]]= function(){return this[_0xd587[984]]};mxAutoSaveManager[_0xd587[202]][_0xd587[995]]= function(_0x5c29x2){this[_0xd587[984]]= _0x5c29x2};mxAutoSaveManager[_0xd587[202]][_0xd587[1178]]= function(_0x5c29x2){null!= this[_0xd587[1179]]&& this[_0xd587[1179]][_0xd587[502]]()[_0xd587[745]](this[_0xd587[1176]]);this[_0xd587[1179]]= _0x5c29x2;null!= this[_0xd587[1179]]&& this[_0xd587[1179]][_0xd587[502]]()[_0xd587[169]](mxEvent.CHANGE,this[_0xd587[1176]])};mxAutoSaveManager[_0xd587[202]][_0xd587[815]]= function(){};mxAutoSaveManager[_0xd587[202]][_0xd587[1177]]= function(_0x5c29x2){_0x5c29x2= (( new Date)[_0xd587[178]]()- this[_0xd587[1184]])/ 1E3;_0x5c29x2> this[_0xd587[1180]]|| this[_0xd587[1183]]>= this[_0xd587[1182]]&& _0x5c29x2> this[_0xd587[1181]]?(this[_0xd587[815]](),this[_0xd587[862]]()):this[_0xd587[1183]]++};mxAutoSaveManager[_0xd587[202]][_0xd587[862]]= function(){this[_0xd587[1184]]= ( new Date)[_0xd587[178]]();this[_0xd587[1183]]= 0};mxAutoSaveManager[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[1178]](null)};function mxAnimation(_0x5c29x2){this[_0xd587[1140]]= null!= _0x5c29x2?_0x5c29x2:20}mxAnimation[_0xd587[202]]=  new mxEventSource;mxAnimation[_0xd587[202]][_0xd587[196]]= mxAnimation;mxAnimation[_0xd587[202]][_0xd587[1140]]= null;mxAnimation[_0xd587[202]][_0xd587[1123]]= null;mxAnimation[_0xd587[202]][_0xd587[1185]]= function(){null== this[_0xd587[1123]]&& (this[_0xd587[1123]]= window[_0xd587[1141]](mxUtils[_0xd587[885]](this,this[_0xd587[1186]]),this[_0xd587[1140]]))};mxAnimation[_0xd587[202]][_0xd587[1186]]= function(){this[_0xd587[746]]( new mxEventObject(mxEvent.EXECUTE))};mxAnimation[_0xd587[202]][_0xd587[1187]]= function(){null!= this[_0xd587[1123]]&& (window[_0xd587[1146]](this[_0xd587[1123]]),this[_0xd587[1123]]= null,this[_0xd587[746]]( new mxEventObject(mxEvent.DONE)))};function mxMorphing(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){mxAnimation[_0xd587[239]](this,_0x5c29x5);this[_0xd587[1179]]= _0x5c29x2;this[_0xd587[1188]]= null!= _0x5c29x3?_0x5c29x3:6;this[_0xd587[1189]]= null!= _0x5c29x4?_0x5c29x4:1.5}mxMorphing[_0xd587[202]]=  new mxAnimation;mxMorphing[_0xd587[202]][_0xd587[196]]= mxMorphing;mxMorphing[_0xd587[202]][_0xd587[1179]]= null;mxMorphing[_0xd587[202]][_0xd587[1188]]= null;mxMorphing[_0xd587[202]][_0xd587[1190]]= 0;mxMorphing[_0xd587[202]][_0xd587[1189]]= null;mxMorphing[_0xd587[202]][_0xd587[895]]= null;mxMorphing[_0xd587[202]][_0xd587[1186]]= function(){var _0x5c29x2= new mxCellStatePreview(this[_0xd587[1179]]);if(null!= this[_0xd587[895]]){for(var _0x5c29x3=0;_0x5c29x3< this[_0xd587[895]][_0xd587[67]];_0x5c29x3++){this[_0xd587[1191]](cells[_0x5c29x3],_0x5c29x2,!1)}}else {this[_0xd587[1191]](this[_0xd587[1179]][_0xd587[502]]()[_0xd587[501]](),_0x5c29x2,!0)};this[_0xd587[539]](_0x5c29x2);(_0x5c29x2[_0xd587[1107]]()|| this[_0xd587[1190]]++ >= this[_0xd587[1188]])&& this[_0xd587[1187]]()};mxMorphing[_0xd587[202]][_0xd587[539]]= function(_0x5c29x2){_0x5c29x2[_0xd587[539]]()};mxMorphing[_0xd587[202]][_0xd587[1191]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[248]](_0x5c29x2),_0x5c29x9=null;if(null!= _0x5c29x5&& (_0x5c29x9= this[_0xd587[1192]](_0x5c29x5),this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1193]](_0x5c29x2)&& (0!= _0x5c29x9[_0xd587[235]]|| 0!= _0x5c29x9[_0xd587[236]]))){var _0x5c29xa=this[_0xd587[1179]][_0xd587[441]][_0xd587[512]](),_0x5c29x12=this[_0xd587[1179]][_0xd587[441]][_0xd587[518]]();_0x5c29x9[_0xd587[235]]+= _0x5c29xa[_0xd587[235]]* _0x5c29x12;_0x5c29x9[_0xd587[236]]+= _0x5c29xa[_0xd587[236]]* _0x5c29x12;_0x5c29x3[_0xd587[1194]](_0x5c29x5,-_0x5c29x9[_0xd587[235]]/ this[_0xd587[1189]],-_0x5c29x9[_0xd587[236]]/ this[_0xd587[1189]])};if(_0x5c29x4&& !this[_0xd587[1195]](_0x5c29x5,_0x5c29x9)){_0x5c29x5= this[_0xd587[1179]][_0xd587[502]]()[_0xd587[262]](_0x5c29x2);for(_0x5c29x9= 0;_0x5c29x9< _0x5c29x5;_0x5c29x9++){this[_0xd587[1191]](this[_0xd587[1179]][_0xd587[502]]()[_0xd587[263]](_0x5c29x2,_0x5c29x9),_0x5c29x3,_0x5c29x4)}}};mxMorphing[_0xd587[202]][_0xd587[1195]]= function(_0x5c29x2,_0x5c29x3){return null!= _0x5c29x3&& (0!= _0x5c29x3[_0xd587[235]]|| 0!= _0x5c29x3[_0xd587[236]])};mxMorphing[_0xd587[202]][_0xd587[1192]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1196]](_0x5c29x2[_0xd587[246]]),_0x5c29x4=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[512]](),_0x5c29x5=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[518]]();_0x5c29x2=  new mxPoint(_0x5c29x2[_0xd587[235]]/ _0x5c29x5- _0x5c29x4[_0xd587[235]],_0x5c29x2[_0xd587[236]]/ _0x5c29x5- _0x5c29x4[_0xd587[236]]);return  new mxPoint((_0x5c29x3[_0xd587[235]]- _0x5c29x2[_0xd587[235]])* _0x5c29x5,(_0x5c29x3[_0xd587[236]]- _0x5c29x2[_0xd587[236]])* _0x5c29x5)};mxMorphing[_0xd587[202]][_0xd587[1196]]= function(_0x5c29x2){var _0x5c29x3=null;null!= _0x5c29x2&& (_0x5c29x3= this[_0xd587[1196]](this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1197]](_0x5c29x2)),_0x5c29x2= this[_0xd587[1179]][_0xd587[1198]](_0x5c29x2),null!= _0x5c29x2&& (_0x5c29x3[_0xd587[235]]+= _0x5c29x2[_0xd587[235]],_0x5c29x3[_0xd587[236]]+= _0x5c29x2[_0xd587[236]]));null== _0x5c29x3&& (_0x5c29x3= this[_0xd587[1179]][_0xd587[441]][_0xd587[512]](),_0x5c29x3=  new mxPoint(-_0x5c29x3[_0xd587[235]],-_0x5c29x3[_0xd587[236]]));return _0x5c29x3};function mxImageBundle(_0x5c29x2){this[_0xd587[1199]]= [];this[_0xd587[1200]]= null!= _0x5c29x2?_0x5c29x2:!1}mxImageBundle[_0xd587[202]][_0xd587[1199]]= null;mxImageBundle[_0xd587[202]][_0xd587[1199]]= null;mxImageBundle[_0xd587[202]][_0xd587[1201]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[1199]][_0x5c29x2]= {value:_0x5c29x3,fallback:_0x5c29x4}};mxImageBundle[_0xd587[202]][_0xd587[1202]]= function(_0x5c29x2){var _0x5c29x3=null;null!= _0x5c29x2&& (_0x5c29x2= this[_0xd587[1199]][_0x5c29x2],null!= _0x5c29x2&& (_0x5c29x3= this[_0xd587[1200]]?_0x5c29x2[_0xd587[1203]]:_0x5c29x2[_0xd587[131]]));return _0x5c29x3};function mxImageExport(){}mxImageExport[_0xd587[202]][_0xd587[1204]]=  !1;mxImageExport[_0xd587[202]][_0xd587[1205]]= function(_0x5c29x2,_0x5c29x3){null!= _0x5c29x2&& (this[_0xd587[1207]](_0x5c29x2,_0x5c29x3,this[_0xd587[1206]]),this[_0xd587[1204]]&& this[_0xd587[1207]](_0x5c29x2,_0x5c29x3,this[_0xd587[1208]]))};mxImageExport[_0xd587[202]][_0xd587[1207]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){if(null!= _0x5c29x2){_0x5c29x4(_0x5c29x2,_0x5c29x3);for(var _0x5c29x5=_0x5c29x2[_0xd587[441]][_0xd587[1179]],_0x5c29x9=_0x5c29x5[_0xd587[251]][_0xd587[262]](_0x5c29x2[_0xd587[246]]),_0x5c29xa=0;_0x5c29xa< _0x5c29x9;_0x5c29xa++){var _0x5c29x12=_0x5c29x5[_0xd587[441]][_0xd587[248]](_0x5c29x5[_0xd587[251]][_0xd587[263]](_0x5c29x2[_0xd587[246]],_0x5c29xa));this[_0xd587[1207]](_0x5c29x12,_0x5c29x3,_0x5c29x4)}}};mxImageExport[_0xd587[202]][_0xd587[1206]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x2[_0xd587[253]] instanceof  mxShape&& (_0x5c29x3[_0xd587[815]](),_0x5c29x2[_0xd587[253]][_0xd587[1209]](_0x5c29x3),_0x5c29x3[_0xd587[1210]]());null!= _0x5c29x2[_0xd587[963]]&& (_0x5c29x3[_0xd587[815]](),_0x5c29x2[_0xd587[963]][_0xd587[1209]](_0x5c29x3),_0x5c29x3[_0xd587[1210]]())};mxImageExport[_0xd587[202]][_0xd587[1208]]= function(_0x5c29x2,_0x5c29x3){null!= _0x5c29x2[_0xd587[1211]]&& _0x5c29x2[_0xd587[1211]][_0xd587[209]](function(_0x5c29x2,_0x5c29x5){_0x5c29x5 instanceof  mxShape&& _0x5c29x5[_0xd587[1209]](_0x5c29x3)})};function mxAbstractCanvas2D(){this[_0xd587[1212]]= this[_0xd587[1213]]();this[_0xd587[862]]()}mxAbstractCanvas2D[_0xd587[202]][_0xd587[724]]= null;mxAbstractCanvas2D[_0xd587[202]][_0xd587[1214]]= null;mxAbstractCanvas2D[_0xd587[202]][_0xd587[1215]]= null;mxAbstractCanvas2D[_0xd587[202]][_0xd587[1216]]=  !0;mxAbstractCanvas2D[_0xd587[202]][_0xd587[1217]]= 0;mxAbstractCanvas2D[_0xd587[202]][_0xd587[1218]]= 0;mxAbstractCanvas2D[_0xd587[202]][_0xd587[1219]]= _0xd587[1220];mxAbstractCanvas2D[_0xd587[202]][_0xd587[1221]]= _0xd587[1222];mxAbstractCanvas2D[_0xd587[202]][_0xd587[1223]]= _0xd587[1224];mxAbstractCanvas2D[_0xd587[202]][_0xd587[1225]]= _0xd587[1226];mxAbstractCanvas2D[_0xd587[202]][_0xd587[1227]]= _0xd587[1228];mxAbstractCanvas2D[_0xd587[202]][_0xd587[1229]]=  !1;mxAbstractCanvas2D[_0xd587[202]][_0xd587[1213]]= function(){return  new mxUrlConverter};mxAbstractCanvas2D[_0xd587[202]][_0xd587[862]]= function(){this[_0xd587[724]]= this[_0xd587[1230]]();this[_0xd587[1214]]= []};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1230]]= function(){return {dx:0,dy:0,scale:1,alpha:1,fillColor:null,fillAlpha:1,gradientColor:null,gradientAlpha:1,gradientDirection:null,strokeColor:null,strokeWidth:1,dashed:!1,dashPattern:_0xd587[1231],lineCap:_0xd587[1232],lineJoin:_0xd587[1233],miterLimit:10,fontColor:_0xd587[1234],fontBackgroundColor:null,fontBorderColor:null,fontSize:mxConstants[_0xd587[483]],fontFamily:mxConstants[_0xd587[484]],fontStyle:0,shadow:!1,shadowColor:mxConstants[_0xd587[1235]],shadowAlpha:mxConstants[_0xd587[1236]],shadowDx:mxConstants[_0xd587[1237]],shadowDy:mxConstants[_0xd587[1238]],rotation:0,rotationCx:0,rotationCy:0}};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1239]]= function(_0x5c29x2){return Math[_0xd587[488]](parseFloat(_0x5c29x2))};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1240]]= function(){if(null!= this[_0xd587[1215]]&& (this[_0xd587[1215]][_0xd587[207]](arguments[0]),2< arguments[_0xd587[67]])){for(var _0x5c29x2=this[_0xd587[724]],_0x5c29x3=2;_0x5c29x3< arguments[_0xd587[67]];_0x5c29x3+= 2){this[_0xd587[1217]]= arguments[_0x5c29x3- 1],this[_0xd587[1218]]= arguments[_0x5c29x3],this[_0xd587[1215]][_0xd587[207]](this[_0xd587[1239]]((this[_0xd587[1217]]+ _0x5c29x2[_0xd587[1126]])* _0x5c29x2[_0xd587[255]])),this[_0xd587[1215]][_0xd587[207]](this[_0xd587[1239]]((this[_0xd587[1218]]+ _0x5c29x2[_0xd587[1125]])* _0x5c29x2[_0xd587[255]]))}}};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1241]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x4*= Math[_0xd587[424]]/ 180;return mxUtils[_0xd587[432]]( new mxPoint(_0x5c29x2,_0x5c29x3),Math[_0xd587[426]](_0x5c29x4),Math[_0xd587[427]](_0x5c29x4), new mxPoint(_0x5c29x5,_0x5c29x9))};mxAbstractCanvas2D[_0xd587[202]][_0xd587[815]]= function(){this[_0xd587[1214]][_0xd587[207]](this[_0xd587[724]]);this[_0xd587[724]]= mxUtils[_0xd587[238]](this[_0xd587[724]])};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1210]]= function(){this[_0xd587[724]]= this[_0xd587[1214]][_0xd587[1242]]()};mxAbstractCanvas2D[_0xd587[202]][_0xd587[255]]= function(_0x5c29x2){this[_0xd587[724]][_0xd587[255]]*= _0x5c29x2;this[_0xd587[724]][_0xd587[610]]*= _0x5c29x2};mxAbstractCanvas2D[_0xd587[202]][_0xd587[513]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[724]][_0xd587[1126]]+= _0x5c29x2;this[_0xd587[724]][_0xd587[1125]]+= _0x5c29x3};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1243]]= function(_0x5c29x2){this[_0xd587[724]][_0xd587[1244]]= _0x5c29x2};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1245]]= function(_0x5c29x2){_0x5c29x2== mxConstants[_0xd587[217]]&& (_0x5c29x2= null);this[_0xd587[724]][_0xd587[604]]= _0x5c29x2;this[_0xd587[724]][_0xd587[606]]= null};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1246]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14){_0x5c29x4= this[_0xd587[724]];_0x5c29x4[_0xd587[604]]= _0x5c29x2;_0x5c29x4[_0xd587[1247]]= null!= _0x5c29x13?_0x5c29x13:1;_0x5c29x4[_0xd587[606]]= _0x5c29x3;_0x5c29x4[_0xd587[1248]]= null!= _0x5c29x14?_0x5c29x14:1;_0x5c29x4[_0xd587[607]]= _0x5c29x12};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1249]]= function(_0x5c29x2){_0x5c29x2== mxConstants[_0xd587[217]]&& (_0x5c29x2= null);this[_0xd587[724]][_0xd587[608]]= _0x5c29x2};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1250]]= function(_0x5c29x2){this[_0xd587[724]][_0xd587[610]]= _0x5c29x2};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1251]]= function(_0x5c29x2){this[_0xd587[724]][_0xd587[648]]= _0x5c29x2};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1252]]= function(_0x5c29x2){this[_0xd587[724]][_0xd587[649]]= _0x5c29x2};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1253]]= function(_0x5c29x2){this[_0xd587[724]][_0xd587[1254]]= _0x5c29x2};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1255]]= function(_0x5c29x2){this[_0xd587[724]][_0xd587[1256]]= _0x5c29x2};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1257]]= function(_0x5c29x2){this[_0xd587[724]][_0xd587[1258]]= _0x5c29x2};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1259]]= function(_0x5c29x2){_0x5c29x2== mxConstants[_0xd587[217]]&& (_0x5c29x2= null);this[_0xd587[724]][_0xd587[665]]= _0x5c29x2};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1260]]= function(_0x5c29x2){_0x5c29x2== mxConstants[_0xd587[217]]&& (_0x5c29x2= null);this[_0xd587[724]][_0xd587[1261]]= _0x5c29x2};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1262]]= function(_0x5c29x2){_0x5c29x2== mxConstants[_0xd587[217]]&& (_0x5c29x2= null);this[_0xd587[724]][_0xd587[1263]]= _0x5c29x2};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1264]]= function(_0x5c29x2){this[_0xd587[724]][_0xd587[487]]= _0x5c29x2};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1265]]= function(_0x5c29x2){this[_0xd587[724]][_0xd587[486]]= _0x5c29x2};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1266]]= function(_0x5c29x2){null== _0x5c29x2&& (_0x5c29x2= 0);this[_0xd587[724]][_0xd587[666]]= _0x5c29x2};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1267]]= function(_0x5c29x2){this[_0xd587[724]][_0xd587[639]]= _0x5c29x2};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1268]]= function(_0x5c29x2){_0x5c29x2== mxConstants[_0xd587[217]]&& (_0x5c29x2= null);this[_0xd587[724]][_0xd587[1269]]= _0x5c29x2};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1270]]= function(_0x5c29x2){this[_0xd587[724]][_0xd587[1271]]= _0x5c29x2};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1272]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[724]][_0xd587[1273]]= _0x5c29x2;this[_0xd587[724]][_0xd587[1274]]= _0x5c29x3};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1275]]= function(){this[_0xd587[1218]]= this[_0xd587[1217]]= 0;this[_0xd587[1215]]= []};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1276]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[1240]](this[_0xd587[1219]],_0x5c29x2,_0x5c29x3)};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1277]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[1240]](this[_0xd587[1221]],_0x5c29x2,_0x5c29x3)};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1278]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){this[_0xd587[1240]](this[_0xd587[1223]],_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5)};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1279]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){this[_0xd587[1240]](this[_0xd587[1225]],_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa)};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1280]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12){_0x5c29x2= mxUtils[_0xd587[1281]](this[_0xd587[1217]],this[_0xd587[1218]],_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12);for(_0x5c29x3= 0;_0x5c29x3< _0x5c29x2[_0xd587[67]];_0x5c29x3+= 6){this[_0xd587[1279]](_0x5c29x2[_0x5c29x3],_0x5c29x2[_0x5c29x3+ 1],_0x5c29x2[_0x5c29x3+ 2],_0x5c29x2[_0x5c29x3+ 3],_0x5c29x2[_0x5c29x3+ 4],_0x5c29x2[_0x5c29x3+ 5])}};mxAbstractCanvas2D[_0xd587[202]][_0xd587[268]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){this[_0xd587[1240]](this[_0xd587[1227]])};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1282]]= function(){};function mxXmlCanvas2D(_0x5c29x2){mxAbstractCanvas2D[_0xd587[239]](this);this[_0xd587[813]]= _0x5c29x2;this[_0xd587[1283]]()}mxUtils[_0xd587[1284]](mxXmlCanvas2D,mxAbstractCanvas2D);mxXmlCanvas2D[_0xd587[202]][_0xd587[1285]]=  !0;mxXmlCanvas2D[_0xd587[202]][_0xd587[1286]]=  !0;mxXmlCanvas2D[_0xd587[202]][_0xd587[1283]]= function(){var _0x5c29x2;_0x5c29x2= this[_0xd587[55]](_0xd587[1287]);_0x5c29x2[_0xd587[57]](_0xd587[1288],mxConstants.DEFAULT_FONTFAMILY);this[_0xd587[813]][_0xd587[62]](_0x5c29x2);_0x5c29x2= this[_0xd587[55]](_0xd587[1289]);_0x5c29x2[_0xd587[57]](_0xd587[803],mxConstants.DEFAULT_FONTSIZE);this[_0xd587[813]][_0xd587[62]](_0x5c29x2);_0x5c29x2= this[_0xd587[55]](_0xd587[1290]);_0x5c29x2[_0xd587[57]](_0xd587[352],mxConstants.SHADOWCOLOR);this[_0xd587[813]][_0xd587[62]](_0x5c29x2);_0x5c29x2= this[_0xd587[55]](_0xd587[1291]);_0x5c29x2[_0xd587[57]](_0xd587[1244],mxConstants.SHADOW_OPACITY);this[_0xd587[813]][_0xd587[62]](_0x5c29x2);_0x5c29x2= this[_0xd587[55]](_0xd587[1292]);_0x5c29x2[_0xd587[57]](_0xd587[1126],mxConstants.SHADOW_OFFSET_X);_0x5c29x2[_0xd587[57]](_0xd587[1125],mxConstants.SHADOW_OFFSET_Y);this[_0xd587[813]][_0xd587[62]](_0x5c29x2)};mxXmlCanvas2D[_0xd587[202]][_0xd587[1239]]= function(_0x5c29x2){return parseFloat(parseFloat(_0x5c29x2)[_0xd587[1293]](2))};mxXmlCanvas2D[_0xd587[202]][_0xd587[55]]= function(_0x5c29x2){return this[_0xd587[813]][_0xd587[295]][_0xd587[55]](_0x5c29x2)};mxXmlCanvas2D[_0xd587[202]][_0xd587[815]]= function(){this[_0xd587[1286]]&& mxAbstractCanvas2D[_0xd587[202]][_0xd587[815]][_0xd587[183]](this,arguments);this[_0xd587[813]][_0xd587[62]](this[_0xd587[55]](_0xd587[815]))};mxXmlCanvas2D[_0xd587[202]][_0xd587[1210]]= function(){this[_0xd587[1286]]&& mxAbstractCanvas2D[_0xd587[202]][_0xd587[1210]][_0xd587[183]](this,arguments);this[_0xd587[813]][_0xd587[62]](this[_0xd587[55]](_0xd587[1210]))};mxXmlCanvas2D[_0xd587[202]][_0xd587[255]]= function(_0x5c29x2){if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[255]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1243]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[255]);_0x5c29x3[_0xd587[57]](_0xd587[255],_0x5c29x2);this[_0xd587[813]][_0xd587[62]](_0x5c29x3)};mxXmlCanvas2D[_0xd587[202]][_0xd587[513]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[55]](_0xd587[513]);_0x5c29x4[_0xd587[57]](_0xd587[1126],this[_0xd587[1239]](_0x5c29x2));_0x5c29x4[_0xd587[57]](_0xd587[1125],this[_0xd587[1239]](_0x5c29x3));this[_0xd587[813]][_0xd587[62]](_0x5c29x4)};mxXmlCanvas2D[_0xd587[202]][_0xd587[1294]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=this[_0xd587[55]](_0xd587[1294]);if(0!= _0x5c29x2|| _0x5c29x3|| _0x5c29x4){_0x5c29xa[_0xd587[57]](_0xd587[1295],this[_0xd587[1239]](_0x5c29x2)),_0x5c29xa[_0xd587[57]](_0xd587[623],_0x5c29x3?_0xd587[500]:_0xd587[468]),_0x5c29xa[_0xd587[57]](_0xd587[624],_0x5c29x4?_0xd587[500]:_0xd587[468]),_0x5c29xa[_0xd587[57]](_0xd587[1296],this[_0xd587[1239]](_0x5c29x5)),_0x5c29xa[_0xd587[57]](_0xd587[1297],this[_0xd587[1239]](_0x5c29x9)),this[_0xd587[813]][_0xd587[62]](_0x5c29xa)}};mxXmlCanvas2D[_0xd587[202]][_0xd587[1243]]= function(_0x5c29x2){if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[1244]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1243]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[1244]);_0x5c29x3[_0xd587[57]](_0xd587[1244],this[_0xd587[1239]](_0x5c29x2));this[_0xd587[813]][_0xd587[62]](_0x5c29x3)};mxXmlCanvas2D[_0xd587[202]][_0xd587[1245]]= function(_0x5c29x2){_0x5c29x2== mxConstants[_0xd587[217]]&& (_0x5c29x2= null);if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[604]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1245]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[1298]);_0x5c29x3[_0xd587[57]](_0xd587[352],null!= _0x5c29x2?_0x5c29x2:mxConstants[_0xd587[217]]);this[_0xd587[813]][_0xd587[62]](_0x5c29x3)};mxXmlCanvas2D[_0xd587[202]][_0xd587[1246]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14){if(null!= _0x5c29x2&& null!= _0x5c29x3){mxAbstractCanvas2D[_0xd587[202]][_0xd587[1246]][_0xd587[183]](this,arguments);var _0x5c29x15=this[_0xd587[55]](_0xd587[1299]);_0x5c29x15[_0xd587[57]](_0xd587[1300],_0x5c29x2);_0x5c29x15[_0xd587[57]](_0xd587[1301],_0x5c29x3);_0x5c29x15[_0xd587[57]](_0xd587[235],this[_0xd587[1239]](_0x5c29x4));_0x5c29x15[_0xd587[57]](_0xd587[236],this[_0xd587[1239]](_0x5c29x5));_0x5c29x15[_0xd587[57]](_0xd587[1302],this[_0xd587[1239]](_0x5c29x9));_0x5c29x15[_0xd587[57]](_0xd587[1303],this[_0xd587[1239]](_0x5c29xa));null!= _0x5c29x12&& _0x5c29x15[_0xd587[57]](_0xd587[663],_0x5c29x12);null!= _0x5c29x13&& _0x5c29x15[_0xd587[57]](_0xd587[1304],_0x5c29x13);null!= _0x5c29x14&& _0x5c29x15[_0xd587[57]](_0xd587[1305],_0x5c29x14);this[_0xd587[813]][_0xd587[62]](_0x5c29x15)}};mxXmlCanvas2D[_0xd587[202]][_0xd587[1249]]= function(_0x5c29x2){_0x5c29x2== mxConstants[_0xd587[217]]&& (_0x5c29x2= null);if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[608]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1249]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[1306]);_0x5c29x3[_0xd587[57]](_0xd587[352],null!= _0x5c29x2?_0x5c29x2:mxConstants[_0xd587[217]]);this[_0xd587[813]][_0xd587[62]](_0x5c29x3)};mxXmlCanvas2D[_0xd587[202]][_0xd587[1250]]= function(_0x5c29x2){if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[610]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1250]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[1307]);_0x5c29x3[_0xd587[57]](_0xd587[117],this[_0xd587[1239]](_0x5c29x2));this[_0xd587[813]][_0xd587[62]](_0x5c29x3)};mxXmlCanvas2D[_0xd587[202]][_0xd587[1251]]= function(_0x5c29x2){if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[648]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1251]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[648]);_0x5c29x3[_0xd587[57]](_0xd587[648],_0x5c29x2?_0xd587[500]:_0xd587[468]);this[_0xd587[813]][_0xd587[62]](_0x5c29x3)};mxXmlCanvas2D[_0xd587[202]][_0xd587[1252]]= function(_0x5c29x2){if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[649]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1252]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[1308]);_0x5c29x3[_0xd587[57]](_0xd587[1309],_0x5c29x2);this[_0xd587[813]][_0xd587[62]](_0x5c29x3)};mxXmlCanvas2D[_0xd587[202]][_0xd587[1253]]= function(_0x5c29x2){if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[1254]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1253]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[1310]);_0x5c29x3[_0xd587[57]](_0xd587[1311],_0x5c29x2);this[_0xd587[813]][_0xd587[62]](_0x5c29x3)};mxXmlCanvas2D[_0xd587[202]][_0xd587[1255]]= function(_0x5c29x2){if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[1256]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1255]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[1312]);_0x5c29x3[_0xd587[57]](_0xd587[234],_0x5c29x2);this[_0xd587[813]][_0xd587[62]](_0x5c29x3)};mxXmlCanvas2D[_0xd587[202]][_0xd587[1257]]= function(_0x5c29x2){if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[1258]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1257]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[1313]);_0x5c29x3[_0xd587[57]](_0xd587[1314],_0x5c29x2);this[_0xd587[813]][_0xd587[62]](_0x5c29x3)};mxXmlCanvas2D[_0xd587[202]][_0xd587[1259]]= function(_0x5c29x2){if(this[_0xd587[1285]]){_0x5c29x2== mxConstants[_0xd587[217]]&& (_0x5c29x2= null);if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[665]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1259]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[1315]);_0x5c29x3[_0xd587[57]](_0xd587[352],null!= _0x5c29x2?_0x5c29x2:mxConstants[_0xd587[217]]);this[_0xd587[813]][_0xd587[62]](_0x5c29x3)}};mxXmlCanvas2D[_0xd587[202]][_0xd587[1260]]= function(_0x5c29x2){if(this[_0xd587[1285]]){_0x5c29x2== mxConstants[_0xd587[217]]&& (_0x5c29x2= null);if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[1261]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1260]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[1316]);_0x5c29x3[_0xd587[57]](_0xd587[352],null!= _0x5c29x2?_0x5c29x2:mxConstants[_0xd587[217]]);this[_0xd587[813]][_0xd587[62]](_0x5c29x3)}};mxXmlCanvas2D[_0xd587[202]][_0xd587[1262]]= function(_0x5c29x2){if(this[_0xd587[1285]]){_0x5c29x2== mxConstants[_0xd587[217]]&& (_0x5c29x2= null);if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[1263]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1262]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[1317]);_0x5c29x3[_0xd587[57]](_0xd587[352],null!= _0x5c29x2?_0x5c29x2:mxConstants[_0xd587[217]]);this[_0xd587[813]][_0xd587[62]](_0x5c29x3)}};mxXmlCanvas2D[_0xd587[202]][_0xd587[1264]]= function(_0x5c29x2){if(this[_0xd587[1285]]){if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[487]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1264]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[1289]);_0x5c29x3[_0xd587[57]](_0xd587[803],_0x5c29x2);this[_0xd587[813]][_0xd587[62]](_0x5c29x3)}};mxXmlCanvas2D[_0xd587[202]][_0xd587[1265]]= function(_0x5c29x2){if(this[_0xd587[1285]]){if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[486]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1265]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[1287]);_0x5c29x3[_0xd587[57]](_0xd587[1288],_0x5c29x2);this[_0xd587[813]][_0xd587[62]](_0x5c29x3)}};mxXmlCanvas2D[_0xd587[202]][_0xd587[1266]]= function(_0x5c29x2){if(this[_0xd587[1285]]){null== _0x5c29x2&& (_0x5c29x2= 0);if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[666]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1266]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[1318]);_0x5c29x3[_0xd587[57]](_0xd587[124],_0x5c29x2);this[_0xd587[813]][_0xd587[62]](_0x5c29x3)}};mxXmlCanvas2D[_0xd587[202]][_0xd587[1267]]= function(_0x5c29x2){if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[639]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1267]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[639]);_0x5c29x3[_0xd587[57]](_0xd587[984],_0x5c29x2?_0xd587[500]:_0xd587[468]);this[_0xd587[813]][_0xd587[62]](_0x5c29x3)};mxXmlCanvas2D[_0xd587[202]][_0xd587[1268]]= function(_0x5c29x2){if(this[_0xd587[1286]]){_0x5c29x2== mxConstants[_0xd587[217]]&& (_0x5c29x2= null);if(this[_0xd587[724]][_0xd587[1269]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1268]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[1290]);_0x5c29x3[_0xd587[57]](_0xd587[352],null!= _0x5c29x2?_0x5c29x2:mxConstants[_0xd587[217]]);this[_0xd587[813]][_0xd587[62]](_0x5c29x3)};mxXmlCanvas2D[_0xd587[202]][_0xd587[1270]]= function(_0x5c29x2){if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[1271]]== _0x5c29x2){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1270]][_0xd587[183]](this,arguments)};var _0x5c29x3=this[_0xd587[55]](_0xd587[1291]);_0x5c29x3[_0xd587[57]](_0xd587[1244],_0x5c29x2);this[_0xd587[813]][_0xd587[62]](_0x5c29x3)};mxXmlCanvas2D[_0xd587[202]][_0xd587[1272]]= function(_0x5c29x2,_0x5c29x3){if(this[_0xd587[1286]]){if(this[_0xd587[724]][_0xd587[1273]]== _0x5c29x2&& this[_0xd587[724]][_0xd587[1274]]== _0x5c29x3){return};mxAbstractCanvas2D[_0xd587[202]][_0xd587[1272]][_0xd587[183]](this,arguments)};var _0x5c29x4=this[_0xd587[55]](_0xd587[1292]);_0x5c29x4[_0xd587[57]](_0xd587[1126],_0x5c29x2);_0x5c29x4[_0xd587[57]](_0xd587[1125],_0x5c29x3);this[_0xd587[813]][_0xd587[62]](_0x5c29x4)};mxXmlCanvas2D[_0xd587[202]][_0xd587[1319]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=this[_0xd587[55]](_0xd587[1319]);_0x5c29x9[_0xd587[57]](_0xd587[235],this[_0xd587[1239]](_0x5c29x2));_0x5c29x9[_0xd587[57]](_0xd587[236],this[_0xd587[1239]](_0x5c29x3));_0x5c29x9[_0xd587[57]](_0xd587[1302],this[_0xd587[1239]](_0x5c29x4));_0x5c29x9[_0xd587[57]](_0xd587[1303],this[_0xd587[1239]](_0x5c29x5));this[_0xd587[813]][_0xd587[62]](_0x5c29x9)};mxXmlCanvas2D[_0xd587[202]][_0xd587[1320]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){var _0x5c29x12=this[_0xd587[55]](_0xd587[1320]);_0x5c29x12[_0xd587[57]](_0xd587[235],this[_0xd587[1239]](_0x5c29x2));_0x5c29x12[_0xd587[57]](_0xd587[236],this[_0xd587[1239]](_0x5c29x3));_0x5c29x12[_0xd587[57]](_0xd587[1302],this[_0xd587[1239]](_0x5c29x4));_0x5c29x12[_0xd587[57]](_0xd587[1303],this[_0xd587[1239]](_0x5c29x5));_0x5c29x12[_0xd587[57]](_0xd587[1126],this[_0xd587[1239]](_0x5c29x9));_0x5c29x12[_0xd587[57]](_0xd587[1125],this[_0xd587[1239]](_0x5c29xa));this[_0xd587[813]][_0xd587[62]](_0x5c29x12)};mxXmlCanvas2D[_0xd587[202]][_0xd587[680]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=this[_0xd587[55]](_0xd587[680]);_0x5c29x9[_0xd587[57]](_0xd587[235],this[_0xd587[1239]](_0x5c29x2));_0x5c29x9[_0xd587[57]](_0xd587[236],this[_0xd587[1239]](_0x5c29x3));_0x5c29x9[_0xd587[57]](_0xd587[1302],this[_0xd587[1239]](_0x5c29x4));_0x5c29x9[_0xd587[57]](_0xd587[1303],this[_0xd587[1239]](_0x5c29x5));this[_0xd587[813]][_0xd587[62]](_0x5c29x9)};mxXmlCanvas2D[_0xd587[202]][_0xd587[618]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13){_0x5c29x9= this[_0xd587[1212]][_0xd587[1321]](_0x5c29x9);var _0x5c29x14=this[_0xd587[55]](_0xd587[618]);_0x5c29x14[_0xd587[57]](_0xd587[235],this[_0xd587[1239]](_0x5c29x2));_0x5c29x14[_0xd587[57]](_0xd587[236],this[_0xd587[1239]](_0x5c29x3));_0x5c29x14[_0xd587[57]](_0xd587[1302],this[_0xd587[1239]](_0x5c29x4));_0x5c29x14[_0xd587[57]](_0xd587[1303],this[_0xd587[1239]](_0x5c29x5));_0x5c29x14[_0xd587[57]](_0xd587[390],_0x5c29x9);_0x5c29x14[_0xd587[57]](_0xd587[1322],_0x5c29xa?_0xd587[500]:_0xd587[468]);_0x5c29x14[_0xd587[57]](_0xd587[623],_0x5c29x12?_0xd587[500]:_0xd587[468]);_0x5c29x14[_0xd587[57]](_0xd587[624],_0x5c29x13?_0xd587[500]:_0xd587[468]);this[_0xd587[813]][_0xd587[62]](_0x5c29x14)};mxXmlCanvas2D[_0xd587[202]][_0xd587[1275]]= function(){this[_0xd587[813]][_0xd587[62]](this[_0xd587[55]](_0xd587[1275]));this[_0xd587[1218]]= this[_0xd587[1217]]= 0};mxXmlCanvas2D[_0xd587[202]][_0xd587[1276]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[55]](_0xd587[582]);_0x5c29x4[_0xd587[57]](_0xd587[235],this[_0xd587[1239]](_0x5c29x2));_0x5c29x4[_0xd587[57]](_0xd587[236],this[_0xd587[1239]](_0x5c29x3));this[_0xd587[813]][_0xd587[62]](_0x5c29x4);this[_0xd587[1217]]= _0x5c29x2;this[_0xd587[1218]]= _0x5c29x3};mxXmlCanvas2D[_0xd587[202]][_0xd587[1277]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[55]](_0xd587[683]);_0x5c29x4[_0xd587[57]](_0xd587[235],this[_0xd587[1239]](_0x5c29x2));_0x5c29x4[_0xd587[57]](_0xd587[236],this[_0xd587[1239]](_0x5c29x3));this[_0xd587[813]][_0xd587[62]](_0x5c29x4);this[_0xd587[1217]]= _0x5c29x2;this[_0xd587[1218]]= _0x5c29x3};mxXmlCanvas2D[_0xd587[202]][_0xd587[1278]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=this[_0xd587[55]](_0xd587[1323]);_0x5c29x9[_0xd587[57]](_0xd587[1324],this[_0xd587[1239]](_0x5c29x2));_0x5c29x9[_0xd587[57]](_0xd587[1325],this[_0xd587[1239]](_0x5c29x3));_0x5c29x9[_0xd587[57]](_0xd587[1326],this[_0xd587[1239]](_0x5c29x4));_0x5c29x9[_0xd587[57]](_0xd587[1327],this[_0xd587[1239]](_0x5c29x5));this[_0xd587[813]][_0xd587[62]](_0x5c29x9);this[_0xd587[1217]]= _0x5c29x4;this[_0xd587[1218]]= _0x5c29x5};mxXmlCanvas2D[_0xd587[202]][_0xd587[1279]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){var _0x5c29x12=this[_0xd587[55]](_0xd587[1328]);_0x5c29x12[_0xd587[57]](_0xd587[1324],this[_0xd587[1239]](_0x5c29x2));_0x5c29x12[_0xd587[57]](_0xd587[1325],this[_0xd587[1239]](_0x5c29x3));_0x5c29x12[_0xd587[57]](_0xd587[1326],this[_0xd587[1239]](_0x5c29x4));_0x5c29x12[_0xd587[57]](_0xd587[1327],this[_0xd587[1239]](_0x5c29x5));_0x5c29x12[_0xd587[57]](_0xd587[1329],this[_0xd587[1239]](_0x5c29x9));_0x5c29x12[_0xd587[57]](_0xd587[1330],this[_0xd587[1239]](_0x5c29xa));this[_0xd587[813]][_0xd587[62]](_0x5c29x12);this[_0xd587[1217]]= _0x5c29x9;this[_0xd587[1218]]= _0x5c29xa};mxXmlCanvas2D[_0xd587[202]][_0xd587[268]]= function(){this[_0xd587[813]][_0xd587[62]](this[_0xd587[55]](_0xd587[268]))};mxXmlCanvas2D[_0xd587[202]][_0xd587[963]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14,_0x5c29x15,_0x5c29x16,_0x5c29x17){if(this[_0xd587[1285]]&& null!= _0x5c29x9){mxUtils[_0xd587[1331]](_0x5c29x9)&& (_0x5c29x9= mxUtils[_0xd587[532]](_0x5c29x9));var _0x5c29x18=this[_0xd587[55]](_0xd587[963]);_0x5c29x18[_0xd587[57]](_0xd587[235],this[_0xd587[1239]](_0x5c29x2));_0x5c29x18[_0xd587[57]](_0xd587[236],this[_0xd587[1239]](_0x5c29x3));_0x5c29x18[_0xd587[57]](_0xd587[1302],this[_0xd587[1239]](_0x5c29x4));_0x5c29x18[_0xd587[57]](_0xd587[1303],this[_0xd587[1239]](_0x5c29x5));_0x5c29x18[_0xd587[57]](_0xd587[1332],_0x5c29x9);null!= _0x5c29xa&& _0x5c29x18[_0xd587[57]](_0xd587[611],_0x5c29xa);null!= _0x5c29x12&& _0x5c29x18[_0xd587[57]](_0xd587[552],_0x5c29x12);_0x5c29x18[_0xd587[57]](_0xd587[1333],_0x5c29x13?_0xd587[500]:_0xd587[468]);null== _0x5c29x14&& (_0x5c29x14= _0xd587[110]);_0x5c29x18[_0xd587[57]](_0xd587[1239],_0x5c29x14);null!= _0x5c29x15&& _0x5c29x18[_0xd587[57]](_0xd587[1334],_0x5c29x15?_0xd587[500]:_0xd587[468]);null!= _0x5c29x16&& _0x5c29x18[_0xd587[57]](_0xd587[1335],_0x5c29x16?_0xd587[500]:_0xd587[468]);null!= _0x5c29x17&& _0x5c29x18[_0xd587[57]](_0xd587[603],_0x5c29x17);this[_0xd587[813]][_0xd587[62]](_0x5c29x18)}};mxXmlCanvas2D[_0xd587[202]][_0xd587[1336]]= function(){this[_0xd587[813]][_0xd587[62]](this[_0xd587[55]](_0xd587[1336]))};mxXmlCanvas2D[_0xd587[202]][_0xd587[1334]]= function(){this[_0xd587[813]][_0xd587[62]](this[_0xd587[55]](_0xd587[1334]))};mxXmlCanvas2D[_0xd587[202]][_0xd587[1337]]= function(){this[_0xd587[813]][_0xd587[62]](this[_0xd587[55]](_0xd587[1338]))};function mxSvgCanvas2D(_0x5c29x2,_0x5c29x3){mxAbstractCanvas2D[_0xd587[239]](this);this[_0xd587[813]]= _0x5c29x2;this[_0xd587[1339]]= [];this[_0xd587[1340]]= null;this[_0xd587[1341]]= null!= _0x5c29x3?_0x5c29x3:!1;var _0x5c29x4=null;if(_0x5c29x2[_0xd587[295]]!= document){for(_0x5c29x4= _0x5c29x2;null!= _0x5c29x4&& _0xd587[571]!= _0x5c29x4[_0xd587[301]];){_0x5c29x4= _0x5c29x4[_0xd587[265]]}};null!= _0x5c29x4&& (0< _0x5c29x4[_0xd587[64]](_0xd587[1340])[_0xd587[67]]&& (this[_0xd587[1340]]= _0x5c29x4[_0xd587[64]](_0xd587[1340])[0]),null== this[_0xd587[1340]]&& (this[_0xd587[1340]]= this[_0xd587[55]](_0xd587[1340]),null!= _0x5c29x4[_0xd587[285]]?_0x5c29x4[_0xd587[950]](this[_0xd587[1340]],_0x5c29x4[_0xd587[285]]):_0x5c29x4[_0xd587[62]](this[_0xd587[1340]])),this[_0xd587[1341]]&& this[_0xd587[1340]][_0xd587[62]](this[_0xd587[1342]]()))}mxUtils[_0xd587[1284]](mxSvgCanvas2D,mxAbstractCanvas2D);mxSvgCanvas2D[_0xd587[202]][_0xd587[252]]= null;mxSvgCanvas2D[_0xd587[202]][_0xd587[1343]]=  !0;mxSvgCanvas2D[_0xd587[202]][_0xd587[1285]]=  !0;mxSvgCanvas2D[_0xd587[202]][_0xd587[1344]]=  !0;mxSvgCanvas2D[_0xd587[202]][_0xd587[1345]]= 0;mxSvgCanvas2D[_0xd587[202]][_0xd587[1346]]= 0;mxSvgCanvas2D[_0xd587[202]][_0xd587[1347]]=  !1;mxSvgCanvas2D[_0xd587[202]][_0xd587[862]]= function(){mxAbstractCanvas2D[_0xd587[202]][_0xd587[862]][_0xd587[183]](this,arguments);this[_0xd587[1339]]= []};mxSvgCanvas2D[_0xd587[202]][_0xd587[1342]]= function(_0x5c29x2){_0x5c29x2= this[_0xd587[55]](_0xd587[124]);_0x5c29x2[_0xd587[57]](_0xd587[60],_0xd587[61]);mxUtils[_0xd587[53]](_0x5c29x2,_0xd587[1348]+ mxConstants[_0xd587[484]]+ _0xd587[1349]+ mxConstants[_0xd587[483]]+ _0xd587[1350]);return _0x5c29x2};mxSvgCanvas2D[_0xd587[202]][_0xd587[55]]= function(_0x5c29x2,_0x5c29x3){if(null!= this[_0xd587[813]][_0xd587[295]][_0xd587[509]]){return this[_0xd587[813]][_0xd587[295]][_0xd587[509]](_0x5c29x3|| mxConstants[_0xd587[1351]],_0x5c29x2)};var _0x5c29x4=this[_0xd587[813]][_0xd587[295]][_0xd587[55]](_0x5c29x2);null!= _0x5c29x3&& _0x5c29x4[_0xd587[57]](_0xd587[1352],_0x5c29x3);return _0x5c29x4};mxSvgCanvas2D[_0xd587[202]][_0xd587[1353]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0xd587[198]== _0x5c29x2[_0xd587[225]](0)&& (_0x5c29x2= _0x5c29x2[_0xd587[85]](1));_0xd587[198]== _0x5c29x3[_0xd587[225]](0)&& (_0x5c29x3= _0x5c29x3[_0xd587[85]](1));_0x5c29x2= _0x5c29x2[_0xd587[216]]()+ _0xd587[213]+ _0x5c29x4;_0x5c29x3= _0x5c29x3[_0xd587[216]]()+ _0xd587[213]+ _0x5c29x5;_0x5c29x4= null;null== _0x5c29x9|| _0x5c29x9== mxConstants[_0xd587[1354]]?_0x5c29x4= _0xd587[1355]:_0x5c29x9== mxConstants[_0xd587[1356]]?_0x5c29x4= _0xd587[1357]:(_0x5c29x5= _0x5c29x2,_0x5c29x2= _0x5c29x3,_0x5c29x3= _0x5c29x5,_0x5c29x9== mxConstants[_0xd587[1358]]?_0x5c29x4= _0xd587[1355]:_0x5c29x9== mxConstants[_0xd587[1359]]&& (_0x5c29x4= _0xd587[1357]));return _0xd587[1360]+ _0x5c29x2+ _0xd587[213]+ _0x5c29x3+ _0xd587[213]+ _0x5c29x4};mxSvgCanvas2D[_0xd587[202]][_0xd587[1361]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=this[_0xd587[1353]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9),_0x5c29x12=this[_0xd587[1339]][_0x5c29xa];if(null== _0x5c29x12){var _0x5c29x13=this[_0xd587[813]][_0xd587[538]],_0x5c29x14=0,_0x5c29x15=_0x5c29xa+ _0xd587[213]+ _0x5c29x14;if(null!= _0x5c29x13){for(_0x5c29x12= _0x5c29x13[_0xd587[295]][_0xd587[1362]](_0x5c29x15);null!= _0x5c29x12&& _0x5c29x12[_0xd587[538]]!= _0x5c29x13;){_0x5c29x15= _0x5c29xa+ _0xd587[213]+ _0x5c29x14++,_0x5c29x12= _0x5c29x13[_0xd587[295]][_0xd587[1362]](_0x5c29x15)}}else {_0x5c29x15= _0xd587[1363]+ ++this[_0xd587[1346]]};null== _0x5c29x12&& (_0x5c29x12= this[_0xd587[1364]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9),_0x5c29x12[_0xd587[57]](_0xd587[1363],_0x5c29x15),null!= this[_0xd587[1340]]?this[_0xd587[1340]][_0xd587[62]](_0x5c29x12):_0x5c29x13[_0xd587[62]](_0x5c29x12));this[_0xd587[1339]][_0x5c29xa]= _0x5c29x12};return _0x5c29x12[_0xd587[284]](_0xd587[1363])};mxSvgCanvas2D[_0xd587[202]][_0xd587[1364]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=this[_0xd587[55]](_0xd587[1365]);_0x5c29xa[_0xd587[57]](_0xd587[1324],_0xd587[1366]);_0x5c29xa[_0xd587[57]](_0xd587[1325],_0xd587[1366]);_0x5c29xa[_0xd587[57]](_0xd587[1326],_0xd587[1366]);_0x5c29xa[_0xd587[57]](_0xd587[1327],_0xd587[1366]);null== _0x5c29x9|| _0x5c29x9== mxConstants[_0xd587[1354]]?_0x5c29xa[_0xd587[57]](_0xd587[1327],_0xd587[118]):_0x5c29x9== mxConstants[_0xd587[1356]]?_0x5c29xa[_0xd587[57]](_0xd587[1326],_0xd587[118]):_0x5c29x9== mxConstants[_0xd587[1358]]?_0x5c29xa[_0xd587[57]](_0xd587[1325],_0xd587[118]):_0x5c29x9== mxConstants[_0xd587[1359]]&& _0x5c29xa[_0xd587[57]](_0xd587[1324],_0xd587[118]);_0x5c29x4= 1> _0x5c29x4?_0xd587[1367]+ _0x5c29x4:_0xd587[110];_0x5c29x9= this[_0xd587[55]](_0xd587[1076]);_0x5c29x9[_0xd587[57]](_0xd587[1368],_0xd587[1366]);_0x5c29x9[_0xd587[57]](_0xd587[124],_0xd587[1369]+ _0x5c29x2+ _0x5c29x4);_0x5c29xa[_0xd587[62]](_0x5c29x9);_0x5c29x4= 1> _0x5c29x5?_0xd587[1367]+ _0x5c29x5:_0xd587[110];_0x5c29x9= this[_0xd587[55]](_0xd587[1076]);_0x5c29x9[_0xd587[57]](_0xd587[1368],_0xd587[118]);_0x5c29x9[_0xd587[57]](_0xd587[124],_0xd587[1369]+ _0x5c29x3+ _0x5c29x4);_0x5c29xa[_0xd587[62]](_0x5c29x9);return _0x5c29xa};mxSvgCanvas2D[_0xd587[202]][_0xd587[1370]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[252]],_0x5c29x5=this[_0xd587[724]];if(null!= _0x5c29x4){if(_0xd587[1215]== _0x5c29x4[_0xd587[301]]){if(null!= this[_0xd587[1215]]&& 0< this[_0xd587[1215]][_0xd587[67]]){_0x5c29x4[_0xd587[57]](_0xd587[1371],this[_0xd587[1215]][_0xd587[234]](_0xd587[185]))}else {return}};_0x5c29x2&& null!= _0x5c29x5[_0xd587[604]]?this[_0xd587[1372]]():this[_0xd587[1341]]|| (_0xd587[680]== _0x5c29x4[_0xd587[301]]&& mxClient[_0xd587[133]]&& !mxClient[_0xd587[76]]&& !mxClient[_0xd587[75]]?_0x5c29x4[_0xd587[57]](_0xd587[1334],_0xd587[1373]):_0x5c29x4[_0xd587[57]](_0xd587[1334],_0xd587[130]),_0x5c29x2=  !1);_0x5c29x3&& null!= _0x5c29x5[_0xd587[608]]?this[_0xd587[1374]]():this[_0xd587[1341]]|| _0x5c29x4[_0xd587[57]](_0xd587[1336],_0xd587[130]);null!= _0x5c29x5[_0xd587[535]]&& 0< _0x5c29x5[_0xd587[535]][_0xd587[67]]&& _0x5c29x4[_0xd587[57]](_0xd587[535],_0x5c29x5[_0xd587[535]]);_0x5c29x5[_0xd587[639]]&& this[_0xd587[813]][_0xd587[62]](this[_0xd587[1375]](_0x5c29x4));0< this[_0xd587[1345]]&& !_0x5c29x2&& this[_0xd587[813]][_0xd587[62]](this[_0xd587[1376]](_0x5c29x4));this[_0xd587[1229]]&& (_0xd587[1215]!= _0x5c29x4[_0xd587[301]]|| this[_0xd587[1215]][this[_0xd587[1215]][_0xd587[67]]- 1]== this[_0xd587[1227]])&& _0x5c29x4[_0xd587[57]](_0xd587[1377],_0xd587[1378]);this[_0xd587[813]][_0xd587[62]](_0x5c29x4)}};mxSvgCanvas2D[_0xd587[202]][_0xd587[1372]]= function(){var _0x5c29x2=this[_0xd587[724]];1> _0x5c29x2[_0xd587[1244]]&& this[_0xd587[252]][_0xd587[57]](_0xd587[1379],_0x5c29x2[_0xd587[1244]]);null!= _0x5c29x2[_0xd587[604]]&& (null!= _0x5c29x2[_0xd587[606]]?(_0x5c29x2= this[_0xd587[1361]](_0x5c29x2[_0xd587[604]],_0x5c29x2[_0xd587[606]],_0x5c29x2[_0xd587[1247]],_0x5c29x2[_0xd587[1248]],_0x5c29x2[_0xd587[607]]),this[_0xd587[252]][_0xd587[57]](_0xd587[1334],_0xd587[1380]+ _0x5c29x2+ _0xd587[460])):this[_0xd587[252]][_0xd587[57]](_0xd587[1334],_0x5c29x2[_0xd587[604]][_0xd587[216]]()))};mxSvgCanvas2D[_0xd587[202]][_0xd587[1374]]= function(){var _0x5c29x2=this[_0xd587[724]];this[_0xd587[252]][_0xd587[57]](_0xd587[1336],_0x5c29x2[_0xd587[608]][_0xd587[216]]());1> _0x5c29x2[_0xd587[1244]]&& this[_0xd587[252]][_0xd587[57]](_0xd587[1381],_0x5c29x2[_0xd587[1244]]);var _0x5c29x3=Math[_0xd587[160]](1,this[_0xd587[1239]](_0x5c29x2[_0xd587[610]]* _0x5c29x2[_0xd587[255]]));1!= _0x5c29x3&& this[_0xd587[252]][_0xd587[57]](_0xd587[1382],_0x5c29x3);_0xd587[1215]== this[_0xd587[252]][_0xd587[301]]&& this[_0xd587[1383]]();_0x5c29x2[_0xd587[648]]&& this[_0xd587[252]][_0xd587[57]](_0xd587[1384],this[_0xd587[1385]](_0x5c29x3))};mxSvgCanvas2D[_0xd587[202]][_0xd587[1383]]= function(){var _0x5c29x2=this[_0xd587[724]];null!= _0x5c29x2[_0xd587[1256]]&& _0xd587[1233]!= _0x5c29x2[_0xd587[1256]]&& this[_0xd587[252]][_0xd587[57]](_0xd587[1386],_0x5c29x2[_0xd587[1256]]);if(null!= _0x5c29x2[_0xd587[1254]]){var _0x5c29x3=_0x5c29x2[_0xd587[1254]];_0xd587[1232]== _0x5c29x3&& (_0x5c29x3= _0xd587[1387]);_0xd587[1387]!= _0x5c29x3&& this[_0xd587[252]][_0xd587[57]](_0xd587[1388],_0x5c29x3)};null!= _0x5c29x2[_0xd587[1258]]&& (!this[_0xd587[1341]]|| 10!= _0x5c29x2[_0xd587[1258]])&& this[_0xd587[252]][_0xd587[57]](_0xd587[1389],_0x5c29x2[_0xd587[1258]])};mxSvgCanvas2D[_0xd587[202]][_0xd587[1385]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[724]][_0xd587[649]][_0xd587[224]](_0xd587[185]),_0x5c29x4=[];if(0< _0x5c29x3[_0xd587[67]]){for(var _0x5c29x5=0;_0x5c29x5< _0x5c29x3[_0xd587[67]];_0x5c29x5++){_0x5c29x4[_0x5c29x5]= Number(_0x5c29x3[_0x5c29x5])* _0x5c29x2}};return _0x5c29x4[_0xd587[234]](_0xd587[185])};mxSvgCanvas2D[_0xd587[202]][_0xd587[1376]]= function(_0x5c29x2){_0x5c29x2= _0x5c29x2[_0xd587[511]](!0);var _0x5c29x3=parseFloat(_0x5c29x2[_0xd587[284]](_0xd587[1382])|| 1)+ this[_0xd587[1345]];_0x5c29x2[_0xd587[57]](_0xd587[1377],_0xd587[1336]);_0x5c29x2[_0xd587[57]](_0xd587[187],_0xd587[188]);_0x5c29x2[_0xd587[1390]](_0xd587[1384]);_0x5c29x2[_0xd587[57]](_0xd587[1382],_0x5c29x3);_0x5c29x2[_0xd587[57]](_0xd587[1334],_0xd587[130]);_0x5c29x2[_0xd587[57]](_0xd587[1336],mxClient[_0xd587[71]]?_0xd587[130]:_0xd587[1391]);return _0x5c29x2};mxSvgCanvas2D[_0xd587[202]][_0xd587[1375]]= function(_0x5c29x2){_0x5c29x2= _0x5c29x2[_0xd587[511]](!0);var _0x5c29x3=this[_0xd587[724]];_0xd587[130]!= _0x5c29x2[_0xd587[284]](_0xd587[1334])&& _0x5c29x2[_0xd587[57]](_0xd587[1334],_0x5c29x3[_0xd587[1269]]);_0xd587[130]!= _0x5c29x2[_0xd587[284]](_0xd587[1336])&& _0x5c29x2[_0xd587[57]](_0xd587[1336],_0x5c29x3[_0xd587[1269]]);_0x5c29x2[_0xd587[57]](_0xd587[535],_0xd587[536]+ this[_0xd587[1239]](_0x5c29x3[_0xd587[1273]]* _0x5c29x3[_0xd587[255]])+ _0xd587[537]+ this[_0xd587[1239]](_0x5c29x3[_0xd587[1274]]* _0x5c29x3[_0xd587[255]])+ _0xd587[460]+ (_0x5c29x3[_0xd587[535]]|| _0xd587[110]));_0x5c29x2[_0xd587[57]](_0xd587[461],_0x5c29x3[_0xd587[1271]]);return _0x5c29x2};mxSvgCanvas2D[_0xd587[202]][_0xd587[1294]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){if(0!= _0x5c29x2|| _0x5c29x3|| _0x5c29x4){var _0x5c29xa=this[_0xd587[724]];_0x5c29x5+= _0x5c29xa[_0xd587[1126]];_0x5c29x9+= _0x5c29xa[_0xd587[1125]];_0x5c29x5*= _0x5c29xa[_0xd587[255]];_0x5c29x9*= _0x5c29xa[_0xd587[255]];_0x5c29xa[_0xd587[535]]= _0x5c29xa[_0xd587[535]]|| _0xd587[110];if(_0x5c29x3&& _0x5c29x4){_0x5c29x2+= 180}else {if(_0x5c29x3^ _0x5c29x4){var _0x5c29x12=_0x5c29x3?_0x5c29x5:0,_0x5c29x13=_0x5c29x3?-1:1,_0x5c29x14=_0x5c29x4?_0x5c29x9:0,_0x5c29x15=_0x5c29x4?-1:1;_0x5c29xa[_0xd587[535]]+= _0xd587[536]+ this[_0xd587[1239]](_0x5c29x12)+ _0xd587[537]+ this[_0xd587[1239]](_0x5c29x14)+ _0xd587[1392]+ this[_0xd587[1239]](_0x5c29x13)+ _0xd587[537]+ this[_0xd587[1239]](_0x5c29x15)+ _0xd587[1393]+ this[_0xd587[1239]](-_0x5c29x12) + _0xd587[537]+ this[_0xd587[1239]](-_0x5c29x14) + _0xd587[460]}};if(_0x5c29x3?!_0x5c29x4:_0x5c29x4){_0x5c29x2*=  -1};0!= _0x5c29x2&& (_0x5c29xa[_0xd587[535]]+= _0xd587[1394]+ this[_0xd587[1239]](_0x5c29x2)+ _0xd587[537]+ this[_0xd587[1239]](_0x5c29x5)+ _0xd587[537]+ this[_0xd587[1239]](_0x5c29x9)+ _0xd587[460]);_0x5c29xa[_0xd587[603]]+= _0x5c29x2;_0x5c29xa[_0xd587[1395]]= _0x5c29x5;_0x5c29xa[_0xd587[1396]]= _0x5c29x9}};mxSvgCanvas2D[_0xd587[202]][_0xd587[1275]]= function(){mxAbstractCanvas2D[_0xd587[202]][_0xd587[1275]][_0xd587[183]](this,arguments);this[_0xd587[252]]= this[_0xd587[55]](_0xd587[1215])};mxSvgCanvas2D[_0xd587[202]][_0xd587[1319]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=this[_0xd587[724]],_0x5c29xa=this[_0xd587[55]](_0xd587[1319]);_0x5c29xa[_0xd587[57]](_0xd587[235],this[_0xd587[1239]]((_0x5c29x2+ _0x5c29x9[_0xd587[1126]])* _0x5c29x9[_0xd587[255]]));_0x5c29xa[_0xd587[57]](_0xd587[236],this[_0xd587[1239]]((_0x5c29x3+ _0x5c29x9[_0xd587[1125]])* _0x5c29x9[_0xd587[255]]));_0x5c29xa[_0xd587[57]](_0xd587[117],this[_0xd587[1239]](_0x5c29x4* _0x5c29x9[_0xd587[255]]));_0x5c29xa[_0xd587[57]](_0xd587[119],this[_0xd587[1239]](_0x5c29x5* _0x5c29x9[_0xd587[255]]));this[_0xd587[252]]= _0x5c29xa};mxSvgCanvas2D[_0xd587[202]][_0xd587[1320]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){this[_0xd587[1319]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5);0< _0x5c29x9&& this[_0xd587[252]][_0xd587[57]](_0xd587[1397],this[_0xd587[1239]](_0x5c29x9* this[_0xd587[724]][_0xd587[255]]));0< _0x5c29xa&& this[_0xd587[252]][_0xd587[57]](_0xd587[1398],this[_0xd587[1239]](_0x5c29xa* this[_0xd587[724]][_0xd587[255]]))};mxSvgCanvas2D[_0xd587[202]][_0xd587[680]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=this[_0xd587[724]],_0x5c29xa=this[_0xd587[55]](_0xd587[680]);_0x5c29xa[_0xd587[57]](_0xd587[1296],Math[_0xd587[488]]((_0x5c29x2+ _0x5c29x4/ 2+ _0x5c29x9[_0xd587[1126]])* _0x5c29x9[_0xd587[255]]));_0x5c29xa[_0xd587[57]](_0xd587[1297],Math[_0xd587[488]]((_0x5c29x3+ _0x5c29x5/ 2+ _0x5c29x9[_0xd587[1125]])* _0x5c29x9[_0xd587[255]]));_0x5c29xa[_0xd587[57]](_0xd587[1397],_0x5c29x4/ 2* _0x5c29x9[_0xd587[255]]);_0x5c29xa[_0xd587[57]](_0xd587[1398],_0x5c29x5/ 2* _0x5c29x9[_0xd587[255]]);this[_0xd587[252]]= _0x5c29xa};mxSvgCanvas2D[_0xd587[202]][_0xd587[618]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13){_0x5c29x9= this[_0xd587[1212]][_0xd587[1321]](_0x5c29x9);_0x5c29xa= null!= _0x5c29xa?_0x5c29xa:!0;_0x5c29x12= null!= _0x5c29x12?_0x5c29x12:!1;_0x5c29x13= null!= _0x5c29x13?_0x5c29x13:!1;var _0x5c29x14=this[_0xd587[724]];_0x5c29x2+= _0x5c29x14[_0xd587[1126]];_0x5c29x3+= _0x5c29x14[_0xd587[1125]];var _0x5c29x15=this[_0xd587[55]](_0xd587[618]);_0x5c29x15[_0xd587[57]](_0xd587[235],this[_0xd587[1239]](_0x5c29x2* _0x5c29x14[_0xd587[255]]));_0x5c29x15[_0xd587[57]](_0xd587[236],this[_0xd587[1239]](_0x5c29x3* _0x5c29x14[_0xd587[255]]));_0x5c29x15[_0xd587[57]](_0xd587[117],this[_0xd587[1239]](_0x5c29x4* _0x5c29x14[_0xd587[255]]));_0x5c29x15[_0xd587[57]](_0xd587[119],this[_0xd587[1239]](_0x5c29x5* _0x5c29x14[_0xd587[255]]));null== _0x5c29x15[_0xd587[1399]]?_0x5c29x15[_0xd587[57]](_0xd587[1400],_0x5c29x9):_0x5c29x15[_0xd587[1399]](mxConstants.NS_XLINK,_0xd587[44],_0x5c29x9);_0x5c29xa|| _0x5c29x15[_0xd587[57]](_0xd587[1401],_0xd587[130]);1> _0x5c29x14[_0xd587[1244]]&& _0x5c29x15[_0xd587[57]](_0xd587[461],_0x5c29x14[_0xd587[1244]]);_0x5c29x9= this[_0xd587[724]][_0xd587[535]]|| _0xd587[110];if(_0x5c29x12|| _0x5c29x13){var _0x5c29x16=_0x5c29xa= 1,_0x5c29x17=0,_0x5c29x18=0;_0x5c29x12&& (_0x5c29xa=  -1,_0x5c29x17= -_0x5c29x4- 2* _0x5c29x2);_0x5c29x13&& (_0x5c29x16=  -1,_0x5c29x18= -_0x5c29x5- 2* _0x5c29x3);_0x5c29x9+= _0xd587[1402]+ _0x5c29xa+ _0xd587[537]+ _0x5c29x16+ _0xd587[1393]+ _0x5c29x17+ _0xd587[537]+ _0x5c29x18+ _0xd587[460]};0< _0x5c29x9[_0xd587[67]]&& _0x5c29x15[_0xd587[57]](_0xd587[535],_0x5c29x9);this[_0xd587[813]][_0xd587[62]](_0x5c29x15);this[_0xd587[1347]]&& (_0x5c29x15[_0xd587[57]](_0xd587[124],_0xd587[1403]),_0x5c29x15= this[_0xd587[55]](_0xd587[1319]),_0x5c29x15[_0xd587[57]](_0xd587[187],_0xd587[188]),_0x5c29x15[_0xd587[57]](_0xd587[1377],_0xd587[1334]),_0x5c29x15[_0xd587[57]](_0xd587[235],this[_0xd587[1239]](_0x5c29x2* _0x5c29x14[_0xd587[255]])),_0x5c29x15[_0xd587[57]](_0xd587[236],this[_0xd587[1239]](_0x5c29x3* _0x5c29x14[_0xd587[255]])),_0x5c29x15[_0xd587[57]](_0xd587[117],this[_0xd587[1239]](_0x5c29x4* _0x5c29x14[_0xd587[255]])),_0x5c29x15[_0xd587[57]](_0xd587[119],this[_0xd587[1239]](_0x5c29x5* _0x5c29x14[_0xd587[255]])),this[_0xd587[813]][_0xd587[62]](_0x5c29x15))};mxSvgCanvas2D[_0xd587[202]][_0xd587[1404]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x4= this[_0xd587[724]];_0x5c29x5= _0xd587[1405]+ Math[_0xd587[488]](_0x5c29x4[_0xd587[487]])+ _0xd587[1406]+ _0x5c29x4[_0xd587[486]]+ _0xd587[1407]+ _0x5c29x4[_0xd587[665]]+ _0xd587[1408]+ Math[_0xd587[488]](_0x5c29x4[_0xd587[487]]* mxConstants[_0xd587[490]])+ _0xd587[1409]+ _0x5c29x5;(_0x5c29x4[_0xd587[666]]& mxConstants[_0xd587[1410]])== mxConstants[_0xd587[1410]]&& (_0x5c29x5+= _0xd587[1411]);(_0x5c29x4[_0xd587[666]]& mxConstants[_0xd587[1412]])== mxConstants[_0xd587[1412]]&& (_0x5c29x5+= _0xd587[1413]);(_0x5c29x4[_0xd587[666]]& mxConstants[_0xd587[1414]])== mxConstants[_0xd587[1414]]&& (_0x5c29x5+= _0xd587[1415]);_0x5c29x3== mxConstants[_0xd587[479]]?_0x5c29x5+= _0xd587[1416]:_0x5c29x3== mxConstants[_0xd587[480]]&& (_0x5c29x5+= _0xd587[1417]);_0x5c29x3= _0xd587[110];null!= _0x5c29x4[_0xd587[1261]]&& (_0x5c29x3+= _0xd587[1418]+ _0x5c29x4[_0xd587[1261]]+ _0xd587[471]);null!= _0x5c29x4[_0xd587[1263]]&& (_0x5c29x3+= _0xd587[1419]+ _0x5c29x4[_0xd587[1263]]+ _0xd587[471]);mxUtils[_0xd587[1331]](_0x5c29x2)|| (_0x5c29x4= document[_0xd587[55]](_0xd587[126]),_0x5c29x4[_0xd587[339]]= _0x5c29x2[_0xd587[230]](/&lt;/g,_0xd587[1421])[_0xd587[230]](/&gt;/g,_0xd587[1420])[_0xd587[230]](/</g,_0xd587[334])[_0xd587[230]](/>/g,_0xd587[335]),_0x5c29x2= _0x5c29x4[_0xd587[131]],_0x5c29x9?_0x5c29x5+= _0x5c29x3:0< _0x5c29x3[_0xd587[67]]&& (_0x5c29x2= _0xd587[1422]+ _0x5c29x3+ _0xd587[1423]+ _0x5c29x2+ _0xd587[1424]));if(!mxClient[_0xd587[80]]&& document[_0xd587[509]]){return _0x5c29x9= document[_0xd587[509]](_0xd587[577],_0xd587[485]),_0x5c29x9[_0xd587[57]](_0xd587[124],_0x5c29x5),mxUtils[_0xd587[1331]](_0x5c29x2)?this[_0xd587[813]][_0xd587[295]]!= document?_0x5c29x9[_0xd587[62]](_0x5c29x2[_0xd587[511]](!0)):_0x5c29x9[_0xd587[62]](_0x5c29x2):_0x5c29x9[_0xd587[339]]= _0x5c29x2,_0x5c29x9};mxUtils[_0xd587[1331]](_0x5c29x2)&& this[_0xd587[813]][_0xd587[295]]!= document&& (_0x5c29x2= _0x5c29x2[_0xd587[342]]);_0x5c29x2= _0x5c29x2[_0xd587[230]](/<br>/g,_0xd587[1426])[_0xd587[230]](/<hr>/g,_0xd587[1425]);return mxUtils[_0xd587[877]](_0xd587[1427]+ _0x5c29x5+ _0xd587[1423]+ _0x5c29x2+ _0xd587[1424])[_0xd587[158]]};mxSvgCanvas2D[_0xd587[202]][_0xd587[963]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14,_0x5c29x15,_0x5c29x16,_0x5c29x17){if(this[_0xd587[1285]]&& null!= _0x5c29x9){_0x5c29x17= null!= _0x5c29x17?_0x5c29x17:0;var _0x5c29x18=this[_0xd587[724]];_0x5c29x2+= _0x5c29x18[_0xd587[1126]];_0x5c29x3+= _0x5c29x18[_0xd587[1125]];if(this[_0xd587[1344]]&& _0xd587[1428]== _0x5c29x14){var _0x5c29x19=_0xd587[1429];_0x5c29x16?(_0x5c29x19+= _0xd587[1430],0< _0x5c29x5&& (_0x5c29x19+= _0xd587[1431]+ Math[_0xd587[488]](_0x5c29x5)+ _0xd587[1409]),0< _0x5c29x4&& (_0x5c29x19+= _0xd587[1432]+ Math[_0xd587[488]](_0x5c29x4)+ _0xd587[1409])):_0x5c29x15&& (_0x5c29x19+= _0xd587[1432]+ Math[_0xd587[488]](_0x5c29x4)+ _0xd587[1409],0< _0x5c29x5&& (_0x5c29x19+= _0xd587[1431]+ Math[_0xd587[488]](_0x5c29x5)+ _0xd587[1409]));_0x5c29x13?(!_0x5c29x16&& 0< _0x5c29x4&& (_0x5c29x19+= _0xd587[1432]+ Math[_0xd587[488]](_0x5c29x4)+ _0xd587[1409]),_0x5c29x19+= _0xd587[1433]):_0x5c29x19+= _0xd587[1434];_0x5c29x13= this[_0xd587[55]](_0xd587[449]);1> _0x5c29x18[_0xd587[1244]]&& _0x5c29x13[_0xd587[57]](_0xd587[461],_0x5c29x18[_0xd587[1244]]);_0x5c29x14= this[_0xd587[55]](_0xd587[1435]);_0x5c29x14[_0xd587[57]](_0xd587[1377],_0xd587[1378]);_0x5c29x19= this[_0xd587[1404]](_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x19,_0x5c29x15);if(null!= _0x5c29x19){_0x5c29x13[_0xd587[62]](_0x5c29x14);this[_0xd587[813]][_0xd587[62]](_0x5c29x13);var _0x5c29x1a=0;if(mxClient[_0xd587[80]]&& !mxClient[_0xd587[48]]){var _0x5c29x1b=document[_0xd587[55]](_0xd587[485]);_0x5c29x1b[_0xd587[124]][_0xd587[103]]= _0x5c29x19[_0xd587[284]](_0xd587[124]);_0x5c29x1b[_0xd587[124]][_0xd587[495]]= mxClient[_0xd587[496]]?_0xd587[497]:_0xd587[498];_0x5c29x1b[_0xd587[124]][_0xd587[187]]= _0xd587[188];_0x5c29x1b[_0xd587[339]]= mxUtils[_0xd587[1331]](_0x5c29x9)?_0x5c29x9[_0xd587[342]]:_0x5c29x9;document[_0xd587[112]][_0xd587[62]](_0x5c29x1b);_0x5c29x1a= _0x5c29x1b[_0xd587[359]];_0x5c29x5= mxClient[_0xd587[496]]&& 0< _0x5c29x5&& _0x5c29x16?Math[_0xd587[243]](_0x5c29x5,_0x5c29x1b[_0xd587[167]]+ 2):_0x5c29x1b[_0xd587[167]];_0x5c29x1b[_0xd587[265]][_0xd587[266]](_0x5c29x1b);_0x5c29x14[_0xd587[62]](_0x5c29x19)}else {this[_0xd587[813]][_0xd587[295]]!= document?(_0x5c29x19[_0xd587[124]][_0xd587[187]]= _0xd587[188],document[_0xd587[112]][_0xd587[62]](_0x5c29x19),_0x5c29x1a= _0x5c29x19[_0xd587[359]],_0x5c29x5= _0x5c29x19[_0xd587[167]],_0x5c29x14[_0xd587[62]](_0x5c29x19),_0x5c29x19[_0xd587[124]][_0xd587[187]]= _0xd587[110]):(_0x5c29x14[_0xd587[62]](_0x5c29x19),_0x5c29x1a= _0x5c29x19[_0xd587[359]],_0x5c29x5= _0x5c29x19[_0xd587[167]])};_0x5c29x4= _0x5c29x15?Math[_0xd587[160]](_0x5c29x4,_0x5c29x1a):_0x5c29x1a;1> _0x5c29x18[_0xd587[1244]]&& _0x5c29x13[_0xd587[57]](_0xd587[461],_0x5c29x18[_0xd587[1244]]);_0x5c29x15= _0x5c29x9= 0;_0x5c29xa== mxConstants[_0xd587[479]]?_0x5c29x9-= _0x5c29x4/ 2:_0x5c29xa== mxConstants[_0xd587[480]]&& (_0x5c29x9-= _0x5c29x4);_0x5c29x2+= _0x5c29x9;_0x5c29x12== mxConstants[_0xd587[481]]?_0x5c29x15-= _0x5c29x5/ 2:_0x5c29x12== mxConstants[_0xd587[482]]&& (_0x5c29x15-= _0x5c29x5);_0x5c29x3+= _0x5c29x15;_0x5c29xa= 1!= _0x5c29x18[_0xd587[255]]?_0xd587[1402]+ _0x5c29x18[_0xd587[255]]+ _0xd587[460]:_0xd587[110];0!= _0x5c29x18[_0xd587[603]]&& this[_0xd587[1216]]?(_0x5c29xa+= _0xd587[1394]+ _0x5c29x18[_0xd587[603]]+ _0xd587[537]+ _0x5c29x4/ 2+ _0xd587[537]+ _0x5c29x5/ 2+ _0xd587[460],_0x5c29x3= this[_0xd587[1241]]((_0x5c29x2+ _0x5c29x4/ 2)* _0x5c29x18[_0xd587[255]],(_0x5c29x3+ _0x5c29x5/ 2)* _0x5c29x18[_0xd587[255]],_0x5c29x18[_0xd587[603]],_0x5c29x18[_0xd587[1395]],_0x5c29x18[_0xd587[1396]]),_0x5c29x2= _0x5c29x3[_0xd587[235]]- _0x5c29x4* _0x5c29x18[_0xd587[255]]/ 2,_0x5c29x3= _0x5c29x3[_0xd587[236]]- _0x5c29x5* _0x5c29x18[_0xd587[255]]/ 2):(_0x5c29x2*= _0x5c29x18[_0xd587[255]],_0x5c29x3*= _0x5c29x18[_0xd587[255]]);0!= _0x5c29x17&& (_0x5c29xa+= _0xd587[1394]+ _0x5c29x17+ _0xd587[537]+ -_0x5c29x9+ _0xd587[537]+ -_0x5c29x15+ _0xd587[460]);_0x5c29x13[_0xd587[57]](_0xd587[535],_0xd587[536]+ Math[_0xd587[488]](_0x5c29x2)+ _0xd587[537]+ Math[_0xd587[488]](_0x5c29x3)+ _0xd587[460]+ _0x5c29xa);_0x5c29x14[_0xd587[57]](_0xd587[117],Math[_0xd587[488]](Math[_0xd587[160]](1,_0x5c29x4)));_0x5c29x14[_0xd587[57]](_0xd587[119],Math[_0xd587[488]](Math[_0xd587[160]](1,_0x5c29x5)))}}else {this[_0xd587[1436]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x15,_0x5c29x16,_0x5c29x17)}}};mxSvgCanvas2D[_0xd587[202]][_0xd587[1437]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x2= Math[_0xd587[488]](_0x5c29x2);_0x5c29x3= Math[_0xd587[488]](_0x5c29x3);_0x5c29x4= Math[_0xd587[488]](_0x5c29x4);_0x5c29x5= Math[_0xd587[488]](_0x5c29x5);for(var _0x5c29x9=_0xd587[1438]+ _0x5c29x2+ _0xd587[213]+ _0x5c29x3+ _0xd587[213]+ _0x5c29x4+ _0xd587[213]+ _0x5c29x5,_0x5c29xa=0,_0x5c29x12=_0x5c29x9+ _0xd587[213]+ _0x5c29xa;null!= document[_0xd587[1362]](_0x5c29x12);){_0x5c29x12= _0x5c29x9+ _0xd587[213]+  ++_0x5c29xa};clip= this[_0xd587[55]](_0xd587[1439]);clip[_0xd587[57]](_0xd587[1363],_0x5c29x12);_0x5c29x9= this[_0xd587[55]](_0xd587[1319]);_0x5c29x9[_0xd587[57]](_0xd587[235],_0x5c29x2);_0x5c29x9[_0xd587[57]](_0xd587[236],_0x5c29x3);_0x5c29x9[_0xd587[57]](_0xd587[117],_0x5c29x4);_0x5c29x9[_0xd587[57]](_0xd587[119],_0x5c29x5);clip[_0xd587[62]](_0x5c29x9);return clip};mxSvgCanvas2D[_0xd587[202]][_0xd587[1436]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14,_0x5c29x15,_0x5c29x16){_0x5c29x16= null!= _0x5c29x16?_0x5c29x16:0;_0x5c29x13= this[_0xd587[724]];var _0x5c29x17=Math[_0xd587[488]](_0x5c29x13[_0xd587[487]]),_0x5c29x18=this[_0xd587[55]](_0xd587[449]),_0x5c29x19=_0x5c29x13[_0xd587[535]]|| _0xd587[110];0!= _0x5c29x16&& (_0x5c29x19+= _0xd587[1394]+ _0x5c29x16+ _0xd587[537]+ this[_0xd587[1239]](_0x5c29x2* _0x5c29x13[_0xd587[255]])+ _0xd587[537]+ this[_0xd587[1239]](_0x5c29x3* _0x5c29x13[_0xd587[255]])+ _0xd587[460]);if(_0x5c29x15&& 0< _0x5c29x4&& 0< _0x5c29x5){var _0x5c29x1a=_0x5c29x2;_0x5c29x16= _0x5c29x3;_0x5c29xa== mxConstants[_0xd587[479]]?_0x5c29x1a-= _0x5c29x4/ 2:_0x5c29xa== mxConstants[_0xd587[480]]&& (_0x5c29x1a-= _0x5c29x4);_0x5c29x12== mxConstants[_0xd587[481]]?_0x5c29x16-= _0x5c29x5/ 2:_0x5c29x12== mxConstants[_0xd587[482]]&& (_0x5c29x16-= _0x5c29x5);_0x5c29x16= this[_0xd587[1437]](_0x5c29x1a* _0x5c29x13[_0xd587[255]]- 2,_0x5c29x16* _0x5c29x13[_0xd587[255]]- 2,_0x5c29x4* _0x5c29x13[_0xd587[255]]+ 4,_0x5c29x5* _0x5c29x13[_0xd587[255]]+ 4);null!= this[_0xd587[1340]]?this[_0xd587[1340]][_0xd587[62]](_0x5c29x16):this[_0xd587[813]][_0xd587[62]](_0x5c29x16);_0x5c29x18[_0xd587[57]](_0xd587[1440],_0xd587[1380]+ _0x5c29x16[_0xd587[284]](_0xd587[1363])+ _0xd587[460])};this[_0xd587[1441]](_0x5c29x18,_0x5c29xa);_0x5c29x16= _0x5c29xa== mxConstants[_0xd587[480]]?_0xd587[1282]:_0x5c29xa== mxConstants[_0xd587[479]]?_0xd587[554]:_0xd587[861];_0xd587[861]!= _0x5c29x16&& _0x5c29x18[_0xd587[57]](_0xd587[1442],_0x5c29x16);(!this[_0xd587[1341]]|| _0x5c29x17!= mxConstants[_0xd587[483]])&& _0x5c29x18[_0xd587[57]](_0xd587[1443],Math[_0xd587[488]](_0x5c29x17* _0x5c29x13[_0xd587[255]])+ _0xd587[168]);0< _0x5c29x19[_0xd587[67]]&& _0x5c29x18[_0xd587[57]](_0xd587[535],_0x5c29x19);1> _0x5c29x13[_0xd587[1244]]&& _0x5c29x18[_0xd587[57]](_0xd587[461],_0x5c29x13[_0xd587[1244]]);var _0x5c29x19=_0x5c29x9[_0xd587[224]](_0xd587[192]),_0x5c29x1a=Math[_0xd587[488]](_0x5c29x17* mxConstants[_0xd587[490]]),_0x5c29x1b=_0x5c29x17+ (_0x5c29x19[_0xd587[67]]- 1)* _0x5c29x1a;_0x5c29x16= _0x5c29x3+ _0x5c29x17- 1;_0x5c29x12== mxConstants[_0xd587[481]]?(_0x5c29x5= (this[_0xd587[1343]]&& _0x5c29x15&& 0< _0x5c29x5?Math[_0xd587[243]](_0x5c29x1b,_0x5c29x5):_0x5c29x1b)/ 2,_0x5c29x16-= _0x5c29x5+ 1):_0x5c29x12== mxConstants[_0xd587[482]]&& (_0x5c29x5= this[_0xd587[1343]]&& _0x5c29x15&& 0< _0x5c29x5?Math[_0xd587[243]](_0x5c29x1b,_0x5c29x5):_0x5c29x1b,_0x5c29x16-= _0x5c29x5+ 2);for(_0x5c29x5= 0;_0x5c29x5< _0x5c29x19[_0xd587[67]];_0x5c29x5++){0< _0x5c29x19[_0x5c29x5][_0xd587[67]]&& 0< mxUtils[_0xd587[330]](_0x5c29x19[_0x5c29x5])[_0xd587[67]]&& (_0x5c29x15= this[_0xd587[55]](_0xd587[963]),_0x5c29x15[_0xd587[57]](_0xd587[235],this[_0xd587[1239]](_0x5c29x2* _0x5c29x13[_0xd587[255]])),_0x5c29x15[_0xd587[57]](_0xd587[236],this[_0xd587[1239]](_0x5c29x16* _0x5c29x13[_0xd587[255]])),mxUtils[_0xd587[53]](_0x5c29x15,_0x5c29x19[_0x5c29x5]),_0x5c29x18[_0xd587[62]](_0x5c29x15)),_0x5c29x16+= _0x5c29x1a};this[_0xd587[813]][_0xd587[62]](_0x5c29x18);this[_0xd587[1444]](_0x5c29x18,_0x5c29x9,_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x1b,_0x5c29xa,_0x5c29x12,_0x5c29x14)};mxSvgCanvas2D[_0xd587[202]][_0xd587[1441]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[724]];_0x5c29x2[_0xd587[57]](_0xd587[1334],_0x5c29x3[_0xd587[665]]);(!this[_0xd587[1341]]|| _0x5c29x3[_0xd587[486]]!= mxConstants[_0xd587[484]])&& _0x5c29x2[_0xd587[57]](_0xd587[1445],_0x5c29x3[_0xd587[486]]);(_0x5c29x3[_0xd587[666]]& mxConstants[_0xd587[1410]])== mxConstants[_0xd587[1410]]&& _0x5c29x2[_0xd587[57]](_0xd587[1446],_0xd587[1447]);(_0x5c29x3[_0xd587[666]]& mxConstants[_0xd587[1412]])== mxConstants[_0xd587[1412]]&& _0x5c29x2[_0xd587[57]](_0xd587[1448],_0xd587[1449]);(_0x5c29x3[_0xd587[666]]& mxConstants[_0xd587[1414]])== mxConstants[_0xd587[1414]]&& _0x5c29x2[_0xd587[57]](_0xd587[1450],_0xd587[355])};mxSvgCanvas2D[_0xd587[202]][_0xd587[1444]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14){var _0x5c29x15=this[_0xd587[724]];if(null!= _0x5c29x15[_0xd587[1261]]|| null!= _0x5c29x15[_0xd587[1263]]){var _0x5c29x16=null;_0x5c29x14?(_0x5c29x12== mxConstants[_0xd587[479]]?_0x5c29x4-= _0x5c29x9/ 2:_0x5c29x12== mxConstants[_0xd587[480]]&& (_0x5c29x4-= _0x5c29x9),_0x5c29x13== mxConstants[_0xd587[481]]?_0x5c29x5-= _0x5c29xa/ 2:_0x5c29x13== mxConstants[_0xd587[482]]&& (_0x5c29x5-= _0x5c29xa),_0x5c29x16=  new mxRectangle((_0x5c29x4+ 1)* _0x5c29x15[_0xd587[255]],_0x5c29x5* _0x5c29x15[_0xd587[255]],(_0x5c29x9- 2)* _0x5c29x15[_0xd587[255]],(_0x5c29xa+ 2)* _0x5c29x15[_0xd587[255]])):null!= _0x5c29x2[_0xd587[1451]]&& this[_0xd587[813]][_0xd587[295]]== document?(_0x5c29x16= _0x5c29x2[_0xd587[1451]](),_0x5c29x3= mxClient[_0xd587[80]]&& mxClient[_0xd587[48]],_0x5c29x16=  new mxRectangle(_0x5c29x16[_0xd587[235]],_0x5c29x16[_0xd587[236]]+ (_0x5c29x3?0:1),_0x5c29x16[_0xd587[117]],_0x5c29x16[_0xd587[119]]+ (_0x5c29x3?1:0))):(_0x5c29x16= document[_0xd587[55]](_0xd587[485]),_0x5c29x16[_0xd587[124]][_0xd587[489]]= Math[_0xd587[488]](_0x5c29x15[_0xd587[487]]* mxConstants[_0xd587[490]])+ _0xd587[168],_0x5c29x16[_0xd587[124]][_0xd587[487]]= Math[_0xd587[488]](_0x5c29x15[_0xd587[487]])+ _0xd587[168],_0x5c29x16[_0xd587[124]][_0xd587[486]]= _0x5c29x15[_0xd587[486]],_0x5c29x16[_0xd587[124]][_0xd587[493]]= _0xd587[494],_0x5c29x16[_0xd587[124]][_0xd587[491]]= _0xd587[492],_0x5c29x16[_0xd587[124]][_0xd587[187]]= _0xd587[188],_0x5c29x16[_0xd587[124]][_0xd587[495]]= mxClient[_0xd587[496]]?_0xd587[497]:_0xd587[498],_0x5c29x16[_0xd587[124]][_0xd587[499]]= _0xd587[500],(_0x5c29x15[_0xd587[666]]& mxConstants[_0xd587[1410]])== mxConstants[_0xd587[1410]]&& (_0x5c29x16[_0xd587[124]][_0xd587[1452]]= _0xd587[1447]),(_0x5c29x15[_0xd587[666]]& mxConstants[_0xd587[1412]])== mxConstants[_0xd587[1412]]&& (_0x5c29x16[_0xd587[124]][_0xd587[666]]= _0xd587[1449]),_0x5c29x3= mxUtils[_0xd587[321]](_0x5c29x3,!1),_0x5c29x16[_0xd587[339]]= _0x5c29x3[_0xd587[230]](/\n/g,_0xd587[1453]),document[_0xd587[112]][_0xd587[62]](_0x5c29x16),_0x5c29x9= _0x5c29x16[_0xd587[359]],_0x5c29xa= _0x5c29x16[_0xd587[167]],_0x5c29x16[_0xd587[265]][_0xd587[266]](_0x5c29x16),_0x5c29x12== mxConstants[_0xd587[479]]?_0x5c29x4-= _0x5c29x9/ 2:_0x5c29x12== mxConstants[_0xd587[480]]&& (_0x5c29x4-= _0x5c29x9),_0x5c29x13== mxConstants[_0xd587[481]]?_0x5c29x5-= _0x5c29xa/ 2:_0x5c29x13== mxConstants[_0xd587[482]]&& (_0x5c29x5-= _0x5c29xa),_0x5c29x16=  new mxRectangle((_0x5c29x4+ 1)* _0x5c29x15[_0xd587[255]],(_0x5c29x5+ 2)* _0x5c29x15[_0xd587[255]],_0x5c29x9* _0x5c29x15[_0xd587[255]],(_0x5c29xa+ 1)* _0x5c29x15[_0xd587[255]]));null!= _0x5c29x16&& (_0x5c29x3= this[_0xd587[55]](_0xd587[1319]),_0x5c29x3[_0xd587[57]](_0xd587[1334],_0x5c29x15[_0xd587[1261]]|| _0xd587[130]),_0x5c29x3[_0xd587[57]](_0xd587[1336],_0x5c29x15[_0xd587[1263]]|| _0xd587[130]),_0x5c29x3[_0xd587[57]](_0xd587[235],Math[_0xd587[519]](_0x5c29x16[_0xd587[235]]- 1)),_0x5c29x3[_0xd587[57]](_0xd587[236],Math[_0xd587[519]](_0x5c29x16[_0xd587[236]]- 1)),_0x5c29x3[_0xd587[57]](_0xd587[117],Math[_0xd587[430]](_0x5c29x16[_0xd587[117]]+ 2)),_0x5c29x3[_0xd587[57]](_0xd587[119],Math[_0xd587[430]](_0x5c29x16[_0xd587[119]])),_0x5c29x15= null!= _0x5c29x15[_0xd587[1263]]?Math[_0xd587[160]](1,this[_0xd587[1239]](_0x5c29x15[_0xd587[255]])):0,_0x5c29x3[_0xd587[57]](_0xd587[1382],_0x5c29x15),this[_0xd587[813]][_0xd587[295]]== document&& 1== mxUtils[_0xd587[1454]](_0x5c29x15,2)&& _0x5c29x3[_0xd587[57]](_0xd587[535],_0xd587[1455]),_0x5c29x2[_0xd587[950]](_0x5c29x3,_0x5c29x2[_0xd587[285]]))}};mxSvgCanvas2D[_0xd587[202]][_0xd587[1336]]= function(){this[_0xd587[1370]](!1,!0)};mxSvgCanvas2D[_0xd587[202]][_0xd587[1334]]= function(){this[_0xd587[1370]](!0,!1)};mxSvgCanvas2D[_0xd587[202]][_0xd587[1337]]= function(){this[_0xd587[1370]](!0,!0)};var mxVmlCanvas2D=function(_0x5c29x2){mxAbstractCanvas2D[_0xd587[239]](this);this[_0xd587[813]]= _0x5c29x2};mxUtils[_0xd587[1284]](mxVmlCanvas2D,mxAbstractCanvas2D);mxVmlCanvas2D[_0xd587[202]][_0xd587[252]]= null;mxVmlCanvas2D[_0xd587[202]][_0xd587[1285]]=  !0;mxVmlCanvas2D[_0xd587[202]][_0xd587[1219]]= _0xd587[1456];mxVmlCanvas2D[_0xd587[202]][_0xd587[1221]]= _0xd587[1457];mxVmlCanvas2D[_0xd587[202]][_0xd587[1225]]= _0xd587[1458];mxVmlCanvas2D[_0xd587[202]][_0xd587[1227]]= _0xd587[235];mxVmlCanvas2D[_0xd587[202]][_0xd587[1459]]= _0xd587[110];mxVmlCanvas2D[_0xd587[202]][_0xd587[1460]]= 1;mxVmlCanvas2D[_0xd587[202]][_0xd587[1370]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[252]],_0x5c29x5=this[_0xd587[724]];if(null!= _0x5c29x4){if(_0xd587[253]== _0x5c29x4[_0xd587[301]]){if(null!= this[_0xd587[1215]]&& 0< this[_0xd587[1215]][_0xd587[67]]){_0x5c29x4[_0xd587[1215]]= this[_0xd587[1215]][_0xd587[234]](_0xd587[185])+ _0xd587[1461],_0x5c29x4[_0xd587[124]][_0xd587[117]]= this[_0xd587[813]][_0xd587[124]][_0xd587[117]],_0x5c29x4[_0xd587[124]][_0xd587[119]]= this[_0xd587[813]][_0xd587[124]][_0xd587[119]],_0x5c29x4[_0xd587[1462]]= parseInt(_0x5c29x4[_0xd587[124]][_0xd587[117]])+ _0xd587[185]+ parseInt(_0x5c29x4[_0xd587[124]][_0xd587[119]])}else {return}};_0x5c29x4[_0xd587[1463]]= this[_0xd587[1239]](Math[_0xd587[160]](1,_0x5c29x5[_0xd587[610]]* _0x5c29x5[_0xd587[255]]/ this[_0xd587[1460]]))+ _0xd587[168];_0x5c29x5[_0xd587[639]]&& this[_0xd587[813]][_0xd587[62]](this[_0xd587[1375]](_0x5c29x4,_0x5c29x2&& null!= _0x5c29x5[_0xd587[604]],_0x5c29x3&& null!= _0x5c29x5[_0xd587[608]]));_0x5c29x3&& null!= _0x5c29x5[_0xd587[608]]?(_0x5c29x4[_0xd587[1464]]= _0xd587[128],_0x5c29x4[_0xd587[1306]]= _0x5c29x5[_0xd587[608]]):_0x5c29x4[_0xd587[1464]]= _0xd587[308];_0x5c29x4[_0xd587[62]](this[_0xd587[1465]]());_0x5c29x2&& null!= _0x5c29x5[_0xd587[604]]?_0x5c29x4[_0xd587[62]](this[_0xd587[1466]]()):this[_0xd587[1229]]&& (_0xd587[253]!= _0x5c29x4[_0xd587[301]]|| this[_0xd587[1215]][this[_0xd587[1215]][_0xd587[67]]- 1]== this[_0xd587[1227]])?_0x5c29x4[_0xd587[62]](this[_0xd587[1467]]()):_0x5c29x4[_0xd587[1468]]= _0xd587[308];this[_0xd587[813]][_0xd587[62]](_0x5c29x4)}};mxVmlCanvas2D[_0xd587[202]][_0xd587[1467]]= function(){var _0x5c29x2=document[_0xd587[55]](mxClient[_0xd587[463]]+ _0xd587[1469]);_0x5c29x2[_0xd587[390]]= mxClient[_0xd587[88]]+ _0xd587[1470];_0x5c29x2[_0xd587[60]]= _0xd587[1471];return _0x5c29x2};mxVmlCanvas2D[_0xd587[202]][_0xd587[1466]]= function(){var _0x5c29x2=this[_0xd587[724]],_0x5c29x3=document[_0xd587[55]](mxClient[_0xd587[463]]+ _0xd587[1469]);_0x5c29x3[_0xd587[352]]= _0x5c29x2[_0xd587[604]];if(null!= _0x5c29x2[_0xd587[606]]){_0x5c29x3[_0xd587[60]]= _0xd587[1299];_0x5c29x3[_0xd587[865]]= _0xd587[130];_0x5c29x3[_0xd587[1472]]= _0x5c29x2[_0xd587[606]];var _0x5c29x4=180- _0x5c29x2[_0xd587[603]],_0x5c29x4=_0x5c29x2[_0xd587[607]]== mxConstants[_0xd587[1359]]?_0x5c29x4- (90+ (_0xd587[235]== this[_0xd587[813]][_0xd587[124]][_0xd587[1473]]?180:0)):_0x5c29x2[_0xd587[607]]== mxConstants[_0xd587[1356]]?_0x5c29x4+ (90+ (_0xd587[235]== this[_0xd587[813]][_0xd587[124]][_0xd587[1473]]?180:0)):_0x5c29x2[_0xd587[607]]== mxConstants[_0xd587[1358]]?_0x5c29x4- (180+ (_0xd587[236]== this[_0xd587[813]][_0xd587[124]][_0xd587[1473]]?-180:0)):_0x5c29x4+ (_0xd587[236]== this[_0xd587[813]][_0xd587[124]][_0xd587[1473]]?-180:0);if(_0xd587[235]== this[_0xd587[813]][_0xd587[124]][_0xd587[1473]]|| _0xd587[236]== this[_0xd587[813]][_0xd587[124]][_0xd587[1473]]){_0x5c29x4*=  -1};_0x5c29x3[_0xd587[1474]]= mxUtils[_0xd587[1454]](_0x5c29x4,360);_0x5c29x3[_0xd587[461]]= 100* _0x5c29x2[_0xd587[1244]]* _0x5c29x2[_0xd587[1247]]+ _0xd587[229];_0x5c29x3[_0xd587[57]](mxClient[_0xd587[1475]]+ _0xd587[1476],100* _0x5c29x2[_0xd587[1244]]* _0x5c29x2[_0xd587[1248]]+ _0xd587[229])}else {1> _0x5c29x2[_0xd587[1244]]&& (_0x5c29x3[_0xd587[461]]= 100* _0x5c29x2[_0xd587[1244]]+ _0xd587[229])};return _0x5c29x3};mxVmlCanvas2D[_0xd587[202]][_0xd587[1465]]= function(){var _0x5c29x2=this[_0xd587[724]],_0x5c29x3=document[_0xd587[55]](mxClient[_0xd587[463]]+ _0xd587[1477]);_0x5c29x3[_0xd587[1478]]= _0x5c29x2[_0xd587[1254]]|| _0xd587[1232];_0x5c29x3[_0xd587[1479]]= _0x5c29x2[_0xd587[1256]]|| _0xd587[1233];_0x5c29x3[_0xd587[1313]]= _0x5c29x2[_0xd587[1258]]|| _0xd587[1480];1> _0x5c29x2[_0xd587[1244]]&& (_0x5c29x3[_0xd587[461]]= 100* _0x5c29x2[_0xd587[1244]]+ _0xd587[229]);_0x5c29x2[_0xd587[648]]&& (_0x5c29x3[_0xd587[1481]]= this[_0xd587[1482]]());return _0x5c29x3};mxVmlCanvas2D[_0xd587[202]][_0xd587[1482]]= function(){var _0x5c29x2=_0xd587[1483];if(null!= this[_0xd587[724]][_0xd587[649]]){var _0x5c29x3=this[_0xd587[724]][_0xd587[649]][_0xd587[224]](_0xd587[185]);0< _0x5c29x3[_0xd587[67]]&& 1== _0x5c29x3[0]&& (_0x5c29x2= _0xd587[1484])};return _0x5c29x2};mxVmlCanvas2D[_0xd587[202]][_0xd587[1375]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[724]],_0x5c29x9=-_0x5c29x5[_0xd587[603]]* (Math[_0xd587[424]]/ 180),_0x5c29xa=Math[_0xd587[426]](_0x5c29x9),_0x5c29x9=Math[_0xd587[427]](_0x5c29x9),_0x5c29x12=_0x5c29x5[_0xd587[1273]]* _0x5c29x5[_0xd587[255]],_0x5c29x13=_0x5c29x5[_0xd587[1274]]* _0x5c29x5[_0xd587[255]];_0xd587[235]== this[_0xd587[813]][_0xd587[124]][_0xd587[1473]]?_0x5c29x12*=  -1:_0xd587[236]== this[_0xd587[813]][_0xd587[124]][_0xd587[1473]]&& (_0x5c29x13*=  -1);var _0x5c29x14=_0x5c29x2[_0xd587[511]](!0);_0x5c29x14[_0xd587[124]][_0xd587[945]]= Math[_0xd587[488]](_0x5c29x12* _0x5c29xa- _0x5c29x13* _0x5c29x9)+ _0xd587[168];_0x5c29x14[_0xd587[124]][_0xd587[953]]= Math[_0xd587[488]](_0x5c29x12* _0x5c29x9+ _0x5c29x13* _0x5c29xa)+ _0xd587[168];8== document[_0xd587[5]]&& (_0x5c29x14[_0xd587[1463]]= _0x5c29x2[_0xd587[1463]],_0xd587[253]== _0x5c29x2[_0xd587[301]]&& (_0x5c29x14[_0xd587[1215]]= this[_0xd587[1215]][_0xd587[234]](_0xd587[185])+ _0xd587[1461],_0x5c29x14[_0xd587[124]][_0xd587[117]]= this[_0xd587[813]][_0xd587[124]][_0xd587[117]],_0x5c29x14[_0xd587[124]][_0xd587[119]]= this[_0xd587[813]][_0xd587[124]][_0xd587[119]],_0x5c29x14[_0xd587[1462]]= parseInt(_0x5c29x2[_0xd587[124]][_0xd587[117]])+ _0xd587[185]+ parseInt(_0x5c29x2[_0xd587[124]][_0xd587[119]])));_0x5c29x4?(_0x5c29x14[_0xd587[1306]]= _0x5c29x5[_0xd587[1269]],_0x5c29x14[_0xd587[62]](this[_0xd587[1485]]())):_0x5c29x14[_0xd587[1464]]= _0xd587[308];_0x5c29x3?_0x5c29x14[_0xd587[62]](this[_0xd587[1486]]()):_0x5c29x14[_0xd587[1468]]= _0xd587[308];return _0x5c29x14};mxVmlCanvas2D[_0xd587[202]][_0xd587[1486]]= function(){var _0x5c29x2=document[_0xd587[55]](mxClient[_0xd587[463]]+ _0xd587[1469]);_0x5c29x2[_0xd587[352]]= this[_0xd587[724]][_0xd587[1269]];_0x5c29x2[_0xd587[461]]= 100* this[_0xd587[724]][_0xd587[1244]]* this[_0xd587[724]][_0xd587[1271]]+ _0xd587[229];return _0x5c29x2};mxVmlCanvas2D[_0xd587[202]][_0xd587[1485]]= function(){var _0x5c29x2=this[_0xd587[1465]]();_0x5c29x2[_0xd587[461]]= 100* this[_0xd587[724]][_0xd587[1244]]* this[_0xd587[724]][_0xd587[1271]]+ _0xd587[229];return _0x5c29x2};mxVmlCanvas2D[_0xd587[202]][_0xd587[1294]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x3&& _0x5c29x4?_0x5c29x2+= 180:_0x5c29x3?this[_0xd587[813]][_0xd587[124]][_0xd587[1473]]= _0xd587[235]:_0x5c29x4&& (this[_0xd587[813]][_0xd587[124]][_0xd587[1473]]= _0xd587[236]);if(_0x5c29x3?!_0x5c29x4:_0x5c29x4){_0x5c29x2*=  -1};this[_0xd587[813]][_0xd587[124]][_0xd587[603]]= _0x5c29x2;this[_0xd587[724]][_0xd587[603]]+= _0x5c29x2;this[_0xd587[724]][_0xd587[1395]]= _0x5c29x5;this[_0xd587[724]][_0xd587[1396]]= _0x5c29x9};mxVmlCanvas2D[_0xd587[202]][_0xd587[1275]]= function(){mxAbstractCanvas2D[_0xd587[202]][_0xd587[1275]][_0xd587[183]](this,arguments);this[_0xd587[252]]= document[_0xd587[55]](mxClient[_0xd587[463]]+ _0xd587[1487]);this[_0xd587[252]][_0xd587[124]][_0xd587[491]]= _0xd587[492]};mxVmlCanvas2D[_0xd587[202]][_0xd587[1278]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=this[_0xd587[724]],_0x5c29xa=(this[_0xd587[1217]]+ _0x5c29x9[_0xd587[1126]])* _0x5c29x9[_0xd587[255]],_0x5c29x12=(this[_0xd587[1218]]+ _0x5c29x9[_0xd587[1125]])* _0x5c29x9[_0xd587[255]];_0x5c29x2= (_0x5c29x2+ _0x5c29x9[_0xd587[1126]])* _0x5c29x9[_0xd587[255]];_0x5c29x3= (_0x5c29x3+ _0x5c29x9[_0xd587[1125]])* _0x5c29x9[_0xd587[255]];_0x5c29x4= (_0x5c29x4+ _0x5c29x9[_0xd587[1126]])* _0x5c29x9[_0xd587[255]];_0x5c29x5= (_0x5c29x5+ _0x5c29x9[_0xd587[1125]])* _0x5c29x9[_0xd587[255]];var _0x5c29x12=_0x5c29x12+ 2/ 3* (_0x5c29x3- _0x5c29x12),_0x5c29x13=_0x5c29x4+ 2/ 3* (_0x5c29x2- _0x5c29x4);_0x5c29x3= _0x5c29x5+ 2/ 3* (_0x5c29x3- _0x5c29x5);this[_0xd587[1215]][_0xd587[207]](_0xd587[1488]+ this[_0xd587[1239]](_0x5c29xa+ 2/ 3* (_0x5c29x2- _0x5c29xa))+ _0xd587[185]+ this[_0xd587[1239]](_0x5c29x12)+ _0xd587[185]+ this[_0xd587[1239]](_0x5c29x13)+ _0xd587[185]+ this[_0xd587[1239]](_0x5c29x3)+ _0xd587[185]+ this[_0xd587[1239]](_0x5c29x4)+ _0xd587[185]+ this[_0xd587[1239]](_0x5c29x5));this[_0xd587[1217]]= _0x5c29x4/ _0x5c29x9[_0xd587[255]]- _0x5c29x9[_0xd587[1126]];this[_0xd587[1218]]= _0x5c29x5/ _0x5c29x9[_0xd587[255]]- _0x5c29x9[_0xd587[1125]]};mxVmlCanvas2D[_0xd587[202]][_0xd587[1489]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=this[_0xd587[724]];_0x5c29x2= document[_0xd587[55]](_0x5c29x2);_0x5c29x2[_0xd587[124]][_0xd587[491]]= _0xd587[492];_0x5c29x2[_0xd587[124]][_0xd587[361]]= this[_0xd587[1239]]((_0x5c29x3+ _0x5c29xa[_0xd587[1126]])* _0x5c29xa[_0xd587[255]])+ _0xd587[168];_0x5c29x2[_0xd587[124]][_0xd587[125]]= this[_0xd587[1239]]((_0x5c29x4+ _0x5c29xa[_0xd587[1125]])* _0x5c29xa[_0xd587[255]])+ _0xd587[168];_0x5c29x2[_0xd587[124]][_0xd587[117]]= this[_0xd587[1239]](_0x5c29x5* _0x5c29xa[_0xd587[255]])+ _0xd587[168];_0x5c29x2[_0xd587[124]][_0xd587[119]]= this[_0xd587[1239]](_0x5c29x9* _0x5c29xa[_0xd587[255]])+ _0xd587[168];return _0x5c29x2};mxVmlCanvas2D[_0xd587[202]][_0xd587[1319]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){this[_0xd587[252]]= this[_0xd587[1489]](mxClient[_0xd587[463]]+ _0xd587[1490],_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5)};mxVmlCanvas2D[_0xd587[202]][_0xd587[1320]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){this[_0xd587[252]]= this[_0xd587[1489]](mxClient[_0xd587[463]]+ _0xd587[1491],_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5);this[_0xd587[252]][_0xd587[57]](_0xd587[1492],Math[_0xd587[160]](100* _0x5c29x9/ _0x5c29x4,100* _0x5c29xa/ _0x5c29x5)+ _0xd587[229])};mxVmlCanvas2D[_0xd587[202]][_0xd587[680]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){this[_0xd587[252]]= this[_0xd587[1489]](mxClient[_0xd587[463]]+ _0xd587[1493],_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5)};mxVmlCanvas2D[_0xd587[202]][_0xd587[618]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13){var _0x5c29x14=null;_0x5c29xa?(_0x5c29x14= this[_0xd587[1489]](mxClient[_0xd587[463]]+ _0xd587[1490],_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5),_0x5c29x14[_0xd587[1464]]= _0xd587[308],_0x5c29x2= document[_0xd587[55]](mxClient[_0xd587[463]]+ _0xd587[1469]),_0x5c29x2[_0xd587[1322]]= _0x5c29xa?_0xd587[1494]:_0xd587[1495],_0x5c29x2[_0xd587[1294]]= _0xd587[128],_0x5c29x2[_0xd587[60]]= _0xd587[1496],_0x5c29x2[_0xd587[390]]= _0x5c29x9,_0x5c29x14[_0xd587[62]](_0x5c29x2)):(_0x5c29x14= this[_0xd587[1489]](mxClient[_0xd587[463]]+ _0xd587[464],_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5),_0x5c29x14[_0xd587[390]]= _0x5c29x9);_0x5c29x12&& _0x5c29x13?_0x5c29x14[_0xd587[124]][_0xd587[603]]= _0xd587[1497]:_0x5c29x12?_0x5c29x14[_0xd587[124]][_0xd587[1473]]= _0xd587[235]:_0x5c29x13&& (_0x5c29x14[_0xd587[124]][_0xd587[1473]]= _0xd587[236]);1> this[_0xd587[724]][_0xd587[1244]]&& (_0x5c29x14[_0xd587[124]][_0xd587[347]]+= _0xd587[459]+ 100* this[_0xd587[724]][_0xd587[1244]]+ _0xd587[460]);this[_0xd587[813]][_0xd587[62]](_0x5c29x14)};mxVmlCanvas2D[_0xd587[202]][_0xd587[1404]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x4= document[_0xd587[55]](_0xd587[485]);var _0x5c29x9=this[_0xd587[724]],_0x5c29xa=_0xd587[110];null!= _0x5c29x9[_0xd587[1261]]&& (_0x5c29xa+= _0xd587[1418]+ _0x5c29x9[_0xd587[1261]]+ _0xd587[471]);null!= _0x5c29x9[_0xd587[1263]]&& (_0x5c29xa+= _0xd587[1419]+ _0x5c29x9[_0xd587[1263]]+ _0xd587[471]);mxUtils[_0xd587[1331]](_0x5c29x2)?_0x5c29x4[_0xd587[62]](_0x5c29x2):0< _0x5c29xa[_0xd587[67]]&& !_0x5c29x5?(_0x5c29x5= document[_0xd587[55]](_0xd587[485]),_0x5c29x5[_0xd587[124]][_0xd587[103]]= _0x5c29xa,_0x5c29x5[_0xd587[124]][_0xd587[495]]= mxClient[_0xd587[496]]?_0xd587[497]:_0xd587[498],_0x5c29x5[_0xd587[124]][_0xd587[499]]= _0xd587[500],_0x5c29x5[_0xd587[339]]= _0x5c29x2,_0x5c29x4[_0xd587[62]](_0x5c29x5)):(_0x5c29x4[_0xd587[124]][_0xd587[103]]= _0x5c29xa,_0x5c29x4[_0xd587[339]]= _0x5c29x2);_0x5c29x2= _0x5c29x4[_0xd587[124]];_0x5c29x2[_0xd587[487]]= Math[_0xd587[488]](_0x5c29x9[_0xd587[487]]/ this[_0xd587[1460]])+ _0xd587[168];_0x5c29x2[_0xd587[486]]= _0x5c29x9[_0xd587[486]];_0x5c29x2[_0xd587[352]]= _0x5c29x9[_0xd587[665]];_0x5c29x2[_0xd587[123]]= _0xd587[125];_0x5c29x2[_0xd587[1165]]= _0x5c29x3|| _0xd587[361];_0x5c29x2[_0xd587[489]]= Math[_0xd587[488]](_0x5c29x9[_0xd587[487]]* mxConstants[_0xd587[490]]/ this[_0xd587[1460]])+ _0xd587[168];(_0x5c29x9[_0xd587[666]]& mxConstants[_0xd587[1410]])== mxConstants[_0xd587[1410]]&& (_0x5c29x2[_0xd587[1452]]= _0xd587[1447]);(_0x5c29x9[_0xd587[666]]& mxConstants[_0xd587[1412]])== mxConstants[_0xd587[1412]]&& (_0x5c29x2[_0xd587[666]]= _0xd587[1449]);(_0x5c29x9[_0xd587[666]]& mxConstants[_0xd587[1414]])== mxConstants[_0xd587[1414]]&& (_0x5c29x2[_0xd587[1498]]= _0xd587[355]);return _0x5c29x4};mxVmlCanvas2D[_0xd587[202]][_0xd587[963]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14,_0x5c29x15,_0x5c29x16,_0x5c29x17){if(this[_0xd587[1285]]&& null!= _0x5c29x9){var _0x5c29x18=this[_0xd587[724]];if(_0xd587[1428]== _0x5c29x14){null!= _0x5c29x18[_0xd587[603]]&& (_0x5c29x3= this[_0xd587[1241]](_0x5c29x2,_0x5c29x3,_0x5c29x18[_0xd587[603]],_0x5c29x18[_0xd587[1395]],_0x5c29x18[_0xd587[1396]]),_0x5c29x2= _0x5c29x3[_0xd587[235]],_0x5c29x3= _0x5c29x3[_0xd587[236]]);8== document[_0xd587[5]]?(_0x5c29x2+= _0x5c29x18[_0xd587[1126]],_0x5c29x3+= _0x5c29x18[_0xd587[1125]]):(_0x5c29x2*= _0x5c29x18[_0xd587[255]],_0x5c29x3*= _0x5c29x18[_0xd587[255]]);_0x5c29x14= 8== document[_0xd587[5]]?document[_0xd587[55]](mxClient[_0xd587[463]]+ _0xd587[1499]):document[_0xd587[55]](_0xd587[485]);_0x5c29x14[_0xd587[124]][_0xd587[491]]= _0xd587[492];_0x5c29x14[_0xd587[124]][_0xd587[495]]= _0xd587[497];_0x5c29x14[_0xd587[124]][_0xd587[361]]= this[_0xd587[1239]](_0x5c29x2)+ _0xd587[168];_0x5c29x14[_0xd587[124]][_0xd587[125]]= this[_0xd587[1239]](_0x5c29x3)+ _0xd587[168];_0x5c29x14[_0xd587[124]][_0xd587[499]]= _0x5c29x18[_0xd587[255]];var _0x5c29x19=document[_0xd587[55]](_0xd587[485]);_0x5c29x19[_0xd587[124]][_0xd587[491]]= _0xd587[1500];_0x5c29x19[_0xd587[124]][_0xd587[495]]= _0xd587[497];var _0x5c29x1a=mxUtils[_0xd587[1501]](_0x5c29xa,_0x5c29x12),_0x5c29x1b=_0x5c29x1a[_0xd587[235]],_0x5c29x1a=_0x5c29x1a[_0xd587[236]];_0x5c29x9= this[_0xd587[1404]](_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x15);_0x5c29xa= document[_0xd587[55]](_0xd587[485]);_0x5c29x13?(!_0x5c29x16&& 0< _0x5c29x4&& (_0x5c29x9[_0xd587[124]][_0xd587[117]]= Math[_0xd587[488]](_0x5c29x4)+ _0xd587[168]),_0x5c29x9[_0xd587[124]][_0xd587[493]]= _0xd587[1502]):_0x5c29x9[_0xd587[124]][_0xd587[493]]= _0xd587[494];_0x5c29x13= _0x5c29x18[_0xd587[603]]+ (_0x5c29x17|| 0);this[_0xd587[1216]]&& 0!= _0x5c29x13?(_0x5c29xa[_0xd587[124]][_0xd587[495]]= _0xd587[497],_0x5c29xa[_0xd587[124]][_0xd587[499]]= _0xd587[500],_0x5c29xa[_0xd587[62]](_0x5c29x9),8== document[_0xd587[5]]&& _0xd587[529]!= this[_0xd587[813]][_0xd587[301]]?(_0x5c29x19[_0xd587[62]](_0x5c29xa),_0x5c29x14[_0xd587[62]](_0x5c29x19)):_0x5c29x14[_0xd587[62]](_0x5c29xa)):8== document[_0xd587[5]]?(_0x5c29x19[_0xd587[62]](_0x5c29x9),_0x5c29x14[_0xd587[62]](_0x5c29x19)):(_0x5c29x9[_0xd587[124]][_0xd587[495]]= _0xd587[497],_0x5c29x14[_0xd587[62]](_0x5c29x9));_0xd587[529]!= this[_0xd587[813]][_0xd587[301]]?(_0x5c29x17= document[_0xd587[55]](mxClient[_0xd587[463]]+ _0xd587[1490]),_0x5c29x17[_0xd587[1464]]= _0xd587[308],_0x5c29x17[_0xd587[1468]]= _0xd587[308],_0x5c29x17[_0xd587[62]](_0x5c29x14),this[_0xd587[813]][_0xd587[62]](_0x5c29x17)):this[_0xd587[813]][_0xd587[62]](_0x5c29x14);_0x5c29x16?(_0x5c29x9[_0xd587[124]][_0xd587[277]]= _0xd587[188],0< _0x5c29x4&& (_0x5c29x9[_0xd587[124]][_0xd587[117]]= Math[_0xd587[488]](_0x5c29x4)+ _0xd587[168]),0< _0x5c29x5&& 8== document[_0xd587[5]]&& (_0x5c29x9[_0xd587[124]][_0xd587[1503]]= Math[_0xd587[488]](_0x5c29x5)+ _0xd587[168])):_0x5c29x15&& (_0x5c29x9[_0xd587[124]][_0xd587[117]]= _0x5c29x4+ _0xd587[168],0< _0x5c29x5&& (_0x5c29x9[_0xd587[124]][_0xd587[1503]]= Math[_0xd587[488]](_0x5c29x5)+ _0xd587[168]));if(this[_0xd587[1216]]&& 0!= _0x5c29x13){_0x5c29x4= _0x5c29x13* (Math[_0xd587[424]]/ 180);_0x5c29x13= parseFloat(parseFloat(Math[_0xd587[426]](_0x5c29x4))[_0xd587[1293]](8));_0x5c29x17= parseFloat(parseFloat(Math[_0xd587[427]](-_0x5c29x4))[_0xd587[1293]](8));_0x5c29x4%= 2* Math[_0xd587[424]];0> _0x5c29x4&& (_0x5c29x4+= 2* Math[_0xd587[424]]);_0x5c29x4%= Math[_0xd587[424]];_0x5c29x4> Math[_0xd587[424]]/ 2&& (_0x5c29x4= Math[_0xd587[424]]- _0x5c29x4);_0x5c29x12= Math[_0xd587[426]](_0x5c29x4);var _0x5c29x1c=Math[_0xd587[427]](_0x5c29x4);8== document[_0xd587[5]]&& (_0x5c29x9[_0xd587[124]][_0xd587[495]]= _0xd587[498],_0x5c29xa[_0xd587[124]][_0xd587[495]]= _0xd587[498],_0x5c29x19[_0xd587[124]][_0xd587[495]]= _0xd587[498]);_0x5c29x9[_0xd587[124]][_0xd587[187]]= _0xd587[188];document[_0xd587[112]][_0xd587[62]](_0x5c29x9);_0x5c29x4= _0x5c29x9[_0xd587[359]];_0x5c29x19= _0x5c29x9[_0xd587[167]];if(mxClient[_0xd587[496]]&& (_0x5c29x16|| _0x5c29x15)&& _0x5c29x19> _0x5c29x5){_0x5c29x19= _0x5c29x5,_0x5c29x9[_0xd587[124]][_0xd587[119]]= _0x5c29x19+ _0xd587[168]};_0x5c29x5= _0x5c29x19;_0x5c29x16= (_0x5c29x5- _0x5c29x5* _0x5c29x12+ _0x5c29x4*  -_0x5c29x1c)/ 2- _0x5c29x17* _0x5c29x4* (_0x5c29x1b+ 0.5)+ _0x5c29x13* _0x5c29x5* (_0x5c29x1a+ 0.5);_0x5c29x15= (_0x5c29x4- _0x5c29x4* _0x5c29x12+ _0x5c29x5*  -_0x5c29x1c)/ 2+ _0x5c29x13* _0x5c29x4* (_0x5c29x1b+ 0.5)+ _0x5c29x17* _0x5c29x5* (_0x5c29x1a+ 0.5);_0xd587[1504]== _0x5c29x14[_0xd587[301]]&& _0xd587[529]== this[_0xd587[813]][_0xd587[301]]?(_0x5c29x1b= document[_0xd587[55]](_0xd587[485]),_0x5c29x1b[_0xd587[124]][_0xd587[495]]= _0xd587[498],_0x5c29x1b[_0xd587[124]][_0xd587[491]]= _0xd587[492],_0x5c29x1b[_0xd587[124]][_0xd587[361]]= this[_0xd587[1239]](_0x5c29x2+ (_0x5c29x15- _0x5c29x4/ 2)* _0x5c29x18[_0xd587[255]])+ _0xd587[168],_0x5c29x1b[_0xd587[124]][_0xd587[125]]= this[_0xd587[1239]](_0x5c29x3+ (_0x5c29x16- _0x5c29x5/ 2)* _0x5c29x18[_0xd587[255]])+ _0xd587[168],_0x5c29x14[_0xd587[265]][_0xd587[62]](_0x5c29x1b),_0x5c29x1b[_0xd587[62]](_0x5c29x14)):(_0x5c29x18= 8== document[_0xd587[5]]?1:_0x5c29x18[_0xd587[255]],_0x5c29x14[_0xd587[124]][_0xd587[361]]= this[_0xd587[1239]](_0x5c29x2+ (_0x5c29x15- _0x5c29x4/ 2)* _0x5c29x18)+ _0xd587[168],_0x5c29x14[_0xd587[124]][_0xd587[125]]= this[_0xd587[1239]](_0x5c29x3+ (_0x5c29x16- _0x5c29x5/ 2)* _0x5c29x18)+ _0xd587[168]);_0x5c29xa[_0xd587[124]][_0xd587[347]]= _0xd587[1505]+ _0x5c29x13+ _0xd587[1506]+ _0x5c29x17+ _0xd587[1507]+ -_0x5c29x17+ _0xd587[1508]+ _0x5c29x13+ _0xd587[1509];_0x5c29xa[_0xd587[124]][_0xd587[1028]]= this[_0xd587[1459]];1> this[_0xd587[724]][_0xd587[1244]]&& (_0x5c29xa[_0xd587[124]][_0xd587[347]]+= _0xd587[459]+ 100* this[_0xd587[724]][_0xd587[1244]]+ _0xd587[460]);_0x5c29x9[_0xd587[124]][_0xd587[187]]= _0xd587[110];_0x5c29xa[_0xd587[62]](_0x5c29x9)}else {8!= document[_0xd587[5]]?(_0x5c29x9[_0xd587[124]][_0xd587[123]]= _0xd587[125],1> this[_0xd587[724]][_0xd587[1244]]&& (_0x5c29x14[_0xd587[124]][_0xd587[347]]= _0xd587[459]+ 100* this[_0xd587[724]][_0xd587[1244]]+ _0xd587[460]),_0x5c29x18= _0x5c29x9[_0xd587[265]],_0x5c29x9[_0xd587[124]][_0xd587[187]]= _0xd587[188],document[_0xd587[112]][_0xd587[62]](_0x5c29x9),_0x5c29x4= _0x5c29x9[_0xd587[359]],_0x5c29x19= _0x5c29x9[_0xd587[167]],mxClient[_0xd587[496]]&& (_0x5c29x16&& _0x5c29x19> _0x5c29x5)&& (_0x5c29x19= _0x5c29x5,_0x5c29x9[_0xd587[124]][_0xd587[119]]= _0x5c29x19+ _0xd587[168]),_0x5c29x5= _0x5c29x19,_0x5c29x9[_0xd587[124]][_0xd587[187]]= _0xd587[110],_0x5c29x18[_0xd587[62]](_0x5c29x9),_0x5c29x14[_0xd587[124]][_0xd587[361]]= this[_0xd587[1239]](_0x5c29x2+ _0x5c29x4* _0x5c29x1b* this[_0xd587[724]][_0xd587[255]])+ _0xd587[168],_0x5c29x14[_0xd587[124]][_0xd587[125]]= this[_0xd587[1239]](_0x5c29x3+ _0x5c29x5* _0x5c29x1a* this[_0xd587[724]][_0xd587[255]])+ _0xd587[168]):(1> this[_0xd587[724]][_0xd587[1244]]&& (_0x5c29x9[_0xd587[124]][_0xd587[347]]= _0xd587[459]+ 100* this[_0xd587[724]][_0xd587[1244]]+ _0xd587[460]),_0x5c29x19[_0xd587[124]][_0xd587[361]]= 100* _0x5c29x1b+ _0xd587[229],_0x5c29x19[_0xd587[124]][_0xd587[125]]= 100* _0x5c29x1a+ _0xd587[229])}}else {this[_0xd587[1436]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,mxUtils[_0xd587[321]](_0x5c29x9,!1),_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14,_0x5c29x15,_0x5c29x16,_0x5c29x17)}}};mxVmlCanvas2D[_0xd587[202]][_0xd587[1436]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14,_0x5c29x15,_0x5c29x16,_0x5c29x17){_0x5c29x5= this[_0xd587[724]];_0x5c29x2= (_0x5c29x2+ _0x5c29x5[_0xd587[1126]])* _0x5c29x5[_0xd587[255]];_0x5c29x3= (_0x5c29x3+ _0x5c29x5[_0xd587[1125]])* _0x5c29x5[_0xd587[255]];_0x5c29x4= document[_0xd587[55]](mxClient[_0xd587[463]]+ _0xd587[1487]);_0x5c29x4[_0xd587[124]][_0xd587[117]]= _0xd587[942];_0x5c29x4[_0xd587[124]][_0xd587[119]]= _0xd587[942];_0x5c29x4[_0xd587[1464]]= _0xd587[308];_0x5c29x15= document[_0xd587[55]](mxClient[_0xd587[463]]+ _0xd587[1469]);_0x5c29x15[_0xd587[352]]= _0x5c29x5[_0xd587[665]];_0x5c29x15[_0xd587[461]]= 100* _0x5c29x5[_0xd587[1244]]+ _0xd587[229];_0x5c29x4[_0xd587[62]](_0x5c29x15);_0x5c29x15= document[_0xd587[55]](mxClient[_0xd587[463]]+ _0xd587[1510]);_0x5c29x15[_0xd587[1511]]= _0xd587[128];_0x5c29x15[_0xd587[6]]= _0xd587[1512]+ this[_0xd587[1239]](0)+ _0xd587[185]+ this[_0xd587[1239]](0)+ _0xd587[1513]+ this[_0xd587[1239]](1)+ _0xd587[185]+ this[_0xd587[1239]](0);_0x5c29x4[_0xd587[62]](_0x5c29x15);_0x5c29x15= document[_0xd587[55]](mxClient[_0xd587[463]]+ _0xd587[1514]);_0x5c29x15[_0xd587[124]][_0xd587[103]]= _0xd587[1515]+ _0x5c29xa;_0x5c29x15[_0xd587[124]][_0xd587[611]]= _0x5c29xa;_0x5c29x15[_0xd587[124]][_0xd587[486]]= _0x5c29x5[_0xd587[486]];_0x5c29x15[_0xd587[1516]]= _0x5c29x9;_0x5c29x15[_0xd587[747]]= _0xd587[128];_0x5c29xa= Math[_0xd587[488]](_0x5c29x5[_0xd587[487]]* _0x5c29x5[_0xd587[255]]/ this[_0xd587[1460]]);_0x5c29x15[_0xd587[124]][_0xd587[487]]= _0x5c29xa+ _0xd587[168];(_0x5c29x5[_0xd587[666]]& mxConstants[_0xd587[1410]])== mxConstants[_0xd587[1410]]&& (_0x5c29x15[_0xd587[124]][_0xd587[1452]]= _0xd587[1447]);(_0x5c29x5[_0xd587[666]]& mxConstants[_0xd587[1412]])== mxConstants[_0xd587[1412]]&& (_0x5c29x15[_0xd587[124]][_0xd587[666]]= _0xd587[1449]);(_0x5c29x5[_0xd587[666]]& mxConstants[_0xd587[1414]])== mxConstants[_0xd587[1414]]&& (_0x5c29x15[_0xd587[124]][_0xd587[354]]= _0xd587[355]);_0x5c29x9= _0x5c29x9[_0xd587[224]](_0xd587[192]);_0x5c29x5= _0x5c29xa+ (_0x5c29x9[_0xd587[67]]- 1)* _0x5c29xa* mxConstants[_0xd587[490]];_0x5c29xa= _0x5c29x9= 0;_0x5c29x12== mxConstants[_0xd587[482]]?_0x5c29xa= -_0x5c29x5/ 2:_0x5c29x12!= mxConstants[_0xd587[481]]&& (_0x5c29xa= _0x5c29x5/ 2);null!= _0x5c29x17&& (_0x5c29x4[_0xd587[124]][_0xd587[603]]= _0x5c29x17,_0x5c29x12= _0x5c29x17* (Math[_0xd587[424]]/ 180),_0x5c29x9= Math[_0xd587[427]](_0x5c29x12)* _0x5c29xa,_0x5c29xa*= Math[_0xd587[426]](_0x5c29x12));_0x5c29x4[_0xd587[62]](_0x5c29x15);_0x5c29x4[_0xd587[124]][_0xd587[361]]= this[_0xd587[1239]](_0x5c29x2- _0x5c29x9)+ _0xd587[168];_0x5c29x4[_0xd587[124]][_0xd587[125]]= this[_0xd587[1239]](_0x5c29x3+ _0x5c29xa)+ _0xd587[168];this[_0xd587[813]][_0xd587[62]](_0x5c29x4)};mxVmlCanvas2D[_0xd587[202]][_0xd587[1336]]= function(){this[_0xd587[1370]](!1,!0)};mxVmlCanvas2D[_0xd587[202]][_0xd587[1334]]= function(){this[_0xd587[1370]](!0,!1)};mxVmlCanvas2D[_0xd587[202]][_0xd587[1337]]= function(){this[_0xd587[1370]](!0,!0)};function mxGuide(_0x5c29x2,_0x5c29x3){this[_0xd587[1179]]= _0x5c29x2;this[_0xd587[1517]](_0x5c29x3)}mxGuide[_0xd587[202]][_0xd587[1179]]= null;mxGuide[_0xd587[202]][_0xd587[1214]]= null;mxGuide[_0xd587[202]][_0xd587[662]]=  !0;mxGuide[_0xd587[202]][_0xd587[704]]=  !0;mxGuide[_0xd587[202]][_0xd587[1518]]= null;mxGuide[_0xd587[202]][_0xd587[1519]]= null;mxGuide[_0xd587[202]][_0xd587[1517]]= function(_0x5c29x2){this[_0xd587[1214]]= _0x5c29x2};mxGuide[_0xd587[202]][_0xd587[1019]]= function(_0x5c29x2){return !0};mxGuide[_0xd587[202]][_0xd587[1520]]= function(){return this[_0xd587[1179]][_0xd587[1020]]* this[_0xd587[1179]][_0xd587[441]][_0xd587[255]]/ 2};mxGuide[_0xd587[202]][_0xd587[1521]]= function(_0x5c29x2){_0x5c29x2=  new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);_0x5c29x2[_0xd587[1522]]=  !0;return _0x5c29x2};mxGuide[_0xd587[202]][_0xd587[582]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){if(null!= this[_0xd587[1214]]&& (this[_0xd587[662]]|| this[_0xd587[704]])&& null!= _0x5c29x2&& null!= _0x5c29x3){var _0x5c29x5=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[513]],_0x5c29x9=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[255]],_0x5c29xa=_0x5c29x3[_0xd587[235]],_0x5c29x12=_0x5c29x3[_0xd587[236]],_0x5c29x13=!1,_0x5c29x14=!1,_0x5c29x15=this[_0xd587[1520]](),_0x5c29x16=_0x5c29x15,_0x5c29x17=_0x5c29x15,_0x5c29x15=_0x5c29x2[_0xd587[238]]();_0x5c29x15[_0xd587[235]]+= _0x5c29x3[_0xd587[235]];_0x5c29x15[_0xd587[236]]+= _0x5c29x3[_0xd587[236]];var _0x5c29x18=_0x5c29x15[_0xd587[235]],_0x5c29x19=_0x5c29x15[_0xd587[235]]+ _0x5c29x15[_0xd587[117]],_0x5c29x1a=_0x5c29x15[_0xd587[241]](),_0x5c29x1b=_0x5c29x15[_0xd587[236]],_0x5c29x1c=_0x5c29x15[_0xd587[236]]+ _0x5c29x15[_0xd587[119]],_0x5c29x1d=_0x5c29x15[_0xd587[242]]();_0x5c29x3= function(_0x5c29x3){_0x5c29x3+= this[_0xd587[1179]][_0xd587[1136]];var _0x5c29x4=!1;Math[_0xd587[425]](_0x5c29x3- _0x5c29x1a)< _0x5c29x16?(_0x5c29xa= _0x5c29x3- _0x5c29x2[_0xd587[241]](),_0x5c29x16= Math[_0xd587[425]](_0x5c29x3- _0x5c29x1a),_0x5c29x4=  !0):Math[_0xd587[425]](_0x5c29x3- _0x5c29x18)< _0x5c29x16?(_0x5c29xa= _0x5c29x3- _0x5c29x2[_0xd587[235]],_0x5c29x16= Math[_0xd587[425]](_0x5c29x3- _0x5c29x18),_0x5c29x4=  !0):Math[_0xd587[425]](_0x5c29x3- _0x5c29x19)< _0x5c29x16&& (_0x5c29xa= _0x5c29x3- _0x5c29x2[_0xd587[235]]- _0x5c29x2[_0xd587[117]],_0x5c29x16= Math[_0xd587[425]](_0x5c29x3- _0x5c29x19),_0x5c29x4=  !0);if(_0x5c29x4){null== this[_0xd587[1518]]&& (this[_0xd587[1518]]= this[_0xd587[1521]](!0),this[_0xd587[1518]][_0xd587[507]]= this[_0xd587[1179]][_0xd587[507]]!= mxConstants[_0xd587[508]]?mxConstants[_0xd587[1523]]:mxConstants[_0xd587[508]],this[_0xd587[1518]][_0xd587[1229]]=  !1,this[_0xd587[1518]][_0xd587[176]](this[_0xd587[1179]][_0xd587[249]]()[_0xd587[1524]]()));var _0x5c29x5=this[_0xd587[1179]][_0xd587[526]];_0x5c29x3-= this[_0xd587[1179]][_0xd587[1136]];this[_0xd587[1518]][_0xd587[1525]]= [ new mxPoint(_0x5c29x3,-this[_0xd587[1179]][_0xd587[1137]]), new mxPoint(_0x5c29x3,_0x5c29x5[_0xd587[191]]- 3- this[_0xd587[1179]][_0xd587[1137]])]};_0x5c29x13= _0x5c29x13|| _0x5c29x4};for(var _0x5c29x15=function(_0x5c29x3){_0x5c29x3+= this[_0xd587[1179]][_0xd587[1137]];var _0x5c29x4=!1;Math[_0xd587[425]](_0x5c29x3- _0x5c29x1d)< _0x5c29x17?(_0x5c29x12= _0x5c29x3- _0x5c29x2[_0xd587[242]](),_0x5c29x17= Math[_0xd587[425]](_0x5c29x3- _0x5c29x1d),_0x5c29x4=  !0):Math[_0xd587[425]](_0x5c29x3- _0x5c29x1b)< _0x5c29x17?(_0x5c29x12= _0x5c29x3- _0x5c29x2[_0xd587[236]],_0x5c29x17= Math[_0xd587[425]](_0x5c29x3- _0x5c29x1b),_0x5c29x4=  !0):Math[_0xd587[425]](_0x5c29x3- _0x5c29x1c)< _0x5c29x17&& (_0x5c29x12= _0x5c29x3- _0x5c29x2[_0xd587[236]]- _0x5c29x2[_0xd587[119]],_0x5c29x17= Math[_0xd587[425]](_0x5c29x3- _0x5c29x1c),_0x5c29x4=  !0);if(_0x5c29x4){null== this[_0xd587[1519]]&& (this[_0xd587[1519]]= this[_0xd587[1521]](!1),this[_0xd587[1519]][_0xd587[507]]= this[_0xd587[1179]][_0xd587[507]]!= mxConstants[_0xd587[508]]?mxConstants[_0xd587[1523]]:mxConstants[_0xd587[508]],this[_0xd587[1519]][_0xd587[1229]]=  !1,this[_0xd587[1519]][_0xd587[176]](this[_0xd587[1179]][_0xd587[249]]()[_0xd587[1524]]()));var _0x5c29x5=this[_0xd587[1179]][_0xd587[526]];_0x5c29x3-= this[_0xd587[1179]][_0xd587[1137]];this[_0xd587[1519]][_0xd587[1525]]= [ new mxPoint(-this[_0xd587[1179]][_0xd587[1136]],_0x5c29x3), new mxPoint(_0x5c29x5[_0xd587[1526]]- 3- this[_0xd587[1179]][_0xd587[1136]],_0x5c29x3)]};_0x5c29x14= _0x5c29x14|| _0x5c29x4},_0x5c29x1e=0;_0x5c29x1e< this[_0xd587[1214]][_0xd587[67]];_0x5c29x1e++){var _0x5c29x1f=this[_0xd587[1214]][_0x5c29x1e];null!= _0x5c29x1f&& (this[_0xd587[662]]&& (_0x5c29x3[_0xd587[239]](this,_0x5c29x1f[_0xd587[241]]()),_0x5c29x3[_0xd587[239]](this,_0x5c29x1f[_0xd587[235]]),_0x5c29x3[_0xd587[239]](this,_0x5c29x1f[_0xd587[235]]+ _0x5c29x1f[_0xd587[117]])),this[_0xd587[704]]&& (_0x5c29x15[_0xd587[239]](this,_0x5c29x1f[_0xd587[242]]()),_0x5c29x15[_0xd587[239]](this,_0x5c29x1f[_0xd587[236]]),_0x5c29x15[_0xd587[239]](this,_0x5c29x1f[_0xd587[236]]+ _0x5c29x1f[_0xd587[119]])))};!_0x5c29x13&& null!= this[_0xd587[1518]]?this[_0xd587[1518]][_0xd587[252]][_0xd587[124]][_0xd587[187]]= _0xd587[188]:null!= this[_0xd587[1518]]&& (this[_0xd587[1518]][_0xd587[252]][_0xd587[124]][_0xd587[187]]= _0xd587[189],this[_0xd587[1518]][_0xd587[258]]());!_0x5c29x14&& null!= this[_0xd587[1519]]?this[_0xd587[1519]][_0xd587[252]][_0xd587[124]][_0xd587[187]]= _0xd587[188]:null!= this[_0xd587[1519]]&& (this[_0xd587[1519]][_0xd587[252]][_0xd587[124]][_0xd587[187]]= _0xd587[189],this[_0xd587[1519]][_0xd587[258]]());_0x5c29x4&& (_0x5c29x13|| (_0x5c29x4= _0x5c29x2[_0xd587[235]]- (this[_0xd587[1179]][_0xd587[1021]](_0x5c29x2[_0xd587[235]]/ _0x5c29x9- _0x5c29x5[_0xd587[235]])+ _0x5c29x5[_0xd587[235]])* _0x5c29x9,_0x5c29xa= this[_0xd587[1179]][_0xd587[1021]](_0x5c29xa/ _0x5c29x9)* _0x5c29x9- _0x5c29x4),_0x5c29x14|| (_0x5c29x5= _0x5c29x2[_0xd587[236]]- (this[_0xd587[1179]][_0xd587[1021]](_0x5c29x2[_0xd587[236]]/ _0x5c29x9- _0x5c29x5[_0xd587[236]])+ _0x5c29x5[_0xd587[236]])* _0x5c29x9,_0x5c29x12= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x12/ _0x5c29x9)* _0x5c29x9- _0x5c29x5));_0x5c29x3=  new mxPoint(_0x5c29xa,_0x5c29x12)};return _0x5c29x3};mxGuide[_0xd587[202]][_0xd587[801]]= function(){null!= this[_0xd587[1518]]&& (this[_0xd587[1518]][_0xd587[252]][_0xd587[124]][_0xd587[187]]= _0xd587[188]);null!= this[_0xd587[1519]]&& (this[_0xd587[1519]][_0xd587[252]][_0xd587[124]][_0xd587[187]]= _0xd587[188])};mxGuide[_0xd587[202]][_0xd587[515]]= function(){null!= this[_0xd587[1518]]&& (this[_0xd587[1518]][_0xd587[515]](),this[_0xd587[1518]]= null);null!= this[_0xd587[1519]]&& (this[_0xd587[1519]][_0xd587[515]](),this[_0xd587[1519]]= null)};function mxStencil(_0x5c29x2){this[_0xd587[1527]]= _0x5c29x2;this[_0xd587[1528]]();this[_0xd587[1529]]()}mxStencil[_0xd587[1530]]=  !1;mxStencil[_0xd587[202]][_0xd587[1527]]= null;mxStencil[_0xd587[202]][_0xd587[1531]]= null;mxStencil[_0xd587[202]][_0xd587[1322]]= null;mxStencil[_0xd587[202]][_0xd587[1532]]= null;mxStencil[_0xd587[202]][_0xd587[1533]]= null;mxStencil[_0xd587[202]][_0xd587[1534]]= null;mxStencil[_0xd587[202]][_0xd587[1535]]= null;mxStencil[_0xd587[202]][_0xd587[1307]]= null;mxStencil[_0xd587[202]][_0xd587[1528]]= function(){this[_0xd587[1535]]= this[_0xd587[1527]][_0xd587[64]](_0xd587[1536])[0];this[_0xd587[1534]]= this[_0xd587[1527]][_0xd587[64]](_0xd587[1537])[0];this[_0xd587[1532]]= Number(this[_0xd587[1527]][_0xd587[284]](_0xd587[1302])|| 100);this[_0xd587[1533]]= Number(this[_0xd587[1527]][_0xd587[284]](_0xd587[1303])|| 100);var _0x5c29x2=this[_0xd587[1527]][_0xd587[284]](_0xd587[1322]);this[_0xd587[1322]]= null!= _0x5c29x2?_0x5c29x2:_0xd587[1538];_0x5c29x2= this[_0xd587[1527]][_0xd587[284]](_0xd587[1307]);this[_0xd587[1307]]= null!= _0x5c29x2?_0x5c29x2:_0xd587[500]};mxStencil[_0xd587[202]][_0xd587[1529]]= function(){var _0x5c29x2=this[_0xd587[1527]][_0xd587[64]](_0xd587[1539])[0];if(null!= _0x5c29x2&& (_0x5c29x2= mxUtils[_0xd587[1540]](_0x5c29x2),null!= _0x5c29x2&& 0< _0x5c29x2[_0xd587[67]])){this[_0xd587[1531]]= [];for(var _0x5c29x3=0;_0x5c29x3< _0x5c29x2[_0xd587[67]];_0x5c29x3++){this[_0xd587[1531]][_0xd587[207]](this[_0xd587[1541]](_0x5c29x2[_0x5c29x3]))}}};mxStencil[_0xd587[202]][_0xd587[1541]]= function(_0x5c29x2){var _0x5c29x3=Number(_0x5c29x2[_0xd587[284]](_0xd587[235])),_0x5c29x4=Number(_0x5c29x2[_0xd587[284]](_0xd587[236]));_0x5c29x2= _0xd587[500]== _0x5c29x2[_0xd587[284]](_0xd587[591]);return  new mxConnectionConstraint( new mxPoint(_0x5c29x3,_0x5c29x4),_0x5c29x2)};mxStencil[_0xd587[202]][_0xd587[1542]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x3= this[_0xd587[1543]](_0x5c29x2,_0x5c29x3,_0x5c29x4);_0x5c29x2= _0x5c29x2[_0xd587[284]](_0xd587[1544]);if(mxStencil[_0xd587[1530]]&& null== _0x5c29x2|| _0xd587[500]== _0x5c29x2){_0x5c29x3= mxResources[_0xd587[203]](_0x5c29x3)};return _0x5c29x3};mxStencil[_0xd587[202]][_0xd587[1543]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x3= _0x5c29x2[_0xd587[284]](_0x5c29x3);null== _0x5c29x3&& (_0x5c29x2= mxUtils[_0xd587[329]](_0x5c29x2),null!= _0x5c29x2&& (_0x5c29x2= mxUtils[_0xd587[1545]](_0x5c29x2),_0xd587[279]==  typeof _0x5c29x2&& (_0x5c29x3= _0x5c29x2(_0x5c29x4))));return _0x5c29x3};mxStencil[_0xd587[202]][_0xd587[1546]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){this[_0xd587[1547]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,this[_0xd587[1534]],!1);this[_0xd587[1547]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,this[_0xd587[1535]],!0)};mxStencil[_0xd587[202]][_0xd587[1547]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13){if(null!= _0x5c29x12){var _0x5c29x14=mxUtils[_0xd587[433]](_0x5c29x3[_0xd587[124]],mxConstants.STYLE_DIRECTION,null);_0x5c29x4= this[_0xd587[1548]](_0x5c29x3[_0xd587[124]],_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x14);_0x5c29x5= Math[_0xd587[243]](_0x5c29x4[_0xd587[117]],_0x5c29x4[_0xd587[119]]);_0x5c29x5= _0xd587[1549]== this[_0xd587[1307]]?Number(mxUtils[_0xd587[1550]](_0x5c29x3[_0xd587[124]],mxConstants.STYLE_STROKEWIDTH,1)):Number(this[_0xd587[1307]])* _0x5c29x5;_0x5c29x2[_0xd587[1250]](_0x5c29x5);for(_0x5c29x12= _0x5c29x12[_0xd587[285]];null!= _0x5c29x12;){_0x5c29x12[_0xd587[288]]== mxConstants[_0xd587[289]]&& this[_0xd587[1551]](_0x5c29x2,_0x5c29x3,_0x5c29x12,_0x5c29x4,_0x5c29x13),_0x5c29x12= _0x5c29x12[_0xd587[287]]}}};mxStencil[_0xd587[202]][_0xd587[1548]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){_0x5c29x2= _0x5c29x3;_0x5c29x3= _0x5c29x5/ this[_0xd587[1532]];var _0x5c29x12=_0x5c29x9/ this[_0xd587[1533]];if(_0x5c29xa= _0xd587[700]== _0x5c29xa|| _0xd587[701]== _0x5c29xa){_0x5c29x12= _0x5c29x5/ this[_0xd587[1533]];_0x5c29x3= _0x5c29x9/ this[_0xd587[1532]];var _0x5c29x13=(_0x5c29x5- _0x5c29x9)/ 2;_0x5c29x2+= _0x5c29x13;_0x5c29x4-= _0x5c29x13};_0xd587[1552]== this[_0xd587[1322]]&& (_0x5c29x3= _0x5c29x12= Math[_0xd587[243]](_0x5c29x3,_0x5c29x12),_0x5c29xa?(_0x5c29x2+= (_0x5c29x9- this[_0xd587[1532]]* _0x5c29x3)/ 2,_0x5c29x4+= (_0x5c29x5- this[_0xd587[1533]]* _0x5c29x12)/ 2):(_0x5c29x2+= (_0x5c29x5- this[_0xd587[1532]]* _0x5c29x3)/ 2,_0x5c29x4+= (_0x5c29x9- this[_0xd587[1533]]* _0x5c29x12)/ 2));return  new mxRectangle(_0x5c29x2,_0x5c29x4,_0x5c29x3,_0x5c29x12)};mxStencil[_0xd587[202]][_0xd587[1551]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=_0x5c29x4[_0xd587[301]],_0x5c29x12=_0x5c29x5[_0xd587[235]],_0x5c29x13=_0x5c29x5[_0xd587[236]],_0x5c29x14=_0x5c29x5[_0xd587[117]],_0x5c29x15=_0x5c29x5[_0xd587[119]],_0x5c29x16=Math[_0xd587[243]](_0x5c29x14,_0x5c29x15);if(_0xd587[815]== _0x5c29xa){_0x5c29x2[_0xd587[815]]()}else {if(_0xd587[1210]== _0x5c29xa){_0x5c29x2[_0xd587[1210]]()}else {if(_0xd587[1215]== _0x5c29xa){_0x5c29x2[_0xd587[1275]]();for(_0x5c29x4= _0x5c29x4[_0xd587[285]];null!= _0x5c29x4;){_0x5c29x4[_0xd587[288]]== mxConstants[_0xd587[289]]&& this[_0xd587[1551]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9),_0x5c29x4= _0x5c29x4[_0xd587[287]]}}else {if(_0xd587[268]== _0x5c29xa){_0x5c29x2[_0xd587[268]]()}else {if(_0xd587[582]== _0x5c29xa){_0x5c29x2[_0xd587[1276]](_0x5c29x12+ Number(_0x5c29x4[_0xd587[284]](_0xd587[235]))* _0x5c29x14,_0x5c29x13+ Number(_0x5c29x4[_0xd587[284]](_0xd587[236]))* _0x5c29x15)}else {if(_0xd587[683]== _0x5c29xa){_0x5c29x2[_0xd587[1277]](_0x5c29x12+ Number(_0x5c29x4[_0xd587[284]](_0xd587[235]))* _0x5c29x14,_0x5c29x13+ Number(_0x5c29x4[_0xd587[284]](_0xd587[236]))* _0x5c29x15)}else {if(_0xd587[1323]== _0x5c29xa){_0x5c29x2[_0xd587[1278]](_0x5c29x12+ Number(_0x5c29x4[_0xd587[284]](_0xd587[1324]))* _0x5c29x14,_0x5c29x13+ Number(_0x5c29x4[_0xd587[284]](_0xd587[1325]))* _0x5c29x15,_0x5c29x12+ Number(_0x5c29x4[_0xd587[284]](_0xd587[1326]))* _0x5c29x14,_0x5c29x13+ Number(_0x5c29x4[_0xd587[284]](_0xd587[1327]))* _0x5c29x15)}else {if(_0xd587[1328]== _0x5c29xa){_0x5c29x2[_0xd587[1279]](_0x5c29x12+ Number(_0x5c29x4[_0xd587[284]](_0xd587[1324]))* _0x5c29x14,_0x5c29x13+ Number(_0x5c29x4[_0xd587[284]](_0xd587[1325]))* _0x5c29x15,_0x5c29x12+ Number(_0x5c29x4[_0xd587[284]](_0xd587[1326]))* _0x5c29x14,_0x5c29x13+ Number(_0x5c29x4[_0xd587[284]](_0xd587[1327]))* _0x5c29x15,_0x5c29x12+ Number(_0x5c29x4[_0xd587[284]](_0xd587[1329]))* _0x5c29x14,_0x5c29x13+ Number(_0x5c29x4[_0xd587[284]](_0xd587[1330]))* _0x5c29x15)}else {if(_0xd587[1553]== _0x5c29xa){_0x5c29x2[_0xd587[1280]](Number(_0x5c29x4[_0xd587[284]](_0xd587[1397]))* _0x5c29x14,Number(_0x5c29x4[_0xd587[284]](_0xd587[1398]))* _0x5c29x15,Number(_0x5c29x4[_0xd587[284]](_0xd587[1554])),Number(_0x5c29x4[_0xd587[284]](_0xd587[1555])),Number(_0x5c29x4[_0xd587[284]](_0xd587[1556])),_0x5c29x12+ Number(_0x5c29x4[_0xd587[284]](_0xd587[235]))* _0x5c29x14,_0x5c29x13+ Number(_0x5c29x4[_0xd587[284]](_0xd587[236]))* _0x5c29x15)}else {if(_0xd587[1319]== _0x5c29xa){_0x5c29x2[_0xd587[1319]](_0x5c29x12+ Number(_0x5c29x4[_0xd587[284]](_0xd587[235]))* _0x5c29x14,_0x5c29x13+ Number(_0x5c29x4[_0xd587[284]](_0xd587[236]))* _0x5c29x15,Number(_0x5c29x4[_0xd587[284]](_0xd587[1302]))* _0x5c29x14,Number(_0x5c29x4[_0xd587[284]](_0xd587[1303]))* _0x5c29x15)}else {if(_0xd587[1320]== _0x5c29xa){_0x5c29x3= _0x5c29x4[_0xd587[284]](_0xd587[1492]),0== _0x5c29x3&& (_0x5c29x3= 100* mxConstants[_0xd587[1557]]),_0x5c29x16= Number(_0x5c29x4[_0xd587[284]](_0xd587[1302]))* _0x5c29x14,_0x5c29x5= Number(_0x5c29x4[_0xd587[284]](_0xd587[1303]))* _0x5c29x15,_0x5c29x3= Number(_0x5c29x3)/ 100,_0x5c29x3= Math[_0xd587[243]](_0x5c29x16* _0x5c29x3,_0x5c29x5* _0x5c29x3),_0x5c29x2[_0xd587[1320]](_0x5c29x12+ Number(_0x5c29x4[_0xd587[284]](_0xd587[235]))* _0x5c29x14,_0x5c29x13+ Number(_0x5c29x4[_0xd587[284]](_0xd587[236]))* _0x5c29x15,_0x5c29x16,_0x5c29x5,_0x5c29x3,_0x5c29x3)}else {if(_0xd587[680]== _0x5c29xa){_0x5c29x2[_0xd587[680]](_0x5c29x12+ Number(_0x5c29x4[_0xd587[284]](_0xd587[235]))* _0x5c29x14,_0x5c29x13+ Number(_0x5c29x4[_0xd587[284]](_0xd587[236]))* _0x5c29x15,Number(_0x5c29x4[_0xd587[284]](_0xd587[1302]))* _0x5c29x14,Number(_0x5c29x4[_0xd587[284]](_0xd587[1303]))* _0x5c29x15)}else {if(_0xd587[618]== _0x5c29xa){_0x5c29x3= this[_0xd587[1543]](_0x5c29x4,_0xd587[390],_0x5c29x3),_0x5c29x2[_0xd587[618]](_0x5c29x12+ Number(_0x5c29x4[_0xd587[284]](_0xd587[235]))* _0x5c29x14,_0x5c29x13+ Number(_0x5c29x4[_0xd587[284]](_0xd587[236]))* _0x5c29x15,Number(_0x5c29x4[_0xd587[284]](_0xd587[1302]))* _0x5c29x14,Number(_0x5c29x4[_0xd587[284]](_0xd587[1303]))* _0x5c29x15,_0x5c29x3,!1,_0xd587[500]== _0x5c29x4[_0xd587[284]](_0xd587[623]),_0xd587[500]== _0x5c29x4[_0xd587[284]](_0xd587[624]))}else {if(_0xd587[963]== _0x5c29xa){_0x5c29x16= this[_0xd587[1542]](_0x5c29x4,_0xd587[1332],_0x5c29x3);_0x5c29x5= _0xd587[500]== _0x5c29x4[_0xd587[284]](_0xd587[704])?-90:0;if(_0xd587[468]== _0x5c29x4[_0xd587[284]](_0xd587[1558])){var _0x5c29x17=_0x5c29x3[_0xd587[603]],_0x5c29x18=1== mxUtils[_0xd587[433]](_0x5c29x3[_0xd587[124]],mxConstants.STYLE_FLIPH,0);_0x5c29x3= 1== mxUtils[_0xd587[433]](_0x5c29x3[_0xd587[124]],mxConstants.STYLE_FLIPV,0);_0x5c29x5= _0x5c29x18&& _0x5c29x3?_0x5c29x5- _0x5c29x17:_0x5c29x18|| _0x5c29x3?_0x5c29x5+ _0x5c29x17:_0x5c29x5- _0x5c29x17};_0x5c29x5-= _0x5c29x4[_0xd587[284]](_0xd587[603]);_0x5c29x2[_0xd587[963]](_0x5c29x12+ Number(_0x5c29x4[_0xd587[284]](_0xd587[235]))* _0x5c29x14,_0x5c29x13+ Number(_0x5c29x4[_0xd587[284]](_0xd587[236]))* _0x5c29x15,0,0,_0x5c29x16,_0x5c29x4[_0xd587[284]](_0xd587[611])|| _0xd587[361],_0x5c29x4[_0xd587[284]](_0xd587[552])|| _0xd587[125],!1,_0xd587[110],!1,!1,_0x5c29x5)}else {if(_0xd587[1559]== _0x5c29xa){_0x5c29x17= mxStencilRegistry[_0xd587[1560]](_0x5c29x4[_0xd587[284]](_0xd587[298])),null!= _0x5c29x17&& (_0x5c29x12+= Number(_0x5c29x4[_0xd587[284]](_0xd587[235]))* _0x5c29x14,_0x5c29x13+= Number(_0x5c29x4[_0xd587[284]](_0xd587[236]))* _0x5c29x15,_0x5c29x16= Number(_0x5c29x4[_0xd587[284]](_0xd587[1302]))* _0x5c29x14,_0x5c29x5= Number(_0x5c29x4[_0xd587[284]](_0xd587[1303]))* _0x5c29x15,_0x5c29x17[_0xd587[1546]](_0x5c29x2,_0x5c29x3,_0x5c29x12,_0x5c29x13,_0x5c29x16,_0x5c29x5))}else {if(_0xd587[1338]== _0x5c29xa){_0x5c29x2[_0xd587[1337]]()}else {if(_0xd587[1334]== _0x5c29xa){_0x5c29x2[_0xd587[1334]]()}else {if(_0xd587[1336]== _0x5c29xa){_0x5c29x2[_0xd587[1336]]()}else {if(_0xd587[1307]== _0x5c29xa){_0x5c29x2[_0xd587[1250]](Number(_0x5c29x4[_0xd587[284]](_0xd587[117]))* _0x5c29x16)}else {if(_0xd587[648]== _0x5c29xa){_0x5c29x2[_0xd587[1251]](_0xd587[500]== _0x5c29x4[_0xd587[284]](_0xd587[648]))}else {if(_0xd587[1308]== _0x5c29xa){if(_0x5c29x4= _0x5c29x4[_0xd587[284]](_0xd587[1309]),null!= _0x5c29x4){_0x5c29x4= _0x5c29x4[_0xd587[224]](_0xd587[185]);_0x5c29x14= [];for(_0x5c29x15= 0;_0x5c29x15< _0x5c29x4[_0xd587[67]];_0x5c29x15++){0< _0x5c29x4[_0x5c29x15][_0xd587[67]]&& _0x5c29x14[_0xd587[207]](Number(_0x5c29x4[_0x5c29x15])* _0x5c29x16)};_0x5c29x4= _0x5c29x14[_0xd587[234]](_0xd587[185]);_0x5c29x2[_0xd587[1252]](_0x5c29x4)}}else {_0xd587[1306]== _0x5c29xa?_0x5c29x2[_0xd587[1249]](_0x5c29x4[_0xd587[284]](_0xd587[352])):_0xd587[1310]== _0x5c29xa?_0x5c29x2[_0xd587[1253]](_0x5c29x4[_0xd587[284]](_0xd587[1311])):_0xd587[1312]== _0x5c29xa?_0x5c29x2[_0xd587[1255]](_0x5c29x4[_0xd587[284]](_0xd587[234])):_0xd587[1313]== _0x5c29xa?_0x5c29x2[_0xd587[1257]](Number(_0x5c29x4[_0xd587[284]](_0xd587[1314]))):_0xd587[1298]== _0x5c29xa?_0x5c29x2[_0xd587[1245]](_0x5c29x4[_0xd587[284]](_0xd587[352])):_0xd587[1244]== _0x5c29xa?_0x5c29x2[_0xd587[1243]](_0x5c29x4[_0xd587[284]](_0xd587[1244])):_0xd587[1315]== _0x5c29xa?_0x5c29x2[_0xd587[1259]](_0x5c29x4[_0xd587[284]](_0xd587[352])):_0xd587[1318]== _0x5c29xa?_0x5c29x2[_0xd587[1266]](_0x5c29x4[_0xd587[284]](_0xd587[124])):_0xd587[1287]== _0x5c29xa?_0x5c29x2[_0xd587[1265]](_0x5c29x4[_0xd587[284]](_0xd587[1288])):_0xd587[1289]== _0x5c29xa&& _0x5c29x2[_0xd587[1264]](Number(_0x5c29x4[_0xd587[284]](_0xd587[803]))* _0x5c29x16)}}}}}}}}}}}}}}}}}}}}};_0x5c29x9&& (_0xd587[1338]== _0x5c29xa|| _0xd587[1334]== _0x5c29xa|| _0xd587[1336]== _0x5c29xa)&& _0x5c29x2[_0xd587[1267]](!1)};function mxShape(_0x5c29x2){this[_0xd587[1561]]= _0x5c29x2;this[_0xd587[1307]]= 1;this[_0xd587[603]]= 0;this[_0xd587[461]]= 100;this[_0xd587[624]]= this[_0xd587[623]]=  !1}mxShape[_0xd587[202]][_0xd587[507]]= null;mxShape[_0xd587[202]][_0xd587[255]]= 1;mxShape[_0xd587[202]][_0xd587[1562]]= null;mxShape[_0xd587[202]][_0xd587[1525]]= null;mxShape[_0xd587[202]][_0xd587[252]]= null;mxShape[_0xd587[202]][_0xd587[124]]= null;mxShape[_0xd587[202]][_0xd587[124]]= null;mxShape[_0xd587[202]][_0xd587[1563]]= null;mxShape[_0xd587[202]][_0xd587[1561]]= null;mxShape[_0xd587[202]][_0xd587[1564]]= 6;mxShape[_0xd587[202]][_0xd587[1229]]=  !0;mxShape[_0xd587[202]][_0xd587[1565]]=  !1;mxShape[_0xd587[202]][_0xd587[1460]]= 1;mxShape[_0xd587[202]][_0xd587[176]]= function(_0x5c29x2){null== this[_0xd587[252]]&& (this[_0xd587[252]]= this[_0xd587[385]](_0x5c29x2),null!= _0x5c29x2&& _0x5c29x2[_0xd587[62]](this[_0xd587[252]]))};mxShape[_0xd587[202]][_0xd587[1566]]= function(){return !0};mxShape[_0xd587[202]][_0xd587[1567]]= function(){return !1};mxShape[_0xd587[202]][_0xd587[1568]]= function(){return 1== mxUtils[_0xd587[1454]](Math[_0xd587[160]](1,Math[_0xd587[488]](this[_0xd587[1307]]* this[_0xd587[255]])),2)?0.5:0};mxShape[_0xd587[202]][_0xd587[385]]= function(_0x5c29x2){var _0x5c29x3=null;return _0x5c29x3= null!= _0x5c29x2[_0xd587[538]]?this[_0xd587[1569]](_0x5c29x2):8== document[_0xd587[5]]|| this[_0xd587[507]]== mxConstants[_0xd587[508]]|| this[_0xd587[507]]!= mxConstants[_0xd587[1523]]&& this[_0xd587[1567]]()?this[_0xd587[1570]](_0x5c29x2):this[_0xd587[1571]](_0x5c29x2)};mxShape[_0xd587[202]][_0xd587[1569]]= function(){return document[_0xd587[509]](mxConstants.NS_SVG,_0xd587[449])};mxShape[_0xd587[202]][_0xd587[1571]]= function(){var _0x5c29x2=document[_0xd587[55]](mxClient[_0xd587[463]]+ _0xd587[1499]);_0x5c29x2[_0xd587[124]][_0xd587[491]]= _0xd587[492];return _0x5c29x2};mxShape[_0xd587[202]][_0xd587[1570]]= function(){var _0x5c29x2=document[_0xd587[55]](_0xd587[485]);_0x5c29x2[_0xd587[124]][_0xd587[491]]= _0xd587[492];return _0x5c29x2};mxShape[_0xd587[202]][_0xd587[1572]]= function(){this[_0xd587[258]]()};mxShape[_0xd587[202]][_0xd587[258]]= function(){this[_0xd587[1573]]();this[_0xd587[1574]]()?(this[_0xd587[252]][_0xd587[124]][_0xd587[187]]= _0xd587[110],_0xd587[529]== this[_0xd587[252]][_0xd587[301]]&& this[_0xd587[1567]]()?this[_0xd587[1575]]():this[_0xd587[1576]](),this[_0xd587[1577]]()):(this[_0xd587[252]][_0xd587[124]][_0xd587[187]]= _0xd587[188],this[_0xd587[1563]]= null)};mxShape[_0xd587[202]][_0xd587[1573]]= function(){var _0x5c29x2=this[_0xd587[1525]];if(null!= _0x5c29x2&& 0< _0x5c29x2[_0xd587[67]]&& null!= _0x5c29x2[0]){this[_0xd587[1562]]=  new mxRectangle(Number(_0x5c29x2[0][_0xd587[235]]),Number(_0x5c29x2[0][_0xd587[236]]),1,1);for(var _0x5c29x3=1;_0x5c29x3< this[_0xd587[1525]][_0xd587[67]];_0x5c29x3++){null!= _0x5c29x2[_0x5c29x3]&& this[_0xd587[1562]][_0xd587[99]]( new mxRectangle(Number(_0x5c29x2[_0x5c29x3][_0xd587[235]]),Number(_0x5c29x2[_0x5c29x3][_0xd587[236]]),1,1))}}};mxShape[_0xd587[202]][_0xd587[1574]]= function(){return null!= this[_0xd587[1562]]&& !isNaN(this[_0xd587[1562]][_0xd587[235]])&& !isNaN(this[_0xd587[1562]][_0xd587[236]])&& !isNaN(this[_0xd587[1562]][_0xd587[117]])&& !isNaN(this[_0xd587[1562]][_0xd587[119]])&& 0< this[_0xd587[1562]][_0xd587[117]]&& 0< this[_0xd587[1562]][_0xd587[119]]};mxShape[_0xd587[202]][_0xd587[1578]]= function(){var _0x5c29x2=document[_0xd587[55]](mxClient[_0xd587[463]]+ _0xd587[1499]);_0x5c29x2[_0xd587[124]][_0xd587[491]]= _0xd587[492];_0x5c29x2[_0xd587[124]][_0xd587[117]]= this[_0xd587[252]][_0xd587[124]][_0xd587[117]];_0x5c29x2[_0xd587[124]][_0xd587[119]]= this[_0xd587[252]][_0xd587[124]][_0xd587[119]];return _0x5c29x2};mxShape[_0xd587[202]][_0xd587[1576]]= function(){var _0x5c29x2=this[_0xd587[1579]]();for(_0x5c29x2[_0xd587[1229]]= this[_0xd587[1229]];this[_0xd587[252]][_0xd587[1580]]();){this[_0xd587[252]][_0xd587[266]](this[_0xd587[252]][_0xd587[1581]])};this[_0xd587[1209]](_0x5c29x2);this[_0xd587[252]]!= _0x5c29x2[_0xd587[813]]&& this[_0xd587[252]][_0xd587[1583]](_0xd587[1582],_0x5c29x2[_0xd587[813]][_0xd587[342]]);_0xd587[529]== this[_0xd587[252]][_0xd587[301]]&& 8== document[_0xd587[5]]&& (this[_0xd587[252]][_0xd587[124]][_0xd587[347]]= _0xd587[110],(null== this[_0xd587[1561]]|| !this[_0xd587[1565]])&& mxUtils[_0xd587[1584]](this[_0xd587[252]]));this[_0xd587[1585]](_0x5c29x2)};mxShape[_0xd587[202]][_0xd587[1579]]= function(){var _0x5c29x2=null,_0x5c29x3=null;if(null!= this[_0xd587[252]][_0xd587[538]]){_0x5c29x2=  new mxSvgCanvas2D(this[_0xd587[252]],!1),_0x5c29x2[_0xd587[1345]]= this[_0xd587[1564]],_0x5c29x2[_0xd587[1347]]= mxClient[_0xd587[133]]&& !mxClient[_0xd587[75]]&& !mxClient[_0xd587[76]],_0x5c29x3= this[_0xd587[1568]](),0!= _0x5c29x3?this[_0xd587[252]][_0xd587[57]](_0xd587[535],_0xd587[536]+ _0x5c29x3+ _0xd587[537]+ _0x5c29x3+ _0xd587[460]):this[_0xd587[252]][_0xd587[1390]](_0xd587[535])}else {this[_0xd587[1586]]();var _0x5c29x4=Math[_0xd587[160]](1,Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[117]])),_0x5c29x5=Math[_0xd587[160]](1,Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[119]])),_0x5c29x3=8== document[_0xd587[5]]&& this[_0xd587[1566]]()?this[_0xd587[1578]]():this[_0xd587[252]],_0x5c29x2= new mxVmlCanvas2D(_0x5c29x3,!1);_0xd587[110]!= _0x5c29x3[_0xd587[337]]&& (_0x5c29x3[_0xd587[1462]]= _0x5c29x4* this[_0xd587[1460]]+ _0xd587[537]+ _0x5c29x5* this[_0xd587[1460]],_0x5c29x2[_0xd587[255]](this[_0xd587[1460]]),_0x5c29x2[_0xd587[1460]]= this[_0xd587[1460]]);_0x5c29x3= this[_0xd587[255]];_0x5c29x2[_0xd587[513]](-Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[235]]/ _0x5c29x3),-Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[236]]/ _0x5c29x3))};return _0x5c29x2};mxShape[_0xd587[202]][_0xd587[1586]]= function(){this[_0xd587[252]][_0xd587[124]][_0xd587[361]]= Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[235]])+ _0xd587[168];this[_0xd587[252]][_0xd587[124]][_0xd587[125]]= Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[236]])+ _0xd587[168];var _0x5c29x2=Math[_0xd587[160]](1,Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[117]])),_0x5c29x3=Math[_0xd587[160]](1,Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[119]]));this[_0xd587[252]][_0xd587[124]][_0xd587[117]]= _0x5c29x2+ _0xd587[168];this[_0xd587[252]][_0xd587[124]][_0xd587[119]]= _0x5c29x3+ _0xd587[168];this[_0xd587[252]][_0xd587[124]][_0xd587[277]]= _0xd587[189]};mxShape[_0xd587[202]][_0xd587[1585]]= function(_0x5c29x2){if(_0x5c29x2 instanceof  mxSvgCanvas2D){for(var _0x5c29x3 in _0x5c29x2[_0xd587[1339]]){var _0x5c29x4=_0x5c29x2[_0xd587[1339]][_0x5c29x3];_0x5c29x4[_0xd587[1587]]= (_0x5c29x4[_0xd587[1587]]|| 0)+ 1};this[_0xd587[1589]](this[_0xd587[1588]]);this[_0xd587[1588]]= _0x5c29x2[_0xd587[1339]]}};mxShape[_0xd587[202]][_0xd587[1209]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[255]],_0x5c29x4=this[_0xd587[1562]][_0xd587[235]]/ _0x5c29x3,_0x5c29x5=this[_0xd587[1562]][_0xd587[236]]/ _0x5c29x3,_0x5c29x9=this[_0xd587[1562]][_0xd587[117]]/ _0x5c29x3,_0x5c29xa=this[_0xd587[1562]][_0xd587[119]]/ _0x5c29x3;if(this[_0xd587[1590]]()){var _0x5c29x12=(_0x5c29x9- _0x5c29xa)/ 2,_0x5c29x4=_0x5c29x4+ _0x5c29x12,_0x5c29x5=_0x5c29x5- _0x5c29x12,_0x5c29x12=_0x5c29x9,_0x5c29x9=_0x5c29xa,_0x5c29xa=_0x5c29x12};this[_0xd587[1591]](_0x5c29x2,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa);this[_0xd587[1592]](_0x5c29x2,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa);if(null!= this[_0xd587[1561]]){this[_0xd587[1593]](_0x5c29x2,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa)}else {if(_0x5c29x2[_0xd587[1250]](this[_0xd587[1307]]),null!= this[_0xd587[1525]]){_0x5c29x4= [];for(_0x5c29x5= 0;_0x5c29x5< this[_0xd587[1525]][_0xd587[67]];_0x5c29x5++){_0x5c29x4[_0xd587[207]]( new mxPoint(this[_0xd587[1525]][_0x5c29x5][_0xd587[235]]/ _0x5c29x3,this[_0xd587[1525]][_0x5c29x5][_0xd587[236]]/ _0x5c29x3))};this[_0xd587[1594]](_0x5c29x2,_0x5c29x4)}else {this[_0xd587[1595]](_0x5c29x2,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa)}}};mxShape[_0xd587[202]][_0xd587[1592]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=null;null!= this[_0xd587[124]]&& (_0x5c29xa= this[_0xd587[124]][_0xd587[649]]);_0x5c29x2[_0xd587[1243]](this[_0xd587[461]]/ 100);null!= this[_0xd587[1596]]&& _0x5c29x2[_0xd587[1267]](this[_0xd587[1596]]);null!= this[_0xd587[1522]]&& _0x5c29x2[_0xd587[1251]](this[_0xd587[1522]]);null!= _0x5c29xa&& _0x5c29x2[_0xd587[1252]](_0x5c29xa);null!= this[_0xd587[1299]]?(_0x5c29x3= this[_0xd587[1597]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9),_0x5c29x2[_0xd587[1246]](this[_0xd587[1334]],this[_0xd587[1299]],_0x5c29x3[_0xd587[235]],_0x5c29x3[_0xd587[236]],_0x5c29x3[_0xd587[117]],_0x5c29x3[_0xd587[119]],this[_0xd587[607]])):_0x5c29x2[_0xd587[1245]](this[_0xd587[1334]]);_0x5c29x2[_0xd587[1249]](this[_0xd587[1336]])};mxShape[_0xd587[202]][_0xd587[1597]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){return  new mxRectangle(_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9)};mxShape[_0xd587[202]][_0xd587[1591]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x2[_0xd587[255]](this[_0xd587[255]]);_0x5c29x2[_0xd587[1294]](this[_0xd587[1598]](),this[_0xd587[623]],this[_0xd587[624]],_0x5c29x3+ _0x5c29x5/ 2,_0x5c29x4+ _0x5c29x9/ 2)};mxShape[_0xd587[202]][_0xd587[1593]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){this[_0xd587[1565]]&& (this[_0xd587[507]]== mxConstants[_0xd587[508]]?this[_0xd587[1599]](this[_0xd587[252]],_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9):8!= document[_0xd587[5]]&& this[_0xd587[1600]](this[_0xd587[252]]));this[_0xd587[1561]][_0xd587[1546]](_0x5c29x2,this,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9)};mxShape[_0xd587[202]][_0xd587[1595]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){this[_0xd587[1601]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9);_0x5c29x2[_0xd587[1267]](!1);this[_0xd587[1602]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9)};mxShape[_0xd587[202]][_0xd587[1601]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){};mxShape[_0xd587[202]][_0xd587[1602]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){};mxShape[_0xd587[202]][_0xd587[1594]]= function(_0x5c29x2,_0x5c29x3){};mxShape[_0xd587[202]][_0xd587[1603]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_ARCSIZE,100* mxConstants[_0xd587[1557]])/ 100;return Math[_0xd587[243]](_0x5c29x2* _0x5c29x4,_0x5c29x3* _0x5c29x4)};mxShape[_0xd587[202]][_0xd587[1604]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){var _0x5c29x12=Math[_0xd587[430]](this[_0xd587[1307]]/ 2);_0x5c29x2[_0xd587[1246]](_0xd587[1605],_0xd587[1605],_0x5c29x3,_0x5c29x4,_0x5c29x5,0.6* _0x5c29x9,_0xd587[701],0.9,0.1);_0x5c29x2[_0xd587[1275]]();_0x5c29xa+= 2* _0x5c29x12;this[_0xd587[1606]]?(_0x5c29x2[_0xd587[1276]](_0x5c29x3- _0x5c29x12+ _0x5c29xa,_0x5c29x4- _0x5c29x12),_0x5c29x2[_0xd587[1278]](_0x5c29x3- _0x5c29x12,_0x5c29x4- _0x5c29x12,_0x5c29x3- _0x5c29x12,_0x5c29x4- _0x5c29x12+ _0x5c29xa),_0x5c29x2[_0xd587[1277]](_0x5c29x3- _0x5c29x12,_0x5c29x4+ 0.4* _0x5c29x9),_0x5c29x2[_0xd587[1278]](_0x5c29x3+ 0.5* _0x5c29x5,_0x5c29x4+ 0.7* _0x5c29x9,_0x5c29x3+ _0x5c29x5+ _0x5c29x12,_0x5c29x4+ 0.4* _0x5c29x9),_0x5c29x2[_0xd587[1277]](_0x5c29x3+ _0x5c29x5+ _0x5c29x12,_0x5c29x4- _0x5c29x12+ _0x5c29xa),_0x5c29x2[_0xd587[1278]](_0x5c29x3+ _0x5c29x5+ _0x5c29x12,_0x5c29x4- _0x5c29x12,_0x5c29x3+ _0x5c29x5+ _0x5c29x12- _0x5c29xa,_0x5c29x4- _0x5c29x12)):(_0x5c29x2[_0xd587[1276]](_0x5c29x3- _0x5c29x12,_0x5c29x4- _0x5c29x12),_0x5c29x2[_0xd587[1277]](_0x5c29x3- _0x5c29x12,_0x5c29x4+ 0.4* _0x5c29x9),_0x5c29x2[_0xd587[1278]](_0x5c29x3+ 0.5* _0x5c29x5,_0x5c29x4+ 0.7* _0x5c29x9,_0x5c29x3+ _0x5c29x5+ _0x5c29x12,_0x5c29x4+ 0.4* _0x5c29x9),_0x5c29x2[_0xd587[1277]](_0x5c29x3+ _0x5c29x5+ _0x5c29x12,_0x5c29x4- _0x5c29x12));_0x5c29x2[_0xd587[268]]();_0x5c29x2[_0xd587[1334]]()};mxShape[_0xd587[202]][_0xd587[183]]= function(_0x5c29x2){this[_0xd587[724]]= _0x5c29x2;this[_0xd587[124]]= _0x5c29x2[_0xd587[124]];if(null!= this[_0xd587[124]]){this[_0xd587[1334]]= mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_FILLCOLOR,this[_0xd587[1334]]);this[_0xd587[1299]]= mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_GRADIENTCOLOR,this[_0xd587[1299]]);this[_0xd587[607]]= mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_GRADIENT_DIRECTION,this[_0xd587[607]]);this[_0xd587[461]]= mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_OPACITY,this[_0xd587[461]]);this[_0xd587[1336]]= mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_STROKECOLOR,this[_0xd587[1336]]);this[_0xd587[1307]]= mxUtils[_0xd587[1550]](this[_0xd587[124]],mxConstants.STYLE_STROKEWIDTH,this[_0xd587[1307]]);this[_0xd587[657]]= mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_SPACING,this[_0xd587[657]]);this[_0xd587[644]]= mxUtils[_0xd587[1550]](this[_0xd587[124]],mxConstants.STYLE_STARTSIZE,this[_0xd587[644]]);this[_0xd587[643]]= mxUtils[_0xd587[1550]](this[_0xd587[124]],mxConstants.STYLE_ENDSIZE,this[_0xd587[643]]);this[_0xd587[642]]= mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_STARTARROW,this[_0xd587[642]]);this[_0xd587[641]]= mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_ENDARROW,this[_0xd587[641]]);this[_0xd587[603]]= mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_ROTATION,this[_0xd587[603]]);this[_0xd587[663]]= mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_DIRECTION,this[_0xd587[663]]);this[_0xd587[623]]= 1== mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_FLIPH,0);this[_0xd587[624]]= 1== mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_FLIPV,0);null!= this[_0xd587[1561]]&& (this[_0xd587[623]]= 1== mxUtils[_0xd587[433]](this[_0xd587[124]],_0xd587[1607],0)|| this[_0xd587[623]],this[_0xd587[624]]= 1== mxUtils[_0xd587[433]](this[_0xd587[124]],_0xd587[1608],0)|| this[_0xd587[624]]);if(_0xd587[700]== this[_0xd587[663]]|| _0xd587[701]== this[_0xd587[663]]){_0x5c29x2= this[_0xd587[623]],this[_0xd587[623]]= this[_0xd587[624]],this[_0xd587[624]]= _0x5c29x2};this[_0xd587[1596]]= 1== mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_SHADOW,this[_0xd587[1596]]);this[_0xd587[1522]]= 1== mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_DASHED,this[_0xd587[1522]]);this[_0xd587[1606]]= 1== mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_ROUNDED,this[_0xd587[1606]]);this[_0xd587[617]]= 1== mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_GLASS,this[_0xd587[617]]);_0xd587[130]== this[_0xd587[1334]]&& (this[_0xd587[1334]]= null);_0xd587[130]== this[_0xd587[1299]]&& (this[_0xd587[1299]]= null);_0xd587[130]== this[_0xd587[1336]]&& (this[_0xd587[1336]]= null)}};mxShape[_0xd587[202]][_0xd587[1609]]= function(_0x5c29x2){null== _0x5c29x2&& (_0x5c29x2= _0xd587[110]);this[_0xd587[270]]= _0x5c29x2;null!= this[_0xd587[252]]&& (this[_0xd587[252]][_0xd587[124]][_0xd587[270]]= _0x5c29x2)};mxShape[_0xd587[202]][_0xd587[1610]]= function(){return this[_0xd587[270]]};mxShape[_0xd587[202]][_0xd587[1577]]= function(){if(null!= this[_0xd587[1562]]){var _0x5c29x2=this[_0xd587[1611]]();if(null!= _0x5c29x2){this[_0xd587[1612]](_0x5c29x2);var _0x5c29x3=this[_0xd587[1598]]();0!= _0x5c29x3&& (_0x5c29x2= mxUtils[_0xd587[1613]](_0x5c29x2,_0x5c29x3));_0x5c29x2[_0xd587[235]]= Math[_0xd587[519]](_0x5c29x2[_0xd587[235]]);_0x5c29x2[_0xd587[236]]= Math[_0xd587[519]](_0x5c29x2[_0xd587[236]]);_0x5c29x2[_0xd587[117]]= Math[_0xd587[430]](_0x5c29x2[_0xd587[117]]);_0x5c29x2[_0xd587[119]]= Math[_0xd587[430]](_0x5c29x2[_0xd587[119]])};this[_0xd587[1563]]= _0x5c29x2}};mxShape[_0xd587[202]][_0xd587[1611]]= function(){var _0x5c29x2=this[_0xd587[1562]][_0xd587[238]]();if(this[_0xd587[1590]]()){var _0x5c29x3=(_0x5c29x2[_0xd587[117]]- _0x5c29x2[_0xd587[119]])/ 2;_0x5c29x2[_0xd587[235]]+= _0x5c29x3;_0x5c29x2[_0xd587[236]]-= _0x5c29x3;_0x5c29x3= _0x5c29x2[_0xd587[117]];_0x5c29x2[_0xd587[117]]= _0x5c29x2[_0xd587[119]];_0x5c29x2[_0xd587[119]]= _0x5c29x3};return _0x5c29x2};mxShape[_0xd587[202]][_0xd587[1612]]= function(_0x5c29x2){this[_0xd587[1596]]&& (_0x5c29x2[_0xd587[117]]+= Math[_0xd587[430]](mxConstants[_0xd587[1237]]* this[_0xd587[255]]),_0x5c29x2[_0xd587[119]]+= Math[_0xd587[430]](mxConstants[_0xd587[1238]]* this[_0xd587[255]]));var _0x5c29x3=Math[_0xd587[430]](this[_0xd587[1307]]* this[_0xd587[255]]);_0x5c29x2[_0xd587[244]](Math[_0xd587[430]](_0x5c29x3/ 2))};mxShape[_0xd587[202]][_0xd587[1590]]= function(){return null== this[_0xd587[1561]]&& (_0xd587[700]== this[_0xd587[663]]|| _0xd587[701]== this[_0xd587[663]])};mxShape[_0xd587[202]][_0xd587[1614]]= function(){return null!= this[_0xd587[603]]?this[_0xd587[603]]:0};mxShape[_0xd587[202]][_0xd587[1615]]= function(){var _0x5c29x2=this[_0xd587[1614]]();1!= mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_HORIZONTAL,1)&& (_0x5c29x2+= mxText[_0xd587[202]][_0xd587[1616]]);return _0x5c29x2};mxShape[_0xd587[202]][_0xd587[1598]]= function(){var _0x5c29x2=this[_0xd587[1614]]();null!= this[_0xd587[663]]&& (_0xd587[700]== this[_0xd587[663]]?_0x5c29x2+= 270:_0xd587[703]== this[_0xd587[663]]?_0x5c29x2+= 180:_0xd587[701]== this[_0xd587[663]]&& (_0x5c29x2+= 90));return _0x5c29x2};mxShape[_0xd587[202]][_0xd587[1599]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x2= document[_0xd587[509]](mxConstants.NS_SVG,_0xd587[1319]);_0x5c29x2[_0xd587[57]](_0xd587[235],_0x5c29x3);_0x5c29x2[_0xd587[57]](_0xd587[236],_0x5c29x4);_0x5c29x2[_0xd587[57]](_0xd587[117],_0x5c29x5);_0x5c29x2[_0xd587[57]](_0xd587[119],_0x5c29x9);_0x5c29x2[_0xd587[57]](_0xd587[1334],_0xd587[130]);_0x5c29x2[_0xd587[57]](_0xd587[1336],_0xd587[130]);_0x5c29x2[_0xd587[57]](_0xd587[1377],_0xd587[1378]);this[_0xd587[252]][_0xd587[62]](_0x5c29x2)};mxShape[_0xd587[202]][_0xd587[1600]]= function(_0x5c29x2){_0x5c29x2[_0xd587[124]][_0xd587[1617]]= _0xd587[1618]+ mxClient[_0xd587[88]]+ _0xd587[1619]};mxShape[_0xd587[202]][_0xd587[1589]]= function(_0x5c29x2){if(null!= _0x5c29x2){for(var _0x5c29x3 in _0x5c29x2){var _0x5c29x4=_0x5c29x2[_0x5c29x3];_0x5c29x4[_0xd587[1587]]= (_0x5c29x4[_0xd587[1587]]|| 0)- 1;0== _0x5c29x4[_0xd587[1587]]&& null!= _0x5c29x4[_0xd587[265]]&& _0x5c29x4[_0xd587[265]][_0xd587[266]](_0x5c29x4)}}};mxShape[_0xd587[202]][_0xd587[515]]= function(){null!= this[_0xd587[252]]&& (mxEvent[_0xd587[762]](this[_0xd587[252]]),null!= this[_0xd587[252]][_0xd587[265]]&& this[_0xd587[252]][_0xd587[265]][_0xd587[266]](this[_0xd587[252]]),this[_0xd587[252]]= null);this[_0xd587[1589]](this[_0xd587[1588]]);this[_0xd587[1588]]= null};var mxStencilRegistry={stencils:[],addStencil:function(_0x5c29x2,_0x5c29x3){mxStencilRegistry[_0xd587[1620]][_0x5c29x2]= _0x5c29x3},getStencil:function(_0x5c29x2){return mxStencilRegistry[_0xd587[1620]][_0x5c29x2]}},mxMarker={markers:[],addMarker:function(_0x5c29x2,_0x5c29x3){mxMarker[_0xd587[1621]][_0x5c29x2]= _0x5c29x3},createMarker:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14,_0x5c29x15){var _0x5c29x16=mxMarker[_0xd587[1621]][_0x5c29x4];return null!= _0x5c29x16?_0x5c29x16(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14,_0x5c29x15):null}};(function(){function _0x5c29x2(_0x5c29x2,_0x5c29x3,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14,_0x5c29x15,_0x5c29x16,_0x5c29x17){_0x5c29x3= 1.118* _0x5c29x12* _0x5c29x16;_0x5c29x15= 1.118* _0x5c29x13* _0x5c29x16;_0x5c29x12*= _0x5c29x14+ _0x5c29x16;_0x5c29x13*= _0x5c29x14+ _0x5c29x16;var _0x5c29x18=_0x5c29xa[_0xd587[238]]();_0x5c29x18[_0xd587[235]]-= _0x5c29x3;_0x5c29x18[_0xd587[236]]-= _0x5c29x15;_0x5c29x14= _0x5c29x9!= mxConstants[_0xd587[1622]]?1:0.75;_0x5c29xa[_0xd587[235]]+= -_0x5c29x12* _0x5c29x14- _0x5c29x3;_0x5c29xa[_0xd587[236]]+= -_0x5c29x13* _0x5c29x14- _0x5c29x15;return function(){_0x5c29x2[_0xd587[1275]]();_0x5c29x2[_0xd587[1276]](_0x5c29x18[_0xd587[235]],_0x5c29x18[_0xd587[236]]);_0x5c29x2[_0xd587[1277]](_0x5c29x18[_0xd587[235]]- _0x5c29x12- _0x5c29x13/ 2,_0x5c29x18[_0xd587[236]]- _0x5c29x13+ _0x5c29x12/ 2);_0x5c29x9== mxConstants[_0xd587[1622]]&& _0x5c29x2[_0xd587[1277]](_0x5c29x18[_0xd587[235]]- 3* _0x5c29x12/ 4,_0x5c29x18[_0xd587[236]]- 3* _0x5c29x13/ 4);_0x5c29x2[_0xd587[1277]](_0x5c29x18[_0xd587[235]]+ _0x5c29x13/ 2- _0x5c29x12,_0x5c29x18[_0xd587[236]]- _0x5c29x13- _0x5c29x12/ 2);_0x5c29x2[_0xd587[268]]();_0x5c29x17?_0x5c29x2[_0xd587[1337]]():_0x5c29x2[_0xd587[1336]]()}}function _0x5c29x3(_0x5c29x2,_0x5c29x3,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14,_0x5c29x15,_0x5c29x16,_0x5c29x17){_0x5c29x15= _0x5c29x9== mxConstants[_0xd587[1623]]?0.7071:0.9862;_0x5c29x3= _0x5c29x12* _0x5c29x16* _0x5c29x15;_0x5c29x15*= _0x5c29x13* _0x5c29x16;_0x5c29x12*= _0x5c29x14+ _0x5c29x16;_0x5c29x13*= _0x5c29x14+ _0x5c29x16;var _0x5c29x18=_0x5c29xa[_0xd587[238]]();_0x5c29x18[_0xd587[235]]-= _0x5c29x3;_0x5c29x18[_0xd587[236]]-= _0x5c29x15;_0x5c29xa[_0xd587[235]]+= -_0x5c29x12- _0x5c29x3;_0x5c29xa[_0xd587[236]]+= -_0x5c29x13- _0x5c29x15;var _0x5c29x19=_0x5c29x9== mxConstants[_0xd587[1623]]?2:3.4;return function(){_0x5c29x2[_0xd587[1275]]();_0x5c29x2[_0xd587[1276]](_0x5c29x18[_0xd587[235]],_0x5c29x18[_0xd587[236]]);_0x5c29x2[_0xd587[1277]](_0x5c29x18[_0xd587[235]]- _0x5c29x12/ 2- _0x5c29x13/ _0x5c29x19,_0x5c29x18[_0xd587[236]]+ _0x5c29x12/ _0x5c29x19- _0x5c29x13/ 2);_0x5c29x2[_0xd587[1277]](_0x5c29x18[_0xd587[235]]- _0x5c29x12,_0x5c29x18[_0xd587[236]]- _0x5c29x13);_0x5c29x2[_0xd587[1277]](_0x5c29x18[_0xd587[235]]- _0x5c29x12/ 2+ _0x5c29x13/ _0x5c29x19,_0x5c29x18[_0xd587[236]]- _0x5c29x13/ 2- _0x5c29x12/ _0x5c29x19);_0x5c29x2[_0xd587[268]]();_0x5c29x17?_0x5c29x2[_0xd587[1337]]():_0x5c29x2[_0xd587[1336]]()}}mxMarker[_0xd587[1624]](_0xd587[693],_0x5c29x2);mxMarker[_0xd587[1624]](_0xd587[694],_0x5c29x2);mxMarker[_0xd587[1624]](_0xd587[392],function(_0x5c29x2,_0x5c29x3,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14,_0x5c29x15,_0x5c29x16,_0x5c29x17){_0x5c29x3= 1.118* _0x5c29x12* _0x5c29x16;_0x5c29x9= 1.118* _0x5c29x13* _0x5c29x16;_0x5c29x12*= _0x5c29x14+ _0x5c29x16;_0x5c29x13*= _0x5c29x14+ _0x5c29x16;var _0x5c29x18=_0x5c29xa[_0xd587[238]]();_0x5c29x18[_0xd587[235]]-= _0x5c29x3;_0x5c29x18[_0xd587[236]]-= _0x5c29x9;_0x5c29xa[_0xd587[235]]+= 2*  -_0x5c29x3;_0x5c29xa[_0xd587[236]]+= 2*  -_0x5c29x9;return function(){_0x5c29x2[_0xd587[1275]]();_0x5c29x2[_0xd587[1276]](_0x5c29x18[_0xd587[235]]- _0x5c29x12- _0x5c29x13/ 2,_0x5c29x18[_0xd587[236]]- _0x5c29x13+ _0x5c29x12/ 2);_0x5c29x2[_0xd587[1277]](_0x5c29x18[_0xd587[235]],_0x5c29x18[_0xd587[236]]);_0x5c29x2[_0xd587[1277]](_0x5c29x18[_0xd587[235]]+ _0x5c29x13/ 2- _0x5c29x12,_0x5c29x18[_0xd587[236]]- _0x5c29x13- _0x5c29x12/ 2);_0x5c29x2[_0xd587[1336]]()}});mxMarker[_0xd587[1624]](_0xd587[695],function(_0x5c29x2,_0x5c29x3,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14,_0x5c29x15,_0x5c29x16,_0x5c29x17){var _0x5c29x18=_0x5c29x14/ 2,_0x5c29x19=_0x5c29xa[_0xd587[238]]();_0x5c29xa[_0xd587[235]]-= _0x5c29x12* _0x5c29x18;_0x5c29xa[_0xd587[236]]-= _0x5c29x13* _0x5c29x18;return function(){_0x5c29x2[_0xd587[680]](_0x5c29x19[_0xd587[235]]- _0x5c29x18,_0x5c29x19[_0xd587[236]]- _0x5c29x18,_0x5c29x14,_0x5c29x14);_0x5c29x17?_0x5c29x2[_0xd587[1337]]():_0x5c29x2[_0xd587[1336]]()}});mxMarker[_0xd587[1624]](_0xd587[696],_0x5c29x3);mxMarker[_0xd587[1624]](_0xd587[697],_0x5c29x3)})();function mxActor(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){mxShape[_0xd587[239]](this);this[_0xd587[1562]]= _0x5c29x2;this[_0xd587[1334]]= _0x5c29x3;this[_0xd587[1336]]= _0x5c29x4;this[_0xd587[1307]]= null!= _0x5c29x5?_0x5c29x5:1}mxUtils[_0xd587[1284]](mxActor,mxShape);mxActor[_0xd587[202]][_0xd587[1595]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x2[_0xd587[513]](_0x5c29x3,_0x5c29x4);_0x5c29x2[_0xd587[1275]]();this[_0xd587[1625]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9);_0x5c29x2[_0xd587[1337]]()};mxActor[_0xd587[202]][_0xd587[1625]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x3= _0x5c29x5/ 3;_0x5c29x2[_0xd587[1276]](0,_0x5c29x9);_0x5c29x2[_0xd587[1279]](0,3* _0x5c29x9/ 5,0,2* _0x5c29x9/ 5,_0x5c29x5/ 2,2* _0x5c29x9/ 5);_0x5c29x2[_0xd587[1279]](_0x5c29x5/ 2- _0x5c29x3,2* _0x5c29x9/ 5,_0x5c29x5/ 2- _0x5c29x3,0,_0x5c29x5/ 2,0);_0x5c29x2[_0xd587[1279]](_0x5c29x5/ 2+ _0x5c29x3,0,_0x5c29x5/ 2+ _0x5c29x3,2* _0x5c29x9/ 5,_0x5c29x5/ 2,2* _0x5c29x9/ 5);_0x5c29x2[_0xd587[1279]](_0x5c29x5,2* _0x5c29x9/ 5,_0x5c29x5,3* _0x5c29x9/ 5,_0x5c29x5,_0x5c29x9);_0x5c29x2[_0xd587[268]]()};function mxCloud(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){mxActor[_0xd587[239]](this);this[_0xd587[1562]]= _0x5c29x2;this[_0xd587[1334]]= _0x5c29x3;this[_0xd587[1336]]= _0x5c29x4;this[_0xd587[1307]]= null!= _0x5c29x5?_0x5c29x5:1}mxUtils[_0xd587[1284]](mxCloud,mxActor);mxCloud[_0xd587[202]][_0xd587[1625]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x2[_0xd587[1276]](0.25* _0x5c29x5,0.25* _0x5c29x9);_0x5c29x2[_0xd587[1279]](0.05* _0x5c29x5,0.25* _0x5c29x9,0,0.5* _0x5c29x9,0.16* _0x5c29x5,0.55* _0x5c29x9);_0x5c29x2[_0xd587[1279]](0,0.66* _0x5c29x9,0.18* _0x5c29x5,0.9* _0x5c29x9,0.31* _0x5c29x5,0.8* _0x5c29x9);_0x5c29x2[_0xd587[1279]](0.4* _0x5c29x5,_0x5c29x9,0.7* _0x5c29x5,_0x5c29x9,0.8* _0x5c29x5,0.8* _0x5c29x9);_0x5c29x2[_0xd587[1279]](_0x5c29x5,0.8* _0x5c29x9,_0x5c29x5,0.6* _0x5c29x9,0.875* _0x5c29x5,0.5* _0x5c29x9);_0x5c29x2[_0xd587[1279]](_0x5c29x5,0.3* _0x5c29x9,0.8* _0x5c29x5,0.1* _0x5c29x9,0.625* _0x5c29x5,0.2* _0x5c29x9);_0x5c29x2[_0xd587[1279]](0.5* _0x5c29x5,0.05* _0x5c29x9,0.3* _0x5c29x5,0.05* _0x5c29x9,0.25* _0x5c29x5,0.25* _0x5c29x9);_0x5c29x2[_0xd587[268]]()};function mxRectangleShape(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){mxShape[_0xd587[239]](this);this[_0xd587[1562]]= _0x5c29x2;this[_0xd587[1334]]= _0x5c29x3;this[_0xd587[1336]]= _0x5c29x4;this[_0xd587[1307]]= null!= _0x5c29x5?_0x5c29x5:1}mxUtils[_0xd587[1284]](mxRectangleShape,mxShape);mxRectangleShape[_0xd587[202]][_0xd587[1567]]= function(){return !this[_0xd587[1606]]&& !this[_0xd587[617]]&& 0== this[_0xd587[603]]};mxRectangleShape[_0xd587[202]][_0xd587[1601]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){if(this[_0xd587[1606]]){var _0x5c29xa=mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_ARCSIZE,100* mxConstants[_0xd587[1557]])/ 100,_0x5c29xa=Math[_0xd587[243]](_0x5c29x5* _0x5c29xa,_0x5c29x9* _0x5c29xa);_0x5c29x2[_0xd587[1320]](_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29xa)}else {_0x5c29x2[_0xd587[1319]](_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9)};_0x5c29x2[_0xd587[1337]]()};mxRectangleShape[_0xd587[202]][_0xd587[1602]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){this[_0xd587[617]]&& this[_0xd587[1604]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,this[_0xd587[1603]](_0x5c29x5+ this[_0xd587[1307]],_0x5c29x9+ this[_0xd587[1307]]))};mxRectangleShape[_0xd587[202]][_0xd587[1575]]= function(){this[_0xd587[1626]](this[_0xd587[252]]);this[_0xd587[1627]](this[_0xd587[252]]);this[_0xd587[1628]](this[_0xd587[252]])};mxRectangleShape[_0xd587[202]][_0xd587[1626]]= function(_0x5c29x2){var _0x5c29x3=9<= document[_0xd587[5]]?0:Math[_0xd587[430]](this[_0xd587[1307]]* this[_0xd587[255]]);_0x5c29x2[_0xd587[124]][_0xd587[1629]]= Math[_0xd587[160]](1,_0x5c29x3)+ _0xd587[168];_0x5c29x2[_0xd587[124]][_0xd587[277]]= _0xd587[188];_0x5c29x2[_0xd587[124]][_0xd587[361]]= Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[235]]- _0x5c29x3/ 2)+ _0xd587[168];_0x5c29x2[_0xd587[124]][_0xd587[125]]= Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[236]]- _0x5c29x3/ 2)+ _0xd587[168];_0xd587[462]== document[_0xd587[135]]&& (_0x5c29x3=  -_0x5c29x3);_0x5c29x2[_0xd587[124]][_0xd587[117]]= Math[_0xd587[488]](Math[_0xd587[160]](0,this[_0xd587[1562]][_0xd587[117]]+ _0x5c29x3))+ _0xd587[168];_0x5c29x2[_0xd587[124]][_0xd587[119]]= Math[_0xd587[488]](Math[_0xd587[160]](0,this[_0xd587[1562]][_0xd587[119]]+ _0x5c29x3))+ _0xd587[168]};mxRectangleShape[_0xd587[202]][_0xd587[1628]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1336]];null!= _0x5c29x3&& _0x5c29x3!= mxConstants[_0xd587[217]]?(_0x5c29x2[_0xd587[124]][_0xd587[1630]]= _0x5c29x3,this[_0xd587[1522]]?_0x5c29x2[_0xd587[124]][_0xd587[465]]= _0xd587[648]:0< this[_0xd587[1307]]&& (_0x5c29x2[_0xd587[124]][_0xd587[465]]= _0xd587[1631]),_0x5c29x2[_0xd587[124]][_0xd587[1629]]= Math[_0xd587[160]](1,Math[_0xd587[430]](this[_0xd587[1307]]* this[_0xd587[255]]))+ _0xd587[168]):_0x5c29x2[_0xd587[124]][_0xd587[1629]]= _0xd587[946];_0x5c29x3= this[_0xd587[1334]];null!= _0x5c29x3&& _0x5c29x3!= mxConstants[_0xd587[217]]?(_0x5c29x2[_0xd587[124]][_0xd587[1028]]= _0x5c29x3,_0x5c29x2[_0xd587[124]][_0xd587[1617]]= _0xd587[130]):this[_0xd587[1229]]?_0x5c29x2[_0xd587[124]][_0xd587[1028]]= _0xd587[1373]:8== document[_0xd587[5]]?mxUtils[_0xd587[1584]](_0x5c29x2):this[_0xd587[1600]](_0x5c29x2)};mxRectangleShape[_0xd587[202]][_0xd587[1627]]= function(_0x5c29x2){var _0x5c29x3=_0xd587[110];100> this[_0xd587[461]]&& (_0x5c29x3+= _0xd587[459]+ this[_0xd587[461]]+ _0xd587[460]);this[_0xd587[1596]]&& (_0x5c29x3+= _0xd587[1632]+ Math[_0xd587[488]](mxConstants[_0xd587[1237]]* this[_0xd587[255]])+ _0xd587[1633]+ Math[_0xd587[488]](mxConstants[_0xd587[1238]]* this[_0xd587[255]])+ _0xd587[1634]+ mxConstants[_0xd587[1235]]+ _0xd587[1635]);if(this[_0xd587[1299]]){var _0x5c29x4=this[_0xd587[1334]],_0x5c29x5=this[_0xd587[1299]],_0x5c29x9=_0xd587[468],_0x5c29xa={east:0,south:1,west:2,north:3},_0x5c29x12=null!= this[_0xd587[663]]?_0x5c29xa[this[_0xd587[663]]]:0;null!= this[_0xd587[607]]&& (_0x5c29x12= mxUtils[_0xd587[1454]](_0x5c29x12+ _0x5c29xa[this[_0xd587[607]]]- 1,4));1== _0x5c29x12?(_0x5c29x9= _0xd587[500],_0x5c29xa= _0x5c29x4,_0x5c29x4= _0x5c29x5,_0x5c29x5= _0x5c29xa):2== _0x5c29x12?(_0x5c29xa= _0x5c29x4,_0x5c29x4= _0x5c29x5,_0x5c29x5= _0x5c29xa):3== _0x5c29x12&& (_0x5c29x9= _0xd587[500]);_0x5c29x3+= _0xd587[1636]+ _0x5c29x4+ _0xd587[1637]+ _0x5c29x5+ _0xd587[1638]+ _0x5c29x9+ _0xd587[1635]};_0x5c29x2[_0xd587[124]][_0xd587[347]]= _0x5c29x3};function mxEllipse(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){mxShape[_0xd587[239]](this);this[_0xd587[1562]]= _0x5c29x2;this[_0xd587[1334]]= _0x5c29x3;this[_0xd587[1336]]= _0x5c29x4;this[_0xd587[1307]]= null!= _0x5c29x5?_0x5c29x5:1}mxUtils[_0xd587[1284]](mxEllipse,mxShape);mxEllipse[_0xd587[202]][_0xd587[1595]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x2[_0xd587[680]](_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9);_0x5c29x2[_0xd587[1337]]()};function mxDoubleEllipse(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){mxShape[_0xd587[239]](this);this[_0xd587[1562]]= _0x5c29x2;this[_0xd587[1334]]= _0x5c29x3;this[_0xd587[1336]]= _0x5c29x4;this[_0xd587[1307]]= null!= _0x5c29x5?_0x5c29x5:1}mxUtils[_0xd587[1284]](mxDoubleEllipse,mxShape);mxDoubleEllipse[_0xd587[202]][_0xd587[1460]]= 10;mxDoubleEllipse[_0xd587[202]][_0xd587[1601]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x2[_0xd587[680]](_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9);_0x5c29x2[_0xd587[1337]]()};mxDoubleEllipse[_0xd587[202]][_0xd587[1602]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=Math[_0xd587[243]](4,Math[_0xd587[243]](_0x5c29x5/ 5,_0x5c29x9/ 5));_0x5c29x5-= 2* _0x5c29xa;_0x5c29x9-= 2* _0x5c29xa;0< _0x5c29x5&& 0< _0x5c29x9&& _0x5c29x2[_0xd587[680]](_0x5c29x3+ _0x5c29xa,_0x5c29x4+ _0x5c29xa,_0x5c29x5,_0x5c29x9);_0x5c29x2[_0xd587[1336]]()};function mxRhombus(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){mxShape[_0xd587[239]](this);this[_0xd587[1562]]= _0x5c29x2;this[_0xd587[1334]]= _0x5c29x3;this[_0xd587[1336]]= _0x5c29x4;this[_0xd587[1307]]= null!= _0x5c29x5?_0x5c29x5:1}mxUtils[_0xd587[1284]](mxRhombus,mxShape);mxRhombus[_0xd587[202]][_0xd587[1595]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=_0x5c29x5/ 2,_0x5c29x12=_0x5c29x9/ 2;_0x5c29x2[_0xd587[1275]]();_0x5c29x2[_0xd587[1276]](_0x5c29x3+ _0x5c29xa,_0x5c29x4);_0x5c29x2[_0xd587[1277]](_0x5c29x3+ _0x5c29x5,_0x5c29x4+ _0x5c29x12);_0x5c29x2[_0xd587[1277]](_0x5c29x3+ _0x5c29xa,_0x5c29x4+ _0x5c29x9);_0x5c29x2[_0xd587[1277]](_0x5c29x3,_0x5c29x4+ _0x5c29x12);_0x5c29x2[_0xd587[268]]();_0x5c29x2[_0xd587[1337]]()};function mxPolyline(_0x5c29x2,_0x5c29x3,_0x5c29x4){mxShape[_0xd587[239]](this);this[_0xd587[1525]]= _0x5c29x2;this[_0xd587[1336]]= _0x5c29x3;this[_0xd587[1307]]= null!= _0x5c29x4?_0x5c29x4:1}mxUtils[_0xd587[1284]](mxPolyline,mxShape);mxPolyline[_0xd587[202]][_0xd587[1614]]= function(){return 0};mxPolyline[_0xd587[202]][_0xd587[1594]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[1639]](_0x5c29x2,_0x5c29x3,this[_0xd587[1606]])};mxPolyline[_0xd587[202]][_0xd587[1639]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ 2,_0x5c29x9=_0x5c29x3[0],_0x5c29xa=_0x5c29x3[_0x5c29x3[_0xd587[67]]- 1];_0x5c29x2[_0xd587[1275]]();_0x5c29x2[_0xd587[1276]](_0x5c29x9[_0xd587[235]],_0x5c29x9[_0xd587[236]]);for(var _0x5c29x12=1;_0x5c29x12< _0x5c29x3[_0xd587[67]]- 1;_0x5c29x12++){var _0x5c29x13=_0x5c29x3[_0x5c29x12],_0x5c29x14=_0x5c29x9[_0xd587[235]]- _0x5c29x13[_0xd587[235]],_0x5c29x9=_0x5c29x9[_0xd587[236]]- _0x5c29x13[_0xd587[236]];if(_0x5c29x4&& _0x5c29x12< _0x5c29x3[_0xd587[67]]- 1&& (0!= _0x5c29x14|| 0!= _0x5c29x9)){var _0x5c29x15=Math[_0xd587[428]](_0x5c29x14* _0x5c29x14+ _0x5c29x9* _0x5c29x9),_0x5c29x14=_0x5c29x14* Math[_0xd587[243]](_0x5c29x5,_0x5c29x15/ 2)/ _0x5c29x15,_0x5c29x9=_0x5c29x9* Math[_0xd587[243]](_0x5c29x5,_0x5c29x15/ 2)/ _0x5c29x15;_0x5c29x2[_0xd587[1277]](_0x5c29x13[_0xd587[235]]+ _0x5c29x14,_0x5c29x13[_0xd587[236]]+ _0x5c29x9);_0x5c29x9= _0x5c29x3[_0x5c29x12+ 1];_0x5c29x14= _0x5c29x9[_0xd587[235]]- _0x5c29x13[_0xd587[235]];_0x5c29x9= _0x5c29x9[_0xd587[236]]- _0x5c29x13[_0xd587[236]];_0x5c29x15= Math[_0xd587[160]](1,Math[_0xd587[428]](_0x5c29x14* _0x5c29x14+ _0x5c29x9* _0x5c29x9));_0x5c29x14= _0x5c29x14* Math[_0xd587[243]](_0x5c29x5,_0x5c29x15/ 2)/ _0x5c29x15;_0x5c29x9= _0x5c29x9* Math[_0xd587[243]](_0x5c29x5,_0x5c29x15/ 2)/ _0x5c29x15;_0x5c29x14= _0x5c29x13[_0xd587[235]]+ _0x5c29x14;_0x5c29x9= _0x5c29x13[_0xd587[236]]+ _0x5c29x9;_0x5c29x2[_0xd587[1278]](_0x5c29x13[_0xd587[235]],_0x5c29x13[_0xd587[236]],_0x5c29x14,_0x5c29x9);_0x5c29x13=  new mxPoint(_0x5c29x14,_0x5c29x9)}else {_0x5c29x2[_0xd587[1277]](_0x5c29x13[_0xd587[235]],_0x5c29x13[_0xd587[236]])};_0x5c29x9= _0x5c29x13};_0x5c29x2[_0xd587[1277]](_0x5c29xa[_0xd587[235]],_0x5c29xa[_0xd587[236]]);_0x5c29x2[_0xd587[1336]]()};function mxArrow(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12){mxShape[_0xd587[239]](this);this[_0xd587[1525]]= _0x5c29x2;this[_0xd587[1334]]= _0x5c29x3;this[_0xd587[1336]]= _0x5c29x4;this[_0xd587[1307]]= null!= _0x5c29x5?_0x5c29x5:1;this[_0xd587[1640]]= null!= _0x5c29x9?_0x5c29x9:mxConstants[_0xd587[1641]];this[_0xd587[657]]= null!= _0x5c29xa?_0x5c29xa:mxConstants[_0xd587[1642]];this[_0xd587[643]]= null!= _0x5c29x12?_0x5c29x12:mxConstants[_0xd587[1643]]}mxUtils[_0xd587[1284]](mxArrow,mxShape);mxArrow[_0xd587[202]][_0xd587[1594]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=mxConstants[_0xd587[1642]],_0x5c29x5=mxConstants[_0xd587[1641]],_0x5c29x9=mxConstants[_0xd587[1643]],_0x5c29xa=_0x5c29x3[0],_0x5c29x12=_0x5c29x3[_0x5c29x3[_0xd587[67]]- 1],_0x5c29x13=_0x5c29x12[_0xd587[235]]- _0x5c29xa[_0xd587[235]],_0x5c29x14=_0x5c29x12[_0xd587[236]]- _0x5c29xa[_0xd587[236]],_0x5c29x15=Math[_0xd587[428]](_0x5c29x13* _0x5c29x13+ _0x5c29x14* _0x5c29x14),_0x5c29x16=_0x5c29x15- 2* _0x5c29x4- _0x5c29x9,_0x5c29x13=_0x5c29x13/ _0x5c29x15,_0x5c29x14=_0x5c29x14/ _0x5c29x15,_0x5c29x15=_0x5c29x5* _0x5c29x14/ 3,_0x5c29x5=-_0x5c29x5* _0x5c29x13/ 3,_0x5c29x9=_0x5c29xa[_0xd587[235]]- _0x5c29x15/ 2+ _0x5c29x4* _0x5c29x13,_0x5c29xa=_0x5c29xa[_0xd587[236]]- _0x5c29x5/ 2+ _0x5c29x4* _0x5c29x14,_0x5c29x17=_0x5c29x9+ _0x5c29x15,_0x5c29x18=_0x5c29xa+ _0x5c29x5,_0x5c29x19=_0x5c29x17+ _0x5c29x16* _0x5c29x13,_0x5c29x16=_0x5c29x18+ _0x5c29x16* _0x5c29x14,_0x5c29x1a=_0x5c29x19+ _0x5c29x15,_0x5c29x1b=_0x5c29x16+ _0x5c29x5,_0x5c29x1c=_0x5c29x1a- 3* _0x5c29x15,_0x5c29x1d=_0x5c29x1b- 3* _0x5c29x5;_0x5c29x2[_0xd587[1275]]();_0x5c29x2[_0xd587[1276]](_0x5c29x9,_0x5c29xa);_0x5c29x2[_0xd587[1277]](_0x5c29x17,_0x5c29x18);_0x5c29x2[_0xd587[1277]](_0x5c29x19,_0x5c29x16);_0x5c29x2[_0xd587[1277]](_0x5c29x1a,_0x5c29x1b);_0x5c29x2[_0xd587[1277]](_0x5c29x12[_0xd587[235]]- _0x5c29x4* _0x5c29x13,_0x5c29x12[_0xd587[236]]- _0x5c29x4* _0x5c29x14);_0x5c29x2[_0xd587[1277]](_0x5c29x1c,_0x5c29x1d);_0x5c29x2[_0xd587[1277]](_0x5c29x1c+ _0x5c29x15,_0x5c29x1d+ _0x5c29x5);_0x5c29x2[_0xd587[268]]();_0x5c29x2[_0xd587[1337]]()};function mxText(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14,_0x5c29x15,_0x5c29x16,_0x5c29x17,_0x5c29x18,_0x5c29x19,_0x5c29x1a,_0x5c29x1b,_0x5c29x1c,_0x5c29x1d,_0x5c29x1e,_0x5c29x1f){mxShape[_0xd587[239]](this);this[_0xd587[131]]= _0x5c29x2;this[_0xd587[1562]]= _0x5c29x3;this[_0xd587[352]]= null!= _0x5c29x9?_0x5c29x9:_0xd587[586];this[_0xd587[611]]= null!= _0x5c29x4?_0x5c29x4:_0xd587[110];this[_0xd587[552]]= null!= _0x5c29x5?_0x5c29x5:_0xd587[110];this[_0xd587[1288]]= null!= _0x5c29xa?_0x5c29xa:mxConstants[_0xd587[484]];this[_0xd587[803]]= null!= _0x5c29x12?_0x5c29x12:mxConstants[_0xd587[483]];this[_0xd587[666]]= null!= _0x5c29x13?_0x5c29x13:mxConstants[_0xd587[1644]];this[_0xd587[657]]= parseInt(_0x5c29x14|| 2);this[_0xd587[658]]= this[_0xd587[657]]+ parseInt(_0x5c29x15|| 0);this[_0xd587[661]]= this[_0xd587[657]]+ parseInt(_0x5c29x16|| 0);this[_0xd587[660]]= this[_0xd587[657]]+ parseInt(_0x5c29x17|| 0);this[_0xd587[659]]= this[_0xd587[657]]+ parseInt(_0x5c29x18|| 0);this[_0xd587[662]]= null!= _0x5c29x19?_0x5c29x19:!0;this[_0xd587[1537]]= _0x5c29x1a;this[_0xd587[467]]= _0x5c29x1b;this[_0xd587[1333]]= null!= _0x5c29x1c?_0x5c29x1c:!1;this[_0xd587[1645]]= null!= _0x5c29x1d?_0x5c29x1d:!1;this[_0xd587[277]]= null!= _0x5c29x1e?_0x5c29x1e:_0xd587[189];this[_0xd587[629]]= null!= _0x5c29x1f?_0x5c29x1f:0;this[_0xd587[603]]= 0}mxUtils[_0xd587[1284]](mxText,mxShape);mxText[_0xd587[202]][_0xd587[1646]]= 0;mxText[_0xd587[202]][_0xd587[1647]]= 0;mxText[_0xd587[202]][_0xd587[1648]]= 0;mxText[_0xd587[202]][_0xd587[1649]]= 0;mxText[_0xd587[202]][_0xd587[1650]]=  !0;mxText[_0xd587[202]][_0xd587[1616]]=  -90;mxText[_0xd587[202]][_0xd587[1651]]=  !0;mxText[_0xd587[202]][_0xd587[1652]]=  !1;mxText[_0xd587[202]][_0xd587[1566]]= function(){return !1};mxText[_0xd587[202]][_0xd587[1567]]= function(){return 8!= document[_0xd587[5]]};mxText[_0xd587[202]][_0xd587[1568]]= function(){return 0};mxText[_0xd587[202]][_0xd587[1574]]= function(){return null!= this[_0xd587[1562]]&& !isNaN(this[_0xd587[1562]][_0xd587[235]])&& !isNaN(this[_0xd587[1562]][_0xd587[236]])&& !isNaN(this[_0xd587[1562]][_0xd587[117]])&& !isNaN(this[_0xd587[1562]][_0xd587[119]])};mxText[_0xd587[202]][_0xd587[1577]]= function(){var _0x5c29x2=this[_0xd587[252]];8== document[_0xd587[5]]&& null!= _0x5c29x2[_0xd587[285]]&& (_0x5c29x2= _0x5c29x2[_0xd587[285]],null!= _0x5c29x2[_0xd587[285]]&& (_0x5c29x2= _0x5c29x2[_0xd587[285]]));this[_0xd587[1563]]= this[_0xd587[1562]][_0xd587[238]]();var _0x5c29x3=this[_0xd587[1615]]();if(!this[_0xd587[1652]]&& null!= _0x5c29x2&& _0xd587[1334]!= this[_0xd587[277]]&& (!this[_0xd587[1645]]|| !this[_0xd587[1651]])){var _0x5c29x4=null,_0x5c29x5=null;if(null!= _0x5c29x2[_0xd587[538]]){if(null!= _0x5c29x2[_0xd587[285]]&& null!= _0x5c29x2[_0xd587[285]][_0xd587[285]]&& _0xd587[1435]== _0x5c29x2[_0xd587[285]][_0xd587[285]][_0xd587[301]]){_0x5c29x2= _0x5c29x2[_0xd587[285]][_0xd587[285]],_0x5c29x4= this[_0xd587[1333]]?this[_0xd587[1562]][_0xd587[117]]:parseInt(_0x5c29x2[_0xd587[284]](_0xd587[117]))* this[_0xd587[255]],_0x5c29x5= parseInt(_0x5c29x2[_0xd587[284]](_0xd587[119]))* this[_0xd587[255]]}else {_0x5c29x3= _0x5c29x2[_0xd587[1451]]();if(0== _0x5c29x3[_0xd587[117]]&& 0== _0x5c29x3[_0xd587[119]]){return};this[_0xd587[1563]]=  new mxRectangle(_0x5c29x3[_0xd587[235]],_0x5c29x3[_0xd587[236]],_0x5c29x3[_0xd587[117]],_0x5c29x3[_0xd587[119]]);_0x5c29x3= 0}}else {_0x5c29x5= this[_0xd587[724]][_0xd587[441]][_0xd587[1653]],null!= this[_0xd587[359]]&& null!= this[_0xd587[167]]?(_0x5c29x4= this[_0xd587[1333]]?this[_0xd587[1562]][_0xd587[117]]:this[_0xd587[359]]* this[_0xd587[255]],_0x5c29x5= this[_0xd587[167]]* this[_0xd587[255]]):null!= _0x5c29x5?(this[_0xd587[1441]](_0x5c29x5),this[_0xd587[1654]](_0x5c29x5),mxUtils[_0xd587[1331]](this[_0xd587[131]])?_0x5c29x5[_0xd587[339]]= this[_0xd587[131]][_0xd587[342]]:(_0x5c29x4= this[_0xd587[1650]]?this[_0xd587[131]][_0xd587[230]](/\n/g,_0xd587[1453]):this[_0xd587[131]],_0x5c29x5[_0xd587[339]]= _0x5c29x4),_0x5c29x4= this[_0xd587[1333]]?this[_0xd587[1562]][_0xd587[117]]:_0x5c29x5[_0xd587[359]]* this[_0xd587[255]],_0x5c29x5= _0x5c29x5[_0xd587[167]]* this[_0xd587[255]]):(_0x5c29x4= this[_0xd587[1333]]?this[_0xd587[1562]][_0xd587[117]]:_0x5c29x2[_0xd587[359]]* this[_0xd587[255]],_0x5c29x5= _0x5c29x2[_0xd587[167]]* this[_0xd587[255]])};null!= _0x5c29x4&& null!= _0x5c29x5&& (this[_0xd587[1563]]=  new mxRectangle(this[_0xd587[1562]][_0xd587[235]]+ this[_0xd587[1655]][_0xd587[235]]* _0x5c29x4,this[_0xd587[1562]][_0xd587[236]]+ this[_0xd587[1655]][_0xd587[236]]* _0x5c29x5,_0x5c29x4,_0x5c29x5))}else {this[_0xd587[1563]][_0xd587[235]]+= this[_0xd587[1655]][_0xd587[235]]* this[_0xd587[1563]][_0xd587[117]],this[_0xd587[1563]][_0xd587[236]]+= this[_0xd587[1655]][_0xd587[236]]* this[_0xd587[1563]][_0xd587[119]]};null!= this[_0xd587[1563]]&& (0!= _0x5c29x3&& (_0x5c29x3= mxUtils[_0xd587[1613]](this[_0xd587[1563]],_0x5c29x3),this[_0xd587[1563]][_0xd587[235]]= _0x5c29x3[_0xd587[235]],this[_0xd587[1563]][_0xd587[236]]= _0x5c29x3[_0xd587[236]],mxClient[_0xd587[496]]|| (this[_0xd587[1563]][_0xd587[117]]= _0x5c29x3[_0xd587[117]],this[_0xd587[1563]][_0xd587[119]]= _0x5c29x3[_0xd587[119]])),this[_0xd587[1563]][_0xd587[235]]= Math[_0xd587[519]](this[_0xd587[1563]][_0xd587[235]]),this[_0xd587[1563]][_0xd587[236]]= Math[_0xd587[519]](this[_0xd587[1563]][_0xd587[236]]),this[_0xd587[1563]][_0xd587[117]]= Math[_0xd587[430]](this[_0xd587[1563]][_0xd587[117]]),this[_0xd587[1563]][_0xd587[119]]= Math[_0xd587[430]](this[_0xd587[1563]][_0xd587[119]]))};mxText[_0xd587[202]][_0xd587[1598]]= function(){return 0};mxText[_0xd587[202]][_0xd587[1615]]= function(){return null!= this[_0xd587[724]]&& null!= this[_0xd587[724]][_0xd587[253]]?this[_0xd587[724]][_0xd587[253]][_0xd587[1615]]():0};mxText[_0xd587[202]][_0xd587[1590]]= function(){return !this[_0xd587[662]]&& null!= this[_0xd587[724]]&& this[_0xd587[724]][_0xd587[441]][_0xd587[1179]][_0xd587[251]][_0xd587[1193]](this[_0xd587[724]][_0xd587[246]])};mxText[_0xd587[202]][_0xd587[1592]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){mxShape[_0xd587[202]][_0xd587[1592]][_0xd587[183]](this,arguments);_0x5c29x2[_0xd587[1259]](this[_0xd587[352]]);_0x5c29x2[_0xd587[1260]](this[_0xd587[1537]]);_0x5c29x2[_0xd587[1262]](this[_0xd587[467]]);_0x5c29x2[_0xd587[1265]](this[_0xd587[1288]]);_0x5c29x2[_0xd587[1264]](this[_0xd587[803]]);_0x5c29x2[_0xd587[1266]](this[_0xd587[666]])};mxText[_0xd587[202]][_0xd587[1586]]= function(){this[_0xd587[252]][_0xd587[124]][_0xd587[361]]= Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[235]])+ _0xd587[168];this[_0xd587[252]][_0xd587[124]][_0xd587[125]]= Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[236]])+ _0xd587[168];this[_0xd587[252]][_0xd587[124]][_0xd587[117]]= _0xd587[942];this[_0xd587[252]][_0xd587[124]][_0xd587[119]]= _0xd587[942];this[_0xd587[252]][_0xd587[124]][_0xd587[277]]= _0xd587[189]};mxText[_0xd587[202]][_0xd587[1209]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[255]],_0x5c29x4=this[_0xd587[1562]][_0xd587[235]]/ _0x5c29x3,_0x5c29x5=this[_0xd587[1562]][_0xd587[236]]/ _0x5c29x3,_0x5c29x9=this[_0xd587[1562]][_0xd587[117]]/ _0x5c29x3,_0x5c29x3=this[_0xd587[1562]][_0xd587[119]]/ _0x5c29x3;this[_0xd587[1591]](_0x5c29x2,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29x3);this[_0xd587[1592]](_0x5c29x2,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29x3);var _0x5c29xa=mxUtils[_0xd587[1331]](this[_0xd587[131]])|| this[_0xd587[507]]== mxConstants[_0xd587[1656]],_0x5c29x12=_0x5c29xa|| _0x5c29x2 instanceof  mxVmlCanvas2D?_0xd587[1428]:_0xd587[110],_0x5c29x13=this[_0xd587[131]];!_0x5c29xa&& _0xd587[1428]== _0x5c29x12&& (_0x5c29x13= mxUtils[_0xd587[321]](_0x5c29x13,!1));_0x5c29x13= !mxUtils[_0xd587[1331]](this[_0xd587[131]])&& this[_0xd587[1650]]&& _0xd587[1428]== _0x5c29x12?_0x5c29x13[_0xd587[230]](/\n/g,_0xd587[1453]):_0x5c29x13;_0x5c29x2[_0xd587[963]](_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29x3,_0x5c29x13,this[_0xd587[611]],this[_0xd587[552]],this[_0xd587[1333]],_0x5c29x12,_0xd587[1334]== this[_0xd587[277]],this[_0xd587[1645]],this[_0xd587[1615]]())};mxText[_0xd587[202]][_0xd587[1575]]= function(){var _0x5c29x2=this[_0xd587[252]][_0xd587[124]];_0x5c29x2[_0xd587[461]]= 1> this[_0xd587[461]]?this[_0xd587[461]]:_0xd587[110];_0x5c29x2[_0xd587[277]]= _0xd587[110];_0x5c29x2[_0xd587[117]]= _0xd587[110];_0x5c29x2[_0xd587[119]]= _0xd587[110];this[_0xd587[1441]](this[_0xd587[252]]);this[_0xd587[1654]](this[_0xd587[252]]);this[_0xd587[1657]]();this[_0xd587[167]]= this[_0xd587[359]]= null;null!= mxClient[_0xd587[73]]?this[_0xd587[1658]]():this[_0xd587[1659]]()};mxText[_0xd587[202]][_0xd587[1658]]= function(){var _0x5c29x2=this[_0xd587[1615]](),_0x5c29x3=this[_0xd587[252]][_0xd587[124]],_0x5c29x4=this[_0xd587[1655]][_0xd587[235]],_0x5c29x5=this[_0xd587[1655]][_0xd587[236]];0!= _0x5c29x2?(_0x5c29x3[mxClient[_0xd587[73]]+ _0xd587[1660]]= 100* -_0x5c29x4+ _0xd587[1661]+ 100* -_0x5c29x5+ _0xd587[229],_0x5c29x3[mxClient[_0xd587[73]]+ _0xd587[1662]]= _0xd587[536]+ 100* _0x5c29x4+ _0xd587[1663]+ 100* _0x5c29x5+ _0xd587[1664]+ this[_0xd587[255]]+ _0xd587[1665]+ _0x5c29x2+ _0xd587[1666]):(_0x5c29x3[mxClient[_0xd587[73]]+ _0xd587[1660]]= _0xd587[1667],_0x5c29x3[mxClient[_0xd587[73]]+ _0xd587[1662]]= _0xd587[1402]+ this[_0xd587[255]]+ _0xd587[1393]+ 100* _0x5c29x4+ _0xd587[1663]+ 100* _0x5c29x5+ _0xd587[1668]);_0x5c29x3[_0xd587[361]]= Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[235]])+ _0xd587[168];_0x5c29x3[_0xd587[125]]= Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[236]])+ _0xd587[168]};mxText[_0xd587[202]][_0xd587[1659]]= function(){var _0x5c29x2=this[_0xd587[252]][_0xd587[124]],_0x5c29x3=this[_0xd587[1655]][_0xd587[235]],_0x5c29x4=this[_0xd587[1655]][_0xd587[236]],_0x5c29x5=this[_0xd587[255]];_0x5c29x2[_0xd587[347]]= _0xd587[110];var _0x5c29x9=0,_0x5c29xa=0,_0x5c29x12=null!= this[_0xd587[724]]?this[_0xd587[724]][_0xd587[441]][_0xd587[1653]]:null;if(null!= _0x5c29x12){_0x5c29x12[_0xd587[124]][_0xd587[277]]= _0xd587[110];_0x5c29x12[_0xd587[124]][_0xd587[119]]= _0xd587[110];_0x5c29x12[_0xd587[124]][_0xd587[117]]= _0xd587[110];this[_0xd587[1441]](_0x5c29x12);this[_0xd587[1654]](_0x5c29x12);if(mxUtils[_0xd587[1331]](this[_0xd587[131]])){_0x5c29x12[_0xd587[339]]= this[_0xd587[131]][_0xd587[342]]}else {var _0x5c29x13=this[_0xd587[131]];this[_0xd587[507]]!= mxConstants[_0xd587[1656]]&& (_0x5c29x13= mxUtils[_0xd587[321]](_0x5c29x13,!1));_0x5c29x13= this[_0xd587[1650]]?_0x5c29x13[_0xd587[230]](/\n/g,_0xd587[1453]):_0x5c29x13;_0x5c29x12[_0xd587[339]]= _0x5c29x13};_0x5c29x9= _0x5c29x12[_0xd587[359]]+ 2;_0x5c29xa= _0x5c29x12[_0xd587[167]]+ 2}else {_0x5c29x9= this[_0xd587[252]][_0xd587[359]],_0x5c29xa= this[_0xd587[252]][_0xd587[167]]+ 1};this[_0xd587[359]]= _0x5c29x9;this[_0xd587[167]]= _0x5c29xa;_0x5c29x12= this[_0xd587[1562]][_0xd587[117]]/ _0x5c29x5;_0x5c29x13= this[_0xd587[1562]][_0xd587[119]]/ _0x5c29x5;mxClient[_0xd587[496]]&& (this[_0xd587[1645]]|| _0xd587[1334]== this[_0xd587[277]])&& 0< _0x5c29x13?(_0x5c29x13= Math[_0xd587[243]](_0x5c29x13,_0x5c29xa),_0x5c29x2[_0xd587[119]]= Math[_0xd587[488]](_0x5c29x13+ 1)+ _0xd587[168]):_0x5c29x13= _0x5c29xa;_0xd587[1334]!= this[_0xd587[277]]&& (mxClient[_0xd587[496]]&& (this[_0xd587[1645]]|| this[_0xd587[1333]])&& 0< _0x5c29x12?(_0x5c29x12= Math[_0xd587[243]](_0x5c29x12,_0x5c29x9),_0x5c29x2[_0xd587[117]]= Math[_0xd587[488]](_0x5c29x12)+ _0xd587[168]):_0x5c29x12= _0x5c29x9);var _0x5c29x13=_0x5c29x13* _0x5c29x5,_0x5c29x12=_0x5c29x12* _0x5c29x5,_0x5c29x9=this[_0xd587[1615]]()* (Math[_0xd587[424]]/ 180),_0x5c29xa=parseFloat(parseFloat(Math[_0xd587[426]](_0x5c29x9))[_0xd587[1293]](8)),_0x5c29x14=parseFloat(parseFloat(Math[_0xd587[427]](-_0x5c29x9))[_0xd587[1293]](8)),_0x5c29x9=_0x5c29x9% (2* Math[_0xd587[424]]);0> _0x5c29x9&& (_0x5c29x9+= 2* Math[_0xd587[424]]);_0x5c29x9%= Math[_0xd587[424]];_0x5c29x9> Math[_0xd587[424]]/ 2&& (_0x5c29x9= Math[_0xd587[424]]- _0x5c29x9);var _0x5c29x15=Math[_0xd587[426]](_0x5c29x9),_0x5c29x16=Math[_0xd587[427]](-_0x5c29x9),_0x5c29x3=_0x5c29x12*  -(_0x5c29x3+ 0.5),_0x5c29x4=_0x5c29x13*  -(_0x5c29x4+ 0.5),_0x5c29x17=(_0x5c29x13- _0x5c29x13* _0x5c29x15+ _0x5c29x12* _0x5c29x16)/ 2+ _0x5c29x14* _0x5c29x3- _0x5c29xa* _0x5c29x4;0!= _0x5c29x9&& (_0x5c29x2[_0xd587[347]]= _0xd587[1505]+ _0x5c29xa+ _0xd587[1506]+ _0x5c29x14+ _0xd587[1507]+ -_0x5c29x14+ _0xd587[1508]+ _0x5c29xa+ _0xd587[1509]);_0x5c29x2[_0xd587[499]]= _0x5c29x5;_0x5c29x2[_0xd587[361]]= Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[235]]+ ((_0x5c29x12- _0x5c29x12* _0x5c29x15+ _0x5c29x13* _0x5c29x16)/ 2- _0x5c29xa* _0x5c29x3- _0x5c29x14* _0x5c29x4)- _0x5c29x12/ 2)+ _0xd587[168];_0x5c29x2[_0xd587[125]]= Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[236]]+ _0x5c29x17- _0x5c29x13/ 2)+ _0xd587[168]};mxText[_0xd587[202]][_0xd587[1657]]= function(){if(mxUtils[_0xd587[1331]](this[_0xd587[131]])){this[_0xd587[252]][_0xd587[339]]= _0xd587[110],this[_0xd587[252]][_0xd587[62]](this[_0xd587[131]])}else {var _0x5c29x2=this[_0xd587[131]];this[_0xd587[507]]!= mxConstants[_0xd587[1656]]&& (_0x5c29x2= mxUtils[_0xd587[321]](_0x5c29x2,!1));var _0x5c29x2=this[_0xd587[1650]]?_0x5c29x2[_0xd587[230]](/\n/g,_0xd587[1453]):_0x5c29x2,_0x5c29x3=null!= this[_0xd587[1537]]&& this[_0xd587[1537]]!= mxConstants[_0xd587[217]]?this[_0xd587[1537]]:null,_0x5c29x4=null!= this[_0xd587[467]]&& this[_0xd587[467]]!= mxConstants[_0xd587[217]]?this[_0xd587[467]]:null;if(null!= _0x5c29x3|| null!= _0x5c29x4){if(_0xd587[1334]== this[_0xd587[277]]){null!= _0x5c29x3&& (this[_0xd587[252]][_0xd587[124]][_0xd587[1028]]= _0x5c29x3),null!= _0x5c29x4&& (this[_0xd587[252]][_0xd587[124]][_0xd587[467]]= _0xd587[1669]+ _0x5c29x4)}else {var _0x5c29x5=_0xd587[110];null!= _0x5c29x3&& (_0x5c29x5+= _0xd587[1418]+ _0x5c29x3+ _0xd587[471]);null!= _0x5c29x4&& (_0x5c29x5+= _0xd587[1419]+ _0x5c29x4+ _0xd587[471]);_0x5c29x2= _0xd587[1670]+ _0x5c29x5+ _0xd587[1671]+ this[_0xd587[252]][_0xd587[124]][_0xd587[489]]+ _0xd587[1423]+ _0x5c29x2+ _0xd587[1424];this[_0xd587[252]][_0xd587[124]][_0xd587[489]]= _0xd587[110]}};this[_0xd587[252]][_0xd587[339]]= _0x5c29x2}};mxText[_0xd587[202]][_0xd587[1441]]= function(_0x5c29x2){_0x5c29x2= _0x5c29x2[_0xd587[124]];_0x5c29x2[_0xd587[489]]= Math[_0xd587[488]](this[_0xd587[803]]* mxConstants[_0xd587[490]])+ _0xd587[168];_0x5c29x2[_0xd587[487]]= Math[_0xd587[488]](this[_0xd587[803]])+ _0xd587[168];_0x5c29x2[_0xd587[486]]= this[_0xd587[1288]];_0x5c29x2[_0xd587[123]]= _0xd587[125];_0x5c29x2[_0xd587[352]]= this[_0xd587[352]];_0x5c29x2[_0xd587[1452]]= (this[_0xd587[666]]& mxConstants[_0xd587[1410]])== mxConstants[_0xd587[1410]]?_0xd587[1447]:_0xd587[110];_0x5c29x2[_0xd587[666]]= (this[_0xd587[666]]& mxConstants[_0xd587[1412]])== mxConstants[_0xd587[1412]]?_0xd587[1449]:_0xd587[110];_0x5c29x2[_0xd587[1498]]= (this[_0xd587[666]]& mxConstants[_0xd587[1414]])== mxConstants[_0xd587[1414]]?_0xd587[355]:_0xd587[110];_0x5c29x2[_0xd587[1165]]= this[_0xd587[611]]== mxConstants[_0xd587[479]]?_0xd587[698]:this[_0xd587[611]]== mxConstants[_0xd587[480]]?_0xd587[699]:_0xd587[361]};mxText[_0xd587[202]][_0xd587[1654]]= function(_0x5c29x2){var _0x5c29x3=Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[117]]/ this[_0xd587[255]]),_0x5c29x4=Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[119]]/ this[_0xd587[255]]);_0x5c29x2= _0x5c29x2[_0xd587[124]];this[_0xd587[1645]]?(_0x5c29x2[_0xd587[277]]= _0xd587[188],0< _0x5c29x4&& (_0x5c29x2[_0xd587[1503]]= _0x5c29x4+ _0xd587[168]),0< _0x5c29x3&& (_0x5c29x2[_0xd587[117]]= _0x5c29x3+ _0xd587[168])):_0xd587[1334]== this[_0xd587[277]]&& (_0x5c29x2[_0xd587[117]]= _0x5c29x3+ _0xd587[168],0< _0x5c29x4&& (_0x5c29x2[_0xd587[1503]]= _0x5c29x4+ _0xd587[168]));this[_0xd587[1333]]?(!this[_0xd587[1645]]&& 0< _0x5c29x3&& (_0x5c29x2[_0xd587[117]]= _0x5c29x3+ _0xd587[168]),_0x5c29x2[_0xd587[493]]= _0xd587[1502]):_0x5c29x2[_0xd587[493]]= _0xd587[494]};mxText[_0xd587[202]][_0xd587[1672]]= function(){this[_0xd587[1655]]= mxUtils[_0xd587[1501]](this[_0xd587[611]],this[_0xd587[552]])};mxText[_0xd587[202]][_0xd587[1673]]= function(){var _0x5c29x2=0,_0x5c29x3=0,_0x5c29x2=this[_0xd587[611]]== mxConstants[_0xd587[479]]?(this[_0xd587[659]]- this[_0xd587[661]])/ 2:this[_0xd587[611]]== mxConstants[_0xd587[480]]?-this[_0xd587[661]]- this[_0xd587[1649]]:this[_0xd587[659]]+ this[_0xd587[1648]],_0x5c29x3=this[_0xd587[552]]== mxConstants[_0xd587[481]]?(this[_0xd587[658]]- this[_0xd587[660]])/ 2:this[_0xd587[552]]== mxConstants[_0xd587[482]]?-this[_0xd587[660]]- this[_0xd587[1647]]:this[_0xd587[658]]+ this[_0xd587[1646]];return  new mxPoint(_0x5c29x2,_0x5c29x3)};function mxTriangle(){mxActor[_0xd587[239]](this)}mxUtils[_0xd587[1284]](mxTriangle,mxActor);mxTriangle[_0xd587[202]][_0xd587[1625]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x2[_0xd587[1276]](0,0);_0x5c29x2[_0xd587[1277]](_0x5c29x5,0.5* _0x5c29x9);_0x5c29x2[_0xd587[1277]](0,_0x5c29x9);_0x5c29x2[_0xd587[268]]()};function mxHexagon(){mxActor[_0xd587[239]](this)}mxUtils[_0xd587[1284]](mxHexagon,mxActor);mxHexagon[_0xd587[202]][_0xd587[1625]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x2[_0xd587[1276]](0.25* _0x5c29x5,0);_0x5c29x2[_0xd587[1277]](0.75* _0x5c29x5,0);_0x5c29x2[_0xd587[1277]](_0x5c29x5,0.5* _0x5c29x9);_0x5c29x2[_0xd587[1277]](0.75* _0x5c29x5,_0x5c29x9);_0x5c29x2[_0xd587[1277]](0.25* _0x5c29x5,_0x5c29x9);_0x5c29x2[_0xd587[1277]](0,0.5* _0x5c29x9);_0x5c29x2[_0xd587[268]]()};function mxLine(_0x5c29x2,_0x5c29x3,_0x5c29x4){mxShape[_0xd587[239]](this);this[_0xd587[1562]]= _0x5c29x2;this[_0xd587[1336]]= _0x5c29x3;this[_0xd587[1307]]= null!= _0x5c29x4?_0x5c29x4:1}mxUtils[_0xd587[1284]](mxLine,mxShape);mxLine[_0xd587[202]][_0xd587[1595]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x4+= _0x5c29x9/ 2;_0x5c29x2[_0xd587[1275]]();_0x5c29x2[_0xd587[1276]](_0x5c29x3,_0x5c29x4);_0x5c29x2[_0xd587[1277]](_0x5c29x3+ _0x5c29x5,_0x5c29x4);_0x5c29x2[_0xd587[1336]]()};function mxImageShape(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){mxShape[_0xd587[239]](this);this[_0xd587[1562]]= _0x5c29x2;this[_0xd587[618]]= _0x5c29x3;this[_0xd587[1334]]= _0x5c29x4;this[_0xd587[1336]]= _0x5c29x5;this[_0xd587[1307]]= null!= _0x5c29x9?_0x5c29x9:1;this[_0xd587[639]]=  !1}mxUtils[_0xd587[1284]](mxImageShape,mxRectangleShape);mxImageShape[_0xd587[202]][_0xd587[1674]]=  !0;mxImageShape[_0xd587[202]][_0xd587[1568]]= function(){return !mxClient[_0xd587[80]]?0.5:0};mxImageShape[_0xd587[202]][_0xd587[183]]= function(_0x5c29x2){mxShape[_0xd587[202]][_0xd587[183]][_0xd587[183]](this,arguments);this[_0xd587[1299]]= this[_0xd587[1336]]= this[_0xd587[1334]]= null;null!= this[_0xd587[124]]&& (this[_0xd587[1334]]= mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_IMAGE_BACKGROUND),this[_0xd587[1336]]= mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_IMAGE_BORDER),this[_0xd587[1674]]= 1== mxUtils[_0xd587[1550]](this[_0xd587[124]],mxConstants.STYLE_IMAGE_ASPECT,1),this[_0xd587[623]]= this[_0xd587[623]]|| 1== mxUtils[_0xd587[433]](this[_0xd587[124]],_0xd587[1675],0),this[_0xd587[624]]= this[_0xd587[624]]|| 1== mxUtils[_0xd587[433]](this[_0xd587[124]],_0xd587[1676],0))};mxImageShape[_0xd587[202]][_0xd587[1567]]= function(){return !this[_0xd587[1674]]};mxImageShape[_0xd587[202]][_0xd587[1570]]= function(){var _0x5c29x2=document[_0xd587[55]](_0xd587[485]);_0x5c29x2[_0xd587[124]][_0xd587[491]]= _0xd587[492];return _0x5c29x2};mxImageShape[_0xd587[202]][_0xd587[1595]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){if(null!= this[_0xd587[618]]){var _0x5c29xa=mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_IMAGE_BACKGROUND,null),_0x5c29x12=mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_IMAGE_BORDER,null);if(null!= _0x5c29xa|| null!= _0x5c29x12){_0x5c29x2[_0xd587[1245]](_0x5c29xa),_0x5c29x2[_0xd587[1249]](_0x5c29x12),_0x5c29x2[_0xd587[1319]](_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9),_0x5c29x2[_0xd587[1337]]()};_0x5c29x2[_0xd587[618]](_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,this[_0xd587[618]],this[_0xd587[1674]],!1,!1)}else {mxRectangleShape[_0xd587[202]][_0xd587[1601]][_0xd587[183]](this,arguments)}};mxImageShape[_0xd587[202]][_0xd587[1575]]= function(){this[_0xd587[252]][_0xd587[124]][_0xd587[361]]= Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[235]])+ _0xd587[168];this[_0xd587[252]][_0xd587[124]][_0xd587[125]]= Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[236]])+ _0xd587[168];this[_0xd587[252]][_0xd587[124]][_0xd587[117]]= Math[_0xd587[160]](0,Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[117]]))+ _0xd587[168];this[_0xd587[252]][_0xd587[124]][_0xd587[119]]= Math[_0xd587[160]](0,Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[119]]))+ _0xd587[168];this[_0xd587[252]][_0xd587[124]][_0xd587[1028]]= this[_0xd587[1334]]|| _0xd587[110];this[_0xd587[252]][_0xd587[124]][_0xd587[1630]]= this[_0xd587[1336]]|| _0xd587[110];this[_0xd587[252]][_0xd587[339]]= _0xd587[110];if(null!= this[_0xd587[618]]){var _0x5c29x2=document[_0xd587[55]](mxClient[_0xd587[49]]|| null== mxClient[_0xd587[73]]&& 0!= this[_0xd587[603]]?mxClient[_0xd587[463]]+ _0xd587[464]:_0xd587[466]);_0x5c29x2[_0xd587[124]][_0xd587[491]]= _0xd587[492];_0x5c29x2[_0xd587[390]]= this[_0xd587[618]];var _0x5c29x3=100> this[_0xd587[461]]?_0xd587[459]+ this[_0xd587[461]]+ _0xd587[460]:_0xd587[110];this[_0xd587[252]][_0xd587[124]][_0xd587[347]]= _0x5c29x3;this[_0xd587[623]]&& this[_0xd587[624]]?_0x5c29x3+= _0xd587[1677]:this[_0xd587[623]]?_0x5c29x3+= _0xd587[1678]:this[_0xd587[624]]&& (_0x5c29x3+= _0xd587[1679]);_0x5c29x2[_0xd587[124]][_0xd587[347]]!= _0x5c29x3&& (_0x5c29x2[_0xd587[124]][_0xd587[347]]= _0x5c29x3);_0xd587[618]== _0x5c29x2[_0xd587[301]]?_0x5c29x2[_0xd587[124]][_0xd587[603]]= this[_0xd587[603]]:_0x5c29x2[_0xd587[124]][mxClient[_0xd587[73]]+ _0xd587[1662]]= _0xd587[1394]+ this[_0xd587[603]]+ _0xd587[1666];_0x5c29x2[_0xd587[124]][_0xd587[117]]= this[_0xd587[252]][_0xd587[124]][_0xd587[117]];_0x5c29x2[_0xd587[124]][_0xd587[119]]= this[_0xd587[252]][_0xd587[124]][_0xd587[119]];this[_0xd587[252]][_0xd587[124]][_0xd587[1617]]= _0xd587[110];this[_0xd587[252]][_0xd587[62]](_0x5c29x2)}else {this[_0xd587[1600]](this[_0xd587[252]])}};function mxLabel(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){mxRectangleShape[_0xd587[239]](this,_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5)}mxUtils[_0xd587[1284]](mxLabel,mxRectangleShape);mxLabel[_0xd587[202]][_0xd587[1680]]= mxConstants[_0xd587[1681]];mxLabel[_0xd587[202]][_0xd587[657]]= 2;mxLabel[_0xd587[202]][_0xd587[1682]]= 10;mxLabel[_0xd587[202]][_0xd587[635]]= 2;mxLabel[_0xd587[202]][_0xd587[176]]= function(_0x5c29x2){mxShape[_0xd587[202]][_0xd587[176]][_0xd587[183]](this,arguments);null!= this[_0xd587[632]]&& null!= this[_0xd587[630]]&& (this[_0xd587[1683]]=  new this[_0xd587[630]],this[_0xd587[1683]][_0xd587[507]]= this[_0xd587[507]],this[_0xd587[1683]][_0xd587[1562]]= this[_0xd587[1562]],this[_0xd587[1683]][_0xd587[1334]]= this[_0xd587[632]],this[_0xd587[1683]][_0xd587[1336]]= this[_0xd587[632]],this[_0xd587[1683]][_0xd587[1299]]= this[_0xd587[634]],this[_0xd587[1683]][_0xd587[663]]= this[_0xd587[638]],this[_0xd587[1683]][_0xd587[176]](this[_0xd587[252]]))};mxLabel[_0xd587[202]][_0xd587[258]]= function(){null!= this[_0xd587[1683]]&& (this[_0xd587[1683]][_0xd587[1334]]= this[_0xd587[632]],this[_0xd587[1683]][_0xd587[1336]]= this[_0xd587[632]],this[_0xd587[1683]][_0xd587[1299]]= this[_0xd587[634]],this[_0xd587[1683]][_0xd587[663]]= this[_0xd587[638]]);mxShape[_0xd587[202]][_0xd587[258]][_0xd587[183]](this,arguments)};mxLabel[_0xd587[202]][_0xd587[1567]]= function(){return mxRectangleShape[_0xd587[202]][_0xd587[1567]][_0xd587[183]](this,arguments)&& null== this[_0xd587[632]]&& null== this[_0xd587[630]]};mxLabel[_0xd587[202]][_0xd587[1602]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){this[_0xd587[1684]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9);this[_0xd587[1685]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9);mxRectangleShape[_0xd587[202]][_0xd587[1602]][_0xd587[183]](this,arguments)};mxLabel[_0xd587[202]][_0xd587[1684]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){null!= this[_0xd587[618]]&& (_0x5c29x3= this[_0xd587[1686]](_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9),_0x5c29x2[_0xd587[618]](_0x5c29x3[_0xd587[235]],_0x5c29x3[_0xd587[236]],_0x5c29x3[_0xd587[117]],_0x5c29x3[_0xd587[119]],this[_0xd587[618]],!1,!1,!1))};mxLabel[_0xd587[202]][_0xd587[1686]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),_0x5c29xa=mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),_0x5c29x12=mxUtils[_0xd587[1550]](this[_0xd587[124]],mxConstants.STYLE_IMAGE_WIDTH,mxConstants.DEFAULT_IMAGESIZE),_0x5c29x13=mxUtils[_0xd587[1550]](this[_0xd587[124]],mxConstants.STYLE_IMAGE_HEIGHT,mxConstants.DEFAULT_IMAGESIZE),_0x5c29x14=mxUtils[_0xd587[1550]](this[_0xd587[124]],mxConstants.STYLE_SPACING,this[_0xd587[657]])+ 5;_0x5c29x2= _0x5c29x9== mxConstants[_0xd587[479]]?_0x5c29x2+ (_0x5c29x4- _0x5c29x12)/ 2:_0x5c29x9== mxConstants[_0xd587[480]]?_0x5c29x2+ (_0x5c29x4- _0x5c29x12- _0x5c29x14):_0x5c29x2+ _0x5c29x14;_0x5c29x3= _0x5c29xa== mxConstants[_0xd587[1687]]?_0x5c29x3+ _0x5c29x14:_0x5c29xa== mxConstants[_0xd587[482]]?_0x5c29x3+ (_0x5c29x5- _0x5c29x13- _0x5c29x14):_0x5c29x3+ (_0x5c29x5- _0x5c29x13)/ 2;return  new mxRectangle(_0x5c29x2,_0x5c29x3,_0x5c29x12,_0x5c29x13)};mxLabel[_0xd587[202]][_0xd587[1685]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){null!= this[_0xd587[1683]]?(this[_0xd587[1683]][_0xd587[1562]]= this[_0xd587[1688]](_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9),this[_0xd587[1683]][_0xd587[1209]](_0x5c29x2)):null!= this[_0xd587[631]]&& (_0x5c29x3= this[_0xd587[1688]](_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9),_0x5c29x2[_0xd587[618]](_0x5c29x3[_0xd587[235]],_0x5c29x3[_0xd587[236]],_0x5c29x3[_0xd587[117]],_0x5c29x3[_0xd587[119]],this[_0xd587[631]],!1,!1,!1))};mxLabel[_0xd587[202]][_0xd587[1688]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),_0x5c29xa=mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),_0x5c29x12=mxUtils[_0xd587[1550]](this[_0xd587[124]],mxConstants.STYLE_INDICATOR_WIDTH,this[_0xd587[1682]]),_0x5c29x13=mxUtils[_0xd587[1550]](this[_0xd587[124]],mxConstants.STYLE_INDICATOR_HEIGHT,this[_0xd587[1682]]),_0x5c29x14=this[_0xd587[657]]+ 5;_0x5c29x2= _0x5c29x9== mxConstants[_0xd587[480]]?_0x5c29x2+ (_0x5c29x4- _0x5c29x12- _0x5c29x14):_0x5c29x9== mxConstants[_0xd587[479]]?_0x5c29x2+ (_0x5c29x4- _0x5c29x12)/ 2:_0x5c29x2+ _0x5c29x14;_0x5c29x3= _0x5c29xa== mxConstants[_0xd587[482]]?_0x5c29x3+ (_0x5c29x5- _0x5c29x13- _0x5c29x14):_0x5c29xa== mxConstants[_0xd587[1687]]?_0x5c29x3+ _0x5c29x14:_0x5c29x3+ (_0x5c29x5- _0x5c29x13)/ 2;return  new mxRectangle(_0x5c29x2,_0x5c29x3,_0x5c29x12,_0x5c29x13)};mxLabel[_0xd587[202]][_0xd587[1575]]= function(){for(mxRectangleShape[_0xd587[202]][_0xd587[1575]][_0xd587[183]](this,arguments);this[_0xd587[252]][_0xd587[1580]]();){this[_0xd587[252]][_0xd587[266]](this[_0xd587[252]][_0xd587[1581]])};if(null!= this[_0xd587[618]]){var _0x5c29x2=document[_0xd587[55]](_0xd587[466]);_0x5c29x2[_0xd587[124]][_0xd587[491]]= _0xd587[1500];_0x5c29x2[_0xd587[57]](_0xd587[467],_0xd587[468]);var _0x5c29x3=this[_0xd587[1686]](this[_0xd587[1562]][_0xd587[235]],this[_0xd587[1562]][_0xd587[236]],this[_0xd587[1562]][_0xd587[117]],this[_0xd587[1562]][_0xd587[119]]);_0x5c29x3[_0xd587[235]]-= this[_0xd587[1562]][_0xd587[235]];_0x5c29x3[_0xd587[236]]-= this[_0xd587[1562]][_0xd587[236]];_0x5c29x2[_0xd587[124]][_0xd587[361]]= Math[_0xd587[488]](_0x5c29x3[_0xd587[235]])+ _0xd587[168];_0x5c29x2[_0xd587[124]][_0xd587[125]]= Math[_0xd587[488]](_0x5c29x3[_0xd587[236]])+ _0xd587[168];_0x5c29x2[_0xd587[124]][_0xd587[117]]= Math[_0xd587[488]](_0x5c29x3[_0xd587[117]])+ _0xd587[168];_0x5c29x2[_0xd587[124]][_0xd587[119]]= Math[_0xd587[488]](_0x5c29x3[_0xd587[119]])+ _0xd587[168];_0x5c29x2[_0xd587[390]]= this[_0xd587[618]];this[_0xd587[252]][_0xd587[62]](_0x5c29x2)}};function mxCylinder(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){mxShape[_0xd587[239]](this);this[_0xd587[1562]]= _0x5c29x2;this[_0xd587[1334]]= _0x5c29x3;this[_0xd587[1336]]= _0x5c29x4;this[_0xd587[1307]]= null!= _0x5c29x5?_0x5c29x5:1}mxUtils[_0xd587[1284]](mxCylinder,mxShape);mxCylinder[_0xd587[202]][_0xd587[1503]]= 40;mxCylinder[_0xd587[202]][_0xd587[1564]]= 0;mxCylinder[_0xd587[202]][_0xd587[1595]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x2[_0xd587[513]](_0x5c29x3,_0x5c29x4);_0x5c29x2[_0xd587[1275]]();this[_0xd587[1625]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,!1);_0x5c29x2[_0xd587[1337]]();_0x5c29x2[_0xd587[1267]](!1);_0x5c29x2[_0xd587[1275]]();this[_0xd587[1625]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,!0);_0x5c29x2[_0xd587[1336]]()};mxCylinder[_0xd587[202]][_0xd587[1625]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){_0x5c29x3= Math[_0xd587[243]](this[_0xd587[1503]],Math[_0xd587[488]](_0x5c29x9/ 5));if(_0x5c29xa&& null!= this[_0xd587[1334]]|| !_0x5c29xa&& null== this[_0xd587[1334]]){_0x5c29x2[_0xd587[1276]](0,_0x5c29x3),_0x5c29x2[_0xd587[1279]](0,2* _0x5c29x3,_0x5c29x5,2* _0x5c29x3,_0x5c29x5,_0x5c29x3),_0x5c29xa|| (_0x5c29x2[_0xd587[1336]](),_0x5c29x2[_0xd587[1275]]())};_0x5c29xa|| (_0x5c29x2[_0xd587[1276]](0,_0x5c29x3),_0x5c29x2[_0xd587[1279]](0,-_0x5c29x3/ 3,_0x5c29x5,-_0x5c29x3/ 3,_0x5c29x5,_0x5c29x3),_0x5c29x2[_0xd587[1277]](_0x5c29x5,_0x5c29x9- _0x5c29x3),_0x5c29x2[_0xd587[1279]](_0x5c29x5,_0x5c29x9+ _0x5c29x3/ 3,0,_0x5c29x9+ _0x5c29x3/ 3,0,_0x5c29x9- _0x5c29x3),_0x5c29x2[_0xd587[268]]())};function mxConnector(_0x5c29x2,_0x5c29x3,_0x5c29x4){mxPolyline[_0xd587[239]](this,_0x5c29x2,_0x5c29x3,_0x5c29x4)}mxUtils[_0xd587[1284]](mxConnector,mxPolyline);mxConnector[_0xd587[202]][_0xd587[1594]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1689]](_0x5c29x2,_0x5c29x3,!0),_0x5c29x5=this[_0xd587[1689]](_0x5c29x2,_0x5c29x3,!1);null== this[_0xd587[124]]|| 1!= this[_0xd587[124]][mxConstants[_0xd587[1690]]]?this[_0xd587[1639]](_0x5c29x2,_0x5c29x3,this[_0xd587[1606]]):this[_0xd587[1691]](_0x5c29x2,_0x5c29x3);_0x5c29x2[_0xd587[1245]](this[_0xd587[1336]]);_0x5c29x2[_0xd587[1267]](!1);_0x5c29x2[_0xd587[1251]](!1);null!= _0x5c29x4&& _0x5c29x4();null!= _0x5c29x5&& _0x5c29x5()};mxConnector[_0xd587[202]][_0xd587[1691]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x2[_0xd587[1275]]();var _0x5c29x4=_0x5c29x3[0],_0x5c29x5=_0x5c29x3[_0xd587[67]];_0x5c29x2[_0xd587[1276]](_0x5c29x4[_0xd587[235]],_0x5c29x4[_0xd587[236]]);for(_0x5c29x4= 1;_0x5c29x4< _0x5c29x5- 2;_0x5c29x4++){var _0x5c29x9=_0x5c29x3[_0x5c29x4],_0x5c29xa=_0x5c29x3[_0x5c29x4+ 1];_0x5c29x2[_0xd587[1278]](_0x5c29x9[_0xd587[235]],_0x5c29x9[_0xd587[236]],(_0x5c29x9[_0xd587[235]]+ _0x5c29xa[_0xd587[235]])/ 2,(_0x5c29x9[_0xd587[236]]+ _0x5c29xa[_0xd587[236]])/ 2)};_0x5c29x9= _0x5c29x3[_0x5c29x5- 2];_0x5c29xa= _0x5c29x3[_0x5c29x5- 1];_0x5c29x2[_0xd587[1278]](_0x5c29x9[_0xd587[235]],_0x5c29x9[_0xd587[236]],_0x5c29xa[_0xd587[235]],_0x5c29xa[_0xd587[236]]);_0x5c29x2[_0xd587[1336]]()};mxConnector[_0xd587[202]][_0xd587[1689]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=_0x5c29x3[_0xd587[67]],_0x5c29x9=_0x5c29x4?_0x5c29x3[1]:_0x5c29x3[_0x5c29x5- 2];_0x5c29x3= _0x5c29x4?_0x5c29x3[0]:_0x5c29x3[_0x5c29x5- 1];var _0x5c29x5=_0x5c29x3[_0xd587[235]]- _0x5c29x9[_0xd587[235]],_0x5c29xa=_0x5c29x3[_0xd587[236]]- _0x5c29x9[_0xd587[236]],_0x5c29x12=Math[_0xd587[160]](1,Math[_0xd587[428]](_0x5c29x5* _0x5c29x5+ _0x5c29xa* _0x5c29xa)),_0x5c29x9=_0x5c29x5/ _0x5c29x12,_0x5c29x5=_0x5c29xa/ _0x5c29x12,_0x5c29xa=mxUtils[_0xd587[1550]](this[_0xd587[124]],_0x5c29x4?mxConstants[_0xd587[1692]]:mxConstants[_0xd587[1693]],mxConstants.DEFAULT_MARKERSIZE),_0x5c29x12=mxUtils[_0xd587[433]](this[_0xd587[124]],_0x5c29x4?mxConstants[_0xd587[1694]]:mxConstants[_0xd587[1695]]);return mxMarker[_0xd587[1689]](_0x5c29x2,this,_0x5c29x12,_0x5c29x3,_0x5c29x9,_0x5c29x5,_0x5c29xa,_0x5c29x4,this[_0xd587[1307]],0!= this[_0xd587[124]][_0x5c29x4?mxConstants[_0xd587[1696]]:mxConstants[_0xd587[1697]]])};mxConnector[_0xd587[202]][_0xd587[1612]]= function(_0x5c29x2){mxShape[_0xd587[202]][_0xd587[1612]][_0xd587[183]](this,arguments);var _0x5c29x3=0;mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_STARTARROW,mxConstants.NONE)!= mxConstants[_0xd587[217]]&& (_0x5c29x3= mxUtils[_0xd587[1550]](this[_0xd587[124]],mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)+ 1);mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_ENDARROW,mxConstants.NONE)!= mxConstants[_0xd587[217]]&& (_0x5c29x3= Math[_0xd587[160]](_0x5c29x3,mxUtils[_0xd587[1550]](this[_0xd587[124]],mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE))+ 1);_0x5c29x2[_0xd587[244]](Math[_0xd587[430]](_0x5c29x3* this[_0xd587[255]]))};function mxSwimlane(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){mxShape[_0xd587[239]](this);this[_0xd587[1562]]= _0x5c29x2;this[_0xd587[1334]]= _0x5c29x3;this[_0xd587[1336]]= _0x5c29x4;this[_0xd587[1307]]= null!= _0x5c29x5?_0x5c29x5:1}mxUtils[_0xd587[1284]](mxSwimlane,mxShape);mxSwimlane[_0xd587[202]][_0xd587[1680]]= 16;mxSwimlane[_0xd587[202]][_0xd587[1597]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x2= Math[_0xd587[243]](_0x5c29x9,mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return  new mxRectangle(_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x2)};mxSwimlane[_0xd587[202]][_0xd587[1614]]= function(){var _0x5c29x2=mxShape[_0xd587[202]][_0xd587[1614]][_0xd587[183]](this,arguments);1!= mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_HORIZONTAL,1)&& (_0x5c29x2+= mxText[_0xd587[202]][_0xd587[1616]]);return _0x5c29x2};mxSwimlane[_0xd587[202]][_0xd587[1615]]= function(){return this[_0xd587[1614]]()};mxSwimlane[_0xd587[202]][_0xd587[1590]]= function(){return mxShape[_0xd587[202]][_0xd587[1590]][_0xd587[183]](this,arguments)|| 1!= mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_HORIZONTAL,1)};mxSwimlane[_0xd587[202]][_0xd587[1603]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x2= mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_ARCSIZE,100* mxConstants[_0xd587[1557]])/ 100;return 3* _0x5c29x4* _0x5c29x2};mxSwimlane[_0xd587[202]][_0xd587[1595]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=Math[_0xd587[243]](_0x5c29x9,mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),_0x5c29x12=mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE),_0x5c29x13=1== mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_SWIMLANE_LINE,1),_0x5c29x14=0;_0x5c29x2[_0xd587[513]](_0x5c29x3,_0x5c29x4);this[_0xd587[1606]]?(_0x5c29x14= this[_0xd587[1603]](_0x5c29x5,_0x5c29x9,_0x5c29xa),this[_0xd587[1698]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x14,_0x5c29x12,_0x5c29x13)):this[_0xd587[1699]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13);_0x5c29x12= mxUtils[_0xd587[433]](this[_0xd587[124]],mxConstants.STYLE_SEPARATORCOLOR,mxConstants.NONE);this[_0xd587[1700]](_0x5c29x2,_0x5c29x5,_0x5c29xa,_0x5c29x9,_0x5c29x12);null!= this[_0xd587[618]]&& (_0x5c29x9= this[_0xd587[1686]](_0x5c29x3,_0x5c29xa,_0x5c29x5,_0x5c29x9),_0x5c29x2[_0xd587[618]](_0x5c29x9[_0xd587[235]]- _0x5c29x3,_0x5c29x9[_0xd587[236]]- _0x5c29x4,_0x5c29x9[_0xd587[117]],_0x5c29x9[_0xd587[119]],this[_0xd587[618]],!1,!1,!1));this[_0xd587[617]]&& (_0x5c29x2[_0xd587[1267]](!1),this[_0xd587[1604]](_0x5c29x2,0,0,_0x5c29x5,_0x5c29xa,_0x5c29x14))};mxSwimlane[_0xd587[202]][_0xd587[1699]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13){_0x5c29x12!= mxConstants[_0xd587[217]]&& (_0x5c29x2[_0xd587[815]](),_0x5c29x2[_0xd587[1245]](_0x5c29x12),_0x5c29x2[_0xd587[1319]](0,0,_0x5c29x5,_0x5c29x9),_0x5c29x2[_0xd587[1337]](),_0x5c29x2[_0xd587[1210]](),_0x5c29x2[_0xd587[1267]](!1));_0x5c29x2[_0xd587[1275]]();_0x5c29x2[_0xd587[1276]](0,_0x5c29xa);_0x5c29x2[_0xd587[1277]](0,0);_0x5c29x2[_0xd587[1277]](_0x5c29x5,0);_0x5c29x2[_0xd587[1277]](_0x5c29x5,_0x5c29xa);_0x5c29x13&& _0x5c29x2[_0xd587[268]]();_0x5c29x2[_0xd587[1337]]();_0x5c29xa< _0x5c29x9&& _0x5c29x12== mxConstants[_0xd587[217]]&& (_0x5c29x2[_0xd587[1229]]=  !1,_0x5c29x2[_0xd587[1275]](),_0x5c29x2[_0xd587[1276]](0,_0x5c29xa),_0x5c29x2[_0xd587[1277]](0,_0x5c29x9),_0x5c29x2[_0xd587[1277]](_0x5c29x5,_0x5c29x9),_0x5c29x2[_0xd587[1277]](_0x5c29x5,_0x5c29xa),_0x5c29x2[_0xd587[1336]]())};mxSwimlane[_0xd587[202]][_0xd587[1698]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14){_0x5c29x13!= mxConstants[_0xd587[217]]&& (_0x5c29x2[_0xd587[815]](),_0x5c29x2[_0xd587[1245]](_0x5c29x13),_0x5c29x2[_0xd587[1320]](0,0,_0x5c29x5,_0x5c29x9,_0x5c29x12,_0x5c29x12),_0x5c29x2[_0xd587[1337]](),_0x5c29x2[_0xd587[1210]](),_0x5c29x2[_0xd587[1267]](!1));_0x5c29x2[_0xd587[1275]]();_0x5c29x2[_0xd587[1276]](_0x5c29x5,_0x5c29xa);_0x5c29x2[_0xd587[1277]](_0x5c29x5,_0x5c29x12);_0x5c29x2[_0xd587[1278]](_0x5c29x5,0,_0x5c29x5- Math[_0xd587[243]](_0x5c29x5/ 2,_0x5c29x12),0);_0x5c29x2[_0xd587[1277]](Math[_0xd587[243]](_0x5c29x5/ 2,_0x5c29x12),0);_0x5c29x2[_0xd587[1278]](0,0,0,_0x5c29x12);_0x5c29x2[_0xd587[1277]](0,_0x5c29xa);_0x5c29x14&& _0x5c29x2[_0xd587[268]]();_0x5c29x2[_0xd587[1337]]();_0x5c29xa< _0x5c29x9&& _0x5c29x13== mxConstants[_0xd587[217]]&& (_0x5c29x2[_0xd587[1229]]=  !1,_0x5c29x2[_0xd587[1275]](),_0x5c29x2[_0xd587[1276]](0,_0x5c29xa),_0x5c29x2[_0xd587[1277]](0,_0x5c29x9- _0x5c29x12),_0x5c29x2[_0xd587[1278]](0,_0x5c29x9,Math[_0xd587[243]](_0x5c29x5/ 2,_0x5c29x12),_0x5c29x9),_0x5c29x2[_0xd587[1277]](_0x5c29x5- Math[_0xd587[243]](_0x5c29x5/ 2,_0x5c29x12),_0x5c29x9),_0x5c29x2[_0xd587[1278]](_0x5c29x5,_0x5c29x9,_0x5c29x5,_0x5c29x9- _0x5c29x12),_0x5c29x2[_0xd587[1277]](_0x5c29x5,_0x5c29xa),_0x5c29x2[_0xd587[1336]]())};mxSwimlane[_0xd587[202]][_0xd587[1700]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x9!= mxConstants[_0xd587[217]]&& (_0x5c29x2[_0xd587[1249]](_0x5c29x9),_0x5c29x2[_0xd587[1251]](!0),_0x5c29x2[_0xd587[1275]](),_0x5c29x2[_0xd587[1276]](_0x5c29x3,_0x5c29x4),_0x5c29x2[_0xd587[1277]](_0x5c29x3,_0x5c29x5),_0x5c29x2[_0xd587[1336]](),_0x5c29x2[_0xd587[1251]](!1))};mxSwimlane[_0xd587[202]][_0xd587[1686]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){return  new mxRectangle(_0x5c29x2+ _0x5c29x4- this[_0xd587[1680]],_0x5c29x3,this[_0xd587[1680]],this[_0xd587[1680]])};function mxGraphLayout(_0x5c29x2){this[_0xd587[1179]]= _0x5c29x2}mxGraphLayout[_0xd587[202]][_0xd587[1179]]= null;mxGraphLayout[_0xd587[202]][_0xd587[1701]]=  !0;mxGraphLayout[_0xd587[202]][_0xd587[1101]]= null;mxGraphLayout[_0xd587[202]][_0xd587[1702]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){};mxGraphLayout[_0xd587[202]][_0xd587[350]]= function(_0x5c29x2){};mxGraphLayout[_0xd587[202]][_0xd587[1703]]= function(){return this[_0xd587[1179]]};mxGraphLayout[_0xd587[202]][_0xd587[1704]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x4= this[_0xd587[1179]][_0xd587[441]][_0xd587[248]](_0x5c29x3);_0x5c29x3= null!= _0x5c29x4?_0x5c29x4[_0xd587[124]]:this[_0xd587[1179]][_0xd587[1705]](_0x5c29x3);return null!= _0x5c29x3?_0x5c29x3[_0x5c29x2]:null};mxGraphLayout[_0xd587[1706]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){if(null!= _0x5c29x4&& null!= _0x5c29x2){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:!0;_0x5c29x9= _0x5c29x9|| [];var _0x5c29xa=mxCellPath[_0xd587[385]](_0x5c29x2);if(null== _0x5c29x9[_0x5c29xa]&& (_0x5c29x9[_0x5c29xa]= _0x5c29x2,_0x5c29x5= _0x5c29x4(_0x5c29x2,_0x5c29x5),null== _0x5c29x5|| _0x5c29x5)){if(_0x5c29x5= this[_0xd587[1179]][_0xd587[251]][_0xd587[1707]](_0x5c29x2),0< _0x5c29x5){for(_0x5c29xa= 0;_0x5c29xa< _0x5c29x5;_0x5c29xa++){var _0x5c29x12=this[_0xd587[1179]][_0xd587[251]][_0xd587[1708]](_0x5c29x2,_0x5c29xa),_0x5c29x13=this[_0xd587[1179]][_0xd587[251]][_0xd587[1709]](_0x5c29x12,!0)== _0x5c29x2;if(!_0x5c29x3|| _0x5c29x13){_0x5c29x13= this[_0xd587[1179]][_0xd587[441]][_0xd587[1710]](_0x5c29x12,!_0x5c29x13),this[_0xd587[1706]](_0x5c29x13,_0x5c29x3,_0x5c29x4,_0x5c29x12,_0x5c29x9)}}}}}};mxGraphLayout[_0xd587[202]][_0xd587[1711]]= function(_0x5c29x2){return this[_0xd587[1179]][_0xd587[1712]](_0x5c29x2)};mxGraphLayout[_0xd587[202]][_0xd587[1713]]= function(_0x5c29x2){return !this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1193]](_0x5c29x2)|| !this[_0xd587[1179]][_0xd587[1714]](_0x5c29x2)};mxGraphLayout[_0xd587[202]][_0xd587[1715]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1179]][_0xd587[502]]();return !_0x5c29x3[_0xd587[250]](_0x5c29x2)|| !this[_0xd587[1179]][_0xd587[1714]](_0x5c29x2)|| null== _0x5c29x3[_0xd587[1709]](_0x5c29x2,!0)|| null== _0x5c29x3[_0xd587[1709]](_0x5c29x2,!1)};mxGraphLayout[_0xd587[202]][_0xd587[1716]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[1179]][_0xd587[1717]](mxConstants.STYLE_NOEDGESTYLE,_0x5c29x3?_0xd587[468]:_0xd587[500],[_0x5c29x2])};mxGraphLayout[_0xd587[202]][_0xd587[1718]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[1179]][_0xd587[1717]](mxConstants.STYLE_ORTHOGONAL,_0x5c29x3?_0xd587[500]:_0xd587[468],[_0x5c29x2])};mxGraphLayout[_0xd587[202]][_0xd587[1719]]= function(_0x5c29x2){var _0x5c29x3= new mxPoint;if(null!= _0x5c29x2&& _0x5c29x2!= this[_0xd587[1101]]){var _0x5c29x4=this[_0xd587[1179]][_0xd587[502]]();if(_0x5c29x4[_0xd587[1720]](this[_0xd587[1101]],_0x5c29x2)){for(var _0x5c29x5=_0x5c29x4[_0xd587[1721]](_0x5c29x2);_0x5c29x2!= this[_0xd587[1101]];){_0x5c29x3[_0xd587[235]]+= _0x5c29x5[_0xd587[235]],_0x5c29x3[_0xd587[236]]+= _0x5c29x5[_0xd587[236]],_0x5c29x2= _0x5c29x4[_0xd587[1197]](_0x5c29x2),_0x5c29x5= _0x5c29x4[_0xd587[1721]](_0x5c29x2)}}};return _0x5c29x3};mxGraphLayout[_0xd587[202]][_0xd587[1722]]= function(_0x5c29x2,_0x5c29x3){if(null!= _0x5c29x2){var _0x5c29x4=this[_0xd587[1179]][_0xd587[251]],_0x5c29x5=_0x5c29x4[_0xd587[1721]](_0x5c29x2);null== _0x5c29x5?(_0x5c29x5=  new mxGeometry,_0x5c29x5[_0xd587[1723]](!0)):_0x5c29x5= _0x5c29x5[_0xd587[238]]();if(null!= this[_0xd587[1101]]&& null!= _0x5c29x3){for(var _0x5c29x9=_0x5c29x4[_0xd587[1197]](_0x5c29x2),_0x5c29x9=this[_0xd587[1719]](_0x5c29x9),_0x5c29xa=0;_0x5c29xa< _0x5c29x3[_0xd587[67]];_0x5c29xa++){_0x5c29x3[_0x5c29xa][_0xd587[235]]-= _0x5c29x9[_0xd587[235]],_0x5c29x3[_0x5c29xa][_0xd587[236]]-= _0x5c29x9[_0xd587[236]]}};_0x5c29x5[_0xd587[1525]]= _0x5c29x3;_0x5c29x4[_0xd587[1724]](_0x5c29x2,_0x5c29x5)}};mxGraphLayout[_0xd587[202]][_0xd587[1725]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x9=_0x5c29x5[_0xd587[1721]](_0x5c29x2),_0x5c29xa=null;if(null!= _0x5c29x9){_0x5c29xa=  new mxRectangle(_0x5c29x3,_0x5c29x4,_0x5c29x9[_0xd587[117]],_0x5c29x9[_0xd587[119]]);if(this[_0xd587[1701]]){var _0x5c29x12=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[248]](_0x5c29x2);if(null!= _0x5c29x12&& null!= _0x5c29x12[_0xd587[963]]&& null!= _0x5c29x12[_0xd587[963]][_0xd587[1563]]){var _0x5c29x13=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[255]],_0x5c29x14=_0x5c29x12[_0xd587[963]][_0xd587[1563]];_0x5c29x12[_0xd587[963]][_0xd587[1563]][_0xd587[235]]< _0x5c29x12[_0xd587[235]]&& (_0x5c29x3+= (_0x5c29x12[_0xd587[235]]- _0x5c29x14[_0xd587[235]])/ _0x5c29x13,_0x5c29xa[_0xd587[117]]= _0x5c29x14[_0xd587[117]]);_0x5c29x12[_0xd587[963]][_0xd587[1563]][_0xd587[236]]< _0x5c29x12[_0xd587[236]]&& (_0x5c29x4+= (_0x5c29x12[_0xd587[236]]- _0x5c29x14[_0xd587[236]])/ _0x5c29x13,_0x5c29xa[_0xd587[119]]= _0x5c29x14[_0xd587[119]])}};null!= this[_0xd587[1101]]&& (_0x5c29x12= _0x5c29x5[_0xd587[1197]](_0x5c29x2),null!= _0x5c29x12&& _0x5c29x12!= this[_0xd587[1101]]&& (_0x5c29x12= this[_0xd587[1719]](_0x5c29x12),_0x5c29x3-= _0x5c29x12[_0xd587[235]],_0x5c29x4-= _0x5c29x12[_0xd587[236]]));if(_0x5c29x9[_0xd587[235]]!= _0x5c29x3|| _0x5c29x9[_0xd587[236]]!= _0x5c29x4){_0x5c29x9= _0x5c29x9[_0xd587[238]](),_0x5c29x9[_0xd587[235]]= _0x5c29x3,_0x5c29x9[_0xd587[236]]= _0x5c29x4,_0x5c29x5[_0xd587[1724]](_0x5c29x2,_0x5c29x9)}};return _0x5c29xa};mxGraphLayout[_0xd587[202]][_0xd587[1726]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1721]](_0x5c29x2);if(this[_0xd587[1701]]){var _0x5c29x4=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[248]](_0x5c29x2);if(null!= _0x5c29x4&& null!= _0x5c29x4[_0xd587[963]]&& null!= _0x5c29x4[_0xd587[963]][_0xd587[1563]]){var _0x5c29x5=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[255]],_0x5c29x9=_0x5c29x4[_0xd587[963]][_0xd587[1563]],_0x5c29xa=Math[_0xd587[160]](_0x5c29x4[_0xd587[235]]- _0x5c29x9[_0xd587[235]],0)/ _0x5c29x5,_0x5c29x12=Math[_0xd587[160]](_0x5c29x4[_0xd587[236]]- _0x5c29x9[_0xd587[236]],0)/ _0x5c29x5,_0x5c29x13=Math[_0xd587[160]](_0x5c29x9[_0xd587[235]]+ _0x5c29x9[_0xd587[117]]- (_0x5c29x4[_0xd587[235]]+ _0x5c29x4[_0xd587[117]]),0)/ _0x5c29x5,_0x5c29x4=Math[_0xd587[160]](_0x5c29x9[_0xd587[236]]+ _0x5c29x9[_0xd587[119]]- (_0x5c29x4[_0xd587[236]]+ _0x5c29x4[_0xd587[119]]),0)/ _0x5c29x5,_0x5c29x3= new mxRectangle(_0x5c29x3[_0xd587[235]]- _0x5c29xa,_0x5c29x3[_0xd587[236]]- _0x5c29x12,_0x5c29x3[_0xd587[117]]+ _0x5c29xa+ _0x5c29x13,_0x5c29x3[_0xd587[119]]+ _0x5c29x12+ _0x5c29x4)}};null!= this[_0xd587[1101]]&& (_0x5c29x2= this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1197]](_0x5c29x2),_0x5c29x3= _0x5c29x3[_0xd587[238]](),null!= _0x5c29x2&& _0x5c29x2!= this[_0xd587[1101]]&& (_0x5c29x2= this[_0xd587[1719]](_0x5c29x2),_0x5c29x3[_0xd587[235]]+= _0x5c29x2[_0xd587[235]],_0x5c29x3[_0xd587[236]]+= _0x5c29x2[_0xd587[236]]));return  new mxRectangle(_0x5c29x3[_0xd587[235]],_0x5c29x3[_0xd587[236]],_0x5c29x3[_0xd587[117]],_0x5c29x3[_0xd587[119]])};mxGraphLayout[_0xd587[202]][_0xd587[1727]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[1179]][_0xd587[502]]()[_0xd587[473]]();try{for(var _0x5c29x4=_0x5c29x2[_0xd587[67]]- 1;0<= _0x5c29x4;_0x5c29x4--){var _0x5c29x5=_0x5c29x2[_0x5c29x4],_0x5c29x9=this[_0xd587[1179]][_0xd587[1728]](_0x5c29x5),_0x5c29xa=this[_0xd587[1179]][_0xd587[1729]](_0x5c29x9),_0x5c29x12=this[_0xd587[1179]][_0xd587[1198]](_0x5c29x5),_0x5c29x13=0,_0x5c29x14=0;if(this[_0xd587[1179]][_0xd587[1730]](_0x5c29x5)){var _0x5c29x15=this[_0xd587[1179]][_0xd587[1731]](_0x5c29x5),_0x5c29x13=_0x5c29x15[_0xd587[117]],_0x5c29x14=_0x5c29x15[_0xd587[119]]};null!= _0x5c29xa&& null!= _0x5c29x12&& (_0x5c29x12= _0x5c29x12[_0xd587[238]](),_0x5c29x12[_0xd587[235]]= _0x5c29x12[_0xd587[235]]+ _0x5c29xa[_0xd587[235]]- _0x5c29x3- _0x5c29x13,_0x5c29x12[_0xd587[236]]= _0x5c29x12[_0xd587[236]]+ _0x5c29xa[_0xd587[236]]- _0x5c29x3- _0x5c29x14,_0x5c29x12[_0xd587[117]]= _0x5c29xa[_0xd587[117]]+ 2* _0x5c29x3+ _0x5c29x13,_0x5c29x12[_0xd587[119]]= _0x5c29xa[_0xd587[119]]+ 2* _0x5c29x3+ _0x5c29x14,this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1724]](_0x5c29x5,_0x5c29x12),this[_0xd587[1179]][_0xd587[834]](_0x5c29x9,_0x5c29x3+ _0x5c29x13- _0x5c29xa[_0xd587[235]],_0x5c29x3+ _0x5c29x14- _0x5c29xa[_0xd587[236]]))}}finally{this[_0xd587[1179]][_0xd587[502]]()[_0xd587[476]]()}};function mxStackLayout(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){mxGraphLayout[_0xd587[239]](this,_0x5c29x2);this[_0xd587[662]]= null!= _0x5c29x3?_0x5c29x3:!0;this[_0xd587[657]]= null!= _0x5c29x4?_0x5c29x4:0;this[_0xd587[1732]]= null!= _0x5c29x5?_0x5c29x5:0;this[_0xd587[1733]]= null!= _0x5c29x9?_0x5c29x9:0;this[_0xd587[467]]= null!= _0x5c29xa?_0x5c29xa:0}mxStackLayout[_0xd587[202]]=  new mxGraphLayout;mxStackLayout[_0xd587[202]][_0xd587[196]]= mxStackLayout;mxStackLayout[_0xd587[202]][_0xd587[662]]= null;mxStackLayout[_0xd587[202]][_0xd587[657]]= null;mxStackLayout[_0xd587[202]][_0xd587[1732]]= null;mxStackLayout[_0xd587[202]][_0xd587[1733]]= null;mxStackLayout[_0xd587[202]][_0xd587[467]]= 0;mxStackLayout[_0xd587[202]][_0xd587[1734]]=  !1;mxStackLayout[_0xd587[202]][_0xd587[1334]]=  !1;mxStackLayout[_0xd587[202]][_0xd587[1735]]=  !1;mxStackLayout[_0xd587[202]][_0xd587[1736]]=  !1;mxStackLayout[_0xd587[202]][_0xd587[1333]]= null;mxStackLayout[_0xd587[202]][_0xd587[1737]]= function(){return this[_0xd587[662]]};mxStackLayout[_0xd587[202]][_0xd587[1702]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x9=_0x5c29x5[_0xd587[1197]](_0x5c29x2),_0x5c29xa=this[_0xd587[1737]]();if(null!= _0x5c29x2&& null!= _0x5c29x9){var _0x5c29x12=0,_0x5c29x13=0,_0x5c29x14=_0x5c29x5[_0xd587[262]](_0x5c29x9);_0x5c29x3= _0x5c29xa?_0x5c29x3:_0x5c29x4;_0x5c29x12= this[_0xd587[1179]][_0xd587[249]]()[_0xd587[248]](_0x5c29x9);null!= _0x5c29x12&& (_0x5c29x3-= _0x5c29xa?_0x5c29x12[_0xd587[235]]:_0x5c29x12[_0xd587[236]]);for(_0x5c29x12= 0;_0x5c29x12< _0x5c29x14;_0x5c29x12++){if(_0x5c29x4= _0x5c29x5[_0xd587[263]](_0x5c29x9,_0x5c29x12),_0x5c29x4!= _0x5c29x2&& (_0x5c29x4= _0x5c29x5[_0xd587[1721]](_0x5c29x4),null!= _0x5c29x4)){_0x5c29x4= _0x5c29xa?_0x5c29x4[_0xd587[235]]+ _0x5c29x4[_0xd587[117]]/ 2:_0x5c29x4[_0xd587[236]]+ _0x5c29x4[_0xd587[119]]/ 2;if(_0x5c29x13< _0x5c29x3&& _0x5c29x4> _0x5c29x3){break};_0x5c29x13= _0x5c29x4}};_0x5c29xa= _0x5c29x9[_0xd587[1738]](_0x5c29x2);_0x5c29xa= Math[_0xd587[160]](0,_0x5c29x12- (_0x5c29x12> _0x5c29xa?1:0));_0x5c29x5[_0xd587[99]](_0x5c29x9,_0x5c29x2,_0x5c29xa)}};mxStackLayout[_0xd587[202]][_0xd587[1739]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x4=_0x5c29x3[_0xd587[1721]](_0x5c29x2);if(null!= this[_0xd587[1179]][_0xd587[526]]&& (null== _0x5c29x4&& _0x5c29x3[_0xd587[1740]](_0x5c29x2)|| _0x5c29x2== this[_0xd587[1179]][_0xd587[249]]()[_0xd587[1741]])){_0x5c29x4=  new mxRectangle(0,0,this[_0xd587[1179]][_0xd587[526]][_0xd587[359]]- 1,this[_0xd587[1179]][_0xd587[526]][_0xd587[167]]- 1)};return _0x5c29x4};mxStackLayout[_0xd587[202]][_0xd587[350]]= function(_0x5c29x2){if(null!= _0x5c29x2){var _0x5c29x3=this[_0xd587[1737]](),_0x5c29x4=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x5=this[_0xd587[1739]](_0x5c29x2),_0x5c29x9=0;null!= _0x5c29x5&& (_0x5c29x9= _0x5c29x3?_0x5c29x5[_0xd587[119]]:_0x5c29x5[_0xd587[117]]);var _0x5c29x9=_0x5c29x9- (2* this[_0xd587[657]]+ 2* this[_0xd587[467]]),_0x5c29xa=this[_0xd587[1732]]+ this[_0xd587[467]],_0x5c29x12=this[_0xd587[1733]]+ this[_0xd587[467]];if(this[_0xd587[1179]][_0xd587[1730]](_0x5c29x2)){var _0x5c29x13=this[_0xd587[1179]][_0xd587[1705]](_0x5c29x2),_0x5c29x14=mxUtils[_0xd587[433]](_0x5c29x13,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),_0x5c29x13=mxUtils[_0xd587[433]](_0x5c29x13,mxConstants.STYLE_HORIZONTAL,!0);_0x5c29x3== _0x5c29x13&& (_0x5c29x9-= _0x5c29x14);_0x5c29x3?_0x5c29x12+= _0x5c29x14:_0x5c29xa+= _0x5c29x14};_0x5c29x4[_0xd587[473]]();try{for(var _0x5c29x14=0,_0x5c29x13=null,_0x5c29x15=_0x5c29x4[_0xd587[262]](_0x5c29x2),_0x5c29x16=0;_0x5c29x16< _0x5c29x15;_0x5c29x16++){var _0x5c29x17=_0x5c29x4[_0xd587[263]](_0x5c29x2,_0x5c29x16);if(!this[_0xd587[1713]](_0x5c29x17)&& this[_0xd587[1711]](_0x5c29x17)){var _0x5c29x18=_0x5c29x4[_0xd587[1721]](_0x5c29x17);if(null!= _0x5c29x18){_0x5c29x18= _0x5c29x18[_0xd587[238]]();if(null!= this[_0xd587[1333]]&& null!= _0x5c29x13&& (_0x5c29x3&& _0x5c29x13[_0xd587[235]]+ _0x5c29x13[_0xd587[117]]+ _0x5c29x18[_0xd587[117]]+ 2* this[_0xd587[657]]> this[_0xd587[1333]]|| !_0x5c29x3&& _0x5c29x13[_0xd587[236]]+ _0x5c29x13[_0xd587[119]]+ _0x5c29x18[_0xd587[119]]+ 2* this[_0xd587[657]]> this[_0xd587[1333]])){_0x5c29x13= null,_0x5c29x3?_0x5c29x12+= _0x5c29x14+ this[_0xd587[657]]:_0x5c29xa+= _0x5c29x14+ this[_0xd587[657]],_0x5c29x14= 0};_0x5c29x14= Math[_0xd587[160]](_0x5c29x14,_0x5c29x3?_0x5c29x18[_0xd587[119]]:_0x5c29x18[_0xd587[117]]);null!= _0x5c29x13?_0x5c29x3?_0x5c29x18[_0xd587[235]]= _0x5c29x13[_0xd587[235]]+ _0x5c29x13[_0xd587[117]]+ this[_0xd587[657]]:_0x5c29x18[_0xd587[236]]= _0x5c29x13[_0xd587[236]]+ _0x5c29x13[_0xd587[119]]+ this[_0xd587[657]]:this[_0xd587[1734]]|| (_0x5c29x3?_0x5c29x18[_0xd587[235]]= _0x5c29xa:_0x5c29x18[_0xd587[236]]= _0x5c29x12);_0x5c29x3?_0x5c29x18[_0xd587[236]]= _0x5c29x12:_0x5c29x18[_0xd587[235]]= _0x5c29xa;this[_0xd587[1334]]&& 0< _0x5c29x9&& (_0x5c29x3?_0x5c29x18[_0xd587[119]]= _0x5c29x9:_0x5c29x18[_0xd587[117]]= _0x5c29x9);_0x5c29x4[_0xd587[1724]](_0x5c29x17,_0x5c29x18);_0x5c29x13= _0x5c29x18}}};this[_0xd587[1735]]&& null!= _0x5c29x5&& null!= _0x5c29x13&& !this[_0xd587[1179]][_0xd587[1742]](_0x5c29x2)?(_0x5c29x5= _0x5c29x5[_0xd587[238]](),_0x5c29x3?_0x5c29x5[_0xd587[117]]= _0x5c29x13[_0xd587[235]]+ _0x5c29x13[_0xd587[117]]+ this[_0xd587[657]]:_0x5c29x5[_0xd587[119]]= _0x5c29x13[_0xd587[236]]+ _0x5c29x13[_0xd587[119]]+ this[_0xd587[657]],_0x5c29x4[_0xd587[1724]](_0x5c29x2,_0x5c29x5)):this[_0xd587[1736]]&& (null!= _0x5c29x5&& null!= _0x5c29x13)&& (_0x5c29x3?_0x5c29x13[_0xd587[117]]= _0x5c29x5[_0xd587[117]]- _0x5c29x13[_0xd587[235]]- this[_0xd587[657]]:_0x5c29x13[_0xd587[119]]= _0x5c29x5[_0xd587[119]]- _0x5c29x13[_0xd587[236]]- this[_0xd587[657]])}finally{_0x5c29x4[_0xd587[476]]()}}};function mxPartitionLayout(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){mxGraphLayout[_0xd587[239]](this,_0x5c29x2);this[_0xd587[662]]= null!= _0x5c29x3?_0x5c29x3:!0;this[_0xd587[657]]= _0x5c29x4|| 0;this[_0xd587[467]]= _0x5c29x5|| 0}mxPartitionLayout[_0xd587[202]]=  new mxGraphLayout;mxPartitionLayout[_0xd587[202]][_0xd587[196]]= mxPartitionLayout;mxPartitionLayout[_0xd587[202]][_0xd587[662]]= null;mxPartitionLayout[_0xd587[202]][_0xd587[657]]= null;mxPartitionLayout[_0xd587[202]][_0xd587[467]]= null;mxPartitionLayout[_0xd587[202]][_0xd587[1743]]=  !0;mxPartitionLayout[_0xd587[202]][_0xd587[1737]]= function(){return this[_0xd587[662]]};mxPartitionLayout[_0xd587[202]][_0xd587[1702]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x4= this[_0xd587[1179]][_0xd587[502]]();var _0x5c29x5=_0x5c29x4[_0xd587[1197]](_0x5c29x2);if(null!= _0x5c29x2&& null!= _0x5c29x5){for(var _0x5c29x9=0,_0x5c29xa=0,_0x5c29x12=_0x5c29x4[_0xd587[262]](_0x5c29x5),_0x5c29x9=0;_0x5c29x9< _0x5c29x12;_0x5c29x9++){var _0x5c29x13=_0x5c29x4[_0xd587[263]](_0x5c29x5,_0x5c29x9),_0x5c29x13=this[_0xd587[1726]](_0x5c29x13);if(null!= _0x5c29x13){_0x5c29x13= _0x5c29x13[_0xd587[235]]+ _0x5c29x13[_0xd587[117]]/ 2;if(_0x5c29xa< _0x5c29x3&& _0x5c29x13> _0x5c29x3){break};_0x5c29xa= _0x5c29x13}};_0x5c29x3= _0x5c29x5[_0xd587[1738]](_0x5c29x2);_0x5c29x3= Math[_0xd587[160]](0,_0x5c29x9- (_0x5c29x9> _0x5c29x3?1:0));_0x5c29x4[_0xd587[99]](_0x5c29x5,_0x5c29x2,_0x5c29x3)}};mxPartitionLayout[_0xd587[202]][_0xd587[350]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1737]](),_0x5c29x4=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x5=_0x5c29x4[_0xd587[1721]](_0x5c29x2);if(null!= this[_0xd587[1179]][_0xd587[526]]&& (null== _0x5c29x5&& _0x5c29x4[_0xd587[1740]](_0x5c29x2)|| _0x5c29x2== this[_0xd587[1179]][_0xd587[249]]()[_0xd587[1741]])){_0x5c29x5=  new mxRectangle(0,0,this[_0xd587[1179]][_0xd587[526]][_0xd587[359]]- 1,this[_0xd587[1179]][_0xd587[526]][_0xd587[167]]- 1)};if(null!= _0x5c29x5){for(var _0x5c29x9=[],_0x5c29xa=_0x5c29x4[_0xd587[262]](_0x5c29x2),_0x5c29x12=0;_0x5c29x12< _0x5c29xa;_0x5c29x12++){var _0x5c29x13=_0x5c29x4[_0xd587[263]](_0x5c29x2,_0x5c29x12);!this[_0xd587[1713]](_0x5c29x13)&& this[_0xd587[1711]](_0x5c29x13)&& _0x5c29x9[_0xd587[207]](_0x5c29x13)};_0x5c29xa= _0x5c29x9[_0xd587[67]];if(0< _0x5c29xa){var _0x5c29x14=this[_0xd587[467]],_0x5c29x15=this[_0xd587[467]],_0x5c29x16=_0x5c29x3?_0x5c29x5[_0xd587[119]]:_0x5c29x5[_0xd587[117]],_0x5c29x16=_0x5c29x16- 2* this[_0xd587[467]];_0x5c29x2= this[_0xd587[1179]][_0xd587[1730]](_0x5c29x2)?this[_0xd587[1179]][_0xd587[1731]](_0x5c29x2): new mxRectangle;_0x5c29x16-= _0x5c29x3?_0x5c29x2[_0xd587[119]]:_0x5c29x2[_0xd587[117]];_0x5c29x14+= _0x5c29x2[_0xd587[117]];_0x5c29x15+= _0x5c29x2[_0xd587[119]];_0x5c29x2= this[_0xd587[467]]+ (_0x5c29xa- 1)* this[_0xd587[657]];_0x5c29x5= _0x5c29x3?(_0x5c29x5[_0xd587[117]]- _0x5c29x14- _0x5c29x2)/ _0x5c29xa:(_0x5c29x5[_0xd587[119]]- _0x5c29x15- _0x5c29x2)/ _0x5c29xa;if(0< _0x5c29x5){_0x5c29x4[_0xd587[473]]();try{for(_0x5c29x12= 0;_0x5c29x12< _0x5c29xa;_0x5c29x12++){var _0x5c29x13=_0x5c29x9[_0x5c29x12],_0x5c29x17=_0x5c29x4[_0xd587[1721]](_0x5c29x13);null!= _0x5c29x17&& (_0x5c29x17= _0x5c29x17[_0xd587[238]](),_0x5c29x17[_0xd587[235]]= _0x5c29x14,_0x5c29x17[_0xd587[236]]= _0x5c29x15,_0x5c29x3?(this[_0xd587[1743]]&& (_0x5c29x17[_0xd587[117]]= _0x5c29x5,_0x5c29x17[_0xd587[119]]= _0x5c29x16),_0x5c29x14+= _0x5c29x5+ this[_0xd587[657]]):(this[_0xd587[1743]]&& (_0x5c29x17[_0xd587[119]]= _0x5c29x5,_0x5c29x17[_0xd587[117]]= _0x5c29x16),_0x5c29x15+= _0x5c29x5+ this[_0xd587[657]]),_0x5c29x4[_0xd587[1724]](_0x5c29x13,_0x5c29x17))}}finally{_0x5c29x4[_0xd587[476]]()}}}}};function mxCompactTreeLayout(_0x5c29x2,_0x5c29x3,_0x5c29x4){mxGraphLayout[_0xd587[239]](this,_0x5c29x2);this[_0xd587[662]]= null!= _0x5c29x3?_0x5c29x3:!0;this[_0xd587[1744]]= null!= _0x5c29x4?_0x5c29x4:!1}mxCompactTreeLayout[_0xd587[202]]=  new mxGraphLayout;mxCompactTreeLayout[_0xd587[202]][_0xd587[196]]= mxCompactTreeLayout;mxCompactTreeLayout[_0xd587[202]][_0xd587[662]]= null;mxCompactTreeLayout[_0xd587[202]][_0xd587[1744]]= null;mxCompactTreeLayout[_0xd587[202]][_0xd587[1735]]=  !0;mxCompactTreeLayout[_0xd587[202]][_0xd587[1745]]= 10;mxCompactTreeLayout[_0xd587[202]][_0xd587[1746]]= null;mxCompactTreeLayout[_0xd587[202]][_0xd587[1747]]=  !1;mxCompactTreeLayout[_0xd587[202]][_0xd587[1748]]= 10;mxCompactTreeLayout[_0xd587[202]][_0xd587[1749]]= 20;mxCompactTreeLayout[_0xd587[202]][_0xd587[1750]]=  !0;mxCompactTreeLayout[_0xd587[202]][_0xd587[1751]]= 5;mxCompactTreeLayout[_0xd587[202]][_0xd587[1752]]= 4;mxCompactTreeLayout[_0xd587[202]][_0xd587[1753]]= 8;mxCompactTreeLayout[_0xd587[202]][_0xd587[1754]]= 4;mxCompactTreeLayout[_0xd587[202]][_0xd587[1755]]=  !0;mxCompactTreeLayout[_0xd587[202]][_0xd587[1713]]= function(_0x5c29x2){return mxGraphLayout[_0xd587[202]][_0xd587[1713]][_0xd587[183]](this,arguments)|| 0== this[_0xd587[1179]][_0xd587[1756]](_0x5c29x2)[_0xd587[67]]};mxCompactTreeLayout[_0xd587[202]][_0xd587[1737]]= function(){return this[_0xd587[662]]};mxCompactTreeLayout[_0xd587[202]][_0xd587[350]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[1101]]= _0x5c29x2;var _0x5c29x4=this[_0xd587[1179]][_0xd587[502]]();if(null== _0x5c29x3){if(0< this[_0xd587[1179]][_0xd587[264]](_0x5c29x2,_0x5c29x4[_0xd587[1197]](_0x5c29x2),this[_0xd587[1744]],!this[_0xd587[1744]],!1)[_0xd587[67]]){_0x5c29x3= _0x5c29x2}else {var _0x5c29x5=this[_0xd587[1179]][_0xd587[1757]](_0x5c29x2,!0,this[_0xd587[1744]]);if(0< _0x5c29x5[_0xd587[67]]){for(var _0x5c29x9=0;_0x5c29x9< _0x5c29x5[_0xd587[67]];_0x5c29x9++){if(!this[_0xd587[1713]](_0x5c29x5[_0x5c29x9])&& 0< this[_0xd587[1179]][_0xd587[264]](_0x5c29x5[_0x5c29x9],null,this[_0xd587[1744]],!this[_0xd587[1744]],!1)[_0xd587[67]]){_0x5c29x3= _0x5c29x5[_0x5c29x9];break}}}}};if(null!= _0x5c29x3){this[_0xd587[1746]]= this[_0xd587[1735]]?{}:null;_0x5c29x4[_0xd587[473]]();try{var _0x5c29xa=this[_0xd587[1758]](_0x5c29x3,_0x5c29x2);if(null!= _0x5c29xa){this[_0xd587[1759]](_0x5c29xa);var _0x5c29x12=this[_0xd587[1179]][_0xd587[1020]],_0x5c29x5=_0x5c29x12;if(!this[_0xd587[1747]]){var _0x5c29x13=this[_0xd587[1726]](_0x5c29x3);null!= _0x5c29x13&& (_0x5c29x12= _0x5c29x13[_0xd587[235]],_0x5c29x5= _0x5c29x13[_0xd587[236]])};_0x5c29x13= null;_0x5c29x13= this[_0xd587[1737]]()?this[_0xd587[1760]](_0x5c29xa,_0x5c29x12,_0x5c29x5):this[_0xd587[1761]](_0x5c29xa,null,_0x5c29x12,_0x5c29x5);if(null!= _0x5c29x13){var _0x5c29x14=_0x5c29x9= 0;0> _0x5c29x13[_0xd587[235]]&& (_0x5c29x9= Math[_0xd587[425]](_0x5c29x12- _0x5c29x13[_0xd587[235]]));0> _0x5c29x13[_0xd587[236]]&& (_0x5c29x14= Math[_0xd587[425]](_0x5c29x5- _0x5c29x13[_0xd587[236]]));(0!= _0x5c29x9|| 0!= _0x5c29x14)&& this[_0xd587[1762]](_0x5c29xa,_0x5c29x9,_0x5c29x14);this[_0xd587[1735]]&& this[_0xd587[1763]]();this[_0xd587[1755]]&& this[_0xd587[1764]](_0x5c29xa)}}}finally{_0x5c29x4[_0xd587[476]]()}}};mxCompactTreeLayout[_0xd587[202]][_0xd587[1762]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x2[_0xd587[235]]+= _0x5c29x3;_0x5c29x2[_0xd587[236]]+= _0x5c29x4;this[_0xd587[183]](_0x5c29x2);for(_0x5c29x2= _0x5c29x2[_0xd587[247]];null!= _0x5c29x2;){this[_0xd587[1762]](_0x5c29x2,_0x5c29x3,_0x5c29x4),_0x5c29x2= _0x5c29x2[_0xd587[1765]]}};mxCompactTreeLayout[_0xd587[202]][_0xd587[1758]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:[];var _0x5c29x5=mxCellPath[_0xd587[385]](_0x5c29x2),_0x5c29x9=null;if(null!= _0x5c29x2&& null== _0x5c29x4[_0x5c29x5]&& !this[_0xd587[1713]](_0x5c29x2)){_0x5c29x4[_0x5c29x5]= _0x5c29x2;var _0x5c29x9=this[_0xd587[1766]](_0x5c29x2),_0x5c29x5=this[_0xd587[1179]][_0xd587[502]](),_0x5c29xa=null;_0x5c29x2= this[_0xd587[1179]][_0xd587[264]](_0x5c29x2,_0x5c29x3,this[_0xd587[1744]],!this[_0xd587[1744]],!1,!0);for(var _0x5c29x12=this[_0xd587[1179]][_0xd587[249]](),_0x5c29x13=0;_0x5c29x13< _0x5c29x2[_0xd587[67]];_0x5c29x13++){var _0x5c29x14=_0x5c29x2[_0x5c29x13];if(!this[_0xd587[1715]](_0x5c29x14)){this[_0xd587[1750]]&& this[_0xd587[1722]](_0x5c29x14,null);this[_0xd587[1755]]&& (this[_0xd587[1716]](_0x5c29x14,!1),this[_0xd587[1722]](_0x5c29x14,null));var _0x5c29x15=_0x5c29x12[_0xd587[248]](_0x5c29x14),_0x5c29x14=null!= _0x5c29x15?_0x5c29x15[_0xd587[1710]](this[_0xd587[1744]]):_0x5c29x12[_0xd587[1710]](_0x5c29x14,this[_0xd587[1744]]),_0x5c29x15=this[_0xd587[1758]](_0x5c29x14,_0x5c29x3,_0x5c29x4);null!= _0x5c29x15&& null!= _0x5c29x5[_0xd587[1721]](_0x5c29x14)&& (null== _0x5c29xa?_0x5c29x9[_0xd587[247]]= _0x5c29x15:_0x5c29xa[_0xd587[1765]]= _0x5c29x15,_0x5c29xa= _0x5c29x15)}}};return _0x5c29x9};mxCompactTreeLayout[_0xd587[202]][_0xd587[1759]]= function(_0x5c29x2){if(null!= _0x5c29x2){for(var _0x5c29x3=_0x5c29x2[_0xd587[247]];null!= _0x5c29x3;){this[_0xd587[1759]](_0x5c29x3),_0x5c29x3= _0x5c29x3[_0xd587[1765]]};null!= _0x5c29x2[_0xd587[247]]?this[_0xd587[1767]](_0x5c29x2,this[_0xd587[234]](_0x5c29x2)):this[_0xd587[1768]](_0x5c29x2)}};mxCompactTreeLayout[_0xd587[202]][_0xd587[1760]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x2[_0xd587[235]]+= _0x5c29x3+ _0x5c29x2[_0xd587[1769]];_0x5c29x2[_0xd587[236]]+= _0x5c29x4+ _0x5c29x2[_0xd587[1770]];_0x5c29x5= this[_0xd587[183]](_0x5c29x2,_0x5c29x5);_0x5c29x3= _0x5c29x2[_0xd587[247]];if(null!= _0x5c29x3){_0x5c29x5= this[_0xd587[1760]](_0x5c29x3,_0x5c29x2[_0xd587[235]],_0x5c29x2[_0xd587[236]],_0x5c29x5);_0x5c29x4= _0x5c29x2[_0xd587[236]]+ _0x5c29x3[_0xd587[1770]];for(var _0x5c29x9=_0x5c29x3[_0xd587[1765]];null!= _0x5c29x9;){_0x5c29x5= this[_0xd587[1760]](_0x5c29x9,_0x5c29x2[_0xd587[235]]+ _0x5c29x3[_0xd587[1769]],_0x5c29x4,_0x5c29x5),_0x5c29x4+= _0x5c29x9[_0xd587[1770]],_0x5c29x9= _0x5c29x9[_0xd587[1765]]}};return _0x5c29x5};mxCompactTreeLayout[_0xd587[202]][_0xd587[1761]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x2[_0xd587[235]]+= _0x5c29x4+ _0x5c29x2[_0xd587[1770]];_0x5c29x2[_0xd587[236]]+= _0x5c29x5+ _0x5c29x2[_0xd587[1769]];_0x5c29x9= this[_0xd587[183]](_0x5c29x2,_0x5c29x9);_0x5c29x3= _0x5c29x2[_0xd587[247]];if(null!= _0x5c29x3){_0x5c29x9= this[_0xd587[1761]](_0x5c29x3,_0x5c29x2,_0x5c29x2[_0xd587[235]],_0x5c29x2[_0xd587[236]],_0x5c29x9);_0x5c29x4= _0x5c29x2[_0xd587[235]]+ _0x5c29x3[_0xd587[1770]];for(_0x5c29x5= _0x5c29x3[_0xd587[1765]];null!= _0x5c29x5;){_0x5c29x9= this[_0xd587[1761]](_0x5c29x5,_0x5c29x2,_0x5c29x4,_0x5c29x2[_0xd587[236]]+ _0x5c29x3[_0xd587[1769]],_0x5c29x9),_0x5c29x4+= _0x5c29x5[_0xd587[1770]],_0x5c29x5= _0x5c29x5[_0xd587[1765]]}};return _0x5c29x9};mxCompactTreeLayout[_0xd587[202]][_0xd587[1767]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1749]]+ this[_0xd587[1748]],_0x5c29x5=(_0x5c29x3- _0x5c29x2[_0xd587[117]])/ 2- this[_0xd587[1749]],_0x5c29x9=_0x5c29x5+ _0x5c29x2[_0xd587[117]]+ 2* this[_0xd587[1749]]- _0x5c29x3;_0x5c29x2[_0xd587[247]][_0xd587[1769]]= _0x5c29x4+ _0x5c29x2[_0xd587[119]];_0x5c29x2[_0xd587[247]][_0xd587[1770]]= _0x5c29x9;_0x5c29x2[_0xd587[1772]][_0xd587[1771]]= this[_0xd587[1773]](_0x5c29x2[_0xd587[119]],0,this[_0xd587[1773]](_0x5c29x4,_0x5c29x9,_0x5c29x2[_0xd587[1772]][_0xd587[1771]]));_0x5c29x2[_0xd587[1772]][_0xd587[1774]]= this[_0xd587[1773]](_0x5c29x2[_0xd587[119]],0,this[_0xd587[1773]](_0x5c29x4,_0x5c29x5,_0x5c29x2[_0xd587[1772]][_0xd587[1774]]))};mxCompactTreeLayout[_0xd587[202]][_0xd587[1768]]= function(_0x5c29x2){var _0x5c29x3=2* this[_0xd587[1749]];_0x5c29x2[_0xd587[1772]][_0xd587[1775]]= this[_0xd587[1773]](_0x5c29x2[_0xd587[119]]+ _0x5c29x3,0);_0x5c29x2[_0xd587[1772]][_0xd587[1771]]= _0x5c29x2[_0xd587[1772]][_0xd587[1775]];_0x5c29x2[_0xd587[1772]][_0xd587[1776]]= this[_0xd587[1773]](0,-_0x5c29x2[_0xd587[117]]- _0x5c29x3);_0x5c29x2[_0xd587[1772]][_0xd587[1774]]= this[_0xd587[1773]](_0x5c29x2[_0xd587[119]]+ _0x5c29x3,0,_0x5c29x2[_0xd587[1772]][_0xd587[1776]])};mxCompactTreeLayout[_0xd587[202]][_0xd587[234]]= function(_0x5c29x2){var _0x5c29x3=2* this[_0xd587[1749]],_0x5c29x4=_0x5c29x2[_0xd587[247]];_0x5c29x2[_0xd587[1772]]= _0x5c29x4[_0xd587[1772]];for(var _0x5c29x5=_0x5c29x4[_0xd587[117]]+ _0x5c29x3,_0x5c29x9=_0x5c29x5,_0x5c29x4=_0x5c29x4[_0xd587[1765]];null!= _0x5c29x4;){var _0x5c29xa=this[_0xd587[1777]](_0x5c29x2[_0xd587[1772]],_0x5c29x4[_0xd587[1772]]);_0x5c29x4[_0xd587[1770]]= _0x5c29xa+ _0x5c29x5;_0x5c29x4[_0xd587[1769]]= 0;_0x5c29x5= _0x5c29x4[_0xd587[117]]+ _0x5c29x3;_0x5c29x9+= _0x5c29xa+ _0x5c29x5;_0x5c29x4= _0x5c29x4[_0xd587[1765]]};return _0x5c29x9};mxCompactTreeLayout[_0xd587[202]][_0xd587[1777]]= function(_0x5c29x2,_0x5c29x3){for(var _0x5c29x4=0,_0x5c29x5=0,_0x5c29x9=0,_0x5c29xa=_0x5c29x2[_0xd587[1774]],_0x5c29x12=_0x5c29x3[_0xd587[1771]];null!= _0x5c29x12&& null!= _0x5c29xa;){var _0x5c29x13=this[_0xd587[1368]](_0x5c29x4,_0x5c29x5,_0x5c29x12[_0xd587[1126]],_0x5c29x12[_0xd587[1125]],_0x5c29xa[_0xd587[1126]],_0x5c29xa[_0xd587[1125]]),_0x5c29x5=_0x5c29x5+ _0x5c29x13,_0x5c29x9=_0x5c29x9+ _0x5c29x13;_0x5c29x4+ _0x5c29x12[_0xd587[1126]]<= _0x5c29xa[_0xd587[1126]]?(_0x5c29x4+= _0x5c29x12[_0xd587[1126]],_0x5c29x5+= _0x5c29x12[_0xd587[1125]],_0x5c29x12= _0x5c29x12[_0xd587[1765]]):(_0x5c29x4-= _0x5c29xa[_0xd587[1126]],_0x5c29x5-= _0x5c29xa[_0xd587[1125]],_0x5c29xa= _0x5c29xa[_0xd587[1765]])};null!= _0x5c29x12?(_0x5c29x4= this[_0xd587[1778]](_0x5c29x2[_0xd587[1775]],0,0,_0x5c29x12,_0x5c29x4,_0x5c29x5),_0x5c29x2[_0xd587[1775]]= null!= _0x5c29x4[_0xd587[1765]]?_0x5c29x3[_0xd587[1775]]:_0x5c29x4,_0x5c29x2[_0xd587[1776]]= _0x5c29x3[_0xd587[1776]]):(_0x5c29x4= this[_0xd587[1778]](_0x5c29x3[_0xd587[1776]],_0x5c29x4,_0x5c29x5,_0x5c29xa,0,0),null== _0x5c29x4[_0xd587[1765]]&& (_0x5c29x2[_0xd587[1776]]= _0x5c29x4));_0x5c29x2[_0xd587[1774]]= _0x5c29x3[_0xd587[1774]];return _0x5c29x9};mxCompactTreeLayout[_0xd587[202]][_0xd587[1368]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){var _0x5c29x12=0;if(_0x5c29x9<= _0x5c29x2|| 0>= _0x5c29x2+ _0x5c29x4){return 0};_0x5c29x12= 0< _0x5c29x9* _0x5c29x5- _0x5c29x4* _0x5c29xa?0> _0x5c29x2?_0x5c29x2* _0x5c29x5/ _0x5c29x4- _0x5c29x3:0< _0x5c29x2?_0x5c29x2* _0x5c29xa/ _0x5c29x9- _0x5c29x3:-_0x5c29x3:_0x5c29x9< _0x5c29x2+ _0x5c29x4?_0x5c29xa- (_0x5c29x3+ (_0x5c29x9- _0x5c29x2)* _0x5c29x5/ _0x5c29x4):_0x5c29x9> _0x5c29x2+ _0x5c29x4?(_0x5c29x4+ _0x5c29x2)* _0x5c29xa/ _0x5c29x9- (_0x5c29x3+ _0x5c29x5):_0x5c29xa- (_0x5c29x3+ _0x5c29x5);return 0< _0x5c29x12?_0x5c29x12:0};mxCompactTreeLayout[_0xd587[202]][_0xd587[1778]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){_0x5c29x3= _0x5c29x9+ _0x5c29x5[_0xd587[1126]]- _0x5c29x3;_0x5c29x9= _0x5c29x9= 0;0== _0x5c29x5[_0xd587[1126]]?_0x5c29x9= _0x5c29x5[_0xd587[1125]]:(_0x5c29x9= _0x5c29x3* _0x5c29x5[_0xd587[1125]],_0x5c29x9/= _0x5c29x5[_0xd587[1126]]);_0x5c29x3= this[_0xd587[1773]](_0x5c29x3,_0x5c29x9,_0x5c29x5[_0xd587[1765]]);_0x5c29x2[_0xd587[1765]]= this[_0xd587[1773]](0,_0x5c29xa+ _0x5c29x5[_0xd587[1125]]- _0x5c29x9- _0x5c29x4,_0x5c29x3);return _0x5c29x3};mxCompactTreeLayout[_0xd587[202]][_0xd587[1766]]= function(_0x5c29x2){var _0x5c29x3={};_0x5c29x3[_0xd587[246]]= _0x5c29x2;_0x5c29x3[_0xd587[235]]= 0;_0x5c29x3[_0xd587[236]]= 0;_0x5c29x3[_0xd587[117]]= 0;_0x5c29x3[_0xd587[119]]= 0;_0x5c29x2= this[_0xd587[1726]](_0x5c29x2);null!= _0x5c29x2&& (this[_0xd587[1737]]()?(_0x5c29x3[_0xd587[117]]= _0x5c29x2[_0xd587[119]],_0x5c29x3[_0xd587[119]]= _0x5c29x2[_0xd587[117]]):(_0x5c29x3[_0xd587[117]]= _0x5c29x2[_0xd587[117]],_0x5c29x3[_0xd587[119]]= _0x5c29x2[_0xd587[119]]));_0x5c29x3[_0xd587[1769]]= 0;_0x5c29x3[_0xd587[1770]]= 0;_0x5c29x3[_0xd587[1772]]= {};return _0x5c29x3};mxCompactTreeLayout[_0xd587[202]][_0xd587[183]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x5=_0x5c29x2[_0xd587[246]],_0x5c29x9=_0x5c29x4[_0xd587[1721]](_0x5c29x5);null!= _0x5c29x5&& null!= _0x5c29x9&& (this[_0xd587[1711]](_0x5c29x5)&& (_0x5c29x9= this[_0xd587[1725]](_0x5c29x5,_0x5c29x2[_0xd587[235]],_0x5c29x2[_0xd587[236]]),this[_0xd587[1735]]&& (_0x5c29x4= _0x5c29x4[_0xd587[1197]](_0x5c29x5),_0x5c29x5= mxCellPath[_0xd587[385]](_0x5c29x4),null== this[_0xd587[1746]][_0x5c29x5]&& (this[_0xd587[1746]][_0x5c29x5]= _0x5c29x4))),_0x5c29x3= null== _0x5c29x3? new mxRectangle(_0x5c29x9[_0xd587[235]],_0x5c29x9[_0xd587[236]],_0x5c29x9[_0xd587[117]],_0x5c29x9[_0xd587[119]]): new mxRectangle(Math[_0xd587[243]](_0x5c29x3[_0xd587[235]],_0x5c29x9[_0xd587[235]]),Math[_0xd587[243]](_0x5c29x3[_0xd587[236]],_0x5c29x9[_0xd587[236]]),Math[_0xd587[160]](_0x5c29x3[_0xd587[235]]+ _0x5c29x3[_0xd587[117]],_0x5c29x9[_0xd587[235]]+ _0x5c29x9[_0xd587[117]]),Math[_0xd587[160]](_0x5c29x3[_0xd587[236]]+ _0x5c29x3[_0xd587[119]],_0x5c29x9[_0xd587[236]]+ _0x5c29x9[_0xd587[119]])));return _0x5c29x3};mxCompactTreeLayout[_0xd587[202]][_0xd587[1773]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5={};_0x5c29x5[_0xd587[1126]]= _0x5c29x2;_0x5c29x5[_0xd587[1125]]= _0x5c29x3;_0x5c29x5[_0xd587[1765]]= _0x5c29x4;return _0x5c29x5};mxCompactTreeLayout[_0xd587[202]][_0xd587[1763]]= function(){var _0x5c29x2=[],_0x5c29x3;for(_0x5c29x3 in this[_0xd587[1746]]){_0x5c29x2[_0xd587[207]](this[_0xd587[1746]][_0x5c29x3])};this[_0xd587[1727]](mxUtils[_0xd587[1779]](_0x5c29x2,!0),this[_0xd587[1745]])};mxCompactTreeLayout[_0xd587[202]][_0xd587[1764]]= function(_0x5c29x2){this[_0xd587[1780]](_0x5c29x2);for(_0x5c29x2= _0x5c29x2[_0xd587[247]];null!= _0x5c29x2;){this[_0xd587[1764]](_0x5c29x2),_0x5c29x2= _0x5c29x2[_0xd587[1765]]}};mxCompactTreeLayout[_0xd587[202]][_0xd587[1780]]= function(_0x5c29x2){for(var _0x5c29x3=_0x5c29x2[_0xd587[247]],_0x5c29x4=_0x5c29x2[_0xd587[246]],_0x5c29x5=0,_0x5c29x9=[];null!= _0x5c29x3;){_0x5c29x5++;var _0x5c29xa=_0x5c29x3[_0xd587[235]];this[_0xd587[662]]&& (_0x5c29xa= _0x5c29x3[_0xd587[236]]);_0x5c29x9[_0xd587[207]]( new WeightedCellSorter(_0x5c29x3,_0x5c29xa));_0x5c29x3= _0x5c29x3[_0xd587[1765]]};_0x5c29x9[_0xd587[470]](WeightedCellSorter[_0xd587[202]][_0xd587[469]]);var _0x5c29xa=_0x5c29x2[_0xd587[117]],_0x5c29x12=(_0x5c29x5+ 1)* this[_0xd587[1751]];_0x5c29xa> _0x5c29x12+ 2* this[_0xd587[1751]]&& (_0x5c29xa-= 2* this[_0xd587[1751]]);_0x5c29x2= _0x5c29xa/ _0x5c29x5;_0x5c29x3= _0x5c29x2/ 2;_0x5c29xa> _0x5c29x12+ 2* this[_0xd587[1751]]&& (_0x5c29x3+= this[_0xd587[1751]]);for(var _0x5c29xa=this[_0xd587[1753]]- this[_0xd587[1752]],_0x5c29x12=0,_0x5c29x13=this[_0xd587[1726]](_0x5c29x4),_0x5c29x14=0;_0x5c29x14< _0x5c29x9[_0xd587[67]];_0x5c29x14++){for(var _0x5c29x15=_0x5c29x9[_0x5c29x14][_0xd587[246]][_0xd587[246]],_0x5c29x16=this[_0xd587[1726]](_0x5c29x15),_0x5c29x15=this[_0xd587[1179]][_0xd587[1781]](_0x5c29x4,_0x5c29x15,!1),_0x5c29x17=[],_0x5c29x18=0,_0x5c29x19=0,_0x5c29x1a=0;_0x5c29x1a< _0x5c29x15[_0xd587[67]];_0x5c29x1a++){this[_0xd587[662]]?(_0x5c29x18= _0x5c29x13[_0xd587[235]]+ _0x5c29x13[_0xd587[117]],_0x5c29x19= _0x5c29x13[_0xd587[236]]+ _0x5c29x3,_0x5c29x17[_0xd587[207]]( new mxPoint(_0x5c29x18,_0x5c29x19)),_0x5c29x18= _0x5c29x13[_0xd587[235]]+ _0x5c29x13[_0xd587[117]]+ _0x5c29xa,_0x5c29x17[_0xd587[207]]( new mxPoint(_0x5c29x18,_0x5c29x19)),_0x5c29x19= _0x5c29x16[_0xd587[236]]+ _0x5c29x16[_0xd587[119]]/ 2):(_0x5c29x18= _0x5c29x13[_0xd587[235]]+ _0x5c29x3,_0x5c29x19= _0x5c29x13[_0xd587[236]]+ _0x5c29x13[_0xd587[119]],_0x5c29x17[_0xd587[207]]( new mxPoint(_0x5c29x18,_0x5c29x19)),_0x5c29x19= _0x5c29x13[_0xd587[236]]+ _0x5c29x13[_0xd587[119]]+ _0x5c29xa,_0x5c29x17[_0xd587[207]]( new mxPoint(_0x5c29x18,_0x5c29x19)),_0x5c29x18= _0x5c29x16[_0xd587[235]]+ _0x5c29x16[_0xd587[117]]/ 2),_0x5c29x17[_0xd587[207]]( new mxPoint(_0x5c29x18,_0x5c29x19)),this[_0xd587[1722]](_0x5c29x15[_0x5c29x1a],_0x5c29x17)};_0x5c29x14< _0x5c29x5/ 2?_0x5c29xa+= this[_0xd587[1752]]:_0x5c29x14> _0x5c29x5/ 2&& (_0x5c29xa-= this[_0xd587[1752]]);_0x5c29x3+= _0x5c29x2;_0x5c29x12= Math[_0xd587[160]](_0x5c29x12,_0x5c29xa)}};function WeightedCellSorter(_0x5c29x2,_0x5c29x3){this[_0xd587[246]]= _0x5c29x2;this[_0xd587[1782]]= _0x5c29x3}WeightedCellSorter[_0xd587[202]][_0xd587[1782]]= 0;WeightedCellSorter[_0xd587[202]][_0xd587[1783]]=  !1;WeightedCellSorter[_0xd587[202]][_0xd587[1784]]=  !1;WeightedCellSorter[_0xd587[202]][_0xd587[1785]]= null;WeightedCellSorter[_0xd587[202]][_0xd587[246]]= null;WeightedCellSorter[_0xd587[202]][_0xd587[469]]= function(_0x5c29x2,_0x5c29x3){return null!= _0x5c29x2&& null!= _0x5c29x3?_0x5c29x3[_0xd587[1782]]> _0x5c29x2[_0xd587[1782]]?1:_0x5c29x3[_0xd587[1782]]< _0x5c29x2[_0xd587[1782]]?-1:_0x5c29x3[_0xd587[1783]]?1:-1:0};function mxFastOrganicLayout(_0x5c29x2){mxGraphLayout[_0xd587[239]](this,_0x5c29x2)}mxFastOrganicLayout[_0xd587[202]]=  new mxGraphLayout;mxFastOrganicLayout[_0xd587[202]][_0xd587[196]]= mxFastOrganicLayout;mxFastOrganicLayout[_0xd587[202]][_0xd587[1786]]=  !0;mxFastOrganicLayout[_0xd587[202]][_0xd587[1750]]=  !0;mxFastOrganicLayout[_0xd587[202]][_0xd587[1787]]=  !0;mxFastOrganicLayout[_0xd587[202]][_0xd587[1788]]= 50;mxFastOrganicLayout[_0xd587[202]][_0xd587[1789]]= 0;mxFastOrganicLayout[_0xd587[202]][_0xd587[1790]]= 2;mxFastOrganicLayout[_0xd587[202]][_0xd587[1791]]= 500;mxFastOrganicLayout[_0xd587[202]][_0xd587[1792]]= 4;mxFastOrganicLayout[_0xd587[202]][_0xd587[1793]]= 200;mxFastOrganicLayout[_0xd587[202]][_0xd587[1794]]= 0;mxFastOrganicLayout[_0xd587[202]][_0xd587[1795]]= 0;mxFastOrganicLayout[_0xd587[202]][_0xd587[1796]]= 0;mxFastOrganicLayout[_0xd587[202]][_0xd587[1797]]=  !0;mxFastOrganicLayout[_0xd587[202]][_0xd587[1713]]= function(_0x5c29x2){return mxGraphLayout[_0xd587[202]][_0xd587[1713]][_0xd587[183]](this,arguments)|| 0== this[_0xd587[1179]][_0xd587[1756]](_0x5c29x2)[_0xd587[67]]};mxFastOrganicLayout[_0xd587[202]][_0xd587[350]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1179]][_0xd587[502]]();this[_0xd587[1798]]= [];for(var _0x5c29x4=this[_0xd587[1179]][_0xd587[1728]](_0x5c29x2),_0x5c29x5=0;_0x5c29x5< _0x5c29x4[_0xd587[67]];_0x5c29x5++){this[_0xd587[1713]](_0x5c29x4[_0x5c29x5])|| this[_0xd587[1798]][_0xd587[207]](_0x5c29x4[_0x5c29x5])};var _0x5c29x9=this[_0xd587[1786]]?this[_0xd587[1179]][_0xd587[441]][_0xd587[1799]](this[_0xd587[1798]]):null,_0x5c29xa=this[_0xd587[1798]][_0xd587[67]];this[_0xd587[1800]]= [];this[_0xd587[1801]]= [];this[_0xd587[1802]]= [];this[_0xd587[1803]]= [];this[_0xd587[1804]]= [];this[_0xd587[1805]]= [];this[_0xd587[1806]]= [];this[_0xd587[1807]]= [];0.0010> this[_0xd587[1788]]&& (this[_0xd587[1788]]= 0.0010);this[_0xd587[1789]]= this[_0xd587[1788]]* this[_0xd587[1788]];for(_0x5c29x5= 0;_0x5c29x5< this[_0xd587[1798]][_0xd587[67]];_0x5c29x5++){var _0x5c29x12=this[_0xd587[1798]][_0x5c29x5];this[_0xd587[1803]][_0x5c29x5]= [];var _0x5c29x13=mxCellPath[_0xd587[385]](_0x5c29x12);this[_0xd587[1800]][_0x5c29x13]= _0x5c29x5;var _0x5c29x14=this[_0xd587[1726]](_0x5c29x12),_0x5c29x15=_0x5c29x14[_0xd587[117]],_0x5c29x16=_0x5c29x14[_0xd587[119]],_0x5c29x17=_0x5c29x14[_0xd587[235]],_0x5c29x18=_0x5c29x14[_0xd587[236]];this[_0xd587[1803]][_0x5c29x5][0]= _0x5c29x17+ _0x5c29x15/ 2;this[_0xd587[1803]][_0x5c29x5][1]= _0x5c29x18+ _0x5c29x16/ 2;this[_0xd587[1806]][_0x5c29x5]= Math[_0xd587[243]](_0x5c29x15,_0x5c29x16);this[_0xd587[1807]][_0x5c29x5]= this[_0xd587[1806]][_0x5c29x5]* this[_0xd587[1806]][_0x5c29x5]};_0x5c29x3[_0xd587[473]]();try{for(_0x5c29x5= 0;_0x5c29x5< _0x5c29xa;_0x5c29x5++){this[_0xd587[1801]][_0x5c29x5]= 0;this[_0xd587[1802]][_0x5c29x5]= 0;this[_0xd587[1804]][_0x5c29x5]= this[_0xd587[1711]](this[_0xd587[1798]][_0x5c29x5]);var _0x5c29x19=this[_0xd587[1179]][_0xd587[1756]](this[_0xd587[1798]][_0x5c29x5],_0x5c29x2),_0x5c29x4=this[_0xd587[1179]][_0xd587[1808]](_0x5c29x19,this[_0xd587[1798]][_0x5c29x5]);this[_0xd587[1805]][_0x5c29x5]= [];for(_0x5c29x15= 0;_0x5c29x15< _0x5c29x4[_0xd587[67]];_0x5c29x15++){this[_0xd587[1750]]&& this[_0xd587[1179]][_0xd587[1809]](_0x5c29x19[_0x5c29x15]);this[_0xd587[1787]]&& this[_0xd587[1716]](_0x5c29x19[_0x5c29x15],!1);var _0x5c29x13=mxCellPath[_0xd587[385]](_0x5c29x4[_0x5c29x15]),_0x5c29x1a=this[_0xd587[1800]][_0x5c29x13];this[_0xd587[1805]][_0x5c29x5][_0x5c29x15]= null!= _0x5c29x1a?_0x5c29x1a:_0x5c29x5}};this[_0xd587[1794]]= this[_0xd587[1793]];0== this[_0xd587[1795]]&& (this[_0xd587[1795]]= 20* Math[_0xd587[428]](_0x5c29xa));for(this[_0xd587[1796]]= 0;this[_0xd587[1796]]< this[_0xd587[1795]];this[_0xd587[1796]]++){if(!this[_0xd587[1797]]){return};this[_0xd587[1810]]();this[_0xd587[1811]]();this[_0xd587[1812]]();this[_0xd587[1813]]()};_0x5c29x2= _0x5c29x4= null;for(_0x5c29x5= 0;_0x5c29x5< this[_0xd587[1798]][_0xd587[67]];_0x5c29x5++){_0x5c29x12= this[_0xd587[1798]][_0x5c29x5],this[_0xd587[1711]](_0x5c29x12)&& (_0x5c29x14= this[_0xd587[1726]](_0x5c29x12),null!= _0x5c29x14&& (this[_0xd587[1803]][_0x5c29x5][0]-= _0x5c29x14[_0xd587[117]]/ 2,this[_0xd587[1803]][_0x5c29x5][1]-= _0x5c29x14[_0xd587[119]]/ 2,_0x5c29x17= this[_0xd587[1179]][_0xd587[1021]](this[_0xd587[1803]][_0x5c29x5][0]),_0x5c29x18= this[_0xd587[1179]][_0xd587[1021]](this[_0xd587[1803]][_0x5c29x5][1]),this[_0xd587[1725]](_0x5c29x12,_0x5c29x17,_0x5c29x18),_0x5c29x4= null== _0x5c29x4?_0x5c29x17:Math[_0xd587[243]](_0x5c29x4,_0x5c29x17),_0x5c29x2= null== _0x5c29x2?_0x5c29x18:Math[_0xd587[243]](_0x5c29x2,_0x5c29x18)))};_0x5c29x5= -(_0x5c29x4|| 0)+ 1;_0x5c29x12= -(_0x5c29x2|| 0)+ 1;null!= _0x5c29x9&& (_0x5c29x5+= _0x5c29x9[_0xd587[235]],_0x5c29x12+= _0x5c29x9[_0xd587[236]]);this[_0xd587[1179]][_0xd587[834]](this[_0xd587[1798]],_0x5c29x5,_0x5c29x12)}finally{_0x5c29x3[_0xd587[476]]()}};mxFastOrganicLayout[_0xd587[202]][_0xd587[1812]]= function(){for(var _0x5c29x2=0;_0x5c29x2< this[_0xd587[1798]][_0xd587[67]];_0x5c29x2++){if(this[_0xd587[1804]][_0x5c29x2]){var _0x5c29x3=Math[_0xd587[428]](this[_0xd587[1801]][_0x5c29x2]* this[_0xd587[1801]][_0x5c29x2]+ this[_0xd587[1802]][_0x5c29x2]* this[_0xd587[1802]][_0x5c29x2]);0.0010> _0x5c29x3&& (_0x5c29x3= 0.0010);var _0x5c29x4=this[_0xd587[1801]][_0x5c29x2]/ _0x5c29x3* Math[_0xd587[243]](_0x5c29x3,this[_0xd587[1794]]),_0x5c29x3=this[_0xd587[1802]][_0x5c29x2]/ _0x5c29x3* Math[_0xd587[243]](_0x5c29x3,this[_0xd587[1794]]);this[_0xd587[1801]][_0x5c29x2]= 0;this[_0xd587[1802]][_0x5c29x2]= 0;this[_0xd587[1803]][_0x5c29x2][0]+= _0x5c29x4;this[_0xd587[1803]][_0x5c29x2][1]+= _0x5c29x3}}};mxFastOrganicLayout[_0xd587[202]][_0xd587[1811]]= function(){for(var _0x5c29x2=0;_0x5c29x2< this[_0xd587[1798]][_0xd587[67]];_0x5c29x2++){for(var _0x5c29x3=0;_0x5c29x3< this[_0xd587[1805]][_0x5c29x2][_0xd587[67]];_0x5c29x3++){var _0x5c29x4=this[_0xd587[1805]][_0x5c29x2][_0x5c29x3];if(_0x5c29x2!= _0x5c29x4&& this[_0xd587[1804]][_0x5c29x2]&& this[_0xd587[1804]][_0x5c29x4]){var _0x5c29x5=this[_0xd587[1803]][_0x5c29x2][0]- this[_0xd587[1803]][_0x5c29x4][0],_0x5c29x9=this[_0xd587[1803]][_0x5c29x2][1]- this[_0xd587[1803]][_0x5c29x4][1],_0x5c29xa=_0x5c29x5* _0x5c29x5+ _0x5c29x9* _0x5c29x9- this[_0xd587[1807]][_0x5c29x2]- this[_0xd587[1807]][_0x5c29x4];_0x5c29xa< this[_0xd587[1792]]&& (_0x5c29xa= this[_0xd587[1792]]);var _0x5c29x12=Math[_0xd587[428]](_0x5c29xa),_0x5c29xa=_0x5c29xa/ this[_0xd587[1788]],_0x5c29x5=_0x5c29x5/ _0x5c29x12* _0x5c29xa,_0x5c29x9=_0x5c29x9/ _0x5c29x12* _0x5c29xa;this[_0xd587[1801]][_0x5c29x2]-= _0x5c29x5;this[_0xd587[1802]][_0x5c29x2]-= _0x5c29x9;this[_0xd587[1801]][_0x5c29x4]+= _0x5c29x5;this[_0xd587[1802]][_0x5c29x4]+= _0x5c29x9}}}};mxFastOrganicLayout[_0xd587[202]][_0xd587[1810]]= function(){for(var _0x5c29x2=this[_0xd587[1798]][_0xd587[67]],_0x5c29x3=0;_0x5c29x3< _0x5c29x2;_0x5c29x3++){for(var _0x5c29x4=_0x5c29x3;_0x5c29x4< _0x5c29x2;_0x5c29x4++){if(!this[_0xd587[1797]]){return};if(_0x5c29x4!= _0x5c29x3&& this[_0xd587[1804]][_0x5c29x3]&& this[_0xd587[1804]][_0x5c29x4]){var _0x5c29x5=this[_0xd587[1803]][_0x5c29x3][0]- this[_0xd587[1803]][_0x5c29x4][0],_0x5c29x9=this[_0xd587[1803]][_0x5c29x3][1]- this[_0xd587[1803]][_0x5c29x4][1];0== _0x5c29x5&& (_0x5c29x5= 0.01+ Math[_0xd587[1814]]());0== _0x5c29x9&& (_0x5c29x9= 0.01+ Math[_0xd587[1814]]());var _0x5c29xa=Math[_0xd587[428]](_0x5c29x5* _0x5c29x5+ _0x5c29x9* _0x5c29x9),_0x5c29x12=_0x5c29xa- this[_0xd587[1806]][_0x5c29x3]- this[_0xd587[1806]][_0x5c29x4];_0x5c29x12> this[_0xd587[1791]]|| (_0x5c29x12< this[_0xd587[1790]]&& (_0x5c29x12= this[_0xd587[1790]]),_0x5c29x12= this[_0xd587[1789]]/ _0x5c29x12,_0x5c29x5= _0x5c29x5/ _0x5c29xa* _0x5c29x12,_0x5c29x9= _0x5c29x9/ _0x5c29xa* _0x5c29x12,this[_0xd587[1801]][_0x5c29x3]+= _0x5c29x5,this[_0xd587[1802]][_0x5c29x3]+= _0x5c29x9,this[_0xd587[1801]][_0x5c29x4]-= _0x5c29x5,this[_0xd587[1802]][_0x5c29x4]-= _0x5c29x9)}}}};mxFastOrganicLayout[_0xd587[202]][_0xd587[1813]]= function(){this[_0xd587[1794]]= this[_0xd587[1793]]* (1- this[_0xd587[1796]]/ this[_0xd587[1795]])};function mxCircleLayout(_0x5c29x2,_0x5c29x3){mxGraphLayout[_0xd587[239]](this,_0x5c29x2);this[_0xd587[1806]]= null!= _0x5c29x3?_0x5c29x3:100}mxCircleLayout[_0xd587[202]]=  new mxGraphLayout;mxCircleLayout[_0xd587[202]][_0xd587[196]]= mxCircleLayout;mxCircleLayout[_0xd587[202]][_0xd587[1806]]= null;mxCircleLayout[_0xd587[202]][_0xd587[1815]]=  !1;mxCircleLayout[_0xd587[202]][_0xd587[1732]]= 0;mxCircleLayout[_0xd587[202]][_0xd587[1733]]= 0;mxCircleLayout[_0xd587[202]][_0xd587[1750]]=  !0;mxCircleLayout[_0xd587[202]][_0xd587[1787]]=  !0;mxCircleLayout[_0xd587[202]][_0xd587[350]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1179]][_0xd587[502]]();_0x5c29x3[_0xd587[473]]();try{for(var _0x5c29x4=0,_0x5c29x5=null,_0x5c29x9=null,_0x5c29xa=[],_0x5c29x12=_0x5c29x3[_0xd587[262]](_0x5c29x2),_0x5c29x13=0;_0x5c29x13< _0x5c29x12;_0x5c29x13++){var _0x5c29x14=_0x5c29x3[_0xd587[263]](_0x5c29x2,_0x5c29x13);if(this[_0xd587[1713]](_0x5c29x14)){this[_0xd587[1715]](_0x5c29x14)|| (this[_0xd587[1750]]&& this[_0xd587[1179]][_0xd587[1809]](_0x5c29x14),this[_0xd587[1787]]&& this[_0xd587[1716]](_0x5c29x14,!1))}else {_0x5c29xa[_0xd587[207]](_0x5c29x14);var _0x5c29x15=this[_0xd587[1726]](_0x5c29x14),_0x5c29x5=null== _0x5c29x5?_0x5c29x15[_0xd587[236]]:Math[_0xd587[243]](_0x5c29x5,_0x5c29x15[_0xd587[236]]),_0x5c29x9=null== _0x5c29x9?_0x5c29x15[_0xd587[235]]:Math[_0xd587[243]](_0x5c29x9,_0x5c29x15[_0xd587[235]]),_0x5c29x4=Math[_0xd587[160]](_0x5c29x4,Math[_0xd587[160]](_0x5c29x15[_0xd587[117]],_0x5c29x15[_0xd587[119]]))}};var _0x5c29x16=this[_0xd587[1816]](_0x5c29xa[_0xd587[67]],_0x5c29x4);this[_0xd587[1815]]&& (_0x5c29x9= this[_0xd587[1732]],_0x5c29x5= this[_0xd587[1733]]);this[_0xd587[1817]](_0x5c29xa,_0x5c29x16,_0x5c29x9,_0x5c29x5)}finally{_0x5c29x3[_0xd587[476]]()}};mxCircleLayout[_0xd587[202]][_0xd587[1816]]= function(_0x5c29x2,_0x5c29x3){return Math[_0xd587[160]](_0x5c29x2* _0x5c29x3/ Math[_0xd587[424]],this[_0xd587[1806]])};mxCircleLayout[_0xd587[202]][_0xd587[1817]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){for(var _0x5c29x9=_0x5c29x2[_0xd587[67]],_0x5c29xa=2* Math[_0xd587[424]]/ _0x5c29x9,_0x5c29x12=0;_0x5c29x12< _0x5c29x9;_0x5c29x12++){this[_0xd587[1711]](_0x5c29x2[_0x5c29x12])&& this[_0xd587[1725]](_0x5c29x2[_0x5c29x12],_0x5c29x4+ _0x5c29x3+ _0x5c29x3* Math[_0xd587[427]](_0x5c29x12* _0x5c29xa),_0x5c29x5+ _0x5c29x3+ _0x5c29x3* Math[_0xd587[426]](_0x5c29x12* _0x5c29xa))}};function mxParallelEdgeLayout(_0x5c29x2){mxGraphLayout[_0xd587[239]](this,_0x5c29x2)}mxParallelEdgeLayout[_0xd587[202]]=  new mxGraphLayout;mxParallelEdgeLayout[_0xd587[202]][_0xd587[196]]= mxParallelEdgeLayout;mxParallelEdgeLayout[_0xd587[202]][_0xd587[657]]= 20;mxParallelEdgeLayout[_0xd587[202]][_0xd587[350]]= function(_0x5c29x2){_0x5c29x2= this[_0xd587[1818]](_0x5c29x2);this[_0xd587[1179]][_0xd587[251]][_0xd587[473]]();try{for(var _0x5c29x3 in _0x5c29x2){var _0x5c29x4=_0x5c29x2[_0x5c29x3];1< _0x5c29x4[_0xd587[67]]&& this[_0xd587[1759]](_0x5c29x4)}}finally{this[_0xd587[1179]][_0xd587[251]][_0xd587[476]]()}};mxParallelEdgeLayout[_0xd587[202]][_0xd587[1818]]= function(_0x5c29x2){for(var _0x5c29x3=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x4=[],_0x5c29x5=_0x5c29x3[_0xd587[262]](_0x5c29x2),_0x5c29x9=0;_0x5c29x9< _0x5c29x5;_0x5c29x9++){var _0x5c29xa=_0x5c29x3[_0xd587[263]](_0x5c29x2,_0x5c29x9);if(!this[_0xd587[1715]](_0x5c29xa)){var _0x5c29x12=this[_0xd587[1819]](_0x5c29xa);null!= _0x5c29x12&& (null== _0x5c29x4[_0x5c29x12]&& (_0x5c29x4[_0x5c29x12]= []),_0x5c29x4[_0x5c29x12][_0xd587[207]](_0x5c29xa))}};return _0x5c29x4};mxParallelEdgeLayout[_0xd587[202]][_0xd587[1819]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1179]][_0xd587[249]](),_0x5c29x4=_0x5c29x3[_0xd587[248]](_0x5c29x2),_0x5c29x5=null!= _0x5c29x4?_0x5c29x4[_0xd587[1710]](!0):_0x5c29x3[_0xd587[1710]](_0x5c29x2,!0);_0x5c29x2= null!= _0x5c29x4?_0x5c29x4[_0xd587[1710]](!1):_0x5c29x3[_0xd587[1710]](_0x5c29x2,!1);return null!= _0x5c29x5&& null!= _0x5c29x2?(_0x5c29x5= mxCellPath[_0xd587[385]](_0x5c29x5),_0x5c29x2= mxCellPath[_0xd587[385]](_0x5c29x2),_0x5c29x5> _0x5c29x2?_0x5c29x2+ _0xd587[213]+ _0x5c29x5:_0x5c29x5+ _0xd587[213]+ _0x5c29x2):null};mxParallelEdgeLayout[_0xd587[202]][_0xd587[1759]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[0],_0x5c29x4=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x5=_0x5c29x4[_0xd587[1721]](_0x5c29x4[_0xd587[1709]](_0x5c29x3,!0)),_0x5c29x9=_0x5c29x4[_0xd587[1721]](_0x5c29x4[_0xd587[1709]](_0x5c29x3,!1));if(_0x5c29x5== _0x5c29x9){for(var _0x5c29x3=_0x5c29x5[_0xd587[235]]+ _0x5c29x5[_0xd587[117]]+ this[_0xd587[657]],_0x5c29x4=_0x5c29x5[_0xd587[236]]+ _0x5c29x5[_0xd587[119]]/ 2,_0x5c29xa=0;_0x5c29xa< _0x5c29x2[_0xd587[67]];_0x5c29xa++){this[_0xd587[1820]](_0x5c29x2[_0x5c29xa],_0x5c29x3,_0x5c29x4),_0x5c29x3+= this[_0xd587[657]]}}else {if(null!= _0x5c29x5&& null!= _0x5c29x9){for(var _0x5c29x3=_0x5c29x5[_0xd587[235]]+ _0x5c29x5[_0xd587[117]]/ 2,_0x5c29x4=_0x5c29x5[_0xd587[236]]+ _0x5c29x5[_0xd587[119]]/ 2,_0x5c29xa=_0x5c29x9[_0xd587[235]]+ _0x5c29x9[_0xd587[117]]/ 2- _0x5c29x3,_0x5c29x12=_0x5c29x9[_0xd587[236]]+ _0x5c29x9[_0xd587[119]]/ 2- _0x5c29x4,_0x5c29x9=Math[_0xd587[428]](_0x5c29xa* _0x5c29xa+ _0x5c29x12* _0x5c29x12),_0x5c29x5=_0x5c29x12* this[_0xd587[657]]/ _0x5c29x9,_0x5c29x9=_0x5c29xa* this[_0xd587[657]]/ _0x5c29x9,_0x5c29x3=_0x5c29x3+ _0x5c29xa/ 2+ _0x5c29x5* (_0x5c29x2[_0xd587[67]]- 1)/ 2,_0x5c29x4=_0x5c29x4+ _0x5c29x12/ 2- _0x5c29x9* (_0x5c29x2[_0xd587[67]]- 1)/ 2,_0x5c29xa=0;_0x5c29xa< _0x5c29x2[_0xd587[67]];_0x5c29xa++){this[_0xd587[1820]](_0x5c29x2[_0x5c29xa],_0x5c29x3,_0x5c29x4),_0x5c29x3-= _0x5c29x5,_0x5c29x4+= _0x5c29x9}}}};mxParallelEdgeLayout[_0xd587[202]][_0xd587[1820]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[1179]][_0xd587[1712]](_0x5c29x2)&& this[_0xd587[1722]](_0x5c29x2,[ new mxPoint(_0x5c29x3,_0x5c29x4)])};function mxCompositeLayout(_0x5c29x2,_0x5c29x3,_0x5c29x4){mxGraphLayout[_0xd587[239]](this,_0x5c29x2);this[_0xd587[1821]]= _0x5c29x3;this[_0xd587[1822]]= _0x5c29x4}mxCompositeLayout[_0xd587[202]]=  new mxGraphLayout;mxCompositeLayout[_0xd587[202]][_0xd587[196]]= mxCompositeLayout;mxCompositeLayout[_0xd587[202]][_0xd587[1821]]= null;mxCompositeLayout[_0xd587[202]][_0xd587[1822]]= null;mxCompositeLayout[_0xd587[202]][_0xd587[1702]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){null!= this[_0xd587[1822]]?this[_0xd587[1822]][_0xd587[582]][_0xd587[183]](this[_0xd587[1822]],arguments):this[_0xd587[1821]][0][_0xd587[582]][_0xd587[183]](this[_0xd587[1821]][0],arguments)};mxCompositeLayout[_0xd587[202]][_0xd587[350]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1179]][_0xd587[502]]();_0x5c29x3[_0xd587[473]]();try{for(var _0x5c29x4=0;_0x5c29x4< this[_0xd587[1821]][_0xd587[67]];_0x5c29x4++){this[_0xd587[1821]][_0x5c29x4][_0xd587[350]][_0xd587[183]](this[_0xd587[1821]][_0x5c29x4],arguments)}}finally{_0x5c29x3[_0xd587[476]]()}};function mxEdgeLabelLayout(_0x5c29x2,_0x5c29x3){mxGraphLayout[_0xd587[239]](this,_0x5c29x2)}mxEdgeLabelLayout[_0xd587[202]]=  new mxGraphLayout;mxEdgeLabelLayout[_0xd587[202]][_0xd587[196]]= mxEdgeLabelLayout;mxEdgeLabelLayout[_0xd587[202]][_0xd587[350]]= function(_0x5c29x2){for(var _0x5c29x3=this[_0xd587[1179]][_0xd587[441]],_0x5c29x4=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x5=[],_0x5c29x9=[],_0x5c29xa=_0x5c29x4[_0xd587[262]](_0x5c29x2),_0x5c29x12=0;_0x5c29x12< _0x5c29xa;_0x5c29x12++){var _0x5c29x13=_0x5c29x4[_0xd587[263]](_0x5c29x2,_0x5c29x12),_0x5c29x14=_0x5c29x3[_0xd587[248]](_0x5c29x13);null!= _0x5c29x14&& (this[_0xd587[1713]](_0x5c29x13)?this[_0xd587[1715]](_0x5c29x13)|| _0x5c29x5[_0xd587[207]](_0x5c29x14):_0x5c29x9[_0xd587[207]](_0x5c29x14))};this[_0xd587[1823]](_0x5c29x9,_0x5c29x5)};mxEdgeLabelLayout[_0xd587[202]][_0xd587[1823]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1179]][_0xd587[502]]();_0x5c29x4[_0xd587[473]]();try{for(var _0x5c29x5=0;_0x5c29x5< _0x5c29x3[_0xd587[67]];_0x5c29x5++){var _0x5c29x9=_0x5c29x3[_0x5c29x5];if(null!= _0x5c29x9&& null!= _0x5c29x9[_0xd587[963]]&& null!= _0x5c29x9[_0xd587[963]][_0xd587[1563]]){for(var _0x5c29xa=0;_0x5c29xa< _0x5c29x2[_0xd587[67]];_0x5c29xa++){var _0x5c29x12=_0x5c29x2[_0x5c29xa];null!= _0x5c29x12&& this[_0xd587[1824]](_0x5c29x9,_0x5c29x12)}}}}finally{_0x5c29x4[_0xd587[476]]()}};mxEdgeLabelLayout[_0xd587[202]][_0xd587[1824]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x5=_0x5c29x2[_0xd587[963]][_0xd587[1563]];if(mxUtils[_0xd587[1825]](_0x5c29x5,_0x5c29x3)){var _0x5c29x9=-_0x5c29x5[_0xd587[236]]- _0x5c29x5[_0xd587[119]]+ _0x5c29x3[_0xd587[236]],_0x5c29xa=-_0x5c29x5[_0xd587[236]]+ _0x5c29x3[_0xd587[236]]+ _0x5c29x3[_0xd587[119]],_0x5c29x9=Math[_0xd587[425]](_0x5c29x9)< Math[_0xd587[425]](_0x5c29xa)?_0x5c29x9:_0x5c29xa,_0x5c29xa=-_0x5c29x5[_0xd587[235]]- _0x5c29x5[_0xd587[117]]+ _0x5c29x3[_0xd587[235]],_0x5c29x5=-_0x5c29x5[_0xd587[235]]+ _0x5c29x3[_0xd587[235]]+ _0x5c29x3[_0xd587[117]],_0x5c29x5=Math[_0xd587[425]](_0x5c29xa)< Math[_0xd587[425]](_0x5c29x5)?_0x5c29xa:_0x5c29x5;Math[_0xd587[425]](_0x5c29x5)< Math[_0xd587[425]](_0x5c29x9)?_0x5c29x9= 0:_0x5c29x5= 0;_0x5c29xa= _0x5c29x4[_0xd587[1721]](_0x5c29x2[_0xd587[246]]);null!= _0x5c29xa&& (_0x5c29xa= _0x5c29xa[_0xd587[238]](),null!= _0x5c29xa[_0xd587[1368]]?(_0x5c29xa[_0xd587[1368]][_0xd587[235]]+= _0x5c29x5,_0x5c29xa[_0xd587[1368]][_0xd587[236]]+= _0x5c29x9):_0x5c29xa[_0xd587[1368]]=  new mxPoint(_0x5c29x5,_0x5c29x9),_0x5c29x4[_0xd587[1724]](_0x5c29x2[_0xd587[246]],_0x5c29xa))}};function mxGraphAbstractHierarchyCell(){this[_0xd587[235]]= [];this[_0xd587[236]]= [];this[_0xd587[1826]]= []}mxGraphAbstractHierarchyCell[_0xd587[202]][_0xd587[1827]]=  -1;mxGraphAbstractHierarchyCell[_0xd587[202]][_0xd587[1828]]=  -1;mxGraphAbstractHierarchyCell[_0xd587[202]][_0xd587[235]]= null;mxGraphAbstractHierarchyCell[_0xd587[202]][_0xd587[236]]= null;mxGraphAbstractHierarchyCell[_0xd587[202]][_0xd587[117]]= 0;mxGraphAbstractHierarchyCell[_0xd587[202]][_0xd587[119]]= 0;mxGraphAbstractHierarchyCell[_0xd587[202]][_0xd587[1829]]= null;mxGraphAbstractHierarchyCell[_0xd587[202]][_0xd587[1830]]= null;mxGraphAbstractHierarchyCell[_0xd587[202]][_0xd587[1826]]= null;mxGraphAbstractHierarchyCell[_0xd587[202]][_0xd587[1831]]= function(_0x5c29x2){return null};mxGraphAbstractHierarchyCell[_0xd587[202]][_0xd587[1832]]= function(_0x5c29x2){return null};mxGraphAbstractHierarchyCell[_0xd587[202]][_0xd587[250]]= function(){return !1};mxGraphAbstractHierarchyCell[_0xd587[202]][_0xd587[1193]]= function(){return !1};mxGraphAbstractHierarchyCell[_0xd587[202]][_0xd587[1833]]= function(_0x5c29x2){return null};mxGraphAbstractHierarchyCell[_0xd587[202]][_0xd587[1834]]= function(_0x5c29x2,_0x5c29x3){return null};mxGraphAbstractHierarchyCell[_0xd587[202]][_0xd587[1835]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[1193]]()?this[_0xd587[235]][0]= _0x5c29x3:this[_0xd587[250]]()&& (this[_0xd587[235]][_0x5c29x2- this[_0xd587[1828]]- 1]= _0x5c29x3)};mxGraphAbstractHierarchyCell[_0xd587[202]][_0xd587[730]]= function(_0x5c29x2){return this[_0xd587[1193]]()?this[_0xd587[235]][0]:this[_0xd587[250]]()?this[_0xd587[235]][_0x5c29x2- this[_0xd587[1828]]- 1]:0};mxGraphAbstractHierarchyCell[_0xd587[202]][_0xd587[1836]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[1193]]()?this[_0xd587[236]][0]= _0x5c29x3:this[_0xd587[250]]()&& (this[_0xd587[236]][_0x5c29x2- this[_0xd587[1828]]- 1]= _0x5c29x3)};function mxGraphHierarchyNode(_0x5c29x2){mxGraphAbstractHierarchyCell[_0xd587[183]](this,arguments);this[_0xd587[246]]= _0x5c29x2}mxGraphHierarchyNode[_0xd587[202]]=  new mxGraphAbstractHierarchyCell;mxGraphHierarchyNode[_0xd587[202]][_0xd587[196]]= mxGraphHierarchyNode;mxGraphHierarchyNode[_0xd587[202]][_0xd587[246]]= null;mxGraphHierarchyNode[_0xd587[202]][_0xd587[1837]]= [];mxGraphHierarchyNode[_0xd587[202]][_0xd587[1838]]= [];mxGraphHierarchyNode[_0xd587[202]][_0xd587[1839]]=  !1;mxGraphHierarchyNode[_0xd587[202]][_0xd587[1840]]= function(_0x5c29x2){return this[_0xd587[1827]]};mxGraphHierarchyNode[_0xd587[202]][_0xd587[1831]]= function(_0x5c29x2){if(null== this[_0xd587[1829]]){this[_0xd587[1829]]= [];this[_0xd587[1829]][0]= [];for(var _0x5c29x3=0;_0x5c29x3< this[_0xd587[1837]][_0xd587[67]];_0x5c29x3++){var _0x5c29x4=this[_0xd587[1837]][_0x5c29x3];-1== _0x5c29x4[_0xd587[1827]]|| _0x5c29x4[_0xd587[1827]]== _0x5c29x2+ 1?this[_0xd587[1829]][0][_0xd587[207]](_0x5c29x4[_0xd587[1097]]):this[_0xd587[1829]][0][_0xd587[207]](_0x5c29x4)}};return this[_0xd587[1829]][0]};mxGraphHierarchyNode[_0xd587[202]][_0xd587[1832]]= function(_0x5c29x2){if(null== this[_0xd587[1830]]){this[_0xd587[1830]]= [];this[_0xd587[1830]][0]= [];for(var _0x5c29x3=0;_0x5c29x3< this[_0xd587[1838]][_0xd587[67]];_0x5c29x3++){var _0x5c29x4=this[_0xd587[1838]][_0x5c29x3];-1== _0x5c29x4[_0xd587[1828]]|| _0x5c29x4[_0xd587[1828]]== _0x5c29x2- 1?this[_0xd587[1830]][0][_0xd587[207]](_0x5c29x4[_0xd587[772]]):this[_0xd587[1830]][0][_0xd587[207]](_0x5c29x4)}};return this[_0xd587[1830]][0]};mxGraphHierarchyNode[_0xd587[202]][_0xd587[1193]]= function(){return !0};mxGraphHierarchyNode[_0xd587[202]][_0xd587[1833]]= function(_0x5c29x2){return this[_0xd587[1826]][0]};mxGraphHierarchyNode[_0xd587[202]][_0xd587[1834]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[1826]][0]= _0x5c29x3};mxGraphHierarchyNode[_0xd587[202]][_0xd587[1720]]= function(_0x5c29x2){if(null!= _0x5c29x2&& null!= this[_0xd587[1839]]&& null!= _0x5c29x2[_0xd587[1839]]&& this[_0xd587[1839]][_0xd587[67]]< _0x5c29x2[_0xd587[1839]][_0xd587[67]]){if(this[_0xd587[1839]]== _0x5c29x2[_0xd587[1839]]){return !0};if(null== this[_0xd587[1839]]|| null== this[_0xd587[1839]]){return !1};for(var _0x5c29x3=0;_0x5c29x3< this[_0xd587[1839]][_0xd587[67]];_0x5c29x3++){if(this[_0xd587[1839]][_0x5c29x3]!= _0x5c29x2[_0xd587[1839]][_0x5c29x3]){return !1}};return !0};return !1};mxGraphHierarchyNode[_0xd587[202]][_0xd587[1841]]= function(){return this[_0xd587[246]]};function mxGraphHierarchyEdge(_0x5c29x2){mxGraphAbstractHierarchyCell[_0xd587[183]](this,arguments);this[_0xd587[1842]]= _0x5c29x2}mxGraphHierarchyEdge[_0xd587[202]]=  new mxGraphAbstractHierarchyCell;mxGraphHierarchyEdge[_0xd587[202]][_0xd587[196]]= mxGraphHierarchyEdge;mxGraphHierarchyEdge[_0xd587[202]][_0xd587[1842]]= null;mxGraphHierarchyEdge[_0xd587[202]][_0xd587[1097]]= null;mxGraphHierarchyEdge[_0xd587[202]][_0xd587[772]]= null;mxGraphHierarchyEdge[_0xd587[202]][_0xd587[1843]]=  !1;mxGraphHierarchyEdge[_0xd587[202]][_0xd587[1744]]= function(_0x5c29x2){_0x5c29x2= this[_0xd587[1097]];this[_0xd587[1097]]= this[_0xd587[772]];this[_0xd587[772]]= _0x5c29x2;this[_0xd587[1843]]= !this[_0xd587[1843]]};mxGraphHierarchyEdge[_0xd587[202]][_0xd587[1831]]= function(_0x5c29x2){if(null== this[_0xd587[1829]]){this[_0xd587[1829]]= [];for(var _0x5c29x3=0;_0x5c29x3< this[_0xd587[1826]][_0xd587[67]];_0x5c29x3++){this[_0xd587[1829]][_0x5c29x3]= [],_0x5c29x3== this[_0xd587[1826]][_0xd587[67]]- 1?this[_0xd587[1829]][_0x5c29x3][_0xd587[207]](this[_0xd587[1097]]):this[_0xd587[1829]][_0x5c29x3][_0xd587[207]](this)}};return this[_0xd587[1829]][_0x5c29x2- this[_0xd587[1828]]- 1]};mxGraphHierarchyEdge[_0xd587[202]][_0xd587[1832]]= function(_0x5c29x2){if(null== this[_0xd587[1830]]){this[_0xd587[1830]]= [];for(var _0x5c29x3=0;_0x5c29x3< this[_0xd587[1826]][_0xd587[67]];_0x5c29x3++){this[_0xd587[1830]][_0x5c29x3]= [],0== _0x5c29x3?this[_0xd587[1830]][_0x5c29x3][_0xd587[207]](this[_0xd587[772]]):this[_0xd587[1830]][_0x5c29x3][_0xd587[207]](this)}};return this[_0xd587[1830]][_0x5c29x2- this[_0xd587[1828]]- 1]};mxGraphHierarchyEdge[_0xd587[202]][_0xd587[250]]= function(){return !0};mxGraphHierarchyEdge[_0xd587[202]][_0xd587[1833]]= function(_0x5c29x2){return this[_0xd587[1826]][_0x5c29x2- this[_0xd587[1828]]- 1]};mxGraphHierarchyEdge[_0xd587[202]][_0xd587[1834]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[1826]][_0x5c29x2- this[_0xd587[1828]]- 1]= _0x5c29x3};mxGraphHierarchyEdge[_0xd587[202]][_0xd587[1841]]= function(){return null!= this[_0xd587[1842]]&& 0< this[_0xd587[1842]][_0xd587[67]]?this[_0xd587[1842]][0]:null};function mxGraphHierarchyModel(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x2[_0xd587[1703]]();this[_0xd587[1844]]= _0x5c29x9;this[_0xd587[1845]]= _0x5c29x4;this[_0xd587[1101]]= _0x5c29x5;this[_0xd587[1846]]= {};this[_0xd587[1847]]= {};this[_0xd587[1827]]= 0;_0x5c29x4= [];null== _0x5c29x3&& (_0x5c29x3= this[_0xd587[1179]][_0xd587[1728]](_0x5c29x5));this[_0xd587[1827]]= this[_0xd587[1848]];this[_0xd587[1849]](_0x5c29x2,_0x5c29x3,_0x5c29x4);for(_0x5c29x5= 0;_0x5c29x5< _0x5c29x3[_0xd587[67]];_0x5c29x5++){_0x5c29x9= _0x5c29x4[_0x5c29x5][_0xd587[1838]];for(var _0x5c29xa=0;_0x5c29xa< _0x5c29x9[_0xd587[67]];_0x5c29xa++){var _0x5c29x12=_0x5c29x9[_0x5c29xa],_0x5c29x13=_0x5c29x12[_0xd587[1842]];if(null!= _0x5c29x13&& 0< _0x5c29x13[_0xd587[67]]){var _0x5c29x13=_0x5c29x13[0],_0x5c29x14=_0x5c29x2[_0xd587[1710]](_0x5c29x13,!1),_0x5c29x14=mxCellPath[_0xd587[385]](_0x5c29x14),_0x5c29x14=this[_0xd587[1846]][_0x5c29x14];_0x5c29x4[_0x5c29x5]== _0x5c29x14&& (_0x5c29x14= _0x5c29x2[_0xd587[1710]](_0x5c29x13,!0),_0x5c29x14= mxCellPath[_0xd587[385]](_0x5c29x14),_0x5c29x14= this[_0xd587[1846]][_0x5c29x14]);null!= _0x5c29x14&& _0x5c29x4[_0x5c29x5]!= _0x5c29x14&& (_0x5c29x12[_0xd587[772]]= _0x5c29x14,0== _0x5c29x14[_0xd587[1837]][_0xd587[67]]&& (_0x5c29x14[_0xd587[1837]]= []),0> mxUtils[_0xd587[2]](_0x5c29x14[_0xd587[1837]],_0x5c29x12)&& _0x5c29x14[_0xd587[1837]][_0xd587[207]](_0x5c29x12))}};_0x5c29x4[_0x5c29x5][_0xd587[1826]][0]= 1}}mxGraphHierarchyModel[_0xd587[202]][_0xd587[1827]]= null;mxGraphHierarchyModel[_0xd587[202]][_0xd587[1846]]= null;mxGraphHierarchyModel[_0xd587[202]][_0xd587[1847]]= null;mxGraphHierarchyModel[_0xd587[202]][_0xd587[1850]]= null;mxGraphHierarchyModel[_0xd587[202]][_0xd587[1845]]= null;mxGraphHierarchyModel[_0xd587[202]][_0xd587[1101]]= null;mxGraphHierarchyModel[_0xd587[202]][_0xd587[1851]]= 0;mxGraphHierarchyModel[_0xd587[202]][_0xd587[1848]]= 1E8;mxGraphHierarchyModel[_0xd587[202]][_0xd587[1844]]=  !1;mxGraphHierarchyModel[_0xd587[202]][_0xd587[1849]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){for(var _0x5c29x5=_0x5c29x2[_0xd587[1703]](),_0x5c29x9=0;_0x5c29x9< _0x5c29x3[_0xd587[67]];_0x5c29x9++){_0x5c29x4[_0x5c29x9]=  new mxGraphHierarchyNode(_0x5c29x3[_0x5c29x9]);var _0x5c29xa=mxCellPath[_0xd587[385]](_0x5c29x3[_0x5c29x9]);this[_0xd587[1846]][_0x5c29xa]= _0x5c29x4[_0x5c29x9];_0x5c29xa= _0x5c29x2[_0xd587[264]](_0x5c29x3[_0x5c29x9]);_0x5c29x4[_0x5c29x9][_0xd587[1838]]= [];for(var _0x5c29x12=0;_0x5c29x12< _0x5c29xa[_0xd587[67]];_0x5c29x12++){var _0x5c29x13=_0x5c29x2[_0xd587[1710]](_0x5c29xa[_0x5c29x12],!1);if(_0x5c29x13!= _0x5c29x3[_0x5c29x9]&& _0x5c29x13!= _0x5c29x3[_0x5c29x9]&& _0x5c29x2[_0xd587[1179]][_0xd587[251]][_0xd587[1193]](_0x5c29x13)&& !_0x5c29x2[_0xd587[1713]](_0x5c29x13)){var _0x5c29x14=_0x5c29x2[_0xd587[1781]](_0x5c29x3[_0x5c29x9],_0x5c29x13,!1),_0x5c29x15=_0x5c29x2[_0xd587[1781]](_0x5c29x3[_0x5c29x9],_0x5c29x13,!0),_0x5c29x13=mxCellPath[_0xd587[385]](_0x5c29x14[0]);if(null!= _0x5c29x14&& 0< _0x5c29x14[_0xd587[67]]&& null== this[_0xd587[1847]][_0x5c29x13]&& 2* _0x5c29x15[_0xd587[67]]>= _0x5c29x14[_0xd587[67]]){for(var _0x5c29x15= new mxGraphHierarchyEdge(_0x5c29x14),_0x5c29x16=0;_0x5c29x16< _0x5c29x14[_0xd587[67]];_0x5c29x16++){var _0x5c29x17=_0x5c29x14[_0x5c29x16],_0x5c29x13=mxCellPath[_0xd587[385]](_0x5c29x17);this[_0xd587[1847]][_0x5c29x13]= _0x5c29x15;_0x5c29x5[_0xd587[1809]](_0x5c29x17);_0x5c29x2[_0xd587[1787]]&& (_0x5c29x2[_0xd587[1716]](_0x5c29x17,!1),_0x5c29x2[_0xd587[1718]](_0x5c29x17,!0))};_0x5c29x15[_0xd587[1097]]= _0x5c29x4[_0x5c29x9];0> mxUtils[_0xd587[2]](_0x5c29x4[_0x5c29x9][_0xd587[1838]],_0x5c29x15)&& _0x5c29x4[_0x5c29x9][_0xd587[1838]][_0xd587[207]](_0x5c29x15)}}};_0x5c29x4[_0x5c29x9][_0xd587[1826]][0]= 0}};mxGraphHierarchyModel[_0xd587[202]][_0xd587[1852]]= function(){var _0x5c29x2=[];if(null!= this[_0xd587[1845]]){for(var _0x5c29x3=0;_0x5c29x3< this[_0xd587[1845]][_0xd587[67]];_0x5c29x3++){var _0x5c29x4=mxCellPath[_0xd587[385]](this[_0xd587[1845]][_0x5c29x3]),_0x5c29x4=this[_0xd587[1846]][_0x5c29x4];null!= _0x5c29x4&& _0x5c29x2[_0xd587[207]](_0x5c29x4)}};for(var _0x5c29x5 in this[_0xd587[1846]]){_0x5c29x4= this[_0xd587[1846]][_0x5c29x5],_0x5c29x4[_0xd587[1826]][0]=  -1};for(var _0x5c29x9=_0x5c29x2[_0xd587[1853]]();0< _0x5c29x2[_0xd587[67]];){var _0x5c29x4=_0x5c29x2[0],_0x5c29xa,_0x5c29x12;_0x5c29xa= _0x5c29x4[_0xd587[1837]];_0x5c29x12= _0x5c29x4[_0xd587[1838]];for(var _0x5c29x13=!0,_0x5c29x14=this[_0xd587[1848]],_0x5c29x3=0;_0x5c29x3< _0x5c29xa[_0xd587[67]];_0x5c29x3++){var _0x5c29x15=_0x5c29xa[_0x5c29x3];if(5270620== _0x5c29x15[_0xd587[1826]][0]){_0x5c29x15= _0x5c29x15[_0xd587[1097]],_0x5c29x14= Math[_0xd587[243]](_0x5c29x14,_0x5c29x15[_0xd587[1826]][0]- 1)}else {_0x5c29x13=  !1;break}};if(_0x5c29x13){_0x5c29x4[_0xd587[1826]][0]= _0x5c29x14;this[_0xd587[1827]]= Math[_0xd587[243]](this[_0xd587[1827]],_0x5c29x14);if(null!= _0x5c29x12){for(_0x5c29x3= 0;_0x5c29x3< _0x5c29x12[_0xd587[67]];_0x5c29x3++){_0x5c29x15= _0x5c29x12[_0x5c29x3],_0x5c29x15[_0xd587[1826]][0]= 5270620,_0x5c29x15= _0x5c29x15[_0xd587[772]],-1== _0x5c29x15[_0xd587[1826]][0]&& (_0x5c29x2[_0xd587[207]](_0x5c29x15),_0x5c29x15[_0xd587[1826]][0]=  -2)}};_0x5c29x2[_0xd587[1115]]()}else {if(_0x5c29x3= _0x5c29x2[_0xd587[1115]](),_0x5c29x2[_0xd587[207]](_0x5c29x4),_0x5c29x3== _0x5c29x4&& 1== _0x5c29x2[_0xd587[67]]){break}}};for(_0x5c29x5 in this[_0xd587[1846]]){_0x5c29x4= this[_0xd587[1846]][_0x5c29x5],_0x5c29x4[_0xd587[1826]][0]-= this[_0xd587[1827]]};for(_0x5c29x3= 0;_0x5c29x3< _0x5c29x9[_0xd587[67]];_0x5c29x3++){_0x5c29x4= _0x5c29x9[_0x5c29x3];_0x5c29x2= 0;_0x5c29xa= _0x5c29x4[_0xd587[1838]];for(_0x5c29x5= 0;_0x5c29x5< _0x5c29xa[_0xd587[67]];_0x5c29x5++){_0x5c29x15= _0x5c29xa[_0x5c29x5],_0x5c29x15= _0x5c29x15[_0xd587[772]],_0x5c29x4[_0xd587[1826]][0]= Math[_0xd587[160]](_0x5c29x2,_0x5c29x15[_0xd587[1826]][0]+ 1),_0x5c29x2= _0x5c29x4[_0xd587[1826]][0]}};this[_0xd587[1827]]= this[_0xd587[1848]]- this[_0xd587[1827]]};mxGraphHierarchyModel[_0xd587[202]][_0xd587[1854]]= function(){var _0x5c29x2=[];this[_0xd587[1850]]= [];for(var _0x5c29x3=0;_0x5c29x3< this[_0xd587[1827]]+ 1;_0x5c29x3++){_0x5c29x2[_0x5c29x3]= [],this[_0xd587[1850]][_0x5c29x3]= _0x5c29x2[_0x5c29x3]};var _0x5c29x4=null;if(null!= this[_0xd587[1845]]){for(var _0x5c29x5=this[_0xd587[1845]],_0x5c29x4=[],_0x5c29x3=0;_0x5c29x3< _0x5c29x5[_0xd587[67]];_0x5c29x3++){var _0x5c29x9=mxCellPath[_0xd587[385]](_0x5c29x5[_0x5c29x3]);_0x5c29x4[_0x5c29x3]= this[_0xd587[1846]][_0x5c29x9]}};this[_0xd587[209]](function(_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29x15){0== _0x5c29x15&& (0> _0x5c29x4[_0xd587[1827]]&& 0> _0x5c29x4[_0xd587[1828]])&& (_0x5c29x2[_0x5c29x4[_0xd587[1826]][0]][_0xd587[207]](_0x5c29x4),_0x5c29x4[_0xd587[1827]]= _0x5c29x4[_0xd587[1826]][0],_0x5c29x4[_0xd587[1828]]= _0x5c29x4[_0xd587[1826]][0],_0x5c29x4[_0xd587[1826]][0]= _0x5c29x2[_0x5c29x4[_0xd587[1827]]][_0xd587[67]]- 1);if(null!= _0x5c29x3&& null!= _0x5c29x5&& 1< _0x5c29x3[_0xd587[1827]]- _0x5c29x4[_0xd587[1827]]){_0x5c29x5[_0xd587[1827]]= _0x5c29x3[_0xd587[1827]];_0x5c29x5[_0xd587[1828]]= _0x5c29x4[_0xd587[1827]];_0x5c29x5[_0xd587[1826]]= [];_0x5c29x5[_0xd587[235]]= [];_0x5c29x5[_0xd587[236]]= [];for(_0x5c29x3= _0x5c29x5[_0xd587[1828]]+ 1;_0x5c29x3< _0x5c29x5[_0xd587[1827]];_0x5c29x3++){_0x5c29x2[_0x5c29x3][_0xd587[207]](_0x5c29x5),_0x5c29x5[_0xd587[1834]](_0x5c29x3,_0x5c29x2[_0x5c29x3][_0xd587[67]]- 1)}}},_0x5c29x4,!1,null)};mxGraphHierarchyModel[_0xd587[202]][_0xd587[209]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){if(null!= _0x5c29x3){for(var _0x5c29x9=0;_0x5c29x9< _0x5c29x3[_0xd587[67]];_0x5c29x9++){var _0x5c29xa=_0x5c29x3[_0x5c29x9];null!= _0x5c29xa&& (null== _0x5c29x5&& (_0x5c29x5= {}),_0x5c29x4?(_0x5c29xa[_0xd587[1839]]= [],_0x5c29xa[_0xd587[1839]][0]= this[_0xd587[1851]],_0x5c29xa[_0xd587[1839]][1]= _0x5c29x9,this[_0xd587[1855]](null,_0x5c29xa,null,_0x5c29x2,_0x5c29x5,_0x5c29xa[_0xd587[1839]],_0x5c29x9,0)):this[_0xd587[1758]](null,_0x5c29xa,null,_0x5c29x2,_0x5c29x5,0))};this[_0xd587[1851]]++}};mxGraphHierarchyModel[_0xd587[202]][_0xd587[1758]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){if(null!= _0x5c29x3){var _0x5c29x12=mxCellPath[_0xd587[385]](_0x5c29x3[_0xd587[246]]);if(null== _0x5c29x9[_0x5c29x12]){_0x5c29x9[_0x5c29x12]= _0x5c29x3;_0x5c29x5(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29xa,0);_0x5c29x2= _0x5c29x3[_0xd587[1838]][_0xd587[1853]]();for(_0x5c29x4= 0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){_0x5c29x12= _0x5c29x2[_0x5c29x4],this[_0xd587[1758]](_0x5c29x3,_0x5c29x12[_0xd587[772]],_0x5c29x12,_0x5c29x5,_0x5c29x9,_0x5c29xa+ 1)}}else {_0x5c29x5(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29xa,1)}}};mxGraphHierarchyModel[_0xd587[202]][_0xd587[1855]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13){if(null!= _0x5c29x3){if(null!= _0x5c29x2&& (null== _0x5c29x3[_0xd587[1839]]|| _0x5c29x3[_0xd587[1839]][0]!= _0x5c29x2[_0xd587[1839]][0])){_0x5c29xa= _0x5c29x2[_0xd587[1839]][_0xd587[67]]+ 1,_0x5c29x3[_0xd587[1839]]= _0x5c29x2[_0xd587[1839]][_0xd587[1853]](),_0x5c29x3[_0xd587[1839]][_0x5c29xa- 1]= _0x5c29x12};_0x5c29x12= mxCellPath[_0xd587[385]](_0x5c29x3[_0xd587[246]]);if(null== _0x5c29x9[_0x5c29x12]){_0x5c29x9[_0x5c29x12]= _0x5c29x3;_0x5c29x5(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x13,0);_0x5c29x2= _0x5c29x3[_0xd587[1838]][_0xd587[1853]]();for(_0x5c29x4= 0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){_0x5c29x12= _0x5c29x2[_0x5c29x4],this[_0xd587[1855]](_0x5c29x3,_0x5c29x12[_0xd587[772]],_0x5c29x12,_0x5c29x5,_0x5c29x9,_0x5c29x3[_0xd587[1839]],_0x5c29x4,_0x5c29x13+ 1)}}else {_0x5c29x5(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x13,1)}}};function mxHierarchicalLayoutStage(){}mxHierarchicalLayoutStage[_0xd587[202]][_0xd587[350]]= function(_0x5c29x2){};function mxMedianHybridCrossingReduction(_0x5c29x2){this[_0xd587[1759]]= _0x5c29x2}mxMedianHybridCrossingReduction[_0xd587[202]]=  new mxHierarchicalLayoutStage;mxMedianHybridCrossingReduction[_0xd587[202]][_0xd587[196]]= mxMedianHybridCrossingReduction;mxMedianHybridCrossingReduction[_0xd587[202]][_0xd587[1759]]= null;mxMedianHybridCrossingReduction[_0xd587[202]][_0xd587[1795]]= 24;mxMedianHybridCrossingReduction[_0xd587[202]][_0xd587[1856]]= null;mxMedianHybridCrossingReduction[_0xd587[202]][_0xd587[1857]]= 0;mxMedianHybridCrossingReduction[_0xd587[202]][_0xd587[1858]]= 0;mxMedianHybridCrossingReduction[_0xd587[202]][_0xd587[1859]]= 2;mxMedianHybridCrossingReduction[_0xd587[202]][_0xd587[350]]= function(_0x5c29x2){_0x5c29x2= this[_0xd587[1759]][_0xd587[502]]();this[_0xd587[1856]]= [];for(var _0x5c29x3=0;_0x5c29x3< _0x5c29x2[_0xd587[1850]][_0xd587[67]];_0x5c29x3++){this[_0xd587[1856]][_0x5c29x3]= _0x5c29x2[_0xd587[1850]][_0x5c29x3][_0xd587[1853]]()};for(var _0x5c29x4=0,_0x5c29x5=this[_0xd587[1860]](_0x5c29x2),_0x5c29x3=0;_0x5c29x3< this[_0xd587[1795]]&& _0x5c29x4< this[_0xd587[1859]];_0x5c29x3++){this[_0xd587[1861]](_0x5c29x3,_0x5c29x2);this[_0xd587[1862]](_0x5c29x3,_0x5c29x2);var _0x5c29x9=this[_0xd587[1860]](_0x5c29x2);if(_0x5c29x9< _0x5c29x5){_0x5c29x5= _0x5c29x9;for(_0x5c29x9= _0x5c29x4= 0;_0x5c29x9< this[_0xd587[1856]][_0xd587[67]];_0x5c29x9++){for(var _0x5c29xa=_0x5c29x2[_0xd587[1850]][_0x5c29x9],_0x5c29x12=0;_0x5c29x12< _0x5c29xa[_0xd587[67]];_0x5c29x12++){var _0x5c29x13=_0x5c29xa[_0x5c29x12];this[_0xd587[1856]][_0x5c29x9][_0x5c29x13[_0xd587[1833]](_0x5c29x9)]= _0x5c29x13}}}else {_0x5c29x4++;for(_0x5c29x9= 0;_0x5c29x9< this[_0xd587[1856]][_0xd587[67]];_0x5c29x9++){_0x5c29xa= _0x5c29x2[_0xd587[1850]][_0x5c29x9];for(_0x5c29x12= 0;_0x5c29x12< _0x5c29xa[_0xd587[67]];_0x5c29x12++){_0x5c29x13= _0x5c29xa[_0x5c29x12],_0x5c29x13[_0xd587[1834]](_0x5c29x9,_0x5c29x12)}}};if(0== _0x5c29x5){break}};_0x5c29x4= [];_0x5c29x5= [];for(_0x5c29x3= 0;_0x5c29x3< _0x5c29x2[_0xd587[1827]]+ 1;_0x5c29x3++){_0x5c29x5[_0x5c29x3]= [],_0x5c29x4[_0x5c29x3]= _0x5c29x5[_0x5c29x3]};for(_0x5c29x3= 0;_0x5c29x3< this[_0xd587[1856]][_0xd587[67]];_0x5c29x3++){for(_0x5c29x9= 0;_0x5c29x9< this[_0xd587[1856]][_0x5c29x3][_0xd587[67]];_0x5c29x9++){_0x5c29x5[_0x5c29x3][_0xd587[207]](this[_0xd587[1856]][_0x5c29x3][_0x5c29x9])}};_0x5c29x2[_0xd587[1850]]= _0x5c29x4};mxMedianHybridCrossingReduction[_0xd587[202]][_0xd587[1860]]= function(_0x5c29x2){for(var _0x5c29x3=_0x5c29x2[_0xd587[1850]][_0xd587[67]],_0x5c29x4=0,_0x5c29x5=1;_0x5c29x5< _0x5c29x3;_0x5c29x5++){_0x5c29x4+= this[_0xd587[1863]](_0x5c29x5,_0x5c29x2)};return _0x5c29x4};mxMedianHybridCrossingReduction[_0xd587[202]][_0xd587[1863]]= function(_0x5c29x2,_0x5c29x3){for(var _0x5c29x4=0,_0x5c29x5=_0x5c29x3[_0xd587[1850]][_0x5c29x2],_0x5c29x9=_0x5c29x5[_0xd587[67]],_0x5c29xa=_0x5c29x3[_0xd587[1850]][_0x5c29x2- 1][_0xd587[67]],_0x5c29x12=[],_0x5c29x13=0;_0x5c29x13< _0x5c29x9;_0x5c29x13++){_0x5c29x12[_0x5c29x13]= []};for(_0x5c29x13= 0;_0x5c29x13< _0x5c29x5[_0xd587[67]];_0x5c29x13++){for(var _0x5c29x14=_0x5c29x5[_0x5c29x13],_0x5c29x15=_0x5c29x14[_0xd587[1833]](_0x5c29x2),_0x5c29x16=_0x5c29x14[_0xd587[1832]](_0x5c29x2),_0x5c29x14=0;_0x5c29x14< _0x5c29x16[_0xd587[67]];_0x5c29x14++){var _0x5c29x17=_0x5c29x16[_0x5c29x14][_0xd587[1833]](_0x5c29x2- 1);_0x5c29x12[_0x5c29x15][_0x5c29x17]= 201207}};for(_0x5c29x13= 0;_0x5c29x13< _0x5c29x9;_0x5c29x13++){for(_0x5c29x14= 0;_0x5c29x14< _0x5c29xa;_0x5c29x14++){if(201207== _0x5c29x12[_0x5c29x13][_0x5c29x14]){for(_0x5c29x5= _0x5c29x13+ 1;_0x5c29x5< _0x5c29x9;_0x5c29x5++){for(_0x5c29x15= 0;_0x5c29x15< _0x5c29x14;_0x5c29x15++){201207== _0x5c29x12[_0x5c29x5][_0x5c29x15]&& _0x5c29x4++}};for(_0x5c29x5= 0;_0x5c29x5< _0x5c29x13;_0x5c29x5++){for(_0x5c29x15= _0x5c29x14+ 1;_0x5c29x15< _0x5c29xa;_0x5c29x15++){201207== _0x5c29x12[_0x5c29x5][_0x5c29x15]&& _0x5c29x4++}}}}};return _0x5c29x4/ 2};mxMedianHybridCrossingReduction[_0xd587[202]][_0xd587[1862]]= function(_0x5c29x2,_0x5c29x3){for(var _0x5c29x4=!0,_0x5c29x5=0;_0x5c29x4&& 10> _0x5c29x5++;){for(var _0x5c29x9=1== _0x5c29x2% 2&& 1== _0x5c29x5% 2,_0x5c29x4=!1,_0x5c29xa=0;_0x5c29xa< _0x5c29x3[_0xd587[1850]][_0xd587[67]];_0x5c29xa++){for(var _0x5c29x12=_0x5c29x3[_0xd587[1850]][_0x5c29xa],_0x5c29x13=[],_0x5c29x14=0;_0x5c29x14< _0x5c29x12[_0xd587[67]];_0x5c29x14++){var _0x5c29x15=_0x5c29x12[_0x5c29x14],_0x5c29x16=_0x5c29x15[_0xd587[1833]](_0x5c29xa);0> _0x5c29x16&& (_0x5c29x16= _0x5c29x14);_0x5c29x13[_0x5c29x16]= _0x5c29x15};for(var _0x5c29x17=_0x5c29x16= _0x5c29x15= null,_0x5c29x18=null,_0x5c29x19=null,_0x5c29x1a=null,_0x5c29x1b=null,_0x5c29x1c=null,_0x5c29x1d=null,_0x5c29x1e=null,_0x5c29x14=0;_0x5c29x14< _0x5c29x12[_0xd587[67]]- 1;_0x5c29x14++){if(0== _0x5c29x14){for(var _0x5c29x1d=_0x5c29x13[_0x5c29x14],_0x5c29x15=_0x5c29x1d[_0xd587[1831]](_0x5c29xa),_0x5c29x16=_0x5c29x1d[_0xd587[1832]](_0x5c29xa),_0x5c29x19=[],_0x5c29x1a=[],_0x5c29x1f=0;_0x5c29x1f< _0x5c29x15[_0xd587[67]];_0x5c29x1f++){_0x5c29x19[_0x5c29x1f]= _0x5c29x15[_0x5c29x1f][_0xd587[1833]](_0x5c29xa+ 1)};for(_0x5c29x1f= 0;_0x5c29x1f< _0x5c29x16[_0xd587[67]];_0x5c29x1f++){_0x5c29x1a[_0x5c29x1f]= _0x5c29x16[_0x5c29x1f][_0xd587[1833]](_0x5c29xa- 1)}}else {_0x5c29x15= _0x5c29x17,_0x5c29x16= _0x5c29x18,_0x5c29x19= _0x5c29x1b,_0x5c29x1a= _0x5c29x1c,_0x5c29x1d= _0x5c29x1e};_0x5c29x1e= _0x5c29x13[_0x5c29x14+ 1];_0x5c29x17= _0x5c29x1e[_0xd587[1831]](_0x5c29xa);_0x5c29x18= _0x5c29x1e[_0xd587[1832]](_0x5c29xa);_0x5c29x1b= [];_0x5c29x1c= [];for(_0x5c29x1f= 0;_0x5c29x1f< _0x5c29x17[_0xd587[67]];_0x5c29x1f++){_0x5c29x1b[_0x5c29x1f]= _0x5c29x17[_0x5c29x1f][_0xd587[1833]](_0x5c29xa+ 1)};for(_0x5c29x1f= 0;_0x5c29x1f< _0x5c29x18[_0xd587[67]];_0x5c29x1f++){_0x5c29x1c[_0x5c29x1f]= _0x5c29x18[_0x5c29x1f][_0xd587[1833]](_0x5c29xa- 1)};for(var _0x5c29x20=0,_0x5c29x62=0,_0x5c29x1f=0;_0x5c29x1f< _0x5c29x19[_0xd587[67]];_0x5c29x1f++){for(var _0x5c29x63=0;_0x5c29x63< _0x5c29x1b[_0xd587[67]];_0x5c29x63++){_0x5c29x19[_0x5c29x1f]> _0x5c29x1b[_0x5c29x63]&& _0x5c29x20++,_0x5c29x19[_0x5c29x1f]< _0x5c29x1b[_0x5c29x63]&& _0x5c29x62++}};for(_0x5c29x1f= 0;_0x5c29x1f< _0x5c29x1a[_0xd587[67]];_0x5c29x1f++){for(_0x5c29x63= 0;_0x5c29x63< _0x5c29x1c[_0xd587[67]];_0x5c29x63++){_0x5c29x1a[_0x5c29x1f]> _0x5c29x1c[_0x5c29x63]&& _0x5c29x20++,_0x5c29x1a[_0x5c29x1f]< _0x5c29x1c[_0x5c29x63]&& _0x5c29x62++}};if(_0x5c29x62< _0x5c29x20|| _0x5c29x62== _0x5c29x20&& _0x5c29x9){_0x5c29x17= _0x5c29x1d[_0xd587[1833]](_0x5c29xa),_0x5c29x1d[_0xd587[1834]](_0x5c29xa,_0x5c29x1e[_0xd587[1833]](_0x5c29xa)),_0x5c29x1e[_0xd587[1834]](_0x5c29xa,_0x5c29x17),_0x5c29x17= _0x5c29x15,_0x5c29x18= _0x5c29x16,_0x5c29x1b= _0x5c29x19,_0x5c29x1c= _0x5c29x1a,_0x5c29x1e= _0x5c29x1d,_0x5c29x9|| (_0x5c29x4=  !0)}}}}};mxMedianHybridCrossingReduction[_0xd587[202]][_0xd587[1861]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=0== _0x5c29x2% 2;if(_0x5c29x4){for(var _0x5c29x5=_0x5c29x3[_0xd587[1827]]- 1;0<= _0x5c29x5;_0x5c29x5--){this[_0xd587[1864]](_0x5c29x5,_0x5c29x4)}}else {for(_0x5c29x5= 1;_0x5c29x5< _0x5c29x3[_0xd587[1827]];_0x5c29x5++){this[_0xd587[1864]](_0x5c29x5,_0x5c29x4)}}};mxMedianHybridCrossingReduction[_0xd587[202]][_0xd587[1864]]= function(_0x5c29x2,_0x5c29x3){for(var _0x5c29x4=this[_0xd587[1856]][_0x5c29x2][_0xd587[67]],_0x5c29x5=[],_0x5c29x9=[],_0x5c29xa=0;_0x5c29xa< _0x5c29x4;_0x5c29xa++){var _0x5c29x12=this[_0xd587[1856]][_0x5c29x2][_0x5c29xa],_0x5c29x13= new MedianCellSorter;_0x5c29x13[_0xd587[246]]= _0x5c29x12;var _0x5c29x14;_0x5c29x14= _0x5c29x3?_0x5c29x12[_0xd587[1831]](_0x5c29x2):_0x5c29x12[_0xd587[1832]](_0x5c29x2);var _0x5c29x15;_0x5c29x15= _0x5c29x3?_0x5c29x2+ 1:_0x5c29x2- 1;null!= _0x5c29x14&& 0!= _0x5c29x14[_0xd587[67]]?(_0x5c29x13[_0xd587[1865]]= this[_0xd587[1865]](_0x5c29x14,_0x5c29x15),_0x5c29x5[_0xd587[207]](_0x5c29x13)):_0x5c29x9[_0x5c29x12[_0xd587[1833]](_0x5c29x2)]=  !0};_0x5c29x5[_0xd587[470]](MedianCellSorter[_0xd587[202]][_0xd587[469]]);for(_0x5c29xa= 0;_0x5c29xa< _0x5c29x4;_0x5c29xa++){null== _0x5c29x9[_0x5c29xa]&& (_0x5c29x12= _0x5c29x5[_0xd587[1115]]()[_0xd587[246]],_0x5c29x12[_0xd587[1834]](_0x5c29x2,_0x5c29xa))}};mxMedianHybridCrossingReduction[_0xd587[202]][_0xd587[1865]]= function(_0x5c29x2,_0x5c29x3){for(var _0x5c29x4=[],_0x5c29x5=0,_0x5c29x9=0;_0x5c29x9< _0x5c29x2[_0xd587[67]];_0x5c29x9++){var _0x5c29xa=_0x5c29x2[_0x5c29x9];_0x5c29x4[_0x5c29x5++]= _0x5c29xa[_0xd587[1833]](_0x5c29x3)};_0x5c29x4[_0xd587[470]](function(_0x5c29x2,_0x5c29x3){return _0x5c29x2- _0x5c29x3});if(1== _0x5c29x5% 2){return _0x5c29x4[Math[_0xd587[519]](_0x5c29x5/ 2)]};if(2== _0x5c29x5){return (_0x5c29x4[0]+ _0x5c29x4[1])/ 2};_0x5c29x9= _0x5c29x5/ 2;_0x5c29xa= _0x5c29x4[_0x5c29x9- 1]- _0x5c29x4[0];_0x5c29x5= _0x5c29x4[_0x5c29x5- 1]- _0x5c29x4[_0x5c29x9];return (_0x5c29x4[_0x5c29x9- 1]* _0x5c29x5+ _0x5c29x4[_0x5c29x9]* _0x5c29xa)/ (_0x5c29xa+ _0x5c29x5)};function MedianCellSorter(){}MedianCellSorter[_0xd587[202]][_0xd587[1865]]= 0;MedianCellSorter[_0xd587[202]][_0xd587[246]]=  !1;MedianCellSorter[_0xd587[202]][_0xd587[469]]= function(_0x5c29x2,_0x5c29x3){return null!= _0x5c29x2&& null!= _0x5c29x3?_0x5c29x3[_0xd587[1865]]> _0x5c29x2[_0xd587[1865]]?-1:_0x5c29x3[_0xd587[1865]]< _0x5c29x2[_0xd587[1865]]?1:0:0};function mxMinimumCycleRemover(_0x5c29x2){this[_0xd587[1759]]= _0x5c29x2}mxMinimumCycleRemover[_0xd587[202]]=  new mxHierarchicalLayoutStage;mxMinimumCycleRemover[_0xd587[202]][_0xd587[196]]= mxMinimumCycleRemover;mxMinimumCycleRemover[_0xd587[202]][_0xd587[1759]]= null;mxMinimumCycleRemover[_0xd587[202]][_0xd587[350]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1759]][_0xd587[502]](),_0x5c29x4={},_0x5c29x5=mxUtils[_0xd587[238]](_0x5c29x3[_0xd587[1846]],null,!0),_0x5c29x9=null;if(null!= _0x5c29x3[_0xd587[1845]]){var _0x5c29xa=_0x5c29x3[_0xd587[1845]],_0x5c29x9=[];for(_0x5c29x2= 0;_0x5c29x2< _0x5c29xa[_0xd587[67]];_0x5c29x2++){var _0x5c29x12=mxCellPath[_0xd587[385]](_0x5c29xa[_0x5c29x2]);_0x5c29x9[_0x5c29x2]= _0x5c29x3[_0xd587[1846]][_0x5c29x12]}};_0x5c29x3[_0xd587[209]](function(_0x5c29x2,_0x5c29x3,_0x5c29x9,_0x5c29xa,_0x5c29x12){_0x5c29x3[_0xd587[1720]](_0x5c29x2)&& (_0x5c29x9[_0xd587[1744]](),mxUtils[_0xd587[205]](_0x5c29x9,_0x5c29x2[_0xd587[1838]]),_0x5c29x2[_0xd587[1837]][_0xd587[207]](_0x5c29x9),mxUtils[_0xd587[205]](_0x5c29x9,_0x5c29x3[_0xd587[1837]]),_0x5c29x3[_0xd587[1838]][_0xd587[207]](_0x5c29x9));_0x5c29x2= mxCellPath[_0xd587[385]](_0x5c29x3[_0xd587[246]]);_0x5c29x4[_0x5c29x2]= _0x5c29x3;delete _0x5c29x5[_0x5c29x2]},_0x5c29x9,!0,null);_0x5c29x9= null;0< _0x5c29x5[_0xd587[1866]]&& (_0x5c29x9= mxUtils[_0xd587[238]](_0x5c29x5,null,!0));_0x5c29x2= mxUtils[_0xd587[238]](_0x5c29x4,null,!0);_0x5c29x3[_0xd587[209]](function(_0x5c29x2,_0x5c29x3,_0x5c29x9,_0x5c29xa,_0x5c29x12){_0x5c29x3[_0xd587[1720]](_0x5c29x2)&& (_0x5c29x9[_0xd587[1744]](),mxUtils[_0xd587[205]](_0x5c29x9,_0x5c29x2[_0xd587[1838]]),_0x5c29x3[_0xd587[1838]][_0xd587[207]](_0x5c29x9),_0x5c29x2[_0xd587[1837]][_0xd587[207]](_0x5c29x9),mxUtils[_0xd587[205]](_0x5c29x9,_0x5c29x3[_0xd587[1837]]));_0x5c29x2= mxCellPath[_0xd587[385]](_0x5c29x3[_0xd587[246]]);_0x5c29x4[_0x5c29x2]= _0x5c29x3;delete _0x5c29x5[_0x5c29x2]},_0x5c29x5,!0,_0x5c29x2);_0x5c29xa= this[_0xd587[1759]][_0xd587[1703]]();if(null!= _0x5c29x9&& 0< _0x5c29x9[_0xd587[67]]){_0x5c29x3= _0x5c29x3[_0xd587[1845]];for(_0x5c29x2= 0;_0x5c29x2< _0x5c29x9[_0xd587[67]];_0x5c29x2++){_0x5c29x12= _0x5c29x9[_0x5c29x2][_0xd587[246]],0== _0x5c29xa[_0xd587[1867]](_0x5c29x12)[_0xd587[67]]&& _0x5c29x3[_0xd587[207]](_0x5c29x12)}}};function mxCoordinateAssignment(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){this[_0xd587[1759]]= _0x5c29x2;this[_0xd587[1868]]= _0x5c29x3;this[_0xd587[1869]]= _0x5c29x4;this[_0xd587[1870]]= _0x5c29x5;this[_0xd587[1871]]= _0x5c29x9;this[_0xd587[1872]]= _0x5c29xa}var mxHierarchicalEdgeStyle={ORTHOGONAL:1,POLYLINE:2,STRAIGHT:3,CURVE:4};mxCoordinateAssignment[_0xd587[202]]=  new mxHierarchicalLayoutStage;mxCoordinateAssignment[_0xd587[202]][_0xd587[196]]= mxCoordinateAssignment;mxCoordinateAssignment[_0xd587[202]][_0xd587[1759]]= null;mxCoordinateAssignment[_0xd587[202]][_0xd587[1868]]= 30;mxCoordinateAssignment[_0xd587[202]][_0xd587[1869]]= 100;mxCoordinateAssignment[_0xd587[202]][_0xd587[1872]]= 10;mxCoordinateAssignment[_0xd587[202]][_0xd587[1795]]= 8;mxCoordinateAssignment[_0xd587[202]][_0xd587[1751]]= 5;mxCoordinateAssignment[_0xd587[202]][_0xd587[1752]]= 2;mxCoordinateAssignment[_0xd587[202]][_0xd587[1753]]= 12;mxCoordinateAssignment[_0xd587[202]][_0xd587[1754]]= 4;mxCoordinateAssignment[_0xd587[202]][_0xd587[1873]]= null;mxCoordinateAssignment[_0xd587[202]][_0xd587[1870]]= mxConstants[_0xd587[1358]];mxCoordinateAssignment[_0xd587[202]][_0xd587[1871]]= null;mxCoordinateAssignment[_0xd587[202]][_0xd587[1874]]= null;mxCoordinateAssignment[_0xd587[202]][_0xd587[1875]]= null;mxCoordinateAssignment[_0xd587[202]][_0xd587[1876]]= null;mxCoordinateAssignment[_0xd587[202]][_0xd587[1877]]= null;mxCoordinateAssignment[_0xd587[202]][_0xd587[1878]]= null;mxCoordinateAssignment[_0xd587[202]][_0xd587[1879]]= null;mxCoordinateAssignment[_0xd587[202]][_0xd587[1880]]= null;mxCoordinateAssignment[_0xd587[202]][_0xd587[1881]]= null;mxCoordinateAssignment[_0xd587[202]][_0xd587[1882]]=  !0;mxCoordinateAssignment[_0xd587[202]][_0xd587[675]]= mxHierarchicalEdgeStyle[_0xd587[1883]];mxCoordinateAssignment[_0xd587[202]][_0xd587[1884]]= null;mxCoordinateAssignment[_0xd587[202]][_0xd587[1885]]= null;mxCoordinateAssignment[_0xd587[202]][_0xd587[1745]]= 10;mxCoordinateAssignment[_0xd587[202]][_0xd587[1886]]= function(){var _0x5c29x2=this[_0xd587[1759]][_0xd587[502]]();mxLog[_0xd587[539]]();mxLog[_0xd587[171]](_0xd587[1887]);for(var _0x5c29x3=0;_0x5c29x3< _0x5c29x2[_0xd587[1850]][_0xd587[67]];_0x5c29x3++){mxLog[_0xd587[53]](_0xd587[1888],_0x5c29x3,_0xd587[1889]);for(var _0x5c29x4=_0x5c29x2[_0xd587[1850]][_0x5c29x3],_0x5c29x5=0;_0x5c29x5< _0x5c29x4[_0xd587[67]];_0x5c29x5++){mxLog[_0xd587[53]](_0x5c29x4[_0x5c29x5][_0xd587[1833]](_0x5c29x3),_0xd587[316])};mxLog[_0xd587[171]]()};mxLog[_0xd587[171]](_0xd587[1890])};mxCoordinateAssignment[_0xd587[202]][_0xd587[350]]= function(_0x5c29x2){this[_0xd587[1873]]= [];_0x5c29x2= this[_0xd587[1759]][_0xd587[502]]();this[_0xd587[1875]]= 0;this[_0xd587[1891]](this[_0xd587[1759]][_0xd587[1703]](),_0x5c29x2);this[_0xd587[1882]]&& this[_0xd587[1892]](_0x5c29x2);var _0x5c29x3=1E8;if(this[_0xd587[1882]]){for(var _0x5c29x4=0;_0x5c29x4< this[_0xd587[1795]];_0x5c29x4++){0!= _0x5c29x4&& (this[_0xd587[1893]](_0x5c29x4,_0x5c29x2),this[_0xd587[1892]](_0x5c29x2));if(this[_0xd587[1875]]< _0x5c29x3){for(var _0x5c29x5=0;_0x5c29x5< _0x5c29x2[_0xd587[1850]][_0xd587[67]];_0x5c29x5++){for(var _0x5c29x9=_0x5c29x2[_0xd587[1850]][_0x5c29x5],_0x5c29xa=0;_0x5c29xa< _0x5c29x9[_0xd587[67]];_0x5c29xa++){var _0x5c29x12=_0x5c29x9[_0x5c29xa];_0x5c29x12[_0xd587[1835]](_0x5c29x5,_0x5c29x12[_0xd587[1833]](_0x5c29x5))}};_0x5c29x3= this[_0xd587[1875]]}else {for(_0x5c29x5= 0;_0x5c29x5< _0x5c29x2[_0xd587[1850]][_0xd587[67]];_0x5c29x5++){_0x5c29x9= _0x5c29x2[_0xd587[1850]][_0x5c29x5];for(_0x5c29xa= 0;_0x5c29xa< _0x5c29x9[_0xd587[67]];_0x5c29xa++){_0x5c29x12= _0x5c29x9[_0x5c29xa],_0x5c29x12[_0xd587[1834]](_0x5c29x5,_0x5c29x12[_0xd587[730]](_0x5c29x5))}}};this[_0xd587[1894]](this[_0xd587[1759]][_0xd587[1703]](),_0x5c29x2);this[_0xd587[1875]]= 0}};this[_0xd587[1895]](this[_0xd587[1759]][_0xd587[1703]](),_0x5c29x2)};mxCoordinateAssignment[_0xd587[202]][_0xd587[1892]]= function(_0x5c29x2){for(var _0x5c29x3=[],_0x5c29x4=[],_0x5c29x5=[],_0x5c29x9=0;_0x5c29x9<= _0x5c29x2[_0xd587[1827]];_0x5c29x9++){_0x5c29x5[_0x5c29x9]= _0x5c29x2[_0xd587[1850]][_0x5c29x9];for(var _0x5c29xa=0;_0x5c29xa< _0x5c29x5[_0x5c29x9][_0xd587[67]];_0x5c29xa++){var _0x5c29x12=_0x5c29x5[_0x5c29x9][_0x5c29xa],_0x5c29x13= new WeightedCellSorter(_0x5c29x12,_0x5c29x9);_0x5c29x13[_0xd587[1785]]= _0x5c29xa;_0x5c29x13[_0xd587[1784]]=  !0;_0x5c29x3[_0xd587[207]](_0x5c29x13);_0x5c29x12= mxCellPath[_0xd587[385]](_0x5c29x12[_0xd587[1841]]());_0x5c29x4[_0x5c29x12]= _0x5c29x13}};_0x5c29x2= 10* _0x5c29x3[_0xd587[67]];for(_0x5c29xa= 0;0< _0x5c29x3[_0xd587[67]]&& _0x5c29xa<= _0x5c29x2;){var _0x5c29x13=_0x5c29x3[_0xd587[1115]](),_0x5c29x9=_0x5c29x13[_0xd587[246]],_0x5c29x14=_0x5c29x13[_0xd587[1782]],_0x5c29x15=parseInt(_0x5c29x13[_0xd587[1785]]),_0x5c29x12=_0x5c29x9[_0xd587[1831]](_0x5c29x14),_0x5c29x16=_0x5c29x9[_0xd587[1832]](_0x5c29x14),_0x5c29x17=_0x5c29x12[_0xd587[67]],_0x5c29x18=_0x5c29x16[_0xd587[67]],_0x5c29x19=this[_0xd587[1896]](_0x5c29x12,_0x5c29x14+ 1),_0x5c29x1a=this[_0xd587[1896]](_0x5c29x16,_0x5c29x14- 1),_0x5c29x1b=_0x5c29x17+ _0x5c29x18,_0x5c29x1c=_0x5c29x9[_0xd587[1833]](_0x5c29x14),_0x5c29x1d=_0x5c29x1c;0< _0x5c29x1b&& (_0x5c29x1d= (_0x5c29x19* _0x5c29x17+ _0x5c29x1a* _0x5c29x18)/ _0x5c29x1b);_0x5c29x17=  !1;_0x5c29x1d< _0x5c29x1c- 1?0== _0x5c29x15?(_0x5c29x9[_0xd587[1834]](_0x5c29x14,_0x5c29x1d),_0x5c29x17=  !0):(_0x5c29x15= _0x5c29x5[_0x5c29x14][_0x5c29x15- 1],_0x5c29x1c= _0x5c29x15[_0xd587[1833]](_0x5c29x14),_0x5c29x1c= _0x5c29x1c+ _0x5c29x15[_0xd587[117]]/ 2+ this[_0xd587[1868]]+ _0x5c29x9[_0xd587[117]]/ 2,_0x5c29x1c< _0x5c29x1d?(_0x5c29x9[_0xd587[1834]](_0x5c29x14,_0x5c29x1d),_0x5c29x17=  !0):_0x5c29x1c< _0x5c29x9[_0xd587[1833]](_0x5c29x14)- 1&& (_0x5c29x9[_0xd587[1834]](_0x5c29x14,_0x5c29x1c),_0x5c29x17=  !0)):_0x5c29x1d> _0x5c29x1c+ 1&& (_0x5c29x15== _0x5c29x5[_0x5c29x14][_0xd587[67]]- 1?(_0x5c29x9[_0xd587[1834]](_0x5c29x14,_0x5c29x1d),_0x5c29x17=  !0):(_0x5c29x15= _0x5c29x5[_0x5c29x14][_0x5c29x15+ 1],_0x5c29x1c= _0x5c29x15[_0xd587[1833]](_0x5c29x14),_0x5c29x1c= _0x5c29x1c- _0x5c29x15[_0xd587[117]]/ 2- this[_0xd587[1868]]- _0x5c29x9[_0xd587[117]]/ 2,_0x5c29x1c> _0x5c29x1d?(_0x5c29x9[_0xd587[1834]](_0x5c29x14,_0x5c29x1d),_0x5c29x17=  !0):_0x5c29x1c> _0x5c29x9[_0xd587[1833]](_0x5c29x14)+ 1&& (_0x5c29x9[_0xd587[1834]](_0x5c29x14,_0x5c29x1c),_0x5c29x17=  !0)));if(_0x5c29x17){for(_0x5c29x9= 0;_0x5c29x9< _0x5c29x12[_0xd587[67]];_0x5c29x9++){_0x5c29x14= _0x5c29x12[_0x5c29x9],_0x5c29x14= mxCellPath[_0xd587[385]](_0x5c29x14[_0xd587[1841]]()),_0x5c29x14= _0x5c29x4[_0x5c29x14],null!= _0x5c29x14&& !1== _0x5c29x14[_0xd587[1784]]&& (_0x5c29x14[_0xd587[1784]]=  !0,_0x5c29x3[_0xd587[207]](_0x5c29x14))};for(_0x5c29x9= 0;_0x5c29x9< _0x5c29x16[_0xd587[67]];_0x5c29x9++){_0x5c29x14= _0x5c29x16[_0x5c29x9],_0x5c29x14= mxCellPath[_0xd587[385]](_0x5c29x14[_0xd587[1841]]()),_0x5c29x14= _0x5c29x4[_0x5c29x14],null!= _0x5c29x14&& !1== _0x5c29x14[_0xd587[1784]]&& (_0x5c29x14[_0xd587[1784]]=  !0,_0x5c29x3[_0xd587[207]](_0x5c29x14))}};_0x5c29x13[_0xd587[1784]]=  !1;_0x5c29xa++}};mxCoordinateAssignment[_0xd587[202]][_0xd587[1893]]= function(_0x5c29x2,_0x5c29x3){if(0== _0x5c29x2% 2){for(var _0x5c29x4=_0x5c29x3[_0xd587[1827]];0< _0x5c29x4;_0x5c29x4--){this[_0xd587[1897]](_0x5c29x4- 1,_0x5c29x3,_0x5c29x4)}}else {for(_0x5c29x4= 0;_0x5c29x4< _0x5c29x3[_0xd587[1827]]- 1;_0x5c29x4++){this[_0xd587[1897]](_0x5c29x4+ 1,_0x5c29x3,_0x5c29x4)}}};mxCoordinateAssignment[_0xd587[202]][_0xd587[1897]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x3= _0x5c29x3[_0xd587[1850]][_0x5c29x2];for(var _0x5c29x5=[],_0x5c29x9=[],_0x5c29xa=0;_0x5c29xa< _0x5c29x3[_0xd587[67]];_0x5c29xa++){var _0x5c29x12=_0x5c29x3[_0x5c29xa];_0x5c29x5[_0x5c29xa]=  new WeightedCellSorter;_0x5c29x5[_0x5c29xa][_0xd587[246]]= _0x5c29x12;_0x5c29x5[_0x5c29xa][_0xd587[1785]]= _0x5c29xa;var _0x5c29x13=mxCellPath[_0xd587[385]](_0x5c29x12[_0xd587[1841]]());_0x5c29x9[_0x5c29x13]= _0x5c29x5[_0x5c29xa];var _0x5c29x14=null,_0x5c29x14=_0x5c29x4< _0x5c29x2?_0x5c29x12[_0xd587[1832]](_0x5c29x2):_0x5c29x12[_0xd587[1831]](_0x5c29x2);_0x5c29x5[_0x5c29xa][_0xd587[1782]]= this[_0xd587[1898]](_0x5c29x12,_0x5c29x14)};_0x5c29x5[_0xd587[470]](WeightedCellSorter[_0xd587[202]][_0xd587[469]]);for(_0x5c29xa= 0;_0x5c29xa< _0x5c29x5[_0xd587[67]];_0x5c29xa++){_0x5c29x13= 0;_0x5c29x12= _0x5c29x5[_0x5c29xa][_0xd587[246]];_0x5c29x13= 0;_0x5c29x14= _0x5c29x4< _0x5c29x2?_0x5c29x12[_0xd587[1832]](_0x5c29x2)[_0xd587[1853]]():_0x5c29x12[_0xd587[1831]](_0x5c29x2)[_0xd587[1853]]();null!= _0x5c29x14&& (_0x5c29x13= _0x5c29x14[_0xd587[67]],_0x5c29x13= 0< _0x5c29x13?this[_0xd587[1896]](_0x5c29x14,_0x5c29x4):_0x5c29x12[_0xd587[1833]](_0x5c29x2));for(var _0x5c29x15=0,_0x5c29x14=-1E8,_0x5c29x16=_0x5c29x5[_0x5c29xa][_0xd587[1785]]- 1;0<= _0x5c29x16;){var _0x5c29x17=mxCellPath[_0xd587[385]](_0x5c29x3[_0x5c29x16][_0xd587[1841]]()),_0x5c29x17=_0x5c29x9[_0x5c29x17];if(null!= _0x5c29x17){var _0x5c29x18=_0x5c29x17[_0xd587[246]];_0x5c29x17[_0xd587[1784]]?(_0x5c29x14= _0x5c29x18[_0xd587[1833]](_0x5c29x2)+ _0x5c29x18[_0xd587[117]]/ 2+ this[_0xd587[1868]]+ _0x5c29x15+ _0x5c29x12[_0xd587[117]]/ 2,_0x5c29x16=  -1):(_0x5c29x15+= _0x5c29x18[_0xd587[117]]+ this[_0xd587[1868]],_0x5c29x16--)}};_0x5c29x15= 0;_0x5c29x18= 1E8;for(_0x5c29x16= _0x5c29x5[_0x5c29xa][_0xd587[1785]]+ 1;_0x5c29x16< _0x5c29x5[_0xd587[67]];){if(_0x5c29x17= mxCellPath[_0xd587[385]](_0x5c29x3[_0x5c29x16][_0xd587[1841]]()),_0x5c29x17= _0x5c29x9[_0x5c29x17],null!= _0x5c29x17){var _0x5c29x19=_0x5c29x17[_0xd587[246]];_0x5c29x17[_0xd587[1784]]?(_0x5c29x18= _0x5c29x19[_0xd587[1833]](_0x5c29x2)- _0x5c29x19[_0xd587[117]]/ 2- this[_0xd587[1868]]- _0x5c29x15- _0x5c29x12[_0xd587[117]]/ 2,_0x5c29x16= _0x5c29x5[_0xd587[67]]):(_0x5c29x15+= _0x5c29x19[_0xd587[117]]+ this[_0xd587[1868]],_0x5c29x16++)}};_0x5c29x13>= _0x5c29x14&& _0x5c29x13<= _0x5c29x18?_0x5c29x12[_0xd587[1834]](_0x5c29x2,_0x5c29x13):_0x5c29x13< _0x5c29x14?(_0x5c29x12[_0xd587[1834]](_0x5c29x2,_0x5c29x14),this[_0xd587[1875]]+= _0x5c29x14- _0x5c29x13):_0x5c29x13> _0x5c29x18&& (_0x5c29x12[_0xd587[1834]](_0x5c29x2,_0x5c29x18),this[_0xd587[1875]]+= _0x5c29x13- _0x5c29x18);_0x5c29x5[_0x5c29xa][_0xd587[1784]]=  !0}};mxCoordinateAssignment[_0xd587[202]][_0xd587[1898]]= function(_0x5c29x2,_0x5c29x3){for(var _0x5c29x4=0,_0x5c29x5=0;_0x5c29x5< _0x5c29x3[_0xd587[67]];_0x5c29x5++){var _0x5c29x9=_0x5c29x3[_0x5c29x5];_0x5c29x2[_0xd587[1193]]()&& _0x5c29x9[_0xd587[1193]]()?_0x5c29x4++:_0x5c29x4= _0x5c29x2[_0xd587[250]]()&& _0x5c29x9[_0xd587[250]]()?_0x5c29x4+ 8:_0x5c29x4+ 2};return _0x5c29x4};mxCoordinateAssignment[_0xd587[202]][_0xd587[1896]]= function(_0x5c29x2,_0x5c29x3){if(0== _0x5c29x2[_0xd587[67]]){return 0};for(var _0x5c29x4=[],_0x5c29x5=0;_0x5c29x5< _0x5c29x2[_0xd587[67]];_0x5c29x5++){_0x5c29x4[_0x5c29x5]= _0x5c29x2[_0x5c29x5][_0xd587[1833]](_0x5c29x3)};_0x5c29x4[_0xd587[470]](function(_0x5c29x2,_0x5c29x3){return _0x5c29x2- _0x5c29x3});if(1== _0x5c29x2[_0xd587[67]]% 2){return _0x5c29x4[Math[_0xd587[519]](_0x5c29x2[_0xd587[67]]/ 2)]};_0x5c29x5= _0x5c29x2[_0xd587[67]]/ 2;return (_0x5c29x4[_0x5c29x5- 1]+ _0x5c29x4[_0x5c29x5])/ 2};mxCoordinateAssignment[_0xd587[202]][_0xd587[1891]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[1899]](_0x5c29x2,_0x5c29x3);for(var _0x5c29x4=this[_0xd587[1876]];0<= _0x5c29x4;_0x5c29x4--){_0x5c29x4< _0x5c29x3[_0xd587[1827]]&& this[_0xd587[1900]](_0x5c29x4,_0x5c29x2,_0x5c29x3)};for(_0x5c29x4= this[_0xd587[1876]]+ 1;_0x5c29x4<= _0x5c29x3[_0xd587[1827]];_0x5c29x4++){0< _0x5c29x4&& this[_0xd587[1900]](_0x5c29x4,_0x5c29x2,_0x5c29x3)}};mxCoordinateAssignment[_0xd587[202]][_0xd587[1900]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x3= _0x5c29x4[_0xd587[1850]][_0x5c29x2];_0x5c29x4= 0;for(var _0x5c29x5=this[_0xd587[1871]]+ (this[_0xd587[1879]]- this[_0xd587[1880]][_0x5c29x2])/ 2,_0x5c29x9=!1,_0x5c29xa=0;_0x5c29xa< _0x5c29x3[_0xd587[67]];_0x5c29xa++){var _0x5c29x12=_0x5c29x3[_0x5c29xa];if(_0x5c29x12[_0xd587[1193]]()){var _0x5c29x13=this[_0xd587[1759]][_0xd587[1726]](_0x5c29x12[_0xd587[246]]);null!= _0x5c29x13?this[_0xd587[1870]]== mxConstants[_0xd587[1358]]|| this[_0xd587[1870]]== mxConstants[_0xd587[1354]]?(_0x5c29x12[_0xd587[117]]= _0x5c29x13[_0xd587[117]],_0x5c29x12[_0xd587[119]]= _0x5c29x13[_0xd587[119]]):(_0x5c29x12[_0xd587[117]]= _0x5c29x13[_0xd587[119]],_0x5c29x12[_0xd587[119]]= _0x5c29x13[_0xd587[117]]):_0x5c29x9=  !0;_0x5c29x4= Math[_0xd587[160]](_0x5c29x4,_0x5c29x12[_0xd587[119]])}else {_0x5c29x12[_0xd587[250]]()&& (_0x5c29x13= 1,null!= _0x5c29x12[_0xd587[1842]]?_0x5c29x13= _0x5c29x12[_0xd587[1842]][_0xd587[67]]:mxLog[_0xd587[283]](_0xd587[1901]),_0x5c29x12[_0xd587[117]]= (_0x5c29x13- 1)* this[_0xd587[1872]])};_0x5c29x5+= _0x5c29x12[_0xd587[117]]/ 2;_0x5c29x12[_0xd587[1835]](_0x5c29x2,_0x5c29x5);_0x5c29x12[_0xd587[1834]](_0x5c29x2,_0x5c29x5);_0x5c29x5+= _0x5c29x12[_0xd587[117]]/ 2;_0x5c29x5+= this[_0xd587[1868]]};!0== _0x5c29x9&& mxLog[_0xd587[283]](_0xd587[1902])};mxCoordinateAssignment[_0xd587[202]][_0xd587[1899]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=-this[_0xd587[1869]],_0x5c29x5=0;this[_0xd587[1880]]= [];this[_0xd587[1881]]= [];for(var _0x5c29x9=_0x5c29x3[_0xd587[1827]];0<= _0x5c29x9;_0x5c29x9--){for(var _0x5c29xa=0,_0x5c29x12=_0x5c29x3[_0xd587[1850]][_0x5c29x9],_0x5c29x13=this[_0xd587[1871]],_0x5c29x14=!1,_0x5c29x15=0;_0x5c29x15< _0x5c29x12[_0xd587[67]];_0x5c29x15++){var _0x5c29x16=_0x5c29x12[_0x5c29x15];if(_0x5c29x16[_0xd587[1193]]()){var _0x5c29x17=this[_0xd587[1759]][_0xd587[1726]](_0x5c29x16[_0xd587[246]]);null!= _0x5c29x17?this[_0xd587[1870]]== mxConstants[_0xd587[1358]]|| this[_0xd587[1870]]== mxConstants[_0xd587[1354]]?(_0x5c29x16[_0xd587[117]]= _0x5c29x17[_0xd587[117]],_0x5c29x16[_0xd587[119]]= _0x5c29x17[_0xd587[119]]):(_0x5c29x16[_0xd587[117]]= _0x5c29x17[_0xd587[119]],_0x5c29x16[_0xd587[119]]= _0x5c29x17[_0xd587[117]]):_0x5c29x14=  !0;_0x5c29xa= Math[_0xd587[160]](_0x5c29xa,_0x5c29x16[_0xd587[119]])}else {_0x5c29x16[_0xd587[250]]()&& (_0x5c29x17= 1,null!= _0x5c29x16[_0xd587[1842]]?_0x5c29x17= _0x5c29x16[_0xd587[1842]][_0xd587[67]]:mxLog[_0xd587[283]](_0xd587[1901]),_0x5c29x16[_0xd587[117]]= (_0x5c29x17- 1)* this[_0xd587[1872]])};_0x5c29x13+= _0x5c29x16[_0xd587[117]]/ 2;_0x5c29x16[_0xd587[1835]](_0x5c29x9,_0x5c29x13);_0x5c29x16[_0xd587[1834]](_0x5c29x9,_0x5c29x13);_0x5c29x13+= _0x5c29x16[_0xd587[117]]/ 2;_0x5c29x13+= this[_0xd587[1868]];_0x5c29x13> this[_0xd587[1879]]&& (this[_0xd587[1879]]= _0x5c29x13,this[_0xd587[1876]]= _0x5c29x9);this[_0xd587[1880]][_0x5c29x9]= _0x5c29x13};!0== _0x5c29x14&& mxLog[_0xd587[283]](_0xd587[1902]);this[_0xd587[1881]][_0x5c29x9]= _0x5c29x4;_0x5c29x13= _0x5c29xa/ 2+ _0x5c29x5/ 2+ this[_0xd587[1869]];_0x5c29x5= _0x5c29xa;_0x5c29x4= this[_0xd587[1870]]== mxConstants[_0xd587[1358]]|| this[_0xd587[1870]]== mxConstants[_0xd587[1359]]?_0x5c29x4+ _0x5c29x13:_0x5c29x4- _0x5c29x13;for(_0x5c29x15= 0;_0x5c29x15< _0x5c29x12[_0xd587[67]];_0x5c29x15++){_0x5c29x12[_0x5c29x15][_0xd587[1836]](_0x5c29x9,_0x5c29x4)}}};mxCoordinateAssignment[_0xd587[202]][_0xd587[1894]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=_0x5c29x3[_0xd587[1847]],_0x5c29x5;for(_0x5c29x5 in _0x5c29x4){var _0x5c29x9=_0x5c29x4[_0x5c29x5];if(!(1> _0x5c29x9[_0xd587[1827]]- _0x5c29x9[_0xd587[1828]]- 1)){for(var _0x5c29xa=_0x5c29x9[_0xd587[1833]](_0x5c29x9[_0xd587[1828]]+ 1),_0x5c29x12=!0,_0x5c29x13=0,_0x5c29x14=_0x5c29x9[_0xd587[1828]]+ 2;_0x5c29x14< _0x5c29x9[_0xd587[1827]];_0x5c29x14++){var _0x5c29x15=_0x5c29x9[_0xd587[1833]](_0x5c29x14);_0x5c29xa!= _0x5c29x15?(_0x5c29x12=  !1,_0x5c29xa= _0x5c29x15):_0x5c29x13++};if(!_0x5c29x12){for(var _0x5c29x12=_0x5c29xa= 0,_0x5c29x15=[],_0x5c29x16=[],_0x5c29x17=_0x5c29x9[_0xd587[1833]](_0x5c29x9[_0xd587[1828]]+ 1),_0x5c29x14=_0x5c29x9[_0xd587[1828]]+ 1;_0x5c29x14< _0x5c29x9[_0xd587[1827]]- 1;_0x5c29x14++){var _0x5c29x18=_0x5c29x9[_0xd587[730]](_0x5c29x14+ 1);_0x5c29x17== _0x5c29x18?(_0x5c29x15[_0x5c29x14- _0x5c29x9[_0xd587[1828]]- 1]= _0x5c29x17,_0x5c29xa++):this[_0xd587[1903]](_0x5c29x3,_0x5c29x9,_0x5c29x14+ 1,_0x5c29x17)?(_0x5c29x15[_0x5c29x14- _0x5c29x9[_0xd587[1828]]- 1]= _0x5c29x17,_0x5c29xa++):_0x5c29x17= _0x5c29x15[_0x5c29x14- _0x5c29x9[_0xd587[1828]]- 1]= _0x5c29x18};_0x5c29x17= _0x5c29x9[_0xd587[730]](_0x5c29x14);for(_0x5c29x14= _0x5c29x9[_0xd587[1827]]- 1;_0x5c29x14> _0x5c29x9[_0xd587[1828]]+ 1;_0x5c29x14--){_0x5c29x18= _0x5c29x9[_0xd587[730]](_0x5c29x14- 1),_0x5c29x17== _0x5c29x18?(_0x5c29x16[_0x5c29x14- _0x5c29x9[_0xd587[1828]]- 2]= _0x5c29x17,_0x5c29x12++):this[_0xd587[1903]](_0x5c29x3,_0x5c29x9,_0x5c29x14- 1,_0x5c29x17)?(_0x5c29x16[_0x5c29x14- _0x5c29x9[_0xd587[1828]]- 2]= _0x5c29x17,_0x5c29x12++):(_0x5c29x16[_0x5c29x14- _0x5c29x9[_0xd587[1828]]- 2]= _0x5c29x9[_0xd587[730]](_0x5c29x14- 1),_0x5c29x17= _0x5c29x18)};if(_0x5c29x12> _0x5c29x13|| _0x5c29xa> _0x5c29x13){if(_0x5c29x12>= _0x5c29xa){for(_0x5c29x14= _0x5c29x9[_0xd587[1827]]- 2;_0x5c29x14> _0x5c29x9[_0xd587[1828]];_0x5c29x14--){_0x5c29x9[_0xd587[1835]](_0x5c29x14,_0x5c29x16[_0x5c29x14- _0x5c29x9[_0xd587[1828]]- 1])}}else {if(_0x5c29xa> _0x5c29x12){for(_0x5c29x14= _0x5c29x9[_0xd587[1828]]+ 2;_0x5c29x14< _0x5c29x9[_0xd587[1827]];_0x5c29x14++){_0x5c29x9[_0xd587[1835]](_0x5c29x14,_0x5c29x15[_0x5c29x14- _0x5c29x9[_0xd587[1828]]- 2])}}}}}}}};mxCoordinateAssignment[_0xd587[202]][_0xd587[1903]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x2= _0x5c29x2[_0xd587[1850]][_0x5c29x4];for(var _0x5c29x9=-1,_0x5c29xa=0;_0x5c29xa< _0x5c29x2[_0xd587[67]];_0x5c29xa++){if(_0x5c29x3== _0x5c29x2[_0x5c29xa]){_0x5c29x9= _0x5c29xa;break}};if(0> _0x5c29x9){return !1};_0x5c29xa= _0x5c29x3[_0xd587[1833]](_0x5c29x4);if(_0x5c29x5< _0x5c29xa){if(0== _0x5c29x9){return !0};_0x5c29x2= _0x5c29x2[_0x5c29x9- 1];_0x5c29x4= _0x5c29x2[_0xd587[1833]](_0x5c29x4);_0x5c29x4= _0x5c29x4+ _0x5c29x2[_0xd587[117]]/ 2+ this[_0xd587[1868]]+ _0x5c29x3[_0xd587[117]]/ 2;if(!(_0x5c29x4<= _0x5c29x5)){return !1}}else {if(_0x5c29x5> _0x5c29xa){if(_0x5c29x9== _0x5c29x2[_0xd587[67]]- 1){return !0};_0x5c29x2= _0x5c29x2[_0x5c29x9+ 1];_0x5c29x4= _0x5c29x2[_0xd587[1833]](_0x5c29x4);_0x5c29x4= _0x5c29x4- _0x5c29x2[_0xd587[117]]/ 2- this[_0xd587[1868]]- _0x5c29x3[_0xd587[117]]/ 2;if(!(_0x5c29x4>= _0x5c29x5)){return !1}}};return !0};mxCoordinateAssignment[_0xd587[202]][_0xd587[1895]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[1877]]= [];this[_0xd587[1878]]= [];for(var _0x5c29x4=0;_0x5c29x4< _0x5c29x3[_0xd587[1850]][_0xd587[67]];_0x5c29x4++){this[_0xd587[1877]][_0x5c29x4]= Number[_0xd587[1904]],this[_0xd587[1878]][_0x5c29x4]= 0};_0x5c29x4= null;this[_0xd587[1759]][_0xd587[1735]]&& (_0x5c29x4= {});var _0x5c29x5=_0x5c29x3[_0xd587[1847]],_0x5c29x9=_0x5c29x3[_0xd587[1846]],_0x5c29xa;for(_0x5c29xa in _0x5c29x9){var _0x5c29x12=_0x5c29x9[_0x5c29xa];this[_0xd587[1725]](_0x5c29x12);if(this[_0xd587[1759]][_0xd587[1735]]){var _0x5c29x12=_0x5c29x2[_0xd587[251]][_0xd587[1197]](_0x5c29x12[_0xd587[246]]),_0x5c29x13=mxCellPath[_0xd587[385]](_0x5c29x12);null== _0x5c29x4[_0x5c29x13]&& (_0x5c29x4[_0x5c29x13]= _0x5c29x12)}};this[_0xd587[1759]][_0xd587[1735]]&& null!= _0x5c29x4&& this[_0xd587[1763]](_0x5c29x4);(this[_0xd587[675]]== mxHierarchicalEdgeStyle[_0xd587[1905]]|| this[_0xd587[675]]== mxHierarchicalEdgeStyle[_0xd587[1883]]|| this[_0xd587[675]]== mxHierarchicalEdgeStyle[_0xd587[1906]])&& this[_0xd587[1764]](_0x5c29x3);for(_0x5c29xa in _0x5c29x5){this[_0xd587[1907]](_0x5c29x5[_0x5c29xa])}};mxCoordinateAssignment[_0xd587[202]][_0xd587[1763]]= function(_0x5c29x2){var _0x5c29x3=[],_0x5c29x4;for(_0x5c29x4 in _0x5c29x2){_0x5c29x3[_0xd587[207]](_0x5c29x2[_0x5c29x4])};this[_0xd587[1759]][_0xd587[1727]](mxUtils[_0xd587[1779]](_0x5c29x3,!0),this[_0xd587[1745]])};mxCoordinateAssignment[_0xd587[202]][_0xd587[1764]]= function(_0x5c29x2){for(var _0x5c29x3=0;_0x5c29x3< _0x5c29x2[_0xd587[1850]][_0xd587[67]];_0x5c29x3++){for(var _0x5c29x4=_0x5c29x2[_0xd587[1850]][_0x5c29x3],_0x5c29x5=0;_0x5c29x5< _0x5c29x4[_0xd587[67]];_0x5c29x5++){var _0x5c29x9=_0x5c29x4[_0x5c29x5];if(_0x5c29x9[_0xd587[1193]]()){for(var _0x5c29xa=_0x5c29x9[_0xd587[1832]](_0x5c29x3),_0x5c29x12=_0x5c29x3- 1,_0x5c29x13=0;2> _0x5c29x13;_0x5c29x13++){if(-1< _0x5c29x12&& _0x5c29x12< _0x5c29x2[_0xd587[1850]][_0xd587[67]]&& null!= _0x5c29xa&& 0< _0x5c29xa[_0xd587[67]]){for(var _0x5c29x14=[],_0x5c29x15=0;_0x5c29x15< _0x5c29xa[_0xd587[67]];_0x5c29x15++){var _0x5c29x16= new WeightedCellSorter(_0x5c29xa[_0x5c29x15],_0x5c29xa[_0x5c29x15][_0xd587[730]](_0x5c29x12));_0x5c29x14[_0xd587[207]](_0x5c29x16)};_0x5c29x14[_0xd587[470]](WeightedCellSorter[_0xd587[202]][_0xd587[469]]);for(var _0x5c29x16=_0x5c29x9[_0xd587[235]][0]- _0x5c29x9[_0xd587[117]]/ 2,_0x5c29x17=_0x5c29x16+ _0x5c29x9[_0xd587[117]],_0x5c29x18=_0x5c29xa= 0,_0x5c29x12=[],_0x5c29x15=0;_0x5c29x15< _0x5c29x14[_0xd587[67]];_0x5c29x15++){var _0x5c29x19=_0x5c29x14[_0x5c29x15][_0xd587[246]],_0x5c29x1a;if(_0x5c29x19[_0xd587[1193]]()){_0x5c29x1a= 0== _0x5c29x13?_0x5c29x9[_0xd587[1838]]:_0x5c29x9[_0xd587[1837]];for(var _0x5c29x1b=0;_0x5c29x1b< _0x5c29x1a[_0xd587[67]];_0x5c29x1b++){if(_0x5c29x1a[_0x5c29x1b][_0xd587[1097]]== _0x5c29x19|| _0x5c29x1a[_0x5c29x1b][_0xd587[772]]== _0x5c29x19){_0x5c29xa+= _0x5c29x1a[_0x5c29x1b][_0xd587[1842]][_0xd587[67]],_0x5c29x18++,_0x5c29x12[_0xd587[207]](_0x5c29x1a[_0x5c29x1b])}}}else {_0x5c29xa+= _0x5c29x19[_0xd587[1842]][_0xd587[67]],_0x5c29x18++,_0x5c29x12[_0xd587[207]](_0x5c29x19)}};_0x5c29x9[_0xd587[117]]> (_0x5c29xa+ 1)* this[_0xd587[1751]]+ 2* this[_0xd587[1751]]&& (_0x5c29x16+= this[_0xd587[1751]],_0x5c29x17-= this[_0xd587[1751]]);_0x5c29x14= (_0x5c29x17- _0x5c29x16)/ _0x5c29xa;_0x5c29x16+= _0x5c29x14/ 2;_0x5c29x17= this[_0xd587[1753]]- this[_0xd587[1752]];for(_0x5c29x15= _0x5c29x18= 0;_0x5c29x15< _0x5c29x12[_0xd587[67]];_0x5c29x15++){_0x5c29x19= _0x5c29x12[_0x5c29x15][_0xd587[1842]][_0xd587[67]];_0x5c29x1b= mxCellPath[_0xd587[385]](_0x5c29x12[_0x5c29x15][_0xd587[1842]][0]);_0x5c29x1a= this[_0xd587[1873]][_0x5c29x1b];null== _0x5c29x1a&& (_0x5c29x1a= [],this[_0xd587[1873]][_0x5c29x1b]= _0x5c29x1a);_0x5c29x15< _0x5c29xa/ 2?_0x5c29x17+= this[_0xd587[1752]]:_0x5c29x15> _0x5c29xa/ 2&& (_0x5c29x17-= this[_0xd587[1752]]);for(_0x5c29x1b= 0;_0x5c29x1b< _0x5c29x19;_0x5c29x1b++){_0x5c29x1a[4* _0x5c29x1b+ 2* _0x5c29x13]= _0x5c29x16,_0x5c29x16+= _0x5c29x14,_0x5c29x1a[4* _0x5c29x1b+ 2* _0x5c29x13+ 1]= _0x5c29x17};_0x5c29x18= Math[_0xd587[160]](_0x5c29x18,_0x5c29x17)}};_0x5c29xa= _0x5c29x9[_0xd587[1831]](_0x5c29x3);_0x5c29x12= _0x5c29x3+ 1}}}}};mxCoordinateAssignment[_0xd587[202]][_0xd587[1907]]= function(_0x5c29x2){var _0x5c29x3=0;if(101207!= _0x5c29x2[_0xd587[1826]][0]){var _0x5c29x4=_0x5c29x2[_0xd587[1827]],_0x5c29x5=_0x5c29x2[_0xd587[1828]];_0x5c29x4== _0x5c29x5&& (_0x5c29x4= _0x5c29x2[_0xd587[1097]][_0xd587[1827]],_0x5c29x5= _0x5c29x2[_0xd587[772]][_0xd587[1828]]);for(var _0x5c29x9=0,_0x5c29xa=mxCellPath[_0xd587[385]](_0x5c29x2[_0xd587[1842]][0]),_0x5c29xa=this[_0xd587[1873]][_0x5c29xa],_0x5c29x12=_0x5c29x2[_0xd587[1843]]?_0x5c29x2[_0xd587[772]][_0xd587[246]]:_0x5c29x2[_0xd587[1097]][_0xd587[246]],_0x5c29x13=this[_0xd587[1759]][_0xd587[1179]],_0x5c29x14=0;_0x5c29x14< _0x5c29x2[_0xd587[1842]][_0xd587[67]];_0x5c29x14++){var _0x5c29x15=_0x5c29x2[_0xd587[1842]][_0x5c29x14],_0x5c29x16=this[_0xd587[1759]][_0xd587[1710]](_0x5c29x15,!0),_0x5c29x17=_0x5c29x13[_0xd587[251]][_0xd587[1709]](_0x5c29x15,!0),_0x5c29x18=[],_0x5c29x19=_0x5c29x2[_0xd587[1843]];_0x5c29x16!= _0x5c29x12&& (_0x5c29x19=  !_0x5c29x19);if(null!= _0x5c29xa){var _0x5c29x1a=_0x5c29x19?2:0,_0x5c29x1b=_0x5c29x19?this[_0xd587[1877]][_0x5c29x5]:this[_0xd587[1878]][_0x5c29x4],_0x5c29x1c=_0x5c29xa[4* _0x5c29x9+ 1+ _0x5c29x1a];_0x5c29x19&& (_0x5c29x1c=  -_0x5c29x1c);_0x5c29x1b+= _0x5c29x1c;_0x5c29x1a= _0x5c29xa[4* _0x5c29x9+ _0x5c29x1a];_0x5c29x17= _0x5c29x13[_0xd587[251]][_0xd587[1709]](_0x5c29x15,!0);this[_0xd587[1759]][_0xd587[1908]](_0x5c29x17)&& _0x5c29x13[_0xd587[251]][_0xd587[1197]](_0x5c29x17)== _0x5c29x16&& (_0x5c29x1a= _0x5c29x13[_0xd587[441]][_0xd587[248]](_0x5c29x17),_0x5c29x1a= null!= _0x5c29x1a?_0x5c29x1a[_0xd587[235]]:_0x5c29x16[_0xd587[256]][_0xd587[235]]+ _0x5c29x2[_0xd587[1097]][_0xd587[117]]* _0x5c29x17[_0xd587[256]][_0xd587[235]]);this[_0xd587[1870]]== mxConstants[_0xd587[1358]]|| this[_0xd587[1870]]== mxConstants[_0xd587[1354]]?(_0x5c29x18[_0xd587[207]]( new mxPoint(_0x5c29x1a,_0x5c29x1b)),this[_0xd587[675]]== mxHierarchicalEdgeStyle[_0xd587[1906]]&& _0x5c29x18[_0xd587[207]]( new mxPoint(_0x5c29x1a,_0x5c29x1b+ _0x5c29x1c))):(_0x5c29x18[_0xd587[207]]( new mxPoint(_0x5c29x1b,_0x5c29x1a)),this[_0xd587[675]]== mxHierarchicalEdgeStyle[_0xd587[1906]]&& _0x5c29x18[_0xd587[207]]( new mxPoint(_0x5c29x1b+ _0x5c29x1c,_0x5c29x1a)))};_0x5c29x1a= _0x5c29x2[_0xd587[235]][_0xd587[67]]- 1;_0x5c29x1b= _0x5c29x1c=  -1;_0x5c29x16= _0x5c29x2[_0xd587[1827]]- 1;_0x5c29x19&& (_0x5c29x1a= 0,_0x5c29x1c= _0x5c29x2[_0xd587[235]][_0xd587[67]],_0x5c29x1b= 1,_0x5c29x16= _0x5c29x2[_0xd587[1828]]+ 1);for(;_0x5c29x2[_0xd587[1827]]!= _0x5c29x2[_0xd587[1828]]&& _0x5c29x1a!= _0x5c29x1c;_0x5c29x1a+= _0x5c29x1b){var _0x5c29x17=_0x5c29x2[_0xd587[235]][_0x5c29x1a]+ _0x5c29x3,_0x5c29x1d=(this[_0xd587[1877]][_0x5c29x16]+ this[_0xd587[1878]][_0x5c29x16+ 1])/ 2,_0x5c29x1e=(this[_0xd587[1877]][_0x5c29x16- 1]+ this[_0xd587[1878]][_0x5c29x16])/ 2;if(_0x5c29x19){var _0x5c29x1f=_0x5c29x1d,_0x5c29x1d=_0x5c29x1e,_0x5c29x1e=_0x5c29x1f};this[_0xd587[1870]]== mxConstants[_0xd587[1358]]|| this[_0xd587[1870]]== mxConstants[_0xd587[1354]]?(_0x5c29x18[_0xd587[207]]( new mxPoint(_0x5c29x17,_0x5c29x1d)),_0x5c29x18[_0xd587[207]]( new mxPoint(_0x5c29x17,_0x5c29x1e))):(_0x5c29x18[_0xd587[207]]( new mxPoint(_0x5c29x1d,_0x5c29x17)),_0x5c29x18[_0xd587[207]]( new mxPoint(_0x5c29x1e,_0x5c29x17)));this[_0xd587[1874]]= Math[_0xd587[160]](this[_0xd587[1874]],_0x5c29x17);_0x5c29x16+= _0x5c29x1b};null!= _0x5c29xa&& (_0x5c29x1a= _0x5c29x19?2:0,_0x5c29x1b= _0x5c29x19?this[_0xd587[1878]][_0x5c29x4]:this[_0xd587[1877]][_0x5c29x5],_0x5c29x1c= _0x5c29xa[4* _0x5c29x9+ 3- _0x5c29x1a],_0x5c29x19&& (_0x5c29x1c=  -_0x5c29x1c),_0x5c29x1b-= _0x5c29x1c,_0x5c29x1a= _0x5c29xa[4* _0x5c29x9+ 2- _0x5c29x1a],_0x5c29x19= _0x5c29x13[_0xd587[251]][_0xd587[1709]](_0x5c29x15,!1),_0x5c29x16= this[_0xd587[1759]][_0xd587[1710]](_0x5c29x15,!1),this[_0xd587[1759]][_0xd587[1908]](_0x5c29x19)&& _0x5c29x13[_0xd587[251]][_0xd587[1197]](_0x5c29x19)== _0x5c29x16&& (_0x5c29x1a= _0x5c29x13[_0xd587[441]][_0xd587[248]](_0x5c29x19),_0x5c29x1a= null!= _0x5c29x1a?_0x5c29x1a[_0xd587[235]]:_0x5c29x16[_0xd587[256]][_0xd587[235]]+ _0x5c29x2[_0xd587[772]][_0xd587[117]]* _0x5c29x19[_0xd587[256]][_0xd587[235]]),this[_0xd587[1870]]== mxConstants[_0xd587[1358]]|| this[_0xd587[1870]]== mxConstants[_0xd587[1354]]?(this[_0xd587[675]]== mxHierarchicalEdgeStyle[_0xd587[1906]]&& _0x5c29x18[_0xd587[207]]( new mxPoint(_0x5c29x1a,_0x5c29x1b- _0x5c29x1c)),_0x5c29x18[_0xd587[207]]( new mxPoint(_0x5c29x1a,_0x5c29x1b))):(this[_0xd587[675]]== mxHierarchicalEdgeStyle[_0xd587[1906]]&& _0x5c29x18[_0xd587[207]]( new mxPoint(_0x5c29x1b- _0x5c29x1c,_0x5c29x1a)),_0x5c29x18[_0xd587[207]]( new mxPoint(_0x5c29x1b,_0x5c29x1a))));_0x5c29x2[_0xd587[1843]]&& this[_0xd587[1909]](_0x5c29x2,_0x5c29x15);this[_0xd587[1759]][_0xd587[1722]](_0x5c29x15,_0x5c29x18);_0x5c29x3= 0== _0x5c29x3?this[_0xd587[1872]]:0< _0x5c29x3?-_0x5c29x3:-_0x5c29x3+ this[_0xd587[1872]];_0x5c29x9++};_0x5c29x2[_0xd587[1826]][0]= 101207}};mxCoordinateAssignment[_0xd587[202]][_0xd587[1725]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[246]],_0x5c29x4=_0x5c29x2[_0xd587[235]][0]- _0x5c29x2[_0xd587[117]]/ 2,_0x5c29x5=_0x5c29x2[_0xd587[236]][0]- _0x5c29x2[_0xd587[119]]/ 2;this[_0xd587[1877]][_0x5c29x2[_0xd587[1828]]]= Math[_0xd587[243]](this[_0xd587[1877]][_0x5c29x2[_0xd587[1828]]],_0x5c29x5);this[_0xd587[1878]][_0x5c29x2[_0xd587[1828]]]= Math[_0xd587[160]](this[_0xd587[1878]][_0x5c29x2[_0xd587[1828]]],_0x5c29x5+ _0x5c29x2[_0xd587[119]]);this[_0xd587[1870]]== mxConstants[_0xd587[1358]]|| this[_0xd587[1870]]== mxConstants[_0xd587[1354]]?this[_0xd587[1759]][_0xd587[1725]](_0x5c29x3,_0x5c29x4,_0x5c29x5):this[_0xd587[1759]][_0xd587[1725]](_0x5c29x3,_0x5c29x5,_0x5c29x4);this[_0xd587[1874]]= Math[_0xd587[160]](this[_0xd587[1874]],_0x5c29x4+ _0x5c29x2[_0xd587[117]])};mxCoordinateAssignment[_0xd587[202]][_0xd587[1909]]= function(_0x5c29x2,_0x5c29x3){};function WeightedCellSorter(_0x5c29x2,_0x5c29x3){this[_0xd587[246]]= _0x5c29x2;this[_0xd587[1782]]= _0x5c29x3}WeightedCellSorter[_0xd587[202]][_0xd587[1782]]= 0;WeightedCellSorter[_0xd587[202]][_0xd587[1783]]=  !1;WeightedCellSorter[_0xd587[202]][_0xd587[1784]]=  !1;WeightedCellSorter[_0xd587[202]][_0xd587[1785]]= null;WeightedCellSorter[_0xd587[202]][_0xd587[246]]= null;WeightedCellSorter[_0xd587[202]][_0xd587[469]]= function(_0x5c29x2,_0x5c29x3){return null!= _0x5c29x2&& null!= _0x5c29x3?_0x5c29x3[_0xd587[1782]]> _0x5c29x2[_0xd587[1782]]?-1:_0x5c29x3[_0xd587[1782]]< _0x5c29x2[_0xd587[1782]]?1:_0x5c29x3[_0xd587[1783]]?-1:1:0};function mxHierarchicalLayout(_0x5c29x2,_0x5c29x3,_0x5c29x4){mxGraphLayout[_0xd587[239]](this,_0x5c29x2);this[_0xd587[1870]]= null!= _0x5c29x3?_0x5c29x3:mxConstants[_0xd587[1358]];this[_0xd587[1910]]= null!= _0x5c29x4?_0x5c29x4:!0}mxHierarchicalLayout[_0xd587[202]]=  new mxGraphLayout;mxHierarchicalLayout[_0xd587[202]][_0xd587[196]]= mxHierarchicalLayout;mxHierarchicalLayout[_0xd587[202]][_0xd587[1845]]= null;mxHierarchicalLayout[_0xd587[202]][_0xd587[1735]]=  !1;mxHierarchicalLayout[_0xd587[202]][_0xd587[1911]]=  !1;mxHierarchicalLayout[_0xd587[202]][_0xd587[1912]]= 0;mxHierarchicalLayout[_0xd587[202]][_0xd587[1868]]= 30;mxHierarchicalLayout[_0xd587[202]][_0xd587[1869]]= 100;mxHierarchicalLayout[_0xd587[202]][_0xd587[1913]]= 60;mxHierarchicalLayout[_0xd587[202]][_0xd587[1872]]= 10;mxHierarchicalLayout[_0xd587[202]][_0xd587[1870]]= mxConstants[_0xd587[1358]];mxHierarchicalLayout[_0xd587[202]][_0xd587[1882]]=  !0;mxHierarchicalLayout[_0xd587[202]][_0xd587[1844]]=  !0;mxHierarchicalLayout[_0xd587[202]][_0xd587[1787]]=  !0;mxHierarchicalLayout[_0xd587[202]][_0xd587[1914]]=  !0;mxHierarchicalLayout[_0xd587[202]][_0xd587[251]]= null;mxHierarchicalLayout[_0xd587[202]][_0xd587[1915]]= null;mxHierarchicalLayout[_0xd587[202]][_0xd587[502]]= function(){return this[_0xd587[251]]};mxHierarchicalLayout[_0xd587[202]][_0xd587[350]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[1101]]= _0x5c29x2;var _0x5c29x4=this[_0xd587[1179]][_0xd587[251]];this[_0xd587[1915]]= {};if(!(null== _0x5c29x3&& null== _0x5c29x2)){if(null!= _0x5c29x3&& null!= _0x5c29x2){for(var _0x5c29x5=[],_0x5c29x9=0;_0x5c29x9< _0x5c29x3[_0xd587[67]];_0x5c29x9++){_0x5c29x4[_0xd587[1720]](_0x5c29x2,_0x5c29x3[_0x5c29x9])&& _0x5c29x5[_0xd587[207]](_0x5c29x3[_0x5c29x9])};this[_0xd587[1845]]= _0x5c29x5}else {this[_0xd587[1845]]= _0x5c29x3};_0x5c29x4[_0xd587[473]]();try{this[_0xd587[1916]](_0x5c29x2),this[_0xd587[1735]]&& !this[_0xd587[1179]][_0xd587[1742]](_0x5c29x2)&& this[_0xd587[1179]][_0xd587[1917]]([_0x5c29x2],this[_0xd587[1912]],this[_0xd587[1911]])}finally{_0x5c29x4[_0xd587[476]]()}}};mxHierarchicalLayout[_0xd587[202]][_0xd587[1918]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=[];if(null!= _0x5c29x2&& null!= _0x5c29x3){var _0x5c29x5=this[_0xd587[1179]][_0xd587[251]],_0x5c29x9=null,_0x5c29xa=-1E5,_0x5c29x12;for(_0x5c29x12 in _0x5c29x3){var _0x5c29x13=_0x5c29x3[_0x5c29x12];if(_0x5c29x5[_0xd587[1193]](_0x5c29x13)&& this[_0xd587[1179]][_0xd587[1714]](_0x5c29x13)){for(var _0x5c29x14=this[_0xd587[264]](_0x5c29x13),_0x5c29x15=0,_0x5c29x16=0,_0x5c29x17=0;_0x5c29x17< _0x5c29x14[_0xd587[67]];_0x5c29x17++){this[_0xd587[1710]](_0x5c29x14[_0x5c29x17],!0)== _0x5c29x13?_0x5c29x15++:_0x5c29x16++};0== _0x5c29x16&& 0< _0x5c29x15&& _0x5c29x4[_0xd587[207]](_0x5c29x13);_0x5c29x14= _0x5c29x15- _0x5c29x16;_0x5c29x14> _0x5c29xa&& (_0x5c29xa= _0x5c29x14,_0x5c29x9= _0x5c29x13)}};0== _0x5c29x4[_0xd587[67]]&& null!= _0x5c29x9&& _0x5c29x4[_0xd587[207]](_0x5c29x9)};return _0x5c29x4};mxHierarchicalLayout[_0xd587[202]][_0xd587[264]]= function(_0x5c29x2){var _0x5c29x3=mxCellPath[_0xd587[385]](_0x5c29x2);if(null!= this[_0xd587[1915]][_0x5c29x3]){return this[_0xd587[1915]][_0x5c29x3]};for(var _0x5c29x4=this[_0xd587[1179]][_0xd587[251]],_0x5c29x5=[],_0x5c29x9=this[_0xd587[1179]][_0xd587[1742]](_0x5c29x2),_0x5c29xa=_0x5c29x4[_0xd587[262]](_0x5c29x2),_0x5c29x12=0;_0x5c29x12< _0x5c29xa;_0x5c29x12++){var _0x5c29x13=_0x5c29x4[_0xd587[263]](_0x5c29x2,_0x5c29x12);if(this[_0xd587[1908]](_0x5c29x13)){_0x5c29x5= _0x5c29x5[_0xd587[1919]](_0x5c29x4[_0xd587[264]](_0x5c29x13,!0,!0))}else {if(_0x5c29x9|| !this[_0xd587[1179]][_0xd587[1714]](_0x5c29x13)){_0x5c29x5= _0x5c29x5[_0xd587[1919]](_0x5c29x4[_0xd587[264]](_0x5c29x13,!0,!0))}}};_0x5c29x5= _0x5c29x5[_0xd587[1919]](_0x5c29x4[_0xd587[264]](_0x5c29x2,!0,!0));_0x5c29x4= [];for(_0x5c29x12= 0;_0x5c29x12< _0x5c29x5[_0xd587[67]];_0x5c29x12++){_0x5c29x9= this[_0xd587[1710]](_0x5c29x5[_0x5c29x12],!0),_0x5c29xa= this[_0xd587[1710]](_0x5c29x5[_0x5c29x12],!1),(_0x5c29x9== _0x5c29xa|| _0x5c29x9!= _0x5c29xa&& (_0x5c29xa== _0x5c29x2&& (null== this[_0xd587[1101]]|| this[_0xd587[1179]][_0xd587[1920]](_0x5c29x9,this[_0xd587[1101]],this[_0xd587[1914]]))|| _0x5c29x9== _0x5c29x2&& (null== this[_0xd587[1101]]|| this[_0xd587[1179]][_0xd587[1920]](_0x5c29xa,this[_0xd587[1101]],this[_0xd587[1914]]))))&& _0x5c29x4[_0xd587[207]](_0x5c29x5[_0x5c29x12])};return this[_0xd587[1915]][_0x5c29x3]= _0x5c29x4};mxHierarchicalLayout[_0xd587[202]][_0xd587[1710]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1179]][_0xd587[441]][_0xd587[248]](_0x5c29x2),_0x5c29x4=null!= _0x5c29x4?_0x5c29x4[_0xd587[1710]](_0x5c29x3):this[_0xd587[1179]][_0xd587[441]][_0xd587[1710]](_0x5c29x2,_0x5c29x3);this[_0xd587[1908]](_0x5c29x4)&& (_0x5c29x4= this[_0xd587[1179]][_0xd587[251]][_0xd587[1197]](_0x5c29x4));return _0x5c29x4};mxHierarchicalLayout[_0xd587[202]][_0xd587[1916]]= function(_0x5c29x2){var _0x5c29x3=[],_0x5c29x4=[];if(null== this[_0xd587[1845]]&& null!= _0x5c29x2){var _0x5c29x5={};this[_0xd587[1921]](_0x5c29x2,_0x5c29x5);this[_0xd587[1845]]= [];var _0x5c29x9=!0,_0x5c29xa;for(_0x5c29xa in _0x5c29x5){if(null!= _0x5c29x5[_0x5c29xa]){_0x5c29x9=  !1;break}};for(;!_0x5c29x9;){for(var _0x5c29x12=this[_0xd587[1918]](_0x5c29x2,_0x5c29x5),_0x5c29x9=0;_0x5c29x9< _0x5c29x12[_0xd587[67]];_0x5c29x9++){var _0x5c29x13=[];_0x5c29x3[_0xd587[207]](_0x5c29x13);this[_0xd587[1706]](_0x5c29x12[_0x5c29x9],!0,null,_0x5c29x4,_0x5c29x13,_0x5c29x3,_0x5c29x5)};for(_0x5c29x9= 0;_0x5c29x9< _0x5c29x12[_0xd587[67]];_0x5c29x9++){this[_0xd587[1845]][_0xd587[207]](_0x5c29x12[_0x5c29x9])};_0x5c29x9=  !0;for(_0x5c29xa in _0x5c29x5){if(null!= _0x5c29x5[_0x5c29xa]){_0x5c29x9=  !1;break}}}}else {for(_0x5c29x9= 0;_0x5c29x9< roots[_0xd587[67]];_0x5c29x9++){_0x5c29x13= [],_0x5c29x3[_0xd587[207]](_0x5c29x13),traverse(roots[_0xd587[203]](_0x5c29x9),!0,null,_0x5c29x4,_0x5c29x13,_0x5c29x3,null)}};for(_0x5c29x9= _0x5c29x4= 0;_0x5c29x9< _0x5c29x3[_0xd587[67]];_0x5c29x9++){_0x5c29x13= _0x5c29x3[_0x5c29x9];_0x5c29x5= [];for(_0x5c29xa in _0x5c29x13){_0x5c29x5[_0xd587[207]](_0x5c29x13[_0x5c29xa])};this[_0xd587[251]]=  new mxGraphHierarchyModel(this,_0x5c29x5,this[_0xd587[1845]],_0x5c29x2,this[_0xd587[1844]]);this[_0xd587[1922]](_0x5c29x2);this[_0xd587[1923]]();this[_0xd587[1924]](_0x5c29x2);_0x5c29x4= this[_0xd587[1925]](_0x5c29x4,_0x5c29x2)}};mxHierarchicalLayout[_0xd587[202]][_0xd587[1921]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1179]][_0xd587[251]];_0x5c29x4[_0xd587[1193]](_0x5c29x2)&& (_0x5c29x2!= this[_0xd587[1101]]&& this[_0xd587[1179]][_0xd587[1714]](_0x5c29x2))&& (_0x5c29x3[mxCellPath[_0xd587[385]](_0x5c29x2)]= _0x5c29x2);if(this[_0xd587[1914]]|| _0x5c29x2== this[_0xd587[1101]]&& this[_0xd587[1179]][_0xd587[1714]](_0x5c29x2)){for(var _0x5c29x5=_0x5c29x4[_0xd587[262]](_0x5c29x2),_0x5c29x9=0;_0x5c29x9< _0x5c29x5;_0x5c29x9++){var _0x5c29xa=_0x5c29x4[_0xd587[263]](_0x5c29x2,_0x5c29x9);this[_0xd587[1908]](_0x5c29xa)|| this[_0xd587[1921]](_0x5c29xa,_0x5c29x3)}}};mxHierarchicalLayout[_0xd587[202]][_0xd587[1908]]= function(_0x5c29x2){return _0x5c29x2[_0xd587[256]][_0xd587[1500]]?!0:!1};mxHierarchicalLayout[_0xd587[202]][_0xd587[1781]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:!1;for(var _0x5c29x5=this[_0xd587[264]](_0x5c29x2),_0x5c29x9=[],_0x5c29xa=0;_0x5c29xa< _0x5c29x5[_0xd587[67]];_0x5c29xa++){var _0x5c29x12=this[_0xd587[1710]](_0x5c29x5[_0x5c29xa],!0),_0x5c29x13=this[_0xd587[1710]](_0x5c29x5[_0x5c29xa],!1);(_0x5c29x12== _0x5c29x2&& _0x5c29x13== _0x5c29x3|| !_0x5c29x4&& _0x5c29x12== _0x5c29x3&& _0x5c29x13== _0x5c29x2)&& _0x5c29x9[_0xd587[207]](_0x5c29x5[_0x5c29xa])};return _0x5c29x9};mxHierarchicalLayout[_0xd587[202]][_0xd587[1706]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12){if(null!= _0x5c29x2&& null!= _0x5c29x5){var _0x5c29x13=mxCellPath[_0xd587[385]](_0x5c29x2);if(null== _0x5c29x5[_0x5c29x13]&& (null== _0x5c29x12|| null!= _0x5c29x12[_0x5c29x13])){null== _0x5c29x9[_0x5c29x13]&& (_0x5c29x9[_0x5c29x13]= _0x5c29x2);null== _0x5c29x5[_0x5c29x13]&& (_0x5c29x5[_0x5c29x13]= _0x5c29x2);delete _0x5c29x12[_0x5c29x13];var _0x5c29x14=this[_0xd587[264]](_0x5c29x2);for(_0x5c29x4= 0;_0x5c29x4< _0x5c29x14[_0xd587[67]];_0x5c29x4++){if(_0x5c29x13= this[_0xd587[1710]](_0x5c29x14[_0x5c29x4],!0)== _0x5c29x2,!_0x5c29x3|| _0x5c29x13){_0x5c29x13= this[_0xd587[1710]](_0x5c29x14[_0x5c29x4],!_0x5c29x13),_0x5c29x9= this[_0xd587[1706]](_0x5c29x13,_0x5c29x3,_0x5c29x14[_0x5c29x4],_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12)}}}else {if(null== _0x5c29x9[_0x5c29x13]){for(_0x5c29x4= 0;_0x5c29x4< _0x5c29xa[_0xd587[67]];_0x5c29x4++){if(_0x5c29x2= _0x5c29xa[_0x5c29x4],null!= _0x5c29x2[_0x5c29x13]){for(_0x5c29x14 in _0x5c29x9){_0x5c29x2[_0x5c29x14]= _0x5c29x9[_0x5c29x14]};_0x5c29xa[_0xd587[1242]]();return _0x5c29x2}}}}};return _0x5c29x9};mxHierarchicalLayout[_0xd587[202]][_0xd587[1922]]= function(_0x5c29x2){( new mxMinimumCycleRemover(this))[_0xd587[350]](_0x5c29x2)};mxHierarchicalLayout[_0xd587[202]][_0xd587[1923]]= function(){this[_0xd587[251]][_0xd587[1852]]();this[_0xd587[251]][_0xd587[1854]]()};mxHierarchicalLayout[_0xd587[202]][_0xd587[1924]]= function(_0x5c29x2){( new mxMedianHybridCrossingReduction(this))[_0xd587[350]](_0x5c29x2)};mxHierarchicalLayout[_0xd587[202]][_0xd587[1925]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4= new mxCoordinateAssignment(this,this[_0xd587[1868]],this[_0xd587[1869]],this[_0xd587[1870]],_0x5c29x2,this[_0xd587[1872]]);_0x5c29x4[_0xd587[1882]]= this[_0xd587[1882]];_0x5c29x4[_0xd587[350]](_0x5c29x3);return _0x5c29x4[_0xd587[1874]]+ this[_0xd587[1913]]};function mxGraphModel(_0x5c29x2){this[_0xd587[1926]]= this[_0xd587[1096]]();null!= _0x5c29x2?this[_0xd587[1927]](_0x5c29x2):this[_0xd587[200]]()}mxGraphModel[_0xd587[202]]=  new mxEventSource;mxGraphModel[_0xd587[202]][_0xd587[196]]= mxGraphModel;mxGraphModel[_0xd587[202]][_0xd587[813]]= null;mxGraphModel[_0xd587[202]][_0xd587[895]]= null;mxGraphModel[_0xd587[202]][_0xd587[1928]]=  !0;mxGraphModel[_0xd587[202]][_0xd587[1929]]=  !0;mxGraphModel[_0xd587[202]][_0xd587[1089]]= _0xd587[110];mxGraphModel[_0xd587[202]][_0xd587[1930]]= _0xd587[110];mxGraphModel[_0xd587[202]][_0xd587[1931]]= 0;mxGraphModel[_0xd587[202]][_0xd587[1926]]= null;mxGraphModel[_0xd587[202]][_0xd587[1932]]= 0;mxGraphModel[_0xd587[202]][_0xd587[1933]]=  !1;mxGraphModel[_0xd587[202]][_0xd587[200]]= function(){this[_0xd587[1927]](this[_0xd587[1934]]())};mxGraphModel[_0xd587[202]][_0xd587[1935]]= function(){return this[_0xd587[1929]]};mxGraphModel[_0xd587[202]][_0xd587[1936]]= function(_0x5c29x2){this[_0xd587[1929]]= _0x5c29x2};mxGraphModel[_0xd587[202]][_0xd587[1934]]= function(){var _0x5c29x2= new mxCell;_0x5c29x2[_0xd587[1937]]( new mxCell);return _0x5c29x2};mxGraphModel[_0xd587[202]][_0xd587[736]]= function(_0x5c29x2){return null!= this[_0xd587[895]]?this[_0xd587[895]][_0x5c29x2]:null};mxGraphModel[_0xd587[202]][_0xd587[1938]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=null;if(null!= _0x5c29x2){for(var _0x5c29x4=[],_0x5c29x5=0;_0x5c29x5< _0x5c29x2[_0xd587[67]];_0x5c29x5++){_0x5c29x3(_0x5c29x2[_0x5c29x5])&& _0x5c29x4[_0xd587[207]](_0x5c29x2[_0x5c29x5])}};return _0x5c29x4};mxGraphModel[_0xd587[202]][_0xd587[1939]]= function(_0x5c29x2){return this[_0xd587[1921]](null,_0x5c29x2)};mxGraphModel[_0xd587[202]][_0xd587[1921]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=[];_0x5c29x3= _0x5c29x3|| this[_0xd587[501]]();(null== _0x5c29x2|| _0x5c29x2(_0x5c29x3))&& _0x5c29x4[_0xd587[207]](_0x5c29x3);for(var _0x5c29x5=this[_0xd587[262]](_0x5c29x3),_0x5c29x9=0;_0x5c29x9< _0x5c29x5;_0x5c29x9++){var _0x5c29xa=this[_0xd587[263]](_0x5c29x3,_0x5c29x9),_0x5c29x4=_0x5c29x4[_0xd587[1919]](this[_0xd587[1921]](_0x5c29x2,_0x5c29xa))};return _0x5c29x4};mxGraphModel[_0xd587[202]][_0xd587[501]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2|| this[_0xd587[813]];if(null!= _0x5c29x2){for(;null!= _0x5c29x2;){_0x5c29x3= _0x5c29x2,_0x5c29x2= this[_0xd587[1197]](_0x5c29x2)}};return _0x5c29x3};mxGraphModel[_0xd587[202]][_0xd587[1927]]= function(_0x5c29x2){this[_0xd587[350]]( new mxRootChange(this,_0x5c29x2));return _0x5c29x2};mxGraphModel[_0xd587[202]][_0xd587[1940]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[813]];this[_0xd587[813]]= _0x5c29x2;this[_0xd587[1931]]= 0;this[_0xd587[895]]= null;this[_0xd587[1941]](_0x5c29x2);return _0x5c29x3};mxGraphModel[_0xd587[202]][_0xd587[1942]]= function(_0x5c29x2){return null!= _0x5c29x2&& this[_0xd587[813]]== _0x5c29x2};mxGraphModel[_0xd587[202]][_0xd587[1740]]= function(_0x5c29x2){return this[_0xd587[1942]](this[_0xd587[1197]](_0x5c29x2))};mxGraphModel[_0xd587[202]][_0xd587[1720]]= function(_0x5c29x2,_0x5c29x3){for(;null!= _0x5c29x3&& _0x5c29x3!= _0x5c29x2;){_0x5c29x3= this[_0xd587[1197]](_0x5c29x3)};return _0x5c29x3== _0x5c29x2};mxGraphModel[_0xd587[202]][_0xd587[442]]= function(_0x5c29x2){return this[_0xd587[1720]](this[_0xd587[813]],_0x5c29x2)};mxGraphModel[_0xd587[202]][_0xd587[1197]]= function(_0x5c29x2){return null!= _0x5c29x2?_0x5c29x2[_0xd587[1197]]():null};mxGraphModel[_0xd587[202]][_0xd587[99]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){if(_0x5c29x3!= _0x5c29x2&& null!= _0x5c29x2&& null!= _0x5c29x3){null== _0x5c29x4&& (_0x5c29x4= this[_0xd587[262]](_0x5c29x2));var _0x5c29x5=_0x5c29x2!= this[_0xd587[1197]](_0x5c29x3);this[_0xd587[350]]( new mxChildChange(this,_0x5c29x2,_0x5c29x3,_0x5c29x4));this[_0xd587[1928]]&& _0x5c29x5&& this[_0xd587[1943]](_0x5c29x3)};return _0x5c29x3};mxGraphModel[_0xd587[202]][_0xd587[1941]]= function(_0x5c29x2){if(null!= _0x5c29x2){null== _0x5c29x2[_0xd587[1103]]()&& this[_0xd587[1929]]&& _0x5c29x2[_0xd587[1945]](this[_0xd587[1944]](_0x5c29x2));if(null!= _0x5c29x2[_0xd587[1103]]()){var _0x5c29x3=this[_0xd587[736]](_0x5c29x2[_0xd587[1103]]());if(_0x5c29x3!= _0x5c29x2){for(;null!= _0x5c29x3;){_0x5c29x2[_0xd587[1945]](this[_0xd587[1944]](_0x5c29x2)),_0x5c29x3= this[_0xd587[736]](_0x5c29x2[_0xd587[1103]]())};null== this[_0xd587[895]]&& (this[_0xd587[895]]= {});this[_0xd587[895]][_0x5c29x2[_0xd587[1103]]()]= _0x5c29x2}};mxUtils[_0xd587[1946]](_0x5c29x2[_0xd587[1103]]())&& (this[_0xd587[1931]]= Math[_0xd587[160]](this[_0xd587[1931]],_0x5c29x2[_0xd587[1103]]()));for(var _0x5c29x3=this[_0xd587[262]](_0x5c29x2),_0x5c29x4=0;_0x5c29x4< _0x5c29x3;_0x5c29x4++){this[_0xd587[1941]](this[_0xd587[263]](_0x5c29x2,_0x5c29x4))}}};mxGraphModel[_0xd587[202]][_0xd587[1944]]= function(_0x5c29x2){_0x5c29x2= this[_0xd587[1931]];this[_0xd587[1931]]++;return this[_0xd587[1089]]+ _0x5c29x2+ this[_0xd587[1930]]};mxGraphModel[_0xd587[202]][_0xd587[1943]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3= _0x5c29x3|| this[_0xd587[501]](_0x5c29x2);for(var _0x5c29x4=this[_0xd587[262]](_0x5c29x2),_0x5c29x5=0;_0x5c29x5< _0x5c29x4;_0x5c29x5++){var _0x5c29x9=this[_0xd587[263]](_0x5c29x2,_0x5c29x5);this[_0xd587[1943]](_0x5c29x9,_0x5c29x3)};_0x5c29x9= this[_0xd587[1707]](_0x5c29x2);_0x5c29x4= [];for(_0x5c29x5= 0;_0x5c29x5< _0x5c29x9;_0x5c29x5++){_0x5c29x4[_0xd587[207]](this[_0xd587[1708]](_0x5c29x2,_0x5c29x5))};for(_0x5c29x5= 0;_0x5c29x5< _0x5c29x4[_0xd587[67]];_0x5c29x5++){_0x5c29x9= _0x5c29x4[_0x5c29x5],this[_0xd587[1720]](_0x5c29x3,_0x5c29x9)&& this[_0xd587[1947]](_0x5c29x9,_0x5c29x3)}};mxGraphModel[_0xd587[202]][_0xd587[1947]]= function(_0x5c29x2,_0x5c29x3){for(var _0x5c29x4=this[_0xd587[1709]](_0x5c29x2,!0),_0x5c29x5=this[_0xd587[1709]](_0x5c29x2,!1),_0x5c29x9=null;null!= _0x5c29x4&& !this[_0xd587[250]](_0x5c29x4)&& null!= _0x5c29x4[_0xd587[256]]&& _0x5c29x4[_0xd587[256]][_0xd587[1500]];){_0x5c29x4= this[_0xd587[1197]](_0x5c29x4)};for(;null!= _0x5c29x5&& !this[_0xd587[250]](_0x5c29x5)&& null!= _0x5c29x5[_0xd587[256]]&& _0x5c29x5[_0xd587[256]][_0xd587[1500]];){_0x5c29x5= this[_0xd587[1197]](_0x5c29x5)};if(this[_0xd587[1720]](_0x5c29x3,_0x5c29x4)&& this[_0xd587[1720]](_0x5c29x3,_0x5c29x5)&& (_0x5c29x9= _0x5c29x4== _0x5c29x5?this[_0xd587[1197]](_0x5c29x4):this[_0xd587[1948]](_0x5c29x4,_0x5c29x5),null!= _0x5c29x9&& (this[_0xd587[1197]](_0x5c29x9)!= this[_0xd587[813]]|| this[_0xd587[1720]](_0x5c29x9,_0x5c29x2))&& this[_0xd587[1197]](_0x5c29x2)!= _0x5c29x9)){_0x5c29x4= this[_0xd587[1721]](_0x5c29x2);if(null!= _0x5c29x4){var _0x5c29xa=this[_0xd587[1949]](this[_0xd587[1197]](_0x5c29x2)),_0x5c29x12=this[_0xd587[1949]](_0x5c29x9),_0x5c29x5=_0x5c29x12[_0xd587[235]]- _0x5c29xa[_0xd587[235]],_0x5c29xa=_0x5c29x12[_0xd587[236]]- _0x5c29xa[_0xd587[236]],_0x5c29x4=_0x5c29x4[_0xd587[238]]();_0x5c29x4[_0xd587[513]](-_0x5c29x5,-_0x5c29xa);this[_0xd587[1724]](_0x5c29x2,_0x5c29x4)};this[_0xd587[99]](_0x5c29x9,_0x5c29x2,this[_0xd587[262]](_0x5c29x9))}};mxGraphModel[_0xd587[202]][_0xd587[1949]]= function(_0x5c29x2){var _0x5c29x3=null;null!= _0x5c29x2?(_0x5c29x3= this[_0xd587[1949]](this[_0xd587[1197]](_0x5c29x2)),this[_0xd587[250]](_0x5c29x2)|| (_0x5c29x2= this[_0xd587[1721]](_0x5c29x2),null!= _0x5c29x2&& (_0x5c29x3[_0xd587[235]]+= _0x5c29x2[_0xd587[235]],_0x5c29x3[_0xd587[236]]+= _0x5c29x2[_0xd587[236]]))):_0x5c29x3=  new mxPoint;return _0x5c29x3};mxGraphModel[_0xd587[202]][_0xd587[1948]]= function(_0x5c29x2,_0x5c29x3){if(null!= _0x5c29x2&& null!= _0x5c29x3){var _0x5c29x4=mxCellPath[_0xd587[385]](_0x5c29x3);if(null!= _0x5c29x4&& 0< _0x5c29x4[_0xd587[67]]){var _0x5c29x5=_0x5c29x2,_0x5c29x9=mxCellPath[_0xd587[385]](_0x5c29x5);if(_0x5c29x4[_0xd587[67]]< _0x5c29x9[_0xd587[67]]){var _0x5c29x5=_0x5c29x3,_0x5c29xa=_0x5c29x9,_0x5c29x9=_0x5c29x4,_0x5c29x4=_0x5c29xa};for(;null!= _0x5c29x5;){_0x5c29xa= this[_0xd587[1197]](_0x5c29x5);if(0== _0x5c29x4[_0xd587[2]](_0x5c29x9+ mxCellPath[_0xd587[1950]])&& null!= _0x5c29xa){return _0x5c29x5};_0x5c29x9= mxCellPath[_0xd587[1951]](_0x5c29x9);_0x5c29x5= _0x5c29xa}}};return null};mxGraphModel[_0xd587[202]][_0xd587[205]]= function(_0x5c29x2){_0x5c29x2== this[_0xd587[813]]?this[_0xd587[1927]](null):null!= this[_0xd587[1197]](_0x5c29x2)&& this[_0xd587[350]]( new mxChildChange(this,null,_0x5c29x2));return _0x5c29x2};mxGraphModel[_0xd587[202]][_0xd587[1102]]= function(_0x5c29x2){if(null!= _0x5c29x2&& null!= this[_0xd587[895]]){for(var _0x5c29x3=this[_0xd587[262]](_0x5c29x2)- 1;0<= _0x5c29x3;_0x5c29x3--){this[_0xd587[1102]](this[_0xd587[263]](_0x5c29x2,_0x5c29x3))};null!= this[_0xd587[895]]&& null!= _0x5c29x2[_0xd587[1103]]()&&  delete this[_0xd587[895]][_0x5c29x2[_0xd587[1103]]()]}};mxGraphModel[_0xd587[202]][_0xd587[1952]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[1197]](_0x5c29x2);null!= _0x5c29x3?(_0x5c29x3!= _0x5c29x5|| _0x5c29x5[_0xd587[1738]](_0x5c29x2)!= _0x5c29x4)&& _0x5c29x3[_0xd587[1937]](_0x5c29x2,_0x5c29x4):null!= _0x5c29x5&& (_0x5c29x4= _0x5c29x5[_0xd587[1738]](_0x5c29x2),_0x5c29x5[_0xd587[205]](_0x5c29x4));!this[_0xd587[442]](_0x5c29x5)&& null!= _0x5c29x3?this[_0xd587[1941]](_0x5c29x2):null== _0x5c29x3&& this[_0xd587[1102]](_0x5c29x2);return _0x5c29x5};mxGraphModel[_0xd587[202]][_0xd587[262]]= function(_0x5c29x2){return null!= _0x5c29x2?_0x5c29x2[_0xd587[262]]():0};mxGraphModel[_0xd587[202]][_0xd587[263]]= function(_0x5c29x2,_0x5c29x3){return null!= _0x5c29x2?_0x5c29x2[_0xd587[263]](_0x5c29x3):null};mxGraphModel[_0xd587[202]][_0xd587[1953]]= function(_0x5c29x2){return null!= _0x5c29x2?_0x5c29x2[_0xd587[1954]]:null};mxGraphModel[_0xd587[202]][_0xd587[1728]]= function(_0x5c29x2){return this[_0xd587[1955]](_0x5c29x2,!0,!1)};mxGraphModel[_0xd587[202]][_0xd587[1956]]= function(_0x5c29x2){return this[_0xd587[1955]](_0x5c29x2,!1,!0)};mxGraphModel[_0xd587[202]][_0xd587[1955]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:!1;_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:!1;for(var _0x5c29x5=this[_0xd587[262]](_0x5c29x2),_0x5c29x9=[],_0x5c29xa=0;_0x5c29xa< _0x5c29x5;_0x5c29xa++){var _0x5c29x12=this[_0xd587[263]](_0x5c29x2,_0x5c29xa);(!_0x5c29x4&& !_0x5c29x3|| _0x5c29x4&& this[_0xd587[250]](_0x5c29x12)|| _0x5c29x3&& this[_0xd587[1193]](_0x5c29x12)) && _0x5c29x9[_0xd587[207]](_0x5c29x12)};return _0x5c29x9};mxGraphModel[_0xd587[202]][_0xd587[1709]]= function(_0x5c29x2,_0x5c29x3){return null!= _0x5c29x2?_0x5c29x2[_0xd587[1709]](_0x5c29x3):null};mxGraphModel[_0xd587[202]][_0xd587[1957]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=_0x5c29x3!= this[_0xd587[1709]](_0x5c29x2,_0x5c29x4);this[_0xd587[350]]( new mxTerminalChange(this,_0x5c29x2,_0x5c29x3,_0x5c29x4));this[_0xd587[1928]]&& _0x5c29x5&& this[_0xd587[1947]](_0x5c29x2,this[_0xd587[501]]());return _0x5c29x3};mxGraphModel[_0xd587[202]][_0xd587[1958]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[473]]();try{this[_0xd587[1957]](_0x5c29x2,_0x5c29x3,!0),this[_0xd587[1957]](_0x5c29x2,_0x5c29x4,!1)}finally{this[_0xd587[476]]()}};mxGraphModel[_0xd587[202]][_0xd587[1959]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[1709]](_0x5c29x2,_0x5c29x4);null!= _0x5c29x3?_0x5c29x3[_0xd587[1960]](_0x5c29x2,_0x5c29x4):null!= _0x5c29x5&& _0x5c29x5[_0xd587[1961]](_0x5c29x2,_0x5c29x4);return _0x5c29x5};mxGraphModel[_0xd587[202]][_0xd587[1707]]= function(_0x5c29x2){return null!= _0x5c29x2?_0x5c29x2[_0xd587[1707]]():0};mxGraphModel[_0xd587[202]][_0xd587[1708]]= function(_0x5c29x2,_0x5c29x3){return null!= _0x5c29x2?_0x5c29x2[_0xd587[1708]](_0x5c29x3):null};mxGraphModel[_0xd587[202]][_0xd587[1962]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){for(var _0x5c29x5=0,_0x5c29x9=this[_0xd587[1707]](_0x5c29x2),_0x5c29xa=0;_0x5c29xa< _0x5c29x9;_0x5c29xa++){var _0x5c29x12=this[_0xd587[1708]](_0x5c29x2,_0x5c29xa);_0x5c29x12!= _0x5c29x4&& this[_0xd587[1709]](_0x5c29x12,_0x5c29x3)== _0x5c29x2&& _0x5c29x5++};return _0x5c29x5};mxGraphModel[_0xd587[202]][_0xd587[1756]]= function(_0x5c29x2){return this[_0xd587[264]](_0x5c29x2,!0,!0,!1)};mxGraphModel[_0xd587[202]][_0xd587[1867]]= function(_0x5c29x2){return this[_0xd587[264]](_0x5c29x2,!0,!1,!1)};mxGraphModel[_0xd587[202]][_0xd587[1963]]= function(_0x5c29x2){return this[_0xd587[264]](_0x5c29x2,!1,!0,!1)};mxGraphModel[_0xd587[202]][_0xd587[264]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:!0;_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:!0;_0x5c29x5= null!= _0x5c29x5?_0x5c29x5:!0;for(var _0x5c29x9=this[_0xd587[1707]](_0x5c29x2),_0x5c29xa=[],_0x5c29x12=0;_0x5c29x12< _0x5c29x9;_0x5c29x12++){var _0x5c29x13=this[_0xd587[1708]](_0x5c29x2,_0x5c29x12),_0x5c29x14=this[_0xd587[1709]](_0x5c29x13,!0),_0x5c29x15=this[_0xd587[1709]](_0x5c29x13,!1);(_0x5c29x5&& _0x5c29x14== _0x5c29x15|| _0x5c29x14!= _0x5c29x15&& (_0x5c29x3&& _0x5c29x15== _0x5c29x2|| _0x5c29x4&& _0x5c29x14== _0x5c29x2))&& _0x5c29xa[_0xd587[207]](_0x5c29x13)};return _0x5c29xa};mxGraphModel[_0xd587[202]][_0xd587[1781]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:!1;var _0x5c29x5=this[_0xd587[1707]](_0x5c29x2),_0x5c29x9=this[_0xd587[1707]](_0x5c29x3),_0x5c29xa=_0x5c29x2,_0x5c29x12=_0x5c29x5;_0x5c29x9< _0x5c29x5&& (_0x5c29x12= _0x5c29x9,_0x5c29xa= _0x5c29x3);_0x5c29x5= [];for(_0x5c29x9= 0;_0x5c29x9< _0x5c29x12;_0x5c29x9++){var _0x5c29x13=this[_0xd587[1708]](_0x5c29xa,_0x5c29x9),_0x5c29x14=this[_0xd587[1709]](_0x5c29x13,!0),_0x5c29x15=this[_0xd587[1709]](_0x5c29x13,!1),_0x5c29x16=_0x5c29x15== _0x5c29x2&& _0x5c29x14== _0x5c29x3;(_0x5c29x14== _0x5c29x2&& _0x5c29x15== _0x5c29x3|| !_0x5c29x4&& _0x5c29x16)&& _0x5c29x5[_0xd587[207]](_0x5c29x13)};return _0x5c29x5};mxGraphModel[_0xd587[202]][_0xd587[1808]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:!0;_0x5c29x5= null!= _0x5c29x5?_0x5c29x5:!0;var _0x5c29x9=[];if(null!= _0x5c29x2){for(var _0x5c29xa=0;_0x5c29xa< _0x5c29x2[_0xd587[67]];_0x5c29xa++){var _0x5c29x12=this[_0xd587[1709]](_0x5c29x2[_0x5c29xa],!0),_0x5c29x13=this[_0xd587[1709]](_0x5c29x2[_0x5c29xa],!1);_0x5c29x12== _0x5c29x3&& null!= _0x5c29x13&& _0x5c29x13!= _0x5c29x3&& _0x5c29x5?_0x5c29x9[_0xd587[207]](_0x5c29x13):_0x5c29x13== _0x5c29x3&& (null!= _0x5c29x12&& _0x5c29x12!= _0x5c29x3&& _0x5c29x4)&& _0x5c29x9[_0xd587[207]](_0x5c29x12)}};return _0x5c29x9};mxGraphModel[_0xd587[202]][_0xd587[1964]]= function(_0x5c29x2){for(var _0x5c29x3=[],_0x5c29x4=0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){for(var _0x5c29x5=_0x5c29x2[_0x5c29x4],_0x5c29x9=!0,_0x5c29xa=this[_0xd587[1197]](_0x5c29x5);null!= _0x5c29xa;){if(0<= mxUtils[_0xd587[2]](_0x5c29x2,_0x5c29xa)){_0x5c29x9=  !1;break};_0x5c29xa= this[_0xd587[1197]](_0x5c29xa)};_0x5c29x9&& _0x5c29x3[_0xd587[207]](_0x5c29x5)};return _0x5c29x3};mxGraphModel[_0xd587[202]][_0xd587[1193]]= function(_0x5c29x2){return null!= _0x5c29x2?_0x5c29x2[_0xd587[1193]]():!1};mxGraphModel[_0xd587[202]][_0xd587[250]]= function(_0x5c29x2){return null!= _0x5c29x2?_0x5c29x2[_0xd587[250]]():!1};mxGraphModel[_0xd587[202]][_0xd587[1965]]= function(_0x5c29x2){return null!= _0x5c29x2?_0x5c29x2[_0xd587[1965]]():!1};mxGraphModel[_0xd587[202]][_0xd587[433]]= function(_0x5c29x2){return null!= _0x5c29x2?_0x5c29x2[_0xd587[433]]():null};mxGraphModel[_0xd587[202]][_0xd587[1966]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[350]]( new mxValueChange(this,_0x5c29x2,_0x5c29x3));return _0x5c29x3};mxGraphModel[_0xd587[202]][_0xd587[1967]]= function(_0x5c29x2,_0x5c29x3){return _0x5c29x2[_0xd587[1968]](_0x5c29x3)};mxGraphModel[_0xd587[202]][_0xd587[1721]]= function(_0x5c29x2,_0x5c29x3){return null!= _0x5c29x2?_0x5c29x2[_0xd587[1721]]():null};mxGraphModel[_0xd587[202]][_0xd587[1724]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3!= this[_0xd587[1721]](_0x5c29x2)&& this[_0xd587[350]]( new mxGeometryChange(this,_0x5c29x2,_0x5c29x3));return _0x5c29x3};mxGraphModel[_0xd587[202]][_0xd587[1969]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1721]](_0x5c29x2);_0x5c29x2[_0xd587[1724]](_0x5c29x3);return _0x5c29x4};mxGraphModel[_0xd587[202]][_0xd587[474]]= function(_0x5c29x2){return null!= _0x5c29x2?_0x5c29x2[_0xd587[474]]():null};mxGraphModel[_0xd587[202]][_0xd587[475]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3!= this[_0xd587[474]](_0x5c29x2)&& this[_0xd587[350]]( new mxStyleChange(this,_0x5c29x2,_0x5c29x3));return _0x5c29x3};mxGraphModel[_0xd587[202]][_0xd587[1970]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[474]](_0x5c29x2);_0x5c29x2[_0xd587[475]](_0x5c29x3);return _0x5c29x4};mxGraphModel[_0xd587[202]][_0xd587[1971]]= function(_0x5c29x2){return null!= _0x5c29x2?_0x5c29x2[_0xd587[1971]]():!1};mxGraphModel[_0xd587[202]][_0xd587[1972]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3!= this[_0xd587[1971]](_0x5c29x2)&& this[_0xd587[350]]( new mxCollapseChange(this,_0x5c29x2,_0x5c29x3));return _0x5c29x3};mxGraphModel[_0xd587[202]][_0xd587[1973]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1971]](_0x5c29x2);_0x5c29x2[_0xd587[1972]](_0x5c29x3);return _0x5c29x4};mxGraphModel[_0xd587[202]][_0xd587[174]]= function(_0x5c29x2){return null!= _0x5c29x2?_0x5c29x2[_0xd587[174]]():!1};mxGraphModel[_0xd587[202]][_0xd587[175]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3!= this[_0xd587[174]](_0x5c29x2)&& this[_0xd587[350]]( new mxVisibleChange(this,_0x5c29x2,_0x5c29x3));return _0x5c29x3};mxGraphModel[_0xd587[202]][_0xd587[1974]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[174]](_0x5c29x2);_0x5c29x2[_0xd587[175]](_0x5c29x3);return _0x5c29x4};mxGraphModel[_0xd587[202]][_0xd587[350]]= function(_0x5c29x2){_0x5c29x2[_0xd587[350]]();this[_0xd587[473]]();this[_0xd587[1926]][_0xd587[99]](_0x5c29x2);this[_0xd587[746]]( new mxEventObject(mxEvent.EXECUTE,_0xd587[826],_0x5c29x2));this[_0xd587[746]]( new mxEventObject(mxEvent.EXECUTED,_0xd587[826],_0x5c29x2));this[_0xd587[476]]()};mxGraphModel[_0xd587[202]][_0xd587[473]]= function(){this[_0xd587[1932]]++;this[_0xd587[746]]( new mxEventObject(mxEvent.BEGIN_UPDATE));1== this[_0xd587[1932]]&& this[_0xd587[746]]( new mxEventObject(mxEvent.START_EDIT))};mxGraphModel[_0xd587[202]][_0xd587[476]]= function(){this[_0xd587[1932]]--;0== this[_0xd587[1932]]&& this[_0xd587[746]]( new mxEventObject(mxEvent.END_EDIT));if(!this[_0xd587[1933]]){this[_0xd587[1933]]= 0== this[_0xd587[1932]];this[_0xd587[746]]( new mxEventObject(mxEvent.END_UPDATE,_0xd587[1061],this[_0xd587[1926]]));try{if(this[_0xd587[1933]]&& !this[_0xd587[1926]][_0xd587[1107]]()){this[_0xd587[746]]( new mxEventObject(mxEvent.BEFORE_UNDO,_0xd587[1061],this[_0xd587[1926]]));var _0x5c29x2=this[_0xd587[1926]];this[_0xd587[1926]]= this[_0xd587[1096]]();_0x5c29x2[_0xd587[827]]();this[_0xd587[746]]( new mxEventObject(mxEvent.UNDO,_0xd587[1061],_0x5c29x2))}}finally{this[_0xd587[1933]]=  !1}}};mxGraphModel[_0xd587[202]][_0xd587[1096]]= function(){var _0x5c29x2= new mxUndoableEdit(this,!0);_0x5c29x2[_0xd587[827]]= function(){_0x5c29x2[_0xd587[1097]][_0xd587[746]]( new mxEventObject(mxEvent.CHANGE,_0xd587[1061],_0x5c29x2,_0xd587[1065],_0x5c29x2[_0xd587[1065]]));_0x5c29x2[_0xd587[1097]][_0xd587[746]]( new mxEventObject(mxEvent.NOTIFY,_0xd587[1061],_0x5c29x2,_0xd587[1065],_0x5c29x2[_0xd587[1065]]))};return _0x5c29x2};mxGraphModel[_0xd587[202]][_0xd587[1975]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:!0;this[_0xd587[473]]();try{var _0x5c29x5={};this[_0xd587[1976]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5);for(var _0x5c29x9 in _0x5c29x5){var _0x5c29xa=_0x5c29x5[_0x5c29x9],_0x5c29x12=this[_0xd587[1709]](_0x5c29xa,!0);null!= _0x5c29x12&& (_0x5c29x12= _0x5c29x5[mxCellPath[_0xd587[385]](_0x5c29x12)],this[_0xd587[1957]](_0x5c29xa,_0x5c29x12,!0));_0x5c29x12= this[_0xd587[1709]](_0x5c29xa,!1);null!= _0x5c29x12&& (_0x5c29x12= _0x5c29x5[mxCellPath[_0xd587[385]](_0x5c29x12)],this[_0xd587[1957]](_0x5c29xa,_0x5c29x12,!1))}}finally{this[_0xd587[476]]()}};mxGraphModel[_0xd587[202]][_0xd587[1976]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){this[_0xd587[473]]();try{for(var _0x5c29x9=_0x5c29x2[_0xd587[262]](),_0x5c29xa=0;_0x5c29xa< _0x5c29x9;_0x5c29xa++){var _0x5c29x12=_0x5c29x2[_0xd587[263]](_0x5c29xa);if(_0xd587[279]==  typeof _0x5c29x12[_0xd587[1103]]){var _0x5c29x13=_0x5c29x12[_0xd587[1103]](),_0x5c29x14=null!= _0x5c29x13&& (!this[_0xd587[250]](_0x5c29x12)||  !_0x5c29x4)?this[_0xd587[736]](_0x5c29x13):null;if(null== _0x5c29x14){var _0x5c29x15=_0x5c29x12[_0xd587[238]]();_0x5c29x15[_0xd587[1945]](_0x5c29x13);_0x5c29x15[_0xd587[1957]](_0x5c29x12[_0xd587[1709]](!0),!0);_0x5c29x15[_0xd587[1957]](_0x5c29x12[_0xd587[1709]](!1),!1);_0x5c29x14= _0x5c29x3[_0xd587[1937]](_0x5c29x15);this[_0xd587[1941]](_0x5c29x14)};_0x5c29x5[mxCellPath[_0xd587[385]](_0x5c29x12)]= _0x5c29x14;this[_0xd587[1976]](_0x5c29x12,_0x5c29x14,_0x5c29x4,_0x5c29x5)}}}finally{this[_0xd587[476]]()}};mxGraphModel[_0xd587[202]][_0xd587[1977]]= function(_0x5c29x2){var _0x5c29x3=[];if(null!= _0x5c29x2){for(var _0x5c29x4={},_0x5c29x5=0;_0x5c29x5< _0x5c29x2[_0xd587[67]];_0x5c29x5++){var _0x5c29x9=this[_0xd587[1197]](_0x5c29x2[_0x5c29x5]);if(null!= _0x5c29x9){var _0x5c29xa=mxCellPath[_0xd587[385]](_0x5c29x9);null== _0x5c29x4[_0x5c29xa]&& (_0x5c29x4[_0x5c29xa]= _0x5c29x9,_0x5c29x3[_0xd587[207]](_0x5c29x9))}}};return _0x5c29x3};mxGraphModel[_0xd587[202]][_0xd587[1978]]= function(_0x5c29x2){return null!= _0x5c29x2?this[_0xd587[899]]([_0x5c29x2],!0)[0]:null};mxGraphModel[_0xd587[202]][_0xd587[899]]= function(_0x5c29x2,_0x5c29x3){for(var _0x5c29x4={},_0x5c29x5=[],_0x5c29x9=0;_0x5c29x9< _0x5c29x2[_0xd587[67]];_0x5c29x9++){null!= _0x5c29x2[_0x5c29x9]?_0x5c29x5[_0xd587[207]](this[_0xd587[1979]](_0x5c29x2[_0x5c29x9],_0x5c29x4,_0x5c29x3)):_0x5c29x5[_0xd587[207]](null)};for(_0x5c29x9= 0;_0x5c29x9< _0x5c29x5[_0xd587[67]];_0x5c29x9++){null!= _0x5c29x5[_0x5c29x9]&& this[_0xd587[1980]](_0x5c29x5[_0x5c29x9],_0x5c29x2[_0x5c29x9],_0x5c29x4)};return _0x5c29x5};mxGraphModel[_0xd587[202]][_0xd587[1979]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[1981]](_0x5c29x2);_0x5c29x3[mxObjectIdentity[_0xd587[203]](_0x5c29x2)]= _0x5c29x5;if(_0x5c29x4){_0x5c29x4= this[_0xd587[262]](_0x5c29x2);for(var _0x5c29x9=0;_0x5c29x9< _0x5c29x4;_0x5c29x9++){var _0x5c29xa=this[_0xd587[1979]](this[_0xd587[263]](_0x5c29x2,_0x5c29x9),_0x5c29x3,!0);_0x5c29x5[_0xd587[1937]](_0x5c29xa)}};return _0x5c29x5};mxGraphModel[_0xd587[202]][_0xd587[1981]]= function(_0x5c29x2){return _0x5c29x2[_0xd587[238]]()};mxGraphModel[_0xd587[202]][_0xd587[1980]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[1709]](_0x5c29x3,!0);null!= _0x5c29x5&& (_0x5c29x5= _0x5c29x4[mxObjectIdentity[_0xd587[203]](_0x5c29x5)],null!= _0x5c29x5&& _0x5c29x5[_0xd587[1960]](_0x5c29x2,!0));_0x5c29x5= this[_0xd587[1709]](_0x5c29x3,!1);null!= _0x5c29x5&& (_0x5c29x5= _0x5c29x4[mxObjectIdentity[_0xd587[203]](_0x5c29x5)],null!= _0x5c29x5&& _0x5c29x5[_0xd587[1960]](_0x5c29x2,!1));for(var _0x5c29x5=this[_0xd587[262]](_0x5c29x2),_0x5c29x9=0;_0x5c29x9< _0x5c29x5;_0x5c29x9++){this[_0xd587[1980]](this[_0xd587[263]](_0x5c29x2,_0x5c29x9),this[_0xd587[263]](_0x5c29x3,_0x5c29x9),_0x5c29x4)}};function mxRootChange(_0x5c29x2,_0x5c29x3){this[_0xd587[251]]= _0x5c29x2;this[_0xd587[257]]= this[_0xd587[813]]= _0x5c29x3}mxRootChange[_0xd587[202]][_0xd587[350]]= function(){this[_0xd587[813]]= this[_0xd587[257]];this[_0xd587[257]]= this[_0xd587[251]][_0xd587[1940]](this[_0xd587[257]])};function mxChildChange(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){this[_0xd587[251]]= _0x5c29x2;this[_0xd587[257]]= this[_0xd587[1101]]= _0x5c29x3;this[_0xd587[247]]= _0x5c29x4;this[_0xd587[1982]]= this[_0xd587[1983]]= _0x5c29x5}mxChildChange[_0xd587[202]][_0xd587[350]]= function(){var _0x5c29x2=this[_0xd587[251]][_0xd587[1197]](this[_0xd587[247]]),_0x5c29x3=null!= _0x5c29x2?_0x5c29x2[_0xd587[1738]](this[_0xd587[247]]):0;null== this[_0xd587[257]]&& this[_0xd587[807]](this[_0xd587[247]],!1);_0x5c29x2= this[_0xd587[251]][_0xd587[1952]](this[_0xd587[247]],this[_0xd587[257]],this[_0xd587[1982]]);null!= this[_0xd587[257]]&& this[_0xd587[807]](this[_0xd587[247]],!0);this[_0xd587[1101]]= this[_0xd587[257]];this[_0xd587[257]]= _0x5c29x2;this[_0xd587[1983]]= this[_0xd587[1982]];this[_0xd587[1982]]= _0x5c29x3};mxChildChange[_0xd587[202]][_0xd587[807]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:!0;var _0x5c29x4=_0x5c29x2[_0xd587[1709]](!0),_0x5c29x5=_0x5c29x2[_0xd587[1709]](!1);null!= _0x5c29x4&& (_0x5c29x3?this[_0xd587[251]][_0xd587[1959]](_0x5c29x2,_0x5c29x4,!0):this[_0xd587[251]][_0xd587[1959]](_0x5c29x2,null,!0));null!= _0x5c29x5&& (_0x5c29x3?this[_0xd587[251]][_0xd587[1959]](_0x5c29x2,_0x5c29x5,!1):this[_0xd587[251]][_0xd587[1959]](_0x5c29x2,null,!1));_0x5c29x2[_0xd587[1957]](_0x5c29x4,!0);_0x5c29x2[_0xd587[1957]](_0x5c29x5,!1);_0x5c29x4= this[_0xd587[251]][_0xd587[262]](_0x5c29x2);for(_0x5c29x5= 0;_0x5c29x5< _0x5c29x4;_0x5c29x5++){this[_0xd587[807]](this[_0xd587[251]][_0xd587[263]](_0x5c29x2,_0x5c29x5),_0x5c29x3)}};function mxTerminalChange(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){this[_0xd587[251]]= _0x5c29x2;this[_0xd587[246]]= _0x5c29x3;this[_0xd587[257]]= this[_0xd587[1984]]= _0x5c29x4;this[_0xd587[1097]]= _0x5c29x5}mxTerminalChange[_0xd587[202]][_0xd587[350]]= function(){this[_0xd587[1984]]= this[_0xd587[257]];this[_0xd587[257]]= this[_0xd587[251]][_0xd587[1959]](this[_0xd587[246]],this[_0xd587[257]],this[_0xd587[1097]])};function mxValueChange(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[251]]= _0x5c29x2;this[_0xd587[246]]= _0x5c29x3;this[_0xd587[257]]= this[_0xd587[131]]= _0x5c29x4}mxValueChange[_0xd587[202]][_0xd587[350]]= function(){this[_0xd587[131]]= this[_0xd587[257]];this[_0xd587[257]]= this[_0xd587[251]][_0xd587[1967]](this[_0xd587[246]],this[_0xd587[257]])};function mxStyleChange(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[251]]= _0x5c29x2;this[_0xd587[246]]= _0x5c29x3;this[_0xd587[257]]= this[_0xd587[124]]= _0x5c29x4}mxStyleChange[_0xd587[202]][_0xd587[350]]= function(){this[_0xd587[124]]= this[_0xd587[257]];this[_0xd587[257]]= this[_0xd587[251]][_0xd587[1970]](this[_0xd587[246]],this[_0xd587[257]])};function mxGeometryChange(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[251]]= _0x5c29x2;this[_0xd587[246]]= _0x5c29x3;this[_0xd587[257]]= this[_0xd587[256]]= _0x5c29x4}mxGeometryChange[_0xd587[202]][_0xd587[350]]= function(){this[_0xd587[256]]= this[_0xd587[257]];this[_0xd587[257]]= this[_0xd587[251]][_0xd587[1969]](this[_0xd587[246]],this[_0xd587[257]])};function mxCollapseChange(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[251]]= _0x5c29x2;this[_0xd587[246]]= _0x5c29x3;this[_0xd587[257]]= this[_0xd587[1985]]= _0x5c29x4}mxCollapseChange[_0xd587[202]][_0xd587[350]]= function(){this[_0xd587[1985]]= this[_0xd587[257]];this[_0xd587[257]]= this[_0xd587[251]][_0xd587[1973]](this[_0xd587[246]],this[_0xd587[257]])};function mxVisibleChange(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[251]]= _0x5c29x2;this[_0xd587[246]]= _0x5c29x3;this[_0xd587[257]]= this[_0xd587[189]]= _0x5c29x4}mxVisibleChange[_0xd587[202]][_0xd587[350]]= function(){this[_0xd587[189]]= this[_0xd587[257]];this[_0xd587[257]]= this[_0xd587[251]][_0xd587[1974]](this[_0xd587[246]],this[_0xd587[257]])};function mxCellAttributeChange(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[246]]= _0x5c29x2;this[_0xd587[1986]]= _0x5c29x3;this[_0xd587[257]]= this[_0xd587[131]]= _0x5c29x4}mxCellAttributeChange[_0xd587[202]][_0xd587[350]]= function(){var _0x5c29x2=this[_0xd587[246]][_0xd587[284]](this[_0xd587[1986]]);null== this[_0xd587[257]]?this[_0xd587[246]][_0xd587[131]][_0xd587[1390]](this[_0xd587[1986]]):this[_0xd587[246]][_0xd587[57]](this[_0xd587[1986]],this[_0xd587[257]]);this[_0xd587[257]]= _0x5c29x2};function mxCell(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[131]]= _0x5c29x2;this[_0xd587[1724]](_0x5c29x3);this[_0xd587[475]](_0x5c29x4);if(null!= this[_0xd587[1987]]){this[_0xd587[1987]]()}}mxCell[_0xd587[202]][_0xd587[1363]]= null;mxCell[_0xd587[202]][_0xd587[131]]= null;mxCell[_0xd587[202]][_0xd587[256]]= null;mxCell[_0xd587[202]][_0xd587[124]]= null;mxCell[_0xd587[202]][_0xd587[1988]]=  !1;mxCell[_0xd587[202]][_0xd587[1989]]=  !1;mxCell[_0xd587[202]][_0xd587[1990]]=  !0;mxCell[_0xd587[202]][_0xd587[189]]=  !0;mxCell[_0xd587[202]][_0xd587[1985]]=  !1;mxCell[_0xd587[202]][_0xd587[1101]]= null;mxCell[_0xd587[202]][_0xd587[1097]]= null;mxCell[_0xd587[202]][_0xd587[772]]= null;mxCell[_0xd587[202]][_0xd587[1954]]= null;mxCell[_0xd587[202]][_0xd587[1842]]= null;mxCell[_0xd587[202]][_0xd587[1991]]= _0xd587[1992][_0xd587[224]](_0xd587[185]);mxCell[_0xd587[202]][_0xd587[1103]]= function(){return this[_0xd587[1363]]};mxCell[_0xd587[202]][_0xd587[1945]]= function(_0x5c29x2){this[_0xd587[1363]]= _0x5c29x2};mxCell[_0xd587[202]][_0xd587[433]]= function(){return this[_0xd587[131]]};mxCell[_0xd587[202]][_0xd587[1966]]= function(_0x5c29x2){this[_0xd587[131]]= _0x5c29x2};mxCell[_0xd587[202]][_0xd587[1968]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[433]]();this[_0xd587[1966]](_0x5c29x2);return _0x5c29x3};mxCell[_0xd587[202]][_0xd587[1721]]= function(){return this[_0xd587[256]]};mxCell[_0xd587[202]][_0xd587[1724]]= function(_0x5c29x2){this[_0xd587[256]]= _0x5c29x2};mxCell[_0xd587[202]][_0xd587[474]]= function(){return this[_0xd587[124]]};mxCell[_0xd587[202]][_0xd587[475]]= function(_0x5c29x2){this[_0xd587[124]]= _0x5c29x2};mxCell[_0xd587[202]][_0xd587[1193]]= function(){return this[_0xd587[1988]]};mxCell[_0xd587[202]][_0xd587[1993]]= function(_0x5c29x2){this[_0xd587[1988]]= _0x5c29x2};mxCell[_0xd587[202]][_0xd587[250]]= function(){return this[_0xd587[1989]]};mxCell[_0xd587[202]][_0xd587[1994]]= function(_0x5c29x2){this[_0xd587[1989]]= _0x5c29x2};mxCell[_0xd587[202]][_0xd587[1965]]= function(){return this[_0xd587[1990]]};mxCell[_0xd587[202]][_0xd587[1995]]= function(_0x5c29x2){this[_0xd587[1990]]= _0x5c29x2};mxCell[_0xd587[202]][_0xd587[174]]= function(){return this[_0xd587[189]]};mxCell[_0xd587[202]][_0xd587[175]]= function(_0x5c29x2){this[_0xd587[189]]= _0x5c29x2};mxCell[_0xd587[202]][_0xd587[1971]]= function(){return this[_0xd587[1985]]};mxCell[_0xd587[202]][_0xd587[1972]]= function(_0x5c29x2){this[_0xd587[1985]]= _0x5c29x2};mxCell[_0xd587[202]][_0xd587[1197]]= function(){return this[_0xd587[1101]]};mxCell[_0xd587[202]][_0xd587[1996]]= function(_0x5c29x2){this[_0xd587[1101]]= _0x5c29x2};mxCell[_0xd587[202]][_0xd587[1709]]= function(_0x5c29x2){return _0x5c29x2?this[_0xd587[1097]]:this[_0xd587[772]]};mxCell[_0xd587[202]][_0xd587[1957]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3?this[_0xd587[1097]]= _0x5c29x2:this[_0xd587[772]]= _0x5c29x2;return _0x5c29x2};mxCell[_0xd587[202]][_0xd587[262]]= function(){return null== this[_0xd587[1954]]?0:this[_0xd587[1954]][_0xd587[67]]};mxCell[_0xd587[202]][_0xd587[1738]]= function(_0x5c29x2){return mxUtils[_0xd587[2]](this[_0xd587[1954]],_0x5c29x2)};mxCell[_0xd587[202]][_0xd587[263]]= function(_0x5c29x2){return null== this[_0xd587[1954]]?null:this[_0xd587[1954]][_0x5c29x2]};mxCell[_0xd587[202]][_0xd587[1937]]= function(_0x5c29x2,_0x5c29x3){null!= _0x5c29x2&& (null== _0x5c29x3&& (_0x5c29x3= this[_0xd587[262]](),_0x5c29x2[_0xd587[1197]]()== this&& _0x5c29x3--),_0x5c29x2[_0xd587[1997]](),_0x5c29x2[_0xd587[1996]](this),null== this[_0xd587[1954]]?(this[_0xd587[1954]]= [],this[_0xd587[1954]][_0xd587[207]](_0x5c29x2)):this[_0xd587[1954]][_0xd587[300]](_0x5c29x3,0,_0x5c29x2));return _0x5c29x2};mxCell[_0xd587[202]][_0xd587[205]]= function(_0x5c29x2){var _0x5c29x3=null;null!= this[_0xd587[1954]]&& 0<= _0x5c29x2&& (_0x5c29x3= this[_0xd587[263]](_0x5c29x2),null!= _0x5c29x3&& (this[_0xd587[1954]][_0xd587[300]](_0x5c29x2,1),_0x5c29x3[_0xd587[1996]](null)));return _0x5c29x3};mxCell[_0xd587[202]][_0xd587[1997]]= function(){if(null!= this[_0xd587[1101]]){var _0x5c29x2=this[_0xd587[1101]][_0xd587[1738]](this);this[_0xd587[1101]][_0xd587[205]](_0x5c29x2)}};mxCell[_0xd587[202]][_0xd587[1707]]= function(){return null== this[_0xd587[1842]]?0:this[_0xd587[1842]][_0xd587[67]]};mxCell[_0xd587[202]][_0xd587[1998]]= function(_0x5c29x2){return mxUtils[_0xd587[2]](this[_0xd587[1842]],_0x5c29x2)};mxCell[_0xd587[202]][_0xd587[1708]]= function(_0x5c29x2){return null== this[_0xd587[1842]]?null:this[_0xd587[1842]][_0x5c29x2]};mxCell[_0xd587[202]][_0xd587[1960]]= function(_0x5c29x2,_0x5c29x3){if(null!= _0x5c29x2&& (_0x5c29x2[_0xd587[1999]](_0x5c29x3),_0x5c29x2[_0xd587[1957]](this,_0x5c29x3),null== this[_0xd587[1842]]|| _0x5c29x2[_0xd587[1709]](!_0x5c29x3) != this|| 0> mxUtils[_0xd587[2]](this[_0xd587[1842]],_0x5c29x2))){null== this[_0xd587[1842]]&& (this[_0xd587[1842]]= []),this[_0xd587[1842]][_0xd587[207]](_0x5c29x2)};return _0x5c29x2};mxCell[_0xd587[202]][_0xd587[1961]]= function(_0x5c29x2,_0x5c29x3){if(null!= _0x5c29x2){if(_0x5c29x2[_0xd587[1709]](!_0x5c29x3) != this&& null!= this[_0xd587[1842]]){var _0x5c29x4=this[_0xd587[1998]](_0x5c29x2);0<= _0x5c29x4&& this[_0xd587[1842]][_0xd587[300]](_0x5c29x4,1)};_0x5c29x2[_0xd587[1957]](null,_0x5c29x3)};return _0x5c29x2};mxCell[_0xd587[202]][_0xd587[1999]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1709]](_0x5c29x2);null!= _0x5c29x3&& _0x5c29x3[_0xd587[1961]](this,_0x5c29x2)};mxCell[_0xd587[202]][_0xd587[284]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[433]]();return (null!= _0x5c29x4&& _0x5c29x4[_0xd587[288]]== mxConstants[_0xd587[289]]?_0x5c29x4[_0xd587[284]](_0x5c29x2):null)|| _0x5c29x3};mxCell[_0xd587[202]][_0xd587[57]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[433]]();null!= _0x5c29x4&& _0x5c29x4[_0xd587[288]]== mxConstants[_0xd587[289]]&& _0x5c29x4[_0xd587[57]](_0x5c29x2,_0x5c29x3)};mxCell[_0xd587[202]][_0xd587[238]]= function(){var _0x5c29x2=mxUtils[_0xd587[238]](this,this[_0xd587[1991]]);_0x5c29x2[_0xd587[1966]](this[_0xd587[2000]]());return _0x5c29x2};mxCell[_0xd587[202]][_0xd587[2000]]= function(){var _0x5c29x2=this[_0xd587[433]]();null!= _0x5c29x2&& (_0xd587[279]==  typeof _0x5c29x2[_0xd587[238]]?_0x5c29x2= _0x5c29x2[_0xd587[238]]():isNaN(_0x5c29x2[_0xd587[288]])|| (_0x5c29x2= _0x5c29x2[_0xd587[511]](!0)));return _0x5c29x2};function mxGeometry(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){mxRectangle[_0xd587[239]](this,_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5)}mxGeometry[_0xd587[202]]=  new mxRectangle;mxGeometry[_0xd587[202]][_0xd587[196]]= mxGeometry;mxGeometry[_0xd587[202]][_0xd587[2001]]=  !0;mxGeometry[_0xd587[202]][_0xd587[2002]]= null;mxGeometry[_0xd587[202]][_0xd587[2003]]= null;mxGeometry[_0xd587[202]][_0xd587[2004]]= null;mxGeometry[_0xd587[202]][_0xd587[1525]]= null;mxGeometry[_0xd587[202]][_0xd587[1368]]= null;mxGeometry[_0xd587[202]][_0xd587[1500]]=  !1;mxGeometry[_0xd587[202]][_0xd587[2005]]= function(){if(null!= this[_0xd587[2002]]){var _0x5c29x2= new mxRectangle(this[_0xd587[235]],this[_0xd587[236]],this[_0xd587[117]],this[_0xd587[119]]);this[_0xd587[235]]= this[_0xd587[2002]][_0xd587[235]];this[_0xd587[236]]= this[_0xd587[2002]][_0xd587[236]];this[_0xd587[117]]= this[_0xd587[2002]][_0xd587[117]];this[_0xd587[119]]= this[_0xd587[2002]][_0xd587[119]];this[_0xd587[2002]]= _0x5c29x2}};mxGeometry[_0xd587[202]][_0xd587[2006]]= function(_0x5c29x2){return _0x5c29x2?this[_0xd587[2003]]:this[_0xd587[2004]]};mxGeometry[_0xd587[202]][_0xd587[2007]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3?this[_0xd587[2003]]= _0x5c29x2:this[_0xd587[2004]]= _0x5c29x2;return _0x5c29x2};mxGeometry[_0xd587[202]][_0xd587[513]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[238]]();this[_0xd587[1500]]|| (this[_0xd587[235]]+= _0x5c29x2,this[_0xd587[236]]+= _0x5c29x3);null!= this[_0xd587[2003]]&& (this[_0xd587[2003]][_0xd587[235]]+= _0x5c29x2,this[_0xd587[2003]][_0xd587[236]]+= _0x5c29x3);null!= this[_0xd587[2004]]&& (this[_0xd587[2004]][_0xd587[235]]+= _0x5c29x2,this[_0xd587[2004]][_0xd587[236]]+= _0x5c29x3);if(this[_0xd587[2001]]&& null!= this[_0xd587[1525]]){for(var _0x5c29x4=this[_0xd587[1525]][_0xd587[67]],_0x5c29x5=0;_0x5c29x5< _0x5c29x4;_0x5c29x5++){var _0x5c29x9=this[_0xd587[1525]][_0x5c29x5];null!= _0x5c29x9&& (_0x5c29x9[_0xd587[235]]+= _0x5c29x2,_0x5c29x9[_0xd587[236]]+= _0x5c29x3)}}};var mxCellPath={PATH_SEPARATOR:_0xd587[87],create:function(_0x5c29x2){var _0x5c29x3=_0xd587[110];if(null!= _0x5c29x2){for(var _0x5c29x4=_0x5c29x2[_0xd587[1197]]();null!= _0x5c29x4;){_0x5c29x3= _0x5c29x4[_0xd587[1738]](_0x5c29x2)+ mxCellPath[_0xd587[1950]]+ _0x5c29x3,_0x5c29x2= _0x5c29x4,_0x5c29x4= _0x5c29x2[_0xd587[1197]]()}};_0x5c29x2= _0x5c29x3[_0xd587[67]];1< _0x5c29x2&& (_0x5c29x3= _0x5c29x3[_0xd587[85]](0,_0x5c29x2- 1));return _0x5c29x3},getParentPath:function(_0x5c29x2){if(null!= _0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[1122]](mxCellPath.PATH_SEPARATOR);if(0<= _0x5c29x3){return _0x5c29x2[_0xd587[85]](0,_0x5c29x3)};if(0< _0x5c29x2[_0xd587[67]]){return _0xd587[110]}};return null},resolve:function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=_0x5c29x2;if(null!= _0x5c29x3){for(var _0x5c29x5=_0x5c29x3[_0xd587[224]](mxCellPath.PATH_SEPARATOR),_0x5c29x9=0;_0x5c29x9< _0x5c29x5[_0xd587[67]];_0x5c29x9++){_0x5c29x4= _0x5c29x4[_0xd587[263]](parseInt(_0x5c29x5[_0x5c29x9]))}};return _0x5c29x4},compare:function(_0x5c29x2,_0x5c29x3){for(var _0x5c29x4=Math[_0xd587[243]](_0x5c29x2[_0xd587[67]],_0x5c29x3[_0xd587[67]]),_0x5c29x5=0,_0x5c29x9=0;_0x5c29x9< _0x5c29x4;_0x5c29x9++){if(_0x5c29x2[_0x5c29x9]!= _0x5c29x3[_0x5c29x9]){0== _0x5c29x2[_0x5c29x9][_0xd587[67]]|| 0== _0x5c29x3[_0x5c29x9][_0xd587[67]]?_0x5c29x5= _0x5c29x2[_0x5c29x9]== _0x5c29x3[_0x5c29x9]?0:_0x5c29x2[_0x5c29x9]> _0x5c29x3[_0x5c29x9]?1:-1:(_0x5c29x4= parseInt(_0x5c29x2[_0x5c29x9]),_0x5c29x9= parseInt(_0x5c29x3[_0x5c29x9]),_0x5c29x5= _0x5c29x4== _0x5c29x9?0:_0x5c29x4> _0x5c29x9?1:-1);break}};0== _0x5c29x5&& (_0x5c29x4= _0x5c29x2[_0xd587[67]],_0x5c29x9= _0x5c29x3[_0xd587[67]],_0x5c29x4!= _0x5c29x9&& (_0x5c29x5= _0x5c29x4> _0x5c29x9?1:-1));return _0x5c29x5}},mxPerimeter={RectanglePerimeter:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x3= _0x5c29x2[_0xd587[241]]();var _0x5c29x9=_0x5c29x2[_0xd587[242]](),_0x5c29xa=Math[_0xd587[429]](_0x5c29x4[_0xd587[236]]- _0x5c29x9,_0x5c29x4[_0xd587[235]]- _0x5c29x3),_0x5c29x12= new mxPoint(0,0),_0x5c29x13=Math[_0xd587[424]],_0x5c29x14=Math[_0xd587[424]]/ 2- _0x5c29xa,_0x5c29x15=Math[_0xd587[429]](_0x5c29x2[_0xd587[119]],_0x5c29x2[_0xd587[117]]);_0x5c29xa< -_0x5c29x13+ _0x5c29x15|| _0x5c29xa> _0x5c29x13- _0x5c29x15?(_0x5c29x12[_0xd587[235]]= _0x5c29x2[_0xd587[235]],_0x5c29x12[_0xd587[236]]= _0x5c29x9- _0x5c29x2[_0xd587[117]]* Math[_0xd587[2008]](_0x5c29xa)/ 2):_0x5c29xa< -_0x5c29x15?(_0x5c29x12[_0xd587[236]]= _0x5c29x2[_0xd587[236]],_0x5c29x12[_0xd587[235]]= _0x5c29x3- _0x5c29x2[_0xd587[119]]* Math[_0xd587[2008]](_0x5c29x14)/ 2):_0x5c29xa< _0x5c29x15?(_0x5c29x12[_0xd587[235]]= _0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]],_0x5c29x12[_0xd587[236]]= _0x5c29x9+ _0x5c29x2[_0xd587[117]]* Math[_0xd587[2008]](_0x5c29xa)/ 2):(_0x5c29x12[_0xd587[236]]= _0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]],_0x5c29x12[_0xd587[235]]= _0x5c29x3+ _0x5c29x2[_0xd587[119]]* Math[_0xd587[2008]](_0x5c29x14)/ 2);_0x5c29x5&& (_0x5c29x4[_0xd587[235]]>= _0x5c29x2[_0xd587[235]]&& _0x5c29x4[_0xd587[235]]<= _0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]]?_0x5c29x12[_0xd587[235]]= _0x5c29x4[_0xd587[235]]:_0x5c29x4[_0xd587[236]]>= _0x5c29x2[_0xd587[236]]&& _0x5c29x4[_0xd587[236]]<= _0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]]&& (_0x5c29x12[_0xd587[236]]= _0x5c29x4[_0xd587[236]]),_0x5c29x4[_0xd587[235]]< _0x5c29x2[_0xd587[235]]?_0x5c29x12[_0xd587[235]]= _0x5c29x2[_0xd587[235]]:_0x5c29x4[_0xd587[235]]> _0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]]&& (_0x5c29x12[_0xd587[235]]= _0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]]),_0x5c29x4[_0xd587[236]]< _0x5c29x2[_0xd587[236]]?_0x5c29x12[_0xd587[236]]= _0x5c29x2[_0xd587[236]]:_0x5c29x4[_0xd587[236]]> _0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]]&& (_0x5c29x12[_0xd587[236]]= _0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]]));return _0x5c29x12},EllipsePerimeter:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=_0x5c29x2[_0xd587[235]],_0x5c29xa=_0x5c29x2[_0xd587[236]],_0x5c29x12=_0x5c29x2[_0xd587[117]]/ 2,_0x5c29x13=_0x5c29x2[_0xd587[119]]/ 2,_0x5c29x14=_0x5c29x9+ _0x5c29x12,_0x5c29x15=_0x5c29xa+ _0x5c29x13;_0x5c29x3= _0x5c29x4[_0xd587[235]];_0x5c29x4= _0x5c29x4[_0xd587[236]];var _0x5c29x16=parseInt(_0x5c29x3- _0x5c29x14),_0x5c29x17=parseInt(_0x5c29x4- _0x5c29x15);if(0== _0x5c29x16&& 0!= _0x5c29x17){return  new mxPoint(_0x5c29x14,_0x5c29x15+ _0x5c29x13* _0x5c29x17/ Math[_0xd587[425]](_0x5c29x17))};if(0== _0x5c29x16&& 0== _0x5c29x17){return  new mxPoint(_0x5c29x3,_0x5c29x4)};if(_0x5c29x5){if(_0x5c29x4>= _0x5c29xa&& _0x5c29x4<= _0x5c29xa+ _0x5c29x2[_0xd587[119]]){return _0x5c29x2= _0x5c29x4- _0x5c29x15,_0x5c29x2= Math[_0xd587[428]](_0x5c29x12* _0x5c29x12* (1- _0x5c29x2* _0x5c29x2/ (_0x5c29x13* _0x5c29x13)))|| 0,_0x5c29x3<= _0x5c29x9&& (_0x5c29x2=  -_0x5c29x2), new mxPoint(_0x5c29x14+ _0x5c29x2,_0x5c29x4)};if(_0x5c29x3>= _0x5c29x9&& _0x5c29x3<= _0x5c29x9+ _0x5c29x2[_0xd587[117]]){return _0x5c29x2= _0x5c29x3- _0x5c29x14,_0x5c29x2= Math[_0xd587[428]](_0x5c29x13* _0x5c29x13* (1- _0x5c29x2* _0x5c29x2/ (_0x5c29x12* _0x5c29x12)))|| 0,_0x5c29x4<= _0x5c29xa&& (_0x5c29x2=  -_0x5c29x2), new mxPoint(_0x5c29x3,_0x5c29x15+ _0x5c29x2)}};_0x5c29x9= _0x5c29x17/ _0x5c29x16;_0x5c29x15-= _0x5c29x9* _0x5c29x14;_0x5c29xa= _0x5c29x12* _0x5c29x12* _0x5c29x9* _0x5c29x9+ _0x5c29x13* _0x5c29x13;_0x5c29x2= -2* _0x5c29x14* _0x5c29xa;_0x5c29x13= Math[_0xd587[428]](_0x5c29x2* _0x5c29x2- 4* _0x5c29xa* (_0x5c29x12* _0x5c29x12* _0x5c29x9* _0x5c29x9* _0x5c29x14* _0x5c29x14+ _0x5c29x13* _0x5c29x13* _0x5c29x14* _0x5c29x14- _0x5c29x12* _0x5c29x12* _0x5c29x13* _0x5c29x13));_0x5c29x12= (-_0x5c29x2+ _0x5c29x13) / (2* _0x5c29xa);_0x5c29x13= (-_0x5c29x2- _0x5c29x13) / (2* _0x5c29xa);_0x5c29x14= _0x5c29x9* _0x5c29x12+ _0x5c29x15;_0x5c29x15= _0x5c29x9* _0x5c29x13+ _0x5c29x15;_0x5c29x9= Math[_0xd587[428]](Math[_0xd587[2009]](_0x5c29x12- _0x5c29x3,2)+ Math[_0xd587[2009]](_0x5c29x14- _0x5c29x4,2));_0x5c29x3= Math[_0xd587[428]](Math[_0xd587[2009]](_0x5c29x13- _0x5c29x3,2)+ Math[_0xd587[2009]](_0x5c29x15- _0x5c29x4,2));_0x5c29xa= _0x5c29x4= 0;_0x5c29x9< _0x5c29x3?(_0x5c29x4= _0x5c29x12,_0x5c29xa= _0x5c29x14):(_0x5c29x4= _0x5c29x13,_0x5c29xa= _0x5c29x15);return  new mxPoint(_0x5c29x4,_0x5c29xa)},RhombusPerimeter:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x3= _0x5c29x2[_0xd587[235]];var _0x5c29x9=_0x5c29x2[_0xd587[236]],_0x5c29xa=_0x5c29x2[_0xd587[117]];_0x5c29x2= _0x5c29x2[_0xd587[119]];var _0x5c29x12=_0x5c29x3+ _0x5c29xa/ 2,_0x5c29x13=_0x5c29x9+ _0x5c29x2/ 2,_0x5c29x14=_0x5c29x4[_0xd587[235]];_0x5c29x4= _0x5c29x4[_0xd587[236]];if(_0x5c29x12== _0x5c29x14){return _0x5c29x13> _0x5c29x4? new mxPoint(_0x5c29x12,_0x5c29x9): new mxPoint(_0x5c29x12,_0x5c29x9+ _0x5c29x2)};if(_0x5c29x13== _0x5c29x4){return _0x5c29x12> _0x5c29x14? new mxPoint(_0x5c29x3,_0x5c29x13): new mxPoint(_0x5c29x3+ _0x5c29xa,_0x5c29x13)};var _0x5c29x15=_0x5c29x12,_0x5c29x16=_0x5c29x13;_0x5c29x5&& (_0x5c29x14>= _0x5c29x3&& _0x5c29x14<= _0x5c29x3+ _0x5c29xa?_0x5c29x15= _0x5c29x14:_0x5c29x4>= _0x5c29x9&& _0x5c29x4<= _0x5c29x9+ _0x5c29x2&& (_0x5c29x16= _0x5c29x4));return _0x5c29x14< _0x5c29x12?_0x5c29x4< _0x5c29x13?mxUtils[_0xd587[2010]](_0x5c29x14,_0x5c29x4,_0x5c29x15,_0x5c29x16,_0x5c29x12,_0x5c29x9,_0x5c29x3,_0x5c29x13):mxUtils[_0xd587[2010]](_0x5c29x14,_0x5c29x4,_0x5c29x15,_0x5c29x16,_0x5c29x12,_0x5c29x9+ _0x5c29x2,_0x5c29x3,_0x5c29x13):_0x5c29x4< _0x5c29x13?mxUtils[_0xd587[2010]](_0x5c29x14,_0x5c29x4,_0x5c29x15,_0x5c29x16,_0x5c29x12,_0x5c29x9,_0x5c29x3+ _0x5c29xa,_0x5c29x13):mxUtils[_0xd587[2010]](_0x5c29x14,_0x5c29x4,_0x5c29x15,_0x5c29x16,_0x5c29x12,_0x5c29x9+ _0x5c29x2,_0x5c29x3+ _0x5c29xa,_0x5c29x13)},TrianglePerimeter:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3[_0xd587[124]][mxConstants[_0xd587[2011]]]:null;var _0x5c29x9=_0x5c29x3== mxConstants[_0xd587[1358]]|| _0x5c29x3== mxConstants[_0xd587[1354]],_0x5c29xa=_0x5c29x2[_0xd587[235]],_0x5c29x12=_0x5c29x2[_0xd587[236]],_0x5c29x13=_0x5c29x2[_0xd587[117]];_0x5c29x2= _0x5c29x2[_0xd587[119]];var _0x5c29x14=_0x5c29xa+ _0x5c29x13/ 2,_0x5c29x15=_0x5c29x12+ _0x5c29x2/ 2,_0x5c29x16= new mxPoint(_0x5c29xa,_0x5c29x12),_0x5c29x17= new mxPoint(_0x5c29xa+ _0x5c29x13,_0x5c29x15),_0x5c29x18= new mxPoint(_0x5c29xa,_0x5c29x12+ _0x5c29x2);_0x5c29x3== mxConstants[_0xd587[1358]]?(_0x5c29x16= _0x5c29x18,_0x5c29x17=  new mxPoint(_0x5c29x14,_0x5c29x12),_0x5c29x18=  new mxPoint(_0x5c29xa+ _0x5c29x13,_0x5c29x12+ _0x5c29x2)):_0x5c29x3== mxConstants[_0xd587[1354]]?(_0x5c29x17=  new mxPoint(_0x5c29x14,_0x5c29x12+ _0x5c29x2),_0x5c29x18=  new mxPoint(_0x5c29xa+ _0x5c29x13,_0x5c29x12)):_0x5c29x3== mxConstants[_0xd587[1359]]&& (_0x5c29x16=  new mxPoint(_0x5c29xa+ _0x5c29x13,_0x5c29x12),_0x5c29x17=  new mxPoint(_0x5c29xa,_0x5c29x15),_0x5c29x18=  new mxPoint(_0x5c29xa+ _0x5c29x13,_0x5c29x12+ _0x5c29x2));var _0x5c29x19=_0x5c29x4[_0xd587[235]]- _0x5c29x14,_0x5c29x1a=_0x5c29x4[_0xd587[236]]- _0x5c29x15,_0x5c29x19=_0x5c29x9?Math[_0xd587[429]](_0x5c29x19,_0x5c29x1a):Math[_0xd587[429]](_0x5c29x1a,_0x5c29x19),_0x5c29x1b=_0x5c29x9?Math[_0xd587[429]](_0x5c29x13,_0x5c29x2):Math[_0xd587[429]](_0x5c29x2,_0x5c29x13),_0x5c29x1a=!1,_0x5c29x1a=_0x5c29x3== mxConstants[_0xd587[1358]]|| _0x5c29x3== mxConstants[_0xd587[1359]]?_0x5c29x19> -_0x5c29x1b&& _0x5c29x19< _0x5c29x1b:_0x5c29x19< -Math[_0xd587[424]]+ _0x5c29x1b|| _0x5c29x19> Math[_0xd587[424]]- _0x5c29x1b,_0x5c29x1b=null;_0x5c29x1a?_0x5c29x1b= _0x5c29x5&& (_0x5c29x9&& _0x5c29x4[_0xd587[235]]>= _0x5c29x16[_0xd587[235]]&& _0x5c29x4[_0xd587[235]]<= _0x5c29x18[_0xd587[235]]|| !_0x5c29x9&& _0x5c29x4[_0xd587[236]]>= _0x5c29x16[_0xd587[236]]&& _0x5c29x4[_0xd587[236]]<= _0x5c29x18[_0xd587[236]])?_0x5c29x9? new mxPoint(_0x5c29x4[_0xd587[235]],_0x5c29x16[_0xd587[236]]): new mxPoint(_0x5c29x16[_0xd587[235]],_0x5c29x4[_0xd587[236]]):_0x5c29x3== mxConstants[_0xd587[1358]]? new mxPoint(_0x5c29xa+ _0x5c29x13/ 2+ _0x5c29x2* Math[_0xd587[2008]](_0x5c29x19)/ 2,_0x5c29x12+ _0x5c29x2):_0x5c29x3== mxConstants[_0xd587[1354]]? new mxPoint(_0x5c29xa+ _0x5c29x13/ 2- _0x5c29x2* Math[_0xd587[2008]](_0x5c29x19)/ 2,_0x5c29x12):_0x5c29x3== mxConstants[_0xd587[1359]]? new mxPoint(_0x5c29xa+ _0x5c29x13,_0x5c29x12+ _0x5c29x2/ 2+ _0x5c29x13* Math[_0xd587[2008]](_0x5c29x19)/ 2): new mxPoint(_0x5c29xa,_0x5c29x12+ _0x5c29x2/ 2- _0x5c29x13* Math[_0xd587[2008]](_0x5c29x19)/ 2):(_0x5c29x5&& (_0x5c29x5=  new mxPoint(_0x5c29x14,_0x5c29x15),_0x5c29x4[_0xd587[236]]>= _0x5c29x12&& _0x5c29x4[_0xd587[236]]<= _0x5c29x12+ _0x5c29x2?(_0x5c29x5[_0xd587[235]]= _0x5c29x9?_0x5c29x14:_0x5c29x3== mxConstants[_0xd587[1359]]?_0x5c29xa+ _0x5c29x13:_0x5c29xa,_0x5c29x5[_0xd587[236]]= _0x5c29x4[_0xd587[236]]):_0x5c29x4[_0xd587[235]]>= _0x5c29xa&& _0x5c29x4[_0xd587[235]]<= _0x5c29xa+ _0x5c29x13&& (_0x5c29x5[_0xd587[235]]= _0x5c29x4[_0xd587[235]],_0x5c29x5[_0xd587[236]]= !_0x5c29x9?_0x5c29x15:_0x5c29x3== mxConstants[_0xd587[1358]]?_0x5c29x12+ _0x5c29x2:_0x5c29x12),_0x5c29x14= _0x5c29x5[_0xd587[235]],_0x5c29x15= _0x5c29x5[_0xd587[236]]),_0x5c29x1b= _0x5c29x9&& _0x5c29x4[_0xd587[235]]<= _0x5c29xa+ _0x5c29x13/ 2|| !_0x5c29x9&& _0x5c29x4[_0xd587[236]]<= _0x5c29x12+ _0x5c29x2/ 2?mxUtils[_0xd587[2010]](_0x5c29x4[_0xd587[235]],_0x5c29x4[_0xd587[236]],_0x5c29x14,_0x5c29x15,_0x5c29x16[_0xd587[235]],_0x5c29x16[_0xd587[236]],_0x5c29x17[_0xd587[235]],_0x5c29x17[_0xd587[236]]):mxUtils[_0xd587[2010]](_0x5c29x4[_0xd587[235]],_0x5c29x4[_0xd587[236]],_0x5c29x14,_0x5c29x15,_0x5c29x17[_0xd587[235]],_0x5c29x17[_0xd587[236]],_0x5c29x18[_0xd587[235]],_0x5c29x18[_0xd587[236]]));null== _0x5c29x1b&& (_0x5c29x1b=  new mxPoint(_0x5c29x14,_0x5c29x15));return _0x5c29x1b}};function mxPrintPreview(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14){this[_0xd587[1179]]= _0x5c29x2;this[_0xd587[255]]= null!= _0x5c29x3?_0x5c29x3:1/ _0x5c29x2[_0xd587[2012]];this[_0xd587[467]]= null!= _0x5c29x5?_0x5c29x5:0;this[_0xd587[2013]]= null!= _0x5c29x4?_0x5c29x4:_0x5c29x2[_0xd587[2013]];this[_0xd587[924]]= null!= _0x5c29x13?_0x5c29x13:_0xd587[2014];this[_0xd587[1732]]= null!= _0x5c29x9?_0x5c29x9:0;this[_0xd587[1733]]= null!= _0x5c29xa?_0x5c29xa:0;this[_0xd587[1630]]= _0x5c29x12;this[_0xd587[2015]]= null!= _0x5c29x14?_0x5c29x14:!0}mxPrintPreview[_0xd587[202]][_0xd587[1179]]= null;mxPrintPreview[_0xd587[202]][_0xd587[2013]]= null;mxPrintPreview[_0xd587[202]][_0xd587[255]]= null;mxPrintPreview[_0xd587[202]][_0xd587[467]]= 0;mxPrintPreview[_0xd587[202]][_0xd587[1732]]= 0;mxPrintPreview[_0xd587[202]][_0xd587[1733]]= 0;mxPrintPreview[_0xd587[202]][_0xd587[2016]]=  !0;mxPrintPreview[_0xd587[202]][_0xd587[2017]]=  !1;mxPrintPreview[_0xd587[202]][_0xd587[1630]]= null;mxPrintPreview[_0xd587[202]][_0xd587[924]]= null;mxPrintPreview[_0xd587[202]][_0xd587[2015]]= null;mxPrintPreview[_0xd587[202]][_0xd587[2018]]= null;mxPrintPreview[_0xd587[202]][_0xd587[2019]]= 0;mxPrintPreview[_0xd587[202]][_0xd587[2020]]= function(){return this[_0xd587[2018]]};mxPrintPreview[_0xd587[202]][_0xd587[2021]]= function(){var _0x5c29x2=_0xd587[110];8== document[_0xd587[5]]&& (_0x5c29x2= _0xd587[2022]);return _0x5c29x2};mxPrintPreview[_0xd587[202]][_0xd587[392]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1179]][_0xd587[259]][_0xd587[2023]],_0x5c29x4=null;try{this[_0xd587[2017]]&& (this[_0xd587[1179]][_0xd587[259]][_0xd587[2023]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3[_0xd587[176]](_0x5c29x2[_0xd587[441]][_0xd587[2024]]())});if(null== this[_0xd587[2018]]){this[_0xd587[2018]]= window[_0xd587[392]]();var _0x5c29x5=this[_0xd587[2018]][_0xd587[395]],_0x5c29x9=this[_0xd587[2021]]();null!= _0x5c29x9&& 0< _0x5c29x9[_0xd587[67]]&& _0x5c29x5[_0xd587[171]](_0x5c29x9);_0x5c29x5[_0xd587[171]](_0xd587[528]);_0x5c29x5[_0xd587[171]](_0xd587[531]);this[_0xd587[2025]](_0x5c29x5,_0x5c29x2);_0x5c29x5[_0xd587[171]](_0xd587[533]);_0x5c29x5[_0xd587[171]](_0xd587[2026]);mxClient[_0xd587[54]](_0xd587[94],mxClient[_0xd587[86]]+ _0xd587[95],_0x5c29x5);mxClient[_0xd587[47]]&& (_0x5c29x5[_0xd587[100]][_0xd587[99]](_0xd587[6],_0xd587[97]),_0x5c29x5[_0xd587[100]][_0xd587[99]](_0xd587[7],_0xd587[101]),_0x5c29x5[_0xd587[102]]()[_0xd587[103]]= _0xd587[104],mxClient[_0xd587[54]](_0xd587[94],mxClient[_0xd587[86]]+ _0xd587[105],_0x5c29x5));var _0x5c29xa=this[_0xd587[1179]][_0xd587[517]]()[_0xd587[238]](),_0x5c29x12=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[518]](),_0x5c29x13=_0x5c29x12/ this[_0xd587[255]],_0x5c29x14=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[512]]();this[_0xd587[2016]]|| (this[_0xd587[1732]]= -_0x5c29x14[_0xd587[235]]* this[_0xd587[255]],this[_0xd587[1733]]= -_0x5c29x14[_0xd587[236]]* this[_0xd587[255]],_0x5c29xa[_0xd587[117]]+= _0x5c29xa[_0xd587[235]],_0x5c29xa[_0xd587[119]]+= _0x5c29xa[_0xd587[236]],_0x5c29xa[_0xd587[235]]= 0,this[_0xd587[467]]= _0x5c29xa[_0xd587[236]]= 0);_0x5c29xa[_0xd587[117]]/= _0x5c29x13;_0x5c29xa[_0xd587[119]]/= _0x5c29x13;var _0x5c29x15=this[_0xd587[2013]][_0xd587[117]]- 2* this[_0xd587[467]],_0x5c29x16=this[_0xd587[2013]][_0xd587[119]]- 2* this[_0xd587[467]],_0x5c29x17=Math[_0xd587[160]](1,Math[_0xd587[430]]((_0x5c29xa[_0xd587[117]]+ this[_0xd587[1732]])/ _0x5c29x15)),_0x5c29x18=Math[_0xd587[160]](1,Math[_0xd587[430]]((_0x5c29xa[_0xd587[119]]+ this[_0xd587[1733]])/ _0x5c29x16));this[_0xd587[2019]]= _0x5c29x17* _0x5c29x18;var _0x5c29x19=mxUtils[_0xd587[885]](this,function(){if(this[_0xd587[2015]]&& (1< _0x5c29x18|| 1< _0x5c29x17)){var _0x5c29x2=this[_0xd587[2027]](_0x5c29x18,_0x5c29x17);_0x5c29x5[_0xd587[112]][_0xd587[62]](_0x5c29x2);if(mxClient[_0xd587[80]]){_0x5c29x2[_0xd587[124]][_0xd587[491]]= _0xd587[492];var _0x5c29x3=function(){_0x5c29x2[_0xd587[124]][_0xd587[125]]= _0x5c29x5[_0xd587[112]][_0xd587[190]]+ 10+ _0xd587[168]};mxEvent[_0xd587[169]](this[_0xd587[2018]],_0xd587[276],function(_0x5c29x2){_0x5c29x3()});mxEvent[_0xd587[169]](this[_0xd587[2018]],_0xd587[129],function(_0x5c29x2){_0x5c29x3()})}}});_0x5c29x2= function(_0x5c29x2,_0x5c29x3){null!= this[_0xd587[1630]]&& (_0x5c29x2[_0xd587[124]][_0xd587[1630]]= this[_0xd587[1630]],_0x5c29x2[_0xd587[124]][_0xd587[465]]= _0xd587[1631],_0x5c29x2[_0xd587[124]][_0xd587[1629]]= _0xd587[942]);_0x5c29x2[_0xd587[124]][_0xd587[1537]]= _0xd587[1391];_0x5c29x3&& (_0x5c29x2[_0xd587[124]][_0xd587[2028]]= _0xd587[2029]);mxClient[_0xd587[80]]?(_0x5c29x5[_0xd587[171]](_0x5c29x2[_0xd587[342]]),_0x5c29x2[_0xd587[265]][_0xd587[266]](_0x5c29x2)):(_0x5c29x2[_0xd587[265]][_0xd587[266]](_0x5c29x2),_0x5c29x5[_0xd587[112]][_0xd587[62]](_0x5c29x2));if(_0x5c29x3){var _0x5c29x4=_0x5c29x5[_0xd587[55]](_0xd587[1054]);_0x5c29x4[_0xd587[926]]= _0xd587[2030];_0x5c29x5[_0xd587[112]][_0xd587[62]](_0x5c29x4)}};var _0x5c29x1a=this[_0xd587[2031]](this[_0xd587[2013]][_0xd587[117]],this[_0xd587[2013]][_0xd587[119]]);if(null!= _0x5c29x1a){for(var _0x5c29x1b=0;_0x5c29x1b< _0x5c29x1a[_0xd587[67]];_0x5c29x1b++){_0x5c29x2(_0x5c29x1a[_0x5c29x1b],!0)}};for(var _0x5c29x1c=this[_0xd587[2032]](this[_0xd587[2013]][_0xd587[117]],this[_0xd587[2013]][_0xd587[119]]),_0x5c29x1b=0;_0x5c29x1b< _0x5c29x18;_0x5c29x1b++){for(var _0x5c29x1d=_0x5c29x1b* _0x5c29x16/ this[_0xd587[255]]- this[_0xd587[1733]]/ this[_0xd587[255]]+ (_0x5c29xa[_0xd587[236]]- _0x5c29x14[_0xd587[236]]* _0x5c29x12)/ _0x5c29x12,_0x5c29x1a=0;_0x5c29x1a< _0x5c29x17;_0x5c29x1a++){if(null== this[_0xd587[2018]]){return null};var _0x5c29x1e=_0x5c29x1a* _0x5c29x15/ this[_0xd587[255]]- this[_0xd587[1732]]/ this[_0xd587[255]]+ (_0x5c29xa[_0xd587[235]]- _0x5c29x14[_0xd587[235]]* _0x5c29x12)/ _0x5c29x12,_0x5c29x1f=_0x5c29x1b* _0x5c29x17+ _0x5c29x1a+ 1,_0x5c29x4=this[_0xd587[2034]](this[_0xd587[2013]][_0xd587[117]],this[_0xd587[2013]][_0xd587[119]],mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[2033]](-_0x5c29x1e,-_0x5c29x1d,this[_0xd587[255]],_0x5c29x1f,_0x5c29x2)}));_0x5c29x4[_0xd587[57]](_0xd587[1363],_0xd587[2035]+ _0x5c29x1f);_0x5c29x2(_0x5c29x4,null!= _0x5c29x1c|| _0x5c29x1b< _0x5c29x18- 1|| _0x5c29x1a< _0x5c29x17- 1)}};if(null!= _0x5c29x1c){for(_0x5c29x1b= 0;_0x5c29x1b< _0x5c29x1c[_0xd587[67]];_0x5c29x1b++){_0x5c29x2(_0x5c29x1c[_0x5c29x1b],_0x5c29x1b< _0x5c29x1c[_0xd587[67]])}};_0x5c29x5[_0xd587[171]](_0xd587[527]);_0x5c29x5[_0xd587[171]](_0xd587[534]);_0x5c29x5[_0xd587[268]]();_0x5c29x19();mxEvent[_0xd587[762]](_0x5c29x5[_0xd587[112]])};this[_0xd587[2018]][_0xd587[393]]()}catch(y){null!= _0x5c29x4&& null!= _0x5c29x4[_0xd587[265]]&& _0x5c29x4[_0xd587[265]][_0xd587[266]](_0x5c29x4)}finally{this[_0xd587[1179]][_0xd587[259]][_0xd587[2023]]= _0x5c29x3};return this[_0xd587[2018]]};mxPrintPreview[_0xd587[202]][_0xd587[2025]]= function(_0x5c29x2,_0x5c29x3){null!= this[_0xd587[924]]&& _0x5c29x2[_0xd587[171]](_0xd587[2036]+ this[_0xd587[924]]+ _0xd587[2037]);_0x5c29x2[_0xd587[171]](_0xd587[2038]);_0x5c29x2[_0xd587[171]](_0xd587[2039]);_0x5c29x2[_0xd587[171]](_0xd587[2040]);_0x5c29x2[_0xd587[171]](_0xd587[2041]);_0x5c29x2[_0xd587[171]](_0xd587[233]);_0x5c29x2[_0xd587[171]](_0xd587[2042]);_0x5c29x2[_0xd587[171]](_0xd587[2043]);_0x5c29x2[_0xd587[171]](_0xd587[2044]);_0x5c29x2[_0xd587[171]](_0xd587[2045]);_0x5c29x2[_0xd587[171]](_0xd587[233]);null!= _0x5c29x3&& _0x5c29x2[_0xd587[171]](_0x5c29x3);_0x5c29x2[_0xd587[171]](_0xd587[2046])};mxPrintPreview[_0xd587[202]][_0xd587[2027]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[2018]][_0xd587[395]],_0x5c29x5=_0x5c29x4[_0xd587[55]](_0xd587[116]);_0x5c29x5[_0xd587[926]]= _0xd587[2047];_0x5c29x5[_0xd587[57]](_0xd587[467],_0xd587[468]);for(var _0x5c29x9=_0x5c29x4[_0xd587[55]](_0xd587[120]),_0x5c29xa=0;_0x5c29xa< _0x5c29x2;_0x5c29xa++){for(var _0x5c29x12=_0x5c29x4[_0xd587[55]](_0xd587[121]),_0x5c29x13=0;_0x5c29x13< _0x5c29x3;_0x5c29x13++){var _0x5c29x14=_0x5c29xa* _0x5c29x3+ _0x5c29x13+ 1,_0x5c29x15=_0x5c29x4[_0xd587[55]](_0xd587[122]);if(!mxClient[_0xd587[133]]|| mxClient[_0xd587[75]]|| mxClient[_0xd587[76]]){var _0x5c29x16=_0x5c29x4[_0xd587[55]](_0xd587[2048]);_0x5c29x16[_0xd587[57]](_0xd587[44],_0xd587[2049]+ _0x5c29x14);mxUtils[_0xd587[53]](_0x5c29x16,_0x5c29x14,_0x5c29x4);_0x5c29x15[_0xd587[62]](_0x5c29x16)}else {mxUtils[_0xd587[53]](_0x5c29x15,_0x5c29x14,_0x5c29x4)};_0x5c29x12[_0xd587[62]](_0x5c29x15)};_0x5c29x9[_0xd587[62]](_0x5c29x12)};_0x5c29x5[_0xd587[62]](_0x5c29x9);return _0x5c29x5};mxPrintPreview[_0xd587[202]][_0xd587[2034]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=document[_0xd587[55]](_0xd587[485]);try{_0x5c29x5[_0xd587[124]][_0xd587[117]]= _0x5c29x2+ _0xd587[168];_0x5c29x5[_0xd587[124]][_0xd587[119]]= _0x5c29x3+ _0xd587[168];_0x5c29x5[_0xd587[124]][_0xd587[277]]= _0xd587[188];_0x5c29x5[_0xd587[124]][_0xd587[2050]]= _0xd587[1824];_0x5c29x5[_0xd587[124]][_0xd587[491]]= _0xd587[1500];var _0x5c29x9=document[_0xd587[55]](_0xd587[485]);_0x5c29x9[_0xd587[124]][_0xd587[125]]= this[_0xd587[467]]+ _0xd587[168];_0x5c29x9[_0xd587[124]][_0xd587[361]]= this[_0xd587[467]]+ _0xd587[168];_0x5c29x9[_0xd587[124]][_0xd587[117]]= _0x5c29x2- 2* this[_0xd587[467]]+ _0xd587[168];_0x5c29x9[_0xd587[124]][_0xd587[119]]= _0x5c29x3- 2* this[_0xd587[467]]+ _0xd587[168];_0x5c29x9[_0xd587[124]][_0xd587[277]]= _0xd587[188];this[_0xd587[1179]][_0xd587[507]]== mxConstants[_0xd587[1523]]&& (_0x5c29x9[_0xd587[124]][_0xd587[491]]= _0xd587[492]);_0x5c29x5[_0xd587[62]](_0x5c29x9);document[_0xd587[112]][_0xd587[62]](_0x5c29x5);_0x5c29x4(_0x5c29x9)}catch(f){throw _0x5c29x5[_0xd587[265]][_0xd587[266]](_0x5c29x5),f};return _0x5c29x5};mxPrintPreview[_0xd587[202]][_0xd587[2033]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x5= this[_0xd587[1179]][_0xd587[249]]();var _0x5c29xa=this[_0xd587[1179]][_0xd587[526]];this[_0xd587[1179]][_0xd587[526]]= _0x5c29x9;var _0x5c29x12=_0x5c29x5[_0xd587[2051]](),_0x5c29x13=_0x5c29x5[_0xd587[2052]](),_0x5c29x14=_0x5c29x5[_0xd587[2024]](),_0x5c29x15=_0x5c29x5[_0xd587[1524]]();this[_0xd587[1179]][_0xd587[507]]== mxConstants[_0xd587[508]]?_0x5c29x5[_0xd587[1569]]():this[_0xd587[1179]][_0xd587[507]]== mxConstants[_0xd587[1523]]?_0x5c29x5[_0xd587[1571]]():_0x5c29x5[_0xd587[1570]]();var _0x5c29x16=_0x5c29x5[_0xd587[503]]();_0x5c29x5[_0xd587[504]](!1);var _0x5c29x17=this[_0xd587[1179]][_0xd587[994]]();this[_0xd587[1179]][_0xd587[995]](!1);var _0x5c29x18=_0x5c29x5[_0xd587[512]]();_0x5c29x5[_0xd587[513]]=  new mxPoint(_0x5c29x2,_0x5c29x3);_0x5c29x2= null;try{var _0x5c29x19=[this[_0xd587[1179]][_0xd587[502]]()[_0xd587[501]]()];_0x5c29x2=  new mxTemporaryCellStates(_0x5c29x5,_0x5c29x4,_0x5c29x19)}finally{if(mxClient[_0xd587[80]]){_0x5c29x5[_0xd587[506]][_0xd587[339]]= _0xd587[110]}else {for(_0x5c29x4= _0x5c29x9[_0xd587[285]];null!= _0x5c29x4;){_0x5c29x19= _0x5c29x4[_0xd587[287]],_0x5c29x3= _0x5c29x4[_0xd587[301]][_0xd587[216]](),_0xd587[571]== _0x5c29x3?(_0x5c29x4[_0xd587[57]](_0xd587[117],parseInt(_0x5c29x9[_0xd587[124]][_0xd587[117]])),_0x5c29x4[_0xd587[57]](_0xd587[119],parseInt(_0x5c29x9[_0xd587[124]][_0xd587[119]]))):_0xd587[583]!= _0x5c29x4[_0xd587[124]][_0xd587[270]]&& _0xd587[116]!= _0x5c29x3&& _0x5c29x4[_0xd587[265]][_0xd587[266]](_0x5c29x4),_0x5c29x4= _0x5c29x19}};_0x5c29x5[_0xd587[506]][_0xd587[265]][_0xd587[266]](_0x5c29x5[_0xd587[506]]);this[_0xd587[1179]][_0xd587[995]](_0x5c29x17);this[_0xd587[1179]][_0xd587[526]]= _0x5c29xa;_0x5c29x5[_0xd587[510]]= _0x5c29x12;_0x5c29x5[_0xd587[2053]]= _0x5c29x13;_0x5c29x5[_0xd587[505]]= _0x5c29x14;_0x5c29x5[_0xd587[506]]= _0x5c29x15;_0x5c29x5[_0xd587[513]]= _0x5c29x18;_0x5c29x2[_0xd587[515]]();_0x5c29x5[_0xd587[504]](_0x5c29x16)}};mxPrintPreview[_0xd587[202]][_0xd587[2031]]= function(){return null};mxPrintPreview[_0xd587[202]][_0xd587[2032]]= function(){return null};mxPrintPreview[_0xd587[202]][_0xd587[540]]= function(){var _0x5c29x2=this[_0xd587[392]]();null!= _0x5c29x2&& _0x5c29x2[_0xd587[540]]()};mxPrintPreview[_0xd587[202]][_0xd587[268]]= function(){null!= this[_0xd587[2018]]&& (this[_0xd587[2018]][_0xd587[268]](),this[_0xd587[2018]]= null)};function mxStylesheet(){this[_0xd587[2054]]= {};this[_0xd587[2056]](this[_0xd587[2055]]());this[_0xd587[2058]](this[_0xd587[2057]]())}mxStylesheet[_0xd587[202]][_0xd587[2055]]= function(){var _0x5c29x2={};_0x5c29x2[mxConstants[_0xd587[2059]]]= mxConstants[_0xd587[2060]];_0x5c29x2[mxConstants[_0xd587[2061]]]= mxPerimeter[_0xd587[2062]];_0x5c29x2[mxConstants[_0xd587[2063]]]= mxConstants[_0xd587[481]];_0x5c29x2[mxConstants[_0xd587[2064]]]= mxConstants[_0xd587[479]];_0x5c29x2[mxConstants[_0xd587[2065]]]= _0xd587[2066];_0x5c29x2[mxConstants[_0xd587[2067]]]= _0xd587[2068];_0x5c29x2[mxConstants[_0xd587[2069]]]= _0xd587[2070];return _0x5c29x2};mxStylesheet[_0xd587[202]][_0xd587[2057]]= function(){var _0x5c29x2={};_0x5c29x2[mxConstants[_0xd587[2059]]]= mxConstants[_0xd587[2071]];_0x5c29x2[mxConstants[_0xd587[1695]]]= mxConstants[_0xd587[1622]];_0x5c29x2[mxConstants[_0xd587[2063]]]= mxConstants[_0xd587[481]];_0x5c29x2[mxConstants[_0xd587[2064]]]= mxConstants[_0xd587[479]];_0x5c29x2[mxConstants[_0xd587[2067]]]= _0xd587[2068];_0x5c29x2[mxConstants[_0xd587[2069]]]= _0xd587[2072];return _0x5c29x2};mxStylesheet[_0xd587[202]][_0xd587[2056]]= function(_0x5c29x2){this[_0xd587[2074]](_0xd587[2073],_0x5c29x2)};mxStylesheet[_0xd587[202]][_0xd587[2058]]= function(_0x5c29x2){this[_0xd587[2074]](_0xd587[2075],_0x5c29x2)};mxStylesheet[_0xd587[202]][_0xd587[2076]]= function(){return this[_0xd587[2054]][_0xd587[2073]]};mxStylesheet[_0xd587[202]][_0xd587[2077]]= function(){return this[_0xd587[2054]][_0xd587[2075]]};mxStylesheet[_0xd587[202]][_0xd587[2074]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[2054]][_0x5c29x2]= _0x5c29x3};mxStylesheet[_0xd587[202]][_0xd587[1705]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=_0x5c29x3;if(null!= _0x5c29x2&& 0< _0x5c29x2[_0xd587[67]]){for(var _0x5c29x5=_0x5c29x2[_0xd587[224]](_0xd587[471]),_0x5c29x4=null!= _0x5c29x4&& _0xd587[471]!= _0x5c29x2[_0xd587[225]](0)?mxUtils[_0xd587[238]](_0x5c29x4):{},_0x5c29x9=0;_0x5c29x9< _0x5c29x5[_0xd587[67]];_0x5c29x9++){var _0x5c29xa=_0x5c29x5[_0x5c29x9],_0x5c29x12=_0x5c29xa[_0xd587[2]](_0xd587[226]);if(0<= _0x5c29x12){var _0x5c29x13=_0x5c29xa[_0xd587[85]](0,_0x5c29x12),_0x5c29xa=_0x5c29xa[_0xd587[85]](_0x5c29x12+ 1);_0x5c29xa== mxConstants[_0xd587[217]]? delete _0x5c29x4[_0x5c29x13]:mxUtils[_0xd587[1946]](_0x5c29xa)?_0x5c29x4[_0x5c29x13]= parseFloat(_0x5c29xa):_0x5c29x4[_0x5c29x13]= _0x5c29xa}else {if(_0x5c29xa= this[_0xd587[2054]][_0x5c29xa],null!= _0x5c29xa){for(_0x5c29x13 in _0x5c29xa){_0x5c29x4[_0x5c29x13]= _0x5c29xa[_0x5c29x13]}}}}};return _0x5c29x4};function mxCellState(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[441]]= _0x5c29x2;this[_0xd587[246]]= _0x5c29x3;this[_0xd587[124]]= _0x5c29x4;this[_0xd587[2078]]=  new mxPoint;this[_0xd587[2079]]=  new mxPoint}mxCellState[_0xd587[202]]=  new mxRectangle;mxCellState[_0xd587[202]][_0xd587[196]]= mxCellState;mxCellState[_0xd587[202]][_0xd587[441]]= null;mxCellState[_0xd587[202]][_0xd587[246]]= null;mxCellState[_0xd587[202]][_0xd587[124]]= null;mxCellState[_0xd587[202]][_0xd587[2080]]=  !0;mxCellState[_0xd587[202]][_0xd587[2081]]=  !1;mxCellState[_0xd587[202]][_0xd587[2082]]=  !1;mxCellState[_0xd587[202]][_0xd587[2078]]= null;mxCellState[_0xd587[202]][_0xd587[439]]= null;mxCellState[_0xd587[202]][_0xd587[2079]]= null;mxCellState[_0xd587[202]][_0xd587[2083]]= null;mxCellState[_0xd587[202]][_0xd587[2084]]= null;mxCellState[_0xd587[202]][_0xd587[2085]]= 0;mxCellState[_0xd587[202]][_0xd587[67]]= 0;mxCellState[_0xd587[202]][_0xd587[2086]]= null;mxCellState[_0xd587[202]][_0xd587[253]]= null;mxCellState[_0xd587[202]][_0xd587[963]]= null;mxCellState[_0xd587[202]][_0xd587[2087]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x2= _0x5c29x2|| 0;_0x5c29x3= null!= _0x5c29x3?_0x5c29x3: new mxRectangle(this[_0xd587[235]],this[_0xd587[236]],this[_0xd587[117]],this[_0xd587[119]]);if(null!= this[_0xd587[253]]&& null!= this[_0xd587[253]][_0xd587[1561]]){var _0x5c29x4=this[_0xd587[253]][_0xd587[1561]][_0xd587[1548]](this[_0xd587[124]],_0x5c29x3[_0xd587[235]],_0x5c29x3[_0xd587[236]],_0x5c29x3[_0xd587[117]],_0x5c29x3[_0xd587[119]]);_0x5c29x3[_0xd587[235]]= _0x5c29x4[_0xd587[235]];_0x5c29x3[_0xd587[236]]= _0x5c29x4[_0xd587[236]];_0x5c29x3[_0xd587[117]]= this[_0xd587[253]][_0xd587[1561]][_0xd587[1532]]* _0x5c29x4[_0xd587[117]];_0x5c29x3[_0xd587[119]]= this[_0xd587[253]][_0xd587[1561]][_0xd587[1533]]* _0x5c29x4[_0xd587[119]]};0!= _0x5c29x2&& _0x5c29x3[_0xd587[244]](_0x5c29x2);return _0x5c29x3};mxCellState[_0xd587[202]][_0xd587[2088]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3?(null== this[_0xd587[439]]&& (this[_0xd587[439]]= []),0== this[_0xd587[439]][_0xd587[67]]?this[_0xd587[439]][_0xd587[207]](_0x5c29x2):this[_0xd587[439]][0]= _0x5c29x2):null== this[_0xd587[439]]?(this[_0xd587[439]]= [],this[_0xd587[439]][_0xd587[207]](null),this[_0xd587[439]][_0xd587[207]](_0x5c29x2)):1== this[_0xd587[439]][_0xd587[67]]?this[_0xd587[439]][_0xd587[207]](_0x5c29x2):this[_0xd587[439]][this[_0xd587[439]][_0xd587[67]]- 1]= _0x5c29x2};mxCellState[_0xd587[202]][_0xd587[1609]]= function(_0x5c29x2){null!= this[_0xd587[253]]&& this[_0xd587[253]][_0xd587[1609]](_0x5c29x2);null!= this[_0xd587[963]]&& this[_0xd587[963]][_0xd587[1609]](_0x5c29x2)};mxCellState[_0xd587[202]][_0xd587[1710]]= function(_0x5c29x2){_0x5c29x2= this[_0xd587[2089]](_0x5c29x2);return null!= _0x5c29x2?_0x5c29x2[_0xd587[246]]:null};mxCellState[_0xd587[202]][_0xd587[2089]]= function(_0x5c29x2){return _0x5c29x2?this[_0xd587[2083]]:this[_0xd587[2084]]};mxCellState[_0xd587[202]][_0xd587[2090]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3?this[_0xd587[2083]]= _0x5c29x2:this[_0xd587[2084]]= _0x5c29x2};mxCellState[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[441]][_0xd587[1179]][_0xd587[259]][_0xd587[515]](this)};mxCellState[_0xd587[202]][_0xd587[238]]= function(){var _0x5c29x2= new mxCellState(this[_0xd587[441]],this[_0xd587[246]],this[_0xd587[124]]);if(null!= this[_0xd587[439]]){_0x5c29x2[_0xd587[439]]= [];for(var _0x5c29x3=0;_0x5c29x3< this[_0xd587[439]][_0xd587[67]];_0x5c29x3++){_0x5c29x2[_0xd587[439]][_0x5c29x3]= this[_0xd587[439]][_0x5c29x3][_0xd587[238]]()}};null!= this[_0xd587[2078]]&& (_0x5c29x2[_0xd587[2078]]= this[_0xd587[2078]][_0xd587[238]]());null!= this[_0xd587[2079]]&& (_0x5c29x2[_0xd587[2079]]= this[_0xd587[2079]][_0xd587[238]]());null!= this[_0xd587[1563]]&& (_0x5c29x2[_0xd587[1563]]= this[_0xd587[1563]][_0xd587[238]]());_0x5c29x2[_0xd587[2085]]= this[_0xd587[2085]];_0x5c29x2[_0xd587[2086]]= this[_0xd587[2086]];_0x5c29x2[_0xd587[67]]= this[_0xd587[67]];_0x5c29x2[_0xd587[235]]= this[_0xd587[235]];_0x5c29x2[_0xd587[236]]= this[_0xd587[236]];_0x5c29x2[_0xd587[117]]= this[_0xd587[117]];_0x5c29x2[_0xd587[119]]= this[_0xd587[119]];return _0x5c29x2};function mxGraphSelectionModel(_0x5c29x2){this[_0xd587[1179]]= _0x5c29x2;this[_0xd587[895]]= []}mxGraphSelectionModel[_0xd587[202]]=  new mxEventSource;mxGraphSelectionModel[_0xd587[202]][_0xd587[196]]= mxGraphSelectionModel;mxGraphSelectionModel[_0xd587[202]][_0xd587[2091]]= _0xd587[130]!= mxClient[_0xd587[90]]?_0xd587[819]:_0xd587[110];mxGraphSelectionModel[_0xd587[202]][_0xd587[2092]]= _0xd587[130]!= mxClient[_0xd587[90]]?_0xd587[2093]:_0xd587[110];mxGraphSelectionModel[_0xd587[202]][_0xd587[1179]]= null;mxGraphSelectionModel[_0xd587[202]][_0xd587[2094]]=  !1;mxGraphSelectionModel[_0xd587[202]][_0xd587[2095]]= function(){return this[_0xd587[2094]]};mxGraphSelectionModel[_0xd587[202]][_0xd587[2096]]= function(_0x5c29x2){this[_0xd587[2094]]= _0x5c29x2};mxGraphSelectionModel[_0xd587[202]][_0xd587[2097]]= function(_0x5c29x2){return null!= _0x5c29x2?0<= mxUtils[_0xd587[2]](this[_0xd587[895]],_0x5c29x2):!1};mxGraphSelectionModel[_0xd587[202]][_0xd587[1107]]= function(){return 0== this[_0xd587[895]][_0xd587[67]]};mxGraphSelectionModel[_0xd587[202]][_0xd587[200]]= function(){this[_0xd587[2098]](null,this[_0xd587[895]])};mxGraphSelectionModel[_0xd587[202]][_0xd587[2099]]= function(_0x5c29x2){null!= _0x5c29x2&& this[_0xd587[2100]]([_0x5c29x2])};mxGraphSelectionModel[_0xd587[202]][_0xd587[2100]]= function(_0x5c29x2){if(null!= _0x5c29x2){this[_0xd587[2094]]&& (_0x5c29x2= [this[_0xd587[2101]](_0x5c29x2)]);for(var _0x5c29x3=[],_0x5c29x4=0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){this[_0xd587[1179]][_0xd587[2102]](_0x5c29x2[_0x5c29x4])&& _0x5c29x3[_0xd587[207]](_0x5c29x2[_0x5c29x4])};this[_0xd587[2098]](_0x5c29x3,this[_0xd587[895]])}};mxGraphSelectionModel[_0xd587[202]][_0xd587[2101]]= function(_0x5c29x2){if(null!= _0x5c29x2){for(var _0x5c29x3=0;_0x5c29x3< _0x5c29x2[_0xd587[67]];_0x5c29x3++){if(this[_0xd587[1179]][_0xd587[2102]](_0x5c29x2[_0x5c29x3])){return _0x5c29x2[_0x5c29x3]}}};return null};mxGraphSelectionModel[_0xd587[202]][_0xd587[2103]]= function(_0x5c29x2){null!= _0x5c29x2&& this[_0xd587[832]]([_0x5c29x2])};mxGraphSelectionModel[_0xd587[202]][_0xd587[832]]= function(_0x5c29x2){if(null!= _0x5c29x2){var _0x5c29x3=null;this[_0xd587[2094]]&& (_0x5c29x3= this[_0xd587[895]],_0x5c29x2= [this[_0xd587[2101]](_0x5c29x2)]);for(var _0x5c29x4=[],_0x5c29x5=0;_0x5c29x5< _0x5c29x2[_0xd587[67]];_0x5c29x5++){!this[_0xd587[2097]](_0x5c29x2[_0x5c29x5])&& this[_0xd587[1179]][_0xd587[2102]](_0x5c29x2[_0x5c29x5])&& _0x5c29x4[_0xd587[207]](_0x5c29x2[_0x5c29x5])};this[_0xd587[2098]](_0x5c29x4,_0x5c29x3)}};mxGraphSelectionModel[_0xd587[202]][_0xd587[2104]]= function(_0x5c29x2){null!= _0x5c29x2&& this[_0xd587[842]]([_0x5c29x2])};mxGraphSelectionModel[_0xd587[202]][_0xd587[842]]= function(_0x5c29x2){if(null!= _0x5c29x2){for(var _0x5c29x3=[],_0x5c29x4=0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){this[_0xd587[2097]](_0x5c29x2[_0x5c29x4])&& _0x5c29x3[_0xd587[207]](_0x5c29x2[_0x5c29x4])};this[_0xd587[2098]](null,_0x5c29x3)}};mxGraphSelectionModel[_0xd587[202]][_0xd587[2098]]= function(_0x5c29x2,_0x5c29x3){if(null!= _0x5c29x2&& 0< _0x5c29x2[_0xd587[67]]&& null!= _0x5c29x2[0]|| null!= _0x5c29x3&& 0< _0x5c29x3[_0xd587[67]]&& null!= _0x5c29x3[0]){var _0x5c29x4= new mxSelectionChange(this,_0x5c29x2,_0x5c29x3);_0x5c29x4[_0xd587[350]]();var _0x5c29x5= new mxUndoableEdit(this,!1);_0x5c29x5[_0xd587[99]](_0x5c29x4);this[_0xd587[746]]( new mxEventObject(mxEvent.UNDO,_0xd587[1061],_0x5c29x5))}};mxGraphSelectionModel[_0xd587[202]][_0xd587[1941]]= function(_0x5c29x2){null!= _0x5c29x2&& !this[_0xd587[2097]](_0x5c29x2)&& this[_0xd587[895]][_0xd587[207]](_0x5c29x2)};mxGraphSelectionModel[_0xd587[202]][_0xd587[1102]]= function(_0x5c29x2){null!= _0x5c29x2&& (_0x5c29x2= mxUtils[_0xd587[2]](this[_0xd587[895]],_0x5c29x2),0<= _0x5c29x2&& this[_0xd587[895]][_0xd587[300]](_0x5c29x2,1))};function mxSelectionChange(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[2105]]= _0x5c29x2;this[_0xd587[2106]]= null!= _0x5c29x3?_0x5c29x3[_0xd587[1853]]():null;this[_0xd587[2107]]= null!= _0x5c29x4?_0x5c29x4[_0xd587[1853]]():null}mxSelectionChange[_0xd587[202]][_0xd587[350]]= function(){var _0x5c29x2=mxLog[_0xd587[2109]](_0xd587[2108]);window[_0xd587[879]]= mxResources[_0xd587[203]](this[_0xd587[2105]][_0xd587[2092]])|| this[_0xd587[2105]][_0xd587[2092]];if(null!= this[_0xd587[2107]]){for(var _0x5c29x3=0;_0x5c29x3< this[_0xd587[2107]][_0xd587[67]];_0x5c29x3++){this[_0xd587[2105]][_0xd587[1102]](this[_0xd587[2107]][_0x5c29x3])}};if(null!= this[_0xd587[2106]]){for(_0x5c29x3= 0;_0x5c29x3< this[_0xd587[2106]][_0xd587[67]];_0x5c29x3++){this[_0xd587[2105]][_0xd587[1941]](this[_0xd587[2106]][_0x5c29x3])}};_0x5c29x3= this[_0xd587[2106]];this[_0xd587[2106]]= this[_0xd587[2107]];this[_0xd587[2107]]= _0x5c29x3;window[_0xd587[879]]= mxResources[_0xd587[203]](this[_0xd587[2105]][_0xd587[2091]])|| this[_0xd587[2105]][_0xd587[2091]];mxLog[_0xd587[2110]](_0xd587[2108],_0x5c29x2);this[_0xd587[2105]][_0xd587[746]]( new mxEventObject(mxEvent.CHANGE,_0xd587[2106],this[_0xd587[2106]],_0xd587[2107],this[_0xd587[2107]]))};function mxCellEditor(_0x5c29x2){this[_0xd587[1179]]= _0x5c29x2}mxCellEditor[_0xd587[202]][_0xd587[1179]]= null;mxCellEditor[_0xd587[202]][_0xd587[126]]= null;mxCellEditor[_0xd587[202]][_0xd587[2111]]= null;mxCellEditor[_0xd587[202]][_0xd587[2112]]= null;mxCellEditor[_0xd587[202]][_0xd587[2113]]=  !1;mxCellEditor[_0xd587[202]][_0xd587[2114]]=  !0;mxCellEditor[_0xd587[202]][_0xd587[2115]]= _0xd587[110];mxCellEditor[_0xd587[202]][_0xd587[2116]]= _0xd587[110];mxCellEditor[_0xd587[202]][_0xd587[176]]= function(){this[_0xd587[126]]= document[_0xd587[55]](_0xd587[126]);this[_0xd587[126]][_0xd587[926]]= _0xd587[2117];this[_0xd587[126]][_0xd587[124]][_0xd587[491]]= _0xd587[492];this[_0xd587[126]][_0xd587[124]][_0xd587[277]]= _0xd587[189];this[_0xd587[126]][_0xd587[57]](_0xd587[2118],_0xd587[2119]);this[_0xd587[126]][_0xd587[57]](_0xd587[969],_0xd587[2120]);mxClient[_0xd587[133]]&& (this[_0xd587[126]][_0xd587[124]][_0xd587[129]]= _0xd587[130]);mxEvent[_0xd587[169]](this[_0xd587[126]],_0xd587[2121],mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[2122]]()}));mxEvent[_0xd587[169]](this[_0xd587[126]],_0xd587[2123],mxUtils[_0xd587[885]](this,function(_0x5c29x2){mxEvent[_0xd587[721]](_0x5c29x2)|| (113== _0x5c29x2[_0xd587[2124]]|| this[_0xd587[1179]][_0xd587[2125]]()&& 13== _0x5c29x2[_0xd587[2124]]&& !mxEvent[_0xd587[775]](_0x5c29x2)&& !mxEvent[_0xd587[774]](_0x5c29x2)?(this[_0xd587[1179]][_0xd587[2126]](!1),mxEvent[_0xd587[722]](_0x5c29x2)):27== _0x5c29x2[_0xd587[2124]]?(this[_0xd587[1179]][_0xd587[2126]](!0),mxEvent[_0xd587[722]](_0x5c29x2)):(this[_0xd587[2127]]&& (this[_0xd587[2127]]=  !1,this[_0xd587[126]][_0xd587[131]]= _0xd587[110]),this[_0xd587[2128]](!0)))}));mxEvent[_0xd587[169]](this[_0xd587[126]],_0xd587[2129],mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[2114]]&& !mxEvent[_0xd587[721]](_0x5c29x2)&& setTimeout(mxUtils[_0xd587[885]](this,function(){this[_0xd587[129]]()}),0)}))};mxCellEditor[_0xd587[202]][_0xd587[129]]= function(){if(null!= this[_0xd587[1653]]){var _0x5c29x2=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[248]](this[_0xd587[2111]]),_0x5c29x3=this[_0xd587[1179]][_0xd587[2130]](_0x5c29x2[_0xd587[246]]),_0x5c29x4=this[_0xd587[1179]][_0xd587[2131]](_0x5c29x2[_0xd587[246]]);if(this[_0xd587[1179]][_0xd587[502]]()[_0xd587[250]](_0x5c29x2[_0xd587[246]])){this[_0xd587[1562]][_0xd587[235]]= _0x5c29x2[_0xd587[2079]][_0xd587[235]],this[_0xd587[1562]][_0xd587[236]]= _0x5c29x2[_0xd587[2079]][_0xd587[236]],this[_0xd587[1562]][_0xd587[117]]= 0,this[_0xd587[1562]][_0xd587[119]]= 0}else {if(null!= this[_0xd587[1562]]){this[_0xd587[1562]][_0xd587[235]]= _0x5c29x2[_0xd587[235]];this[_0xd587[1562]][_0xd587[236]]= _0x5c29x2[_0xd587[236]];this[_0xd587[1562]][_0xd587[117]]= _0x5c29x2[_0xd587[117]];this[_0xd587[1562]][_0xd587[119]]= _0x5c29x2[_0xd587[119]];var _0x5c29x5=mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);_0x5c29x5== mxConstants[_0xd587[2132]]?this[_0xd587[1562]][_0xd587[235]]-= _0x5c29x2[_0xd587[117]]:_0x5c29x5== mxConstants[_0xd587[480]]&& (this[_0xd587[1562]][_0xd587[235]]+= _0x5c29x2[_0xd587[117]]);_0x5c29x5= mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);_0x5c29x5== mxConstants[_0xd587[1687]]?this[_0xd587[1562]][_0xd587[236]]-= _0x5c29x2[_0xd587[119]]:_0x5c29x5== mxConstants[_0xd587[482]]&& (this[_0xd587[1562]][_0xd587[236]]+= _0x5c29x2[_0xd587[119]])}};_0x5c29x5= this[_0xd587[126]][_0xd587[131]];if(_0xd587[192]== _0x5c29x5[_0xd587[225]](_0x5c29x5[_0xd587[67]]- 1)|| _0xd587[110]== _0x5c29x5){_0x5c29x5+= _0xd587[544]};_0x5c29x5= mxUtils[_0xd587[321]](_0x5c29x5,!1);_0x5c29x4?(this[_0xd587[1653]][_0xd587[124]][_0xd587[493]]= _0xd587[1502],this[_0xd587[1653]][_0xd587[124]][_0xd587[117]]= this[_0xd587[1562]][_0xd587[117]]+ _0xd587[168]):_0x5c29x5= _0x5c29x5[_0xd587[230]](/ /g,_0xd587[544]);_0x5c29x5= _0x5c29x5[_0xd587[230]](/\n/g,_0xd587[1453]);this[_0xd587[1653]][_0xd587[339]]= _0x5c29x5;var _0x5c29x5=this[_0xd587[1653]][_0xd587[359]]+ 30,_0x5c29x9=this[_0xd587[1653]][_0xd587[167]]+ 16,_0x5c29x5=Math[_0xd587[160]](_0x5c29x5,40),_0x5c29x9=Math[_0xd587[160]](_0x5c29x9,20);_0x5c29x3&& (_0x5c29x5= Math[_0xd587[243]](this[_0xd587[1562]][_0xd587[117]]- 4,_0x5c29x5),_0x5c29x9= Math[_0xd587[243]](this[_0xd587[1562]][_0xd587[119]],_0x5c29x9));var _0x5c29xa=null!= _0x5c29x2[_0xd587[963]]?_0x5c29x2[_0xd587[963]][_0xd587[1655]]:null;null== _0x5c29xa&& (_0x5c29xa= mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),_0x5c29x2= mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),_0x5c29xa= mxUtils[_0xd587[1501]](_0x5c29xa,_0x5c29x2));if(null!= _0x5c29xa){if(_0x5c29x3||  !_0x5c29x4){this[_0xd587[126]][_0xd587[124]][_0xd587[361]]= Math[_0xd587[160]](0,Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[235]]- _0x5c29xa[_0xd587[235]]* this[_0xd587[1562]][_0xd587[117]]+ _0x5c29xa[_0xd587[235]]* _0x5c29x5)- 3)+ _0xd587[168]};this[_0xd587[126]][_0xd587[124]][_0xd587[125]]= Math[_0xd587[160]](0,Math[_0xd587[488]](this[_0xd587[1562]][_0xd587[236]]- _0x5c29xa[_0xd587[236]]* this[_0xd587[1562]][_0xd587[119]]+ _0x5c29xa[_0xd587[236]]* _0x5c29x9)+ 4)+ _0xd587[168]};if(_0x5c29x3||  !_0x5c29x4){this[_0xd587[126]][_0xd587[124]][_0xd587[117]]= _0x5c29x5+ _0xd587[168]};this[_0xd587[126]][_0xd587[124]][_0xd587[119]]= _0x5c29x9+ _0xd587[168]}};mxCellEditor[_0xd587[202]][_0xd587[2133]]= function(){return this[_0xd587[2113]]};mxCellEditor[_0xd587[202]][_0xd587[2128]]= function(_0x5c29x2){this[_0xd587[2113]]= _0x5c29x2};mxCellEditor[_0xd587[202]][_0xd587[2122]]= function(){this[_0xd587[2126]](!this[_0xd587[1179]][_0xd587[2134]]())};mxCellEditor[_0xd587[202]][_0xd587[855]]= function(_0x5c29x2,_0x5c29x3){null== this[_0xd587[126]]&& this[_0xd587[176]]();this[_0xd587[2126]](!0);var _0x5c29x4=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[248]](_0x5c29x2);if(null!= _0x5c29x4){this[_0xd587[2111]]= _0x5c29x2;this[_0xd587[2112]]= _0x5c29x3;this[_0xd587[2116]]= null;null!= _0x5c29x4[_0xd587[963]]&& this[_0xd587[2135]](_0x5c29x4)&& (this[_0xd587[2116]]= _0x5c29x4[_0xd587[963]][_0xd587[252]],this[_0xd587[2116]][_0xd587[124]][_0xd587[187]]= _0xd587[188]);var _0x5c29x5=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[255]],_0x5c29x5=mxUtils[_0xd587[433]](_0x5c29x4[_0xd587[124]],mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE)* _0x5c29x5,_0x5c29x9=mxUtils[_0xd587[433]](_0x5c29x4[_0xd587[124]],mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),_0x5c29xa=mxUtils[_0xd587[433]](_0x5c29x4[_0xd587[124]],mxConstants.STYLE_FONTCOLOR,_0xd587[586]),_0x5c29x12=mxUtils[_0xd587[433]](_0x5c29x4[_0xd587[124]],mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),_0x5c29x13=(mxUtils[_0xd587[433]](_0x5c29x4[_0xd587[124]],mxConstants.STYLE_FONTSTYLE,0)& mxConstants[_0xd587[1410]])== mxConstants[_0xd587[1410]],_0x5c29x14=(mxUtils[_0xd587[433]](_0x5c29x4[_0xd587[124]],mxConstants.STYLE_FONTSTYLE,0)& mxConstants[_0xd587[1412]])== mxConstants[_0xd587[1412]],_0x5c29x15=(mxUtils[_0xd587[433]](_0x5c29x4[_0xd587[124]],mxConstants.STYLE_FONTSTYLE,0)& mxConstants[_0xd587[1414]])== mxConstants[_0xd587[1414]];this[_0xd587[126]][_0xd587[124]][_0xd587[487]]= Math[_0xd587[488]](_0x5c29x5)+ _0xd587[168];this[_0xd587[126]][_0xd587[124]][_0xd587[489]]= Math[_0xd587[488]](_0x5c29x5* mxConstants[_0xd587[490]])+ _0xd587[168];this[_0xd587[126]][_0xd587[124]][_0xd587[486]]= _0x5c29x9;this[_0xd587[126]][_0xd587[124]][_0xd587[1165]]= _0x5c29x12;this[_0xd587[126]][_0xd587[124]][_0xd587[352]]= _0x5c29xa;this[_0xd587[126]][_0xd587[124]][_0xd587[1452]]= _0x5c29x13?_0xd587[1447]:_0xd587[1502];this[_0xd587[126]][_0xd587[124]][_0xd587[666]]= _0x5c29x14?_0xd587[1449]:_0xd587[110];this[_0xd587[126]][_0xd587[124]][_0xd587[354]]= _0x5c29x15?_0xd587[355]:_0xd587[110];this[_0xd587[126]][_0xd587[124]][_0xd587[277]]= _0xd587[278];this[_0xd587[126]][_0xd587[124]][_0xd587[2136]]= _0xd587[130];this[_0xd587[1562]]= _0x5c29x5= this[_0xd587[2137]](_0x5c29x4);this[_0xd587[126]][_0xd587[124]][_0xd587[361]]= _0x5c29x5[_0xd587[235]]+ _0xd587[168];this[_0xd587[126]][_0xd587[124]][_0xd587[125]]= _0x5c29x5[_0xd587[236]]+ _0xd587[168];this[_0xd587[126]][_0xd587[124]][_0xd587[117]]= _0x5c29x5[_0xd587[117]]+ _0xd587[168];this[_0xd587[126]][_0xd587[124]][_0xd587[119]]= _0x5c29x5[_0xd587[119]]+ _0xd587[168];this[_0xd587[126]][_0xd587[124]][_0xd587[931]]= 5;_0x5c29x4= this[_0xd587[2138]](_0x5c29x4,_0x5c29x3);null== _0x5c29x4|| 0== _0x5c29x4[_0xd587[67]]?(_0x5c29x4= this[_0xd587[2139]](),this[_0xd587[2127]]=  !0):this[_0xd587[2127]]=  !1;this[_0xd587[2128]](!1);this[_0xd587[126]][_0xd587[131]]= _0x5c29x4;this[_0xd587[1179]][_0xd587[526]][_0xd587[62]](this[_0xd587[126]]);_0xd587[130]!= this[_0xd587[126]][_0xd587[124]][_0xd587[495]]&& (this[_0xd587[2114]]&& (this[_0xd587[1653]]= this[_0xd587[2140]](),document[_0xd587[112]][_0xd587[62]](this[_0xd587[1653]]),this[_0xd587[129]]()),this[_0xd587[126]][_0xd587[393]](),this[_0xd587[126]][_0xd587[804]]())}};mxCellEditor[_0xd587[202]][_0xd587[2140]]= function(){var _0x5c29x2=document[_0xd587[55]](_0xd587[485]),_0x5c29x3=_0x5c29x2[_0xd587[124]];_0x5c29x3[_0xd587[491]]= _0xd587[492];_0x5c29x3[_0xd587[493]]= _0xd587[494];_0x5c29x3[_0xd587[187]]= _0xd587[188];_0x5c29x3[_0xd587[495]]= mxClient[_0xd587[496]]?_0xd587[497]:_0xd587[498];_0x5c29x3[_0xd587[499]]= _0xd587[500];_0x5c29x3[_0xd587[123]]= _0xd587[125];_0x5c29x3[_0xd587[489]]= this[_0xd587[126]][_0xd587[124]][_0xd587[489]];_0x5c29x3[_0xd587[487]]= this[_0xd587[126]][_0xd587[124]][_0xd587[487]];_0x5c29x3[_0xd587[486]]= this[_0xd587[126]][_0xd587[124]][_0xd587[486]];_0x5c29x3[_0xd587[1452]]= this[_0xd587[126]][_0xd587[124]][_0xd587[1452]];_0x5c29x3[_0xd587[1165]]= this[_0xd587[126]][_0xd587[124]][_0xd587[1165]];_0x5c29x3[_0xd587[666]]= this[_0xd587[126]][_0xd587[124]][_0xd587[666]];_0x5c29x3[_0xd587[354]]= this[_0xd587[126]][_0xd587[124]][_0xd587[354]];return _0x5c29x2};mxCellEditor[_0xd587[202]][_0xd587[2126]]= function(_0x5c29x2){null!= this[_0xd587[2111]]&& (null!= this[_0xd587[2116]]&& (this[_0xd587[2116]][_0xd587[124]][_0xd587[187]]= _0xd587[189],this[_0xd587[2116]]= null),!_0x5c29x2&& this[_0xd587[2133]]()&& this[_0xd587[1179]][_0xd587[850]](this[_0xd587[2111]],this[_0xd587[2141]](),this[_0xd587[2112]]),null!= this[_0xd587[1653]]&& (document[_0xd587[112]][_0xd587[266]](this[_0xd587[1653]]),this[_0xd587[1653]]= null),this[_0xd587[1562]]= this[_0xd587[2112]]= this[_0xd587[2111]]= null,this[_0xd587[126]][_0xd587[2121]](),this[_0xd587[126]][_0xd587[265]][_0xd587[266]](this[_0xd587[126]]))};mxCellEditor[_0xd587[202]][_0xd587[2138]]= function(_0x5c29x2,_0x5c29x3){return this[_0xd587[1179]][_0xd587[2142]](_0x5c29x2[_0xd587[246]],_0x5c29x3)};mxCellEditor[_0xd587[202]][_0xd587[2141]]= function(){return this[_0xd587[126]][_0xd587[131]][_0xd587[230]](/\r/g,_0xd587[110])};mxCellEditor[_0xd587[202]][_0xd587[2135]]= function(_0x5c29x2){return !0};mxCellEditor[_0xd587[202]][_0xd587[939]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[255]];return  new mxRectangle(0,0,null== _0x5c29x2[_0xd587[963]]?30:_0x5c29x2[_0xd587[963]][_0xd587[803]]* _0x5c29x3+ 20,_0xd587[361]== this[_0xd587[126]][_0xd587[124]][_0xd587[1165]]?120:40)};mxCellEditor[_0xd587[202]][_0xd587[2137]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1179]][_0xd587[502]]()[_0xd587[250]](_0x5c29x2[_0xd587[246]]),_0x5c29x4=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[255]],_0x5c29x5=this[_0xd587[939]](_0x5c29x2),_0x5c29x9=_0x5c29x5[_0xd587[117]],_0x5c29x5=_0x5c29x5[_0xd587[119]],_0x5c29xa=parseInt(_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2143]]]|| 2)* _0x5c29x4,_0x5c29x12=parseInt(_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2144]]]|| 0)* _0x5c29x4+ _0x5c29xa,_0x5c29x13=parseInt(_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2145]]]|| 0)* _0x5c29x4+ _0x5c29xa,_0x5c29x14=parseInt(_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2146]]]|| 0)* _0x5c29x4+ _0x5c29xa,_0x5c29x4=parseInt(_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2147]]]|| 0)* _0x5c29x4+ _0x5c29xa,_0x5c29x13= new mxRectangle(_0x5c29x2[_0xd587[235]],_0x5c29x2[_0xd587[236]],Math[_0xd587[160]](_0x5c29x9,_0x5c29x2[_0xd587[117]]- _0x5c29x4- _0x5c29x13),Math[_0xd587[160]](_0x5c29x5,_0x5c29x2[_0xd587[119]]- _0x5c29x12- _0x5c29x14));_0x5c29x3?(_0x5c29x13[_0xd587[235]]= _0x5c29x2[_0xd587[2079]][_0xd587[235]],_0x5c29x13[_0xd587[236]]= _0x5c29x2[_0xd587[2079]][_0xd587[236]],null!= _0x5c29x2[_0xd587[963]]&& null!= _0x5c29x2[_0xd587[963]][_0xd587[1563]]&& (0< _0x5c29x2[_0xd587[963]][_0xd587[1563]][_0xd587[235]]&& (_0x5c29x13[_0xd587[235]]= _0x5c29x2[_0xd587[963]][_0xd587[1563]][_0xd587[235]]),0< _0x5c29x2[_0xd587[963]][_0xd587[1563]][_0xd587[236]]&& (_0x5c29x13[_0xd587[236]]= _0x5c29x2[_0xd587[963]][_0xd587[1563]][_0xd587[236]]))):null!= _0x5c29x2[_0xd587[963]]&& null!= _0x5c29x2[_0xd587[963]][_0xd587[1563]]&& (_0x5c29x13[_0xd587[235]]= Math[_0xd587[243]](_0x5c29x13[_0xd587[235]],_0x5c29x2[_0xd587[963]][_0xd587[1563]][_0xd587[235]]),_0x5c29x13[_0xd587[236]]= Math[_0xd587[243]](_0x5c29x13[_0xd587[236]],_0x5c29x2[_0xd587[963]][_0xd587[1563]][_0xd587[236]]));_0x5c29x13[_0xd587[235]]+= _0x5c29x4;_0x5c29x13[_0xd587[236]]+= _0x5c29x12;null!= _0x5c29x2[_0xd587[963]]&& null!= _0x5c29x2[_0xd587[963]][_0xd587[1563]]&& (_0x5c29x3?(_0x5c29x13[_0xd587[117]]= Math[_0xd587[160]](_0x5c29x9,_0x5c29x2[_0xd587[963]][_0xd587[1563]][_0xd587[117]]),_0x5c29x13[_0xd587[119]]= Math[_0xd587[160]](_0x5c29x5,_0x5c29x2[_0xd587[963]][_0xd587[1563]][_0xd587[119]])):(_0x5c29x13[_0xd587[117]]= Math[_0xd587[160]](_0x5c29x13[_0xd587[117]],_0x5c29x2[_0xd587[963]][_0xd587[1563]][_0xd587[117]]),_0x5c29x13[_0xd587[119]]= Math[_0xd587[160]](_0x5c29x13[_0xd587[119]],_0x5c29x2[_0xd587[963]][_0xd587[1563]][_0xd587[119]])));this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1193]](_0x5c29x2[_0xd587[246]])&& (_0x5c29x3= mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER),_0x5c29x3== mxConstants[_0xd587[2132]]?_0x5c29x13[_0xd587[235]]-= _0x5c29x2[_0xd587[117]]:_0x5c29x3== mxConstants[_0xd587[480]]&& (_0x5c29x13[_0xd587[235]]+= _0x5c29x2[_0xd587[117]]),_0x5c29x3= mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE),_0x5c29x3== mxConstants[_0xd587[1687]]?_0x5c29x13[_0xd587[236]]-= _0x5c29x2[_0xd587[119]]:_0x5c29x3== mxConstants[_0xd587[482]]&& (_0x5c29x13[_0xd587[236]]+= _0x5c29x2[_0xd587[119]]));return _0x5c29x13};mxCellEditor[_0xd587[202]][_0xd587[2139]]= function(_0x5c29x2){return this[_0xd587[2115]]};mxCellEditor[_0xd587[202]][_0xd587[2148]]= function(){return this[_0xd587[2111]]};mxCellEditor[_0xd587[202]][_0xd587[515]]= function(){null!= this[_0xd587[126]]&& (mxEvent[_0xd587[762]](this[_0xd587[126]]),null!= this[_0xd587[126]][_0xd587[265]]&& this[_0xd587[126]][_0xd587[265]][_0xd587[266]](this[_0xd587[126]]),this[_0xd587[126]]= null)};function mxCellRenderer(){}mxCellRenderer[_0xd587[202]][_0xd587[2149]]= mxConnector;mxCellRenderer[_0xd587[202]][_0xd587[2150]]= mxRectangleShape;mxCellRenderer[_0xd587[202]][_0xd587[2151]]= mxText;mxCellRenderer[_0xd587[202]][_0xd587[2152]]=  !0;mxCellRenderer[_0xd587[202]][_0xd587[2153]]= {};mxCellRenderer[_0xd587[2154]]= function(_0x5c29x2,_0x5c29x3){mxCellRenderer[_0xd587[202]][_0xd587[2153]][_0x5c29x2]= _0x5c29x3};mxCellRenderer[_0xd587[2154]](mxConstants.SHAPE_RECTANGLE,mxRectangleShape);mxCellRenderer[_0xd587[2154]](mxConstants.SHAPE_ELLIPSE,mxEllipse);mxCellRenderer[_0xd587[2154]](mxConstants.SHAPE_RHOMBUS,mxRhombus);mxCellRenderer[_0xd587[2154]](mxConstants.SHAPE_CYLINDER,mxCylinder);mxCellRenderer[_0xd587[2154]](mxConstants.SHAPE_CONNECTOR,mxConnector);mxCellRenderer[_0xd587[2154]](mxConstants.SHAPE_ACTOR,mxActor);mxCellRenderer[_0xd587[2154]](mxConstants.SHAPE_TRIANGLE,mxTriangle);mxCellRenderer[_0xd587[2154]](mxConstants.SHAPE_HEXAGON,mxHexagon);mxCellRenderer[_0xd587[2154]](mxConstants.SHAPE_CLOUD,mxCloud);mxCellRenderer[_0xd587[2154]](mxConstants.SHAPE_LINE,mxLine);mxCellRenderer[_0xd587[2154]](mxConstants.SHAPE_ARROW,mxArrow);mxCellRenderer[_0xd587[2154]](mxConstants.SHAPE_DOUBLE_ELLIPSE,mxDoubleEllipse);mxCellRenderer[_0xd587[2154]](mxConstants.SHAPE_SWIMLANE,mxSwimlane);mxCellRenderer[_0xd587[2154]](mxConstants.SHAPE_IMAGE,mxImageShape);mxCellRenderer[_0xd587[2154]](mxConstants.SHAPE_LABEL,mxLabel);mxCellRenderer[_0xd587[202]][_0xd587[2155]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=_0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[502]]();if(null!= _0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[526]]&& null== _0x5c29x2[_0xd587[253]]&& _0x5c29x2[_0xd587[246]]!= _0x5c29x2[_0xd587[441]][_0xd587[1741]]&& (_0x5c29x4[_0xd587[1193]](_0x5c29x2[_0xd587[246]])|| _0x5c29x4[_0xd587[250]](_0x5c29x2[_0xd587[246]]))){if(this[_0xd587[2156]](_0x5c29x2),null!= _0x5c29x2[_0xd587[253]]&& (null== _0x5c29x3|| _0x5c29x3)){this[_0xd587[2157]](_0x5c29x2),_0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[2158]]|| _0x5c29x4[_0xd587[250]](_0x5c29x2[_0xd587[246]])?_0x5c29x2[_0xd587[2081]]=  !0:_0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[2159]]&& null!= this[_0xd587[2160]]&& (this[_0xd587[2160]][_0xd587[265]]== _0x5c29x2[_0xd587[253]][_0xd587[252]][_0xd587[265]]?this[_0xd587[2161]](_0x5c29x2,this[_0xd587[2160]]):this[_0xd587[2160]]= null),_0x5c29x2[_0xd587[253]][_0xd587[255]]= _0x5c29x2[_0xd587[441]][_0xd587[255]],this[_0xd587[2162]](_0x5c29x2),this[_0xd587[2163]](_0x5c29x2)}}};mxCellRenderer[_0xd587[202]][_0xd587[2157]]= function(_0x5c29x2){_0x5c29x2[_0xd587[253]][_0xd587[176]](_0x5c29x2[_0xd587[441]][_0xd587[2024]]())};mxCellRenderer[_0xd587[202]][_0xd587[2164]]= function(_0x5c29x2,_0x5c29x3){for(var _0x5c29x4=null,_0x5c29x5=_0x5c29x2[_0xd587[441]][_0xd587[1179]],_0x5c29x9=_0x5c29x5[_0xd587[502]](),_0x5c29xa=_0x5c29x2[_0xd587[246]],_0x5c29x12=_0x5c29x9[_0xd587[1197]](_0x5c29xa);null!= _0x5c29x12&& null== _0x5c29x4;){_0x5c29x4= this[_0xd587[2165]](_0x5c29x5,_0x5c29x12,_0x5c29xa,_0x5c29x3),_0x5c29xa= _0x5c29x12,_0x5c29x12= _0x5c29x9[_0xd587[1197]](_0x5c29xa)};return _0x5c29x4};mxCellRenderer[_0xd587[202]][_0xd587[2165]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=null,_0x5c29xa=_0x5c29x2[_0xd587[502]]();for(_0x5c29x4= null!= _0x5c29x4?_0x5c29x3[_0xd587[1738]](_0x5c29x4)- 1:_0x5c29xa[_0xd587[262]](_0x5c29x3)- 1;0<= _0x5c29x4&& null== _0x5c29x9;_0x5c29x4--){_0x5c29x9= this[_0xd587[2165]](_0x5c29x2,_0x5c29xa[_0xd587[263]](_0x5c29x3,_0x5c29x4),null,_0x5c29x5)};if(null== _0x5c29x9&& (_0x5c29x9= _0x5c29x2[_0xd587[441]][_0xd587[248]](_0x5c29x3),null!= _0x5c29x9&& (null== _0x5c29x9[_0xd587[253]]|| null== _0x5c29x9[_0xd587[253]][_0xd587[252]]|| _0x5c29x9[_0xd587[253]][_0xd587[252]][_0xd587[265]]!= _0x5c29x5))){_0x5c29x9= null};return _0x5c29x9};mxCellRenderer[_0xd587[202]][_0xd587[2166]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[253]][_0xd587[252]][_0xd587[265]],_0x5c29x4=this[_0xd587[2164]](_0x5c29x2,_0x5c29x3),_0x5c29x5=_0x5c29x3[_0xd587[285]];null!= _0x5c29x4&& (_0x5c29x5= _0x5c29x4[_0xd587[253]][_0xd587[252]],null!= _0x5c29x4[_0xd587[963]]&& (null!= _0x5c29x4[_0xd587[963]][_0xd587[252]]&& _0x5c29x4[_0xd587[963]][_0xd587[252]][_0xd587[265]]== _0x5c29x3)&& (_0x5c29x5= _0x5c29x4[_0xd587[963]][_0xd587[252]]),_0x5c29x5= _0x5c29x5[_0xd587[287]]);this[_0xd587[2161]](_0x5c29x2,_0x5c29x5)};mxCellRenderer[_0xd587[202]][_0xd587[2167]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[441]],_0x5c29x4=_0x5c29x3[_0xd587[1179]][_0xd587[502]]();if(_0x5c29x3[_0xd587[1179]][_0xd587[2159]]){if(null== this[_0xd587[2160]]|| null== this[_0xd587[2160]][_0xd587[265]]|| this[_0xd587[2160]][_0xd587[265]]!= _0x5c29x2[_0xd587[253]][_0xd587[252]][_0xd587[265]]){this[_0xd587[2160]]= _0x5c29x2[_0xd587[253]][_0xd587[252]]}}else {if(_0x5c29x3[_0xd587[1179]][_0xd587[2168]]){var _0x5c29x5=_0x5c29x2[_0xd587[253]][_0xd587[252]],_0x5c29x9=_0x5c29x5[_0xd587[265]],_0x5c29x4=_0x5c29x4[_0xd587[1197]](_0x5c29x2[_0xd587[246]]),_0x5c29x3=_0x5c29x3[_0xd587[248]](_0x5c29x4),_0x5c29x9=null!= _0x5c29x3&& null!= _0x5c29x3[_0xd587[253]]&& null!= _0x5c29x3[_0xd587[253]][_0xd587[252]]?_0x5c29x3[_0xd587[253]][_0xd587[252]][_0xd587[287]]:_0x5c29x9[_0xd587[285]];null!= _0x5c29x9&& _0x5c29x9!= _0x5c29x5&& this[_0xd587[2161]](_0x5c29x2,_0x5c29x9)}}};mxCellRenderer[_0xd587[202]][_0xd587[2161]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x2[_0xd587[253]][_0xd587[252]][_0xd587[265]][_0xd587[950]](_0x5c29x2[_0xd587[253]][_0xd587[252]],_0x5c29x3);null!= _0x5c29x2[_0xd587[963]]&& (null!= _0x5c29x2[_0xd587[963]][_0xd587[252]]&& _0x5c29x2[_0xd587[963]][_0xd587[252]][_0xd587[265]]== _0x5c29x2[_0xd587[253]][_0xd587[252]][_0xd587[265]])&& _0x5c29x2[_0xd587[253]][_0xd587[252]][_0xd587[265]][_0xd587[950]](_0x5c29x2[_0xd587[963]][_0xd587[252]],_0x5c29x2[_0xd587[253]][_0xd587[252]][_0xd587[287]])};mxCellRenderer[_0xd587[202]][_0xd587[2156]]= function(_0x5c29x2){if(null!= _0x5c29x2[_0xd587[124]]){var _0x5c29x3=mxStencilRegistry[_0xd587[1560]](_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2059]]]);null!= _0x5c29x3?_0x5c29x2[_0xd587[253]]=  new mxShape(_0x5c29x3):(_0x5c29x3= this[_0xd587[2169]](_0x5c29x2),_0x5c29x2[_0xd587[253]]=  new _0x5c29x3);_0x5c29x2[_0xd587[253]][_0xd587[1525]]= _0x5c29x2[_0xd587[439]];_0x5c29x2[_0xd587[253]][_0xd587[1562]]=  new mxRectangle(_0x5c29x2[_0xd587[235]],_0x5c29x2[_0xd587[236]],_0x5c29x2[_0xd587[117]],_0x5c29x2[_0xd587[119]]);_0x5c29x2[_0xd587[253]][_0xd587[507]]= _0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[507]];this[_0xd587[2170]](_0x5c29x2)}};mxCellRenderer[_0xd587[202]][_0xd587[2171]]= function(_0x5c29x2){return null!= _0x5c29x2?mxCellRenderer[_0xd587[202]][_0xd587[2153]][_0x5c29x2]:null};mxCellRenderer[_0xd587[202]][_0xd587[2169]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[2171]](_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2059]]]);null== _0x5c29x3&& (_0x5c29x3= _0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[502]]()[_0xd587[250]](_0x5c29x2[_0xd587[246]])?this[_0xd587[2149]]:this[_0xd587[2150]]);return _0x5c29x3};mxCellRenderer[_0xd587[202]][_0xd587[2170]]= function(_0x5c29x2){_0x5c29x2[_0xd587[253]][_0xd587[183]](_0x5c29x2);_0x5c29x2[_0xd587[253]][_0xd587[618]]= _0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[1202]](_0x5c29x2);_0x5c29x2[_0xd587[253]][_0xd587[630]]= this[_0xd587[2171]](_0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[2172]](_0x5c29x2));_0x5c29x2[_0xd587[253]][_0xd587[632]]= _0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[2173]](_0x5c29x2);_0x5c29x2[_0xd587[253]][_0xd587[634]]= _0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[2174]](_0x5c29x2);_0x5c29x2[_0xd587[253]][_0xd587[638]]= _0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2175]]];_0x5c29x2[_0xd587[253]][_0xd587[631]]= _0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[2176]](_0x5c29x2);this[_0xd587[2177]](_0x5c29x2)};mxCellRenderer[_0xd587[202]][_0xd587[2177]]= function(_0x5c29x2){null!= _0x5c29x2[_0xd587[253]]&& (this[_0xd587[2178]](_0x5c29x2,_0xd587[632],mxConstants.STYLE_FILLCOLOR),this[_0xd587[2178]](_0x5c29x2,_0xd587[634],mxConstants.STYLE_GRADIENTCOLOR),this[_0xd587[2178]](_0x5c29x2,_0xd587[1334],mxConstants.STYLE_FILLCOLOR),this[_0xd587[2178]](_0x5c29x2,_0xd587[1336],mxConstants.STYLE_STROKECOLOR),this[_0xd587[2178]](_0x5c29x2,_0xd587[1299],mxConstants.STYLE_GRADIENTCOLOR))};mxCellRenderer[_0xd587[202]][_0xd587[2178]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=_0x5c29x2[_0xd587[253]][_0x5c29x3],_0x5c29x9=_0x5c29x2[_0xd587[441]][_0xd587[1179]],_0x5c29xa=null;_0xd587[1549]== _0x5c29x5?_0x5c29xa= _0x5c29x9[_0xd587[251]][_0xd587[1197]](_0x5c29x2[_0xd587[246]]):_0xd587[687]== _0x5c29x5?(_0x5c29xa= null!= _0x5c29x9[_0xd587[251]][_0xd587[1709]](_0x5c29x2[_0xd587[246]],!1)?_0x5c29x9[_0xd587[251]][_0xd587[1709]](_0x5c29x2[_0xd587[246]],!1):_0x5c29x2[_0xd587[246]],_0x5c29xa= _0x5c29x9[_0xd587[2179]](_0x5c29xa),_0x5c29x4= _0x5c29x9[_0xd587[2180]]):_0xd587[2181]== _0x5c29x5&& (_0x5c29x2[_0xd587[253]][_0x5c29x3]= _0x5c29x2[_0xd587[253]][_0xd587[632]]);null!= _0x5c29xa&& (_0x5c29x5= _0x5c29x9[_0xd587[249]]()[_0xd587[248]](_0x5c29xa),_0x5c29x2[_0xd587[253]][_0x5c29x3]= null,null!= _0x5c29x5&& (_0x5c29x2[_0xd587[253]][_0x5c29x3]= null!= _0x5c29x5[_0xd587[253]]&& _0xd587[632]!= _0x5c29x3?_0x5c29x5[_0xd587[253]][_0x5c29x3]:_0x5c29x5[_0xd587[124]][_0x5c29x4]))};mxCellRenderer[_0xd587[202]][_0xd587[2182]]= function(_0x5c29x2){return _0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[2183]](_0x5c29x2[_0xd587[246]])};mxCellRenderer[_0xd587[202]][_0xd587[2184]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=_0x5c29x2[_0xd587[441]][_0xd587[1179]];_0x5c29x4[_0xd587[502]]()[_0xd587[250]](_0x5c29x2[_0xd587[246]]);if(0< _0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2185]]]|| null== _0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2185]]]){var _0x5c29x5=_0x5c29x4[_0xd587[2186]](_0x5c29x2[_0xd587[246]])|| null!= _0x5c29x3&& mxUtils[_0xd587[1331]](_0x5c29x3);_0x5c29x2[_0xd587[963]]=  new this[_0xd587[2151]](_0x5c29x3, new mxRectangle,_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2064]]]|| mxConstants[_0xd587[479]],_0x5c29x4[_0xd587[2187]](_0x5c29x2),_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2069]]],_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2188]]],_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2185]]],_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2189]]],_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2143]]],_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2144]]],_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2145]]],_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2146]]],_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2147]]],_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2190]]],_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2191]]],_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2192]]],_0x5c29x4[_0xd587[2131]](_0x5c29x2[_0xd587[246]])&& _0x5c29x4[_0xd587[2186]](_0x5c29x2[_0xd587[246]]),_0x5c29x4[_0xd587[2130]](_0x5c29x2[_0xd587[246]]),_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2193]]],_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2194]]]);_0x5c29x2[_0xd587[963]][_0xd587[461]]= mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_TEXT_OPACITY,100);_0x5c29x2[_0xd587[963]][_0xd587[507]]= _0x5c29x5?mxConstants[_0xd587[1656]]:_0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[507]];_0x5c29x2[_0xd587[963]][_0xd587[724]]= _0x5c29x2;this[_0xd587[2195]](_0x5c29x2);var _0x5c29x9=!1,_0x5c29xa=function(_0x5c29x3){var _0x5c29x5=_0x5c29x2;if(mxClient[_0xd587[754]]|| _0x5c29x9){_0x5c29x5= mxEvent[_0xd587[731]](_0x5c29x3),_0x5c29x3= mxEvent[_0xd587[733]](_0x5c29x3),_0x5c29x3= mxUtils[_0xd587[2196]](_0x5c29x4[_0xd587[526]],_0x5c29x5,_0x5c29x3),_0x5c29x5= _0x5c29x4[_0xd587[441]][_0xd587[248]](_0x5c29x4[_0xd587[999]](_0x5c29x3[_0xd587[235]],_0x5c29x3[_0xd587[236]]))};return _0x5c29x5};mxEvent[_0xd587[759]](_0x5c29x2[_0xd587[963]][_0xd587[252]],mxUtils[_0xd587[885]](this,function(_0x5c29x3){this[_0xd587[2197]](_0x5c29x2,_0x5c29x3)&& (_0x5c29x4[_0xd587[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x5c29x3,_0x5c29x2)),_0x5c29x9= _0x5c29x4[_0xd587[507]]!= mxConstants[_0xd587[508]]&& _0xd587[2198]== mxEvent[_0xd587[728]](_0x5c29x3)[_0xd587[301]])}),mxUtils[_0xd587[885]](this,function(_0x5c29x3){this[_0xd587[2197]](_0x5c29x2,_0x5c29x3)&& _0x5c29x4[_0xd587[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x5c29x3,_0x5c29xa(_0x5c29x3)))}),mxUtils[_0xd587[885]](this,function(_0x5c29x3){this[_0xd587[2197]](_0x5c29x2,_0x5c29x3)&& (_0x5c29x4[_0xd587[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x5c29x3,_0x5c29xa(_0x5c29x3))),_0x5c29x9=  !1)}));mxEvent[_0xd587[169]](_0x5c29x2[_0xd587[963]][_0xd587[252]],_0xd587[760],mxUtils[_0xd587[885]](this,function(_0x5c29x3){this[_0xd587[2197]](_0x5c29x2,_0x5c29x3)&& (_0x5c29x4[_0xd587[761]](_0x5c29x3,_0x5c29x2[_0xd587[246]]),mxEvent[_0xd587[722]](_0x5c29x3))}))}};mxCellRenderer[_0xd587[202]][_0xd587[2195]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[441]][_0xd587[1179]];_0x5c29x2[_0xd587[963]][_0xd587[507]]!= mxConstants[_0xd587[508]]&& (mxClient[_0xd587[48]]&& mxClient[_0xd587[2199]]?_0x5c29x2[_0xd587[963]][_0xd587[176]](_0x5c29x3[_0xd587[526]]):mxUtils[_0xd587[458]](_0x5c29x2[_0xd587[441]][_0xd587[2024]]())&& (null!= _0x5c29x2[_0xd587[253]][_0xd587[685]]?_0x5c29x2[_0xd587[963]][_0xd587[176]](_0x5c29x2[_0xd587[253]][_0xd587[685]]):_0x5c29x2[_0xd587[963]][_0xd587[176]](_0x5c29x2[_0xd587[253]][_0xd587[252]])));null== _0x5c29x2[_0xd587[963]][_0xd587[252]]&& (_0x5c29x2[_0xd587[963]][_0xd587[176]](_0x5c29x2[_0xd587[441]][_0xd587[2024]]()),null!= _0x5c29x2[_0xd587[253]]&& null!= _0x5c29x2[_0xd587[963]]&& _0x5c29x2[_0xd587[253]][_0xd587[252]][_0xd587[265]][_0xd587[950]](_0x5c29x2[_0xd587[963]][_0xd587[252]],_0x5c29x2[_0xd587[253]][_0xd587[252]][_0xd587[287]]))};mxCellRenderer[_0xd587[202]][_0xd587[2162]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[2200]](_0x5c29x2[_0xd587[246]]),_0x5c29x4=null;if(null!= _0x5c29x3){for(var _0x5c29x4= new mxDictionary,_0x5c29x5=0;_0x5c29x5< _0x5c29x3[_0xd587[67]];_0x5c29x5++){var _0x5c29x9=null!= _0x5c29x2[_0xd587[1211]]?_0x5c29x2[_0xd587[1211]][_0xd587[205]](_0x5c29x3[_0x5c29x5]):null;null== _0x5c29x9&& (_0x5c29x9=  new mxImageShape( new mxRectangle,_0x5c29x3[_0x5c29x5][_0xd587[618]][_0xd587[390]]),_0x5c29x9[_0xd587[507]]= _0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[507]],_0x5c29x9[_0xd587[1674]]=  !1,_0x5c29x9[_0xd587[2201]]= _0x5c29x3[_0x5c29x5],this[_0xd587[2023]](_0x5c29x2,_0x5c29x9),this[_0xd587[2202]](_0x5c29x2,_0x5c29x3[_0x5c29x5],_0x5c29x9),null!= _0x5c29x3[_0x5c29x5][_0xd587[270]]&& (_0x5c29x9[_0xd587[252]][_0xd587[124]][_0xd587[270]]= _0x5c29x3[_0x5c29x5][_0xd587[270]]));_0x5c29x4[_0xd587[204]](_0x5c29x3[_0x5c29x5],_0x5c29x9)}};null!= _0x5c29x2[_0xd587[1211]]&& _0x5c29x2[_0xd587[1211]][_0xd587[209]](function(_0x5c29x2,_0x5c29x3){_0x5c29x3[_0xd587[515]]()});_0x5c29x2[_0xd587[1211]]= _0x5c29x4};mxCellRenderer[_0xd587[202]][_0xd587[2023]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3[_0xd587[176]](_0x5c29x2[_0xd587[441]][_0xd587[1524]]())};mxCellRenderer[_0xd587[202]][_0xd587[2202]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=_0x5c29x2[_0xd587[441]][_0xd587[1179]];mxEvent[_0xd587[169]](_0x5c29x4[_0xd587[252]],_0xd587[173],function(_0x5c29x4){_0x5c29x5[_0xd587[2203]]()&& _0x5c29x5[_0xd587[2126]](!_0x5c29x5[_0xd587[2134]]());_0x5c29x3[_0xd587[746]]( new mxEventObject(mxEvent.CLICK,_0xd587[763],_0x5c29x4,_0xd587[246],_0x5c29x2[_0xd587[246]]))});mxEvent[_0xd587[759]](_0x5c29x4[_0xd587[252]],function(_0x5c29x2){mxEvent[_0xd587[722]](_0x5c29x2)},function(_0x5c29x3){_0x5c29x5[_0xd587[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x5c29x3,_0x5c29x2))});mxClient[_0xd587[754]]&& mxEvent[_0xd587[169]](_0x5c29x4[_0xd587[252]],_0xd587[757],function(_0x5c29x4){_0x5c29x3[_0xd587[746]]( new mxEventObject(mxEvent.CLICK,_0xd587[763],_0x5c29x4,_0xd587[246],_0x5c29x2[_0xd587[246]]))})};mxCellRenderer[_0xd587[202]][_0xd587[2204]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[441]][_0xd587[1179]],_0x5c29x4=_0x5c29x3[_0xd587[2205]](_0x5c29x2);if(_0x5c29x3[_0xd587[2206]]&& null!= _0x5c29x4){if(null== _0x5c29x2[_0xd587[2207]]){var _0x5c29x5= new mxRectangle(0,0,_0x5c29x4[_0xd587[117]],_0x5c29x4[_0xd587[119]]);_0x5c29x2[_0xd587[2207]]=  new mxImageShape(_0x5c29x5,_0x5c29x4[_0xd587[390]]);_0x5c29x2[_0xd587[2207]][_0xd587[1674]]=  !1;_0x5c29x2[_0xd587[2207]][_0xd587[507]]= _0x5c29x3[_0xd587[507]];this[_0xd587[2208]](_0x5c29x2,_0x5c29x2[_0xd587[2207]],!0,function(_0x5c29x4){if(_0x5c29x3[_0xd587[994]]()){var _0x5c29x5=!_0x5c29x3[_0xd587[1742]](_0x5c29x2[_0xd587[246]]);_0x5c29x3[_0xd587[847]](_0x5c29x5,!1,[_0x5c29x2[_0xd587[246]]]);mxEvent[_0xd587[722]](_0x5c29x4)}})}}else {null!= _0x5c29x2[_0xd587[2207]]&& (_0x5c29x2[_0xd587[2207]][_0xd587[515]](),_0x5c29x2[_0xd587[2207]]= null)}};mxCellRenderer[_0xd587[202]][_0xd587[2208]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=_0x5c29x2[_0xd587[441]][_0xd587[1179]];_0x5c29x9[_0xd587[2186]](_0x5c29x2[_0xd587[246]])&& mxClient[_0xd587[2199]]&& _0x5c29x9[_0xd587[507]]== mxConstants[_0xd587[508]]?(_0x5c29x3[_0xd587[507]]= mxConstants[_0xd587[2209]],_0x5c29x3[_0xd587[176]](_0x5c29x9[_0xd587[526]]),_0x5c29x3[_0xd587[252]][_0xd587[124]][_0xd587[931]]= 1):_0x5c29x3[_0xd587[176]](_0x5c29x2[_0xd587[441]][_0xd587[1524]]());_0x5c29x3= _0x5c29x3[_0xd587[2210]]|| _0x5c29x3[_0xd587[252]];_0x5c29x5&& (_0x5c29x9[_0xd587[994]]()&& (_0x5c29x3[_0xd587[124]][_0xd587[270]]= _0xd587[356]),mxEvent[_0xd587[169]](_0x5c29x3,_0xd587[173],_0x5c29x5));_0x5c29x4&& mxEvent[_0xd587[759]](_0x5c29x3,function(_0x5c29x3){_0x5c29x9[_0xd587[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x5c29x3,_0x5c29x2));mxEvent[_0xd587[722]](_0x5c29x3)},function(_0x5c29x3){_0x5c29x9[_0xd587[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x5c29x3,_0x5c29x2))});return _0x5c29x3};mxCellRenderer[_0xd587[202]][_0xd587[2211]]= function(_0x5c29x2,_0x5c29x3){return !0};mxCellRenderer[_0xd587[202]][_0xd587[2197]]= function(_0x5c29x2,_0x5c29x3){return !0};mxCellRenderer[_0xd587[202]][_0xd587[2163]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[441]][_0xd587[1179]],_0x5c29x4=function(_0x5c29x4){var _0x5c29x5=_0x5c29x2;if(_0x5c29x3[_0xd587[507]]!= mxConstants[_0xd587[508]]&& _0xd587[2198]== mxEvent[_0xd587[728]](_0x5c29x4)[_0xd587[301]]|| mxClient[_0xd587[754]]){_0x5c29x5= mxEvent[_0xd587[731]](_0x5c29x4),_0x5c29x4= mxEvent[_0xd587[733]](_0x5c29x4),_0x5c29x4= mxUtils[_0xd587[2196]](_0x5c29x3[_0xd587[526]],_0x5c29x5,_0x5c29x4),_0x5c29x5= _0x5c29x3[_0xd587[441]][_0xd587[248]](_0x5c29x3[_0xd587[999]](_0x5c29x4[_0xd587[235]],_0x5c29x4[_0xd587[236]]))};return _0x5c29x5},_0x5c29x5=!1;mxEvent[_0xd587[169]](_0x5c29x2[_0xd587[253]][_0xd587[252]],_0xd587[2212],mxUtils[_0xd587[885]](this,function(_0x5c29x2){_0x5c29x3[_0xd587[2213]]= 0;_0x5c29x5=  !0;mxEvent[_0xd587[722]](_0x5c29x2)}));mxEvent[_0xd587[759]](_0x5c29x2[_0xd587[253]][_0xd587[252]],mxUtils[_0xd587[885]](this,function(_0x5c29x4){this[_0xd587[2211]](_0x5c29x2,_0x5c29x4)&& !_0x5c29x5?_0x5c29x3[_0xd587[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x5c29x4,null!= _0x5c29x2[_0xd587[253]]&& mxEvent[_0xd587[728]](_0x5c29x4)== _0x5c29x2[_0xd587[253]][_0xd587[905]]?null:_0x5c29x2)):_0x5c29x5&& mxEvent[_0xd587[722]](_0x5c29x4)}),mxUtils[_0xd587[885]](this,function(_0x5c29x9){this[_0xd587[2211]](_0x5c29x2,_0x5c29x9)&& !_0x5c29x5?_0x5c29x3[_0xd587[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x5c29x9,null!= _0x5c29x2[_0xd587[253]]&& mxEvent[_0xd587[728]](_0x5c29x9)== _0x5c29x2[_0xd587[253]][_0xd587[905]]?null:_0x5c29x4(_0x5c29x9))):_0x5c29x5&& mxEvent[_0xd587[722]](_0x5c29x9)}),mxUtils[_0xd587[885]](this,function(_0x5c29x9){this[_0xd587[2211]](_0x5c29x2,_0x5c29x9)&& !_0x5c29x5?_0x5c29x3[_0xd587[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x5c29x9,null!= _0x5c29x2[_0xd587[253]]&& mxEvent[_0xd587[728]](_0x5c29x9)== _0x5c29x2[_0xd587[253]][_0xd587[905]]?null:_0x5c29x4(_0x5c29x9))):_0x5c29x5&& mxEvent[_0xd587[722]](_0x5c29x9)}));var _0x5c29x9=mxClient[_0xd587[754]]?_0xd587[2214]:_0xd587[760];mxEvent[_0xd587[169]](_0x5c29x2[_0xd587[253]][_0xd587[252]],_0x5c29x9,mxUtils[_0xd587[885]](this,function(_0x5c29x4){_0x5c29x5=  !1;_0xd587[2214]== _0x5c29x9?(_0x5c29x3[_0xd587[2213]]= 0,_0x5c29x3[_0xd587[2215]]&& (_0x5c29x3[_0xd587[2216]](_0x5c29x2,_0x5c29x4),mxEvent[_0xd587[722]](_0x5c29x4))):this[_0xd587[2211]](_0x5c29x2,_0x5c29x4)&& (_0x5c29x3[_0xd587[761]](_0x5c29x4,null!= _0x5c29x2[_0xd587[253]]&& mxEvent[_0xd587[728]](_0x5c29x4)== _0x5c29x2[_0xd587[253]][_0xd587[905]]?null:_0x5c29x2[_0xd587[246]]),mxEvent[_0xd587[722]](_0x5c29x4))}))};mxCellRenderer[_0xd587[202]][_0xd587[2217]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[2182]](_0x5c29x2);if(null== _0x5c29x2[_0xd587[963]]&& null!= _0x5c29x4&& (mxUtils[_0xd587[1331]](_0x5c29x4)|| 0< _0x5c29x4[_0xd587[67]])){this[_0xd587[2184]](_0x5c29x2,_0x5c29x4)}else {if(null!= _0x5c29x2[_0xd587[963]]&& (null== _0x5c29x4|| 0== _0x5c29x4[_0xd587[67]])){_0x5c29x2[_0xd587[963]][_0xd587[515]](),_0x5c29x2[_0xd587[963]]= null}};if(null!= _0x5c29x2[_0xd587[963]]){var _0x5c29x5=_0x5c29x2[_0xd587[441]][_0xd587[1179]],_0x5c29x9=_0x5c29x5[_0xd587[2131]](_0x5c29x2[_0xd587[246]]),_0x5c29x5=_0x5c29x5[_0xd587[2130]](_0x5c29x2[_0xd587[246]]),_0x5c29xa=this[_0xd587[2218]](_0x5c29x2);if(_0x5c29x3|| _0x5c29x2[_0xd587[963]][_0xd587[131]]!= _0x5c29x4|| _0x5c29x2[_0xd587[963]][_0xd587[2131]]!= _0x5c29x9|| _0x5c29x2[_0xd587[963]][_0xd587[2219]]!= _0x5c29x5|| _0x5c29x2[_0xd587[963]][_0xd587[255]]!= _0x5c29x2[_0xd587[441]][_0xd587[255]]|| !_0x5c29x2[_0xd587[963]][_0xd587[1562]][_0xd587[237]](_0x5c29xa)){_0x5c29x2[_0xd587[963]][_0xd587[131]]= _0x5c29x4,_0x5c29x2[_0xd587[963]][_0xd587[1562]]= _0x5c29xa,_0x5c29x2[_0xd587[963]][_0xd587[255]]= this[_0xd587[2220]](_0x5c29x2),_0x5c29x2[_0xd587[963]][_0xd587[2131]]= _0x5c29x9,_0x5c29x2[_0xd587[963]][_0xd587[2219]]= _0x5c29x5,_0x5c29x2[_0xd587[963]][_0xd587[258]]()}}};mxCellRenderer[_0xd587[202]][_0xd587[2220]]= function(_0x5c29x2){return _0x5c29x2[_0xd587[441]][_0xd587[255]]};mxCellRenderer[_0xd587[202]][_0xd587[2218]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[441]][_0xd587[1179]],_0x5c29x4=_0x5c29x2[_0xd587[441]][_0xd587[255]],_0x5c29x5=_0x5c29x3[_0xd587[502]]()[_0xd587[250]](_0x5c29x2[_0xd587[246]]),_0x5c29x9= new mxRectangle(_0x5c29x2[_0xd587[2079]][_0xd587[235]],_0x5c29x2[_0xd587[2079]][_0xd587[236]]);_0x5c29x2[_0xd587[963]][_0xd587[1672]]();_0x5c29x5?(_0x5c29x5= _0x5c29x2[_0xd587[963]][_0xd587[1673]](),_0x5c29x9[_0xd587[235]]+= _0x5c29x5[_0xd587[235]]* _0x5c29x4,_0x5c29x9[_0xd587[236]]+= _0x5c29x5[_0xd587[236]]* _0x5c29x4,_0x5c29x3= _0x5c29x3[_0xd587[1198]](_0x5c29x2[_0xd587[246]]),null!= _0x5c29x3&& (_0x5c29x9[_0xd587[117]]= Math[_0xd587[160]](0,_0x5c29x2[_0xd587[963]][_0xd587[1655]][_0xd587[235]]* _0x5c29x3[_0xd587[117]]* _0x5c29x4- _0x5c29x2[_0xd587[963]][_0xd587[659]]* _0x5c29x4- _0x5c29x2[_0xd587[963]][_0xd587[661]]* _0x5c29x4),_0x5c29x9[_0xd587[119]]= Math[_0xd587[160]](0,_0x5c29x2[_0xd587[963]][_0xd587[1655]][_0xd587[236]]* _0x5c29x3[_0xd587[119]]* _0x5c29x4- _0x5c29x2[_0xd587[963]][_0xd587[658]]* _0x5c29x4- _0x5c29x2[_0xd587[963]][_0xd587[660]]* _0x5c29x4))):(_0x5c29x2[_0xd587[963]][_0xd587[1590]]()&& (_0x5c29x5= _0x5c29x9[_0xd587[235]],_0x5c29x9[_0xd587[235]]= _0x5c29x9[_0xd587[236]],_0x5c29x9[_0xd587[236]]= _0x5c29x5),_0x5c29x9[_0xd587[235]]+= _0x5c29x2[_0xd587[235]],_0x5c29x9[_0xd587[236]]+= _0x5c29x2[_0xd587[236]],_0x5c29x9[_0xd587[117]]= Math[_0xd587[160]](1,_0x5c29x2[_0xd587[117]]),_0x5c29x9[_0xd587[119]]= Math[_0xd587[160]](1,_0x5c29x2[_0xd587[119]]),_0x5c29x3[_0xd587[1730]](_0x5c29x2[_0xd587[246]])&& (_0x5c29x3= _0x5c29x3[_0xd587[1731]](_0x5c29x2[_0xd587[246]]),0< _0x5c29x3[_0xd587[117]]?(_0x5c29x5= Math[_0xd587[243]](_0x5c29x9[_0xd587[117]],_0x5c29x3[_0xd587[117]]* _0x5c29x4),_0x5c29x2[_0xd587[253]][_0xd587[623]]&& (_0x5c29x9[_0xd587[235]]+= _0x5c29x9[_0xd587[117]]- _0x5c29x5),_0x5c29x9[_0xd587[117]]= _0x5c29x5):0< _0x5c29x3[_0xd587[119]]&& (_0x5c29x5= Math[_0xd587[243]](_0x5c29x9[_0xd587[119]],_0x5c29x3[_0xd587[119]]* _0x5c29x4),_0x5c29x2[_0xd587[253]][_0xd587[624]]&& (_0x5c29x9[_0xd587[236]]+= _0x5c29x9[_0xd587[119]]- _0x5c29x5),_0x5c29x9[_0xd587[119]]= _0x5c29x5)),this[_0xd587[2221]](_0x5c29x2,_0x5c29x9));return _0x5c29x9};mxCellRenderer[_0xd587[202]][_0xd587[2221]]= function(_0x5c29x2,_0x5c29x3){if(_0x5c29x2[_0xd587[963]][_0xd587[1590]]()){var _0x5c29x4=(_0x5c29x2[_0xd587[117]]- _0x5c29x2[_0xd587[119]])/ 2;_0x5c29x3[_0xd587[235]]+= _0x5c29x4;_0x5c29x3[_0xd587[236]]-= _0x5c29x4;_0x5c29x4= _0x5c29x3[_0xd587[117]];_0x5c29x3[_0xd587[117]]= _0x5c29x3[_0xd587[119]];_0x5c29x3[_0xd587[119]]= _0x5c29x4};_0x5c29x3[_0xd587[235]]-= _0x5c29x2[_0xd587[963]][_0xd587[1655]][_0xd587[235]]* _0x5c29x3[_0xd587[117]];_0x5c29x3[_0xd587[236]]-= _0x5c29x2[_0xd587[963]][_0xd587[1655]][_0xd587[236]]* _0x5c29x3[_0xd587[119]];if(_0xd587[1334]!= _0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2193]]]){var _0x5c29x4=_0x5c29x2[_0xd587[441]][_0xd587[255]],_0x5c29x5=_0x5c29x2[_0xd587[963]][_0xd587[1673]]();_0x5c29x3[_0xd587[235]]+= _0x5c29x5[_0xd587[235]]* _0x5c29x4;_0x5c29x3[_0xd587[236]]+= _0x5c29x5[_0xd587[236]]* _0x5c29x4;_0x5c29x3[_0xd587[117]]= Math[_0xd587[160]](0,_0x5c29x3[_0xd587[117]]- _0x5c29x2[_0xd587[963]][_0xd587[659]]* _0x5c29x4- _0x5c29x2[_0xd587[963]][_0xd587[661]]* _0x5c29x4);_0x5c29x3[_0xd587[119]]= Math[_0xd587[160]](0,_0x5c29x3[_0xd587[119]]- _0x5c29x2[_0xd587[963]][_0xd587[658]]* _0x5c29x4- _0x5c29x2[_0xd587[963]][_0xd587[660]]* _0x5c29x4)};var _0x5c29x9=_0x5c29x2[_0xd587[963]][_0xd587[1615]]();if(0!= _0x5c29x9&& (null!= _0x5c29x2&& _0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[251]][_0xd587[1193]](_0x5c29x2[_0xd587[246]]))&& (_0x5c29x4= _0x5c29x2[_0xd587[241]](),_0x5c29x5= _0x5c29x2[_0xd587[242]](),_0x5c29x3[_0xd587[235]]!= _0x5c29x4|| _0x5c29x3[_0xd587[236]]!= _0x5c29x5)){_0x5c29x9*= Math[_0xd587[424]]/ 180,pt= mxUtils[_0xd587[432]]( new mxPoint(_0x5c29x3[_0xd587[235]],_0x5c29x3[_0xd587[236]]),Math[_0xd587[426]](_0x5c29x9),Math[_0xd587[427]](_0x5c29x9), new mxPoint(_0x5c29x4,_0x5c29x5)),_0x5c29x3[_0xd587[235]]= pt[_0xd587[235]],_0x5c29x3[_0xd587[236]]= pt[_0xd587[236]]}};mxCellRenderer[_0xd587[202]][_0xd587[2222]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[2162]](_0x5c29x2);if(null!= _0x5c29x2[_0xd587[1211]]){var _0x5c29x4=mxUtils[_0xd587[1454]](mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_ROTATION,0),90),_0x5c29x5=mxUtils[_0xd587[431]](_0x5c29x4),_0x5c29x9=Math[_0xd587[426]](_0x5c29x5),_0x5c29xa=Math[_0xd587[427]](_0x5c29x5);_0x5c29x2[_0xd587[1211]][_0xd587[209]](function(_0x5c29x5,_0x5c29x13){var _0x5c29x14=_0x5c29x13[_0xd587[2201]][_0xd587[1799]](_0x5c29x2);if(!_0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[502]]()[_0xd587[250]](_0x5c29x2[_0xd587[246]])&& null!= _0x5c29x2[_0xd587[253]]&& 0!= _0x5c29x4){var _0x5c29x15=_0x5c29x14[_0xd587[241]](),_0x5c29x16=_0x5c29x14[_0xd587[242]](),_0x5c29x16=mxUtils[_0xd587[432]]( new mxPoint(_0x5c29x15,_0x5c29x16),_0x5c29x9,_0x5c29xa, new mxPoint(_0x5c29x2[_0xd587[241]](),_0x5c29x2[_0xd587[242]]())),_0x5c29x15=_0x5c29x16[_0xd587[235]],_0x5c29x16=_0x5c29x16[_0xd587[236]];_0x5c29x14[_0xd587[235]]= Math[_0xd587[488]](_0x5c29x15- _0x5c29x14[_0xd587[117]]/ 2);_0x5c29x14[_0xd587[236]]= Math[_0xd587[488]](_0x5c29x16- _0x5c29x14[_0xd587[119]]/ 2)};if(_0x5c29x3|| null== _0x5c29x13[_0xd587[1562]]|| _0x5c29x13[_0xd587[255]]!= _0x5c29x2[_0xd587[441]][_0xd587[255]]|| !_0x5c29x13[_0xd587[1562]][_0xd587[237]](_0x5c29x14)){_0x5c29x13[_0xd587[1562]]= _0x5c29x14,_0x5c29x13[_0xd587[255]]= _0x5c29x2[_0xd587[441]][_0xd587[255]],_0x5c29x13[_0xd587[258]]()}})}};mxCellRenderer[_0xd587[202]][_0xd587[2223]]= function(_0x5c29x2,_0x5c29x3){if(null!= _0x5c29x2[_0xd587[2207]]){var _0x5c29x4=this[_0xd587[2224]](_0x5c29x2),_0x5c29x5=this[_0xd587[2152]]?mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_ROTATION,0):_0x5c29x2[_0xd587[253]][_0xd587[1615]](),_0x5c29x9=_0x5c29x2[_0xd587[441]][_0xd587[255]];if(_0x5c29x3|| _0x5c29x2[_0xd587[2207]][_0xd587[255]]!= _0x5c29x9|| !_0x5c29x2[_0xd587[2207]][_0xd587[1562]][_0xd587[237]](_0x5c29x4)|| _0x5c29x2[_0xd587[2207]][_0xd587[603]]!= _0x5c29x5){_0x5c29x2[_0xd587[2207]][_0xd587[603]]= _0x5c29x5,_0x5c29x2[_0xd587[2207]][_0xd587[1562]]= _0x5c29x4,_0x5c29x2[_0xd587[2207]][_0xd587[255]]= _0x5c29x9,_0x5c29x2[_0xd587[2207]][_0xd587[258]]()}}};mxCellRenderer[_0xd587[202]][_0xd587[2224]]= function(_0x5c29x2){if(null!= _0x5c29x2[_0xd587[2207]]){var _0x5c29x3=_0x5c29x2[_0xd587[2207]][_0xd587[255]],_0x5c29x4=_0x5c29x2[_0xd587[2207]][_0xd587[1562]][_0xd587[117]]/ _0x5c29x3,_0x5c29x3=_0x5c29x2[_0xd587[2207]][_0xd587[1562]][_0xd587[119]]/ _0x5c29x3,_0x5c29x5=_0x5c29x2[_0xd587[441]][_0xd587[255]],_0x5c29x9=_0x5c29x2[_0xd587[241]](),_0x5c29xa=_0x5c29x2[_0xd587[242]]();if(!_0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[502]]()[_0xd587[250]](_0x5c29x2[_0xd587[246]])&& (_0x5c29x9= _0x5c29x2[_0xd587[235]]+ _0x5c29x4* _0x5c29x5,_0x5c29xa= _0x5c29x2[_0xd587[236]]+ _0x5c29x3* _0x5c29x5,null!= _0x5c29x2[_0xd587[253]])){var _0x5c29x12=_0x5c29x2[_0xd587[253]][_0xd587[1598]]();if(this[_0xd587[2152]]){_0x5c29x12= mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_ROTATION,0)}else {if(_0x5c29x2[_0xd587[253]][_0xd587[1590]]()){var _0x5c29x13=(_0x5c29x2[_0xd587[117]]- _0x5c29x2[_0xd587[119]])/ 2,_0x5c29x9=_0x5c29x9+ _0x5c29x13,_0x5c29xa=_0x5c29xa- _0x5c29x13}};0!= _0x5c29x12&& (_0x5c29x13= mxUtils[_0xd587[431]](_0x5c29x12),_0x5c29x12= Math[_0xd587[426]](_0x5c29x13),_0x5c29x13= Math[_0xd587[427]](_0x5c29x13),_0x5c29xa= mxUtils[_0xd587[432]]( new mxPoint(_0x5c29x9,_0x5c29xa),_0x5c29x12,_0x5c29x13, new mxPoint(_0x5c29x2[_0xd587[241]](),_0x5c29x2[_0xd587[242]]())),_0x5c29x9= _0x5c29xa[_0xd587[235]],_0x5c29xa= _0x5c29xa[_0xd587[236]])};return _0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[502]]()[_0xd587[250]](_0x5c29x2[_0xd587[246]]), new mxRectangle(Math[_0xd587[488]](_0x5c29x9- _0x5c29x4/ 2* _0x5c29x5),Math[_0xd587[488]](_0x5c29xa- _0x5c29x3/ 2* _0x5c29x5),Math[_0xd587[488]](_0x5c29x4* _0x5c29x5),Math[_0xd587[488]](_0x5c29x3* _0x5c29x5))};return null};mxCellRenderer[_0xd587[202]][_0xd587[258]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){if(null!= _0x5c29x2[_0xd587[253]]){var _0x5c29x5=!1;_0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[502]]()[_0xd587[250]](_0x5c29x2[_0xd587[246]]);reconfigure= null!= _0x5c29x3?_0x5c29x3:!1;this[_0xd587[2204]](_0x5c29x2);if(_0x5c29x2[_0xd587[2082]]|| _0x5c29x2[_0xd587[2081]]){_0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[2158]]?this[_0xd587[2166]](_0x5c29x2):this[_0xd587[2167]](_0x5c29x2)};if(_0x5c29x2[_0xd587[2082]]|| !mxUtils[_0xd587[2225]](_0x5c29x2[_0xd587[253]][_0xd587[124]],_0x5c29x2[_0xd587[124]])){this[_0xd587[2170]](_0x5c29x2),_0x5c29x3=  !0};delete _0x5c29x2[_0xd587[2081]];delete _0x5c29x2[_0xd587[2082]];if(_0x5c29x3|| null== _0x5c29x2[_0xd587[253]][_0xd587[1562]]|| _0x5c29x2[_0xd587[253]][_0xd587[255]]!= _0x5c29x2[_0xd587[441]][_0xd587[255]]|| !_0x5c29x2[_0xd587[253]][_0xd587[1562]][_0xd587[237]](_0x5c29x2)|| !mxUtils[_0xd587[2226]](_0x5c29x2[_0xd587[253]][_0xd587[1525]],_0x5c29x2[_0xd587[439]])){_0x5c29x5=  !0,_0x5c29x2[_0xd587[253]][_0xd587[1525]]= null!= _0x5c29x2[_0xd587[439]]?_0x5c29x2[_0xd587[439]][_0xd587[1853]]():null,_0x5c29x2[_0xd587[253]][_0xd587[1562]]=  new mxRectangle(_0x5c29x2[_0xd587[235]],_0x5c29x2[_0xd587[236]],_0x5c29x2[_0xd587[117]],_0x5c29x2[_0xd587[119]]),_0x5c29x2[_0xd587[253]][_0xd587[255]]= _0x5c29x2[_0xd587[441]][_0xd587[255]],null== _0x5c29x4|| _0x5c29x4?_0x5c29x2[_0xd587[253]][_0xd587[258]]():_0x5c29x2[_0xd587[253]][_0xd587[1577]]()};if(null== _0x5c29x4|| _0x5c29x4){this[_0xd587[2217]](_0x5c29x2,_0x5c29x5),this[_0xd587[2222]](_0x5c29x2,_0x5c29x5),this[_0xd587[2223]](_0x5c29x2,_0x5c29x5)}}};mxCellRenderer[_0xd587[202]][_0xd587[515]]= function(_0x5c29x2){null!= _0x5c29x2[_0xd587[253]]&& (null!= _0x5c29x2[_0xd587[963]]&& (_0x5c29x2[_0xd587[963]][_0xd587[515]](),_0x5c29x2[_0xd587[963]]= null),null!= _0x5c29x2[_0xd587[1211]]&& (_0x5c29x2[_0xd587[1211]][_0xd587[209]](function(_0x5c29x2,_0x5c29x4){_0x5c29x4[_0xd587[515]]()}),_0x5c29x2[_0xd587[1211]]= null),null!= _0x5c29x2[_0xd587[2207]]&& (_0x5c29x2[_0xd587[2207]][_0xd587[515]](),_0x5c29x2[_0xd587[2207]]= null),_0x5c29x2[_0xd587[253]][_0xd587[515]](),_0x5c29x2[_0xd587[253]]= null)};var mxEdgeStyle={EntityRelation:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=_0x5c29x2[_0xd587[441]],_0x5c29x12=_0x5c29xa[_0xd587[1179]];_0x5c29x5= mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_SEGMENT,mxConstants.ENTITY_SEGMENT)* _0x5c29xa[_0xd587[255]];var _0x5c29x13=_0x5c29x2[_0xd587[439]],_0x5c29x14=_0x5c29x13[0],_0x5c29x15=_0x5c29x13[_0x5c29x13[_0xd587[67]]- 1],_0x5c29x13=!1;if(null!= _0x5c29x14){_0x5c29x3=  new mxCellState,_0x5c29x3[_0xd587[235]]= _0x5c29x14[_0xd587[235]],_0x5c29x3[_0xd587[236]]= _0x5c29x14[_0xd587[236]]}else {if(null!= _0x5c29x3){var _0x5c29x16=mxUtils[_0xd587[2227]](_0x5c29x3,_0x5c29x2,!0,mxConstants.DIRECTION_MASK_NONE);_0x5c29x16!= mxConstants[_0xd587[434]]?_0x5c29x13= _0x5c29x16== mxConstants[_0xd587[436]]:(_0x5c29x14= _0x5c29x12[_0xd587[1198]](_0x5c29x3[_0xd587[246]]),_0x5c29x14[_0xd587[1500]]?_0x5c29x13= 0.5>= _0x5c29x14[_0xd587[235]]:null!= _0x5c29x4&& (_0x5c29x13= _0x5c29x4[_0xd587[235]]+ _0x5c29x4[_0xd587[117]]< _0x5c29x3[_0xd587[235]]))}else {return}};_0x5c29x14=  !0;null!= _0x5c29x15?(_0x5c29x4=  new mxCellState,_0x5c29x4[_0xd587[235]]= _0x5c29x15[_0xd587[235]],_0x5c29x4[_0xd587[236]]= _0x5c29x15[_0xd587[236]]):null!= _0x5c29x4&& (_0x5c29x16= mxUtils[_0xd587[2227]](_0x5c29x4,_0x5c29x2,!1,mxConstants.DIRECTION_MASK_NONE),_0x5c29x16!= mxConstants[_0xd587[434]]?_0x5c29x14= _0x5c29x16== mxConstants[_0xd587[436]]:(_0x5c29x2= _0x5c29x12[_0xd587[1198]](_0x5c29x4[_0xd587[246]]),_0x5c29x2[_0xd587[1500]]?_0x5c29x14= 0.5>= _0x5c29x2[_0xd587[235]]:null!= _0x5c29x3&& (_0x5c29x14= _0x5c29x3[_0xd587[235]]+ _0x5c29x3[_0xd587[117]]< _0x5c29x4[_0xd587[235]])));null!= _0x5c29x3&& null!= _0x5c29x4&& (_0x5c29x2= _0x5c29x13?_0x5c29x3[_0xd587[235]]:_0x5c29x3[_0xd587[235]]+ _0x5c29x3[_0xd587[117]],_0x5c29x3= _0x5c29xa[_0xd587[2228]](_0x5c29x3),_0x5c29x12= _0x5c29x14?_0x5c29x4[_0xd587[235]]:_0x5c29x4[_0xd587[235]]+ _0x5c29x4[_0xd587[117]],_0x5c29x4= _0x5c29xa[_0xd587[2228]](_0x5c29x4),_0x5c29xa=  new mxPoint(_0x5c29x2+ (_0x5c29x13?-_0x5c29x5:_0x5c29x5),_0x5c29x3),_0x5c29x15=  new mxPoint(_0x5c29x12+ (_0x5c29x14?-_0x5c29x5:_0x5c29x5),_0x5c29x4),_0x5c29x13== _0x5c29x14?(_0x5c29x5= _0x5c29x13?Math[_0xd587[243]](_0x5c29x2,_0x5c29x12)- _0x5c29x5:Math[_0xd587[160]](_0x5c29x2,_0x5c29x12)+ _0x5c29x5,_0x5c29x9[_0xd587[207]]( new mxPoint(_0x5c29x5,_0x5c29x3)),_0x5c29x9[_0xd587[207]]( new mxPoint(_0x5c29x5,_0x5c29x4))):(_0x5c29xa[_0xd587[235]]< _0x5c29x15[_0xd587[235]]== _0x5c29x13?(_0x5c29x5= _0x5c29x3+ (_0x5c29x4- _0x5c29x3)/ 2,_0x5c29x9[_0xd587[207]](_0x5c29xa),_0x5c29x9[_0xd587[207]]( new mxPoint(_0x5c29xa[_0xd587[235]],_0x5c29x5)),_0x5c29x9[_0xd587[207]]( new mxPoint(_0x5c29x15[_0xd587[235]],_0x5c29x5))):_0x5c29x9[_0xd587[207]](_0x5c29xa),_0x5c29x9[_0xd587[207]](_0x5c29x15)))},Loop:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){if(null!= _0x5c29x3){_0x5c29x4= _0x5c29x2[_0xd587[441]];var _0x5c29xa=_0x5c29x4[_0xd587[1179]];_0x5c29x5= null!= _0x5c29x5&& 0< _0x5c29x5[_0xd587[67]]?_0x5c29x5[0]:null;null!= _0x5c29x5&& (_0x5c29x5= _0x5c29x4[_0xd587[2229]](_0x5c29x2,_0x5c29x5),mxUtils[_0xd587[442]](_0x5c29x3,_0x5c29x5[_0xd587[235]],_0x5c29x5[_0xd587[236]])&& (_0x5c29x5= null));var _0x5c29x12=0,_0x5c29x13=0,_0x5c29x14=0,_0x5c29x15=0,_0x5c29xa=mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_SEGMENT,_0x5c29xa[_0xd587[1020]])* _0x5c29x4[_0xd587[255]];_0x5c29x2= mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_WEST);_0x5c29x2== mxConstants[_0xd587[1358]]|| _0x5c29x2== mxConstants[_0xd587[1354]]?(_0x5c29x12= _0x5c29x4[_0xd587[2230]](_0x5c29x3),_0x5c29x13= _0x5c29xa):(_0x5c29x14= _0x5c29x4[_0xd587[2228]](_0x5c29x3),_0x5c29x15= _0x5c29xa);null== _0x5c29x5|| _0x5c29x5[_0xd587[235]]< _0x5c29x3[_0xd587[235]]|| _0x5c29x5[_0xd587[235]]> _0x5c29x3[_0xd587[235]]+ _0x5c29x3[_0xd587[117]]?null!= _0x5c29x5?(_0x5c29x12= _0x5c29x5[_0xd587[235]],_0x5c29x15= Math[_0xd587[160]](Math[_0xd587[425]](_0x5c29x14- _0x5c29x5[_0xd587[236]]),_0x5c29x15)):_0x5c29x2== mxConstants[_0xd587[1358]]?_0x5c29x14= _0x5c29x3[_0xd587[236]]- 2* _0x5c29x13:_0x5c29x2== mxConstants[_0xd587[1354]]?_0x5c29x14= _0x5c29x3[_0xd587[236]]+ _0x5c29x3[_0xd587[119]]+ 2* _0x5c29x13:_0x5c29x12= _0x5c29x2== mxConstants[_0xd587[1356]]?_0x5c29x3[_0xd587[235]]- 2* _0x5c29x15:_0x5c29x3[_0xd587[235]]+ _0x5c29x3[_0xd587[117]]+ 2* _0x5c29x15:null!= _0x5c29x5&& (_0x5c29x12= _0x5c29x4[_0xd587[2230]](_0x5c29x3),_0x5c29x13= Math[_0xd587[160]](Math[_0xd587[425]](_0x5c29x12- _0x5c29x5[_0xd587[235]]),_0x5c29x15),_0x5c29x14= _0x5c29x5[_0xd587[236]],_0x5c29x15= 0);_0x5c29x9[_0xd587[207]]( new mxPoint(_0x5c29x12- _0x5c29x13,_0x5c29x14- _0x5c29x15));_0x5c29x9[_0xd587[207]]( new mxPoint(_0x5c29x12+ _0x5c29x13,_0x5c29x14+ _0x5c29x15))}},ElbowConnector:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=null!= _0x5c29x5&& 0< _0x5c29x5[_0xd587[67]]?_0x5c29x5[0]:null,_0x5c29x12=!1,_0x5c29x13=!1;if(null!= _0x5c29x3&& null!= _0x5c29x4){if(null!= _0x5c29xa){var _0x5c29x14=Math[_0xd587[243]](_0x5c29x3[_0xd587[235]],_0x5c29x4[_0xd587[235]]),_0x5c29x15=Math[_0xd587[160]](_0x5c29x3[_0xd587[235]]+ _0x5c29x3[_0xd587[117]],_0x5c29x4[_0xd587[235]]+ _0x5c29x4[_0xd587[117]]),_0x5c29x13=Math[_0xd587[243]](_0x5c29x3[_0xd587[236]],_0x5c29x4[_0xd587[236]]),_0x5c29x16=Math[_0xd587[160]](_0x5c29x3[_0xd587[236]]+ _0x5c29x3[_0xd587[119]],_0x5c29x4[_0xd587[236]]+ _0x5c29x4[_0xd587[119]]),_0x5c29xa=_0x5c29x2[_0xd587[441]][_0xd587[2229]](_0x5c29x2,_0x5c29xa),_0x5c29x12=_0x5c29xa[_0xd587[236]]< _0x5c29x13|| _0x5c29xa[_0xd587[236]]> _0x5c29x16,_0x5c29x13=_0x5c29xa[_0xd587[235]]< _0x5c29x14|| _0x5c29xa[_0xd587[235]]> _0x5c29x15}else {_0x5c29x14= Math[_0xd587[160]](_0x5c29x3[_0xd587[235]],_0x5c29x4[_0xd587[235]]),_0x5c29x15= Math[_0xd587[243]](_0x5c29x3[_0xd587[235]]+ _0x5c29x3[_0xd587[117]],_0x5c29x4[_0xd587[235]]+ _0x5c29x4[_0xd587[117]]),_0x5c29x12= _0x5c29x14== _0x5c29x15,_0x5c29x12|| (_0x5c29x13= Math[_0xd587[160]](_0x5c29x3[_0xd587[236]],_0x5c29x4[_0xd587[236]]),_0x5c29x16= Math[_0xd587[243]](_0x5c29x3[_0xd587[236]]+ _0x5c29x3[_0xd587[119]],_0x5c29x4[_0xd587[236]]+ _0x5c29x4[_0xd587[119]]),_0x5c29x13= _0x5c29x13== _0x5c29x16)}};!_0x5c29x13&& (_0x5c29x12|| _0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2231]]]== mxConstants[_0xd587[2232]])?mxEdgeStyle.TopToBottom(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9):mxEdgeStyle.SideToSide(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9)},SideToSide:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=_0x5c29x2[_0xd587[441]];_0x5c29x5= null!= _0x5c29x5&& 0< _0x5c29x5[_0xd587[67]]?_0x5c29x5[0]:null;var _0x5c29x12=_0x5c29x2[_0xd587[439]],_0x5c29x13=_0x5c29x12[0],_0x5c29x12=_0x5c29x12[_0x5c29x12[_0xd587[67]]- 1];null!= _0x5c29x5&& (_0x5c29x5= _0x5c29xa[_0xd587[2229]](_0x5c29x2,_0x5c29x5));null!= _0x5c29x13&& (_0x5c29x3=  new mxCellState,_0x5c29x3[_0xd587[235]]= _0x5c29x13[_0xd587[235]],_0x5c29x3[_0xd587[236]]= _0x5c29x13[_0xd587[236]]);null!= _0x5c29x12&& (_0x5c29x4=  new mxCellState,_0x5c29x4[_0xd587[235]]= _0x5c29x12[_0xd587[235]],_0x5c29x4[_0xd587[236]]= _0x5c29x12[_0xd587[236]]);null!= _0x5c29x3&& null!= _0x5c29x4&& (_0x5c29x2= Math[_0xd587[160]](_0x5c29x3[_0xd587[235]],_0x5c29x4[_0xd587[235]]),_0x5c29x13= Math[_0xd587[243]](_0x5c29x3[_0xd587[235]]+ _0x5c29x3[_0xd587[117]],_0x5c29x4[_0xd587[235]]+ _0x5c29x4[_0xd587[117]]),_0x5c29x2= null!= _0x5c29x5?_0x5c29x5[_0xd587[235]]:_0x5c29x13+ (_0x5c29x2- _0x5c29x13)/ 2,_0x5c29x13= _0x5c29xa[_0xd587[2228]](_0x5c29x3),_0x5c29xa= _0x5c29xa[_0xd587[2228]](_0x5c29x4),null!= _0x5c29x5&& (_0x5c29x5[_0xd587[236]]>= _0x5c29x3[_0xd587[236]]&& _0x5c29x5[_0xd587[236]]<= _0x5c29x3[_0xd587[236]]+ _0x5c29x3[_0xd587[119]]&& (_0x5c29x13= _0x5c29x5[_0xd587[236]]),_0x5c29x5[_0xd587[236]]>= _0x5c29x4[_0xd587[236]]&& _0x5c29x5[_0xd587[236]]<= _0x5c29x4[_0xd587[236]]+ _0x5c29x4[_0xd587[119]]&& (_0x5c29xa= _0x5c29x5[_0xd587[236]])),!mxUtils[_0xd587[442]](_0x5c29x4,_0x5c29x2,_0x5c29x13)&& !mxUtils[_0xd587[442]](_0x5c29x3,_0x5c29x2,_0x5c29x13)&& _0x5c29x9[_0xd587[207]]( new mxPoint(_0x5c29x2,_0x5c29x13)),!mxUtils[_0xd587[442]](_0x5c29x4,_0x5c29x2,_0x5c29xa)&& !mxUtils[_0xd587[442]](_0x5c29x3,_0x5c29x2,_0x5c29xa)&& _0x5c29x9[_0xd587[207]]( new mxPoint(_0x5c29x2,_0x5c29xa)),1== _0x5c29x9[_0xd587[67]]&& (null!= _0x5c29x5?!mxUtils[_0xd587[442]](_0x5c29x4,_0x5c29x2,_0x5c29x5[_0xd587[236]])&& !mxUtils[_0xd587[442]](_0x5c29x3,_0x5c29x2,_0x5c29x5[_0xd587[236]])&& _0x5c29x9[_0xd587[207]]( new mxPoint(_0x5c29x2,_0x5c29x5[_0xd587[236]])):(_0x5c29xa= Math[_0xd587[160]](_0x5c29x3[_0xd587[236]],_0x5c29x4[_0xd587[236]]),_0x5c29x3= Math[_0xd587[243]](_0x5c29x3[_0xd587[236]]+ _0x5c29x3[_0xd587[119]],_0x5c29x4[_0xd587[236]]+ _0x5c29x4[_0xd587[119]]),_0x5c29x9[_0xd587[207]]( new mxPoint(_0x5c29x2,_0x5c29xa+ (_0x5c29x3- _0x5c29xa)/ 2)))))},TopToBottom:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=_0x5c29x2[_0xd587[441]];_0x5c29x5= null!= _0x5c29x5&& 0< _0x5c29x5[_0xd587[67]]?_0x5c29x5[0]:null;var _0x5c29x12=_0x5c29x2[_0xd587[439]],_0x5c29x13=_0x5c29x12[0],_0x5c29x12=_0x5c29x12[_0x5c29x12[_0xd587[67]]- 1];null!= _0x5c29x5&& (_0x5c29x5= _0x5c29xa[_0xd587[2229]](_0x5c29x2,_0x5c29x5));null!= _0x5c29x13&& (_0x5c29x3=  new mxCellState,_0x5c29x3[_0xd587[235]]= _0x5c29x13[_0xd587[235]],_0x5c29x3[_0xd587[236]]= _0x5c29x13[_0xd587[236]]);null!= _0x5c29x12&& (_0x5c29x4=  new mxCellState,_0x5c29x4[_0xd587[235]]= _0x5c29x12[_0xd587[235]],_0x5c29x4[_0xd587[236]]= _0x5c29x12[_0xd587[236]]);null!= _0x5c29x3&& null!= _0x5c29x4&& (_0x5c29x13= Math[_0xd587[160]](_0x5c29x3[_0xd587[236]],_0x5c29x4[_0xd587[236]]),_0x5c29x12= Math[_0xd587[243]](_0x5c29x3[_0xd587[236]]+ _0x5c29x3[_0xd587[119]],_0x5c29x4[_0xd587[236]]+ _0x5c29x4[_0xd587[119]]),_0x5c29x2= _0x5c29xa[_0xd587[2230]](_0x5c29x3),null!= _0x5c29x5&& (_0x5c29x5[_0xd587[235]]>= _0x5c29x3[_0xd587[235]]&& _0x5c29x5[_0xd587[235]]<= _0x5c29x3[_0xd587[235]]+ _0x5c29x3[_0xd587[117]])&& (_0x5c29x2= _0x5c29x5[_0xd587[235]]),_0x5c29x13= null!= _0x5c29x5?_0x5c29x5[_0xd587[236]]:_0x5c29x12+ (_0x5c29x13- _0x5c29x12)/ 2,!mxUtils[_0xd587[442]](_0x5c29x4,_0x5c29x2,_0x5c29x13)&& !mxUtils[_0xd587[442]](_0x5c29x3,_0x5c29x2,_0x5c29x13)&& _0x5c29x9[_0xd587[207]]( new mxPoint(_0x5c29x2,_0x5c29x13)),_0x5c29x2= null!= _0x5c29x5&& _0x5c29x5[_0xd587[235]]>= _0x5c29x4[_0xd587[235]]&& _0x5c29x5[_0xd587[235]]<= _0x5c29x4[_0xd587[235]]+ _0x5c29x4[_0xd587[117]]?_0x5c29x5[_0xd587[235]]:_0x5c29xa[_0xd587[2230]](_0x5c29x4),!mxUtils[_0xd587[442]](_0x5c29x4,_0x5c29x2,_0x5c29x13)&& !mxUtils[_0xd587[442]](_0x5c29x3,_0x5c29x2,_0x5c29x13)&& _0x5c29x9[_0xd587[207]]( new mxPoint(_0x5c29x2,_0x5c29x13)),1== _0x5c29x9[_0xd587[67]]&& (null!= _0x5c29x5&& 1== _0x5c29x9[_0xd587[67]]?!mxUtils[_0xd587[442]](_0x5c29x4,_0x5c29x5[_0xd587[235]],_0x5c29x13)&& !mxUtils[_0xd587[442]](_0x5c29x3,_0x5c29x5[_0xd587[235]],_0x5c29x13)&& _0x5c29x9[_0xd587[207]]( new mxPoint(_0x5c29x5[_0xd587[235]],_0x5c29x13)):(_0x5c29xa= Math[_0xd587[160]](_0x5c29x3[_0xd587[235]],_0x5c29x4[_0xd587[235]]),_0x5c29x3= Math[_0xd587[243]](_0x5c29x3[_0xd587[235]]+ _0x5c29x3[_0xd587[117]],_0x5c29x4[_0xd587[235]]+ _0x5c29x4[_0xd587[117]]),_0x5c29x9[_0xd587[207]]( new mxPoint(_0x5c29xa+ (_0x5c29x3- _0x5c29xa)/ 2,_0x5c29x13)))))},SegmentConnector:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=_0x5c29x2[_0xd587[439]],_0x5c29x12=!0,_0x5c29x13=null,_0x5c29x14=_0x5c29xa[0];null== _0x5c29x14&& null!= _0x5c29x3?_0x5c29x14=  new mxPoint(_0x5c29x2[_0xd587[441]][_0xd587[2230]](_0x5c29x3),_0x5c29x2[_0xd587[441]][_0xd587[2228]](_0x5c29x3)):null!= _0x5c29x14&& (_0x5c29x14= _0x5c29x14[_0xd587[238]]());var _0x5c29x15=_0x5c29xa[_0xd587[67]]- 1;if(null!= _0x5c29x5&& 0< _0x5c29x5[_0xd587[67]]){for(var _0x5c29x13=_0x5c29x2[_0xd587[441]][_0xd587[2229]](_0x5c29x2,_0x5c29x5[0]),_0x5c29x16=_0x5c29x3,_0x5c29x17=_0x5c29xa[0],_0x5c29x18=!1,_0x5c29x19=!1,_0x5c29x18=_0x5c29x13,_0x5c29x1a=_0x5c29x5[_0xd587[67]],_0x5c29x1b=0;2> _0x5c29x1b;_0x5c29x1b++){var _0x5c29x1c=null!= _0x5c29x17&& _0x5c29x17[_0xd587[235]]== _0x5c29x18[_0xd587[235]],_0x5c29x1d=null!= _0x5c29x17&& _0x5c29x17[_0xd587[236]]== _0x5c29x18[_0xd587[236]],_0x5c29x1e=null!= _0x5c29x16&& _0x5c29x18[_0xd587[236]]>= _0x5c29x16[_0xd587[236]]&& _0x5c29x18[_0xd587[236]]<= _0x5c29x16[_0xd587[236]]+ _0x5c29x16[_0xd587[119]],_0x5c29x16=null!= _0x5c29x16&& _0x5c29x18[_0xd587[235]]>= _0x5c29x16[_0xd587[235]]&& _0x5c29x18[_0xd587[235]]<= _0x5c29x16[_0xd587[235]]+ _0x5c29x16[_0xd587[117]],_0x5c29x18=_0x5c29x1d|| null== _0x5c29x17&& _0x5c29x1e,_0x5c29x19=_0x5c29x1c|| null== _0x5c29x17&& _0x5c29x16;if(null!= _0x5c29x17&& !_0x5c29x1d&& !_0x5c29x1c&& (_0x5c29x1e|| _0x5c29x16)){_0x5c29x12= _0x5c29x1e?!1:!0;break};if(_0x5c29x19|| _0x5c29x18){_0x5c29x12= _0x5c29x18;1== _0x5c29x1b&& (_0x5c29x12= 0== _0x5c29x5[_0xd587[67]]% 2?_0x5c29x18:_0x5c29x19);break};_0x5c29x16= _0x5c29x4;_0x5c29x17= _0x5c29xa[_0x5c29x15];_0x5c29x18= _0x5c29x2[_0xd587[441]][_0xd587[2229]](_0x5c29x2,_0x5c29x5[_0x5c29x1a- 1])};_0x5c29x12&& (null!= _0x5c29xa[0]&& _0x5c29xa[0][_0xd587[236]]!= _0x5c29x13[_0xd587[236]]|| null== _0x5c29xa[0]&& null!= _0x5c29x3&& (_0x5c29x13[_0xd587[236]]< _0x5c29x3[_0xd587[236]]|| _0x5c29x13[_0xd587[236]]> _0x5c29x3[_0xd587[236]]+ _0x5c29x3[_0xd587[119]]))?_0x5c29x9[_0xd587[207]]( new mxPoint(_0x5c29x14[_0xd587[235]],_0x5c29x13[_0xd587[236]])):!_0x5c29x12&& (null!= _0x5c29xa[0]&& _0x5c29xa[0][_0xd587[235]]!= _0x5c29x13[_0xd587[235]]|| null== _0x5c29xa[0]&& null!= _0x5c29x3&& (_0x5c29x13[_0xd587[235]]< _0x5c29x3[_0xd587[235]]|| _0x5c29x13[_0xd587[235]]> _0x5c29x3[_0xd587[235]]+ _0x5c29x3[_0xd587[117]]))&& _0x5c29x9[_0xd587[207]]( new mxPoint(_0x5c29x13[_0xd587[235]],_0x5c29x14[_0xd587[236]]));_0x5c29x12?_0x5c29x14[_0xd587[236]]= _0x5c29x13[_0xd587[236]]:_0x5c29x14[_0xd587[235]]= _0x5c29x13[_0xd587[235]];for(_0x5c29x1b= 0;_0x5c29x1b< _0x5c29x5[_0xd587[67]];_0x5c29x1b++){_0x5c29x12=  !_0x5c29x12,_0x5c29x13= _0x5c29x2[_0xd587[441]][_0xd587[2229]](_0x5c29x2,_0x5c29x5[_0x5c29x1b]),_0x5c29x12?_0x5c29x14[_0xd587[236]]= _0x5c29x13[_0xd587[236]]:_0x5c29x14[_0xd587[235]]= _0x5c29x13[_0xd587[235]],_0x5c29x9[_0xd587[207]](_0x5c29x14[_0xd587[238]]())}}else {_0x5c29x13= _0x5c29x14,_0x5c29x12=  !0};_0x5c29x14= _0x5c29xa[_0x5c29x15];null== _0x5c29x14&& null!= _0x5c29x4&& (_0x5c29x14=  new mxPoint(_0x5c29x2[_0xd587[441]][_0xd587[2230]](_0x5c29x4),_0x5c29x2[_0xd587[441]][_0xd587[2228]](_0x5c29x4)));_0x5c29x12&& (null!= _0x5c29xa[_0x5c29x15]&& _0x5c29xa[_0x5c29x15][_0xd587[236]]!= _0x5c29x13[_0xd587[236]]|| null== _0x5c29xa[_0x5c29x15]&& null!= _0x5c29x4&& (_0x5c29x13[_0xd587[236]]< _0x5c29x4[_0xd587[236]]|| _0x5c29x13[_0xd587[236]]> _0x5c29x4[_0xd587[236]]+ _0x5c29x4[_0xd587[119]]))?_0x5c29x9[_0xd587[207]]( new mxPoint(_0x5c29x14[_0xd587[235]],_0x5c29x13[_0xd587[236]])):!_0x5c29x12&& (null!= _0x5c29xa[_0x5c29x15]&& _0x5c29xa[_0x5c29x15][_0xd587[235]]!= _0x5c29x13[_0xd587[235]]|| null== _0x5c29xa[_0x5c29x15]&& null!= _0x5c29x4&& (_0x5c29x13[_0xd587[235]]< _0x5c29x4[_0xd587[235]]|| _0x5c29x13[_0xd587[235]]> _0x5c29x4[_0xd587[235]]+ _0x5c29x4[_0xd587[117]]))&& _0x5c29x9[_0xd587[207]]( new mxPoint(_0x5c29x13[_0xd587[235]],_0x5c29x14[_0xd587[236]]));if(null== _0x5c29xa[0]&& null!= _0x5c29x3){for(;1< _0x5c29x9[_0xd587[67]]&& mxUtils[_0xd587[442]](_0x5c29x3,_0x5c29x9[1][_0xd587[235]],_0x5c29x9[1][_0xd587[236]]);){_0x5c29x9= _0x5c29x9[_0xd587[300]](1,1)}};if(null== _0x5c29xa[_0x5c29x15]&& null!= _0x5c29x4){for(;1< _0x5c29x9[_0xd587[67]]&& mxUtils[_0xd587[442]](_0x5c29x4,_0x5c29x9[_0x5c29x9[_0xd587[67]]- 1][_0xd587[235]],_0x5c29x9[_0x5c29x9[_0xd587[67]]- 1][_0xd587[236]]);){_0x5c29x9= _0x5c29x9[_0xd587[300]](_0x5c29x9[_0xd587[67]]- 1,1)}}},orthBuffer:10,dirVectors:[[-1,0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,OrthConnector:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=_0x5c29x2[_0xd587[441]][_0xd587[1179]],_0x5c29x12=null== _0x5c29x3?!1:_0x5c29xa[_0xd587[502]]()[_0xd587[250]](_0x5c29x3[_0xd587[246]]),_0x5c29xa=null== _0x5c29x4?!1:_0x5c29xa[_0xd587[502]]()[_0xd587[250]](_0x5c29x4[_0xd587[246]]);if(null!= _0x5c29x5&& 0< _0x5c29x5[_0xd587[67]]|| _0x5c29x12|| _0x5c29xa){mxEdgeStyle.SegmentConnector(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9)}else {_0x5c29x5= _0x5c29x2[_0xd587[439]];var _0x5c29x13=_0x5c29x5[0],_0x5c29x14=_0x5c29x5[_0x5c29x5[_0xd587[67]]- 1];_0x5c29x5= null!= _0x5c29x3?_0x5c29x3[_0xd587[235]]:_0x5c29x13[_0xd587[235]];var _0x5c29x12=null!= _0x5c29x3?_0x5c29x3[_0xd587[236]]:_0x5c29x13[_0xd587[236]],_0x5c29x15=null!= _0x5c29x3?_0x5c29x3[_0xd587[117]]:1,_0x5c29x16=null!= _0x5c29x3?_0x5c29x3[_0xd587[119]]:1,_0x5c29x17=null!= _0x5c29x4?_0x5c29x4[_0xd587[235]]:_0x5c29x14[_0xd587[235]],_0x5c29x18=null!= _0x5c29x4?_0x5c29x4[_0xd587[236]]:_0x5c29x14[_0xd587[236]],_0x5c29x19=null!= _0x5c29x4?_0x5c29x4[_0xd587[117]]:1,_0x5c29x1a=null!= _0x5c29x4?_0x5c29x4[_0xd587[119]]:1,_0x5c29xa=_0x5c29x2[_0xd587[441]][_0xd587[255]]* mxEdgeStyle[_0xd587[2233]],_0x5c29x1b=[mxConstants[_0xd587[2234]],mxConstants[_0xd587[2234]]];null!= _0x5c29x3&& (_0x5c29x1b[0]= mxUtils[_0xd587[2227]](_0x5c29x3,_0x5c29x2,!0,mxConstants.DIRECTION_MASK_ALL));null!= _0x5c29x4&& (_0x5c29x1b[1]= mxUtils[_0xd587[2227]](_0x5c29x4,_0x5c29x2,!1,mxConstants.DIRECTION_MASK_ALL));_0x5c29x2= [0,0];_0x5c29x5= [[_0x5c29x5,_0x5c29x12,_0x5c29x15,_0x5c29x16],[_0x5c29x17,_0x5c29x18,_0x5c29x19,_0x5c29x1a]];for(_0x5c29x15= 0;2> _0x5c29x15;_0x5c29x15++){mxEdgeStyle[_0xd587[2235]][_0x5c29x15][1]= _0x5c29x5[_0x5c29x15][0]- _0x5c29xa,mxEdgeStyle[_0xd587[2235]][_0x5c29x15][2]= _0x5c29x5[_0x5c29x15][1]- _0x5c29xa,mxEdgeStyle[_0xd587[2235]][_0x5c29x15][4]= _0x5c29x5[_0x5c29x15][0]+ _0x5c29x5[_0x5c29x15][2]+ _0x5c29xa,mxEdgeStyle[_0xd587[2235]][_0x5c29x15][8]= _0x5c29x5[_0x5c29x15][1]+ _0x5c29x5[_0x5c29x15][3]+ _0x5c29xa};_0x5c29x15= _0x5c29x5[0][0]+ _0x5c29x5[0][2]/ 2- (_0x5c29x5[1][0]+ _0x5c29x5[1][2]/ 2);_0x5c29x16= _0x5c29x5[0][1]+ _0x5c29x5[0][3]/ 2- (_0x5c29x5[1][1]+ _0x5c29x5[1][3]/ 2);_0x5c29x12= 0;0> _0x5c29x15?_0x5c29x12= 0> _0x5c29x16?2:1:0>= _0x5c29x16&& (_0x5c29x12= 3,0== _0x5c29x15&& (_0x5c29x12= 2));_0x5c29x16= null;null!= _0x5c29x3&& (_0x5c29x16= _0x5c29x13);_0x5c29x3= [[0.5,0.5],[0.5,0.5]];for(_0x5c29x15= 0;2> _0x5c29x15;_0x5c29x15++){null!= _0x5c29x16&& (_0x5c29x3[_0x5c29x15][0]= (_0x5c29x16[_0xd587[235]]- _0x5c29x5[_0x5c29x15][0])/ _0x5c29x5[_0x5c29x15][2],0.01> _0x5c29x3[_0x5c29x15][0]?_0x5c29x2[_0x5c29x15]= mxConstants[_0xd587[436]]:0.99< _0x5c29x3[_0x5c29x15][0]&& (_0x5c29x2[_0x5c29x15]= mxConstants[_0xd587[438]]),_0x5c29x3[_0x5c29x15][1]= (_0x5c29x16[_0xd587[236]]- _0x5c29x5[_0x5c29x15][1])/ _0x5c29x5[_0x5c29x15][3],0.01> _0x5c29x3[_0x5c29x15][1]?_0x5c29x2[_0x5c29x15]= mxConstants[_0xd587[435]]:0.99< _0x5c29x3[_0x5c29x15][1]&& (_0x5c29x2[_0x5c29x15]= mxConstants[_0xd587[437]])),_0x5c29x16= null,null!= _0x5c29x4&& (_0x5c29x16= _0x5c29x14)};_0x5c29x15= _0x5c29x5[0][1]- (_0x5c29x5[1][1]+ _0x5c29x5[1][3]);_0x5c29x16= _0x5c29x5[0][0]- (_0x5c29x5[1][0]+ _0x5c29x5[1][2]);_0x5c29x17= _0x5c29x5[1][1]- (_0x5c29x5[0][1]+ _0x5c29x5[0][3]);_0x5c29x18= _0x5c29x5[1][0]- (_0x5c29x5[0][0]+ _0x5c29x5[0][2]);mxEdgeStyle[_0xd587[2236]][1]= Math[_0xd587[160]](_0x5c29x16- 2* _0x5c29xa,0);mxEdgeStyle[_0xd587[2236]][2]= Math[_0xd587[160]](_0x5c29x15- 2* _0x5c29xa,0);mxEdgeStyle[_0xd587[2236]][4]= Math[_0xd587[160]](_0x5c29x17- 2* _0x5c29xa,0);mxEdgeStyle[_0xd587[2236]][3]= Math[_0xd587[160]](_0x5c29x18- 2* _0x5c29xa,0);_0x5c29x4= [];_0x5c29x13= [];_0x5c29x14= [];_0x5c29x13[0]= _0x5c29x16>= _0x5c29x18?mxConstants[_0xd587[436]]:mxConstants[_0xd587[438]];_0x5c29x14[0]= _0x5c29x15>= _0x5c29x17?mxConstants[_0xd587[435]]:mxConstants[_0xd587[437]];_0x5c29x13[1]= mxUtils[_0xd587[2237]](_0x5c29x13[0]);_0x5c29x14[1]= mxUtils[_0xd587[2237]](_0x5c29x14[0]);_0x5c29x16= _0x5c29x16>= _0x5c29x18?_0x5c29x16:_0x5c29x18;_0x5c29x17= _0x5c29x15>= _0x5c29x17?_0x5c29x15:_0x5c29x17;_0x5c29x18= [[0,0],[0,0]];_0x5c29x19=  !1;for(_0x5c29x15= 0;2> _0x5c29x15;_0x5c29x15++){0== _0x5c29x2[_0x5c29x15]&& (0== (_0x5c29x13[_0x5c29x15]& _0x5c29x1b[_0x5c29x15])&& (_0x5c29x13[_0x5c29x15]= mxUtils[_0xd587[2237]](_0x5c29x13[_0x5c29x15])),0== (_0x5c29x14[_0x5c29x15]& _0x5c29x1b[_0x5c29x15])&& (_0x5c29x14[_0x5c29x15]= mxUtils[_0xd587[2237]](_0x5c29x14[_0x5c29x15])),_0x5c29x18[_0x5c29x15][0]= _0x5c29x14[_0x5c29x15],_0x5c29x18[_0x5c29x15][1]= _0x5c29x13[_0x5c29x15])};_0x5c29x17> 2* _0x5c29xa&& _0x5c29x16> 2* _0x5c29xa&& (0< (_0x5c29x13[0]& _0x5c29x1b[0])&& 0< (_0x5c29x14[1]& _0x5c29x1b[1])?(_0x5c29x18[0][0]= _0x5c29x13[0],_0x5c29x18[0][1]= _0x5c29x14[0],_0x5c29x18[1][0]= _0x5c29x14[1],_0x5c29x18[1][1]= _0x5c29x13[1],_0x5c29x19=  !0):0< (_0x5c29x14[0]& _0x5c29x1b[0])&& 0< (_0x5c29x13[1]& _0x5c29x1b[1])&& (_0x5c29x18[0][0]= _0x5c29x14[0],_0x5c29x18[0][1]= _0x5c29x13[0],_0x5c29x18[1][0]= _0x5c29x13[1],_0x5c29x18[1][1]= _0x5c29x14[1],_0x5c29x19=  !0));_0x5c29x17> 2* _0x5c29xa&& !_0x5c29x19&& (_0x5c29x18[0][0]= _0x5c29x14[0],_0x5c29x18[0][1]= _0x5c29x13[0],_0x5c29x18[1][0]= _0x5c29x14[1],_0x5c29x18[1][1]= _0x5c29x13[1],_0x5c29x19=  !0);_0x5c29x16> 2* _0x5c29xa&& !_0x5c29x19&& (_0x5c29x18[0][0]= _0x5c29x13[0],_0x5c29x18[0][1]= _0x5c29x14[0],_0x5c29x18[1][0]= _0x5c29x13[1],_0x5c29x18[1][1]= _0x5c29x14[1]);for(_0x5c29x15= 0;2> _0x5c29x15;_0x5c29x15++){if(0== _0x5c29x2[_0x5c29x15]&& (0== (_0x5c29x18[_0x5c29x15][0]& _0x5c29x1b[_0x5c29x15])&& (_0x5c29x18[_0x5c29x15][0]= _0x5c29x18[_0x5c29x15][1]),_0x5c29x4[_0x5c29x15]= _0x5c29x18[_0x5c29x15][0]& _0x5c29x1b[_0x5c29x15],_0x5c29x4[_0x5c29x15]|= (_0x5c29x18[_0x5c29x15][1]& _0x5c29x1b[_0x5c29x15])<< 8,_0x5c29x4[_0x5c29x15]|= (_0x5c29x18[1- _0x5c29x15][_0x5c29x15]& _0x5c29x1b[_0x5c29x15])<< 16,_0x5c29x4[_0x5c29x15]|= (_0x5c29x18[1- _0x5c29x15][1- _0x5c29x15]& _0x5c29x1b[_0x5c29x15])<< 24,0== (_0x5c29x4[_0x5c29x15]& 15)&& (_0x5c29x4[_0x5c29x15]<<= 8),0== (_0x5c29x4[_0x5c29x15]& 3840)&& (_0x5c29x4[_0x5c29x15]= _0x5c29x4[_0x5c29x15]& 15| _0x5c29x4[_0x5c29x15]>> 8),0== (_0x5c29x4[_0x5c29x15]& 983040)&& (_0x5c29x4[_0x5c29x15]= _0x5c29x4[_0x5c29x15]& 65535| (_0x5c29x4[_0x5c29x15]& 251658240)>> 8),_0x5c29x2[_0x5c29x15]= _0x5c29x4[_0x5c29x15]& 15,_0x5c29x1b[_0x5c29x15]== mxConstants[_0xd587[436]]|| _0x5c29x1b[_0x5c29x15]== mxConstants[_0xd587[435]]|| _0x5c29x1b[_0x5c29x15]== mxConstants[_0xd587[438]]|| _0x5c29x1b[_0x5c29x15]== mxConstants[_0xd587[437]])){_0x5c29x2[_0x5c29x15]= _0x5c29x1b[_0x5c29x15]}};_0x5c29x15= _0x5c29x2[0]== mxConstants[_0xd587[438]]?3:_0x5c29x2[0];_0x5c29x1b= _0x5c29x2[1]== mxConstants[_0xd587[438]]?3:_0x5c29x2[1];_0x5c29x15-= _0x5c29x12;_0x5c29x1b-= _0x5c29x12;1> _0x5c29x15&& (_0x5c29x15+= 4);1> _0x5c29x1b&& (_0x5c29x1b+= 4);_0x5c29x1b= mxEdgeStyle[_0xd587[2238]][_0x5c29x15- 1][_0x5c29x1b- 1];mxEdgeStyle[_0xd587[2239]][0][0]= _0x5c29x5[0][0];mxEdgeStyle[_0xd587[2239]][0][1]= _0x5c29x5[0][1];switch(_0x5c29x2[0]){case mxConstants[_0xd587[436]]:mxEdgeStyle[_0xd587[2239]][0][0]-= _0x5c29xa;mxEdgeStyle[_0xd587[2239]][0][1]+= _0x5c29x3[0][1]* _0x5c29x5[0][3];break;case mxConstants[_0xd587[437]]:mxEdgeStyle[_0xd587[2239]][0][0]+= _0x5c29x3[0][0]* _0x5c29x5[0][2];mxEdgeStyle[_0xd587[2239]][0][1]+= _0x5c29x5[0][3]+ _0x5c29xa;break;case mxConstants[_0xd587[438]]:mxEdgeStyle[_0xd587[2239]][0][0]+= _0x5c29x5[0][2]+ _0x5c29xa;mxEdgeStyle[_0xd587[2239]][0][1]+= _0x5c29x3[0][1]* _0x5c29x5[0][3];break;case mxConstants[_0xd587[435]]:mxEdgeStyle[_0xd587[2239]][0][0]+= _0x5c29x3[0][0]* _0x5c29x5[0][2],mxEdgeStyle[_0xd587[2239]][0][1]-= _0x5c29xa};_0x5c29xa= 0;_0x5c29x13= _0x5c29x4= 0< (_0x5c29x2[0]& (mxConstants[_0xd587[438]]| mxConstants[_0xd587[436]]))?0:1;for(_0x5c29x15= _0x5c29x14= 0;_0x5c29x15< _0x5c29x1b[_0xd587[67]];_0x5c29x15++){_0x5c29x14= _0x5c29x1b[_0x5c29x15]& 15;_0x5c29x1a= _0x5c29x14== mxConstants[_0xd587[438]]?3:_0x5c29x14;_0x5c29x1a+= _0x5c29x12;4< _0x5c29x1a&& (_0x5c29x1a-= 4);_0x5c29x16= mxEdgeStyle[_0xd587[2240]][_0x5c29x1a- 1];_0x5c29x14= 0< _0x5c29x1a% 2?0:1;_0x5c29x14!= _0x5c29x4&& (_0x5c29xa++,mxEdgeStyle[_0xd587[2239]][_0x5c29xa][0]= mxEdgeStyle[_0xd587[2239]][_0x5c29xa- 1][0],mxEdgeStyle[_0xd587[2239]][_0x5c29xa][1]= mxEdgeStyle[_0xd587[2239]][_0x5c29xa- 1][1]);var _0x5c29x1c=0< (_0x5c29x1b[_0x5c29x15]& mxEdgeStyle[_0xd587[2241]]),_0x5c29x19=0< (_0x5c29x1b[_0x5c29x15]& mxEdgeStyle[_0xd587[2242]]),_0x5c29x17=(_0x5c29x1b[_0x5c29x15]& mxEdgeStyle[_0xd587[2243]])>> 5,_0x5c29x17=_0x5c29x17<< _0x5c29x12;15< _0x5c29x17&& (_0x5c29x17>>= 4);_0x5c29x18= 0< (_0x5c29x1b[_0x5c29x15]& mxEdgeStyle[_0xd587[2244]]);(_0x5c29x19|| _0x5c29x1c)&& 9> _0x5c29x17?(_0x5c29x1a= 0,_0x5c29x19= _0x5c29x19?0:1,_0x5c29x1a= _0x5c29x18&& 0== _0x5c29x14?_0x5c29x5[_0x5c29x19][0]+ _0x5c29x3[_0x5c29x19][0]* _0x5c29x5[_0x5c29x19][2]:_0x5c29x18?_0x5c29x5[_0x5c29x19][1]+ _0x5c29x3[_0x5c29x19][1]* _0x5c29x5[_0x5c29x19][3]:mxEdgeStyle[_0xd587[2235]][_0x5c29x19][_0x5c29x17],0== _0x5c29x14?(_0x5c29x17= (_0x5c29x1a- mxEdgeStyle[_0xd587[2239]][_0x5c29xa][0])* _0x5c29x16[0],0< _0x5c29x17&& (mxEdgeStyle[_0xd587[2239]][_0x5c29xa][0]+= _0x5c29x16[0]* _0x5c29x17)):(_0x5c29x17= (_0x5c29x1a- mxEdgeStyle[_0xd587[2239]][_0x5c29xa][1])* _0x5c29x16[1],0< _0x5c29x17&& (mxEdgeStyle[_0xd587[2239]][_0x5c29xa][1]+= _0x5c29x16[1]* _0x5c29x17))):_0x5c29x18&& (mxEdgeStyle[_0xd587[2239]][_0x5c29xa][0]+= _0x5c29x16[0]* Math[_0xd587[425]](mxEdgeStyle[_0xd587[2236]][_0x5c29x1a]/ 2),mxEdgeStyle[_0xd587[2239]][_0x5c29xa][1]+= _0x5c29x16[1]* Math[_0xd587[425]](mxEdgeStyle[_0xd587[2236]][_0x5c29x1a]/ 2));0< _0x5c29xa&& mxEdgeStyle[_0xd587[2239]][_0x5c29xa][_0x5c29x14]== mxEdgeStyle[_0xd587[2239]][_0x5c29xa- 1][_0x5c29x14]?_0x5c29xa--:_0x5c29x4= _0x5c29x14};for(_0x5c29x15= 0;_0x5c29x15<= _0x5c29xa&&  !(_0x5c29x15== _0x5c29xa&& ((0< (_0x5c29x2[1]& (mxConstants[_0xd587[438]]| mxConstants[_0xd587[436]]))?0:1)== _0x5c29x13?0:1)!= (_0x5c29xa+ 1)% 2);_0x5c29x15++){_0x5c29x9[_0xd587[207]]( new mxPoint(mxEdgeStyle[_0xd587[2239]][_0x5c29x15][0],mxEdgeStyle[_0xd587[2239]][_0x5c29x15][1]))}}},getRoutePattern:function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=_0x5c29x2[0]== mxConstants[_0xd587[438]]?3:_0x5c29x2[0];_0x5c29x2= _0x5c29x2[1]== mxConstants[_0xd587[438]]?3:_0x5c29x2[1];_0x5c29x9-= _0x5c29x3;_0x5c29x2-= _0x5c29x3;1> _0x5c29x9&& (_0x5c29x9+= 4);1> _0x5c29x2&& (_0x5c29x2+= 4);_0x5c29x3= routePatterns[_0x5c29x9- 1][_0x5c29x2- 1];if(0== _0x5c29x4|| 0== _0x5c29x5){null!= inlineRoutePatterns[_0x5c29x9- 1][_0x5c29x2- 1]&& (_0x5c29x3= inlineRoutePatterns[_0x5c29x9- 1][_0x5c29x2- 1])};return _0x5c29x3}},mxStyleRegistry={values:[],putValue:function(_0x5c29x2,_0x5c29x3){mxStyleRegistry[_0xd587[2245]][_0x5c29x2]= _0x5c29x3},getValue:function(_0x5c29x2){return mxStyleRegistry[_0xd587[2245]][_0x5c29x2]},getName:function(_0x5c29x2){for(var _0x5c29x3 in mxStyleRegistry[_0xd587[2245]]){if(mxStyleRegistry[_0xd587[2245]][_0x5c29x3]== _0x5c29x2){return _0x5c29x3}};return null}};mxStyleRegistry[_0xd587[2246]](mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry[_0xd587[2246]](mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation);mxStyleRegistry[_0xd587[2246]](mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry[_0xd587[2246]](mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry[_0xd587[2246]](mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry[_0xd587[2246]](mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);mxStyleRegistry[_0xd587[2246]](mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry[_0xd587[2246]](mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter);mxStyleRegistry[_0xd587[2246]](mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry[_0xd587[2246]](mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry[_0xd587[2246]](mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);function mxGraphView(_0x5c29x2){this[_0xd587[1179]]= _0x5c29x2;this[_0xd587[513]]=  new mxPoint;this[_0xd587[2247]]=  new mxRectangle;this[_0xd587[1214]]=  new mxDictionary}mxGraphView[_0xd587[202]]=  new mxEventSource;mxGraphView[_0xd587[202]][_0xd587[196]]= mxGraphView;mxGraphView[_0xd587[202]][_0xd587[2248]]=  new mxPoint;mxGraphView[_0xd587[202]][_0xd587[2091]]= _0xd587[130]!= mxClient[_0xd587[90]]?_0xd587[819]:_0xd587[110];mxGraphView[_0xd587[202]][_0xd587[2249]]= _0xd587[130]!= mxClient[_0xd587[90]]?_0xd587[2250]:_0xd587[110];mxGraphView[_0xd587[202]][_0xd587[2251]]=  !1;mxGraphView[_0xd587[202]][_0xd587[2252]]=  !0;mxGraphView[_0xd587[202]][_0xd587[2253]]=  !0;mxGraphView[_0xd587[202]][_0xd587[2254]]=  !0;mxGraphView[_0xd587[202]][_0xd587[1179]]= null;mxGraphView[_0xd587[202]][_0xd587[1741]]= null;mxGraphView[_0xd587[202]][_0xd587[2247]]= null;mxGraphView[_0xd587[202]][_0xd587[255]]= 1;mxGraphView[_0xd587[202]][_0xd587[513]]= null;mxGraphView[_0xd587[202]][_0xd587[2255]]=  !1;mxGraphView[_0xd587[202]][_0xd587[517]]= function(){return this[_0xd587[2247]]};mxGraphView[_0xd587[202]][_0xd587[2256]]= function(_0x5c29x2){this[_0xd587[2247]]= _0x5c29x2};mxGraphView[_0xd587[202]][_0xd587[1799]]= function(_0x5c29x2){var _0x5c29x3=null;if(null!= _0x5c29x2&& 0< _0x5c29x2[_0xd587[67]]){for(var _0x5c29x4=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x5=0;_0x5c29x5< _0x5c29x2[_0xd587[67]];_0x5c29x5++){if(_0x5c29x4[_0xd587[1193]](_0x5c29x2[_0x5c29x5])|| _0x5c29x4[_0xd587[250]](_0x5c29x2[_0x5c29x5])){var _0x5c29x9=this[_0xd587[248]](_0x5c29x2[_0x5c29x5]);null!= _0x5c29x9&& (null== _0x5c29x3?_0x5c29x3=  new mxRectangle(_0x5c29x9[_0xd587[235]],_0x5c29x9[_0xd587[236]],_0x5c29x9[_0xd587[117]],_0x5c29x9[_0xd587[119]]):_0x5c29x3[_0xd587[99]](_0x5c29x9))}}};return _0x5c29x3};mxGraphView[_0xd587[202]][_0xd587[2257]]= function(_0x5c29x2){if(this[_0xd587[1741]]!= _0x5c29x2){var _0x5c29x3= new mxCurrentRootChange(this,_0x5c29x2);_0x5c29x3[_0xd587[350]]();var _0x5c29x4= new mxUndoableEdit(this,!1);_0x5c29x4[_0xd587[99]](_0x5c29x3);this[_0xd587[746]]( new mxEventObject(mxEvent.UNDO,_0xd587[1061],_0x5c29x4));this[_0xd587[1179]][_0xd587[2258]]()};return _0x5c29x2};mxGraphView[_0xd587[202]][_0xd587[829]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[255]],_0x5c29x9= new mxPoint(this[_0xd587[513]][_0xd587[235]],this[_0xd587[513]][_0xd587[236]]);if(this[_0xd587[255]]!= _0x5c29x2|| this[_0xd587[513]][_0xd587[235]]!= _0x5c29x3|| this[_0xd587[513]][_0xd587[236]]!= _0x5c29x4){this[_0xd587[255]]= _0x5c29x2,this[_0xd587[513]][_0xd587[235]]= _0x5c29x3,this[_0xd587[513]][_0xd587[236]]= _0x5c29x4,this[_0xd587[503]]()&& (this[_0xd587[2259]](),this[_0xd587[1179]][_0xd587[2258]]())};this[_0xd587[746]]( new mxEventObject(mxEvent.SCALE_AND_TRANSLATE,_0xd587[255],_0x5c29x2,_0xd587[2260],_0x5c29x5,_0xd587[513],this[_0xd587[513]],_0xd587[2261],_0x5c29x9))};mxGraphView[_0xd587[202]][_0xd587[518]]= function(){return this[_0xd587[255]]};mxGraphView[_0xd587[202]][_0xd587[2262]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[255]];this[_0xd587[255]]!= _0x5c29x2&& (this[_0xd587[255]]= _0x5c29x2,this[_0xd587[503]]()&& (this[_0xd587[2259]](),this[_0xd587[1179]][_0xd587[2258]]()));this[_0xd587[746]]( new mxEventObject(mxEvent.SCALE,_0xd587[255],_0x5c29x2,_0xd587[2260],_0x5c29x3))};mxGraphView[_0xd587[202]][_0xd587[512]]= function(){return this[_0xd587[513]]};mxGraphView[_0xd587[202]][_0xd587[1147]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4= new mxPoint(this[_0xd587[513]][_0xd587[235]],this[_0xd587[513]][_0xd587[236]]);if(this[_0xd587[513]][_0xd587[235]]!= _0x5c29x2|| this[_0xd587[513]][_0xd587[236]]!= _0x5c29x3){this[_0xd587[513]][_0xd587[235]]= _0x5c29x2,this[_0xd587[513]][_0xd587[236]]= _0x5c29x3,this[_0xd587[503]]()&& (this[_0xd587[2259]](),this[_0xd587[1179]][_0xd587[2258]]())};this[_0xd587[746]]( new mxEventObject(mxEvent.TRANSLATE,_0xd587[513],this[_0xd587[513]],_0xd587[2261],_0x5c29x4))};mxGraphView[_0xd587[202]][_0xd587[802]]= function(){null!= this[_0xd587[1741]]&& this[_0xd587[200]]();this[_0xd587[2259]]()};mxGraphView[_0xd587[202]][_0xd587[2259]]= function(){this[_0xd587[2263]]();this[_0xd587[2264]]()};mxGraphView[_0xd587[202]][_0xd587[200]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[1179]][_0xd587[502]]();_0x5c29x2= _0x5c29x2|| _0x5c29x5[_0xd587[501]]();_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:!1;_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:!0;this[_0xd587[2265]](_0x5c29x2);if(_0x5c29x4&& (_0x5c29x3|| _0x5c29x2!= this[_0xd587[1741]])){_0x5c29x4= _0x5c29x5[_0xd587[262]](_0x5c29x2);for(var _0x5c29x9=0;_0x5c29x9< _0x5c29x4;_0x5c29x9++){this[_0xd587[200]](_0x5c29x5[_0xd587[263]](_0x5c29x2,_0x5c29x9),_0x5c29x3)}}else {this[_0xd587[2263]](_0x5c29x2)}};mxGraphView[_0xd587[202]][_0xd587[2263]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=this[_0xd587[1179]][_0xd587[502]]();_0x5c29x2= _0x5c29x2|| _0x5c29x9[_0xd587[501]]();_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:!0;_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:!0;_0x5c29x5= null!= _0x5c29x5?_0x5c29x5:!1;var _0x5c29xa=this[_0xd587[248]](_0x5c29x2);null!= _0x5c29xa&& (_0x5c29xa[_0xd587[2080]]=  !0,_0x5c29x5&& (_0x5c29xa[_0xd587[2082]]=  !0));if(_0x5c29x3){for(var _0x5c29x12=_0x5c29x9[_0xd587[262]](_0x5c29x2),_0x5c29xa=0;_0x5c29xa< _0x5c29x12;_0x5c29xa++){var _0x5c29x13=_0x5c29x9[_0xd587[263]](_0x5c29x2,_0x5c29xa);this[_0xd587[2263]](_0x5c29x13,_0x5c29x3,_0x5c29x4,_0x5c29x5)}};if(_0x5c29x4){_0x5c29x5= _0x5c29x9[_0xd587[1707]](_0x5c29x2);for(_0x5c29xa= 0;_0x5c29xa< _0x5c29x5;_0x5c29xa++){this[_0xd587[2263]](_0x5c29x9[_0xd587[1708]](_0x5c29x2,_0x5c29xa),_0x5c29x3,_0x5c29x4)}}};mxGraphView[_0xd587[202]][_0xd587[2264]]= function(_0x5c29x2){var _0x5c29x3=mxLog[_0xd587[2109]](_0xd587[2266]);window[_0xd587[879]]= mxResources[_0xd587[203]](this[_0xd587[2249]])|| this[_0xd587[2249]];var _0x5c29x4=null;if(this[_0xd587[2253]]&& null!= this[_0xd587[510]]&& null== this[_0xd587[1653]]&& (8== document[_0xd587[5]]|| mxClient[_0xd587[496]])){_0x5c29x4= this[_0xd587[510]][_0xd587[124]][_0xd587[495]];this[_0xd587[510]][_0xd587[124]][_0xd587[495]]= _0xd587[130];var _0x5c29x5=document[_0xd587[55]](_0xd587[485]);_0x5c29x5[_0xd587[124]][_0xd587[491]]= _0xd587[492];_0x5c29x5[_0xd587[124]][_0xd587[493]]= _0xd587[494];_0x5c29x5[_0xd587[124]][_0xd587[187]]= _0xd587[188];_0x5c29x5[_0xd587[124]][_0xd587[495]]= mxClient[_0xd587[496]]?_0xd587[497]:_0xd587[498];_0x5c29x5[_0xd587[124]][_0xd587[499]]= _0xd587[500];document[_0xd587[112]][_0xd587[62]](_0x5c29x5);this[_0xd587[1653]]= _0x5c29x5};_0x5c29x2= _0x5c29x2|| (null!= this[_0xd587[1741]]?this[_0xd587[1741]]:this[_0xd587[1179]][_0xd587[502]]()[_0xd587[501]]());this[_0xd587[2267]](null,_0x5c29x2);_0x5c29x2= this[_0xd587[2268]](null,_0x5c29x2);null== _0x5c29x2&& (_0x5c29x2=  new mxRectangle);this[_0xd587[2256]](_0x5c29x2);this[_0xd587[2269]]();null!= _0x5c29x4&& (this[_0xd587[510]][_0xd587[124]][_0xd587[495]]= _0x5c29x4,document[_0xd587[112]][_0xd587[266]](this[_0xd587[1653]]),this[_0xd587[1653]]= null);window[_0xd587[879]]= mxResources[_0xd587[203]](this[_0xd587[2091]])|| this[_0xd587[2091]];mxLog[_0xd587[2110]](_0xd587[2266],_0x5c29x3)};mxGraphView[_0xd587[202]][_0xd587[2270]]= function(_0x5c29x2){return  new mxRectangleShape(_0x5c29x2,_0xd587[1391],_0xd587[586])};mxGraphView[_0xd587[202]][_0xd587[2269]]= function(){var _0x5c29x2=this[_0xd587[1179]][_0xd587[2271]]();if(null!= _0x5c29x2){if(null== this[_0xd587[1617]]|| this[_0xd587[1617]][_0xd587[618]]!= _0x5c29x2[_0xd587[390]]){null!= this[_0xd587[1617]]&& this[_0xd587[1617]][_0xd587[515]]();var _0x5c29x3= new mxRectangle(0,0,1,1);this[_0xd587[1617]]=  new mxImageShape(_0x5c29x3,_0x5c29x2[_0xd587[390]]);this[_0xd587[1617]][_0xd587[507]]= this[_0xd587[1179]][_0xd587[507]];this[_0xd587[1617]][_0xd587[176]](this[_0xd587[2053]]);this[_0xd587[1617]][_0xd587[258]]()};this[_0xd587[2272]](this[_0xd587[1617]],_0x5c29x2)}else {null!= this[_0xd587[1617]]&& (this[_0xd587[1617]][_0xd587[515]](),this[_0xd587[1617]]= null)};this[_0xd587[1179]][_0xd587[2273]]?(_0x5c29x3= this[_0xd587[2274]](),null== this[_0xd587[2275]]?(this[_0xd587[2275]]= this[_0xd587[2270]](_0x5c29x3),this[_0xd587[2275]][_0xd587[255]]= this[_0xd587[255]],this[_0xd587[2275]][_0xd587[1596]]=  !0,this[_0xd587[2275]][_0xd587[507]]= this[_0xd587[1179]][_0xd587[507]],this[_0xd587[2275]][_0xd587[176]](this[_0xd587[2053]]),this[_0xd587[2275]][_0xd587[258]](),mxEvent[_0xd587[169]](this[_0xd587[2275]][_0xd587[252]],_0xd587[760],mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[1179]][_0xd587[761]](_0x5c29x2)})),mxEvent[_0xd587[759]](this[_0xd587[2275]][_0xd587[252]],mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[1179]][_0xd587[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x5c29x2))}),mxUtils[_0xd587[885]](this,function(_0x5c29x2){null!= this[_0xd587[1179]][_0xd587[2276]]&& this[_0xd587[1179]][_0xd587[2276]][_0xd587[2277]]()&& this[_0xd587[1179]][_0xd587[2276]][_0xd587[801]]();this[_0xd587[1179]][_0xd587[1009]]&& !mxEvent[_0xd587[721]](_0x5c29x2)&& this[_0xd587[1179]][_0xd587[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x5c29x2))}),mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[1179]][_0xd587[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x5c29x2))}))):(this[_0xd587[2275]][_0xd587[255]]= this[_0xd587[255]],this[_0xd587[2275]][_0xd587[1562]]= _0x5c29x3,this[_0xd587[2275]][_0xd587[258]]())):null!= this[_0xd587[2275]]&& (this[_0xd587[2275]][_0xd587[515]](),this[_0xd587[2275]]= null)};mxGraphView[_0xd587[202]][_0xd587[2274]]= function(){var _0x5c29x2=this[_0xd587[1179]][_0xd587[2013]],_0x5c29x3=this[_0xd587[255]]* this[_0xd587[1179]][_0xd587[2012]];return  new mxRectangle(this[_0xd587[255]]* this[_0xd587[513]][_0xd587[235]],this[_0xd587[255]]* this[_0xd587[513]][_0xd587[236]],_0x5c29x2[_0xd587[117]]* _0x5c29x3,_0x5c29x2[_0xd587[119]]* _0x5c29x3)};mxGraphView[_0xd587[202]][_0xd587[2272]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x2[_0xd587[255]]= this[_0xd587[255]];_0x5c29x2[_0xd587[1562]][_0xd587[235]]= this[_0xd587[255]]* this[_0xd587[513]][_0xd587[235]];_0x5c29x2[_0xd587[1562]][_0xd587[236]]= this[_0xd587[255]]* this[_0xd587[513]][_0xd587[236]];_0x5c29x2[_0xd587[1562]][_0xd587[117]]= this[_0xd587[255]]* _0x5c29x3[_0xd587[117]];_0x5c29x2[_0xd587[1562]][_0xd587[119]]= this[_0xd587[255]]* _0x5c29x3[_0xd587[119]];_0x5c29x2[_0xd587[258]]()};mxGraphView[_0xd587[202]][_0xd587[2267]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x5=this[_0xd587[248]](_0x5c29x3,!0);if(null!= _0x5c29x5&& _0x5c29x5[_0xd587[2080]]){if(this[_0xd587[1179]][_0xd587[1714]](_0x5c29x3)){if(_0x5c29x3!= this[_0xd587[1741]]&& null!= _0x5c29x2){_0x5c29x5[_0xd587[2079]][_0xd587[235]]= 0;_0x5c29x5[_0xd587[2079]][_0xd587[236]]= 0;_0x5c29x5[_0xd587[2078]][_0xd587[235]]= _0x5c29x2[_0xd587[2078]][_0xd587[235]];_0x5c29x5[_0xd587[2078]][_0xd587[236]]= _0x5c29x2[_0xd587[2078]][_0xd587[236]];var _0x5c29x9=this[_0xd587[1179]][_0xd587[1198]](_0x5c29x3);if(null!= _0x5c29x9){if(!_0x5c29x4[_0xd587[250]](_0x5c29x3)){var _0x5c29xa=_0x5c29x9[_0xd587[1368]]|| this[_0xd587[2248]];_0x5c29x9[_0xd587[1500]]?(_0x5c29x5[_0xd587[2078]][_0xd587[235]]+= _0x5c29x9[_0xd587[235]]* _0x5c29x2[_0xd587[117]]/ this[_0xd587[255]]+ _0x5c29xa[_0xd587[235]],_0x5c29x5[_0xd587[2078]][_0xd587[236]]+= _0x5c29x9[_0xd587[236]]* _0x5c29x2[_0xd587[119]]/ this[_0xd587[255]]+ _0x5c29xa[_0xd587[236]]):(_0x5c29x5[_0xd587[2079]][_0xd587[235]]= this[_0xd587[255]]* _0x5c29xa[_0xd587[235]],_0x5c29x5[_0xd587[2079]][_0xd587[236]]= this[_0xd587[255]]* _0x5c29xa[_0xd587[236]],_0x5c29x5[_0xd587[2078]][_0xd587[235]]+= _0x5c29x9[_0xd587[235]],_0x5c29x5[_0xd587[2078]][_0xd587[236]]+= _0x5c29x9[_0xd587[236]])};_0x5c29x5[_0xd587[235]]= this[_0xd587[255]]* (this[_0xd587[513]][_0xd587[235]]+ _0x5c29x5[_0xd587[2078]][_0xd587[235]]);_0x5c29x5[_0xd587[236]]= this[_0xd587[255]]* (this[_0xd587[513]][_0xd587[236]]+ _0x5c29x5[_0xd587[2078]][_0xd587[236]]);_0x5c29x5[_0xd587[117]]= this[_0xd587[255]]* _0x5c29x9[_0xd587[117]];_0x5c29x5[_0xd587[119]]= this[_0xd587[255]]* _0x5c29x9[_0xd587[119]];if(_0x5c29x4[_0xd587[1193]](_0x5c29x3)){if(_0x5c29x9[_0xd587[1500]]&& (_0x5c29xa= mxUtils[_0xd587[431]](_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2278]]]|| _0xd587[468]),0!= _0x5c29xa)){var _0x5c29x9=Math[_0xd587[426]](_0x5c29xa),_0x5c29xa=Math[_0xd587[427]](_0x5c29xa),_0x5c29x12= new mxPoint(_0x5c29x5[_0xd587[241]](),_0x5c29x5[_0xd587[242]]()),_0x5c29x13= new mxPoint(_0x5c29x2[_0xd587[241]](),_0x5c29x2[_0xd587[242]]()),_0x5c29x9=mxUtils[_0xd587[432]](_0x5c29x12,_0x5c29x9,_0x5c29xa,_0x5c29x13);_0x5c29x5[_0xd587[235]]= _0x5c29x9[_0xd587[235]]- _0x5c29x5[_0xd587[117]]/ 2;_0x5c29x5[_0xd587[236]]= _0x5c29x9[_0xd587[236]]- _0x5c29x5[_0xd587[119]]/ 2};this[_0xd587[2279]](_0x5c29x5)}}}}else {this[_0xd587[2265]](_0x5c29x3)};_0x5c29xa= this[_0xd587[1179]][_0xd587[2280]](_0x5c29x3);null!= _0x5c29xa&& (_0x5c29x5[_0xd587[2078]][_0xd587[235]]+= _0x5c29xa[_0xd587[235]],_0x5c29x5[_0xd587[2078]][_0xd587[236]]+= _0x5c29xa[_0xd587[236]])};if(null!= _0x5c29x5&& (!this[_0xd587[1179]][_0xd587[1742]](_0x5c29x3)|| _0x5c29x3== this[_0xd587[1741]])){_0x5c29x9= _0x5c29x4[_0xd587[262]](_0x5c29x3);for(_0x5c29xa= 0;_0x5c29xa< _0x5c29x9;_0x5c29xa++){_0x5c29x12= _0x5c29x4[_0xd587[263]](_0x5c29x3,_0x5c29xa),this[_0xd587[2267]](_0x5c29x5,_0x5c29x12)}}};mxGraphView[_0xd587[202]][_0xd587[2279]]= function(_0x5c29x2){var _0x5c29x3=mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);_0x5c29x3== mxConstants[_0xd587[2132]]?_0x5c29x2[_0xd587[2079]][_0xd587[235]]-= _0x5c29x2[_0xd587[117]]:_0x5c29x3== mxConstants[_0xd587[480]]&& (_0x5c29x2[_0xd587[2079]][_0xd587[235]]+= _0x5c29x2[_0xd587[117]]);_0x5c29x3= mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);_0x5c29x3== mxConstants[_0xd587[1687]]?_0x5c29x2[_0xd587[2079]][_0xd587[236]]-= _0x5c29x2[_0xd587[119]]:_0x5c29x3== mxConstants[_0xd587[482]]&& (_0x5c29x2[_0xd587[2079]][_0xd587[236]]+= _0x5c29x2[_0xd587[119]])};mxGraphView[_0xd587[202]][_0xd587[2268]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x5=this[_0xd587[248]](_0x5c29x3),_0x5c29x9=null;if(null!= _0x5c29x5){if(_0x5c29x5[_0xd587[2080]]){var _0x5c29xa=this[_0xd587[1179]][_0xd587[1198]](_0x5c29x3);if(null!= _0x5c29xa&& _0x5c29x4[_0xd587[250]](_0x5c29x3)){var _0x5c29x12=this[_0xd587[248]](this[_0xd587[1710]](_0x5c29x3,!0));_0x5c29x5[_0xd587[2090]](_0x5c29x12,!0);if(null!= _0x5c29x12&& _0x5c29x4[_0xd587[250]](_0x5c29x12[_0xd587[246]])&& !_0x5c29x4[_0xd587[1720]](_0x5c29x12[_0xd587[246]],_0x5c29x3)){var _0x5c29x13=this[_0xd587[248]](_0x5c29x4[_0xd587[1197]](_0x5c29x12[_0xd587[246]]));this[_0xd587[2268]](_0x5c29x13,_0x5c29x12[_0xd587[246]])};var _0x5c29x14=this[_0xd587[248]](this[_0xd587[1710]](_0x5c29x3,!1));_0x5c29x5[_0xd587[2090]](_0x5c29x14,!1);null!= _0x5c29x14&& (_0x5c29x4[_0xd587[250]](_0x5c29x14[_0xd587[246]])&& !_0x5c29x4[_0xd587[1720]](_0x5c29x14[_0xd587[246]],_0x5c29x3))&& (_0x5c29x13= this[_0xd587[248]](_0x5c29x4[_0xd587[1197]](_0x5c29x14[_0xd587[246]])),this[_0xd587[2268]](_0x5c29x13,_0x5c29x14[_0xd587[246]]));this[_0xd587[2281]](_0x5c29x5,_0x5c29x12,_0x5c29x14);this[_0xd587[2282]](_0x5c29x5,_0x5c29xa[_0xd587[1525]],_0x5c29x12,_0x5c29x14);this[_0xd587[2283]](_0x5c29x5,_0x5c29x12,_0x5c29x14);this[_0xd587[2284]](_0x5c29x5);this[_0xd587[2285]](_0x5c29x5)}else {null!= _0x5c29xa&& (_0x5c29xa[_0xd587[1500]]&& null!= _0x5c29x2&& _0x5c29x4[_0xd587[250]](_0x5c29x2[_0xd587[246]]))&& (_0x5c29xa= this[_0xd587[245]](_0x5c29x2,_0x5c29xa),null!= _0x5c29xa&& (_0x5c29x5[_0xd587[235]]= _0x5c29xa[_0xd587[235]],_0x5c29x5[_0xd587[236]]= _0x5c29xa[_0xd587[236]],_0x5c29xa[_0xd587[235]]= _0x5c29xa[_0xd587[235]]/ this[_0xd587[255]]- this[_0xd587[513]][_0xd587[235]],_0x5c29xa[_0xd587[236]]= _0x5c29xa[_0xd587[236]]/ this[_0xd587[255]]- this[_0xd587[513]][_0xd587[236]],_0x5c29x5[_0xd587[2078]]= _0x5c29xa,this[_0xd587[2286]](_0x5c29x2,_0x5c29x5)))};_0x5c29x5[_0xd587[2080]]=  !1;_0x5c29x3!= this[_0xd587[1741]]&& this[_0xd587[1179]][_0xd587[259]][_0xd587[258]](_0x5c29x5,!1,this[_0xd587[2287]]())};if(_0x5c29x4[_0xd587[250]](_0x5c29x3)|| _0x5c29x4[_0xd587[1193]](_0x5c29x3)){null!= _0x5c29x5[_0xd587[253]]&& null!= _0x5c29x5[_0xd587[253]][_0xd587[1563]]&& (_0x5c29x9= _0x5c29x5[_0xd587[253]][_0xd587[1563]][_0xd587[238]]()),null!= _0x5c29x5[_0xd587[963]]&& !this[_0xd587[1179]][_0xd587[2130]](_0x5c29x5[_0xd587[246]])&& null!= _0x5c29x5[_0xd587[963]][_0xd587[1563]]&& (null!= _0x5c29x9?_0x5c29x9[_0xd587[99]](_0x5c29x5[_0xd587[963]][_0xd587[1563]]):_0x5c29x9= _0x5c29x5[_0xd587[963]][_0xd587[1563]][_0xd587[238]]())}};if(null!= _0x5c29x5&& (!this[_0xd587[1179]][_0xd587[1742]](_0x5c29x3)|| _0x5c29x3== this[_0xd587[1741]])){_0x5c29xa= _0x5c29x4[_0xd587[262]](_0x5c29x3);for(_0x5c29x12= 0;_0x5c29x12< _0x5c29xa;_0x5c29x12++){_0x5c29x13= _0x5c29x4[_0xd587[263]](_0x5c29x3,_0x5c29x12),_0x5c29x13= this[_0xd587[2268]](_0x5c29x5,_0x5c29x13),null!= _0x5c29x13&& (null== _0x5c29x9?_0x5c29x9= _0x5c29x13:_0x5c29x9[_0xd587[99]](_0x5c29x13))}};return _0x5c29x9};mxGraphView[_0xd587[202]][_0xd587[2286]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=_0x5c29x3[_0xd587[246]];if(!this[_0xd587[1179]][_0xd587[1742]](_0x5c29x4)|| _0x5c29x4== this[_0xd587[1741]]){for(var _0x5c29x5=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x9=_0x5c29x5[_0xd587[262]](_0x5c29x4),_0x5c29xa=0;_0x5c29xa< _0x5c29x9;_0x5c29xa++){this[_0xd587[2267]](_0x5c29x3,_0x5c29x5[_0xd587[263]](_0x5c29x4,_0x5c29xa))}}};mxGraphView[_0xd587[202]][_0xd587[2281]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[2289]](_0x5c29x2,_0x5c29x3,!0,this[_0xd587[1179]][_0xd587[2288]](_0x5c29x2,_0x5c29x3,!0));this[_0xd587[2289]](_0x5c29x2,_0x5c29x4,!1,this[_0xd587[1179]][_0xd587[2288]](_0x5c29x2,_0x5c29x4,!1))};mxGraphView[_0xd587[202]][_0xd587[2289]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=null;null!= _0x5c29x5&& (_0x5c29x9= this[_0xd587[1179]][_0xd587[2290]](_0x5c29x3,_0x5c29x5));if(null== _0x5c29x9&& null== _0x5c29x3){_0x5c29x3= this[_0xd587[255]];_0x5c29x5= this[_0xd587[513]];var _0x5c29xa=_0x5c29x2[_0xd587[2078]],_0x5c29x9=this[_0xd587[1179]][_0xd587[1198]](_0x5c29x2[_0xd587[246]])[_0xd587[2006]](_0x5c29x4);null!= _0x5c29x9&& (_0x5c29x9=  new mxPoint(_0x5c29x3* (_0x5c29x5[_0xd587[235]]+ _0x5c29x9[_0xd587[235]]+ _0x5c29xa[_0xd587[235]]),_0x5c29x3* (_0x5c29x5[_0xd587[236]]+ _0x5c29x9[_0xd587[236]]+ _0x5c29xa[_0xd587[236]])))};_0x5c29x2[_0xd587[2088]](_0x5c29x9,_0x5c29x4)};mxGraphView[_0xd587[202]][_0xd587[2282]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){if(null!= _0x5c29x2){var _0x5c29x9=[];_0x5c29x9[_0xd587[207]](_0x5c29x2[_0xd587[439]][0]);var _0x5c29xa=this[_0xd587[2291]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5);if(null!= _0x5c29xa){_0x5c29x4= this[_0xd587[2292]](_0x5c29x2,_0x5c29x4,!0),_0x5c29x5= this[_0xd587[2292]](_0x5c29x2,_0x5c29x5,!1),_0x5c29xa(_0x5c29x2,_0x5c29x4,_0x5c29x5,_0x5c29x3,_0x5c29x9)}else {if(null!= _0x5c29x3){for(_0x5c29xa= 0;_0x5c29xa< _0x5c29x3[_0xd587[67]];_0x5c29xa++){null!= _0x5c29x3[_0x5c29xa]&& (_0x5c29x5= mxUtils[_0xd587[238]](_0x5c29x3[_0x5c29xa]),_0x5c29x9[_0xd587[207]](this[_0xd587[2229]](_0x5c29x2,_0x5c29x5)))}}};_0x5c29x3= _0x5c29x2[_0xd587[439]];_0x5c29x9[_0xd587[207]](_0x5c29x3[_0x5c29x3[_0xd587[67]]- 1]);_0x5c29x2[_0xd587[439]]= _0x5c29x9}};mxGraphView[_0xd587[202]][_0xd587[2229]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=_0x5c29x2[_0xd587[2078]];return  new mxPoint(this[_0xd587[255]]* (_0x5c29x3[_0xd587[235]]+ this[_0xd587[513]][_0xd587[235]]+ _0x5c29x4[_0xd587[235]]),this[_0xd587[255]]* (_0x5c29x3[_0xd587[236]]+ this[_0xd587[513]][_0xd587[236]]+ _0x5c29x4[_0xd587[236]]))};mxGraphView[_0xd587[202]][_0xd587[2291]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x2= null!= _0x5c29x4&& _0x5c29x4== _0x5c29x5?mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_LOOP,this[_0xd587[1179]][_0xd587[2293]]):!mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_NOEDGESTYLE,!1)?_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2294]]]:null;_0xd587[1516]==  typeof _0x5c29x2&& (_0x5c29x3= mxStyleRegistry[_0xd587[433]](_0x5c29x2),null== _0x5c29x3&& this[_0xd587[2295]]()&& (_0x5c29x3= mxUtils[_0xd587[1545]](_0x5c29x2)),_0x5c29x2= _0x5c29x3);return _0xd587[279]==  typeof _0x5c29x2?_0x5c29x2:null};mxGraphView[_0xd587[202]][_0xd587[2283]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=_0x5c29x2[_0xd587[439]],_0x5c29x9=_0x5c29x5[0];null== _0x5c29x5[_0x5c29x5[_0xd587[67]]- 1]&& null!= _0x5c29x4&& this[_0xd587[2296]](_0x5c29x2,_0x5c29x4,_0x5c29x3,!1);null== _0x5c29x9&& null!= _0x5c29x3&& this[_0xd587[2296]](_0x5c29x2,_0x5c29x3,_0x5c29x4,!0)};mxGraphView[_0xd587[202]][_0xd587[2296]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x3= this[_0xd587[2292]](_0x5c29x2,_0x5c29x3,_0x5c29x5);var _0x5c29x9=this[_0xd587[2297]](_0x5c29x2,_0x5c29x4,_0x5c29x5),_0x5c29xa=this[_0xd587[1179]][_0xd587[2298]](_0x5c29x2);_0x5c29x4= mxUtils[_0xd587[431]](Number(_0x5c29x3[_0xd587[124]][mxConstants[_0xd587[2278]]]|| _0xd587[468]));var _0x5c29x12= new mxPoint(_0x5c29x3[_0xd587[241]](),_0x5c29x3[_0xd587[242]]());if(0!= _0x5c29x4){var _0x5c29x13=Math[_0xd587[426]](-_0x5c29x4),_0x5c29x14=Math[_0xd587[427]](-_0x5c29x4),_0x5c29x9=mxUtils[_0xd587[432]](_0x5c29x9,_0x5c29x13,_0x5c29x14,_0x5c29x12)};_0x5c29x13= parseFloat(_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2299]]]|| 0);_0x5c29x13+= parseFloat(_0x5c29x2[_0xd587[124]][_0x5c29x5?mxConstants[_0xd587[2300]]:mxConstants[_0xd587[2301]]]|| 0);_0x5c29x3= this[_0xd587[2302]](_0x5c29x3,_0x5c29x9,0== _0x5c29x4&& _0x5c29xa,_0x5c29x13);0!= _0x5c29x4&& (_0x5c29x13= Math[_0xd587[426]](_0x5c29x4),_0x5c29x14= Math[_0xd587[427]](_0x5c29x4),_0x5c29x3= mxUtils[_0xd587[432]](_0x5c29x3,_0x5c29x13,_0x5c29x14,_0x5c29x12));_0x5c29x2[_0xd587[2088]](_0x5c29x3,_0x5c29x5)};mxGraphView[_0xd587[202]][_0xd587[2292]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x2= mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],_0x5c29x4?mxConstants[_0xd587[2303]]:mxConstants[_0xd587[2304]]);null!= _0x5c29x2&& (_0x5c29x2= this[_0xd587[248]](this[_0xd587[1179]][_0xd587[502]]()[_0xd587[736]](_0x5c29x2)),null!= _0x5c29x2&& (_0x5c29x3= _0x5c29x2));return _0x5c29x3};mxGraphView[_0xd587[202]][_0xd587[2302]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=null;if(null!= _0x5c29x2){var _0x5c29xa=this[_0xd587[2305]](_0x5c29x2);if(null!= _0x5c29xa&& null!= _0x5c29x3&& (_0x5c29x5= this[_0xd587[2087]](_0x5c29x2,_0x5c29x5),0< _0x5c29x5[_0xd587[117]]|| 0< _0x5c29x5[_0xd587[119]])){_0x5c29x9= _0x5c29xa(_0x5c29x5,_0x5c29x2,_0x5c29x3,_0x5c29x4)};null== _0x5c29x9&& (_0x5c29x9= this[_0xd587[245]](_0x5c29x2))};return _0x5c29x9};mxGraphView[_0xd587[202]][_0xd587[2230]]= function(_0x5c29x2){var _0x5c29x3=null!= _0x5c29x2[_0xd587[124]]?parseFloat(_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2306]]])|| 0:0;return _0x5c29x2[_0xd587[241]]()+ _0x5c29x3* _0x5c29x2[_0xd587[117]]};mxGraphView[_0xd587[202]][_0xd587[2228]]= function(_0x5c29x2){var _0x5c29x3=null!= _0x5c29x2[_0xd587[124]]?parseFloat(_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2307]]])|| 0:0;return _0x5c29x2[_0xd587[242]]()+ _0x5c29x3* _0x5c29x2[_0xd587[119]]};mxGraphView[_0xd587[202]][_0xd587[2087]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:0;null!= _0x5c29x2&& (_0x5c29x3+= parseFloat(_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2299]]]|| 0));return _0x5c29x2[_0xd587[2087]](_0x5c29x3* this[_0xd587[255]])};mxGraphView[_0xd587[202]][_0xd587[2305]]= function(_0x5c29x2){_0x5c29x2= _0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2061]]];if(_0xd587[1516]==  typeof _0x5c29x2){var _0x5c29x3=mxStyleRegistry[_0xd587[433]](_0x5c29x2);null== _0x5c29x3&& this[_0xd587[2295]]()&& (_0x5c29x3= mxUtils[_0xd587[1545]](_0x5c29x2));_0x5c29x2= _0x5c29x3};return _0xd587[279]==  typeof _0x5c29x2?_0x5c29x2:null};mxGraphView[_0xd587[202]][_0xd587[2297]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x2= _0x5c29x2[_0xd587[439]];var _0x5c29x5=null;if(null!= _0x5c29x2&& (_0x5c29x4|| 2< _0x5c29x2[_0xd587[67]]|| null== _0x5c29x3)){_0x5c29x5= _0x5c29x2[_0xd587[67]],_0x5c29x5= _0x5c29x2[_0x5c29x4?Math[_0xd587[243]](1,_0x5c29x5- 1):Math[_0xd587[160]](0,_0x5c29x5- 2)]};null== _0x5c29x5&& null!= _0x5c29x3&& (_0x5c29x5=  new mxPoint(_0x5c29x3[_0xd587[241]](),_0x5c29x3[_0xd587[242]]()));return _0x5c29x5};mxGraphView[_0xd587[202]][_0xd587[1710]]= function(_0x5c29x2,_0x5c29x3){for(var _0x5c29x4=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x5=_0x5c29x4[_0xd587[1709]](_0x5c29x2,_0x5c29x3),_0x5c29x9=_0x5c29x5;null!= _0x5c29x5&& _0x5c29x5!= this[_0xd587[1741]];){if(!this[_0xd587[1179]][_0xd587[1714]](_0x5c29x9)|| this[_0xd587[1179]][_0xd587[1742]](_0x5c29x5)){_0x5c29x9= _0x5c29x5};_0x5c29x5= _0x5c29x4[_0xd587[1197]](_0x5c29x5)};_0x5c29x4[_0xd587[1197]](_0x5c29x9)== _0x5c29x4[_0xd587[501]]()&& (_0x5c29x9= null);return _0x5c29x9};mxGraphView[_0xd587[202]][_0xd587[2284]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[439]];_0x5c29x2[_0xd587[67]]= 0;if(null!= _0x5c29x3&& 0< _0x5c29x3[_0xd587[67]]){var _0x5c29x4=_0x5c29x3[0],_0x5c29x5=_0x5c29x3[_0x5c29x3[_0xd587[67]]- 1];if(null== _0x5c29x4|| null== _0x5c29x5){_0x5c29x2[_0xd587[246]]!= this[_0xd587[1741]]&& this[_0xd587[200]](_0x5c29x2[_0xd587[246]],!0)}else {if(_0x5c29x4[_0xd587[235]]!= _0x5c29x5[_0xd587[235]]|| _0x5c29x4[_0xd587[236]]!= _0x5c29x5[_0xd587[236]]){var _0x5c29x9=_0x5c29x5[_0xd587[235]]- _0x5c29x4[_0xd587[235]],_0x5c29xa=_0x5c29x5[_0xd587[236]]- _0x5c29x4[_0xd587[236]];_0x5c29x2[_0xd587[2085]]= Math[_0xd587[428]](_0x5c29x9* _0x5c29x9+ _0x5c29xa* _0x5c29xa)}else {_0x5c29x2[_0xd587[2085]]= 0};var _0x5c29x5=0,_0x5c29x12=[],_0x5c29xa=_0x5c29x4;if(null!= _0x5c29xa){for(var _0x5c29x4=_0x5c29xa[_0xd587[235]],_0x5c29x13=_0x5c29xa[_0xd587[236]],_0x5c29x14=_0x5c29x4,_0x5c29x15=_0x5c29x13,_0x5c29x16=1;_0x5c29x16< _0x5c29x3[_0xd587[67]];_0x5c29x16++){var _0x5c29x17=_0x5c29x3[_0x5c29x16];null!= _0x5c29x17&& (_0x5c29x9= _0x5c29xa[_0xd587[235]]- _0x5c29x17[_0xd587[235]],_0x5c29xa= _0x5c29xa[_0xd587[236]]- _0x5c29x17[_0xd587[236]],_0x5c29x9= Math[_0xd587[428]](_0x5c29x9* _0x5c29x9+ _0x5c29xa* _0x5c29xa),_0x5c29x12[_0xd587[207]](_0x5c29x9),_0x5c29x5+= _0x5c29x9,_0x5c29xa= _0x5c29x17,_0x5c29x4= Math[_0xd587[243]](_0x5c29xa[_0xd587[235]],_0x5c29x4),_0x5c29x13= Math[_0xd587[243]](_0x5c29xa[_0xd587[236]],_0x5c29x13),_0x5c29x14= Math[_0xd587[160]](_0x5c29xa[_0xd587[235]],_0x5c29x14),_0x5c29x15= Math[_0xd587[160]](_0x5c29xa[_0xd587[236]],_0x5c29x15))};_0x5c29x2[_0xd587[67]]= _0x5c29x5;_0x5c29x2[_0xd587[2086]]= _0x5c29x12;_0x5c29x2[_0xd587[235]]= _0x5c29x4;_0x5c29x2[_0xd587[236]]= _0x5c29x13;_0x5c29x2[_0xd587[117]]= Math[_0xd587[160]](1,_0x5c29x14- _0x5c29x4);_0x5c29x2[_0xd587[119]]= Math[_0xd587[160]](1,_0x5c29x15- _0x5c29x13)}}}};mxGraphView[_0xd587[202]][_0xd587[245]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=_0x5c29x2[_0xd587[241]](),_0x5c29x5=_0x5c29x2[_0xd587[242]]();if(null!= _0x5c29x2[_0xd587[2086]]&& (null== _0x5c29x3|| _0x5c29x3[_0xd587[1500]])){for(var _0x5c29x9=_0x5c29x2[_0xd587[439]][_0xd587[67]],_0x5c29xa=((null!= _0x5c29x3?_0x5c29x3[_0xd587[235]]/ 2:0)+ 0.5)* _0x5c29x2[_0xd587[67]],_0x5c29x12=_0x5c29x2[_0xd587[2086]][0],_0x5c29x13=0,_0x5c29x14=1;_0x5c29xa> _0x5c29x13+ _0x5c29x12&& _0x5c29x14< _0x5c29x9- 1;){_0x5c29x13+= _0x5c29x12,_0x5c29x12= _0x5c29x2[_0xd587[2086]][_0x5c29x14++]};_0x5c29x9= 0== _0x5c29x12?0:(_0x5c29xa- _0x5c29x13)/ _0x5c29x12;_0x5c29xa= _0x5c29x2[_0xd587[439]][_0x5c29x14- 1];_0x5c29x14= _0x5c29x2[_0xd587[439]][_0x5c29x14];if(null!= _0x5c29xa&& null!= _0x5c29x14){_0x5c29x13= _0x5c29x4= _0x5c29x5= 0;if(null!= _0x5c29x3){var _0x5c29x5=_0x5c29x3[_0xd587[236]],_0x5c29x15=_0x5c29x3[_0xd587[1368]];null!= _0x5c29x15&& (_0x5c29x4= _0x5c29x15[_0xd587[235]],_0x5c29x13= _0x5c29x15[_0xd587[236]])};_0x5c29x15= _0x5c29x14[_0xd587[235]]- _0x5c29xa[_0xd587[235]];_0x5c29x14= _0x5c29x14[_0xd587[236]]- _0x5c29xa[_0xd587[236]];_0x5c29x4= _0x5c29xa[_0xd587[235]]+ _0x5c29x15* _0x5c29x9+ ((0== _0x5c29x12?0:_0x5c29x14/ _0x5c29x12)* _0x5c29x5+ _0x5c29x4)* this[_0xd587[255]];_0x5c29x5= _0x5c29xa[_0xd587[236]]+ _0x5c29x14* _0x5c29x9- ((0== _0x5c29x12?0:_0x5c29x15/ _0x5c29x12)* _0x5c29x5- _0x5c29x13)* this[_0xd587[255]]}}else {null!= _0x5c29x3&& (_0x5c29x15= _0x5c29x3[_0xd587[1368]],null!= _0x5c29x15&& (_0x5c29x4+= _0x5c29x15[_0xd587[235]],_0x5c29x5+= _0x5c29x15[_0xd587[236]]))};return  new mxPoint(_0x5c29x4,_0x5c29x5)};mxGraphView[_0xd587[202]][_0xd587[2308]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1721]](_0x5c29x2[_0xd587[246]]);if(null!= _0x5c29x5){var _0x5c29x9=_0x5c29x2[_0xd587[439]][_0xd587[67]];if(_0x5c29x5[_0xd587[1500]]&& 1< _0x5c29x9){for(var _0x5c29x5=_0x5c29x2[_0xd587[67]],_0x5c29xa=_0x5c29x2[_0xd587[2086]],_0x5c29x12=_0x5c29x2[_0xd587[439]][0],_0x5c29x13=_0x5c29x2[_0xd587[439]][1],_0x5c29x14=mxUtils[_0xd587[440]](_0x5c29x12[_0xd587[235]],_0x5c29x12[_0xd587[236]],_0x5c29x13[_0xd587[235]],_0x5c29x13[_0xd587[236]],_0x5c29x3,_0x5c29x4),_0x5c29x15=0,_0x5c29x16=0,_0x5c29x17=0,_0x5c29x18=2;_0x5c29x18< _0x5c29x9;_0x5c29x18++){_0x5c29x16+= _0x5c29xa[_0x5c29x18- 2],_0x5c29x13= _0x5c29x2[_0xd587[439]][_0x5c29x18],_0x5c29x12= mxUtils[_0xd587[440]](_0x5c29x12[_0xd587[235]],_0x5c29x12[_0xd587[236]],_0x5c29x13[_0xd587[235]],_0x5c29x13[_0xd587[236]],_0x5c29x3,_0x5c29x4),_0x5c29x12<= _0x5c29x14&& (_0x5c29x14= _0x5c29x12,_0x5c29x15= _0x5c29x18- 1,_0x5c29x17= _0x5c29x16),_0x5c29x12= _0x5c29x13};_0x5c29x9= _0x5c29xa[_0x5c29x15];_0x5c29x12= _0x5c29x2[_0xd587[439]][_0x5c29x15];_0x5c29x13= _0x5c29x2[_0xd587[439]][_0x5c29x15+ 1];_0x5c29x14= _0x5c29x13[_0xd587[235]];_0x5c29xa= _0x5c29x13[_0xd587[236]];_0x5c29x2= _0x5c29x12[_0xd587[235]]- _0x5c29x14;_0x5c29x15= _0x5c29x12[_0xd587[236]]- _0x5c29xa;_0x5c29x14= _0x5c29x3- _0x5c29x14;_0x5c29xa= _0x5c29x4- _0x5c29xa;_0x5c29x14= _0x5c29x2- _0x5c29x14;_0x5c29xa= _0x5c29x15- _0x5c29xa;_0x5c29xa= _0x5c29x14* _0x5c29x2+ _0x5c29xa* _0x5c29x15;_0x5c29x2= Math[_0xd587[428]](0>= _0x5c29xa?0:_0x5c29xa* _0x5c29xa/ (_0x5c29x2* _0x5c29x2+ _0x5c29x15* _0x5c29x15));_0x5c29x2> _0x5c29x9&& (_0x5c29x2= _0x5c29x9);_0x5c29x9= Math[_0xd587[428]](mxUtils[_0xd587[440]](_0x5c29x12[_0xd587[235]],_0x5c29x12[_0xd587[236]],_0x5c29x13[_0xd587[235]],_0x5c29x13[_0xd587[236]],_0x5c29x3,_0x5c29x4));-1== mxUtils[_0xd587[2309]](_0x5c29x12[_0xd587[235]],_0x5c29x12[_0xd587[236]],_0x5c29x13[_0xd587[235]],_0x5c29x13[_0xd587[236]],_0x5c29x3,_0x5c29x4)&& (_0x5c29x9=  -_0x5c29x9);return  new mxPoint(-2* ((_0x5c29x5/ 2- _0x5c29x17- _0x5c29x2)/ _0x5c29x5),_0x5c29x9/ this[_0xd587[255]])}};return  new mxPoint};mxGraphView[_0xd587[202]][_0xd587[2285]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[439]];_0x5c29x2[_0xd587[2079]][_0xd587[235]]= _0x5c29x2[_0xd587[241]]();_0x5c29x2[_0xd587[2079]][_0xd587[236]]= _0x5c29x2[_0xd587[242]]();if(null!= _0x5c29x3&& 0< _0x5c29x3[_0xd587[67]]&& null!= _0x5c29x2[_0xd587[2086]]){var _0x5c29x4=this[_0xd587[1179]][_0xd587[1198]](_0x5c29x2[_0xd587[246]]);if(_0x5c29x4[_0xd587[1500]]){var _0x5c29x5=this[_0xd587[245]](_0x5c29x2,_0x5c29x4);null!= _0x5c29x5&& (_0x5c29x2[_0xd587[2079]]= _0x5c29x5)}else {var _0x5c29x5=_0x5c29x3[0],_0x5c29x9=_0x5c29x3[_0x5c29x3[_0xd587[67]]- 1];if(null!= _0x5c29x5&& null!= _0x5c29x9){var _0x5c29x3=_0x5c29x9[_0xd587[235]]- _0x5c29x5[_0xd587[235]],_0x5c29xa=_0x5c29x9[_0xd587[236]]- _0x5c29x5[_0xd587[236]],_0x5c29x12=_0x5c29x9= 0,_0x5c29x4=_0x5c29x4[_0xd587[1368]];null!= _0x5c29x4&& (_0x5c29x9= _0x5c29x4[_0xd587[235]],_0x5c29x12= _0x5c29x4[_0xd587[236]]);_0x5c29x4= _0x5c29x5[_0xd587[236]]+ _0x5c29xa/ 2+ _0x5c29x12* this[_0xd587[255]];_0x5c29x2[_0xd587[2079]][_0xd587[235]]= _0x5c29x5[_0xd587[235]]+ _0x5c29x3/ 2+ _0x5c29x9* this[_0xd587[255]];_0x5c29x2[_0xd587[2079]][_0xd587[236]]= _0x5c29x4}}}};mxGraphView[_0xd587[202]][_0xd587[248]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3= _0x5c29x3||  !1;var _0x5c29x4=null;null!= _0x5c29x2&& (_0x5c29x4= this[_0xd587[1214]][_0xd587[203]](_0x5c29x2),this[_0xd587[1179]][_0xd587[1714]](_0x5c29x2)&& (null== _0x5c29x4&& _0x5c29x3&& this[_0xd587[1179]][_0xd587[1714]](_0x5c29x2)?(_0x5c29x4= this[_0xd587[1230]](_0x5c29x2),this[_0xd587[1214]][_0xd587[204]](_0x5c29x2,_0x5c29x4)):_0x5c29x3&& (null!= _0x5c29x4&& this[_0xd587[2255]])&& (_0x5c29x4[_0xd587[124]]= this[_0xd587[1179]][_0xd587[1705]](_0x5c29x2))));return _0x5c29x4};mxGraphView[_0xd587[202]][_0xd587[2287]]= function(){return this[_0xd587[2254]]};mxGraphView[_0xd587[202]][_0xd587[2310]]= function(_0x5c29x2){this[_0xd587[2254]]= _0x5c29x2};mxGraphView[_0xd587[202]][_0xd587[2295]]= function(){return this[_0xd587[2251]]};mxGraphView[_0xd587[202]][_0xd587[2311]]= function(_0x5c29x2){this[_0xd587[2251]]= _0x5c29x2};mxGraphView[_0xd587[202]][_0xd587[2312]]= function(){return this[_0xd587[1214]]};mxGraphView[_0xd587[202]][_0xd587[1517]]= function(_0x5c29x2){this[_0xd587[1214]]= _0x5c29x2};mxGraphView[_0xd587[202]][_0xd587[2313]]= function(_0x5c29x2){if(null== _0x5c29x2){return this[_0xd587[1214]]};for(var _0x5c29x3=[],_0x5c29x4=0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){var _0x5c29x5=this[_0xd587[248]](_0x5c29x2[_0x5c29x4]);null!= _0x5c29x5&& _0x5c29x3[_0xd587[207]](_0x5c29x5)};return _0x5c29x3};mxGraphView[_0xd587[202]][_0xd587[2265]]= function(_0x5c29x2){var _0x5c29x3=null;null!= _0x5c29x2&& (_0x5c29x3= this[_0xd587[1214]][_0xd587[205]](_0x5c29x2),null!= _0x5c29x3&& (this[_0xd587[1179]][_0xd587[259]][_0xd587[515]](_0x5c29x3),_0x5c29x3[_0xd587[515]]()));return _0x5c29x3};mxGraphView[_0xd587[202]][_0xd587[1230]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1179]][_0xd587[1705]](_0x5c29x2);_0x5c29x2=  new mxCellState(this,_0x5c29x2,_0x5c29x3);this[_0xd587[1179]][_0xd587[259]][_0xd587[2155]](_0x5c29x2,this[_0xd587[2287]]());return _0x5c29x2};mxGraphView[_0xd587[202]][_0xd587[2051]]= function(){return this[_0xd587[510]]};mxGraphView[_0xd587[202]][_0xd587[2052]]= function(){return this[_0xd587[2053]]};mxGraphView[_0xd587[202]][_0xd587[2024]]= function(){return this[_0xd587[505]]};mxGraphView[_0xd587[202]][_0xd587[1524]]= function(){return this[_0xd587[506]]};mxGraphView[_0xd587[202]][_0xd587[2314]]= function(_0x5c29x2){_0x5c29x2= mxEvent[_0xd587[728]](_0x5c29x2);return _0x5c29x2== this[_0xd587[1179]][_0xd587[526]]|| _0x5c29x2[_0xd587[265]]== this[_0xd587[2053]]|| null!= _0x5c29x2[_0xd587[265]]&& _0x5c29x2[_0xd587[265]][_0xd587[265]]== this[_0xd587[2053]]|| _0x5c29x2== this[_0xd587[510]][_0xd587[265]]|| _0x5c29x2== this[_0xd587[510]]|| _0x5c29x2== this[_0xd587[2053]]|| _0x5c29x2== this[_0xd587[505]]|| _0x5c29x2== this[_0xd587[506]]};mxGraphView[_0xd587[202]][_0xd587[2315]]= function(_0x5c29x2){var _0x5c29x3=mxUtils[_0xd587[445]](this[_0xd587[1179]][_0xd587[526]]);_0x5c29x2=  new mxPoint(_0x5c29x2[_0xd587[782]]- _0x5c29x3[_0xd587[235]],_0x5c29x2[_0xd587[784]]- _0x5c29x3[_0xd587[236]]);var _0x5c29x3=this[_0xd587[1179]][_0xd587[526]][_0xd587[359]],_0x5c29x4=this[_0xd587[1179]][_0xd587[526]][_0xd587[159]];if(_0x5c29x3> _0x5c29x4&& _0x5c29x2[_0xd587[235]]> _0x5c29x4+ 2&& _0x5c29x2[_0xd587[235]]<= _0x5c29x3){return !0};_0x5c29x3= this[_0xd587[1179]][_0xd587[526]][_0xd587[167]];_0x5c29x4= this[_0xd587[1179]][_0xd587[526]][_0xd587[157]];return _0x5c29x3> _0x5c29x4&& _0x5c29x2[_0xd587[236]]> _0x5c29x4+ 2&& _0x5c29x2[_0xd587[236]]<= _0x5c29x3?!0:!1};mxGraphView[_0xd587[202]][_0xd587[176]]= function(){this[_0xd587[2163]]();var _0x5c29x2=this[_0xd587[1179]];_0x5c29x2[_0xd587[507]]== mxConstants[_0xd587[508]]?this[_0xd587[1569]]():_0x5c29x2[_0xd587[507]]== mxConstants[_0xd587[1523]]?this[_0xd587[1571]]():this[_0xd587[1570]]()};mxGraphView[_0xd587[202]][_0xd587[2163]]= function(){var _0x5c29x2=this[_0xd587[1179]],_0x5c29x3=_0x5c29x2[_0xd587[526]];if(null!= _0x5c29x3){mxEvent[_0xd587[759]](_0x5c29x3,mxUtils[_0xd587[885]](this,function(_0x5c29x3){mxClient[_0xd587[754]]&& _0x5c29x2[_0xd587[2203]]()&& _0x5c29x2[_0xd587[2126]](!_0x5c29x2[_0xd587[2134]]());this[_0xd587[2314]](_0x5c29x3)&& (!mxClient[_0xd587[80]]&& !mxClient[_0xd587[76]]&& !mxClient[_0xd587[71]]&& !mxClient[_0xd587[75]]|| !this[_0xd587[2315]](_0x5c29x3))&& _0x5c29x2[_0xd587[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x5c29x3))}),mxUtils[_0xd587[885]](this,function(_0x5c29x3){this[_0xd587[2314]](_0x5c29x3)&& _0x5c29x2[_0xd587[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x5c29x3))}),mxUtils[_0xd587[885]](this,function(_0x5c29x3){this[_0xd587[2314]](_0x5c29x3)&& _0x5c29x2[_0xd587[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x5c29x3))}));mxEvent[_0xd587[169]](_0x5c29x3,_0xd587[760],mxUtils[_0xd587[885]](this,function(_0x5c29x3){_0x5c29x2[_0xd587[761]](_0x5c29x3)}));var _0x5c29x4=function(_0x5c29x4){var _0x5c29x9=null;mxClient[_0xd587[754]]&& (_0x5c29x9= mxEvent[_0xd587[731]](_0x5c29x4),_0x5c29x4= mxEvent[_0xd587[733]](_0x5c29x4),_0x5c29x4= mxUtils[_0xd587[2196]](_0x5c29x3,_0x5c29x9,_0x5c29x4),_0x5c29x9= _0x5c29x2[_0xd587[441]][_0xd587[248]](_0x5c29x2[_0xd587[999]](_0x5c29x4[_0xd587[235]],_0x5c29x4[_0xd587[236]])));return _0x5c29x9};_0x5c29x2[_0xd587[1133]]({mouseDown:function(_0x5c29x3,_0x5c29x4){_0x5c29x2[_0xd587[2316]][_0xd587[1032]]()},mouseMove:function(){},mouseUp:function(){}});this[_0xd587[2317]]= mxUtils[_0xd587[885]](this,function(_0x5c29x3){null!= _0x5c29x2[_0xd587[2276]]&& _0x5c29x2[_0xd587[2276]][_0xd587[2277]]()&& _0x5c29x2[_0xd587[2276]][_0xd587[801]]();this[_0xd587[2252]]&& (_0x5c29x2[_0xd587[1009]]&& !mxEvent[_0xd587[721]](_0x5c29x3))&& _0x5c29x2[_0xd587[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x5c29x3,_0x5c29x4(_0x5c29x3)))});this[_0xd587[2318]]= mxUtils[_0xd587[885]](this,function(_0x5c29x3){this[_0xd587[2252]]&& _0x5c29x2[_0xd587[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x5c29x3))});mxEvent[_0xd587[759]](document,null,this[_0xd587[2317]],this[_0xd587[2318]])}};mxGraphView[_0xd587[202]][_0xd587[1570]]= function(){var _0x5c29x2=this[_0xd587[1179]][_0xd587[526]];null!= _0x5c29x2&& (this[_0xd587[510]]= this[_0xd587[2319]](_0xd587[118],_0xd587[118]),this[_0xd587[2053]]= this[_0xd587[2319]](_0xd587[942],_0xd587[942]),this[_0xd587[505]]= this[_0xd587[2319]](_0xd587[942],_0xd587[942]),this[_0xd587[506]]= this[_0xd587[2319]](_0xd587[942],_0xd587[942]),this[_0xd587[510]][_0xd587[62]](this[_0xd587[2053]]),this[_0xd587[510]][_0xd587[62]](this[_0xd587[505]]),this[_0xd587[510]][_0xd587[62]](this[_0xd587[506]]),_0x5c29x2[_0xd587[62]](this[_0xd587[510]]),mxClient[_0xd587[496]]&& (_0x5c29x2= mxUtils[_0xd587[885]](this,function(_0x5c29x2){_0x5c29x2= this[_0xd587[517]]();this[_0xd587[2320]](_0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]]+ this[_0xd587[1179]][_0xd587[467]],_0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]]+ this[_0xd587[1179]][_0xd587[467]])}),mxEvent[_0xd587[169]](window,_0xd587[129],_0x5c29x2)))};mxGraphView[_0xd587[202]][_0xd587[2320]]= function(_0x5c29x2,_0x5c29x3){if(null!= this[_0xd587[1179]][_0xd587[526]]){var _0x5c29x4=this[_0xd587[1179]][_0xd587[526]][_0xd587[167]];this[_0xd587[510]][_0xd587[124]][_0xd587[117]]= this[_0xd587[1179]][_0xd587[526]][_0xd587[359]]< _0x5c29x2?_0x5c29x2+ _0xd587[168]:_0xd587[118];this[_0xd587[510]][_0xd587[124]][_0xd587[119]]= _0x5c29x4< _0x5c29x3?_0x5c29x3+ _0xd587[168]:_0xd587[118]}};mxGraphView[_0xd587[202]][_0xd587[2319]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=document[_0xd587[55]](_0xd587[529]);null!= _0x5c29x2&& null!= _0x5c29x3?(_0x5c29x4[_0xd587[124]][_0xd587[491]]= _0xd587[492],_0x5c29x4[_0xd587[124]][_0xd587[361]]= _0xd587[946],_0x5c29x4[_0xd587[124]][_0xd587[125]]= _0xd587[946],_0x5c29x4[_0xd587[124]][_0xd587[117]]= _0x5c29x2,_0x5c29x4[_0xd587[124]][_0xd587[119]]= _0x5c29x3):_0x5c29x4[_0xd587[124]][_0xd587[491]]= _0xd587[1500];return _0x5c29x4};mxGraphView[_0xd587[202]][_0xd587[1571]]= function(){var _0x5c29x2=this[_0xd587[1179]][_0xd587[526]];if(null!= _0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[359]],_0x5c29x4=_0x5c29x2[_0xd587[167]];this[_0xd587[510]]= this[_0xd587[2321]](_0x5c29x3,_0x5c29x4);this[_0xd587[2053]]= this[_0xd587[2321]](_0x5c29x3,_0x5c29x4);this[_0xd587[505]]= this[_0xd587[2321]](_0x5c29x3,_0x5c29x4);this[_0xd587[506]]= this[_0xd587[2321]](_0x5c29x3,_0x5c29x4);this[_0xd587[510]][_0xd587[62]](this[_0xd587[2053]]);this[_0xd587[510]][_0xd587[62]](this[_0xd587[505]]);this[_0xd587[510]][_0xd587[62]](this[_0xd587[506]]);_0x5c29x2[_0xd587[62]](this[_0xd587[510]])}};mxGraphView[_0xd587[202]][_0xd587[2321]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=document[_0xd587[55]](mxClient[_0xd587[463]]+ _0xd587[1499]);_0x5c29x4[_0xd587[124]][_0xd587[491]]= _0xd587[492];_0x5c29x4[_0xd587[124]][_0xd587[361]]= _0xd587[946];_0x5c29x4[_0xd587[124]][_0xd587[125]]= _0xd587[946];_0x5c29x4[_0xd587[124]][_0xd587[117]]= _0x5c29x2+ _0xd587[168];_0x5c29x4[_0xd587[124]][_0xd587[119]]= _0x5c29x3+ _0xd587[168];_0x5c29x4[_0xd587[57]](_0xd587[1462],_0x5c29x2+ _0xd587[537]+ _0x5c29x3);_0x5c29x4[_0xd587[57]](_0xd587[2322],_0xd587[2323]);return _0x5c29x4};mxGraphView[_0xd587[202]][_0xd587[1569]]= function(){var _0x5c29x2=this[_0xd587[1179]][_0xd587[526]];this[_0xd587[510]]= document[_0xd587[509]](mxConstants.NS_SVG,_0xd587[449]);this[_0xd587[2053]]= document[_0xd587[509]](mxConstants.NS_SVG,_0xd587[449]);this[_0xd587[510]][_0xd587[62]](this[_0xd587[2053]]);this[_0xd587[505]]= document[_0xd587[509]](mxConstants.NS_SVG,_0xd587[449]);this[_0xd587[510]][_0xd587[62]](this[_0xd587[505]]);this[_0xd587[506]]= document[_0xd587[509]](mxConstants.NS_SVG,_0xd587[449]);this[_0xd587[510]][_0xd587[62]](this[_0xd587[506]]);var _0x5c29x3=document[_0xd587[509]](mxConstants.NS_SVG,_0xd587[571]);_0x5c29x3[_0xd587[124]][_0xd587[117]]= _0xd587[118];_0x5c29x3[_0xd587[124]][_0xd587[119]]= _0xd587[118];_0x5c29x3[_0xd587[124]][_0xd587[495]]= _0xd587[694];_0x5c29x3[_0xd587[62]](this[_0xd587[510]]);null!= _0x5c29x2&& (_0x5c29x2[_0xd587[62]](_0x5c29x3),_0xd587[2324]== mxUtils[_0xd587[275]](_0x5c29x2)[_0xd587[491]]&& (_0x5c29x2[_0xd587[124]][_0xd587[491]]= _0xd587[1500]))};mxGraphView[_0xd587[202]][_0xd587[515]]= function(){var _0x5c29x2=null!= this[_0xd587[510]]?this[_0xd587[510]][_0xd587[538]]:null;null== _0x5c29x2&& (_0x5c29x2= this[_0xd587[510]]);null!= _0x5c29x2&& null!= _0x5c29x2[_0xd587[265]]&& (this[_0xd587[200]](this[_0xd587[1741]],!0),mxEvent[_0xd587[938]](document,null,this[_0xd587[2317]],this[_0xd587[2318]]),mxEvent[_0xd587[762]](this[_0xd587[1179]][_0xd587[526]]),_0x5c29x2[_0xd587[265]][_0xd587[266]](_0x5c29x2),this[_0xd587[506]]= this[_0xd587[505]]= this[_0xd587[2053]]= this[_0xd587[510]]= this[_0xd587[2318]]= this[_0xd587[2317]]= null)};function mxCurrentRootChange(_0x5c29x2,_0x5c29x3){this[_0xd587[441]]= _0x5c29x2;this[_0xd587[257]]= this[_0xd587[813]]= _0x5c29x3;this[_0xd587[2325]]= null== _0x5c29x3;if(!this[_0xd587[2325]]){for(var _0x5c29x4=this[_0xd587[441]][_0xd587[1741]],_0x5c29x5=this[_0xd587[441]][_0xd587[1179]][_0xd587[502]]();null!= _0x5c29x4;){if(_0x5c29x4== _0x5c29x3){this[_0xd587[2325]]=  !0;break};_0x5c29x4= _0x5c29x5[_0xd587[1197]](_0x5c29x4)}}}mxCurrentRootChange[_0xd587[202]][_0xd587[350]]= function(){var _0x5c29x2=this[_0xd587[441]][_0xd587[1741]];this[_0xd587[441]][_0xd587[1741]]= this[_0xd587[257]];this[_0xd587[257]]= _0x5c29x2;_0x5c29x2= this[_0xd587[441]][_0xd587[1179]][_0xd587[2326]](this[_0xd587[441]][_0xd587[1741]]);null!= _0x5c29x2&& (this[_0xd587[441]][_0xd587[513]]=  new mxPoint(-_0x5c29x2[_0xd587[235]],-_0x5c29x2[_0xd587[236]]));this[_0xd587[441]][_0xd587[746]]( new mxEventObject(this[_0xd587[2325]]?mxEvent[_0xd587[2327]]:mxEvent[_0xd587[2328]],_0xd587[813],this[_0xd587[441]][_0xd587[1741]],_0xd587[257],this[_0xd587[257]]));this[_0xd587[2325]]?(this[_0xd587[441]][_0xd587[200]](this[_0xd587[441]][_0xd587[1741]],!0),this[_0xd587[441]][_0xd587[2264]]()):this[_0xd587[441]][_0xd587[802]]();this[_0xd587[2325]]= !this[_0xd587[2325]]};function mxGraph(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){this[_0xd587[2329]]= null;this[_0xd587[2330]]= _0x5c29x4;this[_0xd587[507]]= mxClient[_0xd587[48]]?mxConstants[_0xd587[508]]:_0x5c29x4== mxConstants[_0xd587[2331]]&& mxClient[_0xd587[47]]?mxConstants[_0xd587[1523]]:_0x5c29x4== mxConstants[_0xd587[2332]]?mxConstants[_0xd587[1656]]:_0x5c29x4== mxConstants[_0xd587[2333]]?mxConstants[_0xd587[2209]]:mxConstants[_0xd587[2334]];this[_0xd587[251]]= null!= _0x5c29x3?_0x5c29x3: new mxGraphModel;this[_0xd587[2335]]= [];this[_0xd587[2336]]= [];this[_0xd587[259]]= this[_0xd587[2337]]();this[_0xd587[2339]](this[_0xd587[2338]]());this[_0xd587[2341]](null!= _0x5c29x5?_0x5c29x5:this[_0xd587[2340]]());this[_0xd587[441]]= this[_0xd587[2342]]();this[_0xd587[2343]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x3){this[_0xd587[1177]](_0x5c29x3[_0xd587[720]](_0xd587[1061])[_0xd587[1065]])});this[_0xd587[251]][_0xd587[169]](mxEvent.CHANGE,this[_0xd587[2343]]);this[_0xd587[2344]]();null!= _0x5c29x2&& this[_0xd587[176]](_0x5c29x2);this[_0xd587[441]][_0xd587[2259]]()}mxLoadResources&& mxResources[_0xd587[99]](mxClient[_0xd587[86]]+ _0xd587[2345]);mxGraph[_0xd587[202]]=  new mxEventSource;mxGraph[_0xd587[202]][_0xd587[196]]= mxGraph;mxGraph[_0xd587[202]][_0xd587[2346]]= [];mxGraph[_0xd587[202]][_0xd587[2329]]= null;mxGraph[_0xd587[202]][_0xd587[1009]]=  !1;mxGraph[_0xd587[202]][_0xd587[251]]= null;mxGraph[_0xd587[202]][_0xd587[441]]= null;mxGraph[_0xd587[202]][_0xd587[94]]= null;mxGraph[_0xd587[202]][_0xd587[2105]]= null;mxGraph[_0xd587[202]][_0xd587[2347]]= null;mxGraph[_0xd587[202]][_0xd587[259]]= null;mxGraph[_0xd587[202]][_0xd587[2335]]= null;mxGraph[_0xd587[202]][_0xd587[2330]]= null;mxGraph[_0xd587[202]][_0xd587[507]]= null;mxGraph[_0xd587[202]][_0xd587[1020]]= 10;mxGraph[_0xd587[202]][_0xd587[991]]=  !0;mxGraph[_0xd587[202]][_0xd587[2348]]=  !0;mxGraph[_0xd587[202]][_0xd587[2349]]=  !0;mxGraph[_0xd587[202]][_0xd587[2350]]= 700;mxGraph[_0xd587[202]][_0xd587[2351]]= 25;mxGraph[_0xd587[202]][_0xd587[2352]]= 0;mxGraph[_0xd587[202]][_0xd587[2352]]= 0;mxGraph[_0xd587[202]][_0xd587[2213]]= 0;mxGraph[_0xd587[202]][_0xd587[2215]]=  !0;mxGraph[_0xd587[202]][_0xd587[2353]]= 4;mxGraph[_0xd587[202]][_0xd587[2354]]= 0.5;mxGraph[_0xd587[202]][_0xd587[2355]]= null;mxGraph[_0xd587[202]][_0xd587[2356]]= null;mxGraph[_0xd587[202]][_0xd587[1617]]= null;mxGraph[_0xd587[202]][_0xd587[2273]]=  !1;mxGraph[_0xd587[202]][_0xd587[2357]]=  !1;mxGraph[_0xd587[202]][_0xd587[2358]]= _0xd587[579];mxGraph[_0xd587[202]][_0xd587[2359]]=  !0;mxGraph[_0xd587[202]][_0xd587[2360]]= 20;mxGraph[_0xd587[202]][_0xd587[2361]]=  !1;mxGraph[_0xd587[202]][_0xd587[2013]]= mxConstants[_0xd587[516]];mxGraph[_0xd587[202]][_0xd587[2012]]= 1.5;mxGraph[_0xd587[202]][_0xd587[984]]=  !0;mxGraph[_0xd587[202]][_0xd587[2362]]=  !0;mxGraph[_0xd587[202]][_0xd587[2363]]=  !0;mxGraph[_0xd587[202]][_0xd587[2364]]=  !1;mxGraph[_0xd587[202]][_0xd587[2365]]=  !0;mxGraph[_0xd587[202]][_0xd587[2366]]=  !0;mxGraph[_0xd587[202]][_0xd587[2367]]=  !0;mxGraph[_0xd587[202]][_0xd587[2368]]=  !1;mxGraph[_0xd587[202]][_0xd587[2369]]=  !0;mxGraph[_0xd587[202]][_0xd587[2206]]=  !0;mxGraph[_0xd587[202]][_0xd587[2370]]=  !0;mxGraph[_0xd587[202]][_0xd587[2371]]=  !0;mxGraph[_0xd587[202]][_0xd587[2372]]=  !0;mxGraph[_0xd587[202]][_0xd587[2373]]=  !0;mxGraph[_0xd587[202]][_0xd587[2374]]=  !1;mxGraph[_0xd587[202]][_0xd587[2375]]=  !1;mxGraph[_0xd587[202]][_0xd587[2376]]=  !0;mxGraph[_0xd587[202]][_0xd587[2377]]=  !0;mxGraph[_0xd587[202]][_0xd587[2378]]=  !0;mxGraph[_0xd587[202]][_0xd587[2379]]=  !0;mxGraph[_0xd587[202]][_0xd587[2380]]=  !0;mxGraph[_0xd587[202]][_0xd587[2381]]=  !1;mxGraph[_0xd587[202]][_0xd587[1012]]=  !0;mxGraph[_0xd587[202]][_0xd587[2382]]=  !1;mxGraph[_0xd587[202]][_0xd587[2383]]=  !1;mxGraph[_0xd587[202]][_0xd587[2384]]=  !1;mxGraph[_0xd587[202]][_0xd587[1013]]=  !0;mxGraph[_0xd587[202]][_0xd587[2385]]= null;mxGraph[_0xd587[202]][_0xd587[2386]]= null;mxGraph[_0xd587[202]][_0xd587[2387]]= null;mxGraph[_0xd587[202]][_0xd587[2388]]= null;mxGraph[_0xd587[202]][_0xd587[2389]]=  !1;mxGraph[_0xd587[202]][_0xd587[467]]= 0;mxGraph[_0xd587[202]][_0xd587[2158]]=  !0;mxGraph[_0xd587[202]][_0xd587[2159]]=  !1;mxGraph[_0xd587[202]][_0xd587[2168]]=  !0;mxGraph[_0xd587[202]][_0xd587[2390]]=  !0;mxGraph[_0xd587[202]][_0xd587[2391]]=  !0;mxGraph[_0xd587[202]][_0xd587[2392]]=  !0;mxGraph[_0xd587[202]][_0xd587[2393]]=  !0;mxGraph[_0xd587[202]][_0xd587[2394]]=  !0;mxGraph[_0xd587[202]][_0xd587[2395]]= 1.2;mxGraph[_0xd587[202]][_0xd587[2396]]=  !1;mxGraph[_0xd587[202]][_0xd587[2397]]=  !0;mxGraph[_0xd587[202]][_0xd587[2398]]=  !0;mxGraph[_0xd587[202]][_0xd587[2399]]=  !1;mxGraph[_0xd587[202]][_0xd587[2400]]=  !1;mxGraph[_0xd587[202]][_0xd587[2401]]=  !0;mxGraph[_0xd587[202]][_0xd587[2402]]=  !1;mxGraph[_0xd587[202]][_0xd587[2293]]= mxEdgeStyle[_0xd587[2403]];mxGraph[_0xd587[202]][_0xd587[2404]]=  !0;mxGraph[_0xd587[202]][_0xd587[2405]]=  !1;mxGraph[_0xd587[202]][_0xd587[2406]]=  !0;mxGraph[_0xd587[202]][_0xd587[2407]]=  !1;mxGraph[_0xd587[202]][_0xd587[2408]]=  !0;mxGraph[_0xd587[202]][_0xd587[2409]]=  !0;mxGraph[_0xd587[202]][_0xd587[2410]]=  !1;mxGraph[_0xd587[202]][_0xd587[2411]]=  !0;mxGraph[_0xd587[202]][_0xd587[2412]]=  !0;mxGraph[_0xd587[202]][_0xd587[2180]]= mxConstants[_0xd587[2065]];mxGraph[_0xd587[202]][_0xd587[2336]]= null;mxGraph[_0xd587[202]][_0xd587[2413]]= 0.1;mxGraph[_0xd587[202]][_0xd587[2414]]= 8;mxGraph[_0xd587[202]][_0xd587[1136]]= 0;mxGraph[_0xd587[202]][_0xd587[1137]]= 0;mxGraph[_0xd587[202]][_0xd587[2415]]=  new mxImage(mxClient[_0xd587[88]]+ _0xd587[2416],9,9);mxGraph[_0xd587[202]][_0xd587[2417]]=  new mxImage(mxClient[_0xd587[88]]+ _0xd587[2418],9,9);mxGraph[_0xd587[202]][_0xd587[2419]]=  new mxImage(_0xd587[2420],16,16);mxGraph[_0xd587[202]][_0xd587[2421]]= _0xd587[130]!= mxClient[_0xd587[90]]?_0xd587[2422]:_0xd587[110];mxGraph[_0xd587[202]][_0xd587[2423]]= _0xd587[130]!= mxClient[_0xd587[90]]?_0xd587[2424]:_0xd587[110];mxGraph[_0xd587[202]][_0xd587[2425]]= _0xd587[130]!= mxClient[_0xd587[90]]?_0xd587[2426]:_0xd587[110];mxGraph[_0xd587[202]][_0xd587[176]]= function(_0x5c29x2){this[_0xd587[526]]= _0x5c29x2;this[_0xd587[2347]]= this[_0xd587[2427]]();this[_0xd587[441]][_0xd587[176]]();this[_0xd587[2258]]();mxClient[_0xd587[80]]&& (mxEvent[_0xd587[169]](window,_0xd587[2428],mxUtils[_0xd587[885]](this,function(){this[_0xd587[515]]()})),mxEvent[_0xd587[169]](_0x5c29x2,_0xd587[2429],mxUtils[_0xd587[885]](this,function(){return this[_0xd587[2203]]()})));8== document[_0xd587[5]]&& _0x5c29x2[_0xd587[1583]](_0xd587[1582],_0xd587[2430])};mxGraph[_0xd587[202]][_0xd587[2344]]= function(_0x5c29x2){this[_0xd587[2276]]=  new mxTooltipHandler(this);this[_0xd587[2276]][_0xd587[995]](!1);this[_0xd587[2316]]=  new mxPanningHandler(this);this[_0xd587[2316]][_0xd587[2431]]=  !1;this[_0xd587[2432]]=  new mxSelectionCellsHandler(this);this[_0xd587[2433]]=  new mxConnectionHandler(this);this[_0xd587[2433]][_0xd587[995]](!1);this[_0xd587[1011]]=  new mxGraphHandler(this)};mxGraph[_0xd587[202]][_0xd587[2338]]= function(){return  new mxGraphSelectionModel(this)};mxGraph[_0xd587[202]][_0xd587[2340]]= function(){return  new mxStylesheet};mxGraph[_0xd587[202]][_0xd587[2342]]= function(){return  new mxGraphView(this)};mxGraph[_0xd587[202]][_0xd587[2337]]= function(){return  new mxCellRenderer};mxGraph[_0xd587[202]][_0xd587[2427]]= function(){return  new mxCellEditor(this)};mxGraph[_0xd587[202]][_0xd587[502]]= function(){return this[_0xd587[251]]};mxGraph[_0xd587[202]][_0xd587[249]]= function(){return this[_0xd587[441]]};mxGraph[_0xd587[202]][_0xd587[2434]]= function(){return this[_0xd587[94]]};mxGraph[_0xd587[202]][_0xd587[2341]]= function(_0x5c29x2){this[_0xd587[94]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2435]]= function(){return this[_0xd587[2105]]};mxGraph[_0xd587[202]][_0xd587[2339]]= function(_0x5c29x2){this[_0xd587[2105]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2436]]= function(_0x5c29x2){for(var _0x5c29x3=[],_0x5c29x4=0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){var _0x5c29x5=_0x5c29x2[_0x5c29x4];if(_0x5c29x5[_0xd587[196]]!= mxRootChange){var _0x5c29x9=null;_0x5c29x5 instanceof  mxChildChange&& null== _0x5c29x5[_0xd587[257]]?_0x5c29x9= _0x5c29x5[_0xd587[247]]:null!= _0x5c29x5[_0xd587[246]]&& _0x5c29x5[_0xd587[246]] instanceof  mxCell&& (_0x5c29x9= _0x5c29x5[_0xd587[246]]);null!= _0x5c29x9&& 0> mxUtils[_0xd587[2]](_0x5c29x3,_0x5c29x9)&& _0x5c29x3[_0xd587[207]](_0x5c29x9)}};return this[_0xd587[502]]()[_0xd587[1964]](_0x5c29x3)};mxGraph[_0xd587[202]][_0xd587[1177]]= function(_0x5c29x2){for(var _0x5c29x3=0;_0x5c29x3< _0x5c29x2[_0xd587[67]];_0x5c29x3++){this[_0xd587[2437]](_0x5c29x2[_0x5c29x3])};this[_0xd587[2439]](this[_0xd587[2438]](_0x5c29x2));this[_0xd587[441]][_0xd587[2264]]();this[_0xd587[2258]]()};mxGraph[_0xd587[202]][_0xd587[2438]]= function(_0x5c29x2){for(var _0x5c29x3=[],_0x5c29x4=0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){var _0x5c29x5=_0x5c29x2[_0x5c29x4];if(_0x5c29x5 instanceof  mxRootChange){break}else {_0x5c29x5 instanceof  mxChildChange?null!= _0x5c29x5[_0xd587[257]]&& null== _0x5c29x5[_0xd587[1101]]&& (_0x5c29x3= _0x5c29x3[_0xd587[1919]](this[_0xd587[251]][_0xd587[1939]](_0x5c29x5[_0xd587[247]]))):_0x5c29x5 instanceof  mxVisibleChange&& (_0x5c29x3= _0x5c29x3[_0xd587[1919]](this[_0xd587[251]][_0xd587[1939]](_0x5c29x5[_0xd587[246]])))}};return _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[2437]]= function(_0x5c29x2){if(_0x5c29x2 instanceof  mxRootChange){this[_0xd587[2440]](),this[_0xd587[2441]](_0x5c29x2[_0xd587[257]]),this[_0xd587[2398]]&& (this[_0xd587[441]][_0xd587[255]]= 1,this[_0xd587[441]][_0xd587[513]][_0xd587[235]]= 0,this[_0xd587[441]][_0xd587[513]][_0xd587[236]]= 0),this[_0xd587[746]]( new mxEventObject(mxEvent.ROOT))}else {if(_0x5c29x2 instanceof  mxChildChange){var _0x5c29x3=this[_0xd587[251]][_0xd587[1197]](_0x5c29x2[_0xd587[247]]);null!= _0x5c29x3?this[_0xd587[441]][_0xd587[2263]](_0x5c29x2[_0xd587[247]],!0,!1,null!= _0x5c29x2[_0xd587[257]]):(this[_0xd587[2441]](_0x5c29x2[_0xd587[247]]),this[_0xd587[441]][_0xd587[1741]]== _0x5c29x2[_0xd587[247]]&& this[_0xd587[2442]]());_0x5c29x3!= _0x5c29x2[_0xd587[257]]&& (null!= _0x5c29x3&& this[_0xd587[441]][_0xd587[2263]](_0x5c29x3,!1,!1),null!= _0x5c29x2[_0xd587[257]]&& this[_0xd587[441]][_0xd587[2263]](_0x5c29x2[_0xd587[257]],!1,!1))}else {_0x5c29x2 instanceof  mxTerminalChange|| _0x5c29x2 instanceof  mxGeometryChange?this[_0xd587[441]][_0xd587[2263]](_0x5c29x2[_0xd587[246]]):_0x5c29x2 instanceof  mxValueChange?this[_0xd587[441]][_0xd587[2263]](_0x5c29x2[_0xd587[246]],!1,!1):_0x5c29x2 instanceof  mxStyleChange?(this[_0xd587[441]][_0xd587[2263]](_0x5c29x2[_0xd587[246]],!0,!0,!1),this[_0xd587[441]][_0xd587[2265]](_0x5c29x2[_0xd587[246]])):null!= _0x5c29x2[_0xd587[246]]&& _0x5c29x2[_0xd587[246]] instanceof  mxCell&& this[_0xd587[2441]](_0x5c29x2[_0xd587[246]])}}};mxGraph[_0xd587[202]][_0xd587[2441]]= function(_0x5c29x2){for(var _0x5c29x3=this[_0xd587[251]][_0xd587[262]](_0x5c29x2),_0x5c29x4=0;_0x5c29x4< _0x5c29x3;_0x5c29x4++){this[_0xd587[2441]](this[_0xd587[251]][_0xd587[263]](_0x5c29x2,_0x5c29x4))};this[_0xd587[441]][_0xd587[2265]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2443]]= function(_0x5c29x2,_0x5c29x3){null== _0x5c29x2[_0xd587[1211]]&& (_0x5c29x2[_0xd587[1211]]= []);_0x5c29x2[_0xd587[1211]][_0xd587[207]](_0x5c29x3);var _0x5c29x4=this[_0xd587[441]][_0xd587[248]](_0x5c29x2);null!= _0x5c29x4&& this[_0xd587[259]][_0xd587[258]](_0x5c29x4);this[_0xd587[746]]( new mxEventObject(mxEvent.ADD_OVERLAY,_0xd587[246],_0x5c29x2,_0xd587[2201],_0x5c29x3));return _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[2200]]= function(_0x5c29x2){return _0x5c29x2[_0xd587[1211]]};mxGraph[_0xd587[202]][_0xd587[2444]]= function(_0x5c29x2,_0x5c29x3){if(null== _0x5c29x3){this[_0xd587[2445]](_0x5c29x2)}else {var _0x5c29x4=mxUtils[_0xd587[2]](_0x5c29x2[_0xd587[1211]],_0x5c29x3);0<= _0x5c29x4?(_0x5c29x2[_0xd587[1211]][_0xd587[300]](_0x5c29x4,1),0== _0x5c29x2[_0xd587[1211]][_0xd587[67]]&& (_0x5c29x2[_0xd587[1211]]= null),_0x5c29x4= this[_0xd587[441]][_0xd587[248]](_0x5c29x2),null!= _0x5c29x4&& this[_0xd587[259]][_0xd587[258]](_0x5c29x4),this[_0xd587[746]]( new mxEventObject(mxEvent.REMOVE_OVERLAY,_0xd587[246],_0x5c29x2,_0xd587[2201],_0x5c29x3))):_0x5c29x3= null};return _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[2445]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[1211]];if(null!= _0x5c29x3){_0x5c29x2[_0xd587[1211]]= null;var _0x5c29x4=this[_0xd587[441]][_0xd587[248]](_0x5c29x2);null!= _0x5c29x4&& this[_0xd587[259]][_0xd587[258]](_0x5c29x4);for(_0x5c29x4= 0;_0x5c29x4< _0x5c29x3[_0xd587[67]];_0x5c29x4++){this[_0xd587[746]]( new mxEventObject(mxEvent.REMOVE_OVERLAY,_0xd587[246],_0x5c29x2,_0xd587[2201],_0x5c29x3[_0x5c29x4]))}};return _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[2446]]= function(_0x5c29x2){_0x5c29x2= null!= _0x5c29x2?_0x5c29x2:this[_0xd587[251]][_0xd587[501]]();this[_0xd587[2445]](_0x5c29x2);for(var _0x5c29x3=this[_0xd587[251]][_0xd587[262]](_0x5c29x2),_0x5c29x4=0;_0x5c29x4< _0x5c29x3;_0x5c29x4++){var _0x5c29x5=this[_0xd587[251]][_0xd587[263]](_0x5c29x2,_0x5c29x4);this[_0xd587[2446]](_0x5c29x5)}};mxGraph[_0xd587[202]][_0xd587[2447]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){if(null!= _0x5c29x3&& 0< _0x5c29x3[_0xd587[67]]){return _0x5c29x4= null!= _0x5c29x4?_0x5c29x4:this[_0xd587[2419]],_0x5c29x3=  new mxCellOverlay(_0x5c29x4,_0xd587[2448]+ _0x5c29x3+ _0xd587[2449]),_0x5c29x5&& _0x5c29x3[_0xd587[169]](mxEvent.CLICK,mxUtils[_0xd587[885]](this,function(_0x5c29x3,_0x5c29x4){this[_0xd587[994]]()&& this[_0xd587[2450]](_0x5c29x2)})),this[_0xd587[2443]](_0x5c29x2,_0x5c29x3)};this[_0xd587[2445]](_0x5c29x2);return null};mxGraph[_0xd587[202]][_0xd587[855]]= function(_0x5c29x2){this[_0xd587[2451]](null,_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2451]]= function(_0x5c29x2,_0x5c29x3){null== _0x5c29x2&& (_0x5c29x2= this[_0xd587[2452]](),null!= _0x5c29x2&& !this[_0xd587[2453]](_0x5c29x2)&& (_0x5c29x2= null));null!= _0x5c29x2&& (this[_0xd587[746]]( new mxEventObject(mxEvent.START_EDITING,_0xd587[246],_0x5c29x2,_0xd587[763],_0x5c29x3)),this[_0xd587[2347]][_0xd587[855]](_0x5c29x2,_0x5c29x3))};mxGraph[_0xd587[202]][_0xd587[2142]]= function(_0x5c29x2,_0x5c29x3){return this[_0xd587[2454]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2126]]= function(_0x5c29x2){this[_0xd587[2347]][_0xd587[2126]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[850]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[251]][_0xd587[473]]();try{this[_0xd587[2456]](_0x5c29x2,_0x5c29x3,this[_0xd587[2455]](_0x5c29x2)),this[_0xd587[746]]( new mxEventObject(mxEvent.LABEL_CHANGED,_0xd587[246],_0x5c29x2,_0xd587[131],_0x5c29x3,_0xd587[763],_0x5c29x4))}finally{this[_0xd587[251]][_0xd587[476]]()};return _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2456]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[251]][_0xd587[473]]();try{this[_0xd587[251]][_0xd587[1966]](_0x5c29x2,_0x5c29x3),_0x5c29x4&& this[_0xd587[2457]](_0x5c29x2,!1)}finally{this[_0xd587[251]][_0xd587[476]]()}};mxGraph[_0xd587[202]][_0xd587[859]]= function(_0x5c29x2){this[_0xd587[2126]](!0);this[_0xd587[2433]][_0xd587[862]]();this[_0xd587[1011]][_0xd587[862]]();_0x5c29x2= this[_0xd587[897]]();for(var _0x5c29x3=0;_0x5c29x3< _0x5c29x2[_0xd587[67]];_0x5c29x3++){var _0x5c29x4=this[_0xd587[441]][_0xd587[248]](_0x5c29x2[_0x5c29x3]);null!= _0x5c29x4&& null!= _0x5c29x4[_0xd587[2458]]&& _0x5c29x4[_0xd587[2458]][_0xd587[862]]()}};mxGraph[_0xd587[202]][_0xd587[173]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[727]](),_0x5c29x4=_0x5c29x2[_0xd587[736]](),_0x5c29x5= new mxEventObject(mxEvent.CLICK,_0xd587[763],_0x5c29x3,_0xd587[246],_0x5c29x4);_0x5c29x2[_0xd587[721]]()&& _0x5c29x5[_0xd587[722]]();this[_0xd587[746]](_0x5c29x5);this[_0xd587[994]]()&& (!mxEvent[_0xd587[721]](_0x5c29x3)&& !_0x5c29x5[_0xd587[721]]())&& (null!= _0x5c29x4?this[_0xd587[2459]](_0x5c29x4,_0x5c29x3):(_0x5c29x4= null,this[_0xd587[2460]]()&& (_0x5c29x4= this[_0xd587[2461]](_0x5c29x2[_0xd587[734]](),_0x5c29x2[_0xd587[735]]())),null!= _0x5c29x4?this[_0xd587[2459]](_0x5c29x4,_0x5c29x3):this[_0xd587[2462]](_0x5c29x3)|| this[_0xd587[2440]]()))};mxGraph[_0xd587[202]][_0xd587[761]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4= new mxEventObject(mxEvent.DOUBLE_CLICK,_0xd587[763],_0x5c29x2,_0xd587[246],_0x5c29x3);this[_0xd587[746]](_0x5c29x4);this[_0xd587[994]]()&& (!mxEvent[_0xd587[721]](_0x5c29x2)&& !_0x5c29x4[_0xd587[721]]()&& null!= _0x5c29x3&& this[_0xd587[2453]](_0x5c29x3))&& this[_0xd587[2451]](_0x5c29x3,_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[1014]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){if(!this[_0xd587[2382]]&& (this[_0xd587[2384]]|| mxUtils[_0xd587[1134]](this[_0xd587[526]]))){var _0x5c29x9=this[_0xd587[526]];_0x5c29x5= null!= _0x5c29x5?_0x5c29x5:20;if(_0x5c29x2>= _0x5c29x9[_0xd587[360]]&& _0x5c29x3>= _0x5c29x9[_0xd587[190]]&& _0x5c29x2<= _0x5c29x9[_0xd587[360]]+ _0x5c29x9[_0xd587[159]]&& _0x5c29x3<= _0x5c29x9[_0xd587[190]]+ _0x5c29x9[_0xd587[157]]){var _0x5c29xa=_0x5c29x9[_0xd587[360]]+ _0x5c29x9[_0xd587[159]]- _0x5c29x2;if(_0x5c29xa< _0x5c29x5){if(_0x5c29x2= _0x5c29x9[_0xd587[360]],_0x5c29x9[_0xd587[360]]+= _0x5c29x5- _0x5c29xa,_0x5c29x4&& _0x5c29x2== _0x5c29x9[_0xd587[360]]){if(this[_0xd587[507]]== mxConstants[_0xd587[508]]){_0x5c29x2= this[_0xd587[441]][_0xd587[2024]]()[_0xd587[538]];var _0x5c29x12=this[_0xd587[526]][_0xd587[1526]]+ _0x5c29x5- _0x5c29xa}else {_0x5c29x12= Math[_0xd587[160]](_0x5c29x9[_0xd587[159]],_0x5c29x9[_0xd587[1526]])+ _0x5c29x5- _0x5c29xa,_0x5c29x2= this[_0xd587[441]][_0xd587[2051]]()};_0x5c29x2[_0xd587[124]][_0xd587[117]]= _0x5c29x12+ _0xd587[168];_0x5c29x9[_0xd587[360]]+= _0x5c29x5- _0x5c29xa}}else {_0x5c29xa= _0x5c29x2- _0x5c29x9[_0xd587[360]],_0x5c29xa< _0x5c29x5&& (_0x5c29x9[_0xd587[360]]-= _0x5c29x5- _0x5c29xa)};_0x5c29xa= _0x5c29x9[_0xd587[190]]+ _0x5c29x9[_0xd587[157]]- _0x5c29x3;_0x5c29xa< _0x5c29x5?(_0x5c29x2= _0x5c29x9[_0xd587[190]],_0x5c29x9[_0xd587[190]]+= _0x5c29x5- _0x5c29xa,_0x5c29x2== _0x5c29x9[_0xd587[190]]&& _0x5c29x4&& (this[_0xd587[507]]== mxConstants[_0xd587[508]]?(_0x5c29x2= this[_0xd587[441]][_0xd587[2024]]()[_0xd587[538]],_0x5c29x3= this[_0xd587[526]][_0xd587[191]]+ _0x5c29x5- _0x5c29xa):(_0x5c29x3= Math[_0xd587[160]](_0x5c29x9[_0xd587[157]],_0x5c29x9[_0xd587[191]])+ _0x5c29x5- _0x5c29xa,_0x5c29x2= this[_0xd587[441]][_0xd587[2051]]()),_0x5c29x2[_0xd587[124]][_0xd587[119]]= _0x5c29x3+ _0xd587[168],_0x5c29x9[_0xd587[190]]+= _0x5c29x5- _0x5c29xa)):(_0x5c29xa= _0x5c29x3- _0x5c29x9[_0xd587[190]],_0x5c29xa< _0x5c29x5&& (_0x5c29x9[_0xd587[190]]-= _0x5c29x5- _0x5c29xa))}}else {this[_0xd587[2383]]&& !this[_0xd587[2316]][_0xd587[1124]]&& (null== this[_0xd587[2463]]&& (this[_0xd587[2463]]= this[_0xd587[2464]]()),this[_0xd587[2463]][_0xd587[1143]](_0x5c29x2+ this[_0xd587[1136]],_0x5c29x3+ this[_0xd587[1137]]))}};mxGraph[_0xd587[202]][_0xd587[2464]]= function(){return  new mxPanningManager(this)};mxGraph[_0xd587[202]][_0xd587[2465]]= function(){function _0x5c29x2(_0x5c29x2){var _0x5c29x3=0,_0x5c29x3=_0xd587[2466]== _0x5c29x2?2:_0xd587[2467]== _0x5c29x2?4:_0xd587[2468]== _0x5c29x2?6:parseInt(_0x5c29x2);isNaN(_0x5c29x3)&& (_0x5c29x3= 0);return _0x5c29x3}var _0x5c29x3=mxUtils[_0xd587[275]](this[_0xd587[526]]),_0x5c29x4= new mxRectangle;_0x5c29x4[_0xd587[235]]= _0x5c29x2(_0x5c29x3[_0xd587[2469]])+ parseInt(_0x5c29x3[_0xd587[357]]|| 0);_0x5c29x4[_0xd587[236]]= _0x5c29x2(_0x5c29x3[_0xd587[2470]])+ parseInt(_0x5c29x3[_0xd587[2471]]|| 0);_0x5c29x4[_0xd587[117]]= _0x5c29x2(_0x5c29x3[_0xd587[2472]])+ parseInt(_0x5c29x3[_0xd587[1164]]|| 0);_0x5c29x4[_0xd587[119]]= _0x5c29x2(_0x5c29x3[_0xd587[2473]])+ parseInt(_0x5c29x3[_0xd587[2474]]|| 0);return _0x5c29x4};mxGraph[_0xd587[202]][_0xd587[2475]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x2= this[_0xd587[441]][_0xd587[255]];var _0x5c29x5=this[_0xd587[441]][_0xd587[513]],_0x5c29x9=this[_0xd587[2013]],_0x5c29xa=_0x5c29x2* this[_0xd587[2012]],_0x5c29x9= new mxRectangle(0,0,_0x5c29x9[_0xd587[117]]* _0x5c29xa,_0x5c29x9[_0xd587[119]]* _0x5c29xa);_0x5c29x3= this[_0xd587[2357]]?Math[_0xd587[430]](_0x5c29x3/ _0x5c29x9[_0xd587[117]]):1;_0x5c29x4= this[_0xd587[2357]]?Math[_0xd587[430]](_0x5c29x4/ _0x5c29x9[_0xd587[119]]):1;return  new mxRectangle(0,0,_0x5c29x3* _0x5c29x9[_0xd587[117]]+ 2+ _0x5c29x5[_0xd587[235]]/ _0x5c29x2,_0x5c29x4* _0x5c29x9[_0xd587[119]]+ 2+ _0x5c29x5[_0xd587[236]]/ _0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2258]]= function(){var _0x5c29x2=this[_0xd587[517]]();if(null!= this[_0xd587[526]]){var _0x5c29x3=this[_0xd587[2476]](),_0x5c29x4=Math[_0xd587[160]](0,_0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]]+ 1+ _0x5c29x3),_0x5c29x3=Math[_0xd587[160]](0,_0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]]+ 1+ _0x5c29x3);null!= this[_0xd587[2387]]&& (_0x5c29x4= Math[_0xd587[160]](_0x5c29x4,this[_0xd587[2387]][_0xd587[117]]),_0x5c29x3= Math[_0xd587[160]](_0x5c29x3,this[_0xd587[2387]][_0xd587[119]]));this[_0xd587[2389]]&& this[_0xd587[2477]](_0x5c29x4,_0x5c29x3);if(this[_0xd587[2361]]|| !mxClient[_0xd587[80]]&& this[_0xd587[2273]]){var _0x5c29x5=this[_0xd587[2475]](_0x5c29x2,_0x5c29x4,_0x5c29x3);null!= _0x5c29x5&& (_0x5c29x4= _0x5c29x5[_0xd587[117]],_0x5c29x3= _0x5c29x5[_0xd587[119]])};null!= this[_0xd587[2386]]&& (_0x5c29x4= Math[_0xd587[160]](_0x5c29x4,this[_0xd587[2386]][_0xd587[117]]* this[_0xd587[441]][_0xd587[255]]),_0x5c29x3= Math[_0xd587[160]](_0x5c29x3,this[_0xd587[2386]][_0xd587[119]]* this[_0xd587[441]][_0xd587[255]]));_0x5c29x4= Math[_0xd587[430]](_0x5c29x4- 1);_0x5c29x3= Math[_0xd587[430]](_0x5c29x3- 1);this[_0xd587[507]]== mxConstants[_0xd587[508]]?(_0x5c29x5= this[_0xd587[441]][_0xd587[2024]]()[_0xd587[538]],_0x5c29x5[_0xd587[124]][_0xd587[2478]]= Math[_0xd587[160]](1,_0x5c29x4)+ _0xd587[168],_0x5c29x5[_0xd587[124]][_0xd587[2479]]= Math[_0xd587[160]](1,_0x5c29x3)+ _0xd587[168],_0x5c29x5[_0xd587[124]][_0xd587[117]]= _0xd587[118],_0x5c29x5[_0xd587[124]][_0xd587[119]]= _0xd587[118]):mxClient[_0xd587[496]]?this[_0xd587[441]][_0xd587[2320]](Math[_0xd587[160]](1,_0x5c29x4),Math[_0xd587[160]](1,_0x5c29x3)):(this[_0xd587[441]][_0xd587[510]][_0xd587[124]][_0xd587[2478]]= Math[_0xd587[160]](1,_0x5c29x4)+ _0xd587[168],this[_0xd587[441]][_0xd587[510]][_0xd587[124]][_0xd587[2479]]= Math[_0xd587[160]](1,_0x5c29x3)+ _0xd587[168]);this[_0xd587[2480]](this[_0xd587[2357]],_0x5c29x4- 1,_0x5c29x3- 1)};this[_0xd587[746]]( new mxEventObject(mxEvent.SIZE,_0xd587[1562],_0x5c29x2))};mxGraph[_0xd587[202]][_0xd587[2477]]= function(_0x5c29x2,_0x5c29x3){if(mxClient[_0xd587[80]]){if(mxClient[_0xd587[496]]){var _0x5c29x4=this[_0xd587[2465]]();_0x5c29x2+= Math[_0xd587[160]](2,_0x5c29x4[_0xd587[235]]+ _0x5c29x4[_0xd587[117]]+ 1);_0x5c29x3+= Math[_0xd587[160]](2,_0x5c29x4[_0xd587[236]]+ _0x5c29x4[_0xd587[119]]+ 1)}else {9<= document[_0xd587[5]]?(_0x5c29x2+= 3,_0x5c29x3+= 5):(_0x5c29x2+= 1,_0x5c29x3+= 1)}}else {_0x5c29x3+= 1};null!= this[_0xd587[2388]]&& (_0x5c29x2= Math[_0xd587[243]](this[_0xd587[2388]][_0xd587[117]],_0x5c29x2),_0x5c29x3= Math[_0xd587[243]](this[_0xd587[2388]][_0xd587[119]],_0x5c29x3));this[_0xd587[526]][_0xd587[124]][_0xd587[117]]= Math[_0xd587[430]](_0x5c29x2)+ _0xd587[168];this[_0xd587[526]][_0xd587[124]][_0xd587[119]]= Math[_0xd587[430]](_0x5c29x3)+ _0xd587[168]};mxGraph[_0xd587[202]][_0xd587[2480]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[441]][_0xd587[255]],_0x5c29x9=this[_0xd587[441]][_0xd587[513]],_0x5c29xa=this[_0xd587[2013]],_0x5c29x12=_0x5c29x5* this[_0xd587[2012]],_0x5c29x9= new mxRectangle(_0x5c29x5* _0x5c29x9[_0xd587[235]],_0x5c29x5* _0x5c29x9[_0xd587[236]],_0x5c29xa[_0xd587[117]]* _0x5c29x12,_0x5c29xa[_0xd587[119]]* _0x5c29x12);_0x5c29x2= _0x5c29x2&& Math[_0xd587[243]](_0x5c29x9[_0xd587[117]],_0x5c29x9[_0xd587[119]])> this[_0xd587[2360]];_0x5c29x9[_0xd587[235]]= mxUtils[_0xd587[1454]](_0x5c29x9[_0xd587[235]],_0x5c29x9[_0xd587[117]]);_0x5c29x9[_0xd587[236]]= mxUtils[_0xd587[1454]](_0x5c29x9[_0xd587[236]],_0x5c29x9[_0xd587[119]]);_0x5c29xa= _0x5c29x2?Math[_0xd587[430]]((_0x5c29x3- _0x5c29x9[_0xd587[235]])/ _0x5c29x9[_0xd587[117]]):0;_0x5c29x2= _0x5c29x2?Math[_0xd587[430]]((_0x5c29x4- _0x5c29x9[_0xd587[236]])/ _0x5c29x9[_0xd587[119]]):0;null== this[_0xd587[2481]]&& 0< _0x5c29xa&& (this[_0xd587[2481]]= []);if(null!= this[_0xd587[2481]]){for(_0x5c29x12= 0;_0x5c29x12<= _0x5c29xa;_0x5c29x12++){var _0x5c29x13=[ new mxPoint(_0x5c29x9[_0xd587[235]]+ _0x5c29x12* _0x5c29x9[_0xd587[117]],1), new mxPoint(_0x5c29x9[_0xd587[235]]+ _0x5c29x12* _0x5c29x9[_0xd587[117]],_0x5c29x4)];null!= this[_0xd587[2481]][_0x5c29x12]?(this[_0xd587[2481]][_0x5c29x12][_0xd587[255]]= 1,this[_0xd587[2481]][_0x5c29x12][_0xd587[1525]]= _0x5c29x13,this[_0xd587[2481]][_0x5c29x12][_0xd587[258]]()):(_0x5c29x13=  new mxPolyline(_0x5c29x13,this[_0xd587[2358]],this[_0xd587[255]]),_0x5c29x13[_0xd587[507]]= this[_0xd587[507]],_0x5c29x13[_0xd587[1522]]= this[_0xd587[2359]],_0x5c29x13[_0xd587[255]]= _0x5c29x5,_0x5c29x13[_0xd587[176]](this[_0xd587[441]][_0xd587[2053]]),_0x5c29x13[_0xd587[258]](),this[_0xd587[2481]][_0x5c29x12]= _0x5c29x13)};for(_0x5c29x12= _0x5c29xa;_0x5c29x12< this[_0xd587[2481]][_0xd587[67]];_0x5c29x12++){this[_0xd587[2481]][_0x5c29x12][_0xd587[515]]()};this[_0xd587[2481]][_0xd587[300]](_0x5c29xa,this[_0xd587[2481]][_0xd587[67]]- _0x5c29xa)};null== this[_0xd587[2482]]&& 0< _0x5c29x2&& (this[_0xd587[2482]]= []);if(null!= this[_0xd587[2482]]){for(_0x5c29x12= 0;_0x5c29x12<= _0x5c29x2;_0x5c29x12++){_0x5c29x13= [ new mxPoint(1,_0x5c29x9[_0xd587[236]]+ _0x5c29x12* _0x5c29x9[_0xd587[119]]), new mxPoint(_0x5c29x3,_0x5c29x9[_0xd587[236]]+ _0x5c29x12* _0x5c29x9[_0xd587[119]])],null!= this[_0xd587[2482]][_0x5c29x12]?(this[_0xd587[2482]][_0x5c29x12][_0xd587[255]]= 1,this[_0xd587[2482]][_0x5c29x12][_0xd587[1525]]= _0x5c29x13,this[_0xd587[2482]][_0x5c29x12][_0xd587[258]]()):(_0x5c29x13=  new mxPolyline(_0x5c29x13,this[_0xd587[2358]],_0x5c29x5),_0x5c29x13[_0xd587[507]]= this[_0xd587[507]],_0x5c29x13[_0xd587[1522]]= this[_0xd587[2359]],_0x5c29x13[_0xd587[255]]= _0x5c29x5,_0x5c29x13[_0xd587[176]](this[_0xd587[441]][_0xd587[2053]]),_0x5c29x13[_0xd587[258]](),this[_0xd587[2482]][_0x5c29x12]= _0x5c29x13)};for(_0x5c29x12= _0x5c29x2;_0x5c29x12< this[_0xd587[2482]][_0xd587[67]];_0x5c29x12++){this[_0xd587[2482]][_0x5c29x12][_0xd587[515]]()};this[_0xd587[2482]][_0xd587[300]](_0x5c29x2,this[_0xd587[2482]][_0xd587[67]]- _0x5c29x2)}};mxGraph[_0xd587[202]][_0xd587[1705]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[251]][_0xd587[474]](_0x5c29x2),_0x5c29x4=null,_0x5c29x4=this[_0xd587[251]][_0xd587[250]](_0x5c29x2)?this[_0xd587[94]][_0xd587[2077]]():this[_0xd587[94]][_0xd587[2076]]();null!= _0x5c29x3&& (_0x5c29x4= this[_0xd587[2483]](this[_0xd587[94]][_0xd587[1705]](_0x5c29x3,_0x5c29x4)));null== _0x5c29x4&& (_0x5c29x4= mxGraph[_0xd587[202]][_0xd587[2346]]);return _0x5c29x4};mxGraph[_0xd587[202]][_0xd587[2483]]= function(_0x5c29x2){if(null!= _0x5c29x2){var _0x5c29x3=_0x5c29x2[mxConstants[_0xd587[2484]]],_0x5c29x4=this[_0xd587[2485]](_0x5c29x3);null!= _0x5c29x4?_0x5c29x2[mxConstants[_0xd587[2484]]]= _0x5c29x4:_0x5c29x4= _0x5c29x3;null!= _0x5c29x4&& _0xd587[2486]== _0x5c29x4[_0xd587[85]](0,11)&& (_0x5c29x3= _0x5c29x4[_0xd587[2]](_0xd587[537]),0< _0x5c29x3&& (_0x5c29x4= _0x5c29x4[_0xd587[85]](0,_0x5c29x3)+ _0xd587[2487]+ _0x5c29x4[_0xd587[85]](_0x5c29x3+ 1)),_0x5c29x2[mxConstants[_0xd587[2484]]]= _0x5c29x4)};return _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2488]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3= _0x5c29x3|| this[_0xd587[897]]();if(null!= _0x5c29x3){this[_0xd587[251]][_0xd587[473]]();try{for(var _0x5c29x4=0;_0x5c29x4< _0x5c29x3[_0xd587[67]];_0x5c29x4++){this[_0xd587[251]][_0xd587[475]](_0x5c29x3[_0x5c29x4],_0x5c29x2)}}finally{this[_0xd587[251]][_0xd587[476]]()}}};mxGraph[_0xd587[202]][_0xd587[2489]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x4= _0x5c29x4|| this[_0xd587[2452]]();this[_0xd587[2490]](_0x5c29x2,_0x5c29x3,[_0x5c29x4])};mxGraph[_0xd587[202]][_0xd587[2490]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:!1;_0x5c29x4= _0x5c29x4|| this[_0xd587[897]]();if(null!= _0x5c29x4&& 0< _0x5c29x4[_0xd587[67]]){var _0x5c29x5=this[_0xd587[441]][_0xd587[248]](_0x5c29x4[0]),_0x5c29x5=null!= _0x5c29x5?_0x5c29x5[_0xd587[124]]:this[_0xd587[1705]](_0x5c29x4[0]);null!= _0x5c29x5&& (_0x5c29x3= mxUtils[_0xd587[433]](_0x5c29x5,_0x5c29x2,_0x5c29x3)?0:1,this[_0xd587[1717]](_0x5c29x2,_0x5c29x3,_0x5c29x4))}};mxGraph[_0xd587[202]][_0xd587[1717]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x4= _0x5c29x4|| this[_0xd587[897]]();mxUtils[_0xd587[1717]](this[_0xd587[251]],_0x5c29x4,_0x5c29x2,_0x5c29x3)};mxGraph[_0xd587[202]][_0xd587[2491]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[2492]](_0x5c29x2,_0x5c29x3,null,_0x5c29x4)};mxGraph[_0xd587[202]][_0xd587[2492]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x5= _0x5c29x5|| this[_0xd587[897]]();if(null!= _0x5c29x5&& 0< _0x5c29x5[_0xd587[67]]){if(null== _0x5c29x4){var _0x5c29x9=this[_0xd587[441]][_0xd587[248]](_0x5c29x5[0]),_0x5c29x9=null!= _0x5c29x9?_0x5c29x9[_0xd587[124]]:this[_0xd587[1705]](_0x5c29x5[0]);null!= _0x5c29x9&& (_0x5c29x4= (parseInt(_0x5c29x9[_0x5c29x2]|| 0)& _0x5c29x3)!= _0x5c29x3)};mxUtils[_0xd587[2492]](this[_0xd587[251]],_0x5c29x5,_0x5c29x2,_0x5c29x3,_0x5c29x4)}};mxGraph[_0xd587[202]][_0xd587[849]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){null== _0x5c29x3&& (_0x5c29x3= this[_0xd587[897]]());if(null!= _0x5c29x3&& 1< _0x5c29x3[_0xd587[67]]){if(null== _0x5c29x4){for(var _0x5c29x5=0;_0x5c29x5< _0x5c29x3[_0xd587[67]];_0x5c29x5++){var _0x5c29x9=this[_0xd587[1198]](_0x5c29x3[_0x5c29x5]);if(null!= _0x5c29x9&& !this[_0xd587[251]][_0xd587[250]](_0x5c29x3[_0x5c29x5])){if(null== _0x5c29x4){if(_0x5c29x2== mxConstants[_0xd587[479]]){_0x5c29x4= _0x5c29x9[_0xd587[235]]+ _0x5c29x9[_0xd587[117]]/ 2;break}else {if(_0x5c29x2== mxConstants[_0xd587[480]]){_0x5c29x4= _0x5c29x9[_0xd587[235]]+ _0x5c29x9[_0xd587[117]]}else {if(_0x5c29x2== mxConstants[_0xd587[1687]]){_0x5c29x4= _0x5c29x9[_0xd587[236]]}else {if(_0x5c29x2== mxConstants[_0xd587[481]]){_0x5c29x4= _0x5c29x9[_0xd587[236]]+ _0x5c29x9[_0xd587[119]]/ 2;break}else {_0x5c29x4= _0x5c29x2== mxConstants[_0xd587[482]]?_0x5c29x9[_0xd587[236]]+ _0x5c29x9[_0xd587[119]]:_0x5c29x9[_0xd587[235]]}}}}}else {_0x5c29x4= _0x5c29x2== mxConstants[_0xd587[480]]?Math[_0xd587[160]](_0x5c29x4,_0x5c29x9[_0xd587[235]]+ _0x5c29x9[_0xd587[117]]):_0x5c29x2== mxConstants[_0xd587[1687]]?Math[_0xd587[243]](_0x5c29x4,_0x5c29x9[_0xd587[236]]):_0x5c29x2== mxConstants[_0xd587[482]]?Math[_0xd587[160]](_0x5c29x4,_0x5c29x9[_0xd587[236]]+ _0x5c29x9[_0xd587[119]]):Math[_0xd587[243]](_0x5c29x4,_0x5c29x9[_0xd587[235]])}}}};if(null!= _0x5c29x4){this[_0xd587[251]][_0xd587[473]]();try{for(_0x5c29x5= 0;_0x5c29x5< _0x5c29x3[_0xd587[67]];_0x5c29x5++){_0x5c29x9= this[_0xd587[1198]](_0x5c29x3[_0x5c29x5]),null!= _0x5c29x9&& !this[_0xd587[251]][_0xd587[250]](_0x5c29x3[_0x5c29x5])&& (_0x5c29x9= _0x5c29x9[_0xd587[238]](),_0x5c29x2== mxConstants[_0xd587[479]]?_0x5c29x9[_0xd587[235]]= _0x5c29x4- _0x5c29x9[_0xd587[117]]/ 2:_0x5c29x2== mxConstants[_0xd587[480]]?_0x5c29x9[_0xd587[235]]= _0x5c29x4- _0x5c29x9[_0xd587[117]]:_0x5c29x2== mxConstants[_0xd587[1687]]?_0x5c29x9[_0xd587[236]]= _0x5c29x4:_0x5c29x2== mxConstants[_0xd587[481]]?_0x5c29x9[_0xd587[236]]= _0x5c29x4- _0x5c29x9[_0xd587[119]]/ 2:_0x5c29x2== mxConstants[_0xd587[482]]?_0x5c29x9[_0xd587[236]]= _0x5c29x4- _0x5c29x9[_0xd587[119]]:_0x5c29x9[_0xd587[235]]= _0x5c29x4,this[_0xd587[251]][_0xd587[1724]](_0x5c29x3[_0x5c29x5],_0x5c29x9))};this[_0xd587[746]]( new mxEventObject(mxEvent.ALIGN_CELLS,_0xd587[611],_0x5c29x2,_0xd587[895],_0x5c29x3))}finally{this[_0xd587[251]][_0xd587[476]]()}}};return _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[854]]= function(_0x5c29x2){if(null!= _0x5c29x2&& null!= this[_0xd587[2356]]){this[_0xd587[251]][_0xd587[473]]();try{var _0x5c29x3=this[_0xd587[251]][_0xd587[474]](_0x5c29x2);null== _0x5c29x3|| 0== _0x5c29x3[_0xd587[67]]?this[_0xd587[251]][_0xd587[475]](_0x5c29x2,this[_0xd587[2356]]):this[_0xd587[251]][_0xd587[475]](_0x5c29x2,null);this[_0xd587[1809]](_0x5c29x2);this[_0xd587[746]]( new mxEventObject(mxEvent.FLIP_EDGE,_0xd587[1989],_0x5c29x2))}finally{this[_0xd587[251]][_0xd587[476]]()}};return _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2493]]= function(_0x5c29x2){this[_0xd587[2336]][_0xd587[207]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2494]]= function(_0x5c29x2){for(var _0x5c29x3=[],_0x5c29x4=0;_0x5c29x4< this[_0xd587[2336]][_0xd587[67]];_0x5c29x4++){this[_0xd587[2336]][_0x5c29x4]!= _0x5c29x2&& _0x5c29x3[_0xd587[207]](this[_0xd587[2336]][_0x5c29x4])};this[_0xd587[2336]]= _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[2485]]= function(_0x5c29x2){if(null!= _0x5c29x2){for(var _0x5c29x3=0;_0x5c29x3< this[_0xd587[2336]][_0xd587[67]];_0x5c29x3++){var _0x5c29x4=this[_0xd587[2336]][_0x5c29x3][_0xd587[1202]](_0x5c29x2);if(null!= _0x5c29x4){return _0x5c29x4}}};return null};mxGraph[_0xd587[202]][_0xd587[840]]= function(_0x5c29x2,_0x5c29x3){null== _0x5c29x3&& (_0x5c29x3= mxUtils[_0xd587[1779]](this[_0xd587[897]](),!0));this[_0xd587[251]][_0xd587[473]]();try{this[_0xd587[841]](_0x5c29x3,_0x5c29x2),this[_0xd587[746]]( new mxEventObject(mxEvent.ORDER_CELLS,_0xd587[2495],_0x5c29x2,_0xd587[895],_0x5c29x3))}finally{this[_0xd587[251]][_0xd587[476]]()};return _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[841]]= function(_0x5c29x2,_0x5c29x3){if(null!= _0x5c29x2){this[_0xd587[251]][_0xd587[473]]();try{for(var _0x5c29x4=0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){var _0x5c29x5=this[_0xd587[251]][_0xd587[1197]](_0x5c29x2[_0x5c29x4]);_0x5c29x3?this[_0xd587[251]][_0xd587[99]](_0x5c29x5,_0x5c29x2[_0x5c29x4],_0x5c29x4):this[_0xd587[251]][_0xd587[99]](_0x5c29x5,_0x5c29x2[_0x5c29x4],this[_0xd587[251]][_0xd587[262]](_0x5c29x5)- 1)};this[_0xd587[746]]( new mxEventObject(mxEvent.CELLS_ORDERED,_0xd587[2495],_0x5c29x3,_0xd587[895],_0x5c29x2))}finally{this[_0xd587[251]][_0xd587[476]]()}}};mxGraph[_0xd587[202]][_0xd587[844]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){null== _0x5c29x4&& (_0x5c29x4= mxUtils[_0xd587[1779]](this[_0xd587[897]](),!0));_0x5c29x4= this[_0xd587[2496]](_0x5c29x4);null== _0x5c29x2&& (_0x5c29x2= this[_0xd587[2497]](_0x5c29x4));var _0x5c29x5=this[_0xd587[2498]](_0x5c29x2,_0x5c29x4,_0x5c29x3);if(0< _0x5c29x4[_0xd587[67]]&& null!= _0x5c29x5){var _0x5c29x9=this[_0xd587[251]][_0xd587[1197]](_0x5c29x2);null== _0x5c29x9&& (_0x5c29x9= this[_0xd587[251]][_0xd587[1197]](_0x5c29x4[0]));this[_0xd587[251]][_0xd587[473]]();try{null== this[_0xd587[1198]](_0x5c29x2)&& this[_0xd587[251]][_0xd587[1724]](_0x5c29x2, new mxGeometry);var _0x5c29xa=this[_0xd587[251]][_0xd587[262]](_0x5c29x9);this[_0xd587[833]]([_0x5c29x2],_0x5c29x9,_0x5c29xa,null,null,!1);_0x5c29xa= this[_0xd587[251]][_0xd587[262]](_0x5c29x2);this[_0xd587[833]](_0x5c29x4,_0x5c29x2,_0x5c29xa,null,null,!1,!1);this[_0xd587[835]](_0x5c29x4,-_0x5c29x5[_0xd587[235]],-_0x5c29x5[_0xd587[236]],!1,!0);this[_0xd587[837]]([_0x5c29x2],[_0x5c29x5]);this[_0xd587[746]]( new mxEventObject(mxEvent.GROUP_CELLS,_0xd587[1504],_0x5c29x2,_0xd587[467],_0x5c29x3,_0xd587[895],_0x5c29x4))}finally{this[_0xd587[251]][_0xd587[476]]()}};return _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2496]]= function(_0x5c29x2){var _0x5c29x3=[];if(null!= _0x5c29x2&& 0< _0x5c29x2[_0xd587[67]]){var _0x5c29x4=this[_0xd587[251]][_0xd587[1197]](_0x5c29x2[0]);_0x5c29x3[_0xd587[207]](_0x5c29x2[0]);for(var _0x5c29x5=1;_0x5c29x5< _0x5c29x2[_0xd587[67]];_0x5c29x5++){this[_0xd587[251]][_0xd587[1197]](_0x5c29x2[_0x5c29x5])== _0x5c29x4&& _0x5c29x3[_0xd587[207]](_0x5c29x2[_0x5c29x5])}};return _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[2498]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x3= this[_0xd587[1729]](_0x5c29x3);null!= _0x5c29x3&& (this[_0xd587[1730]](_0x5c29x2)&& (_0x5c29x2= this[_0xd587[1731]](_0x5c29x2),_0x5c29x3[_0xd587[235]]-= _0x5c29x2[_0xd587[117]],_0x5c29x3[_0xd587[236]]-= _0x5c29x2[_0xd587[119]],_0x5c29x3[_0xd587[117]]+= _0x5c29x2[_0xd587[117]],_0x5c29x3[_0xd587[119]]+= _0x5c29x2[_0xd587[119]]),_0x5c29x3[_0xd587[235]]-= _0x5c29x4,_0x5c29x3[_0xd587[236]]-= _0x5c29x4,_0x5c29x3[_0xd587[117]]+= 2* _0x5c29x4,_0x5c29x3[_0xd587[119]]+= 2* _0x5c29x4);return _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[2497]]= function(_0x5c29x2){_0x5c29x2=  new mxCell(_0xd587[110]);_0x5c29x2[_0xd587[1993]](!0);_0x5c29x2[_0xd587[1995]](!1);return _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[845]]= function(_0x5c29x2){var _0x5c29x3=[];if(null== _0x5c29x2){_0x5c29x2= this[_0xd587[897]]();for(var _0x5c29x4=[],_0x5c29x5=0;_0x5c29x5< _0x5c29x2[_0xd587[67]];_0x5c29x5++){0< this[_0xd587[251]][_0xd587[262]](_0x5c29x2[_0x5c29x5])&& _0x5c29x4[_0xd587[207]](_0x5c29x2[_0x5c29x5])};_0x5c29x2= _0x5c29x4};if(null!= _0x5c29x2&& 0< _0x5c29x2[_0xd587[67]]){this[_0xd587[251]][_0xd587[473]]();try{for(_0x5c29x5= 0;_0x5c29x5< _0x5c29x2[_0xd587[67]];_0x5c29x5++){var _0x5c29x9=this[_0xd587[251]][_0xd587[1953]](_0x5c29x2[_0x5c29x5]);if(null!= _0x5c29x9&& 0< _0x5c29x9[_0xd587[67]]){var _0x5c29x9=_0x5c29x9[_0xd587[1853]](),_0x5c29xa=this[_0xd587[251]][_0xd587[1197]](_0x5c29x2[_0x5c29x5]),_0x5c29x12=this[_0xd587[251]][_0xd587[262]](_0x5c29xa);this[_0xd587[833]](_0x5c29x9,_0x5c29xa,_0x5c29x12,null,null,!0);_0x5c29x3= _0x5c29x3[_0xd587[1919]](_0x5c29x9)}};this[_0xd587[843]](this[_0xd587[2499]](_0x5c29x2));this[_0xd587[746]]( new mxEventObject(mxEvent.UNGROUP_CELLS,_0xd587[895],_0x5c29x2))}finally{this[_0xd587[251]][_0xd587[476]]()}};return _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[846]]= function(_0x5c29x2){null== _0x5c29x2&& (_0x5c29x2= this[_0xd587[897]]());this[_0xd587[251]][_0xd587[473]]();try{var _0x5c29x3=this[_0xd587[902]](),_0x5c29x4=this[_0xd587[251]][_0xd587[262]](_0x5c29x3);this[_0xd587[833]](_0x5c29x2,_0x5c29x3,_0x5c29x4,null,null,!0);this[_0xd587[746]]( new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT,_0xd587[895],_0x5c29x2))}finally{this[_0xd587[251]][_0xd587[476]]()};return _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[1917]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){null== _0x5c29x2&& (_0x5c29x2= this[_0xd587[897]]());_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:0;_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:!1;this[_0xd587[251]][_0xd587[473]]();try{for(var _0x5c29x5=0;_0x5c29x5< _0x5c29x2[_0xd587[67]];_0x5c29x5++){var _0x5c29x9=this[_0xd587[1198]](_0x5c29x2[_0x5c29x5]);if(null!= _0x5c29x9){var _0x5c29xa=this[_0xd587[1955]](_0x5c29x2[_0x5c29x5]);if(null!= _0x5c29xa&& 0< _0x5c29xa[_0xd587[67]]){var _0x5c29x12=this[_0xd587[1729]](_0x5c29xa);if(0< _0x5c29x12[_0xd587[117]]&& 0< _0x5c29x12[_0xd587[119]]){var _0x5c29x13=this[_0xd587[1730]](_0x5c29x2[_0x5c29x5])?this[_0xd587[1731]](_0x5c29x2[_0x5c29x5]): new mxRectangle,_0x5c29x9=_0x5c29x9[_0xd587[238]]();_0x5c29x4&& (_0x5c29x9[_0xd587[235]]+= _0x5c29x12[_0xd587[235]]- _0x5c29x13[_0xd587[117]]- _0x5c29x3,_0x5c29x9[_0xd587[236]]+= _0x5c29x12[_0xd587[236]]- _0x5c29x13[_0xd587[119]]- _0x5c29x3);_0x5c29x9[_0xd587[117]]= _0x5c29x12[_0xd587[117]]+ _0x5c29x13[_0xd587[117]]+ 2* _0x5c29x3;_0x5c29x9[_0xd587[119]]= _0x5c29x12[_0xd587[119]]+ _0x5c29x13[_0xd587[119]]+ 2* _0x5c29x3;this[_0xd587[251]][_0xd587[1724]](_0x5c29x2[_0x5c29x5],_0x5c29x9);this[_0xd587[834]](_0x5c29xa,-_0x5c29x12[_0xd587[235]]+ _0x5c29x13[_0xd587[117]]+ _0x5c29x3,-_0x5c29x12[_0xd587[236]]+ _0x5c29x13[_0xd587[119]]+ _0x5c29x3)}}}}}finally{this[_0xd587[251]][_0xd587[476]]()};return _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[899]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:!0;var _0x5c29x4=null;if(null!= _0x5c29x2){for(var _0x5c29x5={},_0x5c29x4=[],_0x5c29x9=0;_0x5c29x9< _0x5c29x2[_0xd587[67]];_0x5c29x9++){var _0x5c29xa=mxCellPath[_0xd587[385]](_0x5c29x2[_0x5c29x9]);_0x5c29x5[_0x5c29xa]= _0x5c29x2[_0x5c29x9];_0x5c29x4[_0xd587[207]](_0x5c29x2[_0x5c29x9])};if(0< _0x5c29x4[_0xd587[67]]){for(var _0x5c29xa=this[_0xd587[441]][_0xd587[255]],_0x5c29x12=this[_0xd587[441]][_0xd587[513]],_0x5c29x4=this[_0xd587[251]][_0xd587[899]](_0x5c29x2,!0),_0x5c29x9=0;_0x5c29x9< _0x5c29x2[_0xd587[67]];_0x5c29x9++){if(!_0x5c29x3&& this[_0xd587[251]][_0xd587[250]](_0x5c29x4[_0x5c29x9])&& null!= this[_0xd587[2500]](_0x5c29x4[_0x5c29x9],this[_0xd587[251]][_0xd587[1709]](_0x5c29x4[_0x5c29x9],!0),this[_0xd587[251]][_0xd587[1709]](_0x5c29x4[_0x5c29x9],!1))){_0x5c29x4[_0x5c29x9]= null}else {var _0x5c29x13=this[_0xd587[251]][_0xd587[1721]](_0x5c29x4[_0x5c29x9]);if(null!= _0x5c29x13){var _0x5c29x14=this[_0xd587[441]][_0xd587[248]](_0x5c29x2[_0x5c29x9]),_0x5c29x15=this[_0xd587[441]][_0xd587[248]](this[_0xd587[251]][_0xd587[1197]](_0x5c29x2[_0x5c29x9]));if(null!= _0x5c29x14&& null!= _0x5c29x15){var _0x5c29x16=_0x5c29x15[_0xd587[2078]][_0xd587[235]],_0x5c29x15=_0x5c29x15[_0xd587[2078]][_0xd587[236]];if(this[_0xd587[251]][_0xd587[250]](_0x5c29x4[_0x5c29x9])){for(var _0x5c29x14=_0x5c29x14[_0xd587[439]],_0x5c29x17=this[_0xd587[251]][_0xd587[1709]](_0x5c29x2[_0x5c29x9],!0),_0x5c29x18=mxCellPath[_0xd587[385]](_0x5c29x17);null!= _0x5c29x17&& null== _0x5c29x5[_0x5c29x18];){_0x5c29x17= this[_0xd587[251]][_0xd587[1197]](_0x5c29x17),_0x5c29x18= mxCellPath[_0xd587[385]](_0x5c29x17)};null== _0x5c29x17&& _0x5c29x13[_0xd587[2007]]( new mxPoint(_0x5c29x14[0][_0xd587[235]]/ _0x5c29xa- _0x5c29x12[_0xd587[235]],_0x5c29x14[0][_0xd587[236]]/ _0x5c29xa- _0x5c29x12[_0xd587[236]]),!0);_0x5c29x17= this[_0xd587[251]][_0xd587[1709]](_0x5c29x2[_0x5c29x9],!1);for(_0x5c29x18= mxCellPath[_0xd587[385]](_0x5c29x17);null!= _0x5c29x17&& null== _0x5c29x5[_0x5c29x18];){_0x5c29x17= this[_0xd587[251]][_0xd587[1197]](_0x5c29x17),_0x5c29x18= mxCellPath[_0xd587[385]](_0x5c29x17)};null== _0x5c29x17&& (_0x5c29x17= _0x5c29x14[_0xd587[67]]- 1,_0x5c29x13[_0xd587[2007]]( new mxPoint(_0x5c29x14[_0x5c29x17][_0xd587[235]]/ _0x5c29xa- _0x5c29x12[_0xd587[235]],_0x5c29x14[_0x5c29x17][_0xd587[236]]/ _0x5c29xa- _0x5c29x12[_0xd587[236]]),!1));_0x5c29x13= _0x5c29x13[_0xd587[1525]];if(null!= _0x5c29x13){for(_0x5c29x14= 0;_0x5c29x14< _0x5c29x13[_0xd587[67]];_0x5c29x14++){_0x5c29x13[_0x5c29x14][_0xd587[235]]+= _0x5c29x16,_0x5c29x13[_0x5c29x14][_0xd587[236]]+= _0x5c29x15}}}else {_0x5c29x13[_0xd587[235]]+= _0x5c29x16,_0x5c29x13[_0xd587[236]]+= _0x5c29x15}}}}}}else {_0x5c29x4= []}};return _0x5c29x4};mxGraph[_0xd587[202]][_0xd587[2501]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14){_0x5c29x3= this[_0xd587[2502]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14);return this[_0xd587[2103]](_0x5c29x3,_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2502]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14){_0x5c29x2=  new mxGeometry(_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12);_0x5c29x2[_0xd587[1500]]= null!= _0x5c29x14?_0x5c29x14:!1;_0x5c29x4=  new mxCell(_0x5c29x4,_0x5c29x2,_0x5c29x13);_0x5c29x4[_0xd587[1945]](_0x5c29x3);_0x5c29x4[_0xd587[1993]](!0);_0x5c29x4[_0xd587[1995]](!0);return _0x5c29x4};mxGraph[_0xd587[202]][_0xd587[1960]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){_0x5c29x3= this[_0xd587[2503]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa);return this[_0xd587[2504]](_0x5c29x3,_0x5c29x2,_0x5c29x5,_0x5c29x9)};mxGraph[_0xd587[202]][_0xd587[2503]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){_0x5c29x2=  new mxCell(_0x5c29x4, new mxGeometry,_0x5c29xa);_0x5c29x2[_0xd587[1945]](_0x5c29x3);_0x5c29x2[_0xd587[1994]](!0);_0x5c29x2[_0xd587[256]][_0xd587[1500]]=  !0;return _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2504]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){return this[_0xd587[2103]](_0x5c29x2,_0x5c29x3,_0x5c29x9,_0x5c29x4,_0x5c29x5)};mxGraph[_0xd587[202]][_0xd587[2103]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){return this[_0xd587[832]]([_0x5c29x2],_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9)[0]};mxGraph[_0xd587[202]][_0xd587[832]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){null== _0x5c29x3&& (_0x5c29x3= this[_0xd587[902]]());null== _0x5c29x4&& (_0x5c29x4= this[_0xd587[251]][_0xd587[262]](_0x5c29x3));this[_0xd587[251]][_0xd587[473]]();try{this[_0xd587[833]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,!1,!0),this[_0xd587[746]]( new mxEventObject(mxEvent.ADD_CELLS,_0xd587[895],_0x5c29x2,_0xd587[1101],_0x5c29x3,_0xd587[1983],_0x5c29x4,_0xd587[1097],_0x5c29x5,_0xd587[772],_0x5c29x9))}finally{this[_0xd587[251]][_0xd587[476]]()};return _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[833]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12){if(null!= _0x5c29x2&& null!= _0x5c29x3&& null!= _0x5c29x4){this[_0xd587[251]][_0xd587[473]]();try{for(var _0x5c29x13=_0x5c29xa?this[_0xd587[441]][_0xd587[248]](_0x5c29x3):null,_0x5c29x14=null!= _0x5c29x13?_0x5c29x13[_0xd587[2078]]:null,_0x5c29x15= new mxPoint(0,0),_0x5c29x13=0;_0x5c29x13< _0x5c29x2[_0xd587[67]];_0x5c29x13++){if(null== _0x5c29x2[_0x5c29x13]){_0x5c29x4--}else {var _0x5c29x16=this[_0xd587[251]][_0xd587[1197]](_0x5c29x2[_0x5c29x13]);if(null!= _0x5c29x14&& _0x5c29x2[_0x5c29x13]!= _0x5c29x3&& _0x5c29x3!= _0x5c29x16){var _0x5c29x17=this[_0xd587[441]][_0xd587[248]](_0x5c29x16),_0x5c29x18=null!= _0x5c29x17?_0x5c29x17[_0xd587[2078]]:_0x5c29x15,_0x5c29x19=this[_0xd587[251]][_0xd587[1721]](_0x5c29x2[_0x5c29x13]);if(null!= _0x5c29x19){var _0x5c29x1a=_0x5c29x18[_0xd587[235]]- _0x5c29x14[_0xd587[235]],_0x5c29x1b=_0x5c29x18[_0xd587[236]]- _0x5c29x14[_0xd587[236]],_0x5c29x19=_0x5c29x19[_0xd587[238]]();_0x5c29x19[_0xd587[513]](_0x5c29x1a,_0x5c29x1b);!_0x5c29x19[_0xd587[1500]]&& (this[_0xd587[251]][_0xd587[1193]](_0x5c29x2[_0x5c29x13])&& !this[_0xd587[2505]]())&& (_0x5c29x19[_0xd587[235]]= Math[_0xd587[160]](0,_0x5c29x19[_0xd587[235]]),_0x5c29x19[_0xd587[236]]= Math[_0xd587[160]](0,_0x5c29x19[_0xd587[236]]));this[_0xd587[251]][_0xd587[1724]](_0x5c29x2[_0x5c29x13],_0x5c29x19)}};_0x5c29x3== _0x5c29x16&& _0x5c29x4+ _0x5c29x13> this[_0xd587[251]][_0xd587[262]](_0x5c29x3)&& _0x5c29x4--;this[_0xd587[251]][_0xd587[99]](_0x5c29x3,_0x5c29x2[_0x5c29x13],_0x5c29x4+ _0x5c29x13);this[_0xd587[2506]]()&& this[_0xd587[2507]](_0x5c29x2[_0x5c29x13])&& this[_0xd587[2508]](_0x5c29x2[_0x5c29x13]);(null== _0x5c29x12|| _0x5c29x12)&& this[_0xd587[2509]](_0x5c29x2[_0x5c29x13]);null!= _0x5c29x5&& this[_0xd587[852]](_0x5c29x2[_0x5c29x13],_0x5c29x5,!0);null!= _0x5c29x9&& this[_0xd587[852]](_0x5c29x2[_0x5c29x13],_0x5c29x9,!1)}};this[_0xd587[746]]( new mxEventObject(mxEvent.CELLS_ADDED,_0xd587[895],_0x5c29x2,_0xd587[1101],_0x5c29x3,_0xd587[1983],_0x5c29x4,_0xd587[1097],_0x5c29x5,_0xd587[772],_0x5c29x9,_0xd587[492],_0x5c29xa))}finally{this[_0xd587[251]][_0xd587[476]]()}}};mxGraph[_0xd587[202]][_0xd587[842]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:!0;null== _0x5c29x2&& (_0x5c29x2= this[_0xd587[2510]](this[_0xd587[897]]()));_0x5c29x3&& (_0x5c29x2= this[_0xd587[2510]](this[_0xd587[2499]](_0x5c29x2)));this[_0xd587[251]][_0xd587[473]]();try{this[_0xd587[843]](_0x5c29x2),this[_0xd587[746]]( new mxEventObject(mxEvent.REMOVE_CELLS,_0xd587[895],_0x5c29x2,_0xd587[2511],_0x5c29x3))}finally{this[_0xd587[251]][_0xd587[476]]()};return _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[843]]= function(_0x5c29x2){if(null!= _0x5c29x2&& 0< _0x5c29x2[_0xd587[67]]){var _0x5c29x3=this[_0xd587[441]][_0xd587[255]],_0x5c29x4=this[_0xd587[441]][_0xd587[513]];this[_0xd587[251]][_0xd587[473]]();try{for(var _0x5c29x5={},_0x5c29x9=0;_0x5c29x9< _0x5c29x2[_0xd587[67]];_0x5c29x9++){var _0x5c29xa=mxCellPath[_0xd587[385]](_0x5c29x2[_0x5c29x9]);_0x5c29x5[_0x5c29xa]= _0x5c29x2[_0x5c29x9]};for(_0x5c29x9= 0;_0x5c29x9< _0x5c29x2[_0xd587[67]];_0x5c29x9++){for(var _0x5c29x12=this[_0xd587[1756]](_0x5c29x2[_0x5c29x9]),_0x5c29x13=0;_0x5c29x13< _0x5c29x12[_0xd587[67]];_0x5c29x13++){if(_0x5c29xa= mxCellPath[_0xd587[385]](_0x5c29x12[_0x5c29x13]),null== _0x5c29x5[_0x5c29xa]){var _0x5c29x14=this[_0xd587[251]][_0xd587[1721]](_0x5c29x12[_0x5c29x13]);if(null!= _0x5c29x14){var _0x5c29x15=this[_0xd587[441]][_0xd587[248]](_0x5c29x12[_0x5c29x13]);if(null!= _0x5c29x15){var _0x5c29x14=_0x5c29x14[_0xd587[238]](),_0x5c29x16=_0x5c29x15[_0xd587[1710]](!0) == _0x5c29x2[_0x5c29x9],_0x5c29x17=_0x5c29x15[_0xd587[439]],_0x5c29x18=_0x5c29x16?0:_0x5c29x17[_0xd587[67]]- 1;_0x5c29x14[_0xd587[2007]]( new mxPoint(_0x5c29x17[_0x5c29x18][_0xd587[235]]/ _0x5c29x3- _0x5c29x4[_0xd587[235]],_0x5c29x17[_0x5c29x18][_0xd587[236]]/ _0x5c29x3- _0x5c29x4[_0xd587[236]]),_0x5c29x16);this[_0xd587[251]][_0xd587[1957]](_0x5c29x12[_0x5c29x13],null,_0x5c29x16);this[_0xd587[251]][_0xd587[1724]](_0x5c29x12[_0x5c29x13],_0x5c29x14)}}}};this[_0xd587[251]][_0xd587[205]](_0x5c29x2[_0x5c29x9])};this[_0xd587[746]]( new mxEventObject(mxEvent.CELLS_REMOVED,_0xd587[895],_0x5c29x2))}finally{this[_0xd587[251]][_0xd587[476]]()}}};mxGraph[_0xd587[202]][_0xd587[853]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x5= _0x5c29x5|| 0;_0x5c29x9= _0x5c29x9|| 0;null== _0x5c29x4&& (_0x5c29x4= this[_0xd587[899]]([_0x5c29x2])[0]);var _0x5c29xa=this[_0xd587[251]][_0xd587[1197]](_0x5c29x2),_0x5c29x12=this[_0xd587[251]][_0xd587[1709]](_0x5c29x2,!0);this[_0xd587[251]][_0xd587[473]]();try{this[_0xd587[835]](_0x5c29x3,_0x5c29x5,_0x5c29x9,!1,!1),this[_0xd587[833]](_0x5c29x3,_0x5c29xa,this[_0xd587[251]][_0xd587[262]](_0x5c29xa),null,null,!0),this[_0xd587[833]]([_0x5c29x4],_0x5c29xa,this[_0xd587[251]][_0xd587[262]](_0x5c29xa),_0x5c29x12,_0x5c29x3[0],!1),this[_0xd587[852]](_0x5c29x2,_0x5c29x3[0],!0),this[_0xd587[746]]( new mxEventObject(mxEvent.SPLIT_EDGE,_0xd587[1989],_0x5c29x2,_0xd587[895],_0x5c29x3,_0xd587[2512],_0x5c29x4,_0xd587[1126],_0x5c29x5,_0xd587[1125],_0x5c29x9))}finally{this[_0xd587[251]][_0xd587[476]]()};return _0x5c29x4};mxGraph[_0xd587[202]][_0xd587[838]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){null== _0x5c29x3&& (_0x5c29x3= this[_0xd587[897]]());_0x5c29x4&& (_0x5c29x3= this[_0xd587[2499]](_0x5c29x3));this[_0xd587[251]][_0xd587[473]]();try{this[_0xd587[839]](_0x5c29x3,_0x5c29x2),this[_0xd587[746]]( new mxEventObject(mxEvent.TOGGLE_CELLS,_0xd587[539],_0x5c29x2,_0xd587[895],_0x5c29x3,_0xd587[2511],_0x5c29x4))}finally{this[_0xd587[251]][_0xd587[476]]()};return _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[839]]= function(_0x5c29x2,_0x5c29x3){if(null!= _0x5c29x2&& 0< _0x5c29x2[_0xd587[67]]){this[_0xd587[251]][_0xd587[473]]();try{for(var _0x5c29x4=0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){this[_0xd587[251]][_0xd587[175]](_0x5c29x2[_0x5c29x4],_0x5c29x3)}}finally{this[_0xd587[251]][_0xd587[476]]()}}};mxGraph[_0xd587[202]][_0xd587[847]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:!1;null== _0x5c29x4&& (_0x5c29x4= this[_0xd587[2513]](this[_0xd587[897]](),_0x5c29x2));this[_0xd587[2126]](!1);this[_0xd587[251]][_0xd587[473]]();try{this[_0xd587[848]](_0x5c29x4,_0x5c29x2,_0x5c29x3,_0x5c29x5),this[_0xd587[746]]( new mxEventObject(mxEvent.FOLD_CELLS,_0xd587[2514],_0x5c29x2,_0xd587[2515],_0x5c29x3,_0xd587[895],_0x5c29x4))}finally{this[_0xd587[251]][_0xd587[476]]()};return _0x5c29x4};mxGraph[_0xd587[202]][_0xd587[848]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){if(null!= _0x5c29x2&& 0< _0x5c29x2[_0xd587[67]]){this[_0xd587[251]][_0xd587[473]]();try{for(var _0x5c29x9=0;_0x5c29x9< _0x5c29x2[_0xd587[67]];_0x5c29x9++){if((!_0x5c29x5|| this[_0xd587[2516]](_0x5c29x2[_0x5c29x9],_0x5c29x3)) && _0x5c29x3!= this[_0xd587[1742]](_0x5c29x2[_0x5c29x9])){if(this[_0xd587[251]][_0xd587[1972]](_0x5c29x2[_0x5c29x9],_0x5c29x3),this[_0xd587[2517]](_0x5c29x2[_0x5c29x9],_0x5c29x3),this[_0xd587[2507]](_0x5c29x2[_0x5c29x9])&& this[_0xd587[2508]](_0x5c29x2[_0x5c29x9]),_0x5c29x4){var _0x5c29xa=this[_0xd587[251]][_0xd587[1953]](_0x5c29x2[_0x5c29x9]);this[_0xd587[847]](_0x5c29xa,_0x5c29x3,_0x5c29x4)}}};this[_0xd587[746]]( new mxEventObject(mxEvent.CELLS_FOLDED,_0xd587[895],_0x5c29x2,_0xd587[2514],_0x5c29x3,_0xd587[2515],_0x5c29x4))}finally{this[_0xd587[251]][_0xd587[476]]()}}};mxGraph[_0xd587[202]][_0xd587[2517]]= function(_0x5c29x2,_0x5c29x3){if(null!= _0x5c29x2){var _0x5c29x4=this[_0xd587[251]][_0xd587[1721]](_0x5c29x2);null!= _0x5c29x4&& (_0x5c29x4= _0x5c29x4[_0xd587[238]](),this[_0xd587[2518]](_0x5c29x2,_0x5c29x4,_0x5c29x3),_0x5c29x4[_0xd587[2005]](),this[_0xd587[251]][_0xd587[1724]](_0x5c29x2,_0x5c29x4))}};mxGraph[_0xd587[202]][_0xd587[2518]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){if(null!= _0x5c29x2&& null!= _0x5c29x3){_0x5c29x4= this[_0xd587[441]][_0xd587[248]](_0x5c29x2);_0x5c29x4= null!= _0x5c29x4?_0x5c29x4[_0xd587[124]]:this[_0xd587[1705]](_0x5c29x2);if(null== _0x5c29x3[_0xd587[2002]]){var _0x5c29x5=_0x5c29x3;this[_0xd587[2394]]&& (_0x5c29x2= this[_0xd587[2519]](_0x5c29x2),null!= _0x5c29x2&& (_0x5c29x5= _0x5c29x2,_0x5c29x2= mxUtils[_0xd587[433]](_0x5c29x4,mxConstants.STYLE_STARTSIZE),0< _0x5c29x2&& (_0x5c29x5[_0xd587[119]]= Math[_0xd587[160]](_0x5c29x5[_0xd587[119]],_0x5c29x2))));_0x5c29x3[_0xd587[2002]]=  new mxRectangle(0,0,_0x5c29x5[_0xd587[117]],_0x5c29x5[_0xd587[119]])};if(null!= _0x5c29x3[_0xd587[2002]]){_0x5c29x3[_0xd587[2002]][_0xd587[235]]= _0x5c29x3[_0xd587[235]];_0x5c29x3[_0xd587[2002]][_0xd587[236]]= _0x5c29x3[_0xd587[236]];var _0x5c29x9=mxUtils[_0xd587[431]](_0x5c29x4[mxConstants[_0xd587[2278]]]|| _0xd587[468]);0!= _0x5c29x9&& (_0x5c29x2= _0x5c29x3[_0xd587[2002]][_0xd587[241]]()- _0x5c29x3[_0xd587[241]](),_0x5c29x4= _0x5c29x3[_0xd587[2002]][_0xd587[242]]()- _0x5c29x3[_0xd587[242]](),_0x5c29x5= Math[_0xd587[426]](_0x5c29x9),_0x5c29x9= Math[_0xd587[427]](_0x5c29x9),_0x5c29x3[_0xd587[2002]][_0xd587[235]]+= _0x5c29x5* _0x5c29x2- _0x5c29x9* _0x5c29x4- _0x5c29x2,_0x5c29x3[_0xd587[2002]][_0xd587[236]]+= _0x5c29x9* _0x5c29x2+ _0x5c29x5* _0x5c29x4- _0x5c29x4)}}};mxGraph[_0xd587[202]][_0xd587[2499]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[1853]]();return _0x5c29x3= _0x5c29x3[_0xd587[1919]](this[_0xd587[2520]](_0x5c29x2))};mxGraph[_0xd587[202]][_0xd587[2520]]= function(_0x5c29x2){var _0x5c29x3=[];if(null!= _0x5c29x2){for(var _0x5c29x4=0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){for(var _0x5c29x5=this[_0xd587[251]][_0xd587[1707]](_0x5c29x2[_0x5c29x4]),_0x5c29x9=0;_0x5c29x9< _0x5c29x5;_0x5c29x9++){_0x5c29x3[_0xd587[207]](this[_0xd587[251]][_0xd587[1708]](_0x5c29x2[_0x5c29x4],_0x5c29x9))};_0x5c29x5= this[_0xd587[251]][_0xd587[1953]](_0x5c29x2[_0x5c29x4]);_0x5c29x3= _0x5c29x3[_0xd587[1919]](this[_0xd587[2520]](_0x5c29x5))}};return _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[858]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:!1;this[_0xd587[251]][_0xd587[473]]();try{this[_0xd587[2457]](_0x5c29x2,_0x5c29x3),this[_0xd587[746]]( new mxEventObject(mxEvent.UPDATE_CELL_SIZE,_0xd587[246],_0x5c29x2,_0xd587[2521],_0x5c29x3))}finally{this[_0xd587[251]][_0xd587[476]]()};return _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2457]]= function(_0x5c29x2,_0x5c29x3){if(null!= _0x5c29x2){this[_0xd587[251]][_0xd587[473]]();try{var _0x5c29x4=this[_0xd587[2519]](_0x5c29x2),_0x5c29x5=this[_0xd587[251]][_0xd587[1721]](_0x5c29x2);if(null!= _0x5c29x4&& null!= _0x5c29x5){var _0x5c29x9=this[_0xd587[1742]](_0x5c29x2),_0x5c29x5=_0x5c29x5[_0xd587[238]]();if(this[_0xd587[1730]](_0x5c29x2)){var _0x5c29xa=this[_0xd587[441]][_0xd587[248]](_0x5c29x2),_0x5c29x12=null!= _0x5c29xa?_0x5c29xa[_0xd587[124]]:this[_0xd587[1705]](_0x5c29x2),_0x5c29x13=this[_0xd587[251]][_0xd587[474]](_0x5c29x2);null== _0x5c29x13&& (_0x5c29x13= _0xd587[110]);mxUtils[_0xd587[433]](_0x5c29x12,mxConstants.STYLE_HORIZONTAL,!0)?(_0x5c29x13= mxUtils[_0xd587[475]](_0x5c29x13,mxConstants.STYLE_STARTSIZE,_0x5c29x4[_0xd587[119]]+ 8),_0x5c29x9&& (_0x5c29x5[_0xd587[119]]= _0x5c29x4[_0xd587[119]]+ 8),_0x5c29x5[_0xd587[117]]= _0x5c29x4[_0xd587[117]]):(_0x5c29x13= mxUtils[_0xd587[475]](_0x5c29x13,mxConstants.STYLE_STARTSIZE,_0x5c29x4[_0xd587[117]]+ 8),_0x5c29x9&& (_0x5c29x5[_0xd587[117]]= _0x5c29x4[_0xd587[117]]+ 8),_0x5c29x5[_0xd587[119]]= _0x5c29x4[_0xd587[119]]);this[_0xd587[251]][_0xd587[475]](_0x5c29x2,_0x5c29x13)}else {_0x5c29x5[_0xd587[117]]= _0x5c29x4[_0xd587[117]],_0x5c29x5[_0xd587[119]]= _0x5c29x4[_0xd587[119]]};if(!_0x5c29x3&&  !_0x5c29x9){var _0x5c29x14=this[_0xd587[441]][_0xd587[1799]](this[_0xd587[251]][_0xd587[1953]](_0x5c29x2));if(null!= _0x5c29x14){var _0x5c29x15=this[_0xd587[441]][_0xd587[513]],_0x5c29x16=this[_0xd587[441]][_0xd587[255]],_0x5c29x17=(_0x5c29x14[_0xd587[236]]+ _0x5c29x14[_0xd587[119]])/ _0x5c29x16- _0x5c29x5[_0xd587[236]]- _0x5c29x15[_0xd587[236]];_0x5c29x5[_0xd587[117]]= Math[_0xd587[160]](_0x5c29x5[_0xd587[117]],(_0x5c29x14[_0xd587[235]]+ _0x5c29x14[_0xd587[117]])/ _0x5c29x16- _0x5c29x5[_0xd587[235]]- _0x5c29x15[_0xd587[235]]);_0x5c29x5[_0xd587[119]]= Math[_0xd587[160]](_0x5c29x5[_0xd587[119]],_0x5c29x17)}};this[_0xd587[837]]([_0x5c29x2],[_0x5c29x5])}}finally{this[_0xd587[251]][_0xd587[476]]()}}};mxGraph[_0xd587[202]][_0xd587[2519]]= function(_0x5c29x2){var _0x5c29x3=null;if(null!= _0x5c29x2){var _0x5c29x4=this[_0xd587[441]][_0xd587[248]](_0x5c29x2),_0x5c29x5=null!= _0x5c29x4?_0x5c29x4[_0xd587[124]]:this[_0xd587[1705]](_0x5c29x2);if(null!= _0x5c29x5&& !this[_0xd587[251]][_0xd587[250]](_0x5c29x2)){var _0x5c29x9=_0x5c29x5[mxConstants[_0xd587[2185]]]|| mxConstants[_0xd587[483]],_0x5c29xa=0,_0x5c29x3=0;if((null!= this[_0xd587[1202]](_0x5c29x4)|| null!= _0x5c29x5[mxConstants[_0xd587[2484]]])&& _0x5c29x5[mxConstants[_0xd587[2059]]]== mxConstants[_0xd587[2522]]){_0x5c29x5[mxConstants[_0xd587[2063]]]== mxConstants[_0xd587[481]]&& (_0x5c29xa+= parseFloat(_0x5c29x5[mxConstants[_0xd587[2523]]])|| mxLabel[_0xd587[202]][_0xd587[1680]]),_0x5c29x5[mxConstants[_0xd587[2064]]]!= mxConstants[_0xd587[479]]&& (_0x5c29x3+= parseFloat(_0x5c29x5[mxConstants[_0xd587[2524]]])|| mxLabel[_0xd587[202]][_0xd587[1680]])};_0x5c29xa+= 2* (_0x5c29x5[mxConstants[_0xd587[2143]]]|| 0);_0x5c29xa+= _0x5c29x5[mxConstants[_0xd587[2147]]]|| 0;_0x5c29xa+= _0x5c29x5[mxConstants[_0xd587[2145]]]|| 0;_0x5c29x3+= 2* (_0x5c29x5[mxConstants[_0xd587[2143]]]|| 0);_0x5c29x3+= _0x5c29x5[mxConstants[_0xd587[2144]]]|| 0;_0x5c29x3+= _0x5c29x5[mxConstants[_0xd587[2146]]]|| 0;_0x5c29x4= this[_0xd587[2205]](_0x5c29x4);null!= _0x5c29x4&& (_0x5c29xa+= _0x5c29x4[_0xd587[117]]+ 8);_0x5c29x4= this[_0xd587[2183]](_0x5c29x2);null!= _0x5c29x4&& 0< _0x5c29x4[_0xd587[67]]?(this[_0xd587[2186]](_0x5c29x2)|| (_0x5c29x4= _0x5c29x4[_0xd587[230]](/\n/g,_0xd587[545])),_0x5c29x9= mxUtils[_0xd587[2525]](_0x5c29x4,_0x5c29x9,_0x5c29x5[mxConstants[_0xd587[2188]]]),_0x5c29x2= _0x5c29x9[_0xd587[117]]+ _0x5c29xa,_0x5c29x3= _0x5c29x9[_0xd587[119]]+ _0x5c29x3,mxUtils[_0xd587[433]](_0x5c29x5,mxConstants.STYLE_HORIZONTAL,!0)|| (_0x5c29x5= _0x5c29x3,_0x5c29x3= _0x5c29x2,_0x5c29x2= _0x5c29x5),this[_0xd587[991]]&& (_0x5c29x2= this[_0xd587[1021]](_0x5c29x2+ this[_0xd587[1020]]/ 2),_0x5c29x3= this[_0xd587[1021]](_0x5c29x3+ this[_0xd587[1020]]/ 2)),_0x5c29x3=  new mxRectangle(0,0,_0x5c29x2,_0x5c29x3)):(_0x5c29x5= 4* this[_0xd587[1020]],_0x5c29x3=  new mxRectangle(0,0,_0x5c29x5,_0x5c29x5))}};return _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[2216]]= function(_0x5c29x2,_0x5c29x3){if(0.2< Math[_0xd587[425]](1- _0x5c29x3[_0xd587[255]])){var _0x5c29x4=this[_0xd587[441]][_0xd587[255]],_0x5c29x5=this[_0xd587[441]][_0xd587[513]],_0x5c29x9=_0x5c29x2[_0xd587[117]]* _0x5c29x3[_0xd587[255]],_0x5c29xa=_0x5c29x2[_0xd587[119]]* _0x5c29x3[_0xd587[255]],_0x5c29x12=_0x5c29x2[_0xd587[236]]- (_0x5c29xa- _0x5c29x2[_0xd587[119]])/ 2,_0x5c29x4= new mxRectangle(this[_0xd587[1021]]((_0x5c29x2[_0xd587[235]]- (_0x5c29x9- _0x5c29x2[_0xd587[117]])/ 2)/ _0x5c29x4)- _0x5c29x5[_0xd587[235]],this[_0xd587[1021]](_0x5c29x12/ _0x5c29x4)- _0x5c29x5[_0xd587[236]],this[_0xd587[1021]](_0x5c29x9/ _0x5c29x4),this[_0xd587[1021]](_0x5c29xa/ _0x5c29x4));this[_0xd587[2526]](_0x5c29x2[_0xd587[246]],_0x5c29x4)}};mxGraph[_0xd587[202]][_0xd587[2526]]= function(_0x5c29x2,_0x5c29x3){return this[_0xd587[836]]([_0x5c29x2],[_0x5c29x3])[0]};mxGraph[_0xd587[202]][_0xd587[836]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[251]][_0xd587[473]]();try{this[_0xd587[837]](_0x5c29x2,_0x5c29x3),this[_0xd587[746]]( new mxEventObject(mxEvent.RESIZE_CELLS,_0xd587[895],_0x5c29x2,_0xd587[1562],_0x5c29x3))}finally{this[_0xd587[251]][_0xd587[476]]()};return _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[837]]= function(_0x5c29x2,_0x5c29x3){if(null!= _0x5c29x2&& null!= _0x5c29x3&& _0x5c29x2[_0xd587[67]]== _0x5c29x3[_0xd587[67]]){this[_0xd587[251]][_0xd587[473]]();try{for(var _0x5c29x4=0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){var _0x5c29x5=_0x5c29x3[_0x5c29x4],_0x5c29x9=this[_0xd587[251]][_0xd587[1721]](_0x5c29x2[_0x5c29x4]);if(null!= _0x5c29x9&& (_0x5c29x9[_0xd587[235]]!= _0x5c29x5[_0xd587[235]]|| _0x5c29x9[_0xd587[236]]!= _0x5c29x5[_0xd587[236]]|| _0x5c29x9[_0xd587[117]]!= _0x5c29x5[_0xd587[117]]|| _0x5c29x9[_0xd587[119]]!= _0x5c29x5[_0xd587[119]])){_0x5c29x9= _0x5c29x9[_0xd587[238]]();if(_0x5c29x9[_0xd587[1500]]){var _0x5c29xa=_0x5c29x9[_0xd587[1368]];null!= _0x5c29xa&& (_0x5c29xa[_0xd587[235]]+= _0x5c29x5[_0xd587[235]]- _0x5c29x9[_0xd587[235]],_0x5c29xa[_0xd587[236]]+= _0x5c29x5[_0xd587[236]]- _0x5c29x9[_0xd587[236]])}else {_0x5c29x9[_0xd587[235]]= _0x5c29x5[_0xd587[235]],_0x5c29x9[_0xd587[236]]= _0x5c29x5[_0xd587[236]]};_0x5c29x9[_0xd587[117]]= _0x5c29x5[_0xd587[117]];_0x5c29x9[_0xd587[119]]= _0x5c29x5[_0xd587[119]];!_0x5c29x9[_0xd587[1500]]&& (this[_0xd587[251]][_0xd587[1193]](_0x5c29x2[_0x5c29x4])&& !this[_0xd587[2505]]())&& (_0x5c29x9[_0xd587[235]]= Math[_0xd587[160]](0,_0x5c29x9[_0xd587[235]]),_0x5c29x9[_0xd587[236]]= Math[_0xd587[160]](0,_0x5c29x9[_0xd587[236]]));this[_0xd587[251]][_0xd587[1724]](_0x5c29x2[_0x5c29x4],_0x5c29x9);this[_0xd587[2507]](_0x5c29x2[_0x5c29x4])&& this[_0xd587[2508]](_0x5c29x2[_0x5c29x4])}};this[_0xd587[2399]]&& this[_0xd587[1750]](_0x5c29x2);this[_0xd587[746]]( new mxEventObject(mxEvent.CELLS_RESIZED,_0xd587[895],_0x5c29x2,_0xd587[1562],_0x5c29x3))}finally{this[_0xd587[251]][_0xd587[476]]()}}};mxGraph[_0xd587[202]][_0xd587[2508]]= function(_0x5c29x2){if(null!= _0x5c29x2){var _0x5c29x3=this[_0xd587[251]][_0xd587[1197]](_0x5c29x2),_0x5c29x4=this[_0xd587[251]][_0xd587[1721]](_0x5c29x3);if(null!= _0x5c29x3&& (null!= _0x5c29x4&& !this[_0xd587[1742]](_0x5c29x3))&& (_0x5c29x2= this[_0xd587[251]][_0xd587[1721]](_0x5c29x2),null!= _0x5c29x2&& (_0x5c29x4[_0xd587[117]]< _0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]]|| _0x5c29x4[_0xd587[119]]< _0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]]))){_0x5c29x4= _0x5c29x4[_0xd587[238]](),_0x5c29x4[_0xd587[117]]= Math[_0xd587[160]](_0x5c29x4[_0xd587[117]],_0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]]),_0x5c29x4[_0xd587[119]]= Math[_0xd587[160]](_0x5c29x4[_0xd587[119]],_0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]]),this[_0xd587[837]]([_0x5c29x3],[_0x5c29x4])}}};mxGraph[_0xd587[202]][_0xd587[903]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){return this[_0xd587[834]](_0x5c29x2,_0x5c29x3,_0x5c29x4,!0,_0x5c29x5,_0x5c29x9)};mxGraph[_0xd587[202]][_0xd587[834]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:0;_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:0;_0x5c29x5= null!= _0x5c29x5?_0x5c29x5:!1;if(null!= _0x5c29x2&& (0!= _0x5c29x3|| 0!= _0x5c29x4|| _0x5c29x5|| null!= _0x5c29x9)){this[_0xd587[251]][_0xd587[473]]();try{_0x5c29x5&& (_0x5c29x2= this[_0xd587[899]](_0x5c29x2,this[_0xd587[2527]]()),null== _0x5c29x9&& (_0x5c29x9= this[_0xd587[902]]()));var _0x5c29x12=this[_0xd587[2505]]();null!= _0x5c29x9&& this[_0xd587[2528]](!0);this[_0xd587[835]](_0x5c29x2,_0x5c29x3,_0x5c29x4,!_0x5c29x5&& this[_0xd587[2529]]()&& this[_0xd587[2530]](),null== _0x5c29x9);this[_0xd587[2528]](_0x5c29x12);if(null!= _0x5c29x9){var _0x5c29x13=this[_0xd587[251]][_0xd587[262]](_0x5c29x9);this[_0xd587[833]](_0x5c29x2,_0x5c29x9,_0x5c29x13,null,null,!0)};this[_0xd587[746]]( new mxEventObject(mxEvent.MOVE_CELLS,_0xd587[895],_0x5c29x2,_0xd587[1126],_0x5c29x3,_0xd587[1125],_0x5c29x4,_0xd587[238],_0x5c29x5,_0xd587[772],_0x5c29x9,_0xd587[763],_0x5c29xa))}finally{this[_0xd587[251]][_0xd587[476]]()}};return _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[835]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){if(null!= _0x5c29x2&& (0!= _0x5c29x3|| 0!= _0x5c29x4)){this[_0xd587[251]][_0xd587[473]]();try{_0x5c29x5&& this[_0xd587[2531]](_0x5c29x2);for(var _0x5c29xa=0;_0x5c29xa< _0x5c29x2[_0xd587[67]];_0x5c29xa++){this[_0xd587[2532]](_0x5c29x2[_0x5c29xa],_0x5c29x3,_0x5c29x4),_0x5c29x9&& this[_0xd587[2509]](_0x5c29x2[_0x5c29xa])};this[_0xd587[2400]]&& this[_0xd587[1750]](_0x5c29x2);this[_0xd587[746]]( new mxEventObject(mxEvent.CELLS_MOVED,_0xd587[895],_0x5c29x2,_0xd587[1126],_0x5c29x4,_0xd587[1125],_0x5c29x4,_0xd587[808],_0x5c29x5))}finally{this[_0xd587[251]][_0xd587[476]]()}}};mxGraph[_0xd587[202]][_0xd587[2532]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[251]][_0xd587[1721]](_0x5c29x2);null!= _0x5c29x5&& (_0x5c29x5= _0x5c29x5[_0xd587[238]](),_0x5c29x5[_0xd587[513]](_0x5c29x3,_0x5c29x4),!_0x5c29x5[_0xd587[1500]]&& (this[_0xd587[251]][_0xd587[1193]](_0x5c29x2)&& !this[_0xd587[2505]]())&& (_0x5c29x5[_0xd587[235]]= Math[_0xd587[160]](0,_0x5c29x5[_0xd587[235]]),_0x5c29x5[_0xd587[236]]= Math[_0xd587[160]](0,_0x5c29x5[_0xd587[236]])),_0x5c29x5[_0xd587[1500]]&& !this[_0xd587[251]][_0xd587[250]](_0x5c29x2)&& (null== _0x5c29x5[_0xd587[1368]]?_0x5c29x5[_0xd587[1368]]=  new mxPoint(_0x5c29x3,_0x5c29x4):(_0x5c29x5[_0xd587[1368]][_0xd587[235]]+= _0x5c29x3,_0x5c29x5[_0xd587[1368]][_0xd587[236]]+= _0x5c29x4)),this[_0xd587[251]][_0xd587[1724]](_0x5c29x2,_0x5c29x5))};mxGraph[_0xd587[202]][_0xd587[2533]]= function(_0x5c29x2){if(null!= _0x5c29x2&& !this[_0xd587[251]][_0xd587[250]](_0x5c29x2)){var _0x5c29x3=this[_0xd587[251]][_0xd587[1197]](_0x5c29x2);if(_0x5c29x3== this[_0xd587[902]]()|| _0x5c29x3== this[_0xd587[2534]]()){return this[_0xd587[2535]]()};if(null!= _0x5c29x3&& _0x5c29x3!= this[_0xd587[902]]()){var _0x5c29x4=this[_0xd587[251]][_0xd587[1721]](_0x5c29x3);if(null!= _0x5c29x4){var _0x5c29x5=_0x5c29x2= 0,_0x5c29x9=_0x5c29x4[_0xd587[117]],_0x5c29x4=_0x5c29x4[_0xd587[119]];this[_0xd587[1730]](_0x5c29x3)&& (_0x5c29x3= this[_0xd587[1731]](_0x5c29x3),_0x5c29x2= _0x5c29x3[_0xd587[117]],_0x5c29x9-= _0x5c29x3[_0xd587[117]],_0x5c29x5= _0x5c29x3[_0xd587[119]],_0x5c29x4-= _0x5c29x3[_0xd587[119]]);return  new mxRectangle(_0x5c29x2,_0x5c29x5,_0x5c29x9,_0x5c29x4)}}};return null};mxGraph[_0xd587[202]][_0xd587[2535]]= function(){return this[_0xd587[2385]]};mxGraph[_0xd587[202]][_0xd587[2509]]= function(_0x5c29x2){if(null!= _0x5c29x2){var _0x5c29x3=this[_0xd587[251]][_0xd587[1721]](_0x5c29x2),_0x5c29x4=this[_0xd587[2536]](_0x5c29x2)?this[_0xd587[2533]](_0x5c29x2):this[_0xd587[2535]]();if(null!= _0x5c29x3&& null!= _0x5c29x4&& !_0x5c29x3[_0xd587[1500]]&& (_0x5c29x3[_0xd587[235]]< _0x5c29x4[_0xd587[235]]|| _0x5c29x3[_0xd587[236]]< _0x5c29x4[_0xd587[236]]|| _0x5c29x4[_0xd587[117]]< _0x5c29x3[_0xd587[235]]+ _0x5c29x3[_0xd587[117]]|| _0x5c29x4[_0xd587[119]]< _0x5c29x3[_0xd587[236]]+ _0x5c29x3[_0xd587[119]])){_0x5c29x2= this[_0xd587[2537]](_0x5c29x2),0< _0x5c29x4[_0xd587[117]]&& (_0x5c29x3[_0xd587[235]]= Math[_0xd587[243]](_0x5c29x3[_0xd587[235]],_0x5c29x4[_0xd587[235]]+ _0x5c29x4[_0xd587[117]]- (1- _0x5c29x2)* _0x5c29x3[_0xd587[117]])),0< _0x5c29x4[_0xd587[119]]&& (_0x5c29x3[_0xd587[236]]= Math[_0xd587[243]](_0x5c29x3[_0xd587[236]],_0x5c29x4[_0xd587[236]]+ _0x5c29x4[_0xd587[119]]- (1- _0x5c29x2)* _0x5c29x3[_0xd587[119]])),_0x5c29x3[_0xd587[235]]= Math[_0xd587[160]](_0x5c29x3[_0xd587[235]],_0x5c29x4[_0xd587[235]]- _0x5c29x3[_0xd587[117]]* _0x5c29x2),_0x5c29x3[_0xd587[236]]= Math[_0xd587[160]](_0x5c29x3[_0xd587[236]],_0x5c29x4[_0xd587[236]]- _0x5c29x3[_0xd587[119]]* _0x5c29x2)}}};mxGraph[_0xd587[202]][_0xd587[1750]]= function(_0x5c29x2){if(null!= _0x5c29x2){for(var _0x5c29x3={},_0x5c29x4=0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){var _0x5c29x5=mxCellPath[_0xd587[385]](_0x5c29x2[_0x5c29x4]);_0x5c29x3[_0x5c29x5]= _0x5c29x2[_0x5c29x4]};this[_0xd587[251]][_0xd587[473]]();try{for(_0x5c29x4= 0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){var _0x5c29x9=this[_0xd587[251]][_0xd587[264]](_0x5c29x2[_0x5c29x4]);if(null!= _0x5c29x9){for(_0x5c29x5= 0;_0x5c29x5< _0x5c29x9[_0xd587[67]];_0x5c29x5++){var _0x5c29xa=this[_0xd587[441]][_0xd587[248]](_0x5c29x9[_0x5c29x5]),_0x5c29x12=null!= _0x5c29xa?_0x5c29xa[_0xd587[1710]](!0):this[_0xd587[441]][_0xd587[1710]](_0x5c29x9[_0x5c29x5],!0),_0x5c29x13=null!= _0x5c29xa?_0x5c29xa[_0xd587[1710]](!1):this[_0xd587[441]][_0xd587[1710]](_0x5c29x9[_0x5c29x5],!1),_0x5c29x14=mxCellPath[_0xd587[385]](_0x5c29x12),_0x5c29x15=mxCellPath[_0xd587[385]](_0x5c29x13);(null== _0x5c29x3[_0x5c29x14]|| null== _0x5c29x3[_0x5c29x15])&& this[_0xd587[1809]](_0x5c29x9[_0x5c29x5])}};this[_0xd587[1750]](this[_0xd587[251]][_0xd587[1953]](_0x5c29x2[_0x5c29x4]))}}finally{this[_0xd587[251]][_0xd587[476]]()}}};mxGraph[_0xd587[202]][_0xd587[1809]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[251]][_0xd587[1721]](_0x5c29x2);null!= _0x5c29x3&& (null!= _0x5c29x3[_0xd587[1525]]&& 0< _0x5c29x3[_0xd587[1525]][_0xd587[67]])&& (_0x5c29x3= _0x5c29x3[_0xd587[238]](),_0x5c29x3[_0xd587[1525]]= [],this[_0xd587[251]][_0xd587[1724]](_0x5c29x2,_0x5c29x3));return _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2538]]= function(_0x5c29x2,_0x5c29x3){return null!= _0x5c29x2&& null!= _0x5c29x2[_0xd587[253]]&& null!= _0x5c29x2[_0xd587[253]][_0xd587[1561]]?_0x5c29x2[_0xd587[253]][_0xd587[1561]][_0xd587[1531]]:null};mxGraph[_0xd587[202]][_0xd587[2288]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x3= null;var _0x5c29x5=_0x5c29x2[_0xd587[124]][_0x5c29x4?mxConstants[_0xd587[2539]]:mxConstants[_0xd587[2540]]];if(null!= _0x5c29x5){var _0x5c29x9=_0x5c29x2[_0xd587[124]][_0x5c29x4?mxConstants[_0xd587[2541]]:mxConstants[_0xd587[2542]]];null!= _0x5c29x9&& (_0x5c29x3=  new mxPoint(parseFloat(_0x5c29x5),parseFloat(_0x5c29x9)))};_0x5c29x5=  !1;null!= _0x5c29x3&& (_0x5c29x5= mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],_0x5c29x4?mxConstants[_0xd587[2543]]:mxConstants[_0xd587[2544]],!0));return  new mxConnectionConstraint(_0x5c29x3,_0x5c29x5)};mxGraph[_0xd587[202]][_0xd587[2545]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){if(null!= _0x5c29x5){this[_0xd587[251]][_0xd587[473]]();try{null== _0x5c29x5|| null== _0x5c29x5[_0xd587[2546]]?(this[_0xd587[1717]](_0x5c29x4?mxConstants[_0xd587[2539]]:mxConstants[_0xd587[2540]],null,[_0x5c29x2]),this[_0xd587[1717]](_0x5c29x4?mxConstants[_0xd587[2541]]:mxConstants[_0xd587[2542]],null,[_0x5c29x2]),this[_0xd587[1717]](_0x5c29x4?mxConstants[_0xd587[2543]]:mxConstants[_0xd587[2544]],null,[_0x5c29x2])):null!= _0x5c29x5[_0xd587[2546]]&& (this[_0xd587[1717]](_0x5c29x4?mxConstants[_0xd587[2539]]:mxConstants[_0xd587[2540]],_0x5c29x5[_0xd587[2546]][_0xd587[235]],[_0x5c29x2]),this[_0xd587[1717]](_0x5c29x4?mxConstants[_0xd587[2541]]:mxConstants[_0xd587[2542]],_0x5c29x5[_0xd587[2546]][_0xd587[236]],[_0x5c29x2]),_0x5c29x5[_0xd587[591]]?this[_0xd587[1717]](_0x5c29x4?mxConstants[_0xd587[2543]]:mxConstants[_0xd587[2544]],null,[_0x5c29x2]):this[_0xd587[1717]](_0x5c29x4?mxConstants[_0xd587[2543]]:mxConstants[_0xd587[2544]],_0xd587[468],[_0x5c29x2]))}finally{this[_0xd587[251]][_0xd587[476]]()}}};mxGraph[_0xd587[202]][_0xd587[2290]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=null;if(null!= _0x5c29x2){var _0x5c29x5=this[_0xd587[441]][_0xd587[2087]](_0x5c29x2),_0x5c29x9= new mxPoint(_0x5c29x5[_0xd587[241]](),_0x5c29x5[_0xd587[242]]()),_0x5c29xa=_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2011]]],_0x5c29x12=0;if(null!= _0x5c29xa&& (_0xd587[700]== _0x5c29xa?_0x5c29x12+= 270:_0xd587[703]== _0x5c29xa?_0x5c29x12+= 180:_0xd587[701]== _0x5c29xa&& (_0x5c29x12+= 90),_0xd587[700]== _0x5c29xa|| _0xd587[701]== _0x5c29xa)){_0x5c29x5[_0xd587[235]]+= _0x5c29x5[_0xd587[117]]/ 2- _0x5c29x5[_0xd587[119]]/ 2;_0x5c29x5[_0xd587[236]]+= _0x5c29x5[_0xd587[119]]/ 2- _0x5c29x5[_0xd587[117]]/ 2;var _0x5c29x13=_0x5c29x5[_0xd587[117]];_0x5c29x5[_0xd587[117]]= _0x5c29x5[_0xd587[119]];_0x5c29x5[_0xd587[119]]= _0x5c29x13};if(null!= _0x5c29x3[_0xd587[2546]]){var _0x5c29x14=_0x5c29x4= 1,_0x5c29x15=0,_0x5c29x16=0;if(this[_0xd587[502]]()[_0xd587[1193]](_0x5c29x2[_0xd587[246]])){var _0x5c29x17=_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2547]]],_0x5c29x18=_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2548]]];null!= _0x5c29x2[_0xd587[253]][_0xd587[1561]]&& (_0x5c29x17= 1== mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],_0xd587[1607],0)|| _0x5c29x17,_0x5c29x18= 1== mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],_0xd587[1608],0)|| _0x5c29x18);if(_0xd587[700]== _0x5c29xa|| _0xd587[701]== _0x5c29xa){_0x5c29x13= _0x5c29x17,_0x5c29x17= _0x5c29x18,_0x5c29x18= _0x5c29x13};_0x5c29x17&& (_0x5c29x4=  -1,_0x5c29x15= -_0x5c29x5[_0xd587[117]]);_0x5c29x18&& (_0x5c29x14=  -1,_0x5c29x16= -_0x5c29x5[_0xd587[119]])};_0x5c29x4=  new mxPoint(_0x5c29x5[_0xd587[235]]+ _0x5c29x3[_0xd587[2546]][_0xd587[235]]* _0x5c29x5[_0xd587[117]]* _0x5c29x4- _0x5c29x15,_0x5c29x5[_0xd587[236]]+ _0x5c29x3[_0xd587[2546]][_0xd587[236]]* _0x5c29x5[_0xd587[119]]* _0x5c29x14- _0x5c29x16)};_0x5c29xa= _0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2278]]]|| 0;_0x5c29x3[_0xd587[591]]?(0!= _0x5c29x12&& null!= _0x5c29x4&& (_0x5c29x13= _0x5c29x5= 0,90== _0x5c29x12?_0x5c29x13= 1:180== _0x5c29x12?_0x5c29x5=  -1:270== _0x5c29xa&& (_0x5c29x13=  -1),_0x5c29x4= mxUtils[_0xd587[432]](_0x5c29x4,_0x5c29x5,_0x5c29x13,_0x5c29x9)),null!= _0x5c29x4&& _0x5c29x3[_0xd587[591]]&& (_0x5c29x4= this[_0xd587[441]][_0xd587[2302]](_0x5c29x2,_0x5c29x4,!1))):_0x5c29xa+= _0x5c29x12;0!= _0x5c29xa&& null!= _0x5c29x4&& (_0x5c29x12= mxUtils[_0xd587[431]](_0x5c29xa),_0x5c29x5= Math[_0xd587[426]](_0x5c29x12),_0x5c29x13= Math[_0xd587[427]](_0x5c29x12),_0x5c29x4= mxUtils[_0xd587[432]](_0x5c29x4,_0x5c29x5,_0x5c29x13,_0x5c29x9))};return _0x5c29x4};mxGraph[_0xd587[202]][_0xd587[851]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){this[_0xd587[251]][_0xd587[473]]();try{var _0x5c29x9=this[_0xd587[251]][_0xd587[1709]](_0x5c29x2,_0x5c29x4);this[_0xd587[852]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5);this[_0xd587[746]]( new mxEventObject(mxEvent.CONNECT_CELL,_0xd587[1989],_0x5c29x2,_0xd587[1984],_0x5c29x3,_0xd587[1097],_0x5c29x4,_0xd587[257],_0x5c29x9))}finally{this[_0xd587[251]][_0xd587[476]]()};return _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[852]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){if(null!= _0x5c29x2){this[_0xd587[251]][_0xd587[473]]();try{var _0x5c29x9=this[_0xd587[251]][_0xd587[1709]](_0x5c29x2,_0x5c29x4);this[_0xd587[2545]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5);this[_0xd587[2549]]()&& (_0x5c29x5= null,this[_0xd587[1908]](_0x5c29x3)&& (_0x5c29x5= _0x5c29x3[_0xd587[1103]](),_0x5c29x3= this[_0xd587[2550]](_0x5c29x3,_0x5c29x4)),this[_0xd587[1717]](_0x5c29x4?mxConstants[_0xd587[2303]]:mxConstants[_0xd587[2304]],_0x5c29x5,[_0x5c29x2]));this[_0xd587[251]][_0xd587[1957]](_0x5c29x2,_0x5c29x3,_0x5c29x4);this[_0xd587[2401]]&& this[_0xd587[1809]](_0x5c29x2);this[_0xd587[746]]( new mxEventObject(mxEvent.CELL_CONNECTED,_0xd587[1989],_0x5c29x2,_0xd587[1984],_0x5c29x3,_0xd587[1097],_0x5c29x4,_0xd587[257],_0x5c29x9))}finally{this[_0xd587[251]][_0xd587[476]]()}}};mxGraph[_0xd587[202]][_0xd587[2531]]= function(_0x5c29x2){if(null!= _0x5c29x2){this[_0xd587[251]][_0xd587[473]]();try{for(var _0x5c29x3=this[_0xd587[441]][_0xd587[255]],_0x5c29x4=this[_0xd587[441]][_0xd587[513]],_0x5c29x5={},_0x5c29x9=0;_0x5c29x9< _0x5c29x2[_0xd587[67]];_0x5c29x9++){var _0x5c29xa=mxCellPath[_0xd587[385]](_0x5c29x2[_0x5c29x9]);_0x5c29x5[_0x5c29xa]= _0x5c29x2[_0x5c29x9]};for(_0x5c29x9= 0;_0x5c29x9< _0x5c29x2[_0xd587[67]];_0x5c29x9++){if(this[_0xd587[251]][_0xd587[250]](_0x5c29x2[_0x5c29x9])){var _0x5c29x12=this[_0xd587[251]][_0xd587[1721]](_0x5c29x2[_0x5c29x9]);if(null!= _0x5c29x12){var _0x5c29x13=this[_0xd587[441]][_0xd587[248]](_0x5c29x2[_0x5c29x9]),_0x5c29x14=this[_0xd587[441]][_0xd587[248]](this[_0xd587[251]][_0xd587[1197]](_0x5c29x2[_0x5c29x9]));if(null!= _0x5c29x13&& null!= _0x5c29x14){var _0x5c29x12=_0x5c29x12[_0xd587[238]](),_0x5c29x15=-_0x5c29x14[_0xd587[2078]][_0xd587[235]],_0x5c29x16=-_0x5c29x14[_0xd587[2078]][_0xd587[236]],_0x5c29x17=_0x5c29x13[_0xd587[439]],_0x5c29x18=this[_0xd587[251]][_0xd587[1709]](_0x5c29x2[_0x5c29x9],!0);if(null!= _0x5c29x18&& this[_0xd587[2551]](_0x5c29x2[_0x5c29x9],_0x5c29x18,!0)){for(var _0x5c29x19=mxCellPath[_0xd587[385]](_0x5c29x18);null!= _0x5c29x18&& null== _0x5c29x5[_0x5c29x19];){_0x5c29x18= this[_0xd587[251]][_0xd587[1197]](_0x5c29x18),_0x5c29x19= mxCellPath[_0xd587[385]](_0x5c29x18)};null== _0x5c29x18&& (_0x5c29x12[_0xd587[2007]]( new mxPoint(_0x5c29x17[0][_0xd587[235]]/ _0x5c29x3- _0x5c29x4[_0xd587[235]]+ _0x5c29x15,_0x5c29x17[0][_0xd587[236]]/ _0x5c29x3- _0x5c29x4[_0xd587[236]]+ _0x5c29x16),!0),this[_0xd587[251]][_0xd587[1957]](_0x5c29x2[_0x5c29x9],null,!0))};var _0x5c29x1a=this[_0xd587[251]][_0xd587[1709]](_0x5c29x2[_0x5c29x9],!1);if(null!= _0x5c29x1a&& this[_0xd587[2551]](_0x5c29x2[_0x5c29x9],_0x5c29x1a,!1)){for(var _0x5c29x1b=mxCellPath[_0xd587[385]](_0x5c29x1a);null!= _0x5c29x1a&& null== _0x5c29x5[_0x5c29x1b];){_0x5c29x1a= this[_0xd587[251]][_0xd587[1197]](_0x5c29x1a),_0x5c29x1b= mxCellPath[_0xd587[385]](_0x5c29x1a)};if(null== _0x5c29x1a){var _0x5c29x1c=_0x5c29x17[_0xd587[67]]- 1;_0x5c29x12[_0xd587[2007]]( new mxPoint(_0x5c29x17[_0x5c29x1c][_0xd587[235]]/ _0x5c29x3- _0x5c29x4[_0xd587[235]]+ _0x5c29x15,_0x5c29x17[_0x5c29x1c][_0xd587[236]]/ _0x5c29x3- _0x5c29x4[_0xd587[236]]+ _0x5c29x16),!1);this[_0xd587[251]][_0xd587[1957]](_0x5c29x2[_0x5c29x9],null,!1)}};this[_0xd587[251]][_0xd587[1724]](_0x5c29x2[_0x5c29x9],_0x5c29x12)}}}}}finally{this[_0xd587[251]][_0xd587[476]]()}}};mxGraph[_0xd587[202]][_0xd587[2534]]= function(){return this[_0xd587[441]][_0xd587[1741]]};mxGraph[_0xd587[202]][_0xd587[2326]]= function(_0x5c29x2){return null};mxGraph[_0xd587[202]][_0xd587[1908]]= function(_0x5c29x2){return !1};mxGraph[_0xd587[202]][_0xd587[2550]]= function(_0x5c29x2,_0x5c29x3){return this[_0xd587[251]][_0xd587[1197]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2280]]= function(_0x5c29x2){return null};mxGraph[_0xd587[202]][_0xd587[2552]]= function(_0x5c29x2){_0x5c29x2= _0x5c29x2|| this[_0xd587[2452]]();null!= _0x5c29x2&& this[_0xd587[2553]](_0x5c29x2)&& (this[_0xd587[441]][_0xd587[2257]](_0x5c29x2),this[_0xd587[2440]]())};mxGraph[_0xd587[202]][_0xd587[2554]]= function(){var _0x5c29x2=this[_0xd587[251]][_0xd587[501]](),_0x5c29x3=this[_0xd587[2534]]();if(null!= _0x5c29x3){for(var _0x5c29x4=this[_0xd587[251]][_0xd587[1197]](_0x5c29x3);_0x5c29x4!= _0x5c29x2&& !this[_0xd587[2553]](_0x5c29x4)&& this[_0xd587[251]][_0xd587[1197]](_0x5c29x4)!= _0x5c29x2;){_0x5c29x4= this[_0xd587[251]][_0xd587[1197]](_0x5c29x4)};_0x5c29x4== _0x5c29x2|| this[_0xd587[251]][_0xd587[1197]](_0x5c29x4)== _0x5c29x2?this[_0xd587[441]][_0xd587[2257]](null):this[_0xd587[441]][_0xd587[2257]](_0x5c29x4);null!= this[_0xd587[441]][_0xd587[248]](_0x5c29x3)&& this[_0xd587[2450]](_0x5c29x3)}};mxGraph[_0xd587[202]][_0xd587[2442]]= function(){var _0x5c29x2=this[_0xd587[2534]]();null!= _0x5c29x2&& (this[_0xd587[441]][_0xd587[2257]](null),null!= this[_0xd587[441]][_0xd587[248]](_0x5c29x2)&& this[_0xd587[2450]](_0x5c29x2))};mxGraph[_0xd587[202]][_0xd587[2553]]= function(_0x5c29x2){return null!= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[517]]= function(){return this[_0xd587[441]][_0xd587[517]]()};mxGraph[_0xd587[202]][_0xd587[2555]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=[_0x5c29x2];_0x5c29x3&& (_0x5c29x5= _0x5c29x5[_0xd587[1919]](this[_0xd587[251]][_0xd587[264]](_0x5c29x2)));_0x5c29x5= this[_0xd587[441]][_0xd587[1799]](_0x5c29x5);if(_0x5c29x4){_0x5c29x4= this[_0xd587[251]][_0xd587[262]](_0x5c29x2);for(var _0x5c29x9=0;_0x5c29x9< _0x5c29x4;_0x5c29x9++){var _0x5c29xa=this[_0xd587[2555]](this[_0xd587[251]][_0xd587[263]](_0x5c29x2,_0x5c29x9),_0x5c29x3,!0);null!= _0x5c29x5?_0x5c29x5[_0xd587[99]](_0x5c29xa):_0x5c29x5= _0x5c29xa}};return _0x5c29x5};mxGraph[_0xd587[202]][_0xd587[1729]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:!1;var _0x5c29x4=null;if(null!= _0x5c29x2){for(var _0x5c29x5=0;_0x5c29x5< _0x5c29x2[_0xd587[67]];_0x5c29x5++){if(_0x5c29x3|| this[_0xd587[251]][_0xd587[1193]](_0x5c29x2[_0x5c29x5])){var _0x5c29x9=this[_0xd587[1198]](_0x5c29x2[_0x5c29x5]);if(null!= _0x5c29x9){var _0x5c29xa=_0x5c29x9[_0xd587[1525]];if(null!= _0x5c29xa&& 0< _0x5c29xa[_0xd587[67]]){for(var _0x5c29x12= new mxRectangle(_0x5c29xa[0][_0xd587[235]],_0x5c29xa[0][_0xd587[236]],0,0),_0x5c29x13=function(_0x5c29x2){null!= _0x5c29x2&& _0x5c29x12[_0xd587[99]]( new mxRectangle(_0x5c29x2[_0xd587[235]],_0x5c29x2[_0xd587[236]],0,0))},_0x5c29x14=1;_0x5c29x14< _0x5c29xa[_0xd587[67]];_0x5c29x14++){_0x5c29x13(_0x5c29xa[_0x5c29x14])};_0x5c29x13(_0x5c29x9[_0xd587[2006]](!0));_0x5c29x13(_0x5c29x9[_0xd587[2006]](!1))};null== _0x5c29x4?_0x5c29x4=  new mxRectangle(_0x5c29x9[_0xd587[235]],_0x5c29x9[_0xd587[236]],_0x5c29x9[_0xd587[117]],_0x5c29x9[_0xd587[119]]):_0x5c29x4[_0xd587[99]](_0x5c29x9)}}}};return _0x5c29x4};mxGraph[_0xd587[202]][_0xd587[802]]= function(_0x5c29x2){this[_0xd587[441]][_0xd587[200]](_0x5c29x2,null== _0x5c29x2);this[_0xd587[441]][_0xd587[2264]]();this[_0xd587[2258]]();this[_0xd587[746]]( new mxEventObject(mxEvent.REFRESH))};mxGraph[_0xd587[202]][_0xd587[1021]]= function(_0x5c29x2){this[_0xd587[991]]&& (_0x5c29x2= Math[_0xd587[488]](_0x5c29x2/ this[_0xd587[1020]])* this[_0xd587[1020]]);return _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[1135]]= function(_0x5c29x2,_0x5c29x3){if(this[_0xd587[2365]]&& mxUtils[_0xd587[1134]](this[_0xd587[526]])){this[_0xd587[526]][_0xd587[360]]=  -_0x5c29x2,this[_0xd587[526]][_0xd587[190]]=  -_0x5c29x3}else {var _0x5c29x4=this[_0xd587[441]][_0xd587[2051]]();if(this[_0xd587[507]]== mxConstants[_0xd587[508]]){if(0== _0x5c29x2&& 0== _0x5c29x3){if(mxClient[_0xd587[80]]?_0x5c29x4[_0xd587[57]](_0xd587[535],_0xd587[536]+ _0x5c29x2+ _0xd587[537]+ _0x5c29x3+ _0xd587[460]):_0x5c29x4[_0xd587[1390]](_0xd587[535]),null!= this[_0xd587[2556]]){for(var _0x5c29x5=this[_0xd587[2556]][_0xd587[285]];null!= _0x5c29x5;){var _0x5c29x9=_0x5c29x5[_0xd587[287]];this[_0xd587[526]][_0xd587[62]](_0x5c29x5);_0x5c29x5= _0x5c29x9};this[_0xd587[2556]][_0xd587[265]][_0xd587[266]](this[_0xd587[2556]]);this[_0xd587[2556]]= null;this[_0xd587[526]][_0xd587[62]](_0x5c29x4[_0xd587[265]]);for(_0x5c29x5= this[_0xd587[2557]][_0xd587[285]];null!= _0x5c29x5;){_0x5c29x9= _0x5c29x5[_0xd587[287]],this[_0xd587[526]][_0xd587[62]](_0x5c29x5),_0x5c29x5= _0x5c29x9};this[_0xd587[2557]][_0xd587[265]][_0xd587[266]](this[_0xd587[2557]]);this[_0xd587[2557]]= null}}else {_0x5c29x4[_0xd587[57]](_0xd587[535],_0xd587[536]+ _0x5c29x2+ _0xd587[537]+ _0x5c29x3+ _0xd587[460]);if(null== this[_0xd587[2556]]){this[_0xd587[2556]]= document[_0xd587[55]](_0xd587[485]);this[_0xd587[2556]][_0xd587[124]][_0xd587[491]]= _0xd587[492];this[_0xd587[2556]][_0xd587[124]][_0xd587[277]]= _0xd587[189];this[_0xd587[2557]]= document[_0xd587[55]](_0xd587[485]);this[_0xd587[2557]][_0xd587[124]][_0xd587[491]]= _0xd587[492];this[_0xd587[2557]][_0xd587[124]][_0xd587[277]]= _0xd587[189];for(var _0x5c29xa=this[_0xd587[2556]],_0x5c29x5=this[_0xd587[526]][_0xd587[285]];null!= _0x5c29x5;){_0x5c29x9= _0x5c29x5[_0xd587[287]],_0x5c29x5!= _0x5c29x4[_0xd587[265]]?_0x5c29xa[_0xd587[62]](_0x5c29x5):_0x5c29xa= this[_0xd587[2557]],_0x5c29x5= _0x5c29x9};this[_0xd587[526]][_0xd587[950]](this[_0xd587[2556]],_0x5c29x4[_0xd587[265]]);this[_0xd587[526]][_0xd587[62]](this[_0xd587[2557]])};this[_0xd587[2556]][_0xd587[124]][_0xd587[361]]= _0x5c29x2+ _0xd587[168];this[_0xd587[2556]][_0xd587[124]][_0xd587[125]]= _0x5c29x3+ _0xd587[168];this[_0xd587[2557]][_0xd587[124]][_0xd587[361]]= _0x5c29x2+ _0xd587[168];this[_0xd587[2557]][_0xd587[124]][_0xd587[125]]= _0x5c29x3+ _0xd587[168]}}else {_0x5c29x4[_0xd587[124]][_0xd587[361]]= _0x5c29x2+ _0xd587[168],_0x5c29x4[_0xd587[124]][_0xd587[125]]= _0x5c29x3+ _0xd587[168]};this[_0xd587[1136]]= _0x5c29x2;this[_0xd587[1137]]= _0x5c29x3;this[_0xd587[746]]( new mxEventObject(mxEvent.PAN))}};mxGraph[_0xd587[202]][_0xd587[2558]]= function(){this[_0xd587[499]](this[_0xd587[2395]])};mxGraph[_0xd587[202]][_0xd587[2559]]= function(){this[_0xd587[499]](1/ this[_0xd587[2395]])};mxGraph[_0xd587[202]][_0xd587[2560]]= function(){1== this[_0xd587[441]][_0xd587[255]]?this[_0xd587[441]][_0xd587[1147]](0,0):(this[_0xd587[441]][_0xd587[513]][_0xd587[235]]= 0,this[_0xd587[441]][_0xd587[513]][_0xd587[236]]= 0,this[_0xd587[441]][_0xd587[2262]](1))};mxGraph[_0xd587[202]][_0xd587[2561]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[499]](_0x5c29x2/ this[_0xd587[441]][_0xd587[255]],_0x5c29x3)};mxGraph[_0xd587[202]][_0xd587[499]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:this[_0xd587[2397]];var _0x5c29x4=this[_0xd587[441]][_0xd587[255]]* _0x5c29x2,_0x5c29x5=this[_0xd587[441]][_0xd587[248]](this[_0xd587[2452]]());if(this[_0xd587[2396]]&& null!= _0x5c29x5){_0x5c29x5=  new mxRectangle(_0x5c29x5[_0xd587[235]]* _0x5c29x2,_0x5c29x5[_0xd587[236]]* _0x5c29x2,_0x5c29x5[_0xd587[117]]* _0x5c29x2,_0x5c29x5[_0xd587[119]]* _0x5c29x2),this[_0xd587[441]][_0xd587[255]]= _0x5c29x4,this[_0xd587[2562]](_0x5c29x5)|| (this[_0xd587[441]][_0xd587[2259]](),this[_0xd587[441]][_0xd587[2262]](_0x5c29x4))}else {if(_0x5c29x3&& !mxUtils[_0xd587[1134]](this[_0xd587[526]])){var _0x5c29x5=this[_0xd587[526]][_0xd587[359]],_0x5c29x9=this[_0xd587[526]][_0xd587[167]];if(1< _0x5c29x2){var _0x5c29xa=(_0x5c29x2- 1)/ (2* _0x5c29x4),_0x5c29x5=_0x5c29x5*  -_0x5c29xa,_0x5c29x9=_0x5c29x9*  -_0x5c29xa}else {_0x5c29xa= (1/ _0x5c29x2- 1)/ (2* this[_0xd587[441]][_0xd587[255]]),_0x5c29x5*= _0x5c29xa,_0x5c29x9*= _0x5c29xa};this[_0xd587[441]][_0xd587[829]](_0x5c29x4,this[_0xd587[441]][_0xd587[513]][_0xd587[235]]+ _0x5c29x5,this[_0xd587[441]][_0xd587[513]][_0xd587[236]]+ _0x5c29x9)}else {this[_0xd587[441]][_0xd587[2262]](_0x5c29x4),mxUtils[_0xd587[1134]](this[_0xd587[526]])&& (_0x5c29x9= _0x5c29x5= 0,_0x5c29x3&& (_0x5c29x5= this[_0xd587[526]][_0xd587[359]]* (_0x5c29x2- 1)/ 2,_0x5c29x9= this[_0xd587[526]][_0xd587[167]]* (_0x5c29x2- 1)/ 2),this[_0xd587[526]][_0xd587[360]]= Math[_0xd587[488]](this[_0xd587[526]][_0xd587[360]]* _0x5c29x2+ _0x5c29x5),this[_0xd587[526]][_0xd587[190]]= Math[_0xd587[488]](this[_0xd587[526]][_0xd587[190]]* _0x5c29x2+ _0x5c29x9))}}};mxGraph[_0xd587[202]][_0xd587[2563]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[526]][_0xd587[159]]/ _0x5c29x2[_0xd587[117]]/ (this[_0xd587[526]][_0xd587[157]]/ _0x5c29x2[_0xd587[119]]);_0x5c29x2[_0xd587[235]]= Math[_0xd587[160]](0,_0x5c29x2[_0xd587[235]]);_0x5c29x2[_0xd587[236]]= Math[_0xd587[160]](0,_0x5c29x2[_0xd587[236]]);var _0x5c29x4=Math[_0xd587[243]](this[_0xd587[526]][_0xd587[1526]],_0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]]),_0x5c29x5=Math[_0xd587[243]](this[_0xd587[526]][_0xd587[191]],_0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]]);_0x5c29x2[_0xd587[117]]= _0x5c29x4- _0x5c29x2[_0xd587[235]];_0x5c29x2[_0xd587[119]]= _0x5c29x5- _0x5c29x2[_0xd587[236]];1> _0x5c29x3?(_0x5c29x3= _0x5c29x2[_0xd587[119]]/ _0x5c29x3,_0x5c29x4= (_0x5c29x3- _0x5c29x2[_0xd587[119]])/ 2,_0x5c29x2[_0xd587[119]]= _0x5c29x3,_0x5c29x3= Math[_0xd587[243]](_0x5c29x2[_0xd587[236]],_0x5c29x4),_0x5c29x2[_0xd587[236]]-= _0x5c29x3,_0x5c29x5= Math[_0xd587[243]](this[_0xd587[526]][_0xd587[191]],_0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]]),_0x5c29x2[_0xd587[119]]= _0x5c29x5- _0x5c29x2[_0xd587[236]]):(_0x5c29x3*= _0x5c29x2[_0xd587[117]],_0x5c29x4= (_0x5c29x3- _0x5c29x2[_0xd587[117]])/ 2,_0x5c29x2[_0xd587[117]]= _0x5c29x3,_0x5c29x3= Math[_0xd587[243]](_0x5c29x2[_0xd587[235]],_0x5c29x4),_0x5c29x2[_0xd587[235]]-= _0x5c29x3,_0x5c29x4= Math[_0xd587[243]](this[_0xd587[526]][_0xd587[1526]],_0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]]),_0x5c29x2[_0xd587[117]]= _0x5c29x4- _0x5c29x2[_0xd587[235]]);_0x5c29x3= this[_0xd587[526]][_0xd587[159]]/ _0x5c29x2[_0xd587[117]];_0x5c29x4= this[_0xd587[441]][_0xd587[255]]* _0x5c29x3;mxUtils[_0xd587[1134]](this[_0xd587[526]])?(this[_0xd587[441]][_0xd587[2262]](_0x5c29x4),this[_0xd587[526]][_0xd587[360]]= Math[_0xd587[488]](_0x5c29x2[_0xd587[235]]* _0x5c29x3),this[_0xd587[526]][_0xd587[190]]= Math[_0xd587[488]](_0x5c29x2[_0xd587[236]]* _0x5c29x3)):this[_0xd587[441]][_0xd587[829]](_0x5c29x4,this[_0xd587[441]][_0xd587[513]][_0xd587[235]]- _0x5c29x2[_0xd587[235]]/ this[_0xd587[441]][_0xd587[255]],this[_0xd587[441]][_0xd587[513]][_0xd587[236]]- _0x5c29x2[_0xd587[236]]/ this[_0xd587[441]][_0xd587[255]])};mxGraph[_0xd587[202]][_0xd587[933]]= function(_0x5c29x2,_0x5c29x3){if(null!= this[_0xd587[526]]){_0x5c29x2= null!= _0x5c29x2?_0x5c29x2:0;_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:!1;var _0x5c29x4=this[_0xd587[526]][_0xd587[159]],_0x5c29x5=this[_0xd587[526]][_0xd587[157]],_0x5c29x9=this[_0xd587[441]][_0xd587[517]]();_0x5c29x3&& (null!= _0x5c29x9[_0xd587[235]]&& null!= _0x5c29x9[_0xd587[236]])&& (_0x5c29x9[_0xd587[117]]+= _0x5c29x9[_0xd587[235]],_0x5c29x9[_0xd587[119]]+= _0x5c29x9[_0xd587[236]],_0x5c29x9[_0xd587[235]]= 0,_0x5c29x9[_0xd587[236]]= 0);var _0x5c29xa=this[_0xd587[441]][_0xd587[255]],_0x5c29x12=_0x5c29x9[_0xd587[117]]/ _0x5c29xa,_0x5c29x13=_0x5c29x9[_0xd587[119]]/ _0x5c29xa;null!= this[_0xd587[1617]]&& (_0x5c29x12= Math[_0xd587[160]](_0x5c29x12,this[_0xd587[1617]][_0xd587[117]]- _0x5c29x9[_0xd587[235]]/ _0x5c29xa),_0x5c29x13= Math[_0xd587[160]](_0x5c29x13,this[_0xd587[1617]][_0xd587[119]]- _0x5c29x9[_0xd587[236]]/ _0x5c29xa));var _0x5c29x14=_0x5c29x3?_0x5c29x2:2* _0x5c29x2,_0x5c29x4=Math[_0xd587[519]](100* Math[_0xd587[243]](_0x5c29x4/ (_0x5c29x12+ _0x5c29x14),_0x5c29x5/ (_0x5c29x13+ _0x5c29x14)))/ 100;null!= this[_0xd587[2413]]&& (_0x5c29x4= Math[_0xd587[160]](_0x5c29x4,this[_0xd587[2413]]));null!= this[_0xd587[2414]]&& (_0x5c29x4= Math[_0xd587[243]](_0x5c29x4,this[_0xd587[2414]]));_0x5c29x3?this[_0xd587[441]][_0xd587[255]]!= _0x5c29x4&& this[_0xd587[441]][_0xd587[2262]](_0x5c29x4):mxUtils[_0xd587[1134]](this[_0xd587[526]])?(this[_0xd587[441]][_0xd587[2262]](_0x5c29x4),null!= _0x5c29x9[_0xd587[235]]&& (this[_0xd587[526]][_0xd587[360]]= Math[_0xd587[488]](_0x5c29x9[_0xd587[235]]/ _0x5c29xa)* _0x5c29x4- _0x5c29x2- Math[_0xd587[160]](0,(this[_0xd587[526]][_0xd587[159]]- _0x5c29x12* _0x5c29x4)/ 2)),null!= _0x5c29x9[_0xd587[236]]&& (this[_0xd587[526]][_0xd587[190]]= Math[_0xd587[488]](_0x5c29x9[_0xd587[236]]/ _0x5c29xa)* _0x5c29x4- _0x5c29x2- Math[_0xd587[160]](0,(this[_0xd587[526]][_0xd587[157]]- _0x5c29x13* _0x5c29x4)/ 2))):this[_0xd587[441]][_0xd587[829]](_0x5c29x4,null!= _0x5c29x9[_0xd587[235]]?Math[_0xd587[519]](this[_0xd587[441]][_0xd587[513]][_0xd587[235]]- _0x5c29x9[_0xd587[235]]/ _0x5c29xa+ _0x5c29x2+ 1):_0x5c29x2,null!= _0x5c29x9[_0xd587[236]]?Math[_0xd587[519]](this[_0xd587[441]][_0xd587[513]][_0xd587[236]]- _0x5c29x9[_0xd587[236]]/ _0x5c29xa+ _0x5c29x2+ 1):_0x5c29x2)};return this[_0xd587[441]][_0xd587[255]]};mxGraph[_0xd587[202]][_0xd587[2564]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=-this[_0xd587[441]][_0xd587[513]][_0xd587[235]],_0x5c29x5=-this[_0xd587[441]][_0xd587[513]][_0xd587[236]],_0x5c29x9=this[_0xd587[441]][_0xd587[248]](_0x5c29x2);null!= _0x5c29x9&& (_0x5c29x4=  new mxRectangle(_0x5c29x4+ _0x5c29x9[_0xd587[235]],_0x5c29x5+ _0x5c29x9[_0xd587[236]],_0x5c29x9[_0xd587[117]],_0x5c29x9[_0xd587[119]]),_0x5c29x3&& null!= this[_0xd587[526]]&& (_0x5c29x5= this[_0xd587[526]][_0xd587[159]],_0x5c29x9= this[_0xd587[526]][_0xd587[157]],_0x5c29x4[_0xd587[235]]= _0x5c29x4[_0xd587[241]]()- _0x5c29x5/ 2,_0x5c29x4[_0xd587[117]]= _0x5c29x5,_0x5c29x4[_0xd587[236]]= _0x5c29x4[_0xd587[242]]()- _0x5c29x9/ 2,_0x5c29x4[_0xd587[119]]= _0x5c29x9),this[_0xd587[2562]](_0x5c29x4)&& this[_0xd587[441]][_0xd587[1147]](this[_0xd587[441]][_0xd587[513]][_0xd587[235]],this[_0xd587[441]][_0xd587[513]][_0xd587[236]]))};mxGraph[_0xd587[202]][_0xd587[2562]]= function(_0x5c29x2){var _0x5c29x3=!1;if(null!= _0x5c29x2){var _0x5c29x4=this[_0xd587[526]][_0xd587[359]],_0x5c29x5=this[_0xd587[526]][_0xd587[167]],_0x5c29x9=Math[_0xd587[243]](_0x5c29x4,_0x5c29x2[_0xd587[117]]),_0x5c29xa=Math[_0xd587[243]](_0x5c29x5,_0x5c29x2[_0xd587[119]]);if(mxUtils[_0xd587[1134]](this[_0xd587[526]])){_0x5c29x4= this[_0xd587[526]];_0x5c29x2[_0xd587[235]]+= this[_0xd587[441]][_0xd587[513]][_0xd587[235]];_0x5c29x2[_0xd587[236]]+= this[_0xd587[441]][_0xd587[513]][_0xd587[236]];var _0x5c29x12=_0x5c29x4[_0xd587[360]]- _0x5c29x2[_0xd587[235]],_0x5c29x5=Math[_0xd587[160]](_0x5c29x12- _0x5c29x4[_0xd587[360]],0);0< _0x5c29x12?_0x5c29x4[_0xd587[360]]-= _0x5c29x12+ 2:(_0x5c29x12= _0x5c29x2[_0xd587[235]]+ _0x5c29x9- _0x5c29x4[_0xd587[360]]- _0x5c29x4[_0xd587[159]],0< _0x5c29x12&& (_0x5c29x4[_0xd587[360]]+= _0x5c29x12+ 2));_0x5c29x9= _0x5c29x4[_0xd587[190]]- _0x5c29x2[_0xd587[236]];_0x5c29x12= Math[_0xd587[160]](0,_0x5c29x9- _0x5c29x4[_0xd587[190]]);0< _0x5c29x9?_0x5c29x4[_0xd587[190]]-= _0x5c29x9+ 2:(_0x5c29x9= _0x5c29x2[_0xd587[236]]+ _0x5c29xa- _0x5c29x4[_0xd587[190]]- _0x5c29x4[_0xd587[157]],0< _0x5c29x9&& (_0x5c29x4[_0xd587[190]]+= _0x5c29x9+ 2));!this[_0xd587[2365]]&& (0!= _0x5c29x5|| 0!= _0x5c29x12)&& this[_0xd587[441]][_0xd587[1147]](_0x5c29x5,_0x5c29x12)}else {var _0x5c29x12=-this[_0xd587[441]][_0xd587[513]][_0xd587[235]],_0x5c29x13=-this[_0xd587[441]][_0xd587[513]][_0xd587[236]],_0x5c29x14=this[_0xd587[441]][_0xd587[255]];_0x5c29x2[_0xd587[235]]+ _0x5c29x9> _0x5c29x12+ _0x5c29x4&& (this[_0xd587[441]][_0xd587[513]][_0xd587[235]]-= (_0x5c29x2[_0xd587[235]]+ _0x5c29x9- _0x5c29x4- _0x5c29x12)/ _0x5c29x14,_0x5c29x3=  !0);_0x5c29x2[_0xd587[236]]+ _0x5c29xa> _0x5c29x13+ _0x5c29x5&& (this[_0xd587[441]][_0xd587[513]][_0xd587[236]]-= (_0x5c29x2[_0xd587[236]]+ _0x5c29xa- _0x5c29x5- _0x5c29x13)/ _0x5c29x14,_0x5c29x3=  !0);_0x5c29x2[_0xd587[235]]< _0x5c29x12&& (this[_0xd587[441]][_0xd587[513]][_0xd587[235]]+= (_0x5c29x12- _0x5c29x2[_0xd587[235]])/ _0x5c29x14,_0x5c29x3=  !0);_0x5c29x2[_0xd587[236]]< _0x5c29x13&& (this[_0xd587[441]][_0xd587[513]][_0xd587[236]]+= (_0x5c29x13- _0x5c29x2[_0xd587[236]])/ _0x5c29x14,_0x5c29x3=  !0);_0x5c29x3&& (this[_0xd587[441]][_0xd587[802]](),null!= this[_0xd587[2432]]&& this[_0xd587[2432]][_0xd587[802]]())}};return _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[1198]]= function(_0x5c29x2){return this[_0xd587[251]][_0xd587[1721]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[1714]]= function(_0x5c29x2){return this[_0xd587[251]][_0xd587[174]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[1742]]= function(_0x5c29x2){return this[_0xd587[251]][_0xd587[1971]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2565]]= function(_0x5c29x2){return this[_0xd587[251]][_0xd587[1965]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2298]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2566]]];if(null!= _0x5c29x3){return _0x5c29x3};_0x5c29x2= this[_0xd587[441]][_0xd587[2291]](_0x5c29x2);return _0x5c29x2== mxEdgeStyle[_0xd587[2567]]|| _0x5c29x2== mxEdgeStyle[_0xd587[2568]]|| _0x5c29x2== mxEdgeStyle[_0xd587[2569]]|| _0x5c29x2== mxEdgeStyle[_0xd587[2570]]|| _0x5c29x2== mxEdgeStyle[_0xd587[2571]]|| _0x5c29x2== mxEdgeStyle[_0xd587[2572]]};mxGraph[_0xd587[202]][_0xd587[2573]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[2089]](!0);_0x5c29x2= _0x5c29x2[_0xd587[2089]](!1);return null!= _0x5c29x3&& _0x5c29x3== _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2574]]= function(_0x5c29x2){return mxEvent[_0xd587[775]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2462]]= function(_0x5c29x2){return mxClient[_0xd587[2575]]?mxEvent[_0xd587[2576]](_0x5c29x2):mxEvent[_0xd587[775]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[1018]]= function(_0x5c29x2){return null!= _0x5c29x2&& !mxEvent[_0xd587[2577]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2578]]= function(_0x5c29x2){return mxEvent[_0xd587[774]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2579]]= function(_0x5c29x2){return mxEvent[_0xd587[2577]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2580]]= function(_0x5c29x2){mxUtils[_0xd587[150]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2581]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return null== this[_0xd587[2500]](_0x5c29x2,_0x5c29x3,_0x5c29x4)};mxGraph[_0xd587[202]][_0xd587[2500]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){if(null!= _0x5c29x2&& !this[_0xd587[2530]]()&& (null== _0x5c29x3|| null== _0x5c29x4)){return _0xd587[110]};if(null!= _0x5c29x2&& null== this[_0xd587[251]][_0xd587[1709]](_0x5c29x2,!0)&& null== this[_0xd587[251]][_0xd587[1709]](_0x5c29x2,!1)){return null};if(!this[_0xd587[2402]]&& _0x5c29x3== _0x5c29x4&& null!= _0x5c29x3|| !this[_0xd587[2582]](_0x5c29x3,_0x5c29x4)){return _0xd587[110]};if(null!= _0x5c29x3&& null!= _0x5c29x4){var _0x5c29x5=_0xd587[110];if(!this[_0xd587[2404]]){var _0x5c29x9=this[_0xd587[251]][_0xd587[1781]](_0x5c29x3,_0x5c29x4,!0);if(1< _0x5c29x9[_0xd587[67]]|| 1== _0x5c29x9[_0xd587[67]]&& _0x5c29x9[0]!= _0x5c29x2){_0x5c29x5+= (mxResources[_0xd587[203]](this[_0xd587[2421]])|| this[_0xd587[2421]])+ _0xd587[192]}};var _0x5c29x9=this[_0xd587[251]][_0xd587[1962]](_0x5c29x3,!0,_0x5c29x2),_0x5c29xa=this[_0xd587[251]][_0xd587[1962]](_0x5c29x4,!1,_0x5c29x2);if(null!= this[_0xd587[2335]]){for(var _0x5c29x12=0;_0x5c29x12< this[_0xd587[2335]][_0xd587[67]];_0x5c29x12++){var _0x5c29x13=this[_0xd587[2335]][_0x5c29x12][_0xd587[2583]](this,_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x9,_0x5c29xa);null!= _0x5c29x13&& (_0x5c29x5+= _0x5c29x13)}};_0x5c29x13= this[_0xd587[2584]](_0x5c29x2,_0x5c29x3,_0x5c29x4);null!= _0x5c29x13&& (_0x5c29x5+= _0x5c29x13);return 0< _0x5c29x5[_0xd587[67]]?_0x5c29x5:null};return this[_0xd587[2406]]?null:_0xd587[110]};mxGraph[_0xd587[202]][_0xd587[2584]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return null};mxGraph[_0xd587[202]][_0xd587[2585]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x2= null!= _0x5c29x2?_0x5c29x2:this[_0xd587[251]][_0xd587[501]]();_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:{};for(var _0x5c29x4=!0,_0x5c29x5=this[_0xd587[251]][_0xd587[262]](_0x5c29x2),_0x5c29x9=0;_0x5c29x9< _0x5c29x5;_0x5c29x9++){var _0x5c29xa=this[_0xd587[251]][_0xd587[263]](_0x5c29x2,_0x5c29x9),_0x5c29x12=_0x5c29x3;this[_0xd587[2553]](_0x5c29xa)&& (_0x5c29x12= {});_0x5c29x12= this[_0xd587[2585]](_0x5c29xa,_0x5c29x12);null!= _0x5c29x12?this[_0xd587[2447]](_0x5c29xa,_0x5c29x12[_0xd587[230]](/\n/g,_0xd587[545])):this[_0xd587[2447]](_0x5c29xa,null);_0x5c29x4= _0x5c29x4&& null== _0x5c29x12};_0x5c29x5= _0xd587[110];this[_0xd587[1742]](_0x5c29x2)&& !_0x5c29x4&& (_0x5c29x5+= (mxResources[_0xd587[203]](this[_0xd587[2423]])|| this[_0xd587[2423]])+ _0xd587[192]);_0x5c29x5= this[_0xd587[251]][_0xd587[250]](_0x5c29x2)?_0x5c29x5+ (this[_0xd587[2500]](_0x5c29x2,this[_0xd587[251]][_0xd587[1709]](_0x5c29x2,!0),this[_0xd587[251]][_0xd587[1709]](_0x5c29x2,!1))|| _0xd587[110]):_0x5c29x5+ (this[_0xd587[2586]](_0x5c29x2)|| _0xd587[110]);_0x5c29x9= this[_0xd587[2587]](_0x5c29x2,_0x5c29x3);null!= _0x5c29x9&& (_0x5c29x5+= _0x5c29x9);null== this[_0xd587[251]][_0xd587[1197]](_0x5c29x2)&& this[_0xd587[441]][_0xd587[2264]]();return 0< _0x5c29x5[_0xd587[67]]|| !_0x5c29x4?_0x5c29x5:null};mxGraph[_0xd587[202]][_0xd587[2586]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[251]][_0xd587[1962]](_0x5c29x2,!0),_0x5c29x4=this[_0xd587[251]][_0xd587[1962]](_0x5c29x2,!1);_0x5c29x2= this[_0xd587[251]][_0xd587[433]](_0x5c29x2);var _0x5c29x5=_0xd587[110];if(null!= this[_0xd587[2335]]){for(var _0x5c29x9=0;_0x5c29x9< this[_0xd587[2335]][_0xd587[67]];_0x5c29x9++){var _0x5c29xa=this[_0xd587[2335]][_0x5c29x9];if(_0x5c29xa[_0xd587[1097]]&& mxUtils[_0xd587[1331]](_0x5c29x2,_0x5c29xa[_0xd587[60]],_0x5c29xa[_0xd587[2588]],_0x5c29xa[_0xd587[131]])&& (0== _0x5c29xa[_0xd587[160]]&& 0< _0x5c29x3|| 1== _0x5c29xa[_0xd587[243]]&& 0== _0x5c29x3|| 1== _0x5c29xa[_0xd587[160]]&& 1< _0x5c29x3)){_0x5c29x5+= _0x5c29xa[_0xd587[2589]]+ _0xd587[192]}else {if(!_0x5c29xa[_0xd587[1097]]&& mxUtils[_0xd587[1331]](_0x5c29x2,_0x5c29xa[_0xd587[60]],_0x5c29xa[_0xd587[2588]],_0x5c29xa[_0xd587[131]])&& (0== _0x5c29xa[_0xd587[160]]&& 0< _0x5c29x4|| 1== _0x5c29xa[_0xd587[243]]&& 0== _0x5c29x4|| 1== _0x5c29xa[_0xd587[160]]&& 1< _0x5c29x4)){_0x5c29x5+= _0x5c29xa[_0xd587[2589]]+ _0xd587[192]}}}};return 0< _0x5c29x5[_0xd587[67]]?_0x5c29x5:null};mxGraph[_0xd587[202]][_0xd587[2587]]= function(_0x5c29x2,_0x5c29x3){return null};mxGraph[_0xd587[202]][_0xd587[2271]]= function(){return this[_0xd587[1617]]};mxGraph[_0xd587[202]][_0xd587[2590]]= function(_0x5c29x2){this[_0xd587[1617]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2205]]= function(_0x5c29x2){if(null!= _0x5c29x2&& this[_0xd587[2206]]&& !this[_0xd587[502]]()[_0xd587[250]](_0x5c29x2[_0xd587[246]])){var _0x5c29x3=this[_0xd587[1742]](_0x5c29x2[_0xd587[246]]);if(this[_0xd587[2516]](_0x5c29x2[_0xd587[246]],!_0x5c29x3)){return _0x5c29x3?this[_0xd587[2415]]:this[_0xd587[2417]]}};return null};mxGraph[_0xd587[202]][_0xd587[2454]]= function(_0x5c29x2){_0x5c29x2= this[_0xd587[251]][_0xd587[433]](_0x5c29x2);if(null!= _0x5c29x2){if(mxUtils[_0xd587[1331]](_0x5c29x2)){return _0x5c29x2[_0xd587[301]]};if(_0xd587[279]==  typeof _0x5c29x2[_0xd587[2591]]){return _0x5c29x2.toString()}};return _0xd587[110]};mxGraph[_0xd587[202]][_0xd587[2183]]= function(_0x5c29x2){var _0x5c29x3=_0xd587[110];if(this[_0xd587[2409]]&& null!= _0x5c29x2){var _0x5c29x4=this[_0xd587[441]][_0xd587[248]](_0x5c29x2),_0x5c29x4=null!= _0x5c29x4?_0x5c29x4[_0xd587[124]]:this[_0xd587[1705]](_0x5c29x2);mxUtils[_0xd587[433]](_0x5c29x4,mxConstants.STYLE_NOLABEL,!1)|| (_0x5c29x3= this[_0xd587[2454]](_0x5c29x2))};return _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[2186]]= function(_0x5c29x2){return this[_0xd587[2592]]()};mxGraph[_0xd587[202]][_0xd587[2592]]= function(){return this[_0xd587[2410]]};mxGraph[_0xd587[202]][_0xd587[2593]]= function(_0x5c29x2){this[_0xd587[2410]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2131]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[441]][_0xd587[248]](_0x5c29x2);_0x5c29x2= null!= _0x5c29x3?_0x5c29x3[_0xd587[124]]:this[_0xd587[1705]](_0x5c29x2);return null!= _0x5c29x2?_0xd587[1333]== _0x5c29x2[mxConstants[_0xd587[2594]]]:!1};mxGraph[_0xd587[202]][_0xd587[2130]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[441]][_0xd587[248]](_0x5c29x2);_0x5c29x2= null!= _0x5c29x3?_0x5c29x3[_0xd587[124]]:this[_0xd587[1705]](_0x5c29x2);return null!= _0x5c29x2?_0xd587[188]== _0x5c29x2[mxConstants[_0xd587[2193]]]:!1};mxGraph[_0xd587[202]][_0xd587[2595]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=null;if(null!= _0x5c29x2){if(null!= _0x5c29x2[_0xd587[2207]]&& (_0x5c29x3== _0x5c29x2[_0xd587[2207]][_0xd587[252]]|| _0x5c29x3[_0xd587[265]]== _0x5c29x2[_0xd587[2207]][_0xd587[252]])){_0x5c29x9= this[_0xd587[2425]],_0x5c29x9= mxResources[_0xd587[203]](_0x5c29x9)|| _0x5c29x9};null== _0x5c29x9&& null!= _0x5c29x2[_0xd587[1211]]&& _0x5c29x2[_0xd587[1211]][_0xd587[209]](function(_0x5c29x2,_0x5c29x4){if(null== _0x5c29x9&& (_0x5c29x3== _0x5c29x4[_0xd587[252]]|| _0x5c29x3[_0xd587[265]]== _0x5c29x4[_0xd587[252]])){_0x5c29x9= _0x5c29x4[_0xd587[2201]].toString()}});null== _0x5c29x9&& (_0x5c29x4= this[_0xd587[2432]][_0xd587[2596]](_0x5c29x2[_0xd587[246]]),null!= _0x5c29x4&& _0xd587[279]==  typeof _0x5c29x4[_0xd587[2597]]&& (_0x5c29x9= _0x5c29x4[_0xd587[2597]](_0x5c29x3)));null== _0x5c29x9&& (_0x5c29x9= this[_0xd587[2598]](_0x5c29x2[_0xd587[246]]))};return _0x5c29x9};mxGraph[_0xd587[202]][_0xd587[2598]]= function(_0x5c29x2){var _0x5c29x3=null;return _0x5c29x3= null!= _0x5c29x2&& null!= _0x5c29x2[_0xd587[2595]]?_0x5c29x2[_0xd587[2595]]():this[_0xd587[2454]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2599]]= function(_0x5c29x2){return null};mxGraph[_0xd587[202]][_0xd587[1731]]= function(_0x5c29x2){var _0x5c29x3= new mxRectangle,_0x5c29x4=this[_0xd587[441]][_0xd587[248]](_0x5c29x2);_0x5c29x2= null!= _0x5c29x4?_0x5c29x4[_0xd587[124]]:this[_0xd587[1705]](_0x5c29x2);null!= _0x5c29x2&& (_0x5c29x4= parseInt(mxUtils[_0xd587[433]](_0x5c29x2,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),mxUtils[_0xd587[433]](_0x5c29x2,mxConstants.STYLE_HORIZONTAL,!0)?_0x5c29x3[_0xd587[119]]= _0x5c29x4:_0x5c29x3[_0xd587[117]]= _0x5c29x4);return _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[1202]]= function(_0x5c29x2){return null!= _0x5c29x2&& null!= _0x5c29x2[_0xd587[124]]?_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2484]]]:null};mxGraph[_0xd587[202]][_0xd587[2187]]= function(_0x5c29x2){return null!= _0x5c29x2&& null!= _0x5c29x2[_0xd587[124]]?_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2063]]]|| mxConstants[_0xd587[481]]:null};mxGraph[_0xd587[202]][_0xd587[2173]]= function(_0x5c29x2){return null!= _0x5c29x2&& null!= _0x5c29x2[_0xd587[124]]?_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2600]]]:null};mxGraph[_0xd587[202]][_0xd587[2174]]= function(_0x5c29x2){return null!= _0x5c29x2&& null!= _0x5c29x2[_0xd587[124]]?_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2601]]]:null};mxGraph[_0xd587[202]][_0xd587[2172]]= function(_0x5c29x2){return null!= _0x5c29x2&& null!= _0x5c29x2[_0xd587[124]]?_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2602]]]:null};mxGraph[_0xd587[202]][_0xd587[2176]]= function(_0x5c29x2){return null!= _0x5c29x2&& null!= _0x5c29x2[_0xd587[124]]?_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2603]]]:null};mxGraph[_0xd587[202]][_0xd587[2476]]= function(){return this[_0xd587[467]]};mxGraph[_0xd587[202]][_0xd587[2604]]= function(_0x5c29x2){this[_0xd587[467]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[1730]]= function(_0x5c29x2){if(null!= _0x5c29x2&& this[_0xd587[251]][_0xd587[1197]](_0x5c29x2)!= this[_0xd587[251]][_0xd587[501]]()){var _0x5c29x3=this[_0xd587[441]][_0xd587[248]](_0x5c29x2),_0x5c29x3=null!= _0x5c29x3?_0x5c29x3[_0xd587[124]]:this[_0xd587[1705]](_0x5c29x2);if(null!= _0x5c29x3&& !this[_0xd587[251]][_0xd587[250]](_0x5c29x2)){return _0x5c29x3[mxConstants[_0xd587[2059]]]== mxConstants[_0xd587[2605]]}};return !1};mxGraph[_0xd587[202]][_0xd587[2606]]= function(){return this[_0xd587[2389]]};mxGraph[_0xd587[202]][_0xd587[2607]]= function(_0x5c29x2){this[_0xd587[2389]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[994]]= function(){return this[_0xd587[984]]};mxGraph[_0xd587[202]][_0xd587[995]]= function(_0x5c29x2){this[_0xd587[984]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2608]]= function(){return this[_0xd587[2362]]};mxGraph[_0xd587[202]][_0xd587[2609]]= function(_0x5c29x2){this[_0xd587[2362]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2134]]= function(){return this[_0xd587[2363]]};mxGraph[_0xd587[202]][_0xd587[2610]]= function(_0x5c29x2){this[_0xd587[2363]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2125]]= function(){return this[_0xd587[2364]]};mxGraph[_0xd587[202]][_0xd587[2611]]= function(_0x5c29x2){this[_0xd587[2364]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2612]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[251]][_0xd587[1721]](_0x5c29x2);return this[_0xd587[2613]]()|| null!= _0x5c29x3&& this[_0xd587[251]][_0xd587[1193]](_0x5c29x2)&& _0x5c29x3[_0xd587[1500]]};mxGraph[_0xd587[202]][_0xd587[2613]]= function(){return this[_0xd587[2368]]};mxGraph[_0xd587[202]][_0xd587[2614]]= function(_0x5c29x2){this[_0xd587[2368]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2615]]= function(_0x5c29x2){return this[_0xd587[251]][_0xd587[1938]](_0x5c29x2,mxUtils[_0xd587[885]](this,function(_0x5c29x2){return this[_0xd587[2616]](_0x5c29x2)}))};mxGraph[_0xd587[202]][_0xd587[2616]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[441]][_0xd587[248]](_0x5c29x2);_0x5c29x2= null!= _0x5c29x3?_0x5c29x3[_0xd587[124]]:this[_0xd587[1705]](_0x5c29x2);return this[_0xd587[2617]]()&& 0!= _0x5c29x2[mxConstants[_0xd587[2618]]]};mxGraph[_0xd587[202]][_0xd587[2617]]= function(){return this[_0xd587[2369]]};mxGraph[_0xd587[202]][_0xd587[2619]]= function(_0x5c29x2){this[_0xd587[2369]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[898]]= function(_0x5c29x2){return this[_0xd587[251]][_0xd587[1938]](_0x5c29x2,mxUtils[_0xd587[885]](this,function(_0x5c29x2){return this[_0xd587[2620]](_0x5c29x2)}))};mxGraph[_0xd587[202]][_0xd587[2620]]= function(_0x5c29x2){return this[_0xd587[2366]]};mxGraph[_0xd587[202]][_0xd587[900]]= function(_0x5c29x2){return this[_0xd587[251]][_0xd587[1938]](_0x5c29x2,mxUtils[_0xd587[885]](this,function(_0x5c29x2){return this[_0xd587[2621]](_0x5c29x2)}))};mxGraph[_0xd587[202]][_0xd587[2621]]= function(_0x5c29x2){return this[_0xd587[2367]]};mxGraph[_0xd587[202]][_0xd587[2102]]= function(_0x5c29x2){return this[_0xd587[2622]]()};mxGraph[_0xd587[202]][_0xd587[2622]]= function(){return this[_0xd587[2379]]};mxGraph[_0xd587[202]][_0xd587[2623]]= function(_0x5c29x2){this[_0xd587[2379]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2510]]= function(_0x5c29x2){return this[_0xd587[251]][_0xd587[1938]](_0x5c29x2,mxUtils[_0xd587[885]](this,function(_0x5c29x2){return this[_0xd587[2624]](_0x5c29x2)}))};mxGraph[_0xd587[202]][_0xd587[2624]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[441]][_0xd587[248]](_0x5c29x2);_0x5c29x2= null!= _0x5c29x3?_0x5c29x3[_0xd587[124]]:this[_0xd587[1705]](_0x5c29x2);return this[_0xd587[2625]]()&& 0!= _0x5c29x2[mxConstants[_0xd587[2626]]]};mxGraph[_0xd587[202]][_0xd587[2625]]= function(){return this[_0xd587[2371]]};mxGraph[_0xd587[202]][_0xd587[2627]]= function(_0x5c29x2){this[_0xd587[2371]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2628]]= function(_0x5c29x2){return !this[_0xd587[2612]](_0x5c29x2)&& (this[_0xd587[251]][_0xd587[250]](_0x5c29x2)&& this[_0xd587[2373]]|| this[_0xd587[251]][_0xd587[1193]](_0x5c29x2)&& this[_0xd587[2374]])};mxGraph[_0xd587[202]][_0xd587[2629]]= function(_0x5c29x2){return this[_0xd587[251]][_0xd587[1938]](_0x5c29x2,mxUtils[_0xd587[885]](this,function(_0x5c29x2){return this[_0xd587[1712]](_0x5c29x2)}))};mxGraph[_0xd587[202]][_0xd587[1712]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[441]][_0xd587[248]](_0x5c29x2),_0x5c29x3=null!= _0x5c29x3?_0x5c29x3[_0xd587[124]]:this[_0xd587[1705]](_0x5c29x2);return this[_0xd587[2630]]()&& !this[_0xd587[2612]](_0x5c29x2)&& 0!= _0x5c29x3[mxConstants[_0xd587[2631]]]};mxGraph[_0xd587[202]][_0xd587[2630]]= function(){return this[_0xd587[2372]]};mxGraph[_0xd587[202]][_0xd587[2632]]= function(_0x5c29x2){this[_0xd587[2372]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[997]]= function(){return this[_0xd587[991]]};mxGraph[_0xd587[202]][_0xd587[998]]= function(_0x5c29x2){this[_0xd587[991]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2549]]= function(){return this[_0xd587[2348]]};mxGraph[_0xd587[202]][_0xd587[2633]]= function(_0x5c29x2){this[_0xd587[2348]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2634]]= function(){return this[_0xd587[1020]]};mxGraph[_0xd587[202]][_0xd587[2635]]= function(_0x5c29x2){this[_0xd587[1020]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2636]]= function(){return this[_0xd587[2353]]};mxGraph[_0xd587[202]][_0xd587[2637]]= function(_0x5c29x2){this[_0xd587[2353]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2638]]= function(){return this[_0xd587[2374]]};mxGraph[_0xd587[202]][_0xd587[2639]]= function(_0x5c29x2){this[_0xd587[2374]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2640]]= function(){return this[_0xd587[2373]]};mxGraph[_0xd587[202]][_0xd587[2641]]= function(_0x5c29x2){this[_0xd587[2373]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2642]]= function(){return this[_0xd587[2412]]};mxGraph[_0xd587[202]][_0xd587[2643]]= function(_0x5c29x2){this[_0xd587[2412]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2460]]= function(){return this[_0xd587[2411]]};mxGraph[_0xd587[202]][_0xd587[2644]]= function(_0x5c29x2){this[_0xd587[2411]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2645]]= function(){return this[_0xd587[2404]]};mxGraph[_0xd587[202]][_0xd587[2646]]= function(_0x5c29x2){this[_0xd587[2404]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2647]]= function(){return this[_0xd587[2402]]};mxGraph[_0xd587[202]][_0xd587[2648]]= function(_0x5c29x2){this[_0xd587[2406]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2530]]= function(){return this[_0xd587[2406]]};mxGraph[_0xd587[202]][_0xd587[2649]]= function(_0x5c29x2){this[_0xd587[2405]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2650]]= function(){return this[_0xd587[2405]]};mxGraph[_0xd587[202]][_0xd587[2651]]= function(_0x5c29x2){this[_0xd587[2407]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2527]]= function(){return this[_0xd587[2407]]};mxGraph[_0xd587[202]][_0xd587[2652]]= function(_0x5c29x2){this[_0xd587[2402]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2529]]= function(){return this[_0xd587[2408]]};mxGraph[_0xd587[202]][_0xd587[2653]]= function(_0x5c29x2){this[_0xd587[2408]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[1015]]= function(){return this[_0xd587[2375]]};mxGraph[_0xd587[202]][_0xd587[2654]]= function(_0x5c29x2){this[_0xd587[2375]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2655]]= function(){return this[_0xd587[2376]]};mxGraph[_0xd587[202]][_0xd587[2656]]= function(_0x5c29x2){this[_0xd587[2376]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2657]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[441]][_0xd587[248]](_0x5c29x2),_0x5c29x3=null!= _0x5c29x3?_0x5c29x3[_0xd587[124]]:this[_0xd587[1705]](_0x5c29x2);return this[_0xd587[2658]]()&& !this[_0xd587[2612]](_0x5c29x2)&& 0!= _0x5c29x3[mxConstants[_0xd587[2659]]]};mxGraph[_0xd587[202]][_0xd587[2658]]= function(){return this[_0xd587[2377]]};mxGraph[_0xd587[202]][_0xd587[2660]]= function(_0x5c29x2){this[_0xd587[2377]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2661]]= function(_0x5c29x2,_0x5c29x3){return !0};mxGraph[_0xd587[202]][_0xd587[2662]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[441]][_0xd587[248]](_0x5c29x2),_0x5c29x3=null!= _0x5c29x3?_0x5c29x3[_0xd587[124]]:this[_0xd587[1705]](_0x5c29x2);return this[_0xd587[2663]]()&& !this[_0xd587[2612]](_0x5c29x2)&& 0!= _0x5c29x3[mxConstants[_0xd587[2664]]]};mxGraph[_0xd587[202]][_0xd587[2663]]= function(){return this[_0xd587[2378]]};mxGraph[_0xd587[202]][_0xd587[2665]]= function(_0x5c29x2){this[_0xd587[2378]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2453]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[441]][_0xd587[248]](_0x5c29x2),_0x5c29x3=null!= _0x5c29x3?_0x5c29x3[_0xd587[124]]:this[_0xd587[1705]](_0x5c29x2);return this[_0xd587[2666]]()&& !this[_0xd587[2612]](_0x5c29x2)&& 0!= _0x5c29x3[mxConstants[_0xd587[2667]]]};mxGraph[_0xd587[202]][_0xd587[2666]]= function(){return this[_0xd587[2370]]};mxGraph[_0xd587[202]][_0xd587[2668]]= function(_0x5c29x2){this[_0xd587[2370]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2551]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return this[_0xd587[2669]]()&& !this[_0xd587[2612]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2669]]= function(){return this[_0xd587[2380]]};mxGraph[_0xd587[202]][_0xd587[2670]]= function(_0x5c29x2){this[_0xd587[2380]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2671]]= function(_0x5c29x2){return null== _0x5c29x2&& this[_0xd587[2406]]|| null!= _0x5c29x2&& (!this[_0xd587[251]][_0xd587[250]](_0x5c29x2)|| this[_0xd587[2405]])&& this[_0xd587[2565]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2672]]= function(_0x5c29x2){return this[_0xd587[2671]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2582]]= function(_0x5c29x2,_0x5c29x3){return this[_0xd587[2671]](_0x5c29x2)&& this[_0xd587[2672]](_0x5c29x3)};mxGraph[_0xd587[202]][_0xd587[1995]]= function(_0x5c29x2){this[_0xd587[2433]][_0xd587[995]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[1965]]= function(_0x5c29x2){return this[_0xd587[2433]][_0xd587[994]]()};mxGraph[_0xd587[202]][_0xd587[2673]]= function(_0x5c29x2){this[_0xd587[2276]][_0xd587[995]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2674]]= function(_0x5c29x2){this[_0xd587[2316]][_0xd587[2431]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2203]]= function(_0x5c29x2){if(null!= this[_0xd587[2347]]){var _0x5c29x3=this[_0xd587[2347]][_0xd587[2148]]();return null== _0x5c29x2?null!= _0x5c29x3:_0x5c29x2== _0x5c29x3};return !1};mxGraph[_0xd587[202]][_0xd587[2455]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[441]][_0xd587[248]](_0x5c29x2);_0x5c29x2= null!= _0x5c29x3?_0x5c29x3[_0xd587[124]]:this[_0xd587[1705]](_0x5c29x2);return this[_0xd587[2675]]()|| 1== _0x5c29x2[mxConstants[_0xd587[2676]]]};mxGraph[_0xd587[202]][_0xd587[2675]]= function(){return this[_0xd587[2381]]};mxGraph[_0xd587[202]][_0xd587[2677]]= function(_0x5c29x2){this[_0xd587[2381]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2507]]= function(_0x5c29x2){return !this[_0xd587[502]]()[_0xd587[250]](_0x5c29x2)&& this[_0xd587[2678]]()};mxGraph[_0xd587[202]][_0xd587[2678]]= function(){return this[_0xd587[2392]]};mxGraph[_0xd587[202]][_0xd587[2679]]= function(_0x5c29x2){this[_0xd587[2392]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2506]]= function(){return this[_0xd587[2393]]};mxGraph[_0xd587[202]][_0xd587[2680]]= function(_0x5c29x2){this[_0xd587[2393]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2536]]= function(_0x5c29x2){return this[_0xd587[2681]]()&& !this[_0xd587[502]]()[_0xd587[250]](this[_0xd587[502]]()[_0xd587[1197]](_0x5c29x2))};mxGraph[_0xd587[202]][_0xd587[2681]]= function(){return this[_0xd587[2391]]};mxGraph[_0xd587[202]][_0xd587[2682]]= function(_0x5c29x2){this[_0xd587[2391]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2505]]= function(){return this[_0xd587[2390]]};mxGraph[_0xd587[202]][_0xd587[2528]]= function(_0x5c29x2){this[_0xd587[2390]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2537]]= function(_0x5c29x2){return this[_0xd587[2683]](_0x5c29x2)?this[_0xd587[2354]]:0};mxGraph[_0xd587[202]][_0xd587[2683]]= function(_0x5c29x2){return !1};mxGraph[_0xd587[202]][_0xd587[2513]]= function(_0x5c29x2,_0x5c29x3){return this[_0xd587[251]][_0xd587[1938]](_0x5c29x2,mxUtils[_0xd587[885]](this,function(_0x5c29x2){return this[_0xd587[2516]](_0x5c29x2,_0x5c29x3)}))};mxGraph[_0xd587[202]][_0xd587[2516]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[441]][_0xd587[248]](_0x5c29x2),_0x5c29x4=null!= _0x5c29x4?_0x5c29x4[_0xd587[124]]:this[_0xd587[1705]](_0x5c29x2);return 0< this[_0xd587[251]][_0xd587[262]](_0x5c29x2)&& 0!= _0x5c29x4[mxConstants[_0xd587[2684]]]};mxGraph[_0xd587[202]][_0xd587[2685]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return null!= _0x5c29x2&& (this[_0xd587[2655]]()&& this[_0xd587[2686]](_0x5c29x2,_0x5c29x3,_0x5c29x4)|| !this[_0xd587[251]][_0xd587[250]](_0x5c29x2)&& (this[_0xd587[1730]](_0x5c29x2)|| 0< this[_0xd587[251]][_0xd587[262]](_0x5c29x2)&& !this[_0xd587[1742]](_0x5c29x2)))};mxGraph[_0xd587[202]][_0xd587[2686]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return this[_0xd587[251]][_0xd587[250]](_0x5c29x2)&& null!= _0x5c29x3&& 1== _0x5c29x3[_0xd587[67]]&& this[_0xd587[2565]](_0x5c29x3[0])&& null== this[_0xd587[2500]](_0x5c29x2,this[_0xd587[251]][_0xd587[1709]](_0x5c29x2,!0),_0x5c29x3[0])?(_0x5c29x4= this[_0xd587[251]][_0xd587[1709]](_0x5c29x2,!0),_0x5c29x2= this[_0xd587[251]][_0xd587[1709]](_0x5c29x2,!1),!this[_0xd587[251]][_0xd587[1720]](_0x5c29x3[0],_0x5c29x4)&& !this[_0xd587[251]][_0xd587[1720]](_0x5c29x3[0],_0x5c29x2)):!1};mxGraph[_0xd587[202]][_0xd587[564]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){if(!this[_0xd587[2642]]()){for(var _0x5c29x5=0;_0x5c29x5< _0x5c29x2[_0xd587[67]];_0x5c29x5++){if(this[_0xd587[1730]](_0x5c29x2[_0x5c29x5])){return null}}};_0x5c29x5= mxUtils[_0xd587[2196]](this[_0xd587[526]],mxEvent[_0xd587[731]](_0x5c29x3),mxEvent[_0xd587[733]](_0x5c29x3));_0x5c29x5[_0xd587[235]]-= this[_0xd587[1136]];_0x5c29x5[_0xd587[236]]-= this[_0xd587[1137]];_0x5c29x5= this[_0xd587[2461]](_0x5c29x5[_0xd587[235]],_0x5c29x5[_0xd587[236]]);if(null== _0x5c29x4){_0x5c29x4= _0x5c29x5}else {if(null!= _0x5c29x5){for(var _0x5c29x9=this[_0xd587[251]][_0xd587[1197]](_0x5c29x5);null!= _0x5c29x9&& this[_0xd587[1730]](_0x5c29x9)&& _0x5c29x9!= _0x5c29x4;){_0x5c29x9= this[_0xd587[251]][_0xd587[1197]](_0x5c29x9)};_0x5c29x9== _0x5c29x4&& (_0x5c29x4= _0x5c29x5)}};for(;null!= _0x5c29x4&& !this[_0xd587[2685]](_0x5c29x4,_0x5c29x2,_0x5c29x3)&& !this[_0xd587[251]][_0xd587[1740]](_0x5c29x4);){_0x5c29x4= this[_0xd587[251]][_0xd587[1197]](_0x5c29x4)};return !this[_0xd587[251]][_0xd587[1740]](_0x5c29x4)&& 0> mxUtils[_0xd587[2]](_0x5c29x2,_0x5c29x4)?_0x5c29x4:null};mxGraph[_0xd587[202]][_0xd587[902]]= function(){var _0x5c29x2=this[_0xd587[2355]];null== _0x5c29x2&& (_0x5c29x2= this[_0xd587[2534]](),null== _0x5c29x2&& (_0x5c29x2= this[_0xd587[251]][_0xd587[501]](),_0x5c29x2= this[_0xd587[251]][_0xd587[263]](_0x5c29x2,0)));return _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2687]]= function(_0x5c29x2){this[_0xd587[2355]]= _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2179]]= function(_0x5c29x2){for(;null!= _0x5c29x2&& !this[_0xd587[1730]](_0x5c29x2);){_0x5c29x2= this[_0xd587[251]][_0xd587[1197]](_0x5c29x2)};return _0x5c29x2};mxGraph[_0xd587[202]][_0xd587[2461]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x4= _0x5c29x4|| this[_0xd587[902]]();if(null!= _0x5c29x4){for(var _0x5c29x5=this[_0xd587[251]][_0xd587[262]](_0x5c29x4),_0x5c29x9=0;_0x5c29x9< _0x5c29x5;_0x5c29x9++){var _0x5c29xa=this[_0xd587[251]][_0xd587[263]](_0x5c29x4,_0x5c29x9),_0x5c29x12=this[_0xd587[2461]](_0x5c29x2,_0x5c29x3,_0x5c29xa);if(null!= _0x5c29x12){return _0x5c29x12};if(this[_0xd587[1730]](_0x5c29xa)&& (_0x5c29x12= this[_0xd587[441]][_0xd587[248]](_0x5c29xa),this[_0xd587[1825]](_0x5c29x12,_0x5c29x2,_0x5c29x3))){return _0x5c29xa}}};return null};mxGraph[_0xd587[202]][_0xd587[999]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x5= null!= _0x5c29x5?_0x5c29x5:!0;_0x5c29x9= null!= _0x5c29x9?_0x5c29x9:!0;_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:this[_0xd587[902]]();if(null!= _0x5c29x4){for(var _0x5c29xa=this[_0xd587[251]][_0xd587[262]](_0x5c29x4)- 1;0<= _0x5c29xa;_0x5c29xa--){var _0x5c29x12=this[_0xd587[251]][_0xd587[263]](_0x5c29x4,_0x5c29xa),_0x5c29x13=this[_0xd587[999]](_0x5c29x2,_0x5c29x3,_0x5c29x12,_0x5c29x5,_0x5c29x9);if(null!= _0x5c29x13){return _0x5c29x13};if(this[_0xd587[1714]](_0x5c29x12)&& (_0x5c29x9&& this[_0xd587[251]][_0xd587[250]](_0x5c29x12)|| _0x5c29x5&& this[_0xd587[251]][_0xd587[1193]](_0x5c29x12))){if(_0x5c29x13= this[_0xd587[441]][_0xd587[248]](_0x5c29x12),this[_0xd587[1825]](_0x5c29x13,_0x5c29x2,_0x5c29x3)){return _0x5c29x12}}}};return null};mxGraph[_0xd587[202]][_0xd587[1825]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){if(null!= _0x5c29x2){var _0x5c29x5=_0x5c29x2[_0xd587[439]];if(null!= _0x5c29x5){_0x5c29x2= this[_0xd587[2353]]* this[_0xd587[2353]];for(var _0x5c29x9=_0x5c29x5[0],_0x5c29xa=1;_0x5c29xa< _0x5c29x5[_0xd587[67]];_0x5c29xa++){var _0x5c29x12=_0x5c29x5[_0x5c29xa];if(mxUtils[_0xd587[440]](_0x5c29x9[_0xd587[235]],_0x5c29x9[_0xd587[236]],_0x5c29x12[_0xd587[235]],_0x5c29x12[_0xd587[236]],_0x5c29x3,_0x5c29x4)<= _0x5c29x2){return !0};_0x5c29x9= _0x5c29x12}}else {if(_0x5c29x9= mxUtils[_0xd587[431]](mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_ROTATION)|| 0),0!= _0x5c29x9&& (_0x5c29x5= Math[_0xd587[426]](-_0x5c29x9),_0x5c29x9= Math[_0xd587[427]](-_0x5c29x9),_0x5c29xa=  new mxPoint(_0x5c29x2[_0xd587[241]](),_0x5c29x2[_0xd587[242]]()),_0x5c29x9= mxUtils[_0xd587[432]]( new mxPoint(_0x5c29x3,_0x5c29x4),_0x5c29x5,_0x5c29x9,_0x5c29xa),_0x5c29x3= _0x5c29x9[_0xd587[235]],_0x5c29x4= _0x5c29x9[_0xd587[236]]),mxUtils[_0xd587[442]](_0x5c29x2,_0x5c29x3,_0x5c29x4)){return !0}}};return !1};mxGraph[_0xd587[202]][_0xd587[2688]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[249]]()[_0xd587[248]](_0x5c29x2);_0x5c29x2= this[_0xd587[1731]](_0x5c29x2);if(null!= _0x5c29x5){var _0x5c29x9=this[_0xd587[249]]()[_0xd587[518]]();_0x5c29x3-= _0x5c29x5[_0xd587[235]];_0x5c29x4-= _0x5c29x5[_0xd587[236]];if(0< _0x5c29x2[_0xd587[117]]&& 0< _0x5c29x3&& _0x5c29x3> _0x5c29x2[_0xd587[117]]* _0x5c29x9|| 0< _0x5c29x2[_0xd587[119]]&& 0< _0x5c29x4&& _0x5c29x4> _0x5c29x2[_0xd587[119]]* _0x5c29x9){return !0}};return !1};mxGraph[_0xd587[202]][_0xd587[1728]]= function(_0x5c29x2){return this[_0xd587[1955]](_0x5c29x2,!0,!1)};mxGraph[_0xd587[202]][_0xd587[1956]]= function(_0x5c29x2){return this[_0xd587[1955]](_0x5c29x2,!1,!0)};mxGraph[_0xd587[202]][_0xd587[1955]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x2= null!= _0x5c29x2?_0x5c29x2:this[_0xd587[902]]();_0x5c29x2= this[_0xd587[251]][_0xd587[1955]](_0x5c29x2,null!= _0x5c29x3?_0x5c29x3:!1,null!= _0x5c29x4?_0x5c29x4:!1);_0x5c29x3= [];for(_0x5c29x4= 0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){this[_0xd587[1714]](_0x5c29x2[_0x5c29x4])&& _0x5c29x3[_0xd587[207]](_0x5c29x2[_0x5c29x4])};return _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[1756]]= function(_0x5c29x2,_0x5c29x3){return this[_0xd587[264]](_0x5c29x2,_0x5c29x3,!0,!0,!1)};mxGraph[_0xd587[202]][_0xd587[1867]]= function(_0x5c29x2,_0x5c29x3){return this[_0xd587[264]](_0x5c29x2,_0x5c29x3,!0,!1,!1)};mxGraph[_0xd587[202]][_0xd587[1963]]= function(_0x5c29x2,_0x5c29x3){return this[_0xd587[264]](_0x5c29x2,_0x5c29x3,!1,!0,!1)};mxGraph[_0xd587[202]][_0xd587[264]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:!0;_0x5c29x5= null!= _0x5c29x5?_0x5c29x5:!0;_0x5c29x9= null!= _0x5c29x9?_0x5c29x9:!0;_0x5c29xa= null!= _0x5c29xa?_0x5c29xa:!1;for(var _0x5c29x12=[],_0x5c29x13=this[_0xd587[1742]](_0x5c29x2),_0x5c29x14=this[_0xd587[251]][_0xd587[262]](_0x5c29x2),_0x5c29x15=0;_0x5c29x15< _0x5c29x14;_0x5c29x15++){var _0x5c29x16=this[_0xd587[251]][_0xd587[263]](_0x5c29x2,_0x5c29x15);if(_0x5c29x13|| !this[_0xd587[1714]](_0x5c29x16)){_0x5c29x12= _0x5c29x12[_0xd587[1919]](this[_0xd587[251]][_0xd587[264]](_0x5c29x16,_0x5c29x4,_0x5c29x5))}};_0x5c29x12= _0x5c29x12[_0xd587[1919]](this[_0xd587[251]][_0xd587[264]](_0x5c29x2,_0x5c29x4,_0x5c29x5));_0x5c29x13= [];for(_0x5c29x15= 0;_0x5c29x15< _0x5c29x12[_0xd587[67]];_0x5c29x15++){_0x5c29x16= this[_0xd587[441]][_0xd587[248]](_0x5c29x12[_0x5c29x15]),_0x5c29x14= null!= _0x5c29x16?_0x5c29x16[_0xd587[1710]](!0):this[_0xd587[441]][_0xd587[1710]](_0x5c29x12[_0x5c29x15],!0),_0x5c29x16= null!= _0x5c29x16?_0x5c29x16[_0xd587[1710]](!1):this[_0xd587[441]][_0xd587[1710]](_0x5c29x12[_0x5c29x15],!1),(_0x5c29x9&& _0x5c29x14== _0x5c29x16|| _0x5c29x14!= _0x5c29x16&& (_0x5c29x4&& _0x5c29x16== _0x5c29x2&& (null== _0x5c29x3|| this[_0xd587[1920]](_0x5c29x14,_0x5c29x3,_0x5c29xa))|| _0x5c29x5&& _0x5c29x14== _0x5c29x2&& (null== _0x5c29x3|| this[_0xd587[1920]](_0x5c29x16,_0x5c29x3,_0x5c29xa))))&& _0x5c29x13[_0xd587[207]](_0x5c29x12[_0x5c29x15])};return _0x5c29x13};mxGraph[_0xd587[202]][_0xd587[1920]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return _0x5c29x4?this[_0xd587[251]][_0xd587[1720]](_0x5c29x3,_0x5c29x2):this[_0xd587[251]][_0xd587[1197]](_0x5c29x2)== _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[1808]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:!0;_0x5c29x5= null!= _0x5c29x5?_0x5c29x5:!0;var _0x5c29x9=[],_0x5c29xa={};if(null!= _0x5c29x2){for(var _0x5c29x12=0;_0x5c29x12< _0x5c29x2[_0xd587[67]];_0x5c29x12++){var _0x5c29x13=this[_0xd587[441]][_0xd587[248]](_0x5c29x2[_0x5c29x12]),_0x5c29x14=null!= _0x5c29x13?_0x5c29x13[_0xd587[1710]](!0):this[_0xd587[441]][_0xd587[1710]](_0x5c29x2[_0x5c29x12],!0),_0x5c29x13=null!= _0x5c29x13?_0x5c29x13[_0xd587[1710]](!1):this[_0xd587[441]][_0xd587[1710]](_0x5c29x2[_0x5c29x12],!1);if(_0x5c29x14== _0x5c29x3&& null!= _0x5c29x13&& _0x5c29x13!= _0x5c29x3&& _0x5c29x5){var _0x5c29x15=mxCellPath[_0xd587[385]](_0x5c29x13);null== _0x5c29xa[_0x5c29x15]&& (_0x5c29xa[_0x5c29x15]= _0x5c29x13,_0x5c29x9[_0xd587[207]](_0x5c29x13))}else {_0x5c29x13== _0x5c29x3&& (null!= _0x5c29x14&& _0x5c29x14!= _0x5c29x3&& _0x5c29x4)&& (_0x5c29x15= mxCellPath[_0xd587[385]](_0x5c29x14),null== _0x5c29xa[_0x5c29x15]&& (_0x5c29xa[_0x5c29x15]= _0x5c29x14,_0x5c29x9[_0xd587[207]](_0x5c29x14)))}}};return _0x5c29x9};mxGraph[_0xd587[202]][_0xd587[1781]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:!1;for(var _0x5c29x5=this[_0xd587[264]](_0x5c29x2),_0x5c29x9=[],_0x5c29xa=0;_0x5c29xa< _0x5c29x5[_0xd587[67]];_0x5c29xa++){var _0x5c29x12=this[_0xd587[441]][_0xd587[248]](_0x5c29x5[_0x5c29xa]),_0x5c29x13=null!= _0x5c29x12?_0x5c29x12[_0xd587[1710]](!0):this[_0xd587[441]][_0xd587[1710]](_0x5c29x5[_0x5c29xa],!0),_0x5c29x12=null!= _0x5c29x12?_0x5c29x12[_0xd587[1710]](!1):this[_0xd587[441]][_0xd587[1710]](_0x5c29x5[_0x5c29xa],!1);(_0x5c29x13== _0x5c29x2&& _0x5c29x12== _0x5c29x3|| !_0x5c29x4&& _0x5c29x13== _0x5c29x3&& _0x5c29x12== _0x5c29x2)&& _0x5c29x9[_0xd587[207]](_0x5c29x5[_0x5c29xa])};return _0x5c29x9};mxGraph[_0xd587[202]][_0xd587[2689]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=mxUtils[_0xd587[2196]](this[_0xd587[526]],mxEvent[_0xd587[731]](_0x5c29x2),mxEvent[_0xd587[733]](_0x5c29x2)),_0x5c29x5=this[_0xd587[441]][_0xd587[255]],_0x5c29x9=this[_0xd587[441]][_0xd587[513]],_0x5c29xa=!1!= _0x5c29x3?this[_0xd587[1020]]/ 2:0;_0x5c29x4[_0xd587[235]]= this[_0xd587[1021]](_0x5c29x4[_0xd587[235]]/ _0x5c29x5- _0x5c29x9[_0xd587[235]]- _0x5c29xa);_0x5c29x4[_0xd587[236]]= this[_0xd587[1021]](_0x5c29x4[_0xd587[236]]/ _0x5c29x5- _0x5c29x9[_0xd587[236]]- _0x5c29xa);return _0x5c29x4};mxGraph[_0xd587[202]][_0xd587[2690]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){_0x5c29xa= null!= _0x5c29xa?_0x5c29xa:[];if(0< _0x5c29x4|| 0< _0x5c29x5){var _0x5c29x12=_0x5c29x2+ _0x5c29x4,_0x5c29x13=_0x5c29x3+ _0x5c29x5;_0x5c29x9= _0x5c29x9|| this[_0xd587[902]]();if(null!= _0x5c29x9){for(var _0x5c29x14=this[_0xd587[251]][_0xd587[262]](_0x5c29x9),_0x5c29x15=0;_0x5c29x15< _0x5c29x14;_0x5c29x15++){var _0x5c29x16=this[_0xd587[251]][_0xd587[263]](_0x5c29x9,_0x5c29x15),_0x5c29x17=this[_0xd587[441]][_0xd587[248]](_0x5c29x16);if(this[_0xd587[1714]](_0x5c29x16)&& null!= _0x5c29x17){var _0x5c29x18=_0x5c29x17,_0x5c29x17=mxUtils[_0xd587[433]](_0x5c29x17[_0xd587[124]],mxConstants.STYLE_ROTATION)|| 0;0!= _0x5c29x17&& (_0x5c29x18= mxUtils[_0xd587[1613]](_0x5c29x18,_0x5c29x17));_0x5c29x18[_0xd587[235]]>= _0x5c29x2&& _0x5c29x18[_0xd587[236]]+ _0x5c29x18[_0xd587[119]]<= _0x5c29x13&& _0x5c29x18[_0xd587[236]]>= _0x5c29x3&& _0x5c29x18[_0xd587[235]]+ _0x5c29x18[_0xd587[117]]<= _0x5c29x12?_0x5c29xa[_0xd587[207]](_0x5c29x16):this[_0xd587[2690]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x16,_0x5c29xa)}}}};return _0x5c29xa};mxGraph[_0xd587[202]][_0xd587[2691]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=[];if(_0x5c29x5|| _0x5c29x9){if(null== _0x5c29x4&& (_0x5c29x4= this[_0xd587[902]]()),null!= _0x5c29x4){for(var _0x5c29x12=this[_0xd587[251]][_0xd587[262]](_0x5c29x4),_0x5c29x13=0;_0x5c29x13< _0x5c29x12;_0x5c29x13++){var _0x5c29x14=this[_0xd587[251]][_0xd587[263]](_0x5c29x4,_0x5c29x13),_0x5c29x15=this[_0xd587[441]][_0xd587[248]](_0x5c29x14);this[_0xd587[1714]](_0x5c29x14)&& null!= _0x5c29x15&& (!_0x5c29x5|| _0x5c29x15[_0xd587[235]]>= _0x5c29x2) && (!_0x5c29x9|| _0x5c29x15[_0xd587[236]]>= _0x5c29x3) && _0x5c29xa[_0xd587[207]](_0x5c29x14)}}};return _0x5c29xa};mxGraph[_0xd587[202]][_0xd587[1757]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:!1;_0x5c29x4= null!= _0x5c29x4?_0x5c29x4:!1;var _0x5c29x5=[];if(null!= _0x5c29x2){for(var _0x5c29x9=this[_0xd587[502]](),_0x5c29xa=_0x5c29x9[_0xd587[262]](_0x5c29x2),_0x5c29x12=null,_0x5c29x13=0,_0x5c29x14=0;_0x5c29x14< _0x5c29xa;_0x5c29x14++){var _0x5c29x15=_0x5c29x9[_0xd587[263]](_0x5c29x2,_0x5c29x14);if(this[_0xd587[251]][_0xd587[1193]](_0x5c29x15)&& this[_0xd587[1714]](_0x5c29x15)){for(var _0x5c29x16=this[_0xd587[1756]](_0x5c29x15,_0x5c29x3?_0x5c29x2:null),_0x5c29x17=0,_0x5c29x18=0,_0x5c29x19=0;_0x5c29x19< _0x5c29x16[_0xd587[67]];_0x5c29x19++){this[_0xd587[441]][_0xd587[1710]](_0x5c29x16[_0x5c29x19],!0)== _0x5c29x15?_0x5c29x17++:_0x5c29x18++};(_0x5c29x4&& 0== _0x5c29x17&& 0< _0x5c29x18|| !_0x5c29x4&& 0== _0x5c29x18&& 0< _0x5c29x17)&& _0x5c29x5[_0xd587[207]](_0x5c29x15);_0x5c29x16= _0x5c29x4?_0x5c29x18- _0x5c29x17:_0x5c29x17- _0x5c29x18;_0x5c29x16> _0x5c29x13&& (_0x5c29x13= _0x5c29x16,_0x5c29x12= _0x5c29x15)}};0== _0x5c29x5[_0xd587[67]]&& null!= _0x5c29x12&& _0x5c29x5[_0xd587[207]](_0x5c29x12)};return _0x5c29x5};mxGraph[_0xd587[202]][_0xd587[1706]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){if(null!= _0x5c29x4&& null!= _0x5c29x2){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:!0;_0x5c29x9= _0x5c29x9|| [];var _0x5c29xa=mxCellPath[_0xd587[385]](_0x5c29x2);if(null== _0x5c29x9[_0x5c29xa]&& (_0x5c29x9[_0x5c29xa]= _0x5c29x2,_0x5c29x5= _0x5c29x4(_0x5c29x2,_0x5c29x5),null== _0x5c29x5|| _0x5c29x5)){if(_0x5c29x5= this[_0xd587[251]][_0xd587[1707]](_0x5c29x2),0< _0x5c29x5){for(_0x5c29xa= 0;_0x5c29xa< _0x5c29x5;_0x5c29xa++){var _0x5c29x12=this[_0xd587[251]][_0xd587[1708]](_0x5c29x2,_0x5c29xa),_0x5c29x13=this[_0xd587[251]][_0xd587[1709]](_0x5c29x12,!0)== _0x5c29x2;if(!_0x5c29x3|| _0x5c29x13){_0x5c29x13= this[_0xd587[251]][_0xd587[1709]](_0x5c29x12,!_0x5c29x13),this[_0xd587[1706]](_0x5c29x13,_0x5c29x3,_0x5c29x4,_0x5c29x12,_0x5c29x9)}}}}}};mxGraph[_0xd587[202]][_0xd587[2692]]= function(_0x5c29x2){return this[_0xd587[2435]]()[_0xd587[2097]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2693]]= function(){return this[_0xd587[2435]]()[_0xd587[1107]]()};mxGraph[_0xd587[202]][_0xd587[2440]]= function(){return this[_0xd587[2435]]()[_0xd587[200]]()};mxGraph[_0xd587[202]][_0xd587[2694]]= function(){return this[_0xd587[2435]]()[_0xd587[895]][_0xd587[67]]};mxGraph[_0xd587[202]][_0xd587[2452]]= function(){return this[_0xd587[2435]]()[_0xd587[895]][0]};mxGraph[_0xd587[202]][_0xd587[897]]= function(){return this[_0xd587[2435]]()[_0xd587[895]][_0xd587[1853]]()};mxGraph[_0xd587[202]][_0xd587[2450]]= function(_0x5c29x2){this[_0xd587[2435]]()[_0xd587[2099]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[904]]= function(_0x5c29x2){this[_0xd587[2435]]()[_0xd587[2100]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2695]]= function(_0x5c29x2){this[_0xd587[2435]]()[_0xd587[2103]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2696]]= function(_0x5c29x2){this[_0xd587[2435]]()[_0xd587[832]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2697]]= function(_0x5c29x2){this[_0xd587[2435]]()[_0xd587[2104]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2439]]= function(_0x5c29x2){this[_0xd587[2435]]()[_0xd587[842]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2698]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[2690]](_0x5c29x2[_0xd587[235]],_0x5c29x2[_0xd587[236]],_0x5c29x2[_0xd587[117]],_0x5c29x2[_0xd587[119]]);this[_0xd587[2699]](_0x5c29x4,_0x5c29x3);return _0x5c29x4};mxGraph[_0xd587[202]][_0xd587[2700]]= function(){this[_0xd587[2701]](!0)};mxGraph[_0xd587[202]][_0xd587[2702]]= function(){this[_0xd587[2701]]()};mxGraph[_0xd587[202]][_0xd587[2703]]= function(){this[_0xd587[2701]](!1,!0)};mxGraph[_0xd587[202]][_0xd587[2704]]= function(){this[_0xd587[2701]](!1,!1,!0)};mxGraph[_0xd587[202]][_0xd587[2701]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[2105]],_0x5c29x9=0< _0x5c29x5[_0xd587[895]][_0xd587[67]]?_0x5c29x5[_0xd587[895]][0]:null;1< _0x5c29x5[_0xd587[895]][_0xd587[67]]&& _0x5c29x5[_0xd587[200]]();var _0x5c29x5=null!= _0x5c29x9?this[_0xd587[251]][_0xd587[1197]](_0x5c29x9):this[_0xd587[902]](),_0x5c29xa=this[_0xd587[251]][_0xd587[262]](_0x5c29x5);null== _0x5c29x9&& 0< _0x5c29xa?(_0x5c29x2= this[_0xd587[251]][_0xd587[263]](_0x5c29x5,0),this[_0xd587[2450]](_0x5c29x2)):(null== _0x5c29x9|| _0x5c29x3)&& null!= this[_0xd587[441]][_0xd587[248]](_0x5c29x5)&& null!= this[_0xd587[251]][_0xd587[1721]](_0x5c29x5)?this[_0xd587[2534]]()!= _0x5c29x5&& this[_0xd587[2450]](_0x5c29x5):null!= _0x5c29x9&& _0x5c29x4?0< this[_0xd587[251]][_0xd587[262]](_0x5c29x9)&& (_0x5c29x2= this[_0xd587[251]][_0xd587[263]](_0x5c29x9,0),this[_0xd587[2450]](_0x5c29x2)):0< _0x5c29xa&& (_0x5c29x3= _0x5c29x5[_0xd587[1738]](_0x5c29x9),_0x5c29x2?(_0x5c29x3++,_0x5c29x2= this[_0xd587[251]][_0xd587[263]](_0x5c29x5,_0x5c29x3% _0x5c29xa)):(_0x5c29x3--,_0x5c29x2= this[_0xd587[251]][_0xd587[263]](_0x5c29x5,0> _0x5c29x3?_0x5c29xa- 1:_0x5c29x3)),this[_0xd587[2450]](_0x5c29x2))};mxGraph[_0xd587[202]][_0xd587[2705]]= function(_0x5c29x2){_0x5c29x2= _0x5c29x2|| this[_0xd587[902]]();_0x5c29x2= this[_0xd587[251]][_0xd587[1953]](_0x5c29x2);null!= _0x5c29x2&& this[_0xd587[904]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2706]]= function(_0x5c29x2){this[_0xd587[2707]](!0,!1,_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2708]]= function(_0x5c29x2){this[_0xd587[2707]](!1,!0,_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2707]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x4= _0x5c29x4|| this[_0xd587[902]]();var _0x5c29x5=mxUtils[_0xd587[885]](this,function(_0x5c29x4){return null!= this[_0xd587[441]][_0xd587[248]](_0x5c29x4)&& 0== this[_0xd587[251]][_0xd587[262]](_0x5c29x4)&& (this[_0xd587[251]][_0xd587[1193]](_0x5c29x4)&& _0x5c29x2|| this[_0xd587[251]][_0xd587[250]](_0x5c29x4)&& _0x5c29x3)});_0x5c29x4= this[_0xd587[251]][_0xd587[1921]](_0x5c29x5,_0x5c29x4);this[_0xd587[904]](_0x5c29x4)};mxGraph[_0xd587[202]][_0xd587[2459]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[2692]](_0x5c29x2);this[_0xd587[2462]](_0x5c29x3)?_0x5c29x4?this[_0xd587[2697]](_0x5c29x2):this[_0xd587[2695]](_0x5c29x2):(!_0x5c29x4|| 1!= this[_0xd587[2694]]()) && this[_0xd587[2450]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2699]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[2462]](_0x5c29x3)?this[_0xd587[2696]](_0x5c29x2):this[_0xd587[904]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[2709]]= function(_0x5c29x2){var _0x5c29x3=null;null!= _0x5c29x2&& (this[_0xd587[251]][_0xd587[250]](_0x5c29x2[_0xd587[246]])?(_0x5c29x3= this[_0xd587[441]][_0xd587[2291]](_0x5c29x2),_0x5c29x3= this[_0xd587[2573]](_0x5c29x2)|| _0x5c29x3== mxEdgeStyle[_0xd587[2568]]|| _0x5c29x3== mxEdgeStyle[_0xd587[2569]]|| _0x5c29x3== mxEdgeStyle[_0xd587[2570]]? new mxElbowEdgeHandler(_0x5c29x2):_0x5c29x3== mxEdgeStyle[_0xd587[2567]]|| _0x5c29x3== mxEdgeStyle[_0xd587[2572]]? new mxEdgeSegmentHandler(_0x5c29x2): new mxEdgeHandler(_0x5c29x2)):_0x5c29x3=  new mxVertexHandler(_0x5c29x2));return _0x5c29x3};mxGraph[_0xd587[202]][_0xd587[1133]]= function(_0x5c29x2){null== this[_0xd587[2329]]&& (this[_0xd587[2329]]= []);this[_0xd587[2329]][_0xd587[207]](_0x5c29x2)};mxGraph[_0xd587[202]][_0xd587[1148]]= function(_0x5c29x2){if(null!= this[_0xd587[2329]]){for(var _0x5c29x3=0;_0x5c29x3< this[_0xd587[2329]][_0xd587[67]];_0x5c29x3++){if(this[_0xd587[2329]][_0x5c29x3]== _0x5c29x2){this[_0xd587[2329]][_0xd587[300]](_0x5c29x3,1);break}}}};mxGraph[_0xd587[202]][_0xd587[2710]]= function(_0x5c29x2){if(null== _0x5c29x2[_0xd587[725]]|| null== _0x5c29x2[_0xd587[726]]){var _0x5c29x3=mxUtils[_0xd587[2196]](this[_0xd587[526]],_0x5c29x2[_0xd587[730]](),_0x5c29x2[_0xd587[732]]());_0x5c29x2[_0xd587[725]]= _0x5c29x3[_0xd587[235]]- this[_0xd587[1136]];_0x5c29x2[_0xd587[726]]= _0x5c29x3[_0xd587[236]]- this[_0xd587[1137]]}};mxGraph[_0xd587[202]][_0xd587[758]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){null== _0x5c29x4&& (_0x5c29x4= this);this[_0xd587[2710]](_0x5c29x3);_0x5c29x2== mxEvent[_0xd587[2711]]&& (this[_0xd587[1009]]=  !0);if(mxClient[_0xd587[754]]&& this[_0xd587[2349]]&& _0x5c29x2== mxEvent[_0xd587[2711]]){var _0x5c29x5=( new Date)[_0xd587[178]]();_0x5c29x5- this[_0xd587[2213]]< this[_0xd587[2350]]&& Math[_0xd587[425]](this[_0xd587[2712]]- _0x5c29x3[_0xd587[730]]())< this[_0xd587[2351]]&& Math[_0xd587[425]](this[_0xd587[2352]]- _0x5c29x3[_0xd587[732]]())< this[_0xd587[2351]]?(this[_0xd587[2213]]= 0,this[_0xd587[761]](_0x5c29x3[_0xd587[727]](),_0x5c29x3[_0xd587[736]]()),_0x5c29x3[_0xd587[727]]()[_0xd587[786]]=  !0):(this[_0xd587[2712]]= _0x5c29x3[_0xd587[730]](),this[_0xd587[2352]]= _0x5c29x3[_0xd587[732]](),this[_0xd587[2213]]= _0x5c29x5)};_0x5c29x5= 2!= _0x5c29x3[_0xd587[727]]()[_0xd587[764]];if(mxClient[_0xd587[80]]&& _0xd587[462]== document[_0xd587[135]]){if(null!= this[_0xd587[2713]]&& Math[_0xd587[425]](this[_0xd587[2713]]- _0x5c29x3[_0xd587[730]]())> this[_0xd587[2351]]|| null!= this[_0xd587[2714]]&& Math[_0xd587[425]](this[_0xd587[2714]]- _0x5c29x3[_0xd587[732]]())> this[_0xd587[2351]]){_0x5c29x5=  !0};_0x5c29x2== mxEvent[_0xd587[2715]]&& (this[_0xd587[2713]]= _0x5c29x3[_0xd587[730]](),this[_0xd587[2714]]= _0x5c29x3[_0xd587[732]]())};if((_0x5c29x2!= mxEvent[_0xd587[2715]]|| this[_0xd587[1009]])&& _0x5c29x5){if(_0x5c29x2== mxEvent[_0xd587[2715]]&& (this[_0xd587[1009]]=  !1),!this[_0xd587[2203]]()&& (mxClient[_0xd587[71]]|| mxClient[_0xd587[75]]|| mxClient[_0xd587[76]]|| mxClient[_0xd587[80]]&& mxClient[_0xd587[48]]|| _0x5c29x3[_0xd587[727]]()[_0xd587[772]]!= this[_0xd587[526]])){_0x5c29x2== mxEvent[_0xd587[2716]]&& (this[_0xd587[1009]]&& this[_0xd587[1012]])&& this[_0xd587[1014]](_0x5c29x3[_0xd587[734]](),_0x5c29x3[_0xd587[735]](),this[_0xd587[1013]]);if(null!= this[_0xd587[2329]]){_0x5c29x4= [_0x5c29x4,_0x5c29x3];_0x5c29x3[_0xd587[727]]()[_0xd587[739]]=  !0;for(_0x5c29x5= 0;_0x5c29x5< this[_0xd587[2329]][_0xd587[67]];_0x5c29x5++){var _0x5c29x9=this[_0xd587[2329]][_0x5c29x5];_0x5c29x2== mxEvent[_0xd587[2711]]?_0x5c29x9[_0xd587[787]][_0xd587[183]](_0x5c29x9,_0x5c29x4):_0x5c29x2== mxEvent[_0xd587[2716]]?_0x5c29x9[_0xd587[788]][_0xd587[183]](_0x5c29x9,_0x5c29x4):_0x5c29x2== mxEvent[_0xd587[2715]]&& _0x5c29x9[_0xd587[789]][_0xd587[183]](_0x5c29x9,_0x5c29x4)}};_0x5c29x2== mxEvent[_0xd587[2715]]&& this[_0xd587[173]](_0x5c29x3)}}else {_0x5c29x2== mxEvent[_0xd587[2715]]&& (this[_0xd587[1009]]=  !1)}};mxGraph[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[2717]]|| (this[_0xd587[2717]]=  !0,null!= this[_0xd587[2276]]&& this[_0xd587[2276]][_0xd587[515]](),null!= this[_0xd587[2432]]&& this[_0xd587[2432]][_0xd587[515]](),null!= this[_0xd587[2316]]&& this[_0xd587[2316]][_0xd587[515]](),null!= this[_0xd587[2433]]&& this[_0xd587[2433]][_0xd587[515]](),null!= this[_0xd587[1011]]&& this[_0xd587[1011]][_0xd587[515]](),null!= this[_0xd587[2347]]&& this[_0xd587[2347]][_0xd587[515]](),null!= this[_0xd587[441]]&& this[_0xd587[441]][_0xd587[515]](),null!= this[_0xd587[251]]&& null!= this[_0xd587[2343]]&& (this[_0xd587[251]][_0xd587[745]](this[_0xd587[2343]]),this[_0xd587[2343]]= null),this[_0xd587[526]]= null)};function mxCellOverlay(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){this[_0xd587[618]]= _0x5c29x2;this[_0xd587[2718]]= _0x5c29x3;this[_0xd587[611]]= null!= _0x5c29x4?_0x5c29x4:this[_0xd587[611]];this[_0xd587[123]]= null!= _0x5c29x5?_0x5c29x5:this[_0xd587[123]];this[_0xd587[1368]]= null!= _0x5c29x9?_0x5c29x9: new mxPoint;this[_0xd587[270]]= null!= _0x5c29xa?_0x5c29xa:_0xd587[2719]}mxCellOverlay[_0xd587[202]]=  new mxEventSource;mxCellOverlay[_0xd587[202]][_0xd587[196]]= mxCellOverlay;mxCellOverlay[_0xd587[202]][_0xd587[618]]= null;mxCellOverlay[_0xd587[202]][_0xd587[2718]]= null;mxCellOverlay[_0xd587[202]][_0xd587[611]]= mxConstants[_0xd587[480]];mxCellOverlay[_0xd587[202]][_0xd587[123]]= mxConstants[_0xd587[482]];mxCellOverlay[_0xd587[202]][_0xd587[1368]]= null;mxCellOverlay[_0xd587[202]][_0xd587[270]]= null;mxCellOverlay[_0xd587[202]][_0xd587[2354]]= 0.5;mxCellOverlay[_0xd587[202]][_0xd587[1799]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[441]][_0xd587[1179]][_0xd587[502]]()[_0xd587[250]](_0x5c29x2[_0xd587[246]]),_0x5c29x4=_0x5c29x2[_0xd587[441]][_0xd587[255]],_0x5c29x5=null,_0x5c29x9=this[_0xd587[618]][_0xd587[117]],_0x5c29xa=this[_0xd587[618]][_0xd587[119]];_0x5c29x3?(_0x5c29x3= _0x5c29x2[_0xd587[439]],1== _0x5c29x3[_0xd587[67]]% 2?_0x5c29x5= _0x5c29x3[Math[_0xd587[519]](_0x5c29x3[_0xd587[67]]/ 2)]:(_0x5c29x5= _0x5c29x3[_0xd587[67]]/ 2,_0x5c29x2= _0x5c29x3[_0x5c29x5- 1],_0x5c29x3= _0x5c29x3[_0x5c29x5],_0x5c29x5=  new mxPoint(_0x5c29x2[_0xd587[235]]+ (_0x5c29x3[_0xd587[235]]- _0x5c29x2[_0xd587[235]])/ 2,_0x5c29x2[_0xd587[236]]+ (_0x5c29x3[_0xd587[236]]- _0x5c29x2[_0xd587[236]])/ 2))):(_0x5c29x5=  new mxPoint,_0x5c29x5[_0xd587[235]]= this[_0xd587[611]]== mxConstants[_0xd587[2132]]?_0x5c29x2[_0xd587[235]]:this[_0xd587[611]]== mxConstants[_0xd587[479]]?_0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]]/ 2:_0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]],_0x5c29x5[_0xd587[236]]= this[_0xd587[123]]== mxConstants[_0xd587[1687]]?_0x5c29x2[_0xd587[236]]:this[_0xd587[123]]== mxConstants[_0xd587[481]]?_0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]]/ 2:_0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]]);return  new mxRectangle(Math[_0xd587[488]](_0x5c29x5[_0xd587[235]]- (_0x5c29x9* this[_0xd587[2354]]- this[_0xd587[1368]][_0xd587[235]])* _0x5c29x4),Math[_0xd587[488]](_0x5c29x5[_0xd587[236]]- (_0x5c29xa* this[_0xd587[2354]]- this[_0xd587[1368]][_0xd587[236]])* _0x5c29x4),_0x5c29x9* _0x5c29x4,_0x5c29xa* _0x5c29x4)};mxCellOverlay[_0xd587[202]][_0xd587[2591]]= function(){return this[_0xd587[2718]]};function mxOutline(_0x5c29x2,_0x5c29x3){this[_0xd587[1097]]= _0x5c29x2;null!= _0x5c29x3&& this[_0xd587[176]](_0x5c29x3)}mxOutline[_0xd587[202]][_0xd587[1097]]= null;mxOutline[_0xd587[202]][_0xd587[2136]]= null;mxOutline[_0xd587[202]][_0xd587[2720]]= mxConstants[_0xd587[2333]];mxOutline[_0xd587[202]][_0xd587[984]]=  !0;mxOutline[_0xd587[202]][_0xd587[2721]]=  !0;mxOutline[_0xd587[202]][_0xd587[467]]= 10;mxOutline[_0xd587[202]][_0xd587[2722]]= 8;mxOutline[_0xd587[202]][_0xd587[2723]]=  !1;mxOutline[_0xd587[202]][_0xd587[2724]]= null;mxOutline[_0xd587[202]][_0xd587[1063]]=  !1;mxOutline[_0xd587[202]][_0xd587[176]]= function(_0x5c29x2){this[_0xd587[2136]]=  new mxGraph(_0x5c29x2,this[_0xd587[1097]][_0xd587[502]](),this[_0xd587[2720]],this[_0xd587[1097]][_0xd587[2434]]());this[_0xd587[2136]][_0xd587[2206]]=  !1;this[_0xd587[2136]][_0xd587[1012]]=  !1;var _0x5c29x3=this[_0xd587[2136]][_0xd587[1177]];this[_0xd587[2136]][_0xd587[1177]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2){!this[_0xd587[1063]]&& null!= this[_0xd587[2136]]&& _0x5c29x3[_0xd587[183]](this[_0xd587[2136]],arguments)});mxClient[_0xd587[48]]&& (_0x5c29x2= this[_0xd587[2136]][_0xd587[249]]()[_0xd587[2051]]()[_0xd587[265]],_0x5c29x2[_0xd587[57]](_0xd587[2725],_0xd587[2726]),_0x5c29x2[_0xd587[57]](_0xd587[2727],_0xd587[2726]));this[_0xd587[2136]][_0xd587[2409]]=  !1;this[_0xd587[2136]][_0xd587[995]](!1);this[_0xd587[2728]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x3){!this[_0xd587[1063]]&& !this[_0xd587[1124]]&& this[_0xd587[2729]]()});this[_0xd587[1097]][_0xd587[502]]()[_0xd587[169]](mxEvent.CHANGE,this[_0xd587[2728]]);this[_0xd587[2136]][_0xd587[1133]](this);_0x5c29x2= this[_0xd587[1097]][_0xd587[249]]();_0x5c29x2[_0xd587[169]](mxEvent.SCALE,this[_0xd587[2728]]);_0x5c29x2[_0xd587[169]](mxEvent.TRANSLATE,this[_0xd587[2728]]);_0x5c29x2[_0xd587[169]](mxEvent.SCALE_AND_TRANSLATE,this[_0xd587[2728]]);_0x5c29x2[_0xd587[169]](mxEvent.DOWN,this[_0xd587[2728]]);_0x5c29x2[_0xd587[169]](mxEvent.UP,this[_0xd587[2728]]);mxEvent[_0xd587[169]](this[_0xd587[1097]][_0xd587[526]],_0xd587[276],this[_0xd587[2728]]);this[_0xd587[2730]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[2723]]&& this[_0xd587[2728]][_0xd587[183]](this,arguments)});this[_0xd587[1097]][_0xd587[169]](mxEvent.PAN,this[_0xd587[2730]]);this[_0xd587[2731]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[2136]][_0xd587[2341]](this[_0xd587[1097]][_0xd587[2434]]());this[_0xd587[2136]][_0xd587[802]]()});this[_0xd587[1097]][_0xd587[169]](mxEvent.REFRESH,this[_0xd587[2731]]);this[_0xd587[1562]]=  new mxRectangle(0,0,0,0);this[_0xd587[2732]]=  new mxRectangleShape(this[_0xd587[1562]],null,mxConstants.OUTLINE_COLOR,mxConstants.OUTLINE_STROKEWIDTH);this[_0xd587[2732]][_0xd587[507]]= this[_0xd587[2136]][_0xd587[507]]!= mxConstants[_0xd587[508]]?mxConstants[_0xd587[1523]]:mxConstants[_0xd587[508]];this[_0xd587[2732]][_0xd587[176]](this[_0xd587[2136]][_0xd587[249]]()[_0xd587[1524]]());mxEvent[_0xd587[2733]](this[_0xd587[2732]][_0xd587[252]],this[_0xd587[2136]]);this[_0xd587[2732]][_0xd587[252]][_0xd587[124]][_0xd587[1537]]= _0xd587[110];this[_0xd587[2734]]= this[_0xd587[2735]]();this[_0xd587[2734]][_0xd587[176]](this[_0xd587[2136]][_0xd587[249]]()[_0xd587[1524]]());this[_0xd587[984]]&& (this[_0xd587[2734]][_0xd587[252]][_0xd587[124]][_0xd587[270]]= _0xd587[356]);mxEvent[_0xd587[169]](this[_0xd587[2734]][_0xd587[252]],mxClient[_0xd587[754]]?_0xd587[755]:_0xd587[751],mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[2136]][_0xd587[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x5c29x2))}));this[_0xd587[2732]][_0xd587[252]][_0xd587[124]][_0xd587[495]]= this[_0xd587[2721]]?_0xd587[110]:_0xd587[130];this[_0xd587[2734]][_0xd587[252]][_0xd587[124]][_0xd587[495]]= this[_0xd587[2732]][_0xd587[252]][_0xd587[124]][_0xd587[495]];this[_0xd587[2732]][_0xd587[252]][_0xd587[124]][_0xd587[270]]= _0xd587[582];this[_0xd587[2729]](!1)};mxOutline[_0xd587[202]][_0xd587[994]]= function(){return this[_0xd587[984]]};mxOutline[_0xd587[202]][_0xd587[995]]= function(_0x5c29x2){this[_0xd587[984]]= _0x5c29x2};mxOutline[_0xd587[202]][_0xd587[2736]]= function(_0x5c29x2){this[_0xd587[2734]][_0xd587[252]][_0xd587[124]][_0xd587[187]]= _0x5c29x2?_0xd587[189]:_0xd587[188]};mxOutline[_0xd587[202]][_0xd587[802]]= function(){this[_0xd587[2729]](!0)};mxOutline[_0xd587[202]][_0xd587[2735]]= function(){var _0x5c29x2=null!= this[_0xd587[2724]]? new mxImageShape( new mxRectangle(0,0,this[_0xd587[2724]][_0xd587[117]],this[_0xd587[2724]][_0xd587[119]]),this[_0xd587[2724]][_0xd587[390]]): new mxRectangleShape( new mxRectangle(0,0,this[_0xd587[2722]],this[_0xd587[2722]]),mxConstants.OUTLINE_HANDLE_FILLCOLOR,mxConstants.OUTLINE_HANDLE_STROKECOLOR);_0x5c29x2[_0xd587[507]]= this[_0xd587[2136]][_0xd587[507]];return _0x5c29x2};mxOutline[_0xd587[202]][_0xd587[2737]]= function(){return  new mxRectangle(0,0,this[_0xd587[1097]][_0xd587[526]][_0xd587[1526]],this[_0xd587[1097]][_0xd587[526]][_0xd587[191]])};mxOutline[_0xd587[202]][_0xd587[2738]]= function(_0x5c29x2){return null};mxOutline[_0xd587[202]][_0xd587[2729]]= function(_0x5c29x2){if(null!= this[_0xd587[1097]]){var _0x5c29x3=this[_0xd587[1097]][_0xd587[441]][_0xd587[255]],_0x5c29x4=this[_0xd587[1097]][_0xd587[517]](),_0x5c29x4= new mxRectangle(_0x5c29x4[_0xd587[235]]/ _0x5c29x3+ this[_0xd587[1097]][_0xd587[1136]],_0x5c29x4[_0xd587[236]]/ _0x5c29x3+ this[_0xd587[1097]][_0xd587[1137]],_0x5c29x4[_0xd587[117]]/ _0x5c29x3,_0x5c29x4[_0xd587[119]]/ _0x5c29x3),_0x5c29x5= new mxRectangle(0,0,this[_0xd587[1097]][_0xd587[526]][_0xd587[159]]/ _0x5c29x3,this[_0xd587[1097]][_0xd587[526]][_0xd587[157]]/ _0x5c29x3),_0x5c29x9=_0x5c29x4[_0xd587[238]]();_0x5c29x9[_0xd587[99]](_0x5c29x5);var _0x5c29xa=this[_0xd587[2737]](),_0x5c29x5=Math[_0xd587[160]](_0x5c29xa[_0xd587[117]]/ _0x5c29x3,_0x5c29x9[_0xd587[117]]),_0x5c29x3=Math[_0xd587[160]](_0x5c29xa[_0xd587[119]]/ _0x5c29x3,_0x5c29x9[_0xd587[119]]),_0x5c29x9=Math[_0xd587[160]](0,this[_0xd587[2136]][_0xd587[526]][_0xd587[159]]- this[_0xd587[467]]),_0x5c29xa=Math[_0xd587[160]](0,this[_0xd587[2136]][_0xd587[526]][_0xd587[157]]- this[_0xd587[467]]),_0x5c29x9=Math[_0xd587[243]](_0x5c29x9/ _0x5c29x5,_0x5c29xa/ _0x5c29x3);if(0< _0x5c29x9){this[_0xd587[2136]][_0xd587[249]]()[_0xd587[255]]!= _0x5c29x9&& (this[_0xd587[2136]][_0xd587[249]]()[_0xd587[255]]= _0x5c29x9,_0x5c29x2=  !0);_0x5c29x5= this[_0xd587[2136]][_0xd587[249]]();_0x5c29x5[_0xd587[1741]]!= this[_0xd587[1097]][_0xd587[249]]()[_0xd587[1741]]&& _0x5c29x5[_0xd587[2257]](this[_0xd587[1097]][_0xd587[249]]()[_0xd587[1741]]);var _0x5c29x3=this[_0xd587[1097]][_0xd587[441]][_0xd587[513]],_0x5c29xa=_0x5c29x3[_0xd587[235]]+ this[_0xd587[1097]][_0xd587[1136]],_0x5c29x12=_0x5c29x3[_0xd587[236]]+ this[_0xd587[1097]][_0xd587[1137]],_0x5c29x9=this[_0xd587[2738]](_0x5c29x9);null!= _0x5c29x9&& (_0x5c29xa+= _0x5c29x9[_0xd587[235]],_0x5c29x12+= _0x5c29x9[_0xd587[236]]);0> _0x5c29x4[_0xd587[235]]&& (_0x5c29xa-= _0x5c29x4[_0xd587[235]]);0> _0x5c29x4[_0xd587[236]]&& (_0x5c29x12-= _0x5c29x4[_0xd587[236]]);if(_0x5c29x5[_0xd587[513]][_0xd587[235]]!= _0x5c29xa|| _0x5c29x5[_0xd587[513]][_0xd587[236]]!= _0x5c29x12){_0x5c29x5[_0xd587[513]][_0xd587[235]]= _0x5c29xa,_0x5c29x5[_0xd587[513]][_0xd587[236]]= _0x5c29x12,_0x5c29x2=  !0};var _0x5c29x4=_0x5c29x5[_0xd587[513]],_0x5c29x9=this[_0xd587[1097]][_0xd587[249]]()[_0xd587[255]],_0x5c29xa=_0x5c29x9/ _0x5c29x5[_0xd587[255]],_0x5c29x12=1/ _0x5c29x5[_0xd587[255]],_0x5c29x13=this[_0xd587[1097]][_0xd587[526]];this[_0xd587[1562]]=  new mxRectangle((_0x5c29x4[_0xd587[235]]- _0x5c29x3[_0xd587[235]]- this[_0xd587[1097]][_0xd587[1136]])/ _0x5c29x12,(_0x5c29x4[_0xd587[236]]- _0x5c29x3[_0xd587[236]]- this[_0xd587[1097]][_0xd587[1137]])/ _0x5c29x12,_0x5c29x13[_0xd587[159]]/ _0x5c29xa,_0x5c29x13[_0xd587[157]]/ _0x5c29xa);this[_0xd587[1562]][_0xd587[235]]+= this[_0xd587[1097]][_0xd587[526]][_0xd587[360]]* _0x5c29x5[_0xd587[255]]/ _0x5c29x9;this[_0xd587[1562]][_0xd587[236]]+= this[_0xd587[1097]][_0xd587[526]][_0xd587[190]]* _0x5c29x5[_0xd587[255]]/ _0x5c29x9;_0x5c29x4= this[_0xd587[2732]][_0xd587[1562]];if(_0x5c29x4[_0xd587[235]]!= this[_0xd587[1562]][_0xd587[235]]|| _0x5c29x4[_0xd587[236]]!= this[_0xd587[1562]][_0xd587[236]]|| _0x5c29x4[_0xd587[117]]!= this[_0xd587[1562]][_0xd587[117]]|| _0x5c29x4[_0xd587[119]]!= this[_0xd587[1562]][_0xd587[119]]){this[_0xd587[2732]][_0xd587[1562]]= this[_0xd587[1562]],this[_0xd587[2732]][_0xd587[258]]()};_0x5c29x4= this[_0xd587[2734]][_0xd587[1562]];_0x5c29x5=  new mxRectangle(this[_0xd587[1562]][_0xd587[235]]+ this[_0xd587[1562]][_0xd587[117]]- _0x5c29x4[_0xd587[117]]/ 2,this[_0xd587[1562]][_0xd587[236]]+ this[_0xd587[1562]][_0xd587[119]]- _0x5c29x4[_0xd587[119]]/ 2,_0x5c29x4[_0xd587[117]],_0x5c29x4[_0xd587[119]]);if(_0x5c29x4[_0xd587[235]]!= _0x5c29x5[_0xd587[235]]|| _0x5c29x4[_0xd587[236]]!= _0x5c29x5[_0xd587[236]]|| _0x5c29x4[_0xd587[117]]!= _0x5c29x5[_0xd587[117]]|| _0x5c29x4[_0xd587[119]]!= _0x5c29x5[_0xd587[119]]){this[_0xd587[2734]][_0xd587[1562]]= _0x5c29x5,_0xd587[188]!= this[_0xd587[2734]][_0xd587[252]][_0xd587[124]][_0xd587[187]]&& this[_0xd587[2734]][_0xd587[258]]()};_0x5c29x2&& this[_0xd587[2136]][_0xd587[441]][_0xd587[2259]]()}}};mxOutline[_0xd587[202]][_0xd587[787]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[984]]&& this[_0xd587[2721]]&& (this[_0xd587[499]]= _0x5c29x3[_0xd587[729]](this[_0xd587[2734]]),this[_0xd587[2739]]= _0x5c29x3[_0xd587[730]](),this[_0xd587[2740]]= _0x5c29x3[_0xd587[732]](),this[_0xd587[1124]]=  !0,this[_0xd587[1097]][_0xd587[2365]]&& mxUtils[_0xd587[1134]](this[_0xd587[1097]][_0xd587[526]])?(this[_0xd587[2741]]= this[_0xd587[1097]][_0xd587[526]][_0xd587[360]],this[_0xd587[2742]]= this[_0xd587[1097]][_0xd587[526]][_0xd587[190]]):this[_0xd587[2742]]= this[_0xd587[2741]]= 0);_0x5c29x3[_0xd587[722]]()};mxOutline[_0xd587[202]][_0xd587[788]]= function(_0x5c29x2,_0x5c29x3){if(this[_0xd587[1124]]){this[_0xd587[2732]][_0xd587[252]][_0xd587[124]][_0xd587[495]]= this[_0xd587[2721]]?_0xd587[110]:_0xd587[130];this[_0xd587[2734]][_0xd587[252]][_0xd587[124]][_0xd587[495]]= this[_0xd587[2732]][_0xd587[252]][_0xd587[124]][_0xd587[495]];var _0x5c29x4=_0x5c29x3[_0xd587[730]]()- this[_0xd587[2739]],_0x5c29x5=_0x5c29x3[_0xd587[732]]()- this[_0xd587[2740]],_0x5c29x9=null;if(this[_0xd587[499]]){_0x5c29x9= this[_0xd587[1097]][_0xd587[526]],_0x5c29x5= _0x5c29x4/ (_0x5c29x9[_0xd587[159]]/ _0x5c29x9[_0xd587[157]]),_0x5c29x9=  new mxRectangle(this[_0xd587[1562]][_0xd587[235]],this[_0xd587[1562]][_0xd587[236]],Math[_0xd587[160]](1,this[_0xd587[1562]][_0xd587[117]]+ _0x5c29x4),Math[_0xd587[160]](1,this[_0xd587[1562]][_0xd587[119]]+ _0x5c29x5)),this[_0xd587[2732]][_0xd587[1562]]= _0x5c29x9,this[_0xd587[2732]][_0xd587[258]]()}else {var _0x5c29xa=this[_0xd587[2136]][_0xd587[249]]()[_0xd587[255]],_0x5c29x9= new mxRectangle(this[_0xd587[1562]][_0xd587[235]]+ _0x5c29x4,this[_0xd587[1562]][_0xd587[236]]+ _0x5c29x5,this[_0xd587[1562]][_0xd587[117]],this[_0xd587[1562]][_0xd587[119]]);this[_0xd587[2732]][_0xd587[1562]]= _0x5c29x9;this[_0xd587[2732]][_0xd587[258]]();_0x5c29x4= _0x5c29x4/ _0x5c29xa* this[_0xd587[1097]][_0xd587[249]]()[_0xd587[255]];_0x5c29x5= _0x5c29x5/ _0x5c29xa* this[_0xd587[1097]][_0xd587[249]]()[_0xd587[255]];this[_0xd587[1097]][_0xd587[1135]](-_0x5c29x4- this[_0xd587[2741]],-_0x5c29x5- this[_0xd587[2742]])};_0x5c29x4= this[_0xd587[2734]][_0xd587[1562]];this[_0xd587[2734]][_0xd587[1562]]=  new mxRectangle(_0x5c29x9[_0xd587[235]]+ _0x5c29x9[_0xd587[117]]- _0x5c29x4[_0xd587[117]]/ 2,_0x5c29x9[_0xd587[236]]+ _0x5c29x9[_0xd587[119]]- _0x5c29x4[_0xd587[119]]/ 2,_0x5c29x4[_0xd587[117]],_0x5c29x4[_0xd587[119]]);_0xd587[188]!= this[_0xd587[2734]][_0xd587[252]][_0xd587[124]][_0xd587[187]]&& this[_0xd587[2734]][_0xd587[258]]();_0x5c29x3[_0xd587[722]]()}};mxOutline[_0xd587[202]][_0xd587[789]]= function(_0x5c29x2,_0x5c29x3){if(this[_0xd587[1124]]){var _0x5c29x4=_0x5c29x3[_0xd587[730]]()- this[_0xd587[2739]],_0x5c29x5=_0x5c29x3[_0xd587[732]]()- this[_0xd587[2740]];if(0< Math[_0xd587[425]](_0x5c29x4)|| 0< Math[_0xd587[425]](_0x5c29x5)){if(this[_0xd587[499]]){var _0x5c29x5=this[_0xd587[2732]][_0xd587[1562]][_0xd587[117]],_0x5c29x9=this[_0xd587[1097]][_0xd587[249]]()[_0xd587[255]];this[_0xd587[1097]][_0xd587[2561]](_0x5c29x9- _0x5c29x4* _0x5c29x9/ _0x5c29x5,!1)}else {if(!this[_0xd587[1097]][_0xd587[2365]]|| !mxUtils[_0xd587[1134]](this[_0xd587[1097]][_0xd587[526]])){this[_0xd587[1097]][_0xd587[1135]](0,0),_0x5c29x4/= this[_0xd587[2136]][_0xd587[249]]()[_0xd587[255]],_0x5c29x5/= this[_0xd587[2136]][_0xd587[249]]()[_0xd587[255]],_0x5c29x9= this[_0xd587[1097]][_0xd587[249]]()[_0xd587[513]],this[_0xd587[1097]][_0xd587[249]]()[_0xd587[1147]](_0x5c29x9[_0xd587[235]]- _0x5c29x4,_0x5c29x9[_0xd587[236]]- _0x5c29x5)}};this[_0xd587[2729]]();_0x5c29x3[_0xd587[722]]()};this[_0xd587[1983]]= null;this[_0xd587[1124]]=  !1}};mxOutline[_0xd587[202]][_0xd587[515]]= function(){null!= this[_0xd587[1097]]&& (this[_0xd587[1097]][_0xd587[745]](this[_0xd587[2730]]),this[_0xd587[1097]][_0xd587[745]](this[_0xd587[2731]]),this[_0xd587[1097]][_0xd587[502]]()[_0xd587[745]](this[_0xd587[2728]]),this[_0xd587[1097]][_0xd587[249]]()[_0xd587[745]](this[_0xd587[2728]]),mxEvent[_0xd587[169]](this[_0xd587[1097]][_0xd587[526]],_0xd587[276],this[_0xd587[2728]]),this[_0xd587[1097]]= null);null!= this[_0xd587[2136]]&& (this[_0xd587[2136]][_0xd587[1148]](this),this[_0xd587[2136]][_0xd587[515]](),this[_0xd587[2136]]= null);null!= this[_0xd587[2732]]&& (this[_0xd587[2732]][_0xd587[515]](),this[_0xd587[2732]]= null);null!= this[_0xd587[2734]]&& (this[_0xd587[2734]][_0xd587[515]](),this[_0xd587[2734]]= null)};function mxMultiplicity(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14,_0x5c29x15){this[_0xd587[1097]]= _0x5c29x2;this[_0xd587[60]]= _0x5c29x3;this[_0xd587[2588]]= _0x5c29x4;this[_0xd587[131]]= _0x5c29x5;this[_0xd587[243]]= null!= _0x5c29x9?_0x5c29x9:0;this[_0xd587[160]]= null!= _0x5c29xa?_0x5c29xa:_0xd587[2743];this[_0xd587[2744]]= _0x5c29x12;this[_0xd587[2589]]= mxResources[_0xd587[203]](_0x5c29x13)|| _0x5c29x13;this[_0xd587[2745]]= mxResources[_0xd587[203]](_0x5c29x14)|| _0x5c29x14;this[_0xd587[2746]]= null!= _0x5c29x15?_0x5c29x15:!0}mxMultiplicity[_0xd587[202]][_0xd587[60]]= null;mxMultiplicity[_0xd587[202]][_0xd587[2588]]= null;mxMultiplicity[_0xd587[202]][_0xd587[131]]= null;mxMultiplicity[_0xd587[202]][_0xd587[1097]]= null;mxMultiplicity[_0xd587[202]][_0xd587[243]]= null;mxMultiplicity[_0xd587[202]][_0xd587[160]]= null;mxMultiplicity[_0xd587[202]][_0xd587[2744]]= null;mxMultiplicity[_0xd587[202]][_0xd587[2746]]=  !0;mxMultiplicity[_0xd587[202]][_0xd587[2589]]= null;mxMultiplicity[_0xd587[202]][_0xd587[2745]]= null;mxMultiplicity[_0xd587[202]][_0xd587[2583]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){var _0x5c29x12=_0xd587[110];if(this[_0xd587[1097]]&& this[_0xd587[2747]](_0x5c29x2,_0x5c29x4,_0x5c29x3)|| !this[_0xd587[1097]]&& this[_0xd587[2747]](_0x5c29x2,_0x5c29x5,_0x5c29x3)){if(null!= this[_0xd587[2589]]&& (this[_0xd587[1097]]&& (0== this[_0xd587[160]]|| _0x5c29x9>= this[_0xd587[160]])|| !this[_0xd587[1097]]&& (0== this[_0xd587[160]]|| _0x5c29xa>= this[_0xd587[160]]))){_0x5c29x12+= this[_0xd587[2589]]+ _0xd587[192]};null!= this[_0xd587[2744]]&& (null!= this[_0xd587[2745]]&& 0< this[_0xd587[2744]][_0xd587[67]])&& (this[_0xd587[2748]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5)|| (_0x5c29x12+= this[_0xd587[2745]]+ _0xd587[192]))};return 0< _0x5c29x12[_0xd587[67]]?_0x5c29x12:null};mxMultiplicity[_0xd587[202]][_0xd587[2748]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x3= _0x5c29x2[_0xd587[251]][_0xd587[433]](_0x5c29x4);_0x5c29x5= _0x5c29x2[_0xd587[251]][_0xd587[433]](_0x5c29x5);_0x5c29x4= !this[_0xd587[2746]];for(var _0x5c29x9=this[_0xd587[2744]],_0x5c29xa=0;_0x5c29xa< _0x5c29x9[_0xd587[67]];_0x5c29xa++){if(this[_0xd587[1097]]&& this[_0xd587[2749]](_0x5c29x2,_0x5c29x5,_0x5c29x9[_0x5c29xa])){_0x5c29x4= this[_0xd587[2746]];break}else {if(!this[_0xd587[1097]]&& this[_0xd587[2749]](_0x5c29x2,_0x5c29x3,_0x5c29x9[_0x5c29xa])){_0x5c29x4= this[_0xd587[2746]];break}}};return _0x5c29x4};mxMultiplicity[_0xd587[202]][_0xd587[2747]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x3= _0x5c29x2[_0xd587[251]][_0xd587[433]](_0x5c29x3);return this[_0xd587[2749]](_0x5c29x2,_0x5c29x3,this[_0xd587[60]],this[_0xd587[2588]],this[_0xd587[131]])};mxMultiplicity[_0xd587[202]][_0xd587[2749]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){return null!= _0x5c29x3?isNaN(_0x5c29x3[_0xd587[288]])?_0x5c29x3== _0x5c29x4:mxUtils[_0xd587[1331]](_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9):!1};function mxLayoutManager(_0x5c29x2){this[_0xd587[2750]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x4){this[_0xd587[994]]()&& this[_0xd587[823]](_0x5c29x4[_0xd587[720]](_0xd587[1061]))});this[_0xd587[2317]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x4){this[_0xd587[994]]()&& this[_0xd587[835]](_0x5c29x4[_0xd587[720]](_0xd587[895]),_0x5c29x4[_0xd587[720]](_0xd587[763]))});this[_0xd587[1178]](_0x5c29x2)}mxLayoutManager[_0xd587[202]]=  new mxEventSource;mxLayoutManager[_0xd587[202]][_0xd587[196]]= mxLayoutManager;mxLayoutManager[_0xd587[202]][_0xd587[1179]]= null;mxLayoutManager[_0xd587[202]][_0xd587[2751]]=  !0;mxLayoutManager[_0xd587[202]][_0xd587[984]]=  !0;mxLayoutManager[_0xd587[202]][_0xd587[2728]]= null;mxLayoutManager[_0xd587[202]][_0xd587[2317]]= null;mxLayoutManager[_0xd587[202]][_0xd587[994]]= function(){return this[_0xd587[984]]};mxLayoutManager[_0xd587[202]][_0xd587[995]]= function(_0x5c29x2){this[_0xd587[984]]= _0x5c29x2};mxLayoutManager[_0xd587[202]][_0xd587[2752]]= function(){return this[_0xd587[2751]]};mxLayoutManager[_0xd587[202]][_0xd587[2753]]= function(_0x5c29x2){this[_0xd587[2751]]= _0x5c29x2};mxLayoutManager[_0xd587[202]][_0xd587[1703]]= function(){return this[_0xd587[1179]]};mxLayoutManager[_0xd587[202]][_0xd587[1178]]= function(_0x5c29x2){if(null!= this[_0xd587[1179]]){var _0x5c29x3=this[_0xd587[1179]][_0xd587[502]]();_0x5c29x3[_0xd587[745]](this[_0xd587[2750]]);this[_0xd587[1179]][_0xd587[745]](this[_0xd587[2317]])};this[_0xd587[1179]]= _0x5c29x2;null!= this[_0xd587[1179]]&& (_0x5c29x3= this[_0xd587[1179]][_0xd587[502]](),_0x5c29x3[_0xd587[169]](mxEvent.BEFORE_UNDO,this[_0xd587[2750]]),this[_0xd587[1179]][_0xd587[169]](mxEvent.MOVE_CELLS,this[_0xd587[2317]]))};mxLayoutManager[_0xd587[202]][_0xd587[2754]]= function(_0x5c29x2){return null};mxLayoutManager[_0xd587[202]][_0xd587[823]]= function(_0x5c29x2){_0x5c29x2= this[_0xd587[2755]](_0x5c29x2[_0xd587[1065]]);var _0x5c29x3=this[_0xd587[1703]]()[_0xd587[502]]();if(this[_0xd587[2752]]()){for(var _0x5c29x4=_0x5c29x3[_0xd587[1977]](_0x5c29x2);0< _0x5c29x4[_0xd587[67]];){_0x5c29x2= _0x5c29x2[_0xd587[1919]](_0x5c29x4),_0x5c29x4= _0x5c29x3[_0xd587[1977]](_0x5c29x4)}};this[_0xd587[828]](mxUtils[_0xd587[1779]](_0x5c29x2,!1))};mxLayoutManager[_0xd587[202]][_0xd587[835]]= function(_0x5c29x2,_0x5c29x3){if(null!= _0x5c29x2&& null!= _0x5c29x3){for(var _0x5c29x4=mxUtils[_0xd587[2196]](this[_0xd587[1703]]()[_0xd587[526]],mxEvent[_0xd587[731]](_0x5c29x3),mxEvent[_0xd587[733]](_0x5c29x3)),_0x5c29x5=this[_0xd587[1703]]()[_0xd587[502]](),_0x5c29x9=0;_0x5c29x9< _0x5c29x2[_0xd587[67]];_0x5c29x9++){var _0x5c29xa=this[_0xd587[2754]](_0x5c29x5[_0xd587[1197]](_0x5c29x2[_0x5c29x9]));null!= _0x5c29xa&& _0x5c29xa[_0xd587[1702]](_0x5c29x2[_0x5c29x9],_0x5c29x4[_0xd587[235]],_0x5c29x4[_0xd587[236]])}}};mxLayoutManager[_0xd587[202]][_0xd587[2755]]= function(_0x5c29x2){for(var _0x5c29x3=[],_0x5c29x4={},_0x5c29x5=0;_0x5c29x5< _0x5c29x2[_0xd587[67]];_0x5c29x5++){var _0x5c29x9=_0x5c29x2[_0x5c29x5];if(_0x5c29x9 instanceof  mxRootChange){return []};for(var _0x5c29x9=this[_0xd587[2756]](_0x5c29x9),_0x5c29xa=0;_0x5c29xa< _0x5c29x9[_0xd587[67]];_0x5c29xa++){if(null!= _0x5c29x9[_0x5c29xa]){var _0x5c29x12=mxCellPath[_0xd587[385]](_0x5c29x9[_0x5c29xa]);null== _0x5c29x4[_0x5c29x12]&& (_0x5c29x4[_0x5c29x12]= _0x5c29x9[_0x5c29xa],_0x5c29x3[_0xd587[207]](_0x5c29x9[_0x5c29xa]))}}};return _0x5c29x3};mxLayoutManager[_0xd587[202]][_0xd587[2756]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1703]]()[_0xd587[502]]();return _0x5c29x2 instanceof  mxChildChange?[_0x5c29x2[_0xd587[247]],_0x5c29x2[_0xd587[257]],_0x5c29x3[_0xd587[1197]](_0x5c29x2[_0xd587[247]])]:_0x5c29x2 instanceof  mxTerminalChange|| _0x5c29x2 instanceof  mxGeometryChange?[_0x5c29x2[_0xd587[246]],_0x5c29x3[_0xd587[1197]](_0x5c29x2[_0xd587[246]])]:[]};mxLayoutManager[_0xd587[202]][_0xd587[828]]= function(_0x5c29x2){if(0< _0x5c29x2[_0xd587[67]]){var _0x5c29x3=this[_0xd587[1703]]()[_0xd587[502]]();_0x5c29x3[_0xd587[473]]();try{for(var _0x5c29x4=null,_0x5c29x5=0;_0x5c29x5< _0x5c29x2[_0xd587[67]];_0x5c29x5++){_0x5c29x2[_0x5c29x5]!= _0x5c29x3[_0xd587[501]]()&& _0x5c29x2[_0x5c29x5]!= _0x5c29x4&& (_0x5c29x4= _0x5c29x2[_0x5c29x5],this[_0xd587[2757]](this[_0xd587[2754]](_0x5c29x4),_0x5c29x4))};this[_0xd587[746]]( new mxEventObject(mxEvent.LAYOUT_CELLS,_0xd587[895],_0x5c29x2))}finally{_0x5c29x3[_0xd587[476]]()}}};mxLayoutManager[_0xd587[202]][_0xd587[2757]]= function(_0x5c29x2,_0x5c29x3){null!= _0x5c29x2&& null!= _0x5c29x3&& _0x5c29x2[_0xd587[350]](_0x5c29x3)};mxLayoutManager[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[1178]](null)};function mxSpaceManager(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){this[_0xd587[2758]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x3){this[_0xd587[994]]()&& this[_0xd587[837]](_0x5c29x3[_0xd587[720]](_0xd587[895]))});this[_0xd587[2759]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x3){this[_0xd587[994]]()&& this[_0xd587[837]](_0x5c29x3[_0xd587[720]](_0xd587[895]))});this[_0xd587[2760]]= null!= _0x5c29x3?_0x5c29x3:!0;this[_0xd587[2761]]= null!= _0x5c29x4?_0x5c29x4:!0;this[_0xd587[2392]]= null!= _0x5c29x5?_0x5c29x5:!0;this[_0xd587[1178]](_0x5c29x2)}mxSpaceManager[_0xd587[202]]=  new mxEventSource;mxSpaceManager[_0xd587[202]][_0xd587[196]]= mxSpaceManager;mxSpaceManager[_0xd587[202]][_0xd587[1179]]= null;mxSpaceManager[_0xd587[202]][_0xd587[984]]=  !0;mxSpaceManager[_0xd587[202]][_0xd587[2760]]=  !0;mxSpaceManager[_0xd587[202]][_0xd587[2761]]=  !0;mxSpaceManager[_0xd587[202]][_0xd587[2392]]=  !0;mxSpaceManager[_0xd587[202]][_0xd587[2758]]= null;mxSpaceManager[_0xd587[202]][_0xd587[2759]]= null;mxSpaceManager[_0xd587[202]][_0xd587[2762]]= function(_0x5c29x2){return !this[_0xd587[1703]]()[_0xd587[502]]()[_0xd587[1193]](_0x5c29x2)};mxSpaceManager[_0xd587[202]][_0xd587[2763]]= function(_0x5c29x2){return this[_0xd587[1703]]()[_0xd587[502]]()[_0xd587[1193]](_0x5c29x2)&& this[_0xd587[1703]]()[_0xd587[1712]](_0x5c29x2)};mxSpaceManager[_0xd587[202]][_0xd587[994]]= function(){return this[_0xd587[984]]};mxSpaceManager[_0xd587[202]][_0xd587[995]]= function(_0x5c29x2){this[_0xd587[984]]= _0x5c29x2};mxSpaceManager[_0xd587[202]][_0xd587[2764]]= function(){return this[_0xd587[2760]]};mxSpaceManager[_0xd587[202]][_0xd587[2765]]= function(_0x5c29x2){this[_0xd587[2760]]= _0x5c29x2};mxSpaceManager[_0xd587[202]][_0xd587[2766]]= function(){return this[_0xd587[2761]]};mxSpaceManager[_0xd587[202]][_0xd587[2767]]= function(_0x5c29x2){this[_0xd587[2761]]= _0x5c29x2};mxSpaceManager[_0xd587[202]][_0xd587[2678]]= function(){return this[_0xd587[2392]]};mxSpaceManager[_0xd587[202]][_0xd587[2679]]= function(_0x5c29x2){this[_0xd587[2392]]= _0x5c29x2};mxSpaceManager[_0xd587[202]][_0xd587[1703]]= function(){return this[_0xd587[1179]]};mxSpaceManager[_0xd587[202]][_0xd587[1178]]= function(_0x5c29x2){null!= this[_0xd587[1179]]&& (this[_0xd587[1179]][_0xd587[745]](this[_0xd587[2758]]),this[_0xd587[1179]][_0xd587[745]](this[_0xd587[2759]]));this[_0xd587[1179]]= _0x5c29x2;null!= this[_0xd587[1179]]&& (this[_0xd587[1179]][_0xd587[169]](mxEvent.RESIZE_CELLS,this[_0xd587[2758]]),this[_0xd587[1179]][_0xd587[169]](mxEvent.FOLD_CELLS,this[_0xd587[2759]]))};mxSpaceManager[_0xd587[202]][_0xd587[837]]= function(_0x5c29x2){if(null!= _0x5c29x2){var _0x5c29x3=this[_0xd587[1179]][_0xd587[502]]();_0x5c29x3[_0xd587[473]]();try{for(var _0x5c29x4=0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){if(!this[_0xd587[2762]](_0x5c29x2[_0x5c29x4])){this[_0xd587[2768]](_0x5c29x2[_0x5c29x4]);break}}}finally{_0x5c29x3[_0xd587[476]]()}}};mxSpaceManager[_0xd587[202]][_0xd587[2768]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1703]](),_0x5c29x4=_0x5c29x3[_0xd587[249]](),_0x5c29x5=_0x5c29x3[_0xd587[502]](),_0x5c29x9=_0x5c29x4[_0xd587[248]](_0x5c29x2),_0x5c29xa=_0x5c29x4[_0xd587[248]](_0x5c29x5[_0xd587[1197]](_0x5c29x2));if(null!= _0x5c29x9&& null!= _0x5c29xa){var _0x5c29x12=this[_0xd587[2769]](_0x5c29x9),_0x5c29x13=_0x5c29x5[_0xd587[1721]](_0x5c29x2);if(null!= _0x5c29x12&& null!= _0x5c29x13){var _0x5c29x14=_0x5c29x4[_0xd587[513]],_0x5c29x15=_0x5c29x4[_0xd587[255]],_0x5c29x4=_0x5c29x9[_0xd587[235]]- _0x5c29xa[_0xd587[2078]][_0xd587[235]]- _0x5c29x14[_0xd587[235]]* _0x5c29x15,_0x5c29xa=_0x5c29x9[_0xd587[236]]- _0x5c29xa[_0xd587[2078]][_0xd587[236]]- _0x5c29x14[_0xd587[236]]* _0x5c29x15,_0x5c29x14=_0x5c29x9[_0xd587[235]]+ _0x5c29x9[_0xd587[117]],_0x5c29x16=_0x5c29x9[_0xd587[236]]+ _0x5c29x9[_0xd587[119]],_0x5c29x17=_0x5c29x9[_0xd587[117]]- _0x5c29x13[_0xd587[117]]* _0x5c29x15+ _0x5c29x4- _0x5c29x13[_0xd587[235]]* _0x5c29x15,_0x5c29x18=_0x5c29x9[_0xd587[119]]- _0x5c29x13[_0xd587[119]]* _0x5c29x15+ _0x5c29xa- _0x5c29x13[_0xd587[236]]* _0x5c29x15,_0x5c29x19=1- _0x5c29x13[_0xd587[117]]* _0x5c29x15/ _0x5c29x9[_0xd587[117]],_0x5c29x9=1- _0x5c29x13[_0xd587[119]]* _0x5c29x15/ _0x5c29x9[_0xd587[119]];_0x5c29x5[_0xd587[473]]();try{for(_0x5c29x13= 0;_0x5c29x13< _0x5c29x12[_0xd587[67]];_0x5c29x13++){_0x5c29x12[_0x5c29x13]!= _0x5c29x2&& this[_0xd587[2763]](_0x5c29x12[_0x5c29x13])&& this[_0xd587[2770]](_0x5c29x12[_0x5c29x13],_0x5c29x17,_0x5c29x18,_0x5c29x4,_0x5c29xa,_0x5c29x14,_0x5c29x16,_0x5c29x19,_0x5c29x9,this[_0xd587[2678]]()&& _0x5c29x3[_0xd587[2507]](_0x5c29x12[_0x5c29x13]))}}finally{_0x5c29x5[_0xd587[476]]()}}}};mxSpaceManager[_0xd587[202]][_0xd587[2770]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14,_0x5c29x15){_0x5c29x5= this[_0xd587[1703]]();var _0x5c29x16=_0x5c29x5[_0xd587[249]]()[_0xd587[248]](_0x5c29x2);if(null!= _0x5c29x16){var _0x5c29x17=_0x5c29x5[_0xd587[502]](),_0x5c29x18=_0x5c29x17[_0xd587[1721]](_0x5c29x2);if(null!= _0x5c29x18){_0x5c29x17[_0xd587[473]]();try{if(this[_0xd587[2764]]()){if(_0x5c29x16[_0xd587[235]]>= _0x5c29xa){_0x5c29x18= _0x5c29x18[_0xd587[238]](),_0x5c29x18[_0xd587[513]](-_0x5c29x3,0)}else {var _0x5c29x19=Math[_0xd587[160]](0,_0x5c29x16[_0xd587[235]]- x0),_0x5c29x18=_0x5c29x18[_0xd587[238]]();_0x5c29x18[_0xd587[513]](-_0x5c29x13* _0x5c29x19,0)}};if(this[_0xd587[2766]]()){if(_0x5c29x16[_0xd587[236]]>= _0x5c29x12){_0x5c29x18= _0x5c29x18[_0xd587[238]](),_0x5c29x18[_0xd587[513]](0,-_0x5c29x4)}else {var _0x5c29x1a=Math[_0xd587[160]](0,_0x5c29x16[_0xd587[236]]- _0x5c29x9),_0x5c29x18=_0x5c29x18[_0xd587[238]]();_0x5c29x18[_0xd587[513]](0,-_0x5c29x14* _0x5c29x1a)}};_0x5c29x18!= _0x5c29x17[_0xd587[1721]](_0x5c29x2)&& (_0x5c29x17[_0xd587[1724]](_0x5c29x2,_0x5c29x18),_0x5c29x15&& _0x5c29x5[_0xd587[2508]](_0x5c29x2))}finally{_0x5c29x17[_0xd587[476]]()}}}};mxSpaceManager[_0xd587[202]][_0xd587[2769]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1703]](),_0x5c29x4=_0x5c29x3[_0xd587[502]]()[_0xd587[1197]](_0x5c29x2[_0xd587[246]]),_0x5c29x5=this[_0xd587[2766]](),_0x5c29x9=this[_0xd587[2764]]();return _0x5c29x3[_0xd587[2691]](_0x5c29x2[_0xd587[235]]+ (_0x5c29x5?0:_0x5c29x2[_0xd587[117]]),_0x5c29x2[_0xd587[236]]+ (_0x5c29x5&& _0x5c29x9?0:_0x5c29x2[_0xd587[119]]),_0x5c29x4,_0x5c29x9,_0x5c29x5)};mxSpaceManager[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[1178]](null)};function mxSwimlaneManager(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){this[_0xd587[662]]= null!= _0x5c29x3?_0x5c29x3:!0;this[_0xd587[2771]]= null!= _0x5c29x4?_0x5c29x4:!0;this[_0xd587[2772]]= null!= _0x5c29x5?_0x5c29x5:!0;this[_0xd587[2773]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x3){this[_0xd587[994]]()&& this[_0xd587[2774]]()&& this[_0xd587[833]](_0x5c29x3[_0xd587[720]](_0xd587[895]))});this[_0xd587[2758]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x3){this[_0xd587[994]]()&& this[_0xd587[2775]]()&& this[_0xd587[837]](_0x5c29x3[_0xd587[720]](_0xd587[895]))});this[_0xd587[1178]](_0x5c29x2)}mxSwimlaneManager[_0xd587[202]]=  new mxEventSource;mxSwimlaneManager[_0xd587[202]][_0xd587[196]]= mxSwimlaneManager;mxSwimlaneManager[_0xd587[202]][_0xd587[1179]]= null;mxSwimlaneManager[_0xd587[202]][_0xd587[984]]=  !0;mxSwimlaneManager[_0xd587[202]][_0xd587[662]]=  !0;mxSwimlaneManager[_0xd587[202]][_0xd587[2771]]=  !0;mxSwimlaneManager[_0xd587[202]][_0xd587[2772]]=  !0;mxSwimlaneManager[_0xd587[202]][_0xd587[2773]]= null;mxSwimlaneManager[_0xd587[202]][_0xd587[2758]]= null;mxSwimlaneManager[_0xd587[202]][_0xd587[994]]= function(){return this[_0xd587[984]]};mxSwimlaneManager[_0xd587[202]][_0xd587[995]]= function(_0x5c29x2){this[_0xd587[984]]= _0x5c29x2};mxSwimlaneManager[_0xd587[202]][_0xd587[1737]]= function(){return this[_0xd587[662]]};mxSwimlaneManager[_0xd587[202]][_0xd587[2776]]= function(_0x5c29x2){this[_0xd587[662]]= _0x5c29x2};mxSwimlaneManager[_0xd587[202]][_0xd587[2774]]= function(){return this[_0xd587[2771]]};mxSwimlaneManager[_0xd587[202]][_0xd587[2777]]= function(_0x5c29x2){this[_0xd587[2771]]= _0x5c29x2};mxSwimlaneManager[_0xd587[202]][_0xd587[2775]]= function(){return this[_0xd587[2772]]};mxSwimlaneManager[_0xd587[202]][_0xd587[2778]]= function(_0x5c29x2){this[_0xd587[2772]]= _0x5c29x2};mxSwimlaneManager[_0xd587[202]][_0xd587[1703]]= function(){return this[_0xd587[1179]]};mxSwimlaneManager[_0xd587[202]][_0xd587[1178]]= function(_0x5c29x2){null!= this[_0xd587[1179]]&& (this[_0xd587[1179]][_0xd587[745]](this[_0xd587[2773]]),this[_0xd587[1179]][_0xd587[745]](this[_0xd587[2758]]));this[_0xd587[1179]]= _0x5c29x2;null!= this[_0xd587[1179]]&& (this[_0xd587[1179]][_0xd587[169]](mxEvent.ADD_CELLS,this[_0xd587[2773]]),this[_0xd587[1179]][_0xd587[169]](mxEvent.CELLS_RESIZED,this[_0xd587[2758]]))};mxSwimlaneManager[_0xd587[202]][_0xd587[2779]]= function(_0x5c29x2){return !this[_0xd587[1703]]()[_0xd587[1730]](_0x5c29x2)};mxSwimlaneManager[_0xd587[202]][_0xd587[2780]]= function(_0x5c29x2){if(this[_0xd587[1179]][_0xd587[1730]](_0x5c29x2)){var _0x5c29x3=this[_0xd587[1179]][_0xd587[441]][_0xd587[248]](_0x5c29x2);_0x5c29x2= null!= _0x5c29x3?_0x5c29x3[_0xd587[124]]:this[_0xd587[1179]][_0xd587[1705]](_0x5c29x2);return 1== mxUtils[_0xd587[433]](_0x5c29x2,mxConstants.STYLE_HORIZONTAL,1)};return !this[_0xd587[1737]]()};mxSwimlaneManager[_0xd587[202]][_0xd587[833]]= function(_0x5c29x2){if(null!= _0x5c29x2){var _0x5c29x3=this[_0xd587[1703]]()[_0xd587[502]]();_0x5c29x3[_0xd587[473]]();try{for(var _0x5c29x4=0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){this[_0xd587[2779]](_0x5c29x2[_0x5c29x4])|| this[_0xd587[2781]](_0x5c29x2[_0x5c29x4])}}finally{_0x5c29x3[_0xd587[476]]()}}};mxSwimlaneManager[_0xd587[202]][_0xd587[2781]]= function(_0x5c29x2){for(var _0x5c29x3=this[_0xd587[1703]]()[_0xd587[502]](),_0x5c29x4=_0x5c29x3[_0xd587[1197]](_0x5c29x2),_0x5c29x5=_0x5c29x3[_0xd587[262]](_0x5c29x4),_0x5c29x9=null,_0x5c29xa=0;_0x5c29xa< _0x5c29x5;_0x5c29xa++){var _0x5c29x12=_0x5c29x3[_0xd587[263]](_0x5c29x4,_0x5c29xa);if(_0x5c29x12!= _0x5c29x2&& !this[_0xd587[2779]](_0x5c29x12)&& (_0x5c29x9= _0x5c29x3[_0xd587[1721]](_0x5c29x12),null!= _0x5c29x9)){break}};null!= _0x5c29x9&& this[_0xd587[2782]](_0x5c29x2,_0x5c29x9[_0xd587[117]],_0x5c29x9[_0xd587[119]])};mxSwimlaneManager[_0xd587[202]][_0xd587[837]]= function(_0x5c29x2){if(null!= _0x5c29x2){var _0x5c29x3=this[_0xd587[1703]]()[_0xd587[502]]();_0x5c29x3[_0xd587[473]]();try{for(var _0x5c29x4=0;_0x5c29x4< _0x5c29x2[_0xd587[67]];_0x5c29x4++){if(!this[_0xd587[2779]](_0x5c29x2[_0x5c29x4])){var _0x5c29x5=_0x5c29x3[_0xd587[1721]](_0x5c29x2[_0x5c29x4]);if(null!= _0x5c29x5){for(var _0x5c29x9= new mxRectangle(0,0,_0x5c29x5[_0xd587[117]],_0x5c29x5[_0xd587[119]]),_0x5c29xa=_0x5c29x2[_0x5c29x4],_0x5c29x12=_0x5c29xa;null!= _0x5c29x12;){var _0x5c29xa=_0x5c29x12,_0x5c29x12=_0x5c29x3[_0xd587[1197]](_0x5c29x12),_0x5c29x13=this[_0xd587[1179]][_0xd587[1730]](_0x5c29x12)?this[_0xd587[1179]][_0xd587[1731]](_0x5c29x12): new mxRectangle;_0x5c29x9[_0xd587[117]]+= _0x5c29x13[_0xd587[117]];_0x5c29x9[_0xd587[119]]+= _0x5c29x13[_0xd587[119]]};this[_0xd587[2782]](_0x5c29xa,_0x5c29x9[_0xd587[117]],_0x5c29x9[_0xd587[119]])}}}}finally{_0x5c29x3[_0xd587[476]]()}}};mxSwimlaneManager[_0xd587[202]][_0xd587[2782]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[1703]]()[_0xd587[502]]();_0x5c29x5[_0xd587[473]]();try{if(!this[_0xd587[2779]](_0x5c29x2)){var _0x5c29x9=_0x5c29x5[_0xd587[1721]](_0x5c29x2);if(null!= _0x5c29x9){var _0x5c29xa=this[_0xd587[2780]](_0x5c29x2);if(_0x5c29xa&& _0x5c29x9[_0xd587[119]]!= _0x5c29x4|| !_0x5c29xa&& _0x5c29x9[_0xd587[117]]!= _0x5c29x3){_0x5c29x9= _0x5c29x9[_0xd587[238]](),_0x5c29xa?_0x5c29x9[_0xd587[119]]= _0x5c29x4:_0x5c29x9[_0xd587[117]]= _0x5c29x3,_0x5c29x5[_0xd587[1724]](_0x5c29x2,_0x5c29x9)}}};var _0x5c29x12=this[_0xd587[1179]][_0xd587[1730]](_0x5c29x2)?this[_0xd587[1179]][_0xd587[1731]](_0x5c29x2): new mxRectangle;_0x5c29x3-= _0x5c29x12[_0xd587[117]];_0x5c29x4-= _0x5c29x12[_0xd587[119]];for(var _0x5c29x13=_0x5c29x5[_0xd587[262]](_0x5c29x2),_0x5c29x9=0;_0x5c29x9< _0x5c29x13;_0x5c29x9++){var _0x5c29x14=_0x5c29x5[_0xd587[263]](_0x5c29x2,_0x5c29x9);this[_0xd587[2782]](_0x5c29x14,_0x5c29x3,_0x5c29x4)}}finally{_0x5c29x5[_0xd587[476]]()}};mxSwimlaneManager[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[1178]](null)};function mxTemporaryCellStates(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[441]]= _0x5c29x2;_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:1;this[_0xd587[2783]]= _0x5c29x2[_0xd587[517]]();this[_0xd587[2784]]= _0x5c29x2[_0xd587[2312]]();this[_0xd587[2785]]= _0x5c29x2[_0xd587[518]]();_0x5c29x2[_0xd587[1517]]( new mxDictionary);_0x5c29x2[_0xd587[2262]](_0x5c29x3);if(null!= _0x5c29x4){_0x5c29x3= _0x5c29x2[_0xd587[1230]]( new mxCell);for(var _0x5c29x5=0;_0x5c29x5< _0x5c29x4[_0xd587[67]];_0x5c29x5++){_0x5c29x2[_0xd587[2267]](_0x5c29x3,_0x5c29x4[_0x5c29x5])};for(var _0x5c29x9=null,_0x5c29x5=0;_0x5c29x5< _0x5c29x4[_0xd587[67]];_0x5c29x5++){var _0x5c29xa=_0x5c29x2[_0xd587[2268]](_0x5c29x3,_0x5c29x4[_0x5c29x5]);null== _0x5c29x9?_0x5c29x9= _0x5c29xa:_0x5c29x9[_0xd587[99]](_0x5c29xa)};null== _0x5c29x9&& (_0x5c29x9=  new mxRectangle);_0x5c29x2[_0xd587[2256]](_0x5c29x9)}}mxTemporaryCellStates[_0xd587[202]][_0xd587[441]]= null;mxTemporaryCellStates[_0xd587[202]][_0xd587[2784]]= null;mxTemporaryCellStates[_0xd587[202]][_0xd587[2783]]= null;mxTemporaryCellStates[_0xd587[202]][_0xd587[2785]]= null;mxTemporaryCellStates[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[441]][_0xd587[2262]](this[_0xd587[2785]]);this[_0xd587[441]][_0xd587[1517]](this[_0xd587[2784]]);this[_0xd587[441]][_0xd587[2256]](this[_0xd587[2783]])};function mxCellStatePreview(_0x5c29x2){this[_0xd587[1179]]= _0x5c29x2;this[_0xd587[2786]]= {}}mxCellStatePreview[_0xd587[202]][_0xd587[1179]]= null;mxCellStatePreview[_0xd587[202]][_0xd587[2786]]= null;mxCellStatePreview[_0xd587[202]][_0xd587[2787]]= 0;mxCellStatePreview[_0xd587[202]][_0xd587[1107]]= function(){return 0== this[_0xd587[2787]]};mxCellStatePreview[_0xd587[202]][_0xd587[1194]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x5= null!= _0x5c29x5?_0x5c29x5:!0;_0x5c29x9= null!= _0x5c29x9?_0x5c29x9:!0;var _0x5c29xa=mxCellPath[_0xd587[385]](_0x5c29x2[_0xd587[246]]),_0x5c29x12=this[_0xd587[2786]][_0x5c29xa];null== _0x5c29x12?(_0x5c29x12=  new mxPoint(_0x5c29x3,_0x5c29x4),this[_0xd587[2786]][_0x5c29xa]= _0x5c29x12,this[_0xd587[2787]]++):_0x5c29x5?(_0x5c29x12[_0xd587[2788]]+= _0x5c29x3,_0x5c29x12[_0xd587[2789]]+= _0x5c29x4):(_0x5c29x12[_0xd587[2788]]= _0x5c29x3,_0x5c29x12[_0xd587[2789]]= _0x5c29x4);_0x5c29x9&& this[_0xd587[2790]](_0x5c29x2);return _0x5c29x12};mxCellStatePreview[_0xd587[202]][_0xd587[539]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x4=_0x5c29x3[_0xd587[501]](),_0x5c29x5;for(_0x5c29x5 in this[_0xd587[2786]]){var _0x5c29x9=mxCellPath[_0xd587[2791]](_0x5c29x4,_0x5c29x5),_0x5c29xa=this[_0xd587[1179]][_0xd587[441]][_0xd587[248]](_0x5c29x9),_0x5c29x12=this[_0xd587[2786]][_0x5c29x5],_0x5c29x9=this[_0xd587[1179]][_0xd587[441]][_0xd587[248]](_0x5c29x3[_0xd587[1197]](_0x5c29x9));this[_0xd587[2792]](_0x5c29x9,_0x5c29xa,_0x5c29x12[_0xd587[235]],_0x5c29x12[_0xd587[236]])};for(_0x5c29x5 in this[_0xd587[2786]]){_0x5c29x9= mxCellPath[_0xd587[2791]](_0x5c29x4,_0x5c29x5),_0x5c29xa= this[_0xd587[1179]][_0xd587[441]][_0xd587[248]](_0x5c29x9),_0x5c29x12= this[_0xd587[2786]][_0x5c29x5],_0x5c29x9= this[_0xd587[1179]][_0xd587[441]][_0xd587[248]](_0x5c29x3[_0xd587[1197]](_0x5c29x9)),this[_0xd587[2793]](_0x5c29x9,_0x5c29xa,_0x5c29x12[_0xd587[235]],_0x5c29x12[_0xd587[236]],_0x5c29x2)}};mxCellStatePreview[_0xd587[202]][_0xd587[2792]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){if(null!= _0x5c29x3){var _0x5c29x9=this[_0xd587[1179]][_0xd587[502]]();if(_0x5c29x9[_0xd587[1193]](_0x5c29x3[_0xd587[246]])){_0x5c29x3[_0xd587[2080]]=  !0;this[_0xd587[1179]][_0xd587[441]][_0xd587[2267]](_0x5c29x2,_0x5c29x3[_0xd587[246]]);_0x5c29x2= _0x5c29x9[_0xd587[1721]](_0x5c29x3[_0xd587[246]]);var _0x5c29xa=mxCellPath[_0xd587[385]](_0x5c29x3[_0xd587[246]]);if((0!= _0x5c29x4|| 0!= _0x5c29x5)&& null!= _0x5c29x2&& (!_0x5c29x2[_0xd587[1500]]|| null!= this[_0xd587[2786]][_0x5c29xa])){_0x5c29x3[_0xd587[235]]+= _0x5c29x4,_0x5c29x3[_0xd587[236]]+= _0x5c29x5}};_0x5c29x2= _0x5c29x9[_0xd587[262]](_0x5c29x3[_0xd587[246]]);for(_0x5c29xa= 0;_0x5c29xa< _0x5c29x2;_0x5c29xa++){this[_0xd587[2792]](_0x5c29x3,this[_0xd587[1179]][_0xd587[441]][_0xd587[248]](_0x5c29x9[_0xd587[263]](_0x5c29x3[_0xd587[246]],_0x5c29xa)),_0x5c29x4,_0x5c29x5)}}};mxCellStatePreview[_0xd587[202]][_0xd587[2793]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){if(null!= _0x5c29x3){_0x5c29x3[_0xd587[2080]]=  !0;this[_0xd587[1179]][_0xd587[441]][_0xd587[2268]](_0x5c29x2,_0x5c29x3[_0xd587[246]]);var _0x5c29xa=mxCellPath[_0xd587[385]](_0x5c29x3[_0xd587[246]]),_0x5c29x12=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x13=this[_0xd587[1179]][_0xd587[1198]](_0x5c29x3[_0xd587[246]]);if((0!= _0x5c29x4|| 0!= _0x5c29x5)&& null!= _0x5c29x13&& _0x5c29x13[_0xd587[1500]]&& _0x5c29x12[_0xd587[1193]](_0x5c29x3[_0xd587[246]])&& (null== _0x5c29x2|| _0x5c29x12[_0xd587[1193]](_0x5c29x2[_0xd587[246]])|| null!= this[_0xd587[2786]][_0x5c29xa])){_0x5c29x3[_0xd587[235]]+= _0x5c29x4,_0x5c29x3[_0xd587[236]]+= _0x5c29x5,this[_0xd587[1179]][_0xd587[259]][_0xd587[258]](_0x5c29x3)};null!= _0x5c29x9&& _0x5c29x9(_0x5c29x3);_0x5c29x2= _0x5c29x12[_0xd587[262]](_0x5c29x3[_0xd587[246]]);for(_0x5c29xa= 0;_0x5c29xa< _0x5c29x2;_0x5c29xa++){this[_0xd587[2793]](_0x5c29x3,this[_0xd587[1179]][_0xd587[441]][_0xd587[248]](_0x5c29x12[_0xd587[263]](_0x5c29x3[_0xd587[246]],_0x5c29xa)),_0x5c29x4,_0x5c29x5,_0x5c29x9)}}};mxCellStatePreview[_0xd587[202]][_0xd587[2790]]= function(_0x5c29x2){for(var _0x5c29x3=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x4=_0x5c29x3[_0xd587[1707]](_0x5c29x2[_0xd587[246]]),_0x5c29x5=0;_0x5c29x5< _0x5c29x4;_0x5c29x5++){var _0x5c29x9=this[_0xd587[1179]][_0xd587[441]][_0xd587[248]](_0x5c29x3[_0xd587[1708]](_0x5c29x2[_0xd587[246]],_0x5c29x5));null!= _0x5c29x9&& this[_0xd587[1194]](_0x5c29x9,0,0)}};function mxConnectionConstraint(_0x5c29x2,_0x5c29x3){this[_0xd587[2546]]= _0x5c29x2;this[_0xd587[591]]= null!= _0x5c29x3?_0x5c29x3:!0}mxConnectionConstraint[_0xd587[202]][_0xd587[2546]]= null;mxConnectionConstraint[_0xd587[202]][_0xd587[591]]= null;function mxGraphHandler(_0x5c29x2){this[_0xd587[1179]]= _0x5c29x2;this[_0xd587[1179]][_0xd587[1133]](this);this[_0xd587[2730]]= mxUtils[_0xd587[885]](this,function(){this[_0xd587[2794]]()});this[_0xd587[1179]][_0xd587[169]](mxEvent.PAN,this[_0xd587[2730]])}mxGraphHandler[_0xd587[202]][_0xd587[1179]]= null;mxGraphHandler[_0xd587[202]][_0xd587[2795]]= mxClient[_0xd587[80]]?20:50;mxGraphHandler[_0xd587[202]][_0xd587[984]]=  !0;mxGraphHandler[_0xd587[202]][_0xd587[2796]]=  !0;mxGraphHandler[_0xd587[202]][_0xd587[2797]]=  !0;mxGraphHandler[_0xd587[202]][_0xd587[2798]]=  !0;mxGraphHandler[_0xd587[202]][_0xd587[990]]=  !1;mxGraphHandler[_0xd587[202]][_0xd587[2799]]= null;mxGraphHandler[_0xd587[202]][_0xd587[2800]]= null;mxGraphHandler[_0xd587[202]][_0xd587[2801]]= null;mxGraphHandler[_0xd587[202]][_0xd587[2802]]=  !0;mxGraphHandler[_0xd587[202]][_0xd587[2803]]=  !0;mxGraphHandler[_0xd587[202]][_0xd587[846]]=  !0;mxGraphHandler[_0xd587[202]][_0xd587[2804]]=  !1;mxGraphHandler[_0xd587[202]][_0xd587[2805]]=  !0;mxGraphHandler[_0xd587[202]][_0xd587[923]]= 6;mxGraphHandler[_0xd587[202]][_0xd587[2806]]= _0xd587[586];mxGraphHandler[_0xd587[202]][_0xd587[2807]]=  !1;mxGraphHandler[_0xd587[202]][_0xd587[253]]= null;mxGraphHandler[_0xd587[202]][_0xd587[2808]]=  !1;mxGraphHandler[_0xd587[202]][_0xd587[2809]]=  !0;mxGraphHandler[_0xd587[202]][_0xd587[994]]= function(){return this[_0xd587[984]]};mxGraphHandler[_0xd587[202]][_0xd587[995]]= function(_0x5c29x2){this[_0xd587[984]]= _0x5c29x2};mxGraphHandler[_0xd587[202]][_0xd587[2810]]= function(){return this[_0xd587[2797]]};mxGraphHandler[_0xd587[202]][_0xd587[2811]]= function(_0x5c29x2){this[_0xd587[2797]]= _0x5c29x2};mxGraphHandler[_0xd587[202]][_0xd587[2812]]= function(){return this[_0xd587[2798]]};mxGraphHandler[_0xd587[202]][_0xd587[2813]]= function(_0x5c29x2){this[_0xd587[2798]]= _0x5c29x2};mxGraphHandler[_0xd587[202]][_0xd587[2814]]= function(){return this[_0xd587[2803]]};mxGraphHandler[_0xd587[202]][_0xd587[2815]]= function(_0x5c29x2){this[_0xd587[2803]]= _0x5c29x2};mxGraphHandler[_0xd587[202]][_0xd587[2816]]= function(){return this[_0xd587[846]]};mxGraphHandler[_0xd587[202]][_0xd587[2817]]= function(_0x5c29x2){this[_0xd587[846]]= _0x5c29x2};mxGraphHandler[_0xd587[202]][_0xd587[2818]]= function(_0x5c29x2){return _0x5c29x2[_0xd587[736]]()};mxGraphHandler[_0xd587[202]][_0xd587[2819]]= function(_0x5c29x2){return this[_0xd587[1179]][_0xd587[2692]](_0x5c29x2)};mxGraphHandler[_0xd587[202]][_0xd587[787]]= function(_0x5c29x2,_0x5c29x3){if(!_0x5c29x3[_0xd587[721]]()&& this[_0xd587[994]]()&& this[_0xd587[1179]][_0xd587[994]]()&& !this[_0xd587[1179]][_0xd587[2579]](_0x5c29x3[_0xd587[727]]())&& null!= _0x5c29x3[_0xd587[248]]()){var _0x5c29x4=this[_0xd587[2818]](_0x5c29x3);this[_0xd587[246]]= null;this[_0xd587[2820]]= this[_0xd587[2819]](_0x5c29x4);this[_0xd587[2814]]()&& !this[_0xd587[2820]]&& this[_0xd587[1179]][_0xd587[2459]](_0x5c29x4,_0x5c29x3[_0xd587[727]]());if(this[_0xd587[2812]]()){var _0x5c29x5=this[_0xd587[1179]][_0xd587[251]],_0x5c29x9=_0x5c29x5[_0xd587[1721]](_0x5c29x4);this[_0xd587[1179]][_0xd587[1712]](_0x5c29x4)&& (!_0x5c29x5[_0xd587[250]](_0x5c29x4)|| 1< this[_0xd587[1179]][_0xd587[2694]]()|| null!= _0x5c29x9[_0xd587[1525]]&& 0< _0x5c29x9[_0xd587[1525]][_0xd587[67]]|| null== _0x5c29x5[_0xd587[1709]](_0x5c29x4,!0)|| null== _0x5c29x5[_0xd587[1709]](_0x5c29x4,!1)|| this[_0xd587[1179]][_0xd587[2406]]|| this[_0xd587[1179]][_0xd587[2574]](_0x5c29x3[_0xd587[727]]())&& this[_0xd587[1179]][_0xd587[2617]]())&& this[_0xd587[861]](_0x5c29x4,_0x5c29x3[_0xd587[730]](),_0x5c29x3[_0xd587[732]]());this[_0xd587[2821]]=  !0;!mxClient[_0xd587[75]]&& !mxClient[_0xd587[76]]|| _0xd587[2822]!= _0x5c29x3[_0xd587[728]]()[_0xd587[301]]?_0x5c29x3[_0xd587[722]]():mxClient[_0xd587[75]]&& _0xd587[2822]== _0x5c29x3[_0xd587[728]]()[_0xd587[301]]&& (this[_0xd587[2821]]=  !1,this[_0xd587[2823]]= null)}}};mxGraphHandler[_0xd587[202]][_0xd587[1010]]= function(){var _0x5c29x2=this[_0xd587[1179]][_0xd587[902]](),_0x5c29x3=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x4=mxUtils[_0xd587[885]](this,function(_0x5c29x2){return null!= this[_0xd587[1179]][_0xd587[441]][_0xd587[248]](_0x5c29x2)&& _0x5c29x3[_0xd587[1193]](_0x5c29x2)&& null!= _0x5c29x3[_0xd587[1721]](_0x5c29x2)&& !_0x5c29x3[_0xd587[1721]](_0x5c29x2)[_0xd587[1500]]});return this[_0xd587[1179]][_0xd587[441]][_0xd587[2313]](_0x5c29x3[_0xd587[1921]](_0x5c29x4,_0x5c29x2))};mxGraphHandler[_0xd587[202]][_0xd587[2690]]= function(_0x5c29x2){return !this[_0xd587[2820]]&& this[_0xd587[1179]][_0xd587[1712]](_0x5c29x2)?[_0x5c29x2]:this[_0xd587[1179]][_0xd587[2629]](this[_0xd587[1179]][_0xd587[897]]())};mxGraphHandler[_0xd587[202]][_0xd587[2824]]= function(_0x5c29x2){_0x5c29x2= this[_0xd587[1613]](_0x5c29x2);null!= _0x5c29x2&& (_0x5c29x2[_0xd587[244]](-1,-1),_0x5c29x2[_0xd587[117]]< this[_0xd587[923]]&& (_0x5c29x2[_0xd587[235]]-= (this[_0xd587[923]]- _0x5c29x2[_0xd587[117]])/ 2,_0x5c29x2[_0xd587[117]]= this[_0xd587[923]]),_0x5c29x2[_0xd587[119]]< this[_0xd587[923]]&& (_0x5c29x2[_0xd587[236]]-= (this[_0xd587[923]]- _0x5c29x2[_0xd587[119]])/ 2,_0x5c29x2[_0xd587[119]]= this[_0xd587[923]]));return _0x5c29x2};mxGraphHandler[_0xd587[202]][_0xd587[1613]]= function(_0x5c29x2){var _0x5c29x3=null;if(null!= _0x5c29x2&& 0< _0x5c29x2[_0xd587[67]]){for(var _0x5c29x4=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x5=0;_0x5c29x5< _0x5c29x2[_0xd587[67]];_0x5c29x5++){if(_0x5c29x4[_0xd587[1193]](_0x5c29x2[_0x5c29x5])|| _0x5c29x4[_0xd587[250]](_0x5c29x2[_0x5c29x5])){var _0x5c29x9=this[_0xd587[1179]][_0xd587[441]][_0xd587[248]](_0x5c29x2[_0x5c29x5]);if(null!= _0x5c29x9){var _0x5c29xa=_0x5c29x9;_0x5c29x4[_0xd587[1193]](_0x5c29x2[_0x5c29x5])&& (null!= _0x5c29x9[_0xd587[253]]&& null!= _0x5c29x9[_0xd587[253]][_0xd587[1563]])&& (_0x5c29xa= _0x5c29x9[_0xd587[253]][_0xd587[1563]]);null== _0x5c29x3?_0x5c29x3=  new mxRectangle(_0x5c29xa[_0xd587[235]],_0x5c29xa[_0xd587[236]],_0x5c29xa[_0xd587[117]],_0x5c29xa[_0xd587[119]]):_0x5c29x3[_0xd587[99]](_0x5c29xa)}}}};return _0x5c29x3};mxGraphHandler[_0xd587[202]][_0xd587[2825]]= function(_0x5c29x2){_0x5c29x2=  new mxRectangleShape(_0x5c29x2,null,this[_0xd587[2806]]);_0x5c29x2[_0xd587[1522]]=  !0;this[_0xd587[2807]]?(_0x5c29x2[_0xd587[507]]= mxConstants[_0xd587[1656]],_0x5c29x2[_0xd587[176]](this[_0xd587[1179]][_0xd587[526]])):(_0x5c29x2[_0xd587[507]]= this[_0xd587[1179]][_0xd587[507]]!= mxConstants[_0xd587[508]]?mxConstants[_0xd587[1523]]:mxConstants[_0xd587[508]],_0x5c29x2[_0xd587[176]](this[_0xd587[1179]][_0xd587[249]]()[_0xd587[1524]]()),_0x5c29x2[_0xd587[1229]]=  !1);return _0x5c29x2};mxGraphHandler[_0xd587[202]][_0xd587[861]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[246]]= _0x5c29x2;this[_0xd587[2823]]= mxUtils[_0xd587[2196]](this[_0xd587[1179]][_0xd587[526]],_0x5c29x3,_0x5c29x4);this[_0xd587[895]]= this[_0xd587[2690]](this[_0xd587[246]]);this[_0xd587[1562]]= this[_0xd587[1179]][_0xd587[249]]()[_0xd587[1799]](this[_0xd587[895]]);this[_0xd587[2826]]= this[_0xd587[2824]](this[_0xd587[895]]);this[_0xd587[990]]&& (this[_0xd587[2799]]=  new mxGuide(this[_0xd587[1179]],this[_0xd587[1010]]()))};mxGraphHandler[_0xd587[202]][_0xd587[2827]]= function(_0x5c29x2){return null!= this[_0xd587[2799]]?this[_0xd587[2799]][_0xd587[1019]](_0x5c29x2[_0xd587[727]]()):!0};mxGraphHandler[_0xd587[202]][_0xd587[1021]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[2808]]?this[_0xd587[1179]][_0xd587[441]][_0xd587[255]]:1;_0x5c29x2[_0xd587[235]]= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x2[_0xd587[235]]/ _0x5c29x3)* _0x5c29x3;_0x5c29x2[_0xd587[236]]= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x2[_0xd587[236]]/ _0x5c29x3)* _0x5c29x3;return _0x5c29x2};mxGraphHandler[_0xd587[202]][_0xd587[788]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1179]];if(!_0x5c29x3[_0xd587[721]]()&& _0x5c29x4[_0xd587[1009]]&& null!= this[_0xd587[246]]&& null!= this[_0xd587[2823]]&& null!= this[_0xd587[1562]]){var _0x5c29x5=mxUtils[_0xd587[2196]](_0x5c29x4[_0xd587[526]],_0x5c29x3[_0xd587[730]](),_0x5c29x3[_0xd587[732]]()),_0x5c29x9=_0x5c29x5[_0xd587[235]]- this[_0xd587[2823]][_0xd587[235]],_0x5c29xa=_0x5c29x5[_0xd587[236]]- this[_0xd587[2823]][_0xd587[236]],_0x5c29x5=_0x5c29x4[_0xd587[2353]];if(null!= this[_0xd587[253]]|| Math[_0xd587[425]](_0x5c29x9)> _0x5c29x5|| Math[_0xd587[425]](_0x5c29xa)> _0x5c29x5){null== this[_0xd587[1016]]&& (this[_0xd587[1016]]=  new mxCellHighlight(this[_0xd587[1179]],mxConstants.DROP_TARGET_COLOR,3));null== this[_0xd587[253]]&& (this[_0xd587[253]]= this[_0xd587[2825]](this[_0xd587[1562]]));var _0x5c29x12=_0x5c29x4[_0xd587[1018]](_0x5c29x3[_0xd587[727]]()),_0x5c29x5=!0;if(null!= this[_0xd587[2799]]&& this[_0xd587[2827]](_0x5c29x3)){_0x5c29xa= this[_0xd587[2799]][_0xd587[582]](this[_0xd587[1562]], new mxPoint(_0x5c29x9,_0x5c29xa),_0x5c29x12),_0x5c29x5=  !1,_0x5c29x9= _0x5c29xa[_0xd587[235]],_0x5c29xa= _0x5c29xa[_0xd587[236]]}else {if(_0x5c29x12){var _0x5c29x13=_0x5c29x4[_0xd587[249]]()[_0xd587[513]],_0x5c29x14=_0x5c29x4[_0xd587[249]]()[_0xd587[255]],_0x5c29x12=this[_0xd587[1562]][_0xd587[235]]- (_0x5c29x4[_0xd587[1021]](this[_0xd587[1562]][_0xd587[235]]/ _0x5c29x14- _0x5c29x13[_0xd587[235]])+ _0x5c29x13[_0xd587[235]])* _0x5c29x14,_0x5c29x13=this[_0xd587[1562]][_0xd587[236]]- (_0x5c29x4[_0xd587[1021]](this[_0xd587[1562]][_0xd587[236]]/ _0x5c29x14- _0x5c29x13[_0xd587[236]])+ _0x5c29x13[_0xd587[236]])* _0x5c29x14,_0x5c29xa=this[_0xd587[1021]]( new mxPoint(_0x5c29x9,_0x5c29xa)),_0x5c29x9=_0x5c29xa[_0xd587[235]]- _0x5c29x12,_0x5c29xa=_0x5c29xa[_0xd587[236]]- _0x5c29x13}};null!= this[_0xd587[2799]]&& _0x5c29x5&& this[_0xd587[2799]][_0xd587[801]]();_0x5c29x4[_0xd587[2578]](_0x5c29x3[_0xd587[727]]())&& (Math[_0xd587[425]](_0x5c29x9)> Math[_0xd587[425]](_0x5c29xa)?_0x5c29xa= 0:_0x5c29x9= 0);this[_0xd587[2800]]= _0x5c29x9;this[_0xd587[2801]]= _0x5c29xa;this[_0xd587[2794]]();_0x5c29x5= null;_0x5c29xa= _0x5c29x3[_0xd587[736]]();_0x5c29x4[_0xd587[1015]]()&& this[_0xd587[2796]]&& (_0x5c29x5= _0x5c29x4[_0xd587[564]](this[_0xd587[895]],_0x5c29x3[_0xd587[727]](),_0x5c29xa));_0x5c29x12= _0x5c29x5;for(_0x5c29x13= _0x5c29x4[_0xd587[502]]();null!= _0x5c29x12&& _0x5c29x12!= this[_0xd587[895]][0];){_0x5c29x12= _0x5c29x13[_0xd587[1197]](_0x5c29x12)};var _0x5c29x14=_0x5c29x4[_0xd587[2574]](_0x5c29x3[_0xd587[727]]())&& _0x5c29x4[_0xd587[2617]]()&& this[_0xd587[2810]](),_0x5c29x9=_0x5c29x4[_0xd587[249]]()[_0xd587[248]](_0x5c29x5),_0x5c29x15=!1;null!= _0x5c29x9&& null== _0x5c29x12&& (_0x5c29x13[_0xd587[1197]](this[_0xd587[246]])!= _0x5c29x5|| _0x5c29x14)?(this[_0xd587[772]]!= _0x5c29x5&& (this[_0xd587[772]]= _0x5c29x5,this[_0xd587[2828]](mxConstants.DROP_TARGET_COLOR)),_0x5c29x15=  !0):(this[_0xd587[772]]= null,this[_0xd587[2804]]&& (null!= _0x5c29xa&& 1== this[_0xd587[895]][_0xd587[67]]&& _0x5c29x4[_0xd587[502]]()[_0xd587[1193]](_0x5c29xa)&& _0x5c29x4[_0xd587[2565]](_0x5c29xa))&& (_0x5c29x9= _0x5c29x4[_0xd587[249]]()[_0xd587[248]](_0x5c29xa),null!= _0x5c29x9&& (_0x5c29x4= null== _0x5c29x4[_0xd587[2500]](null,this[_0xd587[246]],_0x5c29xa)?mxConstants[_0xd587[2829]]:mxConstants[_0xd587[2830]],this[_0xd587[2828]](_0x5c29x4),_0x5c29x15=  !0)));null!= _0x5c29x9&& _0x5c29x15?this[_0xd587[1016]][_0xd587[1016]](_0x5c29x9):this[_0xd587[1016]][_0xd587[801]]()};_0x5c29x3[_0xd587[722]]();mxEvent[_0xd587[722]](_0x5c29x3[_0xd587[727]]())}else {if((this[_0xd587[2812]]()|| this[_0xd587[2810]]())&& this[_0xd587[2802]]&& !_0x5c29x3[_0xd587[721]]()&& null!= _0x5c29x3[_0xd587[248]]()&& !_0x5c29x4[_0xd587[1009]]){_0x5c29x9= _0x5c29x4[_0xd587[2599]](_0x5c29x3[_0xd587[736]]()),null== _0x5c29x9&& (_0x5c29x4[_0xd587[994]]()&& _0x5c29x4[_0xd587[1712]](_0x5c29x3[_0xd587[736]]()))&& (_0x5c29x9= _0x5c29x4[_0xd587[502]]()[_0xd587[250]](_0x5c29x3[_0xd587[736]]())?mxConstants[_0xd587[2831]]:mxConstants[_0xd587[2832]]),_0x5c29x3[_0xd587[248]]()[_0xd587[1609]](_0x5c29x9),_0x5c29x3[_0xd587[722]]()}}};mxGraphHandler[_0xd587[202]][_0xd587[2794]]= function(){null!= this[_0xd587[253]]&& (this[_0xd587[253]][_0xd587[1562]]=  new mxRectangle(Math[_0xd587[488]](this[_0xd587[2826]][_0xd587[235]]+ this[_0xd587[2800]]- this[_0xd587[1179]][_0xd587[1136]]),Math[_0xd587[488]](this[_0xd587[2826]][_0xd587[236]]+ this[_0xd587[2801]]- this[_0xd587[1179]][_0xd587[1137]]),this[_0xd587[2826]][_0xd587[117]],this[_0xd587[2826]][_0xd587[119]]),this[_0xd587[253]][_0xd587[258]]())};mxGraphHandler[_0xd587[202]][_0xd587[2828]]= function(_0x5c29x2){null!= this[_0xd587[1016]]&& this[_0xd587[1016]][_0xd587[2828]](_0x5c29x2)};mxGraphHandler[_0xd587[202]][_0xd587[789]]= function(_0x5c29x2,_0x5c29x3){if(!_0x5c29x3[_0xd587[721]]()){var _0x5c29x4=this[_0xd587[1179]];if(null!= this[_0xd587[246]]&& null!= this[_0xd587[2823]]&& null!= this[_0xd587[253]]&& null!= this[_0xd587[2800]]&& null!= this[_0xd587[2801]]){var _0x5c29x5=_0x5c29x4[_0xd587[249]]()[_0xd587[255]],_0x5c29x9=_0x5c29x4[_0xd587[2574]](_0x5c29x3[_0xd587[727]]())&& _0x5c29x4[_0xd587[2617]]()&& this[_0xd587[2810]](),_0x5c29xa=this[_0xd587[2800]]/ _0x5c29x5,_0x5c29x5=this[_0xd587[2801]]/ _0x5c29x5,_0x5c29x12=_0x5c29x3[_0xd587[736]]();this[_0xd587[2804]]&& null== this[_0xd587[772]]&& null!= _0x5c29x12&& _0x5c29x4[_0xd587[502]]()[_0xd587[1193]](_0x5c29x12)&& _0x5c29x4[_0xd587[2565]](_0x5c29x12)&& _0x5c29x4[_0xd587[2581]](null,this[_0xd587[246]],_0x5c29x12)?_0x5c29x4[_0xd587[2433]][_0xd587[807]](this[_0xd587[246]],_0x5c29x12,_0x5c29x3[_0xd587[727]]()):(_0x5c29x12= this[_0xd587[772]],_0x5c29x4[_0xd587[2655]]()&& _0x5c29x4[_0xd587[2686]](_0x5c29x12,this[_0xd587[895]],_0x5c29x3[_0xd587[727]]())?_0x5c29x4[_0xd587[853]](_0x5c29x12,this[_0xd587[895]],null,_0x5c29xa,_0x5c29x5):this[_0xd587[834]](this[_0xd587[895]],_0x5c29xa,_0x5c29x5,_0x5c29x9,this[_0xd587[772]],_0x5c29x3[_0xd587[727]]()))}else {this[_0xd587[2814]]()&& (this[_0xd587[2820]]&& null!= this[_0xd587[246]])&& this[_0xd587[2833]](_0x5c29x3)}};this[_0xd587[2821]]&& _0x5c29x3[_0xd587[722]]();this[_0xd587[862]]()};mxGraphHandler[_0xd587[202]][_0xd587[2833]]= function(_0x5c29x2){this[_0xd587[1179]][_0xd587[2459]](this[_0xd587[246]],_0x5c29x2[_0xd587[727]]())};mxGraphHandler[_0xd587[202]][_0xd587[862]]= function(){this[_0xd587[2834]]();this[_0xd587[2820]]= this[_0xd587[2821]]=  !1;this[_0xd587[772]]= this[_0xd587[246]]= this[_0xd587[2823]]= this[_0xd587[2835]]= this[_0xd587[2801]]= this[_0xd587[2800]]= null};mxGraphHandler[_0xd587[202]][_0xd587[2836]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){if(this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1193]](_0x5c29x2)){_0x5c29x2= this[_0xd587[1179]][_0xd587[249]]()[_0xd587[248]](_0x5c29x2);_0x5c29x4= mxUtils[_0xd587[2196]](this[_0xd587[1179]][_0xd587[526]],mxEvent[_0xd587[731]](_0x5c29x4),mxEvent[_0xd587[733]](_0x5c29x4));var _0x5c29x5=mxUtils[_0xd587[431]](mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_ROTATION)|| 0);if(0!= _0x5c29x5){_0x5c29x3= Math[_0xd587[426]](-_0x5c29x5);var _0x5c29x5=Math[_0xd587[427]](-_0x5c29x5),_0x5c29x9= new mxPoint(_0x5c29x2[_0xd587[241]](),_0x5c29x2[_0xd587[242]]());_0x5c29x4= mxUtils[_0xd587[432]](_0x5c29x4,_0x5c29x3,_0x5c29x5,_0x5c29x9)};return null!= _0x5c29x2&& !mxUtils[_0xd587[442]](_0x5c29x2,_0x5c29x4[_0xd587[235]],_0x5c29x4[_0xd587[236]])};return !1};mxGraphHandler[_0xd587[202]][_0xd587[834]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){_0x5c29x5&& (_0x5c29x2= this[_0xd587[1179]][_0xd587[2615]](_0x5c29x2));null== _0x5c29x9&& (this[_0xd587[2816]]()&& this[_0xd587[2836]](this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1197]](this[_0xd587[246]]),_0x5c29x2,_0x5c29xa))&& (_0x5c29x9= this[_0xd587[1179]][_0xd587[902]]());_0x5c29x2= this[_0xd587[1179]][_0xd587[834]](_0x5c29x2,_0x5c29x3- this[_0xd587[1179]][_0xd587[1136]]/ this[_0xd587[1179]][_0xd587[441]][_0xd587[255]],_0x5c29x4- this[_0xd587[1179]][_0xd587[1137]]/ this[_0xd587[1179]][_0xd587[441]][_0xd587[255]],_0x5c29x5,_0x5c29x9,_0x5c29xa);this[_0xd587[2814]]()&& this[_0xd587[2805]]&& this[_0xd587[1179]][_0xd587[2564]](_0x5c29x2[0]);_0x5c29x5&& this[_0xd587[1179]][_0xd587[904]](_0x5c29x2)};mxGraphHandler[_0xd587[202]][_0xd587[2834]]= function(){null!= this[_0xd587[253]]&& (this[_0xd587[253]][_0xd587[515]](),this[_0xd587[253]]= null);null!= this[_0xd587[2799]]&& (this[_0xd587[2799]][_0xd587[515]](),this[_0xd587[2799]]= null);null!= this[_0xd587[1016]]&& (this[_0xd587[1016]][_0xd587[515]](),this[_0xd587[1016]]= null)};mxGraphHandler[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[1179]][_0xd587[1148]](this);this[_0xd587[1179]][_0xd587[745]](this[_0xd587[2730]]);this[_0xd587[2834]]()};function mxPanningHandler(_0x5c29x2,_0x5c29x3){null!= _0x5c29x2&& (this[_0xd587[1179]]= _0x5c29x2,this[_0xd587[1033]]= _0x5c29x3,this[_0xd587[1179]][_0xd587[1133]](this),this[_0xd587[176]]())}mxPanningHandler[_0xd587[202]]=  new mxPopupMenu;mxPanningHandler[_0xd587[202]][_0xd587[196]]= mxPanningHandler;mxPanningHandler[_0xd587[202]][_0xd587[1179]]= null;mxPanningHandler[_0xd587[202]][_0xd587[2837]]= null;mxPanningHandler[_0xd587[202]][_0xd587[2838]]= null;mxPanningHandler[_0xd587[202]][_0xd587[2839]]=  !0;mxPanningHandler[_0xd587[202]][_0xd587[2840]]=  !1;mxPanningHandler[_0xd587[202]][_0xd587[2841]]=  !0;mxPanningHandler[_0xd587[202]][_0xd587[2842]]=  !0;mxPanningHandler[_0xd587[202]][_0xd587[2843]]=  !1;mxPanningHandler[_0xd587[202]][_0xd587[2844]]=  !0;mxPanningHandler[_0xd587[202]][_0xd587[2845]]=  !1;mxPanningHandler[_0xd587[202]][_0xd587[2431]]=  !0;mxPanningHandler[_0xd587[202]][_0xd587[2846]]= function(){return this[_0xd587[2431]]};mxPanningHandler[_0xd587[202]][_0xd587[2847]]= function(_0x5c29x2){this[_0xd587[2431]]= _0x5c29x2};mxPanningHandler[_0xd587[202]][_0xd587[176]]= function(){mxPopupMenu[_0xd587[202]][_0xd587[176]][_0xd587[183]](this);mxEvent[_0xd587[169]](this[_0xd587[485]],mxClient[_0xd587[754]]?_0xd587[756]:_0xd587[752],mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[1179]][_0xd587[2276]][_0xd587[801]]()}))};mxPanningHandler[_0xd587[202]][_0xd587[2848]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[727]]();return this[_0xd587[2840]]&& (this[_0xd587[2843]]|| null== _0x5c29x2[_0xd587[248]]())&& mxEvent[_0xd587[1158]](_0x5c29x3)|| mxEvent[_0xd587[775]](_0x5c29x3)&& mxEvent[_0xd587[774]](_0x5c29x3)|| this[_0xd587[2839]]&& mxEvent[_0xd587[737]](_0x5c29x3)};mxPanningHandler[_0xd587[202]][_0xd587[787]]= function(_0x5c29x2,_0x5c29x3){if(!_0x5c29x3[_0xd587[721]]()&& this[_0xd587[994]]()){this[_0xd587[1032]]();this[_0xd587[2741]]= -this[_0xd587[1179]][_0xd587[526]][_0xd587[360]];this[_0xd587[2742]]= -this[_0xd587[1179]][_0xd587[526]][_0xd587[190]];var _0x5c29x4=mxUtils[_0xd587[2196]](this[_0xd587[1179]][_0xd587[526]],_0x5c29x3[_0xd587[730]](),_0x5c29x3[_0xd587[732]]());this[_0xd587[2837]]= _0x5c29x4[_0xd587[235]];this[_0xd587[2838]]= _0x5c29x4[_0xd587[236]];this[_0xd587[2849]]= this[_0xd587[737]](_0x5c29x3);this[_0xd587[2850]]= this[_0xd587[2846]]()&& this[_0xd587[2848]](_0x5c29x3);this[_0xd587[2739]]= _0x5c29x3[_0xd587[730]]();this[_0xd587[2740]]= _0x5c29x3[_0xd587[732]]();this[_0xd587[2850]]&& this[_0xd587[2851]](_0x5c29x3)}};mxPanningHandler[_0xd587[202]][_0xd587[2851]]= function(_0x5c29x2){_0x5c29x2[_0xd587[722]]()};mxPanningHandler[_0xd587[202]][_0xd587[788]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=_0x5c29x3[_0xd587[730]]()- this[_0xd587[2739]],_0x5c29x5=_0x5c29x3[_0xd587[732]]()- this[_0xd587[2740]];if(this[_0xd587[1124]]){this[_0xd587[2844]]&& (this[_0xd587[2845]]&& (_0x5c29x4= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x4),_0x5c29x5= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x5)),this[_0xd587[1179]][_0xd587[1135]](_0x5c29x4+ this[_0xd587[2741]],_0x5c29x5+ this[_0xd587[2742]])),this[_0xd587[746]]( new mxEventObject(mxEvent.PAN,_0xd587[763],_0x5c29x3)),_0x5c29x3[_0xd587[722]]()}else {if(this[_0xd587[2850]]){var _0x5c29x9=this[_0xd587[1124]];this[_0xd587[1124]]= Math[_0xd587[425]](_0x5c29x4)> this[_0xd587[1179]][_0xd587[2353]]|| Math[_0xd587[425]](_0x5c29x5)> this[_0xd587[1179]][_0xd587[2353]];!_0x5c29x9&& this[_0xd587[1124]]&& this[_0xd587[746]]( new mxEventObject(mxEvent.PAN_START,_0xd587[763],_0x5c29x3))}}};mxPanningHandler[_0xd587[202]][_0xd587[789]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=Math[_0xd587[425]](_0x5c29x3[_0xd587[730]]()- this[_0xd587[2739]]),_0x5c29x5=Math[_0xd587[425]](_0x5c29x3[_0xd587[732]]()- this[_0xd587[2740]]);if(this[_0xd587[1124]]){if(!this[_0xd587[1179]][_0xd587[2365]]|| !mxUtils[_0xd587[1134]](this[_0xd587[1179]][_0xd587[526]])){_0x5c29x4= _0x5c29x3[_0xd587[730]]()- this[_0xd587[2739]];_0x5c29x5= _0x5c29x3[_0xd587[732]]()- this[_0xd587[2740]];this[_0xd587[2845]]&& (_0x5c29x4= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x4),_0x5c29x5= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x5));var _0x5c29x9=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[255]],_0x5c29xa=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[513]];this[_0xd587[1179]][_0xd587[1135]](0,0);this[_0xd587[1135]](_0x5c29xa[_0xd587[235]]+ _0x5c29x4/ _0x5c29x9,_0x5c29xa[_0xd587[236]]+ _0x5c29x5/ _0x5c29x9)};this[_0xd587[1124]]=  !1;this[_0xd587[746]]( new mxEventObject(mxEvent.PAN_END,_0xd587[763],_0x5c29x3));_0x5c29x3[_0xd587[722]]()}else {this[_0xd587[2849]]&& (_0x5c29x4< this[_0xd587[1179]][_0xd587[2353]]&& _0x5c29x5< this[_0xd587[1179]][_0xd587[2353]])&& (_0x5c29x4= this[_0xd587[2852]](_0x5c29x3),this[_0xd587[1179]][_0xd587[994]]()&& this[_0xd587[2841]]&& null!= _0x5c29x4&& !this[_0xd587[1179]][_0xd587[2692]](_0x5c29x4)?this[_0xd587[1179]][_0xd587[2450]](_0x5c29x4):this[_0xd587[2842]]&& null== _0x5c29x4&& this[_0xd587[1179]][_0xd587[2440]](),this[_0xd587[1179]][_0xd587[2276]][_0xd587[801]](),_0x5c29x5= mxUtils[_0xd587[444]](),_0x5c29x5=  new mxPoint(_0x5c29x3[_0xd587[730]]()+ _0x5c29x5[_0xd587[235]],_0x5c29x3[_0xd587[732]]()+ _0x5c29x5[_0xd587[236]]),this[_0xd587[152]](_0x5c29x5[_0xd587[235]]+ 1,_0x5c29x5[_0xd587[236]]+ 1,_0x5c29x4,_0x5c29x3[_0xd587[727]]()),_0x5c29x3[_0xd587[722]]())};this[_0xd587[2849]]= this[_0xd587[2850]]=  !1};mxPanningHandler[_0xd587[202]][_0xd587[2852]]= function(_0x5c29x2){return _0x5c29x2[_0xd587[736]]()};mxPanningHandler[_0xd587[202]][_0xd587[1135]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[1179]][_0xd587[249]]()[_0xd587[1147]](_0x5c29x2,_0x5c29x3)};mxPanningHandler[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[1179]][_0xd587[1148]](this);mxPopupMenu[_0xd587[202]][_0xd587[515]][_0xd587[183]](this)};function mxCellMarker(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){mxEventSource[_0xd587[239]](this);null!= _0x5c29x2&& (this[_0xd587[1179]]= _0x5c29x2,this[_0xd587[2853]]= null!= _0x5c29x3?_0x5c29x3:mxConstants[_0xd587[2854]],this[_0xd587[2855]]= null!= _0x5c29x3?_0x5c29x4:mxConstants[_0xd587[2856]],this[_0xd587[2857]]= null!= _0x5c29x5?_0x5c29x5:mxConstants[_0xd587[2858]],this[_0xd587[1016]]=  new mxCellHighlight(_0x5c29x2))}mxUtils[_0xd587[1284]](mxCellMarker,mxEventSource);mxCellMarker[_0xd587[202]][_0xd587[1179]]= null;mxCellMarker[_0xd587[202]][_0xd587[984]]=  !0;mxCellMarker[_0xd587[202]][_0xd587[2857]]= mxConstants[_0xd587[2858]];mxCellMarker[_0xd587[202]][_0xd587[2859]]=  !1;mxCellMarker[_0xd587[202]][_0xd587[2853]]= null;mxCellMarker[_0xd587[202]][_0xd587[2855]]= null;mxCellMarker[_0xd587[202]][_0xd587[2860]]= null;mxCellMarker[_0xd587[202]][_0xd587[2861]]= null;mxCellMarker[_0xd587[202]][_0xd587[2862]]= null;mxCellMarker[_0xd587[202]][_0xd587[995]]= function(_0x5c29x2){this[_0xd587[984]]= _0x5c29x2};mxCellMarker[_0xd587[202]][_0xd587[994]]= function(){return this[_0xd587[984]]};mxCellMarker[_0xd587[202]][_0xd587[2863]]= function(_0x5c29x2){this[_0xd587[2857]]= _0x5c29x2};mxCellMarker[_0xd587[202]][_0xd587[2864]]= function(){return this[_0xd587[2857]]};mxCellMarker[_0xd587[202]][_0xd587[2865]]= function(_0x5c29x2){this[_0xd587[2859]]= _0x5c29x2};mxCellMarker[_0xd587[202]][_0xd587[2866]]= function(){return this[_0xd587[2859]]};mxCellMarker[_0xd587[202]][_0xd587[2867]]= function(){return null!= this[_0xd587[2861]]};mxCellMarker[_0xd587[202]][_0xd587[2868]]= function(){return this[_0xd587[2861]]};mxCellMarker[_0xd587[202]][_0xd587[2869]]= function(){return this[_0xd587[2862]]};mxCellMarker[_0xd587[202]][_0xd587[862]]= function(){this[_0xd587[2861]]= null;null!= this[_0xd587[2862]]&& (this[_0xd587[2862]]= null,this[_0xd587[2870]]())};mxCellMarker[_0xd587[202]][_0xd587[2871]]= function(_0x5c29x2){var _0x5c29x3=null;if(this[_0xd587[994]]()){var _0x5c29x3=this[_0xd587[248]](_0x5c29x2),_0x5c29x4=null!= _0x5c29x3?this[_0xd587[2872]](_0x5c29x3):!1;_0x5c29x2= this[_0xd587[2873]](_0x5c29x2[_0xd587[727]](),_0x5c29x3,_0x5c29x4);this[_0xd587[2861]]= _0x5c29x4?_0x5c29x3:null;if(_0x5c29x3!= this[_0xd587[2862]]|| _0x5c29x2!= this[_0xd587[2860]]){this[_0xd587[2860]]= _0x5c29x2,null!= _0x5c29x3&& null!= this[_0xd587[2860]]?(this[_0xd587[2862]]= _0x5c29x3,this[_0xd587[811]]()):null!= this[_0xd587[2862]]&& (this[_0xd587[2862]]= null,this[_0xd587[2870]]())}};return _0x5c29x3};mxCellMarker[_0xd587[202]][_0xd587[2874]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[248]](_0x5c29x2);null!= _0x5c29x4&& (this[_0xd587[2860]]= null!= _0x5c29x3?_0x5c29x3:this[_0xd587[2853]],this[_0xd587[2862]]= _0x5c29x4,this[_0xd587[811]]())};mxCellMarker[_0xd587[202]][_0xd587[811]]= function(){this[_0xd587[1016]][_0xd587[2828]](this[_0xd587[2860]]);this[_0xd587[1016]][_0xd587[1016]](this[_0xd587[2862]]);this[_0xd587[746]]( new mxEventObject(mxEvent.MARK,_0xd587[724],this[_0xd587[2862]]))};mxCellMarker[_0xd587[202]][_0xd587[2870]]= function(){this[_0xd587[811]]()};mxCellMarker[_0xd587[202]][_0xd587[2872]]= function(_0x5c29x2){return !0};mxCellMarker[_0xd587[202]][_0xd587[2873]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return _0x5c29x4?this[_0xd587[2853]]:this[_0xd587[2855]]};mxCellMarker[_0xd587[202]][_0xd587[248]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1179]][_0xd587[249]]();cell= this[_0xd587[736]](_0x5c29x2);_0x5c29x3= this[_0xd587[2875]](_0x5c29x3[_0xd587[248]](cell));return null!= _0x5c29x3&& this[_0xd587[1825]](_0x5c29x3,_0x5c29x2)?_0x5c29x3:null};mxCellMarker[_0xd587[202]][_0xd587[736]]= function(_0x5c29x2){return _0x5c29x2[_0xd587[736]]()};mxCellMarker[_0xd587[202]][_0xd587[2875]]= function(_0x5c29x2){return _0x5c29x2};mxCellMarker[_0xd587[202]][_0xd587[1825]]= function(_0x5c29x2,_0x5c29x3){return this[_0xd587[2859]]?mxUtils[_0xd587[2876]](_0x5c29x2,_0x5c29x3[_0xd587[734]](),_0x5c29x3[_0xd587[735]](),this[_0xd587[2857]],mxConstants.MIN_HOTSPOT_SIZE,mxConstants.MAX_HOTSPOT_SIZE):!0};mxCellMarker[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[1179]][_0xd587[249]]()[_0xd587[745]](this[_0xd587[2877]]);this[_0xd587[1179]][_0xd587[502]]()[_0xd587[745]](this[_0xd587[2877]]);this[_0xd587[1016]][_0xd587[515]]()};function mxSelectionCellsHandler(_0x5c29x2){mxEventSource[_0xd587[239]](this);this[_0xd587[1179]]= _0x5c29x2;this[_0xd587[2878]]=  new mxDictionary;this[_0xd587[1179]][_0xd587[1133]](this);this[_0xd587[2731]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x4){this[_0xd587[994]]()&& this[_0xd587[802]]()});this[_0xd587[1179]][_0xd587[2435]]()[_0xd587[169]](mxEvent.CHANGE,this[_0xd587[2731]]);this[_0xd587[1179]][_0xd587[502]]()[_0xd587[169]](mxEvent.CHANGE,this[_0xd587[2731]]);this[_0xd587[1179]][_0xd587[249]]()[_0xd587[169]](mxEvent.SCALE,this[_0xd587[2731]]);this[_0xd587[1179]][_0xd587[249]]()[_0xd587[169]](mxEvent.TRANSLATE,this[_0xd587[2731]]);this[_0xd587[1179]][_0xd587[249]]()[_0xd587[169]](mxEvent.SCALE_AND_TRANSLATE,this[_0xd587[2731]]);this[_0xd587[1179]][_0xd587[249]]()[_0xd587[169]](mxEvent.DOWN,this[_0xd587[2731]]);this[_0xd587[1179]][_0xd587[249]]()[_0xd587[169]](mxEvent.UP,this[_0xd587[2731]])}mxUtils[_0xd587[1284]](mxSelectionCellsHandler,mxEventSource);mxSelectionCellsHandler[_0xd587[202]][_0xd587[1179]]= null;mxSelectionCellsHandler[_0xd587[202]][_0xd587[984]]=  !0;mxSelectionCellsHandler[_0xd587[202]][_0xd587[2731]]= null;mxSelectionCellsHandler[_0xd587[202]][_0xd587[2879]]= 100;mxSelectionCellsHandler[_0xd587[202]][_0xd587[2878]]= null;mxSelectionCellsHandler[_0xd587[202]][_0xd587[994]]= function(){return this[_0xd587[984]]};mxSelectionCellsHandler[_0xd587[202]][_0xd587[995]]= function(_0x5c29x2){this[_0xd587[984]]= _0x5c29x2};mxSelectionCellsHandler[_0xd587[202]][_0xd587[2596]]= function(_0x5c29x2){return this[_0xd587[2878]][_0xd587[203]](_0x5c29x2)};mxSelectionCellsHandler[_0xd587[202]][_0xd587[862]]= function(){this[_0xd587[2878]][_0xd587[209]](function(_0x5c29x2,_0x5c29x3){_0x5c29x3[_0xd587[862]][_0xd587[183]](_0x5c29x3)})};mxSelectionCellsHandler[_0xd587[202]][_0xd587[802]]= function(){var _0x5c29x2=this[_0xd587[2878]];this[_0xd587[2878]]=  new mxDictionary;for(var _0x5c29x3=this[_0xd587[1179]][_0xd587[897]](),_0x5c29x4=0;_0x5c29x4< _0x5c29x3[_0xd587[67]];_0x5c29x4++){var _0x5c29x5=this[_0xd587[1179]][_0xd587[441]][_0xd587[248]](_0x5c29x3[_0x5c29x4]);if(null!= _0x5c29x5){var _0x5c29x9=_0x5c29x2[_0xd587[205]](_0x5c29x3[_0x5c29x4]);null!= _0x5c29x9&& (_0x5c29x9[_0xd587[724]]!= _0x5c29x5?(_0x5c29x9[_0xd587[515]](),_0x5c29x9= null):_0x5c29x9[_0xd587[258]]());null== _0x5c29x9&& (_0x5c29x9= this[_0xd587[1179]][_0xd587[2709]](_0x5c29x5),this[_0xd587[746]]( new mxEventObject(mxEvent.ADD,_0xd587[724],_0x5c29x5)));null!= _0x5c29x9&& this[_0xd587[2878]][_0xd587[204]](_0x5c29x3[_0x5c29x4],_0x5c29x9)}};_0x5c29x2[_0xd587[209]](mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x3){this[_0xd587[746]]( new mxEventObject(mxEvent.REMOVE,_0xd587[724],_0x5c29x3[_0xd587[724]]));_0x5c29x3[_0xd587[515]]()}))};mxSelectionCellsHandler[_0xd587[202]][_0xd587[787]]= function(_0x5c29x2,_0x5c29x3){if(this[_0xd587[1179]][_0xd587[994]]()&& this[_0xd587[994]]()){var _0x5c29x4=[_0x5c29x2,_0x5c29x3];this[_0xd587[2878]][_0xd587[209]](function(_0x5c29x2,_0x5c29x3){_0x5c29x3[_0xd587[787]][_0xd587[183]](_0x5c29x3,_0x5c29x4)})}};mxSelectionCellsHandler[_0xd587[202]][_0xd587[788]]= function(_0x5c29x2,_0x5c29x3){if(this[_0xd587[1179]][_0xd587[994]]()&& this[_0xd587[994]]()){var _0x5c29x4=[_0x5c29x2,_0x5c29x3];this[_0xd587[2878]][_0xd587[209]](function(_0x5c29x2,_0x5c29x3){_0x5c29x3[_0xd587[788]][_0xd587[183]](_0x5c29x3,_0x5c29x4)})}};mxSelectionCellsHandler[_0xd587[202]][_0xd587[789]]= function(_0x5c29x2,_0x5c29x3){if(this[_0xd587[1179]][_0xd587[994]]()&& this[_0xd587[994]]()){var _0x5c29x4=[_0x5c29x2,_0x5c29x3];this[_0xd587[2878]][_0xd587[209]](function(_0x5c29x2,_0x5c29x3){_0x5c29x3[_0xd587[789]][_0xd587[183]](_0x5c29x3,_0x5c29x4)})}};mxSelectionCellsHandler[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[1179]][_0xd587[1148]](this);null!= this[_0xd587[2731]]&& (this[_0xd587[1179]][_0xd587[2435]]()[_0xd587[745]](this[_0xd587[2731]]),this[_0xd587[1179]][_0xd587[502]]()[_0xd587[745]](this[_0xd587[2731]]),this[_0xd587[1179]][_0xd587[249]]()[_0xd587[745]](this[_0xd587[2731]]),this[_0xd587[2731]]= null)};function mxConnectionHandler(_0x5c29x2,_0x5c29x3){mxEventSource[_0xd587[239]](this);null!= _0x5c29x2&& (this[_0xd587[1179]]= _0x5c29x2,this[_0xd587[1033]]= _0x5c29x3,this[_0xd587[176]]())}mxUtils[_0xd587[1284]](mxConnectionHandler,mxEventSource);mxConnectionHandler[_0xd587[202]][_0xd587[1179]]= null;mxConnectionHandler[_0xd587[202]][_0xd587[1033]]=  !0;mxConnectionHandler[_0xd587[202]][_0xd587[2880]]=  !1;mxConnectionHandler[_0xd587[202]][_0xd587[2881]]=  !1;mxConnectionHandler[_0xd587[202]][_0xd587[2882]]= null;mxConnectionHandler[_0xd587[202]][_0xd587[2883]]=  !1;mxConnectionHandler[_0xd587[202]][_0xd587[984]]=  !0;mxConnectionHandler[_0xd587[202]][_0xd587[804]]=  !0;mxConnectionHandler[_0xd587[202]][_0xd587[2884]]=  !1;mxConnectionHandler[_0xd587[202]][_0xd587[2885]]= null;mxConnectionHandler[_0xd587[202]][_0xd587[2886]]= null;mxConnectionHandler[_0xd587[202]][_0xd587[267]]= null;mxConnectionHandler[_0xd587[202]][_0xd587[2887]]=  !1;mxConnectionHandler[_0xd587[202]][_0xd587[2888]]=  !0;mxConnectionHandler[_0xd587[202]][_0xd587[2889]]= 500;mxConnectionHandler[_0xd587[202]][_0xd587[2890]]=  !1;mxConnectionHandler[_0xd587[202]][_0xd587[2891]]=  !1;mxConnectionHandler[_0xd587[202]][_0xd587[2892]]= 4;mxConnectionHandler[_0xd587[202]][_0xd587[2893]]= 0;mxConnectionHandler[_0xd587[202]][_0xd587[2894]]= 0;mxConnectionHandler[_0xd587[202]][_0xd587[2895]]=  !1;mxConnectionHandler[_0xd587[202]][_0xd587[2823]]= null;mxConnectionHandler[_0xd587[202]][_0xd587[2896]]=  new mxPoint(0,mxConstants.TOOLTIP_VERTICAL_OFFSET);mxConnectionHandler[_0xd587[202]][_0xd587[2897]]= null;mxConnectionHandler[_0xd587[202]][_0xd587[1176]]= null;mxConnectionHandler[_0xd587[202]][_0xd587[2898]]= null;mxConnectionHandler[_0xd587[202]][_0xd587[2899]]= 0;mxConnectionHandler[_0xd587[202]][_0xd587[2900]]= mxClient[_0xd587[47]];mxConnectionHandler[_0xd587[202]][_0xd587[994]]= function(){return this[_0xd587[984]]};mxConnectionHandler[_0xd587[202]][_0xd587[995]]= function(_0x5c29x2){this[_0xd587[984]]= _0x5c29x2};mxConnectionHandler[_0xd587[202]][_0xd587[2901]]= function(){return this[_0xd587[2884]]};mxConnectionHandler[_0xd587[202]][_0xd587[2902]]= function(_0x5c29x2){this[_0xd587[2884]]= _0x5c29x2};mxConnectionHandler[_0xd587[202]][_0xd587[2156]]= function(){var _0x5c29x2= new mxPolyline([],mxConstants.INVALID_COLOR);_0x5c29x2[_0xd587[507]]= this[_0xd587[1179]][_0xd587[507]]!= mxConstants[_0xd587[508]]?mxConstants[_0xd587[1523]]:mxConstants[_0xd587[508]];_0x5c29x2[_0xd587[176]](this[_0xd587[1179]][_0xd587[249]]()[_0xd587[1524]]());_0x5c29x2[_0xd587[1564]]= 0;_0x5c29x2[_0xd587[1229]]=  !1;_0x5c29x2[_0xd587[1522]]=  !0;if(this[_0xd587[1179]][_0xd587[507]]== mxConstants[_0xd587[508]]){_0x5c29x2[_0xd587[252]][_0xd587[57]](_0xd587[1377],_0xd587[130])}else {var _0x5c29x3=mxUtils[_0xd587[885]](this,function(_0x5c29x2){_0x5c29x2= mxUtils[_0xd587[2196]](this[_0xd587[1179]][_0xd587[526]],mxEvent[_0xd587[731]](_0x5c29x2),mxEvent[_0xd587[733]](_0x5c29x2));return this[_0xd587[1179]][_0xd587[441]][_0xd587[248]](this[_0xd587[1179]][_0xd587[999]](_0x5c29x2[_0xd587[235]],_0x5c29x2[_0xd587[236]]))});mxEvent[_0xd587[2733]](_0x5c29x2[_0xd587[252]],this[_0xd587[1179]],_0x5c29x3)};return _0x5c29x2};mxConnectionHandler[_0xd587[202]][_0xd587[176]]= function(){this[_0xd587[1179]][_0xd587[1133]](this);this[_0xd587[2885]]= this[_0xd587[1689]]();this[_0xd587[2886]]=  new mxConstraintHandler(this[_0xd587[1179]]);this[_0xd587[1176]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2){null!= this[_0xd587[2903]]&& (this[_0xd587[2903]]= this[_0xd587[1179]][_0xd587[249]]()[_0xd587[248]](this[_0xd587[2903]][_0xd587[246]]));null!= this[_0xd587[2903]]?this[_0xd587[2905]](this[_0xd587[2904]],this[_0xd587[2903]]):(this[_0xd587[2906]](this[_0xd587[2904]]),this[_0xd587[257]]= null);this[_0xd587[2886]][_0xd587[862]]()});this[_0xd587[1179]][_0xd587[502]]()[_0xd587[169]](mxEvent.CHANGE,this[_0xd587[1176]]);this[_0xd587[1179]][_0xd587[249]]()[_0xd587[169]](mxEvent.SCALE,this[_0xd587[1176]]);this[_0xd587[1179]][_0xd587[249]]()[_0xd587[169]](mxEvent.TRANSLATE,this[_0xd587[1176]]);this[_0xd587[1179]][_0xd587[249]]()[_0xd587[169]](mxEvent.SCALE_AND_TRANSLATE,this[_0xd587[1176]]);this[_0xd587[2898]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[2906]](this[_0xd587[2904]])});this[_0xd587[1179]][_0xd587[169]](mxEvent.START_EDITING,this[_0xd587[2898]]);this[_0xd587[1179]][_0xd587[249]]()[_0xd587[169]](mxEvent.DOWN,this[_0xd587[2898]]);this[_0xd587[1179]][_0xd587[249]]()[_0xd587[169]](mxEvent.UP,this[_0xd587[2898]])};mxConnectionHandler[_0xd587[202]][_0xd587[2907]]= function(_0x5c29x2){return !0};mxConnectionHandler[_0xd587[202]][_0xd587[1689]]= function(){var _0x5c29x2= new mxCellMarker(this[_0xd587[1179]]);_0x5c29x2[_0xd587[2859]]=  !0;_0x5c29x2[_0xd587[736]]= mxUtils[_0xd587[885]](this,function(_0x5c29x3,_0x5c29x4){_0x5c29x4= mxCellMarker[_0xd587[202]][_0xd587[736]][_0xd587[183]](_0x5c29x2,arguments);this[_0xd587[267]]= null;if(!this[_0xd587[2907]](_0x5c29x4)){return null};null!= _0x5c29x4?this[_0xd587[2908]]()?null!= this[_0xd587[257]]&& (this[_0xd587[267]]= this[_0xd587[2909]](this[_0xd587[257]][_0xd587[246]],_0x5c29x4),null!= this[_0xd587[267]]&& 0== this[_0xd587[267]][_0xd587[67]]&& (_0x5c29x4= null,this[_0xd587[2901]]()&& (this[_0xd587[267]]= null))):this[_0xd587[2671]](_0x5c29x4)|| (_0x5c29x4= null):this[_0xd587[2908]]()&& (!this[_0xd587[2901]]()&& !this[_0xd587[1179]][_0xd587[2406]])&& (this[_0xd587[267]]= _0xd587[110]);return _0x5c29x4});_0x5c29x2[_0xd587[2872]]= mxUtils[_0xd587[885]](this,function(_0x5c29x3){return this[_0xd587[2908]]()?null== this[_0xd587[267]]:mxCellMarker[_0xd587[202]][_0xd587[2872]][_0xd587[183]](_0x5c29x2,arguments)});_0x5c29x2[_0xd587[2873]]= mxUtils[_0xd587[885]](this,function(_0x5c29x3,_0x5c29x4,_0x5c29x5){return null== this[_0xd587[2882]]|| this[_0xd587[2908]]()?mxCellMarker[_0xd587[202]][_0xd587[2873]][_0xd587[183]](_0x5c29x2,arguments):null});_0x5c29x2[_0xd587[1825]]= mxUtils[_0xd587[885]](this,function(_0x5c29x3,_0x5c29x4){return null!= this[_0xd587[2882]]|| this[_0xd587[2908]]()?!0:mxCellMarker[_0xd587[202]][_0xd587[1825]][_0xd587[183]](_0x5c29x2,arguments)});return _0x5c29x2};mxConnectionHandler[_0xd587[202]][_0xd587[861]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){this[_0xd587[257]]= _0x5c29x2;this[_0xd587[2823]]=  new mxPoint(_0x5c29x3,_0x5c29x4);this[_0xd587[2897]]= null!= _0x5c29x5?_0x5c29x5:this[_0xd587[2910]](null);this[_0xd587[2885]][_0xd587[2860]]= this[_0xd587[2885]][_0xd587[2853]];this[_0xd587[2885]][_0xd587[2862]]= _0x5c29x2;this[_0xd587[2885]][_0xd587[811]]();this[_0xd587[746]]( new mxEventObject(mxEvent.START,_0xd587[724],this[_0xd587[257]]))};mxConnectionHandler[_0xd587[202]][_0xd587[2908]]= function(){return null!= this[_0xd587[2823]]&& null!= this[_0xd587[253]]};mxConnectionHandler[_0xd587[202]][_0xd587[2671]]= function(_0x5c29x2){return this[_0xd587[1179]][_0xd587[2671]](_0x5c29x2)};mxConnectionHandler[_0xd587[202]][_0xd587[2672]]= function(_0x5c29x2){return !0};mxConnectionHandler[_0xd587[202]][_0xd587[2909]]= function(_0x5c29x2,_0x5c29x3){return !this[_0xd587[2672]](_0x5c29x3)?_0xd587[110]:this[_0xd587[1179]][_0xd587[2500]](null,_0x5c29x2,_0x5c29x3)};mxConnectionHandler[_0xd587[202]][_0xd587[2911]]= function(_0x5c29x2){return this[_0xd587[2882]]};mxConnectionHandler[_0xd587[202]][_0xd587[2912]]= function(_0x5c29x2){return null!= _0x5c29x2[_0xd587[963]]&& _0x5c29x2[_0xd587[963]][_0xd587[252]][_0xd587[265]]== this[_0xd587[1179]][_0xd587[526]]?!0:this[_0xd587[2880]]};mxConnectionHandler[_0xd587[202]][_0xd587[2913]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[2911]](_0x5c29x2);if(null!= _0x5c29x3&& null!= _0x5c29x2){this[_0xd587[2903]]= _0x5c29x2;var _0x5c29x4=[],_0x5c29x5= new mxRectangle(0,0,_0x5c29x3[_0xd587[117]],_0x5c29x3[_0xd587[119]]),_0x5c29x9= new mxImageShape(_0x5c29x5,_0x5c29x3[_0xd587[390]],null,null,0);_0x5c29x9[_0xd587[1674]]=  !1;this[_0xd587[2912]](_0x5c29x2)?(_0x5c29x9[_0xd587[507]]= mxConstants[_0xd587[1656]],_0x5c29x9[_0xd587[176]](this[_0xd587[1179]][_0xd587[526]])):(_0x5c29x9[_0xd587[507]]= this[_0xd587[1179]][_0xd587[507]]== mxConstants[_0xd587[508]]?mxConstants[_0xd587[508]]:mxConstants[_0xd587[1523]],_0x5c29x9[_0xd587[176]](this[_0xd587[1179]][_0xd587[249]]()[_0xd587[1524]]()),this[_0xd587[2881]]&& null!= _0x5c29x9[_0xd587[252]][_0xd587[328]]&& _0x5c29x9[_0xd587[252]][_0xd587[265]][_0xd587[950]](_0x5c29x9[_0xd587[252]],_0x5c29x9[_0xd587[252]][_0xd587[265]][_0xd587[285]]));_0x5c29x9[_0xd587[252]][_0xd587[124]][_0xd587[270]]= mxConstants[_0xd587[2914]];var _0x5c29xa=mxUtils[_0xd587[885]](this,function(){return null!= this[_0xd587[2915]]?this[_0xd587[2915]]:_0x5c29x2}),_0x5c29x3=mxUtils[_0xd587[885]](this,function(_0x5c29x2){mxEvent[_0xd587[721]](_0x5c29x2)|| (this[_0xd587[2916]]= _0x5c29x9,this[_0xd587[1179]][_0xd587[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x5c29x2,_0x5c29xa())))});mxEvent[_0xd587[2733]](_0x5c29x9[_0xd587[252]],this[_0xd587[1179]],_0x5c29xa,_0x5c29x3);_0x5c29x4[_0xd587[207]](_0x5c29x9);this[_0xd587[2905]](_0x5c29x4,this[_0xd587[2903]]);return _0x5c29x4};return null};mxConnectionHandler[_0xd587[202]][_0xd587[2905]]= function(_0x5c29x2,_0x5c29x3){if(null!= _0x5c29x2&& null!= _0x5c29x2[0]&& null!= _0x5c29x3){var _0x5c29x4=this[_0xd587[2917]](_0x5c29x2[0],_0x5c29x3);_0x5c29x2[0][_0xd587[1562]][_0xd587[235]]= _0x5c29x4[_0xd587[235]];_0x5c29x2[0][_0xd587[1562]][_0xd587[236]]= _0x5c29x4[_0xd587[236]];_0x5c29x2[0][_0xd587[258]]()}};mxConnectionHandler[_0xd587[202]][_0xd587[2917]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[255]],_0x5c29x5=_0x5c29x3[_0xd587[241]](),_0x5c29x9=_0x5c29x3[_0xd587[242]]();if(this[_0xd587[1179]][_0xd587[1730]](_0x5c29x3[_0xd587[246]])){var _0x5c29xa=this[_0xd587[1179]][_0xd587[1731]](_0x5c29x3[_0xd587[246]]),_0x5c29x5=0!= _0x5c29xa[_0xd587[117]]?_0x5c29x3[_0xd587[235]]+ _0x5c29xa[_0xd587[117]]* _0x5c29x4/ 2:_0x5c29x5,_0x5c29x9=0!= _0x5c29xa[_0xd587[119]]?_0x5c29x3[_0xd587[236]]+ _0x5c29xa[_0xd587[119]]* _0x5c29x4/ 2:_0x5c29x9,_0x5c29xa=mxUtils[_0xd587[431]](mxUtils[_0xd587[433]](_0x5c29x3[_0xd587[124]],mxConstants.STYLE_ROTATION)|| 0);if(0!= _0x5c29xa){var _0x5c29x4=Math[_0xd587[426]](_0x5c29xa),_0x5c29xa=Math[_0xd587[427]](_0x5c29xa),_0x5c29x12= new mxPoint(_0x5c29x3[_0xd587[241]](),_0x5c29x3[_0xd587[242]]()),_0x5c29x9=mxUtils[_0xd587[432]]( new mxPoint(_0x5c29x5,_0x5c29x9),_0x5c29x4,_0x5c29xa,_0x5c29x12),_0x5c29x5=_0x5c29x9[_0xd587[235]],_0x5c29x9=_0x5c29x9[_0xd587[236]]}};return  new mxPoint(_0x5c29x5- _0x5c29x2[_0xd587[1562]][_0xd587[117]]/ 2,_0x5c29x9- _0x5c29x2[_0xd587[1562]][_0xd587[119]]/ 2)};mxConnectionHandler[_0xd587[202]][_0xd587[2906]]= function(_0x5c29x2){if(null!= _0x5c29x2){this[_0xd587[2903]]= null;for(var _0x5c29x3=0;_0x5c29x3< _0x5c29x2[_0xd587[67]];_0x5c29x3++){_0x5c29x2[_0x5c29x3][_0xd587[515]]()}}};mxConnectionHandler[_0xd587[202]][_0xd587[2918]]= function(_0x5c29x2){return !this[_0xd587[1179]][_0xd587[2579]](_0x5c29x2[_0xd587[727]]())&& (null!= this[_0xd587[2886]][_0xd587[2919]]&& null!= this[_0xd587[2886]][_0xd587[2920]]|| null!= this[_0xd587[257]]&& null== this[_0xd587[267]]&& (null== this[_0xd587[2904]]|| null!= this[_0xd587[2904]]&& null!= this[_0xd587[2916]]))};mxConnectionHandler[_0xd587[202]][_0xd587[787]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[2899]]++;if(this[_0xd587[994]]()&& this[_0xd587[1179]][_0xd587[994]]()&& !_0x5c29x3[_0xd587[721]]()&& !this[_0xd587[2908]]()&& this[_0xd587[2918]](_0x5c29x3)){null!= this[_0xd587[2886]][_0xd587[2920]]&& null!= this[_0xd587[2886]][_0xd587[2919]]&& null!= this[_0xd587[2886]][_0xd587[987]]?(this[_0xd587[2921]]= this[_0xd587[2886]][_0xd587[2920]],this[_0xd587[257]]= this[_0xd587[2886]][_0xd587[2919]],this[_0xd587[2823]]= this[_0xd587[2886]][_0xd587[987]][_0xd587[238]]()):this[_0xd587[2823]]=  new mxPoint(_0x5c29x3[_0xd587[734]](),_0x5c29x3[_0xd587[735]]());this[_0xd587[2897]]= this[_0xd587[2910]](_0x5c29x3);this[_0xd587[2899]]= 1;this[_0xd587[2887]]&& null== this[_0xd587[253]]&& (this[_0xd587[2922]]= null,this[_0xd587[253]]= this[_0xd587[2156]]());if(null== this[_0xd587[257]]&& null!= this[_0xd587[2897]]){var _0x5c29x4=this[_0xd587[1179]][_0xd587[2689]](_0x5c29x3[_0xd587[727]]());this[_0xd587[2897]][_0xd587[246]][_0xd587[256]][_0xd587[2007]](_0x5c29x4,!0)};this[_0xd587[746]]( new mxEventObject(mxEvent.START,_0xd587[724],this[_0xd587[257]]));_0x5c29x3[_0xd587[722]]()}else {if(mxClient[_0xd587[754]]&& this[_0xd587[2888]]&& !this[_0xd587[2890]]&& this[_0xd587[994]]()&& this[_0xd587[1179]][_0xd587[994]]()&& !this[_0xd587[2908]]()){this[_0xd587[2890]]=  !0;this[_0xd587[2893]]= _0x5c29x3[_0xd587[730]]();this[_0xd587[2894]]= _0x5c29x3[_0xd587[732]]();var _0x5c29x5=this[_0xd587[1179]][_0xd587[441]][_0xd587[248]](this[_0xd587[2885]][_0xd587[736]](_0x5c29x3));this[_0xd587[2923]]&& window[_0xd587[2924]](this[_0xd587[2923]]);this[_0xd587[2923]]= window[_0xd587[261]](mxUtils[_0xd587[885]](this,function(){this[_0xd587[2891]]&& this[_0xd587[2925]](_0x5c29x3,_0x5c29x5);this[_0xd587[2891]]= this[_0xd587[2890]]=  !1}),this[_0xd587[2889]]);this[_0xd587[2891]]=  !0}};this[_0xd587[2926]]= this[_0xd587[2916]];this[_0xd587[2916]]= null};mxConnectionHandler[_0xd587[202]][_0xd587[2925]]= function(_0x5c29x2,_0x5c29x3){null!= _0x5c29x3&& (this[_0xd587[2885]][_0xd587[2860]]= this[_0xd587[2885]][_0xd587[2853]],this[_0xd587[2885]][_0xd587[2862]]= _0x5c29x3,this[_0xd587[2885]][_0xd587[811]](),this[_0xd587[2823]]=  new mxPoint(_0x5c29x2[_0xd587[734]](),_0x5c29x2[_0xd587[735]]()),this[_0xd587[2897]]= this[_0xd587[2910]](_0x5c29x2),this[_0xd587[257]]= _0x5c29x3,this[_0xd587[746]]( new mxEventObject(mxEvent.START,_0xd587[724],this[_0xd587[257]])))};mxConnectionHandler[_0xd587[202]][_0xd587[2927]]= function(_0x5c29x2){return !this[_0xd587[1179]][_0xd587[1712]](_0x5c29x2[_0xd587[246]])};mxConnectionHandler[_0xd587[202]][_0xd587[2910]]= function(_0x5c29x2){return null};mxConnectionHandler[_0xd587[202]][_0xd587[2928]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[2885]][_0xd587[2871]](_0x5c29x2);this[_0xd587[2886]][_0xd587[2729]](_0x5c29x2,null== this[_0xd587[2823]]);this[_0xd587[2915]]= _0x5c29x3};mxConnectionHandler[_0xd587[202]][_0xd587[2929]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[518]](),_0x5c29x4=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[512]]();_0x5c29x2[_0xd587[235]]= _0x5c29x2[_0xd587[235]]/ _0x5c29x3- _0x5c29x4[_0xd587[235]];_0x5c29x2[_0xd587[236]]= _0x5c29x2[_0xd587[236]]/ _0x5c29x3- _0x5c29x4[_0xd587[236]]};mxConnectionHandler[_0xd587[202]][_0xd587[788]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[2891]]&& (this[_0xd587[2891]]= Math[_0xd587[425]](this[_0xd587[2893]]- _0x5c29x3[_0xd587[730]]())< this[_0xd587[2892]]&& Math[_0xd587[425]](this[_0xd587[2894]]- _0x5c29x3[_0xd587[732]]())< this[_0xd587[2892]]);if(!_0x5c29x3[_0xd587[721]]()&& (this[_0xd587[2895]]|| null!= this[_0xd587[2823]]|| !this[_0xd587[1179]][_0xd587[1009]])){!this[_0xd587[994]]()&& null!= this[_0xd587[2915]]&& (this[_0xd587[2906]](this[_0xd587[2904]]),this[_0xd587[2915]]= null);(null!= this[_0xd587[2823]]|| this[_0xd587[994]]()&& this[_0xd587[1179]][_0xd587[994]]())&& this[_0xd587[2928]](_0x5c29x3);if(null!= this[_0xd587[2823]]){var _0x5c29x4=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[255]],_0x5c29x4= new mxPoint(this[_0xd587[1179]][_0xd587[1021]](_0x5c29x3[_0xd587[734]]()/ _0x5c29x4)* _0x5c29x4,this[_0xd587[1179]][_0xd587[1021]](_0x5c29x3[_0xd587[735]]()/ _0x5c29x4)* _0x5c29x4),_0x5c29x5=null,_0x5c29x9=_0x5c29x4;null!= this[_0xd587[2886]][_0xd587[2920]]&& (null!= this[_0xd587[2886]][_0xd587[2919]]&& null!= this[_0xd587[2886]][_0xd587[987]])&& (_0x5c29x5= this[_0xd587[2886]][_0xd587[2920]],_0x5c29x9= this[_0xd587[2886]][_0xd587[987]][_0xd587[238]]());var _0x5c29xa=this[_0xd587[2823]];if(null!= this[_0xd587[2926]]){var _0x5c29x12=this[_0xd587[2926]][_0xd587[1562]][_0xd587[117]],_0x5c29x13=this[_0xd587[2926]][_0xd587[1562]][_0xd587[119]];null!= this[_0xd587[2915]]&& this[_0xd587[2883]]?(_0x5c29x12= this[_0xd587[2917]](this[_0xd587[2926]],this[_0xd587[2915]]),this[_0xd587[2926]][_0xd587[1562]][_0xd587[235]]= _0x5c29x12[_0xd587[235]],this[_0xd587[2926]][_0xd587[1562]][_0xd587[236]]= _0x5c29x12[_0xd587[236]]):(_0x5c29x12=  new mxRectangle(_0x5c29x3[_0xd587[734]]()+ this[_0xd587[2896]][_0xd587[235]],_0x5c29x3[_0xd587[735]]()+ this[_0xd587[2896]][_0xd587[236]],_0x5c29x12,_0x5c29x13),this[_0xd587[2926]][_0xd587[1562]]= _0x5c29x12);this[_0xd587[2926]][_0xd587[258]]()};if(null!= this[_0xd587[2897]]){this[_0xd587[2897]][_0xd587[439]]= [null,null!= this[_0xd587[2915]]?null:_0x5c29x9];this[_0xd587[1179]][_0xd587[441]][_0xd587[2289]](this[_0xd587[2897]],this[_0xd587[257]],!0,this[_0xd587[2921]]);null!= this[_0xd587[2915]]&& (null== _0x5c29x5&& (_0x5c29x5= this[_0xd587[1179]][_0xd587[2288]](this[_0xd587[2897]],this[_0xd587[257]],!1)),this[_0xd587[2897]][_0xd587[2088]](null,!1),this[_0xd587[1179]][_0xd587[441]][_0xd587[2289]](this[_0xd587[2897]],this[_0xd587[2915]],!1,_0x5c29x5));_0x5c29xa= null;if(null!= this[_0xd587[2922]]){_0x5c29xa= [];for(_0x5c29x9= 0;_0x5c29x9< this[_0xd587[2922]][_0xd587[67]];_0x5c29x9++){_0x5c29x5= this[_0xd587[2922]][_0x5c29x9][_0xd587[238]](),this[_0xd587[2929]](_0x5c29x5),_0x5c29xa[_0x5c29x9]= _0x5c29x5}};this[_0xd587[1179]][_0xd587[441]][_0xd587[2282]](this[_0xd587[2897]],_0x5c29xa,this[_0xd587[257]],this[_0xd587[2915]]);this[_0xd587[1179]][_0xd587[441]][_0xd587[2283]](this[_0xd587[2897]],this[_0xd587[257]],this[_0xd587[2915]]);_0x5c29x9= this[_0xd587[2897]][_0xd587[439]][this[_0xd587[2897]][_0xd587[439]][_0xd587[67]]- 1];_0x5c29xa= this[_0xd587[2897]][_0xd587[439]][0]}else {null!= this[_0xd587[2915]]&& null== this[_0xd587[2886]][_0xd587[2920]]&& (_0x5c29x12= this[_0xd587[2930]](this[_0xd587[2915]],_0x5c29x3),null!= _0x5c29x12&& (_0x5c29x9= _0x5c29x12)),null== this[_0xd587[2921]]&& null!= this[_0xd587[257]]&& (_0x5c29x12= this[_0xd587[2931]](this[_0xd587[257]],null!= this[_0xd587[2922]]&& 0< this[_0xd587[2922]][_0xd587[67]]?this[_0xd587[2922]][0]:_0x5c29x9,_0x5c29x3),null!= _0x5c29x12&& (_0x5c29xa= _0x5c29x12))};if(null== this[_0xd587[2915]]&& this[_0xd587[2900]]){_0x5c29x12= _0x5c29xa;null!= this[_0xd587[2897]]&& 2< this[_0xd587[2897]][_0xd587[439]][_0xd587[67]]&& (_0x5c29x5= this[_0xd587[2897]][_0xd587[439]][this[_0xd587[2897]][_0xd587[439]][_0xd587[67]]- 2],null!= _0x5c29x5&& (_0x5c29x12= _0x5c29x5));_0x5c29x5= _0x5c29x9[_0xd587[235]]- _0x5c29x12[_0xd587[235]];_0x5c29x12= _0x5c29x9[_0xd587[236]]- _0x5c29x12[_0xd587[236]];_0x5c29x13= Math[_0xd587[428]](_0x5c29x5* _0x5c29x5+ _0x5c29x12* _0x5c29x12);if(0== _0x5c29x13){return};_0x5c29x9[_0xd587[235]]-= 4* _0x5c29x5/ _0x5c29x13;_0x5c29x9[_0xd587[236]]-= 4* _0x5c29x12/ _0x5c29x13};if(null== this[_0xd587[253]]&& (_0x5c29x5= Math[_0xd587[425]](_0x5c29x4[_0xd587[235]]- this[_0xd587[2823]][_0xd587[235]]),_0x5c29x12= Math[_0xd587[425]](_0x5c29x4[_0xd587[236]]- this[_0xd587[2823]][_0xd587[236]]),_0x5c29x5> this[_0xd587[1179]][_0xd587[2353]]|| _0x5c29x12> this[_0xd587[1179]][_0xd587[2353]])){this[_0xd587[253]]= this[_0xd587[2156]](),this[_0xd587[2928]](_0x5c29x3)};null!= this[_0xd587[253]]&& (null!= this[_0xd587[2897]]?this[_0xd587[253]][_0xd587[1525]]= this[_0xd587[2897]][_0xd587[439]]:(_0x5c29x4= [_0x5c29xa],null!= this[_0xd587[2922]]&& (_0x5c29x4= _0x5c29x4[_0xd587[1919]](this[_0xd587[2922]])),_0x5c29x4[_0xd587[207]](_0x5c29x9),this[_0xd587[253]][_0xd587[1525]]= _0x5c29x4),this[_0xd587[2932]]());mxEvent[_0xd587[722]](_0x5c29x3[_0xd587[727]]());_0x5c29x3[_0xd587[722]]()}else {!this[_0xd587[994]]()|| !this[_0xd587[1179]][_0xd587[994]]()?this[_0xd587[2886]][_0xd587[862]]():this[_0xd587[257]]!= this[_0xd587[2915]]&& null== this[_0xd587[2897]]?(this[_0xd587[2906]](this[_0xd587[2904]]),this[_0xd587[2904]]= null,null!= this[_0xd587[2915]]&& null== this[_0xd587[267]]&& (this[_0xd587[2904]]= this[_0xd587[2913]](this[_0xd587[2915]]),null== this[_0xd587[2904]]&& (this[_0xd587[2915]][_0xd587[1609]](mxConstants.CURSOR_CONNECT),_0x5c29x3[_0xd587[722]]())),this[_0xd587[257]]= this[_0xd587[2915]]):this[_0xd587[257]]== this[_0xd587[2915]]&& (null!= this[_0xd587[2915]]&& null== this[_0xd587[2904]]&& !this[_0xd587[1179]][_0xd587[1009]])&& _0x5c29x3[_0xd587[722]]()};null!= this[_0xd587[2886]][_0xd587[2920]]&& this[_0xd587[2885]][_0xd587[862]]();if(!this[_0xd587[1179]][_0xd587[1009]]&& null!= this[_0xd587[2915]]&& null!= this[_0xd587[2904]]){_0x5c29x4=  !1;_0x5c29xa= _0x5c29x3[_0xd587[728]]();for(_0x5c29x9= 0;_0x5c29x9< this[_0xd587[2904]][_0xd587[67]]&&  !_0x5c29x4;_0x5c29x9++){_0x5c29x4= _0x5c29xa== this[_0xd587[2904]][_0x5c29x9][_0xd587[252]]|| _0x5c29xa[_0xd587[265]]== this[_0xd587[2904]][_0x5c29x9][_0xd587[252]]};_0x5c29x4|| this[_0xd587[2933]](this[_0xd587[2915]],this[_0xd587[2904]],_0x5c29x3)}}else {this[_0xd587[2886]][_0xd587[862]]()}};mxConnectionHandler[_0xd587[202]][_0xd587[2930]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=null,_0x5c29x5=_0x5c29x2[_0xd587[441]],_0x5c29x9=_0x5c29x5[_0xd587[2305]](_0x5c29x2);if(null!= _0x5c29x9){var _0x5c29xa=null!= this[_0xd587[2922]]&& 0< this[_0xd587[2922]][_0xd587[67]]?this[_0xd587[2922]][this[_0xd587[2922]][_0xd587[67]]- 1]: new mxPoint(this[_0xd587[257]][_0xd587[241]](),this[_0xd587[257]][_0xd587[242]]()),_0x5c29x5=_0x5c29x9(_0x5c29x5[_0xd587[2087]](_0x5c29x2),this[_0xd587[2897]],_0x5c29xa,!1);null!= _0x5c29x5&& (_0x5c29x4= _0x5c29x5)}else {_0x5c29x4=  new mxPoint(_0x5c29x2[_0xd587[241]](),_0x5c29x2[_0xd587[242]]())};return _0x5c29x4};mxConnectionHandler[_0xd587[202]][_0xd587[2931]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x4= null;var _0x5c29x5=_0x5c29x2[_0xd587[441]],_0x5c29x9=_0x5c29x5[_0xd587[2305]](_0x5c29x2),_0x5c29xa= new mxPoint(_0x5c29x2[_0xd587[241]](),_0x5c29x2[_0xd587[242]]());if(null!= _0x5c29x9){var _0x5c29x12=mxUtils[_0xd587[433]](_0x5c29x2[_0xd587[124]],mxConstants.STYLE_ROTATION,0),_0x5c29x13=-_0x5c29x12* (Math[_0xd587[424]]/ 180);0!= _0x5c29x12&& (_0x5c29x3= mxUtils[_0xd587[432]]( new mxPoint(_0x5c29x3[_0xd587[235]],_0x5c29x3[_0xd587[236]]),Math[_0xd587[426]](_0x5c29x13),Math[_0xd587[427]](_0x5c29x13),_0x5c29xa));_0x5c29x2= _0x5c29x9(_0x5c29x5[_0xd587[2087]](_0x5c29x2),_0x5c29x2,_0x5c29x3,!1);null!= _0x5c29x2&& (0!= _0x5c29x12&& (_0x5c29x2= mxUtils[_0xd587[432]]( new mxPoint(_0x5c29x2[_0xd587[235]],_0x5c29x2[_0xd587[236]]),Math[_0xd587[426]](-_0x5c29x13),Math[_0xd587[427]](-_0x5c29x13),_0x5c29xa)),_0x5c29x4= _0x5c29x2)}else {_0x5c29x4= _0x5c29xa};return _0x5c29x4};mxConnectionHandler[_0xd587[202]][_0xd587[2933]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){};mxConnectionHandler[_0xd587[202]][_0xd587[2934]]= function(_0x5c29x2){return null!= _0x5c29x2[_0xd587[248]]()};mxConnectionHandler[_0xd587[202]][_0xd587[2935]]= function(_0x5c29x2){var _0x5c29x3=mxUtils[_0xd587[2196]](this[_0xd587[1179]][_0xd587[526]],_0x5c29x2[_0xd587[730]](),_0x5c29x2[_0xd587[732]]()),_0x5c29x4=Math[_0xd587[425]](_0x5c29x3[_0xd587[235]]- this[_0xd587[2823]][_0xd587[235]]),_0x5c29x3=Math[_0xd587[425]](_0x5c29x3[_0xd587[236]]- this[_0xd587[2823]][_0xd587[236]]);if(null!= this[_0xd587[2922]]|| 1< this[_0xd587[2899]]&& (_0x5c29x4> this[_0xd587[1179]][_0xd587[2353]]|| _0x5c29x3> this[_0xd587[1179]][_0xd587[2353]])){null== this[_0xd587[2922]]&& (this[_0xd587[2922]]= []),_0x5c29x4= this[_0xd587[1179]][_0xd587[441]][_0xd587[255]],_0x5c29x3=  new mxPoint(this[_0xd587[1179]][_0xd587[1021]](_0x5c29x2[_0xd587[734]]()/ _0x5c29x4)* _0x5c29x4,this[_0xd587[1179]][_0xd587[1021]](_0x5c29x2[_0xd587[735]]()/ _0x5c29x4)* _0x5c29x4),this[_0xd587[2922]][_0xd587[207]](_0x5c29x3)}};mxConnectionHandler[_0xd587[202]][_0xd587[789]]= function(_0x5c29x2,_0x5c29x3){if(!_0x5c29x3[_0xd587[721]]()&& this[_0xd587[2908]]()){if(this[_0xd587[2887]]&& !this[_0xd587[2934]](_0x5c29x3)){this[_0xd587[2935]](_0x5c29x3);_0x5c29x3[_0xd587[722]]();return};if(null== this[_0xd587[267]]){var _0x5c29x4=null!= this[_0xd587[257]]?this[_0xd587[257]][_0xd587[246]]:null,_0x5c29x5=null;null!= this[_0xd587[2886]][_0xd587[2920]]&& null!= this[_0xd587[2886]][_0xd587[2919]]&& (_0x5c29x5= this[_0xd587[2886]][_0xd587[2919]][_0xd587[246]]);null== _0x5c29x5&& this[_0xd587[2885]][_0xd587[2867]]()&& (_0x5c29x5= this[_0xd587[2885]][_0xd587[2861]][_0xd587[246]]);this[_0xd587[807]](_0x5c29x4,_0x5c29x5,_0x5c29x3[_0xd587[727]](),_0x5c29x3[_0xd587[736]]())}else {null!= this[_0xd587[257]]&& (null!= this[_0xd587[2885]][_0xd587[2861]]&& this[_0xd587[257]][_0xd587[246]]== this[_0xd587[2885]][_0xd587[2861]][_0xd587[246]])&& this[_0xd587[1179]][_0xd587[2459]](this[_0xd587[2885]][_0xd587[1097]],evt),0< this[_0xd587[267]][_0xd587[67]]&& this[_0xd587[1179]][_0xd587[2580]](this[_0xd587[267]])};this[_0xd587[2906]](this[_0xd587[2904]]);_0x5c29x3[_0xd587[722]]()};null!= this[_0xd587[2823]]&& this[_0xd587[862]]();this[_0xd587[2891]]= this[_0xd587[2890]]=  !1};mxConnectionHandler[_0xd587[202]][_0xd587[862]]= function(){null!= this[_0xd587[253]]&& (this[_0xd587[253]][_0xd587[515]](),this[_0xd587[253]]= null);this[_0xd587[2906]](this[_0xd587[2904]]);this[_0xd587[2904]]= null;this[_0xd587[2885]][_0xd587[862]]();this[_0xd587[2886]][_0xd587[862]]();this[_0xd587[2921]]= this[_0xd587[267]]= this[_0xd587[257]]= this[_0xd587[2897]]= this[_0xd587[2926]]= null;this[_0xd587[2899]]= 0;this[_0xd587[2916]]= this[_0xd587[2823]]= null;this[_0xd587[746]]( new mxEventObject(mxEvent.RESET))};mxConnectionHandler[_0xd587[202]][_0xd587[2932]]= function(){var _0x5c29x2=null== this[_0xd587[267]];this[_0xd587[253]][_0xd587[1307]]= this[_0xd587[2936]](_0x5c29x2);_0x5c29x2= this[_0xd587[2937]](_0x5c29x2);this[_0xd587[253]][_0xd587[1336]]= _0x5c29x2;this[_0xd587[253]][_0xd587[258]]()};mxConnectionHandler[_0xd587[202]][_0xd587[2937]]= function(_0x5c29x2){return _0x5c29x2?mxConstants[_0xd587[2829]]:mxConstants[_0xd587[2938]]};mxConnectionHandler[_0xd587[202]][_0xd587[2936]]= function(_0x5c29x2){return _0x5c29x2?3:1};mxConnectionHandler[_0xd587[202]][_0xd587[807]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){if(null!= _0x5c29x3|| this[_0xd587[2901]]()|| this[_0xd587[1179]][_0xd587[2406]]){var _0x5c29x9=this[_0xd587[1179]][_0xd587[502]](),_0x5c29xa=null;_0x5c29x9[_0xd587[473]]();try{if(null!= _0x5c29x2&& (null== _0x5c29x3&& this[_0xd587[2901]]())&& (_0x5c29x3= this[_0xd587[2939]](_0x5c29x4,_0x5c29x2),null!= _0x5c29x3)){_0x5c29x5= this[_0xd587[1179]][_0xd587[564]]([_0x5c29x3],_0x5c29x4,_0x5c29x5);if(null== _0x5c29x5|| !this[_0xd587[1179]][_0xd587[502]]()[_0xd587[250]](_0x5c29x5)){var _0x5c29x12=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[248]](_0x5c29x5);if(null!= _0x5c29x12){var _0x5c29x13=_0x5c29x9[_0xd587[1721]](_0x5c29x3);_0x5c29x13[_0xd587[235]]-= _0x5c29x12[_0xd587[2078]][_0xd587[235]];_0x5c29x13[_0xd587[236]]-= _0x5c29x12[_0xd587[2078]][_0xd587[236]]}}else {_0x5c29x5= this[_0xd587[1179]][_0xd587[902]]()};this[_0xd587[1179]][_0xd587[2103]](_0x5c29x3,_0x5c29x5)};var _0x5c29x14=this[_0xd587[1179]][_0xd587[902]]();null!= _0x5c29x2&& (null!= _0x5c29x3&& _0x5c29x9[_0xd587[1197]](_0x5c29x2)== _0x5c29x9[_0xd587[1197]](_0x5c29x3)&& _0x5c29x9[_0xd587[1197]](_0x5c29x9[_0xd587[1197]](_0x5c29x2))!= _0x5c29x9[_0xd587[501]]())&& (_0x5c29x14= _0x5c29x9[_0xd587[1197]](_0x5c29x2),null!= _0x5c29x2[_0xd587[256]]&& _0x5c29x2[_0xd587[256]][_0xd587[1500]]&& (null!= _0x5c29x3[_0xd587[256]]&& _0x5c29x3[_0xd587[256]][_0xd587[1500]])&& (_0x5c29x14= _0x5c29x9[_0xd587[1197]](_0x5c29x14)));_0x5c29x13= _0x5c29x12= null;null!= this[_0xd587[2897]]&& (_0x5c29x12= this[_0xd587[2897]][_0xd587[246]][_0xd587[131]],_0x5c29x13= this[_0xd587[2897]][_0xd587[246]][_0xd587[124]]);_0x5c29xa= this[_0xd587[1960]](_0x5c29x14,null,_0x5c29x12,_0x5c29x2,_0x5c29x3,_0x5c29x13);if(null!= _0x5c29xa){this[_0xd587[1179]][_0xd587[2545]](_0x5c29xa,_0x5c29x2,!0,this[_0xd587[2921]]);this[_0xd587[1179]][_0xd587[2545]](_0x5c29xa,_0x5c29x3,!1,this[_0xd587[2886]][_0xd587[2920]]);null!= this[_0xd587[2897]]&& _0x5c29x9[_0xd587[1724]](_0x5c29xa,this[_0xd587[2897]][_0xd587[246]][_0xd587[256]]);var _0x5c29x15=_0x5c29x9[_0xd587[1721]](_0x5c29xa);null== _0x5c29x15&& (_0x5c29x15=  new mxGeometry,_0x5c29x15[_0xd587[1500]]=  !0,_0x5c29x9[_0xd587[1724]](_0x5c29xa,_0x5c29x15));if(null!= this[_0xd587[2922]]&& 0< this[_0xd587[2922]][_0xd587[67]]){var _0x5c29x16=this[_0xd587[1179]][_0xd587[441]][_0xd587[255]],_0x5c29x17=this[_0xd587[1179]][_0xd587[441]][_0xd587[513]];_0x5c29x15[_0xd587[1525]]= [];for(_0x5c29x2= 0;_0x5c29x2< this[_0xd587[2922]][_0xd587[67]];_0x5c29x2++){var _0x5c29x18=this[_0xd587[2922]][_0x5c29x2];_0x5c29x15[_0xd587[1525]][_0xd587[207]]( new mxPoint(_0x5c29x18[_0xd587[235]]/ _0x5c29x16- _0x5c29x17[_0xd587[235]],_0x5c29x18[_0xd587[236]]/ _0x5c29x16- _0x5c29x17[_0xd587[236]]))}};null== _0x5c29x3&& (_0x5c29x18= this[_0xd587[1179]][_0xd587[2689]](_0x5c29x4,!1),_0x5c29x18[_0xd587[235]]-= this[_0xd587[1179]][_0xd587[1136]]/ this[_0xd587[1179]][_0xd587[441]][_0xd587[255]],_0x5c29x18[_0xd587[236]]-= this[_0xd587[1179]][_0xd587[1137]]/ this[_0xd587[1179]][_0xd587[441]][_0xd587[255]],_0x5c29x15[_0xd587[2007]](_0x5c29x18,!1));this[_0xd587[746]]( new mxEventObject(mxEvent.CONNECT,_0xd587[246],_0x5c29xa,_0xd587[763],_0x5c29x4,_0xd587[772],_0x5c29x5))}}catch(q){mxLog[_0xd587[539]](),mxLog[_0xd587[143]](q[_0xd587[281]])}finally{_0x5c29x9[_0xd587[476]]()};this[_0xd587[804]]&& this[_0xd587[2707]](_0x5c29xa,_0x5c29x3)}};mxConnectionHandler[_0xd587[202]][_0xd587[2707]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[1179]][_0xd587[2450]](_0x5c29x2)};mxConnectionHandler[_0xd587[202]][_0xd587[1960]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){if(null== this[_0xd587[1033]]){return this[_0xd587[1179]][_0xd587[1960]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa)};_0x5c29x3= this[_0xd587[2503]](_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa);return _0x5c29x3= this[_0xd587[1179]][_0xd587[2504]](_0x5c29x3,_0x5c29x2,_0x5c29x5,_0x5c29x9)};mxConnectionHandler[_0xd587[202]][_0xd587[2939]]= function(_0x5c29x2,_0x5c29x3){for(var _0x5c29x4=this[_0xd587[1179]][_0xd587[1198]](_0x5c29x3);null!= _0x5c29x4&& _0x5c29x4[_0xd587[1500]];){_0x5c29x3= this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1197]](_0x5c29x3),_0x5c29x4= this[_0xd587[1179]][_0xd587[1198]](_0x5c29x3)};var _0x5c29x5=this[_0xd587[1179]][_0xd587[899]]([_0x5c29x3])[0],_0x5c29x4=this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1721]](_0x5c29x5);if(null!= _0x5c29x4){var _0x5c29x9=this[_0xd587[1179]][_0xd587[2689]](_0x5c29x2);_0x5c29x4[_0xd587[235]]= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x9[_0xd587[235]]- _0x5c29x4[_0xd587[117]]/ 2)- this[_0xd587[1179]][_0xd587[1136]]/ this[_0xd587[1179]][_0xd587[441]][_0xd587[255]];_0x5c29x4[_0xd587[236]]= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x9[_0xd587[236]]- _0x5c29x4[_0xd587[119]]/ 2)- this[_0xd587[1179]][_0xd587[1137]]/ this[_0xd587[1179]][_0xd587[441]][_0xd587[255]];if(null!= this[_0xd587[2823]]){var _0x5c29xa=this[_0xd587[1179]][_0xd587[441]][_0xd587[248]](_0x5c29x3);if(null!= _0x5c29xa){var _0x5c29x12=this[_0xd587[2940]]();Math[_0xd587[425]](this[_0xd587[1179]][_0xd587[1021]](this[_0xd587[2823]][_0xd587[235]])- this[_0xd587[1179]][_0xd587[1021]](_0x5c29x9[_0xd587[235]]))<= _0x5c29x12?_0x5c29x4[_0xd587[235]]= _0x5c29xa[_0xd587[235]]:Math[_0xd587[425]](this[_0xd587[1179]][_0xd587[1021]](this[_0xd587[2823]][_0xd587[236]])- this[_0xd587[1179]][_0xd587[1021]](_0x5c29x9[_0xd587[236]]))<= _0x5c29x12&& (_0x5c29x4[_0xd587[236]]= _0x5c29xa[_0xd587[236]])}}};return _0x5c29x5};mxConnectionHandler[_0xd587[202]][_0xd587[2940]]= function(){return this[_0xd587[1179]][_0xd587[997]]()?this[_0xd587[1179]][_0xd587[1020]]:this[_0xd587[1179]][_0xd587[2353]]};mxConnectionHandler[_0xd587[202]][_0xd587[2503]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=null;null!= this[_0xd587[1033]]&& (_0x5c29x9= this[_0xd587[1033]](_0x5c29x3,_0x5c29x4,_0x5c29x5));null== _0x5c29x9&& (_0x5c29x9=  new mxCell(_0x5c29x2|| _0xd587[110]),_0x5c29x9[_0xd587[1994]](!0),_0x5c29x9[_0xd587[475]](_0x5c29x5),_0x5c29x2=  new mxGeometry,_0x5c29x2[_0xd587[1500]]=  !0,_0x5c29x9[_0xd587[1724]](_0x5c29x2));return _0x5c29x9};mxConnectionHandler[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[1179]][_0xd587[1148]](this);null!= this[_0xd587[253]]&& (this[_0xd587[253]][_0xd587[515]](),this[_0xd587[253]]= null);null!= this[_0xd587[2885]]&& (this[_0xd587[2885]][_0xd587[515]](),this[_0xd587[2885]]= null);null!= this[_0xd587[2886]]&& (this[_0xd587[2886]][_0xd587[515]](),this[_0xd587[2886]]= null);null!= this[_0xd587[1176]]&& (this[_0xd587[1179]][_0xd587[502]]()[_0xd587[745]](this[_0xd587[1176]]),this[_0xd587[1179]][_0xd587[249]]()[_0xd587[745]](this[_0xd587[1176]]),this[_0xd587[1176]]= null);null!= this[_0xd587[2898]]&& (this[_0xd587[1179]][_0xd587[745]](this[_0xd587[2898]]),this[_0xd587[1179]][_0xd587[249]]()[_0xd587[745]](this[_0xd587[2898]]),this[_0xd587[2898]]= null)};function mxConstraintHandler(_0x5c29x2){this[_0xd587[1179]]= _0x5c29x2}mxConstraintHandler[_0xd587[202]][_0xd587[2941]]=  new mxImage(mxClient[_0xd587[88]]+ _0xd587[2942],5,5);mxConstraintHandler[_0xd587[202]][_0xd587[1179]]= null;mxConstraintHandler[_0xd587[202]][_0xd587[984]]=  !0;mxConstraintHandler[_0xd587[202]][_0xd587[2943]]= mxConstants[_0xd587[2854]];mxConstraintHandler[_0xd587[202]][_0xd587[994]]= function(){return this[_0xd587[984]]};mxConstraintHandler[_0xd587[202]][_0xd587[995]]= function(_0x5c29x2){this[_0xd587[984]]= _0x5c29x2};mxConstraintHandler[_0xd587[202]][_0xd587[862]]= function(){if(null!= this[_0xd587[2944]]){for(var _0x5c29x2=0;_0x5c29x2< this[_0xd587[2944]][_0xd587[67]];_0x5c29x2++){this[_0xd587[2944]][_0x5c29x2][_0xd587[515]]()};this[_0xd587[2944]]= null};null!= this[_0xd587[2945]]&& (this[_0xd587[2945]][_0xd587[515]](),this[_0xd587[2945]]= null);this[_0xd587[2946]]= this[_0xd587[2919]]= this[_0xd587[987]]= this[_0xd587[2947]]= this[_0xd587[2920]]= null};mxConstraintHandler[_0xd587[202]][_0xd587[2636]]= function(){return this[_0xd587[1179]][_0xd587[2636]]()};mxConstraintHandler[_0xd587[202]][_0xd587[2948]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return this[_0xd587[2941]]};mxConstraintHandler[_0xd587[202]][_0xd587[2949]]= function(_0x5c29x2,_0x5c29x3){return !1};mxConstraintHandler[_0xd587[202]][_0xd587[2729]]= function(_0x5c29x2,_0x5c29x3){if(this[_0xd587[994]]()&& !this[_0xd587[2949]](_0x5c29x2)){var _0x5c29x4=this[_0xd587[2636]](),_0x5c29x5= new mxRectangle(_0x5c29x2[_0xd587[734]]()- _0x5c29x4,_0x5c29x2[_0xd587[735]]()- _0x5c29x4,2* _0x5c29x4,2* _0x5c29x4),_0x5c29x9=null!= _0x5c29x2[_0xd587[736]]()?this[_0xd587[1179]][_0xd587[2565]](_0x5c29x2[_0xd587[736]]()):!1;if(null== this[_0xd587[2947]]|| !mxUtils[_0xd587[1825]](this[_0xd587[2947]],_0x5c29x5)|| null!= _0x5c29x2[_0xd587[248]]()&& null!= this[_0xd587[2919]]&& _0x5c29x9){if(this[_0xd587[2947]]= null,_0x5c29x2[_0xd587[248]]()!= this[_0xd587[2919]]){if(this[_0xd587[2919]]= null,this[_0xd587[1531]]= null!= _0x5c29x2[_0xd587[248]]()&& _0x5c29x9?this[_0xd587[1179]][_0xd587[2538]](_0x5c29x2[_0xd587[248]](),_0x5c29x3):null,null!= this[_0xd587[1531]]){this[_0xd587[2919]]= _0x5c29x2[_0xd587[248]]();this[_0xd587[2947]]=  new mxRectangle(_0x5c29x2[_0xd587[248]]()[_0xd587[235]],_0x5c29x2[_0xd587[248]]()[_0xd587[236]],_0x5c29x2[_0xd587[248]]()[_0xd587[117]],_0x5c29x2[_0xd587[248]]()[_0xd587[119]]);if(null!= this[_0xd587[2944]]){for(_0x5c29x9= 0;_0x5c29x9< this[_0xd587[2944]][_0xd587[67]];_0x5c29x9++){this[_0xd587[2944]][_0x5c29x9][_0xd587[515]]()};this[_0xd587[2946]]= this[_0xd587[2944]]= null};this[_0xd587[2944]]= [];this[_0xd587[2946]]= [];for(_0x5c29x9= 0;_0x5c29x9< this[_0xd587[1531]][_0xd587[67]];_0x5c29x9++){var _0x5c29xa=this[_0xd587[1179]][_0xd587[2290]](_0x5c29x2[_0xd587[248]](),this[_0xd587[1531]][_0x5c29x9]),_0x5c29x12=this[_0xd587[2948]](_0x5c29x2[_0xd587[248]](),this[_0xd587[1531]][_0x5c29x9],_0x5c29xa),_0x5c29x13=_0x5c29x12[_0xd587[390]],_0x5c29x12= new mxRectangle(_0x5c29xa[_0xd587[235]]- _0x5c29x12[_0xd587[117]]/ 2,_0x5c29xa[_0xd587[236]]- _0x5c29x12[_0xd587[119]]/ 2,_0x5c29x12[_0xd587[117]],_0x5c29x12[_0xd587[119]]),_0x5c29x12= new mxImageShape(_0x5c29x12,_0x5c29x13);_0x5c29x12[_0xd587[507]]= this[_0xd587[1179]][_0xd587[507]]!= mxConstants[_0xd587[508]]?mxConstants[_0xd587[2334]]:mxConstants[_0xd587[508]];_0x5c29x12[_0xd587[1674]]=  !1;_0x5c29x12[_0xd587[176]](this[_0xd587[1179]][_0xd587[249]]()[_0xd587[1524]]());null!= _0x5c29x12[_0xd587[252]][_0xd587[328]]&& _0x5c29x12[_0xd587[252]][_0xd587[265]][_0xd587[950]](_0x5c29x12[_0xd587[252]],_0x5c29x12[_0xd587[252]][_0xd587[265]][_0xd587[285]]);_0x5c29x13= mxUtils[_0xd587[885]](this,function(){return null!= this[_0xd587[2919]]?this[_0xd587[2919]]:_0x5c29x2[_0xd587[248]]()});_0x5c29x12[_0xd587[258]]();mxEvent[_0xd587[2733]](_0x5c29x12[_0xd587[252]],this[_0xd587[1179]],_0x5c29x13);this[_0xd587[2947]][_0xd587[99]](_0x5c29x12[_0xd587[1562]]);this[_0xd587[2944]][_0xd587[207]](_0x5c29x12);this[_0xd587[2946]][_0xd587[207]](_0x5c29xa)};this[_0xd587[2947]][_0xd587[244]](_0x5c29x4)}else {if(null!= this[_0xd587[2944]]){null!= this[_0xd587[2945]]&& (this[_0xd587[2945]][_0xd587[515]](),this[_0xd587[2945]]= null);for(_0x5c29x9= 0;_0x5c29x9< this[_0xd587[2944]][_0xd587[67]];_0x5c29x9++){this[_0xd587[2944]][_0x5c29x9][_0xd587[515]]()};this[_0xd587[2946]]= this[_0xd587[2944]]= null}}}};this[_0xd587[987]]= this[_0xd587[2920]]= null;if(null!= this[_0xd587[2944]]&& null!= this[_0xd587[1531]]&& (null== _0x5c29x2[_0xd587[248]]()|| this[_0xd587[2919]]== _0x5c29x2[_0xd587[248]]())){for(_0x5c29x9= 0;_0x5c29x9< this[_0xd587[2944]][_0xd587[67]];_0x5c29x9++){if(mxUtils[_0xd587[1825]](this[_0xd587[2944]][_0x5c29x9][_0xd587[1562]],_0x5c29x5)){this[_0xd587[2920]]= this[_0xd587[1531]][_0x5c29x9];this[_0xd587[987]]= this[_0xd587[2946]][_0x5c29x9];_0x5c29x4= this[_0xd587[2944]][_0x5c29x9][_0xd587[1562]][_0xd587[238]]();_0x5c29x4[_0xd587[244]](mxClient[_0xd587[80]]?3:2);mxClient[_0xd587[80]]&& (_0x5c29x4[_0xd587[117]]-= 1,_0x5c29x4[_0xd587[119]]-= 1);null== this[_0xd587[2945]]?(_0x5c29x4=  new mxRectangleShape(_0x5c29x4,null,this[_0xd587[2943]],3),_0x5c29x4[_0xd587[507]]= this[_0xd587[1179]][_0xd587[507]]== mxConstants[_0xd587[508]]?mxConstants[_0xd587[508]]:mxConstants[_0xd587[1523]],_0x5c29x4[_0xd587[176]](this[_0xd587[1179]][_0xd587[249]]()[_0xd587[1524]]()),this[_0xd587[2945]]= _0x5c29x4,_0x5c29x13= mxUtils[_0xd587[885]](this,function(){return null!= this[_0xd587[2919]]?this[_0xd587[2919]]:_0x5c29x2[_0xd587[248]]()}),mxEvent[_0xd587[2733]](_0x5c29x4[_0xd587[252]],this[_0xd587[1179]],_0x5c29x13)):(this[_0xd587[2945]][_0xd587[1562]]= _0x5c29x4,this[_0xd587[2945]][_0xd587[258]]());break}}};null== this[_0xd587[2920]]&& null!= this[_0xd587[2945]]&& (this[_0xd587[2945]][_0xd587[515]](),this[_0xd587[2945]]= null)}};mxConstraintHandler[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[862]]()};function mxRubberband(_0x5c29x2){null!= _0x5c29x2&& (this[_0xd587[1179]]= _0x5c29x2,this[_0xd587[1179]][_0xd587[1133]](this),this[_0xd587[2730]]= mxUtils[_0xd587[885]](this,function(){this[_0xd587[2950]]()}),this[_0xd587[1179]][_0xd587[169]](mxEvent.PAN,this[_0xd587[2730]]),mxClient[_0xd587[80]]&& mxEvent[_0xd587[169]](window,_0xd587[2428],mxUtils[_0xd587[885]](this,function(){this[_0xd587[515]]()})))}mxRubberband[_0xd587[202]][_0xd587[2951]]= 20;mxRubberband[_0xd587[202]][_0xd587[984]]=  !0;mxRubberband[_0xd587[202]][_0xd587[485]]= null;mxRubberband[_0xd587[202]][_0xd587[2952]]= null;mxRubberband[_0xd587[202]][_0xd587[2953]]= 0;mxRubberband[_0xd587[202]][_0xd587[2954]]= 0;mxRubberband[_0xd587[202]][_0xd587[994]]= function(){return this[_0xd587[984]]};mxRubberband[_0xd587[202]][_0xd587[995]]= function(_0x5c29x2){this[_0xd587[984]]= _0x5c29x2};mxRubberband[_0xd587[202]][_0xd587[787]]= function(_0x5c29x2,_0x5c29x3){if(!_0x5c29x3[_0xd587[721]]()&& this[_0xd587[994]]()&& this[_0xd587[1179]][_0xd587[994]]()&& (this[_0xd587[1179]][_0xd587[2579]](_0x5c29x3[_0xd587[727]]())|| null== _0x5c29x3[_0xd587[248]]())){var _0x5c29x4=mxUtils[_0xd587[445]](this[_0xd587[1179]][_0xd587[526]]),_0x5c29x5=mxUtils[_0xd587[444]](this[_0xd587[1179]][_0xd587[526]]);_0x5c29x5[_0xd587[235]]-= _0x5c29x4[_0xd587[235]];_0x5c29x5[_0xd587[236]]-= _0x5c29x4[_0xd587[236]];this[_0xd587[861]](_0x5c29x3[_0xd587[730]]()+ _0x5c29x5[_0xd587[235]],_0x5c29x3[_0xd587[732]]()+ _0x5c29x5[_0xd587[236]]);if(mxClient[_0xd587[133]]&& !mxClient[_0xd587[75]]&& !mxClient[_0xd587[76]]){var _0x5c29x9=this[_0xd587[1179]][_0xd587[526]],_0x5c29xa=function(_0x5c29x2){_0x5c29x2=  new mxMouseEvent(_0x5c29x2);var _0x5c29x3=mxUtils[_0xd587[2196]](_0x5c29x9,_0x5c29x2[_0xd587[730]](),_0x5c29x2[_0xd587[732]]());_0x5c29x2[_0xd587[725]]= _0x5c29x3[_0xd587[235]];_0x5c29x2[_0xd587[726]]= _0x5c29x3[_0xd587[236]];return _0x5c29x2};this[_0xd587[2955]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[788]](this[_0xd587[1179]],_0x5c29xa(_0x5c29x2))});this[_0xd587[981]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[789]](this[_0xd587[1179]],_0x5c29xa(_0x5c29x2))});mxEvent[_0xd587[169]](document,_0xd587[752],this[_0xd587[2955]]);mxEvent[_0xd587[169]](document,_0xd587[753],this[_0xd587[981]])};_0x5c29x3[_0xd587[722]](!1)}};mxRubberband[_0xd587[202]][_0xd587[861]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[2823]]=  new mxPoint(_0x5c29x2,_0x5c29x3)};mxRubberband[_0xd587[202]][_0xd587[788]]= function(_0x5c29x2,_0x5c29x3){if(!_0x5c29x3[_0xd587[721]]()&& null!= this[_0xd587[2823]]){var _0x5c29x4=mxUtils[_0xd587[444]](this[_0xd587[1179]][_0xd587[526]]),_0x5c29x5=mxUtils[_0xd587[445]](this[_0xd587[1179]][_0xd587[526]]);_0x5c29x4[_0xd587[235]]-= _0x5c29x5[_0xd587[235]];_0x5c29x4[_0xd587[236]]-= _0x5c29x5[_0xd587[236]];var _0x5c29x5=_0x5c29x3[_0xd587[730]]()+ _0x5c29x4[_0xd587[235]],_0x5c29x4=_0x5c29x3[_0xd587[732]]()+ _0x5c29x4[_0xd587[236]],_0x5c29x9=this[_0xd587[2823]][_0xd587[235]]- _0x5c29x5,_0x5c29xa=this[_0xd587[2823]][_0xd587[236]]- _0x5c29x4,_0x5c29x12=this[_0xd587[1179]][_0xd587[2353]];if(null!= this[_0xd587[485]]|| Math[_0xd587[425]](_0x5c29x9)> _0x5c29x12|| Math[_0xd587[425]](_0x5c29xa)> _0x5c29x12){null== this[_0xd587[485]]&& (this[_0xd587[485]]= this[_0xd587[2156]]()),mxUtils[_0xd587[2440]](),this[_0xd587[2729]](_0x5c29x5,_0x5c29x4),_0x5c29x3[_0xd587[722]]()}}};mxRubberband[_0xd587[202]][_0xd587[2156]]= function(){null== this[_0xd587[2952]]&& (this[_0xd587[2952]]= document[_0xd587[55]](_0xd587[485]),this[_0xd587[2952]][_0xd587[926]]= _0xd587[2956],mxUtils[_0xd587[254]](this[_0xd587[2952]],this[_0xd587[2951]]));this[_0xd587[1179]][_0xd587[526]][_0xd587[62]](this[_0xd587[2952]]);return this[_0xd587[2952]]};mxRubberband[_0xd587[202]][_0xd587[789]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=null!= this[_0xd587[485]];this[_0xd587[862]]();_0x5c29x4&& (_0x5c29x4=  new mxRectangle(this[_0xd587[235]],this[_0xd587[236]],this[_0xd587[117]],this[_0xd587[119]]),this[_0xd587[1179]][_0xd587[2698]](_0x5c29x4,_0x5c29x3[_0xd587[727]]()),_0x5c29x3[_0xd587[722]]())};mxRubberband[_0xd587[202]][_0xd587[862]]= function(){null!= this[_0xd587[485]]&& this[_0xd587[485]][_0xd587[265]][_0xd587[266]](this[_0xd587[485]]);null!= this[_0xd587[2955]]&& (mxEvent[_0xd587[745]](document,_0xd587[752],this[_0xd587[2955]]),this[_0xd587[2955]]= null);null!= this[_0xd587[981]]&& (mxEvent[_0xd587[745]](document,_0xd587[753],this[_0xd587[981]]),this[_0xd587[981]]= null);this[_0xd587[2954]]= this[_0xd587[2953]]= 0;this[_0xd587[485]]= this[_0xd587[2823]]= null};mxRubberband[_0xd587[202]][_0xd587[2729]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[2953]]= _0x5c29x2;this[_0xd587[2954]]= _0x5c29x3;this[_0xd587[2950]]()};mxRubberband[_0xd587[202]][_0xd587[2950]]= function(){if(null!= this[_0xd587[485]]){var _0x5c29x2=this[_0xd587[2953]]- this[_0xd587[1179]][_0xd587[1136]],_0x5c29x3=this[_0xd587[2954]]- this[_0xd587[1179]][_0xd587[1137]];this[_0xd587[235]]= Math[_0xd587[243]](this[_0xd587[2823]][_0xd587[235]],_0x5c29x2);this[_0xd587[236]]= Math[_0xd587[243]](this[_0xd587[2823]][_0xd587[236]],_0x5c29x3);this[_0xd587[117]]= Math[_0xd587[160]](this[_0xd587[2823]][_0xd587[235]],_0x5c29x2)- this[_0xd587[235]];this[_0xd587[119]]= Math[_0xd587[160]](this[_0xd587[2823]][_0xd587[236]],_0x5c29x3)- this[_0xd587[236]];_0x5c29x2= mxClient[_0xd587[47]]?this[_0xd587[1179]][_0xd587[1137]]:0;this[_0xd587[485]][_0xd587[124]][_0xd587[361]]= this[_0xd587[235]]+ (mxClient[_0xd587[47]]?this[_0xd587[1179]][_0xd587[1136]]:0)+ _0xd587[168];this[_0xd587[485]][_0xd587[124]][_0xd587[125]]= this[_0xd587[236]]+ _0x5c29x2+ _0xd587[168];this[_0xd587[485]][_0xd587[124]][_0xd587[117]]= Math[_0xd587[160]](1,this[_0xd587[117]])+ _0xd587[168];this[_0xd587[485]][_0xd587[124]][_0xd587[119]]= Math[_0xd587[160]](1,this[_0xd587[119]])+ _0xd587[168]}};mxRubberband[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[2717]]|| (this[_0xd587[2717]]=  !0,this[_0xd587[1179]][_0xd587[1148]](this),this[_0xd587[1179]][_0xd587[745]](this[_0xd587[2730]]),this[_0xd587[862]](),null!= this[_0xd587[2952]]&& (this[_0xd587[2952]]= null))};function mxVertexHandler(_0x5c29x2){null!= _0x5c29x2&& (this[_0xd587[724]]= _0x5c29x2,this[_0xd587[176]]())}mxVertexHandler[_0xd587[202]][_0xd587[1179]]= null;mxVertexHandler[_0xd587[202]][_0xd587[724]]= null;mxVertexHandler[_0xd587[202]][_0xd587[2957]]=  !1;mxVertexHandler[_0xd587[202]][_0xd587[1983]]= null;mxVertexHandler[_0xd587[202]][_0xd587[2958]]=  !0;mxVertexHandler[_0xd587[202]][_0xd587[2959]]= null;mxVertexHandler[_0xd587[202]][_0xd587[2353]]= 0;mxVertexHandler[_0xd587[202]][_0xd587[2809]]=  !1;mxVertexHandler[_0xd587[202]][_0xd587[2960]]=  !0;mxVertexHandler[_0xd587[202]][_0xd587[176]]= function(){this[_0xd587[1179]]= this[_0xd587[724]][_0xd587[441]][_0xd587[1179]];this[_0xd587[2961]]= this[_0xd587[2962]](this[_0xd587[724]]);this[_0xd587[1562]]=  new mxRectangle(this[_0xd587[2961]][_0xd587[235]],this[_0xd587[2961]][_0xd587[236]],this[_0xd587[2961]][_0xd587[117]],this[_0xd587[2961]][_0xd587[119]]);this[_0xd587[2732]]= this[_0xd587[2963]](this[_0xd587[1562]]);this[_0xd587[2732]][_0xd587[507]]= this[_0xd587[1179]][_0xd587[507]]!= mxConstants[_0xd587[508]]?mxConstants[_0xd587[1523]]:mxConstants[_0xd587[508]];this[_0xd587[2732]][_0xd587[1229]]=  !1;this[_0xd587[2732]][_0xd587[176]](this[_0xd587[1179]][_0xd587[249]]()[_0xd587[1524]]());this[_0xd587[1179]][_0xd587[1712]](this[_0xd587[724]][_0xd587[246]])&& (this[_0xd587[2732]][_0xd587[252]][_0xd587[124]][_0xd587[270]]= mxConstants[_0xd587[2832]]);mxEvent[_0xd587[2733]](this[_0xd587[2732]][_0xd587[252]],this[_0xd587[1179]],this[_0xd587[724]]);if(0>= mxGraphHandler[_0xd587[202]][_0xd587[2795]]|| this[_0xd587[1179]][_0xd587[2694]]()< mxGraphHandler[_0xd587[202]][_0xd587[2795]]){var _0x5c29x2=this[_0xd587[1179]][_0xd587[2657]](this[_0xd587[724]][_0xd587[246]]);this[_0xd587[2964]]= [];if(_0x5c29x2|| this[_0xd587[1179]][_0xd587[2628]](this[_0xd587[724]][_0xd587[246]])&& 2<= this[_0xd587[724]][_0xd587[117]]&& 2<= this[_0xd587[724]][_0xd587[119]]){var _0x5c29x3=0;_0x5c29x2&& (this[_0xd587[2957]]|| (this[_0xd587[2964]][_0xd587[207]](this[_0xd587[2735]](_0xd587[936],_0x5c29x3++)),this[_0xd587[2964]][_0xd587[207]](this[_0xd587[2735]](_0xd587[2965],_0x5c29x3++)),this[_0xd587[2964]][_0xd587[207]](this[_0xd587[2735]](_0xd587[2966],_0x5c29x3++)),this[_0xd587[2964]][_0xd587[207]](this[_0xd587[2735]](_0xd587[2967],_0x5c29x3++)),this[_0xd587[2964]][_0xd587[207]](this[_0xd587[2735]](_0xd587[2968],_0x5c29x3++)),this[_0xd587[2964]][_0xd587[207]](this[_0xd587[2735]](_0xd587[2969],_0x5c29x3++)),this[_0xd587[2964]][_0xd587[207]](this[_0xd587[2735]](_0xd587[2970],_0x5c29x3++))),this[_0xd587[2964]][_0xd587[207]](this[_0xd587[2735]](_0xd587[2971],_0x5c29x3++)));_0x5c29x2= this[_0xd587[1179]][_0xd587[251]][_0xd587[1721]](this[_0xd587[724]][_0xd587[246]]);null!= _0x5c29x2&& (!_0x5c29x2[_0xd587[1500]]&& !this[_0xd587[1179]][_0xd587[1730]](this[_0xd587[724]][_0xd587[246]])&& this[_0xd587[1179]][_0xd587[2628]](this[_0xd587[724]][_0xd587[246]]))&& (this[_0xd587[2972]]= this[_0xd587[2735]](mxConstants.CURSOR_LABEL_HANDLE,mxEvent.LABEL_HANDLE,mxConstants.LABEL_HANDLE_SIZE,mxConstants.LABEL_HANDLE_FILLCOLOR),this[_0xd587[2964]][_0xd587[207]](this[_0xd587[2972]]))}else {this[_0xd587[1179]][_0xd587[1712]](this[_0xd587[724]][_0xd587[246]])&& (!this[_0xd587[1179]][_0xd587[2657]](this[_0xd587[724]][_0xd587[246]])&& 2> this[_0xd587[724]][_0xd587[117]]&& 2> this[_0xd587[724]][_0xd587[119]])&& (this[_0xd587[2972]]= this[_0xd587[2735]](mxConstants.CURSOR_MOVABLE_VERTEX,null,null,mxConstants.LABEL_HANDLE_FILLCOLOR),this[_0xd587[2964]][_0xd587[207]](this[_0xd587[2972]]))}};if(this[_0xd587[2809]]&& (0>= mxGraphHandler[_0xd587[202]][_0xd587[2795]]|| this[_0xd587[1179]][_0xd587[2694]]()< mxGraphHandler[_0xd587[202]][_0xd587[2795]])){this[_0xd587[2973]]= this[_0xd587[2735]](_0xd587[356],mxEvent.ROTATION_HANDLE,mxConstants[_0xd587[2974]]+ 3,mxConstants.HANDLE_FILLCOLOR),this[_0xd587[2964]][_0xd587[207]](this[_0xd587[2973]])};this[_0xd587[258]]()};mxVertexHandler[_0xd587[202]][_0xd587[2962]]= function(_0x5c29x2){return  new mxRectangle(Math[_0xd587[488]](_0x5c29x2[_0xd587[235]]),Math[_0xd587[488]](_0x5c29x2[_0xd587[236]]),Math[_0xd587[488]](_0x5c29x2[_0xd587[117]]),Math[_0xd587[488]](_0x5c29x2[_0xd587[119]]))};mxVertexHandler[_0xd587[202]][_0xd587[2963]]= function(_0x5c29x2){_0x5c29x2=  new mxRectangleShape(_0x5c29x2,null,this[_0xd587[2975]]());_0x5c29x2[_0xd587[1307]]= this[_0xd587[2976]]();_0x5c29x2[_0xd587[1522]]= this[_0xd587[2977]]();return _0x5c29x2};mxVertexHandler[_0xd587[202]][_0xd587[2975]]= function(){return mxConstants[_0xd587[2978]]};mxVertexHandler[_0xd587[202]][_0xd587[2976]]= function(){return mxConstants[_0xd587[2979]]};mxVertexHandler[_0xd587[202]][_0xd587[2977]]= function(){return mxConstants[_0xd587[2980]]};mxVertexHandler[_0xd587[202]][_0xd587[2735]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){_0x5c29x4= _0x5c29x4|| mxConstants[_0xd587[2974]];_0x5c29x4=  new mxRectangle(0,0,_0x5c29x4,_0x5c29x4);_0x5c29x5= this[_0xd587[2981]](_0x5c29x4,_0x5c29x3,_0x5c29x5);_0x5c29x5[_0xd587[1567]]()&& null!= this[_0xd587[724]][_0xd587[963]]&& this[_0xd587[724]][_0xd587[963]][_0xd587[252]][_0xd587[265]]== this[_0xd587[1179]][_0xd587[526]]?(_0x5c29x5[_0xd587[1562]][_0xd587[119]]-= 1,_0x5c29x5[_0xd587[1562]][_0xd587[117]]-= 1,_0x5c29x5[_0xd587[507]]= mxConstants[_0xd587[1656]],_0x5c29x5[_0xd587[176]](this[_0xd587[1179]][_0xd587[526]])):(_0x5c29x5[_0xd587[507]]= this[_0xd587[1179]][_0xd587[507]]!= mxConstants[_0xd587[508]]?mxConstants[_0xd587[2334]]:mxConstants[_0xd587[508]],_0x5c29x5[_0xd587[176]](this[_0xd587[1179]][_0xd587[249]]()[_0xd587[1524]]()));mxEvent[_0xd587[2733]](_0x5c29x5[_0xd587[252]],this[_0xd587[1179]],this[_0xd587[724]]);this[_0xd587[1179]][_0xd587[994]]()&& (_0x5c29x5[_0xd587[252]][_0xd587[124]][_0xd587[270]]= _0x5c29x2);this[_0xd587[2982]](_0x5c29x3)|| (_0x5c29x5[_0xd587[252]][_0xd587[124]][_0xd587[187]]= _0xd587[188]);return _0x5c29x5};mxVertexHandler[_0xd587[202]][_0xd587[2982]]= function(_0x5c29x2){return !0};mxVertexHandler[_0xd587[202]][_0xd587[2981]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return null!= this[_0xd587[2959]]?(_0x5c29x2[_0xd587[117]]= this[_0xd587[2959]][_0xd587[117]],_0x5c29x2[_0xd587[119]]= this[_0xd587[2959]][_0xd587[119]], new mxImageShape(_0x5c29x2,this[_0xd587[2959]][_0xd587[390]])):_0x5c29x3== mxEvent[_0xd587[2983]]? new mxEllipse(_0x5c29x2,_0x5c29x4|| mxConstants[_0xd587[2984]],mxConstants.HANDLE_STROKECOLOR): new mxRectangleShape(_0x5c29x2,_0x5c29x4|| mxConstants[_0xd587[2984]],mxConstants.HANDLE_STROKECOLOR)};mxVertexHandler[_0xd587[202]][_0xd587[2985]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){null!= _0x5c29x2&& (_0x5c29x2[_0xd587[1562]][_0xd587[235]]= Math[_0xd587[488]](_0x5c29x3- _0x5c29x2[_0xd587[1562]][_0xd587[117]]/ 2),_0x5c29x2[_0xd587[1562]][_0xd587[236]]= Math[_0xd587[488]](_0x5c29x4- _0x5c29x2[_0xd587[1562]][_0xd587[119]]/ 2),_0x5c29x2[_0xd587[258]]())};mxVertexHandler[_0xd587[202]][_0xd587[2986]]= function(_0x5c29x2){if(_0x5c29x2[_0xd587[729]](this[_0xd587[2973]])){return mxEvent[_0xd587[2983]]};if(_0x5c29x2[_0xd587[729]](this[_0xd587[2972]])){return mxEvent[_0xd587[2987]]};if(null!= this[_0xd587[2964]]){for(var _0x5c29x3=this[_0xd587[2353]],_0x5c29x3=this[_0xd587[2958]]&& (mxClient[_0xd587[80]]|| 0< _0x5c29x3)? new mxRectangle(_0x5c29x2[_0xd587[734]]()- _0x5c29x3,_0x5c29x2[_0xd587[735]]()- _0x5c29x3,2* _0x5c29x3,2* _0x5c29x3):null,_0x5c29x4=0;_0x5c29x4< this[_0xd587[2964]][_0xd587[67]];_0x5c29x4++){if(_0x5c29x2[_0xd587[729]](this[_0xd587[2964]][_0x5c29x4])|| null!= _0x5c29x3&& mxUtils[_0xd587[1825]](this[_0xd587[2964]][_0x5c29x4][_0xd587[1562]],_0x5c29x3)){return _0x5c29x4}}};return null};mxVertexHandler[_0xd587[202]][_0xd587[787]]= function(_0x5c29x2,_0x5c29x3){if(!_0x5c29x3[_0xd587[721]]()&& this[_0xd587[1179]][_0xd587[994]]()&& !this[_0xd587[1179]][_0xd587[2579]](_0x5c29x3[_0xd587[727]]())&& (0< this[_0xd587[2353]]|| _0x5c29x3[_0xd587[248]]()== this[_0xd587[724]])){var _0x5c29x4=this[_0xd587[2986]](_0x5c29x3);null!= _0x5c29x4&& (this[_0xd587[861]](_0x5c29x3[_0xd587[730]](),_0x5c29x3[_0xd587[732]](),_0x5c29x4),_0x5c29x3[_0xd587[722]]())}};mxVertexHandler[_0xd587[202]][_0xd587[861]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x2= mxUtils[_0xd587[2196]](this[_0xd587[1179]][_0xd587[526]],_0x5c29x2,_0x5c29x3);this[_0xd587[2739]]= _0x5c29x2[_0xd587[235]];this[_0xd587[2740]]= _0x5c29x2[_0xd587[236]];this[_0xd587[1983]]= _0x5c29x4;this[_0xd587[2732]][_0xd587[252]][_0xd587[124]][_0xd587[495]]= _0x5c29x4== mxEvent[_0xd587[2983]]?_0xd587[497]:_0xd587[130];this[_0xd587[2988]]= this[_0xd587[2963]](this[_0xd587[1562]]);!(mxClient[_0xd587[48]]&& 0!= Number(this[_0xd587[724]][_0xd587[124]][mxConstants[_0xd587[2278]]]|| _0xd587[468]))&& null!= this[_0xd587[724]][_0xd587[963]]&& this[_0xd587[724]][_0xd587[963]][_0xd587[252]][_0xd587[265]]== this[_0xd587[1179]][_0xd587[526]]?(this[_0xd587[2988]][_0xd587[507]]= mxConstants[_0xd587[1656]],this[_0xd587[2988]][_0xd587[176]](this[_0xd587[1179]][_0xd587[526]])):(this[_0xd587[2988]][_0xd587[507]]= this[_0xd587[1179]][_0xd587[507]]!= mxConstants[_0xd587[508]]?mxConstants[_0xd587[1523]]:mxConstants[_0xd587[508]],this[_0xd587[2988]][_0xd587[176]](this[_0xd587[1179]][_0xd587[441]][_0xd587[1524]]()))};mxVertexHandler[_0xd587[202]][_0xd587[788]]= function(_0x5c29x2,_0x5c29x3){if(!_0x5c29x3[_0xd587[721]]()&& null!= this[_0xd587[1983]]){var _0x5c29x4= new mxPoint(_0x5c29x3[_0xd587[734]](),_0x5c29x3[_0xd587[735]]()),_0x5c29x5=this[_0xd587[1179]][_0xd587[1018]](_0x5c29x3[_0xd587[727]]()),_0x5c29x9=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[255]];if(this[_0xd587[1983]]== mxEvent[_0xd587[2987]]){_0x5c29x5&& (_0x5c29x4[_0xd587[235]]= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x4[_0xd587[235]]/ _0x5c29x9)* _0x5c29x9,_0x5c29x4[_0xd587[236]]= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x4[_0xd587[236]]/ _0x5c29x9)* _0x5c29x9),this[_0xd587[2985]](this[_0xd587[2964]][this[_0xd587[2964]][_0xd587[67]]- 1],_0x5c29x4[_0xd587[235]],_0x5c29x4[_0xd587[236]])}else {if(this[_0xd587[1983]]== mxEvent[_0xd587[2983]]){var _0x5c29xa=this[_0xd587[724]][_0xd587[235]]+ this[_0xd587[724]][_0xd587[117]]/ 2- _0x5c29x4[_0xd587[235]],_0x5c29x12=this[_0xd587[724]][_0xd587[236]]+ this[_0xd587[724]][_0xd587[119]]/ 2- _0x5c29x4[_0xd587[236]];this[_0xd587[2989]]= 0!= _0x5c29xa?180* Math[_0xd587[2990]](_0x5c29x12/ _0x5c29xa)/ Math[_0xd587[424]]+ 90:0> _0x5c29x12?180:0;0< _0x5c29xa&& (this[_0xd587[2989]]-= 180);this[_0xd587[2960]]&& (_0x5c29xa= _0x5c29x4[_0xd587[235]]- this[_0xd587[724]][_0xd587[241]](),_0x5c29x12= _0x5c29x4[_0xd587[236]]- this[_0xd587[724]][_0xd587[242]](),_0x5c29xa= Math[_0xd587[425]](Math[_0xd587[428]](_0x5c29xa* _0x5c29xa+ _0x5c29x12* _0x5c29x12)- this[_0xd587[724]][_0xd587[119]]/ 2- 20),_0x5c29xa= Math[_0xd587[160]](1,5* Math[_0xd587[243]](3,Math[_0xd587[160]](0,Math[_0xd587[488]](80/ Math[_0xd587[425]](_0x5c29xa))))),this[_0xd587[2989]]= Math[_0xd587[488]](this[_0xd587[2989]]/ _0x5c29xa)* _0x5c29xa);this[_0xd587[2732]][_0xd587[603]]= this[_0xd587[2989]];this[_0xd587[2732]][_0xd587[258]]()}else {var _0x5c29x13=mxUtils[_0xd587[431]](this[_0xd587[724]][_0xd587[124]][mxConstants[_0xd587[2278]]]|| _0xd587[468]),_0x5c29x14=Math[_0xd587[426]](-_0x5c29x13),_0x5c29x15=Math[_0xd587[427]](-_0x5c29x13),_0x5c29x16= new mxPoint(this[_0xd587[724]][_0xd587[241]](),this[_0xd587[724]][_0xd587[242]]()),_0x5c29xa=_0x5c29x4[_0xd587[235]]- this[_0xd587[2739]],_0x5c29x12=_0x5c29x4[_0xd587[236]]- this[_0xd587[2740]],_0x5c29x4=this[_0xd587[1179]][_0xd587[441]][_0xd587[513]],_0x5c29x17=_0x5c29x15* _0x5c29xa+ _0x5c29x14* _0x5c29x12,_0x5c29xa=_0x5c29x14* _0x5c29xa- _0x5c29x15* _0x5c29x12;this[_0xd587[1562]]= this[_0xd587[2991]](this[_0xd587[2961]],_0x5c29xa,_0x5c29x17,this[_0xd587[1983]],_0x5c29x5,_0x5c29x9,_0x5c29x4);_0x5c29x14= Math[_0xd587[426]](_0x5c29x13);_0x5c29x15= Math[_0xd587[427]](_0x5c29x13);_0x5c29x12=  new mxPoint(this[_0xd587[1562]][_0xd587[241]](),this[_0xd587[1562]][_0xd587[242]]());_0x5c29xa= _0x5c29x12[_0xd587[235]]- _0x5c29x16[_0xd587[235]];_0x5c29x12= _0x5c29x12[_0xd587[236]]- _0x5c29x16[_0xd587[236]];_0x5c29x16= _0x5c29x15* _0x5c29xa+ _0x5c29x14* _0x5c29x12- _0x5c29x12;this[_0xd587[1562]][_0xd587[235]]+= _0x5c29x14* _0x5c29xa- _0x5c29x15* _0x5c29x12- _0x5c29xa;this[_0xd587[1562]][_0xd587[236]]+= _0x5c29x16;this[_0xd587[2932]]()}};_0x5c29x3[_0xd587[722]]()}else {null!= this[_0xd587[2986]](_0x5c29x3)&& _0x5c29x3[_0xd587[722]](!1)}};mxVertexHandler[_0xd587[202]][_0xd587[789]]= function(_0x5c29x2,_0x5c29x3){if(!_0x5c29x3[_0xd587[721]]()&& null!= this[_0xd587[1983]]&& null!= this[_0xd587[724]]){var _0x5c29x4= new mxPoint(_0x5c29x3[_0xd587[734]](),_0x5c29x3[_0xd587[735]]());this[_0xd587[1179]][_0xd587[502]]()[_0xd587[473]]();try{if(this[_0xd587[1983]]== mxEvent[_0xd587[2983]]){null!= this[_0xd587[2989]]&& this[_0xd587[2992]](this[_0xd587[724]][_0xd587[246]],this[_0xd587[2989]]- (this[_0xd587[724]][_0xd587[124]][mxConstants[_0xd587[2278]]]|| 0))}else {var _0x5c29x5=this[_0xd587[1179]][_0xd587[1018]](_0x5c29x3[_0xd587[727]]()),_0x5c29x9=mxUtils[_0xd587[431]](this[_0xd587[724]][_0xd587[124]][mxConstants[_0xd587[2278]]]|| _0xd587[468]),_0x5c29xa=Math[_0xd587[426]](-_0x5c29x9),_0x5c29x12=Math[_0xd587[427]](-_0x5c29x9),_0x5c29x13=_0x5c29x4[_0xd587[235]]- this[_0xd587[2739]],_0x5c29x14=_0x5c29x4[_0xd587[236]]- this[_0xd587[2740]],_0x5c29x4=_0x5c29x12* _0x5c29x13+ _0x5c29xa* _0x5c29x14,_0x5c29x13=_0x5c29xa* _0x5c29x13- _0x5c29x12* _0x5c29x14,_0x5c29x14=_0x5c29x4,_0x5c29x15=this[_0xd587[1179]][_0xd587[441]][_0xd587[255]];this[_0xd587[2526]](this[_0xd587[724]][_0xd587[246]],_0x5c29x13/ _0x5c29x15,_0x5c29x14/ _0x5c29x15,this[_0xd587[1983]],_0x5c29x5)}}finally{this[_0xd587[1179]][_0xd587[502]]()[_0xd587[476]]()};this[_0xd587[862]]();_0x5c29x3[_0xd587[722]]()}};mxVertexHandler[_0xd587[202]][_0xd587[2992]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1179]][_0xd587[502]]();if(_0x5c29x4[_0xd587[1193]](_0x5c29x2)){var _0x5c29x5=_0x5c29x2== this[_0xd587[724]]?this[_0xd587[724]]:this[_0xd587[1179]][_0xd587[441]][_0xd587[248]](_0x5c29x2);null!= _0x5c29x5&& this[_0xd587[1179]][_0xd587[1717]](mxConstants.STYLE_ROTATION,(_0x5c29x5[_0xd587[124]][mxConstants[_0xd587[2278]]]|| 0)+ _0x5c29x3,[_0x5c29x2]);if(this[_0xd587[724]][_0xd587[246]]!= _0x5c29x2&& (_0x5c29x5= this[_0xd587[1179]][_0xd587[1198]](_0x5c29x2),null!= _0x5c29x5&& !_0x5c29x5[_0xd587[1500]])){if(0!= _0x5c29x3){var _0x5c29x9=this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1197]](_0x5c29x2),_0x5c29xa=this[_0xd587[1179]][_0xd587[1198]](_0x5c29x9);if(!_0x5c29x5[_0xd587[1500]]&& null!= _0x5c29xa){var _0x5c29x12=mxUtils[_0xd587[431]](_0x5c29x3),_0x5c29x9=Math[_0xd587[426]](_0x5c29x12),_0x5c29x12=Math[_0xd587[427]](_0x5c29x12),_0x5c29x13= new mxPoint(_0x5c29x5[_0xd587[241]](),_0x5c29x5[_0xd587[242]]()),_0x5c29xa= new mxPoint(_0x5c29xa[_0xd587[117]]/ 2,_0x5c29xa[_0xd587[119]]/ 2),_0x5c29x9=mxUtils[_0xd587[432]](_0x5c29x13,_0x5c29x9,_0x5c29x12,_0x5c29xa),_0x5c29x5=_0x5c29x5[_0xd587[238]]();_0x5c29x5[_0xd587[235]]= _0x5c29x9[_0xd587[235]]- _0x5c29x5[_0xd587[117]]/ 2;_0x5c29x5[_0xd587[236]]= _0x5c29x9[_0xd587[236]]- _0x5c29x5[_0xd587[119]]/ 2;_0x5c29x4[_0xd587[1724]](_0x5c29x2,_0x5c29x5)}}else {_0x5c29x5= _0x5c29x5[_0xd587[238]](),_0x5c29x5[_0xd587[235]]+= dx,_0x5c29x5[_0xd587[236]]+= dy,_0x5c29x4[_0xd587[1724]](_0x5c29x2,_0x5c29x5)}};_0x5c29x5= _0x5c29x4[_0xd587[262]](_0x5c29x2);for(_0x5c29x9= 0;_0x5c29x9< _0x5c29x5;_0x5c29x9++){this[_0xd587[2992]](_0x5c29x4[_0xd587[263]](_0x5c29x2,_0x5c29x9),_0x5c29x3)}}};mxVertexHandler[_0xd587[202]][_0xd587[862]]= function(){this[_0xd587[1983]]= this[_0xd587[2989]]= null;null!= this[_0xd587[2988]]&& (this[_0xd587[2988]][_0xd587[515]](),this[_0xd587[2988]]= null);null!= this[_0xd587[2732]]&& (this[_0xd587[2732]][_0xd587[252]][_0xd587[124]][_0xd587[495]]= _0xd587[497],this[_0xd587[2961]]= this[_0xd587[2962]](this[_0xd587[724]]),this[_0xd587[1562]]=  new mxRectangle(this[_0xd587[2961]][_0xd587[235]],this[_0xd587[2961]][_0xd587[236]],this[_0xd587[2961]][_0xd587[117]],this[_0xd587[2961]][_0xd587[119]]),this[_0xd587[2932]]())};mxVertexHandler[_0xd587[202]][_0xd587[2526]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=this[_0xd587[1179]][_0xd587[251]][_0xd587[1721]](_0x5c29x2);if(null!= _0x5c29xa){if(_0x5c29x5== mxEvent[_0xd587[2987]]){_0x5c29x5= this[_0xd587[1179]][_0xd587[441]][_0xd587[255]],_0x5c29x3= (this[_0xd587[2972]][_0xd587[1562]][_0xd587[241]]()- this[_0xd587[2739]])/ _0x5c29x5,_0x5c29x4= (this[_0xd587[2972]][_0xd587[1562]][_0xd587[242]]()- this[_0xd587[2740]])/ _0x5c29x5,_0x5c29xa= _0x5c29xa[_0xd587[238]](),null== _0x5c29xa[_0xd587[1368]]?_0x5c29xa[_0xd587[1368]]=  new mxPoint(_0x5c29x3,_0x5c29x4):(_0x5c29xa[_0xd587[1368]][_0xd587[235]]+= _0x5c29x3,_0x5c29xa[_0xd587[1368]][_0xd587[236]]+= _0x5c29x4),this[_0xd587[1179]][_0xd587[251]][_0xd587[1724]](_0x5c29x2,_0x5c29xa)}else {_0x5c29x5= this[_0xd587[2991]](_0x5c29xa,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,1, new mxPoint(0,0));var _0x5c29x12=mxUtils[_0xd587[431]](this[_0xd587[724]][_0xd587[124]][mxConstants[_0xd587[2278]]]|| _0xd587[468]);if(0!= _0x5c29x12){_0x5c29x3= _0x5c29x5[_0xd587[241]]()- _0x5c29xa[_0xd587[241]]();_0x5c29x4= _0x5c29x5[_0xd587[242]]()- _0x5c29xa[_0xd587[242]]();_0x5c29x9= Math[_0xd587[426]](_0x5c29x12);var _0x5c29x13=Math[_0xd587[427]](_0x5c29x12),_0x5c29x12=_0x5c29x9* _0x5c29x3- _0x5c29x13* _0x5c29x4- _0x5c29x3;_0x5c29x3= _0x5c29x13* _0x5c29x3+ _0x5c29x9* _0x5c29x4- _0x5c29x4;_0x5c29x4= _0x5c29x5[_0xd587[235]]- _0x5c29xa[_0xd587[235]];var _0x5c29x14=_0x5c29x5[_0xd587[236]]- _0x5c29xa[_0xd587[236]],_0x5c29x15=_0x5c29x9* _0x5c29x4- _0x5c29x13* _0x5c29x14;_0x5c29x9= _0x5c29x13* _0x5c29x4+ _0x5c29x9* _0x5c29x14;_0x5c29x5[_0xd587[235]]+= _0x5c29x12;_0x5c29x5[_0xd587[236]]+= _0x5c29x3;if(!this[_0xd587[1179]][_0xd587[1742]](_0x5c29x2)&& (0!= _0x5c29x12|| 0!= _0x5c29x3)){_0x5c29x4= _0x5c29xa[_0xd587[235]]- _0x5c29x5[_0xd587[235]]+ _0x5c29x15,_0x5c29x14= _0x5c29xa[_0xd587[236]]- _0x5c29x5[_0xd587[236]]+ _0x5c29x9,this[_0xd587[2993]](_0x5c29x2,_0x5c29x4,_0x5c29x14)}};this[_0xd587[1179]][_0xd587[2526]](_0x5c29x2,_0x5c29x5)}}};mxVertexHandler[_0xd587[202]][_0xd587[2993]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){for(var _0x5c29x5=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x9=_0x5c29x5[_0xd587[262]](_0x5c29x2),_0x5c29xa=0;_0x5c29xa< _0x5c29x9;_0x5c29xa++){var _0x5c29x12=_0x5c29x5[_0xd587[263]](_0x5c29x2,_0x5c29xa);if(_0x5c29x5[_0xd587[1193]](_0x5c29x12)){var _0x5c29x13=this[_0xd587[1179]][_0xd587[1198]](_0x5c29x12);null!= _0x5c29x13&& !_0x5c29x13[_0xd587[1500]]&& (_0x5c29x13= _0x5c29x13[_0xd587[238]](),_0x5c29x13[_0xd587[235]]+= _0x5c29x3,_0x5c29x13[_0xd587[236]]+= _0x5c29x4,_0x5c29x5[_0xd587[1724]](_0x5c29x12,_0x5c29x13))}}};mxVertexHandler[_0xd587[202]][_0xd587[2991]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12){if(this[_0xd587[2957]]){_0x5c29x12= _0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]]+ _0x5c29x3;var _0x5c29x13=_0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]]+ _0x5c29x4;_0x5c29x9&& (_0x5c29x12= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x12/ _0x5c29xa)* _0x5c29xa,_0x5c29x13= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x13/ _0x5c29xa)* _0x5c29xa);_0x5c29xa=  new mxRectangle(_0x5c29x2[_0xd587[235]],_0x5c29x2[_0xd587[236]],0,0);_0x5c29xa[_0xd587[99]]( new mxRectangle(_0x5c29x12,_0x5c29x13,0,0));return _0x5c29xa};var _0x5c29x13=_0x5c29x2[_0xd587[235]]- _0x5c29x12[_0xd587[235]]* _0x5c29xa,_0x5c29x14=_0x5c29x13+ _0x5c29x2[_0xd587[117]],_0x5c29x15=_0x5c29x2[_0xd587[236]]- _0x5c29x12[_0xd587[236]]* _0x5c29xa;_0x5c29x2= _0x5c29x15+ _0x5c29x2[_0xd587[119]];4< _0x5c29x5?(_0x5c29x2+= _0x5c29x4,_0x5c29x9&& (_0x5c29x2= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x2/ _0x5c29xa)* _0x5c29xa)):3> _0x5c29x5&& (_0x5c29x15+= _0x5c29x4,_0x5c29x9&& (_0x5c29x15= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x15/ _0x5c29xa)* _0x5c29xa));if(0== _0x5c29x5|| 3== _0x5c29x5|| 5== _0x5c29x5){_0x5c29x13+= _0x5c29x3,_0x5c29x9&& (_0x5c29x13= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x13/ _0x5c29xa)* _0x5c29xa)}else {if(2== _0x5c29x5|| 4== _0x5c29x5|| 7== _0x5c29x5){_0x5c29x14+= _0x5c29x3,_0x5c29x9&& (_0x5c29x14= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x14/ _0x5c29xa)* _0x5c29xa)}};_0x5c29x9= _0x5c29x14- _0x5c29x13;_0x5c29x2-= _0x5c29x15;0> _0x5c29x9&& (_0x5c29x13+= _0x5c29x9,_0x5c29x9= Math[_0xd587[425]](_0x5c29x9));0> _0x5c29x2&& (_0x5c29x15+= _0x5c29x2,_0x5c29x2= Math[_0xd587[425]](_0x5c29x2));return  new mxRectangle(_0x5c29x13+ _0x5c29x12[_0xd587[235]]* _0x5c29xa,_0x5c29x15+ _0x5c29x12[_0xd587[236]]* _0x5c29xa,_0x5c29x9,_0x5c29x2)};mxVertexHandler[_0xd587[202]][_0xd587[258]]= function(){this[_0xd587[2961]]= this[_0xd587[2962]](this[_0xd587[724]]);this[_0xd587[1562]]=  new mxRectangle(this[_0xd587[724]][_0xd587[235]],this[_0xd587[724]][_0xd587[236]],this[_0xd587[724]][_0xd587[117]],this[_0xd587[724]][_0xd587[119]]);var _0x5c29x2=this[_0xd587[724]];if(null!= this[_0xd587[2964]]){var _0x5c29x3=_0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]],_0x5c29x4=_0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]];if(this[_0xd587[2957]]){this[_0xd587[2985]](this[_0xd587[2964]][0],_0x5c29x3,_0x5c29x4)}else {var _0x5c29x5=_0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]]/ 2,_0x5c29x9=_0x5c29x2[_0xd587[236]]+ _0x5c29x2[_0xd587[119]]/ 2;if(1< this[_0xd587[2964]][_0xd587[67]]){var _0x5c29xa=mxUtils[_0xd587[431]](_0x5c29x2[_0xd587[124]][mxConstants[_0xd587[2278]]]|| _0xd587[468]),_0x5c29x12=Math[_0xd587[426]](_0x5c29xa),_0x5c29xa=Math[_0xd587[427]](_0x5c29xa),_0x5c29x13= new mxPoint(_0x5c29x2[_0xd587[241]](),_0x5c29x2[_0xd587[242]]()),_0x5c29x14=mxUtils[_0xd587[432]]( new mxPoint(_0x5c29x2[_0xd587[235]],_0x5c29x2[_0xd587[236]]),_0x5c29x12,_0x5c29xa,_0x5c29x13);this[_0xd587[2985]](this[_0xd587[2964]][0],_0x5c29x14[_0xd587[235]],_0x5c29x14[_0xd587[236]]);_0x5c29x14[_0xd587[235]]= _0x5c29x5;_0x5c29x14[_0xd587[236]]= _0x5c29x2[_0xd587[236]];_0x5c29x14= mxUtils[_0xd587[432]](_0x5c29x14,_0x5c29x12,_0x5c29xa,_0x5c29x13);this[_0xd587[2985]](this[_0xd587[2964]][1],_0x5c29x14[_0xd587[235]],_0x5c29x14[_0xd587[236]]);_0x5c29x14[_0xd587[235]]= _0x5c29x3;_0x5c29x14[_0xd587[236]]= _0x5c29x2[_0xd587[236]];_0x5c29x14= mxUtils[_0xd587[432]](_0x5c29x14,_0x5c29x12,_0x5c29xa,_0x5c29x13);this[_0xd587[2985]](this[_0xd587[2964]][2],_0x5c29x14[_0xd587[235]],_0x5c29x14[_0xd587[236]]);_0x5c29x14[_0xd587[235]]= _0x5c29x2[_0xd587[235]];_0x5c29x14[_0xd587[236]]= _0x5c29x9;_0x5c29x14= mxUtils[_0xd587[432]](_0x5c29x14,_0x5c29x12,_0x5c29xa,_0x5c29x13);this[_0xd587[2985]](this[_0xd587[2964]][3],_0x5c29x14[_0xd587[235]],_0x5c29x14[_0xd587[236]]);_0x5c29x14[_0xd587[235]]= _0x5c29x3;_0x5c29x14[_0xd587[236]]= _0x5c29x9;_0x5c29x14= mxUtils[_0xd587[432]](_0x5c29x14,_0x5c29x12,_0x5c29xa,_0x5c29x13);this[_0xd587[2985]](this[_0xd587[2964]][4],_0x5c29x14[_0xd587[235]],_0x5c29x14[_0xd587[236]]);_0x5c29x14[_0xd587[235]]= _0x5c29x2[_0xd587[235]];_0x5c29x14[_0xd587[236]]= _0x5c29x4;_0x5c29x14= mxUtils[_0xd587[432]](_0x5c29x14,_0x5c29x12,_0x5c29xa,_0x5c29x13);this[_0xd587[2985]](this[_0xd587[2964]][5],_0x5c29x14[_0xd587[235]],_0x5c29x14[_0xd587[236]]);_0x5c29x14[_0xd587[235]]= _0x5c29x5;_0x5c29x14[_0xd587[236]]= _0x5c29x4;_0x5c29x14= mxUtils[_0xd587[432]](_0x5c29x14,_0x5c29x12,_0x5c29xa,_0x5c29x13);this[_0xd587[2985]](this[_0xd587[2964]][6],_0x5c29x14[_0xd587[235]],_0x5c29x14[_0xd587[236]]);_0x5c29x14[_0xd587[235]]= _0x5c29x3;_0x5c29x14[_0xd587[236]]= _0x5c29x4;_0x5c29x14= mxUtils[_0xd587[432]](_0x5c29x14,_0x5c29x12,_0x5c29xa,_0x5c29x13);this[_0xd587[2985]](this[_0xd587[2964]][7],_0x5c29x14[_0xd587[235]],_0x5c29x14[_0xd587[236]]);this[_0xd587[2985]](this[_0xd587[2964]][8],_0x5c29x5+ _0x5c29x2[_0xd587[2079]][_0xd587[235]],_0x5c29x9+ _0x5c29x2[_0xd587[2079]][_0xd587[236]])}else {2<= this[_0xd587[724]][_0xd587[117]]&& 2<= this[_0xd587[724]][_0xd587[119]]?this[_0xd587[2985]](this[_0xd587[2964]][0],_0x5c29x5+ _0x5c29x2[_0xd587[2079]][_0xd587[235]],_0x5c29x9+ _0x5c29x2[_0xd587[2079]][_0xd587[236]]):this[_0xd587[2985]](this[_0xd587[2964]][0],_0x5c29x2[_0xd587[235]],_0x5c29x2[_0xd587[236]])}}};null!= this[_0xd587[2973]]&& (_0x5c29xa= mxUtils[_0xd587[431]](this[_0xd587[724]][_0xd587[124]][mxConstants[_0xd587[2278]]]|| _0xd587[468]),_0x5c29x12= Math[_0xd587[426]](_0x5c29xa),_0x5c29xa= Math[_0xd587[427]](_0x5c29xa),_0x5c29x13=  new mxPoint(this[_0xd587[724]][_0xd587[241]](),this[_0xd587[724]][_0xd587[242]]()),_0x5c29x14= mxUtils[_0xd587[432]]( new mxPoint(_0x5c29x2[_0xd587[235]]+ _0x5c29x2[_0xd587[117]]/ 2,_0x5c29x2[_0xd587[236]]- 16),_0x5c29x12,_0x5c29xa,_0x5c29x13),this[_0xd587[2985]](this[_0xd587[2973]],_0x5c29x14[_0xd587[235]],_0x5c29x14[_0xd587[236]]));this[_0xd587[2732]][_0xd587[603]]= Number(this[_0xd587[724]][_0xd587[124]][mxConstants[_0xd587[2278]]]|| _0xd587[468]);this[_0xd587[2932]]()};mxVertexHandler[_0xd587[202]][_0xd587[2932]]= function(){null!= this[_0xd587[2988]]&& (this[_0xd587[2988]][_0xd587[1562]]= this[_0xd587[1562]],this[_0xd587[2988]][_0xd587[252]][_0xd587[265]]== this[_0xd587[1179]][_0xd587[526]]&& (this[_0xd587[2988]][_0xd587[1562]][_0xd587[117]]= Math[_0xd587[160]](0,this[_0xd587[2988]][_0xd587[1562]][_0xd587[117]]- 1),this[_0xd587[2988]][_0xd587[1562]][_0xd587[119]]= Math[_0xd587[160]](0,this[_0xd587[2988]][_0xd587[1562]][_0xd587[119]]- 1)),this[_0xd587[2988]][_0xd587[603]]= Number(this[_0xd587[724]][_0xd587[124]][mxConstants[_0xd587[2278]]]|| _0xd587[468]),this[_0xd587[2988]][_0xd587[258]]());this[_0xd587[2732]][_0xd587[1562]]= this[_0xd587[1562]];this[_0xd587[2732]][_0xd587[258]]()};mxVertexHandler[_0xd587[202]][_0xd587[515]]= function(){null!= this[_0xd587[2988]]&& (this[_0xd587[2988]][_0xd587[515]](),this[_0xd587[2988]]= null);this[_0xd587[2732]][_0xd587[515]]();this[_0xd587[2972]]= this[_0xd587[2732]]= null;if(null!= this[_0xd587[2964]]){for(var _0x5c29x2=0;_0x5c29x2< this[_0xd587[2964]][_0xd587[67]];_0x5c29x2++){this[_0xd587[2964]][_0x5c29x2][_0xd587[515]](),this[_0xd587[2964]][_0x5c29x2]= null}}};function mxEdgeHandler(_0x5c29x2){null!= _0x5c29x2&& (this[_0xd587[724]]= _0x5c29x2,this[_0xd587[176]]())}mxEdgeHandler[_0xd587[202]][_0xd587[1179]]= null;mxEdgeHandler[_0xd587[202]][_0xd587[724]]= null;mxEdgeHandler[_0xd587[202]][_0xd587[2885]]= null;mxEdgeHandler[_0xd587[202]][_0xd587[2886]]= null;mxEdgeHandler[_0xd587[202]][_0xd587[267]]= null;mxEdgeHandler[_0xd587[202]][_0xd587[253]]= null;mxEdgeHandler[_0xd587[202]][_0xd587[2994]]= null;mxEdgeHandler[_0xd587[202]][_0xd587[2972]]= null;mxEdgeHandler[_0xd587[202]][_0xd587[2797]]=  !0;mxEdgeHandler[_0xd587[202]][_0xd587[2771]]=  !1;mxEdgeHandler[_0xd587[202]][_0xd587[2995]]=  !1;mxEdgeHandler[_0xd587[202]][_0xd587[574]]=  !1;mxEdgeHandler[_0xd587[202]][_0xd587[2958]]=  !0;mxEdgeHandler[_0xd587[202]][_0xd587[2996]]=  !1;mxEdgeHandler[_0xd587[202]][_0xd587[2959]]= null;mxEdgeHandler[_0xd587[202]][_0xd587[2353]]= 0;mxEdgeHandler[_0xd587[202]][_0xd587[176]]= function(){this[_0xd587[1179]]= this[_0xd587[724]][_0xd587[441]][_0xd587[1179]];this[_0xd587[2885]]= this[_0xd587[1689]]();this[_0xd587[2886]]=  new mxConstraintHandler(this[_0xd587[1179]]);this[_0xd587[1525]]= [];this[_0xd587[2997]]= this[_0xd587[2998]](this[_0xd587[724]]);this[_0xd587[253]]= this[_0xd587[2963]](this[_0xd587[2997]]);this[_0xd587[253]][_0xd587[507]]= this[_0xd587[1179]][_0xd587[507]]!= mxConstants[_0xd587[508]]?mxConstants[_0xd587[2334]]:mxConstants[_0xd587[508]];this[_0xd587[253]][_0xd587[176]](this[_0xd587[1179]][_0xd587[249]]()[_0xd587[1524]]());this[_0xd587[253]][_0xd587[1564]]= 0;this[_0xd587[253]][_0xd587[252]][_0xd587[124]][_0xd587[270]]= mxConstants[_0xd587[2831]];mxEvent[_0xd587[169]](this[_0xd587[253]][_0xd587[252]],_0xd587[760],mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[1179]][_0xd587[761]](_0x5c29x2,this[_0xd587[724]][_0xd587[246]])}));mxEvent[_0xd587[759]](this[_0xd587[253]][_0xd587[252]],mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[2771]]&& this[_0xd587[2999]](_0x5c29x2)?this[_0xd587[3000]](this[_0xd587[724]],_0x5c29x2):this[_0xd587[1179]][_0xd587[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x5c29x2,this[_0xd587[724]]))}),mxUtils[_0xd587[885]](this,function(_0x5c29x2){var _0x5c29x4=this[_0xd587[724]][_0xd587[246]];if(null!= this[_0xd587[1983]]){var _0x5c29x5=mxUtils[_0xd587[2196]](this[_0xd587[1179]][_0xd587[526]],mxEvent[_0xd587[731]](_0x5c29x2),mxEvent[_0xd587[733]](_0x5c29x2)),_0x5c29x4=this[_0xd587[1179]][_0xd587[999]](_0x5c29x5[_0xd587[235]],_0x5c29x5[_0xd587[236]]);this[_0xd587[1179]][_0xd587[1730]](_0x5c29x4)&& this[_0xd587[1179]][_0xd587[2688]](_0x5c29x4,_0x5c29x5[_0xd587[235]],_0x5c29x5[_0xd587[236]])&& (_0x5c29x4= null)};this[_0xd587[1179]][_0xd587[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x5c29x2,this[_0xd587[1179]][_0xd587[249]]()[_0xd587[248]](_0x5c29x4)))}),mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[1179]][_0xd587[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x5c29x2,this[_0xd587[724]]))}));this[_0xd587[574]]= null!= this[_0xd587[724]][_0xd587[963]]&& this[_0xd587[724]][_0xd587[963]][_0xd587[252]][_0xd587[265]]== this[_0xd587[1179]][_0xd587[526]];if(!this[_0xd587[574]]){var _0x5c29x2=this[_0xd587[724]][_0xd587[2089]](!0);null!= _0x5c29x2&& (this[_0xd587[574]]= null!= _0x5c29x2[_0xd587[963]]&& _0x5c29x2[_0xd587[963]][_0xd587[252]][_0xd587[265]]== this[_0xd587[1179]][_0xd587[526]]);this[_0xd587[574]]|| (_0x5c29x2= this[_0xd587[724]][_0xd587[2089]](!1),null!= _0x5c29x2&& (this[_0xd587[574]]= null!= _0x5c29x2[_0xd587[963]]&& _0x5c29x2[_0xd587[963]][_0xd587[252]][_0xd587[265]]== this[_0xd587[1179]][_0xd587[526]]))};if(this[_0xd587[1179]][_0xd587[2694]]()< mxGraphHandler[_0xd587[202]][_0xd587[2795]]|| 0>= mxGraphHandler[_0xd587[202]][_0xd587[2795]]){this[_0xd587[2994]]= this[_0xd587[3001]]()};this[_0xd587[685]]=  new mxPoint(this[_0xd587[724]][_0xd587[2079]][_0xd587[235]],this[_0xd587[724]][_0xd587[2079]][_0xd587[236]]);this[_0xd587[2972]]=  new mxRectangleShape( new mxRectangle,mxConstants.LABEL_HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR);this[_0xd587[2972]][_0xd587[1229]]=  !1;this[_0xd587[3002]](this[_0xd587[2972]]);this[_0xd587[2972]][_0xd587[252]][_0xd587[124]][_0xd587[270]]= mxConstants[_0xd587[3003]];mxEvent[_0xd587[2733]](this[_0xd587[2972]][_0xd587[252]],this[_0xd587[1179]],this[_0xd587[724]]);this[_0xd587[258]]()};mxEdgeHandler[_0xd587[202]][_0xd587[2999]]= function(_0x5c29x2){return mxEvent[_0xd587[774]](_0x5c29x2)};mxEdgeHandler[_0xd587[202]][_0xd587[3004]]= function(_0x5c29x2){return mxEvent[_0xd587[774]](_0x5c29x2)};mxEdgeHandler[_0xd587[202]][_0xd587[2998]]= function(_0x5c29x2){return _0x5c29x2[_0xd587[439]]};mxEdgeHandler[_0xd587[202]][_0xd587[2963]]= function(_0x5c29x2){_0x5c29x2=  new mxPolyline(_0x5c29x2,this[_0xd587[2975]]());_0x5c29x2[_0xd587[1307]]= this[_0xd587[2976]]();_0x5c29x2[_0xd587[1522]]= this[_0xd587[2977]]();return _0x5c29x2};mxEdgeHandler[_0xd587[202]][_0xd587[2975]]= function(){return mxConstants[_0xd587[3005]]};mxEdgeHandler[_0xd587[202]][_0xd587[2976]]= function(){return mxConstants[_0xd587[3006]]};mxEdgeHandler[_0xd587[202]][_0xd587[2977]]= function(){return mxConstants[_0xd587[3007]]};mxEdgeHandler[_0xd587[202]][_0xd587[2907]]= function(_0x5c29x2){return !0};mxEdgeHandler[_0xd587[202]][_0xd587[1689]]= function(){var _0x5c29x2= new mxCellMarker(this[_0xd587[1179]]),_0x5c29x3=this;_0x5c29x2[_0xd587[736]]= function(_0x5c29x2){var _0x5c29x5=mxCellMarker[_0xd587[202]][_0xd587[736]][_0xd587[183]](this,arguments);if(!_0x5c29x3[_0xd587[2907]](_0x5c29x5)){return null};var _0x5c29x9=_0x5c29x3[_0xd587[1179]][_0xd587[502]]();if(_0x5c29x5== _0x5c29x3[_0xd587[724]][_0xd587[246]]|| null!= _0x5c29x5&& !_0x5c29x3[_0xd587[1179]][_0xd587[2405]]&& _0x5c29x9[_0xd587[250]](_0x5c29x5)){_0x5c29x5= null};return _0x5c29x5};_0x5c29x2[_0xd587[2872]]= function(_0x5c29x2){var _0x5c29x5=_0x5c29x3[_0xd587[1179]][_0xd587[502]](),_0x5c29x5=_0x5c29x3[_0xd587[1179]][_0xd587[441]][_0xd587[2292]](_0x5c29x2,_0x5c29x3[_0xd587[1179]][_0xd587[441]][_0xd587[248]](_0x5c29x5[_0xd587[1709]](_0x5c29x3[_0xd587[724]][_0xd587[246]],!_0x5c29x3[_0xd587[729]])),!_0x5c29x3[_0xd587[729]]),_0x5c29x5=null!= _0x5c29x5?_0x5c29x5[_0xd587[246]]:null;_0x5c29x3[_0xd587[267]]= _0x5c29x3[_0xd587[2909]](_0x5c29x3[_0xd587[729]]?_0x5c29x2[_0xd587[246]]:_0x5c29x5,_0x5c29x3[_0xd587[729]]?_0x5c29x5:_0x5c29x2[_0xd587[246]]);return null== _0x5c29x3[_0xd587[267]]};return _0x5c29x2};mxEdgeHandler[_0xd587[202]][_0xd587[2909]]= function(_0x5c29x2,_0x5c29x3){return this[_0xd587[1179]][_0xd587[2500]](this[_0xd587[724]][_0xd587[246]],_0x5c29x2,_0x5c29x3)};mxEdgeHandler[_0xd587[202]][_0xd587[3001]]= function(){for(var _0x5c29x2=this[_0xd587[724]][_0xd587[246]],_0x5c29x3=[],_0x5c29x4=0;_0x5c29x4< this[_0xd587[2997]][_0xd587[67]];_0x5c29x4++){if(this[_0xd587[3008]](_0x5c29x4)){var _0x5c29x5=_0x5c29x4== this[_0xd587[2997]][_0xd587[67]]- 1;if((_0x5c29x5= 0== _0x5c29x4|| _0x5c29x5)|| this[_0xd587[1179]][_0xd587[2662]](_0x5c29x2)){var _0x5c29x9=this[_0xd587[3009]](_0x5c29x4);this[_0xd587[3002]](_0x5c29x9);mxClient[_0xd587[754]]&& _0x5c29x9[_0xd587[252]][_0xd587[57]](_0xd587[1377],_0xd587[130]);if(this[_0xd587[3010]](_0x5c29x4)){if(mxClient[_0xd587[754]]){var _0x5c29xa=mxUtils[_0xd587[885]](this,function(_0x5c29x2){_0x5c29x2= mxUtils[_0xd587[2196]](this[_0xd587[1179]][_0xd587[526]],mxEvent[_0xd587[731]](_0x5c29x2),mxEvent[_0xd587[733]](_0x5c29x2));return this[_0xd587[1179]][_0xd587[441]][_0xd587[248]](this[_0xd587[1179]][_0xd587[999]](_0x5c29x2[_0xd587[235]],_0x5c29x2[_0xd587[236]]))});mxEvent[_0xd587[2733]](_0x5c29x9[_0xd587[252]],this[_0xd587[1179]],_0x5c29xa)}else {_0x5c29x9[_0xd587[252]][_0xd587[124]][_0xd587[270]]= mxConstants[_0xd587[3011]],mxEvent[_0xd587[2733]](_0x5c29x9[_0xd587[252]],this[_0xd587[1179]],this[_0xd587[724]])}};_0x5c29x3[_0xd587[207]](_0x5c29x9);_0x5c29x5|| (this[_0xd587[1525]][_0xd587[207]]( new mxPoint(0,0)),_0x5c29x9[_0xd587[252]][_0xd587[124]][_0xd587[187]]= _0xd587[188])}}};return _0x5c29x3};mxEdgeHandler[_0xd587[202]][_0xd587[3010]]= function(_0x5c29x2){return !0};mxEdgeHandler[_0xd587[202]][_0xd587[3008]]= function(_0x5c29x2){return !0};mxEdgeHandler[_0xd587[202]][_0xd587[3009]]= function(_0x5c29x2){if(null!= this[_0xd587[2959]]){return  new mxImageShape( new mxRectangle(0,0,this[_0xd587[2959]][_0xd587[117]],this[_0xd587[2959]][_0xd587[119]]),this[_0xd587[2959]][_0xd587[390]])};_0x5c29x2= mxConstants[_0xd587[2974]];this[_0xd587[574]]&& (_0x5c29x2-= 1);return  new mxRectangleShape( new mxRectangle(0,0,_0x5c29x2,_0x5c29x2),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};mxEdgeHandler[_0xd587[202]][_0xd587[3002]]= function(_0x5c29x2){this[_0xd587[574]]?(_0x5c29x2[_0xd587[507]]= mxConstants[_0xd587[1656]],_0x5c29x2[_0xd587[176]](this[_0xd587[1179]][_0xd587[526]])):(_0x5c29x2[_0xd587[507]]= this[_0xd587[1179]][_0xd587[507]]!= mxConstants[_0xd587[508]]?mxConstants[_0xd587[2334]]:mxConstants[_0xd587[508]],_0x5c29x2[_0xd587[176]](this[_0xd587[1179]][_0xd587[249]]()[_0xd587[1524]]()))};mxEdgeHandler[_0xd587[202]][_0xd587[2986]]= function(_0x5c29x2){if(null!= this[_0xd587[2994]]){for(var _0x5c29x3=this[_0xd587[2353]],_0x5c29x3=this[_0xd587[2958]]&& (mxClient[_0xd587[80]]|| 0< _0x5c29x3)? new mxRectangle(_0x5c29x2[_0xd587[734]]()- _0x5c29x3,_0x5c29x2[_0xd587[735]]()- _0x5c29x3,2* _0x5c29x3,2* _0x5c29x3):null,_0x5c29x4=0;_0x5c29x4< this[_0xd587[2994]][_0xd587[67]];_0x5c29x4++){if((_0x5c29x2[_0xd587[729]](this[_0xd587[2994]][_0x5c29x4])|| null!= _0x5c29x3&& mxUtils[_0xd587[1825]](this[_0xd587[2994]][_0x5c29x4][_0xd587[1562]],_0x5c29x3))&& _0xd587[188]!= this[_0xd587[2994]][_0x5c29x4][_0xd587[252]][_0xd587[124]][_0xd587[187]]){return _0x5c29x4}}};if(_0x5c29x2[_0xd587[729]](this[_0xd587[2972]])&& _0xd587[188]!= this[_0xd587[2972]][_0xd587[252]][_0xd587[124]][_0xd587[187]]|| _0x5c29x2[_0xd587[729]](this[_0xd587[724]][_0xd587[963]])){if(!mxClient[_0xd587[75]]&& !mxClient[_0xd587[76]]|| _0xd587[2822]!= _0x5c29x2[_0xd587[728]]()[_0xd587[301]]){return mxEvent[_0xd587[2987]]}};return null};mxEdgeHandler[_0xd587[202]][_0xd587[787]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=null,_0x5c29x4=this[_0xd587[2986]](_0x5c29x3);null!= _0x5c29x4&& (!_0x5c29x3[_0xd587[721]]()&& this[_0xd587[1179]][_0xd587[994]]()&& !this[_0xd587[1179]][_0xd587[2579]](_0x5c29x3[_0xd587[727]]()))&& (this[_0xd587[2995]]&& this[_0xd587[3004]](_0x5c29x3[_0xd587[727]]())?this[_0xd587[3012]](this[_0xd587[724]],_0x5c29x4):(_0x5c29x4!= mxEvent[_0xd587[2987]]|| this[_0xd587[1179]][_0xd587[2628]](_0x5c29x3[_0xd587[736]]()))&& this[_0xd587[861]](_0x5c29x3[_0xd587[730]](),_0x5c29x3[_0xd587[732]](),_0x5c29x4),_0x5c29x3[_0xd587[722]]())};mxEdgeHandler[_0xd587[202]][_0xd587[861]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[2739]]= _0x5c29x2;this[_0xd587[2740]]= _0x5c29x3;this[_0xd587[729]]= null== this[_0xd587[2994]]?!1:0== _0x5c29x4;this[_0xd587[3013]]= null== this[_0xd587[2994]]?!1:_0x5c29x4== this[_0xd587[2994]][_0xd587[67]]- 1;this[_0xd587[3014]]= _0x5c29x4== mxEvent[_0xd587[2987]];if(this[_0xd587[729]]|| this[_0xd587[3013]]){if(_0x5c29x2= this[_0xd587[724]][_0xd587[246]],_0x5c29x3= this[_0xd587[1179]][_0xd587[251]][_0xd587[1709]](_0x5c29x2,this[_0xd587[729]]),null== _0x5c29x3&& this[_0xd587[1179]][_0xd587[2661]](_0x5c29x2,this[_0xd587[729]])|| null!= _0x5c29x3&& this[_0xd587[1179]][_0xd587[2551]](_0x5c29x2,_0x5c29x3,this[_0xd587[729]])){this[_0xd587[1983]]= _0x5c29x4}}else {this[_0xd587[1983]]= _0x5c29x4}};mxEdgeHandler[_0xd587[202]][_0xd587[3015]]= function(_0x5c29x2,_0x5c29x3){return this[_0xd587[724]][_0xd587[238]]()};mxEdgeHandler[_0xd587[202]][_0xd587[3016]]= function(){return this[_0xd587[1179]][_0xd587[1020]]* this[_0xd587[1179]][_0xd587[441]][_0xd587[255]]/ 2};mxEdgeHandler[_0xd587[202]][_0xd587[2689]]= function(_0x5c29x2){var _0x5c29x3= new mxPoint(_0x5c29x2[_0xd587[734]](),_0x5c29x2[_0xd587[735]]()),_0x5c29x4=this[_0xd587[3016]](),_0x5c29x5=this[_0xd587[1179]][_0xd587[249]](),_0x5c29x9=!1,_0x5c29xa=!1;if(this[_0xd587[2996]]&& 0< _0x5c29x4){var _0x5c29x12=function(_0x5c29x2){if(null!= _0x5c29x2){var _0x5c29x5=_0x5c29x2[_0xd587[235]];Math[_0xd587[425]](_0x5c29x3[_0xd587[235]]- _0x5c29x5)< _0x5c29x4&& (_0x5c29x3[_0xd587[235]]= _0x5c29x5,_0x5c29x9=  !0);_0x5c29x2= _0x5c29x2[_0xd587[236]];Math[_0xd587[425]](_0x5c29x3[_0xd587[236]]- _0x5c29x2)< _0x5c29x4&& (_0x5c29x3[_0xd587[236]]= _0x5c29x2,_0x5c29xa=  !0)}},_0x5c29x13=function(_0x5c29x2){null!= _0x5c29x2&& _0x5c29x12[_0xd587[239]](this, new mxPoint(_0x5c29x5[_0xd587[2230]](_0x5c29x2),_0x5c29x5[_0xd587[2228]](_0x5c29x2)))};_0x5c29x13[_0xd587[239]](this,this[_0xd587[724]][_0xd587[2089]](!0));_0x5c29x13[_0xd587[239]](this,this[_0xd587[724]][_0xd587[2089]](!1));if(null!= this[_0xd587[2997]]){for(_0x5c29x13= 0;_0x5c29x13< this[_0xd587[2997]];_0x5c29x13++){_0x5c29x13!= this[_0xd587[1983]]&& _0x5c29x12[_0xd587[239]](this,this[_0xd587[2997]][_0x5c29x13])}}};this[_0xd587[1179]][_0xd587[1018]](_0x5c29x2[_0xd587[727]]())&& (_0x5c29x2= _0x5c29x5[_0xd587[255]],_0x5c29x13= _0x5c29x5[_0xd587[513]],_0x5c29x9|| (_0x5c29x3[_0xd587[235]]= (this[_0xd587[1179]][_0xd587[1021]](_0x5c29x3[_0xd587[235]]/ _0x5c29x2- _0x5c29x13[_0xd587[235]])+ _0x5c29x13[_0xd587[235]])* _0x5c29x2),_0x5c29xa|| (_0x5c29x3[_0xd587[236]]= (this[_0xd587[1179]][_0xd587[1021]](_0x5c29x3[_0xd587[236]]/ _0x5c29x2- _0x5c29x13[_0xd587[236]])+ _0x5c29x13[_0xd587[236]])* _0x5c29x2));return _0x5c29x3};mxEdgeHandler[_0xd587[202]][_0xd587[3017]]= function(_0x5c29x2){this[_0xd587[2886]][_0xd587[2729]](_0x5c29x2,this[_0xd587[729]]);this[_0xd587[2885]][_0xd587[2871]](_0x5c29x2);_0x5c29x2= this[_0xd587[2885]][_0xd587[2868]]();var _0x5c29x3=null;null!= this[_0xd587[2886]][_0xd587[2919]]&& null!= this[_0xd587[2886]][_0xd587[2920]]&& this[_0xd587[2885]][_0xd587[862]]();null!= _0x5c29x2?_0x5c29x3= _0x5c29x2:null!= this[_0xd587[2886]][_0xd587[2920]]&& null!= this[_0xd587[2886]][_0xd587[2919]]&& (_0x5c29x3= this[_0xd587[2886]][_0xd587[2919]]);return _0x5c29x3};mxEdgeHandler[_0xd587[202]][_0xd587[3018]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1179]][_0xd587[1198]](this[_0xd587[724]][_0xd587[246]]),_0x5c29x3=null!= _0x5c29x3[_0xd587[1525]]?_0x5c29x3[_0xd587[1525]][_0xd587[1853]]():null;!this[_0xd587[729]]&& !this[_0xd587[3013]]?(this[_0xd587[2196]](_0x5c29x2,!1),null== _0x5c29x3?_0x5c29x3= [_0x5c29x2]:_0x5c29x3[this[_0xd587[1983]]- 1]= _0x5c29x2):this[_0xd587[1179]][_0xd587[2401]]&& (_0x5c29x3= null);return _0x5c29x3};mxEdgeHandler[_0xd587[202]][_0xd587[3019]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[729]]?_0x5c29x4:this[_0xd587[724]][_0xd587[2089]](!0),_0x5c29x9=this[_0xd587[3013]]?_0x5c29x4:this[_0xd587[724]][_0xd587[2089]](!1),_0x5c29xa=this[_0xd587[1179]][_0xd587[2288]](_0x5c29x2,_0x5c29x5,!0),_0x5c29x12=this[_0xd587[1179]][_0xd587[2288]](_0x5c29x2,_0x5c29x9,!1),_0x5c29x13=this[_0xd587[2886]][_0xd587[2920]];null== _0x5c29x13&& (_0x5c29x13=  new mxConnectionConstraint);this[_0xd587[729]]?_0x5c29xa= _0x5c29x13:this[_0xd587[3013]]&& (_0x5c29x12= _0x5c29x13);(!this[_0xd587[729]]|| null!= _0x5c29x5)&& _0x5c29x2[_0xd587[441]][_0xd587[2289]](_0x5c29x2,_0x5c29x5,!0,_0x5c29xa);(!this[_0xd587[3013]]|| null!= _0x5c29x9)&& _0x5c29x2[_0xd587[441]][_0xd587[2289]](_0x5c29x2,_0x5c29x9,!1,_0x5c29x12);if((this[_0xd587[729]]|| this[_0xd587[3013]])&& null== _0x5c29x4){_0x5c29x2[_0xd587[2088]](_0x5c29x3,this[_0xd587[729]]),null== this[_0xd587[2885]][_0xd587[2869]]()&& (this[_0xd587[267]]= this[_0xd587[1179]][_0xd587[2406]]?null:_0xd587[110])};_0x5c29x2[_0xd587[441]][_0xd587[2282]](_0x5c29x2,this[_0xd587[1525]],_0x5c29x5,_0x5c29x9);_0x5c29x2[_0xd587[441]][_0xd587[2283]](_0x5c29x2,_0x5c29x5,_0x5c29x9)};mxEdgeHandler[_0xd587[202]][_0xd587[788]]= function(_0x5c29x2,_0x5c29x3){if(null!= this[_0xd587[1983]]&& null!= this[_0xd587[2885]]){var _0x5c29x4=this[_0xd587[2689]](_0x5c29x3);if(this[_0xd587[3014]]){this[_0xd587[685]][_0xd587[235]]= _0x5c29x4[_0xd587[235]],this[_0xd587[685]][_0xd587[236]]= _0x5c29x4[_0xd587[236]]}else {this[_0xd587[1525]]= this[_0xd587[3018]](_0x5c29x4);var _0x5c29x5=this[_0xd587[729]]|| this[_0xd587[3013]]?this[_0xd587[3017]](_0x5c29x3):null,_0x5c29x9=this[_0xd587[3015]](_0x5c29x4,null!= _0x5c29x5?_0x5c29x5[_0xd587[246]]:null);this[_0xd587[3019]](_0x5c29x9,_0x5c29x4,_0x5c29x5);this[_0xd587[3020]](null== this[_0xd587[267]]?this[_0xd587[2885]][_0xd587[2853]]:this[_0xd587[2885]][_0xd587[2855]]);this[_0xd587[2997]]= _0x5c29x9[_0xd587[439]];this[_0xd587[1124]]=  !0};this[_0xd587[2932]]();mxEvent[_0xd587[722]](_0x5c29x3[_0xd587[727]]());_0x5c29x3[_0xd587[722]]()}else {mxClient[_0xd587[80]]&& null!= this[_0xd587[2986]](_0x5c29x3)&& _0x5c29x3[_0xd587[722]](!1)}};mxEdgeHandler[_0xd587[202]][_0xd587[789]]= function(_0x5c29x2,_0x5c29x3){if(null!= this[_0xd587[1983]]&& null!= this[_0xd587[2885]]){var _0x5c29x4=this[_0xd587[724]][_0xd587[246]];if(_0x5c29x3[_0xd587[730]]()!= this[_0xd587[2739]]|| _0x5c29x3[_0xd587[732]]()!= this[_0xd587[2740]]){if(null!= this[_0xd587[267]]){0< this[_0xd587[267]][_0xd587[67]]&& this[_0xd587[1179]][_0xd587[2580]](this[_0xd587[267]])}else {if(this[_0xd587[3014]]){this[_0xd587[3021]](this[_0xd587[724]],this[_0xd587[685]][_0xd587[235]],this[_0xd587[685]][_0xd587[236]])}else {if(this[_0xd587[729]]|| this[_0xd587[3013]]){var _0x5c29x5=null;null!= this[_0xd587[2886]][_0xd587[2920]]&& null!= this[_0xd587[2886]][_0xd587[2919]]&& (_0x5c29x5= this[_0xd587[2886]][_0xd587[2919]][_0xd587[246]]);null== _0x5c29x5&& this[_0xd587[2885]][_0xd587[2867]]()&& (_0x5c29x5= this[_0xd587[2885]][_0xd587[2861]][_0xd587[246]]);if(null!= _0x5c29x5){_0x5c29x4= this[_0xd587[807]](_0x5c29x4,_0x5c29x5,this[_0xd587[729]],this[_0xd587[1179]][_0xd587[2574]](_0x5c29x3[_0xd587[727]]())&& this[_0xd587[2797]]&& this[_0xd587[1179]][_0xd587[2617]](),_0x5c29x3)}else {if(this[_0xd587[1179]][_0xd587[2530]]()){_0x5c29x5= this[_0xd587[2997]][this[_0xd587[729]]?0:this[_0xd587[2997]][_0xd587[67]]- 1];_0x5c29x5[_0xd587[235]]= _0x5c29x5[_0xd587[235]]/ this[_0xd587[1179]][_0xd587[441]][_0xd587[255]]- this[_0xd587[1179]][_0xd587[441]][_0xd587[513]][_0xd587[235]];_0x5c29x5[_0xd587[236]]= _0x5c29x5[_0xd587[236]]/ this[_0xd587[1179]][_0xd587[441]][_0xd587[255]]- this[_0xd587[1179]][_0xd587[441]][_0xd587[513]][_0xd587[236]];var _0x5c29x9=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[248]](this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1197]](_0x5c29x4));null!= _0x5c29x9&& (_0x5c29x5[_0xd587[235]]-= _0x5c29x9[_0xd587[2078]][_0xd587[235]],_0x5c29x5[_0xd587[236]]-= _0x5c29x9[_0xd587[2078]][_0xd587[236]]);_0x5c29x5[_0xd587[235]]-= this[_0xd587[1179]][_0xd587[1136]]/ this[_0xd587[1179]][_0xd587[441]][_0xd587[255]];_0x5c29x5[_0xd587[236]]-= this[_0xd587[1179]][_0xd587[1137]]/ this[_0xd587[1179]][_0xd587[441]][_0xd587[255]];this[_0xd587[3022]](_0x5c29x4,_0x5c29x5,this[_0xd587[729]])}}}else {this[_0xd587[1124]]?this[_0xd587[3023]](_0x5c29x4,this[_0xd587[1525]]):(this[_0xd587[1179]][_0xd587[249]]()[_0xd587[2263]](this[_0xd587[724]][_0xd587[246]]),this[_0xd587[1179]][_0xd587[249]]()[_0xd587[2259]](this[_0xd587[724]][_0xd587[246]]))}}}};null!= this[_0xd587[2885]]&& (this[_0xd587[862]](),_0x5c29x4!= this[_0xd587[724]][_0xd587[246]]&& this[_0xd587[1179]][_0xd587[2450]](_0x5c29x4));_0x5c29x3[_0xd587[722]]()}};mxEdgeHandler[_0xd587[202]][_0xd587[862]]= function(){this[_0xd587[1525]]= this[_0xd587[685]]= this[_0xd587[1983]]= this[_0xd587[267]]= null;this[_0xd587[3013]]= this[_0xd587[729]]= this[_0xd587[3014]]= this[_0xd587[1124]]=  !1;this[_0xd587[2885]][_0xd587[862]]();this[_0xd587[2886]][_0xd587[862]]();this[_0xd587[3020]](mxConstants.EDGE_SELECTION_COLOR);this[_0xd587[258]]()};mxEdgeHandler[_0xd587[202]][_0xd587[3020]]= function(_0x5c29x2){null!= this[_0xd587[253]]&& (this[_0xd587[253]][_0xd587[1336]]= _0x5c29x2)};mxEdgeHandler[_0xd587[202]][_0xd587[2196]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[518]](),_0x5c29x5=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[512]]();_0x5c29x3&& (_0x5c29x2[_0xd587[235]]= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x2[_0xd587[235]]),_0x5c29x2[_0xd587[236]]= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x2[_0xd587[236]]));_0x5c29x2[_0xd587[235]]= Math[_0xd587[488]](_0x5c29x2[_0xd587[235]]/ _0x5c29x4- _0x5c29x5[_0xd587[235]]);_0x5c29x2[_0xd587[236]]= Math[_0xd587[488]](_0x5c29x2[_0xd587[236]]/ _0x5c29x4- _0x5c29x5[_0xd587[236]]);_0x5c29x4= this[_0xd587[1179]][_0xd587[249]]()[_0xd587[248]](this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1197]](this[_0xd587[724]][_0xd587[246]]));null!= _0x5c29x4&& (_0x5c29x2[_0xd587[235]]-= _0x5c29x4[_0xd587[2078]][_0xd587[235]],_0x5c29x2[_0xd587[236]]-= _0x5c29x4[_0xd587[2078]][_0xd587[236]]);return _0x5c29x2};mxEdgeHandler[_0xd587[202]][_0xd587[3021]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x9=_0x5c29x5[_0xd587[1721]](_0x5c29x2[_0xd587[246]]);if(null!= _0x5c29x9){var _0x5c29x9=_0x5c29x9[_0xd587[238]](),_0x5c29xa=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[2308]](_0x5c29x2,_0x5c29x3,_0x5c29x4);_0x5c29x9[_0xd587[235]]= _0x5c29xa[_0xd587[235]];_0x5c29x9[_0xd587[236]]= _0x5c29xa[_0xd587[236]];var _0x5c29x12=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[255]];_0x5c29x9[_0xd587[1368]]=  new mxPoint(0,0);_0x5c29xa= this[_0xd587[1179]][_0xd587[441]][_0xd587[245]](_0x5c29x2,_0x5c29x9);_0x5c29x9[_0xd587[1368]]=  new mxPoint((_0x5c29x3- _0x5c29xa[_0xd587[235]])/ _0x5c29x12,(_0x5c29x4- _0x5c29xa[_0xd587[236]])/ _0x5c29x12);_0x5c29x5[_0xd587[1724]](_0x5c29x2[_0xd587[246]],_0x5c29x9)}};mxEdgeHandler[_0xd587[202]][_0xd587[807]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x9= this[_0xd587[1179]][_0xd587[502]]();var _0x5c29xa=_0x5c29x9[_0xd587[1197]](_0x5c29x2);_0x5c29x9[_0xd587[473]]();try{if(_0x5c29x5){var _0x5c29x12=_0x5c29x2[_0xd587[238]]();_0x5c29x9[_0xd587[99]](_0x5c29xa,_0x5c29x12,_0x5c29x9[_0xd587[262]](_0x5c29xa));var _0x5c29x13=_0x5c29x9[_0xd587[1709]](_0x5c29x2,!_0x5c29x4);this[_0xd587[1179]][_0xd587[851]](_0x5c29x12,_0x5c29x13,!_0x5c29x4);_0x5c29x2= _0x5c29x12};var _0x5c29x14=this[_0xd587[2886]][_0xd587[2920]];null== _0x5c29x14&& (_0x5c29x14=  new mxConnectionConstraint);this[_0xd587[1179]][_0xd587[851]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x14)}finally{_0x5c29x9[_0xd587[476]]()};return _0x5c29x2};mxEdgeHandler[_0xd587[202]][_0xd587[3022]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x9=_0x5c29x5[_0xd587[1721]](_0x5c29x2);if(null!= _0x5c29x9){_0x5c29x5[_0xd587[473]]();try{_0x5c29x9= _0x5c29x9[_0xd587[238]](),_0x5c29x9[_0xd587[2007]](_0x5c29x3,_0x5c29x4),_0x5c29x5[_0xd587[1724]](_0x5c29x2,_0x5c29x9),this[_0xd587[1179]][_0xd587[851]](_0x5c29x2,null,_0x5c29x4, new mxConnectionConstraint)}finally{_0x5c29x5[_0xd587[476]]()}}};mxEdgeHandler[_0xd587[202]][_0xd587[3023]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x5=_0x5c29x4[_0xd587[1721]](_0x5c29x2);null!= _0x5c29x5&& (_0x5c29x5= _0x5c29x5[_0xd587[238]](),_0x5c29x5[_0xd587[1525]]= _0x5c29x3,_0x5c29x4[_0xd587[1724]](_0x5c29x2,_0x5c29x5))};mxEdgeHandler[_0xd587[202]][_0xd587[3000]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=mxUtils[_0xd587[2196]](this[_0xd587[1179]][_0xd587[526]],mxEvent[_0xd587[731]](_0x5c29x3),mxEvent[_0xd587[733]](_0x5c29x3)),_0x5c29x5=this[_0xd587[1179]][_0xd587[1018]](_0x5c29x3);this[_0xd587[2196]](_0x5c29x4,_0x5c29x5);this[_0xd587[3024]](_0x5c29x2,_0x5c29x4[_0xd587[235]],_0x5c29x4[_0xd587[236]]);mxEvent[_0xd587[722]](_0x5c29x3)};mxEdgeHandler[_0xd587[202]][_0xd587[3024]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[1179]][_0xd587[1198]](_0x5c29x2[_0xd587[246]]);_0x5c29x3=  new mxPoint(_0x5c29x3,_0x5c29x4);if(null!= _0x5c29x5){_0x5c29x5= _0x5c29x5[_0xd587[238]]();_0x5c29x4= this[_0xd587[1179]][_0xd587[441]][_0xd587[513]];var _0x5c29x9=this[_0xd587[1179]][_0xd587[441]][_0xd587[255]];_0x5c29x4= mxUtils[_0xd587[3025]](_0x5c29x2,(_0x5c29x3[_0xd587[235]]+ _0x5c29x4[_0xd587[235]])* _0x5c29x9,(_0x5c29x3[_0xd587[236]]+ _0x5c29x4[_0xd587[236]])* _0x5c29x9);null== _0x5c29x5[_0xd587[1525]]?_0x5c29x5[_0xd587[1525]]= [_0x5c29x3]:_0x5c29x5[_0xd587[1525]][_0xd587[300]](_0x5c29x4,0,_0x5c29x3);this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1724]](_0x5c29x2[_0xd587[246]],_0x5c29x5);this[_0xd587[515]]();this[_0xd587[176]]()}};mxEdgeHandler[_0xd587[202]][_0xd587[3012]]= function(_0x5c29x2,_0x5c29x3){if(0< _0x5c29x3&& _0x5c29x3< this[_0xd587[2997]][_0xd587[67]]- 1){var _0x5c29x4=this[_0xd587[1179]][_0xd587[1198]](this[_0xd587[724]][_0xd587[246]]);null!= _0x5c29x4&& null!= _0x5c29x4[_0xd587[1525]]&& (_0x5c29x4= _0x5c29x4[_0xd587[238]](),_0x5c29x4[_0xd587[1525]][_0xd587[300]](_0x5c29x3- 1,1),this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1724]](_0x5c29x2[_0xd587[246]],_0x5c29x4),this[_0xd587[515]](),this[_0xd587[176]]())}};mxEdgeHandler[_0xd587[202]][_0xd587[3026]]= function(_0x5c29x2){_0x5c29x2= 0== _0x5c29x2;var _0x5c29x3=this[_0xd587[724]][_0xd587[246]],_0x5c29x4=this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1709]](_0x5c29x3,_0x5c29x2),_0x5c29x5=mxConstants[_0xd587[2984]];null!= _0x5c29x4&& !this[_0xd587[1179]][_0xd587[2551]](_0x5c29x3,_0x5c29x4,_0x5c29x2)|| null== _0x5c29x4&& !this[_0xd587[1179]][_0xd587[2661]](_0x5c29x3,_0x5c29x2)?_0x5c29x5= mxConstants[_0xd587[3027]]:null!= _0x5c29x4&& this[_0xd587[1179]][_0xd587[2551]](_0x5c29x3,_0x5c29x4,_0x5c29x2)&& (_0x5c29x5= mxConstants[_0xd587[3028]]);return _0x5c29x5};mxEdgeHandler[_0xd587[202]][_0xd587[258]]= function(){this[_0xd587[2997]]= this[_0xd587[724]][_0xd587[439]][_0xd587[1853]]();var _0x5c29x2=this[_0xd587[724]][_0xd587[246]],_0x5c29x3=mxConstants[_0xd587[3029]];this[_0xd587[685]]=  new mxPoint(this[_0xd587[724]][_0xd587[2079]][_0xd587[235]],this[_0xd587[724]][_0xd587[2079]][_0xd587[236]]);this[_0xd587[2972]][_0xd587[1562]]=  new mxRectangle(Math[_0xd587[488]](this[_0xd587[685]][_0xd587[235]]- _0x5c29x3/ 2),Math[_0xd587[488]](this[_0xd587[685]][_0xd587[236]]- _0x5c29x3/ 2),_0x5c29x3,_0x5c29x3);this[_0xd587[2972]][_0xd587[258]]();_0x5c29x3= this[_0xd587[1179]][_0xd587[2183]](_0x5c29x2);null!= _0x5c29x3&& 0< _0x5c29x3[_0xd587[67]]&& this[_0xd587[1179]][_0xd587[2628]](_0x5c29x2)?this[_0xd587[2972]][_0xd587[252]][_0xd587[124]][_0xd587[187]]= _0xd587[189]:this[_0xd587[2972]][_0xd587[252]][_0xd587[124]][_0xd587[187]]= _0xd587[188];if(null!= this[_0xd587[2994]]&& 0< this[_0xd587[2994]][_0xd587[67]]){var _0x5c29x4=this[_0xd587[2997]][_0xd587[67]]- 1,_0x5c29x2=this[_0xd587[2997]][0],_0x5c29x5=this[_0xd587[2997]][0][_0xd587[236]],_0x5c29x3=this[_0xd587[2994]][0][_0xd587[1562]];this[_0xd587[2994]][0][_0xd587[1562]]=  new mxRectangle(Math[_0xd587[488]](this[_0xd587[2997]][0][_0xd587[235]]- _0x5c29x3[_0xd587[117]]/ 2),Math[_0xd587[488]](_0x5c29x5- _0x5c29x3[_0xd587[119]]/ 2),_0x5c29x3[_0xd587[117]],_0x5c29x3[_0xd587[119]]);this[_0xd587[2994]][0][_0xd587[1334]]= this[_0xd587[3026]](0);this[_0xd587[2994]][0][_0xd587[258]]();var _0x5c29x5=this[_0xd587[2997]][_0x5c29x4],_0x5c29x9=this[_0xd587[2997]][_0x5c29x4][_0xd587[235]],_0x5c29x4=this[_0xd587[2997]][_0x5c29x4][_0xd587[236]],_0x5c29xa=this[_0xd587[2994]][_0xd587[67]]- 1,_0x5c29x3=this[_0xd587[2994]][_0x5c29xa][_0xd587[1562]];this[_0xd587[2994]][_0x5c29xa][_0xd587[1562]]=  new mxRectangle(Math[_0xd587[488]](_0x5c29x9- _0x5c29x3[_0xd587[117]]/ 2),Math[_0xd587[488]](_0x5c29x4- _0x5c29x3[_0xd587[119]]/ 2),_0x5c29x3[_0xd587[117]],_0x5c29x3[_0xd587[119]]);this[_0xd587[2994]][_0x5c29xa][_0xd587[1334]]= this[_0xd587[3026]](_0x5c29xa);this[_0xd587[2994]][_0x5c29xa][_0xd587[258]]();this[_0xd587[3030]](_0x5c29x2,_0x5c29x5)};this[_0xd587[2932]]()};mxEdgeHandler[_0xd587[202]][_0xd587[3030]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1721]](this[_0xd587[724]][_0xd587[246]])[_0xd587[1525]];if(null!= _0x5c29x4){null== this[_0xd587[1525]]&& (this[_0xd587[1525]]= []);for(var _0x5c29x5=1;_0x5c29x5< this[_0xd587[2994]][_0xd587[67]]- 1;_0x5c29x5++){if(null!= this[_0xd587[2994]][_0x5c29x5]){if(null!= this[_0xd587[2997]][_0x5c29x5]){var _0x5c29x9=this[_0xd587[2997]][_0x5c29x5][_0xd587[235]],_0x5c29xa=this[_0xd587[2997]][_0x5c29x5][_0xd587[236]],_0x5c29x12=this[_0xd587[2994]][_0x5c29x5][_0xd587[1562]];this[_0xd587[2994]][_0x5c29x5][_0xd587[252]][_0xd587[124]][_0xd587[187]]= _0xd587[189];this[_0xd587[2994]][_0x5c29x5][_0xd587[1562]]=  new mxRectangle(Math[_0xd587[488]](_0x5c29x9- _0x5c29x12[_0xd587[117]]/ 2),Math[_0xd587[488]](_0x5c29xa- _0x5c29x12[_0xd587[119]]/ 2),_0x5c29x12[_0xd587[117]],_0x5c29x12[_0xd587[119]]);this[_0xd587[2994]][_0x5c29x5][_0xd587[258]]();this[_0xd587[1525]][_0x5c29x5- 1]= _0x5c29x4[_0x5c29x5- 1]}else {this[_0xd587[2994]][_0x5c29x5][_0xd587[515]](),this[_0xd587[2994]][_0x5c29x5]= null}}}}};mxEdgeHandler[_0xd587[202]][_0xd587[2932]]= function(){if(this[_0xd587[3014]]){var _0x5c29x2=mxConstants[_0xd587[3029]],_0x5c29x2= new mxRectangle(Math[_0xd587[488]](this[_0xd587[685]][_0xd587[235]]- _0x5c29x2/ 2),Math[_0xd587[488]](this[_0xd587[685]][_0xd587[236]]- _0x5c29x2/ 2),_0x5c29x2,_0x5c29x2);this[_0xd587[2972]][_0xd587[1562]]= _0x5c29x2;this[_0xd587[2972]][_0xd587[258]]()}else {this[_0xd587[253]][_0xd587[1525]]= this[_0xd587[2997]],this[_0xd587[253]][_0xd587[258]]()}};mxEdgeHandler[_0xd587[202]][_0xd587[515]]= function(){null!= this[_0xd587[2885]]&& (this[_0xd587[2885]][_0xd587[515]](),this[_0xd587[2885]]= null);null!= this[_0xd587[253]]&& (this[_0xd587[253]][_0xd587[515]](),this[_0xd587[253]]= null);null!= this[_0xd587[2972]]&& (this[_0xd587[2972]][_0xd587[515]](),this[_0xd587[2972]]= null);null!= this[_0xd587[2886]]&& (this[_0xd587[2886]][_0xd587[515]](),this[_0xd587[2886]]= null);if(null!= this[_0xd587[2994]]){for(var _0x5c29x2=0;_0x5c29x2< this[_0xd587[2994]][_0xd587[67]];_0x5c29x2++){null!= this[_0xd587[2994]][_0x5c29x2]&& (this[_0xd587[2994]][_0x5c29x2][_0xd587[515]](),this[_0xd587[2994]][_0x5c29x2]= null)}}};function mxElbowEdgeHandler(_0x5c29x2){mxEdgeHandler[_0xd587[239]](this,_0x5c29x2)}mxUtils[_0xd587[1284]](mxElbowEdgeHandler,mxEdgeHandler);mxElbowEdgeHandler[_0xd587[202]]=  new mxEdgeHandler;mxElbowEdgeHandler[_0xd587[202]][_0xd587[196]]= mxElbowEdgeHandler;mxElbowEdgeHandler[_0xd587[202]][_0xd587[3031]]=  !0;mxElbowEdgeHandler[_0xd587[202]][_0xd587[3032]]= _0xd587[130]!= mxClient[_0xd587[90]]?_0xd587[3033]:_0xd587[110];mxElbowEdgeHandler[_0xd587[202]][_0xd587[3001]]= function(){var _0x5c29x2=[],_0x5c29x3=this[_0xd587[3009]](0);this[_0xd587[3002]](_0x5c29x3);_0x5c29x3[_0xd587[252]][_0xd587[124]][_0xd587[270]]= mxConstants[_0xd587[3011]];mxEvent[_0xd587[2733]](_0x5c29x3[_0xd587[252]],this[_0xd587[1179]],this[_0xd587[724]]);_0x5c29x2[_0xd587[207]](_0x5c29x3);mxClient[_0xd587[754]]&& _0x5c29x3[_0xd587[252]][_0xd587[57]](_0xd587[1377],_0xd587[130]);_0x5c29x2[_0xd587[207]](this[_0xd587[3034]]());this[_0xd587[1525]][_0xd587[207]]( new mxPoint(0,0));_0x5c29x3= this[_0xd587[3009]](2);this[_0xd587[3002]](_0x5c29x3);_0x5c29x3[_0xd587[252]][_0xd587[124]][_0xd587[270]]= mxConstants[_0xd587[3011]];mxEvent[_0xd587[2733]](_0x5c29x3[_0xd587[252]],this[_0xd587[1179]],this[_0xd587[724]]);_0x5c29x2[_0xd587[207]](_0x5c29x3);mxClient[_0xd587[754]]&& _0x5c29x3[_0xd587[252]][_0xd587[57]](_0xd587[1377],_0xd587[130]);return _0x5c29x2};mxElbowEdgeHandler[_0xd587[202]][_0xd587[3034]]= function(){var _0x5c29x2=this[_0xd587[3009]]();this[_0xd587[3002]](_0x5c29x2);var _0x5c29x3=this[_0xd587[3035]]();_0x5c29x2[_0xd587[252]][_0xd587[124]][_0xd587[270]]= _0x5c29x3;_0x5c29x3= mxUtils[_0xd587[885]](this,function(_0x5c29x2){!mxEvent[_0xd587[721]](_0x5c29x2)&& this[_0xd587[3031]]&& (this[_0xd587[1179]][_0xd587[854]](this[_0xd587[724]][_0xd587[246]],_0x5c29x2),mxEvent[_0xd587[722]](_0x5c29x2))});mxEvent[_0xd587[2733]](_0x5c29x2[_0xd587[252]],this[_0xd587[1179]],this[_0xd587[724]],null,null,null,_0x5c29x3);this[_0xd587[1179]][_0xd587[2662]](this[_0xd587[724]][_0xd587[246]])|| (_0x5c29x2[_0xd587[252]][_0xd587[124]][_0xd587[495]]= _0xd587[130]);return _0x5c29x2};mxElbowEdgeHandler[_0xd587[202]][_0xd587[3035]]= function(){return this[_0xd587[724]][_0xd587[124]][mxConstants[_0xd587[2294]]]== mxEdgeStyle[_0xd587[2570]]|| this[_0xd587[724]][_0xd587[124]][mxConstants[_0xd587[2294]]]== mxConstants[_0xd587[3036]]|| (this[_0xd587[724]][_0xd587[124]][mxConstants[_0xd587[2294]]]== mxEdgeStyle[_0xd587[2568]]|| this[_0xd587[724]][_0xd587[124]][mxConstants[_0xd587[2294]]]== mxConstants[_0xd587[3037]])&& this[_0xd587[724]][_0xd587[124]][mxConstants[_0xd587[2231]]]== mxConstants[_0xd587[2232]]?_0xd587[3038]:_0xd587[3039]};mxElbowEdgeHandler[_0xd587[202]][_0xd587[2597]]= function(_0x5c29x2){var _0x5c29x3=null;if(null!= this[_0xd587[2994]]&& null!= this[_0xd587[2994]][1]&& (_0x5c29x2== this[_0xd587[2994]][1][_0xd587[252]]|| _0x5c29x2[_0xd587[265]]== this[_0xd587[2994]][1][_0xd587[252]])){_0x5c29x3= this[_0xd587[3032]],_0x5c29x3= mxResources[_0xd587[203]](_0x5c29x3)|| _0x5c29x3};return _0x5c29x3};mxElbowEdgeHandler[_0xd587[202]][_0xd587[2196]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[518]](),_0x5c29x5=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[512]](),_0x5c29x9=this[_0xd587[724]][_0xd587[2078]];_0x5c29x3&& (_0x5c29x2[_0xd587[235]]= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x2[_0xd587[235]]),_0x5c29x2[_0xd587[236]]= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x2[_0xd587[236]]));_0x5c29x2[_0xd587[235]]= Math[_0xd587[488]](_0x5c29x2[_0xd587[235]]/ _0x5c29x4- _0x5c29x5[_0xd587[235]]- _0x5c29x9[_0xd587[235]]);_0x5c29x2[_0xd587[236]]= Math[_0xd587[488]](_0x5c29x2[_0xd587[236]]/ _0x5c29x4- _0x5c29x5[_0xd587[236]]- _0x5c29x9[_0xd587[236]])};mxElbowEdgeHandler[_0xd587[202]][_0xd587[3030]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1721]](this[_0xd587[724]][_0xd587[246]])[_0xd587[1525]],_0x5c29x4=null!= _0x5c29x4?_0x5c29x4[0]:null,_0x5c29x4=null== _0x5c29x4? new mxPoint(_0x5c29x2[_0xd587[235]]+ (_0x5c29x3[_0xd587[235]]- _0x5c29x2[_0xd587[235]])/ 2,_0x5c29x2[_0xd587[236]]+ (_0x5c29x3[_0xd587[236]]- _0x5c29x2[_0xd587[236]])/ 2): new mxPoint(this[_0xd587[1179]][_0xd587[249]]()[_0xd587[255]]* (_0x5c29x4[_0xd587[235]]+ this[_0xd587[1179]][_0xd587[249]]()[_0xd587[513]][_0xd587[235]]+ this[_0xd587[724]][_0xd587[2078]][_0xd587[235]]),this[_0xd587[1179]][_0xd587[249]]()[_0xd587[255]]* (_0x5c29x4[_0xd587[236]]+ this[_0xd587[1179]][_0xd587[249]]()[_0xd587[513]][_0xd587[236]]+ this[_0xd587[724]][_0xd587[2078]][_0xd587[236]])),_0x5c29x5=this[_0xd587[2994]][1][_0xd587[1562]],_0x5c29x9=_0x5c29x5[_0xd587[117]],_0x5c29x5=_0x5c29x5[_0xd587[119]];null== this[_0xd587[2959]]&& (_0x5c29x5= _0x5c29x9= mxConstants[_0xd587[2974]]);var _0x5c29xa= new mxRectangle(Math[_0xd587[488]](_0x5c29x4[_0xd587[235]]- _0x5c29x9/ 2),Math[_0xd587[488]](_0x5c29x4[_0xd587[236]]- _0x5c29x5/ 2),_0x5c29x9,_0x5c29x5);null== this[_0xd587[2959]]&& (_0xd587[188]!= this[_0xd587[2972]][_0xd587[252]][_0xd587[124]][_0xd587[187]]&& mxUtils[_0xd587[1825]](_0x5c29xa,this[_0xd587[2972]][_0xd587[1562]]))&& (_0x5c29x9+= 3,_0x5c29x5+= 3,_0x5c29xa=  new mxRectangle(Math[_0xd587[488]](_0x5c29x4[_0xd587[235]]- _0x5c29x9/ 2),Math[_0xd587[488]](_0x5c29x4[_0xd587[236]]- _0x5c29x5/ 2),_0x5c29x9,_0x5c29x5));this[_0xd587[2994]][1][_0xd587[1562]]= _0x5c29xa;this[_0xd587[2994]][1][_0xd587[258]]()};function mxEdgeSegmentHandler(_0x5c29x2){mxEdgeHandler[_0xd587[239]](this,_0x5c29x2)}mxUtils[_0xd587[1284]](mxEdgeSegmentHandler,mxEdgeHandler);mxEdgeSegmentHandler[_0xd587[202]]=  new mxElbowEdgeHandler;mxEdgeSegmentHandler[_0xd587[202]][_0xd587[196]]= mxEdgeSegmentHandler;mxEdgeSegmentHandler[_0xd587[202]][_0xd587[3018]]= function(_0x5c29x2){if(this[_0xd587[729]]|| this[_0xd587[3013]]){return mxElbowEdgeHandler[_0xd587[202]][_0xd587[3018]][_0xd587[183]](this,arguments)};this[_0xd587[2196]](_0x5c29x2,!1);var _0x5c29x3=this[_0xd587[724]][_0xd587[439]],_0x5c29x4=_0x5c29x3[0][_0xd587[238]]();this[_0xd587[2196]](_0x5c29x4,!1);for(var _0x5c29x5=[],_0x5c29x9=1;_0x5c29x9< _0x5c29x3[_0xd587[67]];_0x5c29x9++){var _0x5c29xa=_0x5c29x3[_0x5c29x9][_0xd587[238]]();this[_0xd587[2196]](_0x5c29xa,!1);_0x5c29x9== this[_0xd587[1983]]&& (_0x5c29x4[_0xd587[235]]== _0x5c29xa[_0xd587[235]]?(_0x5c29x4[_0xd587[235]]= _0x5c29x2[_0xd587[235]],_0x5c29xa[_0xd587[235]]= _0x5c29x2[_0xd587[235]]):(_0x5c29x4[_0xd587[236]]= _0x5c29x2[_0xd587[236]],_0x5c29xa[_0xd587[236]]= _0x5c29x2[_0xd587[236]]));_0x5c29x9< _0x5c29x3[_0xd587[67]]- 1&& _0x5c29x5[_0xd587[207]](_0x5c29xa);_0x5c29x4= _0x5c29xa};if(1== _0x5c29x5[_0xd587[67]]){if(_0x5c29x4= this[_0xd587[724]][_0xd587[441]],_0x5c29x9= this[_0xd587[724]][_0xd587[2089]](!0),_0x5c29xa= this[_0xd587[724]][_0xd587[2089]](!1),null!= _0x5c29xa& null!= _0x5c29x9){var _0x5c29x12=this[_0xd587[724]][_0xd587[2078]][_0xd587[235]],_0x5c29x13=this[_0xd587[724]][_0xd587[2078]][_0xd587[236]];mxUtils[_0xd587[442]](_0x5c29xa,_0x5c29x5[0][_0xd587[235]]+ _0x5c29x12,_0x5c29x5[0][_0xd587[236]]+ _0x5c29x13)?_0x5c29x3[1][_0xd587[236]]== _0x5c29x3[2][_0xd587[236]]?_0x5c29x5[0][_0xd587[236]]= _0x5c29x4[_0xd587[2228]](_0x5c29x9)- _0x5c29x13:_0x5c29x5[0][_0xd587[235]]= _0x5c29x4[_0xd587[2230]](_0x5c29x9)- _0x5c29x12:mxUtils[_0xd587[442]](_0x5c29x9,_0x5c29x5[0][_0xd587[235]]+ _0x5c29x12,_0x5c29x5[0][_0xd587[236]]+ _0x5c29x13)&& (_0x5c29x3[1][_0xd587[236]]== _0x5c29x3[0][_0xd587[236]]?_0x5c29x5[0][_0xd587[236]]= _0x5c29x4[_0xd587[2228]](_0x5c29xa)- _0x5c29x13:_0x5c29x5[0][_0xd587[235]]= _0x5c29x4[_0xd587[2230]](_0x5c29xa)- _0x5c29x12)}}else {0== _0x5c29x5[_0xd587[67]]&& (_0x5c29x5= [_0x5c29x2])};return _0x5c29x5};mxEdgeSegmentHandler[_0xd587[202]][_0xd587[3001]]= function(){var _0x5c29x2=[],_0x5c29x3=this[_0xd587[3009]](0);this[_0xd587[3002]](_0x5c29x3);_0x5c29x3[_0xd587[252]][_0xd587[124]][_0xd587[270]]= mxConstants[_0xd587[3011]];mxEvent[_0xd587[2733]](_0x5c29x3[_0xd587[252]],this[_0xd587[1179]],this[_0xd587[724]]);_0x5c29x2[_0xd587[207]](_0x5c29x3);mxClient[_0xd587[754]]&& _0x5c29x3[_0xd587[252]][_0xd587[57]](_0xd587[1377],_0xd587[130]);var _0x5c29x4=this[_0xd587[724]][_0xd587[439]];if(this[_0xd587[1179]][_0xd587[2662]](this[_0xd587[724]][_0xd587[246]])){null== this[_0xd587[1525]]&& (this[_0xd587[1525]]= []);for(var _0x5c29x5=0;_0x5c29x5< _0x5c29x4[_0xd587[67]]- 1;_0x5c29x5++){_0x5c29x3= this[_0xd587[3034]](),_0x5c29x2[_0xd587[207]](_0x5c29x3),_0x5c29x3[_0xd587[252]][_0xd587[124]][_0xd587[270]]= 0== _0x5c29x4[_0x5c29x5][_0xd587[235]]- _0x5c29x4[_0x5c29x5+ 1][_0xd587[235]]?_0xd587[3039]:_0xd587[3038],this[_0xd587[1525]][_0xd587[207]]( new mxPoint(0,0)),mxClient[_0xd587[754]]&& _0x5c29x3[_0xd587[252]][_0xd587[57]](_0xd587[1377],_0xd587[130])}};_0x5c29x3= this[_0xd587[3009]](_0x5c29x4[_0xd587[67]]);this[_0xd587[3002]](_0x5c29x3);_0x5c29x3[_0xd587[252]][_0xd587[124]][_0xd587[270]]= mxConstants[_0xd587[3011]];mxEvent[_0xd587[2733]](_0x5c29x3[_0xd587[252]],this[_0xd587[1179]],this[_0xd587[724]]);_0x5c29x2[_0xd587[207]](_0x5c29x3);mxClient[_0xd587[754]]&& _0x5c29x3[_0xd587[252]][_0xd587[57]](_0xd587[1377],_0xd587[130]);return _0x5c29x2};mxEdgeSegmentHandler[_0xd587[202]][_0xd587[258]]= function(){this[_0xd587[802]]();mxEdgeHandler[_0xd587[202]][_0xd587[258]][_0xd587[183]](this,arguments)};mxEdgeSegmentHandler[_0xd587[202]][_0xd587[802]]= function(){if(null!= this[_0xd587[2994]]){for(var _0x5c29x2=0;_0x5c29x2< this[_0xd587[2994]][_0xd587[67]];_0x5c29x2++){null!= this[_0xd587[2994]][_0x5c29x2]&& (this[_0xd587[2994]][_0x5c29x2][_0xd587[515]](),this[_0xd587[2994]][_0x5c29x2]= null)};this[_0xd587[2994]]= this[_0xd587[3001]]()}};mxEdgeSegmentHandler[_0xd587[202]][_0xd587[3030]]= function(_0x5c29x2,_0x5c29x3){if(this[_0xd587[1179]][_0xd587[2662]](this[_0xd587[724]][_0xd587[246]])){var _0x5c29x4=mxConstants[_0xd587[2974]],_0x5c29x5=this[_0xd587[724]][_0xd587[439]];if(null!= _0x5c29x5&& 1< _0x5c29x5[_0xd587[67]]){for(var _0x5c29x9=0;_0x5c29x9< this[_0xd587[724]][_0xd587[439]][_0xd587[67]]- 1;_0x5c29x9++){if(null!= this[_0xd587[2994]][_0x5c29x9+ 1]){_0x5c29x2= _0x5c29x5[_0x5c29x9];_0x5c29x3= _0x5c29x5[_0x5c29x9+ 1];var _0x5c29xa= new mxPoint(_0x5c29x2[_0xd587[235]]+ (_0x5c29x3[_0xd587[235]]- _0x5c29x2[_0xd587[235]])/ 2,_0x5c29x2[_0xd587[236]]+ (_0x5c29x3[_0xd587[236]]- _0x5c29x2[_0xd587[236]])/ 2);this[_0xd587[2994]][_0x5c29x9+ 1][_0xd587[1562]]=  new mxRectangle(Math[_0xd587[488]](_0x5c29xa[_0xd587[235]]- _0x5c29x4/ 2),Math[_0xd587[488]](_0x5c29xa[_0xd587[236]]- _0x5c29x4/ 2),_0x5c29x4,_0x5c29x4);this[_0xd587[2994]][_0x5c29x9+ 1][_0xd587[258]]()}}}}};mxEdgeSegmentHandler[_0xd587[202]][_0xd587[3023]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3= [];var _0x5c29x4=this[_0xd587[2997]];if(1< _0x5c29x4[_0xd587[67]]){for(var _0x5c29x5=_0x5c29x4[0],_0x5c29x9=_0x5c29x4[1],_0x5c29xa=2;_0x5c29xa< _0x5c29x4[_0xd587[67]];_0x5c29xa++){var _0x5c29x12=_0x5c29x4[_0x5c29xa];if((Math[_0xd587[488]](_0x5c29x5[_0xd587[235]])!= Math[_0xd587[488]](_0x5c29x9[_0xd587[235]])|| Math[_0xd587[488]](_0x5c29x9[_0xd587[235]])!= Math[_0xd587[488]](_0x5c29x12[_0xd587[235]]))&& (Math[_0xd587[488]](_0x5c29x5[_0xd587[236]])!= Math[_0xd587[488]](_0x5c29x9[_0xd587[236]])|| Math[_0xd587[488]](_0x5c29x9[_0xd587[236]])!= Math[_0xd587[488]](_0x5c29x12[_0xd587[236]]))){_0x5c29x5= _0x5c29x9,_0x5c29x9= _0x5c29x9[_0xd587[238]](),this[_0xd587[2196]](_0x5c29x9,!1),_0x5c29x3[_0xd587[207]](_0x5c29x9)};_0x5c29x9= _0x5c29x12}};mxElbowEdgeHandler[_0xd587[202]][_0xd587[3023]][_0xd587[183]](this,arguments)};function mxKeyHandler(_0x5c29x2,_0x5c29x3){null!= _0x5c29x2&& (this[_0xd587[1179]]= _0x5c29x2,this[_0xd587[772]]= _0x5c29x3|| document[_0xd587[158]],this[_0xd587[3040]]= [],this[_0xd587[3041]]= [],this[_0xd587[3042]]= [],this[_0xd587[3043]]= [],mxEvent[_0xd587[169]](this[_0xd587[772]],_0xd587[2123],mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[3044]](_0x5c29x2)})),mxClient[_0xd587[80]]&& mxEvent[_0xd587[169]](window,_0xd587[2428],mxUtils[_0xd587[885]](this,function(){this[_0xd587[515]]()})))}mxKeyHandler[_0xd587[202]][_0xd587[1179]]= null;mxKeyHandler[_0xd587[202]][_0xd587[772]]= null;mxKeyHandler[_0xd587[202]][_0xd587[3040]]= null;mxKeyHandler[_0xd587[202]][_0xd587[3041]]= null;mxKeyHandler[_0xd587[202]][_0xd587[3042]]= null;mxKeyHandler[_0xd587[202]][_0xd587[3043]]= null;mxKeyHandler[_0xd587[202]][_0xd587[984]]=  !0;mxKeyHandler[_0xd587[202]][_0xd587[994]]= function(){return this[_0xd587[984]]};mxKeyHandler[_0xd587[202]][_0xd587[995]]= function(_0x5c29x2){this[_0xd587[984]]= _0x5c29x2};mxKeyHandler[_0xd587[202]][_0xd587[3045]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[3040]][_0x5c29x2]= _0x5c29x3};mxKeyHandler[_0xd587[202]][_0xd587[3046]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[3041]][_0x5c29x2]= _0x5c29x3};mxKeyHandler[_0xd587[202]][_0xd587[3047]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[3042]][_0x5c29x2]= _0x5c29x3};mxKeyHandler[_0xd587[202]][_0xd587[3048]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[3043]][_0x5c29x2]= _0x5c29x3};mxKeyHandler[_0xd587[202]][_0xd587[775]]= function(_0x5c29x2){return mxEvent[_0xd587[775]](_0x5c29x2)};mxKeyHandler[_0xd587[202]][_0xd587[3049]]= function(_0x5c29x2){return null!= _0x5c29x2?this[_0xd587[775]](_0x5c29x2)?mxEvent[_0xd587[774]](_0x5c29x2)?this[_0xd587[3043]][_0x5c29x2[_0xd587[2124]]]:this[_0xd587[3042]][_0x5c29x2[_0xd587[2124]]]:mxEvent[_0xd587[774]](_0x5c29x2)?this[_0xd587[3041]][_0x5c29x2[_0xd587[2124]]]:this[_0xd587[3040]][_0x5c29x2[_0xd587[2124]]]:null};mxKeyHandler[_0xd587[202]][_0xd587[3050]]= function(_0x5c29x2){_0x5c29x2= mxEvent[_0xd587[728]](_0x5c29x2);if(_0x5c29x2== this[_0xd587[772]]|| _0x5c29x2[_0xd587[265]]== this[_0xd587[772]]|| null!= this[_0xd587[1179]][_0xd587[2347]]&& _0x5c29x2== this[_0xd587[1179]][_0xd587[2347]][_0xd587[126]]){return !0};for(;null!= _0x5c29x2;){if(_0x5c29x2== this[_0xd587[1179]][_0xd587[526]]){return !0};_0x5c29x2= _0x5c29x2[_0xd587[265]]};return !1};mxKeyHandler[_0xd587[202]][_0xd587[3044]]= function(_0x5c29x2){if(this[_0xd587[1179]][_0xd587[994]]()&& !mxEvent[_0xd587[721]](_0x5c29x2)&& this[_0xd587[3050]](_0x5c29x2)&& this[_0xd587[994]]()){if(27== _0x5c29x2[_0xd587[2124]]){this[_0xd587[859]](_0x5c29x2)}else {if(!this[_0xd587[1179]][_0xd587[2203]]()){var _0x5c29x3=this[_0xd587[3049]](_0x5c29x2);null!= _0x5c29x3&& (_0x5c29x3(_0x5c29x2),mxEvent[_0xd587[722]](_0x5c29x2))}}}};mxKeyHandler[_0xd587[202]][_0xd587[859]]= function(_0x5c29x2){this[_0xd587[1179]][_0xd587[2608]]()&& this[_0xd587[1179]][_0xd587[859]](_0x5c29x2)};mxKeyHandler[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[772]]= null};function mxTooltipHandler(_0x5c29x2,_0x5c29x3){null!= _0x5c29x2&& (this[_0xd587[1179]]= _0x5c29x2,this[_0xd587[1140]]= _0x5c29x3|| 500,this[_0xd587[1179]][_0xd587[1133]](this))}mxTooltipHandler[_0xd587[202]][_0xd587[931]]= 10005;mxTooltipHandler[_0xd587[202]][_0xd587[1179]]= null;mxTooltipHandler[_0xd587[202]][_0xd587[1140]]= null;mxTooltipHandler[_0xd587[202]][_0xd587[3051]]=  !1;mxTooltipHandler[_0xd587[202]][_0xd587[984]]=  !0;mxTooltipHandler[_0xd587[202]][_0xd587[994]]= function(){return this[_0xd587[984]]};mxTooltipHandler[_0xd587[202]][_0xd587[995]]= function(_0x5c29x2){this[_0xd587[984]]= _0x5c29x2};mxTooltipHandler[_0xd587[202]][_0xd587[2277]]= function(){return this[_0xd587[3051]]};mxTooltipHandler[_0xd587[202]][_0xd587[3052]]= function(_0x5c29x2){this[_0xd587[3051]]= _0x5c29x2};mxTooltipHandler[_0xd587[202]][_0xd587[176]]= function(){null!= document[_0xd587[112]]&& (this[_0xd587[485]]= document[_0xd587[55]](_0xd587[485]),this[_0xd587[485]][_0xd587[926]]= _0xd587[3053],this[_0xd587[485]][_0xd587[124]][_0xd587[187]]= _0xd587[188],this[_0xd587[485]][_0xd587[124]][_0xd587[931]]= this[_0xd587[931]],document[_0xd587[112]][_0xd587[62]](this[_0xd587[485]]),mxEvent[_0xd587[169]](this[_0xd587[485]],_0xd587[751],mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[3054]]()})))};mxTooltipHandler[_0xd587[202]][_0xd587[787]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[862]](_0x5c29x3,!1);this[_0xd587[3054]]()};mxTooltipHandler[_0xd587[202]][_0xd587[788]]= function(_0x5c29x2,_0x5c29x3){if(_0x5c29x3[_0xd587[730]]()!= this[_0xd587[1217]]|| _0x5c29x3[_0xd587[732]]()!= this[_0xd587[1218]]){this[_0xd587[862]](_0x5c29x3,!0),(this[_0xd587[2277]]()|| _0x5c29x3[_0xd587[248]]()!= this[_0xd587[724]]|| _0x5c29x3[_0xd587[728]]()!= this[_0xd587[252]]&& (!this[_0xd587[3055]]|| null!= _0x5c29x3[_0xd587[248]]()&& this[_0xd587[3055]]== (_0x5c29x3[_0xd587[729]](_0x5c29x3[_0xd587[248]]()[_0xd587[253]])|| !_0x5c29x3[_0xd587[729]](_0x5c29x3[_0xd587[248]]()[_0xd587[963]]))))&& this[_0xd587[3054]]()};this[_0xd587[1217]]= _0x5c29x3[_0xd587[730]]();this[_0xd587[1218]]= _0x5c29x3[_0xd587[732]]()};mxTooltipHandler[_0xd587[202]][_0xd587[789]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[862]](_0x5c29x3,!0);this[_0xd587[3054]]()};mxTooltipHandler[_0xd587[202]][_0xd587[3056]]= function(){null!= this[_0xd587[1123]]&& (window[_0xd587[2924]](this[_0xd587[1123]]),this[_0xd587[1123]]= null)};mxTooltipHandler[_0xd587[202]][_0xd587[862]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[3056]]();if(_0x5c29x3&& this[_0xd587[994]]()&& null!= _0x5c29x2[_0xd587[248]]()&& (null== this[_0xd587[485]]|| _0xd587[188]== this[_0xd587[485]][_0xd587[124]][_0xd587[187]])){var _0x5c29x4=_0x5c29x2[_0xd587[248]](),_0x5c29x5=_0x5c29x2[_0xd587[728]](),_0x5c29x9=_0x5c29x2[_0xd587[730]](),_0x5c29xa=_0x5c29x2[_0xd587[732]](),_0x5c29x12=_0x5c29x2[_0xd587[729]](_0x5c29x4[_0xd587[253]])|| _0x5c29x2[_0xd587[729]](_0x5c29x4[_0xd587[963]]);this[_0xd587[1123]]= window[_0xd587[261]](mxUtils[_0xd587[885]](this,function(){if(!this[_0xd587[1179]][_0xd587[2203]]()&& !this[_0xd587[1179]][_0xd587[2316]][_0xd587[1031]]()){var _0x5c29x2=this[_0xd587[1179]][_0xd587[2595]](_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa);this[_0xd587[539]](_0x5c29x2,_0x5c29x9,_0x5c29xa);this[_0xd587[724]]= _0x5c29x4;this[_0xd587[252]]= _0x5c29x5;this[_0xd587[3055]]= _0x5c29x12}}),this[_0xd587[1140]])}};mxTooltipHandler[_0xd587[202]][_0xd587[801]]= function(){this[_0xd587[3056]]();this[_0xd587[3054]]()};mxTooltipHandler[_0xd587[202]][_0xd587[3054]]= function(){null!= this[_0xd587[485]]&& (this[_0xd587[485]][_0xd587[124]][_0xd587[187]]= _0xd587[188])};mxTooltipHandler[_0xd587[202]][_0xd587[539]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){if(null!= _0x5c29x2&& 0< _0x5c29x2[_0xd587[67]]){null== this[_0xd587[485]]&& this[_0xd587[176]]();var _0x5c29x5=mxUtils[_0xd587[444]]();this[_0xd587[485]][_0xd587[124]][_0xd587[361]]= _0x5c29x3+ _0x5c29x5[_0xd587[235]]+ _0xd587[168];this[_0xd587[485]][_0xd587[124]][_0xd587[125]]= _0x5c29x4+ mxConstants[_0xd587[560]]+ _0x5c29x5[_0xd587[236]]+ _0xd587[168];mxUtils[_0xd587[1331]](_0x5c29x2)?(this[_0xd587[485]][_0xd587[339]]= _0xd587[110],this[_0xd587[485]][_0xd587[62]](_0x5c29x2)):this[_0xd587[485]][_0xd587[339]]= _0x5c29x2[_0xd587[230]](/\n/g,_0xd587[545]);this[_0xd587[485]][_0xd587[124]][_0xd587[187]]= _0xd587[110];mxUtils[_0xd587[933]](this[_0xd587[485]])}};mxTooltipHandler[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[1179]][_0xd587[1148]](this);mxEvent[_0xd587[762]](this[_0xd587[485]]);null!= this[_0xd587[485]]&& null!= this[_0xd587[485]][_0xd587[265]]&& this[_0xd587[485]][_0xd587[265]][_0xd587[266]](this[_0xd587[485]]);this[_0xd587[485]]= null};function mxCellTracker(_0x5c29x2,_0x5c29x3,_0x5c29x4){mxCellMarker[_0xd587[239]](this,_0x5c29x2,_0x5c29x3);this[_0xd587[1179]][_0xd587[1133]](this);null!= _0x5c29x4&& (this[_0xd587[736]]= _0x5c29x4);mxClient[_0xd587[80]]&& mxEvent[_0xd587[169]](window,_0xd587[2428],mxUtils[_0xd587[885]](this,function(){this[_0xd587[515]]()}))}mxUtils[_0xd587[1284]](mxCellTracker,mxCellMarker);mxCellTracker[_0xd587[202]][_0xd587[787]]= function(_0x5c29x2,_0x5c29x3){};mxCellTracker[_0xd587[202]][_0xd587[788]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[994]]()&& this[_0xd587[2871]](_0x5c29x3)};mxCellTracker[_0xd587[202]][_0xd587[789]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[862]]()};mxCellTracker[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[2717]]|| (this[_0xd587[2717]]=  !0,this[_0xd587[1179]][_0xd587[1148]](this),mxCellMarker[_0xd587[202]][_0xd587[515]][_0xd587[183]](this))};function mxCellHighlight(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){null!= _0x5c29x2&& (this[_0xd587[1179]]= _0x5c29x2,this[_0xd587[2943]]= null!= _0x5c29x3?_0x5c29x3:mxConstants[_0xd587[2854]],this[_0xd587[610]]= null!= _0x5c29x4?_0x5c29x4:mxConstants[_0xd587[3057]],this[_0xd587[648]]= null!= _0x5c29x5?_0x5c29x5:!1,this[_0xd587[3058]]= mxUtils[_0xd587[885]](this,function(){this[_0xd587[2950]]()}),this[_0xd587[1179]][_0xd587[249]]()[_0xd587[169]](mxEvent.SCALE,this[_0xd587[3058]]),this[_0xd587[1179]][_0xd587[249]]()[_0xd587[169]](mxEvent.TRANSLATE,this[_0xd587[3058]]),this[_0xd587[1179]][_0xd587[249]]()[_0xd587[169]](mxEvent.SCALE_AND_TRANSLATE,this[_0xd587[3058]]),this[_0xd587[1179]][_0xd587[502]]()[_0xd587[169]](mxEvent.CHANGE,this[_0xd587[3058]]),this[_0xd587[2877]]= mxUtils[_0xd587[885]](this,function(){this[_0xd587[801]]()}),this[_0xd587[1179]][_0xd587[249]]()[_0xd587[169]](mxEvent.DOWN,this[_0xd587[2877]]),this[_0xd587[1179]][_0xd587[249]]()[_0xd587[169]](mxEvent.UP,this[_0xd587[2877]]))}mxCellHighlight[_0xd587[202]][_0xd587[3059]]=  !1;mxCellHighlight[_0xd587[202]][_0xd587[1179]]=  !0;mxCellHighlight[_0xd587[202]][_0xd587[724]]= null;mxCellHighlight[_0xd587[202]][_0xd587[657]]= 2;mxCellHighlight[_0xd587[202]][_0xd587[2877]]= null;mxCellHighlight[_0xd587[202]][_0xd587[2828]]= function(_0x5c29x2){this[_0xd587[2943]]= _0x5c29x2;null!= this[_0xd587[253]]&& (this[_0xd587[253]][_0xd587[1336]]= _0x5c29x2)};mxCellHighlight[_0xd587[202]][_0xd587[3060]]= function(){this[_0xd587[253]]= this[_0xd587[2156]]();this[_0xd587[2950]]();!this[_0xd587[3059]]&& this[_0xd587[253]][_0xd587[252]][_0xd587[265]][_0xd587[285]]!= this[_0xd587[253]][_0xd587[252]]&& this[_0xd587[253]][_0xd587[252]][_0xd587[265]][_0xd587[950]](this[_0xd587[253]][_0xd587[252]],this[_0xd587[253]][_0xd587[252]][_0xd587[265]][_0xd587[285]])};mxCellHighlight[_0xd587[202]][_0xd587[2156]]= function(){var _0x5c29x2=null,_0x5c29x2=this[_0xd587[1179]][_0xd587[251]][_0xd587[250]](this[_0xd587[724]][_0xd587[246]])? new mxPolyline(this[_0xd587[724]][_0xd587[439]],this[_0xd587[2943]],this[_0xd587[610]]): new mxRectangleShape( new mxRectangle,null,this[_0xd587[2943]],this[_0xd587[610]]);_0x5c29x2[_0xd587[507]]= this[_0xd587[1179]][_0xd587[507]]!= mxConstants[_0xd587[508]]?mxConstants[_0xd587[1523]]:mxConstants[_0xd587[508]];_0x5c29x2[_0xd587[176]](this[_0xd587[1179]][_0xd587[249]]()[_0xd587[1524]]());mxEvent[_0xd587[2733]](_0x5c29x2[_0xd587[252]],this[_0xd587[1179]],this[_0xd587[724]]);_0x5c29x2[_0xd587[1564]]= 0;_0x5c29x2[_0xd587[1229]]=  !1;_0x5c29x2[_0xd587[1522]]= this[_0xd587[648]];return _0x5c29x2};mxCellHighlight[_0xd587[202]][_0xd587[2950]]= function(){if(null!= this[_0xd587[724]]&& null!= this[_0xd587[253]]){var _0x5c29x2=0;this[_0xd587[1179]][_0xd587[251]][_0xd587[250]](this[_0xd587[724]][_0xd587[246]])?this[_0xd587[253]][_0xd587[1525]]= this[_0xd587[724]][_0xd587[439]]:(this[_0xd587[253]][_0xd587[1562]]=  new mxRectangle(this[_0xd587[724]][_0xd587[235]]- this[_0xd587[657]],this[_0xd587[724]][_0xd587[236]]- this[_0xd587[657]],this[_0xd587[724]][_0xd587[117]]+ 2* this[_0xd587[657]],this[_0xd587[724]][_0xd587[119]]+ 2* this[_0xd587[657]]),_0x5c29x2= Number(this[_0xd587[724]][_0xd587[124]][mxConstants[_0xd587[2278]]]|| _0xd587[468]));null!= this[_0xd587[724]][_0xd587[253]]&& this[_0xd587[253]][_0xd587[1609]](this[_0xd587[724]][_0xd587[253]][_0xd587[1610]]());0!= _0x5c29x2&& (this[_0xd587[253]][_0xd587[603]]= _0x5c29x2);this[_0xd587[253]][_0xd587[258]]()}};mxCellHighlight[_0xd587[202]][_0xd587[801]]= function(){this[_0xd587[1016]](null)};mxCellHighlight[_0xd587[202]][_0xd587[1016]]= function(_0x5c29x2){this[_0xd587[724]]!= _0x5c29x2&& (null!= this[_0xd587[253]]&& (this[_0xd587[253]][_0xd587[515]](),this[_0xd587[253]]= null),this[_0xd587[724]]= _0x5c29x2,null!= this[_0xd587[724]]&& this[_0xd587[3060]]())};mxCellHighlight[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[1179]][_0xd587[249]]()[_0xd587[745]](this[_0xd587[3058]]);this[_0xd587[1179]][_0xd587[502]]()[_0xd587[745]](this[_0xd587[3058]]);this[_0xd587[1179]][_0xd587[249]]()[_0xd587[745]](this[_0xd587[2877]]);this[_0xd587[1179]][_0xd587[502]]()[_0xd587[745]](this[_0xd587[2877]]);null!= this[_0xd587[253]]&& (this[_0xd587[253]][_0xd587[515]](),this[_0xd587[253]]= null)};function mxDefaultKeyHandler(_0x5c29x2){if(null!= _0x5c29x2){this[_0xd587[3061]]= _0x5c29x2;this[_0xd587[2458]]=  new mxKeyHandler(_0x5c29x2[_0xd587[1179]]);var _0x5c29x3=this[_0xd587[2458]][_0xd587[859]];this[_0xd587[2458]][_0xd587[859]]= function(_0x5c29x4){_0x5c29x3[_0xd587[183]](this,arguments);_0x5c29x2[_0xd587[3062]]();_0x5c29x2[_0xd587[746]]( new mxEventObject(mxEvent.ESCAPE,_0xd587[763],_0x5c29x4))}}}mxDefaultKeyHandler[_0xd587[202]][_0xd587[3061]]= null;mxDefaultKeyHandler[_0xd587[202]][_0xd587[2458]]= null;mxDefaultKeyHandler[_0xd587[202]][_0xd587[3063]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=mxUtils[_0xd587[885]](this,function(){this[_0xd587[3061]][_0xd587[350]](_0x5c29x3)});_0x5c29x4?this[_0xd587[2458]][_0xd587[3047]](_0x5c29x2,_0x5c29x5):this[_0xd587[2458]][_0xd587[3045]](_0x5c29x2,_0x5c29x5)};mxDefaultKeyHandler[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[2458]][_0xd587[515]]();this[_0xd587[2458]]= null};function mxDefaultPopupMenu(_0x5c29x2){this[_0xd587[3064]]= _0x5c29x2}mxDefaultPopupMenu[_0xd587[202]][_0xd587[88]]= null;mxDefaultPopupMenu[_0xd587[202]][_0xd587[3064]]= null;mxDefaultPopupMenu[_0xd587[202]][_0xd587[3065]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){if(null!= this[_0xd587[3064]]){var _0x5c29x9=this[_0xd587[3066]](_0x5c29x2,_0x5c29x4,_0x5c29x5);this[_0xd587[3067]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,this[_0xd587[3064]][_0xd587[285]],null)}};mxDefaultPopupMenu[_0xd587[202]][_0xd587[3067]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12){for(var _0x5c29x13=!1;null!= _0x5c29xa;){if(_0xd587[99]== _0x5c29xa[_0xd587[301]]){var _0x5c29x14=_0x5c29xa[_0xd587[284]](_0xd587[3068]);if(null== _0x5c29x14|| _0x5c29x9[_0x5c29x14]){var _0x5c29x14=_0x5c29xa[_0xd587[284]](_0xd587[3069]),_0x5c29x14=mxResources[_0xd587[203]](_0x5c29x14)|| _0x5c29x14,_0x5c29x15=mxUtils[_0xd587[1545]](mxUtils[_0xd587[329]](_0x5c29xa)),_0x5c29x16=_0x5c29xa[_0xd587[284]](_0xd587[892]),_0x5c29x17=_0x5c29xa[_0xd587[284]](_0xd587[2916]),_0x5c29x18=_0x5c29xa[_0xd587[284]](_0xd587[3070]);_0x5c29x13&& (_0x5c29x3[_0xd587[1051]](_0x5c29x12),_0x5c29x13=  !1);null!= _0x5c29x17&& this[_0xd587[88]]&& (_0x5c29x17= this[_0xd587[88]]+ _0x5c29x17);_0x5c29x14= this[_0xd587[3071]](_0x5c29x3,_0x5c29x2,_0x5c29x14,_0x5c29x17,_0x5c29x15,_0x5c29x16,_0x5c29x4,_0x5c29x12,_0x5c29x18);this[_0xd587[3067]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa[_0xd587[285]],_0x5c29x14)}}else {_0xd587[3072]== _0x5c29xa[_0xd587[301]]&& (_0x5c29x13=  !0)};_0x5c29xa= _0x5c29xa[_0xd587[287]]}};mxDefaultPopupMenu[_0xd587[202]][_0xd587[3071]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa,_0x5c29x12,_0x5c29x13,_0x5c29x14){return _0x5c29x2[_0xd587[1025]](_0x5c29x4,_0x5c29x5,function(_0x5c29x2){_0xd587[279]==  typeof _0x5c29x9&& _0x5c29x9[_0xd587[239]](_0x5c29x3,_0x5c29x3,_0x5c29x12,_0x5c29x2);null!= _0x5c29xa&& _0x5c29x3[_0xd587[350]](_0x5c29xa,_0x5c29x12,_0x5c29x2)},_0x5c29x13,_0x5c29x14)};mxDefaultPopupMenu[_0xd587[202]][_0xd587[3066]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=_0x5c29x2[_0xd587[1179]][_0xd587[502]](),_0x5c29x9=_0x5c29x5[_0xd587[262]](_0x5c29x3),_0x5c29xa=[];_0x5c29xa[_0xd587[3073]]= null== _0x5c29x3;_0x5c29xa[_0xd587[3074]]= 1< _0x5c29x2[_0xd587[1179]][_0xd587[2694]]();_0x5c29xa[_0xd587[3075]]= _0x5c29x5[_0xd587[501]]()!= _0x5c29x5[_0xd587[1197]](_0x5c29x2[_0xd587[1179]][_0xd587[902]]());_0x5c29xa[_0xd587[246]]= null!= _0x5c29x3;_0x5c29x5= null!= _0x5c29x3&& 1== _0x5c29x2[_0xd587[1179]][_0xd587[2694]]();_0x5c29xa[_0xd587[3076]]= _0x5c29x5&& 0< _0x5c29x9;_0x5c29xa[_0xd587[3077]]= _0x5c29x5&& _0x5c29x2[_0xd587[1179]][_0xd587[2516]](_0x5c29x3,!1);_0x5c29xa[_0xd587[3078]]= _0x5c29x5&& _0x5c29x2[_0xd587[1179]][_0xd587[2516]](_0x5c29x3,!0);_0x5c29xa[_0xd587[3079]]= _0x5c29x5&& _0x5c29x2[_0xd587[1179]][_0xd587[2553]](_0x5c29x3);_0x5c29xa[_0xd587[3080]]= _0x5c29xa[_0xd587[3079]]&& 0== _0x5c29x9;_0x5c29xa[_0xd587[687]]= _0x5c29x5&& _0x5c29x2[_0xd587[1179]][_0xd587[1730]](_0x5c29x3);_0x5c29x9= this[_0xd587[3064]][_0xd587[64]](_0xd587[3081]);for(_0x5c29x5= 0;_0x5c29x5< _0x5c29x9[_0xd587[67]];_0x5c29x5++){var _0x5c29x12=mxUtils[_0xd587[1545]](mxUtils[_0xd587[329]](_0x5c29x9[_0x5c29x5])),_0x5c29x13=_0x5c29x9[_0x5c29x5][_0xd587[284]](_0xd587[298]);null!= _0x5c29x13&& _0xd587[279]==  typeof _0x5c29x12&& (_0x5c29xa[_0x5c29x13]= _0x5c29x12(_0x5c29x2,_0x5c29x3,_0x5c29x4))};return _0x5c29xa};function mxDefaultToolbar(_0x5c29x2,_0x5c29x3){this[_0xd587[3061]]= _0x5c29x3;null!= _0x5c29x2&& null!= _0x5c29x3&& this[_0xd587[176]](_0x5c29x2)}mxDefaultToolbar[_0xd587[202]][_0xd587[3061]]= null;mxDefaultToolbar[_0xd587[202]][_0xd587[3082]]= null;mxDefaultToolbar[_0xd587[202]][_0xd587[2877]]= null;mxDefaultToolbar[_0xd587[202]][_0xd587[657]]= 4;mxDefaultToolbar[_0xd587[202]][_0xd587[2804]]=  !1;mxDefaultToolbar[_0xd587[202]][_0xd587[176]]= function(_0x5c29x2){null!= _0x5c29x2&& (this[_0xd587[3082]]=  new mxToolbar(_0x5c29x2),this[_0xd587[3082]][_0xd587[169]](mxEvent.SELECT,mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x4){var _0x5c29x5=_0x5c29x4[_0xd587[720]](_0xd587[279]);this[_0xd587[3061]][_0xd587[3083]]= null!= _0x5c29x5?mxUtils[_0xd587[885]](this,function(){_0x5c29x5[_0xd587[183]](this,arguments);this[_0xd587[3082]][_0xd587[1050]]()}):null})),this[_0xd587[2877]]= mxUtils[_0xd587[885]](this,function(){null!= this[_0xd587[3082]]&& this[_0xd587[3082]][_0xd587[1050]](!0)}),this[_0xd587[3061]][_0xd587[1179]][_0xd587[169]](mxEvent.DOUBLE_CLICK,this[_0xd587[2877]]),this[_0xd587[3061]][_0xd587[169]](mxEvent.ESCAPE,this[_0xd587[2877]]))};mxDefaultToolbar[_0xd587[202]][_0xd587[1025]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=mxUtils[_0xd587[885]](this,function(){null!= _0x5c29x4&& 0< _0x5c29x4[_0xd587[67]]&& this[_0xd587[3061]][_0xd587[350]](_0x5c29x4)});return this[_0xd587[3082]][_0xd587[1025]](_0x5c29x2,_0x5c29x3,_0x5c29x9,_0x5c29x5)};mxDefaultToolbar[_0xd587[202]][_0xd587[1051]]= function(_0x5c29x2){_0x5c29x2= _0x5c29x2|| mxClient[_0xd587[88]]+ _0xd587[3084];this[_0xd587[3082]][_0xd587[1051]](_0x5c29x2)};mxDefaultToolbar[_0xd587[202]][_0xd587[970]]= function(){return this[_0xd587[3082]][_0xd587[970]]()};mxDefaultToolbar[_0xd587[202]][_0xd587[1038]]= function(_0x5c29x2){return this[_0xd587[3082]][_0xd587[1038]](_0x5c29x2)};mxDefaultToolbar[_0xd587[202]][_0xd587[3085]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=mxUtils[_0xd587[885]](this,function(){this[_0xd587[3061]][_0xd587[350]](_0x5c29x4)});this[_0xd587[972]](_0x5c29x2,_0x5c29x3,_0x5c29x5)};mxDefaultToolbar[_0xd587[202]][_0xd587[972]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return this[_0xd587[3082]][_0xd587[972]](_0x5c29x2,_0x5c29x3,_0x5c29x4)};mxDefaultToolbar[_0xd587[202]][_0xd587[1048]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){var _0x5c29xa=mxUtils[_0xd587[885]](this,function(){this[_0xd587[3061]][_0xd587[3086]](_0x5c29x4);null!= _0x5c29x9&& _0x5c29x9(this[_0xd587[3061]])});return this[_0xd587[3082]][_0xd587[1042]](_0x5c29x2,_0x5c29x3,_0x5c29xa,_0x5c29x5)};mxDefaultToolbar[_0xd587[202]][_0xd587[3087]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9,_0x5c29xa){var _0x5c29x12=function(){return _0xd587[279]==  typeof _0x5c29x4?_0x5c29x4():null!= _0x5c29x4?_0x5c29x4[_0xd587[238]]():null},_0x5c29x13=mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x3){_0xd587[279]==  typeof _0x5c29x9?_0x5c29x9(this[_0xd587[3061]],_0x5c29x12(),_0x5c29x2,_0x5c29x3):this[_0xd587[1008]](_0x5c29x12(),_0x5c29x2,_0x5c29x3);this[_0xd587[3082]][_0xd587[1050]]();mxEvent[_0xd587[722]](_0x5c29x2)});_0x5c29x2= this[_0xd587[3082]][_0xd587[1048]](_0x5c29x2,_0x5c29x3,_0x5c29x13,_0x5c29x5,null,_0x5c29xa);this[_0xd587[3088]](_0x5c29x2,function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x13(_0x5c29x3,_0x5c29x4)});return _0x5c29x2};mxDefaultToolbar[_0xd587[202]][_0xd587[1008]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[3061]][_0xd587[1179]],_0x5c29x9=_0x5c29x5[_0xd587[502]]();if(null== _0x5c29x4|| _0x5c29x9[_0xd587[250]](_0x5c29x4)|| !this[_0xd587[2804]]|| !_0x5c29x5[_0xd587[2565]](_0x5c29x4)){for(;null!= _0x5c29x4&& !_0x5c29x5[_0xd587[2685]](_0x5c29x4,[_0x5c29x2],_0x5c29x3);){_0x5c29x4= _0x5c29x9[_0xd587[1197]](_0x5c29x4)};this[_0xd587[1937]](_0x5c29x2,_0x5c29x3,_0x5c29x4)}else {this[_0xd587[807]](_0x5c29x2,_0x5c29x3,_0x5c29x4)}};mxDefaultToolbar[_0xd587[202]][_0xd587[1937]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[3061]][_0xd587[1179]];if(_0x5c29x5[_0xd587[2621]](_0x5c29x2)){var _0x5c29x9=mxEvent[_0xd587[731]](_0x5c29x3),_0x5c29xa=mxEvent[_0xd587[733]](_0x5c29x3),_0x5c29x9=mxUtils[_0xd587[2196]](_0x5c29x5[_0xd587[526]],_0x5c29x9,_0x5c29xa);return _0x5c29x5[_0xd587[2655]]()&& _0x5c29x5[_0xd587[2686]](_0x5c29x4,[_0x5c29x2],_0x5c29x3)?_0x5c29x5[_0xd587[853]](_0x5c29x4,[_0x5c29x2],null,_0x5c29x9[_0xd587[235]],_0x5c29x9[_0xd587[236]]):this[_0xd587[3061]][_0xd587[817]](_0x5c29x4,_0x5c29x2,_0x5c29x9[_0xd587[235]],_0x5c29x9[_0xd587[236]])};return null};mxDefaultToolbar[_0xd587[202]][_0xd587[807]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x3= this[_0xd587[3061]][_0xd587[1179]];var _0x5c29x5=_0x5c29x3[_0xd587[502]]();if(null!= _0x5c29x4&& _0x5c29x3[_0xd587[2565]](_0x5c29x2)&& _0x5c29x3[_0xd587[2581]](null,_0x5c29x4,_0x5c29x2)){var _0x5c29x9=null;_0x5c29x5[_0xd587[473]]();try{var _0x5c29xa=_0x5c29x5[_0xd587[1721]](_0x5c29x4),_0x5c29x12=_0x5c29x5[_0xd587[1721]](_0x5c29x2)[_0xd587[238]]();_0x5c29x12[_0xd587[235]]= _0x5c29xa[_0xd587[235]]+ (_0x5c29xa[_0xd587[117]]- _0x5c29x12[_0xd587[117]])/ 2;_0x5c29x12[_0xd587[236]]= _0x5c29xa[_0xd587[236]]+ (_0x5c29xa[_0xd587[119]]- _0x5c29x12[_0xd587[119]])/ 2;var _0x5c29x13=this[_0xd587[657]]* _0x5c29x3[_0xd587[1020]],_0x5c29x14=20* _0x5c29x5[_0xd587[1962]](_0x5c29x4,!0);this[_0xd587[3061]][_0xd587[3089]]?_0x5c29x12[_0xd587[235]]+= (_0x5c29x12[_0xd587[117]]+ _0x5c29xa[_0xd587[117]])/ 2+ _0x5c29x13+ _0x5c29x14:_0x5c29x12[_0xd587[236]]+= (_0x5c29x12[_0xd587[119]]+ _0x5c29xa[_0xd587[119]])/ 2+ _0x5c29x13+ _0x5c29x14;_0x5c29x2[_0xd587[1724]](_0x5c29x12);var _0x5c29x15=_0x5c29x5[_0xd587[1197]](_0x5c29x4);_0x5c29x3[_0xd587[2103]](_0x5c29x2,_0x5c29x15);_0x5c29x3[_0xd587[2509]](_0x5c29x2);_0x5c29x9= this[_0xd587[3061]][_0xd587[2503]](_0x5c29x4,_0x5c29x2);if(null== _0x5c29x5[_0xd587[1721]](_0x5c29x9)){var _0x5c29x16= new mxGeometry;_0x5c29x16[_0xd587[1500]]=  !0;_0x5c29x5[_0xd587[1724]](_0x5c29x9,_0x5c29x16)};_0x5c29x3[_0xd587[2504]](_0x5c29x9,_0x5c29x15,_0x5c29x4,_0x5c29x2)}finally{_0x5c29x5[_0xd587[476]]()};_0x5c29x3[_0xd587[904]]([_0x5c29x2,_0x5c29x9]);_0x5c29x3[_0xd587[2564]](_0x5c29x2)}};mxDefaultToolbar[_0xd587[202]][_0xd587[3088]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=document[_0xd587[55]](_0xd587[466]);_0x5c29x4[_0xd587[57]](_0xd587[390],_0x5c29x2[_0xd587[284]](_0xd587[390]));var _0x5c29x5=mxUtils[_0xd587[885]](this,function(_0x5c29x9){_0x5c29x4[_0xd587[124]][_0xd587[117]]= 2* _0x5c29x2[_0xd587[359]]+ _0xd587[168];_0x5c29x4[_0xd587[124]][_0xd587[119]]= 2* _0x5c29x2[_0xd587[167]]+ _0xd587[168];mxUtils[_0xd587[3090]](_0x5c29x2,this[_0xd587[3061]][_0xd587[1179]],_0x5c29x3,_0x5c29x4);mxEvent[_0xd587[745]](_0x5c29x4,_0xd587[219],_0x5c29x5)});mxClient[_0xd587[80]]?_0x5c29x5():mxEvent[_0xd587[169]](_0x5c29x4,_0xd587[219],_0x5c29x5)};mxDefaultToolbar[_0xd587[202]][_0xd587[515]]= function(){null!= this[_0xd587[2877]]&& (this[_0xd587[3061]][_0xd587[1179]][_0xd587[745]](_0xd587[760],this[_0xd587[2877]]),this[_0xd587[3061]][_0xd587[745]](_0xd587[859],this[_0xd587[2877]]),this[_0xd587[2877]]= null);null!= this[_0xd587[3082]]&& (this[_0xd587[3082]][_0xd587[515]](),this[_0xd587[3082]]= null)};function mxEditor(_0x5c29x2){this[_0xd587[3091]]= [];this[_0xd587[3092]]();if(null!= document[_0xd587[112]]){this[_0xd587[3093]]= [];this[_0xd587[3094]]=  new mxDefaultPopupMenu;this[_0xd587[3095]]=  new mxUndoManager;this[_0xd587[1179]]= this[_0xd587[3096]]();this[_0xd587[3082]]= this[_0xd587[3097]]();this[_0xd587[3098]]=  new mxDefaultKeyHandler(this);this[_0xd587[3099]](_0x5c29x2);this[_0xd587[1179]][_0xd587[2180]]= this[_0xd587[3100]];!mxClient[_0xd587[3101]]&& null!= this[_0xd587[1056]]&& (this[_0xd587[812]]= this[_0xd587[3102]]());if(null!= this[_0xd587[1987]]){this[_0xd587[1987]]()};mxClient[_0xd587[80]]&& mxEvent[_0xd587[169]](window,_0xd587[2428],mxUtils[_0xd587[885]](this,function(){this[_0xd587[515]]()}))}}mxLoadResources&& mxResources[_0xd587[99]](mxClient[_0xd587[86]]+ _0xd587[3103]);mxEditor[_0xd587[202]]=  new mxEventSource;mxEditor[_0xd587[202]][_0xd587[196]]= mxEditor;mxEditor[_0xd587[202]][_0xd587[3104]]= _0xd587[130]!= mxClient[_0xd587[90]]?_0xd587[3105]:_0xd587[110];mxEditor[_0xd587[202]][_0xd587[3106]]= _0xd587[130]!= mxClient[_0xd587[90]]?_0xd587[3107]:_0xd587[110];mxEditor[_0xd587[202]][_0xd587[3108]]= _0xd587[130]!= mxClient[_0xd587[90]]?_0xd587[3109]:_0xd587[110];mxEditor[_0xd587[202]][_0xd587[3110]]= _0xd587[130]!= mxClient[_0xd587[90]]?_0xd587[716]:_0xd587[110];mxEditor[_0xd587[202]][_0xd587[3111]]= _0xd587[130]!= mxClient[_0xd587[90]]?_0xd587[3112]:_0xd587[110];mxEditor[_0xd587[202]][_0xd587[3113]]= _0xd587[130]!= mxClient[_0xd587[90]]?_0xd587[2719]:_0xd587[110];mxEditor[_0xd587[202]][_0xd587[3114]]= _0xd587[130]!= mxClient[_0xd587[90]]?_0xd587[2136]:_0xd587[110];mxEditor[_0xd587[202]][_0xd587[2136]]= null;mxEditor[_0xd587[202]][_0xd587[1179]]= null;mxEditor[_0xd587[202]][_0xd587[2720]]= null;mxEditor[_0xd587[202]][_0xd587[3082]]= null;mxEditor[_0xd587[202]][_0xd587[812]]= null;mxEditor[_0xd587[202]][_0xd587[879]]= null;mxEditor[_0xd587[202]][_0xd587[3094]]= null;mxEditor[_0xd587[202]][_0xd587[3095]]= null;mxEditor[_0xd587[202]][_0xd587[3098]]= null;mxEditor[_0xd587[202]][_0xd587[3091]]= null;mxEditor[_0xd587[202]][_0xd587[3115]]= _0xd587[1061];mxEditor[_0xd587[202]][_0xd587[3116]]=  !1;mxEditor[_0xd587[202]][_0xd587[1157]]=  !0;mxEditor[_0xd587[202]][_0xd587[3083]]= null;mxEditor[_0xd587[202]][_0xd587[3117]]=  !1;mxEditor[_0xd587[202]][_0xd587[3118]]= null;mxEditor[_0xd587[202]][_0xd587[2075]]= null;mxEditor[_0xd587[202]][_0xd587[3119]]= null;mxEditor[_0xd587[202]][_0xd587[3120]]= null;mxEditor[_0xd587[202]][_0xd587[3121]]= null;mxEditor[_0xd587[202]][_0xd587[3122]]= null;mxEditor[_0xd587[202]][_0xd587[1069]]= _0xd587[336];mxEditor[_0xd587[202]][_0xd587[3123]]= _0xd587[338];mxEditor[_0xd587[202]][_0xd587[1070]]=  !0;mxEditor[_0xd587[202]][_0xd587[3124]]= null;mxEditor[_0xd587[202]][_0xd587[3125]]= null;mxEditor[_0xd587[202]][_0xd587[1056]]= null;mxEditor[_0xd587[202]][_0xd587[1058]]= null;mxEditor[_0xd587[202]][_0xd587[1057]]= null;mxEditor[_0xd587[202]][_0xd587[3089]]=  !1;mxEditor[_0xd587[202]][_0xd587[3126]]=  !1;mxEditor[_0xd587[202]][_0xd587[3127]]= 0;mxEditor[_0xd587[202]][_0xd587[3128]]=  !1;mxEditor[_0xd587[202]][_0xd587[3129]]=  !1;mxEditor[_0xd587[202]][_0xd587[3093]]= null;mxEditor[_0xd587[202]][_0xd587[3130]]= 0;mxEditor[_0xd587[202]][_0xd587[3100]]= _0xd587[604];mxEditor[_0xd587[202]][_0xd587[3112]]= null;mxEditor[_0xd587[202]][_0xd587[3131]]= null;mxEditor[_0xd587[202]][_0xd587[3132]]= 20;mxEditor[_0xd587[202]][_0xd587[2719]]= null;mxEditor[_0xd587[202]][_0xd587[3133]]= null;mxEditor[_0xd587[202]][_0xd587[3134]]= null;mxEditor[_0xd587[202]][_0xd587[3135]]= 300;mxEditor[_0xd587[202]][_0xd587[3136]]= 260;mxEditor[_0xd587[202]][_0xd587[3137]]= 240;mxEditor[_0xd587[202]][_0xd587[3138]]= null;mxEditor[_0xd587[202]][_0xd587[3139]]=  !1;mxEditor[_0xd587[202]][_0xd587[3140]]=  !1;mxEditor[_0xd587[202]][_0xd587[2113]]=  !1;mxEditor[_0xd587[202]][_0xd587[2133]]= function(){return this[_0xd587[2113]]};mxEditor[_0xd587[202]][_0xd587[2128]]= function(_0x5c29x2){this[_0xd587[2113]]= _0x5c29x2};mxEditor[_0xd587[202]][_0xd587[3092]]= function(){this[_0xd587[3071]](_0xd587[815],function(_0x5c29x2){_0x5c29x2[_0xd587[815]]()});this[_0xd587[3071]](_0xd587[540],function(_0x5c29x2){( new mxPrintPreview(_0x5c29x2[_0xd587[1179]],1))[_0xd587[392]]()});this[_0xd587[3071]](_0xd587[539],function(_0x5c29x2){mxUtils[_0xd587[539]](_0x5c29x2[_0xd587[1179]],null,10,10)});this[_0xd587[3071]](_0xd587[3141],function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[3142]]();if(null== _0x5c29x3|| mxClient[_0xd587[3101]]){_0x5c29x2[_0xd587[350]](_0xd587[539])}else {var _0x5c29x4=mxUtils[_0xd587[3143]](_0x5c29x2[_0xd587[1179]],1),_0x5c29x4=mxUtils[_0xd587[875]](_0x5c29x4,_0xd587[192]);mxUtils[_0xd587[894]](_0x5c29x3,_0x5c29x2[_0xd587[3123]]+ _0xd587[226]+ encodeURIComponent(_0x5c29x4),document,_0xd587[3144])}});this[_0xd587[3071]](_0xd587[802],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[802]]()});this[_0xd587[3071]](_0xd587[3145],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& mxClipboard[_0xd587[3145]](_0x5c29x2[_0xd587[1179]])});this[_0xd587[3071]](_0xd587[149],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& mxClipboard[_0xd587[149]](_0x5c29x2[_0xd587[1179]])});this[_0xd587[3071]](_0xd587[3146],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& mxClipboard[_0xd587[3146]](_0x5c29x2[_0xd587[1179]])});this[_0xd587[3071]](_0xd587[3147],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[842]]()});this[_0xd587[3071]](_0xd587[1504],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[2450]](_0x5c29x2[_0xd587[844]]())});this[_0xd587[3071]](_0xd587[3148],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[904]](_0x5c29x2[_0xd587[1179]][_0xd587[845]]())});this[_0xd587[3071]](_0xd587[1997],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[846]]()});this[_0xd587[3071]](_0xd587[824],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[824]]()});this[_0xd587[3071]](_0xd587[825],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[825]]()});this[_0xd587[3071]](_0xd587[2558],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[2558]]()});this[_0xd587[3071]](_0xd587[2559],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[2559]]()});this[_0xd587[3071]](_0xd587[3149],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[2560]]()});this[_0xd587[3071]](_0xd587[933],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[933]]()});this[_0xd587[3071]](_0xd587[3150],function(_0x5c29x2,_0x5c29x3){_0x5c29x2[_0xd587[3150]](_0x5c29x3)});this[_0xd587[3071]](_0xd587[2705],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[2705]]()});this[_0xd587[3071]](_0xd587[3151],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[2440]]()});this[_0xd587[3071]](_0xd587[2706],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[2706]]()});this[_0xd587[3071]](_0xd587[2708],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[2708]]()});this[_0xd587[3071]](_0xd587[1061],function(_0x5c29x2,_0x5c29x3){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[2453]](_0x5c29x3)&& _0x5c29x2[_0xd587[1179]][_0xd587[2451]](_0x5c29x3)});this[_0xd587[3071]](_0xd587[3152],function(_0x5c29x2,_0x5c29x3){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[840]](!0)});this[_0xd587[3071]](_0xd587[3153],function(_0x5c29x2,_0x5c29x3){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[840]](!1)});this[_0xd587[3071]](_0xd587[2552],function(_0x5c29x2,_0x5c29x3){_0x5c29x2[_0xd587[1179]][_0xd587[2552]](_0x5c29x3)});this[_0xd587[3071]](_0xd587[2554],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[2554]]()});this[_0xd587[3071]](_0xd587[2442],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[2442]]()});this[_0xd587[3071]](_0xd587[3154],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[2702]]()});this[_0xd587[3071]](_0xd587[3155],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[2700]]()});this[_0xd587[3071]](_0xd587[3156],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[2703]]()});this[_0xd587[3071]](_0xd587[3157],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[2704]]()});this[_0xd587[3071]](_0xd587[2514],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[847]](!0)});this[_0xd587[3071]](_0xd587[3158],function(_0x5c29x2){if(_0x5c29x2[_0xd587[1179]][_0xd587[994]]()){var _0x5c29x3=_0x5c29x2[_0xd587[1179]][_0xd587[1728]]();_0x5c29x2[_0xd587[1179]][_0xd587[847]](!0,!1,_0x5c29x3)}});this[_0xd587[3071]](_0xd587[3159],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[847]](!1)});this[_0xd587[3071]](_0xd587[3160],function(_0x5c29x2){if(_0x5c29x2[_0xd587[1179]][_0xd587[994]]()){var _0x5c29x3=_0x5c29x2[_0xd587[1179]][_0xd587[1728]]();_0x5c29x2[_0xd587[1179]][_0xd587[847]](!1,!1,_0x5c29x3)}});this[_0xd587[3071]](_0xd587[1447],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[2491]](mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_BOLD)});this[_0xd587[3071]](_0xd587[1449],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[2491]](mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_ITALIC)});this[_0xd587[3071]](_0xd587[355],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[2491]](mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_UNDERLINE)});this[_0xd587[3071]](_0xd587[639],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[2491]](mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_SHADOW)});this[_0xd587[3071]](_0xd587[3161],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[849]](mxConstants.ALIGN_LEFT)});this[_0xd587[3071]](_0xd587[3162],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[849]](mxConstants.ALIGN_CENTER)});this[_0xd587[3071]](_0xd587[3163],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[849]](mxConstants.ALIGN_RIGHT)});this[_0xd587[3071]](_0xd587[3164],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[849]](mxConstants.ALIGN_TOP)});this[_0xd587[3071]](_0xd587[3165],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[849]](mxConstants.ALIGN_MIDDLE)});this[_0xd587[3071]](_0xd587[3166],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[849]](mxConstants.ALIGN_BOTTOM)});this[_0xd587[3071]](_0xd587[3167],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[1717]](mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT)});this[_0xd587[3071]](_0xd587[3168],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[1717]](mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER)});this[_0xd587[3071]](_0xd587[3169],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[1717]](mxConstants.STYLE_ALIGN,mxConstants.ALIGN_RIGHT)});this[_0xd587[3071]](_0xd587[3170],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[1717]](mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_TOP)});this[_0xd587[3071]](_0xd587[3171],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[1717]](mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)});this[_0xd587[3071]](_0xd587[3172],function(_0x5c29x2){_0x5c29x2[_0xd587[1179]][_0xd587[994]]()&& _0x5c29x2[_0xd587[1179]][_0xd587[1717]](mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_BOTTOM)});this[_0xd587[3071]](_0xd587[499],function(_0x5c29x2){var _0x5c29x3=100* _0x5c29x2[_0xd587[1179]][_0xd587[249]]()[_0xd587[255]],_0x5c29x3=parseFloat(mxUtils[_0xd587[3173]](mxResources[_0xd587[203]](_0x5c29x2[_0xd587[3104]])|| _0x5c29x2[_0xd587[3104]],_0x5c29x3))/ 100;isNaN(_0x5c29x3)|| _0x5c29x2[_0xd587[1179]][_0xd587[249]]()[_0xd587[2262]](_0x5c29x3)});this[_0xd587[3071]](_0xd587[3174],function(_0x5c29x2){null!= _0x5c29x2[_0xd587[3112]]?_0x5c29x2[_0xd587[3112]][_0xd587[175]](!_0x5c29x2[_0xd587[3112]][_0xd587[174]]()):_0x5c29x2[_0xd587[3175]]()});this[_0xd587[3071]](_0xd587[3176],function(_0x5c29x2){null!= _0x5c29x2[_0xd587[2719]]?_0x5c29x2[_0xd587[2719]][_0xd587[175]](!_0x5c29x2[_0xd587[2719]][_0xd587[174]]()):_0x5c29x2[_0xd587[3177]]()});this[_0xd587[3071]](_0xd587[3178],function(_0x5c29x2){null== _0x5c29x2[_0xd587[2136]]?_0x5c29x2[_0xd587[3179]]():_0x5c29x2[_0xd587[2136]][_0xd587[175]](!_0x5c29x2[_0xd587[2136]][_0xd587[174]]())});this[_0xd587[3071]](_0xd587[3180],function(_0x5c29x2){mxLog[_0xd587[175]](!mxLog[_0xd587[174]]())})};mxEditor[_0xd587[202]][_0xd587[3102]]= function(){var _0x5c29x2=mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[746]]( new mxEventObject(mxEvent.SESSION,_0xd587[812],_0x5c29x2))});return this[_0xd587[807]](this[_0xd587[1056]],this[_0xd587[1057]],this[_0xd587[1058]],_0x5c29x2)};mxEditor[_0xd587[202]][_0xd587[3099]]= function(_0x5c29x2){null!= _0x5c29x2&& (( new mxCodec(_0x5c29x2[_0xd587[295]]))[_0xd587[1093]](_0x5c29x2,this),this[_0xd587[3181]]())};mxEditor[_0xd587[202]][_0xd587[3182]]= function(){document[_0xd587[3183]]= _0xd587[3184]};mxEditor[_0xd587[202]][_0xd587[3181]]= function(){this[_0xd587[1184]]= ( new Date)[_0xd587[178]]();this[_0xd587[3095]][_0xd587[200]]();this[_0xd587[1183]]= 0;this[_0xd587[2128]](!1)};mxEditor[_0xd587[202]][_0xd587[3071]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[3091]][_0x5c29x2]= _0x5c29x3};mxEditor[_0xd587[202]][_0xd587[350]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[3091]][_0x5c29x2];if(null!= _0x5c29x5){try{var _0x5c29x9=arguments;_0x5c29x9[0]= this;_0x5c29x5[_0xd587[183]](this,_0x5c29x9)}catch(f){throw mxUtils[_0xd587[267]](_0xd587[3185]+ _0x5c29x2+ _0xd587[3186]+ f[_0xd587[281]],280,!0),f}}else {mxUtils[_0xd587[267]](_0xd587[3187]+ _0x5c29x2,280,!0)}};mxEditor[_0xd587[202]][_0xd587[3188]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[3118]][_0x5c29x2]= _0x5c29x3};mxEditor[_0xd587[202]][_0xd587[3189]]= function(_0x5c29x2){return this[_0xd587[3118]][_0x5c29x2]};mxEditor[_0xd587[202]][_0xd587[3096]]= function(){var _0x5c29x2= new mxGraph(null,null,this[_0xd587[2720]]);_0x5c29x2[_0xd587[2673]](!0);_0x5c29x2[_0xd587[2674]](!0);this[_0xd587[3190]](_0x5c29x2);this[_0xd587[3191]](_0x5c29x2);this[_0xd587[3192]](_0x5c29x2);this[_0xd587[3193]](_0x5c29x2);this[_0xd587[3194]](_0x5c29x2);_0x5c29x2[_0xd587[2316]][_0xd587[1033]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x4,_0x5c29x5){return this[_0xd587[3195]](_0x5c29x2,_0x5c29x4,_0x5c29x5)});_0x5c29x2[_0xd587[2433]][_0xd587[1033]]= mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x4){return this[_0xd587[2503]](_0x5c29x2,_0x5c29x4)});this[_0xd587[3196]](_0x5c29x2);this[_0xd587[3197]](_0x5c29x2);return _0x5c29x2};mxEditor[_0xd587[202]][_0xd587[3196]]= function(_0x5c29x2){_0x5c29x2=  new mxSwimlaneManager(_0x5c29x2,!1);_0x5c29x2[_0xd587[1737]]= mxUtils[_0xd587[885]](this,function(){return this[_0xd587[3089]]});_0x5c29x2[_0xd587[994]]= mxUtils[_0xd587[885]](this,function(){return this[_0xd587[3128]]});return _0x5c29x2};mxEditor[_0xd587[202]][_0xd587[3197]]= function(_0x5c29x2){var _0x5c29x3= new mxLayoutManager(_0x5c29x2),_0x5c29x4=this;_0x5c29x3[_0xd587[2754]]= function(_0x5c29x3){var _0x5c29x9=null,_0x5c29xa=_0x5c29x4[_0xd587[1179]][_0xd587[502]]();if(null!= _0x5c29xa[_0xd587[1197]](_0x5c29x3)){if(_0x5c29x4[_0xd587[3129]]&& _0x5c29x2[_0xd587[1730]](_0x5c29x3)){null== _0x5c29x4[_0xd587[3198]]&& (_0x5c29x4[_0xd587[3198]]= _0x5c29x4[_0xd587[3199]]()),_0x5c29x9= _0x5c29x4[_0xd587[3198]]}else {if(_0x5c29x4[_0xd587[3126]]&& (_0x5c29x2[_0xd587[2553]](_0x5c29x3)|| null== _0x5c29xa[_0xd587[1197]](_0x5c29xa[_0xd587[1197]](_0x5c29x3)))){null== _0x5c29x4[_0xd587[3200]]&& (_0x5c29x4[_0xd587[3200]]= _0x5c29x4[_0xd587[3201]]()),_0x5c29x9= _0x5c29x4[_0xd587[3200]]}}};return _0x5c29x9};return _0x5c29x3};mxEditor[_0xd587[202]][_0xd587[3202]]= function(_0x5c29x2){null== this[_0xd587[1179]][_0xd587[526]]&& (this[_0xd587[1179]][_0xd587[176]](_0x5c29x2),this[_0xd587[3203]]=  new mxRubberband(this[_0xd587[1179]]),this[_0xd587[1157]]&& mxEvent[_0xd587[1157]](_0x5c29x2),mxClient[_0xd587[496]]&&  new mxDivResizer(_0x5c29x2))};mxEditor[_0xd587[202]][_0xd587[3190]]= function(_0x5c29x2){_0x5c29x2[_0xd587[169]](mxEvent.DOUBLE_CLICK,mxUtils[_0xd587[885]](this,function(_0x5c29x3,_0x5c29x4){var _0x5c29x5=_0x5c29x4[_0xd587[720]](_0xd587[246]);null!= _0x5c29x5&& (_0x5c29x2[_0xd587[994]]()&& null!= this[_0xd587[3115]])&& (this[_0xd587[350]](this[_0xd587[3115]],_0x5c29x5),_0x5c29x4[_0xd587[722]]())}))};mxEditor[_0xd587[202]][_0xd587[3191]]= function(_0x5c29x2){var _0x5c29x3=mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x3){var _0x5c29x9=_0x5c29x3[_0xd587[720]](_0xd587[1061]);this[_0xd587[3095]][_0xd587[1114]](_0x5c29x9)});_0x5c29x2[_0xd587[502]]()[_0xd587[169]](mxEvent.UNDO,_0x5c29x3);_0x5c29x2[_0xd587[249]]()[_0xd587[169]](mxEvent.UNDO,_0x5c29x3);_0x5c29x3= function(_0x5c29x3,_0x5c29x5){var _0x5c29x9=_0x5c29x5[_0xd587[720]](_0xd587[1061])[_0xd587[1065]];_0x5c29x2[_0xd587[904]](_0x5c29x2[_0xd587[2436]](_0x5c29x9))};this[_0xd587[3095]][_0xd587[169]](mxEvent.UNDO,_0x5c29x3);this[_0xd587[3095]][_0xd587[169]](mxEvent.REDO,_0x5c29x3)};mxEditor[_0xd587[202]][_0xd587[3192]]= function(_0x5c29x2){var _0x5c29x3=mxUtils[_0xd587[885]](this,function(_0x5c29x2){this[_0xd587[746]]( new mxEventObject(mxEvent.ROOT))});_0x5c29x2[_0xd587[249]]()[_0xd587[169]](mxEvent.DOWN,_0x5c29x3);_0x5c29x2[_0xd587[249]]()[_0xd587[169]](mxEvent.UP,_0x5c29x3)};mxEditor[_0xd587[202]][_0xd587[3193]]= function(_0x5c29x2){var _0x5c29x3=mxUtils[_0xd587[885]](this,function(_0x5c29x3,_0x5c29x5){this[_0xd587[2128]](!0);!0== this[_0xd587[3140]]&& _0x5c29x2[_0xd587[2585]]();for(var _0x5c29x9=_0x5c29x5[_0xd587[720]](_0xd587[1061])[_0xd587[1065]],_0x5c29xa=0;_0x5c29xa< _0x5c29x9[_0xd587[67]];_0x5c29xa++){var _0x5c29x12=_0x5c29x9[_0x5c29xa];if(_0x5c29x12 instanceof  mxRootChange|| _0x5c29x12 instanceof  mxValueChange&& _0x5c29x12[_0xd587[246]]== this[_0xd587[1179]][_0xd587[251]][_0xd587[813]]|| _0x5c29x12 instanceof  mxCellAttributeChange&& _0x5c29x12[_0xd587[246]]== this[_0xd587[1179]][_0xd587[251]][_0xd587[813]]){this[_0xd587[746]]( new mxEventObject(mxEvent.ROOT));break}}});_0x5c29x2[_0xd587[502]]()[_0xd587[169]](mxEvent.CHANGE,_0x5c29x3)};mxEditor[_0xd587[202]][_0xd587[3194]]= function(_0x5c29x2){var _0x5c29x3=this;_0x5c29x2[_0xd587[1133]]({mouseDown:function(_0x5c29x2,_0x5c29x5){if(null!= _0x5c29x3[_0xd587[3083]]&& !_0x5c29x5[_0xd587[737]]()&& (_0x5c29x3[_0xd587[3117]]|| null== _0x5c29x5[_0xd587[248]]())){_0x5c29x3[_0xd587[1179]][_0xd587[2440]](),_0x5c29x3[_0xd587[3083]](_0x5c29x5[_0xd587[727]](),_0x5c29x5[_0xd587[736]]()),this[_0xd587[1142]]=  !0,_0x5c29x5[_0xd587[722]]()}},mouseMove:function(_0x5c29x2,_0x5c29x3){this[_0xd587[1142]]&& _0x5c29x3[_0xd587[722]]()},mouseUp:function(_0x5c29x2,_0x5c29x3){this[_0xd587[1142]]&& (this[_0xd587[1142]]=  !1,_0x5c29x3[_0xd587[722]]())}})};mxEditor[_0xd587[202]][_0xd587[3201]]= function(){var _0x5c29x2=this[_0xd587[1179]][_0xd587[1020]],_0x5c29x3= new mxStackLayout(this[_0xd587[1179]],!this[_0xd587[3089]],this[_0xd587[3127]],2* _0x5c29x2,2* _0x5c29x2);_0x5c29x3[_0xd587[1713]]= function(_0x5c29x2){return !_0x5c29x3[_0xd587[1179]][_0xd587[1730]](_0x5c29x2)};return _0x5c29x3};mxEditor[_0xd587[202]][_0xd587[3199]]= function(){return  new mxCompactTreeLayout(this[_0xd587[1179]],this[_0xd587[3089]])};mxEditor[_0xd587[202]][_0xd587[3097]]= function(){return  new mxDefaultToolbar(null,this)};mxEditor[_0xd587[202]][_0xd587[3204]]= function(_0x5c29x2){this[_0xd587[3082]][_0xd587[176]](_0x5c29x2);mxClient[_0xd587[496]]&&  new mxDivResizer(_0x5c29x2)};mxEditor[_0xd587[202]][_0xd587[3205]]= function(_0x5c29x2){null== this[_0xd587[879]]&& (this[_0xd587[879]]= _0x5c29x2,this[_0xd587[169]](mxEvent.SAVE,mxUtils[_0xd587[885]](this,function(){var _0x5c29x2=( new Date)[_0xd587[3206]]();this[_0xd587[3207]]((mxResources[_0xd587[203]](this[_0xd587[3106]])|| this[_0xd587[3106]])+ _0xd587[3186]+ _0x5c29x2)})),this[_0xd587[169]](mxEvent.OPEN,mxUtils[_0xd587[885]](this,function(){this[_0xd587[3207]]((mxResources[_0xd587[203]](this[_0xd587[3108]])|| this[_0xd587[3108]])+ _0xd587[3186]+ this[_0xd587[3122]])})),mxClient[_0xd587[496]]&&  new mxDivResizer(_0x5c29x2))};mxEditor[_0xd587[202]][_0xd587[3207]]= function(_0x5c29x2){null!= this[_0xd587[879]]&& null!= _0x5c29x2&& (this[_0xd587[879]][_0xd587[339]]= _0x5c29x2)};mxEditor[_0xd587[202]][_0xd587[3208]]= function(_0x5c29x2){this[_0xd587[169]](mxEvent.ROOT,mxUtils[_0xd587[885]](this,function(_0x5c29x3){_0x5c29x2[_0xd587[339]]= this[_0xd587[3209]]()}));mxClient[_0xd587[496]]&&  new mxDivResizer(_0x5c29x2)};mxEditor[_0xd587[202]][_0xd587[3210]]= function(_0x5c29x2,_0x5c29x3){null!= _0x5c29x2&& ( new mxCompactTreeLayout(this[_0xd587[1179]],_0x5c29x3))[_0xd587[350]](_0x5c29x2)};mxEditor[_0xd587[202]][_0xd587[3209]]= function(){for(var _0x5c29x2=_0xd587[110],_0x5c29x3=this[_0xd587[1179]],_0x5c29x4=_0x5c29x3[_0xd587[2534]]();null!= _0x5c29x4&& null!= _0x5c29x3[_0xd587[502]]()[_0xd587[1197]](_0x5c29x3[_0xd587[502]]()[_0xd587[1197]](_0x5c29x4));){_0x5c29x3[_0xd587[2553]](_0x5c29x4)&& (_0x5c29x2= _0xd587[3211]+ _0x5c29x3[_0xd587[2454]](_0x5c29x4)+ _0x5c29x2),_0x5c29x4= _0x5c29x3[_0xd587[502]]()[_0xd587[1197]](_0x5c29x4)};return this[_0xd587[3212]]()+ _0x5c29x2};mxEditor[_0xd587[202]][_0xd587[3212]]= function(){var _0x5c29x2=this[_0xd587[1179]][_0xd587[502]]()[_0xd587[501]]();return this[_0xd587[1179]][_0xd587[2454]](_0x5c29x2)};mxEditor[_0xd587[202]][_0xd587[824]]= function(){this[_0xd587[3095]][_0xd587[824]]()};mxEditor[_0xd587[202]][_0xd587[825]]= function(){this[_0xd587[3095]][_0xd587[825]]()};mxEditor[_0xd587[202]][_0xd587[844]]= function(){var _0x5c29x2=null!= this[_0xd587[3121]]?this[_0xd587[3121]]:this[_0xd587[1179]][_0xd587[1020]];return this[_0xd587[1179]][_0xd587[844]](this[_0xd587[3213]](),_0x5c29x2)};mxEditor[_0xd587[202]][_0xd587[3213]]= function(){return this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1978]](this[_0xd587[3120]])};mxEditor[_0xd587[202]][_0xd587[392]]= function(_0x5c29x2){if(null!= _0x5c29x2){var _0x5c29x3=mxUtils[_0xd587[219]](_0x5c29x2)[_0xd587[875]]();this[_0xd587[3214]](_0x5c29x3[_0xd587[158]]);this[_0xd587[3122]]= _0x5c29x2;this[_0xd587[746]]( new mxEventObject(mxEvent.OPEN,_0xd587[3122],_0x5c29x2))}};mxEditor[_0xd587[202]][_0xd587[3214]]= function(_0x5c29x2){( new mxCodec(_0x5c29x2[_0xd587[295]]))[_0xd587[1093]](_0x5c29x2,this[_0xd587[1179]][_0xd587[502]]());this[_0xd587[3181]]()};mxEditor[_0xd587[202]][_0xd587[815]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x2= _0x5c29x2|| this[_0xd587[3215]]();if(null!= _0x5c29x2&& 0< _0x5c29x2[_0xd587[67]]){var _0x5c29x4=this[_0xd587[3216]](_0x5c29x3);this[_0xd587[3217]](_0x5c29x2,_0x5c29x4);this[_0xd587[2128]](!1)};this[_0xd587[746]]( new mxEventObject(mxEvent.SAVE,_0xd587[863],_0x5c29x2))};mxEditor[_0xd587[202]][_0xd587[3217]]= function(_0x5c29x2,_0x5c29x3){this[_0xd587[1070]]&& (_0x5c29x3= encodeURIComponent(_0x5c29x3));mxUtils[_0xd587[814]](_0x5c29x2,this[_0xd587[3123]]+ _0xd587[226]+ _0x5c29x3,mxUtils[_0xd587[885]](this,function(_0x5c29x4){this[_0xd587[746]]( new mxEventObject(mxEvent.POST,_0xd587[870],_0x5c29x4,_0xd587[863],_0x5c29x2,_0xd587[410],_0x5c29x3))}))};mxEditor[_0xd587[202]][_0xd587[3216]]= function(_0x5c29x2){_0x5c29x2= null!= _0x5c29x2?_0x5c29x2:this[_0xd587[1069]];var _0x5c29x3=( new mxCodec)[_0xd587[514]](this[_0xd587[1179]][_0xd587[502]]());return mxUtils[_0xd587[875]](_0x5c29x3,_0x5c29x2)};mxEditor[_0xd587[202]][_0xd587[3215]]= function(){return this[_0xd587[3124]]};mxEditor[_0xd587[202]][_0xd587[3142]]= function(){return this[_0xd587[3125]]};mxEditor[_0xd587[202]][_0xd587[807]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){var _0x5c29x9=null;mxClient[_0xd587[3101]]|| (_0x5c29x9=  new mxSession(this[_0xd587[1179]][_0xd587[502]](),_0x5c29x2,_0x5c29x3,_0x5c29x4),_0x5c29x9[_0xd587[169]](mxEvent.RECEIVE,mxUtils[_0xd587[885]](this,function(_0x5c29x2,_0x5c29x3){null!= _0x5c29x3[_0xd587[720]](_0xd587[252])[_0xd587[284]](_0xd587[1088])&& this[_0xd587[3181]]()})),_0x5c29x9[_0xd587[169]](mxEvent.DISCONNECT,_0x5c29x5),_0x5c29x9[_0xd587[169]](mxEvent.CONNECT,_0x5c29x5),_0x5c29x9[_0xd587[169]](mxEvent.NOTIFY,_0x5c29x5),_0x5c29x9[_0xd587[169]](mxEvent.GET,_0x5c29x5),_0x5c29x9[_0xd587[861]]());return _0x5c29x9};mxEditor[_0xd587[202]][_0xd587[3218]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=this[_0xd587[1179]][_0xd587[2434]]()[_0xd587[2054]][_0x5c29x3];this[_0xd587[1179]][_0xd587[249]]()[_0xd587[2434]]()[_0xd587[2074]](_0x5c29x3,this[_0xd587[1179]][_0xd587[2434]]()[_0xd587[2054]][_0x5c29x2]);this[_0xd587[1179]][_0xd587[2434]]()[_0xd587[2074]](_0x5c29x2,_0x5c29x4);this[_0xd587[1179]][_0xd587[802]]()};mxEditor[_0xd587[202]][_0xd587[3150]]= function(_0x5c29x2){_0x5c29x2= _0x5c29x2|| this[_0xd587[1179]][_0xd587[2452]]();null== _0x5c29x2&& (_0x5c29x2= this[_0xd587[1179]][_0xd587[2534]](),null== _0x5c29x2&& (_0x5c29x2= this[_0xd587[1179]][_0xd587[502]]()[_0xd587[501]]()));if(null!= _0x5c29x2){this[_0xd587[1179]][_0xd587[2126]](!0);var _0x5c29x3=mxUtils[_0xd587[445]](this[_0xd587[1179]][_0xd587[526]]),_0x5c29x4=_0x5c29x3[_0xd587[235]]+ 10,_0x5c29x3=_0x5c29x3[_0xd587[236]];if(null!= this[_0xd587[716]]&& !this[_0xd587[3139]]){_0x5c29x4= this[_0xd587[716]][_0xd587[730]](),_0x5c29x3= this[_0xd587[716]][_0xd587[732]]()}else {var _0x5c29x5=this[_0xd587[1179]][_0xd587[2555]](_0x5c29x2);null!= _0x5c29x5&& (_0x5c29x4+= _0x5c29x5[_0xd587[235]]+ Math[_0xd587[243]](200,_0x5c29x5[_0xd587[117]]),_0x5c29x3+= _0x5c29x5[_0xd587[236]])};this[_0xd587[3062]]();_0x5c29x2= this[_0xd587[3219]](_0x5c29x2);null!= _0x5c29x2&& (this[_0xd587[716]]=  new mxWindow(mxResources[_0xd587[203]](this[_0xd587[3110]])|| this[_0xd587[3110]],_0x5c29x2,_0x5c29x4,_0x5c29x3,this[_0xd587[3137]],this[_0xd587[3138]],!1),this[_0xd587[716]][_0xd587[175]](!0))}};mxEditor[_0xd587[202]][_0xd587[3220]]= function(){return null!= this[_0xd587[716]]};mxEditor[_0xd587[202]][_0xd587[3219]]= function(_0x5c29x2){var _0x5c29x3=this[_0xd587[1179]][_0xd587[502]](),_0x5c29x4=_0x5c29x3[_0xd587[433]](_0x5c29x2);if(mxUtils[_0xd587[1331]](_0x5c29x4)){var _0x5c29x5= new mxForm(_0xd587[716]);_0x5c29x5[_0xd587[961]](_0xd587[3222],_0x5c29x2[_0xd587[1103]]())[_0xd587[57]](_0xd587[3221],_0xd587[128]);var _0x5c29x9=null,_0x5c29xa=null,_0x5c29x12=null,_0x5c29x13=null,_0x5c29x14=null;_0x5c29x3[_0xd587[1193]](_0x5c29x2)&& (_0x5c29x9= _0x5c29x3[_0xd587[1721]](_0x5c29x2),null!= _0x5c29x9&& (_0x5c29xa= _0x5c29x5[_0xd587[961]](_0xd587[125],_0x5c29x9[_0xd587[236]]),_0x5c29x12= _0x5c29x5[_0xd587[961]](_0xd587[361],_0x5c29x9[_0xd587[235]]),_0x5c29x13= _0x5c29x5[_0xd587[961]](_0xd587[117],_0x5c29x9[_0xd587[117]]),_0x5c29x14= _0x5c29x5[_0xd587[961]](_0xd587[119],_0x5c29x9[_0xd587[119]])));for(var _0x5c29x15=_0x5c29x3[_0xd587[474]](_0x5c29x2),_0x5c29x16=_0x5c29x5[_0xd587[961]](_0xd587[3223],_0x5c29x15|| _0xd587[110]),_0x5c29x17=_0x5c29x4[_0xd587[320]],_0x5c29x18=[],_0x5c29x4=0;_0x5c29x4< _0x5c29x17[_0xd587[67]];_0x5c29x4++){_0x5c29x18[_0x5c29x4]= _0x5c29x5[_0xd587[968]](_0x5c29x17[_0x5c29x4][_0xd587[301]],_0x5c29x17[_0x5c29x4][_0xd587[318]],_0xd587[685]== _0x5c29x17[_0x5c29x4][_0xd587[301]]?4:2)};_0x5c29x4= mxUtils[_0xd587[885]](this,function(){this[_0xd587[3062]]();_0x5c29x3[_0xd587[473]]();try{null!= _0x5c29x9&& (_0x5c29x9= _0x5c29x9[_0xd587[238]](),_0x5c29x9[_0xd587[235]]= parseFloat(_0x5c29x12[_0xd587[131]]),_0x5c29x9[_0xd587[236]]= parseFloat(_0x5c29xa[_0xd587[131]]),_0x5c29x9[_0xd587[117]]= parseFloat(_0x5c29x13[_0xd587[131]]),_0x5c29x9[_0xd587[119]]= parseFloat(_0x5c29x14[_0xd587[131]]),_0x5c29x3[_0xd587[1724]](_0x5c29x2,_0x5c29x9));0< _0x5c29x16[_0xd587[131]][_0xd587[67]]?_0x5c29x3[_0xd587[475]](_0x5c29x2,_0x5c29x16[_0xd587[131]]):_0x5c29x3[_0xd587[475]](_0x5c29x2,null);for(var _0x5c29x4=0;_0x5c29x4< _0x5c29x17[_0xd587[67]];_0x5c29x4++){var _0x5c29x5= new mxCellAttributeChange(_0x5c29x2,_0x5c29x17[_0x5c29x4][_0xd587[301]],_0x5c29x18[_0x5c29x4][_0xd587[131]]);_0x5c29x3[_0xd587[350]](_0x5c29x5)};this[_0xd587[1179]][_0xd587[2455]](_0x5c29x2)&& this[_0xd587[1179]][_0xd587[858]](_0x5c29x2)}finally{_0x5c29x3[_0xd587[476]]()}});_0x5c29x15= mxUtils[_0xd587[885]](this,function(){this[_0xd587[3062]]()});_0x5c29x5[_0xd587[956]](_0x5c29x4,_0x5c29x15);return _0x5c29x5[_0xd587[116]]};return null};mxEditor[_0xd587[202]][_0xd587[3062]]= function(){null!= this[_0xd587[716]]&& (this[_0xd587[716]][_0xd587[515]](),this[_0xd587[716]]= null)};mxEditor[_0xd587[202]][_0xd587[3175]]= function(){if(null== this[_0xd587[3112]]){var _0x5c29x2=document[_0xd587[55]](_0xd587[485]);_0x5c29x2[_0xd587[124]][_0xd587[549]]= _0xd587[952];_0x5c29x2[_0xd587[124]][_0xd587[357]]= _0xd587[550];var _0x5c29x3=document[_0xd587[112]][_0xd587[159]],_0x5c29x3= new mxWindow(mxResources[_0xd587[203]](this[_0xd587[3111]])|| this[_0xd587[3111]],_0x5c29x2,_0x5c29x3- 220,this[_0xd587[3132]],200);_0x5c29x3[_0xd587[164]](!0);_0x5c29x3[_0xd587[165]]=  !1;var _0x5c29x4=mxUtils[_0xd587[885]](this,function(_0x5c29x3){mxEvent[_0xd587[762]](_0x5c29x2);_0x5c29x2[_0xd587[339]]= _0xd587[110];this[_0xd587[3224]](_0x5c29x2)});this[_0xd587[1179]][_0xd587[502]]()[_0xd587[169]](mxEvent.CHANGE,_0x5c29x4);this[_0xd587[1179]][_0xd587[2435]]()[_0xd587[169]](mxEvent.CHANGE,_0x5c29x4);this[_0xd587[1179]][_0xd587[169]](mxEvent.ROOT,_0x5c29x4);null!= this[_0xd587[3131]]&& _0x5c29x3[_0xd587[951]](this[_0xd587[3131]]);this[_0xd587[3112]]= _0x5c29x3;this[_0xd587[3224]](_0x5c29x2)};this[_0xd587[3112]][_0xd587[175]](!0)};mxEditor[_0xd587[202]][_0xd587[3225]]= function(_0x5c29x2){null!= this[_0xd587[3112]]&& (_0x5c29x2= this[_0xd587[3112]][_0xd587[905]],mxEvent[_0xd587[762]](_0x5c29x2),_0x5c29x2[_0xd587[339]]= _0xd587[110],this[_0xd587[3224]](_0x5c29x2))};mxEditor[_0xd587[202]][_0xd587[3224]]= function(_0x5c29x2){};mxEditor[_0xd587[202]][_0xd587[3177]]= function(_0x5c29x2){if(null== this[_0xd587[2719]]){var _0x5c29x3=document[_0xd587[55]](_0xd587[389]);_0x5c29x3[_0xd587[57]](_0xd587[390],mxResources[_0xd587[203]](_0xd587[3134])|| this[_0xd587[3134]]);_0x5c29x3[_0xd587[57]](_0xd587[119],_0xd587[118]);_0x5c29x3[_0xd587[57]](_0xd587[117],_0xd587[118]);_0x5c29x3[_0xd587[57]](_0xd587[3226],_0xd587[468]);_0x5c29x3[_0xd587[124]][_0xd587[1028]]= _0xd587[1391];_0x5c29x2= document[_0xd587[112]][_0xd587[159]];var _0x5c29x4=document[_0xd587[112]][_0xd587[157]]|| document[_0xd587[158]][_0xd587[157]],_0x5c29x5= new mxWindow(mxResources[_0xd587[203]](this[_0xd587[3113]])|| this[_0xd587[3113]],_0x5c29x3,(_0x5c29x2- this[_0xd587[3135]])/ 2,(_0x5c29x4- this[_0xd587[3136]])/ 3,this[_0xd587[3135]],this[_0xd587[3136]]);_0x5c29x5[_0xd587[161]](!0);_0x5c29x5[_0xd587[164]](!0);_0x5c29x5[_0xd587[165]]=  !1;_0x5c29x5[_0xd587[163]](!0);null!= this[_0xd587[3133]]&& _0x5c29x5[_0xd587[951]](this[_0xd587[3133]]);mxClient[_0xd587[133]]&& (_0x5c29x2= function(_0x5c29x2){_0x5c29x3[_0xd587[57]](_0xd587[119],_0x5c29x5[_0xd587[485]][_0xd587[167]]- 26+ _0xd587[168])},_0x5c29x5[_0xd587[169]](mxEvent.RESIZE_END,_0x5c29x2),_0x5c29x5[_0xd587[169]](mxEvent.MAXIMIZE,_0x5c29x2),_0x5c29x5[_0xd587[169]](mxEvent.NORMALIZE,_0x5c29x2),_0x5c29x5[_0xd587[169]](mxEvent.SHOW,_0x5c29x2));this[_0xd587[2719]]= _0x5c29x5};this[_0xd587[2719]][_0xd587[175]](!0)};mxEditor[_0xd587[202]][_0xd587[3179]]= function(){if(null== this[_0xd587[2136]]){var _0x5c29x2=document[_0xd587[55]](_0xd587[485]);_0x5c29x2[_0xd587[124]][_0xd587[277]]= _0xd587[188];_0x5c29x2[_0xd587[124]][_0xd587[117]]= _0xd587[118];_0x5c29x2[_0xd587[124]][_0xd587[119]]= _0xd587[118];_0x5c29x2[_0xd587[124]][_0xd587[1537]]= _0xd587[1391];_0x5c29x2[_0xd587[124]][_0xd587[270]]= _0xd587[582];var _0x5c29x3= new mxWindow(mxResources[_0xd587[203]](this[_0xd587[3114]])|| this[_0xd587[3114]],_0x5c29x2,600,480,200,200,!1),_0x5c29x4= new mxOutline(this[_0xd587[1179]],_0x5c29x2);_0x5c29x3[_0xd587[164]](!0);_0x5c29x3[_0xd587[163]](!0);_0x5c29x3[_0xd587[165]]=  !1;_0x5c29x3[_0xd587[169]](mxEvent.RESIZE_END,function(){_0x5c29x4[_0xd587[2729]]()});this[_0xd587[2136]]= _0x5c29x3;this[_0xd587[2136]][_0xd587[2136]]= _0x5c29x4};this[_0xd587[2136]][_0xd587[175]](!0);this[_0xd587[2136]][_0xd587[2136]][_0xd587[2729]](!0)};mxEditor[_0xd587[202]][_0xd587[3086]]= function(_0x5c29x2){_0xd587[804]== _0x5c29x2?(this[_0xd587[1179]][_0xd587[2316]][_0xd587[2840]]=  !1,this[_0xd587[1179]][_0xd587[1995]](!1)):_0xd587[807]== _0x5c29x2?(this[_0xd587[1179]][_0xd587[2316]][_0xd587[2840]]=  !1,this[_0xd587[1179]][_0xd587[1995]](!0)):_0xd587[796]== _0x5c29x2&& (this[_0xd587[1179]][_0xd587[2316]][_0xd587[2840]]=  !0,this[_0xd587[1179]][_0xd587[1995]](!1))};mxEditor[_0xd587[202]][_0xd587[3195]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){this[_0xd587[3094]][_0xd587[3065]](this,_0x5c29x2,_0x5c29x3,_0x5c29x4)};mxEditor[_0xd587[202]][_0xd587[2503]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=null;if(null!= this[_0xd587[2075]]){_0x5c29x4= this[_0xd587[1179]][_0xd587[502]]()[_0xd587[1978]](this[_0xd587[2075]])}else {_0x5c29x4=  new mxCell(_0xd587[110]);_0x5c29x4[_0xd587[1994]](!0);var _0x5c29x5= new mxGeometry;_0x5c29x5[_0xd587[1500]]=  !0;_0x5c29x4[_0xd587[1724]](_0x5c29x5)};_0x5c29x5= this[_0xd587[2291]]();null!= _0x5c29x5&& _0x5c29x4[_0xd587[475]](_0x5c29x5);return _0x5c29x4};mxEditor[_0xd587[202]][_0xd587[2291]]= function(){return this[_0xd587[3119]]};mxEditor[_0xd587[202]][_0xd587[3227]]= function(_0x5c29x2){return null!= this[_0xd587[3093]]&& 0< this[_0xd587[3093]][_0xd587[67]]&& this[_0xd587[1179]][_0xd587[1730]](_0x5c29x2)?this[_0xd587[3093]][this[_0xd587[3130]]++ % this[_0xd587[3093]][_0xd587[67]]]:null};mxEditor[_0xd587[202]][_0xd587[3228]]= function(_0x5c29x2){if(null!= this[_0xd587[3100]]){var _0x5c29x3=this[_0xd587[3227]](_0x5c29x2);null!= _0x5c29x3&& _0x5c29x2[_0xd587[475]](_0x5c29x2[_0xd587[474]]()+ _0xd587[471]+ this[_0xd587[3100]]+ _0xd587[226]+ _0x5c29x3)}};mxEditor[_0xd587[202]][_0xd587[817]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){for(var _0x5c29x9=this[_0xd587[1179]][_0xd587[502]]();null!= _0x5c29x2&& !this[_0xd587[1179]][_0xd587[2685]](_0x5c29x2);){_0x5c29x2= _0x5c29x9[_0xd587[1197]](_0x5c29x2)};_0x5c29x2= null!= _0x5c29x2?_0x5c29x2:this[_0xd587[1179]][_0xd587[2461]](_0x5c29x4,_0x5c29x5);var _0x5c29xa=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[255]],_0x5c29x12=_0x5c29x9[_0xd587[1721]](_0x5c29x3),_0x5c29x13=_0x5c29x9[_0xd587[1721]](_0x5c29x2);if(this[_0xd587[1179]][_0xd587[1730]](_0x5c29x3)&& !this[_0xd587[1179]][_0xd587[2412]]){_0x5c29x2= null}else {if(null== _0x5c29x2&& this[_0xd587[3116]]){return null};if(null!= _0x5c29x2&& null!= _0x5c29x13){var _0x5c29x14=this[_0xd587[1179]][_0xd587[249]]()[_0xd587[248]](_0x5c29x2);if(null!= _0x5c29x14){if(_0x5c29x4-= _0x5c29x14[_0xd587[2078]][_0xd587[235]]* _0x5c29xa,_0x5c29x5-= _0x5c29x14[_0xd587[2078]][_0xd587[236]]* _0x5c29xa,this[_0xd587[1179]][_0xd587[3229]]){var _0x5c29x13=_0x5c29x12[_0xd587[117]],_0x5c29x15=_0x5c29x12[_0xd587[119]],_0x5c29x16=_0x5c29x14[_0xd587[235]]+ _0x5c29x14[_0xd587[117]];_0x5c29x4+ _0x5c29x13> _0x5c29x16&& (_0x5c29x4-= _0x5c29x4+ _0x5c29x13- _0x5c29x16);_0x5c29x16= _0x5c29x14[_0xd587[236]]+ _0x5c29x14[_0xd587[119]];_0x5c29x5+ _0x5c29x15> _0x5c29x16&& (_0x5c29x5-= _0x5c29x5+ _0x5c29x15- _0x5c29x16)}}else {null!= _0x5c29x13&& (_0x5c29x4-= _0x5c29x13[_0xd587[235]]* _0x5c29xa,_0x5c29x5-= _0x5c29x13[_0xd587[236]]* _0x5c29xa)}}};_0x5c29x12= _0x5c29x12[_0xd587[238]]();_0x5c29x12[_0xd587[235]]= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x4/ _0x5c29xa- this[_0xd587[1179]][_0xd587[249]]()[_0xd587[513]][_0xd587[235]]- this[_0xd587[1179]][_0xd587[1020]]/ 2);_0x5c29x12[_0xd587[236]]= this[_0xd587[1179]][_0xd587[1021]](_0x5c29x5/ _0x5c29xa- this[_0xd587[1179]][_0xd587[249]]()[_0xd587[513]][_0xd587[236]]- this[_0xd587[1179]][_0xd587[1020]]/ 2);_0x5c29x3[_0xd587[1724]](_0x5c29x12);null== _0x5c29x2&& (_0x5c29x2= this[_0xd587[1179]][_0xd587[902]]());this[_0xd587[3228]](_0x5c29x3);this[_0xd587[746]]( new mxEventObject(mxEvent.BEFORE_ADD_VERTEX,_0xd587[1988],_0x5c29x3,_0xd587[1101],_0x5c29x2));_0x5c29x9[_0xd587[473]]();try{_0x5c29x3= this[_0xd587[1179]][_0xd587[2103]](_0x5c29x3,_0x5c29x2),null!= _0x5c29x3&& (this[_0xd587[1179]][_0xd587[2509]](_0x5c29x3),this[_0xd587[746]]( new mxEventObject(mxEvent.ADD_VERTEX,_0xd587[1988],_0x5c29x3)))}finally{_0x5c29x9[_0xd587[476]]()};null!= _0x5c29x3&& (this[_0xd587[1179]][_0xd587[2450]](_0x5c29x3),this[_0xd587[1179]][_0xd587[2564]](_0x5c29x3),this[_0xd587[746]]( new mxEventObject(mxEvent.AFTER_ADD_VERTEX,_0xd587[1988],_0x5c29x3)));return _0x5c29x3};mxEditor[_0xd587[202]][_0xd587[515]]= function(){this[_0xd587[2717]]|| (this[_0xd587[2717]]=  !0,null!= this[_0xd587[3112]]&& this[_0xd587[3112]][_0xd587[515]](),null!= this[_0xd587[2136]]&& this[_0xd587[2136]][_0xd587[515]](),null!= this[_0xd587[716]]&& this[_0xd587[716]][_0xd587[515]](),null!= this[_0xd587[3098]]&& this[_0xd587[3098]][_0xd587[515]](),null!= this[_0xd587[3203]]&& this[_0xd587[3203]][_0xd587[515]](),null!= this[_0xd587[3082]]&& this[_0xd587[3082]][_0xd587[515]](),null!= this[_0xd587[1179]]&& this[_0xd587[1179]][_0xd587[515]](),this[_0xd587[3118]]= this[_0xd587[879]]= null)};var mxCodecRegistry={codecs:[],aliases:[],register:function(_0x5c29x2){if(null!= _0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[718]]();mxCodecRegistry[_0xd587[3230]][_0x5c29x3]= _0x5c29x2;var _0x5c29x4=mxUtils[_0xd587[197]](_0x5c29x2[_0xd587[3231]][_0xd587[196]]);_0x5c29x4!= _0x5c29x3&& mxCodecRegistry[_0xd587[3232]](_0x5c29x4,_0x5c29x3)};return _0x5c29x2},addAlias:function(_0x5c29x2,_0x5c29x3){mxCodecRegistry[_0xd587[3233]][_0x5c29x2]= _0x5c29x3},getCodec:function(_0x5c29x2){var _0x5c29x3=null;if(null!= _0x5c29x2){var _0x5c29x3=mxUtils[_0xd587[197]](_0x5c29x2),_0x5c29x4=mxCodecRegistry[_0xd587[3233]][_0x5c29x3];null!= _0x5c29x4&& (_0x5c29x3= _0x5c29x4);_0x5c29x3= mxCodecRegistry[_0xd587[3230]][_0x5c29x3];if(null== _0x5c29x3){try{_0x5c29x3=  new mxObjectCodec( new _0x5c29x2),mxCodecRegistry[_0xd587[3234]](_0x5c29x3)}catch(d){}}};return _0x5c29x3}};function mxCodec(_0x5c29x2){this[_0xd587[395]]= _0x5c29x2|| mxUtils[_0xd587[306]]();this[_0xd587[68]]= []}mxCodec[_0xd587[202]][_0xd587[395]]= null;mxCodec[_0xd587[202]][_0xd587[68]]= null;mxCodec[_0xd587[202]][_0xd587[3235]]=  !1;mxCodec[_0xd587[202]][_0xd587[1104]]= function(_0x5c29x2,_0x5c29x3){return this[_0xd587[68]][_0x5c29x2]= _0x5c29x3};mxCodec[_0xd587[202]][_0xd587[3236]]= function(_0x5c29x2){var _0x5c29x3=null;null!= _0x5c29x2&& (_0x5c29x3= this[_0xd587[68]][_0x5c29x2],null== _0x5c29x3&& (_0x5c29x3= this[_0xd587[1060]](_0x5c29x2),null== _0x5c29x3&& (_0x5c29x2= this[_0xd587[1362]](_0x5c29x2),null!= _0x5c29x2&& (_0x5c29x3= this[_0xd587[1093]](_0x5c29x2)))));return _0x5c29x3};mxCodec[_0xd587[202]][_0xd587[1060]]= function(_0x5c29x2){return null};mxCodec[_0xd587[202]][_0xd587[1362]]= function(_0x5c29x2,_0x5c29x3){return mxUtils[_0xd587[290]](this[_0xd587[395]][_0xd587[158]],null!= _0x5c29x3?_0x5c29x3:_0xd587[1363],_0x5c29x2)};mxCodec[_0xd587[202]][_0xd587[1103]]= function(_0x5c29x2){var _0x5c29x3=null;null!= _0x5c29x2&& (_0x5c29x3= this[_0xd587[3237]](_0x5c29x2),null== _0x5c29x3&& _0x5c29x2 instanceof  mxCell&& (_0x5c29x3= _0x5c29x2[_0xd587[1103]](),null== _0x5c29x3&& (_0x5c29x3= mxCellPath[_0xd587[385]](_0x5c29x2),0== _0x5c29x3[_0xd587[67]]&& (_0x5c29x3= _0xd587[813]))));return _0x5c29x3};mxCodec[_0xd587[202]][_0xd587[3237]]= function(_0x5c29x2){return null};mxCodec[_0xd587[202]][_0xd587[514]]= function(_0x5c29x2){var _0x5c29x3=null;if(null!= _0x5c29x2&& null!= _0x5c29x2[_0xd587[196]]){var _0x5c29x4=mxCodecRegistry[_0xd587[3238]](_0x5c29x2[_0xd587[196]]);null!= _0x5c29x4?_0x5c29x3= _0x5c29x4[_0xd587[514]](this,_0x5c29x2):mxUtils[_0xd587[1331]](_0x5c29x2)?_0x5c29x3= mxClient[_0xd587[80]]?_0x5c29x2[_0xd587[511]](!0):this[_0xd587[395]][_0xd587[3239]](_0x5c29x2,!0):mxLog[_0xd587[283]](_0xd587[3240]+ mxUtils[_0xd587[197]](_0x5c29x2[_0xd587[196]]))};return _0x5c29x3};mxCodec[_0xd587[202]][_0xd587[1093]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=null;if(null!= _0x5c29x2&& _0x5c29x2[_0xd587[288]]== mxConstants[_0xd587[289]]){var _0x5c29x5=null;try{_0x5c29x5= eval(_0x5c29x2[_0xd587[301]])}catch(e){};try{var _0x5c29xa=mxCodecRegistry[_0xd587[3238]](_0x5c29x5);null!= _0x5c29xa?_0x5c29x4= _0x5c29xa[_0xd587[1093]](this,_0x5c29x2,_0x5c29x3):(_0x5c29x4= _0x5c29x2[_0xd587[511]](!0),_0x5c29x4[_0xd587[1390]](_0xd587[3069]))}catch(g){mxLog[_0xd587[143]](_0xd587[3241]+ _0x5c29x2[_0xd587[301]]+ _0xd587[3186]+ g[_0xd587[281]])}};return _0x5c29x4};mxCodec[_0xd587[202]][_0xd587[3242]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x3[_0xd587[62]](this[_0xd587[514]](_0x5c29x2));if(null== _0x5c29x4|| _0x5c29x4){_0x5c29x4= _0x5c29x2[_0xd587[262]]();for(var _0x5c29x5=0;_0x5c29x5< _0x5c29x4;_0x5c29x5++){this[_0xd587[3242]](_0x5c29x2[_0xd587[263]](_0x5c29x5),_0x5c29x3)}}};mxCodec[_0xd587[202]][_0xd587[3243]]= function(_0x5c29x2){return null!= _0x5c29x2&& _0xd587[279]==  typeof _0x5c29x2[_0xd587[3243]]?_0x5c29x2[_0xd587[3243]]():!1};mxCodec[_0xd587[202]][_0xd587[3244]]= function(_0x5c29x2,_0x5c29x3){_0x5c29x3= null!= _0x5c29x3?_0x5c29x3:!0;var _0x5c29x4=null;if(null!= _0x5c29x2&& _0x5c29x2[_0xd587[288]]== mxConstants[_0xd587[289]]){_0x5c29x4= mxCodecRegistry[_0xd587[3238]](_0x5c29x2[_0xd587[301]]);if(!this[_0xd587[3243]](_0x5c29x4)){for(var _0x5c29x5=_0x5c29x2[_0xd587[285]];null!= _0x5c29x5&& !this[_0xd587[3243]](_0x5c29x4);){_0x5c29x4= mxCodecRegistry[_0xd587[3238]](_0x5c29x5[_0xd587[301]]),_0x5c29x5= _0x5c29x5[_0xd587[287]]}};this[_0xd587[3243]](_0x5c29x4)|| (_0x5c29x4= mxCodecRegistry[_0xd587[3238]](mxCell));_0x5c29x4= _0x5c29x4[_0xd587[1093]](this,_0x5c29x2);_0x5c29x3&& this[_0xd587[3245]](_0x5c29x4)};return _0x5c29x4};mxCodec[_0xd587[202]][_0xd587[3245]]= function(_0x5c29x2){var _0x5c29x3=_0x5c29x2[_0xd587[1101]],_0x5c29x4=_0x5c29x2[_0xd587[1709]](!0),_0x5c29x5=_0x5c29x2[_0xd587[1709]](!1);_0x5c29x2[_0xd587[1957]](null,!1);_0x5c29x2[_0xd587[1957]](null,!0);_0x5c29x2[_0xd587[1101]]= null;null!= _0x5c29x3&& _0x5c29x3[_0xd587[1937]](_0x5c29x2);null!= _0x5c29x4&& _0x5c29x4[_0xd587[1960]](_0x5c29x2,!0);null!= _0x5c29x5&& _0x5c29x5[_0xd587[1960]](_0x5c29x2,!1)};mxCodec[_0xd587[202]][_0xd587[57]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){null!= _0x5c29x3&& null!= _0x5c29x4&& _0x5c29x2[_0xd587[57]](_0x5c29x3,_0x5c29x4)};function mxObjectCodec(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){this[_0xd587[3231]]= _0x5c29x2;this[_0xd587[3246]]= null!= _0x5c29x3?_0x5c29x3:[];this[_0xd587[3247]]= null!= _0x5c29x4?_0x5c29x4:[];this[_0xd587[3248]]= null!= _0x5c29x5?_0x5c29x5:[];this[_0xd587[3249]]= {};for(var _0x5c29x9 in this[_0xd587[3248]]){this[_0xd587[3249]][this[_0xd587[3248]][_0x5c29x9]]= _0x5c29x9}}mxObjectCodec[_0xd587[202]][_0xd587[3231]]= null;mxObjectCodec[_0xd587[202]][_0xd587[3246]]= null;mxObjectCodec[_0xd587[202]][_0xd587[3247]]= null;mxObjectCodec[_0xd587[202]][_0xd587[3248]]= null;mxObjectCodec[_0xd587[202]][_0xd587[3249]]= null;mxObjectCodec[_0xd587[202]][_0xd587[718]]= function(){return mxUtils[_0xd587[197]](this[_0xd587[3231]][_0xd587[196]])};mxObjectCodec[_0xd587[202]][_0xd587[3250]]= function(){return  new this[_0xd587[3231]][_0xd587[196]]};mxObjectCodec[_0xd587[202]][_0xd587[3251]]= function(_0x5c29x2){if(null!= _0x5c29x2){var _0x5c29x3=this[_0xd587[3249]][_0x5c29x2];null!= _0x5c29x3&& (_0x5c29x2= _0x5c29x3)};return _0x5c29x2};mxObjectCodec[_0xd587[202]][_0xd587[3252]]= function(_0x5c29x2){if(null!= _0x5c29x2){var _0x5c29x3=this[_0xd587[3248]][_0x5c29x2];null!= _0x5c29x3&& (_0x5c29x2= _0x5c29x3)};return _0x5c29x2};mxObjectCodec[_0xd587[202]][_0xd587[3253]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){return _0x5c29x3== mxObjectIdentity[_0xd587[195]]|| 0<= mxUtils[_0xd587[2]](this[_0xd587[3246]],_0x5c29x3)};mxObjectCodec[_0xd587[202]][_0xd587[3254]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){return 0<= mxUtils[_0xd587[2]](this[_0xd587[3247]],_0x5c29x3)};mxObjectCodec[_0xd587[202]][_0xd587[514]]= function(_0x5c29x2,_0x5c29x3){var _0x5c29x4=_0x5c29x2[_0xd587[395]][_0xd587[55]](this[_0xd587[718]]());_0x5c29x3= this[_0xd587[3255]](_0x5c29x2,_0x5c29x3,_0x5c29x4);this[_0xd587[3256]](_0x5c29x2,_0x5c29x3,_0x5c29x4);return this[_0xd587[3257]](_0x5c29x2,_0x5c29x3,_0x5c29x4)};mxObjectCodec[_0xd587[202]][_0xd587[3256]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x2[_0xd587[57]](_0x5c29x4,_0xd587[1363],_0x5c29x2[_0xd587[1103]](_0x5c29x3));for(var _0x5c29x5 in _0x5c29x3){var _0x5c29x9=_0x5c29x5,_0x5c29xa=_0x5c29x3[_0x5c29x9];null!= _0x5c29xa&& !this[_0xd587[3253]](_0x5c29x3,_0x5c29x9,_0x5c29xa,!0)&& (mxUtils[_0xd587[1946]](_0x5c29x9)&& (_0x5c29x9= null),this[_0xd587[3258]](_0x5c29x2,_0x5c29x3,_0x5c29x9,_0x5c29xa,_0x5c29x4))}};mxObjectCodec[_0xd587[202]][_0xd587[3258]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){if(null!= _0x5c29x5){if(this[_0xd587[3254]](_0x5c29x3,_0x5c29x4,_0x5c29x5,!0)){var _0x5c29xa=_0x5c29x2[_0xd587[1103]](_0x5c29x5);if(null== _0x5c29xa){mxLog[_0xd587[283]](_0xd587[3259]+ this[_0xd587[718]]()+ _0xd587[87]+ _0x5c29x4+ _0xd587[226]+ _0x5c29x5);return};_0x5c29x5= _0x5c29xa};_0x5c29xa= this[_0xd587[3231]][_0x5c29x4];if(null== _0x5c29x4|| _0x5c29x2[_0xd587[3235]]|| _0x5c29xa!= _0x5c29x5){_0x5c29x4= this[_0xd587[3252]](_0x5c29x4),this[_0xd587[3260]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9)}}};mxObjectCodec[_0xd587[202]][_0xd587[3260]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0xd587[194]!=  typeof _0x5c29x5?this[_0xd587[3261]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9):this[_0xd587[3262]](_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9)};mxObjectCodec[_0xd587[202]][_0xd587[3261]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x5= this[_0xd587[3263]](_0x5c29x5);null== _0x5c29x4?(_0x5c29x3= _0x5c29x2[_0xd587[395]][_0xd587[55]](_0xd587[99]),_0xd587[279]==  typeof _0x5c29x5?_0x5c29x3[_0xd587[62]](_0x5c29x2[_0xd587[395]][_0xd587[344]](_0x5c29x5)):_0x5c29x2[_0xd587[57]](_0x5c29x3,_0xd587[131],_0x5c29x5),_0x5c29x9[_0xd587[62]](_0x5c29x3)):_0xd587[279]!=  typeof _0x5c29x5&& _0x5c29x2[_0xd587[57]](_0x5c29x9,_0x5c29x4,_0x5c29x5)};mxObjectCodec[_0xd587[202]][_0xd587[3262]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5,_0x5c29x9){_0x5c29x2= _0x5c29x2[_0xd587[514]](_0x5c29x5);null!= _0x5c29x2?(null!= _0x5c29x4&& _0x5c29x2[_0xd587[57]](_0xd587[3069],_0x5c29x4),_0x5c29x9[_0xd587[62]](_0x5c29x2)):mxLog[_0xd587[283]](_0xd587[3264]+ this[_0xd587[718]]()+ _0xd587[87]+ _0x5c29x4+ _0xd587[3186]+ _0x5c29x5)};mxObjectCodec[_0xd587[202]][_0xd587[3263]]= function(_0x5c29x2){if(_0xd587[82]==  typeof _0x5c29x2[_0xd587[67]]&& (!0== _0x5c29x2|| !1== _0x5c29x2)){_0x5c29x2= !0== _0x5c29x2?_0xd587[500]:_0xd587[468]};return _0x5c29x2};mxObjectCodec[_0xd587[202]][_0xd587[3265]]= function(_0x5c29x2){mxUtils[_0xd587[1946]](_0x5c29x2)&& (_0x5c29x2= parseFloat(_0x5c29x2));return _0x5c29x2};mxObjectCodec[_0xd587[202]][_0xd587[3255]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return _0x5c29x3};mxObjectCodec[_0xd587[202]][_0xd587[3257]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return _0x5c29x4};mxObjectCodec[_0xd587[202]][_0xd587[1093]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=_0x5c29x3[_0xd587[284]](_0xd587[1363]),_0x5c29x9=_0x5c29x2[_0xd587[68]][_0x5c29x5];null== _0x5c29x9&& (_0x5c29x9= _0x5c29x4|| this[_0xd587[3250]](),null!= _0x5c29x5&& _0x5c29x2[_0xd587[1104]](_0x5c29x5,_0x5c29x9));_0x5c29x3= this[_0xd587[3266]](_0x5c29x2,_0x5c29x3,_0x5c29x9);this[_0xd587[3267]](_0x5c29x2,_0x5c29x3,_0x5c29x9);return this[_0xd587[3268]](_0x5c29x2,_0x5c29x3,_0x5c29x9)};mxObjectCodec[_0xd587[202]][_0xd587[3267]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){null!= _0x5c29x3&& (this[_0xd587[3269]](_0x5c29x2,_0x5c29x3,_0x5c29x4),this[_0xd587[3270]](_0x5c29x2,_0x5c29x3,_0x5c29x4))};mxObjectCodec[_0xd587[202]][_0xd587[3269]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x3= _0x5c29x3[_0xd587[320]];if(null!= _0x5c29x3){for(var _0x5c29x5=0;_0x5c29x5< _0x5c29x3[_0xd587[67]];_0x5c29x5++){this[_0xd587[3271]](_0x5c29x2,_0x5c29x3[_0x5c29x5],_0x5c29x4)}}};mxObjectCodec[_0xd587[202]][_0xd587[3271]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=_0x5c29x3[_0xd587[301]];if(_0xd587[3069]!= _0x5c29x5&& _0xd587[1363]!= _0x5c29x5){_0x5c29x3= this[_0xd587[3265]](_0x5c29x3[_0xd587[318]]);var _0x5c29x9=this[_0xd587[3251]](_0x5c29x5);if(this[_0xd587[3254]](_0x5c29x4,_0x5c29x9,_0x5c29x3,!1)){_0x5c29x2= _0x5c29x2[_0xd587[3236]](_0x5c29x3);if(null== _0x5c29x2){mxLog[_0xd587[283]](_0xd587[3272]+ this[_0xd587[718]]()+ _0xd587[87]+ _0x5c29x5+ _0xd587[226]+ _0x5c29x3);return};_0x5c29x3= _0x5c29x2};this[_0xd587[3253]](_0x5c29x4,_0x5c29x5,_0x5c29x3,!1)|| (_0x5c29x4[_0x5c29x5]= _0x5c29x3)}};mxObjectCodec[_0xd587[202]][_0xd587[3270]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){for(_0x5c29x3= _0x5c29x3[_0xd587[285]];null!= _0x5c29x3;){var _0x5c29x5=_0x5c29x3[_0xd587[287]];_0x5c29x3[_0xd587[288]]== mxConstants[_0xd587[289]]&& !this[_0xd587[3273]](_0x5c29x2,_0x5c29x3,_0x5c29x4)&& this[_0xd587[3274]](_0x5c29x2,_0x5c29x3,_0x5c29x4);_0x5c29x3= _0x5c29x5}};mxObjectCodec[_0xd587[202]][_0xd587[3274]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){var _0x5c29x5=this[_0xd587[3251]](_0x5c29x3[_0xd587[284]](_0xd587[3069]));if(null== _0x5c29x5|| !this[_0xd587[3253]](_0x5c29x4,_0x5c29x5,_0x5c29x3,!1)){var _0x5c29x9=this[_0xd587[3275]](_0x5c29x4,_0x5c29x5,_0x5c29x3),_0x5c29xa=null;_0xd587[99]== _0x5c29x3[_0xd587[301]]?(_0x5c29xa= _0x5c29x3[_0xd587[284]](_0xd587[131]),null== _0x5c29xa&& (_0x5c29xa= mxUtils[_0xd587[1545]](mxUtils[_0xd587[329]](_0x5c29x3)))):_0x5c29xa= _0x5c29x2[_0xd587[1093]](_0x5c29x3,_0x5c29x9);this[_0xd587[3276]](_0x5c29x4,_0x5c29x5,_0x5c29xa,_0x5c29x9)}};mxObjectCodec[_0xd587[202]][_0xd587[3275]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){_0x5c29x2= _0x5c29x2[_0x5c29x3];_0x5c29x2 instanceof  Array&& 0< _0x5c29x2[_0xd587[67]]&& (_0x5c29x2= null);return _0x5c29x2};mxObjectCodec[_0xd587[202]][_0xd587[3276]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4,_0x5c29x5){null!= _0x5c29x4&& _0x5c29x4!= _0x5c29x5&& (null!= _0x5c29x3&& 0< _0x5c29x3[_0xd587[67]]?_0x5c29x2[_0x5c29x3]= _0x5c29x4:_0x5c29x2[_0xd587[207]](_0x5c29x4))};mxObjectCodec[_0xd587[202]][_0xd587[3273]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){if(_0xd587[3277]== _0x5c29x3[_0xd587[301]]){_0x5c29x3= _0x5c29x3[_0xd587[284]](_0xd587[298]);if(null!= _0x5c29x3){try{var _0x5c29x5=mxUtils[_0xd587[219]](_0x5c29x3)[_0xd587[874]]();null!= _0x5c29x5&& _0x5c29x2[_0xd587[1093]](_0x5c29x5,_0x5c29x4)}catch(e){}};return !0};return !1};mxObjectCodec[_0xd587[202]][_0xd587[3266]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return _0x5c29x3};mxObjectCodec[_0xd587[202]][_0xd587[3268]]= function(_0x5c29x2,_0x5c29x3,_0x5c29x4){return _0x5c29x4};mxCodecRegistry[_0xd587[3234]](function(){var _0x5c29x2= new mxObjectCodec( new mxCell,[_0xd587[1954],_0xd587[1842],_0xd587[1211],_0xd587[1991]],[_0xd587[1101],_0xd587[1097],_0xd587[772]]);_0x5c29x2[_0xd587[3243]]= function(){return !0};_0x5c29x2[_0xd587[3253]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5,_0x5c29x9){return mxObjectCodec[_0xd587[202]][_0xd587[3253]][_0xd587[183]](this,arguments)|| _0x5c29x9&& _0xd587[131]== _0x5c29x4&& _0x5c29x5[_0xd587[288]]== mxConstants[_0xd587[289]]};_0x5c29x2[_0xd587[3257]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){if(null!= _0x5c29x4[_0xd587[131]]&& _0x5c29x4[_0xd587[131]][_0xd587[288]]== mxConstants[_0xd587[289]]){var _0x5c29x9=_0x5c29x5;_0x5c29x5= mxClient[_0xd587[80]]?_0x5c29x4[_0xd587[131]][_0xd587[511]](!0):_0x5c29x2[_0xd587[395]][_0xd587[3239]](_0x5c29x4[_0xd587[131]],!0);_0x5c29x5[_0xd587[62]](_0x5c29x9);_0x5c29x2= _0x5c29x9[_0xd587[284]](_0xd587[1363]);_0x5c29x5[_0xd587[57]](_0xd587[1363],_0x5c29x2);_0x5c29x9[_0xd587[1390]](_0xd587[1363])};return _0x5c29x5};_0x5c29x2[_0xd587[3266]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){var _0x5c29x9=_0x5c29x4,_0x5c29xa=this[_0xd587[718]]();_0x5c29x4[_0xd587[301]]!= _0x5c29xa?(_0x5c29x9= _0x5c29x4[_0xd587[64]](_0x5c29xa)[0],null!= _0x5c29x9&& _0x5c29x9[_0xd587[265]]== _0x5c29x4?(mxUtils[_0xd587[3278]](_0x5c29x9,!0),mxUtils[_0xd587[3278]](_0x5c29x9,!1),_0x5c29x9[_0xd587[265]][_0xd587[266]](_0x5c29x9)):_0x5c29x9= null,_0x5c29x5[_0xd587[131]]= _0x5c29x4[_0xd587[511]](!0),_0x5c29x4= _0x5c29x5[_0xd587[131]][_0xd587[284]](_0xd587[1363]),null!= _0x5c29x4&& (_0x5c29x5[_0xd587[1945]](_0x5c29x4),_0x5c29x5[_0xd587[131]][_0xd587[1390]](_0xd587[1363]))):_0x5c29x5[_0xd587[1945]](_0x5c29x4[_0xd587[284]](_0xd587[1363]));if(null!= _0x5c29x9){for(_0x5c29x4= 0;_0x5c29x4< this[_0xd587[3247]][_0xd587[67]];_0x5c29x4++){var _0x5c29xa=this[_0xd587[3247]][_0x5c29x4],_0x5c29x12=_0x5c29x9[_0xd587[284]](_0x5c29xa);if(null!= _0x5c29x12){_0x5c29x9[_0xd587[1390]](_0x5c29xa);var _0x5c29x13=_0x5c29x2[_0xd587[68]][_0x5c29x12]|| _0x5c29x2[_0xd587[1060]](_0x5c29x12);null== _0x5c29x13&& (_0x5c29x12= _0x5c29x2[_0xd587[1362]](_0x5c29x12),null!= _0x5c29x12&& (_0x5c29x13= (mxCodecRegistry[_0xd587[3230]][_0x5c29x12[_0xd587[301]]]|| this)[_0xd587[1093]](_0x5c29x2,_0x5c29x12)));_0x5c29x5[_0x5c29xa]= _0x5c29x13}}};return _0x5c29x9};return _0x5c29x2}());mxCodecRegistry[_0xd587[3234]](function(){var _0x5c29x2= new mxObjectCodec( new mxGraphModel);_0x5c29x2[_0xd587[3256]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){var _0x5c29x9=_0x5c29x2[_0xd587[395]][_0xd587[55]](_0xd587[813]);_0x5c29x2[_0xd587[3242]](_0x5c29x4[_0xd587[501]](),_0x5c29x9);_0x5c29x5[_0xd587[62]](_0x5c29x9)};_0x5c29x2[_0xd587[3274]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){_0xd587[813]== _0x5c29x4[_0xd587[301]]?this[_0xd587[3279]](_0x5c29x2,_0x5c29x4,_0x5c29x5):mxObjectCodec[_0xd587[202]][_0xd587[3274]][_0xd587[183]](this,arguments)};_0x5c29x2[_0xd587[3279]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){var _0x5c29x9=null;for(_0x5c29x4= _0x5c29x4[_0xd587[285]];null!= _0x5c29x4;){var _0x5c29xa=_0x5c29x2[_0xd587[3244]](_0x5c29x4);null!= _0x5c29xa&& null== _0x5c29xa[_0xd587[1197]]()&& (_0x5c29x9= _0x5c29xa);_0x5c29x4= _0x5c29x4[_0xd587[287]]};null!= _0x5c29x9&& _0x5c29x5[_0xd587[1927]](_0x5c29x9)};return _0x5c29x2}());mxCodecRegistry[_0xd587[3234]](function(){var _0x5c29x2= new mxObjectCodec( new mxRootChange,[_0xd587[251],_0xd587[257],_0xd587[813]]);_0x5c29x2[_0xd587[3257]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){_0x5c29x2[_0xd587[3242]](_0x5c29x4[_0xd587[813]],_0x5c29x5);return _0x5c29x5};_0x5c29x2[_0xd587[3266]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){if(null!= _0x5c29x4[_0xd587[285]]&& _0x5c29x4[_0xd587[285]][_0xd587[288]]== mxConstants[_0xd587[289]]){_0x5c29x4= _0x5c29x4[_0xd587[511]](!0);var _0x5c29x9=_0x5c29x4[_0xd587[285]];_0x5c29x5[_0xd587[813]]= _0x5c29x2[_0xd587[3244]](_0x5c29x9,!1);_0x5c29x5= _0x5c29x9[_0xd587[287]];_0x5c29x9[_0xd587[265]][_0xd587[266]](_0x5c29x9);for(_0x5c29x9= _0x5c29x5;null!= _0x5c29x9;){_0x5c29x5= _0x5c29x9[_0xd587[287]],_0x5c29x2[_0xd587[3244]](_0x5c29x9),_0x5c29x9[_0xd587[265]][_0xd587[266]](_0x5c29x9),_0x5c29x9= _0x5c29x5}};return _0x5c29x4};_0x5c29x2[_0xd587[3268]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){_0x5c29x5[_0xd587[257]]= _0x5c29x5[_0xd587[813]];return _0x5c29x5};return _0x5c29x2}());mxCodecRegistry[_0xd587[3234]](function(){var _0x5c29x2= new mxObjectCodec( new mxChildChange,[_0xd587[251],_0xd587[247],_0xd587[1982]],[_0xd587[1101],_0xd587[257]]);_0x5c29x2[_0xd587[3254]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5,_0x5c29x9){return _0xd587[247]== _0x5c29x4&& (null!= _0x5c29x2[_0xd587[257]]||  !_0x5c29x9)?!0:0<= mxUtils[_0xd587[2]](this[_0xd587[3247]],_0x5c29x4)};_0x5c29x2[_0xd587[3257]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){this[_0xd587[3254]](_0x5c29x4,_0xd587[247],_0x5c29x4[_0xd587[247]],!0)?_0x5c29x5[_0xd587[57]](_0xd587[247],_0x5c29x2[_0xd587[1103]](_0x5c29x4[_0xd587[247]])):_0x5c29x2[_0xd587[3242]](_0x5c29x4[_0xd587[247]],_0x5c29x5);return _0x5c29x5};_0x5c29x2[_0xd587[3266]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){if(null!= _0x5c29x4[_0xd587[285]]&& _0x5c29x4[_0xd587[285]][_0xd587[288]]== mxConstants[_0xd587[289]]){_0x5c29x4= _0x5c29x4[_0xd587[511]](!0);var _0x5c29x9=_0x5c29x4[_0xd587[285]];_0x5c29x5[_0xd587[247]]= _0x5c29x2[_0xd587[3244]](_0x5c29x9,!1);_0x5c29x5= _0x5c29x9[_0xd587[287]];_0x5c29x9[_0xd587[265]][_0xd587[266]](_0x5c29x9);for(_0x5c29x9= _0x5c29x5;null!= _0x5c29x9;){_0x5c29x5= _0x5c29x9[_0xd587[287]];if(_0x5c29x9[_0xd587[288]]== mxConstants[_0xd587[289]]){var _0x5c29xa=_0x5c29x9[_0xd587[284]](_0xd587[1363]);null== _0x5c29x2[_0xd587[1060]](_0x5c29xa)&& _0x5c29x2[_0xd587[3244]](_0x5c29x9)};_0x5c29x9[_0xd587[265]][_0xd587[266]](_0x5c29x9);_0x5c29x9= _0x5c29x5}}else {_0x5c29x9= _0x5c29x4[_0xd587[284]](_0xd587[247]),_0x5c29x5[_0xd587[247]]= _0x5c29x2[_0xd587[3236]](_0x5c29x9)};return _0x5c29x4};_0x5c29x2[_0xd587[3268]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){_0x5c29x5[_0xd587[247]][_0xd587[1101]]= _0x5c29x5[_0xd587[257]];_0x5c29x5[_0xd587[257]]= _0x5c29x5[_0xd587[1101]];_0x5c29x5[_0xd587[1982]]= _0x5c29x5[_0xd587[1983]];return _0x5c29x5};return _0x5c29x2}());mxCodecRegistry[_0xd587[3234]](function(){var _0x5c29x2= new mxObjectCodec( new mxTerminalChange,[_0xd587[251],_0xd587[257]],[_0xd587[246],_0xd587[1984]]);_0x5c29x2[_0xd587[3268]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){_0x5c29x5[_0xd587[257]]= _0x5c29x5[_0xd587[1984]];return _0x5c29x5};return _0x5c29x2}());var mxGenericChangeCodec=function(_0x5c29x2,_0x5c29x3){var _0x5c29x4= new mxObjectCodec(_0x5c29x2,[_0xd587[251],_0xd587[257]],[_0xd587[246]]);_0x5c29x4[_0xd587[3268]]= function(_0x5c29x2,_0x5c29x4,_0x5c29xa){mxUtils[_0xd587[1331]](_0x5c29xa[_0xd587[246]])&& (_0x5c29xa[_0xd587[246]]= _0x5c29x2[_0xd587[3244]](_0x5c29xa[_0xd587[246]],!1));_0x5c29xa[_0xd587[257]]= _0x5c29xa[_0x5c29x3];return _0x5c29xa};return _0x5c29x4};mxCodecRegistry[_0xd587[3234]](mxGenericChangeCodec( new mxValueChange,_0xd587[131]));mxCodecRegistry[_0xd587[3234]](mxGenericChangeCodec( new mxStyleChange,_0xd587[124]));mxCodecRegistry[_0xd587[3234]](mxGenericChangeCodec( new mxGeometryChange,_0xd587[256]));mxCodecRegistry[_0xd587[3234]](mxGenericChangeCodec( new mxCollapseChange,_0xd587[1985]));mxCodecRegistry[_0xd587[3234]](mxGenericChangeCodec( new mxVisibleChange,_0xd587[189]));mxCodecRegistry[_0xd587[3234]](mxGenericChangeCodec( new mxCellAttributeChange,_0xd587[131]));mxCodecRegistry[_0xd587[3234]](function(){return  new mxObjectCodec( new mxGraph,_0xd587[3280][_0xd587[224]](_0xd587[185]))}());mxCodecRegistry[_0xd587[3234]](function(){var _0x5c29x2= new mxObjectCodec( new mxGraphView);_0x5c29x2[_0xd587[514]]= function(_0x5c29x2,_0x5c29x4){return this[_0xd587[3242]](_0x5c29x2,_0x5c29x4,_0x5c29x4[_0xd587[1179]][_0xd587[502]]()[_0xd587[501]]())};_0x5c29x2[_0xd587[3242]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){var _0x5c29x9=_0x5c29x4[_0xd587[1179]][_0xd587[502]](),_0x5c29xa=_0x5c29x4[_0xd587[248]](_0x5c29x5),_0x5c29x12=_0x5c29x9[_0xd587[1197]](_0x5c29x5);if(null== _0x5c29x12|| null!= _0x5c29xa){var _0x5c29x13=_0x5c29x9[_0xd587[262]](_0x5c29x5),_0x5c29x14=_0x5c29x4[_0xd587[1179]][_0xd587[1198]](_0x5c29x5),_0x5c29x15=null;_0x5c29x12== _0x5c29x9[_0xd587[501]]()?_0x5c29x15= _0xd587[3281]:null== _0x5c29x12?_0x5c29x15= _0xd587[1179]:_0x5c29x9[_0xd587[250]](_0x5c29x5)?_0x5c29x15= _0xd587[1989]:0< _0x5c29x13&& null!= _0x5c29x14?_0x5c29x15= _0xd587[1504]:_0x5c29x9[_0xd587[1193]](_0x5c29x5)&& (_0x5c29x15= _0xd587[1988]);if(null!= _0x5c29x15){var _0x5c29x16=_0x5c29x2[_0xd587[395]][_0xd587[55]](_0x5c29x15);null!= _0x5c29x4[_0xd587[1179]][_0xd587[2183]](_0x5c29x5)&& (_0x5c29x16[_0xd587[57]](_0xd587[685],_0x5c29x4[_0xd587[1179]][_0xd587[2183]](_0x5c29x5)),_0x5c29x4[_0xd587[1179]][_0xd587[2186]](_0x5c29x5)&& _0x5c29x16[_0xd587[57]](_0xd587[1428],!0));if(null== _0x5c29x12){var _0x5c29x17=_0x5c29x4[_0xd587[517]]();null!= _0x5c29x17&& (_0x5c29x16[_0xd587[57]](_0xd587[235],Math[_0xd587[488]](_0x5c29x17[_0xd587[235]])),_0x5c29x16[_0xd587[57]](_0xd587[236],Math[_0xd587[488]](_0x5c29x17[_0xd587[236]])),_0x5c29x16[_0xd587[57]](_0xd587[117],Math[_0xd587[488]](_0x5c29x17[_0xd587[117]])),_0x5c29x16[_0xd587[57]](_0xd587[119],Math[_0xd587[488]](_0x5c29x17[_0xd587[119]])));_0x5c29x16[_0xd587[57]](_0xd587[255],_0x5c29x4[_0xd587[255]])}else {if(null!= _0x5c29xa&& null!= _0x5c29x14){for(_0x5c29x17 in _0x5c29xa[_0xd587[124]]){_0x5c29x12= _0x5c29xa[_0xd587[124]][_0x5c29x17],_0xd587[279]==  typeof _0x5c29x12&& _0xd587[194]==  typeof _0x5c29x12&& (_0x5c29x12= mxStyleRegistry[_0xd587[718]](_0x5c29x12)),null!= _0x5c29x12&& (_0xd587[279]!=  typeof _0x5c29x12&& _0xd587[194]!=  typeof _0x5c29x12)&& _0x5c29x16[_0xd587[57]](_0x5c29x17,_0x5c29x12)};_0x5c29x12= _0x5c29xa[_0xd587[439]];if(null!= _0x5c29x12&& 0< _0x5c29x12[_0xd587[67]]){_0x5c29x14= Math[_0xd587[488]](_0x5c29x12[0][_0xd587[235]])+ _0xd587[537]+ Math[_0xd587[488]](_0x5c29x12[0][_0xd587[236]]);for(_0x5c29x17= 1;_0x5c29x17< _0x5c29x12[_0xd587[67]];_0x5c29x17++){_0x5c29x14+= _0xd587[185]+ Math[_0xd587[488]](_0x5c29x12[_0x5c29x17][_0xd587[235]])+ _0xd587[537]+ Math[_0xd587[488]](_0x5c29x12[_0x5c29x17][_0xd587[236]])};_0x5c29x16[_0xd587[57]](_0xd587[1525],_0x5c29x14)}else {_0x5c29x16[_0xd587[57]](_0xd587[235],Math[_0xd587[488]](_0x5c29xa[_0xd587[235]])),_0x5c29x16[_0xd587[57]](_0xd587[236],Math[_0xd587[488]](_0x5c29xa[_0xd587[236]])),_0x5c29x16[_0xd587[57]](_0xd587[117],Math[_0xd587[488]](_0x5c29xa[_0xd587[117]])),_0x5c29x16[_0xd587[57]](_0xd587[119],Math[_0xd587[488]](_0x5c29xa[_0xd587[119]]))};_0x5c29x17= _0x5c29xa[_0xd587[2079]];null!= _0x5c29x17&& (0!= _0x5c29x17[_0xd587[235]]&& _0x5c29x16[_0xd587[57]](_0xd587[1126],Math[_0xd587[488]](_0x5c29x17[_0xd587[235]])),0!= _0x5c29x17[_0xd587[236]]&& _0x5c29x16[_0xd587[57]](_0xd587[1125],Math[_0xd587[488]](_0x5c29x17[_0xd587[236]])))}};for(_0x5c29x17= 0;_0x5c29x17< _0x5c29x13;_0x5c29x17++){_0x5c29xa= this[_0xd587[3242]](_0x5c29x2,_0x5c29x4,_0x5c29x9[_0xd587[263]](_0x5c29x5,_0x5c29x17)),null!= _0x5c29xa&& _0x5c29x16[_0xd587[62]](_0x5c29xa)}}};return _0x5c29x16};return _0x5c29x2}());mxCodecRegistry[_0xd587[3234]](function(){var _0x5c29x2= new mxObjectCodec( new mxStylesheet);_0x5c29x2[_0xd587[514]]= function(_0x5c29x2,_0x5c29x4){var _0x5c29x5=_0x5c29x2[_0xd587[395]][_0xd587[55]](this[_0xd587[718]]()),_0x5c29x9;for(_0x5c29x9 in _0x5c29x4[_0xd587[2054]]){var _0x5c29xa=_0x5c29x4[_0xd587[2054]][_0x5c29x9],_0x5c29x12=_0x5c29x2[_0xd587[395]][_0xd587[55]](_0xd587[99]);if(null!= _0x5c29x9){_0x5c29x12[_0xd587[57]](_0xd587[3069],_0x5c29x9);for(var _0x5c29x13 in _0x5c29xa){var _0x5c29x14=this[_0xd587[3282]](_0x5c29x13,_0x5c29xa[_0x5c29x13]);if(null!= _0x5c29x14){var _0x5c29x15=_0x5c29x2[_0xd587[395]][_0xd587[55]](_0xd587[99]);_0x5c29x15[_0xd587[57]](_0xd587[131],_0x5c29x14);_0x5c29x15[_0xd587[57]](_0xd587[3069],_0x5c29x13);_0x5c29x12[_0xd587[62]](_0x5c29x15)}};0< _0x5c29x12[_0xd587[271]][_0xd587[67]]&& _0x5c29x5[_0xd587[62]](_0x5c29x12)}};return _0x5c29x5};_0x5c29x2[_0xd587[3282]]= function(_0x5c29x2,_0x5c29x4){var _0x5c29x5= typeof _0x5c29x4;_0xd587[279]== _0x5c29x5?_0x5c29x4= mxStyleRegistry[_0xd587[718]](style[j]):_0xd587[194]== _0x5c29x5&& (_0x5c29x4= null);return _0x5c29x4};_0x5c29x2[_0xd587[1093]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){_0x5c29x5= _0x5c29x5||  new this[_0xd587[3231]][_0xd587[196]];var _0x5c29x9=_0x5c29x4[_0xd587[284]](_0xd587[1363]);null!= _0x5c29x9&& (_0x5c29x2[_0xd587[68]][_0x5c29x9]= _0x5c29x5);for(_0x5c29x4= _0x5c29x4[_0xd587[285]];null!= _0x5c29x4;){if(!this[_0xd587[3273]](_0x5c29x2,_0x5c29x4,_0x5c29x5)&& _0xd587[99]== _0x5c29x4[_0xd587[301]]&& (_0x5c29x9= _0x5c29x4[_0xd587[284]](_0xd587[3069]),null!= _0x5c29x9)){var _0x5c29xa=_0x5c29x4[_0xd587[284]](_0xd587[1284]),_0x5c29x12=null!= _0x5c29xa?mxUtils[_0xd587[238]](_0x5c29x5[_0xd587[2054]][_0x5c29xa]):null;null== _0x5c29x12&& (null!= _0x5c29xa&& mxLog[_0xd587[283]](_0xd587[3283]+ _0x5c29xa+ _0xd587[3284]),_0x5c29x12= {});for(_0x5c29xa= _0x5c29x4[_0xd587[285]];null!= _0x5c29xa;){if(_0x5c29xa[_0xd587[288]]== mxConstants[_0xd587[289]]){var _0x5c29x13=_0x5c29xa[_0xd587[284]](_0xd587[3069]);if(_0xd587[99]== _0x5c29xa[_0xd587[301]]){var _0x5c29x14=mxUtils[_0xd587[329]](_0x5c29xa),_0x5c29x15=null;null!= _0x5c29x14&& 0< _0x5c29x14[_0xd587[67]]?_0x5c29x15= mxUtils[_0xd587[1545]](_0x5c29x14):(_0x5c29x15= _0x5c29xa[_0xd587[284]](_0xd587[131]),mxUtils[_0xd587[1946]](_0x5c29x15)&& (_0x5c29x15= parseFloat(_0x5c29x15)));null!= _0x5c29x15&& (_0x5c29x12[_0x5c29x13]= _0x5c29x15)}else {_0xd587[205]== _0x5c29xa[_0xd587[301]]&&  delete _0x5c29x12[_0x5c29x13]}};_0x5c29xa= _0x5c29xa[_0xd587[287]]};_0x5c29x5[_0xd587[2074]](_0x5c29x9,_0x5c29x12)};_0x5c29x4= _0x5c29x4[_0xd587[287]]};return _0x5c29x5};return _0x5c29x2}());mxCodecRegistry[_0xd587[3234]](function(){var _0x5c29x2= new mxObjectCodec( new mxDefaultKeyHandler);_0x5c29x2[_0xd587[514]]= function(_0x5c29x2,_0x5c29x4){return null};_0x5c29x2[_0xd587[1093]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){if(null!= _0x5c29x5){for(_0x5c29x4= _0x5c29x4[_0xd587[285]];null!= _0x5c29x4;){if(!this[_0xd587[3273]](_0x5c29x2,_0x5c29x4,_0x5c29x5)&& _0xd587[99]== _0x5c29x4[_0xd587[301]]){var _0x5c29x9=_0x5c29x4[_0xd587[284]](_0xd587[3069]),_0x5c29xa=_0x5c29x4[_0xd587[284]](_0xd587[892]),_0x5c29x12=_0x5c29x4[_0xd587[284]](_0xd587[2207]);_0x5c29x5[_0xd587[3063]](_0x5c29x9,_0x5c29xa,_0x5c29x12)};_0x5c29x4= _0x5c29x4[_0xd587[287]]}};return _0x5c29x5};return _0x5c29x2}());mxCodecRegistry[_0xd587[3234]](function(){var _0x5c29x2= new mxObjectCodec( new mxDefaultToolbar);_0x5c29x2[_0xd587[514]]= function(_0x5c29x2,_0x5c29x4){return null};_0x5c29x2[_0xd587[1093]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){if(null!= _0x5c29x5){var _0x5c29x9=_0x5c29x5[_0xd587[3061]];for(_0x5c29x4= _0x5c29x4[_0xd587[285]];null!= _0x5c29x4;){if(_0x5c29x4[_0xd587[288]]== mxConstants[_0xd587[289]]&& !this[_0xd587[3273]](_0x5c29x2,_0x5c29x4,_0x5c29x5)){if(_0xd587[3072]== _0x5c29x4[_0xd587[301]]){_0x5c29x5[_0xd587[1051]]()}else {if(_0xd587[345]== _0x5c29x4[_0xd587[301]]){_0x5c29x5[_0xd587[3082]][_0xd587[1052]]()}else {if(_0xd587[1054]== _0x5c29x4[_0xd587[301]]){_0x5c29x5[_0xd587[3082]][_0xd587[1053]]()}else {if(_0xd587[99]== _0x5c29x4[_0xd587[301]]){var _0x5c29xa=_0x5c29x4[_0xd587[284]](_0xd587[3069]),_0x5c29xa=mxResources[_0xd587[203]](_0x5c29xa)|| _0x5c29xa,_0x5c29x12=_0x5c29x4[_0xd587[284]](_0xd587[2916]),_0x5c29x13=_0x5c29x4[_0xd587[284]](_0xd587[3285]),_0x5c29x14=_0x5c29x4[_0xd587[284]](_0xd587[892]),_0x5c29x15=_0x5c29x4[_0xd587[284]](_0xd587[3286]),_0x5c29x16=_0x5c29x4[_0xd587[284]](_0xd587[3231]),_0x5c29x17=_0xd587[468]!= _0x5c29x4[_0xd587[284]](_0xd587[3287]),_0x5c29x18=mxUtils[_0xd587[329]](_0x5c29x4),_0x5c29x19=null;if(null!= _0x5c29x14){_0x5c29x19= _0x5c29x5[_0xd587[1025]](_0x5c29xa,_0x5c29x12,_0x5c29x14,_0x5c29x13)}else {if(null!= _0x5c29x15){var _0x5c29x1a=mxUtils[_0xd587[1545]](_0x5c29x18),_0x5c29x19=_0x5c29x5[_0xd587[1048]](_0x5c29xa,_0x5c29x12,_0x5c29x15,_0x5c29x13,_0x5c29x1a)}else {if(null!= _0x5c29x16|| null!= _0x5c29x18&& 0< _0x5c29x18[_0xd587[67]]){_0x5c29x19= _0x5c29x9[_0xd587[3118]][_0x5c29x16],_0x5c29x16= _0x5c29x4[_0xd587[284]](_0xd587[124]),null!= _0x5c29x19&& null!= _0x5c29x16&& (_0x5c29x19= _0x5c29x19[_0xd587[238]](),_0x5c29x19[_0xd587[475]](_0x5c29x16)),_0x5c29x16= null,null!= _0x5c29x18&& 0< _0x5c29x18[_0xd587[67]]&& (_0x5c29x16= mxUtils[_0xd587[1545]](_0x5c29x18)),_0x5c29x19= _0x5c29x5[_0xd587[3087]](_0x5c29xa,_0x5c29x12,_0x5c29x19,_0x5c29x13,_0x5c29x16,_0x5c29x17)}else {if(_0x5c29x13= mxUtils[_0xd587[1540]](_0x5c29x4),0< _0x5c29x13[_0xd587[67]]){if(null== _0x5c29x12){_0x5c29x16= _0x5c29x5[_0xd587[1038]](_0x5c29xa);for(_0x5c29xa= 0;_0x5c29xa< _0x5c29x13[_0xd587[67]];_0x5c29xa++){_0x5c29x17= _0x5c29x13[_0x5c29xa],_0xd587[3072]== _0x5c29x17[_0xd587[301]]?_0x5c29x5[_0xd587[972]](_0x5c29x16,_0xd587[3288]):_0xd587[99]== _0x5c29x17[_0xd587[301]]&& (_0x5c29x12= _0x5c29x17[_0xd587[284]](_0xd587[3069]),_0x5c29x17= _0x5c29x17[_0xd587[284]](_0xd587[892]),_0x5c29x5[_0xd587[3085]](_0x5c29x16,_0x5c29x12,_0x5c29x17))}}else {var _0x5c29x1b=null,_0x5c29x1c=_0x5c29x5[_0xd587[3087]](_0x5c29xa,_0x5c29x12,function(){var _0x5c29x2=_0x5c29x9[_0xd587[3118]][_0x5c29x1b[_0xd587[131]]];if(null!= _0x5c29x2){var _0x5c29x2=_0x5c29x2[_0xd587[238]](),_0x5c29x3=_0x5c29x1b[_0xd587[1040]][_0x5c29x1b[_0xd587[1039]]][_0xd587[3289]];null!= _0x5c29x3&& _0x5c29x2[_0xd587[475]](_0x5c29x3);return _0x5c29x2};mxLog[_0xd587[283]](_0xd587[3290]+ _0x5c29x2+ _0xd587[3291]);return null},null,null,_0x5c29x17),_0x5c29x1b=_0x5c29x5[_0xd587[970]]();mxEvent[_0xd587[169]](_0x5c29x1b,_0xd587[826],function(){_0x5c29x5[_0xd587[3082]][_0xd587[1047]](_0x5c29x1c,function(_0x5c29x2){_0x5c29x2= mxUtils[_0xd587[2196]](_0x5c29x9[_0xd587[1179]][_0xd587[526]],mxEvent[_0xd587[731]](_0x5c29x2),mxEvent[_0xd587[733]](_0x5c29x2));return _0x5c29x9[_0xd587[817]](null,_0x5c29x1a(),_0x5c29x2[_0xd587[235]],_0x5c29x2[_0xd587[236]])});_0x5c29x5[_0xd587[3082]][_0xd587[1023]]=  !1});for(_0x5c29xa= 0;_0x5c29xa< _0x5c29x13[_0xd587[67]];_0x5c29xa++){_0x5c29x17= _0x5c29x13[_0x5c29xa],_0xd587[3072]== _0x5c29x17[_0xd587[301]]?_0x5c29x5[_0xd587[972]](_0x5c29x1b,_0xd587[3288]):_0xd587[99]== _0x5c29x17[_0xd587[301]]&& (_0x5c29x12= _0x5c29x17[_0xd587[284]](_0xd587[3069]),_0x5c29x18= _0x5c29x17[_0xd587[284]](_0xd587[3231]),_0x5c29x5[_0xd587[972]](_0x5c29x1b,_0x5c29x12,_0x5c29x18|| _0x5c29x16)[_0xd587[3289]]= _0x5c29x17[_0xd587[284]](_0xd587[124]))}}}}}};null!= _0x5c29x19&& (_0x5c29x16= _0x5c29x4[_0xd587[284]](_0xd587[1363]),null!= _0x5c29x16&& 0< _0x5c29x16[_0xd587[67]]&& _0x5c29x19[_0xd587[57]](_0xd587[1363],_0x5c29x16))}}}}};_0x5c29x4= _0x5c29x4[_0xd587[287]]}};return _0x5c29x5};return _0x5c29x2}());mxCodecRegistry[_0xd587[3234]](function(){var _0x5c29x2= new mxObjectCodec( new mxDefaultPopupMenu);_0x5c29x2[_0xd587[514]]= function(_0x5c29x2,_0x5c29x4){return null};_0x5c29x2[_0xd587[1093]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){var _0x5c29x9=_0x5c29x4[_0xd587[64]](_0xd587[3277])[0];null!= _0x5c29x9?this[_0xd587[3273]](_0x5c29x2,_0x5c29x9,_0x5c29x5):null!= _0x5c29x5&& (_0x5c29x5[_0xd587[3064]]= _0x5c29x4);return _0x5c29x5};return _0x5c29x2}());mxCodecRegistry[_0xd587[3234]](function(){var _0x5c29x2= new mxObjectCodec( new mxEditor,_0xd587[3292][_0xd587[224]](_0xd587[185]));_0x5c29x2[_0xd587[3268]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){_0x5c29x2= _0x5c29x4[_0xd587[284]](_0xd587[2075]);null!= _0x5c29x2&& (_0x5c29x4[_0xd587[1390]](_0xd587[2075]),_0x5c29x5[_0xd587[2075]]= _0x5c29x5[_0xd587[3118]][_0x5c29x2]);_0x5c29x2= _0x5c29x4[_0xd587[284]](_0xd587[3120]);null!= _0x5c29x2&& (_0x5c29x4[_0xd587[1390]](_0xd587[3120]),_0x5c29x5[_0xd587[3120]]= _0x5c29x5[_0xd587[3118]][_0x5c29x2]);return _0x5c29x5};_0x5c29x2[_0xd587[3274]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){if(_0xd587[3293]== _0x5c29x4[_0xd587[301]]){if(_0xd587[3118]== _0x5c29x4[_0xd587[284]](_0xd587[3069])){this[_0xd587[3294]](_0x5c29x2,_0x5c29x4,_0x5c29x5);return}}else {if(_0xd587[3295]== _0x5c29x4[_0xd587[301]]){this[_0xd587[3296]](_0x5c29x2,_0x5c29x4,_0x5c29x5);return}};mxObjectCodec[_0xd587[202]][_0xd587[3274]][_0xd587[183]](this,arguments)};_0x5c29x2[_0xd587[3296]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){for(_0x5c29x2= _0x5c29x4[_0xd587[285]];null!= _0x5c29x2;){if(_0xd587[99]== _0x5c29x2[_0xd587[301]]){_0x5c29x4= _0x5c29x2[_0xd587[284]](_0xd587[3069]);var _0x5c29x9=_0x5c29x2[_0xd587[284]](_0xd587[980]),_0x5c29xa=_0x5c29x2[_0xd587[284]](_0xd587[124]),_0x5c29x12=null;if(null!= _0x5c29x9){_0x5c29x12= document[_0xd587[1362]](_0x5c29x9),null!= _0x5c29x12&& null!= _0x5c29xa&& (_0x5c29x12[_0xd587[124]][_0xd587[103]]+= _0xd587[471]+ _0x5c29xa)}else {var _0x5c29x9=parseInt(_0x5c29x2[_0xd587[284]](_0xd587[235])),_0x5c29x13=parseInt(_0x5c29x2[_0xd587[284]](_0xd587[236])),_0x5c29x14=_0x5c29x2[_0xd587[284]](_0xd587[117]),_0x5c29x15=_0x5c29x2[_0xd587[284]](_0xd587[119]),_0x5c29x12=document[_0xd587[55]](_0xd587[485]);_0x5c29x12[_0xd587[124]][_0xd587[103]]= _0x5c29xa;( new mxWindow(mxResources[_0xd587[203]](_0x5c29x4)|| _0x5c29x4,_0x5c29x12,_0x5c29x9,_0x5c29x13,_0x5c29x14,_0x5c29x15,!1,!0))[_0xd587[175]](!0)};_0xd587[1179]== _0x5c29x4?_0x5c29x5[_0xd587[3202]](_0x5c29x12):_0xd587[3082]== _0x5c29x4?_0x5c29x5[_0xd587[3204]](_0x5c29x12):_0xd587[924]== _0x5c29x4?_0x5c29x5[_0xd587[3208]](_0x5c29x12):_0xd587[879]== _0x5c29x4?_0x5c29x5[_0xd587[3205]](_0x5c29x12):_0xd587[201]== _0x5c29x4&& _0x5c29x5[_0xd587[3297]](_0x5c29x12)}else {_0xd587[3298]== _0x5c29x2[_0xd587[301]]?mxResources[_0xd587[99]](_0x5c29x2[_0xd587[284]](_0xd587[3299])):_0xd587[94]== _0x5c29x2[_0xd587[301]]&& mxClient[_0xd587[54]](_0xd587[94],_0x5c29x2[_0xd587[284]](_0xd587[298]))};_0x5c29x2= _0x5c29x2[_0xd587[287]]}};_0x5c29x2[_0xd587[3294]]= function(_0x5c29x2,_0x5c29x4,_0x5c29x5){null== _0x5c29x5[_0xd587[3118]]&& (_0x5c29x5[_0xd587[3118]]= []);_0x5c29x4= mxUtils[_0xd587[1540]](_0x5c29x4);for(var _0x5c29x9=0;_0x5c29x9< _0x5c29x4[_0xd587[67]];_0x5c29x9++){for(var _0x5c29xa=_0x5c29x4[_0x5c29x9][_0xd587[284]](_0xd587[3069]),_0x5c29x12=_0x5c29x4[_0x5c29x9][_0xd587[285]];null!= _0x5c29x12&& 1!= _0x5c29x12[_0xd587[288]];){_0x5c29x12= _0x5c29x12[_0xd587[287]]};null!= _0x5c29x12&& (_0x5c29x5[_0xd587[3118]][_0x5c29xa]= _0x5c29x2[_0xd587[3244]](_0x5c29x12))}};return _0x5c29x2}())
\ No newline at end of file
diff --git a/public/assets/plugins/square/js/Actions.js b/public/assets/plugins/square/js/Actions.js
index 891e88f..b5cad8b 100644
--- a/public/assets/plugins/square/js/Actions.js
+++ b/public/assets/plugins/square/js/Actions.js
@@ -1,638 +1 @@
-'use strict';
-/**
- * $Id: Actions.js,v 1.7 2013-02-14 07:48:01 gaudenz Exp $
- * Copyright (c) 2006-2012, JGraph Ltd
- */
-/**
- * Constructs the actions object for the given UI.
- */
-function Actions(editorUi) {
-	this.editorUi = editorUi;
-	this.actions = new Object();
-	this.init();
-};
-
-/**
- * Adds the default actions.
- */
-Actions.prototype.init = function() {
-	var ui = this.editorUi;
-	var editor = ui.editor;
-	var graph = editor.graph;
-
-	// File actions
-	this.addAction('new', function() {
-		ui.showDialog(new NewDialog(ui).container, 300, 180, true, true);
-	});
-	this.addAction('open', function() {
-		ui.showDialog(new OpenDialog(ui).container, 300, 180, true, true);
-	});
-	this.addAction('save', function() {
-		ui.saveFile(false);
-	}, null, null, 'Ctrl+S');
-	this.addAction('saveAs', function() {
-		ui.saveFile(true);
-	}, null, null, 'Ctrl+Shift-S');
-	this.addAction('publish', function() {
-		ui.publishFile(false);
-	}, null, null, 'Ctrl+Shift+P');
-	this.addAction('variable', function() {
-		ui.showDialog(new VariableDialog(ui).container, 300, 180, true, true);
-	});
-	this.addAction('description', function() {
-		ui.showDialog(new DescriptionDialog(ui).container, 300, 180, true, true);
-	});
-	this.addAction('import', function() {
-		ui.showDialog(new ImportDialog(ui).container, 300, 200, true, true);
-	});
-	this.addAction('export', function() {
-		ui.showDialog(new ExportDialog(ui).container, 300, 200, true, true);
-	}, null, null, 'Ctrl+E');
-	this.put('editFile', new Action(mxResources.get('edit'), mxUtils.bind(this,
-		function() {
-			this.editorUi.showDialog(new EditFileDialog(ui).container, 620, 420,
-				true, true);
-		})));
-	// this.addAction('rename', function() {
-	// 	ui.showDialog(new RenameDialog(ui).container, 300, 180, true, true);
-	// });
-	this.addAction('print', function() {
-		mxUtils.printScreen(graph);
-	}, null, 'sprite-print', 'Ctrl+P');
-	this.addAction('preview', function() {
-		mxUtils.show(graph, null, 10, 10);
-	});
-
-	// Edit actions
-	this.addAction('undo', function() {
-		editor.undoManager.undo();
-	}, null, 'sprite-undo', 'Ctrl+Z');
-	this.addAction('redo', function() {
-		editor.undoManager.redo();
-	}, null, 'sprite-redo', 'Ctrl+Y');
-	this.addAction('cut', function() {
-		mxClipboard.cut(graph);
-	}, null, 'sprite-cut', 'Ctrl+X');
-	this.addAction('copy', function() {
-		mxClipboard.copy(graph);
-	}, null, 'sprite-copy', 'Ctrl+C');
-	this.addAction('paste', function() {
-		mxClipboard.paste(graph);
-	}, false, 'sprite-paste', 'Ctrl+V');
-	this.addAction('delete', function() {
-		graph.removeCells();
-	}, null, null, 'Delete');
-	this.addAction('duplicate', function() {
-		var s = graph.gridSize;
-		graph.setSelectionCells(graph.moveCells(graph.getSelectionCells(), s, s,
-			true));
-	}, null, null, 'Ctrl+D');
-	this.addAction('selectVertices', function() {
-		graph.selectVertices();
-	}, null, null, 'Ctrl+Shift+V');
-	this.addAction('selectEdges', function() {
-		graph.selectEdges();
-	}, null, null, 'Ctrl+Shift+E');
-	this.addAction('selectAll', function() {
-		graph.selectAll();
-	}, null, null, 'Ctrl+A');
-
-	// Navigation actions
-	this.addAction('home', function() {
-		graph.home();
-	}, null, null, 'Home');
-	this.addAction('exitGroup', function() {
-		graph.exitGroup();
-	}, null, null, 'Page Up');
-	this.addAction('enterGroup', function() {
-		graph.enterGroup();
-	}, null, null, 'Page Down');
-	this.addAction('expand', function() {
-		graph.foldCells(false);
-	}, null, null, 'Enter');
-	this.addAction('collapse', function() {
-		graph.foldCells(true);
-	}, null, null, 'Backspace');
-
-	// Arrange actions
-	this.addAction('toFront', function() {
-		graph.orderCells(false);
-	}, null, null, 'Ctrl+F');
-	this.addAction('toBack', function() {
-		graph.orderCells(true);
-	}, null, null, 'Ctrl+B');
-	this.addAction('group', function() {
-		graph.setSelectionCell(graph.groupCells(null, 0));
-	}, null, null, 'Ctrl+G');
-	this.addAction('ungroup', function() {
-		graph.setSelectionCells(graph.ungroupCells());
-	}, null, null, 'Ctrl+U');
-	this.addAction('removeFromGroup', function() {
-		graph.removeCellsFromParent();
-	});
-	this.addAction('editLink', function() {
-		var cell = graph.getSelectionCell();
-		var link = graph.getLinkForCell(cell);
-
-		if (link == null) {
-			link = '';
-		}
-
-		link = mxUtils.prompt(mxResources.get('enterValue'), link);
-
-		if (link != null) {
-			graph.setLinkForCell(cell, link);
-		}
-	});
-	this.addAction('openLink', function() {
-		var cell = graph.getSelectionCell();
-		var link = graph.getLinkForCell(cell);
-
-		if (link != null) {
-			window.open(link);
-		}
-	});
-	this.addAction('autosize', function() {
-		var cells = graph.getSelectionCells();
-
-		if (cells != null) {
-			graph.getModel().beginUpdate();
-			try {
-				for (var i = 0; i < cells.length; i++) {
-					var cell = cells[i];
-
-					if (graph.getModel().getChildCount(cell)) {
-						graph.updateGroupBounds([cell], 20);
-					} else {
-						graph.updateCellSize(cell);
-					}
-				}
-			} finally {
-				graph.getModel().endUpdate();
-			}
-		}
-	});
-	this.addAction('wordWrap', function() {
-		var state = graph.getView().getState(graph.getSelectionCell());
-		var value = 'wrap';
-
-		if (state != null && state.style[mxConstants.STYLE_WHITE_SPACE] == 'wrap') {
-			value = null;
-		}
-
-		graph.setCellStyles(mxConstants.STYLE_WHITE_SPACE, value);
-	});
-	this.addAction('rotation', function() {
-		var value = '0';
-		var state = graph.getView().getState(graph.getSelectionCell());
-
-		if (state != null) {
-			value = state.style[mxConstants.STYLE_ROTATION] || value;
-		}
-
-		value = mxUtils.prompt(mxResources.get('enterValue') + ' (' +
-			mxResources.get('rotation') + ' 0-360)', value);
-
-		if (value != null) {
-			graph.setCellStyles(mxConstants.STYLE_ROTATION, value);
-		}
-	});
-	this.addAction('tilt', function() {
-		var cells = graph.getSelectionCells();
-
-		if (cells != null) {
-			graph.getModel().beginUpdate();
-			try {
-				for (var i = 0; i < cells.length; i++) {
-					var cell = cells[i];
-
-					if (graph.getModel().isVertex(cell) && graph.getModel().getChildCount(
-							cell) == 0) {
-						var geo = graph.getCellGeometry(cell);
-
-						if (geo != null) {
-							// Rotates the size and position in the geometry
-							geo = geo.clone();
-							geo.x += geo.width / 2 - geo.height / 2;
-							geo.y += geo.height / 2 - geo.width / 2;
-							var tmp = geo.width;
-							geo.width = geo.height;
-							geo.height = tmp;
-							graph.getModel().setGeometry(cell, geo);
-
-							// Reads the current direction and advances by 90 degrees
-							var state = graph.view.getState(cell);
-
-							if (state != null) {
-								var dir = state.style[mxConstants.STYLE_DIRECTION] || 'east' /*default*/ ;
-
-								if (dir == 'east') {
-									dir = 'south';
-								} else if (dir == 'south') {
-									dir = 'west';
-								} else if (dir == 'west') {
-									dir = 'north';
-								} else if (dir == 'north') {
-									dir = 'east';
-								}
-
-								graph.setCellStyles(mxConstants.STYLE_DIRECTION, dir, [cell]);
-							}
-						}
-					}
-				}
-			} finally {
-				graph.getModel().endUpdate();
-			}
-		}
-	}, null, null, 'Ctrl+R');
-
-	// View actions
-	this.addAction('actualSize', function() {
-		graph.zoomTo(1);
-	});
-	this.addAction('zoomIn', function() {
-		graph.zoomIn();
-	}, null, null, 'Add');
-	this.addAction('zoomOut', function() {
-		graph.zoomOut();
-	}, null, null, 'Subtract');
-	this.addAction('fitWindow', function() {
-		graph.fit();
-	});
-
-	this.addAction('fitPage', mxUtils.bind(this, function() {
-		if (!graph.pageVisible) {
-			this.get('pageView').funct();
-		}
-
-		var fmt = graph.pageFormat;
-		var ps = graph.pageScale;
-		var cw = graph.container.clientWidth - 20;
-		var ch = graph.container.clientHeight - 20;
-
-		var scale = Math.floor(100 * Math.min(cw / fmt.width / ps, ch / fmt.height /
-			ps)) / 100;
-		graph.zoomTo(scale);
-
-		graph.container.scrollLeft = Math.round(graph.view.translate.x * scale -
-			Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2)
-		);
-		graph.container.scrollTop = Math.round(graph.view.translate.y * scale -
-			Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) /
-				2));
-	}));
-	this.addAction('fitPageWidth', mxUtils.bind(this, function() {
-		if (!graph.pageVisible) {
-			this.get('pageView').funct();
-		}
-
-		var fmt = graph.pageFormat;
-		var ps = graph.pageScale;
-		var cw = graph.container.clientWidth - 20;
-
-		var scale = Math.floor(100 * cw / fmt.width / ps) / 100;
-		graph.zoomTo(scale);
-
-		graph.container.scrollLeft = Math.round(graph.view.translate.x * scale -
-			Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2)
-		);
-		graph.container.scrollTop = Math.round(graph.view.translate.y * scale -
-			Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) /
-				2));
-	}));
-	this.put('customZoom', new Action(mxResources.get('custom'), function() {
-		var value = mxUtils.prompt(mxResources.get('enterValue') + ' (%)',
-			parseInt(graph.getView().getScale() * 100));
-
-		if (value != null && value.length > 0 && !isNaN(parseInt(value))) {
-			graph.zoomTo(parseInt(value) / 100);
-		}
-	}));
-
-	// Option actions
-	var action = null;
-	action = this.addAction('grid', function() {
-		graph.setGridEnabled(!graph.isGridEnabled());
-		editor.updateGraphComponents();
-	}, null, null, 'Ctrl+Shift+G');
-	action.setToggleAction(true);
-	action.setSelectedCallback(function() {
-		return graph.isGridEnabled();
-	});
-	action = this.addAction('guides', function() {
-		graph.graphHandler.guidesEnabled = !graph.graphHandler.guidesEnabled;
-	});
-	action.setToggleAction(true);
-	action.setSelectedCallback(function() {
-		return graph.graphHandler.guidesEnabled;
-	});
-	action = this.addAction('tooltips', function() {
-		graph.tooltipHandler.setEnabled(!graph.tooltipHandler.isEnabled());
-	});
-	action.setToggleAction(true);
-	action.setSelectedCallback(function() {
-		return graph.tooltipHandler.isEnabled();
-	});
-	action = this.addAction('navigation', function() {
-		graph.foldingEnabled = !graph.foldingEnabled;
-		graph.view.revalidate();
-	});
-	action.setToggleAction(true);
-	action.setSelectedCallback(function() {
-		return graph.foldingEnabled;
-	});
-	action = this.addAction('scrollbars', function() {
-		graph.scrollbars = !graph.scrollbars;
-		editor.updateGraphComponents();
-
-		if (!graph.scrollbars) {
-			var t = graph.view.translate;
-			graph.view.setTranslate(t.x - graph.container.scrollLeft / graph.view.scale,
-				t.y - graph.container.scrollTop / graph.view.scale);
-			graph.container.scrollLeft = 0;
-			graph.container.scrollTop = 0;
-			graph.sizeDidChange();
-		} else {
-			var dx = graph.view.translate.x;
-			var dy = graph.view.translate.y;
-
-			graph.view.translate.x = 0;
-			graph.view.translate.y = 0;
-			graph.sizeDidChange();
-			graph.container.scrollLeft -= Math.round(dx * graph.view.scale);
-			graph.container.scrollTop -= Math.round(dy * graph.view.scale);
-		}
-	}, !mxClient.IS_TOUCH);
-	action.setToggleAction(true);
-	action.setSelectedCallback(function() {
-		return graph.container.style.overflow == 'auto';
-	});
-	action = this.addAction('pageView', mxUtils.bind(this, function() {
-		graph.pageVisible = !graph.pageVisible;
-		graph.pageBreaksVisible = graph.pageVisible;
-		graph.preferPageSize = graph.pageBreaksVisible;
-		graph.view.validate();
-		graph.sizeDidChange();
-
-		editor.updateGraphComponents();
-		editor.outline.update();
-
-		if (mxUtils.hasScrollbars(graph.container)) {
-			if (graph.pageVisible) {
-				graph.container.scrollLeft -= 20;
-				graph.container.scrollTop -= 20;
-			} else {
-				graph.container.scrollLeft += 20;
-				graph.container.scrollTop += 20;
-			}
-		}
-	}));
-	action.setToggleAction(true);
-	action.setSelectedCallback(function() {
-		return graph.pageVisible;
-	});
-	action = this.addAction('connect', function() {
-		graph.setConnectable(!graph.connectionHandler.isEnabled());
-	}, null, null, 'Ctrl+Q');
-	action.setToggleAction(true);
-	action.setSelectedCallback(function() {
-		return graph.connectionHandler.isEnabled();
-	});
-	action = this.addAction('copyConnect', function() {
-		graph.connectionHandler.setCreateTarget(!graph.connectionHandler.isCreateTarget());
-	});
-	action.setToggleAction(true);
-	action.setSelectedCallback(function() {
-		return graph.connectionHandler.isCreateTarget();
-	});
-
-	// Help actions
-	this.addAction('help', function() {
-		var ext = '';
-
-		if (mxResources.isLanguageSupported(mxClient.language)) {
-			ext = '_' + mxClient.language;
-		}
-
-		window.open("https://wiki.xcallymotion.com/display/XMD/Cally+Square");
-		//window.open(RESOURCES_PATH + '/help' + ext + '.html');
-	});
-	this.put('about', new Action(mxResources.get('about') + ' Cally Square',
-		function() {
-			ui.showDialog(new AboutDialog(ui).container, 320, 280, true, true);
-		}, null, null, 'F1'));
-
-	// Font style actions
-	var toggleFontStyle = mxUtils.bind(this, function(key, style) {
-		this.addAction(key, function() {
-			graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, style);
-		});
-	});
-
-	toggleFontStyle('bold', mxConstants.FONT_BOLD);
-	toggleFontStyle('italic', mxConstants.FONT_ITALIC);
-	toggleFontStyle('underline', mxConstants.FONT_UNDERLINE);
-
-	// Format actions
-	this.addAction('shadow', function() {
-		graph.toggleCellStyles(mxConstants.STYLE_SHADOW);
-	});
-	this.addAction('dashed', function() {
-		graph.toggleCellStyles(mxConstants.STYLE_DASHED);
-	});
-	this.addAction('rounded', function() {
-		graph.toggleCellStyles(mxConstants.STYLE_ROUNDED);
-	});
-	this.addAction('curved', function() {
-		graph.toggleCellStyles(mxConstants.STYLE_CURVED);
-	});
-	this.addAction('style', function() {
-		var cells = graph.getSelectionCells();
-
-		if (cells != null && cells.length > 0) {
-			var model = graph.getModel();
-			var style = mxUtils.prompt(mxResources.get('enterValue') + ' (' +
-				mxResources.get('style') + ')',
-				model.getStyle(cells[0]) || '');
-
-			if (style != null) {
-				graph.setCellStyle(style, cells);
-			}
-		}
-	});
-	this.addAction('setAsDefaultEdge', function() {
-		graph.setDefaultEdge(graph.getSelectionCell());
-	});
-	this.addAction('addWaypoint', function() {
-		var cell = graph.getSelectionCell();
-
-		if (cell != null && graph.getModel().isEdge(cell)) {
-			var handler = editor.graph.selectionCellsHandler.getHandler(cell);
-
-			if (handler instanceof mxEdgeHandler) {
-				var t = graph.view.translate;
-				var s = graph.view.scale;
-				var dx = t.x;
-				var dy = t.y;
-
-				var parent = graph.getModel().getParent(cell);
-				var pgeo = graph.getCellGeometry(parent);
-
-				if (graph.getModel().isVertex(parent) && pgeo != null) {
-					dx += pgeo.x;
-					dy += pgeo.y;
-				}
-
-				handler.addPointAt(handler.state, graph.panningHandler.triggerX / s - dx,
-					graph.panningHandler.triggerY / s - dy);
-			}
-		}
-	});
-	this.addAction('removeWaypoint', function() {
-		// TODO: Action should run with "this" set to action
-		var rmWaypointAction = ui.actions.get('removeWaypoint');
-
-		if (rmWaypointAction.handler != null) {
-			// NOTE: Popupevent handled and action updated in Menus.createPopupMenu
-			rmWaypointAction.handler.removePoint(rmWaypointAction.handler.state,
-				rmWaypointAction.index);
-		}
-	});
-	this.addAction('image', function() {
-		function updateImage(value, w, h) {
-			var select = null;
-			var cells = graph.getSelectionCells();
-
-			graph.getModel().beginUpdate();
-			try {
-				// Inserts new cell if no cell is selected
-				if (cells.length == 0) {
-					var gs = graph.getGridSize();
-					cells = [graph.insertVertex(graph.getDefaultParent(), null, '', gs, gs,
-						w, h)];
-					select = cells;
-				}
-
-				graph.setCellStyles(mxConstants.STYLE_IMAGE, value, cells);
-				graph.setCellStyles(mxConstants.STYLE_SHAPE, 'image', cells);
-
-				if (graph.getSelectionCount() == 1) {
-					if (w != null && h != null) {
-						var cell = cells[0];
-						var geo = graph.getModel().getGeometry(cell);
-
-						if (geo != null) {
-							geo = geo.clone();
-							geo.width = w;
-							geo.height = h;
-							graph.getModel().setGeometry(cell, geo);
-						}
-					}
-				}
-			} finally {
-				graph.getModel().endUpdate();
-			}
-
-			if (select != null) {
-				graph.setSelectionCells(select);
-				graph.scrollCellToVisible(select[0]);
-			}
-		};
-
-		var value = '';
-		var state = graph.getView().getState(graph.getSelectionCell());
-
-		if (state != null) {
-			value = state.style[mxConstants.STYLE_IMAGE] || value;
-		}
-
-		value = mxUtils.prompt(mxResources.get('enterValue') + ' (' + mxResources.get(
-			'url') + ')', value);
-
-		if (value != null) {
-			if (value.length > 0) {
-				var img = new Image();
-
-				img.onload = function() {
-					updateImage(value, img.width, img.height);
-				};
-				img.onerror = function() {
-					mxUtils.alert(mxResources.get('fileNotFound'));
-				};
-
-				img.src = value;
-			}
-		}
-	});
-};
-
-/**
- * Registers the given action under the given name.
- */
-Actions.prototype.addAction = function(key, funct, enabled, iconCls, shortcut) {
-	return this.put(key, new Action(mxResources.get(key), funct, enabled, iconCls,
-		shortcut));
-};
-
-/**
- * Registers the given action under the given name.
- */
-Actions.prototype.put = function(name, action) {
-	this.actions[name] = action;
-
-	return action;
-};
-
-/**
- * Returns the action for the given name or null if no such action exists.
- */
-Actions.prototype.get = function(name) {
-	return this.actions[name];
-};
-
-/**
- * Constructs a new action for the given parameters.
- */
-function Action(label, funct, enabled, iconCls, shortcut) {
-	mxEventSource.call(this);
-	this.label = label;
-	this.funct = funct;
-	this.enabled = (enabled != null) ? enabled : true;
-	this.iconCls = iconCls;
-	this.shortcut = shortcut;
-};
-
-// Action inherits from mxEventSource
-mxUtils.extend(Action, mxEventSource);
-
-/**
- * Sets the enabled state of the action and fires a stateChanged event.
- */
-Action.prototype.setEnabled = function(value) {
-	if (this.enabled != value) {
-		this.enabled = value;
-		this.fireEvent(new mxEventObject('stateChanged'));
-	}
-};
-
-/**
- * Sets the enabled state of the action and fires a stateChanged event.
- */
-Action.prototype.setToggleAction = function(value) {
-	this.toggleAction = value;
-};
-
-/**
- * Sets the enabled state of the action and fires a stateChanged event.
- */
-Action.prototype.setSelectedCallback = function(funct) {
-	this.selectedCallback = funct;
-};
-
-/**
- * Sets the enabled state of the action and fires a stateChanged event.
- */
-Action.prototype.isSelected = function() {
-	return this.selectedCallback();
-};
+var _0x1da6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x64\x69\x74\x6F\x72\x55\x69","\x61\x63\x74\x69\x6F\x6E\x73","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x64\x69\x74\x6F\x72","\x67\x72\x61\x70\x68","\x6E\x65\x77","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x68\x6F\x77\x44\x69\x61\x6C\x6F\x67","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E","\x6F\x70\x65\x6E","\x73\x61\x76\x65","\x73\x61\x76\x65\x46\x69\x6C\x65","\x43\x74\x72\x6C\x2B\x53","\x73\x61\x76\x65\x41\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2D\x53","\x70\x75\x62\x6C\x69\x73\x68","\x70\x75\x62\x6C\x69\x73\x68\x46\x69\x6C\x65","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x50","\x76\x61\x72\x69\x61\x62\x6C\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x69\x6D\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x43\x74\x72\x6C\x2B\x45","\x65\x64\x69\x74\x46\x69\x6C\x65","\x65\x64\x69\x74","\x67\x65\x74","\x62\x69\x6E\x64","\x70\x75\x74","\x70\x72\x69\x6E\x74","\x70\x72\x69\x6E\x74\x53\x63\x72\x65\x65\x6E","\x73\x70\x72\x69\x74\x65\x2D\x70\x72\x69\x6E\x74","\x43\x74\x72\x6C\x2B\x50","\x70\x72\x65\x76\x69\x65\x77","\x73\x68\x6F\x77","\x75\x6E\x64\x6F","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x73\x70\x72\x69\x74\x65\x2D\x75\x6E\x64\x6F","\x43\x74\x72\x6C\x2B\x5A","\x72\x65\x64\x6F","\x73\x70\x72\x69\x74\x65\x2D\x72\x65\x64\x6F","\x43\x74\x72\x6C\x2B\x59","\x63\x75\x74","\x73\x70\x72\x69\x74\x65\x2D\x63\x75\x74","\x43\x74\x72\x6C\x2B\x58","\x63\x6F\x70\x79","\x73\x70\x72\x69\x74\x65\x2D\x63\x6F\x70\x79","\x43\x74\x72\x6C\x2B\x43","\x70\x61\x73\x74\x65","\x73\x70\x72\x69\x74\x65\x2D\x70\x61\x73\x74\x65","\x43\x74\x72\x6C\x2B\x56","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x44\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x67\x72\x69\x64\x53\x69\x7A\x65","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x43\x74\x72\x6C\x2B\x44","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x56","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x45","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x43\x74\x72\x6C\x2B\x41","\x68\x6F\x6D\x65","\x48\x6F\x6D\x65","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x50\x61\x67\x65\x20\x55\x70","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x50\x61\x67\x65\x20\x44\x6F\x77\x6E","\x65\x78\x70\x61\x6E\x64","\x66\x6F\x6C\x64\x43\x65\x6C\x6C\x73","\x45\x6E\x74\x65\x72","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x42\x61\x63\x6B\x73\x70\x61\x63\x65","\x74\x6F\x46\x72\x6F\x6E\x74","\x6F\x72\x64\x65\x72\x43\x65\x6C\x6C\x73","\x43\x74\x72\x6C\x2B\x46","\x74\x6F\x42\x61\x63\x6B","\x43\x74\x72\x6C\x2B\x42","\x67\x72\x6F\x75\x70","\x67\x72\x6F\x75\x70\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x43\x74\x72\x6C\x2B\x47","\x75\x6E\x67\x72\x6F\x75\x70","\x75\x6E\x67\x72\x6F\x75\x70\x43\x65\x6C\x6C\x73","\x43\x74\x72\x6C\x2B\x55","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x47\x72\x6F\x75\x70","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x65\x64\x69\x74\x4C\x69\x6E\x6B","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","","\x65\x6E\x74\x65\x72\x56\x61\x6C\x75\x65","\x70\x72\x6F\x6D\x70\x74","\x73\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x6F\x70\x65\x6E\x4C\x69\x6E\x6B","\x61\x75\x74\x6F\x73\x69\x7A\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x6F\x75\x6E\x74","\x75\x70\x64\x61\x74\x65\x47\x72\x6F\x75\x70\x42\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x43\x65\x6C\x6C\x53\x69\x7A\x65","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x77\x6F\x72\x64\x57\x72\x61\x70","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x77\x72\x61\x70","\x53\x54\x59\x4C\x45\x5F\x57\x48\x49\x54\x45\x5F\x53\x50\x41\x43\x45","\x73\x74\x79\x6C\x65","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x30","\x53\x54\x59\x4C\x45\x5F\x52\x4F\x54\x41\x54\x49\x4F\x4E","\x20\x28","\x20\x30\x2D\x33\x36\x30\x29","\x74\x69\x6C\x74","\x69\x73\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x43\x65\x6C\x6C\x47\x65\x6F\x6D\x65\x74\x72\x79","\x63\x6C\x6F\x6E\x65","\x78","\x77\x69\x64\x74\x68","\x68\x65\x69\x67\x68\x74","\x79","\x73\x65\x74\x47\x65\x6F\x6D\x65\x74\x72\x79","\x76\x69\x65\x77","\x53\x54\x59\x4C\x45\x5F\x44\x49\x52\x45\x43\x54\x49\x4F\x4E","\x65\x61\x73\x74","\x73\x6F\x75\x74\x68","\x77\x65\x73\x74","\x6E\x6F\x72\x74\x68","\x43\x74\x72\x6C\x2B\x52","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x7A\x6F\x6F\x6D\x54\x6F","\x7A\x6F\x6F\x6D\x49\x6E","\x41\x64\x64","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x53\x75\x62\x74\x72\x61\x63\x74","\x66\x69\x74\x57\x69\x6E\x64\x6F\x77","\x66\x69\x74","\x66\x69\x74\x50\x61\x67\x65","\x70\x61\x67\x65\x56\x69\x73\x69\x62\x6C\x65","\x66\x75\x6E\x63\x74","\x70\x61\x67\x65\x56\x69\x65\x77","\x70\x61\x67\x65\x46\x6F\x72\x6D\x61\x74","\x70\x61\x67\x65\x53\x63\x61\x6C\x65","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x63\x6C\x69\x65\x6E\x74\x48\x65\x69\x67\x68\x74","\x6D\x69\x6E","\x66\x6C\x6F\x6F\x72","\x73\x63\x72\x6F\x6C\x6C\x4C\x65\x66\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65","\x6D\x61\x78","\x72\x6F\x75\x6E\x64","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x66\x69\x74\x50\x61\x67\x65\x57\x69\x64\x74\x68","\x63\x75\x73\x74\x6F\x6D\x5A\x6F\x6F\x6D","\x63\x75\x73\x74\x6F\x6D","\x20\x28\x25\x29","\x67\x65\x74\x53\x63\x61\x6C\x65","\x67\x72\x69\x64","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x75\x70\x64\x61\x74\x65\x47\x72\x61\x70\x68\x43\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x47","\x73\x65\x74\x54\x6F\x67\x67\x6C\x65\x41\x63\x74\x69\x6F\x6E","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x65\x64\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x67\x75\x69\x64\x65\x73","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x74\x6F\x6F\x6C\x74\x69\x70\x73","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x6E\x61\x76\x69\x67\x61\x74\x69\x6F\x6E","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x72\x65\x76\x61\x6C\x69\x64\x61\x74\x65","\x73\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x73\x63\x61\x6C\x65","\x73\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x73\x69\x7A\x65\x44\x69\x64\x43\x68\x61\x6E\x67\x65","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x61\x75\x74\x6F","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x73\x56\x69\x73\x69\x62\x6C\x65","\x70\x72\x65\x66\x65\x72\x50\x61\x67\x65\x53\x69\x7A\x65","\x76\x61\x6C\x69\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x6F\x75\x74\x6C\x69\x6E\x65","\x68\x61\x73\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x43\x74\x72\x6C\x2B\x51","\x63\x6F\x70\x79\x43\x6F\x6E\x6E\x65\x63\x74","\x69\x73\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x73\x65\x74\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x68\x65\x6C\x70","\x6C\x61\x6E\x67\x75\x61\x67\x65","\x69\x73\x4C\x61\x6E\x67\x75\x61\x67\x65\x53\x75\x70\x70\x6F\x72\x74\x65\x64","\x5F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x69\x6B\x69\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D\x2F\x64\x69\x73\x70\x6C\x61\x79\x2F\x58\x4D\x44\x2F\x43\x61\x6C\x6C\x79\x2B\x53\x71\x75\x61\x72\x65","\x61\x62\x6F\x75\x74","\x20\x43\x61\x6C\x6C\x79\x20\x53\x71\x75\x61\x72\x65","\x46\x31","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x46\x6C\x61\x67\x73","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x73\x68\x61\x64\x6F\x77","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x64\x61\x73\x68\x65\x64","\x72\x6F\x75\x6E\x64\x65\x64","\x63\x75\x72\x76\x65\x64","\x29","\x67\x65\x74\x53\x74\x79\x6C\x65","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x73\x65\x74\x41\x73\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x61\x64\x64\x57\x61\x79\x70\x6F\x69\x6E\x74","\x69\x73\x45\x64\x67\x65","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x73\x74\x61\x74\x65","\x74\x72\x69\x67\x67\x65\x72\x58","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x74\x72\x69\x67\x67\x65\x72\x59","\x61\x64\x64\x50\x6F\x69\x6E\x74\x41\x74","\x72\x65\x6D\x6F\x76\x65\x57\x61\x79\x70\x6F\x69\x6E\x74","\x68\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x64\x65\x78","\x72\x65\x6D\x6F\x76\x65\x50\x6F\x69\x6E\x74","\x69\x6D\x61\x67\x65","\x67\x65\x74\x47\x72\x69\x64\x53\x69\x7A\x65","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x69\x6E\x73\x65\x72\x74\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x67\x65\x74\x47\x65\x6F\x6D\x65\x74\x72\x79","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x49\x4D\x41\x47\x45","\x75\x72\x6C","\x6F\x6E\x6C\x6F\x61\x64","\x6F\x6E\x65\x72\x72\x6F\x72","\x66\x69\x6C\x65\x4E\x6F\x74\x46\x6F\x75\x6E\x64","\x61\x6C\x65\x72\x74","\x73\x72\x63","\x63\x61\x6C\x6C","\x6C\x61\x62\x65\x6C","\x65\x6E\x61\x62\x6C\x65\x64","\x69\x63\x6F\x6E\x43\x6C\x73","\x73\x68\x6F\x72\x74\x63\x75\x74","\x65\x78\x74\x65\x6E\x64","\x73\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x64","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x74\x6F\x67\x67\x6C\x65\x41\x63\x74\x69\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x65\x64\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x69\x73\x53\x65\x6C\x65\x63\x74\x65\x64"];_0x1da6[0];function Actions(_0x11dcx2){this[_0x1da6[1]]= _0x11dcx2;this[_0x1da6[2]]=  new Object();this[_0x1da6[3]]()}Actions[_0x1da6[4]][_0x1da6[3]]= function(){var _0x11dcx3=this[_0x1da6[1]];var _0x11dcx4=_0x11dcx3[_0x1da6[5]];var _0x11dcx5=_0x11dcx4[_0x1da6[6]];this[_0x1da6[10]](_0x1da6[7],function(){_0x11dcx3[_0x1da6[9]]( new NewDialog(_0x11dcx3)[_0x1da6[8]],300,180,true,true)});this[_0x1da6[10]](_0x1da6[11],function(){_0x11dcx3[_0x1da6[9]]( new OpenDialog(_0x11dcx3)[_0x1da6[8]],300,180,true,true)});this[_0x1da6[10]](_0x1da6[12],function(){_0x11dcx3[_0x1da6[13]](false)},null,null,_0x1da6[14]);this[_0x1da6[10]](_0x1da6[15],function(){_0x11dcx3[_0x1da6[13]](true)},null,null,_0x1da6[16]);this[_0x1da6[10]](_0x1da6[17],function(){_0x11dcx3[_0x1da6[18]](false)},null,null,_0x1da6[19]);this[_0x1da6[10]](_0x1da6[20],function(){_0x11dcx3[_0x1da6[9]]( new VariableDialog(_0x11dcx3)[_0x1da6[8]],300,180,true,true)});this[_0x1da6[10]](_0x1da6[21],function(){_0x11dcx3[_0x1da6[9]]( new DescriptionDialog(_0x11dcx3)[_0x1da6[8]],300,180,true,true)});this[_0x1da6[10]](_0x1da6[22],function(){_0x11dcx3[_0x1da6[9]]( new ImportDialog(_0x11dcx3)[_0x1da6[8]],300,200,true,true)});this[_0x1da6[10]](_0x1da6[23],function(){_0x11dcx3[_0x1da6[9]]( new ExportDialog(_0x11dcx3)[_0x1da6[8]],300,200,true,true)},null,null,_0x1da6[24]);this[_0x1da6[29]](_0x1da6[25], new Action(mxResources[_0x1da6[27]](_0x1da6[26]),mxUtils[_0x1da6[28]](this,function(){this[_0x1da6[1]][_0x1da6[9]]( new EditFileDialog(_0x11dcx3)[_0x1da6[8]],620,420,true,true)})));this[_0x1da6[10]](_0x1da6[30],function(){mxUtils[_0x1da6[31]](_0x11dcx5)},null,_0x1da6[32],_0x1da6[33]);this[_0x1da6[10]](_0x1da6[34],function(){mxUtils[_0x1da6[35]](_0x11dcx5,null,10,10)});this[_0x1da6[10]](_0x1da6[36],function(){_0x11dcx4[_0x1da6[37]][_0x1da6[36]]()},null,_0x1da6[38],_0x1da6[39]);this[_0x1da6[10]](_0x1da6[40],function(){_0x11dcx4[_0x1da6[37]][_0x1da6[40]]()},null,_0x1da6[41],_0x1da6[42]);this[_0x1da6[10]](_0x1da6[43],function(){mxClipboard[_0x1da6[43]](_0x11dcx5)},null,_0x1da6[44],_0x1da6[45]);this[_0x1da6[10]](_0x1da6[46],function(){mxClipboard[_0x1da6[46]](_0x11dcx5)},null,_0x1da6[47],_0x1da6[48]);this[_0x1da6[10]](_0x1da6[49],function(){mxClipboard[_0x1da6[49]](_0x11dcx5)},false,_0x1da6[50],_0x1da6[51]);this[_0x1da6[10]](_0x1da6[52],function(){_0x11dcx5[_0x1da6[53]]()},null,null,_0x1da6[54]);this[_0x1da6[10]](_0x1da6[55],function(){var _0x11dcx6=_0x11dcx5[_0x1da6[56]];_0x11dcx5[_0x1da6[59]](_0x11dcx5[_0x1da6[58]](_0x11dcx5[_0x1da6[57]](),_0x11dcx6,_0x11dcx6,true))},null,null,_0x1da6[60]);this[_0x1da6[10]](_0x1da6[61],function(){_0x11dcx5[_0x1da6[61]]()},null,null,_0x1da6[62]);this[_0x1da6[10]](_0x1da6[63],function(){_0x11dcx5[_0x1da6[63]]()},null,null,_0x1da6[64]);this[_0x1da6[10]](_0x1da6[65],function(){_0x11dcx5[_0x1da6[65]]()},null,null,_0x1da6[66]);this[_0x1da6[10]](_0x1da6[67],function(){_0x11dcx5[_0x1da6[67]]()},null,null,_0x1da6[68]);this[_0x1da6[10]](_0x1da6[69],function(){_0x11dcx5[_0x1da6[69]]()},null,null,_0x1da6[70]);this[_0x1da6[10]](_0x1da6[71],function(){_0x11dcx5[_0x1da6[71]]()},null,null,_0x1da6[72]);this[_0x1da6[10]](_0x1da6[73],function(){_0x11dcx5[_0x1da6[74]](false)},null,null,_0x1da6[75]);this[_0x1da6[10]](_0x1da6[76],function(){_0x11dcx5[_0x1da6[74]](true)},null,null,_0x1da6[77]);this[_0x1da6[10]](_0x1da6[78],function(){_0x11dcx5[_0x1da6[79]](false)},null,null,_0x1da6[80]);this[_0x1da6[10]](_0x1da6[81],function(){_0x11dcx5[_0x1da6[79]](true)},null,null,_0x1da6[82]);this[_0x1da6[10]](_0x1da6[83],function(){_0x11dcx5[_0x1da6[85]](_0x11dcx5[_0x1da6[84]](null,0))},null,null,_0x1da6[86]);this[_0x1da6[10]](_0x1da6[87],function(){_0x11dcx5[_0x1da6[59]](_0x11dcx5[_0x1da6[88]]())},null,null,_0x1da6[89]);this[_0x1da6[10]](_0x1da6[90],function(){_0x11dcx5[_0x1da6[91]]()});this[_0x1da6[10]](_0x1da6[92],function(){var _0x11dcx7=_0x11dcx5[_0x1da6[93]]();var _0x11dcx8=_0x11dcx5[_0x1da6[94]](_0x11dcx7);if(_0x11dcx8== null){_0x11dcx8= _0x1da6[95]};_0x11dcx8= mxUtils[_0x1da6[97]](mxResources[_0x1da6[27]](_0x1da6[96]),_0x11dcx8);if(_0x11dcx8!= null){_0x11dcx5[_0x1da6[98]](_0x11dcx7,_0x11dcx8)}});this[_0x1da6[10]](_0x1da6[99],function(){var _0x11dcx7=_0x11dcx5[_0x1da6[93]]();var _0x11dcx8=_0x11dcx5[_0x1da6[94]](_0x11dcx7);if(_0x11dcx8!= null){window[_0x1da6[11]](_0x11dcx8)}});this[_0x1da6[10]](_0x1da6[100],function(){var _0x11dcx9=_0x11dcx5[_0x1da6[57]]();if(_0x11dcx9!= null){_0x11dcx5[_0x1da6[102]]()[_0x1da6[101]]();try{for(var _0x11dcxa=0;_0x11dcxa< _0x11dcx9[_0x1da6[103]];_0x11dcxa++){var _0x11dcx7=_0x11dcx9[_0x11dcxa];if(_0x11dcx5[_0x1da6[102]]()[_0x1da6[104]](_0x11dcx7)){_0x11dcx5[_0x1da6[105]]([_0x11dcx7],20)}else {_0x11dcx5[_0x1da6[106]](_0x11dcx7)}}}finally{_0x11dcx5[_0x1da6[102]]()[_0x1da6[107]]()}}});this[_0x1da6[10]](_0x1da6[108],function(){var _0x11dcxb=_0x11dcx5[_0x1da6[110]]()[_0x1da6[109]](_0x11dcx5[_0x1da6[93]]());var _0x11dcxc=_0x1da6[111];if(_0x11dcxb!= null&& _0x11dcxb[_0x1da6[113]][mxConstants[_0x1da6[112]]]== _0x1da6[111]){_0x11dcxc= null};_0x11dcx5[_0x1da6[114]](mxConstants.STYLE_WHITE_SPACE,_0x11dcxc)});this[_0x1da6[10]](_0x1da6[115],function(){var _0x11dcxc=_0x1da6[116];var _0x11dcxb=_0x11dcx5[_0x1da6[110]]()[_0x1da6[109]](_0x11dcx5[_0x1da6[93]]());if(_0x11dcxb!= null){_0x11dcxc= _0x11dcxb[_0x1da6[113]][mxConstants[_0x1da6[117]]]|| _0x11dcxc};_0x11dcxc= mxUtils[_0x1da6[97]](mxResources[_0x1da6[27]](_0x1da6[96])+ _0x1da6[118]+ mxResources[_0x1da6[27]](_0x1da6[115])+ _0x1da6[119],_0x11dcxc);if(_0x11dcxc!= null){_0x11dcx5[_0x1da6[114]](mxConstants.STYLE_ROTATION,_0x11dcxc)}});this[_0x1da6[10]](_0x1da6[120],function(){var _0x11dcx9=_0x11dcx5[_0x1da6[57]]();if(_0x11dcx9!= null){_0x11dcx5[_0x1da6[102]]()[_0x1da6[101]]();try{for(var _0x11dcxa=0;_0x11dcxa< _0x11dcx9[_0x1da6[103]];_0x11dcxa++){var _0x11dcx7=_0x11dcx9[_0x11dcxa];if(_0x11dcx5[_0x1da6[102]]()[_0x1da6[121]](_0x11dcx7)&& _0x11dcx5[_0x1da6[102]]()[_0x1da6[104]](_0x11dcx7)== 0){var _0x11dcxd=_0x11dcx5[_0x1da6[122]](_0x11dcx7);if(_0x11dcxd!= null){_0x11dcxd= _0x11dcxd[_0x1da6[123]]();_0x11dcxd[_0x1da6[124]]+= _0x11dcxd[_0x1da6[125]]/ 2- _0x11dcxd[_0x1da6[126]]/ 2;_0x11dcxd[_0x1da6[127]]+= _0x11dcxd[_0x1da6[126]]/ 2- _0x11dcxd[_0x1da6[125]]/ 2;var _0x11dcxe=_0x11dcxd[_0x1da6[125]];_0x11dcxd[_0x1da6[125]]= _0x11dcxd[_0x1da6[126]];_0x11dcxd[_0x1da6[126]]= _0x11dcxe;_0x11dcx5[_0x1da6[102]]()[_0x1da6[128]](_0x11dcx7,_0x11dcxd);var _0x11dcxb=_0x11dcx5[_0x1da6[129]][_0x1da6[109]](_0x11dcx7);if(_0x11dcxb!= null){var _0x11dcxf=_0x11dcxb[_0x1da6[113]][mxConstants[_0x1da6[130]]]|| _0x1da6[131];if(_0x11dcxf== _0x1da6[131]){_0x11dcxf= _0x1da6[132]}else {if(_0x11dcxf== _0x1da6[132]){_0x11dcxf= _0x1da6[133]}else {if(_0x11dcxf== _0x1da6[133]){_0x11dcxf= _0x1da6[134]}else {if(_0x11dcxf== _0x1da6[134]){_0x11dcxf= _0x1da6[131]}}}};_0x11dcx5[_0x1da6[114]](mxConstants.STYLE_DIRECTION,_0x11dcxf,[_0x11dcx7])}}}}}finally{_0x11dcx5[_0x1da6[102]]()[_0x1da6[107]]()}}},null,null,_0x1da6[135]);this[_0x1da6[10]](_0x1da6[136],function(){_0x11dcx5[_0x1da6[137]](1)});this[_0x1da6[10]](_0x1da6[138],function(){_0x11dcx5[_0x1da6[138]]()},null,null,_0x1da6[139]);this[_0x1da6[10]](_0x1da6[140],function(){_0x11dcx5[_0x1da6[140]]()},null,null,_0x1da6[141]);this[_0x1da6[10]](_0x1da6[142],function(){_0x11dcx5[_0x1da6[143]]()});this[_0x1da6[10]](_0x1da6[144],mxUtils[_0x1da6[28]](this,function(){if(!_0x11dcx5[_0x1da6[145]]){this[_0x1da6[27]](_0x1da6[147])[_0x1da6[146]]()};var _0x11dcx10=_0x11dcx5[_0x1da6[148]];var _0x11dcx11=_0x11dcx5[_0x1da6[149]];var _0x11dcx12=_0x11dcx5[_0x1da6[8]][_0x1da6[150]]- 20;var _0x11dcx13=_0x11dcx5[_0x1da6[8]][_0x1da6[151]]- 20;var _0x11dcx14=Math[_0x1da6[153]](100* Math[_0x1da6[152]](_0x11dcx12/ _0x11dcx10[_0x1da6[125]]/ _0x11dcx11,_0x11dcx13/ _0x11dcx10[_0x1da6[126]]/ _0x11dcx11))/ 100;_0x11dcx5[_0x1da6[137]](_0x11dcx14);_0x11dcx5[_0x1da6[8]][_0x1da6[154]]= Math[_0x1da6[157]](_0x11dcx5[_0x1da6[129]][_0x1da6[155]][_0x1da6[124]]* _0x11dcx14- Math[_0x1da6[156]](10,(_0x11dcx5[_0x1da6[8]][_0x1da6[150]]- _0x11dcx10[_0x1da6[125]]* _0x11dcx11* _0x11dcx14)/ 2));_0x11dcx5[_0x1da6[8]][_0x1da6[158]]= Math[_0x1da6[157]](_0x11dcx5[_0x1da6[129]][_0x1da6[155]][_0x1da6[127]]* _0x11dcx14- Math[_0x1da6[156]](10,(_0x11dcx5[_0x1da6[8]][_0x1da6[151]]- _0x11dcx10[_0x1da6[126]]* _0x11dcx11* _0x11dcx14)/ 2))}));this[_0x1da6[10]](_0x1da6[159],mxUtils[_0x1da6[28]](this,function(){if(!_0x11dcx5[_0x1da6[145]]){this[_0x1da6[27]](_0x1da6[147])[_0x1da6[146]]()};var _0x11dcx10=_0x11dcx5[_0x1da6[148]];var _0x11dcx11=_0x11dcx5[_0x1da6[149]];var _0x11dcx12=_0x11dcx5[_0x1da6[8]][_0x1da6[150]]- 20;var _0x11dcx14=Math[_0x1da6[153]](100* _0x11dcx12/ _0x11dcx10[_0x1da6[125]]/ _0x11dcx11)/ 100;_0x11dcx5[_0x1da6[137]](_0x11dcx14);_0x11dcx5[_0x1da6[8]][_0x1da6[154]]= Math[_0x1da6[157]](_0x11dcx5[_0x1da6[129]][_0x1da6[155]][_0x1da6[124]]* _0x11dcx14- Math[_0x1da6[156]](10,(_0x11dcx5[_0x1da6[8]][_0x1da6[150]]- _0x11dcx10[_0x1da6[125]]* _0x11dcx11* _0x11dcx14)/ 2));_0x11dcx5[_0x1da6[8]][_0x1da6[158]]= Math[_0x1da6[157]](_0x11dcx5[_0x1da6[129]][_0x1da6[155]][_0x1da6[127]]* _0x11dcx14- Math[_0x1da6[156]](10,(_0x11dcx5[_0x1da6[8]][_0x1da6[151]]- _0x11dcx10[_0x1da6[126]]* _0x11dcx11* _0x11dcx14)/ 2))}));this[_0x1da6[29]](_0x1da6[160], new Action(mxResources[_0x1da6[27]](_0x1da6[161]),function(){var _0x11dcxc=mxUtils[_0x1da6[97]](mxResources[_0x1da6[27]](_0x1da6[96])+ _0x1da6[162],parseInt(_0x11dcx5[_0x1da6[110]]()[_0x1da6[163]]()* 100));if(_0x11dcxc!= null&& _0x11dcxc[_0x1da6[103]]> 0&& !isNaN(parseInt(_0x11dcxc))){_0x11dcx5[_0x1da6[137]](parseInt(_0x11dcxc)/ 100)}}));var _0x11dcx15=null;_0x11dcx15= this[_0x1da6[10]](_0x1da6[164],function(){_0x11dcx5[_0x1da6[166]](!_0x11dcx5[_0x1da6[165]]());_0x11dcx4[_0x1da6[167]]()},null,null,_0x1da6[168]);_0x11dcx15[_0x1da6[169]](true);_0x11dcx15[_0x1da6[170]](function(){return _0x11dcx5[_0x1da6[165]]()});_0x11dcx15= this[_0x1da6[10]](_0x1da6[171],function(){_0x11dcx5[_0x1da6[173]][_0x1da6[172]]= !_0x11dcx5[_0x1da6[173]][_0x1da6[172]]});_0x11dcx15[_0x1da6[169]](true);_0x11dcx15[_0x1da6[170]](function(){return _0x11dcx5[_0x1da6[173]][_0x1da6[172]]});_0x11dcx15= this[_0x1da6[10]](_0x1da6[174],function(){_0x11dcx5[_0x1da6[176]][_0x1da6[177]](!_0x11dcx5[_0x1da6[176]][_0x1da6[175]]())});_0x11dcx15[_0x1da6[169]](true);_0x11dcx15[_0x1da6[170]](function(){return _0x11dcx5[_0x1da6[176]][_0x1da6[175]]()});_0x11dcx15= this[_0x1da6[10]](_0x1da6[178],function(){_0x11dcx5[_0x1da6[179]]= !_0x11dcx5[_0x1da6[179]];_0x11dcx5[_0x1da6[129]][_0x1da6[180]]()});_0x11dcx15[_0x1da6[169]](true);_0x11dcx15[_0x1da6[170]](function(){return _0x11dcx5[_0x1da6[179]]});_0x11dcx15= this[_0x1da6[10]](_0x1da6[181],function(){_0x11dcx5[_0x1da6[181]]= !_0x11dcx5[_0x1da6[181]];_0x11dcx4[_0x1da6[167]]();if(!_0x11dcx5[_0x1da6[181]]){var _0x11dcx16=_0x11dcx5[_0x1da6[129]][_0x1da6[155]];_0x11dcx5[_0x1da6[129]][_0x1da6[183]](_0x11dcx16[_0x1da6[124]]- _0x11dcx5[_0x1da6[8]][_0x1da6[154]]/ _0x11dcx5[_0x1da6[129]][_0x1da6[182]],_0x11dcx16[_0x1da6[127]]- _0x11dcx5[_0x1da6[8]][_0x1da6[158]]/ _0x11dcx5[_0x1da6[129]][_0x1da6[182]]);_0x11dcx5[_0x1da6[8]][_0x1da6[154]]= 0;_0x11dcx5[_0x1da6[8]][_0x1da6[158]]= 0;_0x11dcx5[_0x1da6[184]]()}else {var _0x11dcx17=_0x11dcx5[_0x1da6[129]][_0x1da6[155]][_0x1da6[124]];var _0x11dcx18=_0x11dcx5[_0x1da6[129]][_0x1da6[155]][_0x1da6[127]];_0x11dcx5[_0x1da6[129]][_0x1da6[155]][_0x1da6[124]]= 0;_0x11dcx5[_0x1da6[129]][_0x1da6[155]][_0x1da6[127]]= 0;_0x11dcx5[_0x1da6[184]]();_0x11dcx5[_0x1da6[8]][_0x1da6[154]]-= Math[_0x1da6[157]](_0x11dcx17* _0x11dcx5[_0x1da6[129]][_0x1da6[182]]);_0x11dcx5[_0x1da6[8]][_0x1da6[158]]-= Math[_0x1da6[157]](_0x11dcx18* _0x11dcx5[_0x1da6[129]][_0x1da6[182]])}},!mxClient.IS_TOUCH);_0x11dcx15[_0x1da6[169]](true);_0x11dcx15[_0x1da6[170]](function(){return _0x11dcx5[_0x1da6[8]][_0x1da6[113]][_0x1da6[185]]== _0x1da6[186]});_0x11dcx15= this[_0x1da6[10]](_0x1da6[147],mxUtils[_0x1da6[28]](this,function(){_0x11dcx5[_0x1da6[145]]= !_0x11dcx5[_0x1da6[145]];_0x11dcx5[_0x1da6[187]]= _0x11dcx5[_0x1da6[145]];_0x11dcx5[_0x1da6[188]]= _0x11dcx5[_0x1da6[187]];_0x11dcx5[_0x1da6[129]][_0x1da6[189]]();_0x11dcx5[_0x1da6[184]]();_0x11dcx4[_0x1da6[167]]();_0x11dcx4[_0x1da6[191]][_0x1da6[190]]();if(mxUtils[_0x1da6[192]](_0x11dcx5[_0x1da6[8]])){if(_0x11dcx5[_0x1da6[145]]){_0x11dcx5[_0x1da6[8]][_0x1da6[154]]-= 20;_0x11dcx5[_0x1da6[8]][_0x1da6[158]]-= 20}else {_0x11dcx5[_0x1da6[8]][_0x1da6[154]]+= 20;_0x11dcx5[_0x1da6[8]][_0x1da6[158]]+= 20}}}));_0x11dcx15[_0x1da6[169]](true);_0x11dcx15[_0x1da6[170]](function(){return _0x11dcx5[_0x1da6[145]]});_0x11dcx15= this[_0x1da6[10]](_0x1da6[193],function(){_0x11dcx5[_0x1da6[195]](!_0x11dcx5[_0x1da6[194]][_0x1da6[175]]())},null,null,_0x1da6[196]);_0x11dcx15[_0x1da6[169]](true);_0x11dcx15[_0x1da6[170]](function(){return _0x11dcx5[_0x1da6[194]][_0x1da6[175]]()});_0x11dcx15= this[_0x1da6[10]](_0x1da6[197],function(){_0x11dcx5[_0x1da6[194]][_0x1da6[199]](!_0x11dcx5[_0x1da6[194]][_0x1da6[198]]())});_0x11dcx15[_0x1da6[169]](true);_0x11dcx15[_0x1da6[170]](function(){return _0x11dcx5[_0x1da6[194]][_0x1da6[198]]()});this[_0x1da6[10]](_0x1da6[200],function(){var _0x11dcx19=_0x1da6[95];if(mxResources[_0x1da6[202]](mxClient[_0x1da6[201]])){_0x11dcx19= _0x1da6[203]+ mxClient[_0x1da6[201]]};window[_0x1da6[11]](_0x1da6[204])});this[_0x1da6[29]](_0x1da6[205], new Action(mxResources[_0x1da6[27]](_0x1da6[205])+ _0x1da6[206],function(){_0x11dcx3[_0x1da6[9]]( new AboutDialog(_0x11dcx3)[_0x1da6[8]],320,280,true,true)},null,null,_0x1da6[207]));var _0x11dcx1a=mxUtils[_0x1da6[28]](this,function(_0x11dcx1b,_0x11dcx1c){this[_0x1da6[10]](_0x11dcx1b,function(){_0x11dcx5[_0x1da6[208]](mxConstants.STYLE_FONTSTYLE,_0x11dcx1c)})});_0x11dcx1a(_0x1da6[209],mxConstants.FONT_BOLD);_0x11dcx1a(_0x1da6[210],mxConstants.FONT_ITALIC);_0x11dcx1a(_0x1da6[211],mxConstants.FONT_UNDERLINE);this[_0x1da6[10]](_0x1da6[212],function(){_0x11dcx5[_0x1da6[213]](mxConstants.STYLE_SHADOW)});this[_0x1da6[10]](_0x1da6[214],function(){_0x11dcx5[_0x1da6[213]](mxConstants.STYLE_DASHED)});this[_0x1da6[10]](_0x1da6[215],function(){_0x11dcx5[_0x1da6[213]](mxConstants.STYLE_ROUNDED)});this[_0x1da6[10]](_0x1da6[216],function(){_0x11dcx5[_0x1da6[213]](mxConstants.STYLE_CURVED)});this[_0x1da6[10]](_0x1da6[113],function(){var _0x11dcx9=_0x11dcx5[_0x1da6[57]]();if(_0x11dcx9!= null&& _0x11dcx9[_0x1da6[103]]> 0){var _0x11dcx1d=_0x11dcx5[_0x1da6[102]]();var _0x11dcx1c=mxUtils[_0x1da6[97]](mxResources[_0x1da6[27]](_0x1da6[96])+ _0x1da6[118]+ mxResources[_0x1da6[27]](_0x1da6[113])+ _0x1da6[217],_0x11dcx1d[_0x1da6[218]](_0x11dcx9[0])|| _0x1da6[95]);if(_0x11dcx1c!= null){_0x11dcx5[_0x1da6[219]](_0x11dcx1c,_0x11dcx9)}}});this[_0x1da6[10]](_0x1da6[220],function(){_0x11dcx5[_0x1da6[221]](_0x11dcx5[_0x1da6[93]]())});this[_0x1da6[10]](_0x1da6[222],function(){var _0x11dcx7=_0x11dcx5[_0x1da6[93]]();if(_0x11dcx7!= null&& _0x11dcx5[_0x1da6[102]]()[_0x1da6[223]](_0x11dcx7)){var _0x11dcx1e=_0x11dcx4[_0x1da6[6]][_0x1da6[225]][_0x1da6[224]](_0x11dcx7);if(_0x11dcx1e instanceof  mxEdgeHandler){var _0x11dcx16=_0x11dcx5[_0x1da6[129]][_0x1da6[155]];var _0x11dcx6=_0x11dcx5[_0x1da6[129]][_0x1da6[182]];var _0x11dcx17=_0x11dcx16[_0x1da6[124]];var _0x11dcx18=_0x11dcx16[_0x1da6[127]];var _0x11dcx1f=_0x11dcx5[_0x1da6[102]]()[_0x1da6[226]](_0x11dcx7);var _0x11dcx20=_0x11dcx5[_0x1da6[122]](_0x11dcx1f);if(_0x11dcx5[_0x1da6[102]]()[_0x1da6[121]](_0x11dcx1f)&& _0x11dcx20!= null){_0x11dcx17+= _0x11dcx20[_0x1da6[124]];_0x11dcx18+= _0x11dcx20[_0x1da6[127]]};_0x11dcx1e[_0x1da6[231]](_0x11dcx1e[_0x1da6[227]],_0x11dcx5[_0x1da6[229]][_0x1da6[228]]/ _0x11dcx6- _0x11dcx17,_0x11dcx5[_0x1da6[229]][_0x1da6[230]]/ _0x11dcx6- _0x11dcx18)}}});this[_0x1da6[10]](_0x1da6[232],function(){var _0x11dcx21=_0x11dcx3[_0x1da6[2]][_0x1da6[27]](_0x1da6[232]);if(_0x11dcx21[_0x1da6[233]]!= null){_0x11dcx21[_0x1da6[233]][_0x1da6[235]](_0x11dcx21[_0x1da6[233]][_0x1da6[227]],_0x11dcx21[_0x1da6[234]])}});this[_0x1da6[10]](_0x1da6[236],function(){function _0x11dcx22(_0x11dcxc,_0x11dcx23,_0x11dcx24){var _0x11dcx25=null;var _0x11dcx9=_0x11dcx5[_0x1da6[57]]();_0x11dcx5[_0x1da6[102]]()[_0x1da6[101]]();try{if(_0x11dcx9[_0x1da6[103]]== 0){var _0x11dcx26=_0x11dcx5[_0x1da6[237]]();_0x11dcx9= [_0x11dcx5[_0x1da6[239]](_0x11dcx5[_0x1da6[238]](),null,_0x1da6[95],_0x11dcx26,_0x11dcx26,_0x11dcx23,_0x11dcx24)];_0x11dcx25= _0x11dcx9};_0x11dcx5[_0x1da6[114]](mxConstants.STYLE_IMAGE,_0x11dcxc,_0x11dcx9);_0x11dcx5[_0x1da6[114]](mxConstants.STYLE_SHAPE,_0x1da6[236],_0x11dcx9);if(_0x11dcx5[_0x1da6[240]]()== 1){if(_0x11dcx23!= null&& _0x11dcx24!= null){var _0x11dcx7=_0x11dcx9[0];var _0x11dcxd=_0x11dcx5[_0x1da6[102]]()[_0x1da6[241]](_0x11dcx7);if(_0x11dcxd!= null){_0x11dcxd= _0x11dcxd[_0x1da6[123]]();_0x11dcxd[_0x1da6[125]]= _0x11dcx23;_0x11dcxd[_0x1da6[126]]= _0x11dcx24;_0x11dcx5[_0x1da6[102]]()[_0x1da6[128]](_0x11dcx7,_0x11dcxd)}}}}finally{_0x11dcx5[_0x1da6[102]]()[_0x1da6[107]]()};if(_0x11dcx25!= null){_0x11dcx5[_0x1da6[59]](_0x11dcx25);_0x11dcx5[_0x1da6[242]](_0x11dcx25[0])}}var _0x11dcxc=_0x1da6[95];var _0x11dcxb=_0x11dcx5[_0x1da6[110]]()[_0x1da6[109]](_0x11dcx5[_0x1da6[93]]());if(_0x11dcxb!= null){_0x11dcxc= _0x11dcxb[_0x1da6[113]][mxConstants[_0x1da6[243]]]|| _0x11dcxc};_0x11dcxc= mxUtils[_0x1da6[97]](mxResources[_0x1da6[27]](_0x1da6[96])+ _0x1da6[118]+ mxResources[_0x1da6[27]](_0x1da6[244])+ _0x1da6[217],_0x11dcxc);if(_0x11dcxc!= null){if(_0x11dcxc[_0x1da6[103]]> 0){var _0x11dcx27= new Image();_0x11dcx27[_0x1da6[245]]= function(){_0x11dcx22(_0x11dcxc,_0x11dcx27[_0x1da6[125]],_0x11dcx27[_0x1da6[126]])};_0x11dcx27[_0x1da6[246]]= function(){mxUtils[_0x1da6[248]](mxResources[_0x1da6[27]](_0x1da6[247]))};_0x11dcx27[_0x1da6[249]]= _0x11dcxc}}})};Actions[_0x1da6[4]][_0x1da6[10]]= function(_0x11dcx1b,_0x11dcx28,_0x11dcx29,_0x11dcx2a,_0x11dcx2b){return this[_0x1da6[29]](_0x11dcx1b, new Action(mxResources[_0x1da6[27]](_0x11dcx1b),_0x11dcx28,_0x11dcx29,_0x11dcx2a,_0x11dcx2b))};Actions[_0x1da6[4]][_0x1da6[29]]= function(_0x11dcx2c,_0x11dcx15){this[_0x1da6[2]][_0x11dcx2c]= _0x11dcx15;return _0x11dcx15};Actions[_0x1da6[4]][_0x1da6[27]]= function(_0x11dcx2c){return this[_0x1da6[2]][_0x11dcx2c]};function Action(_0x11dcx2e,_0x11dcx28,_0x11dcx29,_0x11dcx2a,_0x11dcx2b){mxEventSource[_0x1da6[250]](this);this[_0x1da6[251]]= _0x11dcx2e;this[_0x1da6[146]]= _0x11dcx28;this[_0x1da6[252]]= (_0x11dcx29!= null)?_0x11dcx29:true;this[_0x1da6[253]]= _0x11dcx2a;this[_0x1da6[254]]= _0x11dcx2b}mxUtils[_0x1da6[255]](Action,mxEventSource);Action[_0x1da6[4]][_0x1da6[177]]= function(_0x11dcxc){if(this[_0x1da6[252]]!= _0x11dcxc){this[_0x1da6[252]]= _0x11dcxc;this[_0x1da6[257]]( new mxEventObject(_0x1da6[256]))}};Action[_0x1da6[4]][_0x1da6[169]]= function(_0x11dcxc){this[_0x1da6[258]]= _0x11dcxc};Action[_0x1da6[4]][_0x1da6[170]]= function(_0x11dcx28){this[_0x1da6[259]]= _0x11dcx28};Action[_0x1da6[4]][_0x1da6[260]]= function(){return this[_0x1da6[259]]()}
\ No newline at end of file
diff --git a/public/assets/plugins/square/js/Dialogs.js b/public/assets/plugins/square/js/Dialogs.js
index 17e2529..6ce06a6 100644
--- a/public/assets/plugins/square/js/Dialogs.js
+++ b/public/assets/plugins/square/js/Dialogs.js
@@ -1,1276 +1 @@
-'use strict';
-/**
- * $Id: Dialogs.js,v 1.5 2013-01-29 17:23:31 gaudenz Exp $
- * Copyright (c) 2006-2012, JGraph Ltd
- */
-/**
- * Constructs a new dialog.
- */
-
-function createCheckbox(value) {
-	var input = document.createElement('input');
-	input.setAttribute('type', 'checkbox');
-	if (value) {
-		input.setAttribute('checked', true);
-	}
-	return input;
-}
-
-function createDropdownFromApi(path, value, option_name, option_value, editorUi, keys, pattern) {
-	var req = new XMLHttpRequest();
-	req.open('GET', path, false); // `false` makes the request synchronous
-	req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token);
-	req.send(null);
-	var res = [];
-	if (req.status === 200) {
-		res = JSON.parse(req.response);
-	}
-	var input = document.createElement('select');
-	var option = document.createElement('option');
-	option.text = '-- None --';
-	option.value = '-1';
-	input.appendChild(option);
-	res.rows.forEach(function(elem) {
-		option = document.createElement('option');
-		option.text = elem[option_name];
-		if (keys && pattern) {
-			option.value = pattern;
-			keys.forEach(function(key) {
-				option.value = option.value.replace('%' + key + '%', elem[key]);
-			});
-			option.selected = (option.value == value);
-		} else {
-			option.value = elem[option_value];
-			option.selected = (elem[option_value] == value);
-		}
-		input.appendChild(option);
-	});
-	input.className = 'form-control select2';
-
-	return input;
-}
-
-function createDropdownWithOptgroupFromApi(path, value, option_name, option_value, editorUi, propertyGroup) {
-	var req = new XMLHttpRequest();
-	req.open('GET', path, false); // `false` makes the request synchronous
-	req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token);
-	req.send(null);
-	var res = [];
-	if (req.status === 200) {
-		res = JSON.parse(req.response);
-	}
-	var input = document.createElement('select');
-	var option = document.createElement('option');
-	option.text = '-- None --';
-	option.value = '-1';
-	input.appendChild(option);
-
-	var values = _.groupBy(res.rows, propertyGroup);
-
-	for (var group in values) {
-		if (values.hasOwnProperty(group)) {
-			var optgroup = document.createElement('optgroup');
-			optgroup.label = _.capitalize(group);
-
-			var valGroup = values[group];
-			valGroup.forEach(function(elem) {
-				// elem is the option
-				option = document.createElement('option');
-				option.text = elem[option_name];
-				option.value = elem[option_value];
-				option.selected = (elem[option_value] == value);
-				optgroup.appendChild(option);
-			})
-
-			input.appendChild(optgroup);
-		}
-	}
-
-	input.className = 'form-control select2';
-
-	return input;
-}
-
-function createGroupedDropdownFromApi(path, value, option_name, option_value, editorUi, associationArray) {
-	var req = new XMLHttpRequest();
-	req.open('GET', path, false); // `false` makes the request synchronous
-	req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token);
-	req.send(null);
-	var res = [];
-	if (req.status === 200) {
-		res = JSON.parse(req.response);
-	}
-	var input = document.createElement('select');
-	var option = document.createElement('option');
-	option.text = '-- None --';
-	option.value = '0';
-	input.appendChild(option);
-	res.rows.forEach(function(elem) {
-		option = document.createElement('option');
-		option.className = 'select-group-father';
-		option.text = elem[option_name].toUpperCase();
-		option.value = elem[option_value];
-		option.selected = (elem[option_value] == value);
-		input.appendChild(option);
-		elem[associationArray].forEach(function(elem) {
-			option = document.createElement('option');
-			option.className = 'select-group-son';
-			option.text = '-' + _.capitalize(elem[option_name]);
-			option.value = elem[option_value];
-			option.selected = (elem[option_value] == value);
-			input.appendChild(option);
-		});
-	})
-	input.className = 'form-control select2';
-
-	return input;
-}
-
-function createDropdownFromArray(array, value) {
-	var input = document.createElement('select');
-
-	for (var item in array) {
-		var option = document.createElement('option');
-		option.text = array[item];
-		option.value = item;
-		if (value > 0 || value != '')
-			option.selected = (value === item) ? true : false;
-
-		input.appendChild(option);
-	}
-
-	input.className = 'form-control select2';
-
-	return input;
-}
-
-function createDropdownFromTigerDialList(value) {
-	var input = document.createElement('select');
-
-	var array = [];
-	var request = new XMLHttpRequest();
-	try {
-		request.open('POST', '/api/rest/list/list', false);
-		request.send(JSON.stringify({
-			page: 1,
-			size: 600000 //Max items ui-grid
-		}));
-
-		if (request.status === 200) {
-			var res = JSON.parse(request.response);
-			if (res.status > 0) {
-				var rows = res.response.RMI.rows;
-				for (var index in rows) {
-					array[rows[index].id] = rows[index].name;
-				}
-			}
-		}
-	} catch (e) {
-		console.log(e);
-	}
-
-	for (var item in array) {
-		var option = document.createElement('option');
-		option.text = array[item];
-		option.value = item;
-		if (value > 0 || value != '')
-			option.selected = (value === item) ? true : false;
-
-		input.appendChild(option);
-	}
-
-	input.className = 'form-control select2';
-
-	return input;
-}
-
-function Dialog(editorUi, elt, w, h, modal, closable, onClose) {
-	var dx = 0;
-
-	if (mxClient.IS_IE && document.documentMode != 9) {
-		dx = 60;
-	}
-
-	w += dx;
-	h += dx;
-
-	var left = Math.max(0, Math.round((document.body.scrollWidth - w) / 2));
-	var top = Math.max(0, Math.round((Math.max(document.body.scrollHeight,
-		document.documentElement.scrollHeight) - h) / 3));
-
-	var div = editorUi.createDiv('geDialog');
-	div.className = 'modal fade in center';
-	div.style.display = 'block';
-	div.style.paddingRight = '12px';
-	// div.style.width = w + 'px';
-	// div.style.height = h + 'px';
-	// div.style.left = left + 'px';
-	// div.style.top = top + 'px';
-
-	var divModalDialog = editorUi.createDiv('geModalDialog');
-	divModalDialog.className = 'modal-dialog';
-
-	divModalDialog.appendChild(elt);
-	div.appendChild(divModalDialog);
-
-	if (this.bg == null) {
-		this.bg = editorUi.createDiv('background');
-		this.bg.className = 'modal-backdrop fade in';
-
-		if (mxClient.IS_QUIRKS) {
-			new mxDivResizer(this.bg);
-		}
-	}
-
-	if (modal) {
-		document.body.appendChild(this.bg);
-	}
-
-	document.body.appendChild(div);
-
-	this.onDialogClose = onClose;
-	this.container = div;
-};
-
-/**
- * Removes the dialog from the DOM.
- */
-Dialog.prototype.close = function() {
-	if (this.onDialogClose != null) {
-		this.onDialogClose();
-		this.onDialogClose = null;
-	}
-
-	this.container.parentNode.removeChild(this.container);
-	this.bg.parentNode.removeChild(this.bg);
-};
-
-/**
- * Constructs a new open dialog.
- */
-function ImportDialog(editorUi) {
-
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('import') + ' XML');
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var row = editorUi.createDiv('row');
-	var col1 = editorUi.createDiv('col-md-12');
-
-	var textarea = document.createElement('textarea');
-	textarea.style.width = '100%';
-	textarea.style.height = '374px';
-
-	var input = document.createElement('input');
-	input.type = 'file';
-	input.setAttribute('accept', 'text/xml');
-
-	input.addEventListener('change', function readSingleFile(evt) {
-		//Retrieve the first (and only!) File from the FileList object
-		var f = evt.target.files[0];
-		console.log(f);
-		if (f) {
-			if (f.type === 'text/xml') {
-				var r = new FileReader();
-				r.onload = function(e) {
-					var contents = e.target.result;
-					mxUtils.write(textarea, contents);
-				};
-				r.readAsText(f);
-			} else {
-				alert('Failed to load format file');
-			}
-		} else {
-			alert('Failed to load file');
-		}
-	}, false);
-
-	col1.appendChild(input);
-	col1.appendChild(textarea);
-
-	row.appendChild(col1);
-	body.appendChild(row);
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('import'), mxUtils.bind(this,
-		function(data) {
-			var doc = mxUtils.parseXml(textarea.value);
-			editorUi.editor.setGraphXml(doc.documentElement);
-			editorUi.hideDialog();
-		}));
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-
-};
-
-/**
- * Constructs a new about dialog.
- */
-function AboutDialog(editorUi) {
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('about') + ' Cally Square');
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var img = document.createElement('img');
-	img.style.border = '0px';
-	img.setAttribute('width', '176');
-	img.setAttribute('width', '151');
-	img.setAttribute('src', IMAGE_PATH + '/logo.png');
-	body.appendChild(img);
-	mxUtils.br(body);
-	mxUtils.write(body, 'Powered by Xenialab ' + mxClient.VERSION);
-	mxUtils.br(body);
-	var link = document.createElement('a');
-	link.setAttribute('href', 'http://www.callysquare.com/');
-	link.setAttribute('target', '_blank');
-	mxUtils.write(link, 'www.callysquare.com');
-	body.appendChild(link);
-	mxUtils.br(body);
-	mxUtils.br(body);
-	//--- END BODY
-
-	var close = mxUtils.button(mxResources.get('close'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-};
-
-/**
- * Constructs a new save dialog.
- */
-function SaveDialog(editorUi) {
-
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('saveAs'));
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var name = 'name';
-	var id = '_' + name;
-	var value = editorUi.editor.getOrCreateFilename();
-
-	var row = editorUi.createDiv('row');
-	var col1 = editorUi.createDiv('col-md-4');
-	var col2 = editorUi.createDiv('col-md-8');
-
-	var label = document.createElement('label');
-	label.className = 'control-label pull-right';
-	mxUtils.write(label, mxResources.get(name));
-	col1.appendChild(label);
-
-	var select = document.createElement('input');
-	select.setAttribute('value', value + '_copy');
-	select.setAttribute('id', id)
-	select.className = 'form-control';
-	col2.appendChild(select);
-
-	row.appendChild(col1);
-	row.appendChild(col2);
-	body.appendChild(row);
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('save'), function() {
-		editorUi.saveAs(select.value);
-		editorUi.hideDialog();
-	});
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-	//nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
-};
-
-/**
- * Constructs a new save dialog.
- */
-function NewDialog(editorUi) {
-
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('new'));
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var name = 'name';
-	var id = '_' + name;
-	var value = editorUi.editor.getOrCreateFilename();
-
-	var row = editorUi.createDiv('row');
-	var col1 = editorUi.createDiv('col-md-4');
-	var col2 = editorUi.createDiv('col-md-8');
-
-	var label = document.createElement('label');
-	label.className = 'control-label pull-right';
-	mxUtils.write(label, mxResources.get(name));
-	col1.appendChild(label);
-
-	var select = document.createElement('input');
-	select.setAttribute('value', value + '_new');
-	select.setAttribute('id', id)
-	select.className = 'form-control';
-	col2.appendChild(select);
-
-	row.appendChild(col1);
-	row.appendChild(col2);
-	body.appendChild(row);
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('new'), function() {
-		editorUi.new(select.value);
-		editorUi.hideDialog();
-	});
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-	//nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
-};
-
-/**
- * Constructs a new description dialog.
- */
-function DescriptionDialog(editorUi) {
-	console.log(editorUi.editor.data);
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('description'));
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-
-	var form = editorUi.createDiv('form-horizontal form-row-seperated');
-
-	// START DESCRIPTION field
-	var name = 'description';
-	var id = '_' + name;
-	var value = editorUi.editor.data.description || '';
-	var group = editorUi.createDiv('form-group');
-
-	var label = document.createElement('label');
-	label.className = 'col-sm-4 control-label';
-	mxUtils.write(label, mxResources.get(name));
-	group.appendChild(label);
-
-	var input = document.createElement('input');
-	input.setAttribute('value', value);
-	input.className = 'form-control';
-	input.setAttribute('id', id);
-
-	var div = editorUi.createDiv('col-sm-8');
-	div.appendChild(input);
-
-	group.appendChild(div);
-	form.appendChild(group);
-	//END DESCRIPTION field
-
-	body.appendChild(form);
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('update'), function() {
-		editorUi.description(input.value);
-		editorUi.hideDialog();
-	});
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-	//nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
-}
-
-/**
- * Constructs a new variable dialog.
- */
-function VariableDialog(editorUi) {
-
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('variable'));
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-
-	var form = editorUi.createDiv('form-horizontal form-row-seperated');
-
-	//NAME field
-	var name = 'name';
-	var id = '_' + name;
-	var value = 'variable name';
-	var group = editorUi.createDiv('form-group');
-
-	var label = document.createElement('label');
-	label.className = 'col-sm-4 control-label';
-	mxUtils.write(label, mxResources.get(name));
-	group.appendChild(label);
-
-	var input = document.createElement('input');
-	input.setAttribute('value', value);
-	input.className = 'form-control';
-	input.setAttribute('id', id);
-
-	var div = editorUi.createDiv('col-sm-8');
-	div.appendChild(input);
-
-	group.appendChild(div);
-	form.appendChild(group);
-	//END NAME field
-
-	//DESCRIPTION field
-	name = 'description';
-	id = '_' + name;
-	value = 'variable description';
-	group = editorUi.createDiv('form-group last');
-
-	label = document.createElement('label');
-	label.className = 'col-sm-4 control-label';
-	mxUtils.write(label, mxResources.get(name));
-	group.appendChild(label);
-
-	var inputDesc = document.createElement('input');
-	inputDesc.setAttribute('value', value);
-	inputDesc.className = 'form-control';
-	inputDesc.setAttribute('id', id);
-
-	div = editorUi.createDiv('col-sm-8');
-	div.appendChild(inputDesc);
-
-	group.appendChild(div);
-	form.appendChild(group);
-	//END DESCRIPTION field
-
-	body.appendChild(form);
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('new'), function() {
-		editorUi.variable(input.value, inputDesc.value);
-		editorUi.hideDialog();
-	});
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-	//nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
-}
-
-/**
- * Constructs a new save dialog.
- */
-function OpenDialog(editorUi) {
-
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('open'));
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var row = editorUi.createDiv('row');
-	var col1 = editorUi.createDiv('col-md-4');
-	var col2 = editorUi.createDiv('col-md-8');
-
-	var label = document.createElement('label');
-	label.className = 'control-label pull-right';
-	mxUtils.write(label, mxResources.get('name'));
-	col1.appendChild(label);
-
-	var req = new XMLHttpRequest();
-	req.open('GET', '/api/square/projects', false); // `false` makes the request synchronous
-	req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token);
-	req.send(null);
-	var res = [];
-	if (req.status === 200) {
-		res = JSON.parse(req.response);
-	}
-
-	var select = document.createElement('select');
-
-	for (var j = 0; j < res.length; j++) {
-		var option = document.createElement('option');
-		option.text = res[j].name;
-		option.value = res[j].id;
-		select.appendChild(option);
-	}
-	select.className = 'form-control';
-	col2.appendChild(select);
-
-	row.appendChild(col1);
-	row.appendChild(col2);
-	body.appendChild(row);
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('open'), function() {
-		console.log(select);
-		console.log(select.value);
-		window.open('square/project/' + select.value, '_blank');
-		editorUi.hideDialog();
-	});
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-	//nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
-};
-/**
- * Constructs a new rename dialog.
- */
-function RenameDialog(editorUi) {
-
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('rename'));
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var row = editorUi.createDiv('row');
-	var col1 = editorUi.createDiv('col-md-4');
-	var col2 = editorUi.createDiv('col-md-8');
-
-	var label = document.createElement('label');
-	label.className = 'control-label pull-right';
-	mxUtils.write(label, mxResources.get('name'));
-	col1.appendChild(label);
-	var name = editorUi.editor.filename;
-	var input = document.createElement('input');
-	input.setAttribute('value', name);
-	input.className = 'form-control';
-
-	col2.appendChild(input);
-
-	row.appendChild(col1);
-	row.appendChild(col2);
-	body.appendChild(row);
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('save'), function() {
-		var req = new XMLHttpRequest();
-
-		req.open("PUT", SAVE_URL + editorUi.editor.data.id, true);
-		req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-		req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token);
-		req.send('name=' + input.value);
-
-		req.onload = function(e) {
-			if (req.status === 200) {
-				editorUi.editor.setStatus('Project successfully renamed');
-				editorUi.editor.filename = input.value;
-
-			} else {
-				console.log(req.response);
-				editorUi.editor.setStatus(JSON.parse(req.response).errors[0].message);
-			}
-		}
-		req.onerror = function(e) {
-			mxUtils.alert(req.statusText);
-		};
-		editorUi.hideDialog();
-	});
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-	//nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
-};
-
-/**
- * Constructs a new edit file dialog.
- */
-function EditFileDialog(editorUi) {
-
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('edit'));
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var row = editorUi.createDiv('row');
-	var col1 = editorUi.createDiv('col-md-12');
-
-	var textarea = document.createElement('textarea');
-	textarea.style.width = '100%';
-	textarea.style.height = '374px';
-	textarea.value = mxUtils.getPrettyXml(editorUi.editor.getGraphXml());
-
-	// Enables dropping files
-	if (fileSupport) {
-		function handleDrop(evt) {
-			evt.stopPropagation();
-			evt.preventDefault();
-
-			if (evt.dataTransfer.files.length > 0) {
-				var file = evt.dataTransfer.files[0];
-
-				var reader = new FileReader();
-				reader.onload = function(e) {
-					textarea.value = e.target.result;
-				};
-				reader.readAsText(file);
-			}
-		};
-
-		function handleDragOver(evt) {
-			evt.stopPropagation();
-			evt.preventDefault();
-		};
-
-		// Setup the dnd listeners.
-		textarea.addEventListener('dragover', handleDragOver, false);
-		textarea.addEventListener('drop', handleDrop, false);
-	}
-	col1.appendChild(textarea);
-
-	row.appendChild(col1);
-	body.appendChild(row);
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('save'), function() {
-		var doc = mxUtils.parseXml(textarea.value);
-		editorUi.editor.setGraphXml(doc.documentElement);
-		editorUi.hideDialog();
-	});
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-};
-
-/**
- * Constructs a new export dialog.
- */
-function ExportDialog(editorUi) {
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body form');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('export') + ' XML');
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var form = editorUi.createDiv('form-horizontal form-row-seperated');
-	var group = editorUi.createDiv('form-group last');
-
-	var label = document.createElement('label');
-	label.className = 'col-sm-4 control-label';
-	mxUtils.write(label, mxResources.get('filename'));
-
-	var input = document.createElement('input');
-	input.setAttribute('value', editorUi.editor.getOrCreateFilename());
-	input.className = 'form-control';
-
-	var div = editorUi.createDiv('col-sm-8');
-	div.appendChild(input);
-
-	group.appendChild(label);
-	group.appendChild(div);
-	form.appendChild(group);
-
-	body.appendChild(form);
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('export'), mxUtils.bind(this,
-		function(data) {
-			editorUi.save(false);
-
-			var xml = encodeURIComponent(mxUtils.getXml(editorUi.editor.getGraphXml()));
-			new mxXmlRequest(SAVE_URL + editorUi.editor.data.id + '/download',
-				'filename=' + input.value, 'GET').simulate(document, "_blank");
-			editorUi.hideDialog();
-		}));
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-};
-
-/**
- * Giuseppe Careri
- * Constructs a new general dialog.
- */
-function GeneralDialog(editorUi, cell) {
-	var graph = editorUi.editor.graph;
-
-	var content = editorUi.createDiv('modal-content');
-	var header = editorUi.createDiv('modal-header');
-	var body = editorUi.createDiv('modal-body form modal-body-scroll');
-	var footer = editorUi.createDiv('modal-footer');
-
-	//--- START HEADER
-	var title = editorUi.createHeader('h4');
-	mxUtils.write(title, mxResources.get('edit') + ' ' + mxResources.get(cell.value
-		.nodeName));
-
-	var x = mxUtils.button('', function() {
-		editorUi.hideDialog();
-	});
-	x.className = 'close';
-
-	header.appendChild(x);
-	header.appendChild(title);
-	//--- END HEADER
-
-	//--- START BODY
-	var length = cell.value.attributes.length;
-	var form = editorUi.createDiv('form-horizontal form-row-seperated');
-
-	for (var i = 0; i < length; i++) {
-		var name = cell.value.attributes[i].name;
-		var id = '_' + name;
-		var value = cell.value.attributes[i].value;
-
-		var group = editorUi.createDiv((i == length - 1) ? 'form-group last' :
-			'form-group');
-
-		var label = document.createElement('label');
-		label.className = 'col-sm-4 control-label';
-		mxUtils.write(label, mxResources.get(name));
-		group.appendChild(label);
-
-		var input;
-
-		switch (name) {
-			case 'sip_id':
-				input = createDropdownWithOptgroupFromApi('/api/users/all', value, 'fullname', 'id', editorUi, 'role');
-				break;
-			case 'queue_id':
-				input = createDropdownFromApi('/api/voice/queues', value, 'name', 'name',
-					editorUi);
-				break;
-			case 'trunk_name':
-				input = createDropdownFromApi('/api/trunks', value, 'name', 'name', editorUi);
-				break;
-			case 'variable_id':
-				input = createDropdownFromApi('/api/variables', value, 'name', 'id',
-					editorUi);
-				break;
-			case 'account_id':
-				if (cell.value.nodeName == 'sendMail') {
-					input = createDropdownFromApi('/api/mail/servers/out', value, 'username', 'id',
-						editorUi);
-				} else {
-					input = createDropdownFromApi('/api/sms/accounts', value, 'name', 'id',
-						editorUi);
-				}
-				break;
-			case 'template_id':
-				input = createDropdownFromApi('/api/templates', value, 'name', 'id',
-					editorUi);
-				break;
-			case 'context':
-				input = createDropdownFromApi('/api/voice/contexts', value, 'name', 'name',
-					editorUi);
-				break;
-			case 'mailbox':
-				input = createDropdownFromApi('/api/voice/voicemails', value, 'mailbox',
-					'id', editorUi, ['mailbox', 'context'], '%mailbox%@%context%');
-				break;
-			case 'model':
-				input = createDropdownFromArray(ISPEECHASRMODEL, value);
-				break;
-			case 'ispeech_asr_language':
-				input = createDropdownFromArray(ISPEECHASRLANG, value);
-				break;
-			case 'beep':
-				input = createDropdownFromArray(ISPEECHBEEP, value);
-				break;
-			case 'hiddendigitspos':
-				input = createDropdownFromArray(SECRETDIGITSPOS, value);
-				break;
-			case 'ispeech_tts_language':
-				input = createDropdownFromArray(ISPEECHLANG, value);
-				break;
-			case 'google_tts_language':
-				input = createDropdownFromArray(GOOGLETTSLANG, value);
-				break;
-			case 'intKey':
-				input = createDropdownFromArray(ASRINTKEYS, value);
-				break;
-			case 'recordingFormat':
-				input = createDropdownFromArray(RECORDINGFORMAT, value);
-				break;
-			case 'answer':
-				input = createDropdownFromArray(BOOLSELECT, value);
-				break;
-			case 'list_id':
-				input = createDropdownFromTigerDialList(value);
-				break;
-			case 'interval_id':
-				input = createGroupedDropdownFromApi('/api/intervals', value, 'name', 'id',
-					editorUi, 'SubIntervals');
-				break;
-			case 'project_id':
-				input = createDropdownFromApi('/api/square/projects', value, 'name', 'id',
-					editorUi);
-				break;
-			case 'odbc_id':
-				input = createDropdownFromApi('/api/square/odbc', value, 'name', 'id',
-					editorUi);
-				break;
-			case 'file_id':
-				input = createDropdownFromApi('/api/sounds', value, 'display_name', 'id',
-					editorUi);
-				break;
-			case 'timeout':
-			case 'digit':
-			case 'mindigit':
-			case 'maxdigit':
-			case 'response':
-			case 'retry':
-			case 'speed':
-				input = document.createElement('input');
-				input.setAttribute('type', 'number');
-				input.setAttribute('min', 0);
-				input.setAttribute('max', 1000);
-				input.setAttribute('value', value);
-				input.className = 'form-control';
-				break;
-			case 'text':
-			case 'key':
-			case 'query':
-			case 'condition':
-			case 'command':
-			case 'body':
-				input = document.createElement('textarea');
-				input.innerHTML = value;
-				input.className = 'form-control';
-				break;
-			case 'sms_text':
-				input = document.createElement('textarea');
-				input.innerHTML = value;
-				input.className = 'form-control';
-				input.setAttribute('maxlength', '160');
-				break;
-			default:
-				input = document.createElement('input');
-				input.setAttribute('value', value);
-				input.className = 'form-control';
-				break;
-		}
-
-		input.setAttribute('id', id);
-
-		var div = editorUi.createDiv('col-sm-8');
-		div.appendChild(input);
-
-		// Help
-		if (mxResources.get('help_' + name)) {
-			var help = editorUi.createDiv('p');
-			help.className = 'help-block';
-			mxUtils.write(help, mxResources.get('help_' + name));
-			div.appendChild(help);
-		}
-
-		group.appendChild(div);
-		form.appendChild(group);
-	}
-	body.appendChild(form);
-	//--- END BODY
-
-	//--- START FOOTER
-	var save = mxUtils.button(mxResources.get('save'), mxUtils.bind(this,
-		function(data) {
-			for (var i = 0; i < cell.value.attributes.length; i++) {
-				var id = '_' + cell.value.attributes[i].name;
-				var name = cell.value.attributes[i].name;
-				// console.log(name, document.getElementById(id).value);
-				cell.setAttribute(name, document.getElementById(id).value);
-			};
-			graph.refresh(cell);
-			editorUi.hideDialog();
-		}));
-	save.className = 'btn blue';
-
-	var close = mxUtils.button(mxResources.get('cancel'), function() {
-		editorUi.hideDialog();
-	});
-	close.className = 'btn default';
-
-	footer.appendChild(save);
-	footer.appendChild(close);
-	//--- END FOOTER
-
-	//--- START CONTENT
-	content.appendChild(header);
-	content.appendChild(body);
-	content.appendChild(footer);
-	//--- END CONTENT
-
-	this.container = content;
-};
+var _0x68b4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x6E\x70\x75\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x74\x79\x70\x65","\x63\x68\x65\x63\x6B\x62\x6F\x78","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x68\x65\x63\x6B\x65\x64","\x47\x45\x54","\x6F\x70\x65\x6E","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x65\x61\x72\x65\x72\x20","\x74\x6F\x6B\x65\x6E","\x64\x61\x74\x61","\x65\x64\x69\x74\x6F\x72","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x70\x61\x72\x73\x65","\x73\x65\x6C\x65\x63\x74","\x6F\x70\x74\x69\x6F\x6E","\x74\x65\x78\x74","\x2D\x2D\x20\x4E\x6F\x6E\x65\x20\x2D\x2D","\x76\x61\x6C\x75\x65","\x2D\x31","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x25","\x72\x65\x70\x6C\x61\x63\x65","\x66\x6F\x72\x45\x61\x63\x68","\x73\x65\x6C\x65\x63\x74\x65\x64","\x72\x6F\x77\x73","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x73\x65\x6C\x65\x63\x74\x32","\x67\x72\x6F\x75\x70\x42\x79","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x70\x74\x67\x72\x6F\x75\x70","\x6C\x61\x62\x65\x6C","\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65","\x30","\x73\x65\x6C\x65\x63\x74\x2D\x67\x72\x6F\x75\x70\x2D\x66\x61\x74\x68\x65\x72","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x73\x65\x6C\x65\x63\x74\x2D\x67\x72\x6F\x75\x70\x2D\x73\x6F\x6E","\x2D","","\x50\x4F\x53\x54","\x2F\x61\x70\x69\x2F\x72\x65\x73\x74\x2F\x6C\x69\x73\x74\x2F\x6C\x69\x73\x74","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x52\x4D\x49","\x69\x64","\x6E\x61\x6D\x65","\x6C\x6F\x67","\x49\x53\x5F\x49\x45","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x73\x63\x72\x6F\x6C\x6C\x57\x69\x64\x74\x68","\x62\x6F\x64\x79","\x72\x6F\x75\x6E\x64","\x6D\x61\x78","\x73\x63\x72\x6F\x6C\x6C\x48\x65\x69\x67\x68\x74","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x44\x69\x61\x6C\x6F\x67","\x63\x72\x65\x61\x74\x65\x44\x69\x76","\x6D\x6F\x64\x61\x6C\x20\x66\x61\x64\x65\x20\x69\x6E\x20\x63\x65\x6E\x74\x65\x72","\x64\x69\x73\x70\x6C\x61\x79","\x73\x74\x79\x6C\x65","\x62\x6C\x6F\x63\x6B","\x70\x61\x64\x64\x69\x6E\x67\x52\x69\x67\x68\x74","\x31\x32\x70\x78","\x67\x65\x4D\x6F\x64\x61\x6C\x44\x69\x61\x6C\x6F\x67","\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67","\x62\x67","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x6D\x6F\x64\x61\x6C\x2D\x62\x61\x63\x6B\x64\x72\x6F\x70\x20\x66\x61\x64\x65\x20\x69\x6E","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x6F\x6E\x44\x69\x61\x6C\x6F\x67\x43\x6C\x6F\x73\x65","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x63\x6C\x6F\x73\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x6D\x6F\x64\x61\x6C\x2D\x63\x6F\x6E\x74\x65\x6E\x74","\x6D\x6F\x64\x61\x6C\x2D\x68\x65\x61\x64\x65\x72","\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79","\x6D\x6F\x64\x61\x6C\x2D\x66\x6F\x6F\x74\x65\x72","\x68\x34","\x63\x72\x65\x61\x74\x65\x48\x65\x61\x64\x65\x72","\x69\x6D\x70\x6F\x72\x74","\x67\x65\x74","\x20\x58\x4D\x4C","\x77\x72\x69\x74\x65","\x68\x69\x64\x65\x44\x69\x61\x6C\x6F\x67","\x62\x75\x74\x74\x6F\x6E","\x72\x6F\x77","\x63\x6F\x6C\x2D\x6D\x64\x2D\x31\x32","\x74\x65\x78\x74\x61\x72\x65\x61","\x77\x69\x64\x74\x68","\x31\x30\x30\x25","\x68\x65\x69\x67\x68\x74","\x33\x37\x34\x70\x78","\x66\x69\x6C\x65","\x61\x63\x63\x65\x70\x74","\x74\x65\x78\x74\x2F\x78\x6D\x6C","\x63\x68\x61\x6E\x67\x65","\x66\x69\x6C\x65\x73","\x74\x61\x72\x67\x65\x74","\x6F\x6E\x6C\x6F\x61\x64","\x72\x65\x73\x75\x6C\x74","\x72\x65\x61\x64\x41\x73\x54\x65\x78\x74","\x46\x61\x69\x6C\x65\x64\x20\x74\x6F\x20\x6C\x6F\x61\x64\x20\x66\x6F\x72\x6D\x61\x74\x20\x66\x69\x6C\x65","\x46\x61\x69\x6C\x65\x64\x20\x74\x6F\x20\x6C\x6F\x61\x64\x20\x66\x69\x6C\x65","\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x72\x73\x65\x58\x6D\x6C","\x73\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x62\x69\x6E\x64","\x62\x74\x6E\x20\x62\x6C\x75\x65","\x63\x61\x6E\x63\x65\x6C","\x62\x74\x6E\x20\x64\x65\x66\x61\x75\x6C\x74","\x61\x62\x6F\x75\x74","\x20\x43\x61\x6C\x6C\x79\x20\x53\x71\x75\x61\x72\x65","\x69\x6D\x67","\x62\x6F\x72\x64\x65\x72","\x30\x70\x78","\x31\x37\x36","\x31\x35\x31","\x73\x72\x63","\x2F\x6C\x6F\x67\x6F\x2E\x70\x6E\x67","\x62\x72","\x50\x6F\x77\x65\x72\x65\x64\x20\x62\x79\x20\x58\x65\x6E\x69\x61\x6C\x61\x62\x20","\x56\x45\x52\x53\x49\x4F\x4E","\x61","\x68\x72\x65\x66","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x63\x61\x6C\x6C\x79\x73\x71\x75\x61\x72\x65\x2E\x63\x6F\x6D\x2F","\x5F\x62\x6C\x61\x6E\x6B","\x77\x77\x77\x2E\x63\x61\x6C\x6C\x79\x73\x71\x75\x61\x72\x65\x2E\x63\x6F\x6D","\x73\x61\x76\x65\x41\x73","\x5F","\x67\x65\x74\x4F\x72\x43\x72\x65\x61\x74\x65\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x63\x6F\x6C\x2D\x6D\x64\x2D\x34","\x63\x6F\x6C\x2D\x6D\x64\x2D\x38","\x63\x6F\x6E\x74\x72\x6F\x6C\x2D\x6C\x61\x62\x65\x6C\x20\x70\x75\x6C\x6C\x2D\x72\x69\x67\x68\x74","\x5F\x63\x6F\x70\x79","\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C","\x73\x61\x76\x65","\x6E\x65\x77","\x5F\x6E\x65\x77","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x66\x6F\x72\x6D\x2D\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x20\x66\x6F\x72\x6D\x2D\x72\x6F\x77\x2D\x73\x65\x70\x65\x72\x61\x74\x65\x64","\x66\x6F\x72\x6D\x2D\x67\x72\x6F\x75\x70","\x63\x6F\x6C\x2D\x73\x6D\x2D\x34\x20\x63\x6F\x6E\x74\x72\x6F\x6C\x2D\x6C\x61\x62\x65\x6C","\x63\x6F\x6C\x2D\x73\x6D\x2D\x38","\x75\x70\x64\x61\x74\x65","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x6E\x61\x6D\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x66\x6F\x72\x6D\x2D\x67\x72\x6F\x75\x70\x20\x6C\x61\x73\x74","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x2F","\x72\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x50\x55\x54","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x6E\x61\x6D\x65\x3D","\x50\x72\x6F\x6A\x65\x63\x74\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79\x20\x72\x65\x6E\x61\x6D\x65\x64","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x6D\x65\x73\x73\x61\x67\x65","\x65\x72\x72\x6F\x72\x73","\x6F\x6E\x65\x72\x72\x6F\x72","\x73\x74\x61\x74\x75\x73\x54\x65\x78\x74","\x61\x6C\x65\x72\x74","\x65\x64\x69\x74","\x67\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x67\x65\x74\x50\x72\x65\x74\x74\x79\x58\x6D\x6C","\x73\x74\x6F\x70\x50\x72\x6F\x70\x61\x67\x61\x74\x69\x6F\x6E","\x70\x72\x65\x76\x65\x6E\x74\x44\x65\x66\x61\x75\x6C\x74","\x64\x61\x74\x61\x54\x72\x61\x6E\x73\x66\x65\x72","\x64\x72\x61\x67\x6F\x76\x65\x72","\x64\x72\x6F\x70","\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x20\x66\x6F\x72\x6D","\x65\x78\x70\x6F\x72\x74","\x67\x65\x74\x58\x6D\x6C","\x73\x69\x6D\x75\x6C\x61\x74\x65","\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D","\x67\x72\x61\x70\x68","\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x20\x66\x6F\x72\x6D\x20\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x2D\x73\x63\x72\x6F\x6C\x6C","\x20","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x73\x2F\x61\x6C\x6C","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x73\x69\x70\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73","\x71\x75\x65\x75\x65\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B\x73","\x74\x72\x75\x6E\x6B\x5F\x6E\x61\x6D\x65","\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x73\x65\x72\x76\x65\x72\x73\x2F\x6F\x75\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x61\x63\x63\x6F\x75\x6E\x74\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x74\x65\x6D\x70\x6C\x61\x74\x65\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x63\x6F\x6E\x74\x65\x78\x74\x73","\x63\x6F\x6E\x74\x65\x78\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x73","\x6D\x61\x69\x6C\x62\x6F\x78","\x25\x6D\x61\x69\x6C\x62\x6F\x78\x25\x40\x25\x63\x6F\x6E\x74\x65\x78\x74\x25","\x6D\x6F\x64\x65\x6C","\x69\x73\x70\x65\x65\x63\x68\x5F\x61\x73\x72\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x62\x65\x65\x70","\x68\x69\x64\x64\x65\x6E\x64\x69\x67\x69\x74\x73\x70\x6F\x73","\x69\x73\x70\x65\x65\x63\x68\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x67\x6F\x6F\x67\x6C\x65\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x69\x6E\x74\x4B\x65\x79","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x61\x6E\x73\x77\x65\x72","\x6C\x69\x73\x74\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x53\x75\x62\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C\x5F\x69\x64","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x6F\x64\x62\x63","\x6F\x64\x62\x63\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64\x73","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x66\x69\x6C\x65\x5F\x69\x64","\x74\x69\x6D\x65\x6F\x75\x74","\x64\x69\x67\x69\x74","\x6D\x69\x6E\x64\x69\x67\x69\x74","\x6D\x61\x78\x64\x69\x67\x69\x74","\x72\x65\x74\x72\x79","\x6E\x75\x6D\x62\x65\x72","\x6D\x69\x6E","\x73\x70\x65\x65\x64","\x6B\x65\x79","\x71\x75\x65\x72\x79","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x63\x6F\x6D\x6D\x61\x6E\x64","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x6D\x61\x78\x6C\x65\x6E\x67\x74\x68","\x31\x36\x30","\x73\x6D\x73\x5F\x74\x65\x78\x74","\x68\x65\x6C\x70\x5F","\x70","\x68\x65\x6C\x70\x2D\x62\x6C\x6F\x63\x6B","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x72\x65\x66\x72\x65\x73\x68"];_0x68b4[0];function createCheckbox(_0x7890x2){var _0x7890x3=document[_0x68b4[2]](_0x68b4[1]);_0x7890x3[_0x68b4[5]](_0x68b4[3],_0x68b4[4]);if(_0x7890x2){_0x7890x3[_0x68b4[5]](_0x68b4[6],true)};return _0x7890x3}function createDropdownFromApi(_0x7890x5,_0x7890x2,_0x7890x6,_0x7890x7,_0x7890x8,_0x7890x9,_0x7890xa){var _0x7890xb= new XMLHttpRequest();_0x7890xb[_0x68b4[8]](_0x68b4[7],_0x7890x5,false);_0x7890xb[_0x68b4[14]](_0x68b4[9],_0x68b4[10]+ _0x7890x8[_0x68b4[13]][_0x68b4[12]][_0x68b4[11]]);_0x7890xb[_0x68b4[15]](null);var _0x7890xc=[];if(_0x7890xb[_0x68b4[16]]=== 200){_0x7890xc= JSON[_0x68b4[18]](_0x7890xb[_0x68b4[17]])};var _0x7890x3=document[_0x68b4[2]](_0x68b4[19]);var _0x7890xd=document[_0x68b4[2]](_0x68b4[20]);_0x7890xd[_0x68b4[21]]= _0x68b4[22];_0x7890xd[_0x68b4[23]]= _0x68b4[24];_0x7890x3[_0x68b4[25]](_0x7890xd);_0x7890xc[_0x68b4[30]][_0x68b4[28]](function(_0x7890xe){_0x7890xd= document[_0x68b4[2]](_0x68b4[20]);_0x7890xd[_0x68b4[21]]= _0x7890xe[_0x7890x6];if(_0x7890x9&& _0x7890xa){_0x7890xd[_0x68b4[23]]= _0x7890xa;_0x7890x9[_0x68b4[28]](function(_0x7890xf){_0x7890xd[_0x68b4[23]]= _0x7890xd[_0x68b4[23]][_0x68b4[27]](_0x68b4[26]+ _0x7890xf+ _0x68b4[26],_0x7890xe[_0x7890xf])});_0x7890xd[_0x68b4[29]]= (_0x7890xd[_0x68b4[23]]== _0x7890x2)}else {_0x7890xd[_0x68b4[23]]= _0x7890xe[_0x7890x7];_0x7890xd[_0x68b4[29]]= (_0x7890xe[_0x7890x7]== _0x7890x2)};_0x7890x3[_0x68b4[25]](_0x7890xd)});_0x7890x3[_0x68b4[31]]= _0x68b4[32];return _0x7890x3}function createDropdownWithOptgroupFromApi(_0x7890x5,_0x7890x2,_0x7890x6,_0x7890x7,_0x7890x8,_0x7890x11){var _0x7890xb= new XMLHttpRequest();_0x7890xb[_0x68b4[8]](_0x68b4[7],_0x7890x5,false);_0x7890xb[_0x68b4[14]](_0x68b4[9],_0x68b4[10]+ _0x7890x8[_0x68b4[13]][_0x68b4[12]][_0x68b4[11]]);_0x7890xb[_0x68b4[15]](null);var _0x7890xc=[];if(_0x7890xb[_0x68b4[16]]=== 200){_0x7890xc= JSON[_0x68b4[18]](_0x7890xb[_0x68b4[17]])};var _0x7890x3=document[_0x68b4[2]](_0x68b4[19]);var _0x7890xd=document[_0x68b4[2]](_0x68b4[20]);_0x7890xd[_0x68b4[21]]= _0x68b4[22];_0x7890xd[_0x68b4[23]]= _0x68b4[24];_0x7890x3[_0x68b4[25]](_0x7890xd);var _0x7890x12=_[_0x68b4[33]](_0x7890xc[_0x68b4[30]],_0x7890x11);for(var _0x7890x13 in _0x7890x12){if(_0x7890x12[_0x68b4[34]](_0x7890x13)){var _0x7890x14=document[_0x68b4[2]](_0x68b4[35]);_0x7890x14[_0x68b4[36]]= _[_0x68b4[37]](_0x7890x13);var _0x7890x15=_0x7890x12[_0x7890x13];_0x7890x15[_0x68b4[28]](function(_0x7890xe){_0x7890xd= document[_0x68b4[2]](_0x68b4[20]);_0x7890xd[_0x68b4[21]]= _0x7890xe[_0x7890x6];_0x7890xd[_0x68b4[23]]= _0x7890xe[_0x7890x7];_0x7890xd[_0x68b4[29]]= (_0x7890xe[_0x7890x7]== _0x7890x2);_0x7890x14[_0x68b4[25]](_0x7890xd)});_0x7890x3[_0x68b4[25]](_0x7890x14)}};_0x7890x3[_0x68b4[31]]= _0x68b4[32];return _0x7890x3}function createGroupedDropdownFromApi(_0x7890x5,_0x7890x2,_0x7890x6,_0x7890x7,_0x7890x8,_0x7890x17){var _0x7890xb= new XMLHttpRequest();_0x7890xb[_0x68b4[8]](_0x68b4[7],_0x7890x5,false);_0x7890xb[_0x68b4[14]](_0x68b4[9],_0x68b4[10]+ _0x7890x8[_0x68b4[13]][_0x68b4[12]][_0x68b4[11]]);_0x7890xb[_0x68b4[15]](null);var _0x7890xc=[];if(_0x7890xb[_0x68b4[16]]=== 200){_0x7890xc= JSON[_0x68b4[18]](_0x7890xb[_0x68b4[17]])};var _0x7890x3=document[_0x68b4[2]](_0x68b4[19]);var _0x7890xd=document[_0x68b4[2]](_0x68b4[20]);_0x7890xd[_0x68b4[21]]= _0x68b4[22];_0x7890xd[_0x68b4[23]]= _0x68b4[38];_0x7890x3[_0x68b4[25]](_0x7890xd);_0x7890xc[_0x68b4[30]][_0x68b4[28]](function(_0x7890xe){_0x7890xd= document[_0x68b4[2]](_0x68b4[20]);_0x7890xd[_0x68b4[31]]= _0x68b4[39];_0x7890xd[_0x68b4[21]]= _0x7890xe[_0x7890x6][_0x68b4[40]]();_0x7890xd[_0x68b4[23]]= _0x7890xe[_0x7890x7];_0x7890xd[_0x68b4[29]]= (_0x7890xe[_0x7890x7]== _0x7890x2);_0x7890x3[_0x68b4[25]](_0x7890xd);_0x7890xe[_0x7890x17][_0x68b4[28]](function(_0x7890xe){_0x7890xd= document[_0x68b4[2]](_0x68b4[20]);_0x7890xd[_0x68b4[31]]= _0x68b4[41];_0x7890xd[_0x68b4[21]]= _0x68b4[42]+ _[_0x68b4[37]](_0x7890xe[_0x7890x6]);_0x7890xd[_0x68b4[23]]= _0x7890xe[_0x7890x7];_0x7890xd[_0x68b4[29]]= (_0x7890xe[_0x7890x7]== _0x7890x2);_0x7890x3[_0x68b4[25]](_0x7890xd)})});_0x7890x3[_0x68b4[31]]= _0x68b4[32];return _0x7890x3}function createDropdownFromArray(_0x7890x19,_0x7890x2){var _0x7890x3=document[_0x68b4[2]](_0x68b4[19]);for(var _0x7890x1a in _0x7890x19){var _0x7890xd=document[_0x68b4[2]](_0x68b4[20]);_0x7890xd[_0x68b4[21]]= _0x7890x19[_0x7890x1a];_0x7890xd[_0x68b4[23]]= _0x7890x1a;if(_0x7890x2> 0|| _0x7890x2!= _0x68b4[43]){_0x7890xd[_0x68b4[29]]= (_0x7890x2=== _0x7890x1a)?true:false};_0x7890x3[_0x68b4[25]](_0x7890xd)};_0x7890x3[_0x68b4[31]]= _0x68b4[32];return _0x7890x3}function createDropdownFromTigerDialList(_0x7890x2){var _0x7890x3=document[_0x68b4[2]](_0x68b4[19]);var _0x7890x19=[];var _0x7890x1c= new XMLHttpRequest();try{_0x7890x1c[_0x68b4[8]](_0x68b4[44],_0x68b4[45],false);_0x7890x1c[_0x68b4[15]](JSON[_0x68b4[46]]({page:1,size:600000}));if(_0x7890x1c[_0x68b4[16]]=== 200){var _0x7890xc=JSON[_0x68b4[18]](_0x7890x1c[_0x68b4[17]]);if(_0x7890xc[_0x68b4[16]]> 0){var _0x7890x1d=_0x7890xc[_0x68b4[17]][_0x68b4[47]][_0x68b4[30]];for(var _0x7890x1e in _0x7890x1d){_0x7890x19[_0x7890x1d[_0x7890x1e][_0x68b4[48]]]= _0x7890x1d[_0x7890x1e][_0x68b4[49]]}}}}catch(e){console[_0x68b4[50]](e)};for(var _0x7890x1a in _0x7890x19){var _0x7890xd=document[_0x68b4[2]](_0x68b4[20]);_0x7890xd[_0x68b4[21]]= _0x7890x19[_0x7890x1a];_0x7890xd[_0x68b4[23]]= _0x7890x1a;if(_0x7890x2> 0|| _0x7890x2!= _0x68b4[43]){_0x7890xd[_0x68b4[29]]= (_0x7890x2=== _0x7890x1a)?true:false};_0x7890x3[_0x68b4[25]](_0x7890xd)};_0x7890x3[_0x68b4[31]]= _0x68b4[32];return _0x7890x3}function Dialog(_0x7890x8,_0x7890x20,_0x7890x21,_0x7890x22,_0x7890x23,_0x7890x24,_0x7890x25){var _0x7890x26=0;if(mxClient[_0x68b4[51]]&& document[_0x68b4[52]]!= 9){_0x7890x26= 60};_0x7890x21+= _0x7890x26;_0x7890x22+= _0x7890x26;var _0x7890x27=Math[_0x68b4[56]](0,Math[_0x68b4[55]]((document[_0x68b4[54]][_0x68b4[53]]- _0x7890x21)/ 2));var _0x7890x28=Math[_0x68b4[56]](0,Math[_0x68b4[55]]((Math[_0x68b4[56]](document[_0x68b4[54]][_0x68b4[57]],document[_0x68b4[58]][_0x68b4[57]])- _0x7890x22)/ 3));var _0x7890x29=_0x7890x8[_0x68b4[60]](_0x68b4[59]);_0x7890x29[_0x68b4[31]]= _0x68b4[61];_0x7890x29[_0x68b4[63]][_0x68b4[62]]= _0x68b4[64];_0x7890x29[_0x68b4[63]][_0x68b4[65]]= _0x68b4[66];var _0x7890x2a=_0x7890x8[_0x68b4[60]](_0x68b4[67]);_0x7890x2a[_0x68b4[31]]= _0x68b4[68];_0x7890x2a[_0x68b4[25]](_0x7890x20);_0x7890x29[_0x68b4[25]](_0x7890x2a);if(this[_0x68b4[69]]== null){this[_0x68b4[69]]= _0x7890x8[_0x68b4[60]](_0x68b4[70]);this[_0x68b4[69]][_0x68b4[31]]= _0x68b4[71];if(mxClient[_0x68b4[72]]){ new mxDivResizer(this[_0x68b4[69]])}};if(_0x7890x23){document[_0x68b4[54]][_0x68b4[25]](this[_0x68b4[69]])};document[_0x68b4[54]][_0x68b4[25]](_0x7890x29);this[_0x68b4[73]]= _0x7890x25;this[_0x68b4[74]]= _0x7890x29}Dialog[_0x68b4[76]][_0x68b4[75]]= function(){if(this[_0x68b4[73]]!= null){this[_0x68b4[73]]();this[_0x68b4[73]]= null};this[_0x68b4[74]][_0x68b4[78]][_0x68b4[77]](this[_0x68b4[74]]);this[_0x68b4[69]][_0x68b4[78]][_0x68b4[77]](this[_0x68b4[69]])};function ImportDialog(_0x7890x8){var _0x7890x2c=_0x7890x8[_0x68b4[60]](_0x68b4[79]);var _0x7890x2d=_0x7890x8[_0x68b4[60]](_0x68b4[80]);var _0x7890x2e=_0x7890x8[_0x68b4[60]](_0x68b4[81]);var _0x7890x2f=_0x7890x8[_0x68b4[60]](_0x68b4[82]);var _0x7890x30=_0x7890x8[_0x68b4[84]](_0x68b4[83]);mxUtils[_0x68b4[88]](_0x7890x30,mxResources[_0x68b4[86]](_0x68b4[85])+ _0x68b4[87]);var _0x7890x31=mxUtils[_0x68b4[90]](_0x68b4[43],function(){_0x7890x8[_0x68b4[89]]()});_0x7890x31[_0x68b4[31]]= _0x68b4[75];_0x7890x2d[_0x68b4[25]](_0x7890x31);_0x7890x2d[_0x68b4[25]](_0x7890x30);var _0x7890x32=_0x7890x8[_0x68b4[60]](_0x68b4[91]);var _0x7890x33=_0x7890x8[_0x68b4[60]](_0x68b4[92]);var _0x7890x34=document[_0x68b4[2]](_0x68b4[93]);_0x7890x34[_0x68b4[63]][_0x68b4[94]]= _0x68b4[95];_0x7890x34[_0x68b4[63]][_0x68b4[96]]= _0x68b4[97];var _0x7890x3=document[_0x68b4[2]](_0x68b4[1]);_0x7890x3[_0x68b4[3]]= _0x68b4[98];_0x7890x3[_0x68b4[5]](_0x68b4[99],_0x68b4[100]);_0x7890x3[_0x68b4[109]](_0x68b4[101],function _0x7890x35(_0x7890x36){var _0x7890x37=_0x7890x36[_0x68b4[103]][_0x68b4[102]][0];console[_0x68b4[50]](_0x7890x37);if(_0x7890x37){if(_0x7890x37[_0x68b4[3]]=== _0x68b4[100]){var _0x7890x38= new FileReader();_0x7890x38[_0x68b4[104]]= function(_0x7890x39){var _0x7890x3a=_0x7890x39[_0x68b4[103]][_0x68b4[105]];mxUtils[_0x68b4[88]](_0x7890x34,_0x7890x3a)};_0x7890x38[_0x68b4[106]](_0x7890x37)}else {alert(_0x68b4[107])}}else {alert(_0x68b4[108])}},false);_0x7890x33[_0x68b4[25]](_0x7890x3);_0x7890x33[_0x68b4[25]](_0x7890x34);_0x7890x32[_0x68b4[25]](_0x7890x33);_0x7890x2e[_0x68b4[25]](_0x7890x32);var _0x7890x3b=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[85]),mxUtils[_0x68b4[112]](this,function(_0x7890x3c){var _0x7890x3d=mxUtils[_0x68b4[110]](_0x7890x34[_0x68b4[23]]);_0x7890x8[_0x68b4[13]][_0x68b4[111]](_0x7890x3d[_0x68b4[58]]);_0x7890x8[_0x68b4[89]]()}));_0x7890x3b[_0x68b4[31]]= _0x68b4[113];var _0x7890x3e=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[114]),function(){_0x7890x8[_0x68b4[89]]()});_0x7890x3e[_0x68b4[31]]= _0x68b4[115];_0x7890x2f[_0x68b4[25]](_0x7890x3b);_0x7890x2f[_0x68b4[25]](_0x7890x3e);_0x7890x2c[_0x68b4[25]](_0x7890x2d);_0x7890x2c[_0x68b4[25]](_0x7890x2e);_0x7890x2c[_0x68b4[25]](_0x7890x2f);this[_0x68b4[74]]= _0x7890x2c}function AboutDialog(_0x7890x8){var _0x7890x2c=_0x7890x8[_0x68b4[60]](_0x68b4[79]);var _0x7890x2d=_0x7890x8[_0x68b4[60]](_0x68b4[80]);var _0x7890x2e=_0x7890x8[_0x68b4[60]](_0x68b4[81]);var _0x7890x2f=_0x7890x8[_0x68b4[60]](_0x68b4[82]);var _0x7890x30=_0x7890x8[_0x68b4[84]](_0x68b4[83]);mxUtils[_0x68b4[88]](_0x7890x30,mxResources[_0x68b4[86]](_0x68b4[116])+ _0x68b4[117]);var _0x7890x31=mxUtils[_0x68b4[90]](_0x68b4[43],function(){_0x7890x8[_0x68b4[89]]()});_0x7890x31[_0x68b4[31]]= _0x68b4[75];_0x7890x2d[_0x68b4[25]](_0x7890x31);_0x7890x2d[_0x68b4[25]](_0x7890x30);var _0x7890x40=document[_0x68b4[2]](_0x68b4[118]);_0x7890x40[_0x68b4[63]][_0x68b4[119]]= _0x68b4[120];_0x7890x40[_0x68b4[5]](_0x68b4[94],_0x68b4[121]);_0x7890x40[_0x68b4[5]](_0x68b4[94],_0x68b4[122]);_0x7890x40[_0x68b4[5]](_0x68b4[123],IMAGE_PATH+ _0x68b4[124]);_0x7890x2e[_0x68b4[25]](_0x7890x40);mxUtils[_0x68b4[125]](_0x7890x2e);mxUtils[_0x68b4[88]](_0x7890x2e,_0x68b4[126]+ mxClient[_0x68b4[127]]);mxUtils[_0x68b4[125]](_0x7890x2e);var _0x7890x41=document[_0x68b4[2]](_0x68b4[128]);_0x7890x41[_0x68b4[5]](_0x68b4[129],_0x68b4[130]);_0x7890x41[_0x68b4[5]](_0x68b4[103],_0x68b4[131]);mxUtils[_0x68b4[88]](_0x7890x41,_0x68b4[132]);_0x7890x2e[_0x68b4[25]](_0x7890x41);mxUtils[_0x68b4[125]](_0x7890x2e);mxUtils[_0x68b4[125]](_0x7890x2e);var _0x7890x3e=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[75]),function(){_0x7890x8[_0x68b4[89]]()});_0x7890x3e[_0x68b4[31]]= _0x68b4[115];_0x7890x2f[_0x68b4[25]](_0x7890x3e);_0x7890x2c[_0x68b4[25]](_0x7890x2d);_0x7890x2c[_0x68b4[25]](_0x7890x2e);_0x7890x2c[_0x68b4[25]](_0x7890x2f);this[_0x68b4[74]]= _0x7890x2c}function SaveDialog(_0x7890x8){var _0x7890x2c=_0x7890x8[_0x68b4[60]](_0x68b4[79]);var _0x7890x2d=_0x7890x8[_0x68b4[60]](_0x68b4[80]);var _0x7890x2e=_0x7890x8[_0x68b4[60]](_0x68b4[81]);var _0x7890x2f=_0x7890x8[_0x68b4[60]](_0x68b4[82]);var _0x7890x30=_0x7890x8[_0x68b4[84]](_0x68b4[83]);mxUtils[_0x68b4[88]](_0x7890x30,mxResources[_0x68b4[86]](_0x68b4[133]));var _0x7890x31=mxUtils[_0x68b4[90]](_0x68b4[43],function(){_0x7890x8[_0x68b4[89]]()});_0x7890x31[_0x68b4[31]]= _0x68b4[75];_0x7890x2d[_0x68b4[25]](_0x7890x31);_0x7890x2d[_0x68b4[25]](_0x7890x30);var _0x7890x43=_0x68b4[49];var _0x7890x44=_0x68b4[134]+ _0x7890x43;var _0x7890x2=_0x7890x8[_0x68b4[13]][_0x68b4[135]]();var _0x7890x32=_0x7890x8[_0x68b4[60]](_0x68b4[91]);var _0x7890x33=_0x7890x8[_0x68b4[60]](_0x68b4[136]);var _0x7890x45=_0x7890x8[_0x68b4[60]](_0x68b4[137]);var _0x7890x46=document[_0x68b4[2]](_0x68b4[36]);_0x7890x46[_0x68b4[31]]= _0x68b4[138];mxUtils[_0x68b4[88]](_0x7890x46,mxResources[_0x68b4[86]](_0x7890x43));_0x7890x33[_0x68b4[25]](_0x7890x46);var _0x7890x47=document[_0x68b4[2]](_0x68b4[1]);_0x7890x47[_0x68b4[5]](_0x68b4[23],_0x7890x2+ _0x68b4[139]);_0x7890x47[_0x68b4[5]](_0x68b4[48],_0x7890x44);_0x7890x47[_0x68b4[31]]= _0x68b4[140];_0x7890x45[_0x68b4[25]](_0x7890x47);_0x7890x32[_0x68b4[25]](_0x7890x33);_0x7890x32[_0x68b4[25]](_0x7890x45);_0x7890x2e[_0x68b4[25]](_0x7890x32);var _0x7890x3b=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[141]),function(){_0x7890x8[_0x68b4[133]](_0x7890x47[_0x68b4[23]]);_0x7890x8[_0x68b4[89]]()});_0x7890x3b[_0x68b4[31]]= _0x68b4[113];var _0x7890x3e=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[114]),function(){_0x7890x8[_0x68b4[89]]()});_0x7890x3e[_0x68b4[31]]= _0x68b4[115];_0x7890x2f[_0x68b4[25]](_0x7890x3b);_0x7890x2f[_0x68b4[25]](_0x7890x3e);_0x7890x2c[_0x68b4[25]](_0x7890x2d);_0x7890x2c[_0x68b4[25]](_0x7890x2e);_0x7890x2c[_0x68b4[25]](_0x7890x2f);this[_0x68b4[74]]= _0x7890x2c}function NewDialog(_0x7890x8){var _0x7890x2c=_0x7890x8[_0x68b4[60]](_0x68b4[79]);var _0x7890x2d=_0x7890x8[_0x68b4[60]](_0x68b4[80]);var _0x7890x2e=_0x7890x8[_0x68b4[60]](_0x68b4[81]);var _0x7890x2f=_0x7890x8[_0x68b4[60]](_0x68b4[82]);var _0x7890x30=_0x7890x8[_0x68b4[84]](_0x68b4[83]);mxUtils[_0x68b4[88]](_0x7890x30,mxResources[_0x68b4[86]](_0x68b4[142]));var _0x7890x31=mxUtils[_0x68b4[90]](_0x68b4[43],function(){_0x7890x8[_0x68b4[89]]()});_0x7890x31[_0x68b4[31]]= _0x68b4[75];_0x7890x2d[_0x68b4[25]](_0x7890x31);_0x7890x2d[_0x68b4[25]](_0x7890x30);var _0x7890x43=_0x68b4[49];var _0x7890x44=_0x68b4[134]+ _0x7890x43;var _0x7890x2=_0x7890x8[_0x68b4[13]][_0x68b4[135]]();var _0x7890x32=_0x7890x8[_0x68b4[60]](_0x68b4[91]);var _0x7890x33=_0x7890x8[_0x68b4[60]](_0x68b4[136]);var _0x7890x45=_0x7890x8[_0x68b4[60]](_0x68b4[137]);var _0x7890x46=document[_0x68b4[2]](_0x68b4[36]);_0x7890x46[_0x68b4[31]]= _0x68b4[138];mxUtils[_0x68b4[88]](_0x7890x46,mxResources[_0x68b4[86]](_0x7890x43));_0x7890x33[_0x68b4[25]](_0x7890x46);var _0x7890x47=document[_0x68b4[2]](_0x68b4[1]);_0x7890x47[_0x68b4[5]](_0x68b4[23],_0x7890x2+ _0x68b4[143]);_0x7890x47[_0x68b4[5]](_0x68b4[48],_0x7890x44);_0x7890x47[_0x68b4[31]]= _0x68b4[140];_0x7890x45[_0x68b4[25]](_0x7890x47);_0x7890x32[_0x68b4[25]](_0x7890x33);_0x7890x32[_0x68b4[25]](_0x7890x45);_0x7890x2e[_0x68b4[25]](_0x7890x32);var _0x7890x3b=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[142]),function(){_0x7890x8[_0x68b4[142]](_0x7890x47[_0x68b4[23]]);_0x7890x8[_0x68b4[89]]()});_0x7890x3b[_0x68b4[31]]= _0x68b4[113];var _0x7890x3e=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[114]),function(){_0x7890x8[_0x68b4[89]]()});_0x7890x3e[_0x68b4[31]]= _0x68b4[115];_0x7890x2f[_0x68b4[25]](_0x7890x3b);_0x7890x2f[_0x68b4[25]](_0x7890x3e);_0x7890x2c[_0x68b4[25]](_0x7890x2d);_0x7890x2c[_0x68b4[25]](_0x7890x2e);_0x7890x2c[_0x68b4[25]](_0x7890x2f);this[_0x68b4[74]]= _0x7890x2c}function DescriptionDialog(_0x7890x8){console[_0x68b4[50]](_0x7890x8[_0x68b4[13]][_0x68b4[12]]);var _0x7890x2c=_0x7890x8[_0x68b4[60]](_0x68b4[79]);var _0x7890x2d=_0x7890x8[_0x68b4[60]](_0x68b4[80]);var _0x7890x2e=_0x7890x8[_0x68b4[60]](_0x68b4[81]);var _0x7890x2f=_0x7890x8[_0x68b4[60]](_0x68b4[82]);var _0x7890x30=_0x7890x8[_0x68b4[84]](_0x68b4[83]);mxUtils[_0x68b4[88]](_0x7890x30,mxResources[_0x68b4[86]](_0x68b4[144]));var _0x7890x31=mxUtils[_0x68b4[90]](_0x68b4[43],function(){_0x7890x8[_0x68b4[89]]()});_0x7890x31[_0x68b4[31]]= _0x68b4[75];_0x7890x2d[_0x68b4[25]](_0x7890x31);_0x7890x2d[_0x68b4[25]](_0x7890x30);var _0x7890x4a=_0x7890x8[_0x68b4[60]](_0x68b4[145]);var _0x7890x43=_0x68b4[144];var _0x7890x44=_0x68b4[134]+ _0x7890x43;var _0x7890x2=_0x7890x8[_0x68b4[13]][_0x68b4[12]][_0x68b4[144]]|| _0x68b4[43];var _0x7890x13=_0x7890x8[_0x68b4[60]](_0x68b4[146]);var _0x7890x46=document[_0x68b4[2]](_0x68b4[36]);_0x7890x46[_0x68b4[31]]= _0x68b4[147];mxUtils[_0x68b4[88]](_0x7890x46,mxResources[_0x68b4[86]](_0x7890x43));_0x7890x13[_0x68b4[25]](_0x7890x46);var _0x7890x3=document[_0x68b4[2]](_0x68b4[1]);_0x7890x3[_0x68b4[5]](_0x68b4[23],_0x7890x2);_0x7890x3[_0x68b4[31]]= _0x68b4[140];_0x7890x3[_0x68b4[5]](_0x68b4[48],_0x7890x44);var _0x7890x29=_0x7890x8[_0x68b4[60]](_0x68b4[148]);_0x7890x29[_0x68b4[25]](_0x7890x3);_0x7890x13[_0x68b4[25]](_0x7890x29);_0x7890x4a[_0x68b4[25]](_0x7890x13);_0x7890x2e[_0x68b4[25]](_0x7890x4a);var _0x7890x3b=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[149]),function(){_0x7890x8[_0x68b4[144]](_0x7890x3[_0x68b4[23]]);_0x7890x8[_0x68b4[89]]()});_0x7890x3b[_0x68b4[31]]= _0x68b4[113];var _0x7890x3e=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[114]),function(){_0x7890x8[_0x68b4[89]]()});_0x7890x3e[_0x68b4[31]]= _0x68b4[115];_0x7890x2f[_0x68b4[25]](_0x7890x3b);_0x7890x2f[_0x68b4[25]](_0x7890x3e);_0x7890x2c[_0x68b4[25]](_0x7890x2d);_0x7890x2c[_0x68b4[25]](_0x7890x2e);_0x7890x2c[_0x68b4[25]](_0x7890x2f);this[_0x68b4[74]]= _0x7890x2c}function VariableDialog(_0x7890x8){var _0x7890x2c=_0x7890x8[_0x68b4[60]](_0x68b4[79]);var _0x7890x2d=_0x7890x8[_0x68b4[60]](_0x68b4[80]);var _0x7890x2e=_0x7890x8[_0x68b4[60]](_0x68b4[81]);var _0x7890x2f=_0x7890x8[_0x68b4[60]](_0x68b4[82]);var _0x7890x30=_0x7890x8[_0x68b4[84]](_0x68b4[83]);mxUtils[_0x68b4[88]](_0x7890x30,mxResources[_0x68b4[86]](_0x68b4[150]));var _0x7890x31=mxUtils[_0x68b4[90]](_0x68b4[43],function(){_0x7890x8[_0x68b4[89]]()});_0x7890x31[_0x68b4[31]]= _0x68b4[75];_0x7890x2d[_0x68b4[25]](_0x7890x31);_0x7890x2d[_0x68b4[25]](_0x7890x30);var _0x7890x4a=_0x7890x8[_0x68b4[60]](_0x68b4[145]);var _0x7890x43=_0x68b4[49];var _0x7890x44=_0x68b4[134]+ _0x7890x43;var _0x7890x2=_0x68b4[151];var _0x7890x13=_0x7890x8[_0x68b4[60]](_0x68b4[146]);var _0x7890x46=document[_0x68b4[2]](_0x68b4[36]);_0x7890x46[_0x68b4[31]]= _0x68b4[147];mxUtils[_0x68b4[88]](_0x7890x46,mxResources[_0x68b4[86]](_0x7890x43));_0x7890x13[_0x68b4[25]](_0x7890x46);var _0x7890x3=document[_0x68b4[2]](_0x68b4[1]);_0x7890x3[_0x68b4[5]](_0x68b4[23],_0x7890x2);_0x7890x3[_0x68b4[31]]= _0x68b4[140];_0x7890x3[_0x68b4[5]](_0x68b4[48],_0x7890x44);var _0x7890x29=_0x7890x8[_0x68b4[60]](_0x68b4[148]);_0x7890x29[_0x68b4[25]](_0x7890x3);_0x7890x13[_0x68b4[25]](_0x7890x29);_0x7890x4a[_0x68b4[25]](_0x7890x13);_0x7890x43= _0x68b4[144];_0x7890x44= _0x68b4[134]+ _0x7890x43;_0x7890x2= _0x68b4[152];_0x7890x13= _0x7890x8[_0x68b4[60]](_0x68b4[153]);_0x7890x46= document[_0x68b4[2]](_0x68b4[36]);_0x7890x46[_0x68b4[31]]= _0x68b4[147];mxUtils[_0x68b4[88]](_0x7890x46,mxResources[_0x68b4[86]](_0x7890x43));_0x7890x13[_0x68b4[25]](_0x7890x46);var _0x7890x4c=document[_0x68b4[2]](_0x68b4[1]);_0x7890x4c[_0x68b4[5]](_0x68b4[23],_0x7890x2);_0x7890x4c[_0x68b4[31]]= _0x68b4[140];_0x7890x4c[_0x68b4[5]](_0x68b4[48],_0x7890x44);_0x7890x29= _0x7890x8[_0x68b4[60]](_0x68b4[148]);_0x7890x29[_0x68b4[25]](_0x7890x4c);_0x7890x13[_0x68b4[25]](_0x7890x29);_0x7890x4a[_0x68b4[25]](_0x7890x13);_0x7890x2e[_0x68b4[25]](_0x7890x4a);var _0x7890x3b=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[142]),function(){_0x7890x8[_0x68b4[150]](_0x7890x3[_0x68b4[23]],_0x7890x4c[_0x68b4[23]]);_0x7890x8[_0x68b4[89]]()});_0x7890x3b[_0x68b4[31]]= _0x68b4[113];var _0x7890x3e=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[114]),function(){_0x7890x8[_0x68b4[89]]()});_0x7890x3e[_0x68b4[31]]= _0x68b4[115];_0x7890x2f[_0x68b4[25]](_0x7890x3b);_0x7890x2f[_0x68b4[25]](_0x7890x3e);_0x7890x2c[_0x68b4[25]](_0x7890x2d);_0x7890x2c[_0x68b4[25]](_0x7890x2e);_0x7890x2c[_0x68b4[25]](_0x7890x2f);this[_0x68b4[74]]= _0x7890x2c}function OpenDialog(_0x7890x8){var _0x7890x2c=_0x7890x8[_0x68b4[60]](_0x68b4[79]);var _0x7890x2d=_0x7890x8[_0x68b4[60]](_0x68b4[80]);var _0x7890x2e=_0x7890x8[_0x68b4[60]](_0x68b4[81]);var _0x7890x2f=_0x7890x8[_0x68b4[60]](_0x68b4[82]);var _0x7890x30=_0x7890x8[_0x68b4[84]](_0x68b4[83]);mxUtils[_0x68b4[88]](_0x7890x30,mxResources[_0x68b4[86]](_0x68b4[8]));var _0x7890x31=mxUtils[_0x68b4[90]](_0x68b4[43],function(){_0x7890x8[_0x68b4[89]]()});_0x7890x31[_0x68b4[31]]= _0x68b4[75];_0x7890x2d[_0x68b4[25]](_0x7890x31);_0x7890x2d[_0x68b4[25]](_0x7890x30);var _0x7890x32=_0x7890x8[_0x68b4[60]](_0x68b4[91]);var _0x7890x33=_0x7890x8[_0x68b4[60]](_0x68b4[136]);var _0x7890x45=_0x7890x8[_0x68b4[60]](_0x68b4[137]);var _0x7890x46=document[_0x68b4[2]](_0x68b4[36]);_0x7890x46[_0x68b4[31]]= _0x68b4[138];mxUtils[_0x68b4[88]](_0x7890x46,mxResources[_0x68b4[86]](_0x68b4[49]));_0x7890x33[_0x68b4[25]](_0x7890x46);var _0x7890xb= new XMLHttpRequest();_0x7890xb[_0x68b4[8]](_0x68b4[7],_0x68b4[154],false);_0x7890xb[_0x68b4[14]](_0x68b4[9],_0x68b4[10]+ _0x7890x8[_0x68b4[13]][_0x68b4[12]][_0x68b4[11]]);_0x7890xb[_0x68b4[15]](null);var _0x7890xc=[];if(_0x7890xb[_0x68b4[16]]=== 200){_0x7890xc= JSON[_0x68b4[18]](_0x7890xb[_0x68b4[17]])};var _0x7890x47=document[_0x68b4[2]](_0x68b4[19]);for(var _0x7890x4e=0;_0x7890x4e< _0x7890xc[_0x68b4[155]];_0x7890x4e++){var _0x7890xd=document[_0x68b4[2]](_0x68b4[20]);_0x7890xd[_0x68b4[21]]= _0x7890xc[_0x7890x4e][_0x68b4[49]];_0x7890xd[_0x68b4[23]]= _0x7890xc[_0x7890x4e][_0x68b4[48]];_0x7890x47[_0x68b4[25]](_0x7890xd)};_0x7890x47[_0x68b4[31]]= _0x68b4[140];_0x7890x45[_0x68b4[25]](_0x7890x47);_0x7890x32[_0x68b4[25]](_0x7890x33);_0x7890x32[_0x68b4[25]](_0x7890x45);_0x7890x2e[_0x68b4[25]](_0x7890x32);var _0x7890x3b=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[8]),function(){console[_0x68b4[50]](_0x7890x47);console[_0x68b4[50]](_0x7890x47[_0x68b4[23]]);window[_0x68b4[8]](_0x68b4[156]+ _0x7890x47[_0x68b4[23]],_0x68b4[131]);_0x7890x8[_0x68b4[89]]()});_0x7890x3b[_0x68b4[31]]= _0x68b4[113];var _0x7890x3e=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[114]),function(){_0x7890x8[_0x68b4[89]]()});_0x7890x3e[_0x68b4[31]]= _0x68b4[115];_0x7890x2f[_0x68b4[25]](_0x7890x3b);_0x7890x2f[_0x68b4[25]](_0x7890x3e);_0x7890x2c[_0x68b4[25]](_0x7890x2d);_0x7890x2c[_0x68b4[25]](_0x7890x2e);_0x7890x2c[_0x68b4[25]](_0x7890x2f);this[_0x68b4[74]]= _0x7890x2c}function RenameDialog(_0x7890x8){var _0x7890x2c=_0x7890x8[_0x68b4[60]](_0x68b4[79]);var _0x7890x2d=_0x7890x8[_0x68b4[60]](_0x68b4[80]);var _0x7890x2e=_0x7890x8[_0x68b4[60]](_0x68b4[81]);var _0x7890x2f=_0x7890x8[_0x68b4[60]](_0x68b4[82]);var _0x7890x30=_0x7890x8[_0x68b4[84]](_0x68b4[83]);mxUtils[_0x68b4[88]](_0x7890x30,mxResources[_0x68b4[86]](_0x68b4[157]));var _0x7890x31=mxUtils[_0x68b4[90]](_0x68b4[43],function(){_0x7890x8[_0x68b4[89]]()});_0x7890x31[_0x68b4[31]]= _0x68b4[75];_0x7890x2d[_0x68b4[25]](_0x7890x31);_0x7890x2d[_0x68b4[25]](_0x7890x30);var _0x7890x32=_0x7890x8[_0x68b4[60]](_0x68b4[91]);var _0x7890x33=_0x7890x8[_0x68b4[60]](_0x68b4[136]);var _0x7890x45=_0x7890x8[_0x68b4[60]](_0x68b4[137]);var _0x7890x46=document[_0x68b4[2]](_0x68b4[36]);_0x7890x46[_0x68b4[31]]= _0x68b4[138];mxUtils[_0x68b4[88]](_0x7890x46,mxResources[_0x68b4[86]](_0x68b4[49]));_0x7890x33[_0x68b4[25]](_0x7890x46);var _0x7890x43=_0x7890x8[_0x68b4[13]][_0x68b4[158]];var _0x7890x3=document[_0x68b4[2]](_0x68b4[1]);_0x7890x3[_0x68b4[5]](_0x68b4[23],_0x7890x43);_0x7890x3[_0x68b4[31]]= _0x68b4[140];_0x7890x45[_0x68b4[25]](_0x7890x3);_0x7890x32[_0x68b4[25]](_0x7890x33);_0x7890x32[_0x68b4[25]](_0x7890x45);_0x7890x2e[_0x68b4[25]](_0x7890x32);var _0x7890x3b=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[141]),function(){var _0x7890xb= new XMLHttpRequest();_0x7890xb[_0x68b4[8]](_0x68b4[159],SAVE_URL+ _0x7890x8[_0x68b4[13]][_0x68b4[12]][_0x68b4[48]],true);_0x7890xb[_0x68b4[14]](_0x68b4[160],_0x68b4[161]);_0x7890xb[_0x68b4[14]](_0x68b4[9],_0x68b4[10]+ _0x7890x8[_0x68b4[13]][_0x68b4[12]][_0x68b4[11]]);_0x7890xb[_0x68b4[15]](_0x68b4[162]+ _0x7890x3[_0x68b4[23]]);_0x7890xb[_0x68b4[104]]= function(_0x7890x39){if(_0x7890xb[_0x68b4[16]]=== 200){_0x7890x8[_0x68b4[13]][_0x68b4[164]](_0x68b4[163]);_0x7890x8[_0x68b4[13]][_0x68b4[158]]= _0x7890x3[_0x68b4[23]]}else {console[_0x68b4[50]](_0x7890xb[_0x68b4[17]]);_0x7890x8[_0x68b4[13]][_0x68b4[164]](JSON[_0x68b4[18]](_0x7890xb[_0x68b4[17]])[_0x68b4[166]][0][_0x68b4[165]])}};_0x7890xb[_0x68b4[167]]= function(_0x7890x39){mxUtils[_0x68b4[169]](_0x7890xb[_0x68b4[168]])};_0x7890x8[_0x68b4[89]]()});_0x7890x3b[_0x68b4[31]]= _0x68b4[113];var _0x7890x3e=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[114]),function(){_0x7890x8[_0x68b4[89]]()});_0x7890x3e[_0x68b4[31]]= _0x68b4[115];_0x7890x2f[_0x68b4[25]](_0x7890x3b);_0x7890x2f[_0x68b4[25]](_0x7890x3e);_0x7890x2c[_0x68b4[25]](_0x7890x2d);_0x7890x2c[_0x68b4[25]](_0x7890x2e);_0x7890x2c[_0x68b4[25]](_0x7890x2f);this[_0x68b4[74]]= _0x7890x2c}function EditFileDialog(_0x7890x8){var _0x7890x2c=_0x7890x8[_0x68b4[60]](_0x68b4[79]);var _0x7890x2d=_0x7890x8[_0x68b4[60]](_0x68b4[80]);var _0x7890x2e=_0x7890x8[_0x68b4[60]](_0x68b4[81]);var _0x7890x2f=_0x7890x8[_0x68b4[60]](_0x68b4[82]);var _0x7890x30=_0x7890x8[_0x68b4[84]](_0x68b4[83]);mxUtils[_0x68b4[88]](_0x7890x30,mxResources[_0x68b4[86]](_0x68b4[170]));var _0x7890x31=mxUtils[_0x68b4[90]](_0x68b4[43],function(){_0x7890x8[_0x68b4[89]]()});_0x7890x31[_0x68b4[31]]= _0x68b4[75];_0x7890x2d[_0x68b4[25]](_0x7890x31);_0x7890x2d[_0x68b4[25]](_0x7890x30);var _0x7890x32=_0x7890x8[_0x68b4[60]](_0x68b4[91]);var _0x7890x33=_0x7890x8[_0x68b4[60]](_0x68b4[92]);var _0x7890x34=document[_0x68b4[2]](_0x68b4[93]);_0x7890x34[_0x68b4[63]][_0x68b4[94]]= _0x68b4[95];_0x7890x34[_0x68b4[63]][_0x68b4[96]]= _0x68b4[97];_0x7890x34[_0x68b4[23]]= mxUtils[_0x68b4[172]](_0x7890x8[_0x68b4[13]][_0x68b4[171]]());if(fileSupport){function _0x7890x51(_0x7890x36){_0x7890x36[_0x68b4[173]]();_0x7890x36[_0x68b4[174]]();if(_0x7890x36[_0x68b4[175]][_0x68b4[102]][_0x68b4[155]]> 0){var _0x7890x52=_0x7890x36[_0x68b4[175]][_0x68b4[102]][0];var _0x7890x53= new FileReader();_0x7890x53[_0x68b4[104]]= function(_0x7890x39){_0x7890x34[_0x68b4[23]]= _0x7890x39[_0x68b4[103]][_0x68b4[105]]};_0x7890x53[_0x68b4[106]](_0x7890x52)}}function _0x7890x54(_0x7890x36){_0x7890x36[_0x68b4[173]]();_0x7890x36[_0x68b4[174]]()}_0x7890x34[_0x68b4[109]](_0x68b4[176],_0x7890x54,false);_0x7890x34[_0x68b4[109]](_0x68b4[177],_0x7890x51,false)};_0x7890x33[_0x68b4[25]](_0x7890x34);_0x7890x32[_0x68b4[25]](_0x7890x33);_0x7890x2e[_0x68b4[25]](_0x7890x32);var _0x7890x3b=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[141]),function(){var _0x7890x3d=mxUtils[_0x68b4[110]](_0x7890x34[_0x68b4[23]]);_0x7890x8[_0x68b4[13]][_0x68b4[111]](_0x7890x3d[_0x68b4[58]]);_0x7890x8[_0x68b4[89]]()});_0x7890x3b[_0x68b4[31]]= _0x68b4[113];var _0x7890x3e=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[114]),function(){_0x7890x8[_0x68b4[89]]()});_0x7890x3e[_0x68b4[31]]= _0x68b4[115];_0x7890x2f[_0x68b4[25]](_0x7890x3b);_0x7890x2f[_0x68b4[25]](_0x7890x3e);_0x7890x2c[_0x68b4[25]](_0x7890x2d);_0x7890x2c[_0x68b4[25]](_0x7890x2e);_0x7890x2c[_0x68b4[25]](_0x7890x2f);this[_0x68b4[74]]= _0x7890x2c}function ExportDialog(_0x7890x8){var _0x7890x2c=_0x7890x8[_0x68b4[60]](_0x68b4[79]);var _0x7890x2d=_0x7890x8[_0x68b4[60]](_0x68b4[80]);var _0x7890x2e=_0x7890x8[_0x68b4[60]](_0x68b4[178]);var _0x7890x2f=_0x7890x8[_0x68b4[60]](_0x68b4[82]);var _0x7890x30=_0x7890x8[_0x68b4[84]](_0x68b4[83]);mxUtils[_0x68b4[88]](_0x7890x30,mxResources[_0x68b4[86]](_0x68b4[179])+ _0x68b4[87]);var _0x7890x31=mxUtils[_0x68b4[90]](_0x68b4[43],function(){_0x7890x8[_0x68b4[89]]()});_0x7890x31[_0x68b4[31]]= _0x68b4[75];_0x7890x2d[_0x68b4[25]](_0x7890x31);_0x7890x2d[_0x68b4[25]](_0x7890x30);var _0x7890x4a=_0x7890x8[_0x68b4[60]](_0x68b4[145]);var _0x7890x13=_0x7890x8[_0x68b4[60]](_0x68b4[153]);var _0x7890x46=document[_0x68b4[2]](_0x68b4[36]);_0x7890x46[_0x68b4[31]]= _0x68b4[147];mxUtils[_0x68b4[88]](_0x7890x46,mxResources[_0x68b4[86]](_0x68b4[158]));var _0x7890x3=document[_0x68b4[2]](_0x68b4[1]);_0x7890x3[_0x68b4[5]](_0x68b4[23],_0x7890x8[_0x68b4[13]][_0x68b4[135]]());_0x7890x3[_0x68b4[31]]= _0x68b4[140];var _0x7890x29=_0x7890x8[_0x68b4[60]](_0x68b4[148]);_0x7890x29[_0x68b4[25]](_0x7890x3);_0x7890x13[_0x68b4[25]](_0x7890x46);_0x7890x13[_0x68b4[25]](_0x7890x29);_0x7890x4a[_0x68b4[25]](_0x7890x13);_0x7890x2e[_0x68b4[25]](_0x7890x4a);var _0x7890x3b=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[179]),mxUtils[_0x68b4[112]](this,function(_0x7890x3c){_0x7890x8[_0x68b4[141]](false);var _0x7890x56=encodeURIComponent(mxUtils[_0x68b4[180]](_0x7890x8[_0x68b4[13]][_0x68b4[171]]())); new mxXmlRequest(SAVE_URL+ _0x7890x8[_0x68b4[13]][_0x68b4[12]][_0x68b4[48]]+ _0x68b4[182],_0x68b4[183]+ _0x7890x3[_0x68b4[23]],_0x68b4[7])[_0x68b4[181]](document,_0x68b4[131]);_0x7890x8[_0x68b4[89]]()}));_0x7890x3b[_0x68b4[31]]= _0x68b4[113];var _0x7890x3e=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[114]),function(){_0x7890x8[_0x68b4[89]]()});_0x7890x3e[_0x68b4[31]]= _0x68b4[115];_0x7890x2f[_0x68b4[25]](_0x7890x3b);_0x7890x2f[_0x68b4[25]](_0x7890x3e);_0x7890x2c[_0x68b4[25]](_0x7890x2d);_0x7890x2c[_0x68b4[25]](_0x7890x2e);_0x7890x2c[_0x68b4[25]](_0x7890x2f);this[_0x68b4[74]]= _0x7890x2c}function GeneralDialog(_0x7890x8,_0x7890x58){var _0x7890x59=_0x7890x8[_0x68b4[13]][_0x68b4[184]];var _0x7890x2c=_0x7890x8[_0x68b4[60]](_0x68b4[79]);var _0x7890x2d=_0x7890x8[_0x68b4[60]](_0x68b4[80]);var _0x7890x2e=_0x7890x8[_0x68b4[60]](_0x68b4[185]);var _0x7890x2f=_0x7890x8[_0x68b4[60]](_0x68b4[82]);var _0x7890x30=_0x7890x8[_0x68b4[84]](_0x68b4[83]);mxUtils[_0x68b4[88]](_0x7890x30,mxResources[_0x68b4[86]](_0x68b4[170])+ _0x68b4[186]+ mxResources[_0x68b4[86]](_0x7890x58[_0x68b4[23]][_0x68b4[187]]));var _0x7890x31=mxUtils[_0x68b4[90]](_0x68b4[43],function(){_0x7890x8[_0x68b4[89]]()});_0x7890x31[_0x68b4[31]]= _0x68b4[75];_0x7890x2d[_0x68b4[25]](_0x7890x31);_0x7890x2d[_0x68b4[25]](_0x7890x30);var _0x7890x5a=_0x7890x58[_0x68b4[23]][_0x68b4[188]][_0x68b4[155]];var _0x7890x4a=_0x7890x8[_0x68b4[60]](_0x68b4[145]);for(var _0x7890x5b=0;_0x7890x5b< _0x7890x5a;_0x7890x5b++){var _0x7890x43=_0x7890x58[_0x68b4[23]][_0x68b4[188]][_0x7890x5b][_0x68b4[49]];var _0x7890x44=_0x68b4[134]+ _0x7890x43;var _0x7890x2=_0x7890x58[_0x68b4[23]][_0x68b4[188]][_0x7890x5b][_0x68b4[23]];var _0x7890x13=_0x7890x8[_0x68b4[60]]((_0x7890x5b== _0x7890x5a- 1)?_0x68b4[153]:_0x68b4[146]);var _0x7890x46=document[_0x68b4[2]](_0x68b4[36]);_0x7890x46[_0x68b4[31]]= _0x68b4[147];mxUtils[_0x68b4[88]](_0x7890x46,mxResources[_0x68b4[86]](_0x7890x43));_0x7890x13[_0x68b4[25]](_0x7890x46);var _0x7890x3;switch(_0x7890x43){case _0x68b4[192]:_0x7890x3= createDropdownWithOptgroupFromApi(_0x68b4[189],_0x7890x2,_0x68b4[190],_0x68b4[48],_0x7890x8,_0x68b4[191]);break;case _0x68b4[194]:_0x7890x3= createDropdownFromApi(_0x68b4[193],_0x7890x2,_0x68b4[49],_0x68b4[49],_0x7890x8);break;case _0x68b4[196]:_0x7890x3= createDropdownFromApi(_0x68b4[195],_0x7890x2,_0x68b4[49],_0x68b4[49],_0x7890x8);break;case _0x68b4[198]:_0x7890x3= createDropdownFromApi(_0x68b4[197],_0x7890x2,_0x68b4[49],_0x68b4[48],_0x7890x8);break;case _0x68b4[203]:if(_0x7890x58[_0x68b4[23]][_0x68b4[187]]== _0x68b4[199]){_0x7890x3= createDropdownFromApi(_0x68b4[200],_0x7890x2,_0x68b4[201],_0x68b4[48],_0x7890x8)}else {_0x7890x3= createDropdownFromApi(_0x68b4[202],_0x7890x2,_0x68b4[49],_0x68b4[48],_0x7890x8)};break;case _0x68b4[205]:_0x7890x3= createDropdownFromApi(_0x68b4[204],_0x7890x2,_0x68b4[49],_0x68b4[48],_0x7890x8);break;case _0x68b4[207]:_0x7890x3= createDropdownFromApi(_0x68b4[206],_0x7890x2,_0x68b4[49],_0x68b4[49],_0x7890x8);break;case _0x68b4[209]:_0x7890x3= createDropdownFromApi(_0x68b4[208],_0x7890x2,_0x68b4[209],_0x68b4[48],_0x7890x8,[_0x68b4[209],_0x68b4[207]],_0x68b4[210]);break;case _0x68b4[211]:_0x7890x3= createDropdownFromArray(ISPEECHASRMODEL,_0x7890x2);break;case _0x68b4[212]:_0x7890x3= createDropdownFromArray(ISPEECHASRLANG,_0x7890x2);break;case _0x68b4[213]:_0x7890x3= createDropdownFromArray(ISPEECHBEEP,_0x7890x2);break;case _0x68b4[214]:_0x7890x3= createDropdownFromArray(SECRETDIGITSPOS,_0x7890x2);break;case _0x68b4[215]:_0x7890x3= createDropdownFromArray(ISPEECHLANG,_0x7890x2);break;case _0x68b4[216]:_0x7890x3= createDropdownFromArray(GOOGLETTSLANG,_0x7890x2);break;case _0x68b4[217]:_0x7890x3= createDropdownFromArray(ASRINTKEYS,_0x7890x2);break;case _0x68b4[218]:_0x7890x3= createDropdownFromArray(RECORDINGFORMAT,_0x7890x2);break;case _0x68b4[219]:_0x7890x3= createDropdownFromArray(BOOLSELECT,_0x7890x2);break;case _0x68b4[220]:_0x7890x3= createDropdownFromTigerDialList(_0x7890x2);break;case _0x68b4[223]:_0x7890x3= createGroupedDropdownFromApi(_0x68b4[221],_0x7890x2,_0x68b4[49],_0x68b4[48],_0x7890x8,_0x68b4[222]);break;case _0x68b4[224]:_0x7890x3= createDropdownFromApi(_0x68b4[154],_0x7890x2,_0x68b4[49],_0x68b4[48],_0x7890x8);break;case _0x68b4[226]:_0x7890x3= createDropdownFromApi(_0x68b4[225],_0x7890x2,_0x68b4[49],_0x68b4[48],_0x7890x8);break;case _0x68b4[229]:_0x7890x3= createDropdownFromApi(_0x68b4[227],_0x7890x2,_0x68b4[228],_0x68b4[48],_0x7890x8);break;case _0x68b4[230]:;case _0x68b4[231]:;case _0x68b4[232]:;case _0x68b4[233]:;case _0x68b4[17]:;case _0x68b4[234]:;case _0x68b4[237]:_0x7890x3= document[_0x68b4[2]](_0x68b4[1]);_0x7890x3[_0x68b4[5]](_0x68b4[3],_0x68b4[235]);_0x7890x3[_0x68b4[5]](_0x68b4[236],0);_0x7890x3[_0x68b4[5]](_0x68b4[56],1000);_0x7890x3[_0x68b4[5]](_0x68b4[23],_0x7890x2);_0x7890x3[_0x68b4[31]]= _0x68b4[140];break;case _0x68b4[21]:;case _0x68b4[238]:;case _0x68b4[239]:;case _0x68b4[240]:;case _0x68b4[241]:;case _0x68b4[54]:_0x7890x3= document[_0x68b4[2]](_0x68b4[93]);_0x7890x3[_0x68b4[242]]= _0x7890x2;_0x7890x3[_0x68b4[31]]= _0x68b4[140];break;case _0x68b4[245]:_0x7890x3= document[_0x68b4[2]](_0x68b4[93]);_0x7890x3[_0x68b4[242]]= _0x7890x2;_0x7890x3[_0x68b4[31]]= _0x68b4[140];_0x7890x3[_0x68b4[5]](_0x68b4[243],_0x68b4[244]);break;default:_0x7890x3= document[_0x68b4[2]](_0x68b4[1]);_0x7890x3[_0x68b4[5]](_0x68b4[23],_0x7890x2);_0x7890x3[_0x68b4[31]]= _0x68b4[140];break};_0x7890x3[_0x68b4[5]](_0x68b4[48],_0x7890x44);var _0x7890x29=_0x7890x8[_0x68b4[60]](_0x68b4[148]);_0x7890x29[_0x68b4[25]](_0x7890x3);if(mxResources[_0x68b4[86]](_0x68b4[246]+ _0x7890x43)){var _0x7890x5c=_0x7890x8[_0x68b4[60]](_0x68b4[247]);_0x7890x5c[_0x68b4[31]]= _0x68b4[248];mxUtils[_0x68b4[88]](_0x7890x5c,mxResources[_0x68b4[86]](_0x68b4[246]+ _0x7890x43));_0x7890x29[_0x68b4[25]](_0x7890x5c)};_0x7890x13[_0x68b4[25]](_0x7890x29);_0x7890x4a[_0x68b4[25]](_0x7890x13)};_0x7890x2e[_0x68b4[25]](_0x7890x4a);var _0x7890x3b=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[141]),mxUtils[_0x68b4[112]](this,function(_0x7890x3c){for(var _0x7890x5b=0;_0x7890x5b< _0x7890x58[_0x68b4[23]][_0x68b4[188]][_0x68b4[155]];_0x7890x5b++){var _0x7890x44=_0x68b4[134]+ _0x7890x58[_0x68b4[23]][_0x68b4[188]][_0x7890x5b][_0x68b4[49]];var _0x7890x43=_0x7890x58[_0x68b4[23]][_0x68b4[188]][_0x7890x5b][_0x68b4[49]];_0x7890x58[_0x68b4[5]](_0x7890x43,document[_0x68b4[249]](_0x7890x44)[_0x68b4[23]])};_0x7890x59[_0x68b4[250]](_0x7890x58);_0x7890x8[_0x68b4[89]]()}));_0x7890x3b[_0x68b4[31]]= _0x68b4[113];var _0x7890x3e=mxUtils[_0x68b4[90]](mxResources[_0x68b4[86]](_0x68b4[114]),function(){_0x7890x8[_0x68b4[89]]()});_0x7890x3e[_0x68b4[31]]= _0x68b4[115];_0x7890x2f[_0x68b4[25]](_0x7890x3b);_0x7890x2f[_0x68b4[25]](_0x7890x3e);_0x7890x2c[_0x68b4[25]](_0x7890x2d);_0x7890x2c[_0x68b4[25]](_0x7890x2e);_0x7890x2c[_0x68b4[25]](_0x7890x2f);this[_0x68b4[74]]= _0x7890x2c}
\ No newline at end of file
diff --git a/public/assets/plugins/square/js/Editor.js b/public/assets/plugins/square/js/Editor.js
index 9858989..634c857 100644
--- a/public/assets/plugins/square/js/Editor.js
+++ b/public/assets/plugins/square/js/Editor.js
@@ -1,888 +1 @@
-/**
- * $Id: Editor.js,v 1.14 2013/03/06 17:57:10 boris Exp $
- * Copyright (c) 2006-2012, JGraph Ltd
- */
-// Specifies if local storage should be used (eg. on the iPad which has no filesystem)
-var useLocalStorage = (mxClient.IS_TOUCH || urlParams['storage'] == 'local') && typeof(localStorage) != 'undefined';
-var fileSupport = window.File != null && window.FileReader != null && window.FileList != null;
-
-// Specifies if connector should be shown on selected cells
-var touchStyle = mxClient.IS_TOUCH || urlParams['touch'] == '1';
-
-// Counts open editor tabs (must be global for cross-window access)
-var counter = 0;
-
-// Cross-domain window access is not allowed in FF, so if we
-// were opened from another domain then this will fail.
-try {
-	var op = window;
-
-	while (op.opener != null && !isNaN(op.opener.counter)) {
-		op = op.opener;
-	}
-
-	// Increments the counter in the first opener in the chain
-	if (op != null) {
-		op.counter++;
-		counter = op.counter;
-	}
-} catch (e) {
-	// ignore
-}
-
-/**
- * Editor constructor executed on page load.
- */
-Editor = function() {
-	mxEventSource.call(this);
-	this.init();
-	this.initStencilRegistry();
-	this.graph = new Graph();
-	this.outline = new mxOutline(this.graph);
-	this.outline.updateOnPan = true;
-	this.undoManager = this.createUndoManager();
-	this.status = '';
-
-	// Contains the name which was used for the last save. Default value is null.
-	this.filename = null;
-
-	this.getOrCreateFilename = function() {
-		return this.filename || mxResources.get('drawing', [counter]) + '.xml';
-	};
-
-	this.getFilename = function() {
-		return this.filename;
-	};
-
-	// Sets the status and fires a statusChanged event
-	this.setStatus = function(value) {
-		this.status = value;
-		this.fireEvent(new mxEventObject('statusChanged'));
-	};
-
-	// Returns the current status
-	this.getStatus = function() {
-		return this.status;
-	};
-
-	// Contains the current modified state of the diagram. This is false for
-	// new diagrams and after the diagram was saved.
-	this.modified = false;
-
-	// Updates modified state if graph changes
-	this.graphChangeListener = function() {
-		this.modified = true;
-	};
-	this.graph.getModel().addListener(mxEvent.CHANGE, mxUtils.bind(this, function() {
-		this.graphChangeListener.apply(this, arguments);
-	}));
-
-	// Installs dialog if browser window is closed without saving
-	// This must be disabled during save and image export
-	window.onbeforeunload = mxUtils.bind(this, function() {
-		if (this.modified) {
-			return mxResources.get('allChangesLost');
-		}
-	});
-
-	// Sets persistent graph state defaults
-	this.graph.resetViewOnRootChange = false;
-	this.graph.scrollbars = true;
-	this.graph.background = null;
-};
-
-// Editor inherits from mxEventSource
-mxUtils.extend(Editor, mxEventSource);
-
-/**
- * Specifies the image URL to be used for the grid.
- */
-Editor.prototype.gridImage = IMAGE_PATH + '/grid.gif';
-
-/**
- * Specifies the image URL to be used for the transparent background.
- */
-Editor.prototype.transparentImage = IMAGE_PATH + '/transparent.gif';
-
-/**
- * Sets the XML node for the current diagram.
- */
-Editor.prototype.setGraphXml = function(node) {
-	var dec = new mxCodec(node.ownerDocument);
-
-	if (node.nodeName == 'mxGraphModel') {
-		this.graph.view.scale = 1;
-		this.graph.gridEnabled = node.getAttribute('grid') != '0';
-		this.graph.graphHandler.guidesEnabled = node.getAttribute('guides') != '0';
-		this.graph.setTooltips(node.getAttribute('tooltips') != '0');
-		this.graph.setConnectable(node.getAttribute('connect') != '0');
-		this.graph.foldingEnabled = node.getAttribute('fold') != '0';
-		this.graph.scrollbars = node.getAttribute('scrollbars') != '0';
-
-		if (!this.graph.scrollbars) {
-			this.graph.container.scrollLeft = 0;
-			this.graph.container.scrollTop = 0;
-			this.graph.view.translate.x = Number(node.getAttribute('dx') || 0);
-			this.graph.view.translate.y = Number(node.getAttribute('dy') || 0);
-		}
-
-		this.graph.pageVisible = node.getAttribute('page') == '1';
-		this.graph.pageBreaksVisible = this.graph.pageVisible;
-		this.graph.preferPageSize = this.graph.pageBreaksVisible;
-
-		// Loads the persistent state settings
-		var ps = node.getAttribute('pageScale');
-
-		if (ps != null) {
-			this.graph.pageScale = ps;
-		} else {
-			this.graph.pageScale = 1.5;
-		}
-
-		var pw = node.getAttribute('pageWidth');
-		var ph = node.getAttribute('pageHeight');
-
-		if (pw != null && ph != null) {
-			this.graph.pageFormat = new mxRectangle(0, 0, parseFloat(pw), parseFloat(ph));
-			this.outline.outline.pageFormat = this.graph.pageFormat;
-		}
-
-		// Loads the persistent state settings
-		var bg = node.getAttribute('background');
-
-		if (bg != null && bg.length > 0) {
-			this.graph.background = bg;
-		}
-
-		dec.decode(node, this.graph.getModel());
-		this.updateGraphComponents();
-	}
-};
-
-/**
- * Returns the XML node that represents the current diagram.
- */
-Editor.prototype.getGraphXml = function() {
-	var enc = new mxCodec(mxUtils.createXmlDocument());
-	var node = enc.encode(this.graph.getModel());
-
-	if (this.graph.view.translate.x != 0 || this.graph.view.translate.y != 0) {
-		node.setAttribute('dx', Math.round(this.graph.view.translate.x * 100) / 100);
-		node.setAttribute('dy', Math.round(this.graph.view.translate.y * 100) / 100);
-	}
-
-	node.setAttribute('grid', (this.graph.isGridEnabled()) ? '1' : '0');
-	node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
-	node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
-	node.setAttribute('tooltips', (this.graph.tooltipHandler.isEnabled()) ? '1' : '0');
-	node.setAttribute('connect', (this.graph.connectionHandler.isEnabled()) ? '1' : '0');
-	node.setAttribute('fold', (this.graph.foldingEnabled) ? '1' : '0');
-	node.setAttribute('page', (this.graph.pageVisible) ? '1' : '0');
-	node.setAttribute('pageScale', this.graph.pageScale);
-	node.setAttribute('pageWidth', this.graph.pageFormat.width);
-	node.setAttribute('pageHeight', this.graph.pageFormat.height);
-
-	if (!this.graph.scrollbars) {
-		node.setAttribute('scrollbars', '0');
-	}
-
-	if (this.graph.background != null) {
-		node.setAttribute('background', this.graph.background);
-	}
-
-	return node;
-};
-
-/**
- * Keeps the graph container in sync with the persistent graph state
- */
-Editor.prototype.updateGraphComponents = function() {
-	var graph = this.graph;
-	var outline = this.outline;
-
-	if (graph.container != null && outline.outline.container != null) {
-		if (graph.background != null) {
-			if (graph.background == 'none') {
-				graph.container.style.backgroundColor = 'transparent';
-			} else {
-				if (graph.view.backgroundPageShape != null) {
-					graph.view.backgroundPageShape.fill = graph.background;
-					graph.view.backgroundPageShape.reconfigure();
-				}
-
-				graph.container.style.backgroundColor = graph.background;
-			}
-		} else {
-			graph.container.style.backgroundColor = '';
-		}
-
-		if (graph.pageVisible) {
-			graph.container.style.backgroundColor = '#ebebeb';
-			graph.container.style.borderStyle = 'solid';
-			graph.container.style.borderColor = '#e5e5e5';
-			graph.container.style.borderTopWidth = '1px';
-			graph.container.style.borderLeftWidth = '1px';
-			graph.container.style.borderRightWidth = '0px';
-			graph.container.style.borderBottomWidth = '0px';
-		} else {
-			graph.container.style.border = '';
-		}
-
-		outline.outline.container.style.backgroundColor = graph.container.style.backgroundColor;
-
-		if (outline.outline.pageVisible != graph.pageVisible ||
-			outline.outline.pageScale != graph.pageScale) {
-			outline.outline.pageScale = graph.pageScale;
-			outline.outline.pageVisible = graph.pageVisible;
-			outline.outline.view.validate();
-		}
-
-		if (graph.scrollbars && graph.container.style.overflow == 'hidden' && !touchStyle) {
-			graph.container.style.overflow = 'auto';
-		} else if (!graph.scrollbars || touchStyle) {
-			graph.container.style.overflow = 'hidden';
-		}
-
-		// Transparent.gif is a workaround for focus repaint problems in IE
-		var noBackground = (mxClient.IS_IE && document.documentMode >= 9) ? 'url(' + this.transparentImage + ')' : 'none';
-		graph.container.style.backgroundImage = (!graph.pageVisible && graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : noBackground;
-
-		if (graph.view.backgroundPageShape != null) {
-			graph.view.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : 'none';
-		}
-	}
-};
-
-/**
- * Initializes the environment.
- */
-Editor.prototype.init = function() {
-	// Adds stylesheet for IE6
-	if (mxClient.IS_IE6) {
-		mxClient.link('stylesheet', CSS_PATH + '/grapheditor-ie6.css');
-	}
-
-	// Adds required resources (disables loading of fallback properties, this can only
-	// be used if we know that all keys are defined in the language specific file)
-	mxResources.loadDefaultBundle = false;
-	mxResources.add(RESOURCE_BASE);
-
-	// Makes the connection hotspot smaller
-	mxConstants.DEFAULT_HOTSPOT = 0.3;
-
-	var mxConnectionHandlerCreateMarker = mxConnectionHandler.prototype.createMarker;
-	mxConnectionHandler.prototype.createMarker = function() {
-		var marker = mxConnectionHandlerCreateMarker.apply(this, arguments);
-
-		// Overrides to ignore hotspot only for target terminal
-		marker.intersects = mxUtils.bind(this, function(state, evt) {
-			if (this.isConnecting()) {
-				return true;
-			}
-
-			return mxCellMarker.prototype.intersects.apply(marker, arguments);
-		});
-
-		return marker;
-	};
-
-	// Makes the shadow brighter
-	mxConstants.SHADOWCOLOR = '#d0d0d0';
-
-	// Changes some default colors
-	mxConstants.HANDLE_FILLCOLOR = '#99ccff';
-	mxConstants.HANDLE_STROKECOLOR = '#0088cf';
-	mxConstants.VERTEX_SELECTION_COLOR = '#00a8ff';
-	mxConstants.OUTLINE_COLOR = '#00a8ff';
-	mxConstants.OUTLINE_HANDLE_FILLCOLOR = '#99ccff';
-	mxConstants.OUTLINE_HANDLE_STROKECOLOR = '#00a8ff';
-	mxConstants.CONNECT_HANDLE_FILLCOLOR = '#cee7ff';
-	mxConstants.EDGE_SELECTION_COLOR = '#00a8ff';
-	mxConstants.DEFAULT_VALID_COLOR = '#00a8ff';
-	mxConstants.LABEL_HANDLE_FILLCOLOR = '#cee7ff';
-	mxConstants.GUIDE_COLOR = '#0088cf';
-
-	mxGraph.prototype.pageBreakColor = '#c0c0c0';
-	mxGraph.prototype.pageScale = 1;
-
-	// Increases default rubberband opacity (default is 20)
-	mxRubberband.prototype.defaultOpacity = 30;
-
-	// Changes border color of background page shape
-	mxGraphView.prototype.createBackgroundPageShape = function(bounds) {
-		return new mxRectangleShape(bounds, this.graph.background || 'white', '#cacaca');
-	};
-
-	// Fits the number of background pages to the graph
-	mxGraphView.prototype.getBackgroundPageBounds = function() {
-		var gb = this.getGraphBounds();
-
-		// Computes unscaled, untranslated graph bounds
-		var x = (gb.width > 0) ? gb.x / this.scale - this.translate.x : 0;
-		var y = (gb.height > 0) ? gb.y / this.scale - this.translate.y : 0;
-		var w = gb.width / this.scale;
-		var h = gb.height / this.scale;
-
-		var fmt = this.graph.pageFormat;
-		var ps = this.graph.pageScale;
-
-		var pw = fmt.width * ps;
-		var ph = fmt.height * ps;
-
-		var x0 = Math.floor(Math.min(0, x) / pw);
-		var y0 = Math.floor(Math.min(0, y) / ph);
-		var xe = Math.ceil(Math.max(1, x + w) / pw);
-		var ye = Math.ceil(Math.max(1, y + h) / ph);
-
-		var rows = xe - x0;
-		var cols = ye - y0;
-
-		var bounds = new mxRectangle(this.scale * (this.translate.x + x0 * pw), this.scale *
-			(this.translate.y + y0 * ph), this.scale * rows * pw, this.scale * cols * ph);
-
-		return bounds;
-	};
-
-	// Add panning for background page in VML
-	var graphPanGraph = mxGraph.prototype.panGraph;
-	mxGraph.prototype.panGraph = function(dx, dy) {
-		graphPanGraph.apply(this, arguments);
-
-		if ((this.dialect != mxConstants.DIALECT_SVG && this.view.backgroundPageShape != null) &&
-			(!this.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.container))) {
-			this.view.backgroundPageShape.node.style.marginLeft = dx + 'px';
-			this.view.backgroundPageShape.node.style.marginTop = dy + 'px';
-		}
-	};
-
-	var editor = this;
-
-	// Uses HTML for background pages (to support grid background image)
-	mxGraphView.prototype.validateBackground = function() {
-		var bg = this.graph.getBackgroundImage();
-
-		if (bg != null) {
-			if (this.backgroundImage == null || this.backgroundImage.image != bg.src) {
-				if (this.backgroundImage != null) {
-					this.backgroundImage.destroy();
-				}
-
-				var bounds = new mxRectangle(0, 0, 1, 1);
-
-				this.backgroundImage = new mxImageShape(bounds, bg.src);
-				this.backgroundImage.dialect = this.graph.dialect;
-				this.backgroundImage.init(this.backgroundPane);
-				this.backgroundImage.redraw();
-			}
-
-			this.redrawBackgroundImage(this.backgroundImage, bg);
-		} else if (this.backgroundImage != null) {
-			this.backgroundImage.destroy();
-			this.backgroundImage = null;
-		}
-
-		if (this.graph.pageVisible) {
-			var bounds = this.getBackgroundPageBounds();
-
-			if (this.backgroundPageShape == null) {
-				this.backgroundPageShape = this.createBackgroundPageShape(bounds);
-				this.backgroundPageShape.scale = 1;
-				this.backgroundPageShape.isShadow = true;
-				this.backgroundPageShape.dialect = mxConstants.DIALECT_STRICTHTML;
-				this.backgroundPageShape.init(this.graph.container);
-				// Required for the browser to render the background page in correct order
-				this.graph.container.firstChild.style.position = 'absolute';
-				this.graph.container.insertBefore(this.backgroundPageShape.node, this.graph.container.firstChild);
-				this.backgroundPageShape.redraw();
-
-				this.backgroundPageShape.node.className = 'geBackgroundPage';
-				this.backgroundPageShape.node.style.backgroundPosition = '-1px -1px';
-
-				// Adds listener for double click handling on background
-				mxEvent.addListener(this.backgroundPageShape.node, 'dblclick',
-					mxUtils.bind(this, function(evt) {
-						this.graph.dblClick(evt);
-					})
-				);
-
-				// Adds basic listeners for graph event dispatching outside of the
-				// container and finishing the handling of a single gesture
-				mxEvent.addGestureListeners(this.backgroundPageShape.node,
-					mxUtils.bind(this, function(evt) {
-						this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt));
-					}),
-					mxUtils.bind(this, function(evt) {
-						// Hides the tooltip if mouse is outside container
-						if (this.graph.tooltipHandler != null &&
-							this.graph.tooltipHandler.isHideOnHover()) {
-							this.graph.tooltipHandler.hide();
-						}
-
-						if (this.graph.isMouseDown &&
-							!mxEvent.isConsumed(evt)) {
-							this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,
-								new mxMouseEvent(evt));
-						}
-					}),
-					mxUtils.bind(this, function(evt) {
-						this.graph.fireMouseEvent(mxEvent.MOUSE_UP,
-							new mxMouseEvent(evt));
-					}));
-			} else {
-				this.backgroundPageShape.scale = 1;
-				this.backgroundPageShape.bounds = bounds;
-				this.backgroundPageShape.redraw();
-			}
-
-			this.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ?
-				'url(' + editor.gridImage + ')' : 'none';
-		} else if (this.backgroundPageShape != null) {
-			this.backgroundPageShape.destroy();
-			this.backgroundPageShape = null;
-		}
-	};
-
-	// Draws page breaks only within the page
-	mxGraph.prototype.updatePageBreaks = function(visible, width, height) {
-		var scale = this.view.scale;
-		var tr = this.view.translate;
-		var fmt = this.pageFormat;
-		var ps = scale * this.pageScale;
-
-		var bounds2 = this.view.getBackgroundPageBounds();
-
-		width = bounds2.width;
-		height = bounds2.height;
-		var bounds = new mxRectangle(scale * tr.x, scale * tr.y,
-			fmt.width * ps, fmt.height * ps);
-
-		// Does not show page breaks if the scale is too small
-		visible = visible && Math.min(bounds.width, bounds.height) > this.minPageBreakDist;
-
-		var horizontalCount = (visible) ? Math.ceil(width / bounds.width) - 1 : 0;
-		var verticalCount = (visible) ? Math.ceil(height / bounds.height) - 1 : 0;
-		var right = bounds2.x + width;
-		var bottom = bounds2.y + height;
-
-		if (this.horizontalPageBreaks == null && horizontalCount > 0) {
-			this.horizontalPageBreaks = [];
-		}
-
-		if (this.horizontalPageBreaks != null) {
-			for (var i = 0; i <= horizontalCount; i++) {
-				var pts = [new mxPoint(bounds2.x + (i + 1) * bounds.width, bounds2.y),
-					new mxPoint(bounds2.x + (i + 1) * bounds.width, bottom)
-				];
-
-				if (this.horizontalPageBreaks[i] != null) {
-					this.horizontalPageBreaks[i].scale = 1;
-					this.horizontalPageBreaks[i].points = pts;
-					this.horizontalPageBreaks[i].redraw();
-				} else {
-					var pageBreak = new mxPolyline(pts, this.pageBreakColor, this.scale);
-					pageBreak.dialect = this.dialect;
-					pageBreak.isDashed = this.pageBreakDashed;
-					pageBreak.addPipe = false;
-					pageBreak.scale = scale;
-					pageBreak.init(this.view.backgroundPane);
-					pageBreak.redraw();
-
-					this.horizontalPageBreaks[i] = pageBreak;
-				}
-			}
-
-			for (var i = horizontalCount; i < this.horizontalPageBreaks.length; i++) {
-				this.horizontalPageBreaks[i].destroy();
-			}
-
-			this.horizontalPageBreaks.splice(horizontalCount, this.horizontalPageBreaks.length - horizontalCount);
-		}
-
-		if (this.verticalPageBreaks == null && verticalCount > 0) {
-			this.verticalPageBreaks = [];
-		}
-
-		if (this.verticalPageBreaks != null) {
-			for (var i = 0; i <= verticalCount; i++) {
-				var pts = [new mxPoint(bounds2.x, bounds2.y + (i + 1) * bounds.height),
-					new mxPoint(right, bounds2.y + (i + 1) * bounds.height)
-				];
-
-				if (this.verticalPageBreaks[i] != null) {
-					this.verticalPageBreaks[i].scale = 1; //scale;
-					this.verticalPageBreaks[i].points = pts;
-					this.verticalPageBreaks[i].redraw();
-				} else {
-					var pageBreak = new mxPolyline(pts, this.pageBreakColor, scale);
-					pageBreak.dialect = this.dialect;
-					pageBreak.isDashed = this.pageBreakDashed;
-					pageBreak.addPipe = false;
-					pageBreak.scale = scale;
-					pageBreak.init(this.view.backgroundPane);
-					pageBreak.redraw();
-
-					this.verticalPageBreaks[i] = pageBreak;
-				}
-			}
-
-			for (var i = verticalCount; i < this.verticalPageBreaks.length; i++) {
-				this.verticalPageBreaks[i].destroy();
-			}
-
-			this.verticalPageBreaks.splice(verticalCount, this.verticalPageBreaks.length - verticalCount);
-		}
-	};
-
-	// Enables snapping to off-grid terminals for edge waypoints
-	mxEdgeHandler.prototype.snapToTerminals = true;
-
-	// Enables guides
-	mxGraphHandler.prototype.guidesEnabled = true;
-
-	// Disables removing relative children from parents
-	var mxGraphHandlerShouldRemoveCellsFromParent = mxGraphHandler.prototype.shouldRemoveCellsFromParent;
-	mxGraphHandler.prototype.shouldRemoveCellsFromParent = function(parent, cells, evt) {
-		for (var i = 0; i < cells.length; i++) {
-			if (this.graph.getModel().isVertex(cells[i])) {
-				var geo = this.graph.getCellGeometry(cells[i]);
-
-				if (geo != null && geo.relative) {
-					return false;
-				}
-			}
-		}
-
-		return mxGraphHandlerShouldRemoveCellsFromParent.apply(this, arguments);
-	};
-
-	// Alt-move disables guides
-	mxGuide.prototype.isEnabledForEvent = function(evt) {
-		return !mxEvent.isAltDown(evt);
-	};
-
-	// Consumes click events for disabled menu items
-	mxPopupMenuAddItem = mxPopupMenu.prototype.addItem;
-	mxPopupMenu.prototype.addItem = function(title, image, funct, parent, iconCls, enabled) {
-		var result = mxPopupMenuAddItem.apply(this, arguments);
-
-		if (enabled != null && !enabled) {
-			mxEvent.addListener(result, 'mousedown', function(evt) {
-				mxEvent.consume(evt);
-			});
-		}
-
-		return result;
-	};
-
-	// Selects descendants before children selection mode
-	var graphHandlerGetInitialCellForEvent = mxGraphHandler.prototype.getInitialCellForEvent;
-	mxGraphHandler.prototype.getInitialCellForEvent = function(me) {
-		var model = this.graph.getModel();
-		var psel = model.getParent(this.graph.getSelectionCell());
-		var cell = graphHandlerGetInitialCellForEvent.apply(this, arguments);
-		var parent = model.getParent(cell);
-
-		if (psel == null || (psel != cell && psel != parent)) {
-			while (!this.graph.isCellSelected(cell) && !this.graph.isCellSelected(parent) &&
-				model.isVertex(parent) && !this.graph.isValidRoot(parent)) {
-				cell = parent;
-				parent = this.graph.getModel().getParent(cell);
-			}
-		}
-
-		return cell;
-	};
-
-	// Selection is delayed to mouseup if child selected
-	var graphHandlerIsDelayedSelection = mxGraphHandler.prototype.isDelayedSelection;
-	mxGraphHandler.prototype.isDelayedSelection = function(cell) {
-		var result = graphHandlerIsDelayedSelection.apply(this, arguments);
-		var model = this.graph.getModel();
-		var psel = model.getParent(this.graph.getSelectionCell());
-		var parent = model.getParent(cell);
-
-		if (psel == null || (psel != cell && psel != parent)) {
-			if (!this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent)) {
-				result = true;
-			}
-		}
-
-		return result;
-	};
-
-	// Delayed selection of parent group
-	mxGraphHandler.prototype.selectDelayed = function(me) {
-		var cell = me.getCell();
-
-		if (cell == null) {
-			cell = this.cell;
-		}
-
-		var model = this.graph.getModel();
-		var parent = model.getParent(cell);
-
-		while (this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent)) {
-			cell = parent;
-			parent = model.getParent(cell);
-		}
-
-		this.graph.selectCellForEvent(cell, me.getEvent());
-	};
-
-	// Returns last selected ancestor
-	mxPanningHandler.prototype.getCellForPopupEvent = function(me) {
-		var cell = me.getCell();
-		var model = this.graph.getModel();
-		var parent = model.getParent(cell);
-
-		while (model.isVertex(parent) && !this.graph.isValidRoot(parent)) {
-			if (this.graph.isCellSelected(parent)) {
-				cell = parent;
-			}
-
-			parent = model.getParent(parent);
-		}
-
-		return cell;
-	};
-};
-
-/**
- * Creates and returns a new undo manager.
- */
-Editor.prototype.createUndoManager = function() {
-	var graph = this.graph;
-	var undoMgr = new mxUndoManager();
-
-	// Installs the command history
-	var listener = function(sender, evt) {
-		undoMgr.undoableEditHappened(evt.getProperty('edit'));
-	};
-
-	graph.getModel().addListener(mxEvent.UNDO, listener);
-	graph.getView().addListener(mxEvent.UNDO, listener);
-
-	// Keeps the selection in sync with the history
-	var undoHandler = function(sender, evt) {
-		var cand = graph.getSelectionCellsForChanges(evt.getProperty('edit').changes);
-		var cells = [];
-
-		for (var i = 1; i < cand.length; i++) {
-			if (graph.view.getState(cand[i]) != null) {
-				cells.push(cand[i]);
-			}
-		}
-
-		graph.setSelectionCells(cells);
-	};
-
-	undoMgr.addListener(mxEvent.UNDO, undoHandler);
-	undoMgr.addListener(mxEvent.REDO, undoHandler);
-
-	return undoMgr;
-};
-
-/**
- * Adds basic stencil set (no namespace).
- */
-Editor.prototype.initStencilRegistry = function() {
-	// Loads default stencils
-	mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/general.xml');
-};
-
-/**
- * Overrides stencil registry for dynamic loading of stencils.
- */
-(function() {
-	/**
-	 * Maps from library names to an array of Javascript filenames,
-	 * which are synchronously loaded. Currently only stencil files
-	 * (.xml) and JS files (.js) are supported.
-	 * IMPORTANT: For embedded diagrams to work entries must also
-	 * be added in EmbedServlet.java.
-	 */
-	mxStencilRegistry.libraries = {};
-
-	/**
-	 * Stores all package names that have been dynamically loaded.
-	 * Each package is only loaded once.
-	 */
-	mxStencilRegistry.packages = [];
-
-	// Extends the default stencil registry to add dynamic loading
-	mxStencilRegistry.getStencil = function(name) {
-		var result = mxStencilRegistry.stencils[name];
-
-		if (result == null) {
-			var basename = mxStencilRegistry.getBasenameForStencil(name);
-
-			// Loads stencil files and tries again
-			if (basename != null) {
-				var libs = mxStencilRegistry.libraries[basename];
-
-				if (libs != null) {
-					if (mxStencilRegistry.packages[basename] == null) {
-						mxStencilRegistry.packages[basename] = 1;
-
-						for (var i = 0; i < libs.length; i++) {
-							var fname = libs[i];
-
-							if (fname.toLowerCase().substring(fname.length - 4, fname.length) == '.xml') {
-								mxStencilRegistry.loadStencilSet(fname, null);
-							} else if (fname.toLowerCase().substring(fname.length - 3, fname.length) == '.js') {
-								var req = mxUtils.load(fname);
-
-								if (req != null) {
-									eval.call(window, req.getText());
-								}
-							} else {
-								// FIXME: This does not yet work as the loading is triggered after
-								// the shape was used in the graph, at which point the keys have
-								// typically been translated in the calling method.
-								//mxResources.add(fname);
-							}
-						}
-					}
-				} else {
-					mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/' + basename + '.xml', null);
-				}
-
-				result = mxStencilRegistry.stencils[name];
-			}
-		}
-
-		return result;
-	};
-
-	// Returns the basename for the given stencil or null if no file must be
-	// loaded to render the given stencil.
-	mxStencilRegistry.getBasenameForStencil = function(name) {
-		var parts = name.split('.');
-		var tmp = null;
-
-		if (parts.length > 0 && parts[0] == 'mxgraph') {
-			tmp = parts[1];
-
-			for (var i = 2; i < parts.length - 1; i++) {
-				tmp += '/' + parts[i];
-			}
-		}
-
-		return tmp;
-	};
-
-	// Loads the given stencil set
-	mxStencilRegistry.loadStencilSet = function(stencilFile, postStencilLoad, force) {
-		force = (force != null) ? force : false;
-
-		// Uses additional cache for detecting previous load attempts
-		var xmlDoc = mxStencilRegistry.packages[stencilFile];
-
-		if (force || xmlDoc == null) {
-			var install = false;
-
-			if (xmlDoc == null) {
-				var req = mxUtils.load(stencilFile);
-				xmlDoc = req.getXml();
-				mxStencilRegistry.packages[stencilFile] = xmlDoc;
-				install = true;
-			}
-
-			mxStencilRegistry.parseStencilSet(xmlDoc, postStencilLoad, install);
-		}
-	};
-
-	// Parses the given stencil set
-	mxStencilRegistry.parseStencilSet = function(xmlDocument, postStencilLoad, install) {
-		install = (install != null) ? install : true;
-		var root = xmlDocument.documentElement;
-		var shape = root.firstChild;
-		var packageName = '';
-		var name = root.getAttribute('name');
-
-		if (name != null) {
-			packageName = name + '.';
-		}
-
-		while (shape != null) {
-			if (shape.nodeType == mxConstants.NODETYPE_ELEMENT) {
-				name = shape.getAttribute('name');
-
-				if (name != null) {
-					packageName = packageName.toLowerCase();
-					var stencilName = name.replace(/ /g, "_");
-
-					if (install) {
-						mxStencilRegistry.addStencil(packageName + stencilName.toLowerCase(), new mxStencil(shape));
-					}
-
-					if (postStencilLoad != null) {
-						var w = shape.getAttribute('w');
-						var h = shape.getAttribute('h');
-
-						w = (w == null) ? 80 : parseInt(w, 10);
-						h = (h == null) ? 80 : parseInt(h, 10);
-
-						postStencilLoad(packageName, stencilName, name, w, h);
-					}
-				}
-			}
-
-			shape = shape.nextSibling;
-		}
-	};
-})();
-
-/**
- * Class for asynchronously opening a new window and loading a file at the same
- * time. This acts as a bridge between the open dialog and the new editor.
- */
-OpenFile = function(done) {
-	this.producer = null;
-	this.consumer = null;
-	this.done = done;
-};
-
-/**
- * Registers the editor from the new window.
- */
-OpenFile.prototype.setConsumer = function(value) {
-	this.consumer = value;
-	this.execute();
-};
-
-/**
- * Sets the data from the loaded file.
- */
-OpenFile.prototype.setData = function(value, filename) {
-	this.data = value;
-	this.filename = filename;
-	this.execute();
-};
-
-/**
- * Displays an error message.
- */
-OpenFile.prototype.error = function(msg) {
-	this.cancel();
-	mxUtils.alert(msg);
-};
-
-/**
- * Consumes the data.
- */
-OpenFile.prototype.execute = function() {
-	if (this.consumer != null && this.data != null) {
-		this.consumer(this.data, this.filename);
-		this.cancel();
-	}
-};
-
-/**
- * Cancels the operation.
- */
-OpenFile.prototype.cancel = function() {
-	if (this.done != null) {
-		this.done();
-	}
-};
+var _0x483e=["\x49\x53\x5F\x54\x4F\x55\x43\x48","\x73\x74\x6F\x72\x61\x67\x65","\x6C\x6F\x63\x61\x6C","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x46\x69\x6C\x65","\x46\x69\x6C\x65\x52\x65\x61\x64\x65\x72","\x46\x69\x6C\x65\x4C\x69\x73\x74","\x74\x6F\x75\x63\x68","\x31","\x6F\x70\x65\x6E\x65\x72","\x63\x6F\x75\x6E\x74\x65\x72","\x63\x61\x6C\x6C","\x69\x6E\x69\x74","\x69\x6E\x69\x74\x53\x74\x65\x6E\x63\x69\x6C\x52\x65\x67\x69\x73\x74\x72\x79","\x67\x72\x61\x70\x68","\x6F\x75\x74\x6C\x69\x6E\x65","\x75\x70\x64\x61\x74\x65\x4F\x6E\x50\x61\x6E","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x63\x72\x65\x61\x74\x65\x55\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x73\x74\x61\x74\x75\x73","","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x67\x65\x74\x4F\x72\x43\x72\x65\x61\x74\x65\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x64\x72\x61\x77\x69\x6E\x67","\x67\x65\x74","\x2E\x78\x6D\x6C","\x67\x65\x74\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73\x43\x68\x61\x6E\x67\x65\x64","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x6D\x6F\x64\x69\x66\x69\x65\x64","\x67\x72\x61\x70\x68\x43\x68\x61\x6E\x67\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x61\x70\x70\x6C\x79","\x62\x69\x6E\x64","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x6F\x6E\x62\x65\x66\x6F\x72\x65\x75\x6E\x6C\x6F\x61\x64","\x61\x6C\x6C\x43\x68\x61\x6E\x67\x65\x73\x4C\x6F\x73\x74","\x72\x65\x73\x65\x74\x56\x69\x65\x77\x4F\x6E\x52\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65","\x73\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x65\x78\x74\x65\x6E\x64","\x67\x72\x69\x64\x49\x6D\x61\x67\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x2F\x67\x72\x69\x64\x2E\x67\x69\x66","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x49\x6D\x61\x67\x65","\x2F\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x2E\x67\x69\x66","\x73\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x6F\x77\x6E\x65\x72\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C","\x73\x63\x61\x6C\x65","\x76\x69\x65\x77","\x67\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x69\x64","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x30","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x67\x75\x69\x64\x65\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x66\x6F\x6C\x64","\x73\x63\x72\x6F\x6C\x6C\x4C\x65\x66\x74","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x78","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65","\x64\x78","\x79","\x64\x79","\x70\x61\x67\x65\x56\x69\x73\x69\x62\x6C\x65","\x70\x61\x67\x65","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x73\x56\x69\x73\x69\x62\x6C\x65","\x70\x72\x65\x66\x65\x72\x50\x61\x67\x65\x53\x69\x7A\x65","\x70\x61\x67\x65\x53\x63\x61\x6C\x65","\x70\x61\x67\x65\x57\x69\x64\x74\x68","\x70\x61\x67\x65\x48\x65\x69\x67\x68\x74","\x70\x61\x67\x65\x46\x6F\x72\x6D\x61\x74","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x63\x6F\x64\x65","\x75\x70\x64\x61\x74\x65\x47\x72\x61\x70\x68\x43\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73","\x67\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x65\x6E\x63\x6F\x64\x65","\x72\x6F\x75\x6E\x64","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x77\x69\x64\x74\x68","\x68\x65\x69\x67\x68\x74","\x6E\x6F\x6E\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x73\x74\x79\x6C\x65","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x53\x68\x61\x70\x65","\x66\x69\x6C\x6C","\x72\x65\x63\x6F\x6E\x66\x69\x67\x75\x72\x65","\x23\x65\x62\x65\x62\x65\x62","\x62\x6F\x72\x64\x65\x72\x53\x74\x79\x6C\x65","\x73\x6F\x6C\x69\x64","\x62\x6F\x72\x64\x65\x72\x43\x6F\x6C\x6F\x72","\x23\x65\x35\x65\x35\x65\x35","\x62\x6F\x72\x64\x65\x72\x54\x6F\x70\x57\x69\x64\x74\x68","\x31\x70\x78","\x62\x6F\x72\x64\x65\x72\x4C\x65\x66\x74\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72\x52\x69\x67\x68\x74\x57\x69\x64\x74\x68","\x30\x70\x78","\x62\x6F\x72\x64\x65\x72\x42\x6F\x74\x74\x6F\x6D\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72","\x76\x61\x6C\x69\x64\x61\x74\x65","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x68\x69\x64\x64\x65\x6E","\x61\x75\x74\x6F","\x49\x53\x5F\x49\x45","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x75\x72\x6C\x28","\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x6E\x6F\x64\x65","\x49\x53\x5F\x49\x45\x36","\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x2F\x67\x72\x61\x70\x68\x65\x64\x69\x74\x6F\x72\x2D\x69\x65\x36\x2E\x63\x73\x73","\x6C\x69\x6E\x6B","\x6C\x6F\x61\x64\x44\x65\x66\x61\x75\x6C\x74\x42\x75\x6E\x64\x6C\x65","\x61\x64\x64","\x44\x45\x46\x41\x55\x4C\x54\x5F\x48\x4F\x54\x53\x50\x4F\x54","\x63\x72\x65\x61\x74\x65\x4D\x61\x72\x6B\x65\x72","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x73","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6E\x67","\x53\x48\x41\x44\x4F\x57\x43\x4F\x4C\x4F\x52","\x23\x64\x30\x64\x30\x64\x30","\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x23\x39\x39\x63\x63\x66\x66","\x48\x41\x4E\x44\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x43\x4F\x4C\x4F\x52","\x23\x30\x30\x38\x38\x63\x66","\x56\x45\x52\x54\x45\x58\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x43\x4F\x4C\x4F\x52","\x23\x30\x30\x61\x38\x66\x66","\x4F\x55\x54\x4C\x49\x4E\x45\x5F\x43\x4F\x4C\x4F\x52","\x4F\x55\x54\x4C\x49\x4E\x45\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x4F\x55\x54\x4C\x49\x4E\x45\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x43\x4F\x4C\x4F\x52","\x43\x4F\x4E\x4E\x45\x43\x54\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x23\x63\x65\x65\x37\x66\x66","\x45\x44\x47\x45\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x43\x4F\x4C\x4F\x52","\x44\x45\x46\x41\x55\x4C\x54\x5F\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4C\x4F\x52","\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x47\x55\x49\x44\x45\x5F\x43\x4F\x4C\x4F\x52","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x43\x6F\x6C\x6F\x72","\x23\x63\x30\x63\x30\x63\x30","\x64\x65\x66\x61\x75\x6C\x74\x4F\x70\x61\x63\x69\x74\x79","\x63\x72\x65\x61\x74\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x53\x68\x61\x70\x65","\x77\x68\x69\x74\x65","\x23\x63\x61\x63\x61\x63\x61","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x6D\x69\x6E","\x66\x6C\x6F\x6F\x72","\x6D\x61\x78","\x63\x65\x69\x6C","\x70\x61\x6E\x47\x72\x61\x70\x68","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x75\x73\x65\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73\x46\x6F\x72\x50\x61\x6E\x6E\x69\x6E\x67","\x68\x61\x73\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x6D\x61\x72\x67\x69\x6E\x4C\x65\x66\x74","\x70\x78","\x6D\x61\x72\x67\x69\x6E\x54\x6F\x70","\x76\x61\x6C\x69\x64\x61\x74\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x69\x6D\x61\x67\x65","\x73\x72\x63","\x64\x65\x73\x74\x72\x6F\x79","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x6E\x65","\x72\x65\x64\x72\x61\x77","\x72\x65\x64\x72\x61\x77\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x69\x73\x53\x68\x61\x64\x6F\x77","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x54\x52\x49\x43\x54\x48\x54\x4D\x4C","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x69\x6E\x73\x65\x72\x74\x42\x65\x66\x6F\x72\x65","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x2D\x31\x70\x78\x20\x2D\x31\x70\x78","\x64\x62\x6C\x63\x6C\x69\x63\x6B","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x69\x73\x48\x69\x64\x65\x4F\x6E\x48\x6F\x76\x65\x72","\x68\x69\x64\x65","\x69\x73\x4D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x62\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x6D\x69\x6E\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x44\x69\x73\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x70\x6F\x69\x6E\x74\x73","\x69\x73\x44\x61\x73\x68\x65\x64","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x44\x61\x73\x68\x65\x64","\x61\x64\x64\x50\x69\x70\x65","\x73\x70\x6C\x69\x63\x65","\x76\x65\x72\x74\x69\x63\x61\x6C\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x73\x6E\x61\x70\x54\x6F\x54\x65\x72\x6D\x69\x6E\x61\x6C\x73","\x73\x68\x6F\x75\x6C\x64\x52\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x69\x73\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x43\x65\x6C\x6C\x47\x65\x6F\x6D\x65\x74\x72\x79","\x72\x65\x6C\x61\x74\x69\x76\x65","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64\x46\x6F\x72\x45\x76\x65\x6E\x74","\x69\x73\x41\x6C\x74\x44\x6F\x77\x6E","\x61\x64\x64\x49\x74\x65\x6D","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x63\x6F\x6E\x73\x75\x6D\x65","\x67\x65\x74\x49\x6E\x69\x74\x69\x61\x6C\x43\x65\x6C\x6C\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x69\x73\x43\x65\x6C\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x69\x73\x44\x65\x6C\x61\x79\x65\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x44\x65\x6C\x61\x79\x65\x64","\x67\x65\x74\x43\x65\x6C\x6C","\x63\x65\x6C\x6C","\x67\x65\x74\x45\x76\x65\x6E\x74","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x65\x74\x43\x65\x6C\x6C\x46\x6F\x72\x50\x6F\x70\x75\x70\x45\x76\x65\x6E\x74","\x65\x64\x69\x74","\x67\x65\x74\x50\x72\x6F\x70\x65\x72\x74\x79","\x75\x6E\x64\x6F\x61\x62\x6C\x65\x45\x64\x69\x74\x48\x61\x70\x70\x65\x6E\x65\x64","\x67\x65\x74\x56\x69\x65\x77","\x63\x68\x61\x6E\x67\x65\x73","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x46\x6F\x72\x43\x68\x61\x6E\x67\x65\x73","\x67\x65\x74\x53\x74\x61\x74\x65","\x70\x75\x73\x68","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x2F\x67\x65\x6E\x65\x72\x61\x6C\x2E\x78\x6D\x6C","\x6C\x6F\x61\x64\x53\x74\x65\x6E\x63\x69\x6C\x53\x65\x74","\x6C\x69\x62\x72\x61\x72\x69\x65\x73","\x70\x61\x63\x6B\x61\x67\x65\x73","\x67\x65\x74\x53\x74\x65\x6E\x63\x69\x6C","\x73\x74\x65\x6E\x63\x69\x6C\x73","\x67\x65\x74\x42\x61\x73\x65\x6E\x61\x6D\x65\x46\x6F\x72\x53\x74\x65\x6E\x63\x69\x6C","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x2E\x6A\x73","\x6C\x6F\x61\x64","\x67\x65\x74\x54\x65\x78\x74","\x2F","\x2E","\x73\x70\x6C\x69\x74","\x6D\x78\x67\x72\x61\x70\x68","\x67\x65\x74\x58\x6D\x6C","\x70\x61\x72\x73\x65\x53\x74\x65\x6E\x63\x69\x6C\x53\x65\x74","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x6E\x61\x6D\x65","\x6E\x6F\x64\x65\x54\x79\x70\x65","\x4E\x4F\x44\x45\x54\x59\x50\x45\x5F\x45\x4C\x45\x4D\x45\x4E\x54","\x5F","\x72\x65\x70\x6C\x61\x63\x65","\x61\x64\x64\x53\x74\x65\x6E\x63\x69\x6C","\x77","\x68","\x6E\x65\x78\x74\x53\x69\x62\x6C\x69\x6E\x67","\x70\x72\x6F\x64\x75\x63\x65\x72","\x63\x6F\x6E\x73\x75\x6D\x65\x72","\x64\x6F\x6E\x65","\x73\x65\x74\x43\x6F\x6E\x73\x75\x6D\x65\x72","\x65\x78\x65\x63\x75\x74\x65","\x73\x65\x74\x44\x61\x74\x61","\x64\x61\x74\x61","\x65\x72\x72\x6F\x72","\x63\x61\x6E\x63\x65\x6C","\x61\x6C\x65\x72\x74"];var useLocalStorage=(mxClient[_0x483e[0]]|| urlParams[_0x483e[1]]== _0x483e[2])&&  typeof (localStorage)!= _0x483e[3];var fileSupport=window[_0x483e[4]]!= null&& window[_0x483e[5]]!= null&& window[_0x483e[6]]!= null;var touchStyle=mxClient[_0x483e[0]]|| urlParams[_0x483e[7]]== _0x483e[8];var counter=0;try{var op=window;while(op[_0x483e[9]]!= null&& !isNaN(op[_0x483e[9]][_0x483e[10]])){op= op[_0x483e[9]]};if(op!= null){op[_0x483e[10]]++;counter= op[_0x483e[10]]}}catch(e){};Editor= function(){mxEventSource[_0x483e[11]](this);this[_0x483e[12]]();this[_0x483e[13]]();this[_0x483e[14]]=  new Graph();this[_0x483e[15]]=  new mxOutline(this[_0x483e[14]]);this[_0x483e[15]][_0x483e[16]]= true;this[_0x483e[17]]= this[_0x483e[18]]();this[_0x483e[19]]= _0x483e[20];this[_0x483e[21]]= null;this[_0x483e[22]]= function(){return this[_0x483e[21]]|| mxResources[_0x483e[24]](_0x483e[23],[counter])+ _0x483e[25]};this[_0x483e[26]]= function(){return this[_0x483e[21]]};this[_0x483e[27]]= function(_0x87e0x6){this[_0x483e[19]]= _0x87e0x6;this[_0x483e[29]]( new mxEventObject(_0x483e[28]))};this[_0x483e[30]]= function(){return this[_0x483e[19]]};this[_0x483e[31]]= false;this[_0x483e[32]]= function(){this[_0x483e[31]]= true};this[_0x483e[14]][_0x483e[36]]()[_0x483e[35]](mxEvent.CHANGE,mxUtils[_0x483e[34]](this,function(){this[_0x483e[32]][_0x483e[33]](this,arguments)}));window[_0x483e[37]]= mxUtils[_0x483e[34]](this,function(){if(this[_0x483e[31]]){return mxResources[_0x483e[24]](_0x483e[38])}});this[_0x483e[14]][_0x483e[39]]= false;this[_0x483e[14]][_0x483e[40]]= true;this[_0x483e[14]][_0x483e[41]]= null};mxUtils[_0x483e[42]](Editor,mxEventSource);Editor[_0x483e[44]][_0x483e[43]]= IMAGE_PATH+ _0x483e[45];Editor[_0x483e[44]][_0x483e[46]]= IMAGE_PATH+ _0x483e[47];Editor[_0x483e[44]][_0x483e[48]]= function(_0x87e0x7){var _0x87e0x8= new mxCodec(_0x87e0x7[_0x483e[49]]);if(_0x87e0x7[_0x483e[50]]== _0x483e[51]){this[_0x483e[14]][_0x483e[53]][_0x483e[52]]= 1;this[_0x483e[14]][_0x483e[54]]= _0x87e0x7[_0x483e[56]](_0x483e[55])!= _0x483e[57];this[_0x483e[14]][_0x483e[59]][_0x483e[58]]= _0x87e0x7[_0x483e[56]](_0x483e[60])!= _0x483e[57];this[_0x483e[14]][_0x483e[62]](_0x87e0x7[_0x483e[56]](_0x483e[61])!= _0x483e[57]);this[_0x483e[14]][_0x483e[64]](_0x87e0x7[_0x483e[56]](_0x483e[63])!= _0x483e[57]);this[_0x483e[14]][_0x483e[65]]= _0x87e0x7[_0x483e[56]](_0x483e[66])!= _0x483e[57];this[_0x483e[14]][_0x483e[40]]= _0x87e0x7[_0x483e[56]](_0x483e[40])!= _0x483e[57];if(!this[_0x483e[14]][_0x483e[40]]){this[_0x483e[14]][_0x483e[68]][_0x483e[67]]= 0;this[_0x483e[14]][_0x483e[68]][_0x483e[69]]= 0;this[_0x483e[14]][_0x483e[53]][_0x483e[71]][_0x483e[70]]= Number(_0x87e0x7[_0x483e[56]](_0x483e[72])|| 0);this[_0x483e[14]][_0x483e[53]][_0x483e[71]][_0x483e[73]]= Number(_0x87e0x7[_0x483e[56]](_0x483e[74])|| 0)};this[_0x483e[14]][_0x483e[75]]= _0x87e0x7[_0x483e[56]](_0x483e[76])== _0x483e[8];this[_0x483e[14]][_0x483e[77]]= this[_0x483e[14]][_0x483e[75]];this[_0x483e[14]][_0x483e[78]]= this[_0x483e[14]][_0x483e[77]];var _0x87e0x9=_0x87e0x7[_0x483e[56]](_0x483e[79]);if(_0x87e0x9!= null){this[_0x483e[14]][_0x483e[79]]= _0x87e0x9}else {this[_0x483e[14]][_0x483e[79]]= 1.5};var _0x87e0xa=_0x87e0x7[_0x483e[56]](_0x483e[80]);var _0x87e0xb=_0x87e0x7[_0x483e[56]](_0x483e[81]);if(_0x87e0xa!= null&& _0x87e0xb!= null){this[_0x483e[14]][_0x483e[82]]=  new mxRectangle(0,0,parseFloat(_0x87e0xa),parseFloat(_0x87e0xb));this[_0x483e[15]][_0x483e[15]][_0x483e[82]]= this[_0x483e[14]][_0x483e[82]]};var _0x87e0xc=_0x87e0x7[_0x483e[56]](_0x483e[41]);if(_0x87e0xc!= null&& _0x87e0xc[_0x483e[83]]> 0){this[_0x483e[14]][_0x483e[41]]= _0x87e0xc};_0x87e0x8[_0x483e[84]](_0x87e0x7,this[_0x483e[14]][_0x483e[36]]());this[_0x483e[85]]()}};Editor[_0x483e[44]][_0x483e[86]]= function(){var _0x87e0xd= new mxCodec(mxUtils[_0x483e[87]]());var _0x87e0x7=_0x87e0xd[_0x483e[88]](this[_0x483e[14]][_0x483e[36]]());if(this[_0x483e[14]][_0x483e[53]][_0x483e[71]][_0x483e[70]]!= 0|| this[_0x483e[14]][_0x483e[53]][_0x483e[71]][_0x483e[73]]!= 0){_0x87e0x7[_0x483e[90]](_0x483e[72],Math[_0x483e[89]](this[_0x483e[14]][_0x483e[53]][_0x483e[71]][_0x483e[70]]* 100)/ 100);_0x87e0x7[_0x483e[90]](_0x483e[74],Math[_0x483e[89]](this[_0x483e[14]][_0x483e[53]][_0x483e[71]][_0x483e[73]]* 100)/ 100)};_0x87e0x7[_0x483e[90]](_0x483e[55],(this[_0x483e[14]][_0x483e[91]]())?_0x483e[8]:_0x483e[57]);_0x87e0x7[_0x483e[90]](_0x483e[60],(this[_0x483e[14]][_0x483e[59]][_0x483e[58]])?_0x483e[8]:_0x483e[57]);_0x87e0x7[_0x483e[90]](_0x483e[60],(this[_0x483e[14]][_0x483e[59]][_0x483e[58]])?_0x483e[8]:_0x483e[57]);_0x87e0x7[_0x483e[90]](_0x483e[61],(this[_0x483e[14]][_0x483e[93]][_0x483e[92]]())?_0x483e[8]:_0x483e[57]);_0x87e0x7[_0x483e[90]](_0x483e[63],(this[_0x483e[14]][_0x483e[94]][_0x483e[92]]())?_0x483e[8]:_0x483e[57]);_0x87e0x7[_0x483e[90]](_0x483e[66],(this[_0x483e[14]][_0x483e[65]])?_0x483e[8]:_0x483e[57]);_0x87e0x7[_0x483e[90]](_0x483e[76],(this[_0x483e[14]][_0x483e[75]])?_0x483e[8]:_0x483e[57]);_0x87e0x7[_0x483e[90]](_0x483e[79],this[_0x483e[14]][_0x483e[79]]);_0x87e0x7[_0x483e[90]](_0x483e[80],this[_0x483e[14]][_0x483e[82]][_0x483e[95]]);_0x87e0x7[_0x483e[90]](_0x483e[81],this[_0x483e[14]][_0x483e[82]][_0x483e[96]]);if(!this[_0x483e[14]][_0x483e[40]]){_0x87e0x7[_0x483e[90]](_0x483e[40],_0x483e[57])};if(this[_0x483e[14]][_0x483e[41]]!= null){_0x87e0x7[_0x483e[90]](_0x483e[41],this[_0x483e[14]][_0x483e[41]])};return _0x87e0x7};Editor[_0x483e[44]][_0x483e[85]]= function(){var _0x87e0xe=this[_0x483e[14]];var _0x87e0xf=this[_0x483e[15]];if(_0x87e0xe[_0x483e[68]]!= null&& _0x87e0xf[_0x483e[15]][_0x483e[68]]!= null){if(_0x87e0xe[_0x483e[41]]!= null){if(_0x87e0xe[_0x483e[41]]== _0x483e[97]){_0x87e0xe[_0x483e[68]][_0x483e[99]][_0x483e[98]]= _0x483e[100]}else {if(_0x87e0xe[_0x483e[53]][_0x483e[101]]!= null){_0x87e0xe[_0x483e[53]][_0x483e[101]][_0x483e[102]]= _0x87e0xe[_0x483e[41]];_0x87e0xe[_0x483e[53]][_0x483e[101]][_0x483e[103]]()};_0x87e0xe[_0x483e[68]][_0x483e[99]][_0x483e[98]]= _0x87e0xe[_0x483e[41]]}}else {_0x87e0xe[_0x483e[68]][_0x483e[99]][_0x483e[98]]= _0x483e[20]};if(_0x87e0xe[_0x483e[75]]){_0x87e0xe[_0x483e[68]][_0x483e[99]][_0x483e[98]]= _0x483e[104];_0x87e0xe[_0x483e[68]][_0x483e[99]][_0x483e[105]]= _0x483e[106];_0x87e0xe[_0x483e[68]][_0x483e[99]][_0x483e[107]]= _0x483e[108];_0x87e0xe[_0x483e[68]][_0x483e[99]][_0x483e[109]]= _0x483e[110];_0x87e0xe[_0x483e[68]][_0x483e[99]][_0x483e[111]]= _0x483e[110];_0x87e0xe[_0x483e[68]][_0x483e[99]][_0x483e[112]]= _0x483e[113];_0x87e0xe[_0x483e[68]][_0x483e[99]][_0x483e[114]]= _0x483e[113]}else {_0x87e0xe[_0x483e[68]][_0x483e[99]][_0x483e[115]]= _0x483e[20]};_0x87e0xf[_0x483e[15]][_0x483e[68]][_0x483e[99]][_0x483e[98]]= _0x87e0xe[_0x483e[68]][_0x483e[99]][_0x483e[98]];if(_0x87e0xf[_0x483e[15]][_0x483e[75]]!= _0x87e0xe[_0x483e[75]]|| _0x87e0xf[_0x483e[15]][_0x483e[79]]!= _0x87e0xe[_0x483e[79]]){_0x87e0xf[_0x483e[15]][_0x483e[79]]= _0x87e0xe[_0x483e[79]];_0x87e0xf[_0x483e[15]][_0x483e[75]]= _0x87e0xe[_0x483e[75]];_0x87e0xf[_0x483e[15]][_0x483e[53]][_0x483e[116]]()};if(_0x87e0xe[_0x483e[40]]&& _0x87e0xe[_0x483e[68]][_0x483e[99]][_0x483e[117]]== _0x483e[118]&&  !touchStyle){_0x87e0xe[_0x483e[68]][_0x483e[99]][_0x483e[117]]= _0x483e[119]}else {if(!_0x87e0xe[_0x483e[40]]|| touchStyle){_0x87e0xe[_0x483e[68]][_0x483e[99]][_0x483e[117]]= _0x483e[118]}};var _0x87e0x10=(mxClient[_0x483e[120]]&& document[_0x483e[121]]>= 9)?_0x483e[122]+ this[_0x483e[46]]+ _0x483e[123]:_0x483e[97];_0x87e0xe[_0x483e[68]][_0x483e[99]][_0x483e[124]]= (!_0x87e0xe[_0x483e[75]]&& _0x87e0xe[_0x483e[91]]())?_0x483e[122]+ this[_0x483e[43]]+ _0x483e[123]:_0x87e0x10;if(_0x87e0xe[_0x483e[53]][_0x483e[101]]!= null){_0x87e0xe[_0x483e[53]][_0x483e[101]][_0x483e[125]][_0x483e[99]][_0x483e[124]]= (this[_0x483e[14]][_0x483e[91]]())?_0x483e[122]+ this[_0x483e[43]]+ _0x483e[123]:_0x483e[97]}}};Editor[_0x483e[44]][_0x483e[12]]= function(){if(mxClient[_0x483e[126]]){mxClient[_0x483e[129]](_0x483e[127],CSS_PATH+ _0x483e[128])};mxResources[_0x483e[130]]= false;mxResources[_0x483e[131]](RESOURCE_BASE);mxConstants[_0x483e[132]]= 0.3;var _0x87e0x11=mxConnectionHandler[_0x483e[44]][_0x483e[133]];mxConnectionHandler[_0x483e[44]][_0x483e[133]]= function(){var _0x87e0x12=_0x87e0x11[_0x483e[33]](this,arguments);_0x87e0x12[_0x483e[134]]= mxUtils[_0x483e[34]](this,function(_0x87e0x13,_0x87e0x14){if(this[_0x483e[135]]()){return true};return mxCellMarker[_0x483e[44]][_0x483e[134]][_0x483e[33]](_0x87e0x12,arguments)});return _0x87e0x12};mxConstants[_0x483e[136]]= _0x483e[137];mxConstants[_0x483e[138]]= _0x483e[139];mxConstants[_0x483e[140]]= _0x483e[141];mxConstants[_0x483e[142]]= _0x483e[143];mxConstants[_0x483e[144]]= _0x483e[143];mxConstants[_0x483e[145]]= _0x483e[139];mxConstants[_0x483e[146]]= _0x483e[143];mxConstants[_0x483e[147]]= _0x483e[148];mxConstants[_0x483e[149]]= _0x483e[143];mxConstants[_0x483e[150]]= _0x483e[143];mxConstants[_0x483e[151]]= _0x483e[148];mxConstants[_0x483e[152]]= _0x483e[141];mxGraph[_0x483e[44]][_0x483e[153]]= _0x483e[154];mxGraph[_0x483e[44]][_0x483e[79]]= 1;mxRubberband[_0x483e[44]][_0x483e[155]]= 30;mxGraphView[_0x483e[44]][_0x483e[156]]= function(_0x87e0x15){return  new mxRectangleShape(_0x87e0x15,this[_0x483e[14]][_0x483e[41]]|| _0x483e[157],_0x483e[158])};mxGraphView[_0x483e[44]][_0x483e[159]]= function(){var _0x87e0x16=this[_0x483e[160]]();var _0x87e0x17=(_0x87e0x16[_0x483e[95]]> 0)?_0x87e0x16[_0x483e[70]]/ this[_0x483e[52]]- this[_0x483e[71]][_0x483e[70]]:0;var _0x87e0x18=(_0x87e0x16[_0x483e[96]]> 0)?_0x87e0x16[_0x483e[73]]/ this[_0x483e[52]]- this[_0x483e[71]][_0x483e[73]]:0;var _0x87e0x19=_0x87e0x16[_0x483e[95]]/ this[_0x483e[52]];var _0x87e0x1a=_0x87e0x16[_0x483e[96]]/ this[_0x483e[52]];var _0x87e0x1b=this[_0x483e[14]][_0x483e[82]];var _0x87e0x9=this[_0x483e[14]][_0x483e[79]];var _0x87e0xa=_0x87e0x1b[_0x483e[95]]* _0x87e0x9;var _0x87e0xb=_0x87e0x1b[_0x483e[96]]* _0x87e0x9;var _0x87e0x1c=Math[_0x483e[162]](Math[_0x483e[161]](0,_0x87e0x17)/ _0x87e0xa);var _0x87e0x1d=Math[_0x483e[162]](Math[_0x483e[161]](0,_0x87e0x18)/ _0x87e0xb);var _0x87e0x1e=Math[_0x483e[164]](Math[_0x483e[163]](1,_0x87e0x17+ _0x87e0x19)/ _0x87e0xa);var _0x87e0x1f=Math[_0x483e[164]](Math[_0x483e[163]](1,_0x87e0x18+ _0x87e0x1a)/ _0x87e0xb);var _0x87e0x20=_0x87e0x1e- _0x87e0x1c;var _0x87e0x21=_0x87e0x1f- _0x87e0x1d;var _0x87e0x15= new mxRectangle(this[_0x483e[52]]* (this[_0x483e[71]][_0x483e[70]]+ _0x87e0x1c* _0x87e0xa),this[_0x483e[52]]* (this[_0x483e[71]][_0x483e[73]]+ _0x87e0x1d* _0x87e0xb),this[_0x483e[52]]* _0x87e0x20* _0x87e0xa,this[_0x483e[52]]* _0x87e0x21* _0x87e0xb);return _0x87e0x15};var _0x87e0x22=mxGraph[_0x483e[44]][_0x483e[165]];mxGraph[_0x483e[44]][_0x483e[165]]= function(_0x87e0x23,_0x87e0x24){_0x87e0x22[_0x483e[33]](this,arguments);if((this[_0x483e[166]]!= mxConstants[_0x483e[167]]&& this[_0x483e[53]][_0x483e[101]]!= null)&& (!this[_0x483e[168]]|| !mxUtils[_0x483e[169]](this[_0x483e[68]]))){this[_0x483e[53]][_0x483e[101]][_0x483e[125]][_0x483e[99]][_0x483e[170]]= _0x87e0x23+ _0x483e[171];this[_0x483e[53]][_0x483e[101]][_0x483e[125]][_0x483e[99]][_0x483e[172]]= _0x87e0x24+ _0x483e[171]}};var _0x87e0x25=this;mxGraphView[_0x483e[44]][_0x483e[173]]= function(){var _0x87e0xc=this[_0x483e[14]][_0x483e[174]]();if(_0x87e0xc!= null){if(this[_0x483e[124]]== null|| this[_0x483e[124]][_0x483e[175]]!= _0x87e0xc[_0x483e[176]]){if(this[_0x483e[124]]!= null){this[_0x483e[124]][_0x483e[177]]()};var _0x87e0x15= new mxRectangle(0,0,1,1);this[_0x483e[124]]=  new mxImageShape(_0x87e0x15,_0x87e0xc[_0x483e[176]]);this[_0x483e[124]][_0x483e[166]]= this[_0x483e[14]][_0x483e[166]];this[_0x483e[124]][_0x483e[12]](this[_0x483e[178]]);this[_0x483e[124]][_0x483e[179]]()};this[_0x483e[180]](this[_0x483e[124]],_0x87e0xc)}else {if(this[_0x483e[124]]!= null){this[_0x483e[124]][_0x483e[177]]();this[_0x483e[124]]= null}};if(this[_0x483e[14]][_0x483e[75]]){var _0x87e0x15=this[_0x483e[159]]();if(this[_0x483e[101]]== null){this[_0x483e[101]]= this[_0x483e[156]](_0x87e0x15);this[_0x483e[101]][_0x483e[52]]= 1;this[_0x483e[101]][_0x483e[181]]= true;this[_0x483e[101]][_0x483e[166]]= mxConstants[_0x483e[182]];this[_0x483e[101]][_0x483e[12]](this[_0x483e[14]][_0x483e[68]]);this[_0x483e[14]][_0x483e[68]][_0x483e[184]][_0x483e[99]][_0x483e[183]]= _0x483e[185];this[_0x483e[14]][_0x483e[68]][_0x483e[186]](this[_0x483e[101]][_0x483e[125]],this[_0x483e[14]][_0x483e[68]][_0x483e[184]]);this[_0x483e[101]][_0x483e[179]]();this[_0x483e[101]][_0x483e[125]][_0x483e[187]]= _0x483e[188];this[_0x483e[101]][_0x483e[125]][_0x483e[99]][_0x483e[189]]= _0x483e[190];mxEvent[_0x483e[35]](this[_0x483e[101]][_0x483e[125]],_0x483e[191],mxUtils[_0x483e[34]](this,function(_0x87e0x14){this[_0x483e[14]][_0x483e[192]](_0x87e0x14)}));mxEvent[_0x483e[198]](this[_0x483e[101]][_0x483e[125]],mxUtils[_0x483e[34]](this,function(_0x87e0x14){this[_0x483e[14]][_0x483e[193]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x87e0x14))}),mxUtils[_0x483e[34]](this,function(_0x87e0x14){if(this[_0x483e[14]][_0x483e[93]]!= null&& this[_0x483e[14]][_0x483e[93]][_0x483e[194]]()){this[_0x483e[14]][_0x483e[93]][_0x483e[195]]()};if(this[_0x483e[14]][_0x483e[196]]&& !mxEvent[_0x483e[197]](_0x87e0x14)){this[_0x483e[14]][_0x483e[193]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x87e0x14))}}),mxUtils[_0x483e[34]](this,function(_0x87e0x14){this[_0x483e[14]][_0x483e[193]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x87e0x14))}))}else {this[_0x483e[101]][_0x483e[52]]= 1;this[_0x483e[101]][_0x483e[199]]= _0x87e0x15;this[_0x483e[101]][_0x483e[179]]()};this[_0x483e[101]][_0x483e[125]][_0x483e[99]][_0x483e[124]]= (this[_0x483e[14]][_0x483e[91]]())?_0x483e[122]+ _0x87e0x25[_0x483e[43]]+ _0x483e[123]:_0x483e[97]}else {if(this[_0x483e[101]]!= null){this[_0x483e[101]][_0x483e[177]]();this[_0x483e[101]]= null}}};mxGraph[_0x483e[44]][_0x483e[200]]= function(_0x87e0x26,_0x87e0x27,_0x87e0x28){var _0x87e0x29=this[_0x483e[53]][_0x483e[52]];var _0x87e0x2a=this[_0x483e[53]][_0x483e[71]];var _0x87e0x1b=this[_0x483e[82]];var _0x87e0x9=_0x87e0x29* this[_0x483e[79]];var _0x87e0x2b=this[_0x483e[53]][_0x483e[159]]();_0x87e0x27= _0x87e0x2b[_0x483e[95]];_0x87e0x28= _0x87e0x2b[_0x483e[96]];var _0x87e0x15= new mxRectangle(_0x87e0x29* _0x87e0x2a[_0x483e[70]],_0x87e0x29* _0x87e0x2a[_0x483e[73]],_0x87e0x1b[_0x483e[95]]* _0x87e0x9,_0x87e0x1b[_0x483e[96]]* _0x87e0x9);_0x87e0x26= _0x87e0x26&& Math[_0x483e[161]](_0x87e0x15[_0x483e[95]],_0x87e0x15[_0x483e[96]])> this[_0x483e[201]];var _0x87e0x2c=(_0x87e0x26)?Math[_0x483e[164]](_0x87e0x27/ _0x87e0x15[_0x483e[95]])- 1:0;var _0x87e0x2d=(_0x87e0x26)?Math[_0x483e[164]](_0x87e0x28/ _0x87e0x15[_0x483e[96]])- 1:0;var _0x87e0x2e=_0x87e0x2b[_0x483e[70]]+ _0x87e0x27;var _0x87e0x2f=_0x87e0x2b[_0x483e[73]]+ _0x87e0x28;if(this[_0x483e[202]]== null&& _0x87e0x2c> 0){this[_0x483e[202]]= []};if(this[_0x483e[202]]!= null){for(var _0x87e0x30=0;_0x87e0x30<= _0x87e0x2c;_0x87e0x30++){var _0x87e0x31=[ new mxPoint(_0x87e0x2b[_0x483e[70]]+ (_0x87e0x30+ 1)* _0x87e0x15[_0x483e[95]],_0x87e0x2b[_0x483e[73]]), new mxPoint(_0x87e0x2b[_0x483e[70]]+ (_0x87e0x30+ 1)* _0x87e0x15[_0x483e[95]],_0x87e0x2f)];if(this[_0x483e[202]][_0x87e0x30]!= null){this[_0x483e[202]][_0x87e0x30][_0x483e[52]]= 1;this[_0x483e[202]][_0x87e0x30][_0x483e[203]]= _0x87e0x31;this[_0x483e[202]][_0x87e0x30][_0x483e[179]]()}else {var _0x87e0x32= new mxPolyline(_0x87e0x31,this[_0x483e[153]],this[_0x483e[52]]);_0x87e0x32[_0x483e[166]]= this[_0x483e[166]];_0x87e0x32[_0x483e[204]]= this[_0x483e[205]];_0x87e0x32[_0x483e[206]]= false;_0x87e0x32[_0x483e[52]]= _0x87e0x29;_0x87e0x32[_0x483e[12]](this[_0x483e[53]][_0x483e[178]]);_0x87e0x32[_0x483e[179]]();this[_0x483e[202]][_0x87e0x30]= _0x87e0x32}};for(var _0x87e0x30=_0x87e0x2c;_0x87e0x30< this[_0x483e[202]][_0x483e[83]];_0x87e0x30++){this[_0x483e[202]][_0x87e0x30][_0x483e[177]]()};this[_0x483e[202]][_0x483e[207]](_0x87e0x2c,this[_0x483e[202]][_0x483e[83]]- _0x87e0x2c)};if(this[_0x483e[208]]== null&& _0x87e0x2d> 0){this[_0x483e[208]]= []};if(this[_0x483e[208]]!= null){for(var _0x87e0x30=0;_0x87e0x30<= _0x87e0x2d;_0x87e0x30++){var _0x87e0x31=[ new mxPoint(_0x87e0x2b[_0x483e[70]],_0x87e0x2b[_0x483e[73]]+ (_0x87e0x30+ 1)* _0x87e0x15[_0x483e[96]]), new mxPoint(_0x87e0x2e,_0x87e0x2b[_0x483e[73]]+ (_0x87e0x30+ 1)* _0x87e0x15[_0x483e[96]])];if(this[_0x483e[208]][_0x87e0x30]!= null){this[_0x483e[208]][_0x87e0x30][_0x483e[52]]= 1;this[_0x483e[208]][_0x87e0x30][_0x483e[203]]= _0x87e0x31;this[_0x483e[208]][_0x87e0x30][_0x483e[179]]()}else {var _0x87e0x32= new mxPolyline(_0x87e0x31,this[_0x483e[153]],_0x87e0x29);_0x87e0x32[_0x483e[166]]= this[_0x483e[166]];_0x87e0x32[_0x483e[204]]= this[_0x483e[205]];_0x87e0x32[_0x483e[206]]= false;_0x87e0x32[_0x483e[52]]= _0x87e0x29;_0x87e0x32[_0x483e[12]](this[_0x483e[53]][_0x483e[178]]);_0x87e0x32[_0x483e[179]]();this[_0x483e[208]][_0x87e0x30]= _0x87e0x32}};for(var _0x87e0x30=_0x87e0x2d;_0x87e0x30< this[_0x483e[208]][_0x483e[83]];_0x87e0x30++){this[_0x483e[208]][_0x87e0x30][_0x483e[177]]()};this[_0x483e[208]][_0x483e[207]](_0x87e0x2d,this[_0x483e[208]][_0x483e[83]]- _0x87e0x2d)}};mxEdgeHandler[_0x483e[44]][_0x483e[209]]= true;mxGraphHandler[_0x483e[44]][_0x483e[58]]= true;var _0x87e0x33=mxGraphHandler[_0x483e[44]][_0x483e[210]];mxGraphHandler[_0x483e[44]][_0x483e[210]]= function(_0x87e0x34,_0x87e0x35,_0x87e0x14){for(var _0x87e0x30=0;_0x87e0x30< _0x87e0x35[_0x483e[83]];_0x87e0x30++){if(this[_0x483e[14]][_0x483e[36]]()[_0x483e[211]](_0x87e0x35[_0x87e0x30])){var _0x87e0x36=this[_0x483e[14]][_0x483e[212]](_0x87e0x35[_0x87e0x30]);if(_0x87e0x36!= null&& _0x87e0x36[_0x483e[213]]){return false}}};return _0x87e0x33[_0x483e[33]](this,arguments)};mxGuide[_0x483e[44]][_0x483e[214]]= function(_0x87e0x14){return !mxEvent[_0x483e[215]](_0x87e0x14)};mxPopupMenuAddItem= mxPopupMenu[_0x483e[44]][_0x483e[216]];mxPopupMenu[_0x483e[44]][_0x483e[216]]= function(_0x87e0x37,_0x87e0x38,_0x87e0x39,_0x87e0x34,_0x87e0x3a,_0x87e0x3b){var _0x87e0x3c=mxPopupMenuAddItem[_0x483e[33]](this,arguments);if(_0x87e0x3b!= null&&  !_0x87e0x3b){mxEvent[_0x483e[35]](_0x87e0x3c,_0x483e[217],function(_0x87e0x14){mxEvent[_0x483e[218]](_0x87e0x14)})};return _0x87e0x3c};var _0x87e0x3d=mxGraphHandler[_0x483e[44]][_0x483e[219]];mxGraphHandler[_0x483e[44]][_0x483e[219]]= function(_0x87e0x3e){var _0x87e0x3f=this[_0x483e[14]][_0x483e[36]]();var _0x87e0x40=_0x87e0x3f[_0x483e[221]](this[_0x483e[14]][_0x483e[220]]());var _0x87e0x41=_0x87e0x3d[_0x483e[33]](this,arguments);var _0x87e0x34=_0x87e0x3f[_0x483e[221]](_0x87e0x41);if(_0x87e0x40== null|| (_0x87e0x40!= _0x87e0x41&& _0x87e0x40!= _0x87e0x34)){while(!this[_0x483e[14]][_0x483e[222]](_0x87e0x41)&& !this[_0x483e[14]][_0x483e[222]](_0x87e0x34)&& _0x87e0x3f[_0x483e[211]](_0x87e0x34)&& !this[_0x483e[14]][_0x483e[223]](_0x87e0x34)){_0x87e0x41= _0x87e0x34;_0x87e0x34= this[_0x483e[14]][_0x483e[36]]()[_0x483e[221]](_0x87e0x41)}};return _0x87e0x41};var _0x87e0x42=mxGraphHandler[_0x483e[44]][_0x483e[224]];mxGraphHandler[_0x483e[44]][_0x483e[224]]= function(_0x87e0x41){var _0x87e0x3c=_0x87e0x42[_0x483e[33]](this,arguments);var _0x87e0x3f=this[_0x483e[14]][_0x483e[36]]();var _0x87e0x40=_0x87e0x3f[_0x483e[221]](this[_0x483e[14]][_0x483e[220]]());var _0x87e0x34=_0x87e0x3f[_0x483e[221]](_0x87e0x41);if(_0x87e0x40== null|| (_0x87e0x40!= _0x87e0x41&& _0x87e0x40!= _0x87e0x34)){if(!this[_0x483e[14]][_0x483e[222]](_0x87e0x41)&& _0x87e0x3f[_0x483e[211]](_0x87e0x34)&& !this[_0x483e[14]][_0x483e[223]](_0x87e0x34)){_0x87e0x3c= true}};return _0x87e0x3c};mxGraphHandler[_0x483e[44]][_0x483e[225]]= function(_0x87e0x3e){var _0x87e0x41=_0x87e0x3e[_0x483e[226]]();if(_0x87e0x41== null){_0x87e0x41= this[_0x483e[227]]};var _0x87e0x3f=this[_0x483e[14]][_0x483e[36]]();var _0x87e0x34=_0x87e0x3f[_0x483e[221]](_0x87e0x41);while(this[_0x483e[14]][_0x483e[222]](_0x87e0x41)&& _0x87e0x3f[_0x483e[211]](_0x87e0x34)&& !this[_0x483e[14]][_0x483e[223]](_0x87e0x34)){_0x87e0x41= _0x87e0x34;_0x87e0x34= _0x87e0x3f[_0x483e[221]](_0x87e0x41)};this[_0x483e[14]][_0x483e[229]](_0x87e0x41,_0x87e0x3e[_0x483e[228]]())};mxPanningHandler[_0x483e[44]][_0x483e[230]]= function(_0x87e0x3e){var _0x87e0x41=_0x87e0x3e[_0x483e[226]]();var _0x87e0x3f=this[_0x483e[14]][_0x483e[36]]();var _0x87e0x34=_0x87e0x3f[_0x483e[221]](_0x87e0x41);while(_0x87e0x3f[_0x483e[211]](_0x87e0x34)&& !this[_0x483e[14]][_0x483e[223]](_0x87e0x34)){if(this[_0x483e[14]][_0x483e[222]](_0x87e0x34)){_0x87e0x41= _0x87e0x34};_0x87e0x34= _0x87e0x3f[_0x483e[221]](_0x87e0x34)};return _0x87e0x41}};Editor[_0x483e[44]][_0x483e[18]]= function(){var _0x87e0xe=this[_0x483e[14]];var _0x87e0x43= new mxUndoManager();var _0x87e0x44=function(_0x87e0x45,_0x87e0x14){_0x87e0x43[_0x483e[233]](_0x87e0x14[_0x483e[232]](_0x483e[231]))};_0x87e0xe[_0x483e[36]]()[_0x483e[35]](mxEvent.UNDO,_0x87e0x44);_0x87e0xe[_0x483e[234]]()[_0x483e[35]](mxEvent.UNDO,_0x87e0x44);var _0x87e0x46=function(_0x87e0x45,_0x87e0x14){var _0x87e0x47=_0x87e0xe[_0x483e[236]](_0x87e0x14[_0x483e[232]](_0x483e[231])[_0x483e[235]]);var _0x87e0x35=[];for(var _0x87e0x30=1;_0x87e0x30< _0x87e0x47[_0x483e[83]];_0x87e0x30++){if(_0x87e0xe[_0x483e[53]][_0x483e[237]](_0x87e0x47[_0x87e0x30])!= null){_0x87e0x35[_0x483e[238]](_0x87e0x47[_0x87e0x30])}};_0x87e0xe[_0x483e[239]](_0x87e0x35)};_0x87e0x43[_0x483e[35]](mxEvent.UNDO,_0x87e0x46);_0x87e0x43[_0x483e[35]](mxEvent.REDO,_0x87e0x46);return _0x87e0x43};Editor[_0x483e[44]][_0x483e[13]]= function(){mxStencilRegistry[_0x483e[241]](STENCIL_PATH+ _0x483e[240])};(function(){mxStencilRegistry[_0x483e[242]]= {};mxStencilRegistry[_0x483e[243]]= [];mxStencilRegistry[_0x483e[244]]= function(_0x87e0x48){var _0x87e0x3c=mxStencilRegistry[_0x483e[245]][_0x87e0x48];if(_0x87e0x3c== null){var _0x87e0x49=mxStencilRegistry[_0x483e[246]](_0x87e0x48);if(_0x87e0x49!= null){var _0x87e0x4a=mxStencilRegistry[_0x483e[242]][_0x87e0x49];if(_0x87e0x4a!= null){if(mxStencilRegistry[_0x483e[243]][_0x87e0x49]== null){mxStencilRegistry[_0x483e[243]][_0x87e0x49]= 1;for(var _0x87e0x30=0;_0x87e0x30< _0x87e0x4a[_0x483e[83]];_0x87e0x30++){var _0x87e0x4b=_0x87e0x4a[_0x87e0x30];if(_0x87e0x4b[_0x483e[248]]()[_0x483e[247]](_0x87e0x4b[_0x483e[83]]- 4,_0x87e0x4b[_0x483e[83]])== _0x483e[25]){mxStencilRegistry[_0x483e[241]](_0x87e0x4b,null)}else {if(_0x87e0x4b[_0x483e[248]]()[_0x483e[247]](_0x87e0x4b[_0x483e[83]]- 3,_0x87e0x4b[_0x483e[83]])== _0x483e[249]){var _0x87e0x4c=mxUtils[_0x483e[250]](_0x87e0x4b);if(_0x87e0x4c!= null){eval[_0x483e[11]](window,_0x87e0x4c[_0x483e[251]]())}}else {}}}}}else {mxStencilRegistry[_0x483e[241]](STENCIL_PATH+ _0x483e[252]+ _0x87e0x49+ _0x483e[25],null)};_0x87e0x3c= mxStencilRegistry[_0x483e[245]][_0x87e0x48]}};return _0x87e0x3c};mxStencilRegistry[_0x483e[246]]= function(_0x87e0x48){var _0x87e0x4d=_0x87e0x48[_0x483e[254]](_0x483e[253]);var _0x87e0x4e=null;if(_0x87e0x4d[_0x483e[83]]> 0&& _0x87e0x4d[0]== _0x483e[255]){_0x87e0x4e= _0x87e0x4d[1];for(var _0x87e0x30=2;_0x87e0x30< _0x87e0x4d[_0x483e[83]]- 1;_0x87e0x30++){_0x87e0x4e+= _0x483e[252]+ _0x87e0x4d[_0x87e0x30]}};return _0x87e0x4e};mxStencilRegistry[_0x483e[241]]= function(_0x87e0x4f,_0x87e0x50,_0x87e0x51){_0x87e0x51= (_0x87e0x51!= null)?_0x87e0x51:false;var _0x87e0x52=mxStencilRegistry[_0x483e[243]][_0x87e0x4f];if(_0x87e0x51|| _0x87e0x52== null){var _0x87e0x53=false;if(_0x87e0x52== null){var _0x87e0x4c=mxUtils[_0x483e[250]](_0x87e0x4f);_0x87e0x52= _0x87e0x4c[_0x483e[256]]();mxStencilRegistry[_0x483e[243]][_0x87e0x4f]= _0x87e0x52;_0x87e0x53= true};mxStencilRegistry[_0x483e[257]](_0x87e0x52,_0x87e0x50,_0x87e0x53)}};mxStencilRegistry[_0x483e[257]]= function(_0x87e0x54,_0x87e0x50,_0x87e0x53){_0x87e0x53= (_0x87e0x53!= null)?_0x87e0x53:true;var _0x87e0x55=_0x87e0x54[_0x483e[258]];var _0x87e0x56=_0x87e0x55[_0x483e[184]];var _0x87e0x57=_0x483e[20];var _0x87e0x48=_0x87e0x55[_0x483e[56]](_0x483e[259]);if(_0x87e0x48!= null){_0x87e0x57= _0x87e0x48+ _0x483e[253]};while(_0x87e0x56!= null){if(_0x87e0x56[_0x483e[260]]== mxConstants[_0x483e[261]]){_0x87e0x48= _0x87e0x56[_0x483e[56]](_0x483e[259]);if(_0x87e0x48!= null){_0x87e0x57= _0x87e0x57[_0x483e[248]]();var _0x87e0x58=_0x87e0x48[_0x483e[263]](/ /g,_0x483e[262]);if(_0x87e0x53){mxStencilRegistry[_0x483e[264]](_0x87e0x57+ _0x87e0x58[_0x483e[248]](), new mxStencil(_0x87e0x56))};if(_0x87e0x50!= null){var _0x87e0x19=_0x87e0x56[_0x483e[56]](_0x483e[265]);var _0x87e0x1a=_0x87e0x56[_0x483e[56]](_0x483e[266]);_0x87e0x19= (_0x87e0x19== null)?80:parseInt(_0x87e0x19,10);_0x87e0x1a= (_0x87e0x1a== null)?80:parseInt(_0x87e0x1a,10);_0x87e0x50(_0x87e0x57,_0x87e0x58,_0x87e0x48,_0x87e0x19,_0x87e0x1a)}}};_0x87e0x56= _0x87e0x56[_0x483e[267]]}}})();OpenFile= function(_0x87e0x59){this[_0x483e[268]]= null;this[_0x483e[269]]= null;this[_0x483e[270]]= _0x87e0x59};OpenFile[_0x483e[44]][_0x483e[271]]= function(_0x87e0x6){this[_0x483e[269]]= _0x87e0x6;this[_0x483e[272]]()};OpenFile[_0x483e[44]][_0x483e[273]]= function(_0x87e0x6,_0x87e0x5a){this[_0x483e[274]]= _0x87e0x6;this[_0x483e[21]]= _0x87e0x5a;this[_0x483e[272]]()};OpenFile[_0x483e[44]][_0x483e[275]]= function(_0x87e0x5b){this[_0x483e[276]]();mxUtils[_0x483e[277]](_0x87e0x5b)};OpenFile[_0x483e[44]][_0x483e[272]]= function(){if(this[_0x483e[269]]!= null&& this[_0x483e[274]]!= null){this[_0x483e[269]](this[_0x483e[274]],this[_0x483e[21]]);this[_0x483e[276]]()}};OpenFile[_0x483e[44]][_0x483e[276]]= function(){if(this[_0x483e[270]]!= null){this[_0x483e[270]]()}}
\ No newline at end of file
diff --git a/public/assets/plugins/square/js/EditorUi.js b/public/assets/plugins/square/js/EditorUi.js
index 59ee4ce..36926e0 100644
--- a/public/assets/plugins/square/js/EditorUi.js
+++ b/public/assets/plugins/square/js/EditorUi.js
@@ -1,1623 +1 @@
-/**
- * $Id: EditorUi.js,v 1.21 2013/03/14 20:46:36 david Exp $
- * Copyright (c) 2006-2012, JGraph Ltd
- */
-/**
- * Constructs a new graph editor
- */
-
-EditorUi = function(editor, container) {
-	this.editor = editor || new Editor();
-	this.container = container || document.getElementById('geEditor');
-	var graph = editor.graph;
-	var self = this;
-
-	// Disables scrollbars
-	this.container.style.overflow = 'hidden';
-
-	// Pre-fetches submenu image
-	new Image().src = mxPopupMenu.prototype.submenuImage;
-
-	// Pre-fetches connect image
-	if (mxConnectionHandler.prototype.connectImage != null) {
-		new Image().src = mxConnectionHandler.prototype.connectImage.src;
-	}
-
-	// Creates the user interface
-	this.actions = new Actions(this);
-	this.menus = new Menus(this);
-	this.createDivs();
-	this.refresh();
-	this.createUi();
-
-	// Disables HTML and text selection
-	var textEditing = mxUtils.bind(this, function(evt) {
-		if (evt == null) {
-			evt = window.event;
-		}
-
-		if (this.isSelectionAllowed(evt)) {
-			return true;
-		}
-
-		return graph.isEditing();
-	});
-
-	// Disables text selection while not editing and no dialog visible
-	if (this.container == document.body) {
-		this.menubarContainer.onselectstart = textEditing;
-		this.menubarContainer.onmousedown = textEditing;
-		this.toolbarContainer.onselectstart = textEditing;
-		this.toolbarContainer.onmousedown = textEditing;
-		this.diagramContainer.onselectstart = textEditing;
-		this.diagramContainer.onmousedown = textEditing;
-		this.sidebarContainer.onselectstart = textEditing;
-		this.sidebarContainer.onmousedown = textEditing;
-		this.footerContainer.onselectstart = textEditing;
-		this.footerContainer.onmousedown = textEditing;
-	}
-
-	// And uses built-in context menu while editing
-	if (mxClient.IS_IE && (typeof(document.documentMode) === 'undefined' ||
-			document.documentMode < 9)) {
-		mxEvent.addListener(this.diagramContainer, 'contextmenu', textEditing);
-		mxEvent.addListener(this.sidebarContainer, 'contextmenu', textEditing);
-	} else {
-		// Allows browser context menu outside of diagram and sidebar
-		this.diagramContainer.oncontextmenu = textEditing;
-		this.sidebarContainer.oncontextmenu = textEditing;
-	}
-
-	// Contains the main graph instance inside the given panel
-	graph.init(this.diagramContainer);
-	graph.refresh();
-
-	// Enables scrollbars and sets cursor style for the container
-	graph.container.setAttribute('tabindex', '0');
-	// graph.container.style.overflow = (touchStyle) ? 'hidden' : 'auto';
-	graph.container.style.cursor = 'default';
-	graph.container.style.backgroundImage = 'url(' + editor.gridImage + ')';
-	graph.container.style.backgroundPosition = '-1px -1px';
-	graph.container.focus();
-
-	// Keeps graph container focused on mouse down
-	var graphFireMouseEvent = graph.fireMouseEvent;
-	graph.fireMouseEvent = function(evtName, me, sender) {
-		if (evtName == mxEvent.MOUSE_DOWN) {
-			this.container.focus();
-		}
-
-		graphFireMouseEvent.apply(this, arguments);
-	};
-
-	// Giuseppe Careri
-	// Defines invalid connections along with the error messages that they produce.
-	this.createMultiplicities(graph.multiplicities, ['start', 'finally', 'end'], [
-		[1, 1],
-		[1, 1],
-		[0, 0]
-	], [
-		[0, 0],
-		[0, 0],
-		[1, 'n']
-	]);
-	this.createMultiplicities(graph.multiplicities, ['answer', 'hangup', 'dial',
-		'ext_dial', 'queue', 'voicemail', 'callback'
-	], [
-		[1, 1],
-		[0, 0],
-		[0, 1],
-		[0, 1],
-		[0, 1],
-		[1, 1],
-		[0, 1]
-	], [
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n']
-	]);
-	this.createMultiplicities(graph.multiplicities, ['set', 'math'], [
-		[1, 1],
-		[1, 1]
-	], [
-		[1, 'n'],
-		[1, 'n']
-	]);
-	this.createMultiplicities(graph.multiplicities, ['background', 'playback',
-		'menu', 'saydigits', 'saynumber', 'sayphonetic', 'tts', 'ispeechtts',
-		'getdigits', 'getsecretdigits'
-	], [
-		[1, 'n'],
-		[1, 1],
-		[1, 'n'],
-		[1, 1],
-		[1, 1],
-		[1, 1],
-		[1, 1],
-		[1, 1],
-		[1, 'n'],
-		[1, 'n']
-	], [
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n']
-	]);
-	this.createMultiplicities(graph.multiplicities, ['record'], [
-		[1, 1]
-	], [
-		[1, 'n']
-	]);
-	this.createMultiplicities(graph.multiplicities, ['database', 'ispeechasr', 'sendSMS', 'sendMail'], [
-		[1, 1],
-		[1, 1],
-		[1, 1],
-		[1, 1]
-	], [
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n']
-	]);
-	this.createMultiplicities(graph.multiplicities, ['gotoc', 'gotoif',
-		'gotoiftime', 'gotoifmultitime', 'vswitch'
-	], [
-		[0, 0],
-		[1, 2],
-		[1, 2],
-		[1, 2],
-		[1, 'n']
-	], [
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n']
-	]);
-	this.createMultiplicities(graph.multiplicities, ['queuelog', 'goal'], [
-		[1, 1],
-		[1, 1]
-	], [
-		[1, 'n'],
-		[1, 'n']
-	]);
-	this.createMultiplicities(graph.multiplicities, ['noop', 'system', 'agi',
-		'subproject', 'custom_app'
-	], [
-		[1, 1],
-		[1, 1],
-		[0, 1],
-		[0, 0],
-		[0, 1]
-	], [
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n'],
-		[1, 'n']
-	]);
-
-	// Giuseppe Careri
-	// Processes a doubleclick on an optional cell and fires a <dblclick> event.
-	// The event is fired initially.
-	// If the graph is enabled and the event has not been consumed, then <edit> is called with the given cell.
-	// The event is ignored if no cell was specified.
-	graph.dblClick = function(evt, cell) {
-		var edges = ['background', 'gotoif', 'gotoiftime', 'menu', 'getdigits', 'getsecretdigits',
-			'vswitch'
-		];
-		var mxe = new mxEventObject(mxEvent.DOUBLE_CLICK, 'event', evt, 'cell',
-			cell);
-		this.fireEvent(mxe);
-
-		if (this.isEnabled() && !mxEvent.isConsumed(evt) && !mxe.isConsumed()) {
-			// Override dblClick Vertices and Edges
-			if (this.getModel().isEdge(cell)) {
-				if (edges.indexOf(cell.source.value.tagName) >= 0)
-					this.startEditingAtCell(cell);
-			} else if (this.getModel().isVertex(cell)) {
-				self.showDialog(new GeneralDialog(self, cell).container, 320, 280, true,
-					true);
-			}
-			mxe.consume();
-		}
-	}
-
-	// Configures automatic expand on mouseover
-	graph.panningHandler.autoExpand = true;
-
-	// Installs context menu
-	graph.panningHandler.factoryMethod = mxUtils.bind(this, function(menu, cell,
-		evt) {
-		this.menus.createPopupMenu(menu, cell, evt);
-	});
-
-	// Initializes the outline
-	editor.outline.init(this.outlineContainer);
-
-	// Hides context menu
-	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt) {
-		graph.panningHandler.hideMenu();
-	}));
-
-	// Adds gesture handling (pinch to zoom)
-	if (mxClient.IS_TOUCH) {
-		mxEvent.addListener(graph.container, 'gesturechange',
-			mxUtils.bind(this, function(evt) {
-				graph.view.getDrawPane().setAttribute('transform', 'scale(' + evt.scale +
-					')');
-				graph.view.getOverlayPane().style.visibility = 'hidden';
-			})
-		);
-
-		mxEvent.addListener(graph.container, 'gestureend',
-			mxUtils.bind(this, function(evt) {
-				graph.view.getDrawPane().removeAttribute('transform');
-				graph.zoomToCenter = true;
-				graph.zoom(evt.scale);
-				graph.view.getOverlayPane().style.visibility = 'visible';
-			})
-		);
-	}
-
-	// Create handler for key events
-	var keyHandler = this.createKeyHandler(editor);
-
-	// Getter for key handler
-	this.getKeyHandler = function() {
-		return keyHandler;
-	};
-
-	// Updates the editor UI after the window has been resized
-	mxEvent.addListener(window, 'resize', mxUtils.bind(this, function() {
-		this.refresh();
-		graph.sizeDidChange();
-		this.editor.outline.update(false);
-		this.editor.outline.outline.sizeDidChange();
-	}));
-
-	// Updates action and menu states
-	this.init();
-	this.open();
-};
-
-/**
- * Specifies the size of the split bar.
- */
-EditorUi.prototype.splitSize = (mxClient.IS_TOUCH) ? 16 : 8;
-
-/**
- * Specifies the height of the menubar. Default is 34.
- */
-EditorUi.prototype.menubarHeight = 33;
-
-/**
- * Specifies the height of the toolbar. Default is 36.
- */
-EditorUi.prototype.toolbarHeight = 36;
-
-/**
- * Specifies the height of the footer. Default is 28.
- */
-EditorUi.prototype.footerHeight = 28;
-
-/**
- * Specifies the position of the horizontal split bar. Default is 212.
- */
-EditorUi.prototype.hsplitPosition = 204;
-
-/**
- * Specifies the position of the vertical split bar. Default is 190.
- */
-EditorUi.prototype.vsplitPosition = 190;
-
-/**
- * Installs the listeners to update the action states.
- */
-EditorUi.prototype.init = function() {
-	// Updates action states
-	this.addUndoListener();
-	this.addSelectionListener();
-
-	// Overrides clipboard to update paste action state
-	var paste = this.actions.get('paste');
-
-	var updatePaste = function() {
-		paste.setEnabled(!mxClipboard.isEmpty());
-	};
-
-	var mxClipboardCut = mxClipboard.cut;
-	mxClipboard.cut = function() {
-		mxClipboardCut.apply(this, arguments);
-		updatePaste();
-	};
-
-	var mxClipboardCopy = mxClipboard.copy;
-	mxClipboard.copy = function() {
-		mxClipboardCopy.apply(this, arguments);
-		updatePaste();
-	};
-};
-
-/**
- * Hook for allowing selection and context menu for certain events.
- */
-EditorUi.prototype.isSelectionAllowed = function(evt) {
-	return false;
-};
-
-/**
- * Opens the current diagram via the window.opener if one exists.
- */
-EditorUi.prototype.open = function() {
-	// Cross-domain window access is not allowed in FF, so if we
-	// were opened from another domain then this will fail.
-	try {
-		if (window.opener != null && window.opener.openFile != null) {
-			window.opener.openFile.setConsumer(mxUtils.bind(this, function(xml,
-				filename) {
-				try {
-					var doc = mxUtils.parseXml(xml);
-					this.editor.setGraphXml(doc.documentElement);
-					this.editor.modified = false;
-					this.editor.undoManager.clear();
-
-					if (filename != null) {
-						this.editor.filename = filename;
-					}
-				} catch (e) {
-					mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);
-				}
-			}));
-		}
-	} catch (e) {
-		// ignore
-	}
-};
-
-/**
- * Giuseppe Careri
- * Opens the current diagram via string.
- */
-EditorUi.prototype.openString = function(xml, filename, data) {
-	try {
-		var doc = mxUtils.parseXml(xml);
-		this.editor.setGraphXml(doc.documentElement);
-		this.editor.modified = false;
-		this.editor.undoManager.clear();
-
-		if (filename != null) {
-			this.editor.filename = filename;
-		}
-
-		if (data != null) {
-			this.editor.data = data;
-		}
-	} catch (e) {
-		mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);
-	}
-};
-
-/**
- * Saves As the current graph under the given project name.
- */
-EditorUi.prototype.new = function(name) {
-	var editor = this.editor;
-
-	if (name != null) {
-		var xml = mxUtils.getPrettyXml(this.editor.getGraphXml());
-		try {
-			if (useLocalStorage) {
-				if (localStorage.getItem(name) != null &&
-					!mxUtils.confirm(mxResources.get('replace', [name]))) {
-					return;
-				}
-
-				localStorage.setItem(name, xml);
-				this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
-			} else {
-				console.log(xml.length);
-				console.log(MAX_REQUEST_SIZE);
-				if (xml.length < MAX_REQUEST_SIZE) {
-					xml = encodeURIComponent(xml);
-					name = encodeURIComponent(name);
-
-					var xhr = new XMLHttpRequest();
-					xhr.open("POST", SAVE_URL, true);
-					xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-					xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
-					xhr.onload = function(e) {
-						if (xhr.readyState === 4) {
-							if (xhr.status === 201) {
-								editor.setStatus('Project ' + JSON.parse(xhr.response).name +
-									' is opening in new window!');
-								setTimeout(function() {
-									window.open('square/projects/view/' + JSON.parse(xhr.response).id,
-										'_blank');
-								}, 1500);
-							} else {
-								try {
-									var response = JSON.parse(xhr.response);
-									editor.setStatus('Error creating project: ' + response.errors[0].message);
-								} catch (e) {
-									editor.setStatus('Error creating project' + ' (' + xhr.status + ' ' + xhr.statusText + ')');
-								}
-							}
-						}
-					};
-					xhr.onerror = function(e) {
-						mxUtils.alert(xhr.statusText);
-					};
-					xhr.send('description=project_new&name=' + name);
-				} else {
-					mxUtils.alert(mxResources.get('drawingTooLarge'));
-					mxUtils.popup(xml);
-
-					return;
-				}
-			}
-
-			this.editor.filename = name;
-			this.editor.modified = false;
-		} catch (e) {
-			this.editor.setStatus('Error creating project');
-		}
-	} else {
-		this.editor.setStatus('Error creating project');
-	}
-};
-
-
-/**
- * Saves the current graph under the given project name.
- */
-EditorUi.prototype.save = function(name) {
-	var editor = this.editor;
-
-	if (name != null) {
-		var xml = mxUtils.getPrettyXml(this.editor.getGraphXml());
-		try {
-			if (useLocalStorage) {
-				if (localStorage.getItem(name) != null &&
-					!mxUtils.confirm(mxResources.get('replace', [name]))) {
-					return;
-				}
-
-				localStorage.setItem(name, xml);
-				this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
-			} else {
-				console.log(xml.length);
-				console.log(MAX_REQUEST_SIZE);
-				if (xml.length < MAX_REQUEST_SIZE) {
-					xml = encodeURIComponent(xml);
-
-					var xhr = new XMLHttpRequest();
-					xhr.open("PUT", SAVE_URL + this.editor.data.id, true);
-					xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-					xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
-					xhr.onload = function(e) {
-						if (xhr.readyState === 4) {
-							if (xhr.status === 200) {
-								editor.setStatus('Updated at ' + JSON.parse(xhr.response).updatedAt +
-									' (' + xhr.status + ' ' + xhr.statusText + ')');
-							} else {
-								try {
-									var response = JSON.parse(xhr.response);
-									editor.setStatus('Error saving project: ' + response.errors[0].message);
-								} catch (e) {
-									editor.setStatus('Error saving project' + ' (' + xhr.status + ' ' + xhr.statusText + ')');
-								}
-							}
-						}
-					};
-					xhr.onerror = function(e) {
-						mxUtils.alert(xhr.statusText);
-					};
-					xhr.send('preproduction=' + xml);
-				} else {
-					mxUtils.alert(mxResources.get('drawingTooLarge'));
-					mxUtils.popup(xml);
-
-					return;
-				}
-			}
-
-			this.editor.filename = name;
-			this.editor.modified = false;
-		} catch (e) {
-			this.editor.setStatus('Error saving file');
-		}
-	} else {
-		this.editor.setStatus('Error saving file');
-	}
-};
-
-/**
- * Saves the current graph under the given project name.
- */
-EditorUi.prototype.description = function(description) {
-	var editor = this.editor;
-
-	if (description !== null) {
-		var xhr = new XMLHttpRequest();
-		xhr.open("PUT", SAVE_URL + this.editor.data.id, true);
-		xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-		xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
-
-		xhr.onload = function(e) {
-			if (xhr.readyState === 4) {
-				if (xhr.status === 200) {
-					editor.setStatus('Updated at ' + JSON.parse(xhr.response).updatedAt + ' (' + xhr.status + ' ' + xhr.statusText + ')');
-					editor.data.description = description;
-				} else {
-					try {
-						var response = JSON.parse(xhr.response);
-						editor.setStatus('Error updating description: ' + response.errors[0].message);
-					} catch (e) {
-						editor.setStatus('Error updating description' + ' (' + xhr.status + ' ' + xhr.statusText + ')');
-					}
-				}
-			}
-		};
-		xhr.onerror = function(e) {
-			mxUtils.alert(xhr.statusText);
-		};
-		xhr.send('description=' + description);
-	} else {
-		this.editor.setStatus('Error updating description');
-	}
-};
-
-/**
- * Saves As the current graph under the given project name.
- */
-EditorUi.prototype.saveAs = function(name) {
-	var editor = this.editor;
-
-	if (name != null) {
-		var xml = mxUtils.getPrettyXml(this.editor.getGraphXml());
-		try {
-			if (useLocalStorage) {
-				if (localStorage.getItem(name) != null &&
-					!mxUtils.confirm(mxResources.get('replace', [name]))) {
-					return;
-				}
-
-				localStorage.setItem(name, xml);
-				this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
-			} else {
-				console.log(xml.length);
-				console.log(MAX_REQUEST_SIZE);
-				if (xml.length < MAX_REQUEST_SIZE) {
-					xml = encodeURIComponent(xml);
-					name = encodeURIComponent(name);
-
-					var xhr = new XMLHttpRequest();
-					xhr.open("POST", SAVE_URL, true);
-					xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-					xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
-					xhr.onload = function(e) {
-						if (xhr.readyState === 4) {
-							if (xhr.status === 201) {
-								editor.setStatus('Project ' + JSON.parse(xhr.response).name +
-									' is opening in new window!');
-								setTimeout(function() {
-									window.open('square/projects/view/' + JSON.parse(xhr.response).id,
-										'_blank');
-								}, 1500);
-							} else {
-								try {
-									var response = JSON.parse(xhr.response);
-									editor.setStatus('Error cloning project: ' + response.errors[0].message);
-								} catch (e) {
-									editor.setStatus('Error cloning project' + ' (' + xhr.status + ' ' + xhr.statusText + ')');
-								}
-							}
-						}
-					};
-					xhr.onerror = function(e) {
-						mxUtils.alert(xhr.statusText);
-					};
-					xhr.send('description=project_cloned&name=' + name +
-						'&preproduction=' + xml + '&production=' + xml);
-				} else {
-					mxUtils.alert(mxResources.get('drawingTooLarge'));
-					mxUtils.popup(xml);
-
-					return;
-				}
-			}
-
-			this.editor.filename = name;
-			this.editor.modified = false;
-		} catch (e) {
-			this.editor.setStatus('Error saving file');
-		}
-	} else {
-		this.editor.setStatus('Error saving file');
-	}
-};
-
-/**
- * Plush the current graph under the given project name.
- */
-EditorUi.prototype.validate = function(a, b) {
-	var graph = this.editor.graph;
-	for (var a = a != null ? a : graph.model.getRoot(), b = b != null ? b : {}, c =
-			true, d = graph.model.getChildCount(a), e = 0; e < d; e++) {
-		var f = graph.model.getChildAt(a, e),
-			g = b;
-		graph.isValidRoot(f) && (g = {});
-		g = this.validate(f, g);
-		g != null ? graph.setCellWarning(f, g.replace(/\n/g, "<br>")) : graph.setCellWarning(
-			f, null);
-		c = c && g == null
-	}
-
-	d = "";
-
-	//--- Giuseppe Careri - Modify 12/12/2013 - [email-masked]
-	if (graph.model.isVertex(a)) {
-		switch (a.value.nodeName) {
-			case 'start':
-				d = this.validateBlock('start') ? '' : "Only one Start block is allowed" +
-					"\n";
-				break;
-			case 'finally':
-				d = this.validateBlock('finally') ? '' :
-					"Only one Finally block is allowed" + "\n";
-				break;
-			case 'playback':
-				d = (a.value.getAttribute('file_id') > 0) ? "" : mxResources.get(
-					'noAudioSelected') + "\n";
-				break;
-			case 'background':
-			case 'menu':
-				d = (a.value.getAttribute('file_id') > 0) ? "" : mxResources.get(
-					'noAudioSelected') + "\n";
-				d += (a.value.getAttribute('digit') > 0) ? "" : mxResources.get(
-					'wrongMaxDigit') + "\n";
-				break;
-			case 'getdigits':
-				d = (a.value.getAttribute('file_id') > 0) ? "" : mxResources.get(
-					'noAudioSelected') + "\n";
-				d += (a.value.getAttribute('variable_id') > 0) ? "" : mxResources.get(
-					'noVariableSelected') + "\n";
-				d += (a.value.getAttribute('mindigit') > 0) ? "" : mxResources.get(
-					'wrongMinDigit') + "\n";
-				d += (a.value.getAttribute('maxdigit') > 0) ? "" : mxResources.get(
-					'wrongMaxDigit') + "\n";
-			case 'getsecretdigits':
-				d = (a.value.getAttribute('file_id') > 0) ? "" : mxResources.get(
-					'noAudioSelected') + "\n";
-				d += (a.value.getAttribute('variable_id') > 0) ? "" : mxResources.get(
-					'noVariableSelected') + "\n";
-				d += (a.value.getAttribute('mindigit') > 0) ? "" : mxResources.get(
-					'wrongMinDigit') + "\n";
-				d += (a.value.getAttribute('maxdigit') > 0) ? "" : mxResources.get(
-					'wrongMaxDigit') + "\n";
-				d += (a.value.getAttribute('hiddendigitsnum') >= 0) ? "" : mxResources.get(
-					'wrongHiddenDigitsnum') + "\n";
-				break;
-			case 'vswitch':
-				d = (a.value.getAttribute('variable') !== "") ? "" : mxResources.get(
-					'noVariableSelected') + "\n";
-				break;
-			case 'database':
-				d = (a.value.getAttribute('odbc_id') > 0) ? "" : mxResources.get(
-					'noDatabaseSelected') + "\n";
-				break;
-			case 'ext_dial':
-				d = (a.value.getAttribute('trunk_name') !== '-1') ? "" : mxResources.get(
-					'noTrunkSelected') + "\n";
-				break;
-			case 'set':
-			case 'math':
-				d = (a.value.getAttribute('variable_id') > 0) ? "" : mxResources.get(
-					'noVariableSelected') + "\n";
-				break;
-			case 'gotoc':
-				d = (a.value.getAttribute('extension') !== "") ? "" : mxResources.get(
-					'noExtensionSelected') + "\n";
-				break;
-			case 'system':
-			case 'agi':
-				d = (a.value.getAttribute('command') !== "") ? "" : mxResources.get(
-					'noCommandSelected') + "\n";
-				break;
-			case 'gotoif':
-				d = (a.value.getAttribute('condition') !== "") ? "" : mxResources.get(
-					'noConditionSelected') + "\n";
-				break;
-			case 'saydigits':
-				d = (a.value.getAttribute('digits') !== "") ? "" : mxResources.get(
-					'noDigitsSelected') + "\n";
-				break;
-			case 'saynumber':
-				d = (a.value.getAttribute('number') !== "") ? "" : mxResources.get(
-					'noNumberSelected') + "\n";
-				break;
-			case 'sayphonetic':
-				d = (a.value.getAttribute('text') !== "") ? "" : mxResources.get(
-					'noTextSelected') + "\n";
-				break;
-			case 'record':
-				d = (a.value.getAttribute('file') !== "") ? "" : mxResources.get(
-					'noFileSelected') + "\n";
-				break;
-			case 'goal':
-				d = (a.value.getAttribute('goalname') !== "") ? "" : mxResources.get(
-					'noGoalSelected') + "\n";
-				break;
-			case 'ext_dial':
-				d = (a.value.getAttribute('phone') !== "") ? "" : mxResources.get(
-					'noIdentifierSelected') + "\n";
-				break;
-			case 'dial':
-				d = (a.value.getAttribute('sip_id') > 0) ? "" : mxResources.get(
-					'noIdentifierSelected') + "\n";
-				break;
-			case 'queue':
-				d = (a.value.getAttribute('queue_id') !== "-1") ? "" : mxResources.get(
-					'noQueueSelected') + "\n";
-				break;
-			case 'callback':
-				d = (a.value.getAttribute('list_id') > 0) ? "" : mxResources.get(
-					'noListSelected') + "\n";
-				break;
-			case 'gotoiftime':
-				d = (a.value.getAttribute('interval_id') > 0) ? "" : mxResources.get(
-					'noIntervalSelected') + "\n";
-				break;
-			case 'gotoifmultitime':
-				d = (a.value.getAttribute('interval_id') != "") ? "" : mxResources.get(
-					'noIntervalSelected') + "\n";
-				break;
-			case 'voicemail':
-				d = (a.value.getAttribute('mailbox') !== "") ? "" : mxResources.get(
-					'noBoxNumberSelected') + "\n";
-				break;
-			case 'subproject':
-				d = (a.value.getAttribute('project_id') > 0) ? "" : mxResources.get(
-					'noProjectSelected') + "\n";
-				break;
-			case 'sendSMS':
-				d = (a.value.getAttribute('account_id') > 0) ? "" : mxResources.get(
-					'noAccountSelected') + "\n";
-				d += (a.value.getAttribute('to') !== "") ? "" : mxResources.get(
-					'noRecipientSelected') + "\n";
-				d += (a.value.getAttribute('sms_text') !== "") ? "" : mxResources.get(
-					'noTextSelected') + "\n";
-				break;
-			case 'sendMail':
-				d = (a.value.getAttribute('account_id') > 0) ? "" : mxResources.get(
-					'noAccountSelected') + "\n";
-				d += (a.value.getAttribute('to') !== "") ? "" : mxResources.get(
-					'noRecipientSelected') + "\n";
-				break;
-			case 'tts':
-				d = (a.value.getAttribute('text') !== "") ? "" : mxResources.get(
-					'noTextSelected') + "\n";
-				break;
-			case 'ispeechtts':
-				d = (a.value.getAttribute('text') !== "") ? "" : mxResources.get(
-					'noTextSelected') + "\n";
-				d += (a.value.getAttribute('key') !== "") ? "" : mxResources.get(
-					'noKeySelected') + "\n";
-				break;
-			case 'ispeechasr':
-				d = (a.value.getAttribute('key') !== "") ? "" : mxResources.get(
-					'noKeySelected') + "\n";
-				break;
-		}
-	}
-
-	if (graph.model.isEdge(a)) {
-		var z = graph.model.getCell(a.source.getId());
-		switch (z.value.nodeName) {
-			case 'background':
-				var patt = /^[0-9]{1,45}$|^[i]{1}$|^[t]{1}|^[#]{1}|^[*]{1}$/;
-				d = d + ((patt.test(String(a.getValue()))) ? "" : mxResources.get(
-					'numberOrInvalidOrTimeout') + "\n");
-				break;
-			case 'menu':
-				var patt = /^[0-9]{1,45}$|^[-]{1}$|^[i]{1}$|^[t]{1}|^[#]{1}|^[*]{1}$/;
-				var str = String(a.getValue());
-				var res = str.split(",");
-				res.forEach(function(entry) {
-					d = d + ((patt.test(entry)) ? "" : mxResources.get('numberOrAll') +
-						"\n");
-				});
-				break;
-			case 'getsecretdigits':
-			case 'getdigits':
-				var patt = /^(x|i|-)$/;
-				var str = String(a.getValue());
-				d = d + ((patt.test(str)) ? "" : mxResources.get(
-					'numberOrInvalidOrDefault') + "\n");
-				break;
-			case 'gotoif':
-			case 'gotoiftime':
-			case 'gotoifmultitime':
-				var patt = /^(true){1}$|^(false){1}$/;
-				d = d + ((patt.test(String(a.getValue()))) ? "" : mxResources.get(
-					'trueOrFalse') + "\n");
-				break;
-
-		}
-	}
-	// -----------------------------------------------------------------
-
-
-	graph.isCellCollapsed(a) && !c && (d = d + ((mxResources.get(graph.containsValidationErrorsResource) ||
-		graph.containsValidationErrorsResource) + "\n"));
-	d = graph.model.isEdge(a) ?
-		d + (graph.getEdgeValidationError(a, graph.model.getTerminal(a, true), graph
-			.model.getTerminal(a, false)) || "") : d + (graph.getCellValidationError(a) ||
-			"");
-	e = graph.validateCell(a, b);
-	e != null && (d = d + e);
-	graph.model.getParent(a) == null && graph.view.validate();
-	return d.length > 0 || !c ? d : null
-};
-EditorUi.prototype.validateBlock = function(blockName) {
-	var graph = this.editor.graph;
-	var parent = graph.getDefaultParent();
-	var count = 0;
-	// var model = graph.getModel();
-	//We can also use model.getChildren(parent)
-	parent.children.forEach(function(n) {
-		if (graph.model.isVertex(n) && n.value.nodeName == blockName) {
-			count++;
-		}
-	});
-	return count > 1 ? false : true;
-}
-EditorUi.prototype.publish = function(name) {
-	var editor = this.editor;
-
-	if (name != null) {
-		var response = this.validate();
-		if (response === null) {
-
-			var xml = mxUtils.getPrettyXml(this.editor.getGraphXml());
-			try {
-				if (useLocalStorage) {
-					if (localStorage.getItem(name) != null &&
-						!mxUtils.confirm(mxResources.get('replace', [name]))) {
-						return;
-					}
-
-					localStorage.setItem(name, xml);
-					this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
-				} else {
-					console.log(xml.length);
-					console.log(MAX_REQUEST_SIZE);
-					if (xml.length < MAX_REQUEST_SIZE) {
-						xml = encodeURIComponent(xml);
-
-						var xhr = new XMLHttpRequest();
-						xhr.open("PUT", SAVE_URL + this.editor.data.id, true);
-						xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-						xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
-						xhr.onload = function(e) {
-							if (xhr.readyState === 4) {
-								if (xhr.status === 200) {
-									editor.setStatus('Published at ' + JSON.parse(xhr.response).updatedAt +
-										' (' + xhr.status + ' ' + xhr.statusText + ')');
-								} else {
-									try {
-										var response = JSON.parse(xhr.response);
-										editor.setStatus('Error publishing project: ' + response.errors[0].message);
-									} catch (e) {
-										editor.setStatus('Error publishing project' + ' (' + xhr.status + ' ' + xhr.statusText + ')');
-									}
-								}
-							}
-						};
-						xhr.onerror = function(e) {
-							mxUtils.alert(xhr.statusText);
-						};
-						xhr.send('preproduction=' + xml + '&production=' + xml);
-					} else {
-						mxUtils.alert(mxResources.get('drawingTooLarge'));
-						mxUtils.popup(xml);
-
-						return;
-					}
-				}
-
-				this.editor.filename = name;
-				this.editor.modified = false;
-			} catch (e) {
-				this.editor.setStatus('Error publishing file');
-			}
-		} else {
-			editor.setStatus('Error publishing project: ');
-		}
-	} else {
-		this.editor.setStatus('Error publishing file');
-	}
-};
-
-
-/**
- * Create variable
- */
-EditorUi.prototype.variable = function(name, description) {
-	var editor = this.editor;
-
-	if (name != null) {
-		try {
-
-			var xhr = new XMLHttpRequest();
-			xhr.open("POST", VARIABLE_URL, true);
-			xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-			xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token);
-			xhr.onload = function(e) {
-				if (xhr.readyState === 4) {
-					if (xhr.status === 201) {
-						editor.setStatus('Variable created at ' + JSON.parse(xhr.response).createdAt +
-							' (' + xhr.status + ' ' + xhr.statusText + ')');
-					} else {
-						try {
-							var response = JSON.parse(xhr.response);
-							editor.setStatus('Error creating variable: ' + response.errors[0].message);
-						} catch (e) {
-							editor.setStatus('Error creating variable' + ' (' + xhr.status + ' ' + xhr.statusText + ')');
-						}
-					}
-				}
-			};
-			xhr.onerror = function(e) {
-				mxUtils.alert(xhr.statusText);
-			};
-			xhr.send('name=' + name + '&description=' + description);
-		} catch (e) {
-			this.editor.setStatus('Error creating variable');
-		}
-	} else {
-		this.editor.setStatus('Error creating variable');
-	}
-};
-
-/**
- * Returns the URL for a copy of this editor with no state.
- */
-EditorUi.prototype.getUrl = function(pathname) {
-	var href = (pathname != null) ? pathname : window.location.pathname;
-	var parms = (href.indexOf('?') > 0) ? 1 : 0;
-
-	// Removes template URL parameter for new blank diagram
-	for (var key in urlParams) {
-		if (parms == 0) {
-			href += '?';
-		} else {
-			href += '&';
-		}
-
-		href += key + '=' + urlParams[key];
-		parms++;
-	}
-
-	return href;
-};
-
-/**
- * Updates the states of the given undo/redo items.
- */
-EditorUi.prototype.addUndoListener = function() {
-	var undo = this.actions.get('undo');
-	var redo = this.actions.get('redo');
-
-	var undoMgr = this.editor.undoManager;
-
-	var undoListener = function() {
-		undo.setEnabled(undoMgr.canUndo());
-		redo.setEnabled(undoMgr.canRedo());
-	};
-
-	undoMgr.addListener(mxEvent.ADD, undoListener);
-	undoMgr.addListener(mxEvent.UNDO, undoListener);
-	undoMgr.addListener(mxEvent.REDO, undoListener);
-	undoMgr.addListener(mxEvent.CLEAR, undoListener);
-
-	// Updates the button states once
-	undoListener();
-};
-
-/**
- * Updates the states of the given toolbar items based on the selection.
- */
-EditorUi.prototype.addSelectionListener = function() {
-	var selectionListener = mxUtils.bind(this, function() {
-		var graph = this.editor.graph;
-		var selected = !graph.isSelectionEmpty();
-		var vertexSelected = false;
-		var edgeSelected = false;
-
-		var cells = graph.getSelectionCells();
-
-		if (cells != null) {
-			for (var i = 0; i < cells.length; i++) {
-				var cell = cells[i];
-
-				if (graph.getModel().isEdge(cell)) {
-					edgeSelected = true;
-				}
-
-				if (graph.getModel().isVertex(cell)) {
-					vertexSelected = true;
-				}
-
-				if (edgeSelected && vertexSelected) {
-					break;
-				}
-			}
-		}
-
-		// Updates action states
-		var actions = ['cut', 'copy', 'delete', 'duplicate', 'bold', 'italic',
-			'style', 'underline', 'toFront', 'toBack', 'dashed', 'rounded',
-			'shadow',
-			'tilt', 'autosize'
-		];
-
-		for (var i = 0; i < actions.length; i++) {
-			this.actions.get(actions[i]).setEnabled(selected);
-		}
-
-		this.actions.get('curved').setEnabled(edgeSelected);
-		this.actions.get('rotation').setEnabled(vertexSelected);
-		this.actions.get('wordWrap').setEnabled(vertexSelected);
-		this.actions.get('group').setEnabled(graph.getSelectionCount() > 1);
-		this.actions.get('ungroup').setEnabled(graph.getSelectionCount() == 1 &&
-			graph.getModel().getChildCount(graph.getSelectionCell()) > 0);
-		var oneVertexSelected = vertexSelected && graph.getSelectionCount() == 1;
-		this.actions.get('removeFromGroup').setEnabled(oneVertexSelected &&
-			graph.getModel().isVertex(graph.getModel().getParent(graph.getSelectionCell()))
-		);
-
-		// Updates menu states
-		var menus = ['fontFamily', 'fontSize', 'alignment', 'position', 'text',
-			'format',
-			'arrange', 'linewidth', 'spacing'
-		];
-
-		for (var i = 0; i < menus.length; i++) {
-			this.menus.get(menus[i]).setEnabled(selected);
-		}
-
-		menus = ['line', 'lineend', 'linestart'];
-
-		for (var i = 0; i < menus.length; i++) {
-			this.menus.get(menus[i]).setEnabled(edgeSelected);
-		}
-
-		this.actions.get('setAsDefaultEdge').setEnabled(edgeSelected);
-
-		this.menus.get('align').setEnabled(graph.getSelectionCount() > 1);
-		this.menus.get('direction').setEnabled(vertexSelected || (edgeSelected &&
-			graph.isLoop(graph.view.getState(graph.getSelectionCell()))));
-		this.menus.get('navigation').setEnabled(graph.foldingEnabled && ((graph.view
-				.currentRoot != null) ||
-			(graph.getSelectionCount() == 1 && graph.isValidRoot(graph.getSelectionCell()))
-		));
-		this.actions.get('home').setEnabled(graph.view.currentRoot != null);
-		this.actions.get('exitGroup').setEnabled(graph.view.currentRoot != null);
-		var groupEnabled = graph.getSelectionCount() == 1 && graph.isValidRoot(
-			graph.getSelectionCell());
-		this.actions.get('enterGroup').setEnabled(groupEnabled);
-		this.actions.get('expand').setEnabled(groupEnabled);
-		this.actions.get('collapse').setEnabled(groupEnabled);
-		this.actions.get('editLink').setEnabled(graph.getSelectionCount() == 1);
-		this.actions.get('openLink').setEnabled(graph.getSelectionCount() == 1 &&
-			graph.getLinkForCell(graph.getSelectionCell()) != null);
-	});
-
-	this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,
-		selectionListener);
-	selectionListener();
-};
-
-/**
- * Refreshes the viewport.
- */
-EditorUi.prototype.refresh = function() {
-	var quirks = mxClient.IS_IE && (document.documentMode == null || document.documentMode ==
-		5);
-	var w = this.container.clientWidth;
-	var h = this.container.clientHeight;
-
-	if (this.container == document.body) {
-		w = document.body.clientWidth || document.documentElement.clientWidth;
-		h = (quirks) ? document.body.clientHeight || document.documentElement.clientHeight :
-			document.documentElement.clientHeight;
-	}
-
-	var effHsplitPosition = Math.max(0, Math.min(this.hsplitPosition, w - this.splitSize -
-		20));
-	var effVsplitPosition = Math.max(0, Math.min(this.vsplitPosition, h - this.menubarHeight -
-		this.toolbarHeight - this.footerHeight - this.splitSize - 1));
-
-	this.menubarContainer.style.height = this.menubarHeight + 'px';
-	this.toolbarContainer.style.top = this.menubarHeight + 'px';
-	this.toolbarContainer.style.height = this.toolbarHeight + 'px';
-
-	var tmp = this.menubarHeight + this.toolbarHeight;
-
-	if (!mxClient.IS_QUIRKS) {
-		tmp += 1;
-	}
-
-	this.sidebarContainer.style.top = tmp + 'px';
-	this.sidebarContainer.style.width = effHsplitPosition + 'px';
-	this.outlineContainer.style.width = effHsplitPosition + 'px';
-	this.outlineContainer.style.height = effVsplitPosition + 'px';
-	this.outlineContainer.style.bottom = this.footerHeight + 'px';
-	this.diagramContainer.style.left = (effHsplitPosition + this.splitSize) +
-		'px';
-	this.diagramContainer.style.top = this.sidebarContainer.style.top;
-	this.footerContainer.style.height = this.footerHeight + 'px';
-	this.footerContainer.style.display = 'none';
-	this.hsplit.style.top = this.sidebarContainer.style.top;
-	this.hsplit.style.bottom = this.outlineContainer.style.bottom;
-	this.hsplit.style.left = effHsplitPosition + 'px';
-	this.vsplit.style.width = this.sidebarContainer.style.width;
-	this.vsplit.style.bottom = (effVsplitPosition + this.footerHeight) + 'px';
-
-	if (quirks) {
-		this.menubarContainer.style.width = w + 'px';
-		this.toolbarContainer.style.width = this.menubarContainer.style.width;
-		var sidebarHeight = (h - effVsplitPosition - this.splitSize - this.footerHeight -
-			this.menubarHeight - this.toolbarHeight);
-		this.sidebarContainer.style.height = sidebarHeight + 'px';
-		this.diagramContainer.style.width = (w - effHsplitPosition - this.splitSize) +
-			'px';
-		var diagramHeight = (h - this.footerHeight - this.menubarHeight - this.toolbarHeight);
-		this.diagramContainer.style.height = diagramHeight + 'px';
-		this.footerContainer.style.width = this.menubarContainer.style.width;
-		this.hsplit.style.height = diagramHeight + 'px';
-	} else {
-		this.sidebarContainer.style.bottom = (effVsplitPosition + this.splitSize +
-			this.footerHeight) + 'px';
-		this.diagramContainer.style.bottom = this.outlineContainer.style.bottom;
-	}
-};
-
-/**
- * Creates the required containers.
- */
-EditorUi.prototype.createDivs = function() {
-	this.menubarContainer = this.createDiv('geMenubarContainer');
-	this.toolbarContainer = this.createDiv('geToolbarContainer');
-	this.sidebarContainer = this.createDiv('geSidebarContainer');
-	this.outlineContainer = this.createDiv('geOutlineContainer');
-	this.diagramContainer = this.createDiv('geDiagramContainer');
-	this.footerContainer = this.createDiv('geFooterContainer');
-	this.hsplit = this.createDiv('geHsplit');
-	this.vsplit = this.createDiv('geVsplit');
-
-	// Sets static style for containers
-	this.menubarContainer.style.top = '0px';
-	this.menubarContainer.style.left = '0px';
-	this.menubarContainer.style.right = '0px';
-	this.toolbarContainer.style.left = '0px';
-	this.toolbarContainer.style.right = '0px';
-	this.sidebarContainer.style.left = '0px';
-	this.outlineContainer.style.left = '0px';
-	this.diagramContainer.style.right = '0px';
-	this.footerContainer.style.left = '0px';
-	this.footerContainer.style.right = '0px';
-	this.footerContainer.style.bottom = '0px';
-	this.vsplit.style.left = '0px';
-	this.vsplit.style.height = this.splitSize + 'px';
-	this.hsplit.style.width = this.splitSize + 'px';
-};
-
-/**
- * Creates the required containers.
- */
-EditorUi.prototype.createUi = function() {
-	// Creates menubar
-	this.menubar = this.menus.createMenubar(this.createDiv('geMenubar'));
-	this.menubarContainer.appendChild(this.menubar.container);
-
-	// Creates toolbar
-	this.toolbar = this.createToolbar(this.createDiv('geToolbar'));
-	this.toolbarContainer.appendChild(this.toolbar.container);
-
-	// Creates the sidebar
-	this.sidebar = this.createSidebar(this.sidebarContainer);
-
-	// Creates the footer
-	this.footerContainer.appendChild(this.createFooter());
-
-	// Adds status bar in menubar
-	this.statusContainer = this.createStatusContainer();
-
-	// Connects the status bar to the editor status
-	this.editor.addListener('statusChanged', mxUtils.bind(this, function() {
-		this.setStatusText(this.editor.getStatus());
-	}));
-
-	this.setStatusText(this.editor.getStatus());
-	this.menubar.container.appendChild(this.statusContainer);
-
-	// Inserts into DOM
-	this.container.appendChild(this.menubarContainer);
-	this.container.appendChild(this.toolbarContainer);
-	this.container.appendChild(this.sidebarContainer);
-	this.container.appendChild(this.outlineContainer);
-	this.container.appendChild(this.diagramContainer);
-	this.container.appendChild(this.footerContainer);
-	this.container.appendChild(this.hsplit);
-	this.container.appendChild(this.vsplit);
-
-	// HSplit
-	this.addSplitHandler(this.hsplit, true, 0, mxUtils.bind(this, function(
-		value) {
-		this.hsplitPosition = value;
-		this.refresh();
-		this.editor.graph.sizeDidChange();
-		this.editor.outline.update(false);
-		this.editor.outline.outline.sizeDidChange();
-	}));
-
-	// VSplit
-	this.addSplitHandler(this.vsplit, false, this.footerHeight, mxUtils.bind(
-		this,
-		function(value) {
-			this.vsplitPosition = value;
-			this.refresh();
-			this.editor.outline.update(false);
-			this.editor.outline.outline.sizeDidChange();
-		}));
-};
-
-/**
- * Creates a new toolbar for the given container.
- */
-EditorUi.prototype.createStatusContainer = function() {
-	var container = document.createElement('a');
-	container.className = 'geItem geStatus';
-
-	return container;
-};
-
-/**
- * Creates a new toolbar for the given container.
- */
-EditorUi.prototype.createStatusContainer = function() {
-	var container = document.createElement('a');
-	container.className = 'geItem geStatus';
-
-	return container;
-};
-
-/**
- * Creates a new toolbar for the given container.
- */
-EditorUi.prototype.setStatusText = function(value) {
-	this.statusContainer.innerHTML = value;
-};
-
-/**
- * Creates a new toolbar for the given container.
- */
-EditorUi.prototype.createToolbar = function(container) {
-	return new Toolbar(this, container);
-};
-
-/**
- * Creates a new sidebar for the given container.
- */
-EditorUi.prototype.createSidebar = function(container) {
-	return new Sidebar(this, container);
-};
-
-/**
- * Creates and returns a new footer.
- */
-EditorUi.prototype.createFooter = function() {
-	return this.createDiv('geFooter');
-};
-
-/**
- * Creates the actual toolbar for the toolbar container.
- */
-EditorUi.prototype.createDiv = function(classname) {
-	var elt = document.createElement('div');
-	elt.className = classname;
-
-	return elt;
-};
-
-/**
- * Creates the custom header.
- */
-EditorUi.prototype.createHeader = function(classname) {
-	var elt = document.createElement(classname);
-	return elt;
-};
-
-/**
- * Creates the custom header.
- */
-EditorUi.prototype.createForm = function(classname) {
-	var elt = document.createElement('form');
-	elt.className = classname;
-
-	return elt;
-};
-
-/**
- * Updates the states of the given undo/redo items.
- */
-EditorUi.prototype.addSplitHandler = function(elt, horizontal, dx, onChange) {
-	var start = null;
-	var initial = null;
-
-	function getValue() {
-		return parseInt(((horizontal) ? elt.style.left : elt.style.bottom));
-	};
-
-	function moveHandler(evt) {
-		if (start != null) {
-			var pt = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
-			onChange(Math.max(0, initial + ((horizontal) ? (pt.x - start.x) : (start.y -
-				pt.y)) - dx));
-			mxEvent.consume(evt);
-		}
-	};
-
-	function dropHandler(evt) {
-		moveHandler(evt);
-		start = null;
-		initial = null;
-	};
-
-	mxEvent.addGestureListeners(elt, function(evt) {
-		start = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
-		initial = getValue();
-		mxEvent.consume(evt);
-	});
-
-	mxEvent.addListener(document, 'mousemove', moveHandler);
-	mxEvent.addListener(document, 'touchmove', moveHandler);
-	mxEvent.addListener(document, 'mouseup', dropHandler);
-	mxEvent.addListener(document, 'touchend', dropHandler);
-};
-
-/**
- * Displays a print dialog.
- */
-EditorUi.prototype.showDialog = function(elt, w, h, modal, closable, onClose) {
-	this.hideDialog();
-	this.dialog = new Dialog(this, elt, w, (mxClient.IS_VML) ? h - 12 : h,
-		modal,
-		closable, onClose);
-};
-
-/**
- * Displays a print dialog.
- */
-EditorUi.prototype.hideDialog = function() {
-	if (this.dialog != null) {
-		this.dialog.close();
-		this.dialog = null;
-		this.editor.graph.container.focus();
-	}
-};
-
-/**
- * Adds the label menu items to the given menu and parent.
- */
-EditorUi.prototype.saveFile = function(forceDialog) {
-	if (!forceDialog && this.editor.filename != null) {
-		this.save(this.editor.getOrCreateFilename());
-	} else {
-		this.showDialog(new SaveDialog(this).container, 300, 100, true, true);
-	}
-};
-
-/**
- * Adds the label menu items to the given menu and parent.
- */
-EditorUi.prototype.publishFile = function(forceDialog) {
-	if (!forceDialog && this.editor.filename != null) {
-		this.publish(this.editor.getOrCreateFilename());
-	} else {
-		//this.showDialog(new SaveDialog(this).container, 300, 100, true, true);
-	}
-};
-
-/**
- * Executes the given layout.
- */
-EditorUi.prototype.executeLayout = function(layout, animate, ignoreChildCount) {
-	var graph = this.editor.graph;
-	var cell = graph.getSelectionCell();
-
-	// Allow global overridding of animation
-	animate = this.animate != null ? this.animate : animate;
-
-	graph.getModel().beginUpdate();
-	try {
-		layout.execute(graph.getDefaultParent(), cell);
-	} catch (e) {
-		throw e;
-	} finally {
-		// Animates the changes in the graph model except
-		// for Camino, where animation is too slow
-		if (animate && navigator.userAgent.indexOf('Camino') < 0) {
-			// New API for animating graph layout results asynchronously
-			var morph = new mxMorphing(graph);
-			morph.addListener(mxEvent.DONE, mxUtils.bind(this, function() {
-				graph.getModel().endUpdate();
-			}));
-
-			morph.startAnimation();
-		} else {
-			graph.getModel().endUpdate();
-		}
-	}
-};
-
-/**
- * Creates the keyboard event handler for the current graph and history.
- */
-EditorUi.prototype.createKeyHandler = function(editor) {
-	var graph = this.editor.graph;
-	var keyHandler = new mxKeyHandler(graph);
-
-	// Routes command-key to control-key on Mac
-	keyHandler.isControlDown = function(evt) {
-		return mxEvent.isControlDown(evt) || (mxClient.IS_MAC && evt.metaKey);
-	};
-
-	// Helper function to move cells with the cursor keys
-	function nudge(keyCode) {
-		if (!graph.isSelectionEmpty()) {
-			var dx = 0;
-			var dy = 0;
-
-			if (keyCode == 37) {
-				dx = -1;
-			} else if (keyCode == 38) {
-				dy = -1;
-			} else if (keyCode == 39) {
-				dx = 1;
-			} else if (keyCode == 40) {
-				dy = 1;
-			}
-
-			graph.moveCells(graph.getSelectionCells(), dx, dy);
-			graph.scrollCellToVisible(graph.getSelectionCell());
-		}
-	};
-
-	// Binds keystrokes to actions
-	var bindAction = mxUtils.bind(this, function(code, control, key, shift) {
-		var action = this.actions.get(key);
-
-		if (action != null) {
-			var f = function() {
-				if (action.enabled) {
-					action.funct();
-				}
-			};
-
-			if (control) {
-				if (shift) {
-					keyHandler.bindControlShiftKey(code, f);
-				} else {
-					keyHandler.bindControlKey(code, f);
-				}
-			} else {
-				if (shift) {
-					keyHandler.bindShiftKey(code, f);
-				} else {
-					keyHandler.bindKey(code, f);
-				}
-			}
-		}
-	});
-
-	var ui = this;
-	var keyHandleEscape = keyHandler.escape;
-	keyHandler.escape = function(evt) {
-		ui.hideDialog();
-		keyHandleEscape.apply(this, arguments);
-	};
-
-	// Ignores enter keystroke. Remove this line if you want the
-	// enter keystroke to stop editing.
-	keyHandler.enter = function() {};
-	keyHandler.bindKey(8, function() {
-		graph.foldCells(true);
-	}); // Backspace
-	keyHandler.bindKey(13, function() {
-		graph.foldCells(false);
-	}); // Enter
-	keyHandler.bindKey(33, function() {
-		graph.exitGroup();
-	}); // Page Up
-	keyHandler.bindKey(34, function() {
-		graph.enterGroup();
-	}); // Page Down
-	keyHandler.bindKey(36, function() {
-		graph.home();
-	}); // Home
-	keyHandler.bindKey(35, function() {
-		graph.refresh();
-	}); // End
-	keyHandler.bindKey(37, function() {
-		nudge(37);
-	}); // Left arrow
-	keyHandler.bindKey(38, function() {
-		nudge(38);
-	}); // Up arrow
-	keyHandler.bindKey(39, function() {
-		nudge(39);
-	}); // Right arrow
-	keyHandler.bindKey(40, function() {
-		nudge(40);
-	}); // Down arrow
-	keyHandler.bindKey(113, function() {
-		graph.startEditingAtCell();
-	});
-	bindAction(46, false, 'delete'); // Delete
-	bindAction(82, true, 'tilt'); // Ctrl+R
-	bindAction(83, true, 'save'); // Ctrl+S
-	bindAction(83, true, 'saveAs', true); // Ctrl+Shift+S
-	bindAction(107, false, 'zoomIn'); // Add
-	bindAction(109, false, 'zoomOut'); // Subtract
-	bindAction(65, true, 'selectAll'); // Ctrl+A
-	bindAction(86, true, 'selectVertices', true); // Ctrl+Shift+V
-	bindAction(69, true, 'selectEdges', true); // Ctrl+Shift+E
-	bindAction(69, true, 'export'); // Ctrl+Shift+E
-	bindAction(66, true, 'toBack'); // Ctrl+B
-	bindAction(70, true, 'toFront'); // Ctrl+F
-	bindAction(68, true, 'duplicate'); // Ctrl+D
-	bindAction(90, true, 'undo'); // Ctrl+Z
-	bindAction(89, true, 'redo'); // Ctrl+Y
-	bindAction(88, true, 'cut'); // Ctrl+X
-	bindAction(67, true, 'copy'); // Ctrl+C
-	bindAction(81, true, 'connect'); // Ctrl+Q
-	bindAction(86, true, 'paste'); // Ctrl+V
-	bindAction(71, true, 'group'); // Ctrl+G
-	bindAction(71, true, 'grid', true); // Ctrl+Shift+G
-	bindAction(85, true, 'ungroup'); // Ctrl+U
-	bindAction(112, false, 'about'); // F1
-	bindAction(80, true, 'publish', true); // Ctrl+Shift+P
-
-	return keyHandler;
-};
-
-/**
- * Giuseppe Careri
- * Creates a new toolbar for the given container.
- */
-EditorUi.prototype.createMultiplicities = function(graph, cells, source,
-	target) {
-	for (var i = 0; i < cells.length; i++) {
-
-		graph.push(new mxMultiplicity(true, cells[i], null, null, source[i][0],
-			source[i][1], null, mxResources.get(cells[i]) + mxResources.get(
-				'musthave') + source[i][0] + mxResources.get('outgoingedge'), null));
-		graph.push(new mxMultiplicity(false, cells[i], null, null, target[i][0],
-			target[i][1], null, mxResources.get(cells[i]) + mxResources.get(
-				'musthave') + target[i][0] + mxResources.get('incomingedge'), null));
-	};
-};
+var _0xc44a=["\x65\x64\x69\x74\x6F\x72","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x45\x64\x69\x74\x6F\x72","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x67\x72\x61\x70\x68","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x73\x74\x79\x6C\x65","\x68\x69\x64\x64\x65\x6E","\x73\x72\x63","\x73\x75\x62\x6D\x65\x6E\x75\x49\x6D\x61\x67\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x65\x6E\x75\x73","\x63\x72\x65\x61\x74\x65\x44\x69\x76\x73","\x72\x65\x66\x72\x65\x73\x68","\x63\x72\x65\x61\x74\x65\x55\x69","\x65\x76\x65\x6E\x74","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x41\x6C\x6C\x6F\x77\x65\x64","\x69\x73\x45\x64\x69\x74\x69\x6E\x67","\x62\x69\x6E\x64","\x62\x6F\x64\x79","\x6F\x6E\x73\x65\x6C\x65\x63\x74\x73\x74\x61\x72\x74","\x6D\x65\x6E\x75\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6F\x6E\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x74\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x64\x69\x61\x67\x72\x61\x6D\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x69\x64\x65\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x66\x6F\x6F\x74\x65\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x49\x53\x5F\x49\x45","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x63\x6F\x6E\x74\x65\x78\x74\x6D\x65\x6E\x75","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x6F\x6E\x63\x6F\x6E\x74\x65\x78\x74\x6D\x65\x6E\x75","\x69\x6E\x69\x74","\x74\x61\x62\x69\x6E\x64\x65\x78","\x30","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x75\x72\x73\x6F\x72","\x64\x65\x66\x61\x75\x6C\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x67\x72\x69\x64\x49\x6D\x61\x67\x65","\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x2D\x31\x70\x78\x20\x2D\x31\x70\x78","\x66\x6F\x63\x75\x73","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x4D\x4F\x55\x53\x45\x5F\x44\x4F\x57\x4E","\x61\x70\x70\x6C\x79","\x6D\x75\x6C\x74\x69\x70\x6C\x69\x63\x69\x74\x69\x65\x73","\x73\x74\x61\x72\x74","\x66\x69\x6E\x61\x6C\x6C\x79","\x65\x6E\x64","\x6E","\x63\x72\x65\x61\x74\x65\x4D\x75\x6C\x74\x69\x70\x6C\x69\x63\x69\x74\x69\x65\x73","\x61\x6E\x73\x77\x65\x72","\x68\x61\x6E\x67\x75\x70","\x64\x69\x61\x6C","\x65\x78\x74\x5F\x64\x69\x61\x6C","\x71\x75\x65\x75\x65","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x73\x65\x74","\x6D\x61\x74\x68","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x70\x6C\x61\x79\x62\x61\x63\x6B","\x6D\x65\x6E\x75","\x73\x61\x79\x64\x69\x67\x69\x74\x73","\x73\x61\x79\x6E\x75\x6D\x62\x65\x72","\x73\x61\x79\x70\x68\x6F\x6E\x65\x74\x69\x63","\x74\x74\x73","\x69\x73\x70\x65\x65\x63\x68\x74\x74\x73","\x67\x65\x74\x64\x69\x67\x69\x74\x73","\x67\x65\x74\x73\x65\x63\x72\x65\x74\x64\x69\x67\x69\x74\x73","\x72\x65\x63\x6F\x72\x64","\x64\x61\x74\x61\x62\x61\x73\x65","\x69\x73\x70\x65\x65\x63\x68\x61\x73\x72","\x73\x65\x6E\x64\x53\x4D\x53","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x67\x6F\x74\x6F\x63","\x67\x6F\x74\x6F\x69\x66","\x67\x6F\x74\x6F\x69\x66\x74\x69\x6D\x65","\x67\x6F\x74\x6F\x69\x66\x6D\x75\x6C\x74\x69\x74\x69\x6D\x65","\x76\x73\x77\x69\x74\x63\x68","\x71\x75\x65\x75\x65\x6C\x6F\x67","\x67\x6F\x61\x6C","\x6E\x6F\x6F\x70","\x73\x79\x73\x74\x65\x6D","\x61\x67\x69","\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74","\x63\x75\x73\x74\x6F\x6D\x5F\x61\x70\x70","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x63\x65\x6C\x6C","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x69\x73\x45\x64\x67\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x74\x61\x67\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x73\x6F\x75\x72\x63\x65","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x74\x61\x72\x74\x45\x64\x69\x74\x69\x6E\x67\x41\x74\x43\x65\x6C\x6C","\x69\x73\x56\x65\x72\x74\x65\x78","\x73\x68\x6F\x77\x44\x69\x61\x6C\x6F\x67","\x63\x6F\x6E\x73\x75\x6D\x65","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x66\x61\x63\x74\x6F\x72\x79\x4D\x65\x74\x68\x6F\x64","\x63\x72\x65\x61\x74\x65\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75","\x6F\x75\x74\x6C\x69\x6E\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6F\x75\x74\x6C\x69\x6E\x65","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x67\x65\x73\x74\x75\x72\x65\x63\x68\x61\x6E\x67\x65","\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x73\x63\x61\x6C\x65\x28","\x73\x63\x61\x6C\x65","\x67\x65\x74\x44\x72\x61\x77\x50\x61\x6E\x65","\x76\x69\x65\x77","\x76\x69\x73\x69\x62\x69\x6C\x69\x74\x79","\x67\x65\x74\x4F\x76\x65\x72\x6C\x61\x79\x50\x61\x6E\x65","\x67\x65\x73\x74\x75\x72\x65\x65\x6E\x64","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x7A\x6F\x6F\x6D\x54\x6F\x43\x65\x6E\x74\x65\x72","\x7A\x6F\x6F\x6D","\x76\x69\x73\x69\x62\x6C\x65","\x63\x72\x65\x61\x74\x65\x4B\x65\x79\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x4B\x65\x79\x48\x61\x6E\x64\x6C\x65\x72","\x72\x65\x73\x69\x7A\x65","\x73\x69\x7A\x65\x44\x69\x64\x43\x68\x61\x6E\x67\x65","\x75\x70\x64\x61\x74\x65","\x6F\x70\x65\x6E","\x73\x70\x6C\x69\x74\x53\x69\x7A\x65","\x6D\x65\x6E\x75\x62\x61\x72\x48\x65\x69\x67\x68\x74","\x74\x6F\x6F\x6C\x62\x61\x72\x48\x65\x69\x67\x68\x74","\x66\x6F\x6F\x74\x65\x72\x48\x65\x69\x67\x68\x74","\x68\x73\x70\x6C\x69\x74\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x76\x73\x70\x6C\x69\x74\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x55\x6E\x64\x6F\x4C\x69\x73\x74\x65\x6E\x65\x72","\x61\x64\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x73\x74\x65","\x67\x65\x74","\x69\x73\x45\x6D\x70\x74\x79","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x75\x74","\x63\x6F\x70\x79","\x6F\x70\x65\x6E\x65\x72","\x6F\x70\x65\x6E\x46\x69\x6C\x65","\x70\x61\x72\x73\x65\x58\x6D\x6C","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x73\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x6D\x6F\x64\x69\x66\x69\x65\x64","\x63\x6C\x65\x61\x72","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x69\x6E\x76\x61\x6C\x69\x64\x4F\x72\x4D\x69\x73\x73\x69\x6E\x67\x46\x69\x6C\x65","\x3A\x20","\x6D\x65\x73\x73\x61\x67\x65","\x61\x6C\x65\x72\x74","\x73\x65\x74\x43\x6F\x6E\x73\x75\x6D\x65\x72","\x6F\x70\x65\x6E\x53\x74\x72\x69\x6E\x67","\x64\x61\x74\x61","\x6E\x65\x77","\x67\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x67\x65\x74\x50\x72\x65\x74\x74\x79\x58\x6D\x6C","\x67\x65\x74\x49\x74\x65\x6D","\x72\x65\x70\x6C\x61\x63\x65","\x63\x6F\x6E\x66\x69\x72\x6D","\x73\x65\x74\x49\x74\x65\x6D","\x73\x61\x76\x65\x64","\x20","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x6C\x65\x6E\x67\x74\x68","\x6C\x6F\x67","\x50\x4F\x53\x54","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x65\x61\x72\x65\x72\x20","\x74\x6F\x6B\x65\x6E","\x6F\x6E\x6C\x6F\x61\x64","\x72\x65\x61\x64\x79\x53\x74\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x50\x72\x6F\x6A\x65\x63\x74\x20","\x6E\x61\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x70\x61\x72\x73\x65","\x20\x69\x73\x20\x6F\x70\x65\x6E\x69\x6E\x67\x20\x69\x6E\x20\x6E\x65\x77\x20\x77\x69\x6E\x64\x6F\x77\x21","\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x76\x69\x65\x77\x2F","\x69\x64","\x5F\x62\x6C\x61\x6E\x6B","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x65\x72\x72\x6F\x72\x73","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74","\x20\x28","\x73\x74\x61\x74\x75\x73\x54\x65\x78\x74","\x6F\x6E\x65\x72\x72\x6F\x72","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3D\x70\x72\x6F\x6A\x65\x63\x74\x5F\x6E\x65\x77\x26\x6E\x61\x6D\x65\x3D","\x73\x65\x6E\x64","\x64\x72\x61\x77\x69\x6E\x67\x54\x6F\x6F\x4C\x61\x72\x67\x65","\x70\x6F\x70\x75\x70","\x73\x61\x76\x65","\x50\x55\x54","\x55\x70\x64\x61\x74\x65\x64\x20\x61\x74\x20","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74","\x70\x72\x65\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E\x3D","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x66\x69\x6C\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x45\x72\x72\x6F\x72\x20\x75\x70\x64\x61\x74\x69\x6E\x67\x20\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3A\x20","\x45\x72\x72\x6F\x72\x20\x75\x70\x64\x61\x74\x69\x6E\x67\x20\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3D","\x73\x61\x76\x65\x41\x73","\x45\x72\x72\x6F\x72\x20\x63\x6C\x6F\x6E\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x45\x72\x72\x6F\x72\x20\x63\x6C\x6F\x6E\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3D\x70\x72\x6F\x6A\x65\x63\x74\x5F\x63\x6C\x6F\x6E\x65\x64\x26\x6E\x61\x6D\x65\x3D","\x26\x70\x72\x65\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E\x3D","\x26\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E\x3D","\x76\x61\x6C\x69\x64\x61\x74\x65","\x67\x65\x74\x52\x6F\x6F\x74","\x6D\x6F\x64\x65\x6C","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x6F\x75\x6E\x74","\x67\x65\x74\x43\x68\x69\x6C\x64\x41\x74","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x3C\x62\x72\x3E","\x73\x65\x74\x43\x65\x6C\x6C\x57\x61\x72\x6E\x69\x6E\x67","","\x76\x61\x6C\x69\x64\x61\x74\x65\x42\x6C\x6F\x63\x6B","\x4F\x6E\x6C\x79\x20\x6F\x6E\x65\x20\x53\x74\x61\x72\x74\x20\x62\x6C\x6F\x63\x6B\x20\x69\x73\x20\x61\x6C\x6C\x6F\x77\x65\x64","\x0A","\x4F\x6E\x6C\x79\x20\x6F\x6E\x65\x20\x46\x69\x6E\x61\x6C\x6C\x79\x20\x62\x6C\x6F\x63\x6B\x20\x69\x73\x20\x61\x6C\x6C\x6F\x77\x65\x64","\x66\x69\x6C\x65\x5F\x69\x64","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x6E\x6F\x41\x75\x64\x69\x6F\x53\x65\x6C\x65\x63\x74\x65\x64","\x64\x69\x67\x69\x74","\x77\x72\x6F\x6E\x67\x4D\x61\x78\x44\x69\x67\x69\x74","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64","\x6E\x6F\x56\x61\x72\x69\x61\x62\x6C\x65\x53\x65\x6C\x65\x63\x74\x65\x64","\x6D\x69\x6E\x64\x69\x67\x69\x74","\x77\x72\x6F\x6E\x67\x4D\x69\x6E\x44\x69\x67\x69\x74","\x6D\x61\x78\x64\x69\x67\x69\x74","\x68\x69\x64\x64\x65\x6E\x64\x69\x67\x69\x74\x73\x6E\x75\x6D","\x77\x72\x6F\x6E\x67\x48\x69\x64\x64\x65\x6E\x44\x69\x67\x69\x74\x73\x6E\x75\x6D","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6F\x64\x62\x63\x5F\x69\x64","\x6E\x6F\x44\x61\x74\x61\x62\x61\x73\x65\x53\x65\x6C\x65\x63\x74\x65\x64","\x74\x72\x75\x6E\x6B\x5F\x6E\x61\x6D\x65","\x2D\x31","\x6E\x6F\x54\x72\x75\x6E\x6B\x53\x65\x6C\x65\x63\x74\x65\x64","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x6E\x6F\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x53\x65\x6C\x65\x63\x74\x65\x64","\x63\x6F\x6D\x6D\x61\x6E\x64","\x6E\x6F\x43\x6F\x6D\x6D\x61\x6E\x64\x53\x65\x6C\x65\x63\x74\x65\x64","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x6E\x6F\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x53\x65\x6C\x65\x63\x74\x65\x64","\x64\x69\x67\x69\x74\x73","\x6E\x6F\x44\x69\x67\x69\x74\x73\x53\x65\x6C\x65\x63\x74\x65\x64","\x6E\x75\x6D\x62\x65\x72","\x6E\x6F\x4E\x75\x6D\x62\x65\x72\x53\x65\x6C\x65\x63\x74\x65\x64","\x74\x65\x78\x74","\x6E\x6F\x54\x65\x78\x74\x53\x65\x6C\x65\x63\x74\x65\x64","\x66\x69\x6C\x65","\x6E\x6F\x46\x69\x6C\x65\x53\x65\x6C\x65\x63\x74\x65\x64","\x67\x6F\x61\x6C\x6E\x61\x6D\x65","\x6E\x6F\x47\x6F\x61\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x70\x68\x6F\x6E\x65","\x6E\x6F\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x53\x65\x6C\x65\x63\x74\x65\x64","\x73\x69\x70\x5F\x69\x64","\x71\x75\x65\x75\x65\x5F\x69\x64","\x6E\x6F\x51\x75\x65\x75\x65\x53\x65\x6C\x65\x63\x74\x65\x64","\x6C\x69\x73\x74\x5F\x69\x64","\x6E\x6F\x4C\x69\x73\x74\x53\x65\x6C\x65\x63\x74\x65\x64","\x69\x6E\x74\x65\x72\x76\x61\x6C\x5F\x69\x64","\x6E\x6F\x49\x6E\x74\x65\x72\x76\x61\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x6D\x61\x69\x6C\x62\x6F\x78","\x6E\x6F\x42\x6F\x78\x4E\x75\x6D\x62\x65\x72\x53\x65\x6C\x65\x63\x74\x65\x64","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x69\x64","\x6E\x6F\x50\x72\x6F\x6A\x65\x63\x74\x53\x65\x6C\x65\x63\x74\x65\x64","\x61\x63\x63\x6F\x75\x6E\x74\x5F\x69\x64","\x6E\x6F\x41\x63\x63\x6F\x75\x6E\x74\x53\x65\x6C\x65\x63\x74\x65\x64","\x74\x6F","\x6E\x6F\x52\x65\x63\x69\x70\x69\x65\x6E\x74\x53\x65\x6C\x65\x63\x74\x65\x64","\x73\x6D\x73\x5F\x74\x65\x78\x74","\x6B\x65\x79","\x6E\x6F\x4B\x65\x79\x53\x65\x6C\x65\x63\x74\x65\x64","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x67\x65\x74\x49\x64","\x67\x65\x74\x43\x65\x6C\x6C","\x67\x65\x74\x56\x61\x6C\x75\x65","\x74\x65\x73\x74","\x6E\x75\x6D\x62\x65\x72\x4F\x72\x49\x6E\x76\x61\x6C\x69\x64\x4F\x72\x54\x69\x6D\x65\x6F\x75\x74","\x2C","\x73\x70\x6C\x69\x74","\x6E\x75\x6D\x62\x65\x72\x4F\x72\x41\x6C\x6C","\x66\x6F\x72\x45\x61\x63\x68","\x6E\x75\x6D\x62\x65\x72\x4F\x72\x49\x6E\x76\x61\x6C\x69\x64\x4F\x72\x44\x65\x66\x61\x75\x6C\x74","\x74\x72\x75\x65\x4F\x72\x46\x61\x6C\x73\x65","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x6C\x6C\x61\x70\x73\x65\x64","\x63\x6F\x6E\x74\x61\x69\x6E\x73\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72\x73\x52\x65\x73\x6F\x75\x72\x63\x65","\x67\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x67\x65\x74\x45\x64\x67\x65\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72","\x67\x65\x74\x43\x65\x6C\x6C\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72","\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x65\x6C\x6C","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x63\x68\x69\x6C\x64\x72\x65\x6E","\x70\x75\x62\x6C\x69\x73\x68","\x50\x75\x62\x6C\x69\x73\x68\x65\x64\x20\x61\x74\x20","\x45\x72\x72\x6F\x72\x20\x70\x75\x62\x6C\x69\x73\x68\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x45\x72\x72\x6F\x72\x20\x70\x75\x62\x6C\x69\x73\x68\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74","\x45\x72\x72\x6F\x72\x20\x70\x75\x62\x6C\x69\x73\x68\x69\x6E\x67\x20\x66\x69\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64\x20\x61\x74\x20","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x3A\x20","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x6C\x65","\x6E\x61\x6D\x65\x3D","\x26\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3D","\x67\x65\x74\x55\x72\x6C","\x70\x61\x74\x68\x6E\x61\x6D\x65","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x3F","\x26","\x3D","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x61\x6E\x55\x6E\x64\x6F","\x63\x61\x6E\x52\x65\x64\x6F","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x64\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x74\x6F\x46\x72\x6F\x6E\x74","\x74\x6F\x42\x61\x63\x6B","\x64\x61\x73\x68\x65\x64","\x72\x6F\x75\x6E\x64\x65\x64","\x73\x68\x61\x64\x6F\x77","\x74\x69\x6C\x74","\x61\x75\x74\x6F\x73\x69\x7A\x65","\x63\x75\x72\x76\x65\x64","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x77\x6F\x72\x64\x57\x72\x61\x70","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x67\x72\x6F\x75\x70","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x75\x6E\x67\x72\x6F\x75\x70","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x47\x72\x6F\x75\x70","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x61\x6C\x69\x67\x6E\x6D\x65\x6E\x74","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x66\x6F\x72\x6D\x61\x74","\x61\x72\x72\x61\x6E\x67\x65","\x6C\x69\x6E\x65\x77\x69\x64\x74\x68","\x73\x70\x61\x63\x69\x6E\x67","\x6C\x69\x6E\x65","\x6C\x69\x6E\x65\x65\x6E\x64","\x6C\x69\x6E\x65\x73\x74\x61\x72\x74","\x73\x65\x74\x41\x73\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x61\x6C\x69\x67\x6E","\x67\x65\x74\x53\x74\x61\x74\x65","\x69\x73\x4C\x6F\x6F\x70","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x63\x75\x72\x72\x65\x6E\x74\x52\x6F\x6F\x74","\x6E\x61\x76\x69\x67\x61\x74\x69\x6F\x6E","\x68\x6F\x6D\x65","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x65\x78\x70\x61\x6E\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x65\x64\x69\x74\x4C\x69\x6E\x6B","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x6F\x70\x65\x6E\x4C\x69\x6E\x6B","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x63\x6C\x69\x65\x6E\x74\x48\x65\x69\x67\x68\x74","\x6D\x69\x6E","\x6D\x61\x78","\x68\x65\x69\x67\x68\x74","\x70\x78","\x74\x6F\x70","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x77\x69\x64\x74\x68","\x62\x6F\x74\x74\x6F\x6D","\x6C\x65\x66\x74","\x64\x69\x73\x70\x6C\x61\x79","\x6E\x6F\x6E\x65","\x68\x73\x70\x6C\x69\x74","\x76\x73\x70\x6C\x69\x74","\x67\x65\x4D\x65\x6E\x75\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x63\x72\x65\x61\x74\x65\x44\x69\x76","\x67\x65\x54\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x53\x69\x64\x65\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x4F\x75\x74\x6C\x69\x6E\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x44\x69\x61\x67\x72\x61\x6D\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x46\x6F\x6F\x74\x65\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x48\x73\x70\x6C\x69\x74","\x67\x65\x56\x73\x70\x6C\x69\x74","\x30\x70\x78","\x72\x69\x67\x68\x74","\x6D\x65\x6E\x75\x62\x61\x72","\x67\x65\x4D\x65\x6E\x75\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x4D\x65\x6E\x75\x62\x61\x72","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x74\x6F\x6F\x6C\x62\x61\x72","\x67\x65\x54\x6F\x6F\x6C\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x54\x6F\x6F\x6C\x62\x61\x72","\x73\x69\x64\x65\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x53\x69\x64\x65\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x46\x6F\x6F\x74\x65\x72","\x73\x74\x61\x74\x75\x73\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x74\x61\x74\x75\x73\x43\x68\x61\x6E\x67\x65\x64","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x65\x74\x53\x74\x61\x74\x75\x73\x54\x65\x78\x74","\x61\x64\x64\x53\x70\x6C\x69\x74\x48\x61\x6E\x64\x6C\x65\x72","\x61","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x49\x74\x65\x6D\x20\x67\x65\x53\x74\x61\x74\x75\x73","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x67\x65\x46\x6F\x6F\x74\x65\x72","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x48\x65\x61\x64\x65\x72","\x63\x72\x65\x61\x74\x65\x46\x6F\x72\x6D","\x66\x6F\x72\x6D","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x78","\x79","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x74\x6F\x75\x63\x68\x6D\x6F\x76\x65","\x6D\x6F\x75\x73\x65\x75\x70","\x74\x6F\x75\x63\x68\x65\x6E\x64","\x68\x69\x64\x65\x44\x69\x61\x6C\x6F\x67","\x64\x69\x61\x6C\x6F\x67","\x49\x53\x5F\x56\x4D\x4C","\x63\x6C\x6F\x73\x65","\x73\x61\x76\x65\x46\x69\x6C\x65","\x67\x65\x74\x4F\x72\x43\x72\x65\x61\x74\x65\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x70\x75\x62\x6C\x69\x73\x68\x46\x69\x6C\x65","\x65\x78\x65\x63\x75\x74\x65\x4C\x61\x79\x6F\x75\x74","\x61\x6E\x69\x6D\x61\x74\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x65\x78\x65\x63\x75\x74\x65","\x43\x61\x6D\x69\x6E\x6F","\x75\x73\x65\x72\x41\x67\x65\x6E\x74","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x72\x74\x41\x6E\x69\x6D\x61\x74\x69\x6F\x6E","\x69\x73\x43\x6F\x6E\x74\x72\x6F\x6C\x44\x6F\x77\x6E","\x49\x53\x5F\x4D\x41\x43","\x6D\x65\x74\x61\x4B\x65\x79","\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x65\x6E\x61\x62\x6C\x65\x64","\x66\x75\x6E\x63\x74","\x62\x69\x6E\x64\x43\x6F\x6E\x74\x72\x6F\x6C\x53\x68\x69\x66\x74\x4B\x65\x79","\x62\x69\x6E\x64\x43\x6F\x6E\x74\x72\x6F\x6C\x4B\x65\x79","\x62\x69\x6E\x64\x53\x68\x69\x66\x74\x4B\x65\x79","\x62\x69\x6E\x64\x4B\x65\x79","\x65\x73\x63\x61\x70\x65","\x65\x6E\x74\x65\x72","\x66\x6F\x6C\x64\x43\x65\x6C\x6C\x73","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x65\x78\x70\x6F\x72\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x67\x72\x69\x64","\x61\x62\x6F\x75\x74","\x6D\x75\x73\x74\x68\x61\x76\x65","\x6F\x75\x74\x67\x6F\x69\x6E\x67\x65\x64\x67\x65","\x70\x75\x73\x68","\x69\x6E\x63\x6F\x6D\x69\x6E\x67\x65\x64\x67\x65"];EditorUi= function(_0x1365x1,_0x1365x2){this[_0xc44a[0]]= _0x1365x1||  new Editor();this[_0xc44a[1]]= _0x1365x2|| document[_0xc44a[3]](_0xc44a[2]);var _0x1365x3=_0x1365x1[_0xc44a[4]];var _0x1365x4=this;this[_0xc44a[1]][_0xc44a[6]][_0xc44a[5]]= _0xc44a[7]; new Image()[_0xc44a[8]]= mxPopupMenu[_0xc44a[10]][_0xc44a[9]];if(mxConnectionHandler[_0xc44a[10]][_0xc44a[11]]!= null){ new Image()[_0xc44a[8]]= mxConnectionHandler[_0xc44a[10]][_0xc44a[11]][_0xc44a[8]]};this[_0xc44a[12]]=  new Actions(this);this[_0xc44a[13]]=  new Menus(this);this[_0xc44a[14]]();this[_0xc44a[15]]();this[_0xc44a[16]]();var _0x1365x5=mxUtils[_0xc44a[20]](this,function(_0x1365x6){if(_0x1365x6== null){_0x1365x6= window[_0xc44a[17]]};if(this[_0xc44a[18]](_0x1365x6)){return true};return _0x1365x3[_0xc44a[19]]()});if(this[_0xc44a[1]]== document[_0xc44a[21]]){this[_0xc44a[23]][_0xc44a[22]]= _0x1365x5;this[_0xc44a[23]][_0xc44a[24]]= _0x1365x5;this[_0xc44a[25]][_0xc44a[22]]= _0x1365x5;this[_0xc44a[25]][_0xc44a[24]]= _0x1365x5;this[_0xc44a[26]][_0xc44a[22]]= _0x1365x5;this[_0xc44a[26]][_0xc44a[24]]= _0x1365x5;this[_0xc44a[27]][_0xc44a[22]]= _0x1365x5;this[_0xc44a[27]][_0xc44a[24]]= _0x1365x5;this[_0xc44a[28]][_0xc44a[22]]= _0x1365x5;this[_0xc44a[28]][_0xc44a[24]]= _0x1365x5};if(mxClient[_0xc44a[29]]&& ( typeof (document[_0xc44a[30]])=== _0xc44a[31]|| document[_0xc44a[30]]< 9)){mxEvent[_0xc44a[33]](this[_0xc44a[26]],_0xc44a[32],_0x1365x5);mxEvent[_0xc44a[33]](this[_0xc44a[27]],_0xc44a[32],_0x1365x5)}else {this[_0xc44a[26]][_0xc44a[34]]= _0x1365x5;this[_0xc44a[27]][_0xc44a[34]]= _0x1365x5};_0x1365x3[_0xc44a[35]](this[_0xc44a[26]]);_0x1365x3[_0xc44a[15]]();_0x1365x3[_0xc44a[1]][_0xc44a[38]](_0xc44a[36],_0xc44a[37]);_0x1365x3[_0xc44a[1]][_0xc44a[6]][_0xc44a[39]]= _0xc44a[40];_0x1365x3[_0xc44a[1]][_0xc44a[6]][_0xc44a[41]]= _0xc44a[42]+ _0x1365x1[_0xc44a[43]]+ _0xc44a[44];_0x1365x3[_0xc44a[1]][_0xc44a[6]][_0xc44a[45]]= _0xc44a[46];_0x1365x3[_0xc44a[1]][_0xc44a[47]]();var _0x1365x7=_0x1365x3[_0xc44a[48]];_0x1365x3[_0xc44a[48]]= function(_0x1365x8,_0x1365x9,_0x1365xa){if(_0x1365x8== mxEvent[_0xc44a[49]]){this[_0xc44a[1]][_0xc44a[47]]()};_0x1365x7[_0xc44a[50]](this,arguments)};this[_0xc44a[56]](_0x1365x3[_0xc44a[51]],[_0xc44a[52],_0xc44a[53],_0xc44a[54]],[[1,1],[1,1],[0,0]],[[0,0],[0,0],[1,_0xc44a[55]]]);this[_0xc44a[56]](_0x1365x3[_0xc44a[51]],[_0xc44a[57],_0xc44a[58],_0xc44a[59],_0xc44a[60],_0xc44a[61],_0xc44a[62],_0xc44a[63]],[[1,1],[0,0],[0,1],[0,1],[0,1],[1,1],[0,1]],[[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]]]);this[_0xc44a[56]](_0x1365x3[_0xc44a[51]],[_0xc44a[64],_0xc44a[65]],[[1,1],[1,1]],[[1,_0xc44a[55]],[1,_0xc44a[55]]]);this[_0xc44a[56]](_0x1365x3[_0xc44a[51]],[_0xc44a[66],_0xc44a[67],_0xc44a[68],_0xc44a[69],_0xc44a[70],_0xc44a[71],_0xc44a[72],_0xc44a[73],_0xc44a[74],_0xc44a[75]],[[1,_0xc44a[55]],[1,1],[1,_0xc44a[55]],[1,1],[1,1],[1,1],[1,1],[1,1],[1,_0xc44a[55]],[1,_0xc44a[55]]],[[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]]]);this[_0xc44a[56]](_0x1365x3[_0xc44a[51]],[_0xc44a[76]],[[1,1]],[[1,_0xc44a[55]]]);this[_0xc44a[56]](_0x1365x3[_0xc44a[51]],[_0xc44a[77],_0xc44a[78],_0xc44a[79],_0xc44a[80]],[[1,1],[1,1],[1,1],[1,1]],[[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]]]);this[_0xc44a[56]](_0x1365x3[_0xc44a[51]],[_0xc44a[81],_0xc44a[82],_0xc44a[83],_0xc44a[84],_0xc44a[85]],[[0,0],[1,2],[1,2],[1,2],[1,_0xc44a[55]]],[[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]]]);this[_0xc44a[56]](_0x1365x3[_0xc44a[51]],[_0xc44a[86],_0xc44a[87]],[[1,1],[1,1]],[[1,_0xc44a[55]],[1,_0xc44a[55]]]);this[_0xc44a[56]](_0x1365x3[_0xc44a[51]],[_0xc44a[88],_0xc44a[89],_0xc44a[90],_0xc44a[91],_0xc44a[92]],[[1,1],[1,1],[0,1],[0,0],[0,1]],[[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]],[1,_0xc44a[55]]]);_0x1365x3[_0xc44a[93]]= function(_0x1365x6,_0x1365xb){var _0x1365xc=[_0xc44a[66],_0xc44a[82],_0xc44a[83],_0xc44a[68],_0xc44a[74],_0xc44a[75],_0xc44a[85]];var _0x1365xd= new mxEventObject(mxEvent.DOUBLE_CLICK,_0xc44a[17],_0x1365x6,_0xc44a[94],_0x1365xb);this[_0xc44a[95]](_0x1365xd);if(this[_0xc44a[96]]()&& !mxEvent[_0xc44a[97]](_0x1365x6)&& !_0x1365xd[_0xc44a[97]]()){if(this[_0xc44a[99]]()[_0xc44a[98]](_0x1365xb)){if(_0x1365xc[_0xc44a[103]](_0x1365xb[_0xc44a[102]][_0xc44a[101]][_0xc44a[100]])>= 0){this[_0xc44a[104]](_0x1365xb)}}else {if(this[_0xc44a[99]]()[_0xc44a[105]](_0x1365xb)){_0x1365x4[_0xc44a[106]]( new GeneralDialog(_0x1365x4,_0x1365xb)[_0xc44a[1]],320,280,true,true)}};_0x1365xd[_0xc44a[107]]()}};_0x1365x3[_0xc44a[109]][_0xc44a[108]]= true;_0x1365x3[_0xc44a[109]][_0xc44a[110]]= mxUtils[_0xc44a[20]](this,function(_0x1365xe,_0x1365xb,_0x1365x6){this[_0xc44a[13]][_0xc44a[111]](_0x1365xe,_0x1365xb,_0x1365x6)});_0x1365x1[_0xc44a[113]][_0xc44a[35]](this[_0xc44a[112]]);mxEvent[_0xc44a[115]](document,mxUtils[_0xc44a[20]](this,function(_0x1365x6){_0x1365x3[_0xc44a[109]][_0xc44a[114]]()}));if(mxClient[_0xc44a[116]]){mxEvent[_0xc44a[33]](_0x1365x3[_0xc44a[1]],_0xc44a[117],mxUtils[_0xc44a[20]](this,function(_0x1365x6){_0x1365x3[_0xc44a[122]][_0xc44a[121]]()[_0xc44a[38]](_0xc44a[118],_0xc44a[119]+ _0x1365x6[_0xc44a[120]]+ _0xc44a[44]);_0x1365x3[_0xc44a[122]][_0xc44a[124]]()[_0xc44a[6]][_0xc44a[123]]= _0xc44a[7]}));mxEvent[_0xc44a[33]](_0x1365x3[_0xc44a[1]],_0xc44a[125],mxUtils[_0xc44a[20]](this,function(_0x1365x6){_0x1365x3[_0xc44a[122]][_0xc44a[121]]()[_0xc44a[126]](_0xc44a[118]);_0x1365x3[_0xc44a[127]]= true;_0x1365x3[_0xc44a[128]](_0x1365x6[_0xc44a[120]]);_0x1365x3[_0xc44a[122]][_0xc44a[124]]()[_0xc44a[6]][_0xc44a[123]]= _0xc44a[129]}))};var _0x1365xf=this[_0xc44a[130]](_0x1365x1);this[_0xc44a[131]]= function(){return _0x1365xf};mxEvent[_0xc44a[33]](window,_0xc44a[132],mxUtils[_0xc44a[20]](this,function(){this[_0xc44a[15]]();_0x1365x3[_0xc44a[133]]();this[_0xc44a[0]][_0xc44a[113]][_0xc44a[134]](false);this[_0xc44a[0]][_0xc44a[113]][_0xc44a[113]][_0xc44a[133]]()}));this[_0xc44a[35]]();this[_0xc44a[135]]()};EditorUi[_0xc44a[10]][_0xc44a[136]]= (mxClient[_0xc44a[116]])?16:8;EditorUi[_0xc44a[10]][_0xc44a[137]]= 33;EditorUi[_0xc44a[10]][_0xc44a[138]]= 36;EditorUi[_0xc44a[10]][_0xc44a[139]]= 28;EditorUi[_0xc44a[10]][_0xc44a[140]]= 204;EditorUi[_0xc44a[10]][_0xc44a[141]]= 190;EditorUi[_0xc44a[10]][_0xc44a[35]]= function(){this[_0xc44a[142]]();this[_0xc44a[143]]();var _0x1365x10=this[_0xc44a[12]][_0xc44a[145]](_0xc44a[144]);var _0x1365x11=function(){_0x1365x10[_0xc44a[147]](!mxClipboard[_0xc44a[146]]())};var _0x1365x12=mxClipboard[_0xc44a[148]];mxClipboard[_0xc44a[148]]= function(){_0x1365x12[_0xc44a[50]](this,arguments);_0x1365x11()};var _0x1365x13=mxClipboard[_0xc44a[149]];mxClipboard[_0xc44a[149]]= function(){_0x1365x13[_0xc44a[50]](this,arguments);_0x1365x11()}};EditorUi[_0xc44a[10]][_0xc44a[18]]= function(_0x1365x6){return false};EditorUi[_0xc44a[10]][_0xc44a[135]]= function(){try{if(window[_0xc44a[150]]!= null&& window[_0xc44a[150]][_0xc44a[151]]!= null){window[_0xc44a[150]][_0xc44a[151]][_0xc44a[163]](mxUtils[_0xc44a[20]](this,function(_0x1365x14,_0x1365x15){try{var _0x1365x16=mxUtils[_0xc44a[152]](_0x1365x14);this[_0xc44a[0]][_0xc44a[154]](_0x1365x16[_0xc44a[153]]);this[_0xc44a[0]][_0xc44a[155]]= false;this[_0xc44a[0]][_0xc44a[157]][_0xc44a[156]]();if(_0x1365x15!= null){this[_0xc44a[0]][_0xc44a[158]]= _0x1365x15}}catch(e){mxUtils[_0xc44a[162]](mxResources[_0xc44a[145]](_0xc44a[159])+ _0xc44a[160]+ e[_0xc44a[161]])}}))}}catch(e){}};EditorUi[_0xc44a[10]][_0xc44a[164]]= function(_0x1365x14,_0x1365x15,_0x1365x17){try{var _0x1365x16=mxUtils[_0xc44a[152]](_0x1365x14);this[_0xc44a[0]][_0xc44a[154]](_0x1365x16[_0xc44a[153]]);this[_0xc44a[0]][_0xc44a[155]]= false;this[_0xc44a[0]][_0xc44a[157]][_0xc44a[156]]();if(_0x1365x15!= null){this[_0xc44a[0]][_0xc44a[158]]= _0x1365x15};if(_0x1365x17!= null){this[_0xc44a[0]][_0xc44a[165]]= _0x1365x17}}catch(e){mxUtils[_0xc44a[162]](mxResources[_0xc44a[145]](_0xc44a[159])+ _0xc44a[160]+ e[_0xc44a[161]])}};EditorUi[_0xc44a[10]][_0xc44a[166]]= function(_0x1365x18){var _0x1365x1=this[_0xc44a[0]];if(_0x1365x18!= null){var _0x1365x14=mxUtils[_0xc44a[168]](this[_0xc44a[0]][_0xc44a[167]]());try{if(useLocalStorage){if(localStorage[_0xc44a[169]](_0x1365x18)!= null&& !mxUtils[_0xc44a[171]](mxResources[_0xc44a[145]](_0xc44a[170],[_0x1365x18]))){return};localStorage[_0xc44a[172]](_0x1365x18,_0x1365x14);this[_0xc44a[0]][_0xc44a[175]](mxResources[_0xc44a[145]](_0xc44a[173])+ _0xc44a[174]+  new Date())}else {console[_0xc44a[177]](_0x1365x14[_0xc44a[176]]);console[_0xc44a[177]](MAX_REQUEST_SIZE);if(_0x1365x14[_0xc44a[176]]< MAX_REQUEST_SIZE){_0x1365x14= encodeURIComponent(_0x1365x14);_0x1365x18= encodeURIComponent(_0x1365x18);var _0x1365x19= new XMLHttpRequest();_0x1365x19[_0xc44a[135]](_0xc44a[178],SAVE_URL,true);_0x1365x19[_0xc44a[181]](_0xc44a[179],_0xc44a[180]);_0x1365x19[_0xc44a[181]](_0xc44a[182],_0xc44a[183]+ _0x1365x1[_0xc44a[165]][_0xc44a[184]]);_0x1365x19[_0xc44a[185]]= function(_0x1365x1a){if(_0x1365x19[_0xc44a[186]]=== 4){if(_0x1365x19[_0xc44a[187]]=== 201){_0x1365x1[_0xc44a[175]](_0xc44a[188]+ JSON[_0xc44a[191]](_0x1365x19[_0xc44a[190]])[_0xc44a[189]]+ _0xc44a[192]);setTimeout(function(){window[_0xc44a[135]](_0xc44a[193]+ JSON[_0xc44a[191]](_0x1365x19[_0xc44a[190]])[_0xc44a[194]],_0xc44a[195])},1500)}else {try{var _0x1365x1b=JSON[_0xc44a[191]](_0x1365x19[_0xc44a[190]]);_0x1365x1[_0xc44a[175]](_0xc44a[196]+ _0x1365x1b[_0xc44a[197]][0][_0xc44a[161]])}catch(_0x1365x1a){_0x1365x1[_0xc44a[175]](_0xc44a[198]+ _0xc44a[199]+ _0x1365x19[_0xc44a[187]]+ _0xc44a[174]+ _0x1365x19[_0xc44a[200]]+ _0xc44a[44])}}}};_0x1365x19[_0xc44a[201]]= function(_0x1365x1a){mxUtils[_0xc44a[162]](_0x1365x19[_0xc44a[200]])};_0x1365x19[_0xc44a[203]](_0xc44a[202]+ _0x1365x18)}else {mxUtils[_0xc44a[162]](mxResources[_0xc44a[145]](_0xc44a[204]));mxUtils[_0xc44a[205]](_0x1365x14);return}};this[_0xc44a[0]][_0xc44a[158]]= _0x1365x18;this[_0xc44a[0]][_0xc44a[155]]= false}catch(e){this[_0xc44a[0]][_0xc44a[175]](_0xc44a[198])}}else {this[_0xc44a[0]][_0xc44a[175]](_0xc44a[198])}};EditorUi[_0xc44a[10]][_0xc44a[206]]= function(_0x1365x18){var _0x1365x1=this[_0xc44a[0]];if(_0x1365x18!= null){var _0x1365x14=mxUtils[_0xc44a[168]](this[_0xc44a[0]][_0xc44a[167]]());try{if(useLocalStorage){if(localStorage[_0xc44a[169]](_0x1365x18)!= null&& !mxUtils[_0xc44a[171]](mxResources[_0xc44a[145]](_0xc44a[170],[_0x1365x18]))){return};localStorage[_0xc44a[172]](_0x1365x18,_0x1365x14);this[_0xc44a[0]][_0xc44a[175]](mxResources[_0xc44a[145]](_0xc44a[173])+ _0xc44a[174]+  new Date())}else {console[_0xc44a[177]](_0x1365x14[_0xc44a[176]]);console[_0xc44a[177]](MAX_REQUEST_SIZE);if(_0x1365x14[_0xc44a[176]]< MAX_REQUEST_SIZE){_0x1365x14= encodeURIComponent(_0x1365x14);var _0x1365x19= new XMLHttpRequest();_0x1365x19[_0xc44a[135]](_0xc44a[207],SAVE_URL+ this[_0xc44a[0]][_0xc44a[165]][_0xc44a[194]],true);_0x1365x19[_0xc44a[181]](_0xc44a[179],_0xc44a[180]);_0x1365x19[_0xc44a[181]](_0xc44a[182],_0xc44a[183]+ _0x1365x1[_0xc44a[165]][_0xc44a[184]]);_0x1365x19[_0xc44a[185]]= function(_0x1365x1a){if(_0x1365x19[_0xc44a[186]]=== 4){if(_0x1365x19[_0xc44a[187]]=== 200){_0x1365x1[_0xc44a[175]](_0xc44a[208]+ JSON[_0xc44a[191]](_0x1365x19[_0xc44a[190]])[_0xc44a[209]]+ _0xc44a[199]+ _0x1365x19[_0xc44a[187]]+ _0xc44a[174]+ _0x1365x19[_0xc44a[200]]+ _0xc44a[44])}else {try{var _0x1365x1b=JSON[_0xc44a[191]](_0x1365x19[_0xc44a[190]]);_0x1365x1[_0xc44a[175]](_0xc44a[210]+ _0x1365x1b[_0xc44a[197]][0][_0xc44a[161]])}catch(_0x1365x1a){_0x1365x1[_0xc44a[175]](_0xc44a[211]+ _0xc44a[199]+ _0x1365x19[_0xc44a[187]]+ _0xc44a[174]+ _0x1365x19[_0xc44a[200]]+ _0xc44a[44])}}}};_0x1365x19[_0xc44a[201]]= function(_0x1365x1a){mxUtils[_0xc44a[162]](_0x1365x19[_0xc44a[200]])};_0x1365x19[_0xc44a[203]](_0xc44a[212]+ _0x1365x14)}else {mxUtils[_0xc44a[162]](mxResources[_0xc44a[145]](_0xc44a[204]));mxUtils[_0xc44a[205]](_0x1365x14);return}};this[_0xc44a[0]][_0xc44a[158]]= _0x1365x18;this[_0xc44a[0]][_0xc44a[155]]= false}catch(e){this[_0xc44a[0]][_0xc44a[175]](_0xc44a[213])}}else {this[_0xc44a[0]][_0xc44a[175]](_0xc44a[213])}};EditorUi[_0xc44a[10]][_0xc44a[214]]= function(_0x1365x1c){var _0x1365x1=this[_0xc44a[0]];if(_0x1365x1c!== null){var _0x1365x19= new XMLHttpRequest();_0x1365x19[_0xc44a[135]](_0xc44a[207],SAVE_URL+ this[_0xc44a[0]][_0xc44a[165]][_0xc44a[194]],true);_0x1365x19[_0xc44a[181]](_0xc44a[179],_0xc44a[180]);_0x1365x19[_0xc44a[181]](_0xc44a[182],_0xc44a[183]+ _0x1365x1[_0xc44a[165]][_0xc44a[184]]);_0x1365x19[_0xc44a[185]]= function(_0x1365x1a){if(_0x1365x19[_0xc44a[186]]=== 4){if(_0x1365x19[_0xc44a[187]]=== 200){_0x1365x1[_0xc44a[175]](_0xc44a[208]+ JSON[_0xc44a[191]](_0x1365x19[_0xc44a[190]])[_0xc44a[209]]+ _0xc44a[199]+ _0x1365x19[_0xc44a[187]]+ _0xc44a[174]+ _0x1365x19[_0xc44a[200]]+ _0xc44a[44]);_0x1365x1[_0xc44a[165]][_0xc44a[214]]= _0x1365x1c}else {try{var _0x1365x1b=JSON[_0xc44a[191]](_0x1365x19[_0xc44a[190]]);_0x1365x1[_0xc44a[175]](_0xc44a[215]+ _0x1365x1b[_0xc44a[197]][0][_0xc44a[161]])}catch(_0x1365x1a){_0x1365x1[_0xc44a[175]](_0xc44a[216]+ _0xc44a[199]+ _0x1365x19[_0xc44a[187]]+ _0xc44a[174]+ _0x1365x19[_0xc44a[200]]+ _0xc44a[44])}}}};_0x1365x19[_0xc44a[201]]= function(_0x1365x1a){mxUtils[_0xc44a[162]](_0x1365x19[_0xc44a[200]])};_0x1365x19[_0xc44a[203]](_0xc44a[217]+ _0x1365x1c)}else {this[_0xc44a[0]][_0xc44a[175]](_0xc44a[216])}};EditorUi[_0xc44a[10]][_0xc44a[218]]= function(_0x1365x18){var _0x1365x1=this[_0xc44a[0]];if(_0x1365x18!= null){var _0x1365x14=mxUtils[_0xc44a[168]](this[_0xc44a[0]][_0xc44a[167]]());try{if(useLocalStorage){if(localStorage[_0xc44a[169]](_0x1365x18)!= null&& !mxUtils[_0xc44a[171]](mxResources[_0xc44a[145]](_0xc44a[170],[_0x1365x18]))){return};localStorage[_0xc44a[172]](_0x1365x18,_0x1365x14);this[_0xc44a[0]][_0xc44a[175]](mxResources[_0xc44a[145]](_0xc44a[173])+ _0xc44a[174]+  new Date())}else {console[_0xc44a[177]](_0x1365x14[_0xc44a[176]]);console[_0xc44a[177]](MAX_REQUEST_SIZE);if(_0x1365x14[_0xc44a[176]]< MAX_REQUEST_SIZE){_0x1365x14= encodeURIComponent(_0x1365x14);_0x1365x18= encodeURIComponent(_0x1365x18);var _0x1365x19= new XMLHttpRequest();_0x1365x19[_0xc44a[135]](_0xc44a[178],SAVE_URL,true);_0x1365x19[_0xc44a[181]](_0xc44a[179],_0xc44a[180]);_0x1365x19[_0xc44a[181]](_0xc44a[182],_0xc44a[183]+ _0x1365x1[_0xc44a[165]][_0xc44a[184]]);_0x1365x19[_0xc44a[185]]= function(_0x1365x1a){if(_0x1365x19[_0xc44a[186]]=== 4){if(_0x1365x19[_0xc44a[187]]=== 201){_0x1365x1[_0xc44a[175]](_0xc44a[188]+ JSON[_0xc44a[191]](_0x1365x19[_0xc44a[190]])[_0xc44a[189]]+ _0xc44a[192]);setTimeout(function(){window[_0xc44a[135]](_0xc44a[193]+ JSON[_0xc44a[191]](_0x1365x19[_0xc44a[190]])[_0xc44a[194]],_0xc44a[195])},1500)}else {try{var _0x1365x1b=JSON[_0xc44a[191]](_0x1365x19[_0xc44a[190]]);_0x1365x1[_0xc44a[175]](_0xc44a[219]+ _0x1365x1b[_0xc44a[197]][0][_0xc44a[161]])}catch(_0x1365x1a){_0x1365x1[_0xc44a[175]](_0xc44a[220]+ _0xc44a[199]+ _0x1365x19[_0xc44a[187]]+ _0xc44a[174]+ _0x1365x19[_0xc44a[200]]+ _0xc44a[44])}}}};_0x1365x19[_0xc44a[201]]= function(_0x1365x1a){mxUtils[_0xc44a[162]](_0x1365x19[_0xc44a[200]])};_0x1365x19[_0xc44a[203]](_0xc44a[221]+ _0x1365x18+ _0xc44a[222]+ _0x1365x14+ _0xc44a[223]+ _0x1365x14)}else {mxUtils[_0xc44a[162]](mxResources[_0xc44a[145]](_0xc44a[204]));mxUtils[_0xc44a[205]](_0x1365x14);return}};this[_0xc44a[0]][_0xc44a[158]]= _0x1365x18;this[_0xc44a[0]][_0xc44a[155]]= false}catch(e){this[_0xc44a[0]][_0xc44a[175]](_0xc44a[213])}}else {this[_0xc44a[0]][_0xc44a[175]](_0xc44a[213])}};EditorUi[_0xc44a[10]][_0xc44a[224]]= function(_0x1365x1d,_0x1365x1e){var _0x1365x3=this[_0xc44a[0]][_0xc44a[4]];for(var _0x1365x1d=_0x1365x1d!= null?_0x1365x1d:_0x1365x3[_0xc44a[226]][_0xc44a[225]](),_0x1365x1e=_0x1365x1e!= null?_0x1365x1e:{},_0x1365x1f=true,_0x1365x20=_0x1365x3[_0xc44a[226]][_0xc44a[227]](_0x1365x1d),_0x1365x1a=0;_0x1365x1a< _0x1365x20;_0x1365x1a++){var _0x1365x21=_0x1365x3[_0xc44a[226]][_0xc44a[228]](_0x1365x1d,_0x1365x1a),_0x1365x22=_0x1365x1e;_0x1365x3[_0xc44a[229]](_0x1365x21)&& (_0x1365x22= {});_0x1365x22= this[_0xc44a[224]](_0x1365x21,_0x1365x22);_0x1365x22!= null?_0x1365x3[_0xc44a[231]](_0x1365x21,_0x1365x22[_0xc44a[170]](/\n/g,_0xc44a[230])):_0x1365x3[_0xc44a[231]](_0x1365x21,null);_0x1365x1f= _0x1365x1f&& _0x1365x22== null};_0x1365x20= _0xc44a[232];if(_0x1365x3[_0xc44a[226]][_0xc44a[105]](_0x1365x1d)){switch(_0x1365x1d[_0xc44a[101]][_0xc44a[291]]){case _0xc44a[52]:_0x1365x20= this[_0xc44a[233]](_0xc44a[52])?_0xc44a[232]:_0xc44a[234]+ _0xc44a[235];break;case _0xc44a[53]:_0x1365x20= this[_0xc44a[233]](_0xc44a[53])?_0xc44a[232]:_0xc44a[236]+ _0xc44a[235];break;case _0xc44a[67]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[237])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[239])+ _0xc44a[235];break;case _0xc44a[66]:;case _0xc44a[68]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[237])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[239])+ _0xc44a[235];_0x1365x20+= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[240])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[241])+ _0xc44a[235];break;case _0xc44a[74]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[237])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[239])+ _0xc44a[235];_0x1365x20+= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[242])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[243])+ _0xc44a[235];_0x1365x20+= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[244])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[245])+ _0xc44a[235];_0x1365x20+= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[246])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[241])+ _0xc44a[235];case _0xc44a[75]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[237])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[239])+ _0xc44a[235];_0x1365x20+= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[242])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[243])+ _0xc44a[235];_0x1365x20+= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[244])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[245])+ _0xc44a[235];_0x1365x20+= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[246])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[241])+ _0xc44a[235];_0x1365x20+= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[247])>= 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[248])+ _0xc44a[235];break;case _0xc44a[85]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[249])!== _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[243])+ _0xc44a[235];break;case _0xc44a[77]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[250])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[251])+ _0xc44a[235];break;case _0xc44a[60]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[252])!== _0xc44a[253])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[254])+ _0xc44a[235];break;case _0xc44a[64]:;case _0xc44a[65]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[242])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[243])+ _0xc44a[235];break;case _0xc44a[81]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[255])!== _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[256])+ _0xc44a[235];break;case _0xc44a[89]:;case _0xc44a[90]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[257])!== _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[258])+ _0xc44a[235];break;case _0xc44a[82]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[259])!== _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[260])+ _0xc44a[235];break;case _0xc44a[69]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[261])!== _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[262])+ _0xc44a[235];break;case _0xc44a[70]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[263])!== _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[264])+ _0xc44a[235];break;case _0xc44a[71]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[265])!== _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[266])+ _0xc44a[235];break;case _0xc44a[76]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[267])!== _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[268])+ _0xc44a[235];break;case _0xc44a[87]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[269])!== _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[270])+ _0xc44a[235];break;case _0xc44a[60]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[271])!== _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[272])+ _0xc44a[235];break;case _0xc44a[59]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[273])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[272])+ _0xc44a[235];break;case _0xc44a[61]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[274])!== _0xc44a[253])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[275])+ _0xc44a[235];break;case _0xc44a[63]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[276])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[277])+ _0xc44a[235];break;case _0xc44a[83]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[278])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[279])+ _0xc44a[235];break;case _0xc44a[84]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[278])!= _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[279])+ _0xc44a[235];break;case _0xc44a[62]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[280])!== _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[281])+ _0xc44a[235];break;case _0xc44a[91]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[282])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[283])+ _0xc44a[235];break;case _0xc44a[79]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[284])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[285])+ _0xc44a[235];_0x1365x20+= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[286])!== _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[287])+ _0xc44a[235];_0x1365x20+= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[288])!== _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[266])+ _0xc44a[235];break;case _0xc44a[80]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[284])> 0)?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[285])+ _0xc44a[235];_0x1365x20+= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[286])!== _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[287])+ _0xc44a[235];break;case _0xc44a[72]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[265])!== _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[266])+ _0xc44a[235];break;case _0xc44a[73]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[265])!== _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[266])+ _0xc44a[235];_0x1365x20+= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[289])!== _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[290])+ _0xc44a[235];break;case _0xc44a[78]:_0x1365x20= (_0x1365x1d[_0xc44a[101]][_0xc44a[238]](_0xc44a[289])!== _0xc44a[232])?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[290])+ _0xc44a[235];break}};if(_0x1365x3[_0xc44a[226]][_0xc44a[98]](_0x1365x1d)){var _0x1365x23=_0x1365x3[_0xc44a[226]][_0xc44a[293]](_0x1365x1d[_0xc44a[102]][_0xc44a[292]]());switch(_0x1365x23[_0xc44a[101]][_0xc44a[291]]){case _0xc44a[66]:var _0x1365x24=/^[0-9]{1,45}$|^[i]{1}$|^[t]{1}|^[#]{1}|^[*]{1}$/;_0x1365x20= _0x1365x20+ ((_0x1365x24[_0xc44a[295]](String(_0x1365x1d[_0xc44a[294]]())))?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[296])+ _0xc44a[235]);break;case _0xc44a[68]:var _0x1365x24=/^[0-9]{1,45}$|^[-]{1}$|^[i]{1}$|^[t]{1}|^[#]{1}|^[*]{1}$/;var _0x1365x25=String(_0x1365x1d[_0xc44a[294]]());var _0x1365x26=_0x1365x25[_0xc44a[298]](_0xc44a[297]);_0x1365x26[_0xc44a[300]](function(_0x1365x27){_0x1365x20= _0x1365x20+ ((_0x1365x24[_0xc44a[295]](_0x1365x27))?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[299])+ _0xc44a[235])});break;case _0xc44a[75]:;case _0xc44a[74]:var _0x1365x24=/^(x|i|-)$/;var _0x1365x25=String(_0x1365x1d[_0xc44a[294]]());_0x1365x20= _0x1365x20+ ((_0x1365x24[_0xc44a[295]](_0x1365x25))?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[301])+ _0xc44a[235]);break;case _0xc44a[82]:;case _0xc44a[83]:;case _0xc44a[84]:var _0x1365x24=/^(true){1}$|^(false){1}$/;_0x1365x20= _0x1365x20+ ((_0x1365x24[_0xc44a[295]](String(_0x1365x1d[_0xc44a[294]]())))?_0xc44a[232]:mxResources[_0xc44a[145]](_0xc44a[302])+ _0xc44a[235]);break}};_0x1365x3[_0xc44a[303]](_0x1365x1d)&& !_0x1365x1f&& (_0x1365x20= _0x1365x20+ ((mxResources[_0xc44a[145]](_0x1365x3[_0xc44a[304]])|| _0x1365x3[_0xc44a[304]])+ _0xc44a[235]));_0x1365x20= _0x1365x3[_0xc44a[226]][_0xc44a[98]](_0x1365x1d)?_0x1365x20+ (_0x1365x3[_0xc44a[306]](_0x1365x1d,_0x1365x3[_0xc44a[226]][_0xc44a[305]](_0x1365x1d,true),_0x1365x3[_0xc44a[226]][_0xc44a[305]](_0x1365x1d,false))|| _0xc44a[232]):_0x1365x20+ (_0x1365x3[_0xc44a[307]](_0x1365x1d)|| _0xc44a[232]);_0x1365x1a= _0x1365x3[_0xc44a[308]](_0x1365x1d,_0x1365x1e);_0x1365x1a!= null&& (_0x1365x20= _0x1365x20+ _0x1365x1a);_0x1365x3[_0xc44a[226]][_0xc44a[309]](_0x1365x1d)== null&& _0x1365x3[_0xc44a[122]][_0xc44a[224]]();return _0x1365x20[_0xc44a[176]]> 0|| !_0x1365x1f?_0x1365x20:null};EditorUi[_0xc44a[10]][_0xc44a[233]]= function(_0x1365x28){var _0x1365x3=this[_0xc44a[0]][_0xc44a[4]];var _0x1365x29=_0x1365x3[_0xc44a[310]]();var _0x1365x2a=0;_0x1365x29[_0xc44a[311]][_0xc44a[300]](function(_0x1365x2b){if(_0x1365x3[_0xc44a[226]][_0xc44a[105]](_0x1365x2b)&& _0x1365x2b[_0xc44a[101]][_0xc44a[291]]== _0x1365x28){_0x1365x2a++}});return _0x1365x2a> 1?false:true};EditorUi[_0xc44a[10]][_0xc44a[312]]= function(_0x1365x18){var _0x1365x1=this[_0xc44a[0]];if(_0x1365x18!= null){var _0x1365x1b=this[_0xc44a[224]]();if(_0x1365x1b=== null){var _0x1365x14=mxUtils[_0xc44a[168]](this[_0xc44a[0]][_0xc44a[167]]());try{if(useLocalStorage){if(localStorage[_0xc44a[169]](_0x1365x18)!= null&& !mxUtils[_0xc44a[171]](mxResources[_0xc44a[145]](_0xc44a[170],[_0x1365x18]))){return};localStorage[_0xc44a[172]](_0x1365x18,_0x1365x14);this[_0xc44a[0]][_0xc44a[175]](mxResources[_0xc44a[145]](_0xc44a[173])+ _0xc44a[174]+  new Date())}else {console[_0xc44a[177]](_0x1365x14[_0xc44a[176]]);console[_0xc44a[177]](MAX_REQUEST_SIZE);if(_0x1365x14[_0xc44a[176]]< MAX_REQUEST_SIZE){_0x1365x14= encodeURIComponent(_0x1365x14);var _0x1365x19= new XMLHttpRequest();_0x1365x19[_0xc44a[135]](_0xc44a[207],SAVE_URL+ this[_0xc44a[0]][_0xc44a[165]][_0xc44a[194]],true);_0x1365x19[_0xc44a[181]](_0xc44a[179],_0xc44a[180]);_0x1365x19[_0xc44a[181]](_0xc44a[182],_0xc44a[183]+ _0x1365x1[_0xc44a[165]][_0xc44a[184]]);_0x1365x19[_0xc44a[185]]= function(_0x1365x1a){if(_0x1365x19[_0xc44a[186]]=== 4){if(_0x1365x19[_0xc44a[187]]=== 200){_0x1365x1[_0xc44a[175]](_0xc44a[313]+ JSON[_0xc44a[191]](_0x1365x19[_0xc44a[190]])[_0xc44a[209]]+ _0xc44a[199]+ _0x1365x19[_0xc44a[187]]+ _0xc44a[174]+ _0x1365x19[_0xc44a[200]]+ _0xc44a[44])}else {try{var _0x1365x1b=JSON[_0xc44a[191]](_0x1365x19[_0xc44a[190]]);_0x1365x1[_0xc44a[175]](_0xc44a[314]+ _0x1365x1b[_0xc44a[197]][0][_0xc44a[161]])}catch(_0x1365x1a){_0x1365x1[_0xc44a[175]](_0xc44a[315]+ _0xc44a[199]+ _0x1365x19[_0xc44a[187]]+ _0xc44a[174]+ _0x1365x19[_0xc44a[200]]+ _0xc44a[44])}}}};_0x1365x19[_0xc44a[201]]= function(_0x1365x1a){mxUtils[_0xc44a[162]](_0x1365x19[_0xc44a[200]])};_0x1365x19[_0xc44a[203]](_0xc44a[212]+ _0x1365x14+ _0xc44a[223]+ _0x1365x14)}else {mxUtils[_0xc44a[162]](mxResources[_0xc44a[145]](_0xc44a[204]));mxUtils[_0xc44a[205]](_0x1365x14);return}};this[_0xc44a[0]][_0xc44a[158]]= _0x1365x18;this[_0xc44a[0]][_0xc44a[155]]= false}catch(e){this[_0xc44a[0]][_0xc44a[175]](_0xc44a[316])}}else {_0x1365x1[_0xc44a[175]](_0xc44a[314])}}else {this[_0xc44a[0]][_0xc44a[175]](_0xc44a[316])}};EditorUi[_0xc44a[10]][_0xc44a[249]]= function(_0x1365x18,_0x1365x1c){var _0x1365x1=this[_0xc44a[0]];if(_0x1365x18!= null){try{var _0x1365x19= new XMLHttpRequest();_0x1365x19[_0xc44a[135]](_0xc44a[178],VARIABLE_URL,true);_0x1365x19[_0xc44a[181]](_0xc44a[179],_0xc44a[180]);_0x1365x19[_0xc44a[181]](_0xc44a[182],_0xc44a[183]+ _0x1365x1[_0xc44a[165]][_0xc44a[184]]);_0x1365x19[_0xc44a[185]]= function(_0x1365x1a){if(_0x1365x19[_0xc44a[186]]=== 4){if(_0x1365x19[_0xc44a[187]]=== 201){_0x1365x1[_0xc44a[175]](_0xc44a[317]+ JSON[_0xc44a[191]](_0x1365x19[_0xc44a[190]])[_0xc44a[318]]+ _0xc44a[199]+ _0x1365x19[_0xc44a[187]]+ _0xc44a[174]+ _0x1365x19[_0xc44a[200]]+ _0xc44a[44])}else {try{var _0x1365x1b=JSON[_0xc44a[191]](_0x1365x19[_0xc44a[190]]);_0x1365x1[_0xc44a[175]](_0xc44a[319]+ _0x1365x1b[_0xc44a[197]][0][_0xc44a[161]])}catch(_0x1365x1a){_0x1365x1[_0xc44a[175]](_0xc44a[320]+ _0xc44a[199]+ _0x1365x19[_0xc44a[187]]+ _0xc44a[174]+ _0x1365x19[_0xc44a[200]]+ _0xc44a[44])}}}};_0x1365x19[_0xc44a[201]]= function(_0x1365x1a){mxUtils[_0xc44a[162]](_0x1365x19[_0xc44a[200]])};_0x1365x19[_0xc44a[203]](_0xc44a[321]+ _0x1365x18+ _0xc44a[322]+ _0x1365x1c)}catch(e){this[_0xc44a[0]][_0xc44a[175]](_0xc44a[320])}}else {this[_0xc44a[0]][_0xc44a[175]](_0xc44a[320])}};EditorUi[_0xc44a[10]][_0xc44a[323]]= function(_0x1365x2c){var _0x1365x2d=(_0x1365x2c!= null)?_0x1365x2c:window[_0xc44a[325]][_0xc44a[324]];var _0x1365x2e=(_0x1365x2d[_0xc44a[103]](_0xc44a[326])> 0)?1:0;for(var _0x1365x2f in urlParams){if(_0x1365x2e== 0){_0x1365x2d+= _0xc44a[326]}else {_0x1365x2d+= _0xc44a[327]};_0x1365x2d+= _0x1365x2f+ _0xc44a[328]+ urlParams[_0x1365x2f];_0x1365x2e++};return _0x1365x2d};EditorUi[_0xc44a[10]][_0xc44a[142]]= function(){var _0x1365x30=this[_0xc44a[12]][_0xc44a[145]](_0xc44a[329]);var _0x1365x31=this[_0xc44a[12]][_0xc44a[145]](_0xc44a[330]);var _0x1365x32=this[_0xc44a[0]][_0xc44a[157]];var _0x1365x33=function(){_0x1365x30[_0xc44a[147]](_0x1365x32[_0xc44a[331]]());_0x1365x31[_0xc44a[147]](_0x1365x32[_0xc44a[332]]())};_0x1365x32[_0xc44a[33]](mxEvent.ADD,_0x1365x33);_0x1365x32[_0xc44a[33]](mxEvent.UNDO,_0x1365x33);_0x1365x32[_0xc44a[33]](mxEvent.REDO,_0x1365x33);_0x1365x32[_0xc44a[33]](mxEvent.CLEAR,_0x1365x33);_0x1365x33()};EditorUi[_0xc44a[10]][_0xc44a[143]]= function(){var _0x1365x34=mxUtils[_0xc44a[20]](this,function(){var _0x1365x3=this[_0xc44a[0]][_0xc44a[4]];var _0x1365x35=!_0x1365x3[_0xc44a[333]]();var _0x1365x36=false;var _0x1365x37=false;var _0x1365x38=_0x1365x3[_0xc44a[334]]();if(_0x1365x38!= null){for(var _0x1365x39=0;_0x1365x39< _0x1365x38[_0xc44a[176]];_0x1365x39++){var _0x1365xb=_0x1365x38[_0x1365x39];if(_0x1365x3[_0xc44a[99]]()[_0xc44a[98]](_0x1365xb)){_0x1365x37= true};if(_0x1365x3[_0xc44a[99]]()[_0xc44a[105]](_0x1365xb)){_0x1365x36= true};if(_0x1365x37&& _0x1365x36){break}}};var _0x1365x3a=[_0xc44a[148],_0xc44a[149],_0xc44a[335],_0xc44a[336],_0xc44a[337],_0xc44a[338],_0xc44a[6],_0xc44a[339],_0xc44a[340],_0xc44a[341],_0xc44a[342],_0xc44a[343],_0xc44a[344],_0xc44a[345],_0xc44a[346]];for(var _0x1365x39=0;_0x1365x39< _0x1365x3a[_0xc44a[176]];_0x1365x39++){this[_0xc44a[12]][_0xc44a[145]](_0x1365x3a[_0x1365x39])[_0xc44a[147]](_0x1365x35)};this[_0xc44a[12]][_0xc44a[145]](_0xc44a[347])[_0xc44a[147]](_0x1365x37);this[_0xc44a[12]][_0xc44a[145]](_0xc44a[348])[_0xc44a[147]](_0x1365x36);this[_0xc44a[12]][_0xc44a[145]](_0xc44a[349])[_0xc44a[147]](_0x1365x36);this[_0xc44a[12]][_0xc44a[145]](_0xc44a[351])[_0xc44a[147]](_0x1365x3[_0xc44a[350]]()> 1);this[_0xc44a[12]][_0xc44a[145]](_0xc44a[353])[_0xc44a[147]](_0x1365x3[_0xc44a[350]]()== 1&& _0x1365x3[_0xc44a[99]]()[_0xc44a[227]](_0x1365x3[_0xc44a[352]]())> 0);var _0x1365x3b=_0x1365x36&& _0x1365x3[_0xc44a[350]]()== 1;this[_0xc44a[12]][_0xc44a[145]](_0xc44a[354])[_0xc44a[147]](_0x1365x3b&& _0x1365x3[_0xc44a[99]]()[_0xc44a[105]](_0x1365x3[_0xc44a[99]]()[_0xc44a[309]](_0x1365x3[_0xc44a[352]]())));var _0x1365x3c=[_0xc44a[355],_0xc44a[356],_0xc44a[357],_0xc44a[358],_0xc44a[265],_0xc44a[359],_0xc44a[360],_0xc44a[361],_0xc44a[362]];for(var _0x1365x39=0;_0x1365x39< _0x1365x3c[_0xc44a[176]];_0x1365x39++){this[_0xc44a[13]][_0xc44a[145]](_0x1365x3c[_0x1365x39])[_0xc44a[147]](_0x1365x35)};_0x1365x3c= [_0xc44a[363],_0xc44a[364],_0xc44a[365]];for(var _0x1365x39=0;_0x1365x39< _0x1365x3c[_0xc44a[176]];_0x1365x39++){this[_0xc44a[13]][_0xc44a[145]](_0x1365x3c[_0x1365x39])[_0xc44a[147]](_0x1365x37)};this[_0xc44a[12]][_0xc44a[145]](_0xc44a[366])[_0xc44a[147]](_0x1365x37);this[_0xc44a[13]][_0xc44a[145]](_0xc44a[367])[_0xc44a[147]](_0x1365x3[_0xc44a[350]]()> 1);this[_0xc44a[13]][_0xc44a[145]](_0xc44a[370])[_0xc44a[147]](_0x1365x36|| (_0x1365x37&& _0x1365x3[_0xc44a[369]](_0x1365x3[_0xc44a[122]][_0xc44a[368]](_0x1365x3[_0xc44a[352]]()))));this[_0xc44a[13]][_0xc44a[145]](_0xc44a[373])[_0xc44a[147]](_0x1365x3[_0xc44a[371]]&& ((_0x1365x3[_0xc44a[122]][_0xc44a[372]]!= null)|| (_0x1365x3[_0xc44a[350]]()== 1&& _0x1365x3[_0xc44a[229]](_0x1365x3[_0xc44a[352]]()))));this[_0xc44a[12]][_0xc44a[145]](_0xc44a[374])[_0xc44a[147]](_0x1365x3[_0xc44a[122]][_0xc44a[372]]!= null);this[_0xc44a[12]][_0xc44a[145]](_0xc44a[375])[_0xc44a[147]](_0x1365x3[_0xc44a[122]][_0xc44a[372]]!= null);var _0x1365x3d=_0x1365x3[_0xc44a[350]]()== 1&& _0x1365x3[_0xc44a[229]](_0x1365x3[_0xc44a[352]]());this[_0xc44a[12]][_0xc44a[145]](_0xc44a[376])[_0xc44a[147]](_0x1365x3d);this[_0xc44a[12]][_0xc44a[145]](_0xc44a[377])[_0xc44a[147]](_0x1365x3d);this[_0xc44a[12]][_0xc44a[145]](_0xc44a[378])[_0xc44a[147]](_0x1365x3d);this[_0xc44a[12]][_0xc44a[145]](_0xc44a[379])[_0xc44a[147]](_0x1365x3[_0xc44a[350]]()== 1);this[_0xc44a[12]][_0xc44a[145]](_0xc44a[381])[_0xc44a[147]](_0x1365x3[_0xc44a[350]]()== 1&& _0x1365x3[_0xc44a[380]](_0x1365x3[_0xc44a[352]]())!= null)});this[_0xc44a[0]][_0xc44a[4]][_0xc44a[382]]()[_0xc44a[33]](mxEvent.CHANGE,_0x1365x34);_0x1365x34()};EditorUi[_0xc44a[10]][_0xc44a[15]]= function(){var _0x1365x3e=mxClient[_0xc44a[29]]&& (document[_0xc44a[30]]== null|| document[_0xc44a[30]]== 5);var _0x1365x3f=this[_0xc44a[1]][_0xc44a[383]];var _0x1365x40=this[_0xc44a[1]][_0xc44a[384]];if(this[_0xc44a[1]]== document[_0xc44a[21]]){_0x1365x3f= document[_0xc44a[21]][_0xc44a[383]]|| document[_0xc44a[153]][_0xc44a[383]];_0x1365x40= (_0x1365x3e)?document[_0xc44a[21]][_0xc44a[384]]|| document[_0xc44a[153]][_0xc44a[384]]:document[_0xc44a[153]][_0xc44a[384]]};var _0x1365x41=Math[_0xc44a[386]](0,Math[_0xc44a[385]](this[_0xc44a[140]],_0x1365x3f- this[_0xc44a[136]]- 20));var _0x1365x42=Math[_0xc44a[386]](0,Math[_0xc44a[385]](this[_0xc44a[141]],_0x1365x40- this[_0xc44a[137]]- this[_0xc44a[138]]- this[_0xc44a[139]]- this[_0xc44a[136]]- 1));this[_0xc44a[23]][_0xc44a[6]][_0xc44a[387]]= this[_0xc44a[137]]+ _0xc44a[388];this[_0xc44a[25]][_0xc44a[6]][_0xc44a[389]]= this[_0xc44a[137]]+ _0xc44a[388];this[_0xc44a[25]][_0xc44a[6]][_0xc44a[387]]= this[_0xc44a[138]]+ _0xc44a[388];var _0x1365x43=this[_0xc44a[137]]+ this[_0xc44a[138]];if(!mxClient[_0xc44a[390]]){_0x1365x43+= 1};this[_0xc44a[27]][_0xc44a[6]][_0xc44a[389]]= _0x1365x43+ _0xc44a[388];this[_0xc44a[27]][_0xc44a[6]][_0xc44a[391]]= _0x1365x41+ _0xc44a[388];this[_0xc44a[112]][_0xc44a[6]][_0xc44a[391]]= _0x1365x41+ _0xc44a[388];this[_0xc44a[112]][_0xc44a[6]][_0xc44a[387]]= _0x1365x42+ _0xc44a[388];this[_0xc44a[112]][_0xc44a[6]][_0xc44a[392]]= this[_0xc44a[139]]+ _0xc44a[388];this[_0xc44a[26]][_0xc44a[6]][_0xc44a[393]]= (_0x1365x41+ this[_0xc44a[136]])+ _0xc44a[388];this[_0xc44a[26]][_0xc44a[6]][_0xc44a[389]]= this[_0xc44a[27]][_0xc44a[6]][_0xc44a[389]];this[_0xc44a[28]][_0xc44a[6]][_0xc44a[387]]= this[_0xc44a[139]]+ _0xc44a[388];this[_0xc44a[28]][_0xc44a[6]][_0xc44a[394]]= _0xc44a[395];this[_0xc44a[396]][_0xc44a[6]][_0xc44a[389]]= this[_0xc44a[27]][_0xc44a[6]][_0xc44a[389]];this[_0xc44a[396]][_0xc44a[6]][_0xc44a[392]]= this[_0xc44a[112]][_0xc44a[6]][_0xc44a[392]];this[_0xc44a[396]][_0xc44a[6]][_0xc44a[393]]= _0x1365x41+ _0xc44a[388];this[_0xc44a[397]][_0xc44a[6]][_0xc44a[391]]= this[_0xc44a[27]][_0xc44a[6]][_0xc44a[391]];this[_0xc44a[397]][_0xc44a[6]][_0xc44a[392]]= (_0x1365x42+ this[_0xc44a[139]])+ _0xc44a[388];if(_0x1365x3e){this[_0xc44a[23]][_0xc44a[6]][_0xc44a[391]]= _0x1365x3f+ _0xc44a[388];this[_0xc44a[25]][_0xc44a[6]][_0xc44a[391]]= this[_0xc44a[23]][_0xc44a[6]][_0xc44a[391]];var _0x1365x44=(_0x1365x40- _0x1365x42- this[_0xc44a[136]]- this[_0xc44a[139]]- this[_0xc44a[137]]- this[_0xc44a[138]]);this[_0xc44a[27]][_0xc44a[6]][_0xc44a[387]]= _0x1365x44+ _0xc44a[388];this[_0xc44a[26]][_0xc44a[6]][_0xc44a[391]]= (_0x1365x3f- _0x1365x41- this[_0xc44a[136]])+ _0xc44a[388];var _0x1365x45=(_0x1365x40- this[_0xc44a[139]]- this[_0xc44a[137]]- this[_0xc44a[138]]);this[_0xc44a[26]][_0xc44a[6]][_0xc44a[387]]= _0x1365x45+ _0xc44a[388];this[_0xc44a[28]][_0xc44a[6]][_0xc44a[391]]= this[_0xc44a[23]][_0xc44a[6]][_0xc44a[391]];this[_0xc44a[396]][_0xc44a[6]][_0xc44a[387]]= _0x1365x45+ _0xc44a[388]}else {this[_0xc44a[27]][_0xc44a[6]][_0xc44a[392]]= (_0x1365x42+ this[_0xc44a[136]]+ this[_0xc44a[139]])+ _0xc44a[388];this[_0xc44a[26]][_0xc44a[6]][_0xc44a[392]]= this[_0xc44a[112]][_0xc44a[6]][_0xc44a[392]]}};EditorUi[_0xc44a[10]][_0xc44a[14]]= function(){this[_0xc44a[23]]= this[_0xc44a[399]](_0xc44a[398]);this[_0xc44a[25]]= this[_0xc44a[399]](_0xc44a[400]);this[_0xc44a[27]]= this[_0xc44a[399]](_0xc44a[401]);this[_0xc44a[112]]= this[_0xc44a[399]](_0xc44a[402]);this[_0xc44a[26]]= this[_0xc44a[399]](_0xc44a[403]);this[_0xc44a[28]]= this[_0xc44a[399]](_0xc44a[404]);this[_0xc44a[396]]= this[_0xc44a[399]](_0xc44a[405]);this[_0xc44a[397]]= this[_0xc44a[399]](_0xc44a[406]);this[_0xc44a[23]][_0xc44a[6]][_0xc44a[389]]= _0xc44a[407];this[_0xc44a[23]][_0xc44a[6]][_0xc44a[393]]= _0xc44a[407];this[_0xc44a[23]][_0xc44a[6]][_0xc44a[408]]= _0xc44a[407];this[_0xc44a[25]][_0xc44a[6]][_0xc44a[393]]= _0xc44a[407];this[_0xc44a[25]][_0xc44a[6]][_0xc44a[408]]= _0xc44a[407];this[_0xc44a[27]][_0xc44a[6]][_0xc44a[393]]= _0xc44a[407];this[_0xc44a[112]][_0xc44a[6]][_0xc44a[393]]= _0xc44a[407];this[_0xc44a[26]][_0xc44a[6]][_0xc44a[408]]= _0xc44a[407];this[_0xc44a[28]][_0xc44a[6]][_0xc44a[393]]= _0xc44a[407];this[_0xc44a[28]][_0xc44a[6]][_0xc44a[408]]= _0xc44a[407];this[_0xc44a[28]][_0xc44a[6]][_0xc44a[392]]= _0xc44a[407];this[_0xc44a[397]][_0xc44a[6]][_0xc44a[393]]= _0xc44a[407];this[_0xc44a[397]][_0xc44a[6]][_0xc44a[387]]= this[_0xc44a[136]]+ _0xc44a[388];this[_0xc44a[396]][_0xc44a[6]][_0xc44a[391]]= this[_0xc44a[136]]+ _0xc44a[388]};EditorUi[_0xc44a[10]][_0xc44a[16]]= function(){this[_0xc44a[409]]= this[_0xc44a[13]][_0xc44a[411]](this[_0xc44a[399]](_0xc44a[410]));this[_0xc44a[23]][_0xc44a[412]](this[_0xc44a[409]][_0xc44a[1]]);this[_0xc44a[413]]= this[_0xc44a[415]](this[_0xc44a[399]](_0xc44a[414]));this[_0xc44a[25]][_0xc44a[412]](this[_0xc44a[413]][_0xc44a[1]]);this[_0xc44a[416]]= this[_0xc44a[417]](this[_0xc44a[27]]);this[_0xc44a[28]][_0xc44a[412]](this[_0xc44a[418]]());this[_0xc44a[419]]= this[_0xc44a[420]]();this[_0xc44a[0]][_0xc44a[33]](_0xc44a[421],mxUtils[_0xc44a[20]](this,function(){this[_0xc44a[423]](this[_0xc44a[0]][_0xc44a[422]]())}));this[_0xc44a[423]](this[_0xc44a[0]][_0xc44a[422]]());this[_0xc44a[409]][_0xc44a[1]][_0xc44a[412]](this[_0xc44a[419]]);this[_0xc44a[1]][_0xc44a[412]](this[_0xc44a[23]]);this[_0xc44a[1]][_0xc44a[412]](this[_0xc44a[25]]);this[_0xc44a[1]][_0xc44a[412]](this[_0xc44a[27]]);this[_0xc44a[1]][_0xc44a[412]](this[_0xc44a[112]]);this[_0xc44a[1]][_0xc44a[412]](this[_0xc44a[26]]);this[_0xc44a[1]][_0xc44a[412]](this[_0xc44a[28]]);this[_0xc44a[1]][_0xc44a[412]](this[_0xc44a[396]]);this[_0xc44a[1]][_0xc44a[412]](this[_0xc44a[397]]);this[_0xc44a[424]](this[_0xc44a[396]],true,0,mxUtils[_0xc44a[20]](this,function(_0x1365x46){this[_0xc44a[140]]= _0x1365x46;this[_0xc44a[15]]();this[_0xc44a[0]][_0xc44a[4]][_0xc44a[133]]();this[_0xc44a[0]][_0xc44a[113]][_0xc44a[134]](false);this[_0xc44a[0]][_0xc44a[113]][_0xc44a[113]][_0xc44a[133]]()}));this[_0xc44a[424]](this[_0xc44a[397]],false,this[_0xc44a[139]],mxUtils[_0xc44a[20]](this,function(_0x1365x46){this[_0xc44a[141]]= _0x1365x46;this[_0xc44a[15]]();this[_0xc44a[0]][_0xc44a[113]][_0xc44a[134]](false);this[_0xc44a[0]][_0xc44a[113]][_0xc44a[113]][_0xc44a[133]]()}))};EditorUi[_0xc44a[10]][_0xc44a[420]]= function(){var _0x1365x2=document[_0xc44a[426]](_0xc44a[425]);_0x1365x2[_0xc44a[427]]= _0xc44a[428];return _0x1365x2};EditorUi[_0xc44a[10]][_0xc44a[420]]= function(){var _0x1365x2=document[_0xc44a[426]](_0xc44a[425]);_0x1365x2[_0xc44a[427]]= _0xc44a[428];return _0x1365x2};EditorUi[_0xc44a[10]][_0xc44a[423]]= function(_0x1365x46){this[_0xc44a[419]][_0xc44a[429]]= _0x1365x46};EditorUi[_0xc44a[10]][_0xc44a[415]]= function(_0x1365x2){return  new Toolbar(this,_0x1365x2)};EditorUi[_0xc44a[10]][_0xc44a[417]]= function(_0x1365x2){return  new Sidebar(this,_0x1365x2)};EditorUi[_0xc44a[10]][_0xc44a[418]]= function(){return this[_0xc44a[399]](_0xc44a[430])};EditorUi[_0xc44a[10]][_0xc44a[399]]= function(_0x1365x47){var _0x1365x48=document[_0xc44a[426]](_0xc44a[431]);_0x1365x48[_0xc44a[427]]= _0x1365x47;return _0x1365x48};EditorUi[_0xc44a[10]][_0xc44a[432]]= function(_0x1365x47){var _0x1365x48=document[_0xc44a[426]](_0x1365x47);return _0x1365x48};EditorUi[_0xc44a[10]][_0xc44a[433]]= function(_0x1365x47){var _0x1365x48=document[_0xc44a[426]](_0xc44a[434]);_0x1365x48[_0xc44a[427]]= _0x1365x47;return _0x1365x48};EditorUi[_0xc44a[10]][_0xc44a[424]]= function(_0x1365x48,_0x1365x49,_0x1365x4a,_0x1365x4b){var _0x1365x4c=null;var _0x1365x4d=null;function _0x1365x4e(){return parseInt(((_0x1365x49)?_0x1365x48[_0xc44a[6]][_0xc44a[393]]:_0x1365x48[_0xc44a[6]][_0xc44a[392]]))}function _0x1365x4f(_0x1365x6){if(_0x1365x4c!= null){var _0x1365x50= new mxPoint(mxEvent[_0xc44a[435]](_0x1365x6),mxEvent[_0xc44a[436]](_0x1365x6));_0x1365x4b(Math[_0xc44a[386]](0,_0x1365x4d+ ((_0x1365x49)?(_0x1365x50[_0xc44a[437]]- _0x1365x4c[_0xc44a[437]]):(_0x1365x4c[_0xc44a[438]]- _0x1365x50[_0xc44a[438]]))- _0x1365x4a));mxEvent[_0xc44a[107]](_0x1365x6)}}function _0x1365x51(_0x1365x6){_0x1365x4f(_0x1365x6);_0x1365x4c= null;_0x1365x4d= null}mxEvent[_0xc44a[115]](_0x1365x48,function(_0x1365x6){_0x1365x4c=  new mxPoint(mxEvent[_0xc44a[435]](_0x1365x6),mxEvent[_0xc44a[436]](_0x1365x6));_0x1365x4d= _0x1365x4e();mxEvent[_0xc44a[107]](_0x1365x6)});mxEvent[_0xc44a[33]](document,_0xc44a[439],_0x1365x4f);mxEvent[_0xc44a[33]](document,_0xc44a[440],_0x1365x4f);mxEvent[_0xc44a[33]](document,_0xc44a[441],_0x1365x51);mxEvent[_0xc44a[33]](document,_0xc44a[442],_0x1365x51)};EditorUi[_0xc44a[10]][_0xc44a[106]]= function(_0x1365x48,_0x1365x3f,_0x1365x40,_0x1365x52,_0x1365x53,_0x1365x54){this[_0xc44a[443]]();this[_0xc44a[444]]=  new Dialog(this,_0x1365x48,_0x1365x3f,(mxClient[_0xc44a[445]])?_0x1365x40- 12:_0x1365x40,_0x1365x52,_0x1365x53,_0x1365x54)};EditorUi[_0xc44a[10]][_0xc44a[443]]= function(){if(this[_0xc44a[444]]!= null){this[_0xc44a[444]][_0xc44a[446]]();this[_0xc44a[444]]= null;this[_0xc44a[0]][_0xc44a[4]][_0xc44a[1]][_0xc44a[47]]()}};EditorUi[_0xc44a[10]][_0xc44a[447]]= function(_0x1365x55){if(!_0x1365x55&& this[_0xc44a[0]][_0xc44a[158]]!= null){this[_0xc44a[206]](this[_0xc44a[0]][_0xc44a[448]]())}else {this[_0xc44a[106]]( new SaveDialog(this)[_0xc44a[1]],300,100,true,true)}};EditorUi[_0xc44a[10]][_0xc44a[449]]= function(_0x1365x55){if(!_0x1365x55&& this[_0xc44a[0]][_0xc44a[158]]!= null){this[_0xc44a[312]](this[_0xc44a[0]][_0xc44a[448]]())}else {}};EditorUi[_0xc44a[10]][_0xc44a[450]]= function(_0x1365x56,_0x1365x57,_0x1365x58){var _0x1365x3=this[_0xc44a[0]][_0xc44a[4]];var _0x1365xb=_0x1365x3[_0xc44a[352]]();_0x1365x57= this[_0xc44a[451]]!= null?this[_0xc44a[451]]:_0x1365x57;_0x1365x3[_0xc44a[99]]()[_0xc44a[452]]();try{_0x1365x56[_0xc44a[453]](_0x1365x3[_0xc44a[310]](),_0x1365xb)}catch(e){throw e}finally{if(_0x1365x57&& navigator[_0xc44a[455]][_0xc44a[103]](_0xc44a[454])< 0){var _0x1365x59= new mxMorphing(_0x1365x3);_0x1365x59[_0xc44a[33]](mxEvent.DONE,mxUtils[_0xc44a[20]](this,function(){_0x1365x3[_0xc44a[99]]()[_0xc44a[456]]()}));_0x1365x59[_0xc44a[457]]()}else {_0x1365x3[_0xc44a[99]]()[_0xc44a[456]]()}}};EditorUi[_0xc44a[10]][_0xc44a[130]]= function(_0x1365x1){var _0x1365x3=this[_0xc44a[0]][_0xc44a[4]];var _0x1365xf= new mxKeyHandler(_0x1365x3);_0x1365xf[_0xc44a[458]]= function(_0x1365x6){return mxEvent[_0xc44a[458]](_0x1365x6)|| (mxClient[_0xc44a[459]]&& _0x1365x6[_0xc44a[460]])};function _0x1365x5a(_0x1365x5b){if(!_0x1365x3[_0xc44a[333]]()){var _0x1365x4a=0;var _0x1365x5c=0;if(_0x1365x5b== 37){_0x1365x4a=  -1}else {if(_0x1365x5b== 38){_0x1365x5c=  -1}else {if(_0x1365x5b== 39){_0x1365x4a= 1}else {if(_0x1365x5b== 40){_0x1365x5c= 1}}}};_0x1365x3[_0xc44a[461]](_0x1365x3[_0xc44a[334]](),_0x1365x4a,_0x1365x5c);_0x1365x3[_0xc44a[462]](_0x1365x3[_0xc44a[352]]())}}var _0x1365x5d=mxUtils[_0xc44a[20]](this,function(_0x1365x5e,_0x1365x5f,_0x1365x2f,_0x1365x60){var _0x1365x61=this[_0xc44a[12]][_0xc44a[145]](_0x1365x2f);if(_0x1365x61!= null){var _0x1365x21=function(){if(_0x1365x61[_0xc44a[463]]){_0x1365x61[_0xc44a[464]]()}};if(_0x1365x5f){if(_0x1365x60){_0x1365xf[_0xc44a[465]](_0x1365x5e,_0x1365x21)}else {_0x1365xf[_0xc44a[466]](_0x1365x5e,_0x1365x21)}}else {if(_0x1365x60){_0x1365xf[_0xc44a[467]](_0x1365x5e,_0x1365x21)}else {_0x1365xf[_0xc44a[468]](_0x1365x5e,_0x1365x21)}}}});var _0x1365x62=this;var _0x1365x63=_0x1365xf[_0xc44a[469]];_0x1365xf[_0xc44a[469]]= function(_0x1365x6){_0x1365x62[_0xc44a[443]]();_0x1365x63[_0xc44a[50]](this,arguments)};_0x1365xf[_0xc44a[470]]= function(){};_0x1365xf[_0xc44a[468]](8,function(){_0x1365x3[_0xc44a[471]](true)});_0x1365xf[_0xc44a[468]](13,function(){_0x1365x3[_0xc44a[471]](false)});_0x1365xf[_0xc44a[468]](33,function(){_0x1365x3[_0xc44a[375]]()});_0x1365xf[_0xc44a[468]](34,function(){_0x1365x3[_0xc44a[376]]()});_0x1365xf[_0xc44a[468]](36,function(){_0x1365x3[_0xc44a[374]]()});_0x1365xf[_0xc44a[468]](35,function(){_0x1365x3[_0xc44a[15]]()});_0x1365xf[_0xc44a[468]](37,function(){_0x1365x5a(37)});_0x1365xf[_0xc44a[468]](38,function(){_0x1365x5a(38)});_0x1365xf[_0xc44a[468]](39,function(){_0x1365x5a(39)});_0x1365xf[_0xc44a[468]](40,function(){_0x1365x5a(40)});_0x1365xf[_0xc44a[468]](113,function(){_0x1365x3[_0xc44a[104]]()});_0x1365x5d(46,false,_0xc44a[335]);_0x1365x5d(82,true,_0xc44a[345]);_0x1365x5d(83,true,_0xc44a[206]);_0x1365x5d(83,true,_0xc44a[218],true);_0x1365x5d(107,false,_0xc44a[472]);_0x1365x5d(109,false,_0xc44a[473]);_0x1365x5d(65,true,_0xc44a[474]);_0x1365x5d(86,true,_0xc44a[475],true);_0x1365x5d(69,true,_0xc44a[476],true);_0x1365x5d(69,true,_0xc44a[477]);_0x1365x5d(66,true,_0xc44a[341]);_0x1365x5d(70,true,_0xc44a[340]);_0x1365x5d(68,true,_0xc44a[336]);_0x1365x5d(90,true,_0xc44a[329]);_0x1365x5d(89,true,_0xc44a[330]);_0x1365x5d(88,true,_0xc44a[148]);_0x1365x5d(67,true,_0xc44a[149]);_0x1365x5d(81,true,_0xc44a[478]);_0x1365x5d(86,true,_0xc44a[144]);_0x1365x5d(71,true,_0xc44a[351]);_0x1365x5d(71,true,_0xc44a[479],true);_0x1365x5d(85,true,_0xc44a[353]);_0x1365x5d(112,false,_0xc44a[480]);_0x1365x5d(80,true,_0xc44a[312],true);return _0x1365xf};EditorUi[_0xc44a[10]][_0xc44a[56]]= function(_0x1365x3,_0x1365x38,_0x1365x64,_0x1365x65){for(var _0x1365x39=0;_0x1365x39< _0x1365x38[_0xc44a[176]];_0x1365x39++){_0x1365x3[_0xc44a[483]]( new mxMultiplicity(true,_0x1365x38[_0x1365x39],null,null,_0x1365x64[_0x1365x39][0],_0x1365x64[_0x1365x39][1],null,mxResources[_0xc44a[145]](_0x1365x38[_0x1365x39])+ mxResources[_0xc44a[145]](_0xc44a[481])+ _0x1365x64[_0x1365x39][0]+ mxResources[_0xc44a[145]](_0xc44a[482]),null));_0x1365x3[_0xc44a[483]]( new mxMultiplicity(false,_0x1365x38[_0x1365x39],null,null,_0x1365x65[_0x1365x39][0],_0x1365x65[_0x1365x39][1],null,mxResources[_0xc44a[145]](_0x1365x38[_0x1365x39])+ mxResources[_0xc44a[145]](_0xc44a[481])+ _0x1365x65[_0x1365x39][0]+ mxResources[_0xc44a[145]](_0xc44a[484]),null))}}
\ No newline at end of file
diff --git a/public/assets/plugins/square/js/Graph.js b/public/assets/plugins/square/js/Graph.js
index dda2a33..7353a93 100644
--- a/public/assets/plugins/square/js/Graph.js
+++ b/public/assets/plugins/square/js/Graph.js
@@ -1,644 +1 @@
-/**
- * $Id: Graph.js,v 1.14 2013-02-16 10:19:54 gaudenz Exp $
- * Copyright (c) 2006-2012, JGraph Ltd
- */
-/**
- * Constructs a new graph instance. Note that the constructor does not take a
- * container because the graph instance is needed for creating the UI, which
- * in turn will create the container for the graph. Hence, the container is
- * assigned later in EditorUi.
- */
-Graph = function(container, model, renderHint, stylesheet) {
-	mxGraph.call(this, container, model, renderHint, stylesheet);
-
-	this.setConnectable(true);
-	this.setDropEnabled(false);
-	this.setPanning(true);
-	this.setTooltips(!mxClient.IS_TOUCH);
-	this.setAllowLoops(false);
-	this.setMultigraph(false);
-	this.allowAutoPanning = true;
-	this.resetEdgesOnConnect = false;
-	this.constrainChildren = false;
-
-	// Centers the port icon on the target port
-	this.connectionHandler.targetConnectImage = true;
-
-	// Does not allow dangling edges
-	this.setAllowDanglingEdges(false);
-
-	// Enables cloning of connection sources
-	this.connectionHandler.setCreateTarget(false);
-
-	// Disables built-in connection starts
-	this.connectionHandler.isValidSource = function() {
-		return mxConnectionHandler.prototype.isValidSource.apply(this, arguments) && urlParams['connect'] != '2';
-	};
-
-	// Sets the style to be used when an elbow edge is double clicked
-	this.alternateEdgeStyle = 'vertical';
-
-	if (stylesheet == null) {
-		this.loadStylesheet();
-	}
-
-	// Creates rubberband selection
-	var rubberband = new mxRubberband(this);
-
-	this.getRubberband = function() {
-		return rubberband;
-	};
-
-	// Shows hand cursor while panning
-	this.panningHandler.addListener(mxEvent.PAN_START, mxUtils.bind(this, function() {
-		this.container.style.cursor = 'pointer';
-	}));
-
-	this.panningHandler.addListener(mxEvent.PAN_END, mxUtils.bind(this, function() {
-		this.container.style.cursor = 'default';
-	}));
-
-	// Adds support for HTML labels via style. Note: Currently, only the Java
-	// backend supports HTML labels but CSS support is limited to the following:
-	// http://docs.oracle.com/javase/6/docs/api/index.html?javax/swing/text/html/CSS.html
-	this.isHtmlLabel = function(cell) {
-		var state = this.view.getState(cell);
-		var style = (state != null) ? state.style : this.getCellStyle(cell);
-
-		return style['html'] == '1' || style['whiteSpace'] == 'wrap';
-	};
-
-	// HTML entities are displayed as plain text in wrapped plain text labels
-	this.cellRenderer.getLabelValue = function(state) {
-		var result = mxCellRenderer.prototype.getLabelValue.apply(this, arguments);
-
-		if (state.style['whiteSpace'] == 'wrap' && state.style['html'] != 1) {
-			result = mxUtils.htmlEntities(result, false);
-		}
-
-		return result;
-	};
-
-	// Unlocks all cells
-	this.isCellLocked = function(cell) {
-		return false;
-	};
-
-	// Tap and hold brings up context menu.
-	// Tolerance slightly below graph tolerance is better.
-	this.connectionHandler.tapAndHoldTolerance = 16;
-
-	//  Tap and hold on background starts rubberband on cell starts connecting
-	var connectionHandlerTapAndHold = this.connectionHandler.tapAndHold;
-	this.connectionHandler.tapAndHold = function(me, state) {
-		if (state == null) {
-			if (!this.graph.panningHandler.active) {
-				rubberband.start(me.getGraphX(), me.getGraphY());
-				this.graph.panningHandler.panningTrigger = false;
-			}
-		} else if (tapAndHoldStartsConnection) {
-			connectionHandlerTapAndHold.apply(this, arguments);
-		} else if (this.graph.isCellSelected(state.cell) && this.graph.getSelectionCount() > 1) {
-			this.graph.removeSelectionCell(state.cell);
-		}
-	};
-
-	if (touchStyle) {
-		this.initTouch();
-	}
-};
-
-// Graph inherits from mxGraph
-mxUtils.extend(Graph, mxGraph);
-
-/**
- * Allows to all values in fit.
- */
-Graph.prototype.minFitScale = null;
-
-/**
- * Allows to all values in fit.
- */
-Graph.prototype.maxFitScale = null;
-
-/**
- * Loads the stylesheet for this graph.
- */
-Graph.prototype.loadStylesheet = function() {
-	var node = mxUtils.load(STYLE_PATH + '/default.xml').getDocumentElement();
-	var dec = new mxCodec(node.ownerDocument);
-	dec.decode(node, this.getStylesheet());
-};
-
-/**
- * Inverts the elbow edge style without removing existing styles.
- */
-Graph.prototype.flipEdge = function(edge) {
-	if (edge != null) {
-		var state = this.view.getState(edge);
-		var style = (state != null) ? state.style : this.getCellStyle(edge);
-
-		if (style != null) {
-			var elbow = mxUtils.getValue(style, mxConstants.STYLE_ELBOW,
-				mxConstants.ELBOW_HORIZONTAL);
-			var value = (elbow == mxConstants.ELBOW_HORIZONTAL) ?
-				mxConstants.ELBOW_VERTICAL : mxConstants.ELBOW_HORIZONTAL;
-			this.setCellStyles(mxConstants.STYLE_ELBOW, value, [edge]);
-		}
-	}
-};
-
-/**
- * Sets the default edge for future connections.
- */
-Graph.prototype.setDefaultEdge = function(cell) {
-	if (cell != null && this.getModel().isEdge(cell)) {
-		// Take a snapshot of the cell at the moment of calling
-		var proto = this.getModel().cloneCells([cell])[0];
-
-		// Delete existing points
-		if (proto.geometry != null) {
-			proto.geometry.points = null;
-		}
-
-		// Delete entry-/exitXY styles
-		var style = proto.getStyle();
-		style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_X, null);
-		style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_Y, null);
-		style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_X, null);
-		style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_Y, null);
-		proto.setStyle(style);
-
-		// Uses edge template for connect preview
-		this.connectionHandler.createEdgeState = function(me) {
-			return this.graph.view.createState(proto);
-		};
-
-		// Creates new connections from edge template
-		this.connectionHandler.factoryMethod = function() {
-			return this.graph.cloneCells([proto])[0];
-		};
-	}
-};
-
-/**
- * Disables folding for non-swimlanes.
- */
-Graph.prototype.isCellFoldable = function(cell) {
-	return this.foldingEnabled && this.isSwimlane(cell);
-};
-
-/**
- * Disables drill-down for non-swimlanes.
- */
-Graph.prototype.isValidRoot = function(cell) {
-	return this.isSwimlane(cell);
-};
-
-/**
- * Overrides createGroupCell to set the group style for new groups to 'group'.
- */
-Graph.prototype.createGroupCell = function() {
-	var group = mxGraph.prototype.createGroupCell.apply(this, arguments);
-	group.setStyle('group');
-
-	return group;
-};
-
-/**
- * Giuseppe Careri
- * Overrides tooltips to show position and size
- */
-Graph.prototype.getTooltipForCell = function(cell) {
-	var tip = '';
-
-	if (this.getModel().isVertex(cell)) {
-		// var geo = this.getCellGeometry(cell);
-
-		// var f2 = function(x)
-		// {
-		// 	return Math.round(parseFloat(x) * 100) / 100;
-		// };
-
-		// if (geo != null)
-		// {
-		// 	if (tip == null)
-		// 	{
-		// 		tip = '';
-		// 	}
-		// 	else if (tip.length > 0)
-		// 	{
-		// 		tip += '\n';
-		// 	}
-
-		// 	tip += 'X: ' + f2(geo.x) + '\nY: ' + f2(geo.y) + '\nW: ' + f2(geo.width) + '\nH: ' + f2(geo.height);
-		// }
-
-		tip += mxResources.get('description_' + cell.value.nodeName) || '';
-	} else if (this.getModel().isEdge(cell)) {
-		tip = mxGraph.prototype.getTooltipForCell.apply(this, arguments);
-	}
-
-	return tip;
-};
-
-/**
- * Giuseppe Careri
- * Returns the label for the given cell.
- */
-Graph.prototype.convertValueToString = function(cell) {
-	if (cell.value != null && typeof(cell.value) == 'object') {
-		return cell.value.getAttribute('label');
-	}
-
-	return mxGraph.prototype.convertValueToString.apply(this, arguments);
-};
-
-/**
- * Giuseppe Careri
- * Handles label changes for XML user objects.
- */
-Graph.prototype.cellLabelChanged = function(cell, value, autoSize) {
-	if (cell.value != null && typeof(cell.value) == 'object') {
-		var tmp = cell.value.cloneNode(true);
-		tmp.setAttribute('label', value);
-		value = tmp;
-	}
-
-	mxGraph.prototype.cellLabelChanged.apply(this, arguments);
-};
-
-/**
- * Sets the link for the given cell.
- */
-Graph.prototype.setLinkForCell = function(cell, link) {
-	var value = null;
-
-	if (cell.value != null && typeof(cell.value) == 'object') {
-		value = cell.value.cloneNode(true);
-	} else {
-		var doc = mxUtils.createXmlDocument();
-
-		value = doc.createElement('UserObject');
-		value.setAttribute('label', cell.value);
-	}
-
-	if (link != null && link.length > 0) {
-		value.setAttribute('link', link);
-	} else {
-		value.removeAttribute('link');
-	}
-
-	this.model.setValue(cell, value);
-};
-
-/**
- * Returns the link for the given cell.
- */
-Graph.prototype.getLinkForCell = function(cell) {
-	if (cell.value != null && typeof(cell.value) == 'object') {
-		return cell.value.getAttribute('link');
-	}
-
-	return null;
-};
-
-/**
- * Customized graph for touch devices.
- */
-Graph.prototype.initTouch = function() {
-	// Disables new connections via "hotspot"
-	this.connectionHandler.marker.isEnabled = function() {
-		return this.graph.connectionHandler.first != null;
-	};
-
-	// Hides menu when editing starts
-	this.addListener(mxEvent.START_EDITING, function(sender, evt) {
-		this.panningHandler.hideMenu();
-	});
-
-	// Context menu for touchstyle
-	var showMenu = false;
-	var menuCell = null;
-
-	// Checks if native hit detection did not return anything and does custom
-	// hit detection for edges to take into account the tolerance
-	this.updateMouseEvent = function(me) {
-		mxGraph.prototype.updateMouseEvent.apply(this, arguments);
-
-		if (me.getState() == null) {
-			var cell = this.getCellAt(me.graphX, me.graphY);
-
-			if (this.getModel().isEdge(cell)) {
-				me.state = this.view.getState(cell);
-
-				if (me.state != null && me.state.shape != null) {
-					this.container.style.cursor = me.state.shape.node.style.cursor;
-				}
-			}
-		}
-
-		if (me.getState() == null) {
-			this.container.style.cursor = 'default';
-		}
-	};
-
-	// Handles popup menu on touch devices (tap selected cell)
-	this.fireMouseEvent = function(evtName, me, sender) {
-		if (evtName == mxEvent.MOUSE_DOWN) {
-			if (!this.panningHandler.isMenuShowing()) {
-				menuCell = me.getCell();
-				showMenu = (menuCell != null) ? this.isCellSelected(menuCell) : this.isSelectionEmpty();
-			} else {
-				showMenu = false;
-				menuCell = null;
-			}
-		} else if (evtName == mxEvent.MOUSE_UP) {
-			if (showMenu && !this.isEditing()) {
-				if (!this.panningHandler.isMenuShowing()) {
-					var x = mxEvent.getClientX(me.getEvent());
-					var y = mxEvent.getClientY(me.getEvent());
-
-					this.panningHandler.popup(x + 16, y, menuCell, me.getEvent());
-				}
-
-				showMenu = false;
-				menuCell = null;
-				me.consume();
-
-				return;
-			}
-
-			showMenu = false;
-			menuCell = null;
-		}
-
-		mxGraph.prototype.fireMouseEvent.apply(this, arguments);
-
-		if (evtName == mxEvent.MOUSE_MOVE && me.isConsumed()) {
-			showMenu = false;
-			menuCell = null;
-		}
-	};
-};
-
-/**
- * Implements touch devices.
- */
-(function() {
-	// Enables rotation handle
-	mxVertexHandler.prototype.rotationEnabled = true;
-
-	// Matches label positions of mxGraph 1.x
-	mxText.prototype.baseSpacingTop = 5;
-	mxText.prototype.baseSpacingBottom = 1;
-
-	// Touch-specific static overrides
-	if (touchStyle) {
-		// Sets constants for touch style
-		mxConstants.HANDLE_SIZE = 16;
-		mxConstants.LABEL_HANDLE_SIZE = 7;
-
-		// Larger tolerance and grid for real touch devices
-		if (mxClient.IS_TOUCH) {
-			mxVertexHandler.prototype.tolerance = 4;
-			mxEdgeHandler.prototype.tolerance = 6;
-			Graph.prototype.tolerance = 14;
-			Graph.prototype.gridSize = 20;
-
-			// One finger pans (no rubberband selection) must start regardless of mouse button
-			mxPanningHandler.prototype.selectOnPopup = false;
-			mxPanningHandler.prototype.useLeftButtonForPanning = true;
-			mxPanningHandler.prototype.isPanningTrigger = function(me) {
-				var evt = me.getEvent();
-
-				return (this.useLeftButtonForPanning && (this.ignoreCell || me.getState() == null)
-					/* &&
-								 			mxEvent.isLeftMouseButton(evt)*/
-				) || (mxEvent.isControlDown(evt) &&
-					mxEvent.isShiftDown(evt)) || (this.usePopupTrigger &&
-					mxEvent.isPopupTrigger(evt));
-			};
-		}
-
-		// Don't clear selection if multiple cells selected
-		var graphHandlerMouseDown = mxGraphHandler.prototype.mouseDown;
-		mxGraphHandler.prototype.mouseDown = function(sender, me) {
-			graphHandlerMouseDown.apply(this, arguments);
-
-			if (this.graph.isCellSelected(me.getCell()) && this.graph.getSelectionCount() > 1) {
-				this.delayedSelection = false;
-			}
-		};
-
-		// Changes order of panninghandler
-		Graph.prototype.createHandlers = function(container) {
-			this.tooltipHandler = new mxTooltipHandler(this);
-			this.tooltipHandler.setEnabled(false);
-			// Selection cells first
-			this.selectionCellsHandler = new mxSelectionCellsHandler(this);
-			this.panningHandler = new mxPanningHandler(this);
-			this.panningHandler.panningEnabled = false;
-			this.connectionHandler = new mxConnectionHandler(this);
-			this.connectionHandler.setEnabled(false);
-			this.graphHandler = new mxGraphHandler(this);
-		};
-
-		// On connect the target is selected and we clone the cell of the preview edge for insert
-		mxConnectionHandler.prototype.selectCells = function(edge, target) {
-			if (touchStyle && target != null) {
-				this.graph.setSelectionCell(target);
-			} else {
-				this.graph.setSelectionCell(edge);
-			}
-		};
-
-		// Overrides double click handling to use the tolerance
-		// FIXME: Double click on edges in iPad needs focus on textarea
-		var graphDblClick = mxGraph.prototype.dblClick;
-		Graph.prototype.dblClick = function(evt, cell) {
-			if (cell == null) {
-				var pt = mxUtils.convertPoint(this.container,
-					mxEvent.getClientX(evt), mxEvent.getClientY(evt));
-				cell = this.getCellAt(pt.x, pt.y);
-			}
-
-			graphDblClick.call(this, evt, cell);
-		};
-
-		// Rounded edge and vertex handles
-		var touchHandle = new mxImage(IMAGE_PATH + '/touch-handle.png', 16, 16);
-		mxVertexHandler.prototype.handleImage = touchHandle;
-		mxEdgeHandler.prototype.handleImage = touchHandle;
-		mxOutline.prototype.sizerImage = touchHandle;
-
-		// Pre-fetches touch handle
-		new Image().src = touchHandle.src;
-
-		// Adds connect icon to selected vertices
-		var connectorSrc = IMAGE_PATH + '/touch-connector.png';
-
-		var vertexHandlerInit = mxVertexHandler.prototype.init;
-		mxVertexHandler.prototype.init = function() {
-			vertexHandlerInit.apply(this, arguments);
-
-			// Only show connector image on one cell and do not show on containers
-			if (showConnectorImg && this.graph.connectionHandler.isEnabled() &&
-				this.graph.isCellConnectable(this.state.cell) &&
-				!this.graph.isValidRoot(this.state.cell) &&
-				this.graph.getSelectionCount() == 1) {
-				this.connectorImg = mxUtils.createImage(connectorSrc);
-				this.connectorImg.style.cursor = 'pointer';
-				this.connectorImg.style.width = '29px';
-				this.connectorImg.style.height = '29px';
-				this.connectorImg.style.position = 'absolute';
-
-				if (!mxClient.IS_TOUCH) {
-					this.connectorImg.setAttribute('title', mxResources.get('connect'));
-					mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state);
-				}
-
-				// Adds 2px tolerance
-				this.connectorImg.style.padding = '2px';
-
-				// Starts connecting on touch/mouse down
-				mxEvent.addGestureListeners(this.connectorImg,
-					mxUtils.bind(this, function(evt) {
-						this.graph.panningHandler.hideMenu();
-						var pt = mxUtils.convertPoint(this.graph.container,
-							mxEvent.getClientX(evt), mxEvent.getClientY(evt));
-						this.graph.connectionHandler.start(this.state, pt.x, pt.y);
-						this.graph.isMouseDown = true;
-						mxEvent.consume(evt);
-					})
-				);
-
-				this.graph.container.appendChild(this.connectorImg);
-			}
-
-			this.redrawTools();
-		};
-
-		var vertexHandlerRedraw = mxVertexHandler.prototype.redraw;
-		mxVertexHandler.prototype.redraw = function() {
-			vertexHandlerRedraw.apply(this);
-			this.redrawTools();
-		};
-
-		mxVertexHandler.prototype.redrawTools = function() {
-			if (this.state != null && this.connectorImg != null) {
-				// Top right for single-sizer
-				if (mxVertexHandler.prototype.singleSizer) {
-					this.connectorImg.style.left = (this.state.x + this.state.width - this.connectorImg.offsetWidth / 2) + 'px';
-					this.connectorImg.style.top = (this.state.y - this.connectorImg.offsetHeight / 2) + 'px';
-				} else {
-					this.connectorImg.style.left = (this.state.x + this.state.width + mxConstants.HANDLE_SIZE / 2 + 4 /* - 2 padding*/ ) + 'px';
-					this.connectorImg.style.top = (this.state.y + (this.state.height - this.connectorImg.offsetHeight) / 2) + 'px';
-				}
-			}
-		};
-
-		var vertexHandlerDestroy = mxVertexHandler.prototype.destroy;
-		mxVertexHandler.prototype.destroy = function(sender, me) {
-			vertexHandlerDestroy.apply(this, arguments);
-
-			if (this.connectorImg != null) {
-				this.connectorImg.parentNode.removeChild(this.connectorImg);
-				this.connectorImg = null;
-			}
-		};
-
-		// Pre-fetches touch connector
-		new Image().src = connectorSrc;
-	} else {
-		var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15);
-		mxConnectionHandler.prototype.connectImage = img;
-
-		// Pre-fetches img
-		new Image().src = img.src;
-
-		if (urlParams['connect'] == '2') // not touchStyle
-		{
-			var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15);
-
-			var vertexHandlerInit = mxVertexHandler.prototype.init;
-			mxVertexHandler.prototype.init = function() {
-				vertexHandlerInit.apply(this, arguments);
-
-				// Only show connector image on one cell and do not show on containers
-				if (showConnectorImg && this.graph.connectionHandler.isEnabled() &&
-					this.graph.isCellConnectable(this.state.cell) &&
-					!this.graph.isValidRoot(this.state.cell) &&
-					this.graph.getSelectionCount() == 1) {
-					// Workaround for event redirection via image tag in quirks and IE8
-					if (mxClient.IS_IE && !mxClient.IS_SVG) {
-						this.connectorImg = document.createElement('div');
-						this.connectorImg.style.backgroundImage = 'url(' + img.src + ')';
-						this.connectorImg.style.backgroundPosition = 'center';
-						this.connectorImg.style.backgroundRepeat = 'no-repeat';
-						this.connectorImg.style.width = (img.width + 4) + 'px';
-						this.connectorImg.style.height = (img.height + 4) + 'px';
-						this.connectorImg.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
-					} else {
-						this.connectorImg = mxUtils.createImage(img.src);
-						this.connectorImg.style.width = img.width + 'px';
-						this.connectorImg.style.height = img.height + 'px';
-					}
-
-					this.connectorImg.style.cursor = 'pointer';
-					this.connectorImg.style.position = 'absolute';
-					this.connectorImg.setAttribute('title', mxResources.get('connect'));
-					mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state);
-
-					// Adds 2px tolerance
-					this.connectorImg.style.padding = '2px';
-
-					// Starts connecting on touch/mouse down
-					mxEvent.addListener(this.connectorImg, 'mousedown',
-						mxUtils.bind(this, function(evt) {
-							this.graph.panningHandler.hideMenu();
-							var pt = mxUtils.convertPoint(this.graph.container,
-								mxEvent.getClientX(evt), mxEvent.getClientY(evt));
-							this.graph.connectionHandler.start(this.state, pt.x, pt.y);
-							this.graph.isMouseDown = true;
-							mxEvent.consume(evt);
-						})
-					);
-
-					this.graph.container.appendChild(this.connectorImg);
-				}
-
-				this.redrawTools();
-			};
-
-			var vertexHandlerRedraw = mxVertexHandler.prototype.redraw;
-			mxVertexHandler.prototype.redraw = function() {
-				vertexHandlerRedraw.apply(this);
-				this.redrawTools();
-			};
-
-			mxVertexHandler.prototype.redrawTools = function() {
-				if (this.state != null && this.connectorImg != null) {
-					// Top right for single-sizer
-					if (mxVertexHandler.prototype.singleSizer) {
-						this.connectorImg.style.left = (this.state.x + this.state.width - this.connectorImg.offsetWidth / 2) + 'px';
-						this.connectorImg.style.top = (this.state.y - this.connectorImg.offsetHeight / 2) + 'px';
-					} else {
-						this.connectorImg.style.left = (this.state.x + this.state.width + mxConstants.HANDLE_SIZE / 2 + 2 /* - 2 padding*/ ) + 'px';
-						this.connectorImg.style.top = (this.state.y + (this.state.height - this.connectorImg.offsetHeight) / 2) + 'px';
-					}
-				}
-			};
-
-			var vertexHandlerDestroy = mxVertexHandler.prototype.destroy;
-			mxVertexHandler.prototype.destroy = function(sender, me) {
-				vertexHandlerDestroy.apply(this, arguments);
-
-				if (this.connectorImg != null) {
-					this.connectorImg.parentNode.removeChild(this.connectorImg);
-					this.connectorImg = null;
-				}
-			};
-		}
-	}
-})();
+var _0xfd16=["\x63\x61\x6C\x6C","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x73\x65\x74\x44\x72\x6F\x70\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x50\x61\x6E\x6E\x69\x6E\x67","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x4C\x6F\x6F\x70\x73","\x73\x65\x74\x4D\x75\x6C\x74\x69\x67\x72\x61\x70\x68","\x61\x6C\x6C\x6F\x77\x41\x75\x74\x6F\x50\x61\x6E\x6E\x69\x6E\x67","\x72\x65\x73\x65\x74\x45\x64\x67\x65\x73\x4F\x6E\x43\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64\x72\x65\x6E","\x74\x61\x72\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x44\x61\x6E\x67\x6C\x69\x6E\x67\x45\x64\x67\x65\x73","\x73\x65\x74\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x69\x73\x56\x61\x6C\x69\x64\x53\x6F\x75\x72\x63\x65","\x61\x70\x70\x6C\x79","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x6E\x65\x63\x74","\x32","\x61\x6C\x74\x65\x72\x6E\x61\x74\x65\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x76\x65\x72\x74\x69\x63\x61\x6C","\x6C\x6F\x61\x64\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x67\x65\x74\x52\x75\x62\x62\x65\x72\x62\x61\x6E\x64","\x63\x75\x72\x73\x6F\x72","\x73\x74\x79\x6C\x65","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x70\x6F\x69\x6E\x74\x65\x72","\x62\x69\x6E\x64","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x64\x65\x66\x61\x75\x6C\x74","\x69\x73\x48\x74\x6D\x6C\x4C\x61\x62\x65\x6C","\x67\x65\x74\x53\x74\x61\x74\x65","\x76\x69\x65\x77","\x67\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x68\x74\x6D\x6C","\x31","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x77\x72\x61\x70","\x67\x65\x74\x4C\x61\x62\x65\x6C\x56\x61\x6C\x75\x65","\x63\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72","\x68\x74\x6D\x6C\x45\x6E\x74\x69\x74\x69\x65\x73","\x69\x73\x43\x65\x6C\x6C\x4C\x6F\x63\x6B\x65\x64","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64","\x61\x63\x74\x69\x76\x65","\x67\x72\x61\x70\x68","\x67\x65\x74\x47\x72\x61\x70\x68\x58","\x67\x65\x74\x47\x72\x61\x70\x68\x59","\x73\x74\x61\x72\x74","\x70\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x63\x65\x6C\x6C","\x69\x73\x43\x65\x6C\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x72\x65\x6D\x6F\x76\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x69\x6E\x69\x74\x54\x6F\x75\x63\x68","\x65\x78\x74\x65\x6E\x64","\x6D\x69\x6E\x46\x69\x74\x53\x63\x61\x6C\x65","\x6D\x61\x78\x46\x69\x74\x53\x63\x61\x6C\x65","\x67\x65\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x2F\x64\x65\x66\x61\x75\x6C\x74\x2E\x78\x6D\x6C","\x6C\x6F\x61\x64","\x6F\x77\x6E\x65\x72\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x67\x65\x74\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x64\x65\x63\x6F\x64\x65","\x66\x6C\x69\x70\x45\x64\x67\x65","\x67\x65\x74\x56\x61\x6C\x75\x65","\x45\x4C\x42\x4F\x57\x5F\x48\x4F\x52\x49\x5A\x4F\x4E\x54\x41\x4C","\x45\x4C\x42\x4F\x57\x5F\x56\x45\x52\x54\x49\x43\x41\x4C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x69\x73\x45\x64\x67\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x63\x6C\x6F\x6E\x65\x43\x65\x6C\x6C\x73","\x67\x65\x6F\x6D\x65\x74\x72\x79","\x70\x6F\x69\x6E\x74\x73","\x67\x65\x74\x53\x74\x79\x6C\x65","\x73\x65\x74\x53\x74\x79\x6C\x65","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x53\x74\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x65","\x66\x61\x63\x74\x6F\x72\x79\x4D\x65\x74\x68\x6F\x64","\x69\x73\x43\x65\x6C\x6C\x46\x6F\x6C\x64\x61\x62\x6C\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x63\x72\x65\x61\x74\x65\x47\x72\x6F\x75\x70\x43\x65\x6C\x6C","\x67\x72\x6F\x75\x70","\x67\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x46\x6F\x72\x43\x65\x6C\x6C","","\x69\x73\x56\x65\x72\x74\x65\x78","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x5F","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x67\x65\x74","\x63\x6F\x6E\x76\x65\x72\x74\x56\x61\x6C\x75\x65\x54\x6F\x53\x74\x72\x69\x6E\x67","\x6F\x62\x6A\x65\x63\x74","\x6C\x61\x62\x65\x6C","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x65\x6C\x6C\x4C\x61\x62\x65\x6C\x43\x68\x61\x6E\x67\x65\x64","\x63\x6C\x6F\x6E\x65\x4E\x6F\x64\x65","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x73\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x55\x73\x65\x72\x4F\x62\x6A\x65\x63\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6E\x6B","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x73\x65\x74\x56\x61\x6C\x75\x65","\x6D\x6F\x64\x65\x6C","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x6D\x61\x72\x6B\x65\x72","\x66\x69\x72\x73\x74","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x75\x70\x64\x61\x74\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x67\x72\x61\x70\x68\x58","\x67\x72\x61\x70\x68\x59","\x67\x65\x74\x43\x65\x6C\x6C\x41\x74","\x73\x74\x61\x74\x65","\x73\x68\x61\x70\x65","\x6E\x6F\x64\x65","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x4D\x4F\x55\x53\x45\x5F\x44\x4F\x57\x4E","\x69\x73\x4D\x65\x6E\x75\x53\x68\x6F\x77\x69\x6E\x67","\x67\x65\x74\x43\x65\x6C\x6C","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x4D\x4F\x55\x53\x45\x5F\x55\x50","\x69\x73\x45\x64\x69\x74\x69\x6E\x67","\x67\x65\x74\x45\x76\x65\x6E\x74","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x70\x6F\x70\x75\x70","\x63\x6F\x6E\x73\x75\x6D\x65","\x4D\x4F\x55\x53\x45\x5F\x4D\x4F\x56\x45","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x45\x6E\x61\x62\x6C\x65\x64","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x54\x6F\x70","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x42\x6F\x74\x74\x6F\x6D","\x48\x41\x4E\x44\x4C\x45\x5F\x53\x49\x5A\x45","\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x53\x49\x5A\x45","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x74\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x67\x72\x69\x64\x53\x69\x7A\x65","\x73\x65\x6C\x65\x63\x74\x4F\x6E\x50\x6F\x70\x75\x70","\x75\x73\x65\x4C\x65\x66\x74\x42\x75\x74\x74\x6F\x6E\x46\x6F\x72\x50\x61\x6E\x6E\x69\x6E\x67","\x69\x73\x50\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x69\x67\x6E\x6F\x72\x65\x43\x65\x6C\x6C","\x69\x73\x43\x6F\x6E\x74\x72\x6F\x6C\x44\x6F\x77\x6E","\x69\x73\x53\x68\x69\x66\x74\x44\x6F\x77\x6E","\x75\x73\x65\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x69\x73\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x6D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x64\x65\x6C\x61\x79\x65\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x63\x6F\x6E\x76\x65\x72\x74\x50\x6F\x69\x6E\x74","\x78","\x79","\x2F\x74\x6F\x75\x63\x68\x2D\x68\x61\x6E\x64\x6C\x65\x2E\x70\x6E\x67","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x67\x65","\x73\x69\x7A\x65\x72\x49\x6D\x61\x67\x65","\x73\x72\x63","\x2F\x74\x6F\x75\x63\x68\x2D\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72\x2E\x70\x6E\x67","\x69\x6E\x69\x74","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72\x49\x6D\x67","\x63\x72\x65\x61\x74\x65\x49\x6D\x61\x67\x65","\x77\x69\x64\x74\x68","\x32\x39\x70\x78","\x68\x65\x69\x67\x68\x74","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x74\x69\x74\x6C\x65","\x72\x65\x64\x69\x72\x65\x63\x74\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74\x73","\x70\x61\x64\x64\x69\x6E\x67","\x32\x70\x78","\x69\x73\x4D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x72\x65\x64\x72\x61\x77\x54\x6F\x6F\x6C\x73","\x72\x65\x64\x72\x61\x77","\x73\x69\x6E\x67\x6C\x65\x53\x69\x7A\x65\x72","\x6C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x57\x69\x64\x74\x68","\x70\x78","\x74\x6F\x70","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x2F\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72\x2E\x70\x6E\x67","\x63\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x49\x53\x5F\x49\x45","\x49\x53\x5F\x53\x56\x47","\x64\x69\x76","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x65\x6E\x74\x65\x72","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x70\x65\x61\x74","\x6E\x6F\x2D\x72\x65\x70\x65\x61\x74","\x64\x69\x73\x70\x6C\x61\x79","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x69\x6E\x6C\x69\x6E\x65","\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E"];Graph= function(_0x14b7x1,_0x14b7x2,_0x14b7x3,_0x14b7x4){mxGraph[_0xfd16[0]](this,_0x14b7x1,_0x14b7x2,_0x14b7x3,_0x14b7x4);this[_0xfd16[1]](true);this[_0xfd16[2]](false);this[_0xfd16[3]](true);this[_0xfd16[4]](!mxClient.IS_TOUCH);this[_0xfd16[5]](false);this[_0xfd16[6]](false);this[_0xfd16[7]]= true;this[_0xfd16[8]]= false;this[_0xfd16[9]]= false;this[_0xfd16[11]][_0xfd16[10]]= true;this[_0xfd16[12]](false);this[_0xfd16[11]][_0xfd16[13]](false);this[_0xfd16[11]][_0xfd16[14]]= function(){return mxConnectionHandler[_0xfd16[16]][_0xfd16[14]][_0xfd16[15]](this,arguments)&& urlParams[_0xfd16[17]]!= _0xfd16[18]};this[_0xfd16[19]]= _0xfd16[20];if(_0x14b7x4== null){this[_0xfd16[21]]()};var _0x14b7x5= new mxRubberband(this);this[_0xfd16[22]]= function(){return _0x14b7x5};this[_0xfd16[29]][_0xfd16[28]](mxEvent.PAN_START,mxUtils[_0xfd16[27]](this,function(){this[_0xfd16[25]][_0xfd16[24]][_0xfd16[23]]= _0xfd16[26]}));this[_0xfd16[29]][_0xfd16[28]](mxEvent.PAN_END,mxUtils[_0xfd16[27]](this,function(){this[_0xfd16[25]][_0xfd16[24]][_0xfd16[23]]= _0xfd16[30]}));this[_0xfd16[31]]= function(_0x14b7x6){var _0x14b7x7=this[_0xfd16[33]][_0xfd16[32]](_0x14b7x6);var _0x14b7x8=(_0x14b7x7!= null)?_0x14b7x7[_0xfd16[24]]:this[_0xfd16[34]](_0x14b7x6);return _0x14b7x8[_0xfd16[35]]== _0xfd16[36]|| _0x14b7x8[_0xfd16[37]]== _0xfd16[38]};this[_0xfd16[40]][_0xfd16[39]]= function(_0x14b7x7){var _0x14b7x9=mxCellRenderer[_0xfd16[16]][_0xfd16[39]][_0xfd16[15]](this,arguments);if(_0x14b7x7[_0xfd16[24]][_0xfd16[37]]== _0xfd16[38]&& _0x14b7x7[_0xfd16[24]][_0xfd16[35]]!= 1){_0x14b7x9= mxUtils[_0xfd16[41]](_0x14b7x9,false)};return _0x14b7x9};this[_0xfd16[42]]= function(_0x14b7x6){return false};this[_0xfd16[11]][_0xfd16[43]]= 16;var _0x14b7xa=this[_0xfd16[11]][_0xfd16[44]];this[_0xfd16[11]][_0xfd16[44]]= function(_0x14b7xb,_0x14b7x7){if(_0x14b7x7== null){if(!this[_0xfd16[46]][_0xfd16[29]][_0xfd16[45]]){_0x14b7x5[_0xfd16[49]](_0x14b7xb[_0xfd16[47]](),_0x14b7xb[_0xfd16[48]]());this[_0xfd16[46]][_0xfd16[29]][_0xfd16[50]]= false}}else {if(tapAndHoldStartsConnection){_0x14b7xa[_0xfd16[15]](this,arguments)}else {if(this[_0xfd16[46]][_0xfd16[52]](_0x14b7x7[_0xfd16[51]])&& this[_0xfd16[46]][_0xfd16[53]]()> 1){this[_0xfd16[46]][_0xfd16[54]](_0x14b7x7[_0xfd16[51]])}}}};if(touchStyle){this[_0xfd16[55]]()}};mxUtils[_0xfd16[56]](Graph,mxGraph);Graph[_0xfd16[16]][_0xfd16[57]]= null;Graph[_0xfd16[16]][_0xfd16[58]]= null;Graph[_0xfd16[16]][_0xfd16[21]]= function(){var _0x14b7xc=mxUtils[_0xfd16[61]](STYLE_PATH+ _0xfd16[60])[_0xfd16[59]]();var _0x14b7xd= new mxCodec(_0x14b7xc[_0xfd16[62]]);_0x14b7xd[_0xfd16[64]](_0x14b7xc,this[_0xfd16[63]]())};Graph[_0xfd16[16]][_0xfd16[65]]= function(_0x14b7xe){if(_0x14b7xe!= null){var _0x14b7x7=this[_0xfd16[33]][_0xfd16[32]](_0x14b7xe);var _0x14b7x8=(_0x14b7x7!= null)?_0x14b7x7[_0xfd16[24]]:this[_0xfd16[34]](_0x14b7xe);if(_0x14b7x8!= null){var _0x14b7xf=mxUtils[_0xfd16[66]](_0x14b7x8,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL);var _0x14b7x10=(_0x14b7xf== mxConstants[_0xfd16[67]])?mxConstants[_0xfd16[68]]:mxConstants[_0xfd16[67]];this[_0xfd16[69]](mxConstants.STYLE_ELBOW,_0x14b7x10,[_0x14b7xe])}}};Graph[_0xfd16[16]][_0xfd16[70]]= function(_0x14b7x6){if(_0x14b7x6!= null&& this[_0xfd16[72]]()[_0xfd16[71]](_0x14b7x6)){var _0x14b7x11=this[_0xfd16[72]]()[_0xfd16[73]]([_0x14b7x6])[0];if(_0x14b7x11[_0xfd16[74]]!= null){_0x14b7x11[_0xfd16[74]][_0xfd16[75]]= null};var _0x14b7x8=_0x14b7x11[_0xfd16[76]]();_0x14b7x8= mxUtils[_0xfd16[77]](_0x14b7x8,mxConstants.STYLE_ENTRY_X,null);_0x14b7x8= mxUtils[_0xfd16[77]](_0x14b7x8,mxConstants.STYLE_ENTRY_Y,null);_0x14b7x8= mxUtils[_0xfd16[77]](_0x14b7x8,mxConstants.STYLE_EXIT_X,null);_0x14b7x8= mxUtils[_0xfd16[77]](_0x14b7x8,mxConstants.STYLE_EXIT_Y,null);_0x14b7x11[_0xfd16[77]](_0x14b7x8);this[_0xfd16[11]][_0xfd16[78]]= function(_0x14b7xb){return this[_0xfd16[46]][_0xfd16[33]][_0xfd16[79]](_0x14b7x11)};this[_0xfd16[11]][_0xfd16[80]]= function(){return this[_0xfd16[46]][_0xfd16[73]]([_0x14b7x11])[0]}}};Graph[_0xfd16[16]][_0xfd16[81]]= function(_0x14b7x6){return this[_0xfd16[82]]&& this[_0xfd16[83]](_0x14b7x6)};Graph[_0xfd16[16]][_0xfd16[84]]= function(_0x14b7x6){return this[_0xfd16[83]](_0x14b7x6)};Graph[_0xfd16[16]][_0xfd16[85]]= function(){var _0x14b7x12=mxGraph[_0xfd16[16]][_0xfd16[85]][_0xfd16[15]](this,arguments);_0x14b7x12[_0xfd16[77]](_0xfd16[86]);return _0x14b7x12};Graph[_0xfd16[16]][_0xfd16[87]]= function(_0x14b7x6){var _0x14b7x13=_0xfd16[88];if(this[_0xfd16[72]]()[_0xfd16[89]](_0x14b7x6)){_0x14b7x13+= mxResources[_0xfd16[93]](_0xfd16[90]+ _0x14b7x6[_0xfd16[92]][_0xfd16[91]])|| _0xfd16[88]}else {if(this[_0xfd16[72]]()[_0xfd16[71]](_0x14b7x6)){_0x14b7x13= mxGraph[_0xfd16[16]][_0xfd16[87]][_0xfd16[15]](this,arguments)}};return _0x14b7x13};Graph[_0xfd16[16]][_0xfd16[94]]= function(_0x14b7x6){if(_0x14b7x6[_0xfd16[92]]!= null&&  typeof (_0x14b7x6[_0xfd16[92]])== _0xfd16[95]){return _0x14b7x6[_0xfd16[92]][_0xfd16[97]](_0xfd16[96])};return mxGraph[_0xfd16[16]][_0xfd16[94]][_0xfd16[15]](this,arguments)};Graph[_0xfd16[16]][_0xfd16[98]]= function(_0x14b7x6,_0x14b7x10,_0x14b7x14){if(_0x14b7x6[_0xfd16[92]]!= null&&  typeof (_0x14b7x6[_0xfd16[92]])== _0xfd16[95]){var _0x14b7x15=_0x14b7x6[_0xfd16[92]][_0xfd16[99]](true);_0x14b7x15[_0xfd16[100]](_0xfd16[96],_0x14b7x10);_0x14b7x10= _0x14b7x15};mxGraph[_0xfd16[16]][_0xfd16[98]][_0xfd16[15]](this,arguments)};Graph[_0xfd16[16]][_0xfd16[101]]= function(_0x14b7x6,_0x14b7x16){var _0x14b7x10=null;if(_0x14b7x6[_0xfd16[92]]!= null&&  typeof (_0x14b7x6[_0xfd16[92]])== _0xfd16[95]){_0x14b7x10= _0x14b7x6[_0xfd16[92]][_0xfd16[99]](true)}else {var _0x14b7x17=mxUtils[_0xfd16[102]]();_0x14b7x10= _0x14b7x17[_0xfd16[104]](_0xfd16[103]);_0x14b7x10[_0xfd16[100]](_0xfd16[96],_0x14b7x6[_0xfd16[92]])};if(_0x14b7x16!= null&& _0x14b7x16[_0xfd16[105]]> 0){_0x14b7x10[_0xfd16[100]](_0xfd16[106],_0x14b7x16)}else {_0x14b7x10[_0xfd16[107]](_0xfd16[106])};this[_0xfd16[109]][_0xfd16[108]](_0x14b7x6,_0x14b7x10)};Graph[_0xfd16[16]][_0xfd16[110]]= function(_0x14b7x6){if(_0x14b7x6[_0xfd16[92]]!= null&&  typeof (_0x14b7x6[_0xfd16[92]])== _0xfd16[95]){return _0x14b7x6[_0xfd16[92]][_0xfd16[97]](_0xfd16[106])};return null};Graph[_0xfd16[16]][_0xfd16[55]]= function(){this[_0xfd16[11]][_0xfd16[112]][_0xfd16[111]]= function(){return this[_0xfd16[46]][_0xfd16[11]][_0xfd16[113]]!= null};this[_0xfd16[28]](mxEvent.START_EDITING,function(_0x14b7x18,_0x14b7x19){this[_0xfd16[29]][_0xfd16[114]]()});var _0x14b7x1a=false;var _0x14b7x1b=null;this[_0xfd16[115]]= function(_0x14b7xb){mxGraph[_0xfd16[16]][_0xfd16[115]][_0xfd16[15]](this,arguments);if(_0x14b7xb[_0xfd16[32]]()== null){var _0x14b7x6=this[_0xfd16[118]](_0x14b7xb[_0xfd16[116]],_0x14b7xb[_0xfd16[117]]);if(this[_0xfd16[72]]()[_0xfd16[71]](_0x14b7x6)){_0x14b7xb[_0xfd16[119]]= this[_0xfd16[33]][_0xfd16[32]](_0x14b7x6);if(_0x14b7xb[_0xfd16[119]]!= null&& _0x14b7xb[_0xfd16[119]][_0xfd16[120]]!= null){this[_0xfd16[25]][_0xfd16[24]][_0xfd16[23]]= _0x14b7xb[_0xfd16[119]][_0xfd16[120]][_0xfd16[121]][_0xfd16[24]][_0xfd16[23]]}}};if(_0x14b7xb[_0xfd16[32]]()== null){this[_0xfd16[25]][_0xfd16[24]][_0xfd16[23]]= _0xfd16[30]}};this[_0xfd16[122]]= function(_0x14b7x1c,_0x14b7xb,_0x14b7x18){if(_0x14b7x1c== mxEvent[_0xfd16[123]]){if(!this[_0xfd16[29]][_0xfd16[124]]()){_0x14b7x1b= _0x14b7xb[_0xfd16[125]]();_0x14b7x1a= (_0x14b7x1b!= null)?this[_0xfd16[52]](_0x14b7x1b):this[_0xfd16[126]]()}else {_0x14b7x1a= false;_0x14b7x1b= null}}else {if(_0x14b7x1c== mxEvent[_0xfd16[127]]){if(_0x14b7x1a&& !this[_0xfd16[128]]()){if(!this[_0xfd16[29]][_0xfd16[124]]()){var _0x14b7x1d=mxEvent[_0xfd16[130]](_0x14b7xb[_0xfd16[129]]());var _0x14b7x1e=mxEvent[_0xfd16[131]](_0x14b7xb[_0xfd16[129]]());this[_0xfd16[29]][_0xfd16[132]](_0x14b7x1d+ 16,_0x14b7x1e,_0x14b7x1b,_0x14b7xb[_0xfd16[129]]())};_0x14b7x1a= false;_0x14b7x1b= null;_0x14b7xb[_0xfd16[133]]();return};_0x14b7x1a= false;_0x14b7x1b= null}};mxGraph[_0xfd16[16]][_0xfd16[122]][_0xfd16[15]](this,arguments);if(_0x14b7x1c== mxEvent[_0xfd16[134]]&& _0x14b7xb[_0xfd16[135]]()){_0x14b7x1a= false;_0x14b7x1b= null}}};(function(){mxVertexHandler[_0xfd16[16]][_0xfd16[136]]= true;mxText[_0xfd16[16]][_0xfd16[137]]= 5;mxText[_0xfd16[16]][_0xfd16[138]]= 1;if(touchStyle){mxConstants[_0xfd16[139]]= 16;mxConstants[_0xfd16[140]]= 7;if(mxClient[_0xfd16[141]]){mxVertexHandler[_0xfd16[16]][_0xfd16[142]]= 4;mxEdgeHandler[_0xfd16[16]][_0xfd16[142]]= 6;Graph[_0xfd16[16]][_0xfd16[142]]= 14;Graph[_0xfd16[16]][_0xfd16[143]]= 20;mxPanningHandler[_0xfd16[16]][_0xfd16[144]]= false;mxPanningHandler[_0xfd16[16]][_0xfd16[145]]= true;mxPanningHandler[_0xfd16[16]][_0xfd16[146]]= function(_0x14b7xb){var _0x14b7x19=_0x14b7xb[_0xfd16[129]]();return (this[_0xfd16[145]]&& (this[_0xfd16[147]]|| _0x14b7xb[_0xfd16[32]]()== null))|| (mxEvent[_0xfd16[148]](_0x14b7x19)&& mxEvent[_0xfd16[149]](_0x14b7x19))|| (this[_0xfd16[150]]&& mxEvent[_0xfd16[151]](_0x14b7x19))}};var _0x14b7x1f=mxGraphHandler[_0xfd16[16]][_0xfd16[152]];mxGraphHandler[_0xfd16[16]][_0xfd16[152]]= function(_0x14b7x18,_0x14b7xb){_0x14b7x1f[_0xfd16[15]](this,arguments);if(this[_0xfd16[46]][_0xfd16[52]](_0x14b7xb[_0xfd16[125]]())&& this[_0xfd16[46]][_0xfd16[53]]()> 1){this[_0xfd16[153]]= false}};Graph[_0xfd16[16]][_0xfd16[154]]= function(_0x14b7x1){this[_0xfd16[155]]=  new mxTooltipHandler(this);this[_0xfd16[155]][_0xfd16[156]](false);this[_0xfd16[157]]=  new mxSelectionCellsHandler(this);this[_0xfd16[29]]=  new mxPanningHandler(this);this[_0xfd16[29]][_0xfd16[158]]= false;this[_0xfd16[11]]=  new mxConnectionHandler(this);this[_0xfd16[11]][_0xfd16[156]](false);this[_0xfd16[159]]=  new mxGraphHandler(this)};mxConnectionHandler[_0xfd16[16]][_0xfd16[160]]= function(_0x14b7xe,_0x14b7x20){if(touchStyle&& _0x14b7x20!= null){this[_0xfd16[46]][_0xfd16[161]](_0x14b7x20)}else {this[_0xfd16[46]][_0xfd16[161]](_0x14b7xe)}};var _0x14b7x21=mxGraph[_0xfd16[16]][_0xfd16[162]];Graph[_0xfd16[16]][_0xfd16[162]]= function(_0x14b7x19,_0x14b7x6){if(_0x14b7x6== null){var _0x14b7x22=mxUtils[_0xfd16[163]](this[_0xfd16[25]],mxEvent[_0xfd16[130]](_0x14b7x19),mxEvent[_0xfd16[131]](_0x14b7x19));_0x14b7x6= this[_0xfd16[118]](_0x14b7x22[_0xfd16[164]],_0x14b7x22[_0xfd16[165]])};_0x14b7x21[_0xfd16[0]](this,_0x14b7x19,_0x14b7x6)};var _0x14b7x23= new mxImage(IMAGE_PATH+ _0xfd16[166],16,16);mxVertexHandler[_0xfd16[16]][_0xfd16[167]]= _0x14b7x23;mxEdgeHandler[_0xfd16[16]][_0xfd16[167]]= _0x14b7x23;mxOutline[_0xfd16[16]][_0xfd16[168]]= _0x14b7x23; new Image()[_0xfd16[169]]= _0x14b7x23[_0xfd16[169]];var _0x14b7x24=IMAGE_PATH+ _0xfd16[170];var _0x14b7x25=mxVertexHandler[_0xfd16[16]][_0xfd16[171]];mxVertexHandler[_0xfd16[16]][_0xfd16[171]]= function(){_0x14b7x25[_0xfd16[15]](this,arguments);if(showConnectorImg&& this[_0xfd16[46]][_0xfd16[11]][_0xfd16[111]]()&& this[_0xfd16[46]][_0xfd16[172]](this[_0xfd16[119]][_0xfd16[51]])&& !this[_0xfd16[46]][_0xfd16[84]](this[_0xfd16[119]][_0xfd16[51]])&& this[_0xfd16[46]][_0xfd16[53]]()== 1){this[_0xfd16[173]]= mxUtils[_0xfd16[174]](_0x14b7x24);this[_0xfd16[173]][_0xfd16[24]][_0xfd16[23]]= _0xfd16[26];this[_0xfd16[173]][_0xfd16[24]][_0xfd16[175]]= _0xfd16[176];this[_0xfd16[173]][_0xfd16[24]][_0xfd16[177]]= _0xfd16[176];this[_0xfd16[173]][_0xfd16[24]][_0xfd16[178]]= _0xfd16[179];if(!mxClient[_0xfd16[141]]){this[_0xfd16[173]][_0xfd16[100]](_0xfd16[180],mxResources[_0xfd16[93]](_0xfd16[17]));mxEvent[_0xfd16[181]](this[_0xfd16[173]],this[_0xfd16[46]],this[_0xfd16[119]])};this[_0xfd16[173]][_0xfd16[24]][_0xfd16[182]]= _0xfd16[183];mxEvent[_0xfd16[185]](this[_0xfd16[173]],mxUtils[_0xfd16[27]](this,function(_0x14b7x19){this[_0xfd16[46]][_0xfd16[29]][_0xfd16[114]]();var _0x14b7x22=mxUtils[_0xfd16[163]](this[_0xfd16[46]][_0xfd16[25]],mxEvent[_0xfd16[130]](_0x14b7x19),mxEvent[_0xfd16[131]](_0x14b7x19));this[_0xfd16[46]][_0xfd16[11]][_0xfd16[49]](this[_0xfd16[119]],_0x14b7x22[_0xfd16[164]],_0x14b7x22[_0xfd16[165]]);this[_0xfd16[46]][_0xfd16[184]]= true;mxEvent[_0xfd16[133]](_0x14b7x19)}));this[_0xfd16[46]][_0xfd16[25]][_0xfd16[186]](this[_0xfd16[173]])};this[_0xfd16[187]]()};var _0x14b7x26=mxVertexHandler[_0xfd16[16]][_0xfd16[188]];mxVertexHandler[_0xfd16[16]][_0xfd16[188]]= function(){_0x14b7x26[_0xfd16[15]](this);this[_0xfd16[187]]()};mxVertexHandler[_0xfd16[16]][_0xfd16[187]]= function(){if(this[_0xfd16[119]]!= null&& this[_0xfd16[173]]!= null){if(mxVertexHandler[_0xfd16[16]][_0xfd16[189]]){this[_0xfd16[173]][_0xfd16[24]][_0xfd16[190]]= (this[_0xfd16[119]][_0xfd16[164]]+ this[_0xfd16[119]][_0xfd16[175]]- this[_0xfd16[173]][_0xfd16[191]]/ 2)+ _0xfd16[192];this[_0xfd16[173]][_0xfd16[24]][_0xfd16[193]]= (this[_0xfd16[119]][_0xfd16[165]]- this[_0xfd16[173]][_0xfd16[194]]/ 2)+ _0xfd16[192]}else {this[_0xfd16[173]][_0xfd16[24]][_0xfd16[190]]= (this[_0xfd16[119]][_0xfd16[164]]+ this[_0xfd16[119]][_0xfd16[175]]+ mxConstants[_0xfd16[139]]/ 2+ 4)+ _0xfd16[192];this[_0xfd16[173]][_0xfd16[24]][_0xfd16[193]]= (this[_0xfd16[119]][_0xfd16[165]]+ (this[_0xfd16[119]][_0xfd16[177]]- this[_0xfd16[173]][_0xfd16[194]])/ 2)+ _0xfd16[192]}}};var _0x14b7x27=mxVertexHandler[_0xfd16[16]][_0xfd16[195]];mxVertexHandler[_0xfd16[16]][_0xfd16[195]]= function(_0x14b7x18,_0x14b7xb){_0x14b7x27[_0xfd16[15]](this,arguments);if(this[_0xfd16[173]]!= null){this[_0xfd16[173]][_0xfd16[197]][_0xfd16[196]](this[_0xfd16[173]]);this[_0xfd16[173]]= null}}; new Image()[_0xfd16[169]]= _0x14b7x24}else {var _0x14b7x28= new mxImage(IMAGE_PATH+ _0xfd16[198],15,15);mxConnectionHandler[_0xfd16[16]][_0xfd16[199]]= _0x14b7x28; new Image()[_0xfd16[169]]= _0x14b7x28[_0xfd16[169]];if(urlParams[_0xfd16[17]]== _0xfd16[18]){var _0x14b7x28= new mxImage(IMAGE_PATH+ _0xfd16[198],15,15);var _0x14b7x25=mxVertexHandler[_0xfd16[16]][_0xfd16[171]];mxVertexHandler[_0xfd16[16]][_0xfd16[171]]= function(){_0x14b7x25[_0xfd16[15]](this,arguments);if(showConnectorImg&& this[_0xfd16[46]][_0xfd16[11]][_0xfd16[111]]()&& this[_0xfd16[46]][_0xfd16[172]](this[_0xfd16[119]][_0xfd16[51]])&& !this[_0xfd16[46]][_0xfd16[84]](this[_0xfd16[119]][_0xfd16[51]])&& this[_0xfd16[46]][_0xfd16[53]]()== 1){if(mxClient[_0xfd16[200]]&& !mxClient[_0xfd16[201]]){this[_0xfd16[173]]= document[_0xfd16[104]](_0xfd16[202]);this[_0xfd16[173]][_0xfd16[24]][_0xfd16[203]]= _0xfd16[204]+ _0x14b7x28[_0xfd16[169]]+ _0xfd16[205];this[_0xfd16[173]][_0xfd16[24]][_0xfd16[206]]= _0xfd16[207];this[_0xfd16[173]][_0xfd16[24]][_0xfd16[208]]= _0xfd16[209];this[_0xfd16[173]][_0xfd16[24]][_0xfd16[175]]= (_0x14b7x28[_0xfd16[175]]+ 4)+ _0xfd16[192];this[_0xfd16[173]][_0xfd16[24]][_0xfd16[177]]= (_0x14b7x28[_0xfd16[177]]+ 4)+ _0xfd16[192];this[_0xfd16[173]][_0xfd16[24]][_0xfd16[210]]= (mxClient[_0xfd16[211]])?_0xfd16[212]:_0xfd16[213]}else {this[_0xfd16[173]]= mxUtils[_0xfd16[174]](_0x14b7x28[_0xfd16[169]]);this[_0xfd16[173]][_0xfd16[24]][_0xfd16[175]]= _0x14b7x28[_0xfd16[175]]+ _0xfd16[192];this[_0xfd16[173]][_0xfd16[24]][_0xfd16[177]]= _0x14b7x28[_0xfd16[177]]+ _0xfd16[192]};this[_0xfd16[173]][_0xfd16[24]][_0xfd16[23]]= _0xfd16[26];this[_0xfd16[173]][_0xfd16[24]][_0xfd16[178]]= _0xfd16[179];this[_0xfd16[173]][_0xfd16[100]](_0xfd16[180],mxResources[_0xfd16[93]](_0xfd16[17]));mxEvent[_0xfd16[181]](this[_0xfd16[173]],this[_0xfd16[46]],this[_0xfd16[119]]);this[_0xfd16[173]][_0xfd16[24]][_0xfd16[182]]= _0xfd16[183];mxEvent[_0xfd16[28]](this[_0xfd16[173]],_0xfd16[214],mxUtils[_0xfd16[27]](this,function(_0x14b7x19){this[_0xfd16[46]][_0xfd16[29]][_0xfd16[114]]();var _0x14b7x22=mxUtils[_0xfd16[163]](this[_0xfd16[46]][_0xfd16[25]],mxEvent[_0xfd16[130]](_0x14b7x19),mxEvent[_0xfd16[131]](_0x14b7x19));this[_0xfd16[46]][_0xfd16[11]][_0xfd16[49]](this[_0xfd16[119]],_0x14b7x22[_0xfd16[164]],_0x14b7x22[_0xfd16[165]]);this[_0xfd16[46]][_0xfd16[184]]= true;mxEvent[_0xfd16[133]](_0x14b7x19)}));this[_0xfd16[46]][_0xfd16[25]][_0xfd16[186]](this[_0xfd16[173]])};this[_0xfd16[187]]()};var _0x14b7x26=mxVertexHandler[_0xfd16[16]][_0xfd16[188]];mxVertexHandler[_0xfd16[16]][_0xfd16[188]]= function(){_0x14b7x26[_0xfd16[15]](this);this[_0xfd16[187]]()};mxVertexHandler[_0xfd16[16]][_0xfd16[187]]= function(){if(this[_0xfd16[119]]!= null&& this[_0xfd16[173]]!= null){if(mxVertexHandler[_0xfd16[16]][_0xfd16[189]]){this[_0xfd16[173]][_0xfd16[24]][_0xfd16[190]]= (this[_0xfd16[119]][_0xfd16[164]]+ this[_0xfd16[119]][_0xfd16[175]]- this[_0xfd16[173]][_0xfd16[191]]/ 2)+ _0xfd16[192];this[_0xfd16[173]][_0xfd16[24]][_0xfd16[193]]= (this[_0xfd16[119]][_0xfd16[165]]- this[_0xfd16[173]][_0xfd16[194]]/ 2)+ _0xfd16[192]}else {this[_0xfd16[173]][_0xfd16[24]][_0xfd16[190]]= (this[_0xfd16[119]][_0xfd16[164]]+ this[_0xfd16[119]][_0xfd16[175]]+ mxConstants[_0xfd16[139]]/ 2+ 2)+ _0xfd16[192];this[_0xfd16[173]][_0xfd16[24]][_0xfd16[193]]= (this[_0xfd16[119]][_0xfd16[165]]+ (this[_0xfd16[119]][_0xfd16[177]]- this[_0xfd16[173]][_0xfd16[194]])/ 2)+ _0xfd16[192]}}};var _0x14b7x27=mxVertexHandler[_0xfd16[16]][_0xfd16[195]];mxVertexHandler[_0xfd16[16]][_0xfd16[195]]= function(_0x14b7x18,_0x14b7xb){_0x14b7x27[_0xfd16[15]](this,arguments);if(this[_0xfd16[173]]!= null){this[_0xfd16[173]][_0xfd16[197]][_0xfd16[196]](this[_0xfd16[173]]);this[_0xfd16[173]]= null}}}}})()
\ No newline at end of file
diff --git a/public/assets/plugins/square/js/Menus.js b/public/assets/plugins/square/js/Menus.js
index f6563c8..f676b80 100644
--- a/public/assets/plugins/square/js/Menus.js
+++ b/public/assets/plugins/square/js/Menus.js
@@ -1,716 +1 @@
-/**
- * $Id: Menus.js,v 1.13 2013-02-20 16:21:29 gaudenz Exp $
- * Copyright (c) 2006-2012, JGraph Ltd
- */
-/**
- * Constructs a new graph editor
- */
-Menus = function(editorUi) {
-	this.editorUi = editorUi;
-	this.menus = new Object();
-	this.init();
-
-	// Pre-fetches checkmark image
-	new Image().src = IMAGE_PATH + '/checkmark.gif';
-};
-
-/**
- * Adds the label menu items to the given menu and parent.
- */
-Menus.prototype.init = function() {
-	var graph = this.editorUi.editor.graph;
-
-	this.put('fontFamily', new Menu(mxUtils.bind(this, function(menu, parent) {
-		var fonts = ['Helvetica', 'Verdana', 'Times New Roman', 'Garamond',
-			'Comic Sans MS',
-			'Courier New', 'Georgia', 'Lucida Console', 'Tahoma'
-		];
-
-		for (var i = 0; i < fonts.length; i++) {
-			var tr = this.styleChange(menu, fonts[i], [mxConstants.STYLE_FONTFAMILY], [
-				fonts[i]
-			], null, parent);
-			tr.firstChild.nextSibling.style.fontFamily = fonts[i];
-		}
-
-		menu.addSeparator(parent);
-		this.promptChange(menu, mxResources.get('custom'), '', mxConstants.DEFAULT_FONTFAMILY,
-			mxConstants.STYLE_FONTFAMILY, parent);
-	})));
-	this.put('fontSize', new Menu(mxUtils.bind(this, function(menu, parent) {
-		var sizes = [6, 8, 9, 10, 11, 12, 14, 18, 24, 36, 48, 72];
-
-		for (var i = 0; i < sizes.length; i++) {
-			this.styleChange(menu, sizes[i], [mxConstants.STYLE_FONTSIZE], [sizes[i]],
-				null, parent);
-		}
-
-		menu.addSeparator(parent);
-		this.promptChange(menu, mxResources.get('custom'), '(pt)', '12',
-			mxConstants.STYLE_FONTSIZE, parent);
-	})));
-	this.put('linewidth', new Menu(mxUtils.bind(this, function(menu, parent) {
-		var sizes = [1, 2, 3, 4, 8, 12, 16, 24];
-
-		for (var i = 0; i < sizes.length; i++) {
-			this.styleChange(menu, sizes[i] + 'px', [mxConstants.STYLE_STROKEWIDTH], [
-				sizes[i]
-			], null, parent);
-		}
-
-		menu.addSeparator(parent);
-		this.promptChange(menu, mxResources.get('custom'), '(px)', '1',
-			mxConstants.STYLE_STROKEWIDTH, parent);
-	})));
-	this.put('line', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.styleChange(menu, mxResources.get('straight'), [mxConstants.STYLE_EDGE], [
-			null
-		], null, parent);
-		this.styleChange(menu, mxResources.get('entityRelation'), [mxConstants.STYLE_EDGE], [
-			'entityRelationEdgeStyle'
-		], null, parent);
-		menu.addSeparator(parent);
-		this.styleChange(menu, mxResources.get('horizontal'), [mxConstants.STYLE_EDGE,
-			mxConstants.STYLE_ELBOW
-		], ['elbowEdgeStyle', 'horizontal'], null, parent);
-		this.styleChange(menu, mxResources.get('vertical'), [mxConstants.STYLE_EDGE,
-			mxConstants.STYLE_ELBOW
-		], ['elbowEdgeStyle', 'vertical'], null, parent);
-		menu.addSeparator(parent);
-		this.styleChange(menu, mxResources.get('manual'), [mxConstants.STYLE_EDGE], [
-			'segmentEdgeStyle'
-		], null, parent);
-		this.styleChange(menu, mxResources.get('automatic'), [mxConstants.STYLE_EDGE], [
-			'orthogonalEdgeStyle'
-		], null, parent);
-	})));
-	this.put('lineend', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_ENDARROW], [
-			mxConstants.ARROW_CLASSIC
-		], null, parent);
-		this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_ENDARROW], [
-			mxConstants.ARROW_OPEN
-		], null, parent);
-		this.styleChange(menu, mxResources.get('block'), [mxConstants.STYLE_ENDARROW], [
-			mxConstants.ARROW_BLOCK
-		], null, parent);
-		menu.addSeparator(parent);
-		this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_ENDARROW], [
-			mxConstants.ARROW_OVAL
-		], null, parent);
-		this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_ENDARROW], [
-			mxConstants.ARROW_DIAMOND
-		], null, parent);
-		this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_ENDARROW], [
-			mxConstants.ARROW_DIAMOND_THIN
-		], null, parent);
-		menu.addSeparator(parent);
-		this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_ENDARROW], [
-			mxConstants.NONE
-		], null, parent);
-		menu.addSeparator(parent);
-		menu.addItem(mxResources.get('transparent'), null, function() {
-			graph.toggleCellStyles('endFill', true);
-		}, parent, null, true);
-		menu.addSeparator(parent);
-		this.promptChange(menu, mxResources.get('size'), '(px)', mxConstants.DEFAULT_MARKERSIZE,
-			mxConstants.STYLE_ENDSIZE, parent);
-	})));
-	this.put('linestart', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_STARTARROW], [
-			mxConstants.ARROW_CLASSIC
-		], null, parent);
-		this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_STARTARROW], [
-			mxConstants.ARROW_OPEN
-		], null, parent);
-		this.styleChange(menu, mxResources.get('block'), [mxConstants.STYLE_STARTARROW], [
-			mxConstants.ARROW_BLOCK
-		], null, parent);
-		menu.addSeparator(parent);
-		this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_STARTARROW], [
-			mxConstants.ARROW_OVAL
-		], null, parent);
-		this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_STARTARROW], [
-			mxConstants.ARROW_DIAMOND
-		], null, parent);
-		this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_STARTARROW], [
-			mxConstants.ARROW_DIAMOND_THIN
-		], null, parent);
-		menu.addSeparator(parent);
-		this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_STARTARROW], [
-			mxConstants.NONE
-		], null, parent);
-		menu.addSeparator(parent);
-		menu.addItem(mxResources.get('transparent'), null, function() {
-			graph.toggleCellStyles('startFill', true);
-		}, parent, null, true);
-		menu.addSeparator(parent);
-		this.promptChange(menu, mxResources.get('size'), '(px)', mxConstants.DEFAULT_MARKERSIZE,
-			mxConstants.STYLE_STARTSIZE, parent);
-	})));
-	this.put('spacing', new Menu(mxUtils.bind(this, function(menu, parent) {
-		// Uses shadow action and line menu to analyze selection
-		var vertexSelected = this.editorUi.actions.get('shadow').enabled;
-		var edgeSelected = this.get('line').enabled;
-
-		if (vertexSelected || menu.showDisabled) {
-			this.promptChange(menu, mxResources.get('top'), '(px)', '0',
-				mxConstants.STYLE_SPACING_TOP, parent, vertexSelected);
-			this.promptChange(menu, mxResources.get('right'), '(px)', '0',
-				mxConstants.STYLE_SPACING_RIGHT, parent, vertexSelected);
-			this.promptChange(menu, mxResources.get('bottom'), '(px)', '0',
-				mxConstants.STYLE_SPACING_BOTTOM, parent, vertexSelected);
-			this.promptChange(menu, mxResources.get('left'), '(px)', '0',
-				mxConstants.STYLE_SPACING_LEFT, parent, vertexSelected);
-			menu.addSeparator(parent);
-			this.promptChange(menu, mxResources.get('global'), '(px)', '0',
-				mxConstants.STYLE_SPACING, parent, vertexSelected);
-			this.promptChange(menu, mxResources.get('perimeter'), '(px)', '0',
-				mxConstants.STYLE_PERIMETER_SPACING, parent, vertexSelected);
-		}
-
-		if (edgeSelected || menu.showDisabled) {
-			menu.addSeparator(parent);
-			this.promptChange(menu, mxResources.get('sourceSpacing'), '(px)', '0',
-				mxConstants.STYLE_SOURCE_PERIMETER_SPACING, parent, edgeSelected);
-			this.promptChange(menu, mxResources.get('targetSpacing'), '(px)', '0',
-				mxConstants.STYLE_TARGET_PERIMETER_SPACING, parent, edgeSelected);
-		}
-	})));
-	this.put('format', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.addMenuItem(menu, 'style', parent);
-	})));
-	this.put('text', new Menu(mxUtils.bind(this, function(menu, parent) {
-		var enabled = this.get('text').enabled;
-		menu.addSeparator(parent);
-		this.addSubmenu('fontFamily', menu, parent);
-		this.addSubmenu('fontSize', menu, parent);
-		this.addMenuItems(menu, ['-', 'bold', 'italic', 'underline', '-'],
-			parent);
-		this.addSubmenu('alignment', menu, parent);
-		this.addMenuItem(menu, 'wordWrap', parent);
-		menu.addSeparator(parent);
-		this.promptChange(menu, mxResources.get('textOpacity'), '(%)', '100',
-			mxConstants.STYLE_TEXT_OPACITY, parent, enabled);
-		menu.addItem(mxResources.get('hide'), null, function() {
-			graph.toggleCellStyles(mxConstants.STYLE_NOLABEL, false);
-		}, parent, null, enabled);
-	})));
-	this.put('alignment', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.styleChange(menu, mxResources.get('leftAlign'), [mxConstants.STYLE_ALIGN], [
-			mxConstants.ALIGN_LEFT
-		], null, parent);
-		this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_ALIGN], [
-			mxConstants.ALIGN_CENTER
-		], null, parent);
-		this.styleChange(menu, mxResources.get('rightAlign'), [mxConstants.STYLE_ALIGN], [
-			mxConstants.ALIGN_RIGHT
-		], null, parent);
-		menu.addSeparator(parent);
-		this.styleChange(menu, mxResources.get('topAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [
-			mxConstants.ALIGN_TOP
-		], null, parent);
-		this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_ALIGN], [
-			mxConstants.ALIGN_MIDDLE
-		], null, parent);
-		this.styleChange(menu, mxResources.get('bottomAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [
-			mxConstants.ALIGN_BOTTOM
-		], null, parent);
-		menu.addSeparator(parent);
-		this.addSubmenu('position', menu, parent);
-		this.addSubmenu('spacing', menu, parent);
-		menu.addSeparator(parent);
-		var enabled = this.get('text').enabled;
-		menu.addItem(mxResources.get('vertical'), null, function() {
-			graph.toggleCellStyles(mxConstants.STYLE_HORIZONTAL, true);
-		}, parent, null, enabled);
-	})));
-	this.put('position', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.styleChange(menu, mxResources.get('left'), [mxConstants.STYLE_LABEL_POSITION,
-			mxConstants.STYLE_ALIGN
-		], [mxConstants.ALIGN_LEFT, mxConstants.ALIGN_RIGHT], null, parent);
-		this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_LABEL_POSITION,
-			mxConstants.STYLE_ALIGN
-		], [mxConstants.ALIGN_CENTER, mxConstants.ALIGN_CENTER], null, parent);
-		this.styleChange(menu, mxResources.get('right'), [mxConstants.STYLE_LABEL_POSITION,
-			mxConstants.STYLE_ALIGN
-		], [mxConstants.ALIGN_RIGHT, mxConstants.ALIGN_LEFT], null, parent);
-		menu.addSeparator(parent);
-		this.styleChange(menu, mxResources.get('top'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION,
-			mxConstants.STYLE_VERTICAL_ALIGN
-		], [mxConstants.ALIGN_TOP, mxConstants.ALIGN_BOTTOM], null, parent);
-		this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION,
-			mxConstants.STYLE_VERTICAL_ALIGN
-		], [mxConstants.ALIGN_MIDDLE, mxConstants.ALIGN_MIDDLE], null, parent);
-		this.styleChange(menu, mxResources.get('bottom'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION,
-			mxConstants.STYLE_VERTICAL_ALIGN
-		], [mxConstants.ALIGN_BOTTOM, mxConstants.ALIGN_TOP], null, parent);
-	})));
-	this.put('direction', new Menu(mxUtils.bind(this, function(menu, parent) {
-		menu.addItem(mxResources.get('flipH'), null, function() {
-			graph.toggleCellStyles(mxConstants.STYLE_FLIPH, false);
-		}, parent);
-		menu.addItem(mxResources.get('flipV'), null, function() {
-			graph.toggleCellStyles(mxConstants.STYLE_FLIPV, false);
-		}, parent);
-		this.addMenuItems(menu, ['-', 'tilt', 'rotation'], parent);
-	})));
-	this.put('align', new Menu(mxUtils.bind(this, function(menu, parent) {
-		menu.addItem(mxResources.get('leftAlign'), null, function() {
-			graph.alignCells(mxConstants.ALIGN_LEFT);
-		}, parent);
-		menu.addItem(mxResources.get('center'), null, function() {
-			graph.alignCells(mxConstants.ALIGN_CENTER);
-		}, parent);
-		menu.addItem(mxResources.get('rightAlign'), null, function() {
-			graph.alignCells(mxConstants.ALIGN_RIGHT);
-		}, parent);
-		menu.addSeparator(parent);
-		menu.addItem(mxResources.get('topAlign'), null, function() {
-			graph.alignCells(mxConstants.ALIGN_TOP);
-		}, parent);
-		menu.addItem(mxResources.get('middle'), null, function() {
-			graph.alignCells(mxConstants.ALIGN_MIDDLE);
-		}, parent);
-		menu.addItem(mxResources.get('bottomAlign'), null, function() {
-			graph.alignCells(mxConstants.ALIGN_BOTTOM);
-		}, parent);
-	})));
-	this.put('layout', new Menu(mxUtils.bind(this, function(menu, parent) {
-		// menu.addItem(mxResources.get('horizontalTree'), null, mxUtils.bind(this, function()
-		// {
-		// 	if (!graph.isSelectionEmpty())
-		// 	{
-		// 		var layout = new mxCompactTreeLayout(graph, true);
-		// 		layout.edgeRouting = false;
-		// 		layout.levelDistance = 30;
-		//    		this.editorUi.executeLayout(layout, true, true);
-		// 	}
-		// }), parent);
-		// menu.addItem(mxResources.get('verticalTree'), null, mxUtils.bind(this, function()
-		// {
-		// 	if (!graph.isSelectionEmpty())
-		// 	{
-		// 		var layout = new mxCompactTreeLayout(graph, false);
-		// 		layout.edgeRouting = false;
-		// 		layout.levelDistance = 30;
-		//    		this.editorUi.executeLayout(layout, true, true);
-		// 	}
-		// }), parent);
-		// menu.addSeparator(parent);
-		menu.addItem(mxResources.get('horizontalFlow'), null, mxUtils.bind(this,
-			function() {
-				var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_WEST);
-				this.editorUi.executeLayout(layout, true, true);
-			}), parent);
-		menu.addItem(mxResources.get('verticalFlow'), null, mxUtils.bind(this,
-			function() {
-				var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_NORTH);
-				this.editorUi.executeLayout(layout, true, true);
-			}), parent);
-		//menu.addSeparator(parent);
-		// menu.addItem(mxResources.get('organic'), null, mxUtils.bind(this, function()
-		// {
-		// 	var layout = new mxFastOrganicLayout(graph);
-		//   		this.editorUi.executeLayout(layout, true, true);
-		// }), parent);
-		// menu.addItem(mxResources.get('circle'), null, mxUtils.bind(this, function()
-		// {
-		// 	var layout = new mxCircleLayout(graph);
-		//   		this.editorUi.executeLayout(layout, true, true, graph.getSelectionCells());
-		// }), parent);
-	})));
-	this.put('navigation', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.addMenuItems(menu, ['home', '-', 'exitGroup', 'enterGroup', '-',
-			'expand', 'collapse'
-		], parent);
-	})));
-	this.put('arrange', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.addMenuItems(menu, ['toFront', 'toBack', '-'], parent);
-		//this.addSubmenu('direction', menu, parent);
-		this.addSubmenu('layout', menu, parent);
-		//this.addSubmenu('align', menu, parent);
-		menu.addSeparator(parent);
-		//this.addSubmenu('navigation', menu, parent);
-		this.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup'],
-			parent);
-		//this.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup', '-', 'autosize'], parent);
-	})));
-	this.put('view', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.addMenuItems(menu, ['actualSize'], parent);
-		menu.addSeparator();
-		var scales = [0.25, 0.5, 0.75, 1, 2, 4];
-
-		for (var i = 0; i < scales.length; i++) {
-			(function(scale) {
-				menu.addItem((scale * 100) + '%', null, function() {
-					graph.zoomTo(scale);
-				}, parent);
-			})(scales[i]);
-		}
-
-		this.addMenuItems(menu, ['-', 'zoomIn', 'zoomOut', '-', 'fitWindow',
-			'customZoom', '-', 'fitPage', 'fitPageWidth'
-		], parent);
-	})));
-	this.put('file', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.addMenuItems(menu, ['new', 'open', '-', 'save', 'saveAs', 'publish',
-			'-', 'variable', '-', 'import', 'export', '-', 'editFile', 'description', '-',
-			'print'
-		], parent);
-	})));
-	this.put('edit', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.addMenuItems(menu, ['undo', 'redo', '-', 'cut', 'copy', 'paste',
-			'delete', '-', 'duplicate', '-',
-			'selectVertices', 'selectEdges', 'selectAll'
-		]);
-	})));
-	this.put('help', new Menu(mxUtils.bind(this, function(menu, parent) {
-		this.addMenuItems(menu, ['help', '-', 'about']);
-	})));
-};
-
-/**
- * Adds the label menu items to the given menu and parent.
- */
-Menus.prototype.put = function(name, menu) {
-	this.menus[name] = menu;
-};
-
-/**
- * Adds the label menu items to the given menu and parent.
- */
-Menus.prototype.get = function(name) {
-	return this.menus[name];
-};
-
-/**
- * Adds the given submenu.
- */
-Menus.prototype.addSubmenu = function(name, menu, parent) {
-	var enabled = this.get(name).enabled;
-
-	if (menu.showDisabled || enabled) {
-		var submenu = menu.addItem(mxResources.get(name), null, null, parent, null,
-			enabled);
-		this.addMenu(name, menu, submenu);
-	}
-};
-
-/**
- * Adds the label menu items to the given menu and parent.
- */
-Menus.prototype.addMenu = function(name, popupMenu, parent) {
-	var menu = this.get(name);
-
-	if (menu != null && (popupMenu.showDisabled || menu.enabled)) {
-		this.get(name).execute(popupMenu, parent);
-	}
-};
-
-/**
- * Adds a style change item to the given menu.
- */
-Menus.prototype.styleChange = function(menu, label, keys, values, sprite,
-	parent) {
-	return menu.addItem(label, null, mxUtils.bind(this, function() {
-		var graph = this.editorUi.editor.graph;
-
-		graph.getModel().beginUpdate();
-		try {
-			for (var i = 0; i < keys.length; i++) {
-				graph.setCellStyles(keys[i], values[i]);
-			}
-		} finally {
-			graph.getModel().endUpdate();
-		}
-	}), parent, sprite);
-};
-
-/**
- * Adds a style change item with a prompt to the given menu.
- */
-Menus.prototype.promptChange = function(menu, label, hint, defaultValue, key,
-	parent, enabled) {
-	return menu.addItem(label, null, mxUtils.bind(this, function() {
-		var graph = this.editorUi.editor.graph;
-		var value = defaultValue;
-		var state = graph.getView().getState(graph.getSelectionCell());
-
-		if (state != null) {
-			value = state.style[key] || value;
-		}
-
-		value = mxUtils.prompt(mxResources.get('enterValue') + ((hint.length > 0) ?
-			(' ' + hint) : ''), value);
-
-		if (value != null && value.length > 0) {
-			graph.setCellStyles(key, value);
-		}
-	}), parent, null, enabled);
-};
-
-/**
- * Creates the keyboard event handler for the current graph and history.
- */
-Menus.prototype.addMenuItem = function(menu, key, parent) {
-	var action = this.editorUi.actions.get(key);
-
-	if (action != null && (menu.showDisabled || action.enabled)) {
-		var item = menu.addItem(action.label, null, action.funct, parent, null,
-			action.enabled);
-
-		// Adds checkmark image
-		if (action.toggleAction && action.isSelected()) {
-			this.addCheckmark(item);
-		}
-
-		this.addShortcut(item, action);
-
-		return item;
-	}
-
-	return null;
-};
-
-/**
- * Adds a checkmark to the given menuitem.
- */
-Menus.prototype.addShortcut = function(item, action) {
-	if (action.shortcut != null) {
-		var td = item.firstChild.nextSibling.nextSibling;
-		var span = document.createElement('span');
-		span.style.color = 'gray';
-		mxUtils.write(span, action.shortcut);
-		td.appendChild(span);
-	}
-};
-
-/**
- * Adds a checkmark to the given menuitem.
- */
-Menus.prototype.addCheckmark = function(item) {
-	var td = item.firstChild.nextSibling;
-	td.style.backgroundImage = 'url(' + IMAGE_PATH + '/checkmark.gif)';
-	td.style.backgroundRepeat = 'no-repeat';
-	td.style.backgroundPosition = '2px 50%';
-};
-
-/**
- * Creates the keyboard event handler for the current graph and history.
- */
-Menus.prototype.addMenuItems = function(menu, keys, parent) {
-	for (var i = 0; i < keys.length; i++) {
-		if (keys[i] == '-') {
-			menu.addSeparator(parent);
-		} else {
-			this.addMenuItem(menu, keys[i], parent);
-		}
-	}
-};
-
-/**
- * Creates the keyboard event handler for the current graph and history.
- */
-Menus.prototype.createPopupMenu = function(menu, cell, evt) {
-	var graph = this.editorUi.editor.graph;
-	menu.smartSeparators = true;
-
-	if (graph.isSelectionEmpty()) {
-		this.addMenuItems(menu, ['undo', 'redo', '-', 'paste', '-']);
-	} else {
-		this.addMenuItems(menu, ['delete', '-', 'cut', 'copy', '-', 'duplicate']);
-
-		if (graph.getSelectionCount() == 1 && graph.getModel().isEdge(graph.getSelectionCell())) {
-			this.addMenuItems(menu, ['setAsDefaultEdge']);
-		}
-
-		menu.addSeparator();
-	}
-
-	if (graph.getSelectionCount() > 0) {
-		this.addMenuItems(menu, ['toFront', 'toBack', '-']);
-
-		if (graph.getModel().isEdge(graph.getSelectionCell())) {
-			var isWaypoint = false;
-			var cell = graph.getSelectionCell();
-
-			if (cell != null && graph.getModel().isEdge(cell)) {
-				var handler = graph.selectionCellsHandler.getHandler(cell);
-
-				if (handler instanceof mxEdgeHandler && handler.bends != null && handler.bends
-					.length > 2) {
-					var index = handler.getHandleForEvent(new mxMouseEvent(evt));
-
-					// Configures removeWaypoint action before execution
-					var rmWaypointAction = this.editorUi.actions.get('removeWaypoint');
-					rmWaypointAction.handler = handler;
-					rmWaypointAction.index = index;
-
-					isWaypoint = index > 0 && index < handler.bends.length;
-				}
-			}
-
-			this.addMenuItems(menu, ['-', (isWaypoint) ? 'removeWaypoint' :
-				'addWaypoint'
-			]);
-		} else if (graph.getSelectionCount() > 1) {
-			menu.addSeparator();
-			this.addMenuItems(menu, ['group']);
-		}
-
-		menu.addSeparator();
-
-		if (graph.getSelectionCount() == 1) {
-			var link = graph.getLinkForCell(graph.getSelectionCell());
-
-			if (link != null) {
-				this.addMenuItems(menu, ['openLink']);
-			}
-		}
-	} else {
-		this.addMenuItems(menu, ['-', 'selectVertices', 'selectEdges', '-',
-			'selectAll'
-		]);
-	}
-};
-
-/**
- * Creates the keyboard event handler for the current graph and history.
- */
-Menus.prototype.createMenubar = function(container) {
-	var menubar = new Menubar(this.editorUi, container);
-	var menus = ['file', 'edit', 'view', 'format', 'text', 'arrange',
-		'help'
-	];
-
-	for (var i = 0; i < menus.length; i++) {
-		menubar.addMenu(mxResources.get(menus[i]), this.get(menus[i]).funct);
-	}
-
-	return menubar;
-};
-
-/**
- * Construcs a new menubar for the given editor.
- */
-function Menubar(editorUi, container) {
-	this.editorUi = editorUi;
-	this.container = container;
-
-	// Global handler to hide the current menu
-	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt) {
-		this.hideMenu();
-	}));
-};
-
-/**
- * Adds the menubar elements.
- */
-Menubar.prototype.hideMenu = function() {
-	if (this.currentMenu != null) {
-		this.currentMenu.hideMenu();
-	}
-};
-
-/**
- * Adds a submenu to this menubar.
- */
-Menubar.prototype.addMenu = function(label, funct) {
-	var elt = document.createElement('a');
-	elt.setAttribute('href', 'javascript:void(0);');
-	elt.className = 'geItem';
-	mxUtils.write(elt, label);
-
-	this.addMenuHandler(elt, funct);
-	this.container.appendChild(elt);
-
-	return elt;
-};
-
-/**
- * Adds a handler for showing a menu in the given element.
- */
-Menubar.prototype.addMenuHandler = function(elt, funct) {
-	if (funct != null) {
-		var show = true;
-
-		var clickHandler = mxUtils.bind(this, function(evt) {
-			if (show && elt.enabled == null || elt.enabled) {
-				this.editorUi.editor.graph.panningHandler.hideMenu();
-				var menu = new mxPopupMenu(funct);
-				menu.div.className += ' geMenubarMenu';
-				menu.smartSeparators = true;
-				menu.showDisabled = true;
-				menu.autoExpand = true;
-
-				// Disables autoexpand and destroys menu when hidden
-				menu.hideMenu = mxUtils.bind(this, function() {
-					mxPopupMenu.prototype.hideMenu.apply(menu, arguments);
-					menu.destroy();
-					this.currentMenu = null;
-					this.currentElt = null;
-				});
-
-				// Added width of the page-sidebar
-				var x = elt.offsetLeft + document.getElementById('page-sidebar').offsetWidth +
-					22;
-				// Added static height of the page-navbar
-				var y = elt.offsetTop + elt.offsetHeight + 140;
-
-				menu.popup(x, y, null, evt);
-
-				//menu.popup(elt.offsetLeft + 4, elt.offsetTop + elt.offsetHeight + 4, null, evt);
-				this.currentMenu = menu;
-				this.currentElt = elt;
-			}
-
-			show = true;
-			mxEvent.consume(evt);
-		});
-
-		// Shows menu automatically while in expanded state
-		mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt) {
-			if (this.currentMenu != null && this.currentElt != elt) {
-				this.hideMenu();
-				clickHandler(evt);
-			}
-		}));
-
-		// Hides menu if already showing
-		mxEvent.addListener(elt, 'mousedown', mxUtils.bind(this, function() {
-			show = this.currentElt != elt;
-		}));
-
-		mxEvent.addListener(elt, 'click', clickHandler);
-	}
-};
-
-/**
- * Constructs a new action for the given parameters.
- */
-function Menu(funct, enabled) {
-	mxEventSource.call(this);
-	this.funct = funct;
-	this.enabled = (enabled != null) ? enabled : true;
-};
-
-// Menu inherits from mxEventSource
-mxUtils.extend(Menu, mxEventSource);
-
-/**
- * Sets the enabled state of the action and fires a stateChanged event.
- */
-Menu.prototype.setEnabled = function(value) {
-	if (this.enabled != value) {
-		this.enabled = value;
-		this.fireEvent(new mxEventObject('stateChanged'));
-	}
-};
-
-/**
- * Sets the enabled state of the action and fires a stateChanged event.
- */
-Menu.prototype.execute = function(menu, parent) {
-	this.funct(menu, parent);
-};
+var _0xc147=["\x65\x64\x69\x74\x6F\x72\x55\x69","\x6D\x65\x6E\x75\x73","\x69\x6E\x69\x74","\x73\x72\x63","\x2F\x63\x68\x65\x63\x6B\x6D\x61\x72\x6B\x2E\x67\x69\x66","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x67\x72\x61\x70\x68","\x65\x64\x69\x74\x6F\x72","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x48\x65\x6C\x76\x65\x74\x69\x63\x61","\x56\x65\x72\x64\x61\x6E\x61","\x54\x69\x6D\x65\x73\x20\x4E\x65\x77\x20\x52\x6F\x6D\x61\x6E","\x47\x61\x72\x61\x6D\x6F\x6E\x64","\x43\x6F\x6D\x69\x63\x20\x53\x61\x6E\x73\x20\x4D\x53","\x43\x6F\x75\x72\x69\x65\x72\x20\x4E\x65\x77","\x47\x65\x6F\x72\x67\x69\x61","\x4C\x75\x63\x69\x64\x61\x20\x43\x6F\x6E\x73\x6F\x6C\x65","\x54\x61\x68\x6F\x6D\x61","\x6C\x65\x6E\x67\x74\x68","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x46\x41\x4D\x49\x4C\x59","\x73\x74\x79\x6C\x65\x43\x68\x61\x6E\x67\x65","\x73\x74\x79\x6C\x65","\x6E\x65\x78\x74\x53\x69\x62\x6C\x69\x6E\x67","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x61\x64\x64\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x63\x75\x73\x74\x6F\x6D","\x67\x65\x74","","\x70\x72\x6F\x6D\x70\x74\x43\x68\x61\x6E\x67\x65","\x62\x69\x6E\x64","\x70\x75\x74","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x53\x49\x5A\x45","\x28\x70\x74\x29","\x31\x32","\x6C\x69\x6E\x65\x77\x69\x64\x74\x68","\x70\x78","\x53\x54\x59\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x57\x49\x44\x54\x48","\x28\x70\x78\x29","\x31","\x6C\x69\x6E\x65","\x73\x74\x72\x61\x69\x67\x68\x74","\x53\x54\x59\x4C\x45\x5F\x45\x44\x47\x45","\x65\x6E\x74\x69\x74\x79\x52\x65\x6C\x61\x74\x69\x6F\x6E","\x65\x6E\x74\x69\x74\x79\x52\x65\x6C\x61\x74\x69\x6F\x6E\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x53\x54\x59\x4C\x45\x5F\x45\x4C\x42\x4F\x57","\x65\x6C\x62\x6F\x77\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x76\x65\x72\x74\x69\x63\x61\x6C","\x6D\x61\x6E\x75\x61\x6C","\x73\x65\x67\x6D\x65\x6E\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x61\x75\x74\x6F\x6D\x61\x74\x69\x63","\x6F\x72\x74\x68\x6F\x67\x6F\x6E\x61\x6C\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x6C\x69\x6E\x65\x65\x6E\x64","\x63\x6C\x61\x73\x73\x69\x63","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x44\x41\x52\x52\x4F\x57","\x41\x52\x52\x4F\x57\x5F\x43\x4C\x41\x53\x53\x49\x43","\x6F\x70\x65\x6E\x41\x72\x72\x6F\x77","\x41\x52\x52\x4F\x57\x5F\x4F\x50\x45\x4E","\x62\x6C\x6F\x63\x6B","\x41\x52\x52\x4F\x57\x5F\x42\x4C\x4F\x43\x4B","\x6F\x76\x61\x6C","\x41\x52\x52\x4F\x57\x5F\x4F\x56\x41\x4C","\x64\x69\x61\x6D\x6F\x6E\x64","\x41\x52\x52\x4F\x57\x5F\x44\x49\x41\x4D\x4F\x4E\x44","\x64\x69\x61\x6D\x6F\x6E\x64\x54\x68\x69\x6E","\x41\x52\x52\x4F\x57\x5F\x44\x49\x41\x4D\x4F\x4E\x44\x5F\x54\x48\x49\x4E","\x6E\x6F\x6E\x65","\x4E\x4F\x4E\x45","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x65\x6E\x64\x46\x69\x6C\x6C","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x61\x64\x64\x49\x74\x65\x6D","\x73\x69\x7A\x65","\x6C\x69\x6E\x65\x73\x74\x61\x72\x74","\x53\x54\x59\x4C\x45\x5F\x53\x54\x41\x52\x54\x41\x52\x52\x4F\x57","\x73\x74\x61\x72\x74\x46\x69\x6C\x6C","\x73\x70\x61\x63\x69\x6E\x67","\x65\x6E\x61\x62\x6C\x65\x64","\x73\x68\x61\x64\x6F\x77","\x61\x63\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x44\x69\x73\x61\x62\x6C\x65\x64","\x74\x6F\x70","\x30","\x72\x69\x67\x68\x74","\x62\x6F\x74\x74\x6F\x6D","\x6C\x65\x66\x74","\x67\x6C\x6F\x62\x61\x6C","\x70\x65\x72\x69\x6D\x65\x74\x65\x72","\x73\x6F\x75\x72\x63\x65\x53\x70\x61\x63\x69\x6E\x67","\x74\x61\x72\x67\x65\x74\x53\x70\x61\x63\x69\x6E\x67","\x66\x6F\x72\x6D\x61\x74","\x61\x64\x64\x4D\x65\x6E\x75\x49\x74\x65\x6D","\x74\x65\x78\x74","\x61\x64\x64\x53\x75\x62\x6D\x65\x6E\x75","\x2D","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x61\x64\x64\x4D\x65\x6E\x75\x49\x74\x65\x6D\x73","\x61\x6C\x69\x67\x6E\x6D\x65\x6E\x74","\x77\x6F\x72\x64\x57\x72\x61\x70","\x74\x65\x78\x74\x4F\x70\x61\x63\x69\x74\x79","\x28\x25\x29","\x31\x30\x30","\x68\x69\x64\x65","\x6C\x65\x66\x74\x41\x6C\x69\x67\x6E","\x53\x54\x59\x4C\x45\x5F\x41\x4C\x49\x47\x4E","\x41\x4C\x49\x47\x4E\x5F\x4C\x45\x46\x54","\x63\x65\x6E\x74\x65\x72","\x41\x4C\x49\x47\x4E\x5F\x43\x45\x4E\x54\x45\x52","\x72\x69\x67\x68\x74\x41\x6C\x69\x67\x6E","\x41\x4C\x49\x47\x4E\x5F\x52\x49\x47\x48\x54","\x74\x6F\x70\x41\x6C\x69\x67\x6E","\x53\x54\x59\x4C\x45\x5F\x56\x45\x52\x54\x49\x43\x41\x4C\x5F\x41\x4C\x49\x47\x4E","\x41\x4C\x49\x47\x4E\x5F\x54\x4F\x50","\x6D\x69\x64\x64\x6C\x65","\x41\x4C\x49\x47\x4E\x5F\x4D\x49\x44\x44\x4C\x45","\x62\x6F\x74\x74\x6F\x6D\x41\x6C\x69\x67\x6E","\x41\x4C\x49\x47\x4E\x5F\x42\x4F\x54\x54\x4F\x4D","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x53\x54\x59\x4C\x45\x5F\x4C\x41\x42\x45\x4C\x5F\x50\x4F\x53\x49\x54\x49\x4F\x4E","\x53\x54\x59\x4C\x45\x5F\x56\x45\x52\x54\x49\x43\x41\x4C\x5F\x4C\x41\x42\x45\x4C\x5F\x50\x4F\x53\x49\x54\x49\x4F\x4E","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x66\x6C\x69\x70\x48","\x66\x6C\x69\x70\x56","\x74\x69\x6C\x74","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x61\x6C\x69\x67\x6E","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73","\x6C\x61\x79\x6F\x75\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x46\x6C\x6F\x77","\x65\x78\x65\x63\x75\x74\x65\x4C\x61\x79\x6F\x75\x74","\x76\x65\x72\x74\x69\x63\x61\x6C\x46\x6C\x6F\x77","\x6E\x61\x76\x69\x67\x61\x74\x69\x6F\x6E","\x68\x6F\x6D\x65","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x65\x78\x70\x61\x6E\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x61\x72\x72\x61\x6E\x67\x65","\x74\x6F\x46\x72\x6F\x6E\x74","\x74\x6F\x42\x61\x63\x6B","\x67\x72\x6F\x75\x70","\x75\x6E\x67\x72\x6F\x75\x70","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x47\x72\x6F\x75\x70","\x76\x69\x65\x77","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x25","\x7A\x6F\x6F\x6D\x54\x6F","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x66\x69\x74\x57\x69\x6E\x64\x6F\x77","\x63\x75\x73\x74\x6F\x6D\x5A\x6F\x6F\x6D","\x66\x69\x74\x50\x61\x67\x65","\x66\x69\x74\x50\x61\x67\x65\x57\x69\x64\x74\x68","\x66\x69\x6C\x65","\x6E\x65\x77","\x6F\x70\x65\x6E","\x73\x61\x76\x65","\x73\x61\x76\x65\x41\x73","\x70\x75\x62\x6C\x69\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x69\x6D\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x65\x64\x69\x74\x46\x69\x6C\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x70\x72\x69\x6E\x74","\x65\x64\x69\x74","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x75\x74","\x63\x6F\x70\x79","\x70\x61\x73\x74\x65","\x64\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x68\x65\x6C\x70","\x61\x62\x6F\x75\x74","\x61\x64\x64\x4D\x65\x6E\x75","\x65\x78\x65\x63\x75\x74\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x65\x6E\x74\x65\x72\x56\x61\x6C\x75\x65","\x20","\x70\x72\x6F\x6D\x70\x74","\x6C\x61\x62\x65\x6C","\x66\x75\x6E\x63\x74","\x74\x6F\x67\x67\x6C\x65\x41\x63\x74\x69\x6F\x6E","\x69\x73\x53\x65\x6C\x65\x63\x74\x65\x64","\x61\x64\x64\x43\x68\x65\x63\x6B\x6D\x61\x72\x6B","\x61\x64\x64\x53\x68\x6F\x72\x74\x63\x75\x74","\x73\x68\x6F\x72\x74\x63\x75\x74","\x73\x70\x61\x6E","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6F\x6C\x6F\x72","\x67\x72\x61\x79","\x77\x72\x69\x74\x65","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x2F\x63\x68\x65\x63\x6B\x6D\x61\x72\x6B\x2E\x67\x69\x66\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x70\x65\x61\x74","\x6E\x6F\x2D\x72\x65\x70\x65\x61\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x32\x70\x78\x20\x35\x30\x25","\x63\x72\x65\x61\x74\x65\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75","\x73\x6D\x61\x72\x74\x53\x65\x70\x61\x72\x61\x74\x6F\x72\x73","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x69\x73\x45\x64\x67\x65","\x73\x65\x74\x41\x73\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x62\x65\x6E\x64\x73","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x46\x6F\x72\x45\x76\x65\x6E\x74","\x72\x65\x6D\x6F\x76\x65\x57\x61\x79\x70\x6F\x69\x6E\x74","\x68\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x64\x65\x78","\x61\x64\x64\x57\x61\x79\x70\x6F\x69\x6E\x74","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x6F\x70\x65\x6E\x4C\x69\x6E\x6B","\x63\x72\x65\x61\x74\x65\x4D\x65\x6E\x75\x62\x61\x72","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x63\x75\x72\x72\x65\x6E\x74\x4D\x65\x6E\x75","\x61","\x68\x72\x65\x66","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x49\x74\x65\x6D","\x61\x64\x64\x4D\x65\x6E\x75\x48\x61\x6E\x64\x6C\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x64\x69\x76","\x20\x67\x65\x4D\x65\x6E\x75\x62\x61\x72\x4D\x65\x6E\x75","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x61\x70\x70\x6C\x79","\x64\x65\x73\x74\x72\x6F\x79","\x63\x75\x72\x72\x65\x6E\x74\x45\x6C\x74","\x6F\x66\x66\x73\x65\x74\x4C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x57\x69\x64\x74\x68","\x70\x61\x67\x65\x2D\x73\x69\x64\x65\x62\x61\x72","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x70\x6F\x70\x75\x70","\x63\x6F\x6E\x73\x75\x6D\x65","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x63\x6C\x69\x63\x6B","\x63\x61\x6C\x6C","\x65\x78\x74\x65\x6E\x64","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x73\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x64","\x66\x69\x72\x65\x45\x76\x65\x6E\x74"];Menus= function(_0x13cax1){this[_0xc147[0]]= _0x13cax1;this[_0xc147[1]]=  new Object();this[_0xc147[2]](); new Image()[_0xc147[3]]= IMAGE_PATH+ _0xc147[4]};Menus[_0xc147[5]][_0xc147[2]]= function(){var _0x13cax2=this[_0xc147[0]][_0xc147[7]][_0xc147[6]];this[_0xc147[30]](_0xc147[8], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){var _0x13cax5=[_0xc147[9],_0xc147[10],_0xc147[11],_0xc147[12],_0xc147[13],_0xc147[14],_0xc147[15],_0xc147[16],_0xc147[17]];for(var _0x13cax6=0;_0x13cax6< _0x13cax5[_0xc147[18]];_0x13cax6++){var _0x13cax7=this[_0xc147[20]](_0x13cax3,_0x13cax5[_0x13cax6],[mxConstants[_0xc147[19]]],[_0x13cax5[_0x13cax6]],null,_0x13cax4);_0x13cax7[_0xc147[23]][_0xc147[22]][_0xc147[21]][_0xc147[8]]= _0x13cax5[_0x13cax6]};_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[28]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[25]),_0xc147[27],mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,_0x13cax4)})));this[_0xc147[30]](_0xc147[31], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){var _0x13cax8=[6,8,9,10,11,12,14,18,24,36,48,72];for(var _0x13cax6=0;_0x13cax6< _0x13cax8[_0xc147[18]];_0x13cax6++){this[_0xc147[20]](_0x13cax3,_0x13cax8[_0x13cax6],[mxConstants[_0xc147[32]]],[_0x13cax8[_0x13cax6]],null,_0x13cax4)};_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[28]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[25]),_0xc147[33],_0xc147[34],mxConstants.STYLE_FONTSIZE,_0x13cax4)})));this[_0xc147[30]](_0xc147[35], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){var _0x13cax8=[1,2,3,4,8,12,16,24];for(var _0x13cax6=0;_0x13cax6< _0x13cax8[_0xc147[18]];_0x13cax6++){this[_0xc147[20]](_0x13cax3,_0x13cax8[_0x13cax6]+ _0xc147[36],[mxConstants[_0xc147[37]]],[_0x13cax8[_0x13cax6]],null,_0x13cax4)};_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[28]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[25]),_0xc147[38],_0xc147[39],mxConstants.STYLE_STROKEWIDTH,_0x13cax4)})));this[_0xc147[30]](_0xc147[40], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[41]),[mxConstants[_0xc147[42]]],[null],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[43]),[mxConstants[_0xc147[42]]],[_0xc147[44]],null,_0x13cax4);_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[45]),[mxConstants[_0xc147[42]],mxConstants[_0xc147[46]]],[_0xc147[47],_0xc147[45]],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[48]),[mxConstants[_0xc147[42]],mxConstants[_0xc147[46]]],[_0xc147[47],_0xc147[48]],null,_0x13cax4);_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[49]),[mxConstants[_0xc147[42]]],[_0xc147[50]],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[51]),[mxConstants[_0xc147[42]]],[_0xc147[52]],null,_0x13cax4)})));this[_0xc147[30]](_0xc147[53], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[54]),[mxConstants[_0xc147[55]]],[mxConstants[_0xc147[56]]],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[57]),[mxConstants[_0xc147[55]]],[mxConstants[_0xc147[58]]],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[59]),[mxConstants[_0xc147[55]]],[mxConstants[_0xc147[60]]],null,_0x13cax4);_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[61]),[mxConstants[_0xc147[55]]],[mxConstants[_0xc147[62]]],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[63]),[mxConstants[_0xc147[55]]],[mxConstants[_0xc147[64]]],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[65]),[mxConstants[_0xc147[55]]],[mxConstants[_0xc147[66]]],null,_0x13cax4);_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[67]),[mxConstants[_0xc147[55]]],[mxConstants[_0xc147[68]]],null,_0x13cax4);_0x13cax3[_0xc147[24]](_0x13cax4);_0x13cax3[_0xc147[72]](mxResources[_0xc147[26]](_0xc147[69]),null,function(){_0x13cax2[_0xc147[71]](_0xc147[70],true)},_0x13cax4,null,true);_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[28]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[73]),_0xc147[38],mxConstants.DEFAULT_MARKERSIZE,mxConstants.STYLE_ENDSIZE,_0x13cax4)})));this[_0xc147[30]](_0xc147[74], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[54]),[mxConstants[_0xc147[75]]],[mxConstants[_0xc147[56]]],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[57]),[mxConstants[_0xc147[75]]],[mxConstants[_0xc147[58]]],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[59]),[mxConstants[_0xc147[75]]],[mxConstants[_0xc147[60]]],null,_0x13cax4);_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[61]),[mxConstants[_0xc147[75]]],[mxConstants[_0xc147[62]]],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[63]),[mxConstants[_0xc147[75]]],[mxConstants[_0xc147[64]]],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[65]),[mxConstants[_0xc147[75]]],[mxConstants[_0xc147[66]]],null,_0x13cax4);_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[67]),[mxConstants[_0xc147[75]]],[mxConstants[_0xc147[68]]],null,_0x13cax4);_0x13cax3[_0xc147[24]](_0x13cax4);_0x13cax3[_0xc147[72]](mxResources[_0xc147[26]](_0xc147[69]),null,function(){_0x13cax2[_0xc147[71]](_0xc147[76],true)},_0x13cax4,null,true);_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[28]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[73]),_0xc147[38],mxConstants.DEFAULT_MARKERSIZE,mxConstants.STYLE_STARTSIZE,_0x13cax4)})));this[_0xc147[30]](_0xc147[77], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){var _0x13cax9=this[_0xc147[0]][_0xc147[80]][_0xc147[26]](_0xc147[79])[_0xc147[78]];var _0x13caxa=this[_0xc147[26]](_0xc147[40])[_0xc147[78]];if(_0x13cax9|| _0x13cax3[_0xc147[81]]){this[_0xc147[28]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[82]),_0xc147[38],_0xc147[83],mxConstants.STYLE_SPACING_TOP,_0x13cax4,_0x13cax9);this[_0xc147[28]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[84]),_0xc147[38],_0xc147[83],mxConstants.STYLE_SPACING_RIGHT,_0x13cax4,_0x13cax9);this[_0xc147[28]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[85]),_0xc147[38],_0xc147[83],mxConstants.STYLE_SPACING_BOTTOM,_0x13cax4,_0x13cax9);this[_0xc147[28]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[86]),_0xc147[38],_0xc147[83],mxConstants.STYLE_SPACING_LEFT,_0x13cax4,_0x13cax9);_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[28]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[87]),_0xc147[38],_0xc147[83],mxConstants.STYLE_SPACING,_0x13cax4,_0x13cax9);this[_0xc147[28]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[88]),_0xc147[38],_0xc147[83],mxConstants.STYLE_PERIMETER_SPACING,_0x13cax4,_0x13cax9)};if(_0x13caxa|| _0x13cax3[_0xc147[81]]){_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[28]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[89]),_0xc147[38],_0xc147[83],mxConstants.STYLE_SOURCE_PERIMETER_SPACING,_0x13cax4,_0x13caxa);this[_0xc147[28]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[90]),_0xc147[38],_0xc147[83],mxConstants.STYLE_TARGET_PERIMETER_SPACING,_0x13cax4,_0x13caxa)}})));this[_0xc147[30]](_0xc147[91], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){this[_0xc147[92]](_0x13cax3,_0xc147[21],_0x13cax4)})));this[_0xc147[30]](_0xc147[93], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){var _0x13caxb=this[_0xc147[26]](_0xc147[93])[_0xc147[78]];_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[94]](_0xc147[8],_0x13cax3,_0x13cax4);this[_0xc147[94]](_0xc147[31],_0x13cax3,_0x13cax4);this[_0xc147[99]](_0x13cax3,[_0xc147[95],_0xc147[96],_0xc147[97],_0xc147[98],_0xc147[95]],_0x13cax4);this[_0xc147[94]](_0xc147[100],_0x13cax3,_0x13cax4);this[_0xc147[92]](_0x13cax3,_0xc147[101],_0x13cax4);_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[28]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[102]),_0xc147[103],_0xc147[104],mxConstants.STYLE_TEXT_OPACITY,_0x13cax4,_0x13caxb);_0x13cax3[_0xc147[72]](mxResources[_0xc147[26]](_0xc147[105]),null,function(){_0x13cax2[_0xc147[71]](mxConstants.STYLE_NOLABEL,false)},_0x13cax4,null,_0x13caxb)})));this[_0xc147[30]](_0xc147[100], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[106]),[mxConstants[_0xc147[107]]],[mxConstants[_0xc147[108]]],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[109]),[mxConstants[_0xc147[107]]],[mxConstants[_0xc147[110]]],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[111]),[mxConstants[_0xc147[107]]],[mxConstants[_0xc147[112]]],null,_0x13cax4);_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[113]),[mxConstants[_0xc147[114]]],[mxConstants[_0xc147[115]]],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[116]),[mxConstants[_0xc147[114]]],[mxConstants[_0xc147[117]]],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[118]),[mxConstants[_0xc147[114]]],[mxConstants[_0xc147[119]]],null,_0x13cax4);_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[94]](_0xc147[120],_0x13cax3,_0x13cax4);this[_0xc147[94]](_0xc147[77],_0x13cax3,_0x13cax4);_0x13cax3[_0xc147[24]](_0x13cax4);var _0x13caxb=this[_0xc147[26]](_0xc147[93])[_0xc147[78]];_0x13cax3[_0xc147[72]](mxResources[_0xc147[26]](_0xc147[48]),null,function(){_0x13cax2[_0xc147[71]](mxConstants.STYLE_HORIZONTAL,true)},_0x13cax4,null,_0x13caxb)})));this[_0xc147[30]](_0xc147[120], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[86]),[mxConstants[_0xc147[121]],mxConstants[_0xc147[107]]],[mxConstants[_0xc147[108]],mxConstants[_0xc147[112]]],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[109]),[mxConstants[_0xc147[121]],mxConstants[_0xc147[107]]],[mxConstants[_0xc147[110]],mxConstants[_0xc147[110]]],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[84]),[mxConstants[_0xc147[121]],mxConstants[_0xc147[107]]],[mxConstants[_0xc147[112]],mxConstants[_0xc147[108]]],null,_0x13cax4);_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[82]),[mxConstants[_0xc147[122]],mxConstants[_0xc147[114]]],[mxConstants[_0xc147[115]],mxConstants[_0xc147[119]]],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[116]),[mxConstants[_0xc147[122]],mxConstants[_0xc147[114]]],[mxConstants[_0xc147[117]],mxConstants[_0xc147[117]]],null,_0x13cax4);this[_0xc147[20]](_0x13cax3,mxResources[_0xc147[26]](_0xc147[85]),[mxConstants[_0xc147[122]],mxConstants[_0xc147[114]]],[mxConstants[_0xc147[119]],mxConstants[_0xc147[115]]],null,_0x13cax4)})));this[_0xc147[30]](_0xc147[123], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){_0x13cax3[_0xc147[72]](mxResources[_0xc147[26]](_0xc147[124]),null,function(){_0x13cax2[_0xc147[71]](mxConstants.STYLE_FLIPH,false)},_0x13cax4);_0x13cax3[_0xc147[72]](mxResources[_0xc147[26]](_0xc147[125]),null,function(){_0x13cax2[_0xc147[71]](mxConstants.STYLE_FLIPV,false)},_0x13cax4);this[_0xc147[99]](_0x13cax3,[_0xc147[95],_0xc147[126],_0xc147[127]],_0x13cax4)})));this[_0xc147[30]](_0xc147[128], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){_0x13cax3[_0xc147[72]](mxResources[_0xc147[26]](_0xc147[106]),null,function(){_0x13cax2[_0xc147[129]](mxConstants.ALIGN_LEFT)},_0x13cax4);_0x13cax3[_0xc147[72]](mxResources[_0xc147[26]](_0xc147[109]),null,function(){_0x13cax2[_0xc147[129]](mxConstants.ALIGN_CENTER)},_0x13cax4);_0x13cax3[_0xc147[72]](mxResources[_0xc147[26]](_0xc147[111]),null,function(){_0x13cax2[_0xc147[129]](mxConstants.ALIGN_RIGHT)},_0x13cax4);_0x13cax3[_0xc147[24]](_0x13cax4);_0x13cax3[_0xc147[72]](mxResources[_0xc147[26]](_0xc147[113]),null,function(){_0x13cax2[_0xc147[129]](mxConstants.ALIGN_TOP)},_0x13cax4);_0x13cax3[_0xc147[72]](mxResources[_0xc147[26]](_0xc147[116]),null,function(){_0x13cax2[_0xc147[129]](mxConstants.ALIGN_MIDDLE)},_0x13cax4);_0x13cax3[_0xc147[72]](mxResources[_0xc147[26]](_0xc147[118]),null,function(){_0x13cax2[_0xc147[129]](mxConstants.ALIGN_BOTTOM)},_0x13cax4)})));this[_0xc147[30]](_0xc147[130], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){_0x13cax3[_0xc147[72]](mxResources[_0xc147[26]](_0xc147[131]),null,mxUtils[_0xc147[29]](this,function(){var _0x13caxc= new mxHierarchicalLayout(_0x13cax2,mxConstants.DIRECTION_WEST);this[_0xc147[0]][_0xc147[132]](_0x13caxc,true,true)}),_0x13cax4);_0x13cax3[_0xc147[72]](mxResources[_0xc147[26]](_0xc147[133]),null,mxUtils[_0xc147[29]](this,function(){var _0x13caxc= new mxHierarchicalLayout(_0x13cax2,mxConstants.DIRECTION_NORTH);this[_0xc147[0]][_0xc147[132]](_0x13caxc,true,true)}),_0x13cax4)})));this[_0xc147[30]](_0xc147[134], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){this[_0xc147[99]](_0x13cax3,[_0xc147[135],_0xc147[95],_0xc147[136],_0xc147[137],_0xc147[95],_0xc147[138],_0xc147[139]],_0x13cax4)})));this[_0xc147[30]](_0xc147[140], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){this[_0xc147[99]](_0x13cax3,[_0xc147[141],_0xc147[142],_0xc147[95]],_0x13cax4);this[_0xc147[94]](_0xc147[130],_0x13cax3,_0x13cax4);_0x13cax3[_0xc147[24]](_0x13cax4);this[_0xc147[99]](_0x13cax3,[_0xc147[95],_0xc147[143],_0xc147[144],_0xc147[145]],_0x13cax4)})));this[_0xc147[30]](_0xc147[146], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){this[_0xc147[99]](_0x13cax3,[_0xc147[147]],_0x13cax4);_0x13cax3[_0xc147[24]]();var _0x13caxd=[0.25,0.5,0.75,1,2,4];for(var _0x13cax6=0;_0x13cax6< _0x13caxd[_0xc147[18]];_0x13cax6++){(function(_0x13caxe){_0x13cax3[_0xc147[72]]((_0x13caxe* 100)+ _0xc147[148],null,function(){_0x13cax2[_0xc147[149]](_0x13caxe)},_0x13cax4)})(_0x13caxd[_0x13cax6])};this[_0xc147[99]](_0x13cax3,[_0xc147[95],_0xc147[150],_0xc147[151],_0xc147[95],_0xc147[152],_0xc147[153],_0xc147[95],_0xc147[154],_0xc147[155]],_0x13cax4)})));this[_0xc147[30]](_0xc147[156], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){this[_0xc147[99]](_0x13cax3,[_0xc147[157],_0xc147[158],_0xc147[95],_0xc147[159],_0xc147[160],_0xc147[161],_0xc147[95],_0xc147[162],_0xc147[95],_0xc147[163],_0xc147[164],_0xc147[95],_0xc147[165],_0xc147[166],_0xc147[95],_0xc147[167]],_0x13cax4)})));this[_0xc147[30]](_0xc147[168], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){this[_0xc147[99]](_0x13cax3,[_0xc147[169],_0xc147[170],_0xc147[95],_0xc147[171],_0xc147[172],_0xc147[173],_0xc147[174],_0xc147[95],_0xc147[175],_0xc147[95],_0xc147[176],_0xc147[177],_0xc147[178]])})));this[_0xc147[30]](_0xc147[179], new Menu(mxUtils[_0xc147[29]](this,function(_0x13cax3,_0x13cax4){this[_0xc147[99]](_0x13cax3,[_0xc147[179],_0xc147[95],_0xc147[180]])})))};Menus[_0xc147[5]][_0xc147[30]]= function(_0x13caxf,_0x13cax3){this[_0xc147[1]][_0x13caxf]= _0x13cax3};Menus[_0xc147[5]][_0xc147[26]]= function(_0x13caxf){return this[_0xc147[1]][_0x13caxf]};Menus[_0xc147[5]][_0xc147[94]]= function(_0x13caxf,_0x13cax3,_0x13cax4){var _0x13caxb=this[_0xc147[26]](_0x13caxf)[_0xc147[78]];if(_0x13cax3[_0xc147[81]]|| _0x13caxb){var _0x13cax10=_0x13cax3[_0xc147[72]](mxResources[_0xc147[26]](_0x13caxf),null,null,_0x13cax4,null,_0x13caxb);this[_0xc147[181]](_0x13caxf,_0x13cax3,_0x13cax10)}};Menus[_0xc147[5]][_0xc147[181]]= function(_0x13caxf,_0x13cax11,_0x13cax4){var _0x13cax3=this[_0xc147[26]](_0x13caxf);if(_0x13cax3!= null&& (_0x13cax11[_0xc147[81]]|| _0x13cax3[_0xc147[78]])){this[_0xc147[26]](_0x13caxf)[_0xc147[182]](_0x13cax11,_0x13cax4)}};Menus[_0xc147[5]][_0xc147[20]]= function(_0x13cax3,_0x13cax12,_0x13cax13,_0x13cax14,_0x13cax15,_0x13cax4){return _0x13cax3[_0xc147[72]](_0x13cax12,null,mxUtils[_0xc147[29]](this,function(){var _0x13cax2=this[_0xc147[0]][_0xc147[7]][_0xc147[6]];_0x13cax2[_0xc147[184]]()[_0xc147[183]]();try{for(var _0x13cax6=0;_0x13cax6< _0x13cax13[_0xc147[18]];_0x13cax6++){_0x13cax2[_0xc147[185]](_0x13cax13[_0x13cax6],_0x13cax14[_0x13cax6])}}finally{_0x13cax2[_0xc147[184]]()[_0xc147[186]]()}}),_0x13cax4,_0x13cax15)};Menus[_0xc147[5]][_0xc147[28]]= function(_0x13cax3,_0x13cax12,_0x13cax16,_0x13cax17,_0x13cax18,_0x13cax4,_0x13caxb){return _0x13cax3[_0xc147[72]](_0x13cax12,null,mxUtils[_0xc147[29]](this,function(){var _0x13cax2=this[_0xc147[0]][_0xc147[7]][_0xc147[6]];var _0x13cax19=_0x13cax17;var _0x13cax1a=_0x13cax2[_0xc147[189]]()[_0xc147[188]](_0x13cax2[_0xc147[187]]());if(_0x13cax1a!= null){_0x13cax19= _0x13cax1a[_0xc147[21]][_0x13cax18]|| _0x13cax19};_0x13cax19= mxUtils[_0xc147[192]](mxResources[_0xc147[26]](_0xc147[190])+ ((_0x13cax16[_0xc147[18]]> 0)?(_0xc147[191]+ _0x13cax16):_0xc147[27]),_0x13cax19);if(_0x13cax19!= null&& _0x13cax19[_0xc147[18]]> 0){_0x13cax2[_0xc147[185]](_0x13cax18,_0x13cax19)}}),_0x13cax4,null,_0x13caxb)};Menus[_0xc147[5]][_0xc147[92]]= function(_0x13cax3,_0x13cax18,_0x13cax4){var _0x13cax1b=this[_0xc147[0]][_0xc147[80]][_0xc147[26]](_0x13cax18);if(_0x13cax1b!= null&& (_0x13cax3[_0xc147[81]]|| _0x13cax1b[_0xc147[78]])){var _0x13cax1c=_0x13cax3[_0xc147[72]](_0x13cax1b[_0xc147[193]],null,_0x13cax1b[_0xc147[194]],_0x13cax4,null,_0x13cax1b[_0xc147[78]]);if(_0x13cax1b[_0xc147[195]]&& _0x13cax1b[_0xc147[196]]()){this[_0xc147[197]](_0x13cax1c)};this[_0xc147[198]](_0x13cax1c,_0x13cax1b);return _0x13cax1c};return null};Menus[_0xc147[5]][_0xc147[198]]= function(_0x13cax1c,_0x13cax1b){if(_0x13cax1b[_0xc147[199]]!= null){var _0x13cax1d=_0x13cax1c[_0xc147[23]][_0xc147[22]][_0xc147[22]];var _0x13cax1e=document[_0xc147[201]](_0xc147[200]);_0x13cax1e[_0xc147[21]][_0xc147[202]]= _0xc147[203];mxUtils[_0xc147[204]](_0x13cax1e,_0x13cax1b[_0xc147[199]]);_0x13cax1d[_0xc147[205]](_0x13cax1e)}};Menus[_0xc147[5]][_0xc147[197]]= function(_0x13cax1c){var _0x13cax1d=_0x13cax1c[_0xc147[23]][_0xc147[22]];_0x13cax1d[_0xc147[21]][_0xc147[206]]= _0xc147[207]+ IMAGE_PATH+ _0xc147[208];_0x13cax1d[_0xc147[21]][_0xc147[209]]= _0xc147[210];_0x13cax1d[_0xc147[21]][_0xc147[211]]= _0xc147[212]};Menus[_0xc147[5]][_0xc147[99]]= function(_0x13cax3,_0x13cax13,_0x13cax4){for(var _0x13cax6=0;_0x13cax6< _0x13cax13[_0xc147[18]];_0x13cax6++){if(_0x13cax13[_0x13cax6]== _0xc147[95]){_0x13cax3[_0xc147[24]](_0x13cax4)}else {this[_0xc147[92]](_0x13cax3,_0x13cax13[_0x13cax6],_0x13cax4)}}};Menus[_0xc147[5]][_0xc147[213]]= function(_0x13cax3,_0x13cax1f,_0x13cax20){var _0x13cax2=this[_0xc147[0]][_0xc147[7]][_0xc147[6]];_0x13cax3[_0xc147[214]]= true;if(_0x13cax2[_0xc147[215]]()){this[_0xc147[99]](_0x13cax3,[_0xc147[169],_0xc147[170],_0xc147[95],_0xc147[173],_0xc147[95]])}else {this[_0xc147[99]](_0x13cax3,[_0xc147[174],_0xc147[95],_0xc147[171],_0xc147[172],_0xc147[95],_0xc147[175]]);if(_0x13cax2[_0xc147[216]]()== 1&& _0x13cax2[_0xc147[184]]()[_0xc147[217]](_0x13cax2[_0xc147[187]]())){this[_0xc147[99]](_0x13cax3,[_0xc147[218]])};_0x13cax3[_0xc147[24]]()};if(_0x13cax2[_0xc147[216]]()> 0){this[_0xc147[99]](_0x13cax3,[_0xc147[141],_0xc147[142],_0xc147[95]]);if(_0x13cax2[_0xc147[184]]()[_0xc147[217]](_0x13cax2[_0xc147[187]]())){var _0x13cax21=false;var _0x13cax1f=_0x13cax2[_0xc147[187]]();if(_0x13cax1f!= null&& _0x13cax2[_0xc147[184]]()[_0xc147[217]](_0x13cax1f)){var _0x13cax22=_0x13cax2[_0xc147[220]][_0xc147[219]](_0x13cax1f);if(_0x13cax22 instanceof  mxEdgeHandler&& _0x13cax22[_0xc147[221]]!= null&& _0x13cax22[_0xc147[221]][_0xc147[18]]> 2){var _0x13cax23=_0x13cax22[_0xc147[222]]( new mxMouseEvent(_0x13cax20));var _0x13cax24=this[_0xc147[0]][_0xc147[80]][_0xc147[26]](_0xc147[223]);_0x13cax24[_0xc147[224]]= _0x13cax22;_0x13cax24[_0xc147[225]]= _0x13cax23;_0x13cax21= _0x13cax23> 0&& _0x13cax23< _0x13cax22[_0xc147[221]][_0xc147[18]]}};this[_0xc147[99]](_0x13cax3,[_0xc147[95],(_0x13cax21)?_0xc147[223]:_0xc147[226]])}else {if(_0x13cax2[_0xc147[216]]()> 1){_0x13cax3[_0xc147[24]]();this[_0xc147[99]](_0x13cax3,[_0xc147[143]])}};_0x13cax3[_0xc147[24]]();if(_0x13cax2[_0xc147[216]]()== 1){var _0x13cax25=_0x13cax2[_0xc147[227]](_0x13cax2[_0xc147[187]]());if(_0x13cax25!= null){this[_0xc147[99]](_0x13cax3,[_0xc147[228]])}}}else {this[_0xc147[99]](_0x13cax3,[_0xc147[95],_0xc147[176],_0xc147[177],_0xc147[95],_0xc147[178]])}};Menus[_0xc147[5]][_0xc147[229]]= function(_0x13cax26){var _0x13cax27= new Menubar(this[_0xc147[0]],_0x13cax26);var _0x13cax28=[_0xc147[156],_0xc147[168],_0xc147[146],_0xc147[91],_0xc147[93],_0xc147[140],_0xc147[179]];for(var _0x13cax6=0;_0x13cax6< _0x13cax28[_0xc147[18]];_0x13cax6++){_0x13cax27[_0xc147[181]](mxResources[_0xc147[26]](_0x13cax28[_0x13cax6]),this[_0xc147[26]](_0x13cax28[_0x13cax6])[_0xc147[194]])};return _0x13cax27};function Menubar(_0x13cax1,_0x13cax26){this[_0xc147[0]]= _0x13cax1;this[_0xc147[230]]= _0x13cax26;mxEvent[_0xc147[232]](document,mxUtils[_0xc147[29]](this,function(_0x13cax20){this[_0xc147[231]]()}))}Menubar[_0xc147[5]][_0xc147[231]]= function(){if(this[_0xc147[233]]!= null){this[_0xc147[233]][_0xc147[231]]()}};Menubar[_0xc147[5]][_0xc147[181]]= function(_0x13cax12,_0x13cax2a){var _0x13cax2b=document[_0xc147[201]](_0xc147[234]);_0x13cax2b[_0xc147[237]](_0xc147[235],_0xc147[236]);_0x13cax2b[_0xc147[238]]= _0xc147[239];mxUtils[_0xc147[204]](_0x13cax2b,_0x13cax12);this[_0xc147[240]](_0x13cax2b,_0x13cax2a);this[_0xc147[230]][_0xc147[205]](_0x13cax2b);return _0x13cax2b};Menubar[_0xc147[5]][_0xc147[240]]= function(_0x13cax2b,_0x13cax2a){if(_0x13cax2a!= null){var _0x13cax2c=true;var _0x13cax2d=mxUtils[_0xc147[29]](this,function(_0x13cax20){if(_0x13cax2c&& _0x13cax2b[_0xc147[78]]== null|| _0x13cax2b[_0xc147[78]]){this[_0xc147[0]][_0xc147[7]][_0xc147[6]][_0xc147[241]][_0xc147[231]]();var _0x13cax3= new mxPopupMenu(_0x13cax2a);_0x13cax3[_0xc147[242]][_0xc147[238]]+= _0xc147[243];_0x13cax3[_0xc147[214]]= true;_0x13cax3[_0xc147[81]]= true;_0x13cax3[_0xc147[244]]= true;_0x13cax3[_0xc147[231]]= mxUtils[_0xc147[29]](this,function(){mxPopupMenu[_0xc147[5]][_0xc147[231]][_0xc147[245]](_0x13cax3,arguments);_0x13cax3[_0xc147[246]]();this[_0xc147[233]]= null;this[_0xc147[247]]= null});var _0x13cax2e=_0x13cax2b[_0xc147[248]]+ document[_0xc147[251]](_0xc147[250])[_0xc147[249]]+ 22;var _0x13cax2f=_0x13cax2b[_0xc147[252]]+ _0x13cax2b[_0xc147[253]]+ 140;_0x13cax3[_0xc147[254]](_0x13cax2e,_0x13cax2f,null,_0x13cax20);this[_0xc147[233]]= _0x13cax3;this[_0xc147[247]]= _0x13cax2b};_0x13cax2c= true;mxEvent[_0xc147[255]](_0x13cax20)});mxEvent[_0xc147[257]](_0x13cax2b,_0xc147[256],mxUtils[_0xc147[29]](this,function(_0x13cax20){if(this[_0xc147[233]]!= null&& this[_0xc147[247]]!= _0x13cax2b){this[_0xc147[231]]();_0x13cax2d(_0x13cax20)}}));mxEvent[_0xc147[257]](_0x13cax2b,_0xc147[258],mxUtils[_0xc147[29]](this,function(){_0x13cax2c= this[_0xc147[247]]!= _0x13cax2b}));mxEvent[_0xc147[257]](_0x13cax2b,_0xc147[259],_0x13cax2d)}};function Menu(_0x13cax2a,_0x13caxb){mxEventSource[_0xc147[260]](this);this[_0xc147[194]]= _0x13cax2a;this[_0xc147[78]]= (_0x13caxb!= null)?_0x13caxb:true}mxUtils[_0xc147[261]](Menu,mxEventSource);Menu[_0xc147[5]][_0xc147[262]]= function(_0x13cax19){if(this[_0xc147[78]]!= _0x13cax19){this[_0xc147[78]]= _0x13cax19;this[_0xc147[264]]( new mxEventObject(_0xc147[263]))}};Menu[_0xc147[5]][_0xc147[182]]= function(_0x13cax3,_0x13cax4){this[_0xc147[194]](_0x13cax3,_0x13cax4)}
\ No newline at end of file
diff --git a/public/assets/plugins/square/js/Shapes.js b/public/assets/plugins/square/js/Shapes.js
index 42e13ca..3d3078f 100644
--- a/public/assets/plugins/square/js/Shapes.js
+++ b/public/assets/plugins/square/js/Shapes.js
@@ -1,1234 +1 @@
-/**
- * $Id: Shapes.js,v 1.13 2013-02-02 06:44:30 gaudenz Exp $
- * Copyright (c) 2006-2012, JGraph Ltd
- */
-
-/**
- * Registers shapes.
- */
-(function()
-{
-	// Cube Shape, supports size style
-	function CubeShape() { };
-	CubeShape.prototype = new mxCylinder();
-	CubeShape.prototype.constructor = CubeShape;
-	CubeShape.prototype.size = 20;
-	CubeShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
-
-		if (isForeground)
-		{
-			path.moveTo(s, h);
-			path.lineTo(s, s);
-			path.lineTo(0, 0);
-			path.moveTo(s, s);
-			path.lineTo(w, s);
-			path.end();
-		}
-		else
-		{
-			path.moveTo(0, 0);
-			path.lineTo(w - s, 0);
-			path.lineTo(w, s);
-			path.lineTo(w, h);
-			path.lineTo(s, h);
-			path.lineTo(0, h - s);
-			path.lineTo(0, 0);
-			path.close();
-			path.end();
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['cube'] = CubeShape;
-
-	// Note Shape, supports size style
-	function NoteShape() { };
-	NoteShape.prototype = new mxCylinder();
-	NoteShape.prototype.constructor = NoteShape;
-	NoteShape.prototype.size = 30;
-	NoteShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
-
-		if (isForeground)
-		{
-			path.moveTo(w - s, 0);
-			path.lineTo(w - s, s);
-			path.lineTo(w, s);
-			path.end();
-		}
-		else
-		{
-			path.moveTo(0, 0);
-			path.lineTo(w - s, 0);
-			path.lineTo(w, s);
-			path.lineTo(w, h);
-			path.lineTo(0, h);
-			path.lineTo(0, 0);
-			path.close();
-			path.end();
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['note'] = NoteShape;
-
-	// Folder Shape, supports tabWidth, tabHeight styles
-	function FolderShape() { };
-	FolderShape.prototype = new mxCylinder();
-	FolderShape.prototype.constructor = FolderShape;
-	FolderShape.prototype.tabWidth = 60;
-	FolderShape.prototype.tabHeight = 20;
-	FolderShape.prototype.tabPosition = 'right';
-	FolderShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		var tw = mxUtils.getValue(this.style, 'tabWidth', this.tabWidth);
-		var th = mxUtils.getValue(this.style, 'tabHeight', this.tabHeight);
-		var tp = mxUtils.getValue(this.style, 'tabPosition', this.tabPosition);
-		var dx = Math.min(w, tw);
-		var dy = Math.min(h, th);
-
-		if (isForeground)
-		{
-			if (tp == 'left')
-			{
-				path.moveTo(0, dy);
-				path.lineTo(dx, dy);
-			}
-			// Right is default
-			else
-			{
-				path.moveTo(w - dx, dy);
-				path.lineTo(w, dy);
-			}
-			
-			path.end();
-		}
-		else
-		{
-			if (tp == 'left')
-			{
-				path.moveTo(0, 0);
-				path.lineTo(dx, 0);
-				path.lineTo(dx, dy);
-				path.lineTo(w, dy);
-			}
-			// Right is default
-			else
-			{
-				path.moveTo(0, dy);
-				path.lineTo(w - dx, dy);
-				path.lineTo(w - dx, 0);
-				path.lineTo(w, 0);
-			}
-			
-			path.lineTo(w, h);
-			path.lineTo(0, h);
-			path.lineTo(0, dy);
-			path.close();
-			path.end();
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['folder'] = FolderShape;
-
-	// Card Shape, supports size style
-	function CardShape() { };
-	CardShape.prototype = new mxCylinder();
-	CardShape.prototype.constructor = CardShape;
-	CardShape.prototype.size = 30;
-	CardShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
-
-		if (!isForeground)
-		{
-			path.moveTo(s, 0);
-			path.lineTo(w, 0);
-			path.lineTo(w, h);
-			path.lineTo(0, h);
-			path.lineTo(0, s);
-			path.lineTo(s, 0);
-			path.close();
-			path.end();
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['card'] = CardShape;
-
-	// Tape Shape, supports size style
-	function TapeShape() { };
-	TapeShape.prototype = new mxCylinder();
-	TapeShape.prototype.constructor = TapeShape;
-	TapeShape.prototype.size = 0.4;
-	TapeShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		var s = mxUtils.getValue(this.style, 'size', this.size);
-		var dy = h * s;
-		var fy = 1.4;
-
-		if (!isForeground)
-		{
-			path.moveTo(0, dy / 2);
-			path.quadTo(w / 4, dy * fy, w / 2, dy / 2);
-			path.quadTo(w * 3 / 4, dy * (1 - fy), w, dy / 2);
-			path.lineTo(w, h - dy / 2);
-			path.quadTo(w * 3 / 4, h - dy * fy, w / 2, h - dy / 2);
-			path.quadTo(w / 4, h - dy * (1 - fy), 0, h - dy / 2);
-			path.lineTo(0, dy / 2);
-			path.close();
-			path.end();
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['tape'] = TapeShape;
-
-	// Tape Shape, supports size style
-	function StepShape() { };
-	StepShape.prototype = new mxCylinder();
-	StepShape.prototype.constructor = StepShape;
-	StepShape.prototype.size = 0.2;
-	StepShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		var s =  w * mxUtils.getValue(this.style, 'size', this.size);
-
-		if (!isForeground)
-		{
-			path.moveTo(0, 0);
-			path.lineTo(w - s, 0);
-			path.lineTo(w, h / 2);
-			path.lineTo(w - s, h);
-			path.lineTo(0, h);
-			path.lineTo(s, h / 2);
-			path.close();
-			path.end();
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['step'] = StepShape;
-
-	// Plus Shape
-	function PlusShape()
-	{
-		mxRectangleShape.call(this);
-	};
-	mxUtils.extend(PlusShape, mxRectangleShape);
-	PlusShape.prototype.isHtmlAllowed = function()
-	{
-		return false;
-	};
-	PlusShape.prototype.paintForeground = function(c, x, y, w, h)
-	{
-		var border = Math.min(w / 5, h / 5) + 1;
-		
-		c.begin();
-		c.moveTo(x + w / 2, y + border);
-		c.lineTo(x + w / 2, y + h - border);
-		c.moveTo(x + border, y + h / 2);
-		c.lineTo(x + w - border, y + h / 2);
-		c.end();
-		c.stroke();
-		mxRectangleShape.prototype.paintForeground.apply(this, arguments);
-	};
-
-	mxCellRenderer.prototype.defaultShapes['plus'] = PlusShape;
-
-	// CompositeShape
-	function ExtendedShape()
-	{
-		mxRectangleShape.call(this);
-	};
-	mxUtils.extend(ExtendedShape, mxRectangleShape);
-	ExtendedShape.prototype.isHtmlAllowed = function()
-	{
-		return false;
-	};
-	ExtendedShape.prototype.paintForeground = function(c, x, y, w, h)
-	{
-		if (this.style != null)
-		{
-			if (this.style['double'] == 1)
-			{
-				var inset = Math.max(2, this.strokewidth + 1);
-	
-				mxRectangleShape.prototype.paintBackground.call(this, c, x + inset, y + inset, w - 2 * inset, h - 2 * inset);
-				mxRectangleShape.prototype.paintForeground.apply(this, arguments);
-				
-				x += inset;
-				y += inset;
-				w -= 2 * inset;
-				h -= 2 * inset;
-			}
-			
-			c.setDashed(false);
-			
-			// Draws the symbols defined in the style. The symbols are
-			// numbered from 1...n. Possible postfixes are align,
-			// verticalAlign, spacing, arcSpacing, width, height
-			var counter = 0;
-			var shape = null;
-			
-			do
-			{
-				shape = mxCellRenderer.prototype.defaultShapes[this.style['symbol' + counter]];
-				
-				if (shape != null)
-				{
-					var align = this.style['symbol' + counter + 'Align'];
-					var valign = this.style['symbol' + counter + 'VerticalAlign'];
-					var width = this.style['symbol' + counter + 'Width'];
-					var height = this.style['symbol' + counter + 'Height'];
-					var spacing = this.style['symbol' + counter + 'Spacing'] || 0;
-					var arcspacing = this.style['symbol' + counter + 'ArcSpacing'];
-					
-					if (arcspacing != null)
-					{
-						spacing += this.getArcSize(w + this.strokewidth, h + this.strokewidth) * arcspacing;
-					}
-					
-					var x2 = x;
-					var y2 = y;
-					
-					if (align == mxConstants.ALIGN_CENTER)
-					{
-						x2 += (w - width) / 2;
-					}
-					else if (align == mxConstants.ALIGN_RIGHT)
-					{
-						x2 += w - width - spacing;
-					}
-					else
-					{
-						x2 += spacing;
-					}
-					
-					if (valign == mxConstants.ALIGN_MIDDLE)
-					{
-						y2 += (h - height) / 2;
-					}
-					else if (valign == mxConstants.ALIGN_BOTTOM)
-					{
-						y2 += h - height - spacing;
-					}
-					else
-					{
-						y2 += spacing;
-					}
-					
-					c.save();
-					
-					// Small hack to pass style along into subshape
-					var tmp = new shape();
-					// TODO: Clone style and override settings (eg. strokewidth)
-					tmp.style = this.style;
-					shape.prototype.paintVertexShape.call(tmp, c, x2, y2, width, height);
-					c.restore();
-				}
-				
-				counter++;
-			}
-			while (shape != null);
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['ext'] = ExtendedShape;
-	
-	// Tape Shape, supports size style
-	function MessageShape() { };
-	MessageShape.prototype = new mxCylinder();
-	MessageShape.prototype.constructor = MessageShape;
-	MessageShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		if (isForeground)
-		{
-			path.moveTo(0, 0);
-			path.lineTo(w / 2, h / 2);
-			path.lineTo(w, 0);
-			path.end();
-		}
-		else
-		{
-			path.moveTo(0, 0);
-			path.lineTo(w, 0);
-			path.lineTo(w, h);
-			path.lineTo(0, h);
-			path.close();
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['message'] = MessageShape;
-	
-	// New Actor Shape
-	function UmlActorShape() { };
-	UmlActorShape.prototype = new mxCylinder();
-	UmlActorShape.prototype.constructor = UmlActorShape;
-	UmlActorShape.prototype.addPipe = true;
-	UmlActorShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		var width = w / 3;
-		var height = h / 4;
-		
-		if (!isForeground)
-		{
-			path.moveTo(w / 2, height);
-			path.curveTo(w / 2 - width, height, w / 2 - width, 0, w / 2, 0);
-			path.curveTo(w / 2 + width, 0, w / 2 + width, height, w / 2, height);
-			path.close();
-
-			path.moveTo(w / 2, height);
-			path.lineTo(w / 2, 2 * h / 3);
-			
-			// Arms
-			path.moveTo(w / 2, h / 3);
-			path.lineTo(0, h / 3);
-			path.moveTo(w / 2, h / 3);
-			path.lineTo(w, h / 3);
-			
-			// Legs
-			path.moveTo(w / 2, 2 * h / 3);
-			path.lineTo(0, h);
-			path.moveTo(w / 2, 2 * h / 3);
-			path.lineTo(w, h);
-			path.end();
-		}
-	};
-
-	// Replaces existing actor shape
-	mxCellRenderer.prototype.defaultShapes['umlActor'] = UmlActorShape;
-
-	// New Actor Shape
-	function LollipopShape() { };
-	LollipopShape.prototype = new mxCylinder();
-	LollipopShape.prototype.constructor = LollipopShape;
-	LollipopShape.prototype.size = 10;
-	LollipopShape.prototype.addPipe = true;
-	LollipopShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		var ss = mxUtils.getValue(this.style, 'size', this.size);
-		var width = ss * 2 / 3;
-		var height = ss;
-		
-		if (!isForeground)
-		{
-			path.moveTo(w / 2, height);
-			path.curveTo(w / 2 - width, height, w / 2 - width, 0, w / 2, 0);
-			path.curveTo(w / 2 + width, 0, w / 2 + width, height, w / 2, height);
-			path.close();
-
-			path.moveTo(w / 2, height);
-			path.lineTo(w / 2, h);
-			path.end();
-		}
-	};
-
-	// Replaces existing actor shape
-	mxCellRenderer.prototype.defaultShapes['lollipop'] = LollipopShape;
-	
-	// Folder Shape, supports tabWidth, tabHeight styles
-	function ComponentShape() { };
-	ComponentShape.prototype = new mxCylinder();
-	ComponentShape.prototype.constructor = ComponentShape;
-	ComponentShape.prototype.jettyWidth = 32;
-	ComponentShape.prototype.jettyHeight = 12;
-	ComponentShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
-	{
-		var dx = mxUtils.getValue(this.style, 'jettyWidth', this.jettyWidth);
-		var dy = mxUtils.getValue(this.style, 'jettyHeight', this.jettyHeight);
-		var x0 = dx / 2;
-		var x1 = x0 + dx / 2;
-		var y0 = 0.3 * h - dy / 2;
-		var y1 = 0.7 * h - dy / 2;
-
-		if (isForeground)
-		{
-			path.moveTo(x0, y0);
-			path.lineTo(x1, y0);
-			path.lineTo(x1, y0 + dy);
-			path.lineTo(x0, y0 + dy);
-			path.moveTo(x0, y1);
-			path.lineTo(x1, y1);
-			path.lineTo(x1, y1 + dy);
-			path.lineTo(x0, y1 + dy);
-			path.end();
-		}
-		else
-		{
-			path.moveTo(x0, 0);
-			path.lineTo(w, 0);
-			path.lineTo(w, h);
-			path.lineTo(x0, h);
-			path.lineTo(x0, y1 + dy);
-			path.lineTo(0, y1 + dy);
-			path.lineTo(0, y1);
-			path.lineTo(x0, y1);
-			path.lineTo(x0, y0 + dy);
-			path.lineTo(0, y0 + dy);
-			path.lineTo(0, y0);
-			path.lineTo(x0, y0);
-			path.close();
-			path.end();
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['component'] = ComponentShape;
-	
-	// State Shapes derives from double ellipse
-	function StateShape() { };
-	StateShape.prototype = new mxDoubleEllipse();
-	StateShape.prototype.constructor = StateShape;
-	StateShape.prototype.outerStroke = true;
-	StateShape.prototype.paintVertexShape = function(c, x, y, w, h)
-	{
-		var inset = Math.min(4, Math.min(w / 5, h / 5));
-		
-		if (w > 0 && h > 0)
-		{
-			c.ellipse(x + inset, y + inset, w - 2 * inset, h - 2 * inset);
-			c.fillAndStroke();
-		}
-		
-		c.setShadow(false);
-
-		if (this.outerStroke)
-		{
-			c.ellipse(x, y, w, h);
-			c.stroke();			
-		}
-	};
-
-	mxCellRenderer.prototype.defaultShapes['endState'] = StateShape;
-
-	function StartStateShape() { };
-	StartStateShape.prototype = new StateShape();
-	StartStateShape.prototype.constructor = StartStateShape;
-	StartStateShape.prototype.outerStroke = false;
-	
-	mxCellRenderer.prototype.defaultShapes['startState'] = StartStateShape;
-
-	// Image export for state shapes
-	var imageExportInitShapes = mxImageExport.prototype.initShapes;
-	mxImageExport.prototype.initShapes = function()
-	{
-		imageExportInitShapes.apply(this, arguments);
-
-		function createStateShape(outerStroke)
-		{
-			return {
-				drawShape: function(canvas, state, bounds, background)
-				{
-					var x = bounds.x;
-					var y = bounds.y;
-					var w = bounds.width;
-					var h = bounds.height;
-					
-					if (background)
-					{
-						var inset = Math.min(4, Math.min(w / 5, h / 5));
-						x += inset;
-						y += inset;
-						w -= 2 * inset;
-						h -= 2 * inset;
-						
-						if (w > 0 && h > 0)
-						{
-							canvas.ellipse(x, y, w, h);
-						}
-						
-						return true;
-					}
-					else
-					{
-						canvas.fillAndStroke();
-		
-						if (outerStroke)
-						{
-							canvas.ellipse(x, y, w, h);
-							canvas.stroke();
-						}
-					}
-				}
-			};
-		};
-		
-		this.shapes['endState'] = createStateShape(true);
-		this.shapes['startState'] = createStateShape(false);
-	};
-
-	// Defines custom edge shape
-	function LinkShape()
-	{
-		mxArrow.call(this);
-	};
-	mxUtils.extend(LinkShape, mxArrow);
-	LinkShape.prototype.paintEdgeShape = function(c, pts)
-	{
-		var width = 10;
-
-		// Base vector (between end points)
-		var p0 = pts[0];
-		var pe = pts[pts.length - 1];
-		
-		var dx = pe.x - p0.x;
-		var dy = pe.y - p0.y;
-		var dist = Math.sqrt(dx * dx + dy * dy);
-		var length = dist;
-		
-		// Computes the norm and the inverse norm
-		var nx = dx / dist;
-		var ny = dy / dist;
-		var basex = length * nx;
-		var basey = length * ny;
-		var floorx = width * ny/3;
-		var floory = -width * nx/3;
-		
-		// Computes points
-		var p0x = p0.x - floorx / 2;
-		var p0y = p0.y - floory / 2;
-		var p1x = p0x + floorx;
-		var p1y = p0y + floory;
-		var p2x = p1x + basex;
-		var p2y = p1y + basey;
-		var p3x = p2x + floorx;
-		var p3y = p2y + floory;
-		// p4 not necessary
-		var p5x = p3x - 3 * floorx;
-		var p5y = p3y - 3 * floory;
-		
-		c.begin();
-		c.moveTo(p1x, p1y);
-		c.lineTo(p2x, p2y);
-		c.moveTo(p5x + floorx, p5y + floory);
-		c.lineTo(p0x, p0y);
-		c.stroke();
-	};
-
-	// Registers the link shape
-	mxCellRenderer.prototype.defaultShapes['link'] = LinkShape;
-
-	// Registers and defines the custom marker
-	mxMarker.addMarker('dash', function(canvas, shape, type, pe, unitX, unitY, size, source, sw, filled)
-	{
-		var nx = unitX * (size + sw + 1);
-		var ny = unitY * (size + sw + 1);
-
-		return function()
-		{
-			canvas.begin();
-			canvas.moveTo(pe.x - nx / 2 - ny / 2, pe.y - ny / 2 + nx / 2);
-			canvas.lineTo(pe.x + ny / 2 - 3 * nx / 2, pe.y - 3 * ny / 2 - nx / 2);
-			canvas.stroke();
-		};
-	});
-
-	// Implements custom handlers
-	var SPECIAL_HANDLE_INDEX = -99;
-
-	// Handlers are only added if mxVertexHandler is defined (ie. not in embedded graph)
-	if (typeof(mxVertexHandler) != 'undefined')
-	{
-		function mxExtVertexHandler(state)
-		{
-			mxVertexHandler.call(this, state);
-		};
-	
-		mxUtils.extend(mxExtVertexHandler, mxVertexHandler);
-	
-		mxExtVertexHandler.prototype.useGridForSpecialHandle = false;
-		
-		mxExtVertexHandler.prototype.init = function()
-		{
-			this.horizontal = mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true);
-			var graph = this.state.view.graph;
-	
-			if (this.handleImage != null)
-			{
-				var bounds = new mxRectangle(0, 0, this.handleImage.width, this.handleImage.height);
-				this.specialHandle = new mxImageShape(bounds, this.handleImage.src);
-			}
-			else
-			{
-				var size = 10;
-				var bounds = new mxRectangle(0, 0, size, size);
-				this.specialHandle = new mxRhombus(bounds, mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);
-			}
-			
-			this.specialHandle.dialect = (graph.dialect != mxConstants.DIALECT_SVG) ?
-					mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG;
-			this.specialHandle.init(graph.getView().getOverlayPane());
-			this.specialHandle.node.style.cursor = this.getSpecialHandleCursor();
-	
-			mxEvent.redirectMouseEvents(this.specialHandle.node, graph, this.state);
-			mxVertexHandler.prototype.init.apply(this, arguments);
-		};
-		
-		mxExtVertexHandler.prototype.getSpecialHandleCursor = function()
-		{
-			return 'default';
-		};
-		
-		mxExtVertexHandler.prototype.redraw = function()
-		{
-			mxVertexHandler.prototype.redraw.apply(this, arguments);
-	
-			var size = this.specialHandle.bounds.width;
-			this.specialHandle.bounds = this.getSpecialHandleBounds(size);
-			this.specialHandle.redraw();
-		};
-
-		mxExtVertexHandler.prototype.destroy = function()
-		{
-			mxVertexHandler.prototype.destroy.apply(this, arguments);
-			
-			if (this.specialHandle != null)
-			{
-				this.specialHandle.destroy();
-				this.specialHandle = null;
-			}
-		};
-		
-		mxExtVertexHandler.prototype.getHandleForEvent = function(me)
-		{
-			if (me.isSource(this.specialHandle))
-			{
-				return SPECIAL_HANDLE_INDEX;
-			}
-			
-			return mxVertexHandler.prototype.getHandleForEvent.apply(this, arguments);
-		};
-
-		mxExtVertexHandler.prototype.mouseMove = function(sender, me)
-		{
-			if (!me.isConsumed() && this.index == SPECIAL_HANDLE_INDEX)
-			{
-				var point = new mxPoint(me.getGraphX(), me.getGraphY());
-				this.constrainPoint(point);
-				var gridEnabled = this.graph.isGridEnabledEvent(me.getEvent());
-				var scale = this.graph.getView().scale;
-				
-				if (gridEnabled && this.useGridForSpecialHandle)
-				{
-					point.x = this.graph.snap(point.x / scale) * scale;
-					point.y = this.graph.snap(point.y / scale) * scale;
-				}
-				
-				this.updateStyle(point);			
-				this.moveSizerTo(this.specialHandle, point.x, point.y);
-				this.state.view.graph.cellRenderer.redraw(this.state, true);
-				me.consume();
-			}
-			else
-			{
-				mxVertexHandler.prototype.mouseMove.apply(this, arguments);
-			}
-		};
-
-		mxExtVertexHandler.prototype.mouseUp = function(sender, me)
-		{
-			if (!me.isConsumed() && this.index == SPECIAL_HANDLE_INDEX)
-			{
-				this.applyStyle();
-				this.reset();
-				me.consume();
-			}
-			else
-			{
-				mxVertexHandler.prototype.mouseUp.apply(this, arguments);
-			}
-		};
-
-		mxExtVertexHandler.prototype.getSpecialHandleBounds = function(size)
-		{
-			var rotation = this.state.shape.getShapeRotation();
-			var alpha = mxUtils.toRadians(rotation);
-			var cos = Math.cos(alpha);
-			var sin = Math.sin(alpha);
-			
-			var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
-			
-			if (this.state.shape.isPaintBoundsInverted())
-			{
-				var t = (bounds.width - bounds.height) / 2;
-				bounds.x += t;
-				bounds.y -= t;
-				var tmp = bounds.width;
-				bounds.width = bounds.height;
-				bounds.height = tmp;
-			}
-	
-			var pt = this.getSpecialHandlePoint(bounds);
-
-			if (this.state.shape.flipH)
-			{
-				pt.x = 2 * bounds.x + bounds.width - pt.x;
-			}
-			
-			if (this.state.shape.flipV)
-			{
-				pt.y = 2 * bounds.y + bounds.height - pt.y;
-			}
-			
-			pt = mxUtils.getRotatedPoint(pt, cos, sin,
-				new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
-
-			return new mxRectangle(pt.x - size / 2, pt.y - size / 2, size, size);
-		};
-		
-		mxExtVertexHandler.prototype.getSpecialHandlePoint = function(bounds)
-		{
-			// Hook for subclassers
-			return null;
-		};
-	
-		mxExtVertexHandler.prototype.updateStyle = function(point)
-		{
-			// Hook for subclassers
-		};
-		
-		mxExtVertexHandler.prototype.constrainPoint = function(point)
-		{
-			point.x = Math.max(this.state.x, Math.min(this.state.x + this.state.width, point.x));
-			point.y = Math.max(this.state.y, Math.min(this.state.y + this.state.height, point.y));
-		};
-		
-		mxExtVertexHandler.prototype.applyStyle = function()
-		{
-			// Hook for subclassers
-		};
-
-		// Folder Handler
-		function mxFolderHandler(state)
-		{
-			mxExtVertexHandler.call(this, state);
-		};
-	
-		mxUtils.extend(mxFolderHandler, mxExtVertexHandler);
-
-		mxFolderHandler.prototype.getSpecialHandlePoint = function(bounds)
-		{
-			var scale = this.graph.getView().scale;
-			var tw = Math.min(bounds.width, mxUtils.getValue(this.state.style, 'tabWidth', 60) * scale);
-			var th = Math.min(bounds.height, mxUtils.getValue(this.state.style, 'tabHeight', 20) * scale);
-			
-			var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right');
-			var x = (tp == 'left') ? bounds.x + tw : bounds.x + bounds.width - tw;
-	
-			return new mxPoint(x, bounds.y + th);
-		};
-		
-		mxFolderHandler.prototype.updateStyle = function(point)
-		{
-			var rotation = this.state.shape.getShapeRotation();
-			var alpha = mxUtils.toRadians(rotation);
-			var cos = Math.cos(-alpha);
-			var sin = Math.sin(-alpha);
-
-			var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
-			
-			if (this.state.shape.isPaintBoundsInverted())
-			{
-				var t = (bounds.width - bounds.height) / 2;
-				bounds.x += t;
-				bounds.y -= t;
-				var tmp = bounds.width;
-				bounds.width = bounds.height;
-				bounds.height = tmp;
-			}
-	
-			var pt = new mxPoint(point.x, point.y);
-			pt = mxUtils.getRotatedPoint(pt, cos, sin,
-				new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
-
-			if (this.state.shape.flipH)
-			{
-				pt.x = 2 * bounds.x + bounds.width - pt.x;
-			}
-			
-			if (this.state.shape.flipV)
-			{
-				pt.y = 2 * bounds.y + bounds.height - pt.y;
-			}
-			
-			var result = this.updateStyleUnrotated(pt, bounds);
-		
-			// Modifies point to use rotated coordinates of return value
-			if (result != null)
-			{
-				if (this.state.shape.flipH)
-				{
-					result.x = 2 * bounds.x + bounds.width - result.x;
-				}
-				
-				if (this.state.shape.flipV)
-				{
-					result.y = 2 * bounds.y + bounds.height - result.y;
-				}
-				
-				cos = Math.cos(alpha);
-				sin = Math.sin(alpha);
-				result = mxUtils.getRotatedPoint(result, cos, sin,
-						new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
-				point.x = result.x;
-				point.y = result.y;
-			}
-		};
-		
-		mxFolderHandler.prototype.updateStyleUnrotated = function(pt, bounds)
-		{
-			var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right');
-			var tw = (tp == 'left') ? pt.x - bounds.x : bounds.x + bounds.width - pt.x;
-			var th = pt.y - bounds.y;
-			
-			var scale = this.graph.getView().scale;
-			this.state.style['tabWidth'] = Math.round(Math.max(1, tw) / scale);
-			this.state.style['tabHeight'] =  Math.round(Math.max(1, th) / scale);
-		};
-		
-		mxFolderHandler.prototype.applyStyle = function()
-		{
-			var model = this.graph.getModel();
-			model.beginUpdate();
-			try
-			{
-				this.state.view.graph.setCellStyles('tabWidth', this.state.style['tabWidth'], [this.state.cell]);
-				this.state.view.graph.setCellStyles('tabHeight', this.state.style['tabHeight'], [this.state.cell]);
-			}
-			finally
-			{
-				model.endUpdate();
-			}
-		};
-		
-		// Swimlane Handler
-		function mxSwimlaneHandler(state)
-		{
-			mxFolderHandler.call(this, state);
-		};
-		
-		mxUtils.extend(mxSwimlaneHandler, mxFolderHandler);
-		
-		mxSwimlaneHandler.prototype.getSpecialHandlePoint = function(bounds)
-		{
-			var scale = this.graph.getView().scale;
-			var startSize = mxUtils.getValue(this.state.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE);
-
-			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + Math.min(bounds.height, startSize * scale));
-		};
-		
-		mxSwimlaneHandler.prototype.updateStyleUnrotated = function(point, bounds)
-		{
-			point.x = bounds.x + bounds.width / 2;
-			startSize = point.y - bounds.y;
-			var scale = this.graph.getView().scale;
-			this.state.style['startSize'] = Math.round(Math.max(1, startSize) / scale);
-			
-			return point;
-		};
-		
-		mxSwimlaneHandler.prototype.applyStyle = function()
-		{
-			this.state.view.graph.setCellStyles('startSize', this.state.style['startSize'], [this.state.cell]);
-		};
-
-		// Cube Handler
-		function mxCubeHandler(state)
-		{
-			mxFolderHandler.call(this, state);
-		};
-	
-		mxUtils.extend(mxCubeHandler, mxFolderHandler);
-		
-		mxCubeHandler.prototype.defaultValue = 20;
-	
-		mxCubeHandler.prototype.scaleFactor = 1;
-		
-		mxCubeHandler.prototype.getSpecialHandlePoint = function(bounds)
-		{
-			var scale = this.graph.getView().scale;
-			var sz = Math.min(bounds.width, Math.min(bounds.height,
-				mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor));
-			
-			return new mxPoint(bounds.x + sz, bounds.y + sz);
-		};
-	
-		mxCubeHandler.prototype.updateStyleUnrotated = function(pt, bounds)
-		{
-			var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x),
-					Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y)));
-			var scale = this.graph.getView().scale;
-			this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor;
-			
-			// Stays on the diagonal
-			return new mxPoint(bounds.x + size, bounds.y + size);
-		};
-		
-		mxCubeHandler.prototype.applyStyle = function()
-		{
-			this.state.view.graph.setCellStyles('size', this.state.style['size'], [this.state.cell]);
-		};
-		
-		// Card Handler
-		function mxCardHandler(state)
-		{
-			mxCubeHandler.call(this, state);
-		};
-	
-		mxUtils.extend(mxCardHandler, mxCubeHandler);
-		
-		mxCardHandler.prototype.defaultValue = 30;
-	
-		mxCardHandler.prototype.scaleFactor = 2;
-		
-		// Note Handler
-		function mxNoteHandler(state)
-		{
-			mxCubeHandler.call(this, state);
-		};
-	
-		mxUtils.extend(mxNoteHandler, mxCubeHandler);
-		
-		mxNoteHandler.prototype.defaultValue = 30;
-	
-		mxNoteHandler.prototype.scaleFactor = 1;
-		
-		mxNoteHandler.prototype.getSpecialHandlePoint = function(bounds)
-		{
-			var scale = this.graph.getView().scale;
-			var sz = Math.min(bounds.width, Math.min(bounds.height,
-					mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor));
-			
-			return new mxPoint(bounds.x + bounds.width - sz, bounds.y + sz);
-		};
-		
-		mxNoteHandler.prototype.updateStyleUnrotated = function(pt, bounds)
-		{
-			var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x + bounds.width),
-					Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y)));
-			var scale = this.graph.getView().scale;
-			this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor;
-			
-			// Stays on the diagonal
-			return new mxPoint(bounds.x + bounds.width - size, bounds.y + size);
-		};
-		
-		// Step Handler
-		function mxStepHandler(state)
-		{
-			mxCubeHandler.call(this, state);
-		};
-	
-		mxUtils.extend(mxStepHandler, mxCubeHandler);
-		
-		mxStepHandler.prototype.defaultValue = 0.2;
-	
-		mxStepHandler.prototype.scaleFactor = 1;
-		
-		mxStepHandler.prototype.getSpecialHandlePoint = function(bounds)
-		{
-			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
-			
-			return new mxPoint(bounds.x + bounds.width * sz, bounds.y + bounds.height / 2);
-		};
-	
-		mxStepHandler.prototype.updateStyleUnrotated = function(pt, bounds)
-		{
-			var size = Math.min(1, (pt.x - bounds.x) / bounds.width);
-			this.state.style['size'] = size;
-			
-			return new mxPoint(bounds.x + size * bounds.width, bounds.y + bounds.height / 2);
-		};
-		
-		// Tape Handler
-		function mxTapeHandler(state)
-		{
-			mxCubeHandler.call(this, state);
-		};
-	
-		mxUtils.extend(mxTapeHandler, mxCubeHandler);
-		
-		mxTapeHandler.prototype.defaultValue = 0.4;
-	
-		mxTapeHandler.prototype.scaleFactor = 1;
-		
-		mxTapeHandler.prototype.getSpecialHandlePoint = function(bounds)
-		{
-			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
-	
-			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + sz * bounds.height / 2);
-		};
-	
-		mxTapeHandler.prototype.updateStyleUnrotated = function(pt, bounds)
-		{
-			var size = Math.max(0, Math.min(1, ((pt.y - bounds.y) / bounds.height) * 2));
-			this.state.style['size'] = size;
-			
-			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + size * bounds.height / 2);
-		};
-		
-		var handlers = {'swimlane': mxSwimlaneHandler, 'folder': mxFolderHandler, 'cube': mxCubeHandler,
-				'card': mxCardHandler, 'note': mxNoteHandler, 'step': mxStepHandler, 'tape': mxTapeHandler};
-
-		var mxGraphCreateHandler = mxGraph.prototype.createHandler;
-		mxGraph.prototype.createHandler = function(state)
-		{
-			if (state != null)
-			{
-				var ctor = handlers[state.style['shape']];
-
-				if (ctor != null)
-				{
-					return new ctor(state);
-				}
-			}
-			
-			return mxGraphCreateHandler.apply(this, arguments);
-		};
-	}
-	
-	// Constraints
-	mxGraph.prototype.getAllConnectionConstraints = function(terminal, source)
-	{
-		if (terminal != null && terminal.shape != null)
-		{
-			if (terminal.shape.stencil != null)
-			{
-				if (terminal.shape.stencil != null)
-				{
-					return terminal.shape.stencil.constraints;
-				}
-			}
-			else if (terminal.shape.constraints != null)
-			{
-				return terminal.shape.constraints;
-			}
-		}
-
-		return null;
-	};
-
-	mxRectangleShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
-	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
-	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
-	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.25), true),
-	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
-	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
-	mxLabel.prototype.constraints = mxRectangleShape.prototype.constraints;
-	mxImageShape.prototype.constraints = mxRectangleShape.prototype.constraints;
-	mxSwimlane.prototype.constraints = mxRectangleShape.prototype.constraints;
-	PlusShape.prototype.constraints = mxRectangleShape.prototype.constraints;
-	NoteShape.prototype.constraints = mxRectangleShape.prototype.constraints;
-	CardShape.prototype.constraints = mxRectangleShape.prototype.constraints;
-	CubeShape.prototype.constraints = mxRectangleShape.prototype.constraints;
-	FolderShape.prototype.constraints = mxRectangleShape.prototype.constraints;
-	mxCylinder.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.15, 0.05), false),
-                                        new mxConnectionConstraint(new mxPoint(0.5, 0), true),
-                                        new mxConnectionConstraint(new mxPoint(0.85, 0.05), false),
-      	              		 new mxConnectionConstraint(new mxPoint(0, 0.3), true),
-      	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
-      	              		 new mxConnectionConstraint(new mxPoint(0, 0.7), true),
-      	            		 new mxConnectionConstraint(new mxPoint(1, 0.3), true),
-      	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
-      	            		 new mxConnectionConstraint(new mxPoint(1, 0.7), true),
-      	            		 new mxConnectionConstraint(new mxPoint(0.15, 0.95), false),
-      	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
-      	            		 new mxConnectionConstraint(new mxPoint(0.85, 0.95), false)];
-	UmlActorShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.1), false),
-	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), false),
-	                                          new mxConnectionConstraint(new mxPoint(0.75, 0.1), false),
-	        	              		 new mxConnectionConstraint(new mxPoint(0, 1/3), false),
-	        	              		 new mxConnectionConstraint(new mxPoint(0, 1), false),
-	        	            		 new mxConnectionConstraint(new mxPoint(1, 1/3), false),
-	        	            		 new mxConnectionConstraint(new mxPoint(1, 1), false),
-	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 0.5), false)];
-	ComponentShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
-	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
-	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
-	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.3), true),
-	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.7), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
-	        	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
-	mxActor.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), true),
-   	              		 new mxConnectionConstraint(new mxPoint(0.25, 0.2), false),
-   	              		 new mxConnectionConstraint(new mxPoint(0.1, 0.5), false),
-   	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
-   	            		 new mxConnectionConstraint(new mxPoint(0.75, 0.25), false),
-   	            		 new mxConnectionConstraint(new mxPoint(0.9, 0.5), false),
-   	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
-   	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
-   	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
-   	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
-	TapeShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.35), false),
-	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), false),
-	                                   new mxConnectionConstraint(new mxPoint(0, 0.65), false),
-	                                   new mxConnectionConstraint(new mxPoint(1, 0.35), false),
-		                                new mxConnectionConstraint(new mxPoint(1, 0.5), false),
-		                                new mxConnectionConstraint(new mxPoint(1, 0.65), false),
-										new mxConnectionConstraint(new mxPoint(0.25, 1), false),
-										new mxConnectionConstraint(new mxPoint(0.75, 0), false)];
-	// TODO: Relative ports
-	StepShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
-                                       new mxConnectionConstraint(new mxPoint(0.5, 0), true),
-                                       new mxConnectionConstraint(new mxPoint(0.75, 0), true),
-                                       new mxConnectionConstraint(new mxPoint(0.25, 1), true),
-  	        	            		 	new mxConnectionConstraint(new mxPoint(0.5, 1), true),
-  	        	            		 	new mxConnectionConstraint(new mxPoint(0.75, 1), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.1, 0.25), false),
-	                                   new mxConnectionConstraint(new mxPoint(0.2, 0.5), false),
-	                                   new mxConnectionConstraint(new mxPoint(0.1, 0.75), false),
-	                                   new mxConnectionConstraint(new mxPoint(0.9, 0.25), false),
-		                                new mxConnectionConstraint(new mxPoint(1, 0.5), false),
-		                                new mxConnectionConstraint(new mxPoint(0.9, 0.75), false)];
-	mxLine.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.5), false),
-	                                new mxConnectionConstraint(new mxPoint(0.25, 0.5), false),
-	                                new mxConnectionConstraint(new mxPoint(0.75, 0.5), false),
-									new mxConnectionConstraint(new mxPoint(1, 0.5), false)];
-	LollipopShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), false),
-										new mxConnectionConstraint(new mxPoint(0.5, 1), false)];
-	mxEllipse.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0), true), new mxConnectionConstraint(new mxPoint(1, 0), true),
-	                                   new mxConnectionConstraint(new mxPoint(0, 1), true), new mxConnectionConstraint(new mxPoint(1, 1), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.5, 0), true), new mxConnectionConstraint(new mxPoint(0.5, 1), true),
-	          	              		   new mxConnectionConstraint(new mxPoint(0, 0.5), true), new mxConnectionConstraint(new mxPoint(1, 0.5))];
-	mxDoubleEllipse.prototype.constraints = mxEllipse.prototype.constraints;
-	mxRhombus.prototype.constraints = mxEllipse.prototype.constraints;
-	mxTriangle.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.25), true),
-	                                    new mxConnectionConstraint(new mxPoint(0, 0.5), true),
-	                                   new mxConnectionConstraint(new mxPoint(0, 0.75), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.5, 0), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.5, 1), true),
-	                                   new mxConnectionConstraint(new mxPoint(1, 0.5), true)];
-	mxHexagon.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.375, 0), true),
-	                                    new mxConnectionConstraint(new mxPoint(0.5, 0), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.625, 0), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.125, 0.25), false),
-	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.125, 0.75), false),
-	                                   new mxConnectionConstraint(new mxPoint(0.875, 0.25), false),
-	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), true),
-	                                   new mxConnectionConstraint(new mxPoint(1, 0.5), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.875, 0.75), false),
-	                                   new mxConnectionConstraint(new mxPoint(0.375, 1), true),
-	                                    new mxConnectionConstraint(new mxPoint(0.5, 1), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.625, 1), true)];
-	mxCloud.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.25), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.4, 0.1), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.16, 0.55), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.07, 0.4), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.31, 0.8), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.13, 0.77), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.8, 0.8), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.55, 0.95), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.875, 0.5), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.96, 0.7), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.625, 0.2), false),
-	                                 new mxConnectionConstraint(new mxPoint(0.88, 0.25), false)];
-	mxArrow.prototype.constraints = null;
-})();
+var _0x7bc4=["\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x73\x74\x72\x75\x63\x74\x6F\x72","\x73\x69\x7A\x65","\x72\x65\x64\x72\x61\x77\x50\x61\x74\x68","\x73\x74\x79\x6C\x65","\x67\x65\x74\x56\x61\x6C\x75\x65","\x6D\x69\x6E","\x6D\x6F\x76\x65\x54\x6F","\x6C\x69\x6E\x65\x54\x6F","\x65\x6E\x64","\x63\x6C\x6F\x73\x65","\x63\x75\x62\x65","\x64\x65\x66\x61\x75\x6C\x74\x53\x68\x61\x70\x65\x73","\x6E\x6F\x74\x65","\x74\x61\x62\x57\x69\x64\x74\x68","\x74\x61\x62\x48\x65\x69\x67\x68\x74","\x74\x61\x62\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x72\x69\x67\x68\x74","\x6C\x65\x66\x74","\x66\x6F\x6C\x64\x65\x72","\x63\x61\x72\x64","\x71\x75\x61\x64\x54\x6F","\x74\x61\x70\x65","\x73\x74\x65\x70","\x63\x61\x6C\x6C","\x65\x78\x74\x65\x6E\x64","\x69\x73\x48\x74\x6D\x6C\x41\x6C\x6C\x6F\x77\x65\x64","\x70\x61\x69\x6E\x74\x46\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64","\x62\x65\x67\x69\x6E","\x73\x74\x72\x6F\x6B\x65","\x61\x70\x70\x6C\x79","\x70\x6C\x75\x73","\x64\x6F\x75\x62\x6C\x65","\x73\x74\x72\x6F\x6B\x65\x77\x69\x64\x74\x68","\x6D\x61\x78","\x70\x61\x69\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x73\x65\x74\x44\x61\x73\x68\x65\x64","\x73\x79\x6D\x62\x6F\x6C","\x41\x6C\x69\x67\x6E","\x56\x65\x72\x74\x69\x63\x61\x6C\x41\x6C\x69\x67\x6E","\x57\x69\x64\x74\x68","\x48\x65\x69\x67\x68\x74","\x53\x70\x61\x63\x69\x6E\x67","\x41\x72\x63\x53\x70\x61\x63\x69\x6E\x67","\x67\x65\x74\x41\x72\x63\x53\x69\x7A\x65","\x41\x4C\x49\x47\x4E\x5F\x43\x45\x4E\x54\x45\x52","\x41\x4C\x49\x47\x4E\x5F\x52\x49\x47\x48\x54","\x41\x4C\x49\x47\x4E\x5F\x4D\x49\x44\x44\x4C\x45","\x41\x4C\x49\x47\x4E\x5F\x42\x4F\x54\x54\x4F\x4D","\x73\x61\x76\x65","\x70\x61\x69\x6E\x74\x56\x65\x72\x74\x65\x78\x53\x68\x61\x70\x65","\x72\x65\x73\x74\x6F\x72\x65","\x65\x78\x74","\x6D\x65\x73\x73\x61\x67\x65","\x61\x64\x64\x50\x69\x70\x65","\x63\x75\x72\x76\x65\x54\x6F","\x75\x6D\x6C\x41\x63\x74\x6F\x72","\x6C\x6F\x6C\x6C\x69\x70\x6F\x70","\x6A\x65\x74\x74\x79\x57\x69\x64\x74\x68","\x6A\x65\x74\x74\x79\x48\x65\x69\x67\x68\x74","\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74","\x6F\x75\x74\x65\x72\x53\x74\x72\x6F\x6B\x65","\x65\x6C\x6C\x69\x70\x73\x65","\x66\x69\x6C\x6C\x41\x6E\x64\x53\x74\x72\x6F\x6B\x65","\x73\x65\x74\x53\x68\x61\x64\x6F\x77","\x65\x6E\x64\x53\x74\x61\x74\x65","\x73\x74\x61\x72\x74\x53\x74\x61\x74\x65","\x69\x6E\x69\x74\x53\x68\x61\x70\x65\x73","\x78","\x79","\x77\x69\x64\x74\x68","\x68\x65\x69\x67\x68\x74","\x73\x68\x61\x70\x65\x73","\x70\x61\x69\x6E\x74\x45\x64\x67\x65\x53\x68\x61\x70\x65","\x6C\x65\x6E\x67\x74\x68","\x73\x71\x72\x74","\x6C\x69\x6E\x6B","\x64\x61\x73\x68","\x61\x64\x64\x4D\x61\x72\x6B\x65\x72","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x75\x73\x65\x47\x72\x69\x64\x46\x6F\x72\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65","\x69\x6E\x69\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x73\x74\x61\x74\x65","\x67\x72\x61\x70\x68","\x76\x69\x65\x77","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x67\x65","\x73\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65","\x73\x72\x63","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x44\x49\x41\x4C\x45\x43\x54\x5F\x56\x4D\x4C","\x67\x65\x74\x4F\x76\x65\x72\x6C\x61\x79\x50\x61\x6E\x65","\x67\x65\x74\x56\x69\x65\x77","\x63\x75\x72\x73\x6F\x72","\x6E\x6F\x64\x65","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65\x43\x75\x72\x73\x6F\x72","\x72\x65\x64\x69\x72\x65\x63\x74\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74\x73","\x64\x65\x66\x61\x75\x6C\x74","\x72\x65\x64\x72\x61\x77","\x62\x6F\x75\x6E\x64\x73","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65\x42\x6F\x75\x6E\x64\x73","\x64\x65\x73\x74\x72\x6F\x79","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x46\x6F\x72\x45\x76\x65\x6E\x74","\x69\x73\x53\x6F\x75\x72\x63\x65","\x6D\x6F\x75\x73\x65\x4D\x6F\x76\x65","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74\x47\x72\x61\x70\x68\x58","\x67\x65\x74\x47\x72\x61\x70\x68\x59","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x50\x6F\x69\x6E\x74","\x67\x65\x74\x45\x76\x65\x6E\x74","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64\x45\x76\x65\x6E\x74","\x73\x63\x61\x6C\x65","\x73\x6E\x61\x70","\x75\x70\x64\x61\x74\x65\x53\x74\x79\x6C\x65","\x6D\x6F\x76\x65\x53\x69\x7A\x65\x72\x54\x6F","\x63\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72","\x63\x6F\x6E\x73\x75\x6D\x65","\x6D\x6F\x75\x73\x65\x55\x70","\x61\x70\x70\x6C\x79\x53\x74\x79\x6C\x65","\x72\x65\x73\x65\x74","\x67\x65\x74\x53\x68\x61\x70\x65\x52\x6F\x74\x61\x74\x69\x6F\x6E","\x73\x68\x61\x70\x65","\x74\x6F\x52\x61\x64\x69\x61\x6E\x73","\x63\x6F\x73","\x73\x69\x6E","\x69\x73\x50\x61\x69\x6E\x74\x42\x6F\x75\x6E\x64\x73\x49\x6E\x76\x65\x72\x74\x65\x64","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65\x50\x6F\x69\x6E\x74","\x66\x6C\x69\x70\x48","\x66\x6C\x69\x70\x56","\x67\x65\x74\x43\x65\x6E\x74\x65\x72\x58","\x67\x65\x74\x43\x65\x6E\x74\x65\x72\x59","\x67\x65\x74\x52\x6F\x74\x61\x74\x65\x64\x50\x6F\x69\x6E\x74","\x75\x70\x64\x61\x74\x65\x53\x74\x79\x6C\x65\x55\x6E\x72\x6F\x74\x61\x74\x65\x64","\x72\x6F\x75\x6E\x64","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x63\x65\x6C\x6C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x72\x74\x53\x69\x7A\x65","\x64\x65\x66\x61\x75\x6C\x74\x56\x61\x6C\x75\x65","\x73\x63\x61\x6C\x65\x46\x61\x63\x74\x6F\x72","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x41\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x73\x74\x65\x6E\x63\x69\x6C","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73"];(function(){function _0x9051x1(){}_0x9051x1[_0x7bc4[0]]=  new mxCylinder();_0x9051x1[_0x7bc4[0]][_0x7bc4[1]]= _0x9051x1;_0x9051x1[_0x7bc4[0]][_0x7bc4[2]]= 20;_0x9051x1[_0x7bc4[0]][_0x7bc4[3]]= function(_0x9051x2,_0x9051x3,_0x9051x4,_0x9051x5,_0x9051x6,_0x9051x7){var _0x9051x8=Math[_0x7bc4[6]](_0x9051x5,Math[_0x7bc4[6]](_0x9051x6,mxUtils[_0x7bc4[5]](this[_0x7bc4[4]],_0x7bc4[2],this[_0x7bc4[2]])));if(_0x9051x7){_0x9051x2[_0x7bc4[7]](_0x9051x8,_0x9051x6);_0x9051x2[_0x7bc4[8]](_0x9051x8,_0x9051x8);_0x9051x2[_0x7bc4[8]](0,0);_0x9051x2[_0x7bc4[7]](_0x9051x8,_0x9051x8);_0x9051x2[_0x7bc4[8]](_0x9051x5,_0x9051x8);_0x9051x2[_0x7bc4[9]]()}else {_0x9051x2[_0x7bc4[7]](0,0);_0x9051x2[_0x7bc4[8]](_0x9051x5- _0x9051x8,0);_0x9051x2[_0x7bc4[8]](_0x9051x5,_0x9051x8);_0x9051x2[_0x7bc4[8]](_0x9051x5,_0x9051x6);_0x9051x2[_0x7bc4[8]](_0x9051x8,_0x9051x6);_0x9051x2[_0x7bc4[8]](0,_0x9051x6- _0x9051x8);_0x9051x2[_0x7bc4[8]](0,0);_0x9051x2[_0x7bc4[10]]();_0x9051x2[_0x7bc4[9]]()}};mxCellRenderer[_0x7bc4[0]][_0x7bc4[12]][_0x7bc4[11]]= _0x9051x1;function _0x9051x9(){}_0x9051x9[_0x7bc4[0]]=  new mxCylinder();_0x9051x9[_0x7bc4[0]][_0x7bc4[1]]= _0x9051x9;_0x9051x9[_0x7bc4[0]][_0x7bc4[2]]= 30;_0x9051x9[_0x7bc4[0]][_0x7bc4[3]]= function(_0x9051x2,_0x9051x3,_0x9051x4,_0x9051x5,_0x9051x6,_0x9051x7){var _0x9051x8=Math[_0x7bc4[6]](_0x9051x5,Math[_0x7bc4[6]](_0x9051x6,mxUtils[_0x7bc4[5]](this[_0x7bc4[4]],_0x7bc4[2],this[_0x7bc4[2]])));if(_0x9051x7){_0x9051x2[_0x7bc4[7]](_0x9051x5- _0x9051x8,0);_0x9051x2[_0x7bc4[8]](_0x9051x5- _0x9051x8,_0x9051x8);_0x9051x2[_0x7bc4[8]](_0x9051x5,_0x9051x8);_0x9051x2[_0x7bc4[9]]()}else {_0x9051x2[_0x7bc4[7]](0,0);_0x9051x2[_0x7bc4[8]](_0x9051x5- _0x9051x8,0);_0x9051x2[_0x7bc4[8]](_0x9051x5,_0x9051x8);_0x9051x2[_0x7bc4[8]](_0x9051x5,_0x9051x6);_0x9051x2[_0x7bc4[8]](0,_0x9051x6);_0x9051x2[_0x7bc4[8]](0,0);_0x9051x2[_0x7bc4[10]]();_0x9051x2[_0x7bc4[9]]()}};mxCellRenderer[_0x7bc4[0]][_0x7bc4[12]][_0x7bc4[13]]= _0x9051x9;function _0x9051xa(){}_0x9051xa[_0x7bc4[0]]=  new mxCylinder();_0x9051xa[_0x7bc4[0]][_0x7bc4[1]]= _0x9051xa;_0x9051xa[_0x7bc4[0]][_0x7bc4[14]]= 60;_0x9051xa[_0x7bc4[0]][_0x7bc4[15]]= 20;_0x9051xa[_0x7bc4[0]][_0x7bc4[16]]= _0x7bc4[17];_0x9051xa[_0x7bc4[0]][_0x7bc4[3]]= function(_0x9051x2,_0x9051x3,_0x9051x4,_0x9051x5,_0x9051x6,_0x9051x7){var _0x9051xb=mxUtils[_0x7bc4[5]](this[_0x7bc4[4]],_0x7bc4[14],this[_0x7bc4[14]]);var _0x9051xc=mxUtils[_0x7bc4[5]](this[_0x7bc4[4]],_0x7bc4[15],this[_0x7bc4[15]]);var _0x9051xd=mxUtils[_0x7bc4[5]](this[_0x7bc4[4]],_0x7bc4[16],this[_0x7bc4[16]]);var _0x9051xe=Math[_0x7bc4[6]](_0x9051x5,_0x9051xb);var _0x9051xf=Math[_0x7bc4[6]](_0x9051x6,_0x9051xc);if(_0x9051x7){if(_0x9051xd== _0x7bc4[18]){_0x9051x2[_0x7bc4[7]](0,_0x9051xf);_0x9051x2[_0x7bc4[8]](_0x9051xe,_0x9051xf)}else {_0x9051x2[_0x7bc4[7]](_0x9051x5- _0x9051xe,_0x9051xf);_0x9051x2[_0x7bc4[8]](_0x9051x5,_0x9051xf)};_0x9051x2[_0x7bc4[9]]()}else {if(_0x9051xd== _0x7bc4[18]){_0x9051x2[_0x7bc4[7]](0,0);_0x9051x2[_0x7bc4[8]](_0x9051xe,0);_0x9051x2[_0x7bc4[8]](_0x9051xe,_0x9051xf);_0x9051x2[_0x7bc4[8]](_0x9051x5,_0x9051xf)}else {_0x9051x2[_0x7bc4[7]](0,_0x9051xf);_0x9051x2[_0x7bc4[8]](_0x9051x5- _0x9051xe,_0x9051xf);_0x9051x2[_0x7bc4[8]](_0x9051x5- _0x9051xe,0);_0x9051x2[_0x7bc4[8]](_0x9051x5,0)};_0x9051x2[_0x7bc4[8]](_0x9051x5,_0x9051x6);_0x9051x2[_0x7bc4[8]](0,_0x9051x6);_0x9051x2[_0x7bc4[8]](0,_0x9051xf);_0x9051x2[_0x7bc4[10]]();_0x9051x2[_0x7bc4[9]]()}};mxCellRenderer[_0x7bc4[0]][_0x7bc4[12]][_0x7bc4[19]]= _0x9051xa;function _0x9051x10(){}_0x9051x10[_0x7bc4[0]]=  new mxCylinder();_0x9051x10[_0x7bc4[0]][_0x7bc4[1]]= _0x9051x10;_0x9051x10[_0x7bc4[0]][_0x7bc4[2]]= 30;_0x9051x10[_0x7bc4[0]][_0x7bc4[3]]= function(_0x9051x2,_0x9051x3,_0x9051x4,_0x9051x5,_0x9051x6,_0x9051x7){var _0x9051x8=Math[_0x7bc4[6]](_0x9051x5,Math[_0x7bc4[6]](_0x9051x6,mxUtils[_0x7bc4[5]](this[_0x7bc4[4]],_0x7bc4[2],this[_0x7bc4[2]])));if(!_0x9051x7){_0x9051x2[_0x7bc4[7]](_0x9051x8,0);_0x9051x2[_0x7bc4[8]](_0x9051x5,0);_0x9051x2[_0x7bc4[8]](_0x9051x5,_0x9051x6);_0x9051x2[_0x7bc4[8]](0,_0x9051x6);_0x9051x2[_0x7bc4[8]](0,_0x9051x8);_0x9051x2[_0x7bc4[8]](_0x9051x8,0);_0x9051x2[_0x7bc4[10]]();_0x9051x2[_0x7bc4[9]]()}};mxCellRenderer[_0x7bc4[0]][_0x7bc4[12]][_0x7bc4[20]]= _0x9051x10;function _0x9051x11(){}_0x9051x11[_0x7bc4[0]]=  new mxCylinder();_0x9051x11[_0x7bc4[0]][_0x7bc4[1]]= _0x9051x11;_0x9051x11[_0x7bc4[0]][_0x7bc4[2]]= 0.4;_0x9051x11[_0x7bc4[0]][_0x7bc4[3]]= function(_0x9051x2,_0x9051x3,_0x9051x4,_0x9051x5,_0x9051x6,_0x9051x7){var _0x9051x8=mxUtils[_0x7bc4[5]](this[_0x7bc4[4]],_0x7bc4[2],this[_0x7bc4[2]]);var _0x9051xf=_0x9051x6* _0x9051x8;var _0x9051x12=1.4;if(!_0x9051x7){_0x9051x2[_0x7bc4[7]](0,_0x9051xf/ 2);_0x9051x2[_0x7bc4[21]](_0x9051x5/ 4,_0x9051xf* _0x9051x12,_0x9051x5/ 2,_0x9051xf/ 2);_0x9051x2[_0x7bc4[21]](_0x9051x5* 3/ 4,_0x9051xf* (1- _0x9051x12),_0x9051x5,_0x9051xf/ 2);_0x9051x2[_0x7bc4[8]](_0x9051x5,_0x9051x6- _0x9051xf/ 2);_0x9051x2[_0x7bc4[21]](_0x9051x5* 3/ 4,_0x9051x6- _0x9051xf* _0x9051x12,_0x9051x5/ 2,_0x9051x6- _0x9051xf/ 2);_0x9051x2[_0x7bc4[21]](_0x9051x5/ 4,_0x9051x6- _0x9051xf* (1- _0x9051x12),0,_0x9051x6- _0x9051xf/ 2);_0x9051x2[_0x7bc4[8]](0,_0x9051xf/ 2);_0x9051x2[_0x7bc4[10]]();_0x9051x2[_0x7bc4[9]]()}};mxCellRenderer[_0x7bc4[0]][_0x7bc4[12]][_0x7bc4[22]]= _0x9051x11;function _0x9051x13(){}_0x9051x13[_0x7bc4[0]]=  new mxCylinder();_0x9051x13[_0x7bc4[0]][_0x7bc4[1]]= _0x9051x13;_0x9051x13[_0x7bc4[0]][_0x7bc4[2]]= 0.2;_0x9051x13[_0x7bc4[0]][_0x7bc4[3]]= function(_0x9051x2,_0x9051x3,_0x9051x4,_0x9051x5,_0x9051x6,_0x9051x7){var _0x9051x8=_0x9051x5* mxUtils[_0x7bc4[5]](this[_0x7bc4[4]],_0x7bc4[2],this[_0x7bc4[2]]);if(!_0x9051x7){_0x9051x2[_0x7bc4[7]](0,0);_0x9051x2[_0x7bc4[8]](_0x9051x5- _0x9051x8,0);_0x9051x2[_0x7bc4[8]](_0x9051x5,_0x9051x6/ 2);_0x9051x2[_0x7bc4[8]](_0x9051x5- _0x9051x8,_0x9051x6);_0x9051x2[_0x7bc4[8]](0,_0x9051x6);_0x9051x2[_0x7bc4[8]](_0x9051x8,_0x9051x6/ 2);_0x9051x2[_0x7bc4[10]]();_0x9051x2[_0x7bc4[9]]()}};mxCellRenderer[_0x7bc4[0]][_0x7bc4[12]][_0x7bc4[23]]= _0x9051x13;function _0x9051x14(){mxRectangleShape[_0x7bc4[24]](this)}mxUtils[_0x7bc4[25]](_0x9051x14,mxRectangleShape);_0x9051x14[_0x7bc4[0]][_0x7bc4[26]]= function(){return false};_0x9051x14[_0x7bc4[0]][_0x7bc4[27]]= function(_0x9051x15,_0x9051x3,_0x9051x4,_0x9051x5,_0x9051x6){var _0x9051x16=Math[_0x7bc4[6]](_0x9051x5/ 5,_0x9051x6/ 5)+ 1;_0x9051x15[_0x7bc4[28]]();_0x9051x15[_0x7bc4[7]](_0x9051x3+ _0x9051x5/ 2,_0x9051x4+ _0x9051x16);_0x9051x15[_0x7bc4[8]](_0x9051x3+ _0x9051x5/ 2,_0x9051x4+ _0x9051x6- _0x9051x16);_0x9051x15[_0x7bc4[7]](_0x9051x3+ _0x9051x16,_0x9051x4+ _0x9051x6/ 2);_0x9051x15[_0x7bc4[8]](_0x9051x3+ _0x9051x5- _0x9051x16,_0x9051x4+ _0x9051x6/ 2);_0x9051x15[_0x7bc4[9]]();_0x9051x15[_0x7bc4[29]]();mxRectangleShape[_0x7bc4[0]][_0x7bc4[27]][_0x7bc4[30]](this,arguments)};mxCellRenderer[_0x7bc4[0]][_0x7bc4[12]][_0x7bc4[31]]= _0x9051x14;function _0x9051x17(){mxRectangleShape[_0x7bc4[24]](this)}mxUtils[_0x7bc4[25]](_0x9051x17,mxRectangleShape);_0x9051x17[_0x7bc4[0]][_0x7bc4[26]]= function(){return false};_0x9051x17[_0x7bc4[0]][_0x7bc4[27]]= function(_0x9051x15,_0x9051x3,_0x9051x4,_0x9051x5,_0x9051x6){if(this[_0x7bc4[4]]!= null){if(this[_0x7bc4[4]][_0x7bc4[32]]== 1){var _0x9051x18=Math[_0x7bc4[34]](2,this[_0x7bc4[33]]+ 1);mxRectangleShape[_0x7bc4[0]][_0x7bc4[35]][_0x7bc4[24]](this,_0x9051x15,_0x9051x3+ _0x9051x18,_0x9051x4+ _0x9051x18,_0x9051x5- 2* _0x9051x18,_0x9051x6- 2* _0x9051x18);mxRectangleShape[_0x7bc4[0]][_0x7bc4[27]][_0x7bc4[30]](this,arguments);_0x9051x3+= _0x9051x18;_0x9051x4+= _0x9051x18;_0x9051x5-= 2* _0x9051x18;_0x9051x6-= 2* _0x9051x18};_0x9051x15[_0x7bc4[36]](false);var _0x9051x19=0;var _0x9051x1a=null;do{_0x9051x1a= mxCellRenderer[_0x7bc4[0]][_0x7bc4[12]][this[_0x7bc4[4]][_0x7bc4[37]+ _0x9051x19]];if(_0x9051x1a!= null){var _0x9051x1b=this[_0x7bc4[4]][_0x7bc4[37]+ _0x9051x19+ _0x7bc4[38]];var _0x9051x1c=this[_0x7bc4[4]][_0x7bc4[37]+ _0x9051x19+ _0x7bc4[39]];var _0x9051x1d=this[_0x7bc4[4]][_0x7bc4[37]+ _0x9051x19+ _0x7bc4[40]];var _0x9051x1e=this[_0x7bc4[4]][_0x7bc4[37]+ _0x9051x19+ _0x7bc4[41]];var _0x9051x1f=this[_0x7bc4[4]][_0x7bc4[37]+ _0x9051x19+ _0x7bc4[42]]|| 0;var _0x9051x20=this[_0x7bc4[4]][_0x7bc4[37]+ _0x9051x19+ _0x7bc4[43]];if(_0x9051x20!= null){_0x9051x1f+= this[_0x7bc4[44]](_0x9051x5+ this[_0x7bc4[33]],_0x9051x6+ this[_0x7bc4[33]])* _0x9051x20};var _0x9051x21=_0x9051x3;var _0x9051x22=_0x9051x4;if(_0x9051x1b== mxConstants[_0x7bc4[45]]){_0x9051x21+= (_0x9051x5- _0x9051x1d)/ 2}else {if(_0x9051x1b== mxConstants[_0x7bc4[46]]){_0x9051x21+= _0x9051x5- _0x9051x1d- _0x9051x1f}else {_0x9051x21+= _0x9051x1f}};if(_0x9051x1c== mxConstants[_0x7bc4[47]]){_0x9051x22+= (_0x9051x6- _0x9051x1e)/ 2}else {if(_0x9051x1c== mxConstants[_0x7bc4[48]]){_0x9051x22+= _0x9051x6- _0x9051x1e- _0x9051x1f}else {_0x9051x22+= _0x9051x1f}};_0x9051x15[_0x7bc4[49]]();var _0x9051x23= new _0x9051x1a();_0x9051x23[_0x7bc4[4]]= this[_0x7bc4[4]];_0x9051x1a[_0x7bc4[0]][_0x7bc4[50]][_0x7bc4[24]](_0x9051x23,_0x9051x15,_0x9051x21,_0x9051x22,_0x9051x1d,_0x9051x1e);_0x9051x15[_0x7bc4[51]]()};_0x9051x19++}while(_0x9051x1a!= null);}};mxCellRenderer[_0x7bc4[0]][_0x7bc4[12]][_0x7bc4[52]]= _0x9051x17;function _0x9051x24(){}_0x9051x24[_0x7bc4[0]]=  new mxCylinder();_0x9051x24[_0x7bc4[0]][_0x7bc4[1]]= _0x9051x24;_0x9051x24[_0x7bc4[0]][_0x7bc4[3]]= function(_0x9051x2,_0x9051x3,_0x9051x4,_0x9051x5,_0x9051x6,_0x9051x7){if(_0x9051x7){_0x9051x2[_0x7bc4[7]](0,0);_0x9051x2[_0x7bc4[8]](_0x9051x5/ 2,_0x9051x6/ 2);_0x9051x2[_0x7bc4[8]](_0x9051x5,0);_0x9051x2[_0x7bc4[9]]()}else {_0x9051x2[_0x7bc4[7]](0,0);_0x9051x2[_0x7bc4[8]](_0x9051x5,0);_0x9051x2[_0x7bc4[8]](_0x9051x5,_0x9051x6);_0x9051x2[_0x7bc4[8]](0,_0x9051x6);_0x9051x2[_0x7bc4[10]]()}};mxCellRenderer[_0x7bc4[0]][_0x7bc4[12]][_0x7bc4[53]]= _0x9051x24;function _0x9051x25(){}_0x9051x25[_0x7bc4[0]]=  new mxCylinder();_0x9051x25[_0x7bc4[0]][_0x7bc4[1]]= _0x9051x25;_0x9051x25[_0x7bc4[0]][_0x7bc4[54]]= true;_0x9051x25[_0x7bc4[0]][_0x7bc4[3]]= function(_0x9051x2,_0x9051x3,_0x9051x4,_0x9051x5,_0x9051x6,_0x9051x7){var _0x9051x1d=_0x9051x5/ 3;var _0x9051x1e=_0x9051x6/ 4;if(!_0x9051x7){_0x9051x2[_0x7bc4[7]](_0x9051x5/ 2,_0x9051x1e);_0x9051x2[_0x7bc4[55]](_0x9051x5/ 2- _0x9051x1d,_0x9051x1e,_0x9051x5/ 2- _0x9051x1d,0,_0x9051x5/ 2,0);_0x9051x2[_0x7bc4[55]](_0x9051x5/ 2+ _0x9051x1d,0,_0x9051x5/ 2+ _0x9051x1d,_0x9051x1e,_0x9051x5/ 2,_0x9051x1e);_0x9051x2[_0x7bc4[10]]();_0x9051x2[_0x7bc4[7]](_0x9051x5/ 2,_0x9051x1e);_0x9051x2[_0x7bc4[8]](_0x9051x5/ 2,2* _0x9051x6/ 3);_0x9051x2[_0x7bc4[7]](_0x9051x5/ 2,_0x9051x6/ 3);_0x9051x2[_0x7bc4[8]](0,_0x9051x6/ 3);_0x9051x2[_0x7bc4[7]](_0x9051x5/ 2,_0x9051x6/ 3);_0x9051x2[_0x7bc4[8]](_0x9051x5,_0x9051x6/ 3);_0x9051x2[_0x7bc4[7]](_0x9051x5/ 2,2* _0x9051x6/ 3);_0x9051x2[_0x7bc4[8]](0,_0x9051x6);_0x9051x2[_0x7bc4[7]](_0x9051x5/ 2,2* _0x9051x6/ 3);_0x9051x2[_0x7bc4[8]](_0x9051x5,_0x9051x6);_0x9051x2[_0x7bc4[9]]()}};mxCellRenderer[_0x7bc4[0]][_0x7bc4[12]][_0x7bc4[56]]= _0x9051x25;function _0x9051x26(){}_0x9051x26[_0x7bc4[0]]=  new mxCylinder();_0x9051x26[_0x7bc4[0]][_0x7bc4[1]]= _0x9051x26;_0x9051x26[_0x7bc4[0]][_0x7bc4[2]]= 10;_0x9051x26[_0x7bc4[0]][_0x7bc4[54]]= true;_0x9051x26[_0x7bc4[0]][_0x7bc4[3]]= function(_0x9051x2,_0x9051x3,_0x9051x4,_0x9051x5,_0x9051x6,_0x9051x7){var _0x9051x27=mxUtils[_0x7bc4[5]](this[_0x7bc4[4]],_0x7bc4[2],this[_0x7bc4[2]]);var _0x9051x1d=_0x9051x27* 2/ 3;var _0x9051x1e=_0x9051x27;if(!_0x9051x7){_0x9051x2[_0x7bc4[7]](_0x9051x5/ 2,_0x9051x1e);_0x9051x2[_0x7bc4[55]](_0x9051x5/ 2- _0x9051x1d,_0x9051x1e,_0x9051x5/ 2- _0x9051x1d,0,_0x9051x5/ 2,0);_0x9051x2[_0x7bc4[55]](_0x9051x5/ 2+ _0x9051x1d,0,_0x9051x5/ 2+ _0x9051x1d,_0x9051x1e,_0x9051x5/ 2,_0x9051x1e);_0x9051x2[_0x7bc4[10]]();_0x9051x2[_0x7bc4[7]](_0x9051x5/ 2,_0x9051x1e);_0x9051x2[_0x7bc4[8]](_0x9051x5/ 2,_0x9051x6);_0x9051x2[_0x7bc4[9]]()}};mxCellRenderer[_0x7bc4[0]][_0x7bc4[12]][_0x7bc4[57]]= _0x9051x26;function _0x9051x28(){}_0x9051x28[_0x7bc4[0]]=  new mxCylinder();_0x9051x28[_0x7bc4[0]][_0x7bc4[1]]= _0x9051x28;_0x9051x28[_0x7bc4[0]][_0x7bc4[58]]= 32;_0x9051x28[_0x7bc4[0]][_0x7bc4[59]]= 12;_0x9051x28[_0x7bc4[0]][_0x7bc4[3]]= function(_0x9051x2,_0x9051x3,_0x9051x4,_0x9051x5,_0x9051x6,_0x9051x7){var _0x9051xe=mxUtils[_0x7bc4[5]](this[_0x7bc4[4]],_0x7bc4[58],this[_0x7bc4[58]]);var _0x9051xf=mxUtils[_0x7bc4[5]](this[_0x7bc4[4]],_0x7bc4[59],this[_0x7bc4[59]]);var _0x9051x29=_0x9051xe/ 2;var _0x9051x2a=_0x9051x29+ _0x9051xe/ 2;var _0x9051x2b=0.3* _0x9051x6- _0x9051xf/ 2;var _0x9051x2c=0.7* _0x9051x6- _0x9051xf/ 2;if(_0x9051x7){_0x9051x2[_0x7bc4[7]](_0x9051x29,_0x9051x2b);_0x9051x2[_0x7bc4[8]](_0x9051x2a,_0x9051x2b);_0x9051x2[_0x7bc4[8]](_0x9051x2a,_0x9051x2b+ _0x9051xf);_0x9051x2[_0x7bc4[8]](_0x9051x29,_0x9051x2b+ _0x9051xf);_0x9051x2[_0x7bc4[7]](_0x9051x29,_0x9051x2c);_0x9051x2[_0x7bc4[8]](_0x9051x2a,_0x9051x2c);_0x9051x2[_0x7bc4[8]](_0x9051x2a,_0x9051x2c+ _0x9051xf);_0x9051x2[_0x7bc4[8]](_0x9051x29,_0x9051x2c+ _0x9051xf);_0x9051x2[_0x7bc4[9]]()}else {_0x9051x2[_0x7bc4[7]](_0x9051x29,0);_0x9051x2[_0x7bc4[8]](_0x9051x5,0);_0x9051x2[_0x7bc4[8]](_0x9051x5,_0x9051x6);_0x9051x2[_0x7bc4[8]](_0x9051x29,_0x9051x6);_0x9051x2[_0x7bc4[8]](_0x9051x29,_0x9051x2c+ _0x9051xf);_0x9051x2[_0x7bc4[8]](0,_0x9051x2c+ _0x9051xf);_0x9051x2[_0x7bc4[8]](0,_0x9051x2c);_0x9051x2[_0x7bc4[8]](_0x9051x29,_0x9051x2c);_0x9051x2[_0x7bc4[8]](_0x9051x29,_0x9051x2b+ _0x9051xf);_0x9051x2[_0x7bc4[8]](0,_0x9051x2b+ _0x9051xf);_0x9051x2[_0x7bc4[8]](0,_0x9051x2b);_0x9051x2[_0x7bc4[8]](_0x9051x29,_0x9051x2b);_0x9051x2[_0x7bc4[10]]();_0x9051x2[_0x7bc4[9]]()}};mxCellRenderer[_0x7bc4[0]][_0x7bc4[12]][_0x7bc4[60]]= _0x9051x28;function _0x9051x2d(){}_0x9051x2d[_0x7bc4[0]]=  new mxDoubleEllipse();_0x9051x2d[_0x7bc4[0]][_0x7bc4[1]]= _0x9051x2d;_0x9051x2d[_0x7bc4[0]][_0x7bc4[61]]= true;_0x9051x2d[_0x7bc4[0]][_0x7bc4[50]]= function(_0x9051x15,_0x9051x3,_0x9051x4,_0x9051x5,_0x9051x6){var _0x9051x18=Math[_0x7bc4[6]](4,Math[_0x7bc4[6]](_0x9051x5/ 5,_0x9051x6/ 5));if(_0x9051x5> 0&& _0x9051x6> 0){_0x9051x15[_0x7bc4[62]](_0x9051x3+ _0x9051x18,_0x9051x4+ _0x9051x18,_0x9051x5- 2* _0x9051x18,_0x9051x6- 2* _0x9051x18);_0x9051x15[_0x7bc4[63]]()};_0x9051x15[_0x7bc4[64]](false);if(this[_0x7bc4[61]]){_0x9051x15[_0x7bc4[62]](_0x9051x3,_0x9051x4,_0x9051x5,_0x9051x6);_0x9051x15[_0x7bc4[29]]()}};mxCellRenderer[_0x7bc4[0]][_0x7bc4[12]][_0x7bc4[65]]= _0x9051x2d;function _0x9051x2e(){}_0x9051x2e[_0x7bc4[0]]=  new _0x9051x2d();_0x9051x2e[_0x7bc4[0]][_0x7bc4[1]]= _0x9051x2e;_0x9051x2e[_0x7bc4[0]][_0x7bc4[61]]= false;mxCellRenderer[_0x7bc4[0]][_0x7bc4[12]][_0x7bc4[66]]= _0x9051x2e;var _0x9051x2f=mxImageExport[_0x7bc4[0]][_0x7bc4[67]];mxImageExport[_0x7bc4[0]][_0x7bc4[67]]= function(){_0x9051x2f[_0x7bc4[30]](this,arguments);function _0x9051x30(_0x9051x31){return {drawShape:function(_0x9051x32,_0x9051x33,_0x9051x34,_0x9051x35){var _0x9051x3=_0x9051x34[_0x7bc4[68]];var _0x9051x4=_0x9051x34[_0x7bc4[69]];var _0x9051x5=_0x9051x34[_0x7bc4[70]];var _0x9051x6=_0x9051x34[_0x7bc4[71]];if(_0x9051x35){var _0x9051x18=Math[_0x7bc4[6]](4,Math[_0x7bc4[6]](_0x9051x5/ 5,_0x9051x6/ 5));_0x9051x3+= _0x9051x18;_0x9051x4+= _0x9051x18;_0x9051x5-= 2* _0x9051x18;_0x9051x6-= 2* _0x9051x18;if(_0x9051x5> 0&& _0x9051x6> 0){_0x9051x32[_0x7bc4[62]](_0x9051x3,_0x9051x4,_0x9051x5,_0x9051x6)};return true}else {_0x9051x32[_0x7bc4[63]]();if(_0x9051x31){_0x9051x32[_0x7bc4[62]](_0x9051x3,_0x9051x4,_0x9051x5,_0x9051x6);_0x9051x32[_0x7bc4[29]]()}}}}}this[_0x7bc4[72]][_0x7bc4[65]]= _0x9051x30(true);this[_0x7bc4[72]][_0x7bc4[66]]= _0x9051x30(false)};function _0x9051x36(){mxArrow[_0x7bc4[24]](this)}mxUtils[_0x7bc4[25]](_0x9051x36,mxArrow);_0x9051x36[_0x7bc4[0]][_0x7bc4[73]]= function(_0x9051x15,_0x9051x37){var _0x9051x1d=10;var _0x9051x38=_0x9051x37[0];var _0x9051x39=_0x9051x37[_0x9051x37[_0x7bc4[74]]- 1];var _0x9051xe=_0x9051x39[_0x7bc4[68]]- _0x9051x38[_0x7bc4[68]];var _0x9051xf=_0x9051x39[_0x7bc4[69]]- _0x9051x38[_0x7bc4[69]];var _0x9051x3a=Math[_0x7bc4[75]](_0x9051xe* _0x9051xe+ _0x9051xf* _0x9051xf);var _0x9051x3b=_0x9051x3a;var _0x9051x3c=_0x9051xe/ _0x9051x3a;var _0x9051x3d=_0x9051xf/ _0x9051x3a;var _0x9051x3e=_0x9051x3b* _0x9051x3c;var _0x9051x3f=_0x9051x3b* _0x9051x3d;var _0x9051x40=_0x9051x1d* _0x9051x3d/ 3;var _0x9051x41=-_0x9051x1d* _0x9051x3c/ 3;var _0x9051x42=_0x9051x38[_0x7bc4[68]]- _0x9051x40/ 2;var _0x9051x43=_0x9051x38[_0x7bc4[69]]- _0x9051x41/ 2;var _0x9051x44=_0x9051x42+ _0x9051x40;var _0x9051x45=_0x9051x43+ _0x9051x41;var _0x9051x46=_0x9051x44+ _0x9051x3e;var _0x9051x47=_0x9051x45+ _0x9051x3f;var _0x9051x48=_0x9051x46+ _0x9051x40;var _0x9051x49=_0x9051x47+ _0x9051x41;var _0x9051x4a=_0x9051x48- 3* _0x9051x40;var _0x9051x4b=_0x9051x49- 3* _0x9051x41;_0x9051x15[_0x7bc4[28]]();_0x9051x15[_0x7bc4[7]](_0x9051x44,_0x9051x45);_0x9051x15[_0x7bc4[8]](_0x9051x46,_0x9051x47);_0x9051x15[_0x7bc4[7]](_0x9051x4a+ _0x9051x40,_0x9051x4b+ _0x9051x41);_0x9051x15[_0x7bc4[8]](_0x9051x42,_0x9051x43);_0x9051x15[_0x7bc4[29]]()};mxCellRenderer[_0x7bc4[0]][_0x7bc4[12]][_0x7bc4[76]]= _0x9051x36;mxMarker[_0x7bc4[78]](_0x7bc4[77],function(_0x9051x32,_0x9051x1a,_0x9051x4c,_0x9051x39,_0x9051x4d,_0x9051x4e,_0x9051x4f,_0x9051x50,_0x9051x51,_0x9051x52){var _0x9051x3c=_0x9051x4d* (_0x9051x4f+ _0x9051x51+ 1);var _0x9051x3d=_0x9051x4e* (_0x9051x4f+ _0x9051x51+ 1);return function(){_0x9051x32[_0x7bc4[28]]();_0x9051x32[_0x7bc4[7]](_0x9051x39[_0x7bc4[68]]- _0x9051x3c/ 2- _0x9051x3d/ 2,_0x9051x39[_0x7bc4[69]]- _0x9051x3d/ 2+ _0x9051x3c/ 2);_0x9051x32[_0x7bc4[8]](_0x9051x39[_0x7bc4[68]]+ _0x9051x3d/ 2- 3* _0x9051x3c/ 2,_0x9051x39[_0x7bc4[69]]- 3* _0x9051x3d/ 2- _0x9051x3c/ 2);_0x9051x32[_0x7bc4[29]]()}});var _0x9051x53=-99;if( typeof (mxVertexHandler)!= _0x7bc4[79]){function _0x9051x54(_0x9051x33){mxVertexHandler[_0x7bc4[24]](this,_0x9051x33)}mxUtils[_0x7bc4[25]](_0x9051x54,mxVertexHandler);_0x9051x54[_0x7bc4[0]][_0x7bc4[80]]= false;_0x9051x54[_0x7bc4[0]][_0x7bc4[81]]= function(){this[_0x7bc4[82]]= mxUtils[_0x7bc4[5]](this[_0x7bc4[83]][_0x7bc4[4]],mxConstants.STYLE_HORIZONTAL,true);var _0x9051x55=this[_0x7bc4[83]][_0x7bc4[85]][_0x7bc4[84]];if(this[_0x7bc4[86]]!= null){var _0x9051x34= new mxRectangle(0,0,this[_0x7bc4[86]][_0x7bc4[70]],this[_0x7bc4[86]][_0x7bc4[71]]);this[_0x7bc4[87]]=  new mxImageShape(_0x9051x34,this[_0x7bc4[86]][_0x7bc4[88]])}else {var _0x9051x4f=10;var _0x9051x34= new mxRectangle(0,0,_0x9051x4f,_0x9051x4f);this[_0x7bc4[87]]=  new mxRhombus(_0x9051x34,mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};this[_0x7bc4[87]][_0x7bc4[89]]= (_0x9051x55[_0x7bc4[89]]!= mxConstants[_0x7bc4[90]])?mxConstants[_0x7bc4[91]]:mxConstants[_0x7bc4[90]];this[_0x7bc4[87]][_0x7bc4[81]](_0x9051x55[_0x7bc4[93]]()[_0x7bc4[92]]());this[_0x7bc4[87]][_0x7bc4[95]][_0x7bc4[4]][_0x7bc4[94]]= this[_0x7bc4[96]]();mxEvent[_0x7bc4[97]](this[_0x7bc4[87]][_0x7bc4[95]],_0x9051x55,this[_0x7bc4[83]]);mxVertexHandler[_0x7bc4[0]][_0x7bc4[81]][_0x7bc4[30]](this,arguments)};_0x9051x54[_0x7bc4[0]][_0x7bc4[96]]= function(){return _0x7bc4[98]};_0x9051x54[_0x7bc4[0]][_0x7bc4[99]]= function(){mxVertexHandler[_0x7bc4[0]][_0x7bc4[99]][_0x7bc4[30]](this,arguments);var _0x9051x4f=this[_0x7bc4[87]][_0x7bc4[100]][_0x7bc4[70]];this[_0x7bc4[87]][_0x7bc4[100]]= this[_0x7bc4[101]](_0x9051x4f);this[_0x7bc4[87]][_0x7bc4[99]]()};_0x9051x54[_0x7bc4[0]][_0x7bc4[102]]= function(){mxVertexHandler[_0x7bc4[0]][_0x7bc4[102]][_0x7bc4[30]](this,arguments);if(this[_0x7bc4[87]]!= null){this[_0x7bc4[87]][_0x7bc4[102]]();this[_0x7bc4[87]]= null}};_0x9051x54[_0x7bc4[0]][_0x7bc4[103]]= function(_0x9051x56){if(_0x9051x56[_0x7bc4[104]](this[_0x7bc4[87]])){return _0x9051x53};return mxVertexHandler[_0x7bc4[0]][_0x7bc4[103]][_0x7bc4[30]](this,arguments)};_0x9051x54[_0x7bc4[0]][_0x7bc4[105]]= function(_0x9051x57,_0x9051x56){if(!_0x9051x56[_0x7bc4[106]]()&& this[_0x7bc4[107]]== _0x9051x53){var _0x9051x58= new mxPoint(_0x9051x56[_0x7bc4[108]](),_0x9051x56[_0x7bc4[109]]());this[_0x7bc4[110]](_0x9051x58);var _0x9051x59=this[_0x7bc4[84]][_0x7bc4[112]](_0x9051x56[_0x7bc4[111]]());var _0x9051x5a=this[_0x7bc4[84]][_0x7bc4[93]]()[_0x7bc4[113]];if(_0x9051x59&& this[_0x7bc4[80]]){_0x9051x58[_0x7bc4[68]]= this[_0x7bc4[84]][_0x7bc4[114]](_0x9051x58[_0x7bc4[68]]/ _0x9051x5a)* _0x9051x5a;_0x9051x58[_0x7bc4[69]]= this[_0x7bc4[84]][_0x7bc4[114]](_0x9051x58[_0x7bc4[69]]/ _0x9051x5a)* _0x9051x5a};this[_0x7bc4[115]](_0x9051x58);this[_0x7bc4[116]](this[_0x7bc4[87]],_0x9051x58[_0x7bc4[68]],_0x9051x58[_0x7bc4[69]]);this[_0x7bc4[83]][_0x7bc4[85]][_0x7bc4[84]][_0x7bc4[117]][_0x7bc4[99]](this[_0x7bc4[83]],true);_0x9051x56[_0x7bc4[118]]()}else {mxVertexHandler[_0x7bc4[0]][_0x7bc4[105]][_0x7bc4[30]](this,arguments)}};_0x9051x54[_0x7bc4[0]][_0x7bc4[119]]= function(_0x9051x57,_0x9051x56){if(!_0x9051x56[_0x7bc4[106]]()&& this[_0x7bc4[107]]== _0x9051x53){this[_0x7bc4[120]]();this[_0x7bc4[121]]();_0x9051x56[_0x7bc4[118]]()}else {mxVertexHandler[_0x7bc4[0]][_0x7bc4[119]][_0x7bc4[30]](this,arguments)}};_0x9051x54[_0x7bc4[0]][_0x7bc4[101]]= function(_0x9051x4f){var _0x9051x5b=this[_0x7bc4[83]][_0x7bc4[123]][_0x7bc4[122]]();var _0x9051x5c=mxUtils[_0x7bc4[124]](_0x9051x5b);var _0x9051x5d=Math[_0x7bc4[125]](_0x9051x5c);var _0x9051x5e=Math[_0x7bc4[126]](_0x9051x5c);var _0x9051x34= new mxRectangle(this[_0x7bc4[83]][_0x7bc4[68]],this[_0x7bc4[83]][_0x7bc4[69]],this[_0x7bc4[83]][_0x7bc4[70]],this[_0x7bc4[83]][_0x7bc4[71]]);if(this[_0x7bc4[83]][_0x7bc4[123]][_0x7bc4[127]]()){var _0x9051x5f=(_0x9051x34[_0x7bc4[70]]- _0x9051x34[_0x7bc4[71]])/ 2;_0x9051x34[_0x7bc4[68]]+= _0x9051x5f;_0x9051x34[_0x7bc4[69]]-= _0x9051x5f;var _0x9051x23=_0x9051x34[_0x7bc4[70]];_0x9051x34[_0x7bc4[70]]= _0x9051x34[_0x7bc4[71]];_0x9051x34[_0x7bc4[71]]= _0x9051x23};var _0x9051x60=this[_0x7bc4[128]](_0x9051x34);if(this[_0x7bc4[83]][_0x7bc4[123]][_0x7bc4[129]]){_0x9051x60[_0x7bc4[68]]= 2* _0x9051x34[_0x7bc4[68]]+ _0x9051x34[_0x7bc4[70]]- _0x9051x60[_0x7bc4[68]]};if(this[_0x7bc4[83]][_0x7bc4[123]][_0x7bc4[130]]){_0x9051x60[_0x7bc4[69]]= 2* _0x9051x34[_0x7bc4[69]]+ _0x9051x34[_0x7bc4[71]]- _0x9051x60[_0x7bc4[69]]};_0x9051x60= mxUtils[_0x7bc4[133]](_0x9051x60,_0x9051x5d,_0x9051x5e, new mxPoint(this[_0x7bc4[83]][_0x7bc4[131]](),this[_0x7bc4[83]][_0x7bc4[132]]()));return  new mxRectangle(_0x9051x60[_0x7bc4[68]]- _0x9051x4f/ 2,_0x9051x60[_0x7bc4[69]]- _0x9051x4f/ 2,_0x9051x4f,_0x9051x4f)};_0x9051x54[_0x7bc4[0]][_0x7bc4[128]]= function(_0x9051x34){return null};_0x9051x54[_0x7bc4[0]][_0x7bc4[115]]= function(_0x9051x58){};_0x9051x54[_0x7bc4[0]][_0x7bc4[110]]= function(_0x9051x58){_0x9051x58[_0x7bc4[68]]= Math[_0x7bc4[34]](this[_0x7bc4[83]][_0x7bc4[68]],Math[_0x7bc4[6]](this[_0x7bc4[83]][_0x7bc4[68]]+ this[_0x7bc4[83]][_0x7bc4[70]],_0x9051x58[_0x7bc4[68]]));_0x9051x58[_0x7bc4[69]]= Math[_0x7bc4[34]](this[_0x7bc4[83]][_0x7bc4[69]],Math[_0x7bc4[6]](this[_0x7bc4[83]][_0x7bc4[69]]+ this[_0x7bc4[83]][_0x7bc4[71]],_0x9051x58[_0x7bc4[69]]))};_0x9051x54[_0x7bc4[0]][_0x7bc4[120]]= function(){};function _0x9051x61(_0x9051x33){_0x9051x54[_0x7bc4[24]](this,_0x9051x33)}mxUtils[_0x7bc4[25]](_0x9051x61,_0x9051x54);_0x9051x61[_0x7bc4[0]][_0x7bc4[128]]= function(_0x9051x34){var _0x9051x5a=this[_0x7bc4[84]][_0x7bc4[93]]()[_0x7bc4[113]];var _0x9051xb=Math[_0x7bc4[6]](_0x9051x34[_0x7bc4[70]],mxUtils[_0x7bc4[5]](this[_0x7bc4[83]][_0x7bc4[4]],_0x7bc4[14],60)* _0x9051x5a);var _0x9051xc=Math[_0x7bc4[6]](_0x9051x34[_0x7bc4[71]],mxUtils[_0x7bc4[5]](this[_0x7bc4[83]][_0x7bc4[4]],_0x7bc4[15],20)* _0x9051x5a);var _0x9051xd=mxUtils[_0x7bc4[5]](this[_0x7bc4[83]][_0x7bc4[4]],_0x7bc4[16],_0x7bc4[17]);var _0x9051x3=(_0x9051xd== _0x7bc4[18])?_0x9051x34[_0x7bc4[68]]+ _0x9051xb:_0x9051x34[_0x7bc4[68]]+ _0x9051x34[_0x7bc4[70]]- _0x9051xb;return  new mxPoint(_0x9051x3,_0x9051x34[_0x7bc4[69]]+ _0x9051xc)};_0x9051x61[_0x7bc4[0]][_0x7bc4[115]]= function(_0x9051x58){var _0x9051x5b=this[_0x7bc4[83]][_0x7bc4[123]][_0x7bc4[122]]();var _0x9051x5c=mxUtils[_0x7bc4[124]](_0x9051x5b);var _0x9051x5d=Math[_0x7bc4[125]](-_0x9051x5c);var _0x9051x5e=Math[_0x7bc4[126]](-_0x9051x5c);var _0x9051x34= new mxRectangle(this[_0x7bc4[83]][_0x7bc4[68]],this[_0x7bc4[83]][_0x7bc4[69]],this[_0x7bc4[83]][_0x7bc4[70]],this[_0x7bc4[83]][_0x7bc4[71]]);if(this[_0x7bc4[83]][_0x7bc4[123]][_0x7bc4[127]]()){var _0x9051x5f=(_0x9051x34[_0x7bc4[70]]- _0x9051x34[_0x7bc4[71]])/ 2;_0x9051x34[_0x7bc4[68]]+= _0x9051x5f;_0x9051x34[_0x7bc4[69]]-= _0x9051x5f;var _0x9051x23=_0x9051x34[_0x7bc4[70]];_0x9051x34[_0x7bc4[70]]= _0x9051x34[_0x7bc4[71]];_0x9051x34[_0x7bc4[71]]= _0x9051x23};var _0x9051x60= new mxPoint(_0x9051x58[_0x7bc4[68]],_0x9051x58[_0x7bc4[69]]);_0x9051x60= mxUtils[_0x7bc4[133]](_0x9051x60,_0x9051x5d,_0x9051x5e, new mxPoint(this[_0x7bc4[83]][_0x7bc4[131]](),this[_0x7bc4[83]][_0x7bc4[132]]()));if(this[_0x7bc4[83]][_0x7bc4[123]][_0x7bc4[129]]){_0x9051x60[_0x7bc4[68]]= 2* _0x9051x34[_0x7bc4[68]]+ _0x9051x34[_0x7bc4[70]]- _0x9051x60[_0x7bc4[68]]};if(this[_0x7bc4[83]][_0x7bc4[123]][_0x7bc4[130]]){_0x9051x60[_0x7bc4[69]]= 2* _0x9051x34[_0x7bc4[69]]+ _0x9051x34[_0x7bc4[71]]- _0x9051x60[_0x7bc4[69]]};var _0x9051x62=this[_0x7bc4[134]](_0x9051x60,_0x9051x34);if(_0x9051x62!= null){if(this[_0x7bc4[83]][_0x7bc4[123]][_0x7bc4[129]]){_0x9051x62[_0x7bc4[68]]= 2* _0x9051x34[_0x7bc4[68]]+ _0x9051x34[_0x7bc4[70]]- _0x9051x62[_0x7bc4[68]]};if(this[_0x7bc4[83]][_0x7bc4[123]][_0x7bc4[130]]){_0x9051x62[_0x7bc4[69]]= 2* _0x9051x34[_0x7bc4[69]]+ _0x9051x34[_0x7bc4[71]]- _0x9051x62[_0x7bc4[69]]};_0x9051x5d= Math[_0x7bc4[125]](_0x9051x5c);_0x9051x5e= Math[_0x7bc4[126]](_0x9051x5c);_0x9051x62= mxUtils[_0x7bc4[133]](_0x9051x62,_0x9051x5d,_0x9051x5e, new mxPoint(this[_0x7bc4[83]][_0x7bc4[131]](),this[_0x7bc4[83]][_0x7bc4[132]]()));_0x9051x58[_0x7bc4[68]]= _0x9051x62[_0x7bc4[68]];_0x9051x58[_0x7bc4[69]]= _0x9051x62[_0x7bc4[69]]}};_0x9051x61[_0x7bc4[0]][_0x7bc4[134]]= function(_0x9051x60,_0x9051x34){var _0x9051xd=mxUtils[_0x7bc4[5]](this[_0x7bc4[83]][_0x7bc4[4]],_0x7bc4[16],_0x7bc4[17]);var _0x9051xb=(_0x9051xd== _0x7bc4[18])?_0x9051x60[_0x7bc4[68]]- _0x9051x34[_0x7bc4[68]]:_0x9051x34[_0x7bc4[68]]+ _0x9051x34[_0x7bc4[70]]- _0x9051x60[_0x7bc4[68]];var _0x9051xc=_0x9051x60[_0x7bc4[69]]- _0x9051x34[_0x7bc4[69]];var _0x9051x5a=this[_0x7bc4[84]][_0x7bc4[93]]()[_0x7bc4[113]];this[_0x7bc4[83]][_0x7bc4[4]][_0x7bc4[14]]= Math[_0x7bc4[135]](Math[_0x7bc4[34]](1,_0x9051xb)/ _0x9051x5a);this[_0x7bc4[83]][_0x7bc4[4]][_0x7bc4[15]]= Math[_0x7bc4[135]](Math[_0x7bc4[34]](1,_0x9051xc)/ _0x9051x5a)};_0x9051x61[_0x7bc4[0]][_0x7bc4[120]]= function(){var _0x9051x63=this[_0x7bc4[84]][_0x7bc4[136]]();_0x9051x63[_0x7bc4[137]]();try{this[_0x7bc4[83]][_0x7bc4[85]][_0x7bc4[84]][_0x7bc4[139]](_0x7bc4[14],this[_0x7bc4[83]][_0x7bc4[4]][_0x7bc4[14]],[this[_0x7bc4[83]][_0x7bc4[138]]]);this[_0x7bc4[83]][_0x7bc4[85]][_0x7bc4[84]][_0x7bc4[139]](_0x7bc4[15],this[_0x7bc4[83]][_0x7bc4[4]][_0x7bc4[15]],[this[_0x7bc4[83]][_0x7bc4[138]]])}finally{_0x9051x63[_0x7bc4[140]]()}};function _0x9051x64(_0x9051x33){_0x9051x61[_0x7bc4[24]](this,_0x9051x33)}mxUtils[_0x7bc4[25]](_0x9051x64,_0x9051x61);_0x9051x64[_0x7bc4[0]][_0x7bc4[128]]= function(_0x9051x34){var _0x9051x5a=this[_0x7bc4[84]][_0x7bc4[93]]()[_0x7bc4[113]];var _0x9051x65=mxUtils[_0x7bc4[5]](this[_0x7bc4[83]][_0x7bc4[4]],mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);return  new mxPoint(_0x9051x34[_0x7bc4[68]]+ _0x9051x34[_0x7bc4[70]]/ 2,_0x9051x34[_0x7bc4[69]]+ Math[_0x7bc4[6]](_0x9051x34[_0x7bc4[71]],_0x9051x65* _0x9051x5a))};_0x9051x64[_0x7bc4[0]][_0x7bc4[134]]= function(_0x9051x58,_0x9051x34){_0x9051x58[_0x7bc4[68]]= _0x9051x34[_0x7bc4[68]]+ _0x9051x34[_0x7bc4[70]]/ 2;startSize= _0x9051x58[_0x7bc4[69]]- _0x9051x34[_0x7bc4[69]];var _0x9051x5a=this[_0x7bc4[84]][_0x7bc4[93]]()[_0x7bc4[113]];this[_0x7bc4[83]][_0x7bc4[4]][_0x7bc4[141]]= Math[_0x7bc4[135]](Math[_0x7bc4[34]](1,startSize)/ _0x9051x5a);return _0x9051x58};_0x9051x64[_0x7bc4[0]][_0x7bc4[120]]= function(){this[_0x7bc4[83]][_0x7bc4[85]][_0x7bc4[84]][_0x7bc4[139]](_0x7bc4[141],this[_0x7bc4[83]][_0x7bc4[4]][_0x7bc4[141]],[this[_0x7bc4[83]][_0x7bc4[138]]])};function _0x9051x66(_0x9051x33){_0x9051x61[_0x7bc4[24]](this,_0x9051x33)}mxUtils[_0x7bc4[25]](_0x9051x66,_0x9051x61);_0x9051x66[_0x7bc4[0]][_0x7bc4[142]]= 20;_0x9051x66[_0x7bc4[0]][_0x7bc4[143]]= 1;_0x9051x66[_0x7bc4[0]][_0x7bc4[128]]= function(_0x9051x34){var _0x9051x5a=this[_0x7bc4[84]][_0x7bc4[93]]()[_0x7bc4[113]];var _0x9051x67=Math[_0x7bc4[6]](_0x9051x34[_0x7bc4[70]],Math[_0x7bc4[6]](_0x9051x34[_0x7bc4[71]],mxUtils[_0x7bc4[5]](this[_0x7bc4[83]][_0x7bc4[4]],_0x7bc4[2],this[_0x7bc4[142]])* _0x9051x5a/ this[_0x7bc4[143]]));return  new mxPoint(_0x9051x34[_0x7bc4[68]]+ _0x9051x67,_0x9051x34[_0x7bc4[69]]+ _0x9051x67)};_0x9051x66[_0x7bc4[0]][_0x7bc4[134]]= function(_0x9051x60,_0x9051x34){var _0x9051x4f=Math[_0x7bc4[34]](0,Math[_0x7bc4[6]](Math[_0x7bc4[6]](_0x9051x34[_0x7bc4[70]]/ this[_0x7bc4[143]],_0x9051x60[_0x7bc4[68]]- _0x9051x34[_0x7bc4[68]]),Math[_0x7bc4[6]](_0x9051x34[_0x7bc4[71]]/ this[_0x7bc4[143]],_0x9051x60[_0x7bc4[69]]- _0x9051x34[_0x7bc4[69]])));var _0x9051x5a=this[_0x7bc4[84]][_0x7bc4[93]]()[_0x7bc4[113]];this[_0x7bc4[83]][_0x7bc4[4]][_0x7bc4[2]]= Math[_0x7bc4[135]](Math[_0x7bc4[34]](1,_0x9051x4f)/ _0x9051x5a)* this[_0x7bc4[143]];return  new mxPoint(_0x9051x34[_0x7bc4[68]]+ _0x9051x4f,_0x9051x34[_0x7bc4[69]]+ _0x9051x4f)};_0x9051x66[_0x7bc4[0]][_0x7bc4[120]]= function(){this[_0x7bc4[83]][_0x7bc4[85]][_0x7bc4[84]][_0x7bc4[139]](_0x7bc4[2],this[_0x7bc4[83]][_0x7bc4[4]][_0x7bc4[2]],[this[_0x7bc4[83]][_0x7bc4[138]]])};function _0x9051x68(_0x9051x33){_0x9051x66[_0x7bc4[24]](this,_0x9051x33)}mxUtils[_0x7bc4[25]](_0x9051x68,_0x9051x66);_0x9051x68[_0x7bc4[0]][_0x7bc4[142]]= 30;_0x9051x68[_0x7bc4[0]][_0x7bc4[143]]= 2;function _0x9051x69(_0x9051x33){_0x9051x66[_0x7bc4[24]](this,_0x9051x33)}mxUtils[_0x7bc4[25]](_0x9051x69,_0x9051x66);_0x9051x69[_0x7bc4[0]][_0x7bc4[142]]= 30;_0x9051x69[_0x7bc4[0]][_0x7bc4[143]]= 1;_0x9051x69[_0x7bc4[0]][_0x7bc4[128]]= function(_0x9051x34){var _0x9051x5a=this[_0x7bc4[84]][_0x7bc4[93]]()[_0x7bc4[113]];var _0x9051x67=Math[_0x7bc4[6]](_0x9051x34[_0x7bc4[70]],Math[_0x7bc4[6]](_0x9051x34[_0x7bc4[71]],mxUtils[_0x7bc4[5]](this[_0x7bc4[83]][_0x7bc4[4]],_0x7bc4[2],this[_0x7bc4[142]])* _0x9051x5a/ this[_0x7bc4[143]]));return  new mxPoint(_0x9051x34[_0x7bc4[68]]+ _0x9051x34[_0x7bc4[70]]- _0x9051x67,_0x9051x34[_0x7bc4[69]]+ _0x9051x67)};_0x9051x69[_0x7bc4[0]][_0x7bc4[134]]= function(_0x9051x60,_0x9051x34){var _0x9051x4f=Math[_0x7bc4[34]](0,Math[_0x7bc4[6]](Math[_0x7bc4[6]](_0x9051x34[_0x7bc4[70]]/ this[_0x7bc4[143]],_0x9051x60[_0x7bc4[68]]- _0x9051x34[_0x7bc4[68]]+ _0x9051x34[_0x7bc4[70]]),Math[_0x7bc4[6]](_0x9051x34[_0x7bc4[71]]/ this[_0x7bc4[143]],_0x9051x60[_0x7bc4[69]]- _0x9051x34[_0x7bc4[69]])));var _0x9051x5a=this[_0x7bc4[84]][_0x7bc4[93]]()[_0x7bc4[113]];this[_0x7bc4[83]][_0x7bc4[4]][_0x7bc4[2]]= Math[_0x7bc4[135]](Math[_0x7bc4[34]](1,_0x9051x4f)/ _0x9051x5a)* this[_0x7bc4[143]];return  new mxPoint(_0x9051x34[_0x7bc4[68]]+ _0x9051x34[_0x7bc4[70]]- _0x9051x4f,_0x9051x34[_0x7bc4[69]]+ _0x9051x4f)};function _0x9051x6a(_0x9051x33){_0x9051x66[_0x7bc4[24]](this,_0x9051x33)}mxUtils[_0x7bc4[25]](_0x9051x6a,_0x9051x66);_0x9051x6a[_0x7bc4[0]][_0x7bc4[142]]= 0.2;_0x9051x6a[_0x7bc4[0]][_0x7bc4[143]]= 1;_0x9051x6a[_0x7bc4[0]][_0x7bc4[128]]= function(_0x9051x34){var _0x9051x67=mxUtils[_0x7bc4[5]](this[_0x7bc4[83]][_0x7bc4[4]],_0x7bc4[2],this[_0x7bc4[142]]);return  new mxPoint(_0x9051x34[_0x7bc4[68]]+ _0x9051x34[_0x7bc4[70]]* _0x9051x67,_0x9051x34[_0x7bc4[69]]+ _0x9051x34[_0x7bc4[71]]/ 2)};_0x9051x6a[_0x7bc4[0]][_0x7bc4[134]]= function(_0x9051x60,_0x9051x34){var _0x9051x4f=Math[_0x7bc4[6]](1,(_0x9051x60[_0x7bc4[68]]- _0x9051x34[_0x7bc4[68]])/ _0x9051x34[_0x7bc4[70]]);this[_0x7bc4[83]][_0x7bc4[4]][_0x7bc4[2]]= _0x9051x4f;return  new mxPoint(_0x9051x34[_0x7bc4[68]]+ _0x9051x4f* _0x9051x34[_0x7bc4[70]],_0x9051x34[_0x7bc4[69]]+ _0x9051x34[_0x7bc4[71]]/ 2)};function _0x9051x6b(_0x9051x33){_0x9051x66[_0x7bc4[24]](this,_0x9051x33)}mxUtils[_0x7bc4[25]](_0x9051x6b,_0x9051x66);_0x9051x6b[_0x7bc4[0]][_0x7bc4[142]]= 0.4;_0x9051x6b[_0x7bc4[0]][_0x7bc4[143]]= 1;_0x9051x6b[_0x7bc4[0]][_0x7bc4[128]]= function(_0x9051x34){var _0x9051x67=mxUtils[_0x7bc4[5]](this[_0x7bc4[83]][_0x7bc4[4]],_0x7bc4[2],this[_0x7bc4[142]]);return  new mxPoint(_0x9051x34[_0x7bc4[68]]+ _0x9051x34[_0x7bc4[70]]/ 2,_0x9051x34[_0x7bc4[69]]+ _0x9051x67* _0x9051x34[_0x7bc4[71]]/ 2)};_0x9051x6b[_0x7bc4[0]][_0x7bc4[134]]= function(_0x9051x60,_0x9051x34){var _0x9051x4f=Math[_0x7bc4[34]](0,Math[_0x7bc4[6]](1,((_0x9051x60[_0x7bc4[69]]- _0x9051x34[_0x7bc4[69]])/ _0x9051x34[_0x7bc4[71]])* 2));this[_0x7bc4[83]][_0x7bc4[4]][_0x7bc4[2]]= _0x9051x4f;return  new mxPoint(_0x9051x34[_0x7bc4[68]]+ _0x9051x34[_0x7bc4[70]]/ 2,_0x9051x34[_0x7bc4[69]]+ _0x9051x4f* _0x9051x34[_0x7bc4[71]]/ 2)};var _0x9051x6c={"\x73\x77\x69\x6D\x6C\x61\x6E\x65":_0x9051x64,"\x66\x6F\x6C\x64\x65\x72":_0x9051x61,"\x63\x75\x62\x65":_0x9051x66,"\x63\x61\x72\x64":_0x9051x68,"\x6E\x6F\x74\x65":_0x9051x69,"\x73\x74\x65\x70":_0x9051x6a,"\x74\x61\x70\x65":_0x9051x6b};var _0x9051x6d=mxGraph[_0x7bc4[0]][_0x7bc4[144]];mxGraph[_0x7bc4[0]][_0x7bc4[144]]= function(_0x9051x33){if(_0x9051x33!= null){var _0x9051x6e=_0x9051x6c[_0x9051x33[_0x7bc4[4]][_0x7bc4[123]]];if(_0x9051x6e!= null){return  new _0x9051x6e(_0x9051x33)}};return _0x9051x6d[_0x7bc4[30]](this,arguments)}};mxGraph[_0x7bc4[0]][_0x7bc4[145]]= function(_0x9051x6f,_0x9051x50){if(_0x9051x6f!= null&& _0x9051x6f[_0x7bc4[123]]!= null){if(_0x9051x6f[_0x7bc4[123]][_0x7bc4[146]]!= null){if(_0x9051x6f[_0x7bc4[123]][_0x7bc4[146]]!= null){return _0x9051x6f[_0x7bc4[123]][_0x7bc4[146]][_0x7bc4[147]]}}else {if(_0x9051x6f[_0x7bc4[123]][_0x7bc4[147]]!= null){return _0x9051x6f[_0x7bc4[123]][_0x7bc4[147]]}}};return null};mxRectangleShape[_0x7bc4[0]][_0x7bc4[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.75,0),true), new mxConnectionConstraint( new mxPoint(0,0.25),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0,0.75),true), new mxConnectionConstraint( new mxPoint(1,0.25),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.75),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true)];mxLabel[_0x7bc4[0]][_0x7bc4[147]]= mxRectangleShape[_0x7bc4[0]][_0x7bc4[147]];mxImageShape[_0x7bc4[0]][_0x7bc4[147]]= mxRectangleShape[_0x7bc4[0]][_0x7bc4[147]];mxSwimlane[_0x7bc4[0]][_0x7bc4[147]]= mxRectangleShape[_0x7bc4[0]][_0x7bc4[147]];_0x9051x14[_0x7bc4[0]][_0x7bc4[147]]= mxRectangleShape[_0x7bc4[0]][_0x7bc4[147]];_0x9051x9[_0x7bc4[0]][_0x7bc4[147]]= mxRectangleShape[_0x7bc4[0]][_0x7bc4[147]];_0x9051x10[_0x7bc4[0]][_0x7bc4[147]]= mxRectangleShape[_0x7bc4[0]][_0x7bc4[147]];_0x9051x1[_0x7bc4[0]][_0x7bc4[147]]= mxRectangleShape[_0x7bc4[0]][_0x7bc4[147]];_0x9051xa[_0x7bc4[0]][_0x7bc4[147]]= mxRectangleShape[_0x7bc4[0]][_0x7bc4[147]];mxCylinder[_0x7bc4[0]][_0x7bc4[147]]= [ new mxConnectionConstraint( new mxPoint(0.15,0.05),false), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.85,0.05),false), new mxConnectionConstraint( new mxPoint(0,0.3),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0,0.7),true), new mxConnectionConstraint( new mxPoint(1,0.3),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.7),true), new mxConnectionConstraint( new mxPoint(0.15,0.95),false), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.85,0.95),false)];_0x9051x25[_0x7bc4[0]][_0x7bc4[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0.1),false), new mxConnectionConstraint( new mxPoint(0.5,0),false), new mxConnectionConstraint( new mxPoint(0.75,0.1),false), new mxConnectionConstraint( new mxPoint(0,1/ 3),false), new mxConnectionConstraint( new mxPoint(0,1),false), new mxConnectionConstraint( new mxPoint(1,1/ 3),false), new mxConnectionConstraint( new mxPoint(1,1),false), new mxConnectionConstraint( new mxPoint(0.5,0.5),false)];_0x9051x28[_0x7bc4[0]][_0x7bc4[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.75,0),true), new mxConnectionConstraint( new mxPoint(0,0.3),true), new mxConnectionConstraint( new mxPoint(0,0.7),true), new mxConnectionConstraint( new mxPoint(1,0.25),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.75),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true)];mxActor[_0x7bc4[0]][_0x7bc4[147]]= [ new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.25,0.2),false), new mxConnectionConstraint( new mxPoint(0.1,0.5),false), new mxConnectionConstraint( new mxPoint(0,0.75),true), new mxConnectionConstraint( new mxPoint(0.75,0.25),false), new mxConnectionConstraint( new mxPoint(0.9,0.5),false), new mxConnectionConstraint( new mxPoint(1,0.75),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true)];_0x9051x11[_0x7bc4[0]][_0x7bc4[147]]= [ new mxConnectionConstraint( new mxPoint(0,0.35),false), new mxConnectionConstraint( new mxPoint(0,0.5),false), new mxConnectionConstraint( new mxPoint(0,0.65),false), new mxConnectionConstraint( new mxPoint(1,0.35),false), new mxConnectionConstraint( new mxPoint(1,0.5),false), new mxConnectionConstraint( new mxPoint(1,0.65),false), new mxConnectionConstraint( new mxPoint(0.25,1),false), new mxConnectionConstraint( new mxPoint(0.75,0),false)];_0x9051x13[_0x7bc4[0]][_0x7bc4[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.75,0),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true), new mxConnectionConstraint( new mxPoint(0.1,0.25),false), new mxConnectionConstraint( new mxPoint(0.2,0.5),false), new mxConnectionConstraint( new mxPoint(0.1,0.75),false), new mxConnectionConstraint( new mxPoint(0.9,0.25),false), new mxConnectionConstraint( new mxPoint(1,0.5),false), new mxConnectionConstraint( new mxPoint(0.9,0.75),false)];mxLine[_0x7bc4[0]][_0x7bc4[147]]= [ new mxConnectionConstraint( new mxPoint(0,0.5),false), new mxConnectionConstraint( new mxPoint(0.25,0.5),false), new mxConnectionConstraint( new mxPoint(0.75,0.5),false), new mxConnectionConstraint( new mxPoint(1,0.5),false)];_0x9051x26[_0x7bc4[0]][_0x7bc4[147]]= [ new mxConnectionConstraint( new mxPoint(0.5,0),false), new mxConnectionConstraint( new mxPoint(0.5,1),false)];mxEllipse[_0x7bc4[0]][_0x7bc4[147]]= [ new mxConnectionConstraint( new mxPoint(0,0),true), new mxConnectionConstraint( new mxPoint(1,0),true), new mxConnectionConstraint( new mxPoint(0,1),true), new mxConnectionConstraint( new mxPoint(1,1),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.5))];mxDoubleEllipse[_0x7bc4[0]][_0x7bc4[147]]= mxEllipse[_0x7bc4[0]][_0x7bc4[147]];mxRhombus[_0x7bc4[0]][_0x7bc4[147]]= mxEllipse[_0x7bc4[0]][_0x7bc4[147]];mxTriangle[_0x7bc4[0]][_0x7bc4[147]]= [ new mxConnectionConstraint( new mxPoint(0,0.25),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0,0.75),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(1,0.5),true)];mxHexagon[_0x7bc4[0]][_0x7bc4[147]]= [ new mxConnectionConstraint( new mxPoint(0.375,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.625,0),true), new mxConnectionConstraint( new mxPoint(0.125,0.25),false), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0.125,0.75),false), new mxConnectionConstraint( new mxPoint(0.875,0.25),false), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(0.875,0.75),false), new mxConnectionConstraint( new mxPoint(0.375,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.625,1),true)];mxCloud[_0x7bc4[0]][_0x7bc4[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0.25),false), new mxConnectionConstraint( new mxPoint(0.4,0.1),false), new mxConnectionConstraint( new mxPoint(0.16,0.55),false), new mxConnectionConstraint( new mxPoint(0.07,0.4),false), new mxConnectionConstraint( new mxPoint(0.31,0.8),false), new mxConnectionConstraint( new mxPoint(0.13,0.77),false), new mxConnectionConstraint( new mxPoint(0.8,0.8),false), new mxConnectionConstraint( new mxPoint(0.55,0.95),false), new mxConnectionConstraint( new mxPoint(0.875,0.5),false), new mxConnectionConstraint( new mxPoint(0.96,0.7),false), new mxConnectionConstraint( new mxPoint(0.625,0.2),false), new mxConnectionConstraint( new mxPoint(0.88,0.25),false)];mxArrow[_0x7bc4[0]][_0x7bc4[147]]= null})()
\ No newline at end of file
diff --git a/public/assets/plugins/square/js/Sidebar.js b/public/assets/plugins/square/js/Sidebar.js
index 6e4129c..f2f6a17 100644
--- a/public/assets/plugins/square/js/Sidebar.js
+++ b/public/assets/plugins/square/js/Sidebar.js
@@ -1,932 +1 @@
-'use strict';
-
-/**
- * Construcs a new sidebar for the given editor.
- */
-function Sidebar(editorUi, container) {
-	this.editorUi = editorUi;
-	this.container = container;
-	this.palettes = new Object();
-	this.showTooltips = true;
-	this.graph = new Graph(document.createElement('div'), null, null, this.editorUi
-		.editor.graph.getStylesheet());
-	this.graph.resetViewOnRootChange = false;
-	this.graph.foldingEnabled = false;
-	this.graph.setConnectable(false);
-	this.graph.autoScroll = false;
-	this.graph.setTooltips(false);
-	this.graph.setEnabled(false);
-
-	// Container must be in the DOM for correct HTML rendering
-	this.graph.container.style.visibility = 'hidden';
-	this.graph.container.style.position = 'absolute';
-	document.body.appendChild(this.graph.container);
-
-	if (!mxClient.IS_TOUCH) {
-		mxEvent.addListener(document, 'mouseup', mxUtils.bind(this, function() {
-			this.showTooltips = true;
-		}));
-
-		// Enables tooltips after scroll
-		mxEvent.addListener(container, 'scroll', mxUtils.bind(this, function() {
-			this.showTooltips = true;
-		}));
-
-		mxEvent.addListener(document, 'mousedown', mxUtils.bind(this, function() {
-			this.showTooltips = false;
-			this.hideTooltip();
-		}));
-
-		mxEvent.addListener(document, 'mousemove', mxUtils.bind(this, function(evt) {
-			var src = mxEvent.getSource(evt);
-
-			while (src != null) {
-				if (src == this.currentElt) {
-					return;
-				}
-
-				src = src.parentNode;
-			}
-
-			this.hideTooltip();
-		}));
-
-		// Handles mouse leaving the window
-		mxEvent.addListener(document, 'mouseout', mxUtils.bind(this, function(evt) {
-			if (evt.toElement == null && evt.relatedTarget == null) {
-				this.hideTooltip();
-			}
-		}));
-	}
-
-	this.init();
-
-	// Pre-fetches tooltip image
-	new Image().src = IMAGE_PATH + '/tooltip.png';
-};
-
-/**
- * Adds all palettes to the sidebar.
- */
-Sidebar.prototype.init = function() {
-	var dir = STENCIL_PATH;
-	console.log(dir);
-
-	this.addImagePalette('entry', mxResources.get('entry'), dir + '/entry/',
-		'_128x128.png', ['start', 'finally', 'end'], [mxResources.get('start'),
-			mxResources.get('finally'), mxResources.get('end')
-		]);
-	this.addImagePalette('call_management', mxResources.get('call_management'),
-		dir + '/call_management/', '_128x128.png', ['answer', 'hangup', 'dial',
-			'ext_dial', 'queue', 'voicemail', 'callback'
-		], [mxResources.get('answer'), mxResources.get('hangup'), mxResources.get(
-				'dial'), mxResources.get('ext_dial'), mxResources.get('queue'),
-			mxResources.get('voicemail'), mxResources.get('callback')
-		]);
-	this.addImagePalette('variable', mxResources.get('variable'), dir +
-		'/variable/', '_128x128.png', ['set', 'math'], [mxResources.get('set'),
-			mxResources.get('math')
-		]);
-	this.addImagePalette('playback', mxResources.get('playback'), dir +
-		'/playback/', '_128x128.png', ['playback', 'menu',
-			'saydigits', 'saynumber', 'sayphonetic', 'tts', 'ispeechtts', 'getdigits', 'getsecretdigits'
-		], [mxResources.get('playback'), mxResources
-			.get('menu'), mxResources.get('saydigits'), mxResources.get('saynumber'),
-			mxResources.get('sayphonetic'), mxResources.get('tts'), mxResources.get(
-				'ispeechtts'), mxResources.get('getdigits'), mxResources.get('getsecretdigits')
-		]);
-	this.addImagePalette('recording', mxResources.get('recording'), dir +
-		'/recording/', '_128x128.png', ['record'], [mxResources.get('record')]);
-	this.addImagePalette('integrationServer', mxResources.get('integrationServer'),
-		dir + '/integration_server/', '_128x128.png', ['database', 'ispeechasr',
-			'sendSMS', 'sendMail'
-		], [
-			mxResources.get('database'), mxResources.get('ispeechasr'), mxResources.get(
-				'sendSMS'), mxResources.get(
-				'sendMail')
-		]);
-	this.addImagePalette('callflow', mxResources.get('callflow'), dir +
-		'/callflow/', '_128x128.png', ['gotoc', 'gotoif', 'gotoiftime', 'vswitch'], [
-			mxResources.get('gotoc'), mxResources.get('gotoif'), mxResources.get(
-				'gotoiftime'), mxResources.get('vswitch')
-		]);
-	this.addImagePalette('stats', mxResources.get('stats'), dir + '/stats/',
-		'_128x128.png', [
-			// 'queuelog',
-			'goal'
-		], [
-			// mxResources.get('queuelog'),
-			mxResources.get('goal')
-		]);
-	this.addImagePalette('general', mxResources.get('general'), dir + '/general/',
-		'_128x128.png', ['noop', 'system', 'agi', 'subproject', 'custom_app'], [
-			mxResources.get(
-				'noop'), mxResources.get('system'), mxResources.get('agi'), mxResources.get(
-				'subproject'), mxResources.get(
-				'custom_app')
-		]);
-
-};
-
-/**
- * Specifies if tooltips should be visible. Default is true.
- */
-Sidebar.prototype.enableTooltips = !mxClient.IS_TOUCH;
-
-/**
- * Specifies the delay for the tooltip. Default is 16 px.
- */
-Sidebar.prototype.tooltipBorder = 16;
-
-/**
- * Specifies the delay for the tooltip. Default is 3 px.
- */
-Sidebar.prototype.thumbBorder = 3;
-
-/**
- * Specifies the delay for the tooltip. Default is 300 ms.
- */
-Sidebar.prototype.tooltipDelay = 300;
-
-/**
- * Specifies if edges should be used as templates if clicked. Default is true.
- */
-Sidebar.prototype.installEdges = true;
-
-/**
- * Specifies the URL of the gear image.
- */
-Sidebar.prototype.gearImage = STENCIL_PATH + '/clipart/Gear_128x128.png';
-
-/**
- * Specifies the width of the thumbnails.
- */
-Sidebar.prototype.thumbWidth = 34;
-
-/**
- * Specifies the height of the thumbnails.
- */
-Sidebar.prototype.thumbHeight = 34;
-
-/**
- * Specifies the padding for the thumbnails. Default is 3.
- */
-Sidebar.prototype.thumbPadding = 2;
-
-/**
- * Specifies the size of the sidebar titles.
- */
-Sidebar.prototype.sidebarTitleSize = 9;
-
-/**
- * Specifies if titles in the sidebar should be enabled.
- */
-Sidebar.prototype.sidebarTitles = false;
-
-/**
- * Specifies if titles in the tooltips should be enabled.
- */
-Sidebar.prototype.tooltipTitles = false;
-
-/**
- * Adds all palettes to the sidebar.
- */
-Sidebar.prototype.showTooltip = function(elt, cells, title, showLabel) {
-	if (this.enableTooltips && this.showTooltips) {
-		if (this.currentElt != elt) {
-			if (this.thread != null) {
-				window.clearTimeout(this.thread);
-				this.thread = null;
-			}
-
-			var show = mxUtils.bind(this, function() {
-				// Lazy creation of the DOM nodes and graph instance
-				if (this.tooltip == null) {
-					this.tooltip = document.createElement('div');
-					this.tooltip.className = 'geSidebarTooltip';
-					document.body.appendChild(this.tooltip);
-
-					this.graph2 = new Graph(this.tooltip, null, null, this.editorUi.editor.graph
-						.getStylesheet());
-					this.graph2.view.setTranslate(this.tooltipBorder, this.tooltipBorder);
-					this.graph2.resetViewOnRootChange = false;
-					this.graph2.foldingEnabled = false;
-					this.graph2.autoScroll = false;
-					this.graph2.setTooltips(false);
-					this.graph2.setConnectable(false);
-					this.graph2.setEnabled(false);
-
-					if (!mxClient.IS_SVG) {
-						this.graph2.view.canvas.style.position = 'relative';
-					}
-
-					this.tooltipImage = mxUtils.createImage(IMAGE_PATH + '/tooltip.png');
-					this.tooltipImage.style.position = 'absolute';
-					this.tooltipImage.style.width = '14px';
-					this.tooltipImage.style.height = '27px';
-
-					document.body.appendChild(this.tooltipImage);
-				}
-
-				this.tooltip.style.display = 'block';
-				this.graph2.labelsVisible = (showLabel == null || showLabel);
-				this.graph2.model.clear();
-				this.graph2.addCells(cells);
-
-				var bounds = this.graph2.getGraphBounds();
-				var width = bounds.width + 2 * this.tooltipBorder;
-				var height = bounds.height + 2 * this.tooltipBorder;
-
-				if (mxClient.IS_QUIRKS) {
-					width += 4;
-					height += 4;
-					this.tooltip.style.overflow = 'hidden';
-				} else {
-					this.tooltip.style.overflow = 'visible';
-				}
-
-				this.tooltipImage.style.visibility = 'visible';
-				this.tooltip.style.width = width + 'px';
-
-				// Adds title for entry
-				if (this.tooltipTitles && title != null && title.length > 0) {
-					if (this.tooltipTitle == null) {
-						this.tooltipTitle = document.createElement('div');
-						this.tooltipTitle.style.borderTop = '1px solid gray';
-						this.tooltipTitle.style.textAlign = 'center';
-						this.tooltipTitle.style.width = '100%';
-
-						// Oversize titles are cut-off currently. Should make tooltip wider later.
-						this.tooltipTitle.style.overflow = 'hidden';
-
-						if (mxClient.IS_SVG) {
-							this.tooltipTitle.style.paddingTop = '2px';
-						} else {
-							this.tooltipTitle.style.position = 'absolute';
-							this.tooltipTitle.style.paddingTop = '6px';
-						}
-
-						this.tooltip.appendChild(this.tooltipTitle);
-					} else {
-						this.tooltipTitle.innerHTML = '';
-					}
-
-					this.tooltipTitle.style.display = '';
-					mxUtils.write(this.tooltipTitle, title);
-
-					var dy = this.tooltipTitle.offsetHeight + 10;
-					height += dy;
-
-					if (mxClient.IS_SVG) {
-						this.tooltipTitle.style.marginTop = (-dy) + 'px';
-					} else {
-						height -= 6;
-						this.tooltipTitle.style.top = (height - dy) + 'px';
-					}
-				} else if (this.tooltipTitle != null && this.tooltipTitle.parentNode !=
-					null) {
-					this.tooltipTitle.style.display = 'none';
-				}
-
-				this.tooltip.style.height = height + 'px';
-				var x0 = -Math.min(0, bounds.x - this.tooltipBorder);
-				var y0 = -Math.min(0, bounds.y - this.tooltipBorder);
-
-				var left = this.container.clientWidth + this.editorUi.splitSize + 3;
-				var top = Math.max(0, (this.container.offsetTop + elt.offsetTop - this.container
-					.scrollTop - height / 2 + 16));
-
-				if (mxClient.IS_SVG) {
-					this.graph2.view.canvas.setAttribute('transform', 'translate(' + x0 +
-						',' + y0 + ')');
-				} else {
-					this.graph2.view.drawPane.style.left = x0 + 'px';
-					this.graph2.view.drawPane.style.top = y0 + 'px';
-				}
-
-				// Workaround for ignored position CSS style in IE9
-				// (changes to relative without the following line)
-				// Added width of the page-sidebar
-				left += document.getElementById('page-sidebar').offsetWidth;
-				// Added static height of the page-navbar
-				top += 90;
-
-				this.tooltip.style.position = 'absolute';
-				this.tooltip.style.left = left + 'px';
-				this.tooltip.style.top = top + 'px';
-				this.tooltipImage.style.left = (left - 13) + 'px';
-				this.tooltipImage.style.top = (top + height / 2 - 13) + 'px';
-			});
-
-			if (this.tooltip != null && this.tooltip.style.display != 'none') {
-				show();
-			} else {
-				this.thread = window.setTimeout(show, this.tooltipDelay);
-			}
-
-			this.currentElt = elt;
-		}
-	}
-};
-
-/**
- * Hides the current tooltip.
- */
-Sidebar.prototype.hideTooltip = function() {
-	if (this.thread != null) {
-		window.clearTimeout(this.thread);
-		this.thread = null;
-	}
-
-	if (this.tooltip != null) {
-		this.tooltip.style.display = 'none';
-		this.tooltipImage.style.visibility = 'hidden';
-		this.currentElt = null;
-	}
-};
-
-/**
- * Creates and returns the given title element.
- */
-Sidebar.prototype.createTitle = function(label) {
-	var elt = document.createElement('a');
-	elt.setAttribute('href', 'javascript:void(0);');
-	elt.className = 'geTitle';
-	mxUtils.write(elt, label);
-
-	return elt;
-};
-
-/**
- * Creates a thumbnail for the given cells.
- */
-Sidebar.prototype.createThumb = function(cells, width, height, parent, title,
-	showLabel) {
-	this.graph.labelsVisible = (showLabel == null || showLabel);
-	this.graph.view.scaleAndTranslate(1, 0, 0);
-	this.graph.addCells(cells);
-	var bounds = this.graph.getGraphBounds();
-	var corr = this.thumbBorder;
-	var s = Math.min((width - 2) / (bounds.width - bounds.x + corr), (height - 2) /
-		(bounds.height - bounds.y + corr));
-	var x0 = -Math.min(bounds.x, 0);
-	var y0 = -Math.min(bounds.y, 0);
-	this.graph.view.scaleAndTranslate(s, x0, y0);
-
-	bounds = this.graph.getGraphBounds();
-	var dx = Math.max(0, Math.floor((width - bounds.width - bounds.x) / 2));
-	var dy = Math.max(0, Math.floor((height - bounds.height - bounds.y) / 2));
-
-	var node = null;
-
-	// For supporting HTML labels in IE9 standards mode the container is cloned instead
-	if (this.graph.dialect == mxConstants.DIALECT_SVG && !mxClient.NO_FO) {
-		node = this.graph.view.getCanvas().ownerSVGElement.cloneNode(true);
-	}
-	// LATER: Check if deep clone can be used for quirks if container in DOM
-	else {
-		node = this.graph.container.cloneNode(false);
-		node.innerHTML = this.graph.container.innerHTML;
-	}
-
-	this.graph.getModel().clear();
-
-	// Catch-all event handling
-	if (mxClient.IS_IE6) {
-		parent.style.backgroundImage = 'url(' + this.editorUi.editor.transparentImage +
-			')';
-	}
-
-	var dd = 3;
-	node.style.position = 'relative';
-	node.style.overflow = 'hidden';
-	node.style.cursor = 'pointer';
-	node.style.left = (dx + dd) + 'px';
-	node.style.top = (dy + dd) + 'px';
-	node.style.width = width + 'px';
-	node.style.height = height + 'px';
-	node.style.visibility = '';
-	node.style.minWidth = '';
-	node.style.minHeight = '';
-
-	parent.appendChild(node);
-
-	// Adds title for sidebar entries
-	if (this.sidebarTitles && title != null) {
-		var border = (mxClient.IS_QUIRKS) ? 2 * this.thumbPadding + 2 : 0;
-		parent.style.height = (this.thumbHeight + border + this.sidebarTitleSize + 8) +
-			'px';
-
-		var div = document.createElement('div');
-		div.style.fontSize = this.sidebarTitleSize + 'px';
-		div.style.textAlign = 'center';
-		div.style.whiteSpace = 'nowrap';
-
-		if (mxClient.IS_IE) {
-			div.style.height = (this.sidebarTitleSize + 12) + 'px';
-		}
-
-		div.style.paddingTop = '4px';
-		mxUtils.write(div, title);
-		parent.appendChild(div);
-	}
-};
-
-/**
- * Creates and returns a new palette item for the given image.
- */
-Sidebar.prototype.createItem = function(cells, title, showLabel) {
-	var elt = document.createElement('a');
-	elt.setAttribute('href', 'javascript:void(0);');
-	elt.className = 'geItem';
-	elt.style.overflow = 'hidden';
-	var border = (mxClient.IS_QUIRKS) ? 8 + 2 * this.thumbPadding : 6;
-	elt.style.width = (this.thumbWidth + border) + 'px';
-	elt.style.height = (this.thumbHeight + border) + 'px';
-	elt.style.padding = this.thumbPadding + 'px';
-
-	// Blocks default click action
-	mxEvent.addListener(elt, 'click', function(evt) {
-		mxEvent.consume(evt);
-	});
-
-	this.createThumb(cells, this.thumbWidth, this.thumbHeight, elt, title,
-		showLabel);
-
-	return elt;
-};
-
-/**
- * Creates a drop handler for inserting the given cells.
- */
-Sidebar.prototype.createDropHandler = function(cells, allowSplit) {
-	return function(graph, evt, target, x, y) {
-		if (graph.isEnabled()) {
-			cells = graph.getImportableCells(cells);
-
-			if (cells.length > 0) {
-				var validDropTarget = (target != null) ?
-					graph.isValidDropTarget(target, cells, evt) : false;
-				var select = null;
-
-				if (target != null && !validDropTarget) {
-					target = null;
-				}
-
-				// Splits the target edge or inserts into target group
-				if (allowSplit && graph.isSplitEnabled() && graph.isSplitTarget(target,
-						cells, evt)) {
-					graph.splitEdge(target, cells, null, x, y);
-					select = cells;
-				} else if (cells.length > 0) {
-					select = graph.importCells(cells, x, y, target);
-				}
-
-				if (select != null && select.length > 0) {
-					graph.scrollCellToVisible(select[0]);
-					graph.setSelectionCells(select);
-				}
-			}
-		}
-	};
-};
-
-/**
- * Creates and returns a preview element for the given width and height.
- */
-Sidebar.prototype.createDragPreview = function(width, height) {
-	var elt = document.createElement('div');
-	elt.style.border = '1px dashed black';
-	elt.style.width = width + 'px';
-	elt.style.height = height + 'px';
-
-	return elt;
-};
-
-/**
- * Creates a drag source for the given element.
- */
-Sidebar.prototype.createDragSource = function(elt, dropHandler, preview) {
-	var dragSource = mxUtils.makeDraggable(elt, this.editorUi.editor.graph,
-		dropHandler,
-		preview, 0, 0, this.editorUi.editor.graph.autoscroll, true, true);
-
-	// Allows drop into cell only if target is a valid root
-	dragSource.getDropTarget = function(graph, x, y) {
-		var target = mxDragSource.prototype.getDropTarget.apply(this, arguments);
-
-		if (!graph.isValidRoot(target)) {
-			target = null;
-		}
-
-		return target;
-	};
-
-	return dragSource;
-};
-
-/**
- * Adds a handler for inserting the cell with a single click.
- */
-Sidebar.prototype.addClickHandler = function(elt, ds) {
-	var graph = this.editorUi.editor.graph;
-	var first = null;
-
-	mxEvent.addGestureListeners(elt, function(evt) {
-		first = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
-	});
-
-	var oldMouseUp = ds.mouseUp;
-	ds.mouseUp = function(evt) {
-		if (!mxEvent.isPopupTrigger(evt) && this.currentGraph == null && first !=
-			null) {
-			var tol = graph.tolerance;
-
-			if (Math.abs(first.x - mxEvent.getClientX(evt)) <= tol &&
-				Math.abs(first.y - mxEvent.getClientY(evt)) <= tol) {
-				var gs = graph.getGridSize();
-				ds.drop(graph, evt, null, gs, gs);
-			}
-		}
-
-		oldMouseUp.apply(this, arguments);
-		first = null;
-	};
-};
-
-/**
- * Giuseppe Careri
- * Create xml document vertex
- */
-Sidebar.prototype.createXmlDocument = function(element, label, variables,
-	values) {
-	var doc = mxUtils.createXmlDocument();
-	var node = doc.createElement(element)
-	node.setAttribute('label', label);
-
-	variables.forEach(function(variable, index) {
-		node.setAttribute(variable, values[index] ? values[index] : '');
-	});
-
-	return node;
-}
-
-/**
- * Giuseppe Careri
- * Creates a drop handler for inserting the given cells.
- */
-Sidebar.prototype.createVertexTemplate = function(style, width, height, value,
-	title, showLabel) {
-	var variables = [];
-	var values = [];
-
-	switch (value) {
-		case 'answer':
-			break;
-		case 'start':
-			variables = ['answer'];
-			values = ['yes'];
-			break;
-		case 'ispeechasr':
-			variables = ['key', 'model', 'ispeech_asr_language', 'timeout', 'intKey',
-				'beep'
-			];
-			values = ['', 0, 'it-IT', 1, '#', true];
-			break;
-		case 'playback':
-			variables = ['file_id', 'opts'];
-			values = ['0'];
-			break;
-		case 'background':
-			variables = ['file_id', 'response', 'digit'];
-			values = ['0', '5', '1'];
-			break;
-		case 'menu':
-			variables = ['file_id', 'response', 'digit', 'retry', 'variable_id'];
-			values = ['0', '5', '1', '1', '0'];
-			break;
-		case 'getdigits':
-			variables = ['file_id', 'response', 'mindigit', 'maxdigit', 'retry',
-				'variable_id'
-			];
-			values = ['0', '5', '1', '10', '1', '0'];
-			break;
-		case 'getsecretdigits':
-			variables = ['file_id', 'response', 'mindigit', 'maxdigit', 'retry', 'hiddendigitsnum', 'hiddendigitspos',
-				'variable_id'
-			];
-			values = ['0', '5', '1', '10', '1', '0', 'first', '0'];
-			break;
-		case 'custom_app':
-			variables = ['application', 'options'];
-			values = ['', ''];
-			break;
-		case 'set':
-			variables = ['variable_id', 'variable_value'];
-			values = ['0', ''];
-			break;
-		case 'database':
-			variables = ['odbc_id', 'query', 'variable_id'];
-			values = ['0', '', '0'];
-			break;
-		case 'noop':
-			variables = ['output'];
-			values = [];
-			break;
-		case 'gotoc':
-			variables = ['context', 'extension'];
-			values = [];
-			break;
-		case 'system':
-			variables = ['variable_id', 'command'];
-			values = [];
-			break;
-		case 'agi':
-			variables = ['args', 'command'];
-			values = [];
-			break;
-		case 'gotoif':
-			variables = ['condition'];
-			values = [];
-			break;
-		case 'gotoiftime':
-			variables = ['interval_id'];
-			values = ['0'];
-			break;
-		case 'gotoifmultitime':
-			variables = ['interval_id'];
-			values = ['0'];
-			break;
-		case 'vswitch':
-			variables = ['variable_id'];
-			values = ['0'];
-			break;
-		case 'saydigits':
-			variables = ['digits', 'escape_digits'];
-			values = ['', '#'];
-			break;
-		case 'saynumber':
-			variables = ['number', 'escape_digits'];
-			values = ['', '#'];
-			break;
-		case 'sayphonetic':
-			variables = ['text', 'escape_digits'];
-			values = ['', '#'];
-			break;
-		case 'record':
-			variables = ['file', 'recordingFormat', 'timeout', 'escape_digits'];
-			values = ['', 'wav', '-1', '#'];
-			break;
-		case 'dial':
-			variables = ['sip_id', 'timeout', 'custom_app', 'url'];
-			values = ['0', '60'];
-			break;
-		case 'ext_dial':
-			variables = ['phone', 'trunk_name', 'timeout', 'opts', 'url'];
-			values = ['', '-1', '60'];
-			break;
-		case 'tts':
-			variables = ['text', 'google_tts_language'];
-			values = ['', 'it'];
-			break;
-		case 'ispeechtts':
-			variables = ['text', 'key', 'ispeech_tts_language', 'speed', 'intKey'];
-			values = ['', '', 'euritalianfemale', '0', '#'];
-			break;
-		case 'queue':
-			variables = ['queue_id', 'opts', 'url', 'file_id', 'timeout', 'agi',
-				'macro', 'gosub', 'position'
-			];
-			values = ['-1', '', '', '0', '300'];
-			break;
-		case 'voicemail':
-			variables = ['mailbox', 'options'];
-			values = ['', ''];
-			break;
-		case 'subproject':
-			variables = ['project_id'];
-			values = ['0'];
-			break;
-		case 'math':
-			variables = ['operation', 'variable_id'];
-			values = ['', '0'];
-			break;
-		case 'queuelog':
-			variables = ['queuename', 'agent', 'queue_event', 'data1', 'data2', 'data3',
-				'data4', 'data5'
-			];
-			values = [];
-			break;
-		case 'goal':
-			variables = ['goalname'];
-			values = [];
-			break;
-		case 'callback':
-			variables = ['name', 'phone', 'list_id', 'delay'];
-			values = ['', '{CALLERID(num)}', '0', '5'];
-			break;
-		case 'sendSMS':
-			variables = ['account_id', 'to', 'sms_text'];
-			values = ['0'];
-			break;
-		case 'sendMail':
-			variables = ['account_id', 'template_id', 'to', 'cc', 'subject', 'text'];
-			values = ['0'];
-			break;
-
-		default:
-			variables = [];
-			values = [];
-			break;
-	}
-
-	var node = this.createXmlDocument(value, title, variables, values);
-
-	//var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, width, height), style)];
-	var cells = [new mxCell(node, new mxGeometry(0, 0, width, height), style)];
-	cells[0].vertex = true;
-
-	return this.createVertexTemplateFromCells(cells, width, height, title,
-		showLabel);
-};
-
-/**
- * Creates a drop handler for inserting the given cells.
- */
-Sidebar.prototype.createVertexTemplateFromCells = function(cells, width, height,
-	title, showLabel) {
-	var elt = this.createItem(cells, title, showLabel);
-	var ds = this.createDragSource(elt, this.createDropHandler(cells, true), this
-		.createDragPreview(width, height));
-	this.addClickHandler(elt, ds);
-
-	// Uses guides for vertices only if enabled in graph
-	ds.isGuidesEnabled = mxUtils.bind(this, function() {
-		return this.editorUi.editor.graph.graphHandler.guidesEnabled;
-	});
-
-	// Shows a tooltip with the rendered cell
-	if (!touchStyle) {
-		mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt) {
-			this.showTooltip(elt, cells, title, showLabel);
-		}));
-	}
-
-	return elt;
-};
-
-/**
- * Creates a drop handler for inserting the given cells.
- */
-Sidebar.prototype.createEdgeTemplate = function(style, width, height, value,
-	title, showLabel) {
-	var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0,
-		width, height), style)];
-	cells[0].geometry.setTerminalPoint(new mxPoint(0, height), true);
-	cells[0].geometry.setTerminalPoint(new mxPoint(width, 0), false);
-	cells[0].geometry.relative = true;
-	cells[0].edge = true;
-
-	return this.createEdgeTemplateFromCells(cells, width, height, title,
-		showLabel);
-};
-
-/**
- * Creates a drop handler for inserting the given cells.
- */
-Sidebar.prototype.createEdgeTemplateFromCells = function(cells, width, height,
-	title, showLabel) {
-	var elt = this.createItem(cells, title, showLabel);
-	this.createDragSource(elt, this.createDropHandler(cells, false), this.createDragPreview(
-		width, height));
-
-	// Installs the default edge
-	var graph = this.editorUi.editor.graph;
-	mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt) {
-		if (this.installEdges) {
-			graph.setDefaultEdge(cells[0]);
-		}
-
-		// Highlights the entry for 200ms
-		elt.style.backgroundColor = '#ffffff';
-
-		window.setTimeout(function() {
-			elt.style.backgroundColor = '';
-		}, 300);
-
-		mxEvent.consume(evt);
-	}));
-
-	// Shows a tooltip with the rendered cell
-	if (!touchStyle) {
-		mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt) {
-			this.showTooltip(elt, cells, title, showLabel);
-		}));
-	}
-
-	return elt;
-};
-
-/**
- * Adds the given palette.
- */
-Sidebar.prototype.addPalette = function(id, title, expanded, onInit) {
-	var elt = this.createTitle(title);
-	this.container.appendChild(elt);
-
-	var div = document.createElement('div');
-	div.className = 'geSidebar';
-
-	if (expanded) {
-		onInit(div);
-		onInit = null;
-	} else {
-		div.style.display = 'none';
-	}
-
-	this.addFoldingHandler(elt, div, onInit);
-
-	var outer = document.createElement('div');
-	outer.appendChild(div);
-	this.container.appendChild(outer);
-
-	// Keeps references to the DOM nodes
-	if (id != null) {
-		this.palettes[id] = [elt, outer];
-	}
-};
-
-/**
- * Create the given title element.
- */
-Sidebar.prototype.addFoldingHandler = function(title, content, funct) {
-	var initialized = false;
-
-	title.style.backgroundImage = (content.style.display == 'none') ?
-		'url(' + IMAGE_PATH + '/collapsed.gif)' : 'url(' + IMAGE_PATH +
-		'/expanded.gif)';
-	title.style.backgroundRepeat = 'no-repeat';
-	title.style.backgroundPosition = '100% 50%';
-
-	mxEvent.addListener(title, 'click', function(evt) {
-		if (content.style.display == 'none') {
-			if (!initialized) {
-				initialized = true;
-
-				if (funct != null) {
-					title.style.cursor = 'wait';
-					window.setTimeout(function() {
-						funct(content);
-						title.style.cursor = '';
-					}, 0);
-				}
-			}
-
-			title.style.backgroundImage = 'url(' + IMAGE_PATH + '/expanded.gif)';
-			content.style.display = 'block';
-		} else {
-			title.style.backgroundImage = 'url(' + IMAGE_PATH + '/collapsed.gif)';
-			content.style.display = 'none';
-		}
-
-		mxEvent.consume(evt);
-	});
-};
-
-/**
- * Removes the palette for the given ID.
- */
-Sidebar.prototype.removePalette = function(id) {
-	var elts = this.palettes[id];
-
-	if (elts != null) {
-		this.palettes[id] = null;
-
-		for (var i = 0; i < elts.length; i++) {
-			this.container.removeChild(elts[i]);
-		}
-
-		return true;
-	}
-
-	return false;
-};
-
-/**
- * Adds the given image palette.
- */
-Sidebar.prototype.addImagePalette = function(id, title, prefix, postfix, items,
-	titles) {
-	// Giuseppe Careri
-	// Expanded Sidebar only entry
-	this.addPalette(id, title, (id === 'entry'), mxUtils.bind(this, function(
-		content) {
-		var showTitles = titles != null;
-
-		for (var i = 0; i < items.length; i++) {
-			var icon = prefix + items[i] + postfix;
-			content.appendChild(this.createVertexTemplate('image;image=' + icon, 80,
-				80, items[i], (showTitles) ? titles[i] : null, showTitles));
-		}
-	}));
-};
+var _0x57ac=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x64\x69\x74\x6F\x72\x55\x69","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x70\x61\x6C\x65\x74\x74\x65\x73","\x73\x68\x6F\x77\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x67\x72\x61\x70\x68","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x74\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x65\x64\x69\x74\x6F\x72","\x72\x65\x73\x65\x74\x56\x69\x65\x77\x4F\x6E\x52\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x61\x75\x74\x6F\x53\x63\x72\x6F\x6C\x6C","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x76\x69\x73\x69\x62\x69\x6C\x69\x74\x79","\x73\x74\x79\x6C\x65","\x68\x69\x64\x64\x65\x6E","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x62\x6F\x64\x79","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x6D\x6F\x75\x73\x65\x75\x70","\x62\x69\x6E\x64","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x73\x63\x72\x6F\x6C\x6C","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x68\x69\x64\x65\x54\x6F\x6F\x6C\x74\x69\x70","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x67\x65\x74\x53\x6F\x75\x72\x63\x65","\x63\x75\x72\x72\x65\x6E\x74\x45\x6C\x74","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x6D\x6F\x75\x73\x65\x6F\x75\x74","\x74\x6F\x45\x6C\x65\x6D\x65\x6E\x74","\x72\x65\x6C\x61\x74\x65\x64\x54\x61\x72\x67\x65\x74","\x69\x6E\x69\x74","\x73\x72\x63","\x2F\x74\x6F\x6F\x6C\x74\x69\x70\x2E\x70\x6E\x67","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6C\x6F\x67","\x65\x6E\x74\x72\x79","\x67\x65\x74","\x2F\x65\x6E\x74\x72\x79\x2F","\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67","\x73\x74\x61\x72\x74","\x66\x69\x6E\x61\x6C\x6C\x79","\x65\x6E\x64","\x61\x64\x64\x49\x6D\x61\x67\x65\x50\x61\x6C\x65\x74\x74\x65","\x63\x61\x6C\x6C\x5F\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74","\x2F\x63\x61\x6C\x6C\x5F\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2F","\x61\x6E\x73\x77\x65\x72","\x68\x61\x6E\x67\x75\x70","\x64\x69\x61\x6C","\x65\x78\x74\x5F\x64\x69\x61\x6C","\x71\x75\x65\x75\x65","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x76\x61\x72\x69\x61\x62\x6C\x65","\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2F","\x73\x65\x74","\x6D\x61\x74\x68","\x70\x6C\x61\x79\x62\x61\x63\x6B","\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x2F","\x6D\x65\x6E\x75","\x73\x61\x79\x64\x69\x67\x69\x74\x73","\x73\x61\x79\x6E\x75\x6D\x62\x65\x72","\x73\x61\x79\x70\x68\x6F\x6E\x65\x74\x69\x63","\x74\x74\x73","\x69\x73\x70\x65\x65\x63\x68\x74\x74\x73","\x67\x65\x74\x64\x69\x67\x69\x74\x73","\x67\x65\x74\x73\x65\x63\x72\x65\x74\x64\x69\x67\x69\x74\x73","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2F","\x72\x65\x63\x6F\x72\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x53\x65\x72\x76\x65\x72","\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x5F\x73\x65\x72\x76\x65\x72\x2F","\x64\x61\x74\x61\x62\x61\x73\x65","\x69\x73\x70\x65\x65\x63\x68\x61\x73\x72","\x73\x65\x6E\x64\x53\x4D\x53","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x63\x61\x6C\x6C\x66\x6C\x6F\x77","\x2F\x63\x61\x6C\x6C\x66\x6C\x6F\x77\x2F","\x67\x6F\x74\x6F\x63","\x67\x6F\x74\x6F\x69\x66","\x67\x6F\x74\x6F\x69\x66\x74\x69\x6D\x65","\x76\x73\x77\x69\x74\x63\x68","\x73\x74\x61\x74\x73","\x2F\x73\x74\x61\x74\x73\x2F","\x67\x6F\x61\x6C","\x67\x65\x6E\x65\x72\x61\x6C","\x2F\x67\x65\x6E\x65\x72\x61\x6C\x2F","\x6E\x6F\x6F\x70","\x73\x79\x73\x74\x65\x6D","\x61\x67\x69","\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74","\x63\x75\x73\x74\x6F\x6D\x5F\x61\x70\x70","\x65\x6E\x61\x62\x6C\x65\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x42\x6F\x72\x64\x65\x72","\x74\x68\x75\x6D\x62\x42\x6F\x72\x64\x65\x72","\x74\x6F\x6F\x6C\x74\x69\x70\x44\x65\x6C\x61\x79","\x69\x6E\x73\x74\x61\x6C\x6C\x45\x64\x67\x65\x73","\x67\x65\x61\x72\x49\x6D\x61\x67\x65","\x2F\x63\x6C\x69\x70\x61\x72\x74\x2F\x47\x65\x61\x72\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67","\x74\x68\x75\x6D\x62\x57\x69\x64\x74\x68","\x74\x68\x75\x6D\x62\x48\x65\x69\x67\x68\x74","\x74\x68\x75\x6D\x62\x50\x61\x64\x64\x69\x6E\x67","\x73\x69\x64\x65\x62\x61\x72\x54\x69\x74\x6C\x65\x53\x69\x7A\x65","\x73\x69\x64\x65\x62\x61\x72\x54\x69\x74\x6C\x65\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x54\x69\x74\x6C\x65\x73","\x73\x68\x6F\x77\x54\x6F\x6F\x6C\x74\x69\x70","\x74\x68\x72\x65\x61\x64","\x63\x6C\x65\x61\x72\x54\x69\x6D\x65\x6F\x75\x74","\x74\x6F\x6F\x6C\x74\x69\x70","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x53\x69\x64\x65\x62\x61\x72\x54\x6F\x6F\x6C\x74\x69\x70","\x67\x72\x61\x70\x68\x32","\x73\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x76\x69\x65\x77","\x49\x53\x5F\x53\x56\x47","\x63\x61\x6E\x76\x61\x73","\x72\x65\x6C\x61\x74\x69\x76\x65","\x74\x6F\x6F\x6C\x74\x69\x70\x49\x6D\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x49\x6D\x61\x67\x65","\x77\x69\x64\x74\x68","\x31\x34\x70\x78","\x68\x65\x69\x67\x68\x74","\x32\x37\x70\x78","\x64\x69\x73\x70\x6C\x61\x79","\x62\x6C\x6F\x63\x6B","\x6C\x61\x62\x65\x6C\x73\x56\x69\x73\x69\x62\x6C\x65","\x63\x6C\x65\x61\x72","\x6D\x6F\x64\x65\x6C","\x61\x64\x64\x43\x65\x6C\x6C\x73","\x67\x65\x74\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x76\x69\x73\x69\x62\x6C\x65","\x70\x78","\x6C\x65\x6E\x67\x74\x68","\x74\x6F\x6F\x6C\x74\x69\x70\x54\x69\x74\x6C\x65","\x62\x6F\x72\x64\x65\x72\x54\x6F\x70","\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x67\x72\x61\x79","\x74\x65\x78\x74\x41\x6C\x69\x67\x6E","\x63\x65\x6E\x74\x65\x72","\x31\x30\x30\x25","\x70\x61\x64\x64\x69\x6E\x67\x54\x6F\x70","\x32\x70\x78","\x36\x70\x78","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","","\x77\x72\x69\x74\x65","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x6D\x61\x72\x67\x69\x6E\x54\x6F\x70","\x74\x6F\x70","\x6E\x6F\x6E\x65","\x78","\x6D\x69\x6E","\x79","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x73\x70\x6C\x69\x74\x53\x69\x7A\x65","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x6D\x61\x78","\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x28","\x2C","\x29","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x6C\x65\x66\x74","\x64\x72\x61\x77\x50\x61\x6E\x65","\x6F\x66\x66\x73\x65\x74\x57\x69\x64\x74\x68","\x70\x61\x67\x65\x2D\x73\x69\x64\x65\x62\x61\x72","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x73\x65\x74\x54\x69\x6D\x65\x6F\x75\x74","\x63\x72\x65\x61\x74\x65\x54\x69\x74\x6C\x65","\x61","\x68\x72\x65\x66","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B","\x67\x65\x54\x69\x74\x6C\x65","\x63\x72\x65\x61\x74\x65\x54\x68\x75\x6D\x62","\x73\x63\x61\x6C\x65\x41\x6E\x64\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x66\x6C\x6F\x6F\x72","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x4E\x4F\x5F\x46\x4F","\x63\x6C\x6F\x6E\x65\x4E\x6F\x64\x65","\x6F\x77\x6E\x65\x72\x53\x56\x47\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x74\x43\x61\x6E\x76\x61\x73","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x49\x53\x5F\x49\x45\x36","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x49\x6D\x61\x67\x65","\x63\x75\x72\x73\x6F\x72","\x70\x6F\x69\x6E\x74\x65\x72","\x6D\x69\x6E\x57\x69\x64\x74\x68","\x6D\x69\x6E\x48\x65\x69\x67\x68\x74","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x6E\x6F\x77\x72\x61\x70","\x49\x53\x5F\x49\x45","\x34\x70\x78","\x63\x72\x65\x61\x74\x65\x49\x74\x65\x6D","\x67\x65\x49\x74\x65\x6D","\x70\x61\x64\x64\x69\x6E\x67","\x63\x6C\x69\x63\x6B","\x63\x6F\x6E\x73\x75\x6D\x65","\x63\x72\x65\x61\x74\x65\x44\x72\x6F\x70\x48\x61\x6E\x64\x6C\x65\x72","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x49\x6D\x70\x6F\x72\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x69\x73\x56\x61\x6C\x69\x64\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x69\x73\x53\x70\x6C\x69\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x70\x6C\x69\x74\x54\x61\x72\x67\x65\x74","\x73\x70\x6C\x69\x74\x45\x64\x67\x65","\x69\x6D\x70\x6F\x72\x74\x43\x65\x6C\x6C\x73","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x63\x72\x65\x61\x74\x65\x44\x72\x61\x67\x50\x72\x65\x76\x69\x65\x77","\x62\x6F\x72\x64\x65\x72","\x31\x70\x78\x20\x64\x61\x73\x68\x65\x64\x20\x62\x6C\x61\x63\x6B","\x63\x72\x65\x61\x74\x65\x44\x72\x61\x67\x53\x6F\x75\x72\x63\x65","\x61\x75\x74\x6F\x73\x63\x72\x6F\x6C\x6C","\x6D\x61\x6B\x65\x44\x72\x61\x67\x67\x61\x62\x6C\x65","\x67\x65\x74\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x61\x70\x70\x6C\x79","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x61\x64\x64\x43\x6C\x69\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x6D\x6F\x75\x73\x65\x55\x70","\x69\x73\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x63\x75\x72\x72\x65\x6E\x74\x47\x72\x61\x70\x68","\x74\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x61\x62\x73","\x67\x65\x74\x47\x72\x69\x64\x53\x69\x7A\x65","\x64\x72\x6F\x70","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x6C\x61\x62\x65\x6C","\x66\x6F\x72\x45\x61\x63\x68","\x63\x72\x65\x61\x74\x65\x56\x65\x72\x74\x65\x78\x54\x65\x6D\x70\x6C\x61\x74\x65","\x79\x65\x73","\x6B\x65\x79","\x69\x73\x70\x65\x65\x63\x68\x5F\x61\x73\x72\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x69\x6E\x74\x4B\x65\x79","\x62\x65\x65\x70","\x69\x74\x2D\x49\x54","\x23","\x66\x69\x6C\x65\x5F\x69\x64","\x6F\x70\x74\x73","\x30","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x64\x69\x67\x69\x74","\x35","\x31","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x72\x65\x74\x72\x79","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64","\x6D\x69\x6E\x64\x69\x67\x69\x74","\x6D\x61\x78\x64\x69\x67\x69\x74","\x31\x30","\x68\x69\x64\x64\x65\x6E\x64\x69\x67\x69\x74\x73\x6E\x75\x6D","\x68\x69\x64\x64\x65\x6E\x64\x69\x67\x69\x74\x73\x70\x6F\x73","\x66\x69\x72\x73\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6F\x70\x74\x69\x6F\x6E\x73","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x76\x61\x6C\x75\x65","\x6F\x64\x62\x63\x5F\x69\x64","\x71\x75\x65\x72\x79","\x6F\x75\x74\x70\x75\x74","\x63\x6F\x6E\x74\x65\x78\x74","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x63\x6F\x6D\x6D\x61\x6E\x64","\x61\x72\x67\x73","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x69\x6E\x74\x65\x72\x76\x61\x6C\x5F\x69\x64","\x67\x6F\x74\x6F\x69\x66\x6D\x75\x6C\x74\x69\x74\x69\x6D\x65","\x64\x69\x67\x69\x74\x73","\x65\x73\x63\x61\x70\x65\x5F\x64\x69\x67\x69\x74\x73","\x6E\x75\x6D\x62\x65\x72","\x74\x65\x78\x74","\x66\x69\x6C\x65","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x77\x61\x76","\x2D\x31","\x73\x69\x70\x5F\x69\x64","\x75\x72\x6C","\x36\x30","\x70\x68\x6F\x6E\x65","\x74\x72\x75\x6E\x6B\x5F\x6E\x61\x6D\x65","\x67\x6F\x6F\x67\x6C\x65\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x69\x74","\x69\x73\x70\x65\x65\x63\x68\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x73\x70\x65\x65\x64","\x65\x75\x72\x69\x74\x61\x6C\x69\x61\x6E\x66\x65\x6D\x61\x6C\x65","\x71\x75\x65\x75\x65\x5F\x69\x64","\x6D\x61\x63\x72\x6F","\x67\x6F\x73\x75\x62","\x33\x30\x30","\x6D\x61\x69\x6C\x62\x6F\x78","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x69\x64","\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x61\x67\x65\x6E\x74","\x71\x75\x65\x75\x65\x5F\x65\x76\x65\x6E\x74","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x64\x61\x74\x61\x34","\x64\x61\x74\x61\x35","\x71\x75\x65\x75\x65\x6C\x6F\x67","\x67\x6F\x61\x6C\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x6C\x69\x73\x74\x5F\x69\x64","\x64\x65\x6C\x61\x79","\x7B\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x6E\x75\x6D\x29\x7D","\x61\x63\x63\x6F\x75\x6E\x74\x5F\x69\x64","\x74\x6F","\x73\x6D\x73\x5F\x74\x65\x78\x74","\x74\x65\x6D\x70\x6C\x61\x74\x65\x5F\x69\x64","\x63\x63","\x73\x75\x62\x6A\x65\x63\x74","\x76\x65\x72\x74\x65\x78","\x63\x72\x65\x61\x74\x65\x56\x65\x72\x74\x65\x78\x54\x65\x6D\x70\x6C\x61\x74\x65\x46\x72\x6F\x6D\x43\x65\x6C\x6C\x73","\x69\x73\x47\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x54\x65\x6D\x70\x6C\x61\x74\x65","\x73\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x67\x65\x6F\x6D\x65\x74\x72\x79","\x65\x64\x67\x65","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x46\x72\x6F\x6D\x43\x65\x6C\x6C\x73","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x23\x66\x66\x66\x66\x66\x66","\x61\x64\x64\x50\x61\x6C\x65\x74\x74\x65","\x67\x65\x53\x69\x64\x65\x62\x61\x72","\x61\x64\x64\x46\x6F\x6C\x64\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x2F\x63\x6F\x6C\x6C\x61\x70\x73\x65\x64\x2E\x67\x69\x66\x29","\x2F\x65\x78\x70\x61\x6E\x64\x65\x64\x2E\x67\x69\x66\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x70\x65\x61\x74","\x6E\x6F\x2D\x72\x65\x70\x65\x61\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x31\x30\x30\x25\x20\x35\x30\x25","\x77\x61\x69\x74","\x72\x65\x6D\x6F\x76\x65\x50\x61\x6C\x65\x74\x74\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D"];_0x57ac[0];function Sidebar(_0xbae3x2,_0xbae3x3){this[_0x57ac[1]]= _0xbae3x2;this[_0x57ac[2]]= _0xbae3x3;this[_0x57ac[3]]=  new Object();this[_0x57ac[4]]= true;this[_0x57ac[5]]=  new Graph(document[_0x57ac[7]](_0x57ac[6]),null,null,this[_0x57ac[1]][_0x57ac[9]][_0x57ac[5]][_0x57ac[8]]());this[_0x57ac[5]][_0x57ac[10]]= false;this[_0x57ac[5]][_0x57ac[11]]= false;this[_0x57ac[5]][_0x57ac[12]](false);this[_0x57ac[5]][_0x57ac[13]]= false;this[_0x57ac[5]][_0x57ac[14]](false);this[_0x57ac[5]][_0x57ac[15]](false);this[_0x57ac[5]][_0x57ac[2]][_0x57ac[17]][_0x57ac[16]]= _0x57ac[18];this[_0x57ac[5]][_0x57ac[2]][_0x57ac[17]][_0x57ac[19]]= _0x57ac[20];document[_0x57ac[22]][_0x57ac[21]](this[_0x57ac[5]][_0x57ac[2]]);if(!mxClient[_0x57ac[23]]){mxEvent[_0x57ac[26]](document,_0x57ac[24],mxUtils[_0x57ac[25]](this,function(){this[_0x57ac[4]]= true}));mxEvent[_0x57ac[26]](_0xbae3x3,_0x57ac[27],mxUtils[_0x57ac[25]](this,function(){this[_0x57ac[4]]= true}));mxEvent[_0x57ac[26]](document,_0x57ac[28],mxUtils[_0x57ac[25]](this,function(){this[_0x57ac[4]]= false;this[_0x57ac[29]]()}));mxEvent[_0x57ac[26]](document,_0x57ac[30],mxUtils[_0x57ac[25]](this,function(_0xbae3x4){var _0xbae3x5=mxEvent[_0x57ac[31]](_0xbae3x4);while(_0xbae3x5!= null){if(_0xbae3x5== this[_0x57ac[32]]){return};_0xbae3x5= _0xbae3x5[_0x57ac[33]]};this[_0x57ac[29]]()}));mxEvent[_0x57ac[26]](document,_0x57ac[34],mxUtils[_0x57ac[25]](this,function(_0xbae3x4){if(_0xbae3x4[_0x57ac[35]]== null&& _0xbae3x4[_0x57ac[36]]== null){this[_0x57ac[29]]()}}))};this[_0x57ac[37]](); new Image()[_0x57ac[38]]= IMAGE_PATH+ _0x57ac[39]}Sidebar[_0x57ac[40]][_0x57ac[37]]= function(){var _0xbae3x6=STENCIL_PATH;console[_0x57ac[41]](_0xbae3x6);this[_0x57ac[49]](_0x57ac[42],mxResources[_0x57ac[43]](_0x57ac[42]),_0xbae3x6+ _0x57ac[44],_0x57ac[45],[_0x57ac[46],_0x57ac[47],_0x57ac[48]],[mxResources[_0x57ac[43]](_0x57ac[46]),mxResources[_0x57ac[43]](_0x57ac[47]),mxResources[_0x57ac[43]](_0x57ac[48])]);this[_0x57ac[49]](_0x57ac[50],mxResources[_0x57ac[43]](_0x57ac[50]),_0xbae3x6+ _0x57ac[51],_0x57ac[45],[_0x57ac[52],_0x57ac[53],_0x57ac[54],_0x57ac[55],_0x57ac[56],_0x57ac[57],_0x57ac[58]],[mxResources[_0x57ac[43]](_0x57ac[52]),mxResources[_0x57ac[43]](_0x57ac[53]),mxResources[_0x57ac[43]](_0x57ac[54]),mxResources[_0x57ac[43]](_0x57ac[55]),mxResources[_0x57ac[43]](_0x57ac[56]),mxResources[_0x57ac[43]](_0x57ac[57]),mxResources[_0x57ac[43]](_0x57ac[58])]);this[_0x57ac[49]](_0x57ac[59],mxResources[_0x57ac[43]](_0x57ac[59]),_0xbae3x6+ _0x57ac[60],_0x57ac[45],[_0x57ac[61],_0x57ac[62]],[mxResources[_0x57ac[43]](_0x57ac[61]),mxResources[_0x57ac[43]](_0x57ac[62])]);this[_0x57ac[49]](_0x57ac[63],mxResources[_0x57ac[43]](_0x57ac[63]),_0xbae3x6+ _0x57ac[64],_0x57ac[45],[_0x57ac[63],_0x57ac[65],_0x57ac[66],_0x57ac[67],_0x57ac[68],_0x57ac[69],_0x57ac[70],_0x57ac[71],_0x57ac[72]],[mxResources[_0x57ac[43]](_0x57ac[63]),mxResources[_0x57ac[43]](_0x57ac[65]),mxResources[_0x57ac[43]](_0x57ac[66]),mxResources[_0x57ac[43]](_0x57ac[67]),mxResources[_0x57ac[43]](_0x57ac[68]),mxResources[_0x57ac[43]](_0x57ac[69]),mxResources[_0x57ac[43]](_0x57ac[70]),mxResources[_0x57ac[43]](_0x57ac[71]),mxResources[_0x57ac[43]](_0x57ac[72])]);this[_0x57ac[49]](_0x57ac[73],mxResources[_0x57ac[43]](_0x57ac[73]),_0xbae3x6+ _0x57ac[74],_0x57ac[45],[_0x57ac[75]],[mxResources[_0x57ac[43]](_0x57ac[75])]);this[_0x57ac[49]](_0x57ac[76],mxResources[_0x57ac[43]](_0x57ac[76]),_0xbae3x6+ _0x57ac[77],_0x57ac[45],[_0x57ac[78],_0x57ac[79],_0x57ac[80],_0x57ac[81]],[mxResources[_0x57ac[43]](_0x57ac[78]),mxResources[_0x57ac[43]](_0x57ac[79]),mxResources[_0x57ac[43]](_0x57ac[80]),mxResources[_0x57ac[43]](_0x57ac[81])]);this[_0x57ac[49]](_0x57ac[82],mxResources[_0x57ac[43]](_0x57ac[82]),_0xbae3x6+ _0x57ac[83],_0x57ac[45],[_0x57ac[84],_0x57ac[85],_0x57ac[86],_0x57ac[87]],[mxResources[_0x57ac[43]](_0x57ac[84]),mxResources[_0x57ac[43]](_0x57ac[85]),mxResources[_0x57ac[43]](_0x57ac[86]),mxResources[_0x57ac[43]](_0x57ac[87])]);this[_0x57ac[49]](_0x57ac[88],mxResources[_0x57ac[43]](_0x57ac[88]),_0xbae3x6+ _0x57ac[89],_0x57ac[45],[_0x57ac[90]],[mxResources[_0x57ac[43]](_0x57ac[90])]);this[_0x57ac[49]](_0x57ac[91],mxResources[_0x57ac[43]](_0x57ac[91]),_0xbae3x6+ _0x57ac[92],_0x57ac[45],[_0x57ac[93],_0x57ac[94],_0x57ac[95],_0x57ac[96],_0x57ac[97]],[mxResources[_0x57ac[43]](_0x57ac[93]),mxResources[_0x57ac[43]](_0x57ac[94]),mxResources[_0x57ac[43]](_0x57ac[95]),mxResources[_0x57ac[43]](_0x57ac[96]),mxResources[_0x57ac[43]](_0x57ac[97])])};Sidebar[_0x57ac[40]][_0x57ac[98]]= !mxClient[_0x57ac[23]];Sidebar[_0x57ac[40]][_0x57ac[99]]= 16;Sidebar[_0x57ac[40]][_0x57ac[100]]= 3;Sidebar[_0x57ac[40]][_0x57ac[101]]= 300;Sidebar[_0x57ac[40]][_0x57ac[102]]= true;Sidebar[_0x57ac[40]][_0x57ac[103]]= STENCIL_PATH+ _0x57ac[104];Sidebar[_0x57ac[40]][_0x57ac[105]]= 34;Sidebar[_0x57ac[40]][_0x57ac[106]]= 34;Sidebar[_0x57ac[40]][_0x57ac[107]]= 2;Sidebar[_0x57ac[40]][_0x57ac[108]]= 9;Sidebar[_0x57ac[40]][_0x57ac[109]]= false;Sidebar[_0x57ac[40]][_0x57ac[110]]= false;Sidebar[_0x57ac[40]][_0x57ac[111]]= function(_0xbae3x7,_0xbae3x8,_0xbae3x9,_0xbae3xa){if(this[_0x57ac[98]]&& this[_0x57ac[4]]){if(this[_0x57ac[32]]!= _0xbae3x7){if(this[_0x57ac[112]]!= null){window[_0x57ac[113]](this[_0x57ac[112]]);this[_0x57ac[112]]= null};var _0xbae3xb=mxUtils[_0x57ac[25]](this,function(){if(this[_0x57ac[114]]== null){this[_0x57ac[114]]= document[_0x57ac[7]](_0x57ac[6]);this[_0x57ac[114]][_0x57ac[115]]= _0x57ac[116];document[_0x57ac[22]][_0x57ac[21]](this[_0x57ac[114]]);this[_0x57ac[117]]=  new Graph(this[_0x57ac[114]],null,null,this[_0x57ac[1]][_0x57ac[9]][_0x57ac[5]][_0x57ac[8]]());this[_0x57ac[117]][_0x57ac[119]][_0x57ac[118]](this[_0x57ac[99]],this[_0x57ac[99]]);this[_0x57ac[117]][_0x57ac[10]]= false;this[_0x57ac[117]][_0x57ac[11]]= false;this[_0x57ac[117]][_0x57ac[13]]= false;this[_0x57ac[117]][_0x57ac[14]](false);this[_0x57ac[117]][_0x57ac[12]](false);this[_0x57ac[117]][_0x57ac[15]](false);if(!mxClient[_0x57ac[120]]){this[_0x57ac[117]][_0x57ac[119]][_0x57ac[121]][_0x57ac[17]][_0x57ac[19]]= _0x57ac[122]};this[_0x57ac[123]]= mxUtils[_0x57ac[124]](IMAGE_PATH+ _0x57ac[39]);this[_0x57ac[123]][_0x57ac[17]][_0x57ac[19]]= _0x57ac[20];this[_0x57ac[123]][_0x57ac[17]][_0x57ac[125]]= _0x57ac[126];this[_0x57ac[123]][_0x57ac[17]][_0x57ac[127]]= _0x57ac[128];document[_0x57ac[22]][_0x57ac[21]](this[_0x57ac[123]])};this[_0x57ac[114]][_0x57ac[17]][_0x57ac[129]]= _0x57ac[130];this[_0x57ac[117]][_0x57ac[131]]= (_0xbae3xa== null|| _0xbae3xa);this[_0x57ac[117]][_0x57ac[133]][_0x57ac[132]]();this[_0x57ac[117]][_0x57ac[134]](_0xbae3x8);var _0xbae3xc=this[_0x57ac[117]][_0x57ac[135]]();var _0xbae3xd=_0xbae3xc[_0x57ac[125]]+ 2* this[_0x57ac[99]];var _0xbae3xe=_0xbae3xc[_0x57ac[127]]+ 2* this[_0x57ac[99]];if(mxClient[_0x57ac[136]]){_0xbae3xd+= 4;_0xbae3xe+= 4;this[_0x57ac[114]][_0x57ac[17]][_0x57ac[137]]= _0x57ac[18]}else {this[_0x57ac[114]][_0x57ac[17]][_0x57ac[137]]= _0x57ac[138]};this[_0x57ac[123]][_0x57ac[17]][_0x57ac[16]]= _0x57ac[138];this[_0x57ac[114]][_0x57ac[17]][_0x57ac[125]]= _0xbae3xd+ _0x57ac[139];if(this[_0x57ac[110]]&& _0xbae3x9!= null&& _0xbae3x9[_0x57ac[140]]> 0){if(this[_0x57ac[141]]== null){this[_0x57ac[141]]= document[_0x57ac[7]](_0x57ac[6]);this[_0x57ac[141]][_0x57ac[17]][_0x57ac[142]]= _0x57ac[143];this[_0x57ac[141]][_0x57ac[17]][_0x57ac[144]]= _0x57ac[145];this[_0x57ac[141]][_0x57ac[17]][_0x57ac[125]]= _0x57ac[146];this[_0x57ac[141]][_0x57ac[17]][_0x57ac[137]]= _0x57ac[18];if(mxClient[_0x57ac[120]]){this[_0x57ac[141]][_0x57ac[17]][_0x57ac[147]]= _0x57ac[148]}else {this[_0x57ac[141]][_0x57ac[17]][_0x57ac[19]]= _0x57ac[20];this[_0x57ac[141]][_0x57ac[17]][_0x57ac[147]]= _0x57ac[149]};this[_0x57ac[114]][_0x57ac[21]](this[_0x57ac[141]])}else {this[_0x57ac[141]][_0x57ac[150]]= _0x57ac[151]};this[_0x57ac[141]][_0x57ac[17]][_0x57ac[129]]= _0x57ac[151];mxUtils[_0x57ac[152]](this[_0x57ac[141]],_0xbae3x9);var _0xbae3xf=this[_0x57ac[141]][_0x57ac[153]]+ 10;_0xbae3xe+= _0xbae3xf;if(mxClient[_0x57ac[120]]){this[_0x57ac[141]][_0x57ac[17]][_0x57ac[154]]= (-_0xbae3xf) + _0x57ac[139]}else {_0xbae3xe-= 6;this[_0x57ac[141]][_0x57ac[17]][_0x57ac[155]]= (_0xbae3xe- _0xbae3xf)+ _0x57ac[139]}}else {if(this[_0x57ac[141]]!= null&& this[_0x57ac[141]][_0x57ac[33]]!= null){this[_0x57ac[141]][_0x57ac[17]][_0x57ac[129]]= _0x57ac[156]}};this[_0x57ac[114]][_0x57ac[17]][_0x57ac[127]]= _0xbae3xe+ _0x57ac[139];var _0xbae3x10=-Math[_0x57ac[158]](0,_0xbae3xc[_0x57ac[157]]- this[_0x57ac[99]]);var _0xbae3x11=-Math[_0x57ac[158]](0,_0xbae3xc[_0x57ac[159]]- this[_0x57ac[99]]);var _0xbae3x12=this[_0x57ac[2]][_0x57ac[160]]+ this[_0x57ac[1]][_0x57ac[161]]+ 3;var _0xbae3x13=Math[_0x57ac[164]](0,(this[_0x57ac[2]][_0x57ac[162]]+ _0xbae3x7[_0x57ac[162]]- this[_0x57ac[2]][_0x57ac[163]]- _0xbae3xe/ 2+ 16));if(mxClient[_0x57ac[120]]){this[_0x57ac[117]][_0x57ac[119]][_0x57ac[121]][_0x57ac[169]](_0x57ac[165],_0x57ac[166]+ _0xbae3x10+ _0x57ac[167]+ _0xbae3x11+ _0x57ac[168])}else {this[_0x57ac[117]][_0x57ac[119]][_0x57ac[171]][_0x57ac[17]][_0x57ac[170]]= _0xbae3x10+ _0x57ac[139];this[_0x57ac[117]][_0x57ac[119]][_0x57ac[171]][_0x57ac[17]][_0x57ac[155]]= _0xbae3x11+ _0x57ac[139]};_0xbae3x12+= document[_0x57ac[174]](_0x57ac[173])[_0x57ac[172]];_0xbae3x13+= 90;this[_0x57ac[114]][_0x57ac[17]][_0x57ac[19]]= _0x57ac[20];this[_0x57ac[114]][_0x57ac[17]][_0x57ac[170]]= _0xbae3x12+ _0x57ac[139];this[_0x57ac[114]][_0x57ac[17]][_0x57ac[155]]= _0xbae3x13+ _0x57ac[139];this[_0x57ac[123]][_0x57ac[17]][_0x57ac[170]]= (_0xbae3x12- 13)+ _0x57ac[139];this[_0x57ac[123]][_0x57ac[17]][_0x57ac[155]]= (_0xbae3x13+ _0xbae3xe/ 2- 13)+ _0x57ac[139]});if(this[_0x57ac[114]]!= null&& this[_0x57ac[114]][_0x57ac[17]][_0x57ac[129]]!= _0x57ac[156]){_0xbae3xb()}else {this[_0x57ac[112]]= window[_0x57ac[175]](_0xbae3xb,this[_0x57ac[101]])};this[_0x57ac[32]]= _0xbae3x7}}};Sidebar[_0x57ac[40]][_0x57ac[29]]= function(){if(this[_0x57ac[112]]!= null){window[_0x57ac[113]](this[_0x57ac[112]]);this[_0x57ac[112]]= null};if(this[_0x57ac[114]]!= null){this[_0x57ac[114]][_0x57ac[17]][_0x57ac[129]]= _0x57ac[156];this[_0x57ac[123]][_0x57ac[17]][_0x57ac[16]]= _0x57ac[18];this[_0x57ac[32]]= null}};Sidebar[_0x57ac[40]][_0x57ac[176]]= function(_0xbae3x14){var _0xbae3x7=document[_0x57ac[7]](_0x57ac[177]);_0xbae3x7[_0x57ac[169]](_0x57ac[178],_0x57ac[179]);_0xbae3x7[_0x57ac[115]]= _0x57ac[180];mxUtils[_0x57ac[152]](_0xbae3x7,_0xbae3x14);return _0xbae3x7};Sidebar[_0x57ac[40]][_0x57ac[181]]= function(_0xbae3x8,_0xbae3xd,_0xbae3xe,_0xbae3x15,_0xbae3x9,_0xbae3xa){this[_0x57ac[5]][_0x57ac[131]]= (_0xbae3xa== null|| _0xbae3xa);this[_0x57ac[5]][_0x57ac[119]][_0x57ac[182]](1,0,0);this[_0x57ac[5]][_0x57ac[134]](_0xbae3x8);var _0xbae3xc=this[_0x57ac[5]][_0x57ac[135]]();var _0xbae3x16=this[_0x57ac[100]];var _0xbae3x17=Math[_0x57ac[158]]((_0xbae3xd- 2)/ (_0xbae3xc[_0x57ac[125]]- _0xbae3xc[_0x57ac[157]]+ _0xbae3x16),(_0xbae3xe- 2)/ (_0xbae3xc[_0x57ac[127]]- _0xbae3xc[_0x57ac[159]]+ _0xbae3x16));var _0xbae3x10=-Math[_0x57ac[158]](_0xbae3xc[_0x57ac[157]],0);var _0xbae3x11=-Math[_0x57ac[158]](_0xbae3xc[_0x57ac[159]],0);this[_0x57ac[5]][_0x57ac[119]][_0x57ac[182]](_0xbae3x17,_0xbae3x10,_0xbae3x11);_0xbae3xc= this[_0x57ac[5]][_0x57ac[135]]();var _0xbae3x18=Math[_0x57ac[164]](0,Math[_0x57ac[183]]((_0xbae3xd- _0xbae3xc[_0x57ac[125]]- _0xbae3xc[_0x57ac[157]])/ 2));var _0xbae3xf=Math[_0x57ac[164]](0,Math[_0x57ac[183]]((_0xbae3xe- _0xbae3xc[_0x57ac[127]]- _0xbae3xc[_0x57ac[159]])/ 2));var _0xbae3x19=null;if(this[_0x57ac[5]][_0x57ac[184]]== mxConstants[_0x57ac[185]]&& !mxClient[_0x57ac[186]]){_0xbae3x19= this[_0x57ac[5]][_0x57ac[119]][_0x57ac[189]]()[_0x57ac[188]][_0x57ac[187]](true)}else {_0xbae3x19= this[_0x57ac[5]][_0x57ac[2]][_0x57ac[187]](false);_0xbae3x19[_0x57ac[150]]= this[_0x57ac[5]][_0x57ac[2]][_0x57ac[150]]};this[_0x57ac[5]][_0x57ac[190]]()[_0x57ac[132]]();if(mxClient[_0x57ac[191]]){_0xbae3x15[_0x57ac[17]][_0x57ac[192]]= _0x57ac[193]+ this[_0x57ac[1]][_0x57ac[9]][_0x57ac[194]]+ _0x57ac[168]};var _0xbae3x1a=3;_0xbae3x19[_0x57ac[17]][_0x57ac[19]]= _0x57ac[122];_0xbae3x19[_0x57ac[17]][_0x57ac[137]]= _0x57ac[18];_0xbae3x19[_0x57ac[17]][_0x57ac[195]]= _0x57ac[196];_0xbae3x19[_0x57ac[17]][_0x57ac[170]]= (_0xbae3x18+ _0xbae3x1a)+ _0x57ac[139];_0xbae3x19[_0x57ac[17]][_0x57ac[155]]= (_0xbae3xf+ _0xbae3x1a)+ _0x57ac[139];_0xbae3x19[_0x57ac[17]][_0x57ac[125]]= _0xbae3xd+ _0x57ac[139];_0xbae3x19[_0x57ac[17]][_0x57ac[127]]= _0xbae3xe+ _0x57ac[139];_0xbae3x19[_0x57ac[17]][_0x57ac[16]]= _0x57ac[151];_0xbae3x19[_0x57ac[17]][_0x57ac[197]]= _0x57ac[151];_0xbae3x19[_0x57ac[17]][_0x57ac[198]]= _0x57ac[151];_0xbae3x15[_0x57ac[21]](_0xbae3x19);if(this[_0x57ac[109]]&& _0xbae3x9!= null){var _0xbae3x1b=(mxClient[_0x57ac[136]])?2* this[_0x57ac[107]]+ 2:0;_0xbae3x15[_0x57ac[17]][_0x57ac[127]]= (this[_0x57ac[106]]+ _0xbae3x1b+ this[_0x57ac[108]]+ 8)+ _0x57ac[139];var _0xbae3x1c=document[_0x57ac[7]](_0x57ac[6]);_0xbae3x1c[_0x57ac[17]][_0x57ac[199]]= this[_0x57ac[108]]+ _0x57ac[139];_0xbae3x1c[_0x57ac[17]][_0x57ac[144]]= _0x57ac[145];_0xbae3x1c[_0x57ac[17]][_0x57ac[200]]= _0x57ac[201];if(mxClient[_0x57ac[202]]){_0xbae3x1c[_0x57ac[17]][_0x57ac[127]]= (this[_0x57ac[108]]+ 12)+ _0x57ac[139]};_0xbae3x1c[_0x57ac[17]][_0x57ac[147]]= _0x57ac[203];mxUtils[_0x57ac[152]](_0xbae3x1c,_0xbae3x9);_0xbae3x15[_0x57ac[21]](_0xbae3x1c)}};Sidebar[_0x57ac[40]][_0x57ac[204]]= function(_0xbae3x8,_0xbae3x9,_0xbae3xa){var _0xbae3x7=document[_0x57ac[7]](_0x57ac[177]);_0xbae3x7[_0x57ac[169]](_0x57ac[178],_0x57ac[179]);_0xbae3x7[_0x57ac[115]]= _0x57ac[205];_0xbae3x7[_0x57ac[17]][_0x57ac[137]]= _0x57ac[18];var _0xbae3x1b=(mxClient[_0x57ac[136]])?8+ 2* this[_0x57ac[107]]:6;_0xbae3x7[_0x57ac[17]][_0x57ac[125]]= (this[_0x57ac[105]]+ _0xbae3x1b)+ _0x57ac[139];_0xbae3x7[_0x57ac[17]][_0x57ac[127]]= (this[_0x57ac[106]]+ _0xbae3x1b)+ _0x57ac[139];_0xbae3x7[_0x57ac[17]][_0x57ac[206]]= this[_0x57ac[107]]+ _0x57ac[139];mxEvent[_0x57ac[26]](_0xbae3x7,_0x57ac[207],function(_0xbae3x4){mxEvent[_0x57ac[208]](_0xbae3x4)});this[_0x57ac[181]](_0xbae3x8,this[_0x57ac[105]],this[_0x57ac[106]],_0xbae3x7,_0xbae3x9,_0xbae3xa);return _0xbae3x7};Sidebar[_0x57ac[40]][_0x57ac[209]]= function(_0xbae3x8,_0xbae3x1d){return function(_0xbae3x1e,_0xbae3x4,_0xbae3x1f,_0xbae3x20,_0xbae3x21){if(_0xbae3x1e[_0x57ac[210]]()){_0xbae3x8= _0xbae3x1e[_0x57ac[211]](_0xbae3x8);if(_0xbae3x8[_0x57ac[140]]> 0){var _0xbae3x22=(_0xbae3x1f!= null)?_0xbae3x1e[_0x57ac[212]](_0xbae3x1f,_0xbae3x8,_0xbae3x4):false;var _0xbae3x23=null;if(_0xbae3x1f!= null&&  !_0xbae3x22){_0xbae3x1f= null};if(_0xbae3x1d&& _0xbae3x1e[_0x57ac[213]]()&& _0xbae3x1e[_0x57ac[214]](_0xbae3x1f,_0xbae3x8,_0xbae3x4)){_0xbae3x1e[_0x57ac[215]](_0xbae3x1f,_0xbae3x8,null,_0xbae3x20,_0xbae3x21);_0xbae3x23= _0xbae3x8}else {if(_0xbae3x8[_0x57ac[140]]> 0){_0xbae3x23= _0xbae3x1e[_0x57ac[216]](_0xbae3x8,_0xbae3x20,_0xbae3x21,_0xbae3x1f)}};if(_0xbae3x23!= null&& _0xbae3x23[_0x57ac[140]]> 0){_0xbae3x1e[_0x57ac[217]](_0xbae3x23[0]);_0xbae3x1e[_0x57ac[218]](_0xbae3x23)}}}}};Sidebar[_0x57ac[40]][_0x57ac[219]]= function(_0xbae3xd,_0xbae3xe){var _0xbae3x7=document[_0x57ac[7]](_0x57ac[6]);_0xbae3x7[_0x57ac[17]][_0x57ac[220]]= _0x57ac[221];_0xbae3x7[_0x57ac[17]][_0x57ac[125]]= _0xbae3xd+ _0x57ac[139];_0xbae3x7[_0x57ac[17]][_0x57ac[127]]= _0xbae3xe+ _0x57ac[139];return _0xbae3x7};Sidebar[_0x57ac[40]][_0x57ac[222]]= function(_0xbae3x7,_0xbae3x24,_0xbae3x25){var _0xbae3x26=mxUtils[_0x57ac[224]](_0xbae3x7,this[_0x57ac[1]][_0x57ac[9]][_0x57ac[5]],_0xbae3x24,_0xbae3x25,0,0,this[_0x57ac[1]][_0x57ac[9]][_0x57ac[5]][_0x57ac[223]],true,true);_0xbae3x26[_0x57ac[225]]= function(_0xbae3x1e,_0xbae3x20,_0xbae3x21){var _0xbae3x1f=mxDragSource[_0x57ac[40]][_0x57ac[225]][_0x57ac[226]](this,arguments);if(!_0xbae3x1e[_0x57ac[227]](_0xbae3x1f)){_0xbae3x1f= null};return _0xbae3x1f};return _0xbae3x26};Sidebar[_0x57ac[40]][_0x57ac[228]]= function(_0xbae3x7,_0xbae3x27){var _0xbae3x1e=this[_0x57ac[1]][_0x57ac[9]][_0x57ac[5]];var _0xbae3x28=null;mxEvent[_0x57ac[231]](_0xbae3x7,function(_0xbae3x4){_0xbae3x28=  new mxPoint(mxEvent[_0x57ac[229]](_0xbae3x4),mxEvent[_0x57ac[230]](_0xbae3x4))});var _0xbae3x29=_0xbae3x27[_0x57ac[232]];_0xbae3x27[_0x57ac[232]]= function(_0xbae3x4){if(!mxEvent[_0x57ac[233]](_0xbae3x4)&& this[_0x57ac[234]]== null&& _0xbae3x28!= null){var _0xbae3x2a=_0xbae3x1e[_0x57ac[235]];if(Math[_0x57ac[236]](_0xbae3x28[_0x57ac[157]]- mxEvent[_0x57ac[229]](_0xbae3x4))<= _0xbae3x2a&& Math[_0x57ac[236]](_0xbae3x28[_0x57ac[159]]- mxEvent[_0x57ac[230]](_0xbae3x4))<= _0xbae3x2a){var _0xbae3x2b=_0xbae3x1e[_0x57ac[237]]();_0xbae3x27[_0x57ac[238]](_0xbae3x1e,_0xbae3x4,null,_0xbae3x2b,_0xbae3x2b)}};_0xbae3x29[_0x57ac[226]](this,arguments);_0xbae3x28= null}};Sidebar[_0x57ac[40]][_0x57ac[239]]= function(_0xbae3x2c,_0xbae3x14,_0xbae3x2d,_0xbae3x2e){var _0xbae3x2f=mxUtils[_0x57ac[239]]();var _0xbae3x19=_0xbae3x2f[_0x57ac[7]](_0xbae3x2c);_0xbae3x19[_0x57ac[169]](_0x57ac[240],_0xbae3x14);_0xbae3x2d[_0x57ac[241]](function(_0xbae3x30,_0xbae3x31){_0xbae3x19[_0x57ac[169]](_0xbae3x30,_0xbae3x2e[_0xbae3x31]?_0xbae3x2e[_0xbae3x31]:_0x57ac[151])});return _0xbae3x19};Sidebar[_0x57ac[40]][_0x57ac[242]]= function(_0xbae3x32,_0xbae3xd,_0xbae3xe,_0xbae3x33,_0xbae3x9,_0xbae3xa){var _0xbae3x2d=[];var _0xbae3x2e=[];switch(_0xbae3x33){case _0x57ac[52]:break;case _0x57ac[46]:_0xbae3x2d= [_0x57ac[52]];_0xbae3x2e= [_0x57ac[243]];break;case _0x57ac[79]:_0xbae3x2d= [_0x57ac[244],_0x57ac[133],_0x57ac[245],_0x57ac[246],_0x57ac[247],_0x57ac[248]];_0xbae3x2e= [_0x57ac[151],0,_0x57ac[249],1,_0x57ac[250],true];break;case _0x57ac[63]:_0xbae3x2d= [_0x57ac[251],_0x57ac[252]];_0xbae3x2e= [_0x57ac[253]];break;case _0x57ac[258]:_0xbae3x2d= [_0x57ac[251],_0x57ac[254],_0x57ac[255]];_0xbae3x2e= [_0x57ac[253],_0x57ac[256],_0x57ac[257]];break;case _0x57ac[65]:_0xbae3x2d= [_0x57ac[251],_0x57ac[254],_0x57ac[255],_0x57ac[259],_0x57ac[260]];_0xbae3x2e= [_0x57ac[253],_0x57ac[256],_0x57ac[257],_0x57ac[257],_0x57ac[253]];break;case _0x57ac[71]:_0xbae3x2d= [_0x57ac[251],_0x57ac[254],_0x57ac[261],_0x57ac[262],_0x57ac[259],_0x57ac[260]];_0xbae3x2e= [_0x57ac[253],_0x57ac[256],_0x57ac[257],_0x57ac[263],_0x57ac[257],_0x57ac[253]];break;case _0x57ac[72]:_0xbae3x2d= [_0x57ac[251],_0x57ac[254],_0x57ac[261],_0x57ac[262],_0x57ac[259],_0x57ac[264],_0x57ac[265],_0x57ac[260]];_0xbae3x2e= [_0x57ac[253],_0x57ac[256],_0x57ac[257],_0x57ac[263],_0x57ac[257],_0x57ac[253],_0x57ac[266],_0x57ac[253]];break;case _0x57ac[97]:_0xbae3x2d= [_0x57ac[267],_0x57ac[268]];_0xbae3x2e= [_0x57ac[151],_0x57ac[151]];break;case _0x57ac[61]:_0xbae3x2d= [_0x57ac[260],_0x57ac[269]];_0xbae3x2e= [_0x57ac[253],_0x57ac[151]];break;case _0x57ac[78]:_0xbae3x2d= [_0x57ac[270],_0x57ac[271],_0x57ac[260]];_0xbae3x2e= [_0x57ac[253],_0x57ac[151],_0x57ac[253]];break;case _0x57ac[93]:_0xbae3x2d= [_0x57ac[272]];_0xbae3x2e= [];break;case _0x57ac[84]:_0xbae3x2d= [_0x57ac[273],_0x57ac[274]];_0xbae3x2e= [];break;case _0x57ac[94]:_0xbae3x2d= [_0x57ac[260],_0x57ac[275]];_0xbae3x2e= [];break;case _0x57ac[95]:_0xbae3x2d= [_0x57ac[276],_0x57ac[275]];_0xbae3x2e= [];break;case _0x57ac[85]:_0xbae3x2d= [_0x57ac[277]];_0xbae3x2e= [];break;case _0x57ac[86]:_0xbae3x2d= [_0x57ac[278]];_0xbae3x2e= [_0x57ac[253]];break;case _0x57ac[279]:_0xbae3x2d= [_0x57ac[278]];_0xbae3x2e= [_0x57ac[253]];break;case _0x57ac[87]:_0xbae3x2d= [_0x57ac[260]];_0xbae3x2e= [_0x57ac[253]];break;case _0x57ac[66]:_0xbae3x2d= [_0x57ac[280],_0x57ac[281]];_0xbae3x2e= [_0x57ac[151],_0x57ac[250]];break;case _0x57ac[67]:_0xbae3x2d= [_0x57ac[282],_0x57ac[281]];_0xbae3x2e= [_0x57ac[151],_0x57ac[250]];break;case _0x57ac[68]:_0xbae3x2d= [_0x57ac[283],_0x57ac[281]];_0xbae3x2e= [_0x57ac[151],_0x57ac[250]];break;case _0x57ac[75]:_0xbae3x2d= [_0x57ac[284],_0x57ac[285],_0x57ac[246],_0x57ac[281]];_0xbae3x2e= [_0x57ac[151],_0x57ac[286],_0x57ac[287],_0x57ac[250]];break;case _0x57ac[54]:_0xbae3x2d= [_0x57ac[288],_0x57ac[246],_0x57ac[97],_0x57ac[289]];_0xbae3x2e= [_0x57ac[253],_0x57ac[290]];break;case _0x57ac[55]:_0xbae3x2d= [_0x57ac[291],_0x57ac[292],_0x57ac[246],_0x57ac[252],_0x57ac[289]];_0xbae3x2e= [_0x57ac[151],_0x57ac[287],_0x57ac[290]];break;case _0x57ac[69]:_0xbae3x2d= [_0x57ac[283],_0x57ac[293]];_0xbae3x2e= [_0x57ac[151],_0x57ac[294]];break;case _0x57ac[70]:_0xbae3x2d= [_0x57ac[283],_0x57ac[244],_0x57ac[295],_0x57ac[296],_0x57ac[247]];_0xbae3x2e= [_0x57ac[151],_0x57ac[151],_0x57ac[297],_0x57ac[253],_0x57ac[250]];break;case _0x57ac[56]:_0xbae3x2d= [_0x57ac[298],_0x57ac[252],_0x57ac[289],_0x57ac[251],_0x57ac[246],_0x57ac[95],_0x57ac[299],_0x57ac[300],_0x57ac[19]];_0xbae3x2e= [_0x57ac[287],_0x57ac[151],_0x57ac[151],_0x57ac[253],_0x57ac[301]];break;case _0x57ac[57]:_0xbae3x2d= [_0x57ac[302],_0x57ac[268]];_0xbae3x2e= [_0x57ac[151],_0x57ac[151]];break;case _0x57ac[96]:_0xbae3x2d= [_0x57ac[303]];_0xbae3x2e= [_0x57ac[253]];break;case _0x57ac[62]:_0xbae3x2d= [_0x57ac[304],_0x57ac[260]];_0xbae3x2e= [_0x57ac[151],_0x57ac[253]];break;case _0x57ac[313]:_0xbae3x2d= [_0x57ac[305],_0x57ac[306],_0x57ac[307],_0x57ac[308],_0x57ac[309],_0x57ac[310],_0x57ac[311],_0x57ac[312]];_0xbae3x2e= [];break;case _0x57ac[90]:_0xbae3x2d= [_0x57ac[314]];_0xbae3x2e= [];break;case _0x57ac[58]:_0xbae3x2d= [_0x57ac[315],_0x57ac[291],_0x57ac[316],_0x57ac[317]];_0xbae3x2e= [_0x57ac[151],_0x57ac[318],_0x57ac[253],_0x57ac[256]];break;case _0x57ac[80]:_0xbae3x2d= [_0x57ac[319],_0x57ac[320],_0x57ac[321]];_0xbae3x2e= [_0x57ac[253]];break;case _0x57ac[81]:_0xbae3x2d= [_0x57ac[319],_0x57ac[322],_0x57ac[320],_0x57ac[323],_0x57ac[324],_0x57ac[283]];_0xbae3x2e= [_0x57ac[253]];break;default:_0xbae3x2d= [];_0xbae3x2e= [];break};var _0xbae3x19=this[_0x57ac[239]](_0xbae3x33,_0xbae3x9,_0xbae3x2d,_0xbae3x2e);var _0xbae3x8=[ new mxCell(_0xbae3x19, new mxGeometry(0,0,_0xbae3xd,_0xbae3xe),_0xbae3x32)];_0xbae3x8[0][_0x57ac[325]]= true;return this[_0x57ac[326]](_0xbae3x8,_0xbae3xd,_0xbae3xe,_0xbae3x9,_0xbae3xa)};Sidebar[_0x57ac[40]][_0x57ac[326]]= function(_0xbae3x8,_0xbae3xd,_0xbae3xe,_0xbae3x9,_0xbae3xa){var _0xbae3x7=this[_0x57ac[204]](_0xbae3x8,_0xbae3x9,_0xbae3xa);var _0xbae3x27=this[_0x57ac[222]](_0xbae3x7,this[_0x57ac[209]](_0xbae3x8,true),this[_0x57ac[219]](_0xbae3xd,_0xbae3xe));this[_0x57ac[228]](_0xbae3x7,_0xbae3x27);_0xbae3x27[_0x57ac[327]]= mxUtils[_0x57ac[25]](this,function(){return this[_0x57ac[1]][_0x57ac[9]][_0x57ac[5]][_0x57ac[329]][_0x57ac[328]]});if(!touchStyle){mxEvent[_0x57ac[26]](_0xbae3x7,_0x57ac[30],mxUtils[_0x57ac[25]](this,function(_0xbae3x4){this[_0x57ac[111]](_0xbae3x7,_0xbae3x8,_0xbae3x9,_0xbae3xa)}))};return _0xbae3x7};Sidebar[_0x57ac[40]][_0x57ac[330]]= function(_0xbae3x32,_0xbae3xd,_0xbae3xe,_0xbae3x33,_0xbae3x9,_0xbae3xa){var _0xbae3x8=[ new mxCell((_0xbae3x33!= null)?_0xbae3x33:_0x57ac[151], new mxGeometry(0,0,_0xbae3xd,_0xbae3xe),_0xbae3x32)];_0xbae3x8[0][_0x57ac[332]][_0x57ac[331]]( new mxPoint(0,_0xbae3xe),true);_0xbae3x8[0][_0x57ac[332]][_0x57ac[331]]( new mxPoint(_0xbae3xd,0),false);_0xbae3x8[0][_0x57ac[332]][_0x57ac[122]]= true;_0xbae3x8[0][_0x57ac[333]]= true;return this[_0x57ac[334]](_0xbae3x8,_0xbae3xd,_0xbae3xe,_0xbae3x9,_0xbae3xa)};Sidebar[_0x57ac[40]][_0x57ac[334]]= function(_0xbae3x8,_0xbae3xd,_0xbae3xe,_0xbae3x9,_0xbae3xa){var _0xbae3x7=this[_0x57ac[204]](_0xbae3x8,_0xbae3x9,_0xbae3xa);this[_0x57ac[222]](_0xbae3x7,this[_0x57ac[209]](_0xbae3x8,false),this[_0x57ac[219]](_0xbae3xd,_0xbae3xe));var _0xbae3x1e=this[_0x57ac[1]][_0x57ac[9]][_0x57ac[5]];mxEvent[_0x57ac[26]](_0xbae3x7,_0x57ac[207],mxUtils[_0x57ac[25]](this,function(_0xbae3x4){if(this[_0x57ac[102]]){_0xbae3x1e[_0x57ac[335]](_0xbae3x8[0])};_0xbae3x7[_0x57ac[17]][_0x57ac[336]]= _0x57ac[337];window[_0x57ac[175]](function(){_0xbae3x7[_0x57ac[17]][_0x57ac[336]]= _0x57ac[151]},300);mxEvent[_0x57ac[208]](_0xbae3x4)}));if(!touchStyle){mxEvent[_0x57ac[26]](_0xbae3x7,_0x57ac[30],mxUtils[_0x57ac[25]](this,function(_0xbae3x4){this[_0x57ac[111]](_0xbae3x7,_0xbae3x8,_0xbae3x9,_0xbae3xa)}))};return _0xbae3x7};Sidebar[_0x57ac[40]][_0x57ac[338]]= function(_0xbae3x34,_0xbae3x9,_0xbae3x35,_0xbae3x36){var _0xbae3x7=this[_0x57ac[176]](_0xbae3x9);this[_0x57ac[2]][_0x57ac[21]](_0xbae3x7);var _0xbae3x1c=document[_0x57ac[7]](_0x57ac[6]);_0xbae3x1c[_0x57ac[115]]= _0x57ac[339];if(_0xbae3x35){_0xbae3x36(_0xbae3x1c);_0xbae3x36= null}else {_0xbae3x1c[_0x57ac[17]][_0x57ac[129]]= _0x57ac[156]};this[_0x57ac[340]](_0xbae3x7,_0xbae3x1c,_0xbae3x36);var _0xbae3x37=document[_0x57ac[7]](_0x57ac[6]);_0xbae3x37[_0x57ac[21]](_0xbae3x1c);this[_0x57ac[2]][_0x57ac[21]](_0xbae3x37);if(_0xbae3x34!= null){this[_0x57ac[3]][_0xbae3x34]= [_0xbae3x7,_0xbae3x37]}};Sidebar[_0x57ac[40]][_0x57ac[340]]= function(_0xbae3x9,_0xbae3x38,_0xbae3x39){var _0xbae3x3a=false;_0xbae3x9[_0x57ac[17]][_0x57ac[192]]= (_0xbae3x38[_0x57ac[17]][_0x57ac[129]]== _0x57ac[156])?_0x57ac[193]+ IMAGE_PATH+ _0x57ac[341]:_0x57ac[193]+ IMAGE_PATH+ _0x57ac[342];_0xbae3x9[_0x57ac[17]][_0x57ac[343]]= _0x57ac[344];_0xbae3x9[_0x57ac[17]][_0x57ac[345]]= _0x57ac[346];mxEvent[_0x57ac[26]](_0xbae3x9,_0x57ac[207],function(_0xbae3x4){if(_0xbae3x38[_0x57ac[17]][_0x57ac[129]]== _0x57ac[156]){if(!_0xbae3x3a){_0xbae3x3a= true;if(_0xbae3x39!= null){_0xbae3x9[_0x57ac[17]][_0x57ac[195]]= _0x57ac[347];window[_0x57ac[175]](function(){_0xbae3x39(_0xbae3x38);_0xbae3x9[_0x57ac[17]][_0x57ac[195]]= _0x57ac[151]},0)}};_0xbae3x9[_0x57ac[17]][_0x57ac[192]]= _0x57ac[193]+ IMAGE_PATH+ _0x57ac[342];_0xbae3x38[_0x57ac[17]][_0x57ac[129]]= _0x57ac[130]}else {_0xbae3x9[_0x57ac[17]][_0x57ac[192]]= _0x57ac[193]+ IMAGE_PATH+ _0x57ac[341];_0xbae3x38[_0x57ac[17]][_0x57ac[129]]= _0x57ac[156]};mxEvent[_0x57ac[208]](_0xbae3x4)})};Sidebar[_0x57ac[40]][_0x57ac[348]]= function(_0xbae3x34){var _0xbae3x3b=this[_0x57ac[3]][_0xbae3x34];if(_0xbae3x3b!= null){this[_0x57ac[3]][_0xbae3x34]= null;for(var _0xbae3x3c=0;_0xbae3x3c< _0xbae3x3b[_0x57ac[140]];_0xbae3x3c++){this[_0x57ac[2]][_0x57ac[349]](_0xbae3x3b[_0xbae3x3c])};return true};return false};Sidebar[_0x57ac[40]][_0x57ac[49]]= function(_0xbae3x34,_0xbae3x9,_0xbae3x3d,_0xbae3x3e,_0xbae3x3f,_0xbae3x40){this[_0x57ac[338]](_0xbae3x34,_0xbae3x9,(_0xbae3x34=== _0x57ac[42]),mxUtils[_0x57ac[25]](this,function(_0xbae3x38){var _0xbae3x41=_0xbae3x40!= null;for(var _0xbae3x3c=0;_0xbae3x3c< _0xbae3x3f[_0x57ac[140]];_0xbae3x3c++){var _0xbae3x42=_0xbae3x3d+ _0xbae3x3f[_0xbae3x3c]+ _0xbae3x3e;_0xbae3x38[_0x57ac[21]](this[_0x57ac[242]](_0x57ac[350]+ _0xbae3x42,80,80,_0xbae3x3f[_0xbae3x3c],(_0xbae3x41)?_0xbae3x40[_0xbae3x3c]:null,_0xbae3x41))}}))}
\ No newline at end of file
diff --git a/public/assets/plugins/square/js/Toolbar.js b/public/assets/plugins/square/js/Toolbar.js
index 7eab562..d8a2bcb 100644
--- a/public/assets/plugins/square/js/Toolbar.js
+++ b/public/assets/plugins/square/js/Toolbar.js
@@ -1,407 +1 @@
-/**
- * $Id: Toolbar.js,v 1.3 2013-02-20 16:21:29 gaudenz Exp $
- * Copyright (c) 2006-2012, JGraph Ltd
- */
-/**
- * Construcs a new toolbar for the given editor.
- */
-function Toolbar(editorUi, container)
-{
-	this.editorUi = editorUi;
-	this.container = container;
-	this.init();
-
-	// Global handler to hide the current menu
-	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
-	{
-		this.hideMenu();
-	}));
-};
-
-/**
- * Adds the toolbar elements.
- */
-Toolbar.prototype.init = function()
-{
-	this.addItems(['save', 'publish', '-', 'print', 'undo', 'redo', '-', 'copy', 'cut', 'paste', 'delete', '-', 'duplicate', '-', 'actualSize', 'zoomIn', 'zoomOut', '-']);
-	var fontElt = this.addMenu('Helvetica', mxResources.get('fontFamily'), true, 'fontFamily');
-	fontElt.style.whiteSpace = 'nowrap';
-	fontElt.style.overflow = 'hidden';
-	fontElt.style.width = '70px';
-	this.addSeparator();
-	var sizeElt = this.addMenu('12', mxResources.get('fontSize'), true, 'fontSize');
-	sizeElt.style.whiteSpace = 'nowrap';
-	sizeElt.style.overflow = 'hidden';
-	sizeElt.style.width = '30px';
-
-	this.addItems(['-', 'bold', 'italic', 'underline']);
-	// Giuseppe Careri
-	// var align = this.addMenuFunction('geSprite-left', mxResources.get('align'), false, mxUtils.bind(this, function(menu)
-	// {
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], 'geIcon geSprite geSprite-left', null).setAttribute('title', mxResources.get('left'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], 'geIcon geSprite geSprite-center', null).setAttribute('title', mxResources.get('center'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], 'geIcon geSprite geSprite-right', null).setAttribute('title', mxResources.get('right'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP], 'geIcon geSprite geSprite-top', null).setAttribute('title', mxResources.get('top'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE], 'geIcon geSprite geSprite-middle', null).setAttribute('title', mxResources.get('middle'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM], 'geIcon geSprite geSprite-bottom', null).setAttribute('title', mxResources.get('bottom'));
-	// }));
-	// this.addItems(['fontColor', '-']);
-	// var line = this.addMenuFunction('geSprite-straight', mxResources.get('line'), false, mxUtils.bind(this, function(menu)
-	// {
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], [null], 'geIcon geSprite geSprite-straight', null).setAttribute('title', mxResources.get('straight'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['entityRelationEdgeStyle'], 'geIcon geSprite geSprite-entity', null).setAttribute('title', mxResources.get('entityRelation'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'horizontal'], 'geIcon geSprite geSprite-helbow', null).setAttribute('title', mxResources.get('horizontal'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'vertical'], 'geIcon geSprite geSprite-velbow', null).setAttribute('title', mxResources.get('vertical'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['segmentEdgeStyle'], 'geIcon geSprite geSprite-segment', null).setAttribute('title', mxResources.get('manual'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['orthogonalEdgeStyle'], 'geIcon geSprite geSprite-orthogonal', null).setAttribute('title', mxResources.get('automatic'));
-	// }));
-	// var linestart = this.addMenuFunction('geSprite-startclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)
-	// {
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-startclassic', null).setAttribute('title', mxResources.get('classic'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-startopen', null).setAttribute('title', mxResources.get('openArrow'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-startblock', null).setAttribute('title', mxResources.get('block'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-startoval', null).setAttribute('title', mxResources.get('oval'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-startdiamond', null).setAttribute('title', mxResources.get('diamond'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-startthindiamond', null).setAttribute('title', mxResources.get('diamondThin'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-startclassictrans', null).setAttribute('title', mxResources.get('classic'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-startblocktrans', null).setAttribute('title', mxResources.get('block'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-startovaltrans', null).setAttribute('title', mxResources.get('oval'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-startdiamondtrans', null).setAttribute('title', mxResources.get('diamond'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-startthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin'));
-	// }));
-	// var lineend = this.addMenuFunction('geSprite-endclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)
-	// {
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-endclassic', null).setAttribute('title', mxResources.get('classic'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-endopen', null).setAttribute('title', mxResources.get('openArrow'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-endblock', null).setAttribute('title', mxResources.get('block'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-endoval', null).setAttribute('title', mxResources.get('oval'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-enddiamond', null).setAttribute('title', mxResources.get('diamond'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-endthindiamond', null).setAttribute('title', mxResources.get('diamondThin'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-endclassictrans', null).setAttribute('title', mxResources.get('classic'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-endblocktrans', null).setAttribute('title', mxResources.get('block'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-endovaltrans', null).setAttribute('title', mxResources.get('oval'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-enddiamondtrans', null).setAttribute('title', mxResources.get('diamond'));
-	// 	this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-endthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin'));
-	// }));
-	// this.addItems(['-', 'strokeColor', 'image', 'fillColor']);
-	// this.addItem('geSprite-gradientcolor', 'gradientColor').setAttribute('title', mxResources.get('gradient'));
-	// this.addItems(['shadow']);
-
-	var graph = this.editorUi.editor.graph;
-
-	// Update font size and font family labels
-	var update = mxUtils.bind(this, function()
-	{
-		var ff = 'Helvetica';
-		var fs = '12';
-    	var state = graph.getView().getState(graph.getSelectionCell());
-
-    	if (state != null)
-    	{
-    		ff = state.style[mxConstants.STYLE_FONTFAMILY] || ff;
-    		fs = state.style[mxConstants.STYLE_FONTSIZE] || fs;
-
-    		if (ff.length > 10)
-    		{
-    			ff = ff.substring(0, 8) + '...';
-    		}
-
-    		fontElt.innerHTML = ff;
-    		sizeElt.innerHTML = fs;
-    	}
-	});
-
-    graph.getSelectionModel().addListener(mxEvent.CHANGE, update);
-    graph.getModel().addListener(mxEvent.CHANGE, update);
-
-	// Giuseppe Careri
-	// Updates button states
-  //this.addEdgeSelectionHandler([line, linestart, lineend]);
-	//this.addSelectionHandler([align]);
-};
-
-/**
- * Hides the current menu.
- */
-Toolbar.prototype.hideMenu = function()
-{
-	if (this.currentMenu != null)
-	{
-		this.currentMenu.hideMenu();
-		this.currentMenu.destroy();
-		this.currentMenu = null;
-	}
-};
-
-/**
- * Adds a label to the toolbar.
- */
-Toolbar.prototype.addMenu = function(label, tooltip, showLabels, name)
-{
-	var menu = this.editorUi.menus.get(name);
-	var elt = this.addMenuFunction(label, tooltip, showLabels, menu.funct);
-
-	menu.addListener('stateChanged', function()
-	{
-		elt.setEnabled(menu.enabled);
-	});
-
-	return elt;
-};
-
-/**
- * Adds a label to the toolbar.
- */
-Toolbar.prototype.addMenuFunction = function(label, tooltip, showLabels, funct)
-{
-	var elt = (showLabels) ? this.createLabel(label) : this.createButton(label);
-	this.initElement(elt, tooltip);
-	this.addMenuHandler(elt, showLabels, funct);
-	this.container.appendChild(elt);
-
-	return elt;
-};
-
-/**
- * Adds a separator to the separator.
- */
-Toolbar.prototype.addSeparator = function()
-{
-	var elt = document.createElement('div');
-	elt.className = 'geSeparator';
-	this.container.appendChild(elt);
-
-	return elt;
-};
-
-/**
- * Adds given action item
- */
-Toolbar.prototype.addItems = function(keys)
-{
-	for (var i = 0; i < keys.length; i++)
-	{
-		var key = keys[i];
-
-		if (key == '-')
-		{
-			this.addSeparator();
-		}
-		else
-		{
-			this.addItem('geSprite-' + key.toLowerCase(), key);
-		}
-	}
-};
-
-/**
- * Adds given action item
- */
-Toolbar.prototype.addItem = function(sprite, key)
-{
-	var action = this.editorUi.actions.get(key);
-	var elt = null;
-
-	if (action != null)
-	{
-		elt = this.addButton(sprite, action.label, action.funct);
-		elt.setEnabled(action.enabled);
-
-		action.addListener('stateChanged', function()
-		{
-			elt.setEnabled(action.enabled);
-		});
-	}
-
-	return elt;
-};
-
-/**
- * Adds a button to the toolbar.
- */
-Toolbar.prototype.addButton = function(classname, tooltip, funct)
-{
-	var elt = this.createButton(classname);
-
-	this.initElement(elt, tooltip);
-	this.addClickHandler(elt, funct);
-	this.container.appendChild(elt);
-
-	return elt;
-};
-
-/**
- * Updates the states of the given toolbar items based on the selection.
- */
-Toolbar.prototype.addSelectionHandler = function(items)
-{
-	var graph = this.editorUi.editor.graph;
-
-	var selectionListener = function()
-    {
-    	var selected = !graph.isSelectionEmpty();
-
-    	for (var i = 0; i < items.length; i++)
-    	{
-    		items[i].setEnabled(selected);
-    	}
-    };
-
-    graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
-    selectionListener();
-};
-
-/**
- * Updates the states of the given toolbar items based on the selection.
- */
-Toolbar.prototype.addEdgeSelectionHandler = function(items)
-{
-	var graph = this.editorUi.editor.graph;
-
-	var selectionListener = function()
-    {
-		var edgeSelected = false;
-
-		if (!graph.isSelectionEmpty())
-		{
-			var cells = graph.getSelectionCells();
-
-			for (var i = 0; i < cells.length; i++)
-			{
-				if (graph.getModel().isEdge(cells[i]))
-				{
-					edgeSelected = true;
-					break;
-				}
-			}
-		}
-
-    	for (var i = 0; i < items.length; i++)
-    	{
-    		items[i].setEnabled(edgeSelected);
-    	}
-    };
-
-    graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
-    selectionListener();
-};
-
-/**
- * Initializes the given toolbar element.
- */
-Toolbar.prototype.initElement = function(elt, tooltip)
-{
-	elt.setAttribute('tabindex', '0');
-
-	// Adds tooltip
-	if (tooltip != null)
-	{
-		elt.setAttribute('title', tooltip);
-	}
-
-	this.addEnabledState(elt);
-};
-
-/**
- * Adds enabled state with setter to DOM node (avoids JS wrapper).
- */
-Toolbar.prototype.addEnabledState = function(elt)
-{
-	var classname = elt.className;
-
-	elt.setEnabled = function(value)
-	{
-		elt.enabled = value;
-
-		if (value)
-		{
-			elt.className = classname;
-		}
-		else
-		{
-			elt.className = classname + ' geDisabled';
-		}
-	};
-
-	elt.setEnabled(true);
-};
-
-/**
- * Adds enabled state with setter to DOM node (avoids JS wrapper).
- */
-Toolbar.prototype.addClickHandler = function(elt, funct)
-{
-	if (funct != null)
-	{
-		mxEvent.addListener(elt, 'click', function(evt)
-		{
-			if (elt.enabled)
-			{
-				funct(evt);
-			}
-
-			mxEvent.consume(evt);
-		});
-	}
-};
-
-/**
- * Creates and returns a new button.
- */
-Toolbar.prototype.createButton = function(classname)
-{
-	var elt = document.createElement('a');
-	elt.setAttribute('href', 'javascript:void(0);');
-	elt.className = 'geButton';
-
-	var inner = document.createElement('div');
-	inner.className = 'geSprite ' + classname;
-	elt.appendChild(inner);
-
-	return elt;
-};
-
-/**
- * Creates and returns a new button.
- */
-Toolbar.prototype.createLabel = function(label, tooltip)
-{
-	var elt = document.createElement('a');
-	elt.setAttribute('href', 'javascript:void(0);');
-	elt.className = 'geLabel';
-	mxUtils.write(elt, label);
-
-	return elt;
-};
-
-/**
- * Adds a handler for showing a menu in the given element.
- */
-Toolbar.prototype.addMenuHandler = function(elt, showLabels, funct, showAll)
-{
-	if (funct != null)
-	{
-		var graph = this.editorUi.editor.graph;
-		var menu = null;
-
-		mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)
-		{
-			if (elt.enabled == null || elt.enabled)
-			{
-				graph.panningHandler.hideMenu();
-				menu = new mxPopupMenu(funct);
-				menu.div.className += ' geToolbarMenu';
-				menu.showDisabled = showAll;
-				menu.labels = showLabels;
-				menu.autoExpand = true;
-
-				menu.popup(elt.offsetLeft, elt.offsetTop + elt.offsetHeight + 34, null, evt);
-				this.currentMenu = menu;
-			}
-
-			mxEvent.consume(evt);
-		}));
-	}
-};
+var _0xa94a=["\x65\x64\x69\x74\x6F\x72\x55\x69","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x69\x6E\x69\x74","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x62\x69\x6E\x64","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x73\x61\x76\x65","\x70\x75\x62\x6C\x69\x73\x68","\x2D","\x70\x72\x69\x6E\x74","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x6F\x70\x79","\x63\x75\x74","\x70\x61\x73\x74\x65","\x64\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x61\x64\x64\x49\x74\x65\x6D\x73","\x48\x65\x6C\x76\x65\x74\x69\x63\x61","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x67\x65\x74","\x61\x64\x64\x4D\x65\x6E\x75","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x73\x74\x79\x6C\x65","\x6E\x6F\x77\x72\x61\x70","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x68\x69\x64\x64\x65\x6E","\x77\x69\x64\x74\x68","\x37\x30\x70\x78","\x61\x64\x64\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x31\x32","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x33\x30\x70\x78","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x67\x72\x61\x70\x68","\x65\x64\x69\x74\x6F\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x46\x41\x4D\x49\x4C\x59","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x53\x49\x5A\x45","\x6C\x65\x6E\x67\x74\x68","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x2E\x2E\x2E","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x63\x75\x72\x72\x65\x6E\x74\x4D\x65\x6E\x75","\x64\x65\x73\x74\x72\x6F\x79","\x6D\x65\x6E\x75\x73","\x66\x75\x6E\x63\x74","\x61\x64\x64\x4D\x65\x6E\x75\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x73\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x64","\x65\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x72\x65\x61\x74\x65\x4C\x61\x62\x65\x6C","\x63\x72\x65\x61\x74\x65\x42\x75\x74\x74\x6F\x6E","\x69\x6E\x69\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x61\x64\x64\x4D\x65\x6E\x75\x48\x61\x6E\x64\x6C\x65\x72","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x67\x65\x53\x70\x72\x69\x74\x65\x2D","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x64\x64\x49\x74\x65\x6D","\x61\x63\x74\x69\x6F\x6E\x73","\x6C\x61\x62\x65\x6C","\x61\x64\x64\x42\x75\x74\x74\x6F\x6E","\x61\x64\x64\x43\x6C\x69\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72","\x61\x64\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x61\x64\x64\x45\x64\x67\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x69\x73\x45\x64\x67\x65","\x74\x61\x62\x69\x6E\x64\x65\x78","\x30","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x74\x69\x74\x6C\x65","\x61\x64\x64\x45\x6E\x61\x62\x6C\x65\x64\x53\x74\x61\x74\x65","\x20\x67\x65\x44\x69\x73\x61\x62\x6C\x65\x64","\x63\x6C\x69\x63\x6B","\x63\x6F\x6E\x73\x75\x6D\x65","\x61","\x68\x72\x65\x66","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B","\x67\x65\x42\x75\x74\x74\x6F\x6E","\x67\x65\x53\x70\x72\x69\x74\x65\x20","\x67\x65\x4C\x61\x62\x65\x6C","\x77\x72\x69\x74\x65","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x20\x67\x65\x54\x6F\x6F\x6C\x62\x61\x72\x4D\x65\x6E\x75","\x73\x68\x6F\x77\x44\x69\x73\x61\x62\x6C\x65\x64","\x6C\x61\x62\x65\x6C\x73","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x6F\x66\x66\x73\x65\x74\x4C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x70\x6F\x70\x75\x70"];function Toolbar(_0x1eecx2,_0x1eecx3){this[_0xa94a[0]]= _0x1eecx2;this[_0xa94a[1]]= _0x1eecx3;this[_0xa94a[2]]();mxEvent[_0xa94a[5]](document,mxUtils[_0xa94a[4]](this,function(_0x1eecx4){this[_0xa94a[3]]()}))}Toolbar[_0xa94a[6]][_0xa94a[2]]= function(){this[_0xa94a[21]]([_0xa94a[7],_0xa94a[8],_0xa94a[9],_0xa94a[10],_0xa94a[11],_0xa94a[12],_0xa94a[9],_0xa94a[13],_0xa94a[14],_0xa94a[15],_0xa94a[16],_0xa94a[9],_0xa94a[17],_0xa94a[9],_0xa94a[18],_0xa94a[19],_0xa94a[20],_0xa94a[9]]);var _0x1eecx5=this[_0xa94a[25]](_0xa94a[22],mxResources[_0xa94a[24]](_0xa94a[23]),true,_0xa94a[23]);_0x1eecx5[_0xa94a[27]][_0xa94a[26]]= _0xa94a[28];_0x1eecx5[_0xa94a[27]][_0xa94a[29]]= _0xa94a[30];_0x1eecx5[_0xa94a[27]][_0xa94a[31]]= _0xa94a[32];this[_0xa94a[33]]();var _0x1eecx6=this[_0xa94a[25]](_0xa94a[34],mxResources[_0xa94a[24]](_0xa94a[35]),true,_0xa94a[35]);_0x1eecx6[_0xa94a[27]][_0xa94a[26]]= _0xa94a[28];_0x1eecx6[_0xa94a[27]][_0xa94a[29]]= _0xa94a[30];_0x1eecx6[_0xa94a[27]][_0xa94a[31]]= _0xa94a[36];this[_0xa94a[21]]([_0xa94a[9],_0xa94a[37],_0xa94a[38],_0xa94a[39]]);var _0x1eecx7=this[_0xa94a[0]][_0xa94a[41]][_0xa94a[40]];var _0x1eecx8=mxUtils[_0xa94a[4]](this,function(){var _0x1eecx9=_0xa94a[22];var _0x1eecxa=_0xa94a[34];var _0x1eecxb=_0x1eecx7[_0xa94a[44]]()[_0xa94a[43]](_0x1eecx7[_0xa94a[42]]());if(_0x1eecxb!= null){_0x1eecx9= _0x1eecxb[_0xa94a[27]][mxConstants[_0xa94a[45]]]|| _0x1eecx9;_0x1eecxa= _0x1eecxb[_0xa94a[27]][mxConstants[_0xa94a[46]]]|| _0x1eecxa;if(_0x1eecx9[_0xa94a[47]]> 10){_0x1eecx9= _0x1eecx9[_0xa94a[48]](0,8)+ _0xa94a[49]};_0x1eecx5[_0xa94a[50]]= _0x1eecx9;_0x1eecx6[_0xa94a[50]]= _0x1eecxa}});_0x1eecx7[_0xa94a[52]]()[_0xa94a[51]](mxEvent.CHANGE,_0x1eecx8);_0x1eecx7[_0xa94a[53]]()[_0xa94a[51]](mxEvent.CHANGE,_0x1eecx8)};Toolbar[_0xa94a[6]][_0xa94a[3]]= function(){if(this[_0xa94a[54]]!= null){this[_0xa94a[54]][_0xa94a[3]]();this[_0xa94a[54]][_0xa94a[55]]();this[_0xa94a[54]]= null}};Toolbar[_0xa94a[6]][_0xa94a[25]]= function(_0x1eecxc,_0x1eecxd,_0x1eecxe,_0x1eecxf){var _0x1eecx10=this[_0xa94a[0]][_0xa94a[56]][_0xa94a[24]](_0x1eecxf);var _0x1eecx11=this[_0xa94a[58]](_0x1eecxc,_0x1eecxd,_0x1eecxe,_0x1eecx10[_0xa94a[57]]);_0x1eecx10[_0xa94a[51]](_0xa94a[59],function(){_0x1eecx11[_0xa94a[61]](_0x1eecx10[_0xa94a[60]])});return _0x1eecx11};Toolbar[_0xa94a[6]][_0xa94a[58]]= function(_0x1eecxc,_0x1eecxd,_0x1eecxe,_0x1eecx12){var _0x1eecx11=(_0x1eecxe)?this[_0xa94a[62]](_0x1eecxc):this[_0xa94a[63]](_0x1eecxc);this[_0xa94a[64]](_0x1eecx11,_0x1eecxd);this[_0xa94a[65]](_0x1eecx11,_0x1eecxe,_0x1eecx12);this[_0xa94a[1]][_0xa94a[66]](_0x1eecx11);return _0x1eecx11};Toolbar[_0xa94a[6]][_0xa94a[33]]= function(){var _0x1eecx11=document[_0xa94a[68]](_0xa94a[67]);_0x1eecx11[_0xa94a[69]]= _0xa94a[70];this[_0xa94a[1]][_0xa94a[66]](_0x1eecx11);return _0x1eecx11};Toolbar[_0xa94a[6]][_0xa94a[21]]= function(_0x1eecx13){for(var _0x1eecx14=0;_0x1eecx14< _0x1eecx13[_0xa94a[47]];_0x1eecx14++){var _0x1eecx15=_0x1eecx13[_0x1eecx14];if(_0x1eecx15== _0xa94a[9]){this[_0xa94a[33]]()}else {this[_0xa94a[73]](_0xa94a[71]+ _0x1eecx15[_0xa94a[72]](),_0x1eecx15)}}};Toolbar[_0xa94a[6]][_0xa94a[73]]= function(_0x1eecx16,_0x1eecx15){var _0x1eecx17=this[_0xa94a[0]][_0xa94a[74]][_0xa94a[24]](_0x1eecx15);var _0x1eecx11=null;if(_0x1eecx17!= null){_0x1eecx11= this[_0xa94a[76]](_0x1eecx16,_0x1eecx17[_0xa94a[75]],_0x1eecx17[_0xa94a[57]]);_0x1eecx11[_0xa94a[61]](_0x1eecx17[_0xa94a[60]]);_0x1eecx17[_0xa94a[51]](_0xa94a[59],function(){_0x1eecx11[_0xa94a[61]](_0x1eecx17[_0xa94a[60]])})};return _0x1eecx11};Toolbar[_0xa94a[6]][_0xa94a[76]]= function(_0x1eecx18,_0x1eecxd,_0x1eecx12){var _0x1eecx11=this[_0xa94a[63]](_0x1eecx18);this[_0xa94a[64]](_0x1eecx11,_0x1eecxd);this[_0xa94a[77]](_0x1eecx11,_0x1eecx12);this[_0xa94a[1]][_0xa94a[66]](_0x1eecx11);return _0x1eecx11};Toolbar[_0xa94a[6]][_0xa94a[78]]= function(_0x1eecx19){var _0x1eecx7=this[_0xa94a[0]][_0xa94a[41]][_0xa94a[40]];var _0x1eecx1a=function(){var _0x1eecx1b=!_0x1eecx7[_0xa94a[79]]();for(var _0x1eecx14=0;_0x1eecx14< _0x1eecx19[_0xa94a[47]];_0x1eecx14++){_0x1eecx19[_0x1eecx14][_0xa94a[61]](_0x1eecx1b)}};_0x1eecx7[_0xa94a[52]]()[_0xa94a[51]](mxEvent.CHANGE,_0x1eecx1a);_0x1eecx1a()};Toolbar[_0xa94a[6]][_0xa94a[80]]= function(_0x1eecx19){var _0x1eecx7=this[_0xa94a[0]][_0xa94a[41]][_0xa94a[40]];var _0x1eecx1a=function(){var _0x1eecx1c=false;if(!_0x1eecx7[_0xa94a[79]]()){var _0x1eecx1d=_0x1eecx7[_0xa94a[81]]();for(var _0x1eecx14=0;_0x1eecx14< _0x1eecx1d[_0xa94a[47]];_0x1eecx14++){if(_0x1eecx7[_0xa94a[53]]()[_0xa94a[82]](_0x1eecx1d[_0x1eecx14])){_0x1eecx1c= true;break}}};for(var _0x1eecx14=0;_0x1eecx14< _0x1eecx19[_0xa94a[47]];_0x1eecx14++){_0x1eecx19[_0x1eecx14][_0xa94a[61]](_0x1eecx1c)}};_0x1eecx7[_0xa94a[52]]()[_0xa94a[51]](mxEvent.CHANGE,_0x1eecx1a);_0x1eecx1a()};Toolbar[_0xa94a[6]][_0xa94a[64]]= function(_0x1eecx11,_0x1eecxd){_0x1eecx11[_0xa94a[85]](_0xa94a[83],_0xa94a[84]);if(_0x1eecxd!= null){_0x1eecx11[_0xa94a[85]](_0xa94a[86],_0x1eecxd)};this[_0xa94a[87]](_0x1eecx11)};Toolbar[_0xa94a[6]][_0xa94a[87]]= function(_0x1eecx11){var _0x1eecx18=_0x1eecx11[_0xa94a[69]];_0x1eecx11[_0xa94a[61]]= function(_0x1eecx1e){_0x1eecx11[_0xa94a[60]]= _0x1eecx1e;if(_0x1eecx1e){_0x1eecx11[_0xa94a[69]]= _0x1eecx18}else {_0x1eecx11[_0xa94a[69]]= _0x1eecx18+ _0xa94a[88]}};_0x1eecx11[_0xa94a[61]](true)};Toolbar[_0xa94a[6]][_0xa94a[77]]= function(_0x1eecx11,_0x1eecx12){if(_0x1eecx12!= null){mxEvent[_0xa94a[51]](_0x1eecx11,_0xa94a[89],function(_0x1eecx4){if(_0x1eecx11[_0xa94a[60]]){_0x1eecx12(_0x1eecx4)};mxEvent[_0xa94a[90]](_0x1eecx4)})}};Toolbar[_0xa94a[6]][_0xa94a[63]]= function(_0x1eecx18){var _0x1eecx11=document[_0xa94a[68]](_0xa94a[91]);_0x1eecx11[_0xa94a[85]](_0xa94a[92],_0xa94a[93]);_0x1eecx11[_0xa94a[69]]= _0xa94a[94];var _0x1eecx1f=document[_0xa94a[68]](_0xa94a[67]);_0x1eecx1f[_0xa94a[69]]= _0xa94a[95]+ _0x1eecx18;_0x1eecx11[_0xa94a[66]](_0x1eecx1f);return _0x1eecx11};Toolbar[_0xa94a[6]][_0xa94a[62]]= function(_0x1eecxc,_0x1eecxd){var _0x1eecx11=document[_0xa94a[68]](_0xa94a[91]);_0x1eecx11[_0xa94a[85]](_0xa94a[92],_0xa94a[93]);_0x1eecx11[_0xa94a[69]]= _0xa94a[96];mxUtils[_0xa94a[97]](_0x1eecx11,_0x1eecxc);return _0x1eecx11};Toolbar[_0xa94a[6]][_0xa94a[65]]= function(_0x1eecx11,_0x1eecxe,_0x1eecx12,_0x1eecx20){if(_0x1eecx12!= null){var _0x1eecx7=this[_0xa94a[0]][_0xa94a[41]][_0xa94a[40]];var _0x1eecx10=null;mxEvent[_0xa94a[51]](_0x1eecx11,_0xa94a[89],mxUtils[_0xa94a[4]](this,function(_0x1eecx4){if(_0x1eecx11[_0xa94a[60]]== null|| _0x1eecx11[_0xa94a[60]]){_0x1eecx7[_0xa94a[98]][_0xa94a[3]]();_0x1eecx10=  new mxPopupMenu(_0x1eecx12);_0x1eecx10[_0xa94a[67]][_0xa94a[69]]+= _0xa94a[99];_0x1eecx10[_0xa94a[100]]= _0x1eecx20;_0x1eecx10[_0xa94a[101]]= _0x1eecxe;_0x1eecx10[_0xa94a[102]]= true;_0x1eecx10[_0xa94a[106]](_0x1eecx11[_0xa94a[103]],_0x1eecx11[_0xa94a[104]]+ _0x1eecx11[_0xa94a[105]]+ 34,null,_0x1eecx4);this[_0xa94a[54]]= _0x1eecx10};mxEvent[_0xa94a[90]](_0x1eecx4)}))}}
\ No newline at end of file
diff --git a/public/assets/plugins/square/js/custom.js b/public/assets/plugins/square/js/custom.js
index 761d95c..7bd3e93 100644
--- a/public/assets/plugins/square/js/custom.js
+++ b/public/assets/plugins/square/js/custom.js
@@ -1,307 +1 @@
-var urlParams = (function(url) {
-	var result = new Object();
-	var idx = url.lastIndexOf('?');
-
-	if (idx > 0) {
-		var params = url.substring(idx + 1).split('&');
-
-		for (var i = 0; i < params.length; i++) {
-			idx = params[i].indexOf('=');
-
-			if (idx > 0) {
-				result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
-			}
-		}
-	}
-
-	return result;
-})(window.location.href);
-
-var t0 = new Date();
-
-// Public global variables
-var MAX_REQUEST_SIZE = 10485760;
-var MAX_WIDTH = 12000;
-var MAX_HEIGHT = 12000;
-
-// CUSTOM_PARAMETERS - URLs for save and export
-var EXPORT_URL = 'http://exp.draw.io/ImageExport2/export';
-var SHARE_HOST = 'http://localhost:3000';
-
-var SAVE_URL = 'api/square/projects/';
-var VARIABLE_URL = '/api/variables';
-
-// Paths and files
-var STENCIL_PATH = '/assets/plugins/square/stencils';
-var SHAPES_PATH = '/assets/plugins/square/shapes';
-var IMAGE_PATH = '/assets/plugins/mxgraph/images';
-// Path for images inside the diagram
-//var GRAPH_IMAGE_PATH = 'assets/plugins/mxgraph/img';
-//var ICONFINDER_PATH = 'iconfinder';
-var STYLE_PATH = '/assets/plugins/mxgraph/styles';
-var CSS_PATH = '/assets/plugins/mxgraph/styles';
-var OPEN_FORM = 'api/square/projects/open';
-var TEMPLATE_PATH = '/assets/plugins/square/templates';
-
-// Directory for i18 files and basename for main i18n file
-var RESOURCES_PATH = '/assets/plugins/square/resources';
-var RESOURCE_BASE = RESOURCES_PATH + '/dia';
-
-// Specifies connection mode for touch devices (at least one should be true)
-var tapAndHoldStartsConnection = true;
-var showConnectorImg = true;
-
-var mxLoadResources = false;
-var mxLanguage = 'en';
-console.log('custom', localStorage.getItem('NG_TRANSLATE_LANG_KEY'));
-switch (localStorage.getItem('NG_TRANSLATE_LANG_KEY')) {
-	case 'en_EN':
-		mxLanguage = 'en';
-		break;
-	case 'it':
-		mxLanguage = 'it';
-		break;
-	default:
-		mxLanguage = 'en';
-}
-console.log('mxLanguage', mxLanguage);
-
-var mxLanguages = ['ar', 'bs', 'cs', 'da', 'de', 'el', 'es', 'es-ar', 'fr',
-	'hu', 'id', 'it', 'ja', 'ko', 'nl', 'no', 'pl', 'pt-br', 'pt', 'ro', 'ru',
-	'sr', 'sv', 'th', 'tr', 'uk', 'zh'
-];
-var mxBasePath = 'assets/plugins/mxgraph';
-var geBasePath = 'assets/plugins/mxgraph/js';
-
-var ISPEECHLANG = {
-	usenglishfemale: 'US English Female',
-	usenglishmale: 'US English Male',
-	ukenglishfemale: 'UK English Female',
-	ukenglishmale: 'UK English Male',
-	auenglishfemale: 'Australian English',
-	usspanishfemale: 'US Spanish Female',
-	usspanishmale: 'US Spanish Male',
-	chchinesefemale: 'Chinese Female',
-	chchinesemale: 'Chinese Male',
-	hkchinesefemale: 'Hong Kong Cantonese Female',
-	twchinesefemale: 'Taiwan Chinese Female',
-	jpjapanesefemale: 'Japanese Female',
-	jpjapanesemale: 'Japanese Male',
-	krkoreanfemale: 'Korean Female',
-	krkoreanmale: 'Korean Male',
-	caenglishfemale: 'Canadian English Female',
-	huhungarianfemale: 'Hungarian Female',
-	brportuguesefemale: 'Brazilian Portuguese Female',
-	eurportuguesefemale: 'European Portuguese Female',
-	eurportuguesemale: 'European Portuguese Male',
-	eurspanishfemale: 'European Spanish Female',
-	eurspanishmale: 'European Spanish Male',
-	eurcatalanfemale: 'European Catalan Female',
-	eurczechfemale: 'European Czech Female',
-	eurdanishfemale: 'European Danish Female',
-	eurfinnishfemale: 'European Finnish Female',
-	eurfrenchfemale: 'European French Female',
-	eurfrenchmale: 'European French Male',
-	eurnorwegianfemale: 'European Norwegian Female',
-	eurdutchfemale: 'European Dutch Female',
-	eurpolishfemale: 'European Polish Female',
-	euritalianfemale: 'European Italian Female',
-	eurturkishfemale: 'European Turkish Female	',
-	eurturkishmale: 'European Turkish Male',
-	eurgermanfemale: 'European German Female',
-	eurgermanmale: 'European German Male',
-	rurussianfemale: 'Russian Female',
-	rurussianmale: 'Russian Male',
-	swswedishfemale: 'Swedish Female',
-	cafrenchfemale: 'Canadian French Female',
-	cafrenchmale: 'Canadian French Male'
-};
-var BOOLSELECT = {
-	'yes': 'Yes',
-	'no': 'No'
-};
-
-var ISPEECHASRLANG = {
-	'en-US': 'English (US)',
-	'en-CA': 'English (Canada)',
-	'en-GB': 'English (UK)',
-	'en-AU': 'English (Australia)',
-	'es-ES': 'Spanish (Spain)',
-	'es-MX': 'Spanish (Mexico)',
-	'it-IT': 'Italian (Italy) / Finnish (Finland)',
-	'fr-FR': 'French (France)',
-	'fr-CA': 'French (Canada)',
-	'pl-PL': 'Polish (Poland)',
-	'pt-PT': 'Portuguese (Portugal)',
-	'ca-ES': 'Catalan (Catalan)',
-	'zh-TW': 'Chinese (Taiwan)',
-	'da-DK': 'Danish (Denmark)',
-	'fr-FR': 'German (Germany)',
-	'ja-JP': 'Japanese (Japan)',
-	'ko-KR': 'Korean (Korea)',
-	'nl-NL': 'Dutch (Netherlands)',
-	'nb-NO': 'Norwegian (Norway)',
-	'pt-BR': 'Portuguese (Brazil)',
-	'ru-RU': 'Russian (Russia)',
-	'sv-SE': 'Swedish (Sweden)',
-	'zh-CN': 'Chinese (China)',
-	'zh-HK': 'Chinese (Hong Kong)'
-};
-
-var ISPEECHASRMODEL = {
-	0: 'Default',
-	date: 'Date',
-	usmoney: 'US Money',
-	numbersto9: 'Numbers to 9',
-	numbersto99: 'Numbers to 99',
-	numbersto999: 'Numbers to 999',
-	time: 'Time',
-	phonenumber: 'Phone number',
-	streets: 'Streets',
-	citystate: 'US City/States'
-};
-
-var ISPEECHBEEP = {
-	'BEEP': 'Yes',
-	'NOBEEP': 'No'
-};
-
-var RECORDINGFORMAT = {
-	'wav': 'wav',
-	'gsm': 'gsm'
-};
-
-var SECRETDIGITSPOS = {
-	'first': 'First',
-	'last': 'Last'
-};
-
-var ASRINTKEYS = {
-	'#': '#',
-	'*': '*'
-};
-
-var GOOGLETTSLANG = {
-	'af': 'Afrikaans',
-	'sq': 'Albanian',
-	'am': 'Amharic',
-	'ar': 'Arabic',
-	'hy': 'Armenian',
-	'az': 'Azerbaijani',
-	'eu': 'Basque',
-	'be': 'Belarusian',
-	'bn': 'Bengali',
-	'bh': 'Bihari',
-	'bs': 'Bosnian',
-	'br': 'Breton',
-	'bg': 'Bulgarian',
-	'km': 'Cambodian',
-	'ca': 'Catalan',
-	'zh-CN': 'Chinese (Simplified)',
-	'zh-TW': 'Chinese (Traditional)',
-	'co': 'Corsican',
-	'hr': 'Croatian',
-	'cs': 'Czech',
-	'da': 'Danish',
-	'nl': 'Dutch',
-	'en': 'English',
-	'eo': 'Esperanto',
-	'et': 'Estonian',
-	'fo': 'Faroese',
-	'tl': 'Filipino',
-	'fi': 'Finnish',
-	'fr': 'French',
-	'fy': 'Frisian',
-	'gl': 'Galician',
-	'ka': 'Georgian',
-	'de': 'German',
-	'el': 'Greek',
-	'gn': 'Guarani',
-	'gu': 'Gujarati',
-	'xx-hacker': 'Hacker',
-	'ha': 'Hausa',
-	'iw': 'Hebrew',
-	'hi': 'Hindi',
-	'hu': 'Hungarian',
-	'is': 'Icelandic',
-	'id': 'Indonesian',
-	'ia': 'Interlingua',
-	'ga': 'Irish',
-	'it': 'Italian',
-	'jw': 'Javanese',
-	'ja': 'Japanese',
-	'kn': 'Kannada',
-	'kk': 'Kazakh',
-	'rw': 'Kinyarwanda',
-	'rn': 'Kirundi',
-	'xx-klingon': 'Klingon',
-	'ku': 'Kurdish',
-	'ko': 'Korean',
-	'ky': 'Kyrgyz',
-	'lo': 'Laothian',
-	'la': 'Latin',
-	'lv': 'Latvian',
-	'ln': 'Lingala',
-	'lt': 'Lithuanian',
-	'mk': 'Macedonian',
-	'mg': 'Malagasy',
-	'ms': 'Malay',
-	'ml': 'Malayalam',
-	'mt': 'Maltese',
-	'mi': 'Maori',
-	'mr': 'Marathi',
-	'mo': 'Moldavian',
-	'mn': 'Mongolian',
-	'sr-ME': 'Montenegrin',
-	'ne': 'Nepali',
-	'no': 'Norwegian',
-	'nn': 'Norwegian (Nynorsk)',
-	'oc': 'Occitan',
-	'or': 'Oriya',
-	'om': 'Oromo',
-	'ps': 'Pashto',
-	'fa': 'Persian',
-	'xx-pirate': 'Pirate',
-	'pl': 'Polish',
-	'pt-BR': 'Portuguese (Brazil)',
-	'pt-PT': 'Portuguese (Portugal)',
-	'pa': 'Punjabi',
-	'qu': 'Quechua',
-	'ro': 'Romanian',
-	'rm': 'Romansh',
-	'ru': 'Russian',
-	'gd': 'Scots Gaelic',
-	'sr': 'Serbian',
-	'sh': 'Serbo-Croatian',
-	'st': 'Sesotho',
-	'sn': 'Shona',
-	'sd': 'Sindhi',
-	'si': 'Sinhalese',
-	'sk': 'Slovak',
-	'sl': 'Slovenian',
-	'so': 'Somali',
-	'es': 'Spanish',
-	'su': 'Sundanese',
-	'sw': 'Swahili',
-	'sv': 'Swedish',
-	'tg': 'Tajik',
-	'ta': 'Tamil',
-	'tt': 'Tatar',
-	'te': 'Telugu',
-	'th': 'Thai',
-	'ti': 'Tigrinya',
-	'to': 'Tonga',
-	'tr': 'Turkish',
-	'tk': 'Turkmen',
-	'tw': 'Twi',
-	'ug': 'Uighur',
-	'uk': 'Ukrainian',
-	'ur': 'Urdu',
-	'uz': 'Uzbek',
-	'vi': 'Vietnamese',
-	'cy': 'Welsh',
-	'xh': 'Xhosa',
-	'yi': 'Yiddish',
-	'yo': 'Yoruba',
-	'zu': 'Zulu'
-};
+var _0x4b26=["\x68\x72\x65\x66","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x3F","\x6C\x61\x73\x74\x49\x6E\x64\x65\x78\x4F\x66","\x26","\x73\x70\x6C\x69\x74","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x6C\x65\x6E\x67\x74\x68","\x3D","\x69\x6E\x64\x65\x78\x4F\x66","\x68\x74\x74\x70\x3A\x2F\x2F\x65\x78\x70\x2E\x64\x72\x61\x77\x2E\x69\x6F\x2F\x49\x6D\x61\x67\x65\x45\x78\x70\x6F\x72\x74\x32\x2F\x65\x78\x70\x6F\x72\x74","\x68\x74\x74\x70\x3A\x2F\x2F\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x3A\x33\x30\x30\x30","\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F","\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x68\x61\x70\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x69\x6D\x61\x67\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x73\x74\x79\x6C\x65\x73","\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x6F\x70\x65\x6E","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x72\x65\x73\x6F\x75\x72\x63\x65\x73","\x2F\x64\x69\x61","\x65\x6E","\x63\x75\x73\x74\x6F\x6D","\x4E\x47\x5F\x54\x52\x41\x4E\x53\x4C\x41\x54\x45\x5F\x4C\x41\x4E\x47\x5F\x4B\x45\x59","\x67\x65\x74\x49\x74\x65\x6D","\x6C\x6F\x67","\x65\x6E\x5F\x45\x4E","\x69\x74","\x6D\x78\x4C\x61\x6E\x67\x75\x61\x67\x65","\x61\x72","\x62\x73","\x63\x73","\x64\x61","\x64\x65","\x65\x6C","\x65\x73","\x65\x73\x2D\x61\x72","\x66\x72","\x68\x75","\x69\x64","\x6A\x61","\x6B\x6F","\x6E\x6C","\x6E\x6F","\x70\x6C","\x70\x74\x2D\x62\x72","\x70\x74","\x72\x6F","\x72\x75","\x73\x72","\x73\x76","\x74\x68","\x74\x72","\x75\x6B","\x7A\x68","\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68","\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x6A\x73","\x55\x53\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x55\x53\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x4D\x61\x6C\x65","\x55\x4B\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x55\x4B\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x4D\x61\x6C\x65","\x41\x75\x73\x74\x72\x61\x6C\x69\x61\x6E\x20\x45\x6E\x67\x6C\x69\x73\x68","\x55\x53\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x55\x53\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x4D\x61\x6C\x65","\x43\x68\x69\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x43\x68\x69\x6E\x65\x73\x65\x20\x4D\x61\x6C\x65","\x48\x6F\x6E\x67\x20\x4B\x6F\x6E\x67\x20\x43\x61\x6E\x74\x6F\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x54\x61\x69\x77\x61\x6E\x20\x43\x68\x69\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x4A\x61\x70\x61\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x4A\x61\x70\x61\x6E\x65\x73\x65\x20\x4D\x61\x6C\x65","\x4B\x6F\x72\x65\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x4B\x6F\x72\x65\x61\x6E\x20\x4D\x61\x6C\x65","\x43\x61\x6E\x61\x64\x69\x61\x6E\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x48\x75\x6E\x67\x61\x72\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x42\x72\x61\x7A\x69\x6C\x69\x61\x6E\x20\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x43\x61\x74\x61\x6C\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x43\x7A\x65\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x44\x61\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x46\x69\x6E\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x44\x75\x74\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x50\x6F\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x49\x74\x61\x6C\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x54\x75\x72\x6B\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65\x09","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x54\x75\x72\x6B\x69\x73\x68\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x47\x65\x72\x6D\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x47\x65\x72\x6D\x61\x6E\x20\x4D\x61\x6C\x65","\x52\x75\x73\x73\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x52\x75\x73\x73\x69\x61\x6E\x20\x4D\x61\x6C\x65","\x53\x77\x65\x64\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x43\x61\x6E\x61\x64\x69\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x43\x61\x6E\x61\x64\x69\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x4D\x61\x6C\x65","\x59\x65\x73","\x4E\x6F","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x55\x53\x29","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x43\x61\x6E\x61\x64\x61\x29","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x55\x4B\x29","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x41\x75\x73\x74\x72\x61\x6C\x69\x61\x29","\x53\x70\x61\x6E\x69\x73\x68\x20\x28\x53\x70\x61\x69\x6E\x29","\x53\x70\x61\x6E\x69\x73\x68\x20\x28\x4D\x65\x78\x69\x63\x6F\x29","\x49\x74\x61\x6C\x69\x61\x6E\x20\x28\x49\x74\x61\x6C\x79\x29\x20\x2F\x20\x46\x69\x6E\x6E\x69\x73\x68\x20\x28\x46\x69\x6E\x6C\x61\x6E\x64\x29","\x46\x72\x65\x6E\x63\x68\x20\x28\x46\x72\x61\x6E\x63\x65\x29","\x46\x72\x65\x6E\x63\x68\x20\x28\x43\x61\x6E\x61\x64\x61\x29","\x50\x6F\x6C\x69\x73\x68\x20\x28\x50\x6F\x6C\x61\x6E\x64\x29","\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x28\x50\x6F\x72\x74\x75\x67\x61\x6C\x29","\x43\x61\x74\x61\x6C\x61\x6E\x20\x28\x43\x61\x74\x61\x6C\x61\x6E\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x54\x61\x69\x77\x61\x6E\x29","\x44\x61\x6E\x69\x73\x68\x20\x28\x44\x65\x6E\x6D\x61\x72\x6B\x29","\x47\x65\x72\x6D\x61\x6E\x20\x28\x47\x65\x72\x6D\x61\x6E\x79\x29","\x4A\x61\x70\x61\x6E\x65\x73\x65\x20\x28\x4A\x61\x70\x61\x6E\x29","\x4B\x6F\x72\x65\x61\x6E\x20\x28\x4B\x6F\x72\x65\x61\x29","\x44\x75\x74\x63\x68\x20\x28\x4E\x65\x74\x68\x65\x72\x6C\x61\x6E\x64\x73\x29","\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E\x20\x28\x4E\x6F\x72\x77\x61\x79\x29","\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x28\x42\x72\x61\x7A\x69\x6C\x29","\x52\x75\x73\x73\x69\x61\x6E\x20\x28\x52\x75\x73\x73\x69\x61\x29","\x53\x77\x65\x64\x69\x73\x68\x20\x28\x53\x77\x65\x64\x65\x6E\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x43\x68\x69\x6E\x61\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x48\x6F\x6E\x67\x20\x4B\x6F\x6E\x67\x29","\x44\x65\x66\x61\x75\x6C\x74","\x44\x61\x74\x65","\x55\x53\x20\x4D\x6F\x6E\x65\x79","\x4E\x75\x6D\x62\x65\x72\x73\x20\x74\x6F\x20\x39","\x4E\x75\x6D\x62\x65\x72\x73\x20\x74\x6F\x20\x39\x39","\x4E\x75\x6D\x62\x65\x72\x73\x20\x74\x6F\x20\x39\x39\x39","\x54\x69\x6D\x65","\x50\x68\x6F\x6E\x65\x20\x6E\x75\x6D\x62\x65\x72","\x53\x74\x72\x65\x65\x74\x73","\x55\x53\x20\x43\x69\x74\x79\x2F\x53\x74\x61\x74\x65\x73","\x77\x61\x76","\x67\x73\x6D","\x46\x69\x72\x73\x74","\x4C\x61\x73\x74","\x23","\x2A","\x41\x66\x72\x69\x6B\x61\x61\x6E\x73","\x41\x6C\x62\x61\x6E\x69\x61\x6E","\x41\x6D\x68\x61\x72\x69\x63","\x41\x72\x61\x62\x69\x63","\x41\x72\x6D\x65\x6E\x69\x61\x6E","\x41\x7A\x65\x72\x62\x61\x69\x6A\x61\x6E\x69","\x42\x61\x73\x71\x75\x65","\x42\x65\x6C\x61\x72\x75\x73\x69\x61\x6E","\x42\x65\x6E\x67\x61\x6C\x69","\x42\x69\x68\x61\x72\x69","\x42\x6F\x73\x6E\x69\x61\x6E","\x42\x72\x65\x74\x6F\x6E","\x42\x75\x6C\x67\x61\x72\x69\x61\x6E","\x43\x61\x6D\x62\x6F\x64\x69\x61\x6E","\x43\x61\x74\x61\x6C\x61\x6E","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x53\x69\x6D\x70\x6C\x69\x66\x69\x65\x64\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x54\x72\x61\x64\x69\x74\x69\x6F\x6E\x61\x6C\x29","\x43\x6F\x72\x73\x69\x63\x61\x6E","\x43\x72\x6F\x61\x74\x69\x61\x6E","\x43\x7A\x65\x63\x68","\x44\x61\x6E\x69\x73\x68","\x44\x75\x74\x63\x68","\x45\x6E\x67\x6C\x69\x73\x68","\x45\x73\x70\x65\x72\x61\x6E\x74\x6F","\x45\x73\x74\x6F\x6E\x69\x61\x6E","\x46\x61\x72\x6F\x65\x73\x65","\x46\x69\x6C\x69\x70\x69\x6E\x6F","\x46\x69\x6E\x6E\x69\x73\x68","\x46\x72\x65\x6E\x63\x68","\x46\x72\x69\x73\x69\x61\x6E","\x47\x61\x6C\x69\x63\x69\x61\x6E","\x47\x65\x6F\x72\x67\x69\x61\x6E","\x47\x65\x72\x6D\x61\x6E","\x47\x72\x65\x65\x6B","\x47\x75\x61\x72\x61\x6E\x69","\x47\x75\x6A\x61\x72\x61\x74\x69","\x48\x61\x63\x6B\x65\x72","\x48\x61\x75\x73\x61","\x48\x65\x62\x72\x65\x77","\x48\x69\x6E\x64\x69","\x48\x75\x6E\x67\x61\x72\x69\x61\x6E","\x49\x63\x65\x6C\x61\x6E\x64\x69\x63","\x49\x6E\x64\x6F\x6E\x65\x73\x69\x61\x6E","\x49\x6E\x74\x65\x72\x6C\x69\x6E\x67\x75\x61","\x49\x72\x69\x73\x68","\x49\x74\x61\x6C\x69\x61\x6E","\x4A\x61\x76\x61\x6E\x65\x73\x65","\x4A\x61\x70\x61\x6E\x65\x73\x65","\x4B\x61\x6E\x6E\x61\x64\x61","\x4B\x61\x7A\x61\x6B\x68","\x4B\x69\x6E\x79\x61\x72\x77\x61\x6E\x64\x61","\x4B\x69\x72\x75\x6E\x64\x69","\x4B\x6C\x69\x6E\x67\x6F\x6E","\x4B\x75\x72\x64\x69\x73\x68","\x4B\x6F\x72\x65\x61\x6E","\x4B\x79\x72\x67\x79\x7A","\x4C\x61\x6F\x74\x68\x69\x61\x6E","\x4C\x61\x74\x69\x6E","\x4C\x61\x74\x76\x69\x61\x6E","\x4C\x69\x6E\x67\x61\x6C\x61","\x4C\x69\x74\x68\x75\x61\x6E\x69\x61\x6E","\x4D\x61\x63\x65\x64\x6F\x6E\x69\x61\x6E","\x4D\x61\x6C\x61\x67\x61\x73\x79","\x4D\x61\x6C\x61\x79","\x4D\x61\x6C\x61\x79\x61\x6C\x61\x6D","\x4D\x61\x6C\x74\x65\x73\x65","\x4D\x61\x6F\x72\x69","\x4D\x61\x72\x61\x74\x68\x69","\x4D\x6F\x6C\x64\x61\x76\x69\x61\x6E","\x4D\x6F\x6E\x67\x6F\x6C\x69\x61\x6E","\x4D\x6F\x6E\x74\x65\x6E\x65\x67\x72\x69\x6E","\x4E\x65\x70\x61\x6C\x69","\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E","\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E\x20\x28\x4E\x79\x6E\x6F\x72\x73\x6B\x29","\x4F\x63\x63\x69\x74\x61\x6E","\x4F\x72\x69\x79\x61","\x4F\x72\x6F\x6D\x6F","\x50\x61\x73\x68\x74\x6F","\x50\x65\x72\x73\x69\x61\x6E","\x50\x69\x72\x61\x74\x65","\x50\x6F\x6C\x69\x73\x68","\x50\x75\x6E\x6A\x61\x62\x69","\x51\x75\x65\x63\x68\x75\x61","\x52\x6F\x6D\x61\x6E\x69\x61\x6E","\x52\x6F\x6D\x61\x6E\x73\x68","\x52\x75\x73\x73\x69\x61\x6E","\x53\x63\x6F\x74\x73\x20\x47\x61\x65\x6C\x69\x63","\x53\x65\x72\x62\x69\x61\x6E","\x53\x65\x72\x62\x6F\x2D\x43\x72\x6F\x61\x74\x69\x61\x6E","\x53\x65\x73\x6F\x74\x68\x6F","\x53\x68\x6F\x6E\x61","\x53\x69\x6E\x64\x68\x69","\x53\x69\x6E\x68\x61\x6C\x65\x73\x65","\x53\x6C\x6F\x76\x61\x6B","\x53\x6C\x6F\x76\x65\x6E\x69\x61\x6E","\x53\x6F\x6D\x61\x6C\x69","\x53\x70\x61\x6E\x69\x73\x68","\x53\x75\x6E\x64\x61\x6E\x65\x73\x65","\x53\x77\x61\x68\x69\x6C\x69","\x53\x77\x65\x64\x69\x73\x68","\x54\x61\x6A\x69\x6B","\x54\x61\x6D\x69\x6C","\x54\x61\x74\x61\x72","\x54\x65\x6C\x75\x67\x75","\x54\x68\x61\x69","\x54\x69\x67\x72\x69\x6E\x79\x61","\x54\x6F\x6E\x67\x61","\x54\x75\x72\x6B\x69\x73\x68","\x54\x75\x72\x6B\x6D\x65\x6E","\x54\x77\x69","\x55\x69\x67\x68\x75\x72","\x55\x6B\x72\x61\x69\x6E\x69\x61\x6E","\x55\x72\x64\x75","\x55\x7A\x62\x65\x6B","\x56\x69\x65\x74\x6E\x61\x6D\x65\x73\x65","\x57\x65\x6C\x73\x68","\x58\x68\x6F\x73\x61","\x59\x69\x64\x64\x69\x73\x68","\x59\x6F\x72\x75\x62\x61","\x5A\x75\x6C\x75"];var urlParams=(function(_0x5471x2){var _0x5471x3= new Object();var _0x5471x4=_0x5471x2[_0x4b26[3]](_0x4b26[2]);if(_0x5471x4> 0){var _0x5471x5=_0x5471x2[_0x4b26[6]](_0x5471x4+ 1)[_0x4b26[5]](_0x4b26[4]);for(var _0x5471x6=0;_0x5471x6< _0x5471x5[_0x4b26[7]];_0x5471x6++){_0x5471x4= _0x5471x5[_0x5471x6][_0x4b26[9]](_0x4b26[8]);if(_0x5471x4> 0){_0x5471x3[_0x5471x5[_0x5471x6][_0x4b26[6]](0,_0x5471x4)]= _0x5471x5[_0x5471x6][_0x4b26[6]](_0x5471x4+ 1)}}};return _0x5471x3})(window[_0x4b26[1]][_0x4b26[0]]);var t0= new Date();var MAX_REQUEST_SIZE=10485760;var MAX_WIDTH=12000;var MAX_HEIGHT=12000;var EXPORT_URL=_0x4b26[10];var SHARE_HOST=_0x4b26[11];var SAVE_URL=_0x4b26[12];var VARIABLE_URL=_0x4b26[13];var STENCIL_PATH=_0x4b26[14];var SHAPES_PATH=_0x4b26[15];var IMAGE_PATH=_0x4b26[16];var STYLE_PATH=_0x4b26[17];var CSS_PATH=_0x4b26[17];var OPEN_FORM=_0x4b26[18];var TEMPLATE_PATH=_0x4b26[19];var RESOURCES_PATH=_0x4b26[20];var RESOURCE_BASE=RESOURCES_PATH+ _0x4b26[21];var tapAndHoldStartsConnection=true;var showConnectorImg=true;var mxLoadResources=false;var mxLanguage=_0x4b26[22];console[_0x4b26[26]](_0x4b26[23],localStorage[_0x4b26[25]](_0x4b26[24]));switch(localStorage[_0x4b26[25]](_0x4b26[24])){case _0x4b26[27]:mxLanguage= _0x4b26[22];break;case _0x4b26[28]:mxLanguage= _0x4b26[28];break;default:mxLanguage= _0x4b26[22]};console[_0x4b26[26]](_0x4b26[29],mxLanguage);var mxLanguages=[_0x4b26[30],_0x4b26[31],_0x4b26[32],_0x4b26[33],_0x4b26[34],_0x4b26[35],_0x4b26[36],_0x4b26[37],_0x4b26[38],_0x4b26[39],_0x4b26[40],_0x4b26[28],_0x4b26[41],_0x4b26[42],_0x4b26[43],_0x4b26[44],_0x4b26[45],_0x4b26[46],_0x4b26[47],_0x4b26[48],_0x4b26[49],_0x4b26[50],_0x4b26[51],_0x4b26[52],_0x4b26[53],_0x4b26[54],_0x4b26[55]];var mxBasePath=_0x4b26[56];var geBasePath=_0x4b26[57];var ISPEECHLANG={usenglishfemale:_0x4b26[58],usenglishmale:_0x4b26[59],ukenglishfemale:_0x4b26[60],ukenglishmale:_0x4b26[61],auenglishfemale:_0x4b26[62],usspanishfemale:_0x4b26[63],usspanishmale:_0x4b26[64],chchinesefemale:_0x4b26[65],chchinesemale:_0x4b26[66],hkchinesefemale:_0x4b26[67],twchinesefemale:_0x4b26[68],jpjapanesefemale:_0x4b26[69],jpjapanesemale:_0x4b26[70],krkoreanfemale:_0x4b26[71],krkoreanmale:_0x4b26[72],caenglishfemale:_0x4b26[73],huhungarianfemale:_0x4b26[74],brportuguesefemale:_0x4b26[75],eurportuguesefemale:_0x4b26[76],eurportuguesemale:_0x4b26[77],eurspanishfemale:_0x4b26[78],eurspanishmale:_0x4b26[79],eurcatalanfemale:_0x4b26[80],eurczechfemale:_0x4b26[81],eurdanishfemale:_0x4b26[82],eurfinnishfemale:_0x4b26[83],eurfrenchfemale:_0x4b26[84],eurfrenchmale:_0x4b26[85],eurnorwegianfemale:_0x4b26[86],eurdutchfemale:_0x4b26[87],eurpolishfemale:_0x4b26[88],euritalianfemale:_0x4b26[89],eurturkishfemale:_0x4b26[90],eurturkishmale:_0x4b26[91],eurgermanfemale:_0x4b26[92],eurgermanmale:_0x4b26[93],rurussianfemale:_0x4b26[94],rurussianmale:_0x4b26[95],swswedishfemale:_0x4b26[96],cafrenchfemale:_0x4b26[97],cafrenchmale:_0x4b26[98]};var BOOLSELECT={"\x79\x65\x73":_0x4b26[99],"\x6E\x6F":_0x4b26[100]};var ISPEECHASRLANG={"\x65\x6E\x2D\x55\x53":_0x4b26[101],"\x65\x6E\x2D\x43\x41":_0x4b26[102],"\x65\x6E\x2D\x47\x42":_0x4b26[103],"\x65\x6E\x2D\x41\x55":_0x4b26[104],"\x65\x73\x2D\x45\x53":_0x4b26[105],"\x65\x73\x2D\x4D\x58":_0x4b26[106],"\x69\x74\x2D\x49\x54":_0x4b26[107],"\x66\x72\x2D\x46\x52":_0x4b26[108],"\x66\x72\x2D\x43\x41":_0x4b26[109],"\x70\x6C\x2D\x50\x4C":_0x4b26[110],"\x70\x74\x2D\x50\x54":_0x4b26[111],"\x63\x61\x2D\x45\x53":_0x4b26[112],"\x7A\x68\x2D\x54\x57":_0x4b26[113],"\x64\x61\x2D\x44\x4B":_0x4b26[114],"\x66\x72\x2D\x46\x52":_0x4b26[115],"\x6A\x61\x2D\x4A\x50":_0x4b26[116],"\x6B\x6F\x2D\x4B\x52":_0x4b26[117],"\x6E\x6C\x2D\x4E\x4C":_0x4b26[118],"\x6E\x62\x2D\x4E\x4F":_0x4b26[119],"\x70\x74\x2D\x42\x52":_0x4b26[120],"\x72\x75\x2D\x52\x55":_0x4b26[121],"\x73\x76\x2D\x53\x45":_0x4b26[122],"\x7A\x68\x2D\x43\x4E":_0x4b26[123],"\x7A\x68\x2D\x48\x4B":_0x4b26[124]};var ISPEECHASRMODEL={0:_0x4b26[125],date:_0x4b26[126],usmoney:_0x4b26[127],numbersto9:_0x4b26[128],numbersto99:_0x4b26[129],numbersto999:_0x4b26[130],time:_0x4b26[131],phonenumber:_0x4b26[132],streets:_0x4b26[133],citystate:_0x4b26[134]};var ISPEECHBEEP={"\x42\x45\x45\x50":_0x4b26[99],"\x4E\x4F\x42\x45\x45\x50":_0x4b26[100]};var RECORDINGFORMAT={"\x77\x61\x76":_0x4b26[135],"\x67\x73\x6D":_0x4b26[136]};var SECRETDIGITSPOS={"\x66\x69\x72\x73\x74":_0x4b26[137],"\x6C\x61\x73\x74":_0x4b26[138]};var ASRINTKEYS={"\x23":_0x4b26[139],"\x2A":_0x4b26[140]};var GOOGLETTSLANG={"\x61\x66":_0x4b26[141],"\x73\x71":_0x4b26[142],"\x61\x6D":_0x4b26[143],"\x61\x72":_0x4b26[144],"\x68\x79":_0x4b26[145],"\x61\x7A":_0x4b26[146],"\x65\x75":_0x4b26[147],"\x62\x65":_0x4b26[148],"\x62\x6E":_0x4b26[149],"\x62\x68":_0x4b26[150],"\x62\x73":_0x4b26[151],"\x62\x72":_0x4b26[152],"\x62\x67":_0x4b26[153],"\x6B\x6D":_0x4b26[154],"\x63\x61":_0x4b26[155],"\x7A\x68\x2D\x43\x4E":_0x4b26[156],"\x7A\x68\x2D\x54\x57":_0x4b26[157],"\x63\x6F":_0x4b26[158],"\x68\x72":_0x4b26[159],"\x63\x73":_0x4b26[160],"\x64\x61":_0x4b26[161],"\x6E\x6C":_0x4b26[162],"\x65\x6E":_0x4b26[163],"\x65\x6F":_0x4b26[164],"\x65\x74":_0x4b26[165],"\x66\x6F":_0x4b26[166],"\x74\x6C":_0x4b26[167],"\x66\x69":_0x4b26[168],"\x66\x72":_0x4b26[169],"\x66\x79":_0x4b26[170],"\x67\x6C":_0x4b26[171],"\x6B\x61":_0x4b26[172],"\x64\x65":_0x4b26[173],"\x65\x6C":_0x4b26[174],"\x67\x6E":_0x4b26[175],"\x67\x75":_0x4b26[176],"\x78\x78\x2D\x68\x61\x63\x6B\x65\x72":_0x4b26[177],"\x68\x61":_0x4b26[178],"\x69\x77":_0x4b26[179],"\x68\x69":_0x4b26[180],"\x68\x75":_0x4b26[181],"\x69\x73":_0x4b26[182],"\x69\x64":_0x4b26[183],"\x69\x61":_0x4b26[184],"\x67\x61":_0x4b26[185],"\x69\x74":_0x4b26[186],"\x6A\x77":_0x4b26[187],"\x6A\x61":_0x4b26[188],"\x6B\x6E":_0x4b26[189],"\x6B\x6B":_0x4b26[190],"\x72\x77":_0x4b26[191],"\x72\x6E":_0x4b26[192],"\x78\x78\x2D\x6B\x6C\x69\x6E\x67\x6F\x6E":_0x4b26[193],"\x6B\x75":_0x4b26[194],"\x6B\x6F":_0x4b26[195],"\x6B\x79":_0x4b26[196],"\x6C\x6F":_0x4b26[197],"\x6C\x61":_0x4b26[198],"\x6C\x76":_0x4b26[199],"\x6C\x6E":_0x4b26[200],"\x6C\x74":_0x4b26[201],"\x6D\x6B":_0x4b26[202],"\x6D\x67":_0x4b26[203],"\x6D\x73":_0x4b26[204],"\x6D\x6C":_0x4b26[205],"\x6D\x74":_0x4b26[206],"\x6D\x69":_0x4b26[207],"\x6D\x72":_0x4b26[208],"\x6D\x6F":_0x4b26[209],"\x6D\x6E":_0x4b26[210],"\x73\x72\x2D\x4D\x45":_0x4b26[211],"\x6E\x65":_0x4b26[212],"\x6E\x6F":_0x4b26[213],"\x6E\x6E":_0x4b26[214],"\x6F\x63":_0x4b26[215],"\x6F\x72":_0x4b26[216],"\x6F\x6D":_0x4b26[217],"\x70\x73":_0x4b26[218],"\x66\x61":_0x4b26[219],"\x78\x78\x2D\x70\x69\x72\x61\x74\x65":_0x4b26[220],"\x70\x6C":_0x4b26[221],"\x70\x74\x2D\x42\x52":_0x4b26[120],"\x70\x74\x2D\x50\x54":_0x4b26[111],"\x70\x61":_0x4b26[222],"\x71\x75":_0x4b26[223],"\x72\x6F":_0x4b26[224],"\x72\x6D":_0x4b26[225],"\x72\x75":_0x4b26[226],"\x67\x64":_0x4b26[227],"\x73\x72":_0x4b26[228],"\x73\x68":_0x4b26[229],"\x73\x74":_0x4b26[230],"\x73\x6E":_0x4b26[231],"\x73\x64":_0x4b26[232],"\x73\x69":_0x4b26[233],"\x73\x6B":_0x4b26[234],"\x73\x6C":_0x4b26[235],"\x73\x6F":_0x4b26[236],"\x65\x73":_0x4b26[237],"\x73\x75":_0x4b26[238],"\x73\x77":_0x4b26[239],"\x73\x76":_0x4b26[240],"\x74\x67":_0x4b26[241],"\x74\x61":_0x4b26[242],"\x74\x74":_0x4b26[243],"\x74\x65":_0x4b26[244],"\x74\x68":_0x4b26[245],"\x74\x69":_0x4b26[246],"\x74\x6F":_0x4b26[247],"\x74\x72":_0x4b26[248],"\x74\x6B":_0x4b26[249],"\x74\x77":_0x4b26[250],"\x75\x67":_0x4b26[251],"\x75\x6B":_0x4b26[252],"\x75\x72":_0x4b26[253],"\x75\x7A":_0x4b26[254],"\x76\x69":_0x4b26[255],"\x63\x79":_0x4b26[256],"\x78\x68":_0x4b26[257],"\x79\x69":_0x4b26[258],"\x79\x6F":_0x4b26[259],"\x7A\x75":_0x4b26[260]}
\ No newline at end of file
diff --git a/public/index.html b/public/index.html
index 0fe17cf..6dcbda6 100644
--- a/public/index.html
+++ b/public/index.html
@@ -50,7 +50,7 @@
     <![endif]-->
     <script src="app/29680297.vendor.js"></script>
 
-    <script src="app/4a68e305.app.js"></script>
+    <script src="app/fc371ddc.app.js"></script>
 
     <!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
     <!-- BEGIN CORE PLUGINS -->
diff --git a/release-notes/changelog_0.0.148.txt b/release-notes/changelog_0.0.148.txt
index 5a449a2..1ac665c 100644
--- a/release-notes/changelog_0.0.148.txt
+++ b/release-notes/changelog_0.0.148.txt
@@ -1,5 +1,10 @@
 # xCALLY MOTION Changelog
 
+- * 1d5a56b - 2016-10-26: Updated triggers 
+- * 842c61a - 2016-10-26: Changed urlforward promises order 
+- * 6c37db5 - 2016-10-26: Fixed yourdashboard permissions for main tour 
+- * c3dc798 - 2016-10-25: Fixed yourdashboards agent permission 
+- * 5a4227c - 2016-10-25: Removed all config hooks, sending the io and process messages before creation/update; Fixed cm trigger and contact choose for header notifications 
 - * 68f82a2 - 2016-10-24: Replaced hooks with direct functions in ami to increase the performances 
 - * 5a1b040 - 2016-10-24: add logs for slow triggers issue 
 - * 0047ef3 - 2016-10-21: Replaced a timer 
@@ -23,9 +28,4 @@
 - * 51e6a79 - 2016-10-19: Fixed agent dashboard queue table resize; Fixed td disposal. 
 - * 978fb2d - 2016-10-19: Increased max size for custom dashboard 
 - * 1829e0c - 2016-10-19: Added check for custom dashboard size 
-- * 9c831a6 - 2016-10-19: Fixed queue setting pattern 
-- * 9923e2c - 2016-10-19: update label for update complete 
-- * 72616fc - 2016-10-19: Fixed channels realtime socket synchronization; Fixed new queues setting retrocompatibility and added inputs pattern; Fixed telephone realtime unsync. 
-- * 1413a72 - 2016-10-18: Fixed voice realtime 
-- * 3713e54 - 2016-10-18: fix report_agent update (only one row and not all effected rows) 
 
diff --git a/server/api/_apidoc.js b/server/api/_apidoc.js
index 2530c28..93f3758 100644
--- a/server/api/_apidoc.js
+++ b/server/api/_apidoc.js
@@ -1,21 +1 @@
-/**
- * @api {post} /api/auth/local/ Basic authentication
- *
- * @apiVersion 0.0.143
- * @apiName BasicAuth
- * @apiGroup Authentication
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiSuccess {String} role User/Agent role.
- * @apiSuccess {String} token  User/Agent token.
- * @apiSuccess {Number} userId  User/Agent ID.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *       "role": "admin",
- *       "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTQsImlhdCI6MTQ3MjQ1ODIyMiwiZXhwIjoxNDcyNTQ0NjIyfQ"
- *       "userId": 5
- *     }
- */
+var _0x7d33=[]
\ No newline at end of file
diff --git a/server/api/action/action.controller.js b/server/api/action/action.controller.js
index a5d8d27..78777aa 100644
--- a/server/api/action/action.controller.js
+++ b/server/api/action/action.controller.js
@@ -1,88 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/actions              ->  index
- * POST    /api/actions              ->  create
- * GET     /api/actions/:id          ->  show
- * PUT     /api/actions/:id          ->  update
- * DELETE  /api/actions/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-
-var Action = require('../../models').Action;
-var sequelize = require('../../models').sequelize;
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of Actions
-exports.index = function(req, res) {
-  return Action.findAll()
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new Action in the DB
-exports.create = function(req, res, next) {
-  req.body.UserId = req.user.id;
-  return sequelize.transaction(function(t) {
-      return Action
-        .create(_.merge(req.body, req.params), {
-          transaction: t,
-          body: req.body
-        });
-    })
-    .then(function(action) {
-      return res.status(201).send(action);
-    }).catch(function(err) {
-      console.log(err);
-      if (err.message === 'Interface not found') {
-        err.message = 'No queues associated for the user';
-        err.translatedMessage = 'MESSAGE_NO_USER_QUEUES';
-      }
-      return handleError(res, err);
-    });
-}
+var _0xe5eb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x41\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x69\x64","\x75\x73\x65\x72","\x6C\x6F\x67","\x6D\x65\x73\x73\x61\x67\x65","\x49\x6E\x74\x65\x72\x66\x61\x63\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x4E\x6F\x20\x71\x75\x65\x75\x65\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x75\x73\x65\x72","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x4E\x4F\x5F\x55\x53\x45\x52\x5F\x51\x55\x45\x55\x45\x53","\x70\x61\x72\x61\x6D\x73","\x6D\x65\x72\x67\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E"];_0xe5eb[0];var _=require(_0xe5eb[1]);var Action=require(_0xe5eb[3])[_0xe5eb[2]];var sequelize=require(_0xe5eb[3])[_0xe5eb[4]];function handleError(_0xb8c6x5,_0xb8c6x6){return _0xb8c6x5[_0xe5eb[6]](500)[_0xe5eb[5]](_0xb8c6x6)}function responseWithResult(_0xb8c6x5,_0xb8c6x8){_0xb8c6x8= _0xb8c6x8|| 200;return function(_0xb8c6x9){if(_0xb8c6x9){_0xb8c6x5[_0xe5eb[6]](_0xb8c6x8)[_0xe5eb[7]](_0xb8c6x9)}}}function handleEntityNotFound(_0xb8c6x5){return function(_0xb8c6x9){if(!_0xb8c6x9){_0xb8c6x5[_0xe5eb[6]](404)[_0xe5eb[8]]();return null};return _0xb8c6x9}}function saveUpdates(_0xb8c6xc){return function(_0xb8c6x9){return _0xb8c6x9[_0xe5eb[10]](_0xb8c6xc)[_0xe5eb[9]](function(_0xb8c6xd){return _0xb8c6xd})}}function removeEntity(_0xb8c6x5){return function(_0xb8c6x9){if(_0xb8c6x9){return _0xb8c6x9[_0xe5eb[11]]()[_0xe5eb[9]](function(){_0xb8c6x5[_0xe5eb[6]](204)[_0xe5eb[8]]()})}}}exports[_0xe5eb[12]]= function(_0xb8c6xf,_0xb8c6x5){return Action[_0xe5eb[14]]()[_0xe5eb[9]](responseWithResult(_0xb8c6x5))[_0xe5eb[13]](handleError(_0xb8c6x5))};exports[_0xe5eb[15]]= function(_0xb8c6xf,_0xb8c6x5,_0xb8c6x10){_0xb8c6xf[_0xe5eb[17]][_0xe5eb[16]]= _0xb8c6xf[_0xe5eb[19]][_0xe5eb[18]];return sequelize[_0xe5eb[28]](function(_0xb8c6x12){return Action[_0xe5eb[15]](_[_0xe5eb[27]](_0xb8c6xf[_0xe5eb[17]],_0xb8c6xf[_0xe5eb[26]]),{transaction:_0xb8c6x12,body:_0xb8c6xf[_0xe5eb[17]]})})[_0xe5eb[9]](function(_0xb8c6x11){return _0xb8c6x5[_0xe5eb[6]](201)[_0xe5eb[5]](_0xb8c6x11)})[_0xe5eb[13]](function(_0xb8c6x6){console[_0xe5eb[20]](_0xb8c6x6);if(_0xb8c6x6[_0xe5eb[21]]=== _0xe5eb[22]){_0xb8c6x6[_0xe5eb[21]]= _0xe5eb[23];_0xb8c6x6[_0xe5eb[24]]= _0xe5eb[25]};return handleError(_0xb8c6x5,_0xb8c6x6)})}
\ No newline at end of file
diff --git a/server/api/action/action.events.js b/server/api/action/action.events.js
index 597aed4..8cf212a 100644
--- a/server/api/action/action.events.js
+++ b/server/api/action/action.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Action = require('../../models').Action;
-
-var ActionEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ActionEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Action.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ActionEvents.emit(event + ':' + doc._id, doc);
-    ActionEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ActionEvents;
+var _0x2992=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x41\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2992[0];const EventEmitter=require(_0x2992[1]);const Action=require(_0x2992[3])[_0x2992[2]];var ActionEvents= new EventEmitter();ActionEvents[_0x2992[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x2992[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x2992[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x2992[6]};for(var e in events){var event=events[e];Action[_0x2992[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x126bx8,_0x126bx9,_0x126bxa){ActionEvents[_0x2992[10]](event+ _0x2992[8]+ _0x126bx8[_0x2992[9]],_0x126bx8);ActionEvents[_0x2992[10]](event,_0x126bx8);_0x126bxa(null)}}module[_0x2992[11]]= ActionEvents
\ No newline at end of file
diff --git a/server/api/action/action.socket.js b/server/api/action/action.socket.js
index 26d4dbd..41149d4 100644
--- a/server/api/action/action.socket.js
+++ b/server/api/action/action.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const ActionEvents = require('./action.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('action:' + event, socket);
-
-    ActionEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ActionEvents.removeListener(event, listener);
-  };
-}
+var _0xb30f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x61\x63\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x61\x63\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xb30f[0];const ActionEvents=require(_0xb30f[1]);var events=[_0xb30f[2],_0xb30f[3]];exports[_0xb30f[4]]= function(_0xcd8cx3){for(var _0xcd8cx4=0,_0xcd8cx5=events[_0xb30f[5]];_0xcd8cx4< _0xcd8cx5;_0xcd8cx4++){var _0xcd8cx6=events[_0xcd8cx4];var _0xcd8cx7=createListener(_0xb30f[6]+ _0xcd8cx6,_0xcd8cx3);ActionEvents[_0xb30f[7]](_0xcd8cx6,_0xcd8cx7);_0xcd8cx3[_0xb30f[7]](_0xb30f[8],removeListener(_0xcd8cx6,_0xcd8cx7))}};function createListener(_0xcd8cx6,_0xcd8cx3){return function(_0xcd8cx9){_0xcd8cx3[_0xb30f[9]](_0xcd8cx6,_0xcd8cx9)}}function removeListener(_0xcd8cx6,_0xcd8cx7){return function(){ActionEvents[_0xb30f[10]](_0xcd8cx6,_0xcd8cx7)}}
\ No newline at end of file
diff --git a/server/api/action/index.js b/server/api/action/index.js
index 1882fa5..91927ea 100644
--- a/server/api/action/index.js
+++ b/server/api/action/index.js
@@ -1,13 +1 @@
-'use strict';
-
-var express = require('express');
-
-var auth = require('../../auth/auth.service');
-var controller = require('./action.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), controller.index);
-router.post('/:name', auth.isAuthenticated(), controller.create);
-
-module.exports = router;
+var _0x3b93=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x3b93[0];var express=require(_0x3b93[1]);var auth=require(_0x3b93[2]);var controller=require(_0x3b93[3]);var router=express.Router();router[_0x3b93[7]](_0x3b93[4],auth[_0x3b93[5]](),controller[_0x3b93[6]]);router[_0x3b93[10]](_0x3b93[8],auth[_0x3b93[5]](),controller[_0x3b93[9]]);module[_0x3b93[11]]= router
\ No newline at end of file
diff --git a/server/api/agent/agent.controller.js b/server/api/agent/agent.controller.js
index 355d4e4..d8cbdf3 100644
--- a/server/api/agent/agent.controller.js
+++ b/server/api/agent/agent.controller.js
@@ -1,1144 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var sequelize = require('../../models').sequelize;
-
-var util = require('util');
-var Util = require('../../config/util');
-
-var OpenchannelQueue = require('../../models').OpenchannelQueue;
-var VoiceQueue = require('../../models').VoiceQueue;
-var ChatQueue = require('../../models').ChatQueue;
-var MailQueue = require('../../models').MailQueue;
-var FaxQueue = require('../../models').FaxQueue;
-var SmsQueue = require('../../models').SmsQueue;
-var MailRoom = require('../../models').MailRoom;
-var Setting = require('../../models').Setting;
-var Agent = require('../../models').User;
-var User = require('../../models').User;
-var Team = require('../../models').Team;
-var List = require('../../models').List;
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  switch (req.user.role) {
-    case 'user':
-      return User
-        .findById(req.user.id, {
-          attributes: ['id']
-        })
-        .then(Util.getAgentsIdByUser(req.query))
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.error(err);
-          return handleError(res, err);
-        });
-
-    default:
-      return Agent
-        .scope('agent')
-        .findAndCountAll(Util.getQuery(req.query))
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-  }
-};
-
-exports.addQueues = function(req, res, next) {
-  return Agent
-    .findById(req.params.id, {
-      attributes: ['id', 'name']
-    })
-    .then(function(agent) {
-      if (!agent) {
-        return res.sendStatus(401);
-      }
-
-      switch (req.params.channel) {
-        case 'voice':
-          return agent
-            .addVoiceQueues(req.body, {
-              interface: util.format('SIP/%s', agent.name),
-              stateinterface: util.format('SIP/%s', agent.name),
-              membername: agent.name,
-              UserId: agent.id,
-            });
-        case 'chat':
-          return agent
-            .addChatQueues(req.body);
-        case 'mail':
-          return agent
-            .addMailQueues(req.body);
-        case 'fax':
-          return agent
-            .addFaxQueues(req.body);
-        case 'sms':
-          return agent
-            .addSmsQueues(req.body);
-        case 'openchannel':
-          return agent
-            .addOpenchannelQueues(req.body);
-        default:
-          return null;
-      }
-    })
-    .then(function(queues) {
-      return res.sendStatus(queues ? 200 : 401);
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-};
-
-exports.removeQueues = function(req, res, next) {
-  return Agent
-    .findById(req.params.id, {
-      attributes: ['id']
-    })
-    .then(function(agent) {
-      if (!agent) {
-        return res.sendStatus(401);
-      }
-
-      switch (req.params.channel) {
-        case 'voice':
-          return agent
-            .removeVoiceQueues(req.query.ids);
-        case 'chat':
-          return agent
-            .removeChatQueues(req.query.ids);
-        case 'mail':
-          return agent
-            .removeMailQueues(req.query.ids);
-        case 'sms':
-          return agent
-            .removeSmsQueues(req.query.ids);
-        case 'fax':
-          return agent
-            .removeFaxQueues(req.query.ids);
-        case 'openchannel':
-          return agent
-            .removeOpenchannelQueues(req.query.ids);
-        default:
-          return null;
-      }
-    })
-    .then(function(queues) {
-      return res.sendStatus(queues ? 200 : 401);
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-};
-
-
-// Get list of agents
-exports.realtimeIndex = function(req, res, next) {
-  switch (req.user.role) {
-    case 'user':
-      return User
-        .findById(req.user.id, {
-          attributes: ['id']
-        })
-        .then(Util.getAgentsIdByUser(req.query))
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-    default:
-      return Agent
-        .scope('agent', {
-          method: ['checkPauseStatus', req.query]
-        }, {
-          method: ['checkQueueStatus', req.query]
-        }, {
-          method: ['checkOnlineStatus', req.query]
-        }, {
-          method: ['checkSipStatus', req.query]
-        }, 'queues')
-        .findAndCountAll(Util.getQuery(req.query))
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-  }
-};
-
-exports.realtimeVoiceIndex = function(req, res, next) {
-  switch (req.user.role) {
-    case 'user':
-      var agents = [];
-      return User
-        .findById(req.user.id, {
-          attributes: ['id']
-        })
-        .then(Util.getVoiceQueuesIdByUser({}, {
-          attributes: ['name'],
-          include: [{
-            raw: true,
-            model: User,
-            attributes: ['id']
-          }]
-        }))
-        .then(function(queues) {
-          var voiceQueues = _.map(queues.rows, 'name');
-          queues.rows.forEach(function(queue) {
-            agents = _.union(agents, _.map(queue.Users, 'id'));
-          });
-          return User
-            .scope('agent', {
-              method: ['checkPauseStatus', req.query]
-            }, {
-              method: ['checkQueueStatus', req.query]
-            }, {
-              method: ['checkOnlineStatus', req.query]
-            }, {
-              method: ['checkSipStatus', req.query]
-            })
-            .findAndCountAll(_.merge(Util.getQuery(req.query, {
-              id: {
-                $in: agents
-              }
-            }), {
-              include: [{
-                model: VoiceQueue,
-                where: {
-                  name: {
-                    $in: voiceQueues
-                  }
-                },
-                required: false
-              }]
-            }));
-        })
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-    default:
-      return Agent
-        .scope('agent', {
-          method: ['checkPauseStatus', req.query]
-        }, {
-          method: ['checkQueueStatus', req.query]
-        }, {
-          method: ['checkOnlineStatus', req.query]
-        }, {
-          method: ['checkSipStatus', req.query]
-        }, 'queues')
-        .findAndCountAll(Util.getQuery(req.query))
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-  }
-};
-
-exports.realtimeChatIndex = function(req, res, next) {
-  switch (req.user.role) {
-    case 'user':
-      var agents = [];
-      return User
-        .findById(req.user.id, {
-          attributes: ['id']
-        })
-        .then(Util.getChatQueuesIdByUser({}, {
-          attributes: ['id'],
-          include: [{
-            raw: true,
-            model: User,
-            attributes: ['id']
-          }]
-        }))
-        .then(function(queues) {
-          var chatQueues = _.map(queues.rows, 'id');
-          queues.rows.forEach(function(queue) {
-            agents = _.union(agents, _.map(queue.Users, 'id'));
-          });
-          return User
-            .scope('agent', {
-              method: ['checkPauseStatus', req.query]
-            }, {
-              method: ['checkQueueStatus', req.query]
-            }, {
-              method: ['checkOnlineStatus', req.query]
-            }, {
-              method: ['checkSipStatus', req.query]
-            })
-            .findAndCountAll(_.merge(Util.getQuery(req.query, {
-              id: {
-                $in: agents
-              }
-            }), {
-              include: [{
-                model: ChatQueue,
-                where: {
-                  id: {
-                    $in: chatQueues
-                  }
-                },
-                required: false
-              }]
-            }));
-        })
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-    default:
-      return Agent
-        .scope('agent', {
-          method: ['checkPauseStatus', req.query]
-        }, {
-          method: ['checkQueueStatus', req.query]
-        }, {
-          method: ['checkOnlineStatus', req.query]
-        }, {
-          method: ['checkSipStatus', req.query]
-        }, 'queues')
-        .findAndCountAll(Util.getQuery(req.query))
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-  }
-};
-
-exports.realtimeMailIndex = function(req, res, next) {
-  switch (req.user.role) {
-    case 'user':
-      var agents = [];
-      return User
-        .findById(req.user.id, {
-          attributes: ['id']
-        })
-        .then(Util.getMailQueuesIdByUser({}, {
-          attributes: ['id'],
-          include: [{
-            raw: true,
-            model: User,
-            attributes: ['id']
-          }]
-        }))
-        .then(function(queues) {
-          var mailQueues = _.map(queues.rows, 'id');
-          queues.rows.forEach(function(queue) {
-            agents = _.union(agents, _.map(queue.Users, 'id'));
-          });
-          return User
-            .scope('agent', {
-              method: ['checkPauseStatus', req.query]
-            }, {
-              method: ['checkQueueStatus', req.query]
-            }, {
-              method: ['checkOnlineStatus', req.query]
-            }, {
-              method: ['checkSipStatus', req.query]
-            })
-            .findAndCountAll(_.merge(Util.getQuery(req.query, {
-              id: {
-                $in: agents
-              }
-            }), {
-              include: [{
-                model: MailQueue,
-                where: {
-                  id: {
-                    $in: mailQueues
-                  }
-                },
-                required: false
-              }]
-            }));
-        })
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-    default:
-      return Agent
-        .scope('agent', {
-          method: ['checkPauseStatus', req.query]
-        }, {
-          method: ['checkQueueStatus', req.query]
-        }, {
-          method: ['checkOnlineStatus', req.query]
-        }, {
-          method: ['checkSipStatus', req.query]
-        }, 'queues')
-        .findAndCountAll(Util.getQuery(req.query))
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-  }
-};
-
-exports.realtimeFaxIndex = function(req, res, next) {
-  switch (req.user.role) {
-    case 'user':
-      var agents = [];
-      return User
-        .findById(req.user.id, {
-          attributes: ['id']
-        })
-        .then(Util.getFaxQueuesIdByUser({}, {
-          attributes: ['id'],
-          include: [{
-            raw: true,
-            model: User,
-            attributes: ['id']
-          }]
-        }))
-        .then(function(queues) {
-          var faxQueues = _.map(queues.rows, 'id');
-          queues.rows.forEach(function(queue) {
-            agents = _.union(agents, _.map(queue.Users, 'id'));
-          });
-          return User
-            .scope('agent', {
-              method: ['checkPauseStatus', req.query]
-            }, {
-              method: ['checkQueueStatus', req.query]
-            }, {
-              method: ['checkOnlineStatus', req.query]
-            }, {
-              method: ['checkSipStatus', req.query]
-            })
-            .findAndCountAll(_.merge(Util.getQuery(req.query, {
-              id: {
-                $in: agents
-              }
-            }), {
-              include: [{
-                model: FaxQueue,
-                where: {
-                  id: {
-                    $in: faxQueues
-                  }
-                },
-                required: false
-              }]
-            }));
-        })
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-    default:
-      return Agent
-        .scope('agent', {
-          method: ['checkPauseStatus', req.query]
-        }, {
-          method: ['checkQueueStatus', req.query]
-        }, {
-          method: ['checkOnlineStatus', req.query]
-        }, {
-          method: ['checkSipStatus', req.query]
-        }, 'queues')
-        .findAndCountAll(Util.getQuery(req.query))
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-  }
-};
-exports.realtimeSmsIndex = function(req, res, next) {
-  switch (req.user.role) {
-    case 'user':
-      var agents = [];
-      return User
-        .findById(req.user.id, {
-          attributes: ['id']
-        })
-        .then(Util.getSmsQueuesIdByUser({}, {
-          attributes: ['id'],
-          include: [{
-            raw: true,
-            model: User,
-            attributes: ['id']
-          }]
-        }))
-        .then(function(queues) {
-          var smsQueues = _.map(queues.rows, 'id');
-          queues.rows.forEach(function(queue) {
-            agents = _.union(agents, _.map(queue.Users, 'id'));
-          });
-          return User
-            .scope('agent', {
-              method: ['checkPauseStatus', req.query]
-            }, {
-              method: ['checkQueueStatus', req.query]
-            }, {
-              method: ['checkOnlineStatus', req.query]
-            }, {
-              method: ['checkSipStatus', req.query]
-            })
-            .findAndCountAll(_.merge(Util.getQuery(req.query, {
-              id: {
-                $in: agents
-              }
-            }), {
-              include: [{
-                model: SmsQueue,
-                where: {
-                  id: {
-                    $in: smsQueues
-                  }
-                },
-                required: false
-              }]
-            }));
-        })
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-    default:
-      return Agent
-        .scope('agent', {
-          method: ['checkPauseStatus', req.query]
-        }, {
-          method: ['checkQueueStatus', req.query]
-        }, {
-          method: ['checkOnlineStatus', req.query]
-        }, {
-          method: ['checkSipStatus', req.query]
-        }, 'queues')
-        .findAndCountAll(Util.getQuery(req.query))
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-  }
-};
-
-exports.realtimeOpenchannelIndex = function(req, res, next) {
-  switch (req.user.role) {
-    case 'user':
-      var agents = [];
-      return User
-        .findById(req.user.id, {
-          attributes: ['id']
-        })
-        .then(Util.getOpenchannelQueuesIdByUser({}, {
-          attributes: ['id'],
-          include: [{
-            raw: true,
-            model: User,
-            attributes: ['id']
-          }]
-        }))
-        .then(function(queues) {
-          var openchannelQueues = _.map(queues.rows, 'id');
-          queues.rows.forEach(function(queue) {
-            agents = _.union(agents, _.map(queue.Users, 'id'));
-          });
-          return User
-            .scope('agent', {
-              method: ['checkPauseStatus', req.query]
-            }, {
-              method: ['checkQueueStatus', req.query]
-            }, {
-              method: ['checkOnlineStatus', req.query]
-            }, {
-              method: ['checkSipStatus', req.query]
-            })
-            .findAndCountAll(_.merge(Util.getQuery(req.query, {
-              id: {
-                $in: agents
-              }
-            }), {
-              include: [{
-                model: OpenchannelQueue,
-                where: {
-                  id: {
-                    $in: openchannelQueues
-                  }
-                },
-                required: false
-              }]
-            }));
-        })
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-    default:
-      return Agent
-        .scope('agent', {
-          method: ['checkPauseStatus', req.query]
-        }, {
-          method: ['checkQueueStatus', req.query]
-        }, {
-          method: ['checkOnlineStatus', req.query]
-        }, {
-          method: ['checkSipStatus', req.query]
-        }, 'queues')
-        .findAndCountAll(Util.getQuery(req.query))
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-  }
-};
-// Get a single agent
-exports.show = function(req, res) {
-  return Agent
-    .scope('agent')
-    .findById(req.params.id)
-    .then(function(agent) {
-      if (!agent) {
-        return res.sendStatus(404);
-      }
-      return res.send(agent);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single agent
-exports.showVoiceQueues = function(req, res) {
-  return Agent
-    .scope('agent')
-    .findById(req.params.id)
-    .then(function(agent) {
-      if (!agent) {
-        return res.sendStatus(404);
-      }
-
-      return agent
-        .getVoiceQueues({
-          attributes: ['name']
-        });
-    })
-    .then(function(voiceQueues) {
-      return res.send({
-        count: voiceQueues.length,
-        rows: voiceQueues
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.showChatQueues = function(req, res) {
-  return Agent
-    .scope('agent')
-    .findById(req.params.id)
-    .then(function(agent) {
-      if (!agent) {
-        return res.sendStatus(404);
-      }
-
-      return agent
-        .getChatQueues({
-          attributes: ['id']
-        });
-    })
-    .then(function(chatQueues) {
-      return res.send({
-        count: chatQueues.length,
-        rows: chatQueues
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.showMailQueues = function(req, res) {
-  return Agent
-    .scope('agent')
-    .findById(req.params.id)
-    .then(function(agent) {
-      if (!agent) {
-        return res.sendStatus(404);
-      }
-
-      return agent
-        .getMailQueues({
-          attributes: ['id']
-        });
-    })
-    .then(function(mailQueues) {
-      return res.send({
-        count: mailQueues.length,
-        rows: mailQueues
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.showFaxQueues = function(req, res) {
-  return Agent
-    .scope('agent')
-    .findById(req.params.id)
-    .then(function(agent) {
-      if (!agent) {
-        return res.sendStatus(404);
-      }
-
-      return agent
-        .getFaxQueues({
-          attributes: ['id']
-        });
-    })
-    .then(function(faxQueues) {
-      return res.send({
-        count: faxQueues.length,
-        rows: faxQueues
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.showSmsQueues = function(req, res) {
-  return Agent
-    .scope('agent')
-    .findById(req.params.id)
-    .then(function(agent) {
-      if (!agent) {
-        return res.sendStatus(404);
-      }
-
-      return agent
-        .getSmsQueues({
-          attributes: ['id']
-        });
-    })
-    .then(function(smsQueues) {
-      return res.send({
-        count: smsQueues.length,
-        rows: smsQueues
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.showOpenchannelQueues = function(req, res) {
-  return Agent
-    .scope('agent')
-    .findById(req.params.id)
-    .then(function(agent) {
-      if (!agent) {
-        return res.sendStatus(404);
-      }
-
-      return agent
-        .getOpenchannelQueues({
-          attributes: ['id']
-        });
-    })
-    .then(function(Queues) {
-      return res.send({
-        count: Queues.length,
-        rows: Queues
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Creates a new agent in the DB.
-exports.create = function(req, res) {
-  var _agent;
-
-  // Set default role
-  req.body.role = 'agent';
-
-  return sequelize.transaction(function(t) {
-      return Agent
-        .scope('agent')
-        .create(req.body, {
-          transaction: t
-        })
-        .then(function(agent) {
-          _agent = agent;
-
-          return Team
-            .findOne({
-              where: {
-                defaultEntry: true
-              }
-            });
-        })
-        .then(function(team) {
-          return team
-            .addUser(_agent.id, {
-              transaction: t
-            });
-        })
-        .then(function() {
-          return List
-            .findOne({
-              where: {
-                defaultEntry: true
-              }
-            });
-        })
-        .then(function(list) {
-          return list
-            .addUser(_agent.id, {
-              transaction: t
-            });
-        });
-      // .then(function() {
-      //   if (req.body.channels && req.body.channels.voice && req.body.channels.voice.queues) {
-      //     return _agent
-      //       .addVoiceQueues(req.body.channels.voice.queues, {
-      //         interface: util.format('SIP/%s', _agent.name),
-      //         stateinterface: util.format('SIP/%s', _agent.name),
-      //         membername: _agent.name,
-      //         UserId: _agent.id,
-      //         transaction: t
-      //       });
-      //   }
-      // })
-      // .then(function() {
-      //   if (req.body.channels && req.body.channels.chat && req.body.channels.chat.queues) {
-      //     return _agent
-      //       .addChatQueues(req.body.channels.chat.queues, {
-      //         transaction: t
-      //       });
-      //   }
-      // })
-      // .then(function() {
-      //   if (req.body.channels && req.body.channels.mail && req.body.channels.mail.queues) {
-      //     return _agent
-      //       .addMailQueues(req.body.channels.mail.queues, {
-      //         transaction: t
-      //       });
-      //   }
-      // })
-      // .then(function() {
-      //   if (req.body.channels && req.body.channels.sms && req.body.channels.sms.queues) {
-      //     return _agent
-      //       .addSmsQueues(req.body.channels.sms.queues, {
-      //         transaction: t
-      //       });
-      //   }
-      // })
-      // .then(function() {
-      //   if (req.body.channels && req.body.channels.fax && req.body.channels.fax.queues) {
-      //     return _agent
-      //       .addFaxQueues(req.body.channels.fax.queues, {
-      //         transaction: t
-      //       });
-      //   }
-      // })
-      // .then(function() {
-      //   if (req.body.channels && req.body.channels.openchannel && req.body.channels.openchannel.queues) {
-      //     return _agent
-      //       .addOpenchannelQueues(req.body.channels.openchannel.queues, {
-      //         transaction: t
-      //       });
-      //   }
-      // });
-    })
-    .then(function() {
-      return res.status(201).send(_agent);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      console.log(err);
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Creates a new agent in the DB.
-exports.bulkCreate = function(req, res) {
-  var _agents;
-  var _setting;
-
-  var items = [];
-  var password = String(req.body.password);
-
-  return sequelize.transaction(function(t) {
-
-      return Setting
-        .findById(1)
-        .then(function(setting) {
-          _setting = setting;
-
-          var regEx = _setting.securePassword ? /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/ : /^[a-zA-Z0-9]{6,}$/;
-
-          if (!regEx.test(password)) {
-            throw new Error('Invalid password pattern');
-          }
-
-          var startIndex = 0;
-          if (req.body.hasOwnProperty('startIndex') && _.isNumber(req.body.startIndex) && req.body.startIndex >= 0) {
-            startIndex = req.body.startIndex;
-            delete req.body.startIndex;
-          }
-          var internalIndex = req.body.minInternal;
-          delete req.body.minInternal;
-
-          if (req.body.amount) {
-            req.body.role = 'agent';
-            for (var i = startIndex; i < req.body.amount + startIndex; i++, internalIndex++) {
-              var item = _.clone(req.body);
-              item.internal = internalIndex;
-              item.name = item.name + i;
-              item.fullname = item.fullname + i;
-              item.email = item.email.split('@')[0] + i + '@' + item.email.split('@')[1];
-              items.push(item);
-            }
-          } else {
-            throw new Error('No agents amount specified!');
-          }
-          return Agent
-            .bulkCreate(items, {
-              transaction: t,
-              individualHooks: true
-            });
-        })
-        .then(function(agents) {
-          _agents = agents;
-
-          return Team
-            .findOne({
-              where: {
-                defaultEntry: true
-              }
-            });
-        })
-        .then(function(team) {
-          return team
-            .addUsers(_.map(_agents, 'id'), {
-              transaction: t
-            });
-        })
-    })
-    .then(function() {
-      return res.sendStatus(201);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      console.log(err);
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing agent in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  delete req.body.role;
-  delete req.body.name;
-  delete req.body.password;
-
-  return sequelize.transaction(function(t) {
-      return Agent
-        .findById(req.params.id)
-        .then(function(agent) {
-          if (!agent) {
-            return res.sendStatus(404);
-          }
-          var updated = _.merge(agent, req.body);
-          return updated
-            .save({
-              transaction: t
-            });
-        })
-        .then(function(agent) {
-          return res.status(200).send(agent);
-        })
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      console.log(err);
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Deletes a agent from the DB.
-exports.destroy = function(req, res) {
-  var _agent;
-
-  return Agent
-    .findById(req.params.id)
-    .then(function(agent) {
-      _agent = agent;
-      if (!agent) {
-        return res.sendStatus(404);
-      }
-      return agent
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(sequelize.ForeignKeyConstraintError, function(err) {
-      return Util.errorManager.handleForeignKeyConstraintError(res, 'agent', _agent.name, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a agent from the DB.
-exports.bulkDestroy = function(req, res) {
-  return Agent
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-/**
- * Change a user password //DEPRECATED
- */
-exports.changePassword = function(req, res, next) {
-  var _setting;
-
-  var userId = req.user.id;
-  var oldPass = String(req.body.oldPassword);
-  var newPass = String(req.body.newPassword);
-
-  return Setting
-    .findById(1)
-    .then(function(setting) {
-      _setting = setting;
-
-      return Agent
-        .findById(userId);
-    })
-    .then(function(user) {
-      var regEx = _setting.securePassword ? /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/ : /^[a-zA-Z0-9]{6,}$/;
-
-      if (!regEx.test(newPass)) {
-        throw new Error('Invalid password pattern');
-      }
-
-      if (user.authenticate(oldPass)) {
-        user.password = newPass;
-
-        return user
-          .save();
-      } else {
-        return res.sendStatus(403);
-      }
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-/**
- * Change a user password by admin //DEPRECATED
- */
-exports.resetPassword = function(req, res, next) {
-  var _setting;
-
-  var userId = req.params.id;
-  var newPass = String(req.body.newPassword);
-
-  return Setting
-    .findById(1)
-    .then(function(setting) {
-      _setting = setting;
-
-      return Agent
-        .findById(userId);
-    })
-    .then(function(user) {
-      var regEx = _setting.securePassword ? /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/ : /^[a-zA-Z0-9]{6,}$/;
-
-      if (!regEx.test(newPass)) {
-        throw new Error('Invalid password pattern');
-      }
-
-      user.password = newPass;
-      return user
-        .save();
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x942c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x53\x65\x74\x74\x69\x6E\x67","\x55\x73\x65\x72","\x54\x65\x61\x6D","\x4C\x69\x73\x74","\x69\x6E\x64\x65\x78","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x41\x67\x65\x6E\x74\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x61\x64\x64\x51\x75\x65\x75\x65\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x62\x6F\x64\x79","\x53\x49\x50\x2F\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x61\x64\x64\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x76\x6F\x69\x63\x65","\x61\x64\x64\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x63\x68\x61\x74","\x61\x64\x64\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x6D\x61\x69\x6C","\x61\x64\x64\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x66\x61\x78","\x61\x64\x64\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x73\x6D\x73","\x61\x64\x64\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x61\x72\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x51\x75\x65\x75\x65\x73","\x69\x64\x73","\x72\x65\x6D\x6F\x76\x65\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x49\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x68\x65\x63\x6B\x50\x61\x75\x73\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x4F\x6E\x6C\x69\x6E\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x53\x69\x70\x53\x74\x61\x74\x75\x73","\x71\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x56\x6F\x69\x63\x65\x49\x6E\x64\x65\x78","\x72\x6F\x77\x73","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x72\x67\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x43\x68\x61\x74\x49\x6E\x64\x65\x78","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4D\x61\x69\x6C\x49\x6E\x64\x65\x78","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x46\x61\x78\x49\x6E\x64\x65\x78","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x53\x6D\x73\x49\x6E\x64\x65\x78","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x64\x65\x78","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x61\x64\x64\x55\x73\x65\x72\x73","\x73\x65\x63\x75\x72\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x74\x65\x73\x74","\x49\x6E\x76\x61\x6C\x69\x64\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x70\x61\x74\x74\x65\x72\x6E","\x73\x74\x61\x72\x74\x49\x6E\x64\x65\x78","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x69\x73\x4E\x75\x6D\x62\x65\x72","\x6D\x69\x6E\x49\x6E\x74\x65\x72\x6E\x61\x6C","\x61\x6D\x6F\x75\x6E\x74","\x63\x6C\x6F\x6E\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x40","\x73\x70\x6C\x69\x74","\x70\x75\x73\x68","\x4E\x6F\x20\x61\x67\x65\x6E\x74\x73\x20\x61\x6D\x6F\x75\x6E\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x21","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x63\x68\x61\x6E\x67\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x6F\x6C\x64\x50\x61\x73\x73\x77\x6F\x72\x64","\x6E\x65\x77\x50\x61\x73\x73\x77\x6F\x72\x64","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64"];_0x942c[0];var _=require(_0x942c[1]);var sequelize=require(_0x942c[3])[_0x942c[2]];var util=require(_0x942c[4]);var Util=require(_0x942c[5]);var OpenchannelQueue=require(_0x942c[3])[_0x942c[6]];var VoiceQueue=require(_0x942c[3])[_0x942c[7]];var ChatQueue=require(_0x942c[3])[_0x942c[8]];var MailQueue=require(_0x942c[3])[_0x942c[9]];var FaxQueue=require(_0x942c[3])[_0x942c[10]];var SmsQueue=require(_0x942c[3])[_0x942c[11]];var MailRoom=require(_0x942c[3])[_0x942c[12]];var Setting=require(_0x942c[3])[_0x942c[13]];var Agent=require(_0x942c[3])[_0x942c[14]];var User=require(_0x942c[3])[_0x942c[14]];var Team=require(_0x942c[3])[_0x942c[15]];var List=require(_0x942c[3])[_0x942c[16]];exports[_0x942c[17]]= function(_0x3b13x11,_0x3b13x12,_0x3b13x13){switch(_0x3b13x11[_0x942c[26]][_0x942c[32]]){case _0x942c[26]:return User[_0x942c[27]](_0x3b13x11[_0x942c[26]][_0x942c[25]],{attributes:[_0x942c[25]]})[_0x942c[22]](Util[_0x942c[24]](_0x3b13x11[_0x942c[23]]))[_0x942c[22]](function(_0x3b13x15){return _0x3b13x12[_0x942c[21]](200)[_0x942c[20]](_0x3b13x15)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[18]](_0x3b13x14);return handleError(_0x3b13x12,_0x3b13x14)});default:return Agent[_0x942c[31]](_0x942c[30])[_0x942c[29]](Util[_0x942c[28]](_0x3b13x11[_0x942c[23]]))[_0x942c[22]](function(_0x3b13x15){return _0x3b13x12[_0x942c[21]](200)[_0x942c[20]](_0x3b13x15)})[_0x942c[19]](function(_0x3b13x14){return handleError(_0x3b13x12,_0x3b13x14)})}};exports[_0x942c[33]]= function(_0x3b13x11,_0x3b13x12,_0x3b13x13){return Agent[_0x942c[27]](_0x3b13x11[_0x942c[52]][_0x942c[25]],{attributes:[_0x942c[25],_0x942c[37]]})[_0x942c[22]](function(_0x3b13x17){if(!_0x3b13x17){return _0x3b13x12[_0x942c[34]](401)};switch(_0x3b13x11[_0x942c[52]][_0x942c[51]]){case _0x942c[40]:return _0x3b13x17[_0x942c[39]](_0x3b13x11[_0x942c[35]],{interface:util[_0x942c[38]](_0x942c[36],_0x3b13x17[_0x942c[37]]),stateinterface:util[_0x942c[38]](_0x942c[36],_0x3b13x17[_0x942c[37]]),membername:_0x3b13x17[_0x942c[37]],UserId:_0x3b13x17[_0x942c[25]]});case _0x942c[42]:return _0x3b13x17[_0x942c[41]](_0x3b13x11[_0x942c[35]]);case _0x942c[44]:return _0x3b13x17[_0x942c[43]](_0x3b13x11[_0x942c[35]]);case _0x942c[46]:return _0x3b13x17[_0x942c[45]](_0x3b13x11[_0x942c[35]]);case _0x942c[48]:return _0x3b13x17[_0x942c[47]](_0x3b13x11[_0x942c[35]]);case _0x942c[50]:return _0x3b13x17[_0x942c[49]](_0x3b13x11[_0x942c[35]]);default:return null}})[_0x942c[22]](function(_0x3b13x16){return _0x3b13x12[_0x942c[34]](_0x3b13x16?200:401)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[18]](_0x3b13x14)})};exports[_0x942c[53]]= function(_0x3b13x11,_0x3b13x12,_0x3b13x13){return Agent[_0x942c[27]](_0x3b13x11[_0x942c[52]][_0x942c[25]],{attributes:[_0x942c[25]]})[_0x942c[22]](function(_0x3b13x17){if(!_0x3b13x17){return _0x3b13x12[_0x942c[34]](401)};switch(_0x3b13x11[_0x942c[52]][_0x942c[51]]){case _0x942c[40]:return _0x3b13x17[_0x942c[55]](_0x3b13x11[_0x942c[23]][_0x942c[54]]);case _0x942c[42]:return _0x3b13x17[_0x942c[56]](_0x3b13x11[_0x942c[23]][_0x942c[54]]);case _0x942c[44]:return _0x3b13x17[_0x942c[57]](_0x3b13x11[_0x942c[23]][_0x942c[54]]);case _0x942c[48]:return _0x3b13x17[_0x942c[58]](_0x3b13x11[_0x942c[23]][_0x942c[54]]);case _0x942c[46]:return _0x3b13x17[_0x942c[59]](_0x3b13x11[_0x942c[23]][_0x942c[54]]);case _0x942c[50]:return _0x3b13x17[_0x942c[60]](_0x3b13x11[_0x942c[23]][_0x942c[54]]);default:return null}})[_0x942c[22]](function(_0x3b13x16){return _0x3b13x12[_0x942c[34]](_0x3b13x16?200:401)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[18]](_0x3b13x14)})};exports[_0x942c[61]]= function(_0x3b13x11,_0x3b13x12,_0x3b13x13){switch(_0x3b13x11[_0x942c[26]][_0x942c[32]]){case _0x942c[26]:return User[_0x942c[27]](_0x3b13x11[_0x942c[26]][_0x942c[25]],{attributes:[_0x942c[25]]})[_0x942c[22]](Util[_0x942c[24]](_0x3b13x11[_0x942c[23]]))[_0x942c[22]](function(_0x3b13x15){return _0x3b13x12[_0x942c[21]](200)[_0x942c[20]](_0x3b13x15)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return handleError(_0x3b13x12,_0x3b13x14)});default:return Agent[_0x942c[31]](_0x942c[30],{method:[_0x942c[63],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[64],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[65],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[66],_0x3b13x11[_0x942c[23]]]},_0x942c[67])[_0x942c[29]](Util[_0x942c[28]](_0x3b13x11[_0x942c[23]]))[_0x942c[22]](function(_0x3b13x15){return _0x3b13x12[_0x942c[21]](200)[_0x942c[20]](_0x3b13x15)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return handleError(_0x3b13x12,_0x3b13x14)})}};exports[_0x942c[68]]= function(_0x3b13x11,_0x3b13x12,_0x3b13x13){switch(_0x3b13x11[_0x942c[26]][_0x942c[32]]){case _0x942c[26]:var _0x3b13x18=[];return User[_0x942c[27]](_0x3b13x11[_0x942c[26]][_0x942c[25]],{attributes:[_0x942c[25]]})[_0x942c[22]](Util[_0x942c[74]]({},{attributes:[_0x942c[37]],include:[{raw:true,model:User,attributes:[_0x942c[25]]}]}))[_0x942c[22]](function(_0x3b13x16){var _0x3b13x19=_[_0x942c[70]](_0x3b13x16[_0x942c[69]],_0x942c[37]);_0x3b13x16[_0x942c[69]][_0x942c[72]](function(_0x3b13x1a){_0x3b13x18= _[_0x942c[71]](_0x3b13x18,_[_0x942c[70]](_0x3b13x1a.Users,_0x942c[25]))});return User[_0x942c[31]](_0x942c[30],{method:[_0x942c[63],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[64],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[65],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[66],_0x3b13x11[_0x942c[23]]]})[_0x942c[29]](_[_0x942c[73]](Util[_0x942c[28]](_0x3b13x11[_0x942c[23]],{id:{$in:_0x3b13x18}}),{include:[{model:VoiceQueue,where:{name:{$in:_0x3b13x19}},required:false}]}))})[_0x942c[22]](function(_0x3b13x15){return _0x3b13x12[_0x942c[21]](200)[_0x942c[20]](_0x3b13x15)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return handleError(_0x3b13x12,_0x3b13x14)});default:return Agent[_0x942c[31]](_0x942c[30],{method:[_0x942c[63],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[64],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[65],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[66],_0x3b13x11[_0x942c[23]]]},_0x942c[67])[_0x942c[29]](Util[_0x942c[28]](_0x3b13x11[_0x942c[23]]))[_0x942c[22]](function(_0x3b13x15){return _0x3b13x12[_0x942c[21]](200)[_0x942c[20]](_0x3b13x15)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return handleError(_0x3b13x12,_0x3b13x14)})}};exports[_0x942c[75]]= function(_0x3b13x11,_0x3b13x12,_0x3b13x13){switch(_0x3b13x11[_0x942c[26]][_0x942c[32]]){case _0x942c[26]:var _0x3b13x18=[];return User[_0x942c[27]](_0x3b13x11[_0x942c[26]][_0x942c[25]],{attributes:[_0x942c[25]]})[_0x942c[22]](Util[_0x942c[76]]({},{attributes:[_0x942c[25]],include:[{raw:true,model:User,attributes:[_0x942c[25]]}]}))[_0x942c[22]](function(_0x3b13x16){var _0x3b13x1b=_[_0x942c[70]](_0x3b13x16[_0x942c[69]],_0x942c[25]);_0x3b13x16[_0x942c[69]][_0x942c[72]](function(_0x3b13x1a){_0x3b13x18= _[_0x942c[71]](_0x3b13x18,_[_0x942c[70]](_0x3b13x1a.Users,_0x942c[25]))});return User[_0x942c[31]](_0x942c[30],{method:[_0x942c[63],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[64],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[65],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[66],_0x3b13x11[_0x942c[23]]]})[_0x942c[29]](_[_0x942c[73]](Util[_0x942c[28]](_0x3b13x11[_0x942c[23]],{id:{$in:_0x3b13x18}}),{include:[{model:ChatQueue,where:{id:{$in:_0x3b13x1b}},required:false}]}))})[_0x942c[22]](function(_0x3b13x15){return _0x3b13x12[_0x942c[21]](200)[_0x942c[20]](_0x3b13x15)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return handleError(_0x3b13x12,_0x3b13x14)});default:return Agent[_0x942c[31]](_0x942c[30],{method:[_0x942c[63],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[64],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[65],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[66],_0x3b13x11[_0x942c[23]]]},_0x942c[67])[_0x942c[29]](Util[_0x942c[28]](_0x3b13x11[_0x942c[23]]))[_0x942c[22]](function(_0x3b13x15){return _0x3b13x12[_0x942c[21]](200)[_0x942c[20]](_0x3b13x15)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return handleError(_0x3b13x12,_0x3b13x14)})}};exports[_0x942c[77]]= function(_0x3b13x11,_0x3b13x12,_0x3b13x13){switch(_0x3b13x11[_0x942c[26]][_0x942c[32]]){case _0x942c[26]:var _0x3b13x18=[];return User[_0x942c[27]](_0x3b13x11[_0x942c[26]][_0x942c[25]],{attributes:[_0x942c[25]]})[_0x942c[22]](Util[_0x942c[78]]({},{attributes:[_0x942c[25]],include:[{raw:true,model:User,attributes:[_0x942c[25]]}]}))[_0x942c[22]](function(_0x3b13x16){var _0x3b13x1c=_[_0x942c[70]](_0x3b13x16[_0x942c[69]],_0x942c[25]);_0x3b13x16[_0x942c[69]][_0x942c[72]](function(_0x3b13x1a){_0x3b13x18= _[_0x942c[71]](_0x3b13x18,_[_0x942c[70]](_0x3b13x1a.Users,_0x942c[25]))});return User[_0x942c[31]](_0x942c[30],{method:[_0x942c[63],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[64],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[65],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[66],_0x3b13x11[_0x942c[23]]]})[_0x942c[29]](_[_0x942c[73]](Util[_0x942c[28]](_0x3b13x11[_0x942c[23]],{id:{$in:_0x3b13x18}}),{include:[{model:MailQueue,where:{id:{$in:_0x3b13x1c}},required:false}]}))})[_0x942c[22]](function(_0x3b13x15){return _0x3b13x12[_0x942c[21]](200)[_0x942c[20]](_0x3b13x15)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return handleError(_0x3b13x12,_0x3b13x14)});default:return Agent[_0x942c[31]](_0x942c[30],{method:[_0x942c[63],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[64],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[65],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[66],_0x3b13x11[_0x942c[23]]]},_0x942c[67])[_0x942c[29]](Util[_0x942c[28]](_0x3b13x11[_0x942c[23]]))[_0x942c[22]](function(_0x3b13x15){return _0x3b13x12[_0x942c[21]](200)[_0x942c[20]](_0x3b13x15)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return handleError(_0x3b13x12,_0x3b13x14)})}};exports[_0x942c[79]]= function(_0x3b13x11,_0x3b13x12,_0x3b13x13){switch(_0x3b13x11[_0x942c[26]][_0x942c[32]]){case _0x942c[26]:var _0x3b13x18=[];return User[_0x942c[27]](_0x3b13x11[_0x942c[26]][_0x942c[25]],{attributes:[_0x942c[25]]})[_0x942c[22]](Util[_0x942c[80]]({},{attributes:[_0x942c[25]],include:[{raw:true,model:User,attributes:[_0x942c[25]]}]}))[_0x942c[22]](function(_0x3b13x16){var _0x3b13x1d=_[_0x942c[70]](_0x3b13x16[_0x942c[69]],_0x942c[25]);_0x3b13x16[_0x942c[69]][_0x942c[72]](function(_0x3b13x1a){_0x3b13x18= _[_0x942c[71]](_0x3b13x18,_[_0x942c[70]](_0x3b13x1a.Users,_0x942c[25]))});return User[_0x942c[31]](_0x942c[30],{method:[_0x942c[63],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[64],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[65],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[66],_0x3b13x11[_0x942c[23]]]})[_0x942c[29]](_[_0x942c[73]](Util[_0x942c[28]](_0x3b13x11[_0x942c[23]],{id:{$in:_0x3b13x18}}),{include:[{model:FaxQueue,where:{id:{$in:_0x3b13x1d}},required:false}]}))})[_0x942c[22]](function(_0x3b13x15){return _0x3b13x12[_0x942c[21]](200)[_0x942c[20]](_0x3b13x15)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return handleError(_0x3b13x12,_0x3b13x14)});default:return Agent[_0x942c[31]](_0x942c[30],{method:[_0x942c[63],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[64],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[65],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[66],_0x3b13x11[_0x942c[23]]]},_0x942c[67])[_0x942c[29]](Util[_0x942c[28]](_0x3b13x11[_0x942c[23]]))[_0x942c[22]](function(_0x3b13x15){return _0x3b13x12[_0x942c[21]](200)[_0x942c[20]](_0x3b13x15)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return handleError(_0x3b13x12,_0x3b13x14)})}};exports[_0x942c[81]]= function(_0x3b13x11,_0x3b13x12,_0x3b13x13){switch(_0x3b13x11[_0x942c[26]][_0x942c[32]]){case _0x942c[26]:var _0x3b13x18=[];return User[_0x942c[27]](_0x3b13x11[_0x942c[26]][_0x942c[25]],{attributes:[_0x942c[25]]})[_0x942c[22]](Util[_0x942c[82]]({},{attributes:[_0x942c[25]],include:[{raw:true,model:User,attributes:[_0x942c[25]]}]}))[_0x942c[22]](function(_0x3b13x16){var _0x3b13x1e=_[_0x942c[70]](_0x3b13x16[_0x942c[69]],_0x942c[25]);_0x3b13x16[_0x942c[69]][_0x942c[72]](function(_0x3b13x1a){_0x3b13x18= _[_0x942c[71]](_0x3b13x18,_[_0x942c[70]](_0x3b13x1a.Users,_0x942c[25]))});return User[_0x942c[31]](_0x942c[30],{method:[_0x942c[63],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[64],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[65],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[66],_0x3b13x11[_0x942c[23]]]})[_0x942c[29]](_[_0x942c[73]](Util[_0x942c[28]](_0x3b13x11[_0x942c[23]],{id:{$in:_0x3b13x18}}),{include:[{model:SmsQueue,where:{id:{$in:_0x3b13x1e}},required:false}]}))})[_0x942c[22]](function(_0x3b13x15){return _0x3b13x12[_0x942c[21]](200)[_0x942c[20]](_0x3b13x15)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return handleError(_0x3b13x12,_0x3b13x14)});default:return Agent[_0x942c[31]](_0x942c[30],{method:[_0x942c[63],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[64],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[65],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[66],_0x3b13x11[_0x942c[23]]]},_0x942c[67])[_0x942c[29]](Util[_0x942c[28]](_0x3b13x11[_0x942c[23]]))[_0x942c[22]](function(_0x3b13x15){return _0x3b13x12[_0x942c[21]](200)[_0x942c[20]](_0x3b13x15)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return handleError(_0x3b13x12,_0x3b13x14)})}};exports[_0x942c[83]]= function(_0x3b13x11,_0x3b13x12,_0x3b13x13){switch(_0x3b13x11[_0x942c[26]][_0x942c[32]]){case _0x942c[26]:var _0x3b13x18=[];return User[_0x942c[27]](_0x3b13x11[_0x942c[26]][_0x942c[25]],{attributes:[_0x942c[25]]})[_0x942c[22]](Util[_0x942c[84]]({},{attributes:[_0x942c[25]],include:[{raw:true,model:User,attributes:[_0x942c[25]]}]}))[_0x942c[22]](function(_0x3b13x16){var _0x3b13x1f=_[_0x942c[70]](_0x3b13x16[_0x942c[69]],_0x942c[25]);_0x3b13x16[_0x942c[69]][_0x942c[72]](function(_0x3b13x1a){_0x3b13x18= _[_0x942c[71]](_0x3b13x18,_[_0x942c[70]](_0x3b13x1a.Users,_0x942c[25]))});return User[_0x942c[31]](_0x942c[30],{method:[_0x942c[63],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[64],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[65],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[66],_0x3b13x11[_0x942c[23]]]})[_0x942c[29]](_[_0x942c[73]](Util[_0x942c[28]](_0x3b13x11[_0x942c[23]],{id:{$in:_0x3b13x18}}),{include:[{model:OpenchannelQueue,where:{id:{$in:_0x3b13x1f}},required:false}]}))})[_0x942c[22]](function(_0x3b13x15){return _0x3b13x12[_0x942c[21]](200)[_0x942c[20]](_0x3b13x15)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return handleError(_0x3b13x12,_0x3b13x14)});default:return Agent[_0x942c[31]](_0x942c[30],{method:[_0x942c[63],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[64],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[65],_0x3b13x11[_0x942c[23]]]},{method:[_0x942c[66],_0x3b13x11[_0x942c[23]]]},_0x942c[67])[_0x942c[29]](Util[_0x942c[28]](_0x3b13x11[_0x942c[23]]))[_0x942c[22]](function(_0x3b13x15){return _0x3b13x12[_0x942c[21]](200)[_0x942c[20]](_0x3b13x15)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return handleError(_0x3b13x12,_0x3b13x14)})}};exports[_0x942c[85]]= function(_0x3b13x11,_0x3b13x12){return Agent[_0x942c[31]](_0x942c[30])[_0x942c[27]](_0x3b13x11[_0x942c[52]][_0x942c[25]])[_0x942c[22]](function(_0x3b13x17){if(!_0x3b13x17){return _0x3b13x12[_0x942c[34]](404)};return _0x3b13x12[_0x942c[20]](_0x3b13x17)})[_0x942c[19]](function(_0x3b13x14){return handleError(_0x3b13x12,_0x3b13x14)})};exports[_0x942c[86]]= function(_0x3b13x11,_0x3b13x12){return Agent[_0x942c[31]](_0x942c[30])[_0x942c[27]](_0x3b13x11[_0x942c[52]][_0x942c[25]])[_0x942c[22]](function(_0x3b13x17){if(!_0x3b13x17){return _0x3b13x12[_0x942c[34]](404)};return _0x3b13x17[_0x942c[88]]({attributes:[_0x942c[37]]})})[_0x942c[22]](function(_0x3b13x19){return _0x3b13x12[_0x942c[20]]({count:_0x3b13x19[_0x942c[87]],rows:_0x3b13x19})})[_0x942c[19]](function(_0x3b13x14){return handleError(_0x3b13x12,_0x3b13x14)})};exports[_0x942c[89]]= function(_0x3b13x11,_0x3b13x12){return Agent[_0x942c[31]](_0x942c[30])[_0x942c[27]](_0x3b13x11[_0x942c[52]][_0x942c[25]])[_0x942c[22]](function(_0x3b13x17){if(!_0x3b13x17){return _0x3b13x12[_0x942c[34]](404)};return _0x3b13x17[_0x942c[90]]({attributes:[_0x942c[25]]})})[_0x942c[22]](function(_0x3b13x1b){return _0x3b13x12[_0x942c[20]]({count:_0x3b13x1b[_0x942c[87]],rows:_0x3b13x1b})})[_0x942c[19]](function(_0x3b13x14){return handleError(_0x3b13x12,_0x3b13x14)})};exports[_0x942c[91]]= function(_0x3b13x11,_0x3b13x12){return Agent[_0x942c[31]](_0x942c[30])[_0x942c[27]](_0x3b13x11[_0x942c[52]][_0x942c[25]])[_0x942c[22]](function(_0x3b13x17){if(!_0x3b13x17){return _0x3b13x12[_0x942c[34]](404)};return _0x3b13x17[_0x942c[92]]({attributes:[_0x942c[25]]})})[_0x942c[22]](function(_0x3b13x1c){return _0x3b13x12[_0x942c[20]]({count:_0x3b13x1c[_0x942c[87]],rows:_0x3b13x1c})})[_0x942c[19]](function(_0x3b13x14){return handleError(_0x3b13x12,_0x3b13x14)})};exports[_0x942c[93]]= function(_0x3b13x11,_0x3b13x12){return Agent[_0x942c[31]](_0x942c[30])[_0x942c[27]](_0x3b13x11[_0x942c[52]][_0x942c[25]])[_0x942c[22]](function(_0x3b13x17){if(!_0x3b13x17){return _0x3b13x12[_0x942c[34]](404)};return _0x3b13x17[_0x942c[94]]({attributes:[_0x942c[25]]})})[_0x942c[22]](function(_0x3b13x1d){return _0x3b13x12[_0x942c[20]]({count:_0x3b13x1d[_0x942c[87]],rows:_0x3b13x1d})})[_0x942c[19]](function(_0x3b13x14){return handleError(_0x3b13x12,_0x3b13x14)})};exports[_0x942c[95]]= function(_0x3b13x11,_0x3b13x12){return Agent[_0x942c[31]](_0x942c[30])[_0x942c[27]](_0x3b13x11[_0x942c[52]][_0x942c[25]])[_0x942c[22]](function(_0x3b13x17){if(!_0x3b13x17){return _0x3b13x12[_0x942c[34]](404)};return _0x3b13x17[_0x942c[96]]({attributes:[_0x942c[25]]})})[_0x942c[22]](function(_0x3b13x1e){return _0x3b13x12[_0x942c[20]]({count:_0x3b13x1e[_0x942c[87]],rows:_0x3b13x1e})})[_0x942c[19]](function(_0x3b13x14){return handleError(_0x3b13x12,_0x3b13x14)})};exports[_0x942c[97]]= function(_0x3b13x11,_0x3b13x12){return Agent[_0x942c[31]](_0x942c[30])[_0x942c[27]](_0x3b13x11[_0x942c[52]][_0x942c[25]])[_0x942c[22]](function(_0x3b13x17){if(!_0x3b13x17){return _0x3b13x12[_0x942c[34]](404)};return _0x3b13x17[_0x942c[98]]({attributes:[_0x942c[25]]})})[_0x942c[22]](function(_0x3b13x20){return _0x3b13x12[_0x942c[20]]({count:_0x3b13x20[_0x942c[87]],rows:_0x3b13x20})})[_0x942c[19]](function(_0x3b13x14){return handleError(_0x3b13x12,_0x3b13x14)})};exports[_0x942c[99]]= function(_0x3b13x11,_0x3b13x12){var _0x3b13x21;_0x3b13x11[_0x942c[35]][_0x942c[32]]= _0x942c[30];return sequelize[_0x942c[104]](function(_0x3b13x22){return Agent[_0x942c[31]](_0x942c[30])[_0x942c[99]](_0x3b13x11[_0x942c[35]],{transaction:_0x3b13x22})[_0x942c[22]](function(_0x3b13x17){_0x3b13x21= _0x3b13x17;return Team[_0x942c[103]]({where:{defaultEntry:true}})})[_0x942c[22]](function(_0x3b13x24){return _0x3b13x24[_0x942c[102]](_0x3b13x21[_0x942c[25]],{transaction:_0x3b13x22})})[_0x942c[22]](function(){return List[_0x942c[103]]({where:{defaultEntry:true}})})[_0x942c[22]](function(_0x3b13x23){return _0x3b13x23[_0x942c[102]](_0x3b13x21[_0x942c[25]],{transaction:_0x3b13x22})})})[_0x942c[22]](function(){return _0x3b13x12[_0x942c[21]](201)[_0x942c[20]](_0x3b13x21)})[_0x942c[19]](sequelize.UniqueConstraintError,function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return Util[_0x942c[101]][_0x942c[100]](_0x3b13x12,_0x3b13x14)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return handleError(_0x3b13x12,_0x3b13x14)})};exports[_0x942c[105]]= function(_0x3b13x11,_0x3b13x12){var _0x3b13x25;var _0x3b13x26;var _0x3b13x27=[];var _0x3b13x28=String(_0x3b13x11[_0x942c[35]][_0x942c[106]]);return sequelize[_0x942c[104]](function(_0x3b13x22){return Setting[_0x942c[27]](1)[_0x942c[22]](function(_0x3b13x29){_0x3b13x26= _0x3b13x29;var _0x3b13x2a=_0x3b13x26[_0x942c[108]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0x3b13x2a[_0x942c[109]](_0x3b13x28)){throw  new Error(_0x942c[110])};var _0x3b13x2b=0;if(_0x3b13x11[_0x942c[35]][_0x942c[112]](_0x942c[111])&& _[_0x942c[113]](_0x3b13x11[_0x942c[35]][_0x942c[111]])&& _0x3b13x11[_0x942c[35]][_0x942c[111]]>= 0){_0x3b13x2b= _0x3b13x11[_0x942c[35]][_0x942c[111]];delete _0x3b13x11[_0x942c[35]][_0x942c[111]]};var _0x3b13x2c=_0x3b13x11[_0x942c[35]][_0x942c[114]];delete _0x3b13x11[_0x942c[35]][_0x942c[114]];if(_0x3b13x11[_0x942c[35]][_0x942c[115]]){_0x3b13x11[_0x942c[35]][_0x942c[32]]= _0x942c[30];for(var _0x3b13x2d=_0x3b13x2b;_0x3b13x2d< _0x3b13x11[_0x942c[35]][_0x942c[115]]+ _0x3b13x2b;_0x3b13x2d++,_0x3b13x2c++){var _0x3b13x2e=_[_0x942c[116]](_0x3b13x11[_0x942c[35]]);_0x3b13x2e[_0x942c[117]]= _0x3b13x2c;_0x3b13x2e[_0x942c[37]]= _0x3b13x2e[_0x942c[37]]+ _0x3b13x2d;_0x3b13x2e[_0x942c[118]]= _0x3b13x2e[_0x942c[118]]+ _0x3b13x2d;_0x3b13x2e[_0x942c[119]]= _0x3b13x2e[_0x942c[119]][_0x942c[121]](_0x942c[120])[0]+ _0x3b13x2d+ _0x942c[120]+ _0x3b13x2e[_0x942c[119]][_0x942c[121]](_0x942c[120])[1];_0x3b13x27[_0x942c[122]](_0x3b13x2e)}}else {throw  new Error(_0x942c[123])};return Agent[_0x942c[105]](_0x3b13x27,{transaction:_0x3b13x22,individualHooks:true})})[_0x942c[22]](function(_0x3b13x18){_0x3b13x25= _0x3b13x18;return Team[_0x942c[103]]({where:{defaultEntry:true}})})[_0x942c[22]](function(_0x3b13x24){return _0x3b13x24[_0x942c[107]](_[_0x942c[70]](_0x3b13x25,_0x942c[25]),{transaction:_0x3b13x22})})})[_0x942c[22]](function(){return _0x3b13x12[_0x942c[34]](201)})[_0x942c[19]](sequelize.UniqueConstraintError,function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return Util[_0x942c[101]][_0x942c[100]](_0x3b13x12,_0x3b13x14)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return handleError(_0x3b13x12,_0x3b13x14)})};exports[_0x942c[124]]= function(_0x3b13x11,_0x3b13x12){if(_0x3b13x11[_0x942c[35]][_0x942c[25]]){delete _0x3b13x11[_0x942c[35]][_0x942c[25]]};delete _0x3b13x11[_0x942c[35]][_0x942c[32]];delete _0x3b13x11[_0x942c[35]][_0x942c[37]];delete _0x3b13x11[_0x942c[35]][_0x942c[106]];return sequelize[_0x942c[104]](function(_0x3b13x22){return Agent[_0x942c[27]](_0x3b13x11[_0x942c[52]][_0x942c[25]])[_0x942c[22]](function(_0x3b13x17){if(!_0x3b13x17){return _0x3b13x12[_0x942c[34]](404)};var _0x3b13x2f=_[_0x942c[73]](_0x3b13x17,_0x3b13x11[_0x942c[35]]);return _0x3b13x2f[_0x942c[125]]({transaction:_0x3b13x22})})[_0x942c[22]](function(_0x3b13x17){return _0x3b13x12[_0x942c[21]](200)[_0x942c[20]](_0x3b13x17)})})[_0x942c[19]](sequelize.UniqueConstraintError,function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return Util[_0x942c[101]][_0x942c[100]](_0x3b13x12,_0x3b13x14)})[_0x942c[19]](function(_0x3b13x14){console[_0x942c[62]](_0x3b13x14);return handleError(_0x3b13x12,_0x3b13x14)})};exports[_0x942c[126]]= function(_0x3b13x11,_0x3b13x12){var _0x3b13x21;return Agent[_0x942c[27]](_0x3b13x11[_0x942c[52]][_0x942c[25]])[_0x942c[22]](function(_0x3b13x17){_0x3b13x21= _0x3b13x17;if(!_0x3b13x17){return _0x3b13x12[_0x942c[34]](404)};return _0x3b13x17[_0x942c[126]]()})[_0x942c[22]](function(){return _0x3b13x12[_0x942c[34]](204)})[_0x942c[19]](sequelize.ForeignKeyConstraintError,function(_0x3b13x14){return Util[_0x942c[101]][_0x942c[127]](_0x3b13x12,_0x942c[30],_0x3b13x21[_0x942c[37]],_0x3b13x14)})[_0x942c[19]](function(_0x3b13x14){return handleError(_0x3b13x12,_0x3b13x14)})};exports[_0x942c[128]]= function(_0x3b13x11,_0x3b13x12){return Agent[_0x942c[126]]({where:{id:_0x3b13x11[_0x942c[23]][_0x942c[54]]},individualHooks:true})[_0x942c[22]](function(){return _0x3b13x12[_0x942c[34]](204)})[_0x942c[19]](function(_0x3b13x14){return handleError(_0x3b13x12,_0x3b13x14)})};exports[_0x942c[129]]= function(_0x3b13x11,_0x3b13x12,_0x3b13x13){var _0x3b13x26;var _0x3b13x30=_0x3b13x11[_0x942c[26]][_0x942c[25]];var _0x3b13x31=String(_0x3b13x11[_0x942c[35]][_0x942c[130]]);var _0x3b13x32=String(_0x3b13x11[_0x942c[35]][_0x942c[131]]);return Setting[_0x942c[27]](1)[_0x942c[22]](function(_0x3b13x29){_0x3b13x26= _0x3b13x29;return Agent[_0x942c[27]](_0x3b13x30)})[_0x942c[22]](function(_0x3b13x33){var _0x3b13x2a=_0x3b13x26[_0x942c[108]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0x3b13x2a[_0x942c[109]](_0x3b13x32)){throw  new Error(_0x942c[110])};if(_0x3b13x33[_0x942c[132]](_0x3b13x31)){_0x3b13x33[_0x942c[106]]= _0x3b13x32;return _0x3b13x33[_0x942c[125]]()}else {return _0x3b13x12[_0x942c[34]](403)}})[_0x942c[22]](function(){return _0x3b13x12[_0x942c[34]](200)})[_0x942c[19]](function(_0x3b13x14){return handleError(_0x3b13x12,_0x3b13x14)})};exports[_0x942c[133]]= function(_0x3b13x11,_0x3b13x12,_0x3b13x13){var _0x3b13x26;var _0x3b13x30=_0x3b13x11[_0x942c[52]][_0x942c[25]];var _0x3b13x32=String(_0x3b13x11[_0x942c[35]][_0x942c[131]]);return Setting[_0x942c[27]](1)[_0x942c[22]](function(_0x3b13x29){_0x3b13x26= _0x3b13x29;return Agent[_0x942c[27]](_0x3b13x30)})[_0x942c[22]](function(_0x3b13x33){var _0x3b13x2a=_0x3b13x26[_0x942c[108]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0x3b13x2a[_0x942c[109]](_0x3b13x32)){throw  new Error(_0x942c[110])};_0x3b13x33[_0x942c[106]]= _0x3b13x32;return _0x3b13x33[_0x942c[125]]()})[_0x942c[22]](function(){return _0x3b13x12[_0x942c[34]](200)})[_0x942c[19]](function(_0x3b13x14){return handleError(_0x3b13x12,_0x3b13x14)})};function handleError(_0x3b13x12,_0x3b13x14){return _0x3b13x12[_0x942c[21]](500)[_0x942c[20]](_0x3b13x14)}
\ No newline at end of file
diff --git a/server/api/agent/agent.events.js b/server/api/agent/agent.events.js
index 24661dc..964f94c 100644
--- a/server/api/agent/agent.events.js
+++ b/server/api/agent/agent.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Agent = require('../../models').User;
-
-var AgentEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-AgentEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Agent.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    AgentEvents.emit(event + ':' + doc._id, doc);
-    AgentEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = AgentEvents;
+var _0xdb61=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xdb61[0];const EventEmitter=require(_0xdb61[1]);const Agent=require(_0xdb61[3])[_0xdb61[2]];var AgentEvents= new EventEmitter();AgentEvents[_0xdb61[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xdb61[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xdb61[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xdb61[6]};for(var e in events){var event=events[e];Agent[_0xdb61[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe664x8,_0xe664x9,_0xe664xa){AgentEvents[_0xdb61[10]](event+ _0xdb61[8]+ _0xe664x8[_0xdb61[9]],_0xe664x8);AgentEvents[_0xdb61[10]](event,_0xe664x8);_0xe664xa(null)}}module[_0xdb61[11]]= AgentEvents
\ No newline at end of file
diff --git a/server/api/agent/agent.socket.js b/server/api/agent/agent.socket.js
index 657829a..e074d07 100644
--- a/server/api/agent/agent.socket.js
+++ b/server/api/agent/agent.socket.js
@@ -1,51 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const AgentEvents = require('./agent.events');
-const _ = require('lodash');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('agent:' + event, socket);
-
-    AgentEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'agent:save':
-        if (doc.role === 'agent' && (socket.role !== 'agent' || socket.userId == doc.id)) {
-          var myDoc = _.clone(doc.dataValues);
-          if (doc._changed.hasOwnProperty('status')) {
-            myDoc.queueStatus = undefined;
-          } else if (doc._changed.hasOwnProperty('queueStatus')) {
-            myDoc.status = undefined;
-          }
-          socket.emit(event, myDoc);
-        }
-        break;
-      case 'agent:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    AgentEvents.removeListener(event, listener);
-  };
-}
+var _0x918a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x61\x67\x65\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x75\x73\x65\x72\x49\x64","\x69\x64","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x63\x6C\x6F\x6E\x65","\x73\x74\x61\x74\x75\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x5F\x63\x68\x61\x6E\x67\x65\x64","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x73\x61\x76\x65","\x61\x67\x65\x6E\x74\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x918a[0];const AgentEvents=require(_0x918a[1]);const _=require(_0x918a[2]);var events=[_0x918a[3],_0x918a[4]];exports[_0x918a[5]]= function(_0xc057x4){for(var _0xc057x5=0,_0xc057x6=events[_0x918a[6]];_0xc057x5< _0xc057x6;_0xc057x5++){var _0xc057x7=events[_0xc057x5];var _0xc057x8=createListener(_0x918a[7]+ _0xc057x7,_0xc057x4);AgentEvents[_0x918a[8]](_0xc057x7,_0xc057x8);_0xc057x4[_0x918a[8]](_0x918a[9],removeListener(_0xc057x7,_0xc057x8))}};function createListener(_0xc057x7,_0xc057x4){return function(_0xc057xa){switch(_0xc057x7){case _0x918a[21]:if(_0xc057xa[_0x918a[10]]=== _0x918a[11]&& (_0xc057x4[_0x918a[10]]!== _0x918a[11]|| _0xc057x4[_0x918a[12]]== _0xc057xa[_0x918a[13]])){var _0xc057xb=_[_0x918a[15]](_0xc057xa[_0x918a[14]]);if(_0xc057xa[_0x918a[18]][_0x918a[17]](_0x918a[16])){_0xc057xb[_0x918a[19]]= undefined}else {if(_0xc057xa[_0x918a[18]][_0x918a[17]](_0x918a[19])){_0xc057xb[_0x918a[16]]= undefined}};_0xc057x4[_0x918a[20]](_0xc057x7,_0xc057xb)};break;case _0x918a[22]:_0xc057x4[_0x918a[20]](_0xc057x7,_0xc057xa);break;default:}}}function removeListener(_0xc057x7,_0xc057x8){return function(){AgentEvents[_0x918a[23]](_0xc057x7,_0xc057x8)}}
\ No newline at end of file
diff --git a/server/api/agent/index.js b/server/api/agent/index.js
index 0ad78b5..1f292df 100644
--- a/server/api/agent/index.js
+++ b/server/api/agent/index.js
@@ -1,312 +1 @@
-'use strict';
-
-var express = require('express');
-
-var controller = require('./agent.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-/**
- * @api {get} /api/agents/ Get agents' profile.
- *
- * @apiParam (Query) {Number} [offset] Pagination offset.
- * @apiParam (Query) {Number} limit Pagination limit.
- *
- * @apiVersion 0.0.143
- * @apiName GetAgents
- * @apiGroup Agents
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Number} count Number of agents.
- * @apiSuccess {Object[]} rows  Get agents' profile list.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *       "count": 1,
- *       "rows": [{
- *          "id": 1
- *          "name": "john.doe",
- *          "email": "[email-masked]",
- *          "internal": 1001,
- *          "fullname": "John Doe",
- *          "chatCapacity": 0,
- *          "mailCapacity": 0,
- *          "faxCapacity": 0,
- *          "online": false,
- *          "voicePause": false,
- *          "mailPause": false,
- *          "faxPause": false,
- *          "chatPause": false,
- *          "pauseType": "Default Pause",
- *          ...
- *       }]
- *     }
- */
-router.get('/', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'agent']), controller.index);
-router.get('/realtime', auth.isAuthenticated(), auth.hasModule([12], ['admin']), controller.realtimeIndex);
-router.get('/realtime/voice', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.realtimeVoiceIndex);
-router.get('/realtime/mail', auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.realtimeMailIndex);
-router.get('/realtime/chat', auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.realtimeChatIndex);
-router.get('/realtime/fax', auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.realtimeFaxIndex);
-router.get('/realtime/sms', auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.realtimeSmsIndex);
-router.get('/realtime/openchannel', auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.realtimeOpenchannelIndex);
-
-/**
- * @api {get} /api/agents/:id Get agent's profile.
- * @apiParam {Number} id Agent's unique ID.
- * @apiVersion 0.0.143
- * @apiName GetAgent
- * @apiGroup Agents
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Object} Agent's profile.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *        "id": 1
- *        "name": "john.doe"
- *        "email": "[email-masked]",
- *        "internal": 1001,
- *        "fullname": "John Doe"
- *        "chatCapacity": 0,
- *        "mailCapacity": 0,
- *        "faxCapacity": 0,
- *        "online": false,
- *        "voicePause": false,
- *        "mailPause": false,
- *        "faxPause": false,
- *        "chatPause": false,
- *        "pauseType": "Default Pause",
- *        ...
- *     }
- */
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'user', 'agent']), controller.show);
-
-/**
- * @api {post} /api/agents/ Create agent's profile.
- * @apiParam (Body) {String} name                                        Agent's username.
- * @apiParam (Body) {String} fullname                                    Agent's fullname.
- * @apiParam (Body) {String} email                                       Agent's email.
- * @apiParam (Body) {String} context="from-sip"                          Agent's SIP context.
- * @apiParam (Body) {String} password                                    Agent's password.
- * @apiParam (Body) {Number} internal                                    Agent's internal number.
- * @apiParam (Body) {String="tcp", "udp", "tcp,udp"} transport="udp"     Agent's SIP transport.
- * @apiParam (Body) {String="alaw", "ulaw", "gsm"} allow="alaw;ulaw;gsm" Agent's SIP codecs.
- * @apiParam (Body) {Number} internal                                    Agent's internal number.
- * @apiParam (Body) {String} [phone]                                     Agent's phone.
- * @apiParam (Body) {String} [mobile]                                    Agent's mobile phone.
- * @apiParam (Body) {String} [address]                                   Agent's address.
- * @apiParam (Body) {String} [zipcode]                                   Agent's zipcode.
- * @apiParam (Body) {String} [city]                                      Agent's city.
- * @apiParam (Body) {String} [country]                                   Agent's country.
- *
- * @apiVersion 0.0.143
- * @apiName CreateAgent
- * @apiGroup Agents
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 201 Created
- *     {
- *        "id": 1
- *        "name": "john.doe",
- *        "email": "[email-masked]",
- *        "internal": 1001,
- *        "fullname": "John Doe",
- *        ...
- *     }
- */
-router.post('/', auth.isAuthenticated(), auth.hasModule([4], ['admin']), controller.create);
-
-/**
- * @api {post} /api/agents/bulk Bulk Create agent's profile.
- * @apiParam (Body) {String} name                                        Agent's prefix username. It's followed by index
- * @apiParam (Body) {String} fullname                                    Agent's prefix fullname. It's followed by index
- * @apiParam (Body) {String} email                                       Agent's email. The local part is followed by the index
- * @apiParam (Body) {String} password                                    Agent's password. It's the same for all agents
- * @apiParam (Body) {Number} internal                                    Agent's starting internal number.
- * @apiParam (Body) {String} context="from-sip"                          Agent's SIP context. It's the same for all agents
- * @apiParam (Body) {String="tcp", "udp", "tcp,udp"} transport="udp"     Agent's SIP transport. It's the same for all agents
- * @apiParam (Body) {String="alaw", "ulaw", "gsm"} allow="alaw;ulaw;gsm" Agent's SIP codecs. It's the same for all agents
- * @apiParam (Body) {Number} amount=2                                    Number of new agents.
- * @apiParam (Body) {Number} startIndex=0                                Start index.
- *
- * @apiVersion 0.0.143
- * @apiName BulkCreateAgent
- * @apiGroup Agents
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 201 Created
- */
-router.post('/bulk', auth.isAuthenticated(), auth.hasModule([4], ['admin']), controller.bulkCreate);
-
-/**
- * @api {update} /api/agents/:id Update agent's profile.
- *
- * @apiParam (Params) {Number} id Agent's unique ID.
- * @apiParam (Body) {String} fullname                                    Agent's fullname.
- * @apiParam (Body) {String} email                                       Agent's email.
- * @apiParam (Body) {String} context="from-sip"                          Agent's SIP context.
- * @apiParam (Body) {String} password                                    Agent's password.
- * @apiParam (Body) {Number} internal                                    Agent's internal number.
- * @apiParam (Body) {String="tcp", "udp", "tcp,udp"} transport="udp"     Agent's SIP transport.
- * @apiParam (Body) {String="alaw", "ulaw", "gsm"} allow="alaw;ulaw;gsm" Agent's SIP codecs.
- * @apiParam (Body) {Number} internal                                    Agent's internal number.
- * @apiParam (Body) {String} [phone]                                     Agent's phone.
- * @apiParam (Body) {String} [mobile]                                    Agent's mobile phone.
- * @apiParam (Body) {String} [address]                                   Agent's address.
- * @apiParam (Body) {String} [zipcode]                                   Agent's zipcode.
- * @apiParam (Body) {String} [city]                                      Agent's city.
- * @apiParam (Body) {String} [country]                                   Agent's country.
- *
- * @apiVersion 0.0.143
- * @apiName UpdateAgent
- * @apiGroup Agents
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *        "id": 1
- *        "name": "john.doe",
- *        "email": "[email-masked]",
- *        "internal": 1001,
- *        "fullname": "John Doe",
- *        ...
- *     }
- */
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([4], ['admin']), controller.update);
-
-/**
- * @api {delete} /api/agents/ Bulk Delete agents' profile.
- *
- * @apiParam (Query) {Number[]} ids Agents' unique ID array.
- *
- * @apiVersion 0.0.143
- * @apiName BulkDeleteAgents
- * @apiGroup Agents
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/', auth.isAuthenticated(), auth.hasModule([4], ['admin']), controller.bulkDestroy);
-
-/**
- * @api {delete} /api/agents/:id Delete agent's profile.
- *
- * @apiParam {Number} id Agent's unique ID.
- *
- * @apiVersion 0.0.143
- * @apiName DeleteAgent
- * @apiGroup Agents
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([4], ['admin']), controller.destroy);
-
-/**
- * @api {put} /api/agents/password Update agent's password.
- *
- * @apiParam (Body) {String} oldPassword Old agent's password.
- * @apiParam (Body) {String} newPassword New agent's password.
- *
- * @apiVersion 0.0.143
- * @apiName UpdateAgentPassword
- * @apiGroup Agents
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- */
-// router.put('/password', auth.isAuthenticated(), auth.hasModule([4], ['admin']), controller.changePassword);
-
-/**
- * @api {put} /api/agents/:id/password Reset agent's password.
- *
- * @apiParam (Params) {Number} id Agent's unique ID.
- * @apiParam (Body) {String} newPassword New agent's password.
- *
- * @apiPermission admin
- *
- * @apiVersion 0.0.143
- * @apiName ResetAgentPassword
- * @apiGroup Agents
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- */
-// router.put('/:id/password', auth.isAuthenticated(), auth.hasModule([4], ['admin']), controller.resetPassword);
-
-router.get('/:id/voice/queues', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'agent']), controller.showVoiceQueues);
-router.get('/:id/chat/queues', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'agent']), controller.showChatQueues);
-router.get('/:id/mail/queues', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'agent']), controller.showMailQueues);
-router.get('/:id/fax/queues', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'agent']), controller.showFaxQueues);
-router.get('/:id/sms/queues', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'agent']), controller.showSmsQueues);
-router.get('/:id/openchannel/queues', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'agent']), controller.showOpenchannelQueues);
-router.post('/:id/:channel/queues', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'agent']), controller.addQueues);
-router.delete('/:id/:channel/queues', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'agent']), controller.removeQueues);
-
-
-module.exports = router;
+var _0x2e64=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x61\x67\x65\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65","\x72\x65\x61\x6C\x74\x69\x6D\x65\x49\x6E\x64\x65\x78","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x76\x6F\x69\x63\x65","\x72\x65\x61\x6C\x74\x69\x6D\x65\x56\x6F\x69\x63\x65\x49\x6E\x64\x65\x78","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x6D\x61\x69\x6C","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4D\x61\x69\x6C\x49\x6E\x64\x65\x78","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x63\x68\x61\x74","\x72\x65\x61\x6C\x74\x69\x6D\x65\x43\x68\x61\x74\x49\x6E\x64\x65\x78","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x66\x61\x78","\x72\x65\x61\x6C\x74\x69\x6D\x65\x46\x61\x78\x49\x6E\x64\x65\x78","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x73\x6D\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x53\x6D\x73\x49\x6E\x64\x65\x78","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x64\x65\x78","\x2F\x3A\x69\x64","\x75\x73\x65\x72","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x62\x75\x6C\x6B","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x2F\x3A\x69\x64\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x2F\x3A\x69\x64\x2F\x63\x68\x61\x74\x2F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x2F\x3A\x69\x64\x2F\x6D\x61\x69\x6C\x2F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x2F\x3A\x69\x64\x2F\x66\x61\x78\x2F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x2F\x3A\x69\x64\x2F\x73\x6D\x73\x2F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x2F\x3A\x69\x64\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x2F\x3A\x69\x64\x2F\x3A\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x71\x75\x65\x75\x65\x73","\x61\x64\x64\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x51\x75\x65\x75\x65\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x2e64[0];var express=require(_0x2e64[1]);var controller=require(_0x2e64[2]);var auth=require(_0x2e64[3]);var license=require(_0x2e64[4]);var router=express.Router();router[_0x2e64[11]](_0x2e64[5],auth[_0x2e64[6]](),auth[_0x2e64[9]]([4],[_0x2e64[7],_0x2e64[8]]),controller[_0x2e64[10]]);router[_0x2e64[11]](_0x2e64[12],auth[_0x2e64[6]](),auth[_0x2e64[9]]([12],[_0x2e64[7]]),controller[_0x2e64[13]]);router[_0x2e64[11]](_0x2e64[14],auth[_0x2e64[6]](),auth[_0x2e64[9]]([7],[_0x2e64[7]]),controller[_0x2e64[15]]);router[_0x2e64[11]](_0x2e64[16],auth[_0x2e64[6]](),auth[_0x2e64[9]]([9],[_0x2e64[7]]),controller[_0x2e64[17]]);router[_0x2e64[11]](_0x2e64[18],auth[_0x2e64[6]](),auth[_0x2e64[9]]([8],[_0x2e64[7]]),controller[_0x2e64[19]]);router[_0x2e64[11]](_0x2e64[20],auth[_0x2e64[6]](),auth[_0x2e64[9]]([10],[_0x2e64[7]]),controller[_0x2e64[21]]);router[_0x2e64[11]](_0x2e64[22],auth[_0x2e64[6]](),auth[_0x2e64[9]]([11],[_0x2e64[7]]),controller[_0x2e64[23]]);router[_0x2e64[11]](_0x2e64[24],auth[_0x2e64[6]](),auth[_0x2e64[9]]([20],[_0x2e64[7]]),controller[_0x2e64[25]]);router[_0x2e64[11]](_0x2e64[26],auth[_0x2e64[6]](),auth[_0x2e64[9]]([4],[_0x2e64[7],_0x2e64[27],_0x2e64[8]]),controller[_0x2e64[28]]);router[_0x2e64[30]](_0x2e64[5],auth[_0x2e64[6]](),auth[_0x2e64[9]]([4],[_0x2e64[7]]),controller[_0x2e64[29]]);router[_0x2e64[30]](_0x2e64[31],auth[_0x2e64[6]](),auth[_0x2e64[9]]([4],[_0x2e64[7]]),controller[_0x2e64[32]]);router[_0x2e64[34]](_0x2e64[26],auth[_0x2e64[6]](),auth[_0x2e64[9]]([4],[_0x2e64[7]]),controller[_0x2e64[33]]);router[_0x2e64[36]](_0x2e64[5],auth[_0x2e64[6]](),auth[_0x2e64[9]]([4],[_0x2e64[7]]),controller[_0x2e64[35]]);router[_0x2e64[36]](_0x2e64[26],auth[_0x2e64[6]](),auth[_0x2e64[9]]([4],[_0x2e64[7]]),controller[_0x2e64[37]]);router[_0x2e64[11]](_0x2e64[38],auth[_0x2e64[6]](),auth[_0x2e64[9]]([4],[_0x2e64[7],_0x2e64[8]]),controller[_0x2e64[39]]);router[_0x2e64[11]](_0x2e64[40],auth[_0x2e64[6]](),auth[_0x2e64[9]]([4],[_0x2e64[7],_0x2e64[8]]),controller[_0x2e64[41]]);router[_0x2e64[11]](_0x2e64[42],auth[_0x2e64[6]](),auth[_0x2e64[9]]([4],[_0x2e64[7],_0x2e64[8]]),controller[_0x2e64[43]]);router[_0x2e64[11]](_0x2e64[44],auth[_0x2e64[6]](),auth[_0x2e64[9]]([4],[_0x2e64[7],_0x2e64[8]]),controller[_0x2e64[45]]);router[_0x2e64[11]](_0x2e64[46],auth[_0x2e64[6]](),auth[_0x2e64[9]]([4],[_0x2e64[7],_0x2e64[8]]),controller[_0x2e64[47]]);router[_0x2e64[11]](_0x2e64[48],auth[_0x2e64[6]](),auth[_0x2e64[9]]([4],[_0x2e64[7],_0x2e64[8]]),controller[_0x2e64[49]]);router[_0x2e64[30]](_0x2e64[50],auth[_0x2e64[6]](),auth[_0x2e64[9]]([4],[_0x2e64[7],_0x2e64[8]]),controller[_0x2e64[51]]);router[_0x2e64[36]](_0x2e64[50],auth[_0x2e64[6]](),auth[_0x2e64[9]]([4],[_0x2e64[7],_0x2e64[8]]),controller[_0x2e64[52]]);module[_0x2e64[53]]= router
\ No newline at end of file
diff --git a/server/api/ami/ami.ami.js b/server/api/ami/ami.ami.js
index 1282301..7f57fdc 100644
--- a/server/api/ami/ami.ami.js
+++ b/server/api/ami/ami.ami.js
@@ -1,36 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-var Ami = require('../../models').Ami;
-var _ = require('lodash');
-
-var ami = null;
-
-exports.register = function(ami) {
-  this.ami = ami;
-}
-
-exports.action = function(action, cb) {
-  if (this.ami && this.ami.isConnected()) {
-    this.ami.action(action, function(err, res) {
-      if (err) {
-        cb(err);
-      }
-      var data = _.merge(res, action);
-      Ami
-        .create(data)
-        .then(function(ami) {
-          cb(null, ami)
-        })
-        .catch(function(err) {
-          return cb(err);
-        });
-
-    });
-  } else {
-    cb(new Error('Asterisk Manager disconnected..'));
-  }
-}
+var _0x7739=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x41\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x6D\x69","\x61\x63\x74\x69\x6F\x6E","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x41\x73\x74\x65\x72\x69\x73\x6B\x20\x4D\x61\x6E\x61\x67\x65\x72\x20\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x2E\x2E"];_0x7739[0];var Ami=require(_0x7739[2])[_0x7739[1]];var _=require(_0x7739[3]);var ami=null;exports[_0x7739[4]]= function(ami){this[_0x7739[5]]= ami};exports[_0x7739[6]]= function(_0xbe1bx4,_0xbe1bx5){if(this[_0x7739[5]]&& this[_0x7739[5]][_0x7739[7]]()){this[_0x7739[5]][_0x7739[6]](_0xbe1bx4,function(_0xbe1bx6,_0xbe1bx7){if(_0xbe1bx6){_0xbe1bx5(_0xbe1bx6)};var _0xbe1bx8=_[_0x7739[8]](_0xbe1bx7,_0xbe1bx4);Ami[_0x7739[11]](_0xbe1bx8)[_0x7739[10]](function(ami){_0xbe1bx5(null,ami)})[_0x7739[9]](function(_0xbe1bx6){return _0xbe1bx5(_0xbe1bx6)})})}else {_0xbe1bx5( new Error(_0x7739[12]))}}
\ No newline at end of file
diff --git a/server/api/ami/ami.controller.js b/server/api/ami/ami.controller.js
index 9b00f54..fa6c3a0 100644
--- a/server/api/ami/ami.controller.js
+++ b/server/api/ami/ami.controller.js
@@ -1,37 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Ami = require('../../models').Ami;
-var Util = require('../../config/util');
-
-// Get list of amis
-exports.index = function(req, res, next) {
-  return Ami
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new ami in the DB.
-exports.create = function(req, res) {
-
-  req.body.data = JSON.stringify(req.body);
-  req.body.UserId = req.user.id;
-
-  require('./ami.ami').action(req.body, function(err, result) {
-    if (err) {
-      handleError(res, err);
-    } else {
-      return res.status(201).send(result);
-    }
-  });
-
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xc00f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x41\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x64\x61\x74\x61","\x62\x6F\x64\x79","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x55\x73\x65\x72\x49\x64","\x69\x64","\x75\x73\x65\x72","\x61\x63\x74\x69\x6F\x6E","\x2E\x2F\x61\x6D\x69\x2E\x61\x6D\x69"];_0xc00f[0];var _=require(_0xc00f[1]);var Ami=require(_0xc00f[3])[_0xc00f[2]];var Util=require(_0xc00f[4]);exports[_0xc00f[5]]= function(_0x4d09x4,_0x4d09x5,_0x4d09x6){return Ami[_0xc00f[12]](Util[_0xc00f[11]](_0x4d09x4[_0xc00f[10]]))[_0xc00f[9]](function(_0x4d09x8){return _0x4d09x5[_0xc00f[8]](200)[_0xc00f[7]](_0x4d09x8)})[_0xc00f[6]](function(_0x4d09x7){return handleError(_0x4d09x5,_0x4d09x7)})};exports[_0xc00f[13]]= function(_0x4d09x4,_0x4d09x5){_0x4d09x4[_0xc00f[15]][_0xc00f[14]]= JSON[_0xc00f[16]](_0x4d09x4[_0xc00f[15]]);_0x4d09x4[_0xc00f[15]][_0xc00f[17]]= _0x4d09x4[_0xc00f[19]][_0xc00f[18]];require(_0xc00f[21])[_0xc00f[20]](_0x4d09x4[_0xc00f[15]],function(_0x4d09x7,_0x4d09x8){if(_0x4d09x7){handleError(_0x4d09x5,_0x4d09x7)}else {return _0x4d09x5[_0xc00f[8]](201)[_0xc00f[7]](_0x4d09x8)}})};function handleError(_0x4d09x5,_0x4d09x7){return _0x4d09x5[_0xc00f[8]](500)[_0xc00f[7]](_0x4d09x7)}
\ No newline at end of file
diff --git a/server/api/ami/ami.events.js b/server/api/ami/ami.events.js
index 69ed024..42507ca 100644
--- a/server/api/ami/ami.events.js
+++ b/server/api/ami/ami.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Ami = require('../../models').Ami;
-
-var AmiEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-AmiEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Ami.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    AmiEvents.emit(event + ':' + doc._id, doc);
-    AmiEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = AmiEvents;
+var _0xa75f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x41\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xa75f[0];const EventEmitter=require(_0xa75f[1]);const Ami=require(_0xa75f[3])[_0xa75f[2]];var AmiEvents= new EventEmitter();AmiEvents[_0xa75f[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xa75f[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xa75f[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xa75f[6]};for(var e in events){var event=events[e];Ami[_0xa75f[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xd9bbx8,_0xd9bbx9,_0xd9bbxa){AmiEvents[_0xa75f[10]](event+ _0xa75f[8]+ _0xd9bbx8[_0xa75f[9]],_0xd9bbx8);AmiEvents[_0xa75f[10]](event,_0xd9bbx8);_0xd9bbxa(null)}}module[_0xa75f[11]]= AmiEvents
\ No newline at end of file
diff --git a/server/api/ami/ami.socket.js b/server/api/ami/ami.socket.js
index b1ba530..bac06a7 100644
--- a/server/api/ami/ami.socket.js
+++ b/server/api/ami/ami.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const AmiEvents = require('./ami.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('ami:' + event, socket);
-
-    AmiEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    AmiEvents.removeListener(event, listener);
-  };
-}
+var _0x8276=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x61\x6D\x69\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x61\x6D\x69\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x8276[0];const AmiEvents=require(_0x8276[1]);var events=[_0x8276[2],_0x8276[3]];exports[_0x8276[4]]= function(_0xadeex3){for(var _0xadeex4=0,_0xadeex5=events[_0x8276[5]];_0xadeex4< _0xadeex5;_0xadeex4++){var _0xadeex6=events[_0xadeex4];var _0xadeex7=createListener(_0x8276[6]+ _0xadeex6,_0xadeex3);AmiEvents[_0x8276[7]](_0xadeex6,_0xadeex7);_0xadeex3[_0x8276[7]](_0x8276[8],removeListener(_0xadeex6,_0xadeex7))}};function createListener(_0xadeex6,_0xadeex3){return function(_0xadeex9){_0xadeex3[_0x8276[9]](_0xadeex6,_0xadeex9)}}function removeListener(_0xadeex6,_0xadeex7){return function(){AmiEvents[_0x8276[10]](_0xadeex6,_0xadeex7)}}
\ No newline at end of file
diff --git a/server/api/ami/index.js b/server/api/ami/index.js
index ae0b77c..e0edd37 100644
--- a/server/api/ami/index.js
+++ b/server/api/ami/index.js
@@ -1,12 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./ami.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), controller.index);
-router.post('/', auth.isAuthenticated(), controller.create);
-
-module.exports = router;
+var _0x7364=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x61\x6D\x69\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7364[0];var express=require(_0x7364[1]);var controller=require(_0x7364[2]);var auth=require(_0x7364[3]);var router=express.Router();router[_0x7364[7]](_0x7364[4],auth[_0x7364[5]](),controller[_0x7364[6]]);router[_0x7364[9]](_0x7364[4],auth[_0x7364[5]](),controller[_0x7364[8]]);module[_0x7364[10]]= router
\ No newline at end of file
diff --git a/server/api/automation/automation.controller.js b/server/api/automation/automation.controller.js
index 169fca5..4ad0cf6 100644
--- a/server/api/automation/automation.controller.js
+++ b/server/api/automation/automation.controller.js
@@ -1,205 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var Util = require('../../config/util');
-var sequelize = require('../../models').sequelize;
-
-var Automation = require('../../models').Automation;
-var ToolsCondition = require('../../models').ToolsCondition;
-var ToolsAction = require('../../models').ToolsAction;
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  return Automation
-    .scope('all')
-    .findAndCountAll(_.merge(Util.getQuery(req.query), {
-      distinct: true
-    }))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single Automation
-exports.show = function(req, res) {
-  return Automation
-    .scope('all')
-    .findById(req.params.id)
-    .then(function(Automation) {
-      if (!Automation) {
-        return res.sendStatus(404);
-      }
-      return res.send(Automation);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new Automation in the DB.
-exports.create = function(req, res, next) {
-  return Automation
-    .create(req.body, {
-      include: [{
-        model: ToolsCondition,
-        as: 'All'
-      }, {
-        model: ToolsCondition,
-        as: 'Any'
-      }, {
-        model: ToolsAction,
-        as: 'Actions'
-      }]
-    })
-    .then(function() {
-      return res.sendStatus(201);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing Automation in the DB.
-exports.update = function(req, res, next) {
-  var _automation;
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return sequelize.transaction(function(t) {
-      return Automation
-        .findById(req.params.id)
-        .then(function(automation) {
-          if (!automation) {
-            return res.sendStatus(404);
-          }
-          _automation = automation;
-          if (req.body.Any) {
-            return ToolsCondition
-              .destroy({
-                where: {
-                  AutomationAnyId: req.params.id
-                },
-                transaction: t
-              });
-          }
-        })
-        .then(function() {
-          if (req.body.Any && Array.isArray(req.body.Any) && req.body.Any.length) {
-            _.forEach(req.body.Any, function(elem) {
-              elem.AutomationAnyId = req.params.id;
-            });
-            return ToolsCondition
-              .bulkCreate(req.body.Any, {
-                transaction: t
-              });
-          }
-          return;
-        })
-        .then(function() {
-          if (req.body.All) {
-            return ToolsCondition
-              .destroy({
-                where: {
-                  AutomationAllId: req.params.id
-                },
-                transaction: t
-              });
-          }
-        })
-        .then(function() {
-          if (req.body.All && Array.isArray(req.body.All) && req.body.All.length) {
-            _.forEach(req.body.All, function(elem) {
-              elem.AutomationAllId = req.params.id;
-            });
-            return ToolsCondition
-              .bulkCreate(req.body.All, {
-                transaction: t
-              });
-          }
-          return;
-        })
-        .then(function() {
-          if (req.body.Actions) {
-            return ToolsAction
-              .destroy({
-                where: {
-                  AutomationId: req.params.id
-                },
-                transaction: t
-              });
-          }
-        })
-        .then(function() {
-          if (req.body.Actions && Array.isArray(req.body.Actions) && req.body.Actions.length) {
-            _.forEach(req.body.Actions, function(elem) {
-              elem.AutomationId = req.params.id;
-            });
-            return ToolsAction
-              .bulkCreate(req.body.Actions, {
-                transaction: t
-              });
-          }
-          return;
-        })
-        .then(function() {
-          var updated = _.merge(_automation, req.body);
-          return updated
-            .save({
-              transaction: t
-            });
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-
-// Deletes a Automation from the DB.
-exports.destroy = function(req, res) {
-  return Automation
-    .findById(req.params.id)
-    .then(function(Automation) {
-      if (!Automation) {
-        return res.sendStatus(404);
-      }
-      Automation.destroy()
-        .then(function() {
-          return res.sendStatus(204);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-exports.bulkDestroy = function(req, res) {
-  return Automation
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x5626=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x54\x6F\x6F\x6C\x73\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x54\x6F\x6F\x6C\x73\x41\x63\x74\x69\x6F\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x41\x6C\x6C","\x41\x6E\x79","\x41\x63\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x6C\x6F\x67","\x73\x61\x76\x65","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x49\x64","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x41\x6C\x6C\x49\x64","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x41\x6E\x79\x49\x64","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x5626[0];var _=require(_0x5626[1]);var util=require(_0x5626[2]);var Util=require(_0x5626[3]);var sequelize=require(_0x5626[5])[_0x5626[4]];var Automation=require(_0x5626[5])[_0x5626[6]];var ToolsCondition=require(_0x5626[5])[_0x5626[7]];var ToolsAction=require(_0x5626[5])[_0x5626[8]];exports[_0x5626[9]]= function(_0xd0aax8,_0xd0aax9,_0xd0aaxa){return Automation[_0x5626[19]](_0x5626[18])[_0x5626[17]](_[_0x5626[16]](Util[_0x5626[15]](_0xd0aax8[_0x5626[14]]),{distinct:true}))[_0x5626[13]](function(_0xd0aaxc){_0xd0aax9[_0x5626[12]](200)[_0x5626[11]](_0xd0aaxc)})[_0x5626[10]](function(_0xd0aaxb){return handleError(_0xd0aax9,_0xd0aaxb)})};exports[_0x5626[20]]= function(_0xd0aax8,_0xd0aax9){return Automation[_0x5626[19]](_0x5626[18])[_0x5626[24]](_0xd0aax8[_0x5626[23]][_0x5626[22]])[_0x5626[13]](function(Automation){if(!Automation){return _0xd0aax9[_0x5626[21]](404)};return _0xd0aax9[_0x5626[11]](Automation)})[_0x5626[10]](function(_0xd0aaxb){return handleError(_0xd0aax9,_0xd0aaxb)})};exports[_0x5626[25]]= function(_0xd0aax8,_0xd0aax9,_0xd0aaxa){return Automation[_0x5626[25]](_0xd0aax8[_0x5626[26]],{include:[{model:ToolsCondition,as:_0x5626[27]},{model:ToolsCondition,as:_0x5626[28]},{model:ToolsAction,as:_0x5626[29]}]})[_0x5626[13]](function(){return _0xd0aax9[_0x5626[21]](201)})[_0x5626[10]](function(_0xd0aaxb){return handleError(_0xd0aax9,_0xd0aaxb)})};exports[_0x5626[30]]= function(_0xd0aax8,_0xd0aax9,_0xd0aaxa){var _0xd0aaxd;if(_0xd0aax8[_0x5626[26]][_0x5626[22]]){delete _0xd0aax8[_0x5626[26]][_0x5626[22]]};return sequelize[_0x5626[41]](function(_0xd0aaxe){return Automation[_0x5626[24]](_0xd0aax8[_0x5626[23]][_0x5626[22]])[_0x5626[13]](function(_0xd0aax11){if(!_0xd0aax11){return _0xd0aax9[_0x5626[21]](404)};_0xd0aaxd= _0xd0aax11;if(_0xd0aax8[_0x5626[26]][_0x5626[28]]){return ToolsCondition[_0x5626[38]]({where:{AutomationAnyId:_0xd0aax8[_0x5626[23]][_0x5626[22]]},transaction:_0xd0aaxe})}})[_0x5626[13]](function(){if(_0xd0aax8[_0x5626[26]][_0x5626[28]]&& Array[_0x5626[33]](_0xd0aax8[_0x5626[26]].Any)&& _0xd0aax8[_0x5626[26]][_0x5626[28]][_0x5626[34]]){_[_0x5626[36]](_0xd0aax8[_0x5626[26]].Any,function(_0xd0aax10){_0xd0aax10[_0x5626[40]]= _0xd0aax8[_0x5626[23]][_0x5626[22]]});return ToolsCondition[_0x5626[37]](_0xd0aax8[_0x5626[26]].Any,{transaction:_0xd0aaxe})};return})[_0x5626[13]](function(){if(_0xd0aax8[_0x5626[26]][_0x5626[27]]){return ToolsCondition[_0x5626[38]]({where:{AutomationAllId:_0xd0aax8[_0x5626[23]][_0x5626[22]]},transaction:_0xd0aaxe})}})[_0x5626[13]](function(){if(_0xd0aax8[_0x5626[26]][_0x5626[27]]&& Array[_0x5626[33]](_0xd0aax8[_0x5626[26]].All)&& _0xd0aax8[_0x5626[26]][_0x5626[27]][_0x5626[34]]){_[_0x5626[36]](_0xd0aax8[_0x5626[26]].All,function(_0xd0aax10){_0xd0aax10[_0x5626[39]]= _0xd0aax8[_0x5626[23]][_0x5626[22]]});return ToolsCondition[_0x5626[37]](_0xd0aax8[_0x5626[26]].All,{transaction:_0xd0aaxe})};return})[_0x5626[13]](function(){if(_0xd0aax8[_0x5626[26]][_0x5626[29]]){return ToolsAction[_0x5626[38]]({where:{AutomationId:_0xd0aax8[_0x5626[23]][_0x5626[22]]},transaction:_0xd0aaxe})}})[_0x5626[13]](function(){if(_0xd0aax8[_0x5626[26]][_0x5626[29]]&& Array[_0x5626[33]](_0xd0aax8[_0x5626[26]].Actions)&& _0xd0aax8[_0x5626[26]][_0x5626[29]][_0x5626[34]]){_[_0x5626[36]](_0xd0aax8[_0x5626[26]].Actions,function(_0xd0aax10){_0xd0aax10[_0x5626[35]]= _0xd0aax8[_0x5626[23]][_0x5626[22]]});return ToolsAction[_0x5626[37]](_0xd0aax8[_0x5626[26]].Actions,{transaction:_0xd0aaxe})};return})[_0x5626[13]](function(){var _0xd0aaxf=_[_0x5626[16]](_0xd0aaxd,_0xd0aax8[_0x5626[26]]);return _0xd0aaxf[_0x5626[32]]({transaction:_0xd0aaxe})})})[_0x5626[13]](function(){return _0xd0aax9[_0x5626[21]](200)})[_0x5626[10]](function(_0xd0aaxb){console[_0x5626[31]](_0xd0aaxb);return handleError(_0xd0aax9,_0xd0aaxb)})};exports[_0x5626[38]]= function(_0xd0aax8,_0xd0aax9){return Automation[_0x5626[24]](_0xd0aax8[_0x5626[23]][_0x5626[22]])[_0x5626[13]](function(Automation){if(!Automation){return _0xd0aax9[_0x5626[21]](404)};Automation[_0x5626[38]]()[_0x5626[13]](function(){return _0xd0aax9[_0x5626[21]](204)})[_0x5626[10]](function(_0xd0aaxb){return handleError(_0xd0aax9,_0xd0aaxb)})})[_0x5626[10]](function(_0xd0aaxb){return handleError(_0xd0aax9,_0xd0aaxb)})};exports[_0x5626[42]]= function(_0xd0aax8,_0xd0aax9){return Automation[_0x5626[38]]({where:{id:_0xd0aax8[_0x5626[14]][_0x5626[43]]},individualHooks:true})[_0x5626[13]](function(){return _0xd0aax9[_0x5626[21]](204)})[_0x5626[10]](function(_0xd0aaxb){return handleError(_0xd0aax9,_0xd0aaxb)})};function handleError(_0xd0aax9,_0xd0aaxb){return _0xd0aax9[_0x5626[12]](500)[_0x5626[11]](_0xd0aaxb)}
\ No newline at end of file
diff --git a/server/api/automation/automation.events.js b/server/api/automation/automation.events.js
index c0aaffc..0b09f38 100644
--- a/server/api/automation/automation.events.js
+++ b/server/api/automation/automation.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Automation = require('../../models').Automation;
-
-var AutomationEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-AutomationEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Automation.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    AutomationEvents.emit(event + ':' + doc._id, doc);
-    AutomationEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = AutomationEvents;
+var _0xc85e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xc85e[0];const EventEmitter=require(_0xc85e[1]);const Automation=require(_0xc85e[3])[_0xc85e[2]];var AutomationEvents= new EventEmitter();AutomationEvents[_0xc85e[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xc85e[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xc85e[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xc85e[6]};for(var e in events){var event=events[e];Automation[_0xc85e[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x3095x8,_0x3095x9,_0x3095xa){AutomationEvents[_0xc85e[10]](event+ _0xc85e[8]+ _0x3095x8[_0xc85e[9]],_0x3095x8);AutomationEvents[_0xc85e[10]](event,_0x3095x8);_0x3095xa(null)}}module[_0xc85e[11]]= AutomationEvents
\ No newline at end of file
diff --git a/server/api/automation/automation.socket.js b/server/api/automation/automation.socket.js
index c767335..292fdfc 100644
--- a/server/api/automation/automation.socket.js
+++ b/server/api/automation/automation.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const AutomationEvents = require('./automation.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('automation:' + event, socket);
-
-    AutomationEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    AutomationEvents.removeListener(event, listener);
-  };
-}
+var _0x9e7d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x9e7d[0];const AutomationEvents=require(_0x9e7d[1]);var events=[_0x9e7d[2],_0x9e7d[3]];exports[_0x9e7d[4]]= function(_0x526ex3){for(var _0x526ex4=0,_0x526ex5=events[_0x9e7d[5]];_0x526ex4< _0x526ex5;_0x526ex4++){var _0x526ex6=events[_0x526ex4];var _0x526ex7=createListener(_0x9e7d[6]+ _0x526ex6,_0x526ex3);AutomationEvents[_0x9e7d[7]](_0x526ex6,_0x526ex7);_0x526ex3[_0x9e7d[7]](_0x9e7d[8],removeListener(_0x526ex6,_0x526ex7))}};function createListener(_0x526ex6,_0x526ex3){return function(_0x526ex9){_0x526ex3[_0x9e7d[9]](_0x526ex6,_0x526ex9)}}function removeListener(_0x526ex6,_0x526ex7){return function(){AutomationEvents[_0x9e7d[10]](_0x526ex6,_0x526ex7)}}
\ No newline at end of file
diff --git a/server/api/automation/index.js b/server/api/automation/index.js
index 654a7c9..642c41f 100644
--- a/server/api/automation/index.js
+++ b/server/api/automation/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./automation.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.bulkDestroy);
-
-module.exports = router;
+var _0xab72=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xab72[0];var express=require(_0xab72[1]);var controller=require(_0xab72[2]);var auth=require(_0xab72[3]);var router=express.Router();router[_0xab72[9]](_0xab72[4],auth[_0xab72[5]](),auth[_0xab72[7]]([13],[_0xab72[6]]),controller[_0xab72[8]]);router[_0xab72[9]](_0xab72[10],auth[_0xab72[5]](),auth[_0xab72[7]]([13],[_0xab72[6]]),controller[_0xab72[11]]);router[_0xab72[13]](_0xab72[4],auth[_0xab72[5]](),auth[_0xab72[7]]([13],[_0xab72[6]]),controller[_0xab72[12]]);router[_0xab72[15]](_0xab72[10],auth[_0xab72[5]](),auth[_0xab72[7]]([13],[_0xab72[6]]),controller[_0xab72[14]]);router[_0xab72[17]](_0xab72[10],auth[_0xab72[5]](),auth[_0xab72[7]]([13],[_0xab72[6]]),controller[_0xab72[16]]);router[_0xab72[17]](_0xab72[4],auth[_0xab72[5]](),auth[_0xab72[7]]([13],[_0xab72[6]]),controller[_0xab72[18]]);module[_0xab72[19]]= router
\ No newline at end of file
diff --git a/server/api/canned_answer/canned_answer.controller.js b/server/api/canned_answer/canned_answer.controller.js
index dfda955..b19870e 100644
--- a/server/api/canned_answer/canned_answer.controller.js
+++ b/server/api/canned_answer/canned_answer.controller.js
@@ -1,131 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/answers              ->  index
- * POST    /api/answers              ->  create
- * GET     /api/answers/:id          ->  show
- * PUT     /api/answers/:id          ->  update
- * DELETE  /api/answers/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var CannedAnswer = require('../../models').CannedAnswer;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  return CannedAnswer
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Gets a single CannedAnswer from the DB
-exports.show = function(req, res) {
-  return CannedAnswer
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new CannedAnswer in the DB
-exports.create = function(req, res) {
-  CannedAnswer.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing CannedAnswer in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return CannedAnswer
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a CannedAnswer from the DB
-exports.destroy = function(req, res) {
-  return CannedAnswer
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
-
-// Deletes a agent from the DB.
-exports.bulkDestroy = function(req, res) {
-  return CannedAnswer
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
+var _0x18d1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64\x73"];_0x18d1[0];var _=require(_0x18d1[1]);var Util=require(_0x18d1[2]);var CannedAnswer=require(_0x18d1[4])[_0x18d1[3]];function handleError(_0x289ax5,_0x289ax6){_0x289ax6= _0x289ax6|| 500;return function(_0x289ax7){_0x289ax5[_0x18d1[6]](_0x289ax6)[_0x18d1[5]](_0x289ax7)}}function responseWithResult(_0x289ax5,_0x289ax6){_0x289ax6= _0x289ax6|| 200;return function(_0x289ax9){if(_0x289ax9){_0x289ax5[_0x18d1[6]](_0x289ax6)[_0x18d1[7]](_0x289ax9)}}}function handleEntityNotFound(_0x289ax5){return function(_0x289ax9){if(!_0x289ax9){_0x289ax5[_0x18d1[6]](404)[_0x18d1[8]]();return null};return _0x289ax9}}function saveUpdates(_0x289axc){return function(_0x289ax9){return _0x289ax9[_0x18d1[10]](_0x289axc)[_0x18d1[9]](function(_0x289axd){return _0x289axd})}}function removeEntity(_0x289ax5){return function(_0x289ax9){if(_0x289ax9){return _0x289ax9[_0x18d1[11]]()[_0x18d1[9]](function(){_0x289ax5[_0x18d1[6]](204)[_0x18d1[8]]()})}}}exports[_0x18d1[12]]= function(_0x289axf,_0x289ax5,_0x289ax10){return CannedAnswer[_0x18d1[17]](Util[_0x18d1[16]](_0x289axf[_0x18d1[15]]))[_0x18d1[9]](function(_0x289ax11){_0x289ax5[_0x18d1[6]](200)[_0x18d1[5]](_0x289ax11)})[_0x18d1[14]](function(_0x289ax7){console[_0x18d1[13]](_0x289ax7);return handleError(_0x289ax5,_0x289ax7)})};exports[_0x18d1[18]]= function(_0x289axf,_0x289ax5){return CannedAnswer[_0x18d1[21]](_0x289axf[_0x18d1[20]][_0x18d1[19]])[_0x18d1[9]](handleEntityNotFound(_0x289ax5))[_0x18d1[9]](responseWithResult(_0x289ax5))[_0x18d1[14]](handleError(_0x289ax5))};exports[_0x18d1[22]]= function(_0x289axf,_0x289ax5){CannedAnswer[_0x18d1[22]](_0x289axf[_0x18d1[23]])[_0x18d1[9]](responseWithResult(_0x289ax5,201))[_0x18d1[14]](handleError(_0x289ax5))};exports[_0x18d1[24]]= function(_0x289axf,_0x289ax5){if(_0x289axf[_0x18d1[23]][_0x18d1[19]]){delete _0x289axf[_0x18d1[23]][_0x18d1[19]]};return CannedAnswer[_0x18d1[21]](_0x289axf[_0x18d1[20]][_0x18d1[19]])[_0x18d1[9]](handleEntityNotFound(_0x289ax5))[_0x18d1[9]](saveUpdates(_0x289axf[_0x18d1[23]]))[_0x18d1[9]](responseWithResult(_0x289ax5))[_0x18d1[14]](handleError(_0x289ax5))};exports[_0x18d1[11]]= function(_0x289axf,_0x289ax5){return CannedAnswer[_0x18d1[21]](_0x289axf[_0x18d1[20]][_0x18d1[19]])[_0x18d1[9]](handleEntityNotFound(_0x289ax5))[_0x18d1[9]](removeEntity(_0x289ax5))[_0x18d1[14]](handleError(_0x289ax5))};exports[_0x18d1[25]]= function(_0x289axf,_0x289ax5){return CannedAnswer[_0x18d1[11]]({where:{id:_0x289axf[_0x18d1[15]][_0x18d1[27]]},individualHooks:true})[_0x18d1[9]](function(){return _0x289ax5[_0x18d1[26]](204)})[_0x18d1[14]](function(_0x289ax7){return handleError(_0x289ax5,_0x289ax7)})}
\ No newline at end of file
diff --git a/server/api/canned_answer/canned_answer.events.js b/server/api/canned_answer/canned_answer.events.js
index cc2c85e..7cb3698 100644
--- a/server/api/canned_answer/canned_answer.events.js
+++ b/server/api/canned_answer/canned_answer.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const CannedAnswer = require('../../models').CannedAnswer;
-
-var CannedAnswerEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-CannedAnswerEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  CannedAnswer.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    CannedAnswerEvents.emit(event + ':' + doc._id, doc);
-    CannedAnswerEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = CannedAnswerEvents;
+var _0xec68=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xec68[0];const EventEmitter=require(_0xec68[1]);const CannedAnswer=require(_0xec68[3])[_0xec68[2]];var CannedAnswerEvents= new EventEmitter();CannedAnswerEvents[_0xec68[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xec68[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xec68[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xec68[6]};for(var e in events){var event=events[e];CannedAnswer[_0xec68[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xd759x8,_0xd759x9,_0xd759xa){CannedAnswerEvents[_0xec68[10]](event+ _0xec68[8]+ _0xd759x8[_0xec68[9]],_0xd759x8);CannedAnswerEvents[_0xec68[10]](event,_0xd759x8);_0xd759xa(null)}}module[_0xec68[11]]= CannedAnswerEvents
\ No newline at end of file
diff --git a/server/api/canned_answer/canned_answer.socket.js b/server/api/canned_answer/canned_answer.socket.js
index ce308fc..6ea0383 100644
--- a/server/api/canned_answer/canned_answer.socket.js
+++ b/server/api/canned_answer/canned_answer.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const CannedAnswerEvents = require('./canned_answer.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('canned_answer:' + event, socket);
-
-    CannedAnswerEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    CannedAnswerEvents.removeListener(event, listener);
-  };
-}
+var _0xb183=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xb183[0];const CannedAnswerEvents=require(_0xb183[1]);var events=[_0xb183[2],_0xb183[3]];exports[_0xb183[4]]= function(_0xcfefx3){for(var _0xcfefx4=0,_0xcfefx5=events[_0xb183[5]];_0xcfefx4< _0xcfefx5;_0xcfefx4++){var _0xcfefx6=events[_0xcfefx4];var _0xcfefx7=createListener(_0xb183[6]+ _0xcfefx6,_0xcfefx3);CannedAnswerEvents[_0xb183[7]](_0xcfefx6,_0xcfefx7);_0xcfefx3[_0xb183[7]](_0xb183[8],removeListener(_0xcfefx6,_0xcfefx7))}};function createListener(_0xcfefx6,_0xcfefx3){return function(_0xcfefx9){_0xcfefx3[_0xb183[9]](_0xcfefx6,_0xcfefx9)}}function removeListener(_0xcfefx6,_0xcfefx7){return function(){CannedAnswerEvents[_0xb183[10]](_0xcfefx6,_0xcfefx7)}}
\ No newline at end of file
diff --git a/server/api/canned_answer/index.js b/server/api/canned_answer/index.js
index e01ee26..0bdf040 100644
--- a/server/api/canned_answer/index.js
+++ b/server/api/canned_answer/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./canned_answer.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([13], ['admin', 'agent']), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xa22b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xa22b[0];var express=require(_0xa22b[1]);var auth=require(_0xa22b[2]);var controller=require(_0xa22b[3]);var router=express.Router();router[_0xa22b[10]](_0xa22b[4],auth[_0xa22b[5]](),auth[_0xa22b[8]]([13],[_0xa22b[6],_0xa22b[7]]),controller[_0xa22b[9]]);router[_0xa22b[10]](_0xa22b[11],auth[_0xa22b[5]](),auth[_0xa22b[8]]([13],[_0xa22b[6]]),controller[_0xa22b[12]]);router[_0xa22b[14]](_0xa22b[4],auth[_0xa22b[5]](),auth[_0xa22b[8]]([13],[_0xa22b[6]]),controller[_0xa22b[13]]);router[_0xa22b[16]](_0xa22b[11],auth[_0xa22b[5]](),auth[_0xa22b[8]]([13],[_0xa22b[6]]),controller[_0xa22b[15]]);router[_0xa22b[18]](_0xa22b[4],auth[_0xa22b[5]](),auth[_0xa22b[8]]([13],[_0xa22b[6]]),controller[_0xa22b[17]]);router[_0xa22b[18]](_0xa22b[11],auth[_0xa22b[5]](),auth[_0xa22b[8]]([13],[_0xa22b[6]]),controller[_0xa22b[19]]);module[_0xa22b[20]]= router
\ No newline at end of file
diff --git a/server/api/chanspy/chanspy.controller.js b/server/api/chanspy/chanspy.controller.js
index e3dafb3..ecafe48 100644
--- a/server/api/chanspy/chanspy.controller.js
+++ b/server/api/chanspy/chanspy.controller.js
@@ -1,107 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var ChanSpy = require('../../models').ChanSpy;
-var Util = require('../../config/util');
-
-// Get list of chanspy
-exports.index = function(req, res, next) {
-  return ChanSpy
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Get a single chanspy
-exports.show = function(req, res) {
-  return ChanSpy
-    .findById(req.params.id)
-    .then(function(chanspy) {
-      if (!chanspy) {
-        return res.sendStatus(404);
-      }
-      return res.send(chanspy);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new chanspy in the DB.
-exports.create = function(req, res) {
-  return ChanSpy
-    .create(req.body)
-    .then(function(chanspy) {
-      return res.status(201).send(chanspy);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing chanspy in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return ChanSpy
-    .findById(req.params.id)
-    .then(function(chanspy) {
-      if (!chanspy) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(chanspy, req.body);
-      return updated
-        .save();
-    })
-    .then(function(chanspy) {
-      return res.status(200).send(chanspy);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a chanspy from the DB.
-exports.destroy = function(req, res) {
-  return ChanSpy
-    .findById(req.params.id)
-    .then(function(chanspy) {
-      if (!chanspy) {
-        return res.sendStatus(404);
-      }
-      return chanspy.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.bulkDestroy = function(req, res) {
-  return ChanSpy
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x6a44=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x43\x68\x61\x6E\x53\x70\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x6a44[0];var _=require(_0x6a44[1]);var ChanSpy=require(_0x6a44[3])[_0x6a44[2]];var Util=require(_0x6a44[4]);exports[_0x6a44[5]]= function(_0x47a6x4,_0x47a6x5,_0x47a6x6){return ChanSpy[_0x6a44[13]](Util[_0x6a44[12]](_0x47a6x4[_0x6a44[11]]))[_0x6a44[10]](function(_0x47a6x8){_0x47a6x5[_0x6a44[9]](200)[_0x6a44[8]](_0x47a6x8)})[_0x6a44[7]](function(_0x47a6x7){console[_0x6a44[6]](_0x47a6x7);return handleError(_0x47a6x5,_0x47a6x7)})};exports[_0x6a44[14]]= function(_0x47a6x4,_0x47a6x5){return ChanSpy[_0x6a44[18]](_0x47a6x4[_0x6a44[17]][_0x6a44[16]])[_0x6a44[10]](function(_0x47a6x9){if(!_0x47a6x9){return _0x47a6x5[_0x6a44[15]](404)};return _0x47a6x5[_0x6a44[8]](_0x47a6x9)})[_0x6a44[7]](function(_0x47a6x7){return handleError(_0x47a6x5,_0x47a6x7)})};exports[_0x6a44[19]]= function(_0x47a6x4,_0x47a6x5){return ChanSpy[_0x6a44[19]](_0x47a6x4[_0x6a44[20]])[_0x6a44[10]](function(_0x47a6x9){return _0x47a6x5[_0x6a44[9]](201)[_0x6a44[8]](_0x47a6x9)})[_0x6a44[7]](function(_0x47a6x7){return handleError(_0x47a6x5,_0x47a6x7)})};exports[_0x6a44[21]]= function(_0x47a6x4,_0x47a6x5){if(_0x47a6x4[_0x6a44[20]][_0x6a44[16]]){delete _0x47a6x4[_0x6a44[20]][_0x6a44[16]]};return ChanSpy[_0x6a44[18]](_0x47a6x4[_0x6a44[17]][_0x6a44[16]])[_0x6a44[10]](function(_0x47a6x9){if(!_0x47a6x9){return _0x47a6x5[_0x6a44[15]](404)};var _0x47a6xa=_[_0x6a44[22]](_0x47a6x9,_0x47a6x4[_0x6a44[20]]);return _0x47a6xa[_0x6a44[23]]()})[_0x6a44[10]](function(_0x47a6x9){return _0x47a6x5[_0x6a44[9]](200)[_0x6a44[8]](_0x47a6x9)})[_0x6a44[7]](function(_0x47a6x7){return handleError(_0x47a6x5,_0x47a6x7)})};exports[_0x6a44[24]]= function(_0x47a6x4,_0x47a6x5){return ChanSpy[_0x6a44[18]](_0x47a6x4[_0x6a44[17]][_0x6a44[16]])[_0x6a44[10]](function(_0x47a6x9){if(!_0x47a6x9){return _0x47a6x5[_0x6a44[15]](404)};return _0x47a6x9[_0x6a44[24]]()})[_0x6a44[10]](function(){return _0x47a6x5[_0x6a44[15]](204)})[_0x6a44[7]](function(_0x47a6x7){return handleError(_0x47a6x5,_0x47a6x7)})};exports[_0x6a44[25]]= function(_0x47a6x4,_0x47a6x5){return ChanSpy[_0x6a44[24]]({where:{id:_0x47a6x4[_0x6a44[11]][_0x6a44[26]]},individualHooks:true})[_0x6a44[10]](function(){return _0x47a6x5[_0x6a44[15]](204)})[_0x6a44[7]](function(_0x47a6x7){return handleError(_0x47a6x5,_0x47a6x7)})};function handleError(_0x47a6x5,_0x47a6x7){return _0x47a6x5[_0x6a44[9]](500)[_0x6a44[8]](_0x47a6x7)}
\ No newline at end of file
diff --git a/server/api/chanspy/chanspy.events.js b/server/api/chanspy/chanspy.events.js
index 6310918..75c0340 100644
--- a/server/api/chanspy/chanspy.events.js
+++ b/server/api/chanspy/chanspy.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ChanSpy = require('../../models').ChanSpy;
-
-var ChanSpyEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ChanSpyEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ChanSpy.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ChanSpyEvents.emit(event + ':' + doc._id, doc);
-    ChanSpyEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ChanSpyEvents;
+var _0xaa78=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x6E\x53\x70\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xaa78[0];const EventEmitter=require(_0xaa78[1]);const ChanSpy=require(_0xaa78[3])[_0xaa78[2]];var ChanSpyEvents= new EventEmitter();ChanSpyEvents[_0xaa78[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xaa78[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xaa78[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xaa78[6]};for(var e in events){var event=events[e];ChanSpy[_0xaa78[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xd7dbx8,_0xd7dbx9,_0xd7dbxa){ChanSpyEvents[_0xaa78[10]](event+ _0xaa78[8]+ _0xd7dbx8[_0xaa78[9]],_0xd7dbx8);ChanSpyEvents[_0xaa78[10]](event,_0xd7dbx8);_0xd7dbxa(null)}}module[_0xaa78[11]]= ChanSpyEvents
\ No newline at end of file
diff --git a/server/api/chanspy/chanspy.socket.js b/server/api/chanspy/chanspy.socket.js
index c0e03c0..61a011c 100644
--- a/server/api/chanspy/chanspy.socket.js
+++ b/server/api/chanspy/chanspy.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const ChanSpyEvents = require('./chanspy.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('chanspy:' + event, socket);
-
-    ChanSpyEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ChanSpyEvents.removeListener(event, listener);
-  };
-}
+var _0x299c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x6E\x73\x70\x79\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x6E\x73\x70\x79\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x299c[0];const ChanSpyEvents=require(_0x299c[1]);var events=[_0x299c[2],_0x299c[3]];exports[_0x299c[4]]= function(_0x89c7x3){for(var _0x89c7x4=0,_0x89c7x5=events[_0x299c[5]];_0x89c7x4< _0x89c7x5;_0x89c7x4++){var _0x89c7x6=events[_0x89c7x4];var _0x89c7x7=createListener(_0x299c[6]+ _0x89c7x6,_0x89c7x3);ChanSpyEvents[_0x299c[7]](_0x89c7x6,_0x89c7x7);_0x89c7x3[_0x299c[7]](_0x299c[8],removeListener(_0x89c7x6,_0x89c7x7))}};function createListener(_0x89c7x6,_0x89c7x3){return function(_0x89c7x9){_0x89c7x3[_0x299c[9]](_0x89c7x6,_0x89c7x9)}}function removeListener(_0x89c7x6,_0x89c7x7){return function(){ChanSpyEvents[_0x299c[10]](_0x89c7x6,_0x89c7x7)}}
\ No newline at end of file
diff --git a/server/api/chanspy/index.js b/server/api/chanspy/index.js
index 597a004..b790d54 100644
--- a/server/api/chanspy/index.js
+++ b/server/api/chanspy/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./chanspy.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.update);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xe621=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x6E\x73\x70\x79\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xe621[0];var express=require(_0xe621[1]);var controller=require(_0xe621[2]);var auth=require(_0xe621[3]);var router=express.Router();router[_0xe621[9]](_0xe621[4],auth[_0xe621[5]](),auth[_0xe621[7]]([7],[_0xe621[6]]),controller[_0xe621[8]]);router[_0xe621[9]](_0xe621[10],auth[_0xe621[5]](),auth[_0xe621[7]]([7],[_0xe621[6]]),controller[_0xe621[11]]);router[_0xe621[13]](_0xe621[4],auth[_0xe621[5]](),auth[_0xe621[7]]([7],[_0xe621[6]]),controller[_0xe621[12]]);router[_0xe621[15]](_0xe621[10],auth[_0xe621[5]](),auth[_0xe621[7]]([7],[_0xe621[6]]),controller[_0xe621[14]]);router[_0xe621[17]](_0xe621[4],auth[_0xe621[5]](),auth[_0xe621[7]]([7],[_0xe621[6]]),controller[_0xe621[16]]);router[_0xe621[17]](_0xe621[10],auth[_0xe621[5]](),auth[_0xe621[7]]([7],[_0xe621[6]]),controller[_0xe621[18]]);module[_0xe621[19]]= router
\ No newline at end of file
diff --git a/server/api/chat_application/chat_application.controller.js b/server/api/chat_application/chat_application.controller.js
index cc166a1..38d258a 100644
--- a/server/api/chat_application/chat_application.controller.js
+++ b/server/api/chat_application/chat_application.controller.js
@@ -1,97 +1 @@
-'use strict';
-var _ = require('lodash');
-var ChatApplication = require('../../models').ChatApplication;
-// Get list of chat_applications
-exports.index = function(req, res) {
-  return ChatApplication
-    .findAll({
-      where: req.query,
-      order: 'priority',
-      include: [{
-        all: true
-      }]
-    })
-    .then(function(chat_applications) {
-      return res.status(200).send(chat_applications);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Get a single chat_application
-exports.show = function(req, res) {
-  return ChatApplication
-    .findById(req.params.id)
-    .then(function(chat_application) {
-      if (!chat_application) {
-        return res.sendStatus(404);
-      }
-      return res.send(chat_application);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Creates a new chat_application in the DB.
-exports.create = function(req, res, next) {
-  return ChatApplication.max('priority', {
-      where: {
-        ChatWebsiteId: req.body.ChatWebsiteId
-      }
-    }).then(function(max) {
-      // SET PRIORITY
-      req.body.priority = max ? ++max : 1;
-      return ChatApplication
-        .create(req.body);
-    })
-    .then(function(mailApplication) {
-      return res.status(201).send(mailApplication);
-    })
-    .catch(function(err) {
-      next(err);
-    });
-};
-// Updates an existing chat_application in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return ChatApplication
-    .findById(req.params.id)
-    .then(function(chat_application) {
-      if (!chat_application) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(chat_application, req.body);
-      return updated
-        .save();
-    })
-    .then(function(chat_application) {
-      return res.status(200).send(chat_application);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Deletes a chat_application from the DB.
-exports.destroy = function(req, res) {
-  return ChatApplication
-    .findById(req.params.id)
-    .then(function(chat_application) {
-      if (!chat_application) {
-        return res.sendStatus(404);
-      }
-      return chat_application
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xfa56=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x6D\x61\x78","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xfa56[0];var _=require(_0xfa56[1]);var ChatApplication=require(_0xfa56[3])[_0xfa56[2]];exports[_0xfa56[4]]= function(_0xb7d4x3,_0xb7d4x4){return ChatApplication[_0xfa56[11]]({where:_0xb7d4x3[_0xfa56[9]],order:_0xfa56[10],include:[{all:true}]})[_0xfa56[8]](function(_0xb7d4x6){return _0xb7d4x4[_0xfa56[7]](200)[_0xfa56[6]](_0xb7d4x6)})[_0xfa56[5]](function(_0xb7d4x5){return handleError(_0xb7d4x4,_0xb7d4x5)})};exports[_0xfa56[12]]= function(_0xb7d4x3,_0xb7d4x4){return ChatApplication[_0xfa56[16]](_0xb7d4x3[_0xfa56[15]][_0xfa56[14]])[_0xfa56[8]](function(_0xb7d4x7){if(!_0xb7d4x7){return _0xb7d4x4[_0xfa56[13]](404)};return _0xb7d4x4[_0xfa56[6]](_0xb7d4x7)})[_0xfa56[5]](function(_0xb7d4x5){return handleError(_0xb7d4x4,_0xb7d4x5)})};exports[_0xfa56[17]]= function(_0xb7d4x3,_0xb7d4x4,_0xb7d4x8){return ChatApplication[_0xfa56[20]](_0xfa56[10],{where:{ChatWebsiteId:_0xb7d4x3[_0xfa56[18]][_0xfa56[19]]}})[_0xfa56[8]](function(_0xb7d4xa){_0xb7d4x3[_0xfa56[18]][_0xfa56[10]]= _0xb7d4xa?++_0xb7d4xa:1;return ChatApplication[_0xfa56[17]](_0xb7d4x3[_0xfa56[18]])})[_0xfa56[8]](function(_0xb7d4x9){return _0xb7d4x4[_0xfa56[7]](201)[_0xfa56[6]](_0xb7d4x9)})[_0xfa56[5]](function(_0xb7d4x5){_0xb7d4x8(_0xb7d4x5)})};exports[_0xfa56[21]]= function(_0xb7d4x3,_0xb7d4x4){if(_0xb7d4x3[_0xfa56[18]][_0xfa56[14]]){delete _0xb7d4x3[_0xfa56[18]][_0xfa56[14]]};return ChatApplication[_0xfa56[16]](_0xb7d4x3[_0xfa56[15]][_0xfa56[14]])[_0xfa56[8]](function(_0xb7d4x7){if(!_0xb7d4x7){return _0xb7d4x4[_0xfa56[13]](404)};var _0xb7d4xb=_[_0xfa56[22]](_0xb7d4x7,_0xb7d4x3[_0xfa56[18]]);return _0xb7d4xb[_0xfa56[23]]()})[_0xfa56[8]](function(_0xb7d4x7){return _0xb7d4x4[_0xfa56[7]](200)[_0xfa56[6]](_0xb7d4x7)})[_0xfa56[5]](function(_0xb7d4x5){return handleError(_0xb7d4x4,_0xb7d4x5)})};exports[_0xfa56[24]]= function(_0xb7d4x3,_0xb7d4x4){return ChatApplication[_0xfa56[16]](_0xb7d4x3[_0xfa56[15]][_0xfa56[14]])[_0xfa56[8]](function(_0xb7d4x7){if(!_0xb7d4x7){return _0xb7d4x4[_0xfa56[13]](404)};return _0xb7d4x7[_0xfa56[24]]()})[_0xfa56[8]](function(){return _0xb7d4x4[_0xfa56[13]](204)})[_0xfa56[5]](function(_0xb7d4x5){return handleError(_0xb7d4x4,_0xb7d4x5)})};function handleError(_0xb7d4x4,_0xb7d4x5){return _0xb7d4x4[_0xfa56[7]](500)[_0xfa56[6]](_0xb7d4x5)}
\ No newline at end of file
diff --git a/server/api/chat_application/chat_application.events.js b/server/api/chat_application/chat_application.events.js
index 25f766a..84283f8 100644
--- a/server/api/chat_application/chat_application.events.js
+++ b/server/api/chat_application/chat_application.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ChatApplication = require('../../models').ChatApplication;
-
-var ChatApplicationEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ChatApplicationEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ChatApplication.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ChatApplicationEvents.emit(event + ':' + doc._id, doc);
-    ChatApplicationEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ChatApplicationEvents;
+var _0xbc2c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xbc2c[0];const EventEmitter=require(_0xbc2c[1]);const ChatApplication=require(_0xbc2c[3])[_0xbc2c[2]];var ChatApplicationEvents= new EventEmitter();ChatApplicationEvents[_0xbc2c[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xbc2c[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xbc2c[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xbc2c[6]};for(var e in events){var event=events[e];ChatApplication[_0xbc2c[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xaee8x8,_0xaee8x9,_0xaee8xa){ChatApplicationEvents[_0xbc2c[10]](event+ _0xbc2c[8]+ _0xaee8x8[_0xbc2c[9]],_0xaee8x8);ChatApplicationEvents[_0xbc2c[10]](event,_0xaee8x8);_0xaee8xa(null)}}module[_0xbc2c[11]]= ChatApplicationEvents
\ No newline at end of file
diff --git a/server/api/chat_application/chat_application.socket.js b/server/api/chat_application/chat_application.socket.js
index 1e82b2e..5799553 100644
--- a/server/api/chat_application/chat_application.socket.js
+++ b/server/api/chat_application/chat_application.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const ChatApplicationEvents = require('./chat_application.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('chat_application:' + event, socket);
-
-    ChatApplicationEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ChatApplicationEvents.removeListener(event, listener);
-  };
-}
+var _0xdba9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xdba9[0];const ChatApplicationEvents=require(_0xdba9[1]);var events=[_0xdba9[2],_0xdba9[3]];exports[_0xdba9[4]]= function(_0x36b0x3){for(var _0x36b0x4=0,_0x36b0x5=events[_0xdba9[5]];_0x36b0x4< _0x36b0x5;_0x36b0x4++){var _0x36b0x6=events[_0x36b0x4];var _0x36b0x7=createListener(_0xdba9[6]+ _0x36b0x6,_0x36b0x3);ChatApplicationEvents[_0xdba9[7]](_0x36b0x6,_0x36b0x7);_0x36b0x3[_0xdba9[7]](_0xdba9[8],removeListener(_0x36b0x6,_0x36b0x7))}};function createListener(_0x36b0x6,_0x36b0x3){return function(_0x36b0x9){_0x36b0x3[_0xdba9[9]](_0x36b0x6,_0x36b0x9)}}function removeListener(_0x36b0x6,_0x36b0x7){return function(){ChatApplicationEvents[_0xdba9[10]](_0x36b0x6,_0x36b0x7)}}
\ No newline at end of file
diff --git a/server/api/chat_application/index.js b/server/api/chat_application/index.js
index d72780d..9b3324c 100644
--- a/server/api/chat_application/index.js
+++ b/server/api/chat_application/index.js
@@ -1,17 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./chat_application.controller');
-var license = require('../../config/license/license.service');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.index);
-router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.show);
-router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.create);
-router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update);
-router.patch('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update);
-router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xc59c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc59c[0];var express=require(_0xc59c[1]);var controller=require(_0xc59c[2]);var license=require(_0xc59c[3]);var auth=require(_0xc59c[4]);var router=express.Router();router[_0xc59c[12]](_0xc59c[5],license[_0xc59c[6]](),license[_0xc59c[7]](),auth[_0xc59c[8]](),auth[_0xc59c[10]]([8],[_0xc59c[9]]),controller[_0xc59c[11]]);router[_0xc59c[12]](_0xc59c[13],license[_0xc59c[6]](),license[_0xc59c[7]](),auth[_0xc59c[8]](),auth[_0xc59c[10]]([8],[_0xc59c[9]]),controller[_0xc59c[14]]);router[_0xc59c[16]](_0xc59c[5],license[_0xc59c[6]](),license[_0xc59c[7]](),auth[_0xc59c[8]](),auth[_0xc59c[10]]([8],[_0xc59c[9]]),controller[_0xc59c[15]]);router[_0xc59c[18]](_0xc59c[13],license[_0xc59c[6]](),license[_0xc59c[7]](),auth[_0xc59c[8]](),auth[_0xc59c[10]]([8],[_0xc59c[9]]),controller[_0xc59c[17]]);router[_0xc59c[19]](_0xc59c[13],license[_0xc59c[6]](),license[_0xc59c[7]](),auth[_0xc59c[8]](),auth[_0xc59c[10]]([8],[_0xc59c[9]]),controller[_0xc59c[17]]);router[_0xc59c[21]](_0xc59c[13],license[_0xc59c[6]](),license[_0xc59c[7]](),auth[_0xc59c[8]](),auth[_0xc59c[10]]([8],[_0xc59c[9]]),controller[_0xc59c[20]]);module[_0xc59c[22]]= router
\ No newline at end of file
diff --git a/server/api/chat_disposition/chat_disposition.controller.js b/server/api/chat_disposition/chat_disposition.controller.js
index 4902da1..e054d83 100644
--- a/server/api/chat_disposition/chat_disposition.controller.js
+++ b/server/api/chat_disposition/chat_disposition.controller.js
@@ -1,111 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/chat/dispositions              ->  index
- * POST    /api/chat/dispositions              ->  create
- * GET     /api/chat/dispositions/:id          ->  show
- * PUT     /api/chat/dispositions/:id          ->  update
- * DELETE  /api/chat/dispositions/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-
-var ChatDisposition = require('../../models').ChatDisposition;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function responseWithoutResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function() {
-    res.sendStatus(statusCode);
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of ChatDispositions
-exports.index = function(req, res) {
-  ChatDisposition.findAndCountAll()
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single ChatDisposition from the DB
-exports.show = function(req, res) {
-  ChatDisposition.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new ChatDisposition in the DB
-exports.create = function(req, res) {
-  ChatDisposition.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing ChatDisposition in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  ChatDisposition.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a ChatDisposition from the DB
-exports.destroy = function(req, res) {
-  ChatDisposition.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
+var _0x6dc2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0x6dc2[0];var _=require(_0x6dc2[1]);var ChatDisposition=require(_0x6dc2[3])[_0x6dc2[2]];function handleError(_0x284dx4,_0x284dx5){_0x284dx5= _0x284dx5|| 500;return function(_0x284dx6){_0x284dx4[_0x6dc2[5]](_0x284dx5)[_0x6dc2[4]](_0x284dx6)}}function responseWithResult(_0x284dx4,_0x284dx5){_0x284dx5= _0x284dx5|| 200;return function(_0x284dx8){if(_0x284dx8){_0x284dx4[_0x6dc2[5]](_0x284dx5)[_0x6dc2[6]](_0x284dx8)}}}function responseWithoutResult(_0x284dx4,_0x284dx5){_0x284dx5= _0x284dx5|| 200;return function(){_0x284dx4[_0x6dc2[7]](_0x284dx5)}}function handleEntityNotFound(_0x284dx4){return function(_0x284dx8){if(!_0x284dx8){_0x284dx4[_0x6dc2[5]](404)[_0x6dc2[8]]();return null};return _0x284dx8}}function saveUpdates(_0x284dxc){return function(_0x284dx8){return _0x284dx8[_0x6dc2[10]](_0x284dxc)[_0x6dc2[9]](function(_0x284dxd){return _0x284dxd})}}function removeEntity(_0x284dx4){return function(_0x284dx8){if(_0x284dx8){return _0x284dx8[_0x6dc2[11]]()[_0x6dc2[9]](function(){_0x284dx4[_0x6dc2[5]](204)[_0x6dc2[8]]()})}}}exports[_0x6dc2[12]]= function(_0x284dxf,_0x284dx4){ChatDisposition[_0x6dc2[14]]()[_0x6dc2[9]](responseWithResult(_0x284dx4))[_0x6dc2[13]](handleError(_0x284dx4))};exports[_0x6dc2[15]]= function(_0x284dxf,_0x284dx4){ChatDisposition[_0x6dc2[18]](_0x284dxf[_0x6dc2[17]][_0x6dc2[16]])[_0x6dc2[9]](handleEntityNotFound(_0x284dx4))[_0x6dc2[9]](responseWithResult(_0x284dx4))[_0x6dc2[13]](handleError(_0x284dx4))};exports[_0x6dc2[19]]= function(_0x284dxf,_0x284dx4){ChatDisposition[_0x6dc2[19]](_0x284dxf[_0x6dc2[20]])[_0x6dc2[9]](responseWithResult(_0x284dx4,201))[_0x6dc2[13]](handleError(_0x284dx4))};exports[_0x6dc2[21]]= function(_0x284dxf,_0x284dx4){if(_0x284dxf[_0x6dc2[20]][_0x6dc2[16]]){delete _0x284dxf[_0x6dc2[20]][_0x6dc2[16]]};ChatDisposition[_0x6dc2[18]](_0x284dxf[_0x6dc2[17]][_0x6dc2[16]])[_0x6dc2[9]](handleEntityNotFound(_0x284dx4))[_0x6dc2[9]](saveUpdates(_0x284dxf[_0x6dc2[20]]))[_0x6dc2[9]](responseWithResult(_0x284dx4))[_0x6dc2[13]](handleError(_0x284dx4))};exports[_0x6dc2[11]]= function(_0x284dxf,_0x284dx4){ChatDisposition[_0x6dc2[18]](_0x284dxf[_0x6dc2[17]][_0x6dc2[16]])[_0x6dc2[9]](handleEntityNotFound(_0x284dx4))[_0x6dc2[9]](removeEntity(_0x284dx4))[_0x6dc2[13]](handleError(_0x284dx4))}
\ No newline at end of file
diff --git a/server/api/chat_disposition/chat_disposition.events.js b/server/api/chat_disposition/chat_disposition.events.js
index ec5fd9d..a0b640f 100644
--- a/server/api/chat_disposition/chat_disposition.events.js
+++ b/server/api/chat_disposition/chat_disposition.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ChatDisposition = require('../../models').ChatDisposition;
-
-var ChatDispositionEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ChatDispositionEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ChatDisposition.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ChatDispositionEvents.emit(event + ':' + doc._id, doc);
-    ChatDispositionEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ChatDispositionEvents;
+var _0xd42e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd42e[0];const EventEmitter=require(_0xd42e[1]);const ChatDisposition=require(_0xd42e[3])[_0xd42e[2]];var ChatDispositionEvents= new EventEmitter();ChatDispositionEvents[_0xd42e[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd42e[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd42e[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd42e[6]};for(var e in events){var event=events[e];ChatDisposition[_0xd42e[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xd175x8,_0xd175x9,_0xd175xa){ChatDispositionEvents[_0xd42e[10]](event+ _0xd42e[8]+ _0xd175x8[_0xd42e[9]],_0xd175x8);ChatDispositionEvents[_0xd42e[10]](event,_0xd175x8);_0xd175xa(null)}}module[_0xd42e[11]]= ChatDispositionEvents
\ No newline at end of file
diff --git a/server/api/chat_disposition/chat_disposition.socket.js b/server/api/chat_disposition/chat_disposition.socket.js
index 8788c23..b889a84 100644
--- a/server/api/chat_disposition/chat_disposition.socket.js
+++ b/server/api/chat_disposition/chat_disposition.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const ChatDispositionEvents = require('./chat_disposition.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('chat_disposition:' + event, socket);
-
-    ChatDispositionEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ChatDispositionEvents.removeListener(event, listener);
-  };
-}
+var _0xba23=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xba23[0];const ChatDispositionEvents=require(_0xba23[1]);var events=[_0xba23[2],_0xba23[3]];exports[_0xba23[4]]= function(_0x76a3x3){for(var _0x76a3x4=0,_0x76a3x5=events[_0xba23[5]];_0x76a3x4< _0x76a3x5;_0x76a3x4++){var _0x76a3x6=events[_0x76a3x4];var _0x76a3x7=createListener(_0xba23[6]+ _0x76a3x6,_0x76a3x3);ChatDispositionEvents[_0xba23[7]](_0x76a3x6,_0x76a3x7);_0x76a3x3[_0xba23[7]](_0xba23[8],removeListener(_0x76a3x6,_0x76a3x7))}};function createListener(_0x76a3x6,_0x76a3x3){return function(_0x76a3x9){_0x76a3x3[_0xba23[9]](_0x76a3x6,_0x76a3x9)}}function removeListener(_0x76a3x6,_0x76a3x7){return function(){ChatDispositionEvents[_0xba23[10]](_0x76a3x6,_0x76a3x7)}}
\ No newline at end of file
diff --git a/server/api/chat_disposition/index.js b/server/api/chat_disposition/index.js
index aec3275..e8e89c4 100644
--- a/server/api/chat_disposition/index.js
+++ b/server/api/chat_disposition/index.js
@@ -1,18 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./chat_disposition.controller');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.index);
-router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.show);
-router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.create);
-router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.update);
-router.patch('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.update);
-router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.destroy);
-
-
-module.exports = router;
+var _0x6f6d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x63\x68\x61\x74\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6f6d[0];var express=require(_0x6f6d[1]);var auth=require(_0x6f6d[2]);var controller=require(_0x6f6d[3]);var license=require(_0x6f6d[4]);var router=express.Router();router[_0x6f6d[10]](_0x6f6d[5],license[_0x6f6d[6]](),license[_0x6f6d[7]](),auth[_0x6f6d[8]](),controller[_0x6f6d[9]]);router[_0x6f6d[10]](_0x6f6d[11],license[_0x6f6d[6]](),license[_0x6f6d[7]](),auth[_0x6f6d[8]](),controller[_0x6f6d[12]]);router[_0x6f6d[14]](_0x6f6d[5],license[_0x6f6d[6]](),license[_0x6f6d[7]](),auth[_0x6f6d[8]](),controller[_0x6f6d[13]]);router[_0x6f6d[16]](_0x6f6d[11],license[_0x6f6d[6]](),license[_0x6f6d[7]](),auth[_0x6f6d[8]](),controller[_0x6f6d[15]]);router[_0x6f6d[17]](_0x6f6d[11],license[_0x6f6d[6]](),license[_0x6f6d[7]](),auth[_0x6f6d[8]](),controller[_0x6f6d[15]]);router[_0x6f6d[19]](_0x6f6d[11],license[_0x6f6d[6]](),license[_0x6f6d[7]](),auth[_0x6f6d[8]](),controller[_0x6f6d[18]]);module[_0x6f6d[20]]= router
\ No newline at end of file
diff --git a/server/api/chat_enquiry/enquiry.controller.js b/server/api/chat_enquiry/enquiry.controller.js
index 0adc0f6..84c4b09 100644
--- a/server/api/chat_enquiry/enquiry.controller.js
+++ b/server/api/chat_enquiry/enquiry.controller.js
@@ -1,123 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var ChatEnquiry = require('../../models').ChatEnquiry;
-var ChatVisitor = require('../../models').ChatVisitor;
-var ChatWebsite = require('../../models').ChatWebsite;
-var List = require('../../models').List;
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  return ChatEnquiry
-    .findAndCountAll(_.merge(Util.getQuery(req.query), {
-      include: [{
-        model: ChatWebsite,
-        attributes: ['id', 'name']
-      }]
-    }))
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single enquiry
-exports.show = function(req, res) {
-  return ChatEnquiry
-    .findById(req.params.id, {
-      include: [{
-        model: ChatWebsite,
-        attributes: ['id', 'name', 'ListId'],
-      }, {
-        model: ChatVisitor
-      }]
-    })
-    .then(function(enquiry) {
-      if (!enquiry) {
-        return res.sendStatus(404);
-      }
-      return res.send(enquiry);
-    })
-    .catch(function(err) {
-      console.error(err);
-      return handleError(res, err);
-    });
-};
-
-// Creates a new enquiry in the DB.
-exports.create = function(req, res) {
-  return ChatEnquiry
-    .create(req.body)
-    .then(function(enquiry) {
-      return res.status(201).send(enquiry);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing enquiry in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return ChatEnquiry
-    .findById(req.params.id)
-    .then(function(enquiry) {
-      if (!enquiry) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(enquiry, req.body);
-      return updated
-        .save();
-    })
-    .then(function(enquiry) {
-      return res.status(200).send(enquiry);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a enquiry from the DB.
-exports.destroy = function(req, res) {
-  return ChatEnquiry
-    .findById(req.params.id)
-    .then(function(enquiry) {
-      if (!enquiry) {
-        return res.sendStatus(404);
-      }
-      return enquiry
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.bulkDestroy = function(req, res) {
-  return ChatEnquiry
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xe49c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x4C\x69\x73\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x69\x64","\x6E\x61\x6D\x65","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x65\x72\x72\x6F\x72","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x4C\x69\x73\x74\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xe49c[0];var _=require(_0xe49c[1]);var Util=require(_0xe49c[2]);var ChatEnquiry=require(_0xe49c[4])[_0xe49c[3]];var ChatVisitor=require(_0xe49c[4])[_0xe49c[5]];var ChatWebsite=require(_0xe49c[4])[_0xe49c[6]];var List=require(_0xe49c[4])[_0xe49c[7]];exports[_0xe49c[8]]= function(_0x190bx7,_0x190bx8,_0x190bx9){return ChatEnquiry[_0xe49c[18]](_[_0xe49c[17]](Util[_0xe49c[14]](_0x190bx7[_0xe49c[13]]),{include:[{model:ChatWebsite,attributes:[_0xe49c[15],_0xe49c[16]]}]}))[_0xe49c[12]](function(_0x190bxb){return _0x190bx8[_0xe49c[11]](200)[_0xe49c[10]](_0x190bxb)})[_0xe49c[9]](function(_0x190bxa){return handleError(_0x190bx8,_0x190bxa)})};exports[_0xe49c[19]]= function(_0x190bx7,_0x190bx8){return ChatEnquiry[_0xe49c[24]](_0x190bx7[_0xe49c[22]][_0xe49c[15]],{include:[{model:ChatWebsite,attributes:[_0xe49c[15],_0xe49c[16],_0xe49c[23]]},{model:ChatVisitor}]})[_0xe49c[12]](function(_0x190bxc){if(!_0x190bxc){return _0x190bx8[_0xe49c[21]](404)};return _0x190bx8[_0xe49c[10]](_0x190bxc)})[_0xe49c[9]](function(_0x190bxa){console[_0xe49c[20]](_0x190bxa);return handleError(_0x190bx8,_0x190bxa)})};exports[_0xe49c[25]]= function(_0x190bx7,_0x190bx8){return ChatEnquiry[_0xe49c[25]](_0x190bx7[_0xe49c[26]])[_0xe49c[12]](function(_0x190bxc){return _0x190bx8[_0xe49c[11]](201)[_0xe49c[10]](_0x190bxc)})[_0xe49c[9]](function(_0x190bxa){return handleError(_0x190bx8,_0x190bxa)})};exports[_0xe49c[27]]= function(_0x190bx7,_0x190bx8){if(_0x190bx7[_0xe49c[26]][_0xe49c[15]]){delete _0x190bx7[_0xe49c[26]][_0xe49c[15]]};return ChatEnquiry[_0xe49c[24]](_0x190bx7[_0xe49c[22]][_0xe49c[15]])[_0xe49c[12]](function(_0x190bxc){if(!_0x190bxc){return _0x190bx8[_0xe49c[21]](404)};var _0x190bxd=_[_0xe49c[17]](_0x190bxc,_0x190bx7[_0xe49c[26]]);return _0x190bxd[_0xe49c[28]]()})[_0xe49c[12]](function(_0x190bxc){return _0x190bx8[_0xe49c[11]](200)[_0xe49c[10]](_0x190bxc)})[_0xe49c[9]](function(_0x190bxa){return handleError(_0x190bx8,_0x190bxa)})};exports[_0xe49c[29]]= function(_0x190bx7,_0x190bx8){return ChatEnquiry[_0xe49c[24]](_0x190bx7[_0xe49c[22]][_0xe49c[15]])[_0xe49c[12]](function(_0x190bxc){if(!_0x190bxc){return _0x190bx8[_0xe49c[21]](404)};return _0x190bxc[_0xe49c[29]]()})[_0xe49c[12]](function(){return _0x190bx8[_0xe49c[21]](204)})[_0xe49c[9]](function(_0x190bxa){return handleError(_0x190bx8,_0x190bxa)})};exports[_0xe49c[30]]= function(_0x190bx7,_0x190bx8){return ChatEnquiry[_0xe49c[29]]({where:{id:_0x190bx7[_0xe49c[13]][_0xe49c[31]]},individualHooks:true})[_0xe49c[12]](function(){return _0x190bx8[_0xe49c[21]](204)})[_0xe49c[9]](function(_0x190bxa){return handleError(_0x190bx8,_0x190bxa)})};function handleError(_0x190bx8,_0x190bxa){return _0x190bx8[_0xe49c[11]](500)[_0xe49c[10]](_0x190bxa)}
\ No newline at end of file
diff --git a/server/api/chat_enquiry/enquiry.events.js b/server/api/chat_enquiry/enquiry.events.js
index e818a2a..927fe4d 100644
--- a/server/api/chat_enquiry/enquiry.events.js
+++ b/server/api/chat_enquiry/enquiry.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Enquiry = require('../../models').ChatEnquiry;
-
-var EnquiryEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-EnquiryEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Enquiry.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    EnquiryEvents.emit(event + ':' + doc._id, doc);
-    EnquiryEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = EnquiryEvents;
+var _0x5377=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x5377[0];const EventEmitter=require(_0x5377[1]);const Enquiry=require(_0x5377[3])[_0x5377[2]];var EnquiryEvents= new EventEmitter();EnquiryEvents[_0x5377[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x5377[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x5377[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x5377[6]};for(var e in events){var event=events[e];Enquiry[_0x5377[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xba20x8,_0xba20x9,_0xba20xa){EnquiryEvents[_0x5377[10]](event+ _0x5377[8]+ _0xba20x8[_0x5377[9]],_0xba20x8);EnquiryEvents[_0x5377[10]](event,_0xba20x8);_0xba20xa(null)}}module[_0x5377[11]]= EnquiryEvents
\ No newline at end of file
diff --git a/server/api/chat_enquiry/enquiry.socket.js b/server/api/chat_enquiry/enquiry.socket.js
index 686f9a1..fa48808 100644
--- a/server/api/chat_enquiry/enquiry.socket.js
+++ b/server/api/chat_enquiry/enquiry.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const ChatEnquiryEvents = require('./enquiry.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('enquiry:' + event, socket);
-
-    ChatEnquiryEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ChatEnquiryEvents.removeListener(event, listener);
-  };
-}
+var _0x63b6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x65\x6E\x71\x75\x69\x72\x79\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x65\x6E\x71\x75\x69\x72\x79\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x63b6[0];const ChatEnquiryEvents=require(_0x63b6[1]);var events=[_0x63b6[2],_0x63b6[3]];exports[_0x63b6[4]]= function(_0x8752x3){for(var _0x8752x4=0,_0x8752x5=events[_0x63b6[5]];_0x8752x4< _0x8752x5;_0x8752x4++){var _0x8752x6=events[_0x8752x4];var _0x8752x7=createListener(_0x63b6[6]+ _0x8752x6,_0x8752x3);ChatEnquiryEvents[_0x63b6[7]](_0x8752x6,_0x8752x7);_0x8752x3[_0x63b6[7]](_0x63b6[8],removeListener(_0x8752x6,_0x8752x7))}};function createListener(_0x8752x6,_0x8752x3){return function(_0x8752x9){_0x8752x3[_0x63b6[9]](_0x8752x6,_0x8752x9)}}function removeListener(_0x8752x6,_0x8752x7){return function(){ChatEnquiryEvents[_0x63b6[10]](_0x8752x6,_0x8752x7)}}
\ No newline at end of file
diff --git a/server/api/chat_enquiry/index.js b/server/api/chat_enquiry/index.js
index 0add885..a6a0a4e 100644
--- a/server/api/chat_enquiry/index.js
+++ b/server/api/chat_enquiry/index.js
@@ -1,19 +1 @@
-'use strict';
-
-var express = require('express');
-
-var controller = require('./enquiry.controller');
-var license = require('../../config/license/license.service');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.index);
-router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.show);
-router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.create);
-router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update);
-router.patch('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update);
-router.delete('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.bulkDestroy);
-router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xb1ea=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x65\x6E\x71\x75\x69\x72\x79\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xb1ea[0];var express=require(_0xb1ea[1]);var controller=require(_0xb1ea[2]);var license=require(_0xb1ea[3]);var auth=require(_0xb1ea[4]);var router=express.Router();router[_0xb1ea[12]](_0xb1ea[5],license[_0xb1ea[6]](),license[_0xb1ea[7]](),auth[_0xb1ea[8]](),auth[_0xb1ea[10]]([8],[_0xb1ea[9]]),controller[_0xb1ea[11]]);router[_0xb1ea[12]](_0xb1ea[13],license[_0xb1ea[6]](),license[_0xb1ea[7]](),auth[_0xb1ea[8]](),auth[_0xb1ea[10]]([8],[_0xb1ea[9]]),controller[_0xb1ea[14]]);router[_0xb1ea[16]](_0xb1ea[5],license[_0xb1ea[6]](),license[_0xb1ea[7]](),auth[_0xb1ea[8]](),auth[_0xb1ea[10]]([8],[_0xb1ea[9]]),controller[_0xb1ea[15]]);router[_0xb1ea[18]](_0xb1ea[13],license[_0xb1ea[6]](),license[_0xb1ea[7]](),auth[_0xb1ea[8]](),auth[_0xb1ea[10]]([8],[_0xb1ea[9]]),controller[_0xb1ea[17]]);router[_0xb1ea[19]](_0xb1ea[13],license[_0xb1ea[6]](),license[_0xb1ea[7]](),auth[_0xb1ea[8]](),auth[_0xb1ea[10]]([8],[_0xb1ea[9]]),controller[_0xb1ea[17]]);router[_0xb1ea[21]](_0xb1ea[5],license[_0xb1ea[6]](),license[_0xb1ea[7]](),auth[_0xb1ea[8]](),auth[_0xb1ea[10]]([8],[_0xb1ea[9]]),controller[_0xb1ea[20]]);router[_0xb1ea[21]](_0xb1ea[13],license[_0xb1ea[6]](),license[_0xb1ea[7]](),auth[_0xb1ea[8]](),auth[_0xb1ea[10]]([8],[_0xb1ea[9]]),controller[_0xb1ea[22]]);module[_0xb1ea[23]]= router
\ No newline at end of file
diff --git a/server/api/chat_message/chat_message.controller.js b/server/api/chat_message/chat_message.controller.js
index ac89444..1ddff78 100644
--- a/server/api/chat_message/chat_message.controller.js
+++ b/server/api/chat_message/chat_message.controller.js
@@ -1,106 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var md5 = require('md5');
-
-var User = require('../../models').User;
-var ChatRoom = require('../../models').ChatRoom;
-var ChatMessage = require('../../models').ChatMessage;
-var ChatVisitor = require('../../models').ChatVisitor;
-
-// Get list of chat_messages
-exports.index = function(req, res) {
-  return ChatMessage
-    .findAll()
-    .then(function(chat_messages) {
-      return res.status(200).send(chat_messages);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.describe = function(req, res) {
-  return ChatMessage
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single chatMessage
-exports.show = function(req, res) {
-  return ChatMessage
-    .findById(req.params.id)
-    .then(function(chatMessage) {
-      if (!chatMessage) {
-        return res.sendStatus(404);
-      }
-      return res.send(chatMessage);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new chatMessage in the DB.
-exports.create = function(req, res, next) {
-  return ChatMessage
-    .create(_.merge(req.body, {
-      UserId: req.user.id
-    }))
-    .then(function(chatMessage) {
-      return res.status(201).send(chatMessage);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing chatMessage in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return ChatMessage
-    .findById(req.params.id)
-    .then(function(chatMessage) {
-      if (!chatMessage) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(chatMessage, req.body);
-      return updated.save();
-    })
-    .then(function(chatMessage) {
-      return res.status(200).send(chatMessage);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a chatMessage from the DB.
-exports.destroy = function(req, res) {
-  return ChatMessage
-    .findById(req.params.id)
-    .then(function(chatMessage) {
-      if (!chatMessage) {
-        return res.sendStatus(404);
-      }
-      return chatMessage.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xf939=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x64\x35","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x73\x65\x72","\x6D\x65\x72\x67\x65","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xf939[0];var _=require(_0xf939[1]);var md5=require(_0xf939[2]);var User=require(_0xf939[4])[_0xf939[3]];var ChatRoom=require(_0xf939[4])[_0xf939[5]];var ChatMessage=require(_0xf939[4])[_0xf939[6]];var ChatVisitor=require(_0xf939[4])[_0xf939[7]];exports[_0xf939[8]]= function(_0x1158x7,_0x1158x8){return ChatMessage[_0xf939[13]]()[_0xf939[12]](function(_0x1158xa){return _0x1158x8[_0xf939[11]](200)[_0xf939[10]](_0x1158xa)})[_0xf939[9]](function(_0x1158x9){return handleError(_0x1158x8,_0x1158x9)})};exports[_0xf939[14]]= function(_0x1158x7,_0x1158x8){return ChatMessage[_0xf939[14]]()[_0xf939[12]](function(_0x1158xb){return _0x1158x8[_0xf939[11]](200)[_0xf939[10]](_0x1158xb)})[_0xf939[9]](function(_0x1158x9){return handleError(_0x1158x8,_0x1158x9)})};exports[_0xf939[15]]= function(_0x1158x7,_0x1158x8){return ChatMessage[_0xf939[19]](_0x1158x7[_0xf939[18]][_0xf939[17]])[_0xf939[12]](function(_0x1158xc){if(!_0x1158xc){return _0x1158x8[_0xf939[16]](404)};return _0x1158x8[_0xf939[10]](_0x1158xc)})[_0xf939[9]](function(_0x1158x9){return handleError(_0x1158x8,_0x1158x9)})};exports[_0xf939[20]]= function(_0x1158x7,_0x1158x8,_0x1158xd){return ChatMessage[_0xf939[20]](_[_0xf939[23]](_0x1158x7[_0xf939[21]],{UserId:_0x1158x7[_0xf939[22]][_0xf939[17]]}))[_0xf939[12]](function(_0x1158xc){return _0x1158x8[_0xf939[11]](201)[_0xf939[10]](_0x1158xc)})[_0xf939[9]](function(_0x1158x9){return handleError(_0x1158x8,_0x1158x9)})};exports[_0xf939[24]]= function(_0x1158x7,_0x1158x8){if(_0x1158x7[_0xf939[21]][_0xf939[17]]){delete _0x1158x7[_0xf939[21]][_0xf939[17]]};return ChatMessage[_0xf939[19]](_0x1158x7[_0xf939[18]][_0xf939[17]])[_0xf939[12]](function(_0x1158xc){if(!_0x1158xc){return _0x1158x8[_0xf939[16]](404)};var _0x1158xe=_[_0xf939[23]](_0x1158xc,_0x1158x7[_0xf939[21]]);return _0x1158xe[_0xf939[25]]()})[_0xf939[12]](function(_0x1158xc){return _0x1158x8[_0xf939[11]](200)[_0xf939[10]](_0x1158xc)})[_0xf939[9]](function(_0x1158x9){return handleError(_0x1158x8,_0x1158x9)})};exports[_0xf939[26]]= function(_0x1158x7,_0x1158x8){return ChatMessage[_0xf939[19]](_0x1158x7[_0xf939[18]][_0xf939[17]])[_0xf939[12]](function(_0x1158xc){if(!_0x1158xc){return _0x1158x8[_0xf939[16]](404)};return _0x1158xc[_0xf939[26]]()})[_0xf939[12]](function(){return _0x1158x8[_0xf939[16]](204)})[_0xf939[9]](function(_0x1158x9){return handleError(_0x1158x8,_0x1158x9)})};function handleError(_0x1158x8,_0x1158x9){return _0x1158x8[_0xf939[11]](500)[_0xf939[10]](_0x1158x9)}
\ No newline at end of file
diff --git a/server/api/chat_message/chat_message.events.js b/server/api/chat_message/chat_message.events.js
index 64d8887..e88ab73 100644
--- a/server/api/chat_message/chat_message.events.js
+++ b/server/api/chat_message/chat_message.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ChatMessage = require('../../models').ChatMessage;
-
-var ChatMessageEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ChatMessageEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ChatMessage.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ChatMessageEvents.emit(event + ':' + doc._id, doc);
-    ChatMessageEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ChatMessageEvents;
+var _0xdfe6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xdfe6[0];const EventEmitter=require(_0xdfe6[1]);const ChatMessage=require(_0xdfe6[3])[_0xdfe6[2]];var ChatMessageEvents= new EventEmitter();ChatMessageEvents[_0xdfe6[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xdfe6[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xdfe6[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xdfe6[6]};for(var e in events){var event=events[e];ChatMessage[_0xdfe6[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xbf00x8,_0xbf00x9,_0xbf00xa){ChatMessageEvents[_0xdfe6[10]](event+ _0xdfe6[8]+ _0xbf00x8[_0xdfe6[9]],_0xbf00x8);ChatMessageEvents[_0xdfe6[10]](event,_0xbf00x8);_0xbf00xa(null)}}module[_0xdfe6[11]]= ChatMessageEvents
\ No newline at end of file
diff --git a/server/api/chat_message/chat_message.socket.js b/server/api/chat_message/chat_message.socket.js
index df90ddc..0b38c24 100644
--- a/server/api/chat_message/chat_message.socket.js
+++ b/server/api/chat_message/chat_message.socket.js
@@ -1,62 +1 @@
-'use strict';
-
-const _ = require('lodash');
-
-const ChatMessage = require('../../models').ChatMessage;
-const ChatMessageEvents = require('./chat_message.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('chat_message:' + event, socket);
-
-    ChatMessageEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    return doc
-      .getChatRoom()
-      .then(function(chatRoom) {
-        return [chatRoom
-          .getUsers({
-            attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal', 'userpic'],
-            raw: true
-          }), chatRoom
-          .getChatVisitor({
-            attributes: ['id', 'fullname', 'email'],
-            raw: true
-          })
-        ];
-      })
-      .spread(function(users, visitor) {
-        var sender = _.find(users, {
-          id: doc.UserId
-        });
-
-        users.forEach(function(user) {
-          // SOCKET FILTER
-          if (socket.userId == user.id && (sender || visitor)) {
-            socket.emit(event, _.merge(doc.dataValues, {
-              User: sender, // TODO modify to sender
-              ChatVisitor: sender ? null : visitor // TODO modify to visitor
-            }));
-          }
-        });
-      })
-      .catch(function(err) {
-        console.error(err);
-      });
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ChatMessageEvents.removeListener(event, listener);
-  };
-}
+var _0x657f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x55\x73\x65\x72\x49\x64","\x66\x69\x6E\x64","\x75\x73\x65\x72\x49\x64","\x69\x64","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x65\x72\x67\x65","\x65\x6D\x69\x74","\x66\x6F\x72\x45\x61\x63\x68","\x73\x70\x72\x65\x61\x64","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x72\x6F\x6C\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x75\x73\x65\x72\x70\x69\x63","\x67\x65\x74\x55\x73\x65\x72\x73","\x67\x65\x74\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x74\x68\x65\x6E","\x67\x65\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x657f[0];const _=require(_0x657f[1]);const ChatMessage=require(_0x657f[3])[_0x657f[2]];const ChatMessageEvents=require(_0x657f[4]);var events=[_0x657f[5],_0x657f[6]];exports[_0x657f[7]]= function(_0xe210x5){for(var _0xe210x6=0,_0xe210x7=events[_0x657f[8]];_0xe210x6< _0xe210x7;_0xe210x6++){var _0xe210x8=events[_0xe210x6];var _0xe210x9=createListener(_0x657f[9]+ _0xe210x8,_0xe210x5);ChatMessageEvents[_0x657f[10]](_0xe210x8,_0xe210x9);_0xe210x5[_0x657f[10]](_0x657f[11],removeListener(_0xe210x8,_0xe210x9))}};function createListener(_0xe210x8,_0xe210x5){return function(_0xe210xb){return _0xe210xb[_0x657f[32]]()[_0x657f[31]](function(_0xe210x11){return [_0xe210x11[_0x657f[29]]({attributes:[_0x657f[17],_0x657f[23],_0x657f[24],_0x657f[25],_0x657f[26],_0x657f[27],_0x657f[28]],raw:true}),_0xe210x11[_0x657f[30]]({attributes:[_0x657f[17],_0x657f[24],_0x657f[25]],raw:true})]})[_0x657f[22]](function(_0xe210xd,_0xe210xe){var _0xe210xf=_[_0x657f[15]](_0xe210xd,{id:_0xe210xb[_0x657f[14]]});_0xe210xd[_0x657f[21]](function(_0xe210x10){if(_0xe210x5[_0x657f[16]]== _0xe210x10[_0x657f[17]]&& (_0xe210xf|| _0xe210xe)){_0xe210x5[_0x657f[20]](_0xe210x8,_[_0x657f[19]](_0xe210xb[_0x657f[18]],{User:_0xe210xf,ChatVisitor:_0xe210xf?null:_0xe210xe}))}})})[_0x657f[13]](function(_0xe210xc){console[_0x657f[12]](_0xe210xc)})}}function removeListener(_0xe210x8,_0xe210x9){return function(){ChatMessageEvents[_0x657f[33]](_0xe210x8,_0xe210x9)}}
\ No newline at end of file
diff --git a/server/api/chat_message/index.js b/server/api/chat_message/index.js
index 947b5a8..222e0be 100644
--- a/server/api/chat_message/index.js
+++ b/server/api/chat_message/index.js
@@ -1,18 +1 @@
-'use strict';
-
-var express = require('express');
-
-var controller = require('./chat_message.controller');
-var license = require('../../config/license/license.service');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.index);
-router.get('/describe', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.describe);
-router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.show);
-router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.create);
-router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update);
-router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xd298=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xd298[0];var express=require(_0xd298[1]);var controller=require(_0xd298[2]);var license=require(_0xd298[3]);var auth=require(_0xd298[4]);var router=express.Router();router[_0xd298[13]](_0xd298[5],license[_0xd298[6]](),license[_0xd298[7]](),auth[_0xd298[8]](),auth[_0xd298[11]]([8],[_0xd298[9],_0xd298[10]]),controller[_0xd298[12]]);router[_0xd298[13]](_0xd298[14],license[_0xd298[6]](),license[_0xd298[7]](),auth[_0xd298[8]](),auth[_0xd298[11]]([8],[_0xd298[9]]),controller[_0xd298[15]]);router[_0xd298[13]](_0xd298[16],license[_0xd298[6]](),license[_0xd298[7]](),auth[_0xd298[8]](),auth[_0xd298[11]]([8],[_0xd298[9],_0xd298[10]]),controller[_0xd298[17]]);router[_0xd298[19]](_0xd298[5],license[_0xd298[6]](),license[_0xd298[7]](),auth[_0xd298[8]](),auth[_0xd298[11]]([8],[_0xd298[9],_0xd298[10]]),controller[_0xd298[18]]);router[_0xd298[21]](_0xd298[16],license[_0xd298[6]](),license[_0xd298[7]](),auth[_0xd298[8]](),auth[_0xd298[11]]([8],[_0xd298[9]]),controller[_0xd298[20]]);router[_0xd298[23]](_0xd298[16],license[_0xd298[6]](),license[_0xd298[7]](),auth[_0xd298[8]](),auth[_0xd298[11]]([8],[_0xd298[9]]),controller[_0xd298[22]]);module[_0xd298[24]]= router
\ No newline at end of file
diff --git a/server/api/chat_proactive_action/chat_proactive_action.controller.js b/server/api/chat_proactive_action/chat_proactive_action.controller.js
index 8e3b8ba..d8a5aa4 100644
--- a/server/api/chat_proactive_action/chat_proactive_action.controller.js
+++ b/server/api/chat_proactive_action/chat_proactive_action.controller.js
@@ -1,112 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/chat/proactives              ->  index
- * POST    /api/chat/proactives              ->  create
- * GET     /api/chat/proactives/:id          ->  show
- * PUT     /api/chat/proactives/:id          ->  update
- * DELETE  /api/chat/proactives/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var ChatProactiveAction = require('../../models').ChatProactiveAction;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function responseWithoutResult(res, statusCode) {
-  statusCode = statusCode || 204;
-  return function() {
-    res.sendStatus(statusCode);
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) { 
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of ChatProactiveActions
-exports.index = function(req, res) {
-  return ChatProactiveAction.findAll(Util.getQuery(req.query))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single ChatProactiveAction from the DB
-exports.show = function(req, res) {
-  return ChatProactiveAction.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new ChatProactiveAction in the DB
-exports.create = function(req, res) {
-  return ChatProactiveAction.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing ChatProactiveAction in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return ChatProactiveAction.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a ChatProactiveAction from the DB
-exports.destroy = function(req, res) {
-  return ChatProactiveAction.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
+var _0xfc16=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0xfc16[0];var _=require(_0xfc16[1]);var Util=require(_0xfc16[2]);var ChatProactiveAction=require(_0xfc16[4])[_0xfc16[3]];function handleError(_0x9e5fx5,_0x9e5fx6){_0x9e5fx6= _0x9e5fx6|| 500;return function(_0x9e5fx7){_0x9e5fx5[_0xfc16[6]](_0x9e5fx6)[_0xfc16[5]](_0x9e5fx7)}}function responseWithResult(_0x9e5fx5,_0x9e5fx6){_0x9e5fx6= _0x9e5fx6|| 200;return function(_0x9e5fx9){if(_0x9e5fx9){_0x9e5fx5[_0xfc16[6]](_0x9e5fx6)[_0xfc16[7]](_0x9e5fx9)}}}function responseWithoutResult(_0x9e5fx5,_0x9e5fx6){_0x9e5fx6= _0x9e5fx6|| 204;return function(){_0x9e5fx5[_0xfc16[8]](_0x9e5fx6)}}function handleEntityNotFound(_0x9e5fx5){return function(_0x9e5fx9){if(!_0x9e5fx9){_0x9e5fx5[_0xfc16[6]](404)[_0xfc16[9]]();return null};return _0x9e5fx9}}function saveUpdates(_0x9e5fxd){return function(_0x9e5fx9){return _0x9e5fx9[_0xfc16[11]](_0x9e5fxd)[_0xfc16[10]](function(_0x9e5fxe){return _0x9e5fxe})}}function removeEntity(_0x9e5fx5){return function(_0x9e5fx9){if(_0x9e5fx9){return _0x9e5fx9[_0xfc16[12]]()[_0xfc16[10]](function(){_0x9e5fx5[_0xfc16[6]](204)[_0xfc16[9]]()})}}}exports[_0xfc16[13]]= function(_0x9e5fx10,_0x9e5fx5){return ChatProactiveAction[_0xfc16[17]](Util[_0xfc16[16]](_0x9e5fx10[_0xfc16[15]]))[_0xfc16[10]](responseWithResult(_0x9e5fx5))[_0xfc16[14]](handleError(_0x9e5fx5))};exports[_0xfc16[18]]= function(_0x9e5fx10,_0x9e5fx5){return ChatProactiveAction[_0xfc16[21]](_0x9e5fx10[_0xfc16[20]][_0xfc16[19]])[_0xfc16[10]](handleEntityNotFound(_0x9e5fx5))[_0xfc16[10]](responseWithResult(_0x9e5fx5))[_0xfc16[14]](handleError(_0x9e5fx5))};exports[_0xfc16[22]]= function(_0x9e5fx10,_0x9e5fx5){return ChatProactiveAction[_0xfc16[22]](_0x9e5fx10[_0xfc16[23]])[_0xfc16[10]](responseWithResult(_0x9e5fx5,201))[_0xfc16[14]](handleError(_0x9e5fx5))};exports[_0xfc16[24]]= function(_0x9e5fx10,_0x9e5fx5){if(_0x9e5fx10[_0xfc16[23]][_0xfc16[19]]){delete _0x9e5fx10[_0xfc16[23]][_0xfc16[19]]};return ChatProactiveAction[_0xfc16[21]](_0x9e5fx10[_0xfc16[20]][_0xfc16[19]])[_0xfc16[10]](handleEntityNotFound(_0x9e5fx5))[_0xfc16[10]](saveUpdates(_0x9e5fx10[_0xfc16[23]]))[_0xfc16[10]](responseWithResult(_0x9e5fx5))[_0xfc16[14]](handleError(_0x9e5fx5))};exports[_0xfc16[12]]= function(_0x9e5fx10,_0x9e5fx5){return ChatProactiveAction[_0xfc16[21]](_0x9e5fx10[_0xfc16[20]][_0xfc16[19]])[_0xfc16[10]](handleEntityNotFound(_0x9e5fx5))[_0xfc16[10]](removeEntity(_0x9e5fx5))[_0xfc16[14]](handleError(_0x9e5fx5))}
\ No newline at end of file
diff --git a/server/api/chat_proactive_action/chat_proactive_action.events.js b/server/api/chat_proactive_action/chat_proactive_action.events.js
index 63b128a..00aae9a 100644
--- a/server/api/chat_proactive_action/chat_proactive_action.events.js
+++ b/server/api/chat_proactive_action/chat_proactive_action.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ChatProactiveAction = require('../../models').ChatProactiveAction;
-
-var ChatProactiveActionEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ChatProactiveActionEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ChatProactiveAction.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ChatProactiveActionEvents.emit(event + ':' + doc._id, doc);
-    ChatProactiveActionEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ChatProactiveActionEvents;
+var _0x3476=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x3476[0];const EventEmitter=require(_0x3476[1]);const ChatProactiveAction=require(_0x3476[3])[_0x3476[2]];var ChatProactiveActionEvents= new EventEmitter();ChatProactiveActionEvents[_0x3476[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x3476[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x3476[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x3476[6]};for(var e in events){var event=events[e];ChatProactiveAction[_0x3476[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x44c5x8,_0x44c5x9,_0x44c5xa){ChatProactiveActionEvents[_0x3476[10]](event+ _0x3476[8]+ _0x44c5x8[_0x3476[9]],_0x44c5x8);ChatProactiveActionEvents[_0x3476[10]](event,_0x44c5x8);_0x44c5xa(null)}}module[_0x3476[11]]= ChatProactiveActionEvents
\ No newline at end of file
diff --git a/server/api/chat_proactive_action/chat_proactive_action.socket.js b/server/api/chat_proactive_action/chat_proactive_action.socket.js
index 2e9d2a7..7e8f115 100644
--- a/server/api/chat_proactive_action/chat_proactive_action.socket.js
+++ b/server/api/chat_proactive_action/chat_proactive_action.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const ChatProactiveActionEvents = require('./chat_proactive_action.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('chat_proactive_action:' + event, socket);
-
-    ChatProactiveActionEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ChatProactiveActionEvents.removeListener(event, listener);
-  };
-}
+var _0xb54b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xb54b[0];const ChatProactiveActionEvents=require(_0xb54b[1]);var events=[_0xb54b[2],_0xb54b[3]];exports[_0xb54b[4]]= function(_0xe07cx3){for(var _0xe07cx4=0,_0xe07cx5=events[_0xb54b[5]];_0xe07cx4< _0xe07cx5;_0xe07cx4++){var _0xe07cx6=events[_0xe07cx4];var _0xe07cx7=createListener(_0xb54b[6]+ _0xe07cx6,_0xe07cx3);ChatProactiveActionEvents[_0xb54b[7]](_0xe07cx6,_0xe07cx7);_0xe07cx3[_0xb54b[7]](_0xb54b[8],removeListener(_0xe07cx6,_0xe07cx7))}};function createListener(_0xe07cx6,_0xe07cx3){return function(_0xe07cx9){_0xe07cx3[_0xb54b[9]](_0xe07cx6,_0xe07cx9)}}function removeListener(_0xe07cx6,_0xe07cx7){return function(){ChatProactiveActionEvents[_0xb54b[10]](_0xe07cx6,_0xe07cx7)}}
\ No newline at end of file
diff --git a/server/api/chat_proactive_action/index.js b/server/api/chat_proactive_action/index.js
index e8e0ecf..075d815 100644
--- a/server/api/chat_proactive_action/index.js
+++ b/server/api/chat_proactive_action/index.js
@@ -1,17 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./chat_proactive_action.controller');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.index);
-router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.show);
-router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.create);
-router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update);
-router.patch('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update);
-router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0x2f55=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2f55[0];var express=require(_0x2f55[1]);var auth=require(_0x2f55[2]);var controller=require(_0x2f55[3]);var license=require(_0x2f55[4]);var router=express.Router();router[_0x2f55[12]](_0x2f55[5],license[_0x2f55[6]](),license[_0x2f55[7]](),auth[_0x2f55[8]](),auth[_0x2f55[10]]([8],[_0x2f55[9]]),controller[_0x2f55[11]]);router[_0x2f55[12]](_0x2f55[13],license[_0x2f55[6]](),license[_0x2f55[7]](),auth[_0x2f55[8]](),auth[_0x2f55[10]]([8],[_0x2f55[9]]),controller[_0x2f55[14]]);router[_0x2f55[16]](_0x2f55[5],license[_0x2f55[6]](),license[_0x2f55[7]](),auth[_0x2f55[8]](),auth[_0x2f55[10]]([8],[_0x2f55[9]]),controller[_0x2f55[15]]);router[_0x2f55[18]](_0x2f55[13],license[_0x2f55[6]](),license[_0x2f55[7]](),auth[_0x2f55[8]](),auth[_0x2f55[10]]([8],[_0x2f55[9]]),controller[_0x2f55[17]]);router[_0x2f55[19]](_0x2f55[13],license[_0x2f55[6]](),license[_0x2f55[7]](),auth[_0x2f55[8]](),auth[_0x2f55[10]]([8],[_0x2f55[9]]),controller[_0x2f55[17]]);router[_0x2f55[21]](_0x2f55[13],license[_0x2f55[6]](),license[_0x2f55[7]](),auth[_0x2f55[8]](),auth[_0x2f55[10]]([8],[_0x2f55[9]]),controller[_0x2f55[20]]);module[_0x2f55[22]]= router
\ No newline at end of file
diff --git a/server/api/chat_queue/chat_queue.controller.js b/server/api/chat_queue/chat_queue.controller.js
index fa34821..8427063 100644
--- a/server/api/chat_queue/chat_queue.controller.js
+++ b/server/api/chat_queue/chat_queue.controller.js
@@ -1,237 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var ChatQueue = require('../../models').ChatQueue;
-var User = require('../../models').User;
-var UserHasChatQueue = require('../../models').UserHasChatQueue;
-
-// Get list of mailQueues
-exports.index = function(req, res) {
-  switch (req.user.role) {
-    case 'user':
-      return User
-        .findById(req.user.id, {
-          attributes: ['id']
-        })
-        .then(Util.getChatQueuesIdByUser(req.query))
-        .then(function(result) {
-          res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-
-    default:
-      return ChatQueue
-        .scope('default')
-        .findAndCountAll(_.merge(Util.getQuery(req.query), {
-          distinct: true
-        }))
-        .then(function(result) {
-          return res.status(200).send({
-            rows: result.rows,
-            count: result.rows.length
-          });
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-  }
-};
-
-// Get list of my chat_rooms
-exports.me = function(req, res, next) {
-  return UserHasChatQueue
-    .findAll({
-      where: {
-        UserId: req.user.id
-      }
-    })
-    .then(function(userHasChatQueues) {
-      return res.status(200).send(userHasChatQueues);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single chat_queue
-exports.show = function(req, res) {
-  return ChatQueue
-    .findById(req.params.id)
-    .then(function(chat_queue) {
-      if (!chat_queue) {
-        return res.sendStatus(404);
-      }
-      return res.send(chat_queue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single queue
-exports.showAgents = function(req, res) {
-  return ChatQueue
-    .findById(req.params.id)
-    .then(function(queue) {
-      if (!queue) {
-        return res.sendStatus(404);
-      }
-      return queue
-        .getUsers({
-          where: {
-            role: 'agent'
-          },
-          attributes: ['id', 'name', 'fullname', 'email']
-        });
-    })
-    .then(function(agents) {
-      return res.status(200).send({
-        rows: agents,
-        count: agents.length
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new chat_queue in the DB.
-exports.create = function(req, res) {
-  var _chatQueue;
-
-  return ChatQueue
-    .create(req.body)
-    .then(function(chatQueue) {
-      _chatQueue = chatQueue;
-
-      if (req.body.agents) {
-        return _chatQueue
-          .addUsers(req.body.agents, {
-            penalty: req.body.penalty || 0,
-            queue: _chatQueue.name
-          });
-      }
-    })
-    .then(function() {
-      return res.status(201).send(_chatQueue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing chat_queue in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return ChatQueue
-    .findById(req.params.id)
-    .then(function(chat_queue) {
-      if (!chat_queue) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(chat_queue, req.body);
-      return updated.save();
-    })
-    .then(function(chat_queue) {
-      return res.status(200).send(chat_queue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Add agents to chat queues
-exports.addAgents = function(req, res, next) {
-
-  return ChatQueue
-    .findById(req.params.id)
-    .then(function(chatQueue) {
-      if (!chatQueue) {
-        return res.sendStatus(404);
-      }
-      var userHasChatQueues = _.map(req.body.agents, function(agent) {
-        return {
-          UserId: agent,
-          penalty: req.body.penalty,
-          ChatQueueId: chatQueue.id,
-          queue: chatQueue.name
-        };
-      });
-
-      return UserHasChatQueue
-        .bulkCreate(userHasChatQueues, {
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.removeAgents = function(req, res, next) {
-  return ChatQueue
-    .findById(req.params.id)
-    .then(function(chatQueue) {
-      if (!chatQueue) {
-        return res.sendStatus(404);
-      }
-      return chatQueue
-        .removeUsers(req.query.agents, {
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a chat_queue from the DB.
-exports.destroy = function(req, res) {
-  return ChatQueue
-    .findById(req.params.id)
-    .then(function(chat_queue) {
-      if (!chat_queue) {
-        return res.sendStatus(404);
-      }
-      return chat_queue.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a agent from the DB.
-exports.bulkDestroy = function(req, res) {
-  return ChatQueue
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x4c57=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x6F\x77\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x73","\x62\x6F\x64\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x55\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x4c57[0];var _=require(_0x4c57[1]);var Util=require(_0x4c57[2]);var ChatQueue=require(_0x4c57[4])[_0x4c57[3]];var User=require(_0x4c57[4])[_0x4c57[5]];var UserHasChatQueue=require(_0x4c57[4])[_0x4c57[6]];exports[_0x4c57[7]]= function(_0x7a9bx6,_0x7a9bx7){switch(_0x7a9bx6[_0x4c57[15]][_0x4c57[24]]){case _0x4c57[15]:return User[_0x4c57[16]](_0x7a9bx6[_0x4c57[15]][_0x4c57[14]],{attributes:[_0x4c57[14]]})[_0x4c57[11]](Util[_0x4c57[13]](_0x7a9bx6[_0x4c57[12]]))[_0x4c57[11]](function(_0x7a9bx9){_0x7a9bx7[_0x4c57[10]](200)[_0x4c57[9]](_0x7a9bx9)})[_0x4c57[8]](function(_0x7a9bx8){return handleError(_0x7a9bx7,_0x7a9bx8)});default:return ChatQueue[_0x4c57[23]](_0x4c57[22])[_0x4c57[21]](_[_0x4c57[20]](Util[_0x4c57[19]](_0x7a9bx6[_0x4c57[12]]),{distinct:true}))[_0x4c57[11]](function(_0x7a9bx9){return _0x7a9bx7[_0x4c57[10]](200)[_0x4c57[9]]({rows:_0x7a9bx9[_0x4c57[17]],count:_0x7a9bx9[_0x4c57[17]][_0x4c57[18]]})})[_0x4c57[8]](function(_0x7a9bx8){return handleError(_0x7a9bx7,_0x7a9bx8)})}};exports[_0x4c57[25]]= function(_0x7a9bx6,_0x7a9bx7,_0x7a9bxa){return UserHasChatQueue[_0x4c57[26]]({where:{UserId:_0x7a9bx6[_0x4c57[15]][_0x4c57[14]]}})[_0x4c57[11]](function(_0x7a9bxb){return _0x7a9bx7[_0x4c57[10]](200)[_0x4c57[9]](_0x7a9bxb)})[_0x4c57[8]](function(_0x7a9bx8){return handleError(_0x7a9bx7,_0x7a9bx8)})};exports[_0x4c57[27]]= function(_0x7a9bx6,_0x7a9bx7){return ChatQueue[_0x4c57[16]](_0x7a9bx6[_0x4c57[29]][_0x4c57[14]])[_0x4c57[11]](function(_0x7a9bxc){if(!_0x7a9bxc){return _0x7a9bx7[_0x4c57[28]](404)};return _0x7a9bx7[_0x4c57[9]](_0x7a9bxc)})[_0x4c57[8]](function(_0x7a9bx8){return handleError(_0x7a9bx7,_0x7a9bx8)})};exports[_0x4c57[30]]= function(_0x7a9bx6,_0x7a9bx7){return ChatQueue[_0x4c57[16]](_0x7a9bx6[_0x4c57[29]][_0x4c57[14]])[_0x4c57[11]](function(_0x7a9bxe){if(!_0x7a9bxe){return _0x7a9bx7[_0x4c57[28]](404)};return _0x7a9bxe[_0x4c57[35]]({where:{role:_0x4c57[31]},attributes:[_0x4c57[14],_0x4c57[32],_0x4c57[33],_0x4c57[34]]})})[_0x4c57[11]](function(_0x7a9bxd){return _0x7a9bx7[_0x4c57[10]](200)[_0x4c57[9]]({rows:_0x7a9bxd,count:_0x7a9bxd[_0x4c57[18]]})})[_0x4c57[8]](function(_0x7a9bx8){return handleError(_0x7a9bx7,_0x7a9bx8)})};exports[_0x4c57[36]]= function(_0x7a9bx6,_0x7a9bx7){var _0x7a9bxf;return ChatQueue[_0x4c57[36]](_0x7a9bx6[_0x4c57[38]])[_0x4c57[11]](function(_0x7a9bx10){_0x7a9bxf= _0x7a9bx10;if(_0x7a9bx6[_0x4c57[38]][_0x4c57[37]]){return _0x7a9bxf[_0x4c57[40]](_0x7a9bx6[_0x4c57[38]][_0x4c57[37]],{penalty:_0x7a9bx6[_0x4c57[38]][_0x4c57[39]]|| 0,queue:_0x7a9bxf[_0x4c57[32]]})}})[_0x4c57[11]](function(){return _0x7a9bx7[_0x4c57[10]](201)[_0x4c57[9]](_0x7a9bxf)})[_0x4c57[8]](function(_0x7a9bx8){return handleError(_0x7a9bx7,_0x7a9bx8)})};exports[_0x4c57[41]]= function(_0x7a9bx6,_0x7a9bx7){if(_0x7a9bx6[_0x4c57[38]][_0x4c57[14]]){delete _0x7a9bx6[_0x4c57[38]][_0x4c57[14]]};return ChatQueue[_0x4c57[16]](_0x7a9bx6[_0x4c57[29]][_0x4c57[14]])[_0x4c57[11]](function(_0x7a9bxc){if(!_0x7a9bxc){return _0x7a9bx7[_0x4c57[28]](404)};var _0x7a9bx11=_[_0x4c57[20]](_0x7a9bxc,_0x7a9bx6[_0x4c57[38]]);return _0x7a9bx11[_0x4c57[42]]()})[_0x4c57[11]](function(_0x7a9bxc){return _0x7a9bx7[_0x4c57[10]](200)[_0x4c57[9]](_0x7a9bxc)})[_0x4c57[8]](function(_0x7a9bx8){return handleError(_0x7a9bx7,_0x7a9bx8)})};exports[_0x4c57[43]]= function(_0x7a9bx6,_0x7a9bx7,_0x7a9bxa){return ChatQueue[_0x4c57[16]](_0x7a9bx6[_0x4c57[29]][_0x4c57[14]])[_0x4c57[11]](function(_0x7a9bx10){if(!_0x7a9bx10){return _0x7a9bx7[_0x4c57[28]](404)};var _0x7a9bxb=_[_0x4c57[44]](_0x7a9bx6[_0x4c57[38]][_0x4c57[37]],function(_0x7a9bx12){return {UserId:_0x7a9bx12,penalty:_0x7a9bx6[_0x4c57[38]][_0x4c57[39]],ChatQueueId:_0x7a9bx10[_0x4c57[14]],queue:_0x7a9bx10[_0x4c57[32]]}});return UserHasChatQueue[_0x4c57[45]](_0x7a9bxb,{individualHooks:true})})[_0x4c57[11]](function(){return _0x7a9bx7[_0x4c57[28]](200)})[_0x4c57[8]](function(_0x7a9bx8){return handleError(_0x7a9bx7,_0x7a9bx8)})};exports[_0x4c57[46]]= function(_0x7a9bx6,_0x7a9bx7,_0x7a9bxa){return ChatQueue[_0x4c57[16]](_0x7a9bx6[_0x4c57[29]][_0x4c57[14]])[_0x4c57[11]](function(_0x7a9bx10){if(!_0x7a9bx10){return _0x7a9bx7[_0x4c57[28]](404)};return _0x7a9bx10[_0x4c57[47]](_0x7a9bx6[_0x4c57[12]][_0x4c57[37]],{individualHooks:true})})[_0x4c57[11]](function(){return _0x7a9bx7[_0x4c57[28]](200)})[_0x4c57[8]](function(_0x7a9bx8){return handleError(_0x7a9bx7,_0x7a9bx8)})};exports[_0x4c57[48]]= function(_0x7a9bx6,_0x7a9bx7){return ChatQueue[_0x4c57[16]](_0x7a9bx6[_0x4c57[29]][_0x4c57[14]])[_0x4c57[11]](function(_0x7a9bxc){if(!_0x7a9bxc){return _0x7a9bx7[_0x4c57[28]](404)};return _0x7a9bxc[_0x4c57[48]]()})[_0x4c57[11]](function(){return _0x7a9bx7[_0x4c57[28]](204)})[_0x4c57[8]](function(_0x7a9bx8){return handleError(_0x7a9bx7,_0x7a9bx8)})};exports[_0x4c57[49]]= function(_0x7a9bx6,_0x7a9bx7){return ChatQueue[_0x4c57[48]]({where:{id:_0x7a9bx6[_0x4c57[12]][_0x4c57[50]]},individualHooks:true})[_0x4c57[11]](function(){return _0x7a9bx7[_0x4c57[28]](204)})[_0x4c57[8]](function(_0x7a9bx8){return handleError(_0x7a9bx7,_0x7a9bx8)})};function handleError(_0x7a9bx7,_0x7a9bx8){return _0x7a9bx7[_0x4c57[10]](500)[_0x4c57[9]](_0x7a9bx8)}
\ No newline at end of file
diff --git a/server/api/chat_queue/chat_queue.events.js b/server/api/chat_queue/chat_queue.events.js
index 7fe734e..9d661d9 100644
--- a/server/api/chat_queue/chat_queue.events.js
+++ b/server/api/chat_queue/chat_queue.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ChatQueue = require('../../models').ChatQueue;
-
-var ChatQueueEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ChatQueueEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ChatQueue.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ChatQueueEvents.emit(event + ':' + doc._id, doc);
-    ChatQueueEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ChatQueueEvents;
+var _0xdd4c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xdd4c[0];const EventEmitter=require(_0xdd4c[1]);const ChatQueue=require(_0xdd4c[3])[_0xdd4c[2]];var ChatQueueEvents= new EventEmitter();ChatQueueEvents[_0xdd4c[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xdd4c[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xdd4c[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xdd4c[6]};for(var e in events){var event=events[e];ChatQueue[_0xdd4c[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x8837x8,_0x8837x9,_0x8837xa){ChatQueueEvents[_0xdd4c[10]](event+ _0xdd4c[8]+ _0x8837x8[_0xdd4c[9]],_0x8837x8);ChatQueueEvents[_0xdd4c[10]](event,_0x8837x8);_0x8837xa(null)}}module[_0xdd4c[11]]= ChatQueueEvents
\ No newline at end of file
diff --git a/server/api/chat_queue/chat_queue.socket.js b/server/api/chat_queue/chat_queue.socket.js
index cee7104..1319ad0 100644
--- a/server/api/chat_queue/chat_queue.socket.js
+++ b/server/api/chat_queue/chat_queue.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const ChatQueueEvents = require('./chat_queue.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('chat_queue:' + event, socket);
-
-    ChatQueueEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ChatQueueEvents.removeListener(event, listener);
-  };
-}
+var _0xa395=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xa395[0];const ChatQueueEvents=require(_0xa395[1]);var events=[_0xa395[2],_0xa395[3]];exports[_0xa395[4]]= function(_0xb834x3){for(var _0xb834x4=0,_0xb834x5=events[_0xa395[5]];_0xb834x4< _0xb834x5;_0xb834x4++){var _0xb834x6=events[_0xb834x4];var _0xb834x7=createListener(_0xa395[6]+ _0xb834x6,_0xb834x3);ChatQueueEvents[_0xa395[7]](_0xb834x6,_0xb834x7);_0xb834x3[_0xa395[7]](_0xa395[8],removeListener(_0xb834x6,_0xb834x7))}};function createListener(_0xb834x6,_0xb834x3){return function(_0xb834x9){_0xb834x3[_0xa395[9]](_0xb834x6,_0xb834x9)}}function removeListener(_0xb834x6,_0xb834x7){return function(){ChatQueueEvents[_0xa395[10]](_0xb834x6,_0xb834x7)}}
\ No newline at end of file
diff --git a/server/api/chat_queue/index.js b/server/api/chat_queue/index.js
index 48b9b5b..3e9bec7 100644
--- a/server/api/chat_queue/index.js
+++ b/server/api/chat_queue/index.js
@@ -1,23 +1 @@
-'use strict';
-
-var express = require('express');
-
-var controller = require('./chat_queue.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.index);
-router.get('/me', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.me);
-router.get('/:id/agents', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.showAgents);
-router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.show);
-router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasRole('admin'), controller.create);
-router.post('/:id/agents', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasRole('admin'), controller.addAgents);
-router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasRole('admin'), controller.update);
-router.delete('/:id/agents', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasRole('admin'), controller.removeAgents);
-router.patch('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasRole('admin'), controller.update);
-router.delete('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasRole('admin'), controller.bulkDestroy);
-router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy);
-
-module.exports = router;
+var _0x876d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x6D\x65","\x6D\x65","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x68\x61\x73\x52\x6F\x6C\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x6C\x65\x74\x65","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x876d[0];var express=require(_0x876d[1]);var controller=require(_0x876d[2]);var auth=require(_0x876d[3]);var license=require(_0x876d[4]);var router=express.Router();router[_0x876d[12]](_0x876d[5],license[_0x876d[6]](),license[_0x876d[7]](),auth[_0x876d[8]](),auth[_0x876d[10]]([8],[_0x876d[9]]),controller[_0x876d[11]]);router[_0x876d[12]](_0x876d[13],license[_0x876d[6]](),license[_0x876d[7]](),auth[_0x876d[8]](),auth[_0x876d[10]]([8],[_0x876d[9]]),controller[_0x876d[14]]);router[_0x876d[12]](_0x876d[15],license[_0x876d[6]](),license[_0x876d[7]](),auth[_0x876d[8]](),auth[_0x876d[10]]([8],[_0x876d[9]]),controller[_0x876d[16]]);router[_0x876d[12]](_0x876d[17],license[_0x876d[6]](),license[_0x876d[7]](),auth[_0x876d[8]](),auth[_0x876d[10]]([8],[_0x876d[9]]),controller[_0x876d[18]]);router[_0x876d[21]](_0x876d[5],license[_0x876d[6]](),license[_0x876d[7]](),auth[_0x876d[8]](),auth[_0x876d[19]](_0x876d[9]),controller[_0x876d[20]]);router[_0x876d[21]](_0x876d[15],license[_0x876d[6]](),license[_0x876d[7]](),auth[_0x876d[8]](),auth[_0x876d[19]](_0x876d[9]),controller[_0x876d[22]]);router[_0x876d[24]](_0x876d[17],license[_0x876d[6]](),license[_0x876d[7]](),auth[_0x876d[8]](),auth[_0x876d[19]](_0x876d[9]),controller[_0x876d[23]]);router[_0x876d[26]](_0x876d[15],license[_0x876d[6]](),license[_0x876d[7]](),auth[_0x876d[8]](),auth[_0x876d[19]](_0x876d[9]),controller[_0x876d[25]]);router[_0x876d[27]](_0x876d[17],license[_0x876d[6]](),license[_0x876d[7]](),auth[_0x876d[8]](),auth[_0x876d[19]](_0x876d[9]),controller[_0x876d[23]]);router[_0x876d[26]](_0x876d[5],license[_0x876d[6]](),license[_0x876d[7]](),auth[_0x876d[8]](),auth[_0x876d[19]](_0x876d[9]),controller[_0x876d[28]]);router[_0x876d[26]](_0x876d[17],license[_0x876d[6]](),license[_0x876d[7]](),auth[_0x876d[8]](),auth[_0x876d[19]](_0x876d[9]),controller[_0x876d[29]]);module[_0x876d[30]]= router
\ No newline at end of file
diff --git a/server/api/chat_room/chat_room.controller.js b/server/api/chat_room/chat_room.controller.js
index 47b4932..6ac9f3d 100644
--- a/server/api/chat_room/chat_room.controller.js
+++ b/server/api/chat_room/chat_room.controller.js
@@ -1,655 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var md5 = require('md5');
-var moment = require('moment');
-var csv = require('to-csv');
-var util = require('util');
-
-var Util = require('../../config/util');
-
-var User = require('../../models').User;
-var Agent = require('../../models').User;
-var ChatRoom = require('../../models').ChatRoom;
-var ChatMessage = require('../../models').ChatMessage;
-var ChatWebsite = require('../../models').ChatWebsite;
-var ChatApplication = require('../../models').ChatApplication;
-var ChatQueue = require('../../models').ChatQueue;
-var ChatVisitor = require('../../models').ChatVisitor;
-var List = require('../../models').List;
-var UserHasChatRoom = require('../../models').UserHasChatRoom;
-
-// Get list of chat_rooms
-exports.index = function(req, res, next) {
-  return ChatRoom
-    .findAndCountAll(_.merge(Util.getQuery(req.query), {
-      include: [{
-        model: User,
-        attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal']
-      }, {
-        model: ChatMessage
-      }, {
-        model: ChatVisitor
-      }]
-    }))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return ChatRoom
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function getChatQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return User
-          .findById(user.id, {
-            attributes: ['id']
-          })
-          .then(Util.getChatQueuesIdByUser({}, {
-            attributes: ['id']
-          }))
-          .then(function(userQueues) {
-            return {
-              include: {
-                model: ChatWebsite,
-                include: {
-                  model: ChatApplication,
-                  include: {
-                    model: ChatQueue,
-                    where: {
-                      id: _.map(userQueues, 'id')
-                    }
-                  }
-                }
-              }
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
-
-exports.unmanaged = function(req, res) {
-  return Promise
-    .all([])
-    .then(getChatQueues(req.user))
-    .then(function(condition) {
-      return ChatRoom
-        .count(_.merge(Util.getQuery(req.query, {
-          status: 'UNMANAGED',
-          updatedAt: {
-            $gte: moment().startOf('day')
-          }
-        }), condition));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.updatePatch = function(req, res, next) {
-  var _values = {
-    tags: req.body.tags
-  };
-  var _options = {
-    where: {
-      id: req.params.id.split(',')
-    }
-  };
-
-  return ChatRoom
-    .update(_values, _options)
-    .then(function(chatRooms) {
-      if (!chatRooms) {
-        return res.sendStatus(404);
-      }
-      return chatRooms
-    })
-    .then(function(chatRooms) {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function checkTags(query) {
-  if (query) {
-    if (query.tags) {
-      query.$and = [];
-      if (_.isArray(query.tags)) {
-        for (var i = 0; i < query.tags.length; i++) {
-          query.$and.push({
-            tags: {
-              $like: '%' + query.tags[i] + ';%'
-            }
-          });
-        }
-      } else {
-        query.$and.push({
-          tags: {
-            $like: '%' + query.tags + ';%'
-          }
-        });
-      }
-
-      delete query.tags;
-    }
-  }
-}
-
-exports.getAgents = function(req, res, next) {
-  switch (req.user.role) {
-    case 'user':
-      return User
-        .findById(req.user.id, {
-          attributes: ['id'],
-          where: {
-            id: {
-              $ne: req.user.id
-            },
-            online: true
-          }
-        })
-        .then(Util.getAgentsIdByUser(_.merge(req.query, {
-          id: {
-            $ne: req.user.id
-          }
-        })))
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-
-    default:
-      return User
-        .scope('all')
-        .findAndCountAll(_.merge(Util.getQuery(req.query), {
-          where: {
-            id: {
-              $ne: req.user.id
-            },
-            online: true
-          }
-        }))
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-  }
-};
-
-exports.getGroups = function(req, res, next) {
-  checkTags(req.query);
-  var _query = {
-    where: _.merge({
-      type: 'group'
-    }, req.query)
-  };
-
-  switch (req.user.role) {
-    case 'agent':
-      _.merge(_query, {
-        include: [{
-          model: User,
-          attributes: ['id'],
-          where: {
-            id: req.user.id
-          }
-        }]
-      })
-      break;
-
-    default:
-  }
-
-  return ChatRoom
-    .findAll(_query)
-    .then(function(chatRooms) {
-      return ChatRoom
-        .findAll({
-          where: {
-            id: {
-              $in: _.map(chatRooms, 'id')
-            }
-          },
-          include: [{
-            model: User,
-            attributes: ['id', 'name', 'fullname', 'role', 'userpic']
-          }, {
-            model: ChatVisitor
-          }]
-        });
-    })
-    .then(function(chatRooms) {
-      return res.status(200).send({
-        rows: chatRooms,
-        count: chatRooms.length
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getExternals = function(req, res, next) {
-  checkTags(req.query);
-  var _query = {
-    where: _.merge({
-      type: 'external'
-    }, req.query),
-    include: [{
-      model: ChatVisitor,
-      attributes: ['id', 'fullname']
-    }]
-  };
-
-  switch (req.user.role) {
-    case 'agent':
-      _query.include.push({
-        model: User,
-        attributes: ['id'],
-        where: {
-          id: req.user.id
-        }
-      });
-
-      break;
-    default:
-  }
-
-  return ChatRoom
-    .findAll(_query)
-    .then(function(chatRooms) {
-      return res.status(200).send({
-        rows: chatRooms,
-        count: chatRooms.length
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getAgent = function(req, res, next) {
-  return User
-    .scope('all')
-    .findById(req.params.id)
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getOnlineRoom = function(req, res, next) {
-  return ChatRoom
-    .scope('online')
-    .findAndCountAll(_.merge(Util.getQuery(req.query), {
-      include: [{
-        model: User,
-        attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal']
-      }, {
-        model: ChatMessage
-      }, {
-        model: ChatVisitor
-      }]
-    }))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Get list of my chat_rooms
-exports.me = function(req, res) {
-  return User
-    .findById(req.user.id)
-    .then(function(user) {
-      return user
-        .getChatRooms({
-          include: [{
-            model: ChatVisitor,
-            attributes: ['id', 'fullname', 'email']
-          }, {
-            model: User,
-            attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal']
-          }]
-        });
-    })
-    .then(function(chatRooms) {
-      if (!chatRooms) {
-        return res.sendStatus(404);
-      }
-      return res.send(chatRooms);
-    })
-    .catch(function(err) {
-      console.error(err);
-      return handleError(res, err);
-    });
-};
-
-// Get a single chatRoom
-exports.show = function(req, res) {
-  return ChatRoom
-    .findById(req.params.id, {
-      include: [{
-        model: ChatMessage,
-        include: [{
-          model: ChatVisitor,
-          attributes: ['id', 'email', 'fullname']
-        }, {
-          model: User,
-          attributes: ['id', 'email', 'name', 'fullname', 'userpic', 'role', 'internal']
-        }]
-      }, {
-        model: User,
-        attributes: ['id', 'email', 'name', 'fullname', 'userpic', 'role', 'internal']
-      }, {
-        model: ChatVisitor
-      }, {
-        model: ChatWebsite,
-        attributes: ['id', 'name', 'address'],
-        include: [List]
-      }]
-    })
-    .then(function(chatRoom) {
-      if (!chatRoom) {
-        return res.sendStatus(404);
-      }
-      return res.send(chatRoom);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single chatRoom by users
-exports.getRoomByUsers = function(req, res, next) {
-
-  var _chatRoom;
-
-  return ChatRoom
-    .findOrCreate({
-      where: {
-        token: md5(JSON.stringify(req.query.users.sort())).toString('base64')
-      },
-      defaults: {
-        type: 'internal',
-        token: md5(JSON.stringify(req.query.users.sort())).toString('base64'),
-        status: 'OPEN'
-      },
-      include: [{
-        model: ChatMessage,
-        include: [{
-          model: ChatVisitor,
-          attributes: ['id', 'email', 'fullname']
-        }, {
-          model: User,
-          attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal']
-        }]
-      }, {
-        model: User,
-        attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal']
-      }]
-    })
-    .spread(function(chatRoom, created) {
-      _chatRoom = chatRoom;
-      if (created) {
-        return _chatRoom
-          .setUsers(req.query.users);
-      }
-    })
-    .then(function() {
-      return _chatRoom
-        .getUsers();
-    })
-    .then(function(users) {
-      return res.status(200).send(_.merge(_chatRoom.dataValues, {
-        Users: users
-      }));
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.createMessage = function(req, res, next) {
-  var _chatRoom;
-
-  return ChatRoom
-    .findById(req.params.id)
-    .then(function(chatRoom) {
-      _chatRoom = chatRoom;
-
-      if (!_chatRoom) {
-        return res.sendStatus(404);
-      }
-    })
-    .then(function() {
-      return ChatMessage
-        .create(_.merge(req.body, {
-          type: _chatRoom.type,
-          ChatRoomId: req.params.id,
-          UserId: req.user.id
-        }));
-    })
-    .then(function(chatMessage) {
-      return res.status(200).send(chatMessage);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.export = function(req, res, next) {
-  return ChatRoom
-    .findById(req.params.id, {
-      include: [{
-        model: ChatMessage,
-        include: [{
-          model: ChatVisitor,
-          attributes: ['id', 'fullname']
-        }, {
-          model: User,
-          attributes: ['id', 'fullname']
-        }]
-      }]
-    })
-    .then(function(chatRoom) {
-      var chatMessageForCSV = [];
-      chatRoom.ChatMessages.forEach(function(chatMessage) {
-        chatMessageForCSV.push({
-          name: chatMessage.User ? chatMessage.User.fullname : chatMessage.ChatVisitor.fullname,
-          text: chatMessage.body.replace(/(\r\n|\n|\r)/gm, " "),
-          date: chatMessage.createdAt
-        });
-      });
-      return res.type('text/csv')
-        .status(200).send(csv(chatMessageForCSV));
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single chatRoom
-exports.getRoomByType = function(req, res) {
-  return User
-    .findById(req.user.id)
-    .then(function(user) {
-      return user
-        .getChatRooms({
-          where: {
-            type: req.params.type
-          },
-          include: [{
-            model: ChatVisitor,
-            attributes: ['id', 'fullname', 'email']
-          }]
-        });
-    })
-    .then(function(chatRooms) {
-      if (!chatRooms) {
-        return res.sendStatus(404);
-      }
-      return res.send(chatRooms);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single chatRoom
-exports.getRoomGroups = function(req, res) {
-  return User
-    .findById(req.user.id)
-    .then(function(user) {
-      return user
-        .getChatRooms({
-          include: [{
-            model: ChatVisitor,
-            attributes: ['id', 'fullname', 'email']
-          }, {
-            model: User,
-            attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal']
-          }]
-        });
-    })
-    .then(function(chatRooms) {
-      if (!chatRooms) {
-        return res.sendStatus(404);
-      }
-      return res.send(chatRooms);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new chatRoom in the DB.
-exports.create = function(req, res) {};
-
-// Updates an existing chatRoom in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return ChatRoom
-    .findById(req.params.id)
-    .then(function(chatRoom) {
-      if (!chatRoom) {
-        return res.sendStatus(404);
-      }
-      return chatRoom
-        .update(req.body);
-    })
-    .then(function(chatRoom) {
-      return res.status(200).send(chatRoom);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing chatRoom in the DB.
-exports.updateUsers = function(req, res) {
-  var _chatRoom;
-
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return ChatRoom
-    .findById(req.params.id)
-    .then(function(chatRoom) {
-      if (!chatRoom || !req.body.users) {
-        return res.sendStatus(404);
-      }
-      return chatRoom;
-    })
-    .then(function(chatRoom) {
-      return chatRoom
-        .update({
-          type: 'group',
-          token: md5(JSON.stringify(req.body.users.sort())).toString('base64')
-        });
-    })
-    .then(function(chatRoom) {
-      _chatRoom = chatRoom;
-      return chatRoom
-        .setUsers(req.body.users.sort(), {
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return _chatRoom
-        .getUsers();
-    })
-    .then(function(users) {
-      _.merge(_chatRoom.dataValues, {
-        Users: users
-      });
-
-      return res.status(200).send(_chatRoom);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a chatRoom from the DB.
-exports.destroy = function(req, res) {
-  return ChatRoom
-    .findById(req.params.id)
-    .then(function(chatRoom) {
-      if (!chatRoom) {
-        return res.sendStatus(404);
-      }
-      return chatRoom
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  console.log(err);
-  return res.status(500).send(err);
-}
+var _0x324d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x64\x35","\x6D\x6F\x6D\x65\x6E\x74","\x74\x6F\x2D\x63\x73\x76","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x4C\x69\x73\x74","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x69\x64","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x72\x6F\x6C\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x6D\x61\x70","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x74\x61\x67\x73","\x62\x6F\x64\x79","\x2C","\x73\x70\x6C\x69\x74","\x70\x61\x72\x61\x6D\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x24\x61\x6E\x64","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x25","\x3B\x25","\x70\x75\x73\x68","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x73\x63\x6F\x70\x65","\x67\x65\x74\x47\x72\x6F\x75\x70\x73","\x67\x72\x6F\x75\x70","\x61\x67\x65\x6E\x74","\x75\x73\x65\x72\x70\x69\x63","\x66\x69\x6E\x64\x41\x6C\x6C","\x67\x65\x74\x45\x78\x74\x65\x72\x6E\x61\x6C\x73","\x65\x78\x74\x65\x72\x6E\x61\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x67\x65\x74\x41\x67\x65\x6E\x74","\x67\x65\x74\x4F\x6E\x6C\x69\x6E\x65\x52\x6F\x6F\x6D","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x65","\x65\x72\x72\x6F\x72","\x67\x65\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D\x73","\x73\x68\x6F\x77","\x61\x64\x64\x72\x65\x73\x73","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x55\x73\x65\x72\x73","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x67\x65\x74\x55\x73\x65\x72\x73","\x75\x73\x65\x72\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x73\x70\x72\x65\x61\x64","\x62\x61\x73\x65\x36\x34","\x73\x6F\x72\x74","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x4F\x50\x45\x4E","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x74\x79\x70\x65","\x63\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74","\x20","\x72\x65\x70\x6C\x61\x63\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x66\x6F\x72\x45\x61\x63\x68","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x74\x65\x78\x74\x2F\x63\x73\x76","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x54\x79\x70\x65","\x67\x65\x74\x52\x6F\x6F\x6D\x47\x72\x6F\x75\x70\x73","\x75\x70\x64\x61\x74\x65\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79"];_0x324d[0];var _=require(_0x324d[1]);var md5=require(_0x324d[2]);var moment=require(_0x324d[3]);var csv=require(_0x324d[4]);var util=require(_0x324d[5]);var Util=require(_0x324d[6]);var User=require(_0x324d[8])[_0x324d[7]];var Agent=require(_0x324d[8])[_0x324d[7]];var ChatRoom=require(_0x324d[8])[_0x324d[9]];var ChatMessage=require(_0x324d[8])[_0x324d[10]];var ChatWebsite=require(_0x324d[8])[_0x324d[11]];var ChatApplication=require(_0x324d[8])[_0x324d[12]];var ChatQueue=require(_0x324d[8])[_0x324d[13]];var ChatVisitor=require(_0x324d[8])[_0x324d[14]];var List=require(_0x324d[8])[_0x324d[15]];var UserHasChatRoom=require(_0x324d[8])[_0x324d[16]];exports[_0x324d[17]]= function(_0x8148x11,_0x8148x12,_0x8148x13){return ChatRoom[_0x324d[32]](_[_0x324d[31]](Util[_0x324d[24]](_0x8148x11[_0x324d[23]]),{include:[{model:User,attributes:[_0x324d[25],_0x324d[26],_0x324d[27],_0x324d[28],_0x324d[29],_0x324d[30]]},{model:ChatMessage},{model:ChatVisitor}]}))[_0x324d[22]](function(_0x8148x15){_0x8148x12[_0x324d[21]](200)[_0x324d[20]](_0x8148x15)})[_0x324d[19]](function(_0x8148x14){console[_0x324d[18]](_0x8148x14);return handleError(_0x8148x12,_0x8148x14)})};exports[_0x324d[33]]= function(_0x8148x11,_0x8148x12){return ChatRoom[_0x324d[33]]()[_0x324d[22]](function(_0x8148x16){return _0x8148x12[_0x324d[21]](200)[_0x324d[20]](_0x8148x16)})[_0x324d[19]](function(_0x8148x14){return handleError(_0x8148x12,_0x8148x14)})};function getChatQueues(_0x8148x18){return function(){switch(_0x8148x18[_0x324d[29]]){case _0x324d[37]:return User[_0x324d[36]](_0x8148x18[_0x324d[25]],{attributes:[_0x324d[25]]})[_0x324d[22]](Util[_0x324d[35]]({},{attributes:[_0x324d[25]]}))[_0x324d[22]](function(_0x8148x19){return {include:{model:ChatWebsite,include:{model:ChatApplication,include:{model:ChatQueue,where:{id:_[_0x324d[34]](_0x8148x19,_0x324d[25])}}}}}});default:return {}}}}exports[_0x324d[38]]= function(_0x8148x11,_0x8148x12){return Promise[_0x324d[43]]([])[_0x324d[22]](getChatQueues(_0x8148x11[_0x324d[37]]))[_0x324d[22]](function(_0x8148x1b){return ChatRoom[_0x324d[42]](_[_0x324d[31]](Util[_0x324d[24]](_0x8148x11[_0x324d[23]],{status:_0x324d[39],updatedAt:{$gte:moment()[_0x324d[41]](_0x324d[40])}}),_0x8148x1b))})[_0x324d[22]](function(_0x8148x1a){return _0x8148x12[_0x324d[21]](200)[_0x324d[20]]({value:_0x8148x1a})})[_0x324d[19]](function(_0x8148x14){console[_0x324d[18]](_0x8148x14);return handleError(_0x8148x12,_0x8148x14)})};exports[_0x324d[44]]= function(_0x8148x11,_0x8148x12,_0x8148x13){var _0x8148x1c={tags:_0x8148x11[_0x324d[46]][_0x324d[45]]};var _0x8148x1d={where:{id:_0x8148x11[_0x324d[49]][_0x324d[25]][_0x324d[48]](_0x324d[47])}};return ChatRoom[_0x324d[51]](_0x8148x1c,_0x8148x1d)[_0x324d[22]](function(_0x8148x1e){if(!_0x8148x1e){return _0x8148x12[_0x324d[50]](404)};return _0x8148x1e})[_0x324d[22]](function(_0x8148x1e){return _0x8148x12[_0x324d[50]](200)})[_0x324d[19]](function(_0x8148x14){return handleError(_0x8148x12,_0x8148x14)})};function checkTags(_0x8148x20){if(_0x8148x20){if(_0x8148x20[_0x324d[45]]){_0x8148x20[_0x324d[52]]= [];if(_[_0x324d[53]](_0x8148x20[_0x324d[45]])){for(var _0x8148x21=0;_0x8148x21< _0x8148x20[_0x324d[45]][_0x324d[54]];_0x8148x21++){_0x8148x20[_0x324d[52]][_0x324d[57]]({tags:{$like:_0x324d[55]+ _0x8148x20[_0x324d[45]][_0x8148x21]+ _0x324d[56]}})}}else {_0x8148x20[_0x324d[52]][_0x324d[57]]({tags:{$like:_0x324d[55]+ _0x8148x20[_0x324d[45]]+ _0x324d[56]}})};delete _0x8148x20[_0x324d[45]]}}}exports[_0x324d[58]]= function(_0x8148x11,_0x8148x12,_0x8148x13){switch(_0x8148x11[_0x324d[37]][_0x324d[29]]){case _0x324d[37]:return User[_0x324d[36]](_0x8148x11[_0x324d[37]][_0x324d[25]],{attributes:[_0x324d[25]],where:{id:{$ne:_0x8148x11[_0x324d[37]][_0x324d[25]]},online:true}})[_0x324d[22]](Util[_0x324d[59]](_[_0x324d[31]](_0x8148x11[_0x324d[23]],{id:{$ne:_0x8148x11[_0x324d[37]][_0x324d[25]]}})))[_0x324d[22]](function(_0x8148x15){return _0x8148x12[_0x324d[21]](200)[_0x324d[20]](_0x8148x15)})[_0x324d[19]](function(_0x8148x14){return handleError(_0x8148x12,_0x8148x14)});default:return User[_0x324d[60]](_0x324d[43])[_0x324d[32]](_[_0x324d[31]](Util[_0x324d[24]](_0x8148x11[_0x324d[23]]),{where:{id:{$ne:_0x8148x11[_0x324d[37]][_0x324d[25]]},online:true}}))[_0x324d[22]](function(_0x8148x15){return _0x8148x12[_0x324d[21]](200)[_0x324d[20]](_0x8148x15)})[_0x324d[19]](function(_0x8148x14){return handleError(_0x8148x12,_0x8148x14)})}};exports[_0x324d[61]]= function(_0x8148x11,_0x8148x12,_0x8148x13){checkTags(_0x8148x11[_0x324d[23]]);var _0x8148x22={where:_[_0x324d[31]]({type:_0x324d[62]},_0x8148x11[_0x324d[23]])};switch(_0x8148x11[_0x324d[37]][_0x324d[29]]){case _0x324d[63]:_[_0x324d[31]](_0x8148x22,{include:[{model:User,attributes:[_0x324d[25]],where:{id:_0x8148x11[_0x324d[37]][_0x324d[25]]}}]});break;default:};return ChatRoom[_0x324d[65]](_0x8148x22)[_0x324d[22]](function(_0x8148x1e){return ChatRoom[_0x324d[65]]({where:{id:{$in:_[_0x324d[34]](_0x8148x1e,_0x324d[25])}},include:[{model:User,attributes:[_0x324d[25],_0x324d[26],_0x324d[27],_0x324d[29],_0x324d[64]]},{model:ChatVisitor}]})})[_0x324d[22]](function(_0x8148x1e){return _0x8148x12[_0x324d[21]](200)[_0x324d[20]]({rows:_0x8148x1e,count:_0x8148x1e[_0x324d[54]]})})[_0x324d[19]](function(_0x8148x14){return handleError(_0x8148x12,_0x8148x14)})};exports[_0x324d[66]]= function(_0x8148x11,_0x8148x12,_0x8148x13){checkTags(_0x8148x11[_0x324d[23]]);var _0x8148x22={where:_[_0x324d[31]]({type:_0x324d[67]},_0x8148x11[_0x324d[23]]),include:[{model:ChatVisitor,attributes:[_0x324d[25],_0x324d[27]]}]};switch(_0x8148x11[_0x324d[37]][_0x324d[29]]){case _0x324d[63]:_0x8148x22[_0x324d[68]][_0x324d[57]]({model:User,attributes:[_0x324d[25]],where:{id:_0x8148x11[_0x324d[37]][_0x324d[25]]}});break;default:};return ChatRoom[_0x324d[65]](_0x8148x22)[_0x324d[22]](function(_0x8148x1e){return _0x8148x12[_0x324d[21]](200)[_0x324d[20]]({rows:_0x8148x1e,count:_0x8148x1e[_0x324d[54]]})})[_0x324d[19]](function(_0x8148x14){return handleError(_0x8148x12,_0x8148x14)})};exports[_0x324d[69]]= function(_0x8148x11,_0x8148x12,_0x8148x13){return User[_0x324d[60]](_0x324d[43])[_0x324d[36]](_0x8148x11[_0x324d[49]][_0x324d[25]])[_0x324d[22]](function(_0x8148x15){return _0x8148x12[_0x324d[21]](200)[_0x324d[20]](_0x8148x15)})[_0x324d[19]](function(_0x8148x14){return handleError(_0x8148x12,_0x8148x14)})};exports[_0x324d[70]]= function(_0x8148x11,_0x8148x12,_0x8148x13){return ChatRoom[_0x324d[60]](_0x324d[71])[_0x324d[32]](_[_0x324d[31]](Util[_0x324d[24]](_0x8148x11[_0x324d[23]]),{include:[{model:User,attributes:[_0x324d[25],_0x324d[26],_0x324d[27],_0x324d[28],_0x324d[29],_0x324d[30]]},{model:ChatMessage},{model:ChatVisitor}]}))[_0x324d[22]](function(_0x8148x15){_0x8148x12[_0x324d[21]](200)[_0x324d[20]](_0x8148x15)})[_0x324d[19]](function(_0x8148x14){console[_0x324d[18]](_0x8148x14);return handleError(_0x8148x12,_0x8148x14)})};exports[_0x324d[72]]= function(_0x8148x11,_0x8148x12){return User[_0x324d[36]](_0x8148x11[_0x324d[37]][_0x324d[25]])[_0x324d[22]](function(_0x8148x18){return _0x8148x18[_0x324d[74]]({include:[{model:ChatVisitor,attributes:[_0x324d[25],_0x324d[27],_0x324d[28]]},{model:User,attributes:[_0x324d[25],_0x324d[26],_0x324d[27],_0x324d[28],_0x324d[29],_0x324d[30]]}]})})[_0x324d[22]](function(_0x8148x1e){if(!_0x8148x1e){return _0x8148x12[_0x324d[50]](404)};return _0x8148x12[_0x324d[20]](_0x8148x1e)})[_0x324d[19]](function(_0x8148x14){console[_0x324d[73]](_0x8148x14);return handleError(_0x8148x12,_0x8148x14)})};exports[_0x324d[75]]= function(_0x8148x11,_0x8148x12){return ChatRoom[_0x324d[36]](_0x8148x11[_0x324d[49]][_0x324d[25]],{include:[{model:ChatMessage,include:[{model:ChatVisitor,attributes:[_0x324d[25],_0x324d[28],_0x324d[27]]},{model:User,attributes:[_0x324d[25],_0x324d[28],_0x324d[26],_0x324d[27],_0x324d[64],_0x324d[29],_0x324d[30]]}]},{model:User,attributes:[_0x324d[25],_0x324d[28],_0x324d[26],_0x324d[27],_0x324d[64],_0x324d[29],_0x324d[30]]},{model:ChatVisitor},{model:ChatWebsite,attributes:[_0x324d[25],_0x324d[26],_0x324d[76]],include:[List]}]})[_0x324d[22]](function(_0x8148x23){if(!_0x8148x23){return _0x8148x12[_0x324d[50]](404)};return _0x8148x12[_0x324d[20]](_0x8148x23)})[_0x324d[19]](function(_0x8148x14){return handleError(_0x8148x12,_0x8148x14)})};exports[_0x324d[77]]= function(_0x8148x11,_0x8148x12,_0x8148x13){var _0x8148x24;return ChatRoom[_0x324d[87]]({where:{token:md5(JSON[_0x324d[85]](_0x8148x11[_0x324d[23]][_0x324d[80]][_0x324d[84]]())).toString(_0x324d[83])},defaults:{type:_0x324d[30],token:md5(JSON[_0x324d[85]](_0x8148x11[_0x324d[23]][_0x324d[80]][_0x324d[84]]())).toString(_0x324d[83]),status:_0x324d[86]},include:[{model:ChatMessage,include:[{model:ChatVisitor,attributes:[_0x324d[25],_0x324d[28],_0x324d[27]]},{model:User,attributes:[_0x324d[25],_0x324d[26],_0x324d[27],_0x324d[28],_0x324d[29],_0x324d[30]]}]},{model:User,attributes:[_0x324d[25],_0x324d[26],_0x324d[27],_0x324d[28],_0x324d[29],_0x324d[30]]}]})[_0x324d[82]](function(_0x8148x23,_0x8148x26){_0x8148x24= _0x8148x23;if(_0x8148x26){return _0x8148x24[_0x324d[81]](_0x8148x11[_0x324d[23]][_0x324d[80]])}})[_0x324d[22]](function(){return _0x8148x24[_0x324d[79]]()})[_0x324d[22]](function(_0x8148x25){return _0x8148x12[_0x324d[21]](200)[_0x324d[20]](_[_0x324d[31]](_0x8148x24[_0x324d[78]],{Users:_0x8148x25}))})[_0x324d[19]](function(_0x8148x14){return handleError(_0x8148x12,_0x8148x14)})};exports[_0x324d[88]]= function(_0x8148x11,_0x8148x12,_0x8148x13){var _0x8148x24;return ChatRoom[_0x324d[36]](_0x8148x11[_0x324d[49]][_0x324d[25]])[_0x324d[22]](function(_0x8148x23){_0x8148x24= _0x8148x23;if(!_0x8148x24){return _0x8148x12[_0x324d[50]](404)}})[_0x324d[22]](function(){return ChatMessage[_0x324d[90]](_[_0x324d[31]](_0x8148x11[_0x324d[46]],{type:_0x8148x24[_0x324d[89]],ChatRoomId:_0x8148x11[_0x324d[49]][_0x324d[25]],UserId:_0x8148x11[_0x324d[37]][_0x324d[25]]}))})[_0x324d[22]](function(_0x8148x27){return _0x8148x12[_0x324d[21]](200)[_0x324d[20]](_0x8148x27)})[_0x324d[19]](function(_0x8148x14){return handleError(_0x8148x12,_0x8148x14)})};exports[_0x324d[91]]= function(_0x8148x11,_0x8148x12,_0x8148x13){return ChatRoom[_0x324d[36]](_0x8148x11[_0x324d[49]][_0x324d[25]],{include:[{model:ChatMessage,include:[{model:ChatVisitor,attributes:[_0x324d[25],_0x324d[27]]},{model:User,attributes:[_0x324d[25],_0x324d[27]]}]}]})[_0x324d[22]](function(_0x8148x23){var _0x8148x28=[];_0x8148x23[_0x324d[96]][_0x324d[95]](function(_0x8148x27){_0x8148x28[_0x324d[57]]({name:_0x8148x27[_0x324d[7]]?_0x8148x27[_0x324d[7]][_0x324d[27]]:_0x8148x27[_0x324d[14]][_0x324d[27]],text:_0x8148x27[_0x324d[46]][_0x324d[93]](/(\r\n|\n|\r)/gm,_0x324d[92]),date:_0x8148x27[_0x324d[94]]})});return _0x8148x12[_0x324d[89]](_0x324d[97])[_0x324d[21]](200)[_0x324d[20]](csv(_0x8148x28))})[_0x324d[19]](function(_0x8148x14){return handleError(_0x8148x12,_0x8148x14)})};exports[_0x324d[98]]= function(_0x8148x11,_0x8148x12){return User[_0x324d[36]](_0x8148x11[_0x324d[37]][_0x324d[25]])[_0x324d[22]](function(_0x8148x18){return _0x8148x18[_0x324d[74]]({where:{type:_0x8148x11[_0x324d[49]][_0x324d[89]]},include:[{model:ChatVisitor,attributes:[_0x324d[25],_0x324d[27],_0x324d[28]]}]})})[_0x324d[22]](function(_0x8148x1e){if(!_0x8148x1e){return _0x8148x12[_0x324d[50]](404)};return _0x8148x12[_0x324d[20]](_0x8148x1e)})[_0x324d[19]](function(_0x8148x14){return handleError(_0x8148x12,_0x8148x14)})};exports[_0x324d[99]]= function(_0x8148x11,_0x8148x12){return User[_0x324d[36]](_0x8148x11[_0x324d[37]][_0x324d[25]])[_0x324d[22]](function(_0x8148x18){return _0x8148x18[_0x324d[74]]({include:[{model:ChatVisitor,attributes:[_0x324d[25],_0x324d[27],_0x324d[28]]},{model:User,attributes:[_0x324d[25],_0x324d[26],_0x324d[27],_0x324d[28],_0x324d[29],_0x324d[30]]}]})})[_0x324d[22]](function(_0x8148x1e){if(!_0x8148x1e){return _0x8148x12[_0x324d[50]](404)};return _0x8148x12[_0x324d[20]](_0x8148x1e)})[_0x324d[19]](function(_0x8148x14){return handleError(_0x8148x12,_0x8148x14)})};exports[_0x324d[90]]= function(_0x8148x11,_0x8148x12){};exports[_0x324d[51]]= function(_0x8148x11,_0x8148x12){if(_0x8148x11[_0x324d[46]][_0x324d[25]]){delete _0x8148x11[_0x324d[46]][_0x324d[25]]};return ChatRoom[_0x324d[36]](_0x8148x11[_0x324d[49]][_0x324d[25]])[_0x324d[22]](function(_0x8148x23){if(!_0x8148x23){return _0x8148x12[_0x324d[50]](404)};return _0x8148x23[_0x324d[51]](_0x8148x11[_0x324d[46]])})[_0x324d[22]](function(_0x8148x23){return _0x8148x12[_0x324d[21]](200)[_0x324d[20]](_0x8148x23)})[_0x324d[19]](function(_0x8148x14){return handleError(_0x8148x12,_0x8148x14)})};exports[_0x324d[100]]= function(_0x8148x11,_0x8148x12){var _0x8148x24;if(_0x8148x11[_0x324d[46]][_0x324d[25]]){delete _0x8148x11[_0x324d[46]][_0x324d[25]]};return ChatRoom[_0x324d[36]](_0x8148x11[_0x324d[49]][_0x324d[25]])[_0x324d[22]](function(_0x8148x23){if(!_0x8148x23|| !_0x8148x11[_0x324d[46]][_0x324d[80]]){return _0x8148x12[_0x324d[50]](404)};return _0x8148x23})[_0x324d[22]](function(_0x8148x23){return _0x8148x23[_0x324d[51]]({type:_0x324d[62],token:md5(JSON[_0x324d[85]](_0x8148x11[_0x324d[46]][_0x324d[80]][_0x324d[84]]())).toString(_0x324d[83])})})[_0x324d[22]](function(_0x8148x23){_0x8148x24= _0x8148x23;return _0x8148x23[_0x324d[81]](_0x8148x11[_0x324d[46]][_0x324d[80]][_0x324d[84]](),{individualHooks:true})})[_0x324d[22]](function(){return _0x8148x24[_0x324d[79]]()})[_0x324d[22]](function(_0x8148x25){_[_0x324d[31]](_0x8148x24[_0x324d[78]],{Users:_0x8148x25});return _0x8148x12[_0x324d[21]](200)[_0x324d[20]](_0x8148x24)})[_0x324d[19]](function(_0x8148x14){return handleError(_0x8148x12,_0x8148x14)})};exports[_0x324d[101]]= function(_0x8148x11,_0x8148x12){return ChatRoom[_0x324d[36]](_0x8148x11[_0x324d[49]][_0x324d[25]])[_0x324d[22]](function(_0x8148x23){if(!_0x8148x23){return _0x8148x12[_0x324d[50]](404)};return _0x8148x23[_0x324d[101]]()})[_0x324d[22]](function(){return _0x8148x12[_0x324d[50]](204)})[_0x324d[19]](function(_0x8148x14){return handleError(_0x8148x12,_0x8148x14)})};function handleError(_0x8148x12,_0x8148x14){console[_0x324d[18]](_0x8148x14);return _0x8148x12[_0x324d[21]](500)[_0x324d[20]](_0x8148x14)}
\ No newline at end of file
diff --git a/server/api/chat_room/chat_room.events.js b/server/api/chat_room/chat_room.events.js
index b842a41..5aea400 100644
--- a/server/api/chat_room/chat_room.events.js
+++ b/server/api/chat_room/chat_room.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ChatRoom = require('../../models').ChatRoom;
-
-var ChatRoomEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ChatRoomEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ChatRoom.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ChatRoomEvents.emit(event + ':' + doc._id, doc);
-    ChatRoomEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ChatRoomEvents;
+var _0x6f25=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6f25[0];const EventEmitter=require(_0x6f25[1]);const ChatRoom=require(_0x6f25[3])[_0x6f25[2]];var ChatRoomEvents= new EventEmitter();ChatRoomEvents[_0x6f25[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6f25[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x6f25[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6f25[6]};for(var e in events){var event=events[e];ChatRoom[_0x6f25[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7df7x8,_0x7df7x9,_0x7df7xa){ChatRoomEvents[_0x6f25[10]](event+ _0x6f25[8]+ _0x7df7x8[_0x6f25[9]],_0x7df7x8);ChatRoomEvents[_0x6f25[10]](event,_0x7df7x8);_0x7df7xa(null)}}module[_0x6f25[11]]= ChatRoomEvents
\ No newline at end of file
diff --git a/server/api/chat_room/chat_room.socket.js b/server/api/chat_room/chat_room.socket.js
index 0f60e68..c59909a 100644
--- a/server/api/chat_room/chat_room.socket.js
+++ b/server/api/chat_room/chat_room.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const ChatRoomEvents = require('./chat_room.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('chat_room:' + event, socket);
-
-    ChatRoomEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ChatRoomEvents.removeListener(event, listener);
-  };
-}
+var _0xe936=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xe936[0];const ChatRoomEvents=require(_0xe936[1]);var events=[_0xe936[2],_0xe936[3]];exports[_0xe936[4]]= function(_0xbbf8x3){for(var _0xbbf8x4=0,_0xbbf8x5=events[_0xe936[5]];_0xbbf8x4< _0xbbf8x5;_0xbbf8x4++){var _0xbbf8x6=events[_0xbbf8x4];var _0xbbf8x7=createListener(_0xe936[6]+ _0xbbf8x6,_0xbbf8x3);ChatRoomEvents[_0xe936[7]](_0xbbf8x6,_0xbbf8x7);_0xbbf8x3[_0xe936[7]](_0xe936[8],removeListener(_0xbbf8x6,_0xbbf8x7))}};function createListener(_0xbbf8x6,_0xbbf8x3){return function(_0xbbf8x9){_0xbbf8x3[_0xe936[9]](_0xbbf8x6,_0xbbf8x9)}}function removeListener(_0xbbf8x6,_0xbbf8x7){return function(){ChatRoomEvents[_0xe936[10]](_0xbbf8x6,_0xbbf8x7)}}
\ No newline at end of file
diff --git a/server/api/chat_room/index.js b/server/api/chat_room/index.js
index 43f0a87..2942750 100644
--- a/server/api/chat_room/index.js
+++ b/server/api/chat_room/index.js
@@ -1,32 +1 @@
-'use strict';
-
-var express = require('express');
-
-var controller = require('./chat_room.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.index);
-router.get('/online', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.getOnlineRoom);
-router.get('/describe', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.describe);
-router.get('/unmanaged', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.unmanaged);
-router.get('/me', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'user', 'agent']), controller.me);
-router.get('/groups', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.getGroups);
-router.get('/externals', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.getExternals);
-router.get('/agents', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.getAgents);
-router.get('/agents/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.getAgent);
-router.get('/users', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.getRoomByUsers);
-// router.get('/groups', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.getRoomGroups);
-router.get('/type/:type', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.getRoomByType);
-router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.show);
-router.get('/:id/export', license.isValidDate(), license.hasChat(), controller.export);
-router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.create);
-router.post('/:id/messages', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.createMessage);
-router.patch('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.updatePatch);
-router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.update);
-router.put('/:id/users', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.updateUsers);
-router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.destroy);
-
-module.exports = router;
+var _0xaa7a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x6F\x6E\x6C\x69\x6E\x65","\x67\x65\x74\x4F\x6E\x6C\x69\x6E\x65\x52\x6F\x6F\x6D","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x2F\x6D\x65","\x75\x73\x65\x72","\x6D\x65","\x2F\x67\x72\x6F\x75\x70\x73","\x67\x65\x74\x47\x72\x6F\x75\x70\x73","\x2F\x65\x78\x74\x65\x72\x6E\x61\x6C\x73","\x67\x65\x74\x45\x78\x74\x65\x72\x6E\x61\x6C\x73","\x2F\x61\x67\x65\x6E\x74\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x2F\x61\x67\x65\x6E\x74\x73\x2F\x3A\x69\x64","\x67\x65\x74\x41\x67\x65\x6E\x74","\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x55\x73\x65\x72\x73","\x2F\x74\x79\x70\x65\x2F\x3A\x74\x79\x70\x65","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x54\x79\x70\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x65\x78\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x70\x61\x74\x63\x68","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xaa7a[0];var express=require(_0xaa7a[1]);var controller=require(_0xaa7a[2]);var auth=require(_0xaa7a[3]);var license=require(_0xaa7a[4]);var router=express.Router();router[_0xaa7a[13]](_0xaa7a[5],license[_0xaa7a[6]](),license[_0xaa7a[7]](),auth[_0xaa7a[8]](),auth[_0xaa7a[11]]([8],[_0xaa7a[9],_0xaa7a[10]]),controller[_0xaa7a[12]]);router[_0xaa7a[13]](_0xaa7a[14],license[_0xaa7a[6]](),license[_0xaa7a[7]](),auth[_0xaa7a[8]](),auth[_0xaa7a[11]]([8],[_0xaa7a[9],_0xaa7a[10]]),controller[_0xaa7a[15]]);router[_0xaa7a[13]](_0xaa7a[16],license[_0xaa7a[6]](),license[_0xaa7a[7]](),auth[_0xaa7a[8]](),auth[_0xaa7a[11]]([8],[_0xaa7a[9]]),controller[_0xaa7a[17]]);router[_0xaa7a[13]](_0xaa7a[18],license[_0xaa7a[6]](),license[_0xaa7a[7]](),auth[_0xaa7a[8]](),auth[_0xaa7a[11]]([8],[_0xaa7a[9]]),controller[_0xaa7a[19]]);router[_0xaa7a[13]](_0xaa7a[20],license[_0xaa7a[6]](),license[_0xaa7a[7]](),auth[_0xaa7a[8]](),auth[_0xaa7a[11]]([8],[_0xaa7a[9],_0xaa7a[21],_0xaa7a[10]]),controller[_0xaa7a[22]]);router[_0xaa7a[13]](_0xaa7a[23],license[_0xaa7a[6]](),license[_0xaa7a[7]](),auth[_0xaa7a[8]](),auth[_0xaa7a[11]]([8],[_0xaa7a[9],_0xaa7a[10]]),controller[_0xaa7a[24]]);router[_0xaa7a[13]](_0xaa7a[25],license[_0xaa7a[6]](),license[_0xaa7a[7]](),auth[_0xaa7a[8]](),auth[_0xaa7a[11]]([8],[_0xaa7a[9],_0xaa7a[10]]),controller[_0xaa7a[26]]);router[_0xaa7a[13]](_0xaa7a[27],license[_0xaa7a[6]](),license[_0xaa7a[7]](),auth[_0xaa7a[8]](),auth[_0xaa7a[11]]([8],[_0xaa7a[9],_0xaa7a[10]]),controller[_0xaa7a[28]]);router[_0xaa7a[13]](_0xaa7a[29],license[_0xaa7a[6]](),license[_0xaa7a[7]](),auth[_0xaa7a[8]](),auth[_0xaa7a[11]]([8],[_0xaa7a[9],_0xaa7a[10]]),controller[_0xaa7a[30]]);router[_0xaa7a[13]](_0xaa7a[31],license[_0xaa7a[6]](),license[_0xaa7a[7]](),auth[_0xaa7a[8]](),auth[_0xaa7a[11]]([8],[_0xaa7a[9],_0xaa7a[10]]),controller[_0xaa7a[32]]);router[_0xaa7a[13]](_0xaa7a[33],license[_0xaa7a[6]](),license[_0xaa7a[7]](),auth[_0xaa7a[8]](),auth[_0xaa7a[11]]([8],[_0xaa7a[9],_0xaa7a[10]]),controller[_0xaa7a[34]]);router[_0xaa7a[13]](_0xaa7a[35],license[_0xaa7a[6]](),license[_0xaa7a[7]](),auth[_0xaa7a[8]](),auth[_0xaa7a[11]]([8],[_0xaa7a[9],_0xaa7a[10]]),controller[_0xaa7a[36]]);router[_0xaa7a[13]](_0xaa7a[37],license[_0xaa7a[6]](),license[_0xaa7a[7]](),controller[_0xaa7a[38]]);router[_0xaa7a[40]](_0xaa7a[5],license[_0xaa7a[6]](),license[_0xaa7a[7]](),auth[_0xaa7a[8]](),auth[_0xaa7a[11]]([8],[_0xaa7a[9],_0xaa7a[10]]),controller[_0xaa7a[39]]);router[_0xaa7a[40]](_0xaa7a[41],license[_0xaa7a[6]](),license[_0xaa7a[7]](),auth[_0xaa7a[8]](),auth[_0xaa7a[11]]([8],[_0xaa7a[9],_0xaa7a[10]]),controller[_0xaa7a[42]]);router[_0xaa7a[44]](_0xaa7a[35],license[_0xaa7a[6]](),license[_0xaa7a[7]](),auth[_0xaa7a[8]](),auth[_0xaa7a[11]]([8],[_0xaa7a[9],_0xaa7a[10]]),controller[_0xaa7a[43]]);router[_0xaa7a[46]](_0xaa7a[35],license[_0xaa7a[6]](),license[_0xaa7a[7]](),auth[_0xaa7a[8]](),auth[_0xaa7a[11]]([8],[_0xaa7a[9],_0xaa7a[10]]),controller[_0xaa7a[45]]);router[_0xaa7a[46]](_0xaa7a[47],license[_0xaa7a[6]](),license[_0xaa7a[7]](),auth[_0xaa7a[8]](),auth[_0xaa7a[11]]([8],[_0xaa7a[9],_0xaa7a[10]]),controller[_0xaa7a[48]]);router[_0xaa7a[50]](_0xaa7a[35],license[_0xaa7a[6]](),license[_0xaa7a[7]](),auth[_0xaa7a[8]](),auth[_0xaa7a[11]]([8],[_0xaa7a[9],_0xaa7a[10]]),controller[_0xaa7a[49]]);module[_0xaa7a[51]]= router
\ No newline at end of file
diff --git a/server/api/chat_visitor/chat_visitor.controller.js b/server/api/chat_visitor/chat_visitor.controller.js
index 38e5d14..2d79fb0 100644
--- a/server/api/chat_visitor/chat_visitor.controller.js
+++ b/server/api/chat_visitor/chat_visitor.controller.js
@@ -1,104 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var ChatVisitor = require('../../models').ChatVisitor;
-var ChatEnquiry = require('../../models').ChatEnquiry;
-var ChatWebsite = require('../../models').ChatWebsite;
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  return ChatVisitor
-    .findAndCountAll(_.merge(Util.getQuery(req.query), {
-      include: [{
-        model: ChatWebsite
-      }]
-    }))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      console.error(err);
-      return handleError(res, err);
-    });
-};
-
-// Get a single chatVisitor
-exports.show = function(req, res) {
-  return ChatVisitor
-    .findById(req.params.id, {
-      include: [{
-        model: ChatEnquiry
-      }, {
-        model: ChatWebsite
-      }]
-    })
-    .then(function(chatVisitor) {
-      if (!chatVisitor) {
-        return res.sendStatus(404);
-      }
-      return res.send(chatVisitor);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new chatVisitor in the DB.
-exports.create = function(req, res) {
-  return ChatVisitor
-    .create(req.body)
-    .then(function(chatVisitor) {
-      return res.status(201).send(chatVisitor);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing chatVisitor in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return ChatVisitor
-    .findById(req.params.id)
-    .then(function(chatVisitor) {
-      if (!chatVisitor) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(chatVisitor, req.body);
-      return updated
-        .save();
-    })
-    .then(function(chatVisitor) {
-      return res.status(200).send(chatVisitor);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a chatVisitor from the DB.
-exports.destroy = function(req, res) {
-  return ChatVisitor
-    .findById(req.params.id)
-    .then(function(chatVisitor) {
-      if (!chatVisitor) {
-        return res.sendStatus(404);
-      }
-      return chatVisitor
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xe4f1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x69\x6E\x64\x65\x78","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xe4f1[0];var _=require(_0xe4f1[1]);var Util=require(_0xe4f1[2]);var ChatVisitor=require(_0xe4f1[4])[_0xe4f1[3]];var ChatEnquiry=require(_0xe4f1[4])[_0xe4f1[5]];var ChatWebsite=require(_0xe4f1[4])[_0xe4f1[6]];exports[_0xe4f1[7]]= function(_0x2087x6,_0x2087x7,_0x2087x8){return ChatVisitor[_0xe4f1[16]](_[_0xe4f1[15]](Util[_0xe4f1[14]](_0x2087x6[_0xe4f1[13]]),{include:[{model:ChatWebsite}]}))[_0xe4f1[12]](function(_0x2087xa){_0x2087x7[_0xe4f1[11]](200)[_0xe4f1[10]](_0x2087xa)})[_0xe4f1[9]](function(_0x2087x9){console[_0xe4f1[8]](_0x2087x9);return handleError(_0x2087x7,_0x2087x9)})};exports[_0xe4f1[17]]= function(_0x2087x6,_0x2087x7){return ChatVisitor[_0xe4f1[21]](_0x2087x6[_0xe4f1[20]][_0xe4f1[19]],{include:[{model:ChatEnquiry},{model:ChatWebsite}]})[_0xe4f1[12]](function(_0x2087xb){if(!_0x2087xb){return _0x2087x7[_0xe4f1[18]](404)};return _0x2087x7[_0xe4f1[10]](_0x2087xb)})[_0xe4f1[9]](function(_0x2087x9){return handleError(_0x2087x7,_0x2087x9)})};exports[_0xe4f1[22]]= function(_0x2087x6,_0x2087x7){return ChatVisitor[_0xe4f1[22]](_0x2087x6[_0xe4f1[23]])[_0xe4f1[12]](function(_0x2087xb){return _0x2087x7[_0xe4f1[11]](201)[_0xe4f1[10]](_0x2087xb)})[_0xe4f1[9]](function(_0x2087x9){return handleError(_0x2087x7,_0x2087x9)})};exports[_0xe4f1[24]]= function(_0x2087x6,_0x2087x7){if(_0x2087x6[_0xe4f1[23]][_0xe4f1[19]]){delete _0x2087x6[_0xe4f1[23]][_0xe4f1[19]]};return ChatVisitor[_0xe4f1[21]](_0x2087x6[_0xe4f1[20]][_0xe4f1[19]])[_0xe4f1[12]](function(_0x2087xb){if(!_0x2087xb){return _0x2087x7[_0xe4f1[18]](404)};var _0x2087xc=_[_0xe4f1[15]](_0x2087xb,_0x2087x6[_0xe4f1[23]]);return _0x2087xc[_0xe4f1[25]]()})[_0xe4f1[12]](function(_0x2087xb){return _0x2087x7[_0xe4f1[11]](200)[_0xe4f1[10]](_0x2087xb)})[_0xe4f1[9]](function(_0x2087x9){return handleError(_0x2087x7,_0x2087x9)})};exports[_0xe4f1[26]]= function(_0x2087x6,_0x2087x7){return ChatVisitor[_0xe4f1[21]](_0x2087x6[_0xe4f1[20]][_0xe4f1[19]])[_0xe4f1[12]](function(_0x2087xb){if(!_0x2087xb){return _0x2087x7[_0xe4f1[18]](404)};return _0x2087xb[_0xe4f1[26]]()})[_0xe4f1[12]](function(){return _0x2087x7[_0xe4f1[18]](204)})[_0xe4f1[9]](function(_0x2087x9){return handleError(_0x2087x7,_0x2087x9)})};function handleError(_0x2087x7,_0x2087x9){return _0x2087x7[_0xe4f1[11]](500)[_0xe4f1[10]](_0x2087x9)}
\ No newline at end of file
diff --git a/server/api/chat_visitor/chat_visitor.events.js b/server/api/chat_visitor/chat_visitor.events.js
index d4c36db..dae9b2f 100644
--- a/server/api/chat_visitor/chat_visitor.events.js
+++ b/server/api/chat_visitor/chat_visitor.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ChatVisitor = require('../../models').ChatVisitor;
-
-var ChatVisitorEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ChatVisitorEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ChatVisitor.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ChatVisitorEvents.emit(event + ':' + doc._id, doc);
-    ChatVisitorEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ChatVisitorEvents;
+var _0x8056=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x8056[0];const EventEmitter=require(_0x8056[1]);const ChatVisitor=require(_0x8056[3])[_0x8056[2]];var ChatVisitorEvents= new EventEmitter();ChatVisitorEvents[_0x8056[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x8056[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x8056[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x8056[6]};for(var e in events){var event=events[e];ChatVisitor[_0x8056[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xaf79x8,_0xaf79x9,_0xaf79xa){ChatVisitorEvents[_0x8056[10]](event+ _0x8056[8]+ _0xaf79x8[_0x8056[9]],_0xaf79x8);ChatVisitorEvents[_0x8056[10]](event,_0xaf79x8);_0xaf79xa(null)}}module[_0x8056[11]]= ChatVisitorEvents
\ No newline at end of file
diff --git a/server/api/chat_visitor/chat_visitor.socket.js b/server/api/chat_visitor/chat_visitor.socket.js
index 3a627b1..28ae53f 100644
--- a/server/api/chat_visitor/chat_visitor.socket.js
+++ b/server/api/chat_visitor/chat_visitor.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const ChatVisitorEvents = require('./chat_visitor.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('chat_visitor:' + event, socket);
-
-    ChatVisitorEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ChatVisitorEvents.removeListener(event, listener);
-  };
-}
+var _0x9002=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x9002[0];const ChatVisitorEvents=require(_0x9002[1]);var events=[_0x9002[2],_0x9002[3]];exports[_0x9002[4]]= function(_0xb007x3){for(var _0xb007x4=0,_0xb007x5=events[_0x9002[5]];_0xb007x4< _0xb007x5;_0xb007x4++){var _0xb007x6=events[_0xb007x4];var _0xb007x7=createListener(_0x9002[6]+ _0xb007x6,_0xb007x3);ChatVisitorEvents[_0x9002[7]](_0xb007x6,_0xb007x7);_0xb007x3[_0x9002[7]](_0x9002[8],removeListener(_0xb007x6,_0xb007x7))}};function createListener(_0xb007x6,_0xb007x3){return function(_0xb007x9){_0xb007x3[_0x9002[9]](_0xb007x6,_0xb007x9)}}function removeListener(_0xb007x6,_0xb007x7){return function(){ChatVisitorEvents[_0x9002[10]](_0xb007x6,_0xb007x7)}}
\ No newline at end of file
diff --git a/server/api/chat_visitor/index.js b/server/api/chat_visitor/index.js
index 829db71..4a46f0d 100644
--- a/server/api/chat_visitor/index.js
+++ b/server/api/chat_visitor/index.js
@@ -1,17 +1 @@
-'use strict';
-
-var express = require('express');
-
-var controller = require('./chat_visitor.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.index);
-router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.show);
-router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.create);
-router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update);
-router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0x1437=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x1437[0];var express=require(_0x1437[1]);var controller=require(_0x1437[2]);var auth=require(_0x1437[3]);var license=require(_0x1437[4]);var router=express.Router();router[_0x1437[12]](_0x1437[5],license[_0x1437[6]](),license[_0x1437[7]](),auth[_0x1437[8]](),auth[_0x1437[10]]([8],[_0x1437[9]]),controller[_0x1437[11]]);router[_0x1437[12]](_0x1437[13],license[_0x1437[6]](),license[_0x1437[7]](),auth[_0x1437[8]](),auth[_0x1437[10]]([8],[_0x1437[9]]),controller[_0x1437[14]]);router[_0x1437[16]](_0x1437[5],license[_0x1437[6]](),license[_0x1437[7]](),auth[_0x1437[8]](),auth[_0x1437[10]]([8],[_0x1437[9]]),controller[_0x1437[15]]);router[_0x1437[18]](_0x1437[13],license[_0x1437[6]](),license[_0x1437[7]](),auth[_0x1437[8]](),auth[_0x1437[10]]([8],[_0x1437[9]]),controller[_0x1437[17]]);router[_0x1437[20]](_0x1437[13],license[_0x1437[6]](),license[_0x1437[7]](),auth[_0x1437[8]](),auth[_0x1437[10]]([8],[_0x1437[9]]),controller[_0x1437[19]]);module[_0x1437[21]]= router
\ No newline at end of file
diff --git a/server/api/chat_website/chat_website.controller.js b/server/api/chat_website/chat_website.controller.js
index bc93ce4..b348863 100644
--- a/server/api/chat_website/chat_website.controller.js
+++ b/server/api/chat_website/chat_website.controller.js
@@ -1,579 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var Mustache = require('mustache');
-var Util = require('../../config/util');
-
-var sequelize = require('../../models').sequelize;
-var ChatWebsite = require('../../models').ChatWebsite;
-var ChatQueue = require('../../models').ChatQueue;
-var User = require('../../models').User;
-var Interval = require('../../models').Interval;
-var ChatApplication = require('../../models').ChatApplication;
-var ChatWebsitesField = require('../../models').ChatWebsitesField;
-var ChatProactiveAction = require('../../models').ChatProactiveAction;
-var ChatDisposition = require('../../models').ChatDisposition;
-var snippet = require('../../components/xchatty').snippet;
-var UploadFile = require('upload-file');
-var path = require('path');
-var sr = require('simple-random');
-var config = require('../../config/environment');
-
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  return ChatWebsite
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Get a single chat_website
-exports.show = function(req, res) {
-  return ChatWebsite
-    .findById(req.params.id)
-    .then(function(chat_website) {
-      if (!chat_website) {
-        return res.sendStatus(404);
-      }
-      return res.send(chat_website);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-
-exports.changeLogo = function(req, res) {
-
-  var upload = new UploadFile({
-    dest: path.join(config.root, 'server', 'files', 'images'),
-    maxNumberOfFiles: 1,
-    minNumberOfFiles: 0,
-    acceptFileTypes: /(\.|\/)(jpeg|png)$/i,
-    rename: function(name, file) {
-      return sr() + path.extname(file.filename);
-    },
-    messages: {
-      maxNumberOfFiles: "Max number of files upload exceeded",
-      acceptFileTypes: "Only jpeg and png format accepted",
-      invalidRequest: "Invalid request"
-    }
-  });
-
-  upload.on('end', function(fields, files) {
-    if (!files.file.filename) {
-      return res.status(500).send(upload);
-    }
-    return sequelize.transaction(function(t) {
-        return ChatWebsite
-          .findById(req.params.id)
-          .then(function(website) {
-            if (!website) {
-              return res.sendStatus(404);
-            }
-            var body = {};
-            body.logo = files.file.filename;
-            return website
-              .update(body, {
-                transaction: t
-              });
-          })
-          .then(function(user) {
-            return res.status(200).send(user);
-          })
-      })
-      .catch(function(err) {
-        return handleError(res, err);
-      });
-  });
-
-  upload.on('error', function(err) {
-    console.log('********** Upload error :', err)
-    return handleError(res, err);
-  });
-
-  upload.parse(req);
-}
-
-exports.getDispositions = function(req, res, next) {
-  return ChatWebsite
-    .findById(req.params.id)
-    .then(function(chat_website) {
-      if (!chat_website) {
-        return res.sendStatus(404);
-      }
-
-      return chat_website
-        .getChatDispositions();
-    })
-    .then(function(chatDispositions) {
-      return res.status(200).send({
-        rows: chatDispositions,
-        count: chatDispositions.length
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.createDisposition = function(req, res, next) {
-  req.body.ChatWebsiteId = req.params.id;
-
-  return ChatDisposition
-    .create(req.body)
-    .then(function(chatDisposition) {
-      return res.status(201).send(chatDisposition);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.updateDisposition = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return ChatDisposition
-    .findById(req.params.dispId)
-    .then(function(chatDisposition) {
-      if (!chatDisposition) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(chatDisposition, req.body);
-      return updated
-        .save();
-    })
-    .then(function(chat_website) {
-      return res.status(200).send(chat_website);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.destroyDisposition = function(req, res, next) {
-  return ChatDisposition
-    .findById(req.params.dispId)
-    .then(function(chatDiposition) {
-      if (!chatDiposition) {
-        return res.sendStatus(404);
-      }
-
-      return chatDiposition
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.showApplications = function(req, res, next) {
-  return ChatWebsite
-    .findById(req.params.id)
-    .then(function(chatWebsite) {
-      if (!chatWebsite) {
-        return res.sendStatus(404);
-      }
-      return chatWebsite
-        .getChatApplications(_.merge(Util.getQuery(req.query), {
-          include: [{
-            model: ChatQueue,
-            attributes: ['id', 'name']
-          }, {
-            model: User,
-            attributes: ['id', 'name']
-          }, {
-            model: Interval,
-            attributes: ['id', 'name']
-          }],
-          order: 'priority ASC'
-        }));
-    })
-    .then(function(chatApplications) {
-      return res.send({
-        count: chatApplications.length,
-        rows: chatApplications
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.showProactiveActions = function(req, res, next) {
-  return ChatWebsite
-    .findById(req.params.id)
-    .then(function(chatWebsite) {
-      if (!chatWebsite) {
-        return res.sendStatus(404);
-      }
-      return chatWebsite
-        .getChatProactiveActions(Util.getQuery(req.query));
-    })
-    .then(function(chatProactiveActions) {
-      return res.send({
-        count: chatProactiveActions.length,
-        rows: chatProactiveActions
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a snippet for chat_website
-exports.getSnippetCode = function(req, res) {
-  return ChatWebsite
-    .findById(req.params.id)
-    .then(function(chat_website) {
-      var configSnippet = {
-        remote: chat_website.remote,
-        websiteId: req.params.id
-      };
-      var html = Mustache.render(snippet, configSnippet);
-      return res.status(200).send({
-        html: html
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new chat_website in the DB.
-exports.create = function(req, res) {
-  return ChatWebsite
-    .create(req.body)
-    .then(function(chat_website) {
-      return res.status(201).send(chat_website);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing chat_website in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return ChatWebsite
-    .findById(req.params.id)
-    .then(function(chat_website) {
-      if (!chat_website) {
-        return res.sendStatus(404);
-      }
-
-      return chat_website
-        .update(req.body);
-    })
-    .then(function(chat_website) {
-      return res.status(200).send(chat_website);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.updateApplications = function(req, res) {
-
-  var priority = 0;
-  var apps = req.body;
-
-  apps.forEach(function(app) {
-    delete app.id;
-    delete app.createdAt;
-    delete app.updatedAt;
-
-    app.priority = ++priority;
-  });
-
-  return sequelize.transaction(function(t) {
-    return ChatApplication
-      .destroy({
-        where: {
-          ChatWebsiteId: req.params.id
-        },
-        individualHooks: true,
-        transaction: t
-      }).then(function() {
-        return ChatApplication
-          .bulkCreate(apps, {
-            individualHooks: true,
-            transaction: t
-          });
-      });
-  }).then(function(chatApplications) {
-    return res.status(200).send({
-      count: chatApplications.length,
-      rows: chatApplications
-    });
-  }).catch(function(err) {
-    return handleError(res, err);
-  });
-};
-
-// Deletes a chat_website from the DB.
-exports.destroy = function(req, res) {
-  return ChatWebsite
-    .findById(req.params.id)
-    .then(function(chat_website) {
-      if (!chat_website) {
-        return res.sendStatus(404);
-      }
-      return chat_website
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a agent from the DB.
-exports.bulkDestroy = function(req, res) {
-  return ChatWebsite
-    .destroy({
-      where: {
-        id: req.query.websites
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a agent from the DB.
-exports.bulkDestroyApplications = function(req, res) {
-  return ChatApplication
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a mailAccount from the DB.
-exports.destroyApplication = function(req, res, next) {
-  return ChatApplication
-    .findById(req.params.appId)
-    .then(function(chatApplication) {
-      if (!chatApplication) {
-        return res.sendStatus(404);
-      }
-
-      return chatApplication
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getForms = function(req, res) {
-  return ChatWebsitesField
-    .scope({
-      method: [req.params.type, req.params.id]
-    })
-    .findAll()
-    .then(function(data) {
-      return res.status(200).json(data);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-exports.updateForms = function(req, res, next) {
-  return ChatWebsitesField
-    .destroy({
-      where: req.params.type === 'online' ? {
-        OnlineId: req.params.id
-      } : {
-        OfflineId: req.params.id
-      }
-    })
-    .then(function() {
-      _.forEach(req.body, function(value) {
-        if (req.params.type === 'online') {
-          value.OnlineId = req.params.id;
-        } else if (req.params.type === 'offline') {
-          value.OfflineId = req.params.id;
-        }
-      });
-      return ChatWebsitesField.bulkCreate(req.body);
-    })
-    .then(function(fields) {
-      res.status(201).json(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-exports.bulkDestroyProactiveActions = function(req, res) {
-  return ChatProactiveAction
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.destroyProactiveAction = function(req, res, next) {
-  return ChatProactiveAction
-    .findById(req.params.pactionId)
-    .then(function(chatProactiveAction) {
-      if (!chatProactiveAction) {
-        return res.sendStatus(404);
-      }
-      return chatProactiveAction.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.createProactiveAction = function(req, res, next) {
-  return ChatWebsite
-    .findById(req.params.id)
-    .then(function(chatWebsite) {
-      if (!chatWebsite) {
-        return res.sendStatus(404);
-      }
-      req.body.ChatWebsiteId = chatWebsite.id;
-      return ChatProactiveAction.create(req.body);
-    })
-    .then(function(chatProactiveAction) {
-      return res.status(201).send(chatProactiveAction);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.updateProactiveAction = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return ChatProactiveAction
-    .findById(req.params.pactionId)
-    .then(function(chatProactiveAction) {
-      if (!chatProactiveAction) {
-        return res.sendStatus(404);
-      }
-
-      return chatProactiveAction
-        .update(req.body);
-    })
-    .then(function(chatProactiveAction) {
-      return res.status(200).send(chatProactiveAction);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-exports.createApplication = function(req, res, next) {
-  return ChatApplication
-    .max('priority', {
-      where: {
-        ChatWebsiteId: req.params.id
-      }
-    }).then(function(max) {
-      // SET PRIORITY
-      req.body.priority = max ? ++max : 1;
-      req.body.ChatWebsiteId = req.params.id;
-      return ChatApplication
-        .create(req.body);
-    })
-    .then(function(chatApplication) {
-      return res.status(201).send(chatApplication);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.updateApplication = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return ChatApplication.findById(req.params.appId)
-    .then(function(chatApplication) {
-      if (!chatApplication) {
-        return res.sendStatus(404);
-      }
-
-      return chatApplication
-        .update(req.body);
-    })
-    .then(function(chatApplication) {
-      return res.status(200).send(chatApplication);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-exports.showApplication = function(req, res) {
-  return ChatApplication
-    .findById(req.params.appId, {
-      include: [{
-        all: true
-      }]
-    })
-    .then(function(chatApplication) {
-      if (!chatApplication) {
-        return res.sendStatus(404);
-      }
-      return res.send(chatApplication);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
+var _0x7476=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x75\x73\x74\x61\x63\x68\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x55\x73\x65\x72","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x73\x6E\x69\x70\x70\x65\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x78\x63\x68\x61\x74\x74\x79","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x70\x61\x74\x68","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x68\x61\x6E\x67\x65\x4C\x6F\x67\x6F","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x69\x6D\x61\x67\x65\x73","\x6A\x6F\x69\x6E","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x6A\x70\x65\x67\x20\x61\x6E\x64\x20\x70\x6E\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x6C\x6F\x67\x6F","\x75\x70\x64\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x6F\x6E","\x65\x72\x72\x6F\x72","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x55\x70\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72\x20\x3A","\x6C\x6F\x67","\x70\x61\x72\x73\x65","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x69\x73\x70\x49\x64","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6E\x61\x6D\x65","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x67\x65\x74\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x53\x6E\x69\x70\x70\x65\x74\x43\x6F\x64\x65","\x72\x65\x6D\x6F\x74\x65","\x72\x65\x6E\x64\x65\x72","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x77\x65\x62\x73\x69\x74\x65\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x64\x73","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x70\x70\x49\x64","\x67\x65\x74\x46\x6F\x72\x6D\x73","\x6A\x73\x6F\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x74\x79\x70\x65","\x73\x63\x6F\x70\x65","\x75\x70\x64\x61\x74\x65\x46\x6F\x72\x6D\x73","\x6F\x6E\x6C\x69\x6E\x65","\x4F\x6E\x6C\x69\x6E\x65\x49\x64","\x6F\x66\x66\x6C\x69\x6E\x65","\x4F\x66\x66\x6C\x69\x6E\x65\x49\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x70\x61\x63\x74\x69\x6F\x6E\x49\x64","\x63\x72\x65\x61\x74\x65\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6D\x61\x78","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E"];_0x7476[0];var _=require(_0x7476[1]);var util=require(_0x7476[2]);var Mustache=require(_0x7476[3]);var Util=require(_0x7476[4]);var sequelize=require(_0x7476[6])[_0x7476[5]];var ChatWebsite=require(_0x7476[6])[_0x7476[7]];var ChatQueue=require(_0x7476[6])[_0x7476[8]];var User=require(_0x7476[6])[_0x7476[9]];var Interval=require(_0x7476[6])[_0x7476[10]];var ChatApplication=require(_0x7476[6])[_0x7476[11]];var ChatWebsitesField=require(_0x7476[6])[_0x7476[12]];var ChatProactiveAction=require(_0x7476[6])[_0x7476[13]];var ChatDisposition=require(_0x7476[6])[_0x7476[14]];var snippet=require(_0x7476[16])[_0x7476[15]];var UploadFile=require(_0x7476[17]);var path=require(_0x7476[18]);var sr=require(_0x7476[19]);var config=require(_0x7476[20]);exports[_0x7476[21]]= function(_0x8093x13,_0x8093x14,_0x8093x15){return ChatWebsite[_0x7476[28]](Util[_0x7476[27]](_0x8093x13[_0x7476[26]]))[_0x7476[25]](function(_0x8093x17){_0x8093x14[_0x7476[24]](200)[_0x7476[23]](_0x8093x17)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[29]]= function(_0x8093x13,_0x8093x14){return ChatWebsite[_0x7476[33]](_0x8093x13[_0x7476[32]][_0x7476[31]])[_0x7476[25]](function(_0x8093x18){if(!_0x8093x18){return _0x8093x14[_0x7476[30]](404)};return _0x8093x14[_0x7476[23]](_0x8093x18)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[34]]= function(_0x8093x13,_0x8093x14){var _0x8093x19= new UploadFile({dest:path[_0x7476[39]](config[_0x7476[35]],_0x7476[36],_0x7476[37],_0x7476[38]),maxNumberOfFiles:1,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(jpeg|png)$/i,rename:function(_0x8093x1a,_0x8093x1b){return sr()+ path[_0x7476[41]](_0x8093x1b[_0x7476[40]])},messages:{maxNumberOfFiles:_0x7476[42],acceptFileTypes:_0x7476[43],invalidRequest:_0x7476[44]}});_0x8093x19[_0x7476[50]](_0x7476[45],function(_0x8093x1c,_0x8093x1d){if(!_0x8093x1d[_0x7476[46]][_0x7476[40]]){return _0x8093x14[_0x7476[24]](500)[_0x7476[23]](_0x8093x19)};return sequelize[_0x7476[49]](function(_0x8093x1e){return ChatWebsite[_0x7476[33]](_0x8093x13[_0x7476[32]][_0x7476[31]])[_0x7476[25]](function(_0x8093x20){if(!_0x8093x20){return _0x8093x14[_0x7476[30]](404)};var _0x8093x21={};_0x8093x21[_0x7476[47]]= _0x8093x1d[_0x7476[46]][_0x7476[40]];return _0x8093x20[_0x7476[48]](_0x8093x21,{transaction:_0x8093x1e})})[_0x7476[25]](function(_0x8093x1f){return _0x8093x14[_0x7476[24]](200)[_0x7476[23]](_0x8093x1f)})})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})});_0x8093x19[_0x7476[50]](_0x7476[51],function(_0x8093x16){console[_0x7476[53]](_0x7476[52],_0x8093x16);return handleError(_0x8093x14,_0x8093x16)});_0x8093x19[_0x7476[54]](_0x8093x13)};exports[_0x7476[55]]= function(_0x8093x13,_0x8093x14,_0x8093x15){return ChatWebsite[_0x7476[33]](_0x8093x13[_0x7476[32]][_0x7476[31]])[_0x7476[25]](function(_0x8093x18){if(!_0x8093x18){return _0x8093x14[_0x7476[30]](404)};return _0x8093x18[_0x7476[57]]()})[_0x7476[25]](function(_0x8093x22){return _0x8093x14[_0x7476[24]](200)[_0x7476[23]]({rows:_0x8093x22,count:_0x8093x22[_0x7476[56]]})})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[58]]= function(_0x8093x13,_0x8093x14,_0x8093x15){_0x8093x13[_0x7476[60]][_0x7476[59]]= _0x8093x13[_0x7476[32]][_0x7476[31]];return ChatDisposition[_0x7476[61]](_0x8093x13[_0x7476[60]])[_0x7476[25]](function(_0x8093x23){return _0x8093x14[_0x7476[24]](201)[_0x7476[23]](_0x8093x23)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[62]]= function(_0x8093x13,_0x8093x14){if(_0x8093x13[_0x7476[60]][_0x7476[31]]){delete _0x8093x13[_0x7476[60]][_0x7476[31]]};return ChatDisposition[_0x7476[33]](_0x8093x13[_0x7476[32]][_0x7476[65]])[_0x7476[25]](function(_0x8093x23){if(!_0x8093x23){return _0x8093x14[_0x7476[30]](404)};var _0x8093x24=_[_0x7476[63]](_0x8093x23,_0x8093x13[_0x7476[60]]);return _0x8093x24[_0x7476[64]]()})[_0x7476[25]](function(_0x8093x18){return _0x8093x14[_0x7476[24]](200)[_0x7476[23]](_0x8093x18)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[66]]= function(_0x8093x13,_0x8093x14,_0x8093x15){return ChatDisposition[_0x7476[33]](_0x8093x13[_0x7476[32]][_0x7476[65]])[_0x7476[25]](function(_0x8093x25){if(!_0x8093x25){return _0x8093x14[_0x7476[30]](404)};return _0x8093x25[_0x7476[67]]()})[_0x7476[25]](function(){return _0x8093x14[_0x7476[30]](204)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[68]]= function(_0x8093x13,_0x8093x14,_0x8093x15){return ChatWebsite[_0x7476[33]](_0x8093x13[_0x7476[32]][_0x7476[31]])[_0x7476[25]](function(_0x8093x27){if(!_0x8093x27){return _0x8093x14[_0x7476[30]](404)};return _0x8093x27[_0x7476[71]](_[_0x7476[63]](Util[_0x7476[27]](_0x8093x13[_0x7476[26]]),{include:[{model:ChatQueue,attributes:[_0x7476[31],_0x7476[69]]},{model:User,attributes:[_0x7476[31],_0x7476[69]]},{model:Interval,attributes:[_0x7476[31],_0x7476[69]]}],order:_0x7476[70]}))})[_0x7476[25]](function(_0x8093x26){return _0x8093x14[_0x7476[23]]({count:_0x8093x26[_0x7476[56]],rows:_0x8093x26})})[_0x7476[22]](function(_0x8093x16){console[_0x7476[53]](_0x8093x16);return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[72]]= function(_0x8093x13,_0x8093x14,_0x8093x15){return ChatWebsite[_0x7476[33]](_0x8093x13[_0x7476[32]][_0x7476[31]])[_0x7476[25]](function(_0x8093x27){if(!_0x8093x27){return _0x8093x14[_0x7476[30]](404)};return _0x8093x27[_0x7476[73]](Util[_0x7476[27]](_0x8093x13[_0x7476[26]]))})[_0x7476[25]](function(_0x8093x28){return _0x8093x14[_0x7476[23]]({count:_0x8093x28[_0x7476[56]],rows:_0x8093x28})})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[74]]= function(_0x8093x13,_0x8093x14){return ChatWebsite[_0x7476[33]](_0x8093x13[_0x7476[32]][_0x7476[31]])[_0x7476[25]](function(_0x8093x18){var _0x8093x29={remote:_0x8093x18[_0x7476[75]],websiteId:_0x8093x13[_0x7476[32]][_0x7476[31]]};var _0x8093x2a=Mustache[_0x7476[76]](snippet,_0x8093x29);return _0x8093x14[_0x7476[24]](200)[_0x7476[23]]({html:_0x8093x2a})})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[61]]= function(_0x8093x13,_0x8093x14){return ChatWebsite[_0x7476[61]](_0x8093x13[_0x7476[60]])[_0x7476[25]](function(_0x8093x18){return _0x8093x14[_0x7476[24]](201)[_0x7476[23]](_0x8093x18)})[_0x7476[22]](function(_0x8093x16){console[_0x7476[53]](_0x8093x16);return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[48]]= function(_0x8093x13,_0x8093x14){if(_0x8093x13[_0x7476[60]][_0x7476[31]]){delete _0x8093x13[_0x7476[60]][_0x7476[31]]};return ChatWebsite[_0x7476[33]](_0x8093x13[_0x7476[32]][_0x7476[31]])[_0x7476[25]](function(_0x8093x18){if(!_0x8093x18){return _0x8093x14[_0x7476[30]](404)};return _0x8093x18[_0x7476[48]](_0x8093x13[_0x7476[60]])})[_0x7476[25]](function(_0x8093x18){return _0x8093x14[_0x7476[24]](200)[_0x7476[23]](_0x8093x18)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[77]]= function(_0x8093x13,_0x8093x14){var _0x8093x2b=0;var _0x8093x2c=_0x8093x13[_0x7476[60]];_0x8093x2c[_0x7476[81]](function(_0x8093x2d){delete _0x8093x2d[_0x7476[31]];delete _0x8093x2d[_0x7476[78]];delete _0x8093x2d[_0x7476[79]];_0x8093x2d[_0x7476[80]]=  ++_0x8093x2b});return sequelize[_0x7476[49]](function(_0x8093x1e){return ChatApplication[_0x7476[67]]({where:{ChatWebsiteId:_0x8093x13[_0x7476[32]][_0x7476[31]]},individualHooks:true,transaction:_0x8093x1e})[_0x7476[25]](function(){return ChatApplication[_0x7476[82]](_0x8093x2c,{individualHooks:true,transaction:_0x8093x1e})})})[_0x7476[25]](function(_0x8093x26){return _0x8093x14[_0x7476[24]](200)[_0x7476[23]]({count:_0x8093x26[_0x7476[56]],rows:_0x8093x26})})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[67]]= function(_0x8093x13,_0x8093x14){return ChatWebsite[_0x7476[33]](_0x8093x13[_0x7476[32]][_0x7476[31]])[_0x7476[25]](function(_0x8093x18){if(!_0x8093x18){return _0x8093x14[_0x7476[30]](404)};return _0x8093x18[_0x7476[67]]()})[_0x7476[25]](function(){return _0x8093x14[_0x7476[30]](204)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[83]]= function(_0x8093x13,_0x8093x14){return ChatWebsite[_0x7476[67]]({where:{id:_0x8093x13[_0x7476[26]][_0x7476[84]]},individualHooks:true})[_0x7476[25]](function(){return _0x8093x14[_0x7476[30]](204)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[85]]= function(_0x8093x13,_0x8093x14){return ChatApplication[_0x7476[67]]({where:{id:_0x8093x13[_0x7476[26]][_0x7476[86]]},individualHooks:true})[_0x7476[25]](function(){return _0x8093x14[_0x7476[30]](204)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[87]]= function(_0x8093x13,_0x8093x14,_0x8093x15){return ChatApplication[_0x7476[33]](_0x8093x13[_0x7476[32]][_0x7476[88]])[_0x7476[25]](function(_0x8093x2e){if(!_0x8093x2e){return _0x8093x14[_0x7476[30]](404)};return _0x8093x2e[_0x7476[67]]()})[_0x7476[25]](function(){return _0x8093x14[_0x7476[30]](204)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[89]]= function(_0x8093x13,_0x8093x14){return ChatWebsitesField[_0x7476[93]]({method:[_0x8093x13[_0x7476[32]][_0x7476[92]],_0x8093x13[_0x7476[32]][_0x7476[31]]]})[_0x7476[91]]()[_0x7476[25]](function(_0x8093x2f){return _0x8093x14[_0x7476[24]](200)[_0x7476[90]](_0x8093x2f)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[94]]= function(_0x8093x13,_0x8093x14,_0x8093x15){return ChatWebsitesField[_0x7476[67]]({where:_0x8093x13[_0x7476[32]][_0x7476[92]]=== _0x7476[95]?{OnlineId:_0x8093x13[_0x7476[32]][_0x7476[31]]}:{OfflineId:_0x8093x13[_0x7476[32]][_0x7476[31]]}})[_0x7476[25]](function(){_[_0x7476[81]](_0x8093x13[_0x7476[60]],function(_0x8093x30){if(_0x8093x13[_0x7476[32]][_0x7476[92]]=== _0x7476[95]){_0x8093x30[_0x7476[96]]= _0x8093x13[_0x7476[32]][_0x7476[31]]}else {if(_0x8093x13[_0x7476[32]][_0x7476[92]]=== _0x7476[97]){_0x8093x30[_0x7476[98]]= _0x8093x13[_0x7476[32]][_0x7476[31]]}}});return ChatWebsitesField[_0x7476[82]](_0x8093x13[_0x7476[60]])})[_0x7476[25]](function(_0x8093x1c){_0x8093x14[_0x7476[24]](201)[_0x7476[90]](_0x8093x1c)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[99]]= function(_0x8093x13,_0x8093x14){return ChatProactiveAction[_0x7476[67]]({where:{id:_0x8093x13[_0x7476[26]][_0x7476[86]]},individualHooks:true})[_0x7476[25]](function(){return _0x8093x14[_0x7476[30]](204)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[100]]= function(_0x8093x13,_0x8093x14,_0x8093x15){return ChatProactiveAction[_0x7476[33]](_0x8093x13[_0x7476[32]][_0x7476[101]])[_0x7476[25]](function(_0x8093x31){if(!_0x8093x31){return _0x8093x14[_0x7476[30]](404)};return _0x8093x31[_0x7476[67]]()})[_0x7476[25]](function(){return _0x8093x14[_0x7476[30]](204)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[102]]= function(_0x8093x13,_0x8093x14,_0x8093x15){return ChatWebsite[_0x7476[33]](_0x8093x13[_0x7476[32]][_0x7476[31]])[_0x7476[25]](function(_0x8093x27){if(!_0x8093x27){return _0x8093x14[_0x7476[30]](404)};_0x8093x13[_0x7476[60]][_0x7476[59]]= _0x8093x27[_0x7476[31]];return ChatProactiveAction[_0x7476[61]](_0x8093x13[_0x7476[60]])})[_0x7476[25]](function(_0x8093x31){return _0x8093x14[_0x7476[24]](201)[_0x7476[23]](_0x8093x31)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[103]]= function(_0x8093x13,_0x8093x14){if(_0x8093x13[_0x7476[60]][_0x7476[31]]){delete _0x8093x13[_0x7476[60]][_0x7476[31]]};return ChatProactiveAction[_0x7476[33]](_0x8093x13[_0x7476[32]][_0x7476[101]])[_0x7476[25]](function(_0x8093x31){if(!_0x8093x31){return _0x8093x14[_0x7476[30]](404)};return _0x8093x31[_0x7476[48]](_0x8093x13[_0x7476[60]])})[_0x7476[25]](function(_0x8093x31){return _0x8093x14[_0x7476[24]](200)[_0x7476[23]](_0x8093x31)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};function handleError(_0x8093x14,_0x8093x16){return _0x8093x14[_0x7476[24]](500)[_0x7476[23]](_0x8093x16)}exports[_0x7476[104]]= function(_0x8093x13,_0x8093x14,_0x8093x15){return ChatApplication[_0x7476[105]](_0x7476[80],{where:{ChatWebsiteId:_0x8093x13[_0x7476[32]][_0x7476[31]]}})[_0x7476[25]](function(_0x8093x33){_0x8093x13[_0x7476[60]][_0x7476[80]]= _0x8093x33?++_0x8093x33:1;_0x8093x13[_0x7476[60]][_0x7476[59]]= _0x8093x13[_0x7476[32]][_0x7476[31]];return ChatApplication[_0x7476[61]](_0x8093x13[_0x7476[60]])})[_0x7476[25]](function(_0x8093x2e){return _0x8093x14[_0x7476[24]](201)[_0x7476[23]](_0x8093x2e)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[106]]= function(_0x8093x13,_0x8093x14){if(_0x8093x13[_0x7476[60]][_0x7476[31]]){delete _0x8093x13[_0x7476[60]][_0x7476[31]]};return ChatApplication[_0x7476[33]](_0x8093x13[_0x7476[32]][_0x7476[88]])[_0x7476[25]](function(_0x8093x2e){if(!_0x8093x2e){return _0x8093x14[_0x7476[30]](404)};return _0x8093x2e[_0x7476[48]](_0x8093x13[_0x7476[60]])})[_0x7476[25]](function(_0x8093x2e){return _0x8093x14[_0x7476[24]](200)[_0x7476[23]](_0x8093x2e)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})};exports[_0x7476[107]]= function(_0x8093x13,_0x8093x14){return ChatApplication[_0x7476[33]](_0x8093x13[_0x7476[32]][_0x7476[88]],{include:[{all:true}]})[_0x7476[25]](function(_0x8093x2e){if(!_0x8093x2e){return _0x8093x14[_0x7476[30]](404)};return _0x8093x14[_0x7476[23]](_0x8093x2e)})[_0x7476[22]](function(_0x8093x16){return handleError(_0x8093x14,_0x8093x16)})}
\ No newline at end of file
diff --git a/server/api/chat_website/chat_website.events.js b/server/api/chat_website/chat_website.events.js
index f910de1..ae17467 100644
--- a/server/api/chat_website/chat_website.events.js
+++ b/server/api/chat_website/chat_website.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ChatWebsite = require('../../models').ChatWebsite;
-
-var ChatWebsiteEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ChatWebsiteEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ChatWebsite.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ChatWebsiteEvents.emit(event + ':' + doc._id, doc);
-    ChatWebsiteEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ChatWebsiteEvents;
+var _0x36a8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x36a8[0];const EventEmitter=require(_0x36a8[1]);const ChatWebsite=require(_0x36a8[3])[_0x36a8[2]];var ChatWebsiteEvents= new EventEmitter();ChatWebsiteEvents[_0x36a8[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x36a8[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x36a8[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x36a8[6]};for(var e in events){var event=events[e];ChatWebsite[_0x36a8[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x939fx8,_0x939fx9,_0x939fxa){ChatWebsiteEvents[_0x36a8[10]](event+ _0x36a8[8]+ _0x939fx8[_0x36a8[9]],_0x939fx8);ChatWebsiteEvents[_0x36a8[10]](event,_0x939fx8);_0x939fxa(null)}}module[_0x36a8[11]]= ChatWebsiteEvents
\ No newline at end of file
diff --git a/server/api/chat_website/chat_website.socket.js b/server/api/chat_website/chat_website.socket.js
index 5200183..13435bf 100644
--- a/server/api/chat_website/chat_website.socket.js
+++ b/server/api/chat_website/chat_website.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const ChatWebsiteEvents = require('./chat_website.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('chat_website:' + event, socket);
-
-    ChatWebsiteEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ChatWebsiteEvents.removeListener(event, listener);
-  };
-}
+var _0xa3ba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xa3ba[0];const ChatWebsiteEvents=require(_0xa3ba[1]);var events=[_0xa3ba[2],_0xa3ba[3]];exports[_0xa3ba[4]]= function(_0x91dax3){for(var _0x91dax4=0,_0x91dax5=events[_0xa3ba[5]];_0x91dax4< _0x91dax5;_0x91dax4++){var _0x91dax6=events[_0x91dax4];var _0x91dax7=createListener(_0xa3ba[6]+ _0x91dax6,_0x91dax3);ChatWebsiteEvents[_0xa3ba[7]](_0x91dax6,_0x91dax7);_0x91dax3[_0xa3ba[7]](_0xa3ba[8],removeListener(_0x91dax6,_0x91dax7))}};function createListener(_0x91dax6,_0x91dax3){return function(_0x91dax9){_0x91dax3[_0xa3ba[9]](_0x91dax6,_0x91dax9)}}function removeListener(_0x91dax6,_0x91dax7){return function(){ChatWebsiteEvents[_0xa3ba[10]](_0x91dax6,_0x91dax7)}}
\ No newline at end of file
diff --git a/server/api/chat_website/index.js b/server/api/chat_website/index.js
index a197f8f..3c21fd8 100644
--- a/server/api/chat_website/index.js
+++ b/server/api/chat_website/index.js
@@ -1,40 +1 @@
-'use strict';
-
-var express = require('express');
-
-var controller = require('./chat_website.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.index);
-router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.show);
-router.get('/:id/applications', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.showApplications);
-router.get('/:id/applications/:appId', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.showApplication);
-router.get('/:id/dispositions', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.getDispositions);
-router.get('/:id/proactive', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.showProactiveActions);
-router.get('/:id/fields/:type', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.getForms);
-router.get('/:id/snippet', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.getSnippetCode);
-router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.create);
-router.post('/:id/applications', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.createApplication);
-router.post('/:id/dispositions', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.createDisposition);
-router.post('/:id/proactive', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.createProactiveAction);
-router.post('/:id/logo', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.changeLogo);
-router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update);
-router.put('/:id/applications', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.updateApplications);
-router.put('/:id/applications/:appId', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.updateApplication);
-router.put('/:id/dispositions/:dispId', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.updateDisposition);
-router.put('/:id/proactive/:pactionId', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.updateProactiveAction);
-router.put('/:id/fields/:type', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.updateForms);
-router.patch('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update);
-router.delete('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.bulkDestroy);
-router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroy);
-router.delete('/:id/applications', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.bulkDestroyApplications);
-router.delete('/:id/proactive', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.bulkDestroyProactiveActions);
-router.delete('/:id/applications/:appId', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroyApplication);
-router.delete('/:id/proactive/:pactionId', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroyProactiveAction);
-router.delete('/:id/dispositions/:dispId', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroyDisposition);
-
-
-module.exports = router;
+var _0xea0a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x61\x67\x65\x6E\x74","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x61\x70\x70\x49\x64","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65","\x73\x68\x6F\x77\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x74\x79\x70\x65","\x67\x65\x74\x46\x6F\x72\x6D\x73","\x2F\x3A\x69\x64\x2F\x73\x6E\x69\x70\x70\x65\x74","\x67\x65\x74\x53\x6E\x69\x70\x70\x65\x74\x43\x6F\x64\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x6C\x6F\x67\x6F","\x63\x68\x61\x6E\x67\x65\x4C\x6F\x67\x6F","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73\x2F\x3A\x64\x69\x73\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x2F\x3A\x70\x61\x63\x74\x69\x6F\x6E\x49\x64","\x75\x70\x64\x61\x74\x65\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x46\x6F\x72\x6D\x73","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0xea0a[0];var express=require(_0xea0a[1]);var controller=require(_0xea0a[2]);var auth=require(_0xea0a[3]);var license=require(_0xea0a[4]);var router=express.Router();router[_0xea0a[12]](_0xea0a[5],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[11]]);router[_0xea0a[12]](_0xea0a[13],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9],_0xea0a[14]]),controller[_0xea0a[15]]);router[_0xea0a[12]](_0xea0a[16],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[17]]);router[_0xea0a[12]](_0xea0a[18],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[19]]);router[_0xea0a[12]](_0xea0a[20],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9],_0xea0a[14]]),controller[_0xea0a[21]]);router[_0xea0a[12]](_0xea0a[22],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[23]]);router[_0xea0a[12]](_0xea0a[24],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[25]]);router[_0xea0a[12]](_0xea0a[26],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[27]]);router[_0xea0a[29]](_0xea0a[5],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[28]]);router[_0xea0a[29]](_0xea0a[16],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[30]]);router[_0xea0a[29]](_0xea0a[20],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[31]]);router[_0xea0a[29]](_0xea0a[22],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[32]]);router[_0xea0a[29]](_0xea0a[33],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[34]]);router[_0xea0a[36]](_0xea0a[13],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[35]]);router[_0xea0a[36]](_0xea0a[16],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[37]]);router[_0xea0a[36]](_0xea0a[18],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[38]]);router[_0xea0a[36]](_0xea0a[39],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[40]]);router[_0xea0a[36]](_0xea0a[41],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[42]]);router[_0xea0a[36]](_0xea0a[24],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[43]]);router[_0xea0a[44]](_0xea0a[13],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[35]]);router[_0xea0a[46]](_0xea0a[5],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[45]]);router[_0xea0a[46]](_0xea0a[13],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[47]]);router[_0xea0a[46]](_0xea0a[16],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[48]]);router[_0xea0a[46]](_0xea0a[22],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[49]]);router[_0xea0a[46]](_0xea0a[18],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[50]]);router[_0xea0a[46]](_0xea0a[41],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[51]]);router[_0xea0a[46]](_0xea0a[39],license[_0xea0a[6]](),license[_0xea0a[7]](),auth[_0xea0a[8]](),auth[_0xea0a[10]]([8],[_0xea0a[9]]),controller[_0xea0a[52]]);module[_0xea0a[53]]= router
\ No newline at end of file
diff --git a/server/api/chat_websites_field/chat_websites_field.controller.js b/server/api/chat_websites_field/chat_websites_field.controller.js
index 78c9c47..9b89f9e 100644
--- a/server/api/chat_websites_field/chat_websites_field.controller.js
+++ b/server/api/chat_websites_field/chat_websites_field.controller.js
@@ -1,112 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/chat/websites/fields              ->  index
- * POST    /api/chat/websites/fields              ->  create
- * GET     /api/chat/websites/fields/:id          ->  show
- * PUT     /api/chat/websites/fields/:id          ->  update
- * DELETE  /api/chat/websites/fields/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var ChatWebsitesField = require('../../models').ChatWebsitesField;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function responseWithoutResult(res, statusCode) {
-  statusCode = statusCode || 204;
-  return function() {
-    res.sendStatus(statusCode);
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) { 
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of ChatWebsitesFields
-exports.index = function(req, res) {
-  return ChatWebsitesField.findAll(Util.getQuery(req.query))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single ChatWebsitesField from the DB
-exports.show = function(req, res) {
-  return ChatWebsitesField.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new ChatWebsitesField in the DB
-exports.create = function(req, res) {
-  return ChatWebsitesField.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing ChatWebsitesField in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return ChatWebsitesField.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a ChatWebsitesField from the DB
-exports.destroy = function(req, res) {
-  return ChatWebsitesField.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
+var _0xecaf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0xecaf[0];var _=require(_0xecaf[1]);var Util=require(_0xecaf[2]);var ChatWebsitesField=require(_0xecaf[4])[_0xecaf[3]];function handleError(_0xba2bx5,_0xba2bx6){_0xba2bx6= _0xba2bx6|| 500;return function(_0xba2bx7){_0xba2bx5[_0xecaf[6]](_0xba2bx6)[_0xecaf[5]](_0xba2bx7)}}function responseWithResult(_0xba2bx5,_0xba2bx6){_0xba2bx6= _0xba2bx6|| 200;return function(_0xba2bx9){if(_0xba2bx9){_0xba2bx5[_0xecaf[6]](_0xba2bx6)[_0xecaf[7]](_0xba2bx9)}}}function responseWithoutResult(_0xba2bx5,_0xba2bx6){_0xba2bx6= _0xba2bx6|| 204;return function(){_0xba2bx5[_0xecaf[8]](_0xba2bx6)}}function handleEntityNotFound(_0xba2bx5){return function(_0xba2bx9){if(!_0xba2bx9){_0xba2bx5[_0xecaf[6]](404)[_0xecaf[9]]();return null};return _0xba2bx9}}function saveUpdates(_0xba2bxd){return function(_0xba2bx9){return _0xba2bx9[_0xecaf[11]](_0xba2bxd)[_0xecaf[10]](function(_0xba2bxe){return _0xba2bxe})}}function removeEntity(_0xba2bx5){return function(_0xba2bx9){if(_0xba2bx9){return _0xba2bx9[_0xecaf[12]]()[_0xecaf[10]](function(){_0xba2bx5[_0xecaf[6]](204)[_0xecaf[9]]()})}}}exports[_0xecaf[13]]= function(_0xba2bx10,_0xba2bx5){return ChatWebsitesField[_0xecaf[17]](Util[_0xecaf[16]](_0xba2bx10[_0xecaf[15]]))[_0xecaf[10]](responseWithResult(_0xba2bx5))[_0xecaf[14]](handleError(_0xba2bx5))};exports[_0xecaf[18]]= function(_0xba2bx10,_0xba2bx5){return ChatWebsitesField[_0xecaf[21]](_0xba2bx10[_0xecaf[20]][_0xecaf[19]])[_0xecaf[10]](handleEntityNotFound(_0xba2bx5))[_0xecaf[10]](responseWithResult(_0xba2bx5))[_0xecaf[14]](handleError(_0xba2bx5))};exports[_0xecaf[22]]= function(_0xba2bx10,_0xba2bx5){return ChatWebsitesField[_0xecaf[22]](_0xba2bx10[_0xecaf[23]])[_0xecaf[10]](responseWithResult(_0xba2bx5,201))[_0xecaf[14]](handleError(_0xba2bx5))};exports[_0xecaf[24]]= function(_0xba2bx10,_0xba2bx5){if(_0xba2bx10[_0xecaf[23]][_0xecaf[19]]){delete _0xba2bx10[_0xecaf[23]][_0xecaf[19]]};return ChatWebsitesField[_0xecaf[21]](_0xba2bx10[_0xecaf[20]][_0xecaf[19]])[_0xecaf[10]](handleEntityNotFound(_0xba2bx5))[_0xecaf[10]](saveUpdates(_0xba2bx10[_0xecaf[23]]))[_0xecaf[10]](responseWithResult(_0xba2bx5))[_0xecaf[14]](handleError(_0xba2bx5))};exports[_0xecaf[12]]= function(_0xba2bx10,_0xba2bx5){return ChatWebsitesField[_0xecaf[21]](_0xba2bx10[_0xecaf[20]][_0xecaf[19]])[_0xecaf[10]](handleEntityNotFound(_0xba2bx5))[_0xecaf[10]](removeEntity(_0xba2bx5))[_0xecaf[14]](handleError(_0xba2bx5))}
\ No newline at end of file
diff --git a/server/api/chat_websites_field/chat_websites_field.events.js b/server/api/chat_websites_field/chat_websites_field.events.js
index 44c852c..e0f7eb2 100644
--- a/server/api/chat_websites_field/chat_websites_field.events.js
+++ b/server/api/chat_websites_field/chat_websites_field.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ChatWebsitesField = require('../../models').ChatWebsitesField;
-
-var ChatWebsitesFieldEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ChatWebsitesFieldEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ChatWebsitesField.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ChatWebsitesFieldEvents.emit(event + ':' + doc._id, doc);
-    ChatWebsitesFieldEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ChatWebsitesFieldEvents;
+var _0xda3f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xda3f[0];const EventEmitter=require(_0xda3f[1]);const ChatWebsitesField=require(_0xda3f[3])[_0xda3f[2]];var ChatWebsitesFieldEvents= new EventEmitter();ChatWebsitesFieldEvents[_0xda3f[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xda3f[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xda3f[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xda3f[6]};for(var e in events){var event=events[e];ChatWebsitesField[_0xda3f[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x9dc6x8,_0x9dc6x9,_0x9dc6xa){ChatWebsitesFieldEvents[_0xda3f[10]](event+ _0xda3f[8]+ _0x9dc6x8[_0xda3f[9]],_0x9dc6x8);ChatWebsitesFieldEvents[_0xda3f[10]](event,_0x9dc6x8);_0x9dc6xa(null)}}module[_0xda3f[11]]= ChatWebsitesFieldEvents
\ No newline at end of file
diff --git a/server/api/chat_websites_field/chat_websites_field.socket.js b/server/api/chat_websites_field/chat_websites_field.socket.js
index 8232b06..a3f9303 100644
--- a/server/api/chat_websites_field/chat_websites_field.socket.js
+++ b/server/api/chat_websites_field/chat_websites_field.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const ChatWebsitesFieldEvents = require('./chat_websites_field.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('chat_websites_field:' + event, socket);
-
-    ChatWebsitesFieldEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ChatWebsitesFieldEvents.removeListener(event, listener);
-  };
-}
+var _0xea56=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xea56[0];const ChatWebsitesFieldEvents=require(_0xea56[1]);var events=[_0xea56[2],_0xea56[3]];exports[_0xea56[4]]= function(_0xbd1cx3){for(var _0xbd1cx4=0,_0xbd1cx5=events[_0xea56[5]];_0xbd1cx4< _0xbd1cx5;_0xbd1cx4++){var _0xbd1cx6=events[_0xbd1cx4];var _0xbd1cx7=createListener(_0xea56[6]+ _0xbd1cx6,_0xbd1cx3);ChatWebsitesFieldEvents[_0xea56[7]](_0xbd1cx6,_0xbd1cx7);_0xbd1cx3[_0xea56[7]](_0xea56[8],removeListener(_0xbd1cx6,_0xbd1cx7))}};function createListener(_0xbd1cx6,_0xbd1cx3){return function(_0xbd1cx9){_0xbd1cx3[_0xea56[9]](_0xbd1cx6,_0xbd1cx9)}}function removeListener(_0xbd1cx6,_0xbd1cx7){return function(){ChatWebsitesFieldEvents[_0xea56[10]](_0xbd1cx6,_0xbd1cx7)}}
\ No newline at end of file
diff --git a/server/api/chat_websites_field/index.js b/server/api/chat_websites_field/index.js
index c525bbb..bf02f5d 100644
--- a/server/api/chat_websites_field/index.js
+++ b/server/api/chat_websites_field/index.js
@@ -1,18 +1 @@
-'use strict';
-
-var express = require('express');
-
-var auth = require('../../auth/auth.service');
-var controller = require('./chat_websites_field.controller');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.index);
-router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.show);
-router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.create);
-router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update);
-router.patch('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update);
-router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xd0cd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xd0cd[0];var express=require(_0xd0cd[1]);var auth=require(_0xd0cd[2]);var controller=require(_0xd0cd[3]);var license=require(_0xd0cd[4]);var router=express.Router();router[_0xd0cd[12]](_0xd0cd[5],license[_0xd0cd[6]](),license[_0xd0cd[7]](),auth[_0xd0cd[8]](),auth[_0xd0cd[10]]([8],[_0xd0cd[9]]),controller[_0xd0cd[11]]);router[_0xd0cd[12]](_0xd0cd[13],license[_0xd0cd[6]](),license[_0xd0cd[7]](),auth[_0xd0cd[8]](),auth[_0xd0cd[10]]([8],[_0xd0cd[9]]),controller[_0xd0cd[14]]);router[_0xd0cd[16]](_0xd0cd[5],license[_0xd0cd[6]](),license[_0xd0cd[7]](),auth[_0xd0cd[8]](),auth[_0xd0cd[10]]([8],[_0xd0cd[9]]),controller[_0xd0cd[15]]);router[_0xd0cd[18]](_0xd0cd[13],license[_0xd0cd[6]](),license[_0xd0cd[7]](),auth[_0xd0cd[8]](),auth[_0xd0cd[10]]([8],[_0xd0cd[9]]),controller[_0xd0cd[17]]);router[_0xd0cd[19]](_0xd0cd[13],license[_0xd0cd[6]](),license[_0xd0cd[7]](),auth[_0xd0cd[8]](),auth[_0xd0cd[10]]([8],[_0xd0cd[9]]),controller[_0xd0cd[17]]);router[_0xd0cd[21]](_0xd0cd[13],license[_0xd0cd[6]](),license[_0xd0cd[7]](),auth[_0xd0cd[8]](),auth[_0xd0cd[10]]([8],[_0xd0cd[9]]),controller[_0xd0cd[20]]);module[_0xd0cd[22]]= router
\ No newline at end of file
diff --git a/server/api/company/company.controller.js b/server/api/company/company.controller.js
index a20f981..a9dc08b 100644
--- a/server/api/company/company.controller.js
+++ b/server/api/company/company.controller.js
@@ -1,146 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Company = require('../../models').Company;
-var util = require('util');
-var Util = require('../../config/util');
-
-// Get list of companies
-exports.index = function(req, res, next) {
-  return Company
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.companyValidation = function(req, res) {
-  return Company
-    .findAll({
-      where: {
-        name: req.body.name
-      }
-    })
-    .then(function(companies) {
-      if (!companies) {
-        return res.sendStatus(404);
-      }
-      return res.send(companies);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single company
-exports.show = function(req, res) {
-  return Company
-    .findById(req.params.id)
-    .then(function(company) {
-      if (!company) {
-        return res.sendStatus(404);
-      }
-      return res.send(company);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new company in the DB.
-exports.create = function(req, res) {
-  return Company
-    .create(req.body)
-    .then(function(company) {
-      return res.status(201).send(company);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing company in the DB.
-exports.update = function(req, res) {
-  return Company
-    .findAll({
-      where: {
-        name: req.body.name,
-        id: {
-          $ne: req.body.id
-        }
-      }
-    })
-    .then(function(companies) {
-      if (!companies) {
-        return res.sendStatus(404);
-      }
-      if (companies.length > 0) {
-        return res.status(500).send({
-          message: 'MESSAGE_EXIST_COMPANY'
-        })
-      }
-      if (req.body.id) {
-        delete req.body.id;
-      }
-      return Company
-        .find({
-          where: {
-            id: req.params.id
-          }
-        });
-    })
-    .then(function(company) {
-      if (!company) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(company, req.body);
-      return updated.save();
-    })
-    .then(function(company) {
-      return res.status(200).send(company);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a company from the DB.
-exports.destroy = function(req, res) {
-  return Company
-    .findById(req.params.id)
-    .then(function(company) {
-      if (!company) {
-        return res.sendStatus(404);
-      }
-      return company.destroy()
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.bulkDestroy = function(req, res) {
-  return Company
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x3c78=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x43\x6F\x6D\x70\x61\x6E\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x63\x6F\x6D\x70\x61\x6E\x79\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6E\x61\x6D\x65","\x62\x6F\x64\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x6C\x65\x6E\x67\x74\x68","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x43\x4F\x4D\x50\x41\x4E\x59","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x3c78[0];var _=require(_0x3c78[1]);var Company=require(_0x3c78[3])[_0x3c78[2]];var util=require(_0x3c78[4]);var Util=require(_0x3c78[5]);exports[_0x3c78[6]]= function(_0x3df2x5,_0x3df2x6,_0x3df2x7){return Company[_0x3c78[13]](Util[_0x3c78[12]](_0x3df2x5[_0x3c78[11]]))[_0x3c78[10]](function(_0x3df2x9){_0x3df2x6[_0x3c78[9]](200)[_0x3c78[8]](_0x3df2x9)})[_0x3c78[7]](function(_0x3df2x8){return handleError(_0x3df2x6,_0x3df2x8)})};exports[_0x3c78[14]]= function(_0x3df2x5,_0x3df2x6){return Company[_0x3c78[18]]({where:{name:_0x3df2x5[_0x3c78[17]][_0x3c78[16]]}})[_0x3c78[10]](function(_0x3df2xa){if(!_0x3df2xa){return _0x3df2x6[_0x3c78[15]](404)};return _0x3df2x6[_0x3c78[8]](_0x3df2xa)})[_0x3c78[7]](function(_0x3df2x8){return handleError(_0x3df2x6,_0x3df2x8)})};exports[_0x3c78[19]]= function(_0x3df2x5,_0x3df2x6){return Company[_0x3c78[22]](_0x3df2x5[_0x3c78[21]][_0x3c78[20]])[_0x3c78[10]](function(_0x3df2xb){if(!_0x3df2xb){return _0x3df2x6[_0x3c78[15]](404)};return _0x3df2x6[_0x3c78[8]](_0x3df2xb)})[_0x3c78[7]](function(_0x3df2x8){return handleError(_0x3df2x6,_0x3df2x8)})};exports[_0x3c78[23]]= function(_0x3df2x5,_0x3df2x6){return Company[_0x3c78[23]](_0x3df2x5[_0x3c78[17]])[_0x3c78[10]](function(_0x3df2xb){return _0x3df2x6[_0x3c78[9]](201)[_0x3c78[8]](_0x3df2xb)})[_0x3c78[7]](function(_0x3df2x8){return handleError(_0x3df2x6,_0x3df2x8)})};exports[_0x3c78[24]]= function(_0x3df2x5,_0x3df2x6){return Company[_0x3c78[18]]({where:{name:_0x3df2x5[_0x3c78[17]][_0x3c78[16]],id:{$ne:_0x3df2x5[_0x3c78[17]][_0x3c78[20]]}}})[_0x3c78[10]](function(_0x3df2xa){if(!_0x3df2xa){return _0x3df2x6[_0x3c78[15]](404)};if(_0x3df2xa[_0x3c78[27]]> 0){return _0x3df2x6[_0x3c78[9]](500)[_0x3c78[8]]({message:_0x3c78[28]})};if(_0x3df2x5[_0x3c78[17]][_0x3c78[20]]){delete _0x3df2x5[_0x3c78[17]][_0x3c78[20]]};return Company[_0x3c78[29]]({where:{id:_0x3df2x5[_0x3c78[21]][_0x3c78[20]]}})})[_0x3c78[10]](function(_0x3df2xb){if(!_0x3df2xb){return _0x3df2x6[_0x3c78[15]](404)};var _0x3df2xc=_[_0x3c78[25]](_0x3df2xb,_0x3df2x5[_0x3c78[17]]);return _0x3df2xc[_0x3c78[26]]()})[_0x3c78[10]](function(_0x3df2xb){return _0x3df2x6[_0x3c78[9]](200)[_0x3c78[8]](_0x3df2xb)})[_0x3c78[7]](function(_0x3df2x8){return handleError(_0x3df2x6,_0x3df2x8)})};exports[_0x3c78[30]]= function(_0x3df2x5,_0x3df2x6){return Company[_0x3c78[22]](_0x3df2x5[_0x3c78[21]][_0x3c78[20]])[_0x3c78[10]](function(_0x3df2xb){if(!_0x3df2xb){return _0x3df2x6[_0x3c78[15]](404)};return _0x3df2xb[_0x3c78[30]]()})[_0x3c78[10]](function(){return _0x3df2x6[_0x3c78[15]](204)})[_0x3c78[7]](function(_0x3df2x8){return handleError(_0x3df2x6,_0x3df2x8)})};exports[_0x3c78[31]]= function(_0x3df2x5,_0x3df2x6){return Company[_0x3c78[30]]({where:{id:_0x3df2x5[_0x3c78[11]][_0x3c78[32]]},individualHooks:true})[_0x3c78[10]](function(){return _0x3df2x6[_0x3c78[15]](204)})[_0x3c78[7]](function(_0x3df2x8){return handleError(_0x3df2x6,_0x3df2x8)})};function handleError(_0x3df2x6,_0x3df2x8){return _0x3df2x6[_0x3c78[9]](500)[_0x3c78[8]](_0x3df2x8)}
\ No newline at end of file
diff --git a/server/api/company/company.events.js b/server/api/company/company.events.js
index b232d0d..8a8528d 100644
--- a/server/api/company/company.events.js
+++ b/server/api/company/company.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Company = require('../../models').Company;
-
-var CompanyEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-CompanyEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Company.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    CompanyEvents.emit(event + ':' + doc._id, doc);
-    CompanyEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = CompanyEvents;
+var _0x860f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x6F\x6D\x70\x61\x6E\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x860f[0];const EventEmitter=require(_0x860f[1]);const Company=require(_0x860f[3])[_0x860f[2]];var CompanyEvents= new EventEmitter();CompanyEvents[_0x860f[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x860f[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x860f[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x860f[6]};for(var e in events){var event=events[e];Company[_0x860f[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x8c5cx8,_0x8c5cx9,_0x8c5cxa){CompanyEvents[_0x860f[10]](event+ _0x860f[8]+ _0x8c5cx8[_0x860f[9]],_0x8c5cx8);CompanyEvents[_0x860f[10]](event,_0x8c5cx8);_0x8c5cxa(null)}}module[_0x860f[11]]= CompanyEvents
\ No newline at end of file
diff --git a/server/api/company/company.socket.js b/server/api/company/company.socket.js
index 5fb7808..69ab5e1 100644
--- a/server/api/company/company.socket.js
+++ b/server/api/company/company.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const CompanyEvents = require('./company.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('company:' + event, socket);
-
-    CompanyEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    CompanyEvents.removeListener(event, listener);
-  };
-}
+var _0x8a8d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x6F\x6D\x70\x61\x6E\x79\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x6F\x6D\x70\x61\x6E\x79\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x8a8d[0];const CompanyEvents=require(_0x8a8d[1]);var events=[_0x8a8d[2],_0x8a8d[3]];exports[_0x8a8d[4]]= function(_0x1756x3){for(var _0x1756x4=0,_0x1756x5=events[_0x8a8d[5]];_0x1756x4< _0x1756x5;_0x1756x4++){var _0x1756x6=events[_0x1756x4];var _0x1756x7=createListener(_0x8a8d[6]+ _0x1756x6,_0x1756x3);CompanyEvents[_0x8a8d[7]](_0x1756x6,_0x1756x7);_0x1756x3[_0x8a8d[7]](_0x8a8d[8],removeListener(_0x1756x6,_0x1756x7))}};function createListener(_0x1756x6,_0x1756x3){return function(_0x1756x9){_0x1756x3[_0x8a8d[9]](_0x1756x6,_0x1756x9)}}function removeListener(_0x1756x6,_0x1756x7){return function(){CompanyEvents[_0x8a8d[10]](_0x1756x6,_0x1756x7)}}
\ No newline at end of file
diff --git a/server/api/company/index.js b/server/api/company/index.js
index af51e8c..e02b24d 100644
--- a/server/api/company/index.js
+++ b/server/api/company/index.js
@@ -1,18 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./company.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.index);
-router.get('/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.show);
-router.post('/', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.create);
-router.post('/validate', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.companyValidation);
-router.put('/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.update);
-router.delete('/', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0x32a9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x6F\x6D\x70\x61\x6E\x79\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x43\x6D","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65","\x63\x6F\x6D\x70\x61\x6E\x79\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x32a9[0];var express=require(_0x32a9[1]);var controller=require(_0x32a9[2]);var auth=require(_0x32a9[3]);var license=require(_0x32a9[4]);var router=express.Router();router[_0x32a9[12]](_0x32a9[5],auth[_0x32a9[6]](),license[_0x32a9[7]](),auth[_0x32a9[10]]([5],[_0x32a9[8],_0x32a9[9]]),controller[_0x32a9[11]]);router[_0x32a9[12]](_0x32a9[13],auth[_0x32a9[6]](),license[_0x32a9[7]](),auth[_0x32a9[10]]([5],[_0x32a9[8],_0x32a9[9]]),controller[_0x32a9[14]]);router[_0x32a9[16]](_0x32a9[5],auth[_0x32a9[6]](),license[_0x32a9[7]](),auth[_0x32a9[10]]([5],[_0x32a9[8]]),controller[_0x32a9[15]]);router[_0x32a9[16]](_0x32a9[17],auth[_0x32a9[6]](),license[_0x32a9[7]](),auth[_0x32a9[10]]([5],[_0x32a9[8]]),controller[_0x32a9[18]]);router[_0x32a9[20]](_0x32a9[13],auth[_0x32a9[6]](),license[_0x32a9[7]](),auth[_0x32a9[10]]([5],[_0x32a9[8]]),controller[_0x32a9[19]]);router[_0x32a9[22]](_0x32a9[5],auth[_0x32a9[6]](),license[_0x32a9[7]](),auth[_0x32a9[10]]([5],[_0x32a9[8]]),controller[_0x32a9[21]]);router[_0x32a9[22]](_0x32a9[13],auth[_0x32a9[6]](),license[_0x32a9[7]](),auth[_0x32a9[10]]([5],[_0x32a9[8]]),controller[_0x32a9[23]]);module[_0x32a9[24]]= router
\ No newline at end of file
diff --git a/server/api/contact_manager/contact_manager.controller.js b/server/api/contact_manager/contact_manager.controller.js
index bfee7d3..9de4d19 100644
--- a/server/api/contact_manager/contact_manager.controller.js
+++ b/server/api/contact_manager/contact_manager.controller.js
@@ -1,714 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var moment = require('moment');
-var Contact = require('../../models').Contact;
-var User = require('../../models').User;
-var ContactPhone = require('../../models').ContactPhone;
-var ContactEmail = require('../../models').ContactEmail;
-var CustomField = require('../../models').CustomField;
-var ReportCall = require('../../models').ReportCall;
-var ReportQueue = require('../../models').ReportQueue;
-var ReportQueueHistory = require('../../models').history.ReportQueueHistory;
-var ReportChatRoom = require('../../models').ReportChatRoom;
-var ReportChatRoomHistory = require('../../models').history.ReportChatRoomHistory;
-var ChatRoom = require('../../models').ChatRoom;
-var FaxRoom = require('../../models').FaxRoom;
-var SmsRoom = require('../../models').SmsRoom;
-var ReportIntegration = require('../../models').ReportIntegration;
-var List = require('../../models').List;
-var ReportCallHistory = require('../../models').history.ReportCallHistory;
-var ReportMailSession = require('../../models').ReportMailSession;
-var MailRoom = require('../../models').MailRoom;
-var ReportMailSessionHistory = require('../../models').history.ReportMailSessionHistory;
-var Tag = require('../../models').Tag;
-var stream = require('stream');
-var sequelize = require('../../models').sequelize;
-var util = require('util');
-var Util = require('../../config/util');
-var Async = require('async');
-
-// Get list of contacts
-exports.index = function(req, res, next) {
-  var results, _agentLists;
-  switch (req.user.role) {
-    case 'agent':
-      return User
-        .findById(req.user.id)
-        .then(function(agent) {
-          return agent.getLists();
-        })
-        .then(function(lists) {
-          _agentLists = _.map(lists, 'id');
-          return List
-            .findAll({
-              where: {
-                defaultEntry: true
-              },
-              attributes: ['id']
-            });
-        })
-        .then(function(defaultLists) {
-          var company_list_query = {
-            CompanyId: req.query.CompanyId || null,
-            ListId: req.query.ListId || null,
-          };
-          delete req.query.CompanyId;
-          delete req.query.ListId;
-          return Contact
-            .scope('list', 'company', {
-              method: ['company_list_filter', company_list_query]
-            })
-            .findAndCountAll(Util.getQuery(req.query, company_list_query.ListId ? {} : {
-              ListId: {
-                $in: _agentLists.concat(_.map(defaultLists, 'id'))
-              }
-            }));
-        })
-        .then(function(contacts) {
-          results = {
-            rows: _.map(contacts.rows, 'dataValues'),
-            count: contacts.rows
-          };
-          return Contact
-            .describe();
-        })
-        .then(function(fields) {
-          fields = _.filter(_.keys(fields), function(elem) {
-            return _.includes(elem, 'cf_');
-          });
-          return CustomField
-            .findAll({
-              where: {
-                name: fields
-              }
-            });
-        })
-        .then(function(customFields) {
-          if (customFields.length) {
-            var cfs = _.map(customFields, 'name').join(',');
-            return sequelize.query(util.format('SELECT id,%s FROM cm_contacts WHERE id IN (\'' + _.map(results.rows, 'id').join("','") + '\')', cfs), {
-              type: sequelize.QueryTypes.SELECT
-            });
-          }
-        })
-        .then(function(contactsCf) {
-          _.merge(results.rows, contactsCf);
-          return results;
-        })
-        .then(function(result) {
-          res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-    default:
-      var company_list_query = {
-        CompanyId: req.query.CompanyId || null,
-        ListId: req.query.ListId || null,
-      };
-      delete req.query.CompanyId;
-      delete req.query.ListId;
-      return Contact
-        .scope('list', 'company', {
-          method: ['company_list_filter', company_list_query]
-        })
-        .findAndCountAll(Util.getQuery(req.query))
-        .then(function(contacts) {
-          results = {
-            rows: _.map(contacts.rows, 'dataValues'),
-            count: contacts.count
-          };
-          return Contact
-            .describe();
-        })
-        .then(function(fields) {
-          fields = _.filter(_.keys(fields), function(elem) {
-            return _.includes(elem, 'cf_');
-          });
-          return CustomField
-            .findAll({
-              where: {
-                name: fields
-              }
-            });
-        })
-        .then(function(customFields) {
-          if (results.rows.length && customFields.length) {
-            var cfs = _.map(customFields, 'name').join(',');
-            return sequelize.query(util.format('SELECT id,%s FROM cm_contacts WHERE id IN (\'' + _.map(results.rows, 'id').join("','") + '\')', cfs), {
-              type: sequelize.QueryTypes.SELECT
-            });
-          }
-        })
-        .then(function(contactsCf) {
-          var cfRow;
-          _.forEach(results.rows, function(row) {
-            cfRow = _.find(contactsCf, {
-              id: row.id
-            });
-            if (cfRow) {
-              _.merge(row, cfRow);
-            }
-          });
-          return results;
-        })
-        .then(function(result) {
-          res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-  }
-};
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return Contact
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getLog = function(req, res, next) {
-  req.query.detail = req.query.detail || 'general';
-  req.query.show = req.query.show || 'phone';
-  req.query.logType = req.query.logType || 'journal';
-  req.query.type = req.query.type || 'inbound';
-  var Api, where = {};
-  return Contact
-    .findById(req.params.id)
-    .then(function(contact) {
-      if (!contact) {
-        return res.sendStatus(404);
-      }
-      switch (req.query.detail) {
-        case 'general':
-          switch (req.query.show) {
-            case 'phone':
-              Api = (req.query.logType === 'history') ? ReportCallHistory : ReportCall;
-              if (req.query.type === 'outbound') {
-                where.destination = [contact.phone, contact.mobile];
-              } else {
-                where.source = [contact.phone, contact.mobile];
-              }
-              break;
-            case 'email':
-              Api = MailRoom;
-              where.from = contact.email;
-              if (req.query.logType === 'history') {
-                where.createdAt = {
-                  $lt: moment().startOf('day')
-                }
-              } else {
-                where.createdAt = {
-                  $gte: moment().startOf('day')
-                }
-              }
-              break;
-            case 'chat':
-              Api = ChatRoom;
-              where.contact = contact.email;
-              if (req.query.logType === 'history') {
-                where.createdAt = {
-                  $lt: moment().startOf('day')
-                }
-              } else {
-                where.createdAt = {
-                  $gte: moment().startOf('day')
-                }
-              }
-              break;
-            case 'fax':
-              Api = FaxRoom;
-              where.contact = contact.fax;
-              if (req.query.logType === 'history') {
-                where.createdAt = {
-                  $lt: moment().startOf('day')
-                }
-              } else {
-                where.createdAt = {
-                  $gte: moment().startOf('day')
-                }
-              }
-              break;
-            case 'sms':
-              Api = SmsRoom;
-              where.contact = [contact.phone, contact.mobile];
-              if (req.query.logType === 'history') {
-                where.createdAt = {
-                  $lt: moment().startOf('day')
-                }
-              } else {
-                where.createdAt = {
-                  $gte: moment().startOf('day')
-                }
-              }
-              break;
-            default:
-              Api = (req.query.logType === 'history') ? ReportCallHistory : ReportCall;
-          }
-          break;
-        case 'queue':
-          switch (req.query.show) {
-            case 'phone':
-              Api = (req.query.logType === 'history') ? ReportQueueHistory : ReportQueue;
-              where.calleridnum = [contact.phone, contact.mobile];
-              break;
-            case 'email':
-              return res.sendStatus(404);
-            default:
-              Api = (req.query.logType === 'history') ? ReportQueueHistory : ReportQueue;
-          }
-          break;
-        default:
-          Api = ReportCall;
-      }
-      delete req.query.detail;
-      delete req.query.show;
-      delete req.query.logType;
-      delete req.query.type;
-      return Api
-        .findAndCountAll(Util.getQuery(req.query, where));
-    })
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-
-};
-
-// Get a single managed_contact
-exports.show = function(req, res) {
-  var _contact;
-  return Contact
-    .scope('list', 'user', 'company')
-    .findById(req.params.id)
-    .then(function(managed_contact) {
-      if (!managed_contact) {
-        return res.sendStatus(404);
-      }
-      _contact = managed_contact;
-      return CustomField
-        .findAll({
-          where: {
-            ListId: _contact.ListId
-          }
-        });
-    })
-    .then(function(customFields) {
-      if (customFields.length) {
-        var cfs = _.map(customFields, 'name').join(',');
-        return sequelize.query(util.format('SELECT %s FROM cm_contacts WHERE id=%s', cfs, req.params.id), {
-          type: sequelize.QueryTypes.SELECT
-        });
-      }
-    })
-    .then(function(cfValues) {
-      if (cfValues) {
-        _.forEach(cfValues[0], function(value, key, array) {
-          if (value === 'null') {
-            array[key] = null;
-          }
-        });
-        _.merge(_contact.dataValues, cfValues[0]);
-      }
-    })
-    .then(function() {
-      return res.status(200).send(_contact);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.getEventContacts = function(req, res) {
-  return ReportIntegration
-    .findById(req.params.id)
-    .then(function(event) {
-      var where = {};
-      switch (event.eventChannel) {
-        case 'voice':
-          where = {
-            $or: {
-              phone: event.calleridnum,
-              mobile: event.calleridnum
-            }
-          };
-          break;
-        case 'mail':
-          where = {
-            email: event.from
-          };
-          break;
-        default:
-          where = {};
-      }
-      return Contact.findAndCountAll({
-        where: where,
-        include: [{
-          model: List,
-          where: {
-            $or: {
-              id: _.map(_.map(req.user.Lists, 'dataValues'), 'id'),
-              defaultEntry: true
-            }
-          }
-        }]
-      });
-    })
-    .then(function(contacts) {
-      return res.status(200).send(contacts);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-
-};
-
-// Creates a new managed_contact in the DB.
-exports.create = function(req, res, next) {
-  var _contact;
-  return Tag
-    .findAll()
-    .then(function(tags) {
-      var newTags = [];
-      var tagList = _.map(_.map(tags, 'dataValues'), 'name');
-      if (req.body.tags) {
-        req.body.tags.forEach(function(elem) {
-          if (!_.includes(tagList, elem)) {
-            newTags.push(Tag.create({
-              name: elem
-            }));
-          }
-        });
-      }
-      return newTags;
-    })
-    .all()
-    .then(function() {
-      req.body.UserId = req.user.id;
-      return Contact.create(req.body);
-    })
-    .then(function(contact) {
-      _contact = contact;
-
-      return CustomField
-        .findAll({
-          where: {
-            ListId: _contact.ListId
-          }
-        });
-    })
-    .then(function(customFields) {
-      if (customFields.length) {
-        var cfs = [];
-        customFields.forEach(function(elem) {
-          if (req.body.hasOwnProperty(elem.name)) {
-            cfs.push(util.format('%s=\'%s\'', elem.name, req.body[elem.name]));
-          }
-        });
-        if (cfs.length) {
-          cfs = cfs.join(',');
-          return sequelize.query(util.format('UPDATE cm_contacts SET %s WHERE id=%s', cfs, _contact.id));
-        }
-      }
-    })
-    .then(function() {
-      return res.status(201).send(_contact);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return next(err);
-    });
-};
-
-exports.copy = function(req, res, next) {
-  var _contact, _newContact;
-  return Contact
-    .findById(req.params.id)
-    .then(function(contact) {
-      _contact = contact.dataValues;
-      _newContact = _.clone(contact.dataValues);
-      delete _newContact.id;
-      _newContact.UserId = req.user.id;
-      _newContact.ListId = req.body.ListId;
-      _newContact.tags = _newContact.tags ? _newContact.tags.split(';') : [];
-      if (_newContact.tags.length > 1) {
-        _newContact.tags.pop();
-      }
-      return Contact
-        .create(_newContact);
-    })
-    .then(function(newContact) {
-      _newContact = newContact;
-      if (_contact.ListId === req.body.ListId) {
-        return CustomField
-          .findAll({
-            where: {
-              ListId: _contact.ListId
-            }
-          });
-      }
-    })
-    .then(function(customFields) {
-      if (customFields && customFields.length) {
-        var cfs = _.map(customFields, 'name').join(',');
-        return sequelize.query(util.format('SELECT %s FROM cm_contacts WHERE id=%s', cfs, _contact.id), {
-          type: sequelize.QueryTypes.SELECT
-        });
-      }
-    })
-    .then(function(cfValues) {
-      if (cfValues) {
-        var cfs = [];
-        _.forOwn(cfValues[0], function(value, key) {
-          cfs.push(util.format('%s=\'%s\'', key, value));
-        });
-        if (cfs.length) {
-          cfs = cfs.join(',');
-          return sequelize.query(util.format('UPDATE cm_contacts SET %s WHERE id=%s', cfs, _newContact.id));
-        }
-      }
-    })
-    .then(function() {
-      return res.status(201).send(_newContact);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return next(err);
-    });
-}
-
-// Creates a new managed_contact in the DB.
-exports.bulkCreate = function(req, res, next) {
-  var _contacts = [];
-  var _result = {
-    ok: 0,
-    ko: 0
-  };
-  return Tag
-    .findAll()
-    .then(function(tags) {
-      var newTags = [],
-        contactTags = [];
-      var tagList = _.map(_.map(tags, 'dataValues'), 'name');
-      req.body.contacts.forEach(function(contact) {
-        if (contact.tags) {
-          contactTags = _.union(contactTags, contact.tags);
-        }
-      });
-      contactTags.forEach(function(elem) {
-        if (!_.includes(tagList, elem)) {
-          newTags.push(Tag.create({
-            name: elem
-          }));
-        }
-      });
-      return newTags;
-    })
-    .all()
-    .then(function() {
-      var bulkCreate = [];
-      Async.forEachOf(req.body.contacts, function(contact) {
-        contact.UserId = req.user.id;
-
-        bulkCreate.push(Contact.create(contact)
-          .then(function(contact) {
-            _contacts.push(contact);
-            _result.ok++;
-          })
-          .catch(function(err) {
-            _result.ko++;
-          }));
-      })
-      return bulkCreate;
-    })
-    .all()
-    .then(function() {
-      return CustomField
-        .findAll({
-          where: {
-            ListId: {
-              $in: _.map(req.body.contacts, 'ListId')
-            }
-          }
-        });
-    })
-    .then(function(customFields) {
-      var bulkFields = [];
-      if (customFields.length) {
-        var cfs = [];
-        _contacts.forEach(function(contact) {
-          cfs = [];
-          customFields.forEach(function(elem) {
-            if (contact.hasOwnProperty(elem.name)) {
-              cfs.push(util.format('%s=\'%s\'', elem.name, req.body[elem.name]));
-            }
-          });
-          if (cfs.length) {
-            cfs = cfs.join(',');
-            bulkFields.push(sequelize.query(util.format('UPDATE cm_contacts SET %s WHERE id=%s', cfs, contact.id)));
-          }
-        });
-      }
-      return bulkFields;
-    })
-    .all()
-    .then(function() {
-      return res.status(201).send(_result);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return next(err);
-    });
-};
-
-// Updates an existing managed_contact in the DB.
-exports.update = function(req, res, next) {
-  return Promise
-    .all([])
-    .then(updateContact(req, res))
-    .then(function(contact) {
-      return res.status(200).send(contact);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.merge = function(req, res, next) {
-  var _contact;
-  return Promise
-    .all([])
-    .then(updateContact(req, res))
-    .then(function(contact) {
-      _contact = contact;
-      if (req.body.oldContact) {
-        return Contact
-          .destroy({
-            where: {
-              id: req.body.oldContact
-            },
-            individualHooks: true
-          });
-      }
-    })
-    .then(function() {
-      return res.status(200).send(_contact);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-function updateContact(req, res) {
-  return function() {
-    var _contact;
-    return Tag
-      .findAll()
-      .then(function(tags) {
-        var newTags = [];
-        var tagList = _.map(_.map(tags, 'dataValues'), 'name');
-        if (req.body.tags) {
-          req.body.tags.forEach(function(elem) {
-            if (!_.includes(tagList, elem)) {
-              newTags.push(Tag.create({
-                name: elem
-              }));
-            }
-          });
-        }
-        return newTags;
-      })
-      .then(function() {
-        return Contact.findById(req.params.id);
-      })
-      .then(function(contact) {
-        if (!contact) {
-          return res.sendStatus(404);
-        }
-        delete req.body.id;
-        return contact.updateAttributes(req.body)
-      })
-      .then(function(contact) {
-        _contact = contact;
-
-        return CustomField
-          .findAll({
-            where: {
-              ListId: _contact.ListId
-            }
-          });
-      })
-      .then(function(customFields) {
-        if (customFields.length) {
-          var cfs = [];
-          customFields.forEach(function(elem) {
-            if (req.body.hasOwnProperty(elem.name)) {
-              cfs.push(util.format('%s=\'%s\'', elem.name, req.body[elem.name]));
-            }
-          });
-          if (cfs.length) {
-            cfs = cfs.join(',');
-            return sequelize.query(util.format('UPDATE cm_contacts SET %s WHERE id=%s', cfs, _contact.id));
-          }
-        }
-      })
-      .then(function() {
-        return _contact;
-      })
-  }
-}
-
-// Deletes a managed_contact from the DB.
-exports.destroy = function(req, res) {
-  return Contact
-    .findById(req.params.id)
-    .then(function(managed_contact) {
-      if (!managed_contact) {
-        return res.sendStatus(404);
-      }
-      return managed_contact.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a managed_contact from the DB.
-exports.bulkDestroy = function(req, res) {
-  return Contact
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x8ff4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74\x50\x68\x6F\x6E\x65","\x43\x6F\x6E\x74\x61\x63\x74\x45\x6D\x61\x69\x6C","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D\x48\x69\x73\x74\x6F\x72\x79","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x46\x61\x78\x52\x6F\x6F\x6D","\x53\x6D\x73\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x4C\x69\x73\x74","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x48\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x54\x61\x67","\x73\x74\x72\x65\x61\x6D","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x72\x6F\x77\x73","\x6D\x65\x72\x67\x65","\x6C\x65\x6E\x67\x74\x68","\x2C","\x6A\x6F\x69\x6E","\x6E\x61\x6D\x65","\x6D\x61\x70","\x53\x45\x4C\x45\x43\x54\x20\x69\x64\x2C\x25\x73\x20\x46\x52\x4F\x4D\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x57\x48\x45\x52\x45\x20\x69\x64\x20\x49\x4E\x20\x28\x27","\x27\x2C\x27","\x69\x64","\x27\x29","\x66\x6F\x72\x6D\x61\x74","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x71\x75\x65\x72\x79","\x6B\x65\x79\x73","\x63\x66\x5F","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x66\x69\x6C\x74\x65\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x64\x65\x73\x63\x72\x69\x62\x65","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x4C\x69\x73\x74\x49\x64","\x63\x6F\x6E\x63\x61\x74","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x6C\x69\x73\x74","\x63\x6F\x6D\x70\x61\x6E\x79","\x63\x6F\x6D\x70\x61\x6E\x79\x5F\x6C\x69\x73\x74\x5F\x66\x69\x6C\x74\x65\x72","\x73\x63\x6F\x70\x65","\x67\x65\x74\x4C\x69\x73\x74\x73","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64","\x66\x6F\x72\x45\x61\x63\x68","\x63\x6F\x75\x6E\x74","\x72\x6F\x6C\x65","\x67\x65\x74\x4C\x6F\x67","\x64\x65\x74\x61\x69\x6C","\x67\x65\x6E\x65\x72\x61\x6C","\x73\x68\x6F\x77","\x70\x68\x6F\x6E\x65","\x6C\x6F\x67\x54\x79\x70\x65","\x6A\x6F\x75\x72\x6E\x61\x6C","\x74\x79\x70\x65","\x69\x6E\x62\x6F\x75\x6E\x64","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E","\x6D\x6F\x62\x69\x6C\x65","\x73\x6F\x75\x72\x63\x65","\x66\x72\x6F\x6D","\x65\x6D\x61\x69\x6C","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x63\x6F\x6E\x74\x61\x63\x74","\x63\x68\x61\x74","\x66\x61\x78","\x73\x6D\x73","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x71\x75\x65\x75\x65","\x70\x61\x72\x61\x6D\x73","\x6E\x75\x6C\x6C","\x53\x45\x4C\x45\x43\x54\x20\x25\x73\x20\x46\x52\x4F\x4D\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3D\x25\x73","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x62\x6F\x64\x79","\x76\x6F\x69\x63\x65","\x6D\x61\x69\x6C","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x63\x72\x65\x61\x74\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x25\x73\x3D\x27\x25\x73\x27","\x70\x75\x73\x68","\x55\x50\x44\x41\x54\x45\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x53\x45\x54\x20\x25\x73\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3D\x25\x73","\x55\x73\x65\x72\x49\x64","\x61\x6C\x6C","\x74\x61\x67\x73","\x63\x6F\x70\x79","\x66\x6F\x72\x4F\x77\x6E","\x63\x6C\x6F\x6E\x65","\x3B","\x73\x70\x6C\x69\x74","\x70\x6F\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x63\x6F\x6E\x74\x61\x63\x74\x73","\x6B\x6F","\x6F\x6B","\x66\x6F\x72\x45\x61\x63\x68\x4F\x66","\x75\x6E\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x6F\x6C\x64\x43\x6F\x6E\x74\x61\x63\x74","\x64\x65\x73\x74\x72\x6F\x79","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x8ff4[0];var _=require(_0x8ff4[1]);var moment=require(_0x8ff4[2]);var Contact=require(_0x8ff4[4])[_0x8ff4[3]];var User=require(_0x8ff4[4])[_0x8ff4[5]];var ContactPhone=require(_0x8ff4[4])[_0x8ff4[6]];var ContactEmail=require(_0x8ff4[4])[_0x8ff4[7]];var CustomField=require(_0x8ff4[4])[_0x8ff4[8]];var ReportCall=require(_0x8ff4[4])[_0x8ff4[9]];var ReportQueue=require(_0x8ff4[4])[_0x8ff4[10]];var ReportQueueHistory=require(_0x8ff4[4])[_0x8ff4[12]][_0x8ff4[11]];var ReportChatRoom=require(_0x8ff4[4])[_0x8ff4[13]];var ReportChatRoomHistory=require(_0x8ff4[4])[_0x8ff4[12]][_0x8ff4[14]];var ChatRoom=require(_0x8ff4[4])[_0x8ff4[15]];var FaxRoom=require(_0x8ff4[4])[_0x8ff4[16]];var SmsRoom=require(_0x8ff4[4])[_0x8ff4[17]];var ReportIntegration=require(_0x8ff4[4])[_0x8ff4[18]];var List=require(_0x8ff4[4])[_0x8ff4[19]];var ReportCallHistory=require(_0x8ff4[4])[_0x8ff4[12]][_0x8ff4[20]];var ReportMailSession=require(_0x8ff4[4])[_0x8ff4[21]];var MailRoom=require(_0x8ff4[4])[_0x8ff4[22]];var ReportMailSessionHistory=require(_0x8ff4[4])[_0x8ff4[12]][_0x8ff4[23]];var Tag=require(_0x8ff4[4])[_0x8ff4[24]];var stream=require(_0x8ff4[25]);var sequelize=require(_0x8ff4[4])[_0x8ff4[26]];var util=require(_0x8ff4[27]);var Util=require(_0x8ff4[28]);var Async=require(_0x8ff4[29]);exports[_0x8ff4[30]]= function(_0x3aa1x1c,_0x3aa1x1d,_0x3aa1x1e){var _0x3aa1x1f,_0x3aa1x20;switch(_0x3aa1x1c[_0x8ff4[68]][_0x8ff4[74]]){case _0x8ff4[70]:return User[_0x8ff4[69]](_0x3aa1x1c[_0x8ff4[68]][_0x8ff4[45]])[_0x8ff4[35]](function(_0x3aa1x2c){return _0x3aa1x2c[_0x8ff4[67]]()})[_0x8ff4[35]](function(_0x3aa1x2b){_0x3aa1x20= _[_0x8ff4[42]](_0x3aa1x2b,_0x8ff4[45]);return List[_0x8ff4[55]]({where:{defaultEntry:true},attributes:[_0x8ff4[45]]})})[_0x8ff4[35]](function(_0x3aa1x29){var _0x3aa1x2a={CompanyId:_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[58]]|| null,ListId:_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[59]]|| null};delete _0x3aa1x1c[_0x8ff4[50]][_0x8ff4[58]];delete _0x3aa1x1c[_0x8ff4[50]][_0x8ff4[59]];console[_0x8ff4[31]](Util[_0x8ff4[61]](_0x3aa1x1c[_0x8ff4[50]],_0x3aa1x2a[_0x8ff4[59]]?{}:{ListId:{$in:_0x3aa1x20[_0x8ff4[60]](_[_0x8ff4[42]](_0x3aa1x29,_0x8ff4[45]))}}));return Contact[_0x8ff4[66]](_0x8ff4[63],_0x8ff4[64],{method:[_0x8ff4[65],_0x3aa1x2a]})[_0x8ff4[62]](Util[_0x8ff4[61]](_0x3aa1x1c[_0x8ff4[50]],_0x3aa1x2a[_0x8ff4[59]]?{}:{ListId:{$in:_0x3aa1x20[_0x8ff4[60]](_[_0x8ff4[42]](_0x3aa1x29,_0x8ff4[45]))}}))})[_0x8ff4[35]](function(_0x3aa1x28){_0x3aa1x1f= {rows:_[_0x8ff4[42]](_0x3aa1x28[_0x8ff4[36]],_0x8ff4[56]),count:_0x3aa1x28[_0x8ff4[36]]};return Contact[_0x8ff4[57]]()})[_0x8ff4[35]](function(_0x3aa1x26){_0x3aa1x26= _[_0x8ff4[54]](_[_0x8ff4[51]](_0x3aa1x26),function(_0x3aa1x27){return _[_0x8ff4[53]](_0x3aa1x27,_0x8ff4[52])});return CustomField[_0x8ff4[55]]({where:{name:_0x3aa1x26}})})[_0x8ff4[35]](function(_0x3aa1x24){if(_0x3aa1x24[_0x8ff4[38]]){var _0x3aa1x25=_[_0x8ff4[42]](_0x3aa1x24,_0x8ff4[41])[_0x8ff4[40]](_0x8ff4[39]);return sequelize[_0x8ff4[50]](util[_0x8ff4[47]](_0x8ff4[43]+ _[_0x8ff4[42]](_0x3aa1x1f[_0x8ff4[36]],_0x8ff4[45])[_0x8ff4[40]](_0x8ff4[44])+ _0x8ff4[46],_0x3aa1x25),{type:sequelize[_0x8ff4[49]][_0x8ff4[48]]})}})[_0x8ff4[35]](function(_0x3aa1x23){_[_0x8ff4[37]](_0x3aa1x1f[_0x8ff4[36]],_0x3aa1x23);return _0x3aa1x1f})[_0x8ff4[35]](function(_0x3aa1x22){_0x3aa1x1d[_0x8ff4[34]](200)[_0x8ff4[33]](_0x3aa1x22)})[_0x8ff4[32]](function(_0x3aa1x21){console[_0x8ff4[31]](_0x3aa1x21);return handleError(_0x3aa1x1d,_0x3aa1x21)});default:var _0x3aa1x2a={CompanyId:_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[58]]|| null,ListId:_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[59]]|| null};delete _0x3aa1x1c[_0x8ff4[50]][_0x8ff4[58]];delete _0x3aa1x1c[_0x8ff4[50]][_0x8ff4[59]];return Contact[_0x8ff4[66]](_0x8ff4[63],_0x8ff4[64],{method:[_0x8ff4[65],_0x3aa1x2a]})[_0x8ff4[62]](Util[_0x8ff4[61]](_0x3aa1x1c[_0x8ff4[50]]))[_0x8ff4[35]](function(_0x3aa1x28){_0x3aa1x1f= {rows:_[_0x8ff4[42]](_0x3aa1x28[_0x8ff4[36]],_0x8ff4[56]),count:_0x3aa1x28[_0x8ff4[73]]};return Contact[_0x8ff4[57]]()})[_0x8ff4[35]](function(_0x3aa1x26){_0x3aa1x26= _[_0x8ff4[54]](_[_0x8ff4[51]](_0x3aa1x26),function(_0x3aa1x27){return _[_0x8ff4[53]](_0x3aa1x27,_0x8ff4[52])});return CustomField[_0x8ff4[55]]({where:{name:_0x3aa1x26}})})[_0x8ff4[35]](function(_0x3aa1x24){if(_0x3aa1x1f[_0x8ff4[36]][_0x8ff4[38]]&& _0x3aa1x24[_0x8ff4[38]]){var _0x3aa1x25=_[_0x8ff4[42]](_0x3aa1x24,_0x8ff4[41])[_0x8ff4[40]](_0x8ff4[39]);return sequelize[_0x8ff4[50]](util[_0x8ff4[47]](_0x8ff4[43]+ _[_0x8ff4[42]](_0x3aa1x1f[_0x8ff4[36]],_0x8ff4[45])[_0x8ff4[40]](_0x8ff4[44])+ _0x8ff4[46],_0x3aa1x25),{type:sequelize[_0x8ff4[49]][_0x8ff4[48]]})}})[_0x8ff4[35]](function(_0x3aa1x23){var _0x3aa1x2d;_[_0x8ff4[72]](_0x3aa1x1f[_0x8ff4[36]],function(_0x3aa1x2e){_0x3aa1x2d= _[_0x8ff4[71]](_0x3aa1x23,{id:_0x3aa1x2e[_0x8ff4[45]]});if(_0x3aa1x2d){_[_0x8ff4[37]](_0x3aa1x2e,_0x3aa1x2d)}});return _0x3aa1x1f})[_0x8ff4[35]](function(_0x3aa1x22){_0x3aa1x1d[_0x8ff4[34]](200)[_0x8ff4[33]](_0x3aa1x22)})[_0x8ff4[32]](function(_0x3aa1x21){console[_0x8ff4[31]](_0x3aa1x21);return handleError(_0x3aa1x1d,_0x3aa1x21)})}};exports[_0x8ff4[57]]= function(_0x3aa1x1c,_0x3aa1x1d){return Contact[_0x8ff4[57]]()[_0x8ff4[35]](function(_0x3aa1x26){return _0x3aa1x1d[_0x8ff4[34]](200)[_0x8ff4[33]](_0x3aa1x26)})[_0x8ff4[32]](function(_0x3aa1x21){return handleError(_0x3aa1x1d,_0x3aa1x21)})};exports[_0x8ff4[75]]= function(_0x3aa1x1c,_0x3aa1x1d,_0x3aa1x1e){_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[76]]= _0x3aa1x1c[_0x8ff4[50]][_0x8ff4[76]]|| _0x8ff4[77];_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[78]]= _0x3aa1x1c[_0x8ff4[50]][_0x8ff4[78]]|| _0x8ff4[79];_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[80]]= _0x3aa1x1c[_0x8ff4[50]][_0x8ff4[80]]|| _0x8ff4[81];_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[82]]= _0x3aa1x1c[_0x8ff4[50]][_0x8ff4[82]]|| _0x8ff4[83];var _0x3aa1x2f,_0x3aa1x30={};return Contact[_0x8ff4[69]](_0x3aa1x1c[_0x8ff4[100]][_0x8ff4[45]])[_0x8ff4[35]](function(_0x3aa1x31){if(!_0x3aa1x31){return _0x3aa1x1d[_0x8ff4[84]](404)};switch(_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[76]]){case _0x8ff4[77]:switch(_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[78]]){case _0x8ff4[79]:_0x3aa1x2f= (_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[80]]=== _0x8ff4[12])?ReportCallHistory:ReportCall;if(_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[82]]=== _0x8ff4[85]){_0x3aa1x30[_0x8ff4[86]]= [_0x3aa1x31[_0x8ff4[79]],_0x3aa1x31[_0x8ff4[87]]]}else {_0x3aa1x30[_0x8ff4[88]]= [_0x3aa1x31[_0x8ff4[79]],_0x3aa1x31[_0x8ff4[87]]]};break;case _0x8ff4[90]:_0x3aa1x2f= MailRoom;_0x3aa1x30[_0x8ff4[89]]= _0x3aa1x31[_0x8ff4[90]];if(_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[80]]=== _0x8ff4[12]){_0x3aa1x30[_0x8ff4[91]]= {$lt:moment()[_0x8ff4[93]](_0x8ff4[92])}}else {_0x3aa1x30[_0x8ff4[91]]= {$gte:moment()[_0x8ff4[93]](_0x8ff4[92])}};break;case _0x8ff4[95]:_0x3aa1x2f= ChatRoom;_0x3aa1x30[_0x8ff4[94]]= _0x3aa1x31[_0x8ff4[90]];if(_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[80]]=== _0x8ff4[12]){_0x3aa1x30[_0x8ff4[91]]= {$lt:moment()[_0x8ff4[93]](_0x8ff4[92])}}else {_0x3aa1x30[_0x8ff4[91]]= {$gte:moment()[_0x8ff4[93]](_0x8ff4[92])}};break;case _0x8ff4[96]:_0x3aa1x2f= FaxRoom;_0x3aa1x30[_0x8ff4[94]]= _0x3aa1x31[_0x8ff4[96]];if(_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[80]]=== _0x8ff4[12]){_0x3aa1x30[_0x8ff4[91]]= {$lt:moment()[_0x8ff4[93]](_0x8ff4[92])}}else {_0x3aa1x30[_0x8ff4[91]]= {$gte:moment()[_0x8ff4[93]](_0x8ff4[92])}};break;case _0x8ff4[97]:_0x3aa1x2f= SmsRoom;_0x3aa1x30[_0x8ff4[94]]= [_0x3aa1x31[_0x8ff4[79]],_0x3aa1x31[_0x8ff4[87]]];if(_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[80]]=== _0x8ff4[12]){_0x3aa1x30[_0x8ff4[91]]= {$lt:moment()[_0x8ff4[93]](_0x8ff4[92])}}else {_0x3aa1x30[_0x8ff4[91]]= {$gte:moment()[_0x8ff4[93]](_0x8ff4[92])}};break;default:_0x3aa1x2f= (_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[80]]=== _0x8ff4[12])?ReportCallHistory:ReportCall};break;case _0x8ff4[99]:switch(_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[78]]){case _0x8ff4[79]:_0x3aa1x2f= (_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[80]]=== _0x8ff4[12])?ReportQueueHistory:ReportQueue;_0x3aa1x30[_0x8ff4[98]]= [_0x3aa1x31[_0x8ff4[79]],_0x3aa1x31[_0x8ff4[87]]];break;case _0x8ff4[90]:return _0x3aa1x1d[_0x8ff4[84]](404);default:_0x3aa1x2f= (_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[80]]=== _0x8ff4[12])?ReportQueueHistory:ReportQueue};break;default:_0x3aa1x2f= ReportCall};delete _0x3aa1x1c[_0x8ff4[50]][_0x8ff4[76]];delete _0x3aa1x1c[_0x8ff4[50]][_0x8ff4[78]];delete _0x3aa1x1c[_0x8ff4[50]][_0x8ff4[80]];delete _0x3aa1x1c[_0x8ff4[50]][_0x8ff4[82]];return _0x3aa1x2f[_0x8ff4[62]](Util[_0x8ff4[61]](_0x3aa1x1c[_0x8ff4[50]],_0x3aa1x30))})[_0x8ff4[35]](function(_0x3aa1x22){_0x3aa1x1d[_0x8ff4[34]](200)[_0x8ff4[33]](_0x3aa1x22)})[_0x8ff4[32]](function(_0x3aa1x21){console[_0x8ff4[31]](_0x3aa1x21);return handleError(_0x3aa1x1d,_0x3aa1x21)})};exports[_0x8ff4[78]]= function(_0x3aa1x1c,_0x3aa1x1d){var _0x3aa1x32;return Contact[_0x8ff4[66]](_0x8ff4[63],_0x8ff4[68],_0x8ff4[64])[_0x8ff4[69]](_0x3aa1x1c[_0x8ff4[100]][_0x8ff4[45]])[_0x8ff4[35]](function(_0x3aa1x37){if(!_0x3aa1x37){return _0x3aa1x1d[_0x8ff4[84]](404)};_0x3aa1x32= _0x3aa1x37;return CustomField[_0x8ff4[55]]({where:{ListId:_0x3aa1x32[_0x8ff4[59]]}})})[_0x8ff4[35]](function(_0x3aa1x24){if(_0x3aa1x24[_0x8ff4[38]]){var _0x3aa1x25=_[_0x8ff4[42]](_0x3aa1x24,_0x8ff4[41])[_0x8ff4[40]](_0x8ff4[39]);return sequelize[_0x8ff4[50]](util[_0x8ff4[47]](_0x8ff4[102],_0x3aa1x25,_0x3aa1x1c[_0x8ff4[100]][_0x8ff4[45]]),{type:sequelize[_0x8ff4[49]][_0x8ff4[48]]})}})[_0x8ff4[35]](function(_0x3aa1x33){if(_0x3aa1x33){_[_0x8ff4[72]](_0x3aa1x33[0],function(_0x3aa1x34,_0x3aa1x35,_0x3aa1x36){if(_0x3aa1x34=== _0x8ff4[101]){_0x3aa1x36[_0x3aa1x35]= null}});_[_0x8ff4[37]](_0x3aa1x32[_0x8ff4[56]],_0x3aa1x33[0])}})[_0x8ff4[35]](function(){return _0x3aa1x1d[_0x8ff4[34]](200)[_0x8ff4[33]](_0x3aa1x32)})[_0x8ff4[32]](function(_0x3aa1x21){console[_0x8ff4[31]](_0x3aa1x21);return handleError(_0x3aa1x1d,_0x3aa1x21)})};exports[_0x8ff4[103]]= function(_0x3aa1x1c,_0x3aa1x1d){var _0x3aa1x30={};switch(_0x3aa1x1c[_0x8ff4[104]][_0x8ff4[107]]){case _0x8ff4[105]:_0x3aa1x30= {$or:{phone:_0x3aa1x1c[_0x8ff4[104]][_0x8ff4[98]],mobile:_0x3aa1x1c[_0x8ff4[104]][_0x8ff4[98]]}};break;case _0x8ff4[106]:_0x3aa1x30= {email:_0x3aa1x1c[_0x8ff4[104]][_0x8ff4[89]]};break;default:_0x3aa1x30= {}};return Contact[_0x8ff4[62]]({where:_0x3aa1x30,include:[{model:List,where:{$or:{id:_[_0x8ff4[42]](_[_0x8ff4[42]](_0x3aa1x1c[_0x8ff4[68]].Lists,_0x8ff4[56]),_0x8ff4[45]),defaultEntry:true}}}]})[_0x8ff4[35]](function(_0x3aa1x28){return _0x3aa1x1d[_0x8ff4[34]](200)[_0x8ff4[33]](_0x3aa1x28)})[_0x8ff4[32]](function(_0x3aa1x21){console[_0x8ff4[31]](_0x3aa1x21);return handleError(_0x3aa1x1d,_0x3aa1x21)})};exports[_0x8ff4[108]]= function(_0x3aa1x1c,_0x3aa1x1d,_0x3aa1x1e){var _0x3aa1x32;return Tag[_0x8ff4[55]]()[_0x8ff4[35]](function(_0x3aa1x38){var _0x3aa1x39=[];var _0x3aa1x3a=_[_0x8ff4[42]](_[_0x8ff4[42]](_0x3aa1x38,_0x8ff4[56]),_0x8ff4[41]);if(_0x3aa1x1c[_0x8ff4[104]][_0x8ff4[115]]){_0x3aa1x1c[_0x8ff4[104]][_0x8ff4[115]][_0x8ff4[72]](function(_0x3aa1x27){if(!_[_0x8ff4[53]](_0x3aa1x3a,_0x3aa1x27)){_0x3aa1x39[_0x8ff4[111]](Tag[_0x8ff4[108]]({name:_0x3aa1x27}))}})};return _0x3aa1x39})[_0x8ff4[114]]()[_0x8ff4[35]](function(){_0x3aa1x1c[_0x8ff4[104]][_0x8ff4[113]]= _0x3aa1x1c[_0x8ff4[68]][_0x8ff4[45]];return Contact[_0x8ff4[108]](_0x3aa1x1c[_0x8ff4[104]])})[_0x8ff4[35]](function(_0x3aa1x31){_0x3aa1x32= _0x3aa1x31;return CustomField[_0x8ff4[55]]({where:{ListId:_0x3aa1x32[_0x8ff4[59]]}})})[_0x8ff4[35]](function(_0x3aa1x24){if(_0x3aa1x24[_0x8ff4[38]]){var _0x3aa1x25=[];_0x3aa1x24[_0x8ff4[72]](function(_0x3aa1x27){if(_0x3aa1x1c[_0x8ff4[104]][_0x8ff4[109]](_0x3aa1x27[_0x8ff4[41]])){_0x3aa1x25[_0x8ff4[111]](util[_0x8ff4[47]](_0x8ff4[110],_0x3aa1x27[_0x8ff4[41]],_0x3aa1x1c[_0x8ff4[104]][_0x3aa1x27[_0x8ff4[41]]]))}});if(_0x3aa1x25[_0x8ff4[38]]){_0x3aa1x25= _0x3aa1x25[_0x8ff4[40]](_0x8ff4[39]);return sequelize[_0x8ff4[50]](util[_0x8ff4[47]](_0x8ff4[112],_0x3aa1x25,_0x3aa1x32[_0x8ff4[45]]))}}})[_0x8ff4[35]](function(){return _0x3aa1x1d[_0x8ff4[34]](201)[_0x8ff4[33]](_0x3aa1x32)})[_0x8ff4[32]](function(_0x3aa1x21){console[_0x8ff4[31]](_0x3aa1x21);return _0x3aa1x1e(_0x3aa1x21)})};exports[_0x8ff4[116]]= function(_0x3aa1x1c,_0x3aa1x1d,_0x3aa1x1e){var _0x3aa1x32,_0x3aa1x3b;return Contact[_0x8ff4[69]](_0x3aa1x1c[_0x8ff4[100]][_0x8ff4[45]])[_0x8ff4[35]](function(_0x3aa1x31){_0x3aa1x32= _0x3aa1x31[_0x8ff4[56]];_0x3aa1x3b= _[_0x8ff4[118]](_0x3aa1x31[_0x8ff4[56]]);delete _0x3aa1x3b[_0x8ff4[45]];_0x3aa1x3b[_0x8ff4[113]]= _0x3aa1x1c[_0x8ff4[68]][_0x8ff4[45]];_0x3aa1x3b[_0x8ff4[59]]= _0x3aa1x1c[_0x8ff4[104]][_0x8ff4[59]];_0x3aa1x3b[_0x8ff4[115]]= _0x3aa1x3b[_0x8ff4[115]]?_0x3aa1x3b[_0x8ff4[115]][_0x8ff4[120]](_0x8ff4[119]):[];if(_0x3aa1x3b[_0x8ff4[115]][_0x8ff4[38]]> 1){_0x3aa1x3b[_0x8ff4[115]][_0x8ff4[121]]()};return Contact[_0x8ff4[108]](_0x3aa1x3b)})[_0x8ff4[35]](function(_0x3aa1x3c){_0x3aa1x3b= _0x3aa1x3c;if(_0x3aa1x32[_0x8ff4[59]]=== _0x3aa1x1c[_0x8ff4[104]][_0x8ff4[59]]){return CustomField[_0x8ff4[55]]({where:{ListId:_0x3aa1x32[_0x8ff4[59]]}})}})[_0x8ff4[35]](function(_0x3aa1x24){if(_0x3aa1x24&& _0x3aa1x24[_0x8ff4[38]]){var _0x3aa1x25=_[_0x8ff4[42]](_0x3aa1x24,_0x8ff4[41])[_0x8ff4[40]](_0x8ff4[39]);return sequelize[_0x8ff4[50]](util[_0x8ff4[47]](_0x8ff4[102],_0x3aa1x25,_0x3aa1x32[_0x8ff4[45]]),{type:sequelize[_0x8ff4[49]][_0x8ff4[48]]})}})[_0x8ff4[35]](function(_0x3aa1x33){if(_0x3aa1x33){var _0x3aa1x25=[];_[_0x8ff4[117]](_0x3aa1x33[0],function(_0x3aa1x34,_0x3aa1x35){_0x3aa1x25[_0x8ff4[111]](util[_0x8ff4[47]](_0x8ff4[110],_0x3aa1x35,_0x3aa1x34))});if(_0x3aa1x25[_0x8ff4[38]]){_0x3aa1x25= _0x3aa1x25[_0x8ff4[40]](_0x8ff4[39]);return sequelize[_0x8ff4[50]](util[_0x8ff4[47]](_0x8ff4[112],_0x3aa1x25,_0x3aa1x3b[_0x8ff4[45]]))}}})[_0x8ff4[35]](function(){return _0x3aa1x1d[_0x8ff4[34]](201)[_0x8ff4[33]](_0x3aa1x3b)})[_0x8ff4[32]](function(_0x3aa1x21){console[_0x8ff4[31]](_0x3aa1x21);return _0x3aa1x1e(_0x3aa1x21)})};exports[_0x8ff4[122]]= function(_0x3aa1x1c,_0x3aa1x1d,_0x3aa1x1e){var _0x3aa1x3d=[];var _0x3aa1x3e={ok:0,ko:0};return Tag[_0x8ff4[55]]()[_0x8ff4[35]](function(_0x3aa1x38){var _0x3aa1x39=[],_0x3aa1x41=[];var _0x3aa1x3a=_[_0x8ff4[42]](_[_0x8ff4[42]](_0x3aa1x38,_0x8ff4[56]),_0x8ff4[41]);_0x3aa1x1c[_0x8ff4[104]][_0x8ff4[123]][_0x8ff4[72]](function(_0x3aa1x31){if(_0x3aa1x31[_0x8ff4[115]]){_0x3aa1x41= _[_0x8ff4[127]](_0x3aa1x41,_0x3aa1x31[_0x8ff4[115]])}});_0x3aa1x41[_0x8ff4[72]](function(_0x3aa1x27){if(!_[_0x8ff4[53]](_0x3aa1x3a,_0x3aa1x27)){_0x3aa1x39[_0x8ff4[111]](Tag[_0x8ff4[108]]({name:_0x3aa1x27}))}});return _0x3aa1x39})[_0x8ff4[114]]()[_0x8ff4[35]](function(){var _0x3aa1x40=[];Async[_0x8ff4[126]](_0x3aa1x1c[_0x8ff4[104]][_0x8ff4[123]],function(_0x3aa1x31){_0x3aa1x31[_0x8ff4[113]]= _0x3aa1x1c[_0x8ff4[68]][_0x8ff4[45]];_0x3aa1x40[_0x8ff4[111]](Contact[_0x8ff4[108]](_0x3aa1x31)[_0x8ff4[35]](function(_0x3aa1x31){_0x3aa1x3d[_0x8ff4[111]](_0x3aa1x31);_0x3aa1x3e[_0x8ff4[125]]++})[_0x8ff4[32]](function(_0x3aa1x21){_0x3aa1x3e[_0x8ff4[124]]++}))});return _0x3aa1x40})[_0x8ff4[114]]()[_0x8ff4[35]](function(){return CustomField[_0x8ff4[55]]({where:{ListId:{$in:_[_0x8ff4[42]](_0x3aa1x1c[_0x8ff4[104]][_0x8ff4[123]],_0x8ff4[59])}}})})[_0x8ff4[35]](function(_0x3aa1x24){var _0x3aa1x3f=[];if(_0x3aa1x24[_0x8ff4[38]]){var _0x3aa1x25=[];_0x3aa1x3d[_0x8ff4[72]](function(_0x3aa1x31){_0x3aa1x25= [];_0x3aa1x24[_0x8ff4[72]](function(_0x3aa1x27){if(_0x3aa1x31[_0x8ff4[109]](_0x3aa1x27[_0x8ff4[41]])){_0x3aa1x25[_0x8ff4[111]](util[_0x8ff4[47]](_0x8ff4[110],_0x3aa1x27[_0x8ff4[41]],_0x3aa1x1c[_0x8ff4[104]][_0x3aa1x27[_0x8ff4[41]]]))}});if(_0x3aa1x25[_0x8ff4[38]]){_0x3aa1x25= _0x3aa1x25[_0x8ff4[40]](_0x8ff4[39]);_0x3aa1x3f[_0x8ff4[111]](sequelize[_0x8ff4[50]](util[_0x8ff4[47]](_0x8ff4[112],_0x3aa1x25,_0x3aa1x31[_0x8ff4[45]])))}})};return _0x3aa1x3f})[_0x8ff4[114]]()[_0x8ff4[35]](function(){return _0x3aa1x1d[_0x8ff4[34]](201)[_0x8ff4[33]](_0x3aa1x3e)})[_0x8ff4[32]](function(_0x3aa1x21){console[_0x8ff4[31]](_0x3aa1x21);return _0x3aa1x1e(_0x3aa1x21)})};exports[_0x8ff4[128]]= function(_0x3aa1x1c,_0x3aa1x1d,_0x3aa1x1e){return Promise[_0x8ff4[114]]([])[_0x8ff4[35]](updateContact(_0x3aa1x1c,_0x3aa1x1d))[_0x8ff4[35]](function(_0x3aa1x31){return _0x3aa1x1d[_0x8ff4[34]](200)[_0x8ff4[33]](_0x3aa1x31)})[_0x8ff4[32]](function(_0x3aa1x21){console[_0x8ff4[31]](_0x3aa1x21);return handleError(_0x3aa1x1d,_0x3aa1x21)})};exports[_0x8ff4[37]]= function(_0x3aa1x1c,_0x3aa1x1d,_0x3aa1x1e){var _0x3aa1x32;return Promise[_0x8ff4[114]]([])[_0x8ff4[35]](updateContact(_0x3aa1x1c,_0x3aa1x1d))[_0x8ff4[35]](function(_0x3aa1x31){_0x3aa1x32= _0x3aa1x31;if(_0x3aa1x1c[_0x8ff4[104]][_0x8ff4[129]]){return Contact[_0x8ff4[130]]({where:{id:_0x3aa1x1c[_0x8ff4[104]][_0x8ff4[129]]},individualHooks:true})}})[_0x8ff4[35]](function(){return _0x3aa1x1d[_0x8ff4[34]](200)[_0x8ff4[33]](_0x3aa1x32)})[_0x8ff4[32]](function(_0x3aa1x21){console[_0x8ff4[31]](_0x3aa1x21);return handleError(_0x3aa1x1d,_0x3aa1x21)})};function updateContact(_0x3aa1x1c,_0x3aa1x1d){return function(){var _0x3aa1x32;return Tag[_0x8ff4[55]]()[_0x8ff4[35]](function(_0x3aa1x38){var _0x3aa1x39=[];var _0x3aa1x3a=_[_0x8ff4[42]](_[_0x8ff4[42]](_0x3aa1x38,_0x8ff4[56]),_0x8ff4[41]);if(_0x3aa1x1c[_0x8ff4[104]][_0x8ff4[115]]){_0x3aa1x1c[_0x8ff4[104]][_0x8ff4[115]][_0x8ff4[72]](function(_0x3aa1x27){if(!_[_0x8ff4[53]](_0x3aa1x3a,_0x3aa1x27)){_0x3aa1x39[_0x8ff4[111]](Tag[_0x8ff4[108]]({name:_0x3aa1x27}))}})};return _0x3aa1x39})[_0x8ff4[35]](function(){return Contact[_0x8ff4[69]](_0x3aa1x1c[_0x8ff4[100]][_0x8ff4[45]])})[_0x8ff4[35]](function(_0x3aa1x31){if(!_0x3aa1x31){return _0x3aa1x1d[_0x8ff4[84]](404)};delete _0x3aa1x1c[_0x8ff4[104]][_0x8ff4[45]];return _0x3aa1x31[_0x8ff4[131]](_0x3aa1x1c[_0x8ff4[104]])})[_0x8ff4[35]](function(_0x3aa1x31){_0x3aa1x32= _0x3aa1x31;return CustomField[_0x8ff4[55]]({where:{ListId:_0x3aa1x32[_0x8ff4[59]]}})})[_0x8ff4[35]](function(_0x3aa1x24){if(_0x3aa1x24[_0x8ff4[38]]){var _0x3aa1x25=[];_0x3aa1x24[_0x8ff4[72]](function(_0x3aa1x27){if(_0x3aa1x1c[_0x8ff4[104]][_0x8ff4[109]](_0x3aa1x27[_0x8ff4[41]])){_0x3aa1x25[_0x8ff4[111]](util[_0x8ff4[47]](_0x8ff4[110],_0x3aa1x27[_0x8ff4[41]],_0x3aa1x1c[_0x8ff4[104]][_0x3aa1x27[_0x8ff4[41]]]))}});if(_0x3aa1x25[_0x8ff4[38]]){_0x3aa1x25= _0x3aa1x25[_0x8ff4[40]](_0x8ff4[39]);return sequelize[_0x8ff4[50]](util[_0x8ff4[47]](_0x8ff4[112],_0x3aa1x25,_0x3aa1x32[_0x8ff4[45]]))}}})[_0x8ff4[35]](function(){return _0x3aa1x32})}}exports[_0x8ff4[130]]= function(_0x3aa1x1c,_0x3aa1x1d){return Contact[_0x8ff4[69]](_0x3aa1x1c[_0x8ff4[100]][_0x8ff4[45]])[_0x8ff4[35]](function(_0x3aa1x37){if(!_0x3aa1x37){return _0x3aa1x1d[_0x8ff4[84]](404)};return _0x3aa1x37[_0x8ff4[130]]()})[_0x8ff4[35]](function(){return _0x3aa1x1d[_0x8ff4[84]](204)})[_0x8ff4[32]](function(_0x3aa1x21){return handleError(_0x3aa1x1d,_0x3aa1x21)})};exports[_0x8ff4[132]]= function(_0x3aa1x1c,_0x3aa1x1d){return Contact[_0x8ff4[130]]({where:{id:_0x3aa1x1c[_0x8ff4[50]][_0x8ff4[133]]},individualHooks:true})[_0x8ff4[35]](function(){return _0x3aa1x1d[_0x8ff4[84]](204)})[_0x8ff4[32]](function(_0x3aa1x21){return handleError(_0x3aa1x1d,_0x3aa1x21)})};function handleError(_0x3aa1x1d,_0x3aa1x21){return _0x3aa1x1d[_0x8ff4[34]](500)[_0x8ff4[33]](_0x3aa1x21)}
\ No newline at end of file
diff --git a/server/api/contact_manager/contact_manager.events.js b/server/api/contact_manager/contact_manager.events.js
index dd5bf3e..c158d49 100644
--- a/server/api/contact_manager/contact_manager.events.js
+++ b/server/api/contact_manager/contact_manager.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Contact = require('../../models').Contact;
-
-var ContactEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ContactEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Contact.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ContactEvents.emit(event + ':' + doc._id, doc);
-    ContactEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ContactEvents;
+var _0x5ffe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x5ffe[0];const EventEmitter=require(_0x5ffe[1]);const Contact=require(_0x5ffe[3])[_0x5ffe[2]];var ContactEvents= new EventEmitter();ContactEvents[_0x5ffe[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x5ffe[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x5ffe[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x5ffe[6]};for(var e in events){var event=events[e];Contact[_0x5ffe[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x2f0ex8,_0x2f0ex9,_0x2f0exa){ContactEvents[_0x5ffe[10]](event+ _0x5ffe[8]+ _0x2f0ex8[_0x5ffe[9]],_0x2f0ex8);ContactEvents[_0x5ffe[10]](event,_0x2f0ex8);_0x2f0exa(null)}}module[_0x5ffe[11]]= ContactEvents
\ No newline at end of file
diff --git a/server/api/contact_manager/contact_manager.socket.js b/server/api/contact_manager/contact_manager.socket.js
index 8432549..eb15d70 100644
--- a/server/api/contact_manager/contact_manager.socket.js
+++ b/server/api/contact_manager/contact_manager.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const ContactManagerEvents = require('./contact_manager.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('contact_manager:' + event, socket);
-
-    ContactManagerEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ContactManagerEvents.removeListener(event, listener);
-  };
-}
+var _0x98b6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6D\x61\x6E\x61\x67\x65\x72\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6D\x61\x6E\x61\x67\x65\x72\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x98b6[0];const ContactManagerEvents=require(_0x98b6[1]);var events=[_0x98b6[2],_0x98b6[3]];exports[_0x98b6[4]]= function(_0x34ebx3){for(var _0x34ebx4=0,_0x34ebx5=events[_0x98b6[5]];_0x34ebx4< _0x34ebx5;_0x34ebx4++){var _0x34ebx6=events[_0x34ebx4];var _0x34ebx7=createListener(_0x98b6[6]+ _0x34ebx6,_0x34ebx3);ContactManagerEvents[_0x98b6[7]](_0x34ebx6,_0x34ebx7);_0x34ebx3[_0x98b6[7]](_0x98b6[8],removeListener(_0x34ebx6,_0x34ebx7))}};function createListener(_0x34ebx6,_0x34ebx3){return function(_0x34ebx9){_0x34ebx3[_0x98b6[9]](_0x34ebx6,_0x34ebx9)}}function removeListener(_0x34ebx6,_0x34ebx7){return function(){ContactManagerEvents[_0x98b6[10]](_0x34ebx6,_0x34ebx7)}}
\ No newline at end of file
diff --git a/server/api/contact_manager/index.js b/server/api/contact_manager/index.js
index a17e604..2634622 100644
--- a/server/api/contact_manager/index.js
+++ b/server/api/contact_manager/index.js
@@ -1,23 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./contact_manager.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.index);
-router.get('/describe', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.describe);
-router.get('/:id/checkevent', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.getEventContacts);
-router.get('/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.show);
-router.get('/:id/log', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.getLog);
-router.post('/', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.create);
-router.post('/:id/copy', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.copy);
-router.post('/:id/merge', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.merge);
-router.post('/bulk', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.bulkCreate);
-router.put('/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.update);
-router.delete('/', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xea3c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6D\x61\x6E\x61\x67\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x43\x6D","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x6C\x69\x73\x74\x63\x6F\x6E\x74\x61\x63\x74","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x70\x6F\x73\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6C\x6F\x67","\x67\x65\x74\x4C\x6F\x67","\x63\x72\x65\x61\x74\x65","\x2F\x3A\x69\x64\x2F\x63\x6F\x70\x79","\x63\x6F\x70\x79","\x2F\x3A\x69\x64\x2F\x6D\x65\x72\x67\x65","\x6D\x65\x72\x67\x65","\x2F\x62\x75\x6C\x6B","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xea3c[0];var express=require(_0xea3c[1]);var controller=require(_0xea3c[2]);var auth=require(_0xea3c[3]);var license=require(_0xea3c[4]);var router=express.Router();router[_0xea3c[12]](_0xea3c[5],auth[_0xea3c[6]](),license[_0xea3c[7]](),auth[_0xea3c[10]]([5],[_0xea3c[8],_0xea3c[9]]),controller[_0xea3c[11]]);router[_0xea3c[12]](_0xea3c[13],auth[_0xea3c[6]](),license[_0xea3c[7]](),auth[_0xea3c[10]]([5],[_0xea3c[8]]),controller[_0xea3c[14]]);router[_0xea3c[17]](_0xea3c[15],auth[_0xea3c[6]](),license[_0xea3c[7]](),auth[_0xea3c[10]]([5],[_0xea3c[8],_0xea3c[9]]),controller[_0xea3c[16]]);router[_0xea3c[12]](_0xea3c[18],auth[_0xea3c[6]](),license[_0xea3c[7]](),auth[_0xea3c[10]]([5],[_0xea3c[8],_0xea3c[9]]),controller[_0xea3c[19]]);router[_0xea3c[12]](_0xea3c[20],auth[_0xea3c[6]](),license[_0xea3c[7]](),auth[_0xea3c[10]]([5],[_0xea3c[8],_0xea3c[9]]),controller[_0xea3c[21]]);router[_0xea3c[17]](_0xea3c[5],auth[_0xea3c[6]](),license[_0xea3c[7]](),auth[_0xea3c[10]]([5],[_0xea3c[8],_0xea3c[9]]),controller[_0xea3c[22]]);router[_0xea3c[17]](_0xea3c[23],auth[_0xea3c[6]](),license[_0xea3c[7]](),auth[_0xea3c[10]]([5],[_0xea3c[8],_0xea3c[9]]),controller[_0xea3c[24]]);router[_0xea3c[17]](_0xea3c[25],auth[_0xea3c[6]](),license[_0xea3c[7]](),auth[_0xea3c[10]]([5],[_0xea3c[8],_0xea3c[9]]),controller[_0xea3c[26]]);router[_0xea3c[17]](_0xea3c[27],auth[_0xea3c[6]](),license[_0xea3c[7]](),auth[_0xea3c[10]]([5],[_0xea3c[8]]),controller[_0xea3c[28]]);router[_0xea3c[30]](_0xea3c[18],auth[_0xea3c[6]](),license[_0xea3c[7]](),auth[_0xea3c[10]]([5],[_0xea3c[8],_0xea3c[9]]),controller[_0xea3c[29]]);router[_0xea3c[32]](_0xea3c[5],auth[_0xea3c[6]](),license[_0xea3c[7]](),auth[_0xea3c[10]]([5],[_0xea3c[8]]),controller[_0xea3c[31]]);router[_0xea3c[32]](_0xea3c[18],auth[_0xea3c[6]](),license[_0xea3c[7]](),auth[_0xea3c[10]]([5],[_0xea3c[8]]),controller[_0xea3c[33]]);module[_0xea3c[34]]= router
\ No newline at end of file
diff --git a/server/api/custom_report/custom_report.controller.js b/server/api/custom_report/custom_report.controller.js
index b0ead9a..0c5cf9b 100644
--- a/server/api/custom_report/custom_report.controller.js
+++ b/server/api/custom_report/custom_report.controller.js
@@ -1,568 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var sequelize = require('../../models').sequelize;
-var CustomReport = require('../../models').CustomReport;
-var ReportField = require('../../models').ReportField;
-var Metric = require('../../models').Metric;
-var ExtractedReport = require('../../models').ExtractedReport;
-var extractUtils = require('../../utils/report_extraction');
-var reportBuildUtils = require('../../utils/report_build');
-var Util = require('../../config/util');
-var sr = require('simple-random');
-var moment = require('moment');
-var cp = require('child_process');
-var ReportTree = require('../../models').ReportTree;
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  return CustomReport
-    .findAndCountAll(Util.getQuery(req.query, {
-      deletedAt: null
-    }))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getReportQuery = function(req, res) {
-  return Promise
-    .all([])
-    .then(getQuery(req, res))
-    .then(function(query) {
-      if (query) {
-        switch (query) {
-          case 'permission':
-            query = 'no sufficient queue permissions for the user';
-            break;
-          default:
-        }
-      }
-      res.status(200).send({
-        query: query
-      });
-    })
-    .catch(function(err) {
-      console.log('Error getting query from api:', err);
-    });
-}
-
-function getQuery(req, res) {
-  var _report;
-  return function() {
-    return CustomReport
-      .scope('fields')
-      .findById(req.params.id)
-      .then(function(report) {
-        console.log('found report');
-        if (!report) {
-          return res.sendStatus(404);
-        }
-        if (req.query.daily && req.query.daily === 'true') {
-          req.query.startDate = moment().format('YYYY-MM-DD');
-          req.query.endDate = moment().format('YYYY-MM-DD');
-          report.dataValues.table = report.dataValues.table.replace(
-            '_history', '');
-        }
-        delete req.query.daily;
-        _report = report.dataValues;
-        return _report.table;
-      })
-      .then(reportBuildUtils.buildFilter(req.user))
-      .then(function(filter) {
-        return [filter, _report];
-      })
-      .spread(reportBuildUtils.buildQuery(req.query))
-  }
-}
-
-exports.preview = function(req, res) {
-  var _countAll;
-  return Promise
-    .all([])
-    .then(getQuery(req, res))
-    .then(reportBuildUtils.checkQuery())
-    .then(function(results) {
-      if (results && _.isArray(results)) {
-        _countAll = results.length;
-        if (req.query.limit) {
-          results = _(results).slice(req.query.offset || 0).take(req.query.limit).value();
-        }
-        _.forEach(results, function(row) {
-          _.forOwn(row, function(property, key) {
-            if (property instanceof Date) {
-              row[key] = moment(property).format("YYYY-MM-DD HH:mm:ss").toString();
-            }
-          });
-        });
-        res.status(200).send({
-          rows: results,
-          count: _countAll
-        });
-      } else {
-        return handleError(res, {
-          message: results || 'query error'
-        });
-      }
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.extractPdf = function(req, res) {
-  // console.log('extractPdf api function');
-  docExtract(req, res, 'PDF')
-};
-
-exports.extractCsv = function(req, res) {
-  // console.log('extractCsv api function');
-  docExtract(req, res, 'CSV');
-};
-
-exports.destroyNodeReports = function(req, res) {
-  return ReportTree
-    .findById(2)
-    .then(function(tree) {
-      tree = JSON.parse(tree.tree);
-      var node = _.find(tree, {
-        id: req.params.id
-      });
-      if (!node) {
-        throw new Error('Node not found');
-      }
-      var nodes = [];
-      findSubNodes(node, tree, nodes);
-      return CustomReport
-        .destroy({
-          where: {
-            parent: nodes
-          },
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-function findSubNodes(node, tree, _nodes) { //receive a node, the tree containing the node and an array where to insert all the sub nodes found recursively, including the starting node
-  _nodes.push(node.id);
-  var subNodes = _.filter(tree, {
-    parent: node.id
-  });
-  if (!subNodes || !subNodes.length) {
-    return;
-  }
-  _.forEach(subNodes, function(subNode) {
-    findSubNodes(subNode, tree, _nodes);
-  });
-}
-
-function docExtract(req, res, typeFunction) {
-  var report;
-  // console.log('common docExtract api function');
-  CustomReport //DO NOT ADD RETURN CAUSE THE EXTRACTING FUNCTION WILL KEEP EXTRACTING AFTER THE API HAS RETURNED
-    .scope('fields')
-    .findById(req.params.id)
-    .then(function(_report) {
-      if (!_report) {
-        return res.sendStatus(404);
-      }
-      report = _report;
-      return ReportTree
-        .findById(2);
-    })
-    .then(function(tree) {
-      tree = JSON.parse(tree.tree);
-      var folder = _.find(tree, {
-        id: report.parent
-      });
-      var path = getReportPath(folder, tree, report.name);
-      // console.log('found the report, creating the new DB row for extracted reports..');
-      //CREATE A DB ROW IN A TABLE WITH THE REPORT INFO, QUERY DATES, AND THE STATUS 'ELABORATING'
-      if (req.query.daily && req.query.daily === 'true') {
-        req.query.startDate = moment().format('YYYY-MM-DD');
-        req.query.endDate = moment().format('YYYY-MM-DD');
-        report.dataValues.table = report.dataValues.table.replace('_history',
-          '');
-      }
-      delete req.query.daily;
-      return [report, ExtractedReport.create({
-        name: path,
-        startDate: req.query.startDate ? req.query.startDate + (req.query.startTime ? ' ' + req.query.startTime : '00:00') : null,
-        endDate: req.query.endDate ? req.query.endDate + (req.query.endTime ? ' ' + req.query.endTime : '23:59') : null,
-        output: typeFunction,
-        UserId: req.user.id
-      })]
-    })
-    .spread(function(report, extractedReport) {
-      // console.log('created new extracted reports db entry, calling external extraction function: ' + typeFunction);
-      var child = cp.fork(__dirname + '/../../utils/report_extraction.js');
-      child.on('message', function(data) {
-        console.log('child message', data);
-        child.kill();
-      }).on('close', function() {
-        console.log('child close');
-      }).on('error', function(err) {
-        console.log('child error', err);
-      });
-      child.send({
-        report: report,
-        query: req.query,
-        extractedId: extractedReport.id,
-        user: req.user,
-        type: typeFunction
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-  return res.sendStatus(200);
-}
-
-function getReportPath(folder, tree, path) {
-  path = folder.text + '/ ' + path;
-  if (folder.parent === '#') {
-    return path;
-  } else {
-    return getReportPath(_.find(tree, {
-      id: folder.parent
-    }), tree, path);
-  }
-}
-
-// Get a single report
-exports.show = function(req, res) {
-  return CustomReport
-    .scope('fields')
-    .findById(req.params.id)
-    .then(function(report) {
-      if (!report) {
-        return res.sendStatus(404);
-      }
-      return res.send(report);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-
-// Get a single report
-exports.export = function(req, res) {
-  return CustomReport
-    .scope({
-      method: ['exportFields', {
-        CustomReportId: req.params.id
-      }]
-    }) //add where condition on customreport id
-    .findById(req.params.id, {
-      attributes: ['conditions', 'description', 'name', 'parent', 'table']
-    })
-    .then(function(report) {
-      if (!report) {
-        return res.sendStatus(404);
-      }
-      return res.send(report);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Copy a custom report
-exports.copy = function(req, res) {
-  var _fields;
-  return sequelize.transaction(function(t) {
-      return CustomReport
-        .scope('fields')
-        .findById(req.params.id)
-        .then(function(report) {
-          if (!report) {
-            return res.sendStatus(404);
-          }
-          var newReport = report.dataValues;
-          delete newReport.id;
-          delete newReport.createdAt;
-          delete newReport.updatedAt;
-          newReport.parent = req.body.parent;
-          _fields = _.map(newReport.Fields, 'dataValues');
-          return CustomReport
-            .create(newReport, {
-              transaction: t
-            });
-        })
-        .then(function(report) {
-          return [report, _fields];
-        })
-        .spread(createFields(t));
-    })
-    .then(function() {
-      return res.sendStatus(201);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Creates a new report in the DB.
-exports.create = function(req, res) {
-  var _report;
-  return sequelize.transaction(function(t) {
-      return CustomReport
-        .create(req.body, {
-          transaction: t
-        })
-        .then(function(report) {
-          _report = report;
-          return [_report, req.body.Fields];
-        })
-        .spread(createFields(t));
-    })
-    .then(function() {
-      return res.status(201).send(_report);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Import a report in the DB.
-exports.import = function(req, res) {
-  var _report;
-  return sequelize.transaction(function(t) {
-      return CustomReport
-        .create(req.body, {
-          transaction: t
-        })
-        .then(function(report) {
-          _report = report;
-          return [_report, req.body.Fields];
-        })
-        .spread(createImportFields(t));
-    })
-    .then(function() {
-      return res.status(201).send(_report);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.update = function(req, res, next) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  var _report;
-  return sequelize.transaction(function(t) {
-      return CustomReport
-        .findById(req.params.id)
-        .then(function(report) {
-          if (!report) {
-            return res.sendStatus(404);
-          }
-          var updated = _.merge(report, req.body);
-          return report
-            .save({
-              transaction: t
-            });
-        })
-        .then(function(report) {
-          _report = report;
-          if (req.body.Fields) {
-            return ReportField.destroy({
-              where: {
-                CustomReportId: req.params.id
-              },
-              transaction: t
-            });
-          }
-        })
-        .then(function() {
-          return [_report, req.body.Fields];
-        })
-        .spread(createFields(t));
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-}
-
-function createFields(t) {
-  return function(report, fields) {
-    if (fields && Array.isArray(fields) && fields.length) {
-      var tableModel = reportBuildUtils.getTable(report.table);
-      if (tableModel) {
-        var _tableFields;
-        return tableModel
-          .describe()
-          .then(function(tableFields) {
-            _tableFields = _.keys(tableFields);
-            return Metric
-              .findAll();
-          })
-          .then(function(metrics) {
-            var bulkFields = [];
-            metrics = _.map(metrics, 'dataValues');
-            fields.forEach(function(elem) {
-              elem.CustomReportId = report.id;
-              if (elem.MetricId) {
-                var metric = _.find(metrics, {
-                  id: elem.MetricId
-                });
-                if (metric) {
-                  elem.field = metric.metric;
-                  bulkFields.push(ReportField
-                    .create(elem, {
-                      transaction: t
-                    }));
-                } else {
-                  throw new sequelize.Error("The metric with id " +
-                    elem.MetricId + " you specified does not exist");
-                }
-              } else {
-                if (_.includes(_tableFields, elem.field) || elem.custom) {
-                  bulkFields.push(ReportField
-                    .create(elem, {
-                      transaction: t
-                    }));
-                } else {
-                  throw new sequelize.Error("The field " + elem.field +
-                    " you specified does not exist in the table");
-                }
-              }
-            });
-            return bulkFields;
-          })
-          .all();
-      } else {
-        throw new sequelize.Error(
-          "You have not specified the table or the table does not exist");
-      }
-    }
-  }
-}
-
-function createImportFields(t) {
-  return function(report, fields) {
-    if (fields && Array.isArray(fields) && fields.length) {
-      var tableModel = reportBuildUtils.getTable(report.table);
-      if (tableModel) {
-        var _tableFields;
-        return tableModel
-          .describe()
-          .then(function(tableFields) {
-            _tableFields = _.keys(tableFields);
-            var bulkFields = [];
-            var type;
-            if (_.every(fields, function(elem) {
-                return _.has(elem, 'DefaultMetricId');
-              })) {
-              type = 'DefaultMetric'
-            } else if (_.every(fields, function(elem) {
-                return _.has(elem, 'MetricId');
-              })) {
-              type = 'Metric'
-            } else {
-              throw new sequelize.Error("Unsupported Import format (Metric type in report fields is missing)");
-            }
-            var groupedFields = _.groupBy(fields, type + 'Id');
-            _.forOwn(groupedFields, function(value, key) {
-              if (key !== 'undefined' && key !== 'null') {
-                value[0][type].ReportFields.forEach(function(elem) {
-                  elem.CustomReportId = report.id;
-                });
-                value[0][type].name += '_' + sr({
-                  length: 5
-                });
-                bulkFields.push(Metric
-                  .create(value[0][type], {
-                    include: [{
-                      model: ReportField,
-                      as: 'ReportFields'
-                    }],
-                    transaction: t
-                  }));
-              } else {
-                value.forEach(function(elem) {
-                  if (_.includes(_tableFields, elem.field) || elem.custom) {
-                    elem.CustomReportId = report.id;
-                    bulkFields.push(ReportField
-                      .create(elem, {
-                        transaction: t
-                      }));
-                  } else {
-                    throw new sequelize.Error("The field " + elem.field +
-                      " you specified does not exist in the table"
-                    );
-                  }
-                });
-              }
-            });
-            return bulkFields;
-          })
-          .all();
-      } else {
-        throw new sequelize.Error(
-          "You have not specified the table or the table does not exist");
-      }
-    }
-  }
-}
-
-
-// Deletes a report from the DB.
-exports.destroy = function(req, res) {
-  return CustomReport
-    .findById(req.params.id)
-    .then(function(report) {
-      if (!report) {
-        return res.sendStatus(404);
-      }
-      return report.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.bulkDestroy = function(req, res) {
-  return CustomReport
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x9323=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x4D\x65\x74\x72\x69\x63","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x6D\x6F\x6D\x65\x6E\x74","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x67\x65\x74\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x72\x79","\x45\x72\x72\x6F\x72\x20\x67\x65\x74\x74\x69\x6E\x67\x20\x71\x75\x65\x72\x79\x20\x66\x72\x6F\x6D\x20\x61\x70\x69\x3A","\x6C\x6F\x67","\x6E\x6F\x20\x73\x75\x66\x66\x69\x63\x69\x65\x6E\x74\x20\x71\x75\x65\x75\x65\x20\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x75\x73\x65\x72","\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E","\x61\x6C\x6C","\x62\x75\x69\x6C\x64\x51\x75\x65\x72\x79","\x73\x70\x72\x65\x61\x64","\x75\x73\x65\x72","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","\x66\x6F\x75\x6E\x64\x20\x72\x65\x70\x6F\x72\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x64\x61\x69\x6C\x79","\x74\x72\x75\x65","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44","\x66\x6F\x72\x6D\x61\x74","\x65\x6E\x64\x44\x61\x74\x65","\x74\x61\x62\x6C\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x5F\x68\x69\x73\x74\x6F\x72\x79","","\x72\x65\x70\x6C\x61\x63\x65","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x66\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\x70\x72\x65\x76\x69\x65\x77","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6D\x69\x74","\x76\x61\x6C\x75\x65","\x74\x61\x6B\x65","\x6F\x66\x66\x73\x65\x74","\x73\x6C\x69\x63\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x4F\x77\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x71\x75\x65\x72\x79\x20\x65\x72\x72\x6F\x72","\x63\x68\x65\x63\x6B\x51\x75\x65\x72\x79","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x50\x44\x46","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x43\x53\x56","\x64\x65\x73\x74\x72\x6F\x79\x4E\x6F\x64\x65\x52\x65\x70\x6F\x72\x74\x73","\x74\x72\x65\x65","\x70\x61\x72\x73\x65","\x66\x69\x6E\x64","\x4E\x6F\x64\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79","\x70\x75\x73\x68","\x66\x69\x6C\x74\x65\x72","\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6A\x73","\x66\x6F\x72\x6B","\x65\x72\x72\x6F\x72","\x63\x68\x69\x6C\x64\x20\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x63\x68\x69\x6C\x64\x20\x63\x6C\x6F\x73\x65","\x6D\x65\x73\x73\x61\x67\x65","\x63\x68\x69\x6C\x64\x20\x6D\x65\x73\x73\x61\x67\x65","\x6B\x69\x6C\x6C","\x70\x61\x72\x65\x6E\x74","\x6E\x61\x6D\x65","\x73\x74\x61\x72\x74\x54\x69\x6D\x65","\x20","\x30\x30\x3A\x30\x30","\x65\x6E\x64\x54\x69\x6D\x65","\x32\x33\x3A\x35\x39","\x63\x72\x65\x61\x74\x65","\x74\x65\x78\x74","\x2F\x20","\x23","\x73\x68\x6F\x77","\x65\x78\x70\x6F\x72\x74","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x63\x6F\x70\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x62\x6F\x64\x79","\x6D\x61\x70","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64\x73","\x69\x6D\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x67\x65\x74\x54\x61\x62\x6C\x65","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x4D\x65\x74\x72\x69\x63\x49\x64","\x66\x69\x65\x6C\x64","\x6D\x65\x74\x72\x69\x63","\x54\x68\x65\x20\x6D\x65\x74\x72\x69\x63\x20\x77\x69\x74\x68\x20\x69\x64\x20","\x20\x79\x6F\x75\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x63\x75\x73\x74\x6F\x6D","\x54\x68\x65\x20\x66\x69\x65\x6C\x64\x20","\x20\x79\x6F\x75\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x59\x6F\x75\x20\x68\x61\x76\x65\x20\x6E\x6F\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x6F\x72\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64","\x68\x61\x73","\x65\x76\x65\x72\x79","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63","\x55\x6E\x73\x75\x70\x70\x6F\x72\x74\x65\x64\x20\x49\x6D\x70\x6F\x72\x74\x20\x66\x6F\x72\x6D\x61\x74\x20\x28\x4D\x65\x74\x72\x69\x63\x20\x74\x79\x70\x65\x20\x69\x6E\x20\x72\x65\x70\x6F\x72\x74\x20\x66\x69\x65\x6C\x64\x73\x20\x69\x73\x20\x6D\x69\x73\x73\x69\x6E\x67\x29","\x49\x64","\x67\x72\x6F\x75\x70\x42\x79","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6E\x75\x6C\x6C","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x5F","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x9323[0];var _=require(_0x9323[1]);var util=require(_0x9323[2]);var sequelize=require(_0x9323[4])[_0x9323[3]];var CustomReport=require(_0x9323[4])[_0x9323[5]];var ReportField=require(_0x9323[4])[_0x9323[6]];var Metric=require(_0x9323[4])[_0x9323[7]];var ExtractedReport=require(_0x9323[4])[_0x9323[8]];var extractUtils=require(_0x9323[9]);var reportBuildUtils=require(_0x9323[10]);var Util=require(_0x9323[11]);var sr=require(_0x9323[12]);var moment=require(_0x9323[13]);var cp=require(_0x9323[14]);var ReportTree=require(_0x9323[4])[_0x9323[15]];exports[_0x9323[16]]= function(_0x131axf,_0x131ax10,_0x131ax11){return CustomReport[_0x9323[23]](Util[_0x9323[22]](_0x131axf[_0x9323[21]],{deletedAt:null}))[_0x9323[20]](function(_0x131ax13){_0x131ax10[_0x9323[19]](200)[_0x9323[18]](_0x131ax13)})[_0x9323[17]](function(_0x131ax12){return handleError(_0x131ax10,_0x131ax12)})};exports[_0x9323[24]]= function(_0x131axf,_0x131ax10){return Promise[_0x9323[29]]([])[_0x9323[20]](getQuery(_0x131axf,_0x131ax10))[_0x9323[20]](function(_0x131ax14){if(_0x131ax14){switch(_0x131ax14){case _0x9323[28]:_0x131ax14= _0x9323[27];break;default:}};_0x131ax10[_0x9323[19]](200)[_0x9323[18]]({query:_0x131ax14})})[_0x9323[17]](function(_0x131ax12){console[_0x9323[26]](_0x9323[25],_0x131ax12)})};function getQuery(_0x131axf,_0x131ax10){var _0x131ax16;return function(){return CustomReport[_0x9323[51]](_0x9323[50])[_0x9323[49]](_0x131axf[_0x9323[48]][_0x9323[47]])[_0x9323[20]](function(_0x131ax18){console[_0x9323[26]](_0x9323[34]);if(!_0x131ax18){return _0x131ax10[_0x9323[35]](404)};if(_0x131axf[_0x9323[21]][_0x9323[36]]&& _0x131axf[_0x9323[21]][_0x9323[36]]=== _0x9323[37]){_0x131axf[_0x9323[21]][_0x9323[38]]= moment()[_0x9323[40]](_0x9323[39]);_0x131axf[_0x9323[21]][_0x9323[41]]= moment()[_0x9323[40]](_0x9323[39]);_0x131ax18[_0x9323[43]][_0x9323[42]]= _0x131ax18[_0x9323[43]][_0x9323[42]][_0x9323[46]](_0x9323[44],_0x9323[45])};delete _0x131axf[_0x9323[21]][_0x9323[36]];_0x131ax16= _0x131ax18[_0x9323[43]];return _0x131ax16[_0x9323[42]]})[_0x9323[20]](reportBuildUtils[_0x9323[33]](_0x131axf[_0x9323[32]]))[_0x9323[20]](function(_0x131ax17){return [_0x131ax17,_0x131ax16]})[_0x9323[31]](reportBuildUtils[_0x9323[30]](_0x131axf[_0x9323[21]]))}}exports[_0x9323[52]]= function(_0x131axf,_0x131ax10){var _0x131ax19;return Promise[_0x9323[29]]([])[_0x9323[20]](getQuery(_0x131axf,_0x131ax10))[_0x9323[20]](reportBuildUtils[_0x9323[64]]())[_0x9323[20]](function(_0x131ax1a){if(_0x131ax1a&& _[_0x9323[53]](_0x131ax1a)){_0x131ax19= _0x131ax1a[_0x9323[54]];if(_0x131axf[_0x9323[21]][_0x9323[55]]){_0x131ax1a= _(_0x131ax1a)[_0x9323[59]](_0x131axf[_0x9323[21]][_0x9323[58]]|| 0)[_0x9323[57]](_0x131axf[_0x9323[21]][_0x9323[55]])[_0x9323[56]]()};_[_0x9323[62]](_0x131ax1a,function(_0x131ax1b){_[_0x9323[61]](_0x131ax1b,function(_0x131ax1c,_0x131ax1d){if(_0x131ax1c instanceof  Date){_0x131ax1b[_0x131ax1d]= moment(_0x131ax1c)[_0x9323[40]](_0x9323[60]).toString()}})});_0x131ax10[_0x9323[19]](200)[_0x9323[18]]({rows:_0x131ax1a,count:_0x131ax19})}else {return handleError(_0x131ax10,{message:_0x131ax1a|| _0x9323[63]})}})[_0x9323[17]](function(_0x131ax12){console[_0x9323[26]](_0x131ax12);return handleError(_0x131ax10,_0x131ax12)})};exports[_0x9323[65]]= function(_0x131axf,_0x131ax10){docExtract(_0x131axf,_0x131ax10,_0x9323[66])};exports[_0x9323[67]]= function(_0x131axf,_0x131ax10){docExtract(_0x131axf,_0x131ax10,_0x9323[68])};exports[_0x9323[69]]= function(_0x131axf,_0x131ax10){return ReportTree[_0x9323[49]](2)[_0x9323[20]](function(_0x131ax1e){_0x131ax1e= JSON[_0x9323[71]](_0x131ax1e[_0x9323[70]]);var _0x131ax1f=_[_0x9323[72]](_0x131ax1e,{id:_0x131axf[_0x9323[48]][_0x9323[47]]});if(!_0x131ax1f){throw  new Error(_0x9323[73])};var _0x131ax20=[];findSubNodes(_0x131ax1f,_0x131ax1e,_0x131ax20);return CustomReport[_0x9323[74]]({where:{parent:_0x131ax20},individualHooks:true})})[_0x9323[20]](function(){return _0x131ax10[_0x9323[35]](200)})[_0x9323[17]](function(_0x131ax12){console[_0x9323[26]](_0x131ax12);return handleError(_0x131ax10,_0x131ax12)})};function findSubNodes(_0x131ax1f,_0x131ax1e,_0x131ax22){_0x131ax22[_0x9323[75]](_0x131ax1f[_0x9323[47]]);var _0x131ax23=_[_0x9323[76]](_0x131ax1e,{parent:_0x131ax1f[_0x9323[47]]});if(!_0x131ax23|| !_0x131ax23[_0x9323[54]]){return};_[_0x9323[62]](_0x131ax23,function(_0x131ax24){findSubNodes(_0x131ax24,_0x131ax1e,_0x131ax22)})}function docExtract(_0x131axf,_0x131ax10,_0x131ax26){var _0x131ax18;CustomReport[_0x9323[51]](_0x9323[50])[_0x9323[49]](_0x131axf[_0x9323[48]][_0x9323[47]])[_0x9323[20]](function(_0x131ax16){if(!_0x131ax16){return _0x131ax10[_0x9323[35]](404)};_0x131ax18= _0x131ax16;return ReportTree[_0x9323[49]](2)})[_0x9323[20]](function(_0x131ax1e){_0x131ax1e= JSON[_0x9323[71]](_0x131ax1e[_0x9323[70]]);var _0x131ax2a=_[_0x9323[72]](_0x131ax1e,{id:_0x131ax18[_0x9323[87]]});var _0x131ax2b=getReportPath(_0x131ax2a,_0x131ax1e,_0x131ax18[_0x9323[88]]);if(_0x131axf[_0x9323[21]][_0x9323[36]]&& _0x131axf[_0x9323[21]][_0x9323[36]]=== _0x9323[37]){_0x131axf[_0x9323[21]][_0x9323[38]]= moment()[_0x9323[40]](_0x9323[39]);_0x131axf[_0x9323[21]][_0x9323[41]]= moment()[_0x9323[40]](_0x9323[39]);_0x131ax18[_0x9323[43]][_0x9323[42]]= _0x131ax18[_0x9323[43]][_0x9323[42]][_0x9323[46]](_0x9323[44],_0x9323[45])};delete _0x131axf[_0x9323[21]][_0x9323[36]];return [_0x131ax18,ExtractedReport[_0x9323[94]]({name:_0x131ax2b,startDate:_0x131axf[_0x9323[21]][_0x9323[38]]?_0x131axf[_0x9323[21]][_0x9323[38]]+ (_0x131axf[_0x9323[21]][_0x9323[89]]?_0x9323[90]+ _0x131axf[_0x9323[21]][_0x9323[89]]:_0x9323[91]):null,endDate:_0x131axf[_0x9323[21]][_0x9323[41]]?_0x131axf[_0x9323[21]][_0x9323[41]]+ (_0x131axf[_0x9323[21]][_0x9323[92]]?_0x9323[90]+ _0x131axf[_0x9323[21]][_0x9323[92]]:_0x9323[93]):null,output:_0x131ax26,UserId:_0x131axf[_0x9323[32]][_0x9323[47]]})]})[_0x9323[31]](function(_0x131ax18,_0x131ax27){var _0x131ax28=cp[_0x9323[78]](__dirname+ _0x9323[77]);_0x131ax28[_0x9323[81]](_0x9323[84],function(_0x131ax29){console[_0x9323[26]](_0x9323[85],_0x131ax29);_0x131ax28[_0x9323[86]]()})[_0x9323[81]](_0x9323[82],function(){console[_0x9323[26]](_0x9323[83])})[_0x9323[81]](_0x9323[79],function(_0x131ax12){console[_0x9323[26]](_0x9323[80],_0x131ax12)});_0x131ax28[_0x9323[18]]({report:_0x131ax18,query:_0x131axf[_0x9323[21]],extractedId:_0x131ax27[_0x9323[47]],user:_0x131axf[_0x9323[32]],type:_0x131ax26})})[_0x9323[17]](function(_0x131ax12){console[_0x9323[26]](_0x131ax12);return handleError(_0x131ax10,_0x131ax12)});return _0x131ax10[_0x9323[35]](200)}function getReportPath(_0x131ax2a,_0x131ax1e,_0x131ax2b){_0x131ax2b= _0x131ax2a[_0x9323[95]]+ _0x9323[96]+ _0x131ax2b;if(_0x131ax2a[_0x9323[87]]=== _0x9323[97]){return _0x131ax2b}else {return getReportPath(_[_0x9323[72]](_0x131ax1e,{id:_0x131ax2a[_0x9323[87]]}),_0x131ax1e,_0x131ax2b)}}exports[_0x9323[98]]= function(_0x131axf,_0x131ax10){return CustomReport[_0x9323[51]](_0x9323[50])[_0x9323[49]](_0x131axf[_0x9323[48]][_0x9323[47]])[_0x9323[20]](function(_0x131ax18){if(!_0x131ax18){return _0x131ax10[_0x9323[35]](404)};return _0x131ax10[_0x9323[18]](_0x131ax18)})[_0x9323[17]](function(_0x131ax12){return handleError(_0x131ax10,_0x131ax12)})};exports[_0x9323[99]]= function(_0x131axf,_0x131ax10){return CustomReport[_0x9323[51]]({method:[_0x9323[102],{CustomReportId:_0x131axf[_0x9323[48]][_0x9323[47]]}]})[_0x9323[49]](_0x131axf[_0x9323[48]][_0x9323[47]],{attributes:[_0x9323[100],_0x9323[101],_0x9323[88],_0x9323[87],_0x9323[42]]})[_0x9323[20]](function(_0x131ax18){if(!_0x131ax18){return _0x131ax10[_0x9323[35]](404)};return _0x131ax10[_0x9323[18]](_0x131ax18)})[_0x9323[17]](function(_0x131ax12){return handleError(_0x131ax10,_0x131ax12)})};exports[_0x9323[103]]= function(_0x131axf,_0x131ax10){var _0x131ax2d;return sequelize[_0x9323[108]](function(_0x131ax2e){return CustomReport[_0x9323[51]](_0x9323[50])[_0x9323[49]](_0x131axf[_0x9323[48]][_0x9323[47]])[_0x9323[20]](function(_0x131ax18){if(!_0x131ax18){return _0x131ax10[_0x9323[35]](404)};var _0x131ax2f=_0x131ax18[_0x9323[43]];delete _0x131ax2f[_0x9323[47]];delete _0x131ax2f[_0x9323[104]];delete _0x131ax2f[_0x9323[105]];_0x131ax2f[_0x9323[87]]= _0x131axf[_0x9323[106]][_0x9323[87]];_0x131ax2d= _[_0x9323[107]](_0x131ax2f.Fields,_0x9323[43]);return CustomReport[_0x9323[94]](_0x131ax2f,{transaction:_0x131ax2e})})[_0x9323[20]](function(_0x131ax18){return [_0x131ax18,_0x131ax2d]})[_0x9323[31]](createFields(_0x131ax2e))})[_0x9323[20]](function(){return _0x131ax10[_0x9323[35]](201)})[_0x9323[17]](function(_0x131ax12){console[_0x9323[26]](_0x131ax12);return handleError(_0x131ax10,_0x131ax12)})};exports[_0x9323[94]]= function(_0x131axf,_0x131ax10){var _0x131ax16;return sequelize[_0x9323[108]](function(_0x131ax2e){return CustomReport[_0x9323[94]](_0x131axf[_0x9323[106]],{transaction:_0x131ax2e})[_0x9323[20]](function(_0x131ax18){_0x131ax16= _0x131ax18;return [_0x131ax16,_0x131axf[_0x9323[106]][_0x9323[109]]]})[_0x9323[31]](createFields(_0x131ax2e))})[_0x9323[20]](function(){return _0x131ax10[_0x9323[19]](201)[_0x9323[18]](_0x131ax16)})[_0x9323[17]](function(_0x131ax12){console[_0x9323[26]](_0x131ax12);return handleError(_0x131ax10,_0x131ax12)})};exports[_0x9323[110]]= function(_0x131axf,_0x131ax10){var _0x131ax16;return sequelize[_0x9323[108]](function(_0x131ax2e){return CustomReport[_0x9323[94]](_0x131axf[_0x9323[106]],{transaction:_0x131ax2e})[_0x9323[20]](function(_0x131ax18){_0x131ax16= _0x131ax18;return [_0x131ax16,_0x131axf[_0x9323[106]][_0x9323[109]]]})[_0x9323[31]](createImportFields(_0x131ax2e))})[_0x9323[20]](function(){return _0x131ax10[_0x9323[19]](201)[_0x9323[18]](_0x131ax16)})[_0x9323[17]](function(_0x131ax12){console[_0x9323[26]](_0x131ax12);return handleError(_0x131ax10,_0x131ax12)})};exports[_0x9323[111]]= function(_0x131axf,_0x131ax10,_0x131ax11){if(_0x131axf[_0x9323[106]][_0x9323[47]]){delete _0x131axf[_0x9323[106]][_0x9323[47]]};var _0x131ax16;return sequelize[_0x9323[108]](function(_0x131ax2e){return CustomReport[_0x9323[49]](_0x131axf[_0x9323[48]][_0x9323[47]])[_0x9323[20]](function(_0x131ax18){if(!_0x131ax18){return _0x131ax10[_0x9323[35]](404)};var _0x131ax30=_[_0x9323[112]](_0x131ax18,_0x131axf[_0x9323[106]]);return _0x131ax18[_0x9323[113]]({transaction:_0x131ax2e})})[_0x9323[20]](function(_0x131ax18){_0x131ax16= _0x131ax18;if(_0x131axf[_0x9323[106]][_0x9323[109]]){return ReportField[_0x9323[74]]({where:{CustomReportId:_0x131axf[_0x9323[48]][_0x9323[47]]},transaction:_0x131ax2e})}})[_0x9323[20]](function(){return [_0x131ax16,_0x131axf[_0x9323[106]][_0x9323[109]]]})[_0x9323[31]](createFields(_0x131ax2e))})[_0x9323[20]](function(){return _0x131ax10[_0x9323[35]](200)})[_0x9323[17]](function(_0x131ax12){console[_0x9323[26]](_0x131ax12);return handleError(_0x131ax10,_0x131ax12)})};function createFields(_0x131ax2e){return function(_0x131ax18,_0x131ax32){if(_0x131ax32&& Array[_0x9323[53]](_0x131ax32)&& _0x131ax32[_0x9323[54]]){var _0x131ax33=reportBuildUtils[_0x9323[114]](_0x131ax18[_0x9323[42]]);if(_0x131ax33){var _0x131ax34;return _0x131ax33[_0x9323[127]]()[_0x9323[20]](function(_0x131ax39){_0x131ax34= _[_0x9323[125]](_0x131ax39);return Metric[_0x9323[126]]()})[_0x9323[20]](function(_0x131ax35){var _0x131ax36=[];_0x131ax35= _[_0x9323[107]](_0x131ax35,_0x9323[43]);_0x131ax32[_0x9323[62]](function(_0x131ax37){_0x131ax37[_0x9323[115]]= _0x131ax18[_0x9323[47]];if(_0x131ax37[_0x9323[116]]){var _0x131ax38=_[_0x9323[72]](_0x131ax35,{id:_0x131ax37[_0x9323[116]]});if(_0x131ax38){_0x131ax37[_0x9323[117]]= _0x131ax38[_0x9323[118]];_0x131ax36[_0x9323[75]](ReportField[_0x9323[94]](_0x131ax37,{transaction:_0x131ax2e}))}else {throw  new sequelize.Error(_0x9323[119]+ _0x131ax37[_0x9323[116]]+ _0x9323[120])}}else {if(_[_0x9323[121]](_0x131ax34,_0x131ax37[_0x9323[117]])|| _0x131ax37[_0x9323[122]]){_0x131ax36[_0x9323[75]](ReportField[_0x9323[94]](_0x131ax37,{transaction:_0x131ax2e}))}else {throw  new sequelize.Error(_0x9323[123]+ _0x131ax37[_0x9323[117]]+ _0x9323[124])}}});return _0x131ax36})[_0x9323[29]]()}else {throw  new sequelize.Error(_0x9323[128])}}}}function createImportFields(_0x131ax2e){return function(_0x131ax18,_0x131ax32){if(_0x131ax32&& Array[_0x9323[53]](_0x131ax32)&& _0x131ax32[_0x9323[54]]){var _0x131ax33=reportBuildUtils[_0x9323[114]](_0x131ax18[_0x9323[42]]);if(_0x131ax33){var _0x131ax34;return _0x131ax33[_0x9323[127]]()[_0x9323[20]](function(_0x131ax39){_0x131ax34= _[_0x9323[125]](_0x131ax39);var _0x131ax36=[];var _0x131ax3b;if(_[_0x9323[131]](_0x131ax32,function(_0x131ax37){return _[_0x9323[130]](_0x131ax37,_0x9323[129])})){_0x131ax3b= _0x9323[132]}else {if(_[_0x9323[131]](_0x131ax32,function(_0x131ax37){return _[_0x9323[130]](_0x131ax37,_0x9323[116])})){_0x131ax3b= _0x9323[7]}else {throw  new sequelize.Error(_0x9323[133])}};var _0x131ax3c=_[_0x9323[135]](_0x131ax32,_0x131ax3b+ _0x9323[134]);_[_0x9323[61]](_0x131ax3c,function(_0x131ax3d,_0x131ax1d){if(_0x131ax1d!== _0x9323[136]&& _0x131ax1d!== _0x9323[137]){_0x131ax3d[0][_0x131ax3b][_0x9323[138]][_0x9323[62]](function(_0x131ax37){_0x131ax37[_0x9323[115]]= _0x131ax18[_0x9323[47]]});_0x131ax3d[0][_0x131ax3b][_0x9323[88]]+= _0x9323[139]+ sr({length:5});_0x131ax36[_0x9323[75]](Metric[_0x9323[94]](_0x131ax3d[0][_0x131ax3b],{include:[{model:ReportField,as:_0x9323[138]}],transaction:_0x131ax2e}))}else {_0x131ax3d[_0x9323[62]](function(_0x131ax37){if(_[_0x9323[121]](_0x131ax34,_0x131ax37[_0x9323[117]])|| _0x131ax37[_0x9323[122]]){_0x131ax37[_0x9323[115]]= _0x131ax18[_0x9323[47]];_0x131ax36[_0x9323[75]](ReportField[_0x9323[94]](_0x131ax37,{transaction:_0x131ax2e}))}else {throw  new sequelize.Error(_0x9323[123]+ _0x131ax37[_0x9323[117]]+ _0x9323[124])}})}});return _0x131ax36})[_0x9323[29]]()}else {throw  new sequelize.Error(_0x9323[128])}}}}exports[_0x9323[74]]= function(_0x131axf,_0x131ax10){return CustomReport[_0x9323[49]](_0x131axf[_0x9323[48]][_0x9323[47]])[_0x9323[20]](function(_0x131ax18){if(!_0x131ax18){return _0x131ax10[_0x9323[35]](404)};return _0x131ax18[_0x9323[74]]()})[_0x9323[20]](function(){return _0x131ax10[_0x9323[35]](204)})[_0x9323[17]](function(_0x131ax12){return handleError(_0x131ax10,_0x131ax12)})};exports[_0x9323[140]]= function(_0x131axf,_0x131ax10){return CustomReport[_0x9323[74]]({where:{id:_0x131axf[_0x9323[21]][_0x9323[141]]},individualHooks:true})[_0x9323[20]](function(){return _0x131ax10[_0x9323[35]](204)})[_0x9323[17]](function(_0x131ax12){return handleError(_0x131ax10,_0x131ax12)})};function handleError(_0x131ax10,_0x131ax12){return _0x131ax10[_0x9323[19]](500)[_0x9323[18]](_0x131ax12)}
\ No newline at end of file
diff --git a/server/api/custom_report/custom_report.events.js b/server/api/custom_report/custom_report.events.js
index ac4b9d7..c14606b 100644
--- a/server/api/custom_report/custom_report.events.js
+++ b/server/api/custom_report/custom_report.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const CustomReport = require('../../models').CustomReport;
-
-var CustomReportEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-CustomReportEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  CustomReport.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    CustomReportEvents.emit(event + ':' + doc._id, doc);
-    CustomReportEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = CustomReportEvents;
+var _0x2916=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2916[0];const EventEmitter=require(_0x2916[1]);const CustomReport=require(_0x2916[3])[_0x2916[2]];var CustomReportEvents= new EventEmitter();CustomReportEvents[_0x2916[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x2916[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x2916[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x2916[6]};for(var e in events){var event=events[e];CustomReport[_0x2916[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa780x8,_0xa780x9,_0xa780xa){CustomReportEvents[_0x2916[10]](event+ _0x2916[8]+ _0xa780x8[_0x2916[9]],_0xa780x8);CustomReportEvents[_0x2916[10]](event,_0xa780x8);_0xa780xa(null)}}module[_0x2916[11]]= CustomReportEvents
\ No newline at end of file
diff --git a/server/api/custom_report/custom_report.socket.js b/server/api/custom_report/custom_report.socket.js
index ab9086c..ecee9a1 100644
--- a/server/api/custom_report/custom_report.socket.js
+++ b/server/api/custom_report/custom_report.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const CustomReportEvents = require('./custom_report.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('custom_report:' + event, socket);
-
-    CustomReportEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    CustomReportEvents.removeListener(event, listener);
-  };
-}
+var _0x26de=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x26de[0];const CustomReportEvents=require(_0x26de[1]);var events=[_0x26de[2],_0x26de[3]];exports[_0x26de[4]]= function(_0xa691x3){for(var _0xa691x4=0,_0xa691x5=events[_0x26de[5]];_0xa691x4< _0xa691x5;_0xa691x4++){var _0xa691x6=events[_0xa691x4];var _0xa691x7=createListener(_0x26de[6]+ _0xa691x6,_0xa691x3);CustomReportEvents[_0x26de[7]](_0xa691x6,_0xa691x7);_0xa691x3[_0x26de[7]](_0x26de[8],removeListener(_0xa691x6,_0xa691x7))}};function createListener(_0xa691x6,_0xa691x3){return function(_0xa691x9){_0xa691x3[_0x26de[9]](_0xa691x6,_0xa691x9)}}function removeListener(_0xa691x6,_0xa691x7){return function(){CustomReportEvents[_0x26de[10]](_0xa691x6,_0xa691x7)}}
\ No newline at end of file
diff --git a/server/api/custom_report/index.js b/server/api/custom_report/index.js
index cf6aa62..2c22d22 100644
--- a/server/api/custom_report/index.js
+++ b/server/api/custom_report/index.js
@@ -1,24 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./custom_report.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index);
-router.get('/:id/preview', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.preview);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.show);
-router.get('/:id/query', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.getReportQuery);
-router.get('/:id/export', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.export);
-router.post('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.create);
-router.get('/:id/extract/pdf', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.extractPdf);
-router.get('/:id/extract/csv', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.extractCsv);
-router.post('/import', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.import);
-router.post('/:id/copy', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.copy);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.update);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.bulkDestroy);
-router.delete('/node/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.destroyNodeReports);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xc0e4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x70\x72\x65\x76\x69\x65\x77","\x70\x72\x65\x76\x69\x65\x77","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x72\x79","\x67\x65\x74\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x72\x79","\x2F\x3A\x69\x64\x2F\x65\x78\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x65\x78\x74\x72\x61\x63\x74\x2F\x70\x64\x66","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x2F\x3A\x69\x64\x2F\x65\x78\x74\x72\x61\x63\x74\x2F\x63\x73\x76","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x2F\x69\x6D\x70\x6F\x72\x74","\x69\x6D\x70\x6F\x72\x74","\x2F\x3A\x69\x64\x2F\x63\x6F\x70\x79","\x63\x6F\x70\x79","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x2F\x6E\x6F\x64\x65\x2F\x3A\x69\x64","\x64\x65\x73\x74\x72\x6F\x79\x4E\x6F\x64\x65\x52\x65\x70\x6F\x72\x74\x73","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xc0e4[0];var express=require(_0xc0e4[1]);var controller=require(_0xc0e4[2]);var auth=require(_0xc0e4[3]);var router=express.Router();router[_0xc0e4[9]](_0xc0e4[4],auth[_0xc0e4[5]](),auth[_0xc0e4[7]]([17],[_0xc0e4[6]]),controller[_0xc0e4[8]]);router[_0xc0e4[9]](_0xc0e4[10],auth[_0xc0e4[5]](),auth[_0xc0e4[7]]([17],[_0xc0e4[6]]),controller[_0xc0e4[11]]);router[_0xc0e4[9]](_0xc0e4[12],auth[_0xc0e4[5]](),auth[_0xc0e4[7]]([17],[_0xc0e4[6]]),controller[_0xc0e4[13]]);router[_0xc0e4[9]](_0xc0e4[14],auth[_0xc0e4[5]](),auth[_0xc0e4[7]]([17],[_0xc0e4[6]]),controller[_0xc0e4[15]]);router[_0xc0e4[9]](_0xc0e4[16],auth[_0xc0e4[5]](),auth[_0xc0e4[7]]([17],[_0xc0e4[6]]),controller[_0xc0e4[17]]);router[_0xc0e4[19]](_0xc0e4[4],auth[_0xc0e4[5]](),auth[_0xc0e4[7]]([17],[_0xc0e4[6]]),controller[_0xc0e4[18]]);router[_0xc0e4[9]](_0xc0e4[20],auth[_0xc0e4[5]](),auth[_0xc0e4[7]]([17],[_0xc0e4[6]]),controller[_0xc0e4[21]]);router[_0xc0e4[9]](_0xc0e4[22],auth[_0xc0e4[5]](),auth[_0xc0e4[7]]([17],[_0xc0e4[6]]),controller[_0xc0e4[23]]);router[_0xc0e4[19]](_0xc0e4[24],auth[_0xc0e4[5]](),auth[_0xc0e4[7]]([17],[_0xc0e4[6]]),controller[_0xc0e4[25]]);router[_0xc0e4[19]](_0xc0e4[26],auth[_0xc0e4[5]](),auth[_0xc0e4[7]]([17],[_0xc0e4[6]]),controller[_0xc0e4[27]]);router[_0xc0e4[29]](_0xc0e4[12],auth[_0xc0e4[5]](),auth[_0xc0e4[7]]([17],[_0xc0e4[6]]),controller[_0xc0e4[28]]);router[_0xc0e4[31]](_0xc0e4[4],auth[_0xc0e4[5]](),auth[_0xc0e4[7]]([17],[_0xc0e4[6]]),controller[_0xc0e4[30]]);router[_0xc0e4[31]](_0xc0e4[32],auth[_0xc0e4[5]](),auth[_0xc0e4[7]]([17],[_0xc0e4[6]]),controller[_0xc0e4[33]]);router[_0xc0e4[31]](_0xc0e4[12],auth[_0xc0e4[5]](),auth[_0xc0e4[7]]([17],[_0xc0e4[6]]),controller[_0xc0e4[34]]);module[_0xc0e4[35]]= router
\ No newline at end of file
diff --git a/server/api/dashboard/dashboard.controller.js b/server/api/dashboard/dashboard.controller.js
index 9a1998e..b6a9e3a 100644
--- a/server/api/dashboard/dashboard.controller.js
+++ b/server/api/dashboard/dashboard.controller.js
@@ -1,320 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var Util = require('../../config/util');
-
-var Dashboard = require('../../models').Dashboard;
-var VoiceQueue = require('../../models').VoiceQueue;
-var sequelize = require('../../models').sequelize;
-
-// Get list of dashboards
-exports.index = function(req, res, next) {
-  return Dashboard
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.init = function(req, res, next) {
-
-  // QUEUE SET
-  var voice = {
-    queues: {},
-    outbound: {}
-  };
-
-  return VoiceQueue
-    .findAll({
-      attributes: ['name'],
-      raw: true
-    })
-    .then(function(data) {
-      voice.queues = _.keyBy(data, 'name');
-
-      return sequelize
-        .query('SELECT queue, count(*) as waiting \
-        FROM report_queue \
-        WHERE queuecallerleaveAt IS NULL \
-        GROUP BY queue;', {
-          type: sequelize.QueryTypes.SELECT
-        });
-    })
-    .then(function(data) {
-      data.forEach(function(elm) {
-        if (voice.queues[elm.queue]) {
-          voice.queues[elm.queue].waiting = elm.waiting;
-        }
-      });
-
-      return sequelize
-        .query(
-          'SELECT queue, count(*) as active \
-          FROM report_queue \
-          WHERE queuecallerexit = 0 \
-          AND queuecallerabandon = 0 \
-          AND queuecallercomplete = 0 \
-          AND queuecallerleaveAt IS NOT NULL \
-          GROUP BY queue;', {
-            type: sequelize.QueryTypes.SELECT
-          });
-    })
-    .then(function(data) {
-      data.forEach(function(elm) {
-        if (voice.queues[elm.queue]) {
-          voice.queues[elm.queue].active = elm.active;
-        }
-      });
-
-      return sequelize
-        .query(
-          'SELECT queue, count(*) as abandon \
-          FROM report_queue \
-          WHERE queuecallerabandon = 1 \
-          GROUP BY queue;', {
-            type: sequelize.QueryTypes.SELECT
-          });
-    })
-    .then(function(data) {
-      data.forEach(function(elm) {
-        if (voice.queues[elm.queue]) {
-          voice.queues[elm.queue].abandon = elm.abandon;
-        }
-      });
-
-      return sequelize
-        .query(
-          'SELECT queue, count(*) as complete \
-          FROM report_queue \
-          WHERE queuecallercomplete = 1 \
-          GROUP BY queue;', {
-            type: sequelize.QueryTypes.SELECT
-          });
-    })
-    .then(function(data) {
-      data.forEach(function(elm) {
-        if (voice.queues[elm.queue]) {
-          voice.queues[elm.queue].complete = elm.complete;
-        }
-      });
-
-      return sequelize
-        .query('SELECT queue, count(*) as calls, SUM(holdtime) as holdtime \
-        FROM report_agent \
-        WHERE agentcomplete = 1 \
-        GROUP BY queue;', {
-          type: sequelize.QueryTypes.SELECT
-        });
-    })
-    .then(function(data) {
-      data.forEach(function(elm) {
-        if (voice.queues[elm.queue]) {
-          voice.queues[elm.queue].holdtime = elm.holdtime;
-        }
-      });
-
-      return sequelize
-        .query('SELECT queue, count(*) as calls, SUM(talktime) as talktime \
-        FROM report_agent \
-        WHERE agentcomplete = 1 \
-        GROUP BY queue;', {
-          type: sequelize.QueryTypes.SELECT
-        });
-    })
-    .then(function(data) {
-      data.forEach(function(elm) {
-        if (voice.queues[elm.queue]) {
-          voice.queues[elm.queue].talktime = elm.talktime;
-        }
-      });
-
-      return sequelize
-        .query('SELECT queue, count(*) as unmanaged \
-        FROM report_queue \
-        WHERE queuecallerexit = 1 \
-        GROUP BY queue;', {
-          type: sequelize.QueryTypes.SELECT
-        });
-    })
-    .then(function(data) {
-      data.forEach(function(elm) {
-        if (voice.queues[elm.queue]) {
-          voice.queues[elm.queue].unmanaged = elm.unmanaged;
-        }
-      });
-
-      return sequelize
-        .query('SELECT count(*) as answered \
-        FROM report_call \
-        WHERE disposition = \'ANSWERED\' \
-        AND type = \'outbound\';', {
-          type: sequelize.QueryTypes.SELECT
-        });
-    })
-    .then(function(data) {
-      voice.outbound.answered = data[0].answered;
-
-      return sequelize
-        .query('SELECT count(*) as manualOutbound \
-        FROM report_call \
-        WHERE type = \'outbound\';', {
-          type: sequelize.QueryTypes.SELECT
-        });
-    })
-    .then(function(data) {
-      voice.outbound.manualOutbound = data[0].manualOutbound;
-
-      return sequelize
-        .query('SELECT SUM(duration) as globalDuration \
-        FROM report_call \
-        WHERE type = \'outbound\';', {
-          type: sequelize.QueryTypes.SELECT
-        });
-    })
-    .then(function(data) {
-      voice.outbound.globalDuration = data[0].globalDuration || 0;
-
-      return sequelize
-        .query('SELECT AVG(duration) as avgDuration \
-      FROM report_call \
-      WHERE type=\"outbound\"', {
-          type: sequelize.QueryTypes.SELECT
-        });
-    })
-    .then(function(data) {
-      voice.outbound.avgDuration = data[0].avgDuration || 0;
-      voice.outbound.answerRate = voice.outbound.avgDuration ? ((voice.outbound.answered / voice.outbound.globalDuration) * 100) : 0;
-
-      return res.status(200).send(voice);
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-};
-
-// Get a single dashboard
-exports.all = function(req, res) {
-  return Dashboard
-    .findAll()
-    .then(function(dashboards) {
-      if (!dashboards) {
-        return res.sendStatus(404);
-      }
-      return res.status(200).send(dashboards);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single dashboard
-exports.show = function(req, res) {
-  return Dashboard
-    .findById(req.params.id)
-    .then(function(dashboard) {
-      if (!dashboard) {
-        return res.sendStatus(404);
-      }
-      return res.send(dashboard);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new dashboard in the DB.
-exports.create = function(req, res) {
-  return Dashboard
-    .create(req.body)
-    .then(function(dashboard) {
-      return res.status(201).send(dashboard);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Clone a dashboard in the DB.
-exports.clone = function(req, res) {
-  return Dashboard
-    .findById(req.params.id)
-    .then(function(dashboard) {
-      var newDashboard = dashboard.dataValues;
-      delete newDashboard.id;
-      newDashboard.editable = true;
-      newDashboard.defaultEntry = false;
-      newDashboard.name = req.body.name || newDashboard.name;
-      return Dashboard
-        .create(newDashboard);
-    })
-    .then(function(dashboard) {
-      return res.status(201).send(dashboard);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing dashboard in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return Dashboard
-    .findById(req.params.id)
-    .then(function(dashboard) {
-      if (!dashboard) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(dashboard, req.body);
-      return updated.save();
-    })
-    .then(function(dashboard) {
-      return res.status(200).send(dashboard);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a dashboard from the DB.
-exports.destroy = function(req, res) {
-  return Dashboard
-    .findById(req.params.id)
-    .then(function(dashboard) {
-      if (!dashboard) {
-        return res.sendStatus(404);
-      }
-      return dashboard.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.bulkDestroy = function(req, res) {
-  return Dashboard
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x2aaf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x69\x6E\x69\x74","\x65\x72\x72\x6F\x72","\x61\x76\x67\x44\x75\x72\x61\x74\x69\x6F\x6E","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x61\x6E\x73\x77\x65\x72\x52\x61\x74\x65","\x61\x6E\x73\x77\x65\x72\x65\x64","\x67\x6C\x6F\x62\x61\x6C\x44\x75\x72\x61\x74\x69\x6F\x6E","\x53\x45\x4C\x45\x43\x54\x20\x41\x56\x47\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x20\x61\x73\x20\x61\x76\x67\x44\x75\x72\x61\x74\x69\x6F\x6E\x20\x0A\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x0A\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x3D\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x53\x45\x4C\x45\x43\x54\x20\x53\x55\x4D\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x20\x61\x73\x20\x67\x6C\x6F\x62\x61\x6C\x44\x75\x72\x61\x74\x69\x6F\x6E\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x20\x3D\x20\x27\x6F\x75\x74\x62\x6F\x75\x6E\x64\x27\x3B","\x53\x45\x4C\x45\x43\x54\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x20\x3D\x20\x27\x6F\x75\x74\x62\x6F\x75\x6E\x64\x27\x3B","\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x73","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x66\x6F\x72\x45\x61\x63\x68","\x53\x45\x4C\x45\x43\x54\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x3D\x20\x27\x41\x4E\x53\x57\x45\x52\x45\x44\x27\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x41\x4E\x44\x20\x74\x79\x70\x65\x20\x3D\x20\x27\x6F\x75\x74\x62\x6F\x75\x6E\x64\x27\x3B","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x63\x61\x6C\x6C\x73\x2C\x20\x53\x55\x4D\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x20\x61\x73\x20\x74\x61\x6C\x6B\x74\x69\x6D\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x63\x61\x6C\x6C\x73\x2C\x20\x53\x55\x4D\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x20\x61\x73\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x61\x62\x61\x6E\x64\x6F\x6E","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x61\x63\x74\x69\x76\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x61\x62\x61\x6E\x64\x6F\x6E\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x77\x61\x69\x74\x69\x6E\x67","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x61\x63\x74\x69\x76\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x20\x3D\x20\x30\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x20\x3D\x20\x30\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x30\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x20\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x6E\x61\x6D\x65","\x6B\x65\x79\x42\x79","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x77\x61\x69\x74\x69\x6E\x67\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x20\x49\x53\x20\x4E\x55\x4C\x4C\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x6C\x6C","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x6C\x6F\x6E\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x65\x64\x69\x74\x61\x62\x6C\x65","\x64\x65\x66\x61\x75\x6C\x74\x45\x6E\x74\x72\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x2aaf[0];var _=require(_0x2aaf[1]);var util=require(_0x2aaf[2]);var Util=require(_0x2aaf[3]);var Dashboard=require(_0x2aaf[5])[_0x2aaf[4]];var VoiceQueue=require(_0x2aaf[5])[_0x2aaf[6]];var sequelize=require(_0x2aaf[5])[_0x2aaf[7]];exports[_0x2aaf[8]]= function(_0x5260x7,_0x5260x8,_0x5260x9){return Dashboard[_0x2aaf[15]](Util[_0x2aaf[14]](_0x5260x7[_0x2aaf[13]]))[_0x2aaf[12]](function(_0x5260xb){_0x5260x8[_0x2aaf[11]](200)[_0x2aaf[10]](_0x5260xb)})[_0x2aaf[9]](function(_0x5260xa){return handleError(_0x5260x8,_0x5260xa)})};exports[_0x2aaf[16]]= function(_0x5260x7,_0x5260x8,_0x5260x9){var _0x5260xc={queues:{},outbound:{}};return VoiceQueue[_0x2aaf[49]]({attributes:[_0x2aaf[46]],raw:true})[_0x2aaf[12]](function(_0x5260xd){_0x5260xc[_0x2aaf[30]]= _[_0x2aaf[47]](_0x5260xd,_0x2aaf[46]);return sequelize[_0x2aaf[13]](_0x2aaf[48],{type:sequelize[_0x2aaf[25]][_0x2aaf[24]]})})[_0x2aaf[12]](function(_0x5260xd){_0x5260xd[_0x2aaf[32]](function(_0x5260xe){if(_0x5260xc[_0x2aaf[30]][_0x5260xe[_0x2aaf[29]]]){_0x5260xc[_0x2aaf[30]][_0x5260xe[_0x2aaf[29]]][_0x2aaf[44]]= _0x5260xe[_0x2aaf[44]]}});return sequelize[_0x2aaf[13]](_0x2aaf[45],{type:sequelize[_0x2aaf[25]][_0x2aaf[24]]})})[_0x2aaf[12]](function(_0x5260xd){_0x5260xd[_0x2aaf[32]](function(_0x5260xe){if(_0x5260xc[_0x2aaf[30]][_0x5260xe[_0x2aaf[29]]]){_0x5260xc[_0x2aaf[30]][_0x5260xe[_0x2aaf[29]]][_0x2aaf[42]]= _0x5260xe[_0x2aaf[42]]}});return sequelize[_0x2aaf[13]](_0x2aaf[43],{type:sequelize[_0x2aaf[25]][_0x2aaf[24]]})})[_0x2aaf[12]](function(_0x5260xd){_0x5260xd[_0x2aaf[32]](function(_0x5260xe){if(_0x5260xc[_0x2aaf[30]][_0x5260xe[_0x2aaf[29]]]){_0x5260xc[_0x2aaf[30]][_0x5260xe[_0x2aaf[29]]][_0x2aaf[40]]= _0x5260xe[_0x2aaf[40]]}});return sequelize[_0x2aaf[13]](_0x2aaf[41],{type:sequelize[_0x2aaf[25]][_0x2aaf[24]]})})[_0x2aaf[12]](function(_0x5260xd){_0x5260xd[_0x2aaf[32]](function(_0x5260xe){if(_0x5260xc[_0x2aaf[30]][_0x5260xe[_0x2aaf[29]]]){_0x5260xc[_0x2aaf[30]][_0x5260xe[_0x2aaf[29]]][_0x2aaf[38]]= _0x5260xe[_0x2aaf[38]]}});return sequelize[_0x2aaf[13]](_0x2aaf[39],{type:sequelize[_0x2aaf[25]][_0x2aaf[24]]})})[_0x2aaf[12]](function(_0x5260xd){_0x5260xd[_0x2aaf[32]](function(_0x5260xe){if(_0x5260xc[_0x2aaf[30]][_0x5260xe[_0x2aaf[29]]]){_0x5260xc[_0x2aaf[30]][_0x5260xe[_0x2aaf[29]]][_0x2aaf[36]]= _0x5260xe[_0x2aaf[36]]}});return sequelize[_0x2aaf[13]](_0x2aaf[37],{type:sequelize[_0x2aaf[25]][_0x2aaf[24]]})})[_0x2aaf[12]](function(_0x5260xd){_0x5260xd[_0x2aaf[32]](function(_0x5260xe){if(_0x5260xc[_0x2aaf[30]][_0x5260xe[_0x2aaf[29]]]){_0x5260xc[_0x2aaf[30]][_0x5260xe[_0x2aaf[29]]][_0x2aaf[34]]= _0x5260xe[_0x2aaf[34]]}});return sequelize[_0x2aaf[13]](_0x2aaf[35],{type:sequelize[_0x2aaf[25]][_0x2aaf[24]]})})[_0x2aaf[12]](function(_0x5260xd){_0x5260xd[_0x2aaf[32]](function(_0x5260xe){if(_0x5260xc[_0x2aaf[30]][_0x5260xe[_0x2aaf[29]]]){_0x5260xc[_0x2aaf[30]][_0x5260xe[_0x2aaf[29]]][_0x2aaf[31]]= _0x5260xe[_0x2aaf[31]]}});return sequelize[_0x2aaf[13]](_0x2aaf[33],{type:sequelize[_0x2aaf[25]][_0x2aaf[24]]})})[_0x2aaf[12]](function(_0x5260xd){_0x5260xc[_0x2aaf[19]][_0x2aaf[21]]= _0x5260xd[0][_0x2aaf[21]];return sequelize[_0x2aaf[13]](_0x2aaf[28],{type:sequelize[_0x2aaf[25]][_0x2aaf[24]]})})[_0x2aaf[12]](function(_0x5260xd){_0x5260xc[_0x2aaf[19]][_0x2aaf[26]]= _0x5260xd[0][_0x2aaf[26]];return sequelize[_0x2aaf[13]](_0x2aaf[27],{type:sequelize[_0x2aaf[25]][_0x2aaf[24]]})})[_0x2aaf[12]](function(_0x5260xd){_0x5260xc[_0x2aaf[19]][_0x2aaf[22]]= _0x5260xd[0][_0x2aaf[22]]|| 0;return sequelize[_0x2aaf[13]](_0x2aaf[23],{type:sequelize[_0x2aaf[25]][_0x2aaf[24]]})})[_0x2aaf[12]](function(_0x5260xd){_0x5260xc[_0x2aaf[19]][_0x2aaf[18]]= _0x5260xd[0][_0x2aaf[18]]|| 0;_0x5260xc[_0x2aaf[19]][_0x2aaf[20]]= _0x5260xc[_0x2aaf[19]][_0x2aaf[18]]?((_0x5260xc[_0x2aaf[19]][_0x2aaf[21]]/ _0x5260xc[_0x2aaf[19]][_0x2aaf[22]])* 100):0;return _0x5260x8[_0x2aaf[11]](200)[_0x2aaf[10]](_0x5260xc)})[_0x2aaf[9]](function(_0x5260xa){console[_0x2aaf[17]](_0x5260xa)})};exports[_0x2aaf[50]]= function(_0x5260x7,_0x5260x8){return Dashboard[_0x2aaf[49]]()[_0x2aaf[12]](function(_0x5260xf){if(!_0x5260xf){return _0x5260x8[_0x2aaf[51]](404)};return _0x5260x8[_0x2aaf[11]](200)[_0x2aaf[10]](_0x5260xf)})[_0x2aaf[9]](function(_0x5260xa){return handleError(_0x5260x8,_0x5260xa)})};exports[_0x2aaf[52]]= function(_0x5260x7,_0x5260x8){return Dashboard[_0x2aaf[55]](_0x5260x7[_0x2aaf[54]][_0x2aaf[53]])[_0x2aaf[12]](function(_0x5260x10){if(!_0x5260x10){return _0x5260x8[_0x2aaf[51]](404)};return _0x5260x8[_0x2aaf[10]](_0x5260x10)})[_0x2aaf[9]](function(_0x5260xa){return handleError(_0x5260x8,_0x5260xa)})};exports[_0x2aaf[56]]= function(_0x5260x7,_0x5260x8){return Dashboard[_0x2aaf[56]](_0x5260x7[_0x2aaf[57]])[_0x2aaf[12]](function(_0x5260x10){return _0x5260x8[_0x2aaf[11]](201)[_0x2aaf[10]](_0x5260x10)})[_0x2aaf[9]](function(_0x5260xa){return handleError(_0x5260x8,_0x5260xa)})};exports[_0x2aaf[58]]= function(_0x5260x7,_0x5260x8){return Dashboard[_0x2aaf[55]](_0x5260x7[_0x2aaf[54]][_0x2aaf[53]])[_0x2aaf[12]](function(_0x5260x10){var _0x5260x11=_0x5260x10[_0x2aaf[59]];delete _0x5260x11[_0x2aaf[53]];_0x5260x11[_0x2aaf[60]]= true;_0x5260x11[_0x2aaf[61]]= false;_0x5260x11[_0x2aaf[46]]= _0x5260x7[_0x2aaf[57]][_0x2aaf[46]]|| _0x5260x11[_0x2aaf[46]];return Dashboard[_0x2aaf[56]](_0x5260x11)})[_0x2aaf[12]](function(_0x5260x10){return _0x5260x8[_0x2aaf[11]](201)[_0x2aaf[10]](_0x5260x10)})[_0x2aaf[9]](function(_0x5260xa){return handleError(_0x5260x8,_0x5260xa)})};exports[_0x2aaf[62]]= function(_0x5260x7,_0x5260x8){if(_0x5260x7[_0x2aaf[57]][_0x2aaf[53]]){delete _0x5260x7[_0x2aaf[57]][_0x2aaf[53]]};return Dashboard[_0x2aaf[55]](_0x5260x7[_0x2aaf[54]][_0x2aaf[53]])[_0x2aaf[12]](function(_0x5260x10){if(!_0x5260x10){return _0x5260x8[_0x2aaf[51]](404)};var _0x5260x12=_[_0x2aaf[63]](_0x5260x10,_0x5260x7[_0x2aaf[57]]);return _0x5260x12[_0x2aaf[64]]()})[_0x2aaf[12]](function(_0x5260x10){return _0x5260x8[_0x2aaf[11]](200)[_0x2aaf[10]](_0x5260x10)})[_0x2aaf[9]](function(_0x5260xa){return handleError(_0x5260x8,_0x5260xa)})};exports[_0x2aaf[65]]= function(_0x5260x7,_0x5260x8){return Dashboard[_0x2aaf[55]](_0x5260x7[_0x2aaf[54]][_0x2aaf[53]])[_0x2aaf[12]](function(_0x5260x10){if(!_0x5260x10){return _0x5260x8[_0x2aaf[51]](404)};return _0x5260x10[_0x2aaf[65]]()})[_0x2aaf[12]](function(){return _0x5260x8[_0x2aaf[51]](204)})[_0x2aaf[9]](function(_0x5260xa){return handleError(_0x5260x8,_0x5260xa)})};exports[_0x2aaf[66]]= function(_0x5260x7,_0x5260x8){return Dashboard[_0x2aaf[65]]({where:{id:_0x5260x7[_0x2aaf[13]][_0x2aaf[67]]},individualHooks:true})[_0x2aaf[12]](function(){return _0x5260x8[_0x2aaf[51]](204)})[_0x2aaf[9]](function(_0x5260xa){return handleError(_0x5260x8,_0x5260xa)})};function handleError(_0x5260x8,_0x5260xa){return _0x5260x8[_0x2aaf[11]](500)[_0x2aaf[10]](_0x5260xa)}
\ No newline at end of file
diff --git a/server/api/dashboard/dashboard.events.js b/server/api/dashboard/dashboard.events.js
index 2097ae7..b5cf21f 100644
--- a/server/api/dashboard/dashboard.events.js
+++ b/server/api/dashboard/dashboard.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Dashboard = require('../../models').Dashboard;
-
-var DashboardEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-DashboardEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Dashboard.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    DashboardEvents.emit(event + ':' + doc._id, doc);
-    DashboardEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = DashboardEvents;
+var _0xf0d8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xf0d8[0];const EventEmitter=require(_0xf0d8[1]);const Dashboard=require(_0xf0d8[3])[_0xf0d8[2]];var DashboardEvents= new EventEmitter();DashboardEvents[_0xf0d8[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xf0d8[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xf0d8[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xf0d8[6]};for(var e in events){var event=events[e];Dashboard[_0xf0d8[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6c0ax8,_0x6c0ax9,_0x6c0axa){DashboardEvents[_0xf0d8[10]](event+ _0xf0d8[8]+ _0x6c0ax8[_0xf0d8[9]],_0x6c0ax8);DashboardEvents[_0xf0d8[10]](event,_0x6c0ax8);_0x6c0axa(null)}}module[_0xf0d8[11]]= DashboardEvents
\ No newline at end of file
diff --git a/server/api/dashboard/dashboard.socket.js b/server/api/dashboard/dashboard.socket.js
index f23e2a0..8b4ac6a 100644
--- a/server/api/dashboard/dashboard.socket.js
+++ b/server/api/dashboard/dashboard.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const DashboardEvents = require('./dashboard.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('dashboard:' + event, socket);
-
-    DashboardEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    DashboardEvents.removeListener(event, listener);
-  };
-}
+var _0x5e05=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x5e05[0];const DashboardEvents=require(_0x5e05[1]);var events=[_0x5e05[2],_0x5e05[3]];exports[_0x5e05[4]]= function(_0x57c1x3){for(var _0x57c1x4=0,_0x57c1x5=events[_0x5e05[5]];_0x57c1x4< _0x57c1x5;_0x57c1x4++){var _0x57c1x6=events[_0x57c1x4];var _0x57c1x7=createListener(_0x5e05[6]+ _0x57c1x6,_0x57c1x3);DashboardEvents[_0x5e05[7]](_0x57c1x6,_0x57c1x7);_0x57c1x3[_0x5e05[7]](_0x5e05[8],removeListener(_0x57c1x6,_0x57c1x7))}};function createListener(_0x57c1x6,_0x57c1x3){return function(_0x57c1x9){_0x57c1x3[_0x5e05[9]](_0x57c1x6,_0x57c1x9)}}function removeListener(_0x57c1x6,_0x57c1x7){return function(){DashboardEvents[_0x5e05[10]](_0x57c1x6,_0x57c1x7)}}
\ No newline at end of file
diff --git a/server/api/dashboard/index.js b/server/api/dashboard/index.js
index 5938cba..d925d17 100644
--- a/server/api/dashboard/index.js
+++ b/server/api/dashboard/index.js
@@ -1,19 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./dashboard.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([2], ['admin', 'agent']), controller.index);
-router.get('/all', auth.isAuthenticated(), auth.hasModule([2], ['admin']), controller.all);
-router.get('/voice/init', auth.isAuthenticated(), auth.hasModule([2], ['admin', 'agent']), controller.init);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([2], ['admin', 'agent']), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasModule([2], ['admin']), controller.create);
-router.post('/:id/clone', auth.isAuthenticated(), auth.hasModule([2], ['admin']), controller.clone);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([2], ['admin']), controller.update);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([2], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([2], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0x5d8c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x61\x6C\x6C","\x61\x6C\x6C","\x2F\x76\x6F\x69\x63\x65\x2F\x69\x6E\x69\x74","\x69\x6E\x69\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x63\x6C\x6F\x6E\x65","\x63\x6C\x6F\x6E\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x5d8c[0];var express=require(_0x5d8c[1]);var controller=require(_0x5d8c[2]);var auth=require(_0x5d8c[3]);var router=express.Router();router[_0x5d8c[10]](_0x5d8c[4],auth[_0x5d8c[5]](),auth[_0x5d8c[8]]([2],[_0x5d8c[6],_0x5d8c[7]]),controller[_0x5d8c[9]]);router[_0x5d8c[10]](_0x5d8c[11],auth[_0x5d8c[5]](),auth[_0x5d8c[8]]([2],[_0x5d8c[6]]),controller[_0x5d8c[12]]);router[_0x5d8c[10]](_0x5d8c[13],auth[_0x5d8c[5]](),auth[_0x5d8c[8]]([2],[_0x5d8c[6],_0x5d8c[7]]),controller[_0x5d8c[14]]);router[_0x5d8c[10]](_0x5d8c[15],auth[_0x5d8c[5]](),auth[_0x5d8c[8]]([2],[_0x5d8c[6],_0x5d8c[7]]),controller[_0x5d8c[16]]);router[_0x5d8c[18]](_0x5d8c[4],auth[_0x5d8c[5]](),auth[_0x5d8c[8]]([2],[_0x5d8c[6]]),controller[_0x5d8c[17]]);router[_0x5d8c[18]](_0x5d8c[19],auth[_0x5d8c[5]](),auth[_0x5d8c[8]]([2],[_0x5d8c[6]]),controller[_0x5d8c[20]]);router[_0x5d8c[22]](_0x5d8c[15],auth[_0x5d8c[5]](),auth[_0x5d8c[8]]([2],[_0x5d8c[6]]),controller[_0x5d8c[21]]);router[_0x5d8c[24]](_0x5d8c[4],auth[_0x5d8c[5]](),auth[_0x5d8c[8]]([2],[_0x5d8c[6]]),controller[_0x5d8c[23]]);router[_0x5d8c[24]](_0x5d8c[15],auth[_0x5d8c[5]](),auth[_0x5d8c[8]]([2],[_0x5d8c[6]]),controller[_0x5d8c[25]]);module[_0x5d8c[26]]= router
\ No newline at end of file
diff --git a/server/api/default_metric/default_metric.controller.js b/server/api/default_metric/default_metric.controller.js
index 321849c..f5bcac2 100644
--- a/server/api/default_metric/default_metric.controller.js
+++ b/server/api/default_metric/default_metric.controller.js
@@ -1,158 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var DefaultMetric = require('../../models').DefaultMetric;
-var Metric = require('../../models').Metric;
-var util = require('util');
-var Util = require('../../config/util');
-var sequelize = require('../../models').sequelize;
-var sr = require('simple-random');
-
-// Get list of metrics
-exports.index = function(req, res, next) {
-  return DefaultMetric
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getMetricsByTable = function(req, res) {
-  return DefaultMetric
-    .findAll({
-      where: {
-        table: req.query.table
-      }
-    })
-    .then(function(metrics) {
-      if (!metrics) {
-        return res.sendStatus(404);
-      }
-      return res.status(200).send({
-        count: metrics.length,
-        rows: metrics
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.cloneMetric = function(req, res) {
-  return DefaultMetric
-    .findById(req.params.id)
-    .then(function(metric) {
-      if (!metric) {
-        return res.sendStatus(404);
-      }
-      delete metric.dataValues.id;
-      metric.dataValues.name += '_' + sr({
-        length: 5
-      })
-      return Metric.create(metric.dataValues);
-    })
-    .then(function() {
-      return res.sendStatus(201);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// // Get a single metric
-// exports.show = function(req, res) {
-//   return Metric
-//     .findById(req.params.id)
-//     .then(function(metric) {
-//       if (!metric) {
-//         return res.sendStatus(404);
-//       }
-//       return res.send(metric);
-//     })
-//     .catch(function(err) {
-//       return handleError(res, err);
-//     });
-// };
-//
-// // Creates a new metric in the DB.
-// exports.create = function(req, res) {
-//   return Metric
-//     .create(req.body)
-//     .then(function(metric) {
-//       return res.status(201).send(metric);
-//     })
-//     .catch(sequelize.UniqueConstraintError, function(err) {
-//       err.translatedMessage = 'MESSAGE_EXIST_METRIC';
-//       err.message = 'A Metric with that name already exists';
-//       return res.status(500).send(err);
-//     })
-//     .catch(function(err) {
-//       return handleError(res, err);
-//     });
-// };
-//
-// // Updates an existing metric in the DB.
-// exports.update = function(req, res) {
-//   return Metric
-//     .findById(req.params.id)
-//     .then(function(metric) {
-//       if (!metric) {
-//         return res.sendStatus(404);
-//       }
-//       var updated = _.merge(metric, req.body);
-//       return updated.save();
-//     })
-//     .then(function() {
-//       return res.sendStatus(200);
-//     })
-//     .catch(sequelize.UniqueConstraintError, function(err) {
-//       err.translatedMessage = 'MESSAGE_EXIST_METRIC';
-//       err.message = 'A Metric with that name already exists';
-//       return res.status(500).send(err);
-//     })
-//     .catch(function(err) {
-//       console.log(err);
-//       return handleError(res, err);
-//     });
-// };
-//
-// // Deletes a metric from the DB.
-// exports.destroy = function(req, res) {
-//   return Metric
-//     .findById(req.params.id)
-//     .then(function(metric) {
-//       if (!metric) {
-//         return res.sendStatus(404);
-//       }
-//       return metric.destroy();
-//     })
-//     .then(function() {
-//       return res.sendStatus(204);
-//     })
-//     .catch(function(err) {
-//       return handleError(res, err);
-//     });
-// };
-//
-// exports.bulkDestroy = function(req, res) {
-//   return Metric
-//     .destroy({
-//       where: {
-//         id: req.query.ids
-//       },
-//       individualHooks: true
-//     })
-//     .then(function() {
-//       return res.sendStatus(204);
-//     })
-//     .catch(function(err) {
-//       return handleError(res, err);
-//     });
-// };
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x3926=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x65\x74\x72\x69\x63","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x67\x65\x74\x4D\x65\x74\x72\x69\x63\x73\x42\x79\x54\x61\x62\x6C\x65","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6C\x65\x6E\x67\x74\x68","\x74\x61\x62\x6C\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x6C\x6F\x6E\x65\x4D\x65\x74\x72\x69\x63","\x69\x64","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6E\x61\x6D\x65","\x5F","\x63\x72\x65\x61\x74\x65","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64"];_0x3926[0];var _=require(_0x3926[1]);var DefaultMetric=require(_0x3926[3])[_0x3926[2]];var Metric=require(_0x3926[3])[_0x3926[4]];var util=require(_0x3926[5]);var Util=require(_0x3926[6]);var sequelize=require(_0x3926[3])[_0x3926[7]];var sr=require(_0x3926[8]);exports[_0x3926[9]]= function(_0xd23ex8,_0xd23ex9,_0xd23exa){return DefaultMetric[_0x3926[16]](Util[_0x3926[15]](_0xd23ex8[_0x3926[14]]))[_0x3926[13]](function(_0xd23exc){return _0xd23ex9[_0x3926[12]](200)[_0x3926[11]](_0xd23exc)})[_0x3926[10]](function(_0xd23exb){return handleError(_0xd23ex9,_0xd23exb)})};exports[_0x3926[17]]= function(_0xd23ex8,_0xd23ex9){return DefaultMetric[_0x3926[21]]({where:{table:_0xd23ex8[_0x3926[14]][_0x3926[20]]}})[_0x3926[13]](function(_0xd23exd){if(!_0xd23exd){return _0xd23ex9[_0x3926[18]](404)};return _0xd23ex9[_0x3926[12]](200)[_0x3926[11]]({count:_0xd23exd[_0x3926[19]],rows:_0xd23exd})})[_0x3926[10]](function(_0xd23exb){return handleError(_0xd23ex9,_0xd23exb)})};exports[_0x3926[22]]= function(_0xd23ex8,_0xd23ex9){return DefaultMetric[_0x3926[29]](_0xd23ex8[_0x3926[28]][_0x3926[23]])[_0x3926[13]](function(_0xd23exe){if(!_0xd23exe){return _0xd23ex9[_0x3926[18]](404)};delete _0xd23exe[_0x3926[24]][_0x3926[23]];_0xd23exe[_0x3926[24]][_0x3926[25]]+= _0x3926[26]+ sr({length:5});return Metric[_0x3926[27]](_0xd23exe[_0x3926[24]])})[_0x3926[13]](function(){return _0xd23ex9[_0x3926[18]](201)})[_0x3926[10]](function(_0xd23exb){return handleError(_0xd23ex9,_0xd23exb)})};function handleError(_0xd23ex9,_0xd23exb){return _0xd23ex9[_0x3926[12]](500)[_0x3926[11]](_0xd23exb)}
\ No newline at end of file
diff --git a/server/api/default_metric/index.js b/server/api/default_metric/index.js
index 4608ee8..ed8205d 100644
--- a/server/api/default_metric/index.js
+++ b/server/api/default_metric/index.js
@@ -1,19 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./default_metric.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index);
-router.get('/table', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.getMetricsByTable);
-router.get('/:id/clone', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.cloneMetric);
-// router.get('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.show);
-// router.post('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.create);
-// router.put('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.update);
-// router.patch('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.update);
-// router.delete('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.bulkDestroy);
-// router.delete('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0x65ad=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x6D\x65\x74\x72\x69\x63\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x74\x61\x62\x6C\x65","\x67\x65\x74\x4D\x65\x74\x72\x69\x63\x73\x42\x79\x54\x61\x62\x6C\x65","\x2F\x3A\x69\x64\x2F\x63\x6C\x6F\x6E\x65","\x63\x6C\x6F\x6E\x65\x4D\x65\x74\x72\x69\x63","\x65\x78\x70\x6F\x72\x74\x73"];_0x65ad[0];var express=require(_0x65ad[1]);var controller=require(_0x65ad[2]);var auth=require(_0x65ad[3]);var router=express.Router();router[_0x65ad[9]](_0x65ad[4],auth[_0x65ad[5]](),auth[_0x65ad[7]]([17],[_0x65ad[6]]),controller[_0x65ad[8]]);router[_0x65ad[9]](_0x65ad[10],auth[_0x65ad[5]](),auth[_0x65ad[7]]([17],[_0x65ad[6]]),controller[_0x65ad[11]]);router[_0x65ad[9]](_0x65ad[12],auth[_0x65ad[5]](),auth[_0x65ad[7]]([17],[_0x65ad[6]]),controller[_0x65ad[13]]);module[_0x65ad[14]]= router
\ No newline at end of file
diff --git a/server/api/default_report/default_report.controller.js b/server/api/default_report/default_report.controller.js
index ea51157..00b32ca 100644
--- a/server/api/default_report/default_report.controller.js
+++ b/server/api/default_report/default_report.controller.js
@@ -1,392 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var DefaultReport = require('../../models').DefaultReport;
-var ReportField = require('../../models').ReportField;
-var Metric = require('../../models').Metric;
-var sequelize = require('../../models').sequelize;
-var CustomReport = require('../../models').CustomReport;
-var ExtractedReport = require('../../models').ExtractedReport;
-var extractUtils = require('../../utils/report_extraction');
-var reportBuildUtils = require('../../utils/report_build');
-var Util = require('../../config/util');
-var moment = require('moment');
-var cp = require('child_process');
-var sr = require('simple-random');
-var ReportTree = require('../../models').ReportTree;
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  return DefaultReport
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single report
-exports.export = function(req, res) {
-  return DefaultReport
-    .scope({
-      method: ['exportFields', {
-        DefaultReportId: req.params.id
-      }]
-    }) //add where condition on customreport id
-    .findById(req.params.id, {
-      attributes: ['conditions', 'description', 'name', 'parent', 'table']
-    })
-    .then(function(report) {
-      if (!report) {
-        return res.sendStatus(404);
-      }
-      return res.send(report);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-
-exports.getReportQuery = function(req, res) {
-  return Promise
-    .all([])
-    .then(getQuery(req, res))
-    .then(function(query) {
-      if (query) {
-        switch (query) {
-          case 'permission':
-            query = 'no sufficient queue permissions for the user';
-            break;
-          default:
-        }
-      }
-      res.status(200).send({
-        query: query
-      });
-    })
-    .catch(function(err) {
-      console.log('Error getting query from api:', err);
-    });
-}
-
-function getQuery(req, res) {
-  var _report;
-  return function() {
-    return DefaultReport
-      .scope('fields')
-      .findById(req.params.id)
-      .then(function(report) {
-        console.log('found report');
-        if (!report) {
-          return res.sendStatus(404);
-        }
-        if (req.query.daily && req.query.daily === 'true') {
-          req.query.startDate = moment().format('YYYY-MM-DD');
-          req.query.endDate = moment().format('YYYY-MM-DD');
-          report.dataValues.table = report.dataValues.table.replace(
-            '_history', '');
-        }
-        delete req.query.daily;
-        _report = report.dataValues;
-        return _report.table;
-      })
-      .then(reportBuildUtils.buildFilter(req.user))
-      .then(function(filter) {
-        return [filter, _report];
-      })
-      .spread(reportBuildUtils.buildQuery(req.query))
-  }
-}
-
-exports.preview = function(req, res) {
-  var _countAll;
-  return Promise
-    .all([])
-    .then(getQuery(req, res))
-    .then(reportBuildUtils.checkQuery())
-    .then(function(results) {
-      if (results && _.isArray(results)) {
-        _countAll = results.length;
-        if (req.query.limit) {
-          results = _(results).slice(req.query.offset || 0).take(req.query.limit).value();
-        }
-        _.forEach(results, function(row) {
-          _.forOwn(row, function(property, key) {
-            if (property instanceof Date) {
-              row[key] = moment(property).format("YYYY-MM-DD HH:mm:ss").toString();
-            }
-          });
-        });
-        res.status(200).send({
-          rows: results,
-          count: _countAll
-        });
-      } else {
-        return handleError(res, {
-          message: results || 'query error'
-        });
-      }
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.extractPdf = function(req, res) {
-  // console.log('extractPdf api function');
-  docExtract(req, res, 'PDF')
-};
-
-exports.extractCsv = function(req, res) {
-  // console.log('extractCsv api function');
-  docExtract(req, res, 'CSV');
-};
-
-function docExtract(req, res, typeFunction) {
-  var report;
-  // console.log('common docExtract api function');
-  DefaultReport //DO NOT ADD RETURN CAUSE THE EXTRACTING FUNCTION WILL KEEP EXTRACTING AFTER THE API HAS RETURNED
-    .scope('fields')
-    .findById(req.params.id)
-    .then(function(_report) {
-      if (!_report) {
-        return res.sendStatus(404);
-      }
-      report = _report;
-      return ReportTree
-        .findById(1);
-    })
-    .then(function(tree) {
-      tree = JSON.parse(tree.tree);
-      var folder = _.find(tree, {
-        id: report.parent
-      });
-      var path = getReportPath(folder, tree, report.name);
-      // console.log('found the report, creating the new DB row for extracted reports..');
-      //CREATE A DB ROW IN A TABLE WITH THE REPORT INFO, QUERY DATES, AND THE STATUS 'ELABORATING'
-      if (req.query.daily && req.query.daily === 'true') {
-        req.query.startDate = moment().format('YYYY-MM-DD');
-        req.query.endDate = moment().format('YYYY-MM-DD');
-        report.dataValues.table = report.dataValues.table.replace('_history', '');
-      }
-      delete req.query.daily;
-      return [report, ExtractedReport.create({
-        name: path,
-        startDate: req.query.startDate ? req.query.startDate + (req.query.startTime ? ' ' + req.query.startTime : '00:00') : null,
-        endDate: req.query.endDate ? req.query.endDate + (req.query.endTime ? ' ' + req.query.endTime : '23:59') : null,
-        output: typeFunction,
-        UserId: req.user.id
-      })]
-    })
-    .spread(function(report, extractedReport) {
-      // console.log('created new extracted reports db entry, calling external extraction function: ' + typeFunction);
-      var child = cp.fork(__dirname + '/../../utils/report_extraction.js');
-      child.on('message', function(data) {
-        console.log('child message', data);
-        child.kill();
-      }).on('close', function() {
-        console.log('child close');
-      }).on('error', function(err) {
-        console.log('child error', err);
-      });
-      child.send({
-        report: report,
-        query: req.query,
-        extractedId: extractedReport.id,
-        user: req.user,
-        type: typeFunction
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-  return res.sendStatus(200);
-}
-
-function getReportPath(folder, tree, path) {
-  path = folder.text + '/ ' + path;
-  if (folder.parent === '#') {
-    return path;
-  } else {
-    return getReportPath(_.find(tree, {
-      id: folder.parent
-    }), tree, path);
-  }
-}
-
-// Get a single report
-exports.show = function(req, res) {
-  return DefaultReport
-    .findById(req.params.id, {
-      include: [{
-        all: true
-      }]
-    })
-    .then(function(report) {
-      if (!report) {
-        return res.sendStatus(404);
-      }
-      return res.send(report);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Copy a default report
-exports.copy = function(req, res) {
-  var _fields;
-  return sequelize.transaction(function(t) {
-      return DefaultReport
-        .scope({
-          method: ['exportFields', {
-            DefaultReportId: req.params.id
-          }]
-        })
-        .findById(req.params.id)
-        .then(function(report) {
-          if (!report) {
-            return res.sendStatus(404);
-          }
-          var newReport = report.dataValues;
-          console.log(newReport);
-          delete newReport.id;
-          delete newReport.createdAt;
-          delete newReport.updatedAt;
-          newReport.parent = req.body.parent;
-          _fields = _.map(newReport.Fields, 'dataValues');
-          return CustomReport.create(newReport, {
-            transaction: t
-          })
-        })
-        .then(function(report) {
-          return [report, _fields];
-        })
-        .spread(createCopyFields(t));
-    })
-    .then(function() {
-      return res.sendStatus(201);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-function createCopyFields(t) {
-  return function(report, fields) {
-    if (fields && Array.isArray(fields) && fields.length) {
-      var tableModel = reportBuildUtils.getTable(report.table);
-      if (tableModel) {
-        var _tableFields;
-        return tableModel
-          .describe()
-          .then(function(tableFields) {
-            _tableFields = _.keys(tableFields);
-            var bulkFields = [];
-            var groupedFields = _.groupBy(fields, 'DefaultMetricId');
-            _.forOwn(groupedFields, function(value, key) {
-              if (key !== 'undefined' && key !== 'null') {
-                value[0].DefaultMetric.ReportFields.forEach(function(elem) {
-                  elem.CustomReportId = report.id;
-                });
-                value[0].DefaultMetric.name += '_' + sr({
-                  length: 5
-                });
-                bulkFields.push(Metric
-                  .create(value[0].DefaultMetric.dataValues, {
-                    include: [{
-                      model: ReportField,
-                      as: 'ReportFields'
-                    }],
-                    transaction: t
-                  }));
-              } else {
-                value.forEach(function(elem) {
-                  if (_.includes(_tableFields, elem.field) || elem.custom) {
-                    elem.CustomReportId = report.id;
-                    bulkFields.push(ReportField
-                      .create(elem, {
-                        transaction: t
-                      }));
-                  } else {
-                    throw new sequelize.Error("The field " + elem.field +
-                      " you specified does not exist in the table"
-                    );
-                  }
-                });
-              }
-            });
-            return bulkFields;
-          })
-          .all();
-      } else {
-        throw new sequelize.Error(
-          "You have not specified the table or the table does not exist");
-      }
-    }
-  }
-}
-
-
-// Creates a new report in the DB.
-exports.create = function(req, res) {
-  return DefaultReport
-    .create(req.body)
-    .then(function(report) {
-      return res.status(201).send(report);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing report in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return DefaultReport
-    .findById(req.params.id)
-    .then(function(report) {
-      if (!report) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(report, req.body);
-      return updated.save();
-    })
-    .then(function(report) {
-      return res.status(200).send(report);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a report from the DB.
-exports.destroy = function(req, res) {
-  return DefaultReport
-    .findById(req.params.id)
-    .then(function(report) {
-      if (!report) {
-        return res.sendStatus(404);
-      }
-      return report.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x9fb9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x4D\x65\x74\x72\x69\x63","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x65\x78\x70\x6F\x72\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x70\x61\x72\x65\x6E\x74","\x74\x61\x62\x6C\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x65\x78\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\x67\x65\x74\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x72\x79","\x45\x72\x72\x6F\x72\x20\x67\x65\x74\x74\x69\x6E\x67\x20\x71\x75\x65\x72\x79\x20\x66\x72\x6F\x6D\x20\x61\x70\x69\x3A","\x6C\x6F\x67","\x6E\x6F\x20\x73\x75\x66\x66\x69\x63\x69\x65\x6E\x74\x20\x71\x75\x65\x75\x65\x20\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x75\x73\x65\x72","\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E","\x61\x6C\x6C","\x62\x75\x69\x6C\x64\x51\x75\x65\x72\x79","\x73\x70\x72\x65\x61\x64","\x75\x73\x65\x72","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","\x66\x6F\x75\x6E\x64\x20\x72\x65\x70\x6F\x72\x74","\x64\x61\x69\x6C\x79","\x74\x72\x75\x65","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44","\x66\x6F\x72\x6D\x61\x74","\x65\x6E\x64\x44\x61\x74\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x5F\x68\x69\x73\x74\x6F\x72\x79","","\x72\x65\x70\x6C\x61\x63\x65","\x66\x69\x65\x6C\x64\x73","\x70\x72\x65\x76\x69\x65\x77","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6D\x69\x74","\x76\x61\x6C\x75\x65","\x74\x61\x6B\x65","\x6F\x66\x66\x73\x65\x74","\x73\x6C\x69\x63\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x4F\x77\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x71\x75\x65\x72\x79\x20\x65\x72\x72\x6F\x72","\x63\x68\x65\x63\x6B\x51\x75\x65\x72\x79","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x50\x44\x46","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x43\x53\x56","\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6A\x73","\x66\x6F\x72\x6B","\x65\x72\x72\x6F\x72","\x63\x68\x69\x6C\x64\x20\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x63\x68\x69\x6C\x64\x20\x63\x6C\x6F\x73\x65","\x6D\x65\x73\x73\x61\x67\x65","\x63\x68\x69\x6C\x64\x20\x6D\x65\x73\x73\x61\x67\x65","\x6B\x69\x6C\x6C","\x74\x72\x65\x65","\x70\x61\x72\x73\x65","\x66\x69\x6E\x64","\x73\x74\x61\x72\x74\x54\x69\x6D\x65","\x20","\x30\x30\x3A\x30\x30","\x65\x6E\x64\x54\x69\x6D\x65","\x32\x33\x3A\x35\x39","\x63\x72\x65\x61\x74\x65","\x74\x65\x78\x74","\x2F\x20","\x23","\x73\x68\x6F\x77","\x63\x6F\x70\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x62\x6F\x64\x79","\x6D\x61\x70","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x54\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64","\x67\x72\x6F\x75\x70\x42\x79","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6E\x75\x6C\x6C","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63","\x5F","\x70\x75\x73\x68","\x66\x69\x65\x6C\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x63\x75\x73\x74\x6F\x6D","\x54\x68\x65\x20\x66\x69\x65\x6C\x64\x20","\x20\x79\x6F\x75\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x59\x6F\x75\x20\x68\x61\x76\x65\x20\x6E\x6F\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x6F\x72\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x9fb9[0];var _=require(_0x9fb9[1]);var util=require(_0x9fb9[2]);var DefaultReport=require(_0x9fb9[4])[_0x9fb9[3]];var ReportField=require(_0x9fb9[4])[_0x9fb9[5]];var Metric=require(_0x9fb9[4])[_0x9fb9[6]];var sequelize=require(_0x9fb9[4])[_0x9fb9[7]];var CustomReport=require(_0x9fb9[4])[_0x9fb9[8]];var ExtractedReport=require(_0x9fb9[4])[_0x9fb9[9]];var extractUtils=require(_0x9fb9[10]);var reportBuildUtils=require(_0x9fb9[11]);var Util=require(_0x9fb9[12]);var moment=require(_0x9fb9[13]);var cp=require(_0x9fb9[14]);var sr=require(_0x9fb9[15]);var ReportTree=require(_0x9fb9[4])[_0x9fb9[16]];exports[_0x9fb9[17]]= function(_0x648dx10,_0x648dx11,_0x648dx12){return DefaultReport[_0x9fb9[24]](Util[_0x9fb9[23]](_0x648dx10[_0x9fb9[22]]))[_0x9fb9[21]](function(_0x648dx14){_0x648dx11[_0x9fb9[20]](200)[_0x9fb9[19]](_0x648dx14)})[_0x9fb9[18]](function(_0x648dx13){return handleError(_0x648dx11,_0x648dx13)})};exports[_0x9fb9[25]]= function(_0x648dx10,_0x648dx11){return DefaultReport[_0x9fb9[36]]({method:[_0x9fb9[35],{DefaultReportId:_0x648dx10[_0x9fb9[28]][_0x9fb9[27]]}]})[_0x9fb9[34]](_0x648dx10[_0x9fb9[28]][_0x9fb9[27]],{attributes:[_0x9fb9[29],_0x9fb9[30],_0x9fb9[31],_0x9fb9[32],_0x9fb9[33]]})[_0x9fb9[21]](function(_0x648dx15){if(!_0x648dx15){return _0x648dx11[_0x9fb9[26]](404)};return _0x648dx11[_0x9fb9[19]](_0x648dx15)})[_0x9fb9[18]](function(_0x648dx13){return handleError(_0x648dx11,_0x648dx13)})};exports[_0x9fb9[37]]= function(_0x648dx10,_0x648dx11){return Promise[_0x9fb9[42]]([])[_0x9fb9[21]](getQuery(_0x648dx10,_0x648dx11))[_0x9fb9[21]](function(_0x648dx16){if(_0x648dx16){switch(_0x648dx16){case _0x9fb9[41]:_0x648dx16= _0x9fb9[40];break;default:}};_0x648dx11[_0x9fb9[20]](200)[_0x9fb9[19]]({query:_0x648dx16})})[_0x9fb9[18]](function(_0x648dx13){console[_0x9fb9[39]](_0x9fb9[38],_0x648dx13)})};function getQuery(_0x648dx10,_0x648dx11){var _0x648dx18;return function(){return DefaultReport[_0x9fb9[36]](_0x9fb9[58])[_0x9fb9[34]](_0x648dx10[_0x9fb9[28]][_0x9fb9[27]])[_0x9fb9[21]](function(_0x648dx15){console[_0x9fb9[39]](_0x9fb9[47]);if(!_0x648dx15){return _0x648dx11[_0x9fb9[26]](404)};if(_0x648dx10[_0x9fb9[22]][_0x9fb9[48]]&& _0x648dx10[_0x9fb9[22]][_0x9fb9[48]]=== _0x9fb9[49]){_0x648dx10[_0x9fb9[22]][_0x9fb9[50]]= moment()[_0x9fb9[52]](_0x9fb9[51]);_0x648dx10[_0x9fb9[22]][_0x9fb9[53]]= moment()[_0x9fb9[52]](_0x9fb9[51]);_0x648dx15[_0x9fb9[54]][_0x9fb9[33]]= _0x648dx15[_0x9fb9[54]][_0x9fb9[33]][_0x9fb9[57]](_0x9fb9[55],_0x9fb9[56])};delete _0x648dx10[_0x9fb9[22]][_0x9fb9[48]];_0x648dx18= _0x648dx15[_0x9fb9[54]];return _0x648dx18[_0x9fb9[33]]})[_0x9fb9[21]](reportBuildUtils[_0x9fb9[46]](_0x648dx10[_0x9fb9[45]]))[_0x9fb9[21]](function(_0x648dx19){return [_0x648dx19,_0x648dx18]})[_0x9fb9[44]](reportBuildUtils[_0x9fb9[43]](_0x648dx10[_0x9fb9[22]]))}}exports[_0x9fb9[59]]= function(_0x648dx10,_0x648dx11){var _0x648dx1a;return Promise[_0x9fb9[42]]([])[_0x9fb9[21]](getQuery(_0x648dx10,_0x648dx11))[_0x9fb9[21]](reportBuildUtils[_0x9fb9[71]]())[_0x9fb9[21]](function(_0x648dx1b){if(_0x648dx1b&& _[_0x9fb9[60]](_0x648dx1b)){_0x648dx1a= _0x648dx1b[_0x9fb9[61]];if(_0x648dx10[_0x9fb9[22]][_0x9fb9[62]]){_0x648dx1b= _(_0x648dx1b)[_0x9fb9[66]](_0x648dx10[_0x9fb9[22]][_0x9fb9[65]]|| 0)[_0x9fb9[64]](_0x648dx10[_0x9fb9[22]][_0x9fb9[62]])[_0x9fb9[63]]()};_[_0x9fb9[69]](_0x648dx1b,function(_0x648dx1c){_[_0x9fb9[68]](_0x648dx1c,function(_0x648dx1d,_0x648dx1e){if(_0x648dx1d instanceof  Date){_0x648dx1c[_0x648dx1e]= moment(_0x648dx1d)[_0x9fb9[52]](_0x9fb9[67]).toString()}})});_0x648dx11[_0x9fb9[20]](200)[_0x9fb9[19]]({rows:_0x648dx1b,count:_0x648dx1a})}else {return handleError(_0x648dx11,{message:_0x648dx1b|| _0x9fb9[70]})}})[_0x9fb9[18]](function(_0x648dx13){console[_0x9fb9[39]](_0x648dx13);return handleError(_0x648dx11,_0x648dx13)})};exports[_0x9fb9[72]]= function(_0x648dx10,_0x648dx11){docExtract(_0x648dx10,_0x648dx11,_0x9fb9[73])};exports[_0x9fb9[74]]= function(_0x648dx10,_0x648dx11){docExtract(_0x648dx10,_0x648dx11,_0x9fb9[75])};function docExtract(_0x648dx10,_0x648dx11,_0x648dx20){var _0x648dx15;DefaultReport[_0x9fb9[36]](_0x9fb9[58])[_0x9fb9[34]](_0x648dx10[_0x9fb9[28]][_0x9fb9[27]])[_0x9fb9[21]](function(_0x648dx18){if(!_0x648dx18){return _0x648dx11[_0x9fb9[26]](404)};_0x648dx15= _0x648dx18;return ReportTree[_0x9fb9[34]](1)})[_0x9fb9[21]](function(_0x648dx24){_0x648dx24= JSON[_0x9fb9[87]](_0x648dx24[_0x9fb9[86]]);var _0x648dx25=_[_0x9fb9[88]](_0x648dx24,{id:_0x648dx15[_0x9fb9[32]]});var _0x648dx26=getReportPath(_0x648dx25,_0x648dx24,_0x648dx15[_0x9fb9[31]]);if(_0x648dx10[_0x9fb9[22]][_0x9fb9[48]]&& _0x648dx10[_0x9fb9[22]][_0x9fb9[48]]=== _0x9fb9[49]){_0x648dx10[_0x9fb9[22]][_0x9fb9[50]]= moment()[_0x9fb9[52]](_0x9fb9[51]);_0x648dx10[_0x9fb9[22]][_0x9fb9[53]]= moment()[_0x9fb9[52]](_0x9fb9[51]);_0x648dx15[_0x9fb9[54]][_0x9fb9[33]]= _0x648dx15[_0x9fb9[54]][_0x9fb9[33]][_0x9fb9[57]](_0x9fb9[55],_0x9fb9[56])};delete _0x648dx10[_0x9fb9[22]][_0x9fb9[48]];return [_0x648dx15,ExtractedReport[_0x9fb9[94]]({name:_0x648dx26,startDate:_0x648dx10[_0x9fb9[22]][_0x9fb9[50]]?_0x648dx10[_0x9fb9[22]][_0x9fb9[50]]+ (_0x648dx10[_0x9fb9[22]][_0x9fb9[89]]?_0x9fb9[90]+ _0x648dx10[_0x9fb9[22]][_0x9fb9[89]]:_0x9fb9[91]):null,endDate:_0x648dx10[_0x9fb9[22]][_0x9fb9[53]]?_0x648dx10[_0x9fb9[22]][_0x9fb9[53]]+ (_0x648dx10[_0x9fb9[22]][_0x9fb9[92]]?_0x9fb9[90]+ _0x648dx10[_0x9fb9[22]][_0x9fb9[92]]:_0x9fb9[93]):null,output:_0x648dx20,UserId:_0x648dx10[_0x9fb9[45]][_0x9fb9[27]]})]})[_0x9fb9[44]](function(_0x648dx15,_0x648dx21){var _0x648dx22=cp[_0x9fb9[77]](__dirname+ _0x9fb9[76]);_0x648dx22[_0x9fb9[80]](_0x9fb9[83],function(_0x648dx23){console[_0x9fb9[39]](_0x9fb9[84],_0x648dx23);_0x648dx22[_0x9fb9[85]]()})[_0x9fb9[80]](_0x9fb9[81],function(){console[_0x9fb9[39]](_0x9fb9[82])})[_0x9fb9[80]](_0x9fb9[78],function(_0x648dx13){console[_0x9fb9[39]](_0x9fb9[79],_0x648dx13)});_0x648dx22[_0x9fb9[19]]({report:_0x648dx15,query:_0x648dx10[_0x9fb9[22]],extractedId:_0x648dx21[_0x9fb9[27]],user:_0x648dx10[_0x9fb9[45]],type:_0x648dx20})})[_0x9fb9[18]](function(_0x648dx13){console[_0x9fb9[39]](_0x648dx13);return handleError(_0x648dx11,_0x648dx13)});return _0x648dx11[_0x9fb9[26]](200)}function getReportPath(_0x648dx25,_0x648dx24,_0x648dx26){_0x648dx26= _0x648dx25[_0x9fb9[95]]+ _0x9fb9[96]+ _0x648dx26;if(_0x648dx25[_0x9fb9[32]]=== _0x9fb9[97]){return _0x648dx26}else {return getReportPath(_[_0x9fb9[88]](_0x648dx24,{id:_0x648dx25[_0x9fb9[32]]}),_0x648dx24,_0x648dx26)}}exports[_0x9fb9[98]]= function(_0x648dx10,_0x648dx11){return DefaultReport[_0x9fb9[34]](_0x648dx10[_0x9fb9[28]][_0x9fb9[27]],{include:[{all:true}]})[_0x9fb9[21]](function(_0x648dx15){if(!_0x648dx15){return _0x648dx11[_0x9fb9[26]](404)};return _0x648dx11[_0x9fb9[19]](_0x648dx15)})[_0x9fb9[18]](function(_0x648dx13){return handleError(_0x648dx11,_0x648dx13)})};exports[_0x9fb9[99]]= function(_0x648dx10,_0x648dx11){var _0x648dx28;return sequelize[_0x9fb9[104]](function(_0x648dx29){return DefaultReport[_0x9fb9[36]]({method:[_0x9fb9[35],{DefaultReportId:_0x648dx10[_0x9fb9[28]][_0x9fb9[27]]}]})[_0x9fb9[34]](_0x648dx10[_0x9fb9[28]][_0x9fb9[27]])[_0x9fb9[21]](function(_0x648dx15){if(!_0x648dx15){return _0x648dx11[_0x9fb9[26]](404)};var _0x648dx2a=_0x648dx15[_0x9fb9[54]];console[_0x9fb9[39]](_0x648dx2a);delete _0x648dx2a[_0x9fb9[27]];delete _0x648dx2a[_0x9fb9[100]];delete _0x648dx2a[_0x9fb9[101]];_0x648dx2a[_0x9fb9[32]]= _0x648dx10[_0x9fb9[102]][_0x9fb9[32]];_0x648dx28= _[_0x9fb9[103]](_0x648dx2a.Fields,_0x9fb9[54]);return CustomReport[_0x9fb9[94]](_0x648dx2a,{transaction:_0x648dx29})})[_0x9fb9[21]](function(_0x648dx15){return [_0x648dx15,_0x648dx28]})[_0x9fb9[44]](createCopyFields(_0x648dx29))})[_0x9fb9[21]](function(){return _0x648dx11[_0x9fb9[26]](201)})[_0x9fb9[18]](function(_0x648dx13){console[_0x9fb9[39]](_0x648dx13);return handleError(_0x648dx11,_0x648dx13)})};function createCopyFields(_0x648dx29){return function(_0x648dx15,_0x648dx2c){if(_0x648dx2c&& Array[_0x9fb9[60]](_0x648dx2c)&& _0x648dx2c[_0x9fb9[61]]){var _0x648dx2d=reportBuildUtils[_0x9fb9[105]](_0x648dx15[_0x9fb9[33]]);if(_0x648dx2d){var _0x648dx2e;return _0x648dx2d[_0x9fb9[121]]()[_0x9fb9[21]](function(_0x648dx2f){_0x648dx2e= _[_0x9fb9[106]](_0x648dx2f);var _0x648dx30=[];var _0x648dx31=_[_0x9fb9[108]](_0x648dx2c,_0x9fb9[107]);_[_0x9fb9[68]](_0x648dx31,function(_0x648dx32,_0x648dx1e){if(_0x648dx1e!== _0x9fb9[109]&& _0x648dx1e!== _0x9fb9[110]){_0x648dx32[0][_0x9fb9[113]][_0x9fb9[112]][_0x9fb9[69]](function(_0x648dx33){_0x648dx33[_0x9fb9[111]]= _0x648dx15[_0x9fb9[27]]});_0x648dx32[0][_0x9fb9[113]][_0x9fb9[31]]+= _0x9fb9[114]+ sr({length:5});_0x648dx30[_0x9fb9[115]](Metric[_0x9fb9[94]](_0x648dx32[0][_0x9fb9[113]][_0x9fb9[54]],{include:[{model:ReportField,as:_0x9fb9[112]}],transaction:_0x648dx29}))}else {_0x648dx32[_0x9fb9[69]](function(_0x648dx33){if(_[_0x9fb9[117]](_0x648dx2e,_0x648dx33[_0x9fb9[116]])|| _0x648dx33[_0x9fb9[118]]){_0x648dx33[_0x9fb9[111]]= _0x648dx15[_0x9fb9[27]];_0x648dx30[_0x9fb9[115]](ReportField[_0x9fb9[94]](_0x648dx33,{transaction:_0x648dx29}))}else {throw  new sequelize.Error(_0x9fb9[119]+ _0x648dx33[_0x9fb9[116]]+ _0x9fb9[120])}})}});return _0x648dx30})[_0x9fb9[42]]()}else {throw  new sequelize.Error(_0x9fb9[122])}}}}exports[_0x9fb9[94]]= function(_0x648dx10,_0x648dx11){return DefaultReport[_0x9fb9[94]](_0x648dx10[_0x9fb9[102]])[_0x9fb9[21]](function(_0x648dx15){return _0x648dx11[_0x9fb9[20]](201)[_0x9fb9[19]](_0x648dx15)})[_0x9fb9[18]](function(_0x648dx13){return handleError(_0x648dx11,_0x648dx13)})};exports[_0x9fb9[123]]= function(_0x648dx10,_0x648dx11){if(_0x648dx10[_0x9fb9[102]][_0x9fb9[27]]){delete _0x648dx10[_0x9fb9[102]][_0x9fb9[27]]};return DefaultReport[_0x9fb9[34]](_0x648dx10[_0x9fb9[28]][_0x9fb9[27]])[_0x9fb9[21]](function(_0x648dx15){if(!_0x648dx15){return _0x648dx11[_0x9fb9[26]](404)};var _0x648dx34=_[_0x9fb9[124]](_0x648dx15,_0x648dx10[_0x9fb9[102]]);return _0x648dx34[_0x9fb9[125]]()})[_0x9fb9[21]](function(_0x648dx15){return _0x648dx11[_0x9fb9[20]](200)[_0x9fb9[19]](_0x648dx15)})[_0x9fb9[18]](function(_0x648dx13){return handleError(_0x648dx11,_0x648dx13)})};exports[_0x9fb9[126]]= function(_0x648dx10,_0x648dx11){return DefaultReport[_0x9fb9[34]](_0x648dx10[_0x9fb9[28]][_0x9fb9[27]])[_0x9fb9[21]](function(_0x648dx15){if(!_0x648dx15){return _0x648dx11[_0x9fb9[26]](404)};return _0x648dx15[_0x9fb9[126]]()})[_0x9fb9[21]](function(){return _0x648dx11[_0x9fb9[26]](204)})[_0x9fb9[18]](function(_0x648dx13){return handleError(_0x648dx11,_0x648dx13)})};function handleError(_0x648dx11,_0x648dx13){return _0x648dx11[_0x9fb9[20]](500)[_0x9fb9[19]](_0x648dx13)}
\ No newline at end of file
diff --git a/server/api/default_report/default_report.events.js b/server/api/default_report/default_report.events.js
index d10d898..529a1ba 100644
--- a/server/api/default_report/default_report.events.js
+++ b/server/api/default_report/default_report.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const DefaultReport = require('../../models').DefaultReport;
-
-var DefaultReportEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-DefaultReportEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  DefaultReport.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    DefaultReportEvents.emit(event + ':' + doc._id, doc);
-    DefaultReportEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = DefaultReportEvents;
+var _0x1e56=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x1e56[0];const EventEmitter=require(_0x1e56[1]);const DefaultReport=require(_0x1e56[3])[_0x1e56[2]];var DefaultReportEvents= new EventEmitter();DefaultReportEvents[_0x1e56[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x1e56[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x1e56[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x1e56[6]};for(var e in events){var event=events[e];DefaultReport[_0x1e56[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xc666x8,_0xc666x9,_0xc666xa){DefaultReportEvents[_0x1e56[10]](event+ _0x1e56[8]+ _0xc666x8[_0x1e56[9]],_0xc666x8);DefaultReportEvents[_0x1e56[10]](event,_0xc666x8);_0xc666xa(null)}}module[_0x1e56[11]]= DefaultReportEvents
\ No newline at end of file
diff --git a/server/api/default_report/default_report.socket.js b/server/api/default_report/default_report.socket.js
index db50575..4abb219 100644
--- a/server/api/default_report/default_report.socket.js
+++ b/server/api/default_report/default_report.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const DefaultReportEvents = require('./default_report.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('default_report:' + event, socket);
-
-    DefaultReportEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    DefaultReportEvents.removeListener(event, listener);
-  };
-}
+var _0xde64=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xde64[0];const DefaultReportEvents=require(_0xde64[1]);var events=[_0xde64[2],_0xde64[3]];exports[_0xde64[4]]= function(_0x1998x3){for(var _0x1998x4=0,_0x1998x5=events[_0xde64[5]];_0x1998x4< _0x1998x5;_0x1998x4++){var _0x1998x6=events[_0x1998x4];var _0x1998x7=createListener(_0xde64[6]+ _0x1998x6,_0x1998x3);DefaultReportEvents[_0xde64[7]](_0x1998x6,_0x1998x7);_0x1998x3[_0xde64[7]](_0xde64[8],removeListener(_0x1998x6,_0x1998x7))}};function createListener(_0x1998x6,_0x1998x3){return function(_0x1998x9){_0x1998x3[_0xde64[9]](_0x1998x6,_0x1998x9)}}function removeListener(_0x1998x6,_0x1998x7){return function(){DefaultReportEvents[_0xde64[10]](_0x1998x6,_0x1998x7)}}
\ No newline at end of file
diff --git a/server/api/default_report/index.js b/server/api/default_report/index.js
index 019d6fb..db7e886 100644
--- a/server/api/default_report/index.js
+++ b/server/api/default_report/index.js
@@ -1,21 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./default_report.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index);
-router.get('/:id/preview', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.preview);
-router.get('/:id/query', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.getReportQuery);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.show);
-router.get('/:id/export', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.export);
-// router.post('/', controller.create);
-router.get('/:id/extract/pdf', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.extractPdf);
-router.get('/:id/extract/csv', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.extractCsv);
-router.post('/:id/copy', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.copy);
-// router.put('/:id', controller.update);
-// router.delete('/:id', controller.destroy);
-
-module.exports = router;
+var _0x7ef6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x70\x72\x65\x76\x69\x65\x77","\x70\x72\x65\x76\x69\x65\x77","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x72\x79","\x67\x65\x74\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x72\x79","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x65\x78\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x2F\x3A\x69\x64\x2F\x65\x78\x74\x72\x61\x63\x74\x2F\x70\x64\x66","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x2F\x3A\x69\x64\x2F\x65\x78\x74\x72\x61\x63\x74\x2F\x63\x73\x76","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x2F\x3A\x69\x64\x2F\x63\x6F\x70\x79","\x63\x6F\x70\x79","\x70\x6F\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7ef6[0];var express=require(_0x7ef6[1]);var controller=require(_0x7ef6[2]);var auth=require(_0x7ef6[3]);var router=express.Router();router[_0x7ef6[9]](_0x7ef6[4],auth[_0x7ef6[5]](),auth[_0x7ef6[7]]([17],[_0x7ef6[6]]),controller[_0x7ef6[8]]);router[_0x7ef6[9]](_0x7ef6[10],auth[_0x7ef6[5]](),auth[_0x7ef6[7]]([17],[_0x7ef6[6]]),controller[_0x7ef6[11]]);router[_0x7ef6[9]](_0x7ef6[12],auth[_0x7ef6[5]](),auth[_0x7ef6[7]]([17],[_0x7ef6[6]]),controller[_0x7ef6[13]]);router[_0x7ef6[9]](_0x7ef6[14],auth[_0x7ef6[5]](),auth[_0x7ef6[7]]([17],[_0x7ef6[6]]),controller[_0x7ef6[15]]);router[_0x7ef6[9]](_0x7ef6[16],auth[_0x7ef6[5]](),auth[_0x7ef6[7]]([17],[_0x7ef6[6]]),controller[_0x7ef6[17]]);router[_0x7ef6[9]](_0x7ef6[18],auth[_0x7ef6[5]](),auth[_0x7ef6[7]]([17],[_0x7ef6[6]]),controller[_0x7ef6[19]]);router[_0x7ef6[9]](_0x7ef6[20],auth[_0x7ef6[5]](),auth[_0x7ef6[7]]([17],[_0x7ef6[6]]),controller[_0x7ef6[21]]);router[_0x7ef6[24]](_0x7ef6[22],auth[_0x7ef6[5]](),auth[_0x7ef6[7]]([17],[_0x7ef6[6]]),controller[_0x7ef6[23]]);module[_0x7ef6[25]]= router
\ No newline at end of file
diff --git a/server/api/desk_account/desk_account.controller.js b/server/api/desk_account/desk_account.controller.js
index f65313b..383156c 100644
--- a/server/api/desk_account/desk_account.controller.js
+++ b/server/api/desk_account/desk_account.controller.js
@@ -1,255 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var desk = require('desk.js');
-
-var DeskAccount = require('../../models').DeskAccount;
-
-// Get list of desk_accounts
-exports.index = function(req, res) {
-  var attributes = ['description', 'name', 'username', 'remoteUri'];
-  var per_page = req.query.per_page ? parseInt(req.query.per_page, 10) : 100;
-  var page = req.query.page ? parseInt(req.query.page, 10) : 0;
-
-  var query = {
-    where: {},
-    limit: per_page,
-    offset: page * per_page
-  };
-
-  _.forIn(req.query, function(value, key) {
-    switch (key) {
-      case 'per_page':
-      case 'page':
-        break;
-      case 'sort_by':
-        query.order = util.format('%s %s', req.query.sort_by, req.query.sort_order || 'ASC') || null;
-        break;
-      case 'sort_order':
-        break;
-      case '$':
-        query.where.$or = [];
-        attributes.forEach(function(attribute) {
-          var tmp = {};
-          tmp[attribute] = {
-            $like: '%' + value + '%'
-          };
-
-          query.where.$or.push(tmp);
-        });
-        break;
-      default:
-        query.where[key] = {
-          $like: {}
-        };
-        query.where[key].$like = '%' + value + '%';
-    }
-  });
-
-  return DeskAccount
-    .findAndCountAll(query)
-    .then(function(result) {
-
-      var total_pages = Math.ceil(result.count / per_page);
-      var next_page = total_pages > (query.offset + 1) ? util.format('%s://%s%s?page=%d', req.protocol, req.headers.host, req.baseUrl, page + 1) : null;
-      var previous_page = page > 0 ? util.format('%s://%s%s?page=%d', req.protocol, req.headers.host, req.baseUrl, page - 1) : null;
-
-      return res.status(200).send({
-        count: result.count,
-        rows: result.rows,
-        next_page: next_page,
-        previous_page: previous_page,
-        total_pages: total_pages
-      });
-    })
-    .catch(function(err) {
-      return res.status(500).send({
-        error: 'Something blew up!'
-      });
-    });
-};
-
-// Get a single desk_account
-exports.show = function(req, res) {
-  DeskAccount
-    .findById(req.params.id)
-    .then(function(desk_account) {
-      if (!desk_account) {
-        return res.sendStatus(404);
-      }
-      return res.send(desk_account);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new desk_account in the DB.
-exports.create = function(req, res, next) {
-  DeskAccount
-    .create(req.body)
-    .then(function(desk_account) {
-      return res.status(201).send(desk_account);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing desk_account in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  DeskAccount
-    .findById(req.params.id)
-    .then(function(desk_account) {
-      if (!desk_account) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(desk_account, req.body);
-      updated.save()
-        .then(function() {
-          return res.status(200).send(desk_account);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a desk_account from the DB.
-exports.destroy = function(req, res) {
-  DeskAccount
-    .findById(req.params.id)
-    .then(function(desk_account) {
-      if (!desk_account) {
-        return res.sendStatus(404);
-      }
-      desk_account.destroy()
-        .then(function() {
-          return res.sendStatus(204);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.checkAccount = function(req, res) {
-  DeskAccount
-    .findById(req.params.id)
-    .then(function(account) {
-      var desk_account = {
-        endpoint: stripTrailingSlash(account.remoteUri),
-        retry: false
-      };
-      if (account.authType === 'basic') {
-        desk_account.username = account.username;
-        desk_account.password = account.password;
-      } else if (account.authType === 'oauth') {
-        desk_account.consumerKey = account.consumerKey;
-        desk_account.consumerSecret = account.consumerSecret;
-        desk_account.token = account.token;
-        desk_account.tokenSecret = account.tokenSecret;
-      }
-      var client = desk.createClient(desk_account);
-      client.get('/api/v2/users/me', function(err, body, response) {
-        if (err) {
-          return handleError(res, err);
-        }
-        return res.sendStatus(200);
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.deskValidation = function(req, res) {
-  var where = {};
-  where[req.params.field] = req.body.value;
-  DeskAccount
-    .findAndCountAll({
-      where: where
-    })
-    .then(function(result) {
-      if (result.count) {
-        return res.status(200).send({
-          isValid: false,
-          value: req.body.value
-        });
-      }
-      return res.status(200).send({
-        isValid: true,
-        value: req.body.value
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getFields = function(req, res) {
-  DeskAccount
-    .findById(req.params.id)
-    .then(function(account) {
-      var desk_account = {
-        endpoint: stripTrailingSlash(account.remoteUri),
-        retry: false
-      };
-      if (account.authType === 'basic') {
-        desk_account.username = account.username;
-        desk_account.password = account.password;
-      } else if (account.authType === 'oauth') {
-        desk_account.consumerKey = account.consumerKey;
-        desk_account.consumerSecret = account.consumerSecret;
-        desk_account.token = account.token;
-        desk_account.tokenSecret = account.tokenSecret;
-      }
-      var client = desk.createClient(desk_account);
-      client.get('/api/v2/custom_fields', function(err, body, response) {
-        if (err) {
-          return handleError(res, err);
-        }
-        return res.status(200).json(body._embedded.entries);
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-exports.bulkDestroy = function(req, res) {
-  DeskAccount
-    .destroy({
-      where: {
-        id: req.query.id
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function stripTrailingSlash(str) {
-  if (str.substr(-1) === '/') {
-    return str.substr(0, str.length - 1);
-  }
-  return str;
-}
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xc098=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x64\x65\x73\x6B\x2E\x6A\x73","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x70\x65\x72\x5F\x70\x61\x67\x65","\x71\x75\x65\x72\x79","\x70\x61\x67\x65","\x6F\x72\x64\x65\x72","\x25\x73\x20\x25\x73","\x73\x6F\x72\x74\x5F\x62\x79","\x73\x6F\x72\x74\x5F\x6F\x72\x64\x65\x72","\x41\x53\x43","\x66\x6F\x72\x6D\x61\x74","\x24\x6F\x72","\x77\x68\x65\x72\x65","\x25","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x24","\x24\x6C\x69\x6B\x65","\x66\x6F\x72\x49\x6E","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x62\x6C\x65\x77\x20\x75\x70\x21","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x63\x61\x74\x63\x68","\x63\x6F\x75\x6E\x74","\x63\x65\x69\x6C","\x6F\x66\x66\x73\x65\x74","\x25\x73\x3A\x2F\x2F\x25\x73\x25\x73\x3F\x70\x61\x67\x65\x3D\x25\x64","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x68\x6F\x73\x74","\x68\x65\x61\x64\x65\x72\x73","\x62\x61\x73\x65\x55\x72\x6C","\x72\x6F\x77\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x61\x75\x74\x68\x54\x79\x70\x65","\x62\x61\x73\x69\x63","\x70\x61\x73\x73\x77\x6F\x72\x64","\x6F\x61\x75\x74\x68","\x63\x6F\x6E\x73\x75\x6D\x65\x72\x4B\x65\x79","\x63\x6F\x6E\x73\x75\x6D\x65\x72\x53\x65\x63\x72\x65\x74","\x74\x6F\x6B\x65\x6E","\x74\x6F\x6B\x65\x6E\x53\x65\x63\x72\x65\x74","\x63\x72\x65\x61\x74\x65\x43\x6C\x69\x65\x6E\x74","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x75\x73\x65\x72\x73\x2F\x6D\x65","\x67\x65\x74","\x64\x65\x73\x6B\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x65\x6E\x74\x72\x69\x65\x73","\x5F\x65\x6D\x62\x65\x64\x64\x65\x64","\x6A\x73\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x75\x62\x73\x74\x72","\x2F","\x6C\x65\x6E\x67\x74\x68"];_0xc098[0];var _=require(_0xc098[1]);var util=require(_0xc098[2]);var desk=require(_0xc098[3]);var DeskAccount=require(_0xc098[5])[_0xc098[4]];exports[_0xc098[6]]= function(_0x9346x5,_0x9346x6){var _0x9346x7=[_0xc098[7],_0xc098[8],_0xc098[9],_0xc098[10]];var _0x9346x8=_0x9346x5[_0xc098[12]][_0xc098[11]]?parseInt(_0x9346x5[_0xc098[12]][_0xc098[11]],10):100;var _0x9346x9=_0x9346x5[_0xc098[12]][_0xc098[13]]?parseInt(_0x9346x5[_0xc098[12]][_0xc098[13]],10):0;var _0x9346xa={where:{},limit:_0x9346x8,offset:_0x9346x9* _0x9346x8};_[_0xc098[27]](_0x9346x5[_0xc098[12]],function(_0x9346xb,_0x9346xc){switch(_0x9346xc){case _0xc098[11]:;case _0xc098[13]:break;case _0xc098[16]:_0x9346xa[_0xc098[14]]= util[_0xc098[19]](_0xc098[15],_0x9346x5[_0xc098[12]][_0xc098[16]],_0x9346x5[_0xc098[12]][_0xc098[17]]|| _0xc098[18])|| null;break;case _0xc098[17]:break;case _0xc098[25]:_0x9346xa[_0xc098[21]][_0xc098[20]]= [];_0x9346x7[_0xc098[24]](function(_0x9346xd){var _0x9346xe={};_0x9346xe[_0x9346xd]= {$like:_0xc098[22]+ _0x9346xb+ _0xc098[22]};_0x9346xa[_0xc098[21]][_0xc098[20]][_0xc098[23]](_0x9346xe)});break;default:_0x9346xa[_0xc098[21]][_0x9346xc]= {$like:{}};_0x9346xa[_0xc098[21]][_0x9346xc][_0xc098[26]]= _0xc098[22]+ _0x9346xb+ _0xc098[22]}});return DeskAccount[_0xc098[42]](_0x9346xa)[_0xc098[41]](function(_0x9346x10){var _0x9346x11=Math[_0xc098[33]](_0x9346x10[_0xc098[32]]/ _0x9346x8);var _0x9346x12=_0x9346x11> (_0x9346xa[_0xc098[34]]+ 1)?util[_0xc098[19]](_0xc098[35],_0x9346x5[_0xc098[36]],_0x9346x5[_0xc098[38]][_0xc098[37]],_0x9346x5[_0xc098[39]],_0x9346x9+ 1):null;var _0x9346x13=_0x9346x9> 0?util[_0xc098[19]](_0xc098[35],_0x9346x5[_0xc098[36]],_0x9346x5[_0xc098[38]][_0xc098[37]],_0x9346x5[_0xc098[39]],_0x9346x9- 1):null;return _0x9346x6[_0xc098[30]](200)[_0xc098[29]]({count:_0x9346x10[_0xc098[32]],rows:_0x9346x10[_0xc098[40]],next_page:_0x9346x12,previous_page:_0x9346x13,total_pages:_0x9346x11})})[_0xc098[31]](function(_0x9346xf){return _0x9346x6[_0xc098[30]](500)[_0xc098[29]]({error:_0xc098[28]})})};exports[_0xc098[43]]= function(_0x9346x5,_0x9346x6){DeskAccount[_0xc098[47]](_0x9346x5[_0xc098[46]][_0xc098[45]])[_0xc098[41]](function(_0x9346x14){if(!_0x9346x14){return _0x9346x6[_0xc098[44]](404)};return _0x9346x6[_0xc098[29]](_0x9346x14)})[_0xc098[31]](function(_0x9346xf){return handleError(_0x9346x6,_0x9346xf)})};exports[_0xc098[48]]= function(_0x9346x5,_0x9346x6,_0x9346x15){DeskAccount[_0xc098[48]](_0x9346x5[_0xc098[49]])[_0xc098[41]](function(_0x9346x14){return _0x9346x6[_0xc098[30]](201)[_0xc098[29]](_0x9346x14)})[_0xc098[31]](function(_0x9346xf){return handleError(_0x9346x6,_0x9346xf)})};exports[_0xc098[50]]= function(_0x9346x5,_0x9346x6){if(_0x9346x5[_0xc098[49]][_0xc098[45]]){delete _0x9346x5[_0xc098[49]][_0xc098[45]]};DeskAccount[_0xc098[47]](_0x9346x5[_0xc098[46]][_0xc098[45]])[_0xc098[41]](function(_0x9346x14){if(!_0x9346x14){return _0x9346x6[_0xc098[44]](404)};var _0x9346x16=_[_0xc098[51]](_0x9346x14,_0x9346x5[_0xc098[49]]);_0x9346x16[_0xc098[52]]()[_0xc098[41]](function(){return _0x9346x6[_0xc098[30]](200)[_0xc098[29]](_0x9346x14)})[_0xc098[31]](function(_0x9346xf){return handleError(_0x9346x6,_0x9346xf)})})[_0xc098[31]](function(_0x9346xf){return handleError(_0x9346x6,_0x9346xf)})};exports[_0xc098[53]]= function(_0x9346x5,_0x9346x6){DeskAccount[_0xc098[47]](_0x9346x5[_0xc098[46]][_0xc098[45]])[_0xc098[41]](function(_0x9346x14){if(!_0x9346x14){return _0x9346x6[_0xc098[44]](404)};_0x9346x14[_0xc098[53]]()[_0xc098[41]](function(){return _0x9346x6[_0xc098[44]](204)})[_0xc098[31]](function(_0x9346xf){return handleError(_0x9346x6,_0x9346xf)})})[_0xc098[31]](function(_0x9346xf){return handleError(_0x9346x6,_0x9346xf)})};exports[_0xc098[54]]= function(_0x9346x5,_0x9346x6){DeskAccount[_0xc098[47]](_0x9346x5[_0xc098[46]][_0xc098[45]])[_0xc098[41]](function(_0x9346x17){var _0x9346x14={endpoint:stripTrailingSlash(_0x9346x17[_0xc098[10]]),retry:false};if(_0x9346x17[_0xc098[55]]=== _0xc098[56]){_0x9346x14[_0xc098[9]]= _0x9346x17[_0xc098[9]];_0x9346x14[_0xc098[57]]= _0x9346x17[_0xc098[57]]}else {if(_0x9346x17[_0xc098[55]]=== _0xc098[58]){_0x9346x14[_0xc098[59]]= _0x9346x17[_0xc098[59]];_0x9346x14[_0xc098[60]]= _0x9346x17[_0xc098[60]];_0x9346x14[_0xc098[61]]= _0x9346x17[_0xc098[61]];_0x9346x14[_0xc098[62]]= _0x9346x17[_0xc098[62]]}};var _0x9346x18=desk[_0xc098[63]](_0x9346x14);_0x9346x18[_0xc098[65]](_0xc098[64],function(_0x9346xf,_0x9346x19,_0x9346x1a){if(_0x9346xf){return handleError(_0x9346x6,_0x9346xf)};return _0x9346x6[_0xc098[44]](200)})})[_0xc098[31]](function(_0x9346xf){return handleError(_0x9346x6,_0x9346xf)})};exports[_0xc098[66]]= function(_0x9346x5,_0x9346x6){var _0x9346x1b={};_0x9346x1b[_0x9346x5[_0xc098[46]][_0xc098[67]]]= _0x9346x5[_0xc098[49]][_0xc098[68]];DeskAccount[_0xc098[42]]({where:_0x9346x1b})[_0xc098[41]](function(_0x9346x10){if(_0x9346x10[_0xc098[32]]){return _0x9346x6[_0xc098[30]](200)[_0xc098[29]]({isValid:false,value:_0x9346x5[_0xc098[49]][_0xc098[68]]})};return _0x9346x6[_0xc098[30]](200)[_0xc098[29]]({isValid:true,value:_0x9346x5[_0xc098[49]][_0xc098[68]]})})[_0xc098[31]](function(_0x9346xf){return handleError(_0x9346x6,_0x9346xf)})};exports[_0xc098[69]]= function(_0x9346x5,_0x9346x6){DeskAccount[_0xc098[47]](_0x9346x5[_0xc098[46]][_0xc098[45]])[_0xc098[41]](function(_0x9346x17){var _0x9346x14={endpoint:stripTrailingSlash(_0x9346x17[_0xc098[10]]),retry:false};if(_0x9346x17[_0xc098[55]]=== _0xc098[56]){_0x9346x14[_0xc098[9]]= _0x9346x17[_0xc098[9]];_0x9346x14[_0xc098[57]]= _0x9346x17[_0xc098[57]]}else {if(_0x9346x17[_0xc098[55]]=== _0xc098[58]){_0x9346x14[_0xc098[59]]= _0x9346x17[_0xc098[59]];_0x9346x14[_0xc098[60]]= _0x9346x17[_0xc098[60]];_0x9346x14[_0xc098[61]]= _0x9346x17[_0xc098[61]];_0x9346x14[_0xc098[62]]= _0x9346x17[_0xc098[62]]}};var _0x9346x18=desk[_0xc098[63]](_0x9346x14);_0x9346x18[_0xc098[65]](_0xc098[70],function(_0x9346xf,_0x9346x19,_0x9346x1a){if(_0x9346xf){return handleError(_0x9346x6,_0x9346xf)};return _0x9346x6[_0xc098[30]](200)[_0xc098[73]](_0x9346x19[_0xc098[72]][_0xc098[71]])})})[_0xc098[31]](function(_0x9346xf){return handleError(_0x9346x6,_0x9346xf)})};exports[_0xc098[74]]= function(_0x9346x5,_0x9346x6){DeskAccount[_0xc098[53]]({where:{id:_0x9346x5[_0xc098[12]][_0xc098[45]]},individualHooks:true})[_0xc098[41]](function(){return _0x9346x6[_0xc098[44]](204)})[_0xc098[31]](function(_0x9346xf){return handleError(_0x9346x6,_0x9346xf)})};function stripTrailingSlash(_0x9346x1d){if(_0x9346x1d[_0xc098[75]](-1) === _0xc098[76]){return _0x9346x1d[_0xc098[75]](0,_0x9346x1d[_0xc098[77]]- 1)};return _0x9346x1d}function handleError(_0x9346x6,_0x9346xf){return _0x9346x6[_0xc098[30]](500)[_0xc098[29]](_0x9346xf)}
\ No newline at end of file
diff --git a/server/api/desk_account/desk_account.events.js b/server/api/desk_account/desk_account.events.js
index 3a0d697..5bce0ef 100644
--- a/server/api/desk_account/desk_account.events.js
+++ b/server/api/desk_account/desk_account.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const DeskAccount = require('../../models').DeskAccount;
-
-var DeskAccountEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-DeskAccountEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  DeskAccount.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    DeskAccountEvents.emit(event + ':' + doc._id, doc);
-    DeskAccountEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = DeskAccountEvents;
+var _0xab75=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xab75[0];const EventEmitter=require(_0xab75[1]);const DeskAccount=require(_0xab75[3])[_0xab75[2]];var DeskAccountEvents= new EventEmitter();DeskAccountEvents[_0xab75[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xab75[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xab75[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xab75[6]};for(var e in events){var event=events[e];DeskAccount[_0xab75[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xbd49x8,_0xbd49x9,_0xbd49xa){DeskAccountEvents[_0xab75[10]](event+ _0xab75[8]+ _0xbd49x8[_0xab75[9]],_0xbd49x8);DeskAccountEvents[_0xab75[10]](event,_0xbd49x8);_0xbd49xa(null)}}module[_0xab75[11]]= DeskAccountEvents
\ No newline at end of file
diff --git a/server/api/desk_account/desk_account.socket.js b/server/api/desk_account/desk_account.socket.js
index 1d543a4..5d4b6f6 100644
--- a/server/api/desk_account/desk_account.socket.js
+++ b/server/api/desk_account/desk_account.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const DeskAccountEvents = require('./desk_account.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('desk_account:' + event, socket);
-
-    DeskAccountEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    DeskAccountEvents.removeListener(event, listener);
-  };
-}
+var _0x3ad6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x3ad6[0];const DeskAccountEvents=require(_0x3ad6[1]);var events=[_0x3ad6[2],_0x3ad6[3]];exports[_0x3ad6[4]]= function(_0x3db1x3){for(var _0x3db1x4=0,_0x3db1x5=events[_0x3ad6[5]];_0x3db1x4< _0x3db1x5;_0x3db1x4++){var _0x3db1x6=events[_0x3db1x4];var _0x3db1x7=createListener(_0x3ad6[6]+ _0x3db1x6,_0x3db1x3);DeskAccountEvents[_0x3ad6[7]](_0x3db1x6,_0x3db1x7);_0x3db1x3[_0x3ad6[7]](_0x3ad6[8],removeListener(_0x3db1x6,_0x3db1x7))}};function createListener(_0x3db1x6,_0x3db1x3){return function(_0x3db1x9){_0x3db1x3[_0x3ad6[9]](_0x3db1x6,_0x3db1x9)}}function removeListener(_0x3db1x6,_0x3db1x7){return function(){DeskAccountEvents[_0x3ad6[10]](_0x3db1x6,_0x3db1x7)}}
\ No newline at end of file
diff --git a/server/api/desk_account/index.js b/server/api/desk_account/index.js
index 506e627..f0103e0 100644
--- a/server/api/desk_account/index.js
+++ b/server/api/desk_account/index.js
@@ -1,18 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./desk_account.controller');
-var auth = require('../../auth/auth.service');
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([19, 13], ['admin']), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show);
-router.get('/:id/check', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.checkAccount);
-router.get('/:id/fields', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.getFields);
-router.post('/validate/:field', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.deskValidation);
-router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0x2d3d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65\x2F\x3A\x66\x69\x65\x6C\x64","\x64\x65\x73\x6B\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x2d3d[0];var express=require(_0x2d3d[1]);var controller=require(_0x2d3d[2]);var auth=require(_0x2d3d[3]);var router=express.Router();router[_0x2d3d[9]](_0x2d3d[4],auth[_0x2d3d[5]](),auth[_0x2d3d[7]]([19,13],[_0x2d3d[6]]),controller[_0x2d3d[8]]);router[_0x2d3d[9]](_0x2d3d[10],auth[_0x2d3d[5]](),auth[_0x2d3d[7]]([19],[_0x2d3d[6]]),controller[_0x2d3d[11]]);router[_0x2d3d[9]](_0x2d3d[12],auth[_0x2d3d[5]](),auth[_0x2d3d[7]]([19],[_0x2d3d[6]]),controller[_0x2d3d[13]]);router[_0x2d3d[9]](_0x2d3d[14],auth[_0x2d3d[5]](),auth[_0x2d3d[7]]([19],[_0x2d3d[6]]),controller[_0x2d3d[15]]);router[_0x2d3d[18]](_0x2d3d[16],auth[_0x2d3d[5]](),auth[_0x2d3d[7]]([19],[_0x2d3d[6]]),controller[_0x2d3d[17]]);router[_0x2d3d[18]](_0x2d3d[4],auth[_0x2d3d[5]](),auth[_0x2d3d[7]]([19],[_0x2d3d[6]]),controller[_0x2d3d[19]]);router[_0x2d3d[21]](_0x2d3d[10],auth[_0x2d3d[5]](),auth[_0x2d3d[7]]([19],[_0x2d3d[6]]),controller[_0x2d3d[20]]);router[_0x2d3d[23]](_0x2d3d[4],auth[_0x2d3d[5]](),auth[_0x2d3d[7]]([19],[_0x2d3d[6]]),controller[_0x2d3d[22]]);router[_0x2d3d[23]](_0x2d3d[10],auth[_0x2d3d[5]](),auth[_0x2d3d[7]]([19],[_0x2d3d[6]]),controller[_0x2d3d[24]]);module[_0x2d3d[25]]= router
\ No newline at end of file
diff --git a/server/api/desk_configuration/desk_configuration.controller.js b/server/api/desk_configuration/desk_configuration.controller.js
index 3824ca1..0f46587 100644
--- a/server/api/desk_configuration/desk_configuration.controller.js
+++ b/server/api/desk_configuration/desk_configuration.controller.js
@@ -1,145 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/desk/configurations              ->  index
- * POST    /api/desk/configurations              ->  create
- * GET     /api/desk/configurations/:id          ->  show
- * PUT     /api/desk/configurations/:id          ->  update
- * DELETE  /api/desk/configurations/:id          ->  destroy
- */
-
-'use strict';
-
-var _ = require('lodash');
-
-var DeskConfiguration = require('../../models').DeskConfiguration;
-var DeskField = require('../../models').DeskField;
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of DeskConfigurations
-exports.index = function(req, res) {
-  DeskConfiguration.findAll({
-      where: req.query
-    })
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single DeskConfiguration from the DB
-exports.show = function(req, res) {
-  DeskConfiguration.find({
-      where: {
-        id: req.params.id
-      },
-      include: [{
-        model: DeskField,
-        as: 'Subject'
-      }, {
-        model: DeskField,
-        as: 'Description'
-      }, {
-        model: DeskField,
-        as: 'Field'
-      }]
-    })
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new DeskConfiguration in the DB
-exports.create = function(req, res) {
-  DeskConfiguration.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing DeskConfiguration in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  DeskConfiguration.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a DeskConfiguration from the DB
-exports.destroy = function(req, res) {
-  DeskConfiguration.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
-
-exports.addConfigurationField = function(req, res, next) {
-  // console.log(req.params);
-  var deskConfiguration;
-  DeskConfiguration
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(function(desk_configuration) {
-      deskConfiguration = desk_configuration;
-      return DeskField.create(req.body)
-    })
-    .then(function(deskField) {
-      switch (req.params.type) {
-        case 'subject':
-          return [deskConfiguration.addSubject(deskField), deskField];
-        case 'description':
-          return [deskConfiguration.addDescription(deskField), deskField];
-        case 'field':
-          return [deskConfiguration.addField(deskField), deskField];
-      }
-    })
-    .spread(function(data, deskField) {
-      return res.status(201).json(deskField);
-    })
-    .catch(handleError(res));
-};
+var _0xb877=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x53\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x73\x70\x72\x65\x61\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65"];_0xb877[0];var _=require(_0xb877[1]);var DeskConfiguration=require(_0xb877[3])[_0xb877[2]];var DeskField=require(_0xb877[3])[_0xb877[4]];function handleError(_0x4ffcx5,_0x4ffcx6){_0x4ffcx6= _0x4ffcx6|| 500;return function(_0x4ffcx7){_0x4ffcx5[_0xb877[6]](_0x4ffcx6)[_0xb877[5]](_0x4ffcx7)}}function responseWithResult(_0x4ffcx5,_0x4ffcx6){_0x4ffcx6= _0x4ffcx6|| 200;return function(_0x4ffcx9){if(_0x4ffcx9){_0x4ffcx5[_0xb877[6]](_0x4ffcx6)[_0xb877[7]](_0x4ffcx9)}}}function handleEntityNotFound(_0x4ffcx5){return function(_0x4ffcx9){if(!_0x4ffcx9){_0x4ffcx5[_0xb877[6]](404)[_0xb877[8]]();return null};return _0x4ffcx9}}function saveUpdates(_0x4ffcxc){return function(_0x4ffcx9){return _0x4ffcx9[_0xb877[10]](_0x4ffcxc)[_0xb877[9]](function(_0x4ffcxd){return _0x4ffcxd})}}function removeEntity(_0x4ffcx5){return function(_0x4ffcx9){if(_0x4ffcx9){return _0x4ffcx9[_0xb877[11]]()[_0xb877[9]](function(){_0x4ffcx5[_0xb877[6]](204)[_0xb877[8]]()})}}}exports[_0xb877[12]]= function(_0x4ffcxf,_0x4ffcx5){DeskConfiguration[_0xb877[15]]({where:_0x4ffcxf[_0xb877[14]]})[_0xb877[9]](responseWithResult(_0x4ffcx5))[_0xb877[13]](handleError(_0x4ffcx5))};exports[_0xb877[16]]= function(_0x4ffcxf,_0x4ffcx5){DeskConfiguration[_0xb877[22]]({where:{id:_0x4ffcxf[_0xb877[18]][_0xb877[17]]},include:[{model:DeskField,as:_0xb877[19]},{model:DeskField,as:_0xb877[20]},{model:DeskField,as:_0xb877[21]}]})[_0xb877[9]](handleEntityNotFound(_0x4ffcx5))[_0xb877[9]](responseWithResult(_0x4ffcx5))[_0xb877[13]](handleError(_0x4ffcx5))};exports[_0xb877[23]]= function(_0x4ffcxf,_0x4ffcx5){DeskConfiguration[_0xb877[23]](_0x4ffcxf[_0xb877[24]])[_0xb877[9]](responseWithResult(_0x4ffcx5,201))[_0xb877[13]](handleError(_0x4ffcx5))};exports[_0xb877[25]]= function(_0x4ffcxf,_0x4ffcx5){if(_0x4ffcxf[_0xb877[24]][_0xb877[17]]){delete _0x4ffcxf[_0xb877[24]][_0xb877[17]]};DeskConfiguration[_0xb877[26]](_0x4ffcxf[_0xb877[18]][_0xb877[17]])[_0xb877[9]](handleEntityNotFound(_0x4ffcx5))[_0xb877[9]](saveUpdates(_0x4ffcxf[_0xb877[24]]))[_0xb877[9]](responseWithResult(_0x4ffcx5))[_0xb877[13]](handleError(_0x4ffcx5))};exports[_0xb877[11]]= function(_0x4ffcxf,_0x4ffcx5){DeskConfiguration[_0xb877[26]](_0x4ffcxf[_0xb877[18]][_0xb877[17]])[_0xb877[9]](handleEntityNotFound(_0x4ffcx5))[_0xb877[9]](removeEntity(_0x4ffcx5))[_0xb877[13]](handleError(_0x4ffcx5))};exports[_0xb877[27]]= function(_0x4ffcxf,_0x4ffcx5,_0x4ffcx10){var _0x4ffcx11;DeskConfiguration[_0xb877[26]](_0x4ffcxf[_0xb877[18]][_0xb877[17]])[_0xb877[9]](handleEntityNotFound(_0x4ffcx5))[_0xb877[9]](function(_0x4ffcx14){_0x4ffcx11= _0x4ffcx14;return DeskField[_0xb877[23]](_0x4ffcxf[_0xb877[24]])})[_0xb877[9]](function(_0x4ffcx13){switch(_0x4ffcxf[_0xb877[18]][_0xb877[35]]){case _0xb877[30]:return [_0x4ffcx11[_0xb877[29]](_0x4ffcx13),_0x4ffcx13];case _0xb877[32]:return [_0x4ffcx11[_0xb877[31]](_0x4ffcx13),_0x4ffcx13];case _0xb877[34]:return [_0x4ffcx11[_0xb877[33]](_0x4ffcx13),_0x4ffcx13]}})[_0xb877[28]](function(_0x4ffcx12,_0x4ffcx13){return _0x4ffcx5[_0xb877[6]](201)[_0xb877[7]](_0x4ffcx13)})[_0xb877[13]](handleError(_0x4ffcx5))}
\ No newline at end of file
diff --git a/server/api/desk_configuration/desk_configuration.events.js b/server/api/desk_configuration/desk_configuration.events.js
index 12fbc47..709e16b 100644
--- a/server/api/desk_configuration/desk_configuration.events.js
+++ b/server/api/desk_configuration/desk_configuration.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const DeskConfiguration = require('../../models').DeskConfiguration;
-
-var DeskConfigurationEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-DeskConfigurationEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  DeskConfiguration.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    DeskConfigurationEvents.emit(event + ':' + doc._id, doc);
-    DeskConfigurationEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = DeskConfigurationEvents;
+var _0x3ee8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x3ee8[0];const EventEmitter=require(_0x3ee8[1]);const DeskConfiguration=require(_0x3ee8[3])[_0x3ee8[2]];var DeskConfigurationEvents= new EventEmitter();DeskConfigurationEvents[_0x3ee8[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x3ee8[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x3ee8[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x3ee8[6]};for(var e in events){var event=events[e];DeskConfiguration[_0x3ee8[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x8732x8,_0x8732x9,_0x8732xa){DeskConfigurationEvents[_0x3ee8[10]](event+ _0x3ee8[8]+ _0x8732x8[_0x3ee8[9]],_0x8732x8);DeskConfigurationEvents[_0x3ee8[10]](event,_0x8732x8);_0x8732xa(null)}}module[_0x3ee8[11]]= DeskConfigurationEvents
\ No newline at end of file
diff --git a/server/api/desk_configuration/desk_configuration.socket.js b/server/api/desk_configuration/desk_configuration.socket.js
index 5bc3ca6..50ea4c0 100644
--- a/server/api/desk_configuration/desk_configuration.socket.js
+++ b/server/api/desk_configuration/desk_configuration.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const DeskConfigurationEvents = require('./desk_configuration.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('desk_configuration:' + event, socket);
-
-    DeskConfigurationEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    DeskConfigurationEvents.removeListener(event, listener);
-  };
-}
+var _0xb0ce=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xb0ce[0];const DeskConfigurationEvents=require(_0xb0ce[1]);var events=[_0xb0ce[2],_0xb0ce[3]];exports[_0xb0ce[4]]= function(_0xbeb7x3){for(var _0xbeb7x4=0,_0xbeb7x5=events[_0xb0ce[5]];_0xbeb7x4< _0xbeb7x5;_0xbeb7x4++){var _0xbeb7x6=events[_0xbeb7x4];var _0xbeb7x7=createListener(_0xb0ce[6]+ _0xbeb7x6,_0xbeb7x3);DeskConfigurationEvents[_0xb0ce[7]](_0xbeb7x6,_0xbeb7x7);_0xbeb7x3[_0xb0ce[7]](_0xb0ce[8],removeListener(_0xbeb7x6,_0xbeb7x7))}};function createListener(_0xbeb7x6,_0xbeb7x3){return function(_0xbeb7x9){_0xbeb7x3[_0xb0ce[9]](_0xbeb7x6,_0xbeb7x9)}}function removeListener(_0xbeb7x6,_0xbeb7x7){return function(){DeskConfigurationEvents[_0xb0ce[10]](_0xbeb7x6,_0xbeb7x7)}}
\ No newline at end of file
diff --git a/server/api/desk_configuration/index.js b/server/api/desk_configuration/index.js
index 23cf463..daec835 100644
--- a/server/api/desk_configuration/index.js
+++ b/server/api/desk_configuration/index.js
@@ -1,18 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./desk_configuration.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), controller.index);
-
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update);
-router.post('/:id/:type', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.addConfigurationField);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy);
-
-
-module.exports = router;
+var _0x4659=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x3A\x74\x79\x70\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4659[0];var express=require(_0x4659[1]);var auth=require(_0x4659[2]);var controller=require(_0x4659[3]);var router=express.Router();router[_0x4659[7]](_0x4659[4],auth[_0x4659[5]](),controller[_0x4659[6]]);router[_0x4659[7]](_0x4659[8],auth[_0x4659[5]](),auth[_0x4659[10]]([19],[_0x4659[9]]),controller[_0x4659[11]]);router[_0x4659[13]](_0x4659[4],auth[_0x4659[5]](),auth[_0x4659[10]]([19],[_0x4659[9]]),controller[_0x4659[12]]);router[_0x4659[15]](_0x4659[8],auth[_0x4659[5]](),auth[_0x4659[10]]([19],[_0x4659[9]]),controller[_0x4659[14]]);router[_0x4659[13]](_0x4659[16],auth[_0x4659[5]](),auth[_0x4659[10]]([19],[_0x4659[9]]),controller[_0x4659[17]]);router[_0x4659[19]](_0x4659[8],auth[_0x4659[5]](),auth[_0x4659[10]]([19],[_0x4659[9]]),controller[_0x4659[18]]);module[_0x4659[20]]= router
\ No newline at end of file
diff --git a/server/api/desk_field/desk_field.controller.js b/server/api/desk_field/desk_field.controller.js
index 6b39f83..57ef5d0 100644
--- a/server/api/desk_field/desk_field.controller.js
+++ b/server/api/desk_field/desk_field.controller.js
@@ -1,104 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/desk/fields              ->  index
- * POST    /api/desk/fields              ->  create
- * GET     /api/desk/fields/:id          ->  show
- * PUT     /api/desk/fields/:id          ->  update
- * DELETE  /api/desk/fields/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-
-var DeskField = require('../../models').DeskField;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of DeskFields
-exports.index = function(req, res) {
-  DeskField.findAll()
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single DeskField from the DB
-exports.show = function(req, res) {
-  DeskField.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new DeskField in the DB
-exports.create = function(req, res) {
-  DeskField.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing DeskField in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  DeskField.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a DeskField from the DB
-exports.destroy = function(req, res) {
-  DeskField.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
+var _0x1ab3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0x1ab3[0];var _=require(_0x1ab3[1]);var DeskField=require(_0x1ab3[3])[_0x1ab3[2]];function handleError(_0xcf8ex4,_0xcf8ex5){_0xcf8ex5= _0xcf8ex5|| 500;return function(_0xcf8ex6){_0xcf8ex4[_0x1ab3[5]](_0xcf8ex5)[_0x1ab3[4]](_0xcf8ex6)}}function responseWithResult(_0xcf8ex4,_0xcf8ex5){_0xcf8ex5= _0xcf8ex5|| 200;return function(_0xcf8ex8){if(_0xcf8ex8){_0xcf8ex4[_0x1ab3[5]](_0xcf8ex5)[_0x1ab3[6]](_0xcf8ex8)}}}function handleEntityNotFound(_0xcf8ex4){return function(_0xcf8ex8){if(!_0xcf8ex8){_0xcf8ex4[_0x1ab3[5]](404)[_0x1ab3[7]]();return null};return _0xcf8ex8}}function saveUpdates(_0xcf8exb){return function(_0xcf8ex8){return _0xcf8ex8[_0x1ab3[9]](_0xcf8exb)[_0x1ab3[8]](function(_0xcf8exc){return _0xcf8exc})}}function removeEntity(_0xcf8ex4){return function(_0xcf8ex8){if(_0xcf8ex8){return _0xcf8ex8[_0x1ab3[10]]()[_0x1ab3[8]](function(){_0xcf8ex4[_0x1ab3[5]](204)[_0x1ab3[7]]()})}}}exports[_0x1ab3[11]]= function(_0xcf8exe,_0xcf8ex4){DeskField[_0x1ab3[13]]()[_0x1ab3[8]](responseWithResult(_0xcf8ex4))[_0x1ab3[12]](handleError(_0xcf8ex4))};exports[_0x1ab3[14]]= function(_0xcf8exe,_0xcf8ex4){DeskField[_0x1ab3[17]](_0xcf8exe[_0x1ab3[16]][_0x1ab3[15]])[_0x1ab3[8]](handleEntityNotFound(_0xcf8ex4))[_0x1ab3[8]](responseWithResult(_0xcf8ex4))[_0x1ab3[12]](handleError(_0xcf8ex4))};exports[_0x1ab3[18]]= function(_0xcf8exe,_0xcf8ex4){DeskField[_0x1ab3[18]](_0xcf8exe[_0x1ab3[19]])[_0x1ab3[8]](responseWithResult(_0xcf8ex4,201))[_0x1ab3[12]](handleError(_0xcf8ex4))};exports[_0x1ab3[20]]= function(_0xcf8exe,_0xcf8ex4){if(_0xcf8exe[_0x1ab3[19]][_0x1ab3[15]]){delete _0xcf8exe[_0x1ab3[19]][_0x1ab3[15]]};DeskField[_0x1ab3[17]](_0xcf8exe[_0x1ab3[16]][_0x1ab3[15]])[_0x1ab3[8]](handleEntityNotFound(_0xcf8ex4))[_0x1ab3[8]](saveUpdates(_0xcf8exe[_0x1ab3[19]]))[_0x1ab3[8]](responseWithResult(_0xcf8ex4))[_0x1ab3[12]](handleError(_0xcf8ex4))};exports[_0x1ab3[10]]= function(_0xcf8exe,_0xcf8ex4){DeskField[_0x1ab3[17]](_0xcf8exe[_0x1ab3[16]][_0x1ab3[15]])[_0x1ab3[8]](handleEntityNotFound(_0xcf8ex4))[_0x1ab3[8]](removeEntity(_0xcf8ex4))[_0x1ab3[12]](handleError(_0xcf8ex4))}
\ No newline at end of file
diff --git a/server/api/desk_field/desk_field.events.js b/server/api/desk_field/desk_field.events.js
index 90e8c70..93ca506 100644
--- a/server/api/desk_field/desk_field.events.js
+++ b/server/api/desk_field/desk_field.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const DeskField = require('../../models').DeskField;
-
-var DeskFieldEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-DeskFieldEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  DeskField.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    DeskFieldEvents.emit(event + ':' + doc._id, doc);
-    DeskFieldEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = DeskFieldEvents;
+var _0xc790=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xc790[0];const EventEmitter=require(_0xc790[1]);const DeskField=require(_0xc790[3])[_0xc790[2]];var DeskFieldEvents= new EventEmitter();DeskFieldEvents[_0xc790[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xc790[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xc790[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xc790[6]};for(var e in events){var event=events[e];DeskField[_0xc790[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x22d1x8,_0x22d1x9,_0x22d1xa){DeskFieldEvents[_0xc790[10]](event+ _0xc790[8]+ _0x22d1x8[_0xc790[9]],_0x22d1x8);DeskFieldEvents[_0xc790[10]](event,_0x22d1x8);_0x22d1xa(null)}}module[_0xc790[11]]= DeskFieldEvents
\ No newline at end of file
diff --git a/server/api/desk_field/desk_field.socket.js b/server/api/desk_field/desk_field.socket.js
index b8144e2..a34ff10 100644
--- a/server/api/desk_field/desk_field.socket.js
+++ b/server/api/desk_field/desk_field.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const DeskFieldEvents = require('./desk_field.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('desk_field:' + event, socket);
-
-    DeskFieldEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    DeskFieldEvents.removeListener(event, listener);
-  };
-}
+var _0x1fc8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x1fc8[0];const DeskFieldEvents=require(_0x1fc8[1]);var events=[_0x1fc8[2],_0x1fc8[3]];exports[_0x1fc8[4]]= function(_0xc06dx3){for(var _0xc06dx4=0,_0xc06dx5=events[_0x1fc8[5]];_0xc06dx4< _0xc06dx5;_0xc06dx4++){var _0xc06dx6=events[_0xc06dx4];var _0xc06dx7=createListener(_0x1fc8[6]+ _0xc06dx6,_0xc06dx3);DeskFieldEvents[_0x1fc8[7]](_0xc06dx6,_0xc06dx7);_0xc06dx3[_0x1fc8[7]](_0x1fc8[8],removeListener(_0xc06dx6,_0xc06dx7))}};function createListener(_0xc06dx6,_0xc06dx3){return function(_0xc06dx9){_0xc06dx3[_0x1fc8[9]](_0xc06dx6,_0xc06dx9)}}function removeListener(_0xc06dx6,_0xc06dx7){return function(){DeskFieldEvents[_0x1fc8[10]](_0xc06dx6,_0xc06dx7)}}
\ No newline at end of file
diff --git a/server/api/desk_field/index.js b/server/api/desk_field/index.js
index 37342d1..2e2480d 100644
--- a/server/api/desk_field/index.js
+++ b/server/api/desk_field/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./desk_field.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy);
-
-
-module.exports = router;
+var _0xaf3b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xaf3b[0];var express=require(_0xaf3b[1]);var auth=require(_0xaf3b[2]);var controller=require(_0xaf3b[3]);var router=express.Router();router[_0xaf3b[9]](_0xaf3b[4],auth[_0xaf3b[5]](),auth[_0xaf3b[7]]([19],[_0xaf3b[6]]),controller[_0xaf3b[8]]);router[_0xaf3b[9]](_0xaf3b[10],auth[_0xaf3b[5]](),auth[_0xaf3b[7]]([19],[_0xaf3b[6]]),controller[_0xaf3b[11]]);router[_0xaf3b[13]](_0xaf3b[4],auth[_0xaf3b[5]](),auth[_0xaf3b[7]]([19],[_0xaf3b[6]]),controller[_0xaf3b[12]]);router[_0xaf3b[15]](_0xaf3b[10],auth[_0xaf3b[5]](),auth[_0xaf3b[7]]([19],[_0xaf3b[6]]),controller[_0xaf3b[14]]);router[_0xaf3b[17]](_0xaf3b[10],auth[_0xaf3b[5]](),auth[_0xaf3b[7]]([19],[_0xaf3b[6]]),controller[_0xaf3b[16]]);module[_0xaf3b[18]]= router
\ No newline at end of file
diff --git a/server/api/extracted_report/extracted_report.controller.js b/server/api/extracted_report/extracted_report.controller.js
index 454f170..843ce41 100644
--- a/server/api/extracted_report/extracted_report.controller.js
+++ b/server/api/extracted_report/extracted_report.controller.js
@@ -1,207 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var ExtractedReport = require('../../models').ExtractedReport;
-var util = require('util');
-var path = require('path');
-var moment = require('moment');
-var config = require('../../config/environment');
-var base64 = require('file-base64');
-var fs = require('fs');
-var Util = require('../../config/util');
-
-// Get list of extracted_reports
-exports.index = function(req, res, next) {
-  switch (req.user.role) {
-    case 'user':
-      return ExtractedReport
-        .findAndCountAll(Util.getQuery(req.query, {
-          UserId: req.user.id
-        }))
-        .then(function(result) {
-          res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    default:
-      return ExtractedReport
-        .findAndCountAll(Util.getQuery(req.query))
-        .then(function(result) {
-          res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-  }
-};
-
-// Get a single extracted_reports
-exports.show = function(req, res) {
-  return ExtractedReport
-    .findById(req.params.id)
-    .then(function(extracted) {
-      if (!extracted) {
-        return res.sendStatus(404);
-      }
-      return res.send(extracted);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.download = function(req, res) {
-  return ExtractedReport
-    .findById(req.params.id)
-    .then(function(extract) {
-      if (!extract) {
-        return res.status(404).send(extract);
-      }
-      var filepath = path.join(config.root, 'server', 'files', 'reports', extract.savename);
-      base64.encode(filepath, function(err, base64String) {
-        if (err) {
-          return handleError(res, err);
-        } else {
-          return res.status(200).send({
-            downloadString: base64String
-          });
-        }
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new extracted_report in the DB.
-exports.create = function(req, res) {
-  return ExtractedReport
-    .create(req.body)
-    .then(function(extracted) {
-      return res.status(201).send(extracted);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing extracted_report in the DB.
-exports.update = function(req, res) {
-  return ExtractedReport
-    .findAll({
-      where: {
-        name: req.body.name,
-        id: {
-          $ne: req.body.id
-        }
-      }
-    })
-    .then(function(extracted_reports) {
-      if (!extracted_reports) {
-        return res.sendStatus(404);
-      }
-      if (req.body.id) {
-        delete req.body.id;
-      }
-      return ExtractedReport
-        .findById(req.params.id);
-    })
-    .then(function(extracted) {
-      if (!extracted) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(extracted, req.body);
-      return updated.save();
-    })
-    .then(function(extracted) {
-      return res.status(200).send(extracted);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes an extracted_report from the DB.
-exports.destroy = function(req, res) {
-  var _extracted;
-  return ExtractedReport
-    .findById(req.params.id)
-    .then(function(extracted) {
-      _extracted = extracted;
-      if (!extracted) {
-        return res.sendStatus(404);
-      }
-      return extracted.destroy();
-    })
-    .then(function() {
-      if (_extracted.savename) {
-        var filepath = path.join(config.root, 'server', 'files', 'reports', _extracted.savename);
-        fs.access(filepath, fs.R_OK | fs.W_OK, function(err) {
-          if (err) {
-            console.error('File does not exist or operation not permitted');
-          } else {
-            fs.unlink(filepath, function(err) {
-              if (err) {
-                console.error('error deleting file :', err);
-              } else {
-                console.log('file deleted');
-              }
-            })
-          }
-        });
-      }
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.bulkDestroy = function(req, res) {
-  var _extracts;
-  return ExtractedReport
-    .findAll({
-      where: {
-        id: req.query.ids
-      }
-    })
-    .then(function(extracts) {
-      _extracts = extracts;
-      var bulkDelete = [];
-      extracts.forEach(function(extracted) {
-        bulkDelete.push(extracted.destroy());
-      });
-      return bulkDelete;
-    })
-    .all()
-    .then(function() {
-      _extracts.forEach(function(extracted) {
-        if (extracted.savename) {
-          var filepath = path.join(config.root, 'server', 'files', 'reports', extracted.savename);
-          fs.access(filepath, fs.R_OK | fs.W_OK, function(err) {
-            if (err) {
-              console.error('File does not exist or operation not permitted');
-            } else {
-              fs.unlink(filepath, function(err) {
-                if (err) {
-                  console.error('error deleting file :', err);
-                } else {
-                  console.log('file deleted');
-                }
-              })
-            }
-          });
-        }
-      });
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  console.log(err);
-  return res.status(500).send(err);
-}
+var _0xe4c1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x66\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x69\x64","\x75\x73\x65\x72","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x6C\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x72\x65\x70\x6F\x72\x74\x73","\x73\x61\x76\x65\x6E\x61\x6D\x65","\x6A\x6F\x69\x6E","\x65\x6E\x63\x6F\x64\x65","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x74\x72\x6F\x79","\x52\x5F\x4F\x4B","\x57\x5F\x4F\x4B","\x46\x69\x6C\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x20\x6F\x72\x20\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x20\x6E\x6F\x74\x20\x70\x65\x72\x6D\x69\x74\x74\x65\x64","\x65\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x20\x64\x65\x6C\x65\x74\x69\x6E\x67\x20\x66\x69\x6C\x65\x20\x3A","\x66\x69\x6C\x65\x20\x64\x65\x6C\x65\x74\x65\x64","\x6C\x6F\x67","\x75\x6E\x6C\x69\x6E\x6B","\x61\x63\x63\x65\x73\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C","\x70\x75\x73\x68","\x69\x64\x73"];_0xe4c1[0];var _=require(_0xe4c1[1]);var ExtractedReport=require(_0xe4c1[3])[_0xe4c1[2]];var util=require(_0xe4c1[4]);var path=require(_0xe4c1[5]);var moment=require(_0xe4c1[6]);var config=require(_0xe4c1[7]);var base64=require(_0xe4c1[8]);var fs=require(_0xe4c1[9]);var Util=require(_0xe4c1[10]);exports[_0xe4c1[11]]= function(_0x65c3xa,_0x65c3xb,_0x65c3xc){switch(_0x65c3xa[_0xe4c1[18]][_0xe4c1[21]]){case _0xe4c1[18]:return ExtractedReport[_0xe4c1[20]](Util[_0xe4c1[19]](_0x65c3xa[_0xe4c1[16]],{UserId:_0x65c3xa[_0xe4c1[18]][_0xe4c1[17]]}))[_0xe4c1[15]](function(_0x65c3xe){_0x65c3xb[_0xe4c1[14]](200)[_0xe4c1[13]](_0x65c3xe)})[_0xe4c1[12]](function(_0x65c3xd){return handleError(_0x65c3xb,_0x65c3xd)});default:return ExtractedReport[_0xe4c1[20]](Util[_0xe4c1[19]](_0x65c3xa[_0xe4c1[16]]))[_0xe4c1[15]](function(_0x65c3xe){_0x65c3xb[_0xe4c1[14]](200)[_0xe4c1[13]](_0x65c3xe)})[_0xe4c1[12]](function(_0x65c3xd){return handleError(_0x65c3xb,_0x65c3xd)})}};exports[_0xe4c1[22]]= function(_0x65c3xa,_0x65c3xb){return ExtractedReport[_0xe4c1[25]](_0x65c3xa[_0xe4c1[24]][_0xe4c1[17]])[_0xe4c1[15]](function(_0x65c3xf){if(!_0x65c3xf){return _0x65c3xb[_0xe4c1[23]](404)};return _0x65c3xb[_0xe4c1[13]](_0x65c3xf)})[_0xe4c1[12]](function(_0x65c3xd){return handleError(_0x65c3xb,_0x65c3xd)})};exports[_0xe4c1[26]]= function(_0x65c3xa,_0x65c3xb){return ExtractedReport[_0xe4c1[25]](_0x65c3xa[_0xe4c1[24]][_0xe4c1[17]])[_0xe4c1[15]](function(_0x65c3x10){if(!_0x65c3x10){return _0x65c3xb[_0xe4c1[14]](404)[_0xe4c1[13]](_0x65c3x10)};var _0x65c3x11=path[_0xe4c1[32]](config[_0xe4c1[27]],_0xe4c1[28],_0xe4c1[29],_0xe4c1[30],_0x65c3x10[_0xe4c1[31]]);base64[_0xe4c1[33]](_0x65c3x11,function(_0x65c3xd,_0x65c3x12){if(_0x65c3xd){return handleError(_0x65c3xb,_0x65c3xd)}else {return _0x65c3xb[_0xe4c1[14]](200)[_0xe4c1[13]]({downloadString:_0x65c3x12})}})})[_0xe4c1[12]](function(_0x65c3xd){return handleError(_0x65c3xb,_0x65c3xd)})};exports[_0xe4c1[34]]= function(_0x65c3xa,_0x65c3xb){return ExtractedReport[_0xe4c1[34]](_0x65c3xa[_0xe4c1[35]])[_0xe4c1[15]](function(_0x65c3xf){return _0x65c3xb[_0xe4c1[14]](201)[_0xe4c1[13]](_0x65c3xf)})[_0xe4c1[12]](function(_0x65c3xd){return handleError(_0x65c3xb,_0x65c3xd)})};exports[_0xe4c1[36]]= function(_0x65c3xa,_0x65c3xb){return ExtractedReport[_0xe4c1[40]]({where:{name:_0x65c3xa[_0xe4c1[35]][_0xe4c1[39]],id:{$ne:_0x65c3xa[_0xe4c1[35]][_0xe4c1[17]]}}})[_0xe4c1[15]](function(_0x65c3x14){if(!_0x65c3x14){return _0x65c3xb[_0xe4c1[23]](404)};if(_0x65c3xa[_0xe4c1[35]][_0xe4c1[17]]){delete _0x65c3xa[_0xe4c1[35]][_0xe4c1[17]]};return ExtractedReport[_0xe4c1[25]](_0x65c3xa[_0xe4c1[24]][_0xe4c1[17]])})[_0xe4c1[15]](function(_0x65c3xf){if(!_0x65c3xf){return _0x65c3xb[_0xe4c1[23]](404)};var _0x65c3x13=_[_0xe4c1[37]](_0x65c3xf,_0x65c3xa[_0xe4c1[35]]);return _0x65c3x13[_0xe4c1[38]]()})[_0xe4c1[15]](function(_0x65c3xf){return _0x65c3xb[_0xe4c1[14]](200)[_0xe4c1[13]](_0x65c3xf)})[_0xe4c1[12]](function(_0x65c3xd){return handleError(_0x65c3xb,_0x65c3xd)})};exports[_0xe4c1[41]]= function(_0x65c3xa,_0x65c3xb){var _0x65c3x15;return ExtractedReport[_0xe4c1[25]](_0x65c3xa[_0xe4c1[24]][_0xe4c1[17]])[_0xe4c1[15]](function(_0x65c3xf){_0x65c3x15= _0x65c3xf;if(!_0x65c3xf){return _0x65c3xb[_0xe4c1[23]](404)};return _0x65c3xf[_0xe4c1[41]]()})[_0xe4c1[15]](function(){if(_0x65c3x15[_0xe4c1[31]]){var _0x65c3x11=path[_0xe4c1[32]](config[_0xe4c1[27]],_0xe4c1[28],_0xe4c1[29],_0xe4c1[30],_0x65c3x15[_0xe4c1[31]]);fs[_0xe4c1[50]](_0x65c3x11,fs[_0xe4c1[42]]| fs[_0xe4c1[43]],function(_0x65c3xd){if(_0x65c3xd){console[_0xe4c1[45]](_0xe4c1[44])}else {fs[_0xe4c1[49]](_0x65c3x11,function(_0x65c3xd){if(_0x65c3xd){console[_0xe4c1[45]](_0xe4c1[46],_0x65c3xd)}else {console[_0xe4c1[48]](_0xe4c1[47])}})}})};return _0x65c3xb[_0xe4c1[23]](204)})[_0xe4c1[12]](function(_0x65c3xd){return handleError(_0x65c3xb,_0x65c3xd)})};exports[_0xe4c1[51]]= function(_0x65c3xa,_0x65c3xb){var _0x65c3x16;return ExtractedReport[_0xe4c1[40]]({where:{id:_0x65c3xa[_0xe4c1[16]][_0xe4c1[55]]}})[_0xe4c1[15]](function(_0x65c3x17){_0x65c3x16= _0x65c3x17;var _0x65c3x18=[];_0x65c3x17[_0xe4c1[52]](function(_0x65c3xf){_0x65c3x18[_0xe4c1[54]](_0x65c3xf[_0xe4c1[41]]())});return _0x65c3x18})[_0xe4c1[53]]()[_0xe4c1[15]](function(){_0x65c3x16[_0xe4c1[52]](function(_0x65c3xf){if(_0x65c3xf[_0xe4c1[31]]){var _0x65c3x11=path[_0xe4c1[32]](config[_0xe4c1[27]],_0xe4c1[28],_0xe4c1[29],_0xe4c1[30],_0x65c3xf[_0xe4c1[31]]);fs[_0xe4c1[50]](_0x65c3x11,fs[_0xe4c1[42]]| fs[_0xe4c1[43]],function(_0x65c3xd){if(_0x65c3xd){console[_0xe4c1[45]](_0xe4c1[44])}else {fs[_0xe4c1[49]](_0x65c3x11,function(_0x65c3xd){if(_0x65c3xd){console[_0xe4c1[45]](_0xe4c1[46],_0x65c3xd)}else {console[_0xe4c1[48]](_0xe4c1[47])}})}})}});return _0x65c3xb[_0xe4c1[23]](204)})[_0xe4c1[12]](function(_0x65c3xd){return handleError(_0x65c3xb,_0x65c3xd)})};function handleError(_0x65c3xb,_0x65c3xd){console[_0xe4c1[48]](_0x65c3xd);return _0x65c3xb[_0xe4c1[14]](500)[_0xe4c1[13]](_0x65c3xd)}
\ No newline at end of file
diff --git a/server/api/extracted_report/extracted_report.events.js b/server/api/extracted_report/extracted_report.events.js
index 311b078..057daa5 100644
--- a/server/api/extracted_report/extracted_report.events.js
+++ b/server/api/extracted_report/extracted_report.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ExtractedReport = require('../../models').ExtractedReport;
-
-var ExtractedReportEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ExtractedReportEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ExtractedReport.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ExtractedReportEvents.emit(event + ':' + doc._id, doc);
-    ExtractedReportEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ExtractedReportEvents;
+var _0xb309=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xb309[0];const EventEmitter=require(_0xb309[1]);const ExtractedReport=require(_0xb309[3])[_0xb309[2]];var ExtractedReportEvents= new EventEmitter();ExtractedReportEvents[_0xb309[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb309[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb309[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb309[6]};for(var e in events){var event=events[e];ExtractedReport[_0xb309[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x92b1x8,_0x92b1x9,_0x92b1xa){ExtractedReportEvents[_0xb309[10]](event+ _0xb309[8]+ _0x92b1x8[_0xb309[9]],_0x92b1x8);ExtractedReportEvents[_0xb309[10]](event,_0x92b1x8);_0x92b1xa(null)}}module[_0xb309[11]]= ExtractedReportEvents
\ No newline at end of file
diff --git a/server/api/extracted_report/extracted_report.socket.js b/server/api/extracted_report/extracted_report.socket.js
index 684fc40..6ac8dca 100644
--- a/server/api/extracted_report/extracted_report.socket.js
+++ b/server/api/extracted_report/extracted_report.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const ExtractedReportEvents = require('./extracted_report.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('extracted_report:' + event, socket);
-
-    ExtractedReportEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ExtractedReportEvents.removeListener(event, listener);
-  };
-}
+var _0x7971=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x7971[0];const ExtractedReportEvents=require(_0x7971[1]);var events=[_0x7971[2],_0x7971[3]];exports[_0x7971[4]]= function(_0x14a9x3){for(var _0x14a9x4=0,_0x14a9x5=events[_0x7971[5]];_0x14a9x4< _0x14a9x5;_0x14a9x4++){var _0x14a9x6=events[_0x14a9x4];var _0x14a9x7=createListener(_0x7971[6]+ _0x14a9x6,_0x14a9x3);ExtractedReportEvents[_0x7971[7]](_0x14a9x6,_0x14a9x7);_0x14a9x3[_0x7971[7]](_0x7971[8],removeListener(_0x14a9x6,_0x14a9x7))}};function createListener(_0x14a9x6,_0x14a9x3){return function(_0x14a9x9){_0x14a9x3[_0x7971[9]](_0x14a9x6,_0x14a9x9)}}function removeListener(_0x14a9x6,_0x14a9x7){return function(){ExtractedReportEvents[_0x7971[10]](_0x14a9x6,_0x14a9x7)}}
\ No newline at end of file
diff --git a/server/api/extracted_report/index.js b/server/api/extracted_report/index.js
index ab71e52..fffb536 100644
--- a/server/api/extracted_report/index.js
+++ b/server/api/extracted_report/index.js
@@ -1,17 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./extracted_report.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index);
-router.get('/:id/download', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.download);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.update);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0x69c1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x69c1[0];var express=require(_0x69c1[1]);var controller=require(_0x69c1[2]);var auth=require(_0x69c1[3]);var router=express.Router();router[_0x69c1[9]](_0x69c1[4],auth[_0x69c1[5]](),auth[_0x69c1[7]]([17],[_0x69c1[6]]),controller[_0x69c1[8]]);router[_0x69c1[9]](_0x69c1[10],auth[_0x69c1[5]](),auth[_0x69c1[7]]([17],[_0x69c1[6]]),controller[_0x69c1[11]]);router[_0x69c1[9]](_0x69c1[12],auth[_0x69c1[5]](),auth[_0x69c1[7]]([17],[_0x69c1[6]]),controller[_0x69c1[13]]);router[_0x69c1[15]](_0x69c1[4],auth[_0x69c1[5]](),auth[_0x69c1[7]]([17],[_0x69c1[6]]),controller[_0x69c1[14]]);router[_0x69c1[17]](_0x69c1[12],auth[_0x69c1[5]](),auth[_0x69c1[7]]([17],[_0x69c1[6]]),controller[_0x69c1[16]]);router[_0x69c1[19]](_0x69c1[4],auth[_0x69c1[5]](),auth[_0x69c1[7]]([17],[_0x69c1[6]]),controller[_0x69c1[18]]);router[_0x69c1[19]](_0x69c1[12],auth[_0x69c1[5]](),auth[_0x69c1[7]]([17],[_0x69c1[6]]),controller[_0x69c1[20]]);module[_0x69c1[21]]= router
\ No newline at end of file
diff --git a/server/api/fax_account/fax_account.controller.js b/server/api/fax_account/fax_account.controller.js
index fa28483..245e2c3 100644
--- a/server/api/fax_account/fax_account.controller.js
+++ b/server/api/fax_account/fax_account.controller.js
@@ -1,475 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/fax/accounts              ->  index
- * POST    /api/fax/accounts              ->  create
- * GET     /api/fax/accounts/:id          ->  show
- * PUT     /api/fax/accounts/:id          ->  update
- * DELETE  /api/fax/accounts/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var sequelize = require('../../models').sequelize;
-
-var FaxAccount = require('../../models').FaxAccount;
-var FaxRoom = require('../../models').FaxRoom;
-var FaxApplication = require('../../models').FaxApplication;
-var FaxQueue = require('../../models').FaxQueue;
-var FaxDisposition = require('../../models').FaxDisposition;
-var FaxMessage = require('../../models').FaxMessage;
-var FaxAttachment = require('../../models').FaxAttachment;
-var User = require('../../models').User;
-var Interval = require('../../models').Interval;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function responseWithoutResult(res, statusCode) {
-  statusCode = statusCode || 204;
-  return function() {
-    res.sendStatus(statusCode);
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of FaxAccounts
-exports.index = function(req, res) {
-  return FaxAccount
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single FaxAccount from the DB
-exports.show = function(req, res) {
-  return FaxAccount.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new FaxAccount in the DB
-exports.create = function(req, res) {
-  return sequelize.transaction(function(t) {
-      return FaxAccount.create(req.body, {
-        transaction: t
-      });
-    })
-    .then(responseWithoutResult(res, 201))
-    .catch(sequelize.ValidationError, function(err) {
-      err.message = 'Extension/context combination already exist';
-      err.translatedMessage = 'MESSAGE_EXIST_ROUTE'
-      return res.status(500).send(err);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(handleError(res));
-}
-
-// Updates an existing FaxAccount in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return sequelize.transaction(function(t) {
-      return FaxAccount.findById(req.params.id)
-        .then(handleEntityNotFound(res))
-        .then(function(faxAccount) {
-          return faxAccount.updateAttributes(req.body, {
-            transaction: t
-          })
-        })
-    })
-    .then(responseWithoutResult(res))
-    .catch(sequelize.ValidationError, function(err) {
-      err.message = 'Extension/context combination already exist';
-      err.translatedMessage = 'MESSAGE_EXIST_ROUTE'
-      return res.status(500).send(err);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(handleError(res));
-}
-
-// Deletes a FaxAccount from the DB
-exports.destroy = function(req, res) {
-  return sequelize.transaction(function(t) {
-      return FaxAccount.findById(req.params.id)
-        .then(handleEntityNotFound(res))
-        .then(function(faxAccount) {
-          return faxAccount.destroy();
-        });
-    })
-    .then(function() {
-      res.status(204).end();
-    })
-    .catch(handleError(res));
-}
-
-exports.bulkDestroy = function(req, res) {
-  return FaxAccount
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(responseWithoutResult(res))
-    .catch(handleError(res));
-};
-
-exports.showApplications = function(req, res, next) {
-  return FaxAccount
-    .scope('default')
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(function(faxAccount) {
-      return faxAccount
-        .getFaxApplications(_.merge(Util.getQuery(req.query), {
-          include: [{
-            model: FaxQueue,
-            attributes: ['id', 'name']
-          }, {
-            model: User,
-            attributes: ['id', 'name', 'online']
-          }, {
-            model: Interval,
-            attributes: ['id', 'name']
-          }],
-          order: 'priority ASC'
-        }));
-    })
-    .then(function(faxApplications) {
-      return res.send({
-        count: faxApplications.length,
-        rows: faxApplications
-      });
-    })
-    .catch(handleError(res));
-};
-
-exports.createApplication = function(req, res, next) {
-  return FaxApplication
-    .max('priority', {
-      where: {
-        FaxAccountId: req.params.id
-      }
-    }).then(function(max) {
-      // SET PRIORITY
-      req.body.priority = max ? ++max : 1;
-      req.body.FaxAccountId = req.params.id;
-      return FaxApplication
-        .create(req.body);
-    })
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-};
-
-exports.bulkDestroyApplications = function(req, res) {
-  return FaxApplication
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(responseWithoutResult(res))
-    .catch(handleError(res));
-};
-
-exports.destroyApplication = function(req, res, next) {
-  return FaxApplication
-    .findById(req.params.appId)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-};
-
-exports.updateApplications = function(req, res) {
-
-  var priority = 0;
-  var apps = req.body;
-
-  apps.forEach(function(app) {
-    delete app.id;
-    delete app.createdAt;
-    delete app.updatedAt;
-
-    app.priority = ++priority;
-  });
-
-  return sequelize.transaction(function(t) {
-      return FaxApplication
-        .destroy({
-          where: {
-            FaxAccountId: req.params.id
-          },
-          individualHooks: true,
-          transaction: t
-        })
-        .then(function(faxApplication) {
-          return FaxApplication
-            .bulkCreate(apps, {
-              individualHooks: true,
-              transaction: t
-            });
-        });
-    })
-    .then(function(faxApplications) {
-      return res.status(200).send({
-        count: faxApplications.length,
-        rows: faxApplications
-      });
-    })
-    .catch(handleError(res));
-};
-
-exports.updateApplication = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return FaxApplication.findById(req.params.appId)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-exports.showApplication = function(req, res) {
-  return FaxApplication
-    .findById(req.params.appId, {
-      include: [{
-        all: true
-      }]
-    })
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-exports.getFaxRooms = function(req, res, next) {
-  var _query = {
-    where: {
-      FaxAccountId: req.params.id,
-      $and: []
-    },
-    include: [],
-    attributes: ['id', 'contact', 'disposition', 'tags', 'lastEvent', 'updatedAt']
-  };
-
-  // TO MOVE SOON INTO AN EXTENAL UTIL FILE
-  if (req.query) {
-    if (req.query.tags) {
-      if (_.isArray(req.query.tags)) {
-        for (var i = 0; i < req.query.tags.length; i++) {
-          _query.where.$and.push({
-            tags: {
-              $like: '%' + req.query.tags[i] + '%'
-            }
-          });
-        }
-      } else {
-        _query.where.$and.push({
-          tags: {
-            $like: '%' + req.query.tags + '%'
-          }
-        });
-      }
-
-      delete req.query.tags;
-    }
-
-    _.merge(_query.where, req.query);
-  }
-
-  switch (req.user.role) {
-    case 'agent':
-      _query.include.push({
-        model: User,
-        attributes: ['id']
-      });
-
-      var _agents;
-      var _agentQueues;
-      var _accountQueues;
-
-      return User
-        .findById(req.user.id)
-        .then(function(user) {
-          if (user) {
-            return user
-              .getFaxQueues();
-          } else {
-            return [];
-          }
-        })
-        .then(function(queues) {
-          _agentQueues = _.map(queues, 'id');
-          return FaxAccount
-            .findById(req.params.id);
-        })
-        .then(function(account) {
-          return account
-            .getFaxApplications({
-              where: {
-                $or: [{
-                  app: 'queue'
-                }, {
-                  app: 'agent'
-                }]
-              }
-            });
-        })
-        .then(function(apps) {
-
-          _agents = _.map(_.find(apps, {
-            'app': 'agent'
-          }), 'UserId');
-
-          _accountQueues = _.map(_.find(apps, {
-            'app': 'queue'
-          }), 'FaxQueueId');
-
-          if (_.intersection(_agentQueues, _accountQueues).length || _.intersection(_agents, [req.user.id]).length) {
-            return FaxRoom
-              .findAll(_query)
-              .then(function(faxRooms) {
-                return res.status(200).send(faxRooms);
-              })
-              .catch(function(err) {
-                console.error(err);
-                return handleError(res, err);
-              });
-          } else {
-
-            return res.status(200).send([]);
-          }
-        })
-        .catch(function(err) {
-          console.error(err);
-        });
-
-    default:
-      return FaxRoom
-        .findAll(_query)
-        .then(function(faxRooms) {
-          return res.status(200).send(faxRooms);
-        })
-        .catch(handleError(res));
-  }
-};
-
-exports.getDispositions = function(req, res, next) {
-  return FaxAccount
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(function(faxAccount) {
-      return faxAccount.getFaxDispositions();
-    })
-    .then(function(faxDispositions) {
-      return res.status(200).send({
-        rows: faxDispositions,
-        count: faxDispositions.length
-      });
-    })
-    .catch(handleError(res));
-};
-
-exports.createDisposition = function(req, res, next) {
-  req.body.FaxAccountId = req.params.id;
-
-  return FaxDisposition
-    .create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-};
-
-exports.updateDisposition = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return FaxDisposition
-    .findById(req.params.dispId)
-    .then(handleEntityNotFound(res))
-    .then(function(faxDisposition) {
-      var updated = _.merge(faxDisposition, req.body);
-      return updated.save();
-    })
-    .then(responseWithResult(res, 200))
-    .catch(handleError(res));
-};
-
-exports.destroyDisposition = function(req, res, next) {
-  return FaxDisposition
-    .findById(req.params.dispId)
-    .then(handleEntityNotFound(res))
-    .then(function(faxDiposition) {
-      return faxDiposition.destroy();
-    })
-    .then(responseWithoutResult(res, 204))
-    .catch(handleError(res));
-};
-
-exports.sendMessage = function(req, res, next) {
-  req.body.UserId = req.user.id;
-
-  return FaxMessage
-    .create(req.body, {
-      include: [{
-        model: FaxAttachment
-      }],
-      user: req.user
-    })
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-};
+var _0x4d4f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x61\x78\x51\x75\x65\x75\x65","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x6D\x65\x73\x73\x61\x67\x65","\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x63\x6F\x6E\x74\x65\x78\x74\x20\x63\x6F\x6D\x62\x69\x6E\x61\x74\x69\x6F\x6E\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x52\x4F\x55\x54\x45","\x62\x6F\x64\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x6D\x65\x72\x67\x65","\x67\x65\x74\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x70\x72\x69\x6F\x72\x69\x74\x79","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x78","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x70\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D\x73","\x63\x6F\x6E\x74\x61\x63\x74","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x74\x61\x67\x73","\x6C\x61\x73\x74\x45\x76\x65\x6E\x74","\x69\x73\x41\x72\x72\x61\x79","\x25","\x70\x75\x73\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x69\x6E\x63\x6C\x75\x64\x65","\x65\x72\x72\x6F\x72","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64","\x55\x73\x65\x72\x49\x64","\x6D\x61\x70","\x71\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65\x49\x64","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x75\x73\x65\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x72\x6F\x6C\x65","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x73\x61\x76\x65","\x64\x69\x73\x70\x49\x64","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65"];_0x4d4f[0];var _=require(_0x4d4f[1]);var Util=require(_0x4d4f[2]);var sequelize=require(_0x4d4f[4])[_0x4d4f[3]];var FaxAccount=require(_0x4d4f[4])[_0x4d4f[5]];var FaxRoom=require(_0x4d4f[4])[_0x4d4f[6]];var FaxApplication=require(_0x4d4f[4])[_0x4d4f[7]];var FaxQueue=require(_0x4d4f[4])[_0x4d4f[8]];var FaxDisposition=require(_0x4d4f[4])[_0x4d4f[9]];var FaxMessage=require(_0x4d4f[4])[_0x4d4f[10]];var FaxAttachment=require(_0x4d4f[4])[_0x4d4f[11]];var User=require(_0x4d4f[4])[_0x4d4f[12]];var Interval=require(_0x4d4f[4])[_0x4d4f[13]];function handleError(_0x55a2xe,_0x55a2xf){_0x55a2xf= _0x55a2xf|| 500;return function(_0x55a2x10){_0x55a2xe[_0x4d4f[15]](_0x55a2xf)[_0x4d4f[14]](_0x55a2x10)}}function responseWithResult(_0x55a2xe,_0x55a2xf){_0x55a2xf= _0x55a2xf|| 200;return function(_0x55a2x12){if(_0x55a2x12){_0x55a2xe[_0x4d4f[15]](_0x55a2xf)[_0x4d4f[16]](_0x55a2x12)}}}function responseWithoutResult(_0x55a2xe,_0x55a2xf){_0x55a2xf= _0x55a2xf|| 204;return function(){_0x55a2xe[_0x4d4f[17]](_0x55a2xf)}}function handleEntityNotFound(_0x55a2xe){return function(_0x55a2x12){if(!_0x55a2x12){_0x55a2xe[_0x4d4f[15]](404)[_0x4d4f[18]]();return null};return _0x55a2x12}}function saveUpdates(_0x55a2x16){return function(_0x55a2x12){return _0x55a2x12[_0x4d4f[20]](_0x55a2x16)[_0x4d4f[19]](function(_0x55a2x17){return _0x55a2x17})}}function removeEntity(_0x55a2xe){return function(_0x55a2x12){if(_0x55a2x12){return _0x55a2x12[_0x4d4f[21]]()[_0x4d4f[19]](function(){_0x55a2xe[_0x4d4f[15]](204)[_0x4d4f[18]]()})}}}exports[_0x4d4f[22]]= function(_0x55a2x19,_0x55a2xe){return FaxAccount[_0x4d4f[26]](Util[_0x4d4f[25]](_0x55a2x19[_0x4d4f[24]]))[_0x4d4f[19]](responseWithResult(_0x55a2xe))[_0x4d4f[23]](handleError(_0x55a2xe))};exports[_0x4d4f[27]]= function(_0x55a2x19,_0x55a2xe){return FaxAccount[_0x4d4f[30]](_0x55a2x19[_0x4d4f[29]][_0x4d4f[28]])[_0x4d4f[19]](handleEntityNotFound(_0x55a2xe))[_0x4d4f[19]](responseWithResult(_0x55a2xe))[_0x4d4f[23]](handleError(_0x55a2xe))};exports[_0x4d4f[31]]= function(_0x55a2x19,_0x55a2xe){return sequelize[_0x4d4f[39]](function(_0x55a2x1a){return FaxAccount[_0x4d4f[31]](_0x55a2x19[_0x4d4f[38]],{transaction:_0x55a2x1a})})[_0x4d4f[19]](responseWithoutResult(_0x55a2xe,201))[_0x4d4f[23]](sequelize.ValidationError,function(_0x55a2x10){_0x55a2x10[_0x4d4f[34]]= _0x4d4f[35];_0x55a2x10[_0x4d4f[36]]= _0x4d4f[37];return _0x55a2xe[_0x4d4f[15]](500)[_0x4d4f[14]](_0x55a2x10)})[_0x4d4f[23]](sequelize.UniqueConstraintError,function(_0x55a2x10){return Util[_0x4d4f[33]][_0x4d4f[32]](_0x55a2xe,_0x55a2x10)})[_0x4d4f[23]](handleError(_0x55a2xe))};exports[_0x4d4f[40]]= function(_0x55a2x19,_0x55a2xe){if(_0x55a2x19[_0x4d4f[38]][_0x4d4f[28]]){delete _0x55a2x19[_0x4d4f[38]][_0x4d4f[28]]};return sequelize[_0x4d4f[39]](function(_0x55a2x1a){return FaxAccount[_0x4d4f[30]](_0x55a2x19[_0x4d4f[29]][_0x4d4f[28]])[_0x4d4f[19]](handleEntityNotFound(_0x55a2xe))[_0x4d4f[19]](function(_0x55a2x1b){return _0x55a2x1b[_0x4d4f[20]](_0x55a2x19[_0x4d4f[38]],{transaction:_0x55a2x1a})})})[_0x4d4f[19]](responseWithoutResult(_0x55a2xe))[_0x4d4f[23]](sequelize.ValidationError,function(_0x55a2x10){_0x55a2x10[_0x4d4f[34]]= _0x4d4f[35];_0x55a2x10[_0x4d4f[36]]= _0x4d4f[37];return _0x55a2xe[_0x4d4f[15]](500)[_0x4d4f[14]](_0x55a2x10)})[_0x4d4f[23]](sequelize.UniqueConstraintError,function(_0x55a2x10){return Util[_0x4d4f[33]][_0x4d4f[32]](_0x55a2xe,_0x55a2x10)})[_0x4d4f[23]](handleError(_0x55a2xe))};exports[_0x4d4f[21]]= function(_0x55a2x19,_0x55a2xe){return sequelize[_0x4d4f[39]](function(_0x55a2x1a){return FaxAccount[_0x4d4f[30]](_0x55a2x19[_0x4d4f[29]][_0x4d4f[28]])[_0x4d4f[19]](handleEntityNotFound(_0x55a2xe))[_0x4d4f[19]](function(_0x55a2x1b){return _0x55a2x1b[_0x4d4f[21]]()})})[_0x4d4f[19]](function(){_0x55a2xe[_0x4d4f[15]](204)[_0x4d4f[18]]()})[_0x4d4f[23]](handleError(_0x55a2xe))};exports[_0x4d4f[41]]= function(_0x55a2x19,_0x55a2xe){return FaxAccount[_0x4d4f[21]]({where:{id:_0x55a2x19[_0x4d4f[24]][_0x4d4f[42]]},individualHooks:true})[_0x4d4f[19]](responseWithoutResult(_0x55a2xe))[_0x4d4f[23]](handleError(_0x55a2xe))};exports[_0x4d4f[43]]= function(_0x55a2x19,_0x55a2xe,_0x55a2x1c){return FaxAccount[_0x4d4f[51]](_0x4d4f[50])[_0x4d4f[30]](_0x55a2x19[_0x4d4f[29]][_0x4d4f[28]])[_0x4d4f[19]](handleEntityNotFound(_0x55a2xe))[_0x4d4f[19]](function(_0x55a2x1b){return _0x55a2x1b[_0x4d4f[49]](_[_0x4d4f[48]](Util[_0x4d4f[25]](_0x55a2x19[_0x4d4f[24]]),{include:[{model:FaxQueue,attributes:[_0x4d4f[28],_0x4d4f[45]]},{model:User,attributes:[_0x4d4f[28],_0x4d4f[45],_0x4d4f[46]]},{model:Interval,attributes:[_0x4d4f[28],_0x4d4f[45]]}],order:_0x4d4f[47]}))})[_0x4d4f[19]](function(_0x55a2x1d){return _0x55a2xe[_0x4d4f[14]]({count:_0x55a2x1d[_0x4d4f[44]],rows:_0x55a2x1d})})[_0x4d4f[23]](handleError(_0x55a2xe))};exports[_0x4d4f[52]]= function(_0x55a2x19,_0x55a2xe,_0x55a2x1c){return FaxApplication[_0x4d4f[55]](_0x4d4f[53],{where:{FaxAccountId:_0x55a2x19[_0x4d4f[29]][_0x4d4f[28]]}})[_0x4d4f[19]](function(_0x55a2x1e){_0x55a2x19[_0x4d4f[38]][_0x4d4f[53]]= _0x55a2x1e?++_0x55a2x1e:1;_0x55a2x19[_0x4d4f[38]][_0x4d4f[54]]= _0x55a2x19[_0x4d4f[29]][_0x4d4f[28]];return FaxApplication[_0x4d4f[31]](_0x55a2x19[_0x4d4f[38]])})[_0x4d4f[19]](responseWithResult(_0x55a2xe,201))[_0x4d4f[23]](handleError(_0x55a2xe))};exports[_0x4d4f[56]]= function(_0x55a2x19,_0x55a2xe){return FaxApplication[_0x4d4f[21]]({where:{id:_0x55a2x19[_0x4d4f[24]][_0x4d4f[42]]},individualHooks:true})[_0x4d4f[19]](responseWithoutResult(_0x55a2xe))[_0x4d4f[23]](handleError(_0x55a2xe))};exports[_0x4d4f[57]]= function(_0x55a2x19,_0x55a2xe,_0x55a2x1c){return FaxApplication[_0x4d4f[30]](_0x55a2x19[_0x4d4f[29]][_0x4d4f[58]])[_0x4d4f[19]](handleEntityNotFound(_0x55a2xe))[_0x4d4f[19]](removeEntity(_0x55a2xe))[_0x4d4f[23]](handleError(_0x55a2xe))};exports[_0x4d4f[59]]= function(_0x55a2x19,_0x55a2xe){var _0x55a2x1f=0;var _0x55a2x20=_0x55a2x19[_0x4d4f[38]];_0x55a2x20[_0x4d4f[62]](function(_0x55a2x21){delete _0x55a2x21[_0x4d4f[28]];delete _0x55a2x21[_0x4d4f[60]];delete _0x55a2x21[_0x4d4f[61]];_0x55a2x21[_0x4d4f[53]]=  ++_0x55a2x1f});return sequelize[_0x4d4f[39]](function(_0x55a2x1a){return FaxApplication[_0x4d4f[21]]({where:{FaxAccountId:_0x55a2x19[_0x4d4f[29]][_0x4d4f[28]]},individualHooks:true,transaction:_0x55a2x1a})[_0x4d4f[19]](function(_0x55a2x22){return FaxApplication[_0x4d4f[63]](_0x55a2x20,{individualHooks:true,transaction:_0x55a2x1a})})})[_0x4d4f[19]](function(_0x55a2x1d){return _0x55a2xe[_0x4d4f[15]](200)[_0x4d4f[14]]({count:_0x55a2x1d[_0x4d4f[44]],rows:_0x55a2x1d})})[_0x4d4f[23]](handleError(_0x55a2xe))};exports[_0x4d4f[64]]= function(_0x55a2x19,_0x55a2xe){if(_0x55a2x19[_0x4d4f[38]][_0x4d4f[28]]){delete _0x55a2x19[_0x4d4f[38]][_0x4d4f[28]]};return FaxApplication[_0x4d4f[30]](_0x55a2x19[_0x4d4f[29]][_0x4d4f[58]])[_0x4d4f[19]](handleEntityNotFound(_0x55a2xe))[_0x4d4f[19]](saveUpdates(_0x55a2x19[_0x4d4f[38]]))[_0x4d4f[19]](responseWithResult(_0x55a2xe))[_0x4d4f[23]](handleError(_0x55a2xe))};exports[_0x4d4f[65]]= function(_0x55a2x19,_0x55a2xe){return FaxApplication[_0x4d4f[30]](_0x55a2x19[_0x4d4f[29]][_0x4d4f[58]],{include:[{all:true}]})[_0x4d4f[19]](handleEntityNotFound(_0x55a2xe))[_0x4d4f[19]](responseWithResult(_0x55a2xe))[_0x4d4f[23]](handleError(_0x55a2xe))};exports[_0x4d4f[66]]= function(_0x55a2x19,_0x55a2xe,_0x55a2x1c){var _0x55a2x23={where:{FaxAccountId:_0x55a2x19[_0x4d4f[29]][_0x4d4f[28]],$and:[]},include:[],attributes:[_0x4d4f[28],_0x4d4f[67],_0x4d4f[68],_0x4d4f[69],_0x4d4f[70],_0x4d4f[61]]};if(_0x55a2x19[_0x4d4f[24]]){if(_0x55a2x19[_0x4d4f[24]][_0x4d4f[69]]){if(_[_0x4d4f[71]](_0x55a2x19[_0x4d4f[24]][_0x4d4f[69]])){for(var _0x55a2x24=0;_0x55a2x24< _0x55a2x19[_0x4d4f[24]][_0x4d4f[69]][_0x4d4f[44]];_0x55a2x24++){_0x55a2x23[_0x4d4f[75]][_0x4d4f[74]][_0x4d4f[73]]({tags:{$like:_0x4d4f[72]+ _0x55a2x19[_0x4d4f[24]][_0x4d4f[69]][_0x55a2x24]+ _0x4d4f[72]}})}}else {_0x55a2x23[_0x4d4f[75]][_0x4d4f[74]][_0x4d4f[73]]({tags:{$like:_0x4d4f[72]+ _0x55a2x19[_0x4d4f[24]][_0x4d4f[69]]+ _0x4d4f[72]}})};delete _0x55a2x19[_0x4d4f[24]][_0x4d4f[69]]};_[_0x4d4f[48]](_0x55a2x23[_0x4d4f[75]],_0x55a2x19[_0x4d4f[24]])};switch(_0x55a2x19[_0x4d4f[85]][_0x4d4f[88]]){case _0x4d4f[78]:_0x55a2x23[_0x4d4f[76]][_0x4d4f[73]]({model:User,attributes:[_0x4d4f[28]]});var _0x55a2x25;var _0x55a2x26;var _0x55a2x27;return User[_0x4d4f[30]](_0x55a2x19[_0x4d4f[85]][_0x4d4f[28]])[_0x4d4f[19]](function(_0x55a2x2b){if(_0x55a2x2b){return _0x55a2x2b[_0x4d4f[87]]()}else {return []}})[_0x4d4f[19]](function(_0x55a2x2a){_0x55a2x26= _[_0x4d4f[81]](_0x55a2x2a,_0x4d4f[28]);return FaxAccount[_0x4d4f[30]](_0x55a2x19[_0x4d4f[29]][_0x4d4f[28]])})[_0x4d4f[19]](function(_0x55a2x29){return _0x55a2x29[_0x4d4f[49]]({where:{$or:[{app:_0x4d4f[82]},{app:_0x4d4f[78]}]}})})[_0x4d4f[19]](function(_0x55a2x20){_0x55a2x25= _[_0x4d4f[81]](_[_0x4d4f[79]](_0x55a2x20,{"\x61\x70\x70":_0x4d4f[78]}),_0x4d4f[80]);_0x55a2x27= _[_0x4d4f[81]](_[_0x4d4f[79]](_0x55a2x20,{"\x61\x70\x70":_0x4d4f[82]}),_0x4d4f[83]);if(_[_0x4d4f[84]](_0x55a2x26,_0x55a2x27)[_0x4d4f[44]]|| _[_0x4d4f[84]](_0x55a2x25,[_0x55a2x19[_0x4d4f[85]][_0x4d4f[28]]])[_0x4d4f[44]]){return FaxRoom[_0x4d4f[86]](_0x55a2x23)[_0x4d4f[19]](function(_0x55a2x28){return _0x55a2xe[_0x4d4f[15]](200)[_0x4d4f[14]](_0x55a2x28)})[_0x4d4f[23]](function(_0x55a2x10){console[_0x4d4f[77]](_0x55a2x10);return handleError(_0x55a2xe,_0x55a2x10)})}else {return _0x55a2xe[_0x4d4f[15]](200)[_0x4d4f[14]]([])}})[_0x4d4f[23]](function(_0x55a2x10){console[_0x4d4f[77]](_0x55a2x10)});default:return FaxRoom[_0x4d4f[86]](_0x55a2x23)[_0x4d4f[19]](function(_0x55a2x28){return _0x55a2xe[_0x4d4f[15]](200)[_0x4d4f[14]](_0x55a2x28)})[_0x4d4f[23]](handleError(_0x55a2xe))}};exports[_0x4d4f[89]]= function(_0x55a2x19,_0x55a2xe,_0x55a2x1c){return FaxAccount[_0x4d4f[30]](_0x55a2x19[_0x4d4f[29]][_0x4d4f[28]])[_0x4d4f[19]](handleEntityNotFound(_0x55a2xe))[_0x4d4f[19]](function(_0x55a2x1b){return _0x55a2x1b[_0x4d4f[90]]()})[_0x4d4f[19]](function(_0x55a2x2c){return _0x55a2xe[_0x4d4f[15]](200)[_0x4d4f[14]]({rows:_0x55a2x2c,count:_0x55a2x2c[_0x4d4f[44]]})})[_0x4d4f[23]](handleError(_0x55a2xe))};exports[_0x4d4f[91]]= function(_0x55a2x19,_0x55a2xe,_0x55a2x1c){_0x55a2x19[_0x4d4f[38]][_0x4d4f[54]]= _0x55a2x19[_0x4d4f[29]][_0x4d4f[28]];return FaxDisposition[_0x4d4f[31]](_0x55a2x19[_0x4d4f[38]])[_0x4d4f[19]](responseWithResult(_0x55a2xe,201))[_0x4d4f[23]](handleError(_0x55a2xe))};exports[_0x4d4f[92]]= function(_0x55a2x19,_0x55a2xe){if(_0x55a2x19[_0x4d4f[38]][_0x4d4f[28]]){delete _0x55a2x19[_0x4d4f[38]][_0x4d4f[28]]};return FaxDisposition[_0x4d4f[30]](_0x55a2x19[_0x4d4f[29]][_0x4d4f[94]])[_0x4d4f[19]](handleEntityNotFound(_0x55a2xe))[_0x4d4f[19]](function(_0x55a2x2d){var _0x55a2x17=_[_0x4d4f[48]](_0x55a2x2d,_0x55a2x19[_0x4d4f[38]]);return _0x55a2x17[_0x4d4f[93]]()})[_0x4d4f[19]](responseWithResult(_0x55a2xe,200))[_0x4d4f[23]](handleError(_0x55a2xe))};exports[_0x4d4f[95]]= function(_0x55a2x19,_0x55a2xe,_0x55a2x1c){return FaxDisposition[_0x4d4f[30]](_0x55a2x19[_0x4d4f[29]][_0x4d4f[94]])[_0x4d4f[19]](handleEntityNotFound(_0x55a2xe))[_0x4d4f[19]](function(_0x55a2x2e){return _0x55a2x2e[_0x4d4f[21]]()})[_0x4d4f[19]](responseWithoutResult(_0x55a2xe,204))[_0x4d4f[23]](handleError(_0x55a2xe))};exports[_0x4d4f[96]]= function(_0x55a2x19,_0x55a2xe,_0x55a2x1c){_0x55a2x19[_0x4d4f[38]][_0x4d4f[80]]= _0x55a2x19[_0x4d4f[85]][_0x4d4f[28]];return FaxMessage[_0x4d4f[31]](_0x55a2x19[_0x4d4f[38]],{include:[{model:FaxAttachment}],user:_0x55a2x19[_0x4d4f[85]]})[_0x4d4f[19]](responseWithResult(_0x55a2xe,201))[_0x4d4f[23]](handleError(_0x55a2xe))}
\ No newline at end of file
diff --git a/server/api/fax_account/fax_account.events.js b/server/api/fax_account/fax_account.events.js
index 076c9bc..cf62482 100644
--- a/server/api/fax_account/fax_account.events.js
+++ b/server/api/fax_account/fax_account.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const FaxAccount = require('../../models').FaxAccount;
-
-var FaxAccountEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-FaxAccountEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  FaxAccount.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    FaxAccountEvents.emit(event + ':' + doc._id, doc);
-    FaxAccountEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = FaxAccountEvents;
+var _0x3b14=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x3b14[0];const EventEmitter=require(_0x3b14[1]);const FaxAccount=require(_0x3b14[3])[_0x3b14[2]];var FaxAccountEvents= new EventEmitter();FaxAccountEvents[_0x3b14[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x3b14[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x3b14[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x3b14[6]};for(var e in events){var event=events[e];FaxAccount[_0x3b14[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xea8fx8,_0xea8fx9,_0xea8fxa){FaxAccountEvents[_0x3b14[10]](event+ _0x3b14[8]+ _0xea8fx8[_0x3b14[9]],_0xea8fx8);FaxAccountEvents[_0x3b14[10]](event,_0xea8fx8);_0xea8fxa(null)}}module[_0x3b14[11]]= FaxAccountEvents
\ No newline at end of file
diff --git a/server/api/fax_account/fax_account.socket.js b/server/api/fax_account/fax_account.socket.js
index 777c337..66f7bc9 100644
--- a/server/api/fax_account/fax_account.socket.js
+++ b/server/api/fax_account/fax_account.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const FaxAccountEvents = require('./fax_account.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('fax_account:' + event, socket);
-
-    FaxAccountEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    FaxAccountEvents.removeListener(event, listener);
-  };
-}
+var _0xd335=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xd335[0];const FaxAccountEvents=require(_0xd335[1]);var events=[_0xd335[2],_0xd335[3]];exports[_0xd335[4]]= function(_0x6d48x3){for(var _0x6d48x4=0,_0x6d48x5=events[_0xd335[5]];_0x6d48x4< _0x6d48x5;_0x6d48x4++){var _0x6d48x6=events[_0x6d48x4];var _0x6d48x7=createListener(_0xd335[6]+ _0x6d48x6,_0x6d48x3);FaxAccountEvents[_0xd335[7]](_0x6d48x6,_0x6d48x7);_0x6d48x3[_0xd335[7]](_0xd335[8],removeListener(_0x6d48x6,_0x6d48x7))}};function createListener(_0x6d48x6,_0x6d48x3){return function(_0x6d48x9){_0x6d48x3[_0xd335[9]](_0x6d48x6,_0x6d48x9)}}function removeListener(_0x6d48x6,_0x6d48x7){return function(){FaxAccountEvents[_0xd335[10]](_0x6d48x6,_0x6d48x7)}}
\ No newline at end of file
diff --git a/server/api/fax_account/index.js b/server/api/fax_account/index.js
index 52e34bf..cd58ac0 100644
--- a/server/api/fax_account/index.js
+++ b/server/api/fax_account/index.js
@@ -1,31 +1 @@
-'use strict';
-
-var express = require('express');
-
-var auth = require('../../auth/auth.service');
-var controller = require('./fax_account.controller');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.index);
-router.get('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.show);
-router.get('/:id/applications', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.showApplications);
-router.get('/:id/applications/:appId', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.showApplication);
-router.get('/:id/rooms', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.getFaxRooms);
-router.get('/:id/dispositions', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.getDispositions);
-router.post('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.create);
-router.post('/:id/applications', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.createApplication);
-router.post('/:id/dispositions', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.createDisposition);
-router.post('/:id/send', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.sendMessage);
-router.put('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.update);
-router.put('/:id/applications', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.updateApplications);
-router.put('/:id/applications/:appId', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.updateApplication);
-router.put('/:id/dispositions/:dispId', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.updateDisposition);
-router.delete('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.bulkDestroy);
-router.delete('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.destroy);
-router.delete('/:id/applications', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.bulkDestroyApplications);
-router.delete('/:id/applications/:appId', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.destroyApplication);
-router.delete('/:id/dispositions/:dispId', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.destroyDisposition);
-
-module.exports = router;
+var _0x5ddb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x46\x61\x78","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x61\x70\x70\x49\x64","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x72\x6F\x6F\x6D\x73","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D\x73","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x73\x65\x6E\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73\x2F\x3A\x64\x69\x73\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x5ddb[0];var express=require(_0x5ddb[1]);var auth=require(_0x5ddb[2]);var controller=require(_0x5ddb[3]);var license=require(_0x5ddb[4]);var router=express.Router();router[_0x5ddb[13]](_0x5ddb[5],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9],_0x5ddb[10]]),controller[_0x5ddb[12]]);router[_0x5ddb[13]](_0x5ddb[14],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9],_0x5ddb[10]]),controller[_0x5ddb[15]]);router[_0x5ddb[13]](_0x5ddb[16],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9]]),controller[_0x5ddb[17]]);router[_0x5ddb[13]](_0x5ddb[18],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9]]),controller[_0x5ddb[19]]);router[_0x5ddb[13]](_0x5ddb[20],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9],_0x5ddb[10]]),controller[_0x5ddb[21]]);router[_0x5ddb[13]](_0x5ddb[22],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9],_0x5ddb[10]]),controller[_0x5ddb[23]]);router[_0x5ddb[25]](_0x5ddb[5],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9]]),controller[_0x5ddb[24]]);router[_0x5ddb[25]](_0x5ddb[16],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9]]),controller[_0x5ddb[26]]);router[_0x5ddb[25]](_0x5ddb[22],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9]]),controller[_0x5ddb[27]]);router[_0x5ddb[25]](_0x5ddb[28],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9],_0x5ddb[10]]),controller[_0x5ddb[29]]);router[_0x5ddb[31]](_0x5ddb[14],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9]]),controller[_0x5ddb[30]]);router[_0x5ddb[31]](_0x5ddb[16],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9]]),controller[_0x5ddb[32]]);router[_0x5ddb[31]](_0x5ddb[18],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9]]),controller[_0x5ddb[33]]);router[_0x5ddb[31]](_0x5ddb[34],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9]]),controller[_0x5ddb[35]]);router[_0x5ddb[37]](_0x5ddb[5],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9]]),controller[_0x5ddb[36]]);router[_0x5ddb[37]](_0x5ddb[14],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9]]),controller[_0x5ddb[38]]);router[_0x5ddb[37]](_0x5ddb[16],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9]]),controller[_0x5ddb[39]]);router[_0x5ddb[37]](_0x5ddb[18],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9]]),controller[_0x5ddb[40]]);router[_0x5ddb[37]](_0x5ddb[34],license[_0x5ddb[6]](),license[_0x5ddb[7]](),auth[_0x5ddb[8]](),auth[_0x5ddb[11]]([10],[_0x5ddb[9]]),controller[_0x5ddb[41]]);module[_0x5ddb[42]]= router
\ No newline at end of file
diff --git a/server/api/fax_application/fax_application.controller.js b/server/api/fax_application/fax_application.controller.js
index 59b09cb..5e0a1d6 100644
--- a/server/api/fax_application/fax_application.controller.js
+++ b/server/api/fax_application/fax_application.controller.js
@@ -1,94 +1 @@
-'use strict';
-var _ = require('lodash');
-var FaxApplication = require('../../models').FaxApplication;
-// Get list of fax_applications
-exports.index = function(req, res) {
-  FaxApplication.findAll({
-    where: req.query
-  }).then(function(fax_applications) {
-    return res.status(200).send(fax_applications);
-  }).catch(function(err) {
-    return handleError(res, err);
-  });
-};
-// Get a single fax_application
-exports.show = function(req, res) {
-  FaxApplication.findById(req.params.id).then(function(fax_application) {
-    if (!fax_application) {
-      return res.sendStatus(404);
-    }
-    return res.send(fax_application);
-  }).catch(function(err) {
-    return handleError(res, err);
-  });
-};
-// Creates a new fax_application in the DB.
-exports.create = function(req, res, next) {
-  console.log(req.body);
-  FaxApplication.max('priority', {
-    where: {
-      FaxAccountId: req.body.FaxAccountId
-    }
-  }).then(function(max) {
-    // SET PRIORITY
-    req.body.priority = max ? ++max : 1;
-    FaxApplication.create(req.body).then(function(faxApplication) {
-      return res.status(201).send(faxApplication);
-    }).catch(function(err) {
-      return next(err);
-    });
-    console.log(max);
-  }).catch(function(err) {
-    next(err);
-  });
-  // FaxApplication
-  // .create(req.body)
-  // .then(function(fax_application) {
-  //   return res.status(201).send(fax_application);
-  // })
-  // .catch(function(err) {
-  //   return handleError(res, err);
-  // });
-};
-// Updates an existing fax_application in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  FaxApplication.findById(req.params.id).then(function(fax_application) {
-    if (!fax_application) {
-      return res.sendStatus(404);
-    }
-    var updated = _.merge(fax_application, req.body);
-    updated.save().then(function() {
-      return res.status(200).send(fax_application);
-    }).catch(function(err) {
-      return handleError(res, err);
-    });
-  }).catch(function(err) {
-    return handleError(res, err);
-  });
-};
-// Deletes a fax_application from the DB.
-exports.destroy = function(req, res) {
-  FaxApplication.find({
-    where: {
-      id: req.params.id
-    }
-  }).then(function(fax_application) {
-    if (!fax_application) {
-      return res.sendStatus(404);
-    }
-    fax_application.destroy().then(function() {
-      return res.sendStatus(204);
-    }).catch(function(err) {
-      return handleError(res, err);
-    });
-  }).catch(function(err) {
-    return handleError(res, err);
-  });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xd234=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x6C\x6F\x67","\x70\x72\x69\x6F\x72\x69\x74\x79","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x78","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64"];_0xd234[0];var _=require(_0xd234[1]);var FaxApplication=require(_0xd234[3])[_0xd234[2]];exports[_0xd234[4]]= function(_0xd08dx3,_0xd08dx4){FaxApplication[_0xd234[10]]({where:_0xd08dx3[_0xd234[9]]})[_0xd234[8]](function(_0xd08dx6){return _0xd08dx4[_0xd234[7]](200)[_0xd234[6]](_0xd08dx6)})[_0xd234[5]](function(_0xd08dx5){return handleError(_0xd08dx4,_0xd08dx5)})};exports[_0xd234[11]]= function(_0xd08dx3,_0xd08dx4){FaxApplication[_0xd234[15]](_0xd08dx3[_0xd234[14]][_0xd234[13]])[_0xd234[8]](function(_0xd08dx7){if(!_0xd08dx7){return _0xd08dx4[_0xd234[12]](404)};return _0xd08dx4[_0xd234[6]](_0xd08dx7)})[_0xd234[5]](function(_0xd08dx5){return handleError(_0xd08dx4,_0xd08dx5)})};exports[_0xd234[16]]= function(_0xd08dx3,_0xd08dx4,_0xd08dx8){console[_0xd234[18]](_0xd08dx3[_0xd234[17]]);FaxApplication[_0xd234[21]](_0xd234[19],{where:{FaxAccountId:_0xd08dx3[_0xd234[17]][_0xd234[20]]}})[_0xd234[8]](function(_0xd08dx9){_0xd08dx3[_0xd234[17]][_0xd234[19]]= _0xd08dx9?++_0xd08dx9:1;FaxApplication[_0xd234[16]](_0xd08dx3[_0xd234[17]])[_0xd234[8]](function(_0xd08dxa){return _0xd08dx4[_0xd234[7]](201)[_0xd234[6]](_0xd08dxa)})[_0xd234[5]](function(_0xd08dx5){return _0xd08dx8(_0xd08dx5)});console[_0xd234[18]](_0xd08dx9)})[_0xd234[5]](function(_0xd08dx5){_0xd08dx8(_0xd08dx5)})};exports[_0xd234[22]]= function(_0xd08dx3,_0xd08dx4){if(_0xd08dx3[_0xd234[17]][_0xd234[13]]){delete _0xd08dx3[_0xd234[17]][_0xd234[13]]};FaxApplication[_0xd234[15]](_0xd08dx3[_0xd234[14]][_0xd234[13]])[_0xd234[8]](function(_0xd08dx7){if(!_0xd08dx7){return _0xd08dx4[_0xd234[12]](404)};var _0xd08dxb=_[_0xd234[23]](_0xd08dx7,_0xd08dx3[_0xd234[17]]);_0xd08dxb[_0xd234[24]]()[_0xd234[8]](function(){return _0xd08dx4[_0xd234[7]](200)[_0xd234[6]](_0xd08dx7)})[_0xd234[5]](function(_0xd08dx5){return handleError(_0xd08dx4,_0xd08dx5)})})[_0xd234[5]](function(_0xd08dx5){return handleError(_0xd08dx4,_0xd08dx5)})};exports[_0xd234[25]]= function(_0xd08dx3,_0xd08dx4){FaxApplication[_0xd234[26]]({where:{id:_0xd08dx3[_0xd234[14]][_0xd234[13]]}})[_0xd234[8]](function(_0xd08dx7){if(!_0xd08dx7){return _0xd08dx4[_0xd234[12]](404)};_0xd08dx7[_0xd234[25]]()[_0xd234[8]](function(){return _0xd08dx4[_0xd234[12]](204)})[_0xd234[5]](function(_0xd08dx5){return handleError(_0xd08dx4,_0xd08dx5)})})[_0xd234[5]](function(_0xd08dx5){return handleError(_0xd08dx4,_0xd08dx5)})};function handleError(_0xd08dx4,_0xd08dx5){return _0xd08dx4[_0xd234[7]](500)[_0xd234[6]](_0xd08dx5)}
\ No newline at end of file
diff --git a/server/api/fax_application/fax_application.events.js b/server/api/fax_application/fax_application.events.js
index 72f4dd0..922294a 100644
--- a/server/api/fax_application/fax_application.events.js
+++ b/server/api/fax_application/fax_application.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const FaxApplication = require('../../models').FaxApplication;
-
-var FaxApplicationEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-FaxApplicationEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  FaxApplication.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    FaxApplicationEvents.emit(event + ':' + doc._id, doc);
-    FaxApplicationEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = FaxApplicationEvents;
+var _0xacc7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xacc7[0];const EventEmitter=require(_0xacc7[1]);const FaxApplication=require(_0xacc7[3])[_0xacc7[2]];var FaxApplicationEvents= new EventEmitter();FaxApplicationEvents[_0xacc7[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xacc7[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xacc7[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xacc7[6]};for(var e in events){var event=events[e];FaxApplication[_0xacc7[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x3525x8,_0x3525x9,_0x3525xa){FaxApplicationEvents[_0xacc7[10]](event+ _0xacc7[8]+ _0x3525x8[_0xacc7[9]],_0x3525x8);FaxApplicationEvents[_0xacc7[10]](event,_0x3525x8);_0x3525xa(null)}}module[_0xacc7[11]]= FaxApplicationEvents
\ No newline at end of file
diff --git a/server/api/fax_application/fax_application.socket.js b/server/api/fax_application/fax_application.socket.js
index ce03f3d..fe5f22c 100644
--- a/server/api/fax_application/fax_application.socket.js
+++ b/server/api/fax_application/fax_application.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const FaxApplicationEvents = require('./fax_application.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('fax_application:' + event, socket);
-
-    FaxApplicationEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    FaxApplicationEvents.removeListener(event, listener);
-  };
-}
+var _0x1147=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x1147[0];const FaxApplicationEvents=require(_0x1147[1]);var events=[_0x1147[2],_0x1147[3]];exports[_0x1147[4]]= function(_0xeaf1x3){for(var _0xeaf1x4=0,_0xeaf1x5=events[_0x1147[5]];_0xeaf1x4< _0xeaf1x5;_0xeaf1x4++){var _0xeaf1x6=events[_0xeaf1x4];var _0xeaf1x7=createListener(_0x1147[6]+ _0xeaf1x6,_0xeaf1x3);FaxApplicationEvents[_0x1147[7]](_0xeaf1x6,_0xeaf1x7);_0xeaf1x3[_0x1147[7]](_0x1147[8],removeListener(_0xeaf1x6,_0xeaf1x7))}};function createListener(_0xeaf1x6,_0xeaf1x3){return function(_0xeaf1x9){_0xeaf1x3[_0x1147[9]](_0xeaf1x6,_0xeaf1x9)}}function removeListener(_0xeaf1x6,_0xeaf1x7){return function(){FaxApplicationEvents[_0x1147[10]](_0xeaf1x6,_0xeaf1x7)}}
\ No newline at end of file
diff --git a/server/api/fax_application/index.js b/server/api/fax_application/index.js
index 91aae9d..1b0ec7b 100644
--- a/server/api/fax_application/index.js
+++ b/server/api/fax_application/index.js
@@ -1,15 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./fax_application.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.index);
-router.get('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.show);
-router.post('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.create);
-router.put('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.update);
-router.delete('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.destroy);
-module.exports = router;
+var _0xa5d8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x46\x61\x78","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xa5d8[0];var express=require(_0xa5d8[1]);var controller=require(_0xa5d8[2]);var auth=require(_0xa5d8[3]);var license=require(_0xa5d8[4]);var router=express.Router();router[_0xa5d8[12]](_0xa5d8[5],license[_0xa5d8[6]](),license[_0xa5d8[7]](),auth[_0xa5d8[8]](),auth[_0xa5d8[10]]([10],[_0xa5d8[9]]),controller[_0xa5d8[11]]);router[_0xa5d8[12]](_0xa5d8[13],license[_0xa5d8[6]](),license[_0xa5d8[7]](),auth[_0xa5d8[8]](),auth[_0xa5d8[10]]([10],[_0xa5d8[9]]),controller[_0xa5d8[14]]);router[_0xa5d8[16]](_0xa5d8[5],license[_0xa5d8[6]](),license[_0xa5d8[7]](),auth[_0xa5d8[8]](),auth[_0xa5d8[10]]([10],[_0xa5d8[9]]),controller[_0xa5d8[15]]);router[_0xa5d8[18]](_0xa5d8[13],license[_0xa5d8[6]](),license[_0xa5d8[7]](),auth[_0xa5d8[8]](),auth[_0xa5d8[10]]([10],[_0xa5d8[9]]),controller[_0xa5d8[17]]);router[_0xa5d8[20]](_0xa5d8[13],license[_0xa5d8[6]](),license[_0xa5d8[7]](),auth[_0xa5d8[8]](),auth[_0xa5d8[10]]([10],[_0xa5d8[9]]),controller[_0xa5d8[19]]);module[_0xa5d8[21]]= router
\ No newline at end of file
diff --git a/server/api/fax_attachment/fax_attachment.controller.js b/server/api/fax_attachment/fax_attachment.controller.js
index 39802ff..7d9ed92 100644
--- a/server/api/fax_attachment/fax_attachment.controller.js
+++ b/server/api/fax_attachment/fax_attachment.controller.js
@@ -1,140 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/fax/attachments              ->  index
- * POST    /api/fax/attachments              ->  create
- * GET     /api/fax/attachments/:id          ->  show
- * PUT     /api/fax/attachments/:id          ->  update
- * DELETE  /api/fax/attachments/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var path = require('path');
-var Util = require('../../config/util');
-var formidable = require('formidable');
-var Promise = require('bluebird');
-
-var config = require('../../config/environment');
-var FaxAttachment = require('../../models').FaxAttachment;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function responseWithoutResult(res, statusCode) {
-  statusCode = statusCode || 204;
-  return function() {
-    res.sendStatus(statusCode);
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of FaxAttachments
-exports.index = function(req, res) {
-  return FaxAttachment.findAll(Util.getQuery(req.query))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single FaxAttachment from the DB
-exports.show = function(req, res) {
-  return FaxAttachment.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(function(faxAttachment) {
-      return res.sendFile(faxAttachment.path);
-    })
-    .catch(handleError(res));
-}
-
-// Creates a new FaxAttachment in the DB
-exports.create = function(req, res) {
-
-  var form = new formidable.IncomingForm();
-  form.uploadDir = path.join(config.root, 'server', 'files', 'fax', 'outbound', 'original');
-  form.keepExtensions = true;
-  form.multiples = true;
-  form.hash = true;
-
-  form.parse(req, function(err, form, wrap) {
-    if (err) {
-      return res.status(500).send(err);
-    }
-    return res.status(201).send({
-      path: wrap.file.path,
-      name: wrap.file.name,
-      basename: path.basename(wrap.file.path),
-      type: wrap.file.type
-    });
-  });
-
-}
-
-// Updates an existing FaxAttachment in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return FaxAttachment.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a FaxAttachment from the DB
-exports.destroy = function(req, res) {
-  var unlink = Promise.promisify(require("fs").unlink);
-  var _path = path.join(config.root, 'server', 'files', 'fax', 'outbound', 'original', req.params.id);
-
-  return unlink(_path)
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
+var _0x1a76=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x75\x70\x6C\x6F\x61\x64\x44\x69\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x66\x61\x78","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x6F\x72\x69\x67\x69\x6E\x61\x6C","\x6A\x6F\x69\x6E","\x6B\x65\x65\x70\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x6D\x75\x6C\x74\x69\x70\x6C\x65\x73","\x68\x61\x73\x68","\x66\x69\x6C\x65","\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x74\x79\x70\x65","\x70\x61\x72\x73\x65","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x75\x6E\x6C\x69\x6E\x6B","\x66\x73","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79"];_0x1a76[0];var _=require(_0x1a76[1]);var path=require(_0x1a76[2]);var Util=require(_0x1a76[3]);var formidable=require(_0x1a76[4]);var Promise=require(_0x1a76[5]);var config=require(_0x1a76[6]);var FaxAttachment=require(_0x1a76[8])[_0x1a76[7]];function handleError(_0x7b92x9,_0x7b92xa){_0x7b92xa= _0x7b92xa|| 500;return function(_0x7b92xb){_0x7b92x9[_0x1a76[10]](_0x7b92xa)[_0x1a76[9]](_0x7b92xb)}}function responseWithResult(_0x7b92x9,_0x7b92xa){_0x7b92xa= _0x7b92xa|| 200;return function(_0x7b92xd){if(_0x7b92xd){_0x7b92x9[_0x1a76[10]](_0x7b92xa)[_0x1a76[11]](_0x7b92xd)}}}function responseWithoutResult(_0x7b92x9,_0x7b92xa){_0x7b92xa= _0x7b92xa|| 204;return function(){_0x7b92x9[_0x1a76[12]](_0x7b92xa)}}function handleEntityNotFound(_0x7b92x9){return function(_0x7b92xd){if(!_0x7b92xd){_0x7b92x9[_0x1a76[10]](404)[_0x1a76[13]]();return null};return _0x7b92xd}}function saveUpdates(_0x7b92x11){return function(_0x7b92xd){return _0x7b92xd[_0x1a76[15]](_0x7b92x11)[_0x1a76[14]](function(_0x7b92x12){return _0x7b92x12})}}function removeEntity(_0x7b92x9){return function(_0x7b92xd){if(_0x7b92xd){return _0x7b92xd[_0x1a76[16]]()[_0x1a76[14]](function(){_0x7b92x9[_0x1a76[10]](204)[_0x1a76[13]]()})}}}exports[_0x1a76[17]]= function(_0x7b92x14,_0x7b92x9){return FaxAttachment[_0x1a76[21]](Util[_0x1a76[20]](_0x7b92x14[_0x1a76[19]]))[_0x1a76[14]](responseWithResult(_0x7b92x9))[_0x1a76[18]](handleError(_0x7b92x9))};exports[_0x1a76[22]]= function(_0x7b92x14,_0x7b92x9){return FaxAttachment[_0x1a76[26]](_0x7b92x14[_0x1a76[25]][_0x1a76[24]])[_0x1a76[14]](handleEntityNotFound(_0x7b92x9))[_0x1a76[14]](function(_0x7b92x15){return _0x7b92x9[_0x1a76[23]](_0x7b92x15[_0x1a76[2]])})[_0x1a76[18]](handleError(_0x7b92x9))};exports[_0x1a76[27]]= function(_0x7b92x14,_0x7b92x9){var _0x7b92x16= new formidable.IncomingForm();_0x7b92x16[_0x1a76[28]]= path[_0x1a76[35]](config[_0x1a76[29]],_0x1a76[30],_0x1a76[31],_0x1a76[32],_0x1a76[33],_0x1a76[34]);_0x7b92x16[_0x1a76[36]]= true;_0x7b92x16[_0x1a76[37]]= true;_0x7b92x16[_0x1a76[38]]= true;_0x7b92x16[_0x1a76[43]](_0x7b92x14,function(_0x7b92xb,_0x7b92x16,_0x7b92x17){if(_0x7b92xb){return _0x7b92x9[_0x1a76[10]](500)[_0x1a76[9]](_0x7b92xb)};return _0x7b92x9[_0x1a76[10]](201)[_0x1a76[9]]({path:_0x7b92x17[_0x1a76[39]][_0x1a76[2]],name:_0x7b92x17[_0x1a76[39]][_0x1a76[40]],basename:path[_0x1a76[41]](_0x7b92x17[_0x1a76[39]][_0x1a76[2]]),type:_0x7b92x17[_0x1a76[39]][_0x1a76[42]]})})};exports[_0x1a76[44]]= function(_0x7b92x14,_0x7b92x9){if(_0x7b92x14[_0x1a76[45]][_0x1a76[24]]){delete _0x7b92x14[_0x1a76[45]][_0x1a76[24]]};return FaxAttachment[_0x1a76[26]](_0x7b92x14[_0x1a76[25]][_0x1a76[24]])[_0x1a76[14]](handleEntityNotFound(_0x7b92x9))[_0x1a76[14]](saveUpdates(_0x7b92x14[_0x1a76[45]]))[_0x1a76[14]](responseWithResult(_0x7b92x9))[_0x1a76[18]](handleError(_0x7b92x9))};exports[_0x1a76[16]]= function(_0x7b92x14,_0x7b92x9){var _0x7b92x18=Promise[_0x1a76[48]](require(_0x1a76[47])[_0x1a76[46]]);var _0x7b92x19=path[_0x1a76[35]](config[_0x1a76[29]],_0x1a76[30],_0x1a76[31],_0x1a76[32],_0x1a76[33],_0x1a76[34],_0x7b92x14[_0x1a76[25]][_0x1a76[24]]);return _0x7b92x18(_0x7b92x19)[_0x1a76[14]](function(){return _0x7b92x9[_0x1a76[12]](204)})[_0x1a76[18]](function(_0x7b92xb){return handleError(_0x7b92x9,_0x7b92xb)})}
\ No newline at end of file
diff --git a/server/api/fax_attachment/fax_attachment.events.js b/server/api/fax_attachment/fax_attachment.events.js
index 173e113..5b78e4a 100644
--- a/server/api/fax_attachment/fax_attachment.events.js
+++ b/server/api/fax_attachment/fax_attachment.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const FaxAttachment = require('../../models').FaxAttachment;
-
-var FaxAttachmentEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-FaxAttachmentEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  FaxAttachment.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    FaxAttachmentEvents.emit(event + ':' + doc._id, doc);
-    FaxAttachmentEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = FaxAttachmentEvents;
+var _0x39a5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x39a5[0];const EventEmitter=require(_0x39a5[1]);const FaxAttachment=require(_0x39a5[3])[_0x39a5[2]];var FaxAttachmentEvents= new EventEmitter();FaxAttachmentEvents[_0x39a5[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x39a5[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x39a5[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x39a5[6]};for(var e in events){var event=events[e];FaxAttachment[_0x39a5[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x918dx8,_0x918dx9,_0x918dxa){FaxAttachmentEvents[_0x39a5[10]](event+ _0x39a5[8]+ _0x918dx8[_0x39a5[9]],_0x918dx8);FaxAttachmentEvents[_0x39a5[10]](event,_0x918dx8);_0x918dxa(null)}}module[_0x39a5[11]]= FaxAttachmentEvents
\ No newline at end of file
diff --git a/server/api/fax_attachment/fax_attachment.socket.js b/server/api/fax_attachment/fax_attachment.socket.js
index ab07da6..4f794dc 100644
--- a/server/api/fax_attachment/fax_attachment.socket.js
+++ b/server/api/fax_attachment/fax_attachment.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const FaxAttachmentEvents = require('./fax_attachment.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('fax_attachment:' + event, socket);
-
-    FaxAttachmentEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    FaxAttachmentEvents.removeListener(event, listener);
-  };
-}
+var _0x21ba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x21ba[0];const FaxAttachmentEvents=require(_0x21ba[1]);var events=[_0x21ba[2],_0x21ba[3]];exports[_0x21ba[4]]= function(_0xef34x3){for(var _0xef34x4=0,_0xef34x5=events[_0x21ba[5]];_0xef34x4< _0xef34x5;_0xef34x4++){var _0xef34x6=events[_0xef34x4];var _0xef34x7=createListener(_0x21ba[6]+ _0xef34x6,_0xef34x3);FaxAttachmentEvents[_0x21ba[7]](_0xef34x6,_0xef34x7);_0xef34x3[_0x21ba[7]](_0x21ba[8],removeListener(_0xef34x6,_0xef34x7))}};function createListener(_0xef34x6,_0xef34x3){return function(_0xef34x9){_0xef34x3[_0x21ba[9]](_0xef34x6,_0xef34x9)}}function removeListener(_0xef34x6,_0xef34x7){return function(){FaxAttachmentEvents[_0x21ba[10]](_0xef34x6,_0xef34x7)}}
\ No newline at end of file
diff --git a/server/api/fax_attachment/index.js b/server/api/fax_attachment/index.js
index 9dd6190..9f1e089 100644
--- a/server/api/fax_attachment/index.js
+++ b/server/api/fax_attachment/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express = require('express');
-
-var auth = require('../../auth/auth.service');
-var controller = require('./fax_attachment.controller');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.index);
-router.get('/:id', license.isValidDate(), license.hasFax(), controller.show);
-router.post('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.create);
-router.put('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.update);
-router.delete('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.destroy);
-module.exports = router;
+var _0x3960=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x66\x61\x78\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x46\x61\x78","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3960[0];var express=require(_0x3960[1]);var auth=require(_0x3960[2]);var controller=require(_0x3960[3]);var license=require(_0x3960[4]);var router=express.Router();router[_0x3960[13]](_0x3960[5],license[_0x3960[6]](),license[_0x3960[7]](),auth[_0x3960[8]](),auth[_0x3960[11]]([10],[_0x3960[9],_0x3960[10]]),controller[_0x3960[12]]);router[_0x3960[13]](_0x3960[14],license[_0x3960[6]](),license[_0x3960[7]](),controller[_0x3960[15]]);router[_0x3960[17]](_0x3960[5],license[_0x3960[6]](),license[_0x3960[7]](),auth[_0x3960[8]](),auth[_0x3960[11]]([10],[_0x3960[9],_0x3960[10]]),controller[_0x3960[16]]);router[_0x3960[19]](_0x3960[14],license[_0x3960[6]](),license[_0x3960[7]](),auth[_0x3960[8]](),auth[_0x3960[11]]([10],[_0x3960[9],_0x3960[10]]),controller[_0x3960[18]]);router[_0x3960[21]](_0x3960[14],license[_0x3960[6]](),license[_0x3960[7]](),auth[_0x3960[8]](),auth[_0x3960[11]]([10],[_0x3960[9],_0x3960[10]]),controller[_0x3960[20]]);module[_0x3960[22]]= router
\ No newline at end of file
diff --git a/server/api/fax_disposition/fax_disposition.controller.js b/server/api/fax_disposition/fax_disposition.controller.js
index c3dcbb7..18341e5 100644
--- a/server/api/fax_disposition/fax_disposition.controller.js
+++ b/server/api/fax_disposition/fax_disposition.controller.js
@@ -1,112 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/fax/dispositions              ->  index
- * POST    /api/fax/dispositions              ->  create
- * GET     /api/fax/dispositions/:id          ->  show
- * PUT     /api/fax/dispositions/:id          ->  update
- * DELETE  /api/fax/dispositions/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var FaxDisposition = require('../../models').FaxDisposition;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function responseWithoutResult(res, statusCode) {
-  statusCode = statusCode || 204;
-  return function() {
-    res.sendStatus(statusCode);
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) { 
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of FaxDispositions
-exports.index = function(req, res) {
-  return FaxDisposition.findAll(Util.getQuery(req.query))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single FaxDisposition from the DB
-exports.show = function(req, res) {
-  return FaxDisposition.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new FaxDisposition in the DB
-exports.create = function(req, res) {
-  return FaxDisposition.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing FaxDisposition in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return FaxDisposition.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a FaxDisposition from the DB
-exports.destroy = function(req, res) {
-  return FaxDisposition.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
+var _0x525f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0x525f[0];var _=require(_0x525f[1]);var Util=require(_0x525f[2]);var FaxDisposition=require(_0x525f[4])[_0x525f[3]];function handleError(_0xf01cx5,_0xf01cx6){_0xf01cx6= _0xf01cx6|| 500;return function(_0xf01cx7){_0xf01cx5[_0x525f[6]](_0xf01cx6)[_0x525f[5]](_0xf01cx7)}}function responseWithResult(_0xf01cx5,_0xf01cx6){_0xf01cx6= _0xf01cx6|| 200;return function(_0xf01cx9){if(_0xf01cx9){_0xf01cx5[_0x525f[6]](_0xf01cx6)[_0x525f[7]](_0xf01cx9)}}}function responseWithoutResult(_0xf01cx5,_0xf01cx6){_0xf01cx6= _0xf01cx6|| 204;return function(){_0xf01cx5[_0x525f[8]](_0xf01cx6)}}function handleEntityNotFound(_0xf01cx5){return function(_0xf01cx9){if(!_0xf01cx9){_0xf01cx5[_0x525f[6]](404)[_0x525f[9]]();return null};return _0xf01cx9}}function saveUpdates(_0xf01cxd){return function(_0xf01cx9){return _0xf01cx9[_0x525f[11]](_0xf01cxd)[_0x525f[10]](function(_0xf01cxe){return _0xf01cxe})}}function removeEntity(_0xf01cx5){return function(_0xf01cx9){if(_0xf01cx9){return _0xf01cx9[_0x525f[12]]()[_0x525f[10]](function(){_0xf01cx5[_0x525f[6]](204)[_0x525f[9]]()})}}}exports[_0x525f[13]]= function(_0xf01cx10,_0xf01cx5){return FaxDisposition[_0x525f[17]](Util[_0x525f[16]](_0xf01cx10[_0x525f[15]]))[_0x525f[10]](responseWithResult(_0xf01cx5))[_0x525f[14]](handleError(_0xf01cx5))};exports[_0x525f[18]]= function(_0xf01cx10,_0xf01cx5){return FaxDisposition[_0x525f[21]](_0xf01cx10[_0x525f[20]][_0x525f[19]])[_0x525f[10]](handleEntityNotFound(_0xf01cx5))[_0x525f[10]](responseWithResult(_0xf01cx5))[_0x525f[14]](handleError(_0xf01cx5))};exports[_0x525f[22]]= function(_0xf01cx10,_0xf01cx5){return FaxDisposition[_0x525f[22]](_0xf01cx10[_0x525f[23]])[_0x525f[10]](responseWithResult(_0xf01cx5,201))[_0x525f[14]](handleError(_0xf01cx5))};exports[_0x525f[24]]= function(_0xf01cx10,_0xf01cx5){if(_0xf01cx10[_0x525f[23]][_0x525f[19]]){delete _0xf01cx10[_0x525f[23]][_0x525f[19]]};return FaxDisposition[_0x525f[21]](_0xf01cx10[_0x525f[20]][_0x525f[19]])[_0x525f[10]](handleEntityNotFound(_0xf01cx5))[_0x525f[10]](saveUpdates(_0xf01cx10[_0x525f[23]]))[_0x525f[10]](responseWithResult(_0xf01cx5))[_0x525f[14]](handleError(_0xf01cx5))};exports[_0x525f[12]]= function(_0xf01cx10,_0xf01cx5){return FaxDisposition[_0x525f[21]](_0xf01cx10[_0x525f[20]][_0x525f[19]])[_0x525f[10]](handleEntityNotFound(_0xf01cx5))[_0x525f[10]](removeEntity(_0xf01cx5))[_0x525f[14]](handleError(_0xf01cx5))}
\ No newline at end of file
diff --git a/server/api/fax_disposition/fax_disposition.events.js b/server/api/fax_disposition/fax_disposition.events.js
index ea2756f..7b22cfc 100644
--- a/server/api/fax_disposition/fax_disposition.events.js
+++ b/server/api/fax_disposition/fax_disposition.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const FaxDisposition = require('../../models').FaxDisposition;
-
-var FaxDispositionEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-FaxDispositionEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  FaxDisposition.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    FaxDispositionEvents.emit(event + ':' + doc._id, doc);
-    FaxDispositionEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = FaxDispositionEvents;
+var _0xabc5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xabc5[0];const EventEmitter=require(_0xabc5[1]);const FaxDisposition=require(_0xabc5[3])[_0xabc5[2]];var FaxDispositionEvents= new EventEmitter();FaxDispositionEvents[_0xabc5[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xabc5[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xabc5[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xabc5[6]};for(var e in events){var event=events[e];FaxDisposition[_0xabc5[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa046x8,_0xa046x9,_0xa046xa){FaxDispositionEvents[_0xabc5[10]](event+ _0xabc5[8]+ _0xa046x8[_0xabc5[9]],_0xa046x8);FaxDispositionEvents[_0xabc5[10]](event,_0xa046x8);_0xa046xa(null)}}module[_0xabc5[11]]= FaxDispositionEvents
\ No newline at end of file
diff --git a/server/api/fax_disposition/fax_disposition.socket.js b/server/api/fax_disposition/fax_disposition.socket.js
index 42f6297..83ff536 100644
--- a/server/api/fax_disposition/fax_disposition.socket.js
+++ b/server/api/fax_disposition/fax_disposition.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const FaxDispositionEvents = require('./fax_disposition.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('fax_disposition:' + event, socket);
-
-    FaxDispositionEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    FaxDispositionEvents.removeListener(event, listener);
-  };
-}
+var _0x93e2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x93e2[0];const FaxDispositionEvents=require(_0x93e2[1]);var events=[_0x93e2[2],_0x93e2[3]];exports[_0x93e2[4]]= function(_0x6baex3){for(var _0x6baex4=0,_0x6baex5=events[_0x93e2[5]];_0x6baex4< _0x6baex5;_0x6baex4++){var _0x6baex6=events[_0x6baex4];var _0x6baex7=createListener(_0x93e2[6]+ _0x6baex6,_0x6baex3);FaxDispositionEvents[_0x93e2[7]](_0x6baex6,_0x6baex7);_0x6baex3[_0x93e2[7]](_0x93e2[8],removeListener(_0x6baex6,_0x6baex7))}};function createListener(_0x6baex6,_0x6baex3){return function(_0x6baex9){_0x6baex3[_0x93e2[9]](_0x6baex6,_0x6baex9)}}function removeListener(_0x6baex6,_0x6baex7){return function(){FaxDispositionEvents[_0x93e2[10]](_0x6baex6,_0x6baex7)}}
\ No newline at end of file
diff --git a/server/api/fax_disposition/index.js b/server/api/fax_disposition/index.js
index 2e61ead..7a58558 100644
--- a/server/api/fax_disposition/index.js
+++ b/server/api/fax_disposition/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./fax_disposition.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), controller.index);
-router.get('/:id', auth.isAuthenticated(), controller.show);
-router.post('/', auth.isAuthenticated(), controller.create);
-router.put('/:id', auth.isAuthenticated(), controller.update);
-router.patch('/:id', auth.isAuthenticated(), controller.update);
-router.delete('/:id', auth.isAuthenticated(), controller.destroy);
-
-module.exports = router;
+var _0xf398=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x66\x61\x78\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf398[0];var express=require(_0xf398[1]);var auth=require(_0xf398[2]);var controller=require(_0xf398[3]);var router=express.Router();router[_0xf398[7]](_0xf398[4],auth[_0xf398[5]](),controller[_0xf398[6]]);router[_0xf398[7]](_0xf398[8],auth[_0xf398[5]](),controller[_0xf398[9]]);router[_0xf398[11]](_0xf398[4],auth[_0xf398[5]](),controller[_0xf398[10]]);router[_0xf398[13]](_0xf398[8],auth[_0xf398[5]](),controller[_0xf398[12]]);router[_0xf398[14]](_0xf398[8],auth[_0xf398[5]](),controller[_0xf398[12]]);router[_0xf398[16]](_0xf398[8],auth[_0xf398[5]](),controller[_0xf398[15]]);module[_0xf398[17]]= router
\ No newline at end of file
diff --git a/server/api/fax_message/fax_message.ami.js b/server/api/fax_message/fax_message.ami.js
index 8bb89b2..1afe2bc 100644
--- a/server/api/fax_message/fax_message.ami.js
+++ b/server/api/fax_message/fax_message.ami.js
@@ -1,64 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-
-var FaxMessage = require('../../models').FaxMessage;
-var Trunk = require('../../models').User;
-
-exports.register = function(ami) {
-
-  FaxMessage.afterCreate(function(doc) {
-    console.log('FaxMessage afterCreate');
-    // onSave(ami, doc);
-  });
-};
-
-function onSave(ami, doc, cb) {
-  if (doc.status === 'NOT SENT' && !doc.actionid) {
-    // I have to send the fax with the Originate
-    var faxBody = JSON.parse(doc.body);
-    console.log('faxBody', faxBody);
-
-    Trunk
-      .findById(faxBody.trunk.id)
-      .then(function(trunk) {
-        var action = {
-          Action: 'originate',
-          CallerID: faxBody.from,
-          Channel: util.format('%s/%s@%s', faxBody.technology, faxBody.to, trunk.name),
-          Context: 'outbound-fax',
-          Exten: 's',
-          Priority: 1,
-          Async: 'true',
-          Variable: {
-            MAXRATE: faxBody.maxrate,
-            MINRATE: faxBody.minrate,
-            ECM: faxBody.ecm ? 'yes' : 'no',
-            LOCALID: faxBody.fax_localid,
-            FAXFILE: faxBody.fax_file,
-            // 'FAXFILE': 'test.tiff', // Scommentare se si fanno prove in locale!
-            FAXHEADER: faxBody.fax_header,
-            FAXUUID: faxBody.uuid
-          }
-        };
-
-        ami.action(action, function(err, res) {
-          if (err) {
-            doc.updateAttributes({
-              status: 'FAILED'
-            });
-          } else {
-            if (res.response && res.actionid) {
-              doc.updateAttributes({
-                actionid: res.actionid
-              });
-            }
-          }
-        });
-      })
-      .catch(function(err) {
-        console.error(err);
-      });
-  }
-}
+var _0x2364=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x20\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x6C\x6F\x67","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x4E\x4F\x54\x20\x53\x45\x4E\x54","\x61\x63\x74\x69\x6F\x6E\x69\x64","\x62\x6F\x64\x79","\x70\x61\x72\x73\x65","\x66\x61\x78\x42\x6F\x64\x79","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x66\x72\x6F\x6D","\x25\x73\x2F\x25\x73\x40\x25\x73","\x74\x65\x63\x68\x6E\x6F\x6C\x6F\x67\x79","\x74\x6F","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x73","\x74\x72\x75\x65","\x6D\x61\x78\x72\x61\x74\x65","\x6D\x69\x6E\x72\x61\x74\x65","\x65\x63\x6D","\x79\x65\x73","\x6E\x6F","\x66\x61\x78\x5F\x6C\x6F\x63\x61\x6C\x69\x64","\x66\x61\x78\x5F\x66\x69\x6C\x65","\x66\x61\x78\x5F\x68\x65\x61\x64\x65\x72","\x75\x75\x69\x64","\x46\x41\x49\x4C\x45\x44","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x61\x63\x74\x69\x6F\x6E","\x74\x68\x65\x6E","\x69\x64","\x74\x72\x75\x6E\x6B","\x66\x69\x6E\x64\x42\x79\x49\x64"];_0x2364[0];var _=require(_0x2364[1]);var util=require(_0x2364[2]);var FaxMessage=require(_0x2364[4])[_0x2364[3]];var Trunk=require(_0x2364[4])[_0x2364[5]];exports[_0x2364[6]]= function(_0x45e0x5){FaxMessage[_0x2364[9]](function(_0x45e0x6){console[_0x2364[8]](_0x2364[7])})};function onSave(_0x45e0x5,_0x45e0x6,_0x45e0x8){if(_0x45e0x6[_0x2364[10]]=== _0x2364[11]&& !_0x45e0x6[_0x2364[12]]){var _0x45e0x9=JSON[_0x2364[14]](_0x45e0x6[_0x2364[13]]);console[_0x2364[8]](_0x2364[15],_0x45e0x9);Trunk[_0x2364[44]](_0x45e0x9[_0x2364[43]][_0x2364[42]])[_0x2364[41]](function(_0x45e0xb){var _0x45e0xc={Action:_0x2364[18],CallerID:_0x45e0x9[_0x2364[19]],Channel:util[_0x2364[24]](_0x2364[20],_0x45e0x9[_0x2364[21]],_0x45e0x9[_0x2364[22]],_0x45e0xb[_0x2364[23]]),Context:_0x2364[25],Exten:_0x2364[26],Priority:1,Async:_0x2364[27],Variable:{MAXRATE:_0x45e0x9[_0x2364[28]],MINRATE:_0x45e0x9[_0x2364[29]],ECM:_0x45e0x9[_0x2364[30]]?_0x2364[31]:_0x2364[32],LOCALID:_0x45e0x9[_0x2364[33]],FAXFILE:_0x45e0x9[_0x2364[34]],FAXHEADER:_0x45e0x9[_0x2364[35]],FAXUUID:_0x45e0x9[_0x2364[36]]}};_0x45e0x5[_0x2364[40]](_0x45e0xc,function(_0x45e0xa,_0x45e0xd){if(_0x45e0xa){_0x45e0x6[_0x2364[38]]({status:_0x2364[37]})}else {if(_0x45e0xd[_0x2364[39]]&& _0x45e0xd[_0x2364[12]]){_0x45e0x6[_0x2364[38]]({actionid:_0x45e0xd[_0x2364[12]]})}}})})[_0x2364[17]](function(_0x45e0xa){console[_0x2364[16]](_0x45e0xa)})}}
\ No newline at end of file
diff --git a/server/api/fax_message/fax_message.controller.js b/server/api/fax_message/fax_message.controller.js
index 39fa261..95933c3 100644
--- a/server/api/fax_message/fax_message.controller.js
+++ b/server/api/fax_message/fax_message.controller.js
@@ -1,175 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var fs = require('fs');
-var path = require('path');
-var uploadFile = require('upload-file');
-var uuidLib = require('node-uuid');
-var pdf = require('html-pdf');
-// var spindrift = require('spindrift');
-var formidable = require('formidable');
-var exec = require('child_process').exec;
-var config = require('../../config/environment');
-
-var FaxMessage = require('../../models').FaxMessage;
-var FaxAttachment = require('../../models').FaxAttachment;
-var FaxRoom = require('../../models').FaxRoom;
-var FaxAccount = require('../../models').FaxAccount;
-var FaxAttachment = require('../../models').FaxAttachment;
-var User = require('../../models').User;
-
-// Get list of fax_message
-exports.index = function(req, res, next) {
-  var params = {
-    order: 'createdAt DESC',
-    include: [{
-      all: true,
-      include: [{
-        all: true
-      }]
-    }]
-  };
-
-  switch (req.user.role) {
-    case 'admin':
-      params.where = req.query;
-      break;
-    case 'agent':
-      break;
-    default:
-  }
-
-  return FaxMessage
-    .findAll(params)
-    .then(function(fax_message) {
-      return res.status(200).send(fax_message);
-    })
-    .catch(function(err) {
-      return handleError(res, err, next);
-    });
-};
-
-exports.describe = function(req, res) {
-  return FaxMessage
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single faxMessage
-exports.show = function(req, res, next) {
-  return FaxMessage
-    .findById(req.params.id, {
-      include: [{
-        model: FaxAttachment
-      }, {
-        model: User,
-        attributes: ['id', 'name', 'fullname', 'email']
-      }]
-    })
-    .then(function(faxMessage) {
-      if (!faxMessage) {
-        return res.sendStatus(404);
-      }
-      return res.send(faxMessage);
-    })
-    .catch(function(err) {
-      return handleError(res, err, next);
-    });
-};
-
-// Creates a new faxMessage in the DB.
-exports.create = function(req, res, next) {
-  req.body.UserId = req.user.id;
-  req.body.text = req.body.text;
-
-  return FaxMessage
-    .create(req.body, {
-      include: [{
-        model: FaxAttachment
-      }]
-    })
-    .then(function(faxMessage) {
-      return res.status(201).send(faxMessage);
-    }).catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing faxMessage in the DB.
-exports.update = function(req, res, next) {
-  return FaxMessage
-    .findById(req.params.id, {
-      include: [{
-        all: true
-      }]
-    })
-    .then(function(faxMessage) {
-      if (!faxMessage) {
-        return res.sendStatus(404);
-      }
-      return faxMessage.updateAttributes(req.body, {
-        user: req.user
-      });
-    })
-    .then(function(updated) {
-      return res.status(200).send(updated);
-    })
-    .catch(function(err) {
-      return handleError(res, err, next);
-    });
-};
-
-// Deletes a faxMessage from the DB.
-exports.destroy = function(req, res, next) {
-  return FaxMessage
-    .findById(req.params.id)
-    .then(function(faxMessage) {
-      if (!faxMessage) {
-        return res.sendStatus(404);
-      }
-      return faxMessage
-        .destroy();
-    }).then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err, next);
-    });
-};
-
-// Deletes a faxMessage from the DB.
-exports.bulkDelete = function(req, res, next) {
-  return FaxMessage
-    .bulkUpdate({
-      where: {
-        id: {
-          $in: req.body.id
-        }
-      },
-      attributes: {
-        directory: 'TRASH'
-      }
-    })
-    .then(function(faxMessage) {
-      if (!faxMessage) {
-        return res.sendStatus(404);
-      }
-      return faxMessage
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err, next);
-    });
-};
-
-function handleError(res, err, next) {
-  return res.status(500).send(err);
-}
+var _0xc76a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x66\x73","\x70\x61\x74\x68","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x6E\x6F\x64\x65\x2D\x75\x75\x69\x64","\x68\x74\x6D\x6C\x2D\x70\x64\x66","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x55\x73\x65\x72","\x69\x6E\x64\x65\x78","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x44\x45\x53\x43","\x77\x68\x65\x72\x65","\x71\x75\x65\x72\x79","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x74\x65\x78\x74","\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x54\x52\x41\x53\x48","\x62\x75\x6C\x6B\x55\x70\x64\x61\x74\x65"];_0xc76a[0];var _=require(_0xc76a[1]);var fs=require(_0xc76a[2]);var path=require(_0xc76a[3]);var uploadFile=require(_0xc76a[4]);var uuidLib=require(_0xc76a[5]);var pdf=require(_0xc76a[6]);var formidable=require(_0xc76a[7]);var exec=require(_0xc76a[9])[_0xc76a[8]];var config=require(_0xc76a[10]);var FaxMessage=require(_0xc76a[12])[_0xc76a[11]];var FaxAttachment=require(_0xc76a[12])[_0xc76a[13]];var FaxRoom=require(_0xc76a[12])[_0xc76a[14]];var FaxAccount=require(_0xc76a[12])[_0xc76a[15]];var FaxAttachment=require(_0xc76a[12])[_0xc76a[13]];var User=require(_0xc76a[12])[_0xc76a[16]];exports[_0xc76a[17]]= function(_0xd1aaxf,_0xd1aax10,_0xd1aax11){var _0xd1aax12={order:_0xc76a[18],include:[{all:true,include:[{all:true}]}]};switch(_0xd1aaxf[_0xc76a[24]][_0xc76a[23]]){case _0xc76a[21]:_0xd1aax12[_0xc76a[19]]= _0xd1aaxf[_0xc76a[20]];break;case _0xc76a[22]:break;default:};return FaxMessage[_0xc76a[29]](_0xd1aax12)[_0xc76a[28]](function(_0xd1aax14){return _0xd1aax10[_0xc76a[27]](200)[_0xc76a[26]](_0xd1aax14)})[_0xc76a[25]](function(_0xd1aax13){return handleError(_0xd1aax10,_0xd1aax13,_0xd1aax11)})};exports[_0xc76a[30]]= function(_0xd1aaxf,_0xd1aax10){return FaxMessage[_0xc76a[30]]()[_0xc76a[28]](function(_0xd1aax15){return _0xd1aax10[_0xc76a[27]](200)[_0xc76a[26]](_0xd1aax15)})[_0xc76a[25]](function(_0xd1aax13){return handleError(_0xd1aax10,_0xd1aax13)})};exports[_0xc76a[31]]= function(_0xd1aaxf,_0xd1aax10,_0xd1aax11){return FaxMessage[_0xc76a[38]](_0xd1aaxf[_0xc76a[34]][_0xc76a[33]],{include:[{model:FaxAttachment},{model:User,attributes:[_0xc76a[33],_0xc76a[35],_0xc76a[36],_0xc76a[37]]}]})[_0xc76a[28]](function(_0xd1aax16){if(!_0xd1aax16){return _0xd1aax10[_0xc76a[32]](404)};return _0xd1aax10[_0xc76a[26]](_0xd1aax16)})[_0xc76a[25]](function(_0xd1aax13){return handleError(_0xd1aax10,_0xd1aax13,_0xd1aax11)})};exports[_0xc76a[39]]= function(_0xd1aaxf,_0xd1aax10,_0xd1aax11){_0xd1aaxf[_0xc76a[41]][_0xc76a[40]]= _0xd1aaxf[_0xc76a[24]][_0xc76a[33]];_0xd1aaxf[_0xc76a[41]][_0xc76a[42]]= _0xd1aaxf[_0xc76a[41]][_0xc76a[42]];return FaxMessage[_0xc76a[39]](_0xd1aaxf[_0xc76a[41]],{include:[{model:FaxAttachment}]})[_0xc76a[28]](function(_0xd1aax16){return _0xd1aax10[_0xc76a[27]](201)[_0xc76a[26]](_0xd1aax16)})[_0xc76a[25]](function(_0xd1aax13){return handleError(_0xd1aax10,_0xd1aax13)})};exports[_0xc76a[43]]= function(_0xd1aaxf,_0xd1aax10,_0xd1aax11){return FaxMessage[_0xc76a[38]](_0xd1aaxf[_0xc76a[34]][_0xc76a[33]],{include:[{all:true}]})[_0xc76a[28]](function(_0xd1aax16){if(!_0xd1aax16){return _0xd1aax10[_0xc76a[32]](404)};return _0xd1aax16[_0xc76a[44]](_0xd1aaxf[_0xc76a[41]],{user:_0xd1aaxf[_0xc76a[24]]})})[_0xc76a[28]](function(_0xd1aax17){return _0xd1aax10[_0xc76a[27]](200)[_0xc76a[26]](_0xd1aax17)})[_0xc76a[25]](function(_0xd1aax13){return handleError(_0xd1aax10,_0xd1aax13,_0xd1aax11)})};exports[_0xc76a[45]]= function(_0xd1aaxf,_0xd1aax10,_0xd1aax11){return FaxMessage[_0xc76a[38]](_0xd1aaxf[_0xc76a[34]][_0xc76a[33]])[_0xc76a[28]](function(_0xd1aax16){if(!_0xd1aax16){return _0xd1aax10[_0xc76a[32]](404)};return _0xd1aax16[_0xc76a[45]]()})[_0xc76a[28]](function(){return _0xd1aax10[_0xc76a[32]](204)})[_0xc76a[25]](function(_0xd1aax13){return handleError(_0xd1aax10,_0xd1aax13,_0xd1aax11)})};exports[_0xc76a[46]]= function(_0xd1aaxf,_0xd1aax10,_0xd1aax11){return FaxMessage[_0xc76a[48]]({where:{id:{$in:_0xd1aaxf[_0xc76a[41]][_0xc76a[33]]}},attributes:{directory:_0xc76a[47]}})[_0xc76a[28]](function(_0xd1aax16){if(!_0xd1aax16){return _0xd1aax10[_0xc76a[32]](404)};return _0xd1aax16[_0xc76a[45]]()})[_0xc76a[28]](function(){return _0xd1aax10[_0xc76a[32]](204)})[_0xc76a[25]](function(_0xd1aax13){return handleError(_0xd1aax10,_0xd1aax13,_0xd1aax11)})};function handleError(_0xd1aax10,_0xd1aax13,_0xd1aax11){return _0xd1aax10[_0xc76a[27]](500)[_0xc76a[26]](_0xd1aax13)}
\ No newline at end of file
diff --git a/server/api/fax_message/fax_message.events.js b/server/api/fax_message/fax_message.events.js
index ca98ec2..ae72894 100644
--- a/server/api/fax_message/fax_message.events.js
+++ b/server/api/fax_message/fax_message.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const FaxMessage = require('../../models').FaxMessage;
-
-var FaxMessageEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-FaxMessageEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  FaxMessage.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    FaxMessageEvents.emit(event + ':' + doc._id, doc);
-    FaxMessageEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = FaxMessageEvents;
+var _0xe960=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xe960[0];const EventEmitter=require(_0xe960[1]);const FaxMessage=require(_0xe960[3])[_0xe960[2]];var FaxMessageEvents= new EventEmitter();FaxMessageEvents[_0xe960[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xe960[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xe960[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xe960[6]};for(var e in events){var event=events[e];FaxMessage[_0xe960[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xefd5x8,_0xefd5x9,_0xefd5xa){FaxMessageEvents[_0xe960[10]](event+ _0xe960[8]+ _0xefd5x8[_0xe960[9]],_0xefd5x8);FaxMessageEvents[_0xe960[10]](event,_0xefd5x8);_0xefd5xa(null)}}module[_0xe960[11]]= FaxMessageEvents
\ No newline at end of file
diff --git a/server/api/fax_message/fax_message.socket.js b/server/api/fax_message/fax_message.socket.js
index fc70af3..b54de68 100644
--- a/server/api/fax_message/fax_message.socket.js
+++ b/server/api/fax_message/fax_message.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const FaxMessageEvents = require('./fax_message.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('fax_message:' + event, socket);
-
-    FaxMessageEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    FaxMessageEvents.removeListener(event, listener);
-  };
-}
+var _0x62fa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x62fa[0];const FaxMessageEvents=require(_0x62fa[1]);var events=[_0x62fa[2],_0x62fa[3]];exports[_0x62fa[4]]= function(_0x658ex3){for(var _0x658ex4=0,_0x658ex5=events[_0x62fa[5]];_0x658ex4< _0x658ex5;_0x658ex4++){var _0x658ex6=events[_0x658ex4];var _0x658ex7=createListener(_0x62fa[6]+ _0x658ex6,_0x658ex3);FaxMessageEvents[_0x62fa[7]](_0x658ex6,_0x658ex7);_0x658ex3[_0x62fa[7]](_0x62fa[8],removeListener(_0x658ex6,_0x658ex7))}};function createListener(_0x658ex6,_0x658ex3){return function(_0x658ex9){_0x658ex3[_0x62fa[9]](_0x658ex6,_0x658ex9)}}function removeListener(_0x658ex6,_0x658ex7){return function(){FaxMessageEvents[_0x62fa[10]](_0x658ex6,_0x658ex7)}}
\ No newline at end of file
diff --git a/server/api/fax_message/index.js b/server/api/fax_message/index.js
index 60e36a1..31aa481 100644
--- a/server/api/fax_message/index.js
+++ b/server/api/fax_message/index.js
@@ -1,30 +1 @@
-'use strict';
-
-var express = require('express');
-
-var controller = require('./fax_message.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-// router.get('/', controller.index);
-// router.get('/:id/content', controller.getContentFromMessage);
-// router.get('/:id', controller.show);
-// router.post('/', controller.create);
-// router.put('/:id', controller.update);
-// router.patch('/:id', controller.update);
-// router.delete('/:id', controller.destroy);
-
-router.get('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.index);
-router.get('/describe', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.describe);
-router.get('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.show);
-router.post('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.create);
-router.put('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.update);
-router.put('/delete/bulk', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.bulkDelete);
-router.put('/delete/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.update);
-router.put('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.update);
-router.delete('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.destroy);
-
-
-module.exports = router;
+var _0x17b7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x46\x61\x78","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x64\x65\x6C\x65\x74\x65\x2F\x62\x75\x6C\x6B","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x2F\x64\x65\x6C\x65\x74\x65\x2F\x3A\x69\x64","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x17b7[0];var express=require(_0x17b7[1]);var controller=require(_0x17b7[2]);var auth=require(_0x17b7[3]);var license=require(_0x17b7[4]);var router=express.Router();router[_0x17b7[13]](_0x17b7[5],license[_0x17b7[6]](),license[_0x17b7[7]](),auth[_0x17b7[8]](),auth[_0x17b7[11]]([10],[_0x17b7[9],_0x17b7[10]]),controller[_0x17b7[12]]);router[_0x17b7[13]](_0x17b7[14],license[_0x17b7[6]](),license[_0x17b7[7]](),auth[_0x17b7[8]](),auth[_0x17b7[11]]([10],[_0x17b7[9]]),controller[_0x17b7[15]]);router[_0x17b7[13]](_0x17b7[16],license[_0x17b7[6]](),license[_0x17b7[7]](),auth[_0x17b7[8]](),auth[_0x17b7[11]]([10],[_0x17b7[9],_0x17b7[10]]),controller[_0x17b7[17]]);router[_0x17b7[19]](_0x17b7[5],license[_0x17b7[6]](),license[_0x17b7[7]](),auth[_0x17b7[8]](),auth[_0x17b7[11]]([10],[_0x17b7[9],_0x17b7[10]]),controller[_0x17b7[18]]);router[_0x17b7[21]](_0x17b7[5],license[_0x17b7[6]](),license[_0x17b7[7]](),auth[_0x17b7[8]](),auth[_0x17b7[11]]([10],[_0x17b7[9],_0x17b7[10]]),controller[_0x17b7[20]]);router[_0x17b7[21]](_0x17b7[22],license[_0x17b7[6]](),license[_0x17b7[7]](),auth[_0x17b7[8]](),auth[_0x17b7[11]]([10],[_0x17b7[9]]),controller[_0x17b7[23]]);router[_0x17b7[21]](_0x17b7[24],license[_0x17b7[6]](),license[_0x17b7[7]](),auth[_0x17b7[8]](),auth[_0x17b7[11]]([10],[_0x17b7[9]]),controller[_0x17b7[20]]);router[_0x17b7[21]](_0x17b7[16],license[_0x17b7[6]](),license[_0x17b7[7]](),auth[_0x17b7[8]](),auth[_0x17b7[11]]([10],[_0x17b7[9],_0x17b7[10]]),controller[_0x17b7[20]]);router[_0x17b7[26]](_0x17b7[16],license[_0x17b7[6]](),license[_0x17b7[7]](),auth[_0x17b7[8]](),auth[_0x17b7[11]]([10],[_0x17b7[9]]),controller[_0x17b7[25]]);module[_0x17b7[27]]= router
\ No newline at end of file
diff --git a/server/api/fax_queue/fax_queue.controller.js b/server/api/fax_queue/fax_queue.controller.js
index 682bc1f..a0aa5f2 100644
--- a/server/api/fax_queue/fax_queue.controller.js
+++ b/server/api/fax_queue/fax_queue.controller.js
@@ -1,213 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var User = require('../../models').User;
-var FaxQueue = require('../../models').FaxQueue;
-var UserHasFaxQueue = require('../../models').UserHasFaxQueue;
-
-// Get list of fax_queues
-exports.index = function(req, res) {
-  switch (req.user.role) {
-    case 'user':
-      return User
-        .findById(req.user.id, {
-          attributes: ['id']
-        })
-        .then(Util.getFaxQueuesIdByUser(req.query))
-        .then(function(result) {
-          res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-
-    default:
-      return FaxQueue
-        .findAndCountAll(Util.getQuery(req.query))
-        .then(function(result) {
-          res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-  }
-};
-
-// Get a single fax_queue
-exports.show = function(req, res) {
-  return FaxQueue
-    .findById(req.params.id)
-    .then(function(fax_queue) {
-      if (!fax_queue) {
-        return res.sendStatus(404);
-      }
-      return res.send(fax_queue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new fax_queue in the DB.
-exports.create = function(req, res) {
-  var _faxQueue;
-
-  return FaxQueue
-    .create(req.body)
-    .then(function(faxQueue) {
-      _faxQueue = faxQueue;
-
-      if (req.body.agents) {
-        return _faxQueue
-          .addUsers(req.body.agents, {
-            penalty: req.body.penalty || 0,
-            queue: _faxQueue.name
-          });
-      }
-    })
-    .then(function() {
-      return res.status(201).send(_faxQueue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing fax_queue in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return FaxQueue
-    .findById(req.params.id)
-    .then(function(fax_queue) {
-      if (!fax_queue) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(fax_queue, req.body);
-      return updated.save();
-    })
-    .then(function(fax_queue) {
-      return res.status(200).send(fax_queue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a fax_queue from the DB.
-exports.destroy = function(req, res) {
-  return FaxQueue
-    .findById(req.params.id)
-    .then(function(fax_queue) {
-      if (!fax_queue) {
-        return res.sendStatus(404);
-      }
-      return fax_queue.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.addAgents = function(req, res, next) {
-
-  return FaxQueue
-    .findById(req.params.id)
-    .then(function(faxQueue) {
-      if (!faxQueue) {
-        return res.sendStatus(404);
-      }
-      var userHasFaxQueues = _.map(req.body.agents, function(agent) {
-        return {
-          UserId: agent,
-          penalty: req.body.penalty,
-          FaxQueueId: faxQueue.id,
-          queue: faxQueue.name
-        };
-      });
-
-      return UserHasFaxQueue
-        .bulkCreate(userHasFaxQueues, {
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.showAgents = function(req, res) {
-  return FaxQueue
-    .findById(req.params.id)
-    .then(function(queue) {
-      if (!queue) {
-        return res.sendStatus(404);
-      }
-      return queue
-        .getUsers({
-          where: {
-            role: 'agent'
-          },
-          attributes: ['id', 'name', 'fullname', 'email']
-        });
-    })
-    .then(function(agents) {
-      return res.status(200).send({
-        rows: agents,
-        count: agents.length
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.removeAgents = function(req, res, next) {
-  return FaxQueue
-    .findById(req.params.id)
-    .then(function(queue) {
-      if (!queue) {
-        return res.sendStatus(404);
-      }
-      return queue
-        .removeUsers(req.query.agents, {
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(202);
-    })
-    .catch(function(err) {
-      return next(err);
-    });
-};
-
-// Deletes a agent from the DB.
-exports.bulkDestroy = function(req, res) {
-  return FaxQueue
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x4292=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x6C\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x63\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x73","\x62\x6F\x64\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x6E\x61\x6D\x65","\x61\x64\x64\x55\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x4292[0];var _=require(_0x4292[1]);var Util=require(_0x4292[2]);var User=require(_0x4292[4])[_0x4292[3]];var FaxQueue=require(_0x4292[4])[_0x4292[5]];var UserHasFaxQueue=require(_0x4292[4])[_0x4292[6]];exports[_0x4292[7]]= function(_0xfad4x6,_0xfad4x7){switch(_0xfad4x6[_0x4292[15]][_0x4292[19]]){case _0x4292[15]:return User[_0x4292[16]](_0xfad4x6[_0x4292[15]][_0x4292[14]],{attributes:[_0x4292[14]]})[_0x4292[11]](Util[_0x4292[13]](_0xfad4x6[_0x4292[12]]))[_0x4292[11]](function(_0xfad4x9){_0xfad4x7[_0x4292[10]](200)[_0x4292[9]](_0xfad4x9)})[_0x4292[8]](function(_0xfad4x8){return handleError(_0xfad4x7,_0xfad4x8)});default:return FaxQueue[_0x4292[18]](Util[_0x4292[17]](_0xfad4x6[_0x4292[12]]))[_0x4292[11]](function(_0xfad4x9){_0xfad4x7[_0x4292[10]](200)[_0x4292[9]](_0xfad4x9)})[_0x4292[8]](function(_0xfad4x8){return handleError(_0xfad4x7,_0xfad4x8)})}};exports[_0x4292[20]]= function(_0xfad4x6,_0xfad4x7){return FaxQueue[_0x4292[16]](_0xfad4x6[_0x4292[22]][_0x4292[14]])[_0x4292[11]](function(_0xfad4xa){if(!_0xfad4xa){return _0xfad4x7[_0x4292[21]](404)};return _0xfad4x7[_0x4292[9]](_0xfad4xa)})[_0x4292[8]](function(_0xfad4x8){return handleError(_0xfad4x7,_0xfad4x8)})};exports[_0x4292[23]]= function(_0xfad4x6,_0xfad4x7){var _0xfad4xb;return FaxQueue[_0x4292[23]](_0xfad4x6[_0x4292[25]])[_0x4292[11]](function(_0xfad4xc){_0xfad4xb= _0xfad4xc;if(_0xfad4x6[_0x4292[25]][_0x4292[24]]){return _0xfad4xb[_0x4292[28]](_0xfad4x6[_0x4292[25]][_0x4292[24]],{penalty:_0xfad4x6[_0x4292[25]][_0x4292[26]]|| 0,queue:_0xfad4xb[_0x4292[27]]})}})[_0x4292[11]](function(){return _0xfad4x7[_0x4292[10]](201)[_0x4292[9]](_0xfad4xb)})[_0x4292[8]](function(_0xfad4x8){return handleError(_0xfad4x7,_0xfad4x8)})};exports[_0x4292[29]]= function(_0xfad4x6,_0xfad4x7){if(_0xfad4x6[_0x4292[25]][_0x4292[14]]){delete _0xfad4x6[_0x4292[25]][_0x4292[14]]};return FaxQueue[_0x4292[16]](_0xfad4x6[_0x4292[22]][_0x4292[14]])[_0x4292[11]](function(_0xfad4xa){if(!_0xfad4xa){return _0xfad4x7[_0x4292[21]](404)};var _0xfad4xd=_[_0x4292[30]](_0xfad4xa,_0xfad4x6[_0x4292[25]]);return _0xfad4xd[_0x4292[31]]()})[_0x4292[11]](function(_0xfad4xa){return _0xfad4x7[_0x4292[10]](200)[_0x4292[9]](_0xfad4xa)})[_0x4292[8]](function(_0xfad4x8){return handleError(_0xfad4x7,_0xfad4x8)})};exports[_0x4292[32]]= function(_0xfad4x6,_0xfad4x7){return FaxQueue[_0x4292[16]](_0xfad4x6[_0x4292[22]][_0x4292[14]])[_0x4292[11]](function(_0xfad4xa){if(!_0xfad4xa){return _0xfad4x7[_0x4292[21]](404)};return _0xfad4xa[_0x4292[32]]()})[_0x4292[11]](function(){return _0xfad4x7[_0x4292[21]](204)})[_0x4292[8]](function(_0xfad4x8){return handleError(_0xfad4x7,_0xfad4x8)})};exports[_0x4292[33]]= function(_0xfad4x6,_0xfad4x7,_0xfad4xe){return FaxQueue[_0x4292[16]](_0xfad4x6[_0x4292[22]][_0x4292[14]])[_0x4292[11]](function(_0xfad4xc){if(!_0xfad4xc){return _0xfad4x7[_0x4292[21]](404)};var _0xfad4xf=_[_0x4292[34]](_0xfad4x6[_0x4292[25]][_0x4292[24]],function(_0xfad4x10){return {UserId:_0xfad4x10,penalty:_0xfad4x6[_0x4292[25]][_0x4292[26]],FaxQueueId:_0xfad4xc[_0x4292[14]],queue:_0xfad4xc[_0x4292[27]]}});return UserHasFaxQueue[_0x4292[35]](_0xfad4xf,{individualHooks:true})})[_0x4292[11]](function(){return _0xfad4x7[_0x4292[21]](200)})[_0x4292[8]](function(_0xfad4x8){return handleError(_0xfad4x7,_0xfad4x8)})};exports[_0x4292[36]]= function(_0xfad4x6,_0xfad4x7){return FaxQueue[_0x4292[16]](_0xfad4x6[_0x4292[22]][_0x4292[14]])[_0x4292[11]](function(_0xfad4x12){if(!_0xfad4x12){return _0xfad4x7[_0x4292[21]](404)};return _0xfad4x12[_0x4292[41]]({where:{role:_0x4292[38]},attributes:[_0x4292[14],_0x4292[27],_0x4292[39],_0x4292[40]]})})[_0x4292[11]](function(_0xfad4x11){return _0xfad4x7[_0x4292[10]](200)[_0x4292[9]]({rows:_0xfad4x11,count:_0xfad4x11[_0x4292[37]]})})[_0x4292[8]](function(_0xfad4x8){return handleError(_0xfad4x7,_0xfad4x8)})};exports[_0x4292[42]]= function(_0xfad4x6,_0xfad4x7,_0xfad4xe){return FaxQueue[_0x4292[16]](_0xfad4x6[_0x4292[22]][_0x4292[14]])[_0x4292[11]](function(_0xfad4x12){if(!_0xfad4x12){return _0xfad4x7[_0x4292[21]](404)};return _0xfad4x12[_0x4292[43]](_0xfad4x6[_0x4292[12]][_0x4292[24]],{individualHooks:true})})[_0x4292[11]](function(){return _0xfad4x7[_0x4292[21]](202)})[_0x4292[8]](function(_0xfad4x8){return _0xfad4xe(_0xfad4x8)})};exports[_0x4292[44]]= function(_0xfad4x6,_0xfad4x7){return FaxQueue[_0x4292[32]]({where:{id:_0xfad4x6[_0x4292[12]][_0x4292[45]]},individualHooks:true})[_0x4292[11]](function(){return _0xfad4x7[_0x4292[21]](204)})[_0x4292[8]](function(_0xfad4x8){return handleError(_0xfad4x7,_0xfad4x8)})};function handleError(_0xfad4x7,_0xfad4x8){return _0xfad4x7[_0x4292[10]](500)[_0x4292[9]](_0xfad4x8)}
\ No newline at end of file
diff --git a/server/api/fax_queue/fax_queue.events.js b/server/api/fax_queue/fax_queue.events.js
index a65c990..e3cee9b 100644
--- a/server/api/fax_queue/fax_queue.events.js
+++ b/server/api/fax_queue/fax_queue.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const FaxQueue = require('../../models').FaxQueue;
-
-var FaxQueueEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-FaxQueueEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  FaxQueue.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    FaxQueueEvents.emit(event + ':' + doc._id, doc);
-    FaxQueueEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = FaxQueueEvents;
+var _0x312e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x312e[0];const EventEmitter=require(_0x312e[1]);const FaxQueue=require(_0x312e[3])[_0x312e[2]];var FaxQueueEvents= new EventEmitter();FaxQueueEvents[_0x312e[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x312e[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x312e[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x312e[6]};for(var e in events){var event=events[e];FaxQueue[_0x312e[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4e54x8,_0x4e54x9,_0x4e54xa){FaxQueueEvents[_0x312e[10]](event+ _0x312e[8]+ _0x4e54x8[_0x312e[9]],_0x4e54x8);FaxQueueEvents[_0x312e[10]](event,_0x4e54x8);_0x4e54xa(null)}}module[_0x312e[11]]= FaxQueueEvents
\ No newline at end of file
diff --git a/server/api/fax_queue/fax_queue.socket.js b/server/api/fax_queue/fax_queue.socket.js
index 8d589ab..3a41fd1 100644
--- a/server/api/fax_queue/fax_queue.socket.js
+++ b/server/api/fax_queue/fax_queue.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const FaxQueueEvents = require('./fax_queue.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('fax_queue:' + event, socket);
-
-    FaxQueueEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    FaxQueueEvents.removeListener(event, listener);
-  };
-}
+var _0xb601=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xb601[0];const FaxQueueEvents=require(_0xb601[1]);var events=[_0xb601[2],_0xb601[3]];exports[_0xb601[4]]= function(_0xa694x3){for(var _0xa694x4=0,_0xa694x5=events[_0xb601[5]];_0xa694x4< _0xa694x5;_0xa694x4++){var _0xa694x6=events[_0xa694x4];var _0xa694x7=createListener(_0xb601[6]+ _0xa694x6,_0xa694x3);FaxQueueEvents[_0xb601[7]](_0xa694x6,_0xa694x7);_0xa694x3[_0xb601[7]](_0xb601[8],removeListener(_0xa694x6,_0xa694x7))}};function createListener(_0xa694x6,_0xa694x3){return function(_0xa694x9){_0xa694x3[_0xb601[9]](_0xa694x6,_0xa694x9)}}function removeListener(_0xa694x6,_0xa694x7){return function(){FaxQueueEvents[_0xb601[10]](_0xa694x6,_0xa694x7)}}
\ No newline at end of file
diff --git a/server/api/fax_queue/index.js b/server/api/fax_queue/index.js
index 0e5f100..1353ccd 100644
--- a/server/api/fax_queue/index.js
+++ b/server/api/fax_queue/index.js
@@ -1,21 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./fax_queue.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.index);
-router.get('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.show);
-router.get('/:id/agents', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.showAgents);
-router.post('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasRole('admin'), controller.create);
-router.post('/:id/agents', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasRole('admin'), controller.addAgents);
-router.put('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasRole('admin'), controller.update);
-router.patch('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasRole('admin'), controller.update);
-router.delete('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasRole('admin'), controller.bulkDestroy);
-router.delete('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy);
-router.delete('/:id/agents', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasRole('admin'), controller.removeAgents);
-
-module.exports = router;
+var _0x94ee=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x46\x61\x78","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x68\x61\x73\x52\x6F\x6C\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x94ee[0];var express=require(_0x94ee[1]);var controller=require(_0x94ee[2]);var auth=require(_0x94ee[3]);var license=require(_0x94ee[4]);var router=express.Router();router[_0x94ee[12]](_0x94ee[5],license[_0x94ee[6]](),license[_0x94ee[7]](),auth[_0x94ee[8]](),auth[_0x94ee[10]]([10],[_0x94ee[9]]),controller[_0x94ee[11]]);router[_0x94ee[12]](_0x94ee[13],license[_0x94ee[6]](),license[_0x94ee[7]](),auth[_0x94ee[8]](),auth[_0x94ee[10]]([10],[_0x94ee[9]]),controller[_0x94ee[14]]);router[_0x94ee[12]](_0x94ee[15],license[_0x94ee[6]](),license[_0x94ee[7]](),auth[_0x94ee[8]](),auth[_0x94ee[10]]([10],[_0x94ee[9]]),controller[_0x94ee[16]]);router[_0x94ee[19]](_0x94ee[5],license[_0x94ee[6]](),license[_0x94ee[7]](),auth[_0x94ee[8]](),auth[_0x94ee[17]](_0x94ee[9]),controller[_0x94ee[18]]);router[_0x94ee[19]](_0x94ee[15],license[_0x94ee[6]](),license[_0x94ee[7]](),auth[_0x94ee[8]](),auth[_0x94ee[17]](_0x94ee[9]),controller[_0x94ee[20]]);router[_0x94ee[22]](_0x94ee[13],license[_0x94ee[6]](),license[_0x94ee[7]](),auth[_0x94ee[8]](),auth[_0x94ee[17]](_0x94ee[9]),controller[_0x94ee[21]]);router[_0x94ee[23]](_0x94ee[13],license[_0x94ee[6]](),license[_0x94ee[7]](),auth[_0x94ee[8]](),auth[_0x94ee[17]](_0x94ee[9]),controller[_0x94ee[21]]);router[_0x94ee[25]](_0x94ee[5],license[_0x94ee[6]](),license[_0x94ee[7]](),auth[_0x94ee[8]](),auth[_0x94ee[17]](_0x94ee[9]),controller[_0x94ee[24]]);router[_0x94ee[25]](_0x94ee[13],license[_0x94ee[6]](),license[_0x94ee[7]](),auth[_0x94ee[8]](),auth[_0x94ee[17]](_0x94ee[9]),controller[_0x94ee[26]]);router[_0x94ee[25]](_0x94ee[15],license[_0x94ee[6]](),license[_0x94ee[7]](),auth[_0x94ee[8]](),auth[_0x94ee[17]](_0x94ee[9]),controller[_0x94ee[27]]);module[_0x94ee[28]]= router
\ No newline at end of file
diff --git a/server/api/fax_room/fax_room.controller.js b/server/api/fax_room/fax_room.controller.js
index ab316a3..b327cef 100644
--- a/server/api/fax_room/fax_room.controller.js
+++ b/server/api/fax_room/fax_room.controller.js
@@ -1,474 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-
-var Util = require('../../config/util');
-var moment = require('moment');
-
-var sequelize = require('../../models').sequelize;
-var User = require('../../models').User;
-var Agent = require('../../models').User;
-var Contact = require('../../models').Contact;
-var FaxRoom = require('../../models').FaxRoom;
-var FaxMessage = require('../../models').FaxMessage;
-var FaxAccount = require('../../models').FaxAccount;
-var FaxApplication = require('../../models').FaxApplication;
-var FaxQueue = require('../../models').FaxQueue;
-var FaxAttachment = require('../../models').FaxAttachment;
-
-// Get list of faxRooms
-exports.index = function(req, res, next) {
-  return FaxRoom
-    .scope('default')
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return FaxRoom
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function getFaxQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return User
-          .findById(user.id, {
-            attributes: ['id']
-          })
-          .then(Util.getFaxQueuesIdByUser({}, {
-            attributes: ['id']
-          }))
-          .then(function(userQueues) {
-            return {
-              include: {
-                model: FaxAccount,
-                include: {
-                  model: FaxApplication,
-                  include: {
-                    model: FaxQueue,
-                    where: {
-                      id: _.map(userQueues, 'id')
-                    }
-                  }
-                }
-              }
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
-
-exports.pending = function(req, res) {
-  return Promise
-    .all([])
-    .then(getFaxQueues(req.user))
-    .then(function(condition) {
-      return FaxRoom
-        .count(_.merge(Util.getQuery(req.query, {
-          status: 'PENDING',
-          updatedAt: {
-            $gte: moment().startOf('day')
-          }
-        }), condition));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.new = function(req, res) {
-  return Promise
-    .all([])
-    .then(getFaxQueues(req.user))
-    .then(function(condition) {
-      return FaxRoom
-        .count(_.merge(Util.getQuery(req.query, {
-          status: 'NEW',
-          updatedAt: {
-            $gte: moment().startOf('day')
-          }
-        }), condition));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.open = function(req, res) {
-  return Promise
-    .all([])
-    .then(getFaxQueues(req.user))
-    .then(function(condition) {
-      return FaxRoom
-        .count(_.merge(Util.getQuery(req.query, {
-          status: 'OPEN',
-          updatedAt: {
-            $gte: moment().startOf('day')
-          }
-        }), condition));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.closed = function(req, res) {
-  return Promise
-    .all([])
-    .then(getFaxQueues(req.user))
-    .then(function(condition) {
-      return FaxRoom
-        .count(_.merge(Util.getQuery(req.query, {
-          status: 'CLOSED',
-          updatedAt: {
-            $gte: moment().startOf('day')
-          }
-        }), condition));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.inbox = function(req, res, next) {
-  switch (req.user.role) {
-    case 'agent':
-
-      return sequelize.query(
-          'SELECT `FaxRoom`.`id`, `FaxRoom`.`from`, `FaxRoom`.`account`, `FaxRoom`.`status`, `FaxRoom`.`lastEvent`, `FaxRoom`.`updatedAt` FROM `fax_rooms` AS `FaxRoom` LEFT OUTER JOIN (`user_has_fax_rooms` AS `Users.user_has_fax_rooms` INNER JOIN `users` AS `Users` ON `Users`.`id` = `Users.user_has_fax_rooms`.`UserId`) ON `FaxRoom`.`id` = `Users.user_has_fax_rooms`.`FaxRoomId` WHERE (`FaxRoom`.`deletedAt` IS NULL AND (`FaxRoom`.`status` = :status OR `Users`.`id` = :id))', {
-            replacements: {
-              status: 'UNMANAGED',
-              id: req.user.id
-            },
-            type: sequelize.QueryTypes.SELECT
-          })
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.error(err);
-          return handleError(res, err);
-        });
-
-    default:
-
-      return sequelize.query(
-          'SELECT `id`, `from`, `account`, `status`, `lastEvent` ,`updatedAt` FROM `fax_rooms` WHERE `fax_rooms`.`deletedAt` IS NULL', {
-            replacements: {
-              status: 'UNMANAGED',
-              id: req.user.id
-            },
-            type: sequelize.QueryTypes.SELECT
-          })
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-  }
-};
-
-// Get list of agent faxRooms
-exports.agentIndex = function(req, res, next) {
-  return FaxRoom
-    .findAll({
-      where: {
-        UserId: req.params.id
-      },
-      include: [{
-        all: true
-      }]
-    })
-    .then(function(faxRooms) {
-      return res.status(200).send(faxRooms);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get list of agent faxRooms
-exports.openRoom = function(req, res, next) {
-  var _faxRoom;
-
-  if (req.user.role === 'agent') {
-    return FaxRoom
-      .findById(req.params.id)
-      .then(function(faxRoom) {
-        _faxRoom = faxRoom;
-        if (!_faxRoom) {
-          return res.sendStatus(404);
-        }
-
-        return _faxRoom
-          .update({
-            status: 'OPEN'
-          }, {
-            userId: req.user.id
-          });
-      })
-      .then(function() {
-        return _faxRoom
-          .addUser(req.user.id);
-      })
-      .then(function() {
-        return res.sendStatus(200);
-      })
-      .catch(function(err) {
-        return handleError(res, err);
-      });
-  }
-};
-
-// Get a single faxRoom
-exports.show = function(req, res, next) {
-  return FaxRoom
-    .scope('default')
-    .findById(req.params.id)
-    .then(function(faxRoom) {
-      if (!faxRoom) {
-        return res.sendStatus(404);
-      }
-      return res.send(faxRoom);
-    })
-    .catch(function(err) {
-      console.error(err);
-      return handleError(res, err);
-    });
-};
-
-// Get a single faxRoom
-exports.showAgents = function(req, res, next) {
-  return FaxRoom
-    .findById(req.params.id)
-    .then(function(faxRoom) {
-      if (!faxRoom) {
-        return res.sendStatus(404);
-      }
-
-      return faxRoom
-        .getUsers({
-          attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal']
-        });
-    })
-    .then(function(users) {
-      return res.send(users);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new faxRoom in the DB.
-exports.create = function(req, res, next) {
-  return FaxRoom
-    .create(req.body)
-    .then(function(faxRoom) {
-      return res.status(201).send(faxRoom);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new mailMessage in the DB.
-exports.createMessage = function(req, res, next) {
-  req.body.UserId = req.user.id;
-  req.body.FaxRoomId = req.params.id;
-  req.body.text = req.body.text;
-
-  return FaxMessage
-    .create(req.body, {
-      include: [{
-        model: FaxAttachment
-      }],
-      user: req.user
-    }).then(function(faxMessage) {
-      return res.status(201).send(faxMessage);
-    }).catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing faxRoom in the DB.
-exports.update = function(req, res, next) {
-  return FaxRoom
-    .findById(req.params.id)
-    .then(function(faxRoom) {
-      if (!faxRoom) {
-        return res.sendStatus(404);
-      }
-      // CHECK IF FAX IS ALREADY ASSIGNED
-      if (faxRoom.jobId) {
-        throw new Error('Fax already assigned');
-      }
-      var updated = _.merge(faxRoom, req.body);
-
-      return updated
-        .save();
-    })
-    .then(function(faxRoom) {
-      return res.status(200).send(faxRoom);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single faxRoom
-exports.updateAgents = function(req, res, next) {
-  return FaxRoom
-    .findById(req.params.id)
-    .then(function(faxRoom) {
-      if (!faxRoom) {
-        return res.sendStatus(404);
-      }
-
-      return faxRoom
-        .setUsers(req.body.agents, {
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a faxRoom from the DB.
-exports.destroy = function(req, res, next) {
-  return FaxRoom
-    .findById(req.params.id)
-    .then(function(faxRoom) {
-      if (!faxRoom) {
-        return res.sendStatus(404);
-      }
-      return faxRoom.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a agent from the DB.
-exports.bulkDestroy = function(req, res) {
-  return FaxRoom
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-exports.updatePatch = function(req, res, next) {
-  var _options = {
-    where: {
-      id: req.params.id.split(',')
-    },
-    user: req.user,
-    individualHooks: true
-  };
-
-  return FaxRoom
-    .update(req.body, _options)
-    .then(function(mailRooms) {
-      if (!mailRooms) {
-        return res.sendStatus(404);
-      }
-      return mailRooms
-    })
-    .then(function(mailRooms) {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getRoomByMessage = function(req, res, next) {
-  return FaxMessage
-    .findById(req.params.id)
-    .then(function(faxMessage) {
-      return faxMessage
-        .getFaxRoom({
-          include: [{
-            model: FaxAccount
-          }, {
-            model: FaxMessage,
-            include: [{
-              model: FaxAttachment
-            }, {
-              model: User,
-              attributes: ['id', 'name', 'fullname', 'email']
-            }]
-          }, {
-            model: User,
-            attributes: ['id', 'name', 'fullname', 'email']
-          }]
-        });
-    })
-    .then(function(faxRoom) {
-      return res.send(faxRoom);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
+var _0x4d95=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x61\x78\x51\x75\x65\x75\x65","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x72\x6F\x6C\x65","\x70\x65\x6E\x64\x69\x6E\x67","\x6C\x6F\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x6E\x65\x77","\x4E\x45\x57","\x6F\x70\x65\x6E","\x4F\x50\x45\x4E","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x69\x6E\x62\x6F\x78","\x65\x72\x72\x6F\x72","\x53\x45\x4C\x45\x43\x54\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x20\x4C\x45\x46\x54\x20\x4F\x55\x54\x45\x52\x20\x4A\x4F\x49\x4E\x20\x28\x60\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x49\x4E\x4E\x45\x52\x20\x4A\x4F\x49\x4E\x20\x60\x75\x73\x65\x72\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x60\x20\x4F\x4E\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x55\x73\x65\x72\x49\x64\x60\x29\x20\x4F\x4E\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64\x60\x20\x57\x48\x45\x52\x45\x20\x28\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C\x20\x41\x4E\x44\x20\x28\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x20\x3D\x20\x3A\x73\x74\x61\x74\x75\x73\x20\x4F\x52\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x3A\x69\x64\x29\x29","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x61\x67\x65\x6E\x74","\x53\x45\x4C\x45\x43\x54\x20\x60\x69\x64\x60\x2C\x20\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x20\x2C\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x57\x48\x45\x52\x45\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x6F\x70\x65\x6E\x52\x6F\x6F\x6D","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x61\x64\x64\x55\x73\x65\x72","\x75\x70\x64\x61\x74\x65","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x74\x65\x78\x74","\x6A\x6F\x62\x49\x64","\x46\x61\x78\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x61\x73\x73\x69\x67\x6E\x65\x64","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x2C","\x73\x70\x6C\x69\x74","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D"];_0x4d95[0];var _=require(_0x4d95[1]);var util=require(_0x4d95[2]);var Util=require(_0x4d95[3]);var moment=require(_0x4d95[4]);var sequelize=require(_0x4d95[6])[_0x4d95[5]];var User=require(_0x4d95[6])[_0x4d95[7]];var Agent=require(_0x4d95[6])[_0x4d95[7]];var Contact=require(_0x4d95[6])[_0x4d95[8]];var FaxRoom=require(_0x4d95[6])[_0x4d95[9]];var FaxMessage=require(_0x4d95[6])[_0x4d95[10]];var FaxAccount=require(_0x4d95[6])[_0x4d95[11]];var FaxApplication=require(_0x4d95[6])[_0x4d95[12]];var FaxQueue=require(_0x4d95[6])[_0x4d95[13]];var FaxAttachment=require(_0x4d95[6])[_0x4d95[14]];exports[_0x4d95[15]]= function(_0x5b6bxf,_0x5b6bx10,_0x5b6bx11){return FaxRoom[_0x4d95[24]](_0x4d95[23])[_0x4d95[22]](Util[_0x4d95[21]](_0x5b6bxf[_0x4d95[20]]))[_0x4d95[19]](function(_0x5b6bx13){return _0x5b6bx10[_0x4d95[18]](200)[_0x4d95[17]](_0x5b6bx13)})[_0x4d95[16]](function(_0x5b6bx12){return handleError(_0x5b6bx10,_0x5b6bx12)})};exports[_0x4d95[25]]= function(_0x5b6bxf,_0x5b6bx10){return FaxRoom[_0x4d95[25]]()[_0x4d95[19]](function(_0x5b6bx14){return _0x5b6bx10[_0x4d95[18]](200)[_0x4d95[17]](_0x5b6bx14)})[_0x4d95[16]](function(_0x5b6bx12){return handleError(_0x5b6bx10,_0x5b6bx12)})};function getFaxQueues(_0x5b6bx16){return function(){switch(_0x5b6bx16[_0x4d95[31]]){case _0x4d95[30]:return User[_0x4d95[29]](_0x5b6bx16[_0x4d95[26]],{attributes:[_0x4d95[26]]})[_0x4d95[19]](Util[_0x4d95[28]]({},{attributes:[_0x4d95[26]]}))[_0x4d95[19]](function(_0x5b6bx17){return {include:{model:FaxAccount,include:{model:FaxApplication,include:{model:FaxQueue,where:{id:_[_0x4d95[27]](_0x5b6bx17,_0x4d95[26])}}}}}});default:return {}}}}exports[_0x4d95[32]]= function(_0x5b6bxf,_0x5b6bx10){return Promise[_0x4d95[39]]([])[_0x4d95[19]](getFaxQueues(_0x5b6bxf[_0x4d95[30]]))[_0x4d95[19]](function(_0x5b6bx19){return FaxRoom[_0x4d95[38]](_[_0x4d95[37]](Util[_0x4d95[21]](_0x5b6bxf[_0x4d95[20]],{status:_0x4d95[34],updatedAt:{$gte:moment()[_0x4d95[36]](_0x4d95[35])}}),_0x5b6bx19))})[_0x4d95[19]](function(_0x5b6bx18){return _0x5b6bx10[_0x4d95[18]](200)[_0x4d95[17]]({value:_0x5b6bx18})})[_0x4d95[16]](function(_0x5b6bx12){console[_0x4d95[33]](_0x5b6bx12);return handleError(_0x5b6bx10,_0x5b6bx12)})};exports[_0x4d95[40]]= function(_0x5b6bxf,_0x5b6bx10){return Promise[_0x4d95[39]]([])[_0x4d95[19]](getFaxQueues(_0x5b6bxf[_0x4d95[30]]))[_0x4d95[19]](function(_0x5b6bx19){return FaxRoom[_0x4d95[38]](_[_0x4d95[37]](Util[_0x4d95[21]](_0x5b6bxf[_0x4d95[20]],{status:_0x4d95[41],updatedAt:{$gte:moment()[_0x4d95[36]](_0x4d95[35])}}),_0x5b6bx19))})[_0x4d95[19]](function(_0x5b6bx18){return _0x5b6bx10[_0x4d95[18]](200)[_0x4d95[17]]({value:_0x5b6bx18})})[_0x4d95[16]](function(_0x5b6bx12){console[_0x4d95[33]](_0x5b6bx12);return handleError(_0x5b6bx10,_0x5b6bx12)})};exports[_0x4d95[42]]= function(_0x5b6bxf,_0x5b6bx10){return Promise[_0x4d95[39]]([])[_0x4d95[19]](getFaxQueues(_0x5b6bxf[_0x4d95[30]]))[_0x4d95[19]](function(_0x5b6bx19){return FaxRoom[_0x4d95[38]](_[_0x4d95[37]](Util[_0x4d95[21]](_0x5b6bxf[_0x4d95[20]],{status:_0x4d95[43],updatedAt:{$gte:moment()[_0x4d95[36]](_0x4d95[35])}}),_0x5b6bx19))})[_0x4d95[19]](function(_0x5b6bx18){return _0x5b6bx10[_0x4d95[18]](200)[_0x4d95[17]]({value:_0x5b6bx18})})[_0x4d95[16]](function(_0x5b6bx12){console[_0x4d95[33]](_0x5b6bx12);return handleError(_0x5b6bx10,_0x5b6bx12)})};exports[_0x4d95[44]]= function(_0x5b6bxf,_0x5b6bx10){return Promise[_0x4d95[39]]([])[_0x4d95[19]](getFaxQueues(_0x5b6bxf[_0x4d95[30]]))[_0x4d95[19]](function(_0x5b6bx19){return FaxRoom[_0x4d95[38]](_[_0x4d95[37]](Util[_0x4d95[21]](_0x5b6bxf[_0x4d95[20]],{status:_0x4d95[45],updatedAt:{$gte:moment()[_0x4d95[36]](_0x4d95[35])}}),_0x5b6bx19))})[_0x4d95[19]](function(_0x5b6bx18){return _0x5b6bx10[_0x4d95[18]](200)[_0x4d95[17]]({value:_0x5b6bx18})})[_0x4d95[16]](function(_0x5b6bx12){console[_0x4d95[33]](_0x5b6bx12);return handleError(_0x5b6bx10,_0x5b6bx12)})};exports[_0x4d95[46]]= function(_0x5b6bxf,_0x5b6bx10,_0x5b6bx11){switch(_0x5b6bxf[_0x4d95[30]][_0x4d95[31]]){case _0x4d95[52]:return sequelize[_0x4d95[20]](_0x4d95[48],{replacements:{status:_0x4d95[49],id:_0x5b6bxf[_0x4d95[30]][_0x4d95[26]]},type:sequelize[_0x4d95[51]][_0x4d95[50]]})[_0x4d95[19]](function(_0x5b6bx13){return _0x5b6bx10[_0x4d95[18]](200)[_0x4d95[17]](_0x5b6bx13)})[_0x4d95[16]](function(_0x5b6bx12){console[_0x4d95[47]](_0x5b6bx12);return handleError(_0x5b6bx10,_0x5b6bx12)});default:return sequelize[_0x4d95[20]](_0x4d95[53],{replacements:{status:_0x4d95[49],id:_0x5b6bxf[_0x4d95[30]][_0x4d95[26]]},type:sequelize[_0x4d95[51]][_0x4d95[50]]})[_0x4d95[19]](function(_0x5b6bx13){return _0x5b6bx10[_0x4d95[18]](200)[_0x4d95[17]](_0x5b6bx13)})[_0x4d95[16]](function(_0x5b6bx12){return handleError(_0x5b6bx10,_0x5b6bx12)})}};exports[_0x4d95[54]]= function(_0x5b6bxf,_0x5b6bx10,_0x5b6bx11){return FaxRoom[_0x4d95[56]]({where:{UserId:_0x5b6bxf[_0x4d95[55]][_0x4d95[26]]},include:[{all:true}]})[_0x4d95[19]](function(_0x5b6bx1a){return _0x5b6bx10[_0x4d95[18]](200)[_0x4d95[17]](_0x5b6bx1a)})[_0x4d95[16]](function(_0x5b6bx12){return handleError(_0x5b6bx10,_0x5b6bx12)})};exports[_0x4d95[57]]= function(_0x5b6bxf,_0x5b6bx10,_0x5b6bx11){var _0x5b6bx1b;if(_0x5b6bxf[_0x4d95[30]][_0x4d95[31]]=== _0x4d95[52]){return FaxRoom[_0x4d95[29]](_0x5b6bxf[_0x4d95[55]][_0x4d95[26]])[_0x4d95[19]](function(_0x5b6bx1c){_0x5b6bx1b= _0x5b6bx1c;if(!_0x5b6bx1b){return _0x5b6bx10[_0x4d95[58]](404)};return _0x5b6bx1b[_0x4d95[60]]({status:_0x4d95[43]},{userId:_0x5b6bxf[_0x4d95[30]][_0x4d95[26]]})})[_0x4d95[19]](function(){return _0x5b6bx1b[_0x4d95[59]](_0x5b6bxf[_0x4d95[30]][_0x4d95[26]])})[_0x4d95[19]](function(){return _0x5b6bx10[_0x4d95[58]](200)})[_0x4d95[16]](function(_0x5b6bx12){return handleError(_0x5b6bx10,_0x5b6bx12)})}};exports[_0x4d95[61]]= function(_0x5b6bxf,_0x5b6bx10,_0x5b6bx11){return FaxRoom[_0x4d95[24]](_0x4d95[23])[_0x4d95[29]](_0x5b6bxf[_0x4d95[55]][_0x4d95[26]])[_0x4d95[19]](function(_0x5b6bx1c){if(!_0x5b6bx1c){return _0x5b6bx10[_0x4d95[58]](404)};return _0x5b6bx10[_0x4d95[17]](_0x5b6bx1c)})[_0x4d95[16]](function(_0x5b6bx12){console[_0x4d95[47]](_0x5b6bx12);return handleError(_0x5b6bx10,_0x5b6bx12)})};exports[_0x4d95[62]]= function(_0x5b6bxf,_0x5b6bx10,_0x5b6bx11){return FaxRoom[_0x4d95[29]](_0x5b6bxf[_0x4d95[55]][_0x4d95[26]])[_0x4d95[19]](function(_0x5b6bx1c){if(!_0x5b6bx1c){return _0x5b6bx10[_0x4d95[58]](404)};return _0x5b6bx1c[_0x4d95[67]]({attributes:[_0x4d95[26],_0x4d95[63],_0x4d95[64],_0x4d95[65],_0x4d95[31],_0x4d95[66]]})})[_0x4d95[19]](function(_0x5b6bx1d){return _0x5b6bx10[_0x4d95[17]](_0x5b6bx1d)})[_0x4d95[16]](function(_0x5b6bx12){return handleError(_0x5b6bx10,_0x5b6bx12)})};exports[_0x4d95[68]]= function(_0x5b6bxf,_0x5b6bx10,_0x5b6bx11){return FaxRoom[_0x4d95[68]](_0x5b6bxf[_0x4d95[69]])[_0x4d95[19]](function(_0x5b6bx1c){return _0x5b6bx10[_0x4d95[18]](201)[_0x4d95[17]](_0x5b6bx1c)})[_0x4d95[16]](function(_0x5b6bx12){return handleError(_0x5b6bx10,_0x5b6bx12)})};exports[_0x4d95[70]]= function(_0x5b6bxf,_0x5b6bx10,_0x5b6bx11){_0x5b6bxf[_0x4d95[69]][_0x4d95[71]]= _0x5b6bxf[_0x4d95[30]][_0x4d95[26]];_0x5b6bxf[_0x4d95[69]][_0x4d95[72]]= _0x5b6bxf[_0x4d95[55]][_0x4d95[26]];_0x5b6bxf[_0x4d95[69]][_0x4d95[73]]= _0x5b6bxf[_0x4d95[69]][_0x4d95[73]];return FaxMessage[_0x4d95[68]](_0x5b6bxf[_0x4d95[69]],{include:[{model:FaxAttachment}],user:_0x5b6bxf[_0x4d95[30]]})[_0x4d95[19]](function(_0x5b6bx1e){return _0x5b6bx10[_0x4d95[18]](201)[_0x4d95[17]](_0x5b6bx1e)})[_0x4d95[16]](function(_0x5b6bx12){return handleError(_0x5b6bx10,_0x5b6bx12)})};exports[_0x4d95[60]]= function(_0x5b6bxf,_0x5b6bx10,_0x5b6bx11){return FaxRoom[_0x4d95[29]](_0x5b6bxf[_0x4d95[55]][_0x4d95[26]])[_0x4d95[19]](function(_0x5b6bx1c){if(!_0x5b6bx1c){return _0x5b6bx10[_0x4d95[58]](404)};if(_0x5b6bx1c[_0x4d95[74]]){throw  new Error(_0x4d95[75])};var _0x5b6bx1f=_[_0x4d95[37]](_0x5b6bx1c,_0x5b6bxf[_0x4d95[69]]);return _0x5b6bx1f[_0x4d95[76]]()})[_0x4d95[19]](function(_0x5b6bx1c){return _0x5b6bx10[_0x4d95[18]](200)[_0x4d95[17]](_0x5b6bx1c)})[_0x4d95[16]](function(_0x5b6bx12){return handleError(_0x5b6bx10,_0x5b6bx12)})};exports[_0x4d95[77]]= function(_0x5b6bxf,_0x5b6bx10,_0x5b6bx11){return FaxRoom[_0x4d95[29]](_0x5b6bxf[_0x4d95[55]][_0x4d95[26]])[_0x4d95[19]](function(_0x5b6bx1c){if(!_0x5b6bx1c){return _0x5b6bx10[_0x4d95[58]](404)};return _0x5b6bx1c[_0x4d95[79]](_0x5b6bxf[_0x4d95[69]][_0x4d95[78]],{individualHooks:true})})[_0x4d95[19]](function(){return _0x5b6bx10[_0x4d95[58]](200)})[_0x4d95[16]](function(_0x5b6bx12){return handleError(_0x5b6bx10,_0x5b6bx12)})};exports[_0x4d95[80]]= function(_0x5b6bxf,_0x5b6bx10,_0x5b6bx11){return FaxRoom[_0x4d95[29]](_0x5b6bxf[_0x4d95[55]][_0x4d95[26]])[_0x4d95[19]](function(_0x5b6bx1c){if(!_0x5b6bx1c){return _0x5b6bx10[_0x4d95[58]](404)};return _0x5b6bx1c[_0x4d95[80]]()})[_0x4d95[19]](function(){return _0x5b6bx10[_0x4d95[58]](204)})[_0x4d95[16]](function(_0x5b6bx12){return handleError(_0x5b6bx10,_0x5b6bx12)})};exports[_0x4d95[81]]= function(_0x5b6bxf,_0x5b6bx10){return FaxRoom[_0x4d95[80]]({where:{id:_0x5b6bxf[_0x4d95[20]][_0x4d95[82]]},individualHooks:true})[_0x4d95[19]](function(){return _0x5b6bx10[_0x4d95[58]](200)})[_0x4d95[16]](function(_0x5b6bx12){return handleError(_0x5b6bx10,_0x5b6bx12)})};function handleError(_0x5b6bx10,_0x5b6bx12){return _0x5b6bx10[_0x4d95[18]](500)[_0x4d95[17]](_0x5b6bx12)}exports[_0x4d95[83]]= function(_0x5b6bxf,_0x5b6bx10,_0x5b6bx11){var _0x5b6bx21={where:{id:_0x5b6bxf[_0x4d95[55]][_0x4d95[26]][_0x4d95[85]](_0x4d95[84])},user:_0x5b6bxf[_0x4d95[30]],individualHooks:true};return FaxRoom[_0x4d95[60]](_0x5b6bxf[_0x4d95[69]],_0x5b6bx21)[_0x4d95[19]](function(_0x5b6bx22){if(!_0x5b6bx22){return _0x5b6bx10[_0x4d95[58]](404)};return _0x5b6bx22})[_0x4d95[19]](function(_0x5b6bx22){return _0x5b6bx10[_0x4d95[58]](200)})[_0x4d95[16]](function(_0x5b6bx12){return handleError(_0x5b6bx10,_0x5b6bx12)})};exports[_0x4d95[86]]= function(_0x5b6bxf,_0x5b6bx10,_0x5b6bx11){return FaxMessage[_0x4d95[29]](_0x5b6bxf[_0x4d95[55]][_0x4d95[26]])[_0x4d95[19]](function(_0x5b6bx1e){return _0x5b6bx1e[_0x4d95[87]]({include:[{model:FaxAccount},{model:FaxMessage,include:[{model:FaxAttachment},{model:User,attributes:[_0x4d95[26],_0x4d95[63],_0x4d95[64],_0x4d95[65]]}]},{model:User,attributes:[_0x4d95[26],_0x4d95[63],_0x4d95[64],_0x4d95[65]]}]})})[_0x4d95[19]](function(_0x5b6bx1c){return _0x5b6bx10[_0x4d95[17]](_0x5b6bx1c)})[_0x4d95[16]](function(_0x5b6bx12){return handleError(_0x5b6bx10,_0x5b6bx12)})}
\ No newline at end of file
diff --git a/server/api/fax_room/fax_room.events.js b/server/api/fax_room/fax_room.events.js
index 0ed0d8a..ce3159d 100644
--- a/server/api/fax_room/fax_room.events.js
+++ b/server/api/fax_room/fax_room.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const FaxRoom = require('../../models').FaxRoom;
-
-var FaxRoomEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-FaxRoomEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  FaxRoom.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    FaxRoomEvents.emit(event + ':' + doc._id, doc);
-    FaxRoomEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = FaxRoomEvents;
+var _0x9bd3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9bd3[0];const EventEmitter=require(_0x9bd3[1]);const FaxRoom=require(_0x9bd3[3])[_0x9bd3[2]];var FaxRoomEvents= new EventEmitter();FaxRoomEvents[_0x9bd3[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x9bd3[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x9bd3[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x9bd3[6]};for(var e in events){var event=events[e];FaxRoom[_0x9bd3[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xfb72x8,_0xfb72x9,_0xfb72xa){FaxRoomEvents[_0x9bd3[10]](event+ _0x9bd3[8]+ _0xfb72x8[_0x9bd3[9]],_0xfb72x8);FaxRoomEvents[_0x9bd3[10]](event,_0xfb72x8);_0xfb72xa(null)}}module[_0x9bd3[11]]= FaxRoomEvents
\ No newline at end of file
diff --git a/server/api/fax_room/fax_room.socket.js b/server/api/fax_room/fax_room.socket.js
index 80b8f06..64f0fc2 100644
--- a/server/api/fax_room/fax_room.socket.js
+++ b/server/api/fax_room/fax_room.socket.js
@@ -1,69 +1 @@
-// /**
-//  * Broadcast updates to client when the model changes
-//  */
-//
-// 'use strict';
-//
-// var FaxRoom = require('../../models').FaxRoom;
-//
-// exports.register = function(socket) {
-//   FaxRoom.afterCreate(function(doc, options) {
-//     if (socket.role !== 'agent') {
-//       // ADMIN OR USER
-//       onSave(socket, doc.dataValues);
-//     } else {
-//       // AGENT
-//       switch (doc.status) {
-//         case 'OPEN':
-//           if (socket.userId == options.userId)
-//             onSave(socket, doc.dataValues);
-//           break;
-//
-//         default:
-//       }
-//     }
-//   });
-//   FaxRoom.afterUpdate(function(doc, options) {
-//     onSave(socket, doc.dataValues);
-//   });
-//   FaxRoom.afterDestroy(function(doc) {
-//     onRemove(socket, doc);
-//   });
-// }
-//
-// function onSave(socket, doc, cb) {
-//   socket.emit('fax_room:save', doc);
-// }
-//
-// function onRemove(socket, doc, cb) {
-//   socket.emit('fax_room:remove', doc);
-// }
-
-'use strict';
-
-const FaxRoomEvents = require('./fax_room.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('fax_room:' + event, socket);
-
-    FaxRoomEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc, options) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    FaxRoomEvents.removeListener(event, listener);
-  };
-}
+var _0xd007=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xd007[0];const FaxRoomEvents=require(_0xd007[1]);var events=[_0xd007[2],_0xd007[3]];exports[_0xd007[4]]= function(_0x4e77x3){for(var _0x4e77x4=0,_0x4e77x5=events[_0xd007[5]];_0x4e77x4< _0x4e77x5;_0x4e77x4++){var _0x4e77x6=events[_0x4e77x4];var _0x4e77x7=createListener(_0xd007[6]+ _0x4e77x6,_0x4e77x3);FaxRoomEvents[_0xd007[7]](_0x4e77x6,_0x4e77x7);_0x4e77x3[_0xd007[7]](_0xd007[8],removeListener(_0x4e77x6,_0x4e77x7))}};function createListener(_0x4e77x6,_0x4e77x3){return function(_0x4e77x9,_0x4e77xa){_0x4e77x3[_0xd007[9]](_0x4e77x6,_0x4e77x9)}}function removeListener(_0x4e77x6,_0x4e77x7){return function(){FaxRoomEvents[_0xd007[10]](_0x4e77x6,_0x4e77x7)}}
\ No newline at end of file
diff --git a/server/api/fax_room/index.js b/server/api/fax_room/index.js
index e2652dd..1c6c62a 100644
--- a/server/api/fax_room/index.js
+++ b/server/api/fax_room/index.js
@@ -1,31 +1 @@
-'use strict';
-
-var express = require('express');
-
-var controller = require('./fax_room.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.index);
-router.get('/inbox', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.inbox);
-router.get('/describe', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.describe);
-router.get('/pending', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10, 17], ['admin']), controller.pending);
-router.get('/new', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10, 17], ['admin']), controller.new);
-router.get('/open', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10, 17], ['admin']), controller.open);
-router.get('/closed', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10, 17], ['admin']), controller.closed);
-router.get('/agent/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.agentIndex);
-router.get('/messages/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.getRoomByMessage);
-router.get('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'user', 'agent']), controller.show);
-router.get('/:id/agents', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.showAgents);
-router.post('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.create);
-router.post('/:id/messages', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'user', 'agent']), controller.createMessage);
-router.put('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.update);
-router.patch('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.updatePatch);
-router.put('/:id/agents', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.updateAgents);
-router.put('/:id/open', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['agent']), controller.openRoom);
-router.delete('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.bulkDestroy);
-router.delete('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0x1f84=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x46\x61\x78","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x69\x6E\x62\x6F\x78","\x61\x67\x65\x6E\x74","\x69\x6E\x62\x6F\x78","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x70\x65\x6E\x64\x69\x6E\x67","\x70\x65\x6E\x64\x69\x6E\x67","\x2F\x6E\x65\x77","\x6E\x65\x77","\x2F\x6F\x70\x65\x6E","\x6F\x70\x65\x6E","\x2F\x63\x6C\x6F\x73\x65\x64","\x63\x6C\x6F\x73\x65\x64","\x2F\x61\x67\x65\x6E\x74\x2F\x3A\x69\x64","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x2F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F\x3A\x69\x64","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64","\x75\x73\x65\x72","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x70\x61\x74\x63\x68","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x2F\x3A\x69\x64\x2F\x6F\x70\x65\x6E","\x6F\x70\x65\x6E\x52\x6F\x6F\x6D","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x1f84[0];var express=require(_0x1f84[1]);var controller=require(_0x1f84[2]);var auth=require(_0x1f84[3]);var license=require(_0x1f84[4]);var router=express.Router();router[_0x1f84[12]](_0x1f84[5],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10],[_0x1f84[9]]),controller[_0x1f84[11]]);router[_0x1f84[12]](_0x1f84[13],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10],[_0x1f84[9],_0x1f84[14]]),controller[_0x1f84[15]]);router[_0x1f84[12]](_0x1f84[16],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10],[_0x1f84[9]]),controller[_0x1f84[17]]);router[_0x1f84[12]](_0x1f84[18],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10,17],[_0x1f84[9]]),controller[_0x1f84[19]]);router[_0x1f84[12]](_0x1f84[20],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10,17],[_0x1f84[9]]),controller[_0x1f84[21]]);router[_0x1f84[12]](_0x1f84[22],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10,17],[_0x1f84[9]]),controller[_0x1f84[23]]);router[_0x1f84[12]](_0x1f84[24],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10,17],[_0x1f84[9]]),controller[_0x1f84[25]]);router[_0x1f84[12]](_0x1f84[26],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10],[_0x1f84[9]]),controller[_0x1f84[27]]);router[_0x1f84[12]](_0x1f84[28],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10],[_0x1f84[9],_0x1f84[14]]),controller[_0x1f84[29]]);router[_0x1f84[12]](_0x1f84[30],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10],[_0x1f84[9],_0x1f84[31],_0x1f84[14]]),controller[_0x1f84[32]]);router[_0x1f84[12]](_0x1f84[33],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10],[_0x1f84[9],_0x1f84[14]]),controller[_0x1f84[34]]);router[_0x1f84[36]](_0x1f84[5],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10],[_0x1f84[9]]),controller[_0x1f84[35]]);router[_0x1f84[36]](_0x1f84[37],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10],[_0x1f84[9],_0x1f84[31],_0x1f84[14]]),controller[_0x1f84[38]]);router[_0x1f84[40]](_0x1f84[30],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10],[_0x1f84[9],_0x1f84[14]]),controller[_0x1f84[39]]);router[_0x1f84[42]](_0x1f84[30],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10],[_0x1f84[9],_0x1f84[14]]),controller[_0x1f84[41]]);router[_0x1f84[40]](_0x1f84[33],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10],[_0x1f84[9],_0x1f84[14]]),controller[_0x1f84[43]]);router[_0x1f84[40]](_0x1f84[44],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10],[_0x1f84[14]]),controller[_0x1f84[45]]);router[_0x1f84[47]](_0x1f84[5],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10],[_0x1f84[9]]),controller[_0x1f84[46]]);router[_0x1f84[47]](_0x1f84[30],license[_0x1f84[6]](),license[_0x1f84[7]](),auth[_0x1f84[8]](),auth[_0x1f84[10]]([10],[_0x1f84[9]]),controller[_0x1f84[48]]);module[_0x1f84[49]]= router
\ No newline at end of file
diff --git a/server/api/freshdesk_account/freshdesk_account.controller.js b/server/api/freshdesk_account/freshdesk_account.controller.js
index ae9ab8a..8b39a4b 100644
--- a/server/api/freshdesk_account/freshdesk_account.controller.js
+++ b/server/api/freshdesk_account/freshdesk_account.controller.js
@@ -1,239 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/freshdesk/accounts              ->  index
- * POST    /api/freshdesk/accounts              ->  create
- * GET     /api/freshdesk/accounts/:id          ->  show
- * PUT     /api/freshdesk/accounts/:id          ->  update
- * DELETE  /api/freshdesk/accounts/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var util = require('util');
-var _fd = require('freshdesk');
-
-var FreshdeskAccount = require('../../models').FreshdeskAccount;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of FreshdeskAccounts
-exports.index = function(req, res) {
-  var attributes = ['description', 'name', 'username', 'remoteUri'];
-  var per_page = req.query.per_page ? parseInt(req.query.per_page, 10) : 100;
-  var page = req.query.page ? parseInt(req.query.page, 10) : 0;
-
-  var query = {
-    where: {},
-    limit: per_page,
-    offset: page * per_page
-  };
-
-  _.forIn(req.query, function(value, key) {
-    switch (key) {
-      case 'per_page':
-      case 'page':
-        break;
-      case 'sort_by':
-        query.order = util.format('%s %s', req.query.sort_by, req.query.sort_order || 'ASC') || null;
-        break;
-      case 'sort_order':
-        break;
-      case '$':
-        query.where.$or = [];
-        attributes.forEach(function(attribute) {
-          var tmp = {};
-          tmp[attribute] = {
-            $like: '%' + value + '%'
-          };
-
-          query.where.$or.push(tmp);
-        });
-        break;
-      default:
-        query.where[key] = {
-          $like: {}
-        };
-        query.where[key].$like = '%' + value + '%';
-    }
-  });
-
-  FreshdeskAccount
-    .findAndCountAll(query)
-    .then(function(result) {
-
-      var total_pages = Math.ceil(result.count / per_page);
-      var next_page = total_pages > (query.offset + 1) ? util.format('%s://%s%s?page=%d', req.protocol, req.headers.host, req.baseUrl, page + 1) : null;
-      var previous_page = page > 0 ? util.format('%s://%s%s?page=%d', req.protocol, req.headers.host, req.baseUrl, page - 1) : null;
-
-      return res.status(200).send({
-        count: result.count,
-        rows: result.rows,
-        next_page: next_page,
-        previous_page: previous_page,
-        total_pages: total_pages
-      });
-
-    })
-    .catch(function(err) {
-      return res.status(500).send({
-        error: 'Something blew up!'
-      });
-    });
-}
-
-// Gets a single FreshdeskAccount from the DB
-exports.show = function(req, res) {
-  FreshdeskAccount.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new FreshdeskAccount in the DB
-exports.create = function(req, res) {
-  FreshdeskAccount.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing FreshdeskAccount in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  FreshdeskAccount.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a FreshdeskAccount from the DB
-exports.destroy = function(req, res) {
-  FreshdeskAccount.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
-
-exports.bulkDestroy = function(req, res) {
-  FreshdeskAccount
-    .destroy({
-      where: {
-        id: req.query.id
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.checkAccount = function(req, res) {
-  FreshdeskAccount.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(function(account) {
-      var freshdesk = new _fd(account.remoteUri, account.apiKey);
-      freshdesk.listTickets(function(err, response, body) {
-        if (err) {
-          return res.sendStatus(400);
-        }
-        body = JSON.parse(body);
-        if (body.require_login) {
-          return res.sendStatus(400);
-        }
-        return res.sendStatus(200);
-      })
-    })
-    .catch(handleError(res));
-}
-
-exports.accountValidation = function(req, res) {
-  var where = {};
-  where[req.params.field] = req.body.value;
-  FreshdeskAccount
-    .findAndCountAll({
-      where: where
-    })
-    .then(function(result) {
-      if (result.count) {
-        return res.status(200).send({
-          isValid: false,
-          value: req.body.value
-        });
-      }
-      return res.status(200).send({
-        isValid: true,
-        value: req.body.value
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getFields = function(req, res, next) {
-  FreshdeskAccount.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(function(account) {
-      var Freshdesk = new _fd(account.remoteUri, account.apiKey);
-      Freshdesk.get('/ticket_fields.json', function(err, response, body) {
-        if (err) {
-          return next(err);
-        }
-        body = JSON.parse(body);
-        return res.status(200).send(body);
-      });
-    })
-    .catch(handleError(res));
-};
+var _0xcce2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x66\x72\x65\x73\x68\x64\x65\x73\x6B","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x70\x65\x72\x5F\x70\x61\x67\x65","\x71\x75\x65\x72\x79","\x70\x61\x67\x65","\x6F\x72\x64\x65\x72","\x25\x73\x20\x25\x73","\x73\x6F\x72\x74\x5F\x62\x79","\x73\x6F\x72\x74\x5F\x6F\x72\x64\x65\x72","\x41\x53\x43","\x66\x6F\x72\x6D\x61\x74","\x24\x6F\x72","\x77\x68\x65\x72\x65","\x25","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x24","\x24\x6C\x69\x6B\x65","\x66\x6F\x72\x49\x6E","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x62\x6C\x65\x77\x20\x75\x70\x21","\x63\x61\x74\x63\x68","\x63\x6F\x75\x6E\x74","\x63\x65\x69\x6C","\x6F\x66\x66\x73\x65\x74","\x25\x73\x3A\x2F\x2F\x25\x73\x25\x73\x3F\x70\x61\x67\x65\x3D\x25\x64","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x68\x6F\x73\x74","\x68\x65\x61\x64\x65\x72\x73","\x62\x61\x73\x65\x55\x72\x6C","\x72\x6F\x77\x73","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x61\x70\x69\x4B\x65\x79","\x70\x61\x72\x73\x65","\x72\x65\x71\x75\x69\x72\x65\x5F\x6C\x6F\x67\x69\x6E","\x6C\x69\x73\x74\x54\x69\x63\x6B\x65\x74\x73","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x74\x69\x63\x6B\x65\x74\x5F\x66\x69\x65\x6C\x64\x73\x2E\x6A\x73\x6F\x6E","\x67\x65\x74"];_0xcce2[0];var _=require(_0xcce2[1]);var util=require(_0xcce2[2]);var _fd=require(_0xcce2[3]);var FreshdeskAccount=require(_0xcce2[5])[_0xcce2[4]];function handleError(_0x13d3x6,_0x13d3x7){_0x13d3x7= _0x13d3x7|| 500;return function(_0x13d3x8){_0x13d3x6[_0xcce2[7]](_0x13d3x7)[_0xcce2[6]](_0x13d3x8)}}function responseWithResult(_0x13d3x6,_0x13d3x7){_0x13d3x7= _0x13d3x7|| 200;return function(_0x13d3xa){if(_0x13d3xa){_0x13d3x6[_0xcce2[7]](_0x13d3x7)[_0xcce2[8]](_0x13d3xa)}}}function handleEntityNotFound(_0x13d3x6){return function(_0x13d3xa){if(!_0x13d3xa){_0x13d3x6[_0xcce2[7]](404)[_0xcce2[9]]();return null};return _0x13d3xa}}function saveUpdates(_0x13d3xd){return function(_0x13d3xa){return _0x13d3xa[_0xcce2[11]](_0x13d3xd)[_0xcce2[10]](function(_0x13d3xe){return _0x13d3xe})}}function removeEntity(_0x13d3x6){return function(_0x13d3xa){if(_0x13d3xa){return _0x13d3xa[_0xcce2[12]]()[_0xcce2[10]](function(){_0x13d3x6[_0xcce2[7]](204)[_0xcce2[9]]()})}}}exports[_0xcce2[13]]= function(_0x13d3x10,_0x13d3x6){var _0x13d3x11=[_0xcce2[14],_0xcce2[15],_0xcce2[16],_0xcce2[17]];var _0x13d3x12=_0x13d3x10[_0xcce2[19]][_0xcce2[18]]?parseInt(_0x13d3x10[_0xcce2[19]][_0xcce2[18]],10):100;var _0x13d3x13=_0x13d3x10[_0xcce2[19]][_0xcce2[20]]?parseInt(_0x13d3x10[_0xcce2[19]][_0xcce2[20]],10):0;var _0x13d3x14={where:{},limit:_0x13d3x12,offset:_0x13d3x13* _0x13d3x12};_[_0xcce2[34]](_0x13d3x10[_0xcce2[19]],function(_0x13d3x15,_0x13d3x16){switch(_0x13d3x16){case _0xcce2[18]:;case _0xcce2[20]:break;case _0xcce2[23]:_0x13d3x14[_0xcce2[21]]= util[_0xcce2[26]](_0xcce2[22],_0x13d3x10[_0xcce2[19]][_0xcce2[23]],_0x13d3x10[_0xcce2[19]][_0xcce2[24]]|| _0xcce2[25])|| null;break;case _0xcce2[24]:break;case _0xcce2[32]:_0x13d3x14[_0xcce2[28]][_0xcce2[27]]= [];_0x13d3x11[_0xcce2[31]](function(_0x13d3x17){var _0x13d3x18={};_0x13d3x18[_0x13d3x17]= {$like:_0xcce2[29]+ _0x13d3x15+ _0xcce2[29]};_0x13d3x14[_0xcce2[28]][_0xcce2[27]][_0xcce2[30]](_0x13d3x18)});break;default:_0x13d3x14[_0xcce2[28]][_0x13d3x16]= {$like:{}};_0x13d3x14[_0xcce2[28]][_0x13d3x16][_0xcce2[33]]= _0xcce2[29]+ _0x13d3x15+ _0xcce2[29]}});FreshdeskAccount[_0xcce2[46]](_0x13d3x14)[_0xcce2[10]](function(_0x13d3x19){var _0x13d3x1a=Math[_0xcce2[38]](_0x13d3x19[_0xcce2[37]]/ _0x13d3x12);var _0x13d3x1b=_0x13d3x1a> (_0x13d3x14[_0xcce2[39]]+ 1)?util[_0xcce2[26]](_0xcce2[40],_0x13d3x10[_0xcce2[41]],_0x13d3x10[_0xcce2[43]][_0xcce2[42]],_0x13d3x10[_0xcce2[44]],_0x13d3x13+ 1):null;var _0x13d3x1c=_0x13d3x13> 0?util[_0xcce2[26]](_0xcce2[40],_0x13d3x10[_0xcce2[41]],_0x13d3x10[_0xcce2[43]][_0xcce2[42]],_0x13d3x10[_0xcce2[44]],_0x13d3x13- 1):null;return _0x13d3x6[_0xcce2[7]](200)[_0xcce2[6]]({count:_0x13d3x19[_0xcce2[37]],rows:_0x13d3x19[_0xcce2[45]],next_page:_0x13d3x1b,previous_page:_0x13d3x1c,total_pages:_0x13d3x1a})})[_0xcce2[36]](function(_0x13d3x8){return _0x13d3x6[_0xcce2[7]](500)[_0xcce2[6]]({error:_0xcce2[35]})})};exports[_0xcce2[47]]= function(_0x13d3x10,_0x13d3x6){FreshdeskAccount[_0xcce2[50]](_0x13d3x10[_0xcce2[49]][_0xcce2[48]])[_0xcce2[10]](handleEntityNotFound(_0x13d3x6))[_0xcce2[10]](responseWithResult(_0x13d3x6))[_0xcce2[36]](handleError(_0x13d3x6))};exports[_0xcce2[51]]= function(_0x13d3x10,_0x13d3x6){FreshdeskAccount[_0xcce2[51]](_0x13d3x10[_0xcce2[52]])[_0xcce2[10]](responseWithResult(_0x13d3x6,201))[_0xcce2[36]](handleError(_0x13d3x6))};exports[_0xcce2[53]]= function(_0x13d3x10,_0x13d3x6){if(_0x13d3x10[_0xcce2[52]][_0xcce2[48]]){delete _0x13d3x10[_0xcce2[52]][_0xcce2[48]]};FreshdeskAccount[_0xcce2[50]](_0x13d3x10[_0xcce2[49]][_0xcce2[48]])[_0xcce2[10]](handleEntityNotFound(_0x13d3x6))[_0xcce2[10]](saveUpdates(_0x13d3x10[_0xcce2[52]]))[_0xcce2[10]](responseWithResult(_0x13d3x6))[_0xcce2[36]](handleError(_0x13d3x6))};exports[_0xcce2[12]]= function(_0x13d3x10,_0x13d3x6){FreshdeskAccount[_0xcce2[50]](_0x13d3x10[_0xcce2[49]][_0xcce2[48]])[_0xcce2[10]](handleEntityNotFound(_0x13d3x6))[_0xcce2[10]](removeEntity(_0x13d3x6))[_0xcce2[36]](handleError(_0x13d3x6))};exports[_0xcce2[54]]= function(_0x13d3x10,_0x13d3x6){FreshdeskAccount[_0xcce2[12]]({where:{id:_0x13d3x10[_0xcce2[19]][_0xcce2[48]]},individualHooks:true})[_0xcce2[10]](function(){return _0x13d3x6[_0xcce2[55]](204)})[_0xcce2[36]](function(_0x13d3x8){return handleError(_0x13d3x6,_0x13d3x8)})};exports[_0xcce2[56]]= function(_0x13d3x10,_0x13d3x6){FreshdeskAccount[_0xcce2[50]](_0x13d3x10[_0xcce2[49]][_0xcce2[48]])[_0xcce2[10]](handleEntityNotFound(_0x13d3x6))[_0xcce2[10]](function(_0x13d3x1d){var _0x13d3x1e= new _fd(_0x13d3x1d[_0xcce2[17]],_0x13d3x1d[_0xcce2[57]]);_0x13d3x1e[_0xcce2[60]](function(_0x13d3x8,_0x13d3x1f,_0x13d3x20){if(_0x13d3x8){return _0x13d3x6[_0xcce2[55]](400)};_0x13d3x20= JSON[_0xcce2[58]](_0x13d3x20);if(_0x13d3x20[_0xcce2[59]]){return _0x13d3x6[_0xcce2[55]](400)};return _0x13d3x6[_0xcce2[55]](200)})})[_0xcce2[36]](handleError(_0x13d3x6))};exports[_0xcce2[61]]= function(_0x13d3x10,_0x13d3x6){var _0x13d3x21={};_0x13d3x21[_0x13d3x10[_0xcce2[49]][_0xcce2[62]]]= _0x13d3x10[_0xcce2[52]][_0xcce2[63]];FreshdeskAccount[_0xcce2[46]]({where:_0x13d3x21})[_0xcce2[10]](function(_0x13d3x19){if(_0x13d3x19[_0xcce2[37]]){return _0x13d3x6[_0xcce2[7]](200)[_0xcce2[6]]({isValid:false,value:_0x13d3x10[_0xcce2[52]][_0xcce2[63]]})};return _0x13d3x6[_0xcce2[7]](200)[_0xcce2[6]]({isValid:true,value:_0x13d3x10[_0xcce2[52]][_0xcce2[63]]})})[_0xcce2[36]](function(_0x13d3x8){return handleError(_0x13d3x6,_0x13d3x8)})};exports[_0xcce2[64]]= function(_0x13d3x10,_0x13d3x6,_0x13d3x22){FreshdeskAccount[_0xcce2[50]](_0x13d3x10[_0xcce2[49]][_0xcce2[48]])[_0xcce2[10]](handleEntityNotFound(_0x13d3x6))[_0xcce2[10]](function(_0x13d3x1d){var _0x13d3x23= new _fd(_0x13d3x1d[_0xcce2[17]],_0x13d3x1d[_0xcce2[57]]);_0x13d3x23[_0xcce2[66]](_0xcce2[65],function(_0x13d3x8,_0x13d3x1f,_0x13d3x20){if(_0x13d3x8){return _0x13d3x22(_0x13d3x8)};_0x13d3x20= JSON[_0xcce2[58]](_0x13d3x20);return _0x13d3x6[_0xcce2[7]](200)[_0xcce2[6]](_0x13d3x20)})})[_0xcce2[36]](handleError(_0x13d3x6))}
\ No newline at end of file
diff --git a/server/api/freshdesk_account/freshdesk_account.events.js b/server/api/freshdesk_account/freshdesk_account.events.js
index 0b71e73..53852dd 100644
--- a/server/api/freshdesk_account/freshdesk_account.events.js
+++ b/server/api/freshdesk_account/freshdesk_account.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const FreshdeskAccount = require('../../models').FreshdeskAccount;
-
-var FreshdeskAccountEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-FreshdeskAccountEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  FreshdeskAccount.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    FreshdeskAccountEvents.emit(event + ':' + doc._id, doc);
-    FreshdeskAccountEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = FreshdeskAccountEvents;
+var _0xd4aa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd4aa[0];const EventEmitter=require(_0xd4aa[1]);const FreshdeskAccount=require(_0xd4aa[3])[_0xd4aa[2]];var FreshdeskAccountEvents= new EventEmitter();FreshdeskAccountEvents[_0xd4aa[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd4aa[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd4aa[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd4aa[6]};for(var e in events){var event=events[e];FreshdeskAccount[_0xd4aa[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x10aex8,_0x10aex9,_0x10aexa){FreshdeskAccountEvents[_0xd4aa[10]](event+ _0xd4aa[8]+ _0x10aex8[_0xd4aa[9]],_0x10aex8);FreshdeskAccountEvents[_0xd4aa[10]](event,_0x10aex8);_0x10aexa(null)}}module[_0xd4aa[11]]= FreshdeskAccountEvents
\ No newline at end of file
diff --git a/server/api/freshdesk_account/freshdesk_account.socket.js b/server/api/freshdesk_account/freshdesk_account.socket.js
index c41142d..4f2b3af 100644
--- a/server/api/freshdesk_account/freshdesk_account.socket.js
+++ b/server/api/freshdesk_account/freshdesk_account.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const FreshdeskAccountEvents = require('./freshdesk_account.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('freshdesk_account:' + event, socket);
-
-    FreshdeskAccountEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    FreshdeskAccountEvents.removeListener(event, listener);
-  };
-}
+var _0x87b7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x87b7[0];const FreshdeskAccountEvents=require(_0x87b7[1]);var events=[_0x87b7[2],_0x87b7[3]];exports[_0x87b7[4]]= function(_0x2283x3){for(var _0x2283x4=0,_0x2283x5=events[_0x87b7[5]];_0x2283x4< _0x2283x5;_0x2283x4++){var _0x2283x6=events[_0x2283x4];var _0x2283x7=createListener(_0x87b7[6]+ _0x2283x6,_0x2283x3);FreshdeskAccountEvents[_0x87b7[7]](_0x2283x6,_0x2283x7);_0x2283x3[_0x87b7[7]](_0x87b7[8],removeListener(_0x2283x6,_0x2283x7))}};function createListener(_0x2283x6,_0x2283x3){return function(_0x2283x9){_0x2283x3[_0x87b7[9]](_0x2283x6,_0x2283x9)}}function removeListener(_0x2283x6,_0x2283x7){return function(){FreshdeskAccountEvents[_0x87b7[10]](_0x2283x6,_0x2283x7)}}
\ No newline at end of file
diff --git a/server/api/freshdesk_account/index.js b/server/api/freshdesk_account/index.js
index a7385b7..778bde5 100644
--- a/server/api/freshdesk_account/index.js
+++ b/server/api/freshdesk_account/index.js
@@ -1,21 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./freshdesk_account.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), controller.index);
-router.get('/:id', auth.isAuthenticated(), controller.show);
-router.get('/:id/fields', auth.isAuthenticated(), controller.getFields);
-router.get('/:id/check', auth.isAuthenticated(), controller.checkAccount);
-router.post('/validate/:field', auth.isAuthenticated(), controller.accountValidation);
-router.post('/', auth.isAuthenticated(), controller.create);
-router.put('/:id', auth.isAuthenticated(), controller.update);
-router.patch('/:id', auth.isAuthenticated(), controller.update);
-router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), controller.destroy);
-
-
-module.exports = router;
+var _0x5a3d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65\x2F\x3A\x66\x69\x65\x6C\x64","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x5a3d[0];var express=require(_0x5a3d[1]);var auth=require(_0x5a3d[2]);var controller=require(_0x5a3d[3]);var router=express.Router();router[_0x5a3d[7]](_0x5a3d[4],auth[_0x5a3d[5]](),controller[_0x5a3d[6]]);router[_0x5a3d[7]](_0x5a3d[8],auth[_0x5a3d[5]](),controller[_0x5a3d[9]]);router[_0x5a3d[7]](_0x5a3d[10],auth[_0x5a3d[5]](),controller[_0x5a3d[11]]);router[_0x5a3d[7]](_0x5a3d[12],auth[_0x5a3d[5]](),controller[_0x5a3d[13]]);router[_0x5a3d[16]](_0x5a3d[14],auth[_0x5a3d[5]](),controller[_0x5a3d[15]]);router[_0x5a3d[16]](_0x5a3d[4],auth[_0x5a3d[5]](),controller[_0x5a3d[17]]);router[_0x5a3d[19]](_0x5a3d[8],auth[_0x5a3d[5]](),controller[_0x5a3d[18]]);router[_0x5a3d[20]](_0x5a3d[8],auth[_0x5a3d[5]](),controller[_0x5a3d[18]]);router[_0x5a3d[22]](_0x5a3d[4],auth[_0x5a3d[5]](),controller[_0x5a3d[21]]);router[_0x5a3d[22]](_0x5a3d[8],auth[_0x5a3d[5]](),controller[_0x5a3d[23]]);module[_0x5a3d[24]]= router
\ No newline at end of file
diff --git a/server/api/freshdesk_configuration/freshdesk_configuration.controller.js b/server/api/freshdesk_configuration/freshdesk_configuration.controller.js
index 4c3d44d..ee588ac 100644
--- a/server/api/freshdesk_configuration/freshdesk_configuration.controller.js
+++ b/server/api/freshdesk_configuration/freshdesk_configuration.controller.js
@@ -1,146 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/freshdesk/configurations              ->  index
- * POST    /api/freshdesk/configurations              ->  create
- * GET     /api/freshdesk/configurations/:id          ->  show
- * PUT     /api/freshdesk/configurations/:id          ->  update
- * DELETE  /api/freshdesk/configurations/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-
-var FreshdeskConfiguration = require('../../models').FreshdeskConfiguration;
-var FreshdeskField = require('../../models').FreshdeskField;
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of FreshdeskConfigurations
-exports.index = function(req, res) {
-  FreshdeskConfiguration.findAll({
-      where: req.query
-    })
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single FreshdeskConfiguration from the DB
-exports.show = function(req, res) {
-  FreshdeskConfiguration.find({
-      where: {
-        id: req.params.id
-      },
-      include: [{
-        model: FreshdeskField,
-        as: 'Subject'
-      }, {
-        model: FreshdeskField,
-        as: 'Description'
-      }, {
-        model: FreshdeskField,
-        as: 'Field'
-      }]
-    })
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new FreshdeskConfiguration in the DB
-exports.create = function(req, res) {
-  FreshdeskConfiguration.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing FreshdeskConfiguration in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  FreshdeskConfiguration.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a FreshdeskConfiguration from the DB
-exports.destroy = function(req, res) {
-  FreshdeskConfiguration.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
-
-exports.addConfigurationField = function(req, res, next) {
-  // console.log(req.params);
-  var freshdeskConfiguration;
-  FreshdeskConfiguration
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(function(salesforce_configuration) {
-      freshdeskConfiguration = salesforce_configuration;
-      return FreshdeskField.create(req.body)
-    })
-    .then(function(freshdeskField) {
-      switch (req.params.type) {
-        case 'subject':
-          return [freshdeskConfiguration.addSubject(freshdeskField), freshdeskField];
-        case 'description':
-          return [freshdeskConfiguration.addDescription(freshdeskField), freshdeskField];
-        case 'field':
-          return [freshdeskConfiguration.addField(freshdeskField), freshdeskField];
-      }
-    })
-    .spread(function(data, freshdeskField) {
-      return res.status(201).json(freshdeskField);
-    })
-    .catch(handleError(res));
-};
+var _0x37bc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x53\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x73\x70\x72\x65\x61\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65"];_0x37bc[0];var _=require(_0x37bc[1]);var FreshdeskConfiguration=require(_0x37bc[3])[_0x37bc[2]];var FreshdeskField=require(_0x37bc[3])[_0x37bc[4]];function handleError(_0xcaabx5,_0xcaabx6){_0xcaabx6= _0xcaabx6|| 500;return function(_0xcaabx7){_0xcaabx5[_0x37bc[6]](_0xcaabx6)[_0x37bc[5]](_0xcaabx7)}}function responseWithResult(_0xcaabx5,_0xcaabx6){_0xcaabx6= _0xcaabx6|| 200;return function(_0xcaabx9){if(_0xcaabx9){_0xcaabx5[_0x37bc[6]](_0xcaabx6)[_0x37bc[7]](_0xcaabx9)}}}function handleEntityNotFound(_0xcaabx5){return function(_0xcaabx9){if(!_0xcaabx9){_0xcaabx5[_0x37bc[6]](404)[_0x37bc[8]]();return null};return _0xcaabx9}}function saveUpdates(_0xcaabxc){return function(_0xcaabx9){return _0xcaabx9[_0x37bc[10]](_0xcaabxc)[_0x37bc[9]](function(_0xcaabxd){return _0xcaabxd})}}function removeEntity(_0xcaabx5){return function(_0xcaabx9){if(_0xcaabx9){return _0xcaabx9[_0x37bc[11]]()[_0x37bc[9]](function(){_0xcaabx5[_0x37bc[6]](204)[_0x37bc[8]]()})}}}exports[_0x37bc[12]]= function(_0xcaabxf,_0xcaabx5){FreshdeskConfiguration[_0x37bc[15]]({where:_0xcaabxf[_0x37bc[14]]})[_0x37bc[9]](responseWithResult(_0xcaabx5))[_0x37bc[13]](handleError(_0xcaabx5))};exports[_0x37bc[16]]= function(_0xcaabxf,_0xcaabx5){FreshdeskConfiguration[_0x37bc[22]]({where:{id:_0xcaabxf[_0x37bc[18]][_0x37bc[17]]},include:[{model:FreshdeskField,as:_0x37bc[19]},{model:FreshdeskField,as:_0x37bc[20]},{model:FreshdeskField,as:_0x37bc[21]}]})[_0x37bc[9]](handleEntityNotFound(_0xcaabx5))[_0x37bc[9]](responseWithResult(_0xcaabx5))[_0x37bc[13]](handleError(_0xcaabx5))};exports[_0x37bc[23]]= function(_0xcaabxf,_0xcaabx5){FreshdeskConfiguration[_0x37bc[23]](_0xcaabxf[_0x37bc[24]])[_0x37bc[9]](responseWithResult(_0xcaabx5,201))[_0x37bc[13]](handleError(_0xcaabx5))};exports[_0x37bc[25]]= function(_0xcaabxf,_0xcaabx5){if(_0xcaabxf[_0x37bc[24]][_0x37bc[17]]){delete _0xcaabxf[_0x37bc[24]][_0x37bc[17]]};FreshdeskConfiguration[_0x37bc[26]](_0xcaabxf[_0x37bc[18]][_0x37bc[17]])[_0x37bc[9]](handleEntityNotFound(_0xcaabx5))[_0x37bc[9]](saveUpdates(_0xcaabxf[_0x37bc[24]]))[_0x37bc[9]](responseWithResult(_0xcaabx5))[_0x37bc[13]](handleError(_0xcaabx5))};exports[_0x37bc[11]]= function(_0xcaabxf,_0xcaabx5){FreshdeskConfiguration[_0x37bc[26]](_0xcaabxf[_0x37bc[18]][_0x37bc[17]])[_0x37bc[9]](handleEntityNotFound(_0xcaabx5))[_0x37bc[9]](removeEntity(_0xcaabx5))[_0x37bc[13]](handleError(_0xcaabx5))};exports[_0x37bc[27]]= function(_0xcaabxf,_0xcaabx5,_0xcaabx10){var _0xcaabx11;FreshdeskConfiguration[_0x37bc[26]](_0xcaabxf[_0x37bc[18]][_0x37bc[17]])[_0x37bc[9]](handleEntityNotFound(_0xcaabx5))[_0x37bc[9]](function(_0xcaabx14){_0xcaabx11= _0xcaabx14;return FreshdeskField[_0x37bc[23]](_0xcaabxf[_0x37bc[24]])})[_0x37bc[9]](function(_0xcaabx13){switch(_0xcaabxf[_0x37bc[18]][_0x37bc[35]]){case _0x37bc[30]:return [_0xcaabx11[_0x37bc[29]](_0xcaabx13),_0xcaabx13];case _0x37bc[32]:return [_0xcaabx11[_0x37bc[31]](_0xcaabx13),_0xcaabx13];case _0x37bc[34]:return [_0xcaabx11[_0x37bc[33]](_0xcaabx13),_0xcaabx13]}})[_0x37bc[28]](function(_0xcaabx12,_0xcaabx13){return _0xcaabx5[_0x37bc[6]](201)[_0x37bc[7]](_0xcaabx13)})[_0x37bc[13]](handleError(_0xcaabx5))}
\ No newline at end of file
diff --git a/server/api/freshdesk_configuration/freshdesk_configuration.events.js b/server/api/freshdesk_configuration/freshdesk_configuration.events.js
index f36d5f5..5d94490 100644
--- a/server/api/freshdesk_configuration/freshdesk_configuration.events.js
+++ b/server/api/freshdesk_configuration/freshdesk_configuration.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const FreshdeskConfiguration = require('../../models').FreshdeskConfiguration;
-
-var FreshdeskConfigurationEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-FreshdeskConfigurationEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  FreshdeskConfiguration.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    FreshdeskConfigurationEvents.emit(event + ':' + doc._id, doc);
-    FreshdeskConfigurationEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = FreshdeskConfigurationEvents;
+var _0x78fa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x78fa[0];const EventEmitter=require(_0x78fa[1]);const FreshdeskConfiguration=require(_0x78fa[3])[_0x78fa[2]];var FreshdeskConfigurationEvents= new EventEmitter();FreshdeskConfigurationEvents[_0x78fa[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x78fa[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x78fa[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x78fa[6]};for(var e in events){var event=events[e];FreshdeskConfiguration[_0x78fa[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x9d55x8,_0x9d55x9,_0x9d55xa){FreshdeskConfigurationEvents[_0x78fa[10]](event+ _0x78fa[8]+ _0x9d55x8[_0x78fa[9]],_0x9d55x8);FreshdeskConfigurationEvents[_0x78fa[10]](event,_0x9d55x8);_0x9d55xa(null)}}module[_0x78fa[11]]= FreshdeskConfigurationEvents
\ No newline at end of file
diff --git a/server/api/freshdesk_configuration/freshdesk_configuration.socket.js b/server/api/freshdesk_configuration/freshdesk_configuration.socket.js
index 9c77498..38c24a0 100644
--- a/server/api/freshdesk_configuration/freshdesk_configuration.socket.js
+++ b/server/api/freshdesk_configuration/freshdesk_configuration.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const FreshdeskConfigurationEvents = require('./freshdesk_configuration.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('freshdesk_configuration:' + event, socket);
-
-    FreshdeskConfigurationEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    FreshdeskConfigurationEvents.removeListener(event, listener);
-  };
-}
+var _0x93b9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x93b9[0];const FreshdeskConfigurationEvents=require(_0x93b9[1]);var events=[_0x93b9[2],_0x93b9[3]];exports[_0x93b9[4]]= function(_0x1018x3){for(var _0x1018x4=0,_0x1018x5=events[_0x93b9[5]];_0x1018x4< _0x1018x5;_0x1018x4++){var _0x1018x6=events[_0x1018x4];var _0x1018x7=createListener(_0x93b9[6]+ _0x1018x6,_0x1018x3);FreshdeskConfigurationEvents[_0x93b9[7]](_0x1018x6,_0x1018x7);_0x1018x3[_0x93b9[7]](_0x93b9[8],removeListener(_0x1018x6,_0x1018x7))}};function createListener(_0x1018x6,_0x1018x3){return function(_0x1018x9){_0x1018x3[_0x93b9[9]](_0x1018x6,_0x1018x9)}}function removeListener(_0x1018x6,_0x1018x7){return function(){FreshdeskConfigurationEvents[_0x93b9[10]](_0x1018x6,_0x1018x7)}}
\ No newline at end of file
diff --git a/server/api/freshdesk_configuration/index.js b/server/api/freshdesk_configuration/index.js
index e08945f..8ec3184 100644
--- a/server/api/freshdesk_configuration/index.js
+++ b/server/api/freshdesk_configuration/index.js
@@ -1,19 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./freshdesk_configuration.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), controller.index);
-
-router.get('/:id', auth.isAuthenticated(), controller.show);
-router.post('/', auth.isAuthenticated(), controller.create);
-router.put('/:id', auth.isAuthenticated(), controller.update);
-router.post('/:id/:type', auth.isAuthenticated(), controller.addConfigurationField);
-router.patch('/:id', auth.isAuthenticated(), controller.update);
-router.delete('/:id', auth.isAuthenticated(), controller.destroy);
-
-
-module.exports = router;
+var _0x2abb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x3A\x74\x79\x70\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2abb[0];var express=require(_0x2abb[1]);var auth=require(_0x2abb[2]);var controller=require(_0x2abb[3]);var router=express.Router();router[_0x2abb[7]](_0x2abb[4],auth[_0x2abb[5]](),controller[_0x2abb[6]]);router[_0x2abb[7]](_0x2abb[8],auth[_0x2abb[5]](),controller[_0x2abb[9]]);router[_0x2abb[11]](_0x2abb[4],auth[_0x2abb[5]](),controller[_0x2abb[10]]);router[_0x2abb[13]](_0x2abb[8],auth[_0x2abb[5]](),controller[_0x2abb[12]]);router[_0x2abb[11]](_0x2abb[14],auth[_0x2abb[5]](),controller[_0x2abb[15]]);router[_0x2abb[16]](_0x2abb[8],auth[_0x2abb[5]](),controller[_0x2abb[12]]);router[_0x2abb[18]](_0x2abb[8],auth[_0x2abb[5]](),controller[_0x2abb[17]]);module[_0x2abb[19]]= router
\ No newline at end of file
diff --git a/server/api/freshdesk_field/freshdesk_field.controller.js b/server/api/freshdesk_field/freshdesk_field.controller.js
index 4a35db8..61ae2f2 100644
--- a/server/api/freshdesk_field/freshdesk_field.controller.js
+++ b/server/api/freshdesk_field/freshdesk_field.controller.js
@@ -1,104 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/freshdesk/fields              ->  index
- * POST    /api/freshdesk/fields              ->  create
- * GET     /api/freshdesk/fields/:id          ->  show
- * PUT     /api/freshdesk/fields/:id          ->  update
- * DELETE  /api/freshdesk/fields/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-
-var FreshdeskField = require('../../models').FreshdeskField;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of FreshdeskFields
-exports.index = function(req, res) {
-  FreshdeskField.findAll()
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single FreshdeskField from the DB
-exports.show = function(req, res) {
-  FreshdeskField.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new FreshdeskField in the DB
-exports.create = function(req, res) {
-  FreshdeskField.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing FreshdeskField in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  FreshdeskField.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a FreshdeskField from the DB
-exports.destroy = function(req, res) {
-  FreshdeskField.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
+var _0x4824=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0x4824[0];var _=require(_0x4824[1]);var FreshdeskField=require(_0x4824[3])[_0x4824[2]];function handleError(_0xf8a2x4,_0xf8a2x5){_0xf8a2x5= _0xf8a2x5|| 500;return function(_0xf8a2x6){_0xf8a2x4[_0x4824[5]](_0xf8a2x5)[_0x4824[4]](_0xf8a2x6)}}function responseWithResult(_0xf8a2x4,_0xf8a2x5){_0xf8a2x5= _0xf8a2x5|| 200;return function(_0xf8a2x8){if(_0xf8a2x8){_0xf8a2x4[_0x4824[5]](_0xf8a2x5)[_0x4824[6]](_0xf8a2x8)}}}function handleEntityNotFound(_0xf8a2x4){return function(_0xf8a2x8){if(!_0xf8a2x8){_0xf8a2x4[_0x4824[5]](404)[_0x4824[7]]();return null};return _0xf8a2x8}}function saveUpdates(_0xf8a2xb){return function(_0xf8a2x8){return _0xf8a2x8[_0x4824[9]](_0xf8a2xb)[_0x4824[8]](function(_0xf8a2xc){return _0xf8a2xc})}}function removeEntity(_0xf8a2x4){return function(_0xf8a2x8){if(_0xf8a2x8){return _0xf8a2x8[_0x4824[10]]()[_0x4824[8]](function(){_0xf8a2x4[_0x4824[5]](204)[_0x4824[7]]()})}}}exports[_0x4824[11]]= function(_0xf8a2xe,_0xf8a2x4){FreshdeskField[_0x4824[13]]()[_0x4824[8]](responseWithResult(_0xf8a2x4))[_0x4824[12]](handleError(_0xf8a2x4))};exports[_0x4824[14]]= function(_0xf8a2xe,_0xf8a2x4){FreshdeskField[_0x4824[17]](_0xf8a2xe[_0x4824[16]][_0x4824[15]])[_0x4824[8]](handleEntityNotFound(_0xf8a2x4))[_0x4824[8]](responseWithResult(_0xf8a2x4))[_0x4824[12]](handleError(_0xf8a2x4))};exports[_0x4824[18]]= function(_0xf8a2xe,_0xf8a2x4){FreshdeskField[_0x4824[18]](_0xf8a2xe[_0x4824[19]])[_0x4824[8]](responseWithResult(_0xf8a2x4,201))[_0x4824[12]](handleError(_0xf8a2x4))};exports[_0x4824[20]]= function(_0xf8a2xe,_0xf8a2x4){if(_0xf8a2xe[_0x4824[19]][_0x4824[15]]){delete _0xf8a2xe[_0x4824[19]][_0x4824[15]]};FreshdeskField[_0x4824[17]](_0xf8a2xe[_0x4824[16]][_0x4824[15]])[_0x4824[8]](handleEntityNotFound(_0xf8a2x4))[_0x4824[8]](saveUpdates(_0xf8a2xe[_0x4824[19]]))[_0x4824[8]](responseWithResult(_0xf8a2x4))[_0x4824[12]](handleError(_0xf8a2x4))};exports[_0x4824[10]]= function(_0xf8a2xe,_0xf8a2x4){FreshdeskField[_0x4824[17]](_0xf8a2xe[_0x4824[16]][_0x4824[15]])[_0x4824[8]](handleEntityNotFound(_0xf8a2x4))[_0x4824[8]](removeEntity(_0xf8a2x4))[_0x4824[12]](handleError(_0xf8a2x4))}
\ No newline at end of file
diff --git a/server/api/freshdesk_field/freshdesk_field.events.js b/server/api/freshdesk_field/freshdesk_field.events.js
index dcadf5c..d47b10f 100644
--- a/server/api/freshdesk_field/freshdesk_field.events.js
+++ b/server/api/freshdesk_field/freshdesk_field.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const FreshdeskField = require('../../models').FreshdeskField;
-
-var FreshdeskFieldEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-FreshdeskFieldEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  FreshdeskField.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    FreshdeskFieldEvents.emit(event + ':' + doc._id, doc);
-    FreshdeskFieldEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = FreshdeskFieldEvents;
+var _0x7ac2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7ac2[0];const EventEmitter=require(_0x7ac2[1]);const FreshdeskField=require(_0x7ac2[3])[_0x7ac2[2]];var FreshdeskFieldEvents= new EventEmitter();FreshdeskFieldEvents[_0x7ac2[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7ac2[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7ac2[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7ac2[6]};for(var e in events){var event=events[e];FreshdeskField[_0x7ac2[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x78a3x8,_0x78a3x9,_0x78a3xa){FreshdeskFieldEvents[_0x7ac2[10]](event+ _0x7ac2[8]+ _0x78a3x8[_0x7ac2[9]],_0x78a3x8);FreshdeskFieldEvents[_0x7ac2[10]](event,_0x78a3x8);_0x78a3xa(null)}}module[_0x7ac2[11]]= FreshdeskFieldEvents
\ No newline at end of file
diff --git a/server/api/freshdesk_field/freshdesk_field.socket.js b/server/api/freshdesk_field/freshdesk_field.socket.js
index 41eae7a..22c1517 100644
--- a/server/api/freshdesk_field/freshdesk_field.socket.js
+++ b/server/api/freshdesk_field/freshdesk_field.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const FreshdeskFieldEvents = require('./freshdesk_field.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('freshdesk_field:' + event, socket);
-
-    FreshdeskFieldEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    FreshdeskFieldEvents.removeListener(event, listener);
-  };
-}
+var _0x44a7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x44a7[0];const FreshdeskFieldEvents=require(_0x44a7[1]);var events=[_0x44a7[2],_0x44a7[3]];exports[_0x44a7[4]]= function(_0x7e80x3){for(var _0x7e80x4=0,_0x7e80x5=events[_0x44a7[5]];_0x7e80x4< _0x7e80x5;_0x7e80x4++){var _0x7e80x6=events[_0x7e80x4];var _0x7e80x7=createListener(_0x44a7[6]+ _0x7e80x6,_0x7e80x3);FreshdeskFieldEvents[_0x44a7[7]](_0x7e80x6,_0x7e80x7);_0x7e80x3[_0x44a7[7]](_0x44a7[8],removeListener(_0x7e80x6,_0x7e80x7))}};function createListener(_0x7e80x6,_0x7e80x3){return function(_0x7e80x9){_0x7e80x3[_0x44a7[9]](_0x7e80x6,_0x7e80x9)}}function removeListener(_0x7e80x6,_0x7e80x7){return function(){FreshdeskFieldEvents[_0x44a7[10]](_0x7e80x6,_0x7e80x7)}}
\ No newline at end of file
diff --git a/server/api/freshdesk_field/index.js b/server/api/freshdesk_field/index.js
index d17268f..8b7cd6f 100644
--- a/server/api/freshdesk_field/index.js
+++ b/server/api/freshdesk_field/index.js
@@ -1,18 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./freshdesk_field.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), controller.index);
-
-router.get('/:id', auth.isAuthenticated(), controller.show);
-router.post('/', auth.isAuthenticated(), controller.create);
-router.put('/:id', auth.isAuthenticated(), controller.update);
-router.patch('/:id', auth.isAuthenticated(), controller.update);
-router.delete('/:id', auth.isAuthenticated(), controller.destroy);
-
-
-module.exports = router;
+var _0xc458=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc458[0];var express=require(_0xc458[1]);var auth=require(_0xc458[2]);var controller=require(_0xc458[3]);var router=express.Router();router[_0xc458[7]](_0xc458[4],auth[_0xc458[5]](),controller[_0xc458[6]]);router[_0xc458[7]](_0xc458[8],auth[_0xc458[5]](),controller[_0xc458[9]]);router[_0xc458[11]](_0xc458[4],auth[_0xc458[5]](),controller[_0xc458[10]]);router[_0xc458[13]](_0xc458[8],auth[_0xc458[5]](),controller[_0xc458[12]]);router[_0xc458[14]](_0xc458[8],auth[_0xc458[5]](),controller[_0xc458[12]]);router[_0xc458[16]](_0xc458[8],auth[_0xc458[5]](),controller[_0xc458[15]]);module[_0xc458[17]]= router
\ No newline at end of file
diff --git a/server/api/integration/index.js b/server/api/integration/index.js
index 74118a8..b1de45f 100644
--- a/server/api/integration/index.js
+++ b/server/api/integration/index.js
@@ -1,15 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./integration.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([19], ['admin', 'agent']), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.update);
-router.delete('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy);
-
-module.exports = router;
+var _0xf7ee=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x68\x61\x73\x52\x6F\x6C\x65","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf7ee[0];var express=require(_0xf7ee[1]);var controller=require(_0xf7ee[2]);var auth=require(_0xf7ee[3]);var router=express.Router();router[_0xf7ee[10]](_0xf7ee[4],auth[_0xf7ee[5]](),auth[_0xf7ee[8]]([19],[_0xf7ee[6],_0xf7ee[7]]),controller[_0xf7ee[9]]);router[_0xf7ee[10]](_0xf7ee[11],auth[_0xf7ee[5]](),auth[_0xf7ee[12]](_0xf7ee[6]),controller[_0xf7ee[13]]);router[_0xf7ee[15]](_0xf7ee[4],auth[_0xf7ee[5]](),auth[_0xf7ee[12]](_0xf7ee[6]),controller[_0xf7ee[14]]);router[_0xf7ee[17]](_0xf7ee[11],auth[_0xf7ee[5]](),auth[_0xf7ee[12]](_0xf7ee[6]),controller[_0xf7ee[16]]);router[_0xf7ee[19]](_0xf7ee[11],auth[_0xf7ee[5]](),auth[_0xf7ee[12]](_0xf7ee[6]),controller[_0xf7ee[18]]);module[_0xf7ee[20]]= router
\ No newline at end of file
diff --git a/server/api/integration/integration.controller.js b/server/api/integration/integration.controller.js
index d99521f..dd63279 100644
--- a/server/api/integration/integration.controller.js
+++ b/server/api/integration/integration.controller.js
@@ -1,168 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var uploadFile = require('upload-file');
-var config = require('../../config/environment');
-var path = require('path');
-var sr = require('simple-random');
-var admZip = require('adm-zip');
-var str2json = require('string-to-json');
-var fs = require('fs');
-var Util = require('../../config/util');
-
-var Integration = require('../../models').Integration;
-
-// Get list of Integration
-exports.index = function(req, res, next) {
-  return Integration
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single integration
-exports.show = function(req, res) {
-  return Integration
-    .findById(req.params.id)
-    .then(function(integration) {
-      if (!integration) {
-        return res.sendStatus(404);
-      }
-      return res.send(integration);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new integration in the DB.
-exports.create = function(req, res) {
-  var upload = new uploadFile({
-    dest: path.join(config.root, 'server/files/integrations'),
-    maxFileSize: 5 * 1000000,
-    maxNumberOfFiles: 1,
-    minNumberOfFiles: 1,
-    acceptFileTypes: /(\.|\/)(zip)$/i,
-    messages: {
-      maxNumberOfFiles: "Max number of files upload exceeded",
-      acceptFileTypes: "Only zip format accepted",
-      maxFileSize: "The maximum file size is 5 Mb",
-      invalidRequest: "Invalid request"
-    }
-  });
-
-  upload.on('end', function(fields, files) {
-    var zip = new admZip(files.file.path);
-
-    var manifest = false;
-    var zipEntries = zip.getEntries();
-    zipEntries.forEach(function(zipEntry) {
-      if (zipEntry.name === 'manifest.json') {
-        var str = zipEntry.getData().toString('utf8');
-        console.log('uploadZip', str);
-        try {
-          manifest = JSON.parse(str);
-          console.log('uploadZip', manifest);
-          Integration
-            .create(_.merge(files.file, manifest))
-            .then(function(integration) {
-
-              // Extract All Zip and overwrite old directory
-              zip.extractAllTo(path.join(config.root,
-                'server/files/integrations'), true);
-
-              return res.status(201).send(integration);
-            })
-            .catch(function(err) {
-              return handleError(res, err);
-            });
-        } catch (e) {
-          console.log(e);
-          var err = {
-            errors: [{
-              type: 'json',
-              message: e
-            }]
-          };
-          return handleError(res, err);
-        }
-      }
-    });
-
-    fs.unlinkSync(files.file.path);
-
-    if (!manifest) {
-      var err = {
-        errors: [{
-          type: 'manifest',
-          message: 'manifest.json not found'
-        }]
-      };
-      return handleError(res, err);
-    }
-  });
-
-  upload.on('error', function(e) {
-    var err = {
-      errors: [{
-        type: 'upload',
-        message: e
-      }]
-    };
-    return handleError(res, err);
-  });
-
-  upload.parse(req);
-};
-
-// Updates an existing integration in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return Integration
-    .findById(req.params.id)
-    .then(function(integration) {
-      if (!integration) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(integration, req.body);
-      return updated.save();
-    })
-    .then(function(integration) {
-      return res.status(200).send(integration);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a integration from the DB.
-exports.destroy = function(req, res) {
-  return Integration
-    .find({
-      where: {
-        id: req.params.id
-      }
-    })
-    .then(function(integration) {
-      if (!integration) {
-        return res.sendStatus(404);
-      }
-      return integration.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x760a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x70\x61\x74\x68","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x61\x64\x6D\x2D\x7A\x69\x70","\x73\x74\x72\x69\x6E\x67\x2D\x74\x6F\x2D\x6A\x73\x6F\x6E","\x66\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x6A\x6F\x69\x6E","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x7A\x69\x70\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x54\x68\x65\x20\x6D\x61\x78\x69\x6D\x75\x6D\x20\x66\x69\x6C\x65\x20\x73\x69\x7A\x65\x20\x69\x73\x20\x35\x20\x4D\x62","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x67\x65\x74\x45\x6E\x74\x72\x69\x65\x73","\x6E\x61\x6D\x65","\x6D\x61\x6E\x69\x66\x65\x73\x74\x2E\x6A\x73\x6F\x6E","\x75\x74\x66\x38","\x67\x65\x74\x44\x61\x74\x61","\x75\x70\x6C\x6F\x61\x64\x5A\x69\x70","\x6C\x6F\x67","\x70\x61\x72\x73\x65","\x65\x78\x74\x72\x61\x63\x74\x41\x6C\x6C\x54\x6F","\x6D\x65\x72\x67\x65","\x6A\x73\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x75\x6E\x6C\x69\x6E\x6B\x53\x79\x6E\x63","\x6D\x61\x6E\x69\x66\x65\x73\x74","\x6D\x61\x6E\x69\x66\x65\x73\x74\x2E\x6A\x73\x6F\x6E\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x6F\x6E","\x65\x72\x72\x6F\x72","\x75\x70\x6C\x6F\x61\x64","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64"];_0x760a[0];var _=require(_0x760a[1]);var uploadFile=require(_0x760a[2]);var config=require(_0x760a[3]);var path=require(_0x760a[4]);var sr=require(_0x760a[5]);var admZip=require(_0x760a[6]);var str2json=require(_0x760a[7]);var fs=require(_0x760a[8]);var Util=require(_0x760a[9]);var Integration=require(_0x760a[11])[_0x760a[10]];exports[_0x760a[12]]= function(_0xcbd7xb,_0xcbd7xc,_0xcbd7xd){return Integration[_0x760a[19]](Util[_0x760a[18]](_0xcbd7xb[_0x760a[17]]))[_0x760a[16]](function(_0xcbd7xf){_0xcbd7xc[_0x760a[15]](200)[_0x760a[14]](_0xcbd7xf)})[_0x760a[13]](function(_0xcbd7xe){return handleError(_0xcbd7xc,_0xcbd7xe)})};exports[_0x760a[20]]= function(_0xcbd7xb,_0xcbd7xc){return Integration[_0x760a[24]](_0xcbd7xb[_0x760a[23]][_0x760a[22]])[_0x760a[16]](function(_0xcbd7x10){if(!_0xcbd7x10){return _0xcbd7xc[_0x760a[21]](404)};return _0xcbd7xc[_0x760a[14]](_0xcbd7x10)})[_0x760a[13]](function(_0xcbd7xe){return handleError(_0xcbd7xc,_0xcbd7xe)})};exports[_0x760a[25]]= function(_0xcbd7xb,_0xcbd7xc){var _0xcbd7x11= new uploadFile({dest:path[_0x760a[28]](config[_0x760a[26]],_0x760a[27]),maxFileSize:5* 1000000,maxNumberOfFiles:1,minNumberOfFiles:1,acceptFileTypes:/(\.|\/)(zip)$/i,messages:{maxNumberOfFiles:_0x760a[29],acceptFileTypes:_0x760a[30],maxFileSize:_0x760a[31],invalidRequest:_0x760a[32]}});_0xcbd7x11[_0x760a[50]](_0x760a[33],function(_0xcbd7x12,_0xcbd7x13){var _0xcbd7x14= new admZip(_0xcbd7x13[_0x760a[34]][_0x760a[4]]);var _0xcbd7x15=false;var _0xcbd7x16=_0xcbd7x14[_0x760a[35]]();_0xcbd7x16[_0x760a[46]](function(_0xcbd7x17){if(_0xcbd7x17[_0x760a[36]]=== _0x760a[37]){var _0xcbd7x18=_0xcbd7x17[_0x760a[39]]().toString(_0x760a[38]);console[_0x760a[41]](_0x760a[40],_0xcbd7x18);try{_0xcbd7x15= JSON[_0x760a[42]](_0xcbd7x18);console[_0x760a[41]](_0x760a[40],_0xcbd7x15);Integration[_0x760a[25]](_[_0x760a[44]](_0xcbd7x13[_0x760a[34]],_0xcbd7x15))[_0x760a[16]](function(_0xcbd7x10){_0xcbd7x14[_0x760a[43]](path[_0x760a[28]](config[_0x760a[26]],_0x760a[27]),true);return _0xcbd7xc[_0x760a[15]](201)[_0x760a[14]](_0xcbd7x10)})[_0x760a[13]](function(_0xcbd7xe){return handleError(_0xcbd7xc,_0xcbd7xe)})}catch(e){console[_0x760a[41]](e);var _0xcbd7xe={errors:[{type:_0x760a[45],message:e}]};return handleError(_0xcbd7xc,_0xcbd7xe)}}});fs[_0x760a[47]](_0xcbd7x13[_0x760a[34]][_0x760a[4]]);if(!_0xcbd7x15){var _0xcbd7xe={errors:[{type:_0x760a[48],message:_0x760a[49]}]};return handleError(_0xcbd7xc,_0xcbd7xe)}});_0xcbd7x11[_0x760a[50]](_0x760a[51],function(_0xcbd7x19){var _0xcbd7xe={errors:[{type:_0x760a[52],message:_0xcbd7x19}]};return handleError(_0xcbd7xc,_0xcbd7xe)});_0xcbd7x11[_0x760a[42]](_0xcbd7xb)};exports[_0x760a[53]]= function(_0xcbd7xb,_0xcbd7xc){if(_0xcbd7xb[_0x760a[54]][_0x760a[22]]){delete _0xcbd7xb[_0x760a[54]][_0x760a[22]]};return Integration[_0x760a[24]](_0xcbd7xb[_0x760a[23]][_0x760a[22]])[_0x760a[16]](function(_0xcbd7x10){if(!_0xcbd7x10){return _0xcbd7xc[_0x760a[21]](404)};var _0xcbd7x1a=_[_0x760a[44]](_0xcbd7x10,_0xcbd7xb[_0x760a[54]]);return _0xcbd7x1a[_0x760a[55]]()})[_0x760a[16]](function(_0xcbd7x10){return _0xcbd7xc[_0x760a[15]](200)[_0x760a[14]](_0xcbd7x10)})[_0x760a[13]](function(_0xcbd7xe){return handleError(_0xcbd7xc,_0xcbd7xe)})};exports[_0x760a[56]]= function(_0xcbd7xb,_0xcbd7xc){return Integration[_0x760a[57]]({where:{id:_0xcbd7xb[_0x760a[23]][_0x760a[22]]}})[_0x760a[16]](function(_0xcbd7x10){if(!_0xcbd7x10){return _0xcbd7xc[_0x760a[21]](404)};return _0xcbd7x10[_0x760a[56]]()})[_0x760a[16]](function(){return _0xcbd7xc[_0x760a[21]](204)})[_0x760a[13]](function(_0xcbd7xe){return handleError(_0xcbd7xc,_0xcbd7xe)})};function handleError(_0xcbd7xc,_0xcbd7xe){return _0xcbd7xc[_0x760a[15]](500)[_0x760a[14]](_0xcbd7xe)}
\ No newline at end of file
diff --git a/server/api/integration/integration.events.js b/server/api/integration/integration.events.js
index 6c9a2bf..f618b39 100644
--- a/server/api/integration/integration.events.js
+++ b/server/api/integration/integration.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Integration = require('../../models').Integration;
-
-var IntegrationEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-IntegrationEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Integration.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    IntegrationEvents.emit(event + ':' + doc._id, doc);
-    IntegrationEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = IntegrationEvents;
+var _0xee2e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xee2e[0];const EventEmitter=require(_0xee2e[1]);const Integration=require(_0xee2e[3])[_0xee2e[2]];var IntegrationEvents= new EventEmitter();IntegrationEvents[_0xee2e[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xee2e[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xee2e[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xee2e[6]};for(var e in events){var event=events[e];Integration[_0xee2e[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x596ex8,_0x596ex9,_0x596exa){IntegrationEvents[_0xee2e[10]](event+ _0xee2e[8]+ _0x596ex8[_0xee2e[9]],_0x596ex8);IntegrationEvents[_0xee2e[10]](event,_0x596ex8);_0x596exa(null)}}module[_0xee2e[11]]= IntegrationEvents
\ No newline at end of file
diff --git a/server/api/integration/integration.socket.js b/server/api/integration/integration.socket.js
index 849c2ef..3537a30 100644
--- a/server/api/integration/integration.socket.js
+++ b/server/api/integration/integration.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const IntegrationEvents = require('./integration.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('integration:' + event, socket);
-
-    IntegrationEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    IntegrationEvents.removeListener(event, listener);
-  };
-}
+var _0xf1d4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xf1d4[0];const IntegrationEvents=require(_0xf1d4[1]);var events=[_0xf1d4[2],_0xf1d4[3]];exports[_0xf1d4[4]]= function(_0xc175x3){for(var _0xc175x4=0,_0xc175x5=events[_0xf1d4[5]];_0xc175x4< _0xc175x5;_0xc175x4++){var _0xc175x6=events[_0xc175x4];var _0xc175x7=createListener(_0xf1d4[6]+ _0xc175x6,_0xc175x3);IntegrationEvents[_0xf1d4[7]](_0xc175x6,_0xc175x7);_0xc175x3[_0xf1d4[7]](_0xf1d4[8],removeListener(_0xc175x6,_0xc175x7))}};function createListener(_0xc175x6,_0xc175x3){return function(_0xc175x9){_0xc175x3[_0xf1d4[9]](_0xc175x6,_0xc175x9)}}function removeListener(_0xc175x6,_0xc175x7){return function(){IntegrationEvents[_0xf1d4[10]](_0xc175x6,_0xc175x7)}}
\ No newline at end of file
diff --git a/server/api/interval/index.js b/server/api/interval/index.js
index 9df181a..311e2d3 100644
--- a/server/api/interval/index.js
+++ b/server/api/interval/index.js
@@ -1,201 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./interval.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-/**
- * @api {get} /api/intervals/ Get intervals' list.
- *
- * @apiParam (Query) {Number} [offset] Pagination offset.
- * @apiParam (Query) {Number} [limit] Pagination limit.
- *
- * @apiVersion 0.0.143
- * @apiName GetIntervals
- * @apiGroup Intervals
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Number} count Number of intervals.
- * @apiSuccess {Object[]} rows Get intervals' list.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *        "count": 1,
- *        "rows": [{
- *          "id": 1
- *          "name": "I1",
- *          "description": "Interval mon-fri",
- *          "SubIntervals": [{
- *            "name": "SI1"
- *            "interval": "9:00-17:00,mon-fri,*,*"
- *          }]
- *       }]
- *     }
- */
-router.get('/', auth.isAuthenticated(), auth.hasModule([13, 7, 8, 9, 10, 11], ['admin']), controller.index);
-
-/**
- * @api {get} /api/intervals/:id Get interval's details.
- * @apiParam {Number} id Interval's unique ID.
- * @apiVersion 0.0.143
- * @apiName GetInterval
- * @apiGroup Intervals
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Object} Get interval's details.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *        "id": 1
- *        "name": "I1",
- *        "description": "Interval mon-fri",
- *        "SubIntervals": [{
- *          "name": "SI1"
- *          "interval": "9:00-17:00,mon-fri,*,*"
- *        }]
- *     }
- */
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show);
-
-/**
- * @api {post} /api/intervals/ Create interval.
- *
- * @apiParamExample {json} Request-Example:
- *     {
- *        "name": "I1",
- *        "description": "Interval mon-fri",
- *        "SubIntervals": [{
- *          "name": "SI1"
- *          "interval": "9:00-17:00,mon-fri,*,*"
- *        }]
- *     }
- *
- * @apiParam (Body) {String} name                                        Interval's name.
- * @apiParam (Body) {Object[]} [SubIntervals]                            SubIntervals' array.
- * @apiParam (Body) {String} [description]                               Interval's description.
- *
- * @apiVersion 0.0.143
- * @apiName CreateInterval
- * @apiGroup Intervals
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 201 Created
- *     {
- *        "id": 1
- *        "name": "john.doe",
- *        "email": "[email-masked]",
- *        "internal": 1001,
- *        "fullname": "John Doe",
- *        ...
- *     }
- */
-router.post('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.create);
-
-/**
- * @api {put} /api/intervals/:id Update interval.
- *
- * @apiParamExample {json} Request-Example:
- *     {
- *        "name": "I1",
- *        "description": "Interval mon-fri",
- *        "SubIntervals": [{
- *          "name": "SI1"
- *          "interval": "9:00-17:00,mon-fri,*,*"
- *        }]
- *     }
- *
- * @apiParam (Params) {Number} id Interval's unique ID.
- * @apiParam (Body) {String} name                                        Interval's name.
- * @apiParam (Body) {Object[]} [SubIntervals]                            SubIntervals' array.
- * @apiParam (Body) {String} [description]                               Interval's description.
- *
- * @apiVersion 0.0.143
- * @apiName UpdateInterval
- * @apiGroup Intervals
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *        "id": 1
- *        "name": "john.doe",
- *        "email": "[email-masked]",
- *        "internal": 1001,
- *        "fullname": "John Doe",
- *        ...
- *     }
- */
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update);
-
-/**
- * @api {delete} /api/intervals/ Bulk Delete intervals' details.
- *
- * @apiParam (Query) {Number[]} ids Intervals' unique ID array.
- *
- * @apiVersion 0.0.143
- * @apiName BulkDeleteIntervals
- * @apiGroup Intervals
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.bulkDestroy);
-
-/**
- * @api {delete} /api/intervals/:id Delete interval's details.
- *
- * @apiParam {Number} id Interval's unique ID.
- *
- * @apiVersion 0.0.143
- * @apiName DeleteInterval
- * @apiGroup Intervals
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0x82c2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x82c2[0];var express=require(_0x82c2[1]);var controller=require(_0x82c2[2]);var auth=require(_0x82c2[3]);var router=express.Router();router[_0x82c2[9]](_0x82c2[4],auth[_0x82c2[5]](),auth[_0x82c2[7]]([13,7,8,9,10,11],[_0x82c2[6]]),controller[_0x82c2[8]]);router[_0x82c2[9]](_0x82c2[10],auth[_0x82c2[5]](),auth[_0x82c2[7]]([13],[_0x82c2[6]]),controller[_0x82c2[11]]);router[_0x82c2[13]](_0x82c2[4],auth[_0x82c2[5]](),auth[_0x82c2[7]]([13],[_0x82c2[6]]),controller[_0x82c2[12]]);router[_0x82c2[15]](_0x82c2[10],auth[_0x82c2[5]](),auth[_0x82c2[7]]([13],[_0x82c2[6]]),controller[_0x82c2[14]]);router[_0x82c2[17]](_0x82c2[4],auth[_0x82c2[5]](),auth[_0x82c2[7]]([13],[_0x82c2[6]]),controller[_0x82c2[16]]);router[_0x82c2[17]](_0x82c2[10],auth[_0x82c2[5]](),auth[_0x82c2[7]]([13],[_0x82c2[6]]),controller[_0x82c2[18]]);module[_0x82c2[19]]= router
\ No newline at end of file
diff --git a/server/api/interval/interval.controller.js b/server/api/interval/interval.controller.js
index 8276adb..21c8f6d 100644
--- a/server/api/interval/interval.controller.js
+++ b/server/api/interval/interval.controller.js
@@ -1,197 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Interval = require('../../models').Interval;
-var VoiceExtension = require('../../models').VoiceExtension;
-var sequelize = require('../../models').sequelize;
-var Promise = require('bluebird');
-
-var Util = require('../../config/util');
-
-// Get list of interval
-exports.index = function(req, res, next) {
-  return Interval
-    .scope('intervals', 'subintervals')
-    .findAndCountAll(_.merge(Util.getQuery(req.query), {
-      distinct: true
-    }))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single interval
-exports.show = function(req, res) {
-  return Interval
-    .scope('subintervals')
-    .findById(req.params.id)
-    .then(function(interval) {
-      if (!interval) {
-        return res.sendStatus(404);
-      }
-      return res.send(interval);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new interval in the DB.
-exports.create = function(req, res) {
-  return Interval
-    .scope('subintervals')
-    .create(req.body)
-    .then(function(interval) {
-      return res.status(201).send(interval);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing interval in the DB.
-exports.update = function(req, res) {
-  var _interval;
-  return sequelize.transaction(function(t) {
-      if (req.body.id) {
-        delete req.body.id;
-      }
-      return Interval
-        .scope('subintervals')
-        .findById(req.params.id)
-        .then(function(interval) {
-          if (!interval) {
-            return res.sendStatus(404);
-          }
-          _interval = _.clone(interval);
-          return interval
-            .updateAttributes(req.body, {
-              transaction: t
-            });
-        })
-        .then(function() {
-          if (req.body.SubIntervals && !req.body.SubIntervals.length) { //if I pass an empty subintervals object it means I want to delete all the sub-intervals
-            return Interval
-              .destroy({
-                where: {
-                  IntervalId: req.params.id
-                },
-                individualHooks: true,
-                transaction: t
-              });
-          } else if (req.body.SubIntervals && req.body.SubIntervals.length) { //otherwise i update, add or delete sub-intervals depending on the object content
-            return bulkCreateSubIntervals(req.body.SubIntervals, _interval, t)
-          }
-        })
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-function bulkCreateSubIntervals(subIntervals, _interval, t) {
-  return Promise
-    .all([])
-    .then(function() {
-      var bulkSubInts = [];
-      var oldSubIntervals = _.map(_interval.SubIntervals, 'dataValues');
-      var newInterval;
-      _.forEach(oldSubIntervals, function(element, index) {
-        newInterval = _.find(subIntervals, {
-          id: element.id
-        });
-        if (newInterval) {
-          newInterval.IntervalId = _interval.id;
-          bulkSubInts.push(Interval.update(_.clone(newInterval), {
-            where: {
-              id: element.id
-            },
-            transaction: t,
-            individualHooks: true
-          }));
-          _.remove(subIntervals, {
-            id: element.id
-          });
-        } else {
-          bulkSubInts.push(Interval
-            .destroy({
-              where: {
-                id: element.id
-              },
-              individualHooks: true,
-              transaction: t
-            }));
-        }
-      });
-      _.forEach(subIntervals, function(element) {
-        element.IntervalId = _interval.id;
-        bulkSubInts.push(Interval.create(element, {
-          transaction: t
-        }));
-      });
-      return bulkSubInts;
-    })
-    .all();
-}
-
-// Deletes a interval from the DB.
-exports.destroy = function(req, res) {
-  return sequelize.transaction(function(t) {
-      return Interval
-        .destroy({
-          where: {
-            id: req.params.id
-          },
-          individualHooks: true,
-          transaction: t
-        });
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(sequelize.ForeignKeyConstraintError, function(err) {
-      err.message = 'The Interval is associated with one or more routes, delete them first';
-      err.translatedMessage = 'MESSAGE_INTERVAL_ROUTE_ASSOCIATED'
-      return handleError(res, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes multiple intervals from the DB.
-exports.bulkDestroy = function(req, res) {
-  return sequelize.transaction(function(t) {
-      return Interval
-        .destroy({
-          where: {
-            id: req.query.ids
-          },
-          individualHooks: true,
-          transaction: t
-        });
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(sequelize.ForeignKeyConstraintError, function(err) {
-      err.message = 'The Interval is associated with one or more routes, delete them first';
-      err.translatedMessage = 'MESSAGE_INTERVAL_ROUTE_ASSOCIATED'
-      return handleError(res, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xc58a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x73\x75\x62\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x6C\x6F\x67","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x53\x75\x62\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x73\x74\x72\x6F\x79","\x63\x6C\x6F\x6E\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x61\x6C\x6C","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x61\x70","\x66\x69\x6E\x64","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x70\x75\x73\x68","\x72\x65\x6D\x6F\x76\x65","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x73\x73\x61\x67\x65","\x54\x68\x65\x20\x49\x6E\x74\x65\x72\x76\x61\x6C\x20\x69\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x6F\x6E\x65\x20\x6F\x72\x20\x6D\x6F\x72\x65\x20\x72\x6F\x75\x74\x65\x73\x2C\x20\x64\x65\x6C\x65\x74\x65\x20\x74\x68\x65\x6D\x20\x66\x69\x72\x73\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x49\x4E\x54\x45\x52\x56\x41\x4C\x5F\x52\x4F\x55\x54\x45\x5F\x41\x53\x53\x4F\x43\x49\x41\x54\x45\x44","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xc58a[0];var _=require(_0xc58a[1]);var Interval=require(_0xc58a[3])[_0xc58a[2]];var VoiceExtension=require(_0xc58a[3])[_0xc58a[4]];var sequelize=require(_0xc58a[3])[_0xc58a[5]];var Promise=require(_0xc58a[6]);var Util=require(_0xc58a[7]);exports[_0xc58a[8]]= function(_0xe261x7,_0xe261x8,_0xe261x9){return Interval[_0xc58a[19]](_0xc58a[17],_0xc58a[18])[_0xc58a[16]](_[_0xc58a[15]](Util[_0xc58a[14]](_0xe261x7[_0xc58a[13]]),{distinct:true}))[_0xc58a[12]](function(_0xe261xb){_0xe261x8[_0xc58a[11]](200)[_0xc58a[10]](_0xe261xb)})[_0xc58a[9]](function(_0xe261xa){return handleError(_0xe261x8,_0xe261xa)})};exports[_0xc58a[20]]= function(_0xe261x7,_0xe261x8){return Interval[_0xc58a[19]](_0xc58a[18])[_0xc58a[24]](_0xe261x7[_0xc58a[23]][_0xc58a[22]])[_0xc58a[12]](function(_0xe261xc){if(!_0xe261xc){return _0xe261x8[_0xc58a[21]](404)};return _0xe261x8[_0xc58a[10]](_0xe261xc)})[_0xc58a[9]](function(_0xe261xa){return handleError(_0xe261x8,_0xe261xa)})};exports[_0xc58a[25]]= function(_0xe261x7,_0xe261x8){return Interval[_0xc58a[19]](_0xc58a[18])[_0xc58a[25]](_0xe261x7[_0xc58a[27]])[_0xc58a[12]](function(_0xe261xc){return _0xe261x8[_0xc58a[11]](201)[_0xc58a[10]](_0xe261xc)})[_0xc58a[9]](function(_0xe261xa){console[_0xc58a[26]](_0xe261xa);return handleError(_0xe261x8,_0xe261xa)})};exports[_0xc58a[28]]= function(_0xe261x7,_0xe261x8){var _0xe261xd;return sequelize[_0xc58a[34]](function(_0xe261xe){if(_0xe261x7[_0xc58a[27]][_0xc58a[22]]){delete _0xe261x7[_0xc58a[27]][_0xc58a[22]]};return Interval[_0xc58a[19]](_0xc58a[18])[_0xc58a[24]](_0xe261x7[_0xc58a[23]][_0xc58a[22]])[_0xc58a[12]](function(_0xe261xc){if(!_0xe261xc){return _0xe261x8[_0xc58a[21]](404)};_0xe261xd= _[_0xc58a[32]](_0xe261xc);return _0xe261xc[_0xc58a[33]](_0xe261x7[_0xc58a[27]],{transaction:_0xe261xe})})[_0xc58a[12]](function(){if(_0xe261x7[_0xc58a[27]][_0xc58a[29]]&& !_0xe261x7[_0xc58a[27]][_0xc58a[29]][_0xc58a[30]]){return Interval[_0xc58a[31]]({where:{IntervalId:_0xe261x7[_0xc58a[23]][_0xc58a[22]]},individualHooks:true,transaction:_0xe261xe})}else {if(_0xe261x7[_0xc58a[27]][_0xc58a[29]]&& _0xe261x7[_0xc58a[27]][_0xc58a[29]][_0xc58a[30]]){return bulkCreateSubIntervals(_0xe261x7[_0xc58a[27]].SubIntervals,_0xe261xd,_0xe261xe)}}})})[_0xc58a[12]](function(){return _0xe261x8[_0xc58a[21]](200)})[_0xc58a[9]](function(_0xe261xa){console[_0xc58a[26]](_0xe261xa);return handleError(_0xe261x8,_0xe261xa)})};function bulkCreateSubIntervals(_0xe261x10,_0xe261xd,_0xe261xe){return Promise[_0xc58a[35]]([])[_0xc58a[12]](function(){var _0xe261x11=[];var _0xe261x12=_[_0xc58a[37]](_0xe261xd.SubIntervals,_0xc58a[36]);var _0xe261x13;_[_0xc58a[42]](_0xe261x12,function(_0xe261x14,_0xe261x15){_0xe261x13= _[_0xc58a[38]](_0xe261x10,{id:_0xe261x14[_0xc58a[22]]});if(_0xe261x13){_0xe261x13[_0xc58a[39]]= _0xe261xd[_0xc58a[22]];_0xe261x11[_0xc58a[40]](Interval[_0xc58a[28]](_[_0xc58a[32]](_0xe261x13),{where:{id:_0xe261x14[_0xc58a[22]]},transaction:_0xe261xe,individualHooks:true}));_[_0xc58a[41]](_0xe261x10,{id:_0xe261x14[_0xc58a[22]]})}else {_0xe261x11[_0xc58a[40]](Interval[_0xc58a[31]]({where:{id:_0xe261x14[_0xc58a[22]]},individualHooks:true,transaction:_0xe261xe}))}});_[_0xc58a[42]](_0xe261x10,function(_0xe261x14){_0xe261x14[_0xc58a[39]]= _0xe261xd[_0xc58a[22]];_0xe261x11[_0xc58a[40]](Interval[_0xc58a[25]](_0xe261x14,{transaction:_0xe261xe}))});return _0xe261x11})[_0xc58a[35]]()}exports[_0xc58a[31]]= function(_0xe261x7,_0xe261x8){return sequelize[_0xc58a[34]](function(_0xe261xe){return Interval[_0xc58a[31]]({where:{id:_0xe261x7[_0xc58a[23]][_0xc58a[22]]},individualHooks:true,transaction:_0xe261xe})})[_0xc58a[12]](function(){return _0xe261x8[_0xc58a[21]](204)})[_0xc58a[9]](sequelize.ForeignKeyConstraintError,function(_0xe261xa){_0xe261xa[_0xc58a[43]]= _0xc58a[44];_0xe261xa[_0xc58a[45]]= _0xc58a[46];return handleError(_0xe261x8,_0xe261xa)})[_0xc58a[9]](function(_0xe261xa){return handleError(_0xe261x8,_0xe261xa)})};exports[_0xc58a[47]]= function(_0xe261x7,_0xe261x8){return sequelize[_0xc58a[34]](function(_0xe261xe){return Interval[_0xc58a[31]]({where:{id:_0xe261x7[_0xc58a[13]][_0xc58a[48]]},individualHooks:true,transaction:_0xe261xe})})[_0xc58a[12]](function(){return _0xe261x8[_0xc58a[21]](204)})[_0xc58a[9]](sequelize.ForeignKeyConstraintError,function(_0xe261xa){_0xe261xa[_0xc58a[43]]= _0xc58a[44];_0xe261xa[_0xc58a[45]]= _0xc58a[46];return handleError(_0xe261x8,_0xe261xa)})[_0xc58a[9]](function(_0xe261xa){return handleError(_0xe261x8,_0xe261xa)})};function handleError(_0xe261x8,_0xe261xa){return _0xe261x8[_0xc58a[11]](500)[_0xc58a[10]](_0xe261xa)}
\ No newline at end of file
diff --git a/server/api/interval/interval.events.js b/server/api/interval/interval.events.js
index cd38713..426f2ff 100644
--- a/server/api/interval/interval.events.js
+++ b/server/api/interval/interval.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Interval = require('../../models').Interval;
-
-var IntervalEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-IntervalEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Interval.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    IntervalEvents.emit(event + ':' + doc._id, doc);
-    IntervalEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = IntervalEvents;
+var _0xe3d5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xe3d5[0];const EventEmitter=require(_0xe3d5[1]);const Interval=require(_0xe3d5[3])[_0xe3d5[2]];var IntervalEvents= new EventEmitter();IntervalEvents[_0xe3d5[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xe3d5[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xe3d5[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xe3d5[6]};for(var e in events){var event=events[e];Interval[_0xe3d5[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x925bx8,_0x925bx9,_0x925bxa){IntervalEvents[_0xe3d5[10]](event+ _0xe3d5[8]+ _0x925bx8[_0xe3d5[9]],_0x925bx8);IntervalEvents[_0xe3d5[10]](event,_0x925bx8);_0x925bxa(null)}}module[_0xe3d5[11]]= IntervalEvents
\ No newline at end of file
diff --git a/server/api/interval/interval.socket.js b/server/api/interval/interval.socket.js
index 8d62dce..439ea42 100644
--- a/server/api/interval/interval.socket.js
+++ b/server/api/interval/interval.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const IntervalEvents = require('./interval.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('interval:' + event, socket);
-
-    IntervalEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    IntervalEvents.removeListener(event, listener);
-  };
-}
+var _0x41f2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x74\x65\x72\x76\x61\x6C\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x41f2[0];const IntervalEvents=require(_0x41f2[1]);var events=[_0x41f2[2],_0x41f2[3]];exports[_0x41f2[4]]= function(_0xcf9bx3){for(var _0xcf9bx4=0,_0xcf9bx5=events[_0x41f2[5]];_0xcf9bx4< _0xcf9bx5;_0xcf9bx4++){var _0xcf9bx6=events[_0xcf9bx4];var _0xcf9bx7=createListener(_0x41f2[6]+ _0xcf9bx6,_0xcf9bx3);IntervalEvents[_0x41f2[7]](_0xcf9bx6,_0xcf9bx7);_0xcf9bx3[_0x41f2[7]](_0x41f2[8],removeListener(_0xcf9bx6,_0xcf9bx7))}};function createListener(_0xcf9bx6,_0xcf9bx3){return function(_0xcf9bx9){_0xcf9bx3[_0x41f2[9]](_0xcf9bx6,_0xcf9bx9)}}function removeListener(_0xcf9bx6,_0xcf9bx7){return function(){IntervalEvents[_0x41f2[10]](_0xcf9bx6,_0xcf9bx7)}}
\ No newline at end of file
diff --git a/server/api/jscripty_project/index.js b/server/api/jscripty_project/index.js
index dba0e5b..e0928b9 100644
--- a/server/api/jscripty_project/index.js
+++ b/server/api/jscripty_project/index.js
@@ -1,33 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./jscripty_project.controller');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-
-router.get('/', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin', 'agent']), controller.index);
-router.get('/:id', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.show);
-router.get('/:id/download', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin', 'agent']), controller.download);
-router.get('/:id/sessions', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.showSessions);
-router.get('/:id/sessions/:sessionId', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.showSession);
-router.get('/:id/questions/:questionId/detail', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.showQuestionDetail);
-router.get('/:id/questions', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.showQuestions);
-router.get('/:id/questions/summary', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.showSummary);
-router.get('/:id/inputs', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.showInputs);
-// router.get('/:id/questions/:questionId/otherOption', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.showOther);
-router.get('/:id/questions/detail', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.showDetail);
-router.post('/', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.create);
-router.post('/:id/sessions', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin', 'agent']), controller.createSession);
-router.post('/:id/sessions/:sessionId/questions', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin', 'agent']), controller.createQuestions);
-router.put('/:id', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.update);
-router.put('/:id/sessions/:sessionId', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin', 'agent']), controller.updateSession);
-router.delete('/:id/sessions/:sessionId', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.destroySession);
-router.delete('/', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.bulkDestroy);
-router.delete('/:id', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.destroy);
-
-
-
-module.exports = router;
+var _0x526a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4A\x73\x63\x72\x69\x70\x74\x79","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x2F\x3A\x69\x64\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x53\x65\x73\x73\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73\x2F\x3A\x73\x65\x73\x73\x69\x6F\x6E\x49\x64","\x73\x68\x6F\x77\x53\x65\x73\x73\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73\x2F\x3A\x71\x75\x65\x73\x74\x69\x6F\x6E\x49\x64\x2F\x64\x65\x74\x61\x69\x6C","\x73\x68\x6F\x77\x51\x75\x65\x73\x74\x69\x6F\x6E\x44\x65\x74\x61\x69\x6C","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x51\x75\x65\x73\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73\x2F\x73\x75\x6D\x6D\x61\x72\x79","\x73\x68\x6F\x77\x53\x75\x6D\x6D\x61\x72\x79","\x2F\x3A\x69\x64\x2F\x69\x6E\x70\x75\x74\x73","\x73\x68\x6F\x77\x49\x6E\x70\x75\x74\x73","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73\x2F\x64\x65\x74\x61\x69\x6C","\x73\x68\x6F\x77\x44\x65\x74\x61\x69\x6C","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65\x53\x65\x73\x73\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73\x2F\x3A\x73\x65\x73\x73\x69\x6F\x6E\x49\x64\x2F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x51\x75\x65\x73\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x53\x65\x73\x73\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x53\x65\x73\x73\x69\x6F\x6E","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x526a[0];var express=require(_0x526a[1]);var auth=require(_0x526a[2]);var controller=require(_0x526a[3]);var license=require(_0x526a[4]);var router=express.Router();router[_0x526a[13]](_0x526a[5],license[_0x526a[6]](),license[_0x526a[7]](),auth[_0x526a[8]](),auth[_0x526a[11]]([15],[_0x526a[9],_0x526a[10]]),controller[_0x526a[12]]);router[_0x526a[13]](_0x526a[14],license[_0x526a[6]](),license[_0x526a[7]](),auth[_0x526a[8]](),auth[_0x526a[11]]([15],[_0x526a[9]]),controller[_0x526a[15]]);router[_0x526a[13]](_0x526a[16],license[_0x526a[6]](),license[_0x526a[7]](),auth[_0x526a[8]](),auth[_0x526a[11]]([15],[_0x526a[9],_0x526a[10]]),controller[_0x526a[17]]);router[_0x526a[13]](_0x526a[18],license[_0x526a[6]](),license[_0x526a[7]](),auth[_0x526a[8]](),auth[_0x526a[11]]([15],[_0x526a[9]]),controller[_0x526a[19]]);router[_0x526a[13]](_0x526a[20],license[_0x526a[6]](),license[_0x526a[7]](),auth[_0x526a[8]](),auth[_0x526a[11]]([15],[_0x526a[9]]),controller[_0x526a[21]]);router[_0x526a[13]](_0x526a[22],license[_0x526a[6]](),license[_0x526a[7]](),auth[_0x526a[8]](),auth[_0x526a[11]]([15],[_0x526a[9]]),controller[_0x526a[23]]);router[_0x526a[13]](_0x526a[24],license[_0x526a[6]](),license[_0x526a[7]](),auth[_0x526a[8]](),auth[_0x526a[11]]([15],[_0x526a[9]]),controller[_0x526a[25]]);router[_0x526a[13]](_0x526a[26],license[_0x526a[6]](),license[_0x526a[7]](),auth[_0x526a[8]](),auth[_0x526a[11]]([15],[_0x526a[9]]),controller[_0x526a[27]]);router[_0x526a[13]](_0x526a[28],license[_0x526a[6]](),license[_0x526a[7]](),auth[_0x526a[8]](),auth[_0x526a[11]]([15],[_0x526a[9]]),controller[_0x526a[29]]);router[_0x526a[13]](_0x526a[30],license[_0x526a[6]](),license[_0x526a[7]](),auth[_0x526a[8]](),auth[_0x526a[11]]([15],[_0x526a[9]]),controller[_0x526a[31]]);router[_0x526a[33]](_0x526a[5],license[_0x526a[6]](),license[_0x526a[7]](),auth[_0x526a[8]](),auth[_0x526a[11]]([15],[_0x526a[9]]),controller[_0x526a[32]]);router[_0x526a[33]](_0x526a[18],license[_0x526a[6]](),license[_0x526a[7]](),auth[_0x526a[8]](),auth[_0x526a[11]]([15],[_0x526a[9],_0x526a[10]]),controller[_0x526a[34]]);router[_0x526a[33]](_0x526a[35],license[_0x526a[6]](),license[_0x526a[7]](),auth[_0x526a[8]](),auth[_0x526a[11]]([15],[_0x526a[9],_0x526a[10]]),controller[_0x526a[36]]);router[_0x526a[38]](_0x526a[14],license[_0x526a[6]](),license[_0x526a[7]](),auth[_0x526a[8]](),auth[_0x526a[11]]([15],[_0x526a[9]]),controller[_0x526a[37]]);router[_0x526a[38]](_0x526a[20],license[_0x526a[6]](),license[_0x526a[7]](),auth[_0x526a[8]](),auth[_0x526a[11]]([15],[_0x526a[9],_0x526a[10]]),controller[_0x526a[39]]);router[_0x526a[41]](_0x526a[20],license[_0x526a[6]](),license[_0x526a[7]](),auth[_0x526a[8]](),auth[_0x526a[11]]([15],[_0x526a[9]]),controller[_0x526a[40]]);router[_0x526a[41]](_0x526a[5],license[_0x526a[6]](),license[_0x526a[7]](),auth[_0x526a[8]](),auth[_0x526a[11]]([15],[_0x526a[9]]),controller[_0x526a[42]]);router[_0x526a[41]](_0x526a[14],license[_0x526a[6]](),license[_0x526a[7]](),auth[_0x526a[8]](),auth[_0x526a[11]]([15],[_0x526a[9]]),controller[_0x526a[43]]);module[_0x526a[44]]= router
\ No newline at end of file
diff --git a/server/api/jscripty_project/jscripty_project.controller.js b/server/api/jscripty_project/jscripty_project.controller.js
index 662f2f9..4b1ca3a 100644
--- a/server/api/jscripty_project/jscripty_project.controller.js
+++ b/server/api/jscripty_project/jscripty_project.controller.js
@@ -1,1026 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/jscripty/projects              ->  index
- * POST    /api/jscripty/projects              ->  create
- * GET     /api/jscripty/projects/:id          ->  show
- * PUT     /api/jscripty/projects/:id          ->  update
- * DELETE  /api/jscripty/projects/:id          ->  destroy
- */
-
-'use strict';
-var xml = require('xml2js');
-
-var _ = require('lodash');
-
-var JscriptyProject = require('../../models').JscriptyProject;
-var Util = require('../../config/util');
-var sequelize = require('../../models').sequelize;
-var ReportJscriptySession = require('../../models').ReportJscriptySession;
-var ReportJscriptyQuestion = require('../../models').ReportJscriptyQuestion;
-var ReportJscriptyInput = require('../../models').ReportJscriptyInput;
-var Promise = require('bluebird');
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of JscriptyProjects
-
-exports.index = function(req, res, next) {
-  return JscriptyProject
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.show = function(req, res) {
-  return JscriptyProject
-    .findById(req.params.id)
-    .then(function(jscripty_project) {
-      if (!jscripty_project) {
-        return res.sendStatus(404);
-      }
-      return res.send(jscripty_project);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Gets a all ReportJscriptySession from the DB
-exports.showSessions = function(req, res) {
-    return ReportJscriptySession
-      .scope({
-        method: ['sessions', req.params.id]
-      })
-      .findAndCountAll(Util.getQuery(req.query))
-      .then(handleEntityNotFound(res))
-      .then(responseWithResult(res))
-      .catch(function(err) {
-        console.log(err);
-        return handleError(res, err);
-      });
-  }
-  // Gets a one ReportJscriptySession from the DB
-exports.showSession = function(req, res) {
-    return ReportJscriptySession
-      .find({
-        where: {
-          projectId: req.params.id,
-          session_id: req.params.sessionId
-        },
-        include: [{
-          model: ReportJscriptyQuestion,
-          include: [{
-            model: ReportJscriptyInput
-          }]
-        }]
-
-      })
-      .then(handleEntityNotFound(res))
-      .then(responseWithResult(res))
-      .catch(function(err) {
-        console.log(err);
-        return handleError(res, err);
-      });
-  }
-  // exports.showOther = function(req, res) {
-  //   return ReportJscriptyQuestion
-  //     .scope({
-  //       method: ['otherOption', req.params.id, req.params.questionId]
-  //     })
-  //     .findAndCountAll(Util.getQuery(req.query))
-  //     .then(handleEntityNotFound(res))
-  //     .then(responseWithResult(res))
-  //     .catch(function(err) {
-  //       console.log(err);
-  //       return handleError(res, err);
-  //     });
-  // }
-exports.showInputs = function(req, res) {
-  var inputs = {
-    count: 0,
-    rows: []
-  };
-  return ReportJscriptySession
-    .scope({
-      method: ['inputs', req.params.id]
-    })
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(response) {
-      _.forEach(response.rows, function(session) {
-        var session_id = session.session_id;
-        _.forEach(session.ReportJscriptyQuestions, function(question) {
-          var question_id = question.question_id;
-          var question_type = question.question_type;
-          var question_label = question.question_label;
-          var question_text = question.question_text;
-          _.forEach(question.ReportJscriptyInputs, function(input) {
-            inputs.rows.push({
-              session_id: session_id,
-              question_type: question_type,
-              question_id: question_id,
-              question_label: question_label,
-              question_text: question_text,
-              input_label: input.input_label,
-              input_value: input.input_value
-            })
-          })
-        })
-      })
-      inputs.count = inputs.rows.length;
-      return inputs;
-    })
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-}
-
-// Gets a all ReportJscriptyQuestion from the DB
-exports.showQuestions = function(req, res) {
-  return ReportJscriptyQuestion
-    .findAll({
-      where: {
-        projectId: req.params.id
-      },
-      include: [{
-        model: ReportJscriptyInput
-      }],
-
-    })
-    .then(function(jscripty_questions) {
-      if (!jscripty_questions) {
-        return res.sendStatus(404);
-      }
-      return res.status(200).send(jscripty_questions);
-    })
-    .then(handleEntityNotFound(res))
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-}
-
-
-// Gets summary of ReportJscriptyQuestion from the DB
-
-exports.showSummary = function(req, res) {
-  return ReportJscriptyQuestion
-    .scope({
-      method: ['summary', req.params.id]
-    })
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(handleEntityNotFound(res))
-    .then(function(jscripty_summary) {
-      return res.status(200).send(jscripty_summary);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-
-}
-
-exports.showQuestionDetail = function(req, res) {
-  var temp = {};
-  var jscripty_questions;
-  var total = 0;
-  return ReportJscriptyQuestion
-    .find({
-      where: {
-        projectId: req.params.id,
-        question_id: req.params.questionId
-      },
-      attributes: ['question_type']
-    })
-    .then(function(jscripty_question) {
-      if (!jscripty_question) {
-        return res.sendStatus(404);
-      }
-      // jscripty_questions = jscripty_question;
-      if (jscripty_question.dataValues.question_type == 'input') {
-        return ReportJscriptyQuestion
-          .findAll({
-            where: {
-              projectId: req.params.id,
-              question_id: req.params.questionId
-            },
-            attributes: ['question_type', 'question_id', 'question_label', 'question_text'],
-            include: [{
-              model: ReportJscriptyInput,
-              where: {
-                $or: [{
-                  input_type: 'checkbox',
-                  input_value: '1'
-                }, {
-                  input_type: {
-                    $ne: 'checkbox'
-                  },
-                  input_value: {
-                    $ne: null
-                  }
-                }]
-              },
-              attributes: ['input_label', 'input_value', 'input_type', [sequelize.fn('count', sequelize.col('input_label')),
-                'count'
-              ]]
-            }],
-            group: ['question_id', 'input_label']
-
-          })
-          .then(function(jscripty_question) {
-            jscripty_questions = jscripty_question;
-            return ReportJscriptyQuestion
-              .findAll({
-                where: {
-                  projectId: req.params.id,
-                  question_id: req.params.questionId,
-                  question_type: 'input'
-                },
-                attributes: ['question_id', [sequelize.fn('count', sequelize.col('question_id')),
-                  'count'
-                ]],
-                group: ['question_id']
-              })
-          })
-
-        .then(function(question_count) {
-            total = question_count[0].dataValues.count;
-
-            if (jscripty_questions) {
-              var grouped = _.groupBy(jscripty_questions, 'question_id');
-              _.forEach(grouped, function(value, id) {
-                var answers_count = [];
-                var graphData = [];
-                var graphLabels = [];
-                var graphType = 'bar';
-                _.forEach(value, function(element) {
-                  if (element.ReportJscriptyInputs) {
-                    _.forEach(element.ReportJscriptyInputs, function(input) {
-                      answers_count.push({
-                        checkbox: true,
-                        value: input.input_label,
-                        count: input.dataValues.count
-                      })
-
-                    })
-                  }
-                });
-                var tempGraphdata = [];
-                for (var i = 0; i < answers_count.length; i++) {
-                  tempGraphdata[i] = answers_count[i].count;
-                  graphLabels[i] = answers_count[i].value;
-                  answers_count[i].percentage = total ? (answers_count[i].count / total) * 100 : 0;
-                }
-                graphData[0] = tempGraphdata;
-                temp = {
-                  total: total,
-                  question_type: _.last(value).question_type,
-                  question_id: _.last(value).question_id,
-                  question_label: _.last(value).question_label,
-                  question_text: _.last(value).question_text,
-                  choices: answers_count,
-                  graphData: graphData,
-                  graphLabels: graphLabels,
-                  graphType: graphType
-                };
-              });
-            }
-
-            return ReportJscriptyQuestion
-              .findAll({
-                where: {
-                  projectId: req.params.id,
-                  question_id: req.params.questionId,
-                  question_type: 'input'
-                },
-                attributes: ['question_type', 'question_id', 'question_label', 'question_text'],
-                include: [{
-                  model: ReportJscriptyInput,
-                  attributes: ['input_label']
-                }]
-              })
-
-          })
-          .then(function(inputs) {
-            var input_labels = [];
-            if (inputs) {
-              var grouped = _.groupBy(inputs, 'question_id');
-              _.forEach(grouped, function(question, id) {
-                var allLabels = [];
-                _.forEach(question, function(item) {
-                  allLabels = _.union(allLabels, _.map(item.ReportJscriptyInputs, 'input_label'));
-                });
-                input_labels.push({
-                  question_id: _.last(question).question_id,
-                  labels: allLabels
-                });
-              })
-              _.forEach(input_labels, function(element) {
-                if (Object.keys(temp).length) {
-                  _.forEach(element.labels, function(label) {
-                    var input_label = _.find(temp.choices, {
-                      value: label
-                    });
-                    if (!input_label) {
-                      temp.choices.push({
-                        value: label,
-                        count: 0,
-                        percentage: 0
-                      })
-                      temp.graphData[0].push(0);
-                      temp.graphLabels.push(label);
-                    }
-                  });
-                } else {
-                  var answers_count = [];
-                  var graphData = [];
-                  var tempGraphdata = [];
-                  var graphLabels = [];
-                  _.forEach(element.labels, function(label) {
-                    answers_count.push({
-                      value: label,
-                      count: 0,
-                      percentage: 0
-                    })
-                    tempGraphdata.push(0);
-                    graphLabels.push(label);
-
-                  });
-                  graphData.push(tempGraphdata);
-                  var input = inputs[0];
-                  temp = {
-                    total: total,
-                    question_type: input.question_type,
-                    question_id: input.question_id,
-                    question_label: input.question_label,
-                    question_text: input.question_text,
-                    choices: answers_count,
-                    graphType: 'bar',
-                    graphData: graphData,
-                    graphLabels: graphLabels
-
-                  };
-                }
-              })
-            }
-            return res.status(201).send(temp);
-
-          })
-
-      } else if (jscripty_question.dataValues.question_type == 'question') {
-
-        return ReportJscriptyQuestion
-          .findAll({
-            where: {
-              projectId: req.params.id,
-              question_id: req.params.questionId
-            },
-            attributes: ['question_type', 'question_id', 'question_label', 'question_text', 'question_options', 'question_answer', [sequelize.fn('count', sequelize.col('question_answer')),
-              'count'
-            ]],
-            group: ['question_id', 'question_answer']
-
-          })
-          .then(function(jscripty_question) {
-
-            jscripty_questions = jscripty_question;
-            return ReportJscriptyQuestion
-              .findAll({
-                where: {
-                  projectId: req.params.id,
-                  question_id: req.params.questionId,
-                  question_type: 'question',
-                  question_other_answer: {
-                    $ne: null
-                  }
-                },
-                attributes: ['question_type', 'question_id', 'question_label', 'question_options', 'question_text', 'question_other_answer', 'question_other_label', [sequelize.fn('count',
-                    sequelize.col(
-                      'question_other_label')),
-                  'count'
-                ]],
-                group: ['question_id', 'question_other_label']
-
-              })
-          })
-          .then(function(response) {
-            if (response) {
-              _.forEach(response, function(element) {
-                jscripty_questions.push(element);
-              })
-            }
-
-            var grouped = _.groupBy(jscripty_questions, 'question_id');
-            _.forEach(grouped, function(value, id) {
-              var answers_count = [];
-              var total = 0;
-              var graphData = [];
-              var graphLabels = [];
-              var graphType = 'pie';
-              _.forEach(value, function(element) {
-
-                if (element.question_answer) {
-                  answers_count.push({
-                    value: element.question_answer,
-                    count: element.dataValues.count
-                  })
-                  total = total + element.dataValues.count;
-
-                }
-                if (element.question_other_answer) {
-                  answers_count.push({
-                    other_option: true,
-                    value: element.question_other_label,
-                    count: element.dataValues.count
-                  })
-                }
-
-              });
-              var question_options = _.last(value).question_options ? JSON.parse(_.last(value).question_options) : null;
-              if (question_options) {
-                _.forEach(question_options.options, function(option) {
-                  var edge_label = _.find(answers_count, {
-                    value: option
-                  });
-
-                  if (!edge_label) {
-                    answers_count.push({
-                      value: option,
-                      count: 0,
-                      percentage: 0
-                    });
-
-                  }
-                });
-              }
-              var tempGraphdata = [];
-              var input_type = false
-              for (var i = 0; i < answers_count.length; i++) {
-                if (!answers_count[i].other_option) {
-                  graphData[i] = answers_count[i].count;
-                  graphLabels[i] = answers_count[i].value;
-                  answers_count[i].percentage = total ? (answers_count[i].count / total) * 100 : 0;
-                }
-              }
-
-              temp = {
-                total: total,
-                question_type: _.last(value).question_type,
-                question_id: _.last(value).question_id,
-                question_label: _.last(value).question_label,
-                question_text: _.last(value).question_text,
-                choices: answers_count,
-                graphData: graphData,
-                graphLabels: graphLabels,
-                graphType: graphType
-              };
-            });
-            return res.status(201).send(temp);
-          })
-      } else {
-        console.log('question type not recognized');
-        return res.sendStatus(404);
-      }
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-}
-
-// Gets detail of ReportJscriptyQuestion from the DB
-exports.showDetail = function(req, res) {
-    var temp_questions;
-    var jscripty_questions;
-    var temp_inputs;
-    var question_count;
-
-    return ReportJscriptyQuestion
-      .findAll({
-
-        where: {
-          projectId: req.params.id,
-          question_type: 'question'
-        },
-        attributes: ['question_type', 'question_id', 'question_label', 'question_text', 'question_answer', 'question_options', 'question_other_label', [sequelize.fn('count', sequelize.col(
-            'question_answer')),
-          'count'
-        ]],
-        group: ['question_id', 'question_answer']
-
-      })
-      .then(function(response) {
-        jscripty_questions = response;
-        return ReportJscriptyQuestion
-          .findAll({
-            where: {
-              projectId: req.params.id,
-              question_type: 'question',
-              question_other_answer: {
-                $ne: null
-              }
-            },
-            attributes: ['question_type', 'question_id', 'question_label', 'question_text', 'question_other_answer', 'question_other_label', 'question_options', [sequelize.fn('count', sequelize.col(
-                'question_other_answer')),
-              'count'
-            ]],
-            group: ['question_id', 'question_other_answer']
-
-            // attributes: ['question_type', 'question_id', 'question_label', 'question_text', 'question_other_answer', 'question_other_label', 'question_options', [sequelize.fn('count', sequelize.col(
-            //     'question_other_label')),
-            //   'count'
-            // ]],
-            // group: ['question_id', 'question_other_label']
-
-          })
-      })
-      .then(function(response) {
-        _.forEach(response, function(element) {
-          jscripty_questions.push(element);
-        })
-        var temp = [];
-        var graphType = 'pie';
-
-        var grouped = _.groupBy(jscripty_questions, 'question_id');
-        _.forEach(grouped, function(value, id) {
-          var total = 0;
-          var graphData = [];
-          var graphLabels = [];
-          var answers_count = [];
-
-          _.forEach(value, function(element) {
-            if (element.question_answer) {
-              answers_count.push({
-                value: element.question_answer,
-                count: element.dataValues.count
-              })
-              total = total + element.dataValues.count;
-            }
-            if (element.question_other_answer) {
-              answers_count.push({
-                other_option: true,
-                value: element.question_other_answer,
-                count: element.dataValues.count
-              })
-            }
-
-          });
-          var question_options = JSON.parse(_.last(value).question_options);
-          if (question_options) {
-            _.forEach(question_options.options, function(option) {
-              var edge_label = _.find(answers_count, {
-                value: option
-              });
-              if (!edge_label) {
-                answers_count.push({
-                  value: option,
-                  count: 0,
-                  percentage: 0
-                });
-              }
-            });
-          }
-          for (var i = 0; i < answers_count.length; i++) {
-
-            if (!answers_count[i].other_option && (total != 0)) {
-              answers_count[i].percentage = (answers_count[i].count / total) * 100;
-              graphData.push(answers_count[i].count);
-              graphLabels.push(answers_count[i].value);
-            }
-
-          }
-
-          temp.push({
-            total: total,
-            question_type: _.last(value).question_type,
-            question_id: _.last(value).question_id,
-            question_label: _.last(value).question_label,
-            question_other_label: _.last(value).question_other_label,
-            question_text: _.last(value).question_text,
-            choices: answers_count,
-            graphData: graphData,
-            graphLabels: graphLabels,
-            graphType: graphType
-          })
-
-        });
-        temp_questions = temp;
-        return ReportJscriptyQuestion
-          .findAll({
-            where: {
-              projectId: req.params.id,
-              question_type: 'input'
-            },
-            attributes: ['id', 'question_type', 'question_id', 'question_label', 'question_text', 'question_answer'],
-            include: [{
-              model: ReportJscriptyInput,
-              where: {
-                $or: [{
-                  input_type: 'checkbox',
-                  input_value: '1'
-                }, {
-                  input_type: {
-                    $ne: 'checkbox'
-                  },
-                  input_value: {
-                    $ne: null
-                  }
-                }]
-
-              },
-              attributes: ['input_label', 'input_value', 'input_type', [sequelize.fn('count', sequelize.col('input_label')),
-                'count'
-              ]]
-            }],
-            group: ['question_id', 'input_label']
-          })
-
-      })
-      .then(function(jscripty_question) {
-        jscripty_questions = jscripty_question;
-        return ReportJscriptyQuestion
-          .findAll({
-            where: {
-              projectId: req.params.id,
-              question_type: 'input'
-            },
-            attributes: ['question_id', [sequelize.fn('count', sequelize.col('question_id')),
-              'count'
-            ]],
-            group: ['question_id']
-          })
-      })
-      .then(function(question) {
-        question_count = question;
-        var temp = [];
-        var grouped = _.groupBy(jscripty_questions, 'question_id');
-        _.forEach(grouped, function(value, id) {
-          var answers_count = [];
-          var total = 0;
-          total = _.find(question_count, function(question) {
-            return question.question_id == _.last(value).question_id;
-          }).dataValues.count;
-          var graphData = [];
-          var graphData2 = [];
-          var graphLabels = [];
-          var graphType = 'bar';
-          _.forEach(value, function(element) {
-            var elemt = element;
-            _.forEach(elemt.ReportJscriptyInputs, function(input) {
-              answers_count.push({
-                checkbox: true,
-                value: input.input_label,
-                count: input.dataValues.count
-              })
-            })
-          });
-          var tempGraphdata = [];
-          for (var i = 0; i < answers_count.length; i++) {
-            tempGraphdata[i] = answers_count[i].count;
-            answers_count[i].percentage = (answers_count[i].count / total) * 100;
-            graphLabels[i] = answers_count[i].value;
-          }
-          graphData[0] = tempGraphdata;
-          temp_questions.push({
-            total: total,
-            question_type: _.last(value).question_type,
-            question_id: _.last(value).question_id,
-            question_label: _.last(value).question_label,
-            question_text: _.last(value).question_text,
-            choices: answers_count,
-            graphData: graphData,
-            graphLabels: graphLabels,
-            graphType: graphType
-          })
-        });
-        return ReportJscriptyQuestion
-          .findAll({
-            where: {
-              projectId: req.params.id,
-              question_type: 'input'
-            },
-            attributes: ['id', 'question_id', 'question_label', 'question_text', 'question_type'],
-            include: [{
-              model: ReportJscriptyInput,
-              attributes: ['input_label']
-            }],
-          })
-      })
-      .then(function(inputs) {
-        var grouped = _.groupBy(inputs, 'question_id');
-        var labels = [];
-        _.forEach(grouped, function(question, id) {
-          var allLabels = [];
-          _.forEach(question, function(item) {
-            allLabels = _.union(allLabels, _.map(item.ReportJscriptyInputs, 'input_label'));
-          });
-          labels.push({
-            question_text: _.last(question).question_text,
-            question_type: _.last(question).question_type,
-            question_label: _.last(question).question_label,
-            question_id: _.last(question).question_id,
-            labels: allLabels
-          });
-        })
-
-        _.forEach(labels, function(element) {
-          var question = _.find(temp_questions, {
-            'question_id': element.question_id
-          });
-          if (question) {
-            _.forEach(element.labels, function(label) {
-              var input_label = _.find(question.choices, {
-                value: label
-              });
-              if (!input_label) {
-                question.choices.push({
-                  value: label,
-                  count: 0,
-                  percentage: 0
-                });
-                question.graphData[0].push(0);
-                question.graphLabels.push(label);
-              }
-            });
-          } else {
-            var answers_count = [];
-            var graphData = [];
-            var tempGraphdata = [];
-            var graphLabels = [];
-            _.forEach(element.labels, function(label) {
-              answers_count.push({
-                  value: label,
-                  count: 0,
-                  percentage: 0
-                })
-                // tempGraphdata.push(0);
-                // graphLabels.push(label);
-            });
-            // graphData.push(tempGraphdata);
-            var total = _.find(question_count, function(question) {
-              return question.question_id == element.question_id;
-            }).dataValues.count;
-            temp_questions.push({
-              total: total,
-              question_type: element.question_type,
-              question_id: element.question_id,
-              question_label: element.question_label,
-              question_text: element.question_text,
-              choices: answers_count,
-              graphType: 'bar',
-              graphData: graphData,
-              graphLabels: graphLabels
-            })
-          }
-        })
-        return res.status(201).send(temp_questions);
-      })
-
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-    // })
-
-  }
-  // Creates a new JscriptyProject in the DB
-exports.create = function(req, res) {
-  return JscriptyProject
-    .create(req.body)
-    .then(function(jscripty_project) {
-      return res.status(201).send(jscripty_project);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      if (err.fields.name) {
-        err.message = 'Project name already exists';
-        err.translatedMessage = 'MESSAGE_EXIST_PROJECT'
-      }
-      return handleError(res, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new ReportJscriptySession in the DB
-exports.createSession = function(req, res) {
-    return ReportJscriptySession
-      .create(req.body)
-      .then(function(jscripty_session) {
-        return res.status(201).send(jscripty_session);
-      })
-      .catch(function(err) {
-        return handleError(res, err);
-      });
-
-  }
-  // Creates a new ReportJscriptyQuestions in the DB
-exports.createQuestions = function(req, res) {
-    return ReportJscriptyQuestion
-      .destroy({
-        where: {
-          sessionId: req.params.sessionId
-        }
-      })
-      .then(function() {
-        var _promises = [];
-        for (var i = 0; i < req.body.length; i++) {
-          _promises[i] = ReportJscriptyQuestion.create(req.body[i], {
-            include: [{
-              model: ReportJscriptyInput
-            }]
-          })
-        }
-        return Promise
-          .all(_promises);
-      })
-      .then(function(jscripty_question) {
-        return res.sendStatus(201);
-      })
-      .catch(function(err) {
-        return handleError(res, err);
-      });
-  }
-  // Updates an existing JscriptyProject in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return JscriptyProject
-    .findById(req.params.id)
-    .then(function(jscripty_project) {
-      if (!jscripty_project) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(jscripty_project, req.body);
-      return updated.save();
-    })
-    .then(function(jscripty_project) {
-      return res.status(200).send(jscripty_project);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Updates an existing ReportJscriptySession in the DB
-exports.updateSession = function(req, res) {
-  return ReportJscriptySession
-    .findById(req.params.sessionId)
-    .then(function(session) {
-      if (!session) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(session, req.body);
-      return updated.save();
-    })
-    .then(function(jscripty_session) {
-      return res.status(200).send(jscripty_session);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-// Deletes a JscriptyProject from the DB
-exports.destroy = function(req, res) {
-  return JscriptyProject
-    .findById(req.params.id)
-    .then(function(jscripty_project) {
-      if (!jscripty_project) {
-        return res.sendStatus(404);
-      }
-      return jscripty_project.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-exports.destroySession = function(req, res) {
-  return ReportJscriptySession
-    .find({
-      where: {
-        session_id: req.params.sessionId
-      }
-    })
-    .then(function(session) {
-      if (!session) {
-        return res.sendStatus(404);
-      }
-      return session.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a jscripty_project from the DB.
-exports.bulkDestroy = function(req, res) {
-  return JscriptyProject
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-exports.download = function(req, res, next) {
-  return JscriptyProject
-    .findById(req.params.id)
-    .then(function(jscripty_project) {
-      if (!jscripty_project) {
-        return res.sendStatus(404);
-      }
-      // console.log(req.query.filename);
-      res.set({
-        "Content-Disposition": "attachment; filename=\"" + req.query.filename +
-          ".xml\"",
-        "Content-Type": "txt/xml"
-      });
-      return res.send(jscripty_project.production);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// exports.projectJson = function(req, res, next) {
-//   JscriptyProject
-//     .findById(req.params.id)
-//     .then(function(jscripty_project) {
-//       if (!jscripty_project) {
-//         return res.sendStatus(404);
-//       }
-//
-//       xml.parseString(jscripty_project.production, {
-//         normalizeTags: true,
-//         explicitArray: false
-//       }, function(err, result) {
-//         console.log(result);
-//         return res.status(200).send(result);
-//
-//       });
-//     })
-//     .catch(function(err) {
-//       return handleError(res, err);
-//     });
-// };
+var _0xaf41=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x78\x6D\x6C\x32\x6A\x73","\x6C\x6F\x64\x61\x73\x68","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x52\x65\x70\x6F\x72\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x49\x6E\x70\x75\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x68\x6F\x77\x53\x65\x73\x73\x69\x6F\x6E\x73","\x6C\x6F\x67","\x73\x65\x73\x73\x69\x6F\x6E\x73","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77\x53\x65\x73\x73\x69\x6F\x6E","\x73\x65\x73\x73\x69\x6F\x6E\x49\x64","\x66\x69\x6E\x64","\x73\x68\x6F\x77\x49\x6E\x70\x75\x74\x73","\x72\x6F\x77\x73","\x73\x65\x73\x73\x69\x6F\x6E\x5F\x69\x64","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x69\x64","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x74\x79\x70\x65","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x6C\x61\x62\x65\x6C","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x74\x65\x78\x74","\x69\x6E\x70\x75\x74\x5F\x6C\x61\x62\x65\x6C","\x69\x6E\x70\x75\x74\x5F\x76\x61\x6C\x75\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x63\x6F\x75\x6E\x74","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x70\x75\x74\x73","\x73\x68\x6F\x77\x51\x75\x65\x73\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77\x53\x75\x6D\x6D\x61\x72\x79","\x73\x75\x6D\x6D\x61\x72\x79","\x73\x68\x6F\x77\x51\x75\x65\x73\x74\x69\x6F\x6E\x44\x65\x74\x61\x69\x6C","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x69\x6E\x70\x75\x74","\x67\x72\x6F\x75\x70\x42\x79","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x6C\x61\x73\x74","\x6B\x65\x79\x73","\x6C\x61\x62\x65\x6C\x73","\x63\x68\x6F\x69\x63\x65\x73","\x67\x72\x61\x70\x68\x44\x61\x74\x61","\x67\x72\x61\x70\x68\x4C\x61\x62\x65\x6C\x73","\x62\x61\x72","\x52\x65\x70\x6F\x72\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x49\x6E\x70\x75\x74\x73","\x76\x61\x6C\x75\x65","\x70\x65\x72\x63\x65\x6E\x74\x61\x67\x65","\x71\x75\x65\x73\x74\x69\x6F\x6E\x49\x64","\x63\x6F\x6C","\x66\x6E","\x63\x68\x65\x63\x6B\x62\x6F\x78","\x31","\x69\x6E\x70\x75\x74\x5F\x74\x79\x70\x65","\x71\x75\x65\x73\x74\x69\x6F\x6E","\x70\x69\x65","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x61\x6E\x73\x77\x65\x72","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x6F\x74\x68\x65\x72\x5F\x61\x6E\x73\x77\x65\x72","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x6F\x74\x68\x65\x72\x5F\x6C\x61\x62\x65\x6C","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x6F\x70\x74\x69\x6F\x6E\x73","\x70\x61\x72\x73\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6F\x74\x68\x65\x72\x5F\x6F\x70\x74\x69\x6F\x6E","\x71\x75\x65\x73\x74\x69\x6F\x6E\x20\x74\x79\x70\x65\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x73\x68\x6F\x77\x44\x65\x74\x61\x69\x6C","\x63\x72\x65\x61\x74\x65","\x6E\x61\x6D\x65","\x66\x69\x65\x6C\x64\x73","\x6D\x65\x73\x73\x61\x67\x65","\x50\x72\x6F\x6A\x65\x63\x74\x20\x6E\x61\x6D\x65\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74\x73","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x50\x52\x4F\x4A\x45\x43\x54","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x53\x65\x73\x73\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x51\x75\x65\x73\x74\x69\x6F\x6E\x73","\x61\x6C\x6C","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x53\x65\x73\x73\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x53\x65\x73\x73\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3B\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D\x22","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x2E\x78\x6D\x6C\x22","\x74\x78\x74\x2F\x78\x6D\x6C","\x73\x65\x74","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E"];_0xaf41[0];var xml=require(_0xaf41[1]);var _=require(_0xaf41[2]);var JscriptyProject=require(_0xaf41[4])[_0xaf41[3]];var Util=require(_0xaf41[5]);var sequelize=require(_0xaf41[4])[_0xaf41[6]];var ReportJscriptySession=require(_0xaf41[4])[_0xaf41[7]];var ReportJscriptyQuestion=require(_0xaf41[4])[_0xaf41[8]];var ReportJscriptyInput=require(_0xaf41[4])[_0xaf41[9]];var Promise=require(_0xaf41[10]);function handleError(_0x8588xb,_0x8588xc){return _0x8588xb[_0xaf41[12]](500)[_0xaf41[11]](_0x8588xc)}function responseWithResult(_0x8588xb,_0x8588xe){_0x8588xe= _0x8588xe|| 200;return function(_0x8588xf){if(_0x8588xf){_0x8588xb[_0xaf41[12]](_0x8588xe)[_0xaf41[13]](_0x8588xf)}}}function handleEntityNotFound(_0x8588xb){return function(_0x8588xf){if(!_0x8588xf){_0x8588xb[_0xaf41[12]](404)[_0xaf41[14]]();return null};return _0x8588xf}}function saveUpdates(_0x8588x12){return function(_0x8588xf){return _0x8588xf[_0xaf41[16]](_0x8588x12)[_0xaf41[15]](function(_0x8588x13){return _0x8588x13})}}function removeEntity(_0x8588xb){return function(_0x8588xf){if(_0x8588xf){return _0x8588xf[_0xaf41[17]]()[_0xaf41[15]](function(){_0x8588xb[_0xaf41[12]](204)[_0xaf41[14]]()})}}}exports[_0xaf41[18]]= function(_0x8588x15,_0x8588xb,_0x8588x16){return JscriptyProject[_0xaf41[22]](Util[_0xaf41[21]](_0x8588x15[_0xaf41[20]]))[_0xaf41[15]](function(_0x8588x17){_0x8588xb[_0xaf41[12]](200)[_0xaf41[11]](_0x8588x17)})[_0xaf41[19]](function(_0x8588xc){return handleError(_0x8588xb,_0x8588xc)})};exports[_0xaf41[23]]= function(_0x8588x15,_0x8588xb){return JscriptyProject[_0xaf41[27]](_0x8588x15[_0xaf41[26]][_0xaf41[25]])[_0xaf41[15]](function(_0x8588x18){if(!_0x8588x18){return _0x8588xb[_0xaf41[24]](404)};return _0x8588xb[_0xaf41[11]](_0x8588x18)})[_0xaf41[19]](function(_0x8588xc){return handleError(_0x8588xb,_0x8588xc)})};exports[_0xaf41[28]]= function(_0x8588x15,_0x8588xb){return ReportJscriptySession[_0xaf41[31]]({method:[_0xaf41[30],_0x8588x15[_0xaf41[26]][_0xaf41[25]]]})[_0xaf41[22]](Util[_0xaf41[21]](_0x8588x15[_0xaf41[20]]))[_0xaf41[15]](handleEntityNotFound(_0x8588xb))[_0xaf41[15]](responseWithResult(_0x8588xb))[_0xaf41[19]](function(_0x8588xc){console[_0xaf41[29]](_0x8588xc);return handleError(_0x8588xb,_0x8588xc)})};exports[_0xaf41[32]]= function(_0x8588x15,_0x8588xb){return ReportJscriptySession[_0xaf41[34]]({where:{projectId:_0x8588x15[_0xaf41[26]][_0xaf41[25]],session_id:_0x8588x15[_0xaf41[26]][_0xaf41[33]]},include:[{model:ReportJscriptyQuestion,include:[{model:ReportJscriptyInput}]}]})[_0xaf41[15]](handleEntityNotFound(_0x8588xb))[_0xaf41[15]](responseWithResult(_0x8588xb))[_0xaf41[19]](function(_0x8588xc){console[_0xaf41[29]](_0x8588xc);return handleError(_0x8588xb,_0x8588xc)})};exports[_0xaf41[35]]= function(_0x8588x15,_0x8588xb){var _0x8588x19={count:0,rows:[]};return ReportJscriptySession[_0xaf41[31]]({method:[_0xaf41[48],_0x8588x15[_0xaf41[26]][_0xaf41[25]]]})[_0xaf41[22]](Util[_0xaf41[21]](_0x8588x15[_0xaf41[20]]))[_0xaf41[15]](function(_0x8588x1a){_[_0xaf41[45]](_0x8588x1a[_0xaf41[36]],function(_0x8588x1b){var _0x8588x1c=_0x8588x1b[_0xaf41[37]];_[_0xaf41[45]](_0x8588x1b.ReportJscriptyQuestions,function(_0x8588x1d){var _0x8588x1e=_0x8588x1d[_0xaf41[38]];var _0x8588x1f=_0x8588x1d[_0xaf41[39]];var _0x8588x20=_0x8588x1d[_0xaf41[40]];var _0x8588x21=_0x8588x1d[_0xaf41[41]];_[_0xaf41[45]](_0x8588x1d.ReportJscriptyInputs,function(_0x8588x22){_0x8588x19[_0xaf41[36]][_0xaf41[44]]({session_id:_0x8588x1c,question_type:_0x8588x1f,question_id:_0x8588x1e,question_label:_0x8588x20,question_text:_0x8588x21,input_label:_0x8588x22[_0xaf41[42]],input_value:_0x8588x22[_0xaf41[43]]})})})});_0x8588x19[_0xaf41[46]]= _0x8588x19[_0xaf41[36]][_0xaf41[47]];return _0x8588x19})[_0xaf41[15]](handleEntityNotFound(_0x8588xb))[_0xaf41[15]](responseWithResult(_0x8588xb))[_0xaf41[19]](function(_0x8588xc){console[_0xaf41[29]](_0x8588xc);return handleError(_0x8588xb,_0x8588xc)})};exports[_0xaf41[49]]= function(_0x8588x15,_0x8588xb){return ReportJscriptyQuestion[_0xaf41[50]]({where:{projectId:_0x8588x15[_0xaf41[26]][_0xaf41[25]]},include:[{model:ReportJscriptyInput}]})[_0xaf41[15]](function(_0x8588x23){if(!_0x8588x23){return _0x8588xb[_0xaf41[24]](404)};return _0x8588xb[_0xaf41[12]](200)[_0xaf41[11]](_0x8588x23)})[_0xaf41[15]](handleEntityNotFound(_0x8588xb))[_0xaf41[19]](function(_0x8588xc){console[_0xaf41[29]](_0x8588xc);return handleError(_0x8588xb,_0x8588xc)})};exports[_0xaf41[51]]= function(_0x8588x15,_0x8588xb){return ReportJscriptyQuestion[_0xaf41[31]]({method:[_0xaf41[52],_0x8588x15[_0xaf41[26]][_0xaf41[25]]]})[_0xaf41[22]](Util[_0xaf41[21]](_0x8588x15[_0xaf41[20]]))[_0xaf41[15]](handleEntityNotFound(_0x8588xb))[_0xaf41[15]](function(_0x8588x24){return _0x8588xb[_0xaf41[12]](200)[_0xaf41[11]](_0x8588x24)})[_0xaf41[19]](function(_0x8588xc){console[_0xaf41[29]](_0x8588xc);return handleError(_0x8588xb,_0x8588xc)})};exports[_0xaf41[53]]= function(_0x8588x15,_0x8588xb){var _0x8588x25={};var _0x8588x23;var _0x8588x26=0;return ReportJscriptyQuestion[_0xaf41[34]]({where:{projectId:_0x8588x15[_0xaf41[26]][_0xaf41[25]],question_id:_0x8588x15[_0xaf41[26]][_0xaf41[69]]},attributes:[_0xaf41[39]]})[_0xaf41[15]](function(_0x8588x27){if(!_0x8588x27){return _0x8588xb[_0xaf41[24]](404)};if(_0x8588x27[_0xaf41[54]][_0xaf41[39]]== _0xaf41[55]){return ReportJscriptyQuestion[_0xaf41[50]]({where:{projectId:_0x8588x15[_0xaf41[26]][_0xaf41[25]],question_id:_0x8588x15[_0xaf41[26]][_0xaf41[69]]},attributes:[_0xaf41[39],_0xaf41[38],_0xaf41[40],_0xaf41[41]],include:[{model:ReportJscriptyInput,where:{$or:[{input_type:_0xaf41[72],input_value:_0xaf41[73]},{input_type:{$ne:_0xaf41[72]},input_value:{$ne:null}}]},attributes:[_0xaf41[42],_0xaf41[43],_0xaf41[74],[sequelize[_0xaf41[71]](_0xaf41[46],sequelize[_0xaf41[70]](_0xaf41[42])),_0xaf41[46]]]}],group:[_0xaf41[38],_0xaf41[42]]})[_0xaf41[15]](function(_0x8588x27){_0x8588x23= _0x8588x27;return ReportJscriptyQuestion[_0xaf41[50]]({where:{projectId:_0x8588x15[_0xaf41[26]][_0xaf41[25]],question_id:_0x8588x15[_0xaf41[26]][_0xaf41[69]],question_type:_0xaf41[55]},attributes:[_0xaf41[38],[sequelize[_0xaf41[71]](_0xaf41[46],sequelize[_0xaf41[70]](_0xaf41[38])),_0xaf41[46]]],group:[_0xaf41[38]]})})[_0xaf41[15]](function(_0x8588x34){_0x8588x26= _0x8588x34[0][_0xaf41[54]][_0xaf41[46]];if(_0x8588x23){var _0x8588x29=_[_0xaf41[56]](_0x8588x23,_0xaf41[38]);_[_0xaf41[45]](_0x8588x29,function(_0x8588x35,_0x8588x2a){var _0x8588x30=[];var _0x8588x31=[];var _0x8588x33=[];var _0x8588x36=_0xaf41[65];_[_0xaf41[45]](_0x8588x35,function(_0x8588x2d){if(_0x8588x2d[_0xaf41[66]]){_[_0xaf41[45]](_0x8588x2d.ReportJscriptyInputs,function(_0x8588x22){_0x8588x30[_0xaf41[44]]({checkbox:true,value:_0x8588x22[_0xaf41[42]],count:_0x8588x22[_0xaf41[54]][_0xaf41[46]]})})}});var _0x8588x32=[];for(var _0x8588x37=0;_0x8588x37< _0x8588x30[_0xaf41[47]];_0x8588x37++){_0x8588x32[_0x8588x37]= _0x8588x30[_0x8588x37][_0xaf41[46]];_0x8588x33[_0x8588x37]= _0x8588x30[_0x8588x37][_0xaf41[67]];_0x8588x30[_0x8588x37][_0xaf41[68]]= _0x8588x26?(_0x8588x30[_0x8588x37][_0xaf41[46]]/ _0x8588x26)* 100:0};_0x8588x31[0]= _0x8588x32;_0x8588x25= {total:_0x8588x26,question_type:_[_0xaf41[59]](_0x8588x35)[_0xaf41[39]],question_id:_[_0xaf41[59]](_0x8588x35)[_0xaf41[38]],question_label:_[_0xaf41[59]](_0x8588x35)[_0xaf41[40]],question_text:_[_0xaf41[59]](_0x8588x35)[_0xaf41[41]],choices:_0x8588x30,graphData:_0x8588x31,graphLabels:_0x8588x33,graphType:_0x8588x36}})};return ReportJscriptyQuestion[_0xaf41[50]]({where:{projectId:_0x8588x15[_0xaf41[26]][_0xaf41[25]],question_id:_0x8588x15[_0xaf41[26]][_0xaf41[69]],question_type:_0xaf41[55]},attributes:[_0xaf41[39],_0xaf41[38],_0xaf41[40],_0xaf41[41]],include:[{model:ReportJscriptyInput,attributes:[_0xaf41[42]]}]})})[_0xaf41[15]](function(_0x8588x19){var _0x8588x28=[];if(_0x8588x19){var _0x8588x29=_[_0xaf41[56]](_0x8588x19,_0xaf41[38]);_[_0xaf41[45]](_0x8588x29,function(_0x8588x1d,_0x8588x2a){var _0x8588x2b=[];_[_0xaf41[45]](_0x8588x1d,function(_0x8588x2c){_0x8588x2b= _[_0xaf41[58]](_0x8588x2b,_[_0xaf41[57]](_0x8588x2c.ReportJscriptyInputs,_0xaf41[42]))});_0x8588x28[_0xaf41[44]]({question_id:_[_0xaf41[59]](_0x8588x1d)[_0xaf41[38]],labels:_0x8588x2b})});_[_0xaf41[45]](_0x8588x28,function(_0x8588x2d){if(Object[_0xaf41[60]](_0x8588x25)[_0xaf41[47]]){_[_0xaf41[45]](_0x8588x2d[_0xaf41[61]],function(_0x8588x2e){var _0x8588x2f=_[_0xaf41[34]](_0x8588x25[_0xaf41[62]],{value:_0x8588x2e});if(!_0x8588x2f){_0x8588x25[_0xaf41[62]][_0xaf41[44]]({value:_0x8588x2e,count:0,percentage:0});_0x8588x25[_0xaf41[63]][0][_0xaf41[44]](0);_0x8588x25[_0xaf41[64]][_0xaf41[44]](_0x8588x2e)}})}else {var _0x8588x30=[];var _0x8588x31=[];var _0x8588x32=[];var _0x8588x33=[];_[_0xaf41[45]](_0x8588x2d[_0xaf41[61]],function(_0x8588x2e){_0x8588x30[_0xaf41[44]]({value:_0x8588x2e,count:0,percentage:0});_0x8588x32[_0xaf41[44]](0);_0x8588x33[_0xaf41[44]](_0x8588x2e)});_0x8588x31[_0xaf41[44]](_0x8588x32);var _0x8588x22=_0x8588x19[0];_0x8588x25= {total:_0x8588x26,question_type:_0x8588x22[_0xaf41[39]],question_id:_0x8588x22[_0xaf41[38]],question_label:_0x8588x22[_0xaf41[40]],question_text:_0x8588x22[_0xaf41[41]],choices:_0x8588x30,graphType:_0xaf41[65],graphData:_0x8588x31,graphLabels:_0x8588x33}}})};return _0x8588xb[_0xaf41[12]](201)[_0xaf41[11]](_0x8588x25)})}else {if(_0x8588x27[_0xaf41[54]][_0xaf41[39]]== _0xaf41[75]){return ReportJscriptyQuestion[_0xaf41[50]]({where:{projectId:_0x8588x15[_0xaf41[26]][_0xaf41[25]],question_id:_0x8588x15[_0xaf41[26]][_0xaf41[69]]},attributes:[_0xaf41[39],_0xaf41[38],_0xaf41[40],_0xaf41[41],_0xaf41[80],_0xaf41[77],[sequelize[_0xaf41[71]](_0xaf41[46],sequelize[_0xaf41[70]](_0xaf41[77])),_0xaf41[46]]],group:[_0xaf41[38],_0xaf41[77]]})[_0xaf41[15]](function(_0x8588x27){_0x8588x23= _0x8588x27;return ReportJscriptyQuestion[_0xaf41[50]]({where:{projectId:_0x8588x15[_0xaf41[26]][_0xaf41[25]],question_id:_0x8588x15[_0xaf41[26]][_0xaf41[69]],question_type:_0xaf41[75],question_other_answer:{$ne:null}},attributes:[_0xaf41[39],_0xaf41[38],_0xaf41[40],_0xaf41[80],_0xaf41[41],_0xaf41[78],_0xaf41[79],[sequelize[_0xaf41[71]](_0xaf41[46],sequelize[_0xaf41[70]](_0xaf41[79])),_0xaf41[46]]],group:[_0xaf41[38],_0xaf41[79]]})})[_0xaf41[15]](function(_0x8588x1a){if(_0x8588x1a){_[_0xaf41[45]](_0x8588x1a,function(_0x8588x2d){_0x8588x23[_0xaf41[44]](_0x8588x2d)})};var _0x8588x29=_[_0xaf41[56]](_0x8588x23,_0xaf41[38]);_[_0xaf41[45]](_0x8588x29,function(_0x8588x35,_0x8588x2a){var _0x8588x30=[];var _0x8588x26=0;var _0x8588x31=[];var _0x8588x33=[];var _0x8588x36=_0xaf41[76];_[_0xaf41[45]](_0x8588x35,function(_0x8588x2d){if(_0x8588x2d[_0xaf41[77]]){_0x8588x30[_0xaf41[44]]({value:_0x8588x2d[_0xaf41[77]],count:_0x8588x2d[_0xaf41[54]][_0xaf41[46]]});_0x8588x26= _0x8588x26+ _0x8588x2d[_0xaf41[54]][_0xaf41[46]]};if(_0x8588x2d[_0xaf41[78]]){_0x8588x30[_0xaf41[44]]({other_option:true,value:_0x8588x2d[_0xaf41[79]],count:_0x8588x2d[_0xaf41[54]][_0xaf41[46]]})}});var _0x8588x38=_[_0xaf41[59]](_0x8588x35)[_0xaf41[80]]?JSON[_0xaf41[81]](_[_0xaf41[59]](_0x8588x35)[_0xaf41[80]]):null;if(_0x8588x38){_[_0xaf41[45]](_0x8588x38[_0xaf41[82]],function(_0x8588x39){var _0x8588x3a=_[_0xaf41[34]](_0x8588x30,{value:_0x8588x39});if(!_0x8588x3a){_0x8588x30[_0xaf41[44]]({value:_0x8588x39,count:0,percentage:0})}})};var _0x8588x32=[];var _0x8588x3b=false;for(var _0x8588x37=0;_0x8588x37< _0x8588x30[_0xaf41[47]];_0x8588x37++){if(!_0x8588x30[_0x8588x37][_0xaf41[83]]){_0x8588x31[_0x8588x37]= _0x8588x30[_0x8588x37][_0xaf41[46]];_0x8588x33[_0x8588x37]= _0x8588x30[_0x8588x37][_0xaf41[67]];_0x8588x30[_0x8588x37][_0xaf41[68]]= _0x8588x26?(_0x8588x30[_0x8588x37][_0xaf41[46]]/ _0x8588x26)* 100:0}};_0x8588x25= {total:_0x8588x26,question_type:_[_0xaf41[59]](_0x8588x35)[_0xaf41[39]],question_id:_[_0xaf41[59]](_0x8588x35)[_0xaf41[38]],question_label:_[_0xaf41[59]](_0x8588x35)[_0xaf41[40]],question_text:_[_0xaf41[59]](_0x8588x35)[_0xaf41[41]],choices:_0x8588x30,graphData:_0x8588x31,graphLabels:_0x8588x33,graphType:_0x8588x36}});return _0x8588xb[_0xaf41[12]](201)[_0xaf41[11]](_0x8588x25)})}else {console[_0xaf41[29]](_0xaf41[84]);return _0x8588xb[_0xaf41[24]](404)}}})[_0xaf41[19]](function(_0x8588xc){console[_0xaf41[29]](_0x8588xc);return handleError(_0x8588xb,_0x8588xc)})};exports[_0xaf41[85]]= function(_0x8588x15,_0x8588xb){var _0x8588x3c;var _0x8588x23;var _0x8588x3d;var _0x8588x34;return ReportJscriptyQuestion[_0xaf41[50]]({where:{projectId:_0x8588x15[_0xaf41[26]][_0xaf41[25]],question_type:_0xaf41[75]},attributes:[_0xaf41[39],_0xaf41[38],_0xaf41[40],_0xaf41[41],_0xaf41[77],_0xaf41[80],_0xaf41[79],[sequelize[_0xaf41[71]](_0xaf41[46],sequelize[_0xaf41[70]](_0xaf41[77])),_0xaf41[46]]],group:[_0xaf41[38],_0xaf41[77]]})[_0xaf41[15]](function(_0x8588x1a){_0x8588x23= _0x8588x1a;return ReportJscriptyQuestion[_0xaf41[50]]({where:{projectId:_0x8588x15[_0xaf41[26]][_0xaf41[25]],question_type:_0xaf41[75],question_other_answer:{$ne:null}},attributes:[_0xaf41[39],_0xaf41[38],_0xaf41[40],_0xaf41[41],_0xaf41[78],_0xaf41[79],_0xaf41[80],[sequelize[_0xaf41[71]](_0xaf41[46],sequelize[_0xaf41[70]](_0xaf41[78])),_0xaf41[46]]],group:[_0xaf41[38],_0xaf41[78]]})})[_0xaf41[15]](function(_0x8588x1a){_[_0xaf41[45]](_0x8588x1a,function(_0x8588x2d){_0x8588x23[_0xaf41[44]](_0x8588x2d)});var _0x8588x25=[];var _0x8588x36=_0xaf41[76];var _0x8588x29=_[_0xaf41[56]](_0x8588x23,_0xaf41[38]);_[_0xaf41[45]](_0x8588x29,function(_0x8588x35,_0x8588x2a){var _0x8588x26=0;var _0x8588x31=[];var _0x8588x33=[];var _0x8588x30=[];_[_0xaf41[45]](_0x8588x35,function(_0x8588x2d){if(_0x8588x2d[_0xaf41[77]]){_0x8588x30[_0xaf41[44]]({value:_0x8588x2d[_0xaf41[77]],count:_0x8588x2d[_0xaf41[54]][_0xaf41[46]]});_0x8588x26= _0x8588x26+ _0x8588x2d[_0xaf41[54]][_0xaf41[46]]};if(_0x8588x2d[_0xaf41[78]]){_0x8588x30[_0xaf41[44]]({other_option:true,value:_0x8588x2d[_0xaf41[78]],count:_0x8588x2d[_0xaf41[54]][_0xaf41[46]]})}});var _0x8588x38=JSON[_0xaf41[81]](_[_0xaf41[59]](_0x8588x35)[_0xaf41[80]]);if(_0x8588x38){_[_0xaf41[45]](_0x8588x38[_0xaf41[82]],function(_0x8588x39){var _0x8588x3a=_[_0xaf41[34]](_0x8588x30,{value:_0x8588x39});if(!_0x8588x3a){_0x8588x30[_0xaf41[44]]({value:_0x8588x39,count:0,percentage:0})}})};for(var _0x8588x37=0;_0x8588x37< _0x8588x30[_0xaf41[47]];_0x8588x37++){if(!_0x8588x30[_0x8588x37][_0xaf41[83]]&& (_0x8588x26!= 0)){_0x8588x30[_0x8588x37][_0xaf41[68]]= (_0x8588x30[_0x8588x37][_0xaf41[46]]/ _0x8588x26)* 100;_0x8588x31[_0xaf41[44]](_0x8588x30[_0x8588x37][_0xaf41[46]]);_0x8588x33[_0xaf41[44]](_0x8588x30[_0x8588x37][_0xaf41[67]])}};_0x8588x25[_0xaf41[44]]({total:_0x8588x26,question_type:_[_0xaf41[59]](_0x8588x35)[_0xaf41[39]],question_id:_[_0xaf41[59]](_0x8588x35)[_0xaf41[38]],question_label:_[_0xaf41[59]](_0x8588x35)[_0xaf41[40]],question_other_label:_[_0xaf41[59]](_0x8588x35)[_0xaf41[79]],question_text:_[_0xaf41[59]](_0x8588x35)[_0xaf41[41]],choices:_0x8588x30,graphData:_0x8588x31,graphLabels:_0x8588x33,graphType:_0x8588x36})});_0x8588x3c= _0x8588x25;return ReportJscriptyQuestion[_0xaf41[50]]({where:{projectId:_0x8588x15[_0xaf41[26]][_0xaf41[25]],question_type:_0xaf41[55]},attributes:[_0xaf41[25],_0xaf41[39],_0xaf41[38],_0xaf41[40],_0xaf41[41],_0xaf41[77]],include:[{model:ReportJscriptyInput,where:{$or:[{input_type:_0xaf41[72],input_value:_0xaf41[73]},{input_type:{$ne:_0xaf41[72]},input_value:{$ne:null}}]},attributes:[_0xaf41[42],_0xaf41[43],_0xaf41[74],[sequelize[_0xaf41[71]](_0xaf41[46],sequelize[_0xaf41[70]](_0xaf41[42])),_0xaf41[46]]]}],group:[_0xaf41[38],_0xaf41[42]]})})[_0xaf41[15]](function(_0x8588x27){_0x8588x23= _0x8588x27;return ReportJscriptyQuestion[_0xaf41[50]]({where:{projectId:_0x8588x15[_0xaf41[26]][_0xaf41[25]],question_type:_0xaf41[55]},attributes:[_0xaf41[38],[sequelize[_0xaf41[71]](_0xaf41[46],sequelize[_0xaf41[70]](_0xaf41[38])),_0xaf41[46]]],group:[_0xaf41[38]]})})[_0xaf41[15]](function(_0x8588x1d){_0x8588x34= _0x8588x1d;var _0x8588x25=[];var _0x8588x29=_[_0xaf41[56]](_0x8588x23,_0xaf41[38]);_[_0xaf41[45]](_0x8588x29,function(_0x8588x35,_0x8588x2a){var _0x8588x30=[];var _0x8588x26=0;_0x8588x26= _[_0xaf41[34]](_0x8588x34,function(_0x8588x1d){return _0x8588x1d[_0xaf41[38]]== _[_0xaf41[59]](_0x8588x35)[_0xaf41[38]]})[_0xaf41[54]][_0xaf41[46]];var _0x8588x31=[];var _0x8588x3f=[];var _0x8588x33=[];var _0x8588x36=_0xaf41[65];_[_0xaf41[45]](_0x8588x35,function(_0x8588x2d){var _0x8588x40=_0x8588x2d;_[_0xaf41[45]](_0x8588x40.ReportJscriptyInputs,function(_0x8588x22){_0x8588x30[_0xaf41[44]]({checkbox:true,value:_0x8588x22[_0xaf41[42]],count:_0x8588x22[_0xaf41[54]][_0xaf41[46]]})})});var _0x8588x32=[];for(var _0x8588x37=0;_0x8588x37< _0x8588x30[_0xaf41[47]];_0x8588x37++){_0x8588x32[_0x8588x37]= _0x8588x30[_0x8588x37][_0xaf41[46]];_0x8588x30[_0x8588x37][_0xaf41[68]]= (_0x8588x30[_0x8588x37][_0xaf41[46]]/ _0x8588x26)* 100;_0x8588x33[_0x8588x37]= _0x8588x30[_0x8588x37][_0xaf41[67]]};_0x8588x31[0]= _0x8588x32;_0x8588x3c[_0xaf41[44]]({total:_0x8588x26,question_type:_[_0xaf41[59]](_0x8588x35)[_0xaf41[39]],question_id:_[_0xaf41[59]](_0x8588x35)[_0xaf41[38]],question_label:_[_0xaf41[59]](_0x8588x35)[_0xaf41[40]],question_text:_[_0xaf41[59]](_0x8588x35)[_0xaf41[41]],choices:_0x8588x30,graphData:_0x8588x31,graphLabels:_0x8588x33,graphType:_0x8588x36})});return ReportJscriptyQuestion[_0xaf41[50]]({where:{projectId:_0x8588x15[_0xaf41[26]][_0xaf41[25]],question_type:_0xaf41[55]},attributes:[_0xaf41[25],_0xaf41[38],_0xaf41[40],_0xaf41[41],_0xaf41[39]],include:[{model:ReportJscriptyInput,attributes:[_0xaf41[42]]}]})})[_0xaf41[15]](function(_0x8588x19){var _0x8588x29=_[_0xaf41[56]](_0x8588x19,_0xaf41[38]);var _0x8588x3e=[];_[_0xaf41[45]](_0x8588x29,function(_0x8588x1d,_0x8588x2a){var _0x8588x2b=[];_[_0xaf41[45]](_0x8588x1d,function(_0x8588x2c){_0x8588x2b= _[_0xaf41[58]](_0x8588x2b,_[_0xaf41[57]](_0x8588x2c.ReportJscriptyInputs,_0xaf41[42]))});_0x8588x3e[_0xaf41[44]]({question_text:_[_0xaf41[59]](_0x8588x1d)[_0xaf41[41]],question_type:_[_0xaf41[59]](_0x8588x1d)[_0xaf41[39]],question_label:_[_0xaf41[59]](_0x8588x1d)[_0xaf41[40]],question_id:_[_0xaf41[59]](_0x8588x1d)[_0xaf41[38]],labels:_0x8588x2b})});_[_0xaf41[45]](_0x8588x3e,function(_0x8588x2d){var _0x8588x1d=_[_0xaf41[34]](_0x8588x3c,{"\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x69\x64":_0x8588x2d[_0xaf41[38]]});if(_0x8588x1d){_[_0xaf41[45]](_0x8588x2d[_0xaf41[61]],function(_0x8588x2e){var _0x8588x2f=_[_0xaf41[34]](_0x8588x1d[_0xaf41[62]],{value:_0x8588x2e});if(!_0x8588x2f){_0x8588x1d[_0xaf41[62]][_0xaf41[44]]({value:_0x8588x2e,count:0,percentage:0});_0x8588x1d[_0xaf41[63]][0][_0xaf41[44]](0);_0x8588x1d[_0xaf41[64]][_0xaf41[44]](_0x8588x2e)}})}else {var _0x8588x30=[];var _0x8588x31=[];var _0x8588x32=[];var _0x8588x33=[];_[_0xaf41[45]](_0x8588x2d[_0xaf41[61]],function(_0x8588x2e){_0x8588x30[_0xaf41[44]]({value:_0x8588x2e,count:0,percentage:0})});var _0x8588x26=_[_0xaf41[34]](_0x8588x34,function(_0x8588x1d){return _0x8588x1d[_0xaf41[38]]== _0x8588x2d[_0xaf41[38]]})[_0xaf41[54]][_0xaf41[46]];_0x8588x3c[_0xaf41[44]]({total:_0x8588x26,question_type:_0x8588x2d[_0xaf41[39]],question_id:_0x8588x2d[_0xaf41[38]],question_label:_0x8588x2d[_0xaf41[40]],question_text:_0x8588x2d[_0xaf41[41]],choices:_0x8588x30,graphType:_0xaf41[65],graphData:_0x8588x31,graphLabels:_0x8588x33})}});return _0x8588xb[_0xaf41[12]](201)[_0xaf41[11]](_0x8588x3c)})[_0xaf41[19]](function(_0x8588xc){console[_0xaf41[29]](_0x8588xc);return handleError(_0x8588xb,_0x8588xc)})};exports[_0xaf41[86]]= function(_0x8588x15,_0x8588xb){return JscriptyProject[_0xaf41[86]](_0x8588x15[_0xaf41[93]])[_0xaf41[15]](function(_0x8588x18){return _0x8588xb[_0xaf41[12]](201)[_0xaf41[11]](_0x8588x18)})[_0xaf41[19]](sequelize.UniqueConstraintError,function(_0x8588xc){if(_0x8588xc[_0xaf41[88]][_0xaf41[87]]){_0x8588xc[_0xaf41[89]]= _0xaf41[90];_0x8588xc[_0xaf41[91]]= _0xaf41[92]};return handleError(_0x8588xb,_0x8588xc)})[_0xaf41[19]](function(_0x8588xc){return handleError(_0x8588xb,_0x8588xc)})};exports[_0xaf41[94]]= function(_0x8588x15,_0x8588xb){return ReportJscriptySession[_0xaf41[86]](_0x8588x15[_0xaf41[93]])[_0xaf41[15]](function(_0x8588x41){return _0x8588xb[_0xaf41[12]](201)[_0xaf41[11]](_0x8588x41)})[_0xaf41[19]](function(_0x8588xc){return handleError(_0x8588xb,_0x8588xc)})};exports[_0xaf41[95]]= function(_0x8588x15,_0x8588xb){return ReportJscriptyQuestion[_0xaf41[17]]({where:{sessionId:_0x8588x15[_0xaf41[26]][_0xaf41[33]]}})[_0xaf41[15]](function(){var _0x8588x42=[];for(var _0x8588x37=0;_0x8588x37< _0x8588x15[_0xaf41[93]][_0xaf41[47]];_0x8588x37++){_0x8588x42[_0x8588x37]= ReportJscriptyQuestion[_0xaf41[86]](_0x8588x15[_0xaf41[93]][_0x8588x37],{include:[{model:ReportJscriptyInput}]})};return Promise[_0xaf41[96]](_0x8588x42)})[_0xaf41[15]](function(_0x8588x27){return _0x8588xb[_0xaf41[24]](201)})[_0xaf41[19]](function(_0x8588xc){return handleError(_0x8588xb,_0x8588xc)})};exports[_0xaf41[97]]= function(_0x8588x15,_0x8588xb){if(_0x8588x15[_0xaf41[93]][_0xaf41[25]]){delete _0x8588x15[_0xaf41[93]][_0xaf41[25]]};return JscriptyProject[_0xaf41[27]](_0x8588x15[_0xaf41[26]][_0xaf41[25]])[_0xaf41[15]](function(_0x8588x18){if(!_0x8588x18){return _0x8588xb[_0xaf41[24]](404)};var _0x8588x13=_[_0xaf41[98]](_0x8588x18,_0x8588x15[_0xaf41[93]]);return _0x8588x13[_0xaf41[99]]()})[_0xaf41[15]](function(_0x8588x18){return _0x8588xb[_0xaf41[12]](200)[_0xaf41[11]](_0x8588x18)})[_0xaf41[19]](function(_0x8588xc){return handleError(_0x8588xb,_0x8588xc)})};exports[_0xaf41[100]]= function(_0x8588x15,_0x8588xb){return ReportJscriptySession[_0xaf41[27]](_0x8588x15[_0xaf41[26]][_0xaf41[33]])[_0xaf41[15]](function(_0x8588x1b){if(!_0x8588x1b){return _0x8588xb[_0xaf41[24]](404)};var _0x8588x13=_[_0xaf41[98]](_0x8588x1b,_0x8588x15[_0xaf41[93]]);return _0x8588x13[_0xaf41[99]]()})[_0xaf41[15]](function(_0x8588x41){return _0x8588xb[_0xaf41[12]](200)[_0xaf41[11]](_0x8588x41)})[_0xaf41[19]](function(_0x8588xc){return handleError(_0x8588xb,_0x8588xc)})};exports[_0xaf41[17]]= function(_0x8588x15,_0x8588xb){return JscriptyProject[_0xaf41[27]](_0x8588x15[_0xaf41[26]][_0xaf41[25]])[_0xaf41[15]](function(_0x8588x18){if(!_0x8588x18){return _0x8588xb[_0xaf41[24]](404)};return _0x8588x18[_0xaf41[17]]()})[_0xaf41[15]](function(){return _0x8588xb[_0xaf41[24]](204)})[_0xaf41[19]](function(_0x8588xc){return handleError(_0x8588xb,_0x8588xc)})};exports[_0xaf41[101]]= function(_0x8588x15,_0x8588xb){return ReportJscriptySession[_0xaf41[34]]({where:{session_id:_0x8588x15[_0xaf41[26]][_0xaf41[33]]}})[_0xaf41[15]](function(_0x8588x1b){if(!_0x8588x1b){return _0x8588xb[_0xaf41[24]](404)};return _0x8588x1b[_0xaf41[17]]()})[_0xaf41[15]](function(){return _0x8588xb[_0xaf41[24]](204)})[_0xaf41[19]](function(_0x8588xc){return handleError(_0x8588xb,_0x8588xc)})};exports[_0xaf41[102]]= function(_0x8588x15,_0x8588xb){return JscriptyProject[_0xaf41[17]]({where:{id:_0x8588x15[_0xaf41[20]][_0xaf41[103]]},individualHooks:true})[_0xaf41[15]](function(){return _0x8588xb[_0xaf41[24]](204)})[_0xaf41[19]](function(_0x8588xc){return handleError(_0x8588xb,_0x8588xc)})};exports[_0xaf41[104]]= function(_0x8588x15,_0x8588xb,_0x8588x16){return JscriptyProject[_0xaf41[27]](_0x8588x15[_0xaf41[26]][_0xaf41[25]])[_0xaf41[15]](function(_0x8588x18){if(!_0x8588x18){return _0x8588xb[_0xaf41[24]](404)};_0x8588xb[_0xaf41[109]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E":_0xaf41[105]+ _0x8588x15[_0xaf41[20]][_0xaf41[106]]+ _0xaf41[107],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xaf41[108]});return _0x8588xb[_0xaf41[11]](_0x8588x18[_0xaf41[110]])})[_0xaf41[19]](function(_0x8588xc){return handleError(_0x8588xb,_0x8588xc)})}
\ No newline at end of file
diff --git a/server/api/jscripty_project/jscripty_project.events.js b/server/api/jscripty_project/jscripty_project.events.js
index fe91bd8..7d1a30a 100644
--- a/server/api/jscripty_project/jscripty_project.events.js
+++ b/server/api/jscripty_project/jscripty_project.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const JscriptyProject = require('../../models').JscriptyProject;
-
-var JscriptyProjectEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-JscriptyProjectEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  JscriptyProject.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    JscriptyProjectEvents.emit(event + ':' + doc._id, doc);
-    JscriptyProjectEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = JscriptyProjectEvents;
+var _0x7a97=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7a97[0];const EventEmitter=require(_0x7a97[1]);const JscriptyProject=require(_0x7a97[3])[_0x7a97[2]];var JscriptyProjectEvents= new EventEmitter();JscriptyProjectEvents[_0x7a97[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7a97[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7a97[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7a97[6]};for(var e in events){var event=events[e];JscriptyProject[_0x7a97[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xbbcex8,_0xbbcex9,_0xbbcexa){JscriptyProjectEvents[_0x7a97[10]](event+ _0x7a97[8]+ _0xbbcex8[_0x7a97[9]],_0xbbcex8);JscriptyProjectEvents[_0x7a97[10]](event,_0xbbcex8);_0xbbcexa(null)}}module[_0x7a97[11]]= JscriptyProjectEvents
\ No newline at end of file
diff --git a/server/api/jscripty_project/jscripty_project.socket.js b/server/api/jscripty_project/jscripty_project.socket.js
index 9911b1a..152e4f2 100644
--- a/server/api/jscripty_project/jscripty_project.socket.js
+++ b/server/api/jscripty_project/jscripty_project.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const JscriptyProjectEvents = require('./jscripty_project.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('jscripty_project:' + event, socket);
-
-    JscriptyProjectEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    JscriptyProjectEvents.removeListener(event, listener);
-  };
-}
+var _0x5c67=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x5c67[0];const JscriptyProjectEvents=require(_0x5c67[1]);var events=[_0x5c67[2],_0x5c67[3]];exports[_0x5c67[4]]= function(_0x3d38x3){for(var _0x3d38x4=0,_0x3d38x5=events[_0x5c67[5]];_0x3d38x4< _0x3d38x5;_0x3d38x4++){var _0x3d38x6=events[_0x3d38x4];var _0x3d38x7=createListener(_0x5c67[6]+ _0x3d38x6,_0x3d38x3);JscriptyProjectEvents[_0x5c67[7]](_0x3d38x6,_0x3d38x7);_0x3d38x3[_0x5c67[7]](_0x5c67[8],removeListener(_0x3d38x6,_0x3d38x7))}};function createListener(_0x3d38x6,_0x3d38x3){return function(_0x3d38x9){_0x3d38x3[_0x5c67[9]](_0x3d38x6,_0x3d38x9)}}function removeListener(_0x3d38x6,_0x3d38x7){return function(){JscriptyProjectEvents[_0x5c67[10]](_0x3d38x6,_0x3d38x7)}}
\ No newline at end of file
diff --git a/server/api/license/index.js b/server/api/license/index.js
index f0a2983..695c600 100644
--- a/server/api/license/index.js
+++ b/server/api/license/index.js
@@ -1,12 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./license.controller');
-
-var router = express.Router();
-
-router.get('/', controller.index);
-router.post('/request', auth.isAuthenticated(), controller.request);
-
-module.exports = router;
+var _0x7b67=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x72\x65\x71\x75\x65\x73\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x72\x65\x71\x75\x65\x73\x74","\x70\x6F\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7b67[0];var express=require(_0x7b67[1]);var auth=require(_0x7b67[2]);var controller=require(_0x7b67[3]);var router=express.Router();router[_0x7b67[6]](_0x7b67[4],controller[_0x7b67[5]]);router[_0x7b67[10]](_0x7b67[7],auth[_0x7b67[8]](),controller[_0x7b67[9]]);module[_0x7b67[11]]= router
\ No newline at end of file
diff --git a/server/api/license/license.controller.js b/server/api/license/license.controller.js
index a5d47ec..46c22f4 100644
--- a/server/api/license/license.controller.js
+++ b/server/api/license/license.controller.js
@@ -1,135 +1 @@
-'use strict';
-
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/licenses              ->  index
- * POST    /api/licenses              ->  create
- * GET     /api/licenses/:id          ->  show
- * PUT     /api/licenses/:id          ->  update
- * DELETE  /api/licenses/:id          ->  destroy
- */
-
-var _ = require('lodash');
-var crypto = require('crypto');
-var moment = require('moment');
-var rp = require('request-promise');
-
-var config = require('../../config/environment');
-var license = require('../../config/license/license.service');
-var License = require('../../models').License;
-var Setting = require('../../models').Setting;
-
-const expirationTh = 7;
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    console.log(err);
-    res.status(statusCode).send(err);
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      entity = {
-        dataValues: {
-          license: license.demoLicense
-        }
-      };
-
-      entity.dataValues.license.token = license.getUuid();
-      res.status(201).json(entity);
-      return null;
-    }
-
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity
-      .updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity
-        .destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of Licenses
-exports.index = function(req, res, next) {
-  var _settings;
-  var _license;
-
-  return Setting
-    .findById(1)
-    .then(function(settings) {
-      _settings = settings;
-      return License
-        .findById(1);
-    })
-    .then(handleEntityNotFound(res))
-    .then(function(_license) {
-
-      if (!_license) {
-        _license = {};
-      }
-
-      try {
-        if (_license.license) {
-          _license.license = license.decrypt(_license.license, _license.data1);
-          _license.license = JSON.parse(_license.license);
-        } else {
-          _license.license = license.demoLicense;
-        }
-      } catch (err) {
-        console.log('decrypt error', err);
-        _license.license = license.demoLicense;
-      }
-
-      if (_license.data2) {
-        var decipher = crypto.createDecipher('aes-256-ctr', config.session.secret);
-        var dec = decipher.update(_license.data2, 'base64', 'utf8')
-        dec += decipher.final('utf8');
-
-        _license.license.expirationTime = expirationTh - moment().diff(dec, 'days');
-      }
-
-      _license.license.token = _license.data1;
-      _license.license.token2 = license.getUuid();
-      _.merge(_license.dataValues, _settings.dataValues);
-
-      res.status(200).json(_license.dataValues);
-    })
-    .catch(handleError(res));
-}
-
-// Creates a new License in the DB
-exports.request = function(req, res) {
-  return rp({
-      method: 'POST',
-      uri: config.provisioning + '/servers/' + license.getUuid() + '/request',
-      body: req.body,
-      json: true // Automatically stringifies the body to JSON
-    })
-    .then(function(data) {
-      res.status(201).send(data);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return res.status(err.statusCode || 500).send(err);
-    });
-}
+var _0xf596=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x63\x72\x79\x70\x74\x6F","\x6D\x6F\x6D\x65\x6E\x74","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x65\x74\x74\x69\x6E\x67","\x6C\x6F\x67","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x64\x65\x6D\x6F\x4C\x69\x63\x65\x6E\x73\x65","\x74\x6F\x6B\x65\x6E","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x67\x65\x74\x55\x75\x69\x64","\x6A\x73\x6F\x6E","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x64\x61\x74\x61\x31","\x64\x65\x63\x72\x79\x70\x74","\x70\x61\x72\x73\x65","\x64\x65\x63\x72\x79\x70\x74\x20\x65\x72\x72\x6F\x72","\x64\x61\x74\x61\x32","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x73\x65\x63\x72\x65\x74","\x73\x65\x73\x73\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x75\x74\x66\x38","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x61\x6C","\x65\x78\x70\x69\x72\x61\x74\x69\x6F\x6E\x54\x69\x6D\x65","\x64\x61\x79\x73","\x64\x69\x66\x66","\x74\x6F\x6B\x65\x6E\x32","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x65\x71\x75\x65\x73\x74","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x50\x4F\x53\x54","\x70\x72\x6F\x76\x69\x73\x69\x6F\x6E\x69\x6E\x67","\x2F\x73\x65\x72\x76\x65\x72\x73\x2F","\x2F\x72\x65\x71\x75\x65\x73\x74","\x62\x6F\x64\x79"];_0xf596[0];var _=require(_0xf596[1]);var crypto=require(_0xf596[2]);var moment=require(_0xf596[3]);var rp=require(_0xf596[4]);var config=require(_0xf596[5]);var license=require(_0xf596[6]);var License=require(_0xf596[8])[_0xf596[7]];var Setting=require(_0xf596[8])[_0xf596[9]];const expirationTh=7;function handleError(_0x5322xb,_0x5322xc){_0x5322xc= _0x5322xc|| 500;return function(_0x5322xd){console[_0xf596[10]](_0x5322xd);_0x5322xb[_0xf596[12]](_0x5322xc)[_0xf596[11]](_0x5322xd)}}function handleEntityNotFound(_0x5322xb){return function(_0x5322xf){if(!_0x5322xf){_0x5322xf= {dataValues:{license:license[_0xf596[13]]}};_0x5322xf[_0xf596[16]][_0xf596[15]][_0xf596[14]]= license[_0xf596[17]]();_0x5322xb[_0xf596[12]](201)[_0xf596[18]](_0x5322xf);return null};return _0x5322xf}}function saveUpdates(_0x5322x11){return function(_0x5322xf){return _0x5322xf[_0xf596[20]](_0x5322x11)[_0xf596[19]](function(_0x5322x12){return _0x5322x12})}}function removeEntity(_0x5322xb){return function(_0x5322xf){if(_0x5322xf){return _0x5322xf[_0xf596[22]]()[_0xf596[19]](function(){_0x5322xb[_0xf596[12]](204)[_0xf596[21]]()})}}}exports[_0xf596[23]]= function(_0x5322x14,_0x5322xb,_0x5322x15){var _0x5322x16;var _0x5322x17;return Setting[_0xf596[43]](1)[_0xf596[19]](function(_0x5322x1a){_0x5322x16= _0x5322x1a;return License[_0xf596[43]](1)})[_0xf596[19]](handleEntityNotFound(_0x5322xb))[_0xf596[19]](function(_0x5322x17){if(!_0x5322x17){_0x5322x17= {}};try{if(_0x5322x17[_0xf596[15]]){_0x5322x17[_0xf596[15]]= license[_0xf596[26]](_0x5322x17[_0xf596[15]],_0x5322x17[_0xf596[25]]);_0x5322x17[_0xf596[15]]= JSON[_0xf596[27]](_0x5322x17[_0xf596[15]])}else {_0x5322x17[_0xf596[15]]= license[_0xf596[13]]}}catch(err){console[_0xf596[10]](_0xf596[28],err);_0x5322x17[_0xf596[15]]= license[_0xf596[13]]};if(_0x5322x17[_0xf596[29]]){var _0x5322x18=crypto[_0xf596[33]](_0xf596[30],config[_0xf596[32]][_0xf596[31]]);var _0x5322x19=_0x5322x18[_0xf596[36]](_0x5322x17[_0xf596[29]],_0xf596[34],_0xf596[35]);_0x5322x19+= _0x5322x18[_0xf596[37]](_0xf596[35]);_0x5322x17[_0xf596[15]][_0xf596[38]]= expirationTh- moment()[_0xf596[40]](_0x5322x19,_0xf596[39])};_0x5322x17[_0xf596[15]][_0xf596[14]]= _0x5322x17[_0xf596[25]];_0x5322x17[_0xf596[15]][_0xf596[41]]= license[_0xf596[17]]();_[_0xf596[42]](_0x5322x17[_0xf596[16]],_0x5322x16[_0xf596[16]]);_0x5322xb[_0xf596[12]](200)[_0xf596[18]](_0x5322x17[_0xf596[16]])})[_0xf596[24]](handleError(_0x5322xb))};exports[_0xf596[44]]= function(_0x5322x14,_0x5322xb){return rp({method:_0xf596[46],uri:config[_0xf596[47]]+ _0xf596[48]+ license[_0xf596[17]]()+ _0xf596[49],body:_0x5322x14[_0xf596[50]],json:true})[_0xf596[19]](function(_0x5322x1b){_0x5322xb[_0xf596[12]](201)[_0xf596[11]](_0x5322x1b)})[_0xf596[24]](function(_0x5322xd){console[_0xf596[10]](_0x5322xd);return _0x5322xb[_0xf596[12]](_0x5322xd[_0xf596[45]]|| 500)[_0xf596[11]](_0x5322xd)})}
\ No newline at end of file
diff --git a/server/api/list/index.js b/server/api/list/index.js
index 2336f13..fb86f26 100644
--- a/server/api/list/index.js
+++ b/server/api/list/index.js
@@ -1,28 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./list.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.index);
-router.get('/:listId/customfields/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.showCustomField);
-router.get('/:id/customfields', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.getCustomFields);
-router.get('/:id/agents', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.showAgents);
-router.get('/:id/contacts', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.getContacts);
-router.get('/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.show);
-router.post('/', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.create);
-router.post('/:id/agents', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.addAgents);
-router.post('/:id/contacts', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.getContact);
-router.post('/:id/customfields', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.createCustomField);
-router.put('/:listId/customfields/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.updateCustomField);
-router.put('/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.update);
-router.delete('/:id/agents', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.removeAgents);
-router.delete('/', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.destroy);
-router.delete('/:listId/customfields/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.removeCustomField);
-router.delete('/:listId/customfields', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.removeAllCustomFields);
-
-module.exports = router;
+var _0x58c2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6C\x69\x73\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x43\x6D","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x6C\x69\x73\x74\x49\x64\x2F\x63\x75\x73\x74\x6F\x6D\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x77\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x2F\x3A\x69\x64\x2F\x63\x75\x73\x74\x6F\x6D\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74","\x63\x72\x65\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x75\x70\x64\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x70\x75\x74","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x2F\x3A\x6C\x69\x73\x74\x49\x64\x2F\x63\x75\x73\x74\x6F\x6D\x66\x69\x65\x6C\x64\x73","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x58c2[0];var express=require(_0x58c2[1]);var controller=require(_0x58c2[2]);var auth=require(_0x58c2[3]);var license=require(_0x58c2[4]);var router=express.Router();router[_0x58c2[12]](_0x58c2[5],auth[_0x58c2[6]](),license[_0x58c2[7]](),auth[_0x58c2[10]]([5],[_0x58c2[8],_0x58c2[9]]),controller[_0x58c2[11]]);router[_0x58c2[12]](_0x58c2[13],auth[_0x58c2[6]](),license[_0x58c2[7]](),auth[_0x58c2[10]]([5],[_0x58c2[8],_0x58c2[9]]),controller[_0x58c2[14]]);router[_0x58c2[12]](_0x58c2[15],auth[_0x58c2[6]](),license[_0x58c2[7]](),auth[_0x58c2[10]]([5],[_0x58c2[8],_0x58c2[9]]),controller[_0x58c2[16]]);router[_0x58c2[12]](_0x58c2[17],auth[_0x58c2[6]](),license[_0x58c2[7]](),auth[_0x58c2[10]]([5],[_0x58c2[8],_0x58c2[9]]),controller[_0x58c2[18]]);router[_0x58c2[12]](_0x58c2[19],auth[_0x58c2[6]](),license[_0x58c2[7]](),auth[_0x58c2[10]]([5],[_0x58c2[8],_0x58c2[9]]),controller[_0x58c2[20]]);router[_0x58c2[12]](_0x58c2[21],auth[_0x58c2[6]](),license[_0x58c2[7]](),auth[_0x58c2[10]]([5],[_0x58c2[8],_0x58c2[9]]),controller[_0x58c2[22]]);router[_0x58c2[24]](_0x58c2[5],auth[_0x58c2[6]](),license[_0x58c2[7]](),auth[_0x58c2[10]]([5],[_0x58c2[8]]),controller[_0x58c2[23]]);router[_0x58c2[24]](_0x58c2[17],auth[_0x58c2[6]](),license[_0x58c2[7]](),auth[_0x58c2[10]]([5],[_0x58c2[8]]),controller[_0x58c2[25]]);router[_0x58c2[24]](_0x58c2[19],auth[_0x58c2[6]](),license[_0x58c2[7]](),auth[_0x58c2[10]]([5],[_0x58c2[8],_0x58c2[9]]),controller[_0x58c2[26]]);router[_0x58c2[24]](_0x58c2[15],auth[_0x58c2[6]](),license[_0x58c2[7]](),auth[_0x58c2[10]]([5],[_0x58c2[8]]),controller[_0x58c2[27]]);router[_0x58c2[29]](_0x58c2[13],auth[_0x58c2[6]](),license[_0x58c2[7]](),auth[_0x58c2[10]]([5],[_0x58c2[8]]),controller[_0x58c2[28]]);router[_0x58c2[29]](_0x58c2[21],auth[_0x58c2[6]](),license[_0x58c2[7]](),auth[_0x58c2[10]]([5],[_0x58c2[8]]),controller[_0x58c2[30]]);router[_0x58c2[32]](_0x58c2[17],auth[_0x58c2[6]](),license[_0x58c2[7]](),auth[_0x58c2[10]]([5],[_0x58c2[8]]),controller[_0x58c2[31]]);router[_0x58c2[32]](_0x58c2[5],auth[_0x58c2[6]](),license[_0x58c2[7]](),auth[_0x58c2[10]]([5],[_0x58c2[8]]),controller[_0x58c2[33]]);router[_0x58c2[32]](_0x58c2[21],auth[_0x58c2[6]](),license[_0x58c2[7]](),auth[_0x58c2[10]]([5],[_0x58c2[8]]),controller[_0x58c2[34]]);router[_0x58c2[32]](_0x58c2[13],auth[_0x58c2[6]](),license[_0x58c2[7]](),auth[_0x58c2[10]]([5],[_0x58c2[8]]),controller[_0x58c2[35]]);router[_0x58c2[32]](_0x58c2[36],auth[_0x58c2[6]](),license[_0x58c2[7]](),auth[_0x58c2[10]]([5],[_0x58c2[8]]),controller[_0x58c2[37]]);module[_0x58c2[38]]= router
\ No newline at end of file
diff --git a/server/api/list/list.controller.js b/server/api/list/list.controller.js
index 18caabc..c57d7bb 100644
--- a/server/api/list/list.controller.js
+++ b/server/api/list/list.controller.js
@@ -1,463 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-
-var User = require('../../models').User;
-var List = require('../../models').List;
-var UserHasList = require('../../models').UserHasList;
-var CustomField = require('../../models').CustomField;
-var Contact = require('../../models').Contact;
-var Util = require('../../config/util');
-var sequelize = require('../../models').sequelize;
-
-// Get list of lists
-exports.index = function(req, res, next) {
-  switch (req.user.role) {
-    case 'agent':
-      return User
-        .findById(req.user.id)
-        .then(function(agent) {
-          return agent.getLists();
-        })
-        .then(function(lists) {
-          var agentLists = _.map(lists, 'id');
-          return List
-            .scope('customFields')
-            .findAndCountAll(_.merge(Util.getQuery(req.query, {
-              $or: [{
-                defaultEntry: true
-              }, {
-                id: agentLists
-              }]
-            }), {
-              distinct: true
-            }));
-        })
-        .then(function(result) {
-          res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    default:
-      return List
-        .scope('customFields')
-        .findAndCountAll(_.merge(Util.getQuery(req.query), {
-          distinct: true
-        }))
-        .then(function(result) {
-          res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-  }
-
-};
-
-// Get all custom_fields
-exports.getCustomFields = function(req, res) {
-  return CustomField
-    .findAndCountAll({
-      where: {
-        ListId: req.params.id
-      }
-    })
-    .then(function(customFields) {
-      return res.status(200).send(customFields);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Get all custom_fields
-exports.getContact = function(req, res) {
-  var where = _.merge(req.body, {
-    ListId: req.params.id
-  });
-
-  return Contact
-    .findOrCreate({
-      where: where,
-      default: req.body
-    })
-    .spread(function(contact) {
-      return res.status(200).send(contact);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getContacts = function(req, res) {
-  var _baseQuery = {
-    where: {
-      ListId: req.params.id,
-    },
-    attributes: ['phone', 'mobile', 'fax', 'email']
-  };
-
-  _.forIn(req.query, function(value, key) {
-    _baseQuery.where[key] = {
-      $like: '%' + value + '%'
-    };
-  });
-
-  return Contact
-    .findAll(_baseQuery)
-    .then(function(contacts) {
-      return res.status(200).send({
-        rows: contacts,
-        length: contacts.length
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.showCustomField = function(req, res) {
-  return CustomField
-    .findById(req.params.id)
-    .then(function(customField) {
-      if (!customField) {
-        return res.sendStatus(404);
-      }
-      return res.status(200).send(customField);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.updateCustomField = function(req, res) {
-  return CustomField
-    .findById(req.params.id)
-    .then(function(customField) {
-      if (!customField) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(customField, req.body);
-      return updated.save();
-    })
-    .then(function(customField) {
-      return res.status(200).send(customField);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.createCustomField = function(req, res) {
-  var _customField;
-  req.body.ListId = req.params.id;
-  return sequelize.transaction(function(t) {
-      return CustomField
-        .create(req.body)
-        .then(function(customField) {
-          _customField = customField;
-          customField.name = 'cf_' + customField.id;
-          return customField.save();
-        })
-        .then(function() {
-          return sequelize.query(util.format('ALTER TABLE cm_contacts ADD COLUMN %s VARCHAR(255)', _customField.name));
-        })
-        .then(function() {
-          return res.sendStatus(201);
-        })
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single list
-exports.show = function(req, res) {
-  return List
-    .findById(req.params.id)
-    .then(function(list) {
-      if (!list) {
-        return res.sendStatus(404);
-      }
-      return res.send(list);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new list in the DB.
-exports.create = function(req, res) {
-  return sequelize.transaction(function(t) {
-      return List
-        .create(req.body)
-        .then(function(list) {
-          return res.status(201).send(list);
-        })
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      err.translatedMessage = 'MESSAGE_EXIST_LIST';
-      err.message = 'The list name already exists';
-      return res.status(500).send(err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing list in the DB.
-exports.update = function(req, res) {
-  return List
-    .findById(req.params.id)
-    .then(function(list) {
-      if (!list) {
-        return res.sendStatus(404);
-      }
-      if (req.body.id) {
-        delete req.body.id;
-      }
-      var updated = _.merge(list, req.body);
-      return updated.save();
-    })
-    .then(function(list) {
-      return res.status(200).send(list);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      err.translatedMessage = 'MESSAGE_EXIST_LIST';
-      err.message = 'The list name already exists';
-      return res.status(500).send(err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.showAgents = function(req, res) {
-  return List
-    .findById(req.params.id)
-    .then(function(list) {
-      if (!list) {
-        return res.sendStatus(404);
-      }
-      return list
-        .getUsers({
-          where: {
-            role: 'agent'
-          },
-          attributes: ['id', 'name', 'fullname', 'email']
-        });
-    })
-    .then(function(agents) {
-      return res.status(200).send({
-        rows: agents,
-        count: agents.length
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing user_has_list in the DB.
-exports.addAgents = function(req, res, next) {
-  return User
-    .findAll({
-      where: {
-        id: req.body.agents
-      }
-    })
-    .then(function(users) {
-      var userHasLists = _.map(users, function(user) {
-        return {
-          list: req.params.id,
-          membername: user.name,
-          UserId: user.id
-        };
-      });
-
-      return UserHasList
-        .bulkCreate(userHasLists, {
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return next(err);
-    });
-};
-
-exports.removeAgents = function(req, res, next) {
-  return UserHasList
-    .destroy({
-      where: {
-        UserId: req.query.agents,
-        list: req.params.id
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(202);
-    })
-    .catch(function(err) {
-      return next(err);
-    });
-};
-
-// Deletes a list from the DB.
-exports.destroy = function(req, res) {
-  return destroyList(req.params.id, res);
-};
-
-// Deletes multiple lists from the DB.
-exports.bulkDestroy = function(req, res) { //add the check for associated contacts
-  return destroyList(req.query.id, res);
-};
-
-function destroyList(id, res) {
-  return delCf(id, res)
-    .all()
-    .then(function() {
-      return List.destroy({
-        where: {
-          id: id
-        },
-        individualHooks: true
-      });
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-}
-
-function delCf(id, res) {
-  var _cfs;
-  return CustomField.findAll({
-      where: {
-        ListId: id
-      }
-    })
-    .then(function(cfs) {
-      if (!cfs) {
-        return res.sendStatus(404);
-      }
-      _cfs = cfs;
-      return CustomField
-        .destroy({
-          where: {
-            id: id
-          }
-        });
-    })
-    .then(function() {
-      return Contact
-        .describe();
-    })
-    .then(function(tableFields) {
-      return _.keys(tableFields);
-    })
-    .then(function(fields) {
-      var bulkDel = [];
-      _.forEach(_cfs, function(elem) {
-        if (_.includes(fields, elem.name)) {
-          bulkDel.push(sequelize.query(util.format('ALTER TABLE cm_contacts DROP COLUMN %s', elem.name)));
-        }
-      });
-      return bulkDel;
-    })
-}
-
-exports.removeCustomField = function(req, res) {
-  var _cf;
-  return CustomField
-    .findById(req.params.id)
-    .then(function(cf) {
-      if (!cf) {
-        return res.sendStatus(404);
-      }
-      _cf = cf;
-      return CustomField
-        .destroy({
-          where: {
-            id: req.params.id
-          }
-        });
-    })
-    .then(function() {
-      return Contact
-        .describe();
-    })
-    .then(function(tableFields) {
-      return _.keys(tableFields);
-    })
-    .then(function(fields) {
-      if (_.includes(fields, _cf.name)) {
-        return sequelize.query(util.format('ALTER TABLE cm_contacts DROP COLUMN %s', _cf.name));
-      }
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.removeAllCustomFields = function(req, res) {
-  var _cfs;
-  return CustomField
-    .findAll({
-      where: {
-        id: req.query.ids
-      }
-    })
-    .then(function(cfs) {
-      if (!cfs) {
-        return res.sendStatus(404);
-      }
-      _cfs = cfs;
-      return CustomField
-        .destroy({
-          where: {
-            id: req.query.ids
-          }
-        });
-    })
-    .then(function() {
-      return Contact
-        .describe();
-    })
-    .then(function(tableFields) {
-      return _.keys(tableFields);
-    })
-    .then(function(fields) {
-      var bulkDel = [];
-      _cfs.forEach(function(elem) {
-        if (_.includes(fields, elem.name)) {
-          bulkDel.push(sequelize.query(util.format('ALTER TABLE cm_contacts DROP COLUMN %s', elem.name)));
-        }
-      });
-      return bulkDel;
-    })
-    .all()
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xc469=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4C\x69\x73\x74","\x55\x73\x65\x72\x48\x61\x73\x4C\x69\x73\x74","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x69\x64","\x6D\x61\x70","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\x67\x65\x74\x4C\x69\x73\x74\x73","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x67\x65\x74\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x6C\x6F\x67","\x70\x61\x72\x61\x6D\x73","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74","\x62\x6F\x64\x79","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x70\x68\x6F\x6E\x65","\x6D\x6F\x62\x69\x6C\x65","\x66\x61\x78","\x65\x6D\x61\x69\x6C","\x77\x68\x65\x72\x65","\x25","\x66\x6F\x72\x49\x6E","\x6C\x65\x6E\x67\x74\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x73\x61\x76\x65","\x63\x72\x65\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x4C\x69\x73\x74\x49\x64","\x41\x4C\x54\x45\x52\x20\x54\x41\x42\x4C\x45\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x41\x44\x44\x20\x43\x4F\x4C\x55\x4D\x4E\x20\x25\x73\x20\x56\x41\x52\x43\x48\x41\x52\x28\x32\x35\x35\x29","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x63\x66\x5F","\x63\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x68\x6F\x77","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x4C\x49\x53\x54","\x6D\x65\x73\x73\x61\x67\x65","\x54\x68\x65\x20\x6C\x69\x73\x74\x20\x6E\x61\x6D\x65\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74\x73","\x75\x70\x64\x61\x74\x65","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x67\x65\x74\x55\x73\x65\x72\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x61\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x41\x4C\x54\x45\x52\x20\x54\x41\x42\x4C\x45\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x44\x52\x4F\x50\x20\x43\x4F\x4C\x55\x4D\x4E\x20\x25\x73","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x6B\x65\x79\x73","\x64\x65\x73\x63\x72\x69\x62\x65","\x72\x65\x6D\x6F\x76\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x69\x64\x73"];_0xc469[0];var _=require(_0xc469[1]);var util=require(_0xc469[2]);var User=require(_0xc469[4])[_0xc469[3]];var List=require(_0xc469[4])[_0xc469[5]];var UserHasList=require(_0xc469[4])[_0xc469[6]];var CustomField=require(_0xc469[4])[_0xc469[7]];var Contact=require(_0xc469[4])[_0xc469[8]];var Util=require(_0xc469[9]);var sequelize=require(_0xc469[4])[_0xc469[10]];exports[_0xc469[11]]= function(_0x8ad7xa,_0x8ad7xb,_0x8ad7xc){switch(_0x8ad7xa[_0xc469[25]][_0xc469[28]]){case _0xc469[27]:return User[_0xc469[26]](_0x8ad7xa[_0xc469[25]][_0xc469[16]])[_0xc469[15]](function(_0x8ad7x11){return _0x8ad7x11[_0xc469[24]]()})[_0xc469[15]](function(_0x8ad7xf){var _0x8ad7x10=_[_0xc469[17]](_0x8ad7xf,_0xc469[16]);return List[_0xc469[23]](_0xc469[22])[_0xc469[21]](_[_0xc469[20]](Util[_0xc469[19]](_0x8ad7xa[_0xc469[18]],{$or:[{defaultEntry:true},{id:_0x8ad7x10}]}),{distinct:true}))})[_0xc469[15]](function(_0x8ad7xe){_0x8ad7xb[_0xc469[14]](200)[_0xc469[13]](_0x8ad7xe)})[_0xc469[12]](function(_0x8ad7xd){return handleError(_0x8ad7xb,_0x8ad7xd)});default:return List[_0xc469[23]](_0xc469[22])[_0xc469[21]](_[_0xc469[20]](Util[_0xc469[19]](_0x8ad7xa[_0xc469[18]]),{distinct:true}))[_0xc469[15]](function(_0x8ad7xe){_0x8ad7xb[_0xc469[14]](200)[_0xc469[13]](_0x8ad7xe)})[_0xc469[12]](function(_0x8ad7xd){return handleError(_0x8ad7xb,_0x8ad7xd)})}};exports[_0xc469[29]]= function(_0x8ad7xa,_0x8ad7xb){return CustomField[_0xc469[21]]({where:{ListId:_0x8ad7xa[_0xc469[31]][_0xc469[16]]}})[_0xc469[15]](function(_0x8ad7x12){return _0x8ad7xb[_0xc469[14]](200)[_0xc469[13]](_0x8ad7x12)})[_0xc469[12]](function(_0x8ad7xd){console[_0xc469[30]](_0x8ad7xd);return handleError(_0x8ad7xb,_0x8ad7xd)})};exports[_0xc469[32]]= function(_0x8ad7xa,_0x8ad7xb){var _0x8ad7x13=_[_0xc469[20]](_0x8ad7xa[_0xc469[33]],{ListId:_0x8ad7xa[_0xc469[31]][_0xc469[16]]});return Contact[_0xc469[35]]({where:_0x8ad7x13,default:_0x8ad7xa[_0xc469[33]]})[_0xc469[34]](function(_0x8ad7x14){return _0x8ad7xb[_0xc469[14]](200)[_0xc469[13]](_0x8ad7x14)})[_0xc469[12]](function(_0x8ad7xd){return handleError(_0x8ad7xb,_0x8ad7xd)})};exports[_0xc469[36]]= function(_0x8ad7xa,_0x8ad7xb){var _0x8ad7x15={where:{ListId:_0x8ad7xa[_0xc469[31]][_0xc469[16]]},attributes:[_0xc469[37],_0xc469[38],_0xc469[39],_0xc469[40]]};_[_0xc469[43]](_0x8ad7xa[_0xc469[18]],function(_0x8ad7x16,_0x8ad7x17){_0x8ad7x15[_0xc469[41]][_0x8ad7x17]= {$like:_0xc469[42]+ _0x8ad7x16+ _0xc469[42]}});return Contact[_0xc469[45]](_0x8ad7x15)[_0xc469[15]](function(_0x8ad7x18){return _0x8ad7xb[_0xc469[14]](200)[_0xc469[13]]({rows:_0x8ad7x18,length:_0x8ad7x18[_0xc469[44]]})})[_0xc469[12]](function(_0x8ad7xd){return handleError(_0x8ad7xb,_0x8ad7xd)})};exports[_0xc469[46]]= function(_0x8ad7xa,_0x8ad7xb){return CustomField[_0xc469[26]](_0x8ad7xa[_0xc469[31]][_0xc469[16]])[_0xc469[15]](function(_0x8ad7x19){if(!_0x8ad7x19){return _0x8ad7xb[_0xc469[47]](404)};return _0x8ad7xb[_0xc469[14]](200)[_0xc469[13]](_0x8ad7x19)})[_0xc469[12]](function(_0x8ad7xd){return handleError(_0x8ad7xb,_0x8ad7xd)})};exports[_0xc469[48]]= function(_0x8ad7xa,_0x8ad7xb){return CustomField[_0xc469[26]](_0x8ad7xa[_0xc469[31]][_0xc469[16]])[_0xc469[15]](function(_0x8ad7x19){if(!_0x8ad7x19){return _0x8ad7xb[_0xc469[47]](404)};var _0x8ad7x1a=_[_0xc469[20]](_0x8ad7x19,_0x8ad7xa[_0xc469[33]]);return _0x8ad7x1a[_0xc469[49]]()})[_0xc469[15]](function(_0x8ad7x19){return _0x8ad7xb[_0xc469[14]](200)[_0xc469[13]](_0x8ad7x19)})[_0xc469[12]](function(_0x8ad7xd){return handleError(_0x8ad7xb,_0x8ad7xd)})};exports[_0xc469[50]]= function(_0x8ad7xa,_0x8ad7xb){var _0x8ad7x1b;_0x8ad7xa[_0xc469[33]][_0xc469[51]]= _0x8ad7xa[_0xc469[31]][_0xc469[16]];return sequelize[_0xc469[57]](function(_0x8ad7x1c){return CustomField[_0xc469[56]](_0x8ad7xa[_0xc469[33]])[_0xc469[15]](function(_0x8ad7x19){_0x8ad7x1b= _0x8ad7x19;_0x8ad7x19[_0xc469[53]]= _0xc469[55]+ _0x8ad7x19[_0xc469[16]];return _0x8ad7x19[_0xc469[49]]()})[_0xc469[15]](function(){return sequelize[_0xc469[18]](util[_0xc469[54]](_0xc469[52],_0x8ad7x1b[_0xc469[53]]))})[_0xc469[15]](function(){return _0x8ad7xb[_0xc469[47]](201)})})[_0xc469[12]](function(_0x8ad7xd){return handleError(_0x8ad7xb,_0x8ad7xd)})};exports[_0xc469[58]]= function(_0x8ad7xa,_0x8ad7xb){return List[_0xc469[26]](_0x8ad7xa[_0xc469[31]][_0xc469[16]])[_0xc469[15]](function(_0x8ad7x1d){if(!_0x8ad7x1d){return _0x8ad7xb[_0xc469[47]](404)};return _0x8ad7xb[_0xc469[13]](_0x8ad7x1d)})[_0xc469[12]](function(_0x8ad7xd){return handleError(_0x8ad7xb,_0x8ad7xd)})};exports[_0xc469[56]]= function(_0x8ad7xa,_0x8ad7xb){return sequelize[_0xc469[57]](function(_0x8ad7x1c){return List[_0xc469[56]](_0x8ad7xa[_0xc469[33]])[_0xc469[15]](function(_0x8ad7x1d){return _0x8ad7xb[_0xc469[14]](201)[_0xc469[13]](_0x8ad7x1d)})})[_0xc469[12]](sequelize.UniqueConstraintError,function(_0x8ad7xd){_0x8ad7xd[_0xc469[59]]= _0xc469[60];_0x8ad7xd[_0xc469[61]]= _0xc469[62];return _0x8ad7xb[_0xc469[14]](500)[_0xc469[13]](_0x8ad7xd)})[_0xc469[12]](function(_0x8ad7xd){return handleError(_0x8ad7xb,_0x8ad7xd)})};exports[_0xc469[63]]= function(_0x8ad7xa,_0x8ad7xb){return List[_0xc469[26]](_0x8ad7xa[_0xc469[31]][_0xc469[16]])[_0xc469[15]](function(_0x8ad7x1d){if(!_0x8ad7x1d){return _0x8ad7xb[_0xc469[47]](404)};if(_0x8ad7xa[_0xc469[33]][_0xc469[16]]){delete _0x8ad7xa[_0xc469[33]][_0xc469[16]]};var _0x8ad7x1a=_[_0xc469[20]](_0x8ad7x1d,_0x8ad7xa[_0xc469[33]]);return _0x8ad7x1a[_0xc469[49]]()})[_0xc469[15]](function(_0x8ad7x1d){return _0x8ad7xb[_0xc469[14]](200)[_0xc469[13]](_0x8ad7x1d)})[_0xc469[12]](sequelize.UniqueConstraintError,function(_0x8ad7xd){_0x8ad7xd[_0xc469[59]]= _0xc469[60];_0x8ad7xd[_0xc469[61]]= _0xc469[62];return _0x8ad7xb[_0xc469[14]](500)[_0xc469[13]](_0x8ad7xd)})[_0xc469[12]](function(_0x8ad7xd){return handleError(_0x8ad7xb,_0x8ad7xd)})};exports[_0xc469[64]]= function(_0x8ad7xa,_0x8ad7xb){return List[_0xc469[26]](_0x8ad7xa[_0xc469[31]][_0xc469[16]])[_0xc469[15]](function(_0x8ad7x1d){if(!_0x8ad7x1d){return _0x8ad7xb[_0xc469[47]](404)};return _0x8ad7x1d[_0xc469[66]]({where:{role:_0xc469[27]},attributes:[_0xc469[16],_0xc469[53],_0xc469[65],_0xc469[40]]})})[_0xc469[15]](function(_0x8ad7x1e){return _0x8ad7xb[_0xc469[14]](200)[_0xc469[13]]({rows:_0x8ad7x1e,count:_0x8ad7x1e[_0xc469[44]]})})[_0xc469[12]](function(_0x8ad7xd){return handleError(_0x8ad7xb,_0x8ad7xd)})};exports[_0xc469[67]]= function(_0x8ad7xa,_0x8ad7xb,_0x8ad7xc){return User[_0xc469[45]]({where:{id:_0x8ad7xa[_0xc469[33]][_0xc469[69]]}})[_0xc469[15]](function(_0x8ad7x1f){var _0x8ad7x20=_[_0xc469[17]](_0x8ad7x1f,function(_0x8ad7x21){return {list:_0x8ad7xa[_0xc469[31]][_0xc469[16]],membername:_0x8ad7x21[_0xc469[53]],UserId:_0x8ad7x21[_0xc469[16]]}});return UserHasList[_0xc469[68]](_0x8ad7x20,{individualHooks:true})})[_0xc469[15]](function(){return _0x8ad7xb[_0xc469[47]](200)})[_0xc469[12]](function(_0x8ad7xd){console[_0xc469[30]](_0x8ad7xd);return _0x8ad7xc(_0x8ad7xd)})};exports[_0xc469[70]]= function(_0x8ad7xa,_0x8ad7xb,_0x8ad7xc){return UserHasList[_0xc469[71]]({where:{UserId:_0x8ad7xa[_0xc469[18]][_0xc469[69]],list:_0x8ad7xa[_0xc469[31]][_0xc469[16]]},individualHooks:true})[_0xc469[15]](function(){return _0x8ad7xb[_0xc469[47]](202)})[_0xc469[12]](function(_0x8ad7xd){return _0x8ad7xc(_0x8ad7xd)})};exports[_0xc469[71]]= function(_0x8ad7xa,_0x8ad7xb){return destroyList(_0x8ad7xa[_0xc469[31]][_0xc469[16]],_0x8ad7xb)};exports[_0xc469[72]]= function(_0x8ad7xa,_0x8ad7xb){return destroyList(_0x8ad7xa[_0xc469[18]][_0xc469[16]],_0x8ad7xb)};function destroyList(_0x8ad7x23,_0x8ad7xb){return delCf(_0x8ad7x23,_0x8ad7xb)[_0xc469[73]]()[_0xc469[15]](function(){return List[_0xc469[71]]({where:{id:_0x8ad7x23},individualHooks:true})})[_0xc469[15]](function(){return _0x8ad7xb[_0xc469[47]](204)})[_0xc469[12]](function(_0x8ad7xd){console[_0xc469[30]](_0x8ad7xd);return handleError(_0x8ad7xb,_0x8ad7xd)})}function delCf(_0x8ad7x23,_0x8ad7xb){var _0x8ad7x25;return CustomField[_0xc469[45]]({where:{ListId:_0x8ad7x23}})[_0xc469[15]](function(_0x8ad7x2a){if(!_0x8ad7x2a){return _0x8ad7xb[_0xc469[47]](404)};_0x8ad7x25= _0x8ad7x2a;return CustomField[_0xc469[71]]({where:{id:_0x8ad7x23}})})[_0xc469[15]](function(){return Contact[_0xc469[79]]()})[_0xc469[15]](function(_0x8ad7x29){return _[_0xc469[78]](_0x8ad7x29)})[_0xc469[15]](function(_0x8ad7x26){var _0x8ad7x27=[];_[_0xc469[77]](_0x8ad7x25,function(_0x8ad7x28){if(_[_0xc469[74]](_0x8ad7x26,_0x8ad7x28[_0xc469[53]])){_0x8ad7x27[_0xc469[76]](sequelize[_0xc469[18]](util[_0xc469[54]](_0xc469[75],_0x8ad7x28[_0xc469[53]])))}});return _0x8ad7x27})}exports[_0xc469[80]]= function(_0x8ad7xa,_0x8ad7xb){var _0x8ad7x2b;return CustomField[_0xc469[26]](_0x8ad7xa[_0xc469[31]][_0xc469[16]])[_0xc469[15]](function(_0x8ad7x2c){if(!_0x8ad7x2c){return _0x8ad7xb[_0xc469[47]](404)};_0x8ad7x2b= _0x8ad7x2c;return CustomField[_0xc469[71]]({where:{id:_0x8ad7xa[_0xc469[31]][_0xc469[16]]}})})[_0xc469[15]](function(){return Contact[_0xc469[79]]()})[_0xc469[15]](function(_0x8ad7x29){return _[_0xc469[78]](_0x8ad7x29)})[_0xc469[15]](function(_0x8ad7x26){if(_[_0xc469[74]](_0x8ad7x26,_0x8ad7x2b[_0xc469[53]])){return sequelize[_0xc469[18]](util[_0xc469[54]](_0xc469[75],_0x8ad7x2b[_0xc469[53]]))}})[_0xc469[15]](function(){return _0x8ad7xb[_0xc469[47]](204)})[_0xc469[12]](function(_0x8ad7xd){return handleError(_0x8ad7xb,_0x8ad7xd)})};exports[_0xc469[81]]= function(_0x8ad7xa,_0x8ad7xb){var _0x8ad7x25;return CustomField[_0xc469[45]]({where:{id:_0x8ad7xa[_0xc469[18]][_0xc469[82]]}})[_0xc469[15]](function(_0x8ad7x2a){if(!_0x8ad7x2a){return _0x8ad7xb[_0xc469[47]](404)};_0x8ad7x25= _0x8ad7x2a;return CustomField[_0xc469[71]]({where:{id:_0x8ad7xa[_0xc469[18]][_0xc469[82]]}})})[_0xc469[15]](function(){return Contact[_0xc469[79]]()})[_0xc469[15]](function(_0x8ad7x29){return _[_0xc469[78]](_0x8ad7x29)})[_0xc469[15]](function(_0x8ad7x26){var _0x8ad7x27=[];_0x8ad7x25[_0xc469[77]](function(_0x8ad7x28){if(_[_0xc469[74]](_0x8ad7x26,_0x8ad7x28[_0xc469[53]])){_0x8ad7x27[_0xc469[76]](sequelize[_0xc469[18]](util[_0xc469[54]](_0xc469[75],_0x8ad7x28[_0xc469[53]])))}});return _0x8ad7x27})[_0xc469[73]]()[_0xc469[15]](function(){return _0x8ad7xb[_0xc469[47]](204)})[_0xc469[12]](function(_0x8ad7xd){return handleError(_0x8ad7xb,_0x8ad7xd)})};function handleError(_0x8ad7xb,_0x8ad7xd){return _0x8ad7xb[_0xc469[14]](500)[_0xc469[13]](_0x8ad7xd)}
\ No newline at end of file
diff --git a/server/api/list/list.events.js b/server/api/list/list.events.js
index 0cb87f0..ad4e848 100644
--- a/server/api/list/list.events.js
+++ b/server/api/list/list.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const List = require('../../models').List;
-
-var ListEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ListEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  List.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ListEvents.emit(event + ':' + doc._id, doc);
-    ListEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ListEvents;
+var _0x39c4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4C\x69\x73\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x39c4[0];const EventEmitter=require(_0x39c4[1]);const List=require(_0x39c4[3])[_0x39c4[2]];var ListEvents= new EventEmitter();ListEvents[_0x39c4[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x39c4[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x39c4[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x39c4[6]};for(var e in events){var event=events[e];List[_0x39c4[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7428x8,_0x7428x9,_0x7428xa){ListEvents[_0x39c4[10]](event+ _0x39c4[8]+ _0x7428x8[_0x39c4[9]],_0x7428x8);ListEvents[_0x39c4[10]](event,_0x7428x8);_0x7428xa(null)}}module[_0x39c4[11]]= ListEvents
\ No newline at end of file
diff --git a/server/api/list/list.socket.js b/server/api/list/list.socket.js
index c79e17b..62a51bf 100644
--- a/server/api/list/list.socket.js
+++ b/server/api/list/list.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const ListEvents = require('./list.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('list:' + event, socket);
-
-    ListEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ListEvents.removeListener(event, listener);
-  };
-}
+var _0xa50d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6C\x69\x73\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x73\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xa50d[0];const ListEvents=require(_0xa50d[1]);var events=[_0xa50d[2],_0xa50d[3]];exports[_0xa50d[4]]= function(_0x6248x3){for(var _0x6248x4=0,_0x6248x5=events[_0xa50d[5]];_0x6248x4< _0x6248x5;_0x6248x4++){var _0x6248x6=events[_0x6248x4];var _0x6248x7=createListener(_0xa50d[6]+ _0x6248x6,_0x6248x3);ListEvents[_0xa50d[7]](_0x6248x6,_0x6248x7);_0x6248x3[_0xa50d[7]](_0xa50d[8],removeListener(_0x6248x6,_0x6248x7))}};function createListener(_0x6248x6,_0x6248x3){return function(_0x6248x9){_0x6248x3[_0xa50d[9]](_0x6248x6,_0x6248x9)}}function removeListener(_0x6248x6,_0x6248x7){return function(){ListEvents[_0xa50d[10]](_0x6248x6,_0x6248x7)}}
\ No newline at end of file
diff --git a/server/api/mail_account/index.js b/server/api/mail_account/index.js
index c41e67f..c61ab03 100644
--- a/server/api/mail_account/index.js
+++ b/server/api/mail_account/index.js
@@ -1,31 +1 @@
-'use strict';
-
-var express = require('express');
-
-var controller = require('./mail_account.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.index);
-router.get('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.show);
-router.get('/account/:address', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.showFromAddress);
-router.get('/:id/applications', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.showApplications);
-router.get('/:id/applications/:appId', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.showApplication);
-router.get('/:id/rooms', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.getMailRooms);
-router.get('/:id/dispositions', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.getDispositions);
-router.post('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.create);
-router.post('/:id/applications', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.createApplication);
-router.post('/:id/dispositions', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.createDisposition);
-router.put('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.update);
-router.put('/:id/applications', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.updateApplications);
-router.put('/:id/applications/:appId', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.updateApplication);
-router.put('/:id/dispositions/:dispId', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.updateDisposition);
-router.delete('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.bulkDestroy);
-router.delete('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.destroy);
-router.delete('/:id/applications', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.bulkDestroyApplications);
-router.delete('/:id/applications/:appId', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.destroyApplication);
-router.delete('/:id/dispositions/:dispId', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.destroyDisposition);
-
-module.exports = router;
+var _0x45bd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4D\x61\x69\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x3A\x61\x64\x64\x72\x65\x73\x73","\x73\x68\x6F\x77\x46\x72\x6F\x6D\x41\x64\x64\x72\x65\x73\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x61\x70\x70\x49\x64","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x72\x6F\x6F\x6D\x73","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x73","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73\x2F\x3A\x64\x69\x73\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x45bd[0];var express=require(_0x45bd[1]);var controller=require(_0x45bd[2]);var auth=require(_0x45bd[3]);var license=require(_0x45bd[4]);var router=express.Router();router[_0x45bd[13]](_0x45bd[5],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9],_0x45bd[10]]),controller[_0x45bd[12]]);router[_0x45bd[13]](_0x45bd[14],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9],_0x45bd[10]]),controller[_0x45bd[15]]);router[_0x45bd[13]](_0x45bd[16],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9],_0x45bd[10]]),controller[_0x45bd[17]]);router[_0x45bd[13]](_0x45bd[18],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9]]),controller[_0x45bd[19]]);router[_0x45bd[13]](_0x45bd[20],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9]]),controller[_0x45bd[21]]);router[_0x45bd[13]](_0x45bd[22],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9],_0x45bd[10]]),controller[_0x45bd[23]]);router[_0x45bd[13]](_0x45bd[24],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9],_0x45bd[10]]),controller[_0x45bd[25]]);router[_0x45bd[27]](_0x45bd[5],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9]]),controller[_0x45bd[26]]);router[_0x45bd[27]](_0x45bd[18],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9]]),controller[_0x45bd[28]]);router[_0x45bd[27]](_0x45bd[24],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9]]),controller[_0x45bd[29]]);router[_0x45bd[31]](_0x45bd[14],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9]]),controller[_0x45bd[30]]);router[_0x45bd[31]](_0x45bd[18],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9]]),controller[_0x45bd[32]]);router[_0x45bd[31]](_0x45bd[20],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9]]),controller[_0x45bd[33]]);router[_0x45bd[31]](_0x45bd[34],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9]]),controller[_0x45bd[35]]);router[_0x45bd[37]](_0x45bd[5],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9]]),controller[_0x45bd[36]]);router[_0x45bd[37]](_0x45bd[14],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9]]),controller[_0x45bd[38]]);router[_0x45bd[37]](_0x45bd[18],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9]]),controller[_0x45bd[39]]);router[_0x45bd[37]](_0x45bd[20],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9]]),controller[_0x45bd[40]]);router[_0x45bd[37]](_0x45bd[34],license[_0x45bd[6]](),license[_0x45bd[7]](),auth[_0x45bd[8]](),auth[_0x45bd[11]]([9],[_0x45bd[9]]),controller[_0x45bd[41]]);module[_0x45bd[42]]= router
\ No newline at end of file
diff --git a/server/api/mail_account/mail_account.controller.js b/server/api/mail_account/mail_account.controller.js
index d69c9bb..fb97964 100644
--- a/server/api/mail_account/mail_account.controller.js
+++ b/server/api/mail_account/mail_account.controller.js
@@ -1,528 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var async = require('async');
-
-var Util = require('../../config/util');
-
-var sequelize = require('../../models').sequelize;
-var User = require('../../models').User;
-var MailAttachment = require('../../models').MailAttachment;
-var MailQueue = require('../../models').MailQueue;
-var MailRoom = require('../../models').MailRoom;
-var MailAccount = require('../../models').MailAccount;
-var MailServerIn = require('../../models').MailServerIn;
-var MailServerOut = require('../../models').MailServerOut;
-var MailApplication = require('../../models').MailApplication;
-var MailDisposition = require('../../models').MailDisposition;
-var Interval = require('../../models').Interval;
-
-// Get list of mailAccounts
-exports.index = function(req, res) {
-  return MailAccount
-    .scope('default')
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getMailRooms = function(req, res, next) {
-  var _query = {
-    include: [],
-    where: {
-      MailAccountId: req.params.id,
-      $and: []
-    },
-    attributes: ['id', 'subject', 'from', 'attachment', 'disposition', 'tags', 'waiting', 'lastEvent', 'updatedAt']
-  };
-
-  // TO MOVE SOON INTO AN EXTENAL UTIL FILE
-  if (req.query) {
-    if (req.query.tags) {
-      if (_.isArray(req.query.tags)) {
-        for (var i = 0; i < req.query.tags.length; i++) {
-          _query.where.$and.push({
-            tags: {
-              $like: '%' + req.query.tags[i] + ';%'
-            }
-          });
-        }
-      } else {
-        _query.where.$and.push({
-          tags: {
-            $like: '%' + req.query.tags + ';%'
-          }
-        });
-      }
-      delete req.query.tags;
-    }
-    _.merge(_query.where, req.query);
-  }
-
-  switch (req.user.role) {
-    case 'agent':
-      _query.include.push({
-        model: User,
-        attributes: ['id']
-      });
-
-      var _agents;
-      var _agentQueues;
-      var _accountQueues;
-
-      return User
-        .findById(req.user.id)
-        .then(function(user) {
-          if (user) {
-            return user
-              .getMailQueues();
-          } else {
-            return [];
-          }
-        })
-        .then(function(queues) {
-          _agentQueues = _.map(queues, 'id');
-
-          return MailAccount
-            .findById(req.params.id);
-        })
-        .then(function(account) {
-          return account
-            .getMailApplications({
-              where: {
-                $or: [{
-                  app: 'queue'
-                }, {
-                  app: 'agent'
-                }]
-              }
-            });
-        })
-        .then(function(apps) {
-          _agents = _.map(_.find(apps, {
-            'app': 'agent'
-          }), 'UserId');
-
-          _accountQueues = _.map(_.find(apps, {
-            'app': 'queue'
-          }), 'MailQueueId');
-
-          if (_.intersection(_agentQueues, _accountQueues).length || _.intersection(_agents, [req.user.id]).length) {
-            return MailRoom
-              .findAll(_query)
-              .then(function(mailRooms) {
-                return res.status(200).send(mailRooms);
-              })
-              .catch(function(err) {
-                console.error(err);
-                return handleError(res, err);
-              });
-          } else {
-
-            return res.status(200).send([]);
-          }
-        })
-        .catch(function(err) {
-          console.error(err);
-        });
-
-    default:
-
-      return MailRoom
-        .findAll(_query)
-        .then(function(mailRooms) {
-          return res.status(200).send(mailRooms);
-        })
-        .catch(function(err) {
-          console.error(err);
-          return handleError(res, err);
-        });
-  }
-};
-
-exports.getDispositions = function(req, res, next) {
-  return MailAccount
-    .findById(req.params.id)
-    .then(function(mailAccount) {
-      if (!mailAccount) {
-        return res.sendStatus(404);
-      }
-
-      return mailAccount
-        .getMailDispositions();
-    })
-    .then(function(mailDispositions) {
-      return res.status(200).send({
-        rows: mailDispositions,
-        count: mailDispositions.length
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single mailAccount
-exports.show = function(req, res, next) {
-  return MailAccount
-    .scope('default')
-    .findById(req.params.id)
-    .then(function(mailAccount) {
-      if (!mailAccount) {
-        return res.sendStatus(404);
-      }
-      return res.send(mailAccount);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.showFromAddress = function(req, res, next) {
-  return MailAccount
-    .findOne({
-      where: {
-        address: req.params.address
-      }
-    })
-    .then(function(mailAccount) {
-      if (!mailAccount) {
-        return res.sendStatus(404);
-      }
-      return res.send(mailAccount);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single mailAccount
-exports.showApplications = function(req, res, next) {
-  return MailAccount
-    .scope('default')
-    .findById(req.params.id)
-    .then(function(mailAccount) {
-      if (!mailAccount) {
-        return res.sendStatus(404);
-      }
-      return mailAccount
-        .getMailApplications(_.merge(Util.getQuery(req.query), {
-          include: [{
-            model: MailQueue,
-            attributes: ['id', 'name']
-          }, {
-            model: User,
-            attributes: ['id', 'name', 'online']
-          }, {
-            model: Interval,
-            attributes: ['id', 'name']
-          }],
-          order: 'priority ASC'
-        }));
-    })
-    .then(function(mailApplications) {
-      return res.send({
-        count: mailApplications.length,
-        rows: mailApplications
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new mailAccount in the DB.
-exports.create = function(req, res, next) {
-  return sequelize.transaction(function(t) {
-      return MailAccount
-        .create(req.body, {
-          include: [{
-            model: MailServerIn
-          }, {
-            model: MailServerOut
-          }],
-          transaction: t
-        });
-    }).then(function(mailAccount) {
-      return res.status(201).send(mailAccount);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new mailApplication in the DB.
-exports.createApplication = function(req, res, next) {
-
-  return MailApplication
-    .max('priority', {
-      where: {
-        MailAccountId: req.params.id
-      }
-    }).then(function(max) {
-      // SET PRIORITY
-      req.body.priority = max ? ++max : 1;
-      req.body.MailAccountId = req.params.id;
-
-      return MailApplication
-        .create(req.body);
-    })
-    .then(function(mailApplication) {
-      return res.status(201).send(mailApplication);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new mailAccount in the DB.
-exports.createDisposition = function(req, res, next) {
-  req.body.MailAccountId = req.params.id;
-
-  return MailDisposition
-    .create(req.body)
-    .then(function(mailDiposition) {
-      return res.status(201).send(mailDiposition);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-
-// Updates an existing mailAccount in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return MailAccount
-    .findById(req.params.id)
-    .then(function(mailAccount) {
-      if (!mailAccount) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(mailAccount, req.body);
-      return updated
-        .save();
-    })
-    .then(function(mailAccount) {
-      return res.status(200).send(mailAccount);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing mailAccount in the DB.
-exports.updateDisposition = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return MailDisposition
-    .findById(req.params.dispId)
-    .then(function(mailDisposition) {
-      if (!mailDisposition) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(mailDisposition, req.body);
-      return updated
-        .save();
-    })
-    .then(function(mailAccount) {
-      return res.status(200).send(mailAccount);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing mailAccount in the DB.
-exports.updateApplications = function(req, res) {
-
-  var priority = 0;
-  var apps = req.body;
-
-  apps.forEach(function(app) {
-    delete app.id;
-    delete app.createdAt;
-    delete app.updatedAt;
-
-    app.priority = ++priority;
-  });
-
-  return sequelize.transaction(function(t) {
-    return MailApplication
-      .destroy({
-        where: {
-          MailAccountId: req.params.id
-        },
-        individualHooks: true,
-        transaction: t
-      }).then(function(mailApplication) {
-        return MailApplication
-          .bulkCreate(apps, {
-            individualHooks: true,
-            transaction: t
-          });
-      });
-  }).then(function(mailAccounts) {
-    return res.status(200).send({
-      count: mailAccounts.length,
-      rows: mailAccounts
-    });
-  }).catch(function(err) {
-    return handleError(res, err);
-  });
-};
-
-// Deletes a mailAccount from the DB.
-exports.destroy = function(req, res, next) {
-  return MailAccount
-    .findById(req.params.id)
-    .then(function(mailAccount) {
-      if (!mailAccount) {
-        return res.sendStatus(404);
-      }
-
-      return mailAccount
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a mailAccount from the DB.
-exports.destroyApplication = function(req, res, next) {
-  return MailApplication
-    .findById(req.params.appId)
-    .then(function(mailApplication) {
-      if (!mailApplication) {
-        return res.sendStatus(404);
-      }
-
-      return mailApplication
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a mailAccount from the DB.
-exports.destroyDisposition = function(req, res, next) {
-  return MailDisposition
-    .findById(req.params.dispId)
-    .then(function(mailDiposition) {
-      if (!mailDiposition) {
-        return res.sendStatus(404);
-      }
-
-      return mailDiposition
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a agent from the DB.
-exports.bulkDestroy = function(req, res) {
-  return MailAccount
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a agent from the DB.
-exports.bulkDestroyApplications = function(req, res) {
-  return MailApplication
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.showApplication = function(req, res) {
-  return MailApplication
-    .findById(req.params.appId, {
-      include: [{
-        all: true
-      }]
-    })
-    .then(function(mailApplication) {
-      if (!mailApplication) {
-        return res.sendStatus(404);
-      }
-      return res.send(mailApplication);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-exports.updateApplication = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return MailApplication
-    .findById(req.params.appId)
-    .then(function(mailApplication) {
-      if (!mailApplication) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(mailApplication, req.body);
-      return updated
-        .save();
-    })
-    .then(function(mailApplication) {
-      return res.status(200).send(mailApplication);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-function handleError(res, err) {
-  console.log(err);
-  return res.status(500).send(err);
-}
+var _0xc947=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x73\x75\x62\x6A\x65\x63\x74","\x66\x72\x6F\x6D","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x74\x61\x67\x73","\x77\x61\x69\x74\x69\x6E\x67","\x6C\x61\x73\x74\x45\x76\x65\x6E\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x25","\x3B\x25","\x70\x75\x73\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x6D\x65\x72\x67\x65","\x69\x6E\x63\x6C\x75\x64\x65","\x65\x72\x72\x6F\x72","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64","\x55\x73\x65\x72\x49\x64","\x6D\x61\x70","\x71\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x49\x64","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x75\x73\x65\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x67\x65\x74\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x72\x6F\x6C\x65","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x67\x65\x74\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x46\x72\x6F\x6D\x41\x64\x64\x72\x65\x73\x73","\x61\x64\x64\x72\x65\x73\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x62\x6F\x64\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x70\x72\x69\x6F\x72\x69\x74\x79","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x78","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x69\x73\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x70\x70\x49\x64","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6C\x6F\x67"];_0xc947[0];var _=require(_0xc947[1]);var util=require(_0xc947[2]);var async=require(_0xc947[3]);var Util=require(_0xc947[4]);var sequelize=require(_0xc947[6])[_0xc947[5]];var User=require(_0xc947[6])[_0xc947[7]];var MailAttachment=require(_0xc947[6])[_0xc947[8]];var MailQueue=require(_0xc947[6])[_0xc947[9]];var MailRoom=require(_0xc947[6])[_0xc947[10]];var MailAccount=require(_0xc947[6])[_0xc947[11]];var MailServerIn=require(_0xc947[6])[_0xc947[12]];var MailServerOut=require(_0xc947[6])[_0xc947[13]];var MailApplication=require(_0xc947[6])[_0xc947[14]];var MailDisposition=require(_0xc947[6])[_0xc947[15]];var Interval=require(_0xc947[6])[_0xc947[16]];exports[_0xc947[17]]= function(_0xe579x10,_0xe579x11){return MailAccount[_0xc947[26]](_0xc947[25])[_0xc947[24]](Util[_0xc947[23]](_0xe579x10[_0xc947[22]]))[_0xc947[21]](function(_0xe579x13){_0xe579x11[_0xc947[20]](200)[_0xc947[19]](_0xe579x13)})[_0xc947[18]](function(_0xe579x12){return handleError(_0xe579x11,_0xe579x12)})};exports[_0xc947[27]]= function(_0xe579x10,_0xe579x11,_0xe579x14){var _0xe579x15={include:[],where:{MailAccountId:_0xe579x10[_0xc947[29]][_0xc947[28]],$and:[]},attributes:[_0xc947[28],_0xc947[30],_0xc947[31],_0xc947[32],_0xc947[33],_0xc947[34],_0xc947[35],_0xc947[36],_0xc947[37]]};if(_0xe579x10[_0xc947[22]]){if(_0xe579x10[_0xc947[22]][_0xc947[34]]){if(_[_0xc947[38]](_0xe579x10[_0xc947[22]][_0xc947[34]])){for(var _0xe579x16=0;_0xe579x16< _0xe579x10[_0xc947[22]][_0xc947[34]][_0xc947[39]];_0xe579x16++){_0xe579x15[_0xc947[44]][_0xc947[43]][_0xc947[42]]({tags:{$like:_0xc947[40]+ _0xe579x10[_0xc947[22]][_0xc947[34]][_0xe579x16]+ _0xc947[41]}})}}else {_0xe579x15[_0xc947[44]][_0xc947[43]][_0xc947[42]]({tags:{$like:_0xc947[40]+ _0xe579x10[_0xc947[22]][_0xc947[34]]+ _0xc947[41]}})};delete _0xe579x10[_0xc947[22]][_0xc947[34]]};_[_0xc947[45]](_0xe579x15[_0xc947[44]],_0xe579x10[_0xc947[22]])};switch(_0xe579x10[_0xc947[55]][_0xc947[60]]){case _0xc947[48]:_0xe579x15[_0xc947[46]][_0xc947[42]]({model:User,attributes:[_0xc947[28]]});var _0xe579x17;var _0xe579x18;var _0xe579x19;return User[_0xc947[58]](_0xe579x10[_0xc947[55]][_0xc947[28]])[_0xc947[21]](function(_0xe579x1e){if(_0xe579x1e){return _0xe579x1e[_0xc947[59]]()}else {return []}})[_0xc947[21]](function(_0xe579x1d){_0xe579x18= _[_0xc947[51]](_0xe579x1d,_0xc947[28]);return MailAccount[_0xc947[58]](_0xe579x10[_0xc947[29]][_0xc947[28]])})[_0xc947[21]](function(_0xe579x1c){return _0xe579x1c[_0xc947[57]]({where:{$or:[{app:_0xc947[52]},{app:_0xc947[48]}]}})})[_0xc947[21]](function(_0xe579x1a){_0xe579x17= _[_0xc947[51]](_[_0xc947[49]](_0xe579x1a,{"\x61\x70\x70":_0xc947[48]}),_0xc947[50]);_0xe579x19= _[_0xc947[51]](_[_0xc947[49]](_0xe579x1a,{"\x61\x70\x70":_0xc947[52]}),_0xc947[53]);if(_[_0xc947[54]](_0xe579x18,_0xe579x19)[_0xc947[39]]|| _[_0xc947[54]](_0xe579x17,[_0xe579x10[_0xc947[55]][_0xc947[28]]])[_0xc947[39]]){return MailRoom[_0xc947[56]](_0xe579x15)[_0xc947[21]](function(_0xe579x1b){return _0xe579x11[_0xc947[20]](200)[_0xc947[19]](_0xe579x1b)})[_0xc947[18]](function(_0xe579x12){console[_0xc947[47]](_0xe579x12);return handleError(_0xe579x11,_0xe579x12)})}else {return _0xe579x11[_0xc947[20]](200)[_0xc947[19]]([])}})[_0xc947[18]](function(_0xe579x12){console[_0xc947[47]](_0xe579x12)});default:return MailRoom[_0xc947[56]](_0xe579x15)[_0xc947[21]](function(_0xe579x1b){return _0xe579x11[_0xc947[20]](200)[_0xc947[19]](_0xe579x1b)})[_0xc947[18]](function(_0xe579x12){console[_0xc947[47]](_0xe579x12);return handleError(_0xe579x11,_0xe579x12)})}};exports[_0xc947[61]]= function(_0xe579x10,_0xe579x11,_0xe579x14){return MailAccount[_0xc947[58]](_0xe579x10[_0xc947[29]][_0xc947[28]])[_0xc947[21]](function(_0xe579x20){if(!_0xe579x20){return _0xe579x11[_0xc947[62]](404)};return _0xe579x20[_0xc947[63]]()})[_0xc947[21]](function(_0xe579x1f){return _0xe579x11[_0xc947[20]](200)[_0xc947[19]]({rows:_0xe579x1f,count:_0xe579x1f[_0xc947[39]]})})[_0xc947[18]](function(_0xe579x12){return handleError(_0xe579x11,_0xe579x12)})};exports[_0xc947[64]]= function(_0xe579x10,_0xe579x11,_0xe579x14){return MailAccount[_0xc947[26]](_0xc947[25])[_0xc947[58]](_0xe579x10[_0xc947[29]][_0xc947[28]])[_0xc947[21]](function(_0xe579x20){if(!_0xe579x20){return _0xe579x11[_0xc947[62]](404)};return _0xe579x11[_0xc947[19]](_0xe579x20)})[_0xc947[18]](function(_0xe579x12){return handleError(_0xe579x11,_0xe579x12)})};exports[_0xc947[65]]= function(_0xe579x10,_0xe579x11,_0xe579x14){return MailAccount[_0xc947[67]]({where:{address:_0xe579x10[_0xc947[29]][_0xc947[66]]}})[_0xc947[21]](function(_0xe579x20){if(!_0xe579x20){return _0xe579x11[_0xc947[62]](404)};return _0xe579x11[_0xc947[19]](_0xe579x20)})[_0xc947[18]](function(_0xe579x12){return handleError(_0xe579x11,_0xe579x12)})};exports[_0xc947[68]]= function(_0xe579x10,_0xe579x11,_0xe579x14){return MailAccount[_0xc947[26]](_0xc947[25])[_0xc947[58]](_0xe579x10[_0xc947[29]][_0xc947[28]])[_0xc947[21]](function(_0xe579x20){if(!_0xe579x20){return _0xe579x11[_0xc947[62]](404)};return _0xe579x20[_0xc947[57]](_[_0xc947[45]](Util[_0xc947[23]](_0xe579x10[_0xc947[22]]),{include:[{model:MailQueue,attributes:[_0xc947[28],_0xc947[69]]},{model:User,attributes:[_0xc947[28],_0xc947[69],_0xc947[70]]},{model:Interval,attributes:[_0xc947[28],_0xc947[69]]}],order:_0xc947[71]}))})[_0xc947[21]](function(_0xe579x21){return _0xe579x11[_0xc947[19]]({count:_0xe579x21[_0xc947[39]],rows:_0xe579x21})})[_0xc947[18]](function(_0xe579x12){return handleError(_0xe579x11,_0xe579x12)})};exports[_0xc947[72]]= function(_0xe579x10,_0xe579x11,_0xe579x14){return sequelize[_0xc947[76]](function(_0xe579x22){return MailAccount[_0xc947[72]](_0xe579x10[_0xc947[75]],{include:[{model:MailServerIn},{model:MailServerOut}],transaction:_0xe579x22})})[_0xc947[21]](function(_0xe579x20){return _0xe579x11[_0xc947[20]](201)[_0xc947[19]](_0xe579x20)})[_0xc947[18]](sequelize.UniqueConstraintError,function(_0xe579x12){return Util[_0xc947[74]][_0xc947[73]](_0xe579x11,_0xe579x12)})[_0xc947[18]](function(_0xe579x12){return handleError(_0xe579x11,_0xe579x12)})};exports[_0xc947[77]]= function(_0xe579x10,_0xe579x11,_0xe579x14){return MailApplication[_0xc947[80]](_0xc947[78],{where:{MailAccountId:_0xe579x10[_0xc947[29]][_0xc947[28]]}})[_0xc947[21]](function(_0xe579x24){_0xe579x10[_0xc947[75]][_0xc947[78]]= _0xe579x24?++_0xe579x24:1;_0xe579x10[_0xc947[75]][_0xc947[79]]= _0xe579x10[_0xc947[29]][_0xc947[28]];return MailApplication[_0xc947[72]](_0xe579x10[_0xc947[75]])})[_0xc947[21]](function(_0xe579x23){return _0xe579x11[_0xc947[20]](201)[_0xc947[19]](_0xe579x23)})[_0xc947[18]](function(_0xe579x12){return handleError(_0xe579x11,_0xe579x12)})};exports[_0xc947[81]]= function(_0xe579x10,_0xe579x11,_0xe579x14){_0xe579x10[_0xc947[75]][_0xc947[79]]= _0xe579x10[_0xc947[29]][_0xc947[28]];return MailDisposition[_0xc947[72]](_0xe579x10[_0xc947[75]])[_0xc947[21]](function(_0xe579x25){return _0xe579x11[_0xc947[20]](201)[_0xc947[19]](_0xe579x25)})[_0xc947[18]](function(_0xe579x12){return handleError(_0xe579x11,_0xe579x12)})};exports[_0xc947[82]]= function(_0xe579x10,_0xe579x11){if(_0xe579x10[_0xc947[75]][_0xc947[28]]){delete _0xe579x10[_0xc947[75]][_0xc947[28]]};return MailAccount[_0xc947[58]](_0xe579x10[_0xc947[29]][_0xc947[28]])[_0xc947[21]](function(_0xe579x20){if(!_0xe579x20){return _0xe579x11[_0xc947[62]](404)};var _0xe579x26=_[_0xc947[45]](_0xe579x20,_0xe579x10[_0xc947[75]]);return _0xe579x26[_0xc947[83]]()})[_0xc947[21]](function(_0xe579x20){return _0xe579x11[_0xc947[20]](200)[_0xc947[19]](_0xe579x20)})[_0xc947[18]](sequelize.UniqueConstraintError,function(_0xe579x12){return Util[_0xc947[74]][_0xc947[73]](_0xe579x11,_0xe579x12)})[_0xc947[18]](function(_0xe579x12){return handleError(_0xe579x11,_0xe579x12)})};exports[_0xc947[84]]= function(_0xe579x10,_0xe579x11){if(_0xe579x10[_0xc947[75]][_0xc947[28]]){delete _0xe579x10[_0xc947[75]][_0xc947[28]]};return MailDisposition[_0xc947[58]](_0xe579x10[_0xc947[29]][_0xc947[85]])[_0xc947[21]](function(_0xe579x27){if(!_0xe579x27){return _0xe579x11[_0xc947[62]](404)};var _0xe579x26=_[_0xc947[45]](_0xe579x27,_0xe579x10[_0xc947[75]]);return _0xe579x26[_0xc947[83]]()})[_0xc947[21]](function(_0xe579x20){return _0xe579x11[_0xc947[20]](200)[_0xc947[19]](_0xe579x20)})[_0xc947[18]](function(_0xe579x12){return handleError(_0xe579x11,_0xe579x12)})};exports[_0xc947[86]]= function(_0xe579x10,_0xe579x11){var _0xe579x28=0;var _0xe579x1a=_0xe579x10[_0xc947[75]];_0xe579x1a[_0xc947[88]](function(_0xe579x29){delete _0xe579x29[_0xc947[28]];delete _0xe579x29[_0xc947[87]];delete _0xe579x29[_0xc947[37]];_0xe579x29[_0xc947[78]]=  ++_0xe579x28});return sequelize[_0xc947[76]](function(_0xe579x22){return MailApplication[_0xc947[90]]({where:{MailAccountId:_0xe579x10[_0xc947[29]][_0xc947[28]]},individualHooks:true,transaction:_0xe579x22})[_0xc947[21]](function(_0xe579x23){return MailApplication[_0xc947[89]](_0xe579x1a,{individualHooks:true,transaction:_0xe579x22})})})[_0xc947[21]](function(_0xe579x2a){return _0xe579x11[_0xc947[20]](200)[_0xc947[19]]({count:_0xe579x2a[_0xc947[39]],rows:_0xe579x2a})})[_0xc947[18]](function(_0xe579x12){return handleError(_0xe579x11,_0xe579x12)})};exports[_0xc947[90]]= function(_0xe579x10,_0xe579x11,_0xe579x14){return MailAccount[_0xc947[58]](_0xe579x10[_0xc947[29]][_0xc947[28]])[_0xc947[21]](function(_0xe579x20){if(!_0xe579x20){return _0xe579x11[_0xc947[62]](404)};return _0xe579x20[_0xc947[90]]()})[_0xc947[21]](function(){return _0xe579x11[_0xc947[62]](204)})[_0xc947[18]](function(_0xe579x12){return handleError(_0xe579x11,_0xe579x12)})};exports[_0xc947[91]]= function(_0xe579x10,_0xe579x11,_0xe579x14){return MailApplication[_0xc947[58]](_0xe579x10[_0xc947[29]][_0xc947[92]])[_0xc947[21]](function(_0xe579x23){if(!_0xe579x23){return _0xe579x11[_0xc947[62]](404)};return _0xe579x23[_0xc947[90]]()})[_0xc947[21]](function(){return _0xe579x11[_0xc947[62]](204)})[_0xc947[18]](function(_0xe579x12){return handleError(_0xe579x11,_0xe579x12)})};exports[_0xc947[93]]= function(_0xe579x10,_0xe579x11,_0xe579x14){return MailDisposition[_0xc947[58]](_0xe579x10[_0xc947[29]][_0xc947[85]])[_0xc947[21]](function(_0xe579x25){if(!_0xe579x25){return _0xe579x11[_0xc947[62]](404)};return _0xe579x25[_0xc947[90]]()})[_0xc947[21]](function(){return _0xe579x11[_0xc947[62]](204)})[_0xc947[18]](function(_0xe579x12){return handleError(_0xe579x11,_0xe579x12)})};exports[_0xc947[94]]= function(_0xe579x10,_0xe579x11){return MailAccount[_0xc947[90]]({where:{id:_0xe579x10[_0xc947[22]][_0xc947[95]]},individualHooks:true})[_0xc947[21]](function(){return _0xe579x11[_0xc947[62]](204)})[_0xc947[18]](function(_0xe579x12){return handleError(_0xe579x11,_0xe579x12)})};exports[_0xc947[96]]= function(_0xe579x10,_0xe579x11){return MailApplication[_0xc947[90]]({where:{id:_0xe579x10[_0xc947[22]][_0xc947[95]]},individualHooks:true})[_0xc947[21]](function(){return _0xe579x11[_0xc947[62]](204)})[_0xc947[18]](function(_0xe579x12){return handleError(_0xe579x11,_0xe579x12)})};exports[_0xc947[97]]= function(_0xe579x10,_0xe579x11){return MailApplication[_0xc947[58]](_0xe579x10[_0xc947[29]][_0xc947[92]],{include:[{all:true}]})[_0xc947[21]](function(_0xe579x23){if(!_0xe579x23){return _0xe579x11[_0xc947[62]](404)};return _0xe579x11[_0xc947[19]](_0xe579x23)})[_0xc947[18]](function(_0xe579x12){return handleError(_0xe579x11,_0xe579x12)})};exports[_0xc947[98]]= function(_0xe579x10,_0xe579x11){if(_0xe579x10[_0xc947[75]][_0xc947[28]]){delete _0xe579x10[_0xc947[75]][_0xc947[28]]};return MailApplication[_0xc947[58]](_0xe579x10[_0xc947[29]][_0xc947[92]])[_0xc947[21]](function(_0xe579x23){if(!_0xe579x23){return _0xe579x11[_0xc947[62]](404)};var _0xe579x26=_[_0xc947[45]](_0xe579x23,_0xe579x10[_0xc947[75]]);return _0xe579x26[_0xc947[83]]()})[_0xc947[21]](function(_0xe579x23){return _0xe579x11[_0xc947[20]](200)[_0xc947[19]](_0xe579x23)})[_0xc947[18]](function(_0xe579x12){return handleError(_0xe579x11,_0xe579x12)})};function handleError(_0xe579x11,_0xe579x12){console[_0xc947[99]](_0xe579x12);return _0xe579x11[_0xc947[20]](500)[_0xc947[19]](_0xe579x12)}
\ No newline at end of file
diff --git a/server/api/mail_account/mail_account.events.js b/server/api/mail_account/mail_account.events.js
index b5d3ffa..dfcf4c2 100644
--- a/server/api/mail_account/mail_account.events.js
+++ b/server/api/mail_account/mail_account.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const MailAccount = require('../../models').MailAccount;
-
-var MailAccountEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-MailAccountEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  MailAccount.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    MailAccountEvents.emit(event + ':' + doc._id, doc);
-    MailAccountEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = MailAccountEvents;
+var _0x4a70=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x4a70[0];const EventEmitter=require(_0x4a70[1]);const MailAccount=require(_0x4a70[3])[_0x4a70[2]];var MailAccountEvents= new EventEmitter();MailAccountEvents[_0x4a70[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x4a70[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x4a70[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x4a70[6]};for(var e in events){var event=events[e];MailAccount[_0x4a70[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x57a9x8,_0x57a9x9,_0x57a9xa){MailAccountEvents[_0x4a70[10]](event+ _0x4a70[8]+ _0x57a9x8[_0x4a70[9]],_0x57a9x8);MailAccountEvents[_0x4a70[10]](event,_0x57a9x8);_0x57a9xa(null)}}module[_0x4a70[11]]= MailAccountEvents
\ No newline at end of file
diff --git a/server/api/mail_account/mail_account.socket.js b/server/api/mail_account/mail_account.socket.js
index 64b2c78..64804da 100644
--- a/server/api/mail_account/mail_account.socket.js
+++ b/server/api/mail_account/mail_account.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const MailAccountEvents = require('./mail_account.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('mail_account:' + event, socket);
-
-    MailAccountEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    MailAccountEvents.removeListener(event, listener);
-  };
-}
+var _0xe472=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xe472[0];const MailAccountEvents=require(_0xe472[1]);var events=[_0xe472[2],_0xe472[3]];exports[_0xe472[4]]= function(_0xe803x3){for(var _0xe803x4=0,_0xe803x5=events[_0xe472[5]];_0xe803x4< _0xe803x5;_0xe803x4++){var _0xe803x6=events[_0xe803x4];var _0xe803x7=createListener(_0xe472[6]+ _0xe803x6,_0xe803x3);MailAccountEvents[_0xe472[7]](_0xe803x6,_0xe803x7);_0xe803x3[_0xe472[7]](_0xe472[8],removeListener(_0xe803x6,_0xe803x7))}};function createListener(_0xe803x6,_0xe803x3){return function(_0xe803x9){_0xe803x3[_0xe472[9]](_0xe803x6,_0xe803x9)}}function removeListener(_0xe803x6,_0xe803x7){return function(){MailAccountEvents[_0xe472[10]](_0xe803x6,_0xe803x7)}}
\ No newline at end of file
diff --git a/server/api/mail_application/index.js b/server/api/mail_application/index.js
index 7f53439..df96f3a 100644
--- a/server/api/mail_application/index.js
+++ b/server/api/mail_application/index.js
@@ -1,17 +1 @@
-'use strict';
-
-var express = require('express');
-
-var controller = require('./mail_application.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.index);
-router.get('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.show);
-router.post('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.create);
-router.put('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.update);
-router.delete('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xf861=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4D\x61\x69\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf861[0];var express=require(_0xf861[1]);var controller=require(_0xf861[2]);var auth=require(_0xf861[3]);var license=require(_0xf861[4]);var router=express.Router();router[_0xf861[12]](_0xf861[5],license[_0xf861[6]](),license[_0xf861[7]](),auth[_0xf861[8]](),auth[_0xf861[10]]([9],[_0xf861[9]]),controller[_0xf861[11]]);router[_0xf861[12]](_0xf861[13],license[_0xf861[6]](),license[_0xf861[7]](),auth[_0xf861[8]](),auth[_0xf861[10]]([9],[_0xf861[9]]),controller[_0xf861[14]]);router[_0xf861[16]](_0xf861[5],license[_0xf861[6]](),license[_0xf861[7]](),auth[_0xf861[8]](),auth[_0xf861[10]]([9],[_0xf861[9]]),controller[_0xf861[15]]);router[_0xf861[18]](_0xf861[13],license[_0xf861[6]](),license[_0xf861[7]](),auth[_0xf861[8]](),auth[_0xf861[10]]([9],[_0xf861[9]]),controller[_0xf861[17]]);router[_0xf861[20]](_0xf861[13],license[_0xf861[6]](),license[_0xf861[7]](),auth[_0xf861[8]](),auth[_0xf861[10]]([9],[_0xf861[9]]),controller[_0xf861[19]]);module[_0xf861[21]]= router
\ No newline at end of file
diff --git a/server/api/mail_application/mail_application.controller.js b/server/api/mail_application/mail_application.controller.js
index 0a75c15..d16cdc6 100644
--- a/server/api/mail_application/mail_application.controller.js
+++ b/server/api/mail_application/mail_application.controller.js
@@ -1,102 +1 @@
-'use strict';
-var _ = require('lodash');
-var MailApplication = require('../../models').MailApplication;
-// Get list of mailApplications
-exports.index = function(req, res, next) {
-  return MailApplication
-    .findAll({
-      where: req.query,
-      order: 'priority',
-      include: [{
-        all: true
-      }]
-    })
-    .then(function(mailApplications) {
-      return res.status(200).send(mailApplications);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Get a single mailApplication
-exports.show = function(req, res, next) {
-  return MailApplication
-    .findById(req.params.id, {
-      include: [{
-        all: true
-      }]
-    })
-    .then(function(mailApplication) {
-      if (!mailApplication) {
-        return res.sendStatus(404);
-      }
-      return res.send(mailApplication);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Creates a new mailApplication in the DB.
-exports.create = function(req, res, next) {
-  return MailApplication
-    .max('priority', {
-      where: {
-        MailAccountId: req.body.MailAccountId
-      }
-    }).then(function(max) {
-      // SET PRIORITY
-      req.body.priority = max ? ++max : 1;
-      return MailApplication
-        .create(req.body);
-    })
-    .then(function(mailApplication) {
-      return res.status(201).send(mailApplication);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Updates an existing mailApplication in the DB.
-exports.update = function(req, res, next) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return MailApplication
-    .findById(req.params.id)
-    .then(function(mailApplication) {
-      if (!mailApplication) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(mailApplication, req.body);
-      return updated
-        .save();
-    })
-    .then(function(mailApplication) {
-      return res.status(200).send(mailApplication);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Deletes a mailApplication from the DB.
-exports.destroy = function(req, res, next) {
-  return MailApplication
-    .findById(req.params.id)
-    .then(function(mailApplication) {
-      if (!mailApplication) {
-        return res.sendStatus(404);
-      }
-      return mailApplication
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xa3fb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x78","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xa3fb[0];var _=require(_0xa3fb[1]);var MailApplication=require(_0xa3fb[3])[_0xa3fb[2]];exports[_0xa3fb[4]]= function(_0x116bx3,_0x116bx4,_0x116bx5){return MailApplication[_0xa3fb[11]]({where:_0x116bx3[_0xa3fb[9]],order:_0xa3fb[10],include:[{all:true}]})[_0xa3fb[8]](function(_0x116bx7){return _0x116bx4[_0xa3fb[7]](200)[_0xa3fb[6]](_0x116bx7)})[_0xa3fb[5]](function(_0x116bx6){return handleError(_0x116bx4,_0x116bx6)})};exports[_0xa3fb[12]]= function(_0x116bx3,_0x116bx4,_0x116bx5){return MailApplication[_0xa3fb[16]](_0x116bx3[_0xa3fb[15]][_0xa3fb[14]],{include:[{all:true}]})[_0xa3fb[8]](function(_0x116bx8){if(!_0x116bx8){return _0x116bx4[_0xa3fb[13]](404)};return _0x116bx4[_0xa3fb[6]](_0x116bx8)})[_0xa3fb[5]](function(_0x116bx6){return handleError(_0x116bx4,_0x116bx6)})};exports[_0xa3fb[17]]= function(_0x116bx3,_0x116bx4,_0x116bx5){return MailApplication[_0xa3fb[20]](_0xa3fb[10],{where:{MailAccountId:_0x116bx3[_0xa3fb[18]][_0xa3fb[19]]}})[_0xa3fb[8]](function(_0x116bx9){_0x116bx3[_0xa3fb[18]][_0xa3fb[10]]= _0x116bx9?++_0x116bx9:1;return MailApplication[_0xa3fb[17]](_0x116bx3[_0xa3fb[18]])})[_0xa3fb[8]](function(_0x116bx8){return _0x116bx4[_0xa3fb[7]](201)[_0xa3fb[6]](_0x116bx8)})[_0xa3fb[5]](function(_0x116bx6){return handleError(_0x116bx4,_0x116bx6)})};exports[_0xa3fb[21]]= function(_0x116bx3,_0x116bx4,_0x116bx5){if(_0x116bx3[_0xa3fb[18]][_0xa3fb[14]]){delete _0x116bx3[_0xa3fb[18]][_0xa3fb[14]]};return MailApplication[_0xa3fb[16]](_0x116bx3[_0xa3fb[15]][_0xa3fb[14]])[_0xa3fb[8]](function(_0x116bx8){if(!_0x116bx8){return _0x116bx4[_0xa3fb[13]](404)};var _0x116bxa=_[_0xa3fb[22]](_0x116bx8,_0x116bx3[_0xa3fb[18]]);return _0x116bxa[_0xa3fb[23]]()})[_0xa3fb[8]](function(_0x116bx8){return _0x116bx4[_0xa3fb[7]](200)[_0xa3fb[6]](_0x116bx8)})[_0xa3fb[5]](function(_0x116bx6){return handleError(_0x116bx4,_0x116bx6)})};exports[_0xa3fb[24]]= function(_0x116bx3,_0x116bx4,_0x116bx5){return MailApplication[_0xa3fb[16]](_0x116bx3[_0xa3fb[15]][_0xa3fb[14]])[_0xa3fb[8]](function(_0x116bx8){if(!_0x116bx8){return _0x116bx4[_0xa3fb[13]](404)};return _0x116bx8[_0xa3fb[24]]()})[_0xa3fb[8]](function(){return _0x116bx4[_0xa3fb[13]](204)})[_0xa3fb[5]](function(_0x116bx6){return handleError(_0x116bx4,_0x116bx6)})};function handleError(_0x116bx4,_0x116bx6){return _0x116bx4[_0xa3fb[7]](500)[_0xa3fb[6]](_0x116bx6)}
\ No newline at end of file
diff --git a/server/api/mail_application/mail_application.events.js b/server/api/mail_application/mail_application.events.js
index 99d6421..df9a646 100644
--- a/server/api/mail_application/mail_application.events.js
+++ b/server/api/mail_application/mail_application.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const MailApplication = require('../../models').MailApplication;
-
-var MailApplicationEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-MailApplicationEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  MailApplication.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    MailApplicationEvents.emit(event + ':' + doc._id, doc);
-    MailApplicationEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = MailApplicationEvents;
+var _0xa27a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xa27a[0];const EventEmitter=require(_0xa27a[1]);const MailApplication=require(_0xa27a[3])[_0xa27a[2]];var MailApplicationEvents= new EventEmitter();MailApplicationEvents[_0xa27a[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xa27a[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xa27a[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xa27a[6]};for(var e in events){var event=events[e];MailApplication[_0xa27a[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4f7ax8,_0x4f7ax9,_0x4f7axa){MailApplicationEvents[_0xa27a[10]](event+ _0xa27a[8]+ _0x4f7ax8[_0xa27a[9]],_0x4f7ax8);MailApplicationEvents[_0xa27a[10]](event,_0x4f7ax8);_0x4f7axa(null)}}module[_0xa27a[11]]= MailApplicationEvents
\ No newline at end of file
diff --git a/server/api/mail_application/mail_application.socket.js b/server/api/mail_application/mail_application.socket.js
index 4243448..d2fc6e0 100644
--- a/server/api/mail_application/mail_application.socket.js
+++ b/server/api/mail_application/mail_application.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const MailApplicationEvents = require('./mail_application.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('mail_application:' + event, socket);
-
-    MailApplicationEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    MailApplicationEvents.removeListener(event, listener);
-  };
-}
+var _0x3982=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x3982[0];const MailApplicationEvents=require(_0x3982[1]);var events=[_0x3982[2],_0x3982[3]];exports[_0x3982[4]]= function(_0x55d0x3){for(var _0x55d0x4=0,_0x55d0x5=events[_0x3982[5]];_0x55d0x4< _0x55d0x5;_0x55d0x4++){var _0x55d0x6=events[_0x55d0x4];var _0x55d0x7=createListener(_0x3982[6]+ _0x55d0x6,_0x55d0x3);MailApplicationEvents[_0x3982[7]](_0x55d0x6,_0x55d0x7);_0x55d0x3[_0x3982[7]](_0x3982[8],removeListener(_0x55d0x6,_0x55d0x7))}};function createListener(_0x55d0x6,_0x55d0x3){return function(_0x55d0x9){_0x55d0x3[_0x3982[9]](_0x55d0x6,_0x55d0x9)}}function removeListener(_0x55d0x6,_0x55d0x7){return function(){MailApplicationEvents[_0x3982[10]](_0x55d0x6,_0x55d0x7)}}
\ No newline at end of file
diff --git a/server/api/mail_attachment/index.js b/server/api/mail_attachment/index.js
index 8118efb..d7a57ef 100644
--- a/server/api/mail_attachment/index.js
+++ b/server/api/mail_attachment/index.js
@@ -1,17 +1 @@
-'use strict';
-
-var express = require('express');
-
-var controller = require('./mail_attachment.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.index);
-router.get('/:id', license.isValidDate(), license.hasMail(), controller.show);
-router.post('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.create);
-router.put('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.update);
-router.delete('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.destroy);
-
-module.exports = router;
+var _0x8dac=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4D\x61\x69\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x8dac[0];var express=require(_0x8dac[1]);var controller=require(_0x8dac[2]);var auth=require(_0x8dac[3]);var license=require(_0x8dac[4]);var router=express.Router();router[_0x8dac[13]](_0x8dac[5],license[_0x8dac[6]](),license[_0x8dac[7]](),auth[_0x8dac[8]](),auth[_0x8dac[11]]([9],[_0x8dac[9],_0x8dac[10]]),controller[_0x8dac[12]]);router[_0x8dac[13]](_0x8dac[14],license[_0x8dac[6]](),license[_0x8dac[7]](),controller[_0x8dac[15]]);router[_0x8dac[17]](_0x8dac[5],license[_0x8dac[6]](),license[_0x8dac[7]](),auth[_0x8dac[8]](),auth[_0x8dac[11]]([9],[_0x8dac[9],_0x8dac[10]]),controller[_0x8dac[16]]);router[_0x8dac[19]](_0x8dac[14],license[_0x8dac[6]](),license[_0x8dac[7]](),auth[_0x8dac[8]](),auth[_0x8dac[11]]([9],[_0x8dac[9],_0x8dac[10]]),controller[_0x8dac[18]]);router[_0x8dac[21]](_0x8dac[14],license[_0x8dac[6]](),license[_0x8dac[7]](),auth[_0x8dac[8]](),auth[_0x8dac[11]]([9],[_0x8dac[9],_0x8dac[10]]),controller[_0x8dac[20]]);module[_0x8dac[22]]= router
\ No newline at end of file
diff --git a/server/api/mail_attachment/mail_attachment.controller.js b/server/api/mail_attachment/mail_attachment.controller.js
index 2d24f24..3f0834c 100644
--- a/server/api/mail_attachment/mail_attachment.controller.js
+++ b/server/api/mail_attachment/mail_attachment.controller.js
@@ -1,97 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var path = require('path');
-var fs = require('fs');
-var formidable = require('formidable');
-var Promise = require('bluebird');
-
-var config = require('../../config/environment');
-var MailAttachment = require('../../models').MailAttachment;
-
-// Get list of mailAttachments
-exports.index = function(req, res, next) {
-  return MailAttachment
-    .findAll()
-    .then(function(mailAttachments) {
-      return res.status(200).send(mailAttachments);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single mailAttachment
-exports.show = function(req, res, next) {
-  return MailAttachment
-    .findById(req.params.id)
-    .then(function(mailAttachment) {
-      return res.sendFile(mailAttachment.path);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new mailAttachment in the DB.
-exports.create = function(req, res, next) {
-  console.log(req);
-  var form = new formidable.IncomingForm();
-  form.uploadDir = path.join(config.root, 'server', 'files', 'attachments');
-  form.keepExtensions = true;
-  form.multiples = true;
-  form.hash = true;
-
-  form.parse(req, function(err, form, wrap) {
-    if (err) {
-      return res.status(500).send(err);
-    }
-    return res.status(201).send({
-      size: wrap.file.size,
-      path: wrap.file.path,
-      name: wrap.file.name,
-      type: wrap.file.type,
-      basename: path.basename(wrap.file.path)
-    });
-  });
-};
-
-// Updates an existing mailAttachment in the DB.
-exports.update = function(req, res, next) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return MailAttachment
-    .findById(req.params.id)
-    .then(function(mailAttachment) {
-      if (!mailAttachment) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(mailAttachment, req.body);
-      return updated.save();
-    })
-    .then(function(mailAttachment) {
-      return res.status(200).send(mailAttachment);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a mailAttachment from the DB.
-exports.destroy = function(req, res, next) {
-  var unlink = Promise.promisify(require("fs").unlink);
-  var _path = path.join(config.root, 'server', 'files', 'attachments', req.params.id);
-
-  return unlink(_path)
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x4db4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x74\x68","\x66\x73","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x6C\x6F\x67","\x75\x70\x6C\x6F\x61\x64\x44\x69\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x6A\x6F\x69\x6E","\x6B\x65\x65\x70\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x6D\x75\x6C\x74\x69\x70\x6C\x65\x73","\x68\x61\x73\x68","\x73\x69\x7A\x65","\x66\x69\x6C\x65","\x6E\x61\x6D\x65","\x74\x79\x70\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x70\x61\x72\x73\x65","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x75\x6E\x6C\x69\x6E\x6B","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79"];_0x4db4[0];var _=require(_0x4db4[1]);var path=require(_0x4db4[2]);var fs=require(_0x4db4[3]);var formidable=require(_0x4db4[4]);var Promise=require(_0x4db4[5]);var config=require(_0x4db4[6]);var MailAttachment=require(_0x4db4[8])[_0x4db4[7]];exports[_0x4db4[9]]= function(_0x5535x8,_0x5535x9,_0x5535xa){return MailAttachment[_0x4db4[14]]()[_0x4db4[13]](function(_0x5535xc){return _0x5535x9[_0x4db4[12]](200)[_0x4db4[11]](_0x5535xc)})[_0x4db4[10]](function(_0x5535xb){return handleError(_0x5535x9,_0x5535xb)})};exports[_0x4db4[15]]= function(_0x5535x8,_0x5535x9,_0x5535xa){return MailAttachment[_0x4db4[19]](_0x5535x8[_0x4db4[18]][_0x4db4[17]])[_0x4db4[13]](function(_0x5535xd){return _0x5535x9[_0x4db4[16]](_0x5535xd[_0x4db4[2]])})[_0x4db4[10]](function(_0x5535xb){return handleError(_0x5535x9,_0x5535xb)})};exports[_0x4db4[20]]= function(_0x5535x8,_0x5535x9,_0x5535xa){console[_0x4db4[21]](_0x5535x8);var _0x5535xe= new formidable.IncomingForm();_0x5535xe[_0x4db4[22]]= path[_0x4db4[27]](config[_0x4db4[23]],_0x4db4[24],_0x4db4[25],_0x4db4[26]);_0x5535xe[_0x4db4[28]]= true;_0x5535xe[_0x4db4[29]]= true;_0x5535xe[_0x4db4[30]]= true;_0x5535xe[_0x4db4[36]](_0x5535x8,function(_0x5535xb,_0x5535xe,_0x5535xf){if(_0x5535xb){return _0x5535x9[_0x4db4[12]](500)[_0x4db4[11]](_0x5535xb)};return _0x5535x9[_0x4db4[12]](201)[_0x4db4[11]]({size:_0x5535xf[_0x4db4[32]][_0x4db4[31]],path:_0x5535xf[_0x4db4[32]][_0x4db4[2]],name:_0x5535xf[_0x4db4[32]][_0x4db4[33]],type:_0x5535xf[_0x4db4[32]][_0x4db4[34]],basename:path[_0x4db4[35]](_0x5535xf[_0x4db4[32]][_0x4db4[2]])})})};exports[_0x4db4[37]]= function(_0x5535x8,_0x5535x9,_0x5535xa){if(_0x5535x8[_0x4db4[38]][_0x4db4[17]]){delete _0x5535x8[_0x4db4[38]][_0x4db4[17]]};return MailAttachment[_0x4db4[19]](_0x5535x8[_0x4db4[18]][_0x4db4[17]])[_0x4db4[13]](function(_0x5535xd){if(!_0x5535xd){return _0x5535x9[_0x4db4[39]](404)};var _0x5535x10=_[_0x4db4[40]](_0x5535xd,_0x5535x8[_0x4db4[38]]);return _0x5535x10[_0x4db4[41]]()})[_0x4db4[13]](function(_0x5535xd){return _0x5535x9[_0x4db4[12]](200)[_0x4db4[11]](_0x5535xd)})[_0x4db4[10]](function(_0x5535xb){return handleError(_0x5535x9,_0x5535xb)})};exports[_0x4db4[42]]= function(_0x5535x8,_0x5535x9,_0x5535xa){var _0x5535x11=Promise[_0x4db4[44]](require(_0x4db4[3])[_0x4db4[43]]);var _0x5535x12=path[_0x4db4[27]](config[_0x4db4[23]],_0x4db4[24],_0x4db4[25],_0x4db4[26],_0x5535x8[_0x4db4[18]][_0x4db4[17]]);return _0x5535x11(_0x5535x12)[_0x4db4[13]](function(){return _0x5535x9[_0x4db4[39]](204)})[_0x4db4[10]](function(_0x5535xb){return handleError(_0x5535x9,_0x5535xb)})};function handleError(_0x5535x9,_0x5535xb){return _0x5535x9[_0x4db4[12]](500)[_0x4db4[11]](_0x5535xb)}
\ No newline at end of file
diff --git a/server/api/mail_attachment/mail_attachment.events.js b/server/api/mail_attachment/mail_attachment.events.js
index 72cbdbb..6f0c36a 100644
--- a/server/api/mail_attachment/mail_attachment.events.js
+++ b/server/api/mail_attachment/mail_attachment.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const MailAttachment = require('../../models').MailAttachment;
-
-var MailAttachmentEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-MailAttachmentEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  MailAttachment.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    MailAttachmentEvents.emit(event + ':' + doc._id, doc);
-    MailAttachmentEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = MailAttachmentEvents;
+var _0x16cd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x16cd[0];const EventEmitter=require(_0x16cd[1]);const MailAttachment=require(_0x16cd[3])[_0x16cd[2]];var MailAttachmentEvents= new EventEmitter();MailAttachmentEvents[_0x16cd[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x16cd[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x16cd[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x16cd[6]};for(var e in events){var event=events[e];MailAttachment[_0x16cd[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x78cdx8,_0x78cdx9,_0x78cdxa){MailAttachmentEvents[_0x16cd[10]](event+ _0x16cd[8]+ _0x78cdx8[_0x16cd[9]],_0x78cdx8);MailAttachmentEvents[_0x16cd[10]](event,_0x78cdx8);_0x78cdxa(null)}}module[_0x16cd[11]]= MailAttachmentEvents
\ No newline at end of file
diff --git a/server/api/mail_attachment/mail_attachment.socket.js b/server/api/mail_attachment/mail_attachment.socket.js
index 4120d58..1c767fa 100644
--- a/server/api/mail_attachment/mail_attachment.socket.js
+++ b/server/api/mail_attachment/mail_attachment.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const MailAttachmentEvents = require('./mail_attachment.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('mail_attachment:' + event, socket);
-
-    MailAttachmentEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    MailAttachmentEvents.removeListener(event, listener);
-  };
-}
+var _0xcdba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xcdba[0];const MailAttachmentEvents=require(_0xcdba[1]);var events=[_0xcdba[2],_0xcdba[3]];exports[_0xcdba[4]]= function(_0x4ff1x3){for(var _0x4ff1x4=0,_0x4ff1x5=events[_0xcdba[5]];_0x4ff1x4< _0x4ff1x5;_0x4ff1x4++){var _0x4ff1x6=events[_0x4ff1x4];var _0x4ff1x7=createListener(_0xcdba[6]+ _0x4ff1x6,_0x4ff1x3);MailAttachmentEvents[_0xcdba[7]](_0x4ff1x6,_0x4ff1x7);_0x4ff1x3[_0xcdba[7]](_0xcdba[8],removeListener(_0x4ff1x6,_0x4ff1x7))}};function createListener(_0x4ff1x6,_0x4ff1x3){return function(_0x4ff1x9){_0x4ff1x3[_0xcdba[9]](_0x4ff1x6,_0x4ff1x9)}}function removeListener(_0x4ff1x6,_0x4ff1x7){return function(){MailAttachmentEvents[_0xcdba[10]](_0x4ff1x6,_0x4ff1x7)}}
\ No newline at end of file
diff --git a/server/api/mail_disposition/index.js b/server/api/mail_disposition/index.js
index ef8de1a..bdc5ed1 100644
--- a/server/api/mail_disposition/index.js
+++ b/server/api/mail_disposition/index.js
@@ -1,18 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./mail_disposition.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), controller.index);
-
-router.get('/:id', auth.isAuthenticated(), controller.show);
-router.post('/', auth.isAuthenticated(), controller.create);
-router.put('/:id', auth.isAuthenticated(), controller.update);
-router.patch('/:id', auth.isAuthenticated(), controller.update);
-router.delete('/:id', auth.isAuthenticated(), controller.destroy);
-
-
-module.exports = router;
+var _0xedd3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6D\x61\x69\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xedd3[0];var express=require(_0xedd3[1]);var auth=require(_0xedd3[2]);var controller=require(_0xedd3[3]);var router=express.Router();router[_0xedd3[7]](_0xedd3[4],auth[_0xedd3[5]](),controller[_0xedd3[6]]);router[_0xedd3[7]](_0xedd3[8],auth[_0xedd3[5]](),controller[_0xedd3[9]]);router[_0xedd3[11]](_0xedd3[4],auth[_0xedd3[5]](),controller[_0xedd3[10]]);router[_0xedd3[13]](_0xedd3[8],auth[_0xedd3[5]](),controller[_0xedd3[12]]);router[_0xedd3[14]](_0xedd3[8],auth[_0xedd3[5]](),controller[_0xedd3[12]]);router[_0xedd3[16]](_0xedd3[8],auth[_0xedd3[5]](),controller[_0xedd3[15]]);module[_0xedd3[17]]= router
\ No newline at end of file
diff --git a/server/api/mail_disposition/mail_disposition.controller.js b/server/api/mail_disposition/mail_disposition.controller.js
index 193b6af..5f59bdf 100644
--- a/server/api/mail_disposition/mail_disposition.controller.js
+++ b/server/api/mail_disposition/mail_disposition.controller.js
@@ -1,111 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/mail/dispositions              ->  index
- * POST    /api/mail/dispositions              ->  create
- * GET     /api/mail/dispositions/:id          ->  show
- * PUT     /api/mail/dispositions/:id          ->  update
- * DELETE  /api/mail/dispositions/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-
-var MailDisposition = require('../../models').MailDisposition;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function responseWithoutResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function() {
-    res.sendStatus(statusCode);
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of MailDispositions
-exports.index = function(req, res) {
-  MailDisposition.findAndCountAll()
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single MailDisposition from the DB
-exports.show = function(req, res) {
-  MailDisposition.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new MailDisposition in the DB
-exports.create = function(req, res) {
-  MailDisposition.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing MailDisposition in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  MailDisposition.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a MailDisposition from the DB
-exports.destroy = function(req, res) {
-  MailDisposition.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
+var _0xce64=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0xce64[0];var _=require(_0xce64[1]);var MailDisposition=require(_0xce64[3])[_0xce64[2]];function handleError(_0xd95bx4,_0xd95bx5){_0xd95bx5= _0xd95bx5|| 500;return function(_0xd95bx6){_0xd95bx4[_0xce64[5]](_0xd95bx5)[_0xce64[4]](_0xd95bx6)}}function responseWithResult(_0xd95bx4,_0xd95bx5){_0xd95bx5= _0xd95bx5|| 200;return function(_0xd95bx8){if(_0xd95bx8){_0xd95bx4[_0xce64[5]](_0xd95bx5)[_0xce64[6]](_0xd95bx8)}}}function responseWithoutResult(_0xd95bx4,_0xd95bx5){_0xd95bx5= _0xd95bx5|| 200;return function(){_0xd95bx4[_0xce64[7]](_0xd95bx5)}}function handleEntityNotFound(_0xd95bx4){return function(_0xd95bx8){if(!_0xd95bx8){_0xd95bx4[_0xce64[5]](404)[_0xce64[8]]();return null};return _0xd95bx8}}function saveUpdates(_0xd95bxc){return function(_0xd95bx8){return _0xd95bx8[_0xce64[10]](_0xd95bxc)[_0xce64[9]](function(_0xd95bxd){return _0xd95bxd})}}function removeEntity(_0xd95bx4){return function(_0xd95bx8){if(_0xd95bx8){return _0xd95bx8[_0xce64[11]]()[_0xce64[9]](function(){_0xd95bx4[_0xce64[5]](204)[_0xce64[8]]()})}}}exports[_0xce64[12]]= function(_0xd95bxf,_0xd95bx4){MailDisposition[_0xce64[14]]()[_0xce64[9]](responseWithResult(_0xd95bx4))[_0xce64[13]](handleError(_0xd95bx4))};exports[_0xce64[15]]= function(_0xd95bxf,_0xd95bx4){MailDisposition[_0xce64[18]](_0xd95bxf[_0xce64[17]][_0xce64[16]])[_0xce64[9]](handleEntityNotFound(_0xd95bx4))[_0xce64[9]](responseWithResult(_0xd95bx4))[_0xce64[13]](handleError(_0xd95bx4))};exports[_0xce64[19]]= function(_0xd95bxf,_0xd95bx4){MailDisposition[_0xce64[19]](_0xd95bxf[_0xce64[20]])[_0xce64[9]](responseWithResult(_0xd95bx4,201))[_0xce64[13]](handleError(_0xd95bx4))};exports[_0xce64[21]]= function(_0xd95bxf,_0xd95bx4){if(_0xd95bxf[_0xce64[20]][_0xce64[16]]){delete _0xd95bxf[_0xce64[20]][_0xce64[16]]};MailDisposition[_0xce64[18]](_0xd95bxf[_0xce64[17]][_0xce64[16]])[_0xce64[9]](handleEntityNotFound(_0xd95bx4))[_0xce64[9]](saveUpdates(_0xd95bxf[_0xce64[20]]))[_0xce64[9]](responseWithResult(_0xd95bx4))[_0xce64[13]](handleError(_0xd95bx4))};exports[_0xce64[11]]= function(_0xd95bxf,_0xd95bx4){MailDisposition[_0xce64[18]](_0xd95bxf[_0xce64[17]][_0xce64[16]])[_0xce64[9]](handleEntityNotFound(_0xd95bx4))[_0xce64[9]](removeEntity(_0xd95bx4))[_0xce64[13]](handleError(_0xd95bx4))}
\ No newline at end of file
diff --git a/server/api/mail_disposition/mail_disposition.events.js b/server/api/mail_disposition/mail_disposition.events.js
index ece78a2..b5b6d00 100644
--- a/server/api/mail_disposition/mail_disposition.events.js
+++ b/server/api/mail_disposition/mail_disposition.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const MailDisposition = require('../../models').MailDisposition;
-
-var MailDispositionEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-MailDispositionEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  MailDisposition.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    MailDispositionEvents.emit(event + ':' + doc._id, doc);
-    MailDispositionEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = MailDispositionEvents;
+var _0xfd9f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xfd9f[0];const EventEmitter=require(_0xfd9f[1]);const MailDisposition=require(_0xfd9f[3])[_0xfd9f[2]];var MailDispositionEvents= new EventEmitter();MailDispositionEvents[_0xfd9f[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xfd9f[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xfd9f[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xfd9f[6]};for(var e in events){var event=events[e];MailDisposition[_0xfd9f[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xba94x8,_0xba94x9,_0xba94xa){MailDispositionEvents[_0xfd9f[10]](event+ _0xfd9f[8]+ _0xba94x8[_0xfd9f[9]],_0xba94x8);MailDispositionEvents[_0xfd9f[10]](event,_0xba94x8);_0xba94xa(null)}}module[_0xfd9f[11]]= MailDispositionEvents
\ No newline at end of file
diff --git a/server/api/mail_disposition/mail_disposition.socket.js b/server/api/mail_disposition/mail_disposition.socket.js
index 49ccf9a..9b99a3c 100644
--- a/server/api/mail_disposition/mail_disposition.socket.js
+++ b/server/api/mail_disposition/mail_disposition.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const MailDispositionEvents = require('./mail_disposition.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('mail_disposition:' + event, socket);
-
-    MailDispositionEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    MailDispositionEvents.removeListener(event, listener);
-  };
-}
+var _0x2c97=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x2c97[0];const MailDispositionEvents=require(_0x2c97[1]);var events=[_0x2c97[2],_0x2c97[3]];exports[_0x2c97[4]]= function(_0xe233x3){for(var _0xe233x4=0,_0xe233x5=events[_0x2c97[5]];_0xe233x4< _0xe233x5;_0xe233x4++){var _0xe233x6=events[_0xe233x4];var _0xe233x7=createListener(_0x2c97[6]+ _0xe233x6,_0xe233x3);MailDispositionEvents[_0x2c97[7]](_0xe233x6,_0xe233x7);_0xe233x3[_0x2c97[7]](_0x2c97[8],removeListener(_0xe233x6,_0xe233x7))}};function createListener(_0xe233x6,_0xe233x3){return function(_0xe233x9){_0xe233x3[_0x2c97[9]](_0xe233x6,_0xe233x9)}}function removeListener(_0xe233x6,_0xe233x7){return function(){MailDispositionEvents[_0x2c97[10]](_0xe233x6,_0xe233x7)}}
\ No newline at end of file
diff --git a/server/api/mail_message/index.js b/server/api/mail_message/index.js
index 9f3d288..8eb3442 100644
--- a/server/api/mail_message/index.js
+++ b/server/api/mail_message/index.js
@@ -1,21 +1 @@
-'use strict';
-
-var express = require('express');
-
-var controller = require('./mail_message.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.index);
-router.get('/describe', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.describe);
-router.get('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.show);
-router.post('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.create);
-router.put('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.update);
-router.put('/delete/bulk', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.bulkDelete);
-router.put('/delete/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.update);
-router.put('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.update);
-router.delete('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.destroy);
-
-module.exports = router;
+var _0x1e65=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4D\x61\x69\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x64\x65\x6C\x65\x74\x65\x2F\x62\x75\x6C\x6B","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x2F\x64\x65\x6C\x65\x74\x65\x2F\x3A\x69\x64","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x1e65[0];var express=require(_0x1e65[1]);var controller=require(_0x1e65[2]);var auth=require(_0x1e65[3]);var license=require(_0x1e65[4]);var router=express.Router();router[_0x1e65[13]](_0x1e65[5],license[_0x1e65[6]](),license[_0x1e65[7]](),auth[_0x1e65[8]](),auth[_0x1e65[11]]([9],[_0x1e65[9],_0x1e65[10]]),controller[_0x1e65[12]]);router[_0x1e65[13]](_0x1e65[14],license[_0x1e65[6]](),license[_0x1e65[7]](),auth[_0x1e65[8]](),auth[_0x1e65[11]]([9],[_0x1e65[9]]),controller[_0x1e65[15]]);router[_0x1e65[13]](_0x1e65[16],license[_0x1e65[6]](),license[_0x1e65[7]](),auth[_0x1e65[8]](),auth[_0x1e65[11]]([9],[_0x1e65[9],_0x1e65[10]]),controller[_0x1e65[17]]);router[_0x1e65[19]](_0x1e65[5],license[_0x1e65[6]](),license[_0x1e65[7]](),auth[_0x1e65[8]](),auth[_0x1e65[11]]([9],[_0x1e65[9],_0x1e65[10]]),controller[_0x1e65[18]]);router[_0x1e65[21]](_0x1e65[5],license[_0x1e65[6]](),license[_0x1e65[7]](),auth[_0x1e65[8]](),auth[_0x1e65[11]]([9],[_0x1e65[9],_0x1e65[10]]),controller[_0x1e65[20]]);router[_0x1e65[21]](_0x1e65[22],license[_0x1e65[6]](),license[_0x1e65[7]](),auth[_0x1e65[8]](),auth[_0x1e65[11]]([9],[_0x1e65[9]]),controller[_0x1e65[23]]);router[_0x1e65[21]](_0x1e65[24],license[_0x1e65[6]](),license[_0x1e65[7]](),auth[_0x1e65[8]](),auth[_0x1e65[11]]([9],[_0x1e65[9]]),controller[_0x1e65[20]]);router[_0x1e65[21]](_0x1e65[16],license[_0x1e65[6]](),license[_0x1e65[7]](),auth[_0x1e65[8]](),auth[_0x1e65[11]]([9],[_0x1e65[9],_0x1e65[10]]),controller[_0x1e65[20]]);router[_0x1e65[26]](_0x1e65[16],license[_0x1e65[6]](),license[_0x1e65[7]](),auth[_0x1e65[8]](),auth[_0x1e65[11]]([9],[_0x1e65[9],_0x1e65[10]]),controller[_0x1e65[25]]);module[_0x1e65[27]]= router
\ No newline at end of file
diff --git a/server/api/mail_message/mail_message.controller.js b/server/api/mail_message/mail_message.controller.js
index 4a701cd..86ef46d 100644
--- a/server/api/mail_message/mail_message.controller.js
+++ b/server/api/mail_message/mail_message.controller.js
@@ -1,207 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var async = require('async');
-
-var htmlToText = require('html-to-text');
-var formidable = require('formidable');
-var moment = require('moment');
-var path = require('path');
-
-var config = require('../../config/environment');
-var sequelize = require('../../models').sequelize;
-var MailMessage = require('../../models').MailMessage;
-var MailAttachment = require('../../models').MailAttachment;
-var MailRoom = require('../../models').MailRoom;
-var MailAccount = require('../../models').MailAccount;
-var ContactEmail = require('../../models').ContactEmail;
-var Contact = require('../../models').Contact;
-var User = require('../../models').User;
-
-// Get list of mail_messages
-exports.index = function(req, res, next) {
-  var params = {
-    order: 'createdAt DESC',
-    include: [{
-      all: true,
-      include: [{
-        all: true
-      }]
-    }]
-  };
-
-  switch (req.user.role) {
-    case 'admin':
-      params.where = req.query;
-      break;
-    case 'agent':
-      break;
-    default:
-  }
-
-  return MailMessage
-    .findAll(params)
-    .then(function(mail_messages) {
-      return res.status(200).send(mail_messages);
-    })
-    .catch(function(err) {
-      return handleError(res, err, next);
-    });
-};
-
-exports.describe = function(req, res) {
-  return MailMessage
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single mailMessage
-exports.show = function(req, res, next) {
-  return MailMessage
-    .findById(req.params.id, {
-      include: [{
-        model: MailAttachment
-      }, {
-        model: User,
-        attributes: ['id', 'name', 'fullname', 'email']
-      }]
-    })
-    .then(function(mailMessage) {
-      if (!mailMessage) {
-        return res.sendStatus(404);
-      }
-      return res.send(mailMessage);
-    })
-    .catch(function(err) {
-      return handleError(res, err, next);
-    });
-};
-
-// Creates a new mailMessage in the DB.
-exports.create = function(req, res, next) {
-  req.body.UserId = req.user.id;
-  req.body.userName = req.user.name;
-  req.body.userFullname = req.user.fullname;
-  req.body.text = req.body.text || htmlToText.fromString(req.body.html, {
-    wordwrap: false
-  });
-
-  return MailAccount
-    .findOne({
-      where: {
-        address: req.body.from[0]
-      }
-    })
-    .then(function(account) {
-      req.body.accountId = account.id;
-      req.body.accountName = account.name;
-
-      return MailRoom
-        .create({
-          from: req.body.from[0],
-          subject: req.body.subject,
-          account: account.name,
-          mailIn: 0,
-          mailOut: 1,
-          status: 'PENDING',
-          openReason: 'agent',
-          lastEvent: 'SENDING',
-          lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'),
-          MailAccountId: account.id,
-          MailMessages: [req.body]
-        }, {
-          include: [{
-            model: MailMessage,
-            include: [{
-              model: MailAttachment
-            }]
-          }]
-        });
-    })
-    .then(function(mailRoom) {
-      return res.status(201).send(mailRoom);
-    })
-    .catch(function(err) {
-      console.error(err);
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing mailMessage in the DB.
-exports.update = function(req, res, next) {
-  return MailMessage
-    .findById(req.params.id, {
-      include: [{
-        all: true
-      }]
-    })
-    .then(function(mailMessage) {
-      if (!mailMessage) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(mailMessage, req.body);
-      return updated
-        .save();
-    })
-    .then(function(updated) {
-      return res.status(200).send(updated);
-    })
-    .catch(function(err) {
-      return handleError(res, err, next);
-    });
-};
-
-// Deletes a mailMessage from the DB.
-exports.destroy = function(req, res, next) {
-  return MailMessage
-    .findById(req.params.id)
-    .then(function(mailMessage) {
-      if (!mailMessage) {
-        return res.sendStatus(404);
-      }
-      return mailMessage
-        .destroy();
-    }).then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err, next);
-    });
-};
-
-// Deletes a mailMessage from the DB.
-exports.bulkDelete = function(req, res, next) {
-  return MailMessage
-    .bulkUpdate({
-      where: {
-        id: {
-          $in: req.body.id
-        }
-      },
-      attributes: {
-        directory: 'TRASH'
-      }
-    })
-    .then(function(mailMessage) {
-      if (!mailMessage) {
-        return res.sendStatus(404);
-      }
-      return mailMessage
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err, next);
-    });
-};
-
-function handleError(res, err, next) {
-  return res.status(500).send(err);
-}
+var _0x45f5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x61\x73\x79\x6E\x63","\x68\x74\x6D\x6C\x2D\x74\x6F\x2D\x74\x65\x78\x74","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x6D\x6F\x6D\x65\x6E\x74","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x43\x6F\x6E\x74\x61\x63\x74\x45\x6D\x61\x69\x6C","\x43\x6F\x6E\x74\x61\x63\x74","\x55\x73\x65\x72","\x69\x6E\x64\x65\x78","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x44\x45\x53\x43","\x77\x68\x65\x72\x65","\x71\x75\x65\x72\x79","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x75\x73\x65\x72\x4E\x61\x6D\x65","\x75\x73\x65\x72\x46\x75\x6C\x6C\x6E\x61\x6D\x65","\x74\x65\x78\x74","\x68\x74\x6D\x6C","\x66\x72\x6F\x6D\x53\x74\x72\x69\x6E\x67","\x65\x72\x72\x6F\x72","\x61\x63\x63\x6F\x75\x6E\x74\x49\x64","\x61\x63\x63\x6F\x75\x6E\x74\x4E\x61\x6D\x65","\x66\x72\x6F\x6D","\x73\x75\x62\x6A\x65\x63\x74","\x50\x45\x4E\x44\x49\x4E\x47","\x53\x45\x4E\x44\x49\x4E\x47","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x54\x52\x41\x53\x48","\x62\x75\x6C\x6B\x55\x70\x64\x61\x74\x65"];_0x45f5[0];var _=require(_0x45f5[1]);var async=require(_0x45f5[2]);var htmlToText=require(_0x45f5[3]);var formidable=require(_0x45f5[4]);var moment=require(_0x45f5[5]);var path=require(_0x45f5[6]);var config=require(_0x45f5[7]);var sequelize=require(_0x45f5[9])[_0x45f5[8]];var MailMessage=require(_0x45f5[9])[_0x45f5[10]];var MailAttachment=require(_0x45f5[9])[_0x45f5[11]];var MailRoom=require(_0x45f5[9])[_0x45f5[12]];var MailAccount=require(_0x45f5[9])[_0x45f5[13]];var ContactEmail=require(_0x45f5[9])[_0x45f5[14]];var Contact=require(_0x45f5[9])[_0x45f5[15]];var User=require(_0x45f5[9])[_0x45f5[16]];exports[_0x45f5[17]]= function(_0x7636x10,_0x7636x11,_0x7636x12){var _0x7636x13={order:_0x45f5[18],include:[{all:true,include:[{all:true}]}]};switch(_0x7636x10[_0x45f5[24]][_0x45f5[23]]){case _0x45f5[21]:_0x7636x13[_0x45f5[19]]= _0x7636x10[_0x45f5[20]];break;case _0x45f5[22]:break;default:};return MailMessage[_0x45f5[29]](_0x7636x13)[_0x45f5[28]](function(_0x7636x15){return _0x7636x11[_0x45f5[27]](200)[_0x45f5[26]](_0x7636x15)})[_0x45f5[25]](function(_0x7636x14){return handleError(_0x7636x11,_0x7636x14,_0x7636x12)})};exports[_0x45f5[30]]= function(_0x7636x10,_0x7636x11){return MailMessage[_0x45f5[30]]()[_0x45f5[28]](function(_0x7636x16){return _0x7636x11[_0x45f5[27]](200)[_0x45f5[26]](_0x7636x16)})[_0x45f5[25]](function(_0x7636x14){return handleError(_0x7636x11,_0x7636x14)})};exports[_0x45f5[31]]= function(_0x7636x10,_0x7636x11,_0x7636x12){return MailMessage[_0x45f5[38]](_0x7636x10[_0x45f5[34]][_0x45f5[33]],{include:[{model:MailAttachment},{model:User,attributes:[_0x45f5[33],_0x45f5[35],_0x45f5[36],_0x45f5[37]]}]})[_0x45f5[28]](function(_0x7636x17){if(!_0x7636x17){return _0x7636x11[_0x45f5[32]](404)};return _0x7636x11[_0x45f5[26]](_0x7636x17)})[_0x45f5[25]](function(_0x7636x14){return handleError(_0x7636x11,_0x7636x14,_0x7636x12)})};exports[_0x45f5[39]]= function(_0x7636x10,_0x7636x11,_0x7636x12){_0x7636x10[_0x45f5[41]][_0x45f5[40]]= _0x7636x10[_0x45f5[24]][_0x45f5[33]];_0x7636x10[_0x45f5[41]][_0x45f5[42]]= _0x7636x10[_0x45f5[24]][_0x45f5[35]];_0x7636x10[_0x45f5[41]][_0x45f5[43]]= _0x7636x10[_0x45f5[24]][_0x45f5[36]];_0x7636x10[_0x45f5[41]][_0x45f5[44]]= _0x7636x10[_0x45f5[41]][_0x45f5[44]]|| htmlToText[_0x45f5[46]](_0x7636x10[_0x45f5[41]][_0x45f5[45]],{wordwrap:false});return MailAccount[_0x45f5[56]]({where:{address:_0x7636x10[_0x45f5[41]][_0x45f5[50]][0]}})[_0x45f5[28]](function(_0x7636x19){_0x7636x10[_0x45f5[41]][_0x45f5[48]]= _0x7636x19[_0x45f5[33]];_0x7636x10[_0x45f5[41]][_0x45f5[49]]= _0x7636x19[_0x45f5[35]];return MailRoom[_0x45f5[39]]({from:_0x7636x10[_0x45f5[41]][_0x45f5[50]][0],subject:_0x7636x10[_0x45f5[41]][_0x45f5[51]],account:_0x7636x19[_0x45f5[35]],mailIn:0,mailOut:1,status:_0x45f5[52],openReason:_0x45f5[22],lastEvent:_0x45f5[53],lastEventAt:moment()[_0x45f5[55]](_0x45f5[54]),MailAccountId:_0x7636x19[_0x45f5[33]],MailMessages:[_0x7636x10[_0x45f5[41]]]},{include:[{model:MailMessage,include:[{model:MailAttachment}]}]})})[_0x45f5[28]](function(_0x7636x18){return _0x7636x11[_0x45f5[27]](201)[_0x45f5[26]](_0x7636x18)})[_0x45f5[25]](function(_0x7636x14){console[_0x45f5[47]](_0x7636x14);return handleError(_0x7636x11,_0x7636x14)})};exports[_0x45f5[57]]= function(_0x7636x10,_0x7636x11,_0x7636x12){return MailMessage[_0x45f5[38]](_0x7636x10[_0x45f5[34]][_0x45f5[33]],{include:[{all:true}]})[_0x45f5[28]](function(_0x7636x17){if(!_0x7636x17){return _0x7636x11[_0x45f5[32]](404)};var _0x7636x1a=_[_0x45f5[58]](_0x7636x17,_0x7636x10[_0x45f5[41]]);return _0x7636x1a[_0x45f5[59]]()})[_0x45f5[28]](function(_0x7636x1a){return _0x7636x11[_0x45f5[27]](200)[_0x45f5[26]](_0x7636x1a)})[_0x45f5[25]](function(_0x7636x14){return handleError(_0x7636x11,_0x7636x14,_0x7636x12)})};exports[_0x45f5[60]]= function(_0x7636x10,_0x7636x11,_0x7636x12){return MailMessage[_0x45f5[38]](_0x7636x10[_0x45f5[34]][_0x45f5[33]])[_0x45f5[28]](function(_0x7636x17){if(!_0x7636x17){return _0x7636x11[_0x45f5[32]](404)};return _0x7636x17[_0x45f5[60]]()})[_0x45f5[28]](function(){return _0x7636x11[_0x45f5[32]](204)})[_0x45f5[25]](function(_0x7636x14){return handleError(_0x7636x11,_0x7636x14,_0x7636x12)})};exports[_0x45f5[61]]= function(_0x7636x10,_0x7636x11,_0x7636x12){return MailMessage[_0x45f5[63]]({where:{id:{$in:_0x7636x10[_0x45f5[41]][_0x45f5[33]]}},attributes:{directory:_0x45f5[62]}})[_0x45f5[28]](function(_0x7636x17){if(!_0x7636x17){return _0x7636x11[_0x45f5[32]](404)};return _0x7636x17[_0x45f5[60]]()})[_0x45f5[28]](function(){return _0x7636x11[_0x45f5[32]](204)})[_0x45f5[25]](function(_0x7636x14){return handleError(_0x7636x11,_0x7636x14,_0x7636x12)})};function handleError(_0x7636x11,_0x7636x14,_0x7636x12){return _0x7636x11[_0x45f5[27]](500)[_0x45f5[26]](_0x7636x14)}
\ No newline at end of file
diff --git a/server/api/mail_message/mail_message.events.js b/server/api/mail_message/mail_message.events.js
index c7fe99a..1c15e2b 100644
--- a/server/api/mail_message/mail_message.events.js
+++ b/server/api/mail_message/mail_message.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const MailMessage = require('../../models').MailMessage;
-
-var MailMessageEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-MailMessageEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  MailMessage.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    MailMessageEvents.emit(event + ':' + doc._id, doc);
-    MailMessageEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = MailMessageEvents;
+var _0xd7d6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd7d6[0];const EventEmitter=require(_0xd7d6[1]);const MailMessage=require(_0xd7d6[3])[_0xd7d6[2]];var MailMessageEvents= new EventEmitter();MailMessageEvents[_0xd7d6[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd7d6[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd7d6[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd7d6[6]};for(var e in events){var event=events[e];MailMessage[_0xd7d6[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7500x8,_0x7500x9,_0x7500xa){MailMessageEvents[_0xd7d6[10]](event+ _0xd7d6[8]+ _0x7500x8[_0xd7d6[9]],_0x7500x8);MailMessageEvents[_0xd7d6[10]](event,_0x7500x8);_0x7500xa(null)}}module[_0xd7d6[11]]= MailMessageEvents
\ No newline at end of file
diff --git a/server/api/mail_message/mail_message.socket.js b/server/api/mail_message/mail_message.socket.js
index bfe4369..0234fe8 100644
--- a/server/api/mail_message/mail_message.socket.js
+++ b/server/api/mail_message/mail_message.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const MailMessageEvents = require('./mail_message.events');
-
-// Model events to emit
-var events = ['save', 'save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('mail_message:' + event, socket);
-
-    MailMessageEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    MailMessageEvents.removeListener(event, listener);
-  };
-}
+var _0xc826=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xc826[0];const MailMessageEvents=require(_0xc826[1]);var events=[_0xc826[2],_0xc826[2],_0xc826[3]];exports[_0xc826[4]]= function(_0x5593x3){for(var _0x5593x4=0,_0x5593x5=events[_0xc826[5]];_0x5593x4< _0x5593x5;_0x5593x4++){var _0x5593x6=events[_0x5593x4];var _0x5593x7=createListener(_0xc826[6]+ _0x5593x6,_0x5593x3);MailMessageEvents[_0xc826[7]](_0x5593x6,_0x5593x7);_0x5593x3[_0xc826[7]](_0xc826[8],removeListener(_0x5593x6,_0x5593x7))}};function createListener(_0x5593x6,_0x5593x3){return function(_0x5593x9){_0x5593x3[_0xc826[9]](_0x5593x6,_0x5593x9)}}function removeListener(_0x5593x6,_0x5593x7){return function(){MailMessageEvents[_0xc826[10]](_0x5593x6,_0x5593x7)}}
\ No newline at end of file
diff --git a/server/api/mail_queue/index.js b/server/api/mail_queue/index.js
index 16acbca..46b5444 100644
--- a/server/api/mail_queue/index.js
+++ b/server/api/mail_queue/index.js
@@ -1,21 +1 @@
-'use strict';
-
-var express = require('express');
-
-var controller = require('./mail_queue.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.index);
-router.get('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.show);
-router.get('/:id/agents', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.showAgents);
-router.post('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasRole('admin'), controller.create);
-router.post('/:id/agents', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasRole('admin'), controller.addAgents);
-router.put('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasRole('admin'), controller.update);
-router.delete('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasRole('admin'), controller.bulkDestroy);
-router.delete('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy);
-router.delete('/:id/agents', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasRole('admin'), controller.removeAgents);
-
-module.exports = router;
+var _0x6067=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4D\x61\x69\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x68\x61\x73\x52\x6F\x6C\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x6067[0];var express=require(_0x6067[1]);var controller=require(_0x6067[2]);var auth=require(_0x6067[3]);var license=require(_0x6067[4]);var router=express.Router();router[_0x6067[12]](_0x6067[5],license[_0x6067[6]](),license[_0x6067[7]](),auth[_0x6067[8]](),auth[_0x6067[10]]([9],[_0x6067[9]]),controller[_0x6067[11]]);router[_0x6067[12]](_0x6067[13],license[_0x6067[6]](),license[_0x6067[7]](),auth[_0x6067[8]](),auth[_0x6067[10]]([9],[_0x6067[9]]),controller[_0x6067[14]]);router[_0x6067[12]](_0x6067[15],license[_0x6067[6]](),license[_0x6067[7]](),auth[_0x6067[8]](),auth[_0x6067[10]]([9],[_0x6067[9]]),controller[_0x6067[16]]);router[_0x6067[19]](_0x6067[5],license[_0x6067[6]](),license[_0x6067[7]](),auth[_0x6067[8]](),auth[_0x6067[17]](_0x6067[9]),controller[_0x6067[18]]);router[_0x6067[19]](_0x6067[15],license[_0x6067[6]](),license[_0x6067[7]](),auth[_0x6067[8]](),auth[_0x6067[17]](_0x6067[9]),controller[_0x6067[20]]);router[_0x6067[22]](_0x6067[13],license[_0x6067[6]](),license[_0x6067[7]](),auth[_0x6067[8]](),auth[_0x6067[17]](_0x6067[9]),controller[_0x6067[21]]);router[_0x6067[24]](_0x6067[5],license[_0x6067[6]](),license[_0x6067[7]](),auth[_0x6067[8]](),auth[_0x6067[17]](_0x6067[9]),controller[_0x6067[23]]);router[_0x6067[24]](_0x6067[13],license[_0x6067[6]](),license[_0x6067[7]](),auth[_0x6067[8]](),auth[_0x6067[17]](_0x6067[9]),controller[_0x6067[25]]);router[_0x6067[24]](_0x6067[15],license[_0x6067[6]](),license[_0x6067[7]](),auth[_0x6067[8]](),auth[_0x6067[17]](_0x6067[9]),controller[_0x6067[26]]);module[_0x6067[27]]= router
\ No newline at end of file
diff --git a/server/api/mail_queue/mail_queue.controller.js b/server/api/mail_queue/mail_queue.controller.js
index 8824524..f5e4279 100644
--- a/server/api/mail_queue/mail_queue.controller.js
+++ b/server/api/mail_queue/mail_queue.controller.js
@@ -1,235 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var Util = require('../../config/util');
-
-var sequelize = require('../../models').sequelize;
-
-var MailQueue = require('../../models').MailQueue;
-var User = require('../../models').User;
-var UserHasMailQueue = require('../../models').UserHasMailQueue;
-
-// Get list of mailQueues
-exports.index = function(req, res) {
-  switch (req.user.role) {
-    case 'user':
-      return User
-        .findById(req.user.id, {
-          attributes: ['id']
-        })
-        .then(Util.getMailQueuesIdByUser(req.query))
-        .then(function(result) {
-          res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-
-    default:
-      return MailQueue
-        .scope('default')
-        .findAndCountAll(_.merge(Util.getQuery(req.query), {
-          distinct: true
-        }))
-        .then(function(result) {
-          res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-  }
-};
-
-// Get a single mailQueue
-exports.show = function(req, res) {
-  return MailQueue
-    .scope('default')
-    .findById(req.params.id)
-    .then(function(mailQueue) {
-      if (!mailQueue) {
-        return res.sendStatus(404);
-      }
-      return res.send(mailQueue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new mailQueue in the DB.
-exports.create = function(req, res) {
-  var _mailQueue;
-
-  return MailQueue
-    .create(req.body)
-    .then(function(mailQueue) {
-      _mailQueue = mailQueue;
-
-      if (req.body.agents) {
-        return _mailQueue
-          .addUsers(req.body.agents, {
-            penalty: req.body.penalty || 0,
-            queue: _mailQueue.name
-          });
-      }
-    })
-    .then(function() {
-      return res.status(201).send(_mailQueue);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing mailQueue in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return MailQueue
-    .findById(req.params.id)
-    .then(function(mailQueue) {
-      if (!mailQueue) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(mailQueue, req.body);
-      return updated
-        .save();
-    })
-    .then(function(mailQueue) {
-      return res.status(200).send(mailQueue);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing user_has_mailQueue in the DB.
-exports.addAgents = function(req, res, next) {
-  return MailQueue
-    .findById(req.params.id)
-    .then(function(mailQueue) {
-      if (!mailQueue) {
-        return res.sendStatus(404);
-      }
-      var userHasMailQueues = _.map(req.body.agents, function(agent) {
-        return {
-          UserId: agent,
-          penalty: req.body.penalty,
-          MailQueueId: mailQueue.id,
-          queue: mailQueue.name
-        };
-      });
-
-      return UserHasMailQueue
-        .bulkCreate(userHasMailQueues, {
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.removeAgents = function(req, res) {
-  return MailQueue
-    .findById(req.params.id)
-    .then(function(queue) {
-      if (!queue) {
-        return res.sendStatus(404);
-      }
-      return queue
-        .removeUsers(req.query.agents, {
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a mailQueue from the DB.
-exports.destroy = function(req, res) {
-  var _mailQueue;
-
-  return MailQueue
-    .findById(req.params.id)
-    .then(function(mailQueue) {
-      _mailQueue = mailQueue;
-      if (!mailQueue) {
-        return res.sendStatus(404);
-      }
-      return mailQueue
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(sequelize.ForeignKeyConstraintError, function(err) {
-      return Util.errorManager.handleForeignKeyConstraintError(res, 'queue', _mailQueue.name, err);
-    })
-    .catch(function(err) {
-      console.error('err', err);
-      return handleError(res, err);
-    });
-};
-
-// Deletes a agent from the DB.
-exports.bulkDestroy = function(req, res) {
-  return MailQueue
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.showAgents = function(req, res) {
-  return MailQueue
-    .findById(req.params.id)
-    .then(function(queue) {
-      if (!queue) {
-        return res.sendStatus(404);
-      }
-      return queue
-        .getUsers({
-          where: {
-            role: 'agent'
-          },
-          attributes: ['id', 'name', 'fullname', 'email']
-        });
-    })
-    .then(function(agents) {
-      return res.status(200).send({
-        rows: agents,
-        count: agents.length
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xf2aa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x55\x73\x65\x72","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x61\x67\x65\x6E\x74\x73","\x62\x6F\x64\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x6E\x61\x6D\x65","\x61\x64\x64\x55\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x65\x72\x72","\x65\x72\x72\x6F\x72","\x71\x75\x65\x75\x65","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73"];_0xf2aa[0];var _=require(_0xf2aa[1]);var util=require(_0xf2aa[2]);var Util=require(_0xf2aa[3]);var sequelize=require(_0xf2aa[5])[_0xf2aa[4]];var MailQueue=require(_0xf2aa[5])[_0xf2aa[6]];var User=require(_0xf2aa[5])[_0xf2aa[7]];var UserHasMailQueue=require(_0xf2aa[5])[_0xf2aa[8]];exports[_0xf2aa[9]]= function(_0x2295x8,_0x2295x9){switch(_0x2295x8[_0xf2aa[17]][_0xf2aa[24]]){case _0xf2aa[17]:return User[_0xf2aa[18]](_0x2295x8[_0xf2aa[17]][_0xf2aa[16]],{attributes:[_0xf2aa[16]]})[_0xf2aa[13]](Util[_0xf2aa[15]](_0x2295x8[_0xf2aa[14]]))[_0xf2aa[13]](function(_0x2295xb){_0x2295x9[_0xf2aa[12]](200)[_0xf2aa[11]](_0x2295xb)})[_0xf2aa[10]](function(_0x2295xa){return handleError(_0x2295x9,_0x2295xa)});default:return MailQueue[_0xf2aa[23]](_0xf2aa[22])[_0xf2aa[21]](_[_0xf2aa[20]](Util[_0xf2aa[19]](_0x2295x8[_0xf2aa[14]]),{distinct:true}))[_0xf2aa[13]](function(_0x2295xb){_0x2295x9[_0xf2aa[12]](200)[_0xf2aa[11]](_0x2295xb)})[_0xf2aa[10]](function(_0x2295xa){return handleError(_0x2295x9,_0x2295xa)})}};exports[_0xf2aa[25]]= function(_0x2295x8,_0x2295x9){return MailQueue[_0xf2aa[23]](_0xf2aa[22])[_0xf2aa[18]](_0x2295x8[_0xf2aa[27]][_0xf2aa[16]])[_0xf2aa[13]](function(_0x2295xc){if(!_0x2295xc){return _0x2295x9[_0xf2aa[26]](404)};return _0x2295x9[_0xf2aa[11]](_0x2295xc)})[_0xf2aa[10]](function(_0x2295xa){return handleError(_0x2295x9,_0x2295xa)})};exports[_0xf2aa[28]]= function(_0x2295x8,_0x2295x9){var _0x2295xd;return MailQueue[_0xf2aa[28]](_0x2295x8[_0xf2aa[32]])[_0xf2aa[13]](function(_0x2295xc){_0x2295xd= _0x2295xc;if(_0x2295x8[_0xf2aa[32]][_0xf2aa[31]]){return _0x2295xd[_0xf2aa[35]](_0x2295x8[_0xf2aa[32]][_0xf2aa[31]],{penalty:_0x2295x8[_0xf2aa[32]][_0xf2aa[33]]|| 0,queue:_0x2295xd[_0xf2aa[34]]})}})[_0xf2aa[13]](function(){return _0x2295x9[_0xf2aa[12]](201)[_0xf2aa[11]](_0x2295xd)})[_0xf2aa[10]](sequelize.UniqueConstraintError,function(_0x2295xa){return Util[_0xf2aa[30]][_0xf2aa[29]](_0x2295x9,_0x2295xa)})[_0xf2aa[10]](function(_0x2295xa){return handleError(_0x2295x9,_0x2295xa)})};exports[_0xf2aa[36]]= function(_0x2295x8,_0x2295x9){if(_0x2295x8[_0xf2aa[32]][_0xf2aa[16]]){delete _0x2295x8[_0xf2aa[32]][_0xf2aa[16]]};return MailQueue[_0xf2aa[18]](_0x2295x8[_0xf2aa[27]][_0xf2aa[16]])[_0xf2aa[13]](function(_0x2295xc){if(!_0x2295xc){return _0x2295x9[_0xf2aa[26]](404)};var _0x2295xe=_[_0xf2aa[20]](_0x2295xc,_0x2295x8[_0xf2aa[32]]);return _0x2295xe[_0xf2aa[37]]()})[_0xf2aa[13]](function(_0x2295xc){return _0x2295x9[_0xf2aa[12]](200)[_0xf2aa[11]](_0x2295xc)})[_0xf2aa[10]](sequelize.UniqueConstraintError,function(_0x2295xa){return Util[_0xf2aa[30]][_0xf2aa[29]](_0x2295x9,_0x2295xa)})[_0xf2aa[10]](function(_0x2295xa){return handleError(_0x2295x9,_0x2295xa)})};exports[_0xf2aa[38]]= function(_0x2295x8,_0x2295x9,_0x2295xf){return MailQueue[_0xf2aa[18]](_0x2295x8[_0xf2aa[27]][_0xf2aa[16]])[_0xf2aa[13]](function(_0x2295xc){if(!_0x2295xc){return _0x2295x9[_0xf2aa[26]](404)};var _0x2295x10=_[_0xf2aa[39]](_0x2295x8[_0xf2aa[32]][_0xf2aa[31]],function(_0x2295x11){return {UserId:_0x2295x11,penalty:_0x2295x8[_0xf2aa[32]][_0xf2aa[33]],MailQueueId:_0x2295xc[_0xf2aa[16]],queue:_0x2295xc[_0xf2aa[34]]}});return UserHasMailQueue[_0xf2aa[40]](_0x2295x10,{individualHooks:true})})[_0xf2aa[13]](function(){return _0x2295x9[_0xf2aa[26]](200)})[_0xf2aa[10]](function(_0x2295xa){return handleError(_0x2295x9,_0x2295xa)})};exports[_0xf2aa[41]]= function(_0x2295x8,_0x2295x9){return MailQueue[_0xf2aa[18]](_0x2295x8[_0xf2aa[27]][_0xf2aa[16]])[_0xf2aa[13]](function(_0x2295x12){if(!_0x2295x12){return _0x2295x9[_0xf2aa[26]](404)};return _0x2295x12[_0xf2aa[42]](_0x2295x8[_0xf2aa[14]][_0xf2aa[31]],{individualHooks:true})})[_0xf2aa[13]](function(){return _0x2295x9[_0xf2aa[26]](200)})[_0xf2aa[10]](function(_0x2295xa){return handleError(_0x2295x9,_0x2295xa)})};exports[_0xf2aa[43]]= function(_0x2295x8,_0x2295x9){var _0x2295xd;return MailQueue[_0xf2aa[18]](_0x2295x8[_0xf2aa[27]][_0xf2aa[16]])[_0xf2aa[13]](function(_0x2295xc){_0x2295xd= _0x2295xc;if(!_0x2295xc){return _0x2295x9[_0xf2aa[26]](404)};return _0x2295xc[_0xf2aa[43]]()})[_0xf2aa[13]](function(){return _0x2295x9[_0xf2aa[26]](204)})[_0xf2aa[10]](sequelize.ForeignKeyConstraintError,function(_0x2295xa){return Util[_0xf2aa[30]][_0xf2aa[47]](_0x2295x9,_0xf2aa[46],_0x2295xd[_0xf2aa[34]],_0x2295xa)})[_0xf2aa[10]](function(_0x2295xa){console[_0xf2aa[45]](_0xf2aa[44],_0x2295xa);return handleError(_0x2295x9,_0x2295xa)})};exports[_0xf2aa[48]]= function(_0x2295x8,_0x2295x9){return MailQueue[_0xf2aa[43]]({where:{id:_0x2295x8[_0xf2aa[14]][_0xf2aa[49]]},individualHooks:true})[_0xf2aa[13]](function(){return _0x2295x9[_0xf2aa[26]](204)})[_0xf2aa[10]](function(_0x2295xa){return handleError(_0x2295x9,_0x2295xa)})};exports[_0xf2aa[50]]= function(_0x2295x8,_0x2295x9){return MailQueue[_0xf2aa[18]](_0x2295x8[_0xf2aa[27]][_0xf2aa[16]])[_0xf2aa[13]](function(_0x2295x12){if(!_0x2295x12){return _0x2295x9[_0xf2aa[26]](404)};return _0x2295x12[_0xf2aa[55]]({where:{role:_0xf2aa[52]},attributes:[_0xf2aa[16],_0xf2aa[34],_0xf2aa[53],_0xf2aa[54]]})})[_0xf2aa[13]](function(_0x2295x13){return _0x2295x9[_0xf2aa[12]](200)[_0xf2aa[11]]({rows:_0x2295x13,count:_0x2295x13[_0xf2aa[51]]})})[_0xf2aa[10]](function(_0x2295xa){return handleError(_0x2295x9,_0x2295xa)})};function handleError(_0x2295x9,_0x2295xa){return _0x2295x9[_0xf2aa[12]](500)[_0xf2aa[11]](_0x2295xa)}
\ No newline at end of file
diff --git a/server/api/mail_queue/mail_queue.events.js b/server/api/mail_queue/mail_queue.events.js
index 7f926cc..1273edc 100644
--- a/server/api/mail_queue/mail_queue.events.js
+++ b/server/api/mail_queue/mail_queue.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const MailQueue = require('../../models').MailQueue;
-
-var MailQueueEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-MailQueueEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  MailQueue.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    MailQueueEvents.emit(event + ':' + doc._id, doc);
-    MailQueueEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = MailQueueEvents;
+var _0x443e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x443e[0];const EventEmitter=require(_0x443e[1]);const MailQueue=require(_0x443e[3])[_0x443e[2]];var MailQueueEvents= new EventEmitter();MailQueueEvents[_0x443e[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x443e[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x443e[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x443e[6]};for(var e in events){var event=events[e];MailQueue[_0x443e[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x78c4x8,_0x78c4x9,_0x78c4xa){MailQueueEvents[_0x443e[10]](event+ _0x443e[8]+ _0x78c4x8[_0x443e[9]],_0x78c4x8);MailQueueEvents[_0x443e[10]](event,_0x78c4x8);_0x78c4xa(null)}}module[_0x443e[11]]= MailQueueEvents
\ No newline at end of file
diff --git a/server/api/mail_queue/mail_queue.socket.js b/server/api/mail_queue/mail_queue.socket.js
index dca86ad..63c8d2b 100644
--- a/server/api/mail_queue/mail_queue.socket.js
+++ b/server/api/mail_queue/mail_queue.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const MailQueueEvents = require('./mail_queue.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('mail_queue:' + event, socket);
-
-    MailQueueEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    MailQueueEvents.removeListener(event, listener);
-  };
-}
+var _0xf767=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xf767[0];const MailQueueEvents=require(_0xf767[1]);var events=[_0xf767[2],_0xf767[3]];exports[_0xf767[4]]= function(_0xb1d6x3){for(var _0xb1d6x4=0,_0xb1d6x5=events[_0xf767[5]];_0xb1d6x4< _0xb1d6x5;_0xb1d6x4++){var _0xb1d6x6=events[_0xb1d6x4];var _0xb1d6x7=createListener(_0xf767[6]+ _0xb1d6x6,_0xb1d6x3);MailQueueEvents[_0xf767[7]](_0xb1d6x6,_0xb1d6x7);_0xb1d6x3[_0xf767[7]](_0xf767[8],removeListener(_0xb1d6x6,_0xb1d6x7))}};function createListener(_0xb1d6x6,_0xb1d6x3){return function(_0xb1d6x9){_0xb1d6x3[_0xf767[9]](_0xb1d6x6,_0xb1d6x9)}}function removeListener(_0xb1d6x6,_0xb1d6x7){return function(){MailQueueEvents[_0xf767[10]](_0xb1d6x6,_0xb1d6x7)}}
\ No newline at end of file
diff --git a/server/api/mail_room/index.js b/server/api/mail_room/index.js
index 376f392..8eb6f66 100644
--- a/server/api/mail_room/index.js
+++ b/server/api/mail_room/index.js
@@ -1,32 +1 @@
-'use strict';
-
-var express = require('express');
-
-var controller = require('./mail_room.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-// TODO endpoint to filter just NEW/OPEN
-router.get('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.index);
-router.get('/inbox', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.inbox);
-router.get('/describe', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.describe);
-router.get('/pending', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9, 17], ['admin']), controller.pending);
-router.get('/new', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9, 17], ['admin']), controller.new);
-router.get('/open', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9, 17], ['admin']), controller.open);
-router.get('/closed', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9, 17], ['admin']), controller.closed);
-router.get('/agent/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.agentIndex);
-router.get('/messages/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.getRoomByMessage);
-router.get('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'user', 'agent']), controller.show);
-router.get('/:id/agents', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.showAgents);
-router.post('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.create);
-router.post('/:id/messages/send', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.sendMessage);
-// router.post('/:id/messages/receive', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.receiveMessage);
-router.put('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.update);
-router.patch('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.updatePatch);
-router.put('/:id/agents', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.updateAgents);
-router.delete('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.bulkDestroy);
-router.delete('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0x22ca=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4D\x61\x69\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x69\x6E\x62\x6F\x78","\x61\x67\x65\x6E\x74","\x69\x6E\x62\x6F\x78","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x70\x65\x6E\x64\x69\x6E\x67","\x70\x65\x6E\x64\x69\x6E\x67","\x2F\x6E\x65\x77","\x6E\x65\x77","\x2F\x6F\x70\x65\x6E","\x6F\x70\x65\x6E","\x2F\x63\x6C\x6F\x73\x65\x64","\x63\x6C\x6F\x73\x65\x64","\x2F\x61\x67\x65\x6E\x74\x2F\x3A\x69\x64","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x2F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F\x3A\x69\x64","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64","\x75\x73\x65\x72","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F\x73\x65\x6E\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x70\x61\x74\x63\x68","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x22ca[0];var express=require(_0x22ca[1]);var controller=require(_0x22ca[2]);var auth=require(_0x22ca[3]);var license=require(_0x22ca[4]);var router=express.Router();router[_0x22ca[12]](_0x22ca[5],license[_0x22ca[6]](),license[_0x22ca[7]](),auth[_0x22ca[8]](),auth[_0x22ca[10]]([9],[_0x22ca[9]]),controller[_0x22ca[11]]);router[_0x22ca[12]](_0x22ca[13],license[_0x22ca[6]](),license[_0x22ca[7]](),auth[_0x22ca[8]](),auth[_0x22ca[10]]([9],[_0x22ca[9],_0x22ca[14]]),controller[_0x22ca[15]]);router[_0x22ca[12]](_0x22ca[16],license[_0x22ca[6]](),license[_0x22ca[7]](),auth[_0x22ca[8]](),auth[_0x22ca[10]]([9],[_0x22ca[9]]),controller[_0x22ca[17]]);router[_0x22ca[12]](_0x22ca[18],license[_0x22ca[6]](),license[_0x22ca[7]](),auth[_0x22ca[8]](),auth[_0x22ca[10]]([9,17],[_0x22ca[9]]),controller[_0x22ca[19]]);router[_0x22ca[12]](_0x22ca[20],license[_0x22ca[6]](),license[_0x22ca[7]](),auth[_0x22ca[8]](),auth[_0x22ca[10]]([9,17],[_0x22ca[9]]),controller[_0x22ca[21]]);router[_0x22ca[12]](_0x22ca[22],license[_0x22ca[6]](),license[_0x22ca[7]](),auth[_0x22ca[8]](),auth[_0x22ca[10]]([9,17],[_0x22ca[9]]),controller[_0x22ca[23]]);router[_0x22ca[12]](_0x22ca[24],license[_0x22ca[6]](),license[_0x22ca[7]](),auth[_0x22ca[8]](),auth[_0x22ca[10]]([9,17],[_0x22ca[9]]),controller[_0x22ca[25]]);router[_0x22ca[12]](_0x22ca[26],license[_0x22ca[6]](),license[_0x22ca[7]](),auth[_0x22ca[8]](),auth[_0x22ca[10]]([9],[_0x22ca[9]]),controller[_0x22ca[27]]);router[_0x22ca[12]](_0x22ca[28],license[_0x22ca[6]](),license[_0x22ca[7]](),auth[_0x22ca[8]](),auth[_0x22ca[10]]([9],[_0x22ca[9],_0x22ca[14]]),controller[_0x22ca[29]]);router[_0x22ca[12]](_0x22ca[30],license[_0x22ca[6]](),license[_0x22ca[7]](),auth[_0x22ca[8]](),auth[_0x22ca[10]]([9],[_0x22ca[9],_0x22ca[31],_0x22ca[14]]),controller[_0x22ca[32]]);router[_0x22ca[12]](_0x22ca[33],license[_0x22ca[6]](),license[_0x22ca[7]](),auth[_0x22ca[8]](),auth[_0x22ca[10]]([9],[_0x22ca[9],_0x22ca[14]]),controller[_0x22ca[34]]);router[_0x22ca[36]](_0x22ca[5],license[_0x22ca[6]](),license[_0x22ca[7]](),auth[_0x22ca[8]](),auth[_0x22ca[10]]([9],[_0x22ca[9]]),controller[_0x22ca[35]]);router[_0x22ca[36]](_0x22ca[37],license[_0x22ca[6]](),license[_0x22ca[7]](),auth[_0x22ca[8]](),auth[_0x22ca[10]]([9],[_0x22ca[9],_0x22ca[14]]),controller[_0x22ca[38]]);router[_0x22ca[40]](_0x22ca[30],license[_0x22ca[6]](),license[_0x22ca[7]](),auth[_0x22ca[8]](),auth[_0x22ca[10]]([9],[_0x22ca[9],_0x22ca[14]]),controller[_0x22ca[39]]);router[_0x22ca[42]](_0x22ca[30],license[_0x22ca[6]](),license[_0x22ca[7]](),auth[_0x22ca[8]](),auth[_0x22ca[10]]([9],[_0x22ca[9],_0x22ca[14]]),controller[_0x22ca[41]]);router[_0x22ca[40]](_0x22ca[33],license[_0x22ca[6]](),license[_0x22ca[7]](),auth[_0x22ca[8]](),auth[_0x22ca[10]]([9],[_0x22ca[9],_0x22ca[14]]),controller[_0x22ca[43]]);router[_0x22ca[45]](_0x22ca[5],license[_0x22ca[6]](),license[_0x22ca[7]](),auth[_0x22ca[8]](),auth[_0x22ca[10]]([9],[_0x22ca[9]]),controller[_0x22ca[44]]);router[_0x22ca[45]](_0x22ca[30],license[_0x22ca[6]](),license[_0x22ca[7]](),auth[_0x22ca[8]](),auth[_0x22ca[10]]([9],[_0x22ca[9]]),controller[_0x22ca[46]]);module[_0x22ca[47]]= router
\ No newline at end of file
diff --git a/server/api/mail_room/mail_room.controller.js b/server/api/mail_room/mail_room.controller.js
index d807221..52979f1 100644
--- a/server/api/mail_room/mail_room.controller.js
+++ b/server/api/mail_room/mail_room.controller.js
@@ -1,484 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var htmlToText = require('html-to-text');
-
-var Util = require('../../config/util');
-var moment = require('moment');
-
-var sequelize = require('../../models').sequelize;
-var User = require('../../models').User;
-var Agent = require('../../models').User;
-var Contact = require('../../models').Contact;
-var Status = require('../../models').MailRoomStatus;
-var MailRoom = require('../../models').MailRoom;
-var MailMessage = require('../../models').MailMessage;
-var MailAccount = require('../../models').MailAccount;
-var MailApplication = require('../../models').MailApplication;
-var MailQueue = require('../../models').MailQueue;
-var MailAttachment = require('../../models').MailAttachment;
-
-// Get list of mailRooms
-exports.index = function(req, res, next) {
-  return MailRoom
-    .scope('default')
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return MailRoom
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function getMailQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return User
-          .findById(user.id, {
-            attributes: ['id']
-          })
-          .then(Util.getMailQueuesIdByUser({}, {
-            attributes: ['id']
-          }))
-          .then(function(userQueues) {
-            return {
-              include: {
-                model: MailAccount,
-                include: {
-                  model: MailApplication,
-                  include: {
-                    model: MailQueue,
-                    where: {
-                      id: _.map(userQueues, 'id')
-                    }
-                  }
-                }
-              }
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
-
-exports.pending = function(req, res) {
-  return Promise
-    .all([])
-    .then(getMailQueues(req.user))
-    .then(function(condition) {
-      return MailRoom
-        .count(_.merge(Util.getQuery(req.query, {
-          status: 'PENDING',
-          updatedAt: {
-            $gte: moment().startOf('day')
-          }
-        }), condition));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.new = function(req, res) {
-  return Promise
-    .all([])
-    .then(getMailQueues(req.user))
-    .then(function(condition) {
-      return MailRoom
-        .count(_.merge(Util.getQuery(req.query, {
-          status: 'NEW',
-          updatedAt: {
-            $gte: moment().startOf('day')
-          }
-        }), condition));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.open = function(req, res) {
-  return Promise
-    .all([])
-    .then(getMailQueues(req.user))
-    .then(function(condition) {
-      return MailRoom
-        .count(_.merge(Util.getQuery(req.query, {
-          status: 'OPEN',
-          updatedAt: {
-            $gte: moment().startOf('day')
-          }
-        }), condition));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.closed = function(req, res) {
-  return Promise
-    .all([])
-    .then(getMailQueues(req.user))
-    .then(function(condition) {
-      return MailRoom
-        .count(_.merge(Util.getQuery(req.query, {
-          status: 'CLOSED',
-          updatedAt: {
-            $gte: moment().startOf('day')
-          }
-        }), condition));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.inbox = function(req, res, next) {
-  switch (req.user.role) {
-    case 'agent':
-
-      return sequelize.query(
-          'SELECT `MailRoom`.`id`, `MailRoom`.`subject`, `MailRoom`.`from`, `MailRoom`.`account`, `MailRoom`.`status`, `MailRoom`.`lastEvent`, `MailRoom`.`updatedAt` FROM `mail_rooms` AS `MailRoom` LEFT OUTER JOIN (`user_has_mail_rooms` AS `Users.user_has_mail_rooms` INNER JOIN `users` AS `Users` ON `Users`.`id` = `Users.user_has_mail_rooms`.`UserId`) ON `MailRoom`.`id` = `Users.user_has_mail_rooms`.`MailRoomId` WHERE (`MailRoom`.`deletedAt` IS NULL AND (`MailRoom`.`status` = :status OR `Users`.`id` = :id))', {
-            replacements: {
-              status: 'UNMANAGED',
-              id: req.user.id
-            },
-            type: sequelize.QueryTypes.SELECT
-          })
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.error(err);
-          return handleError(res, err);
-        });
-
-    default:
-
-      return sequelize.query(
-          'SELECT `id`, `subject`, `from`, `account`, `status`, `lastEvent` ,`updatedAt` FROM `mail_rooms` WHERE `mail_rooms`.`deletedAt` IS NULL', {
-            replacements: {
-              status: 'UNMANAGED',
-              id: req.user.id
-            },
-            type: sequelize.QueryTypes.SELECT
-          })
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-  }
-};
-
-// Get list of agent mailRooms
-exports.agentIndex = function(req, res, next) {
-  return MailRoom
-    .findAll({
-      where: {
-        UserId: req.params.id
-      },
-      include: [{
-        all: true
-      }]
-    })
-    .then(function(mailRooms) {
-      return res.status(200).send(mailRooms);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get list of agent mailRooms
-exports.updateRoomStatus = function(req, res, next) {
-  var _mailRoom;
-  var _promises = [];
-
-  console.log(req.body);
-  console.log(req.params);
-
-  return MailRoom
-    .update(req.body, {
-      where: {
-        id: req.params.id.split(',')
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return Status
-        .bulkCreate(_.map(req.params.id.split(','), function(id) {
-          return {
-            status: req.body.status,
-            data1: req.user.name,
-            data2: req.user.fullname,
-            MailRoomId: id,
-            UserId: req.user.id
-          }
-        }));
-    })
-    .then(function(mailRooms) {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getRoomByMessage = function(req, res, next) {
-  return MailMessage
-    .findById(req.params.id)
-    .then(function(mailMessage) {
-      return mailMessage
-        .getMailRoom({
-          include: [{
-            model: MailAccount
-          }, {
-            model: MailMessage,
-            include: [{
-              model: MailAttachment
-            }, {
-              model: User,
-              attributes: ['id', 'name', 'fullname', 'email']
-            }]
-          }, {
-            model: User,
-            attributes: ['id', 'name', 'fullname', 'email']
-          }]
-        });
-    })
-    .then(function(mailRoom) {
-      return res.send(mailRoom);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single mailRoom
-exports.show = function(req, res, next) {
-  return MailRoom
-    .scope('default')
-    .findById(req.params.id)
-    .then(function(mailRoom) {
-      if (!mailRoom) {
-        return res.sendStatus(404);
-      }
-      return res.send(mailRoom);
-    })
-    .catch(function(err) {
-      console.error(err);
-      return handleError(res, err);
-    });
-};
-
-// Get a single mailRoom
-exports.showAgents = function(req, res, next) {
-  return MailRoom
-    .findById(req.params.id)
-    .then(function(mailRoom) {
-      if (!mailRoom) {
-        return res.sendStatus(404);
-      }
-
-      return mailRoom
-        .getUsers({
-          attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal']
-        });
-    })
-    .then(function(users) {
-      return res.send(users);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new mailRoom in the DB.
-exports.create = function(req, res, next) {
-  return MailRoom
-    .create(req.body)
-    .then(function(mailRoom) {
-      return res.status(201).send(mailRoom);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new mailMessage in the DB.
-exports.sendMessage = function(req, res, next) {
-  req.body.UserId = req.user.id;
-  req.body.MailRoomId = req.params.id;
-  req.body.attachment = (req.body.MailAttachments && req.body.MailAttachments.length) ? true : false;
-  req.body.text = req.body.text || htmlToText.fromString(req.body.html, {
-    wordwrap: false
-  });
-  return MailRoom
-    .findById(req.params.id)
-    .then(function(mailRoom) {
-      req.body.accountId = mailRoom.MailAccountId;
-      return MailMessage
-        .create(req.body, {
-          include: [{
-            model: MailAttachment
-          }],
-          user: req.user
-        });
-    })
-    .then(function(mailMessage) {
-      return res.status(201).send(mailMessage);
-
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing mailRoom in the DB.
-exports.update = function(req, res, next) {
-  return MailRoom
-    .findById(req.params.id)
-    .then(function(mailRoom) {
-      if (!mailRoom) {
-        return res.sendStatus(404);
-      }
-
-      return mailRoom
-        .update(req.body);
-    })
-    .then(function(mailRoom) {
-      return res.status(200).send(mailRoom);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing mailRoom in the DB.
-exports.updatePatch = function(req, res, next) {
-  var _options = {
-    where: {
-      id: req.params.id.split(',')
-    },
-    user: req.user,
-    individualHooks: true
-  };
-
-  return MailRoom
-    .update(req.body, _options)
-    .then(function(mailRooms) {
-      if (!mailRooms) {
-        return res.sendStatus(404);
-      }
-      return mailRooms
-    })
-    .then(function(mailRooms) {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single mailRoom
-exports.updateAgents = function(req, res, next) {
-  return MailRoom
-    .findById(req.params.id)
-    .then(function(mailRoom) {
-      if (!mailRoom) {
-        return res.sendStatus(404);
-      }
-
-      return mailRoom
-        .setUsers(req.body.agents, {
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a mailRoom from the DB.
-exports.destroy = function(req, res, next) {
-  return MailRoom
-    .findById(req.params.id)
-    .then(function(mailRoom) {
-      if (!mailRoom) {
-        return res.sendStatus(404);
-      }
-      return mailRoom.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a agent from the DB.
-exports.bulkDestroy = function(req, res) {
-  return MailRoom
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x6121=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x68\x74\x6D\x6C\x2D\x74\x6F\x2D\x74\x65\x78\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x72\x6F\x6C\x65","\x70\x65\x6E\x64\x69\x6E\x67","\x6C\x6F\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x6E\x65\x77","\x4E\x45\x57","\x6F\x70\x65\x6E","\x4F\x50\x45\x4E","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x69\x6E\x62\x6F\x78","\x65\x72\x72\x6F\x72","\x53\x45\x4C\x45\x43\x54\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x2C\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x75\x62\x6A\x65\x63\x74\x60\x2C\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x2C\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x20\x4C\x45\x46\x54\x20\x4F\x55\x54\x45\x52\x20\x4A\x4F\x49\x4E\x20\x28\x60\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x49\x4E\x4E\x45\x52\x20\x4A\x4F\x49\x4E\x20\x60\x75\x73\x65\x72\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x60\x20\x4F\x4E\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x55\x73\x65\x72\x49\x64\x60\x29\x20\x4F\x4E\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64\x60\x20\x57\x48\x45\x52\x45\x20\x28\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C\x20\x41\x4E\x44\x20\x28\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x20\x3D\x20\x3A\x73\x74\x61\x74\x75\x73\x20\x4F\x52\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x3A\x69\x64\x29\x29","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x61\x67\x65\x6E\x74","\x53\x45\x4C\x45\x43\x54\x20\x60\x69\x64\x60\x2C\x20\x60\x73\x75\x62\x6A\x65\x63\x74\x60\x2C\x20\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x20\x2C\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x57\x48\x45\x52\x45\x20\x60\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x75\x70\x64\x61\x74\x65\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x62\x6F\x64\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x2C","\x73\x70\x6C\x69\x74","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x74\x65\x78\x74","\x68\x74\x6D\x6C","\x66\x72\x6F\x6D\x53\x74\x72\x69\x6E\x67","\x61\x63\x63\x6F\x75\x6E\x74\x49\x64","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x6121[0];var _=require(_0x6121[1]);var util=require(_0x6121[2]);var htmlToText=require(_0x6121[3]);var Util=require(_0x6121[4]);var moment=require(_0x6121[5]);var sequelize=require(_0x6121[7])[_0x6121[6]];var User=require(_0x6121[7])[_0x6121[8]];var Agent=require(_0x6121[7])[_0x6121[8]];var Contact=require(_0x6121[7])[_0x6121[9]];var Status=require(_0x6121[7])[_0x6121[10]];var MailRoom=require(_0x6121[7])[_0x6121[11]];var MailMessage=require(_0x6121[7])[_0x6121[12]];var MailAccount=require(_0x6121[7])[_0x6121[13]];var MailApplication=require(_0x6121[7])[_0x6121[14]];var MailQueue=require(_0x6121[7])[_0x6121[15]];var MailAttachment=require(_0x6121[7])[_0x6121[16]];exports[_0x6121[17]]= function(_0x219bx11,_0x219bx12,_0x219bx13){return MailRoom[_0x6121[26]](_0x6121[25])[_0x6121[24]](Util[_0x6121[23]](_0x219bx11[_0x6121[22]]))[_0x6121[21]](function(_0x219bx15){return _0x219bx12[_0x6121[20]](200)[_0x6121[19]](_0x219bx15)})[_0x6121[18]](function(_0x219bx14){return handleError(_0x219bx12,_0x219bx14)})};exports[_0x6121[27]]= function(_0x219bx11,_0x219bx12){return MailRoom[_0x6121[27]]()[_0x6121[21]](function(_0x219bx16){return _0x219bx12[_0x6121[20]](200)[_0x6121[19]](_0x219bx16)})[_0x6121[18]](function(_0x219bx14){return handleError(_0x219bx12,_0x219bx14)})};function getMailQueues(_0x219bx18){return function(){switch(_0x219bx18[_0x6121[33]]){case _0x6121[32]:return User[_0x6121[31]](_0x219bx18[_0x6121[28]],{attributes:[_0x6121[28]]})[_0x6121[21]](Util[_0x6121[30]]({},{attributes:[_0x6121[28]]}))[_0x6121[21]](function(_0x219bx19){return {include:{model:MailAccount,include:{model:MailApplication,include:{model:MailQueue,where:{id:_[_0x6121[29]](_0x219bx19,_0x6121[28])}}}}}});default:return {}}}}exports[_0x6121[34]]= function(_0x219bx11,_0x219bx12){return Promise[_0x6121[41]]([])[_0x6121[21]](getMailQueues(_0x219bx11[_0x6121[32]]))[_0x6121[21]](function(_0x219bx1b){return MailRoom[_0x6121[40]](_[_0x6121[39]](Util[_0x6121[23]](_0x219bx11[_0x6121[22]],{status:_0x6121[36],updatedAt:{$gte:moment()[_0x6121[38]](_0x6121[37])}}),_0x219bx1b))})[_0x6121[21]](function(_0x219bx1a){return _0x219bx12[_0x6121[20]](200)[_0x6121[19]]({value:_0x219bx1a})})[_0x6121[18]](function(_0x219bx14){console[_0x6121[35]](_0x219bx14);return handleError(_0x219bx12,_0x219bx14)})};exports[_0x6121[42]]= function(_0x219bx11,_0x219bx12){return Promise[_0x6121[41]]([])[_0x6121[21]](getMailQueues(_0x219bx11[_0x6121[32]]))[_0x6121[21]](function(_0x219bx1b){return MailRoom[_0x6121[40]](_[_0x6121[39]](Util[_0x6121[23]](_0x219bx11[_0x6121[22]],{status:_0x6121[43],updatedAt:{$gte:moment()[_0x6121[38]](_0x6121[37])}}),_0x219bx1b))})[_0x6121[21]](function(_0x219bx1a){return _0x219bx12[_0x6121[20]](200)[_0x6121[19]]({value:_0x219bx1a})})[_0x6121[18]](function(_0x219bx14){console[_0x6121[35]](_0x219bx14);return handleError(_0x219bx12,_0x219bx14)})};exports[_0x6121[44]]= function(_0x219bx11,_0x219bx12){return Promise[_0x6121[41]]([])[_0x6121[21]](getMailQueues(_0x219bx11[_0x6121[32]]))[_0x6121[21]](function(_0x219bx1b){return MailRoom[_0x6121[40]](_[_0x6121[39]](Util[_0x6121[23]](_0x219bx11[_0x6121[22]],{status:_0x6121[45],updatedAt:{$gte:moment()[_0x6121[38]](_0x6121[37])}}),_0x219bx1b))})[_0x6121[21]](function(_0x219bx1a){return _0x219bx12[_0x6121[20]](200)[_0x6121[19]]({value:_0x219bx1a})})[_0x6121[18]](function(_0x219bx14){console[_0x6121[35]](_0x219bx14);return handleError(_0x219bx12,_0x219bx14)})};exports[_0x6121[46]]= function(_0x219bx11,_0x219bx12){return Promise[_0x6121[41]]([])[_0x6121[21]](getMailQueues(_0x219bx11[_0x6121[32]]))[_0x6121[21]](function(_0x219bx1b){return MailRoom[_0x6121[40]](_[_0x6121[39]](Util[_0x6121[23]](_0x219bx11[_0x6121[22]],{status:_0x6121[47],updatedAt:{$gte:moment()[_0x6121[38]](_0x6121[37])}}),_0x219bx1b))})[_0x6121[21]](function(_0x219bx1a){return _0x219bx12[_0x6121[20]](200)[_0x6121[19]]({value:_0x219bx1a})})[_0x6121[18]](function(_0x219bx14){console[_0x6121[35]](_0x219bx14);return handleError(_0x219bx12,_0x219bx14)})};exports[_0x6121[48]]= function(_0x219bx11,_0x219bx12,_0x219bx13){switch(_0x219bx11[_0x6121[32]][_0x6121[33]]){case _0x6121[54]:return sequelize[_0x6121[22]](_0x6121[50],{replacements:{status:_0x6121[51],id:_0x219bx11[_0x6121[32]][_0x6121[28]]},type:sequelize[_0x6121[53]][_0x6121[52]]})[_0x6121[21]](function(_0x219bx15){return _0x219bx12[_0x6121[20]](200)[_0x6121[19]](_0x219bx15)})[_0x6121[18]](function(_0x219bx14){console[_0x6121[49]](_0x219bx14);return handleError(_0x219bx12,_0x219bx14)});default:return sequelize[_0x6121[22]](_0x6121[55],{replacements:{status:_0x6121[51],id:_0x219bx11[_0x6121[32]][_0x6121[28]]},type:sequelize[_0x6121[53]][_0x6121[52]]})[_0x6121[21]](function(_0x219bx15){return _0x219bx12[_0x6121[20]](200)[_0x6121[19]](_0x219bx15)})[_0x6121[18]](function(_0x219bx14){return handleError(_0x219bx12,_0x219bx14)})}};exports[_0x6121[56]]= function(_0x219bx11,_0x219bx12,_0x219bx13){return MailRoom[_0x6121[58]]({where:{UserId:_0x219bx11[_0x6121[57]][_0x6121[28]]},include:[{all:true}]})[_0x6121[21]](function(_0x219bx1c){return _0x219bx12[_0x6121[20]](200)[_0x6121[19]](_0x219bx1c)})[_0x6121[18]](function(_0x219bx14){return handleError(_0x219bx12,_0x219bx14)})};exports[_0x6121[59]]= function(_0x219bx11,_0x219bx12,_0x219bx13){var _0x219bx1d;var _0x219bx1e=[];console[_0x6121[35]](_0x219bx11[_0x6121[60]]);console[_0x6121[35]](_0x219bx11[_0x6121[57]]);return MailRoom[_0x6121[67]](_0x219bx11[_0x6121[60]],{where:{id:_0x219bx11[_0x6121[57]][_0x6121[28]][_0x6121[63]](_0x6121[62])},individualHooks:true})[_0x6121[21]](function(){return Status[_0x6121[66]](_[_0x6121[29]](_0x219bx11[_0x6121[57]][_0x6121[28]][_0x6121[63]](_0x6121[62]),function(_0x219bx1f){return {status:_0x219bx11[_0x6121[60]][_0x6121[20]],data1:_0x219bx11[_0x6121[32]][_0x6121[64]],data2:_0x219bx11[_0x6121[32]][_0x6121[65]],MailRoomId:_0x219bx1f,UserId:_0x219bx11[_0x6121[32]][_0x6121[28]]}}))})[_0x6121[21]](function(_0x219bx1c){return _0x219bx12[_0x6121[61]](200)})[_0x6121[18]](function(_0x219bx14){return handleError(_0x219bx12,_0x219bx14)})};exports[_0x6121[68]]= function(_0x219bx11,_0x219bx12,_0x219bx13){return MailMessage[_0x6121[31]](_0x219bx11[_0x6121[57]][_0x6121[28]])[_0x6121[21]](function(_0x219bx21){return _0x219bx21[_0x6121[70]]({include:[{model:MailAccount},{model:MailMessage,include:[{model:MailAttachment},{model:User,attributes:[_0x6121[28],_0x6121[64],_0x6121[65],_0x6121[69]]}]},{model:User,attributes:[_0x6121[28],_0x6121[64],_0x6121[65],_0x6121[69]]}]})})[_0x6121[21]](function(_0x219bx20){return _0x219bx12[_0x6121[19]](_0x219bx20)})[_0x6121[18]](function(_0x219bx14){return handleError(_0x219bx12,_0x219bx14)})};exports[_0x6121[71]]= function(_0x219bx11,_0x219bx12,_0x219bx13){return MailRoom[_0x6121[26]](_0x6121[25])[_0x6121[31]](_0x219bx11[_0x6121[57]][_0x6121[28]])[_0x6121[21]](function(_0x219bx20){if(!_0x219bx20){return _0x219bx12[_0x6121[61]](404)};return _0x219bx12[_0x6121[19]](_0x219bx20)})[_0x6121[18]](function(_0x219bx14){console[_0x6121[49]](_0x219bx14);return handleError(_0x219bx12,_0x219bx14)})};exports[_0x6121[72]]= function(_0x219bx11,_0x219bx12,_0x219bx13){return MailRoom[_0x6121[31]](_0x219bx11[_0x6121[57]][_0x6121[28]])[_0x6121[21]](function(_0x219bx20){if(!_0x219bx20){return _0x219bx12[_0x6121[61]](404)};return _0x219bx20[_0x6121[74]]({attributes:[_0x6121[28],_0x6121[64],_0x6121[65],_0x6121[69],_0x6121[33],_0x6121[73]]})})[_0x6121[21]](function(_0x219bx22){return _0x219bx12[_0x6121[19]](_0x219bx22)})[_0x6121[18]](function(_0x219bx14){return handleError(_0x219bx12,_0x219bx14)})};exports[_0x6121[75]]= function(_0x219bx11,_0x219bx12,_0x219bx13){return MailRoom[_0x6121[75]](_0x219bx11[_0x6121[60]])[_0x6121[21]](function(_0x219bx20){return _0x219bx12[_0x6121[20]](201)[_0x6121[19]](_0x219bx20)})[_0x6121[18]](function(_0x219bx14){return handleError(_0x219bx12,_0x219bx14)})};exports[_0x6121[76]]= function(_0x219bx11,_0x219bx12,_0x219bx13){_0x219bx11[_0x6121[60]][_0x6121[77]]= _0x219bx11[_0x6121[32]][_0x6121[28]];_0x219bx11[_0x6121[60]][_0x6121[78]]= _0x219bx11[_0x6121[57]][_0x6121[28]];_0x219bx11[_0x6121[60]][_0x6121[79]]= (_0x219bx11[_0x6121[60]][_0x6121[80]]&& _0x219bx11[_0x6121[60]][_0x6121[80]][_0x6121[81]])?true:false;_0x219bx11[_0x6121[60]][_0x6121[82]]= _0x219bx11[_0x6121[60]][_0x6121[82]]|| htmlToText[_0x6121[84]](_0x219bx11[_0x6121[60]][_0x6121[83]],{wordwrap:false});return MailRoom[_0x6121[31]](_0x219bx11[_0x6121[57]][_0x6121[28]])[_0x6121[21]](function(_0x219bx20){_0x219bx11[_0x6121[60]][_0x6121[85]]= _0x219bx20[_0x6121[86]];return MailMessage[_0x6121[75]](_0x219bx11[_0x6121[60]],{include:[{model:MailAttachment}],user:_0x219bx11[_0x6121[32]]})})[_0x6121[21]](function(_0x219bx21){return _0x219bx12[_0x6121[20]](201)[_0x6121[19]](_0x219bx21)})[_0x6121[18]](function(_0x219bx14){return handleError(_0x219bx12,_0x219bx14)})};exports[_0x6121[67]]= function(_0x219bx11,_0x219bx12,_0x219bx13){return MailRoom[_0x6121[31]](_0x219bx11[_0x6121[57]][_0x6121[28]])[_0x6121[21]](function(_0x219bx20){if(!_0x219bx20){return _0x219bx12[_0x6121[61]](404)};return _0x219bx20[_0x6121[67]](_0x219bx11[_0x6121[60]])})[_0x6121[21]](function(_0x219bx20){return _0x219bx12[_0x6121[20]](200)[_0x6121[19]](_0x219bx20)})[_0x6121[18]](function(_0x219bx14){return handleError(_0x219bx12,_0x219bx14)})};exports[_0x6121[87]]= function(_0x219bx11,_0x219bx12,_0x219bx13){var _0x219bx23={where:{id:_0x219bx11[_0x6121[57]][_0x6121[28]][_0x6121[63]](_0x6121[62])},user:_0x219bx11[_0x6121[32]],individualHooks:true};return MailRoom[_0x6121[67]](_0x219bx11[_0x6121[60]],_0x219bx23)[_0x6121[21]](function(_0x219bx1c){if(!_0x219bx1c){return _0x219bx12[_0x6121[61]](404)};return _0x219bx1c})[_0x6121[21]](function(_0x219bx1c){return _0x219bx12[_0x6121[61]](200)})[_0x6121[18]](function(_0x219bx14){return handleError(_0x219bx12,_0x219bx14)})};exports[_0x6121[88]]= function(_0x219bx11,_0x219bx12,_0x219bx13){return MailRoom[_0x6121[31]](_0x219bx11[_0x6121[57]][_0x6121[28]])[_0x6121[21]](function(_0x219bx20){if(!_0x219bx20){return _0x219bx12[_0x6121[61]](404)};return _0x219bx20[_0x6121[90]](_0x219bx11[_0x6121[60]][_0x6121[89]],{individualHooks:true})})[_0x6121[21]](function(){return _0x219bx12[_0x6121[61]](200)})[_0x6121[18]](function(_0x219bx14){return handleError(_0x219bx12,_0x219bx14)})};exports[_0x6121[91]]= function(_0x219bx11,_0x219bx12,_0x219bx13){return MailRoom[_0x6121[31]](_0x219bx11[_0x6121[57]][_0x6121[28]])[_0x6121[21]](function(_0x219bx20){if(!_0x219bx20){return _0x219bx12[_0x6121[61]](404)};return _0x219bx20[_0x6121[91]]()})[_0x6121[21]](function(){return _0x219bx12[_0x6121[61]](204)})[_0x6121[18]](function(_0x219bx14){return handleError(_0x219bx12,_0x219bx14)})};exports[_0x6121[92]]= function(_0x219bx11,_0x219bx12){return MailRoom[_0x6121[91]]({where:{id:_0x219bx11[_0x6121[22]][_0x6121[93]]},individualHooks:true})[_0x6121[21]](function(){return _0x219bx12[_0x6121[61]](200)})[_0x6121[18]](function(_0x219bx14){return handleError(_0x219bx12,_0x219bx14)})};function handleError(_0x219bx12,_0x219bx14){return _0x219bx12[_0x6121[20]](500)[_0x6121[19]](_0x219bx14)}
\ No newline at end of file
diff --git a/server/api/mail_room/mail_room.events.js b/server/api/mail_room/mail_room.events.js
index b0fc25b..8f8bd39 100644
--- a/server/api/mail_room/mail_room.events.js
+++ b/server/api/mail_room/mail_room.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const MailRoom = require('../../models').MailRoom;
-
-var MailRoomEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-MailRoomEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  MailRoom.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    MailRoomEvents.emit(event + ':' + doc._id, doc);
-    MailRoomEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = MailRoomEvents;
+var _0x60ec=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x60ec[0];const EventEmitter=require(_0x60ec[1]);const MailRoom=require(_0x60ec[3])[_0x60ec[2]];var MailRoomEvents= new EventEmitter();MailRoomEvents[_0x60ec[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x60ec[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x60ec[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x60ec[6]};for(var e in events){var event=events[e];MailRoom[_0x60ec[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xf097x8,_0xf097x9,_0xf097xa){MailRoomEvents[_0x60ec[10]](event+ _0x60ec[8]+ _0xf097x8[_0x60ec[9]],_0xf097x8);MailRoomEvents[_0x60ec[10]](event,_0xf097x8);_0xf097xa(null)}}module[_0x60ec[11]]= MailRoomEvents
\ No newline at end of file
diff --git a/server/api/mail_room/mail_room.socket.js b/server/api/mail_room/mail_room.socket.js
index 9d2aefc..8b96625 100644
--- a/server/api/mail_room/mail_room.socket.js
+++ b/server/api/mail_room/mail_room.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const MailRoomEvents = require('./mail_room.events');
-
-// Model events to emit
-var events = ['save', 'save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('mail_room:' + event, socket);
-
-    MailRoomEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    MailRoomEvents.removeListener(event, listener);
-  };
-}
+var _0x3f84=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x3f84[0];const MailRoomEvents=require(_0x3f84[1]);var events=[_0x3f84[2],_0x3f84[2],_0x3f84[3]];exports[_0x3f84[4]]= function(_0x110dx3){for(var _0x110dx4=0,_0x110dx5=events[_0x3f84[5]];_0x110dx4< _0x110dx5;_0x110dx4++){var _0x110dx6=events[_0x110dx4];var _0x110dx7=createListener(_0x3f84[6]+ _0x110dx6,_0x110dx3);MailRoomEvents[_0x3f84[7]](_0x110dx6,_0x110dx7);_0x110dx3[_0x3f84[7]](_0x3f84[8],removeListener(_0x110dx6,_0x110dx7))}};function createListener(_0x110dx6,_0x110dx3){return function(_0x110dx9){_0x110dx3[_0x3f84[9]](_0x110dx6,_0x110dx9)}}function removeListener(_0x110dx6,_0x110dx7){return function(){MailRoomEvents[_0x3f84[10]](_0x110dx6,_0x110dx7)}}
\ No newline at end of file
diff --git a/server/api/mail_server_in/index.js b/server/api/mail_server_in/index.js
index 58902a3..277c20d 100644
--- a/server/api/mail_server_in/index.js
+++ b/server/api/mail_server_in/index.js
@@ -1,17 +1 @@
-'use strict';
-
-var express = require('express');
-
-var controller = require('./mail_server_in.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.index);
-router.get('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.show);
-router.post('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.create);
-router.put('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.update);
-router.delete('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xfe7a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4D\x61\x69\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xfe7a[0];var express=require(_0xfe7a[1]);var controller=require(_0xfe7a[2]);var auth=require(_0xfe7a[3]);var license=require(_0xfe7a[4]);var router=express.Router();router[_0xfe7a[12]](_0xfe7a[5],license[_0xfe7a[6]](),license[_0xfe7a[7]](),auth[_0xfe7a[8]](),auth[_0xfe7a[10]]([9],[_0xfe7a[9]]),controller[_0xfe7a[11]]);router[_0xfe7a[12]](_0xfe7a[13],license[_0xfe7a[6]](),license[_0xfe7a[7]](),auth[_0xfe7a[8]](),auth[_0xfe7a[10]]([9],[_0xfe7a[9]]),controller[_0xfe7a[14]]);router[_0xfe7a[16]](_0xfe7a[5],license[_0xfe7a[6]](),license[_0xfe7a[7]](),auth[_0xfe7a[8]](),auth[_0xfe7a[10]]([9],[_0xfe7a[9]]),controller[_0xfe7a[15]]);router[_0xfe7a[18]](_0xfe7a[13],license[_0xfe7a[6]](),license[_0xfe7a[7]](),auth[_0xfe7a[8]](),auth[_0xfe7a[10]]([9],[_0xfe7a[9]]),controller[_0xfe7a[17]]);router[_0xfe7a[20]](_0xfe7a[13],license[_0xfe7a[6]](),license[_0xfe7a[7]](),auth[_0xfe7a[8]](),auth[_0xfe7a[10]]([9],[_0xfe7a[9]]),controller[_0xfe7a[19]]);module[_0xfe7a[21]]= router
\ No newline at end of file
diff --git a/server/api/mail_server_in/mail_server_in.controller.js b/server/api/mail_server_in/mail_server_in.controller.js
index 27fda21..edd0e46 100644
--- a/server/api/mail_server_in/mail_server_in.controller.js
+++ b/server/api/mail_server_in/mail_server_in.controller.js
@@ -1,96 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var sequelize = require('../../models').sequelize;
-var MailServerIn = require('../../models').MailServerIn;
-
-// Get list of mail_server_ins
-exports.index = function(req, res) {
-  return MailServerIn
-    .findAll()
-    .then(function(mail_server_ins) {
-      return res.status(200).send(mail_server_ins);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single mailServerIn
-exports.show = function(req, res) {
-  return MailServerIn
-    .findById(req.params.id)
-    .then(function(mailServerIn) {
-      if (!mailServerIn) {
-        return res.sendStatus(404);
-      }
-      return res.send(mailServerIn);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new mailServerIn in the DB.
-exports.create = function(req, res) {
-  return MailServerIn
-    .create(req.body)
-    .then(function(mailServerIn) {
-      return res.status(201).send(mailServerIn);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing mailServerIn in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return MailServerIn
-    .findById(req.params.id)
-    .then(function(mailServerIn) {
-      if (!mailServerIn) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(mailServerIn, req.body);
-      return updated
-        .save();
-    })
-    .then(function(mailServerIn) {
-      return res.status(200).send(mailServerIn);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a mailServerIn from the DB.
-exports.destroy = function(req, res) {
-  return MailServerIn
-    .findById(req.params.id)
-    .then(function(mailServerIn) {
-      if (!mailServerIn) {
-        return res.sendStatus(404);
-      }
-      return mailServerIn
-        .destroy();
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x2b59=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x2b59[0];var _=require(_0x2b59[1]);var Util=require(_0x2b59[2]);var sequelize=require(_0x2b59[4])[_0x2b59[3]];var MailServerIn=require(_0x2b59[4])[_0x2b59[5]];exports[_0x2b59[6]]= function(_0xca8dx5,_0xca8dx6){return MailServerIn[_0x2b59[11]]()[_0x2b59[10]](function(_0xca8dx8){return _0xca8dx6[_0x2b59[9]](200)[_0x2b59[8]](_0xca8dx8)})[_0x2b59[7]](function(_0xca8dx7){return handleError(_0xca8dx6,_0xca8dx7)})};exports[_0x2b59[12]]= function(_0xca8dx5,_0xca8dx6){return MailServerIn[_0x2b59[16]](_0xca8dx5[_0x2b59[15]][_0x2b59[14]])[_0x2b59[10]](function(_0xca8dx9){if(!_0xca8dx9){return _0xca8dx6[_0x2b59[13]](404)};return _0xca8dx6[_0x2b59[8]](_0xca8dx9)})[_0x2b59[7]](function(_0xca8dx7){return handleError(_0xca8dx6,_0xca8dx7)})};exports[_0x2b59[17]]= function(_0xca8dx5,_0xca8dx6){return MailServerIn[_0x2b59[17]](_0xca8dx5[_0x2b59[20]])[_0x2b59[10]](function(_0xca8dx9){return _0xca8dx6[_0x2b59[9]](201)[_0x2b59[8]](_0xca8dx9)})[_0x2b59[7]](sequelize.UniqueConstraintError,function(_0xca8dx7){return Util[_0x2b59[19]][_0x2b59[18]](_0xca8dx6,_0xca8dx7)})[_0x2b59[7]](function(_0xca8dx7){return handleError(_0xca8dx6,_0xca8dx7)})};exports[_0x2b59[21]]= function(_0xca8dx5,_0xca8dx6){if(_0xca8dx5[_0x2b59[20]][_0x2b59[14]]){delete _0xca8dx5[_0x2b59[20]][_0x2b59[14]]};return MailServerIn[_0x2b59[16]](_0xca8dx5[_0x2b59[15]][_0x2b59[14]])[_0x2b59[10]](function(_0xca8dx9){if(!_0xca8dx9){return _0xca8dx6[_0x2b59[13]](404)};var _0xca8dxa=_[_0x2b59[22]](_0xca8dx9,_0xca8dx5[_0x2b59[20]]);return _0xca8dxa[_0x2b59[23]]()})[_0x2b59[10]](function(_0xca8dx9){return _0xca8dx6[_0x2b59[9]](200)[_0x2b59[8]](_0xca8dx9)})[_0x2b59[7]](sequelize.UniqueConstraintError,function(_0xca8dx7){return Util[_0x2b59[19]][_0x2b59[18]](_0xca8dx6,_0xca8dx7)})[_0x2b59[7]](function(_0xca8dx7){return handleError(_0xca8dx6,_0xca8dx7)})};exports[_0x2b59[24]]= function(_0xca8dx5,_0xca8dx6){return MailServerIn[_0x2b59[16]](_0xca8dx5[_0x2b59[15]][_0x2b59[14]])[_0x2b59[10]](function(_0xca8dx9){if(!_0xca8dx9){return _0xca8dx6[_0x2b59[13]](404)};return _0xca8dx9[_0x2b59[24]]()})[_0x2b59[7]](function(_0xca8dx7){return handleError(_0xca8dx6,_0xca8dx7)})};function handleError(_0xca8dx6,_0xca8dx7){return _0xca8dx6[_0x2b59[9]](500)[_0x2b59[8]](_0xca8dx7)}
\ No newline at end of file
diff --git a/server/api/mail_server_in/mail_server_in.events.js b/server/api/mail_server_in/mail_server_in.events.js
index 540e207..8ce50cb 100644
--- a/server/api/mail_server_in/mail_server_in.events.js
+++ b/server/api/mail_server_in/mail_server_in.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const MailServerIn = require('../../models').MailServerIn;
-
-var MailServerInEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-MailServerInEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  MailServerIn.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    MailServerInEvents.emit(event + ':' + doc._id, doc);
-    MailServerInEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = MailServerInEvents;
+var _0x767b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x767b[0];const EventEmitter=require(_0x767b[1]);const MailServerIn=require(_0x767b[3])[_0x767b[2]];var MailServerInEvents= new EventEmitter();MailServerInEvents[_0x767b[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x767b[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x767b[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x767b[6]};for(var e in events){var event=events[e];MailServerIn[_0x767b[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4c8fx8,_0x4c8fx9,_0x4c8fxa){MailServerInEvents[_0x767b[10]](event+ _0x767b[8]+ _0x4c8fx8[_0x767b[9]],_0x4c8fx8);MailServerInEvents[_0x767b[10]](event,_0x4c8fx8);_0x4c8fxa(null)}}module[_0x767b[11]]= MailServerInEvents
\ No newline at end of file
diff --git a/server/api/mail_server_in/mail_server_in.socket.js b/server/api/mail_server_in/mail_server_in.socket.js
index b6bcc34..c724d77 100644
--- a/server/api/mail_server_in/mail_server_in.socket.js
+++ b/server/api/mail_server_in/mail_server_in.socket.js
@@ -1,42 +1 @@
-'use strict';
-
-const MailServerInEvents = require('./mail_server_in.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('mail_server_in:' + event, socket);
-
-    MailServerInEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'mail_server_in:save':
-        if (doc.changed('state')) {
-          socket.emit('mail_server_in:state', doc);
-        } else {
-          socket.emit('mail_server_in:save', doc);
-        }
-        break;
-
-      case 'mail_server_in:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    MailServerInEvents.removeListener(event, listener);
-  };
-}
+var _0x2764=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x74\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x3A\x73\x74\x61\x74\x65","\x65\x6D\x69\x74","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x3A\x73\x61\x76\x65","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x2764[0];const MailServerInEvents=require(_0x2764[1]);var events=[_0x2764[2],_0x2764[3]];exports[_0x2764[4]]= function(_0x7c41x3){for(var _0x7c41x4=0,_0x7c41x5=events[_0x2764[5]];_0x7c41x4< _0x7c41x5;_0x7c41x4++){var _0x7c41x6=events[_0x7c41x4];var _0x7c41x7=createListener(_0x2764[6]+ _0x7c41x6,_0x7c41x3);MailServerInEvents[_0x2764[7]](_0x7c41x6,_0x7c41x7);_0x7c41x3[_0x2764[7]](_0x2764[8],removeListener(_0x7c41x6,_0x7c41x7))}};function createListener(_0x7c41x6,_0x7c41x3){return function(_0x7c41x9){switch(_0x7c41x6){case _0x2764[13]:if(_0x7c41x9[_0x2764[10]](_0x2764[9])){_0x7c41x3[_0x2764[12]](_0x2764[11],_0x7c41x9)}else {_0x7c41x3[_0x2764[12]](_0x2764[13],_0x7c41x9)};break;case _0x2764[14]:_0x7c41x3[_0x2764[12]](_0x7c41x6,_0x7c41x9);break;default:}}}function removeListener(_0x7c41x6,_0x7c41x7){return function(){MailServerInEvents[_0x2764[15]](_0x7c41x6,_0x7c41x7)}}
\ No newline at end of file
diff --git a/server/api/mail_server_out/index.js b/server/api/mail_server_out/index.js
index 323abb4..653407a 100644
--- a/server/api/mail_server_out/index.js
+++ b/server/api/mail_server_out/index.js
@@ -1,19 +1 @@
-'use strict';
-
-var express = require('express');
-
-var controller = require('./mail_server_out.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.index);
-router.get('/service', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.indexService);
-router.get('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.show);
-router.get('/:id/test', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.test);
-router.post('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.create);
-router.put('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.update);
-router.delete('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xe993=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4D\x61\x69\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x73\x65\x72\x76\x69\x63\x65","\x69\x6E\x64\x65\x78\x53\x65\x72\x76\x69\x63\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x74\x65\x73\x74","\x74\x65\x73\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe993[0];var express=require(_0xe993[1]);var controller=require(_0xe993[2]);var auth=require(_0xe993[3]);var license=require(_0xe993[4]);var router=express.Router();router[_0xe993[12]](_0xe993[5],license[_0xe993[6]](),license[_0xe993[7]](),auth[_0xe993[8]](),auth[_0xe993[10]]([9],[_0xe993[9]]),controller[_0xe993[11]]);router[_0xe993[12]](_0xe993[13],license[_0xe993[6]](),license[_0xe993[7]](),auth[_0xe993[8]](),auth[_0xe993[10]]([9],[_0xe993[9]]),controller[_0xe993[14]]);router[_0xe993[12]](_0xe993[15],license[_0xe993[6]](),license[_0xe993[7]](),auth[_0xe993[8]](),auth[_0xe993[10]]([9],[_0xe993[9]]),controller[_0xe993[16]]);router[_0xe993[12]](_0xe993[17],license[_0xe993[6]](),license[_0xe993[7]](),auth[_0xe993[8]](),auth[_0xe993[10]]([9],[_0xe993[9]]),controller[_0xe993[18]]);router[_0xe993[20]](_0xe993[5],license[_0xe993[6]](),license[_0xe993[7]](),auth[_0xe993[8]](),auth[_0xe993[10]]([9],[_0xe993[9]]),controller[_0xe993[19]]);router[_0xe993[22]](_0xe993[15],license[_0xe993[6]](),license[_0xe993[7]](),auth[_0xe993[8]](),auth[_0xe993[10]]([9],[_0xe993[9]]),controller[_0xe993[21]]);router[_0xe993[24]](_0xe993[15],license[_0xe993[6]](),license[_0xe993[7]](),auth[_0xe993[8]](),auth[_0xe993[10]]([9],[_0xe993[9]]),controller[_0xe993[23]]);module[_0xe993[25]]= router
\ No newline at end of file
diff --git a/server/api/mail_server_out/mail_server_out.controller.js b/server/api/mail_server_out/mail_server_out.controller.js
index 00117cf..7b74121 100644
--- a/server/api/mail_server_out/mail_server_out.controller.js
+++ b/server/api/mail_server_out/mail_server_out.controller.js
@@ -1,157 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var MailServerOut = require('../../models').MailServerOut;
-var MailMessage = require('../../models').MailMessage;
-var MailAccount = require('../../models').MailAccount;
-var sequelize = require('../../models').sequelize;
-var Util = require('../../config/util');
-
-// Get list of mailServerOuts
-exports.index = function(req, res, next) {
-  return MailServerOut
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.indexService = function(req, res) {
-  return MailServerOut
-    .findOne({
-      where: {
-        service: true
-      }
-    })
-    .then(function(mailServerOut) {
-      if (!mailServerOut) {
-        throw new Error("Mail service account not found.");
-      }
-
-      return res.status(200).send(mailServerOut);
-    })
-    .catch(function(err) {
-      return handleError(res, {
-        message: err.message
-      });
-    });
-};
-
-// Get a single mailServerOut
-exports.show = function(req, res) {
-  return MailServerOut
-    .findById(req.params.id)
-    .then(function(mailServerOut) {
-      if (!mailServerOut) {
-        return res.sendStatus(404);
-      }
-      return res.send(mailServerOut);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single mailAccount
-exports.showCustom = function(req, res, next) {
-  return MailAccount
-    .findOne({
-      where: {
-        custom: true
-      }
-    })
-    .then(function(mailAccount) {
-      if (!mailAccount) {
-        return res.sendStatus(404);
-      }
-      return res.send(mailAccount);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new mailServerOut in the DB.
-exports.create = function(req, res) {
-  return MailServerOut
-    .create(req.body)
-    .then(function(mailServerOut) {
-      return res.status(201).send(mailServerOut);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing mailServerOut in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  req.body.state = 'CONNECTING';
-
-  return MailServerOut
-    .findById(req.params.id)
-    .then(function(mailServerOut) {
-      if (!mailServerOut) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(mailServerOut, req.body);
-      return updated
-        .save();
-    })
-    .then(function(mailServerOut) {
-      return res.status(200).send(mailServerOut);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a mailServerOut from the DB.
-exports.destroy = function(req, res) {
-  return MailServerOut
-    .findById(req.params.id)
-    .then(function(mailServerOut) {
-      if (!mailServerOut) {
-        return res.sendStatus(404);
-      }
-
-      return mailServerOut
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.test = function(req, res) {
-  var _mailServerOut;
-  var _mailMessage;
-
-  return MailServerOut
-    .findById(req.params.id)
-    .then(function(mailServerOut) {
-      if (!mailServerOut) {
-        return res.sendStatus(404);
-      }
-      return mailServerOut
-        .update({
-          state: 'CONNECTING',
-        });
-    })
-    .then(function() {
-      return res.status(201).send(_mailMessage);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x9112=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x69\x6E\x64\x65\x78\x53\x65\x72\x76\x69\x63\x65","\x6D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x20\x73\x65\x72\x76\x69\x63\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E","\x66\x69\x6E\x64\x4F\x6E\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x68\x6F\x77\x43\x75\x73\x74\x6F\x6D","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x74\x61\x74\x65","\x43\x4F\x4E\x4E\x45\x43\x54\x49\x4E\x47","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x74\x65\x73\x74"];_0x9112[0];var _=require(_0x9112[1]);var MailServerOut=require(_0x9112[3])[_0x9112[2]];var MailMessage=require(_0x9112[3])[_0x9112[4]];var MailAccount=require(_0x9112[3])[_0x9112[5]];var sequelize=require(_0x9112[3])[_0x9112[6]];var Util=require(_0x9112[7]);exports[_0x9112[8]]= function(_0xc3d6x7,_0xc3d6x8,_0xc3d6x9){return MailServerOut[_0x9112[15]](Util[_0x9112[14]](_0xc3d6x7[_0x9112[13]]))[_0x9112[12]](function(_0xc3d6xb){return _0xc3d6x8[_0x9112[11]](200)[_0x9112[10]](_0xc3d6xb)})[_0x9112[9]](function(_0xc3d6xa){return handleError(_0xc3d6x8,_0xc3d6xa)})};exports[_0x9112[16]]= function(_0xc3d6x7,_0xc3d6x8){return MailServerOut[_0x9112[19]]({where:{service:true}})[_0x9112[12]](function(_0xc3d6xc){if(!_0xc3d6xc){throw  new Error(_0x9112[18])};return _0xc3d6x8[_0x9112[11]](200)[_0x9112[10]](_0xc3d6xc)})[_0x9112[9]](function(_0xc3d6xa){return handleError(_0xc3d6x8,{message:_0xc3d6xa[_0x9112[17]]})})};exports[_0x9112[20]]= function(_0xc3d6x7,_0xc3d6x8){return MailServerOut[_0x9112[24]](_0xc3d6x7[_0x9112[23]][_0x9112[22]])[_0x9112[12]](function(_0xc3d6xc){if(!_0xc3d6xc){return _0xc3d6x8[_0x9112[21]](404)};return _0xc3d6x8[_0x9112[10]](_0xc3d6xc)})[_0x9112[9]](function(_0xc3d6xa){return handleError(_0xc3d6x8,_0xc3d6xa)})};exports[_0x9112[25]]= function(_0xc3d6x7,_0xc3d6x8,_0xc3d6x9){return MailAccount[_0x9112[19]]({where:{custom:true}})[_0x9112[12]](function(_0xc3d6xd){if(!_0xc3d6xd){return _0xc3d6x8[_0x9112[21]](404)};return _0xc3d6x8[_0x9112[10]](_0xc3d6xd)})[_0x9112[9]](function(_0xc3d6xa){return handleError(_0xc3d6x8,_0xc3d6xa)})};exports[_0x9112[26]]= function(_0xc3d6x7,_0xc3d6x8){return MailServerOut[_0x9112[26]](_0xc3d6x7[_0x9112[27]])[_0x9112[12]](function(_0xc3d6xc){return _0xc3d6x8[_0x9112[11]](201)[_0x9112[10]](_0xc3d6xc)})[_0x9112[9]](function(_0xc3d6xa){return handleError(_0xc3d6x8,_0xc3d6xa)})};exports[_0x9112[28]]= function(_0xc3d6x7,_0xc3d6x8){if(_0xc3d6x7[_0x9112[27]][_0x9112[22]]){delete _0xc3d6x7[_0x9112[27]][_0x9112[22]]};_0xc3d6x7[_0x9112[27]][_0x9112[29]]= _0x9112[30];return MailServerOut[_0x9112[24]](_0xc3d6x7[_0x9112[23]][_0x9112[22]])[_0x9112[12]](function(_0xc3d6xc){if(!_0xc3d6xc){return _0xc3d6x8[_0x9112[21]](404)};var _0xc3d6xe=_[_0x9112[31]](_0xc3d6xc,_0xc3d6x7[_0x9112[27]]);return _0xc3d6xe[_0x9112[32]]()})[_0x9112[12]](function(_0xc3d6xc){return _0xc3d6x8[_0x9112[11]](200)[_0x9112[10]](_0xc3d6xc)})[_0x9112[9]](function(_0xc3d6xa){return handleError(_0xc3d6x8,_0xc3d6xa)})};exports[_0x9112[33]]= function(_0xc3d6x7,_0xc3d6x8){return MailServerOut[_0x9112[24]](_0xc3d6x7[_0x9112[23]][_0x9112[22]])[_0x9112[12]](function(_0xc3d6xc){if(!_0xc3d6xc){return _0xc3d6x8[_0x9112[21]](404)};return _0xc3d6xc[_0x9112[33]]()})[_0x9112[12]](function(){return _0xc3d6x8[_0x9112[21]](204)})[_0x9112[9]](function(_0xc3d6xa){return handleError(_0xc3d6x8,_0xc3d6xa)})};exports[_0x9112[34]]= function(_0xc3d6x7,_0xc3d6x8){var _0xc3d6xf;var _0xc3d6x10;return MailServerOut[_0x9112[24]](_0xc3d6x7[_0x9112[23]][_0x9112[22]])[_0x9112[12]](function(_0xc3d6xc){if(!_0xc3d6xc){return _0xc3d6x8[_0x9112[21]](404)};return _0xc3d6xc[_0x9112[28]]({state:_0x9112[30]})})[_0x9112[12]](function(){return _0xc3d6x8[_0x9112[11]](201)[_0x9112[10]](_0xc3d6x10)})};function handleError(_0xc3d6x8,_0xc3d6xa){return _0xc3d6x8[_0x9112[11]](500)[_0x9112[10]](_0xc3d6xa)}
\ No newline at end of file
diff --git a/server/api/mail_server_out/mail_server_out.events.js b/server/api/mail_server_out/mail_server_out.events.js
index 997dd0f..37ec84e 100644
--- a/server/api/mail_server_out/mail_server_out.events.js
+++ b/server/api/mail_server_out/mail_server_out.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const MailServerOut = require('../../models').MailServerOut;
-
-var MailServerOutEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-MailServerOutEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  MailServerOut.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    MailServerOutEvents.emit(event + ':' + doc._id, doc);
-    MailServerOutEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = MailServerOutEvents;
+var _0xa8ad=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xa8ad[0];const EventEmitter=require(_0xa8ad[1]);const MailServerOut=require(_0xa8ad[3])[_0xa8ad[2]];var MailServerOutEvents= new EventEmitter();MailServerOutEvents[_0xa8ad[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xa8ad[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xa8ad[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xa8ad[6]};for(var e in events){var event=events[e];MailServerOut[_0xa8ad[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xcea2x8,_0xcea2x9,_0xcea2xa){MailServerOutEvents[_0xa8ad[10]](event+ _0xa8ad[8]+ _0xcea2x8[_0xa8ad[9]],_0xcea2x8);MailServerOutEvents[_0xa8ad[10]](event,_0xcea2x8);_0xcea2xa(null)}}module[_0xa8ad[11]]= MailServerOutEvents
\ No newline at end of file
diff --git a/server/api/mail_server_out/mail_server_out.socket.js b/server/api/mail_server_out/mail_server_out.socket.js
index 4b7bf76..5a57f4c 100644
--- a/server/api/mail_server_out/mail_server_out.socket.js
+++ b/server/api/mail_server_out/mail_server_out.socket.js
@@ -1,42 +1 @@
-'use strict';
-
-const MailServerOutEvents = require('./mail_server_out.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('mail_server_out:' + event, socket);
-
-    MailServerOutEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'mail_server_out:save':
-        if (doc.changed('state')) {
-          socket.emit('mail_server_out:state', doc);
-        } else {
-          socket.emit('mail_server_out:save', doc);
-        }
-        break;
-
-      case 'mail_server_out:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    MailServerOutEvents.removeListener(event, listener);
-  };
-}
+var _0x82a3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x74\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x3A\x73\x74\x61\x74\x65","\x65\x6D\x69\x74","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x3A\x73\x61\x76\x65","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x82a3[0];const MailServerOutEvents=require(_0x82a3[1]);var events=[_0x82a3[2],_0x82a3[3]];exports[_0x82a3[4]]= function(_0x8c75x3){for(var _0x8c75x4=0,_0x8c75x5=events[_0x82a3[5]];_0x8c75x4< _0x8c75x5;_0x8c75x4++){var _0x8c75x6=events[_0x8c75x4];var _0x8c75x7=createListener(_0x82a3[6]+ _0x8c75x6,_0x8c75x3);MailServerOutEvents[_0x82a3[7]](_0x8c75x6,_0x8c75x7);_0x8c75x3[_0x82a3[7]](_0x82a3[8],removeListener(_0x8c75x6,_0x8c75x7))}};function createListener(_0x8c75x6,_0x8c75x3){return function(_0x8c75x9){switch(_0x8c75x6){case _0x82a3[13]:if(_0x8c75x9[_0x82a3[10]](_0x82a3[9])){_0x8c75x3[_0x82a3[12]](_0x82a3[11],_0x8c75x9)}else {_0x8c75x3[_0x82a3[12]](_0x82a3[13],_0x8c75x9)};break;case _0x82a3[14]:_0x8c75x3[_0x82a3[12]](_0x8c75x6,_0x8c75x9);break;default:}}}function removeListener(_0x8c75x6,_0x8c75x7){return function(){MailServerOutEvents[_0x82a3[15]](_0x8c75x6,_0x8c75x7)}}
\ No newline at end of file
diff --git a/server/api/metric/index.js b/server/api/metric/index.js
index b802bb1..b872e8f 100644
--- a/server/api/metric/index.js
+++ b/server/api/metric/index.js
@@ -1,18 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./metric.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index);
-router.get('/table', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.getMetricsByTable);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.update);
-router.patch('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.update);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xa622=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x65\x74\x72\x69\x63\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x74\x61\x62\x6C\x65","\x67\x65\x74\x4D\x65\x74\x72\x69\x63\x73\x42\x79\x54\x61\x62\x6C\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xa622[0];var express=require(_0xa622[1]);var controller=require(_0xa622[2]);var auth=require(_0xa622[3]);var router=express.Router();router[_0xa622[9]](_0xa622[4],auth[_0xa622[5]](),auth[_0xa622[7]]([17],[_0xa622[6]]),controller[_0xa622[8]]);router[_0xa622[9]](_0xa622[10],auth[_0xa622[5]](),auth[_0xa622[7]]([17],[_0xa622[6]]),controller[_0xa622[11]]);router[_0xa622[9]](_0xa622[12],auth[_0xa622[5]](),auth[_0xa622[7]]([17],[_0xa622[6]]),controller[_0xa622[13]]);router[_0xa622[15]](_0xa622[4],auth[_0xa622[5]](),auth[_0xa622[7]]([17],[_0xa622[6]]),controller[_0xa622[14]]);router[_0xa622[17]](_0xa622[12],auth[_0xa622[5]](),auth[_0xa622[7]]([17],[_0xa622[6]]),controller[_0xa622[16]]);router[_0xa622[18]](_0xa622[12],auth[_0xa622[5]](),auth[_0xa622[7]]([17],[_0xa622[6]]),controller[_0xa622[16]]);router[_0xa622[20]](_0xa622[4],auth[_0xa622[5]](),auth[_0xa622[7]]([17],[_0xa622[6]]),controller[_0xa622[19]]);router[_0xa622[20]](_0xa622[12],auth[_0xa622[5]](),auth[_0xa622[7]]([17],[_0xa622[6]]),controller[_0xa622[21]]);module[_0xa622[22]]= router
\ No newline at end of file
diff --git a/server/api/metric/metric.controller.js b/server/api/metric/metric.controller.js
index 0b82a6a..a83cc65 100644
--- a/server/api/metric/metric.controller.js
+++ b/server/api/metric/metric.controller.js
@@ -1,135 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Metric = require('../../models').Metric;
-var util = require('util');
-var Util = require('../../config/util');
-var sequelize = require('../../models').sequelize;
-
-// Get list of metrics
-exports.index = function(req, res, next) {
-  return Metric
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getMetricsByTable = function(req, res) {
-  return Metric
-    .findAll({
-      where: {
-        table: req.query.table
-      }
-    })
-    .then(function(metrics) {
-      if (!metrics) {
-        return res.sendStatus(404);
-      }
-      return res.status(200).send({
-        count: metrics.length,
-        rows: metrics
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single metric
-exports.show = function(req, res) {
-  return Metric
-    .findById(req.params.id)
-    .then(function(metric) {
-      if (!metric) {
-        return res.sendStatus(404);
-      }
-      return res.send(metric);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new metric in the DB.
-exports.create = function(req, res) {
-  return Metric
-    .create(req.body)
-    .then(function(metric) {
-      return res.status(201).send(metric);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      err.translatedMessage = 'MESSAGE_EXIST_METRIC';
-      err.message = 'A Metric with that name already exists';
-      return res.status(500).send(err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing metric in the DB.
-exports.update = function(req, res) {
-  return Metric
-    .findById(req.params.id)
-    .then(function(metric) {
-      if (!metric) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(metric, req.body);
-      return updated.save();
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      err.translatedMessage = 'MESSAGE_EXIST_METRIC';
-      err.message = 'A Metric with that name already exists';
-      return res.status(500).send(err);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Deletes a metric from the DB.
-exports.destroy = function(req, res) {
-  return Metric
-    .findById(req.params.id)
-    .then(function(metric) {
-      if (!metric) {
-        return res.sendStatus(404);
-      }
-      return metric.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.bulkDestroy = function(req, res) {
-  return Metric
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xc406=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x65\x74\x72\x69\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x67\x65\x74\x4D\x65\x74\x72\x69\x63\x73\x42\x79\x54\x61\x62\x6C\x65","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6C\x65\x6E\x67\x74\x68","\x74\x61\x62\x6C\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x4D\x45\x54\x52\x49\x43","\x6D\x65\x73\x73\x61\x67\x65","\x41\x20\x4D\x65\x74\x72\x69\x63\x20\x77\x69\x74\x68\x20\x74\x68\x61\x74\x20\x6E\x61\x6D\x65\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74\x73","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xc406[0];var _=require(_0xc406[1]);var Metric=require(_0xc406[3])[_0xc406[2]];var util=require(_0xc406[4]);var Util=require(_0xc406[5]);var sequelize=require(_0xc406[3])[_0xc406[6]];exports[_0xc406[7]]= function(_0x4ac1x6,_0x4ac1x7,_0x4ac1x8){return Metric[_0xc406[14]](Util[_0xc406[13]](_0x4ac1x6[_0xc406[12]]))[_0xc406[11]](function(_0x4ac1xa){return _0x4ac1x7[_0xc406[10]](200)[_0xc406[9]](_0x4ac1xa)})[_0xc406[8]](function(_0x4ac1x9){return handleError(_0x4ac1x7,_0x4ac1x9)})};exports[_0xc406[15]]= function(_0x4ac1x6,_0x4ac1x7){return Metric[_0xc406[19]]({where:{table:_0x4ac1x6[_0xc406[12]][_0xc406[18]]}})[_0xc406[11]](function(_0x4ac1xb){if(!_0x4ac1xb){return _0x4ac1x7[_0xc406[16]](404)};return _0x4ac1x7[_0xc406[10]](200)[_0xc406[9]]({count:_0x4ac1xb[_0xc406[17]],rows:_0x4ac1xb})})[_0xc406[8]](function(_0x4ac1x9){return handleError(_0x4ac1x7,_0x4ac1x9)})};exports[_0xc406[20]]= function(_0x4ac1x6,_0x4ac1x7){return Metric[_0xc406[23]](_0x4ac1x6[_0xc406[22]][_0xc406[21]])[_0xc406[11]](function(_0x4ac1xc){if(!_0x4ac1xc){return _0x4ac1x7[_0xc406[16]](404)};return _0x4ac1x7[_0xc406[9]](_0x4ac1xc)})[_0xc406[8]](function(_0x4ac1x9){return handleError(_0x4ac1x7,_0x4ac1x9)})};exports[_0xc406[24]]= function(_0x4ac1x6,_0x4ac1x7){return Metric[_0xc406[24]](_0x4ac1x6[_0xc406[29]])[_0xc406[11]](function(_0x4ac1xc){return _0x4ac1x7[_0xc406[10]](201)[_0xc406[9]](_0x4ac1xc)})[_0xc406[8]](sequelize.UniqueConstraintError,function(_0x4ac1x9){_0x4ac1x9[_0xc406[25]]= _0xc406[26];_0x4ac1x9[_0xc406[27]]= _0xc406[28];return _0x4ac1x7[_0xc406[10]](500)[_0xc406[9]](_0x4ac1x9)})[_0xc406[8]](function(_0x4ac1x9){return handleError(_0x4ac1x7,_0x4ac1x9)})};exports[_0xc406[30]]= function(_0x4ac1x6,_0x4ac1x7){return Metric[_0xc406[23]](_0x4ac1x6[_0xc406[22]][_0xc406[21]])[_0xc406[11]](function(_0x4ac1xc){if(!_0x4ac1xc){return _0x4ac1x7[_0xc406[16]](404)};var _0x4ac1xd=_[_0xc406[32]](_0x4ac1xc,_0x4ac1x6[_0xc406[29]]);return _0x4ac1xd[_0xc406[33]]()})[_0xc406[11]](function(){return _0x4ac1x7[_0xc406[16]](200)})[_0xc406[8]](sequelize.UniqueConstraintError,function(_0x4ac1x9){_0x4ac1x9[_0xc406[25]]= _0xc406[26];_0x4ac1x9[_0xc406[27]]= _0xc406[28];return _0x4ac1x7[_0xc406[10]](500)[_0xc406[9]](_0x4ac1x9)})[_0xc406[8]](function(_0x4ac1x9){console[_0xc406[31]](_0x4ac1x9);return handleError(_0x4ac1x7,_0x4ac1x9)})};exports[_0xc406[34]]= function(_0x4ac1x6,_0x4ac1x7){return Metric[_0xc406[23]](_0x4ac1x6[_0xc406[22]][_0xc406[21]])[_0xc406[11]](function(_0x4ac1xc){if(!_0x4ac1xc){return _0x4ac1x7[_0xc406[16]](404)};return _0x4ac1xc[_0xc406[34]]()})[_0xc406[11]](function(){return _0x4ac1x7[_0xc406[16]](204)})[_0xc406[8]](function(_0x4ac1x9){return handleError(_0x4ac1x7,_0x4ac1x9)})};exports[_0xc406[35]]= function(_0x4ac1x6,_0x4ac1x7){return Metric[_0xc406[34]]({where:{id:_0x4ac1x6[_0xc406[12]][_0xc406[36]]},individualHooks:true})[_0xc406[11]](function(){return _0x4ac1x7[_0xc406[16]](204)})[_0xc406[8]](function(_0x4ac1x9){return handleError(_0x4ac1x7,_0x4ac1x9)})};function handleError(_0x4ac1x7,_0x4ac1x9){return _0x4ac1x7[_0xc406[10]](500)[_0xc406[9]](_0x4ac1x9)}
\ No newline at end of file
diff --git a/server/api/metric/metric.events.js b/server/api/metric/metric.events.js
index 6aa5669..319955b 100644
--- a/server/api/metric/metric.events.js
+++ b/server/api/metric/metric.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Metric = require('../../models').Metric;
-
-var MetricEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-MetricEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'update',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Metric.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    MetricEvents.emit(event + ':' + doc._id, doc);
-    MetricEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = MetricEvents;
+var _0x5980=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x65\x74\x72\x69\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x5980[0];const EventEmitter=require(_0x5980[1]);const Metric=require(_0x5980[3])[_0x5980[2]];var MetricEvents= new EventEmitter();MetricEvents[_0x5980[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x5980[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x5980[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x5980[7]};for(var e in events){var event=events[e];Metric[_0x5980[8]](e,emitEvent(event))};function emitEvent(event){return function(_0xf7dbx8,_0xf7dbx9,_0xf7dbxa){MetricEvents[_0x5980[11]](event+ _0x5980[9]+ _0xf7dbx8[_0x5980[10]],_0xf7dbx8);MetricEvents[_0x5980[11]](event,_0xf7dbx8);_0xf7dbxa(null)}}module[_0x5980[12]]= MetricEvents
\ No newline at end of file
diff --git a/server/api/metric/metric.socket.js b/server/api/metric/metric.socket.js
index 80e152f..756c19c 100644
--- a/server/api/metric/metric.socket.js
+++ b/server/api/metric/metric.socket.js
@@ -1,54 +1 @@
-'use strict';
-
-const MetricEvents = require('./metric.events');
-const ReportField = require('../../models').ReportField;
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('metric:' + event, socket);
-
-    MetricEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'metric:save':
-        socket.emit(event, doc);
-        break;
-      case 'metric:update':
-        updateFields(doc);
-        break;
-      case 'metric:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    MetricEvents.removeListener(event, listener);
-  };
-}
-
-function updateFields(doc) {
-  return ReportField.update({
-      field: doc.metric
-    }, {
-      where: {
-        MetricId: doc.id
-      }
-    })
-    .catch(function(err) {
-      console.log(err);
-    });
-}
+var _0x931c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x65\x74\x72\x69\x63\x2E\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x65\x74\x72\x69\x63\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x6D\x65\x74\x72\x69\x63\x3A\x73\x61\x76\x65","\x6D\x65\x74\x72\x69\x63\x3A\x75\x70\x64\x61\x74\x65","\x6D\x65\x74\x72\x69\x63\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x6D\x65\x74\x72\x69\x63","\x69\x64","\x75\x70\x64\x61\x74\x65"];_0x931c[0];const MetricEvents=require(_0x931c[1]);const ReportField=require(_0x931c[3])[_0x931c[2]];var events=[_0x931c[4],_0x931c[5]];exports[_0x931c[6]]= function(_0xb37dx4){for(var _0xb37dx5=0,_0xb37dx6=events[_0x931c[7]];_0xb37dx5< _0xb37dx6;_0xb37dx5++){var _0xb37dx7=events[_0xb37dx5];var _0xb37dx8=createListener(_0x931c[8]+ _0xb37dx7,_0xb37dx4);MetricEvents[_0x931c[9]](_0xb37dx7,_0xb37dx8);_0xb37dx4[_0x931c[9]](_0x931c[10],removeListener(_0xb37dx7,_0xb37dx8))}};function createListener(_0xb37dx7,_0xb37dx4){return function(_0xb37dxa){switch(_0xb37dx7){case _0x931c[12]:_0xb37dx4[_0x931c[11]](_0xb37dx7,_0xb37dxa);break;case _0x931c[13]:updateFields(_0xb37dxa);break;case _0x931c[14]:_0xb37dx4[_0x931c[11]](_0xb37dx7,_0xb37dxa);break;default:}}}function removeListener(_0xb37dx7,_0xb37dx8){return function(){MetricEvents[_0x931c[15]](_0xb37dx7,_0xb37dx8)}}function updateFields(_0xb37dxa){return ReportField[_0x931c[20]]({field:_0xb37dxa[_0x931c[18]]},{where:{MetricId:_0xb37dxa[_0x931c[19]]}})[_0x931c[17]](function(_0xb37dxd){console[_0x931c[16]](_0xb37dxd)})}
\ No newline at end of file
diff --git a/server/api/module/index.js b/server/api/module/index.js
index b57548b..b24daf9 100644
--- a/server/api/module/index.js
+++ b/server/api/module/index.js
@@ -1,11 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./module.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.index);
-
-module.exports = router;
+var _0x2aaf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x6F\x64\x75\x6C\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2aaf[0];var express=require(_0x2aaf[1]);var controller=require(_0x2aaf[2]);var auth=require(_0x2aaf[3]);var router=express.Router();router[_0x2aaf[9]](_0x2aaf[4],auth[_0x2aaf[5]](),auth[_0x2aaf[7]](_0x2aaf[6]),controller[_0x2aaf[8]]);module[_0x2aaf[10]]= router
\ No newline at end of file
diff --git a/server/api/module/module.controller.js b/server/api/module/module.controller.js
index d27796a..8314ae2 100644
--- a/server/api/module/module.controller.js
+++ b/server/api/module/module.controller.js
@@ -1,25 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Module = require('../../models').Module;
-var util = require('util');
-var Util = require('../../config/util');
-var sequelize = require('../../models').sequelize;
-
-// Get list of modules
-exports.index = function(req, res, next) {
-  return Module
-    // .findAndCountAll(Util.getQuery(req.query))
-    .scope('submodules')
-    .findAndCountAll()
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x2f0c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x6F\x64\x75\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x75\x62\x6D\x6F\x64\x75\x6C\x65\x73","\x73\x63\x6F\x70\x65"];_0x2f0c[0];var _=require(_0x2f0c[1]);var Module=require(_0x2f0c[3])[_0x2f0c[2]];var util=require(_0x2f0c[4]);var Util=require(_0x2f0c[5]);var sequelize=require(_0x2f0c[3])[_0x2f0c[6]];exports[_0x2f0c[7]]= function(_0x4a8ex6,_0x4a8ex7,_0x4a8ex8){return Module[_0x2f0c[14]](_0x2f0c[13])[_0x2f0c[12]]()[_0x2f0c[11]](function(_0x4a8exa){return _0x4a8ex7[_0x2f0c[10]](200)[_0x2f0c[9]](_0x4a8exa)})[_0x2f0c[8]](function(_0x4a8ex9){return handleError(_0x4a8ex7,_0x4a8ex9)})};function handleError(_0x4a8ex7,_0x4a8ex9){return _0x4a8ex7[_0x2f0c[10]](500)[_0x2f0c[9]](_0x4a8ex9)}
\ No newline at end of file
diff --git a/server/api/module/module.events.js b/server/api/module/module.events.js
index 2dbb456..81af4ae 100644
--- a/server/api/module/module.events.js
+++ b/server/api/module/module.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Module = require('../../models').Module;
-
-var ModuleEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ModuleEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Module.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ModuleEvents.emit(event + ':' + doc._id, doc);
-    ModuleEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ModuleEvents;
+var _0xef39=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x6F\x64\x75\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xef39[0];const EventEmitter=require(_0xef39[1]);const Module=require(_0xef39[3])[_0xef39[2]];var ModuleEvents= new EventEmitter();ModuleEvents[_0xef39[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xef39[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xef39[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xef39[6]};for(var e in events){var event=events[e];Module[_0xef39[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xd3c2x8,_0xd3c2x9,_0xd3c2xa){ModuleEvents[_0xef39[10]](event+ _0xef39[8]+ _0xd3c2x8[_0xef39[9]],_0xd3c2x8);ModuleEvents[_0xef39[10]](event,_0xd3c2x8);_0xd3c2xa(null)}}module[_0xef39[11]]= ModuleEvents
\ No newline at end of file
diff --git a/server/api/module/module.socket.js b/server/api/module/module.socket.js
index ebccd0c..026c185 100644
--- a/server/api/module/module.socket.js
+++ b/server/api/module/module.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const ModuleEvents = require('./module.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('module:' + event, socket);
-
-    ModuleEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ModuleEvents.removeListener(event, listener);
-  };
-}
+var _0x2f68=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x6F\x64\x75\x6C\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x6F\x64\x75\x6C\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x2f68[0];const ModuleEvents=require(_0x2f68[1]);var events=[_0x2f68[2],_0x2f68[3]];exports[_0x2f68[4]]= function(_0x6982x3){for(var _0x6982x4=0,_0x6982x5=events[_0x2f68[5]];_0x6982x4< _0x6982x5;_0x6982x4++){var _0x6982x6=events[_0x6982x4];var _0x6982x7=createListener(_0x2f68[6]+ _0x6982x6,_0x6982x3);ModuleEvents[_0x2f68[7]](_0x6982x6,_0x6982x7);_0x6982x3[_0x2f68[7]](_0x2f68[8],removeListener(_0x6982x6,_0x6982x7))}};function createListener(_0x6982x6,_0x6982x3){return function(_0x6982x9){_0x6982x3[_0x2f68[9]](_0x6982x6,_0x6982x9)}}function removeListener(_0x6982x6,_0x6982x7){return function(){ModuleEvents[_0x2f68[10]](_0x6982x6,_0x6982x7)}}
\ No newline at end of file
diff --git a/server/api/motionbar/index.js b/server/api/motionbar/index.js
index fd9d420..a0a7362 100644
--- a/server/api/motionbar/index.js
+++ b/server/api/motionbar/index.js
@@ -1,11 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./motionbar.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/:action/:state', auth.isAuthenticated(), controller.action);
-
-module.exports = router;
+var _0x476d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x3A\x61\x63\x74\x69\x6F\x6E\x2F\x3A\x73\x74\x61\x74\x65","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x476d[0];var express=require(_0x476d[1]);var controller=require(_0x476d[2]);var auth=require(_0x476d[3]);var router=express.Router();router[_0x476d[7]](_0x476d[4],auth[_0x476d[5]](),controller[_0x476d[6]]);module[_0x476d[8]]= router
\ No newline at end of file
diff --git a/server/api/motionbar/motionbar.controller.js b/server/api/motionbar/motionbar.controller.js
index 275d338..aa9611d 100644
--- a/server/api/motionbar/motionbar.controller.js
+++ b/server/api/motionbar/motionbar.controller.js
@@ -1,32 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Motionbar = require('../../models').Motionbar;
-
-// Get list of motionbars
-exports.action = function(req, res) {
-
-  if (!req.query.userId) {
-    return handleError(res, {
-      message: 'Use userId'
-    });
-  }
-
-  req.body.UserId = parseInt(req.query.userId, 10);
-  req.body.action = req.params.action;
-  req.body.state = req.params.state;
-  req.body.AdminId = req.user.id;
-
-  return Motionbar
-    .create(req.body)
-    .then(function(action) {
-      return res.status(201).send(action);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x9aa3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x61\x63\x74\x69\x6F\x6E","\x75\x73\x65\x72\x49\x64","\x71\x75\x65\x72\x79","\x55\x73\x65\x20\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x70\x61\x72\x61\x6D\x73","\x73\x74\x61\x74\x65","\x41\x64\x6D\x69\x6E\x49\x64","\x69\x64","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65"];_0x9aa3[0];var _=require(_0x9aa3[1]);var Motionbar=require(_0x9aa3[3])[_0x9aa3[2]];exports[_0x9aa3[4]]= function(_0x6833x3,_0x6833x4){if(!_0x6833x3[_0x9aa3[6]][_0x9aa3[5]]){return handleError(_0x6833x4,{message:_0x9aa3[7]})};_0x6833x3[_0x9aa3[9]][_0x9aa3[8]]= parseInt(_0x6833x3[_0x9aa3[6]][_0x9aa3[5]],10);_0x6833x3[_0x9aa3[9]][_0x9aa3[4]]= _0x6833x3[_0x9aa3[10]][_0x9aa3[4]];_0x6833x3[_0x9aa3[9]][_0x9aa3[11]]= _0x6833x3[_0x9aa3[10]][_0x9aa3[11]];_0x6833x3[_0x9aa3[9]][_0x9aa3[12]]= _0x6833x3[_0x9aa3[14]][_0x9aa3[13]];return Motionbar[_0x9aa3[19]](_0x6833x3[_0x9aa3[9]])[_0x9aa3[18]](function(_0x6833x6){return _0x6833x4[_0x9aa3[17]](201)[_0x9aa3[16]](_0x6833x6)})[_0x9aa3[15]](function(_0x6833x5){return handleError(_0x6833x4,_0x6833x5)})};function handleError(_0x6833x4,_0x6833x5){return _0x6833x4[_0x9aa3[17]](500)[_0x9aa3[16]](_0x6833x5)}
\ No newline at end of file
diff --git a/server/api/motionbar/motionbar.events.js b/server/api/motionbar/motionbar.events.js
index f84fb17..7ad54d0 100644
--- a/server/api/motionbar/motionbar.events.js
+++ b/server/api/motionbar/motionbar.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Motionbar = require('../../models').Motionbar;
-
-var MotionbarEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-MotionbarEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Motionbar.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    MotionbarEvents.emit(event + ':' + doc._id, doc);
-    MotionbarEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = MotionbarEvents;
+var _0x51b6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x51b6[0];const EventEmitter=require(_0x51b6[1]);const Motionbar=require(_0x51b6[3])[_0x51b6[2]];var MotionbarEvents= new EventEmitter();MotionbarEvents[_0x51b6[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x51b6[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x51b6[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x51b6[6]};for(var e in events){var event=events[e];Motionbar[_0x51b6[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xd8d5x8,_0xd8d5x9,_0xd8d5xa){MotionbarEvents[_0x51b6[10]](event+ _0x51b6[8]+ _0xd8d5x8[_0x51b6[9]],_0xd8d5x8);MotionbarEvents[_0x51b6[10]](event,_0xd8d5x8);_0xd8d5xa(null)}}module[_0x51b6[11]]= MotionbarEvents
\ No newline at end of file
diff --git a/server/api/motionbar/motionbar.socket.js b/server/api/motionbar/motionbar.socket.js
index cf3aa56..4bd8f45 100644
--- a/server/api/motionbar/motionbar.socket.js
+++ b/server/api/motionbar/motionbar.socket.js
@@ -1,30 +1 @@
-'use strict';
-
-const MotionbarEvents = require('./motionbar.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('motionbar:' + event, socket);
-
-    MotionbarEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    if (socket.userId == doc.UserId) {
-      socket.emit(event, doc);
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    MotionbarEvents.removeListener(event, listener);
-  };
-}
+var _0xebd8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x49\x64","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xebd8[0];const MotionbarEvents=require(_0xebd8[1]);var events=[_0xebd8[2],_0xebd8[3]];exports[_0xebd8[4]]= function(_0x2e5ex3){for(var _0x2e5ex4=0,_0x2e5ex5=events[_0xebd8[5]];_0x2e5ex4< _0x2e5ex5;_0x2e5ex4++){var _0x2e5ex6=events[_0x2e5ex4];var _0x2e5ex7=createListener(_0xebd8[6]+ _0x2e5ex6,_0x2e5ex3);MotionbarEvents[_0xebd8[7]](_0x2e5ex6,_0x2e5ex7);_0x2e5ex3[_0xebd8[7]](_0xebd8[8],removeListener(_0x2e5ex6,_0x2e5ex7))}};function createListener(_0x2e5ex6,_0x2e5ex3){return function(_0x2e5ex9){if(_0x2e5ex3[_0xebd8[9]]== _0x2e5ex9[_0xebd8[10]]){_0x2e5ex3[_0xebd8[11]](_0x2e5ex6,_0x2e5ex9)}}}function removeListener(_0x2e5ex6,_0x2e5ex7){return function(){MotionbarEvents[_0xebd8[12]](_0x2e5ex6,_0x2e5ex7)}}
\ No newline at end of file
diff --git a/server/api/network_externip/index.js b/server/api/network_externip/index.js
index c9daa97..5d1dad2 100644
--- a/server/api/network_externip/index.js
+++ b/server/api/network_externip/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./network_externip.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.update);
-router.delete('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy);
-
-module.exports = router;
+var _0xb43f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x65\x78\x74\x65\x72\x6E\x69\x70\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xb43f[0];var express=require(_0xb43f[1]);var auth=require(_0xb43f[2]);var controller=require(_0xb43f[3]);var router=express.Router();router[_0xb43f[9]](_0xb43f[4],auth[_0xb43f[5]](),auth[_0xb43f[7]](_0xb43f[6]),controller[_0xb43f[8]]);router[_0xb43f[9]](_0xb43f[10],auth[_0xb43f[5]](),auth[_0xb43f[7]](_0xb43f[6]),controller[_0xb43f[11]]);router[_0xb43f[13]](_0xb43f[4],auth[_0xb43f[5]](),auth[_0xb43f[7]](_0xb43f[6]),controller[_0xb43f[12]]);router[_0xb43f[15]](_0xb43f[10],auth[_0xb43f[5]](),auth[_0xb43f[7]](_0xb43f[6]),controller[_0xb43f[14]]);router[_0xb43f[17]](_0xb43f[4],auth[_0xb43f[5]](),auth[_0xb43f[7]](_0xb43f[6]),controller[_0xb43f[16]]);router[_0xb43f[17]](_0xb43f[10],auth[_0xb43f[5]](),auth[_0xb43f[7]](_0xb43f[6]),controller[_0xb43f[18]]);module[_0xb43f[19]]= router
\ No newline at end of file
diff --git a/server/api/network_externip/network_externip.controller.js b/server/api/network_externip/network_externip.controller.js
index ecde7da..4845de3 100644
--- a/server/api/network_externip/network_externip.controller.js
+++ b/server/api/network_externip/network_externip.controller.js
@@ -1,131 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/network/externips              ->  index
- * POST    /api/network/externips              ->  create
- * GET     /api/network/externips/:id          ->  show
- * PUT     /api/network/externips/:id          ->  update
- * DELETE  /api/network/externips/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var NetworkExternip = require('../../models').Network;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function responseWithoutResult(res, statusCode) {
-  statusCode = statusCode || 204;
-  return function() {
-    res.sendStatus(statusCode);
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of NetworkExternips
-exports.index = function(req, res) {
-  return NetworkExternip
-    .scope('externip')
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single NetworkExternip from the DB
-exports.show = function(req, res) {
-  return NetworkExternip
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new NetworkExternip in the DB
-exports.create = function(req, res) {
-  req.body.type = 'externip';
-  return NetworkExternip
-    .create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing NetworkExternip in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return NetworkExternip
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a NetworkExternip from the DB
-exports.destroy = function(req, res) {
-  return NetworkExternip
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
-
-exports.bulkDestroy = function(req, res) {
-  return NetworkExternip
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(responseWithoutResult(res))
-    .catch(handleError(res));
-};
+var _0xd969=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4E\x65\x74\x77\x6F\x72\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x65\x78\x74\x65\x72\x6E\x69\x70","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x74\x79\x70\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xd969[0];var _=require(_0xd969[1]);var Util=require(_0xd969[2]);var NetworkExternip=require(_0xd969[4])[_0xd969[3]];function handleError(_0x9244x5,_0x9244x6){_0x9244x6= _0x9244x6|| 500;return function(_0x9244x7){_0x9244x5[_0xd969[6]](_0x9244x6)[_0xd969[5]](_0x9244x7)}}function responseWithResult(_0x9244x5,_0x9244x6){_0x9244x6= _0x9244x6|| 200;return function(_0x9244x9){if(_0x9244x9){_0x9244x5[_0xd969[6]](_0x9244x6)[_0xd969[7]](_0x9244x9)}}}function responseWithoutResult(_0x9244x5,_0x9244x6){_0x9244x6= _0x9244x6|| 204;return function(){_0x9244x5[_0xd969[8]](_0x9244x6)}}function handleEntityNotFound(_0x9244x5){return function(_0x9244x9){if(!_0x9244x9){_0x9244x5[_0xd969[6]](404)[_0xd969[9]]();return null};return _0x9244x9}}function saveUpdates(_0x9244xd){return function(_0x9244x9){return _0x9244x9[_0xd969[11]](_0x9244xd)[_0xd969[10]](function(_0x9244xe){return _0x9244xe})}}function removeEntity(_0x9244x5){return function(_0x9244x9){if(_0x9244x9){return _0x9244x9[_0xd969[12]]()[_0xd969[10]](function(){_0x9244x5[_0xd969[6]](204)[_0xd969[9]]()})}}}exports[_0xd969[13]]= function(_0x9244x10,_0x9244x5){return NetworkExternip[_0xd969[19]](_0xd969[18])[_0xd969[17]](Util[_0xd969[16]](_0x9244x10[_0xd969[15]]))[_0xd969[10]](responseWithResult(_0x9244x5))[_0xd969[14]](handleError(_0x9244x5))};exports[_0xd969[20]]= function(_0x9244x10,_0x9244x5){return NetworkExternip[_0xd969[23]](_0x9244x10[_0xd969[22]][_0xd969[21]])[_0xd969[10]](handleEntityNotFound(_0x9244x5))[_0xd969[10]](responseWithResult(_0x9244x5))[_0xd969[14]](handleError(_0x9244x5))};exports[_0xd969[24]]= function(_0x9244x10,_0x9244x5){_0x9244x10[_0xd969[26]][_0xd969[25]]= _0xd969[18];return NetworkExternip[_0xd969[24]](_0x9244x10[_0xd969[26]])[_0xd969[10]](responseWithResult(_0x9244x5,201))[_0xd969[14]](handleError(_0x9244x5))};exports[_0xd969[27]]= function(_0x9244x10,_0x9244x5){if(_0x9244x10[_0xd969[26]][_0xd969[21]]){delete _0x9244x10[_0xd969[26]][_0xd969[21]]};return NetworkExternip[_0xd969[23]](_0x9244x10[_0xd969[22]][_0xd969[21]])[_0xd969[10]](handleEntityNotFound(_0x9244x5))[_0xd969[10]](saveUpdates(_0x9244x10[_0xd969[26]]))[_0xd969[10]](responseWithResult(_0x9244x5))[_0xd969[14]](handleError(_0x9244x5))};exports[_0xd969[12]]= function(_0x9244x10,_0x9244x5){return NetworkExternip[_0xd969[23]](_0x9244x10[_0xd969[22]][_0xd969[21]])[_0xd969[10]](handleEntityNotFound(_0x9244x5))[_0xd969[10]](removeEntity(_0x9244x5))[_0xd969[14]](handleError(_0x9244x5))};exports[_0xd969[28]]= function(_0x9244x10,_0x9244x5){return NetworkExternip[_0xd969[12]]({where:{id:_0x9244x10[_0xd969[15]][_0xd969[29]]},individualHooks:true})[_0xd969[10]](responseWithoutResult(_0x9244x5))[_0xd969[14]](handleError(_0x9244x5))}
\ No newline at end of file
diff --git a/server/api/network_externip/network_externip.events.js b/server/api/network_externip/network_externip.events.js
index c5f5cbe..4b46028 100644
--- a/server/api/network_externip/network_externip.events.js
+++ b/server/api/network_externip/network_externip.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Network = require('../../models').Network;
-
-var NetworkEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-NetworkEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Network.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    NetworkEvents.emit(event + ':' + doc._id, doc);
-    NetworkEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = NetworkEvents;
+var _0x7e73=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4E\x65\x74\x77\x6F\x72\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7e73[0];const EventEmitter=require(_0x7e73[1]);const Network=require(_0x7e73[3])[_0x7e73[2]];var NetworkEvents= new EventEmitter();NetworkEvents[_0x7e73[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7e73[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7e73[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7e73[6]};for(var e in events){var event=events[e];Network[_0x7e73[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xc058x8,_0xc058x9,_0xc058xa){NetworkEvents[_0x7e73[10]](event+ _0x7e73[8]+ _0xc058x8[_0x7e73[9]],_0xc058x8);NetworkEvents[_0x7e73[10]](event,_0xc058x8);_0xc058xa(null)}}module[_0x7e73[11]]= NetworkEvents
\ No newline at end of file
diff --git a/server/api/network_externip/network_externip.socket.js b/server/api/network_externip/network_externip.socket.js
index 9903ad0..b4f42b0 100644
--- a/server/api/network_externip/network_externip.socket.js
+++ b/server/api/network_externip/network_externip.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const NetworkExternipEvents = require('./network_externip.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('network_externip:' + event, socket);
-
-    NetworkExternipEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    NetworkExternipEvents.removeListener(event, listener);
-  };
-}
+var _0x62f0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x65\x78\x74\x65\x72\x6E\x69\x70\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x65\x78\x74\x65\x72\x6E\x69\x70\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x62f0[0];const NetworkExternipEvents=require(_0x62f0[1]);var events=[_0x62f0[2],_0x62f0[3]];exports[_0x62f0[4]]= function(_0x59c7x3){for(var _0x59c7x4=0,_0x59c7x5=events[_0x62f0[5]];_0x59c7x4< _0x59c7x5;_0x59c7x4++){var _0x59c7x6=events[_0x59c7x4];var _0x59c7x7=createListener(_0x62f0[6]+ _0x59c7x6,_0x59c7x3);NetworkExternipEvents[_0x62f0[7]](_0x59c7x6,_0x59c7x7);_0x59c7x3[_0x62f0[7]](_0x62f0[8],removeListener(_0x59c7x6,_0x59c7x7))}};function createListener(_0x59c7x6,_0x59c7x3){return function(_0x59c7x9){_0x59c7x3[_0x62f0[9]](_0x59c7x6,_0x59c7x9)}}function removeListener(_0x59c7x6,_0x59c7x7){return function(){NetworkExternipEvents[_0x62f0[10]](_0x59c7x6,_0x59c7x7)}}
\ No newline at end of file
diff --git a/server/api/network_localnet/index.js b/server/api/network_localnet/index.js
index d372448..8e1b94b 100644
--- a/server/api/network_localnet/index.js
+++ b/server/api/network_localnet/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./network_localnet.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.update);
-router.delete('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy);
-
-module.exports = router;
+var _0x9dbe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x9dbe[0];var express=require(_0x9dbe[1]);var auth=require(_0x9dbe[2]);var controller=require(_0x9dbe[3]);var router=express.Router();router[_0x9dbe[9]](_0x9dbe[4],auth[_0x9dbe[5]](),auth[_0x9dbe[7]](_0x9dbe[6]),controller[_0x9dbe[8]]);router[_0x9dbe[9]](_0x9dbe[10],auth[_0x9dbe[5]](),auth[_0x9dbe[7]](_0x9dbe[6]),controller[_0x9dbe[11]]);router[_0x9dbe[13]](_0x9dbe[4],auth[_0x9dbe[5]](),auth[_0x9dbe[7]](_0x9dbe[6]),controller[_0x9dbe[12]]);router[_0x9dbe[15]](_0x9dbe[10],auth[_0x9dbe[5]](),auth[_0x9dbe[7]](_0x9dbe[6]),controller[_0x9dbe[14]]);router[_0x9dbe[17]](_0x9dbe[4],auth[_0x9dbe[5]](),auth[_0x9dbe[7]](_0x9dbe[6]),controller[_0x9dbe[16]]);router[_0x9dbe[17]](_0x9dbe[10],auth[_0x9dbe[5]](),auth[_0x9dbe[7]](_0x9dbe[6]),controller[_0x9dbe[18]]);module[_0x9dbe[19]]= router
\ No newline at end of file
diff --git a/server/api/network_localnet/network_localnet.controller.js b/server/api/network_localnet/network_localnet.controller.js
index 85e3150..e61ada7 100644
--- a/server/api/network_localnet/network_localnet.controller.js
+++ b/server/api/network_localnet/network_localnet.controller.js
@@ -1,128 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/network/localnets              ->  index
- * POST    /api/network/localnets              ->  create
- * GET     /api/network/localnets/:id          ->  show
- * PUT     /api/network/localnets/:id          ->  update
- * DELETE  /api/network/localnets/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var NetworkLocalnet = require('../../models').Network;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function responseWithoutResult(res, statusCode) {
-  statusCode = statusCode || 204;
-  return function() {
-    res.sendStatus(statusCode);
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of NetworkLocalnets
-exports.index = function(req, res) {
-  return NetworkLocalnet
-    .scope('localnet')
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single NetworkLocalnet from the DB
-exports.show = function(req, res) {
-  return NetworkLocalnet.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new NetworkLocalnet in the DB
-exports.create = function(req, res) {
-  req.body.type = 'localnet';
-  return NetworkLocalnet.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing NetworkLocalnet in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return NetworkLocalnet.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a NetworkLocalnet from the DB
-exports.destroy = function(req, res) {
-  return NetworkLocalnet
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
-
-exports.bulkDestroy = function(req, res) {
-  return NetworkLocalnet
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(responseWithoutResult(res))
-    .catch(handleError(res));
-};
+var _0xd10e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4E\x65\x74\x77\x6F\x72\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x6C\x6F\x63\x61\x6C\x6E\x65\x74","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x74\x79\x70\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xd10e[0];var _=require(_0xd10e[1]);var Util=require(_0xd10e[2]);var NetworkLocalnet=require(_0xd10e[4])[_0xd10e[3]];function handleError(_0x9cd4x5,_0x9cd4x6){_0x9cd4x6= _0x9cd4x6|| 500;return function(_0x9cd4x7){_0x9cd4x5[_0xd10e[6]](_0x9cd4x6)[_0xd10e[5]](_0x9cd4x7)}}function responseWithResult(_0x9cd4x5,_0x9cd4x6){_0x9cd4x6= _0x9cd4x6|| 200;return function(_0x9cd4x9){if(_0x9cd4x9){_0x9cd4x5[_0xd10e[6]](_0x9cd4x6)[_0xd10e[7]](_0x9cd4x9)}}}function responseWithoutResult(_0x9cd4x5,_0x9cd4x6){_0x9cd4x6= _0x9cd4x6|| 204;return function(){_0x9cd4x5[_0xd10e[8]](_0x9cd4x6)}}function handleEntityNotFound(_0x9cd4x5){return function(_0x9cd4x9){if(!_0x9cd4x9){_0x9cd4x5[_0xd10e[6]](404)[_0xd10e[9]]();return null};return _0x9cd4x9}}function saveUpdates(_0x9cd4xd){return function(_0x9cd4x9){return _0x9cd4x9[_0xd10e[11]](_0x9cd4xd)[_0xd10e[10]](function(_0x9cd4xe){return _0x9cd4xe})}}function removeEntity(_0x9cd4x5){return function(_0x9cd4x9){if(_0x9cd4x9){return _0x9cd4x9[_0xd10e[12]]()[_0xd10e[10]](function(){_0x9cd4x5[_0xd10e[6]](204)[_0xd10e[9]]()})}}}exports[_0xd10e[13]]= function(_0x9cd4x10,_0x9cd4x5){return NetworkLocalnet[_0xd10e[19]](_0xd10e[18])[_0xd10e[17]](Util[_0xd10e[16]](_0x9cd4x10[_0xd10e[15]]))[_0xd10e[10]](responseWithResult(_0x9cd4x5))[_0xd10e[14]](handleError(_0x9cd4x5))};exports[_0xd10e[20]]= function(_0x9cd4x10,_0x9cd4x5){return NetworkLocalnet[_0xd10e[23]](_0x9cd4x10[_0xd10e[22]][_0xd10e[21]])[_0xd10e[10]](handleEntityNotFound(_0x9cd4x5))[_0xd10e[10]](responseWithResult(_0x9cd4x5))[_0xd10e[14]](handleError(_0x9cd4x5))};exports[_0xd10e[24]]= function(_0x9cd4x10,_0x9cd4x5){_0x9cd4x10[_0xd10e[26]][_0xd10e[25]]= _0xd10e[18];return NetworkLocalnet[_0xd10e[24]](_0x9cd4x10[_0xd10e[26]])[_0xd10e[10]](responseWithResult(_0x9cd4x5,201))[_0xd10e[14]](handleError(_0x9cd4x5))};exports[_0xd10e[27]]= function(_0x9cd4x10,_0x9cd4x5){if(_0x9cd4x10[_0xd10e[26]][_0xd10e[21]]){delete _0x9cd4x10[_0xd10e[26]][_0xd10e[21]]};return NetworkLocalnet[_0xd10e[23]](_0x9cd4x10[_0xd10e[22]][_0xd10e[21]])[_0xd10e[10]](handleEntityNotFound(_0x9cd4x5))[_0xd10e[10]](saveUpdates(_0x9cd4x10[_0xd10e[26]]))[_0xd10e[10]](responseWithResult(_0x9cd4x5))[_0xd10e[14]](handleError(_0x9cd4x5))};exports[_0xd10e[12]]= function(_0x9cd4x10,_0x9cd4x5){return NetworkLocalnet[_0xd10e[23]](_0x9cd4x10[_0xd10e[22]][_0xd10e[21]])[_0xd10e[10]](handleEntityNotFound(_0x9cd4x5))[_0xd10e[10]](removeEntity(_0x9cd4x5))[_0xd10e[14]](handleError(_0x9cd4x5))};exports[_0xd10e[28]]= function(_0x9cd4x10,_0x9cd4x5){return NetworkLocalnet[_0xd10e[12]]({where:{id:_0x9cd4x10[_0xd10e[15]][_0xd10e[29]]},individualHooks:true})[_0xd10e[10]](responseWithoutResult(_0x9cd4x5))[_0xd10e[14]](handleError(_0x9cd4x5))}
\ No newline at end of file
diff --git a/server/api/network_localnet/network_localnet.events.js b/server/api/network_localnet/network_localnet.events.js
index c5f5cbe..6e2aaf5 100644
--- a/server/api/network_localnet/network_localnet.events.js
+++ b/server/api/network_localnet/network_localnet.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Network = require('../../models').Network;
-
-var NetworkEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-NetworkEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Network.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    NetworkEvents.emit(event + ':' + doc._id, doc);
-    NetworkEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = NetworkEvents;
+var _0x176c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4E\x65\x74\x77\x6F\x72\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x176c[0];const EventEmitter=require(_0x176c[1]);const Network=require(_0x176c[3])[_0x176c[2]];var NetworkEvents= new EventEmitter();NetworkEvents[_0x176c[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x176c[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x176c[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x176c[6]};for(var e in events){var event=events[e];Network[_0x176c[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xd646x8,_0xd646x9,_0xd646xa){NetworkEvents[_0x176c[10]](event+ _0x176c[8]+ _0xd646x8[_0x176c[9]],_0xd646x8);NetworkEvents[_0x176c[10]](event,_0xd646x8);_0xd646xa(null)}}module[_0x176c[11]]= NetworkEvents
\ No newline at end of file
diff --git a/server/api/network_localnet/network_localnet.socket.js b/server/api/network_localnet/network_localnet.socket.js
index ccc151b..6767bc8 100644
--- a/server/api/network_localnet/network_localnet.socket.js
+++ b/server/api/network_localnet/network_localnet.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const NetworkLocalnetEvents = require('./network_localnet.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('network_localnet:' + event, socket);
-
-    NetworkLocalnetEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    NetworkLocalnetEvents.removeListener(event, listener);
-  };
-}
+var _0xb3c5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xb3c5[0];const NetworkLocalnetEvents=require(_0xb3c5[1]);var events=[_0xb3c5[2],_0xb3c5[3]];exports[_0xb3c5[4]]= function(_0x4ba2x3){for(var _0x4ba2x4=0,_0x4ba2x5=events[_0xb3c5[5]];_0x4ba2x4< _0x4ba2x5;_0x4ba2x4++){var _0x4ba2x6=events[_0x4ba2x4];var _0x4ba2x7=createListener(_0xb3c5[6]+ _0x4ba2x6,_0x4ba2x3);NetworkLocalnetEvents[_0xb3c5[7]](_0x4ba2x6,_0x4ba2x7);_0x4ba2x3[_0xb3c5[7]](_0xb3c5[8],removeListener(_0x4ba2x6,_0x4ba2x7))}};function createListener(_0x4ba2x6,_0x4ba2x3){return function(_0x4ba2x9){_0x4ba2x3[_0xb3c5[9]](_0x4ba2x6,_0x4ba2x9)}}function removeListener(_0x4ba2x6,_0x4ba2x7){return function(){NetworkLocalnetEvents[_0xb3c5[10]](_0x4ba2x6,_0x4ba2x7)}}
\ No newline at end of file
diff --git a/server/api/openchannel_account/index.js b/server/api/openchannel_account/index.js
index f23c23c..82e1d7a 100644
--- a/server/api/openchannel_account/index.js
+++ b/server/api/openchannel_account/index.js
@@ -1,30 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./openchannel_account.controller');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-
-router.get('/', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.index);
-router.get('/:id', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.show);
-router.get('/:id/applications', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.showApplications);
-router.get('/:id/rooms', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.getOpenchannelRooms);
-router.get('/:id/dispositions', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.getDispositions);
-router.post('/', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.create);
-router.post('/:id/applications', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.createApplication);
-router.post('/:id/dispositions', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.createDisposition);
-router.post('/:id/send', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.sendMessage);
-router.post('/:id/receive', license.isValidDate(), controller.receiveMessage);
-router.put('/:id', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.update);
-router.put('/:id/applications', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.updateApplications);
-router.put('/:id/applications/:appId', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.updateApplication);
-router.put('/:id/dispositions/:dispId', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.updateDisposition);
-router.delete('/:id', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), auth.hasModule([20], ['admin']), controller.destroy);
-router.delete('/:id/applications', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.bulkDestroyApplications);
-router.delete('/:id/applications/:appId', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.destroyApplication);
-router.delete('/:id/dispositions/:dispId', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.destroyDisposition);
-
-module.exports = router;
+var _0x2a59=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x72\x6F\x6F\x6D\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x73","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x73\x65\x6E\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x72\x65\x63\x65\x69\x76\x65","\x72\x65\x63\x65\x69\x76\x65\x4D\x65\x73\x73\x61\x67\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x61\x70\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73\x2F\x3A\x64\x69\x73\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x2a59[0];var express=require(_0x2a59[1]);var auth=require(_0x2a59[2]);var controller=require(_0x2a59[3]);var license=require(_0x2a59[4]);var router=express.Router();router[_0x2a59[13]](_0x2a59[5],license[_0x2a59[6]](),license[_0x2a59[7]](),auth[_0x2a59[8]](),auth[_0x2a59[11]]([20],[_0x2a59[9],_0x2a59[10]]),controller[_0x2a59[12]]);router[_0x2a59[13]](_0x2a59[14],license[_0x2a59[6]](),license[_0x2a59[7]](),auth[_0x2a59[8]](),auth[_0x2a59[11]]([20],[_0x2a59[9]]),controller[_0x2a59[15]]);router[_0x2a59[13]](_0x2a59[16],license[_0x2a59[6]](),license[_0x2a59[7]](),auth[_0x2a59[8]](),auth[_0x2a59[11]]([20],[_0x2a59[9]]),controller[_0x2a59[17]]);router[_0x2a59[13]](_0x2a59[18],license[_0x2a59[6]](),license[_0x2a59[7]](),auth[_0x2a59[8]](),auth[_0x2a59[11]]([20],[_0x2a59[9],_0x2a59[10]]),controller[_0x2a59[19]]);router[_0x2a59[13]](_0x2a59[20],license[_0x2a59[6]](),license[_0x2a59[7]](),auth[_0x2a59[8]](),auth[_0x2a59[11]]([20],[_0x2a59[9],_0x2a59[10]]),controller[_0x2a59[21]]);router[_0x2a59[23]](_0x2a59[5],license[_0x2a59[6]](),license[_0x2a59[7]](),auth[_0x2a59[8]](),auth[_0x2a59[11]]([20],[_0x2a59[9]]),controller[_0x2a59[22]]);router[_0x2a59[23]](_0x2a59[16],license[_0x2a59[6]](),license[_0x2a59[7]](),auth[_0x2a59[8]](),auth[_0x2a59[11]]([20],[_0x2a59[9]]),controller[_0x2a59[24]]);router[_0x2a59[23]](_0x2a59[20],license[_0x2a59[6]](),license[_0x2a59[7]](),auth[_0x2a59[8]](),auth[_0x2a59[11]]([20],[_0x2a59[9]]),controller[_0x2a59[25]]);router[_0x2a59[23]](_0x2a59[26],license[_0x2a59[6]](),license[_0x2a59[7]](),auth[_0x2a59[8]](),auth[_0x2a59[11]]([20],[_0x2a59[9],_0x2a59[10]]),controller[_0x2a59[27]]);router[_0x2a59[23]](_0x2a59[28],license[_0x2a59[6]](),controller[_0x2a59[29]]);router[_0x2a59[31]](_0x2a59[14],license[_0x2a59[6]](),license[_0x2a59[7]](),auth[_0x2a59[8]](),auth[_0x2a59[11]]([20],[_0x2a59[9]]),controller[_0x2a59[30]]);router[_0x2a59[31]](_0x2a59[16],license[_0x2a59[6]](),license[_0x2a59[7]](),auth[_0x2a59[8]](),auth[_0x2a59[11]]([20],[_0x2a59[9]]),controller[_0x2a59[32]]);router[_0x2a59[31]](_0x2a59[33],license[_0x2a59[6]](),license[_0x2a59[7]](),auth[_0x2a59[8]](),auth[_0x2a59[11]]([20],[_0x2a59[9]]),controller[_0x2a59[34]]);router[_0x2a59[31]](_0x2a59[35],license[_0x2a59[6]](),license[_0x2a59[7]](),auth[_0x2a59[8]](),auth[_0x2a59[11]]([20],[_0x2a59[9]]),controller[_0x2a59[36]]);router[_0x2a59[38]](_0x2a59[14],license[_0x2a59[6]](),license[_0x2a59[7]](),auth[_0x2a59[8]](),auth[_0x2a59[11]]([20],[_0x2a59[9]]),auth[_0x2a59[11]]([20],[_0x2a59[9]]),controller[_0x2a59[37]]);router[_0x2a59[38]](_0x2a59[16],license[_0x2a59[6]](),license[_0x2a59[7]](),auth[_0x2a59[8]](),auth[_0x2a59[11]]([20],[_0x2a59[9]]),controller[_0x2a59[39]]);router[_0x2a59[38]](_0x2a59[33],license[_0x2a59[6]](),license[_0x2a59[7]](),auth[_0x2a59[8]](),auth[_0x2a59[11]]([20],[_0x2a59[9]]),controller[_0x2a59[40]]);router[_0x2a59[38]](_0x2a59[35],license[_0x2a59[6]](),license[_0x2a59[7]](),auth[_0x2a59[8]](),auth[_0x2a59[11]]([20],[_0x2a59[9]]),controller[_0x2a59[41]]);module[_0x2a59[42]]= router
\ No newline at end of file
diff --git a/server/api/openchannel_account/openchannel_account.controller.js b/server/api/openchannel_account/openchannel_account.controller.js
index cb31ac8..0ec1a98 100644
--- a/server/api/openchannel_account/openchannel_account.controller.js
+++ b/server/api/openchannel_account/openchannel_account.controller.js
@@ -1,552 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/openchannel/accounts              ->  index
- * POST    /api/openchannel/accounts              ->  create
- * GET     /api/openchannel/accounts/:id          ->  show
- * PUT     /api/openchannel/accounts/:id          ->  update
- * DELETE  /api/openchannel/accounts/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var OpenchannelAccount = require('../../models').OpenchannelAccount;
-var sequelize = require('../../models').sequelize;
-var User = require('../../models').User;
-var OpenchannelQueue = require('../../models').OpenchannelQueue;
-var OpenchannelApplication = require('../../models').OpenchannelApplication;
-var OpenchannelMessage = require('../../models').OpenchannelMessage;
-var OpenchannelRoom = require('../../models').OpenchannelRoom;
-var OpenchannelDisposition = require('../../models').OpenchannelDisposition;
-var OpenchannelAccount = require('../../models').OpenchannelAccount;
-var Contact = require('../../models').Contact;
-var Interval = require('../../models').Interval;
-var Promise = require('bluebird');
-var moment = require('moment');
-
-
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-// Gets a list of OpenchannelAccount
-exports.index = function(req, res) {
-  return OpenchannelAccount
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(account) {
-      res.status(200).send(account);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-}
-
-// Gets a single OpenchannelAccount from the DB
-exports.show = function(req, res) {
-  return OpenchannelAccount
-    .findById(req.params.id)
-    .then(function(Account) {
-      if (!Account) {
-        return res.sendStatus(404);
-      }
-      return res.send(Account);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-exports.getDispositions = function(req, res, next) {
-  return OpenchannelAccount
-    .findById(req.params.id)
-    .then(function(Account) {
-      if (!Account) {
-        return res.sendStatus(404);
-      }
-
-      return Account
-        .getOpenchannelDispositions();
-    })
-    .then(function(Dispositions) {
-      return res.status(200).send({
-        rows: Dispositions,
-        count: Dispositions.length
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Get Applications
-exports.showApplications = function(req, res, next) {
-  return OpenchannelAccount
-    .scope('default')
-    .findById(req.params.id)
-    .then(function(Account) {
-      if (!Account) {
-        return res.sendStatus(404);
-      }
-
-      return Account
-        .getOpenchannelApplications(_.merge(Util.getQuery(req.query), {
-          include: [{
-            model: OpenchannelQueue,
-            attributes: ['id', 'name']
-          }, {
-            model: User,
-            attributes: ['id', 'name', 'online']
-          }, {
-            model: Interval,
-            attributes: ['id', 'name']
-          }],
-          order: 'priority ASC'
-        }));
-    })
-    .then(function(Applications) {
-      return res.send({
-        count: Applications.length,
-        rows: Applications
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Creates a new OpenchannelAccount in the DB
-exports.create = function(req, res) {
-  return OpenchannelAccount
-    .create(req.body)
-    .then(function(Account) {
-      return res.status(201).send(Account);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-}
-
-exports.createDisposition = function(req, res, next) {
-  req.body.OpenchannelAccountId = req.params.id;
-
-  return OpenchannelDisposition
-    .create(req.body)
-    .then(function(Diposition) {
-      return res.status(201).send(Diposition);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a send Message in the DB.
-exports.sendMessage = function(req, res, next) {
-  req.body.OpenchannelAccountId = req.params.id;
-  req.body.UserId = req.user.id;
-  return OpenchannelMessage
-    .create(req.body, {
-      user: req.user
-    })
-    .then(function(message) {
-      return res.status(201).send(message);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Creates a receive Message in the DB.
-exports.receiveMessage = function(req, res, next) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  var _message = req.body;
-  var _account;
-
-  return OpenchannelAccount
-    .findById(req.params.id)
-    .then(function(Account) {
-      if (!Account) {
-        throw new Error('Account not found');
-      }
-      _account = Account
-      console.log(_message);
-      if (!_message.from) {
-        throw new Error('Received message does not contain sender Id');
-      }
-      return OpenchannelRoom
-        .findAll({
-          limit: 1,
-          where: {
-            contact: _message.from,
-            OpenchannelAccountId: _account.id
-          },
-          order: [
-            ['createdAt', 'DESC']
-          ]
-        })
-    })
-    .then(function(smsroom) {
-      var room = smsroom[0];
-      if (!room || room.status == 'CLOSED') {
-        var parentID = room ? room.id : null;
-        return OpenchannelRoom
-          .create({
-            contact: _message.from,
-            OpenchannelAccountId: _account.id,
-            status: 'NEW',
-            ParentId: parentID,
-            lastEvent: 'RECEIVED',
-            lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'),
-            openchannelIn: 1
-          })
-      } else {
-        return room
-          .updateAttributes({
-            lastEvent: 'RECEIVED',
-            lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'),
-            status: 'OPEN',
-            openReason: 'system',
-            openchannelIn: ++room.openchannelIn
-          });
-      }
-
-    })
-    .then(function(room) {
-      _message.OpenchannelAccountId = _account.id;
-      _message.OpenchannelRoomId = room.id;
-      _message.status = 'RECEIVED';
-      return OpenchannelMessage
-        .create(_message)
-
-    })
-    .then(function(Message) {
-      return res.status(201).send(Message);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-// Updates an existing OpenchannelAccount in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return OpenchannelAccount.findById(req.params.id)
-    .then(function(Account) {
-      if (!Account) {
-        return res.sendStatus(404);
-      }
-
-      var updated = _.merge(Account, req.body);
-      return updated
-        .save();
-    })
-    .then(function(Account) {
-      return res.status(200).send(Account);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(function(err) {
-      console.log('   err', err);
-      return handleError(res, err);
-    });
-
-}
-
-exports.updateDisposition = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return OpenchannelDisposition
-    .findById(req.params.dispId)
-    .then(function(Disposition) {
-      if (!Disposition) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(Disposition, req.body);
-      return updated
-        .save();
-    })
-    .then(function(Disposition) {
-      return res.status(200).send(Disposition);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-
-// Updates aapplications
-exports.updateApplications = function(req, res) {
-
-  var priority = 0;
-  var apps = req.body;
-  apps.forEach(function(app) {
-    delete app.id;
-    delete app.createdAt;
-    delete app.updatedAt;
-
-    app.priority = ++priority;
-  });
-  console.log('req app', req.body);
-  return sequelize.transaction(function(t) {
-    return OpenchannelApplication
-      .destroy({
-        where: {
-          OpenchannelAccountId: req.params.id
-        },
-        individualHooks: true,
-        transaction: t
-      }).then(function(Application) {
-        return OpenchannelApplication
-          .bulkCreate(apps, {
-            individualHooks: true,
-            transaction: t
-          });
-      });
-  }).then(function(Accounts) {
-    return res.status(200).send({
-      count: Accounts.length,
-      rows: Accounts
-    });
-  }).catch(function(err) {
-    return handleError(res, err);
-  });
-};
-exports.updateApplication = function(req, res) {
-    if (req.body.id) {
-      delete req.body.id;
-    }
-    return OpenchannelApplication
-      .findById(req.params.appId)
-      .then(function(Application) {
-        if (!Application) {
-          return res.sendStatus(404);
-        }
-        var updated = _.merge(Application, req.body);
-        return updated.save();
-      })
-      .then(function(Application) {
-        return res.status(200).send(Application);
-      })
-      .catch(function(err) {
-        return handleError(res, err);
-      });
-  }
-  // Deletes a  OpenchannelAccount from the DB
-exports.destroy = function(req, res) {
-  return OpenchannelAccount.findById(req.params.id)
-    .then(function(Account) {
-      if (!Account) {
-        return res.sendStatus(404);
-      }
-
-      return Account
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-exports.destroyApplication = function(req, res, next) {
-  return OpenchannelApplication
-    .findById(req.params.appId)
-    .then(function(Application) {
-      if (!Application) {
-        return res.sendStatus(404);
-      }
-
-      return Application
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.destroyDisposition = function(req, res, next) {
-  return OpenchannelDisposition
-    .findById(req.params.dispId)
-    .then(function(Diposition) {
-      if (!Diposition) {
-        return res.sendStatus(404);
-      }
-      return Diposition
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.bulkDestroyApplications = function(req, res) {
-  return OpenchannelApplication
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-
-exports.getOpenchannelRooms = function(req, res, next) {
-  var _query = {
-    where: {
-      OpenchannelAccountId: req.params.id,
-      $and: []
-    },
-    attributes: ['id', 'contact', 'updatedAt', 'tags', 'disposition', 'lastEvent'],
-    include: []
-  };
-
-  // TO MOVE SOON INTO AN EXTENAL UTIL FILE
-  if (req.query) {
-    if (req.query.tags) {
-      if (_.isArray(req.query.tags)) {
-        for (var i = 0; i < req.query.tags.length; i++) {
-          _query.where.$and.push({
-            tags: {
-              $like: '%' + req.query.tags[i] + '%'
-            }
-          });
-        }
-      } else {
-        _query.where.$and.push({
-          tags: {
-            $like: '%' + req.query.tags + '%'
-          }
-        });
-      }
-
-      delete req.query.tags;
-    }
-
-    _.merge(_query.where, req.query);
-  }
-
-  switch (req.user.role) {
-    case 'agent':
-      _query.include.push({
-        model: User,
-        attributes: ['id']
-      });
-      var _agents;
-      var _agentQueues;
-      var _accountQueues;
-
-      return User
-        .findById(req.user.id)
-        .then(function(user) {
-          // console.log('user');
-          if (user) {
-            return user
-              .getOpenchannelQueues();
-          } else {
-            return [];
-          }
-        })
-        .then(function(queues) {
-          // console.log(queues);
-          _agentQueues = _.map(queues, 'id');
-          return OpenchannelAccount
-            .findById(req.params.id);
-        })
-        .then(function(account) {
-          return account
-            .getOpenchannelApplications({
-              where: {
-                $or: [{
-                  app: 'queue'
-                }, {
-                  app: 'agent'
-                }]
-              }
-            });
-        })
-        .then(function(apps) {
-          _agents = _.map(_.find(apps, {
-            'app': 'agent'
-          }), 'UserId');
-          _accountQueues = _.map(_.find(apps, {
-            'app': 'queue'
-          }), 'OpenchannelQueueId');
-          if (_.intersection(_agentQueues, _accountQueues).length || _.intersection(_agents, [req.user.id]).length) {
-            return OpenchannelRoom
-              .findAll(_query)
-              .then(function(Rooms) {
-                return res.status(200).send(Rooms);
-              })
-              .catch(function(err) {
-                console.error(err);
-                return handleError(res, err);
-              });
-          } else {
-            return res.status(200).send([]);
-          }
-        })
-        .catch(function(err) {
-          console.error(err);
-        });
-
-    default:
-
-      return OpenchannelRoom
-        .findAll(_query)
-        .then(function(Rooms) {
-          return res.status(200).send(Rooms);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-  }
-
-};
-
-exports.createApplication = function(req, res, next) {
-
-  return OpenchannelApplication
-    .max('priority', {
-      where: {
-        OpenchannelAccountId: req.params.id
-      }
-    }).then(function(max) {
-      // SET PRIORITY
-      req.body.priority = max ? ++max : 1;
-      req.body.OpenchannelAccountId = req.params.id;
-
-      return OpenchannelApplication.create(req.body);
-    })
-    .then(function(ocApplication) {
-      return res.status(201).send(ocApplication);
-    })
-    .catch(function(err) {
-      console.log('err', err);
-      return handleError(res, err);
-    });
-};
+var _0x4e9a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x6D\x65\x72\x67\x65","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x75\x73\x65\x72","\x72\x65\x63\x65\x69\x76\x65\x4D\x65\x73\x73\x61\x67\x65","\x6C\x6F\x67","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x49\x64","\x52\x45\x43\x45\x49\x56\x45\x44","\x43\x4C\x4F\x53\x45\x44","\x66\x72\x6F\x6D","\x4E\x45\x57","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x4F\x50\x45\x4E","\x73\x79\x73\x74\x65\x6D","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x63\x63\x6F\x75\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x63\x6F\x6E\x74\x61\x69\x6E\x20\x73\x65\x6E\x64\x65\x72\x20\x49\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x66\x69\x6E\x64\x41\x6C\x6C","\x75\x70\x64\x61\x74\x65","\x20\x20\x20\x65\x72\x72","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x69\x73\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x6F\x72\x45\x61\x63\x68","\x72\x65\x71\x20\x61\x70\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x70\x70\x49\x64","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x64\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x73","\x63\x6F\x6E\x74\x61\x63\x74","\x74\x61\x67\x73","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6C\x61\x73\x74\x45\x76\x65\x6E\x74","\x69\x73\x41\x72\x72\x61\x79","\x25","\x70\x75\x73\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x69\x6E\x63\x6C\x75\x64\x65","\x65\x72\x72\x6F\x72","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64","\x6D\x61\x70","\x71\x75\x65\x75\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x49\x64","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x72\x6F\x6C\x65","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x65\x72\x72","\x6D\x61\x78"];_0x4e9a[0];var _=require(_0x4e9a[1]);var Util=require(_0x4e9a[2]);var OpenchannelAccount=require(_0x4e9a[4])[_0x4e9a[3]];var sequelize=require(_0x4e9a[4])[_0x4e9a[5]];var User=require(_0x4e9a[4])[_0x4e9a[6]];var OpenchannelQueue=require(_0x4e9a[4])[_0x4e9a[7]];var OpenchannelApplication=require(_0x4e9a[4])[_0x4e9a[8]];var OpenchannelMessage=require(_0x4e9a[4])[_0x4e9a[9]];var OpenchannelRoom=require(_0x4e9a[4])[_0x4e9a[10]];var OpenchannelDisposition=require(_0x4e9a[4])[_0x4e9a[11]];var OpenchannelAccount=require(_0x4e9a[4])[_0x4e9a[3]];var Contact=require(_0x4e9a[4])[_0x4e9a[12]];var Interval=require(_0x4e9a[4])[_0x4e9a[13]];var Promise=require(_0x4e9a[14]);var moment=require(_0x4e9a[15]);function handleError(_0x452cx10,_0x452cx11){return _0x452cx10[_0x4e9a[17]](500)[_0x4e9a[16]](_0x452cx11)}exports[_0x4e9a[18]]= function(_0x452cx12,_0x452cx10){return OpenchannelAccount[_0x4e9a[23]](Util[_0x4e9a[22]](_0x452cx12[_0x4e9a[21]]))[_0x4e9a[20]](function(_0x452cx13){_0x452cx10[_0x4e9a[17]](200)[_0x4e9a[16]](_0x452cx13)})[_0x4e9a[19]](function(_0x452cx11){return handleError(_0x452cx10,_0x452cx11)})};exports[_0x4e9a[24]]= function(_0x452cx12,_0x452cx10){return OpenchannelAccount[_0x4e9a[28]](_0x452cx12[_0x4e9a[27]][_0x4e9a[26]])[_0x4e9a[20]](function(_0x452cx14){if(!_0x452cx14){return _0x452cx10[_0x4e9a[25]](404)};return _0x452cx10[_0x4e9a[16]](_0x452cx14)})[_0x4e9a[19]](function(_0x452cx11){return handleError(_0x452cx10,_0x452cx11)})};exports[_0x4e9a[29]]= function(_0x452cx12,_0x452cx10,_0x452cx15){return OpenchannelAccount[_0x4e9a[28]](_0x452cx12[_0x4e9a[27]][_0x4e9a[26]])[_0x4e9a[20]](function(_0x452cx14){if(!_0x452cx14){return _0x452cx10[_0x4e9a[25]](404)};return _0x452cx14[_0x4e9a[31]]()})[_0x4e9a[20]](function(_0x452cx16){return _0x452cx10[_0x4e9a[17]](200)[_0x4e9a[16]]({rows:_0x452cx16,count:_0x452cx16[_0x4e9a[30]]})})[_0x4e9a[19]](function(_0x452cx11){return handleError(_0x452cx10,_0x452cx11)})};exports[_0x4e9a[32]]= function(_0x452cx12,_0x452cx10,_0x452cx15){return OpenchannelAccount[_0x4e9a[39]](_0x4e9a[38])[_0x4e9a[28]](_0x452cx12[_0x4e9a[27]][_0x4e9a[26]])[_0x4e9a[20]](function(_0x452cx14){if(!_0x452cx14){return _0x452cx10[_0x4e9a[25]](404)};return _0x452cx14[_0x4e9a[37]](_[_0x4e9a[36]](Util[_0x4e9a[22]](_0x452cx12[_0x4e9a[21]]),{include:[{model:OpenchannelQueue,attributes:[_0x4e9a[26],_0x4e9a[33]]},{model:User,attributes:[_0x4e9a[26],_0x4e9a[33],_0x4e9a[34]]},{model:Interval,attributes:[_0x4e9a[26],_0x4e9a[33]]}],order:_0x4e9a[35]}))})[_0x4e9a[20]](function(_0x452cx17){return _0x452cx10[_0x4e9a[16]]({count:_0x452cx17[_0x4e9a[30]],rows:_0x452cx17})})[_0x4e9a[19]](function(_0x452cx11){return handleError(_0x452cx10,_0x452cx11)})};exports[_0x4e9a[40]]= function(_0x452cx12,_0x452cx10){return OpenchannelAccount[_0x4e9a[40]](_0x452cx12[_0x4e9a[43]])[_0x4e9a[20]](function(_0x452cx14){return _0x452cx10[_0x4e9a[17]](201)[_0x4e9a[16]](_0x452cx14)})[_0x4e9a[19]](sequelize.UniqueConstraintError,function(_0x452cx11){return Util[_0x4e9a[42]][_0x4e9a[41]](_0x452cx10,_0x452cx11)})[_0x4e9a[19]](function(_0x452cx11){return handleError(_0x452cx10,_0x452cx11)})};exports[_0x4e9a[44]]= function(_0x452cx12,_0x452cx10,_0x452cx15){_0x452cx12[_0x4e9a[43]][_0x4e9a[45]]= _0x452cx12[_0x4e9a[27]][_0x4e9a[26]];return OpenchannelDisposition[_0x4e9a[40]](_0x452cx12[_0x4e9a[43]])[_0x4e9a[20]](function(_0x452cx18){return _0x452cx10[_0x4e9a[17]](201)[_0x4e9a[16]](_0x452cx18)})[_0x4e9a[19]](function(_0x452cx11){return handleError(_0x452cx10,_0x452cx11)})};exports[_0x4e9a[46]]= function(_0x452cx12,_0x452cx10,_0x452cx15){_0x452cx12[_0x4e9a[43]][_0x4e9a[45]]= _0x452cx12[_0x4e9a[27]][_0x4e9a[26]];_0x452cx12[_0x4e9a[43]][_0x4e9a[47]]= _0x452cx12[_0x4e9a[48]][_0x4e9a[26]];return OpenchannelMessage[_0x4e9a[40]](_0x452cx12[_0x4e9a[43]],{user:_0x452cx12[_0x4e9a[48]]})[_0x4e9a[20]](function(_0x452cx19){return _0x452cx10[_0x4e9a[17]](201)[_0x4e9a[16]](_0x452cx19)})[_0x4e9a[19]](function(_0x452cx11){return handleError(_0x452cx10,_0x452cx11)})};exports[_0x4e9a[49]]= function(_0x452cx12,_0x452cx10,_0x452cx15){if(_0x452cx12[_0x4e9a[43]][_0x4e9a[26]]){delete _0x452cx12[_0x4e9a[43]][_0x4e9a[26]]};var _0x452cx1a=_0x452cx12[_0x4e9a[43]];var _0x452cx1b;return OpenchannelAccount[_0x4e9a[28]](_0x452cx12[_0x4e9a[27]][_0x4e9a[26]])[_0x4e9a[20]](function(_0x452cx14){if(!_0x452cx14){throw  new Error(_0x4e9a[62])};_0x452cx1b= _0x452cx14;console[_0x4e9a[50]](_0x452cx1a);if(!_0x452cx1a[_0x4e9a[54]]){throw  new Error(_0x4e9a[63])};return OpenchannelRoom[_0x4e9a[66]]({limit:1,where:{contact:_0x452cx1a[_0x4e9a[54]],OpenchannelAccountId:_0x452cx1b[_0x4e9a[26]]},order:[[_0x4e9a[64],_0x4e9a[65]]]})})[_0x4e9a[20]](function(_0x452cx1e){var _0x452cx1d=_0x452cx1e[0];if(!_0x452cx1d|| _0x452cx1d[_0x4e9a[17]]== _0x4e9a[53]){var _0x452cx1f=_0x452cx1d?_0x452cx1d[_0x4e9a[26]]:null;return OpenchannelRoom[_0x4e9a[40]]({contact:_0x452cx1a[_0x4e9a[54]],OpenchannelAccountId:_0x452cx1b[_0x4e9a[26]],status:_0x4e9a[55],ParentId:_0x452cx1f,lastEvent:_0x4e9a[52],lastEventAt:moment()[_0x4e9a[57]](_0x4e9a[56]),openchannelIn:1})}else {return _0x452cx1d[_0x4e9a[61]]({lastEvent:_0x4e9a[52],lastEventAt:moment()[_0x4e9a[57]](_0x4e9a[56]),status:_0x4e9a[58],openReason:_0x4e9a[59],openchannelIn:++_0x452cx1d[_0x4e9a[60]]})}})[_0x4e9a[20]](function(_0x452cx1d){_0x452cx1a[_0x4e9a[45]]= _0x452cx1b[_0x4e9a[26]];_0x452cx1a[_0x4e9a[51]]= _0x452cx1d[_0x4e9a[26]];_0x452cx1a[_0x4e9a[17]]= _0x4e9a[52];return OpenchannelMessage[_0x4e9a[40]](_0x452cx1a)})[_0x4e9a[20]](function(_0x452cx1c){return _0x452cx10[_0x4e9a[17]](201)[_0x4e9a[16]](_0x452cx1c)})[_0x4e9a[19]](function(_0x452cx11){console[_0x4e9a[50]](_0x452cx11);return handleError(_0x452cx10,_0x452cx11)})};exports[_0x4e9a[67]]= function(_0x452cx12,_0x452cx10){if(_0x452cx12[_0x4e9a[43]][_0x4e9a[26]]){delete _0x452cx12[_0x4e9a[43]][_0x4e9a[26]]};return OpenchannelAccount[_0x4e9a[28]](_0x452cx12[_0x4e9a[27]][_0x4e9a[26]])[_0x4e9a[20]](function(_0x452cx14){if(!_0x452cx14){return _0x452cx10[_0x4e9a[25]](404)};var _0x452cx20=_[_0x4e9a[36]](_0x452cx14,_0x452cx12[_0x4e9a[43]]);return _0x452cx20[_0x4e9a[69]]()})[_0x4e9a[20]](function(_0x452cx14){return _0x452cx10[_0x4e9a[17]](200)[_0x4e9a[16]](_0x452cx14)})[_0x4e9a[19]](sequelize.UniqueConstraintError,function(_0x452cx11){return Util[_0x4e9a[42]][_0x4e9a[41]](_0x452cx10,_0x452cx11)})[_0x4e9a[19]](function(_0x452cx11){console[_0x4e9a[50]](_0x4e9a[68],_0x452cx11);return handleError(_0x452cx10,_0x452cx11)})};exports[_0x4e9a[70]]= function(_0x452cx12,_0x452cx10){if(_0x452cx12[_0x4e9a[43]][_0x4e9a[26]]){delete _0x452cx12[_0x4e9a[43]][_0x4e9a[26]]};return OpenchannelDisposition[_0x4e9a[28]](_0x452cx12[_0x4e9a[27]][_0x4e9a[71]])[_0x4e9a[20]](function(_0x452cx21){if(!_0x452cx21){return _0x452cx10[_0x4e9a[25]](404)};var _0x452cx20=_[_0x4e9a[36]](_0x452cx21,_0x452cx12[_0x4e9a[43]]);return _0x452cx20[_0x4e9a[69]]()})[_0x4e9a[20]](function(_0x452cx21){return _0x452cx10[_0x4e9a[17]](200)[_0x4e9a[16]](_0x452cx21)})[_0x4e9a[19]](function(_0x452cx11){return handleError(_0x452cx10,_0x452cx11)})};exports[_0x4e9a[72]]= function(_0x452cx12,_0x452cx10){var _0x452cx22=0;var _0x452cx23=_0x452cx12[_0x4e9a[43]];_0x452cx23[_0x4e9a[75]](function(_0x452cx24){delete _0x452cx24[_0x4e9a[26]];delete _0x452cx24[_0x4e9a[64]];delete _0x452cx24[_0x4e9a[73]];_0x452cx24[_0x4e9a[74]]=  ++_0x452cx22});console[_0x4e9a[50]](_0x4e9a[76],_0x452cx12[_0x4e9a[43]]);return sequelize[_0x4e9a[79]](function(_0x452cx26){return OpenchannelApplication[_0x4e9a[78]]({where:{OpenchannelAccountId:_0x452cx12[_0x4e9a[27]][_0x4e9a[26]]},individualHooks:true,transaction:_0x452cx26})[_0x4e9a[20]](function(_0x452cx27){return OpenchannelApplication[_0x4e9a[77]](_0x452cx23,{individualHooks:true,transaction:_0x452cx26})})})[_0x4e9a[20]](function(_0x452cx25){return _0x452cx10[_0x4e9a[17]](200)[_0x4e9a[16]]({count:_0x452cx25[_0x4e9a[30]],rows:_0x452cx25})})[_0x4e9a[19]](function(_0x452cx11){return handleError(_0x452cx10,_0x452cx11)})};exports[_0x4e9a[80]]= function(_0x452cx12,_0x452cx10){if(_0x452cx12[_0x4e9a[43]][_0x4e9a[26]]){delete _0x452cx12[_0x4e9a[43]][_0x4e9a[26]]};return OpenchannelApplication[_0x4e9a[28]](_0x452cx12[_0x4e9a[27]][_0x4e9a[81]])[_0x4e9a[20]](function(_0x452cx27){if(!_0x452cx27){return _0x452cx10[_0x4e9a[25]](404)};var _0x452cx20=_[_0x4e9a[36]](_0x452cx27,_0x452cx12[_0x4e9a[43]]);return _0x452cx20[_0x4e9a[69]]()})[_0x4e9a[20]](function(_0x452cx27){return _0x452cx10[_0x4e9a[17]](200)[_0x4e9a[16]](_0x452cx27)})[_0x4e9a[19]](function(_0x452cx11){return handleError(_0x452cx10,_0x452cx11)})};exports[_0x4e9a[78]]= function(_0x452cx12,_0x452cx10){return OpenchannelAccount[_0x4e9a[28]](_0x452cx12[_0x4e9a[27]][_0x4e9a[26]])[_0x4e9a[20]](function(_0x452cx14){if(!_0x452cx14){return _0x452cx10[_0x4e9a[25]](404)};return _0x452cx14[_0x4e9a[78]]()})[_0x4e9a[20]](function(){return _0x452cx10[_0x4e9a[25]](204)})[_0x4e9a[19]](function(_0x452cx11){return handleError(_0x452cx10,_0x452cx11)})};exports[_0x4e9a[82]]= function(_0x452cx12,_0x452cx10,_0x452cx15){return OpenchannelApplication[_0x4e9a[28]](_0x452cx12[_0x4e9a[27]][_0x4e9a[81]])[_0x4e9a[20]](function(_0x452cx27){if(!_0x452cx27){return _0x452cx10[_0x4e9a[25]](404)};return _0x452cx27[_0x4e9a[78]]()})[_0x4e9a[20]](function(){return _0x452cx10[_0x4e9a[25]](204)})[_0x4e9a[19]](function(_0x452cx11){return handleError(_0x452cx10,_0x452cx11)})};exports[_0x4e9a[83]]= function(_0x452cx12,_0x452cx10,_0x452cx15){return OpenchannelDisposition[_0x4e9a[28]](_0x452cx12[_0x4e9a[27]][_0x4e9a[71]])[_0x4e9a[20]](function(_0x452cx18){if(!_0x452cx18){return _0x452cx10[_0x4e9a[25]](404)};return _0x452cx18[_0x4e9a[78]]()})[_0x4e9a[20]](function(){return _0x452cx10[_0x4e9a[25]](204)})[_0x4e9a[19]](function(_0x452cx11){return handleError(_0x452cx10,_0x452cx11)})};exports[_0x4e9a[84]]= function(_0x452cx12,_0x452cx10){return OpenchannelApplication[_0x4e9a[78]]({where:{id:_0x452cx12[_0x4e9a[21]][_0x4e9a[85]]},individualHooks:true})[_0x4e9a[20]](function(){return _0x452cx10[_0x4e9a[25]](204)})[_0x4e9a[19]](function(_0x452cx11){return handleError(_0x452cx10,_0x452cx11)})};exports[_0x4e9a[86]]= function(_0x452cx12,_0x452cx10,_0x452cx15){var _0x452cx28={where:{OpenchannelAccountId:_0x452cx12[_0x4e9a[27]][_0x4e9a[26]],$and:[]},attributes:[_0x4e9a[26],_0x4e9a[87],_0x4e9a[73],_0x4e9a[88],_0x4e9a[89],_0x4e9a[90]],include:[]};if(_0x452cx12[_0x4e9a[21]]){if(_0x452cx12[_0x4e9a[21]][_0x4e9a[88]]){if(_[_0x4e9a[91]](_0x452cx12[_0x4e9a[21]][_0x4e9a[88]])){for(var _0x452cx29=0;_0x452cx29< _0x452cx12[_0x4e9a[21]][_0x4e9a[88]][_0x4e9a[30]];_0x452cx29++){_0x452cx28[_0x4e9a[95]][_0x4e9a[94]][_0x4e9a[93]]({tags:{$like:_0x4e9a[92]+ _0x452cx12[_0x4e9a[21]][_0x4e9a[88]][_0x452cx29]+ _0x4e9a[92]}})}}else {_0x452cx28[_0x4e9a[95]][_0x4e9a[94]][_0x4e9a[93]]({tags:{$like:_0x4e9a[92]+ _0x452cx12[_0x4e9a[21]][_0x4e9a[88]]+ _0x4e9a[92]}})};delete _0x452cx12[_0x4e9a[21]][_0x4e9a[88]]};_[_0x4e9a[36]](_0x452cx28[_0x4e9a[95]],_0x452cx12[_0x4e9a[21]])};switch(_0x452cx12[_0x4e9a[48]][_0x4e9a[105]]){case _0x4e9a[98]:_0x452cx28[_0x4e9a[96]][_0x4e9a[93]]({model:User,attributes:[_0x4e9a[26]]});var _0x452cx2a;var _0x452cx2b;var _0x452cx2c;return User[_0x4e9a[28]](_0x452cx12[_0x4e9a[48]][_0x4e9a[26]])[_0x4e9a[20]](function(_0x452cx2f){if(_0x452cx2f){return _0x452cx2f[_0x4e9a[104]]()}else {return []}})[_0x4e9a[20]](function(_0x452cx2e){_0x452cx2b= _[_0x4e9a[100]](_0x452cx2e,_0x4e9a[26]);return OpenchannelAccount[_0x4e9a[28]](_0x452cx12[_0x4e9a[27]][_0x4e9a[26]])})[_0x4e9a[20]](function(_0x452cx13){return _0x452cx13[_0x4e9a[37]]({where:{$or:[{app:_0x4e9a[101]},{app:_0x4e9a[98]}]}})})[_0x4e9a[20]](function(_0x452cx23){_0x452cx2a= _[_0x4e9a[100]](_[_0x4e9a[99]](_0x452cx23,{"\x61\x70\x70":_0x4e9a[98]}),_0x4e9a[47]);_0x452cx2c= _[_0x4e9a[100]](_[_0x4e9a[99]](_0x452cx23,{"\x61\x70\x70":_0x4e9a[101]}),_0x4e9a[102]);if(_[_0x4e9a[103]](_0x452cx2b,_0x452cx2c)[_0x4e9a[30]]|| _[_0x4e9a[103]](_0x452cx2a,[_0x452cx12[_0x4e9a[48]][_0x4e9a[26]]])[_0x4e9a[30]]){return OpenchannelRoom[_0x4e9a[66]](_0x452cx28)[_0x4e9a[20]](function(_0x452cx2d){return _0x452cx10[_0x4e9a[17]](200)[_0x4e9a[16]](_0x452cx2d)})[_0x4e9a[19]](function(_0x452cx11){console[_0x4e9a[97]](_0x452cx11);return handleError(_0x452cx10,_0x452cx11)})}else {return _0x452cx10[_0x4e9a[17]](200)[_0x4e9a[16]]([])}})[_0x4e9a[19]](function(_0x452cx11){console[_0x4e9a[97]](_0x452cx11)});default:return OpenchannelRoom[_0x4e9a[66]](_0x452cx28)[_0x4e9a[20]](function(_0x452cx2d){return _0x452cx10[_0x4e9a[17]](200)[_0x4e9a[16]](_0x452cx2d)})[_0x4e9a[19]](function(_0x452cx11){return handleError(_0x452cx10,_0x452cx11)})}};exports[_0x4e9a[106]]= function(_0x452cx12,_0x452cx10,_0x452cx15){return OpenchannelApplication[_0x4e9a[108]](_0x4e9a[74],{where:{OpenchannelAccountId:_0x452cx12[_0x4e9a[27]][_0x4e9a[26]]}})[_0x4e9a[20]](function(_0x452cx31){_0x452cx12[_0x4e9a[43]][_0x4e9a[74]]= _0x452cx31?++_0x452cx31:1;_0x452cx12[_0x4e9a[43]][_0x4e9a[45]]= _0x452cx12[_0x4e9a[27]][_0x4e9a[26]];return OpenchannelApplication[_0x4e9a[40]](_0x452cx12[_0x4e9a[43]])})[_0x4e9a[20]](function(_0x452cx30){return _0x452cx10[_0x4e9a[17]](201)[_0x4e9a[16]](_0x452cx30)})[_0x4e9a[19]](function(_0x452cx11){console[_0x4e9a[50]](_0x4e9a[107],_0x452cx11);return handleError(_0x452cx10,_0x452cx11)})}
\ No newline at end of file
diff --git a/server/api/openchannel_account/openchannel_account.events.js b/server/api/openchannel_account/openchannel_account.events.js
index cc2ccdb..c1982b7 100644
--- a/server/api/openchannel_account/openchannel_account.events.js
+++ b/server/api/openchannel_account/openchannel_account.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const OpenchannelAccount = require('../../models').OpenchannelAccount;
-
-var OpenchannelAccountEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-OpenchannelAccountEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  OpenchannelAccount.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    OpenchannelAccountEvents.emit(event + ':' + doc._id, doc);
-    OpenchannelAccountEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = OpenchannelAccountEvents;
+var _0x4b4d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x4b4d[0];const EventEmitter=require(_0x4b4d[1]);const OpenchannelAccount=require(_0x4b4d[3])[_0x4b4d[2]];var OpenchannelAccountEvents= new EventEmitter();OpenchannelAccountEvents[_0x4b4d[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x4b4d[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x4b4d[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x4b4d[6]};for(var e in events){var event=events[e];OpenchannelAccount[_0x4b4d[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x42ddx8,_0x42ddx9,_0x42ddxa){OpenchannelAccountEvents[_0x4b4d[10]](event+ _0x4b4d[8]+ _0x42ddx8[_0x4b4d[9]],_0x42ddx8);OpenchannelAccountEvents[_0x4b4d[10]](event,_0x42ddx8);_0x42ddxa(null)}}module[_0x4b4d[11]]= OpenchannelAccountEvents
\ No newline at end of file
diff --git a/server/api/openchannel_account/openchannel_account.socket.js b/server/api/openchannel_account/openchannel_account.socket.js
index 15f955e..2c2a43c 100644
--- a/server/api/openchannel_account/openchannel_account.socket.js
+++ b/server/api/openchannel_account/openchannel_account.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const OpenchannelAccountEvents = require('./openchannel_account.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('openchannel_account:' + event, socket);
-
-    OpenchannelAccountEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    OpenchannelAccountEvents.removeListener(event, listener);
-  };
-}
+var _0xe95d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xe95d[0];const OpenchannelAccountEvents=require(_0xe95d[1]);var events=[_0xe95d[2],_0xe95d[3]];exports[_0xe95d[4]]= function(_0x43c9x3){for(var _0x43c9x4=0,_0x43c9x5=events[_0xe95d[5]];_0x43c9x4< _0x43c9x5;_0x43c9x4++){var _0x43c9x6=events[_0x43c9x4];var _0x43c9x7=createListener(_0xe95d[6]+ _0x43c9x6,_0x43c9x3);OpenchannelAccountEvents[_0xe95d[7]](_0x43c9x6,_0x43c9x7);_0x43c9x3[_0xe95d[7]](_0xe95d[8],removeListener(_0x43c9x6,_0x43c9x7))}};function createListener(_0x43c9x6,_0x43c9x3){return function(_0x43c9x9){_0x43c9x3[_0xe95d[9]](_0x43c9x6,_0x43c9x9)}}function removeListener(_0x43c9x6,_0x43c9x7){return function(){OpenchannelAccountEvents[_0xe95d[10]](_0x43c9x6,_0x43c9x7)}}
\ No newline at end of file
diff --git a/server/api/openchannel_application/index.js b/server/api/openchannel_application/index.js
index de6d7b3..8ee1262 100644
--- a/server/api/openchannel_application/index.js
+++ b/server/api/openchannel_application/index.js
@@ -1,15 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./openchannel_application.controller');
-var license = require('../../config/license/license.service');
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.index);
-router.get('/:id', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.update);
-router.delete('/:id', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0x9f65=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9f65[0];var express=require(_0x9f65[1]);var auth=require(_0x9f65[2]);var controller=require(_0x9f65[3]);var license=require(_0x9f65[4]);var router=express.Router();router[_0x9f65[11]](_0x9f65[5],auth[_0x9f65[6]](),license[_0x9f65[7]](),auth[_0x9f65[9]]([20],[_0x9f65[8]]),controller[_0x9f65[10]]);router[_0x9f65[11]](_0x9f65[12],auth[_0x9f65[6]](),license[_0x9f65[7]](),auth[_0x9f65[9]]([20],[_0x9f65[8]]),controller[_0x9f65[13]]);router[_0x9f65[15]](_0x9f65[5],auth[_0x9f65[6]](),license[_0x9f65[7]](),auth[_0x9f65[9]]([20],[_0x9f65[8]]),controller[_0x9f65[14]]);router[_0x9f65[17]](_0x9f65[12],auth[_0x9f65[6]](),license[_0x9f65[7]](),auth[_0x9f65[9]]([20],[_0x9f65[8]]),controller[_0x9f65[16]]);router[_0x9f65[19]](_0x9f65[12],auth[_0x9f65[6]](),license[_0x9f65[7]](),auth[_0x9f65[9]]([20],[_0x9f65[8]]),controller[_0x9f65[18]]);module[_0x9f65[20]]= router
\ No newline at end of file
diff --git a/server/api/openchannel_application/openchannel_application.controller.js b/server/api/openchannel_application/openchannel_application.controller.js
index c47b66b..0ddb117 100644
--- a/server/api/openchannel_application/openchannel_application.controller.js
+++ b/server/api/openchannel_application/openchannel_application.controller.js
@@ -1,129 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/openchannel/applications              ->  index
- * POST    /api/openchannel/applications              ->  create
- * GET     /api/openchannel/applications/:id          ->  show
- * PUT     /api/openchannel/applications/:id          ->  update
- * DELETE  /api/openchannel/applications/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var OpenchannelApplication = require('../../models').OpenchannelApplication;
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-// Gets a list of OpenchannelApplication
-exports.index = function(req, res) {
-  return OpenchannelApplication
-    .findAll({
-      where: req.query,
-      order: 'priority',
-      include: [{
-        all: true
-      }]
-    })
-    .then(function(Applications) {
-      return res.status(200).send(Applications);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-// Gets a single OpenchannelApplication from the DB
-exports.show = function(req, res) {
-  return OpenchannelApplication
-    .findById(req.params.id, {
-      include: [{
-        all: true
-      }]
-    })
-    .then(function(Application) {
-      if (!Application) {
-        return res.sendStatus(404);
-      }
-      return res.send(Application);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-}
-
-// Creates a new OpenchannelApplication in the DB
-exports.create = function(req, res) {
-
-  return OpenchannelApplication
-    .max('priority', {
-      where: {
-        OpenchannelAccountId: req.body.OpenchannelAccountId
-      }
-    })
-    .then(function(max) {
-      // SET PRIORITY
-      req.body.priority = max ? ++max : 1;
-      return OpenchannelApplication
-        .create(req.body)
-    })
-    .then(function(Application) {
-      return res.status(201).send(Application);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-
-}
-
-// Updates an existing OpenchannelApplication in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return OpenchannelApplication
-    .findById(req.params.id)
-    .then(function(Application) {
-      if (!Application) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(Application, req.body);
-      return updated
-        .save()
-
-    })
-    .then(function(Application) {
-      return res.status(200).send(Application);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-}
-
-
-// Deletes a OpenchannelApplication from the DB
-exports.destroy = function(req, res) {
-  return OpenchannelApplication
-    .findById(req.params.id)
-    .then(function(Application) {
-      if (!Application) {
-        return res.sendStatus(404);
-      }
-      return Application
-        .destroy()
-
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
+var _0x2333=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x78","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x2333[0];var _=require(_0x2333[1]);var Util=require(_0x2333[2]);var OpenchannelApplication=require(_0x2333[4])[_0x2333[3]];function handleError(_0x725ax5,_0x725ax6){return _0x725ax5[_0x2333[6]](500)[_0x2333[5]](_0x725ax6)}exports[_0x2333[7]]= function(_0x725ax7,_0x725ax5){return OpenchannelApplication[_0x2333[12]]({where:_0x725ax7[_0x2333[10]],order:_0x2333[11],include:[{all:true}]})[_0x2333[9]](function(_0x725ax8){return _0x725ax5[_0x2333[6]](200)[_0x2333[5]](_0x725ax8)})[_0x2333[8]](function(_0x725ax6){return handleError(_0x725ax5,_0x725ax6)})};exports[_0x2333[13]]= function(_0x725ax7,_0x725ax5){return OpenchannelApplication[_0x2333[17]](_0x725ax7[_0x2333[16]][_0x2333[15]],{include:[{all:true}]})[_0x2333[9]](function(_0x725ax9){if(!_0x725ax9){return _0x725ax5[_0x2333[14]](404)};return _0x725ax5[_0x2333[5]](_0x725ax9)})[_0x2333[8]](function(_0x725ax6){return handleError(_0x725ax5,_0x725ax6)})};exports[_0x2333[18]]= function(_0x725ax7,_0x725ax5){return OpenchannelApplication[_0x2333[21]](_0x2333[11],{where:{OpenchannelAccountId:_0x725ax7[_0x2333[19]][_0x2333[20]]}})[_0x2333[9]](function(_0x725axa){_0x725ax7[_0x2333[19]][_0x2333[11]]= _0x725axa?++_0x725axa:1;return OpenchannelApplication[_0x2333[18]](_0x725ax7[_0x2333[19]])})[_0x2333[9]](function(_0x725ax9){return _0x725ax5[_0x2333[6]](201)[_0x2333[5]](_0x725ax9)})[_0x2333[8]](function(_0x725ax6){return handleError(_0x725ax5,_0x725ax6)})};exports[_0x2333[22]]= function(_0x725ax7,_0x725ax5){if(_0x725ax7[_0x2333[19]][_0x2333[15]]){delete _0x725ax7[_0x2333[19]][_0x2333[15]]};return OpenchannelApplication[_0x2333[17]](_0x725ax7[_0x2333[16]][_0x2333[15]])[_0x2333[9]](function(_0x725ax9){if(!_0x725ax9){return _0x725ax5[_0x2333[14]](404)};var _0x725axb=_[_0x2333[23]](_0x725ax9,_0x725ax7[_0x2333[19]]);return _0x725axb[_0x2333[24]]()})[_0x2333[9]](function(_0x725ax9){return _0x725ax5[_0x2333[6]](200)[_0x2333[5]](_0x725ax9)})[_0x2333[8]](function(_0x725ax6){return handleError(_0x725ax5,_0x725ax6)})};exports[_0x2333[25]]= function(_0x725ax7,_0x725ax5){return OpenchannelApplication[_0x2333[17]](_0x725ax7[_0x2333[16]][_0x2333[15]])[_0x2333[9]](function(_0x725ax9){if(!_0x725ax9){return _0x725ax5[_0x2333[14]](404)};return _0x725ax9[_0x2333[25]]()})[_0x2333[9]](function(){return _0x725ax5[_0x2333[14]](204)})[_0x2333[8]](function(_0x725ax6){return handleError(_0x725ax5,_0x725ax6)})}
\ No newline at end of file
diff --git a/server/api/openchannel_application/openchannel_application.events.js b/server/api/openchannel_application/openchannel_application.events.js
index 13b8c25..ef39676 100644
--- a/server/api/openchannel_application/openchannel_application.events.js
+++ b/server/api/openchannel_application/openchannel_application.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const OpenchannelApplication = require('../../models').OpenchannelApplication;
-
-var OpenchannelApplicationEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-OpenchannelApplicationEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  OpenchannelApplication.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    OpenchannelApplicationEvents.emit(event + ':' + doc._id, doc);
-    OpenchannelApplicationEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = OpenchannelApplicationEvents;
+var _0x892a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x892a[0];const EventEmitter=require(_0x892a[1]);const OpenchannelApplication=require(_0x892a[3])[_0x892a[2]];var OpenchannelApplicationEvents= new EventEmitter();OpenchannelApplicationEvents[_0x892a[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x892a[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x892a[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x892a[6]};for(var e in events){var event=events[e];OpenchannelApplication[_0x892a[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7d8fx8,_0x7d8fx9,_0x7d8fxa){OpenchannelApplicationEvents[_0x892a[10]](event+ _0x892a[8]+ _0x7d8fx8[_0x892a[9]],_0x7d8fx8);OpenchannelApplicationEvents[_0x892a[10]](event,_0x7d8fx8);_0x7d8fxa(null)}}module[_0x892a[11]]= OpenchannelApplicationEvents
\ No newline at end of file
diff --git a/server/api/openchannel_application/openchannel_application.socket.js b/server/api/openchannel_application/openchannel_application.socket.js
index d8ab577..44323f2 100644
--- a/server/api/openchannel_application/openchannel_application.socket.js
+++ b/server/api/openchannel_application/openchannel_application.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const OpenchannelApplicationEvents = require('./openchannel_application.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('openchannel_application:' + event, socket);
-
-    OpenchannelApplicationEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    OpenchannelApplicationEvents.removeListener(event, listener);
-  };
-}
+var _0x7e5b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x7e5b[0];const OpenchannelApplicationEvents=require(_0x7e5b[1]);var events=[_0x7e5b[2],_0x7e5b[3]];exports[_0x7e5b[4]]= function(_0x33e0x3){for(var _0x33e0x4=0,_0x33e0x5=events[_0x7e5b[5]];_0x33e0x4< _0x33e0x5;_0x33e0x4++){var _0x33e0x6=events[_0x33e0x4];var _0x33e0x7=createListener(_0x7e5b[6]+ _0x33e0x6,_0x33e0x3);OpenchannelApplicationEvents[_0x7e5b[7]](_0x33e0x6,_0x33e0x7);_0x33e0x3[_0x7e5b[7]](_0x7e5b[8],removeListener(_0x33e0x6,_0x33e0x7))}};function createListener(_0x33e0x6,_0x33e0x3){return function(_0x33e0x9){_0x33e0x3[_0x7e5b[9]](_0x33e0x6,_0x33e0x9)}}function removeListener(_0x33e0x6,_0x33e0x7){return function(){OpenchannelApplicationEvents[_0x7e5b[10]](_0x33e0x6,_0x33e0x7)}}
\ No newline at end of file
diff --git a/server/api/openchannel_disposition/index.js b/server/api/openchannel_disposition/index.js
index b10f1c8..4eab239 100644
--- a/server/api/openchannel_disposition/index.js
+++ b/server/api/openchannel_disposition/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./openchannel_disposition.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), controller.index);
-router.get('/:id', auth.isAuthenticated(), controller.show);
-router.post('/', auth.isAuthenticated(), controller.create);
-router.put('/:id', auth.isAuthenticated(), controller.update);
-router.patch('/:id', auth.isAuthenticated(), controller.update);
-router.delete('/:id', auth.isAuthenticated(), controller.destroy);
-
-module.exports = router;
+var _0x815f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x815f[0];var express=require(_0x815f[1]);var controller=require(_0x815f[2]);var auth=require(_0x815f[3]);var router=express.Router();router[_0x815f[7]](_0x815f[4],auth[_0x815f[5]](),controller[_0x815f[6]]);router[_0x815f[7]](_0x815f[8],auth[_0x815f[5]](),controller[_0x815f[9]]);router[_0x815f[11]](_0x815f[4],auth[_0x815f[5]](),controller[_0x815f[10]]);router[_0x815f[13]](_0x815f[8],auth[_0x815f[5]](),controller[_0x815f[12]]);router[_0x815f[14]](_0x815f[8],auth[_0x815f[5]](),controller[_0x815f[12]]);router[_0x815f[16]](_0x815f[8],auth[_0x815f[5]](),controller[_0x815f[15]]);module[_0x815f[17]]= router
\ No newline at end of file
diff --git a/server/api/openchannel_disposition/openchannel_disposition.controller.js b/server/api/openchannel_disposition/openchannel_disposition.controller.js
index fb1250f..6c91941 100644
--- a/server/api/openchannel_disposition/openchannel_disposition.controller.js
+++ b/server/api/openchannel_disposition/openchannel_disposition.controller.js
@@ -1,110 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/openchannel/disposition              ->  index
- * POST    /api/openchannel/disposition              ->  create
- * GET     /api/openchannel/disposition/:id          ->  show
- * PUT     /api/openchannel/disposition/:id          ->  update
- * DELETE  /api/openchannel/disposition/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var OpenchannelDisposition = require('../../models').OpenchannelDisposition;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      })
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        })
-    }
-  };
-}
-
-// Gets a list of OpenchannelDisposition
-exports.index = function(req, res) {
-  OpenchannelDisposition
-    .findAndCountAll()
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single OpenchannelDisposition from the DB
-exports.show = function(req, res) {
-  OpenchannelDisposition
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new OpenchannelDisposition in the DB
-exports.create = function(req, res) {
-  OpenchannelDisposition
-    .create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing OpenchannelDisposition in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  OpenchannelDisposition
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a OpenchannelDisposition from the DB
-exports.destroy = function(req, res) {
-  OpenchannelDisposition
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
+var _0x1066=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0x1066[0];var _=require(_0x1066[1]);var Util=require(_0x1066[2]);var OpenchannelDisposition=require(_0x1066[4])[_0x1066[3]];function handleError(_0xbf13x5,_0xbf13x6){_0xbf13x6= _0xbf13x6|| 500;return function(_0xbf13x7){_0xbf13x5[_0x1066[6]](_0xbf13x6)[_0x1066[5]](_0xbf13x7)}}function responseWithResult(_0xbf13x5,_0xbf13x6){_0xbf13x6= _0xbf13x6|| 200;return function(_0xbf13x9){if(_0xbf13x9){_0xbf13x5[_0x1066[6]](_0xbf13x6)[_0x1066[7]](_0xbf13x9)}}}function handleEntityNotFound(_0xbf13x5){return function(_0xbf13x9){if(!_0xbf13x9){_0xbf13x5[_0x1066[6]](404)[_0x1066[8]]();return null};return _0xbf13x9}}function saveUpdates(_0xbf13xc){return function(_0xbf13x9){return _0xbf13x9[_0x1066[10]](_0xbf13xc)[_0x1066[9]](function(_0xbf13xd){return _0xbf13xd})}}function removeEntity(_0xbf13x5){return function(_0xbf13x9){if(_0xbf13x9){return _0xbf13x9[_0x1066[11]]()[_0x1066[9]](function(){_0xbf13x5[_0x1066[6]](204)[_0x1066[8]]()})}}}exports[_0x1066[12]]= function(_0xbf13xf,_0xbf13x5){OpenchannelDisposition[_0x1066[14]]()[_0x1066[9]](responseWithResult(_0xbf13x5))[_0x1066[13]](handleError(_0xbf13x5))};exports[_0x1066[15]]= function(_0xbf13xf,_0xbf13x5){OpenchannelDisposition[_0x1066[18]](_0xbf13xf[_0x1066[17]][_0x1066[16]])[_0x1066[9]](handleEntityNotFound(_0xbf13x5))[_0x1066[9]](responseWithResult(_0xbf13x5))[_0x1066[13]](handleError(_0xbf13x5))};exports[_0x1066[19]]= function(_0xbf13xf,_0xbf13x5){OpenchannelDisposition[_0x1066[19]](_0xbf13xf[_0x1066[20]])[_0x1066[9]](responseWithResult(_0xbf13x5,201))[_0x1066[13]](handleError(_0xbf13x5))};exports[_0x1066[21]]= function(_0xbf13xf,_0xbf13x5){if(_0xbf13xf[_0x1066[20]][_0x1066[16]]){delete _0xbf13xf[_0x1066[20]][_0x1066[16]]};OpenchannelDisposition[_0x1066[18]](_0xbf13xf[_0x1066[17]][_0x1066[16]])[_0x1066[9]](handleEntityNotFound(_0xbf13x5))[_0x1066[9]](saveUpdates(_0xbf13xf[_0x1066[20]]))[_0x1066[9]](responseWithResult(_0xbf13x5))[_0x1066[13]](handleError(_0xbf13x5))};exports[_0x1066[11]]= function(_0xbf13xf,_0xbf13x5){OpenchannelDisposition[_0x1066[18]](_0xbf13xf[_0x1066[17]][_0x1066[16]])[_0x1066[9]](handleEntityNotFound(_0xbf13x5))[_0x1066[9]](removeEntity(_0xbf13x5))[_0x1066[13]](handleError(_0xbf13x5))}
\ No newline at end of file
diff --git a/server/api/openchannel_disposition/openchannel_disposition.events.js b/server/api/openchannel_disposition/openchannel_disposition.events.js
index 178c511..cbba39e 100644
--- a/server/api/openchannel_disposition/openchannel_disposition.events.js
+++ b/server/api/openchannel_disposition/openchannel_disposition.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const OpenchannelDisposition = require('../../models').OpenchannelDisposition;
-
-var OpenchannelDispositionEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-OpenchannelDispositionEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  OpenchannelDisposition.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    OpenchannelDispositionEvents.emit(event + ':' + doc._id, doc);
-    OpenchannelDispositionEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = OpenchannelDispositionEvents;
+var _0x6ad0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6ad0[0];const EventEmitter=require(_0x6ad0[1]);const OpenchannelDisposition=require(_0x6ad0[3])[_0x6ad0[2]];var OpenchannelDispositionEvents= new EventEmitter();OpenchannelDispositionEvents[_0x6ad0[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6ad0[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x6ad0[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6ad0[6]};for(var e in events){var event=events[e];OpenchannelDisposition[_0x6ad0[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x32d7x8,_0x32d7x9,_0x32d7xa){OpenchannelDispositionEvents[_0x6ad0[10]](event+ _0x6ad0[8]+ _0x32d7x8[_0x6ad0[9]],_0x32d7x8);OpenchannelDispositionEvents[_0x6ad0[10]](event,_0x32d7x8);_0x32d7xa(null)}}module[_0x6ad0[11]]= OpenchannelDispositionEvents
\ No newline at end of file
diff --git a/server/api/openchannel_disposition/openchannel_disposition.socket.js b/server/api/openchannel_disposition/openchannel_disposition.socket.js
index 960c110..089c975 100644
--- a/server/api/openchannel_disposition/openchannel_disposition.socket.js
+++ b/server/api/openchannel_disposition/openchannel_disposition.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const OpenchannelDispositionEvents = require('./openchannel_disposition.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('openchannel_disposition:' + event, socket);
-
-    OpenchannelDispositionEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    OpenchannelDispositionEvents.removeListener(event, listener);
-  };
-}
+var _0x20d0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x20d0[0];const OpenchannelDispositionEvents=require(_0x20d0[1]);var events=[_0x20d0[2],_0x20d0[3]];exports[_0x20d0[4]]= function(_0x4b9dx3){for(var _0x4b9dx4=0,_0x4b9dx5=events[_0x20d0[5]];_0x4b9dx4< _0x4b9dx5;_0x4b9dx4++){var _0x4b9dx6=events[_0x4b9dx4];var _0x4b9dx7=createListener(_0x20d0[6]+ _0x4b9dx6,_0x4b9dx3);OpenchannelDispositionEvents[_0x20d0[7]](_0x4b9dx6,_0x4b9dx7);_0x4b9dx3[_0x20d0[7]](_0x20d0[8],removeListener(_0x4b9dx6,_0x4b9dx7))}};function createListener(_0x4b9dx6,_0x4b9dx3){return function(_0x4b9dx9){_0x4b9dx3[_0x20d0[9]](_0x4b9dx6,_0x4b9dx9)}}function removeListener(_0x4b9dx6,_0x4b9dx7){return function(){OpenchannelDispositionEvents[_0x20d0[10]](_0x4b9dx6,_0x4b9dx7)}}
\ No newline at end of file
diff --git a/server/api/openchannel_message/index.js b/server/api/openchannel_message/index.js
index fb26cb8..d147210 100644
--- a/server/api/openchannel_message/index.js
+++ b/server/api/openchannel_message/index.js
@@ -1,18 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./openchannel_message.controller');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.index);
-router.get('/describe', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.describe);
-router.get('/:id', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin', 'agent']), controller.show);
-router.post('/', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.update);
-router.delete('/:id', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.destroy);
-router.delete('/', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.bulkDelete);
-
-module.exports = router;
+var _0x6bc1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x61\x67\x65\x6E\x74","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6bc1[0];var express=require(_0x6bc1[1]);var auth=require(_0x6bc1[2]);var controller=require(_0x6bc1[3]);var license=require(_0x6bc1[4]);var router=express.Router();router[_0x6bc1[11]](_0x6bc1[5],auth[_0x6bc1[6]](),license[_0x6bc1[7]](),auth[_0x6bc1[9]]([20],[_0x6bc1[8]]),controller[_0x6bc1[10]]);router[_0x6bc1[11]](_0x6bc1[12],auth[_0x6bc1[6]](),license[_0x6bc1[7]](),auth[_0x6bc1[9]]([20],[_0x6bc1[8]]),controller[_0x6bc1[13]]);router[_0x6bc1[11]](_0x6bc1[14],auth[_0x6bc1[6]](),license[_0x6bc1[7]](),auth[_0x6bc1[9]]([20],[_0x6bc1[8],_0x6bc1[15]]),controller[_0x6bc1[16]]);router[_0x6bc1[18]](_0x6bc1[5],auth[_0x6bc1[6]](),license[_0x6bc1[7]](),auth[_0x6bc1[9]]([20],[_0x6bc1[8]]),controller[_0x6bc1[17]]);router[_0x6bc1[20]](_0x6bc1[14],auth[_0x6bc1[6]](),license[_0x6bc1[7]](),auth[_0x6bc1[9]]([20],[_0x6bc1[8]]),controller[_0x6bc1[19]]);router[_0x6bc1[22]](_0x6bc1[14],auth[_0x6bc1[6]](),license[_0x6bc1[7]](),auth[_0x6bc1[9]]([20],[_0x6bc1[8]]),controller[_0x6bc1[21]]);router[_0x6bc1[22]](_0x6bc1[5],auth[_0x6bc1[6]](),license[_0x6bc1[7]](),auth[_0x6bc1[9]]([20],[_0x6bc1[8]]),controller[_0x6bc1[23]]);module[_0x6bc1[24]]= router
\ No newline at end of file
diff --git a/server/api/openchannel_message/openchannel_message.controller.js b/server/api/openchannel_message/openchannel_message.controller.js
index 17f68b9..2e8e566 100644
--- a/server/api/openchannel_message/openchannel_message.controller.js
+++ b/server/api/openchannel_message/openchannel_message.controller.js
@@ -1,170 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/openchannel/messages              ->  index
- * POST    /api/openchannel/messages              ->  create
- * GET     /api/openchannel/messages/:id          ->  show
- * PUT     /api/openchannel/messages/:id          ->  update
- * DELETE  /api/openchannel/messages/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var OpenchannelMessage = require('../../models').OpenchannelMessage;
-var OpenchannelRoom = require('../../models').OpenchannelRoom;
-var User = require('../../models').User;
-
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-// Gets a list of OpenchannelMessage
-exports.index = function(req, res) {
-  var params = {
-    order: 'createdAt DESC',
-    include: [{
-      all: true,
-      include: [{
-        all: true
-      }]
-    }]
-  };
-
-  switch (req.user.role) {
-    case 'admin':
-      params.where = req.query;
-      break;
-    case 'agent':
-      break;
-    default:
-  }
-
-  return OpenchannelMessage
-    .findAll(params)
-    .then(function(messages) {
-      return res.status(200).send(messages);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-exports.describe = function(req, res) {
-  return OpenchannelMessage
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Gets a single OpenchannelMessage from the DB
-exports.show = function(req, res) {
-  return OpenchannelMessage
-    .findById(req.params.id, {
-      include: [{
-        model: User,
-        attributes: ['id', 'name', 'fullname', 'email']
-      }]
-    })
-    .then(function(Message) {
-      if (!Message) {
-        return res.sendStatus(404);
-      }
-      return res.send(Message);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-// Creates a new OpenchannelMessage in the DB
-exports.create = function(req, res) {
-  req.body.UserId = req.user.id;
-  return OpenchannelMessage
-    .create(req.body)
-    .then(function(Message) {
-      return res.status(201).send(Message);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-// Updates an existing OpenchannelMessage in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return OpenchannelMessage
-    .findById(req.params.id, {
-      include: [{
-        all: true
-      }]
-    })
-    .then(function(Message) {
-      if (!Message) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(Message, req.body);
-      return updated
-        .save();
-    })
-    .then(function(updated) {
-      return res.status(200).send(updated);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-// Deletes a OpenchannelMessage from the DB
-exports.destroy = function(req, res) {
-  return OpenchannelMessage
-    .findById(req.params.id)
-    .then(function(Message) {
-      if (!Message) {
-        return res.sendStatus(404);
-      }
-      return Message
-        .destroy();
-    }).then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-exports.bulkDelete = function(req, res) {
-  return OpenchannelMessage
-    .bulkUpdate({
-      where: {
-        id: {
-          $in: req.body.id
-        }
-      },
-      attributes: {
-        directory: 'TRASH'
-      }
-    })
-    .then(function(Message) {
-      if (!Message) {
-        return res.sendStatus(404);
-      }
-      return Message
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
+var _0xb818=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x55\x73\x65\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x44\x45\x53\x43","\x77\x68\x65\x72\x65","\x71\x75\x65\x72\x79","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x54\x52\x41\x53\x48","\x62\x75\x6C\x6B\x55\x70\x64\x61\x74\x65"];_0xb818[0];var _=require(_0xb818[1]);var Util=require(_0xb818[2]);var OpenchannelMessage=require(_0xb818[4])[_0xb818[3]];var OpenchannelRoom=require(_0xb818[4])[_0xb818[5]];var User=require(_0xb818[4])[_0xb818[6]];function handleError(_0x3af0x7,_0x3af0x8){return _0x3af0x7[_0xb818[8]](500)[_0xb818[7]](_0x3af0x8)}exports[_0xb818[9]]= function(_0x3af0x9,_0x3af0x7){var _0x3af0xa={order:_0xb818[10],include:[{all:true,include:[{all:true}]}]};switch(_0x3af0x9[_0xb818[16]][_0xb818[15]]){case _0xb818[13]:_0x3af0xa[_0xb818[11]]= _0x3af0x9[_0xb818[12]];break;case _0xb818[14]:break;default:};return OpenchannelMessage[_0xb818[19]](_0x3af0xa)[_0xb818[18]](function(_0x3af0xb){return _0x3af0x7[_0xb818[8]](200)[_0xb818[7]](_0x3af0xb)})[_0xb818[17]](function(_0x3af0x8){return handleError(_0x3af0x7,_0x3af0x8)})};exports[_0xb818[20]]= function(_0x3af0x9,_0x3af0x7){return OpenchannelMessage[_0xb818[20]]()[_0xb818[18]](function(_0x3af0xc){return _0x3af0x7[_0xb818[8]](200)[_0xb818[7]](_0x3af0xc)})[_0xb818[17]](function(_0x3af0x8){return handleError(_0x3af0x7,_0x3af0x8)})};exports[_0xb818[21]]= function(_0x3af0x9,_0x3af0x7){return OpenchannelMessage[_0xb818[28]](_0x3af0x9[_0xb818[24]][_0xb818[23]],{include:[{model:User,attributes:[_0xb818[23],_0xb818[25],_0xb818[26],_0xb818[27]]}]})[_0xb818[18]](function(_0x3af0xd){if(!_0x3af0xd){return _0x3af0x7[_0xb818[22]](404)};return _0x3af0x7[_0xb818[7]](_0x3af0xd)})[_0xb818[17]](function(_0x3af0x8){return handleError(_0x3af0x7,_0x3af0x8)})};exports[_0xb818[29]]= function(_0x3af0x9,_0x3af0x7){_0x3af0x9[_0xb818[31]][_0xb818[30]]= _0x3af0x9[_0xb818[16]][_0xb818[23]];return OpenchannelMessage[_0xb818[29]](_0x3af0x9[_0xb818[31]])[_0xb818[18]](function(_0x3af0xd){return _0x3af0x7[_0xb818[8]](201)[_0xb818[7]](_0x3af0xd)})[_0xb818[17]](function(_0x3af0x8){return handleError(_0x3af0x7,_0x3af0x8)})};exports[_0xb818[32]]= function(_0x3af0x9,_0x3af0x7){if(_0x3af0x9[_0xb818[31]][_0xb818[23]]){delete _0x3af0x9[_0xb818[31]][_0xb818[23]]};return OpenchannelMessage[_0xb818[28]](_0x3af0x9[_0xb818[24]][_0xb818[23]],{include:[{all:true}]})[_0xb818[18]](function(_0x3af0xd){if(!_0x3af0xd){return _0x3af0x7[_0xb818[22]](404)};var _0x3af0xe=_[_0xb818[33]](_0x3af0xd,_0x3af0x9[_0xb818[31]]);return _0x3af0xe[_0xb818[34]]()})[_0xb818[18]](function(_0x3af0xe){return _0x3af0x7[_0xb818[8]](200)[_0xb818[7]](_0x3af0xe)})[_0xb818[17]](function(_0x3af0x8){return handleError(_0x3af0x7,_0x3af0x8)})};exports[_0xb818[35]]= function(_0x3af0x9,_0x3af0x7){return OpenchannelMessage[_0xb818[28]](_0x3af0x9[_0xb818[24]][_0xb818[23]])[_0xb818[18]](function(_0x3af0xd){if(!_0x3af0xd){return _0x3af0x7[_0xb818[22]](404)};return _0x3af0xd[_0xb818[35]]()})[_0xb818[18]](function(){return _0x3af0x7[_0xb818[22]](204)})[_0xb818[17]](function(_0x3af0x8){return handleError(_0x3af0x7,_0x3af0x8)})};exports[_0xb818[36]]= function(_0x3af0x9,_0x3af0x7){return OpenchannelMessage[_0xb818[38]]({where:{id:{$in:_0x3af0x9[_0xb818[31]][_0xb818[23]]}},attributes:{directory:_0xb818[37]}})[_0xb818[18]](function(_0x3af0xd){if(!_0x3af0xd){return _0x3af0x7[_0xb818[22]](404)};return _0x3af0xd[_0xb818[35]]()})[_0xb818[18]](function(){return _0x3af0x7[_0xb818[22]](204)})[_0xb818[17]](function(_0x3af0x8){return handleError(_0x3af0x7,_0x3af0x8)})}
\ No newline at end of file
diff --git a/server/api/openchannel_message/openchannel_message.events.js b/server/api/openchannel_message/openchannel_message.events.js
index 5095912..7aaa951 100644
--- a/server/api/openchannel_message/openchannel_message.events.js
+++ b/server/api/openchannel_message/openchannel_message.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const OpenchannelMessage = require('../../models').OpenchannelMessage;
-
-var OpenchannelMessageEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-OpenchannelMessageEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'update',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  OpenchannelMessage.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    OpenchannelMessageEvents.emit(event + ':' + doc._id, doc);
-    OpenchannelMessageEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = OpenchannelMessageEvents;
+var _0xdf5a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xdf5a[0];const EventEmitter=require(_0xdf5a[1]);const OpenchannelMessage=require(_0xdf5a[3])[_0xdf5a[2]];var OpenchannelMessageEvents= new EventEmitter();OpenchannelMessageEvents[_0xdf5a[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xdf5a[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xdf5a[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xdf5a[7]};for(var e in events){var event=events[e];OpenchannelMessage[_0xdf5a[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x18cax8,_0x18cax9,_0x18caxa){OpenchannelMessageEvents[_0xdf5a[11]](event+ _0xdf5a[9]+ _0x18cax8[_0xdf5a[10]],_0x18cax8);OpenchannelMessageEvents[_0xdf5a[11]](event,_0x18cax8);_0x18caxa(null)}}module[_0xdf5a[12]]= OpenchannelMessageEvents
\ No newline at end of file
diff --git a/server/api/openchannel_message/openchannel_message.socket.js b/server/api/openchannel_message/openchannel_message.socket.js
index 0f942a5..745b28a 100644
--- a/server/api/openchannel_message/openchannel_message.socket.js
+++ b/server/api/openchannel_message/openchannel_message.socket.js
@@ -1,47 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const OpenchannelMessageEvents = require('./openchannel_message.events');
-
-// Model events to emit
-var events = ['save', 'update', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('openchannel_message:' + event, socket);
-
-    OpenchannelMessageEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'openchannel_message:save':
-        socket.emit(event, doc);
-        break;
-      case 'openchannel_message:update':
-        if (doc.changed('status')) {
-          socket.emit(event, doc);
-        }
-        break;
-      case 'openchannel_message:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    OpenchannelMessageEvents.removeListener(event, listener);
-  };
-}
+var _0xa742=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x73\x61\x76\x65","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x75\x70\x64\x61\x74\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xa742[0];const OpenchannelMessageEvents=require(_0xa742[1]);var events=[_0xa742[2],_0xa742[3],_0xa742[4]];exports[_0xa742[5]]= function(_0xed03x3){for(var _0xed03x4=0,_0xed03x5=events[_0xa742[6]];_0xed03x4< _0xed03x5;_0xed03x4++){var _0xed03x6=events[_0xed03x4];var _0xed03x7=createListener(_0xa742[7]+ _0xed03x6,_0xed03x3);OpenchannelMessageEvents[_0xa742[8]](_0xed03x6,_0xed03x7);_0xed03x3[_0xa742[8]](_0xa742[9],removeListener(_0xed03x6,_0xed03x7))}};function createListener(_0xed03x6,_0xed03x3){return function(_0xed03x9){switch(_0xed03x6){case _0xa742[11]:_0xed03x3[_0xa742[10]](_0xed03x6,_0xed03x9);break;case _0xa742[14]:if(_0xed03x9[_0xa742[13]](_0xa742[12])){_0xed03x3[_0xa742[10]](_0xed03x6,_0xed03x9)};break;case _0xa742[15]:_0xed03x3[_0xa742[10]](_0xed03x6,_0xed03x9);break;default:}}}function removeListener(_0xed03x6,_0xed03x7){return function(){OpenchannelMessageEvents[_0xa742[16]](_0xed03x6,_0xed03x7)}}
\ No newline at end of file
diff --git a/server/api/openchannel_queue/index.js b/server/api/openchannel_queue/index.js
index a85e598..21a1764 100644
--- a/server/api/openchannel_queue/index.js
+++ b/server/api/openchannel_queue/index.js
@@ -1,22 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./openchannel_queue.controller');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-// router.get('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.index);
-router.get('/', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.index);
-router.get('/:id', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.show);
-router.get('/:id/agents', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.showAgents);
-router.post('/', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasRole('admin'), controller.create);
-router.post('/:id/agents', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasRole('admin'), controller.addAgents);
-router.put('/:id', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasRole('admin'), controller.update);
-router.patch('/:id', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasRole('admin'), controller.update);
-router.delete('/:id', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasRole('admin'), controller.destroy);
-router.delete('/:id/agents', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasRole('admin'), controller.removeAgents);
-router.delete('/', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasRole('admin'), controller.bulkDestroy);
-
-module.exports = router;
+var _0x5144=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x68\x61\x73\x52\x6F\x6C\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x5144[0];var express=require(_0x5144[1]);var auth=require(_0x5144[2]);var controller=require(_0x5144[3]);var license=require(_0x5144[4]);var router=express.Router();router[_0x5144[12]](_0x5144[5],license[_0x5144[6]](),auth[_0x5144[7]](),license[_0x5144[8]](),auth[_0x5144[10]]([20],[_0x5144[9]]),controller[_0x5144[11]]);router[_0x5144[12]](_0x5144[13],license[_0x5144[6]](),auth[_0x5144[7]](),license[_0x5144[8]](),auth[_0x5144[10]]([20],[_0x5144[9]]),controller[_0x5144[14]]);router[_0x5144[12]](_0x5144[15],license[_0x5144[6]](),auth[_0x5144[7]](),license[_0x5144[8]](),auth[_0x5144[10]]([20],[_0x5144[9]]),controller[_0x5144[16]]);router[_0x5144[19]](_0x5144[5],license[_0x5144[6]](),auth[_0x5144[7]](),license[_0x5144[8]](),auth[_0x5144[17]](_0x5144[9]),controller[_0x5144[18]]);router[_0x5144[19]](_0x5144[15],license[_0x5144[6]](),auth[_0x5144[7]](),license[_0x5144[8]](),auth[_0x5144[17]](_0x5144[9]),controller[_0x5144[20]]);router[_0x5144[22]](_0x5144[13],license[_0x5144[6]](),auth[_0x5144[7]](),license[_0x5144[8]](),auth[_0x5144[17]](_0x5144[9]),controller[_0x5144[21]]);router[_0x5144[23]](_0x5144[13],license[_0x5144[6]](),auth[_0x5144[7]](),license[_0x5144[8]](),auth[_0x5144[17]](_0x5144[9]),controller[_0x5144[21]]);router[_0x5144[25]](_0x5144[13],license[_0x5144[6]](),auth[_0x5144[7]](),license[_0x5144[8]](),auth[_0x5144[17]](_0x5144[9]),controller[_0x5144[24]]);router[_0x5144[25]](_0x5144[15],license[_0x5144[6]](),auth[_0x5144[7]](),license[_0x5144[8]](),auth[_0x5144[17]](_0x5144[9]),controller[_0x5144[26]]);router[_0x5144[25]](_0x5144[5],license[_0x5144[6]](),auth[_0x5144[7]](),license[_0x5144[8]](),auth[_0x5144[17]](_0x5144[9]),controller[_0x5144[27]]);module[_0x5144[28]]= router
\ No newline at end of file
diff --git a/server/api/openchannel_queue/openchannel_queue.controller.js b/server/api/openchannel_queue/openchannel_queue.controller.js
index dde6c2b..b8df4ce 100644
--- a/server/api/openchannel_queue/openchannel_queue.controller.js
+++ b/server/api/openchannel_queue/openchannel_queue.controller.js
@@ -1,246 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/openchannel/queues              ->  index
- * POST    /api/openchannel/queues              ->  create
- * GET     /api/openchannel/queues/:id          ->  show
- * PUT     /api/openchannel/queues/:id          ->  update
- * DELETE  /api/openchannel/queues/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var OpenchannelQueue = require('../../models').OpenchannelQueue;
-var User = require('../../models').User;
-var sequelize = require('../../models').sequelize;
-var UserHasOpenchannelQueue = require('../../models').UserHasOpenchannelQueue;
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-
-// Gets a list of openchannelQueues
-exports.index = function(req, res) {
-
-  switch (req.user.role) {
-    case 'user':
-      return User
-        .findById(req.user.id, {
-          attributes: ['id']
-        })
-        .then(Util.getOpenchannelQueuesIdByUser(req.query))
-        .then(function(result) {
-          res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-
-    default:
-      return OpenchannelQueue
-        .scope('default')
-        .findAndCountAll(_.merge(Util.getQuery(req.query), {
-          distinct: true
-        }))
-        .then(function(result) {
-          res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-  }
-
-
-
-}
-
-// Gets a single OpenchannelQueue from the DB
-exports.show = function(req, res) {
-  return OpenchannelQueue
-    .scope('default')
-    .findById(req.params.id)
-    .then(function(Queue) {
-      if (!Queue) {
-        return res.sendStatus(404);
-      }
-      return res.send(Queue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-exports.showAgents = function(req, res) {
-  return OpenchannelQueue
-    .findById(req.params.id)
-    .then(function(queue) {
-      if (!queue) {
-        return res.sendStatus(404);
-      }
-      return queue
-        .getUsers({
-          where: {
-            role: 'agent'
-          },
-          attributes: ['id', 'name', 'fullname', 'email']
-        });
-    })
-    .then(function(agents) {
-      // console.log(agents);
-      return res.status(200).send({
-        rows: agents,
-        count: agents.length
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Creates a new OpenchannelQueue in the DB
-exports.create = function(req, res) {
-  var _openchannelQueue;
-
-  return OpenchannelQueue
-    .create(req.body)
-    .then(function(openchannelQueue) {
-      _openchannelQueue = openchannelQueue;
-
-      if (req.body.agents) {
-        return _openchannelQueue
-          .addUsers(req.body.agents, {
-            penalty: req.body.penalty || 0,
-            queue: _openchannelQueue.name
-          });
-      }
-    })
-    .then(function() {
-      return res.status(201).send(_openchannelQueue);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-// Updates an existing OpenchannelQueue in the DB
-exports.update = function(req, res) {
-    if (req.body.id) {
-      delete req.body.id;
-    }
-    return OpenchannelQueue
-      .findById(req.params.id)
-      .then(function(Queue) {
-        if (!Queue) {
-          return res.sendStatus(404);
-        }
-        var updated = _.merge(Queue, req.body);
-        return updated
-          .save();
-      })
-      .then(function(Queue) {
-        return res.status(200).send(Queue);
-      })
-      .catch(sequelize.UniqueConstraintError, function(err) {
-        return Util.errorManager.handleUniqueConstraintError(res, err);
-      })
-      .catch(function(err) {
-        return handleError(res, err);
-      });
-  }
-  // Updates an existing OpenchannelQueue in the DB.
-exports.addAgents = function(req, res, next) {
-  return OpenchannelQueue
-    .findById(req.params.id)
-    .then(function(Queue) {
-      if (!Queue) {
-        return res.sendStatus(404);
-      }
-      var userHasOpenchannelQueues = _.map(req.body.agents, function(agent) {
-        return {
-          UserId: agent,
-          penalty: req.body.penalty,
-          OpenchannelQueueId: Queue.id,
-          queue: Queue.name
-        };
-      });
-
-      return UserHasOpenchannelQueue
-        .bulkCreate(userHasOpenchannelQueues, {
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.removeAgents = function(req, res) {
-  return OpenchannelQueue
-    .findById(req.params.id)
-    .then(function(Queue) {
-      if (Queue) {
-        return Queue
-          .removeUsers(req.query.agents, {
-            individualHooks: true
-          });
-      } else {
-        throw new Error('Openchannel Queue not found');
-      }
-    })
-    .then(function() {
-      return res.sendStatus(202);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-};
-
-// Deletes a OpenchannelQueue from the DB
-exports.destroy = function(req, res) {
-  var _OpenchannelQueue;
-  return OpenchannelQueue
-    .findById(req.params.id)
-    .then(function(Queue) {
-      _OpenchannelQueue = Queue;
-      if (!Queue) {
-        return res.sendStatus(404);
-      }
-      return Queue
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(sequelize.ForeignKeyConstraintError, function(err) {
-      return Util.errorManager.handleForeignKeyConstraintError(res, 'queue', _OpenchannelQueue.name, err);
-    })
-    .catch(function(err) {
-      console.error('err', err);
-      return handleError(res, err);
-    });
-}
-exports.bulkDestroy = function(req, res) {
-  return OpenchannelQueue
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
+var _0xa608=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72\x48\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x61\x67\x65\x6E\x74\x73","\x62\x6F\x64\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x55\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x20\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79","\x65\x72\x72","\x65\x72\x72\x6F\x72","\x71\x75\x65\x75\x65","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xa608[0];var _=require(_0xa608[1]);var Util=require(_0xa608[2]);var OpenchannelQueue=require(_0xa608[4])[_0xa608[3]];var User=require(_0xa608[4])[_0xa608[5]];var sequelize=require(_0xa608[4])[_0xa608[6]];var UserHasOpenchannelQueue=require(_0xa608[4])[_0xa608[7]];function handleError(_0xff56x8,_0xff56x9){return _0xff56x8[_0xa608[9]](500)[_0xa608[8]](_0xff56x9)}exports[_0xa608[10]]= function(_0xff56xa,_0xff56x8){switch(_0xff56xa[_0xa608[16]][_0xa608[23]]){case _0xa608[16]:return User[_0xa608[17]](_0xff56xa[_0xa608[16]][_0xa608[15]],{attributes:[_0xa608[15]]})[_0xa608[12]](Util[_0xa608[14]](_0xff56xa[_0xa608[13]]))[_0xa608[12]](function(_0xff56xb){_0xff56x8[_0xa608[9]](200)[_0xa608[8]](_0xff56xb)})[_0xa608[11]](function(_0xff56x9){return handleError(_0xff56x8,_0xff56x9)});default:return OpenchannelQueue[_0xa608[22]](_0xa608[21])[_0xa608[20]](_[_0xa608[19]](Util[_0xa608[18]](_0xff56xa[_0xa608[13]]),{distinct:true}))[_0xa608[12]](function(_0xff56xb){_0xff56x8[_0xa608[9]](200)[_0xa608[8]](_0xff56xb)})[_0xa608[11]](function(_0xff56x9){return handleError(_0xff56x8,_0xff56x9)})}};exports[_0xa608[24]]= function(_0xff56xa,_0xff56x8){return OpenchannelQueue[_0xa608[22]](_0xa608[21])[_0xa608[17]](_0xff56xa[_0xa608[26]][_0xa608[15]])[_0xa608[12]](function(_0xff56xc){if(!_0xff56xc){return _0xff56x8[_0xa608[25]](404)};return _0xff56x8[_0xa608[8]](_0xff56xc)})[_0xa608[11]](function(_0xff56x9){return handleError(_0xff56x8,_0xff56x9)})};exports[_0xa608[27]]= function(_0xff56xa,_0xff56x8){return OpenchannelQueue[_0xa608[17]](_0xff56xa[_0xa608[26]][_0xa608[15]])[_0xa608[12]](function(_0xff56xe){if(!_0xff56xe){return _0xff56x8[_0xa608[25]](404)};return _0xff56xe[_0xa608[33]]({where:{role:_0xa608[29]},attributes:[_0xa608[15],_0xa608[30],_0xa608[31],_0xa608[32]]})})[_0xa608[12]](function(_0xff56xd){return _0xff56x8[_0xa608[9]](200)[_0xa608[8]]({rows:_0xff56xd,count:_0xff56xd[_0xa608[28]]})})[_0xa608[11]](function(_0xff56x9){return handleError(_0xff56x8,_0xff56x9)})};exports[_0xa608[34]]= function(_0xff56xa,_0xff56x8){var _0xff56xf;return OpenchannelQueue[_0xa608[34]](_0xff56xa[_0xa608[38]])[_0xa608[12]](function(_0xff56x10){_0xff56xf= _0xff56x10;if(_0xff56xa[_0xa608[38]][_0xa608[37]]){return _0xff56xf[_0xa608[40]](_0xff56xa[_0xa608[38]][_0xa608[37]],{penalty:_0xff56xa[_0xa608[38]][_0xa608[39]]|| 0,queue:_0xff56xf[_0xa608[30]]})}})[_0xa608[12]](function(){return _0xff56x8[_0xa608[9]](201)[_0xa608[8]](_0xff56xf)})[_0xa608[11]](sequelize.UniqueConstraintError,function(_0xff56x9){return Util[_0xa608[36]][_0xa608[35]](_0xff56x8,_0xff56x9)})[_0xa608[11]](function(_0xff56x9){return handleError(_0xff56x8,_0xff56x9)})};exports[_0xa608[41]]= function(_0xff56xa,_0xff56x8){if(_0xff56xa[_0xa608[38]][_0xa608[15]]){delete _0xff56xa[_0xa608[38]][_0xa608[15]]};return OpenchannelQueue[_0xa608[17]](_0xff56xa[_0xa608[26]][_0xa608[15]])[_0xa608[12]](function(_0xff56xc){if(!_0xff56xc){return _0xff56x8[_0xa608[25]](404)};var _0xff56x11=_[_0xa608[19]](_0xff56xc,_0xff56xa[_0xa608[38]]);return _0xff56x11[_0xa608[42]]()})[_0xa608[12]](function(_0xff56xc){return _0xff56x8[_0xa608[9]](200)[_0xa608[8]](_0xff56xc)})[_0xa608[11]](sequelize.UniqueConstraintError,function(_0xff56x9){return Util[_0xa608[36]][_0xa608[35]](_0xff56x8,_0xff56x9)})[_0xa608[11]](function(_0xff56x9){return handleError(_0xff56x8,_0xff56x9)})};exports[_0xa608[43]]= function(_0xff56xa,_0xff56x8,_0xff56x12){return OpenchannelQueue[_0xa608[17]](_0xff56xa[_0xa608[26]][_0xa608[15]])[_0xa608[12]](function(_0xff56xc){if(!_0xff56xc){return _0xff56x8[_0xa608[25]](404)};var _0xff56x13=_[_0xa608[44]](_0xff56xa[_0xa608[38]][_0xa608[37]],function(_0xff56x14){return {UserId:_0xff56x14,penalty:_0xff56xa[_0xa608[38]][_0xa608[39]],OpenchannelQueueId:_0xff56xc[_0xa608[15]],queue:_0xff56xc[_0xa608[30]]}});return UserHasOpenchannelQueue[_0xa608[45]](_0xff56x13,{individualHooks:true})})[_0xa608[12]](function(){return _0xff56x8[_0xa608[25]](200)})[_0xa608[11]](function(_0xff56x9){return handleError(_0xff56x8,_0xff56x9)})};exports[_0xa608[46]]= function(_0xff56xa,_0xff56x8){return OpenchannelQueue[_0xa608[17]](_0xff56xa[_0xa608[26]][_0xa608[15]])[_0xa608[12]](function(_0xff56xc){if(_0xff56xc){return _0xff56xc[_0xa608[47]](_0xff56xa[_0xa608[13]][_0xa608[37]],{individualHooks:true})}else {throw  new Error(_0xa608[48])}})[_0xa608[12]](function(){return _0xff56x8[_0xa608[25]](202)})[_0xa608[11]](function(_0xff56x9){return handleError(_0xff56x8,_0xff56x9)})};exports[_0xa608[49]]= function(_0xff56xa,_0xff56x8){var _0xff56x15;return OpenchannelQueue[_0xa608[17]](_0xff56xa[_0xa608[26]][_0xa608[15]])[_0xa608[12]](function(_0xff56xc){_0xff56x15= _0xff56xc;if(!_0xff56xc){return _0xff56x8[_0xa608[25]](404)};return _0xff56xc[_0xa608[49]]()})[_0xa608[12]](function(){return _0xff56x8[_0xa608[25]](204)})[_0xa608[11]](sequelize.ForeignKeyConstraintError,function(_0xff56x9){return Util[_0xa608[36]][_0xa608[53]](_0xff56x8,_0xa608[52],_0xff56x15[_0xa608[30]],_0xff56x9)})[_0xa608[11]](function(_0xff56x9){console[_0xa608[51]](_0xa608[50],_0xff56x9);return handleError(_0xff56x8,_0xff56x9)})};exports[_0xa608[54]]= function(_0xff56xa,_0xff56x8){return OpenchannelQueue[_0xa608[49]]({where:{id:_0xff56xa[_0xa608[13]][_0xa608[55]]},individualHooks:true})[_0xa608[12]](function(){return _0xff56x8[_0xa608[25]](204)})[_0xa608[11]](function(_0xff56x9){return handleError(_0xff56x8,_0xff56x9)})}
\ No newline at end of file
diff --git a/server/api/openchannel_queue/openchannel_queue.events.js b/server/api/openchannel_queue/openchannel_queue.events.js
index a1ca116..dfadde0 100644
--- a/server/api/openchannel_queue/openchannel_queue.events.js
+++ b/server/api/openchannel_queue/openchannel_queue.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const OpenchannelQueue = require('../../models').OpenchannelQueue;
-
-var OpenchannelQueueEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-OpenchannelQueueEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  OpenchannelQueue.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    OpenchannelQueueEvents.emit(event + ':' + doc._id, doc);
-    OpenchannelQueueEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = OpenchannelQueueEvents;
+var _0x6f57=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6f57[0];const EventEmitter=require(_0x6f57[1]);const OpenchannelQueue=require(_0x6f57[3])[_0x6f57[2]];var OpenchannelQueueEvents= new EventEmitter();OpenchannelQueueEvents[_0x6f57[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6f57[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x6f57[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6f57[6]};for(var e in events){var event=events[e];OpenchannelQueue[_0x6f57[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe08bx8,_0xe08bx9,_0xe08bxa){OpenchannelQueueEvents[_0x6f57[10]](event+ _0x6f57[8]+ _0xe08bx8[_0x6f57[9]],_0xe08bx8);OpenchannelQueueEvents[_0x6f57[10]](event,_0xe08bx8);_0xe08bxa(null)}}module[_0x6f57[11]]= OpenchannelQueueEvents
\ No newline at end of file
diff --git a/server/api/openchannel_queue/openchannel_queue.socket.js b/server/api/openchannel_queue/openchannel_queue.socket.js
index 2ef4161..2c2e6a0 100644
--- a/server/api/openchannel_queue/openchannel_queue.socket.js
+++ b/server/api/openchannel_queue/openchannel_queue.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const OpenchannelQueueEvents = require('./openchannel_queue.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('openchannel_queue:' + event, socket);
-
-    OpenchannelQueueEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    OpenchannelQueueEvents.removeListener(event, listener);
-  };
-}
+var _0x3db2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x3db2[0];const OpenchannelQueueEvents=require(_0x3db2[1]);var events=[_0x3db2[2],_0x3db2[3]];exports[_0x3db2[4]]= function(_0xe874x3){for(var _0xe874x4=0,_0xe874x5=events[_0x3db2[5]];_0xe874x4< _0xe874x5;_0xe874x4++){var _0xe874x6=events[_0xe874x4];var _0xe874x7=createListener(_0x3db2[6]+ _0xe874x6,_0xe874x3);OpenchannelQueueEvents[_0x3db2[7]](_0xe874x6,_0xe874x7);_0xe874x3[_0x3db2[7]](_0x3db2[8],removeListener(_0xe874x6,_0xe874x7))}};function createListener(_0xe874x6,_0xe874x3){return function(_0xe874x9){_0xe874x3[_0x3db2[9]](_0xe874x6,_0xe874x9)}}function removeListener(_0xe874x6,_0xe874x7){return function(){OpenchannelQueueEvents[_0x3db2[10]](_0xe874x6,_0xe874x7)}}
\ No newline at end of file
diff --git a/server/api/openchannel_room/index.js b/server/api/openchannel_room/index.js
index 3466839..6eee7c9 100644
--- a/server/api/openchannel_room/index.js
+++ b/server/api/openchannel_room/index.js
@@ -1,25 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./openchannel_room.controller');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-router.get('/', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.index);
-router.get('/pending', auth.isAuthenticated(), license.isValidDate(), license.hasSms(), auth.hasModule([20, 17], ['admin']), controller.pending);
-router.get('/new', auth.isAuthenticated(), license.isValidDate(), license.hasSms(), auth.hasModule([20, 17], ['admin']), controller.new);
-router.get('/open', auth.isAuthenticated(), license.isValidDate(), license.hasSms(), auth.hasModule([20, 17], ['admin']), controller.open);
-router.get('/closed', auth.isAuthenticated(), license.isValidDate(), license.hasSms(), auth.hasModule([20, 17], ['admin']), controller.closed);
-router.get('/:id', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.show);
-router.get('/describe', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.describe);
-router.get('/:id/agents', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.showAgents);
-router.get('/messages/:id', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.getRoomByMessage);
-router.post('/', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.create);
-router.post('/:id/messages', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.createMessage);
-router.put('/:id', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.update);
-router.put('/:id/agents', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.updateAgents);
-router.patch('/:id', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.updatePatch);
-router.delete('/:id', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.destroy);
-router.delete('/', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.bulkDestroy);
-module.exports = router;
+var _0x4c9b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x72\x6F\x6F\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x70\x65\x6E\x64\x69\x6E\x67","\x68\x61\x73\x53\x6D\x73","\x70\x65\x6E\x64\x69\x6E\x67","\x2F\x6E\x65\x77","\x6E\x65\x77","\x2F\x6F\x70\x65\x6E","\x6F\x70\x65\x6E","\x2F\x63\x6C\x6F\x73\x65\x64","\x63\x6C\x6F\x73\x65\x64","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x2F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F\x3A\x69\x64","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x4c9b[0];var express=require(_0x4c9b[1]);var auth=require(_0x4c9b[2]);var controller=require(_0x4c9b[3]);var license=require(_0x4c9b[4]);var router=express.Router();router[_0x4c9b[13]](_0x4c9b[5],license[_0x4c9b[6]](),license[_0x4c9b[7]](),auth[_0x4c9b[8]](),auth[_0x4c9b[11]]([20],[_0x4c9b[9],_0x4c9b[10]]),controller[_0x4c9b[12]]);router[_0x4c9b[13]](_0x4c9b[14],auth[_0x4c9b[8]](),license[_0x4c9b[6]](),license[_0x4c9b[15]](),auth[_0x4c9b[11]]([20,17],[_0x4c9b[9]]),controller[_0x4c9b[16]]);router[_0x4c9b[13]](_0x4c9b[17],auth[_0x4c9b[8]](),license[_0x4c9b[6]](),license[_0x4c9b[15]](),auth[_0x4c9b[11]]([20,17],[_0x4c9b[9]]),controller[_0x4c9b[18]]);router[_0x4c9b[13]](_0x4c9b[19],auth[_0x4c9b[8]](),license[_0x4c9b[6]](),license[_0x4c9b[15]](),auth[_0x4c9b[11]]([20,17],[_0x4c9b[9]]),controller[_0x4c9b[20]]);router[_0x4c9b[13]](_0x4c9b[21],auth[_0x4c9b[8]](),license[_0x4c9b[6]](),license[_0x4c9b[15]](),auth[_0x4c9b[11]]([20,17],[_0x4c9b[9]]),controller[_0x4c9b[22]]);router[_0x4c9b[13]](_0x4c9b[23],license[_0x4c9b[6]](),license[_0x4c9b[7]](),auth[_0x4c9b[8]](),auth[_0x4c9b[11]]([20],[_0x4c9b[9],_0x4c9b[10]]),controller[_0x4c9b[24]]);router[_0x4c9b[13]](_0x4c9b[25],license[_0x4c9b[6]](),license[_0x4c9b[7]](),auth[_0x4c9b[8]](),auth[_0x4c9b[11]]([20],[_0x4c9b[9]]),controller[_0x4c9b[26]]);router[_0x4c9b[13]](_0x4c9b[27],license[_0x4c9b[6]](),license[_0x4c9b[7]](),auth[_0x4c9b[8]](),auth[_0x4c9b[11]]([20],[_0x4c9b[9],_0x4c9b[10]]),controller[_0x4c9b[28]]);router[_0x4c9b[13]](_0x4c9b[29],license[_0x4c9b[6]](),license[_0x4c9b[7]](),auth[_0x4c9b[8]](),auth[_0x4c9b[11]]([20],[_0x4c9b[9],_0x4c9b[10]]),controller[_0x4c9b[30]]);router[_0x4c9b[32]](_0x4c9b[5],license[_0x4c9b[6]](),license[_0x4c9b[7]](),auth[_0x4c9b[8]](),auth[_0x4c9b[11]]([20],[_0x4c9b[9]]),controller[_0x4c9b[31]]);router[_0x4c9b[32]](_0x4c9b[33],license[_0x4c9b[6]](),license[_0x4c9b[7]](),auth[_0x4c9b[8]](),auth[_0x4c9b[11]]([20],[_0x4c9b[9]]),controller[_0x4c9b[34]]);router[_0x4c9b[36]](_0x4c9b[23],license[_0x4c9b[6]](),license[_0x4c9b[7]](),auth[_0x4c9b[8]](),auth[_0x4c9b[11]]([20],[_0x4c9b[9],_0x4c9b[10]]),controller[_0x4c9b[35]]);router[_0x4c9b[36]](_0x4c9b[27],license[_0x4c9b[6]](),license[_0x4c9b[7]](),auth[_0x4c9b[8]](),auth[_0x4c9b[11]]([20],[_0x4c9b[9],_0x4c9b[10]]),controller[_0x4c9b[37]]);router[_0x4c9b[39]](_0x4c9b[23],license[_0x4c9b[6]](),license[_0x4c9b[7]](),auth[_0x4c9b[8]](),auth[_0x4c9b[11]]([20],[_0x4c9b[9],_0x4c9b[10]]),controller[_0x4c9b[38]]);router[_0x4c9b[41]](_0x4c9b[23],license[_0x4c9b[6]](),license[_0x4c9b[7]](),auth[_0x4c9b[8]](),auth[_0x4c9b[11]]([20],[_0x4c9b[9]]),controller[_0x4c9b[40]]);router[_0x4c9b[41]](_0x4c9b[5],license[_0x4c9b[6]](),license[_0x4c9b[7]](),auth[_0x4c9b[8]](),auth[_0x4c9b[11]]([20],[_0x4c9b[9]]),controller[_0x4c9b[42]]);module[_0x4c9b[43]]= router
\ No newline at end of file
diff --git a/server/api/openchannel_room/openchannel_room.controller.js b/server/api/openchannel_room/openchannel_room.controller.js
index 05ee965..61999f2 100644
--- a/server/api/openchannel_room/openchannel_room.controller.js
+++ b/server/api/openchannel_room/openchannel_room.controller.js
@@ -1,399 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/openchannel/rooms              ->  index
- * POST    /api/openchannel/rooms              ->  create
- * GET     /api/openchannel/rooms/:id          ->  show
- * PUT     /api/openchannel/rooms/:id          ->  update
- * DELETE  /api/openchannel/rooms/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-var moment = require('moment');
-
-var OpenchannelRoom = require('../../models').OpenchannelRoom;
-var OpenchannelMessage = require('../../models').OpenchannelMessage;
-var OpenchannelAccount = require('../../models').OpenchannelAccount;
-var OpenchannelQueue = require('../../models').OpenchannelQueue;
-var OpenchannelApplication = require('../../models').OpenchannelApplication;
-var User = require('../../models').User;
-
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-
-
-// Gets a list of OpenchannelRooms
-exports.index = function(req, res) {
-  switch (req.user.role) {
-    case 'agent':
-      return OpenchannelRoom
-        .scope('default', {
-          method: ['agent', req.user.id]
-        })
-        .findAndCountAll(Util.getQuery(req.query))
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-
-    default:
-      return OpenchannelRoom
-        .scope('default')
-        .findAndCountAll(Util.getQuery(req.query))
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-  }
-
-}
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return OpenchannelRoom
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function getOpenchannelQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return User
-          .findById(user.id, {
-            attributes: ['id']
-          })
-          .then(Util.getOpenchannelQueuesIdByUser({}, {
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: User,
-              attributes: ['id']
-            }]
-          }))
-          .then(function(userQueues) {
-            return {
-              include: {
-                model: OpenchannelAccount,
-                include: {
-                  model: OpenchannelApplication,
-                  include: {
-                    model: OpenchannelQueue,
-                    where: {
-                      id: _.map(userQueues, 'id')
-                    }
-                  }
-                }
-              }
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
-
-exports.pending = function(req, res) {
-  return Promise
-    .all([])
-    .then(getOpenchannelQueues(req.user))
-    .then(function(condition) {
-      return OpenchannelRoom
-        .count(_.merge(Util.getQuery(req.query, {
-          status: 'PENDING',
-          updatedAt: {
-            $gte: moment().startOf('day')
-          }
-        }), condition));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.new = function(req, res) {
-  return Promise
-    .all([])
-    .then(getOpenchannelQueues(req.user))
-    .then(function(condition) {
-      return OpenchannelRoom
-        .count(_.merge(Util.getQuery(req.query, {
-          status: 'NEW',
-          updatedAt: {
-            $gte: moment().startOf('day')
-          }
-        }), condition));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.open = function(req, res) {
-  return Promise
-    .all([])
-    .then(getOpenchannelQueues(req.user))
-    .then(function(condition) {
-      return OpenchannelRoom
-        .count(_.merge(Util.getQuery(req.query, {
-          status: 'OPEN',
-          updatedAt: {
-            $gte: moment().startOf('day')
-          }
-        }), condition));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.closed = function(req, res) {
-  return Promise
-    .all([])
-    .then(getOpenchannelQueues(req.user))
-    .then(function(condition) {
-      return OpenchannelRoom
-        .count(_.merge(Util.getQuery(req.query, {
-          status: 'CLOSED',
-          updatedAt: {
-            $gte: moment().startOf('day')
-          }
-        }), condition));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-
-
-// Gets a single OpenchannelRoom from the DB
-exports.show = function(req, res) {
-  return OpenchannelRoom
-    .scope('default')
-    .findById(req.params.id)
-    .then(function(Room) {
-      if (!Room) {
-        return res.sendStatus(404);
-      }
-      return res.send(Room);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-exports.showAgents = function(req, res, next) {
-  return OpenchannelRoom
-    .findById(req.params.id)
-    .then(function(Room) {
-      if (!Room) {
-        return res.sendStatus(404);
-      }
-      return Room
-        .getUsers({
-          attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal']
-        });
-    })
-    .then(function(users) {
-      return res.send(users);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getRoomByMessage = function(req, res, next) {
-  return OpenchannelMessage
-    .findById(req.params.id)
-    .then(function(Message) {
-      return Message
-        .getOpenchannelRoom({
-          include: [{
-            model: OpenchannelAccount
-          }, {
-            model: OpenchannelMessage,
-            include: [{
-              model: User,
-              attributes: ['id', 'name', 'fullname', 'email']
-            }]
-          }, {
-            model: User,
-            attributes: ['id', 'name', 'fullname', 'email']
-          }]
-        });
-    })
-    .then(function(Room) {
-      return res.send(Room);
-    })
-    .catch(function(err) {
-      console.log('err', err);
-      return handleError(res, err);
-    });
-};
-// Creates a new OpenchannelRoom in the DB
-exports.create = function(req, res) {
-
-  return OpenchannelRoom
-    .create(req.body)
-    .then(function(Message) {
-      return res.status(201).send(Message);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-
-// Creates a new Message in the DB.
-exports.createMessage = function(req, res, next) {
-  req.body.UserId = req.user.id;
-  req.body.OpenchannelRoomId = req.params.id;
-  return OpenchannelMessage
-    .create(req.body)
-    .then(function(Message) {
-      return res.status(201).send(Message);
-    }).catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Updates an existing OpenchannelRoom in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return OpenchannelRoom
-    .findById(req.params.id)
-    .then(function(Room) {
-      if (!Room) {
-        return res.sendStatus(404);
-      }
-
-      var updated = _.merge(Room, req.body);
-
-      return updated
-        .save();
-    })
-    .then(function(Room) {
-      return res.status(200).send(Room);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-exports.updateAgents = function(req, res, next) {
-  return OpenchannelRoom
-    .findById(req.params.id)
-    .then(function(Room) {
-      if (!Room) {
-        return res.sendStatus(404);
-      }
-
-      return Room
-        .setUsers(req.body.agents, {
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a OpenchannelRoom from the DB
-exports.destroy = function(req, res) {
-  return OpenchannelRoom
-    .findById(req.params.id)
-    .then(function(Room) {
-      if (!Room) {
-        return res.sendStatus(404);
-      }
-      return Room.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-exports.bulkDestroy = function(req, res) {
-  return OpenchannelRoom
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-exports.updatePatch = function(req, res, next) {
-
-  var _options = {
-    where: {
-      id: req.params.id.split(',')
-    },
-    user: req.user,
-    individualHooks: true
-  };
-  return OpenchannelRoom
-    .update(req.body, _options)
-    .then(function(Rooms) {
-      if (!Rooms) {
-        return res.sendStatus(404);
-      }
-      return Rooms
-    })
-    .then(function(Rooms) {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
+var _0xff6f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x55\x73\x65\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x61\x67\x65\x6E\x74","\x69\x64","\x75\x73\x65\x72","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x6D\x61\x70","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x70\x65\x6E\x64\x69\x6E\x67","\x6C\x6F\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x6E\x65\x77","\x4E\x45\x57","\x6F\x70\x65\x6E","\x4F\x50\x45\x4E","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x65\x72\x72","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x49\x64","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x2C","\x73\x70\x6C\x69\x74"];_0xff6f[0];var _=require(_0xff6f[1]);var Util=require(_0xff6f[2]);var moment=require(_0xff6f[3]);var OpenchannelRoom=require(_0xff6f[5])[_0xff6f[4]];var OpenchannelMessage=require(_0xff6f[5])[_0xff6f[6]];var OpenchannelAccount=require(_0xff6f[5])[_0xff6f[7]];var OpenchannelQueue=require(_0xff6f[5])[_0xff6f[8]];var OpenchannelApplication=require(_0xff6f[5])[_0xff6f[9]];var User=require(_0xff6f[5])[_0xff6f[10]];function handleError(_0xe320xb,_0xe320xc){return _0xe320xb[_0xff6f[12]](500)[_0xff6f[11]](_0xe320xc)}exports[_0xff6f[13]]= function(_0xe320xd,_0xe320xb){switch(_0xe320xd[_0xff6f[22]][_0xff6f[24]]){case _0xff6f[20]:return OpenchannelRoom[_0xff6f[23]](_0xff6f[19],{method:[_0xff6f[20],_0xe320xd[_0xff6f[22]][_0xff6f[21]]]})[_0xff6f[18]](Util[_0xff6f[17]](_0xe320xd[_0xff6f[16]]))[_0xff6f[15]](function(_0xe320xe){return _0xe320xb[_0xff6f[12]](200)[_0xff6f[11]](_0xe320xe)})[_0xff6f[14]](function(_0xe320xc){return handleError(_0xe320xb,_0xe320xc)});default:return OpenchannelRoom[_0xff6f[23]](_0xff6f[19])[_0xff6f[18]](Util[_0xff6f[17]](_0xe320xd[_0xff6f[16]]))[_0xff6f[15]](function(_0xe320xe){return _0xe320xb[_0xff6f[12]](200)[_0xff6f[11]](_0xe320xe)})[_0xff6f[14]](function(_0xe320xc){return handleError(_0xe320xb,_0xe320xc)})}};exports[_0xff6f[25]]= function(_0xe320xd,_0xe320xb){return OpenchannelRoom[_0xff6f[25]]()[_0xff6f[15]](function(_0xe320xf){return _0xe320xb[_0xff6f[12]](200)[_0xff6f[11]](_0xe320xf)})[_0xff6f[14]](function(_0xe320xc){return handleError(_0xe320xb,_0xe320xc)})};function getOpenchannelQueues(_0xe320x11){return function(){switch(_0xe320x11[_0xff6f[24]]){case _0xff6f[22]:return User[_0xff6f[28]](_0xe320x11[_0xff6f[21]],{attributes:[_0xff6f[21]]})[_0xff6f[15]](Util[_0xff6f[27]]({},{attributes:[_0xff6f[21]],include:[{raw:true,model:User,attributes:[_0xff6f[21]]}]}))[_0xff6f[15]](function(_0xe320x12){return {include:{model:OpenchannelAccount,include:{model:OpenchannelApplication,include:{model:OpenchannelQueue,where:{id:_[_0xff6f[26]](_0xe320x12,_0xff6f[21])}}}}}});default:return {}}}}exports[_0xff6f[29]]= function(_0xe320xd,_0xe320xb){return Promise[_0xff6f[36]]([])[_0xff6f[15]](getOpenchannelQueues(_0xe320xd[_0xff6f[22]]))[_0xff6f[15]](function(_0xe320x14){return OpenchannelRoom[_0xff6f[35]](_[_0xff6f[34]](Util[_0xff6f[17]](_0xe320xd[_0xff6f[16]],{status:_0xff6f[31],updatedAt:{$gte:moment()[_0xff6f[33]](_0xff6f[32])}}),_0xe320x14))})[_0xff6f[15]](function(_0xe320x13){return _0xe320xb[_0xff6f[12]](200)[_0xff6f[11]]({value:_0xe320x13})})[_0xff6f[14]](function(_0xe320xc){console[_0xff6f[30]](_0xe320xc);return handleError(_0xe320xb,_0xe320xc)})};exports[_0xff6f[37]]= function(_0xe320xd,_0xe320xb){return Promise[_0xff6f[36]]([])[_0xff6f[15]](getOpenchannelQueues(_0xe320xd[_0xff6f[22]]))[_0xff6f[15]](function(_0xe320x14){return OpenchannelRoom[_0xff6f[35]](_[_0xff6f[34]](Util[_0xff6f[17]](_0xe320xd[_0xff6f[16]],{status:_0xff6f[38],updatedAt:{$gte:moment()[_0xff6f[33]](_0xff6f[32])}}),_0xe320x14))})[_0xff6f[15]](function(_0xe320x13){return _0xe320xb[_0xff6f[12]](200)[_0xff6f[11]]({value:_0xe320x13})})[_0xff6f[14]](function(_0xe320xc){console[_0xff6f[30]](_0xe320xc);return handleError(_0xe320xb,_0xe320xc)})};exports[_0xff6f[39]]= function(_0xe320xd,_0xe320xb){return Promise[_0xff6f[36]]([])[_0xff6f[15]](getOpenchannelQueues(_0xe320xd[_0xff6f[22]]))[_0xff6f[15]](function(_0xe320x14){return OpenchannelRoom[_0xff6f[35]](_[_0xff6f[34]](Util[_0xff6f[17]](_0xe320xd[_0xff6f[16]],{status:_0xff6f[40],updatedAt:{$gte:moment()[_0xff6f[33]](_0xff6f[32])}}),_0xe320x14))})[_0xff6f[15]](function(_0xe320x13){return _0xe320xb[_0xff6f[12]](200)[_0xff6f[11]]({value:_0xe320x13})})[_0xff6f[14]](function(_0xe320xc){console[_0xff6f[30]](_0xe320xc);return handleError(_0xe320xb,_0xe320xc)})};exports[_0xff6f[41]]= function(_0xe320xd,_0xe320xb){return Promise[_0xff6f[36]]([])[_0xff6f[15]](getOpenchannelQueues(_0xe320xd[_0xff6f[22]]))[_0xff6f[15]](function(_0xe320x14){return OpenchannelRoom[_0xff6f[35]](_[_0xff6f[34]](Util[_0xff6f[17]](_0xe320xd[_0xff6f[16]],{status:_0xff6f[42],updatedAt:{$gte:moment()[_0xff6f[33]](_0xff6f[32])}}),_0xe320x14))})[_0xff6f[15]](function(_0xe320x13){return _0xe320xb[_0xff6f[12]](200)[_0xff6f[11]]({value:_0xe320x13})})[_0xff6f[14]](function(_0xe320xc){console[_0xff6f[30]](_0xe320xc);return handleError(_0xe320xb,_0xe320xc)})};exports[_0xff6f[43]]= function(_0xe320xd,_0xe320xb){return OpenchannelRoom[_0xff6f[23]](_0xff6f[19])[_0xff6f[28]](_0xe320xd[_0xff6f[45]][_0xff6f[21]])[_0xff6f[15]](function(_0xe320x15){if(!_0xe320x15){return _0xe320xb[_0xff6f[44]](404)};return _0xe320xb[_0xff6f[11]](_0xe320x15)})[_0xff6f[14]](function(_0xe320xc){return handleError(_0xe320xb,_0xe320xc)})};exports[_0xff6f[46]]= function(_0xe320xd,_0xe320xb,_0xe320x16){return OpenchannelRoom[_0xff6f[28]](_0xe320xd[_0xff6f[45]][_0xff6f[21]])[_0xff6f[15]](function(_0xe320x15){if(!_0xe320x15){return _0xe320xb[_0xff6f[44]](404)};return _0xe320x15[_0xff6f[51]]({attributes:[_0xff6f[21],_0xff6f[47],_0xff6f[48],_0xff6f[49],_0xff6f[24],_0xff6f[50]]})})[_0xff6f[15]](function(_0xe320x17){return _0xe320xb[_0xff6f[11]](_0xe320x17)})[_0xff6f[14]](function(_0xe320xc){return handleError(_0xe320xb,_0xe320xc)})};exports[_0xff6f[52]]= function(_0xe320xd,_0xe320xb,_0xe320x16){return OpenchannelMessage[_0xff6f[28]](_0xe320xd[_0xff6f[45]][_0xff6f[21]])[_0xff6f[15]](function(_0xe320x18){return _0xe320x18[_0xff6f[54]]({include:[{model:OpenchannelAccount},{model:OpenchannelMessage,include:[{model:User,attributes:[_0xff6f[21],_0xff6f[47],_0xff6f[48],_0xff6f[49]]}]},{model:User,attributes:[_0xff6f[21],_0xff6f[47],_0xff6f[48],_0xff6f[49]]}]})})[_0xff6f[15]](function(_0xe320x15){return _0xe320xb[_0xff6f[11]](_0xe320x15)})[_0xff6f[14]](function(_0xe320xc){console[_0xff6f[30]](_0xff6f[53],_0xe320xc);return handleError(_0xe320xb,_0xe320xc)})};exports[_0xff6f[55]]= function(_0xe320xd,_0xe320xb){return OpenchannelRoom[_0xff6f[55]](_0xe320xd[_0xff6f[56]])[_0xff6f[15]](function(_0xe320x18){return _0xe320xb[_0xff6f[12]](201)[_0xff6f[11]](_0xe320x18)})[_0xff6f[14]](function(_0xe320xc){return handleError(_0xe320xb,_0xe320xc)})};exports[_0xff6f[57]]= function(_0xe320xd,_0xe320xb,_0xe320x16){_0xe320xd[_0xff6f[56]][_0xff6f[58]]= _0xe320xd[_0xff6f[22]][_0xff6f[21]];_0xe320xd[_0xff6f[56]][_0xff6f[59]]= _0xe320xd[_0xff6f[45]][_0xff6f[21]];return OpenchannelMessage[_0xff6f[55]](_0xe320xd[_0xff6f[56]])[_0xff6f[15]](function(_0xe320x18){return _0xe320xb[_0xff6f[12]](201)[_0xff6f[11]](_0xe320x18)})[_0xff6f[14]](function(_0xe320xc){return handleError(_0xe320xb,_0xe320xc)})};exports[_0xff6f[60]]= function(_0xe320xd,_0xe320xb){if(_0xe320xd[_0xff6f[56]][_0xff6f[21]]){delete _0xe320xd[_0xff6f[56]][_0xff6f[21]]};return OpenchannelRoom[_0xff6f[28]](_0xe320xd[_0xff6f[45]][_0xff6f[21]])[_0xff6f[15]](function(_0xe320x15){if(!_0xe320x15){return _0xe320xb[_0xff6f[44]](404)};var _0xe320x19=_[_0xff6f[34]](_0xe320x15,_0xe320xd[_0xff6f[56]]);return _0xe320x19[_0xff6f[61]]()})[_0xff6f[15]](function(_0xe320x15){return _0xe320xb[_0xff6f[12]](200)[_0xff6f[11]](_0xe320x15)})[_0xff6f[14]](function(_0xe320xc){return handleError(_0xe320xb,_0xe320xc)})};exports[_0xff6f[62]]= function(_0xe320xd,_0xe320xb,_0xe320x16){return OpenchannelRoom[_0xff6f[28]](_0xe320xd[_0xff6f[45]][_0xff6f[21]])[_0xff6f[15]](function(_0xe320x15){if(!_0xe320x15){return _0xe320xb[_0xff6f[44]](404)};return _0xe320x15[_0xff6f[64]](_0xe320xd[_0xff6f[56]][_0xff6f[63]],{individualHooks:true})})[_0xff6f[15]](function(){return _0xe320xb[_0xff6f[44]](200)})[_0xff6f[14]](function(_0xe320xc){return handleError(_0xe320xb,_0xe320xc)})};exports[_0xff6f[65]]= function(_0xe320xd,_0xe320xb){return OpenchannelRoom[_0xff6f[28]](_0xe320xd[_0xff6f[45]][_0xff6f[21]])[_0xff6f[15]](function(_0xe320x15){if(!_0xe320x15){return _0xe320xb[_0xff6f[44]](404)};return _0xe320x15[_0xff6f[65]]()})[_0xff6f[15]](function(){return _0xe320xb[_0xff6f[44]](204)})[_0xff6f[14]](function(_0xe320xc){return handleError(_0xe320xb,_0xe320xc)})};exports[_0xff6f[66]]= function(_0xe320xd,_0xe320xb){return OpenchannelRoom[_0xff6f[65]]({where:{id:_0xe320xd[_0xff6f[16]][_0xff6f[67]]},individualHooks:true})[_0xff6f[15]](function(){return _0xe320xb[_0xff6f[44]](200)})[_0xff6f[14]](function(_0xe320xc){return handleError(_0xe320xb,_0xe320xc)})};exports[_0xff6f[68]]= function(_0xe320xd,_0xe320xb,_0xe320x16){var _0xe320x1a={where:{id:_0xe320xd[_0xff6f[45]][_0xff6f[21]][_0xff6f[70]](_0xff6f[69])},user:_0xe320xd[_0xff6f[22]],individualHooks:true};return OpenchannelRoom[_0xff6f[60]](_0xe320xd[_0xff6f[56]],_0xe320x1a)[_0xff6f[15]](function(_0xe320x1b){if(!_0xe320x1b){return _0xe320xb[_0xff6f[44]](404)};return _0xe320x1b})[_0xff6f[15]](function(_0xe320x1b){return _0xe320xb[_0xff6f[44]](200)})[_0xff6f[14]](function(_0xe320xc){return handleError(_0xe320xb,_0xe320xc)})}
\ No newline at end of file
diff --git a/server/api/openchannel_room/openchannel_room.events.js b/server/api/openchannel_room/openchannel_room.events.js
index 1bea005..f2db7bc 100644
--- a/server/api/openchannel_room/openchannel_room.events.js
+++ b/server/api/openchannel_room/openchannel_room.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const OpenchannelRoom = require('../../models').OpenchannelRoom;
-
-var OpenchannelRoomEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-OpenchannelRoomEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  OpenchannelRoom.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    OpenchannelRoomEvents.emit(event + ':' + doc._id, doc);
-    OpenchannelRoomEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = OpenchannelRoomEvents;
+var _0xd8ad=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd8ad[0];const EventEmitter=require(_0xd8ad[1]);const OpenchannelRoom=require(_0xd8ad[3])[_0xd8ad[2]];var OpenchannelRoomEvents= new EventEmitter();OpenchannelRoomEvents[_0xd8ad[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd8ad[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd8ad[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd8ad[6]};for(var e in events){var event=events[e];OpenchannelRoom[_0xd8ad[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x9b3bx8,_0x9b3bx9,_0x9b3bxa){OpenchannelRoomEvents[_0xd8ad[10]](event+ _0xd8ad[8]+ _0x9b3bx8[_0xd8ad[9]],_0x9b3bx8);OpenchannelRoomEvents[_0xd8ad[10]](event,_0x9b3bx8);_0x9b3bxa(null)}}module[_0xd8ad[11]]= OpenchannelRoomEvents
\ No newline at end of file
diff --git a/server/api/openchannel_room/openchannel_room.socket.js b/server/api/openchannel_room/openchannel_room.socket.js
index 0868959..800a4f9 100644
--- a/server/api/openchannel_room/openchannel_room.socket.js
+++ b/server/api/openchannel_room/openchannel_room.socket.js
@@ -1,33 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const OpenchannelRoomEvents = require('./openchannel_room.events');
-
-// Model events to emit
-var events = ['save', 'save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('openchannel_room:' + event, socket);
-
-    OpenchannelRoomEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-
-function removeListener(event, listener) {
-  return function() {
-    OpenchannelRoomEvents.removeListener(event, listener);
-  };
-}
+var _0x4b7e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x72\x6F\x6F\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x72\x6F\x6F\x6D\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x4b7e[0];const OpenchannelRoomEvents=require(_0x4b7e[1]);var events=[_0x4b7e[2],_0x4b7e[2],_0x4b7e[3]];exports[_0x4b7e[4]]= function(_0xb43bx3){for(var _0xb43bx4=0,_0xb43bx5=events[_0x4b7e[5]];_0xb43bx4< _0xb43bx5;_0xb43bx4++){var _0xb43bx6=events[_0xb43bx4];var _0xb43bx7=createListener(_0x4b7e[6]+ _0xb43bx6,_0xb43bx3);OpenchannelRoomEvents[_0x4b7e[7]](_0xb43bx6,_0xb43bx7);_0xb43bx3[_0x4b7e[7]](_0x4b7e[8],removeListener(_0xb43bx6,_0xb43bx7))}};function createListener(_0xb43bx6,_0xb43bx3){return function(_0xb43bx9){_0xb43bx3[_0x4b7e[9]](_0xb43bx6,_0xb43bx9)}}function removeListener(_0xb43bx6,_0xb43bx7){return function(){OpenchannelRoomEvents[_0x4b7e[10]](_0xb43bx6,_0xb43bx7)}}
\ No newline at end of file
diff --git a/server/api/pause/index.js b/server/api/pause/index.js
index 97ab245..04353f5 100644
--- a/server/api/pause/index.js
+++ b/server/api/pause/index.js
@@ -1,162 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./pause.controller');
-
-var router = express.Router();
-
-/**
- * @api {get} /api/pauses/ Get pauses list.
- *
- * @apiParam (Query) {Number} [offset] Pagination offset.
- * @apiParam (Query) {Number} [limit] Pagination limit.
- *
- * @apiVersion 0.0.143
- * @apiName GetPauses
- * @apiGroup Pauses
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Number} count Number of pauses.
- * @apiSuccess {Object[]} rows Pauses list.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *       "count": 1,
- *       "rows": [{
- *          "id": 1
- *          "name": "BACKOFFICE"
- *          "description": "BACKOFFICE Pause"
- *       }]
- *     }
- */
-router.get('/', auth.isAuthenticated(), auth.hasModule([6, 13], ['admin', 'agent']), controller.index);
-
-/**
- * @api {get} /api/pauses/:id Get pause.
- * @apiParam {Number} id Pause unique ID.
- * @apiVersion 0.0.143
- * @apiName GetPause
- * @apiGroup Pauses
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *          "id": 1
- *          "name": "BACKOFFICE"
- *          "description": "BACKOFFICE Pause"
- *     }
- */
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show);
-
-/**
- * @api {post} /api/users/ Create pause.
- * @apiParam (Body) {String} name                                        Pause name.
- * @apiParam (Body) {String} [description]                               Pause description.
- *
- * @apiVersion 0.0.143
- * @apiName CreatePause
- * @apiGroup Pauses
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 201 Created
- *     {
- *        "id": 1
- *        "name": "BACKOFFICE"
- *        "description": "BACKOFFICE Pause"
- *     }
- */
-router.post('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.create);
-
-/**
- * @api {delete} /api/users/:id Update pause details.
- *
- * @apiParam (Params) {Number} id Pause unique ID.
- * @apiParam (Body) {String} name                                        Pause name.
- * @apiParam (Body) {String} [description]                               Pause description.
- *
- * @apiVersion 0.0.143
- * @apiName UpdatePause
- * @apiGroup Pauses
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *        "id": 1
- *        "name": "BACKOFFICE"
- *        "description": "BACKOFFICE Pause"
- *     }
- */
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update);
-
-/**
- * @api {delete} /api/pauses/ Bulk Delete pauses.
- *
- * @apiParam (Query) {Number[]} ids Pauses unique ID array.
- *
- * @apiVersion 0.0.143
- * @apiName BulkDeletePauses
- * @apiGroup Pauses
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.bulkDestroy);
-
-/**
- * @api {delete} /api/telephones/:id Delete pause.
- *
- * @apiParam {Number} id Pause unique ID.
- *
- * @apiVersion 0.0.143
- * @apiName DeletePause
- * @apiGroup Pauses
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0x1307=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x70\x61\x75\x73\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x1307[0];var express=require(_0x1307[1]);var auth=require(_0x1307[2]);var controller=require(_0x1307[3]);var router=express.Router();router[_0x1307[10]](_0x1307[4],auth[_0x1307[5]](),auth[_0x1307[8]]([6,13],[_0x1307[6],_0x1307[7]]),controller[_0x1307[9]]);router[_0x1307[10]](_0x1307[11],auth[_0x1307[5]](),auth[_0x1307[8]]([13],[_0x1307[6]]),controller[_0x1307[12]]);router[_0x1307[14]](_0x1307[4],auth[_0x1307[5]](),auth[_0x1307[8]]([13],[_0x1307[6]]),controller[_0x1307[13]]);router[_0x1307[16]](_0x1307[11],auth[_0x1307[5]](),auth[_0x1307[8]]([13],[_0x1307[6]]),controller[_0x1307[15]]);router[_0x1307[18]](_0x1307[4],auth[_0x1307[5]](),auth[_0x1307[8]]([13],[_0x1307[6]]),controller[_0x1307[17]]);router[_0x1307[18]](_0x1307[11],auth[_0x1307[5]](),auth[_0x1307[8]]([13],[_0x1307[6]]),controller[_0x1307[19]]);module[_0x1307[20]]= router
\ No newline at end of file
diff --git a/server/api/pause/pause.controller.js b/server/api/pause/pause.controller.js
index d33093a..28e75de 100644
--- a/server/api/pause/pause.controller.js
+++ b/server/api/pause/pause.controller.js
@@ -1,150 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/pauses              ->  index
- * POST    /api/pauses              ->  create
- * GET     /api/pauses/:id          ->  show
- * PUT     /api/pauses/:id          ->  update
- * DELETE  /api/pauses/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var Pause = require('../../models').Pause;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of Pauses
-exports.index = function(req, res) {
-  return Pause
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-// Gets a single Pause from the DB
-exports.show = function(req, res) {
-  return Pause.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new Pause in the DB
-exports.create = function(req, res) {
-  return Pause.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing Pause in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return Pause.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a Pause from the DB
-exports.destroy = function(req, res) {
-  return Pause.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
-
-// Deletes a agent from the DB.
-exports.bulkDestroy = function(req, res) {
-
-  return Pause
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function getQuery(query) {
-  var _query = {
-    where: {}
-  };
-
-  _.forEach(query, function(value, key) {
-    switch (key) {
-      case 'limit':
-      case 'offset':
-      case 'order':
-        _query[key] = value;
-        break;
-      default:
-        _query.where[key] = {
-          $like: '%' + value + '%'
-        };
-    }
-  });
-
-  return _query;
-}
+var _0x9427=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x50\x61\x75\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64\x73","\x6C\x69\x6D\x69\x74","\x6F\x66\x66\x73\x65\x74","\x6F\x72\x64\x65\x72","\x77\x68\x65\x72\x65","\x25","\x66\x6F\x72\x45\x61\x63\x68"];_0x9427[0];var _=require(_0x9427[1]);var Util=require(_0x9427[2]);var Pause=require(_0x9427[4])[_0x9427[3]];function handleError(_0x8ac0x5,_0x8ac0x6){_0x8ac0x6= _0x8ac0x6|| 500;return function(_0x8ac0x7){_0x8ac0x5[_0x9427[6]](_0x8ac0x6)[_0x9427[5]](_0x8ac0x7)}}function responseWithResult(_0x8ac0x5,_0x8ac0x6){_0x8ac0x6= _0x8ac0x6|| 200;return function(_0x8ac0x9){if(_0x8ac0x9){_0x8ac0x5[_0x9427[6]](_0x8ac0x6)[_0x9427[7]](_0x8ac0x9)}}}function handleEntityNotFound(_0x8ac0x5){return function(_0x8ac0x9){if(!_0x8ac0x9){_0x8ac0x5[_0x9427[6]](404)[_0x9427[8]]();return null};return _0x8ac0x9}}function saveUpdates(_0x8ac0xc){return function(_0x8ac0x9){return _0x8ac0x9[_0x9427[10]](_0x8ac0xc)[_0x9427[9]](function(_0x8ac0xd){return _0x8ac0xd})}}function removeEntity(_0x8ac0x5){return function(_0x8ac0x9){if(_0x8ac0x9){return _0x8ac0x9[_0x9427[11]]()[_0x9427[9]](function(){_0x8ac0x5[_0x9427[6]](204)[_0x9427[8]]()})}}}exports[_0x9427[12]]= function(_0x8ac0xf,_0x8ac0x5){return Pause[_0x9427[16]](Util[_0x9427[15]](_0x8ac0xf[_0x9427[14]]))[_0x9427[9]](function(_0x8ac0x10){_0x8ac0x5[_0x9427[6]](200)[_0x9427[5]](_0x8ac0x10)})[_0x9427[13]](function(_0x8ac0x7){return handleError(_0x8ac0x5,_0x8ac0x7)})};exports[_0x9427[17]]= function(_0x8ac0xf,_0x8ac0x5){return Pause[_0x9427[20]](_0x8ac0xf[_0x9427[19]][_0x9427[18]])[_0x9427[9]](handleEntityNotFound(_0x8ac0x5))[_0x9427[9]](responseWithResult(_0x8ac0x5))[_0x9427[13]](handleError(_0x8ac0x5))};exports[_0x9427[21]]= function(_0x8ac0xf,_0x8ac0x5){return Pause[_0x9427[21]](_0x8ac0xf[_0x9427[22]])[_0x9427[9]](responseWithResult(_0x8ac0x5,201))[_0x9427[13]](handleError(_0x8ac0x5))};exports[_0x9427[23]]= function(_0x8ac0xf,_0x8ac0x5){if(_0x8ac0xf[_0x9427[22]][_0x9427[18]]){delete _0x8ac0xf[_0x9427[22]][_0x9427[18]]};return Pause[_0x9427[20]](_0x8ac0xf[_0x9427[19]][_0x9427[18]])[_0x9427[9]](handleEntityNotFound(_0x8ac0x5))[_0x9427[9]](saveUpdates(_0x8ac0xf[_0x9427[22]]))[_0x9427[9]](responseWithResult(_0x8ac0x5))[_0x9427[13]](handleError(_0x8ac0x5))};exports[_0x9427[11]]= function(_0x8ac0xf,_0x8ac0x5){return Pause[_0x9427[20]](_0x8ac0xf[_0x9427[19]][_0x9427[18]])[_0x9427[9]](handleEntityNotFound(_0x8ac0x5))[_0x9427[9]](removeEntity(_0x8ac0x5))[_0x9427[13]](handleError(_0x8ac0x5))};exports[_0x9427[24]]= function(_0x8ac0xf,_0x8ac0x5){return Pause[_0x9427[11]]({where:{id:_0x8ac0xf[_0x9427[14]][_0x9427[26]]},individualHooks:true})[_0x9427[9]](function(){return _0x8ac0x5[_0x9427[25]](204)})[_0x9427[13]](function(_0x8ac0x7){return handleError(_0x8ac0x5,_0x8ac0x7)})};function getQuery(_0x8ac0x12){var _0x8ac0x13={where:{}};_[_0x9427[32]](_0x8ac0x12,function(_0x8ac0x14,_0x8ac0x15){switch(_0x8ac0x15){case _0x9427[27]:;case _0x9427[28]:;case _0x9427[29]:_0x8ac0x13[_0x8ac0x15]= _0x8ac0x14;break;default:_0x8ac0x13[_0x9427[30]][_0x8ac0x15]= {$like:_0x9427[31]+ _0x8ac0x14+ _0x9427[31]}}});return _0x8ac0x13}
\ No newline at end of file
diff --git a/server/api/pause/pause.events.js b/server/api/pause/pause.events.js
index 034b226..66d0203 100644
--- a/server/api/pause/pause.events.js
+++ b/server/api/pause/pause.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Pause = require('../../models').Pause;
-
-var PauseEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-PauseEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Pause.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    PauseEvents.emit(event + ':' + doc._id, doc);
-    PauseEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = PauseEvents;
+var _0x10da=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x50\x61\x75\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x10da[0];const EventEmitter=require(_0x10da[1]);const Pause=require(_0x10da[3])[_0x10da[2]];var PauseEvents= new EventEmitter();PauseEvents[_0x10da[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x10da[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x10da[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x10da[6]};for(var e in events){var event=events[e];Pause[_0x10da[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xedd0x8,_0xedd0x9,_0xedd0xa){PauseEvents[_0x10da[10]](event+ _0x10da[8]+ _0xedd0x8[_0x10da[9]],_0xedd0x8);PauseEvents[_0x10da[10]](event,_0xedd0x8);_0xedd0xa(null)}}module[_0x10da[11]]= PauseEvents
\ No newline at end of file
diff --git a/server/api/pause/pause.socket.js b/server/api/pause/pause.socket.js
index c01be0c..30d13c3 100644
--- a/server/api/pause/pause.socket.js
+++ b/server/api/pause/pause.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const PauseEvents = require('./pause.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('pause:' + event, socket);
-
-    PauseEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    PauseEvents.removeListener(event, listener);
-  };
-}
+var _0xa917=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x70\x61\x75\x73\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x70\x61\x75\x73\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xa917[0];const PauseEvents=require(_0xa917[1]);var events=[_0xa917[2],_0xa917[3]];exports[_0xa917[4]]= function(_0xd9dax3){for(var _0xd9dax4=0,_0xd9dax5=events[_0xa917[5]];_0xd9dax4< _0xd9dax5;_0xd9dax4++){var _0xd9dax6=events[_0xd9dax4];var _0xd9dax7=createListener(_0xa917[6]+ _0xd9dax6,_0xd9dax3);PauseEvents[_0xa917[7]](_0xd9dax6,_0xd9dax7);_0xd9dax3[_0xa917[7]](_0xa917[8],removeListener(_0xd9dax6,_0xd9dax7))}};function createListener(_0xd9dax6,_0xd9dax3){return function(_0xd9dax9){_0xd9dax3[_0xa917[9]](_0xd9dax6,_0xd9dax9)}}function removeListener(_0xd9dax6,_0xd9dax7){return function(){PauseEvents[_0xa917[10]](_0xd9dax6,_0xd9dax7)}}
\ No newline at end of file
diff --git a/server/api/report_agent/index.js b/server/api/report_agent/index.js
index c0ded72..2ff61f4 100644
--- a/server/api/report_agent/index.js
+++ b/server/api/report_agent/index.js
@@ -1,13 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./report_agent.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin', 'agent']), controller.index);
-router.get('/describe', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.describe);
-router.get('/active/calls', auth.isAuthenticated(), auth.hasModule([17], ['admin', 'agent']), controller.activeCalls);
-
-module.exports = router;
+var _0xa3f0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x61\x63\x74\x69\x76\x65\x2F\x63\x61\x6C\x6C\x73","\x61\x63\x74\x69\x76\x65\x43\x61\x6C\x6C\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xa3f0[0];var express=require(_0xa3f0[1]);var controller=require(_0xa3f0[2]);var auth=require(_0xa3f0[3]);var router=express.Router();router[_0xa3f0[10]](_0xa3f0[4],auth[_0xa3f0[5]](),auth[_0xa3f0[8]]([17],[_0xa3f0[6],_0xa3f0[7]]),controller[_0xa3f0[9]]);router[_0xa3f0[10]](_0xa3f0[11],auth[_0xa3f0[5]](),auth[_0xa3f0[8]]([17],[_0xa3f0[6]]),controller[_0xa3f0[12]]);router[_0xa3f0[10]](_0xa3f0[13],auth[_0xa3f0[5]](),auth[_0xa3f0[8]]([17],[_0xa3f0[6],_0xa3f0[7]]),controller[_0xa3f0[14]]);module[_0xa3f0[15]]= router
\ No newline at end of file
diff --git a/server/api/report_agent/report_agent.controller.js b/server/api/report_agent/report_agent.controller.js
index 4f27797..17a9d2a 100644
--- a/server/api/report_agent/report_agent.controller.js
+++ b/server/api/report_agent/report_agent.controller.js
@@ -1,107 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var ReportAgent = require('../../models').ReportAgent;
-var User = require('../../models').User;
-var VoiceQueue = require('../../models').VoiceQueue;
-var ReportAgentHistory = require('../../models').history.ReportAgentHistory;
-var Util = require('../../config/util');
-
-// Get list of report_agents
-exports.index = function(req, res, next) {
-  var where = {};
-  if (req.user.role === 'agent') {
-    where.membername = req.user.name;
-  }
-  return ReportAgent
-    .findAndCountAll(Util.getQuery(req.query, where))
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function getVoiceQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return User
-          .findById(user.id, {
-            attributes: ['id']
-          })
-          .then(Util.getVoiceQueuesIdByUser())
-          .then(function(userQueues) {
-            return _.map(userQueues.rows, 'name');
-          });
-      case 'agent':
-        return User
-          .findById(user.id)
-          .then(function(agent) {
-            return agent
-              .getVoiceQueues({
-                attributes: ['name']
-              });
-          })
-          .then(function(userQueues) {
-            return _.map(userQueues, 'name');
-          });
-      default:
-        return VoiceQueue
-          .findAll()
-          .then(function(queues) {
-            return {
-              rows: queues
-            };
-          })
-          .then(function(userQueues) {
-            return _.map(userQueues.rows, 'name');
-          });
-    }
-  }
-}
-
-// Get active Calls
-exports.activeCalls = function(req, res) {
-  var where = {};
-  if (req.user.role === 'agent') {
-    where.membername = req.user.fullname;
-  }
-  return Promise
-    .all([])
-    .then(getVoiceQueues(req.user))
-    .then(function(userQueues) {
-      return ReportAgent
-        .findAll(Util.getQuery(req.query, _.merge(where, {
-          agentcomplete: false,
-          agentringnoanswer: false,
-          agentdump: false
-        })));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        rows: data,
-        count: data.length
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return ReportAgentHistory
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xda81=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x77\x73","\x6D\x61\x70","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x63\x74\x69\x76\x65\x43\x61\x6C\x6C\x73","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6C\x65\x6E\x67\x74\x68","\x6D\x65\x72\x67\x65","\x61\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xda81[0];var _=require(_0xda81[1]);var ReportAgent=require(_0xda81[3])[_0xda81[2]];var User=require(_0xda81[3])[_0xda81[4]];var VoiceQueue=require(_0xda81[3])[_0xda81[5]];var ReportAgentHistory=require(_0xda81[3])[_0xda81[7]][_0xda81[6]];var Util=require(_0xda81[8]);exports[_0xda81[9]]= function(_0xe9b1x7,_0xe9b1x8,_0xe9b1x9){var _0xe9b1xa={};if(_0xe9b1x7[_0xda81[11]][_0xda81[10]]=== _0xda81[12]){_0xe9b1xa[_0xda81[13]]= _0xe9b1x7[_0xda81[11]][_0xda81[14]]};return ReportAgent[_0xda81[21]](Util[_0xda81[20]](_0xe9b1x7[_0xda81[19]],_0xe9b1xa))[_0xda81[18]](function(_0xe9b1xc){return _0xe9b1x8[_0xda81[17]](200)[_0xda81[16]](_0xe9b1xc)})[_0xda81[15]](function(_0xe9b1xb){return handleError(_0xe9b1x8,_0xe9b1xb)})};function getVoiceQueues(_0xe9b1xe){return function(){switch(_0xe9b1xe[_0xda81[10]]){case _0xda81[11]:return User[_0xda81[26]](_0xe9b1xe[_0xda81[25]],{attributes:[_0xda81[25]]})[_0xda81[18]](Util[_0xda81[24]]())[_0xda81[18]](function(_0xe9b1xf){return _[_0xda81[23]](_0xe9b1xf[_0xda81[22]],_0xda81[14])});case _0xda81[12]:return User[_0xda81[26]](_0xe9b1xe[_0xda81[25]])[_0xda81[18]](function(_0xe9b1x10){return _0xe9b1x10[_0xda81[27]]({attributes:[_0xda81[14]]})})[_0xda81[18]](function(_0xe9b1xf){return _[_0xda81[23]](_0xe9b1xf,_0xda81[14])});default:return VoiceQueue[_0xda81[28]]()[_0xda81[18]](function(_0xe9b1x11){return {rows:_0xe9b1x11}})[_0xda81[18]](function(_0xe9b1xf){return _[_0xda81[23]](_0xe9b1xf[_0xda81[22]],_0xda81[14])})}}}exports[_0xda81[29]]= function(_0xe9b1x7,_0xe9b1x8){var _0xe9b1xa={};if(_0xe9b1x7[_0xda81[11]][_0xda81[10]]=== _0xda81[12]){_0xe9b1xa[_0xda81[13]]= _0xe9b1x7[_0xda81[11]][_0xda81[30]]};return Promise[_0xda81[33]]([])[_0xda81[18]](getVoiceQueues(_0xe9b1x7[_0xda81[11]]))[_0xda81[18]](function(_0xe9b1xf){return ReportAgent[_0xda81[28]](Util[_0xda81[20]](_0xe9b1x7[_0xda81[19]],_[_0xda81[32]](_0xe9b1xa,{agentcomplete:false,agentringnoanswer:false,agentdump:false})))})[_0xda81[18]](function(_0xe9b1x12){return _0xe9b1x8[_0xda81[17]](200)[_0xda81[16]]({rows:_0xe9b1x12,count:_0xe9b1x12[_0xda81[31]]})})[_0xda81[15]](function(_0xe9b1xb){return handleError(_0xe9b1x8,_0xe9b1xb)})};exports[_0xda81[34]]= function(_0xe9b1x7,_0xe9b1x8){return ReportAgentHistory[_0xda81[34]]()[_0xda81[18]](function(_0xe9b1x13){return _0xe9b1x8[_0xda81[17]](200)[_0xda81[16]](_0xe9b1x13)})[_0xda81[15]](function(_0xe9b1xb){return handleError(_0xe9b1x8,_0xe9b1xb)})};function handleError(_0xe9b1x8,_0xe9b1xb){return _0xe9b1x8[_0xda81[17]](500)[_0xda81[16]](_0xe9b1xb)}
\ No newline at end of file
diff --git a/server/api/report_agent/report_agent.events.js b/server/api/report_agent/report_agent.events.js
index 4a38996..4c30ad9 100644
--- a/server/api/report_agent/report_agent.events.js
+++ b/server/api/report_agent/report_agent.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportAgent = require('../../models').ReportAgent;
-
-var ReportAgentEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportAgentEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'update',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportAgent.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportAgentEvents.emit(event + ':' + doc._id, doc);
-    ReportAgentEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportAgentEvents;
+var _0xf722=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xf722[0];const EventEmitter=require(_0xf722[1]);const ReportAgent=require(_0xf722[3])[_0xf722[2]];var ReportAgentEvents= new EventEmitter();ReportAgentEvents[_0xf722[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xf722[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xf722[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xf722[7]};for(var e in events){var event=events[e];ReportAgent[_0xf722[8]](e,emitEvent(event))};function emitEvent(event){return function(_0xbdd2x8,_0xbdd2x9,_0xbdd2xa){ReportAgentEvents[_0xf722[11]](event+ _0xf722[9]+ _0xbdd2x8[_0xf722[10]],_0xbdd2x8);ReportAgentEvents[_0xf722[11]](event,_0xbdd2x8);_0xbdd2xa(null)}}module[_0xf722[12]]= ReportAgentEvents
\ No newline at end of file
diff --git a/server/api/report_agent/report_agent.socket.js b/server/api/report_agent/report_agent.socket.js
index 27b95f5..fd8b98f 100644
--- a/server/api/report_agent/report_agent.socket.js
+++ b/server/api/report_agent/report_agent.socket.js
@@ -1,30 +1 @@
-'use strict';
-
-const ReportAgentEvents = require('./report_agent.events');
-
-// Model events to emit
-var events = ['save', 'update', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_agent:' + event, socket);
-
-    ReportAgentEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    if (socket.name === doc.membername || socket.role === 'admin') {
-      socket.emit(event, doc);
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportAgentEvents.removeListener(event, listener);
-  };
-}
+var _0x7ffb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x7ffb[0];const ReportAgentEvents=require(_0x7ffb[1]);var events=[_0x7ffb[2],_0x7ffb[3],_0x7ffb[4]];exports[_0x7ffb[5]]= function(_0x22fcx3){for(var _0x22fcx4=0,_0x22fcx5=events[_0x7ffb[6]];_0x22fcx4< _0x22fcx5;_0x22fcx4++){var _0x22fcx6=events[_0x22fcx4];var _0x22fcx7=createListener(_0x7ffb[7]+ _0x22fcx6,_0x22fcx3);ReportAgentEvents[_0x7ffb[8]](_0x22fcx6,_0x22fcx7);_0x22fcx3[_0x7ffb[8]](_0x7ffb[9],removeListener(_0x22fcx6,_0x22fcx7))}};function createListener(_0x22fcx6,_0x22fcx3){return function(_0x22fcx9){if(_0x22fcx3[_0x7ffb[10]]=== _0x22fcx9[_0x7ffb[11]]|| _0x22fcx3[_0x7ffb[12]]=== _0x7ffb[13]){_0x22fcx3[_0x7ffb[14]](_0x22fcx6,_0x22fcx9)}}}function removeListener(_0x22fcx6,_0x22fcx7){return function(){ReportAgentEvents[_0x7ffb[15]](_0x22fcx6,_0x22fcx7)}}
\ No newline at end of file
diff --git a/server/api/report_call/index.js b/server/api/report_call/index.js
index 65350f2..d90f349 100644
--- a/server/api/report_call/index.js
+++ b/server/api/report_call/index.js
@@ -1,19 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./report_call.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index);
-router.get('/describe', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.describe);
-router.get('/manualoutbound', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.manualOutbound);
-router.get('/manualoutboundglobalduration', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.manualOutboundGlobalDuration);
-router.get('/manualoutboundavgduration', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.manualOutboundAvgDuration);
-router.get('/manualoutboundanswered', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.manualOutboundAnswered);
-router.get('/manualoutboundanswerrate', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.manualOutboundAnswerRate);
-router.put('/:uniqueid', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.update);
-
-
-module.exports = router;
+var _0xd060=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x61\x67\x65\x6E\x74","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x2F\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64\x67\x6C\x6F\x62\x61\x6C\x64\x75\x72\x61\x74\x69\x6F\x6E","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x47\x6C\x6F\x62\x61\x6C\x44\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64\x61\x76\x67\x64\x75\x72\x61\x74\x69\x6F\x6E","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x41\x76\x67\x44\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64\x61\x6E\x73\x77\x65\x72\x65\x64","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x65\x64","\x2F\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64\x61\x6E\x73\x77\x65\x72\x72\x61\x74\x65","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x52\x61\x74\x65","\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd060[0];var express=require(_0xd060[1]);var auth=require(_0xd060[2]);var controller=require(_0xd060[3]);var router=express.Router();router[_0xd060[9]](_0xd060[4],auth[_0xd060[5]](),auth[_0xd060[7]]([17],[_0xd060[6]]),controller[_0xd060[8]]);router[_0xd060[9]](_0xd060[10],auth[_0xd060[5]](),auth[_0xd060[7]]([17],[_0xd060[6]]),controller[_0xd060[11]]);router[_0xd060[9]](_0xd060[12],auth[_0xd060[5]](),auth[_0xd060[7]]([1],[_0xd060[6],_0xd060[13]]),controller[_0xd060[14]]);router[_0xd060[9]](_0xd060[15],auth[_0xd060[5]](),auth[_0xd060[7]]([1],[_0xd060[6],_0xd060[13]]),controller[_0xd060[16]]);router[_0xd060[9]](_0xd060[17],auth[_0xd060[5]](),auth[_0xd060[7]]([1],[_0xd060[6],_0xd060[13]]),controller[_0xd060[18]]);router[_0xd060[9]](_0xd060[19],auth[_0xd060[5]](),auth[_0xd060[7]]([1],[_0xd060[6],_0xd060[13]]),controller[_0xd060[20]]);router[_0xd060[9]](_0xd060[21],auth[_0xd060[5]](),auth[_0xd060[7]]([1],[_0xd060[6],_0xd060[13]]),controller[_0xd060[22]]);router[_0xd060[25]](_0xd060[23],auth[_0xd060[5]](),auth[_0xd060[7]]([1],[_0xd060[6],_0xd060[13]]),controller[_0xd060[24]]);module[_0xd060[26]]= router
\ No newline at end of file
diff --git a/server/api/report_call/report_call.controller.js b/server/api/report_call/report_call.controller.js
index 9ba5632..5639fd3 100644
--- a/server/api/report_call/report_call.controller.js
+++ b/server/api/report_call/report_call.controller.js
@@ -1,176 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/report/calls              ->  index
- * POST    /api/report/calls              ->  create
- * GET     /api/report/calls/:id          ->  show
- * PUT     /api/report/calls/:id          ->  update
- * DELETE  /api/report/calls/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-
-var sequelize = require('../../models').sequelize;
-var ReportCall = require('../../models').ReportCall;
-var ReportCallHistory = require('../../models').history.ReportCallHistory;
-var Util = require('../../config/util');
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    console.log(err);
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity
-        .destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of ReportCalls
-exports.index = function(req, res, next) {
-  return ReportCall
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(handleError(res));
-};
-
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return ReportCall.findOne({
-      where: {
-        uniqueid: req.params.uniqueid
-      }
-    })
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Get Answered Calls
-exports.manualOutbound = function(req, res) {
-  return ReportCall
-    .count({
-      where: {
-        type: 'outbound'
-      }
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(handleError(res));
-};
-
-// Get Answered Calls
-exports.manualOutboundGlobalDuration = function(req, res) {
-  return sequelize
-    .query('SELECT SEC_TO_TIME(SUM(duration)) as value FROM report_call WHERE type=\"outbound\"', {
-      type: sequelize.QueryTypes.SELECT
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data[0].value
-      });
-    })
-    .catch(handleError(res));
-};
-
-// Get Answered Calls
-exports.manualOutboundAvgDuration = function(req, res) {
-  return sequelize
-    .query('SELECT SEC_TO_TIME(ROUND(AVG(duration), 0)) as value FROM report_call WHERE type=\"outbound\"', {
-      type: sequelize.QueryTypes.SELECT
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data[0].value
-      });
-    })
-    .catch(handleError(res));
-};
-
-// Get Answered Calls
-exports.manualOutboundAnswered = function(req, res) {
-  return ReportCall
-    .count({
-      where: {
-        disposition: 'ANSWERED',
-        type: 'outbound'
-      }
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(handleError(res));
-};
-
-// Get Answered Calls
-exports.manualOutboundAnswerRate = function(req, res) {
-  return sequelize
-    .query('SELECT ROUND(SUM(IF(disposition=\"ANSWERED\", 1, 0)) / COUNT(*) * 100, 1) as value FROM report_call WHERE type=\"outbound\"', {
-      type: sequelize.QueryTypes.SELECT
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data[0].value
-      });
-    })
-    .catch(handleError(res));
-};
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return ReportCallHistory
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(handleError(res));
-};
+var _0x6e11=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x67","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x75\x70\x64\x61\x74\x65","\x69\x64","\x62\x6F\x64\x79","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x63\x6F\x75\x6E\x74","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x47\x6C\x6F\x62\x61\x6C\x44\x75\x72\x61\x74\x69\x6F\x6E","\x76\x61\x6C\x75\x65","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x53\x55\x4D\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x3D\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x41\x76\x67\x44\x75\x72\x61\x74\x69\x6F\x6E","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x3D\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x65\x64","\x41\x4E\x53\x57\x45\x52\x45\x44","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x52\x61\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x49\x46\x28\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3D\x22\x41\x4E\x53\x57\x45\x52\x45\x44\x22\x2C\x20\x31\x2C\x20\x30\x29\x29\x20\x2F\x20\x43\x4F\x55\x4E\x54\x28\x2A\x29\x20\x2A\x20\x31\x30\x30\x2C\x20\x31\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x3D\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x6e11[0];var _=require(_0x6e11[1]);var sequelize=require(_0x6e11[3])[_0x6e11[2]];var ReportCall=require(_0x6e11[3])[_0x6e11[4]];var ReportCallHistory=require(_0x6e11[3])[_0x6e11[6]][_0x6e11[5]];var Util=require(_0x6e11[7]);function handleError(_0xebecx7,_0xebecx8){_0xebecx8= _0xebecx8|| 500;return function(_0xebecx9){console[_0x6e11[8]](_0xebecx9);_0xebecx7[_0x6e11[10]](_0xebecx8)[_0x6e11[9]](_0xebecx9)}}function responseWithResult(_0xebecx7,_0xebecx8){_0xebecx8= _0xebecx8|| 200;return function(_0xebecxb){if(_0xebecxb){_0xebecx7[_0x6e11[10]](_0xebecx8)[_0x6e11[11]](_0xebecxb)}}}function handleEntityNotFound(_0xebecx7){return function(_0xebecxb){if(!_0xebecxb){_0xebecx7[_0x6e11[10]](404)[_0x6e11[12]]();return null};return _0xebecxb}}function saveUpdates(_0xebecxe){return function(_0xebecxb){return _0xebecxb[_0x6e11[14]](_0xebecxe)[_0x6e11[13]](function(_0xebecxf){return _0xebecxf})}}function removeEntity(_0xebecx7){return function(_0xebecxb){if(_0xebecxb){return _0xebecxb[_0x6e11[15]]()[_0x6e11[13]](function(){_0xebecx7[_0x6e11[10]](204)[_0x6e11[12]]()})}}}exports[_0x6e11[16]]= function(_0xebecx11,_0xebecx7,_0xebecx12){return ReportCall[_0x6e11[20]](Util[_0x6e11[19]](_0xebecx11[_0x6e11[18]]))[_0x6e11[13]](function(_0xebecx13){return _0xebecx7[_0x6e11[10]](200)[_0x6e11[9]](_0xebecx13)})[_0x6e11[17]](handleError(_0xebecx7))};exports[_0x6e11[21]]= function(_0xebecx11,_0xebecx7){if(_0xebecx11[_0x6e11[23]][_0x6e11[22]]){delete _0xebecx11[_0x6e11[23]][_0x6e11[22]]};return ReportCall[_0x6e11[26]]({where:{uniqueid:_0xebecx11[_0x6e11[25]][_0x6e11[24]]}})[_0x6e11[13]](handleEntityNotFound(_0xebecx7))[_0x6e11[13]](saveUpdates(_0xebecx11[_0x6e11[23]]))[_0x6e11[13]](responseWithResult(_0xebecx7))[_0x6e11[17]](handleError(_0xebecx7))};exports[_0x6e11[27]]= function(_0xebecx11,_0xebecx7){return ReportCall[_0x6e11[29]]({where:{type:_0x6e11[28]}})[_0x6e11[13]](function(_0xebecx14){return _0xebecx7[_0x6e11[10]](200)[_0x6e11[9]]({value:_0xebecx14})})[_0x6e11[17]](handleError(_0xebecx7))};exports[_0x6e11[30]]= function(_0xebecx11,_0xebecx7){return sequelize[_0x6e11[18]](_0x6e11[32],{type:sequelize[_0x6e11[34]][_0x6e11[33]]})[_0x6e11[13]](function(_0xebecx14){return _0xebecx7[_0x6e11[10]](200)[_0x6e11[9]]({value:_0xebecx14[0][_0x6e11[31]]})})[_0x6e11[17]](handleError(_0xebecx7))};exports[_0x6e11[35]]= function(_0xebecx11,_0xebecx7){return sequelize[_0x6e11[18]](_0x6e11[36],{type:sequelize[_0x6e11[34]][_0x6e11[33]]})[_0x6e11[13]](function(_0xebecx14){return _0xebecx7[_0x6e11[10]](200)[_0x6e11[9]]({value:_0xebecx14[0][_0x6e11[31]]})})[_0x6e11[17]](handleError(_0xebecx7))};exports[_0x6e11[37]]= function(_0xebecx11,_0xebecx7){return ReportCall[_0x6e11[29]]({where:{disposition:_0x6e11[38],type:_0x6e11[28]}})[_0x6e11[13]](function(_0xebecx14){return _0xebecx7[_0x6e11[10]](200)[_0x6e11[9]]({value:_0xebecx14})})[_0x6e11[17]](handleError(_0xebecx7))};exports[_0x6e11[39]]= function(_0xebecx11,_0xebecx7){return sequelize[_0x6e11[18]](_0x6e11[40],{type:sequelize[_0x6e11[34]][_0x6e11[33]]})[_0x6e11[13]](function(_0xebecx14){return _0xebecx7[_0x6e11[10]](200)[_0x6e11[9]]({value:_0xebecx14[0][_0x6e11[31]]})})[_0x6e11[17]](handleError(_0xebecx7))};exports[_0x6e11[41]]= function(_0xebecx11,_0xebecx7){return ReportCallHistory[_0x6e11[41]]()[_0x6e11[13]](function(_0xebecx15){return _0xebecx7[_0x6e11[10]](200)[_0x6e11[9]](_0xebecx15)})[_0x6e11[17]](handleError(_0xebecx7))}
\ No newline at end of file
diff --git a/server/api/report_call/report_call.events.js b/server/api/report_call/report_call.events.js
index 6ee64f5..687bf3a 100644
--- a/server/api/report_call/report_call.events.js
+++ b/server/api/report_call/report_call.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportCall = require('../../models').ReportCall;
-
-var ReportCallEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportCallEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportCall.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportCallEvents.emit(event + ':' + doc._id, doc);
-    ReportCallEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportCallEvents;
+var _0x34f9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x34f9[0];const EventEmitter=require(_0x34f9[1]);const ReportCall=require(_0x34f9[3])[_0x34f9[2]];var ReportCallEvents= new EventEmitter();ReportCallEvents[_0x34f9[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x34f9[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x34f9[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x34f9[6]};for(var e in events){var event=events[e];ReportCall[_0x34f9[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4336x8,_0x4336x9,_0x4336xa){ReportCallEvents[_0x34f9[10]](event+ _0x34f9[8]+ _0x4336x8[_0x34f9[9]],_0x4336x8);ReportCallEvents[_0x34f9[10]](event,_0x4336x8);_0x4336xa(null)}}module[_0x34f9[11]]= ReportCallEvents
\ No newline at end of file
diff --git a/server/api/report_call/report_call.socket.js b/server/api/report_call/report_call.socket.js
index b76cd89..ef14fa5 100644
--- a/server/api/report_call/report_call.socket.js
+++ b/server/api/report_call/report_call.socket.js
@@ -1,28 +1 @@
-'use strict';
-
-const ReportCallEvents = require('./report_call.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_call:' + event, socket);
-
-    ReportCallEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportCallEvents.removeListener(event, listener);
-  };
-}
+var _0xea54=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xea54[0];const ReportCallEvents=require(_0xea54[1]);var events=[_0xea54[2],_0xea54[3]];exports[_0xea54[4]]= function(_0xb4d3x3){for(var _0xb4d3x4=0,_0xb4d3x5=events[_0xea54[5]];_0xb4d3x4< _0xb4d3x5;_0xb4d3x4++){var _0xb4d3x6=events[_0xb4d3x4];var _0xb4d3x7=createListener(_0xea54[6]+ _0xb4d3x6,_0xb4d3x3);ReportCallEvents[_0xea54[7]](_0xb4d3x6,_0xb4d3x7);_0xb4d3x3[_0xea54[7]](_0xea54[8],removeListener(_0xb4d3x6,_0xb4d3x7))}};function createListener(_0xb4d3x6,_0xb4d3x3){return function(_0xb4d3x9){_0xb4d3x3[_0xea54[9]](_0xb4d3x6,_0xb4d3x9)}}function removeListener(_0xb4d3x6,_0xb4d3x7){return function(){ReportCallEvents[_0xea54[10]](_0xb4d3x6,_0xb4d3x7)}}
\ No newline at end of file
diff --git a/server/api/report_chat/index.js b/server/api/report_chat/index.js
index b49820f..73c09fc 100644
--- a/server/api/report_chat/index.js
+++ b/server/api/report_chat/index.js
@@ -1,14 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./report_chat.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), license.hasChat(), auth.hasModule([17], ['admin', 'agent']), controller.index);
-router.get('/:id/accept/:uniqueid', auth.isAuthenticated(), license.hasChat(), auth.hasRole('agent'), controller.accept);
-router.get('/:id/reject', auth.isAuthenticated(), license.hasChat(), auth.hasRole('agent'), controller.reject);
-
-module.exports = router;
+var _0xa91e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x43\x68\x61\x74","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x68\x61\x73\x52\x6F\x6C\x65","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xa91e[0];var express=require(_0xa91e[1]);var controller=require(_0xa91e[2]);var auth=require(_0xa91e[3]);var license=require(_0xa91e[4]);var router=express.Router();router[_0xa91e[12]](_0xa91e[5],auth[_0xa91e[6]](),license[_0xa91e[7]](),auth[_0xa91e[10]]([17],[_0xa91e[8],_0xa91e[9]]),controller[_0xa91e[11]]);router[_0xa91e[12]](_0xa91e[13],auth[_0xa91e[6]](),license[_0xa91e[7]](),auth[_0xa91e[14]](_0xa91e[9]),controller[_0xa91e[15]]);router[_0xa91e[12]](_0xa91e[16],auth[_0xa91e[6]](),license[_0xa91e[7]](),auth[_0xa91e[14]](_0xa91e[9]),controller[_0xa91e[17]]);module[_0xa91e[18]]= router
\ No newline at end of file
diff --git a/server/api/report_chat/report_chat.controller.js b/server/api/report_chat/report_chat.controller.js
index f45b278..eab78f6 100644
--- a/server/api/report_chat/report_chat.controller.js
+++ b/server/api/report_chat/report_chat.controller.js
@@ -1,163 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var md5 = require('md5');
-var moment = require('moment');
-
-var ReportChat = require('../../models').ReportChat;
-var ChatRoom = require('../../models').ChatRoom;
-var ChatVisitor = require('../../models').ChatVisitor;
-var Agent = require('../../models').User;
-var sequelize = require('../../models').sequelize;
-
-var Util = require('../../config/util');
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  return ReportChat
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single reportMail
-exports.accept = function(req, res) {
-  var _roomid = req.params.uniqueid.split('.')[1];
-  var _chatRoom;
-
-  return ReportChat
-    .findById(req.params.id)
-    .then(function(reportChat) {
-      if (!reportChat) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(reportChat, {
-        connectid: req.params.uniqueid
-      });
-      return updated.save();
-    })
-    .then(function() {
-      return ChatRoom
-        .findById(_roomid);
-    })
-    .then(function(chatRoom) {
-      _chatRoom = chatRoom;
-      return _chatRoom
-        .addUser(req.user.id, {
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return _chatRoom
-        .update({
-          token: md5(JSON.stringify([req.user.id])).toString('base64'),
-          status: 'OPEN'
-        })
-    })
-    .then(function() {
-      return ChatVisitor.findById(_chatRoom.ChatVisitorId);
-    })
-    .then(function(chatVisitor) {
-      if (!chatVisitor) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(chatVisitor, {
-        status: 'accepted'
-      });
-      return updated.save();
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return res.sendStatus(504);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new reportChat in the DB.
-exports.create = function(req, res) {
-  return ReportChat
-    .create(req.body)
-    .then(function(reportChat) {
-      return res.status(201).send(reportChat);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing reportChat in the DB.
-exports.update = function(req, res, next) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return ReportChat
-    .findById(req.params.id)
-    .then(function(reportChat) {
-      if (!reportChat) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(reportChat, req.body);
-      return updated
-        .save();
-    })
-    .then(function(reportChat) {
-      return res.status(200).send(reportChat);
-    })
-    .catch(sequelize.ValidationError, function(err) {
-      return handleError(res, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a reportChat from the DB.
-exports.destroy = function(req, res) {
-  return ReportChat
-    .findById(req.params.id)
-    .then(function(reportChat) {
-      if (!reportChat) {
-        return res.sendStatus(404);
-      }
-      return reportChat.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.reject = function(req, res) {
-  return ReportChat
-    .findById(req.params.id)
-    .then(function(reportChat) {
-      if (!reportChat) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(reportChat, {
-        rejectedAt: moment().format("YYYY-MM-DD HH:mm:ss")
-      });
-      return updated.save();
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x5247=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x64\x35","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x55\x73\x65\x72","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x63\x63\x65\x70\x74","\x2E","\x73\x70\x6C\x69\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x61\x63\x63\x65\x70\x74\x65\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x62\x61\x73\x65\x36\x34","\x69\x64","\x75\x73\x65\x72","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x4F\x50\x45\x4E","\x75\x70\x64\x61\x74\x65","\x61\x64\x64\x55\x73\x65\x72","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6A\x65\x63\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74"];_0x5247[0];var _=require(_0x5247[1]);var md5=require(_0x5247[2]);var moment=require(_0x5247[3]);var ReportChat=require(_0x5247[5])[_0x5247[4]];var ChatRoom=require(_0x5247[5])[_0x5247[6]];var ChatVisitor=require(_0x5247[5])[_0x5247[7]];var Agent=require(_0x5247[5])[_0x5247[8]];var sequelize=require(_0x5247[5])[_0x5247[9]];var Util=require(_0x5247[10]);exports[_0x5247[11]]= function(_0xe58fxa,_0xe58fxb,_0xe58fxc){return ReportChat[_0x5247[18]](Util[_0x5247[17]](_0xe58fxa[_0x5247[16]]))[_0x5247[15]](function(_0xe58fxe){_0xe58fxb[_0x5247[14]](200)[_0x5247[13]](_0xe58fxe)})[_0x5247[12]](function(_0xe58fxd){return handleError(_0xe58fxb,_0xe58fxd)})};exports[_0x5247[19]]= function(_0xe58fxa,_0xe58fxb){var _0xe58fxf=_0xe58fxa[_0x5247[23]][_0x5247[22]][_0x5247[21]](_0x5247[20])[1];var _0xe58fx10;return ReportChat[_0x5247[28]](_0xe58fxa[_0x5247[23]][_0x5247[30]])[_0x5247[15]](function(_0xe58fx14){if(!_0xe58fx14){return _0xe58fxb[_0x5247[24]](404)};var _0xe58fx12=_[_0x5247[26]](_0xe58fx14,{connectid:_0xe58fxa[_0x5247[23]][_0x5247[22]]});return _0xe58fx12[_0x5247[27]]()})[_0x5247[15]](function(){return ChatRoom[_0x5247[28]](_0xe58fxf)})[_0x5247[15]](function(_0xe58fx13){_0xe58fx10= _0xe58fx13;return _0xe58fx10[_0x5247[35]](_0xe58fxa[_0x5247[31]][_0x5247[30]],{individualHooks:true})})[_0x5247[15]](function(){return _0xe58fx10[_0x5247[34]]({token:md5(JSON[_0x5247[32]]([_0xe58fxa[_0x5247[31]][_0x5247[30]]])).toString(_0x5247[29]),status:_0x5247[33]})})[_0x5247[15]](function(){return ChatVisitor[_0x5247[28]](_0xe58fx10.ChatVisitorId)})[_0x5247[15]](function(_0xe58fx11){if(!_0xe58fx11){return _0xe58fxb[_0x5247[24]](404)};var _0xe58fx12=_[_0x5247[26]](_0xe58fx11,{status:_0x5247[25]});return _0xe58fx12[_0x5247[27]]()})[_0x5247[15]](function(){return _0xe58fxb[_0x5247[24]](200)})[_0x5247[12]](sequelize.UniqueConstraintError,function(_0xe58fxd){return _0xe58fxb[_0x5247[24]](504)})[_0x5247[12]](function(_0xe58fxd){return handleError(_0xe58fxb,_0xe58fxd)})};exports[_0x5247[36]]= function(_0xe58fxa,_0xe58fxb){return ReportChat[_0x5247[36]](_0xe58fxa[_0x5247[37]])[_0x5247[15]](function(_0xe58fx14){return _0xe58fxb[_0x5247[14]](201)[_0x5247[13]](_0xe58fx14)})[_0x5247[12]](function(_0xe58fxd){return handleError(_0xe58fxb,_0xe58fxd)})};exports[_0x5247[34]]= function(_0xe58fxa,_0xe58fxb,_0xe58fxc){if(_0xe58fxa[_0x5247[37]][_0x5247[30]]){delete _0xe58fxa[_0x5247[37]][_0x5247[30]]};return ReportChat[_0x5247[28]](_0xe58fxa[_0x5247[23]][_0x5247[30]])[_0x5247[15]](function(_0xe58fx14){if(!_0xe58fx14){return _0xe58fxb[_0x5247[24]](404)};var _0xe58fx12=_[_0x5247[26]](_0xe58fx14,_0xe58fxa[_0x5247[37]]);return _0xe58fx12[_0x5247[27]]()})[_0x5247[15]](function(_0xe58fx14){return _0xe58fxb[_0x5247[14]](200)[_0x5247[13]](_0xe58fx14)})[_0x5247[12]](sequelize.ValidationError,function(_0xe58fxd){return handleError(_0xe58fxb,_0xe58fxd)})[_0x5247[12]](function(_0xe58fxd){return handleError(_0xe58fxb,_0xe58fxd)})};exports[_0x5247[38]]= function(_0xe58fxa,_0xe58fxb){return ReportChat[_0x5247[28]](_0xe58fxa[_0x5247[23]][_0x5247[30]])[_0x5247[15]](function(_0xe58fx14){if(!_0xe58fx14){return _0xe58fxb[_0x5247[24]](404)};return _0xe58fx14[_0x5247[38]]()})[_0x5247[15]](function(){return _0xe58fxb[_0x5247[24]](204)})[_0x5247[12]](function(_0xe58fxd){return handleError(_0xe58fxb,_0xe58fxd)})};exports[_0x5247[39]]= function(_0xe58fxa,_0xe58fxb){return ReportChat[_0x5247[28]](_0xe58fxa[_0x5247[23]][_0x5247[30]])[_0x5247[15]](function(_0xe58fx14){if(!_0xe58fx14){return _0xe58fxb[_0x5247[24]](404)};var _0xe58fx12=_[_0x5247[26]](_0xe58fx14,{rejectedAt:moment()[_0x5247[41]](_0x5247[40])});return _0xe58fx12[_0x5247[27]]()})[_0x5247[15]](function(){return _0xe58fxb[_0x5247[24]](200)})[_0x5247[12]](function(_0xe58fxd){return handleError(_0xe58fxb,_0xe58fxd)})};function handleError(_0xe58fxb,_0xe58fxd){return _0xe58fxb[_0x5247[14]](500)[_0x5247[13]](_0xe58fxd)}
\ No newline at end of file
diff --git a/server/api/report_chat/report_chat.events.js b/server/api/report_chat/report_chat.events.js
index dd23889..238901a 100644
--- a/server/api/report_chat/report_chat.events.js
+++ b/server/api/report_chat/report_chat.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportChat = require('../../models').ReportChat;
-
-var ReportChatEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportChatEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'update',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportChat.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportChatEvents.emit(event + ':' + doc._id, doc);
-    ReportChatEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportChatEvents;
+var _0x87c2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x87c2[0];const EventEmitter=require(_0x87c2[1]);const ReportChat=require(_0x87c2[3])[_0x87c2[2]];var ReportChatEvents= new EventEmitter();ReportChatEvents[_0x87c2[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x87c2[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x87c2[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x87c2[7]};for(var e in events){var event=events[e];ReportChat[_0x87c2[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x1a07x8,_0x1a07x9,_0x1a07xa){ReportChatEvents[_0x87c2[11]](event+ _0x87c2[9]+ _0x1a07x8[_0x87c2[10]],_0x1a07x8);ReportChatEvents[_0x87c2[11]](event,_0x1a07x8);_0x1a07xa(null)}}module[_0x87c2[12]]= ReportChatEvents
\ No newline at end of file
diff --git a/server/api/report_chat/report_chat.socket.js b/server/api/report_chat/report_chat.socket.js
index 092868e..5ad65d7 100644
--- a/server/api/report_chat/report_chat.socket.js
+++ b/server/api/report_chat/report_chat.socket.js
@@ -1,42 +1 @@
-'use strict';
-
-const ReportChatEvents = require('./report_chat.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_chat:' + event, socket);
-
-    ReportChatEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'report_chat:save':
-      case 'report_chat:update':
-        if (socket.name === doc.membername || socket.role === 'admin') {
-          socket.emit(event, doc);
-        }
-        break;
-
-      case 'report_chat:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportChatEvents.removeListener(event, listener);
-  };
-}
+var _0xd566=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x3A\x73\x61\x76\x65","\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x3A\x75\x70\x64\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xd566[0];const ReportChatEvents=require(_0xd566[1]);var events=[_0xd566[2],_0xd566[3]];exports[_0xd566[4]]= function(_0xa480x3){for(var _0xa480x4=0,_0xa480x5=events[_0xd566[5]];_0xa480x4< _0xa480x5;_0xa480x4++){var _0xa480x6=events[_0xa480x4];var _0xa480x7=createListener(_0xd566[6]+ _0xa480x6,_0xa480x3);ReportChatEvents[_0xd566[7]](_0xa480x6,_0xa480x7);_0xa480x3[_0xd566[7]](_0xd566[8],removeListener(_0xa480x6,_0xa480x7))}};function createListener(_0xa480x6,_0xa480x3){return function(_0xa480x9){switch(_0xa480x6){case _0xd566[9]:;case _0xd566[15]:if(_0xa480x3[_0xd566[10]]=== _0xa480x9[_0xd566[11]]|| _0xa480x3[_0xd566[12]]=== _0xd566[13]){_0xa480x3[_0xd566[14]](_0xa480x6,_0xa480x9)};break;case _0xd566[16]:_0xa480x3[_0xd566[14]](_0xa480x6,_0xa480x9);break;default:}}}function removeListener(_0xa480x6,_0xa480x7){return function(){ReportChatEvents[_0xd566[17]](_0xa480x6,_0xa480x7)}}
\ No newline at end of file
diff --git a/server/api/report_chat_session/index.js b/server/api/report_chat_session/index.js
index a90e04c..ce5e5dc 100644
--- a/server/api/report_chat_session/index.js
+++ b/server/api/report_chat_session/index.js
@@ -1,19 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./report_chat_session.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), auth.isAuthenticated(), license.hasChat(), auth.hasModule([17], ['admin']), controller.index);
-router.get('/describe', license.isValidDate(), auth.isAuthenticated(), license.hasChat(), auth.hasModule([17], ['admin']), controller.describe);
-router.get('/open', license.isValidDate(), auth.isAuthenticated(), license.hasChat(), auth.hasModule([17], ['admin']), controller.open);
-router.get('/closed', license.isValidDate(), auth.isAuthenticated(), license.hasChat(), auth.hasModule([17], ['admin']), controller.closed);
-router.get('/timeout', license.isValidDate(), auth.isAuthenticated(), license.hasChat(), auth.hasModule([17], ['admin']), controller.timeout);
-router.get('/waiting', license.isValidDate(), auth.isAuthenticated(), license.hasChat(), auth.hasModule([17], ['admin']), controller.waiting);
-router.get('/abandoned', license.isValidDate(), auth.isAuthenticated(), license.hasChat(), auth.hasModule([17], ['admin']), controller.abandoned);
-router.get('/waiting/applications', license.isValidDate(), auth.isAuthenticated(), license.hasChat(), auth.hasModule([8], ['admin', 'agent']), controller.waitingApplications);
-
-module.exports = router;
+var _0x19c3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x43\x68\x61\x74","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x6F\x70\x65\x6E","\x6F\x70\x65\x6E","\x2F\x63\x6C\x6F\x73\x65\x64","\x63\x6C\x6F\x73\x65\x64","\x2F\x74\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x2F\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67","\x2F\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x2F\x77\x61\x69\x74\x69\x6E\x67\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x67\x65\x6E\x74","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x19c3[0];var express=require(_0x19c3[1]);var controller=require(_0x19c3[2]);var auth=require(_0x19c3[3]);var license=require(_0x19c3[4]);var router=express.Router();router[_0x19c3[12]](_0x19c3[5],license[_0x19c3[6]](),auth[_0x19c3[7]](),license[_0x19c3[8]](),auth[_0x19c3[10]]([17],[_0x19c3[9]]),controller[_0x19c3[11]]);router[_0x19c3[12]](_0x19c3[13],license[_0x19c3[6]](),auth[_0x19c3[7]](),license[_0x19c3[8]](),auth[_0x19c3[10]]([17],[_0x19c3[9]]),controller[_0x19c3[14]]);router[_0x19c3[12]](_0x19c3[15],license[_0x19c3[6]](),auth[_0x19c3[7]](),license[_0x19c3[8]](),auth[_0x19c3[10]]([17],[_0x19c3[9]]),controller[_0x19c3[16]]);router[_0x19c3[12]](_0x19c3[17],license[_0x19c3[6]](),auth[_0x19c3[7]](),license[_0x19c3[8]](),auth[_0x19c3[10]]([17],[_0x19c3[9]]),controller[_0x19c3[18]]);router[_0x19c3[12]](_0x19c3[19],license[_0x19c3[6]](),auth[_0x19c3[7]](),license[_0x19c3[8]](),auth[_0x19c3[10]]([17],[_0x19c3[9]]),controller[_0x19c3[20]]);router[_0x19c3[12]](_0x19c3[21],license[_0x19c3[6]](),auth[_0x19c3[7]](),license[_0x19c3[8]](),auth[_0x19c3[10]]([17],[_0x19c3[9]]),controller[_0x19c3[22]]);router[_0x19c3[12]](_0x19c3[23],license[_0x19c3[6]](),auth[_0x19c3[7]](),license[_0x19c3[8]](),auth[_0x19c3[10]]([17],[_0x19c3[9]]),controller[_0x19c3[24]]);router[_0x19c3[12]](_0x19c3[25],license[_0x19c3[6]](),auth[_0x19c3[7]](),license[_0x19c3[8]](),auth[_0x19c3[10]]([8],[_0x19c3[9],_0x19c3[26]]),controller[_0x19c3[27]]);module[_0x19c3[28]]= router
\ No newline at end of file
diff --git a/server/api/report_chat_session/report_chat_session.controller.js b/server/api/report_chat_session/report_chat_session.controller.js
index 74b5dde..cb80d5b 100644
--- a/server/api/report_chat_session/report_chat_session.controller.js
+++ b/server/api/report_chat_session/report_chat_session.controller.js
@@ -1,225 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var ReportChatSession = require('../../models').ReportChatSession;
-var User = require('../../models').User;
-var ReportChatSessionHistory = require('../../models').history.ReportChatSessionHistory;
-var Promise = require('bluebird');
-
-var Util = require('../../config/util');
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  return ReportChatSession
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Get list of fields
-exports.describe = function(req, res) {
-  return ReportChatSessionHistory
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function getChatQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return User
-          .findById(user.id, {
-            attributes: ['id']
-          })
-          .then(Util.getChatQueuesIdByUser({}, {
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: User,
-              attributes: ['id']
-            }]
-          }))
-          .then(function(userQueues) {
-            var users = [];
-            userQueues.rows.forEach(function(queue) {
-              users = _.union(users, _.map(queue.Users, 'id'));
-            });
-            return {
-              $or: {
-                queue: _.map(userQueues.rows, 'id'),
-                memberid: users
-              }
-            };
-          });
-      case 'agent':
-        return User
-          .findById(user.id, {
-            attributes: ['id']
-          })
-          .then(function(agent) {
-            return agent
-              .getChatQueues({
-                attributes: ['id']
-              });
-          })
-          .then(function(userQueues) {
-            return {
-              $or: {
-                queue: _.map(userQueues, 'id'),
-                memberid: user.id
-              }
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
-
-// Get Waiting apps
-exports.waitingApplications = function(req, res) {
-  return Promise
-    .all([])
-    .then(getChatQueues(req.user))
-    .then(function(condition) {
-      return ReportChatSession
-        .findAll(Util.getQuery(req.query, _.merge({
-          leaveAt: null
-        }, condition)));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        rows: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Get open apps
-exports.open = function(req, res) {
-  return Promise
-    .all([])
-    .then(getChatQueues(req.user))
-    .then(function(condition) {
-      return ReportChatSession
-        .count(Util.getQuery(req.query, _.merge({
-          leaveAt: {
-            $ne: null
-          },
-          complete: null,
-          abandon: null,
-          timeout: null
-        }, condition)));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.waiting = function(req, res) {
-  return Promise
-    .all([])
-    .then(getChatQueues(req.user))
-    .then(function(condition) {
-      return ReportChatSession
-        .count(Util.getQuery(req.query, _.merge({
-          leaveAt: null
-        }, condition)));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Get closed apps
-exports.closed = function(req, res) {
-  return Promise
-    .all([])
-    .then(getChatQueues(req.user))
-    .then(function(condition) {
-      return ReportChatSession
-        .count(Util.getQuery(req.query, _.merge({
-          complete: true
-        }, condition)));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Get timeout apps
-exports.timeout = function(req, res) {
-  return Promise
-    .all([])
-    .then(getChatQueues(req.user))
-    .then(function(condition) {
-      return ReportChatSession
-        .count(Util.getQuery(req.query, _.merge({
-          timeout: true
-        }, condition)));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Get abandoned apps
-exports.abandoned = function(req, res) {
-  return Promise
-    .all([])
-    .then(getChatQueues(req.user))
-    .then(function(condition) {
-      return ReportChatSession
-        .count(Util.getQuery(req.query, _.merge({
-          abandon: true
-        }, condition)));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xc889=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x6C\x6C","\x6F\x70\x65\x6E","\x63\x6F\x75\x6E\x74","\x77\x61\x69\x74\x69\x6E\x67","\x63\x6C\x6F\x73\x65\x64","\x74\x69\x6D\x65\x6F\x75\x74","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64"];_0xc889[0];var _=require(_0xc889[1]);var ReportChatSession=require(_0xc889[3])[_0xc889[2]];var User=require(_0xc889[3])[_0xc889[4]];var ReportChatSessionHistory=require(_0xc889[3])[_0xc889[6]][_0xc889[5]];var Promise=require(_0xc889[7]);var Util=require(_0xc889[8]);exports[_0xc889[9]]= function(_0x827dx7,_0x827dx8,_0x827dx9){return ReportChatSession[_0xc889[16]](Util[_0xc889[15]](_0x827dx7[_0xc889[14]]))[_0xc889[13]](function(_0x827dxb){_0x827dx8[_0xc889[12]](200)[_0xc889[11]](_0x827dxb)})[_0xc889[10]](function(_0x827dxa){return handleError(_0x827dx8,_0x827dxa)})};exports[_0xc889[17]]= function(_0x827dx7,_0x827dx8){return ReportChatSessionHistory[_0xc889[17]]()[_0xc889[13]](function(_0x827dxc){return _0x827dx8[_0xc889[12]](200)[_0xc889[11]](_0x827dxc)})[_0xc889[10]](function(_0x827dxa){return handleError(_0x827dx8,_0x827dxa)})};function getChatQueues(_0x827dxe){return function(){switch(_0x827dxe[_0xc889[28]]){case _0xc889[25]:return User[_0xc889[24]](_0x827dxe[_0xc889[18]],{attributes:[_0xc889[18]]})[_0xc889[13]](Util[_0xc889[23]]({},{attributes:[_0xc889[18]],include:[{raw:true,model:User,attributes:[_0xc889[18]]}]}))[_0xc889[13]](function(_0x827dxf){var _0x827dx10=[];_0x827dxf[_0xc889[22]][_0xc889[21]](function(_0x827dx11){_0x827dx10= _[_0xc889[20]](_0x827dx10,_[_0xc889[19]](_0x827dx11.Users,_0xc889[18]))});return {$or:{queue:_[_0xc889[19]](_0x827dxf[_0xc889[22]],_0xc889[18]),memberid:_0x827dx10}}});case _0xc889[27]:return User[_0xc889[24]](_0x827dxe[_0xc889[18]],{attributes:[_0xc889[18]]})[_0xc889[13]](function(_0x827dx12){return _0x827dx12[_0xc889[26]]({attributes:[_0xc889[18]]})})[_0xc889[13]](function(_0x827dxf){return {$or:{queue:_[_0xc889[19]](_0x827dxf,_0xc889[18]),memberid:_0x827dxe[_0xc889[18]]}}});default:return {}}}}exports[_0xc889[29]]= function(_0x827dx7,_0x827dx8){return Promise[_0xc889[33]]([])[_0xc889[13]](getChatQueues(_0x827dx7[_0xc889[25]]))[_0xc889[13]](function(_0x827dx14){return ReportChatSession[_0xc889[32]](Util[_0xc889[15]](_0x827dx7[_0xc889[14]],_[_0xc889[31]]({leaveAt:null},_0x827dx14)))})[_0xc889[13]](function(_0x827dx13){return _0x827dx8[_0xc889[12]](200)[_0xc889[11]]({rows:_0x827dx13})})[_0xc889[10]](function(_0x827dxa){console[_0xc889[30]](_0x827dxa);return handleError(_0x827dx8,_0x827dxa)})};exports[_0xc889[34]]= function(_0x827dx7,_0x827dx8){return Promise[_0xc889[33]]([])[_0xc889[13]](getChatQueues(_0x827dx7[_0xc889[25]]))[_0xc889[13]](function(_0x827dx14){return ReportChatSession[_0xc889[35]](Util[_0xc889[15]](_0x827dx7[_0xc889[14]],_[_0xc889[31]]({leaveAt:{$ne:null},complete:null,abandon:null,timeout:null},_0x827dx14)))})[_0xc889[13]](function(_0x827dx13){return _0x827dx8[_0xc889[12]](200)[_0xc889[11]]({value:_0x827dx13})})[_0xc889[10]](function(_0x827dxa){console[_0xc889[30]](_0x827dxa);return handleError(_0x827dx8,_0x827dxa)})};exports[_0xc889[36]]= function(_0x827dx7,_0x827dx8){return Promise[_0xc889[33]]([])[_0xc889[13]](getChatQueues(_0x827dx7[_0xc889[25]]))[_0xc889[13]](function(_0x827dx14){return ReportChatSession[_0xc889[35]](Util[_0xc889[15]](_0x827dx7[_0xc889[14]],_[_0xc889[31]]({leaveAt:null},_0x827dx14)))})[_0xc889[13]](function(_0x827dx13){return _0x827dx8[_0xc889[12]](200)[_0xc889[11]]({value:_0x827dx13})})[_0xc889[10]](function(_0x827dxa){console[_0xc889[30]](_0x827dxa);return handleError(_0x827dx8,_0x827dxa)})};exports[_0xc889[37]]= function(_0x827dx7,_0x827dx8){return Promise[_0xc889[33]]([])[_0xc889[13]](getChatQueues(_0x827dx7[_0xc889[25]]))[_0xc889[13]](function(_0x827dx14){return ReportChatSession[_0xc889[35]](Util[_0xc889[15]](_0x827dx7[_0xc889[14]],_[_0xc889[31]]({complete:true},_0x827dx14)))})[_0xc889[13]](function(_0x827dx13){return _0x827dx8[_0xc889[12]](200)[_0xc889[11]]({value:_0x827dx13})})[_0xc889[10]](function(_0x827dxa){console[_0xc889[30]](_0x827dxa);return handleError(_0x827dx8,_0x827dxa)})};exports[_0xc889[38]]= function(_0x827dx7,_0x827dx8){return Promise[_0xc889[33]]([])[_0xc889[13]](getChatQueues(_0x827dx7[_0xc889[25]]))[_0xc889[13]](function(_0x827dx14){return ReportChatSession[_0xc889[35]](Util[_0xc889[15]](_0x827dx7[_0xc889[14]],_[_0xc889[31]]({timeout:true},_0x827dx14)))})[_0xc889[13]](function(_0x827dx13){return _0x827dx8[_0xc889[12]](200)[_0xc889[11]]({value:_0x827dx13})})[_0xc889[10]](function(_0x827dxa){console[_0xc889[30]](_0x827dxa);return handleError(_0x827dx8,_0x827dxa)})};exports[_0xc889[39]]= function(_0x827dx7,_0x827dx8){return Promise[_0xc889[33]]([])[_0xc889[13]](getChatQueues(_0x827dx7[_0xc889[25]]))[_0xc889[13]](function(_0x827dx14){return ReportChatSession[_0xc889[35]](Util[_0xc889[15]](_0x827dx7[_0xc889[14]],_[_0xc889[31]]({abandon:true},_0x827dx14)))})[_0xc889[13]](function(_0x827dx13){return _0x827dx8[_0xc889[12]](200)[_0xc889[11]]({value:_0x827dx13})})[_0xc889[10]](function(_0x827dxa){console[_0xc889[30]](_0x827dxa);return handleError(_0x827dx8,_0x827dxa)})};function handleError(_0x827dx8,_0x827dxa){return _0x827dx8[_0xc889[12]](500)[_0xc889[11]](_0x827dxa)}
\ No newline at end of file
diff --git a/server/api/report_chat_session/report_chat_session.events.js b/server/api/report_chat_session/report_chat_session.events.js
index 5ae9bac..eb64175 100644
--- a/server/api/report_chat_session/report_chat_session.events.js
+++ b/server/api/report_chat_session/report_chat_session.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportChatSession = require('../../models').ReportChatSession;
-
-var ReportChatSessionEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportChatSessionEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportChatSession.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportChatSessionEvents.emit(event + ':' + doc._id, doc);
-    ReportChatSessionEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportChatSessionEvents;
+var _0xb671=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xb671[0];const EventEmitter=require(_0xb671[1]);const ReportChatSession=require(_0xb671[3])[_0xb671[2]];var ReportChatSessionEvents= new EventEmitter();ReportChatSessionEvents[_0xb671[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb671[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb671[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb671[6]};for(var e in events){var event=events[e];ReportChatSession[_0xb671[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4285x8,_0x4285x9,_0x4285xa){ReportChatSessionEvents[_0xb671[10]](event+ _0xb671[8]+ _0x4285x8[_0xb671[9]],_0x4285x8);ReportChatSessionEvents[_0xb671[10]](event,_0x4285x8);_0x4285xa(null)}}module[_0xb671[11]]= ReportChatSessionEvents
\ No newline at end of file
diff --git a/server/api/report_chat_session/report_chat_session.socket.js b/server/api/report_chat_session/report_chat_session.socket.js
index f9b1796..8e4fbf2 100644
--- a/server/api/report_chat_session/report_chat_session.socket.js
+++ b/server/api/report_chat_session/report_chat_session.socket.js
@@ -1,102 +1 @@
-'use strict';
-
-const ReportChatSessionEvents = require('./report_chat_session.events');
-const ReportChatSession = require('../../models').ReportChatSession;
-const User = require('../../models').User;
-const Util = require('../../config/util');
-
-const _ = require('lodash');
-const Promise = require('bluebird');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_chat_session:' + event, socket);
-
-    ReportChatSessionEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    onSave(socket, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportChatSessionEvents.removeListener(event, listener);
-  };
-}
-
-
-function getChatQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(Util.getChatQueuesIdByUser({}, {
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: User,
-              attributes: ['id']
-            }]
-          }))
-          .then(function(userQueues) {
-            var users = [];
-            userQueues.rows.forEach(function(queue) {
-              users = _.union(users, _.map(queue.Users, 'id'));
-            });
-            return {
-              queue: _.map(userQueues.rows, 'id'),
-              memberid: users
-            };
-          });
-      case 'agent':
-        return User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(function(agent) {
-            return agent
-              .getChatQueues({
-                attributes: ['id']
-              });
-          })
-          .then(function(userQueues) {
-            return {
-              queue: _.map(userQueues, 'id'),
-              memberid: user.userId
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
-
-function onSave(socket, doc, cb) {
-  return Promise
-    .all([])
-    .then(getChatQueues(socket))
-    .then(function(condition) {
-      if (socket.role === 'admin' || _.includes(condition.memberid, doc.memberid) || _.includes(condition.queue, doc.queue)) {
-        socket.emit('report_chat_session:save', doc);
-      }
-    })
-    .catch(function(err) {
-      console.log('Error filtering report chat sessions after save', err);
-    });
-}
-
-function onRemove(socket, doc, cb) {
-  socket.emit('report_chat_session:remove', doc);
-}
+var _0xdf42=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x74\x68\x65\x6E","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x45\x72\x72\x6F\x72\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x63\x68\x61\x74\x20\x73\x65\x73\x73\x69\x6F\x6E\x73\x20\x61\x66\x74\x65\x72\x20\x73\x61\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x61\x64\x6D\x69\x6E","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x71\x75\x65\x75\x65","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0xdf42[0];const ReportChatSessionEvents=require(_0xdf42[1]);const ReportChatSession=require(_0xdf42[3])[_0xdf42[2]];const User=require(_0xdf42[3])[_0xdf42[4]];const Util=require(_0xdf42[5]);const _=require(_0xdf42[6]);const Promise=require(_0xdf42[7]);var events=[_0xdf42[8],_0xdf42[9]];exports[_0xdf42[10]]= function(_0x2f91x8){for(var _0x2f91x9=0,_0x2f91xa=events[_0xdf42[11]];_0x2f91x9< _0x2f91xa;_0x2f91x9++){var _0x2f91xb=events[_0x2f91x9];var _0x2f91xc=createListener(_0xdf42[12]+ _0x2f91xb,_0x2f91x8);ReportChatSessionEvents[_0xdf42[13]](_0x2f91xb,_0x2f91xc);_0x2f91x8[_0xdf42[13]](_0xdf42[14],removeListener(_0x2f91xb,_0x2f91xc))}};function createListener(_0x2f91xb,_0x2f91x8){return function(_0x2f91xe){onSave(_0x2f91x8,_0x2f91xe)}}function removeListener(_0x2f91xb,_0x2f91xc){return function(){ReportChatSessionEvents[_0xdf42[15]](_0x2f91xb,_0x2f91xc)}}function getChatQueues(_0x2f91x11){return function(){switch(_0x2f91x11[_0xdf42[28]]){case _0xdf42[25]:return User[_0xdf42[24]](_0x2f91x11[_0xdf42[23]],{attributes:[_0xdf42[16]]})[_0xdf42[21]](Util[_0xdf42[22]]({},{attributes:[_0xdf42[16]],include:[{raw:true,model:User,attributes:[_0xdf42[16]]}]}))[_0xdf42[21]](function(_0x2f91x12){var _0x2f91x13=[];_0x2f91x12[_0xdf42[20]][_0xdf42[19]](function(_0x2f91x14){_0x2f91x13= _[_0xdf42[18]](_0x2f91x13,_[_0xdf42[17]](_0x2f91x14.Users,_0xdf42[16]))});return {queue:_[_0xdf42[17]](_0x2f91x12[_0xdf42[20]],_0xdf42[16]),memberid:_0x2f91x13}});case _0xdf42[27]:return User[_0xdf42[24]](_0x2f91x11[_0xdf42[23]],{attributes:[_0xdf42[16]]})[_0xdf42[21]](function(_0x2f91x15){return _0x2f91x15[_0xdf42[26]]({attributes:[_0xdf42[16]]})})[_0xdf42[21]](function(_0x2f91x12){return {queue:_[_0xdf42[17]](_0x2f91x12,_0xdf42[16]),memberid:_0x2f91x11[_0xdf42[23]]}});default:return {}}}}function onSave(_0x2f91x8,_0x2f91xe,_0x2f91x17){return Promise[_0xdf42[38]]([])[_0xdf42[21]](getChatQueues(_0x2f91x8))[_0xdf42[21]](function(_0x2f91x19){if(_0x2f91x8[_0xdf42[28]]=== _0xdf42[32]|| _[_0xdf42[34]](_0x2f91x19[_0xdf42[33]],_0x2f91xe[_0xdf42[33]])|| _[_0xdf42[34]](_0x2f91x19[_0xdf42[35]],_0x2f91xe[_0xdf42[35]])){_0x2f91x8[_0xdf42[37]](_0xdf42[36],_0x2f91xe)}})[_0xdf42[31]](function(_0x2f91x18){console[_0xdf42[30]](_0xdf42[29],_0x2f91x18)})}function onRemove(_0x2f91x8,_0x2f91xe,_0x2f91x17){_0x2f91x8[_0xdf42[37]](_0xdf42[39],_0x2f91xe)}
\ No newline at end of file
diff --git a/server/api/report_dial/index.js b/server/api/report_dial/index.js
index ea59483..e2f92aa 100644
--- a/server/api/report_dial/index.js
+++ b/server/api/report_dial/index.js
@@ -1,14 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./report_dial.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin', 'agent']), controller.index);
-router.get('/describe', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.describe);
-router.get('/active/calls', auth.isAuthenticated(), auth.hasModule([7], ['admin', 'agent']), controller.activeCalls);
-
-
-module.exports = router;
+var _0xa78a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x61\x63\x74\x69\x76\x65\x2F\x63\x61\x6C\x6C\x73","\x61\x63\x74\x69\x76\x65\x43\x61\x6C\x6C\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xa78a[0];var express=require(_0xa78a[1]);var auth=require(_0xa78a[2]);var controller=require(_0xa78a[3]);var router=express.Router();router[_0xa78a[10]](_0xa78a[4],auth[_0xa78a[5]](),auth[_0xa78a[8]]([17],[_0xa78a[6],_0xa78a[7]]),controller[_0xa78a[9]]);router[_0xa78a[10]](_0xa78a[11],auth[_0xa78a[5]](),auth[_0xa78a[8]]([17],[_0xa78a[6]]),controller[_0xa78a[12]]);router[_0xa78a[10]](_0xa78a[13],auth[_0xa78a[5]](),auth[_0xa78a[8]]([7],[_0xa78a[6],_0xa78a[7]]),controller[_0xa78a[14]]);module[_0xa78a[15]]= router
\ No newline at end of file
diff --git a/server/api/report_dial/report_dial.controller.js b/server/api/report_dial/report_dial.controller.js
index 5db39fb..60d491a 100644
--- a/server/api/report_dial/report_dial.controller.js
+++ b/server/api/report_dial/report_dial.controller.js
@@ -1,116 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/report/dials              ->  index
- * POST    /api/report/dials              ->  create
- * GET     /api/report/dials/:id          ->  show
- * PUT     /api/report/dials/:id          ->  update
- * DELETE  /api/report/dials/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-
-var sequelize = require('../../models').sequelize;
-var ReportDial = require('../../models').ReportDial;
-var ReportDialHistory = require('../../models').history.ReportDialHistory;
-var Util = require('../../config/util');
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    console.log(err);
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity
-        .destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of ReportDials
-exports.index = function(req, res, next) {
-  return ReportDial
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(data) {
-      if (req.user.role === 'agent') {
-        var filteredData = [];
-        _.forEach(data.rows, function(elem) {
-          if (elem.channel && elem.channel.split(/\/|-/)[1] === req.user.name) {
-            filteredData.push(elem);
-          }
-        });
-        return {
-          rows: filteredData,
-          count: filteredData.length
-        };
-      }
-      return data;
-    })
-    .then(function(data) {
-      return res.status(200).send(data);
-    })
-    .catch(handleError(res));
-};
-
-// Get Active Calls
-exports.activeCalls = function(req, res) {
-  return ReportDial
-    .findAll(Util.getQuery(req.query, {
-      endtime: null
-    }))
-    .then(function(data) {
-      return res.status(200).send({
-        rows: data,
-        count: data.length
-      });
-    })
-    .catch(handleError(res));
-};
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return ReportDialHistory
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(handleError(res));
-};
+var _0xd82c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x67","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x72\x6F\x77\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x73\x70\x6C\x69\x74","\x6E\x61\x6D\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x6C\x65\x6E\x67\x74\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x63\x74\x69\x76\x65\x43\x61\x6C\x6C\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xd82c[0];var _=require(_0xd82c[1]);var sequelize=require(_0xd82c[3])[_0xd82c[2]];var ReportDial=require(_0xd82c[3])[_0xd82c[4]];var ReportDialHistory=require(_0xd82c[3])[_0xd82c[6]][_0xd82c[5]];var Util=require(_0xd82c[7]);function handleError(_0xdf69x7,_0xdf69x8){_0xdf69x8= _0xdf69x8|| 500;return function(_0xdf69x9){console[_0xd82c[8]](_0xdf69x9);_0xdf69x7[_0xd82c[10]](_0xdf69x8)[_0xd82c[9]](_0xdf69x9)}}function responseWithResult(_0xdf69x7,_0xdf69x8){_0xdf69x8= _0xdf69x8|| 200;return function(_0xdf69xb){if(_0xdf69xb){_0xdf69x7[_0xd82c[10]](_0xdf69x8)[_0xd82c[11]](_0xdf69xb)}}}function handleEntityNotFound(_0xdf69x7){return function(_0xdf69xb){if(!_0xdf69xb){_0xdf69x7[_0xd82c[10]](404)[_0xd82c[12]]();return null};return _0xdf69xb}}function saveUpdates(_0xdf69xe){return function(_0xdf69xb){return _0xdf69xb[_0xd82c[14]](_0xdf69xe)[_0xd82c[13]](function(_0xdf69xf){return _0xdf69xf})}}function removeEntity(_0xdf69x7){return function(_0xdf69xb){if(_0xdf69xb){return _0xdf69xb[_0xd82c[15]]()[_0xd82c[13]](function(){_0xdf69x7[_0xd82c[10]](204)[_0xd82c[12]]()})}}}exports[_0xd82c[16]]= function(_0xdf69x11,_0xdf69x7,_0xdf69x12){return ReportDial[_0xd82c[30]](Util[_0xd82c[29]](_0xdf69x11[_0xd82c[28]]))[_0xd82c[13]](function(_0xdf69x13){if(_0xdf69x11[_0xd82c[19]][_0xd82c[18]]=== _0xd82c[20]){var _0xdf69x14=[];_[_0xd82c[26]](_0xdf69x13[_0xd82c[21]],function(_0xdf69x15){if(_0xdf69x15[_0xd82c[22]]&& _0xdf69x15[_0xd82c[22]][_0xd82c[23]](/\/|-/)[1]=== _0xdf69x11[_0xd82c[19]][_0xd82c[24]]){_0xdf69x14[_0xd82c[25]](_0xdf69x15)}});return {rows:_0xdf69x14,count:_0xdf69x14[_0xd82c[27]]}};return _0xdf69x13})[_0xd82c[13]](function(_0xdf69x13){return _0xdf69x7[_0xd82c[10]](200)[_0xd82c[9]](_0xdf69x13)})[_0xd82c[17]](handleError(_0xdf69x7))};exports[_0xd82c[31]]= function(_0xdf69x11,_0xdf69x7){return ReportDial[_0xd82c[32]](Util[_0xd82c[29]](_0xdf69x11[_0xd82c[28]],{endtime:null}))[_0xd82c[13]](function(_0xdf69x13){return _0xdf69x7[_0xd82c[10]](200)[_0xd82c[9]]({rows:_0xdf69x13,count:_0xdf69x13[_0xd82c[27]]})})[_0xd82c[17]](handleError(_0xdf69x7))};exports[_0xd82c[33]]= function(_0xdf69x11,_0xdf69x7){return ReportDialHistory[_0xd82c[33]]()[_0xd82c[13]](function(_0xdf69x16){return _0xdf69x7[_0xd82c[10]](200)[_0xd82c[9]](_0xdf69x16)})[_0xd82c[17]](handleError(_0xdf69x7))}
\ No newline at end of file
diff --git a/server/api/report_dial/report_dial.events.js b/server/api/report_dial/report_dial.events.js
index 385b3cf..a6e251e 100644
--- a/server/api/report_dial/report_dial.events.js
+++ b/server/api/report_dial/report_dial.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportDial = require('../../models').ReportDial;
-
-var ReportDialEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportDialEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'update',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportDial.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportDialEvents.emit(event + ':' + doc._id, doc);
-    ReportDialEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportDialEvents;
+var _0x7f04=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7f04[0];const EventEmitter=require(_0x7f04[1]);const ReportDial=require(_0x7f04[3])[_0x7f04[2]];var ReportDialEvents= new EventEmitter();ReportDialEvents[_0x7f04[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7f04[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7f04[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7f04[7]};for(var e in events){var event=events[e];ReportDial[_0x7f04[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x75d9x8,_0x75d9x9,_0x75d9xa){ReportDialEvents[_0x7f04[11]](event+ _0x7f04[9]+ _0x75d9x8[_0x7f04[10]],_0x75d9x8);ReportDialEvents[_0x7f04[11]](event,_0x75d9x8);_0x75d9xa(null)}}module[_0x7f04[12]]= ReportDialEvents
\ No newline at end of file
diff --git a/server/api/report_dial/report_dial.socket.js b/server/api/report_dial/report_dial.socket.js
index 7d9498d..0d42518 100644
--- a/server/api/report_dial/report_dial.socket.js
+++ b/server/api/report_dial/report_dial.socket.js
@@ -1,30 +1 @@
-'use strict';
-
-const ReportDialEvents = require('./report_dial.events');
-
-// Model events to emit
-var events = ['save', 'update', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_dial:' + event, socket);
-
-    ReportDialEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    if (socket.role === 'admin' || (doc.channel && doc.channel.split(/\/|-/)[1] === socket.name)) {
-      socket.emit(event, doc);
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportDialEvents.removeListener(event, listener);
-  };
-}
+var _0x156a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x63\x68\x61\x6E\x6E\x65\x6C","\x73\x70\x6C\x69\x74","\x6E\x61\x6D\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x156a[0];const ReportDialEvents=require(_0x156a[1]);var events=[_0x156a[2],_0x156a[3],_0x156a[4]];exports[_0x156a[5]]= function(_0xfc31x3){for(var _0xfc31x4=0,_0xfc31x5=events[_0x156a[6]];_0xfc31x4< _0xfc31x5;_0xfc31x4++){var _0xfc31x6=events[_0xfc31x4];var _0xfc31x7=createListener(_0x156a[7]+ _0xfc31x6,_0xfc31x3);ReportDialEvents[_0x156a[8]](_0xfc31x6,_0xfc31x7);_0xfc31x3[_0x156a[8]](_0x156a[9],removeListener(_0xfc31x6,_0xfc31x7))}};function createListener(_0xfc31x6,_0xfc31x3){return function(_0xfc31x9){if(_0xfc31x3[_0x156a[10]]=== _0x156a[11]|| (_0xfc31x9[_0x156a[12]]&& _0xfc31x9[_0x156a[12]][_0x156a[13]](/\/|-/)[1]=== _0xfc31x3[_0x156a[14]])){_0xfc31x3[_0x156a[15]](_0xfc31x6,_0xfc31x9)}}}function removeListener(_0xfc31x6,_0xfc31x7){return function(){ReportDialEvents[_0x156a[16]](_0xfc31x6,_0xfc31x7)}}
\ No newline at end of file
diff --git a/server/api/report_fax/index.js b/server/api/report_fax/index.js
index e19c074..23a93d6 100644
--- a/server/api/report_fax/index.js
+++ b/server/api/report_fax/index.js
@@ -1,13 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./report_fax.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), license.hasFax(), auth.hasModule([17], ['admin', 'agent']), controller.index);
-router.get('/:id/accept/:uniqueid', auth.isAuthenticated(), license.hasFax(), auth.hasRole('agent'), controller.accept);
-router.get('/:id/reject', auth.isAuthenticated(), license.hasFax(), auth.hasRole('agent'), controller.reject);
-module.exports = router;
+var _0xfe1f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x46\x61\x78","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x68\x61\x73\x52\x6F\x6C\x65","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xfe1f[0];var express=require(_0xfe1f[1]);var controller=require(_0xfe1f[2]);var auth=require(_0xfe1f[3]);var license=require(_0xfe1f[4]);var router=express.Router();router[_0xfe1f[12]](_0xfe1f[5],auth[_0xfe1f[6]](),license[_0xfe1f[7]](),auth[_0xfe1f[10]]([17],[_0xfe1f[8],_0xfe1f[9]]),controller[_0xfe1f[11]]);router[_0xfe1f[12]](_0xfe1f[13],auth[_0xfe1f[6]](),license[_0xfe1f[7]](),auth[_0xfe1f[14]](_0xfe1f[9]),controller[_0xfe1f[15]]);router[_0xfe1f[12]](_0xfe1f[16],auth[_0xfe1f[6]](),license[_0xfe1f[7]](),auth[_0xfe1f[14]](_0xfe1f[9]),controller[_0xfe1f[17]]);module[_0xfe1f[18]]= router
\ No newline at end of file
diff --git a/server/api/report_fax/report_fax.controller.js b/server/api/report_fax/report_fax.controller.js
index de99a65..229c77c 100644
--- a/server/api/report_fax/report_fax.controller.js
+++ b/server/api/report_fax/report_fax.controller.js
@@ -1,105 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var moment = require('moment');
-
-var FaxRoom = require('../../models').FaxRoom;
-var FaxRoomStatus = require('../../models').FaxRoomStatus;
-var ReportFax = require('../../models').ReportFax;
-var sequelize = require('../../models').sequelize;
-var Agent = require('../../models').User;
-
-var Util = require('../../config/util');
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  return ReportFax
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single reportMail
-exports.accept = function(req, res) {
-  var _roomid = req.params.uniqueid.split('.')[1];
-
-  return ReportFax
-    .findById(req.params.id)
-    .then(function(reportMail) {
-      if (!reportMail) {
-        return res.sendStatus(404);
-      }
-
-      var updated = _.merge(reportMail, {
-        connectid: req.params.uniqueid
-      });
-
-      return updated
-        .save();
-    })
-    .then(function() {
-      return FaxRoom
-        .update({
-          status: 'OPEN',
-          openReason: 'agent'
-        }, {
-          where: {
-            id: _roomid
-          },
-          user: req.user,
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return res.sendStatus(504);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single reportMail
-exports.reject = function(req, res) {
-  var _report;
-
-  return ReportFax
-    .findById(req.params.id)
-    .then(function(reportFax) {
-      _report = reportFax;
-      if (!reportFax) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(reportFax, {
-        rejectedAt: moment().format("YYYY-MM-DD HH:mm:ss")
-      });
-      return updated
-        .save();
-    })
-    .then(function() {
-      return FaxRoomStatus
-        .create({
-          status: 'REJECT',
-          data1: req.user.name,
-          data2: req.user.fullname,
-          UserId: req.user.id,
-          MailRoomId: _report.roomid
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x5c94=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x63\x63\x65\x70\x74","\x2E","\x73\x70\x6C\x69\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x4F\x50\x45\x4E","\x61\x67\x65\x6E\x74","\x75\x73\x65\x72","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x65\x6A\x65\x63\x74","\x52\x45\x4A\x45\x43\x54","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x72\x6F\x6F\x6D\x69\x64","\x63\x72\x65\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74"];_0x5c94[0];var _=require(_0x5c94[1]);var moment=require(_0x5c94[2]);var FaxRoom=require(_0x5c94[4])[_0x5c94[3]];var FaxRoomStatus=require(_0x5c94[4])[_0x5c94[5]];var ReportFax=require(_0x5c94[4])[_0x5c94[6]];var sequelize=require(_0x5c94[4])[_0x5c94[7]];var Agent=require(_0x5c94[4])[_0x5c94[8]];var Util=require(_0x5c94[9]);exports[_0x5c94[10]]= function(_0x704ex9,_0x704exa,_0x704exb){return ReportFax[_0x5c94[17]](Util[_0x5c94[16]](_0x704ex9[_0x5c94[15]]))[_0x5c94[14]](function(_0x704exd){_0x704exa[_0x5c94[13]](200)[_0x5c94[12]](_0x704exd)})[_0x5c94[11]](function(_0x704exc){return handleError(_0x704exa,_0x704exc)})};exports[_0x5c94[18]]= function(_0x704ex9,_0x704exa){var _0x704exe=_0x704ex9[_0x5c94[22]][_0x5c94[21]][_0x5c94[20]](_0x5c94[19])[1];return ReportFax[_0x5c94[31]](_0x704ex9[_0x5c94[22]][_0x5c94[30]])[_0x5c94[14]](function(_0x704exf){if(!_0x704exf){return _0x704exa[_0x5c94[23]](404)};var _0x704ex10=_[_0x5c94[28]](_0x704exf,{connectid:_0x704ex9[_0x5c94[22]][_0x5c94[21]]});return _0x704ex10[_0x5c94[29]]()})[_0x5c94[14]](function(){return FaxRoom[_0x5c94[27]]({status:_0x5c94[24],openReason:_0x5c94[25]},{where:{id:_0x704exe},user:_0x704ex9[_0x5c94[26]],individualHooks:true})})[_0x5c94[14]](function(){return _0x704exa[_0x5c94[23]](200)})[_0x5c94[11]](sequelize.UniqueConstraintError,function(_0x704exc){return _0x704exa[_0x5c94[23]](504)})[_0x5c94[11]](function(_0x704exc){return handleError(_0x704exa,_0x704exc)})};exports[_0x5c94[32]]= function(_0x704ex9,_0x704exa){var _0x704ex11;return ReportFax[_0x5c94[31]](_0x704ex9[_0x5c94[22]][_0x5c94[30]])[_0x5c94[14]](function(_0x704ex12){_0x704ex11= _0x704ex12;if(!_0x704ex12){return _0x704exa[_0x5c94[23]](404)};var _0x704ex10=_[_0x5c94[28]](_0x704ex12,{rejectedAt:moment()[_0x5c94[39]](_0x5c94[38])});return _0x704ex10[_0x5c94[29]]()})[_0x5c94[14]](function(){return FaxRoomStatus[_0x5c94[37]]({status:_0x5c94[33],data1:_0x704ex9[_0x5c94[26]][_0x5c94[34]],data2:_0x704ex9[_0x5c94[26]][_0x5c94[35]],UserId:_0x704ex9[_0x5c94[26]][_0x5c94[30]],MailRoomId:_0x704ex11[_0x5c94[36]]})})[_0x5c94[14]](function(){return _0x704exa[_0x5c94[23]](200)})[_0x5c94[11]](function(_0x704exc){return handleError(_0x704exa,_0x704exc)})};function handleError(_0x704exa,_0x704exc){return _0x704exa[_0x5c94[13]](500)[_0x5c94[12]](_0x704exc)}
\ No newline at end of file
diff --git a/server/api/report_fax/report_fax.events.js b/server/api/report_fax/report_fax.events.js
index f0e5f3e..c4c7fee 100644
--- a/server/api/report_fax/report_fax.events.js
+++ b/server/api/report_fax/report_fax.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportFax = require('../../models').ReportFax;
-
-var ReportFaxEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportFaxEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'update',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportFax.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportFaxEvents.emit(event + ':' + doc._id, doc);
-    ReportFaxEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportFaxEvents;
+var _0x5d99=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x5d99[0];const EventEmitter=require(_0x5d99[1]);const ReportFax=require(_0x5d99[3])[_0x5d99[2]];var ReportFaxEvents= new EventEmitter();ReportFaxEvents[_0x5d99[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x5d99[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x5d99[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x5d99[7]};for(var e in events){var event=events[e];ReportFax[_0x5d99[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x4143x8,_0x4143x9,_0x4143xa){ReportFaxEvents[_0x5d99[11]](event+ _0x5d99[9]+ _0x4143x8[_0x5d99[10]],_0x4143x8);ReportFaxEvents[_0x5d99[11]](event,_0x4143x8);_0x4143xa(null)}}module[_0x5d99[12]]= ReportFaxEvents
\ No newline at end of file
diff --git a/server/api/report_fax/report_fax.socket.js b/server/api/report_fax/report_fax.socket.js
index 7d32de9..a50b5ba 100644
--- a/server/api/report_fax/report_fax.socket.js
+++ b/server/api/report_fax/report_fax.socket.js
@@ -1,44 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const ReportFaxEvents = require('./report_fax.events');
-
-// Model events to emit
-var events = ['save', 'update', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_fax:' + event, socket);
-
-    ReportFaxEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'report_fax:save':
-      case 'report_fax:update':
-        if (socket.name === doc.membername || socket.role === 'admin') {
-          socket.emit(event, doc);
-        }
-        break;
-      case 'report_fax:remove':
-        socket.emit(event, doc);
-        break;
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportFaxEvents.removeListener(event, listener);
-  };
-}
+var _0x4b71=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x3A\x73\x61\x76\x65","\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x3A\x75\x70\x64\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x4b71[0];const ReportFaxEvents=require(_0x4b71[1]);var events=[_0x4b71[2],_0x4b71[3],_0x4b71[4]];exports[_0x4b71[5]]= function(_0x692ax3){for(var _0x692ax4=0,_0x692ax5=events[_0x4b71[6]];_0x692ax4< _0x692ax5;_0x692ax4++){var _0x692ax6=events[_0x692ax4];var _0x692ax7=createListener(_0x4b71[7]+ _0x692ax6,_0x692ax3);ReportFaxEvents[_0x4b71[8]](_0x692ax6,_0x692ax7);_0x692ax3[_0x4b71[8]](_0x4b71[9],removeListener(_0x692ax6,_0x692ax7))}};function createListener(_0x692ax6,_0x692ax3){return function(_0x692ax9){switch(_0x692ax6){case _0x4b71[10]:;case _0x4b71[16]:if(_0x692ax3[_0x4b71[11]]=== _0x692ax9[_0x4b71[12]]|| _0x692ax3[_0x4b71[13]]=== _0x4b71[14]){_0x692ax3[_0x4b71[15]](_0x692ax6,_0x692ax9)};break;case _0x4b71[17]:_0x692ax3[_0x4b71[15]](_0x692ax6,_0x692ax9);break;default:}}}function removeListener(_0x692ax6,_0x692ax7){return function(){ReportFaxEvents[_0x4b71[18]](_0x692ax6,_0x692ax7)}}
\ No newline at end of file
diff --git a/server/api/report_fax_session/index.js b/server/api/report_fax_session/index.js
index 14bf55c..266c38e 100644
--- a/server/api/report_fax_session/index.js
+++ b/server/api/report_fax_session/index.js
@@ -1,15 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./report_fax_session.controller');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), license.hasFax(), auth.hasModule([17], ['admin']), controller.index);
-router.get('/describe', auth.isAuthenticated(), license.hasFax(), auth.hasModule([17], ['admin']), controller.describe);
-router.get('/timeout', license.isValidDate(), auth.isAuthenticated(), license.hasFax(), auth.hasModule([17], ['admin']), controller.timeout);
-router.get('/waiting', license.isValidDate(), auth.isAuthenticated(), license.hasFax(), auth.hasModule([17], ['admin']), controller.waiting);
-router.get('/waiting/applications', auth.isAuthenticated(), license.hasFax(), auth.hasModule([10], ['admin', 'agent']), controller.waitingApplications);
-module.exports = router;
+var _0x2eda=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x46\x61\x78","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x74\x69\x6D\x65\x6F\x75\x74","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x2F\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67","\x2F\x77\x61\x69\x74\x69\x6E\x67\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x67\x65\x6E\x74","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x2eda[0];var express=require(_0x2eda[1]);var auth=require(_0x2eda[2]);var controller=require(_0x2eda[3]);var license=require(_0x2eda[4]);var router=express.Router();router[_0x2eda[11]](_0x2eda[5],auth[_0x2eda[6]](),license[_0x2eda[7]](),auth[_0x2eda[9]]([17],[_0x2eda[8]]),controller[_0x2eda[10]]);router[_0x2eda[11]](_0x2eda[12],auth[_0x2eda[6]](),license[_0x2eda[7]](),auth[_0x2eda[9]]([17],[_0x2eda[8]]),controller[_0x2eda[13]]);router[_0x2eda[11]](_0x2eda[14],license[_0x2eda[15]](),auth[_0x2eda[6]](),license[_0x2eda[7]](),auth[_0x2eda[9]]([17],[_0x2eda[8]]),controller[_0x2eda[16]]);router[_0x2eda[11]](_0x2eda[17],license[_0x2eda[15]](),auth[_0x2eda[6]](),license[_0x2eda[7]](),auth[_0x2eda[9]]([17],[_0x2eda[8]]),controller[_0x2eda[18]]);router[_0x2eda[11]](_0x2eda[19],auth[_0x2eda[6]](),license[_0x2eda[7]](),auth[_0x2eda[9]]([10],[_0x2eda[8],_0x2eda[20]]),controller[_0x2eda[21]]);module[_0x2eda[22]]= router
\ No newline at end of file
diff --git a/server/api/report_fax_session/report_fax_session.controller.js b/server/api/report_fax_session/report_fax_session.controller.js
index 29bf8ba..708f7df 100644
--- a/server/api/report_fax_session/report_fax_session.controller.js
+++ b/server/api/report_fax_session/report_fax_session.controller.js
@@ -1,238 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/report/fax/sessions              ->  index
- * POST    /api/report/fax/sessions              ->  create
- * GET     /api/report/fax/sessions/:id          ->  show
- * PUT     /api/report/fax/sessions/:id          ->  update
- * DELETE  /api/report/fax/sessions/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var ReportFaxSession = require('../../models').ReportFaxSession;
-var ReportFaxSessionHistory = require('../../models').history.ReportFaxSessionHistory;
-var User = require('../../models').User;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function responseWithoutResult(res, statusCode) {
-  statusCode = statusCode || 204;
-  return function() {
-    res.sendStatus(statusCode);
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of ReportFaxSessions
-exports.index = function(req, res) {
-  return ReportFaxSession.findAll(Util.getQuery(req.query))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single ReportFaxSession from the DB
-exports.show = function(req, res) {
-  return ReportFaxSession.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new ReportFaxSession in the DB
-exports.create = function(req, res) {
-  return ReportFaxSession.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing ReportFaxSession in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return ReportFaxSession.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a ReportFaxSession from the DB
-exports.destroy = function(req, res) {
-  return ReportFaxSession.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
-
-exports.describe = function(req, res) {
-  return ReportFaxSessionHistory
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(handleError(res));
-};
-
-// Get timeout apps
-exports.timeout = function(req, res) {
-  return Promise
-    .all([])
-    .then(getFaxQueues(req.user))
-    .then(function(condition) {
-      return ReportFaxSession
-        .count(Util.getQuery(req.query, _.merge({
-          timeout: true
-        }, condition)));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Get waiting apps
-exports.waiting = function(req, res) {
-  return Promise
-    .all([])
-    .then(getFaxQueues(req.user))
-    .then(function(condition) {
-      return ReportFaxSession
-        .count(Util.getQuery(req.query, _.merge({
-          leaveAt: null
-        }, condition)));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.waitingApplications = function(req, res) {
-  return Promise
-    .all([])
-    .then(getFaxQueues(req.user))
-    .then(function(condition) {
-      return ReportFaxSession
-        .findAll(Util.getQuery(req.query, _.merge({
-          leaveAt: null
-        }, condition)));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        rows: data
-      });
-    })
-    .catch(handleError(res));
-};
-
-function getFaxQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return User
-          .findById(user.id, {
-            attributes: ['id']
-          })
-          .then(Util.getFaxQueuesIdByUser({}, {
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: User,
-              attributes: ['id']
-            }]
-          }))
-          .then(function(userQueues) {
-            var users = [];
-            userQueues.rows.forEach(function(queue) {
-              users = _.union(users, _.map(queue.Users, 'id'));
-            });
-            return {
-              $or: {
-                queue: _.map(userQueues.rows, 'id'),
-                memberid: users
-              }
-            };
-          });
-      case 'agent':
-        return User
-          .findById(user.id, {
-            attributes: ['id']
-          })
-          .then(function(agent) {
-            return agent
-              .getFaxQueues({
-                attributes: ['id']
-              });
-          })
-          .then(function(userQueues) {
-            return {
-              $or: {
-                queue: _.map(userQueues, 'id'),
-                memberid: user.id
-              }
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
+var _0x1768=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x55\x73\x65\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x75\x73\x65\x72","\x61\x6C\x6C","\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65"];_0x1768[0];var _=require(_0x1768[1]);var Util=require(_0x1768[2]);var ReportFaxSession=require(_0x1768[4])[_0x1768[3]];var ReportFaxSessionHistory=require(_0x1768[4])[_0x1768[6]][_0x1768[5]];var User=require(_0x1768[4])[_0x1768[7]];function handleError(_0xc0b2x7,_0xc0b2x8){_0xc0b2x8= _0xc0b2x8|| 500;return function(_0xc0b2x9){_0xc0b2x7[_0x1768[9]](_0xc0b2x8)[_0x1768[8]](_0xc0b2x9)}}function responseWithResult(_0xc0b2x7,_0xc0b2x8){_0xc0b2x8= _0xc0b2x8|| 200;return function(_0xc0b2xb){if(_0xc0b2xb){_0xc0b2x7[_0x1768[9]](_0xc0b2x8)[_0x1768[10]](_0xc0b2xb)}}}function responseWithoutResult(_0xc0b2x7,_0xc0b2x8){_0xc0b2x8= _0xc0b2x8|| 204;return function(){_0xc0b2x7[_0x1768[11]](_0xc0b2x8)}}function handleEntityNotFound(_0xc0b2x7){return function(_0xc0b2xb){if(!_0xc0b2xb){_0xc0b2x7[_0x1768[9]](404)[_0x1768[12]]();return null};return _0xc0b2xb}}function saveUpdates(_0xc0b2xf){return function(_0xc0b2xb){return _0xc0b2xb[_0x1768[14]](_0xc0b2xf)[_0x1768[13]](function(_0xc0b2x10){return _0xc0b2x10})}}function removeEntity(_0xc0b2x7){return function(_0xc0b2xb){if(_0xc0b2xb){return _0xc0b2xb[_0x1768[15]]()[_0x1768[13]](function(){_0xc0b2x7[_0x1768[9]](204)[_0x1768[12]]()})}}}exports[_0x1768[16]]= function(_0xc0b2x12,_0xc0b2x7){return ReportFaxSession[_0x1768[20]](Util[_0x1768[19]](_0xc0b2x12[_0x1768[18]]))[_0x1768[13]](responseWithResult(_0xc0b2x7))[_0x1768[17]](handleError(_0xc0b2x7))};exports[_0x1768[21]]= function(_0xc0b2x12,_0xc0b2x7){return ReportFaxSession[_0x1768[24]](_0xc0b2x12[_0x1768[23]][_0x1768[22]])[_0x1768[13]](handleEntityNotFound(_0xc0b2x7))[_0x1768[13]](responseWithResult(_0xc0b2x7))[_0x1768[17]](handleError(_0xc0b2x7))};exports[_0x1768[25]]= function(_0xc0b2x12,_0xc0b2x7){return ReportFaxSession[_0x1768[25]](_0xc0b2x12[_0x1768[26]])[_0x1768[13]](responseWithResult(_0xc0b2x7,201))[_0x1768[17]](handleError(_0xc0b2x7))};exports[_0x1768[27]]= function(_0xc0b2x12,_0xc0b2x7){if(_0xc0b2x12[_0x1768[26]][_0x1768[22]]){delete _0xc0b2x12[_0x1768[26]][_0x1768[22]]};return ReportFaxSession[_0x1768[24]](_0xc0b2x12[_0x1768[23]][_0x1768[22]])[_0x1768[13]](handleEntityNotFound(_0xc0b2x7))[_0x1768[13]](saveUpdates(_0xc0b2x12[_0x1768[26]]))[_0x1768[13]](responseWithResult(_0xc0b2x7))[_0x1768[17]](handleError(_0xc0b2x7))};exports[_0x1768[15]]= function(_0xc0b2x12,_0xc0b2x7){return ReportFaxSession[_0x1768[24]](_0xc0b2x12[_0x1768[23]][_0x1768[22]])[_0x1768[13]](handleEntityNotFound(_0xc0b2x7))[_0x1768[13]](removeEntity(_0xc0b2x7))[_0x1768[17]](handleError(_0xc0b2x7))};exports[_0x1768[28]]= function(_0xc0b2x12,_0xc0b2x7){return ReportFaxSessionHistory[_0x1768[28]]()[_0x1768[13]](function(_0xc0b2x13){return _0xc0b2x7[_0x1768[9]](200)[_0x1768[8]](_0xc0b2x13)})[_0x1768[17]](handleError(_0xc0b2x7))};exports[_0x1768[29]]= function(_0xc0b2x12,_0xc0b2x7){return Promise[_0x1768[34]]([])[_0x1768[13]](getFaxQueues(_0xc0b2x12[_0x1768[33]]))[_0x1768[13]](function(_0xc0b2x15){return ReportFaxSession[_0x1768[32]](Util[_0x1768[19]](_0xc0b2x12[_0x1768[18]],_[_0x1768[31]]({timeout:true},_0xc0b2x15)))})[_0x1768[13]](function(_0xc0b2x14){return _0xc0b2x7[_0x1768[9]](200)[_0x1768[8]]({value:_0xc0b2x14})})[_0x1768[17]](function(_0xc0b2x9){console[_0x1768[30]](_0xc0b2x9);return handleError(_0xc0b2x7,_0xc0b2x9)})};exports[_0x1768[35]]= function(_0xc0b2x12,_0xc0b2x7){return Promise[_0x1768[34]]([])[_0x1768[13]](getFaxQueues(_0xc0b2x12[_0x1768[33]]))[_0x1768[13]](function(_0xc0b2x15){return ReportFaxSession[_0x1768[32]](Util[_0x1768[19]](_0xc0b2x12[_0x1768[18]],_[_0x1768[31]]({leaveAt:null},_0xc0b2x15)))})[_0x1768[13]](function(_0xc0b2x14){return _0xc0b2x7[_0x1768[9]](200)[_0x1768[8]]({value:_0xc0b2x14})})[_0x1768[17]](function(_0xc0b2x9){console[_0x1768[30]](_0xc0b2x9);return handleError(_0xc0b2x7,_0xc0b2x9)})};exports[_0x1768[36]]= function(_0xc0b2x12,_0xc0b2x7){return Promise[_0x1768[34]]([])[_0x1768[13]](getFaxQueues(_0xc0b2x12[_0x1768[33]]))[_0x1768[13]](function(_0xc0b2x15){return ReportFaxSession[_0x1768[20]](Util[_0x1768[19]](_0xc0b2x12[_0x1768[18]],_[_0x1768[31]]({leaveAt:null},_0xc0b2x15)))})[_0x1768[13]](function(_0xc0b2x14){return _0xc0b2x7[_0x1768[9]](200)[_0x1768[8]]({rows:_0xc0b2x14})})[_0x1768[17]](handleError(_0xc0b2x7))};function getFaxQueues(_0xc0b2x17){return function(){switch(_0xc0b2x17[_0x1768[44]]){case _0x1768[33]:return User[_0x1768[24]](_0xc0b2x17[_0x1768[22]],{attributes:[_0x1768[22]]})[_0x1768[13]](Util[_0x1768[41]]({},{attributes:[_0x1768[22]],include:[{raw:true,model:User,attributes:[_0x1768[22]]}]}))[_0x1768[13]](function(_0xc0b2x18){var _0xc0b2x19=[];_0xc0b2x18[_0x1768[40]][_0x1768[39]](function(_0xc0b2x1a){_0xc0b2x19= _[_0x1768[38]](_0xc0b2x19,_[_0x1768[37]](_0xc0b2x1a.Users,_0x1768[22]))});return {$or:{queue:_[_0x1768[37]](_0xc0b2x18[_0x1768[40]],_0x1768[22]),memberid:_0xc0b2x19}}});case _0x1768[43]:return User[_0x1768[24]](_0xc0b2x17[_0x1768[22]],{attributes:[_0x1768[22]]})[_0x1768[13]](function(_0xc0b2x1b){return _0xc0b2x1b[_0x1768[42]]({attributes:[_0x1768[22]]})})[_0x1768[13]](function(_0xc0b2x18){return {$or:{queue:_[_0x1768[37]](_0xc0b2x18,_0x1768[22]),memberid:_0xc0b2x17[_0x1768[22]]}}});default:return {}}}}
\ No newline at end of file
diff --git a/server/api/report_fax_session/report_fax_session.events.js b/server/api/report_fax_session/report_fax_session.events.js
index 6d9b5cc..8718a2c 100644
--- a/server/api/report_fax_session/report_fax_session.events.js
+++ b/server/api/report_fax_session/report_fax_session.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportFaxSession = require('../../models').ReportFaxSession;
-
-var ReportFaxSessionEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportFaxSessionEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportFaxSession.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportFaxSessionEvents.emit(event + ':' + doc._id, doc);
-    ReportFaxSessionEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportFaxSessionEvents;
+var _0xbcf6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xbcf6[0];const EventEmitter=require(_0xbcf6[1]);const ReportFaxSession=require(_0xbcf6[3])[_0xbcf6[2]];var ReportFaxSessionEvents= new EventEmitter();ReportFaxSessionEvents[_0xbcf6[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xbcf6[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xbcf6[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xbcf6[6]};for(var e in events){var event=events[e];ReportFaxSession[_0xbcf6[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x5bafx8,_0x5bafx9,_0x5bafxa){ReportFaxSessionEvents[_0xbcf6[10]](event+ _0xbcf6[8]+ _0x5bafx8[_0xbcf6[9]],_0x5bafx8);ReportFaxSessionEvents[_0xbcf6[10]](event,_0x5bafx8);_0x5bafxa(null)}}module[_0xbcf6[11]]= ReportFaxSessionEvents
\ No newline at end of file
diff --git a/server/api/report_fax_session/report_fax_session.socket.js b/server/api/report_fax_session/report_fax_session.socket.js
index 53585b9..1acb3a5 100644
--- a/server/api/report_fax_session/report_fax_session.socket.js
+++ b/server/api/report_fax_session/report_fax_session.socket.js
@@ -1,104 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const ReportFaxSession = require('./report_fax_session.events');
-const User = require('../../models').User;
-const Util = require('../../config/util');
-const _ = require('lodash');
-const Promise = require('bluebird');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_fax_session:' + event, socket);
-
-    ReportFaxSession.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'report_fax_session:save':
-        return Promise
-          .all([])
-          .then(getFaxQueues(socket))
-          .then(function(condition) {
-            if (socket.role === 'admin' || _.includes(condition.memberid, doc.memberid) || _.includes(condition.queue, doc.queue)) {
-              socket.emit(event, doc);
-            }
-          })
-          .catch(function(err) {
-            console.log('Error filtering report fax sessions after save', err);
-          });
-      case 'report_fax_session:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportFaxSession.removeListener(event, listener);
-  };
-}
-
-function getFaxQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(Util.getFaxQueuesIdByUser({}, {
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: User,
-              attributes: ['id']
-            }]
-          }))
-          .then(function(userQueues) {
-            var users = [];
-            userQueues.rows.forEach(function(queue) {
-              users = _.union(users, _.map(queue.Users, 'id'));
-            });
-            return {
-              queue: _.map(userQueues.rows, 'id'),
-              memberid: users
-            };
-          });
-      case 'agent':
-        return User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(function(agent) {
-            return agent
-              .getFaxQueues({
-                attributes: ['id']
-              });
-          })
-          .then(function(userQueues) {
-            return {
-              queue: _.map(userQueues, 'id'),
-              memberid: user.userId
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
+var _0x844e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x45\x72\x72\x6F\x72\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x66\x61\x78\x20\x73\x65\x73\x73\x69\x6F\x6E\x73\x20\x61\x66\x74\x65\x72\x20\x73\x61\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x71\x75\x65\x75\x65","\x65\x6D\x69\x74","\x74\x68\x65\x6E","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74"];_0x844e[0];const ReportFaxSession=require(_0x844e[1]);const User=require(_0x844e[3])[_0x844e[2]];const Util=require(_0x844e[4]);const _=require(_0x844e[5]);const Promise=require(_0x844e[6]);var events=[_0x844e[7],_0x844e[8]];exports[_0x844e[9]]= function(_0xef86x7){for(var _0xef86x8=0,_0xef86x9=events[_0x844e[10]];_0xef86x8< _0xef86x9;_0xef86x8++){var _0xef86xa=events[_0xef86x8];var _0xef86xb=createListener(_0x844e[11]+ _0xef86xa,_0xef86x7);ReportFaxSession[_0x844e[12]](_0xef86xa,_0xef86xb);_0xef86x7[_0x844e[12]](_0x844e[13],removeListener(_0xef86xa,_0xef86xb))}};function createListener(_0xef86xa,_0xef86x7){return function(_0xef86xd){switch(_0xef86xa){case _0x844e[25]:return Promise[_0x844e[24]]([])[_0x844e[23]](getFaxQueues(_0xef86x7))[_0x844e[23]](function(_0xef86xf){if(_0xef86x7[_0x844e[17]]=== _0x844e[18]|| _[_0x844e[20]](_0xef86xf[_0x844e[19]],_0xef86xd[_0x844e[19]])|| _[_0x844e[20]](_0xef86xf[_0x844e[21]],_0xef86xd[_0x844e[21]])){_0xef86x7[_0x844e[22]](_0xef86xa,_0xef86xd)}})[_0x844e[16]](function(_0xef86xe){console[_0x844e[15]](_0x844e[14],_0xef86xe)});case _0x844e[26]:_0xef86x7[_0x844e[22]](_0xef86xa,_0xef86xd);break;default:}}}function removeListener(_0xef86xa,_0xef86xb){return function(){ReportFaxSession[_0x844e[27]](_0xef86xa,_0xef86xb)}}function getFaxQueues(_0xef86x12){return function(){switch(_0xef86x12[_0x844e[17]]){case _0x844e[36]:return User[_0x844e[35]](_0xef86x12[_0x844e[34]],{attributes:[_0x844e[28]]})[_0x844e[23]](Util[_0x844e[33]]({},{attributes:[_0x844e[28]],include:[{raw:true,model:User,attributes:[_0x844e[28]]}]}))[_0x844e[23]](function(_0xef86x13){var _0xef86x14=[];_0xef86x13[_0x844e[32]][_0x844e[31]](function(_0xef86x15){_0xef86x14= _[_0x844e[30]](_0xef86x14,_[_0x844e[29]](_0xef86x15.Users,_0x844e[28]))});return {queue:_[_0x844e[29]](_0xef86x13[_0x844e[32]],_0x844e[28]),memberid:_0xef86x14}});case _0x844e[38]:return User[_0x844e[35]](_0xef86x12[_0x844e[34]],{attributes:[_0x844e[28]]})[_0x844e[23]](function(_0xef86x16){return _0xef86x16[_0x844e[37]]({attributes:[_0x844e[28]]})})[_0x844e[23]](function(_0xef86x13){return {queue:_[_0x844e[29]](_0xef86x13,_0x844e[28]),memberid:_0xef86x12[_0x844e[34]]}});default:return {}}}}
\ No newline at end of file
diff --git a/server/api/report_integration/index.js b/server/api/report_integration/index.js
index 1b62e8a..300661b 100644
--- a/server/api/report_integration/index.js
+++ b/server/api/report_integration/index.js
@@ -1,14 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./report_integration.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index);
-router.get('/describe', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.describe);
-router.post('/', controller.create);
-router.post('/:integration', controller.create);
-
-module.exports = router;
+var _0x718a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x718a[0];var express=require(_0x718a[1]);var controller=require(_0x718a[2]);var auth=require(_0x718a[3]);var router=express.Router();router[_0x718a[9]](_0x718a[4],auth[_0x718a[5]](),auth[_0x718a[7]]([17],[_0x718a[6]]),controller[_0x718a[8]]);router[_0x718a[9]](_0x718a[10],auth[_0x718a[5]](),auth[_0x718a[7]]([17],[_0x718a[6]]),controller[_0x718a[11]]);router[_0x718a[13]](_0x718a[4],controller[_0x718a[12]]);router[_0x718a[13]](_0x718a[14],controller[_0x718a[12]]);module[_0x718a[15]]= router
\ No newline at end of file
diff --git a/server/api/report_integration/report_integration.controller.js b/server/api/report_integration/report_integration.controller.js
index b63b7a6..e4c3bc0 100644
--- a/server/api/report_integration/report_integration.controller.js
+++ b/server/api/report_integration/report_integration.controller.js
@@ -1,61 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var ReportIntegration = require('../../models').ReportIntegration;
-var ReportIntegrationHistory = require('../../models').history.ReportIntegrationHistory;
-var Util = require('../../config/util');
-const moment = require('moment');
-
-// Get list of report_integrations
-exports.index = function(req, res, next) {
-  return ReportIntegration
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return ReportIntegrationHistory
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new report_integration in the DB.
-exports.create = function(req, res) {
-  if (req.params.integration) {
-    req.body.integration = req.params.integration;
-    switch (req.params.integration) {
-      case 'tdDisposal':
-        req.body.ticketId = req.body.id_spooler;
-        req.body.eventChannel = 'voice';
-        req.body.destcalleridnum = req.body.number;
-        req.body.membername = req.body.linked_channel ? req.body.linked_channel.split(/\/|-/)[1] : null;
-        req.body.agentconnectAt = moment(req.body.timestamp);
-        break;
-      default:
-        return res.sendStatus(404);
-    }
-  }
-  return ReportIntegration
-    .create(req.body)
-    .then(function(report_integration) {
-      return res.status(201).send(report_integration);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x963a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x63\x72\x65\x61\x74\x65","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x70\x61\x72\x61\x6D\x73","\x62\x6F\x64\x79","\x74\x69\x63\x6B\x65\x74\x49\x64","\x69\x64\x5F\x73\x70\x6F\x6F\x6C\x65\x72","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x76\x6F\x69\x63\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6E\x75\x6D\x62\x65\x72","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x6C\x69\x6E\x6B\x65\x64\x5F\x63\x68\x61\x6E\x6E\x65\x6C","\x73\x70\x6C\x69\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x74\x69\x6D\x65\x73\x74\x61\x6D\x70","\x74\x64\x44\x69\x73\x70\x6F\x73\x61\x6C","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73"];_0x963a[0];var _=require(_0x963a[1]);var ReportIntegration=require(_0x963a[3])[_0x963a[2]];var ReportIntegrationHistory=require(_0x963a[3])[_0x963a[5]][_0x963a[4]];var Util=require(_0x963a[6]);const moment=require(_0x963a[7]);exports[_0x963a[8]]= function(_0xca24x6,_0xca24x7,_0xca24x8){return ReportIntegration[_0x963a[15]](Util[_0x963a[14]](_0xca24x6[_0x963a[13]]))[_0x963a[12]](function(_0xca24xa){return _0xca24x7[_0x963a[11]](200)[_0x963a[10]](_0xca24xa)})[_0x963a[9]](function(_0xca24x9){return handleError(_0xca24x7,_0xca24x9)})};exports[_0x963a[16]]= function(_0xca24x6,_0xca24x7){return ReportIntegrationHistory[_0x963a[16]]()[_0x963a[12]](function(_0xca24xb){return _0xca24x7[_0x963a[11]](200)[_0x963a[10]](_0xca24xb)})[_0x963a[9]](function(_0xca24x9){return handleError(_0xca24x7,_0xca24x9)})};exports[_0x963a[17]]= function(_0xca24x6,_0xca24x7){if(_0xca24x6[_0x963a[19]][_0x963a[18]]){_0xca24x6[_0x963a[20]][_0x963a[18]]= _0xca24x6[_0x963a[19]][_0x963a[18]];switch(_0xca24x6[_0x963a[19]][_0x963a[18]]){case _0x963a[32]:_0xca24x6[_0x963a[20]][_0x963a[21]]= _0xca24x6[_0x963a[20]][_0x963a[22]];_0xca24x6[_0x963a[20]][_0x963a[23]]= _0x963a[24];_0xca24x6[_0x963a[20]][_0x963a[25]]= _0xca24x6[_0x963a[20]][_0x963a[26]];_0xca24x6[_0x963a[20]][_0x963a[27]]= _0xca24x6[_0x963a[20]][_0x963a[28]]?_0xca24x6[_0x963a[20]][_0x963a[28]][_0x963a[29]](/\/|-/)[1]:null;_0xca24x6[_0x963a[20]][_0x963a[30]]= moment(_0xca24x6[_0x963a[20]][_0x963a[31]]);break;default:return _0xca24x7[_0x963a[33]](404)}};return ReportIntegration[_0x963a[17]](_0xca24x6[_0x963a[20]])[_0x963a[12]](function(_0xca24xc){return _0xca24x7[_0x963a[11]](201)[_0x963a[10]](_0xca24xc)})[_0x963a[9]](function(_0xca24x9){return handleError(_0xca24x7,_0xca24x9)})};function handleError(_0xca24x7,_0xca24x9){return _0xca24x7[_0x963a[11]](500)[_0x963a[10]](_0xca24x9)}
\ No newline at end of file
diff --git a/server/api/report_integration/report_integration.events.js b/server/api/report_integration/report_integration.events.js
index ea294b9..a15b46e 100644
--- a/server/api/report_integration/report_integration.events.js
+++ b/server/api/report_integration/report_integration.events.js
@@ -1,34 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportIntegration = require('../../models').ReportIntegration;
-
-var ReportIntegrationEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportIntegrationEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportIntegration.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportIntegrationEvents.emit(event + ':' + doc._id, doc);
-    ReportIntegrationEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportIntegrationEvents;
+var _0xea7f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xea7f[0];const EventEmitter=require(_0xea7f[1]);const ReportIntegration=require(_0xea7f[3])[_0xea7f[2]];var ReportIntegrationEvents= new EventEmitter();ReportIntegrationEvents[_0xea7f[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xea7f[5]};for(var e in events){var event=events[e];ReportIntegration[_0xea7f[6]](e,emitEvent(event))};function emitEvent(event){return function(_0x4b1ax8,_0x4b1ax9,_0x4b1axa){ReportIntegrationEvents[_0xea7f[9]](event+ _0xea7f[7]+ _0x4b1ax8[_0xea7f[8]],_0x4b1ax8);ReportIntegrationEvents[_0xea7f[9]](event,_0x4b1ax8);_0x4b1axa(null)}}module[_0xea7f[10]]= ReportIntegrationEvents
\ No newline at end of file
diff --git a/server/api/report_integration/report_integration.socket.js b/server/api/report_integration/report_integration.socket.js
index 78f2dea..34415b8 100644
--- a/server/api/report_integration/report_integration.socket.js
+++ b/server/api/report_integration/report_integration.socket.js
@@ -1,41 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const ReportIntegrationEvents = require('./report_integration.events');
-const util = require('util');
-
-// Model events to emit
-var events = ['save'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_integration:' + event, socket);
-
-    ReportIntegrationEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'report_integration:save':
-        if (socket.name === doc.membername) {
-          socket.emit(util.format('report_integration:%s', doc.integration), doc);
-        }
-        break;
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportIntegrationEvents.removeListener(event, listener);
-  };
-}
+var _0x30eb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x75\x74\x69\x6C","\x73\x61\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x74\x64\x44\x69\x73\x70\x6F\x73\x61\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x30eb[0];const ReportIntegrationEvents=require(_0x30eb[1]);const util=require(_0x30eb[2]);var events=[_0x30eb[3]];exports[_0x30eb[4]]= function(_0x2c1ex4){for(var _0x2c1ex5=0,_0x2c1ex6=events[_0x30eb[5]];_0x2c1ex5< _0x2c1ex6;_0x2c1ex5++){var _0x2c1ex7=events[_0x2c1ex5];var _0x2c1ex8=createListener(_0x30eb[6]+ _0x2c1ex7,_0x2c1ex4);ReportIntegrationEvents[_0x30eb[7]](_0x2c1ex7,_0x2c1ex8);_0x2c1ex4[_0x30eb[7]](_0x30eb[8],removeListener(_0x2c1ex7,_0x2c1ex8))}};function createListener(_0x2c1ex7,_0x2c1ex4){return function(_0x2c1exa){switch(_0x2c1ex7){case _0x30eb[16]:if(_0x2c1ex4[_0x30eb[9]]=== _0x2c1exa[_0x30eb[10]]&& _0x2c1exa[_0x30eb[11]]=== _0x30eb[12]){_0x2c1ex4[_0x30eb[15]](util[_0x30eb[14]](_0x30eb[13],_0x2c1exa[_0x30eb[11]]),_0x2c1exa)};break;default:}}}function removeListener(_0x2c1ex7,_0x2c1ex8){return function(){ReportIntegrationEvents[_0x30eb[17]](_0x2c1ex7,_0x2c1ex8)}}
\ No newline at end of file
diff --git a/server/api/report_mail/index.js b/server/api/report_mail/index.js
index 9256f76..b1e1d37 100644
--- a/server/api/report_mail/index.js
+++ b/server/api/report_mail/index.js
@@ -1,14 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./report_mail.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), license.hasMail(), auth.hasModule([17], ['admin', 'agent']), controller.index);
-router.get('/:id/accept/:uniqueid', auth.isAuthenticated(), license.hasMail(), auth.hasRole('agent'), controller.accept);
-router.get('/:id/reject', auth.isAuthenticated(), license.hasMail(), auth.hasRole('agent'), controller.reject);
-
-module.exports = router;
+var _0xe7a7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x4D\x61\x69\x6C","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x68\x61\x73\x52\x6F\x6C\x65","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xe7a7[0];var express=require(_0xe7a7[1]);var controller=require(_0xe7a7[2]);var auth=require(_0xe7a7[3]);var license=require(_0xe7a7[4]);var router=express.Router();router[_0xe7a7[12]](_0xe7a7[5],auth[_0xe7a7[6]](),license[_0xe7a7[7]](),auth[_0xe7a7[10]]([17],[_0xe7a7[8],_0xe7a7[9]]),controller[_0xe7a7[11]]);router[_0xe7a7[12]](_0xe7a7[13],auth[_0xe7a7[6]](),license[_0xe7a7[7]](),auth[_0xe7a7[14]](_0xe7a7[9]),controller[_0xe7a7[15]]);router[_0xe7a7[12]](_0xe7a7[16],auth[_0xe7a7[6]](),license[_0xe7a7[7]](),auth[_0xe7a7[14]](_0xe7a7[9]),controller[_0xe7a7[17]]);module[_0xe7a7[18]]= router
\ No newline at end of file
diff --git a/server/api/report_mail/report_mail.controller.js b/server/api/report_mail/report_mail.controller.js
index c0a5cde..a656653 100644
--- a/server/api/report_mail/report_mail.controller.js
+++ b/server/api/report_mail/report_mail.controller.js
@@ -1,113 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var moment = require('moment');
-
-var Report = require('../../models').ReportMail;
-var Room = require('../../models').MailRoom;
-var Status = require('../../models').MailRoomStatus;
-
-var sequelize = require('../../models').sequelize;
-
-var Util = require('../../config/util');
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  var where = {};
-  if (req.user.role === 'agent') {
-    where.membername = req.user.name;
-  }
-  return Report
-    .findAndCountAll(Util.getQuery(req.query, where))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single reportMail
-exports.accept = function(req, res) {
-  var _roomid = req.params.uniqueid.split('.')[1];
-
-  return Report
-    .findById(req.params.id)
-    .then(function(reportMail) {
-      if (!reportMail) {
-        return res.sendStatus(404);
-      }
-
-      var updated = _.merge(reportMail, {
-        connectid: req.params.uniqueid
-      });
-
-      return updated
-        .save();
-    })
-    .then(function() {
-      return Room
-        .update({
-          status: 'OPEN',
-          openReason: 'agent'
-        }, {
-          where: {
-            id: _roomid
-          },
-          user: req.user,
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return res.sendStatus(504);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single reportMail
-exports.reject = function(req, res) {
-  var _report;
-
-  return Report
-    .findById(req.params.id)
-    .then(function(report) {
-      _report = report;
-
-      if (!_report) {
-        return res.sendStatus(404);
-      }
-
-      var updated = _.merge(report, {
-        rejectedAt: moment().format("YYYY-MM-DD HH:mm:ss")
-      });
-
-      return updated
-        .save();
-    })
-    .then(function() {
-      return Status
-        .create({
-          status: 'REJECT',
-          data1: req.user.name,
-          data2: req.user.fullname,
-          UserId: req.user.id,
-          MailRoomId: _report.roomid
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  console.log(err);
-  return res.status(500).send(err);
-}
+var _0x1bea=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x63\x63\x65\x70\x74","\x2E","\x73\x70\x6C\x69\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x4F\x50\x45\x4E","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x65\x6A\x65\x63\x74","\x52\x45\x4A\x45\x43\x54","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x72\x6F\x6F\x6D\x69\x64","\x63\x72\x65\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67"];_0x1bea[0];var _=require(_0x1bea[1]);var moment=require(_0x1bea[2]);var Report=require(_0x1bea[4])[_0x1bea[3]];var Room=require(_0x1bea[4])[_0x1bea[5]];var Status=require(_0x1bea[4])[_0x1bea[6]];var sequelize=require(_0x1bea[4])[_0x1bea[7]];var Util=require(_0x1bea[8]);exports[_0x1bea[9]]= function(_0x54d4x8,_0x54d4x9,_0x54d4xa){var _0x54d4xb={};if(_0x54d4x8[_0x1bea[11]][_0x1bea[10]]=== _0x1bea[12]){_0x54d4xb[_0x1bea[13]]= _0x54d4x8[_0x1bea[11]][_0x1bea[14]]};return Report[_0x1bea[21]](Util[_0x1bea[20]](_0x54d4x8[_0x1bea[19]],_0x54d4xb))[_0x1bea[18]](function(_0x54d4xd){_0x54d4x9[_0x1bea[17]](200)[_0x1bea[16]](_0x54d4xd)})[_0x1bea[15]](function(_0x54d4xc){return handleError(_0x54d4x9,_0x54d4xc)})};exports[_0x1bea[22]]= function(_0x54d4x8,_0x54d4x9){var _0x54d4xe=_0x54d4x8[_0x1bea[26]][_0x1bea[25]][_0x1bea[24]](_0x1bea[23])[1];return Report[_0x1bea[33]](_0x54d4x8[_0x1bea[26]][_0x1bea[32]])[_0x1bea[18]](function(_0x54d4xf){if(!_0x54d4xf){return _0x54d4x9[_0x1bea[27]](404)};var _0x54d4x10=_[_0x1bea[30]](_0x54d4xf,{connectid:_0x54d4x8[_0x1bea[26]][_0x1bea[25]]});return _0x54d4x10[_0x1bea[31]]()})[_0x1bea[18]](function(){return Room[_0x1bea[29]]({status:_0x1bea[28],openReason:_0x1bea[12]},{where:{id:_0x54d4xe},user:_0x54d4x8[_0x1bea[11]],individualHooks:true})})[_0x1bea[18]](function(){return _0x54d4x9[_0x1bea[27]](200)})[_0x1bea[15]](sequelize.UniqueConstraintError,function(_0x54d4xc){return _0x54d4x9[_0x1bea[27]](504)})[_0x1bea[15]](function(_0x54d4xc){return handleError(_0x54d4x9,_0x54d4xc)})};exports[_0x1bea[34]]= function(_0x54d4x8,_0x54d4x9){var _0x54d4x11;return Report[_0x1bea[33]](_0x54d4x8[_0x1bea[26]][_0x1bea[32]])[_0x1bea[18]](function(_0x54d4x12){_0x54d4x11= _0x54d4x12;if(!_0x54d4x11){return _0x54d4x9[_0x1bea[27]](404)};var _0x54d4x10=_[_0x1bea[30]](_0x54d4x12,{rejectedAt:moment()[_0x1bea[40]](_0x1bea[39])});return _0x54d4x10[_0x1bea[31]]()})[_0x1bea[18]](function(){return Status[_0x1bea[38]]({status:_0x1bea[35],data1:_0x54d4x8[_0x1bea[11]][_0x1bea[14]],data2:_0x54d4x8[_0x1bea[11]][_0x1bea[36]],UserId:_0x54d4x8[_0x1bea[11]][_0x1bea[32]],MailRoomId:_0x54d4x11[_0x1bea[37]]})})[_0x1bea[18]](function(){return _0x54d4x9[_0x1bea[27]](200)})[_0x1bea[15]](function(_0x54d4xc){return handleError(_0x54d4x9,_0x54d4xc)})};function handleError(_0x54d4x9,_0x54d4xc){console[_0x1bea[41]](_0x54d4xc);return _0x54d4x9[_0x1bea[17]](500)[_0x1bea[16]](_0x54d4xc)}
\ No newline at end of file
diff --git a/server/api/report_mail/report_mail.events.js b/server/api/report_mail/report_mail.events.js
index 4a48caa..57dcd77 100644
--- a/server/api/report_mail/report_mail.events.js
+++ b/server/api/report_mail/report_mail.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportMail = require('../../models').ReportMail;
-
-var ReportMailEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportMailEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'update',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportMail.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportMailEvents.emit(event + ':' + doc._id, doc);
-    ReportMailEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportMailEvents;
+var _0x5709=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x5709[0];const EventEmitter=require(_0x5709[1]);const ReportMail=require(_0x5709[3])[_0x5709[2]];var ReportMailEvents= new EventEmitter();ReportMailEvents[_0x5709[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x5709[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x5709[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x5709[7]};for(var e in events){var event=events[e];ReportMail[_0x5709[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x7e2ex8,_0x7e2ex9,_0x7e2exa){ReportMailEvents[_0x5709[11]](event+ _0x5709[9]+ _0x7e2ex8[_0x5709[10]],_0x7e2ex8);ReportMailEvents[_0x5709[11]](event,_0x7e2ex8);_0x7e2exa(null)}}module[_0x5709[12]]= ReportMailEvents
\ No newline at end of file
diff --git a/server/api/report_mail/report_mail.socket.js b/server/api/report_mail/report_mail.socket.js
index 0b9cab3..3f61f7e 100644
--- a/server/api/report_mail/report_mail.socket.js
+++ b/server/api/report_mail/report_mail.socket.js
@@ -1,46 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const ReportMailEvents = require('./report_mail.events');
-
-// Model events to emit
-var events = ['save', 'update', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_mail:' + event, socket);
-
-    ReportMailEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'report_mail:save':
-      case 'report_mail:update':
-        if (socket.name === doc.membername || socket.role === 'admin') {
-          socket.emit(event, doc);
-        }
-        break;
-
-      case 'report_mail:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportMailEvents.removeListener(event, listener);
-  };
-}
+var _0x10ad=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x3A\x73\x61\x76\x65","\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x3A\x75\x70\x64\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x10ad[0];const ReportMailEvents=require(_0x10ad[1]);var events=[_0x10ad[2],_0x10ad[3],_0x10ad[4]];exports[_0x10ad[5]]= function(_0xf0bdx3){for(var _0xf0bdx4=0,_0xf0bdx5=events[_0x10ad[6]];_0xf0bdx4< _0xf0bdx5;_0xf0bdx4++){var _0xf0bdx6=events[_0xf0bdx4];var _0xf0bdx7=createListener(_0x10ad[7]+ _0xf0bdx6,_0xf0bdx3);ReportMailEvents[_0x10ad[8]](_0xf0bdx6,_0xf0bdx7);_0xf0bdx3[_0x10ad[8]](_0x10ad[9],removeListener(_0xf0bdx6,_0xf0bdx7))}};function createListener(_0xf0bdx6,_0xf0bdx3){return function(_0xf0bdx9){switch(_0xf0bdx6){case _0x10ad[10]:;case _0x10ad[16]:if(_0xf0bdx3[_0x10ad[11]]=== _0xf0bdx9[_0x10ad[12]]|| _0xf0bdx3[_0x10ad[13]]=== _0x10ad[14]){_0xf0bdx3[_0x10ad[15]](_0xf0bdx6,_0xf0bdx9)};break;case _0x10ad[17]:_0xf0bdx3[_0x10ad[15]](_0xf0bdx6,_0xf0bdx9);break;default:}}}function removeListener(_0xf0bdx6,_0xf0bdx7){return function(){ReportMailEvents[_0x10ad[18]](_0xf0bdx6,_0xf0bdx7)}}
\ No newline at end of file
diff --git a/server/api/report_mail_session/index.js b/server/api/report_mail_session/index.js
index 3e04193..8e2ea61 100644
--- a/server/api/report_mail_session/index.js
+++ b/server/api/report_mail_session/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./report_mail_session.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), license.hasMail(), auth.hasModule([17], ['admin']), controller.index);
-router.get('/describe', auth.isAuthenticated(), license.hasMail(), auth.hasModule([17], ['admin']), controller.describe);
-router.get('/timeout', license.isValidDate(), auth.isAuthenticated(), license.hasMail(), auth.hasModule([17], ['admin']), controller.timeout);
-router.get('/waiting', license.isValidDate(), auth.isAuthenticated(), license.hasMail(), auth.hasModule([17], ['admin']), controller.waiting);
-router.get('/waiting/applications', auth.isAuthenticated(), license.hasMail(), auth.hasModule([9], ['admin', 'agent']), controller.waitingApplications);
-
-module.exports = router;
+var _0x3955=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x4D\x61\x69\x6C","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x74\x69\x6D\x65\x6F\x75\x74","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x2F\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67","\x2F\x77\x61\x69\x74\x69\x6E\x67\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x67\x65\x6E\x74","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x3955[0];var express=require(_0x3955[1]);var controller=require(_0x3955[2]);var auth=require(_0x3955[3]);var license=require(_0x3955[4]);var router=express.Router();router[_0x3955[11]](_0x3955[5],auth[_0x3955[6]](),license[_0x3955[7]](),auth[_0x3955[9]]([17],[_0x3955[8]]),controller[_0x3955[10]]);router[_0x3955[11]](_0x3955[12],auth[_0x3955[6]](),license[_0x3955[7]](),auth[_0x3955[9]]([17],[_0x3955[8]]),controller[_0x3955[13]]);router[_0x3955[11]](_0x3955[14],license[_0x3955[15]](),auth[_0x3955[6]](),license[_0x3955[7]](),auth[_0x3955[9]]([17],[_0x3955[8]]),controller[_0x3955[16]]);router[_0x3955[11]](_0x3955[17],license[_0x3955[15]](),auth[_0x3955[6]](),license[_0x3955[7]](),auth[_0x3955[9]]([17],[_0x3955[8]]),controller[_0x3955[18]]);router[_0x3955[11]](_0x3955[19],auth[_0x3955[6]](),license[_0x3955[7]](),auth[_0x3955[9]]([9],[_0x3955[8],_0x3955[20]]),controller[_0x3955[21]]);module[_0x3955[22]]= router
\ No newline at end of file
diff --git a/server/api/report_mail_session/report_mail_session.controller.js b/server/api/report_mail_session/report_mail_session.controller.js
index 1764001..04a392d 100644
--- a/server/api/report_mail_session/report_mail_session.controller.js
+++ b/server/api/report_mail_session/report_mail_session.controller.js
@@ -1,155 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var ReportMailSession = require('../../models').ReportMailSession;
-var ReportMailSessionHistory = require('../../models').history.ReportMailSessionHistory;
-
-var Util = require('../../config/util');
-var User = require('../../models').User;
-var Promise = require('bluebird');
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  return ReportMailSession
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return ReportMailSession
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function getMailQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return User
-          .findById(user.id, {
-            attributes: ['id']
-          })
-          .then(Util.getMailQueuesIdByUser({}, {
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: User,
-              attributes: ['id']
-            }]
-          }))
-          .then(function(userQueues) {
-            var users = [];
-            userQueues.rows.forEach(function(queue) {
-              users = _.union(users, _.map(queue.Users, 'id'));
-            });
-            return {
-              $or: {
-                queue: _.map(userQueues.rows, 'id'),
-                memberid: users
-              }
-            };
-          });
-      case 'agent':
-        return User
-          .findById(user.id, {
-            attributes: ['id']
-          })
-          .then(function(agent) {
-            return agent
-              .getMailQueues({
-                attributes: ['id']
-              });
-          })
-          .then(function(userQueues) {
-            return {
-              $or: {
-                queue: _.map(userQueues, 'id'),
-                memberid: user.id
-              }
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
-
-// Get timeout apps
-exports.timeout = function(req, res) {
-  return Promise
-    .all([])
-    .then(getMailQueues(req.user))
-    .then(function(condition) {
-      return ReportMailSession
-        .count(Util.getQuery(req.query, _.merge({
-          timeout: true
-        }, condition)));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Get waiting apps
-exports.waiting = function(req, res) {
-  return Promise
-    .all([])
-    .then(getMailQueues(req.user))
-    .then(function(condition) {
-      return ReportMailSession
-        .count(Util.getQuery(req.query, _.merge({
-          leaveAt: null
-        }, condition)));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.waitingApplications = function(req, res) {
-  return Promise
-    .all([])
-    .then(getMailQueues(req.user))
-    .then(function(condition) {
-      return ReportMailSession
-        .findAll(Util.getQuery(req.query, _.merge({
-          leaveAt: null
-        }, condition)));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        rows: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x1654=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x1654[0];var _=require(_0x1654[1]);var ReportMailSession=require(_0x1654[3])[_0x1654[2]];var ReportMailSessionHistory=require(_0x1654[3])[_0x1654[5]][_0x1654[4]];var Util=require(_0x1654[6]);var User=require(_0x1654[3])[_0x1654[7]];var Promise=require(_0x1654[8]);exports[_0x1654[9]]= function(_0x49eex7,_0x49eex8,_0x49eex9){return ReportMailSession[_0x1654[16]](Util[_0x1654[15]](_0x49eex7[_0x1654[14]]))[_0x1654[13]](function(_0x49eexb){_0x49eex8[_0x1654[12]](200)[_0x1654[11]](_0x49eexb)})[_0x1654[10]](function(_0x49eexa){return handleError(_0x49eex8,_0x49eexa)})};exports[_0x1654[17]]= function(_0x49eex7,_0x49eex8){return ReportMailSession[_0x1654[17]]()[_0x1654[13]](function(_0x49eexc){return _0x49eex8[_0x1654[12]](200)[_0x1654[11]](_0x49eexc)})[_0x1654[10]](function(_0x49eexa){return handleError(_0x49eex8,_0x49eexa)})};function getMailQueues(_0x49eexe){return function(){switch(_0x49eexe[_0x1654[28]]){case _0x1654[25]:return User[_0x1654[24]](_0x49eexe[_0x1654[18]],{attributes:[_0x1654[18]]})[_0x1654[13]](Util[_0x1654[23]]({},{attributes:[_0x1654[18]],include:[{raw:true,model:User,attributes:[_0x1654[18]]}]}))[_0x1654[13]](function(_0x49eexf){var _0x49eex10=[];_0x49eexf[_0x1654[22]][_0x1654[21]](function(_0x49eex11){_0x49eex10= _[_0x1654[20]](_0x49eex10,_[_0x1654[19]](_0x49eex11.Users,_0x1654[18]))});return {$or:{queue:_[_0x1654[19]](_0x49eexf[_0x1654[22]],_0x1654[18]),memberid:_0x49eex10}}});case _0x1654[27]:return User[_0x1654[24]](_0x49eexe[_0x1654[18]],{attributes:[_0x1654[18]]})[_0x1654[13]](function(_0x49eex12){return _0x49eex12[_0x1654[26]]({attributes:[_0x1654[18]]})})[_0x1654[13]](function(_0x49eexf){return {$or:{queue:_[_0x1654[19]](_0x49eexf,_0x1654[18]),memberid:_0x49eexe[_0x1654[18]]}}});default:return {}}}}exports[_0x1654[29]]= function(_0x49eex7,_0x49eex8){return Promise[_0x1654[33]]([])[_0x1654[13]](getMailQueues(_0x49eex7[_0x1654[25]]))[_0x1654[13]](function(_0x49eex14){return ReportMailSession[_0x1654[32]](Util[_0x1654[15]](_0x49eex7[_0x1654[14]],_[_0x1654[31]]({timeout:true},_0x49eex14)))})[_0x1654[13]](function(_0x49eex13){return _0x49eex8[_0x1654[12]](200)[_0x1654[11]]({value:_0x49eex13})})[_0x1654[10]](function(_0x49eexa){console[_0x1654[30]](_0x49eexa);return handleError(_0x49eex8,_0x49eexa)})};exports[_0x1654[34]]= function(_0x49eex7,_0x49eex8){return Promise[_0x1654[33]]([])[_0x1654[13]](getMailQueues(_0x49eex7[_0x1654[25]]))[_0x1654[13]](function(_0x49eex14){return ReportMailSession[_0x1654[32]](Util[_0x1654[15]](_0x49eex7[_0x1654[14]],_[_0x1654[31]]({leaveAt:null},_0x49eex14)))})[_0x1654[13]](function(_0x49eex13){return _0x49eex8[_0x1654[12]](200)[_0x1654[11]]({value:_0x49eex13})})[_0x1654[10]](function(_0x49eexa){console[_0x1654[30]](_0x49eexa);return handleError(_0x49eex8,_0x49eexa)})};exports[_0x1654[35]]= function(_0x49eex7,_0x49eex8){return Promise[_0x1654[33]]([])[_0x1654[13]](getMailQueues(_0x49eex7[_0x1654[25]]))[_0x1654[13]](function(_0x49eex14){return ReportMailSession[_0x1654[36]](Util[_0x1654[15]](_0x49eex7[_0x1654[14]],_[_0x1654[31]]({leaveAt:null},_0x49eex14)))})[_0x1654[13]](function(_0x49eex13){return _0x49eex8[_0x1654[12]](200)[_0x1654[11]]({rows:_0x49eex13})})[_0x1654[10]](function(_0x49eexa){console[_0x1654[30]](_0x49eexa);return handleError(_0x49eex8,_0x49eexa)})};function handleError(_0x49eex8,_0x49eexa){return _0x49eex8[_0x1654[12]](500)[_0x1654[11]](_0x49eexa)}
\ No newline at end of file
diff --git a/server/api/report_mail_session/report_mail_session.events.js b/server/api/report_mail_session/report_mail_session.events.js
index 95c4a4e..2a44682 100644
--- a/server/api/report_mail_session/report_mail_session.events.js
+++ b/server/api/report_mail_session/report_mail_session.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportMailSession = require('../../models').ReportMailSession;
-
-var ReportMailSessionEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportMailSessionEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportMailSession.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportMailSessionEvents.emit(event + ':' + doc._id, doc);
-    ReportMailSessionEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportMailSessionEvents;
+var _0x3f7a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x3f7a[0];const EventEmitter=require(_0x3f7a[1]);const ReportMailSession=require(_0x3f7a[3])[_0x3f7a[2]];var ReportMailSessionEvents= new EventEmitter();ReportMailSessionEvents[_0x3f7a[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x3f7a[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x3f7a[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x3f7a[6]};for(var e in events){var event=events[e];ReportMailSession[_0x3f7a[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x954fx8,_0x954fx9,_0x954fxa){ReportMailSessionEvents[_0x3f7a[10]](event+ _0x3f7a[8]+ _0x954fx8[_0x3f7a[9]],_0x954fx8);ReportMailSessionEvents[_0x3f7a[10]](event,_0x954fx8);_0x954fxa(null)}}module[_0x3f7a[11]]= ReportMailSessionEvents
\ No newline at end of file
diff --git a/server/api/report_mail_session/report_mail_session.socket.js b/server/api/report_mail_session/report_mail_session.socket.js
index 5014a50..1b5d4b4 100644
--- a/server/api/report_mail_session/report_mail_session.socket.js
+++ b/server/api/report_mail_session/report_mail_session.socket.js
@@ -1,104 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const ReportMailSessionEvents = require('./report_mail_session.events');
-const User = require('../../models').User;
-const Util = require('../../config/util');
-const _ = require('lodash');
-const Promise = require('bluebird');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_mail_session:' + event, socket);
-
-    ReportMailSessionEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'report_mail_session:save':
-        return Promise
-          .all([])
-          .then(getMailQueues(socket))
-          .then(function(condition) {
-            if (socket.role === 'admin' || _.includes(condition.memberid, doc.memberid) || _.includes(condition.queue, doc.queue)) {
-              socket.emit(event, doc);
-            }
-          })
-          .catch(function(err) {
-            console.log('Error filtering report mail sessions after save', err);
-          });
-      case 'report_mail_session:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportMailSessionEvents.removeListener(event, listener);
-  };
-}
-
-function getMailQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(Util.getMailQueuesIdByUser({}, {
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: User,
-              attributes: ['id']
-            }]
-          }))
-          .then(function(userQueues) {
-            var users = [];
-            userQueues.rows.forEach(function(queue) {
-              users = _.union(users, _.map(queue.Users, 'id'));
-            });
-            return {
-              queue: _.map(userQueues.rows, 'id'),
-              memberid: users
-            };
-          });
-      case 'agent':
-        return User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(function(agent) {
-            return agent
-              .getMailQueues({
-                attributes: ['id']
-              });
-          })
-          .then(function(userQueues) {
-            return {
-              queue: _.map(userQueues, 'id'),
-              memberid: user.userId
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
+var _0xe61a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x45\x72\x72\x6F\x72\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x6D\x61\x69\x6C\x20\x73\x65\x73\x73\x69\x6F\x6E\x73\x20\x61\x66\x74\x65\x72\x20\x73\x61\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x71\x75\x65\x75\x65","\x65\x6D\x69\x74","\x74\x68\x65\x6E","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74"];_0xe61a[0];const ReportMailSessionEvents=require(_0xe61a[1]);const User=require(_0xe61a[3])[_0xe61a[2]];const Util=require(_0xe61a[4]);const _=require(_0xe61a[5]);const Promise=require(_0xe61a[6]);var events=[_0xe61a[7],_0xe61a[8]];exports[_0xe61a[9]]= function(_0xfb42x7){for(var _0xfb42x8=0,_0xfb42x9=events[_0xe61a[10]];_0xfb42x8< _0xfb42x9;_0xfb42x8++){var _0xfb42xa=events[_0xfb42x8];var _0xfb42xb=createListener(_0xe61a[11]+ _0xfb42xa,_0xfb42x7);ReportMailSessionEvents[_0xe61a[12]](_0xfb42xa,_0xfb42xb);_0xfb42x7[_0xe61a[12]](_0xe61a[13],removeListener(_0xfb42xa,_0xfb42xb))}};function createListener(_0xfb42xa,_0xfb42x7){return function(_0xfb42xd){switch(_0xfb42xa){case _0xe61a[25]:return Promise[_0xe61a[24]]([])[_0xe61a[23]](getMailQueues(_0xfb42x7))[_0xe61a[23]](function(_0xfb42xf){if(_0xfb42x7[_0xe61a[17]]=== _0xe61a[18]|| _[_0xe61a[20]](_0xfb42xf[_0xe61a[19]],_0xfb42xd[_0xe61a[19]])|| _[_0xe61a[20]](_0xfb42xf[_0xe61a[21]],_0xfb42xd[_0xe61a[21]])){_0xfb42x7[_0xe61a[22]](_0xfb42xa,_0xfb42xd)}})[_0xe61a[16]](function(_0xfb42xe){console[_0xe61a[15]](_0xe61a[14],_0xfb42xe)});case _0xe61a[26]:_0xfb42x7[_0xe61a[22]](_0xfb42xa,_0xfb42xd);break;default:}}}function removeListener(_0xfb42xa,_0xfb42xb){return function(){ReportMailSessionEvents[_0xe61a[27]](_0xfb42xa,_0xfb42xb)}}function getMailQueues(_0xfb42x12){return function(){switch(_0xfb42x12[_0xe61a[17]]){case _0xe61a[36]:return User[_0xe61a[35]](_0xfb42x12[_0xe61a[34]],{attributes:[_0xe61a[28]]})[_0xe61a[23]](Util[_0xe61a[33]]({},{attributes:[_0xe61a[28]],include:[{raw:true,model:User,attributes:[_0xe61a[28]]}]}))[_0xe61a[23]](function(_0xfb42x13){var _0xfb42x14=[];_0xfb42x13[_0xe61a[32]][_0xe61a[31]](function(_0xfb42x15){_0xfb42x14= _[_0xe61a[30]](_0xfb42x14,_[_0xe61a[29]](_0xfb42x15.Users,_0xe61a[28]))});return {queue:_[_0xe61a[29]](_0xfb42x13[_0xe61a[32]],_0xe61a[28]),memberid:_0xfb42x14}});case _0xe61a[38]:return User[_0xe61a[35]](_0xfb42x12[_0xe61a[34]],{attributes:[_0xe61a[28]]})[_0xe61a[23]](function(_0xfb42x16){return _0xfb42x16[_0xe61a[37]]({attributes:[_0xe61a[28]]})})[_0xe61a[23]](function(_0xfb42x13){return {queue:_[_0xe61a[29]](_0xfb42x13,_0xe61a[28]),memberid:_0xfb42x12[_0xe61a[34]]}});default:return {}}}}
\ No newline at end of file
diff --git a/server/api/report_member/index.js b/server/api/report_member/index.js
index 0afbd74..51137b5 100644
--- a/server/api/report_member/index.js
+++ b/server/api/report_member/index.js
@@ -1,12 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./report_member.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index);
-router.get('/describe', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.describe);
-
-module.exports = router;
+var _0xdcbe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xdcbe[0];var express=require(_0xdcbe[1]);var controller=require(_0xdcbe[2]);var auth=require(_0xdcbe[3]);var router=express.Router();router[_0xdcbe[9]](_0xdcbe[4],auth[_0xdcbe[5]](),auth[_0xdcbe[7]]([17],[_0xdcbe[6]]),controller[_0xdcbe[8]]);router[_0xdcbe[9]](_0xdcbe[10],auth[_0xdcbe[5]](),auth[_0xdcbe[7]]([17],[_0xdcbe[6]]),controller[_0xdcbe[11]]);module[_0xdcbe[12]]= router
\ No newline at end of file
diff --git a/server/api/report_member/report_member.controller.js b/server/api/report_member/report_member.controller.js
index 6864b80..6086669 100644
--- a/server/api/report_member/report_member.controller.js
+++ b/server/api/report_member/report_member.controller.js
@@ -1,34 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var ReportMember = require('../../models').ReportMember;
-var ReportMemberHistory = require('../../models').history.ReportMemberHistory;
-var Util = require('../../config/util');
-
-// Get list of report_members
-exports.index = function(req, res, next) {
-  return ReportMember
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return ReportMemberHistory
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x4ead=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x4ead[0];var _=require(_0x4ead[1]);var ReportMember=require(_0x4ead[3])[_0x4ead[2]];var ReportMemberHistory=require(_0x4ead[3])[_0x4ead[5]][_0x4ead[4]];var Util=require(_0x4ead[6]);exports[_0x4ead[7]]= function(_0xd486x5,_0xd486x6,_0xd486x7){return ReportMember[_0x4ead[14]](Util[_0x4ead[13]](_0xd486x5[_0x4ead[12]]))[_0x4ead[11]](function(_0xd486x9){return _0xd486x6[_0x4ead[10]](200)[_0x4ead[9]](_0xd486x9)})[_0x4ead[8]](function(_0xd486x8){return handleError(_0xd486x6,_0xd486x8)})};exports[_0x4ead[15]]= function(_0xd486x5,_0xd486x6){return ReportMemberHistory[_0x4ead[15]]()[_0x4ead[11]](function(_0xd486xa){return _0xd486x6[_0x4ead[10]](200)[_0x4ead[9]](_0xd486xa)})[_0x4ead[8]](function(_0xd486x8){return handleError(_0xd486x6,_0xd486x8)})};function handleError(_0xd486x6,_0xd486x8){return _0xd486x6[_0x4ead[10]](500)[_0x4ead[9]](_0xd486x8)}
\ No newline at end of file
diff --git a/server/api/report_member/report_member.events.js b/server/api/report_member/report_member.events.js
index d42092f..4c7cf7b 100644
--- a/server/api/report_member/report_member.events.js
+++ b/server/api/report_member/report_member.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportMember = require('../../models').ReportMember;
-
-var ReportMemberEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportMemberEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportMember.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportMemberEvents.emit(event + ':' + doc._id, doc);
-    ReportMemberEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportMemberEvents;
+var _0x2232=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2232[0];const EventEmitter=require(_0x2232[1]);const ReportMember=require(_0x2232[3])[_0x2232[2]];var ReportMemberEvents= new EventEmitter();ReportMemberEvents[_0x2232[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x2232[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x2232[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x2232[6]};for(var e in events){var event=events[e];ReportMember[_0x2232[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xd837x8,_0xd837x9,_0xd837xa){ReportMemberEvents[_0x2232[10]](event+ _0x2232[8]+ _0xd837x8[_0x2232[9]],_0xd837x8);ReportMemberEvents[_0x2232[10]](event,_0xd837x8);_0xd837xa(null)}}module[_0x2232[11]]= ReportMemberEvents
\ No newline at end of file
diff --git a/server/api/report_member/report_member.socket.js b/server/api/report_member/report_member.socket.js
index d0b7de2..8128e84 100644
--- a/server/api/report_member/report_member.socket.js
+++ b/server/api/report_member/report_member.socket.js
@@ -1,45 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const ReportMemberEvents = require('./report_member.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_member:' + event, socket);
-
-    ReportMemberEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'report_member:save':
-        if (socket.name === doc.membername || socket.role === 'admin') {
-          socket.emit(event, doc);
-        }
-        break;
-
-      case 'report_member:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportMemberEvents.removeListener(event, listener);
-  };
-}
+var _0xa7f9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x3A\x73\x61\x76\x65","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xa7f9[0];const ReportMemberEvents=require(_0xa7f9[1]);var events=[_0xa7f9[2],_0xa7f9[3]];exports[_0xa7f9[4]]= function(_0x38acx3){for(var _0x38acx4=0,_0x38acx5=events[_0xa7f9[5]];_0x38acx4< _0x38acx5;_0x38acx4++){var _0x38acx6=events[_0x38acx4];var _0x38acx7=createListener(_0xa7f9[6]+ _0x38acx6,_0x38acx3);ReportMemberEvents[_0xa7f9[7]](_0x38acx6,_0x38acx7);_0x38acx3[_0xa7f9[7]](_0xa7f9[8],removeListener(_0x38acx6,_0x38acx7))}};function createListener(_0x38acx6,_0x38acx3){return function(_0x38acx9){switch(_0x38acx6){case _0xa7f9[14]:if(_0x38acx3[_0xa7f9[9]]=== _0x38acx9[_0xa7f9[10]]|| _0x38acx3[_0xa7f9[11]]=== _0xa7f9[12]){_0x38acx3[_0xa7f9[13]](_0x38acx6,_0x38acx9)};break;case _0xa7f9[15]:_0x38acx3[_0xa7f9[13]](_0x38acx6,_0x38acx9);break;default:}}}function removeListener(_0x38acx6,_0x38acx7){return function(){ReportMemberEvents[_0xa7f9[16]](_0x38acx6,_0x38acx7)}}
\ No newline at end of file
diff --git a/server/api/report_openchannel/index.js b/server/api/report_openchannel/index.js
index 3703020..1eab2e3 100644
--- a/server/api/report_openchannel/index.js
+++ b/server/api/report_openchannel/index.js
@@ -1,14 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./report_openchannel.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([17], ['admin', 'agent']), controller.index);
-router.get('/:id/accept/:uniqueid', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasRole('agent'), controller.accept);
-router.get('/:id/reject', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasRole('agent'), controller.reject);
-
-module.exports = router;
+var _0x9003=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x68\x61\x73\x52\x6F\x6C\x65","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9003[0];var express=require(_0x9003[1]);var controller=require(_0x9003[2]);var auth=require(_0x9003[3]);var license=require(_0x9003[4]);var router=express.Router();router[_0x9003[12]](_0x9003[5],auth[_0x9003[6]](),license[_0x9003[7]](),auth[_0x9003[10]]([17],[_0x9003[8],_0x9003[9]]),controller[_0x9003[11]]);router[_0x9003[12]](_0x9003[13],auth[_0x9003[6]](),license[_0x9003[7]](),auth[_0x9003[14]](_0x9003[9]),controller[_0x9003[15]]);router[_0x9003[12]](_0x9003[16],auth[_0x9003[6]](),license[_0x9003[7]](),auth[_0x9003[14]](_0x9003[9]),controller[_0x9003[17]]);module[_0x9003[18]]= router
\ No newline at end of file
diff --git a/server/api/report_openchannel/report_openchannel.controller.js b/server/api/report_openchannel/report_openchannel.controller.js
index 8dd23a3..1c32315 100644
--- a/server/api/report_openchannel/report_openchannel.controller.js
+++ b/server/api/report_openchannel/report_openchannel.controller.js
@@ -1,117 +1 @@
-'use strict';
-var _ = require('lodash');
-var ReportOpenchannel = require('../../models').ReportOpenchannel;
-var OpenchannelRoom = require('../../models').OpenchannelRoom;
-var sequelize = require('../../models').sequelize;
-var Agent = require('../../models').User;
-var Util = require('../../config/util');
-var moment = require('moment');
-
-
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-// Gets a list of Report
-
-
-
-exports.index = function(req, res) {
-  return ReportOpenchannel
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-
-// Get a single report
-exports.accept = function(req, res) {
-  var _agent;
-  var _roomid = req.params.uniqueid.split('.')[1];
-
-  return Agent
-    .findById(req.user.id, {
-      attributes: ['id', 'openchannelCapacity']
-    })
-    .then(function(agent) {
-      _agent = agent;
-      return agent
-        .getOpenchannelRooms({
-          where: {
-            status: {
-              $ne: 'CLOSED'
-            },
-            id: {
-              $ne: _roomid
-            }
-          },
-          attributes: ['id']
-        });
-    })
-    .then(function(Rooms) {
-      return ReportOpenchannel
-        .findById(req.params.id);
-    })
-    .then(function(report) {
-      if (!report) {
-        return res.sendStatus(404);
-      }
-
-      var updated = _.merge(report, {
-        connectid: req.params.uniqueid
-      });
-
-      return updated
-        .save();
-    })
-    .then(function() {
-      return OpenchannelRoom
-        .update({
-          status: 'OPEN',
-          openReason: 'agent'
-        }, {
-          where: {
-            id: _roomid
-          },
-          user: req.user,
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return res.sendStatus(504);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-};
-
-// Get a single report
-exports.reject = function(req, res) {
-  return ReportOpenchannel
-    .findById(req.params.id)
-    .then(function(report) {
-      if (!report) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(report, {
-        rejectedAt: moment().format("YYYY-MM-DD HH:mm:ss")
-      });
-      return updated
-        .save();
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
+var _0xa797=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x63\x63\x65\x70\x74","\x2E","\x73\x70\x6C\x69\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x4F\x50\x45\x4E","\x61\x67\x65\x6E\x74","\x75\x73\x65\x72","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x43\x4C\x4F\x53\x45\x44","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x72\x65\x6A\x65\x63\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74"];_0xa797[0];var _=require(_0xa797[1]);var ReportOpenchannel=require(_0xa797[3])[_0xa797[2]];var OpenchannelRoom=require(_0xa797[3])[_0xa797[4]];var sequelize=require(_0xa797[3])[_0xa797[5]];var Agent=require(_0xa797[3])[_0xa797[6]];var Util=require(_0xa797[7]);var moment=require(_0xa797[8]);function handleError(_0x12f6x9,_0x12f6xa){return _0x12f6x9[_0xa797[10]](500)[_0xa797[9]](_0x12f6xa)}exports[_0xa797[11]]= function(_0x12f6xb,_0x12f6x9){return ReportOpenchannel[_0xa797[16]](Util[_0xa797[15]](_0x12f6xb[_0xa797[14]]))[_0xa797[13]](function(_0x12f6xc){_0x12f6x9[_0xa797[10]](200)[_0xa797[9]](_0x12f6xc)})[_0xa797[12]](function(_0x12f6xa){return handleError(_0x12f6x9,_0x12f6xa)})};exports[_0xa797[17]]= function(_0x12f6xb,_0x12f6x9){var _0x12f6xd;var _0x12f6xe=_0x12f6xb[_0xa797[21]][_0xa797[20]][_0xa797[19]](_0xa797[18])[1];return Agent[_0xa797[30]](_0x12f6xb[_0xa797[25]][_0xa797[29]],{attributes:[_0xa797[29],_0xa797[33]]})[_0xa797[13]](function(_0x12f6x12){_0x12f6xd= _0x12f6x12;return _0x12f6x12[_0xa797[32]]({where:{status:{$ne:_0xa797[31]},id:{$ne:_0x12f6xe}},attributes:[_0xa797[29]]})})[_0xa797[13]](function(_0x12f6x11){return ReportOpenchannel[_0xa797[30]](_0x12f6xb[_0xa797[21]][_0xa797[29]])})[_0xa797[13]](function(_0x12f6xf){if(!_0x12f6xf){return _0x12f6x9[_0xa797[22]](404)};var _0x12f6x10=_[_0xa797[27]](_0x12f6xf,{connectid:_0x12f6xb[_0xa797[21]][_0xa797[20]]});return _0x12f6x10[_0xa797[28]]()})[_0xa797[13]](function(){return OpenchannelRoom[_0xa797[26]]({status:_0xa797[23],openReason:_0xa797[24]},{where:{id:_0x12f6xe},user:_0x12f6xb[_0xa797[25]],individualHooks:true})})[_0xa797[13]](function(){return _0x12f6x9[_0xa797[22]](200)})[_0xa797[12]](sequelize.UniqueConstraintError,function(_0x12f6xa){return _0x12f6x9[_0xa797[22]](504)})[_0xa797[12]](function(_0x12f6xa){return handleError(_0x12f6x9,_0x12f6xa)})};exports[_0xa797[34]]= function(_0x12f6xb,_0x12f6x9){return ReportOpenchannel[_0xa797[30]](_0x12f6xb[_0xa797[21]][_0xa797[29]])[_0xa797[13]](function(_0x12f6xf){if(!_0x12f6xf){return _0x12f6x9[_0xa797[22]](404)};var _0x12f6x10=_[_0xa797[27]](_0x12f6xf,{rejectedAt:moment()[_0xa797[36]](_0xa797[35])});return _0x12f6x10[_0xa797[28]]()})[_0xa797[13]](function(){return _0x12f6x9[_0xa797[22]](200)})[_0xa797[12]](function(_0x12f6xa){return handleError(_0x12f6x9,_0x12f6xa)})}
\ No newline at end of file
diff --git a/server/api/report_openchannel/report_openchannel.events.js b/server/api/report_openchannel/report_openchannel.events.js
index e0277fc..0261aa9 100644
--- a/server/api/report_openchannel/report_openchannel.events.js
+++ b/server/api/report_openchannel/report_openchannel.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportOpenchannel = require('../../models').ReportOpenchannel;
-
-var ReportOpenchannelEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportOpenchannelEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'update',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportOpenchannel.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportOpenchannelEvents.emit(event + ':' + doc._id, doc);
-    ReportOpenchannelEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportOpenchannelEvents;
+var _0xc45a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xc45a[0];const EventEmitter=require(_0xc45a[1]);const ReportOpenchannel=require(_0xc45a[3])[_0xc45a[2]];var ReportOpenchannelEvents= new EventEmitter();ReportOpenchannelEvents[_0xc45a[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xc45a[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xc45a[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xc45a[7]};for(var e in events){var event=events[e];ReportOpenchannel[_0xc45a[8]](e,emitEvent(event))};function emitEvent(event){return function(_0xb912x8,_0xb912x9,_0xb912xa){ReportOpenchannelEvents[_0xc45a[11]](event+ _0xc45a[9]+ _0xb912x8[_0xc45a[10]],_0xb912x8);ReportOpenchannelEvents[_0xc45a[11]](event,_0xb912x8);_0xb912xa(null)}}module[_0xc45a[12]]= ReportOpenchannelEvents
\ No newline at end of file
diff --git a/server/api/report_openchannel/report_openchannel.socket.js b/server/api/report_openchannel/report_openchannel.socket.js
index 994bcd8..4d63314 100644
--- a/server/api/report_openchannel/report_openchannel.socket.js
+++ b/server/api/report_openchannel/report_openchannel.socket.js
@@ -1,45 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-//
-'use strict';
-//
-const ReportOpenchannelEvents = require('./report_openchannel.events');
-
-// Model events to emit
-var events = ['save', 'update', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_openchannel:' + event, socket);
-
-    ReportOpenchannelEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'report_openchannel:save':
-      case 'report_openchannel:update':
-        if (socket.name === doc.membername || socket.role === 'admin') {
-          socket.emit(event, doc);
-        }
-        break;
-      case 'report_openchannel:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportOpenchannelEvents.removeListener(event, listener);
-  };
-}
+var _0x6521=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x3A\x73\x61\x76\x65","\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x3A\x75\x70\x64\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x6521[0];const ReportOpenchannelEvents=require(_0x6521[1]);var events=[_0x6521[2],_0x6521[3],_0x6521[4]];exports[_0x6521[5]]= function(_0xb750x3){for(var _0xb750x4=0,_0xb750x5=events[_0x6521[6]];_0xb750x4< _0xb750x5;_0xb750x4++){var _0xb750x6=events[_0xb750x4];var _0xb750x7=createListener(_0x6521[7]+ _0xb750x6,_0xb750x3);ReportOpenchannelEvents[_0x6521[8]](_0xb750x6,_0xb750x7);_0xb750x3[_0x6521[8]](_0x6521[9],removeListener(_0xb750x6,_0xb750x7))}};function createListener(_0xb750x6,_0xb750x3){return function(_0xb750x9){switch(_0xb750x6){case _0x6521[10]:;case _0x6521[16]:if(_0xb750x3[_0x6521[11]]=== _0xb750x9[_0x6521[12]]|| _0xb750x3[_0x6521[13]]=== _0x6521[14]){_0xb750x3[_0x6521[15]](_0xb750x6,_0xb750x9)};break;case _0x6521[17]:_0xb750x3[_0x6521[15]](_0xb750x6,_0xb750x9);break;default:}}}function removeListener(_0xb750x6,_0xb750x7){return function(){ReportOpenchannelEvents[_0x6521[18]](_0xb750x6,_0xb750x7)}}
\ No newline at end of file
diff --git a/server/api/report_openchannel_session/index.js b/server/api/report_openchannel_session/index.js
index 832ba1c..c615771 100644
--- a/server/api/report_openchannel_session/index.js
+++ b/server/api/report_openchannel_session/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./report_openchannel_session.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.index);
-router.get('/describe', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.describe);
-router.get('/timeout', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.timeout);
-router.get('/waiting', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.waiting);
-router.get('/waiting/applications', auth.isAuthenticated(), license.hasOpenchannel(), controller.waitingApplications);
-// , auth.hasModule([11], ['admin', 'agent'])
-module.exports = router;
+var _0x3bdf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x74\x69\x6D\x65\x6F\x75\x74","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x2F\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67","\x2F\x77\x61\x69\x74\x69\x6E\x67\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x3bdf[0];var express=require(_0x3bdf[1]);var controller=require(_0x3bdf[2]);var auth=require(_0x3bdf[3]);var license=require(_0x3bdf[4]);var router=express.Router();router[_0x3bdf[11]](_0x3bdf[5],auth[_0x3bdf[6]](),license[_0x3bdf[7]](),auth[_0x3bdf[9]]([20],[_0x3bdf[8]]),controller[_0x3bdf[10]]);router[_0x3bdf[11]](_0x3bdf[12],auth[_0x3bdf[6]](),license[_0x3bdf[7]](),auth[_0x3bdf[9]]([20],[_0x3bdf[8]]),controller[_0x3bdf[13]]);router[_0x3bdf[11]](_0x3bdf[14],license[_0x3bdf[15]](),auth[_0x3bdf[6]](),license[_0x3bdf[7]](),auth[_0x3bdf[9]]([20],[_0x3bdf[8]]),controller[_0x3bdf[16]]);router[_0x3bdf[11]](_0x3bdf[17],license[_0x3bdf[15]](),auth[_0x3bdf[6]](),license[_0x3bdf[7]](),auth[_0x3bdf[9]]([20],[_0x3bdf[8]]),controller[_0x3bdf[18]]);router[_0x3bdf[11]](_0x3bdf[19],auth[_0x3bdf[6]](),license[_0x3bdf[7]](),controller[_0x3bdf[20]]);module[_0x3bdf[21]]= router
\ No newline at end of file
diff --git a/server/api/report_openchannel_session/report_openchannel_session.controller.js b/server/api/report_openchannel_session/report_openchannel_session.controller.js
index e6a814a..47879be 100644
--- a/server/api/report_openchannel_session/report_openchannel_session.controller.js
+++ b/server/api/report_openchannel_session/report_openchannel_session.controller.js
@@ -1,155 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var ReportOpenchannelSession = require('../../models').ReportOpenchannelSession;
-var ReportOpenchannelSessionHistory = require('../../models').history.ReportOpenchannelSessionHistory;
-
-var Util = require('../../config/util');
-var User = require('../../models').User;
-var Promise = require('bluebird');
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  return ReportOpenchannelSession
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return ReportOpenchannelSessionHistory
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function getOpenchannelQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return User
-          .findById(user.id, {
-            attributes: ['id']
-          })
-          .then(Util.getOpenchannelQueuesIdByUser({}, {
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: User,
-              attributes: ['id']
-            }]
-          }))
-          .then(function(userQueues) {
-            var users = [];
-            userQueues.rows.forEach(function(queue) {
-              users = _.union(users, _.map(queue.Users, 'id'));
-            });
-            return {
-              $or: {
-                queue: _.map(userQueues.rows, 'id'),
-                memberid: users
-              }
-            };
-          });
-      case 'agent':
-        return User
-          .findById(user.id, {
-            attributes: ['id']
-          })
-          .then(function(agent) {
-            return agent
-              .getOpenchannelQueues({
-                attributes: ['id']
-              });
-          })
-          .then(function(userQueues) {
-            return {
-              $or: {
-                queue: _.map(userQueues, 'id'),
-                memberid: user.id
-              }
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
-
-// Get timeout apps
-exports.timeout = function(req, res) {
-  return Promise
-    .all([])
-    .then(getOpenchannelQueues(req.user))
-    .then(function(condition) {
-      return ReportOpenchannelSession
-        .count(Util.getQuery(req.query, _.merge({
-          timeout: true
-        }, condition)));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Get waiting apps
-exports.waiting = function(req, res) {
-  return Promise
-    .all([])
-    .then(getOpenchannelQueues(req.user))
-    .then(function(condition) {
-      return ReportOpenchannelSession
-        .count(Util.getQuery(req.query, _.merge({
-          leaveAt: null
-        }, condition)));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.waitingApplications = function(req, res) {
-  return Promise
-    .all([])
-    .then(getOpenchannelQueues(req.user))
-    .then(function(condition) {
-      return ReportOpenchannelSession
-        .findAll(Util.getQuery(req.query, _.merge({
-          leaveAt: null
-        }, condition)));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        rows: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x9b26=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x9b26[0];var _=require(_0x9b26[1]);var ReportOpenchannelSession=require(_0x9b26[3])[_0x9b26[2]];var ReportOpenchannelSessionHistory=require(_0x9b26[3])[_0x9b26[5]][_0x9b26[4]];var Util=require(_0x9b26[6]);var User=require(_0x9b26[3])[_0x9b26[7]];var Promise=require(_0x9b26[8]);exports[_0x9b26[9]]= function(_0x2e08x7,_0x2e08x8,_0x2e08x9){return ReportOpenchannelSession[_0x9b26[16]](Util[_0x9b26[15]](_0x2e08x7[_0x9b26[14]]))[_0x9b26[13]](function(_0x2e08xb){_0x2e08x8[_0x9b26[12]](200)[_0x9b26[11]](_0x2e08xb)})[_0x9b26[10]](function(_0x2e08xa){return handleError(_0x2e08x8,_0x2e08xa)})};exports[_0x9b26[17]]= function(_0x2e08x7,_0x2e08x8){return ReportOpenchannelSessionHistory[_0x9b26[17]]()[_0x9b26[13]](function(_0x2e08xc){return _0x2e08x8[_0x9b26[12]](200)[_0x9b26[11]](_0x2e08xc)})[_0x9b26[10]](function(_0x2e08xa){return handleError(_0x2e08x8,_0x2e08xa)})};function getOpenchannelQueues(_0x2e08xe){return function(){switch(_0x2e08xe[_0x9b26[28]]){case _0x9b26[25]:return User[_0x9b26[24]](_0x2e08xe[_0x9b26[18]],{attributes:[_0x9b26[18]]})[_0x9b26[13]](Util[_0x9b26[23]]({},{attributes:[_0x9b26[18]],include:[{raw:true,model:User,attributes:[_0x9b26[18]]}]}))[_0x9b26[13]](function(_0x2e08xf){var _0x2e08x10=[];_0x2e08xf[_0x9b26[22]][_0x9b26[21]](function(_0x2e08x11){_0x2e08x10= _[_0x9b26[20]](_0x2e08x10,_[_0x9b26[19]](_0x2e08x11.Users,_0x9b26[18]))});return {$or:{queue:_[_0x9b26[19]](_0x2e08xf[_0x9b26[22]],_0x9b26[18]),memberid:_0x2e08x10}}});case _0x9b26[27]:return User[_0x9b26[24]](_0x2e08xe[_0x9b26[18]],{attributes:[_0x9b26[18]]})[_0x9b26[13]](function(_0x2e08x12){return _0x2e08x12[_0x9b26[26]]({attributes:[_0x9b26[18]]})})[_0x9b26[13]](function(_0x2e08xf){return {$or:{queue:_[_0x9b26[19]](_0x2e08xf,_0x9b26[18]),memberid:_0x2e08xe[_0x9b26[18]]}}});default:return {}}}}exports[_0x9b26[29]]= function(_0x2e08x7,_0x2e08x8){return Promise[_0x9b26[33]]([])[_0x9b26[13]](getOpenchannelQueues(_0x2e08x7[_0x9b26[25]]))[_0x9b26[13]](function(_0x2e08x14){return ReportOpenchannelSession[_0x9b26[32]](Util[_0x9b26[15]](_0x2e08x7[_0x9b26[14]],_[_0x9b26[31]]({timeout:true},_0x2e08x14)))})[_0x9b26[13]](function(_0x2e08x13){return _0x2e08x8[_0x9b26[12]](200)[_0x9b26[11]]({value:_0x2e08x13})})[_0x9b26[10]](function(_0x2e08xa){console[_0x9b26[30]](_0x2e08xa);return handleError(_0x2e08x8,_0x2e08xa)})};exports[_0x9b26[34]]= function(_0x2e08x7,_0x2e08x8){return Promise[_0x9b26[33]]([])[_0x9b26[13]](getOpenchannelQueues(_0x2e08x7[_0x9b26[25]]))[_0x9b26[13]](function(_0x2e08x14){return ReportOpenchannelSession[_0x9b26[32]](Util[_0x9b26[15]](_0x2e08x7[_0x9b26[14]],_[_0x9b26[31]]({leaveAt:null},_0x2e08x14)))})[_0x9b26[13]](function(_0x2e08x13){return _0x2e08x8[_0x9b26[12]](200)[_0x9b26[11]]({value:_0x2e08x13})})[_0x9b26[10]](function(_0x2e08xa){console[_0x9b26[30]](_0x2e08xa);return handleError(_0x2e08x8,_0x2e08xa)})};exports[_0x9b26[35]]= function(_0x2e08x7,_0x2e08x8){return Promise[_0x9b26[33]]([])[_0x9b26[13]](getOpenchannelQueues(_0x2e08x7[_0x9b26[25]]))[_0x9b26[13]](function(_0x2e08x14){return ReportOpenchannelSession[_0x9b26[36]](Util[_0x9b26[15]](_0x2e08x7[_0x9b26[14]],_[_0x9b26[31]]({leaveAt:null},_0x2e08x14)))})[_0x9b26[13]](function(_0x2e08x13){return _0x2e08x8[_0x9b26[12]](200)[_0x9b26[11]]({rows:_0x2e08x13})})[_0x9b26[10]](function(_0x2e08xa){console[_0x9b26[30]](_0x2e08xa);return handleError(_0x2e08x8,_0x2e08xa)})};function handleError(_0x2e08x8,_0x2e08xa){return _0x2e08x8[_0x9b26[12]](500)[_0x9b26[11]](_0x2e08xa)}
\ No newline at end of file
diff --git a/server/api/report_openchannel_session/report_openchannel_session.events.js b/server/api/report_openchannel_session/report_openchannel_session.events.js
index 0c9e3ff..b3155cc 100644
--- a/server/api/report_openchannel_session/report_openchannel_session.events.js
+++ b/server/api/report_openchannel_session/report_openchannel_session.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportOpenchannelSession = require('../../models').ReportOpenchannelSession;
-
-var ReportOpenchannelSessionEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportOpenchannelSessionEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportOpenchannelSession.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportOpenchannelSessionEvents.emit(event + ':' + doc._id, doc);
-    ReportOpenchannelSessionEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportOpenchannelSessionEvents;
+var _0x510d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x510d[0];const EventEmitter=require(_0x510d[1]);const ReportOpenchannelSession=require(_0x510d[3])[_0x510d[2]];var ReportOpenchannelSessionEvents= new EventEmitter();ReportOpenchannelSessionEvents[_0x510d[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x510d[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x510d[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x510d[6]};for(var e in events){var event=events[e];ReportOpenchannelSession[_0x510d[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6b2ax8,_0x6b2ax9,_0x6b2axa){ReportOpenchannelSessionEvents[_0x510d[10]](event+ _0x510d[8]+ _0x6b2ax8[_0x510d[9]],_0x6b2ax8);ReportOpenchannelSessionEvents[_0x510d[10]](event,_0x6b2ax8);_0x6b2axa(null)}}module[_0x510d[11]]= ReportOpenchannelSessionEvents
\ No newline at end of file
diff --git a/server/api/report_openchannel_session/report_openchannel_session.socket.js b/server/api/report_openchannel_session/report_openchannel_session.socket.js
index 36ca924..ebee48e 100644
--- a/server/api/report_openchannel_session/report_openchannel_session.socket.js
+++ b/server/api/report_openchannel_session/report_openchannel_session.socket.js
@@ -1,90 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-var ReportOpenchannelSession = require('../../models').ReportOpenchannelSession;
-var User = require('../../models').User;
-var Util = require('../../config/util');
-var _ = require('lodash');
-var Promise = require('bluebird');
-
-exports.register = function(socket) {
-  ReportOpenchannelSession.afterCreate(function(doc) {
-    onSave(socket, doc);
-  });
-  ReportOpenchannelSession.afterUpdate(function(doc) {
-    onSave(socket, doc);
-  });
-  ReportOpenchannelSession.afterDestroy(function(doc) {
-    onRemove(socket, doc);
-  });
-}
-
-function getOpenchannelQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(Util.getOpenchannelQueuesIdByUser({}, {
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: User,
-              attributes: ['id']
-            }]
-          }))
-          .then(function(userQueues) {
-            var users = [];
-            userQueues.rows.forEach(function(queue) {
-              users = _.union(users, _.map(queue.Users, 'id'));
-            });
-            return {
-              queue: _.map(userQueues.rows, 'id'),
-              memberid: users
-            };
-          });
-      case 'agent':
-        return User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(function(agent) {
-            return agent
-              .getOpenchannelQueues({
-                attributes: ['id']
-              });
-          })
-          .then(function(userQueues) {
-            return {
-              queue: _.map(userQueues, 'id'),
-              memberid: user.userId
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
-
-function onSave(socket, doc, cb) {
-  return Promise
-    .all([])
-    .then(getOpenchannelQueues(socket))
-    .then(function(condition) {
-      if (socket.role === 'admin' || _.includes(condition.memberid, doc.memberid) || _.includes(condition.queue, doc.queue)) {
-        socket.emit('report_openchannel_session:save', doc);
-      }
-    })
-    .catch(function(err) {
-      console.log('Error filtering report Openchannel sessions after save', err);
-    });
-}
-
-function onRemove(socket, doc, cb) {
-  socket.emit('report_openchannel_session:remove', doc);
-}
+var _0x91a8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x74\x68\x65\x6E","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x45\x72\x72\x6F\x72\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x20\x73\x65\x73\x73\x69\x6F\x6E\x73\x20\x61\x66\x74\x65\x72\x20\x73\x61\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x61\x64\x6D\x69\x6E","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x71\x75\x65\x75\x65","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0x91a8[0];var ReportOpenchannelSession=require(_0x91a8[2])[_0x91a8[1]];var User=require(_0x91a8[2])[_0x91a8[3]];var Util=require(_0x91a8[4]);var _=require(_0x91a8[5]);var Promise=require(_0x91a8[6]);exports[_0x91a8[7]]= function(_0xd784x6){ReportOpenchannelSession[_0x91a8[8]](function(_0xd784x7){onSave(_0xd784x6,_0xd784x7)});ReportOpenchannelSession[_0x91a8[9]](function(_0xd784x7){onSave(_0xd784x6,_0xd784x7)});ReportOpenchannelSession[_0x91a8[10]](function(_0xd784x7){onRemove(_0xd784x6,_0xd784x7)})};function getOpenchannelQueues(_0xd784x9){return function(){switch(_0xd784x9[_0x91a8[23]]){case _0x91a8[20]:return User[_0x91a8[19]](_0xd784x9[_0x91a8[18]],{attributes:[_0x91a8[11]]})[_0x91a8[16]](Util[_0x91a8[17]]({},{attributes:[_0x91a8[11]],include:[{raw:true,model:User,attributes:[_0x91a8[11]]}]}))[_0x91a8[16]](function(_0xd784xa){var _0xd784xb=[];_0xd784xa[_0x91a8[15]][_0x91a8[14]](function(_0xd784xc){_0xd784xb= _[_0x91a8[13]](_0xd784xb,_[_0x91a8[12]](_0xd784xc.Users,_0x91a8[11]))});return {queue:_[_0x91a8[12]](_0xd784xa[_0x91a8[15]],_0x91a8[11]),memberid:_0xd784xb}});case _0x91a8[22]:return User[_0x91a8[19]](_0xd784x9[_0x91a8[18]],{attributes:[_0x91a8[11]]})[_0x91a8[16]](function(_0xd784xd){return _0xd784xd[_0x91a8[21]]({attributes:[_0x91a8[11]]})})[_0x91a8[16]](function(_0xd784xa){return {queue:_[_0x91a8[12]](_0xd784xa,_0x91a8[11]),memberid:_0xd784x9[_0x91a8[18]]}});default:return {}}}}function onSave(_0xd784x6,_0xd784x7,_0xd784xf){return Promise[_0x91a8[33]]([])[_0x91a8[16]](getOpenchannelQueues(_0xd784x6))[_0x91a8[16]](function(_0xd784x11){if(_0xd784x6[_0x91a8[23]]=== _0x91a8[27]|| _[_0x91a8[29]](_0xd784x11[_0x91a8[28]],_0xd784x7[_0x91a8[28]])|| _[_0x91a8[29]](_0xd784x11[_0x91a8[30]],_0xd784x7[_0x91a8[30]])){_0xd784x6[_0x91a8[32]](_0x91a8[31],_0xd784x7)}})[_0x91a8[26]](function(_0xd784x10){console[_0x91a8[25]](_0x91a8[24],_0xd784x10)})}function onRemove(_0xd784x6,_0xd784x7,_0xd784xf){_0xd784x6[_0x91a8[32]](_0x91a8[34],_0xd784x7)}
\ No newline at end of file
diff --git a/server/api/report_queue/index.js b/server/api/report_queue/index.js
index 2a28045..1126cd5 100644
--- a/server/api/report_queue/index.js
+++ b/server/api/report_queue/index.js
@@ -1,27 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./report_queue.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index);
-router.get('/describe', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.describe);
-router.get('/waiting', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.waiting);
-router.get('/parameters', auth.isAuthenticated(), auth.hasModule([1], ['admin']), controller.queueParameters);
-router.get('/waiting/calls', auth.isAuthenticated(), auth.hasModule([7], ['admin', 'agent']), controller.waitingCalls);
-router.get('/active', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.active);
-router.get('/answered', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.answered);
-router.get('/abandoned', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.abandoned);
-router.get('/abandoned/all', auth.isAuthenticated(), auth.hasModule([7], ['admin', 'agent']), controller.abandonedAll);
-router.get('/avganswertime', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.avganswertime);
-router.get('/avgtalktime', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.avgtalktime);
-router.get('/answerrate', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.answerrate);
-router.get('/abandonrate', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.abandonrate);
-router.get('/totaloffered', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.totaloffered);
-router.get('/unmanaged', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.unmanaged);
-router.get('/:queue', auth.isAuthenticated(), controller.show);
-router.put('/:id', auth.isAuthenticated(), controller.update);
-
-module.exports = router;
+var _0x7244=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x77\x61\x69\x74\x69\x6E\x67","\x61\x67\x65\x6E\x74","\x77\x61\x69\x74\x69\x6E\x67","\x2F\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73","\x71\x75\x65\x75\x65\x50\x61\x72\x61\x6D\x65\x74\x65\x72\x73","\x2F\x77\x61\x69\x74\x69\x6E\x67\x2F\x63\x61\x6C\x6C\x73","\x77\x61\x69\x74\x69\x6E\x67\x43\x61\x6C\x6C\x73","\x2F\x61\x63\x74\x69\x76\x65","\x61\x63\x74\x69\x76\x65","\x2F\x61\x6E\x73\x77\x65\x72\x65\x64","\x61\x6E\x73\x77\x65\x72\x65\x64","\x2F\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x2F\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x2F\x61\x6C\x6C","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x41\x6C\x6C","\x2F\x61\x76\x67\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x61\x76\x67\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x2F\x61\x76\x67\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x61\x76\x67\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x2F\x61\x6E\x73\x77\x65\x72\x72\x61\x74\x65","\x61\x6E\x73\x77\x65\x72\x72\x61\x74\x65","\x2F\x61\x62\x61\x6E\x64\x6F\x6E\x72\x61\x74\x65","\x61\x62\x61\x6E\x64\x6F\x6E\x72\x61\x74\x65","\x2F\x74\x6F\x74\x61\x6C\x6F\x66\x66\x65\x72\x65\x64","\x74\x6F\x74\x61\x6C\x6F\x66\x66\x65\x72\x65\x64","\x2F\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x2F\x3A\x71\x75\x65\x75\x65","\x73\x68\x6F\x77","\x2F\x3A\x69\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7244[0];var express=require(_0x7244[1]);var controller=require(_0x7244[2]);var auth=require(_0x7244[3]);var router=express.Router();router[_0x7244[9]](_0x7244[4],auth[_0x7244[5]](),auth[_0x7244[7]]([17],[_0x7244[6]]),controller[_0x7244[8]]);router[_0x7244[9]](_0x7244[10],auth[_0x7244[5]](),auth[_0x7244[7]]([17],[_0x7244[6]]),controller[_0x7244[11]]);router[_0x7244[9]](_0x7244[12],auth[_0x7244[5]](),auth[_0x7244[7]]([1],[_0x7244[6],_0x7244[13]]),controller[_0x7244[14]]);router[_0x7244[9]](_0x7244[15],auth[_0x7244[5]](),auth[_0x7244[7]]([1],[_0x7244[6]]),controller[_0x7244[16]]);router[_0x7244[9]](_0x7244[17],auth[_0x7244[5]](),auth[_0x7244[7]]([7],[_0x7244[6],_0x7244[13]]),controller[_0x7244[18]]);router[_0x7244[9]](_0x7244[19],auth[_0x7244[5]](),auth[_0x7244[7]]([1],[_0x7244[6],_0x7244[13]]),controller[_0x7244[20]]);router[_0x7244[9]](_0x7244[21],auth[_0x7244[5]](),auth[_0x7244[7]]([1],[_0x7244[6],_0x7244[13]]),controller[_0x7244[22]]);router[_0x7244[9]](_0x7244[23],auth[_0x7244[5]](),auth[_0x7244[7]]([1],[_0x7244[6],_0x7244[13]]),controller[_0x7244[24]]);router[_0x7244[9]](_0x7244[25],auth[_0x7244[5]](),auth[_0x7244[7]]([7],[_0x7244[6],_0x7244[13]]),controller[_0x7244[26]]);router[_0x7244[9]](_0x7244[27],auth[_0x7244[5]](),auth[_0x7244[7]]([1],[_0x7244[6],_0x7244[13]]),controller[_0x7244[28]]);router[_0x7244[9]](_0x7244[29],auth[_0x7244[5]](),auth[_0x7244[7]]([1],[_0x7244[6],_0x7244[13]]),controller[_0x7244[30]]);router[_0x7244[9]](_0x7244[31],auth[_0x7244[5]](),auth[_0x7244[7]]([1],[_0x7244[6],_0x7244[13]]),controller[_0x7244[32]]);router[_0x7244[9]](_0x7244[33],auth[_0x7244[5]](),auth[_0x7244[7]]([1],[_0x7244[6],_0x7244[13]]),controller[_0x7244[34]]);router[_0x7244[9]](_0x7244[35],auth[_0x7244[5]](),auth[_0x7244[7]]([1],[_0x7244[6],_0x7244[13]]),controller[_0x7244[36]]);router[_0x7244[9]](_0x7244[37],auth[_0x7244[5]](),auth[_0x7244[7]]([1],[_0x7244[6],_0x7244[13]]),controller[_0x7244[38]]);router[_0x7244[9]](_0x7244[39],auth[_0x7244[5]](),controller[_0x7244[40]]);router[_0x7244[43]](_0x7244[41],auth[_0x7244[5]](),controller[_0x7244[42]]);module[_0x7244[44]]= router
\ No newline at end of file
diff --git a/server/api/report_queue/report_queue.controller.js b/server/api/report_queue/report_queue.controller.js
index e590c29..1ca159d 100644
--- a/server/api/report_queue/report_queue.controller.js
+++ b/server/api/report_queue/report_queue.controller.js
@@ -1,623 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var sequelize = require('../../models').sequelize;
-var Agent = require('../../models').User;
-var ReportQueue = require('../../models').ReportQueue;
-var VoiceQueue = require('../../models').VoiceQueue;
-var ReportQueueHistory = require('../../models').history.ReportQueueHistory;
-var Util = require('../../config/util');
-var Promise = require('bluebird');
-
-// Get list of reportQueues
-exports.index = function(req, res, next) {
-  return ReportQueue
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.update = function(req, res) {
-  return ReportQueue
-    .findById(req.params.id)
-    .then(function(queue) {
-      if (!queue) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(queue, req.body);
-      return updated.save();
-    })
-    .then(function(queue) {
-      return res.status(200).send(queue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return ReportQueueHistory
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get Waiting Calls
-exports.waiting = function(req, res) {
-  return Promise
-    .all([])
-    .then(getVoiceQueues(req.user))
-    .then(function(userQueues) {
-      return ReportQueue
-        .count({
-          where: {
-            queuecallerleaveAt: null,
-            queue: userQueues
-          }
-        });
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function getVoiceQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return Agent //also User model
-          .findById(user.id, {
-            attributes: ['id']
-          })
-          .then(Util.getVoiceQueuesIdByUser())
-          .then(function(userQueues) {
-            return _.map(userQueues.rows, 'name');
-          });
-      case 'agent':
-        return Agent
-          .findById(user.id)
-          .then(function(agent) {
-            return agent
-              .getVoiceQueues({
-                attributes: ['name']
-              });
-          })
-          .then(function(userQueues) {
-            return _.map(userQueues, 'name');
-          });
-      default:
-        return VoiceQueue
-          .findAll()
-          .then(function(queues) {
-            return {
-              rows: queues
-            };
-          })
-          .then(function(userQueues) {
-            return _.map(userQueues.rows, 'name');
-          });
-    }
-  }
-}
-
-exports.queueParameters = function(req, res) {
-  var query = {
-    _limit: req.query.limit ? req.query.limit : null,
-    _offset: req.query.offset ? req.query.offset : 0,
-    _name: req.query.name || undefined,
-    _answeredFrom: req.query.answered_uiFrom || req.query.answered_uiFrom === 0 ? req.query.answered_uiFrom : undefined,
-    _answeredTo: req.query.answered_uiTo || req.query.answered_uiTo === 0 ? req.query.answered_uiTo : undefined,
-    _abandonedFrom: req.query.abandoned_uiFrom || req.query.abandoned_uiFrom === 0 ? req.query.abandoned_uiFrom : undefined,
-    _abandonedTo: req.query.abandoned_uiTo || req.query.abandoned_uiTo === 0 ? req.query.abandoned_uiTo : undefined,
-    _unmanagedFrom: req.query.unmanaged_uiFrom || req.query.unmanaged_uiFrom === 0 ? req.query.unmanaged_uiFrom : undefined,
-    _unmanagedTo: req.query.unmanaged_uiTo || req.query.unmanaged_uiTo === 0 ? req.query.unmanaged_uiTo : undefined,
-  }
-  console.log(query);
-  var _parameters, _userQueues, _limit, _offset;
-  delete req.query.limit;
-  delete req.query.offset;
-  delete req.query.answered_uiFrom;
-  delete req.query.answered_uiTo;
-  delete req.query.abandoned_uiFrom;
-  delete req.query.abandoned_uiTo;
-  delete req.query.unmanaged_uiFrom;
-  delete req.query.unmanaged_uiTo;
-
-  return Promise
-    .all([])
-    .then(getVoiceQueues(req.user))
-    .then(function(userQueues) {
-      _userQueues = userQueues;
-      _parameters = _.map(userQueues, function(element) {
-        return {
-          name: element
-        };
-      });
-      //waiting
-      return ReportQueue
-        .findAll({
-          where: {
-            queuecallerleaveAt: null,
-            queue: _userQueues
-          },
-          group: 'queue',
-          attributes: [
-            ['queue', 'name'],
-            [sequelize.fn('COUNT', sequelize.col('id')), 'waiting']
-          ]
-        });
-    })
-    .then(function(waiting) {
-      waiting = _.map(waiting, 'dataValues');
-      _parameters.forEach(function(element, key) {
-        var value = _.find(waiting, {
-          name: element.name
-        });
-        element.waiting = value ? value.waiting : 0;
-      });
-      // console.log('WAITING', _parameters);
-      //active
-      return ReportQueue
-        .findAll({
-          where: {
-            queuecallerexit: false,
-            queuecallerabandon: false,
-            queuecallercomplete: false,
-            queuecallerleaveAt: {
-              $ne: null
-            },
-            queue: _userQueues
-          },
-          group: 'queue',
-          attributes: [
-            ['queue', 'name'],
-            [sequelize.fn('COUNT', sequelize.col('id')), 'active']
-          ]
-        });
-    })
-    .then(function(active) {
-      active = _.map(active, 'dataValues');
-      _parameters.forEach(function(element) {
-        var value = _.find(active, {
-          name: element.name
-        });
-        element.active = value ? value.active : 0;
-      });
-      // console.log('ACTIVE', _parameters);
-      //answered
-      return ReportQueue
-        .findAll({
-          where: {
-            queuecallercomplete: true,
-            queue: _userQueues
-          },
-          group: 'queue',
-          attributes: [
-            ['queue', 'name'],
-            [sequelize.fn('COUNT', sequelize.col('id')), 'answered']
-          ]
-        });
-    })
-    .then(function(answered) {
-      answered = _.map(answered, 'dataValues');
-      // console.log('beforeAnswered', _.map(answered, 'dataValues'));
-      _parameters.forEach(function(element) {
-        var value = _.find(answered, {
-          name: element.name
-        });
-        element.answered = value ? value.answered : 0;
-      });
-      // console.log('ANSWERED', _parameters);
-      //abandoned
-      return ReportQueue
-        .findAll({
-          where: {
-            queuecallerabandon: true,
-            queue: _userQueues
-          },
-          group: 'queue',
-          attributes: [
-            ['queue', 'name'],
-            [sequelize.fn('COUNT', sequelize.col('id')), 'abandoned']
-          ]
-        });
-    })
-    .then(function(abandoned) {
-      abandoned = _.map(abandoned, 'dataValues');
-      _parameters.forEach(function(element) {
-        var value = _.find(abandoned, {
-          name: element.name
-        });
-        element.abandoned = value ? value.abandoned : 0;
-      });
-      // console.log('ABANDONED', _parameters);
-      //unmanaged
-      return ReportQueue
-        .findAll({
-          where: {
-            queuecallerexit: true,
-            queue: _userQueues
-          },
-          group: 'queue',
-          attributes: [
-            ['queue', 'name'],
-            [sequelize.fn('COUNT', sequelize.col('id')), 'unmanaged']
-          ]
-        });
-    })
-    .then(function(unmanaged) {
-      unmanaged = _.map(unmanaged, 'dataValues');
-      _parameters.forEach(function(element) {
-        var value = _.find(unmanaged, {
-          name: element.name
-        });
-        element.unmanaged = value ? value.unmanaged : 0;
-      });
-      // console.log('UNMANAGED', _parameters);
-      //holdtime
-      return sequelize
-        .query('SELECT queue AS \'name\',SEC_TO_TIME(ROUND(AVG(holdtime), 0)) as holdtime FROM report_agent WHERE agentcomplete = 1 AND queue IN (\'' + _userQueues.join("','") +
-          '\') GROUP BY queue', {
-            type: sequelize.QueryTypes.SELECT
-          });
-    })
-    .then(function(holdtime) {
-      _parameters.forEach(function(element) {
-        var value = _.find(holdtime, {
-          name: element.name
-        });
-        element.holdtime = value ? value.holdtime : '00:00:00';
-      });
-      // console.log('HOLDTIME', _parameters);
-      //talktime
-      return sequelize
-        .query('SELECT queue AS \'name\',SEC_TO_TIME(ROUND(AVG(talktime), 0)) as talktime FROM report_agent WHERE agentcomplete = 1 AND queue IN (\'' + _userQueues.join("','") +
-          '\') GROUP BY queue', {
-            type: sequelize.QueryTypes.SELECT
-          });
-    })
-    .then(function(talktime) {
-      _parameters.forEach(function(element) {
-        var value = _.find(talktime, {
-          name: element.name
-        });
-        element.talktime = value ? value.talktime : '00:00:00';
-      });
-      // console.log('TALKTIME', _parameters);
-      //totalcalls
-      return sequelize
-        .query('SELECT queue AS \'name\',COUNT(distinct uniqueid) as totalcalls FROM report_queue WHERE queue IN (\'' + _userQueues.join("','") + '\') GROUP BY queue', {
-          type: sequelize.QueryTypes.SELECT
-        });
-    })
-    .then(function(totalcalls) {
-      _parameters.forEach(function(element) {
-        var value = _.find(totalcalls, {
-          name: element.name
-        });
-        element.totalcalls = value ? value.totalcalls : 0;
-      });
-      // console.log('TOTALCALLS', _parameters);
-      var results = _(_.filter(_parameters, function(element) {
-        var answeredFrom = query._answeredFrom ? (element.answered >= Number(query._answeredFrom)) : true;
-        var answeredTo = query._answeredTo ? (element.answered <= Number(query._answeredTo)) : true;
-        var abandonedFrom = query._abandonedFrom ? (element.abandoned >= Number(query._abandonedFrom)) : true;
-        var abandonedto = query._abandonedTo ? (element.abandoned <= Number(query._abandonedTo)) : true;
-        var unmanagedFrom = query._unmanagedFrom ? (element.unmanaged >= Number(query._unmanagedFrom)) : true;
-        var unmanagedTo = query._unmanagedTo ? (element.unmanaged <= Number(query._unmanagedTo)) : true;
-        var name = query._name ? _.includes(element.name, query._name) : true;
-        return _.reduce([answeredFrom, answeredTo, abandonedFrom, abandonedto, unmanagedFrom, unmanagedTo, name], function(total, n) {
-          return total && n;
-        });
-      }));
-      if (query._limit) {
-        results = results.slice(query._offset).take(query._limit).value();
-      }
-      return [_parameters.length, results];
-    })
-    .spread(function(count, rows) {
-      // console.log('RETURN', rows);
-      return res.status(200).send({
-        rows: rows,
-        count: count
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Get Waiting Calls
-exports.waitingCalls = function(req, res) {
-  var where = {};
-  return Promise
-    .all([])
-    .then(getVoiceQueues(req.user))
-    .then(function(userQueues) {
-      return ReportQueue
-        .scope('waiting', {
-          method: ['queueFilter', userQueues]
-        })
-        .findAll(Util.getQuery(req.query, where));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        rows: data,
-        count: data.length
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get Waiting Calls
-exports.active = function(req, res) {
-  return Promise
-    .all([])
-    .then(getVoiceQueues(req.user))
-    .then(function(userQueues) {
-      return ReportQueue
-        .count({
-          where: {
-            queuecallerexit: false,
-            queuecallerabandon: false,
-            queuecallercomplete: false,
-            queuecallerleaveAt: {
-              $ne: null
-            },
-            queue: userQueues
-          }
-        });
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get Answered Calls
-exports.answered = function(req, res) {
-  return Promise
-    .all([])
-    .then(getVoiceQueues(req.user))
-    .then(function(userQueues) {
-      return ReportQueue
-        .count({
-          where: {
-            queuecallercomplete: true,
-            queue: userQueues
-          }
-        });
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get Abandoned Calls
-exports.abandoned = function(req, res) {
-  return Promise
-    .all([])
-    .then(getVoiceQueues(req.user))
-    .then(function(userQueues) {
-      return ReportQueue
-        .count({
-          where: {
-            queuecallerabandon: true,
-            queue: userQueues
-          }
-        });
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get Answered Calls
-exports.avganswertime = function(req, res) {
-  return Promise
-    .all([])
-    .then(getVoiceQueues(req.user))
-    .then(function(userQueues) {
-      return sequelize
-        .query('SELECT SEC_TO_TIME(ROUND(AVG(holdtime), 0)) as value FROM report_agent WHERE agentcomplete = 1 AND queue IN (\'' + userQueues.join("','") + '\')', {
-          type: sequelize.QueryTypes.SELECT
-        });
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data[0].value
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get Answered Calls
-exports.avgtalktime = function(req, res) {
-  return Promise
-    .all([])
-    .then(getVoiceQueues(req.user))
-    .then(function(userQueues) {
-      return sequelize
-        .query('SELECT SEC_TO_TIME(ROUND(AVG(talktime), 0)) as value FROM report_agent WHERE agentcomplete = 1 AND queue IN (\'' + userQueues.join("','") + '\')', {
-          type: sequelize.QueryTypes.SELECT
-        });
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data[0].value
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get Answered Calls
-exports.answerrate = function(req, res) {
-  return Promise
-    .all([])
-    .then(getVoiceQueues(req.user))
-    .then(function(userQueues) {
-      return sequelize
-        .query('SELECT ROUND(SUM(queuecallercomplete) / (SUM(queuecallercomplete) + SUM(queuecallerabandon)) * 100, 1) as value FROM report_queue WHERE queue IN (\'' + userQueues.join("','") +
-          '\')', {
-            type: sequelize.QueryTypes.SELECT
-          });
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data[0].value
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get Answered Calls
-exports.abandonrate = function(req, res) {
-  return Promise
-    .all([])
-    .then(getVoiceQueues(req.user))
-    .then(function(userQueues) {
-      return sequelize
-        .query('SELECT ROUND(SUM(queuecallerabandon) / (SUM(queuecallercomplete) + SUM(queuecallerabandon)) * 100, 1) as value FROM report_queue WHERE queue IN (\'' + userQueues.join("','") +
-          '\')', {
-            type: sequelize.QueryTypes.SELECT
-          });
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data[0].value
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get Answered Calls
-exports.totaloffered = function(req, res) {
-  return Promise
-    .all([])
-    .then(getVoiceQueues(req.user))
-    .then(function(userQueues) {
-      return sequelize
-        .query('SELECT COUNT(distinct uniqueid) as value FROM report_queue WHERE queue IN (\'' + userQueues.join("','") + '\')', {
-          type: sequelize.QueryTypes.SELECT
-        });
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data[0].value
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get Unmanaged Calls
-exports.unmanaged = function(req, res) {
-  return Promise
-    .all([])
-    .then(getVoiceQueues(req.user))
-    .then(function(userQueues) {
-      return ReportQueue
-        .count({
-          where: {
-            queuecallerexit: true,
-            queue: userQueues
-          }
-        });
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get Unmanaged Calls
-exports.abandonedAll = function(req, res) {
-  return Promise
-    .all([])
-    .then(getVoiceQueues(req.user))
-    .then(function(userQueues) {
-      return ReportQueue
-        .findAndCountAll({
-          where: {
-            queuecallerabandon: true,
-            queue: userQueues
-          }
-        });
-    })
-    .then(function(data) {
-      return res.status(200).send(data);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single reportQueue
-exports.show = function(req, res) {
-  return ReportQueue
-    .findAll({
-      where: {
-        queue: req.params.queue
-      }
-    })
-    .then(function(reportQueue) {
-      if (!reportQueue) {
-        return res.sendStatus(404);
-      }
-      return res.send({
-        count: reportQueue.length,
-        rows: reportQueue
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xc5fa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x75\x70\x64\x61\x74\x65","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x62\x6F\x64\x79","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x65\x73\x63\x72\x69\x62\x65","\x77\x61\x69\x74\x69\x6E\x67","\x63\x6F\x75\x6E\x74","\x75\x73\x65\x72","\x61\x6C\x6C","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x6F\x6C\x65","\x71\x75\x65\x75\x65\x50\x61\x72\x61\x6D\x65\x74\x65\x72\x73","\x6C\x69\x6D\x69\x74","\x6F\x66\x66\x73\x65\x74","\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x75\x69\x46\x72\x6F\x6D","\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x75\x69\x54\x6F","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x5F\x75\x69\x46\x72\x6F\x6D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x5F\x75\x69\x54\x6F","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x5F\x75\x69\x46\x72\x6F\x6D","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x5F\x75\x69\x54\x6F","\x6C\x6F\x67","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64","\x74\x6F\x74\x61\x6C\x63\x61\x6C\x6C\x73","\x66\x6F\x72\x45\x61\x63\x68","\x5F\x61\x6E\x73\x77\x65\x72\x65\x64\x46\x72\x6F\x6D","\x61\x6E\x73\x77\x65\x72\x65\x64","\x5F\x61\x6E\x73\x77\x65\x72\x65\x64\x54\x6F","\x5F\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x46\x72\x6F\x6D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x5F\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x54\x6F","\x5F\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x46\x72\x6F\x6D","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x5F\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x54\x6F","\x5F\x6E\x61\x6D\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x72\x65\x64\x75\x63\x65","\x66\x69\x6C\x74\x65\x72","\x5F\x6C\x69\x6D\x69\x74","\x76\x61\x6C\x75\x65","\x74\x61\x6B\x65","\x73\x6C\x69\x63\x65","\x6C\x65\x6E\x67\x74\x68","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x30\x30\x3A\x30\x30\x3A\x30\x30","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x20\x41\x53\x20\x27\x6E\x61\x6D\x65\x27\x2C\x43\x4F\x55\x4E\x54\x28\x64\x69\x73\x74\x69\x6E\x63\x74\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x20\x61\x73\x20\x74\x6F\x74\x61\x6C\x63\x61\x6C\x6C\x73\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x27\x2C\x27","\x6A\x6F\x69\x6E","\x27\x29\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x20\x41\x53\x20\x27\x6E\x61\x6D\x65\x27\x2C\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x74\x61\x6C\x6B\x74\x69\x6D\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x20\x41\x53\x20\x27\x6E\x61\x6D\x65\x27\x2C\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x71\x75\x65\x75\x65","\x43\x4F\x55\x4E\x54","\x63\x6F\x6C","\x66\x6E","\x61\x63\x74\x69\x76\x65","\x77\x61\x69\x74\x69\x6E\x67\x43\x61\x6C\x6C\x73","\x71\x75\x65\x75\x65\x46\x69\x6C\x74\x65\x72","\x73\x63\x6F\x70\x65","\x61\x76\x67\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x27\x29","\x61\x76\x67\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x61\x6E\x73\x77\x65\x72\x72\x61\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2F\x20\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2B\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x29\x20\x2A\x20\x31\x30\x30\x2C\x20\x31\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x61\x62\x61\x6E\x64\x6F\x6E\x72\x61\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x20\x2F\x20\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2B\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x29\x20\x2A\x20\x31\x30\x30\x2C\x20\x31\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x74\x6F\x74\x61\x6C\x6F\x66\x66\x65\x72\x65\x64","\x53\x45\x4C\x45\x43\x54\x20\x43\x4F\x55\x4E\x54\x28\x64\x69\x73\x74\x69\x6E\x63\x74\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x41\x6C\x6C","\x73\x68\x6F\x77"];_0xc5fa[0];var _=require(_0xc5fa[1]);var sequelize=require(_0xc5fa[3])[_0xc5fa[2]];var Agent=require(_0xc5fa[3])[_0xc5fa[4]];var ReportQueue=require(_0xc5fa[3])[_0xc5fa[5]];var VoiceQueue=require(_0xc5fa[3])[_0xc5fa[6]];var ReportQueueHistory=require(_0xc5fa[3])[_0xc5fa[8]][_0xc5fa[7]];var Util=require(_0xc5fa[9]);var Promise=require(_0xc5fa[10]);exports[_0xc5fa[11]]= function(_0x39e9x9,_0x39e9xa,_0x39e9xb){return ReportQueue[_0xc5fa[18]](Util[_0xc5fa[17]](_0x39e9x9[_0xc5fa[16]]))[_0xc5fa[15]](function(_0x39e9xd){return _0x39e9xa[_0xc5fa[14]](200)[_0xc5fa[13]](_0x39e9xd)})[_0xc5fa[12]](function(_0x39e9xc){return handleError(_0x39e9xa,_0x39e9xc)})};exports[_0xc5fa[19]]= function(_0x39e9x9,_0x39e9xa){return ReportQueue[_0xc5fa[26]](_0x39e9x9[_0xc5fa[25]][_0xc5fa[24]])[_0xc5fa[15]](function(_0x39e9xe){if(!_0x39e9xe){return _0x39e9xa[_0xc5fa[20]](404)};var _0x39e9xf=_[_0xc5fa[22]](_0x39e9xe,_0x39e9x9[_0xc5fa[21]]);return _0x39e9xf[_0xc5fa[23]]()})[_0xc5fa[15]](function(_0x39e9xe){return _0x39e9xa[_0xc5fa[14]](200)[_0xc5fa[13]](_0x39e9xe)})[_0xc5fa[12]](function(_0x39e9xc){return handleError(_0x39e9xa,_0x39e9xc)})};exports[_0xc5fa[27]]= function(_0x39e9x9,_0x39e9xa){return ReportQueueHistory[_0xc5fa[27]]()[_0xc5fa[15]](function(_0x39e9x10){return _0x39e9xa[_0xc5fa[14]](200)[_0xc5fa[13]](_0x39e9x10)})[_0xc5fa[12]](function(_0x39e9xc){return handleError(_0x39e9xa,_0x39e9xc)})};exports[_0xc5fa[28]]= function(_0x39e9x9,_0x39e9xa){return Promise[_0xc5fa[31]]([])[_0xc5fa[15]](getVoiceQueues(_0x39e9x9[_0xc5fa[30]]))[_0xc5fa[15]](function(_0x39e9x12){return ReportQueue[_0xc5fa[29]]({where:{queuecallerleaveAt:null,queue:_0x39e9x12}})})[_0xc5fa[15]](function(_0x39e9x11){return _0x39e9xa[_0xc5fa[14]](200)[_0xc5fa[13]]({value:_0x39e9x11})})[_0xc5fa[12]](function(_0x39e9xc){return handleError(_0x39e9xa,_0x39e9xc)})};function getVoiceQueues(_0x39e9x14){return function(){switch(_0x39e9x14[_0xc5fa[39]]){case _0xc5fa[30]:return Agent[_0xc5fa[26]](_0x39e9x14[_0xc5fa[24]],{attributes:[_0xc5fa[24]]})[_0xc5fa[15]](Util[_0xc5fa[35]]())[_0xc5fa[15]](function(_0x39e9x12){return _[_0xc5fa[34]](_0x39e9x12[_0xc5fa[32]],_0xc5fa[33])});case _0xc5fa[37]:return Agent[_0xc5fa[26]](_0x39e9x14[_0xc5fa[24]])[_0xc5fa[15]](function(_0x39e9x15){return _0x39e9x15[_0xc5fa[36]]({attributes:[_0xc5fa[33]]})})[_0xc5fa[15]](function(_0x39e9x12){return _[_0xc5fa[34]](_0x39e9x12,_0xc5fa[33])});default:return VoiceQueue[_0xc5fa[38]]()[_0xc5fa[15]](function(_0x39e9x16){return {rows:_0x39e9x16}})[_0xc5fa[15]](function(_0x39e9x12){return _[_0xc5fa[34]](_0x39e9x12[_0xc5fa[32]],_0xc5fa[33])})}}}exports[_0xc5fa[40]]= function(_0x39e9x9,_0x39e9xa){var _0x39e9x17={_limit:_0x39e9x9[_0xc5fa[16]][_0xc5fa[41]]?_0x39e9x9[_0xc5fa[16]][_0xc5fa[41]]:null,_offset:_0x39e9x9[_0xc5fa[16]][_0xc5fa[42]]?_0x39e9x9[_0xc5fa[16]][_0xc5fa[42]]:0,_name:_0x39e9x9[_0xc5fa[16]][_0xc5fa[33]]|| undefined,_answeredFrom:_0x39e9x9[_0xc5fa[16]][_0xc5fa[43]]|| _0x39e9x9[_0xc5fa[16]][_0xc5fa[43]]=== 0?_0x39e9x9[_0xc5fa[16]][_0xc5fa[43]]:undefined,_answeredTo:_0x39e9x9[_0xc5fa[16]][_0xc5fa[44]]|| _0x39e9x9[_0xc5fa[16]][_0xc5fa[44]]=== 0?_0x39e9x9[_0xc5fa[16]][_0xc5fa[44]]:undefined,_abandonedFrom:_0x39e9x9[_0xc5fa[16]][_0xc5fa[45]]|| _0x39e9x9[_0xc5fa[16]][_0xc5fa[45]]=== 0?_0x39e9x9[_0xc5fa[16]][_0xc5fa[45]]:undefined,_abandonedTo:_0x39e9x9[_0xc5fa[16]][_0xc5fa[46]]|| _0x39e9x9[_0xc5fa[16]][_0xc5fa[46]]=== 0?_0x39e9x9[_0xc5fa[16]][_0xc5fa[46]]:undefined,_unmanagedFrom:_0x39e9x9[_0xc5fa[16]][_0xc5fa[47]]|| _0x39e9x9[_0xc5fa[16]][_0xc5fa[47]]=== 0?_0x39e9x9[_0xc5fa[16]][_0xc5fa[47]]:undefined,_unmanagedTo:_0x39e9x9[_0xc5fa[16]][_0xc5fa[48]]|| _0x39e9x9[_0xc5fa[16]][_0xc5fa[48]]=== 0?_0x39e9x9[_0xc5fa[16]][_0xc5fa[48]]:undefined};console[_0xc5fa[49]](_0x39e9x17);var _0x39e9x18,_0x39e9x19,_0x39e9x1a,_0x39e9x1b;delete _0x39e9x9[_0xc5fa[16]][_0xc5fa[41]];delete _0x39e9x9[_0xc5fa[16]][_0xc5fa[42]];delete _0x39e9x9[_0xc5fa[16]][_0xc5fa[43]];delete _0x39e9x9[_0xc5fa[16]][_0xc5fa[44]];delete _0x39e9x9[_0xc5fa[16]][_0xc5fa[45]];delete _0x39e9x9[_0xc5fa[16]][_0xc5fa[46]];delete _0x39e9x9[_0xc5fa[16]][_0xc5fa[47]];delete _0x39e9x9[_0xc5fa[16]][_0xc5fa[48]];return Promise[_0xc5fa[31]]([])[_0xc5fa[15]](getVoiceQueues(_0x39e9x9[_0xc5fa[30]]))[_0xc5fa[15]](function(_0x39e9x12){_0x39e9x19= _0x39e9x12;_0x39e9x18= _[_0xc5fa[34]](_0x39e9x12,function(_0x39e9x1f){return {name:_0x39e9x1f}});return ReportQueue[_0xc5fa[38]]({where:{queuecallerleaveAt:null,queue:_0x39e9x19},group:_0xc5fa[84],attributes:[[_0xc5fa[84],_0xc5fa[33]],[sequelize[_0xc5fa[87]](_0xc5fa[85],sequelize[_0xc5fa[86]](_0xc5fa[24])),_0xc5fa[28]]]})})[_0xc5fa[15]](function(_0x39e9x31){_0x39e9x31= _[_0xc5fa[34]](_0x39e9x31,_0xc5fa[82]);_0x39e9x18[_0xc5fa[53]](function(_0x39e9x1f,_0x39e9x32){var _0x39e9x20=_[_0xc5fa[51]](_0x39e9x31,{name:_0x39e9x1f[_0xc5fa[33]]});_0x39e9x1f[_0xc5fa[28]]= _0x39e9x20?_0x39e9x20[_0xc5fa[28]]:0});return ReportQueue[_0xc5fa[38]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null},queue:_0x39e9x19},group:_0xc5fa[84],attributes:[[_0xc5fa[84],_0xc5fa[33]],[sequelize[_0xc5fa[87]](_0xc5fa[85],sequelize[_0xc5fa[86]](_0xc5fa[24])),_0xc5fa[88]]]})})[_0xc5fa[15]](function(_0x39e9x30){_0x39e9x30= _[_0xc5fa[34]](_0x39e9x30,_0xc5fa[82]);_0x39e9x18[_0xc5fa[53]](function(_0x39e9x1f){var _0x39e9x20=_[_0xc5fa[51]](_0x39e9x30,{name:_0x39e9x1f[_0xc5fa[33]]});_0x39e9x1f[_0xc5fa[88]]= _0x39e9x20?_0x39e9x20[_0xc5fa[88]]:0});return ReportQueue[_0xc5fa[38]]({where:{queuecallercomplete:true,queue:_0x39e9x19},group:_0xc5fa[84],attributes:[[_0xc5fa[84],_0xc5fa[33]],[sequelize[_0xc5fa[87]](_0xc5fa[85],sequelize[_0xc5fa[86]](_0xc5fa[24])),_0xc5fa[55]]]})})[_0xc5fa[15]](function(_0x39e9x2f){_0x39e9x2f= _[_0xc5fa[34]](_0x39e9x2f,_0xc5fa[82]);_0x39e9x18[_0xc5fa[53]](function(_0x39e9x1f){var _0x39e9x20=_[_0xc5fa[51]](_0x39e9x2f,{name:_0x39e9x1f[_0xc5fa[33]]});_0x39e9x1f[_0xc5fa[55]]= _0x39e9x20?_0x39e9x20[_0xc5fa[55]]:0});return ReportQueue[_0xc5fa[38]]({where:{queuecallerabandon:true,queue:_0x39e9x19},group:_0xc5fa[84],attributes:[[_0xc5fa[84],_0xc5fa[33]],[sequelize[_0xc5fa[87]](_0xc5fa[85],sequelize[_0xc5fa[86]](_0xc5fa[24])),_0xc5fa[58]]]})})[_0xc5fa[15]](function(_0x39e9x2e){_0x39e9x2e= _[_0xc5fa[34]](_0x39e9x2e,_0xc5fa[82]);_0x39e9x18[_0xc5fa[53]](function(_0x39e9x1f){var _0x39e9x20=_[_0xc5fa[51]](_0x39e9x2e,{name:_0x39e9x1f[_0xc5fa[33]]});_0x39e9x1f[_0xc5fa[58]]= _0x39e9x20?_0x39e9x20[_0xc5fa[58]]:0});return ReportQueue[_0xc5fa[38]]({where:{queuecallerexit:true,queue:_0x39e9x19},group:_0xc5fa[84],attributes:[[_0xc5fa[84],_0xc5fa[33]],[sequelize[_0xc5fa[87]](_0xc5fa[85],sequelize[_0xc5fa[86]](_0xc5fa[24])),_0xc5fa[61]]]})})[_0xc5fa[15]](function(_0x39e9x2d){_0x39e9x2d= _[_0xc5fa[34]](_0x39e9x2d,_0xc5fa[82]);_0x39e9x18[_0xc5fa[53]](function(_0x39e9x1f){var _0x39e9x20=_[_0xc5fa[51]](_0x39e9x2d,{name:_0x39e9x1f[_0xc5fa[33]]});_0x39e9x1f[_0xc5fa[61]]= _0x39e9x20?_0x39e9x20[_0xc5fa[61]]:0});return sequelize[_0xc5fa[16]](_0xc5fa[83]+ _0x39e9x19[_0xc5fa[76]](_0xc5fa[75])+ _0xc5fa[77],{type:sequelize[_0xc5fa[79]][_0xc5fa[78]]})})[_0xc5fa[15]](function(_0x39e9x2c){_0x39e9x18[_0xc5fa[53]](function(_0x39e9x1f){var _0x39e9x20=_[_0xc5fa[51]](_0x39e9x2c,{name:_0x39e9x1f[_0xc5fa[33]]});_0x39e9x1f[_0xc5fa[80]]= _0x39e9x20?_0x39e9x20[_0xc5fa[80]]:_0xc5fa[73]});return sequelize[_0xc5fa[16]](_0xc5fa[81]+ _0x39e9x19[_0xc5fa[76]](_0xc5fa[75])+ _0xc5fa[77],{type:sequelize[_0xc5fa[79]][_0xc5fa[78]]})})[_0xc5fa[15]](function(_0x39e9x2b){_0x39e9x18[_0xc5fa[53]](function(_0x39e9x1f){var _0x39e9x20=_[_0xc5fa[51]](_0x39e9x2b,{name:_0x39e9x1f[_0xc5fa[33]]});_0x39e9x1f[_0xc5fa[72]]= _0x39e9x20?_0x39e9x20[_0xc5fa[72]]:_0xc5fa[73]});return sequelize[_0xc5fa[16]](_0xc5fa[74]+ _0x39e9x19[_0xc5fa[76]](_0xc5fa[75])+ _0xc5fa[77],{type:sequelize[_0xc5fa[79]][_0xc5fa[78]]})})[_0xc5fa[15]](function(_0x39e9x1e){_0x39e9x18[_0xc5fa[53]](function(_0x39e9x1f){var _0x39e9x20=_[_0xc5fa[51]](_0x39e9x1e,{name:_0x39e9x1f[_0xc5fa[33]]});_0x39e9x1f[_0xc5fa[52]]= _0x39e9x20?_0x39e9x20[_0xc5fa[52]]:0});var _0x39e9x21=_(_[_0xc5fa[66]](_0x39e9x18,function(_0x39e9x1f){var _0x39e9x22=_0x39e9x17[_0xc5fa[54]]?(_0x39e9x1f[_0xc5fa[55]]>= Number(_0x39e9x17._answeredFrom)):true;var _0x39e9x23=_0x39e9x17[_0xc5fa[56]]?(_0x39e9x1f[_0xc5fa[55]]<= Number(_0x39e9x17._answeredTo)):true;var _0x39e9x24=_0x39e9x17[_0xc5fa[57]]?(_0x39e9x1f[_0xc5fa[58]]>= Number(_0x39e9x17._abandonedFrom)):true;var _0x39e9x25=_0x39e9x17[_0xc5fa[59]]?(_0x39e9x1f[_0xc5fa[58]]<= Number(_0x39e9x17._abandonedTo)):true;var _0x39e9x26=_0x39e9x17[_0xc5fa[60]]?(_0x39e9x1f[_0xc5fa[61]]>= Number(_0x39e9x17._unmanagedFrom)):true;var _0x39e9x27=_0x39e9x17[_0xc5fa[62]]?(_0x39e9x1f[_0xc5fa[61]]<= Number(_0x39e9x17._unmanagedTo)):true;var _0x39e9x28=_0x39e9x17[_0xc5fa[63]]?_[_0xc5fa[64]](_0x39e9x1f[_0xc5fa[33]],_0x39e9x17._name):true;return _[_0xc5fa[65]]([_0x39e9x22,_0x39e9x23,_0x39e9x24,_0x39e9x25,_0x39e9x26,_0x39e9x27,_0x39e9x28],function(_0x39e9x29,_0x39e9x2a){return _0x39e9x29&& _0x39e9x2a})}));if(_0x39e9x17[_0xc5fa[67]]){_0x39e9x21= _0x39e9x21[_0xc5fa[70]](_0x39e9x17._offset)[_0xc5fa[69]](_0x39e9x17._limit)[_0xc5fa[68]]()};return [_0x39e9x18[_0xc5fa[71]],_0x39e9x21]})[_0xc5fa[50]](function(_0x39e9x1c,_0x39e9x1d){return _0x39e9xa[_0xc5fa[14]](200)[_0xc5fa[13]]({rows:_0x39e9x1d,count:_0x39e9x1c})})[_0xc5fa[12]](function(_0x39e9xc){console[_0xc5fa[49]](_0x39e9xc);return handleError(_0x39e9xa,_0x39e9xc)})};exports[_0xc5fa[89]]= function(_0x39e9x9,_0x39e9xa){var _0x39e9x33={};return Promise[_0xc5fa[31]]([])[_0xc5fa[15]](getVoiceQueues(_0x39e9x9[_0xc5fa[30]]))[_0xc5fa[15]](function(_0x39e9x12){return ReportQueue[_0xc5fa[91]](_0xc5fa[28],{method:[_0xc5fa[90],_0x39e9x12]})[_0xc5fa[38]](Util[_0xc5fa[17]](_0x39e9x9[_0xc5fa[16]],_0x39e9x33))})[_0xc5fa[15]](function(_0x39e9x11){return _0x39e9xa[_0xc5fa[14]](200)[_0xc5fa[13]]({rows:_0x39e9x11,count:_0x39e9x11[_0xc5fa[71]]})})[_0xc5fa[12]](function(_0x39e9xc){return handleError(_0x39e9xa,_0x39e9xc)})};exports[_0xc5fa[88]]= function(_0x39e9x9,_0x39e9xa){return Promise[_0xc5fa[31]]([])[_0xc5fa[15]](getVoiceQueues(_0x39e9x9[_0xc5fa[30]]))[_0xc5fa[15]](function(_0x39e9x12){return ReportQueue[_0xc5fa[29]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null},queue:_0x39e9x12}})})[_0xc5fa[15]](function(_0x39e9x11){return _0x39e9xa[_0xc5fa[14]](200)[_0xc5fa[13]]({value:_0x39e9x11})})[_0xc5fa[12]](function(_0x39e9xc){return handleError(_0x39e9xa,_0x39e9xc)})};exports[_0xc5fa[55]]= function(_0x39e9x9,_0x39e9xa){return Promise[_0xc5fa[31]]([])[_0xc5fa[15]](getVoiceQueues(_0x39e9x9[_0xc5fa[30]]))[_0xc5fa[15]](function(_0x39e9x12){return ReportQueue[_0xc5fa[29]]({where:{queuecallercomplete:true,queue:_0x39e9x12}})})[_0xc5fa[15]](function(_0x39e9x11){return _0x39e9xa[_0xc5fa[14]](200)[_0xc5fa[13]]({value:_0x39e9x11})})[_0xc5fa[12]](function(_0x39e9xc){return handleError(_0x39e9xa,_0x39e9xc)})};exports[_0xc5fa[58]]= function(_0x39e9x9,_0x39e9xa){return Promise[_0xc5fa[31]]([])[_0xc5fa[15]](getVoiceQueues(_0x39e9x9[_0xc5fa[30]]))[_0xc5fa[15]](function(_0x39e9x12){return ReportQueue[_0xc5fa[29]]({where:{queuecallerabandon:true,queue:_0x39e9x12}})})[_0xc5fa[15]](function(_0x39e9x11){return _0x39e9xa[_0xc5fa[14]](200)[_0xc5fa[13]]({value:_0x39e9x11})})[_0xc5fa[12]](function(_0x39e9xc){return handleError(_0x39e9xa,_0x39e9xc)})};exports[_0xc5fa[92]]= function(_0x39e9x9,_0x39e9xa){return Promise[_0xc5fa[31]]([])[_0xc5fa[15]](getVoiceQueues(_0x39e9x9[_0xc5fa[30]]))[_0xc5fa[15]](function(_0x39e9x12){return sequelize[_0xc5fa[16]](_0xc5fa[93]+ _0x39e9x12[_0xc5fa[76]](_0xc5fa[75])+ _0xc5fa[94],{type:sequelize[_0xc5fa[79]][_0xc5fa[78]]})})[_0xc5fa[15]](function(_0x39e9x11){return _0x39e9xa[_0xc5fa[14]](200)[_0xc5fa[13]]({value:_0x39e9x11[0][_0xc5fa[68]]})})[_0xc5fa[12]](function(_0x39e9xc){return handleError(_0x39e9xa,_0x39e9xc)})};exports[_0xc5fa[95]]= function(_0x39e9x9,_0x39e9xa){return Promise[_0xc5fa[31]]([])[_0xc5fa[15]](getVoiceQueues(_0x39e9x9[_0xc5fa[30]]))[_0xc5fa[15]](function(_0x39e9x12){return sequelize[_0xc5fa[16]](_0xc5fa[96]+ _0x39e9x12[_0xc5fa[76]](_0xc5fa[75])+ _0xc5fa[94],{type:sequelize[_0xc5fa[79]][_0xc5fa[78]]})})[_0xc5fa[15]](function(_0x39e9x11){return _0x39e9xa[_0xc5fa[14]](200)[_0xc5fa[13]]({value:_0x39e9x11[0][_0xc5fa[68]]})})[_0xc5fa[12]](function(_0x39e9xc){return handleError(_0x39e9xa,_0x39e9xc)})};exports[_0xc5fa[97]]= function(_0x39e9x9,_0x39e9xa){return Promise[_0xc5fa[31]]([])[_0xc5fa[15]](getVoiceQueues(_0x39e9x9[_0xc5fa[30]]))[_0xc5fa[15]](function(_0x39e9x12){return sequelize[_0xc5fa[16]](_0xc5fa[98]+ _0x39e9x12[_0xc5fa[76]](_0xc5fa[75])+ _0xc5fa[94],{type:sequelize[_0xc5fa[79]][_0xc5fa[78]]})})[_0xc5fa[15]](function(_0x39e9x11){return _0x39e9xa[_0xc5fa[14]](200)[_0xc5fa[13]]({value:_0x39e9x11[0][_0xc5fa[68]]})})[_0xc5fa[12]](function(_0x39e9xc){return handleError(_0x39e9xa,_0x39e9xc)})};exports[_0xc5fa[99]]= function(_0x39e9x9,_0x39e9xa){return Promise[_0xc5fa[31]]([])[_0xc5fa[15]](getVoiceQueues(_0x39e9x9[_0xc5fa[30]]))[_0xc5fa[15]](function(_0x39e9x12){return sequelize[_0xc5fa[16]](_0xc5fa[100]+ _0x39e9x12[_0xc5fa[76]](_0xc5fa[75])+ _0xc5fa[94],{type:sequelize[_0xc5fa[79]][_0xc5fa[78]]})})[_0xc5fa[15]](function(_0x39e9x11){return _0x39e9xa[_0xc5fa[14]](200)[_0xc5fa[13]]({value:_0x39e9x11[0][_0xc5fa[68]]})})[_0xc5fa[12]](function(_0x39e9xc){return handleError(_0x39e9xa,_0x39e9xc)})};exports[_0xc5fa[101]]= function(_0x39e9x9,_0x39e9xa){return Promise[_0xc5fa[31]]([])[_0xc5fa[15]](getVoiceQueues(_0x39e9x9[_0xc5fa[30]]))[_0xc5fa[15]](function(_0x39e9x12){return sequelize[_0xc5fa[16]](_0xc5fa[102]+ _0x39e9x12[_0xc5fa[76]](_0xc5fa[75])+ _0xc5fa[94],{type:sequelize[_0xc5fa[79]][_0xc5fa[78]]})})[_0xc5fa[15]](function(_0x39e9x11){return _0x39e9xa[_0xc5fa[14]](200)[_0xc5fa[13]]({value:_0x39e9x11[0][_0xc5fa[68]]})})[_0xc5fa[12]](function(_0x39e9xc){return handleError(_0x39e9xa,_0x39e9xc)})};exports[_0xc5fa[61]]= function(_0x39e9x9,_0x39e9xa){return Promise[_0xc5fa[31]]([])[_0xc5fa[15]](getVoiceQueues(_0x39e9x9[_0xc5fa[30]]))[_0xc5fa[15]](function(_0x39e9x12){return ReportQueue[_0xc5fa[29]]({where:{queuecallerexit:true,queue:_0x39e9x12}})})[_0xc5fa[15]](function(_0x39e9x11){return _0x39e9xa[_0xc5fa[14]](200)[_0xc5fa[13]]({value:_0x39e9x11})})[_0xc5fa[12]](function(_0x39e9xc){return handleError(_0x39e9xa,_0x39e9xc)})};exports[_0xc5fa[103]]= function(_0x39e9x9,_0x39e9xa){return Promise[_0xc5fa[31]]([])[_0xc5fa[15]](getVoiceQueues(_0x39e9x9[_0xc5fa[30]]))[_0xc5fa[15]](function(_0x39e9x12){return ReportQueue[_0xc5fa[18]]({where:{queuecallerabandon:true,queue:_0x39e9x12}})})[_0xc5fa[15]](function(_0x39e9x11){return _0x39e9xa[_0xc5fa[14]](200)[_0xc5fa[13]](_0x39e9x11)})[_0xc5fa[12]](function(_0x39e9xc){return handleError(_0x39e9xa,_0x39e9xc)})};exports[_0xc5fa[104]]= function(_0x39e9x9,_0x39e9xa){return ReportQueue[_0xc5fa[38]]({where:{queue:_0x39e9x9[_0xc5fa[25]][_0xc5fa[84]]}})[_0xc5fa[15]](function(_0x39e9x34){if(!_0x39e9x34){return _0x39e9xa[_0xc5fa[20]](404)};return _0x39e9xa[_0xc5fa[13]]({count:_0x39e9x34[_0xc5fa[71]],rows:_0x39e9x34})})[_0xc5fa[12]](function(_0x39e9xc){return handleError(_0x39e9xa,_0x39e9xc)})};function handleError(_0x39e9xa,_0x39e9xc){return _0x39e9xa[_0xc5fa[14]](500)[_0xc5fa[13]](_0x39e9xc)}
\ No newline at end of file
diff --git a/server/api/report_queue/report_queue.events.js b/server/api/report_queue/report_queue.events.js
index 29eace5..9f2d03d 100644
--- a/server/api/report_queue/report_queue.events.js
+++ b/server/api/report_queue/report_queue.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportQueue = require('../../models').ReportQueue;
-
-var ReportQueueEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportQueueEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'update',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportQueue.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportQueueEvents.emit(event + ':' + doc._id, doc);
-    ReportQueueEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportQueueEvents;
+var _0x2293=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2293[0];const EventEmitter=require(_0x2293[1]);const ReportQueue=require(_0x2293[3])[_0x2293[2]];var ReportQueueEvents= new EventEmitter();ReportQueueEvents[_0x2293[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x2293[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x2293[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x2293[7]};for(var e in events){var event=events[e];ReportQueue[_0x2293[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x9ba4x8,_0x9ba4x9,_0x9ba4xa){ReportQueueEvents[_0x2293[11]](event+ _0x2293[9]+ _0x9ba4x8[_0x2293[10]],_0x9ba4x8);ReportQueueEvents[_0x2293[11]](event,_0x9ba4x8);_0x9ba4xa(null)}}module[_0x2293[12]]= ReportQueueEvents
\ No newline at end of file
diff --git a/server/api/report_queue/report_queue.socket.js b/server/api/report_queue/report_queue.socket.js
index 3c27c94..a2ac977 100644
--- a/server/api/report_queue/report_queue.socket.js
+++ b/server/api/report_queue/report_queue.socket.js
@@ -1,93 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const ReportQueueEvents = require('./report_queue.events');
-const VoiceQueue = require('../../models').VoiceQueue;
-const User = require('../../models').User;
-const Util = require('../../config/util');
-const _ = require('lodash');
-const Promise = require('bluebird');
-
-// Model events to emit
-var events = ['save', 'update', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_queue:' + event, socket);
-
-    ReportQueueEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'report_queue:save':
-      case 'report_queue:update':
-        return Promise
-          .all([])
-          .then(getVoiceQueues(socket))
-          .then(function(userQueues) {
-            if (_.includes(userQueues, doc.queue)) {
-              socket.emit(event, doc);
-            }
-          })
-          .catch(function(err) {
-            console.log('Error filtering queues after queue save', err);
-          })
-
-      case 'report_queue:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportQueueEvents.removeListener(event, listener);
-  };
-}
-
-function getVoiceQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(Util.getVoiceQueuesIdByUser())
-          .then(function(userQueues) {
-            return _.map(userQueues.rows, 'name');
-          });
-      case 'agent':
-        return User
-          .scope('agent')
-          .findById(user.userId)
-          .then(function(agent) {
-            return agent
-              .getVoiceQueues({
-                attributes: ['name']
-              });
-          })
-          .then(function(agentQueues) {
-            return _.map(agentQueues, 'name');
-          });
-      default:
-        return VoiceQueue //the queue has to exist in my motion queues, otherwise is not manageable from the interface (prbably an error didn' t delete the queue from asterisk)
-          .findAll()
-          .then(function(userQueues) {
-            return _.map(userQueues, 'name');
-          });
-    }
-  }
-}
+var _0xf634=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x45\x72\x72\x6F\x72\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x71\x75\x65\x75\x65\x73\x20\x61\x66\x74\x65\x72\x20\x71\x75\x65\x75\x65\x20\x73\x61\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x71\x75\x65\x75\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x65\x6D\x69\x74","\x74\x68\x65\x6E","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A\x75\x70\x64\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x6F\x6C\x65"];_0xf634[0];const ReportQueueEvents=require(_0xf634[1]);const VoiceQueue=require(_0xf634[3])[_0xf634[2]];const User=require(_0xf634[3])[_0xf634[4]];const Util=require(_0xf634[5]);const _=require(_0xf634[6]);const Promise=require(_0xf634[7]);var events=[_0xf634[8],_0xf634[9],_0xf634[10]];exports[_0xf634[11]]= function(_0xbdbax8){for(var _0xbdbax9=0,_0xbdbaxa=events[_0xf634[12]];_0xbdbax9< _0xbdbaxa;_0xbdbax9++){var _0xbdbaxb=events[_0xbdbax9];var _0xbdbaxc=createListener(_0xf634[13]+ _0xbdbaxb,_0xbdbax8);ReportQueueEvents[_0xf634[14]](_0xbdbaxb,_0xbdbaxc);_0xbdbax8[_0xf634[14]](_0xf634[15],removeListener(_0xbdbaxb,_0xbdbaxc))}};function createListener(_0xbdbaxb,_0xbdbax8){return function(_0xbdbaxe){switch(_0xbdbaxb){case _0xf634[16]:;case _0xf634[25]:return Promise[_0xf634[24]]([])[_0xf634[23]](getVoiceQueues(_0xbdbax8))[_0xf634[23]](function(_0xbdbax10){if(_[_0xf634[21]](_0xbdbax10,_0xbdbaxe[_0xf634[20]])){_0xbdbax8[_0xf634[22]](_0xbdbaxb,_0xbdbaxe)}})[_0xf634[19]](function(_0xbdbaxf){console[_0xf634[18]](_0xf634[17],_0xbdbaxf)});case _0xf634[26]:_0xbdbax8[_0xf634[22]](_0xbdbaxb,_0xbdbaxe);break;default:}}}function removeListener(_0xbdbaxb,_0xbdbaxc){return function(){ReportQueueEvents[_0xf634[27]](_0xbdbaxb,_0xbdbaxc)}}function getVoiceQueues(_0xbdbax13){return function(){switch(_0xbdbax13[_0xf634[40]]){case _0xf634[35]:return User[_0xf634[34]](_0xbdbax13[_0xf634[32]],{attributes:[_0xf634[33]]})[_0xf634[23]](Util[_0xf634[31]]())[_0xf634[23]](function(_0xbdbax10){return _[_0xf634[30]](_0xbdbax10[_0xf634[28]],_0xf634[29])});case _0xf634[37]:return User[_0xf634[38]](_0xf634[37])[_0xf634[34]](_0xbdbax13[_0xf634[32]])[_0xf634[23]](function(_0xbdbax15){return _0xbdbax15[_0xf634[36]]({attributes:[_0xf634[29]]})})[_0xf634[23]](function(_0xbdbax14){return _[_0xf634[30]](_0xbdbax14,_0xf634[29])});default:return VoiceQueue[_0xf634[39]]()[_0xf634[23]](function(_0xbdbax10){return _[_0xf634[30]](_0xbdbax10,_0xf634[29])})}}}
\ No newline at end of file
diff --git a/server/api/report_sms/index.js b/server/api/report_sms/index.js
index 93dc165..a863cde 100644
--- a/server/api/report_sms/index.js
+++ b/server/api/report_sms/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./report_sms.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([17], ['admin', 'agent']), controller.index);
-router.get('/:id/accept/:uniqueid', auth.isAuthenticated(), license.hasSms(), auth.hasRole('agent'), controller.accept);
-router.get('/:id/reject', auth.isAuthenticated(), license.hasSms(), auth.hasRole('agent'), controller.reject);
-
-
-
-module.exports = router;
+var _0x5686=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x53\x6D\x73","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x68\x61\x73\x52\x6F\x6C\x65","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x5686[0];var express=require(_0x5686[1]);var controller=require(_0x5686[2]);var auth=require(_0x5686[3]);var license=require(_0x5686[4]);var router=express.Router();router[_0x5686[12]](_0x5686[5],auth[_0x5686[6]](),license[_0x5686[7]](),auth[_0x5686[10]]([17],[_0x5686[8],_0x5686[9]]),controller[_0x5686[11]]);router[_0x5686[12]](_0x5686[13],auth[_0x5686[6]](),license[_0x5686[7]](),auth[_0x5686[14]](_0x5686[9]),controller[_0x5686[15]]);router[_0x5686[12]](_0x5686[16],auth[_0x5686[6]](),license[_0x5686[7]](),auth[_0x5686[14]](_0x5686[9]),controller[_0x5686[17]]);module[_0x5686[18]]= router
\ No newline at end of file
diff --git a/server/api/report_sms/report_sms.controller.js b/server/api/report_sms/report_sms.controller.js
index 20e4240..243ad4b 100644
--- a/server/api/report_sms/report_sms.controller.js
+++ b/server/api/report_sms/report_sms.controller.js
@@ -1,179 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/report/sms              ->  index
- * POST    /api/report/sms              ->  create
- * GET     /api/report/sms/:id          ->  show
- * PUT     /api/report/sms/:id          ->  update
- * DELETE  /api/report/sms/:id          ->  destroy
- */
-
-'use strict';
-var _ = require('lodash');
-var ReportSms = require('../../models').ReportSms;
-var SmsRoom = require('../../models').SmsRoom;
-var sequelize = require('../../models').sequelize;
-var Agent = require('../../models').User;
-var Util = require('../../config/util');
-var moment = require('moment');
-
-
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-// Gets a list of ReportSmss
-
-
-
-exports.index = function(req, res) {
-  return ReportSms
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-
-// Get a single reportSMS
-exports.accept = function(req, res) {
-  var _agent;
-  var _roomid = req.params.uniqueid.split('.')[1];
-
-  return Agent
-    .findById(req.user.id, {
-      attributes: ['id', 'smsCapacity']
-    })
-    .then(function(agent) {
-      _agent = agent;
-      return agent
-        .getSmsRooms({
-          where: {
-            status: {
-              $ne: 'CLOSED'
-            },
-            id: {
-              $ne: _roomid
-            }
-          },
-          attributes: ['id']
-        });
-    })
-    .then(function(smsRooms) {
-      return ReportSms
-        .findById(req.params.id);
-    })
-    .then(function(reportSms) {
-      if (!reportSms) {
-        return res.sendStatus(404);
-      }
-
-      var updated = _.merge(reportSms, {
-        connectid: req.params.uniqueid
-      });
-
-      return updated
-        .save();
-    })
-    .then(function() {
-      return SmsRoom
-        .update({
-          status: 'OPEN',
-          openReason: 'agent'
-        }, {
-          where: {
-            id: _roomid
-          },
-          user: req.user,
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return res.sendStatus(504);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-};
-
-// Get a single reportMail
-exports.reject = function(req, res) {
-  return ReportSms
-    .findById(req.params.id)
-    .then(function(reportSms) {
-      if (!reportSms) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(reportSms, {
-        rejectedAt: moment().format("YYYY-MM-DD HH:mm:ss")
-      });
-      return updated
-        .save();
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Creates a new ReportSms in the DB
-// exports.create = function(req, res) {
-//   return ReportSms
-//     .create(req.body)
-//     .then(function(reportSms) {
-//       return res.status(201).send(reportSms);
-//     })
-//     .catch(function(err) {
-//       return handleError(res, err);
-//     });
-// }
-
-// Updates an existing ReportSms in the DB
-// exports.update = function(req, res) {
-//   if (req.body._id) {
-//     delete req.body._id;
-//   }
-//   return ReportSms
-//     .findById(req.params.id)
-//     .then(function(reportSms) {
-//       if (!reportSms) {
-//         return res.sendStatus(404);
-//       }
-//       var updated = _.merge(reportSms, req.body);
-//       return updated
-//         .save();
-//     })
-//     .then(function(reportSms) {
-//       return res.status(200).send(reportSms);
-//     })
-//     .catch(function(err) {
-//       return handleError(res, err);
-//     });
-// }
-//
-// Deletes a ReportSms from the DB
-// exports.destroy = function(req, res) {
-//   return ReportSms
-//     .findById(req.params.id)
-//     .then(function(reportSms) {
-//       if (!reportSms) {
-//         return res.sendStatus(404);
-//       }
-//       return reportSms
-//         .destroy();
-//     })
-//     .then(function() {
-//       return res.sendStatus(204);
-//     })
-//     .catch(function(err) {
-//       return handleError(res, err);
-//     });
-// }
+var _0xe3d2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x52\x6F\x6F\x6D","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x63\x63\x65\x70\x74","\x2E","\x73\x70\x6C\x69\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x4F\x50\x45\x4E","\x61\x67\x65\x6E\x74","\x75\x73\x65\x72","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x43\x4C\x4F\x53\x45\x44","\x67\x65\x74\x53\x6D\x73\x52\x6F\x6F\x6D\x73","\x73\x6D\x73\x43\x61\x70\x61\x63\x69\x74\x79","\x72\x65\x6A\x65\x63\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74"];_0xe3d2[0];var _=require(_0xe3d2[1]);var ReportSms=require(_0xe3d2[3])[_0xe3d2[2]];var SmsRoom=require(_0xe3d2[3])[_0xe3d2[4]];var sequelize=require(_0xe3d2[3])[_0xe3d2[5]];var Agent=require(_0xe3d2[3])[_0xe3d2[6]];var Util=require(_0xe3d2[7]);var moment=require(_0xe3d2[8]);function handleError(_0xe380x9,_0xe380xa){return _0xe380x9[_0xe3d2[10]](500)[_0xe3d2[9]](_0xe380xa)}exports[_0xe3d2[11]]= function(_0xe380xb,_0xe380x9){return ReportSms[_0xe3d2[16]](Util[_0xe3d2[15]](_0xe380xb[_0xe3d2[14]]))[_0xe3d2[13]](function(_0xe380xc){_0xe380x9[_0xe3d2[10]](200)[_0xe3d2[9]](_0xe380xc)})[_0xe3d2[12]](function(_0xe380xa){return handleError(_0xe380x9,_0xe380xa)})};exports[_0xe3d2[17]]= function(_0xe380xb,_0xe380x9){var _0xe380xd;var _0xe380xe=_0xe380xb[_0xe3d2[21]][_0xe3d2[20]][_0xe3d2[19]](_0xe3d2[18])[1];return Agent[_0xe3d2[30]](_0xe380xb[_0xe3d2[25]][_0xe3d2[29]],{attributes:[_0xe3d2[29],_0xe3d2[33]]})[_0xe3d2[13]](function(_0xe380x12){_0xe380xd= _0xe380x12;return _0xe380x12[_0xe3d2[32]]({where:{status:{$ne:_0xe3d2[31]},id:{$ne:_0xe380xe}},attributes:[_0xe3d2[29]]})})[_0xe3d2[13]](function(_0xe380x11){return ReportSms[_0xe3d2[30]](_0xe380xb[_0xe3d2[21]][_0xe3d2[29]])})[_0xe3d2[13]](function(_0xe380xf){if(!_0xe380xf){return _0xe380x9[_0xe3d2[22]](404)};var _0xe380x10=_[_0xe3d2[27]](_0xe380xf,{connectid:_0xe380xb[_0xe3d2[21]][_0xe3d2[20]]});return _0xe380x10[_0xe3d2[28]]()})[_0xe3d2[13]](function(){return SmsRoom[_0xe3d2[26]]({status:_0xe3d2[23],openReason:_0xe3d2[24]},{where:{id:_0xe380xe},user:_0xe380xb[_0xe3d2[25]],individualHooks:true})})[_0xe3d2[13]](function(){return _0xe380x9[_0xe3d2[22]](200)})[_0xe3d2[12]](sequelize.UniqueConstraintError,function(_0xe380xa){return _0xe380x9[_0xe3d2[22]](504)})[_0xe3d2[12]](function(_0xe380xa){return handleError(_0xe380x9,_0xe380xa)})};exports[_0xe3d2[34]]= function(_0xe380xb,_0xe380x9){return ReportSms[_0xe3d2[30]](_0xe380xb[_0xe3d2[21]][_0xe3d2[29]])[_0xe3d2[13]](function(_0xe380xf){if(!_0xe380xf){return _0xe380x9[_0xe3d2[22]](404)};var _0xe380x10=_[_0xe3d2[27]](_0xe380xf,{rejectedAt:moment()[_0xe3d2[36]](_0xe3d2[35])});return _0xe380x10[_0xe3d2[28]]()})[_0xe3d2[13]](function(){return _0xe380x9[_0xe3d2[22]](200)})[_0xe3d2[12]](function(_0xe380xa){return handleError(_0xe380x9,_0xe380xa)})}
\ No newline at end of file
diff --git a/server/api/report_sms/report_sms.events.js b/server/api/report_sms/report_sms.events.js
index 85c8624..b4d9e48 100644
--- a/server/api/report_sms/report_sms.events.js
+++ b/server/api/report_sms/report_sms.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportSms = require('../../models').ReportSms;
-
-var ReportSmsEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportSmsEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'update',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportSms.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportSmsEvents.emit(event + ':' + doc._id, doc);
-    ReportSmsEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportSmsEvents;
+var _0xb5ae=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xb5ae[0];const EventEmitter=require(_0xb5ae[1]);const ReportSms=require(_0xb5ae[3])[_0xb5ae[2]];var ReportSmsEvents= new EventEmitter();ReportSmsEvents[_0xb5ae[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb5ae[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb5ae[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb5ae[7]};for(var e in events){var event=events[e];ReportSms[_0xb5ae[8]](e,emitEvent(event))};function emitEvent(event){return function(_0xbdcax8,_0xbdcax9,_0xbdcaxa){ReportSmsEvents[_0xb5ae[11]](event+ _0xb5ae[9]+ _0xbdcax8[_0xb5ae[10]],_0xbdcax8);ReportSmsEvents[_0xb5ae[11]](event,_0xbdcax8);_0xbdcaxa(null)}}module[_0xb5ae[12]]= ReportSmsEvents
\ No newline at end of file
diff --git a/server/api/report_sms/report_sms.socket.js b/server/api/report_sms/report_sms.socket.js
index f63cd11..1f9373e 100644
--- a/server/api/report_sms/report_sms.socket.js
+++ b/server/api/report_sms/report_sms.socket.js
@@ -1,46 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const ReportSmsEvents = require('./report_sms.events');
-
-// Model events to emit
-var events = ['save', 'update', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_sms:' + event, socket);
-
-    ReportSmsEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'report_sms:save':
-      case 'report_sms:update':
-        if (socket.name === doc.membername || socket.role === 'admin') {
-          socket.emit(event, doc);
-        }
-        break;
-
-      case 'report_sms:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportSmsEvents.removeListener(event, listener);
-  };
-}
+var _0x8e3a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x3A\x73\x61\x76\x65","\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x3A\x75\x70\x64\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x8e3a[0];const ReportSmsEvents=require(_0x8e3a[1]);var events=[_0x8e3a[2],_0x8e3a[3],_0x8e3a[4]];exports[_0x8e3a[5]]= function(_0xea8ex3){for(var _0xea8ex4=0,_0xea8ex5=events[_0x8e3a[6]];_0xea8ex4< _0xea8ex5;_0xea8ex4++){var _0xea8ex6=events[_0xea8ex4];var _0xea8ex7=createListener(_0x8e3a[7]+ _0xea8ex6,_0xea8ex3);ReportSmsEvents[_0x8e3a[8]](_0xea8ex6,_0xea8ex7);_0xea8ex3[_0x8e3a[8]](_0x8e3a[9],removeListener(_0xea8ex6,_0xea8ex7))}};function createListener(_0xea8ex6,_0xea8ex3){return function(_0xea8ex9){switch(_0xea8ex6){case _0x8e3a[10]:;case _0x8e3a[16]:if(_0xea8ex3[_0x8e3a[11]]=== _0xea8ex9[_0x8e3a[12]]|| _0xea8ex3[_0x8e3a[13]]=== _0x8e3a[14]){_0xea8ex3[_0x8e3a[15]](_0xea8ex6,_0xea8ex9)};break;case _0x8e3a[17]:_0xea8ex3[_0x8e3a[15]](_0xea8ex6,_0xea8ex9);break;default:}}}function removeListener(_0xea8ex6,_0xea8ex7){return function(){ReportSmsEvents[_0x8e3a[18]](_0xea8ex6,_0xea8ex7)}}
\ No newline at end of file
diff --git a/server/api/report_sms_session/index.js b/server/api/report_sms_session/index.js
index eba420d..3fc7cb6 100644
--- a/server/api/report_sms_session/index.js
+++ b/server/api/report_sms_session/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./report_sms_session.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([17], ['admin']), controller.index);
-router.get('/describe', auth.isAuthenticated(), license.hasSms(), auth.hasModule([17], ['admin']), controller.describe);
-router.get('/timeout', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasModule([17], ['admin']), controller.timeout);
-router.get('/waiting', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasModule([17], ['admin']), controller.waiting);
-router.get('/waiting/applications', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin', 'agent']), controller.waitingApplications);
-
-module.exports = router;
+var _0xecd2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x53\x6D\x73","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x74\x69\x6D\x65\x6F\x75\x74","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x2F\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67","\x2F\x77\x61\x69\x74\x69\x6E\x67\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x67\x65\x6E\x74","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xecd2[0];var express=require(_0xecd2[1]);var controller=require(_0xecd2[2]);var auth=require(_0xecd2[3]);var license=require(_0xecd2[4]);var router=express.Router();router[_0xecd2[11]](_0xecd2[5],auth[_0xecd2[6]](),license[_0xecd2[7]](),auth[_0xecd2[9]]([17],[_0xecd2[8]]),controller[_0xecd2[10]]);router[_0xecd2[11]](_0xecd2[12],auth[_0xecd2[6]](),license[_0xecd2[7]](),auth[_0xecd2[9]]([17],[_0xecd2[8]]),controller[_0xecd2[13]]);router[_0xecd2[11]](_0xecd2[14],license[_0xecd2[15]](),auth[_0xecd2[6]](),license[_0xecd2[7]](),auth[_0xecd2[9]]([17],[_0xecd2[8]]),controller[_0xecd2[16]]);router[_0xecd2[11]](_0xecd2[17],license[_0xecd2[15]](),auth[_0xecd2[6]](),license[_0xecd2[7]](),auth[_0xecd2[9]]([17],[_0xecd2[8]]),controller[_0xecd2[18]]);router[_0xecd2[11]](_0xecd2[19],auth[_0xecd2[6]](),license[_0xecd2[7]](),auth[_0xecd2[9]]([11],[_0xecd2[8],_0xecd2[20]]),controller[_0xecd2[21]]);module[_0xecd2[22]]= router
\ No newline at end of file
diff --git a/server/api/report_sms_session/report_sms_session.controller.js b/server/api/report_sms_session/report_sms_session.controller.js
index 0b240ac..726e314 100644
--- a/server/api/report_sms_session/report_sms_session.controller.js
+++ b/server/api/report_sms_session/report_sms_session.controller.js
@@ -1,155 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var ReportSmsSession = require('../../models').ReportSmsSession;
-var ReportSmsSessionHistory = require('../../models').history.ReportSmsSessionHistory;
-
-var Util = require('../../config/util');
-var User = require('../../models').User;
-var Promise = require('bluebird');
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  return ReportSmsSession
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return ReportSmsSessionHistory
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function getSmsQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return User
-          .findById(user.id, {
-            attributes: ['id']
-          })
-          .then(Util.getSmsQueuesIdByUser({}, {
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: User,
-              attributes: ['id']
-            }]
-          }))
-          .then(function(userQueues) {
-            var users = [];
-            userQueues.rows.forEach(function(queue) {
-              users = _.union(users, _.map(queue.Users, 'id'));
-            });
-            return {
-              $or: {
-                queue: _.map(userQueues.rows, 'id'),
-                memberid: users
-              }
-            };
-          });
-      case 'agent':
-        return User
-          .findById(user.id, {
-            attributes: ['id']
-          })
-          .then(function(agent) {
-            return agent
-              .getSmsQueues({
-                attributes: ['id']
-              });
-          })
-          .then(function(userQueues) {
-            return {
-              $or: {
-                queue: _.map(userQueues, 'id'),
-                memberid: user.id
-              }
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
-
-// Get timeout apps
-exports.timeout = function(req, res) {
-  return Promise
-    .all([])
-    .then(getSmsQueues(req.user))
-    .then(function(condition) {
-      return ReportSmsSession
-        .count(Util.getQuery(req.query, _.merge({
-          timeout: true
-        }, condition)));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Get waiting apps
-exports.waiting = function(req, res) {
-  return Promise
-    .all([])
-    .then(getSmsQueues(req.user))
-    .then(function(condition) {
-      return ReportSmsSession
-        .count(Util.getQuery(req.query, _.merge({
-          leaveAt: null
-        }, condition)));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.waitingApplications = function(req, res) {
-  return Promise
-    .all([])
-    .then(getSmsQueues(req.user))
-    .then(function(condition) {
-      return ReportSmsSession
-        .findAll(Util.getQuery(req.query, _.merge({
-          leaveAt: null
-        }, condition)));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        rows: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xdf93=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x41\x6C\x6C"];_0xdf93[0];var _=require(_0xdf93[1]);var ReportSmsSession=require(_0xdf93[3])[_0xdf93[2]];var ReportSmsSessionHistory=require(_0xdf93[3])[_0xdf93[5]][_0xdf93[4]];var Util=require(_0xdf93[6]);var User=require(_0xdf93[3])[_0xdf93[7]];var Promise=require(_0xdf93[8]);exports[_0xdf93[9]]= function(_0x1c61x7,_0x1c61x8,_0x1c61x9){return ReportSmsSession[_0xdf93[16]](Util[_0xdf93[15]](_0x1c61x7[_0xdf93[14]]))[_0xdf93[13]](function(_0x1c61xb){_0x1c61x8[_0xdf93[12]](200)[_0xdf93[11]](_0x1c61xb)})[_0xdf93[10]](function(_0x1c61xa){return handleError(_0x1c61x8,_0x1c61xa)})};exports[_0xdf93[17]]= function(_0x1c61x7,_0x1c61x8){return ReportSmsSessionHistory[_0xdf93[17]]()[_0xdf93[13]](function(_0x1c61xc){return _0x1c61x8[_0xdf93[12]](200)[_0xdf93[11]](_0x1c61xc)})[_0xdf93[10]](function(_0x1c61xa){return handleError(_0x1c61x8,_0x1c61xa)})};function getSmsQueues(_0x1c61xe){return function(){switch(_0x1c61xe[_0xdf93[28]]){case _0xdf93[25]:return User[_0xdf93[24]](_0x1c61xe[_0xdf93[18]],{attributes:[_0xdf93[18]]})[_0xdf93[13]](Util[_0xdf93[23]]({},{attributes:[_0xdf93[18]],include:[{raw:true,model:User,attributes:[_0xdf93[18]]}]}))[_0xdf93[13]](function(_0x1c61xf){var _0x1c61x10=[];_0x1c61xf[_0xdf93[22]][_0xdf93[21]](function(_0x1c61x11){_0x1c61x10= _[_0xdf93[20]](_0x1c61x10,_[_0xdf93[19]](_0x1c61x11.Users,_0xdf93[18]))});return {$or:{queue:_[_0xdf93[19]](_0x1c61xf[_0xdf93[22]],_0xdf93[18]),memberid:_0x1c61x10}}});case _0xdf93[27]:return User[_0xdf93[24]](_0x1c61xe[_0xdf93[18]],{attributes:[_0xdf93[18]]})[_0xdf93[13]](function(_0x1c61x12){return _0x1c61x12[_0xdf93[26]]({attributes:[_0xdf93[18]]})})[_0xdf93[13]](function(_0x1c61xf){return {$or:{queue:_[_0xdf93[19]](_0x1c61xf,_0xdf93[18]),memberid:_0x1c61xe[_0xdf93[18]]}}});default:return {}}}}exports[_0xdf93[29]]= function(_0x1c61x7,_0x1c61x8){return Promise[_0xdf93[33]]([])[_0xdf93[13]](getSmsQueues(_0x1c61x7[_0xdf93[25]]))[_0xdf93[13]](function(_0x1c61x14){return ReportSmsSession[_0xdf93[32]](Util[_0xdf93[15]](_0x1c61x7[_0xdf93[14]],_[_0xdf93[31]]({timeout:true},_0x1c61x14)))})[_0xdf93[13]](function(_0x1c61x13){return _0x1c61x8[_0xdf93[12]](200)[_0xdf93[11]]({value:_0x1c61x13})})[_0xdf93[10]](function(_0x1c61xa){console[_0xdf93[30]](_0x1c61xa);return handleError(_0x1c61x8,_0x1c61xa)})};exports[_0xdf93[34]]= function(_0x1c61x7,_0x1c61x8){return Promise[_0xdf93[33]]([])[_0xdf93[13]](getSmsQueues(_0x1c61x7[_0xdf93[25]]))[_0xdf93[13]](function(_0x1c61x14){return ReportSmsSession[_0xdf93[32]](Util[_0xdf93[15]](_0x1c61x7[_0xdf93[14]],_[_0xdf93[31]]({leaveAt:null},_0x1c61x14)))})[_0xdf93[13]](function(_0x1c61x13){return _0x1c61x8[_0xdf93[12]](200)[_0xdf93[11]]({value:_0x1c61x13})})[_0xdf93[10]](function(_0x1c61xa){console[_0xdf93[30]](_0x1c61xa);return handleError(_0x1c61x8,_0x1c61xa)})};exports[_0xdf93[35]]= function(_0x1c61x7,_0x1c61x8){return Promise[_0xdf93[33]]([])[_0xdf93[13]](getSmsQueues(_0x1c61x7[_0xdf93[25]]))[_0xdf93[13]](function(_0x1c61x14){return ReportSmsSession[_0xdf93[36]](Util[_0xdf93[15]](_0x1c61x7[_0xdf93[14]],_[_0xdf93[31]]({leaveAt:null},_0x1c61x14)))})[_0xdf93[13]](function(_0x1c61x13){return _0x1c61x8[_0xdf93[12]](200)[_0xdf93[11]]({rows:_0x1c61x13})})[_0xdf93[10]](function(_0x1c61xa){console[_0xdf93[30]](_0x1c61xa);return handleError(_0x1c61x8,_0x1c61xa)})};function handleError(_0x1c61x8,_0x1c61xa){return _0x1c61x8[_0xdf93[12]](500)[_0xdf93[11]](_0x1c61xa)}
\ No newline at end of file
diff --git a/server/api/report_sms_session/report_sms_session.events.js b/server/api/report_sms_session/report_sms_session.events.js
index 6617408..05b8981 100644
--- a/server/api/report_sms_session/report_sms_session.events.js
+++ b/server/api/report_sms_session/report_sms_session.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportSmsSession = require('../../models').ReportSmsSession;
-
-var ReportSmsSessionEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportSmsSessionEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportSmsSession.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportSmsSessionEvents.emit(event + ':' + doc._id, doc);
-    ReportSmsSessionEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportSmsSessionEvents;
+var _0xbcdf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xbcdf[0];const EventEmitter=require(_0xbcdf[1]);const ReportSmsSession=require(_0xbcdf[3])[_0xbcdf[2]];var ReportSmsSessionEvents= new EventEmitter();ReportSmsSessionEvents[_0xbcdf[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xbcdf[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xbcdf[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xbcdf[6]};for(var e in events){var event=events[e];ReportSmsSession[_0xbcdf[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x40c8x8,_0x40c8x9,_0x40c8xa){ReportSmsSessionEvents[_0xbcdf[10]](event+ _0xbcdf[8]+ _0x40c8x8[_0xbcdf[9]],_0x40c8x8);ReportSmsSessionEvents[_0xbcdf[10]](event,_0x40c8x8);_0x40c8xa(null)}}module[_0xbcdf[11]]= ReportSmsSessionEvents
\ No newline at end of file
diff --git a/server/api/report_sms_session/report_sms_session.socket.js b/server/api/report_sms_session/report_sms_session.socket.js
index ef20c19..2ce40b8 100644
--- a/server/api/report_sms_session/report_sms_session.socket.js
+++ b/server/api/report_sms_session/report_sms_session.socket.js
@@ -1,104 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const ReportSmsSessionEvents = require('./report_sms_session.events');
-const User = require('../../models').User;
-const Util = require('../../config/util');
-const _ = require('lodash');
-const Promise = require('bluebird');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_sms_session:' + event, socket);
-
-    ReportSmsSessionEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'report_sms_session:save':
-        return Promise
-          .all([])
-          .then(getSmsQueues(socket))
-          .then(function(condition) {
-            if (socket.role === 'admin' || _.includes(condition.memberid, doc.memberid) || _.includes(condition.queue, doc.queue)) {
-              socket.emit(event, doc);
-            }
-          })
-          .catch(function(err) {
-            console.log('Error filtering report sms sessions after save', err);
-          });
-      case 'report_sms_session:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportSmsSessionEvents.removeListener(event, listener);
-  };
-}
-
-function getSmsQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(Util.getSmsQueuesIdByUser({}, {
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: User,
-              attributes: ['id']
-            }]
-          }))
-          .then(function(userQueues) {
-            var users = [];
-            userQueues.rows.forEach(function(queue) {
-              users = _.union(users, _.map(queue.Users, 'id'));
-            });
-            return {
-              queue: _.map(userQueues.rows, 'id'),
-              memberid: users
-            };
-          });
-      case 'agent':
-        return User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(function(agent) {
-            return agent
-              .getSmsQueues({
-                attributes: ['id']
-              });
-          })
-          .then(function(userQueues) {
-            return {
-              queue: _.map(userQueues, 'id'),
-              memberid: user.userId
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
+var _0x945e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x45\x72\x72\x6F\x72\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x73\x6D\x73\x20\x73\x65\x73\x73\x69\x6F\x6E\x73\x20\x61\x66\x74\x65\x72\x20\x73\x61\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x71\x75\x65\x75\x65","\x65\x6D\x69\x74","\x74\x68\x65\x6E","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74"];_0x945e[0];const ReportSmsSessionEvents=require(_0x945e[1]);const User=require(_0x945e[3])[_0x945e[2]];const Util=require(_0x945e[4]);const _=require(_0x945e[5]);const Promise=require(_0x945e[6]);var events=[_0x945e[7],_0x945e[8]];exports[_0x945e[9]]= function(_0xe42ex7){for(var _0xe42ex8=0,_0xe42ex9=events[_0x945e[10]];_0xe42ex8< _0xe42ex9;_0xe42ex8++){var _0xe42exa=events[_0xe42ex8];var _0xe42exb=createListener(_0x945e[11]+ _0xe42exa,_0xe42ex7);ReportSmsSessionEvents[_0x945e[12]](_0xe42exa,_0xe42exb);_0xe42ex7[_0x945e[12]](_0x945e[13],removeListener(_0xe42exa,_0xe42exb))}};function createListener(_0xe42exa,_0xe42ex7){return function(_0xe42exd){switch(_0xe42exa){case _0x945e[25]:return Promise[_0x945e[24]]([])[_0x945e[23]](getSmsQueues(_0xe42ex7))[_0x945e[23]](function(_0xe42exf){if(_0xe42ex7[_0x945e[17]]=== _0x945e[18]|| _[_0x945e[20]](_0xe42exf[_0x945e[19]],_0xe42exd[_0x945e[19]])|| _[_0x945e[20]](_0xe42exf[_0x945e[21]],_0xe42exd[_0x945e[21]])){_0xe42ex7[_0x945e[22]](_0xe42exa,_0xe42exd)}})[_0x945e[16]](function(_0xe42exe){console[_0x945e[15]](_0x945e[14],_0xe42exe)});case _0x945e[26]:_0xe42ex7[_0x945e[22]](_0xe42exa,_0xe42exd);break;default:}}}function removeListener(_0xe42exa,_0xe42exb){return function(){ReportSmsSessionEvents[_0x945e[27]](_0xe42exa,_0xe42exb)}}function getSmsQueues(_0xe42ex12){return function(){switch(_0xe42ex12[_0x945e[17]]){case _0x945e[36]:return User[_0x945e[35]](_0xe42ex12[_0x945e[34]],{attributes:[_0x945e[28]]})[_0x945e[23]](Util[_0x945e[33]]({},{attributes:[_0x945e[28]],include:[{raw:true,model:User,attributes:[_0x945e[28]]}]}))[_0x945e[23]](function(_0xe42ex13){var _0xe42ex14=[];_0xe42ex13[_0x945e[32]][_0x945e[31]](function(_0xe42ex15){_0xe42ex14= _[_0x945e[30]](_0xe42ex14,_[_0x945e[29]](_0xe42ex15.Users,_0x945e[28]))});return {queue:_[_0x945e[29]](_0xe42ex13[_0x945e[32]],_0x945e[28]),memberid:_0xe42ex14}});case _0x945e[38]:return User[_0x945e[35]](_0xe42ex12[_0x945e[34]],{attributes:[_0x945e[28]]})[_0x945e[23]](function(_0xe42ex16){return _0xe42ex16[_0x945e[37]]({attributes:[_0x945e[28]]})})[_0x945e[23]](function(_0xe42ex13){return {queue:_[_0x945e[29]](_0xe42ex13,_0x945e[28]),memberid:_0xe42ex12[_0x945e[34]]}});default:return {}}}}
\ No newline at end of file
diff --git a/server/api/report_square/index.js b/server/api/report_square/index.js
index ecde7a2..6bbcbcb 100644
--- a/server/api/report_square/index.js
+++ b/server/api/report_square/index.js
@@ -1,14 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./report_square.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.index);
-router.get('/describe', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.describe);
-router.get('/realtime', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.realtime);
-router.get('/show', auth.isAuthenticated(), auth.hasModule([14], ['admin', 'agent']), controller.show);
-
-module.exports = router;
+var _0xe765=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x2F\x73\x68\x6F\x77","\x61\x67\x65\x6E\x74","\x73\x68\x6F\x77","\x65\x78\x70\x6F\x72\x74\x73"];_0xe765[0];var express=require(_0xe765[1]);var controller=require(_0xe765[2]);var auth=require(_0xe765[3]);var router=express.Router();router[_0xe765[9]](_0xe765[4],auth[_0xe765[5]](),auth[_0xe765[7]]([14],[_0xe765[6]]),controller[_0xe765[8]]);router[_0xe765[9]](_0xe765[10],auth[_0xe765[5]](),auth[_0xe765[7]]([14],[_0xe765[6]]),controller[_0xe765[11]]);router[_0xe765[9]](_0xe765[12],auth[_0xe765[5]](),auth[_0xe765[7]]([14],[_0xe765[6]]),controller[_0xe765[13]]);router[_0xe765[9]](_0xe765[14],auth[_0xe765[5]](),auth[_0xe765[7]]([14],[_0xe765[6],_0xe765[15]]),controller[_0xe765[16]]);module[_0xe765[17]]= router
\ No newline at end of file
diff --git a/server/api/report_square/report_square.controller.js b/server/api/report_square/report_square.controller.js
index b32d3b6..52c7e7a 100644
--- a/server/api/report_square/report_square.controller.js
+++ b/server/api/report_square/report_square.controller.js
@@ -1,72 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var ReportSquare = require('../../models').ReportSquare;
-var ReportSquareHistory = require('../../models').history.ReportSquareHistory;
-var Util = require('../../config/util');
-
-// Get list of report_square
-exports.index = function(req, res, next) {
-  return generalIndex(req, res, next);
-};
-
-exports.realtime = function(req, res, next) {
-  return generalIndex(req, res, next, {
-    leaveAt: null
-  });
-};
-
-function generalIndex(req, res, next, extraWhere) {
-  return ReportSquare
-    .findAndCountAll(Util.getQuery(req.query, extraWhere || {}))
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return ReportSquareHistory
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-exports.show = function(req, res) {
-  return ReportSquare
-    .findOne({
-      where: {
-        uniqueid: req.query.uniqueid
-      }
-    })
-    .then(function(report) {
-      if (report) {
-        return report;
-      }
-      return ReportSquareHistory
-        .findOne({
-          where: {
-            uniqueid: req.query.uniqueid
-          }
-        })
-    })
-    .then(function(report) {
-      if (!report) {
-        return res.sendStatus(404);
-      }
-      return res.status(200).send(report);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x1db7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x69\x6E\x64\x4F\x6E\x65"];_0x1db7[0];var _=require(_0x1db7[1]);var ReportSquare=require(_0x1db7[3])[_0x1db7[2]];var ReportSquareHistory=require(_0x1db7[3])[_0x1db7[5]][_0x1db7[4]];var Util=require(_0x1db7[6]);exports[_0x1db7[7]]= function(_0x1626x5,_0x1626x6,_0x1626x7){return generalIndex(_0x1626x5,_0x1626x6,_0x1626x7)};exports[_0x1db7[8]]= function(_0x1626x5,_0x1626x6,_0x1626x7){return generalIndex(_0x1626x5,_0x1626x6,_0x1626x7,{leaveAt:null})};function generalIndex(_0x1626x5,_0x1626x6,_0x1626x7,_0x1626x9){return ReportSquare[_0x1db7[15]](Util[_0x1db7[14]](_0x1626x5[_0x1db7[13]],_0x1626x9|| {}))[_0x1db7[12]](function(_0x1626xb){return _0x1626x6[_0x1db7[11]](200)[_0x1db7[10]](_0x1626xb)})[_0x1db7[9]](function(_0x1626xa){return handleError(_0x1626x6,_0x1626xa)})}exports[_0x1db7[16]]= function(_0x1626x5,_0x1626x6){return ReportSquareHistory[_0x1db7[16]]()[_0x1db7[12]](function(_0x1626xc){return _0x1626x6[_0x1db7[11]](200)[_0x1db7[10]](_0x1626xc)})[_0x1db7[9]](function(_0x1626xa){return handleError(_0x1626x6,_0x1626xa)})};exports[_0x1db7[17]]= function(_0x1626x5,_0x1626x6){return ReportSquare[_0x1db7[20]]({where:{uniqueid:_0x1626x5[_0x1db7[13]][_0x1db7[19]]}})[_0x1db7[12]](function(_0x1626xd){if(_0x1626xd){return _0x1626xd};return ReportSquareHistory[_0x1db7[20]]({where:{uniqueid:_0x1626x5[_0x1db7[13]][_0x1db7[19]]}})})[_0x1db7[12]](function(_0x1626xd){if(!_0x1626xd){return _0x1626x6[_0x1db7[18]](404)};return _0x1626x6[_0x1db7[11]](200)[_0x1db7[10]](_0x1626xd)})[_0x1db7[9]](function(_0x1626xa){return handleError(_0x1626x6,_0x1626xa)})};function handleError(_0x1626x6,_0x1626xa){return _0x1626x6[_0x1db7[11]](500)[_0x1db7[10]](_0x1626xa)}
\ No newline at end of file
diff --git a/server/api/report_square/report_square.events.js b/server/api/report_square/report_square.events.js
index 6dd24aa..98b6280 100644
--- a/server/api/report_square/report_square.events.js
+++ b/server/api/report_square/report_square.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportSquare = require('../../models').ReportSquare;
-
-var ReportSquareEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportSquareEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportSquare.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportSquareEvents.emit(event + ':' + doc._id, doc);
-    ReportSquareEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportSquareEvents;
+var _0x1a89=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x1a89[0];const EventEmitter=require(_0x1a89[1]);const ReportSquare=require(_0x1a89[3])[_0x1a89[2]];var ReportSquareEvents= new EventEmitter();ReportSquareEvents[_0x1a89[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x1a89[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x1a89[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x1a89[6]};for(var e in events){var event=events[e];ReportSquare[_0x1a89[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x251ex8,_0x251ex9,_0x251exa){ReportSquareEvents[_0x1a89[10]](event+ _0x1a89[8]+ _0x251ex8[_0x1a89[9]],_0x251ex8);ReportSquareEvents[_0x1a89[10]](event,_0x251ex8);_0x251exa(null)}}module[_0x1a89[11]]= ReportSquareEvents
\ No newline at end of file
diff --git a/server/api/report_square/report_square.socket.js b/server/api/report_square/report_square.socket.js
index c919775..f55a737 100644
--- a/server/api/report_square/report_square.socket.js
+++ b/server/api/report_square/report_square.socket.js
@@ -1,44 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const ReportSquareEvents = require('./report_square.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_square:' + event, socket);
-
-    ReportSquareEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'report_square:save':
-        if (socket.role !== 'agent') {
-          socket.emit(event, doc);
-        }
-        break;
-      case 'report_square:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportSquareEvents.removeListener(event, listener);
-  };
-}
+var _0x13a7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x3A\x73\x61\x76\x65","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x13a7[0];const ReportSquareEvents=require(_0x13a7[1]);var events=[_0x13a7[2],_0x13a7[3]];exports[_0x13a7[4]]= function(_0x5056x3){for(var _0x5056x4=0,_0x5056x5=events[_0x13a7[5]];_0x5056x4< _0x5056x5;_0x5056x4++){var _0x5056x6=events[_0x5056x4];var _0x5056x7=createListener(_0x13a7[6]+ _0x5056x6,_0x5056x3);ReportSquareEvents[_0x13a7[7]](_0x5056x6,_0x5056x7);_0x5056x3[_0x13a7[7]](_0x13a7[8],removeListener(_0x5056x6,_0x5056x7))}};function createListener(_0x5056x6,_0x5056x3){return function(_0x5056x9){switch(_0x5056x6){case _0x13a7[12]:if(_0x5056x3[_0x13a7[9]]!== _0x13a7[10]){_0x5056x3[_0x13a7[11]](_0x5056x6,_0x5056x9)};break;case _0x13a7[13]:_0x5056x3[_0x13a7[11]](_0x5056x6,_0x5056x9);break;default:}}}function removeListener(_0x5056x6,_0x5056x7){return function(){ReportSquareEvents[_0x13a7[14]](_0x5056x6,_0x5056x7)}}
\ No newline at end of file
diff --git a/server/api/report_square_detail/index.js b/server/api/report_square_detail/index.js
index 58f916c..6c24421 100644
--- a/server/api/report_square_detail/index.js
+++ b/server/api/report_square_detail/index.js
@@ -1,13 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./report_square_detail.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.index);
-router.get('/describe', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.describe);
-router.get('/realtime', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.realtime);
-
-module.exports = router;
+var _0x421e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x421e[0];var express=require(_0x421e[1]);var controller=require(_0x421e[2]);var auth=require(_0x421e[3]);var router=express.Router();router[_0x421e[9]](_0x421e[4],auth[_0x421e[5]](),auth[_0x421e[7]]([14],[_0x421e[6]]),controller[_0x421e[8]]);router[_0x421e[9]](_0x421e[10],auth[_0x421e[5]](),auth[_0x421e[7]]([14],[_0x421e[6]]),controller[_0x421e[11]]);router[_0x421e[9]](_0x421e[12],auth[_0x421e[5]](),auth[_0x421e[7]]([14],[_0x421e[6]]),controller[_0x421e[13]]);module[_0x421e[14]]= router
\ No newline at end of file
diff --git a/server/api/report_square_detail/report_square_detail.controller.js b/server/api/report_square_detail/report_square_detail.controller.js
index c903f0f..745f113 100644
--- a/server/api/report_square_detail/report_square_detail.controller.js
+++ b/server/api/report_square_detail/report_square_detail.controller.js
@@ -1,44 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var ReportSquareDetail = require('../../models').ReportSquareDetail;
-var ReportSquareDetailHistory = require('../../models').history.ReportSquareDetailHistory;
-var Util = require('../../config/util');
-
-// Get list of report_square
-exports.index = function(req, res, next) {
-  return generalIndex(req, res, next);
-};
-
-exports.realtime = function(req, res, next) {
-  return generalIndex(req, res, next, {
-    leaveAt: null
-  });
-};
-
-function generalIndex(req, res, next, extraWhere) {
-  return ReportSquareDetail
-    .findAndCountAll(Util.getQuery(req.query, extraWhere || {}))
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return ReportSquareDetailHistory
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xcc7a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xcc7a[0];var _=require(_0xcc7a[1]);var ReportSquareDetail=require(_0xcc7a[3])[_0xcc7a[2]];var ReportSquareDetailHistory=require(_0xcc7a[3])[_0xcc7a[5]][_0xcc7a[4]];var Util=require(_0xcc7a[6]);exports[_0xcc7a[7]]= function(_0xbd94x5,_0xbd94x6,_0xbd94x7){return generalIndex(_0xbd94x5,_0xbd94x6,_0xbd94x7)};exports[_0xcc7a[8]]= function(_0xbd94x5,_0xbd94x6,_0xbd94x7){return generalIndex(_0xbd94x5,_0xbd94x6,_0xbd94x7,{leaveAt:null})};function generalIndex(_0xbd94x5,_0xbd94x6,_0xbd94x7,_0xbd94x9){return ReportSquareDetail[_0xcc7a[15]](Util[_0xcc7a[14]](_0xbd94x5[_0xcc7a[13]],_0xbd94x9|| {}))[_0xcc7a[12]](function(_0xbd94xb){return _0xbd94x6[_0xcc7a[11]](200)[_0xcc7a[10]](_0xbd94xb)})[_0xcc7a[9]](function(_0xbd94xa){return handleError(_0xbd94x6,_0xbd94xa)})}exports[_0xcc7a[16]]= function(_0xbd94x5,_0xbd94x6){return ReportSquareDetailHistory[_0xcc7a[16]]()[_0xcc7a[12]](function(_0xbd94xc){return _0xbd94x6[_0xcc7a[11]](200)[_0xcc7a[10]](_0xbd94xc)})[_0xcc7a[9]](function(_0xbd94xa){return handleError(_0xbd94x6,_0xbd94xa)})};function handleError(_0xbd94x6,_0xbd94xa){return _0xbd94x6[_0xcc7a[11]](500)[_0xcc7a[10]](_0xbd94xa)}
\ No newline at end of file
diff --git a/server/api/report_square_detail/report_square_detail.events.js b/server/api/report_square_detail/report_square_detail.events.js
index f5cbed4..bd44047 100644
--- a/server/api/report_square_detail/report_square_detail.events.js
+++ b/server/api/report_square_detail/report_square_detail.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportSquareDetail = require('../../models').ReportSquareDetail;
-
-var ReportSquareDetailEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportSquareDetailEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportSquareDetail.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportSquareDetailEvents.emit(event + ':' + doc._id, doc);
-    ReportSquareDetailEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportSquareDetailEvents;
+var _0xbc61=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xbc61[0];const EventEmitter=require(_0xbc61[1]);const ReportSquareDetail=require(_0xbc61[3])[_0xbc61[2]];var ReportSquareDetailEvents= new EventEmitter();ReportSquareDetailEvents[_0xbc61[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xbc61[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xbc61[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xbc61[6]};for(var e in events){var event=events[e];ReportSquareDetail[_0xbc61[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x11e5x8,_0x11e5x9,_0x11e5xa){ReportSquareDetailEvents[_0xbc61[10]](event+ _0xbc61[8]+ _0x11e5x8[_0xbc61[9]],_0x11e5x8);ReportSquareDetailEvents[_0xbc61[10]](event,_0x11e5x8);_0x11e5xa(null)}}module[_0xbc61[11]]= ReportSquareDetailEvents
\ No newline at end of file
diff --git a/server/api/report_square_detail/report_square_detail.socket.js b/server/api/report_square_detail/report_square_detail.socket.js
index ba3a758..5029bde 100644
--- a/server/api/report_square_detail/report_square_detail.socket.js
+++ b/server/api/report_square_detail/report_square_detail.socket.js
@@ -1,45 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const ReportSquareDetailEvents = require('./report_square_detail.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_square_detail:' + event, socket);
-
-    ReportSquareDetailEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'report_square_detail:save':
-        if (socket.role !== 'agent') {
-          socket.emit(event, doc);
-        }
-        break;
-
-      case 'report_square_detail:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportSquareDetailEvents.removeListener(event, listener);
-  };
-}
+var _0xd862=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x3A\x73\x61\x76\x65","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xd862[0];const ReportSquareDetailEvents=require(_0xd862[1]);var events=[_0xd862[2],_0xd862[3]];exports[_0xd862[4]]= function(_0x3b80x3){for(var _0x3b80x4=0,_0x3b80x5=events[_0xd862[5]];_0x3b80x4< _0x3b80x5;_0x3b80x4++){var _0x3b80x6=events[_0x3b80x4];var _0x3b80x7=createListener(_0xd862[6]+ _0x3b80x6,_0x3b80x3);ReportSquareDetailEvents[_0xd862[7]](_0x3b80x6,_0x3b80x7);_0x3b80x3[_0xd862[7]](_0xd862[8],removeListener(_0x3b80x6,_0x3b80x7))}};function createListener(_0x3b80x6,_0x3b80x3){return function(_0x3b80x9){switch(_0x3b80x6){case _0xd862[12]:if(_0x3b80x3[_0xd862[9]]!== _0xd862[10]){_0x3b80x3[_0xd862[11]](_0x3b80x6,_0x3b80x9)};break;case _0xd862[13]:_0x3b80x3[_0xd862[11]](_0x3b80x6,_0x3b80x9);break;default:}}}function removeListener(_0x3b80x6,_0x3b80x7){return function(){ReportSquareDetailEvents[_0xd862[14]](_0x3b80x6,_0x3b80x7)}}
\ No newline at end of file
diff --git a/server/api/report_tiger_dial/index.js b/server/api/report_tiger_dial/index.js
index 23cc1b0..85fd6eb 100644
--- a/server/api/report_tiger_dial/index.js
+++ b/server/api/report_tiger_dial/index.js
@@ -1,12 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./report_tiger_dial.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([16], ['admin']), controller.index);
-router.get('/describe', auth.isAuthenticated(), auth.hasModule([16], ['admin']), controller.describe);
-
-module.exports = router;
+var _0xc285=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x69\x67\x65\x72\x5F\x64\x69\x61\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc285[0];var express=require(_0xc285[1]);var controller=require(_0xc285[2]);var auth=require(_0xc285[3]);var router=express.Router();router[_0xc285[9]](_0xc285[4],auth[_0xc285[5]](),auth[_0xc285[7]]([16],[_0xc285[6]]),controller[_0xc285[8]]);router[_0xc285[9]](_0xc285[10],auth[_0xc285[5]](),auth[_0xc285[7]]([16],[_0xc285[6]]),controller[_0xc285[11]]);module[_0xc285[12]]= router
\ No newline at end of file
diff --git a/server/api/report_tiger_dial/report_tiger_dial.controller.js b/server/api/report_tiger_dial/report_tiger_dial.controller.js
index 848ba0e..e3d72b9 100644
--- a/server/api/report_tiger_dial/report_tiger_dial.controller.js
+++ b/server/api/report_tiger_dial/report_tiger_dial.controller.js
@@ -1,39 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var ReportTigerDial = require('../../models').ReportTigerDial;
-// var ReportTigerDialHistory = require('../../models').history.ReportTigerDialHistory;
-var Util = require('../../config/util');
-
-// Get list of report_tiger_dial
-exports.index = function(req, res, next) {
-  return generalIndex(req, res, next);
-};
-
-
-function generalIndex(req, res, next, extraWhere) {
-  return ReportTigerDial
-    .findAndCountAll(Util.getQuery(req.query, extraWhere || {}))
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return ReportTigerDial
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xae4a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x54\x69\x67\x65\x72\x44\x69\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xae4a[0];var _=require(_0xae4a[1]);var ReportTigerDial=require(_0xae4a[3])[_0xae4a[2]];var Util=require(_0xae4a[4]);exports[_0xae4a[5]]= function(_0x9557x4,_0x9557x5,_0x9557x6){return generalIndex(_0x9557x4,_0x9557x5,_0x9557x6)};function generalIndex(_0x9557x4,_0x9557x5,_0x9557x6,_0x9557x8){return ReportTigerDial[_0xae4a[12]](Util[_0xae4a[11]](_0x9557x4[_0xae4a[10]],_0x9557x8|| {}))[_0xae4a[9]](function(_0x9557xa){return _0x9557x5[_0xae4a[8]](200)[_0xae4a[7]](_0x9557xa)})[_0xae4a[6]](function(_0x9557x9){return handleError(_0x9557x5,_0x9557x9)})}exports[_0xae4a[13]]= function(_0x9557x4,_0x9557x5){return ReportTigerDial[_0xae4a[13]]()[_0xae4a[9]](function(_0x9557xb){return _0x9557x5[_0xae4a[8]](200)[_0xae4a[7]](_0x9557xb)})[_0xae4a[6]](function(_0x9557x9){return handleError(_0x9557x5,_0x9557x9)})};function handleError(_0x9557x5,_0x9557x9){return _0x9557x5[_0xae4a[8]](500)[_0xae4a[7]](_0x9557x9)}
\ No newline at end of file
diff --git a/server/api/report_tiger_dial/report_tiger_dial.events.js b/server/api/report_tiger_dial/report_tiger_dial.events.js
index dac1842..25e5c13 100644
--- a/server/api/report_tiger_dial/report_tiger_dial.events.js
+++ b/server/api/report_tiger_dial/report_tiger_dial.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportTigerDial = require('../../models').ReportTigerDial;
-
-var ReportTigerDialEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportTigerDialEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportTigerDial.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportTigerDialEvents.emit(event + ':' + doc._id, doc);
-    ReportTigerDialEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportTigerDialEvents;
+var _0xb36a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x54\x69\x67\x65\x72\x44\x69\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xb36a[0];const EventEmitter=require(_0xb36a[1]);const ReportTigerDial=require(_0xb36a[3])[_0xb36a[2]];var ReportTigerDialEvents= new EventEmitter();ReportTigerDialEvents[_0xb36a[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb36a[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb36a[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb36a[6]};for(var e in events){var event=events[e];ReportTigerDial[_0xb36a[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x5f98x8,_0x5f98x9,_0x5f98xa){ReportTigerDialEvents[_0xb36a[10]](event+ _0xb36a[8]+ _0x5f98x8[_0xb36a[9]],_0x5f98x8);ReportTigerDialEvents[_0xb36a[10]](event,_0x5f98x8);_0x5f98xa(null)}}module[_0xb36a[11]]= ReportTigerDialEvents
\ No newline at end of file
diff --git a/server/api/report_tiger_dial/report_tiger_dial.socket.js b/server/api/report_tiger_dial/report_tiger_dial.socket.js
index 24b7f2f..ee604f1 100644
--- a/server/api/report_tiger_dial/report_tiger_dial.socket.js
+++ b/server/api/report_tiger_dial/report_tiger_dial.socket.js
@@ -1,45 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const ReportTigerDialEvents = require('./report_tiger_dial.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_tiger_dial:' + event, socket);
-
-    ReportTigerDialEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'report_tiger_dial:save':
-        if (socket.role !== 'agent') {
-          socket.emit(event, doc);
-        }
-        break;
-
-      case 'report_tiger_dial:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportTigerDialEvents.removeListener(event, listener);
-  };
-}
+var _0xb271=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x69\x67\x65\x72\x5F\x64\x69\x61\x6C\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x74\x69\x67\x65\x72\x5F\x64\x69\x61\x6C\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x74\x69\x67\x65\x72\x5F\x64\x69\x61\x6C\x3A\x73\x61\x76\x65","\x72\x65\x70\x6F\x72\x74\x5F\x74\x69\x67\x65\x72\x5F\x64\x69\x61\x6C\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xb271[0];const ReportTigerDialEvents=require(_0xb271[1]);var events=[_0xb271[2],_0xb271[3]];exports[_0xb271[4]]= function(_0x8a55x3){for(var _0x8a55x4=0,_0x8a55x5=events[_0xb271[5]];_0x8a55x4< _0x8a55x5;_0x8a55x4++){var _0x8a55x6=events[_0x8a55x4];var _0x8a55x7=createListener(_0xb271[6]+ _0x8a55x6,_0x8a55x3);ReportTigerDialEvents[_0xb271[7]](_0x8a55x6,_0x8a55x7);_0x8a55x3[_0xb271[7]](_0xb271[8],removeListener(_0x8a55x6,_0x8a55x7))}};function createListener(_0x8a55x6,_0x8a55x3){return function(_0x8a55x9){switch(_0x8a55x6){case _0xb271[12]:if(_0x8a55x3[_0xb271[9]]!== _0xb271[10]){_0x8a55x3[_0xb271[11]](_0x8a55x6,_0x8a55x9)};break;case _0xb271[13]:_0x8a55x3[_0xb271[11]](_0x8a55x6,_0x8a55x9);break;default:}}}function removeListener(_0x8a55x6,_0x8a55x7){return function(){ReportTigerDialEvents[_0xb271[14]](_0x8a55x6,_0x8a55x7)}}
\ No newline at end of file
diff --git a/server/api/report_tree/index.js b/server/api/report_tree/index.js
index 419796c..9b6eca0 100644
--- a/server/api/report_tree/index.js
+++ b/server/api/report_tree/index.js
@@ -1,12 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./report_tree.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.update);
-
-module.exports = router;
+var _0xd4f5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd4f5[0];var express=require(_0xd4f5[1]);var controller=require(_0xd4f5[2]);var auth=require(_0xd4f5[3]);var router=express.Router();router[_0xd4f5[9]](_0xd4f5[4],auth[_0xd4f5[5]](),auth[_0xd4f5[7]]([17],[_0xd4f5[6]]),controller[_0xd4f5[8]]);router[_0xd4f5[12]](_0xd4f5[10],auth[_0xd4f5[5]](),auth[_0xd4f5[7]]([17],[_0xd4f5[6]]),controller[_0xd4f5[11]]);module[_0xd4f5[13]]= router
\ No newline at end of file
diff --git a/server/api/report_tree/report_tree.controller.js b/server/api/report_tree/report_tree.controller.js
index e1f947e..ab1fcde 100644
--- a/server/api/report_tree/report_tree.controller.js
+++ b/server/api/report_tree/report_tree.controller.js
@@ -1,43 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var ReportTree = require('../../models').ReportTree;
-
-// Get the reports trees
-exports.index = function(req, res) {
-  return ReportTree
-    .findAll()
-    .then(function(trees) {
-      if (!trees) {
-        return res.sendStatus(404);
-      }
-      return res.status(200).send(trees);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing report in the DB.
-exports.update = function(req, res) {
-  return ReportTree
-    .findById(req.params.id)
-    .then(function(tree) {
-      if (!tree) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(tree, req.body);
-      return updated.save();
-    })
-    .then(function(tree) {
-      return res.status(200).send(tree);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xf9ee=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64"];_0xf9ee[0];var _=require(_0xf9ee[1]);var util=require(_0xf9ee[2]);var ReportTree=require(_0xf9ee[4])[_0xf9ee[3]];exports[_0xf9ee[5]]= function(_0xfd7dx4,_0xfd7dx5){return ReportTree[_0xf9ee[11]]()[_0xf9ee[10]](function(_0xfd7dx7){if(!_0xfd7dx7){return _0xfd7dx5[_0xf9ee[7]](404)};return _0xfd7dx5[_0xf9ee[9]](200)[_0xf9ee[8]](_0xfd7dx7)})[_0xf9ee[6]](function(_0xfd7dx6){return handleError(_0xfd7dx5,_0xfd7dx6)})};exports[_0xf9ee[12]]= function(_0xfd7dx4,_0xfd7dx5){return ReportTree[_0xf9ee[18]](_0xfd7dx4[_0xf9ee[17]][_0xf9ee[16]])[_0xf9ee[10]](function(_0xfd7dx8){if(!_0xfd7dx8){return _0xfd7dx5[_0xf9ee[7]](404)};var _0xfd7dx9=_[_0xf9ee[14]](_0xfd7dx8,_0xfd7dx4[_0xf9ee[13]]);return _0xfd7dx9[_0xf9ee[15]]()})[_0xf9ee[10]](function(_0xfd7dx8){return _0xfd7dx5[_0xf9ee[9]](200)[_0xf9ee[8]](_0xfd7dx8)})[_0xf9ee[6]](function(_0xfd7dx6){return handleError(_0xfd7dx5,_0xfd7dx6)})};function handleError(_0xfd7dx5,_0xfd7dx6){return _0xfd7dx5[_0xf9ee[9]](500)[_0xf9ee[8]](_0xfd7dx6)}
\ No newline at end of file
diff --git a/server/api/report_tree/report_tree.events.js b/server/api/report_tree/report_tree.events.js
index 650282c..bbf0239 100644
--- a/server/api/report_tree/report_tree.events.js
+++ b/server/api/report_tree/report_tree.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ReportTree = require('../../models').ReportTree;
-
-var ReportTreeEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ReportTreeEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ReportTree.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ReportTreeEvents.emit(event + ':' + doc._id, doc);
-    ReportTreeEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ReportTreeEvents;
+var _0x9585=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9585[0];const EventEmitter=require(_0x9585[1]);const ReportTree=require(_0x9585[3])[_0x9585[2]];var ReportTreeEvents= new EventEmitter();ReportTreeEvents[_0x9585[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x9585[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x9585[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x9585[6]};for(var e in events){var event=events[e];ReportTree[_0x9585[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xd88bx8,_0xd88bx9,_0xd88bxa){ReportTreeEvents[_0x9585[10]](event+ _0x9585[8]+ _0xd88bx8[_0x9585[9]],_0xd88bx8);ReportTreeEvents[_0x9585[10]](event,_0xd88bx8);_0xd88bxa(null)}}module[_0x9585[11]]= ReportTreeEvents
\ No newline at end of file
diff --git a/server/api/report_tree/report_tree.socket.js b/server/api/report_tree/report_tree.socket.js
index 0209c1a..0dda11e 100644
--- a/server/api/report_tree/report_tree.socket.js
+++ b/server/api/report_tree/report_tree.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const ReportTreeEvents = require('./report_tree.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('report_tree:' + event, socket);
-
-    ReportTreeEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ReportTreeEvents.removeListener(event, listener);
-  };
-}
+var _0x7e8a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x7e8a[0];const ReportTreeEvents=require(_0x7e8a[1]);var events=[_0x7e8a[2],_0x7e8a[3]];exports[_0x7e8a[4]]= function(_0x6915x3){for(var _0x6915x4=0,_0x6915x5=events[_0x7e8a[5]];_0x6915x4< _0x6915x5;_0x6915x4++){var _0x6915x6=events[_0x6915x4];var _0x6915x7=createListener(_0x7e8a[6]+ _0x6915x6,_0x6915x3);ReportTreeEvents[_0x7e8a[7]](_0x6915x6,_0x6915x7);_0x6915x3[_0x7e8a[7]](_0x7e8a[8],removeListener(_0x6915x6,_0x6915x7))}};function createListener(_0x6915x6,_0x6915x3){return function(_0x6915x9){_0x6915x3[_0x7e8a[9]](_0x6915x6,_0x6915x9)}}function removeListener(_0x6915x6,_0x6915x7){return function(){ReportTreeEvents[_0x7e8a[10]](_0x6915x6,_0x6915x7)}}
\ No newline at end of file
diff --git a/server/api/salesforce_account/index.js b/server/api/salesforce_account/index.js
index ec28594..5331f84 100644
--- a/server/api/salesforce_account/index.js
+++ b/server/api/salesforce_account/index.js
@@ -1,28 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./salesforce_account.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([19, 13], ['admin']), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show);
-router.get('/:id/check', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.checkAccount);
-router.get('/:id/fields', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.getFields);
-router.get('/:id/configurations', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.getAccountConfigurations);
-router.get('/:id/configurations/:cid', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.getConfiguration);
-router.post('/validate/:field', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.accountValidation);
-router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create);
-router.post('/:id/configurations', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.createConfiguration);
-router.post('/:id/configurations/:cid/:type', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.createField);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update);
-router.put('/:id/configurations/:cid/fields/:fid', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.updateField);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy);
-router.delete('/:id/configurations', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.bulkDestroyConfigurations);
-router.delete('/:id/configurations/:cid', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroyConfiguration);
-router.delete('/:id/configurations/:cid/fields/:fid', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroyField);
-
-
-module.exports = router;
+var _0x6b4d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x63\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x63\x69\x64","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65\x2F\x3A\x66\x69\x65\x6C\x64","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x63\x69\x64\x2F\x3A\x74\x79\x70\x65","\x63\x72\x65\x61\x74\x65\x46\x69\x65\x6C\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x63\x69\x64\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x66\x69\x64","\x75\x70\x64\x61\x74\x65\x46\x69\x65\x6C\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x46\x69\x65\x6C\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x6b4d[0];var express=require(_0x6b4d[1]);var auth=require(_0x6b4d[2]);var controller=require(_0x6b4d[3]);var router=express.Router();router[_0x6b4d[9]](_0x6b4d[4],auth[_0x6b4d[5]](),auth[_0x6b4d[7]]([19,13],[_0x6b4d[6]]),controller[_0x6b4d[8]]);router[_0x6b4d[9]](_0x6b4d[10],auth[_0x6b4d[5]](),auth[_0x6b4d[7]]([19],[_0x6b4d[6]]),controller[_0x6b4d[11]]);router[_0x6b4d[9]](_0x6b4d[12],auth[_0x6b4d[5]](),auth[_0x6b4d[7]]([19],[_0x6b4d[6]]),controller[_0x6b4d[13]]);router[_0x6b4d[9]](_0x6b4d[14],auth[_0x6b4d[5]](),auth[_0x6b4d[7]]([19],[_0x6b4d[6]]),controller[_0x6b4d[15]]);router[_0x6b4d[9]](_0x6b4d[16],auth[_0x6b4d[5]](),auth[_0x6b4d[7]]([19],[_0x6b4d[6]]),controller[_0x6b4d[17]]);router[_0x6b4d[9]](_0x6b4d[18],auth[_0x6b4d[5]](),auth[_0x6b4d[7]]([19],[_0x6b4d[6]]),controller[_0x6b4d[19]]);router[_0x6b4d[22]](_0x6b4d[20],auth[_0x6b4d[5]](),auth[_0x6b4d[7]]([19],[_0x6b4d[6]]),controller[_0x6b4d[21]]);router[_0x6b4d[22]](_0x6b4d[4],auth[_0x6b4d[5]](),auth[_0x6b4d[7]]([19],[_0x6b4d[6]]),controller[_0x6b4d[23]]);router[_0x6b4d[22]](_0x6b4d[16],auth[_0x6b4d[5]](),auth[_0x6b4d[7]]([19],[_0x6b4d[6]]),controller[_0x6b4d[24]]);router[_0x6b4d[22]](_0x6b4d[25],auth[_0x6b4d[5]](),auth[_0x6b4d[7]]([19],[_0x6b4d[6]]),controller[_0x6b4d[26]]);router[_0x6b4d[28]](_0x6b4d[10],auth[_0x6b4d[5]](),auth[_0x6b4d[7]]([19],[_0x6b4d[6]]),controller[_0x6b4d[27]]);router[_0x6b4d[28]](_0x6b4d[29],auth[_0x6b4d[5]](),auth[_0x6b4d[7]]([19],[_0x6b4d[6]]),controller[_0x6b4d[30]]);router[_0x6b4d[32]](_0x6b4d[4],auth[_0x6b4d[5]](),auth[_0x6b4d[7]]([19],[_0x6b4d[6]]),controller[_0x6b4d[31]]);router[_0x6b4d[32]](_0x6b4d[10],auth[_0x6b4d[5]](),auth[_0x6b4d[7]]([19],[_0x6b4d[6]]),controller[_0x6b4d[33]]);router[_0x6b4d[32]](_0x6b4d[16],auth[_0x6b4d[5]](),auth[_0x6b4d[7]]([19],[_0x6b4d[6]]),controller[_0x6b4d[34]]);router[_0x6b4d[32]](_0x6b4d[18],auth[_0x6b4d[5]](),auth[_0x6b4d[7]]([19],[_0x6b4d[6]]),controller[_0x6b4d[35]]);router[_0x6b4d[32]](_0x6b4d[29],auth[_0x6b4d[5]](),auth[_0x6b4d[7]]([19],[_0x6b4d[6]]),controller[_0x6b4d[36]]);module[_0x6b4d[37]]= router
\ No newline at end of file
diff --git a/server/api/salesforce_account/salesforce_account.controller.js b/server/api/salesforce_account/salesforce_account.controller.js
index 008c8f1..e357b72 100644
--- a/server/api/salesforce_account/salesforce_account.controller.js
+++ b/server/api/salesforce_account/salesforce_account.controller.js
@@ -1,519 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/salesforce/accounts              ->  index
- * POST    /api/salesforce/accounts              ->  create
- * GET     /api/salesforce/accounts/:id          ->  show
- * PUT     /api/salesforce/accounts/:id          ->  update
- * DELETE  /api/salesforce/accounts/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var util = require('util');
-var jsforce = require('jsforce');
-var Util = require('../../config/util');
-
-var SalesforceAccount = require('../../models').SalesforceAccount;
-var SalesforceConfiguration = require('../../models').SalesforceConfiguration;
-var SalesforceField = require('../../models').SalesforceField;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function responseWithoutResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function() {
-    res.sendStatus(statusCode);
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of SalesforceAccounts
-exports.index = function(req, res, next) {
-  return SalesforceAccount
-    .scope('configurations')
-    .findAndCountAll(_.merge(Util.getQuery(req.query), {
-      distinct: true
-    }))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-};
-
-// Gets a single SalesforceAccount from the DB
-exports.show = function(req, res) {
-  return SalesforceAccount
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new SalesforceAccount in the DB
-exports.create = function(req, res) {
-  return SalesforceAccount
-    .create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing SalesforceAccount in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return SalesforceAccount
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a SalesforceAccount from the DB
-exports.destroy = function(req, res) {
-  return SalesforceAccount
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
-
-exports.bulkDestroy = function(req, res) {
-  return SalesforceAccount
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(responseWithResult(res, 204))
-    .catch(handleError(res));
-};
-
-exports.checkAccount = function(req, res) {
-  return SalesforceAccount.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(function(account) {
-      var conn = new jsforce.Connection({
-        oauth2: {
-          loginUrl: account.remoteUri,
-          clientId: account.clientId,
-          clientSecret: account.clientSecret,
-        }
-      });
-      var pwd = account.password.concat(account.securityToken);
-      conn.login(account.username, pwd, function(err, userInfo) {
-        if (err) {
-          return res.status(400).send(err);
-        }
-        return res.sendStatus(200);
-      });
-    })
-    .catch(handleError(res));
-}
-
-exports.accountValidation = function(req, res) {
-  var where = {};
-  where[req.params.field] = req.body.value;
-  return SalesforceAccount
-    .findAndCountAll({
-      where: where
-    })
-    .then(function(result) {
-      if (result.count) {
-        return res.status(200).send({
-          isValid: false,
-          value: req.body.value
-        });
-      }
-      return res.status(200).send({
-        isValid: true,
-        value: req.body.value
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getFields = function(req, res) {
-  return SalesforceAccount.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(function(account) {
-      var conn = new jsforce.Connection({
-        oauth2: {
-          loginUrl: account.remoteUri,
-          clientId: account.clientId,
-          clientSecret: account.clientSecret,
-        }
-      });
-      var pwd = account.password.concat(account.securityToken);
-      conn.login(account.username, pwd, function(err, userInfo) {
-        if (err) {
-          return res.status(400).send(err);
-        }
-        conn.sobject("Task").describe(function(err, meta) {
-          if (err) {
-            return res.status(400).send(err);
-          }
-          return res.status(200).send(meta.fields);
-        });
-      });
-    })
-    .catch(handleError(res));
-};
-
-exports.getAccountConfigurations = function(req, res) {
-  return SalesforceConfiguration
-    .scope({
-      method: ['account', req.params.id]
-    })
-    .findAndCountAll(_.merge(Util.getQuery(req.query), {
-      distinct: true
-    }))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-exports.getConfiguration = function(req, res) {
-
-  return SalesforceConfiguration
-    .scope({
-      method: ['account', req.params.id]
-    })
-    .findById(req.params.cid)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-exports.destroyConfiguration = function(req, res) {
-  return SalesforceConfiguration
-    .scope({
-      method: ['account', req.params.id]
-    })
-    .findById(req.params.cid)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-};
-
-exports.bulkDestroyConfigurations = function(req, res) {
-  return SalesforceConfiguration
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(responseWithResult(res, 204))
-    .catch(handleError(res));
-};
-
-exports.createConfiguration = function(req, res) {
-  req.body['AccountId'] = req.params.id;
-
-  switch (req.body.channel) {
-    case 'voice':
-
-      if (req.body.type === 'Queue') {
-        req.body.Subject = [{
-          "type": "string",
-          "content": "[xCALLY Ticket]",
-          "variableName": null
-        }, {
-          "type": "variable",
-          "content": "",
-          "variableName": "queue"
-        }, {
-          "type": "variable",
-          "content": "",
-          "variableName": "calleridnum"
-        }];
-        req.body.Description = [{
-          "type": "string",
-          "content": "*** Call Info ***",
-          "key": null,
-          "keyType": null,
-          "variableName": null
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Caller Number",
-          "keyType": "variable",
-          "variableName": "calleridnum"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Caller Name",
-          "keyType": "variable",
-          "variableName": "calleridname"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Call To",
-          "keyType": "variable",
-          "variableName": "destexten"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Queue",
-          "keyType": "variable",
-          "variableName": "queue"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "UniqueId",
-          "keyType": "variable",
-          "variableName": "uniqueid"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Date",
-          "keyType": "variable",
-          "variableName": "agentcalledAt"
-        }, {
-          "type": "string",
-          "content": "*** Agent Info ***",
-          "key": null,
-          "keyType": null,
-          "variableName": null
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Agent Name",
-          "keyType": "variable",
-          "variableName": "destcalleridname"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Agent Number",
-          "keyType": "variable",
-          "variableName": "destcalleridnum"
-        }, {
-          "type": "string",
-          "content": "*** Time Info ***",
-          "key": null,
-          "keyType": null,
-          "variableName": null
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Agent Ring",
-          "keyType": "variable",
-          "variableName": "agentcalledAt"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Agent Connect",
-          "keyType": "variable",
-          "variableName": "agentconnectAt"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Agent Complete",
-          "keyType": "variable",
-          "variableName": "agentcompleteAt"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Hold Time",
-          "keyType": "variable",
-          "variableName": "holdtime"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Talk Time",
-          "keyType": "variable",
-          "variableName": "talktime"
-        }];
-      } else if (req.body.type === 'Outbound') {
-        req.body.Subject = [{
-          "type": "string",
-          "content": "[xCALLY Ticket]",
-          "variableName": null
-        }, {
-          "type": "string",
-          "content": "Outbound Call",
-          "variableName": null
-        }, {
-          "type": "variable",
-          "content": "",
-          "variableName": "destcalleridnum"
-        }];
-        req.body.Description = [{
-          "type": "string",
-          "content": "*** Call Info ***",
-          "variableName": null
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Called Number",
-          "keyType": "variable",
-          "keyContent": "",
-          "variableName": "destcalleridnum"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Member Name",
-          "keyType": "variable",
-          "keyContent": "",
-          "variableName": "membername"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "UniqueId",
-          "keyType": "variable",
-          "keyContent": "",
-          "variableName": "uniqueid"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Date",
-          "keyType": "variable",
-          "keyContent": "",
-          "variableName": "starttime"
-        }, {
-          "type": "string",
-          "content": "*** Time Info ***",
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Answer Time",
-          "keyType": "variable",
-          "keyContent": "",
-          "variableName": "answertime"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Complete Time",
-          "keyType": "variable",
-          "keyContent": "",
-          "variableName": "endtime"
-        }];
-      }
-      break;
-    default:
-      console.log('Channel not available:', req.body.channel);
-  }
-
-  delete req.body.channel;
-  delete req.body.type;
-
-  return SalesforceConfiguration
-    .create(req.body, {
-      include: [{
-        model: SalesforceField,
-        as: 'Subject'
-      }, {
-        model: SalesforceField,
-        as: 'Description'
-      }]
-    })
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-};
-
-exports.createField = function(req, res) {
-  return SalesforceConfiguration
-    .scope({
-      method: ['account', req.params.id]
-    })
-    .findById(req.params.cid)
-    .then(handleEntityNotFound(res))
-    .then(function(configuration) {
-      switch (req.params.type) {
-        case 'subject':
-          req.body['SubjectId'] = req.params.cid;
-          break;
-        case 'description':
-          req.body['DescriptionId'] = req.params.cid;
-          break;
-        case 'field':
-          req.body['FieldId'] = req.params.cid;
-          break;
-      }
-      return SalesforceField.create(req.body);
-    })
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-};
-
-exports.updateField = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return SalesforceField
-    .findById(req.params.fid)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-};
-
-exports.destroyField = function(req, res) {
-  return SalesforceField
-    .findById(req.params.fid)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-};
-
-exports.addConfigurationTags = function(req, res, next) {
-  return SalesforceConfiguration
-    .findById(req.params.cid)
-    .then(handleEntityNotFound(res))
-    .then(function(configuration) {
-      return configuration.setTags(req.body);
-    })
-    .then(responseWithoutResult(res, 200))
-    .catch(function(err) {
-      console.error(err);
-      return handleError(res, err);
-    });
-};
+var _0x31e3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6A\x73\x66\x6F\x72\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x63\x6F\x6E\x63\x61\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x6C\x6F\x67\x69\x6E","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x63\x6F\x75\x6E\x74","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x66\x69\x65\x6C\x64\x73","\x64\x65\x73\x63\x72\x69\x62\x65","\x54\x61\x73\x6B","\x73\x6F\x62\x6A\x65\x63\x74","\x67\x65\x74\x41\x63\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x61\x63\x63\x6F\x75\x6E\x74","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x63\x69\x64","\x64\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x74\x79\x70\x65","\x51\x75\x65\x75\x65","\x53\x75\x62\x6A\x65\x63\x74","\x73\x74\x72\x69\x6E\x67","\x5B\x78\x43\x41\x4C\x4C\x59\x20\x54\x69\x63\x6B\x65\x74\x5D","\x76\x61\x72\x69\x61\x62\x6C\x65","","\x71\x75\x65\x75\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x2A\x2A\x2A\x20\x43\x61\x6C\x6C\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x43\x61\x6C\x6C\x65\x72\x20\x4E\x75\x6D\x62\x65\x72","\x43\x61\x6C\x6C\x65\x72\x20\x4E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x43\x61\x6C\x6C\x20\x54\x6F","\x64\x65\x73\x74\x65\x78\x74\x65\x6E","\x55\x6E\x69\x71\x75\x65\x49\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x44\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64\x41\x74","\x2A\x2A\x2A\x20\x41\x67\x65\x6E\x74\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x41\x67\x65\x6E\x74\x20\x4E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x41\x67\x65\x6E\x74\x20\x4E\x75\x6D\x62\x65\x72","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x2A\x2A\x2A\x20\x54\x69\x6D\x65\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x41\x67\x65\x6E\x74\x20\x52\x69\x6E\x67","\x41\x67\x65\x6E\x74\x20\x43\x6F\x6E\x6E\x65\x63\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x41\x67\x65\x6E\x74\x20\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x48\x6F\x6C\x64\x20\x54\x69\x6D\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x54\x61\x6C\x6B\x20\x54\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C","\x43\x61\x6C\x6C\x65\x64\x20\x4E\x75\x6D\x62\x65\x72","\x4D\x65\x6D\x62\x65\x72\x20\x4E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x41\x6E\x73\x77\x65\x72\x20\x54\x69\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x20\x54\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x76\x6F\x69\x63\x65","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3A","\x63\x68\x61\x6E\x6E\x65\x6C","\x6C\x6F\x67","\x63\x72\x65\x61\x74\x65\x46\x69\x65\x6C\x64","\x53\x75\x62\x6A\x65\x63\x74\x49\x64","\x73\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x49\x64","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64\x49\x64","\x75\x70\x64\x61\x74\x65\x46\x69\x65\x6C\x64","\x66\x69\x64","\x64\x65\x73\x74\x72\x6F\x79\x46\x69\x65\x6C\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x54\x61\x67\x73","\x65\x72\x72\x6F\x72","\x73\x65\x74\x54\x61\x67\x73"];_0x31e3[0];var _=require(_0x31e3[1]);var util=require(_0x31e3[2]);var jsforce=require(_0x31e3[3]);var Util=require(_0x31e3[4]);var SalesforceAccount=require(_0x31e3[6])[_0x31e3[5]];var SalesforceConfiguration=require(_0x31e3[6])[_0x31e3[7]];var SalesforceField=require(_0x31e3[6])[_0x31e3[8]];function handleError(_0x39c5x9,_0x39c5xa){_0x39c5xa= _0x39c5xa|| 500;return function(_0x39c5xb){_0x39c5x9[_0x31e3[10]](_0x39c5xa)[_0x31e3[9]](_0x39c5xb)}}function responseWithResult(_0x39c5x9,_0x39c5xa){_0x39c5xa= _0x39c5xa|| 200;return function(_0x39c5xd){if(_0x39c5xd){_0x39c5x9[_0x31e3[10]](_0x39c5xa)[_0x31e3[11]](_0x39c5xd)}}}function responseWithoutResult(_0x39c5x9,_0x39c5xa){_0x39c5xa= _0x39c5xa|| 200;return function(){_0x39c5x9[_0x31e3[12]](_0x39c5xa)}}function handleEntityNotFound(_0x39c5x9){return function(_0x39c5xd){if(!_0x39c5xd){_0x39c5x9[_0x31e3[10]](404)[_0x31e3[13]]();return null};return _0x39c5xd}}function saveUpdates(_0x39c5x11){return function(_0x39c5xd){return _0x39c5xd[_0x31e3[15]](_0x39c5x11)[_0x31e3[14]](function(_0x39c5x12){return _0x39c5x12})}}function removeEntity(_0x39c5x9){return function(_0x39c5xd){if(_0x39c5xd){return _0x39c5xd[_0x31e3[16]]()[_0x31e3[14]](function(){_0x39c5x9[_0x31e3[10]](204)[_0x31e3[13]]()})}}}exports[_0x31e3[17]]= function(_0x39c5x14,_0x39c5x9,_0x39c5x15){return SalesforceAccount[_0x31e3[24]](_0x31e3[23])[_0x31e3[22]](_[_0x31e3[21]](Util[_0x31e3[20]](_0x39c5x14[_0x31e3[19]]),{distinct:true}))[_0x31e3[14]](responseWithResult(_0x39c5x9))[_0x31e3[18]](handleError(_0x39c5x9))};exports[_0x31e3[25]]= function(_0x39c5x14,_0x39c5x9){return SalesforceAccount[_0x31e3[28]](_0x39c5x14[_0x31e3[27]][_0x31e3[26]])[_0x31e3[14]](handleEntityNotFound(_0x39c5x9))[_0x31e3[14]](responseWithResult(_0x39c5x9))[_0x31e3[18]](handleError(_0x39c5x9))};exports[_0x31e3[29]]= function(_0x39c5x14,_0x39c5x9){return SalesforceAccount[_0x31e3[29]](_0x39c5x14[_0x31e3[30]])[_0x31e3[14]](responseWithResult(_0x39c5x9,201))[_0x31e3[18]](handleError(_0x39c5x9))};exports[_0x31e3[31]]= function(_0x39c5x14,_0x39c5x9){if(_0x39c5x14[_0x31e3[30]][_0x31e3[26]]){delete _0x39c5x14[_0x31e3[30]][_0x31e3[26]]};return SalesforceAccount[_0x31e3[28]](_0x39c5x14[_0x31e3[27]][_0x31e3[26]])[_0x31e3[14]](handleEntityNotFound(_0x39c5x9))[_0x31e3[14]](saveUpdates(_0x39c5x14[_0x31e3[30]]))[_0x31e3[14]](responseWithResult(_0x39c5x9))[_0x31e3[18]](handleError(_0x39c5x9))};exports[_0x31e3[16]]= function(_0x39c5x14,_0x39c5x9){return SalesforceAccount[_0x31e3[28]](_0x39c5x14[_0x31e3[27]][_0x31e3[26]])[_0x31e3[14]](handleEntityNotFound(_0x39c5x9))[_0x31e3[14]](removeEntity(_0x39c5x9))[_0x31e3[18]](handleError(_0x39c5x9))};exports[_0x31e3[32]]= function(_0x39c5x14,_0x39c5x9){return SalesforceAccount[_0x31e3[16]]({where:{id:_0x39c5x14[_0x31e3[19]][_0x31e3[33]]},individualHooks:true})[_0x31e3[14]](responseWithResult(_0x39c5x9,204))[_0x31e3[18]](handleError(_0x39c5x9))};exports[_0x31e3[34]]= function(_0x39c5x14,_0x39c5x9){return SalesforceAccount[_0x31e3[28]](_0x39c5x14[_0x31e3[27]][_0x31e3[26]])[_0x31e3[14]](handleEntityNotFound(_0x39c5x9))[_0x31e3[14]](function(_0x39c5x16){var _0x39c5x17= new jsforce.Connection({oauth2:{loginUrl:_0x39c5x16[_0x31e3[35]],clientId:_0x39c5x16[_0x31e3[36]],clientSecret:_0x39c5x16[_0x31e3[37]]}});var _0x39c5x18=_0x39c5x16[_0x31e3[40]][_0x31e3[39]](_0x39c5x16[_0x31e3[38]]);_0x39c5x17[_0x31e3[42]](_0x39c5x16[_0x31e3[41]],_0x39c5x18,function(_0x39c5xb,_0x39c5x19){if(_0x39c5xb){return _0x39c5x9[_0x31e3[10]](400)[_0x31e3[9]](_0x39c5xb)};return _0x39c5x9[_0x31e3[12]](200)})})[_0x31e3[18]](handleError(_0x39c5x9))};exports[_0x31e3[43]]= function(_0x39c5x14,_0x39c5x9){var _0x39c5x1a={};_0x39c5x1a[_0x39c5x14[_0x31e3[27]][_0x31e3[44]]]= _0x39c5x14[_0x31e3[30]][_0x31e3[45]];return SalesforceAccount[_0x31e3[22]]({where:_0x39c5x1a})[_0x31e3[14]](function(_0x39c5x1b){if(_0x39c5x1b[_0x31e3[46]]){return _0x39c5x9[_0x31e3[10]](200)[_0x31e3[9]]({isValid:false,value:_0x39c5x14[_0x31e3[30]][_0x31e3[45]]})};return _0x39c5x9[_0x31e3[10]](200)[_0x31e3[9]]({isValid:true,value:_0x39c5x14[_0x31e3[30]][_0x31e3[45]]})})[_0x31e3[18]](function(_0x39c5xb){return handleError(_0x39c5x9,_0x39c5xb)})};exports[_0x31e3[47]]= function(_0x39c5x14,_0x39c5x9){return SalesforceAccount[_0x31e3[28]](_0x39c5x14[_0x31e3[27]][_0x31e3[26]])[_0x31e3[14]](handleEntityNotFound(_0x39c5x9))[_0x31e3[14]](function(_0x39c5x16){var _0x39c5x17= new jsforce.Connection({oauth2:{loginUrl:_0x39c5x16[_0x31e3[35]],clientId:_0x39c5x16[_0x31e3[36]],clientSecret:_0x39c5x16[_0x31e3[37]]}});var _0x39c5x18=_0x39c5x16[_0x31e3[40]][_0x31e3[39]](_0x39c5x16[_0x31e3[38]]);_0x39c5x17[_0x31e3[42]](_0x39c5x16[_0x31e3[41]],_0x39c5x18,function(_0x39c5xb,_0x39c5x19){if(_0x39c5xb){return _0x39c5x9[_0x31e3[10]](400)[_0x31e3[9]](_0x39c5xb)};_0x39c5x17[_0x31e3[51]](_0x31e3[50])[_0x31e3[49]](function(_0x39c5xb,_0x39c5x1c){if(_0x39c5xb){return _0x39c5x9[_0x31e3[10]](400)[_0x31e3[9]](_0x39c5xb)};return _0x39c5x9[_0x31e3[10]](200)[_0x31e3[9]](_0x39c5x1c[_0x31e3[48]])})})})[_0x31e3[18]](handleError(_0x39c5x9))};exports[_0x31e3[52]]= function(_0x39c5x14,_0x39c5x9){return SalesforceConfiguration[_0x31e3[24]]({method:[_0x31e3[53],_0x39c5x14[_0x31e3[27]][_0x31e3[26]]]})[_0x31e3[22]](_[_0x31e3[21]](Util[_0x31e3[20]](_0x39c5x14[_0x31e3[19]]),{distinct:true}))[_0x31e3[14]](responseWithResult(_0x39c5x9))[_0x31e3[18]](handleError(_0x39c5x9))};exports[_0x31e3[54]]= function(_0x39c5x14,_0x39c5x9){return SalesforceConfiguration[_0x31e3[24]]({method:[_0x31e3[53],_0x39c5x14[_0x31e3[27]][_0x31e3[26]]]})[_0x31e3[28]](_0x39c5x14[_0x31e3[27]][_0x31e3[55]])[_0x31e3[14]](handleEntityNotFound(_0x39c5x9))[_0x31e3[14]](responseWithResult(_0x39c5x9))[_0x31e3[18]](handleError(_0x39c5x9))};exports[_0x31e3[56]]= function(_0x39c5x14,_0x39c5x9){return SalesforceConfiguration[_0x31e3[24]]({method:[_0x31e3[53],_0x39c5x14[_0x31e3[27]][_0x31e3[26]]]})[_0x31e3[28]](_0x39c5x14[_0x31e3[27]][_0x31e3[55]])[_0x31e3[14]](handleEntityNotFound(_0x39c5x9))[_0x31e3[14]](removeEntity(_0x39c5x9))[_0x31e3[18]](handleError(_0x39c5x9))};exports[_0x31e3[57]]= function(_0x39c5x14,_0x39c5x9){return SalesforceConfiguration[_0x31e3[16]]({where:{id:_0x39c5x14[_0x31e3[19]][_0x31e3[33]]},individualHooks:true})[_0x31e3[14]](responseWithResult(_0x39c5x9,204))[_0x31e3[18]](handleError(_0x39c5x9))};exports[_0x31e3[58]]= function(_0x39c5x14,_0x39c5x9){_0x39c5x14[_0x31e3[30]][_0x31e3[59]]= _0x39c5x14[_0x31e3[27]][_0x31e3[26]];switch(_0x39c5x14[_0x31e3[30]][_0x31e3[108]]){case _0x31e3[106]:if(_0x39c5x14[_0x31e3[30]][_0x31e3[60]]=== _0x31e3[61]){_0x39c5x14[_0x31e3[30]][_0x31e3[62]]= [{"\x74\x79\x70\x65":_0x31e3[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0x31e3[65],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[67]},{"\x74\x79\x70\x65":_0x31e3[65],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[68]}];_0x39c5x14[_0x31e3[30]][_0x31e3[69]]= [{"\x74\x79\x70\x65":_0x31e3[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[70],"\x6B\x65\x79":null,"\x6B\x65\x79\x54\x79\x70\x65":null,"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[72],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[68]},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[73],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[74]},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[75],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[76]},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[61],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[67]},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[77],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[78]},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[79],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[80]},{"\x74\x79\x70\x65":_0x31e3[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[81],"\x6B\x65\x79":null,"\x6B\x65\x79\x54\x79\x70\x65":null,"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[82],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[83]},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[84],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[85]},{"\x74\x79\x70\x65":_0x31e3[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[86],"\x6B\x65\x79":null,"\x6B\x65\x79\x54\x79\x70\x65":null,"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[87],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[80]},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[88],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[89]},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[90],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[91]},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[92],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[93]},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[94],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[95]}]}else {if(_0x39c5x14[_0x31e3[30]][_0x31e3[60]]=== _0x31e3[96]){_0x39c5x14[_0x31e3[30]][_0x31e3[62]]= [{"\x74\x79\x70\x65":_0x31e3[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0x31e3[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[97],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0x31e3[65],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[85]}];_0x39c5x14[_0x31e3[30]][_0x31e3[69]]= [{"\x74\x79\x70\x65":_0x31e3[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[70],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[98],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[85]},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[99],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[100]},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[77],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[78]},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[79],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[101]},{"\x74\x79\x70\x65":_0x31e3[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[86]},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[102],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[103]},{"\x74\x79\x70\x65":_0x31e3[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x6B\x65\x79":_0x31e3[104],"\x6B\x65\x79\x54\x79\x70\x65":_0x31e3[65],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0x31e3[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x31e3[105]}]}};break;default:console[_0x31e3[109]](_0x31e3[107],_0x39c5x14[_0x31e3[30]][_0x31e3[108]])};delete _0x39c5x14[_0x31e3[30]][_0x31e3[108]];delete _0x39c5x14[_0x31e3[30]][_0x31e3[60]];return SalesforceConfiguration[_0x31e3[29]](_0x39c5x14[_0x31e3[30]],{include:[{model:SalesforceField,as:_0x31e3[62]},{model:SalesforceField,as:_0x31e3[69]}]})[_0x31e3[14]](responseWithResult(_0x39c5x9,201))[_0x31e3[18]](handleError(_0x39c5x9))};exports[_0x31e3[110]]= function(_0x39c5x14,_0x39c5x9){return SalesforceConfiguration[_0x31e3[24]]({method:[_0x31e3[53],_0x39c5x14[_0x31e3[27]][_0x31e3[26]]]})[_0x31e3[28]](_0x39c5x14[_0x31e3[27]][_0x31e3[55]])[_0x31e3[14]](handleEntityNotFound(_0x39c5x9))[_0x31e3[14]](function(_0x39c5x1d){switch(_0x39c5x14[_0x31e3[27]][_0x31e3[60]]){case _0x31e3[112]:_0x39c5x14[_0x31e3[30]][_0x31e3[111]]= _0x39c5x14[_0x31e3[27]][_0x31e3[55]];break;case _0x31e3[114]:_0x39c5x14[_0x31e3[30]][_0x31e3[113]]= _0x39c5x14[_0x31e3[27]][_0x31e3[55]];break;case _0x31e3[44]:_0x39c5x14[_0x31e3[30]][_0x31e3[115]]= _0x39c5x14[_0x31e3[27]][_0x31e3[55]];break};return SalesforceField[_0x31e3[29]](_0x39c5x14[_0x31e3[30]])})[_0x31e3[14]](responseWithResult(_0x39c5x9,201))[_0x31e3[18]](handleError(_0x39c5x9))};exports[_0x31e3[116]]= function(_0x39c5x14,_0x39c5x9){if(_0x39c5x14[_0x31e3[30]][_0x31e3[26]]){delete _0x39c5x14[_0x31e3[30]][_0x31e3[26]]};return SalesforceField[_0x31e3[28]](_0x39c5x14[_0x31e3[27]][_0x31e3[117]])[_0x31e3[14]](handleEntityNotFound(_0x39c5x9))[_0x31e3[14]](saveUpdates(_0x39c5x14[_0x31e3[30]]))[_0x31e3[14]](responseWithResult(_0x39c5x9))[_0x31e3[18]](handleError(_0x39c5x9))};exports[_0x31e3[118]]= function(_0x39c5x14,_0x39c5x9){return SalesforceField[_0x31e3[28]](_0x39c5x14[_0x31e3[27]][_0x31e3[117]])[_0x31e3[14]](handleEntityNotFound(_0x39c5x9))[_0x31e3[14]](removeEntity(_0x39c5x9))[_0x31e3[18]](handleError(_0x39c5x9))};exports[_0x31e3[119]]= function(_0x39c5x14,_0x39c5x9,_0x39c5x15){return SalesforceConfiguration[_0x31e3[28]](_0x39c5x14[_0x31e3[27]][_0x31e3[55]])[_0x31e3[14]](handleEntityNotFound(_0x39c5x9))[_0x31e3[14]](function(_0x39c5x1d){return _0x39c5x1d[_0x31e3[121]](_0x39c5x14[_0x31e3[30]])})[_0x31e3[14]](responseWithoutResult(_0x39c5x9,200))[_0x31e3[18]](function(_0x39c5xb){console[_0x31e3[120]](_0x39c5xb);return handleError(_0x39c5x9,_0x39c5xb)})}
\ No newline at end of file
diff --git a/server/api/salesforce_account/salesforce_account.events.js b/server/api/salesforce_account/salesforce_account.events.js
index 13ee57f..c1a94bd 100644
--- a/server/api/salesforce_account/salesforce_account.events.js
+++ b/server/api/salesforce_account/salesforce_account.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const SalesforceAccount = require('../../models').SalesforceAccount;
-
-var SalesforceAccountEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-SalesforceAccountEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  SalesforceAccount.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    SalesforceAccountEvents.emit(event + ':' + doc._id, doc);
-    SalesforceAccountEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = SalesforceAccountEvents;
+var _0xb3ed=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xb3ed[0];const EventEmitter=require(_0xb3ed[1]);const SalesforceAccount=require(_0xb3ed[3])[_0xb3ed[2]];var SalesforceAccountEvents= new EventEmitter();SalesforceAccountEvents[_0xb3ed[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb3ed[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb3ed[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb3ed[6]};for(var e in events){var event=events[e];SalesforceAccount[_0xb3ed[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xd0f3x8,_0xd0f3x9,_0xd0f3xa){SalesforceAccountEvents[_0xb3ed[10]](event+ _0xb3ed[8]+ _0xd0f3x8[_0xb3ed[9]],_0xd0f3x8);SalesforceAccountEvents[_0xb3ed[10]](event,_0xd0f3x8);_0xd0f3xa(null)}}module[_0xb3ed[11]]= SalesforceAccountEvents
\ No newline at end of file
diff --git a/server/api/salesforce_account/salesforce_account.socket.js b/server/api/salesforce_account/salesforce_account.socket.js
index 3ee49f7..1524ef5 100644
--- a/server/api/salesforce_account/salesforce_account.socket.js
+++ b/server/api/salesforce_account/salesforce_account.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const SalesforceAccountEvents = require('./salesforce_account.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('salesforce_account:' + event, socket);
-
-    SalesforceAccountEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    SalesforceAccountEvents.removeListener(event, listener);
-  };
-}
+var _0x12e4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x12e4[0];const SalesforceAccountEvents=require(_0x12e4[1]);var events=[_0x12e4[2],_0x12e4[3]];exports[_0x12e4[4]]= function(_0xcfb5x3){for(var _0xcfb5x4=0,_0xcfb5x5=events[_0x12e4[5]];_0xcfb5x4< _0xcfb5x5;_0xcfb5x4++){var _0xcfb5x6=events[_0xcfb5x4];var _0xcfb5x7=createListener(_0x12e4[6]+ _0xcfb5x6,_0xcfb5x3);SalesforceAccountEvents[_0x12e4[7]](_0xcfb5x6,_0xcfb5x7);_0xcfb5x3[_0x12e4[7]](_0x12e4[8],removeListener(_0xcfb5x6,_0xcfb5x7))}};function createListener(_0xcfb5x6,_0xcfb5x3){return function(_0xcfb5x9){_0xcfb5x3[_0x12e4[9]](_0xcfb5x6,_0xcfb5x9)}}function removeListener(_0xcfb5x6,_0xcfb5x7){return function(){SalesforceAccountEvents[_0x12e4[10]](_0xcfb5x6,_0xcfb5x7)}}
\ No newline at end of file
diff --git a/server/api/salesforce_configuration/index.js b/server/api/salesforce_configuration/index.js
index e0f8ff7..caf1713 100644
--- a/server/api/salesforce_configuration/index.js
+++ b/server/api/salesforce_configuration/index.js
@@ -1,17 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./salesforce_configuration.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), controller.index);
-
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update);
-router.post('/:id/:type', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.addConfigurationField);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xfed4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x3A\x74\x79\x70\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xfed4[0];var express=require(_0xfed4[1]);var auth=require(_0xfed4[2]);var controller=require(_0xfed4[3]);var router=express.Router();router[_0xfed4[7]](_0xfed4[4],auth[_0xfed4[5]](),controller[_0xfed4[6]]);router[_0xfed4[7]](_0xfed4[8],auth[_0xfed4[5]](),auth[_0xfed4[10]]([19],[_0xfed4[9]]),controller[_0xfed4[11]]);router[_0xfed4[13]](_0xfed4[4],auth[_0xfed4[5]](),auth[_0xfed4[10]]([19],[_0xfed4[9]]),controller[_0xfed4[12]]);router[_0xfed4[15]](_0xfed4[8],auth[_0xfed4[5]](),auth[_0xfed4[10]]([19],[_0xfed4[9]]),controller[_0xfed4[14]]);router[_0xfed4[13]](_0xfed4[16],auth[_0xfed4[5]](),auth[_0xfed4[10]]([19],[_0xfed4[9]]),controller[_0xfed4[17]]);router[_0xfed4[19]](_0xfed4[8],auth[_0xfed4[5]](),auth[_0xfed4[10]]([19],[_0xfed4[9]]),controller[_0xfed4[18]]);module[_0xfed4[20]]= router
\ No newline at end of file
diff --git a/server/api/salesforce_configuration/salesforce_configuration.controller.js b/server/api/salesforce_configuration/salesforce_configuration.controller.js
index 523aef6..6b5189d 100644
--- a/server/api/salesforce_configuration/salesforce_configuration.controller.js
+++ b/server/api/salesforce_configuration/salesforce_configuration.controller.js
@@ -1,147 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/salesforce/configurations              ->  index
- * POST    /api/salesforce/configurations              ->  create
- * GET     /api/salesforce/configurations/:id          ->  show
- * PUT     /api/salesforce/configurations/:id          ->  update
- * DELETE  /api/salesforce/configurations/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-
-var SalesforceConfiguration = require('../../models').SalesforceConfiguration;
-var SalesforceField = require('../../models').SalesforceField;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of SalesforceConfigurations
-exports.index = function(req, res) {
-  SalesforceConfiguration.findAll({
-      where: req.query
-    })
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single SalesforceConfiguration from the DB
-exports.show = function(req, res) {
-  SalesforceConfiguration.find({
-      where: {
-        id: req.params.id
-      },
-      include: [{
-        model: SalesforceField,
-        as: 'Subject'
-      }, {
-        model: SalesforceField,
-        as: 'Description'
-      }, {
-        model: SalesforceField,
-        as: 'Field'
-      }]
-    })
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new SalesforceConfiguration in the DB
-exports.create = function(req, res) {
-  SalesforceConfiguration.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing SalesforceConfiguration in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  SalesforceConfiguration.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a SalesforceConfiguration from the DB
-exports.destroy = function(req, res) {
-  SalesforceConfiguration.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
-
-exports.addConfigurationField = function(req, res, next) {
-  // console.log(req.params);
-  var salesforceConfiguration;
-  SalesforceConfiguration
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(function(salesforce_configuration) {
-      salesforceConfiguration = salesforce_configuration;
-      return SalesforceField.create(req.body)
-    })
-    .then(function(salesforceField) {
-      switch (req.params.type) {
-        case 'subject':
-          return [salesforceConfiguration.addSubject(salesforceField), salesforceField];
-        case 'description':
-          return [salesforceConfiguration.addDescription(salesforceField), salesforceField];
-        case 'field':
-          return [salesforceConfiguration.addField(salesforceField), salesforceField];
-      }
-    })
-    .spread(function(data, salesforceField) {
-      return res.status(201).json(salesforceField);
-    })
-    .catch(handleError(res));
-};
+var _0x2342=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x53\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x73\x70\x72\x65\x61\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65"];_0x2342[0];var _=require(_0x2342[1]);var SalesforceConfiguration=require(_0x2342[3])[_0x2342[2]];var SalesforceField=require(_0x2342[3])[_0x2342[4]];function handleError(_0x3814x5,_0x3814x6){_0x3814x6= _0x3814x6|| 500;return function(_0x3814x7){_0x3814x5[_0x2342[6]](_0x3814x6)[_0x2342[5]](_0x3814x7)}}function responseWithResult(_0x3814x5,_0x3814x6){_0x3814x6= _0x3814x6|| 200;return function(_0x3814x9){if(_0x3814x9){_0x3814x5[_0x2342[6]](_0x3814x6)[_0x2342[7]](_0x3814x9)}}}function handleEntityNotFound(_0x3814x5){return function(_0x3814x9){if(!_0x3814x9){_0x3814x5[_0x2342[6]](404)[_0x2342[8]]();return null};return _0x3814x9}}function saveUpdates(_0x3814xc){return function(_0x3814x9){return _0x3814x9[_0x2342[10]](_0x3814xc)[_0x2342[9]](function(_0x3814xd){return _0x3814xd})}}function removeEntity(_0x3814x5){return function(_0x3814x9){if(_0x3814x9){return _0x3814x9[_0x2342[11]]()[_0x2342[9]](function(){_0x3814x5[_0x2342[6]](204)[_0x2342[8]]()})}}}exports[_0x2342[12]]= function(_0x3814xf,_0x3814x5){SalesforceConfiguration[_0x2342[15]]({where:_0x3814xf[_0x2342[14]]})[_0x2342[9]](responseWithResult(_0x3814x5))[_0x2342[13]](handleError(_0x3814x5))};exports[_0x2342[16]]= function(_0x3814xf,_0x3814x5){SalesforceConfiguration[_0x2342[22]]({where:{id:_0x3814xf[_0x2342[18]][_0x2342[17]]},include:[{model:SalesforceField,as:_0x2342[19]},{model:SalesforceField,as:_0x2342[20]},{model:SalesforceField,as:_0x2342[21]}]})[_0x2342[9]](handleEntityNotFound(_0x3814x5))[_0x2342[9]](responseWithResult(_0x3814x5))[_0x2342[13]](handleError(_0x3814x5))};exports[_0x2342[23]]= function(_0x3814xf,_0x3814x5){SalesforceConfiguration[_0x2342[23]](_0x3814xf[_0x2342[24]])[_0x2342[9]](responseWithResult(_0x3814x5,201))[_0x2342[13]](handleError(_0x3814x5))};exports[_0x2342[25]]= function(_0x3814xf,_0x3814x5){if(_0x3814xf[_0x2342[24]][_0x2342[17]]){delete _0x3814xf[_0x2342[24]][_0x2342[17]]};SalesforceConfiguration[_0x2342[26]](_0x3814xf[_0x2342[18]][_0x2342[17]])[_0x2342[9]](handleEntityNotFound(_0x3814x5))[_0x2342[9]](saveUpdates(_0x3814xf[_0x2342[24]]))[_0x2342[9]](responseWithResult(_0x3814x5))[_0x2342[13]](handleError(_0x3814x5))};exports[_0x2342[11]]= function(_0x3814xf,_0x3814x5){SalesforceConfiguration[_0x2342[26]](_0x3814xf[_0x2342[18]][_0x2342[17]])[_0x2342[9]](handleEntityNotFound(_0x3814x5))[_0x2342[9]](removeEntity(_0x3814x5))[_0x2342[13]](handleError(_0x3814x5))};exports[_0x2342[27]]= function(_0x3814xf,_0x3814x5,_0x3814x10){var _0x3814x11;SalesforceConfiguration[_0x2342[26]](_0x3814xf[_0x2342[18]][_0x2342[17]])[_0x2342[9]](handleEntityNotFound(_0x3814x5))[_0x2342[9]](function(_0x3814x14){_0x3814x11= _0x3814x14;return SalesforceField[_0x2342[23]](_0x3814xf[_0x2342[24]])})[_0x2342[9]](function(_0x3814x13){switch(_0x3814xf[_0x2342[18]][_0x2342[35]]){case _0x2342[30]:return [_0x3814x11[_0x2342[29]](_0x3814x13),_0x3814x13];case _0x2342[32]:return [_0x3814x11[_0x2342[31]](_0x3814x13),_0x3814x13];case _0x2342[34]:return [_0x3814x11[_0x2342[33]](_0x3814x13),_0x3814x13]}})[_0x2342[28]](function(_0x3814x12,_0x3814x13){return _0x3814x5[_0x2342[6]](201)[_0x2342[7]](_0x3814x13)})[_0x2342[13]](handleError(_0x3814x5))}
\ No newline at end of file
diff --git a/server/api/salesforce_configuration/salesforce_configuration.events.js b/server/api/salesforce_configuration/salesforce_configuration.events.js
index 0814fbf..9f8ab18 100644
--- a/server/api/salesforce_configuration/salesforce_configuration.events.js
+++ b/server/api/salesforce_configuration/salesforce_configuration.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const SalesforceConfiguration = require('../../models').SalesforceConfiguration;
-
-var SalesforceConfigurationEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-SalesforceConfigurationEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  SalesforceConfiguration.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    SalesforceConfigurationEvents.emit(event + ':' + doc._id, doc);
-    SalesforceConfigurationEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = SalesforceConfigurationEvents;
+var _0xd5ee=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd5ee[0];const EventEmitter=require(_0xd5ee[1]);const SalesforceConfiguration=require(_0xd5ee[3])[_0xd5ee[2]];var SalesforceConfigurationEvents= new EventEmitter();SalesforceConfigurationEvents[_0xd5ee[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd5ee[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd5ee[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd5ee[6]};for(var e in events){var event=events[e];SalesforceConfiguration[_0xd5ee[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa129x8,_0xa129x9,_0xa129xa){SalesforceConfigurationEvents[_0xd5ee[10]](event+ _0xd5ee[8]+ _0xa129x8[_0xd5ee[9]],_0xa129x8);SalesforceConfigurationEvents[_0xd5ee[10]](event,_0xa129x8);_0xa129xa(null)}}module[_0xd5ee[11]]= SalesforceConfigurationEvents
\ No newline at end of file
diff --git a/server/api/salesforce_configuration/salesforce_configuration.socket.js b/server/api/salesforce_configuration/salesforce_configuration.socket.js
index df21994..10ce3f7 100644
--- a/server/api/salesforce_configuration/salesforce_configuration.socket.js
+++ b/server/api/salesforce_configuration/salesforce_configuration.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const SalesforceConfigurationEvents = require('./salesforce_configuration.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('salesforce_configuration:' + event, socket);
-
-    SalesforceConfigurationEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    SalesforceConfigurationEvents.removeListener(event, listener);
-  };
-}
+var _0x19a9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x19a9[0];const SalesforceConfigurationEvents=require(_0x19a9[1]);var events=[_0x19a9[2],_0x19a9[3]];exports[_0x19a9[4]]= function(_0x4e91x3){for(var _0x4e91x4=0,_0x4e91x5=events[_0x19a9[5]];_0x4e91x4< _0x4e91x5;_0x4e91x4++){var _0x4e91x6=events[_0x4e91x4];var _0x4e91x7=createListener(_0x19a9[6]+ _0x4e91x6,_0x4e91x3);SalesforceConfigurationEvents[_0x19a9[7]](_0x4e91x6,_0x4e91x7);_0x4e91x3[_0x19a9[7]](_0x19a9[8],removeListener(_0x4e91x6,_0x4e91x7))}};function createListener(_0x4e91x6,_0x4e91x3){return function(_0x4e91x9){_0x4e91x3[_0x19a9[9]](_0x4e91x6,_0x4e91x9)}}function removeListener(_0x4e91x6,_0x4e91x7){return function(){SalesforceConfigurationEvents[_0x19a9[10]](_0x4e91x6,_0x4e91x7)}}
\ No newline at end of file
diff --git a/server/api/salesforce_field/index.js b/server/api/salesforce_field/index.js
index 2dd2a9d..bdd5715 100644
--- a/server/api/salesforce_field/index.js
+++ b/server/api/salesforce_field/index.js
@@ -1,17 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./salesforce_field.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), controller.index);
-
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy);
-
-
-module.exports = router;
+var _0x1e3c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x1e3c[0];var express=require(_0x1e3c[1]);var auth=require(_0x1e3c[2]);var controller=require(_0x1e3c[3]);var router=express.Router();router[_0x1e3c[7]](_0x1e3c[4],auth[_0x1e3c[5]](),controller[_0x1e3c[6]]);router[_0x1e3c[7]](_0x1e3c[8],auth[_0x1e3c[5]](),auth[_0x1e3c[10]]([19],[_0x1e3c[9]]),controller[_0x1e3c[11]]);router[_0x1e3c[13]](_0x1e3c[4],auth[_0x1e3c[5]](),auth[_0x1e3c[10]]([19],[_0x1e3c[9]]),controller[_0x1e3c[12]]);router[_0x1e3c[15]](_0x1e3c[8],auth[_0x1e3c[5]](),auth[_0x1e3c[10]]([19],[_0x1e3c[9]]),controller[_0x1e3c[14]]);router[_0x1e3c[17]](_0x1e3c[8],auth[_0x1e3c[5]](),auth[_0x1e3c[10]]([19],[_0x1e3c[9]]),controller[_0x1e3c[16]]);module[_0x1e3c[18]]= router
\ No newline at end of file
diff --git a/server/api/salesforce_field/salesforce_field.controller.js b/server/api/salesforce_field/salesforce_field.controller.js
index bab61d7..bfa9d92 100644
--- a/server/api/salesforce_field/salesforce_field.controller.js
+++ b/server/api/salesforce_field/salesforce_field.controller.js
@@ -1,104 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/salesforce/fields              ->  index
- * POST    /api/salesforce/fields              ->  create
- * GET     /api/salesforce/fields/:id          ->  show
- * PUT     /api/salesforce/fields/:id          ->  update
- * DELETE  /api/salesforce/fields/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-
-var SalesforceField = require('../../models').SalesforceField;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of SalesforceFields
-exports.index = function(req, res) {
-  SalesforceField.findAll()
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single SalesforceField from the DB
-exports.show = function(req, res) {
-  SalesforceField.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new SalesforceField in the DB
-exports.create = function(req, res) {
-  SalesforceField.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing SalesforceField in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  SalesforceField.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a SalesforceField from the DB
-exports.destroy = function(req, res) {
-  SalesforceField.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
+var _0x8284=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0x8284[0];var _=require(_0x8284[1]);var SalesforceField=require(_0x8284[3])[_0x8284[2]];function handleError(_0x1a4cx4,_0x1a4cx5){_0x1a4cx5= _0x1a4cx5|| 500;return function(_0x1a4cx6){_0x1a4cx4[_0x8284[5]](_0x1a4cx5)[_0x8284[4]](_0x1a4cx6)}}function responseWithResult(_0x1a4cx4,_0x1a4cx5){_0x1a4cx5= _0x1a4cx5|| 200;return function(_0x1a4cx8){if(_0x1a4cx8){_0x1a4cx4[_0x8284[5]](_0x1a4cx5)[_0x8284[6]](_0x1a4cx8)}}}function handleEntityNotFound(_0x1a4cx4){return function(_0x1a4cx8){if(!_0x1a4cx8){_0x1a4cx4[_0x8284[5]](404)[_0x8284[7]]();return null};return _0x1a4cx8}}function saveUpdates(_0x1a4cxb){return function(_0x1a4cx8){return _0x1a4cx8[_0x8284[9]](_0x1a4cxb)[_0x8284[8]](function(_0x1a4cxc){return _0x1a4cxc})}}function removeEntity(_0x1a4cx4){return function(_0x1a4cx8){if(_0x1a4cx8){return _0x1a4cx8[_0x8284[10]]()[_0x8284[8]](function(){_0x1a4cx4[_0x8284[5]](204)[_0x8284[7]]()})}}}exports[_0x8284[11]]= function(_0x1a4cxe,_0x1a4cx4){SalesforceField[_0x8284[13]]()[_0x8284[8]](responseWithResult(_0x1a4cx4))[_0x8284[12]](handleError(_0x1a4cx4))};exports[_0x8284[14]]= function(_0x1a4cxe,_0x1a4cx4){SalesforceField[_0x8284[17]](_0x1a4cxe[_0x8284[16]][_0x8284[15]])[_0x8284[8]](handleEntityNotFound(_0x1a4cx4))[_0x8284[8]](responseWithResult(_0x1a4cx4))[_0x8284[12]](handleError(_0x1a4cx4))};exports[_0x8284[18]]= function(_0x1a4cxe,_0x1a4cx4){SalesforceField[_0x8284[18]](_0x1a4cxe[_0x8284[19]])[_0x8284[8]](responseWithResult(_0x1a4cx4,201))[_0x8284[12]](handleError(_0x1a4cx4))};exports[_0x8284[20]]= function(_0x1a4cxe,_0x1a4cx4){if(_0x1a4cxe[_0x8284[19]][_0x8284[15]]){delete _0x1a4cxe[_0x8284[19]][_0x8284[15]]};SalesforceField[_0x8284[17]](_0x1a4cxe[_0x8284[16]][_0x8284[15]])[_0x8284[8]](handleEntityNotFound(_0x1a4cx4))[_0x8284[8]](saveUpdates(_0x1a4cxe[_0x8284[19]]))[_0x8284[8]](responseWithResult(_0x1a4cx4))[_0x8284[12]](handleError(_0x1a4cx4))};exports[_0x8284[10]]= function(_0x1a4cxe,_0x1a4cx4){SalesforceField[_0x8284[17]](_0x1a4cxe[_0x8284[16]][_0x8284[15]])[_0x8284[8]](handleEntityNotFound(_0x1a4cx4))[_0x8284[8]](removeEntity(_0x1a4cx4))[_0x8284[12]](handleError(_0x1a4cx4))}
\ No newline at end of file
diff --git a/server/api/salesforce_field/salesforce_field.events.js b/server/api/salesforce_field/salesforce_field.events.js
index 44a66ad..7b9aa4c 100644
--- a/server/api/salesforce_field/salesforce_field.events.js
+++ b/server/api/salesforce_field/salesforce_field.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const SalesforceField = require('../../models').SalesforceField;
-
-var SalesforceFieldEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-SalesforceFieldEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  SalesforceField.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    SalesforceFieldEvents.emit(event + ':' + doc._id, doc);
-    SalesforceFieldEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = SalesforceFieldEvents;
+var _0xa417=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xa417[0];const EventEmitter=require(_0xa417[1]);const SalesforceField=require(_0xa417[3])[_0xa417[2]];var SalesforceFieldEvents= new EventEmitter();SalesforceFieldEvents[_0xa417[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xa417[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xa417[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xa417[6]};for(var e in events){var event=events[e];SalesforceField[_0xa417[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x2445x8,_0x2445x9,_0x2445xa){SalesforceFieldEvents[_0xa417[10]](event+ _0xa417[8]+ _0x2445x8[_0xa417[9]],_0x2445x8);SalesforceFieldEvents[_0xa417[10]](event,_0x2445x8);_0x2445xa(null)}}module[_0xa417[11]]= SalesforceFieldEvents
\ No newline at end of file
diff --git a/server/api/salesforce_field/salesforce_field.socket.js b/server/api/salesforce_field/salesforce_field.socket.js
index e394e5b..af79ef9 100644
--- a/server/api/salesforce_field/salesforce_field.socket.js
+++ b/server/api/salesforce_field/salesforce_field.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const SalesforceFieldEvents = require('./salesforce_field.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('salesforce_field:' + event, socket);
-
-    SalesforceFieldEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    SalesforceFieldEvents.removeListener(event, listener);
-  };
-}
+var _0xea30=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xea30[0];const SalesforceFieldEvents=require(_0xea30[1]);var events=[_0xea30[2],_0xea30[3]];exports[_0xea30[4]]= function(_0xd3bax3){for(var _0xd3bax4=0,_0xd3bax5=events[_0xea30[5]];_0xd3bax4< _0xd3bax5;_0xd3bax4++){var _0xd3bax6=events[_0xd3bax4];var _0xd3bax7=createListener(_0xea30[6]+ _0xd3bax6,_0xd3bax3);SalesforceFieldEvents[_0xea30[7]](_0xd3bax6,_0xd3bax7);_0xd3bax3[_0xea30[7]](_0xea30[8],removeListener(_0xd3bax6,_0xd3bax7))}};function createListener(_0xd3bax6,_0xd3bax3){return function(_0xd3bax9){_0xd3bax3[_0xea30[9]](_0xd3bax6,_0xd3bax9)}}function removeListener(_0xd3bax6,_0xd3bax7){return function(){SalesforceFieldEvents[_0xea30[10]](_0xd3bax6,_0xd3bax7)}}
\ No newline at end of file
diff --git a/server/api/scheduler/index.js b/server/api/scheduler/index.js
index 7dd28ad..d9b088c 100644
--- a/server/api/scheduler/index.js
+++ b/server/api/scheduler/index.js
@@ -1,19 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./scheduler.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), controller.index);
-
-router.get('/:id', auth.isAuthenticated(), controller.show);
-router.get('/:id/run', auth.isAuthenticated(), controller.runSchedule);
-router.post('/', auth.isAuthenticated(), controller.create);
-router.put('/:id', auth.isAuthenticated(), controller.update);
-router.patch('/:id', auth.isAuthenticated(), controller.update);
-router.delete('/:id', auth.isAuthenticated(), controller.destroy);
-
-
-module.exports = router;
+var _0x4ba5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x72\x75\x6E","\x72\x75\x6E\x53\x63\x68\x65\x64\x75\x6C\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4ba5[0];var express=require(_0x4ba5[1]);var auth=require(_0x4ba5[2]);var controller=require(_0x4ba5[3]);var router=express.Router();router[_0x4ba5[7]](_0x4ba5[4],auth[_0x4ba5[5]](),controller[_0x4ba5[6]]);router[_0x4ba5[7]](_0x4ba5[8],auth[_0x4ba5[5]](),controller[_0x4ba5[9]]);router[_0x4ba5[7]](_0x4ba5[10],auth[_0x4ba5[5]](),controller[_0x4ba5[11]]);router[_0x4ba5[13]](_0x4ba5[4],auth[_0x4ba5[5]](),controller[_0x4ba5[12]]);router[_0x4ba5[15]](_0x4ba5[8],auth[_0x4ba5[5]](),controller[_0x4ba5[14]]);router[_0x4ba5[16]](_0x4ba5[8],auth[_0x4ba5[5]](),controller[_0x4ba5[14]]);router[_0x4ba5[18]](_0x4ba5[8],auth[_0x4ba5[5]](),controller[_0x4ba5[17]]);module[_0x4ba5[19]]= router
\ No newline at end of file
diff --git a/server/api/scheduler/scheduler.controller.js b/server/api/scheduler/scheduler.controller.js
index f25aa6a..3ecb1d4 100644
--- a/server/api/scheduler/scheduler.controller.js
+++ b/server/api/scheduler/scheduler.controller.js
@@ -1,130 +1 @@
-'use strict';
-
-
-var _ = require('lodash');
-
-var Schedule = require('../../models').Schedule;
-var MailServerOut = require('../../models').MailServerOut;
-var Reports = require('../../config/scheduler/reports');
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    console.log(err);
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function responseWithoutResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function() {
-    res.sendStatus(statusCode);
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-function runSchedule(req) {
-  return function(entity) {
-    if (entity) {
-      switch (entity.type) {
-        case 'report':
-          var scheduler = new Reports();
-          scheduler.extractReport(entity, req.user)
-          break;
-        default:
-      }
-    }
-  }
-}
-
-// Gets a list of Schedules
-exports.index = function(req, res) {
-  Schedule.findAndCountAll()
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single Schedule from the DB
-exports.show = function(req, res) {
-  Schedule.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Execute single Schedule from the DB
-exports.runSchedule = function(req, res) {
-  Schedule.findById(req.params.id, {
-      include: [MailServerOut]
-    })
-    .then(handleEntityNotFound(res))
-    .then(runSchedule(req))
-    .then(responseWithoutResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new Schedule in the DB
-exports.create = function(req, res) {
-  Schedule.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing Schedule in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  Schedule.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a Schedule from the DB
-exports.destroy = function(req, res) {
-  Schedule.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
+var _0xa2af=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x63\x68\x65\x64\x75\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72\x2F\x72\x65\x70\x6F\x72\x74\x73","\x6C\x6F\x67","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x75\x73\x65\x72","\x65\x78\x74\x72\x61\x63\x74\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74","\x74\x79\x70\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x75\x6E\x53\x63\x68\x65\x64\x75\x6C\x65","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0xa2af[0];var _=require(_0xa2af[1]);var Schedule=require(_0xa2af[3])[_0xa2af[2]];var MailServerOut=require(_0xa2af[3])[_0xa2af[4]];var Reports=require(_0xa2af[5]);function handleError(_0x3f13x6,_0x3f13x7){_0x3f13x7= _0x3f13x7|| 500;return function(_0x3f13x8){console[_0xa2af[6]](_0x3f13x8);_0x3f13x6[_0xa2af[8]](_0x3f13x7)[_0xa2af[7]](_0x3f13x8)}}function responseWithResult(_0x3f13x6,_0x3f13x7){_0x3f13x7= _0x3f13x7|| 200;return function(_0x3f13xa){if(_0x3f13xa){_0x3f13x6[_0xa2af[8]](_0x3f13x7)[_0xa2af[9]](_0x3f13xa)}}}function responseWithoutResult(_0x3f13x6,_0x3f13x7){_0x3f13x7= _0x3f13x7|| 200;return function(){_0x3f13x6[_0xa2af[10]](_0x3f13x7)}}function handleEntityNotFound(_0x3f13x6){return function(_0x3f13xa){if(!_0x3f13xa){_0x3f13x6[_0xa2af[8]](404)[_0xa2af[11]]();return null};return _0x3f13xa}}function saveUpdates(_0x3f13xe){return function(_0x3f13xa){return _0x3f13xa[_0xa2af[13]](_0x3f13xe)[_0xa2af[12]](function(_0x3f13xf){return _0x3f13xf})}}function removeEntity(_0x3f13x6){return function(_0x3f13xa){if(_0x3f13xa){return _0x3f13xa[_0xa2af[14]]()[_0xa2af[12]](function(){_0x3f13x6[_0xa2af[8]](204)[_0xa2af[11]]()})}}}function runSchedule(_0x3f13x12){return function(_0x3f13xa){if(_0x3f13xa){switch(_0x3f13xa[_0xa2af[18]]){case _0xa2af[17]:var _0x3f13x13= new Reports();_0x3f13x13[_0xa2af[16]](_0x3f13xa,_0x3f13x12[_0xa2af[15]]);break;default:}}}}exports[_0xa2af[19]]= function(_0x3f13x12,_0x3f13x6){Schedule[_0xa2af[21]]()[_0xa2af[12]](responseWithResult(_0x3f13x6))[_0xa2af[20]](handleError(_0x3f13x6))};exports[_0xa2af[22]]= function(_0x3f13x12,_0x3f13x6){Schedule[_0xa2af[25]](_0x3f13x12[_0xa2af[24]][_0xa2af[23]])[_0xa2af[12]](handleEntityNotFound(_0x3f13x6))[_0xa2af[12]](responseWithResult(_0x3f13x6))[_0xa2af[20]](handleError(_0x3f13x6))};exports[_0xa2af[26]]= function(_0x3f13x12,_0x3f13x6){Schedule[_0xa2af[25]](_0x3f13x12[_0xa2af[24]][_0xa2af[23]],{include:[MailServerOut]})[_0xa2af[12]](handleEntityNotFound(_0x3f13x6))[_0xa2af[12]](runSchedule(_0x3f13x12))[_0xa2af[12]](responseWithoutResult(_0x3f13x6))[_0xa2af[20]](handleError(_0x3f13x6))};exports[_0xa2af[27]]= function(_0x3f13x12,_0x3f13x6){Schedule[_0xa2af[27]](_0x3f13x12[_0xa2af[28]])[_0xa2af[12]](responseWithResult(_0x3f13x6,201))[_0xa2af[20]](handleError(_0x3f13x6))};exports[_0xa2af[29]]= function(_0x3f13x12,_0x3f13x6){if(_0x3f13x12[_0xa2af[28]][_0xa2af[23]]){delete _0x3f13x12[_0xa2af[28]][_0xa2af[23]]};Schedule[_0xa2af[25]](_0x3f13x12[_0xa2af[24]][_0xa2af[23]])[_0xa2af[12]](handleEntityNotFound(_0x3f13x6))[_0xa2af[12]](saveUpdates(_0x3f13x12[_0xa2af[28]]))[_0xa2af[12]](responseWithResult(_0x3f13x6))[_0xa2af[20]](handleError(_0x3f13x6))};exports[_0xa2af[14]]= function(_0x3f13x12,_0x3f13x6){Schedule[_0xa2af[25]](_0x3f13x12[_0xa2af[24]][_0xa2af[23]])[_0xa2af[12]](handleEntityNotFound(_0x3f13x6))[_0xa2af[12]](removeEntity(_0x3f13x6))[_0xa2af[20]](handleError(_0x3f13x6))}
\ No newline at end of file
diff --git a/server/api/scheduler/scheduler.events.js b/server/api/scheduler/scheduler.events.js
index 7718bf6..a33938e 100644
--- a/server/api/scheduler/scheduler.events.js
+++ b/server/api/scheduler/scheduler.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Schedule = require('../../models').Schedule;
-
-var SchedulerEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-SchedulerEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Schedule.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    SchedulerEvents.emit(event + ':' + doc._id, doc);
-    SchedulerEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = SchedulerEvents;
+var _0x29e5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x63\x68\x65\x64\x75\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x29e5[0];const EventEmitter=require(_0x29e5[1]);const Schedule=require(_0x29e5[3])[_0x29e5[2]];var SchedulerEvents= new EventEmitter();SchedulerEvents[_0x29e5[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x29e5[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x29e5[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x29e5[6]};for(var e in events){var event=events[e];Schedule[_0x29e5[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x45dcx8,_0x45dcx9,_0x45dcxa){SchedulerEvents[_0x29e5[10]](event+ _0x29e5[8]+ _0x45dcx8[_0x29e5[9]],_0x45dcx8);SchedulerEvents[_0x29e5[10]](event,_0x45dcx8);_0x45dcxa(null)}}module[_0x29e5[11]]= SchedulerEvents
\ No newline at end of file
diff --git a/server/api/scheduler/scheduler.socket.js b/server/api/scheduler/scheduler.socket.js
index 16264a4..ffe4346 100644
--- a/server/api/scheduler/scheduler.socket.js
+++ b/server/api/scheduler/scheduler.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const SchedulerEvents = require('./scheduler.events');
-
-// Model events to emit
-var events = ['save', 'update', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('schedule:' + event, socket);
-
-    SchedulerEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    SchedulerEvents.removeListener(event, listener);
-  };
-}
+var _0xcd77=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x63\x68\x65\x64\x75\x6C\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xcd77[0];const SchedulerEvents=require(_0xcd77[1]);var events=[_0xcd77[2],_0xcd77[3],_0xcd77[4]];exports[_0xcd77[5]]= function(_0x9400x3){for(var _0x9400x4=0,_0x9400x5=events[_0xcd77[6]];_0x9400x4< _0x9400x5;_0x9400x4++){var _0x9400x6=events[_0x9400x4];var _0x9400x7=createListener(_0xcd77[7]+ _0x9400x6,_0x9400x3);SchedulerEvents[_0xcd77[8]](_0x9400x6,_0x9400x7);_0x9400x3[_0xcd77[8]](_0xcd77[9],removeListener(_0x9400x6,_0x9400x7))}};function createListener(_0x9400x6,_0x9400x3){return function(_0x9400x9){_0x9400x3[_0xcd77[10]](_0x9400x6,_0x9400x9)}}function removeListener(_0x9400x6,_0x9400x7){return function(){SchedulerEvents[_0xcd77[11]](_0x9400x6,_0x9400x7)}}
\ No newline at end of file
diff --git a/server/api/setting/index.js b/server/api/setting/index.js
index cbca952..5035f49 100644
--- a/server/api/setting/index.js
+++ b/server/api/setting/index.js
@@ -1,28 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./setting.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.index);
-router.get('/smtp', auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.showCustom);
-router.get('/internal', auth.isAuthenticated(), auth.hasRole('admin'), controller.getInternal);
-router.get('/mailbox', auth.isAuthenticated(), auth.hasRole('admin'), controller.getMailbox);
-router.get('/logo/main/:filename', controller.getLogo);
-router.get('/logo/login/:filename', controller.getLoginLogo);
-router.get('/system', auth.isAuthenticated(), auth.hasRole('admin'), controller.stats);
-router.get('/logs', auth.isAuthenticated(), auth.hasRole('admin'), controller.logs);
-router.get('/info', controller.getInfo);
-router.get('/:id', auth.isAuthenticated(), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.create);
-router.post('/asterisk', auth.isAuthenticated(), auth.hasRole('admin'), controller.asteriskCommand);
-router.post('/logo/main', auth.isAuthenticated(), auth.hasRole('admin'), controller.changeLogo);
-router.post('/logo/login', auth.isAuthenticated(), auth.hasRole('admin'), controller.changeLoginLogo);
-router.post('/smtp', auth.isAuthenticated(), auth.hasRole('admin'), controller.createSmtp);
-router.put('/smtp/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.updateSmtp);
-router.put('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.update);
-router.delete('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy);
-
-module.exports = router;
+var _0x3271=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x73\x65\x74\x74\x69\x6E\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x73\x6D\x74\x70","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x73\x68\x6F\x77\x43\x75\x73\x74\x6F\x6D","\x2F\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C","\x2F\x6D\x61\x69\x6C\x62\x6F\x78","\x67\x65\x74\x4D\x61\x69\x6C\x62\x6F\x78","\x2F\x6C\x6F\x67\x6F\x2F\x6D\x61\x69\x6E\x2F\x3A\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x67\x65\x74\x4C\x6F\x67\x6F","\x2F\x6C\x6F\x67\x6F\x2F\x6C\x6F\x67\x69\x6E\x2F\x3A\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x67\x65\x74\x4C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x2F\x73\x79\x73\x74\x65\x6D","\x73\x74\x61\x74\x73","\x2F\x6C\x6F\x67\x73","\x6C\x6F\x67\x73","\x2F\x69\x6E\x66\x6F","\x67\x65\x74\x49\x6E\x66\x6F","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x61\x73\x74\x65\x72\x69\x73\x6B","\x61\x73\x74\x65\x72\x69\x73\x6B\x43\x6F\x6D\x6D\x61\x6E\x64","\x2F\x6C\x6F\x67\x6F\x2F\x6D\x61\x69\x6E","\x63\x68\x61\x6E\x67\x65\x4C\x6F\x67\x6F","\x2F\x6C\x6F\x67\x6F\x2F\x6C\x6F\x67\x69\x6E","\x63\x68\x61\x6E\x67\x65\x4C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x63\x72\x65\x61\x74\x65\x53\x6D\x74\x70","\x2F\x73\x6D\x74\x70\x2F\x3A\x69\x64","\x75\x70\x64\x61\x74\x65\x53\x6D\x74\x70","\x70\x75\x74","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3271[0];var express=require(_0x3271[1]);var controller=require(_0x3271[2]);var auth=require(_0x3271[3]);var router=express.Router();router[_0x3271[9]](_0x3271[4],auth[_0x3271[5]](),auth[_0x3271[7]](_0x3271[6]),controller[_0x3271[8]]);router[_0x3271[9]](_0x3271[10],auth[_0x3271[5]](),auth[_0x3271[12]]([9],[_0x3271[6],_0x3271[11]]),controller[_0x3271[13]]);router[_0x3271[9]](_0x3271[14],auth[_0x3271[5]](),auth[_0x3271[7]](_0x3271[6]),controller[_0x3271[15]]);router[_0x3271[9]](_0x3271[16],auth[_0x3271[5]](),auth[_0x3271[7]](_0x3271[6]),controller[_0x3271[17]]);router[_0x3271[9]](_0x3271[18],controller[_0x3271[19]]);router[_0x3271[9]](_0x3271[20],controller[_0x3271[21]]);router[_0x3271[9]](_0x3271[22],auth[_0x3271[5]](),auth[_0x3271[7]](_0x3271[6]),controller[_0x3271[23]]);router[_0x3271[9]](_0x3271[24],auth[_0x3271[5]](),auth[_0x3271[7]](_0x3271[6]),controller[_0x3271[25]]);router[_0x3271[9]](_0x3271[26],controller[_0x3271[27]]);router[_0x3271[9]](_0x3271[28],auth[_0x3271[5]](),controller[_0x3271[29]]);router[_0x3271[31]](_0x3271[4],auth[_0x3271[5]](),auth[_0x3271[7]](_0x3271[6]),controller[_0x3271[30]]);router[_0x3271[31]](_0x3271[32],auth[_0x3271[5]](),auth[_0x3271[7]](_0x3271[6]),controller[_0x3271[33]]);router[_0x3271[31]](_0x3271[34],auth[_0x3271[5]](),auth[_0x3271[7]](_0x3271[6]),controller[_0x3271[35]]);router[_0x3271[31]](_0x3271[36],auth[_0x3271[5]](),auth[_0x3271[7]](_0x3271[6]),controller[_0x3271[37]]);router[_0x3271[31]](_0x3271[10],auth[_0x3271[5]](),auth[_0x3271[7]](_0x3271[6]),controller[_0x3271[38]]);router[_0x3271[41]](_0x3271[39],auth[_0x3271[5]](),auth[_0x3271[7]](_0x3271[6]),controller[_0x3271[40]]);router[_0x3271[41]](_0x3271[28],auth[_0x3271[5]](),auth[_0x3271[7]](_0x3271[6]),controller[_0x3271[42]]);router[_0x3271[44]](_0x3271[28],auth[_0x3271[5]](),auth[_0x3271[7]](_0x3271[6]),controller[_0x3271[43]]);module[_0x3271[45]]= router
\ No newline at end of file
diff --git a/server/api/setting/setting.controller.js b/server/api/setting/setting.controller.js
index 84f5d17..6df5275 100644
--- a/server/api/setting/setting.controller.js
+++ b/server/api/setting/setting.controller.js
@@ -1,417 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Setting = require('../../models').Setting;
-var system = require('../../config/tools/system');
-var Agent = require('../../models').User;
-var VoiceMail = require('../../models').VoiceVoicemail;
-var MailAccount = require('../../models').MailAccount;
-var MailServerOut = require('../../models').MailServerOut;
-var Promise = require('bluebird');
-var UploadFile = require('upload-file');
-var path = require('path');
-var sequelize = require('../../models').sequelize;
-var config = require('../../config/environment');
-var sr = require('simple-random');
-var fs = require('fs');
-var util = require('util');
-
-// Get list of settings
-exports.index = function(req, res) {
-  return Setting
-    .findAll()
-    .then(function(settings) {
-      return res.status(200).send(settings);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.stats = function(req, res) {
-  return Promise
-    .all([])
-    .then(system.checkStatus())
-    .then(function(stats) {
-      return res.status(200).send(stats);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-}
-
-exports.asteriskCommand = function(req, res) {
-  req.app.locals.ami.send({
-    evt: 'console',
-    command: req.body.command.trim(),
-    socket: util.format('%s:%s', req.user.role, req.user.name)
-  });
-  return res.sendStatus(200);
-}
-
-exports.logs = function(req, res) {
-  var logs = {
-    output: '',
-    errors: ''
-  };
-  var readFile = Promise.promisify(fs.readFile);
-  var exists = Promise.promisify(fs.exists);
-  return readFile('/var/log/xcally/motion-err.log', 'utf8')
-    .then(function(errs) {
-      logs.errors = errs;
-    })
-    .catch(function(err) {
-      logs.errors = 'No error log file found!';
-    })
-    .then(function() {
-      return readFile('/var/log/xcally/motion-out.log', 'utf8');
-    })
-    .then(function(out) {
-      logs.output = out;
-    })
-    .catch(function(err) {
-      logs.output = 'No output log file found!';
-    })
-    .then(function(result) {
-      return res.status(200).send(logs);
-    })
-    .catch(function(err) {
-      console.log('logs error:', err.message);
-      return handleError(res, err);
-    });
-}
-
-exports.changeLogo = function(req, res) {
-  changeLogo(req, res, 'logo');
-}
-
-exports.changeLoginLogo = function(req, res) {
-  changeLogo(req, res, 'loginLogo');
-}
-
-function changeLogo(req, res, field) {
-
-  var upload = new UploadFile({
-    dest: path.join(config.root, 'server', 'files', 'images'),
-    maxNumberOfFiles: 1,
-    minNumberOfFiles: 0,
-    acceptFileTypes: /(\.|\/)(jpeg|png)$/i,
-    rename: function(name, file) {
-      return sr() + path.extname(file.filename);
-    },
-    messages: {
-      maxNumberOfFiles: "Max number of files upload exceeded",
-      acceptFileTypes: "Only jpeg and png format accepted",
-      invalidRequest: "Invalid request"
-    }
-  });
-
-  upload.on('end', function(fields, files) {
-    if (!files.file.filename) {
-      return res.status(500).send(upload);
-    }
-    return sequelize.transaction(function(t) {
-        return Setting
-          .findById(1)
-          .then(function(settings) {
-            if (!settings) {
-              return res.sendStatus(404);
-            }
-            var body = {};
-            body[field] = files.file.filename;
-            return settings
-              .update(body, {
-                transaction: t
-              });
-          })
-          .then(function(user) {
-            return res.status(200).send(user);
-          })
-      })
-      .catch(function(err) {
-        return handleError(res, err);
-      });
-  });
-
-  upload.on('error', function(err) {
-    console.log('********** Upload error :', err)
-    return handleError(res, err);
-  });
-
-  upload.parse(req);
-}
-
-
-exports.getLogo = function(req, res) {
-  getLogo(req, res, 'logo.png');
-}
-
-exports.getLoginLogo = function(req, res) {
-  getLogo(req, res, 'logo-big.png');
-}
-
-function getLogo(req, res, image) {
-  var imgPath = path.join(config.root, 'server', 'files', 'images', req.params.filename);
-
-  fs.exists(imgPath, function(exists) {
-    if (!exists) {
-      imgPath = path.join(config.root, 'server', 'files', 'images', 'default', image);
-    }
-
-    return res.sendFile(imgPath);
-  });
-}
-
-// Get internal
-exports.getInternal = function(req, res) {
-  var _settings;
-  return Setting
-    .findById(1)
-    .then(function(settings) {
-      _settings = settings;
-      return Agent
-        .findAll({
-          attributes: ['internal']
-        });
-    })
-    .then(function(internals) {
-      var _internals = _.map(internals, 'internal');
-      var _internal = {
-        value: 0,
-        range: 0 //maximum number of internals before an occupied one, 0 is unlimited
-      };
-      var nextUsed;
-      if (req.query.internal) {
-        _internal.value = Number(req.query.internal);
-        while (_.includes(_internals, _internal.value)) {
-          _internal.value++;
-        }
-        nextUsed = _.filter(_internals, function(elem) {
-          return elem > _internal.value;
-        }).shift();
-        _internal.range = nextUsed - _internal.value;
-      } else {
-        var maxInternal = _.max(_internals);
-        _internal.value = _settings.min_internal; //if the max internal is lower than my lower limit, i just set the limit as the internal
-        if (maxInternal && maxInternal >= _settings.min_internal) { //otherwise i get the first of the used internals and then I increment the value until I find an empty one
-          while (_.includes(_internals, _internal.value)) {
-            _internal.value++;
-          }
-          //then I find the next used internal and calculate the maximum number of free internals before a used one
-          nextUsed = _.filter(_internals, function(elem) {
-            return elem > _internal.value;
-          }).shift();
-          _internal.range = nextUsed - _internal.value;
-        }
-      }
-      return res.status(200).send(_internal);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get mailbox
-exports.getMailbox = function(req, res) {
-  var _settings;
-  return Setting
-    .findById(1)
-    .then(function(settings) {
-      _settings = settings;
-      return VoiceMail
-        .findAll({
-          attributes: ['mailbox']
-        });
-    })
-    .then(function(mailboxes) {
-      var _mailboxes = _.map(mailboxes, function(elem) {
-        return Number(elem.mailbox);
-      });
-      var _mailbox = {
-        value: 0,
-        range: 0 //maximum number of mailboxs before an occupied one, 0 is unlimited
-      };
-      var nextUsed;
-      var maxMailbox = _.max(_mailboxes);
-      _mailbox.value = _settings.min_mailbox; //if the max mailbox is lower than my lower limit, i just set the limit as the mailbox
-      if (maxMailbox && maxMailbox >= _settings.min_mailbox) { //otherwise i get the first of the used mailboxes and then I increment the value until I find an empty one
-        while (_.includes(_mailboxes, _mailbox.value)) {
-          _mailbox.value++;
-        }
-        //then I find the next used mailbox and calculate the maximum number of free mailboxes before a used one
-        nextUsed = _.filter(_mailboxes, function(elem) {
-          return elem > _mailbox.value;
-        }).shift();
-        _mailbox.range = nextUsed - _mailbox.value;
-      }
-
-      return res.status(200).send(_mailbox);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Get list of settings
-exports.getInfo = function(req, res) {
-
-  var info = require('../../../package.json');
-
-  return res.status(200).send({
-    name: info.name,
-    version: info.version,
-    engines: info.engines
-  });
-};
-
-// Get a single setting
-exports.show = function(req, res) {
-  return Setting
-    .findById(req.params.id)
-    .then(function(setting) {
-      if (!setting) {
-        return res.sendStatus(404);
-      }
-      return res.send(setting);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single mailAccount
-exports.showCustom = function(req, res, next) {
-  return MailAccount
-    .findOne({
-      where: {
-        custom: true
-      },
-      include: [{
-        model: MailServerOut,
-        attributes: ['id', 'host', 'port', 'username', 'password', 'ssl', 'state', 'source', 'description']
-      }]
-    })
-    .then(function(mailAccount) {
-      if (!mailAccount) {
-        return res.sendStatus(404);
-      }
-      return res.send(mailAccount);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new setting in the DB.
-exports.create = function(req, res) {
-  return Setting
-    .create(req.body)
-    .then(function(setting) {
-      return res.status(201).send(setting);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new mailAccount in the DB.
-exports.createSmtp = function(req, res, next) {
-  return MailAccount
-    .create(req.body, {
-      include: [{
-        model: MailServerOut
-      }]
-    }).then(function(mailAccount) {
-      return res.status(201).send(mailAccount);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new setting in the DB.
-exports.updateSmtp = function(req, res) {
-  var _mailAccount;
-
-  return MailAccount
-    .findById(req.params.id)
-    .then(function(mailAccount) {
-      _mailAccount = mailAccount;
-
-      return _mailAccount
-        .update({
-          name: req.body.name,
-          address: req.body.address,
-          service: req.body.service,
-          signature: req.body.signature,
-          ListId: req.body.ListId,
-          TemplateId: req.body.TemplateId
-        });
-    })
-    .then(function(mailAccount) {
-      if (req.body.MailServerOut) {
-        req.body.MailServerOut.state = 'CONNECTING';
-        req.body.MailServerOut.source = null;
-
-        return MailServerOut
-          .update(req.body.MailServerOut, {
-            where: {
-              id: req.body.MailServerOut.id
-            },
-            individualHooks: true
-          });
-      }
-    })
-    .then(function(smtp) {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing setting in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return Setting
-    .findById(req.params.id)
-    .then(function(setting) {
-      if (!setting) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(setting, req.body);
-      return updated.save();
-    })
-    .then(function(setting) {
-      return res.status(200).send(setting);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a setting from the DB.
-exports.destroy = function(req, res) {
-  return Setting
-    .findById(req.params.id)
-    .then(function(setting) {
-      if (!setting) {
-        return res.sendStatus(404);
-      }
-      return setting.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x9697=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x65\x74\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x6F\x6F\x6C\x73\x2F\x73\x79\x73\x74\x65\x6D","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x70\x61\x74\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x66\x73","\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x74\x61\x74\x73","\x6C\x6F\x67","\x63\x68\x65\x63\x6B\x53\x74\x61\x74\x75\x73","\x61\x6C\x6C","\x61\x73\x74\x65\x72\x69\x73\x6B\x43\x6F\x6D\x6D\x61\x6E\x64","\x63\x6F\x6E\x73\x6F\x6C\x65","\x74\x72\x69\x6D","\x63\x6F\x6D\x6D\x61\x6E\x64","\x62\x6F\x64\x79","\x25\x73\x3A\x25\x73","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\x61\x70\x70","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6C\x6F\x67\x73","","\x72\x65\x61\x64\x46\x69\x6C\x65","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x65\x78\x69\x73\x74\x73","\x6C\x6F\x67\x73\x20\x65\x72\x72\x6F\x72\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x6F\x75\x74\x70\x75\x74","\x4E\x6F\x20\x6F\x75\x74\x70\x75\x74\x20\x6C\x6F\x67\x20\x66\x69\x6C\x65\x20\x66\x6F\x75\x6E\x64\x21","\x2F\x76\x61\x72\x2F\x6C\x6F\x67\x2F\x78\x63\x61\x6C\x6C\x79\x2F\x6D\x6F\x74\x69\x6F\x6E\x2D\x6F\x75\x74\x2E\x6C\x6F\x67","\x75\x74\x66\x38","\x65\x72\x72\x6F\x72\x73","\x4E\x6F\x20\x65\x72\x72\x6F\x72\x20\x6C\x6F\x67\x20\x66\x69\x6C\x65\x20\x66\x6F\x75\x6E\x64\x21","\x2F\x76\x61\x72\x2F\x6C\x6F\x67\x2F\x78\x63\x61\x6C\x6C\x79\x2F\x6D\x6F\x74\x69\x6F\x6E\x2D\x65\x72\x72\x2E\x6C\x6F\x67","\x63\x68\x61\x6E\x67\x65\x4C\x6F\x67\x6F","\x6C\x6F\x67\x6F","\x63\x68\x61\x6E\x67\x65\x4C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x6C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x69\x6D\x61\x67\x65\x73","\x6A\x6F\x69\x6E","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x6A\x70\x65\x67\x20\x61\x6E\x64\x20\x70\x6E\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x6F\x6E","\x65\x72\x72\x6F\x72","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x55\x70\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72\x20\x3A","\x70\x61\x72\x73\x65","\x67\x65\x74\x4C\x6F\x67\x6F","\x6C\x6F\x67\x6F\x2E\x70\x6E\x67","\x67\x65\x74\x4C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x6C\x6F\x67\x6F\x2D\x62\x69\x67\x2E\x70\x6E\x67","\x70\x61\x72\x61\x6D\x73","\x64\x65\x66\x61\x75\x6C\x74","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x67\x65\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6D\x61\x70","\x71\x75\x65\x72\x79","\x76\x61\x6C\x75\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x73\x68\x69\x66\x74","\x66\x69\x6C\x74\x65\x72","\x72\x61\x6E\x67\x65","\x6D\x61\x78","\x6D\x69\x6E\x5F\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x4D\x61\x69\x6C\x62\x6F\x78","\x6D\x61\x69\x6C\x62\x6F\x78","\x6D\x69\x6E\x5F\x6D\x61\x69\x6C\x62\x6F\x78","\x67\x65\x74\x49\x6E\x66\x6F","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x70\x61\x63\x6B\x61\x67\x65\x2E\x6A\x73\x6F\x6E","\x76\x65\x72\x73\x69\x6F\x6E","\x65\x6E\x67\x69\x6E\x65\x73","\x73\x68\x6F\x77","\x69\x64","\x73\x68\x6F\x77\x43\x75\x73\x74\x6F\x6D","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x73\x6C","\x73\x74\x61\x74\x65","\x73\x6F\x75\x72\x63\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x53\x6D\x74\x70","\x75\x70\x64\x61\x74\x65\x53\x6D\x74\x70","\x43\x4F\x4E\x4E\x45\x43\x54\x49\x4E\x47","\x61\x64\x64\x72\x65\x73\x73","\x73\x65\x72\x76\x69\x63\x65","\x73\x69\x67\x6E\x61\x74\x75\x72\x65","\x4C\x69\x73\x74\x49\x64","\x54\x65\x6D\x70\x6C\x61\x74\x65\x49\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x9697[0];var _=require(_0x9697[1]);var Setting=require(_0x9697[3])[_0x9697[2]];var system=require(_0x9697[4]);var Agent=require(_0x9697[3])[_0x9697[5]];var VoiceMail=require(_0x9697[3])[_0x9697[6]];var MailAccount=require(_0x9697[3])[_0x9697[7]];var MailServerOut=require(_0x9697[3])[_0x9697[8]];var Promise=require(_0x9697[9]);var UploadFile=require(_0x9697[10]);var path=require(_0x9697[11]);var sequelize=require(_0x9697[3])[_0x9697[12]];var config=require(_0x9697[13]);var sr=require(_0x9697[14]);var fs=require(_0x9697[15]);var util=require(_0x9697[16]);exports[_0x9697[17]]= function(_0xa3cdx10,_0xa3cdx11){return Setting[_0x9697[22]]()[_0x9697[21]](function(_0xa3cdx13){return _0xa3cdx11[_0x9697[20]](200)[_0x9697[19]](_0xa3cdx13)})[_0x9697[18]](function(_0xa3cdx12){return handleError(_0xa3cdx11,_0xa3cdx12)})};exports[_0x9697[23]]= function(_0xa3cdx10,_0xa3cdx11){return Promise[_0x9697[26]]([])[_0x9697[21]](system[_0x9697[25]]())[_0x9697[21]](function(_0xa3cdx14){return _0xa3cdx11[_0x9697[20]](200)[_0x9697[19]](_0xa3cdx14)})[_0x9697[18]](function(_0xa3cdx12){console[_0x9697[24]](_0xa3cdx12);return handleError(_0xa3cdx11,_0xa3cdx12)})};exports[_0x9697[27]]= function(_0xa3cdx10,_0xa3cdx11){_0xa3cdx10[_0x9697[39]][_0x9697[38]][_0x9697[37]][_0x9697[19]]({evt:_0x9697[28],command:_0xa3cdx10[_0x9697[31]][_0x9697[30]][_0x9697[29]](),socket:util[_0x9697[36]](_0x9697[32],_0xa3cdx10[_0x9697[34]][_0x9697[33]],_0xa3cdx10[_0x9697[34]][_0x9697[35]])});return _0xa3cdx11[_0x9697[40]](200)};exports[_0x9697[41]]= function(_0xa3cdx10,_0xa3cdx11){var _0xa3cdx15={output:_0x9697[42],errors:_0x9697[42]};var _0xa3cdx16=Promise[_0x9697[44]](fs[_0x9697[43]]);var _0xa3cdx17=Promise[_0x9697[44]](fs[_0x9697[45]]);return _0xa3cdx16(_0x9697[54],_0x9697[51])[_0x9697[21]](function(_0xa3cdx1a){_0xa3cdx15[_0x9697[52]]= _0xa3cdx1a})[_0x9697[18]](function(_0xa3cdx12){_0xa3cdx15[_0x9697[52]]= _0x9697[53]})[_0x9697[21]](function(){return _0xa3cdx16(_0x9697[50],_0x9697[51])})[_0x9697[21]](function(_0xa3cdx19){_0xa3cdx15[_0x9697[48]]= _0xa3cdx19})[_0x9697[18]](function(_0xa3cdx12){_0xa3cdx15[_0x9697[48]]= _0x9697[49]})[_0x9697[21]](function(_0xa3cdx18){return _0xa3cdx11[_0x9697[20]](200)[_0x9697[19]](_0xa3cdx15)})[_0x9697[18]](function(_0xa3cdx12){console[_0x9697[24]](_0x9697[46],_0xa3cdx12[_0x9697[47]]);return handleError(_0xa3cdx11,_0xa3cdx12)})};exports[_0x9697[55]]= function(_0xa3cdx10,_0xa3cdx11){changeLogo(_0xa3cdx10,_0xa3cdx11,_0x9697[56])};exports[_0x9697[57]]= function(_0xa3cdx10,_0xa3cdx11){changeLogo(_0xa3cdx10,_0xa3cdx11,_0x9697[58])};function changeLogo(_0xa3cdx10,_0xa3cdx11,_0xa3cdx1c){var _0xa3cdx1d= new UploadFile({dest:path[_0x9697[63]](config[_0x9697[59]],_0x9697[60],_0x9697[61],_0x9697[62]),maxNumberOfFiles:1,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(jpeg|png)$/i,rename:function(_0xa3cdx1e,_0xa3cdx1f){return sr()+ path[_0x9697[65]](_0xa3cdx1f[_0x9697[64]])},messages:{maxNumberOfFiles:_0x9697[66],acceptFileTypes:_0x9697[67],invalidRequest:_0x9697[68]}});_0xa3cdx1d[_0x9697[74]](_0x9697[69],function(_0xa3cdx20,_0xa3cdx21){if(!_0xa3cdx21[_0x9697[70]][_0x9697[64]]){return _0xa3cdx11[_0x9697[20]](500)[_0x9697[19]](_0xa3cdx1d)};return sequelize[_0x9697[73]](function(_0xa3cdx22){return Setting[_0x9697[72]](1)[_0x9697[21]](function(_0xa3cdx13){if(!_0xa3cdx13){return _0xa3cdx11[_0x9697[40]](404)};var _0xa3cdx24={};_0xa3cdx24[_0xa3cdx1c]= _0xa3cdx21[_0x9697[70]][_0x9697[64]];return _0xa3cdx13[_0x9697[71]](_0xa3cdx24,{transaction:_0xa3cdx22})})[_0x9697[21]](function(_0xa3cdx23){return _0xa3cdx11[_0x9697[20]](200)[_0x9697[19]](_0xa3cdx23)})})[_0x9697[18]](function(_0xa3cdx12){return handleError(_0xa3cdx11,_0xa3cdx12)})});_0xa3cdx1d[_0x9697[74]](_0x9697[75],function(_0xa3cdx12){console[_0x9697[24]](_0x9697[76],_0xa3cdx12);return handleError(_0xa3cdx11,_0xa3cdx12)});_0xa3cdx1d[_0x9697[77]](_0xa3cdx10)}exports[_0x9697[78]]= function(_0xa3cdx10,_0xa3cdx11){getLogo(_0xa3cdx10,_0xa3cdx11,_0x9697[79])};exports[_0x9697[80]]= function(_0xa3cdx10,_0xa3cdx11){getLogo(_0xa3cdx10,_0xa3cdx11,_0x9697[81])};function getLogo(_0xa3cdx10,_0xa3cdx11,_0xa3cdx26){var _0xa3cdx27=path[_0x9697[63]](config[_0x9697[59]],_0x9697[60],_0x9697[61],_0x9697[62],_0xa3cdx10[_0x9697[82]][_0x9697[64]]);fs[_0x9697[45]](_0xa3cdx27,function(_0xa3cdx17){if(!_0xa3cdx17){_0xa3cdx27= path[_0x9697[63]](config[_0x9697[59]],_0x9697[60],_0x9697[61],_0x9697[62],_0x9697[83],_0xa3cdx26)};return _0xa3cdx11[_0x9697[84]](_0xa3cdx27)})}exports[_0x9697[85]]= function(_0xa3cdx10,_0xa3cdx11){var _0xa3cdx28;return Setting[_0x9697[72]](1)[_0x9697[21]](function(_0xa3cdx13){_0xa3cdx28= _0xa3cdx13;return Agent[_0x9697[22]]({attributes:[_0x9697[86]]})})[_0x9697[21]](function(_0xa3cdx29){var _0xa3cdx2a=_[_0x9697[87]](_0xa3cdx29,_0x9697[86]);var _0xa3cdx2b={value:0,range:0};var _0xa3cdx2c;if(_0xa3cdx10[_0x9697[88]][_0x9697[86]]){_0xa3cdx2b[_0x9697[89]]= Number(_0xa3cdx10[_0x9697[88]][_0x9697[86]]);while(_[_0x9697[90]](_0xa3cdx2a,_0xa3cdx2b[_0x9697[89]])){_0xa3cdx2b[_0x9697[89]]++};_0xa3cdx2c= _[_0x9697[92]](_0xa3cdx2a,function(_0xa3cdx2d){return _0xa3cdx2d> _0xa3cdx2b[_0x9697[89]]})[_0x9697[91]]();_0xa3cdx2b[_0x9697[93]]= _0xa3cdx2c- _0xa3cdx2b[_0x9697[89]]}else {var _0xa3cdx2e=_[_0x9697[94]](_0xa3cdx2a);_0xa3cdx2b[_0x9697[89]]= _0xa3cdx28[_0x9697[95]];if(_0xa3cdx2e&& _0xa3cdx2e>= _0xa3cdx28[_0x9697[95]]){while(_[_0x9697[90]](_0xa3cdx2a,_0xa3cdx2b[_0x9697[89]])){_0xa3cdx2b[_0x9697[89]]++};_0xa3cdx2c= _[_0x9697[92]](_0xa3cdx2a,function(_0xa3cdx2d){return _0xa3cdx2d> _0xa3cdx2b[_0x9697[89]]})[_0x9697[91]]();_0xa3cdx2b[_0x9697[93]]= _0xa3cdx2c- _0xa3cdx2b[_0x9697[89]]}};return _0xa3cdx11[_0x9697[20]](200)[_0x9697[19]](_0xa3cdx2b)})[_0x9697[18]](function(_0xa3cdx12){return handleError(_0xa3cdx11,_0xa3cdx12)})};exports[_0x9697[96]]= function(_0xa3cdx10,_0xa3cdx11){var _0xa3cdx28;return Setting[_0x9697[72]](1)[_0x9697[21]](function(_0xa3cdx13){_0xa3cdx28= _0xa3cdx13;return VoiceMail[_0x9697[22]]({attributes:[_0x9697[97]]})})[_0x9697[21]](function(_0xa3cdx2f){var _0xa3cdx30=_[_0x9697[87]](_0xa3cdx2f,function(_0xa3cdx2d){return Number(_0xa3cdx2d[_0x9697[97]])});var _0xa3cdx31={value:0,range:0};var _0xa3cdx2c;var _0xa3cdx32=_[_0x9697[94]](_0xa3cdx30);_0xa3cdx31[_0x9697[89]]= _0xa3cdx28[_0x9697[98]];if(_0xa3cdx32&& _0xa3cdx32>= _0xa3cdx28[_0x9697[98]]){while(_[_0x9697[90]](_0xa3cdx30,_0xa3cdx31[_0x9697[89]])){_0xa3cdx31[_0x9697[89]]++};_0xa3cdx2c= _[_0x9697[92]](_0xa3cdx30,function(_0xa3cdx2d){return _0xa3cdx2d> _0xa3cdx31[_0x9697[89]]})[_0x9697[91]]();_0xa3cdx31[_0x9697[93]]= _0xa3cdx2c- _0xa3cdx31[_0x9697[89]]};return _0xa3cdx11[_0x9697[20]](200)[_0x9697[19]](_0xa3cdx31)})[_0x9697[18]](function(_0xa3cdx12){console[_0x9697[24]](_0xa3cdx12);return handleError(_0xa3cdx11,_0xa3cdx12)})};exports[_0x9697[99]]= function(_0xa3cdx10,_0xa3cdx11){var _0xa3cdx33=require(_0x9697[100]);return _0xa3cdx11[_0x9697[20]](200)[_0x9697[19]]({name:_0xa3cdx33[_0x9697[35]],version:_0xa3cdx33[_0x9697[101]],engines:_0xa3cdx33[_0x9697[102]]})};exports[_0x9697[103]]= function(_0xa3cdx10,_0xa3cdx11){return Setting[_0x9697[72]](_0xa3cdx10[_0x9697[82]][_0x9697[104]])[_0x9697[21]](function(_0xa3cdx34){if(!_0xa3cdx34){return _0xa3cdx11[_0x9697[40]](404)};return _0xa3cdx11[_0x9697[19]](_0xa3cdx34)})[_0x9697[18]](function(_0xa3cdx12){return handleError(_0xa3cdx11,_0xa3cdx12)})};exports[_0x9697[105]]= function(_0xa3cdx10,_0xa3cdx11,_0xa3cdx35){return MailAccount[_0x9697[114]]({where:{custom:true},include:[{model:MailServerOut,attributes:[_0x9697[104],_0x9697[106],_0x9697[107],_0x9697[108],_0x9697[109],_0x9697[110],_0x9697[111],_0x9697[112],_0x9697[113]]}]})[_0x9697[21]](function(_0xa3cdx36){if(!_0xa3cdx36){return _0xa3cdx11[_0x9697[40]](404)};return _0xa3cdx11[_0x9697[19]](_0xa3cdx36)})[_0x9697[18]](function(_0xa3cdx12){return handleError(_0xa3cdx11,_0xa3cdx12)})};exports[_0x9697[115]]= function(_0xa3cdx10,_0xa3cdx11){return Setting[_0x9697[115]](_0xa3cdx10[_0x9697[31]])[_0x9697[21]](function(_0xa3cdx34){return _0xa3cdx11[_0x9697[20]](201)[_0x9697[19]](_0xa3cdx34)})[_0x9697[18]](function(_0xa3cdx12){return handleError(_0xa3cdx11,_0xa3cdx12)})};exports[_0x9697[116]]= function(_0xa3cdx10,_0xa3cdx11,_0xa3cdx35){return MailAccount[_0x9697[115]](_0xa3cdx10[_0x9697[31]],{include:[{model:MailServerOut}]})[_0x9697[21]](function(_0xa3cdx36){return _0xa3cdx11[_0x9697[20]](201)[_0x9697[19]](_0xa3cdx36)})[_0x9697[18]](function(_0xa3cdx12){return handleError(_0xa3cdx11,_0xa3cdx12)})};exports[_0x9697[117]]= function(_0xa3cdx10,_0xa3cdx11){var _0xa3cdx37;return MailAccount[_0x9697[72]](_0xa3cdx10[_0x9697[82]][_0x9697[104]])[_0x9697[21]](function(_0xa3cdx36){_0xa3cdx37= _0xa3cdx36;return _0xa3cdx37[_0x9697[71]]({name:_0xa3cdx10[_0x9697[31]][_0x9697[35]],address:_0xa3cdx10[_0x9697[31]][_0x9697[119]],service:_0xa3cdx10[_0x9697[31]][_0x9697[120]],signature:_0xa3cdx10[_0x9697[31]][_0x9697[121]],ListId:_0xa3cdx10[_0x9697[31]][_0x9697[122]],TemplateId:_0xa3cdx10[_0x9697[31]][_0x9697[123]]})})[_0x9697[21]](function(_0xa3cdx36){if(_0xa3cdx10[_0x9697[31]][_0x9697[8]]){_0xa3cdx10[_0x9697[31]][_0x9697[8]][_0x9697[111]]= _0x9697[118];_0xa3cdx10[_0x9697[31]][_0x9697[8]][_0x9697[112]]= null;return MailServerOut[_0x9697[71]](_0xa3cdx10[_0x9697[31]].MailServerOut,{where:{id:_0xa3cdx10[_0x9697[31]][_0x9697[8]][_0x9697[104]]},individualHooks:true})}})[_0x9697[21]](function(_0xa3cdx38){return _0xa3cdx11[_0x9697[40]](200)})[_0x9697[18]](function(_0xa3cdx12){return handleError(_0xa3cdx11,_0xa3cdx12)})};exports[_0x9697[71]]= function(_0xa3cdx10,_0xa3cdx11){if(_0xa3cdx10[_0x9697[31]][_0x9697[104]]){delete _0xa3cdx10[_0x9697[31]][_0x9697[104]]};return Setting[_0x9697[72]](_0xa3cdx10[_0x9697[82]][_0x9697[104]])[_0x9697[21]](function(_0xa3cdx34){if(!_0xa3cdx34){return _0xa3cdx11[_0x9697[40]](404)};var _0xa3cdx39=_[_0x9697[124]](_0xa3cdx34,_0xa3cdx10[_0x9697[31]]);return _0xa3cdx39[_0x9697[125]]()})[_0x9697[21]](function(_0xa3cdx34){return _0xa3cdx11[_0x9697[20]](200)[_0x9697[19]](_0xa3cdx34)})[_0x9697[18]](function(_0xa3cdx12){return handleError(_0xa3cdx11,_0xa3cdx12)})};exports[_0x9697[126]]= function(_0xa3cdx10,_0xa3cdx11){return Setting[_0x9697[72]](_0xa3cdx10[_0x9697[82]][_0x9697[104]])[_0x9697[21]](function(_0xa3cdx34){if(!_0xa3cdx34){return _0xa3cdx11[_0x9697[40]](404)};return _0xa3cdx34[_0x9697[126]]()})[_0x9697[21]](function(){return _0xa3cdx11[_0x9697[40]](204)})[_0x9697[18]](function(_0xa3cdx12){return handleError(_0xa3cdx11,_0xa3cdx12)})};function handleError(_0xa3cdx11,_0xa3cdx12){return _0xa3cdx11[_0x9697[20]](500)[_0x9697[19]](_0xa3cdx12)}
\ No newline at end of file
diff --git a/server/api/setting/setting.events.js b/server/api/setting/setting.events.js
index 1aa184d..06f11c9 100644
--- a/server/api/setting/setting.events.js
+++ b/server/api/setting/setting.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Setting = require('../../models').Setting;
-
-var SettingEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-SettingEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Setting.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    SettingEvents.emit(event + ':' + doc._id, doc);
-    SettingEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = SettingEvents;
+var _0xf6cc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x65\x74\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xf6cc[0];const EventEmitter=require(_0xf6cc[1]);const Setting=require(_0xf6cc[3])[_0xf6cc[2]];var SettingEvents= new EventEmitter();SettingEvents[_0xf6cc[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xf6cc[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xf6cc[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xf6cc[6]};for(var e in events){var event=events[e];Setting[_0xf6cc[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe63cx8,_0xe63cx9,_0xe63cxa){SettingEvents[_0xf6cc[10]](event+ _0xf6cc[8]+ _0xe63cx8[_0xf6cc[9]],_0xe63cx8);SettingEvents[_0xf6cc[10]](event,_0xe63cx8);_0xe63cxa(null)}}module[_0xf6cc[11]]= SettingEvents
\ No newline at end of file
diff --git a/server/api/setting/setting.socket.js b/server/api/setting/setting.socket.js
index 6b71535..9a300d3 100644
--- a/server/api/setting/setting.socket.js
+++ b/server/api/setting/setting.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const SettingEvents = require('./setting.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('setting:' + event, socket);
-
-    SettingEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    SettingEvents.removeListener(event, listener);
-  };
-}
+var _0x86a2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x65\x74\x74\x69\x6E\x67\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x65\x74\x74\x69\x6E\x67\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x86a2[0];const SettingEvents=require(_0x86a2[1]);var events=[_0x86a2[2],_0x86a2[3]];exports[_0x86a2[4]]= function(_0xd2ddx3){for(var _0xd2ddx4=0,_0xd2ddx5=events[_0x86a2[5]];_0xd2ddx4< _0xd2ddx5;_0xd2ddx4++){var _0xd2ddx6=events[_0xd2ddx4];var _0xd2ddx7=createListener(_0x86a2[6]+ _0xd2ddx6,_0xd2ddx3);SettingEvents[_0x86a2[7]](_0xd2ddx6,_0xd2ddx7);_0xd2ddx3[_0x86a2[7]](_0x86a2[8],removeListener(_0xd2ddx6,_0xd2ddx7))}};function createListener(_0xd2ddx6,_0xd2ddx3){return function(_0xd2ddx9){_0xd2ddx3[_0x86a2[9]](_0xd2ddx6,_0xd2ddx9)}}function removeListener(_0xd2ddx6,_0xd2ddx7){return function(){SettingEvents[_0x86a2[10]](_0xd2ddx6,_0xd2ddx7)}}
\ No newline at end of file
diff --git a/server/api/sms_account/index.js b/server/api/sms_account/index.js
index 6870a09..8bff6b3 100644
--- a/server/api/sms_account/index.js
+++ b/server/api/sms_account/index.js
@@ -1,31 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./sms_account.controller');
-var license = require('../../config/license/license.service');
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.index);
-router.get('/:id', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.show);
-router.get('/:id/applications', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.showApplications);
-router.get('/:id/check', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.checkAccount);
-router.get('/:id/rooms', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.getSmsRooms);
-router.get('/:id/dispositions', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.getDispositions);
-router.post('/', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.create);
-router.post('/:id/dispositions', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.createDisposition);
-router.post('/:id/applications', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.createApplication);
-router.post('/:id/send', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.sendMessage);
-router.post('/:id/receive', license.isValidDate(), license.hasSms(), controller.receiveMessage);
-router.post('/:id/message/:msgId/update', license.isValidDate(), license.hasSms(), controller.updateStatus);
-router.post('/:id/messageStatus', license.isValidDate(), license.hasSms(), controller.messageStatus);
-router.put('/:id', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.update);
-router.put('/:id/applications', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.updateApplications);
-router.put('/:id/applications/:appId', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.updateApplication);
-router.put('/:id/dispositions/:dispId', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.updateDisposition);
-router.delete('/:id', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.destroy);
-router.delete('/:id/applications', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.bulkDestroyApplications);
-router.delete('/:id/applications/:appId', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.destroyApplication);
-router.delete('/:id/dispositions/:dispId', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.destroyDisposition);
-
-module.exports = router;
+var _0xf8a0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x53\x6D\x73","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x3A\x69\x64\x2F\x72\x6F\x6F\x6D\x73","\x67\x65\x74\x53\x6D\x73\x52\x6F\x6F\x6D\x73","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x73\x65\x6E\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x72\x65\x63\x65\x69\x76\x65","\x72\x65\x63\x65\x69\x76\x65\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x2F\x3A\x6D\x73\x67\x49\x64\x2F\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x53\x74\x61\x74\x75\x73","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x53\x74\x61\x74\x75\x73","\x6D\x65\x73\x73\x61\x67\x65\x53\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x61\x70\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73\x2F\x3A\x64\x69\x73\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0xf8a0[0];var express=require(_0xf8a0[1]);var auth=require(_0xf8a0[2]);var controller=require(_0xf8a0[3]);var license=require(_0xf8a0[4]);var router=express.Router();router[_0xf8a0[13]](_0xf8a0[5],license[_0xf8a0[6]](),license[_0xf8a0[7]](),auth[_0xf8a0[8]](),auth[_0xf8a0[11]]([11],[_0xf8a0[9],_0xf8a0[10]]),controller[_0xf8a0[12]]);router[_0xf8a0[13]](_0xf8a0[14],license[_0xf8a0[6]](),license[_0xf8a0[7]](),auth[_0xf8a0[8]](),auth[_0xf8a0[11]]([11],[_0xf8a0[9]]),controller[_0xf8a0[15]]);router[_0xf8a0[13]](_0xf8a0[16],license[_0xf8a0[6]](),license[_0xf8a0[7]](),auth[_0xf8a0[8]](),auth[_0xf8a0[11]]([11],[_0xf8a0[9]]),controller[_0xf8a0[17]]);router[_0xf8a0[13]](_0xf8a0[18],license[_0xf8a0[6]](),license[_0xf8a0[7]](),auth[_0xf8a0[8]](),auth[_0xf8a0[11]]([11],[_0xf8a0[9]]),controller[_0xf8a0[19]]);router[_0xf8a0[13]](_0xf8a0[20],license[_0xf8a0[6]](),license[_0xf8a0[7]](),auth[_0xf8a0[8]](),auth[_0xf8a0[11]]([11],[_0xf8a0[9],_0xf8a0[10]]),controller[_0xf8a0[21]]);router[_0xf8a0[13]](_0xf8a0[22],license[_0xf8a0[6]](),license[_0xf8a0[7]](),auth[_0xf8a0[8]](),auth[_0xf8a0[11]]([11],[_0xf8a0[9],_0xf8a0[10]]),controller[_0xf8a0[23]]);router[_0xf8a0[25]](_0xf8a0[5],license[_0xf8a0[6]](),license[_0xf8a0[7]](),auth[_0xf8a0[8]](),auth[_0xf8a0[11]]([11],[_0xf8a0[9]]),controller[_0xf8a0[24]]);router[_0xf8a0[25]](_0xf8a0[22],license[_0xf8a0[6]](),license[_0xf8a0[7]](),auth[_0xf8a0[8]](),auth[_0xf8a0[11]]([11],[_0xf8a0[9]]),controller[_0xf8a0[26]]);router[_0xf8a0[25]](_0xf8a0[16],license[_0xf8a0[6]](),license[_0xf8a0[7]](),auth[_0xf8a0[8]](),auth[_0xf8a0[11]]([11],[_0xf8a0[9]]),controller[_0xf8a0[27]]);router[_0xf8a0[25]](_0xf8a0[28],license[_0xf8a0[6]](),license[_0xf8a0[7]](),auth[_0xf8a0[8]](),auth[_0xf8a0[11]]([11],[_0xf8a0[9],_0xf8a0[10]]),controller[_0xf8a0[29]]);router[_0xf8a0[25]](_0xf8a0[30],license[_0xf8a0[6]](),license[_0xf8a0[7]](),controller[_0xf8a0[31]]);router[_0xf8a0[25]](_0xf8a0[32],license[_0xf8a0[6]](),license[_0xf8a0[7]](),controller[_0xf8a0[33]]);router[_0xf8a0[25]](_0xf8a0[34],license[_0xf8a0[6]](),license[_0xf8a0[7]](),controller[_0xf8a0[35]]);router[_0xf8a0[37]](_0xf8a0[14],license[_0xf8a0[6]](),license[_0xf8a0[7]](),auth[_0xf8a0[8]](),auth[_0xf8a0[11]]([11],[_0xf8a0[9]]),controller[_0xf8a0[36]]);router[_0xf8a0[37]](_0xf8a0[16],license[_0xf8a0[6]](),license[_0xf8a0[7]](),auth[_0xf8a0[8]](),auth[_0xf8a0[11]]([11],[_0xf8a0[9]]),controller[_0xf8a0[38]]);router[_0xf8a0[37]](_0xf8a0[39],license[_0xf8a0[6]](),license[_0xf8a0[7]](),auth[_0xf8a0[8]](),auth[_0xf8a0[11]]([11],[_0xf8a0[9]]),controller[_0xf8a0[40]]);router[_0xf8a0[37]](_0xf8a0[41],license[_0xf8a0[6]](),license[_0xf8a0[7]](),auth[_0xf8a0[8]](),auth[_0xf8a0[11]]([11],[_0xf8a0[9]]),controller[_0xf8a0[42]]);router[_0xf8a0[44]](_0xf8a0[14],license[_0xf8a0[6]](),license[_0xf8a0[7]](),auth[_0xf8a0[8]](),auth[_0xf8a0[11]]([11],[_0xf8a0[9]]),controller[_0xf8a0[43]]);router[_0xf8a0[44]](_0xf8a0[16],license[_0xf8a0[6]](),license[_0xf8a0[7]](),auth[_0xf8a0[8]](),auth[_0xf8a0[11]]([11],[_0xf8a0[9]]),controller[_0xf8a0[45]]);router[_0xf8a0[44]](_0xf8a0[39],license[_0xf8a0[6]](),license[_0xf8a0[7]](),auth[_0xf8a0[8]](),auth[_0xf8a0[11]]([11],[_0xf8a0[9]]),controller[_0xf8a0[46]]);router[_0xf8a0[44]](_0xf8a0[41],license[_0xf8a0[6]](),license[_0xf8a0[7]](),auth[_0xf8a0[8]](),auth[_0xf8a0[11]]([11],[_0xf8a0[9]]),controller[_0xf8a0[47]]);module[_0xf8a0[48]]= router
\ No newline at end of file
diff --git a/server/api/sms_account/sms_account.controller.js b/server/api/sms_account/sms_account.controller.js
index 2c7be65..6fdccff 100644
--- a/server/api/sms_account/sms_account.controller.js
+++ b/server/api/sms_account/sms_account.controller.js
@@ -1,677 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/sms_accounts              ->  index
- * POST    /api/sms_accounts              ->  create
- * GET     /api/sms_accounts/:id          ->  show
- * PUT     /api/sms_accounts/:id          ->  update
- * DELETE  /api/sms_accounts/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-var skebby = require('../../config/sms/skebby');
-var sequelize = require('../../models').sequelize;
-var User = require('../../models').User;
-var SmsAccount = require('../../models').SmsAccount;
-var SmsQueue = require('../../models').SmsQueue;
-var SmsApplication = require('../../models').SmsApplication;
-var SmsMessage = require('../../models').SmsMessage;
-var SmsRoom = require('../../models').SmsRoom;
-var SmsDisposition = require('../../models').SmsDisposition;
-var Contact = require('../../models').Contact;
-var Interval = require('../../models').Interval;
-var Promise = require('bluebird');
-var moment = require('moment');
-
-
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-// Gets a list of SmsAccounts
-exports.index = function(req, res) {
-  return SmsAccount
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(sms_account) {
-      res.status(200).send(sms_account);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-}
-
-// Gets a single SmsAccount from the DB
-exports.show = function(req, res) {
-  return SmsAccount
-    .findById(req.params.id)
-    .then(function(smsAccount) {
-      if (!smsAccount) {
-        return res.sendStatus(404);
-      }
-      return res.send(smsAccount);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-exports.checkAccount = function(req, res) {
-  return SmsAccount
-    .findById(req.params.id)
-    .then(function(smsAccount) {
-      if (!smsAccount) {
-        return res.sendStatus(404);
-      }
-      switch (smsAccount.type) {
-        case 'twilio':
-          var client = require('twilio')(smsAccount.sid, smsAccount.token);
-          var getList = Promise.promisify(client.accounts.list);
-          return getList();
-        case 'skebby':
-          var _mMessage = {
-            from: 'Test',
-            to: 'Test',
-            body: 'Test'
-          };
-          smsAccount.smstype = 'test';
-          return skebby.sendMessage(_mMessage, smsAccount);
-        default:
-          throw new Error('There is no authentication for this account');
-
-      }
-    })
-    .then(function(response) {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-exports.getDispositions = function(req, res, next) {
-  return SmsAccount
-    .findById(req.params.id)
-    .then(function(smsAccount) {
-      if (!smsAccount) {
-        return res.sendStatus(404);
-      }
-
-      return smsAccount
-        .getSmsDispositions();
-    })
-    .then(function(smsDispositions) {
-      return res.status(200).send({
-        rows: smsDispositions,
-        count: smsDispositions.length
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Get Applications
-exports.showApplications = function(req, res, next) {
-  return SmsAccount
-    .scope('default')
-    .findById(req.params.id)
-    .then(function(smsAccount) {
-      if (!smsAccount) {
-        return res.sendStatus(404);
-      }
-      return smsAccount
-        .getSmsApplications(_.merge(Util.getQuery(req.query), {
-          include: [{
-            model: SmsQueue,
-            attributes: ['id', 'name']
-          }, {
-            model: User,
-            attributes: ['id', 'name', 'online']
-          }, {
-            model: Interval,
-            attributes: ['id', 'name']
-          }],
-          order: 'priority ASC'
-        }));
-    })
-    .then(function(smsApplications) {
-      return res.send({
-        count: smsApplications.length,
-        rows: smsApplications
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Creates a new SmsAccount in the DB
-exports.create = function(req, res) {
-  return SmsAccount
-    .create(req.body)
-    .then(function(smsAccount) {
-      console.log(smsAccount);
-      return res.status(201).send(smsAccount);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-}
-
-exports.createDisposition = function(req, res, next) {
-  req.body.SmsAccountId = req.params.id;
-
-  return SmsDisposition
-    .create(req.body)
-    .then(function(smsDiposition) {
-      return res.status(201).send(smsDiposition);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a send Message in the DB.
-exports.sendMessage = function(req, res, next) {
-  req.body.SmsAccountId = req.params.id;
-  req.body.UserId = req.user.id;
-
-  return SmsMessage
-    .create(req.body, {
-      user: req.user
-    })
-    .then(function(sms_message) {
-      return res.status(201).send(sms_message);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Creates a receive Message in the DB.
-function getMessage(message) {
-  var _message;
-  console.log(message);
-  switch (message.accountType) {
-    case 'twilio':
-      if (message.From && message.To && message.Body) {
-        _message = {
-          from: message.From,
-          to: message.To,
-          body: message.Body
-        };
-      }
-      break;
-    case 'skebby':
-      if ((message.sender && message.receiver && message.text)) {
-        _message = {
-          from: message.sender,
-          to: message.receiver,
-          body: message.text
-        };
-      }
-      break;
-    default:
-  }
-  return _message;
-}
-
-exports.receiveMessage = function(req, res, next) {
-  var _message;
-  var _account;
-
-  return SmsAccount
-    .findById(req.params.id)
-    .then(function(smsAccount) {
-      if (!smsAccount) {
-        throw new Error('SMS account not found');
-      }
-      _account = smsAccount;
-      req.body.accountType = _account.type;
-
-      _message = getMessage(req.body);
-      if (!_message) {
-        throw new Error('SMS message format is not known');
-      }
-      // console.log(_message);
-      if (_account.ListId) {
-        return Contact
-          .findOrCreate({
-            where: {
-              ListId: _account.ListId,
-              mobile: _message.from
-            },
-            defaults: {
-              ListId: _account.ListId,
-              mobile: _message.from
-            }
-          });
-      } else {
-        return [];
-      }
-
-    })
-    .then(function(contact) {
-      return SmsRoom
-        .findAll({
-          limit: 1,
-          where: {
-            contact: _message.from,
-            SmsAccountId: _account.id
-          },
-          order: [
-            ['createdAt', 'DESC']
-          ]
-        })
-    })
-    .then(function(smsroom) {
-      var room = smsroom[0];
-      if (!room || room.status === 'CLOSED') {
-        var parentID = room ? room.id : null;
-        return SmsRoom
-          .create({
-            contact: _message.from,
-            SmsAccountId: _account.id,
-            status: 'NEW',
-            ParentId: parentID,
-            lastEvent: 'RECEIVED',
-            lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'),
-            smsIn: 1
-          })
-      } else {
-        return room
-          .updateAttributes({
-            status: 'OPEN',
-            openReason: 'system',
-            lastEvent: 'RECEIVED',
-            lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'),
-            smsIn: ++room.smsIn
-          });
-      }
-    })
-    .then(function(room) {
-      // console.log(room);
-      _message.SmsAccountId = _account.id;
-      _message.SmsRoomId = room.id;
-      _message.status = 'RECEIVED';
-
-      return SmsMessage
-        .create(_message)
-    })
-    .then(function(smsMessage) {
-      return res.status(201).send(smsMessage);
-    })
-    .catch(function(err) {
-      console.error(err);
-      return handleError(res, err);
-    });
-};
-// Updates an existing SmsAccount in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return SmsAccount.findById(req.params.id)
-    .then(function(smsAccount) {
-      if (!smsAccount) {
-        return res.sendStatus(404);
-      }
-
-      var updated = _.merge(smsAccount, req.body);
-      return updated
-        .save();
-    })
-    .then(function(smsAccount) {
-      return res.status(200).send(smsAccount);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(function(err) {
-      console.log('   err', err);
-      return handleError(res, err);
-    });
-
-}
-
-exports.updateDisposition = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return SmsDisposition
-    .findById(req.params.dispId)
-    .then(function(smsDisposition) {
-      if (!smsDisposition) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(smsDisposition, req.body);
-      return updated
-        .save();
-    })
-    .then(function(mailAccount) {
-      return res.status(200).send(mailAccount);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Updates message status in the DB for TWILIO account
-exports.updateStatus = function(req, res) {
-
-  return SmsMessage
-    .findById(req.params.msgId)
-    .then(function(smsMessage) {
-      if (!smsMessage) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(smsMessage, {
-        status: _.toUpper(req.body.MessageStatus),
-        errorcode: req.body.ErrorCode
-      });
-      return updated
-        .save();
-    })
-    .then(function(smsMessage) {
-      return res.status(200).send(smsMessage);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-}
-
-exports.messageStatus = function(req, res) {
-
-    return SmsMessage
-      .findOne({
-        where: {
-          skebby_message_id: req.body.skebby_dispatch_id
-        }
-      })
-      .then(function(smsMessage) {
-        if (!smsMessage) {
-          return res.sendStatus(404);
-        }
-        var updated = _.merge(smsMessage, {
-          status: req.body.status,
-          errorcode: req.body.error_code
-        });
-        return updated
-          .save();
-      })
-      .then(function(smsMessage) {
-        return res.status(200).send(smsMessage);
-      })
-      .catch(function(err) {
-        return handleError(res, err);
-      });
-
-  }
-  // Updates aapplications
-exports.updateApplications = function(req, res) {
-
-  var priority = 0;
-  var apps = req.body;
-
-  apps.forEach(function(app) {
-    delete app.id;
-    delete app.createdAt;
-    delete app.updatedAt;
-
-    app.priority = ++priority;
-  });
-
-  return sequelize.transaction(function(t) {
-    return SmsApplication
-      .destroy({
-        where: {
-          SmsAccountId: req.params.id
-        },
-        individualHooks: true,
-        transaction: t
-      }).then(function(smsApplication) {
-        return SmsApplication
-          .bulkCreate(apps, {
-            individualHooks: true,
-            transaction: t
-          });
-      });
-  }).then(function(smsAccounts) {
-    return res.status(200).send({
-      count: smsAccounts.length,
-      rows: smsAccounts
-    });
-  }).catch(function(err) {
-    return handleError(res, err);
-  });
-};
-// Deletes a SmsAccount from the DB
-exports.destroy = function(req, res) {
-  return SmsAccount.findById(req.params.id)
-    .then(function(smsAccount) {
-      if (!smsAccount) {
-        return res.sendStatus(404);
-      }
-
-      return smsAccount
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-exports.destroyApplication = function(req, res, next) {
-  return SmsApplication
-    .findById(req.params.appId)
-    .then(function(smsApplication) {
-      if (!smsApplication) {
-        return res.sendStatus(404);
-      }
-
-      return smsApplication
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.destroyDisposition = function(req, res, next) {
-  return SmsDisposition
-    .findById(req.params.dispId)
-    .then(function(smsDiposition) {
-      if (!smsDiposition) {
-        return res.sendStatus(404);
-      }
-      return smsDiposition
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.bulkDestroyApplications = function(req, res) {
-  return SmsApplication
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-
-exports.getSmsRooms = function(req, res, next) {
-  var _query = {
-    where: {
-      SmsAccountId: req.params.id,
-      $and: []
-    },
-    attributes: ['id', 'contact', 'updatedAt', 'tags', 'disposition', 'voiceSource', 'lastEvent'],
-    include: []
-  };
-
-  // TO MOVE SOON INTO AN EXTENAL UTIL FILE
-  if (req.query) {
-    if (req.query.tags) {
-      if (_.isArray(req.query.tags)) {
-        for (var i = 0; i < req.query.tags.length; i++) {
-          _query.where.$and.push({
-            tags: {
-              $like: '%' + req.query.tags[i] + '%'
-            }
-          });
-        }
-      } else {
-        _query.where.$and.push({
-          tags: {
-            $like: '%' + req.query.tags + '%'
-          }
-        });
-      }
-
-      delete req.query.tags;
-    }
-
-    _.merge(_query.where, req.query);
-  }
-
-  switch (req.user.role) {
-    case 'agent':
-      _query.include.push({
-        model: User,
-        attributes: ['id']
-      });
-      var _agents;
-      var _agentQueues;
-      var _accountQueues;
-
-      return User
-        .findById(req.user.id)
-        .then(function(user) {
-          if (user) {
-            return user
-              .getSmsQueues();
-          } else {
-            return [];
-          }
-        })
-        .then(function(queues) {
-          _agentQueues = _.map(queues, 'id');
-          return SmsAccount
-            .findById(req.params.id);
-        })
-        .then(function(account) {
-          return account
-            .getSmsApplications({
-              where: {
-                $or: [{
-                  app: 'queue'
-                }, {
-                  app: 'agent'
-                }]
-              }
-            });
-        })
-        .then(function(apps) {
-          _agents = _.map(_.find(apps, {
-            'app': 'agent'
-          }), 'UserId');
-          _accountQueues = _.map(_.find(apps, {
-            'app': 'queue'
-          }), 'SmsQueueId');
-          // _accountQueues = _.map(queues, 'SmsQueueId');
-          if (_.intersection(_agentQueues, _accountQueues).length || _.intersection(_agents, [req.user.id]).length) {
-            return SmsRoom
-              .findAll(_query)
-              .then(function(smsRooms) {
-                return res.status(200).send(smsRooms);
-              })
-              .catch(function(err) {
-                console.error(err);
-                return handleError(res, err);
-              });
-          } else {
-            return res.status(200).send([]);
-          }
-        })
-        .catch(function(err) {
-          console.error(err);
-        });
-
-    default:
-
-      return SmsRoom
-        .findAll(_query)
-        .then(function(smsRooms) {
-          return res.status(200).send(smsRooms);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-  }
-};
-
-exports.createApplication = function(req, res, next) {
-
-  return SmsApplication
-    .max('priority', {
-      where: {
-        SmsAccountId: req.params.id
-      }
-    }).then(function(max) {
-      // SET PRIORITY
-      req.body.priority = max ? ++max : 1;
-      req.body.SmsAccountId = req.params.id;
-
-      return SmsApplication.create(req.body);
-    })
-    .then(function(smsApplication) {
-      return res.status(201).send(smsApplication);
-    })
-    .catch(function(err) {
-      console.log('err', err);
-      return handleError(res, err);
-    });
-};
-
-exports.updateApplication = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return SmsApplication.findById(req.params.appId)
-    .then(function(smsApplication) {
-      if (!smsApplication) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(smsApplication, req.body);
-      return updated.save();
-    })
-    .then(function(smsApplication) {
-      return res.status(200).send(smsApplication);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
+var _0x3707=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x6D\x73\x2F\x73\x6B\x65\x62\x62\x79","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x53\x6D\x73\x51\x75\x65\x75\x65","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x53\x6D\x73\x52\x6F\x6F\x6D","\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x73\x69\x64","\x74\x6F\x6B\x65\x6E","\x74\x77\x69\x6C\x69\x6F","\x6C\x69\x73\x74","\x61\x63\x63\x6F\x75\x6E\x74\x73","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x54\x65\x73\x74","\x73\x6D\x73\x74\x79\x70\x65","\x74\x65\x73\x74","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x73\x6B\x65\x62\x62\x79","\x54\x68\x65\x72\x65\x20\x69\x73\x20\x6E\x6F\x20\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x74\x68\x69\x73\x20\x61\x63\x63\x6F\x75\x6E\x74","\x74\x79\x70\x65","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x6D\x65\x72\x67\x65","\x67\x65\x74\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x6C\x6F\x67","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x55\x73\x65\x72\x49\x64","\x75\x73\x65\x72","\x46\x72\x6F\x6D","\x54\x6F","\x42\x6F\x64\x79","\x73\x65\x6E\x64\x65\x72","\x72\x65\x63\x65\x69\x76\x65\x72","\x74\x65\x78\x74","\x61\x63\x63\x6F\x75\x6E\x74\x54\x79\x70\x65","\x72\x65\x63\x65\x69\x76\x65\x4D\x65\x73\x73\x61\x67\x65","\x65\x72\x72\x6F\x72","\x53\x6D\x73\x52\x6F\x6F\x6D\x49\x64","\x52\x45\x43\x45\x49\x56\x45\x44","\x43\x4C\x4F\x53\x45\x44","\x66\x72\x6F\x6D","\x4E\x45\x57","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x4F\x50\x45\x4E","\x73\x79\x73\x74\x65\x6D","\x73\x6D\x73\x49\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x66\x69\x6E\x64\x41\x6C\x6C","\x53\x4D\x53\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x53\x4D\x53\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x66\x6F\x72\x6D\x61\x74\x20\x69\x73\x20\x6E\x6F\x74\x20\x6B\x6E\x6F\x77\x6E","\x4C\x69\x73\x74\x49\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x20\x20\x20\x65\x72\x72","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x69\x73\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x53\x74\x61\x74\x75\x73","\x74\x6F\x55\x70\x70\x65\x72","\x45\x72\x72\x6F\x72\x43\x6F\x64\x65","\x6D\x73\x67\x49\x64","\x6D\x65\x73\x73\x61\x67\x65\x53\x74\x61\x74\x75\x73","\x65\x72\x72\x6F\x72\x5F\x63\x6F\x64\x65","\x73\x6B\x65\x62\x62\x79\x5F\x64\x69\x73\x70\x61\x74\x63\x68\x5F\x69\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x70\x70\x49\x64","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x64\x73","\x67\x65\x74\x53\x6D\x73\x52\x6F\x6F\x6D\x73","\x63\x6F\x6E\x74\x61\x63\x74","\x74\x61\x67\x73","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x76\x6F\x69\x63\x65\x53\x6F\x75\x72\x63\x65","\x6C\x61\x73\x74\x45\x76\x65\x6E\x74","\x69\x73\x41\x72\x72\x61\x79","\x25","\x70\x75\x73\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x69\x6E\x63\x6C\x75\x64\x65","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64","\x6D\x61\x70","\x71\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65\x49\x64","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x72\x6F\x6C\x65","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x65\x72\x72","\x6D\x61\x78","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E"];_0x3707[0];var _=require(_0x3707[1]);var Util=require(_0x3707[2]);var skebby=require(_0x3707[3]);var sequelize=require(_0x3707[5])[_0x3707[4]];var User=require(_0x3707[5])[_0x3707[6]];var SmsAccount=require(_0x3707[5])[_0x3707[7]];var SmsQueue=require(_0x3707[5])[_0x3707[8]];var SmsApplication=require(_0x3707[5])[_0x3707[9]];var SmsMessage=require(_0x3707[5])[_0x3707[10]];var SmsRoom=require(_0x3707[5])[_0x3707[11]];var SmsDisposition=require(_0x3707[5])[_0x3707[12]];var Contact=require(_0x3707[5])[_0x3707[13]];var Interval=require(_0x3707[5])[_0x3707[14]];var Promise=require(_0x3707[15]);var moment=require(_0x3707[16]);function handleError(_0x360ex11,_0x360ex12){return _0x360ex11[_0x3707[18]](500)[_0x3707[17]](_0x360ex12)}exports[_0x3707[19]]= function(_0x360ex13,_0x360ex11){return SmsAccount[_0x3707[24]](Util[_0x3707[23]](_0x360ex13[_0x3707[22]]))[_0x3707[21]](function(_0x360ex14){_0x360ex11[_0x3707[18]](200)[_0x3707[17]](_0x360ex14)})[_0x3707[20]](function(_0x360ex12){return handleError(_0x360ex11,_0x360ex12)})};exports[_0x3707[25]]= function(_0x360ex13,_0x360ex11){return SmsAccount[_0x3707[29]](_0x360ex13[_0x3707[28]][_0x3707[27]])[_0x3707[21]](function(_0x360ex15){if(!_0x360ex15){return _0x360ex11[_0x3707[26]](404)};return _0x360ex11[_0x3707[17]](_0x360ex15)})[_0x3707[20]](function(_0x360ex12){return handleError(_0x360ex11,_0x360ex12)})};exports[_0x3707[30]]= function(_0x360ex13,_0x360ex11){return SmsAccount[_0x3707[29]](_0x360ex13[_0x3707[28]][_0x3707[27]])[_0x3707[21]](function(_0x360ex15){if(!_0x360ex15){return _0x360ex11[_0x3707[26]](404)};switch(_0x360ex15[_0x3707[43]]){case _0x3707[33]:var _0x360ex17=require(_0x3707[33])(_0x360ex15[_0x3707[31]],_0x360ex15[_0x3707[32]]);var _0x360ex18=Promise[_0x3707[36]](_0x360ex17[_0x3707[35]][_0x3707[34]]);return _0x360ex18();case _0x3707[41]:var _0x360ex19={from:_0x3707[37],to:_0x3707[37],body:_0x3707[37]};_0x360ex15[_0x3707[38]]= _0x3707[39];return skebby[_0x3707[40]](_0x360ex19,_0x360ex15);default:throw  new Error(_0x3707[42])}})[_0x3707[21]](function(_0x360ex16){return _0x360ex11[_0x3707[26]](200)})[_0x3707[20]](function(_0x360ex12){return handleError(_0x360ex11,_0x360ex12)})};exports[_0x3707[44]]= function(_0x360ex13,_0x360ex11,_0x360ex1a){return SmsAccount[_0x3707[29]](_0x360ex13[_0x3707[28]][_0x3707[27]])[_0x3707[21]](function(_0x360ex15){if(!_0x360ex15){return _0x360ex11[_0x3707[26]](404)};return _0x360ex15[_0x3707[46]]()})[_0x3707[21]](function(_0x360ex1b){return _0x360ex11[_0x3707[18]](200)[_0x3707[17]]({rows:_0x360ex1b,count:_0x360ex1b[_0x3707[45]]})})[_0x3707[20]](function(_0x360ex12){return handleError(_0x360ex11,_0x360ex12)})};exports[_0x3707[47]]= function(_0x360ex13,_0x360ex11,_0x360ex1a){return SmsAccount[_0x3707[54]](_0x3707[53])[_0x3707[29]](_0x360ex13[_0x3707[28]][_0x3707[27]])[_0x3707[21]](function(_0x360ex15){if(!_0x360ex15){return _0x360ex11[_0x3707[26]](404)};return _0x360ex15[_0x3707[52]](_[_0x3707[51]](Util[_0x3707[23]](_0x360ex13[_0x3707[22]]),{include:[{model:SmsQueue,attributes:[_0x3707[27],_0x3707[48]]},{model:User,attributes:[_0x3707[27],_0x3707[48],_0x3707[49]]},{model:Interval,attributes:[_0x3707[27],_0x3707[48]]}],order:_0x3707[50]}))})[_0x3707[21]](function(_0x360ex1c){return _0x360ex11[_0x3707[17]]({count:_0x360ex1c[_0x3707[45]],rows:_0x360ex1c})})[_0x3707[20]](function(_0x360ex12){return handleError(_0x360ex11,_0x360ex12)})};exports[_0x3707[55]]= function(_0x360ex13,_0x360ex11){return SmsAccount[_0x3707[55]](_0x360ex13[_0x3707[59]])[_0x3707[21]](function(_0x360ex15){console[_0x3707[58]](_0x360ex15);return _0x360ex11[_0x3707[18]](201)[_0x3707[17]](_0x360ex15)})[_0x3707[20]](sequelize.UniqueConstraintError,function(_0x360ex12){return Util[_0x3707[57]][_0x3707[56]](_0x360ex11,_0x360ex12)})[_0x3707[20]](function(_0x360ex12){return handleError(_0x360ex11,_0x360ex12)})};exports[_0x3707[60]]= function(_0x360ex13,_0x360ex11,_0x360ex1a){_0x360ex13[_0x3707[59]][_0x3707[61]]= _0x360ex13[_0x3707[28]][_0x3707[27]];return SmsDisposition[_0x3707[55]](_0x360ex13[_0x3707[59]])[_0x3707[21]](function(_0x360ex1d){return _0x360ex11[_0x3707[18]](201)[_0x3707[17]](_0x360ex1d)})[_0x3707[20]](function(_0x360ex12){return handleError(_0x360ex11,_0x360ex12)})};exports[_0x3707[40]]= function(_0x360ex13,_0x360ex11,_0x360ex1a){_0x360ex13[_0x3707[59]][_0x3707[61]]= _0x360ex13[_0x3707[28]][_0x3707[27]];_0x360ex13[_0x3707[59]][_0x3707[62]]= _0x360ex13[_0x3707[63]][_0x3707[27]];return SmsMessage[_0x3707[55]](_0x360ex13[_0x3707[59]],{user:_0x360ex13[_0x3707[63]]})[_0x3707[21]](function(_0x360ex1e){return _0x360ex11[_0x3707[18]](201)[_0x3707[17]](_0x360ex1e)})[_0x3707[20]](function(_0x360ex12){return handleError(_0x360ex11,_0x360ex12)})};function getMessage(_0x360ex20){var _0x360ex21;console[_0x3707[58]](_0x360ex20);switch(_0x360ex20[_0x3707[70]]){case _0x3707[33]:if(_0x360ex20[_0x3707[64]]&& _0x360ex20[_0x3707[65]]&& _0x360ex20[_0x3707[66]]){_0x360ex21= {from:_0x360ex20[_0x3707[64]],to:_0x360ex20[_0x3707[65]],body:_0x360ex20[_0x3707[66]]}};break;case _0x3707[41]:if((_0x360ex20[_0x3707[67]]&& _0x360ex20[_0x3707[68]]&& _0x360ex20[_0x3707[69]])){_0x360ex21= {from:_0x360ex20[_0x3707[67]],to:_0x360ex20[_0x3707[68]],body:_0x360ex20[_0x3707[69]]}};break;default:};return _0x360ex21}exports[_0x3707[71]]= function(_0x360ex13,_0x360ex11,_0x360ex1a){var _0x360ex21;var _0x360ex22;return SmsAccount[_0x3707[29]](_0x360ex13[_0x3707[28]][_0x3707[27]])[_0x3707[21]](function(_0x360ex15){if(!_0x360ex15){throw  new Error(_0x3707[87])};_0x360ex22= _0x360ex15;_0x360ex13[_0x3707[59]][_0x3707[70]]= _0x360ex22[_0x3707[43]];_0x360ex21= getMessage(_0x360ex13[_0x3707[59]]);if(!_0x360ex21){throw  new Error(_0x3707[88])};if(_0x360ex22[_0x3707[89]]){return Contact[_0x3707[90]]({where:{ListId:_0x360ex22[_0x3707[89]],mobile:_0x360ex21[_0x3707[76]]},defaults:{ListId:_0x360ex22[_0x3707[89]],mobile:_0x360ex21[_0x3707[76]]}})}else {return []}})[_0x3707[21]](function(_0x360ex27){return SmsRoom[_0x3707[86]]({limit:1,where:{contact:_0x360ex21[_0x3707[76]],SmsAccountId:_0x360ex22[_0x3707[27]]},order:[[_0x3707[84],_0x3707[85]]]})})[_0x3707[21]](function(_0x360ex25){var _0x360ex24=_0x360ex25[0];if(!_0x360ex24|| _0x360ex24[_0x3707[18]]=== _0x3707[75]){var _0x360ex26=_0x360ex24?_0x360ex24[_0x3707[27]]:null;return SmsRoom[_0x3707[55]]({contact:_0x360ex21[_0x3707[76]],SmsAccountId:_0x360ex22[_0x3707[27]],status:_0x3707[77],ParentId:_0x360ex26,lastEvent:_0x3707[74],lastEventAt:moment()[_0x3707[79]](_0x3707[78]),smsIn:1})}else {return _0x360ex24[_0x3707[83]]({status:_0x3707[80],openReason:_0x3707[81],lastEvent:_0x3707[74],lastEventAt:moment()[_0x3707[79]](_0x3707[78]),smsIn:++_0x360ex24[_0x3707[82]]})}})[_0x3707[21]](function(_0x360ex24){_0x360ex21[_0x3707[61]]= _0x360ex22[_0x3707[27]];_0x360ex21[_0x3707[73]]= _0x360ex24[_0x3707[27]];_0x360ex21[_0x3707[18]]= _0x3707[74];return SmsMessage[_0x3707[55]](_0x360ex21)})[_0x3707[21]](function(_0x360ex23){return _0x360ex11[_0x3707[18]](201)[_0x3707[17]](_0x360ex23)})[_0x3707[20]](function(_0x360ex12){console[_0x3707[72]](_0x360ex12);return handleError(_0x360ex11,_0x360ex12)})};exports[_0x3707[91]]= function(_0x360ex13,_0x360ex11){if(_0x360ex13[_0x3707[59]][_0x3707[27]]){delete _0x360ex13[_0x3707[59]][_0x3707[27]]};return SmsAccount[_0x3707[29]](_0x360ex13[_0x3707[28]][_0x3707[27]])[_0x3707[21]](function(_0x360ex15){if(!_0x360ex15){return _0x360ex11[_0x3707[26]](404)};var _0x360ex28=_[_0x3707[51]](_0x360ex15,_0x360ex13[_0x3707[59]]);return _0x360ex28[_0x3707[93]]()})[_0x3707[21]](function(_0x360ex15){return _0x360ex11[_0x3707[18]](200)[_0x3707[17]](_0x360ex15)})[_0x3707[20]](sequelize.UniqueConstraintError,function(_0x360ex12){return Util[_0x3707[57]][_0x3707[56]](_0x360ex11,_0x360ex12)})[_0x3707[20]](function(_0x360ex12){console[_0x3707[58]](_0x3707[92],_0x360ex12);return handleError(_0x360ex11,_0x360ex12)})};exports[_0x3707[94]]= function(_0x360ex13,_0x360ex11){if(_0x360ex13[_0x3707[59]][_0x3707[27]]){delete _0x360ex13[_0x3707[59]][_0x3707[27]]};return SmsDisposition[_0x3707[29]](_0x360ex13[_0x3707[28]][_0x3707[95]])[_0x3707[21]](function(_0x360ex2a){if(!_0x360ex2a){return _0x360ex11[_0x3707[26]](404)};var _0x360ex28=_[_0x3707[51]](_0x360ex2a,_0x360ex13[_0x3707[59]]);return _0x360ex28[_0x3707[93]]()})[_0x3707[21]](function(_0x360ex29){return _0x360ex11[_0x3707[18]](200)[_0x3707[17]](_0x360ex29)})[_0x3707[20]](function(_0x360ex12){return handleError(_0x360ex11,_0x360ex12)})};exports[_0x3707[96]]= function(_0x360ex13,_0x360ex11){return SmsMessage[_0x3707[29]](_0x360ex13[_0x3707[28]][_0x3707[99]])[_0x3707[21]](function(_0x360ex23){if(!_0x360ex23){return _0x360ex11[_0x3707[26]](404)};var _0x360ex28=_[_0x3707[51]](_0x360ex23,{status:_[_0x3707[97]](_0x360ex13[_0x3707[59]].MessageStatus),errorcode:_0x360ex13[_0x3707[59]][_0x3707[98]]});return _0x360ex28[_0x3707[93]]()})[_0x3707[21]](function(_0x360ex23){return _0x360ex11[_0x3707[18]](200)[_0x3707[17]](_0x360ex23)})[_0x3707[20]](function(_0x360ex12){return handleError(_0x360ex11,_0x360ex12)})};exports[_0x3707[100]]= function(_0x360ex13,_0x360ex11){return SmsMessage[_0x3707[103]]({where:{skebby_message_id:_0x360ex13[_0x3707[59]][_0x3707[102]]}})[_0x3707[21]](function(_0x360ex23){if(!_0x360ex23){return _0x360ex11[_0x3707[26]](404)};var _0x360ex28=_[_0x3707[51]](_0x360ex23,{status:_0x360ex13[_0x3707[59]][_0x3707[18]],errorcode:_0x360ex13[_0x3707[59]][_0x3707[101]]});return _0x360ex28[_0x3707[93]]()})[_0x3707[21]](function(_0x360ex23){return _0x360ex11[_0x3707[18]](200)[_0x3707[17]](_0x360ex23)})[_0x3707[20]](function(_0x360ex12){return handleError(_0x360ex11,_0x360ex12)})};exports[_0x3707[104]]= function(_0x360ex13,_0x360ex11){var _0x360ex2b=0;var _0x360ex2c=_0x360ex13[_0x3707[59]];_0x360ex2c[_0x3707[107]](function(_0x360ex2d){delete _0x360ex2d[_0x3707[27]];delete _0x360ex2d[_0x3707[84]];delete _0x360ex2d[_0x3707[105]];_0x360ex2d[_0x3707[106]]=  ++_0x360ex2b});return sequelize[_0x3707[110]](function(_0x360ex2f){return SmsApplication[_0x3707[109]]({where:{SmsAccountId:_0x360ex13[_0x3707[28]][_0x3707[27]]},individualHooks:true,transaction:_0x360ex2f})[_0x3707[21]](function(_0x360ex30){return SmsApplication[_0x3707[108]](_0x360ex2c,{individualHooks:true,transaction:_0x360ex2f})})})[_0x3707[21]](function(_0x360ex2e){return _0x360ex11[_0x3707[18]](200)[_0x3707[17]]({count:_0x360ex2e[_0x3707[45]],rows:_0x360ex2e})})[_0x3707[20]](function(_0x360ex12){return handleError(_0x360ex11,_0x360ex12)})};exports[_0x3707[109]]= function(_0x360ex13,_0x360ex11){return SmsAccount[_0x3707[29]](_0x360ex13[_0x3707[28]][_0x3707[27]])[_0x3707[21]](function(_0x360ex15){if(!_0x360ex15){return _0x360ex11[_0x3707[26]](404)};return _0x360ex15[_0x3707[109]]()})[_0x3707[21]](function(){return _0x360ex11[_0x3707[26]](204)})[_0x3707[20]](function(_0x360ex12){return handleError(_0x360ex11,_0x360ex12)})};exports[_0x3707[111]]= function(_0x360ex13,_0x360ex11,_0x360ex1a){return SmsApplication[_0x3707[29]](_0x360ex13[_0x3707[28]][_0x3707[112]])[_0x3707[21]](function(_0x360ex30){if(!_0x360ex30){return _0x360ex11[_0x3707[26]](404)};return _0x360ex30[_0x3707[109]]()})[_0x3707[21]](function(){return _0x360ex11[_0x3707[26]](204)})[_0x3707[20]](function(_0x360ex12){return handleError(_0x360ex11,_0x360ex12)})};exports[_0x3707[113]]= function(_0x360ex13,_0x360ex11,_0x360ex1a){return SmsDisposition[_0x3707[29]](_0x360ex13[_0x3707[28]][_0x3707[95]])[_0x3707[21]](function(_0x360ex1d){if(!_0x360ex1d){return _0x360ex11[_0x3707[26]](404)};return _0x360ex1d[_0x3707[109]]()})[_0x3707[21]](function(){return _0x360ex11[_0x3707[26]](204)})[_0x3707[20]](function(_0x360ex12){return handleError(_0x360ex11,_0x360ex12)})};exports[_0x3707[114]]= function(_0x360ex13,_0x360ex11){return SmsApplication[_0x3707[109]]({where:{id:_0x360ex13[_0x3707[22]][_0x3707[115]]},individualHooks:true})[_0x3707[21]](function(){return _0x360ex11[_0x3707[26]](204)})[_0x3707[20]](function(_0x360ex12){return handleError(_0x360ex11,_0x360ex12)})};exports[_0x3707[116]]= function(_0x360ex13,_0x360ex11,_0x360ex1a){var _0x360ex31={where:{SmsAccountId:_0x360ex13[_0x3707[28]][_0x3707[27]],$and:[]},attributes:[_0x3707[27],_0x3707[117],_0x3707[105],_0x3707[118],_0x3707[119],_0x3707[120],_0x3707[121]],include:[]};if(_0x360ex13[_0x3707[22]]){if(_0x360ex13[_0x3707[22]][_0x3707[118]]){if(_[_0x3707[122]](_0x360ex13[_0x3707[22]][_0x3707[118]])){for(var _0x360ex32=0;_0x360ex32< _0x360ex13[_0x3707[22]][_0x3707[118]][_0x3707[45]];_0x360ex32++){_0x360ex31[_0x3707[126]][_0x3707[125]][_0x3707[124]]({tags:{$like:_0x3707[123]+ _0x360ex13[_0x3707[22]][_0x3707[118]][_0x360ex32]+ _0x3707[123]}})}}else {_0x360ex31[_0x3707[126]][_0x3707[125]][_0x3707[124]]({tags:{$like:_0x3707[123]+ _0x360ex13[_0x3707[22]][_0x3707[118]]+ _0x3707[123]}})};delete _0x360ex13[_0x3707[22]][_0x3707[118]]};_[_0x3707[51]](_0x360ex31[_0x3707[126]],_0x360ex13[_0x3707[22]])};switch(_0x360ex13[_0x3707[63]][_0x3707[135]]){case _0x3707[128]:_0x360ex31[_0x3707[127]][_0x3707[124]]({model:User,attributes:[_0x3707[27]]});var _0x360ex33;var _0x360ex34;var _0x360ex35;return User[_0x3707[29]](_0x360ex13[_0x3707[63]][_0x3707[27]])[_0x3707[21]](function(_0x360ex39){if(_0x360ex39){return _0x360ex39[_0x3707[134]]()}else {return []}})[_0x3707[21]](function(_0x360ex38){_0x360ex34= _[_0x3707[130]](_0x360ex38,_0x3707[27]);return SmsAccount[_0x3707[29]](_0x360ex13[_0x3707[28]][_0x3707[27]])})[_0x3707[21]](function(_0x360ex37){return _0x360ex37[_0x3707[52]]({where:{$or:[{app:_0x3707[131]},{app:_0x3707[128]}]}})})[_0x3707[21]](function(_0x360ex2c){_0x360ex33= _[_0x3707[130]](_[_0x3707[129]](_0x360ex2c,{"\x61\x70\x70":_0x3707[128]}),_0x3707[62]);_0x360ex35= _[_0x3707[130]](_[_0x3707[129]](_0x360ex2c,{"\x61\x70\x70":_0x3707[131]}),_0x3707[132]);if(_[_0x3707[133]](_0x360ex34,_0x360ex35)[_0x3707[45]]|| _[_0x3707[133]](_0x360ex33,[_0x360ex13[_0x3707[63]][_0x3707[27]]])[_0x3707[45]]){return SmsRoom[_0x3707[86]](_0x360ex31)[_0x3707[21]](function(_0x360ex36){return _0x360ex11[_0x3707[18]](200)[_0x3707[17]](_0x360ex36)})[_0x3707[20]](function(_0x360ex12){console[_0x3707[72]](_0x360ex12);return handleError(_0x360ex11,_0x360ex12)})}else {return _0x360ex11[_0x3707[18]](200)[_0x3707[17]]([])}})[_0x3707[20]](function(_0x360ex12){console[_0x3707[72]](_0x360ex12)});default:return SmsRoom[_0x3707[86]](_0x360ex31)[_0x3707[21]](function(_0x360ex36){return _0x360ex11[_0x3707[18]](200)[_0x3707[17]](_0x360ex36)})[_0x3707[20]](function(_0x360ex12){return handleError(_0x360ex11,_0x360ex12)})}};exports[_0x3707[136]]= function(_0x360ex13,_0x360ex11,_0x360ex1a){return SmsApplication[_0x3707[138]](_0x3707[106],{where:{SmsAccountId:_0x360ex13[_0x3707[28]][_0x3707[27]]}})[_0x3707[21]](function(_0x360ex3a){_0x360ex13[_0x3707[59]][_0x3707[106]]= _0x360ex3a?++_0x360ex3a:1;_0x360ex13[_0x3707[59]][_0x3707[61]]= _0x360ex13[_0x3707[28]][_0x3707[27]];return SmsApplication[_0x3707[55]](_0x360ex13[_0x3707[59]])})[_0x3707[21]](function(_0x360ex30){return _0x360ex11[_0x3707[18]](201)[_0x3707[17]](_0x360ex30)})[_0x3707[20]](function(_0x360ex12){console[_0x3707[58]](_0x3707[137],_0x360ex12);return handleError(_0x360ex11,_0x360ex12)})};exports[_0x3707[139]]= function(_0x360ex13,_0x360ex11){if(_0x360ex13[_0x3707[59]][_0x3707[27]]){delete _0x360ex13[_0x3707[59]][_0x3707[27]]};return SmsApplication[_0x3707[29]](_0x360ex13[_0x3707[28]][_0x3707[112]])[_0x3707[21]](function(_0x360ex30){if(!_0x360ex30){return _0x360ex11[_0x3707[26]](404)};var _0x360ex28=_[_0x3707[51]](_0x360ex30,_0x360ex13[_0x3707[59]]);return _0x360ex28[_0x3707[93]]()})[_0x3707[21]](function(_0x360ex30){return _0x360ex11[_0x3707[18]](200)[_0x3707[17]](_0x360ex30)})[_0x3707[20]](function(_0x360ex12){return handleError(_0x360ex11,_0x360ex12)})}
\ No newline at end of file
diff --git a/server/api/sms_account/sms_account.events.js b/server/api/sms_account/sms_account.events.js
index 932ef04..45a1419 100644
--- a/server/api/sms_account/sms_account.events.js
+++ b/server/api/sms_account/sms_account.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const SmsAccount = require('../../models').SmsAccount;
-
-var SmsAccountEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-SmsAccountEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  SmsAccount.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    SmsAccountEvents.emit(event + ':' + doc._id, doc);
-    SmsAccountEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = SmsAccountEvents;
+var _0xd077=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd077[0];const EventEmitter=require(_0xd077[1]);const SmsAccount=require(_0xd077[3])[_0xd077[2]];var SmsAccountEvents= new EventEmitter();SmsAccountEvents[_0xd077[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd077[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd077[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd077[6]};for(var e in events){var event=events[e];SmsAccount[_0xd077[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x2b3cx8,_0x2b3cx9,_0x2b3cxa){SmsAccountEvents[_0xd077[10]](event+ _0xd077[8]+ _0x2b3cx8[_0xd077[9]],_0x2b3cx8);SmsAccountEvents[_0xd077[10]](event,_0x2b3cx8);_0x2b3cxa(null)}}module[_0xd077[11]]= SmsAccountEvents
\ No newline at end of file
diff --git a/server/api/sms_account/sms_account.socket.js b/server/api/sms_account/sms_account.socket.js
index 4aa38a4..b7a0139 100644
--- a/server/api/sms_account/sms_account.socket.js
+++ b/server/api/sms_account/sms_account.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const SmsAccountEvents = require('./sms_account.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('sms_account:' + event, socket);
-
-    SmsAccountEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    SmsAccountEvents.removeListener(event, listener);
-  };
-}
+var _0xb8a5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xb8a5[0];const SmsAccountEvents=require(_0xb8a5[1]);var events=[_0xb8a5[2],_0xb8a5[3]];exports[_0xb8a5[4]]= function(_0x8d43x3){for(var _0x8d43x4=0,_0x8d43x5=events[_0xb8a5[5]];_0x8d43x4< _0x8d43x5;_0x8d43x4++){var _0x8d43x6=events[_0x8d43x4];var _0x8d43x7=createListener(_0xb8a5[6]+ _0x8d43x6,_0x8d43x3);SmsAccountEvents[_0xb8a5[7]](_0x8d43x6,_0x8d43x7);_0x8d43x3[_0xb8a5[7]](_0xb8a5[8],removeListener(_0x8d43x6,_0x8d43x7))}};function createListener(_0x8d43x6,_0x8d43x3){return function(_0x8d43x9){_0x8d43x3[_0xb8a5[9]](_0x8d43x6,_0x8d43x9)}}function removeListener(_0x8d43x6,_0x8d43x7){return function(){SmsAccountEvents[_0xb8a5[10]](_0x8d43x6,_0x8d43x7)}}
\ No newline at end of file
diff --git a/server/api/sms_application/index.js b/server/api/sms_application/index.js
index fd4d4f1..72c9192 100644
--- a/server/api/sms_application/index.js
+++ b/server/api/sms_application/index.js
@@ -1,15 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./sms_application.controller');
-var license = require('../../config/license/license.service');
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.index);
-router.get('/:id', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.update);
-router.delete('/:id', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xa9b2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x53\x6D\x73","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xa9b2[0];var express=require(_0xa9b2[1]);var auth=require(_0xa9b2[2]);var controller=require(_0xa9b2[3]);var license=require(_0xa9b2[4]);var router=express.Router();router[_0xa9b2[11]](_0xa9b2[5],auth[_0xa9b2[6]](),license[_0xa9b2[7]](),auth[_0xa9b2[9]]([11],[_0xa9b2[8]]),controller[_0xa9b2[10]]);router[_0xa9b2[11]](_0xa9b2[12],auth[_0xa9b2[6]](),license[_0xa9b2[7]](),auth[_0xa9b2[9]]([11],[_0xa9b2[8]]),controller[_0xa9b2[13]]);router[_0xa9b2[15]](_0xa9b2[5],auth[_0xa9b2[6]](),license[_0xa9b2[7]](),auth[_0xa9b2[9]]([11],[_0xa9b2[8]]),controller[_0xa9b2[14]]);router[_0xa9b2[17]](_0xa9b2[12],auth[_0xa9b2[6]](),license[_0xa9b2[7]](),auth[_0xa9b2[9]]([11],[_0xa9b2[8]]),controller[_0xa9b2[16]]);router[_0xa9b2[19]](_0xa9b2[12],auth[_0xa9b2[6]](),license[_0xa9b2[7]](),auth[_0xa9b2[9]]([11],[_0xa9b2[8]]),controller[_0xa9b2[18]]);module[_0xa9b2[20]]= router
\ No newline at end of file
diff --git a/server/api/sms_application/sms_application.controller.js b/server/api/sms_application/sms_application.controller.js
index e1abd0b..e85c813 100644
--- a/server/api/sms_application/sms_application.controller.js
+++ b/server/api/sms_application/sms_application.controller.js
@@ -1,130 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/sms/applications              ->  index
- * POST    /api/sms/applications              ->  create
- * GET     /api/sms/applications/:id          ->  show
- * PUT     /api/sms/applications/:id          ->  update
- * DELETE  /api/sms/applications/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var SmsApplication = require('../../models').SmsApplication;
-
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-// Gets a list of SmsApplications
-exports.index = function(req, res) {
-  return SmsApplication
-    .findAll({
-      where: req.query,
-      order: 'priority',
-      include: [{
-        all: true
-      }]
-    })
-    .then(function(smsApplications) {
-      return res.status(200).send(smsApplications);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-// Gets a single SmsApplication from the DB
-exports.show = function(req, res) {
-  return SmsApplication
-    .findById(req.params.id, {
-      include: [{
-        all: true
-      }]
-    })
-    .then(function(smsApplication) {
-      if (!smsApplication) {
-        return res.sendStatus(404);
-      }
-      return res.send(smsApplication);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-}
-
-// Creates a new SmsApplication in the DB
-exports.create = function(req, res) {
-
-  return SmsApplication
-    .max('priority', {
-      where: {
-        SmsAccountId: req.body.SmsAccountId
-      }
-    })
-    .then(function(max) {
-      // SET PRIORITY
-      req.body.priority = max ? ++max : 1;
-      return SmsApplication
-        .create(req.body)
-    })
-    .then(function(smsApplication) {
-      return res.status(201).send(smsApplication);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-
-}
-
-// Updates an existing SmsApplication in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return SmsApplication
-    .findById(req.params.id)
-    .then(function(smsApplication) {
-      if (!smsApplication) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(smsApplication, req.body);
-      return updated
-        .save()
-
-    })
-    .then(function(smsApplication) {
-      return res.status(200).send(smsApplication);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-}
-
-
-// Deletes a SmsApplication from the DB
-exports.destroy = function(req, res) {
-  return SmsApplication
-    .findById(req.params.id)
-    .then(function(smsApplication) {
-      if (!smsApplication) {
-        return res.sendStatus(404);
-      }
-      return smsApplication
-        .destroy()
-
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
+var _0xa8ef=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x78","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xa8ef[0];var _=require(_0xa8ef[1]);var Util=require(_0xa8ef[2]);var SmsApplication=require(_0xa8ef[4])[_0xa8ef[3]];function handleError(_0x4d96x5,_0x4d96x6){return _0x4d96x5[_0xa8ef[6]](500)[_0xa8ef[5]](_0x4d96x6)}exports[_0xa8ef[7]]= function(_0x4d96x7,_0x4d96x5){return SmsApplication[_0xa8ef[12]]({where:_0x4d96x7[_0xa8ef[10]],order:_0xa8ef[11],include:[{all:true}]})[_0xa8ef[9]](function(_0x4d96x8){return _0x4d96x5[_0xa8ef[6]](200)[_0xa8ef[5]](_0x4d96x8)})[_0xa8ef[8]](function(_0x4d96x6){return handleError(_0x4d96x5,_0x4d96x6)})};exports[_0xa8ef[13]]= function(_0x4d96x7,_0x4d96x5){return SmsApplication[_0xa8ef[17]](_0x4d96x7[_0xa8ef[16]][_0xa8ef[15]],{include:[{all:true}]})[_0xa8ef[9]](function(_0x4d96x9){if(!_0x4d96x9){return _0x4d96x5[_0xa8ef[14]](404)};return _0x4d96x5[_0xa8ef[5]](_0x4d96x9)})[_0xa8ef[8]](function(_0x4d96x6){return handleError(_0x4d96x5,_0x4d96x6)})};exports[_0xa8ef[18]]= function(_0x4d96x7,_0x4d96x5){return SmsApplication[_0xa8ef[21]](_0xa8ef[11],{where:{SmsAccountId:_0x4d96x7[_0xa8ef[19]][_0xa8ef[20]]}})[_0xa8ef[9]](function(_0x4d96xa){_0x4d96x7[_0xa8ef[19]][_0xa8ef[11]]= _0x4d96xa?++_0x4d96xa:1;return SmsApplication[_0xa8ef[18]](_0x4d96x7[_0xa8ef[19]])})[_0xa8ef[9]](function(_0x4d96x9){return _0x4d96x5[_0xa8ef[6]](201)[_0xa8ef[5]](_0x4d96x9)})[_0xa8ef[8]](function(_0x4d96x6){return handleError(_0x4d96x5,_0x4d96x6)})};exports[_0xa8ef[22]]= function(_0x4d96x7,_0x4d96x5){if(_0x4d96x7[_0xa8ef[19]][_0xa8ef[15]]){delete _0x4d96x7[_0xa8ef[19]][_0xa8ef[15]]};return SmsApplication[_0xa8ef[17]](_0x4d96x7[_0xa8ef[16]][_0xa8ef[15]])[_0xa8ef[9]](function(_0x4d96x9){if(!_0x4d96x9){return _0x4d96x5[_0xa8ef[14]](404)};var _0x4d96xb=_[_0xa8ef[23]](_0x4d96x9,_0x4d96x7[_0xa8ef[19]]);return _0x4d96xb[_0xa8ef[24]]()})[_0xa8ef[9]](function(_0x4d96x9){return _0x4d96x5[_0xa8ef[6]](200)[_0xa8ef[5]](_0x4d96x9)})[_0xa8ef[8]](function(_0x4d96x6){return handleError(_0x4d96x5,_0x4d96x6)})};exports[_0xa8ef[25]]= function(_0x4d96x7,_0x4d96x5){return SmsApplication[_0xa8ef[17]](_0x4d96x7[_0xa8ef[16]][_0xa8ef[15]])[_0xa8ef[9]](function(_0x4d96x9){if(!_0x4d96x9){return _0x4d96x5[_0xa8ef[14]](404)};return _0x4d96x9[_0xa8ef[25]]()})[_0xa8ef[9]](function(){return _0x4d96x5[_0xa8ef[14]](204)})[_0xa8ef[8]](function(_0x4d96x6){return handleError(_0x4d96x5,_0x4d96x6)})}
\ No newline at end of file
diff --git a/server/api/sms_application/sms_application.events.js b/server/api/sms_application/sms_application.events.js
index 5d95d05..b59d3b4 100644
--- a/server/api/sms_application/sms_application.events.js
+++ b/server/api/sms_application/sms_application.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const SmsApplication = require('../../models').SmsApplication;
-
-var SmsApplicationEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-SmsApplicationEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  SmsApplication.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    SmsApplicationEvents.emit(event + ':' + doc._id, doc);
-    SmsApplicationEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = SmsApplicationEvents;
+var _0x86b6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x86b6[0];const EventEmitter=require(_0x86b6[1]);const SmsApplication=require(_0x86b6[3])[_0x86b6[2]];var SmsApplicationEvents= new EventEmitter();SmsApplicationEvents[_0x86b6[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x86b6[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x86b6[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x86b6[6]};for(var e in events){var event=events[e];SmsApplication[_0x86b6[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa478x8,_0xa478x9,_0xa478xa){SmsApplicationEvents[_0x86b6[10]](event+ _0x86b6[8]+ _0xa478x8[_0x86b6[9]],_0xa478x8);SmsApplicationEvents[_0x86b6[10]](event,_0xa478x8);_0xa478xa(null)}}module[_0x86b6[11]]= SmsApplicationEvents
\ No newline at end of file
diff --git a/server/api/sms_application/sms_application.socket.js b/server/api/sms_application/sms_application.socket.js
index 9926f52..7c22489 100644
--- a/server/api/sms_application/sms_application.socket.js
+++ b/server/api/sms_application/sms_application.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const SmsApplicationEvents = require('./sms_application.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('sms_application:' + event, socket);
-
-    SmsApplicationEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    SmsApplicationEvents.removeListener(event, listener);
-  };
-}
+var _0x9870=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x9870[0];const SmsApplicationEvents=require(_0x9870[1]);var events=[_0x9870[2],_0x9870[3]];exports[_0x9870[4]]= function(_0x8ac9x3){for(var _0x8ac9x4=0,_0x8ac9x5=events[_0x9870[5]];_0x8ac9x4< _0x8ac9x5;_0x8ac9x4++){var _0x8ac9x6=events[_0x8ac9x4];var _0x8ac9x7=createListener(_0x9870[6]+ _0x8ac9x6,_0x8ac9x3);SmsApplicationEvents[_0x9870[7]](_0x8ac9x6,_0x8ac9x7);_0x8ac9x3[_0x9870[7]](_0x9870[8],removeListener(_0x8ac9x6,_0x8ac9x7))}};function createListener(_0x8ac9x6,_0x8ac9x3){return function(_0x8ac9x9){_0x8ac9x3[_0x9870[9]](_0x8ac9x6,_0x8ac9x9)}}function removeListener(_0x8ac9x6,_0x8ac9x7){return function(){SmsApplicationEvents[_0x9870[10]](_0x8ac9x6,_0x8ac9x7)}}
\ No newline at end of file
diff --git a/server/api/sms_disposition/index.js b/server/api/sms_disposition/index.js
index 6e1022b..5b48ca1 100644
--- a/server/api/sms_disposition/index.js
+++ b/server/api/sms_disposition/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./sms_disposition.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), controller.index);
-router.get('/:id', auth.isAuthenticated(), controller.show);
-router.post('/', auth.isAuthenticated(), controller.create);
-router.put('/:id', auth.isAuthenticated(), controller.update);
-router.patch('/:id', auth.isAuthenticated(), controller.update);
-router.delete('/:id', auth.isAuthenticated(), controller.destroy);
-
-module.exports = router;
+var _0xc6e7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x73\x6D\x73\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc6e7[0];var express=require(_0xc6e7[1]);var controller=require(_0xc6e7[2]);var auth=require(_0xc6e7[3]);var router=express.Router();router[_0xc6e7[7]](_0xc6e7[4],auth[_0xc6e7[5]](),controller[_0xc6e7[6]]);router[_0xc6e7[7]](_0xc6e7[8],auth[_0xc6e7[5]](),controller[_0xc6e7[9]]);router[_0xc6e7[11]](_0xc6e7[4],auth[_0xc6e7[5]](),controller[_0xc6e7[10]]);router[_0xc6e7[13]](_0xc6e7[8],auth[_0xc6e7[5]](),controller[_0xc6e7[12]]);router[_0xc6e7[14]](_0xc6e7[8],auth[_0xc6e7[5]](),controller[_0xc6e7[12]]);router[_0xc6e7[16]](_0xc6e7[8],auth[_0xc6e7[5]](),controller[_0xc6e7[15]]);module[_0xc6e7[17]]= router
\ No newline at end of file
diff --git a/server/api/sms_disposition/sms_disposition.controller.js b/server/api/sms_disposition/sms_disposition.controller.js
index 066dd7e..c49c647 100644
--- a/server/api/sms_disposition/sms_disposition.controller.js
+++ b/server/api/sms_disposition/sms_disposition.controller.js
@@ -1,95 +1 @@
-'use strict';
-
-
-var _ = require('lodash');
-
-var SmsDisposition = require('../../models').SmsDisposition;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      })
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        })
-    }
-  };
-}
-
-// Gets a list of SmsDispositions
-exports.index = function(req, res) {
-  SmsDisposition.findAndCountAll()
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single SmsDisposition from the DB
-exports.show = function(req, res) {
-  SmsDisposition.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new SmsDisposition in the DB
-exports.create = function(req, res) {
-  SmsDisposition.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing SmsDisposition in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  SmsDisposition.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a SmsDisposition from the DB
-exports.destroy = function(req, res) {
-  SmsDisposition.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
+var _0xbfee=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0xbfee[0];var _=require(_0xbfee[1]);var SmsDisposition=require(_0xbfee[3])[_0xbfee[2]];function handleError(_0xc480x4,_0xc480x5){_0xc480x5= _0xc480x5|| 500;return function(_0xc480x6){_0xc480x4[_0xbfee[5]](_0xc480x5)[_0xbfee[4]](_0xc480x6)}}function responseWithResult(_0xc480x4,_0xc480x5){_0xc480x5= _0xc480x5|| 200;return function(_0xc480x8){if(_0xc480x8){_0xc480x4[_0xbfee[5]](_0xc480x5)[_0xbfee[6]](_0xc480x8)}}}function handleEntityNotFound(_0xc480x4){return function(_0xc480x8){if(!_0xc480x8){_0xc480x4[_0xbfee[5]](404)[_0xbfee[7]]();return null};return _0xc480x8}}function saveUpdates(_0xc480xb){return function(_0xc480x8){return _0xc480x8[_0xbfee[9]](_0xc480xb)[_0xbfee[8]](function(_0xc480xc){return _0xc480xc})}}function removeEntity(_0xc480x4){return function(_0xc480x8){if(_0xc480x8){return _0xc480x8[_0xbfee[10]]()[_0xbfee[8]](function(){_0xc480x4[_0xbfee[5]](204)[_0xbfee[7]]()})}}}exports[_0xbfee[11]]= function(_0xc480xe,_0xc480x4){SmsDisposition[_0xbfee[13]]()[_0xbfee[8]](responseWithResult(_0xc480x4))[_0xbfee[12]](handleError(_0xc480x4))};exports[_0xbfee[14]]= function(_0xc480xe,_0xc480x4){SmsDisposition[_0xbfee[17]](_0xc480xe[_0xbfee[16]][_0xbfee[15]])[_0xbfee[8]](handleEntityNotFound(_0xc480x4))[_0xbfee[8]](responseWithResult(_0xc480x4))[_0xbfee[12]](handleError(_0xc480x4))};exports[_0xbfee[18]]= function(_0xc480xe,_0xc480x4){SmsDisposition[_0xbfee[18]](_0xc480xe[_0xbfee[19]])[_0xbfee[8]](responseWithResult(_0xc480x4,201))[_0xbfee[12]](handleError(_0xc480x4))};exports[_0xbfee[20]]= function(_0xc480xe,_0xc480x4){if(_0xc480xe[_0xbfee[19]][_0xbfee[15]]){delete _0xc480xe[_0xbfee[19]][_0xbfee[15]]};SmsDisposition[_0xbfee[17]](_0xc480xe[_0xbfee[16]][_0xbfee[15]])[_0xbfee[8]](handleEntityNotFound(_0xc480x4))[_0xbfee[8]](saveUpdates(_0xc480xe[_0xbfee[19]]))[_0xbfee[8]](responseWithResult(_0xc480x4))[_0xbfee[12]](handleError(_0xc480x4))};exports[_0xbfee[10]]= function(_0xc480xe,_0xc480x4){SmsDisposition[_0xbfee[17]](_0xc480xe[_0xbfee[16]][_0xbfee[15]])[_0xbfee[8]](handleEntityNotFound(_0xc480x4))[_0xbfee[8]](removeEntity(_0xc480x4))[_0xbfee[12]](handleError(_0xc480x4))}
\ No newline at end of file
diff --git a/server/api/sms_disposition/sms_disposition.events.js b/server/api/sms_disposition/sms_disposition.events.js
index 5f2d801..208897f 100644
--- a/server/api/sms_disposition/sms_disposition.events.js
+++ b/server/api/sms_disposition/sms_disposition.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const SmsDisposition = require('../../models').SmsDisposition;
-
-var SmsDispositionEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-SmsDispositionEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  SmsDisposition.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    SmsDispositionEvents.emit(event + ':' + doc._id, doc);
-    SmsDispositionEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = SmsDispositionEvents;
+var _0x9f56=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9f56[0];const EventEmitter=require(_0x9f56[1]);const SmsDisposition=require(_0x9f56[3])[_0x9f56[2]];var SmsDispositionEvents= new EventEmitter();SmsDispositionEvents[_0x9f56[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x9f56[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x9f56[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x9f56[6]};for(var e in events){var event=events[e];SmsDisposition[_0x9f56[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x5431x8,_0x5431x9,_0x5431xa){SmsDispositionEvents[_0x9f56[10]](event+ _0x9f56[8]+ _0x5431x8[_0x9f56[9]],_0x5431x8);SmsDispositionEvents[_0x9f56[10]](event,_0x5431x8);_0x5431xa(null)}}module[_0x9f56[11]]= SmsDispositionEvents
\ No newline at end of file
diff --git a/server/api/sms_disposition/sms_disposition.socket.js b/server/api/sms_disposition/sms_disposition.socket.js
index 577c85f..34128a0 100644
--- a/server/api/sms_disposition/sms_disposition.socket.js
+++ b/server/api/sms_disposition/sms_disposition.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const SmsDispositionEvents = require('./sms_disposition.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('sms_disposition:' + event, socket);
-
-    SmsDispositionEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    SmsDispositionEvents.removeListener(event, listener);
-  };
-}
+var _0x80a1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6D\x73\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6D\x73\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x80a1[0];const SmsDispositionEvents=require(_0x80a1[1]);var events=[_0x80a1[2],_0x80a1[3]];exports[_0x80a1[4]]= function(_0x1bcex3){for(var _0x1bcex4=0,_0x1bcex5=events[_0x80a1[5]];_0x1bcex4< _0x1bcex5;_0x1bcex4++){var _0x1bcex6=events[_0x1bcex4];var _0x1bcex7=createListener(_0x80a1[6]+ _0x1bcex6,_0x1bcex3);SmsDispositionEvents[_0x80a1[7]](_0x1bcex6,_0x1bcex7);_0x1bcex3[_0x80a1[7]](_0x80a1[8],removeListener(_0x1bcex6,_0x1bcex7))}};function createListener(_0x1bcex6,_0x1bcex3){return function(_0x1bcex9){_0x1bcex3[_0x80a1[9]](_0x1bcex6,_0x1bcex9)}}function removeListener(_0x1bcex6,_0x1bcex7){return function(){SmsDispositionEvents[_0x80a1[10]](_0x1bcex6,_0x1bcex7)}}
\ No newline at end of file
diff --git a/server/api/sms_message/index.js b/server/api/sms_message/index.js
index 5c0b3d0..3a4abfe 100644
--- a/server/api/sms_message/index.js
+++ b/server/api/sms_message/index.js
@@ -1,18 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./sms_message.controller');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.index);
-router.get('/describe', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.describe);
-router.get('/:id', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin', 'agent']), controller.show);
-router.post('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.update);
-router.delete('/:id', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.destroy);
-router.delete('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.bulkDelete);
-
-module.exports = router;
+var _0x1c0f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x53\x6D\x73","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x61\x67\x65\x6E\x74","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x1c0f[0];var express=require(_0x1c0f[1]);var auth=require(_0x1c0f[2]);var controller=require(_0x1c0f[3]);var license=require(_0x1c0f[4]);var router=express.Router();router[_0x1c0f[11]](_0x1c0f[5],auth[_0x1c0f[6]](),license[_0x1c0f[7]](),auth[_0x1c0f[9]]([11],[_0x1c0f[8]]),controller[_0x1c0f[10]]);router[_0x1c0f[11]](_0x1c0f[12],auth[_0x1c0f[6]](),license[_0x1c0f[7]](),auth[_0x1c0f[9]]([11],[_0x1c0f[8]]),controller[_0x1c0f[13]]);router[_0x1c0f[11]](_0x1c0f[14],auth[_0x1c0f[6]](),license[_0x1c0f[7]](),auth[_0x1c0f[9]]([11],[_0x1c0f[8],_0x1c0f[15]]),controller[_0x1c0f[16]]);router[_0x1c0f[18]](_0x1c0f[5],auth[_0x1c0f[6]](),license[_0x1c0f[7]](),auth[_0x1c0f[9]]([11],[_0x1c0f[8]]),controller[_0x1c0f[17]]);router[_0x1c0f[20]](_0x1c0f[14],auth[_0x1c0f[6]](),license[_0x1c0f[7]](),auth[_0x1c0f[9]]([11],[_0x1c0f[8]]),controller[_0x1c0f[19]]);router[_0x1c0f[22]](_0x1c0f[14],auth[_0x1c0f[6]](),license[_0x1c0f[7]](),auth[_0x1c0f[9]]([11],[_0x1c0f[8]]),controller[_0x1c0f[21]]);router[_0x1c0f[22]](_0x1c0f[5],auth[_0x1c0f[6]](),license[_0x1c0f[7]](),auth[_0x1c0f[9]]([11],[_0x1c0f[8]]),controller[_0x1c0f[23]]);module[_0x1c0f[24]]= router
\ No newline at end of file
diff --git a/server/api/sms_message/sms_message.controller.js b/server/api/sms_message/sms_message.controller.js
index d1dd899..486fb9d 100644
--- a/server/api/sms_message/sms_message.controller.js
+++ b/server/api/sms_message/sms_message.controller.js
@@ -1,170 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/sms/messages              ->  index
- * POST    /api/sms/messages              ->  create
- * GET     /api/sms/messages/:id          ->  show
- * PUT     /api/sms/messages/:id          ->  update
- * DELETE  /api/sms/messages/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var SmsMessage = require('../../models').SmsMessage;
-var SmsRoom = require('../../models').SmsRoom;
-var User = require('../../models').User;
-
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-// Gets a list of SmsMessages
-exports.index = function(req, res) {
-  var params = {
-    order: 'createdAt DESC',
-    include: [{
-      all: true,
-      include: [{
-        all: true
-      }]
-    }]
-  };
-
-  switch (req.user.role) {
-    case 'admin':
-      params.where = req.query;
-      break;
-    case 'agent':
-      break;
-    default:
-  }
-
-  return SmsMessage
-    .findAll(params)
-    .then(function(sms_messages) {
-      return res.status(200).send(sms_messages);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-exports.describe = function(req, res) {
-  return SmsMessage
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Gets a single SmsMessage from the DB
-exports.show = function(req, res) {
-  return SmsMessage
-    .findById(req.params.id, {
-      include: [{
-        model: User,
-        attributes: ['id', 'name', 'fullname', 'email']
-      }]
-    })
-    .then(function(smsMessage) {
-      if (!smsMessage) {
-        return res.sendStatus(404);
-      }
-      return res.send(smsMessage);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-// Creates a new SmsMessage in the DB
-exports.create = function(req, res) {
-  req.body.UserId = req.user.id;
-  return SmsMessage
-    .create(req.body)
-    .then(function(smsMessage) {
-      return res.status(201).send(smsMessage);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-// Updates an existing SmsMessage in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return SmsMessage
-    .findById(req.params.id, {
-      include: [{
-        all: true
-      }]
-    })
-    .then(function(smsMessage) {
-      if (!smsMessage) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(smsMessage, req.body);
-      return updated
-        .save();
-    })
-    .then(function(updated) {
-      return res.status(200).send(updated);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-// Deletes a SmsMessage from the DB
-exports.destroy = function(req, res) {
-  return SmsMessage
-    .findById(req.params.id)
-    .then(function(smsMessage) {
-      if (!smsMessage) {
-        return res.sendStatus(404);
-      }
-      return smsMessage
-        .destroy();
-    }).then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-exports.bulkDelete = function(req, res) {
-  return SmsMessage
-    .bulkUpdate({
-      where: {
-        id: {
-          $in: req.body.id
-        }
-      },
-      attributes: {
-        directory: 'TRASH'
-      }
-    })
-    .then(function(smsMessage) {
-      if (!smsMessage) {
-        return res.sendStatus(404);
-      }
-      return smsMessage
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
+var _0x1a5c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x52\x6F\x6F\x6D","\x55\x73\x65\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x44\x45\x53\x43","\x77\x68\x65\x72\x65","\x71\x75\x65\x72\x79","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x54\x52\x41\x53\x48","\x62\x75\x6C\x6B\x55\x70\x64\x61\x74\x65"];_0x1a5c[0];var _=require(_0x1a5c[1]);var Util=require(_0x1a5c[2]);var SmsMessage=require(_0x1a5c[4])[_0x1a5c[3]];var SmsRoom=require(_0x1a5c[4])[_0x1a5c[5]];var User=require(_0x1a5c[4])[_0x1a5c[6]];function handleError(_0xbb9ax7,_0xbb9ax8){return _0xbb9ax7[_0x1a5c[8]](500)[_0x1a5c[7]](_0xbb9ax8)}exports[_0x1a5c[9]]= function(_0xbb9ax9,_0xbb9ax7){var _0xbb9axa={order:_0x1a5c[10],include:[{all:true,include:[{all:true}]}]};switch(_0xbb9ax9[_0x1a5c[16]][_0x1a5c[15]]){case _0x1a5c[13]:_0xbb9axa[_0x1a5c[11]]= _0xbb9ax9[_0x1a5c[12]];break;case _0x1a5c[14]:break;default:};return SmsMessage[_0x1a5c[19]](_0xbb9axa)[_0x1a5c[18]](function(_0xbb9axb){return _0xbb9ax7[_0x1a5c[8]](200)[_0x1a5c[7]](_0xbb9axb)})[_0x1a5c[17]](function(_0xbb9ax8){return handleError(_0xbb9ax7,_0xbb9ax8)})};exports[_0x1a5c[20]]= function(_0xbb9ax9,_0xbb9ax7){return SmsMessage[_0x1a5c[20]]()[_0x1a5c[18]](function(_0xbb9axc){return _0xbb9ax7[_0x1a5c[8]](200)[_0x1a5c[7]](_0xbb9axc)})[_0x1a5c[17]](function(_0xbb9ax8){return handleError(_0xbb9ax7,_0xbb9ax8)})};exports[_0x1a5c[21]]= function(_0xbb9ax9,_0xbb9ax7){return SmsMessage[_0x1a5c[28]](_0xbb9ax9[_0x1a5c[24]][_0x1a5c[23]],{include:[{model:User,attributes:[_0x1a5c[23],_0x1a5c[25],_0x1a5c[26],_0x1a5c[27]]}]})[_0x1a5c[18]](function(_0xbb9axd){if(!_0xbb9axd){return _0xbb9ax7[_0x1a5c[22]](404)};return _0xbb9ax7[_0x1a5c[7]](_0xbb9axd)})[_0x1a5c[17]](function(_0xbb9ax8){return handleError(_0xbb9ax7,_0xbb9ax8)})};exports[_0x1a5c[29]]= function(_0xbb9ax9,_0xbb9ax7){_0xbb9ax9[_0x1a5c[31]][_0x1a5c[30]]= _0xbb9ax9[_0x1a5c[16]][_0x1a5c[23]];return SmsMessage[_0x1a5c[29]](_0xbb9ax9[_0x1a5c[31]])[_0x1a5c[18]](function(_0xbb9axd){return _0xbb9ax7[_0x1a5c[8]](201)[_0x1a5c[7]](_0xbb9axd)})[_0x1a5c[17]](function(_0xbb9ax8){return handleError(_0xbb9ax7,_0xbb9ax8)})};exports[_0x1a5c[32]]= function(_0xbb9ax9,_0xbb9ax7){if(_0xbb9ax9[_0x1a5c[31]][_0x1a5c[23]]){delete _0xbb9ax9[_0x1a5c[31]][_0x1a5c[23]]};return SmsMessage[_0x1a5c[28]](_0xbb9ax9[_0x1a5c[24]][_0x1a5c[23]],{include:[{all:true}]})[_0x1a5c[18]](function(_0xbb9axd){if(!_0xbb9axd){return _0xbb9ax7[_0x1a5c[22]](404)};var _0xbb9axe=_[_0x1a5c[33]](_0xbb9axd,_0xbb9ax9[_0x1a5c[31]]);return _0xbb9axe[_0x1a5c[34]]()})[_0x1a5c[18]](function(_0xbb9axe){return _0xbb9ax7[_0x1a5c[8]](200)[_0x1a5c[7]](_0xbb9axe)})[_0x1a5c[17]](function(_0xbb9ax8){return handleError(_0xbb9ax7,_0xbb9ax8)})};exports[_0x1a5c[35]]= function(_0xbb9ax9,_0xbb9ax7){return SmsMessage[_0x1a5c[28]](_0xbb9ax9[_0x1a5c[24]][_0x1a5c[23]])[_0x1a5c[18]](function(_0xbb9axd){if(!_0xbb9axd){return _0xbb9ax7[_0x1a5c[22]](404)};return _0xbb9axd[_0x1a5c[35]]()})[_0x1a5c[18]](function(){return _0xbb9ax7[_0x1a5c[22]](204)})[_0x1a5c[17]](function(_0xbb9ax8){return handleError(_0xbb9ax7,_0xbb9ax8)})};exports[_0x1a5c[36]]= function(_0xbb9ax9,_0xbb9ax7){return SmsMessage[_0x1a5c[38]]({where:{id:{$in:_0xbb9ax9[_0x1a5c[31]][_0x1a5c[23]]}},attributes:{directory:_0x1a5c[37]}})[_0x1a5c[18]](function(_0xbb9axd){if(!_0xbb9axd){return _0xbb9ax7[_0x1a5c[22]](404)};return _0xbb9axd[_0x1a5c[35]]()})[_0x1a5c[18]](function(){return _0xbb9ax7[_0x1a5c[22]](204)})[_0x1a5c[17]](function(_0xbb9ax8){return handleError(_0xbb9ax7,_0xbb9ax8)})}
\ No newline at end of file
diff --git a/server/api/sms_message/sms_message.events.js b/server/api/sms_message/sms_message.events.js
index 21dd796..1e586a0 100644
--- a/server/api/sms_message/sms_message.events.js
+++ b/server/api/sms_message/sms_message.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const SmsMessage = require('../../models').SmsMessage;
-
-var SmsMessageEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-SmsMessageEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'update',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  SmsMessage.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    SmsMessageEvents.emit(event + ':' + doc._id, doc);
-    SmsMessageEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = SmsMessageEvents;
+var _0xae5d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xae5d[0];const EventEmitter=require(_0xae5d[1]);const SmsMessage=require(_0xae5d[3])[_0xae5d[2]];var SmsMessageEvents= new EventEmitter();SmsMessageEvents[_0xae5d[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xae5d[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xae5d[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xae5d[7]};for(var e in events){var event=events[e];SmsMessage[_0xae5d[8]](e,emitEvent(event))};function emitEvent(event){return function(_0xdafbx8,_0xdafbx9,_0xdafbxa){SmsMessageEvents[_0xae5d[11]](event+ _0xae5d[9]+ _0xdafbx8[_0xae5d[10]],_0xdafbx8);SmsMessageEvents[_0xae5d[11]](event,_0xdafbx8);_0xdafbxa(null)}}module[_0xae5d[12]]= SmsMessageEvents
\ No newline at end of file
diff --git a/server/api/sms_message/sms_message.socket.js b/server/api/sms_message/sms_message.socket.js
index 70931c8..dd4a717 100644
--- a/server/api/sms_message/sms_message.socket.js
+++ b/server/api/sms_message/sms_message.socket.js
@@ -1,47 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const SmsMessageEvents = require('./sms_message.events');
-
-// Model events to emit
-var events = ['save', 'update', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('sms_message:' + event, socket);
-
-    SmsMessageEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'sms_message:save':
-        socket.emit(event, doc);
-        break;
-      case 'sms_message:update':
-        if (doc.changed('status')) {
-          socket.emit(event, doc);
-        }
-        break;
-      case 'sms_message:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    SmsMessageEvents.removeListener(event, listener);
-  };
-}
+var _0xfe26=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x73\x61\x76\x65","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x75\x70\x64\x61\x74\x65","\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xfe26[0];const SmsMessageEvents=require(_0xfe26[1]);var events=[_0xfe26[2],_0xfe26[3],_0xfe26[4]];exports[_0xfe26[5]]= function(_0xa54dx3){for(var _0xa54dx4=0,_0xa54dx5=events[_0xfe26[6]];_0xa54dx4< _0xa54dx5;_0xa54dx4++){var _0xa54dx6=events[_0xa54dx4];var _0xa54dx7=createListener(_0xfe26[7]+ _0xa54dx6,_0xa54dx3);SmsMessageEvents[_0xfe26[8]](_0xa54dx6,_0xa54dx7);_0xa54dx3[_0xfe26[8]](_0xfe26[9],removeListener(_0xa54dx6,_0xa54dx7))}};function createListener(_0xa54dx6,_0xa54dx3){return function(_0xa54dx9){switch(_0xa54dx6){case _0xfe26[11]:_0xa54dx3[_0xfe26[10]](_0xa54dx6,_0xa54dx9);break;case _0xfe26[14]:if(_0xa54dx9[_0xfe26[13]](_0xfe26[12])){_0xa54dx3[_0xfe26[10]](_0xa54dx6,_0xa54dx9)};break;case _0xfe26[15]:_0xa54dx3[_0xfe26[10]](_0xa54dx6,_0xa54dx9);break;default:}}}function removeListener(_0xa54dx6,_0xa54dx7){return function(){SmsMessageEvents[_0xfe26[16]](_0xa54dx6,_0xa54dx7)}}
\ No newline at end of file
diff --git a/server/api/sms_queue/index.js b/server/api/sms_queue/index.js
index 2033118..798d52d 100644
--- a/server/api/sms_queue/index.js
+++ b/server/api/sms_queue/index.js
@@ -1,21 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./sms_queue.controller');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.index);
-router.get('/:id', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.show);
-router.get('/:id/agents', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.showAgents);
-router.post('/', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasRole('admin'), controller.create);
-router.post('/:id/agents', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasRole('admin'), controller.addAgents);
-router.put('/:id', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasRole('admin'), controller.update);
-router.patch('/:id', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasRole('admin'), controller.update);
-router.delete('/:id', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasRole('admin'), controller.destroy);
-router.delete('/:id/agents', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasRole('admin'), controller.removeAgents);
-router.delete('/', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasRole('admin'), controller.bulkDestroy);
-
-module.exports = router;
+var _0x3034=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x53\x6D\x73","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x68\x61\x73\x52\x6F\x6C\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x3034[0];var express=require(_0x3034[1]);var auth=require(_0x3034[2]);var controller=require(_0x3034[3]);var license=require(_0x3034[4]);var router=express.Router();router[_0x3034[12]](_0x3034[5],license[_0x3034[6]](),auth[_0x3034[7]](),license[_0x3034[8]](),auth[_0x3034[10]]([11],[_0x3034[9]]),controller[_0x3034[11]]);router[_0x3034[12]](_0x3034[13],license[_0x3034[6]](),auth[_0x3034[7]](),license[_0x3034[8]](),auth[_0x3034[10]]([11],[_0x3034[9]]),controller[_0x3034[14]]);router[_0x3034[12]](_0x3034[15],license[_0x3034[6]](),auth[_0x3034[7]](),license[_0x3034[8]](),auth[_0x3034[10]]([11],[_0x3034[9]]),controller[_0x3034[16]]);router[_0x3034[19]](_0x3034[5],license[_0x3034[6]](),auth[_0x3034[7]](),license[_0x3034[8]](),auth[_0x3034[17]](_0x3034[9]),controller[_0x3034[18]]);router[_0x3034[19]](_0x3034[15],license[_0x3034[6]](),auth[_0x3034[7]](),license[_0x3034[8]](),auth[_0x3034[17]](_0x3034[9]),controller[_0x3034[20]]);router[_0x3034[22]](_0x3034[13],license[_0x3034[6]](),auth[_0x3034[7]](),license[_0x3034[8]](),auth[_0x3034[17]](_0x3034[9]),controller[_0x3034[21]]);router[_0x3034[23]](_0x3034[13],license[_0x3034[6]](),auth[_0x3034[7]](),license[_0x3034[8]](),auth[_0x3034[17]](_0x3034[9]),controller[_0x3034[21]]);router[_0x3034[25]](_0x3034[13],license[_0x3034[6]](),auth[_0x3034[7]](),license[_0x3034[8]](),auth[_0x3034[17]](_0x3034[9]),controller[_0x3034[24]]);router[_0x3034[25]](_0x3034[15],license[_0x3034[6]](),auth[_0x3034[7]](),license[_0x3034[8]](),auth[_0x3034[17]](_0x3034[9]),controller[_0x3034[26]]);router[_0x3034[25]](_0x3034[5],license[_0x3034[6]](),auth[_0x3034[7]](),license[_0x3034[8]](),auth[_0x3034[17]](_0x3034[9]),controller[_0x3034[27]]);module[_0x3034[28]]= router
\ No newline at end of file
diff --git a/server/api/sms_queue/sms_queue.controller.js b/server/api/sms_queue/sms_queue.controller.js
index da0bf5b..ca59a01 100644
--- a/server/api/sms_queue/sms_queue.controller.js
+++ b/server/api/sms_queue/sms_queue.controller.js
@@ -1,242 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/sms/queues              ->  index
- * POST    /api/sms/queues              ->  create
- * GET     /api/sms/queues/:id          ->  show
- * PUT     /api/sms/queues/:id          ->  update
- * DELETE  /api/sms/queues/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var SmsQueue = require('../../models').SmsQueue;
-var User = require('../../models').User;
-var sequelize = require('../../models').sequelize;
-var UserHasSmsQueue = require('../../models').UserHasSmsQueue;
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-// Gets a list of SmsQueues
-exports.index = function(req, res) {
-
-  switch (req.user.role) {
-    case 'user':
-      return User
-        .findById(req.user.id, {
-          attributes: ['id']
-        })
-        .then(Util.getSmsQueuesIdByUser(req.query))
-        .then(function(result) {
-          res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-
-    default:
-      return SmsQueue
-        .scope('default')
-        .findAndCountAll(Util.getQuery(req.query))
-        .then(function(result) {
-          res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-  }
-
-
-
-}
-
-// Gets a single SmsQueue from the DB
-exports.show = function(req, res) {
-  return SmsQueue
-    .scope('default')
-    .findById(req.params.id)
-    .then(function(smsQueue) {
-      if (!smsQueue) {
-        return res.sendStatus(404);
-      }
-      return res.send(smsQueue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-exports.showAgents = function(req, res) {
-  return SmsQueue
-    .findById(req.params.id)
-    .then(function(queue) {
-      if (!queue) {
-        return res.sendStatus(404);
-      }
-      return queue
-        .getUsers({
-          where: {
-            role: 'agent'
-          },
-          attributes: ['id', 'name', 'fullname', 'email']
-        });
-    })
-    .then(function(agents) {
-      return res.status(200).send({
-        rows: agents,
-        count: agents.length
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Creates a new SmsQueue in the DB
-exports.create = function(req, res) {
-  var _smsQueue;
-
-  return SmsQueue
-    .create(req.body)
-    .then(function(smsQueue) {
-      _smsQueue = smsQueue;
-
-      if (req.body.agents) {
-        return _smsQueue
-          .addUsers(req.body.agents, {
-            penalty: req.body.penalty || 0,
-            queue: _smsQueue.name
-          });
-      }
-    })
-    .then(function() {
-      return res.status(201).send(_smsQueue);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-// Updates an existing SmsQueue in the DB
-exports.update = function(req, res) {
-    if (req.body.id) {
-      delete req.body.id;
-    }
-    return SmsQueue
-      .findById(req.params.id)
-      .then(function(smsQueue) {
-        if (!smsQueue) {
-          return res.sendStatus(404);
-        }
-        var updated = _.merge(smsQueue, req.body);
-        return updated
-          .save();
-      })
-      .then(function(smsQueue) {
-        return res.status(200).send(smsQueue);
-      })
-      .catch(sequelize.UniqueConstraintError, function(err) {
-        return Util.errorManager.handleUniqueConstraintError(res, err);
-      })
-      .catch(function(err) {
-        return handleError(res, err);
-      });
-  }
-  // Updates an existing user_has_smsQueue in the DB.
-exports.addAgents = function(req, res, next) {
-  return SmsQueue
-    .findById(req.params.id)
-    .then(function(smsQueue) {
-      if (!smsQueue) {
-        return res.sendStatus(404);
-      }
-      var userHasSmsQueues = _.map(req.body.agents, function(agent) {
-        return {
-          UserId: agent,
-          penalty: req.body.penalty,
-          SmsQueueId: smsQueue.id,
-          queue: smsQueue.name
-        };
-      });
-
-      return UserHasSmsQueue
-        .bulkCreate(userHasSmsQueues, {
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.removeAgents = function(req, res) {
-  return SmsQueue
-    .findById(req.params.id)
-    .then(function(smsQueue) {
-      if (smsQueue) {
-        return smsQueue
-          .removeUsers(req.query.agents, {
-            individualHooks: true
-          });
-      } else {
-        throw new Error('SmsQueue not found');
-      }
-    })
-    .then(function() {
-      return res.sendStatus(202);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-};
-
-// Deletes a SmsQueue from the DB
-exports.destroy = function(req, res) {
-  var _smsQueue;
-  return SmsQueue
-    .findById(req.params.id)
-    .then(function(smsQueue) {
-      _smsQueue = smsQueue;
-      if (!smsQueue) {
-        return res.sendStatus(404);
-      }
-      return smsQueue
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(sequelize.ForeignKeyConstraintError, function(err) {
-      return Util.errorManager.handleForeignKeyConstraintError(res, 'queue', _smsQueue.name, err);
-    })
-    .catch(function(err) {
-      console.error('err', err);
-      return handleError(res, err);
-    });
-}
-exports.bulkDestroy = function(req, res) {
-  return SmsQueue
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
+var _0x17ae=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x53\x6D\x73\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x61\x67\x65\x6E\x74\x73","\x62\x6F\x64\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x55\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72\x73","\x53\x6D\x73\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79","\x65\x72\x72","\x65\x72\x72\x6F\x72","\x71\x75\x65\x75\x65","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x17ae[0];var _=require(_0x17ae[1]);var Util=require(_0x17ae[2]);var SmsQueue=require(_0x17ae[4])[_0x17ae[3]];var User=require(_0x17ae[4])[_0x17ae[5]];var sequelize=require(_0x17ae[4])[_0x17ae[6]];var UserHasSmsQueue=require(_0x17ae[4])[_0x17ae[7]];function handleError(_0xc617x8,_0xc617x9){return _0xc617x8[_0x17ae[9]](500)[_0x17ae[8]](_0xc617x9)}exports[_0x17ae[10]]= function(_0xc617xa,_0xc617x8){switch(_0xc617xa[_0x17ae[16]][_0x17ae[22]]){case _0x17ae[16]:return User[_0x17ae[17]](_0xc617xa[_0x17ae[16]][_0x17ae[15]],{attributes:[_0x17ae[15]]})[_0x17ae[12]](Util[_0x17ae[14]](_0xc617xa[_0x17ae[13]]))[_0x17ae[12]](function(_0xc617xb){_0xc617x8[_0x17ae[9]](200)[_0x17ae[8]](_0xc617xb)})[_0x17ae[11]](function(_0xc617x9){return handleError(_0xc617x8,_0xc617x9)});default:return SmsQueue[_0x17ae[21]](_0x17ae[20])[_0x17ae[19]](Util[_0x17ae[18]](_0xc617xa[_0x17ae[13]]))[_0x17ae[12]](function(_0xc617xb){_0xc617x8[_0x17ae[9]](200)[_0x17ae[8]](_0xc617xb)})[_0x17ae[11]](function(_0xc617x9){return handleError(_0xc617x8,_0xc617x9)})}};exports[_0x17ae[23]]= function(_0xc617xa,_0xc617x8){return SmsQueue[_0x17ae[21]](_0x17ae[20])[_0x17ae[17]](_0xc617xa[_0x17ae[25]][_0x17ae[15]])[_0x17ae[12]](function(_0xc617xc){if(!_0xc617xc){return _0xc617x8[_0x17ae[24]](404)};return _0xc617x8[_0x17ae[8]](_0xc617xc)})[_0x17ae[11]](function(_0xc617x9){return handleError(_0xc617x8,_0xc617x9)})};exports[_0x17ae[26]]= function(_0xc617xa,_0xc617x8){return SmsQueue[_0x17ae[17]](_0xc617xa[_0x17ae[25]][_0x17ae[15]])[_0x17ae[12]](function(_0xc617xe){if(!_0xc617xe){return _0xc617x8[_0x17ae[24]](404)};return _0xc617xe[_0x17ae[32]]({where:{role:_0x17ae[28]},attributes:[_0x17ae[15],_0x17ae[29],_0x17ae[30],_0x17ae[31]]})})[_0x17ae[12]](function(_0xc617xd){return _0xc617x8[_0x17ae[9]](200)[_0x17ae[8]]({rows:_0xc617xd,count:_0xc617xd[_0x17ae[27]]})})[_0x17ae[11]](function(_0xc617x9){return handleError(_0xc617x8,_0xc617x9)})};exports[_0x17ae[33]]= function(_0xc617xa,_0xc617x8){var _0xc617xf;return SmsQueue[_0x17ae[33]](_0xc617xa[_0x17ae[37]])[_0x17ae[12]](function(_0xc617xc){_0xc617xf= _0xc617xc;if(_0xc617xa[_0x17ae[37]][_0x17ae[36]]){return _0xc617xf[_0x17ae[39]](_0xc617xa[_0x17ae[37]][_0x17ae[36]],{penalty:_0xc617xa[_0x17ae[37]][_0x17ae[38]]|| 0,queue:_0xc617xf[_0x17ae[29]]})}})[_0x17ae[12]](function(){return _0xc617x8[_0x17ae[9]](201)[_0x17ae[8]](_0xc617xf)})[_0x17ae[11]](sequelize.UniqueConstraintError,function(_0xc617x9){return Util[_0x17ae[35]][_0x17ae[34]](_0xc617x8,_0xc617x9)})[_0x17ae[11]](function(_0xc617x9){return handleError(_0xc617x8,_0xc617x9)})};exports[_0x17ae[40]]= function(_0xc617xa,_0xc617x8){if(_0xc617xa[_0x17ae[37]][_0x17ae[15]]){delete _0xc617xa[_0x17ae[37]][_0x17ae[15]]};return SmsQueue[_0x17ae[17]](_0xc617xa[_0x17ae[25]][_0x17ae[15]])[_0x17ae[12]](function(_0xc617xc){if(!_0xc617xc){return _0xc617x8[_0x17ae[24]](404)};var _0xc617x10=_[_0x17ae[41]](_0xc617xc,_0xc617xa[_0x17ae[37]]);return _0xc617x10[_0x17ae[42]]()})[_0x17ae[12]](function(_0xc617xc){return _0xc617x8[_0x17ae[9]](200)[_0x17ae[8]](_0xc617xc)})[_0x17ae[11]](sequelize.UniqueConstraintError,function(_0xc617x9){return Util[_0x17ae[35]][_0x17ae[34]](_0xc617x8,_0xc617x9)})[_0x17ae[11]](function(_0xc617x9){return handleError(_0xc617x8,_0xc617x9)})};exports[_0x17ae[43]]= function(_0xc617xa,_0xc617x8,_0xc617x11){return SmsQueue[_0x17ae[17]](_0xc617xa[_0x17ae[25]][_0x17ae[15]])[_0x17ae[12]](function(_0xc617xc){if(!_0xc617xc){return _0xc617x8[_0x17ae[24]](404)};var _0xc617x12=_[_0x17ae[44]](_0xc617xa[_0x17ae[37]][_0x17ae[36]],function(_0xc617x13){return {UserId:_0xc617x13,penalty:_0xc617xa[_0x17ae[37]][_0x17ae[38]],SmsQueueId:_0xc617xc[_0x17ae[15]],queue:_0xc617xc[_0x17ae[29]]}});return UserHasSmsQueue[_0x17ae[45]](_0xc617x12,{individualHooks:true})})[_0x17ae[12]](function(){return _0xc617x8[_0x17ae[24]](200)})[_0x17ae[11]](function(_0xc617x9){return handleError(_0xc617x8,_0xc617x9)})};exports[_0x17ae[46]]= function(_0xc617xa,_0xc617x8){return SmsQueue[_0x17ae[17]](_0xc617xa[_0x17ae[25]][_0x17ae[15]])[_0x17ae[12]](function(_0xc617xc){if(_0xc617xc){return _0xc617xc[_0x17ae[47]](_0xc617xa[_0x17ae[13]][_0x17ae[36]],{individualHooks:true})}else {throw  new Error(_0x17ae[48])}})[_0x17ae[12]](function(){return _0xc617x8[_0x17ae[24]](202)})[_0x17ae[11]](function(_0xc617x9){return handleError(_0xc617x8,_0xc617x9)})};exports[_0x17ae[49]]= function(_0xc617xa,_0xc617x8){var _0xc617xf;return SmsQueue[_0x17ae[17]](_0xc617xa[_0x17ae[25]][_0x17ae[15]])[_0x17ae[12]](function(_0xc617xc){_0xc617xf= _0xc617xc;if(!_0xc617xc){return _0xc617x8[_0x17ae[24]](404)};return _0xc617xc[_0x17ae[49]]()})[_0x17ae[12]](function(){return _0xc617x8[_0x17ae[24]](204)})[_0x17ae[11]](sequelize.ForeignKeyConstraintError,function(_0xc617x9){return Util[_0x17ae[35]][_0x17ae[53]](_0xc617x8,_0x17ae[52],_0xc617xf[_0x17ae[29]],_0xc617x9)})[_0x17ae[11]](function(_0xc617x9){console[_0x17ae[51]](_0x17ae[50],_0xc617x9);return handleError(_0xc617x8,_0xc617x9)})};exports[_0x17ae[54]]= function(_0xc617xa,_0xc617x8){return SmsQueue[_0x17ae[49]]({where:{id:_0xc617xa[_0x17ae[13]][_0x17ae[55]]},individualHooks:true})[_0x17ae[12]](function(){return _0xc617x8[_0x17ae[24]](204)})[_0x17ae[11]](function(_0xc617x9){return handleError(_0xc617x8,_0xc617x9)})}
\ No newline at end of file
diff --git a/server/api/sms_queue/sms_queue.events.js b/server/api/sms_queue/sms_queue.events.js
index 31beb9a..6a5955f 100644
--- a/server/api/sms_queue/sms_queue.events.js
+++ b/server/api/sms_queue/sms_queue.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const SmsQueue = require('../../models').SmsQueue;
-
-var SmsQueueEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-SmsQueueEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  SmsQueue.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    SmsQueueEvents.emit(event + ':' + doc._id, doc);
-    SmsQueueEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = SmsQueueEvents;
+var _0xd3a9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6D\x73\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd3a9[0];const EventEmitter=require(_0xd3a9[1]);const SmsQueue=require(_0xd3a9[3])[_0xd3a9[2]];var SmsQueueEvents= new EventEmitter();SmsQueueEvents[_0xd3a9[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd3a9[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd3a9[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd3a9[6]};for(var e in events){var event=events[e];SmsQueue[_0xd3a9[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x33d2x8,_0x33d2x9,_0x33d2xa){SmsQueueEvents[_0xd3a9[10]](event+ _0xd3a9[8]+ _0x33d2x8[_0xd3a9[9]],_0x33d2x8);SmsQueueEvents[_0xd3a9[10]](event,_0x33d2x8);_0x33d2xa(null)}}module[_0xd3a9[11]]= SmsQueueEvents
\ No newline at end of file
diff --git a/server/api/sms_queue/sms_queue.socket.js b/server/api/sms_queue/sms_queue.socket.js
index 2c6c4f1..78ca147 100644
--- a/server/api/sms_queue/sms_queue.socket.js
+++ b/server/api/sms_queue/sms_queue.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const SmsQueueEvents = require('./sms_queue.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('sms_queue:' + event, socket);
-
-    SmsQueueEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    SmsQueueEvents.removeListener(event, listener);
-  };
-}
+var _0x1a13=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x1a13[0];const SmsQueueEvents=require(_0x1a13[1]);var events=[_0x1a13[2],_0x1a13[3]];exports[_0x1a13[4]]= function(_0x8a72x3){for(var _0x8a72x4=0,_0x8a72x5=events[_0x1a13[5]];_0x8a72x4< _0x8a72x5;_0x8a72x4++){var _0x8a72x6=events[_0x8a72x4];var _0x8a72x7=createListener(_0x1a13[6]+ _0x8a72x6,_0x8a72x3);SmsQueueEvents[_0x1a13[7]](_0x8a72x6,_0x8a72x7);_0x8a72x3[_0x1a13[7]](_0x1a13[8],removeListener(_0x8a72x6,_0x8a72x7))}};function createListener(_0x8a72x6,_0x8a72x3){return function(_0x8a72x9){_0x8a72x3[_0x1a13[9]](_0x8a72x6,_0x8a72x9)}}function removeListener(_0x8a72x6,_0x8a72x7){return function(){SmsQueueEvents[_0x1a13[10]](_0x8a72x6,_0x8a72x7)}}
\ No newline at end of file
diff --git a/server/api/sms_room/index.js b/server/api/sms_room/index.js
index 429772f..0476284 100644
--- a/server/api/sms_room/index.js
+++ b/server/api/sms_room/index.js
@@ -1,26 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./sms_room.controller');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.index);
-router.get('/describe', auth.isAuthenticated(), license.isValidDate(), license.hasSms(), auth.hasModule([1, 11], ['admin']), controller.describe);
-router.get('/pending', auth.isAuthenticated(), license.isValidDate(), license.hasSms(), auth.hasModule([11, 17], ['admin']), controller.pending);
-router.get('/new', auth.isAuthenticated(), license.isValidDate(), license.hasSms(), auth.hasModule([11, 17], ['admin']), controller.new);
-router.get('/open', auth.isAuthenticated(), license.isValidDate(), license.hasSms(), auth.hasModule([11, 17], ['admin']), controller.open);
-router.get('/closed', auth.isAuthenticated(), license.isValidDate(), license.hasSms(), auth.hasModule([11, 17], ['admin']), controller.closed);
-router.get('/:id', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.show);
-router.get('/:id/agents', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.showAgents);
-router.get('/messages/:id', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.getRoomByMessage);
-router.post('/', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.create);
-router.post('/:id/messages', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.createMessage);
-router.put('/:id', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.update);
-router.put('/:id/agents', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.updateAgents);
-router.patch('/:id', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.updatePatch);
-router.delete('/:id', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.destroy);
-router.delete('/', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.bulkDestroy);
-module.exports = router;
+var _0x2eb7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x6D\x73\x5F\x72\x6F\x6F\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x53\x6D\x73","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x70\x65\x6E\x64\x69\x6E\x67","\x70\x65\x6E\x64\x69\x6E\x67","\x2F\x6E\x65\x77","\x6E\x65\x77","\x2F\x6F\x70\x65\x6E","\x6F\x70\x65\x6E","\x2F\x63\x6C\x6F\x73\x65\x64","\x63\x6C\x6F\x73\x65\x64","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x2F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F\x3A\x69\x64","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x2eb7[0];var express=require(_0x2eb7[1]);var auth=require(_0x2eb7[2]);var controller=require(_0x2eb7[3]);var license=require(_0x2eb7[4]);var router=express.Router();router[_0x2eb7[13]](_0x2eb7[5],license[_0x2eb7[6]](),license[_0x2eb7[7]](),auth[_0x2eb7[8]](),auth[_0x2eb7[11]]([11],[_0x2eb7[9],_0x2eb7[10]]),controller[_0x2eb7[12]]);router[_0x2eb7[13]](_0x2eb7[14],auth[_0x2eb7[8]](),license[_0x2eb7[6]](),license[_0x2eb7[7]](),auth[_0x2eb7[11]]([1,11],[_0x2eb7[9]]),controller[_0x2eb7[15]]);router[_0x2eb7[13]](_0x2eb7[16],auth[_0x2eb7[8]](),license[_0x2eb7[6]](),license[_0x2eb7[7]](),auth[_0x2eb7[11]]([11,17],[_0x2eb7[9]]),controller[_0x2eb7[17]]);router[_0x2eb7[13]](_0x2eb7[18],auth[_0x2eb7[8]](),license[_0x2eb7[6]](),license[_0x2eb7[7]](),auth[_0x2eb7[11]]([11,17],[_0x2eb7[9]]),controller[_0x2eb7[19]]);router[_0x2eb7[13]](_0x2eb7[20],auth[_0x2eb7[8]](),license[_0x2eb7[6]](),license[_0x2eb7[7]](),auth[_0x2eb7[11]]([11,17],[_0x2eb7[9]]),controller[_0x2eb7[21]]);router[_0x2eb7[13]](_0x2eb7[22],auth[_0x2eb7[8]](),license[_0x2eb7[6]](),license[_0x2eb7[7]](),auth[_0x2eb7[11]]([11,17],[_0x2eb7[9]]),controller[_0x2eb7[23]]);router[_0x2eb7[13]](_0x2eb7[24],license[_0x2eb7[6]](),license[_0x2eb7[7]](),auth[_0x2eb7[8]](),auth[_0x2eb7[11]]([11],[_0x2eb7[9],_0x2eb7[10]]),controller[_0x2eb7[25]]);router[_0x2eb7[13]](_0x2eb7[26],license[_0x2eb7[6]](),license[_0x2eb7[7]](),auth[_0x2eb7[8]](),auth[_0x2eb7[11]]([11],[_0x2eb7[9],_0x2eb7[10]]),controller[_0x2eb7[27]]);router[_0x2eb7[13]](_0x2eb7[28],license[_0x2eb7[6]](),license[_0x2eb7[7]](),auth[_0x2eb7[8]](),auth[_0x2eb7[11]]([11],[_0x2eb7[9],_0x2eb7[10]]),controller[_0x2eb7[29]]);router[_0x2eb7[31]](_0x2eb7[5],license[_0x2eb7[6]](),license[_0x2eb7[7]](),auth[_0x2eb7[8]](),auth[_0x2eb7[11]]([11],[_0x2eb7[9]]),controller[_0x2eb7[30]]);router[_0x2eb7[31]](_0x2eb7[32],license[_0x2eb7[6]](),license[_0x2eb7[7]](),auth[_0x2eb7[8]](),auth[_0x2eb7[11]]([11],[_0x2eb7[9]]),controller[_0x2eb7[33]]);router[_0x2eb7[35]](_0x2eb7[24],license[_0x2eb7[6]](),license[_0x2eb7[7]](),auth[_0x2eb7[8]](),auth[_0x2eb7[11]]([11],[_0x2eb7[9],_0x2eb7[10]]),controller[_0x2eb7[34]]);router[_0x2eb7[35]](_0x2eb7[26],license[_0x2eb7[6]](),license[_0x2eb7[7]](),auth[_0x2eb7[8]](),auth[_0x2eb7[11]]([11],[_0x2eb7[9],_0x2eb7[10]]),controller[_0x2eb7[36]]);router[_0x2eb7[38]](_0x2eb7[24],license[_0x2eb7[6]](),license[_0x2eb7[7]](),auth[_0x2eb7[8]](),auth[_0x2eb7[11]]([11],[_0x2eb7[9],_0x2eb7[10]]),controller[_0x2eb7[37]]);router[_0x2eb7[40]](_0x2eb7[24],license[_0x2eb7[6]](),license[_0x2eb7[7]](),auth[_0x2eb7[8]](),auth[_0x2eb7[11]]([11],[_0x2eb7[9]]),controller[_0x2eb7[39]]);router[_0x2eb7[40]](_0x2eb7[5],license[_0x2eb7[6]](),license[_0x2eb7[7]](),auth[_0x2eb7[8]](),auth[_0x2eb7[11]]([11],[_0x2eb7[9]]),controller[_0x2eb7[41]]);module[_0x2eb7[42]]= router
\ No newline at end of file
diff --git a/server/api/sms_room/sms_room.controller.js b/server/api/sms_room/sms_room.controller.js
index e3946f0..736e2cd 100644
--- a/server/api/sms_room/sms_room.controller.js
+++ b/server/api/sms_room/sms_room.controller.js
@@ -1,399 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/sms/rooms              ->  index
- * POST    /api/sms/rooms              ->  create
- * GET     /api/sms/rooms/:id          ->  show
- * PUT     /api/sms/rooms/:id          ->  update
- * DELETE  /api/sms/rooms/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-var moment = require('moment');
-
-var SmsRoom = require('../../models').SmsRoom;
-var User = require('../../models').User;
-var SmsMessage = require('../../models').SmsMessage;
-var SmsAccount = require('../../models').SmsAccount;
-var User = require('../../models').User;
-var SmsApplication = require('../../models').SmsApplication;
-var SmsQueue = require('../../models').SmsQueue;
-
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-
-
-// Gets a list of SmsRooms
-exports.index = function(req, res) {
-  switch (req.user.role) {
-    case 'agent':
-      return SmsRoom
-        .scope('default', {
-          method: ['agent', req.user.id]
-        })
-        .findAndCountAll(Util.getQuery(req.query))
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-
-    default:
-      return SmsRoom
-        .scope('default')
-        .findAndCountAll(Util.getQuery(req.query))
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-  }
-}
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return SmsRoom
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function getSmsQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return User
-          .findById(user.id, {
-            attributes: ['id']
-          })
-          .then(Util.getSmsQueuesIdByUser({}, {
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: User,
-              attributes: ['id']
-            }]
-          }))
-          .then(function(userQueues) {
-            return {
-              include: {
-                model: SmsAccount,
-                include: {
-                  model: SmsApplication,
-                  include: {
-                    model: SmsQueue,
-                    where: {
-                      id: _.map(userQueues, 'id')
-                    }
-                  }
-                }
-              }
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
-
-exports.pending = function(req, res) {
-  return Promise
-    .all([])
-    .then(getSmsQueues(req.user))
-    .then(function(condition) {
-      return SmsRoom
-        .count(_.merge(Util.getQuery(req.query, {
-          status: 'PENDING',
-          updatedAt: {
-            $gte: moment().startOf('day')
-          }
-        }), condition));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.new = function(req, res) {
-  return Promise
-    .all([])
-    .then(getSmsQueues(req.user))
-    .then(function(condition) {
-      return SmsRoom
-        .count(_.merge(Util.getQuery(req.query, {
-          status: 'NEW',
-          updatedAt: {
-            $gte: moment().startOf('day')
-          }
-        }), condition));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.open = function(req, res) {
-  return Promise
-    .all([])
-    .then(getSmsQueues(req.user))
-    .then(function(condition) {
-      return SmsRoom
-        .count(_.merge(Util.getQuery(req.query, {
-          status: 'OPEN',
-          updatedAt: {
-            $gte: moment().startOf('day')
-          }
-        }), condition));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.closed = function(req, res) {
-  return Promise
-    .all([])
-    .then(getSmsQueues(req.user))
-    .then(function(condition) {
-      return SmsRoom
-        .count(_.merge(Util.getQuery(req.query, {
-          status: 'CLOSED',
-          updatedAt: {
-            $gte: moment().startOf('day')
-          }
-        }), condition));
-    })
-    .then(function(data) {
-      return res.status(200).send({
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Gets a single SmsRoom from the DB
-exports.show = function(req, res) {
-  return SmsRoom
-    .scope('default')
-    .findById(req.params.id)
-    .then(function(smsRoom) {
-      if (!smsRoom) {
-        return res.sendStatus(404);
-      }
-      return res.send(smsRoom);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-exports.showAgents = function(req, res, next) {
-  return SmsRoom
-    .findById(req.params.id)
-    .then(function(smsRoom) {
-      if (!smsRoom) {
-        return res.sendStatus(404);
-      }
-
-      return smsRoom
-        .getUsers({
-          attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal']
-        });
-    })
-    .then(function(users) {
-      return res.send(users);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-exports.getRoomByMessage = function(req, res, next) {
-  return SmsMessage
-    .findById(req.params.id)
-    .then(function(Message) {
-      return Message
-        .getSmsRoom({
-          include: [{
-            model: SmsAccount
-          }, {
-            model: SmsMessage,
-            include: [{
-              model: User,
-              attributes: ['id', 'name', 'fullname', 'email']
-            }]
-          }, {
-            model: User,
-            attributes: ['id', 'name', 'fullname', 'email']
-          }]
-        });
-    })
-    .then(function(Room) {
-      // console.log('room', Room);
-      return res.send(Room);
-    })
-    .catch(function(err) {
-      console.log('err', err);
-      return handleError(res, err);
-    });
-};
-// Creates a new SmsRoom in the DB
-exports.create = function(req, res) {
-
-  return SmsRoom
-    .create(req.body)
-    .then(function(smsMessage) {
-      return res.status(201).send(smsMessage);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-
-// Creates a new mailMessage in the DB.
-exports.createMessage = function(req, res, next) {
-  req.body.UserId = req.user.id;
-  req.body.SmsRoomId = req.params.id;
-  return SmsMessage
-    .create(req.body)
-    .then(function(smsMessage) {
-      return res.status(201).send(smsMessage);
-    }).catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Updates an existing SmsRoom in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return SmsRoom
-    .findById(req.params.id)
-    .then(function(smsRoom) {
-      if (!smsRoom) {
-        return res.sendStatus(404);
-      }
-
-      var updated = _.merge(smsRoom, req.body);
-
-      return updated
-        .save();
-    })
-    .then(function(smsRoom) {
-      return res.status(200).send(smsRoom);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-exports.updateAgents = function(req, res, next) {
-  return SmsRoom
-    .findById(req.params.id)
-    .then(function(smsRoom) {
-      if (!smsRoom) {
-        return res.sendStatus(404);
-      }
-
-      return smsRoom
-        .setUsers(req.body.agents, {
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a SmsRoom from the DB
-exports.destroy = function(req, res) {
-  return SmsRoom
-    .findById(req.params.id)
-    .then(function(smsRoom) {
-      if (!smsRoom) {
-        return res.sendStatus(404);
-      }
-      return smsRoom.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-exports.bulkDestroy = function(req, res) {
-  return SmsRoom
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-exports.updatePatch = function(req, res, next) {
-  var _options = {
-    where: {
-      id: req.params.id.split(',')
-    },
-    user: req.user,
-    individualHooks: true
-  };
-
-  return SmsRoom
-    .update(req.body, _options)
-    .then(function(smsRooms) {
-      if (!smsRooms) {
-        return res.sendStatus(404);
-      }
-      return smsRooms
-    })
-    .then(function(smsRooms) {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
+var _0x4ebd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x53\x6D\x73\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x61\x67\x65\x6E\x74","\x69\x64","\x75\x73\x65\x72","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x6D\x61\x70","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x70\x65\x6E\x64\x69\x6E\x67","\x6C\x6F\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x6E\x65\x77","\x4E\x45\x57","\x6F\x70\x65\x6E","\x4F\x50\x45\x4E","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x65\x72\x72","\x67\x65\x74\x53\x6D\x73\x52\x6F\x6F\x6D","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x53\x6D\x73\x52\x6F\x6F\x6D\x49\x64","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x2C","\x73\x70\x6C\x69\x74"];_0x4ebd[0];var _=require(_0x4ebd[1]);var Util=require(_0x4ebd[2]);var moment=require(_0x4ebd[3]);var SmsRoom=require(_0x4ebd[5])[_0x4ebd[4]];var User=require(_0x4ebd[5])[_0x4ebd[6]];var SmsMessage=require(_0x4ebd[5])[_0x4ebd[7]];var SmsAccount=require(_0x4ebd[5])[_0x4ebd[8]];var User=require(_0x4ebd[5])[_0x4ebd[6]];var SmsApplication=require(_0x4ebd[5])[_0x4ebd[9]];var SmsQueue=require(_0x4ebd[5])[_0x4ebd[10]];function handleError(_0x2621xb,_0x2621xc){return _0x2621xb[_0x4ebd[12]](500)[_0x4ebd[11]](_0x2621xc)}exports[_0x4ebd[13]]= function(_0x2621xd,_0x2621xb){switch(_0x2621xd[_0x4ebd[22]][_0x4ebd[24]]){case _0x4ebd[20]:return SmsRoom[_0x4ebd[23]](_0x4ebd[19],{method:[_0x4ebd[20],_0x2621xd[_0x4ebd[22]][_0x4ebd[21]]]})[_0x4ebd[18]](Util[_0x4ebd[17]](_0x2621xd[_0x4ebd[16]]))[_0x4ebd[15]](function(_0x2621xe){return _0x2621xb[_0x4ebd[12]](200)[_0x4ebd[11]](_0x2621xe)})[_0x4ebd[14]](function(_0x2621xc){return handleError(_0x2621xb,_0x2621xc)});default:return SmsRoom[_0x4ebd[23]](_0x4ebd[19])[_0x4ebd[18]](Util[_0x4ebd[17]](_0x2621xd[_0x4ebd[16]]))[_0x4ebd[15]](function(_0x2621xe){return _0x2621xb[_0x4ebd[12]](200)[_0x4ebd[11]](_0x2621xe)})[_0x4ebd[14]](function(_0x2621xc){return handleError(_0x2621xb,_0x2621xc)})}};exports[_0x4ebd[25]]= function(_0x2621xd,_0x2621xb){return SmsRoom[_0x4ebd[25]]()[_0x4ebd[15]](function(_0x2621xf){return _0x2621xb[_0x4ebd[12]](200)[_0x4ebd[11]](_0x2621xf)})[_0x4ebd[14]](function(_0x2621xc){return handleError(_0x2621xb,_0x2621xc)})};function getSmsQueues(_0x2621x11){return function(){switch(_0x2621x11[_0x4ebd[24]]){case _0x4ebd[22]:return User[_0x4ebd[28]](_0x2621x11[_0x4ebd[21]],{attributes:[_0x4ebd[21]]})[_0x4ebd[15]](Util[_0x4ebd[27]]({},{attributes:[_0x4ebd[21]],include:[{raw:true,model:User,attributes:[_0x4ebd[21]]}]}))[_0x4ebd[15]](function(_0x2621x12){return {include:{model:SmsAccount,include:{model:SmsApplication,include:{model:SmsQueue,where:{id:_[_0x4ebd[26]](_0x2621x12,_0x4ebd[21])}}}}}});default:return {}}}}exports[_0x4ebd[29]]= function(_0x2621xd,_0x2621xb){return Promise[_0x4ebd[36]]([])[_0x4ebd[15]](getSmsQueues(_0x2621xd[_0x4ebd[22]]))[_0x4ebd[15]](function(_0x2621x14){return SmsRoom[_0x4ebd[35]](_[_0x4ebd[34]](Util[_0x4ebd[17]](_0x2621xd[_0x4ebd[16]],{status:_0x4ebd[31],updatedAt:{$gte:moment()[_0x4ebd[33]](_0x4ebd[32])}}),_0x2621x14))})[_0x4ebd[15]](function(_0x2621x13){return _0x2621xb[_0x4ebd[12]](200)[_0x4ebd[11]]({value:_0x2621x13})})[_0x4ebd[14]](function(_0x2621xc){console[_0x4ebd[30]](_0x2621xc);return handleError(_0x2621xb,_0x2621xc)})};exports[_0x4ebd[37]]= function(_0x2621xd,_0x2621xb){return Promise[_0x4ebd[36]]([])[_0x4ebd[15]](getSmsQueues(_0x2621xd[_0x4ebd[22]]))[_0x4ebd[15]](function(_0x2621x14){return SmsRoom[_0x4ebd[35]](_[_0x4ebd[34]](Util[_0x4ebd[17]](_0x2621xd[_0x4ebd[16]],{status:_0x4ebd[38],updatedAt:{$gte:moment()[_0x4ebd[33]](_0x4ebd[32])}}),_0x2621x14))})[_0x4ebd[15]](function(_0x2621x13){return _0x2621xb[_0x4ebd[12]](200)[_0x4ebd[11]]({value:_0x2621x13})})[_0x4ebd[14]](function(_0x2621xc){console[_0x4ebd[30]](_0x2621xc);return handleError(_0x2621xb,_0x2621xc)})};exports[_0x4ebd[39]]= function(_0x2621xd,_0x2621xb){return Promise[_0x4ebd[36]]([])[_0x4ebd[15]](getSmsQueues(_0x2621xd[_0x4ebd[22]]))[_0x4ebd[15]](function(_0x2621x14){return SmsRoom[_0x4ebd[35]](_[_0x4ebd[34]](Util[_0x4ebd[17]](_0x2621xd[_0x4ebd[16]],{status:_0x4ebd[40],updatedAt:{$gte:moment()[_0x4ebd[33]](_0x4ebd[32])}}),_0x2621x14))})[_0x4ebd[15]](function(_0x2621x13){return _0x2621xb[_0x4ebd[12]](200)[_0x4ebd[11]]({value:_0x2621x13})})[_0x4ebd[14]](function(_0x2621xc){console[_0x4ebd[30]](_0x2621xc);return handleError(_0x2621xb,_0x2621xc)})};exports[_0x4ebd[41]]= function(_0x2621xd,_0x2621xb){return Promise[_0x4ebd[36]]([])[_0x4ebd[15]](getSmsQueues(_0x2621xd[_0x4ebd[22]]))[_0x4ebd[15]](function(_0x2621x14){return SmsRoom[_0x4ebd[35]](_[_0x4ebd[34]](Util[_0x4ebd[17]](_0x2621xd[_0x4ebd[16]],{status:_0x4ebd[42],updatedAt:{$gte:moment()[_0x4ebd[33]](_0x4ebd[32])}}),_0x2621x14))})[_0x4ebd[15]](function(_0x2621x13){return _0x2621xb[_0x4ebd[12]](200)[_0x4ebd[11]]({value:_0x2621x13})})[_0x4ebd[14]](function(_0x2621xc){console[_0x4ebd[30]](_0x2621xc);return handleError(_0x2621xb,_0x2621xc)})};exports[_0x4ebd[43]]= function(_0x2621xd,_0x2621xb){return SmsRoom[_0x4ebd[23]](_0x4ebd[19])[_0x4ebd[28]](_0x2621xd[_0x4ebd[45]][_0x4ebd[21]])[_0x4ebd[15]](function(_0x2621x15){if(!_0x2621x15){return _0x2621xb[_0x4ebd[44]](404)};return _0x2621xb[_0x4ebd[11]](_0x2621x15)})[_0x4ebd[14]](function(_0x2621xc){return handleError(_0x2621xb,_0x2621xc)})};exports[_0x4ebd[46]]= function(_0x2621xd,_0x2621xb,_0x2621x16){return SmsRoom[_0x4ebd[28]](_0x2621xd[_0x4ebd[45]][_0x4ebd[21]])[_0x4ebd[15]](function(_0x2621x15){if(!_0x2621x15){return _0x2621xb[_0x4ebd[44]](404)};return _0x2621x15[_0x4ebd[51]]({attributes:[_0x4ebd[21],_0x4ebd[47],_0x4ebd[48],_0x4ebd[49],_0x4ebd[24],_0x4ebd[50]]})})[_0x4ebd[15]](function(_0x2621x17){return _0x2621xb[_0x4ebd[11]](_0x2621x17)})[_0x4ebd[14]](function(_0x2621xc){return handleError(_0x2621xb,_0x2621xc)})};exports[_0x4ebd[52]]= function(_0x2621xd,_0x2621xb,_0x2621x16){return SmsMessage[_0x4ebd[28]](_0x2621xd[_0x4ebd[45]][_0x4ebd[21]])[_0x4ebd[15]](function(_0x2621x19){return _0x2621x19[_0x4ebd[54]]({include:[{model:SmsAccount},{model:SmsMessage,include:[{model:User,attributes:[_0x4ebd[21],_0x4ebd[47],_0x4ebd[48],_0x4ebd[49]]}]},{model:User,attributes:[_0x4ebd[21],_0x4ebd[47],_0x4ebd[48],_0x4ebd[49]]}]})})[_0x4ebd[15]](function(_0x2621x18){return _0x2621xb[_0x4ebd[11]](_0x2621x18)})[_0x4ebd[14]](function(_0x2621xc){console[_0x4ebd[30]](_0x4ebd[53],_0x2621xc);return handleError(_0x2621xb,_0x2621xc)})};exports[_0x4ebd[55]]= function(_0x2621xd,_0x2621xb){return SmsRoom[_0x4ebd[55]](_0x2621xd[_0x4ebd[56]])[_0x4ebd[15]](function(_0x2621x1a){return _0x2621xb[_0x4ebd[12]](201)[_0x4ebd[11]](_0x2621x1a)})[_0x4ebd[14]](function(_0x2621xc){return handleError(_0x2621xb,_0x2621xc)})};exports[_0x4ebd[57]]= function(_0x2621xd,_0x2621xb,_0x2621x16){_0x2621xd[_0x4ebd[56]][_0x4ebd[58]]= _0x2621xd[_0x4ebd[22]][_0x4ebd[21]];_0x2621xd[_0x4ebd[56]][_0x4ebd[59]]= _0x2621xd[_0x4ebd[45]][_0x4ebd[21]];return SmsMessage[_0x4ebd[55]](_0x2621xd[_0x4ebd[56]])[_0x4ebd[15]](function(_0x2621x1a){return _0x2621xb[_0x4ebd[12]](201)[_0x4ebd[11]](_0x2621x1a)})[_0x4ebd[14]](function(_0x2621xc){return handleError(_0x2621xb,_0x2621xc)})};exports[_0x4ebd[60]]= function(_0x2621xd,_0x2621xb){if(_0x2621xd[_0x4ebd[56]][_0x4ebd[21]]){delete _0x2621xd[_0x4ebd[56]][_0x4ebd[21]]};return SmsRoom[_0x4ebd[28]](_0x2621xd[_0x4ebd[45]][_0x4ebd[21]])[_0x4ebd[15]](function(_0x2621x15){if(!_0x2621x15){return _0x2621xb[_0x4ebd[44]](404)};var _0x2621x1b=_[_0x4ebd[34]](_0x2621x15,_0x2621xd[_0x4ebd[56]]);return _0x2621x1b[_0x4ebd[61]]()})[_0x4ebd[15]](function(_0x2621x15){return _0x2621xb[_0x4ebd[12]](200)[_0x4ebd[11]](_0x2621x15)})[_0x4ebd[14]](function(_0x2621xc){return handleError(_0x2621xb,_0x2621xc)})};exports[_0x4ebd[62]]= function(_0x2621xd,_0x2621xb,_0x2621x16){return SmsRoom[_0x4ebd[28]](_0x2621xd[_0x4ebd[45]][_0x4ebd[21]])[_0x4ebd[15]](function(_0x2621x15){if(!_0x2621x15){return _0x2621xb[_0x4ebd[44]](404)};return _0x2621x15[_0x4ebd[64]](_0x2621xd[_0x4ebd[56]][_0x4ebd[63]],{individualHooks:true})})[_0x4ebd[15]](function(){return _0x2621xb[_0x4ebd[44]](200)})[_0x4ebd[14]](function(_0x2621xc){return handleError(_0x2621xb,_0x2621xc)})};exports[_0x4ebd[65]]= function(_0x2621xd,_0x2621xb){return SmsRoom[_0x4ebd[28]](_0x2621xd[_0x4ebd[45]][_0x4ebd[21]])[_0x4ebd[15]](function(_0x2621x15){if(!_0x2621x15){return _0x2621xb[_0x4ebd[44]](404)};return _0x2621x15[_0x4ebd[65]]()})[_0x4ebd[15]](function(){return _0x2621xb[_0x4ebd[44]](204)})[_0x4ebd[14]](function(_0x2621xc){return handleError(_0x2621xb,_0x2621xc)})};exports[_0x4ebd[66]]= function(_0x2621xd,_0x2621xb){return SmsRoom[_0x4ebd[65]]({where:{id:_0x2621xd[_0x4ebd[16]][_0x4ebd[67]]},individualHooks:true})[_0x4ebd[15]](function(){return _0x2621xb[_0x4ebd[44]](200)})[_0x4ebd[14]](function(_0x2621xc){return handleError(_0x2621xb,_0x2621xc)})};exports[_0x4ebd[68]]= function(_0x2621xd,_0x2621xb,_0x2621x16){var _0x2621x1c={where:{id:_0x2621xd[_0x4ebd[45]][_0x4ebd[21]][_0x4ebd[70]](_0x4ebd[69])},user:_0x2621xd[_0x4ebd[22]],individualHooks:true};return SmsRoom[_0x4ebd[60]](_0x2621xd[_0x4ebd[56]],_0x2621x1c)[_0x4ebd[15]](function(_0x2621x1d){if(!_0x2621x1d){return _0x2621xb[_0x4ebd[44]](404)};return _0x2621x1d})[_0x4ebd[15]](function(_0x2621x1d){return _0x2621xb[_0x4ebd[44]](200)})[_0x4ebd[14]](function(_0x2621xc){return handleError(_0x2621xb,_0x2621xc)})}
\ No newline at end of file
diff --git a/server/api/sms_room/sms_room.events.js b/server/api/sms_room/sms_room.events.js
index a1390fd..2ce3682 100644
--- a/server/api/sms_room/sms_room.events.js
+++ b/server/api/sms_room/sms_room.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const SmsRoom = require('../../models').SmsRoom;
-
-var SmsRoomEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-SmsRoomEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  SmsRoom.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    SmsRoomEvents.emit(event + ':' + doc._id, doc);
-    SmsRoomEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = SmsRoomEvents;
+var _0x9c7e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6D\x73\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9c7e[0];const EventEmitter=require(_0x9c7e[1]);const SmsRoom=require(_0x9c7e[3])[_0x9c7e[2]];var SmsRoomEvents= new EventEmitter();SmsRoomEvents[_0x9c7e[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x9c7e[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x9c7e[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x9c7e[6]};for(var e in events){var event=events[e];SmsRoom[_0x9c7e[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x66cex8,_0x66cex9,_0x66cexa){SmsRoomEvents[_0x9c7e[10]](event+ _0x9c7e[8]+ _0x66cex8[_0x9c7e[9]],_0x66cex8);SmsRoomEvents[_0x9c7e[10]](event,_0x66cex8);_0x66cexa(null)}}module[_0x9c7e[11]]= SmsRoomEvents
\ No newline at end of file
diff --git a/server/api/sms_room/sms_room.socket.js b/server/api/sms_room/sms_room.socket.js
index fe08042..20576e0 100644
--- a/server/api/sms_room/sms_room.socket.js
+++ b/server/api/sms_room/sms_room.socket.js
@@ -1,33 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const SmsRoomEvents = require('./sms_room.events');
-
-// Model events to emit
-var events = ['save', 'save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('sms_room:' + event, socket);
-
-    SmsRoomEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-
-function removeListener(event, listener) {
-  return function() {
-    SmsRoomEvents.removeListener(event, listener);
-  };
-}
+var _0xd987=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6D\x73\x5F\x72\x6F\x6F\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6D\x73\x5F\x72\x6F\x6F\x6D\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xd987[0];const SmsRoomEvents=require(_0xd987[1]);var events=[_0xd987[2],_0xd987[2],_0xd987[3]];exports[_0xd987[4]]= function(_0x91d6x3){for(var _0x91d6x4=0,_0x91d6x5=events[_0xd987[5]];_0x91d6x4< _0x91d6x5;_0x91d6x4++){var _0x91d6x6=events[_0x91d6x4];var _0x91d6x7=createListener(_0xd987[6]+ _0x91d6x6,_0x91d6x3);SmsRoomEvents[_0xd987[7]](_0x91d6x6,_0x91d6x7);_0x91d6x3[_0xd987[7]](_0xd987[8],removeListener(_0x91d6x6,_0x91d6x7))}};function createListener(_0x91d6x6,_0x91d6x3){return function(_0x91d6x9){_0x91d6x3[_0xd987[9]](_0x91d6x6,_0x91d6x9)}}function removeListener(_0x91d6x6,_0x91d6x7){return function(){SmsRoomEvents[_0xd987[10]](_0x91d6x6,_0x91d6x7)}}
\ No newline at end of file
diff --git a/server/api/sound/index.js b/server/api/sound/index.js
index ac4a804..7cd9fdb 100644
--- a/server/api/sound/index.js
+++ b/server/api/sound/index.js
@@ -1,17 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./sound.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([13, 7], ['admin']), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show);
-router.get('/:id/download', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.download);
-router.get('/:id/stream', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.stream);
-router.post('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0x42ef=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x73\x6F\x75\x6E\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x2F\x3A\x69\x64\x2F\x73\x74\x72\x65\x61\x6D","\x73\x74\x72\x65\x61\x6D","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x42ef[0];var express=require(_0x42ef[1]);var controller=require(_0x42ef[2]);var auth=require(_0x42ef[3]);var router=express.Router();router[_0x42ef[9]](_0x42ef[4],auth[_0x42ef[5]](),auth[_0x42ef[7]]([13,7],[_0x42ef[6]]),controller[_0x42ef[8]]);router[_0x42ef[9]](_0x42ef[10],auth[_0x42ef[5]](),auth[_0x42ef[7]]([13],[_0x42ef[6]]),controller[_0x42ef[11]]);router[_0x42ef[9]](_0x42ef[12],auth[_0x42ef[5]](),auth[_0x42ef[7]]([13],[_0x42ef[6]]),controller[_0x42ef[13]]);router[_0x42ef[9]](_0x42ef[14],auth[_0x42ef[5]](),auth[_0x42ef[7]]([13],[_0x42ef[6]]),controller[_0x42ef[15]]);router[_0x42ef[17]](_0x42ef[4],auth[_0x42ef[5]](),auth[_0x42ef[7]]([13],[_0x42ef[6]]),controller[_0x42ef[16]]);router[_0x42ef[19]](_0x42ef[10],auth[_0x42ef[5]](),auth[_0x42ef[7]]([13],[_0x42ef[6]]),controller[_0x42ef[18]]);router[_0x42ef[21]](_0x42ef[10],auth[_0x42ef[5]](),auth[_0x42ef[7]]([13],[_0x42ef[6]]),controller[_0x42ef[20]]);module[_0x42ef[22]]= router
\ No newline at end of file
diff --git a/server/api/sound/sound.controller.js b/server/api/sound/sound.controller.js
index 6d5f78f..c5b5178 100644
--- a/server/api/sound/sound.controller.js
+++ b/server/api/sound/sound.controller.js
@@ -1,278 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Sound = require('../../models').Sound;
-var uploadFile = require('upload-file');
-var sr = require('simple-random');
-var sox = require('sox');
-var path = require('path');
-var config = require('../../config/environment');
-var fs = require('fs');
-var sequelize = require('../../models').sequelize;
-var base64 = require('file-base64');
-var Promise = require('bluebird');
-var Setting = require('../../models').Setting;
-
-// Get list of Sounds
-exports.index = function(req, res) {
-  return Sound
-    .findAndCountAll()
-    .then(function(Sounds) {
-      return res.status(200).send(Sounds);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single Sound
-exports.show = function(req, res) {
-  return Sound
-    .findById(req.params.id)
-    .then(function(Sound) {
-      if (!Sound) {
-        return res.sendStatus(404);
-      }
-      return res.send(Sound);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new Sound in the DB.
-exports.create = function(req, res) {
-  var upload = new uploadFile({
-    dest: path.join(config.originalSounds),
-    maxFileSize: 15 * 1000000,
-    maxNumberOfFiles: 10,
-    minNumberOfFiles: 0,
-    acceptFileTypes: /(\.|\/)(wav|mp3|gsm|ogg)$/i,
-    rename: function(name, file) {
-      return sr() + path.extname(file.filename);
-    },
-    messages: {
-      maxNumberOfFiles: "Max number of files upload exceeded",
-      acceptFileTypes: "Only wav,mp3,gsm, and ogg format accepted",
-      maxFileSize: "The maximum file size is 15 Mb",
-      invalidRequest: "Invalid request"
-    }
-  });
-
-  upload.on('end', function(fields, files) {
-    if (!files.file.filename) {
-      return res.status(500).send(upload);
-    }
-
-    return Setting
-      .findById(1)
-      .then(function(settings) {
-        var job_details = {};
-        var original_format = path.extname(files.file.filename);
-        job_details.description = "";
-        job_details.original_format = path.extname(files.file.filename).substring(1);
-        job_details.converted_format = 'wav';
-        job_details.name = job_details.display_name = path.basename(files.file.path, original_format);
-        job_details.save_name = path.basename(files.file.filename, original_format);
-
-
-
-        var filepath = path.join(config.originalSounds, job_details.save_name + original_format);
-        var destination = path.join(settings.soundPath || '/var/opt/motion/server/files/sounds/converted', job_details.save_name + '.' + job_details.converted_format);
-        //
-
-        fs.chmodSync(filepath, parseInt('0777', 8));
-        sox.identify(filepath, function(err, result) {
-          // console.log('************** Result: ', result);
-        });
-
-        var job = sox.transcode(filepath, destination, {
-          sampleRate: 8000,
-          format: 'wav',
-          channelCount: 1,
-          bitRate: 192 * 1024,
-          compressionQuality: 5,
-        });
-
-
-
-        job.on('error', function(err) {
-          console.error('********** Conversion Error: ', err);
-          fs.unlink(filepath, function(err) {
-            if (err)
-              return handleError(res, err);
-          });
-          return handleError(res, err);
-        });
-
-        job.on('progress', function(amountDone, amountTotal) {
-          // console.log("*********** Progress", amountDone, amountTotal);
-        });
-
-        job.on('src', function(info) {
-          // console.log('********** src: ', info);
-          /* info looks like:
-          {
-            format: 'wav',
-            duration: 1.5,
-            sampleCount: 66150,
-            channelCount: 1,
-            bitRate: 722944,
-            sampleRate: 44100,
-          }
-          */
-          job_details.original_duration = isNaN(info.duration) ? null : info.duration * 1000;
-          job_details.original_sampleCount = isNaN(info.sampleCount) ? null : info.sampleCount;
-          job_details.original_channelCount = isNaN(info.channelCount) ? null : info.channelCount;
-          job_details.original_bitRate = isNaN(info.bitRate) ? null : info.bitRate;
-          job_details.original_sampleRate = isNaN(info.sampleRate) ? null : info.sampleRate;
-        });
-
-        job.on('dest', function(info) {
-          // console.log('********** dest: ', info);
-          /* info looks like:
-          {
-            sampleRate: 44100,
-            format: 'mp3',
-            channelCount: 2,
-            sampleCount: 67958,
-            duration: 1.540998,
-            bitRate: 196608,
-          }
-          */
-          job_details.converted_duration = isNaN(info.duration) ? null : info.duration * 1000;
-          job_details.converted_sampleCount = isNaN(info.sampleCount) ? null : info.sampleCount;
-          job_details.converted_channelCount = isNaN(info.channelCount) ? null : info.channelCount;
-          job_details.converted_bitRate = isNaN(info.bitRate) ? null : info.bitRate;
-          job_details.converted_sampleRate = isNaN(info.sampleRate) ? null : info.sampleRate;
-        });
-
-        job.on('end', function() {
-          console.log("Conversion completed");
-          fs.chmodSync(destination, parseInt('0777', 8));
-          return Sound
-            .create(job_details)
-            .then(function(sound) {
-              return res.status(201).send(sound);
-            })
-            .catch(function(err) {
-              console.log(err);
-              return handleError(res, err);
-            });
-        });
-
-        job.start();
-      })
-      .catch(function(err) {
-        return handleError(res, err);
-      });
-
-
-  });
-
-  upload.on('error', function(err) {
-    console.log('********** Upload error :', err)
-    return handleError(res, err);
-  });
-
-  upload.parse(req);
-};
-
-// Updates an existing upload in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return Sound
-    .findById(req.params.id)
-    .then(function(sound) {
-      if (!sound) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(sound, req.body);
-      return updated.save();
-    })
-    .then(function(sound) {
-      return res.status(200).send(sound);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a Sound from the DB.
-exports.destroy = function(req, res) {
-  var _settings;
-  return Setting
-    .findById(1)
-    .then(function(settings) {
-      _settings = settings;
-      return Sound
-        .findById(req.params.id);
-    })
-    .then(function(sound) {
-      if (!sound) {
-        return res.sendStatus(404);
-      }
-      var original_filepath = path.join(config.originalSounds, sound.save_name + '.' + sound.original_format);
-      var converted_filepath = path.join(_settings.soundPath || '/var/opt/motion/server/files/sounds/converted', sound.save_name + '.' + sound.converted_format);
-      return sequelize.transaction(function(t) {
-          return sound.destroy({
-              transaction: t
-            })
-            .then(function() {
-              fs.unlink(original_filepath, function(err) {
-                if (err)
-                  console.log(err);
-              });
-              fs.unlink(converted_filepath, function(err) {
-                if (err)
-                  console.log(err);
-              });
-              return res.status(200).send(sound);
-            })
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-//Download an uploaded file
-exports.download = function(req, res) {
-  getStream(req, res, 'original');
-};
-
-//Stream an uploaded file
-exports.stream = function(req, res) {
-  getStream(req, res, 'converted');
-}
-
-
-function getStream(req, res, value) {
-  return Sound
-    .findById(req.params.id)
-    .then(function(sound) {
-      var readFile = Promise.promisify(fs.readFile);
-      return readFile(path.join(config[value + 'Sounds'], sound.save_name + '.' + sound[value + '_format']));
-    })
-    .then(function(result) {
-      var base64String = new Buffer(result, 'binary').toString('base64');
-      return base64String;
-    })
-    .then(function(base64String) {
-      return res.status(200).send({
-        downloadString: base64String
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-}
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xf791=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x6F\x75\x6E\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x73\x6F\x78","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x66\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x62\x6C\x75\x65\x62\x69\x72\x64","\x53\x65\x74\x74\x69\x6E\x67","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x53\x6F\x75\x6E\x64\x73","\x6A\x6F\x69\x6E","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x77\x61\x76\x2C\x6D\x70\x33\x2C\x67\x73\x6D\x2C\x20\x61\x6E\x64\x20\x6F\x67\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x54\x68\x65\x20\x6D\x61\x78\x69\x6D\x75\x6D\x20\x66\x69\x6C\x65\x20\x73\x69\x7A\x65\x20\x69\x73\x20\x31\x35\x20\x4D\x62","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x66\x6F\x72\x6D\x61\x74","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x66\x6F\x72\x6D\x61\x74","\x77\x61\x76","\x6E\x61\x6D\x65","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x73\x6F\x75\x6E\x64\x50\x61\x74\x68","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x2E","\x30\x37\x37\x37","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x69\x64\x65\x6E\x74\x69\x66\x79","\x74\x72\x61\x6E\x73\x63\x6F\x64\x65","\x65\x72\x72\x6F\x72","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x43\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x45\x72\x72\x6F\x72\x3A\x20","\x75\x6E\x6C\x69\x6E\x6B","\x6F\x6E","\x70\x72\x6F\x67\x72\x65\x73\x73","\x73\x72\x63","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x62\x69\x74\x52\x61\x74\x65","\x62\x69\x74\x52\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x64\x65\x73\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x62\x69\x74\x52\x61\x74\x65","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x43\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x6C\x6F\x67","\x73\x74\x61\x72\x74","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x55\x70\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72\x20\x3A","\x70\x61\x72\x73\x65","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x6F\x72\x69\x67\x69\x6E\x61\x6C","\x73\x74\x72\x65\x61\x6D","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x62\x61\x73\x65\x36\x34","\x62\x69\x6E\x61\x72\x79","\x72\x65\x61\x64\x46\x69\x6C\x65","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x53\x6F\x75\x6E\x64\x73","\x5F\x66\x6F\x72\x6D\x61\x74"];_0xf791[0];var _=require(_0xf791[1]);var Sound=require(_0xf791[3])[_0xf791[2]];var uploadFile=require(_0xf791[4]);var sr=require(_0xf791[5]);var sox=require(_0xf791[6]);var path=require(_0xf791[7]);var config=require(_0xf791[8]);var fs=require(_0xf791[9]);var sequelize=require(_0xf791[3])[_0xf791[10]];var base64=require(_0xf791[11]);var Promise=require(_0xf791[12]);var Setting=require(_0xf791[3])[_0xf791[13]];exports[_0xf791[14]]= function(_0xaf41xd,_0xaf41xe){return Sound[_0xf791[19]]()[_0xf791[18]](function(_0xaf41x10){return _0xaf41xe[_0xf791[17]](200)[_0xf791[16]](_0xaf41x10)})[_0xf791[15]](function(_0xaf41xf){return handleError(_0xaf41xe,_0xaf41xf)})};exports[_0xf791[20]]= function(_0xaf41xd,_0xaf41xe){return Sound[_0xf791[24]](_0xaf41xd[_0xf791[23]][_0xf791[22]])[_0xf791[18]](function(Sound){if(!Sound){return _0xaf41xe[_0xf791[21]](404)};return _0xaf41xe[_0xf791[16]](Sound)})[_0xf791[15]](function(_0xaf41xf){return handleError(_0xaf41xe,_0xaf41xf)})};exports[_0xf791[25]]= function(_0xaf41xd,_0xaf41xe){var _0xaf41x11= new uploadFile({dest:path[_0xf791[27]](config[_0xf791[26]]),maxFileSize:15* 1000000,maxNumberOfFiles:10,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(wav|mp3|gsm|ogg)$/i,rename:function(_0xaf41x12,_0xaf41x13){return sr()+ path[_0xf791[29]](_0xaf41x13[_0xf791[28]])},messages:{maxNumberOfFiles:_0xf791[30],acceptFileTypes:_0xf791[31],maxFileSize:_0xf791[32],invalidRequest:_0xf791[33]}});_0xaf41x11[_0xf791[56]](_0xf791[34],function(_0xaf41x14,_0xaf41x15){if(!_0xaf41x15[_0xf791[35]][_0xf791[28]]){return _0xaf41xe[_0xf791[17]](500)[_0xf791[16]](_0xaf41x11)};return Setting[_0xf791[24]](1)[_0xf791[18]](function(_0xaf41x16){var _0xaf41x17={};var _0xaf41x18=path[_0xf791[29]](_0xaf41x15[_0xf791[35]][_0xf791[28]]);_0xaf41x17[_0xf791[36]]= _0xf791[37];_0xaf41x17[_0xf791[38]]= path[_0xf791[29]](_0xaf41x15[_0xf791[35]][_0xf791[28]])[_0xf791[39]](1);_0xaf41x17[_0xf791[40]]= _0xf791[41];_0xaf41x17[_0xf791[42]]= _0xaf41x17[_0xf791[43]]= path[_0xf791[44]](_0xaf41x15[_0xf791[35]][_0xf791[7]],_0xaf41x18);_0xaf41x17[_0xf791[45]]= path[_0xf791[44]](_0xaf41x15[_0xf791[35]][_0xf791[28]],_0xaf41x18);var _0xaf41x19=path[_0xf791[27]](config[_0xf791[26]],_0xaf41x17[_0xf791[45]]+ _0xaf41x18);var _0xaf41x1a=path[_0xf791[27]](_0xaf41x16[_0xf791[46]]|| _0xf791[47],_0xaf41x17[_0xf791[45]]+ _0xf791[48]+ _0xaf41x17[_0xf791[40]]);fs[_0xf791[50]](_0xaf41x19,parseInt(_0xf791[49],8));sox[_0xf791[51]](_0xaf41x19,function(_0xaf41xf,_0xaf41x1b){});var _0xaf41x1c=sox[_0xf791[52]](_0xaf41x19,_0xaf41x1a,{sampleRate:8000,format:_0xf791[41],channelCount:1,bitRate:192* 1024,compressionQuality:5});_0xaf41x1c[_0xf791[56]](_0xf791[53],function(_0xaf41xf){console[_0xf791[53]](_0xf791[54],_0xaf41xf);fs[_0xf791[55]](_0xaf41x19,function(_0xaf41xf){if(_0xaf41xf){return handleError(_0xaf41xe,_0xaf41xf)}});return handleError(_0xaf41xe,_0xaf41xf)});_0xaf41x1c[_0xf791[56]](_0xf791[57],function(_0xaf41x1d,_0xaf41x1e){});_0xaf41x1c[_0xf791[56]](_0xf791[58],function(_0xaf41x1f){_0xaf41x17[_0xf791[59]]= isNaN(_0xaf41x1f[_0xf791[60]])?null:_0xaf41x1f[_0xf791[60]]* 1000;_0xaf41x17[_0xf791[61]]= isNaN(_0xaf41x1f[_0xf791[62]])?null:_0xaf41x1f[_0xf791[62]];_0xaf41x17[_0xf791[63]]= isNaN(_0xaf41x1f[_0xf791[64]])?null:_0xaf41x1f[_0xf791[64]];_0xaf41x17[_0xf791[65]]= isNaN(_0xaf41x1f[_0xf791[66]])?null:_0xaf41x1f[_0xf791[66]];_0xaf41x17[_0xf791[67]]= isNaN(_0xaf41x1f[_0xf791[68]])?null:_0xaf41x1f[_0xf791[68]]});_0xaf41x1c[_0xf791[56]](_0xf791[69],function(_0xaf41x1f){_0xaf41x17[_0xf791[70]]= isNaN(_0xaf41x1f[_0xf791[60]])?null:_0xaf41x1f[_0xf791[60]]* 1000;_0xaf41x17[_0xf791[71]]= isNaN(_0xaf41x1f[_0xf791[62]])?null:_0xaf41x1f[_0xf791[62]];_0xaf41x17[_0xf791[72]]= isNaN(_0xaf41x1f[_0xf791[64]])?null:_0xaf41x1f[_0xf791[64]];_0xaf41x17[_0xf791[73]]= isNaN(_0xaf41x1f[_0xf791[66]])?null:_0xaf41x1f[_0xf791[66]];_0xaf41x17[_0xf791[74]]= isNaN(_0xaf41x1f[_0xf791[68]])?null:_0xaf41x1f[_0xf791[68]]});_0xaf41x1c[_0xf791[56]](_0xf791[34],function(){console[_0xf791[76]](_0xf791[75]);fs[_0xf791[50]](_0xaf41x1a,parseInt(_0xf791[49],8));return Sound[_0xf791[25]](_0xaf41x17)[_0xf791[18]](function(_0xaf41x20){return _0xaf41xe[_0xf791[17]](201)[_0xf791[16]](_0xaf41x20)})[_0xf791[15]](function(_0xaf41xf){console[_0xf791[76]](_0xaf41xf);return handleError(_0xaf41xe,_0xaf41xf)})});_0xaf41x1c[_0xf791[77]]()})[_0xf791[15]](function(_0xaf41xf){return handleError(_0xaf41xe,_0xaf41xf)})});_0xaf41x11[_0xf791[56]](_0xf791[53],function(_0xaf41xf){console[_0xf791[76]](_0xf791[78],_0xaf41xf);return handleError(_0xaf41xe,_0xaf41xf)});_0xaf41x11[_0xf791[79]](_0xaf41xd)};exports[_0xf791[80]]= function(_0xaf41xd,_0xaf41xe){if(_0xaf41xd[_0xf791[81]][_0xf791[22]]){delete _0xaf41xd[_0xf791[81]][_0xf791[22]]};return Sound[_0xf791[24]](_0xaf41xd[_0xf791[23]][_0xf791[22]])[_0xf791[18]](function(_0xaf41x20){if(!_0xaf41x20){return _0xaf41xe[_0xf791[21]](404)};var _0xaf41x21=_[_0xf791[82]](_0xaf41x20,_0xaf41xd[_0xf791[81]]);return _0xaf41x21[_0xf791[83]]()})[_0xf791[18]](function(_0xaf41x20){return _0xaf41xe[_0xf791[17]](200)[_0xf791[16]](_0xaf41x20)})[_0xf791[15]](function(_0xaf41xf){return handleError(_0xaf41xe,_0xaf41xf)})};exports[_0xf791[84]]= function(_0xaf41xd,_0xaf41xe){var _0xaf41x22;return Setting[_0xf791[24]](1)[_0xf791[18]](function(_0xaf41x16){_0xaf41x22= _0xaf41x16;return Sound[_0xf791[24]](_0xaf41xd[_0xf791[23]][_0xf791[22]])})[_0xf791[18]](function(_0xaf41x20){if(!_0xaf41x20){return _0xaf41xe[_0xf791[21]](404)};var _0xaf41x23=path[_0xf791[27]](config[_0xf791[26]],_0xaf41x20[_0xf791[45]]+ _0xf791[48]+ _0xaf41x20[_0xf791[38]]);var _0xaf41x24=path[_0xf791[27]](_0xaf41x22[_0xf791[46]]|| _0xf791[47],_0xaf41x20[_0xf791[45]]+ _0xf791[48]+ _0xaf41x20[_0xf791[40]]);return sequelize[_0xf791[85]](function(_0xaf41x25){return _0xaf41x20[_0xf791[84]]({transaction:_0xaf41x25})[_0xf791[18]](function(){fs[_0xf791[55]](_0xaf41x23,function(_0xaf41xf){if(_0xaf41xf){console[_0xf791[76]](_0xaf41xf)}});fs[_0xf791[55]](_0xaf41x24,function(_0xaf41xf){if(_0xaf41xf){console[_0xf791[76]](_0xaf41xf)}});return _0xaf41xe[_0xf791[17]](200)[_0xf791[16]](_0xaf41x20)})})[_0xf791[15]](function(_0xaf41xf){return handleError(_0xaf41xe,_0xaf41xf)})})[_0xf791[15]](function(_0xaf41xf){return handleError(_0xaf41xe,_0xaf41xf)})};exports[_0xf791[86]]= function(_0xaf41xd,_0xaf41xe){getStream(_0xaf41xd,_0xaf41xe,_0xf791[87])};exports[_0xf791[88]]= function(_0xaf41xd,_0xaf41xe){getStream(_0xaf41xd,_0xaf41xe,_0xf791[89])};function getStream(_0xaf41xd,_0xaf41xe,_0xaf41x27){return Sound[_0xf791[24]](_0xaf41xd[_0xf791[23]][_0xf791[22]])[_0xf791[18]](function(_0xaf41x20){var _0xaf41x29=Promise[_0xf791[93]](fs[_0xf791[92]]);return _0xaf41x29(path[_0xf791[27]](config[_0xaf41x27+ _0xf791[94]],_0xaf41x20[_0xf791[45]]+ _0xf791[48]+ _0xaf41x20[_0xaf41x27+ _0xf791[95]]))})[_0xf791[18]](function(_0xaf41x1b){var _0xaf41x28= new Buffer(_0xaf41x1b,_0xf791[91]).toString(_0xf791[90]);return _0xaf41x28})[_0xf791[18]](function(_0xaf41x28){return _0xaf41xe[_0xf791[17]](200)[_0xf791[16]]({downloadString:_0xaf41x28})})[_0xf791[15]](function(_0xaf41xf){console[_0xf791[76]](_0xaf41xf);return handleError(_0xaf41xe,_0xaf41xf)})}function handleError(_0xaf41xe,_0xaf41xf){return _0xaf41xe[_0xf791[17]](500)[_0xf791[16]](_0xaf41xf)}
\ No newline at end of file
diff --git a/server/api/sound/sound.events.js b/server/api/sound/sound.events.js
index ce73c5a..84f7b69 100644
--- a/server/api/sound/sound.events.js
+++ b/server/api/sound/sound.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Sound = require('../../models').Sound;
-
-var SoundEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-SoundEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Sound.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    SoundEvents.emit(event + ':' + doc._id, doc);
-    SoundEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = SoundEvents;
+var _0x5355=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6F\x75\x6E\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x5355[0];const EventEmitter=require(_0x5355[1]);const Sound=require(_0x5355[3])[_0x5355[2]];var SoundEvents= new EventEmitter();SoundEvents[_0x5355[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x5355[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x5355[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x5355[6]};for(var e in events){var event=events[e];Sound[_0x5355[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x3f42x8,_0x3f42x9,_0x3f42xa){SoundEvents[_0x5355[10]](event+ _0x5355[8]+ _0x3f42x8[_0x5355[9]],_0x3f42x8);SoundEvents[_0x5355[10]](event,_0x3f42x8);_0x3f42xa(null)}}module[_0x5355[11]]= SoundEvents
\ No newline at end of file
diff --git a/server/api/sound/sound.socket.js b/server/api/sound/sound.socket.js
index 137a669..610c581 100644
--- a/server/api/sound/sound.socket.js
+++ b/server/api/sound/sound.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const SoundEvents = require('./sound.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('sound:' + event, socket);
-
-    SoundEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    SoundEvents.removeListener(event, listener);
-  };
-}
+var _0xe09c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6F\x75\x6E\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6F\x75\x6E\x64\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xe09c[0];const SoundEvents=require(_0xe09c[1]);var events=[_0xe09c[2],_0xe09c[3]];exports[_0xe09c[4]]= function(_0xa737x3){for(var _0xa737x4=0,_0xa737x5=events[_0xe09c[5]];_0xa737x4< _0xa737x5;_0xa737x4++){var _0xa737x6=events[_0xa737x4];var _0xa737x7=createListener(_0xe09c[6]+ _0xa737x6,_0xa737x3);SoundEvents[_0xe09c[7]](_0xa737x6,_0xa737x7);_0xa737x3[_0xe09c[7]](_0xe09c[8],removeListener(_0xa737x6,_0xa737x7))}};function createListener(_0xa737x6,_0xa737x3){return function(_0xa737x9){_0xa737x3[_0xe09c[9]](_0xa737x6,_0xa737x9)}}function removeListener(_0xa737x6,_0xa737x7){return function(){SoundEvents[_0xe09c[10]](_0xa737x6,_0xa737x7)}}
\ No newline at end of file
diff --git a/server/api/square_odbc/index.js b/server/api/square_odbc/index.js
index b6dd309..38fb435 100644
--- a/server/api/square_odbc/index.js
+++ b/server/api/square_odbc/index.js
@@ -1,17 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./square_odbc.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.index);
-router.get('/:id/check', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.checkConnection);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.update);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xa8bb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xa8bb[0];var express=require(_0xa8bb[1]);var controller=require(_0xa8bb[2]);var auth=require(_0xa8bb[3]);var router=express.Router();router[_0xa8bb[9]](_0xa8bb[4],auth[_0xa8bb[5]](),auth[_0xa8bb[7]]([14],[_0xa8bb[6]]),controller[_0xa8bb[8]]);router[_0xa8bb[9]](_0xa8bb[10],auth[_0xa8bb[5]](),auth[_0xa8bb[7]]([14],[_0xa8bb[6]]),controller[_0xa8bb[11]]);router[_0xa8bb[9]](_0xa8bb[12],auth[_0xa8bb[5]](),auth[_0xa8bb[7]]([14],[_0xa8bb[6]]),controller[_0xa8bb[13]]);router[_0xa8bb[15]](_0xa8bb[4],auth[_0xa8bb[5]](),auth[_0xa8bb[7]]([14],[_0xa8bb[6]]),controller[_0xa8bb[14]]);router[_0xa8bb[17]](_0xa8bb[12],auth[_0xa8bb[5]](),auth[_0xa8bb[7]]([14],[_0xa8bb[6]]),controller[_0xa8bb[16]]);router[_0xa8bb[19]](_0xa8bb[4],auth[_0xa8bb[5]](),auth[_0xa8bb[7]]([14],[_0xa8bb[6]]),controller[_0xa8bb[18]]);router[_0xa8bb[19]](_0xa8bb[12],auth[_0xa8bb[5]](),auth[_0xa8bb[7]]([14],[_0xa8bb[6]]),controller[_0xa8bb[20]]);module[_0xa8bb[21]]= router
\ No newline at end of file
diff --git a/server/api/square_odbc/square_odbc.controller.js b/server/api/square_odbc/square_odbc.controller.js
index 69af149..9e4794f 100644
--- a/server/api/square_odbc/square_odbc.controller.js
+++ b/server/api/square_odbc/square_odbc.controller.js
@@ -1,135 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var db = require("odbc")();
-
-var SquareOdbc = require('../../models').SquareOdbc;
-var Util = require('../../config/util');
-
-// Get list of square_odbcs
-exports.index = function(req, res) {
-  return SquareOdbc
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single square_odbc
-exports.show = function(req, res) {
-  return SquareOdbc
-    .findById(req.params.id)
-    .then(function(square_odbc) {
-      if (!square_odbc) {
-        return res.sendStatus(404);
-      }
-      return res.send(square_odbc);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new square_odbc in the DB.
-exports.create = function(req, res) {
-  return SquareOdbc
-    .create(req.body)
-    .then(function(square_odbc) {
-      return res.status(201).send(square_odbc);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing square_odbc in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return SquareOdbc
-    .findById(req.params.id)
-    .then(function(square_odbc) {
-      if (!square_odbc) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(square_odbc, req.body);
-      updated.save()
-        .then(function() {
-          return res.status(200).send(square_odbc);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a square_odbc from the DB.
-exports.destroy = function(req, res) {
-  return SquareOdbc
-    .findById(req.params.id)
-    .then(function(odbc) {
-      if (!odbc) {
-        return res.sendStatus(404);
-      }
-      return odbc
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a square_project from the DB.
-exports.bulkDestroy = function(req, res) {
-  return SquareOdbc
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.checkConnection = function(req, res) {
-  return SquareOdbc
-    .findById(req.params.id)
-    .then(function(square_odbc) {
-      if (!square_odbc) {
-        return res.sendStatus(404);
-      }
-      db.open(square_odbc.dsn, function(err) {
-        if (err) {
-          return handleError(res, err);
-        }
-        db.close(function(err) {
-          if (err) {
-            return handleError(res, err);
-          }
-          return res.sendStatus(200);
-        })
-      })
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xdb3f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6F\x64\x62\x63","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x63\x68\x65\x63\x6B\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x64\x73\x6E","\x63\x6C\x6F\x73\x65","\x6F\x70\x65\x6E"];_0xdb3f[0];var _=require(_0xdb3f[1]);var db=require(_0xdb3f[2])();var SquareOdbc=require(_0xdb3f[4])[_0xdb3f[3]];var Util=require(_0xdb3f[5]);exports[_0xdb3f[6]]= function(_0x9674x5,_0x9674x6){return SquareOdbc[_0xdb3f[13]](Util[_0xdb3f[12]](_0x9674x5[_0xdb3f[11]]))[_0xdb3f[10]](function(_0x9674x8){_0x9674x6[_0xdb3f[9]](200)[_0xdb3f[8]](_0x9674x8)})[_0xdb3f[7]](function(_0x9674x7){return handleError(_0x9674x6,_0x9674x7)})};exports[_0xdb3f[14]]= function(_0x9674x5,_0x9674x6){return SquareOdbc[_0xdb3f[18]](_0x9674x5[_0xdb3f[17]][_0xdb3f[16]])[_0xdb3f[10]](function(_0x9674x9){if(!_0x9674x9){return _0x9674x6[_0xdb3f[15]](404)};return _0x9674x6[_0xdb3f[8]](_0x9674x9)})[_0xdb3f[7]](function(_0x9674x7){return handleError(_0x9674x6,_0x9674x7)})};exports[_0xdb3f[19]]= function(_0x9674x5,_0x9674x6){return SquareOdbc[_0xdb3f[19]](_0x9674x5[_0xdb3f[20]])[_0xdb3f[10]](function(_0x9674x9){return _0x9674x6[_0xdb3f[9]](201)[_0xdb3f[8]](_0x9674x9)})[_0xdb3f[7]](function(_0x9674x7){return handleError(_0x9674x6,_0x9674x7)})};exports[_0xdb3f[21]]= function(_0x9674x5,_0x9674x6){if(_0x9674x5[_0xdb3f[20]][_0xdb3f[16]]){delete _0x9674x5[_0xdb3f[20]][_0xdb3f[16]]};return SquareOdbc[_0xdb3f[18]](_0x9674x5[_0xdb3f[17]][_0xdb3f[16]])[_0xdb3f[10]](function(_0x9674x9){if(!_0x9674x9){return _0x9674x6[_0xdb3f[15]](404)};var _0x9674xa=_[_0xdb3f[22]](_0x9674x9,_0x9674x5[_0xdb3f[20]]);_0x9674xa[_0xdb3f[23]]()[_0xdb3f[10]](function(){return _0x9674x6[_0xdb3f[9]](200)[_0xdb3f[8]](_0x9674x9)})[_0xdb3f[7]](function(_0x9674x7){return handleError(_0x9674x6,_0x9674x7)})})[_0xdb3f[7]](function(_0x9674x7){return handleError(_0x9674x6,_0x9674x7)})};exports[_0xdb3f[24]]= function(_0x9674x5,_0x9674x6){return SquareOdbc[_0xdb3f[18]](_0x9674x5[_0xdb3f[17]][_0xdb3f[16]])[_0xdb3f[10]](function(_0x9674xb){if(!_0x9674xb){return _0x9674x6[_0xdb3f[15]](404)};return _0x9674xb[_0xdb3f[24]]()})[_0xdb3f[10]](function(){return _0x9674x6[_0xdb3f[15]](204)})[_0xdb3f[7]](function(_0x9674x7){return handleError(_0x9674x6,_0x9674x7)})};exports[_0xdb3f[25]]= function(_0x9674x5,_0x9674x6){return SquareOdbc[_0xdb3f[24]]({where:{id:_0x9674x5[_0xdb3f[11]][_0xdb3f[26]]},individualHooks:true})[_0xdb3f[10]](function(){return _0x9674x6[_0xdb3f[15]](204)})[_0xdb3f[7]](function(_0x9674x7){return handleError(_0x9674x6,_0x9674x7)})};exports[_0xdb3f[27]]= function(_0x9674x5,_0x9674x6){return SquareOdbc[_0xdb3f[18]](_0x9674x5[_0xdb3f[17]][_0xdb3f[16]])[_0xdb3f[10]](function(_0x9674x9){if(!_0x9674x9){return _0x9674x6[_0xdb3f[15]](404)};db[_0xdb3f[30]](_0x9674x9[_0xdb3f[28]],function(_0x9674x7){if(_0x9674x7){return handleError(_0x9674x6,_0x9674x7)};db[_0xdb3f[29]](function(_0x9674x7){if(_0x9674x7){return handleError(_0x9674x6,_0x9674x7)};return _0x9674x6[_0xdb3f[15]](200)})})})[_0xdb3f[7]](function(_0x9674x7){return handleError(_0x9674x6,_0x9674x7)})};function handleError(_0x9674x6,_0x9674x7){return _0x9674x6[_0xdb3f[9]](500)[_0xdb3f[8]](_0x9674x7)}
\ No newline at end of file
diff --git a/server/api/square_odbc/square_odbc.events.js b/server/api/square_odbc/square_odbc.events.js
index 1f9776a..04125ea 100644
--- a/server/api/square_odbc/square_odbc.events.js
+++ b/server/api/square_odbc/square_odbc.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const SquareOdbc = require('../../models').SquareOdbc;
-
-var SquareOdbcEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-SquareOdbcEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  SquareOdbc.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    SquareOdbcEvents.emit(event + ':' + doc._id, doc);
-    SquareOdbcEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = SquareOdbcEvents;
+var _0x6c84=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6c84[0];const EventEmitter=require(_0x6c84[1]);const SquareOdbc=require(_0x6c84[3])[_0x6c84[2]];var SquareOdbcEvents= new EventEmitter();SquareOdbcEvents[_0x6c84[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6c84[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x6c84[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6c84[6]};for(var e in events){var event=events[e];SquareOdbc[_0x6c84[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xd79bx8,_0xd79bx9,_0xd79bxa){SquareOdbcEvents[_0x6c84[10]](event+ _0x6c84[8]+ _0xd79bx8[_0x6c84[9]],_0xd79bx8);SquareOdbcEvents[_0x6c84[10]](event,_0xd79bx8);_0xd79bxa(null)}}module[_0x6c84[11]]= SquareOdbcEvents
\ No newline at end of file
diff --git a/server/api/square_odbc/square_odbc.socket.js b/server/api/square_odbc/square_odbc.socket.js
index 34d555e..cf70983 100644
--- a/server/api/square_odbc/square_odbc.socket.js
+++ b/server/api/square_odbc/square_odbc.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const SquareOdbcEvents = require('./square_odbc.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('square_odbc:' + event, socket);
-
-    SquareOdbcEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    SquareOdbcEvents.removeListener(event, listener);
-  };
-}
+var _0x8487=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x8487[0];const SquareOdbcEvents=require(_0x8487[1]);var events=[_0x8487[2],_0x8487[3]];exports[_0x8487[4]]= function(_0xa146x3){for(var _0xa146x4=0,_0xa146x5=events[_0x8487[5]];_0xa146x4< _0xa146x5;_0xa146x4++){var _0xa146x6=events[_0xa146x4];var _0xa146x7=createListener(_0x8487[6]+ _0xa146x6,_0xa146x3);SquareOdbcEvents[_0x8487[7]](_0xa146x6,_0xa146x7);_0xa146x3[_0x8487[7]](_0x8487[8],removeListener(_0xa146x6,_0xa146x7))}};function createListener(_0xa146x6,_0xa146x3){return function(_0xa146x9){_0xa146x3[_0x8487[9]](_0xa146x6,_0xa146x9)}}function removeListener(_0xa146x6,_0xa146x7){return function(){SquareOdbcEvents[_0x8487[10]](_0xa146x6,_0xa146x7)}}
\ No newline at end of file
diff --git a/server/api/square_project/index.js b/server/api/square_project/index.js
index 0b1c55e..4d9e711 100644
--- a/server/api/square_project/index.js
+++ b/server/api/square_project/index.js
@@ -1,17 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./square_project.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([14, 7], ['admin']), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.show);
-router.get('/:id/download', controller.download);
-router.post('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.update);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xf4c5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xf4c5[0];var express=require(_0xf4c5[1]);var controller=require(_0xf4c5[2]);var auth=require(_0xf4c5[3]);var router=express.Router();router[_0xf4c5[9]](_0xf4c5[4],auth[_0xf4c5[5]](),auth[_0xf4c5[7]]([14,7],[_0xf4c5[6]]),controller[_0xf4c5[8]]);router[_0xf4c5[9]](_0xf4c5[10],auth[_0xf4c5[5]](),auth[_0xf4c5[7]]([14],[_0xf4c5[6]]),controller[_0xf4c5[11]]);router[_0xf4c5[9]](_0xf4c5[12],controller[_0xf4c5[13]]);router[_0xf4c5[15]](_0xf4c5[4],auth[_0xf4c5[5]](),auth[_0xf4c5[7]]([14],[_0xf4c5[6]]),controller[_0xf4c5[14]]);router[_0xf4c5[17]](_0xf4c5[10],auth[_0xf4c5[5]](),auth[_0xf4c5[7]]([14],[_0xf4c5[6]]),controller[_0xf4c5[16]]);router[_0xf4c5[19]](_0xf4c5[4],auth[_0xf4c5[5]](),auth[_0xf4c5[7]]([14],[_0xf4c5[6]]),controller[_0xf4c5[18]]);router[_0xf4c5[19]](_0xf4c5[10],auth[_0xf4c5[5]](),auth[_0xf4c5[7]]([14],[_0xf4c5[6]]),controller[_0xf4c5[20]]);module[_0xf4c5[21]]= router
\ No newline at end of file
diff --git a/server/api/square_project/square_project.controller.js b/server/api/square_project/square_project.controller.js
index 46766e9..2032d3d 100644
--- a/server/api/square_project/square_project.controller.js
+++ b/server/api/square_project/square_project.controller.js
@@ -1,133 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var path = require('path');
-var config = require('../../config/environment');
-var Util = require('../../config/util');
-
-var SquareProject = require('../../models').SquareProject;
-
-// Get list of square_projects
-exports.index = function(req, res) {
-  return SquareProject
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single square_project
-exports.show = function(req, res) {
-  return SquareProject
-    .findById(req.params.id)
-    .then(function(square_project) {
-      if (!square_project) {
-        return res.sendStatus(404);
-      }
-      return res.send(square_project);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new square_project in the DB.
-exports.create = function(req, res) {
-  return SquareProject
-    .create(req.body)
-    .then(function(square_project) {
-      return res.status(201).send(square_project);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing square_project in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  delete req.body.name;
-  return SquareProject
-    .findById(req.params.id)
-    .then(function(square_project) {
-      if (!square_project) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(square_project, req.body);
-      updated.save()
-        .then(function() {
-          return res.status(200).send(square_project);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a square_project from the DB.
-exports.destroy = function(req, res) {
-  return SquareProject
-    .findById(req.params.id)
-    .then(function(project) {
-      if (!project) {
-        return res.sendStatus(404);
-      }
-      return project
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a square_project from the DB.
-exports.bulkDestroy = function(req, res) {
-  return SquareProject
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.download = function(req, res, next) {
-  SquareProject
-    .findById(req.params.id)
-    .then(function(square_project) {
-      if (!square_project) {
-        return res.sendStatus(404);
-      }
-      console.log(req.query.filename);
-      res.set({
-        "Content-Disposition": "attachment; filename=\"" + req.query.filename +
-          ".xml\"",
-        "Content-Type": "txt/xml"
-      });
-      return res.send(square_project.preproduction);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xac87=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6E\x61\x6D\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x6C\x6F\x67","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3B\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D\x22","\x2E\x78\x6D\x6C\x22","\x74\x78\x74\x2F\x78\x6D\x6C","\x73\x65\x74","\x70\x72\x65\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E"];_0xac87[0];var _=require(_0xac87[1]);var path=require(_0xac87[2]);var config=require(_0xac87[3]);var Util=require(_0xac87[4]);var SquareProject=require(_0xac87[6])[_0xac87[5]];exports[_0xac87[7]]= function(_0x5ffax6,_0x5ffax7){return SquareProject[_0xac87[14]](Util[_0xac87[13]](_0x5ffax6[_0xac87[12]]))[_0xac87[11]](function(_0x5ffax9){_0x5ffax7[_0xac87[10]](200)[_0xac87[9]](_0x5ffax9)})[_0xac87[8]](function(_0x5ffax8){return handleError(_0x5ffax7,_0x5ffax8)})};exports[_0xac87[15]]= function(_0x5ffax6,_0x5ffax7){return SquareProject[_0xac87[19]](_0x5ffax6[_0xac87[18]][_0xac87[17]])[_0xac87[11]](function(_0x5ffaxa){if(!_0x5ffaxa){return _0x5ffax7[_0xac87[16]](404)};return _0x5ffax7[_0xac87[9]](_0x5ffaxa)})[_0xac87[8]](function(_0x5ffax8){return handleError(_0x5ffax7,_0x5ffax8)})};exports[_0xac87[20]]= function(_0x5ffax6,_0x5ffax7){return SquareProject[_0xac87[20]](_0x5ffax6[_0xac87[21]])[_0xac87[11]](function(_0x5ffaxa){return _0x5ffax7[_0xac87[10]](201)[_0xac87[9]](_0x5ffaxa)})[_0xac87[8]](function(_0x5ffax8){return handleError(_0x5ffax7,_0x5ffax8)})};exports[_0xac87[22]]= function(_0x5ffax6,_0x5ffax7){if(_0x5ffax6[_0xac87[21]][_0xac87[17]]){delete _0x5ffax6[_0xac87[21]][_0xac87[17]]};delete _0x5ffax6[_0xac87[21]][_0xac87[23]];return SquareProject[_0xac87[19]](_0x5ffax6[_0xac87[18]][_0xac87[17]])[_0xac87[11]](function(_0x5ffaxa){if(!_0x5ffaxa){return _0x5ffax7[_0xac87[16]](404)};var _0x5ffaxb=_[_0xac87[24]](_0x5ffaxa,_0x5ffax6[_0xac87[21]]);_0x5ffaxb[_0xac87[25]]()[_0xac87[11]](function(){return _0x5ffax7[_0xac87[10]](200)[_0xac87[9]](_0x5ffaxa)})[_0xac87[8]](function(_0x5ffax8){return handleError(_0x5ffax7,_0x5ffax8)})})[_0xac87[8]](function(_0x5ffax8){return handleError(_0x5ffax7,_0x5ffax8)})};exports[_0xac87[26]]= function(_0x5ffax6,_0x5ffax7){return SquareProject[_0xac87[19]](_0x5ffax6[_0xac87[18]][_0xac87[17]])[_0xac87[11]](function(_0x5ffaxc){if(!_0x5ffaxc){return _0x5ffax7[_0xac87[16]](404)};return _0x5ffaxc[_0xac87[26]]()})[_0xac87[11]](function(){return _0x5ffax7[_0xac87[16]](204)})[_0xac87[8]](function(_0x5ffax8){return handleError(_0x5ffax7,_0x5ffax8)})};exports[_0xac87[27]]= function(_0x5ffax6,_0x5ffax7){return SquareProject[_0xac87[26]]({where:{id:_0x5ffax6[_0xac87[12]][_0xac87[28]]},individualHooks:true})[_0xac87[11]](function(){return _0x5ffax7[_0xac87[16]](204)})[_0xac87[8]](function(_0x5ffax8){return handleError(_0x5ffax7,_0x5ffax8)})};exports[_0xac87[29]]= function(_0x5ffax6,_0x5ffax7,_0x5ffaxd){SquareProject[_0xac87[19]](_0x5ffax6[_0xac87[18]][_0xac87[17]])[_0xac87[11]](function(_0x5ffaxa){if(!_0x5ffaxa){return _0x5ffax7[_0xac87[16]](404)};console[_0xac87[31]](_0x5ffax6[_0xac87[12]][_0xac87[30]]);_0x5ffax7[_0xac87[35]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E":_0xac87[32]+ _0x5ffax6[_0xac87[12]][_0xac87[30]]+ _0xac87[33],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xac87[34]});return _0x5ffax7[_0xac87[9]](_0x5ffaxa[_0xac87[36]])})[_0xac87[8]](function(_0x5ffax8){return handleError(_0x5ffax7,_0x5ffax8)})};function handleError(_0x5ffax7,_0x5ffax8){return _0x5ffax7[_0xac87[10]](500)[_0xac87[9]](_0x5ffax8)}
\ No newline at end of file
diff --git a/server/api/square_project/square_project.events.js b/server/api/square_project/square_project.events.js
index d592ee2..5c3ba83 100644
--- a/server/api/square_project/square_project.events.js
+++ b/server/api/square_project/square_project.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const SquareProject = require('../../models').SquareProject;
-
-var SquareProjectEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-SquareProjectEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  SquareProject.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    SquareProjectEvents.emit(event + ':' + doc._id, doc);
-    SquareProjectEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = SquareProjectEvents;
+var _0x74db=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x74db[0];const EventEmitter=require(_0x74db[1]);const SquareProject=require(_0x74db[3])[_0x74db[2]];var SquareProjectEvents= new EventEmitter();SquareProjectEvents[_0x74db[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x74db[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x74db[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x74db[6]};for(var e in events){var event=events[e];SquareProject[_0x74db[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7fb0x8,_0x7fb0x9,_0x7fb0xa){SquareProjectEvents[_0x74db[10]](event+ _0x74db[8]+ _0x7fb0x8[_0x74db[9]],_0x7fb0x8);SquareProjectEvents[_0x74db[10]](event,_0x7fb0x8);_0x7fb0xa(null)}}module[_0x74db[11]]= SquareProjectEvents
\ No newline at end of file
diff --git a/server/api/square_project/square_project.socket.js b/server/api/square_project/square_project.socket.js
index fc240c5..ff00b57 100644
--- a/server/api/square_project/square_project.socket.js
+++ b/server/api/square_project/square_project.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const SquareProjectEvents = require('./square_project.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('square_project:' + event, socket);
-
-    SquareProjectEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    SquareProjectEvents.removeListener(event, listener);
-  };
-}
+var _0x308f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x308f[0];const SquareProjectEvents=require(_0x308f[1]);var events=[_0x308f[2],_0x308f[3]];exports[_0x308f[4]]= function(_0xca99x3){for(var _0xca99x4=0,_0xca99x5=events[_0x308f[5]];_0xca99x4< _0xca99x5;_0xca99x4++){var _0xca99x6=events[_0xca99x4];var _0xca99x7=createListener(_0x308f[6]+ _0xca99x6,_0xca99x3);SquareProjectEvents[_0x308f[7]](_0xca99x6,_0xca99x7);_0xca99x3[_0x308f[7]](_0x308f[8],removeListener(_0xca99x6,_0xca99x7))}};function createListener(_0xca99x6,_0xca99x3){return function(_0xca99x9){_0xca99x3[_0x308f[9]](_0xca99x6,_0xca99x9)}}function removeListener(_0xca99x6,_0xca99x7){return function(){SquareProjectEvents[_0x308f[10]](_0xca99x6,_0xca99x7)}}
\ No newline at end of file
diff --git a/server/api/square_recording/index.js b/server/api/square_recording/index.js
index 0ac38d5..89fd28d 100644
--- a/server/api/square_recording/index.js
+++ b/server/api/square_recording/index.js
@@ -1,17 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./square_recording.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.show);
-router.get('/:id/stream', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.getStream);
-router.post('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.update);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0x3d03=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x71\x75\x61\x72\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x73\x74\x72\x65\x61\x6D","\x67\x65\x74\x53\x74\x72\x65\x61\x6D","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x3d03[0];var express=require(_0x3d03[1]);var auth=require(_0x3d03[2]);var controller=require(_0x3d03[3]);var router=express.Router();router[_0x3d03[9]](_0x3d03[4],auth[_0x3d03[5]](),auth[_0x3d03[7]]([14],[_0x3d03[6]]),controller[_0x3d03[8]]);router[_0x3d03[9]](_0x3d03[10],auth[_0x3d03[5]](),auth[_0x3d03[7]]([14],[_0x3d03[6]]),controller[_0x3d03[11]]);router[_0x3d03[9]](_0x3d03[12],auth[_0x3d03[5]](),auth[_0x3d03[7]]([14],[_0x3d03[6]]),controller[_0x3d03[13]]);router[_0x3d03[15]](_0x3d03[4],auth[_0x3d03[5]](),auth[_0x3d03[7]]([14],[_0x3d03[6]]),controller[_0x3d03[14]]);router[_0x3d03[17]](_0x3d03[10],auth[_0x3d03[5]](),auth[_0x3d03[7]]([14],[_0x3d03[6]]),controller[_0x3d03[16]]);router[_0x3d03[19]](_0x3d03[4],auth[_0x3d03[5]](),auth[_0x3d03[7]]([14],[_0x3d03[6]]),controller[_0x3d03[18]]);router[_0x3d03[19]](_0x3d03[10],auth[_0x3d03[5]](),auth[_0x3d03[7]]([14],[_0x3d03[6]]),controller[_0x3d03[20]]);module[_0x3d03[21]]= router
\ No newline at end of file
diff --git a/server/api/square_recording/square_recording.controller.js b/server/api/square_recording/square_recording.controller.js
index e83e810..84defbf 100644
--- a/server/api/square_recording/square_recording.controller.js
+++ b/server/api/square_recording/square_recording.controller.js
@@ -1,183 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/square/recordings              ->  index
- * POST    /api/square/recordings              ->  create
- * GET     /api/square/recordings/:id          ->  show
- * PUT     /api/square/recordings/:id          ->  update
- * DELETE  /api/square/recordings/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var util = require('util');
-
-var SquareRecording = require('../../models').SquareRecording;
-var Promise = require('bluebird');
-// var base64 = Promise.promisifyAll(require('file-base64'));
-var base64 = require('file-base64');
-var fs = require('fs');
-var Util = require('../../config/util');
-
-function handleError(res) {
-  return function(err) {
-    if (err.cause && err.cause.code === 'ENOENT') {
-      err = {
-        message: 'No file or directory',
-        translatedMessage: 'MESSAGE_NO_FILE_OR_DIRECTORY'
-      };
-    }
-    return res.status(500).send(err);
-  }
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(body) {
-  return function(entity) {
-    return entity
-      .updateAttributes(body);
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      try {
-        fs.statSync(entity.savePath); //search the file
-      } catch (err) { //file not found
-        console.log(err);
-        return entity.destroy() //deleting the dbentry
-          .then(function() {
-            res.status(204).end();
-          });
-      }
-      try { //file found, deleting
-        fs.unlinkSync(entity.savePath);
-        return entity.destroy() //file deleted, deleting the db entry
-          .then(function() {
-            res.status(204).end();
-          });
-      } catch (err) { //error deleting file
-        console.log(err);
-        throw new Error(err);
-      }
-    }
-  };
-}
-
-// Gets a list of SquareRecordings
-exports.index = function(req, res) {
-  var _query = Util.getQuery(req.query);
-  return SquareRecording
-    .findAndCountAll(_query)
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single SquareRecording from the DB
-exports.show = function(req, res) {
-  return SquareRecording.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single SquareRecording from the DB
-exports.getStream = function(req, res) {
-  return SquareRecording
-    .findById(req.params.id)
-    .then(function(recording) {
-      var readFile = Promise.promisify(fs.readFile);
-      return readFile(recording.savePath);
-    })
-    .then(function(result) {
-      var base64String = new Buffer(result, 'binary').toString('base64');
-      return base64String;
-    })
-    .then(function(base64String) {
-      return res.status(200).send({
-        downloadString: base64String
-      });
-    })
-    .catch(handleError(res));
-}
-
-
-// Creates a new SquareRecording in the DB
-exports.create = function(req, res) {
-  return SquareRecording.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing SquareRecording in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return SquareRecording.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a SquareRecording from the DB
-exports.destroy = function(req, res) {
-  return SquareRecording.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
-
-// Deletes multiple recordings from the DB.
-exports.bulkDestroy = function(req, res) {
-  return SquareRecording
-    .findAll({
-      where: {
-        id: req.query.ids
-      }
-    })
-    .then(function(recordings) {
-      var bulkDestroy = [];
-      _.forEach(recordings, function(rec) {
-        try {
-          fs.statSync(rec.savePath); //search the file
-          try { //file found, deleting
-            fs.unlinkSync(rec.savePath);
-            bulkDestroy.push(rec.destroy());
-          } catch (err) { //error deleting file
-            console.log('Can\' t delete the file', err);
-          }
-        } catch (err) { //file not found
-          console.log('Can\' t delete the file', err);
-          bulkDestroy.push(rec.destroy());
-        }
-      });
-      return bulkDestroy;
-    })
-    .all()
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(handleError(res));
-};
+var _0x65bb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x62\x6C\x75\x65\x62\x69\x72\x64","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x66\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x63\x61\x75\x73\x65","\x63\x6F\x64\x65","\x45\x4E\x4F\x45\x4E\x54","\x4E\x6F\x20\x66\x69\x6C\x65\x20\x6F\x72\x20\x64\x69\x72\x65\x63\x74\x6F\x72\x79","\x4D\x45\x53\x53\x41\x47\x45\x5F\x4E\x4F\x5F\x46\x49\x4C\x45\x5F\x4F\x52\x5F\x44\x49\x52\x45\x43\x54\x4F\x52\x59","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x73\x61\x76\x65\x50\x61\x74\x68","\x73\x74\x61\x74\x53\x79\x6E\x63","\x6C\x6F\x67","\x74\x68\x65\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x75\x6E\x6C\x69\x6E\x6B\x53\x79\x6E\x63","\x69\x6E\x64\x65\x78","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x53\x74\x72\x65\x61\x6D","\x62\x61\x73\x65\x36\x34","\x62\x69\x6E\x61\x72\x79","\x72\x65\x61\x64\x46\x69\x6C\x65","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x61\x6C\x6C","\x70\x75\x73\x68","\x43\x61\x6E\x27\x20\x74\x20\x64\x65\x6C\x65\x74\x65\x20\x74\x68\x65\x20\x66\x69\x6C\x65","\x66\x6F\x72\x45\x61\x63\x68","\x69\x64\x73","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x65bb[0];var _=require(_0x65bb[1]);var util=require(_0x65bb[2]);var SquareRecording=require(_0x65bb[4])[_0x65bb[3]];var Promise=require(_0x65bb[5]);var base64=require(_0x65bb[6]);var fs=require(_0x65bb[7]);var Util=require(_0x65bb[8]);function handleError(_0x2c07x9){return function(_0x2c07xa){if(_0x2c07xa[_0x65bb[9]]&& _0x2c07xa[_0x65bb[9]][_0x65bb[10]]=== _0x65bb[11]){_0x2c07xa= {message:_0x65bb[12],translatedMessage:_0x65bb[13]}};return _0x2c07x9[_0x65bb[15]](500)[_0x65bb[14]](_0x2c07xa)}}function responseWithResult(_0x2c07x9,_0x2c07xc){_0x2c07xc= _0x2c07xc|| 200;return function(_0x2c07xd){if(_0x2c07xd){_0x2c07x9[_0x65bb[15]](_0x2c07xc)[_0x65bb[16]](_0x2c07xd)}}}function handleEntityNotFound(_0x2c07x9){return function(_0x2c07xd){if(!_0x2c07xd){_0x2c07x9[_0x65bb[15]](404)[_0x65bb[17]]();return null};return _0x2c07xd}}function saveUpdates(_0x2c07x10){return function(_0x2c07xd){return _0x2c07xd[_0x65bb[18]](_0x2c07x10)}}function removeEntity(_0x2c07x9){return function(_0x2c07xd){if(_0x2c07xd){try{fs[_0x65bb[20]](_0x2c07xd[_0x65bb[19]])}catch(err){console[_0x65bb[21]](err);return _0x2c07xd[_0x65bb[23]]()[_0x65bb[22]](function(){_0x2c07x9[_0x65bb[15]](204)[_0x65bb[17]]()})};try{fs[_0x65bb[24]](_0x2c07xd[_0x65bb[19]]);return _0x2c07xd[_0x65bb[23]]()[_0x65bb[22]](function(){_0x2c07x9[_0x65bb[15]](204)[_0x65bb[17]]()})}catch(err){console[_0x65bb[21]](err);throw  new Error(err)}}}}exports[_0x65bb[25]]= function(_0x2c07x12,_0x2c07x9){var _0x2c07x13=Util[_0x65bb[27]](_0x2c07x12[_0x65bb[26]]);return SquareRecording[_0x65bb[29]](_0x2c07x13)[_0x65bb[22]](responseWithResult(_0x2c07x9))[_0x65bb[28]](handleError(_0x2c07x9))};exports[_0x65bb[30]]= function(_0x2c07x12,_0x2c07x9){return SquareRecording[_0x65bb[33]](_0x2c07x12[_0x65bb[32]][_0x65bb[31]])[_0x65bb[22]](handleEntityNotFound(_0x2c07x9))[_0x65bb[22]](responseWithResult(_0x2c07x9))[_0x65bb[28]](handleError(_0x2c07x9))};exports[_0x65bb[34]]= function(_0x2c07x12,_0x2c07x9){return SquareRecording[_0x65bb[33]](_0x2c07x12[_0x65bb[32]][_0x65bb[31]])[_0x65bb[22]](function(_0x2c07x16){var _0x2c07x17=Promise[_0x65bb[38]](fs[_0x65bb[37]]);return _0x2c07x17(_0x2c07x16[_0x65bb[19]])})[_0x65bb[22]](function(_0x2c07x15){var _0x2c07x14= new Buffer(_0x2c07x15,_0x65bb[36]).toString(_0x65bb[35]);return _0x2c07x14})[_0x65bb[22]](function(_0x2c07x14){return _0x2c07x9[_0x65bb[15]](200)[_0x65bb[14]]({downloadString:_0x2c07x14})})[_0x65bb[28]](handleError(_0x2c07x9))};exports[_0x65bb[39]]= function(_0x2c07x12,_0x2c07x9){return SquareRecording[_0x65bb[39]](_0x2c07x12[_0x65bb[40]])[_0x65bb[22]](responseWithResult(_0x2c07x9,201))[_0x65bb[28]](handleError(_0x2c07x9))};exports[_0x65bb[41]]= function(_0x2c07x12,_0x2c07x9){if(_0x2c07x12[_0x65bb[40]][_0x65bb[31]]){delete _0x2c07x12[_0x65bb[40]][_0x65bb[31]]};return SquareRecording[_0x65bb[33]](_0x2c07x12[_0x65bb[32]][_0x65bb[31]])[_0x65bb[22]](handleEntityNotFound(_0x2c07x9))[_0x65bb[22]](saveUpdates(_0x2c07x12[_0x65bb[40]]))[_0x65bb[22]](responseWithResult(_0x2c07x9))[_0x65bb[28]](handleError(_0x2c07x9))};exports[_0x65bb[23]]= function(_0x2c07x12,_0x2c07x9){return SquareRecording[_0x65bb[33]](_0x2c07x12[_0x65bb[32]][_0x65bb[31]])[_0x65bb[22]](handleEntityNotFound(_0x2c07x9))[_0x65bb[22]](removeEntity(_0x2c07x9))[_0x65bb[28]](handleError(_0x2c07x9))};exports[_0x65bb[42]]= function(_0x2c07x12,_0x2c07x9){return SquareRecording[_0x65bb[49]]({where:{id:_0x2c07x12[_0x65bb[26]][_0x65bb[48]]}})[_0x65bb[22]](function(_0x2c07x18){var _0x2c07x19=[];_[_0x65bb[47]](_0x2c07x18,function(_0x2c07x1a){try{fs[_0x65bb[20]](_0x2c07x1a[_0x65bb[19]]);try{fs[_0x65bb[24]](_0x2c07x1a[_0x65bb[19]]);_0x2c07x19[_0x65bb[45]](_0x2c07x1a[_0x65bb[23]]())}catch(err){console[_0x65bb[21]](_0x65bb[46],err)}}catch(err){console[_0x65bb[21]](_0x65bb[46],err);_0x2c07x19[_0x65bb[45]](_0x2c07x1a[_0x65bb[23]]())}});return _0x2c07x19})[_0x65bb[44]]()[_0x65bb[22]](function(){return _0x2c07x9[_0x65bb[43]](204)})[_0x65bb[28]](handleError(_0x2c07x9))}
\ No newline at end of file
diff --git a/server/api/square_recording/square_recording.events.js b/server/api/square_recording/square_recording.events.js
index 76305fd..afc6fba 100644
--- a/server/api/square_recording/square_recording.events.js
+++ b/server/api/square_recording/square_recording.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const SquareRecording = require('../../models').SquareRecording;
-
-var SquareRecordingEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-SquareRecordingEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  SquareRecording.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    SquareRecordingEvents.emit(event + ':' + doc._id, doc);
-    SquareRecordingEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = SquareRecordingEvents;
+var _0x8503=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x8503[0];const EventEmitter=require(_0x8503[1]);const SquareRecording=require(_0x8503[3])[_0x8503[2]];var SquareRecordingEvents= new EventEmitter();SquareRecordingEvents[_0x8503[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x8503[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x8503[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x8503[6]};for(var e in events){var event=events[e];SquareRecording[_0x8503[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xdba9x8,_0xdba9x9,_0xdba9xa){SquareRecordingEvents[_0x8503[10]](event+ _0x8503[8]+ _0xdba9x8[_0x8503[9]],_0xdba9x8);SquareRecordingEvents[_0x8503[10]](event,_0xdba9x8);_0xdba9xa(null)}}module[_0x8503[11]]= SquareRecordingEvents
\ No newline at end of file
diff --git a/server/api/square_recording/square_recording.socket.js b/server/api/square_recording/square_recording.socket.js
index 8ca5928..f4154e9 100644
--- a/server/api/square_recording/square_recording.socket.js
+++ b/server/api/square_recording/square_recording.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const SquareRecordingEvents = require('./square_recording.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('square_recording:' + event, socket);
-
-    SquareRecordingEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    SquareRecordingEvents.removeListener(event, listener);
-  };
-}
+var _0x458e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x71\x75\x61\x72\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x71\x75\x61\x72\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x458e[0];const SquareRecordingEvents=require(_0x458e[1]);var events=[_0x458e[2],_0x458e[3]];exports[_0x458e[4]]= function(_0x5f39x3){for(var _0x5f39x4=0,_0x5f39x5=events[_0x458e[5]];_0x5f39x4< _0x5f39x5;_0x5f39x4++){var _0x5f39x6=events[_0x5f39x4];var _0x5f39x7=createListener(_0x458e[6]+ _0x5f39x6,_0x5f39x3);SquareRecordingEvents[_0x458e[7]](_0x5f39x6,_0x5f39x7);_0x5f39x3[_0x458e[7]](_0x458e[8],removeListener(_0x5f39x6,_0x5f39x7))}};function createListener(_0x5f39x6,_0x5f39x3){return function(_0x5f39x9){_0x5f39x3[_0x458e[9]](_0x5f39x6,_0x5f39x9)}}function removeListener(_0x5f39x6,_0x5f39x7){return function(){SquareRecordingEvents[_0x458e[10]](_0x5f39x6,_0x5f39x7)}}
\ No newline at end of file
diff --git a/server/api/sugarcrm_account/index.js b/server/api/sugarcrm_account/index.js
index 5927151..71d5ab7 100644
--- a/server/api/sugarcrm_account/index.js
+++ b/server/api/sugarcrm_account/index.js
@@ -1,20 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./sugarcrm_account.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([19, 13], ['admin']), controller.index);
-router.get('/:id/check', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.checkAccount);
-router.get('/:id/fields', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.getFields);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show);
-router.post('/validate/:field', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.accountValidation);
-router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy);
-
-
-module.exports = router;
+var _0x37ab=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65\x2F\x3A\x66\x69\x65\x6C\x64","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x37ab[0];var express=require(_0x37ab[1]);var auth=require(_0x37ab[2]);var controller=require(_0x37ab[3]);var router=express.Router();router[_0x37ab[9]](_0x37ab[4],auth[_0x37ab[5]](),auth[_0x37ab[7]]([19,13],[_0x37ab[6]]),controller[_0x37ab[8]]);router[_0x37ab[9]](_0x37ab[10],auth[_0x37ab[5]](),auth[_0x37ab[7]]([19],[_0x37ab[6]]),controller[_0x37ab[11]]);router[_0x37ab[9]](_0x37ab[12],auth[_0x37ab[5]](),auth[_0x37ab[7]]([19],[_0x37ab[6]]),controller[_0x37ab[13]]);router[_0x37ab[9]](_0x37ab[14],auth[_0x37ab[5]](),auth[_0x37ab[7]]([19],[_0x37ab[6]]),controller[_0x37ab[15]]);router[_0x37ab[18]](_0x37ab[16],auth[_0x37ab[5]](),auth[_0x37ab[7]]([19],[_0x37ab[6]]),controller[_0x37ab[17]]);router[_0x37ab[18]](_0x37ab[4],auth[_0x37ab[5]](),auth[_0x37ab[7]]([19],[_0x37ab[6]]),controller[_0x37ab[19]]);router[_0x37ab[21]](_0x37ab[14],auth[_0x37ab[5]](),auth[_0x37ab[7]]([19],[_0x37ab[6]]),controller[_0x37ab[20]]);router[_0x37ab[23]](_0x37ab[4],auth[_0x37ab[5]](),auth[_0x37ab[7]]([19],[_0x37ab[6]]),controller[_0x37ab[22]]);router[_0x37ab[23]](_0x37ab[14],auth[_0x37ab[5]](),auth[_0x37ab[7]]([19],[_0x37ab[6]]),controller[_0x37ab[24]]);module[_0x37ab[25]]= router
\ No newline at end of file
diff --git a/server/api/sugarcrm_account/sugarcrm_account.controller.js b/server/api/sugarcrm_account/sugarcrm_account.controller.js
index 344c0ed..c9cd2de 100644
--- a/server/api/sugarcrm_account/sugarcrm_account.controller.js
+++ b/server/api/sugarcrm_account/sugarcrm_account.controller.js
@@ -1,202 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/sugarcrm/accounts              ->  index
- * POST    /api/sugarcrm/accounts              ->  create
- * GET     /api/sugarcrm/accounts/:id          ->  show
- * PUT     /api/sugarcrm/accounts/:id          ->  update
- * DELETE  /api/sugarcrm/accounts/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var SugarcrmAccount = require('../../models').SugarcrmAccount;
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function responseWithoutResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function() {
-    res.sendStatus(statusCode);
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of SugarcrmAccounts
-exports.index = function(req, res) {
-  return SugarcrmAccount
-    .scope('configurations')
-    .findAndCountAll(_.merge(Util.getQuery(req.query), {
-      distinct: true
-    }))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single SugarcrmAccount from the DB
-exports.show = function(req, res) {
-  return SugarcrmAccount.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new SugarcrmAccount in the DB
-exports.create = function(req, res) {
-  return SugarcrmAccount.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing SugarcrmAccount in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return SugarcrmAccount.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a SugarcrmAccount from the DB
-exports.destroy = function(req, res) {
-  return SugarcrmAccount.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
-
-exports.checkAccount = function(req, res) {
-  return SugarcrmAccount.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(function(account) {
-      var sugar = require('node-sugarcrm-client');
-      sugar.init({
-        apiURL: Util.stripTrailingSlash(account.remoteUri) + "/service/v4_1/rest.php",
-        login: account.username,
-        passwd: account.password
-      });
-      sugar.login(function(sessionId) {
-        if (!sessionId) {
-          return res.sendStatus(400);
-        }
-        return res.sendStatus(200);
-      });
-    })
-    .catch(handleError(res));
-}
-
-exports.bulkDestroy = function(req, res) {
-  SugarcrmAccount
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(handleError(res));
-};
-
-exports.accountValidation = function(req, res) {
-  var where = {};
-  where[req.params.field] = req.body.value;
-  return SugarcrmAccount
-    .findAndCountAll({
-      where: where
-    })
-    .then(function(result) {
-      if (result.count) {
-        return res.status(200).send({
-          isValid: false,
-          value: req.body.value
-        });
-      }
-      return res.status(200).send({
-        isValid: true,
-        value: req.body.value
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getFields = function(req, res) {
-  var sugar = require('node-sugarcrm-client');
-  return SugarcrmAccount.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(function(account) {
-      sugar.init({
-        apiURL: Util.stripTrailingSlash(account.remoteUri) + "/service/v4_1/rest.php",
-        login: account.username,
-        passwd: account.password
-      });
-      sugar.login(function(sessionId) {
-        if (!sessionId) {
-          return res.sendStatus(400);
-        }
-        var params = {
-          session: sessionId,
-          module_name: "Cases"
-        };
-        sugar.call("get_module_fields", params, function(result, err) {
-          if (err) {
-            return res.sendStatus(400);
-          }
-          return res.status(200).send(result.module_fields);
-        });
-      });
-    })
-    .catch(handleError(res));
-};
+var _0xf45d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x6E\x6F\x64\x65\x2D\x73\x75\x67\x61\x72\x63\x72\x6D\x2D\x63\x6C\x69\x65\x6E\x74","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x73\x74\x72\x69\x70\x54\x72\x61\x69\x6C\x69\x6E\x67\x53\x6C\x61\x73\x68","\x2F\x73\x65\x72\x76\x69\x63\x65\x2F\x76\x34\x5F\x31\x2F\x72\x65\x73\x74\x2E\x70\x68\x70","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x69\x6E\x69\x74","\x6C\x6F\x67\x69\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x63\x6F\x75\x6E\x74","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x43\x61\x73\x65\x73","\x67\x65\x74\x5F\x6D\x6F\x64\x75\x6C\x65\x5F\x66\x69\x65\x6C\x64\x73","\x6D\x6F\x64\x75\x6C\x65\x5F\x66\x69\x65\x6C\x64\x73","\x63\x61\x6C\x6C"];_0xf45d[0];var _=require(_0xf45d[1]);var Util=require(_0xf45d[2]);var SugarcrmAccount=require(_0xf45d[4])[_0xf45d[3]];function handleError(_0xe60cx5,_0xe60cx6){_0xe60cx6= _0xe60cx6|| 500;return function(_0xe60cx7){_0xe60cx5[_0xf45d[6]](_0xe60cx6)[_0xf45d[5]](_0xe60cx7)}}function responseWithResult(_0xe60cx5,_0xe60cx6){_0xe60cx6= _0xe60cx6|| 200;return function(_0xe60cx9){if(_0xe60cx9){_0xe60cx5[_0xf45d[6]](_0xe60cx6)[_0xf45d[7]](_0xe60cx9)}}}function responseWithoutResult(_0xe60cx5,_0xe60cx6){_0xe60cx6= _0xe60cx6|| 200;return function(){_0xe60cx5[_0xf45d[8]](_0xe60cx6)}}function handleEntityNotFound(_0xe60cx5){return function(_0xe60cx9){if(!_0xe60cx9){_0xe60cx5[_0xf45d[6]](404)[_0xf45d[9]]();return null};return _0xe60cx9}}function saveUpdates(_0xe60cxd){return function(_0xe60cx9){return _0xe60cx9[_0xf45d[11]](_0xe60cxd)[_0xf45d[10]](function(_0xe60cxe){return _0xe60cxe})}}function removeEntity(_0xe60cx5){return function(_0xe60cx9){if(_0xe60cx9){return _0xe60cx9[_0xf45d[12]]()[_0xf45d[10]](function(){_0xe60cx5[_0xf45d[6]](204)[_0xf45d[9]]()})}}}exports[_0xf45d[13]]= function(_0xe60cx10,_0xe60cx5){return SugarcrmAccount[_0xf45d[20]](_0xf45d[19])[_0xf45d[18]](_[_0xf45d[17]](Util[_0xf45d[16]](_0xe60cx10[_0xf45d[15]]),{distinct:true}))[_0xf45d[10]](responseWithResult(_0xe60cx5))[_0xf45d[14]](handleError(_0xe60cx5))};exports[_0xf45d[21]]= function(_0xe60cx10,_0xe60cx5){return SugarcrmAccount[_0xf45d[24]](_0xe60cx10[_0xf45d[23]][_0xf45d[22]])[_0xf45d[10]](handleEntityNotFound(_0xe60cx5))[_0xf45d[10]](responseWithResult(_0xe60cx5))[_0xf45d[14]](handleError(_0xe60cx5))};exports[_0xf45d[25]]= function(_0xe60cx10,_0xe60cx5){return SugarcrmAccount[_0xf45d[25]](_0xe60cx10[_0xf45d[26]])[_0xf45d[10]](responseWithResult(_0xe60cx5,201))[_0xf45d[14]](handleError(_0xe60cx5))};exports[_0xf45d[27]]= function(_0xe60cx10,_0xe60cx5){if(_0xe60cx10[_0xf45d[26]][_0xf45d[22]]){delete _0xe60cx10[_0xf45d[26]][_0xf45d[22]]};return SugarcrmAccount[_0xf45d[24]](_0xe60cx10[_0xf45d[23]][_0xf45d[22]])[_0xf45d[10]](handleEntityNotFound(_0xe60cx5))[_0xf45d[10]](saveUpdates(_0xe60cx10[_0xf45d[26]]))[_0xf45d[10]](responseWithResult(_0xe60cx5))[_0xf45d[14]](handleError(_0xe60cx5))};exports[_0xf45d[12]]= function(_0xe60cx10,_0xe60cx5){return SugarcrmAccount[_0xf45d[24]](_0xe60cx10[_0xf45d[23]][_0xf45d[22]])[_0xf45d[10]](handleEntityNotFound(_0xe60cx5))[_0xf45d[10]](removeEntity(_0xe60cx5))[_0xf45d[14]](handleError(_0xe60cx5))};exports[_0xf45d[28]]= function(_0xe60cx10,_0xe60cx5){return SugarcrmAccount[_0xf45d[24]](_0xe60cx10[_0xf45d[23]][_0xf45d[22]])[_0xf45d[10]](handleEntityNotFound(_0xe60cx5))[_0xf45d[10]](function(_0xe60cx11){var _0xe60cx12=require(_0xf45d[29]);_0xe60cx12[_0xf45d[35]]({apiURL:Util[_0xf45d[31]](_0xe60cx11[_0xf45d[30]])+ _0xf45d[32],login:_0xe60cx11[_0xf45d[33]],passwd:_0xe60cx11[_0xf45d[34]]});_0xe60cx12[_0xf45d[36]](function(_0xe60cx13){if(!_0xe60cx13){return _0xe60cx5[_0xf45d[8]](400)};return _0xe60cx5[_0xf45d[8]](200)})})[_0xf45d[14]](handleError(_0xe60cx5))};exports[_0xf45d[37]]= function(_0xe60cx10,_0xe60cx5){SugarcrmAccount[_0xf45d[12]]({where:{id:_0xe60cx10[_0xf45d[15]][_0xf45d[38]]},individualHooks:true})[_0xf45d[10]](function(){return _0xe60cx5[_0xf45d[8]](204)})[_0xf45d[14]](handleError(_0xe60cx5))};exports[_0xf45d[39]]= function(_0xe60cx10,_0xe60cx5){var _0xe60cx14={};_0xe60cx14[_0xe60cx10[_0xf45d[23]][_0xf45d[40]]]= _0xe60cx10[_0xf45d[26]][_0xf45d[41]];return SugarcrmAccount[_0xf45d[18]]({where:_0xe60cx14})[_0xf45d[10]](function(_0xe60cx15){if(_0xe60cx15[_0xf45d[42]]){return _0xe60cx5[_0xf45d[6]](200)[_0xf45d[5]]({isValid:false,value:_0xe60cx10[_0xf45d[26]][_0xf45d[41]]})};return _0xe60cx5[_0xf45d[6]](200)[_0xf45d[5]]({isValid:true,value:_0xe60cx10[_0xf45d[26]][_0xf45d[41]]})})[_0xf45d[14]](function(_0xe60cx7){return handleError(_0xe60cx5,_0xe60cx7)})};exports[_0xf45d[43]]= function(_0xe60cx10,_0xe60cx5){var _0xe60cx12=require(_0xf45d[29]);return SugarcrmAccount[_0xf45d[24]](_0xe60cx10[_0xf45d[23]][_0xf45d[22]])[_0xf45d[10]](handleEntityNotFound(_0xe60cx5))[_0xf45d[10]](function(_0xe60cx11){_0xe60cx12[_0xf45d[35]]({apiURL:Util[_0xf45d[31]](_0xe60cx11[_0xf45d[30]])+ _0xf45d[32],login:_0xe60cx11[_0xf45d[33]],passwd:_0xe60cx11[_0xf45d[34]]});_0xe60cx12[_0xf45d[36]](function(_0xe60cx13){if(!_0xe60cx13){return _0xe60cx5[_0xf45d[8]](400)};var _0xe60cx16={session:_0xe60cx13,module_name:_0xf45d[44]};_0xe60cx12[_0xf45d[47]](_0xf45d[45],_0xe60cx16,function(_0xe60cx15,_0xe60cx7){if(_0xe60cx7){return _0xe60cx5[_0xf45d[8]](400)};return _0xe60cx5[_0xf45d[6]](200)[_0xf45d[5]](_0xe60cx15[_0xf45d[46]])})})})[_0xf45d[14]](handleError(_0xe60cx5))}
\ No newline at end of file
diff --git a/server/api/sugarcrm_account/sugarcrm_account.events.js b/server/api/sugarcrm_account/sugarcrm_account.events.js
index b65ac40..d748488 100644
--- a/server/api/sugarcrm_account/sugarcrm_account.events.js
+++ b/server/api/sugarcrm_account/sugarcrm_account.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const SugarcrmAccount = require('../../models').SugarcrmAccount;
-
-var SugarcrmAccountEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-SugarcrmAccountEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  SugarcrmAccount.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    SugarcrmAccountEvents.emit(event + ':' + doc._id, doc);
-    SugarcrmAccountEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = SugarcrmAccountEvents;
+var _0x6d6c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6d6c[0];const EventEmitter=require(_0x6d6c[1]);const SugarcrmAccount=require(_0x6d6c[3])[_0x6d6c[2]];var SugarcrmAccountEvents= new EventEmitter();SugarcrmAccountEvents[_0x6d6c[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6d6c[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x6d6c[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6d6c[6]};for(var e in events){var event=events[e];SugarcrmAccount[_0x6d6c[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x9560x8,_0x9560x9,_0x9560xa){SugarcrmAccountEvents[_0x6d6c[10]](event+ _0x6d6c[8]+ _0x9560x8[_0x6d6c[9]],_0x9560x8);SugarcrmAccountEvents[_0x6d6c[10]](event,_0x9560x8);_0x9560xa(null)}}module[_0x6d6c[11]]= SugarcrmAccountEvents
\ No newline at end of file
diff --git a/server/api/sugarcrm_account/sugarcrm_account.socket.js b/server/api/sugarcrm_account/sugarcrm_account.socket.js
index 5a94608..5d0b387 100644
--- a/server/api/sugarcrm_account/sugarcrm_account.socket.js
+++ b/server/api/sugarcrm_account/sugarcrm_account.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const SugarcrmAccountEvents = require('./sugarcrm_account.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('sugarcrm_account:' + event, socket);
-
-    SugarcrmAccountEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    SugarcrmAccountEvents.removeListener(event, listener);
-  };
-}
+var _0x3415=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x3415[0];const SugarcrmAccountEvents=require(_0x3415[1]);var events=[_0x3415[2],_0x3415[3]];exports[_0x3415[4]]= function(_0x65e3x3){for(var _0x65e3x4=0,_0x65e3x5=events[_0x3415[5]];_0x65e3x4< _0x65e3x5;_0x65e3x4++){var _0x65e3x6=events[_0x65e3x4];var _0x65e3x7=createListener(_0x3415[6]+ _0x65e3x6,_0x65e3x3);SugarcrmAccountEvents[_0x3415[7]](_0x65e3x6,_0x65e3x7);_0x65e3x3[_0x3415[7]](_0x3415[8],removeListener(_0x65e3x6,_0x65e3x7))}};function createListener(_0x65e3x6,_0x65e3x3){return function(_0x65e3x9){_0x65e3x3[_0x3415[9]](_0x65e3x6,_0x65e3x9)}}function removeListener(_0x65e3x6,_0x65e3x7){return function(){SugarcrmAccountEvents[_0x3415[10]](_0x65e3x6,_0x65e3x7)}}
\ No newline at end of file
diff --git a/server/api/sugarcrm_configuration/index.js b/server/api/sugarcrm_configuration/index.js
index a7bbe3c..5cd6681 100644
--- a/server/api/sugarcrm_configuration/index.js
+++ b/server/api/sugarcrm_configuration/index.js
@@ -1,17 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./sugarcrm_configuration.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update);
-router.post('/:id/:type', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.addConfigurationField);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy);
-
-
-module.exports = router;
+var _0xf234=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x3A\x74\x79\x70\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf234[0];var express=require(_0xf234[1]);var auth=require(_0xf234[2]);var controller=require(_0xf234[3]);var router=express.Router();router[_0xf234[9]](_0xf234[4],auth[_0xf234[5]](),auth[_0xf234[7]]([19],[_0xf234[6]]),controller[_0xf234[8]]);router[_0xf234[9]](_0xf234[10],auth[_0xf234[5]](),auth[_0xf234[7]]([19],[_0xf234[6]]),controller[_0xf234[11]]);router[_0xf234[13]](_0xf234[4],auth[_0xf234[5]](),auth[_0xf234[7]]([19],[_0xf234[6]]),controller[_0xf234[12]]);router[_0xf234[15]](_0xf234[10],auth[_0xf234[5]](),auth[_0xf234[7]]([19],[_0xf234[6]]),controller[_0xf234[14]]);router[_0xf234[13]](_0xf234[16],auth[_0xf234[5]](),auth[_0xf234[7]]([19],[_0xf234[6]]),controller[_0xf234[17]]);router[_0xf234[19]](_0xf234[10],auth[_0xf234[5]](),auth[_0xf234[7]]([19],[_0xf234[6]]),controller[_0xf234[18]]);module[_0xf234[20]]= router
\ No newline at end of file
diff --git a/server/api/sugarcrm_configuration/sugarcrm_configuration.controller.js b/server/api/sugarcrm_configuration/sugarcrm_configuration.controller.js
index 5918283..43ab178 100644
--- a/server/api/sugarcrm_configuration/sugarcrm_configuration.controller.js
+++ b/server/api/sugarcrm_configuration/sugarcrm_configuration.controller.js
@@ -1,145 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/sugarcrm/configurations              ->  index
- * POST    /api/sugarcrm/configurations              ->  create
- * GET     /api/sugarcrm/configurations/:id          ->  show
- * PUT     /api/sugarcrm/configurations/:id          ->  update
- * DELETE  /api/sugarcrm/configurations/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-
-var SugarcrmConfiguration = require('../../models').SugarcrmConfiguration;
-var SugarcrmField = require('../../models').SugarcrmField;
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of SugarcrmConfigurations
-exports.index = function(req, res) {
-  SugarcrmConfiguration.findAll({
-      where: req.query
-    })
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single SugarcrmConfiguration from the DB
-exports.show = function(req, res) {
-  SugarcrmConfiguration.find({
-      where: {
-        id: req.params.id
-      },
-      include: [{
-        model: SugarcrmField,
-        as: 'Subject'
-      }, {
-        model: SugarcrmField,
-        as: 'Description'
-      }, {
-        model: SugarcrmField,
-        as: 'Field'
-      }]
-    })
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new SugarcrmConfiguration in the DB
-exports.create = function(req, res) {
-  SugarcrmConfiguration.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing SugarcrmConfiguration in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  SugarcrmConfiguration.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a SugarcrmConfiguration from the DB
-exports.destroy = function(req, res) {
-  SugarcrmConfiguration.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
-
-exports.addConfigurationField = function(req, res, next) {
-  var sugarcrmConfiguration;
-  SugarcrmConfiguration
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(function(sugarcrm_configuration) {
-      sugarcrmConfiguration = sugarcrm_configuration;
-      return SugarcrmField.create(req.body)
-    })
-    .then(function(sugarcrmField) {
-      switch (req.params.type) {
-        case 'subject':
-          return [sugarcrmConfiguration.addSubject(sugarcrmField), sugarcrmField];
-        case 'description':
-          return [sugarcrmConfiguration.addDescription(sugarcrmField), sugarcrmField];
-        case 'field':
-          return [sugarcrmConfiguration.addField(sugarcrmField), sugarcrmField];
-      }
-    })
-    .spread(function(data, sugarcrmField) {
-      return res.status(201).json(sugarcrmField);
-    })
-    .catch(handleError(res));
-};
+var _0xbe90=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x53\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x73\x70\x72\x65\x61\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65"];_0xbe90[0];var _=require(_0xbe90[1]);var SugarcrmConfiguration=require(_0xbe90[3])[_0xbe90[2]];var SugarcrmField=require(_0xbe90[3])[_0xbe90[4]];function handleError(_0x9087x5,_0x9087x6){_0x9087x6= _0x9087x6|| 500;return function(_0x9087x7){_0x9087x5[_0xbe90[6]](_0x9087x6)[_0xbe90[5]](_0x9087x7)}}function responseWithResult(_0x9087x5,_0x9087x6){_0x9087x6= _0x9087x6|| 200;return function(_0x9087x9){if(_0x9087x9){_0x9087x5[_0xbe90[6]](_0x9087x6)[_0xbe90[7]](_0x9087x9)}}}function handleEntityNotFound(_0x9087x5){return function(_0x9087x9){if(!_0x9087x9){_0x9087x5[_0xbe90[6]](404)[_0xbe90[8]]();return null};return _0x9087x9}}function saveUpdates(_0x9087xc){return function(_0x9087x9){return _0x9087x9[_0xbe90[10]](_0x9087xc)[_0xbe90[9]](function(_0x9087xd){return _0x9087xd})}}function removeEntity(_0x9087x5){return function(_0x9087x9){if(_0x9087x9){return _0x9087x9[_0xbe90[11]]()[_0xbe90[9]](function(){_0x9087x5[_0xbe90[6]](204)[_0xbe90[8]]()})}}}exports[_0xbe90[12]]= function(_0x9087xf,_0x9087x5){SugarcrmConfiguration[_0xbe90[15]]({where:_0x9087xf[_0xbe90[14]]})[_0xbe90[9]](responseWithResult(_0x9087x5))[_0xbe90[13]](handleError(_0x9087x5))};exports[_0xbe90[16]]= function(_0x9087xf,_0x9087x5){SugarcrmConfiguration[_0xbe90[22]]({where:{id:_0x9087xf[_0xbe90[18]][_0xbe90[17]]},include:[{model:SugarcrmField,as:_0xbe90[19]},{model:SugarcrmField,as:_0xbe90[20]},{model:SugarcrmField,as:_0xbe90[21]}]})[_0xbe90[9]](handleEntityNotFound(_0x9087x5))[_0xbe90[9]](responseWithResult(_0x9087x5))[_0xbe90[13]](handleError(_0x9087x5))};exports[_0xbe90[23]]= function(_0x9087xf,_0x9087x5){SugarcrmConfiguration[_0xbe90[23]](_0x9087xf[_0xbe90[24]])[_0xbe90[9]](responseWithResult(_0x9087x5,201))[_0xbe90[13]](handleError(_0x9087x5))};exports[_0xbe90[25]]= function(_0x9087xf,_0x9087x5){if(_0x9087xf[_0xbe90[24]][_0xbe90[17]]){delete _0x9087xf[_0xbe90[24]][_0xbe90[17]]};SugarcrmConfiguration[_0xbe90[26]](_0x9087xf[_0xbe90[18]][_0xbe90[17]])[_0xbe90[9]](handleEntityNotFound(_0x9087x5))[_0xbe90[9]](saveUpdates(_0x9087xf[_0xbe90[24]]))[_0xbe90[9]](responseWithResult(_0x9087x5))[_0xbe90[13]](handleError(_0x9087x5))};exports[_0xbe90[11]]= function(_0x9087xf,_0x9087x5){SugarcrmConfiguration[_0xbe90[26]](_0x9087xf[_0xbe90[18]][_0xbe90[17]])[_0xbe90[9]](handleEntityNotFound(_0x9087x5))[_0xbe90[9]](removeEntity(_0x9087x5))[_0xbe90[13]](handleError(_0x9087x5))};exports[_0xbe90[27]]= function(_0x9087xf,_0x9087x5,_0x9087x10){var _0x9087x11;SugarcrmConfiguration[_0xbe90[26]](_0x9087xf[_0xbe90[18]][_0xbe90[17]])[_0xbe90[9]](handleEntityNotFound(_0x9087x5))[_0xbe90[9]](function(_0x9087x14){_0x9087x11= _0x9087x14;return SugarcrmField[_0xbe90[23]](_0x9087xf[_0xbe90[24]])})[_0xbe90[9]](function(_0x9087x13){switch(_0x9087xf[_0xbe90[18]][_0xbe90[35]]){case _0xbe90[30]:return [_0x9087x11[_0xbe90[29]](_0x9087x13),_0x9087x13];case _0xbe90[32]:return [_0x9087x11[_0xbe90[31]](_0x9087x13),_0x9087x13];case _0xbe90[34]:return [_0x9087x11[_0xbe90[33]](_0x9087x13),_0x9087x13]}})[_0xbe90[28]](function(_0x9087x12,_0x9087x13){return _0x9087x5[_0xbe90[6]](201)[_0xbe90[7]](_0x9087x13)})[_0xbe90[13]](handleError(_0x9087x5))}
\ No newline at end of file
diff --git a/server/api/sugarcrm_configuration/sugarcrm_configuration.events.js b/server/api/sugarcrm_configuration/sugarcrm_configuration.events.js
index f1764e0..9ba6c0e 100644
--- a/server/api/sugarcrm_configuration/sugarcrm_configuration.events.js
+++ b/server/api/sugarcrm_configuration/sugarcrm_configuration.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const SugarcrmConfiguration = require('../../models').SugarcrmConfiguration;
-
-var SugarcrmConfigurationEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-SugarcrmConfigurationEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  SugarcrmConfiguration.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    SugarcrmConfigurationEvents.emit(event + ':' + doc._id, doc);
-    SugarcrmConfigurationEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = SugarcrmConfigurationEvents;
+var _0xdf04=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xdf04[0];const EventEmitter=require(_0xdf04[1]);const SugarcrmConfiguration=require(_0xdf04[3])[_0xdf04[2]];var SugarcrmConfigurationEvents= new EventEmitter();SugarcrmConfigurationEvents[_0xdf04[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xdf04[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xdf04[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xdf04[6]};for(var e in events){var event=events[e];SugarcrmConfiguration[_0xdf04[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xf8bdx8,_0xf8bdx9,_0xf8bdxa){SugarcrmConfigurationEvents[_0xdf04[10]](event+ _0xdf04[8]+ _0xf8bdx8[_0xdf04[9]],_0xf8bdx8);SugarcrmConfigurationEvents[_0xdf04[10]](event,_0xf8bdx8);_0xf8bdxa(null)}}module[_0xdf04[11]]= SugarcrmConfigurationEvents
\ No newline at end of file
diff --git a/server/api/sugarcrm_configuration/sugarcrm_configuration.socket.js b/server/api/sugarcrm_configuration/sugarcrm_configuration.socket.js
index 3a1b051..a925e43 100644
--- a/server/api/sugarcrm_configuration/sugarcrm_configuration.socket.js
+++ b/server/api/sugarcrm_configuration/sugarcrm_configuration.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const SugarcrmConfigurationEvents = require('./sugarcrm_configuration.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('sugarcrm_configuration:' + event, socket);
-
-    SugarcrmConfigurationEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    SugarcrmConfigurationEvents.removeListener(event, listener);
-  };
-}
+var _0x482f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x482f[0];const SugarcrmConfigurationEvents=require(_0x482f[1]);var events=[_0x482f[2],_0x482f[3]];exports[_0x482f[4]]= function(_0x353dx3){for(var _0x353dx4=0,_0x353dx5=events[_0x482f[5]];_0x353dx4< _0x353dx5;_0x353dx4++){var _0x353dx6=events[_0x353dx4];var _0x353dx7=createListener(_0x482f[6]+ _0x353dx6,_0x353dx3);SugarcrmConfigurationEvents[_0x482f[7]](_0x353dx6,_0x353dx7);_0x353dx3[_0x482f[7]](_0x482f[8],removeListener(_0x353dx6,_0x353dx7))}};function createListener(_0x353dx6,_0x353dx3){return function(_0x353dx9){_0x353dx3[_0x482f[9]](_0x353dx6,_0x353dx9)}}function removeListener(_0x353dx6,_0x353dx7){return function(){SugarcrmConfigurationEvents[_0x482f[10]](_0x353dx6,_0x353dx7)}}
\ No newline at end of file
diff --git a/server/api/sugarcrm_field/index.js b/server/api/sugarcrm_field/index.js
index 30e2ad2..3853a7b 100644
--- a/server/api/sugarcrm_field/index.js
+++ b/server/api/sugarcrm_field/index.js
@@ -1,17 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./sugarcrm_field.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), controller.index);
-
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy);
-
-
-module.exports = router;
+var _0x3927=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3927[0];var express=require(_0x3927[1]);var auth=require(_0x3927[2]);var controller=require(_0x3927[3]);var router=express.Router();router[_0x3927[7]](_0x3927[4],auth[_0x3927[5]](),controller[_0x3927[6]]);router[_0x3927[7]](_0x3927[8],auth[_0x3927[5]](),auth[_0x3927[10]]([19],[_0x3927[9]]),controller[_0x3927[11]]);router[_0x3927[13]](_0x3927[4],auth[_0x3927[5]](),auth[_0x3927[10]]([19],[_0x3927[9]]),controller[_0x3927[12]]);router[_0x3927[15]](_0x3927[8],auth[_0x3927[5]](),auth[_0x3927[10]]([19],[_0x3927[9]]),controller[_0x3927[14]]);router[_0x3927[17]](_0x3927[8],auth[_0x3927[5]](),auth[_0x3927[10]]([19],[_0x3927[9]]),controller[_0x3927[16]]);module[_0x3927[18]]= router
\ No newline at end of file
diff --git a/server/api/sugarcrm_field/sugarcrm_field.controller.js b/server/api/sugarcrm_field/sugarcrm_field.controller.js
index eb6fe3d..8112b00 100644
--- a/server/api/sugarcrm_field/sugarcrm_field.controller.js
+++ b/server/api/sugarcrm_field/sugarcrm_field.controller.js
@@ -1,104 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/sugarcrm/fields              ->  index
- * POST    /api/sugarcrm/fields              ->  create
- * GET     /api/sugarcrm/fields/:id          ->  show
- * PUT     /api/sugarcrm/fields/:id          ->  update
- * DELETE  /api/sugarcrm/fields/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-
-var SugarcrmField = require('../../models').SugarcrmField;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) { 
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of SugarcrmFields
-exports.index = function(req, res) {
-  SugarcrmField.findAll()
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single SugarcrmField from the DB
-exports.show = function(req, res) {
-  SugarcrmField.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new SugarcrmField in the DB
-exports.create = function(req, res) {
-  SugarcrmField.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing SugarcrmField in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  SugarcrmField.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a SugarcrmField from the DB
-exports.destroy = function(req, res) {
-  SugarcrmField.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
+var _0x1029=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0x1029[0];var _=require(_0x1029[1]);var SugarcrmField=require(_0x1029[3])[_0x1029[2]];function handleError(_0x8ebfx4,_0x8ebfx5){_0x8ebfx5= _0x8ebfx5|| 500;return function(_0x8ebfx6){_0x8ebfx4[_0x1029[5]](_0x8ebfx5)[_0x1029[4]](_0x8ebfx6)}}function responseWithResult(_0x8ebfx4,_0x8ebfx5){_0x8ebfx5= _0x8ebfx5|| 200;return function(_0x8ebfx8){if(_0x8ebfx8){_0x8ebfx4[_0x1029[5]](_0x8ebfx5)[_0x1029[6]](_0x8ebfx8)}}}function handleEntityNotFound(_0x8ebfx4){return function(_0x8ebfx8){if(!_0x8ebfx8){_0x8ebfx4[_0x1029[5]](404)[_0x1029[7]]();return null};return _0x8ebfx8}}function saveUpdates(_0x8ebfxb){return function(_0x8ebfx8){return _0x8ebfx8[_0x1029[9]](_0x8ebfxb)[_0x1029[8]](function(_0x8ebfxc){return _0x8ebfxc})}}function removeEntity(_0x8ebfx4){return function(_0x8ebfx8){if(_0x8ebfx8){return _0x8ebfx8[_0x1029[10]]()[_0x1029[8]](function(){_0x8ebfx4[_0x1029[5]](204)[_0x1029[7]]()})}}}exports[_0x1029[11]]= function(_0x8ebfxe,_0x8ebfx4){SugarcrmField[_0x1029[13]]()[_0x1029[8]](responseWithResult(_0x8ebfx4))[_0x1029[12]](handleError(_0x8ebfx4))};exports[_0x1029[14]]= function(_0x8ebfxe,_0x8ebfx4){SugarcrmField[_0x1029[17]](_0x8ebfxe[_0x1029[16]][_0x1029[15]])[_0x1029[8]](handleEntityNotFound(_0x8ebfx4))[_0x1029[8]](responseWithResult(_0x8ebfx4))[_0x1029[12]](handleError(_0x8ebfx4))};exports[_0x1029[18]]= function(_0x8ebfxe,_0x8ebfx4){SugarcrmField[_0x1029[18]](_0x8ebfxe[_0x1029[19]])[_0x1029[8]](responseWithResult(_0x8ebfx4,201))[_0x1029[12]](handleError(_0x8ebfx4))};exports[_0x1029[20]]= function(_0x8ebfxe,_0x8ebfx4){if(_0x8ebfxe[_0x1029[19]][_0x1029[15]]){delete _0x8ebfxe[_0x1029[19]][_0x1029[15]]};SugarcrmField[_0x1029[17]](_0x8ebfxe[_0x1029[16]][_0x1029[15]])[_0x1029[8]](handleEntityNotFound(_0x8ebfx4))[_0x1029[8]](saveUpdates(_0x8ebfxe[_0x1029[19]]))[_0x1029[8]](responseWithResult(_0x8ebfx4))[_0x1029[12]](handleError(_0x8ebfx4))};exports[_0x1029[10]]= function(_0x8ebfxe,_0x8ebfx4){SugarcrmField[_0x1029[17]](_0x8ebfxe[_0x1029[16]][_0x1029[15]])[_0x1029[8]](handleEntityNotFound(_0x8ebfx4))[_0x1029[8]](removeEntity(_0x8ebfx4))[_0x1029[12]](handleError(_0x8ebfx4))}
\ No newline at end of file
diff --git a/server/api/sugarcrm_field/sugarcrm_field.events.js b/server/api/sugarcrm_field/sugarcrm_field.events.js
index 0845bee..77fe007 100644
--- a/server/api/sugarcrm_field/sugarcrm_field.events.js
+++ b/server/api/sugarcrm_field/sugarcrm_field.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const SugarcrmField = require('../../models').SugarcrmField;
-
-var SugarcrmFieldEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-SugarcrmFieldEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  SugarcrmField.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    SugarcrmFieldEvents.emit(event + ':' + doc._id, doc);
-    SugarcrmFieldEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = SugarcrmFieldEvents;
+var _0x4dd3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x4dd3[0];const EventEmitter=require(_0x4dd3[1]);const SugarcrmField=require(_0x4dd3[3])[_0x4dd3[2]];var SugarcrmFieldEvents= new EventEmitter();SugarcrmFieldEvents[_0x4dd3[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x4dd3[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x4dd3[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x4dd3[6]};for(var e in events){var event=events[e];SugarcrmField[_0x4dd3[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x8b2dx8,_0x8b2dx9,_0x8b2dxa){SugarcrmFieldEvents[_0x4dd3[10]](event+ _0x4dd3[8]+ _0x8b2dx8[_0x4dd3[9]],_0x8b2dx8);SugarcrmFieldEvents[_0x4dd3[10]](event,_0x8b2dx8);_0x8b2dxa(null)}}module[_0x4dd3[11]]= SugarcrmFieldEvents
\ No newline at end of file
diff --git a/server/api/sugarcrm_field/sugarcrm_field.socket.js b/server/api/sugarcrm_field/sugarcrm_field.socket.js
index 8830ac2..532f162 100644
--- a/server/api/sugarcrm_field/sugarcrm_field.socket.js
+++ b/server/api/sugarcrm_field/sugarcrm_field.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const SugarcrmFieldEvents = require('./sugarcrm_field.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('sugarcrm_field:' + event, socket);
-
-    SugarcrmFieldEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    SugarcrmFieldEvents.removeListener(event, listener);
-  };
-}
+var _0x4081=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x4081[0];const SugarcrmFieldEvents=require(_0x4081[1]);var events=[_0x4081[2],_0x4081[3]];exports[_0x4081[4]]= function(_0x3eaex3){for(var _0x3eaex4=0,_0x3eaex5=events[_0x4081[5]];_0x3eaex4< _0x3eaex5;_0x3eaex4++){var _0x3eaex6=events[_0x3eaex4];var _0x3eaex7=createListener(_0x4081[6]+ _0x3eaex6,_0x3eaex3);SugarcrmFieldEvents[_0x4081[7]](_0x3eaex6,_0x3eaex7);_0x3eaex3[_0x4081[7]](_0x4081[8],removeListener(_0x3eaex6,_0x3eaex7))}};function createListener(_0x3eaex6,_0x3eaex3){return function(_0x3eaex9){_0x3eaex3[_0x4081[9]](_0x3eaex6,_0x3eaex9)}}function removeListener(_0x3eaex6,_0x3eaex7){return function(){SugarcrmFieldEvents[_0x4081[10]](_0x3eaex6,_0x3eaex7)}}
\ No newline at end of file
diff --git a/server/api/tag/index.js b/server/api/tag/index.js
index 99449c8..575d29d 100644
--- a/server/api/tag/index.js
+++ b/server/api/tag/index.js
@@ -1,171 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./tag.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-/**
- * @api {get} /api/tags/ Get Tags' list.
- *
- * @apiParam (Query) {Number} [offset] Pagination offset.
- * @apiParam (Query) {Number} [limit] Pagination limit.
- *
- * @apiVersion 0.0.143
- * @apiName GetTags
- * @apiGroup Tags
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Number} count Number of tags.
- * @apiSuccess {Object[]} rows  Tags' list.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *       "count": 2,
- *       "rows": [{
- *          "id": 1
- *          "name": "tag1"
- *          "description": "my tag description"
- *           ...
- *       },{
- *          "id": 2
- *          "name": "newtag"
- *          "description": null
- *          ...
- *       },...]
- *     }
- */
-router.get('/', auth.isAuthenticated(), auth.hasModule([5, 9, 13], ['admin', 'agent']), controller.index);
-/**
- * @api {get} /api/tags/:id Get Tag's details.
- * @apiParam {Number} id Tag's unique ID.
- * @apiVersion 0.0.143
- * @apiName GetTag
- * @apiGroup Tags
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Object} Tag's details.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *          "id": 1
- *          "name": "tag1"
- *          "description": "my tag description"
- *          ...
- *       }
- */
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show);
-router.get('/chat/:tag', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.getChatByTag);
-router.get('/mail/:tag', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.getMailByTag);
-router.get('/fax/:tag', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.getFaxByTag);
-router.get('/sms/:tag', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.getSmsByTag);
-router.get('/contacts/:tag', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.getContactsByTag);
-/**
- * @api {post} /api/tags/ Create a new tag.
- * @apiParam (body) {String} name Tag's name.
- * @apiParam (body) {String} [description] Tag's description.
- *
- * @apiVersion 0.0.143
- * @apiName CreateTag
- * @apiGroup Tags
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 201 Created
- *     {
- *        "id": 3
- *        "name": "Tag3"
- *        "description": "my tag"
- *        ...
- *     }
- */
-router.post('/', auth.isAuthenticated(), auth.hasModule([5, 13], ['admin', 'agent']), controller.create);
-/**
- * @api {put} /api/tags/:id Update tag's details.
- * @apiParam {Number} id Tag's unique ID.
- * @apiParam (body) {String} name Tag's name.
- * @apiParam (body) {String} [description] Tag's description.
- *
- * @apiVersion 0.0.143
- * @apiName UpdateTag
- * @apiGroup Tags
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *        "id": 3
- *        "name": "Tag 3"
- *        "description": "My new description"
- *        ...
- *     }
- */
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update);
-/**
- * @api {delete} /api/tags/ Bulk Delete tags.
- *
- * @apiParam (Query) {Number[]} ids Tags' unique ID array.
- *
- * @apiVersion 0.0.143
- * @apiName BulkDeleteTags
- * @apiGroup Tags
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.bulkDestroy);
-/**
- * @api {delete} /api/tags/:id Delete a tag.
- *
- * @apiParam {Number} id Tag's unique ID.
- *
- * @apiVersion 0.0.143
- * @apiName DeleteTag
- * @apiGroup Tags
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xc370=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x74\x61\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x63\x68\x61\x74\x2F\x3A\x74\x61\x67","\x67\x65\x74\x43\x68\x61\x74\x42\x79\x54\x61\x67","\x2F\x6D\x61\x69\x6C\x2F\x3A\x74\x61\x67","\x67\x65\x74\x4D\x61\x69\x6C\x42\x79\x54\x61\x67","\x2F\x66\x61\x78\x2F\x3A\x74\x61\x67","\x67\x65\x74\x46\x61\x78\x42\x79\x54\x61\x67","\x2F\x73\x6D\x73\x2F\x3A\x74\x61\x67","\x67\x65\x74\x53\x6D\x73\x42\x79\x54\x61\x67","\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2F\x3A\x74\x61\x67","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73\x42\x79\x54\x61\x67","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xc370[0];var express=require(_0xc370[1]);var controller=require(_0xc370[2]);var auth=require(_0xc370[3]);var router=express.Router();router[_0xc370[10]](_0xc370[4],auth[_0xc370[5]](),auth[_0xc370[8]]([5,9,13],[_0xc370[6],_0xc370[7]]),controller[_0xc370[9]]);router[_0xc370[10]](_0xc370[11],auth[_0xc370[5]](),auth[_0xc370[8]]([13],[_0xc370[6]]),controller[_0xc370[12]]);router[_0xc370[10]](_0xc370[13],auth[_0xc370[5]](),auth[_0xc370[8]]([13],[_0xc370[6]]),controller[_0xc370[14]]);router[_0xc370[10]](_0xc370[15],auth[_0xc370[5]](),auth[_0xc370[8]]([13],[_0xc370[6]]),controller[_0xc370[16]]);router[_0xc370[10]](_0xc370[17],auth[_0xc370[5]](),auth[_0xc370[8]]([13],[_0xc370[6]]),controller[_0xc370[18]]);router[_0xc370[10]](_0xc370[19],auth[_0xc370[5]](),auth[_0xc370[8]]([13],[_0xc370[6]]),controller[_0xc370[20]]);router[_0xc370[10]](_0xc370[21],auth[_0xc370[5]](),auth[_0xc370[8]]([13],[_0xc370[6]]),controller[_0xc370[22]]);router[_0xc370[24]](_0xc370[4],auth[_0xc370[5]](),auth[_0xc370[8]]([5,13],[_0xc370[6],_0xc370[7]]),controller[_0xc370[23]]);router[_0xc370[26]](_0xc370[11],auth[_0xc370[5]](),auth[_0xc370[8]]([13],[_0xc370[6]]),controller[_0xc370[25]]);router[_0xc370[28]](_0xc370[4],auth[_0xc370[5]](),auth[_0xc370[8]]([13],[_0xc370[6]]),controller[_0xc370[27]]);router[_0xc370[28]](_0xc370[11],auth[_0xc370[5]](),auth[_0xc370[8]]([13],[_0xc370[6]]),controller[_0xc370[29]]);module[_0xc370[30]]= router
\ No newline at end of file
diff --git a/server/api/tag/tag.controller.js b/server/api/tag/tag.controller.js
index 8caf0e0..f4623e4 100644
--- a/server/api/tag/tag.controller.js
+++ b/server/api/tag/tag.controller.js
@@ -1,209 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Tag = require('../../models').Tag;
-var ChatRoom = require('../../models').ChatRoom;
-var ChatWebsite = require('../../models').ChatWebsite;
-var ChatVisitor = require('../../models').ChatVisitor;
-var MailRoom = require('../../models').MailRoom;
-var FaxRoom = require('../../models').FaxRoom;
-var SmsRoom = require('../../models').SmsRoom;
-var Contact = require('../../models').Contact;
-var Util = require('../../config/util');
-
-// Get list of tags
-exports.index = function(req, res, next) {
-  return Tag
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single tag
-exports.show = function(req, res) {
-  return Tag
-    .findById(req.params.id)
-    .then(function(tag) {
-      if (!tag) {
-        return res.sendStatus(404);
-      }
-      return res.send(tag);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-
-exports.getChatByTag = function(req, res) {
-  return ChatRoom
-    .findAndCountAll(_.merge(Util.getQuery(req.query, {
-      tags: {
-        $like: '%' + req.params.tag + ';%'
-      }
-    }), {
-      include: [ChatWebsite, ChatVisitor]
-    }))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getMailByTag = function(req, res) {
-  return MailRoom
-    .scope('default')
-    .findAndCountAll(Util.getQuery(req.query, {
-      tags: {
-        $like: '%' + req.params.tag + ';%'
-      }
-    }))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getFaxByTag = function(req, res) {
-  return FaxRoom
-    .scope('default')
-    .findAndCountAll(Util.getQuery(req.query, {
-      tags: {
-        $like: '%' + req.params.tag + ';%'
-      }
-    }))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getSmsByTag = function(req, res) {
-  return SmsRoom
-    .scope('default')
-    .findAndCountAll(Util.getQuery(req.query, {
-      tags: {
-        $like: '%' + req.params.tag + ';%'
-      }
-    }))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.getContactsByTag = function(req, res) {
-  return Contact
-    .scope('list', 'company', {
-      method: ['company_list_filter', req.query]
-    })
-    .findAndCountAll(Util.getQuery(req.query, {
-      tags: {
-        $like: '%' + req.params.tag + ';%'
-      }
-    }))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-
-// Creates a new tag in the DB.
-exports.create = function(req, res) {
-  return Tag
-    .create(req.body)
-    .then(function(tag) {
-      return res.status(201).send(tag);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing tag in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return Tag
-    .findById(req.params.id)
-    .then(function(tag) {
-      if (!tag) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(tag, req.body);
-      return updated
-        .save();
-    })
-    .then(function(tag) {
-      return res.status(200).send(tag);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a tag from the DB.
-exports.destroy = function(req, res) {
-  return Tag
-    .scope('configuration')
-    .findById(req.params.id)
-    .then(function(tag) {
-      if (!tag) {
-        return res.sendStatus(404);
-      }
-      if (tagHasAssociation(tag)) {
-        var err = new Error();
-        err.message = 'Tag is associated with an integration\'s configuration';
-        throw err;
-      }
-      return tag.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.bulkDestroy = function(req, res) {
-  return Tag
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-function tagHasAssociation(tag) {
-  return ((tag.ZendeskConfigurations && tag.ZendeskConfigurations.length > 0));
-}
+var _0xc87d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x54\x61\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x46\x61\x78\x52\x6F\x6F\x6D","\x53\x6D\x73\x52\x6F\x6F\x6D","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x43\x68\x61\x74\x42\x79\x54\x61\x67","\x25","\x74\x61\x67","\x3B\x25","\x6D\x65\x72\x67\x65","\x67\x65\x74\x4D\x61\x69\x6C\x42\x79\x54\x61\x67","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x67\x65\x74\x46\x61\x78\x42\x79\x54\x61\x67","\x67\x65\x74\x53\x6D\x73\x42\x79\x54\x61\x67","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73\x42\x79\x54\x61\x67","\x6C\x6F\x67","\x6C\x69\x73\x74","\x63\x6F\x6D\x70\x61\x6E\x79","\x63\x6F\x6D\x70\x61\x6E\x79\x5F\x6C\x69\x73\x74\x5F\x66\x69\x6C\x74\x65\x72","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x6D\x65\x73\x73\x61\x67\x65","\x54\x61\x67\x20\x69\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x61\x6E\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x27\x73\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68"];_0xc87d[0];var _=require(_0xc87d[1]);var Tag=require(_0xc87d[3])[_0xc87d[2]];var ChatRoom=require(_0xc87d[3])[_0xc87d[4]];var ChatWebsite=require(_0xc87d[3])[_0xc87d[5]];var ChatVisitor=require(_0xc87d[3])[_0xc87d[6]];var MailRoom=require(_0xc87d[3])[_0xc87d[7]];var FaxRoom=require(_0xc87d[3])[_0xc87d[8]];var SmsRoom=require(_0xc87d[3])[_0xc87d[9]];var Contact=require(_0xc87d[3])[_0xc87d[10]];var Util=require(_0xc87d[11]);exports[_0xc87d[12]]= function(_0x3279xb,_0x3279xc,_0x3279xd){return Tag[_0xc87d[19]](Util[_0xc87d[18]](_0x3279xb[_0xc87d[17]]))[_0xc87d[16]](function(_0x3279xf){_0x3279xc[_0xc87d[15]](200)[_0xc87d[14]](_0x3279xf)})[_0xc87d[13]](function(_0x3279xe){return handleError(_0x3279xc,_0x3279xe)})};exports[_0xc87d[20]]= function(_0x3279xb,_0x3279xc){return Tag[_0xc87d[24]](_0x3279xb[_0xc87d[23]][_0xc87d[22]])[_0xc87d[16]](function(_0x3279x10){if(!_0x3279x10){return _0x3279xc[_0xc87d[21]](404)};return _0x3279xc[_0xc87d[14]](_0x3279x10)})[_0xc87d[13]](function(_0x3279xe){return handleError(_0x3279xc,_0x3279xe)})};exports[_0xc87d[25]]= function(_0x3279xb,_0x3279xc){return ChatRoom[_0xc87d[19]](_[_0xc87d[29]](Util[_0xc87d[18]](_0x3279xb[_0xc87d[17]],{tags:{$like:_0xc87d[26]+ _0x3279xb[_0xc87d[23]][_0xc87d[27]]+ _0xc87d[28]}}),{include:[ChatWebsite,ChatVisitor]}))[_0xc87d[16]](function(_0x3279xf){_0x3279xc[_0xc87d[15]](200)[_0xc87d[14]](_0x3279xf)})[_0xc87d[13]](function(_0x3279xe){return handleError(_0x3279xc,_0x3279xe)})};exports[_0xc87d[30]]= function(_0x3279xb,_0x3279xc){return MailRoom[_0xc87d[32]](_0xc87d[31])[_0xc87d[19]](Util[_0xc87d[18]](_0x3279xb[_0xc87d[17]],{tags:{$like:_0xc87d[26]+ _0x3279xb[_0xc87d[23]][_0xc87d[27]]+ _0xc87d[28]}}))[_0xc87d[16]](function(_0x3279xf){_0x3279xc[_0xc87d[15]](200)[_0xc87d[14]](_0x3279xf)})[_0xc87d[13]](function(_0x3279xe){return handleError(_0x3279xc,_0x3279xe)})};exports[_0xc87d[33]]= function(_0x3279xb,_0x3279xc){return FaxRoom[_0xc87d[32]](_0xc87d[31])[_0xc87d[19]](Util[_0xc87d[18]](_0x3279xb[_0xc87d[17]],{tags:{$like:_0xc87d[26]+ _0x3279xb[_0xc87d[23]][_0xc87d[27]]+ _0xc87d[28]}}))[_0xc87d[16]](function(_0x3279xf){_0x3279xc[_0xc87d[15]](200)[_0xc87d[14]](_0x3279xf)})[_0xc87d[13]](function(_0x3279xe){return handleError(_0x3279xc,_0x3279xe)})};exports[_0xc87d[34]]= function(_0x3279xb,_0x3279xc){return SmsRoom[_0xc87d[32]](_0xc87d[31])[_0xc87d[19]](Util[_0xc87d[18]](_0x3279xb[_0xc87d[17]],{tags:{$like:_0xc87d[26]+ _0x3279xb[_0xc87d[23]][_0xc87d[27]]+ _0xc87d[28]}}))[_0xc87d[16]](function(_0x3279xf){_0x3279xc[_0xc87d[15]](200)[_0xc87d[14]](_0x3279xf)})[_0xc87d[13]](function(_0x3279xe){return handleError(_0x3279xc,_0x3279xe)})};exports[_0xc87d[35]]= function(_0x3279xb,_0x3279xc){return Contact[_0xc87d[32]](_0xc87d[37],_0xc87d[38],{method:[_0xc87d[39],_0x3279xb[_0xc87d[17]]]})[_0xc87d[19]](Util[_0xc87d[18]](_0x3279xb[_0xc87d[17]],{tags:{$like:_0xc87d[26]+ _0x3279xb[_0xc87d[23]][_0xc87d[27]]+ _0xc87d[28]}}))[_0xc87d[16]](function(_0x3279xf){_0x3279xc[_0xc87d[15]](200)[_0xc87d[14]](_0x3279xf)})[_0xc87d[13]](function(_0x3279xe){console[_0xc87d[36]](_0x3279xe);return handleError(_0x3279xc,_0x3279xe)})};exports[_0xc87d[40]]= function(_0x3279xb,_0x3279xc){return Tag[_0xc87d[40]](_0x3279xb[_0xc87d[41]])[_0xc87d[16]](function(_0x3279x10){return _0x3279xc[_0xc87d[15]](201)[_0xc87d[14]](_0x3279x10)})[_0xc87d[13]](function(_0x3279xe){return handleError(_0x3279xc,_0x3279xe)})};exports[_0xc87d[42]]= function(_0x3279xb,_0x3279xc){if(_0x3279xb[_0xc87d[41]][_0xc87d[22]]){delete _0x3279xb[_0xc87d[41]][_0xc87d[22]]};return Tag[_0xc87d[24]](_0x3279xb[_0xc87d[23]][_0xc87d[22]])[_0xc87d[16]](function(_0x3279x10){if(!_0x3279x10){return _0x3279xc[_0xc87d[21]](404)};var _0x3279x11=_[_0xc87d[29]](_0x3279x10,_0x3279xb[_0xc87d[41]]);return _0x3279x11[_0xc87d[43]]()})[_0xc87d[16]](function(_0x3279x10){return _0x3279xc[_0xc87d[15]](200)[_0xc87d[14]](_0x3279x10)})[_0xc87d[13]](function(_0x3279xe){return handleError(_0x3279xc,_0x3279xe)})};exports[_0xc87d[44]]= function(_0x3279xb,_0x3279xc){return Tag[_0xc87d[32]](_0xc87d[47])[_0xc87d[24]](_0x3279xb[_0xc87d[23]][_0xc87d[22]])[_0xc87d[16]](function(_0x3279x10){if(!_0x3279x10){return _0x3279xc[_0xc87d[21]](404)};if(tagHasAssociation(_0x3279x10)){var _0x3279xe= new Error();_0x3279xe[_0xc87d[45]]= _0xc87d[46];throw _0x3279xe};return _0x3279x10[_0xc87d[44]]()})[_0xc87d[16]](function(){return _0x3279xc[_0xc87d[21]](204)})[_0xc87d[13]](function(_0x3279xe){return handleError(_0x3279xc,_0x3279xe)})};exports[_0xc87d[48]]= function(_0x3279xb,_0x3279xc){return Tag[_0xc87d[44]]({where:{id:_0x3279xb[_0xc87d[17]][_0xc87d[49]]},individualHooks:true})[_0xc87d[16]](function(){return _0x3279xc[_0xc87d[21]](204)})[_0xc87d[13]](function(_0x3279xe){return handleError(_0x3279xc,_0x3279xe)})};function handleError(_0x3279xc,_0x3279xe){return _0x3279xc[_0xc87d[15]](500)[_0xc87d[14]](_0x3279xe)}function tagHasAssociation(_0x3279x10){return ((_0x3279x10[_0xc87d[50]]&& _0x3279x10[_0xc87d[50]][_0xc87d[51]]> 0))}
\ No newline at end of file
diff --git a/server/api/tag/tag.events.js b/server/api/tag/tag.events.js
index 61d6e17..c45fd07 100644
--- a/server/api/tag/tag.events.js
+++ b/server/api/tag/tag.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Tag = require('../../models').Tag;
-
-var TagEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-TagEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Tag.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    TagEvents.emit(event + ':' + doc._id, doc);
-    TagEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = TagEvents;
+var _0x2867=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x54\x61\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2867[0];const EventEmitter=require(_0x2867[1]);const Tag=require(_0x2867[3])[_0x2867[2]];var TagEvents= new EventEmitter();TagEvents[_0x2867[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x2867[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x2867[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x2867[6]};for(var e in events){var event=events[e];Tag[_0x2867[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7c77x8,_0x7c77x9,_0x7c77xa){TagEvents[_0x2867[10]](event+ _0x2867[8]+ _0x7c77x8[_0x2867[9]],_0x7c77x8);TagEvents[_0x2867[10]](event,_0x7c77x8);_0x7c77xa(null)}}module[_0x2867[11]]= TagEvents
\ No newline at end of file
diff --git a/server/api/tag/tag.socket.js b/server/api/tag/tag.socket.js
index 6fccbd9..4a9fc46 100644
--- a/server/api/tag/tag.socket.js
+++ b/server/api/tag/tag.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const TagEvents = require('./tag.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('tag:' + event, socket);
-
-    TagEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    TagEvents.removeListener(event, listener);
-  };
-}
+var _0xf8e9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x74\x61\x67\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x74\x61\x67\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xf8e9[0];const TagEvents=require(_0xf8e9[1]);var events=[_0xf8e9[2],_0xf8e9[3]];exports[_0xf8e9[4]]= function(_0xaeebx3){for(var _0xaeebx4=0,_0xaeebx5=events[_0xf8e9[5]];_0xaeebx4< _0xaeebx5;_0xaeebx4++){var _0xaeebx6=events[_0xaeebx4];var _0xaeebx7=createListener(_0xf8e9[6]+ _0xaeebx6,_0xaeebx3);TagEvents[_0xf8e9[7]](_0xaeebx6,_0xaeebx7);_0xaeebx3[_0xf8e9[7]](_0xf8e9[8],removeListener(_0xaeebx6,_0xaeebx7))}};function createListener(_0xaeebx6,_0xaeebx3){return function(_0xaeebx9){_0xaeebx3[_0xf8e9[9]](_0xaeebx6,_0xaeebx9)}}function removeListener(_0xaeebx6,_0xaeebx7){return function(){TagEvents[_0xf8e9[10]](_0xaeebx6,_0xaeebx7)}}
\ No newline at end of file
diff --git a/server/api/team/index.js b/server/api/team/index.js
index 056fd0c..466f707 100644
--- a/server/api/team/index.js
+++ b/server/api/team/index.js
@@ -1,247 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./team.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-/**
- * @api {get} /api/teams/ Get Teams' list.
- *
- * @apiParam (Query) {Number} [offset] Pagination offset.
- * @apiParam (Query) {Number} [limit] Pagination limit.
- *
- * @apiVersion 0.0.143
- * @apiName GetTeams
- * @apiGroup Teams
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Number} count Number of teams.
- * @apiSuccess {Object[]} rows  Teams' list.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *       "count": 2,
- *       "rows": [{
- *          "id": 1
- *          "name": "T1"
- *          "description": "Default Team",
- *           ...
- *       },{
- *          "id": 2
- *          "name": "T2"
- *          "description": null
- *          ...
- *       },...]
- *     }
- */
-router.get('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.index);
-router.get('/associations', auth.isAuthenticated(), auth.hasModule([5], ['admin']), controller.associationsIndex);
-/**
- * @api {get} /api/teams/:id Get Team's details.
- * @apiParam {Number} id Team's unique ID.
- * @apiVersion 0.0.143
- * @apiName GetTeam
- * @apiGroup Teams
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Object} Team's details.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *          "id": 1
- *          "name": "T1"
- *          "description": "Default Team"
- *          ...
- *       }
- */
-router.get('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.show);
-/**
- * @api {get} /api/teams/:id/agents Get Team's agents
- * @apiParam {Number} id Team's unique ID.
- * @apiVersion 0.0.143
- * @apiName showAgents
- * @apiGroup Teams
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Number} count Number of agents.
- * @apiSuccess {Object[]} rows  Agents list.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *       "count": 2,
- *       "rows": [{
- *          "id": 1
- *          "name": "John Doe"
- *          "fullname": "john.doe"
- *          "email": "[email-masked]"
- *          "internal": 1000,
- *           ...
- *       },{
- *          "id": 2
- *          "name": "Jane Miller"
- *          "fullname": "jane.miller",
- *          "email": "[email-masked]"
- *          "internal": 1001,
- *          ...
- *       },...]
- *     }
- */
-router.get('/:id/agents', auth.isAuthenticated(), auth.hasRole('admin'), controller.showAgents);
-/**
- * @api {post} /api/teams/ Create a new team.
- * @apiParam (body) {String} name Team's name.
- * @apiParam (body) {String} [description] Team's description.
- *
- * @apiVersion 0.0.143
- * @apiName CreateTeam
- * @apiGroup Teams
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 201 Created
- *     {
- *        "id": 3
- *        "name": "My Team"
- *        "description": "New Team"
- *        ...
- *     }
- */
-router.post('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.create);
-/**
- * @api {post} /api/teams/:id/agents Add agents to a team.
- * @apiParam {Number} id Team's unique ID.
- * @apiParam (body) {Number[]} agents Array of agents' ID
- *
- * @apiVersion 0.0.143
- * @apiName AddAgents
- * @apiGroup Teams
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.post('/:id/agents', auth.isAuthenticated(), auth.hasRole('admin'), controller.addAgents);
-/**
- * @api {put} /api/teams/:id Update team's details.
- * @apiParam {Number} id Team's unique ID.
- * @apiParam (body) {String} name Team's name.
- * @apiParam (body) {String} [description] Team's description.
- *
- * @apiVersion 0.0.143
- * @apiName UpdateTeam
- * @apiGroup Teams
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *        "id": 3
- *        "name": "Team 3"
- *        "description": "My description"
- *        ...
- *     }
- */
-router.put('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.update);
-/**
- * @api {delete} /api/teams/ Bulk Delete teams.
- *
- * @apiParam (Query) {Number[]} ids Teams' unique ID array.
- *
- * @apiVersion 0.0.143
- * @apiName BulkDeleteTeams
- * @apiGroup Teams
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.bulkDestroy);
-/**
- * @api {delete} /api/teams/:id Delete a team.
- *
- * @apiParam {Number} id Team's unique ID.
- *
- * @apiVersion 0.0.143
- * @apiName DeleteTeam
- * @apiGroup Teams
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy);
-/**
- * @api {delete} /api/teams/:id/agents Remove agents from a team.
- * @apiParam {Number} id Team's unique ID.
- * @apiParam (Query) {Number[]} ids Agents' unique ID array.
- *
- * @apiVersion 0.0.143
- * @apiName RemoveAgents
- * @apiGroup Teams
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/:id/agents', auth.isAuthenticated(), auth.hasRole('admin'), controller.removeAgents);
-
-module.exports = router;
+var _0x7ce1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x74\x65\x61\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x73","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x73\x49\x6E\x64\x65\x78","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x7ce1[0];var express=require(_0x7ce1[1]);var controller=require(_0x7ce1[2]);var auth=require(_0x7ce1[3]);var router=express.Router();router[_0x7ce1[9]](_0x7ce1[4],auth[_0x7ce1[5]](),auth[_0x7ce1[7]](_0x7ce1[6]),controller[_0x7ce1[8]]);router[_0x7ce1[9]](_0x7ce1[10],auth[_0x7ce1[5]](),auth[_0x7ce1[11]]([5],[_0x7ce1[6]]),controller[_0x7ce1[12]]);router[_0x7ce1[9]](_0x7ce1[13],auth[_0x7ce1[5]](),auth[_0x7ce1[7]](_0x7ce1[6]),controller[_0x7ce1[14]]);router[_0x7ce1[9]](_0x7ce1[15],auth[_0x7ce1[5]](),auth[_0x7ce1[7]](_0x7ce1[6]),controller[_0x7ce1[16]]);router[_0x7ce1[18]](_0x7ce1[4],auth[_0x7ce1[5]](),auth[_0x7ce1[7]](_0x7ce1[6]),controller[_0x7ce1[17]]);router[_0x7ce1[18]](_0x7ce1[15],auth[_0x7ce1[5]](),auth[_0x7ce1[7]](_0x7ce1[6]),controller[_0x7ce1[19]]);router[_0x7ce1[21]](_0x7ce1[13],auth[_0x7ce1[5]](),auth[_0x7ce1[7]](_0x7ce1[6]),controller[_0x7ce1[20]]);router[_0x7ce1[23]](_0x7ce1[4],auth[_0x7ce1[5]](),auth[_0x7ce1[7]](_0x7ce1[6]),controller[_0x7ce1[22]]);router[_0x7ce1[23]](_0x7ce1[13],auth[_0x7ce1[5]](),auth[_0x7ce1[7]](_0x7ce1[6]),controller[_0x7ce1[24]]);router[_0x7ce1[23]](_0x7ce1[15],auth[_0x7ce1[5]](),auth[_0x7ce1[7]](_0x7ce1[6]),controller[_0x7ce1[25]]);module[_0x7ce1[26]]= router
\ No newline at end of file
diff --git a/server/api/team/team.controller.js b/server/api/team/team.controller.js
index cac8024..8c8a4c6 100644
--- a/server/api/team/team.controller.js
+++ b/server/api/team/team.controller.js
@@ -1,252 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var Util = require('../../config/util');
-
-var sequelize = require('../../models').sequelize;
-var Team = require('../../models').Team;
-var Agent = require('../../models').User;
-var User = require('../../models').User;
-
-// Get list of teams
-exports.index = function(req, res) {
-  return Team
-    .scope('default')
-    .findAndCountAll(_.merge(Util.getQuery(req.query)))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.associationsIndex = function(req, res) {
-  switch (req.user.role) {
-    case 'user':
-      return User
-        .findById(req.user.id)
-        .then(function(user) {
-          if (!user) {
-            return res.sendStatus(404);
-          }
-
-          return user;
-        })
-        .then(Util.getAgentsIdByUser(req.query))
-        .then(function(data) {
-          return Team
-            .scope({
-              method: ['agents', _.map(data.rows, 'id')]
-            })
-            .findAll(_.merge(Util.getQuery(req.query)));
-        })
-        .then(function(result) {
-          res.status(200).send({
-            rows: result,
-            count: result.length
-          });
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-
-    default:
-      return Team
-        .scope('agents')
-        .findAll(_.merge(Util.getQuery(req.query)))
-        .then(function(result) {
-          res.status(200).send({
-            rows: result,
-            count: result.length
-          });
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-  }
-};
-
-// Get a single team
-exports.show = function(req, res) {
-  return Team
-    // .scope('default')
-    .findById(req.params.id)
-    .then(function(team) {
-      if (!team) {
-        return res.sendStatus(404);
-      }
-      return res.send(team);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single team
-exports.showAgents = function(req, res) {
-  switch (req.user.role) {
-    case 'user':
-      return User
-        .findById(req.user.id)
-        .then(function(user) {
-          if (!user) {
-            return res.sendStatus(404);
-          }
-          return user;
-        })
-        .then(Util.getAgentsIdByUser(req.query))
-        .then(function(data) {
-          return Team
-            .scope({
-              method: ['agents', _.map(data.rows, 'id')]
-            })
-            .findById(req.params.id);
-        })
-        .then(function(team) {
-          if (!team) {
-            return res.sendStatus(404);
-          }
-          return res.status(200).send({
-            count: team.Users.length,
-            rows: team.Users
-          });
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    default:
-      return Team
-        .scope('agents')
-        .findById(req.params.id)
-        .then(function(team) {
-          if (!team) {
-            return res.sendStatus(404);
-          }
-          return res.status(200).send({
-            count: team.Users.length,
-            rows: team.Users
-          });
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-  }
-};
-
-// Creates a new team in the DB.
-exports.create = function(req, res) {
-  return Team
-    // .scope('default')
-    .create(req.body)
-    .then(function(team) {
-      return res.status(201).send(team);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing team in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return Team
-    .findById(req.params.id)
-    .then(function(team) {
-      if (!team) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(team, req.body);
-      return updated
-        .save();
-    })
-    .then(function(team) {
-      return res.status(200).send(team);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a team from the DB.
-exports.destroy = function(req, res) {
-  return Team
-    .findById(req.params.id)
-    .then(function(team) {
-      if (!team) {
-        return res.sendStatus(404);
-      }
-      return team.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a agent from the DB.
-exports.bulkDestroy = function(req, res) {
-  return Team
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing user_has_mail_queue in the DB.
-exports.addAgents = function(req, res, next) {
-  return Team
-    .findById(req.params.id)
-    .then(function(team) {
-      if (!team) {
-        return res.sendStatus(404);
-      }
-      return team
-        .addUsers(req.body.agents);
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return next(err);
-    });
-};
-
-exports.removeAgents = function(req, res, next) {
-  return Team
-    .findById(req.params.id)
-    .then(function(team) {
-      if (!team) {
-        return res.sendStatus(404);
-      }
-      return team
-        .removeUser(req.query.agents);
-    })
-    .then(function() {
-      return res.sendStatus(202);
-    })
-    .catch(function(err) {
-      return next(err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x5e95=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x65\x61\x6D","\x55\x73\x65\x72","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x73\x49\x6E\x64\x65\x78","\x6C\x65\x6E\x67\x74\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74\x73","\x72\x6F\x77\x73","\x69\x64","\x6D\x61\x70","\x67\x65\x74\x41\x67\x65\x6E\x74\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x6F\x6C\x65","\x73\x68\x6F\x77","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x61\x64\x64\x55\x73\x65\x72\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72"];_0x5e95[0];var _=require(_0x5e95[1]);var util=require(_0x5e95[2]);var Util=require(_0x5e95[3]);var sequelize=require(_0x5e95[5])[_0x5e95[4]];var Team=require(_0x5e95[5])[_0x5e95[6]];var Agent=require(_0x5e95[5])[_0x5e95[7]];var User=require(_0x5e95[5])[_0x5e95[7]];exports[_0x5e95[8]]= function(_0xee93x8,_0xee93x9){return Team[_0x5e95[18]](_0x5e95[17])[_0x5e95[16]](_[_0x5e95[15]](Util[_0x5e95[14]](_0xee93x8[_0x5e95[13]])))[_0x5e95[12]](function(_0xee93xb){_0xee93x9[_0x5e95[11]](200)[_0x5e95[10]](_0xee93xb)})[_0x5e95[9]](function(_0xee93xa){return handleError(_0xee93x9,_0xee93xa)})};exports[_0x5e95[19]]= function(_0xee93x8,_0xee93x9){switch(_0xee93x8[_0x5e95[28]][_0x5e95[30]]){case _0x5e95[28]:return User[_0x5e95[29]](_0xee93x8[_0x5e95[28]][_0x5e95[24]])[_0x5e95[12]](function(_0xee93xd){if(!_0xee93xd){return _0xee93x9[_0x5e95[27]](404)};return _0xee93xd})[_0x5e95[12]](Util[_0x5e95[26]](_0xee93x8[_0x5e95[13]]))[_0x5e95[12]](function(_0xee93xc){return Team[_0x5e95[18]]({method:[_0x5e95[22],_[_0x5e95[25]](_0xee93xc[_0x5e95[23]],_0x5e95[24])]})[_0x5e95[21]](_[_0x5e95[15]](Util[_0x5e95[14]](_0xee93x8[_0x5e95[13]])))})[_0x5e95[12]](function(_0xee93xb){_0xee93x9[_0x5e95[11]](200)[_0x5e95[10]]({rows:_0xee93xb,count:_0xee93xb[_0x5e95[20]]})})[_0x5e95[9]](function(_0xee93xa){return handleError(_0xee93x9,_0xee93xa)});default:return Team[_0x5e95[18]](_0x5e95[22])[_0x5e95[21]](_[_0x5e95[15]](Util[_0x5e95[14]](_0xee93x8[_0x5e95[13]])))[_0x5e95[12]](function(_0xee93xb){_0xee93x9[_0x5e95[11]](200)[_0x5e95[10]]({rows:_0xee93xb,count:_0xee93xb[_0x5e95[20]]})})[_0x5e95[9]](function(_0xee93xa){return handleError(_0xee93x9,_0xee93xa)})}};exports[_0x5e95[31]]= function(_0xee93x8,_0xee93x9){return Team[_0x5e95[29]](_0xee93x8[_0x5e95[32]][_0x5e95[24]])[_0x5e95[12]](function(_0xee93xe){if(!_0xee93xe){return _0xee93x9[_0x5e95[27]](404)};return _0xee93x9[_0x5e95[10]](_0xee93xe)})[_0x5e95[9]](function(_0xee93xa){return handleError(_0xee93x9,_0xee93xa)})};exports[_0x5e95[33]]= function(_0xee93x8,_0xee93x9){switch(_0xee93x8[_0x5e95[28]][_0x5e95[30]]){case _0x5e95[28]:return User[_0x5e95[29]](_0xee93x8[_0x5e95[28]][_0x5e95[24]])[_0x5e95[12]](function(_0xee93xd){if(!_0xee93xd){return _0xee93x9[_0x5e95[27]](404)};return _0xee93xd})[_0x5e95[12]](Util[_0x5e95[26]](_0xee93x8[_0x5e95[13]]))[_0x5e95[12]](function(_0xee93xc){return Team[_0x5e95[18]]({method:[_0x5e95[22],_[_0x5e95[25]](_0xee93xc[_0x5e95[23]],_0x5e95[24])]})[_0x5e95[29]](_0xee93x8[_0x5e95[32]][_0x5e95[24]])})[_0x5e95[12]](function(_0xee93xe){if(!_0xee93xe){return _0xee93x9[_0x5e95[27]](404)};return _0xee93x9[_0x5e95[11]](200)[_0x5e95[10]]({count:_0xee93xe[_0x5e95[34]][_0x5e95[20]],rows:_0xee93xe[_0x5e95[34]]})})[_0x5e95[9]](function(_0xee93xa){return handleError(_0xee93x9,_0xee93xa)});default:return Team[_0x5e95[18]](_0x5e95[22])[_0x5e95[29]](_0xee93x8[_0x5e95[32]][_0x5e95[24]])[_0x5e95[12]](function(_0xee93xe){if(!_0xee93xe){return _0xee93x9[_0x5e95[27]](404)};return _0xee93x9[_0x5e95[11]](200)[_0x5e95[10]]({count:_0xee93xe[_0x5e95[34]][_0x5e95[20]],rows:_0xee93xe[_0x5e95[34]]})})[_0x5e95[9]](function(_0xee93xa){return handleError(_0xee93x9,_0xee93xa)})}};exports[_0x5e95[35]]= function(_0xee93x8,_0xee93x9){return Team[_0x5e95[35]](_0xee93x8[_0x5e95[38]])[_0x5e95[12]](function(_0xee93xe){return _0xee93x9[_0x5e95[11]](201)[_0x5e95[10]](_0xee93xe)})[_0x5e95[9]](sequelize.UniqueConstraintError,function(_0xee93xa){return Util[_0x5e95[37]][_0x5e95[36]](_0xee93x9,_0xee93xa)})[_0x5e95[9]](function(_0xee93xa){return handleError(_0xee93x9,_0xee93xa)})};exports[_0x5e95[39]]= function(_0xee93x8,_0xee93x9){if(_0xee93x8[_0x5e95[38]][_0x5e95[24]]){delete _0xee93x8[_0x5e95[38]][_0x5e95[24]]};return Team[_0x5e95[29]](_0xee93x8[_0x5e95[32]][_0x5e95[24]])[_0x5e95[12]](function(_0xee93xe){if(!_0xee93xe){return _0xee93x9[_0x5e95[27]](404)};var _0xee93xf=_[_0x5e95[15]](_0xee93xe,_0xee93x8[_0x5e95[38]]);return _0xee93xf[_0x5e95[40]]()})[_0x5e95[12]](function(_0xee93xe){return _0xee93x9[_0x5e95[11]](200)[_0x5e95[10]](_0xee93xe)})[_0x5e95[9]](function(_0xee93xa){return handleError(_0xee93x9,_0xee93xa)})};exports[_0x5e95[41]]= function(_0xee93x8,_0xee93x9){return Team[_0x5e95[29]](_0xee93x8[_0x5e95[32]][_0x5e95[24]])[_0x5e95[12]](function(_0xee93xe){if(!_0xee93xe){return _0xee93x9[_0x5e95[27]](404)};return _0xee93xe[_0x5e95[41]]()})[_0x5e95[12]](function(){return _0xee93x9[_0x5e95[27]](204)})[_0x5e95[9]](function(_0xee93xa){return handleError(_0xee93x9,_0xee93xa)})};exports[_0x5e95[42]]= function(_0xee93x8,_0xee93x9){return Team[_0x5e95[41]]({where:{id:_0xee93x8[_0x5e95[13]][_0x5e95[43]]},individualHooks:true})[_0x5e95[12]](function(){return _0xee93x9[_0x5e95[27]](204)})[_0x5e95[9]](function(_0xee93xa){return handleError(_0xee93x9,_0xee93xa)})};exports[_0x5e95[44]]= function(_0xee93x8,_0xee93x9,_0xee93x10){return Team[_0x5e95[29]](_0xee93x8[_0x5e95[32]][_0x5e95[24]])[_0x5e95[12]](function(_0xee93xe){if(!_0xee93xe){return _0xee93x9[_0x5e95[27]](404)};return _0xee93xe[_0x5e95[45]](_0xee93x8[_0x5e95[38]][_0x5e95[22]])})[_0x5e95[12]](function(){return _0xee93x9[_0x5e95[27]](204)})[_0x5e95[9]](function(_0xee93xa){return _0xee93x10(_0xee93xa)})};exports[_0x5e95[46]]= function(_0xee93x8,_0xee93x9,_0xee93x10){return Team[_0x5e95[29]](_0xee93x8[_0x5e95[32]][_0x5e95[24]])[_0x5e95[12]](function(_0xee93xe){if(!_0xee93xe){return _0xee93x9[_0x5e95[27]](404)};return _0xee93xe[_0x5e95[47]](_0xee93x8[_0x5e95[13]][_0x5e95[22]])})[_0x5e95[12]](function(){return _0xee93x9[_0x5e95[27]](202)})[_0x5e95[9]](function(_0xee93xa){return _0xee93x10(_0xee93xa)})};function handleError(_0xee93x9,_0xee93xa){return _0xee93x9[_0x5e95[11]](500)[_0x5e95[10]](_0xee93xa)}
\ No newline at end of file
diff --git a/server/api/team/team.events.js b/server/api/team/team.events.js
index 8a9173b..655cfef 100644
--- a/server/api/team/team.events.js
+++ b/server/api/team/team.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Team = require('../../models').Team;
-
-var TeamEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-TeamEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Team.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    TeamEvents.emit(event + ':' + doc._id, doc);
-    TeamEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = TeamEvents;
+var _0xee48=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x54\x65\x61\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xee48[0];const EventEmitter=require(_0xee48[1]);const Team=require(_0xee48[3])[_0xee48[2]];var TeamEvents= new EventEmitter();TeamEvents[_0xee48[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xee48[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xee48[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xee48[6]};for(var e in events){var event=events[e];Team[_0xee48[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x575dx8,_0x575dx9,_0x575dxa){TeamEvents[_0xee48[10]](event+ _0xee48[8]+ _0x575dx8[_0xee48[9]],_0x575dx8);TeamEvents[_0xee48[10]](event,_0x575dx8);_0x575dxa(null)}}module[_0xee48[11]]= TeamEvents
\ No newline at end of file
diff --git a/server/api/team/team.socket.js b/server/api/team/team.socket.js
index 8217583..c1b3780 100644
--- a/server/api/team/team.socket.js
+++ b/server/api/team/team.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const TeamEvents = require('./team.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('team:' + event, socket);
-
-    TeamEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    TeamEvents.removeListener(event, listener);
-  };
-}
+var _0x2b1a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x74\x65\x61\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x74\x65\x61\x6D\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x2b1a[0];const TeamEvents=require(_0x2b1a[1]);var events=[_0x2b1a[2],_0x2b1a[3]];exports[_0x2b1a[4]]= function(_0x366ax3){for(var _0x366ax4=0,_0x366ax5=events[_0x2b1a[5]];_0x366ax4< _0x366ax5;_0x366ax4++){var _0x366ax6=events[_0x366ax4];var _0x366ax7=createListener(_0x2b1a[6]+ _0x366ax6,_0x366ax3);TeamEvents[_0x2b1a[7]](_0x366ax6,_0x366ax7);_0x366ax3[_0x2b1a[7]](_0x2b1a[8],removeListener(_0x366ax6,_0x366ax7))}};function createListener(_0x366ax6,_0x366ax3){return function(_0x366ax9){_0x366ax3[_0x2b1a[9]](_0x366ax6,_0x366ax9)}}function removeListener(_0x366ax6,_0x366ax7){return function(){TeamEvents[_0x2b1a[10]](_0x366ax6,_0x366ax7)}}
\ No newline at end of file
diff --git a/server/api/telephone/index.js b/server/api/telephone/index.js
index 6d85db0..6f5381a 100644
--- a/server/api/telephone/index.js
+++ b/server/api/telephone/index.js
@@ -1,174 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./telephone.controller');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-/**
- * @api {get} /api/telephones/ Get telephones list.
- * @apiVersion 0.0.143
- * @apiName GetTelephones
- * @apiGroup Telephones
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Number} count Number of telephones.
- * @apiSuccess {Object[]} rows  Get list of agent detailss.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *       "count": 1,
- *       "rows": [{
- *          "id": 1
- *          "name": "john.doe"
- *          "internal": 1001
- *          ...
- *       }]
- *     }
- */
-router.get('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.index);
-
-/**
- * @api {get} /api/telephones/:id Get telephone details.
- * @apiParam {Number} id Telephone's unique ID.
- * @apiVersion 0.0.143
- * @apiName GetTelephone
- * @apiGroup Telephones
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Object} Telephone's details.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *        "id": 1
- *        "name": "john.doe"
- *        "internal": 1001
- *        ...
- *     }
- */
-router.get('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.show);
-
-/**
- * @api {post} /api/telephones/ Create telephone.
- * @apiParam (Body) {String} name                                        Telephone's name.
- * @apiParam (Body) {String} context="from-sip"                          Telephone's SIP context.
- * @apiParam (Body) {String} password                                    Telephone's password.
- * @apiParam (Body) {Number} internal                                    Telephone's internal number.
- * @apiParam (Body) {String="tcp", "udp", "tcp,udp"} transport="udp"     Telephone's SIP transport.
- * @apiParam (Body) {String="alaw", "ulaw", "gsm"} allow="alaw;ulaw;gsm" Telephone's SIP codecs.
- * @apiParam (Body) {Number} internal                                    Telephone's internal number.
- *
- * @apiVersion 0.0.143
- * @apiName CreateTelephone
- * @apiGroup Telephones
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 201 Created
- *     {
- *        "id": 1
- *        "name": "john.doe"
- *        "internal": 1001
- *        ...
- *     }
- */
-router.post('/', auth.isAuthenticated(), license.isValidDate(), license.isTelephonesLimit(), auth.hasRole('admin'), controller.create);
-
-/**
- * @api {update} /api/telephones/:id Update telephone details.
- *
- * @apiParam (Params) {Number} id Telephone's unique ID.
- * @apiParam (Body) {String} email                                       Telephone's email.
- * @apiParam (Body) {String} context="from-sip"                          Telephone's SIP context.
- * @apiParam (Body) {String} password                                    Telephone's password.
- * @apiParam (Body) {Number} internal                                    Telephone's internal number.
- * @apiParam (Body) {String="tcp", "udp", "tcp,udp"} transport="udp"     Telephone's SIP transport.
- * @apiParam (Body) {String="alaw", "ulaw", "gsm"} allow="alaw;ulaw;gsm" Telephone's SIP codecs.
- *
- * @apiVersion 0.0.143
- * @apiName UpdateTelephone
- * @apiGroup Telephones
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *        "id": 1
- *        "name": "john.doe"
- *        "internal": 1001
- *        ...
- *     }
- */
-router.put('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.update);
-
-/**
- * @api {delete} /api/telephones/ Bulk Delete telephones.
- *
- * @apiParam (Query) {Number[]} ids Telephones' unique ID array.
- *
- * @apiVersion 0.0.143
- * @apiName BulkDeleteTelephones
- * @apiGroup Telephones
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.bulkDestroy);
-
-/**
- * @api {delete} /api/telephones/:id Delete telephone.
- *
- * @apiParam {Number} id Telephone's unique ID.
- *
- * @apiVersion 0.0.143
- * @apiName DeleteTelephone
- * @apiGroup Telephones
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy);
-
-module.exports = router;
+var _0x49e2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73\x4C\x69\x6D\x69\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x49e2[0];var express=require(_0x49e2[1]);var auth=require(_0x49e2[2]);var controller=require(_0x49e2[3]);var license=require(_0x49e2[4]);var router=express.Router();router[_0x49e2[10]](_0x49e2[5],auth[_0x49e2[6]](),auth[_0x49e2[8]](_0x49e2[7]),controller[_0x49e2[9]]);router[_0x49e2[10]](_0x49e2[11],auth[_0x49e2[6]](),auth[_0x49e2[8]](_0x49e2[7]),controller[_0x49e2[12]]);router[_0x49e2[16]](_0x49e2[5],auth[_0x49e2[6]](),license[_0x49e2[13]](),license[_0x49e2[14]](),auth[_0x49e2[8]](_0x49e2[7]),controller[_0x49e2[15]]);router[_0x49e2[18]](_0x49e2[11],auth[_0x49e2[6]](),auth[_0x49e2[8]](_0x49e2[7]),controller[_0x49e2[17]]);router[_0x49e2[20]](_0x49e2[5],auth[_0x49e2[6]](),auth[_0x49e2[8]](_0x49e2[7]),controller[_0x49e2[19]]);router[_0x49e2[20]](_0x49e2[11],auth[_0x49e2[6]](),auth[_0x49e2[8]](_0x49e2[7]),controller[_0x49e2[21]]);module[_0x49e2[22]]= router
\ No newline at end of file
diff --git a/server/api/telephone/telephone.controller.js b/server/api/telephone/telephone.controller.js
index 139df32..3564291 100644
--- a/server/api/telephone/telephone.controller.js
+++ b/server/api/telephone/telephone.controller.js
@@ -1,157 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/telephones              ->  index
- * POST    /api/telephones              ->  create
- * GET     /api/telephones/:id          ->  show
- * PUT     /api/telephones/:id          ->  update
- * DELETE  /api/telephones/:id          ->  destroy
- */
-
-'use strict';
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var sequelize = require('../../models').sequelize;
-var Telephone = require('../../models').User;
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates, t) {
-  return function(entity) {
-    return entity.updateAttributes(updates, {
-        transaction: t
-      })
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of Telephones
-exports.index = function(req, res) {
-  return Telephone
-    .scope('telephone')
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-}
-
-// Gets a single Telephone from the DB
-exports.show = function(req, res) {
-  Telephone.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new Telephone in the DB
-exports.create = function(req, res) {
-  var password = String(req.body.password);
-  if (!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/.test(password))) {
-    throw new Error('Wrong password format!');
-  }
-  // Set default role
-  req.body.role = 'telephone';
-  return sequelize.transaction(function(t) {
-      return Telephone
-        .create(req.body, {
-          transaction: t
-        })
-        .then(responseWithResult(res, 201))
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(handleError(res));
-}
-
-// Updates an existing Telephone in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  if (req.body.password) {
-    var password = String(req.body.password);
-    if (!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/.test(password))) {
-      throw new Error('Wrong password format!');
-    }
-  }
-
-  delete req.body.name;
-
-  return sequelize.transaction(function(t) {
-      return Telephone.findById(req.params.id)
-        .then(handleEntityNotFound(res))
-        .then(saveUpdates(req.body, t))
-        .then(responseWithResult(res))
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(handleError(res));
-}
-
-// Deletes a Telephone from the DB
-exports.destroy = function(req, res) {
-  return Telephone.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
-
-// Deletes a agent from the DB.
-exports.bulkDestroy = function(req, res) {
-  return Telephone
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
+var _0x7003=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x62\x6F\x64\x79","\x74\x65\x73\x74","\x57\x72\x6F\x6E\x67\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x6D\x61\x74\x21","\x72\x6F\x6C\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x6E\x61\x6D\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64\x73"];_0x7003[0];var _=require(_0x7003[1]);var Util=require(_0x7003[2]);var sequelize=require(_0x7003[4])[_0x7003[3]];var Telephone=require(_0x7003[4])[_0x7003[5]];function handleError(_0x96f9x6,_0x96f9x7){_0x96f9x7= _0x96f9x7|| 500;return function(_0x96f9x8){_0x96f9x6[_0x7003[7]](_0x96f9x7)[_0x7003[6]](_0x96f9x8)}}function responseWithResult(_0x96f9x6,_0x96f9x7){_0x96f9x7= _0x96f9x7|| 200;return function(_0x96f9xa){if(_0x96f9xa){_0x96f9x6[_0x7003[7]](_0x96f9x7)[_0x7003[8]](_0x96f9xa)}}}function handleEntityNotFound(_0x96f9x6){return function(_0x96f9xa){if(!_0x96f9xa){_0x96f9x6[_0x7003[7]](404)[_0x7003[9]]();return null};return _0x96f9xa}}function saveUpdates(_0x96f9xd,_0x96f9xe){return function(_0x96f9xa){return _0x96f9xa[_0x7003[11]](_0x96f9xd,{transaction:_0x96f9xe})[_0x7003[10]](function(_0x96f9xf){return _0x96f9xf})}}function removeEntity(_0x96f9x6){return function(_0x96f9xa){if(_0x96f9xa){return _0x96f9xa[_0x7003[12]]()[_0x7003[10]](function(){_0x96f9x6[_0x7003[7]](204)[_0x7003[9]]()})}}}exports[_0x7003[13]]= function(_0x96f9x11,_0x96f9x6){return Telephone[_0x7003[19]](_0x7003[18])[_0x7003[17]](Util[_0x7003[16]](_0x96f9x11[_0x7003[15]]))[_0x7003[10]](function(_0x96f9x12){_0x96f9x6[_0x7003[7]](200)[_0x7003[6]](_0x96f9x12)})[_0x7003[14]](function(_0x96f9x8){return handleError(_0x96f9x6,_0x96f9x8)})};exports[_0x7003[20]]= function(_0x96f9x11,_0x96f9x6){Telephone[_0x7003[23]](_0x96f9x11[_0x7003[22]][_0x7003[21]])[_0x7003[10]](handleEntityNotFound(_0x96f9x6))[_0x7003[10]](responseWithResult(_0x96f9x6))[_0x7003[14]](handleError(_0x96f9x6))};exports[_0x7003[24]]= function(_0x96f9x11,_0x96f9x6){var _0x96f9x13=String(_0x96f9x11[_0x7003[26]][_0x7003[25]]);if(!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/[_0x7003[27]](_0x96f9x13))){throw  new Error(_0x7003[28])};_0x96f9x11[_0x7003[26]][_0x7003[29]]= _0x7003[18];return sequelize[_0x7003[32]](function(_0x96f9xe){return Telephone[_0x7003[24]](_0x96f9x11[_0x7003[26]],{transaction:_0x96f9xe})[_0x7003[10]](responseWithResult(_0x96f9x6,201))})[_0x7003[14]](sequelize.UniqueConstraintError,function(_0x96f9x8){return Util[_0x7003[31]][_0x7003[30]](_0x96f9x6,_0x96f9x8)})[_0x7003[14]](handleError(_0x96f9x6))};exports[_0x7003[33]]= function(_0x96f9x11,_0x96f9x6){if(_0x96f9x11[_0x7003[26]][_0x7003[21]]){delete _0x96f9x11[_0x7003[26]][_0x7003[21]]};if(_0x96f9x11[_0x7003[26]][_0x7003[25]]){var _0x96f9x13=String(_0x96f9x11[_0x7003[26]][_0x7003[25]]);if(!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/[_0x7003[27]](_0x96f9x13))){throw  new Error(_0x7003[28])}};delete _0x96f9x11[_0x7003[26]][_0x7003[34]];return sequelize[_0x7003[32]](function(_0x96f9xe){return Telephone[_0x7003[23]](_0x96f9x11[_0x7003[22]][_0x7003[21]])[_0x7003[10]](handleEntityNotFound(_0x96f9x6))[_0x7003[10]](saveUpdates(_0x96f9x11[_0x7003[26]],_0x96f9xe))[_0x7003[10]](responseWithResult(_0x96f9x6))})[_0x7003[14]](sequelize.UniqueConstraintError,function(_0x96f9x8){return Util[_0x7003[31]][_0x7003[30]](_0x96f9x6,_0x96f9x8)})[_0x7003[14]](handleError(_0x96f9x6))};exports[_0x7003[12]]= function(_0x96f9x11,_0x96f9x6){return Telephone[_0x7003[23]](_0x96f9x11[_0x7003[22]][_0x7003[21]])[_0x7003[10]](handleEntityNotFound(_0x96f9x6))[_0x7003[10]](removeEntity(_0x96f9x6))[_0x7003[14]](handleError(_0x96f9x6))};exports[_0x7003[35]]= function(_0x96f9x11,_0x96f9x6){return Telephone[_0x7003[12]]({where:{id:_0x96f9x11[_0x7003[15]][_0x7003[37]]},individualHooks:true})[_0x7003[10]](function(){return _0x96f9x6[_0x7003[36]](204)})[_0x7003[14]](function(_0x96f9x8){return handleError(_0x96f9x6,_0x96f9x8)})}
\ No newline at end of file
diff --git a/server/api/telephone/telephone.events.js b/server/api/telephone/telephone.events.js
index 25f4f9a..7b1a05e 100644
--- a/server/api/telephone/telephone.events.js
+++ b/server/api/telephone/telephone.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Telephone = require('../../models').Telephone;
-
-var TelephoneEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-TelephoneEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Telephone.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    TelephoneEvents.emit(event + ':' + doc._id, doc);
-    TelephoneEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = TelephoneEvents;
+var _0xea47=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xea47[0];const EventEmitter=require(_0xea47[1]);const Telephone=require(_0xea47[3])[_0xea47[2]];var TelephoneEvents= new EventEmitter();TelephoneEvents[_0xea47[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xea47[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xea47[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xea47[6]};for(var e in events){var event=events[e];Telephone[_0xea47[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x3f85x8,_0x3f85x9,_0x3f85xa){TelephoneEvents[_0xea47[10]](event+ _0xea47[8]+ _0x3f85x8[_0xea47[9]],_0x3f85x8);TelephoneEvents[_0xea47[10]](event,_0x3f85x8);_0x3f85xa(null)}}module[_0xea47[11]]= TelephoneEvents
\ No newline at end of file
diff --git a/server/api/telephone/telephone.socket.js b/server/api/telephone/telephone.socket.js
index 66a9a8e..d4f1069 100644
--- a/server/api/telephone/telephone.socket.js
+++ b/server/api/telephone/telephone.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const TelephoneEvents = require('./telephone.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('telephone:' + event, socket);
-
-    TelephoneEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    TelephoneEvents.removeListener(event, listener);
-  };
-}
+var _0x3d8a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x3d8a[0];const TelephoneEvents=require(_0x3d8a[1]);var events=[_0x3d8a[2],_0x3d8a[3]];exports[_0x3d8a[4]]= function(_0xbef0x3){for(var _0xbef0x4=0,_0xbef0x5=events[_0x3d8a[5]];_0xbef0x4< _0xbef0x5;_0xbef0x4++){var _0xbef0x6=events[_0xbef0x4];var _0xbef0x7=createListener(_0x3d8a[6]+ _0xbef0x6,_0xbef0x3);TelephoneEvents[_0x3d8a[7]](_0xbef0x6,_0xbef0x7);_0xbef0x3[_0x3d8a[7]](_0x3d8a[8],removeListener(_0xbef0x6,_0xbef0x7))}};function createListener(_0xbef0x6,_0xbef0x3){return function(_0xbef0x9){_0xbef0x3[_0x3d8a[9]](_0xbef0x6,_0xbef0x9)}}function removeListener(_0xbef0x6,_0xbef0x7){return function(){TelephoneEvents[_0x3d8a[10]](_0xbef0x6,_0xbef0x7)}}
\ No newline at end of file
diff --git a/server/api/template/index.js b/server/api/template/index.js
index 55b8696..80ce82a 100644
--- a/server/api/template/index.js
+++ b/server/api/template/index.js
@@ -1,182 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./template.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-/**
- * @api {get} /api/template/ Get Templates' list.
- *
- * @apiParam (Query) {Number} [offset] Pagination offset.
- * @apiParam (Query) {Number} [limit] Pagination limit.
- *
- * @apiVersion 0.0.143
- * @apiName GetTemplates
- * @apiGroup Templates
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Number} count Number of templates.
- * @apiSuccess {Object[]} rows  Templates list.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *       "count": 2,
- *       "rows": [{
- *          "id": 1
- *          "name": "Template 1"
- *          "description": "Auto Response"
- *          "subject": "My subject"
- *          "attachment": null
- *          "html": null
- *          "text": "Hi, nice to meet you"
- *           ...
- *       },{
- *          "id": 2
- *          "name": "Template abc"
- *          "description": null
- *          ...
- *       },...]
- *     }
- */
-router.get('/', auth.isAuthenticated(), auth.hasModule([13], ['admin', 'user', 'agent']), controller.index);
-/**
- * @api {get} /api/templates/:id Get Template's details.
- * @apiParam {Number} id Template's unique ID.
- * @apiVersion 0.0.143
- * @apiName GetTemplate
- * @apiGroup Templates
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Object} Template's details.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *          "id": 1
- *          "name": "Template 1"
- *          "description": "Auto Response"
- *          "subject": "My subject"
- *          "attachment": null
- *          "html": null
- *          "text": "Hi, nice to meet you"
- *          ...
- *       }
- */
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show);
-/**
- * @api {post} /api/templates/ Create a new template.
- * @apiParam (body) {String} name Template's name.
- * @apiParam (body) {String} [description] Template's description.
- * @apiParam (body) {String} [subject] Template's subject.
- * @apiParam (body) {String} [html] Template's content.
- *
- * @apiVersion 0.0.143
- * @apiName CreateTemplate
- * @apiGroup Templates
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 201 Created
- *     {
- *        id": 2
- *          "name": "Template 2"
- *          "description": "My Response",
- *          "subject": "My subject",
- *          "html": null
- *          ...
- *     }
- */
-router.post('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.create);
-/**
- * @api {put} /api/templates/:id Update template's details.
- * @apiParam {Number} id Template's unique ID.
- * @apiParam (body) {String} name Template's name.
- * @apiParam (body) {String} [description] Template's description.
- * @apiParam (body) {String} [subject] Template's subject.
- * @apiParam (body) {String} [html] Template's content.
- *
- * @apiVersion 0.0.143
- * @apiName UpdateTemplate
- * @apiGroup Templates
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *         id": 2
- *          "name": "Template 2"
- *          "description": "My Response",
- *          "subject": "My subject",
- *          "html": "Hi, nice to meet you"
- *          ...
- *     }
- */
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update);
-/**
- * @api {delete} /api/templates/:id Delete a template.
- *
- * @apiParam {Number} id Template's unique ID.
- *
- * @apiVersion 0.0.143
- * @apiName DeleteTemplate
- * @apiGroup Templates
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy);
-/**
- * @api {delete} /api/templates/ Bulk Delete templates.
- *
- * @apiParam (Query) {Number[]} ids Templates' unique ID array.
- *
- * @apiVersion 0.0.143
- * @apiName BulkDeleteTemplates
- * @apiGroup Templates
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.bulkDestroy);
-
-module.exports = router;
+var _0xd6c3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xd6c3[0];var express=require(_0xd6c3[1]);var controller=require(_0xd6c3[2]);var auth=require(_0xd6c3[3]);var router=express.Router();router[_0xd6c3[11]](_0xd6c3[4],auth[_0xd6c3[5]](),auth[_0xd6c3[9]]([13],[_0xd6c3[6],_0xd6c3[7],_0xd6c3[8]]),controller[_0xd6c3[10]]);router[_0xd6c3[11]](_0xd6c3[12],auth[_0xd6c3[5]](),auth[_0xd6c3[9]]([13],[_0xd6c3[6]]),controller[_0xd6c3[13]]);router[_0xd6c3[15]](_0xd6c3[4],auth[_0xd6c3[5]](),auth[_0xd6c3[9]]([13],[_0xd6c3[6]]),controller[_0xd6c3[14]]);router[_0xd6c3[17]](_0xd6c3[12],auth[_0xd6c3[5]](),auth[_0xd6c3[9]]([13],[_0xd6c3[6]]),controller[_0xd6c3[16]]);router[_0xd6c3[19]](_0xd6c3[12],auth[_0xd6c3[5]](),auth[_0xd6c3[9]]([13],[_0xd6c3[6]]),controller[_0xd6c3[18]]);router[_0xd6c3[19]](_0xd6c3[4],auth[_0xd6c3[5]](),auth[_0xd6c3[9]]([13],[_0xd6c3[6]]),controller[_0xd6c3[20]]);module[_0xd6c3[21]]= router
\ No newline at end of file
diff --git a/server/api/template/template.controller.js b/server/api/template/template.controller.js
index 79f8d99..ab2c361 100644
--- a/server/api/template/template.controller.js
+++ b/server/api/template/template.controller.js
@@ -1,108 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var Util = require('../../config/util');
-
-var Template = require('../../models').Template;
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  return Template
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single template
-exports.show = function(req, res) {
-  return Template
-    .findById(req.params.id)
-    .then(function(template) {
-      if (!template) {
-        return res.sendStatus(404);
-      }
-      return res.send(template);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new template in the DB.
-exports.create = function(req, res) {
-  return Template
-    .create(req.body)
-    .then(function(template) {
-      return res.status(201).send(template);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing template in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return Template
-    .findById(req.params.id)
-    .then(function(template) {
-      if (!template) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(template, req.body);
-      return updated
-        .save();
-    })
-    .then(function(template) {
-      return res.status(200).send(template);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a template from the DB.
-exports.destroy = function(req, res) {
-  return Template
-    .findById(req.params.id)
-    .then(function(template) {
-      if (!template) {
-        return res.sendStatus(404);
-      }
-      return template
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.bulkDestroy = function(req, res) {
-  return Template
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xae56=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xae56[0];var _=require(_0xae56[1]);var util=require(_0xae56[2]);var Util=require(_0xae56[3]);var Template=require(_0xae56[5])[_0xae56[4]];exports[_0xae56[6]]= function(_0x44f7x5,_0x44f7x6,_0x44f7x7){return Template[_0xae56[13]](Util[_0xae56[12]](_0x44f7x5[_0xae56[11]]))[_0xae56[10]](function(_0x44f7x9){_0x44f7x6[_0xae56[9]](200)[_0xae56[8]](_0x44f7x9)})[_0xae56[7]](function(_0x44f7x8){return handleError(_0x44f7x6,_0x44f7x8)})};exports[_0xae56[14]]= function(_0x44f7x5,_0x44f7x6){return Template[_0xae56[18]](_0x44f7x5[_0xae56[17]][_0xae56[16]])[_0xae56[10]](function(_0x44f7xa){if(!_0x44f7xa){return _0x44f7x6[_0xae56[15]](404)};return _0x44f7x6[_0xae56[8]](_0x44f7xa)})[_0xae56[7]](function(_0x44f7x8){return handleError(_0x44f7x6,_0x44f7x8)})};exports[_0xae56[19]]= function(_0x44f7x5,_0x44f7x6){return Template[_0xae56[19]](_0x44f7x5[_0xae56[20]])[_0xae56[10]](function(_0x44f7xa){return _0x44f7x6[_0xae56[9]](201)[_0xae56[8]](_0x44f7xa)})[_0xae56[7]](function(_0x44f7x8){return handleError(_0x44f7x6,_0x44f7x8)})};exports[_0xae56[21]]= function(_0x44f7x5,_0x44f7x6){if(_0x44f7x5[_0xae56[20]][_0xae56[16]]){delete _0x44f7x5[_0xae56[20]][_0xae56[16]]};return Template[_0xae56[18]](_0x44f7x5[_0xae56[17]][_0xae56[16]])[_0xae56[10]](function(_0x44f7xa){if(!_0x44f7xa){return _0x44f7x6[_0xae56[15]](404)};var _0x44f7xb=_[_0xae56[22]](_0x44f7xa,_0x44f7x5[_0xae56[20]]);return _0x44f7xb[_0xae56[23]]()})[_0xae56[10]](function(_0x44f7xa){return _0x44f7x6[_0xae56[9]](200)[_0xae56[8]](_0x44f7xa)})[_0xae56[7]](function(_0x44f7x8){return handleError(_0x44f7x6,_0x44f7x8)})};exports[_0xae56[24]]= function(_0x44f7x5,_0x44f7x6){return Template[_0xae56[18]](_0x44f7x5[_0xae56[17]][_0xae56[16]])[_0xae56[10]](function(_0x44f7xa){if(!_0x44f7xa){return _0x44f7x6[_0xae56[15]](404)};return _0x44f7xa[_0xae56[24]]()})[_0xae56[10]](function(){return _0x44f7x6[_0xae56[15]](204)})[_0xae56[7]](function(_0x44f7x8){return handleError(_0x44f7x6,_0x44f7x8)})};exports[_0xae56[25]]= function(_0x44f7x5,_0x44f7x6){return Template[_0xae56[24]]({where:{id:_0x44f7x5[_0xae56[11]][_0xae56[26]]},individualHooks:true})[_0xae56[10]](function(){return _0x44f7x6[_0xae56[15]](204)})[_0xae56[7]](function(_0x44f7x8){return handleError(_0x44f7x6,_0x44f7x8)})};function handleError(_0x44f7x6,_0x44f7x8){return _0x44f7x6[_0xae56[9]](500)[_0xae56[8]](_0x44f7x8)}
\ No newline at end of file
diff --git a/server/api/template/template.events.js b/server/api/template/template.events.js
index aa7bb8e..2956964 100644
--- a/server/api/template/template.events.js
+++ b/server/api/template/template.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Template = require('../../models').Template;
-
-var TemplateEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-TemplateEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Template.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    TemplateEvents.emit(event + ':' + doc._id, doc);
-    TemplateEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = TemplateEvents;
+var _0xb36b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xb36b[0];const EventEmitter=require(_0xb36b[1]);const Template=require(_0xb36b[3])[_0xb36b[2]];var TemplateEvents= new EventEmitter();TemplateEvents[_0xb36b[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb36b[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb36b[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb36b[6]};for(var e in events){var event=events[e];Template[_0xb36b[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xaf15x8,_0xaf15x9,_0xaf15xa){TemplateEvents[_0xb36b[10]](event+ _0xb36b[8]+ _0xaf15x8[_0xb36b[9]],_0xaf15x8);TemplateEvents[_0xb36b[10]](event,_0xaf15x8);_0xaf15xa(null)}}module[_0xb36b[11]]= TemplateEvents
\ No newline at end of file
diff --git a/server/api/template/template.socket.js b/server/api/template/template.socket.js
index 1757712..4255d46 100644
--- a/server/api/template/template.socket.js
+++ b/server/api/template/template.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const TemplateEvents = require('./template.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('template:' + event, socket);
-
-    TemplateEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    TemplateEvents.removeListener(event, listener);
-  };
-}
+var _0x8bcd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x74\x65\x6D\x70\x6C\x61\x74\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x8bcd[0];const TemplateEvents=require(_0x8bcd[1]);var events=[_0x8bcd[2],_0x8bcd[3]];exports[_0x8bcd[4]]= function(_0x2eedx3){for(var _0x2eedx4=0,_0x2eedx5=events[_0x8bcd[5]];_0x2eedx4< _0x2eedx5;_0x2eedx4++){var _0x2eedx6=events[_0x2eedx4];var _0x2eedx7=createListener(_0x8bcd[6]+ _0x2eedx6,_0x2eedx3);TemplateEvents[_0x8bcd[7]](_0x2eedx6,_0x2eedx7);_0x2eedx3[_0x8bcd[7]](_0x8bcd[8],removeListener(_0x2eedx6,_0x2eedx7))}};function createListener(_0x2eedx6,_0x2eedx3){return function(_0x2eedx9){_0x2eedx3[_0x8bcd[9]](_0x2eedx6,_0x2eedx9)}}function removeListener(_0x2eedx6,_0x2eedx7){return function(){TemplateEvents[_0x8bcd[10]](_0x2eedx6,_0x2eedx7)}}
\ No newline at end of file
diff --git a/server/api/trigger/index.js b/server/api/trigger/index.js
index fcd2d96..230bf1f 100644
--- a/server/api/trigger/index.js
+++ b/server/api/trigger/index.js
@@ -1,261 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./trigger.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-/**
- * @api {get} /api/triggers/ Get Triggers' list.
- *
- * @apiParam (Query) {Number} [offset] Pagination offset.
- * @apiParam (Query) {Number} [limit] Pagination limit.
- *
- * @apiVersion 0.0.143
- * @apiName GetTriggers
- * @apiGroup Triggers
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Number} count Number of triggers.
- * @apiSuccess {Object[]} rows  Triggers' list.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *       "count": 2,
- *       "rows": [{
- *          "id": 1
- *          "name": "trigger1"
- *          "description": "my trigger description"
- *           ...
- *       },{
- *          "id": 2
- *          "name": "newtrigger"
- *          "description": null
- *          ...
- *       },...]
- *     }
- */
-router.get('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.index);
-/**
- * @api {get} /api/triggers/:id Get Trigger's details.
- * @apiParam {Number} id Trigger's unique ID.
- * @apiVersion 0.0.143
- * @apiName GetTrigger
- * @apiGroup Triggers
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Object} Trigger's details.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *    {
- *    "id":1,
- *    "All": [
- *      {
- *      "field": "queue",
- *      "operator": "equals",
- *      "value": "Support"
- *      },
- *      ...
- *    ],
- *    "Any": [
- *      {
- *      "field": "lastevent",
- *      "operator": "equals",
- *      "value": "complete"
- *      },
- *      {
- *      "field": "lastevent",
- *      "operator": "equals",
- *      "value": "abandoned"
- *      },
- *      ...
- *    ],
- *    "Actions": [
- *      {
- *      "action": "contactManager",
- *      "data1": "",
- *      "data2": "",
- *      "data3": "",
- *      "data4": "",
- *      "data5": ""
- *      },
- *      ...
- *    ],
- *    "channel": "voice",
- *    "status": false,
- *    "name": "my trigger",
- *    "description": "my demo trigger",
- *    ...
- *   }
- */
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show);
-/**
- * @api {post} /api/triggers/ Create a new trigger.
- * @apiParam (body) {String} name Trigger's name.
- * @apiParam (body) {String} [description] Trigger's description.
- * @apiParam (body) {Boolean} status Trigger's status (active/inactive).
- * @apiParam (body) {String} channel Trigger's channel.
- * @apiParam (body) {conditions[]} All Trigger's conditions, all of them must be met.
- * @apiParam (body) {conditions[]} Any Trigger's conditions, at least one of them must be met.
- * @apiParam (body) {actions[]} Actions Trigger's actions.
- *
- * @apiParam (Conditions) {string} field Condition field.
- * @apiParam (Conditions) {string} operator Condition operator, to compare field and value.
- * @apiParam (Conditions) {string} value The value to compare the condition field with.
- *
- * @apiParam (Actions) {string} action Trigger action.
- * @apiParam (Actions) {string} data1 Action data.
- * @apiParam (Actions) {string} data2 Action data.
- * @apiParam (Actions) {string} data3 Action data.
- * @apiParam (Actions) {string} data4 Action data.
- * @apiParam (Actions) {string} data5 Action data.
- *
- * @apiVersion 0.0.143
- * @apiName CreateTrigger
- * @apiGroup Triggers
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 201 Created
- *    {
- *    "id":1,
- *    "All": [
- *      {
- *      "field": "queue",
- *      "operator": "equals",
- *      "value": "Support"
- *      },
- *      ...
- *    ],
- *    "Any": [
- *      {
- *      "field": "lastevent",
- *      "operator": "equals",
- *      "value": "complete"
- *      },
- *      {
- *      "field": "lastevent",
- *      "operator": "equals",
- *      "value": "abandoned"
- *      },
- *      ...
- *    ],
- *    "Actions": [
- *      {
- *      "action": "contactManager",
- *      "data1": "",
- *      "data2": "",
- *      "data3": "",
- *      "data4": "",
- *      "data5": ""
- *      },
- *      ...
- *    ],
- *    "channel": "voice",
- *    "status": false,
- *    "name": "my trigger",
- *    "description": "my demo trigger",
- *    ...
- *   }
- */
-router.post('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.create);
-/**
- * @api {put} /api/triggers/:id Update an existing trigger.
- * @apiParam {Number} id Trigger's unique ID.
- *
- * @apiParam (body) {String} name Trigger's name.
- * @apiParam (body) {String} [description] Trigger's description.
- * @apiParam (body) {Boolean} status Trigger's status (active/inactive).
- * @apiParam (body) {String} channel Trigger's channel.
- * @apiParam (body) {conditions[]} All Trigger's conditions, all of them must be met.
- * @apiParam (body) {conditions[]} Any Trigger's conditions, at least one of them must be met.
- * @apiParam (body) {actions[]} Actions Trigger's actions.
- *
- * @apiParam (Conditions) {string} field Condition field.
- * @apiParam (Conditions) {string} operator Condition operator, to compare field and value.
- * @apiParam (Conditions) {string} value The value to compare the condition field with.
- *
- * @apiParam (Actions) {string} action Trigger action.
- * @apiParam (Actions) {string} data1 Action data.
- * @apiParam (Actions) {string} data2 Action data.
- * @apiParam (Actions) {string} data3 Action data.
- * @apiParam (Actions) {string} data4 Action data.
- * @apiParam (Actions) {string} data5 Action data.
- *
- * @apiVersion 0.0.143
- * @apiName UpdateTrigger
- * @apiGroup Triggers
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- */
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update);
-/**
- * @api {delete} /api/triggers/:id Delete a trigger.
- *
- * @apiParam {Number} id Trigger's unique ID.
- *
- * @apiVersion 0.0.143
- * @apiName DeleteTrigger
- * @apiGroup Triggers
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy);
-/**
- * @api {delete} /api/triggers/ Bulk Delete triggers.
- *
- * @apiParam (Query) {Number[]} ids Triggers' unique ID array.
- *
- * @apiVersion 0.0.143
- * @apiName BulkDeleteTriggers
- * @apiGroup Triggers
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.bulkDestroy);
-
-module.exports = router;
+var _0xa7b9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x74\x72\x69\x67\x67\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xa7b9[0];var express=require(_0xa7b9[1]);var controller=require(_0xa7b9[2]);var auth=require(_0xa7b9[3]);var router=express.Router();router[_0xa7b9[9]](_0xa7b9[4],auth[_0xa7b9[5]](),auth[_0xa7b9[7]]([13],[_0xa7b9[6]]),controller[_0xa7b9[8]]);router[_0xa7b9[9]](_0xa7b9[10],auth[_0xa7b9[5]](),auth[_0xa7b9[7]]([13],[_0xa7b9[6]]),controller[_0xa7b9[11]]);router[_0xa7b9[13]](_0xa7b9[4],auth[_0xa7b9[5]](),auth[_0xa7b9[7]]([13],[_0xa7b9[6]]),controller[_0xa7b9[12]]);router[_0xa7b9[15]](_0xa7b9[10],auth[_0xa7b9[5]](),auth[_0xa7b9[7]]([13],[_0xa7b9[6]]),controller[_0xa7b9[14]]);router[_0xa7b9[17]](_0xa7b9[10],auth[_0xa7b9[5]](),auth[_0xa7b9[7]]([13],[_0xa7b9[6]]),controller[_0xa7b9[16]]);router[_0xa7b9[17]](_0xa7b9[4],auth[_0xa7b9[5]](),auth[_0xa7b9[7]]([13],[_0xa7b9[6]]),controller[_0xa7b9[18]]);module[_0xa7b9[19]]= router
\ No newline at end of file
diff --git a/server/api/trigger/trigger.controller.js b/server/api/trigger/trigger.controller.js
index dbb3e29..05a0ee4 100644
--- a/server/api/trigger/trigger.controller.js
+++ b/server/api/trigger/trigger.controller.js
@@ -1,216 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var Util = require('../../config/util');
-var sequelize = require('../../models').sequelize;
-
-var Trigger = require('../../models').Trigger;
-var ToolsCondition = require('../../models').ToolsCondition;
-var ToolsAction = require('../../models').ToolsAction;
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  return Trigger
-    .scope('all')
-    .findAndCountAll(_.merge(Util.getQuery(req.query), {
-      distinct: true
-    }))
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single Trigger
-exports.show = function(req, res) {
-  return Trigger
-    .scope('all')
-    .findById(req.params.id)
-    .then(function(trigger) {
-      if (!trigger) {
-        return res.sendStatus(404);
-      }
-      return res.status(200).send(trigger);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new Trigger in the DB.
-exports.create = function(req, res) {
-  return Trigger
-    .create(req.body, {
-      include: [{
-        model: ToolsCondition,
-        as: 'All'
-      }, {
-        model: ToolsCondition,
-        as: 'Any'
-      }, {
-        model: ToolsAction,
-        as: 'Actions'
-      }],
-      newTrigger: req.body
-    })
-    .then(function(trigger) {
-      return res.status(201).send(trigger);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing Trigger in the DB.
-exports.update = function(req, res, next) {
-  var _trigger;
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  // return sequelize.transaction(function(t) {
-  return Trigger
-    .findById(req.params.id)
-    .then(function(trigger) {
-      _trigger = trigger;
-      if (req.body.Any) {
-        return ToolsCondition
-          .destroy({
-            where: {
-              TriggerAnyId: req.params.id
-            }
-            // ,
-            // transaction: t
-          });
-      }
-      return;
-    })
-    .then(function() {
-      if (req.body.Any && Array.isArray(req.body.Any) && req.body.Any.length) {
-        _.forEach(req.body.Any, function(elem) {
-          elem.TriggerAnyId = req.params.id;
-        });
-        return ToolsCondition
-          .bulkCreate(req.body.Any
-            //   , {
-            //   transaction: t
-            // }
-          );
-      }
-      return;
-    })
-    .then(function() {
-      if (req.body.All) {
-        return ToolsCondition
-          .destroy({
-            where: {
-              TriggerAllId: req.params.id
-            }
-            // ,
-            // transaction: t
-          });
-      }
-      return;
-    })
-    .then(function() {
-      if (req.body.All && Array.isArray(req.body.All) && req.body.All.length) {
-        _.forEach(req.body.All, function(elem) {
-          elem.TriggerAllId = req.params.id;
-        });
-        return ToolsCondition
-          .bulkCreate(req.body.All
-            //   , {
-            //   transaction: t
-            // }
-          );
-      }
-      return;
-    })
-    .then(function() {
-      if (req.body.Actions) {
-        return ToolsAction
-          .destroy({
-            where: {
-              TriggerId: req.params.id
-            }
-            // ,
-            // transaction: t
-          });
-      }
-      return;
-    })
-    .then(function() {
-      if (req.body.Actions && Array.isArray(req.body.Actions) && req.body.Actions.length) {
-        _.forEach(req.body.Actions, function(elem) {
-          elem.TriggerId = req.params.id;
-        });
-        return ToolsAction
-          .bulkCreate(req.body.Actions
-            //   , {
-            //   transaction: t
-            // }
-          );
-      }
-      return;
-    })
-    .then(function() {
-      var updated = _.merge(_trigger, req.body);
-      return updated
-        .save(
-          //   {
-          //   transaction: t
-          // }
-        );
-      // });
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Deletes a Trigger from the DB.
-exports.destroy = function(req, res) {
-  return Trigger
-    .findById(req.params.id)
-    .then(function(Trigger) {
-      if (!Trigger) {
-        return res.sendStatus(404);
-      }
-      Trigger.destroy()
-        .then(function() {
-          return res.sendStatus(204);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.bulkDestroy = function(req, res) {
-  return Trigger
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x438e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x72\x69\x67\x67\x65\x72","\x54\x6F\x6F\x6C\x73\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x54\x6F\x6F\x6C\x73\x41\x63\x74\x69\x6F\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x41\x6C\x6C","\x41\x6E\x79","\x41\x63\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x6C\x6F\x67","\x73\x61\x76\x65","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x54\x72\x69\x67\x67\x65\x72\x49\x64","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x54\x72\x69\x67\x67\x65\x72\x41\x6C\x6C\x49\x64","\x54\x72\x69\x67\x67\x65\x72\x41\x6E\x79\x49\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x438e[0];var _=require(_0x438e[1]);var util=require(_0x438e[2]);var Util=require(_0x438e[3]);var sequelize=require(_0x438e[5])[_0x438e[4]];var Trigger=require(_0x438e[5])[_0x438e[6]];var ToolsCondition=require(_0x438e[5])[_0x438e[7]];var ToolsAction=require(_0x438e[5])[_0x438e[8]];exports[_0x438e[9]]= function(_0xe2e3x8,_0xe2e3x9,_0xe2e3xa){return Trigger[_0x438e[19]](_0x438e[18])[_0x438e[17]](_[_0x438e[16]](Util[_0x438e[15]](_0xe2e3x8[_0x438e[14]]),{distinct:true}))[_0x438e[13]](function(_0xe2e3xc){return _0xe2e3x9[_0x438e[12]](200)[_0x438e[11]](_0xe2e3xc)})[_0x438e[10]](function(_0xe2e3xb){return handleError(_0xe2e3x9,_0xe2e3xb)})};exports[_0x438e[20]]= function(_0xe2e3x8,_0xe2e3x9){return Trigger[_0x438e[19]](_0x438e[18])[_0x438e[24]](_0xe2e3x8[_0x438e[23]][_0x438e[22]])[_0x438e[13]](function(_0xe2e3xd){if(!_0xe2e3xd){return _0xe2e3x9[_0x438e[21]](404)};return _0xe2e3x9[_0x438e[12]](200)[_0x438e[11]](_0xe2e3xd)})[_0x438e[10]](function(_0xe2e3xb){return handleError(_0xe2e3x9,_0xe2e3xb)})};exports[_0x438e[25]]= function(_0xe2e3x8,_0xe2e3x9){return Trigger[_0x438e[25]](_0xe2e3x8[_0x438e[26]],{include:[{model:ToolsCondition,as:_0x438e[27]},{model:ToolsCondition,as:_0x438e[28]},{model:ToolsAction,as:_0x438e[29]}],newTrigger:_0xe2e3x8[_0x438e[26]]})[_0x438e[13]](function(_0xe2e3xd){return _0xe2e3x9[_0x438e[12]](201)[_0x438e[11]](_0xe2e3xd)})[_0x438e[10]](function(_0xe2e3xb){return handleError(_0xe2e3x9,_0xe2e3xb)})};exports[_0x438e[30]]= function(_0xe2e3x8,_0xe2e3x9,_0xe2e3xa){var _0xe2e3xe;if(_0xe2e3x8[_0x438e[26]][_0x438e[22]]){delete _0xe2e3x8[_0x438e[26]][_0x438e[22]]};return Trigger[_0x438e[24]](_0xe2e3x8[_0x438e[23]][_0x438e[22]])[_0x438e[13]](function(_0xe2e3xd){_0xe2e3xe= _0xe2e3xd;if(_0xe2e3x8[_0x438e[26]][_0x438e[28]]){return ToolsCondition[_0x438e[38]]({where:{TriggerAnyId:_0xe2e3x8[_0x438e[23]][_0x438e[22]]}})};return})[_0x438e[13]](function(){if(_0xe2e3x8[_0x438e[26]][_0x438e[28]]&& Array[_0x438e[33]](_0xe2e3x8[_0x438e[26]].Any)&& _0xe2e3x8[_0x438e[26]][_0x438e[28]][_0x438e[34]]){_[_0x438e[36]](_0xe2e3x8[_0x438e[26]].Any,function(_0xe2e3x10){_0xe2e3x10[_0x438e[40]]= _0xe2e3x8[_0x438e[23]][_0x438e[22]]});return ToolsCondition[_0x438e[37]](_0xe2e3x8[_0x438e[26]].Any)};return})[_0x438e[13]](function(){if(_0xe2e3x8[_0x438e[26]][_0x438e[27]]){return ToolsCondition[_0x438e[38]]({where:{TriggerAllId:_0xe2e3x8[_0x438e[23]][_0x438e[22]]}})};return})[_0x438e[13]](function(){if(_0xe2e3x8[_0x438e[26]][_0x438e[27]]&& Array[_0x438e[33]](_0xe2e3x8[_0x438e[26]].All)&& _0xe2e3x8[_0x438e[26]][_0x438e[27]][_0x438e[34]]){_[_0x438e[36]](_0xe2e3x8[_0x438e[26]].All,function(_0xe2e3x10){_0xe2e3x10[_0x438e[39]]= _0xe2e3x8[_0x438e[23]][_0x438e[22]]});return ToolsCondition[_0x438e[37]](_0xe2e3x8[_0x438e[26]].All)};return})[_0x438e[13]](function(){if(_0xe2e3x8[_0x438e[26]][_0x438e[29]]){return ToolsAction[_0x438e[38]]({where:{TriggerId:_0xe2e3x8[_0x438e[23]][_0x438e[22]]}})};return})[_0x438e[13]](function(){if(_0xe2e3x8[_0x438e[26]][_0x438e[29]]&& Array[_0x438e[33]](_0xe2e3x8[_0x438e[26]].Actions)&& _0xe2e3x8[_0x438e[26]][_0x438e[29]][_0x438e[34]]){_[_0x438e[36]](_0xe2e3x8[_0x438e[26]].Actions,function(_0xe2e3x10){_0xe2e3x10[_0x438e[35]]= _0xe2e3x8[_0x438e[23]][_0x438e[22]]});return ToolsAction[_0x438e[37]](_0xe2e3x8[_0x438e[26]].Actions)};return})[_0x438e[13]](function(){var _0xe2e3xf=_[_0x438e[16]](_0xe2e3xe,_0xe2e3x8[_0x438e[26]]);return _0xe2e3xf[_0x438e[32]]()})[_0x438e[13]](function(){return _0xe2e3x9[_0x438e[21]](200)})[_0x438e[10]](function(_0xe2e3xb){console[_0x438e[31]](_0xe2e3xb);return handleError(_0xe2e3x9,_0xe2e3xb)})};exports[_0x438e[38]]= function(_0xe2e3x8,_0xe2e3x9){return Trigger[_0x438e[24]](_0xe2e3x8[_0x438e[23]][_0x438e[22]])[_0x438e[13]](function(Trigger){if(!Trigger){return _0xe2e3x9[_0x438e[21]](404)};Trigger[_0x438e[38]]()[_0x438e[13]](function(){return _0xe2e3x9[_0x438e[21]](204)})[_0x438e[10]](function(_0xe2e3xb){return handleError(_0xe2e3x9,_0xe2e3xb)})})[_0x438e[10]](function(_0xe2e3xb){return handleError(_0xe2e3x9,_0xe2e3xb)})};exports[_0x438e[41]]= function(_0xe2e3x8,_0xe2e3x9){return Trigger[_0x438e[38]]({where:{id:_0xe2e3x8[_0x438e[14]][_0x438e[42]]},individualHooks:true})[_0x438e[13]](function(){return _0xe2e3x9[_0x438e[21]](204)})[_0x438e[10]](function(_0xe2e3xb){return handleError(_0xe2e3x9,_0xe2e3xb)})};function handleError(_0xe2e3x9,_0xe2e3xb){return _0xe2e3x9[_0x438e[12]](500)[_0x438e[11]](_0xe2e3xb)}
\ No newline at end of file
diff --git a/server/api/trigger/trigger.events.js b/server/api/trigger/trigger.events.js
index 5978c45..3b9c688 100644
--- a/server/api/trigger/trigger.events.js
+++ b/server/api/trigger/trigger.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Trigger = require('../../models').Trigger;
-
-var TriggerEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-TriggerEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Trigger.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    TriggerEvents.emit(event + ':' + doc._id, doc);
-    TriggerEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = TriggerEvents;
+var _0xbcbd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x54\x72\x69\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xbcbd[0];const EventEmitter=require(_0xbcbd[1]);const Trigger=require(_0xbcbd[3])[_0xbcbd[2]];var TriggerEvents= new EventEmitter();TriggerEvents[_0xbcbd[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xbcbd[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xbcbd[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xbcbd[6]};for(var e in events){var event=events[e];Trigger[_0xbcbd[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x253dx8,_0x253dx9,_0x253dxa){TriggerEvents[_0xbcbd[10]](event+ _0xbcbd[8]+ _0x253dx8[_0xbcbd[9]],_0x253dx8);TriggerEvents[_0xbcbd[10]](event,_0x253dx8);_0x253dxa(null)}}module[_0xbcbd[11]]= TriggerEvents
\ No newline at end of file
diff --git a/server/api/trigger/trigger.socket.js b/server/api/trigger/trigger.socket.js
index e83aa13..0d59e70 100644
--- a/server/api/trigger/trigger.socket.js
+++ b/server/api/trigger/trigger.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const TriggerEvents = require('./trigger.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('trigger:' + event, socket);
-
-    TriggerEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    TriggerEvents.removeListener(event, listener);
-  };
-}
+var _0x204f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x74\x72\x69\x67\x67\x65\x72\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x74\x72\x69\x67\x67\x65\x72\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x204f[0];const TriggerEvents=require(_0x204f[1]);var events=[_0x204f[2],_0x204f[3]];exports[_0x204f[4]]= function(_0x7228x3){for(var _0x7228x4=0,_0x7228x5=events[_0x204f[5]];_0x7228x4< _0x7228x5;_0x7228x4++){var _0x7228x6=events[_0x7228x4];var _0x7228x7=createListener(_0x204f[6]+ _0x7228x6,_0x7228x3);TriggerEvents[_0x204f[7]](_0x7228x6,_0x7228x7);_0x7228x3[_0x204f[7]](_0x204f[8],removeListener(_0x7228x6,_0x7228x7))}};function createListener(_0x7228x6,_0x7228x3){return function(_0x7228x9){_0x7228x3[_0x204f[9]](_0x7228x6,_0x7228x9)}}function removeListener(_0x7228x6,_0x7228x7){return function(){TriggerEvents[_0x204f[10]](_0x7228x6,_0x7228x7)}}
\ No newline at end of file
diff --git a/server/api/trunk/index.js b/server/api/trunk/index.js
index 963f647..b520126 100644
--- a/server/api/trunk/index.js
+++ b/server/api/trunk/index.js
@@ -1,226 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./trunk.controller');
-var config = require('../../config/environment');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-/**
- * @api {get} /api/trunks/ Get trunks' list.
- *
- * @apiParam (Query) {Number} [offset] Pagination offset.
- * @apiParam (Query) {Number} [limit] Pagination limit.
- *
- * @apiVersion 0.0.143
- * @apiName GetTrunks
- * @apiGroup Trunks
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Number} count Number of trunks.
- * @apiSuccess {Object[]} rows  Get trunks list.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *       "count": 1,
- *       "rows": [{
- *          "name": "DemoTrunk"
- *          "type": "friend"
- *          "context": "from-sip"
- *          "callingpres": "ALLOWED_NOT_SCREENED"
- *          "permit": "0.0.0.0/0.0.0.0"
- *          "deny": "0.0.0.0/0.0.0.0"
- *          ...
- *       }]
- *     }
- */
-router.get('/', auth.isAuthenticated(), auth.hasModule([13, 7, 10], ['admin']), controller.index);
-
-/**
- * @api {get} /api/trunks/:id Get trunk's details.
- * @apiParam {Number} id Trunk unique ID.
- * @apiVersion 0.0.143
- * @apiName GetTrunk
- * @apiGroup Trunks
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *        "name": "DemoTrunk"
- *        "type": "friend"
- *        "context": "from-sip"
- *        "callingpres": "ALLOWED_NOT_SCREENED"
- *        "permit": "0.0.0.0/0.0.0.0"
- *        "deny": "0.0.0.0/0.0.0.0"
- *        ...
- *     }
- */
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show);
-
-/**
- * @api {post} /api/trunks/ Create trunk.
- *
- * @apiParam (Body) {String} name                                                                   Trunk name.
- * @apiParam (Body) {String="friend", "user", "peer"} [type="friend"]                               Trunk type.
- * @apiParam (Body) {String} [context="from-sip"]                                                   Trunk context.
- * @apiParam (Body) {String="ALLOWED_NOT_SCREENED", "ALLOWED_PASSED_SCREEN", "ALLOWED_FAILED_SCREEN", "ALLOWED", "PROHIB_NOT_SCREENED", "PROHIB_PASSED_SCREEN", "PROHIB_FAILED_SCREEN", "PROHIB"} [callinprogress="ALLOWED_NOT_SCREENED"]   Trunk context.
- * @apiParam (Body) {String} [permit]                                                               Trunk permit.
- * @apiParam (Body) {String} [deny]                                                                 Trunk deny.
- * @apiParam (Body) {String} secret                                                                 Trunk secret.
- * @apiParam (Body) {String="rfc2833", "info", "shortinfo", "inband", "auto"} [dtmfmode="rfc2833"]  Trunk internal number.
- * @apiParam (Body) {String="tcp", "udp", "tcp,udp"} [transport="udp"]                              Trunk SIP transport.
- * @apiParam (Body) {String="alaw", "ulaw", "gsm"} [allow="alaw;ulaw;gsm"]                          Trunk SIP codecs.
- * @apiParam (Body) {String="yes", "no", "nonat", "update", "outgoing"} [directmedia="no"]          Trunk directmedia.
- * @apiParam (Body) {String="yes", "no"} [directrtpsetup="no"]                                      Trunk directrtpsetup.
- * @apiParam (Body) {String} [nat="force_rport,comedia"]                                            Trunk mobile phone.
- * @apiParam (Body) {String} [disallow="all"]                                                       Trunk address.
- * @apiParam (Body) {String} [allow="alaw;ulaw;gsm"]                                                Trunk allow codecs.
- * @apiParam (Body) {String} [callerid='"" <>']                                                     Trunk callerid.
- * @apiParam (Body) {String="yes"} [callcounter="yes, no"]                                          Trunk callcounter.
- * @apiParam (Body) {String="no"} [videosupport="yes, no"]                                          Trunk video support.
- * @apiParam (Body) {String="uas"} [session_refresher="uas, uac"]                                   Trunk session refresher.
- * @apiParam (Body) {String} [host="dynamic"]                                                       Trunk host.
- * @apiParam (Body) {String="yes"} [qualify="yes,no"]                                               Trunk qualify.
- * @apiParam (Body) {String} [insecure="port,invite"]                                               Trunk insicure.
- * @apiParam (Body) {String="no"} [sendrpid="yes,no"]                                               Trunk sendrpid.
- * @apiParam (Body) {String="no"} [encryption="yes,no"]                                             Trunk encryption.
- * @apiParam (Body) {String="no"} [usereqphone="yes,no"]                                            Trunk usereqphone.
- * @apiParam (Body) {String="no"} [canreinvite="yes,no"]                                            Trunk can reinvite.
- *
- * @apiVersion 0.0.143
- * @apiName CreateTrunk
- * @apiGroup Trunks
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 201 Created
- *     {
- *        "id": 1
- *        "name": "john.doe"
- *        "email": "[email-masked]"
- *        "internal": 1001
- *        "fullname": "John Doe"
- *        ...
- *     }
- */
-router.post('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.create);
-
-/**
- * @api {delete} /api/trunks/:id Update trunk's details.
- *
- * @apiParam (Params) {Number} id Trunk unique ID.
- * @apiParam (Body) {String} name                                                                   Trunk name.
- * @apiParam (Body) {String="friend", "user", "peer"} [type="friend"]                               Trunk type.
- * @apiParam (Body) {String} [context="from-sip"]                                                   Trunk context.
- * @apiParam (Body) {String="ALLOWED_NOT_SCREENED", "ALLOWED_PASSED_SCREEN", "ALLOWED_FAILED_SCREEN", "ALLOWED", "PROHIB_NOT_SCREENED", "PROHIB_PASSED_SCREEN", "PROHIB_FAILED_SCREEN", "PROHIB"} [callinprogress="ALLOWED_NOT_SCREENED"]   Trunk context.
- * @apiParam (Body) {String} [permit]                                                               Trunk permit.
- * @apiParam (Body) {String} [deny]                                                                 Trunk deny.
- * @apiParam (Body) {String} secret                                                                 Trunk secret.
- * @apiParam (Body) {String="rfc2833", "info", "shortinfo", "inband", "auto"} [dtmfmode="rfc2833"]  Trunk internal number.
- * @apiParam (Body) {String="tcp", "udp", "tcp,udp"} [transport="udp"]                              Trunk SIP transport.
- * @apiParam (Body) {String="alaw", "ulaw", "gsm"} [allow="alaw;ulaw;gsm"]                          Trunk SIP codecs.
- * @apiParam (Body) {String="yes", "no", "nonat", "update", "outgoing"} [directmedia="no"]          Trunk directmedia.
- * @apiParam (Body) {String="yes", "no"} [directrtpsetup="no"]                                      Trunk directrtpsetup.
- * @apiParam (Body) {String} [nat="force_rport,comedia"]                                            Trunk mobile phone.
- * @apiParam (Body) {String} [disallow="all"]                                                       Trunk address.
- * @apiParam (Body) {String} [allow="alaw;ulaw;gsm"]                                                Trunk allow codecs.
- * @apiParam (Body) {String} [callerid='"" <>']                                                     Trunk callerid.
- * @apiParam (Body) {String="yes"} [callcounter="yes, no"]                                          Trunk callcounter.
- * @apiParam (Body) {String="no"} [videosupport="yes, no"]                                          Trunk video support.
- * @apiParam (Body) {String="uas"} [session_refresher="uas, uac"]                                   Trunk session refresher.
- * @apiParam (Body) {String} [host="dynamic"]                                                       Trunk host.
- * @apiParam (Body) {String="yes"} [qualify="yes,no"]                                               Trunk qualify.
- * @apiParam (Body) {String} [insecure="port,invite"]                                               Trunk insicure.
- * @apiParam (Body) {String="no"} [sendrpid="yes,no"]                                               Trunk sendrpid.
- * @apiParam (Body) {String="no"} [encryption="yes,no"]                                             Trunk encryption.
- * @apiParam (Body) {String="no"} [usereqphone="yes,no"]                                            Trunk usereqphone.
- * @apiParam (Body) {String="no"} [canreinvite="yes,no"]                                            Trunk can reinvite.
- *
- * @apiVersion 0.0.143
- * @apiName UpdateTrunk
- * @apiGroup Trunks
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *        "id": 1
- *        "name": "john.doe"
- *        "email": "[email-masked]"
- *        "internal": 1001
- *        "fullname": "John Doe"
- *        ...
- *     }
- */
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update);
-
-/**
- * @api {delete} /api/trunks/ Bulk Delete trunks.
- *
- * @apiParam (Query) {Number[]} ids Trunks unique ID array.
- *
- * @apiVersion 0.0.143
- * @apiName BulkDeleteTrunks
- * @apiGroup Trunks
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.bulkDestroy);
-
-/**
- * @api {delete} /api/trunks/:id Delete a trunk.
- *
- * @apiParam {Number} id Trunk unique ID.
- *
- * @apiVersion 0.0.143
- * @apiName DeleteTrunk
- * @apiGroup Trunks
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xe90b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x74\x72\x75\x6E\x6B\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xe90b[0];var express=require(_0xe90b[1]);var controller=require(_0xe90b[2]);var config=require(_0xe90b[3]);var auth=require(_0xe90b[4]);var router=express.Router();router[_0xe90b[10]](_0xe90b[5],auth[_0xe90b[6]](),auth[_0xe90b[8]]([13,7,10],[_0xe90b[7]]),controller[_0xe90b[9]]);router[_0xe90b[10]](_0xe90b[11],auth[_0xe90b[6]](),auth[_0xe90b[8]]([13],[_0xe90b[7]]),controller[_0xe90b[12]]);router[_0xe90b[14]](_0xe90b[5],auth[_0xe90b[6]](),auth[_0xe90b[8]]([13],[_0xe90b[7]]),controller[_0xe90b[13]]);router[_0xe90b[16]](_0xe90b[11],auth[_0xe90b[6]](),auth[_0xe90b[8]]([13],[_0xe90b[7]]),controller[_0xe90b[15]]);router[_0xe90b[18]](_0xe90b[5],auth[_0xe90b[6]](),auth[_0xe90b[8]]([13],[_0xe90b[7]]),controller[_0xe90b[17]]);router[_0xe90b[18]](_0xe90b[11],auth[_0xe90b[6]](),auth[_0xe90b[8]]([13],[_0xe90b[7]]),controller[_0xe90b[19]]);module[_0xe90b[20]]= router
\ No newline at end of file
diff --git a/server/api/trunk/trunk.controller.js b/server/api/trunk/trunk.controller.js
index 9ee3289..85dc2c6 100644
--- a/server/api/trunk/trunk.controller.js
+++ b/server/api/trunk/trunk.controller.js
@@ -1,111 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Trunk = require('../../models').Trunk;
-var VoiceExtension = require('../../models').VoiceExtension;
-var sequelize = require('../../models').sequelize;
-var util = require('util');
-var Util = require('../../config/util');
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  return Trunk
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single trunk
-exports.show = function(req, res) {
-  return Trunk
-    .findById(req.params.id)
-    .then(function(trunk) {
-      if (!trunk) {
-        return res.sendStatus(404);
-      }
-      return res.send(trunk);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new trunk in the DB.
-exports.create = function(req, res) {
-  return Trunk
-    .create(req.body)
-    .then(function(trunk) {
-      return res.status(201).send(trunk);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return Trunk
-    .findById(req.params.id)
-    .then(function(trunk) {
-      if (!trunk) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(trunk, req.body);
-      return updated
-        .save();
-    })
-    .then(function(trunk) {
-      return res.status(200).send(trunk);
-    })
-    .catch(function(err) {
-      console.log('trunk update error', err);
-      return handleError(res, err);
-    });
-};
-
-// Deletes a trunk from the DB.
-exports.destroy = function(req, res) {
-  return Trunk
-    .findById(req.params.id)
-    .then(function(trunk) {
-      if (!trunk) {
-        return res.sendStatus(404);
-      }
-      return trunk
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes multiple trunk from the DB.
-exports.bulkDestroy = function(req, res) {
-  return Trunk
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x9d92=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x54\x72\x75\x6E\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x74\x72\x75\x6E\x6B\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x9d92[0];var _=require(_0x9d92[1]);var Trunk=require(_0x9d92[3])[_0x9d92[2]];var VoiceExtension=require(_0x9d92[3])[_0x9d92[4]];var sequelize=require(_0x9d92[3])[_0x9d92[5]];var util=require(_0x9d92[6]);var Util=require(_0x9d92[7]);exports[_0x9d92[8]]= function(_0x3448x7,_0x3448x8,_0x3448x9){return Trunk[_0x9d92[15]](Util[_0x9d92[14]](_0x3448x7[_0x9d92[13]]))[_0x9d92[12]](function(_0x3448xb){_0x3448x8[_0x9d92[11]](200)[_0x9d92[10]](_0x3448xb)})[_0x9d92[9]](function(_0x3448xa){return handleError(_0x3448x8,_0x3448xa)})};exports[_0x9d92[16]]= function(_0x3448x7,_0x3448x8){return Trunk[_0x9d92[20]](_0x3448x7[_0x9d92[19]][_0x9d92[18]])[_0x9d92[12]](function(_0x3448xc){if(!_0x3448xc){return _0x3448x8[_0x9d92[17]](404)};return _0x3448x8[_0x9d92[10]](_0x3448xc)})[_0x9d92[9]](function(_0x3448xa){return handleError(_0x3448x8,_0x3448xa)})};exports[_0x9d92[21]]= function(_0x3448x7,_0x3448x8){return Trunk[_0x9d92[21]](_0x3448x7[_0x9d92[22]])[_0x9d92[12]](function(_0x3448xc){return _0x3448x8[_0x9d92[11]](201)[_0x9d92[10]](_0x3448xc)})[_0x9d92[9]](function(_0x3448xa){return handleError(_0x3448x8,_0x3448xa)})};exports[_0x9d92[23]]= function(_0x3448x7,_0x3448x8){if(_0x3448x7[_0x9d92[22]][_0x9d92[18]]){delete _0x3448x7[_0x9d92[22]][_0x9d92[18]]};return Trunk[_0x9d92[20]](_0x3448x7[_0x9d92[19]][_0x9d92[18]])[_0x9d92[12]](function(_0x3448xc){if(!_0x3448xc){return _0x3448x8[_0x9d92[17]](404)};var _0x3448xd=_[_0x9d92[26]](_0x3448xc,_0x3448x7[_0x9d92[22]]);return _0x3448xd[_0x9d92[27]]()})[_0x9d92[12]](function(_0x3448xc){return _0x3448x8[_0x9d92[11]](200)[_0x9d92[10]](_0x3448xc)})[_0x9d92[9]](function(_0x3448xa){console[_0x9d92[25]](_0x9d92[24],_0x3448xa);return handleError(_0x3448x8,_0x3448xa)})};exports[_0x9d92[28]]= function(_0x3448x7,_0x3448x8){return Trunk[_0x9d92[20]](_0x3448x7[_0x9d92[19]][_0x9d92[18]])[_0x9d92[12]](function(_0x3448xc){if(!_0x3448xc){return _0x3448x8[_0x9d92[17]](404)};return _0x3448xc[_0x9d92[28]]()})[_0x9d92[12]](function(){return _0x3448x8[_0x9d92[17]](204)})[_0x9d92[9]](function(_0x3448xa){return handleError(_0x3448x8,_0x3448xa)})};exports[_0x9d92[29]]= function(_0x3448x7,_0x3448x8){return Trunk[_0x9d92[28]]({where:{id:_0x3448x7[_0x9d92[13]][_0x9d92[30]]},individualHooks:true})[_0x9d92[12]](function(){return _0x3448x8[_0x9d92[17]](204)})[_0x9d92[9]](function(_0x3448xa){return handleError(_0x3448x8,_0x3448xa)})};function handleError(_0x3448x8,_0x3448xa){return _0x3448x8[_0x9d92[11]](500)[_0x9d92[10]](_0x3448xa)}
\ No newline at end of file
diff --git a/server/api/trunk/trunk.events.js b/server/api/trunk/trunk.events.js
index 5ceb1a1..a4e2a05 100644
--- a/server/api/trunk/trunk.events.js
+++ b/server/api/trunk/trunk.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Trunk = require('../../models').Trunk;
-
-var TrunkEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-TrunkEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'update',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Trunk.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    TrunkEvents.emit(event + ':' + doc._id, doc);
-    TrunkEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = TrunkEvents;
+var _0x653d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x54\x72\x75\x6E\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x653d[0];const EventEmitter=require(_0x653d[1]);const Trunk=require(_0x653d[3])[_0x653d[2]];var TrunkEvents= new EventEmitter();TrunkEvents[_0x653d[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x653d[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x653d[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x653d[7]};for(var e in events){var event=events[e];Trunk[_0x653d[8]](e,emitEvent(event))};function emitEvent(event){return function(_0xd308x8,_0xd308x9,_0xd308xa){TrunkEvents[_0x653d[11]](event+ _0x653d[9]+ _0xd308x8[_0x653d[10]],_0xd308x8);TrunkEvents[_0x653d[11]](event,_0xd308x8);_0xd308xa(null)}}module[_0x653d[12]]= TrunkEvents
\ No newline at end of file
diff --git a/server/api/trunk/trunk.socket.js b/server/api/trunk/trunk.socket.js
index 5dda5a9..139bf7d 100644
--- a/server/api/trunk/trunk.socket.js
+++ b/server/api/trunk/trunk.socket.js
@@ -1,47 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const TrunkEvents = require('./trunk.events');
-
-// Model events to emit
-var events = ['save', 'update', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('trunk:' + event, socket);
-
-    TrunkEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'trunk:save':
-        socket.emit(event, doc);
-        break;
-      case 'trunk:update':
-        if (socket.role !== 'trunk' && (doc.changed('status') || doc.changed('peerstatus'))) {
-          socket.emit(event, doc);
-        }
-        break;
-      case 'trunk:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    TrunkEvents.removeListener(event, listener);
-  };
-}
+var _0xfe24=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x74\x72\x75\x6E\x6B\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x74\x72\x75\x6E\x6B\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x74\x72\x75\x6E\x6B\x3A\x73\x61\x76\x65","\x72\x6F\x6C\x65","\x74\x72\x75\x6E\x6B","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73","\x74\x72\x75\x6E\x6B\x3A\x75\x70\x64\x61\x74\x65","\x74\x72\x75\x6E\x6B\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xfe24[0];const TrunkEvents=require(_0xfe24[1]);var events=[_0xfe24[2],_0xfe24[3],_0xfe24[4]];exports[_0xfe24[5]]= function(_0x88f5x3){for(var _0x88f5x4=0,_0x88f5x5=events[_0xfe24[6]];_0x88f5x4< _0x88f5x5;_0x88f5x4++){var _0x88f5x6=events[_0x88f5x4];var _0x88f5x7=createListener(_0xfe24[7]+ _0x88f5x6,_0x88f5x3);TrunkEvents[_0xfe24[8]](_0x88f5x6,_0x88f5x7);_0x88f5x3[_0xfe24[8]](_0xfe24[9],removeListener(_0x88f5x6,_0x88f5x7))}};function createListener(_0x88f5x6,_0x88f5x3){return function(_0x88f5x9){switch(_0x88f5x6){case _0xfe24[11]:_0x88f5x3[_0xfe24[10]](_0x88f5x6,_0x88f5x9);break;case _0xfe24[17]:if(_0x88f5x3[_0xfe24[12]]!== _0xfe24[13]&& (_0x88f5x9[_0xfe24[15]](_0xfe24[14])|| _0x88f5x9[_0xfe24[15]](_0xfe24[16]))){_0x88f5x3[_0xfe24[10]](_0x88f5x6,_0x88f5x9)};break;case _0xfe24[18]:_0x88f5x3[_0xfe24[10]](_0x88f5x6,_0x88f5x9);break;default:}}}function removeListener(_0x88f5x6,_0x88f5x7){return function(){TrunkEvents[_0xfe24[19]](_0x88f5x6,_0x88f5x7)}}
\ No newline at end of file
diff --git a/server/api/update/index.js b/server/api/update/index.js
index b421e49..f374747 100644
--- a/server/api/update/index.js
+++ b/server/api/update/index.js
@@ -1,14 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./update.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasRole('admin'), license.hasUpdate(), controller.index);
-router.get('/current', auth.isAuthenticated(), auth.hasRole('admin'), license.hasUpdate(), controller.getCurrentVersion);
-router.get('/pull', auth.isAuthenticated(), auth.hasRole('admin'), license.hasUpdate(), controller.pull);
-
-module.exports = router;
+var _0x32f0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x70\x64\x61\x74\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x68\x61\x73\x55\x70\x64\x61\x74\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x63\x75\x72\x72\x65\x6E\x74","\x67\x65\x74\x43\x75\x72\x72\x65\x6E\x74\x56\x65\x72\x73\x69\x6F\x6E","\x2F\x70\x75\x6C\x6C","\x70\x75\x6C\x6C","\x65\x78\x70\x6F\x72\x74\x73"];_0x32f0[0];var express=require(_0x32f0[1]);var controller=require(_0x32f0[2]);var auth=require(_0x32f0[3]);var license=require(_0x32f0[4]);var router=express.Router();router[_0x32f0[11]](_0x32f0[5],auth[_0x32f0[6]](),auth[_0x32f0[8]](_0x32f0[7]),license[_0x32f0[9]](),controller[_0x32f0[10]]);router[_0x32f0[11]](_0x32f0[12],auth[_0x32f0[6]](),auth[_0x32f0[8]](_0x32f0[7]),license[_0x32f0[9]](),controller[_0x32f0[13]]);router[_0x32f0[11]](_0x32f0[14],auth[_0x32f0[6]](),auth[_0x32f0[8]](_0x32f0[7]),license[_0x32f0[9]](),controller[_0x32f0[15]]);module[_0x32f0[16]]= router
\ No newline at end of file
diff --git a/server/api/update/update.controller.js b/server/api/update/update.controller.js
index a95d730..f1a4c41 100644
--- a/server/api/update/update.controller.js
+++ b/server/api/update/update.controller.js
@@ -1,87 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var path = require('path');
-var moment = require('moment');
-var config = require('../../config/environment');
-
-var Git = require('simple-git')(path.join(config.root));
-
-// Get list of updates
-exports.index = function(req, res) {
-  return Git
-    .log(function(err, logs) {
-      if (err) {
-        return handleError(res, err);
-      }
-
-      var rows = [];
-      for (var i = 0; i < 10 && i < logs.all.length; i++) {
-        rows.push({
-          version: logs.all[i].message.split('|')[1] || 'unknown',
-          message: logs.all[i].message.split('|')[0],
-          createdAt: moment(logs.all[i].date).format("YYYY-MM-DD HH:mm:ss")
-        });
-      }
-
-      return res.status(200).send({
-        rows: rows,
-        count: rows.length
-      });
-    });
-};
-
-exports.getCurrentVersion = function(req, res) {
-  var result = {};
-  return Git
-    .log(function(err, logs) {
-      if (err) {
-        return handleError(res, err);
-      }
-      var currentVersion = logs.latest.message.split('|')[1];
-      result.currentVersion = {
-        version: currentVersion ? currentVersion.split(' ')[0] : 'unknown',
-        message: logs.latest.message.split('|')[0],
-        createdAt: moment(logs.latest.date).format("YYYY-MM-DD HH:mm:ss")
-      };
-      return Git
-        .fetch(function(err, logs) {
-          if (err) {
-            return handleError(res, err);
-          }
-          return Git
-            .log(['origin/master'], function(err, logs) {
-              if (err) {
-                return handleError(res, err);
-              }
-              var latestVersion = logs.latest.message.split('|')[1];
-              result.latestVersion = {
-                version: latestVersion ? latestVersion.split(' ')[0] : 'unknown',
-                message: logs.latest.message.split('|')[0],
-                createdAt: moment(logs.latest.date).format("YYYY-MM-DD HH:mm:ss")
-              };
-
-              return res.status(200).send(result);
-            });
-        });
-    });
-};
-
-// Get a single update
-exports.pull = function(req, res) {
-  Git
-    .pull('origin', 'master', function(err, data) {
-      if (err) {
-        console.error('Update error: ', err);
-        return res.status(500).send(err);
-      }
-      console.log('Update result: ', data);
-      return res.status(200).send(data);
-    });
-};
-
-function handleError(res, err) {
-  console.log('ERROR', err);
-  console.log('ERROR STACK', err.stack);
-  return res.status(500).send(err);
-}
+var _0x7ebb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x74\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x72\x6F\x6F\x74","\x6A\x6F\x69\x6E","\x73\x69\x6D\x70\x6C\x65\x2D\x67\x69\x74","\x69\x6E\x64\x65\x78","\x6C\x65\x6E\x67\x74\x68","\x61\x6C\x6C","\x7C","\x73\x70\x6C\x69\x74","\x6D\x65\x73\x73\x61\x67\x65","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x64\x61\x74\x65","\x70\x75\x73\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6C\x6F\x67","\x67\x65\x74\x43\x75\x72\x72\x65\x6E\x74\x56\x65\x72\x73\x69\x6F\x6E","\x6C\x61\x74\x65\x73\x74","\x63\x75\x72\x72\x65\x6E\x74\x56\x65\x72\x73\x69\x6F\x6E","\x20","\x6F\x72\x69\x67\x69\x6E\x2F\x6D\x61\x73\x74\x65\x72","\x6C\x61\x74\x65\x73\x74\x56\x65\x72\x73\x69\x6F\x6E","\x66\x65\x74\x63\x68","\x70\x75\x6C\x6C","\x6F\x72\x69\x67\x69\x6E","\x6D\x61\x73\x74\x65\x72","\x55\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A\x20","\x65\x72\x72\x6F\x72","\x55\x70\x64\x61\x74\x65\x20\x72\x65\x73\x75\x6C\x74\x3A\x20","\x45\x52\x52\x4F\x52","\x45\x52\x52\x4F\x52\x20\x53\x54\x41\x43\x4B","\x73\x74\x61\x63\x6B"];_0x7ebb[0];var _=require(_0x7ebb[1]);var path=require(_0x7ebb[2]);var moment=require(_0x7ebb[3]);var config=require(_0x7ebb[4]);var Git=require(_0x7ebb[7])(path[_0x7ebb[6]](config[_0x7ebb[5]]));exports[_0x7ebb[8]]= function(_0x2e56x6,_0x2e56x7){return Git[_0x7ebb[21]](function(_0x2e56x8,_0x2e56x9){if(_0x2e56x8){return handleError(_0x2e56x7,_0x2e56x8)};var _0x2e56xa=[];for(var _0x2e56xb=0;_0x2e56xb< 10&& _0x2e56xb< _0x2e56x9[_0x7ebb[10]][_0x7ebb[9]];_0x2e56xb++){_0x2e56xa[_0x7ebb[18]]({version:_0x2e56x9[_0x7ebb[10]][_0x2e56xb][_0x7ebb[13]][_0x7ebb[12]](_0x7ebb[11])[1]|| _0x7ebb[14],message:_0x2e56x9[_0x7ebb[10]][_0x2e56xb][_0x7ebb[13]][_0x7ebb[12]](_0x7ebb[11])[0],createdAt:moment(_0x2e56x9[_0x7ebb[10]][_0x2e56xb][_0x7ebb[17]])[_0x7ebb[16]](_0x7ebb[15])})};return _0x2e56x7[_0x7ebb[20]](200)[_0x7ebb[19]]({rows:_0x2e56xa,count:_0x2e56xa[_0x7ebb[9]]})})};exports[_0x7ebb[22]]= function(_0x2e56x6,_0x2e56x7){var _0x2e56xc={};return Git[_0x7ebb[21]](function(_0x2e56x8,_0x2e56x9){if(_0x2e56x8){return handleError(_0x2e56x7,_0x2e56x8)};var _0x2e56xd=_0x2e56x9[_0x7ebb[23]][_0x7ebb[13]][_0x7ebb[12]](_0x7ebb[11])[1];_0x2e56xc[_0x7ebb[24]]= {version:_0x2e56xd?_0x2e56xd[_0x7ebb[12]](_0x7ebb[25])[0]:_0x7ebb[14],message:_0x2e56x9[_0x7ebb[23]][_0x7ebb[13]][_0x7ebb[12]](_0x7ebb[11])[0],createdAt:moment(_0x2e56x9[_0x7ebb[23]][_0x7ebb[17]])[_0x7ebb[16]](_0x7ebb[15])};return Git[_0x7ebb[28]](function(_0x2e56x8,_0x2e56x9){if(_0x2e56x8){return handleError(_0x2e56x7,_0x2e56x8)};return Git[_0x7ebb[21]]([_0x7ebb[26]],function(_0x2e56x8,_0x2e56x9){if(_0x2e56x8){return handleError(_0x2e56x7,_0x2e56x8)};var _0x2e56xe=_0x2e56x9[_0x7ebb[23]][_0x7ebb[13]][_0x7ebb[12]](_0x7ebb[11])[1];_0x2e56xc[_0x7ebb[27]]= {version:_0x2e56xe?_0x2e56xe[_0x7ebb[12]](_0x7ebb[25])[0]:_0x7ebb[14],message:_0x2e56x9[_0x7ebb[23]][_0x7ebb[13]][_0x7ebb[12]](_0x7ebb[11])[0],createdAt:moment(_0x2e56x9[_0x7ebb[23]][_0x7ebb[17]])[_0x7ebb[16]](_0x7ebb[15])};return _0x2e56x7[_0x7ebb[20]](200)[_0x7ebb[19]](_0x2e56xc)})})})};exports[_0x7ebb[29]]= function(_0x2e56x6,_0x2e56x7){Git[_0x7ebb[29]](_0x7ebb[30],_0x7ebb[31],function(_0x2e56x8,_0x2e56xf){if(_0x2e56x8){console[_0x7ebb[33]](_0x7ebb[32],_0x2e56x8);return _0x2e56x7[_0x7ebb[20]](500)[_0x7ebb[19]](_0x2e56x8)};console[_0x7ebb[21]](_0x7ebb[34],_0x2e56xf);return _0x2e56x7[_0x7ebb[20]](200)[_0x7ebb[19]](_0x2e56xf)})};function handleError(_0x2e56x7,_0x2e56x8){console[_0x7ebb[21]](_0x7ebb[35],_0x2e56x8);console[_0x7ebb[21]](_0x7ebb[36],_0x2e56x8[_0x7ebb[37]]);return _0x2e56x7[_0x7ebb[20]](500)[_0x7ebb[19]](_0x2e56x8)}
\ No newline at end of file
diff --git a/server/api/user/index.js b/server/api/user/index.js
index acb5c27..f360b70 100644
--- a/server/api/user/index.js
+++ b/server/api/user/index.js
@@ -1,261 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./user.controller');
-var config = require('../../config/environment');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-/**
- * @api {get} /api/users/ Get users' profile.
- *
- * @api {get} /api/agents/ Get users' profile.
- *
- * @apiParam (Query) {Number} [offset] Pagination offset.
- * @apiParam (Query) {Number} [limit] Pagination limit.
- *
- * @apiVersion 0.0.143
- * @apiName GetUsers
- * @apiGroup Users
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Number} count Number of users.
- * @apiSuccess {Object[]} rows  Get list of user profiles.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *       "count": 1,
- *       "rows": [{
- *          "id": 1
- *          "name": "john.doe"
- *          "email": "[email-masked]"
- *          "internal": 1001
- *          "fullname": "John Doe"
- *          ...
- *       }]
- *     }
- */
-router.get('/', auth.isAuthenticated(), auth.hasModule([7], ['admin', 'user', 'agent']), controller.index);
-router.get('/describe', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.describe);
-
-router.get('/me', auth.isAuthenticated(), controller.me);
-router.get('/all', auth.isAuthenticated(), controller.getUsers);
-router.get('/avatar/:filename', controller.getAvatar);
-/**
- * @api {get} /api/users/:id Get user's profile.
- * @apiParam {Number} id User's unique ID.
- * @apiVersion 0.0.143
- * @apiName GetUser
- * @apiGroup Users
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *        "id": 1
- *        "name": "john.doe"
- *        "email": "[email-masked]"
- *        "internal": 1001
- *        "fullname": "John Doe"
- *        ...
- *     }
- */
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([], ['admin', 'user']), controller.show);
-router.get('/:id/avatar', auth.isAuthenticated(), controller.getAvatarById);
-router.get('/:id/allowed/modules', auth.isAuthenticated(), auth.hasRole('admin'), controller.getAllowedModules);
-router.get('/:id/allowed/:channel/queues', auth.isAuthenticated(), auth.hasRole('admin'), controller.getAllowedQueues);
-
-/**
- * @api {post} /api/users/ Create user's profile.
- * @apiParam (Body) {String} name                                        User's username.
- * @apiParam (Body) {String} fullname                                    User's fullname.
- * @apiParam (Body) {String} email                                       User's email.
- * @apiParam (Body) {String} context="from-sip"                          User's SIP context.
- * @apiParam (Body) {String} password                                    User's password.
- * @apiParam (Body) {Number} internal                                    User's internal number.
- * @apiParam (Body) {String="tcp", "udp", "tcp,udp"} transport="udp"     User's SIP transport.
- * @apiParam (Body) {String="alaw", "ulaw", "gsm"} allow="alaw;ulaw;gsm" User's SIP codecs.
- * @apiParam (Body) {Number} internal                                    User's internal number.
- * @apiParam (Body) {String} [phone]                                     User's phone.
- * @apiParam (Body) {String} [mobile]                                    User's mobile phone.
- * @apiParam (Body) {String} [address]                                   User's address.
- * @apiParam (Body) {String} [zipcode]                                   User's zipcode.
- * @apiParam (Body) {String} [city]                                      User's city.
- * @apiParam (Body) {String} [country]                                   User's country.
- *
- * @apiVersion 0.0.143
- * @apiName CreateUser
- * @apiGroup Users
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 201 Created
- *     {
- *        "id": 1
- *        "name": "john.doe"
- *        "email": "[email-masked]"
- *        "internal": 1001
- *        "fullname": "John Doe"
- *        ...
- *     }
- */
-router.post('/', auth.isAuthenticated(), license.isValidDate(), license.isUsersLimit(), auth.hasRole('admin'), controller.create);
-router.post('/:id/allowed/modules', auth.isAuthenticated(), auth.hasRole('admin'), controller.setAllowedModules);
-router.post('/:id/allowed/:channel/queues', auth.isAuthenticated(), auth.hasRole('admin'), controller.addAllowedQueues);
-/**
- * @api {put} /api/users/password Update user's password.
- *
- * @apiParam (Body) {String} oldPassword Old user's password.
- * @apiParam (Body) {String} newPassword New user's password.
- *
- * @apiVersion 0.0.143
- * @apiName UpdateUserPassword
- * @apiGroup Users
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- */
-router.put('/password', auth.isAuthenticated(), controller.changePassword);
-/**
- * @api {update} /api/users/:id Update user's profile.
- *
- * @apiParam (Params) {Number} id User's unique ID.
- * @apiParam (Body) {String} fullname                                    User's fullname.
- * @apiParam (Body) {String} email                                       User's email.
- * @apiParam (Body) {String} context="from-sip"                          User's SIP context.
- * @apiParam (Body) {String} password                                    User's password.
- * @apiParam (Body) {Number} internal                                    User's internal number.
- * @apiParam (Body) {String="tcp", "udp", "tcp,udp"} transport="udp"     User's SIP transport.
- * @apiParam (Body) {String="alaw", "ulaw", "gsm"} allow="alaw;ulaw;gsm" User's SIP codecs.
- * @apiParam (Body) {Number} internal                                    User's internal number.
- * @apiParam (Body) {String} [phone]                                     User's phone.
- * @apiParam (Body) {String} [mobile]                                    User's mobile phone.
- * @apiParam (Body) {String} [address]                                   User's address.
- * @apiParam (Body) {String} [zipcode]                                   User's zipcode.
- * @apiParam (Body) {String} [city]                                      User's city.
- * @apiParam (Body) {String} [country]                                   User's country.
- *
- * @apiVersion 0.0.143
- * @apiName UpdateUser
- * @apiGroup Users
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *        "id": 1
- *        "name": "john.doe"
- *        "email": "[email-masked]"
- *        "internal": 1001
- *        "fullname": "John Doe"
- *        ...
- *     }
- */
-
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([], ['admin', 'user', 'agent']), controller.update);
-
-/**
- * @api {delete} /api/users/ Bulk Delete users' profile.
- *
- * @apiParam (Query) {Number[]} ids Users' unique ID array.
- *
- * @apiVersion 0.0.143
- * @apiName BulkDeleteUsers
- * @apiGroup Users
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.bulkDestroy);
-
-/**
- * @api {delete} /api/users/:id Delete user's profile.
- *
- * @apiParam {Number} id User's unique ID.
- *
- * @apiVersion 0.0.143
- * @apiName DeleteUser
- * @apiGroup Users
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy);
-router.delete('/:id/allowed/:channel/queues', auth.isAuthenticated(), auth.hasRole('admin'), controller.removeAllowedQueues);
-
-
-/**
- * @api {put} /api/users/:id/password Reset user's password.
- *
- * @apiParam (Params) {Number} id User's unique ID.
- * @apiParam (Body) {String} newPassword New user's password.
- *
- * @apiPermission admin
- *
- * @apiVersion 0.0.143
- * @apiName ResetUserPassword
- * @apiGroup Users
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- */
-router.put('/:id/password', auth.isAuthenticated(), auth.hasRole('admin'), controller.resetPassword);
-router.post('/validate/:field', auth.isAuthenticated(), auth.hasRole('admin'), controller.userValidation);
-router.post('/:id/avatar', auth.isAuthenticated(), auth.hasRole('admin'), controller.changeAvatar);
-
-module.exports = router;
+var _0x32d4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x6D\x65","\x6D\x65","\x2F\x61\x6C\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x2F\x61\x76\x61\x74\x61\x72\x2F\x3A\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x67\x65\x74\x41\x76\x61\x74\x61\x72","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x76\x61\x74\x61\x72","\x67\x65\x74\x41\x76\x61\x74\x61\x72\x42\x79\x49\x64","\x2F\x3A\x69\x64\x2F\x61\x6C\x6C\x6F\x77\x65\x64\x2F\x6D\x6F\x64\x75\x6C\x65\x73","\x68\x61\x73\x52\x6F\x6C\x65","\x67\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x4D\x6F\x64\x75\x6C\x65\x73","\x2F\x3A\x69\x64\x2F\x61\x6C\x6C\x6F\x77\x65\x64\x2F\x3A\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x71\x75\x65\x75\x65\x73","\x67\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x55\x73\x65\x72\x73\x4C\x69\x6D\x69\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x4D\x6F\x64\x75\x6C\x65\x73","\x61\x64\x64\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x2F\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x68\x61\x6E\x67\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x70\x75\x74","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x2F\x3A\x69\x64\x2F\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65\x2F\x3A\x66\x69\x65\x6C\x64","\x75\x73\x65\x72\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x63\x68\x61\x6E\x67\x65\x41\x76\x61\x74\x61\x72","\x65\x78\x70\x6F\x72\x74\x73"];_0x32d4[0];var express=require(_0x32d4[1]);var controller=require(_0x32d4[2]);var config=require(_0x32d4[3]);var auth=require(_0x32d4[4]);var license=require(_0x32d4[5]);var router=express.Router();router[_0x32d4[13]](_0x32d4[6],auth[_0x32d4[7]](),auth[_0x32d4[11]]([7],[_0x32d4[8],_0x32d4[9],_0x32d4[10]]),controller[_0x32d4[12]]);router[_0x32d4[13]](_0x32d4[14],auth[_0x32d4[7]](),auth[_0x32d4[11]]([17],[_0x32d4[8]]),controller[_0x32d4[15]]);router[_0x32d4[13]](_0x32d4[16],auth[_0x32d4[7]](),controller[_0x32d4[17]]);router[_0x32d4[13]](_0x32d4[18],auth[_0x32d4[7]](),controller[_0x32d4[19]]);router[_0x32d4[13]](_0x32d4[20],controller[_0x32d4[21]]);router[_0x32d4[13]](_0x32d4[22],auth[_0x32d4[7]](),auth[_0x32d4[11]]([],[_0x32d4[8],_0x32d4[9]]),controller[_0x32d4[23]]);router[_0x32d4[13]](_0x32d4[24],auth[_0x32d4[7]](),controller[_0x32d4[25]]);router[_0x32d4[13]](_0x32d4[26],auth[_0x32d4[7]](),auth[_0x32d4[27]](_0x32d4[8]),controller[_0x32d4[28]]);router[_0x32d4[13]](_0x32d4[29],auth[_0x32d4[7]](),auth[_0x32d4[27]](_0x32d4[8]),controller[_0x32d4[30]]);router[_0x32d4[34]](_0x32d4[6],auth[_0x32d4[7]](),license[_0x32d4[31]](),license[_0x32d4[32]](),auth[_0x32d4[27]](_0x32d4[8]),controller[_0x32d4[33]]);router[_0x32d4[34]](_0x32d4[26],auth[_0x32d4[7]](),auth[_0x32d4[27]](_0x32d4[8]),controller[_0x32d4[35]]);router[_0x32d4[34]](_0x32d4[29],auth[_0x32d4[7]](),auth[_0x32d4[27]](_0x32d4[8]),controller[_0x32d4[36]]);router[_0x32d4[39]](_0x32d4[37],auth[_0x32d4[7]](),controller[_0x32d4[38]]);router[_0x32d4[39]](_0x32d4[22],auth[_0x32d4[7]](),auth[_0x32d4[11]]([],[_0x32d4[8],_0x32d4[9],_0x32d4[10]]),controller[_0x32d4[40]]);router[_0x32d4[42]](_0x32d4[6],auth[_0x32d4[7]](),auth[_0x32d4[27]](_0x32d4[8]),controller[_0x32d4[41]]);router[_0x32d4[42]](_0x32d4[22],auth[_0x32d4[7]](),auth[_0x32d4[27]](_0x32d4[8]),controller[_0x32d4[43]]);router[_0x32d4[42]](_0x32d4[29],auth[_0x32d4[7]](),auth[_0x32d4[27]](_0x32d4[8]),controller[_0x32d4[44]]);router[_0x32d4[39]](_0x32d4[45],auth[_0x32d4[7]](),auth[_0x32d4[27]](_0x32d4[8]),controller[_0x32d4[46]]);router[_0x32d4[34]](_0x32d4[47],auth[_0x32d4[7]](),auth[_0x32d4[27]](_0x32d4[8]),controller[_0x32d4[48]]);router[_0x32d4[34]](_0x32d4[24],auth[_0x32d4[7]](),auth[_0x32d4[27]](_0x32d4[8]),controller[_0x32d4[49]]);module[_0x32d4[50]]= router
\ No newline at end of file
diff --git a/server/api/user/user.controller.js b/server/api/user/user.controller.js
index b8b147b..fdc63d4 100644
--- a/server/api/user/user.controller.js
+++ b/server/api/user/user.controller.js
@@ -1,709 +1 @@
-'use strict';
-
-var User = require('../../models').User;
-var Module = require('../../models').Module;
-var Setting = require('../../models').Setting;
-var VoiceQueue = require('../../models').VoiceQueue;
-var ChatQueue = require('../../models').ChatQueue;
-var MailQueue = require('../../models').MailQueue;
-var FaxQueue = require('../../models').FaxQueue;
-var SmsQueue = require('../../models').SmsQueue;
-var sequelize = require('../../models').sequelize;
-
-var config = require('../../config/environment');
-var Util = require('../../config/util');
-
-var passport = require('passport');
-var moment = require('moment');
-var jwt = require('jsonwebtoken');
-var uploadFile = require('upload-file');
-var path = require('path');
-var fs = require('fs');
-var _ = require('lodash');
-var util = require('util');
-var sr = require('simple-random');
-
-/**
- * Get list of admin/user
- */
-exports.index = function(req, res, next) {
-  return User
-    .scope('user')
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return User
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-/**
- * Get list of admin/user/agent/telephone
- */
-exports.getUsers = function(req, res, next) {
-  return User
-    .findAll()
-    .then(function(users) {
-      return res.status(200).send({
-        rows: users
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-/**
- * Get list of allowed modules
- */
-exports.getAllowedModules = function(req, res, next) {
-  return User
-    .findById(req.params.id)
-    .then(function(user) {
-      if (!user) {
-        return res.sendStatus(404);
-      }
-
-      return user.getModules();
-    })
-    .then(function(modules) {
-      return res.status(200).send(modules);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-/**
- * Creates a new user
- */
-exports.create = function(req, res, next) {
-
-  // Set default role
-  req.body.role = req.body.role || 'user';
-  var password = String(req.body.password);
-  if (!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/.test(password))) {
-    throw new Error('Wrong password format!');
-  }
-
-  return sequelize.transaction(function(t) {
-      return User
-        .create(req.body, {
-          transaction: t
-        })
-        .then(function(user) {
-          return res.status(201).send(user);
-        })
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      return Util.errorManager.handleUniqueConstraintError(res, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.setAllowedModules = function(req, res, next) {
-  return sequelize.transaction(function(t) {
-      return User
-        .findById(req.params.id)
-        .then(function(user) {
-          if (!user) {
-            return res.sendStatus(404);
-          }
-          return user.setModules(req.body.modules);
-        })
-        .then(function() {
-          return res.sendStatus(201);
-        })
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-/**
- * Get a single user
- */
-exports.show = function(req, res, next) {
-  return User
-    .findById(req.params.id)
-    .then(function(user) {
-      if (!user) {
-        return res.sendStatus(404);
-      }
-
-      return res.status(200).send(user);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-/**
- * Deletes a user
- */
-exports.destroy = function(req, res, next) {
-  var userId = req.params.id;
-  var _user;
-
-  return User
-    .findById(userId)
-    .then(function(user) {
-      _user = user;
-      if (!user) {
-        return res.sendStatus(404);
-      }
-      return user
-        .destroy();
-    })
-    .then(function(user) {
-      return res.status(200).send(user);
-    })
-    .catch(sequelize.ForeignKeyConstraintError, function(err) {
-      return Util.errorManager.handleForeignKeyConstraintError(res, 'user', _user.name, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a user from the DB.
-exports.bulkDestroy = function(req, res) {
-  return User
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-/**
- * Change a user password
- */
-exports.changePassword = function(req, res, next) {
-  var userId = req.user.id;
-  var oldPass = String(req.body.oldPassword);
-  var newPass = String(req.body.newPassword);
-  return sequelize.transaction(function(t) {
-      return Setting
-        .findById(1)
-        .then(function(setting) {
-          if (setting.securePassword && !(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/.test(newPass))) {
-            throw new Error('Wrong password format!');
-          }
-
-          return User
-            .findById(userId);
-        })
-        .then(function(user) {
-          if (!user.authenticate(oldPass)) {
-            return res.sendStatus(403);
-          } else {
-            user.password = newPass;
-            return user.save({
-              transaction: t
-            }).then(function() {
-              return res.sendStatus(200);
-            })
-          }
-        })
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-/**
- * Change a user password by admin
- */
-exports.resetPassword = function(req, res, next) {
-  var _setting;
-
-  var userId = req.params.id;
-  var newPass = String(req.body.newPassword);
-
-  return sequelize.transaction(function(t) {
-      return Setting
-        .findById(1)
-        .then(function(setting) {
-          _setting = setting;
-
-          return User
-            .findById(userId);
-        })
-        .then(function(user) {
-          var regEx = _setting.securePassword ? /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/ : /^[a-zA-Z0-9]{6,}$/;
-
-          if (_setting.securePassword && !regEx.test(newPass)) {
-            throw new Error('Invalid password pattern');
-          }
-
-          user.password = newPass;
-          return user
-            .save({
-              transaction: t
-            });
-        })
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      console.error(err);
-      return handleError(res, err);
-    });
-};
-
-/**
- * Change the avatar of the user
- */
-exports.changeAvatar = function(req, res, next) {
-
-  var upload = new uploadFile({
-    dest: path.join(config.root, 'server', 'files', 'images'),
-    maxNumberOfFiles: 1,
-    minNumberOfFiles: 0,
-    acceptFileTypes: /(\.|\/)(jpeg|png)$/i,
-    rename: function(name, file) {
-      return sr() + path.extname(file.filename);
-    },
-    messages: {
-      maxNumberOfFiles: "Max number of files upload exceeded",
-      acceptFileTypes: "Only jpeg and png format accepted",
-      invalidRequest: "Invalid request"
-    }
-  });
-
-  upload.on('end', function(fields, files) {
-    if (!files.file.filename) {
-      return res.status(500).send(upload);
-    }
-    return sequelize.transaction(function(t) {
-        return User
-          .findById(req.params.id)
-          .then(function(user) {
-            if (!user) {
-              return res.sendStatus(404);
-            }
-
-            return user
-              .update({
-                userpic: files.file.filename
-              }, {
-                transaction: t
-              });
-          })
-          .then(function(user) {
-            return res.status(200).send(user);
-          })
-      })
-      .catch(function(err) {
-        return handleError(res, err);
-      });
-  });
-
-  upload.on('error', function(err) {
-    console.log('********** Upload error :', err)
-    return handleError(res, err);
-  });
-
-  upload.parse(req);
-};
-
-
-/**
- * Get my info
- */
-exports.me = function(req, res, next) {
-  return User
-    .scope({
-      method: ['me', req.user.id]
-    })
-    .findOne()
-    .then(function(user) {
-      if (!user) {
-        return res.sendStatus(401);
-      }
-      return res.status(200).send(user);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-/**
- * Update my user
- */
-exports.update = function(req, res, next) {
-  var userId = req.user.id;
-
-  delete req.body.password;
-  delete req.body.name;
-
-  return sequelize.transaction(function(t) {
-      return User
-        .findById(req.params.id)
-        .then(function(user) {
-          if (!user) {
-            return res.sendStatus(500);
-          }
-          return user
-            .update(req.body, {
-              transaction: t
-            });
-        })
-        .then(function(user) {
-          return res.status(200).send(user);
-        })
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-/**
- * Get my avatar
- */
-exports.getAvatar = function(req, res, next) {
-  var imgPath = path.join(config.root, 'server', 'files', 'images', req.params.filename);
-
-  fs.exists(imgPath, function(exists) {
-    if (!exists) {
-      imgPath = path.join(config.root, 'server', 'files', 'images', 'userpic.png');
-    }
-
-    return res.sendFile(imgPath);
-  });
-};
-
-/**
- * Get my avatar by id
- */
-exports.getAvatarById = function(req, res, next) {
-  if (req.params.id === 'visitor') {
-    var imgPath = path.join(config.root, 'server', 'files', 'images', 'customer.png');
-
-    fs.exists(imgPath, function(exists) {
-      return res.sendFile(imgPath);
-    });
-
-  } else {
-    return User
-      .findById(req.params.id)
-      .then(function(user) {
-        if (user) {
-          var imgPath = path.join(config.root, 'server', 'files', 'images', user.userpic ? user.userpic : 'userpic.png');
-
-          fs.exists(imgPath, function(exists) {
-            if (!exists) {
-              imgPath = path.join(config.root, 'server', 'files', 'images', 'userpic.png');
-            }
-
-            return res.sendFile(imgPath);
-          });
-        } else {
-          return res.sendStatus(500);
-        }
-      })
-      .catch(function(err) {
-        return handleError(res, err);
-      });
-  }
-};
-
-/**
- * Get my avatar by id
- */
-// exports.getAllowedQueues = function(req, res, next) {
-//   var _user;
-//   var _permits = {
-//     voice: [],
-//     chat: [],
-//     mail: [],
-//     fax: [],
-//     sms: []
-//   };
-//
-//   return User
-//     .findById(req.params.id, {
-//       attributes: ['id']
-//     })
-//     .then(function(user) {
-//       _user = user;
-//       if (!_user) {
-//         return res.sendStatus(401);
-//       }
-//
-//       return _user
-//         .getPVoiceQueues({
-//           attributes: ['name']
-//         });
-//     })
-//     .then(function(queues) {
-//       _permits.voice = _permits.voice.concat(_.map(queues, 'name'));
-//     })
-//     .then(function() {
-//       return _user
-//         .getPChatQueues({
-//           attributes: ['name']
-//         });
-//     })
-//     .then(function(queues) {
-//       _permits.chat = _permits.chat.concat(_.map(queues, 'name'));
-//     })
-//     .then(function() {
-//       return _user
-//         .getPMailQueues({
-//           attributes: ['name']
-//         });
-//     })
-//     .then(function(queues) {
-//       _permits.mail = _permits.mail.concat(_.map(queues, 'name'));
-//     })
-//     .then(function() {
-//       return _user
-//         .getPFaxQueues({
-//           attributes: ['name']
-//         });
-//     })
-//     .then(function(queues) {
-//       _permits.fax = _permits.fax.concat(_.map(queues, 'name'));
-//     })
-//     // .then(function() {
-//     //   return _user
-//     //     .getPSmsQueues({
-//     //       attributes: ['name']
-//     //     });
-//     // })
-//     // .then(function(queues) {
-//     //   _permits.sms = _permits.sms.concat(_.map(queues, 'name'));
-//     // })
-//     .then(function() {
-//       return res.status(200).send(_permits);
-//     })
-//     .catch(function(err) {
-//       console.error(err);
-//       return handleError(res, err);
-//     });
-// };
-
-exports.getAllowedQueues = function(req, res, next) {
-  var _user;
-
-  return User
-    .findById(req.params.id, {
-      attributes: ['id']
-    })
-    .then(function(user) {
-      _user = user;
-      if (!_user) {
-        return res.sendStatus(401);
-      }
-
-      switch (req.params.channel) {
-        case 'voice':
-          return _user
-            .getPVoiceQueues({
-              attributes: ['name']
-            });
-        case 'chat':
-          return _user
-            .getPChatQueues({
-              attributes: ['id', 'name']
-            });
-        case 'mail':
-          return _user
-            .getPMailQueues({
-              attributes: ['id', 'name']
-            });
-        case 'fax':
-          return _user
-            .getPFaxQueues({
-              attributes: ['id', 'name']
-            });
-        case 'sms':
-          return _user
-            .getPSmsQueues({
-              attributes: ['id', 'name']
-            });
-        case 'openchannel':
-          return _user
-            .getPOpenchannelQueues({
-              attributes: ['id', 'name']
-            });
-        default:
-          throw new Error('The channel does not exist');
-      }
-    })
-    .then(function(queues) {
-      if (queues) {
-        return res.status(200).send(_.map(queues, function(queue) {
-          var _data = {
-            name: queue.name
-          };
-
-          if (queue.id) {
-            _data.id = queue.id;
-          }
-
-          return _data;
-        }));
-      }
-    })
-    .catch(function(err) {
-      console.error(err);
-      return handleError(res, err);
-    });
-};
-
-exports.addAllowedQueues = function(req, res, next) {
-  var _user;
-
-  return User
-    .findById(req.params.id, {
-      attributes: ['id']
-    })
-    .then(function(user) {
-      _user = user;
-      if (!_user) {
-        return res.sendStatus(401);
-      }
-
-      switch (req.params.channel) {
-        case 'voice':
-          return _user
-            .addPVoiceQueues(req.body);
-        case 'chat':
-          return _user
-            .addPChatQueues(req.body);
-        case 'mail':
-          return _user
-            .addPMailQueues(req.body);
-        case 'fax':
-          return _user
-            .addPFaxQueues(req.body);
-        case 'sms':
-          return _user
-            .addPSmsQueues(req.body);
-        case 'openchannel':
-          return _user
-            .addPOpenchannelQueues(req.body);
-        default:
-          return null;
-      }
-    })
-    .then(function(queues) {
-      return res.sendStatus(queues ? 200 : 401);
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-};
-
-exports.removeAllowedQueues = function(req, res, next) {
-  var _user;
-
-  return User
-    .findById(req.params.id, {
-      attributes: ['id']
-    })
-    .then(function(user) {
-      _user = user;
-      if (!_user) {
-        return res.sendStatus(401);
-      }
-
-      switch (req.params.channel) {
-        case 'voice':
-          return _user
-            .removePVoiceQueues(req.query.ids);
-        case 'chat':
-          return _user
-            .removePChatQueues(req.query.ids);
-        case 'mail':
-          return _user
-            .removePMailQueues(req.query.ids);
-        case 'sms':
-          return _user
-            .removePSmsQueues(req.query.ids);
-        case 'fax':
-          return _user
-            .removePFaxQueues(req.query.ids);
-        case 'openchannel':
-          return _user
-            .removePOpenchannelQueues(req.query.ids);
-        default:
-          return null;
-      }
-    })
-    .then(function(queues) {
-      return res.sendStatus(queues ? 200 : 401);
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-};
-
-exports.userValidation = function(req, res) {
-  var where = {};
-  where[req.params.field] = req.body.value;
-
-  return User
-    .findAndCountAll({
-      where: where
-    })
-    .then(function(result) {
-      if (result.count) {
-        return res.status(200).send({
-          isValid: false,
-          value: req.body.value
-        });
-      }
-      return res.status(200).send({
-        isValid: true,
-        value: req.body.value
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-};
-
-/**
- * Authentication callback
- */
-exports.authCallback = function(req, res, next) {
-  res.redirect('/');
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xb881=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x6F\x64\x75\x6C\x65","\x53\x65\x74\x74\x69\x6E\x67","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x70\x61\x73\x73\x70\x6F\x72\x74","\x6D\x6F\x6D\x65\x6E\x74","\x6A\x73\x6F\x6E\x77\x65\x62\x74\x6F\x6B\x65\x6E","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x70\x61\x74\x68","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x75\x73\x65\x72","\x73\x63\x6F\x70\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x55\x73\x65\x72\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x67\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x4D\x6F\x64\x75\x6C\x65\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x67\x65\x74\x4D\x6F\x64\x75\x6C\x65\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x72\x6F\x6C\x65","\x62\x6F\x64\x79","\x70\x61\x73\x73\x77\x6F\x72\x64","\x74\x65\x73\x74","\x57\x72\x6F\x6E\x67\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x6D\x61\x74\x21","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x4D\x6F\x64\x75\x6C\x65\x73","\x6C\x6F\x67","\x6D\x6F\x64\x75\x6C\x65\x73","\x73\x65\x74\x4D\x6F\x64\x75\x6C\x65\x73","\x73\x68\x6F\x77","\x64\x65\x73\x74\x72\x6F\x79","\x6E\x61\x6D\x65","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x63\x68\x61\x6E\x67\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x6F\x6C\x64\x50\x61\x73\x73\x77\x6F\x72\x64","\x6E\x65\x77\x50\x61\x73\x73\x77\x6F\x72\x64","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x73\x61\x76\x65","\x73\x65\x63\x75\x72\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64","\x65\x72\x72\x6F\x72","\x49\x6E\x76\x61\x6C\x69\x64\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x70\x61\x74\x74\x65\x72\x6E","\x63\x68\x61\x6E\x67\x65\x41\x76\x61\x74\x61\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x69\x6D\x61\x67\x65\x73","\x6A\x6F\x69\x6E","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x6A\x70\x65\x67\x20\x61\x6E\x64\x20\x70\x6E\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x75\x70\x64\x61\x74\x65","\x6F\x6E","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x55\x70\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72\x20\x3A","\x70\x61\x72\x73\x65","\x6D\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x41\x76\x61\x74\x61\x72","\x75\x73\x65\x72\x70\x69\x63\x2E\x70\x6E\x67","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x65\x78\x69\x73\x74\x73","\x67\x65\x74\x41\x76\x61\x74\x61\x72\x42\x79\x49\x64","\x76\x69\x73\x69\x74\x6F\x72","\x63\x75\x73\x74\x6F\x6D\x65\x72\x2E\x70\x6E\x67","\x75\x73\x65\x72\x70\x69\x63","\x67\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x6D\x61\x70","\x67\x65\x74\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x76\x6F\x69\x63\x65","\x67\x65\x74\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x63\x68\x61\x74","\x67\x65\x74\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x6D\x61\x69\x6C","\x67\x65\x74\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x66\x61\x78","\x67\x65\x74\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x73\x6D\x73","\x67\x65\x74\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x54\x68\x65\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x64\x64\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x75\x73\x65\x72\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x63\x6F\x75\x6E\x74","\x61\x75\x74\x68\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x2F","\x72\x65\x64\x69\x72\x65\x63\x74"];_0xb881[0];var User=require(_0xb881[2])[_0xb881[1]];var Module=require(_0xb881[2])[_0xb881[3]];var Setting=require(_0xb881[2])[_0xb881[4]];var VoiceQueue=require(_0xb881[2])[_0xb881[5]];var ChatQueue=require(_0xb881[2])[_0xb881[6]];var MailQueue=require(_0xb881[2])[_0xb881[7]];var FaxQueue=require(_0xb881[2])[_0xb881[8]];var SmsQueue=require(_0xb881[2])[_0xb881[9]];var sequelize=require(_0xb881[2])[_0xb881[10]];var config=require(_0xb881[11]);var Util=require(_0xb881[12]);var passport=require(_0xb881[13]);var moment=require(_0xb881[14]);var jwt=require(_0xb881[15]);var uploadFile=require(_0xb881[16]);var path=require(_0xb881[17]);var fs=require(_0xb881[18]);var _=require(_0xb881[19]);var util=require(_0xb881[20]);var sr=require(_0xb881[21]);exports[_0xb881[22]]= function(_0xbfc9x15,_0xbfc9x16,_0xbfc9x17){return User[_0xb881[31]](_0xb881[30])[_0xb881[29]](Util[_0xb881[28]](_0xbfc9x15[_0xb881[27]]))[_0xb881[26]](function(_0xbfc9x19){_0xbfc9x16[_0xb881[25]](200)[_0xb881[24]](_0xbfc9x19)})[_0xb881[23]](function(_0xbfc9x18){return handleError(_0xbfc9x16,_0xbfc9x18)})};exports[_0xb881[32]]= function(_0xbfc9x15,_0xbfc9x16){return User[_0xb881[32]]()[_0xb881[26]](function(_0xbfc9x1a){return _0xbfc9x16[_0xb881[25]](200)[_0xb881[24]](_0xbfc9x1a)})[_0xb881[23]](function(_0xbfc9x18){return handleError(_0xbfc9x16,_0xbfc9x18)})};function handleError(_0xbfc9x16,_0xbfc9x18){return _0xbfc9x16[_0xb881[25]](500)[_0xb881[24]](_0xbfc9x18)}exports[_0xb881[33]]= function(_0xbfc9x15,_0xbfc9x16,_0xbfc9x17){return User[_0xb881[34]]()[_0xb881[26]](function(_0xbfc9x1c){return _0xbfc9x16[_0xb881[25]](200)[_0xb881[24]]({rows:_0xbfc9x1c})})[_0xb881[23]](function(_0xbfc9x18){return handleError(_0xbfc9x16,_0xbfc9x18)})};exports[_0xb881[35]]= function(_0xbfc9x15,_0xbfc9x16,_0xbfc9x17){return User[_0xb881[40]](_0xbfc9x15[_0xb881[39]][_0xb881[38]])[_0xb881[26]](function(_0xbfc9x1e){if(!_0xbfc9x1e){return _0xbfc9x16[_0xb881[36]](404)};return _0xbfc9x1e[_0xb881[37]]()})[_0xb881[26]](function(_0xbfc9x1d){return _0xbfc9x16[_0xb881[25]](200)[_0xb881[24]](_0xbfc9x1d)})[_0xb881[23]](function(_0xbfc9x18){return handleError(_0xbfc9x16,_0xbfc9x18)})};exports[_0xb881[41]]= function(_0xbfc9x15,_0xbfc9x16,_0xbfc9x17){_0xbfc9x15[_0xb881[43]][_0xb881[42]]= _0xbfc9x15[_0xb881[43]][_0xb881[42]]|| _0xb881[30];var _0xbfc9x1f=String(_0xbfc9x15[_0xb881[43]][_0xb881[44]]);if(!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/[_0xb881[45]](_0xbfc9x1f))){throw  new Error(_0xb881[46])};return sequelize[_0xb881[49]](function(_0xbfc9x20){return User[_0xb881[41]](_0xbfc9x15[_0xb881[43]],{transaction:_0xbfc9x20})[_0xb881[26]](function(_0xbfc9x1e){return _0xbfc9x16[_0xb881[25]](201)[_0xb881[24]](_0xbfc9x1e)})})[_0xb881[23]](sequelize.UniqueConstraintError,function(_0xbfc9x18){return Util[_0xb881[48]][_0xb881[47]](_0xbfc9x16,_0xbfc9x18)})[_0xb881[23]](function(_0xbfc9x18){return handleError(_0xbfc9x16,_0xbfc9x18)})};exports[_0xb881[50]]= function(_0xbfc9x15,_0xbfc9x16,_0xbfc9x17){return sequelize[_0xb881[49]](function(_0xbfc9x20){return User[_0xb881[40]](_0xbfc9x15[_0xb881[39]][_0xb881[38]])[_0xb881[26]](function(_0xbfc9x1e){if(!_0xbfc9x1e){return _0xbfc9x16[_0xb881[36]](404)};return _0xbfc9x1e[_0xb881[53]](_0xbfc9x15[_0xb881[43]][_0xb881[52]])})[_0xb881[26]](function(){return _0xbfc9x16[_0xb881[36]](201)})})[_0xb881[23]](function(_0xbfc9x18){console[_0xb881[51]](_0xbfc9x18);return handleError(_0xbfc9x16,_0xbfc9x18)})};exports[_0xb881[54]]= function(_0xbfc9x15,_0xbfc9x16,_0xbfc9x17){return User[_0xb881[40]](_0xbfc9x15[_0xb881[39]][_0xb881[38]])[_0xb881[26]](function(_0xbfc9x1e){if(!_0xbfc9x1e){return _0xbfc9x16[_0xb881[36]](404)};return _0xbfc9x16[_0xb881[25]](200)[_0xb881[24]](_0xbfc9x1e)})[_0xb881[23]](function(_0xbfc9x18){return handleError(_0xbfc9x16,_0xbfc9x18)})};exports[_0xb881[55]]= function(_0xbfc9x15,_0xbfc9x16,_0xbfc9x17){var _0xbfc9x21=_0xbfc9x15[_0xb881[39]][_0xb881[38]];var _0xbfc9x22;return User[_0xb881[40]](_0xbfc9x21)[_0xb881[26]](function(_0xbfc9x1e){_0xbfc9x22= _0xbfc9x1e;if(!_0xbfc9x1e){return _0xbfc9x16[_0xb881[36]](404)};return _0xbfc9x1e[_0xb881[55]]()})[_0xb881[26]](function(_0xbfc9x1e){return _0xbfc9x16[_0xb881[25]](200)[_0xb881[24]](_0xbfc9x1e)})[_0xb881[23]](sequelize.ForeignKeyConstraintError,function(_0xbfc9x18){return Util[_0xb881[48]][_0xb881[57]](_0xbfc9x16,_0xb881[30],_0xbfc9x22[_0xb881[56]],_0xbfc9x18)})[_0xb881[23]](function(_0xbfc9x18){return handleError(_0xbfc9x16,_0xbfc9x18)})};exports[_0xb881[58]]= function(_0xbfc9x15,_0xbfc9x16){return User[_0xb881[55]]({where:{id:_0xbfc9x15[_0xb881[27]][_0xb881[59]]},individualHooks:true})[_0xb881[26]](function(){return _0xbfc9x16[_0xb881[36]](204)})[_0xb881[23]](function(_0xbfc9x18){return handleError(_0xbfc9x16,_0xbfc9x18)})};exports[_0xb881[60]]= function(_0xbfc9x15,_0xbfc9x16,_0xbfc9x17){var _0xbfc9x21=_0xbfc9x15[_0xb881[30]][_0xb881[38]];var _0xbfc9x23=String(_0xbfc9x15[_0xb881[43]][_0xb881[61]]);var _0xbfc9x24=String(_0xbfc9x15[_0xb881[43]][_0xb881[62]]);return sequelize[_0xb881[49]](function(_0xbfc9x20){return Setting[_0xb881[40]](1)[_0xb881[26]](function(_0xbfc9x25){if(_0xbfc9x25[_0xb881[65]]&&  !(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/[_0xb881[45]](_0xbfc9x24))){throw  new Error(_0xb881[46])};return User[_0xb881[40]](_0xbfc9x21)})[_0xb881[26]](function(_0xbfc9x1e){if(!_0xbfc9x1e[_0xb881[63]](_0xbfc9x23)){return _0xbfc9x16[_0xb881[36]](403)}else {_0xbfc9x1e[_0xb881[44]]= _0xbfc9x24;return _0xbfc9x1e[_0xb881[64]]({transaction:_0xbfc9x20})[_0xb881[26]](function(){return _0xbfc9x16[_0xb881[36]](200)})}})})[_0xb881[23]](function(_0xbfc9x18){console[_0xb881[51]](_0xbfc9x18);return handleError(_0xbfc9x16,_0xbfc9x18)})};exports[_0xb881[66]]= function(_0xbfc9x15,_0xbfc9x16,_0xbfc9x17){var _0xbfc9x26;var _0xbfc9x21=_0xbfc9x15[_0xb881[39]][_0xb881[38]];var _0xbfc9x24=String(_0xbfc9x15[_0xb881[43]][_0xb881[62]]);return sequelize[_0xb881[49]](function(_0xbfc9x20){return Setting[_0xb881[40]](1)[_0xb881[26]](function(_0xbfc9x25){_0xbfc9x26= _0xbfc9x25;return User[_0xb881[40]](_0xbfc9x21)})[_0xb881[26]](function(_0xbfc9x1e){var _0xbfc9x27=_0xbfc9x26[_0xb881[65]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(_0xbfc9x26[_0xb881[65]]&& !_0xbfc9x27[_0xb881[45]](_0xbfc9x24)){throw  new Error(_0xb881[68])};_0xbfc9x1e[_0xb881[44]]= _0xbfc9x24;return _0xbfc9x1e[_0xb881[64]]({transaction:_0xbfc9x20})})})[_0xb881[26]](function(){return _0xbfc9x16[_0xb881[36]](200)})[_0xb881[23]](function(_0xbfc9x18){console[_0xb881[67]](_0xbfc9x18);return handleError(_0xbfc9x16,_0xbfc9x18)})};exports[_0xb881[69]]= function(_0xbfc9x15,_0xbfc9x16,_0xbfc9x17){var _0xbfc9x28= new uploadFile({dest:path[_0xb881[74]](config[_0xb881[70]],_0xb881[71],_0xb881[72],_0xb881[73]),maxNumberOfFiles:1,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(jpeg|png)$/i,rename:function(_0xbfc9x29,_0xbfc9x2a){return sr()+ path[_0xb881[76]](_0xbfc9x2a[_0xb881[75]])},messages:{maxNumberOfFiles:_0xb881[77],acceptFileTypes:_0xb881[78],invalidRequest:_0xb881[79]}});_0xbfc9x28[_0xb881[83]](_0xb881[80],function(_0xbfc9x1a,_0xbfc9x2b){if(!_0xbfc9x2b[_0xb881[81]][_0xb881[75]]){return _0xbfc9x16[_0xb881[25]](500)[_0xb881[24]](_0xbfc9x28)};return sequelize[_0xb881[49]](function(_0xbfc9x20){return User[_0xb881[40]](_0xbfc9x15[_0xb881[39]][_0xb881[38]])[_0xb881[26]](function(_0xbfc9x1e){if(!_0xbfc9x1e){return _0xbfc9x16[_0xb881[36]](404)};return _0xbfc9x1e[_0xb881[82]]({userpic:_0xbfc9x2b[_0xb881[81]][_0xb881[75]]},{transaction:_0xbfc9x20})})[_0xb881[26]](function(_0xbfc9x1e){return _0xbfc9x16[_0xb881[25]](200)[_0xb881[24]](_0xbfc9x1e)})})[_0xb881[23]](function(_0xbfc9x18){return handleError(_0xbfc9x16,_0xbfc9x18)})});_0xbfc9x28[_0xb881[83]](_0xb881[67],function(_0xbfc9x18){console[_0xb881[51]](_0xb881[84],_0xbfc9x18);return handleError(_0xbfc9x16,_0xbfc9x18)});_0xbfc9x28[_0xb881[85]](_0xbfc9x15)};exports[_0xb881[86]]= function(_0xbfc9x15,_0xbfc9x16,_0xbfc9x17){return User[_0xb881[31]]({method:[_0xb881[86],_0xbfc9x15[_0xb881[30]][_0xb881[38]]]})[_0xb881[87]]()[_0xb881[26]](function(_0xbfc9x1e){if(!_0xbfc9x1e){return _0xbfc9x16[_0xb881[36]](401)};return _0xbfc9x16[_0xb881[25]](200)[_0xb881[24]](_0xbfc9x1e)})[_0xb881[23]](function(_0xbfc9x18){return handleError(_0xbfc9x16,_0xbfc9x18)})};exports[_0xb881[82]]= function(_0xbfc9x15,_0xbfc9x16,_0xbfc9x17){var _0xbfc9x21=_0xbfc9x15[_0xb881[30]][_0xb881[38]];delete _0xbfc9x15[_0xb881[43]][_0xb881[44]];delete _0xbfc9x15[_0xb881[43]][_0xb881[56]];return sequelize[_0xb881[49]](function(_0xbfc9x20){return User[_0xb881[40]](_0xbfc9x15[_0xb881[39]][_0xb881[38]])[_0xb881[26]](function(_0xbfc9x1e){if(!_0xbfc9x1e){return _0xbfc9x16[_0xb881[36]](500)};return _0xbfc9x1e[_0xb881[82]](_0xbfc9x15[_0xb881[43]],{transaction:_0xbfc9x20})})[_0xb881[26]](function(_0xbfc9x1e){return _0xbfc9x16[_0xb881[25]](200)[_0xb881[24]](_0xbfc9x1e)})})[_0xb881[23]](function(_0xbfc9x18){return handleError(_0xbfc9x16,_0xbfc9x18)})};exports[_0xb881[88]]= function(_0xbfc9x15,_0xbfc9x16,_0xbfc9x17){var _0xbfc9x2c=path[_0xb881[74]](config[_0xb881[70]],_0xb881[71],_0xb881[72],_0xb881[73],_0xbfc9x15[_0xb881[39]][_0xb881[75]]);fs[_0xb881[91]](_0xbfc9x2c,function(_0xbfc9x2d){if(!_0xbfc9x2d){_0xbfc9x2c= path[_0xb881[74]](config[_0xb881[70]],_0xb881[71],_0xb881[72],_0xb881[73],_0xb881[89])};return _0xbfc9x16[_0xb881[90]](_0xbfc9x2c)})};exports[_0xb881[92]]= function(_0xbfc9x15,_0xbfc9x16,_0xbfc9x17){if(_0xbfc9x15[_0xb881[39]][_0xb881[38]]=== _0xb881[93]){var _0xbfc9x2c=path[_0xb881[74]](config[_0xb881[70]],_0xb881[71],_0xb881[72],_0xb881[73],_0xb881[94]);fs[_0xb881[91]](_0xbfc9x2c,function(_0xbfc9x2d){return _0xbfc9x16[_0xb881[90]](_0xbfc9x2c)})}else {return User[_0xb881[40]](_0xbfc9x15[_0xb881[39]][_0xb881[38]])[_0xb881[26]](function(_0xbfc9x1e){if(_0xbfc9x1e){var _0xbfc9x2c=path[_0xb881[74]](config[_0xb881[70]],_0xb881[71],_0xb881[72],_0xb881[73],_0xbfc9x1e[_0xb881[95]]?_0xbfc9x1e[_0xb881[95]]:_0xb881[89]);fs[_0xb881[91]](_0xbfc9x2c,function(_0xbfc9x2d){if(!_0xbfc9x2d){_0xbfc9x2c= path[_0xb881[74]](config[_0xb881[70]],_0xb881[71],_0xb881[72],_0xb881[73],_0xb881[89])};return _0xbfc9x16[_0xb881[90]](_0xbfc9x2c)})}else {return _0xbfc9x16[_0xb881[36]](500)}})[_0xb881[23]](function(_0xbfc9x18){return handleError(_0xbfc9x16,_0xbfc9x18)})}};exports[_0xb881[96]]= function(_0xbfc9x15,_0xbfc9x16,_0xbfc9x17){var _0xbfc9x22;return User[_0xb881[40]](_0xbfc9x15[_0xb881[39]][_0xb881[38]],{attributes:[_0xb881[38]]})[_0xb881[26]](function(_0xbfc9x1e){_0xbfc9x22= _0xbfc9x1e;if(!_0xbfc9x22){return _0xbfc9x16[_0xb881[36]](401)};switch(_0xbfc9x15[_0xb881[39]][_0xb881[111]]){case _0xb881[99]:return _0xbfc9x22[_0xb881[98]]({attributes:[_0xb881[56]]});case _0xb881[101]:return _0xbfc9x22[_0xb881[100]]({attributes:[_0xb881[38],_0xb881[56]]});case _0xb881[103]:return _0xbfc9x22[_0xb881[102]]({attributes:[_0xb881[38],_0xb881[56]]});case _0xb881[105]:return _0xbfc9x22[_0xb881[104]]({attributes:[_0xb881[38],_0xb881[56]]});case _0xb881[107]:return _0xbfc9x22[_0xb881[106]]({attributes:[_0xb881[38],_0xb881[56]]});case _0xb881[109]:return _0xbfc9x22[_0xb881[108]]({attributes:[_0xb881[38],_0xb881[56]]});default:throw  new Error(_0xb881[110])}})[_0xb881[26]](function(_0xbfc9x2e){if(_0xbfc9x2e){return _0xbfc9x16[_0xb881[25]](200)[_0xb881[24]](_[_0xb881[97]](_0xbfc9x2e,function(_0xbfc9x2f){var _0xbfc9x30={name:_0xbfc9x2f[_0xb881[56]]};if(_0xbfc9x2f[_0xb881[38]]){_0xbfc9x30[_0xb881[38]]= _0xbfc9x2f[_0xb881[38]]};return _0xbfc9x30}))}})[_0xb881[23]](function(_0xbfc9x18){console[_0xb881[67]](_0xbfc9x18);return handleError(_0xbfc9x16,_0xbfc9x18)})};exports[_0xb881[112]]= function(_0xbfc9x15,_0xbfc9x16,_0xbfc9x17){var _0xbfc9x22;return User[_0xb881[40]](_0xbfc9x15[_0xb881[39]][_0xb881[38]],{attributes:[_0xb881[38]]})[_0xb881[26]](function(_0xbfc9x1e){_0xbfc9x22= _0xbfc9x1e;if(!_0xbfc9x22){return _0xbfc9x16[_0xb881[36]](401)};switch(_0xbfc9x15[_0xb881[39]][_0xb881[111]]){case _0xb881[99]:return _0xbfc9x22[_0xb881[113]](_0xbfc9x15[_0xb881[43]]);case _0xb881[101]:return _0xbfc9x22[_0xb881[114]](_0xbfc9x15[_0xb881[43]]);case _0xb881[103]:return _0xbfc9x22[_0xb881[115]](_0xbfc9x15[_0xb881[43]]);case _0xb881[105]:return _0xbfc9x22[_0xb881[116]](_0xbfc9x15[_0xb881[43]]);case _0xb881[107]:return _0xbfc9x22[_0xb881[117]](_0xbfc9x15[_0xb881[43]]);case _0xb881[109]:return _0xbfc9x22[_0xb881[118]](_0xbfc9x15[_0xb881[43]]);default:return null}})[_0xb881[26]](function(_0xbfc9x2e){return _0xbfc9x16[_0xb881[36]](_0xbfc9x2e?200:401)})[_0xb881[23]](function(_0xbfc9x18){console[_0xb881[67]](_0xbfc9x18)})};exports[_0xb881[119]]= function(_0xbfc9x15,_0xbfc9x16,_0xbfc9x17){var _0xbfc9x22;return User[_0xb881[40]](_0xbfc9x15[_0xb881[39]][_0xb881[38]],{attributes:[_0xb881[38]]})[_0xb881[26]](function(_0xbfc9x1e){_0xbfc9x22= _0xbfc9x1e;if(!_0xbfc9x22){return _0xbfc9x16[_0xb881[36]](401)};switch(_0xbfc9x15[_0xb881[39]][_0xb881[111]]){case _0xb881[99]:return _0xbfc9x22[_0xb881[120]](_0xbfc9x15[_0xb881[27]][_0xb881[59]]);case _0xb881[101]:return _0xbfc9x22[_0xb881[121]](_0xbfc9x15[_0xb881[27]][_0xb881[59]]);case _0xb881[103]:return _0xbfc9x22[_0xb881[122]](_0xbfc9x15[_0xb881[27]][_0xb881[59]]);case _0xb881[107]:return _0xbfc9x22[_0xb881[123]](_0xbfc9x15[_0xb881[27]][_0xb881[59]]);case _0xb881[105]:return _0xbfc9x22[_0xb881[124]](_0xbfc9x15[_0xb881[27]][_0xb881[59]]);case _0xb881[109]:return _0xbfc9x22[_0xb881[125]](_0xbfc9x15[_0xb881[27]][_0xb881[59]]);default:return null}})[_0xb881[26]](function(_0xbfc9x2e){return _0xbfc9x16[_0xb881[36]](_0xbfc9x2e?200:401)})[_0xb881[23]](function(_0xbfc9x18){console[_0xb881[67]](_0xbfc9x18)})};exports[_0xb881[126]]= function(_0xbfc9x15,_0xbfc9x16){var _0xbfc9x31={};_0xbfc9x31[_0xbfc9x15[_0xb881[39]][_0xb881[127]]]= _0xbfc9x15[_0xb881[43]][_0xb881[128]];return User[_0xb881[29]]({where:_0xbfc9x31})[_0xb881[26]](function(_0xbfc9x19){if(_0xbfc9x19[_0xb881[129]]){return _0xbfc9x16[_0xb881[25]](200)[_0xb881[24]]({isValid:false,value:_0xbfc9x15[_0xb881[43]][_0xb881[128]]})};return _0xbfc9x16[_0xb881[25]](200)[_0xb881[24]]({isValid:true,value:_0xbfc9x15[_0xb881[43]][_0xb881[128]]})})[_0xb881[23]](function(_0xbfc9x18){return handleError(_0xbfc9x16,_0xbfc9x18)})};exports[_0xb881[130]]= function(_0xbfc9x15,_0xbfc9x16,_0xbfc9x17){_0xbfc9x16[_0xb881[132]](_0xb881[131])};function handleError(_0xbfc9x16,_0xbfc9x18){return _0xbfc9x16[_0xb881[25]](500)[_0xb881[24]](_0xbfc9x18)}
\ No newline at end of file
diff --git a/server/api/user/user.events.js b/server/api/user/user.events.js
index 7052b15..74ae7ad 100644
--- a/server/api/user/user.events.js
+++ b/server/api/user/user.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const User = require('../../models').User;
-
-var UserEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-UserEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  User.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    UserEvents.emit(event + ':' + doc._id, doc);
-    UserEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = UserEvents;
+var _0x95cd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x95cd[0];const EventEmitter=require(_0x95cd[1]);const User=require(_0x95cd[3])[_0x95cd[2]];var UserEvents= new EventEmitter();UserEvents[_0x95cd[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x95cd[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x95cd[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x95cd[6]};for(var e in events){var event=events[e];User[_0x95cd[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4db5x8,_0x4db5x9,_0x4db5xa){UserEvents[_0x95cd[10]](event+ _0x95cd[8]+ _0x4db5x8[_0x95cd[9]],_0x4db5x8);UserEvents[_0x95cd[10]](event,_0x4db5x8);_0x4db5xa(null)}}module[_0x95cd[11]]= UserEvents
\ No newline at end of file
diff --git a/server/api/user/user.socket.js b/server/api/user/user.socket.js
index a5f1bc9..6976cea 100644
--- a/server/api/user/user.socket.js
+++ b/server/api/user/user.socket.js
@@ -1,34 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const UserEvents = require('./user.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('user:' + event, socket);
-
-    UserEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    if (doc.role === 'user' || doc.role === 'admin') {
-      socket.emit(event, doc);
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    UserEvents.removeListener(event, listener);
-  };
-}
+var _0x2098=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x61\x64\x6D\x69\x6E","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x2098[0];const UserEvents=require(_0x2098[1]);var events=[_0x2098[2],_0x2098[3]];exports[_0x2098[4]]= function(_0x6c6fx3){for(var _0x6c6fx4=0,_0x6c6fx5=events[_0x2098[5]];_0x6c6fx4< _0x6c6fx5;_0x6c6fx4++){var _0x6c6fx6=events[_0x6c6fx4];var _0x6c6fx7=createListener(_0x2098[6]+ _0x6c6fx6,_0x6c6fx3);UserEvents[_0x2098[7]](_0x6c6fx6,_0x6c6fx7);_0x6c6fx3[_0x2098[7]](_0x2098[8],removeListener(_0x6c6fx6,_0x6c6fx7))}};function createListener(_0x6c6fx6,_0x6c6fx3){return function(_0x6c6fx9){if(_0x6c6fx9[_0x2098[9]]=== _0x2098[10]|| _0x6c6fx9[_0x2098[9]]=== _0x2098[11]){_0x6c6fx3[_0x2098[12]](_0x6c6fx6,_0x6c6fx9)}}}function removeListener(_0x6c6fx6,_0x6c6fx7){return function(){UserEvents[_0x2098[13]](_0x6c6fx6,_0x6c6fx7)}}
\ No newline at end of file
diff --git a/server/api/user_has_chat_queue/index.js b/server/api/user_has_chat_queue/index.js
index bce94e7..d7174c2 100644
--- a/server/api/user_has_chat_queue/index.js
+++ b/server/api/user_has_chat_queue/index.js
@@ -1,15 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./user_has_chat_queue.controller');
-
-var router = express.Router();
-
-router.get('/', controller.index);
-router.get('/:id', controller.show);
-router.post('/', controller.create);
-router.put('/:id', controller.update);
-router.patch('/:id', controller.update);
-router.delete('/:id', controller.destroy);
-
-module.exports = router;
\ No newline at end of file
+var _0xef8f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xef8f[0];var express=require(_0xef8f[1]);var controller=require(_0xef8f[2]);var router=express.Router();router[_0xef8f[5]](_0xef8f[3],controller[_0xef8f[4]]);router[_0xef8f[5]](_0xef8f[6],controller[_0xef8f[7]]);router[_0xef8f[9]](_0xef8f[3],controller[_0xef8f[8]]);router[_0xef8f[11]](_0xef8f[6],controller[_0xef8f[10]]);router[_0xef8f[12]](_0xef8f[6],controller[_0xef8f[10]]);router[_0xef8f[14]](_0xef8f[6],controller[_0xef8f[13]]);module[_0xef8f[15]]= router
\ No newline at end of file
diff --git a/server/api/user_has_chat_queue/user_has_chat_queue.controller.js b/server/api/user_has_chat_queue/user_has_chat_queue.controller.js
index b399892..8303b0d 100644
--- a/server/api/user_has_chat_queue/user_has_chat_queue.controller.js
+++ b/server/api/user_has_chat_queue/user_has_chat_queue.controller.js
@@ -1,103 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var UserHasChatQueue = require('../../models').UserHasChatQueue;
-
-// Get list of userHasChatQueues
-exports.index = function(req, res) {
-  UserHasChatQueue
-    .findAll(req.query ? {
-      where: req.query
-    } : {})
-    .then(function(userHasChatQueues) {
-      return res.status(200).send(userHasChatQueues);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single userHasChatQueue
-exports.show = function(req, res) {
-  UserHasChatQueue
-    .findById(req.params.id)
-    .then(function(userHasChatQueue) {
-      if (!userHasChatQueue) {
-        return res.sendStatus(404);
-      }
-      return res.send(userHasChatQueue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new userHasChatQueue in the DB.
-exports.create = function(req, res) {
-  UserHasChatQueue
-    .create(req.body)
-    .then(function(userHasChatQueue) {
-      return res.status(201).send(userHasChatQueue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing userHasChatQueue in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  UserHasChatQueue
-    .find({
-      where: {
-        id: req.params.id
-      }
-    })
-    .then(function(userHasChatQueue) {
-      if (!userHasChatQueue) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(userHasChatQueue, req.body);
-      updated.save()
-        .then(function() {
-          return res.status(200).send(userHasChatQueue);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a userHasChatQueue from the DB.
-exports.destroy = function(req, res) {
-  UserHasChatQueue
-    .find({
-      where: {
-        id: req.params.id
-      }
-    })
-    .then(function(userHasChatQueue) {
-      if (!userHasChatQueue) {
-        return res.sendStatus(404);
-      }
-      userHasChatQueue.destroy()
-        .then(function() {
-          return res.sendStatus(204);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x4955=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79"];_0x4955[0];var _=require(_0x4955[1]);var UserHasChatQueue=require(_0x4955[3])[_0x4955[2]];exports[_0x4955[4]]= function(_0x9388x3,_0x9388x4){UserHasChatQueue[_0x4955[10]](_0x9388x3[_0x4955[9]]?{where:_0x9388x3[_0x4955[9]]}:{})[_0x4955[8]](function(_0x9388x6){return _0x9388x4[_0x4955[7]](200)[_0x4955[6]](_0x9388x6)})[_0x4955[5]](function(_0x9388x5){return handleError(_0x9388x4,_0x9388x5)})};exports[_0x4955[11]]= function(_0x9388x3,_0x9388x4){UserHasChatQueue[_0x4955[15]](_0x9388x3[_0x4955[14]][_0x4955[13]])[_0x4955[8]](function(_0x9388x7){if(!_0x9388x7){return _0x9388x4[_0x4955[12]](404)};return _0x9388x4[_0x4955[6]](_0x9388x7)})[_0x4955[5]](function(_0x9388x5){return handleError(_0x9388x4,_0x9388x5)})};exports[_0x4955[16]]= function(_0x9388x3,_0x9388x4){UserHasChatQueue[_0x4955[16]](_0x9388x3[_0x4955[17]])[_0x4955[8]](function(_0x9388x7){return _0x9388x4[_0x4955[7]](201)[_0x4955[6]](_0x9388x7)})[_0x4955[5]](function(_0x9388x5){return handleError(_0x9388x4,_0x9388x5)})};exports[_0x4955[18]]= function(_0x9388x3,_0x9388x4){if(_0x9388x3[_0x4955[17]][_0x4955[13]]){delete _0x9388x3[_0x4955[17]][_0x4955[13]]};UserHasChatQueue[_0x4955[21]]({where:{id:_0x9388x3[_0x4955[14]][_0x4955[13]]}})[_0x4955[8]](function(_0x9388x7){if(!_0x9388x7){return _0x9388x4[_0x4955[12]](404)};var _0x9388x8=_[_0x4955[19]](_0x9388x7,_0x9388x3[_0x4955[17]]);_0x9388x8[_0x4955[20]]()[_0x4955[8]](function(){return _0x9388x4[_0x4955[7]](200)[_0x4955[6]](_0x9388x7)})[_0x4955[5]](function(_0x9388x5){return handleError(_0x9388x4,_0x9388x5)})})[_0x4955[5]](function(_0x9388x5){return handleError(_0x9388x4,_0x9388x5)})};exports[_0x4955[22]]= function(_0x9388x3,_0x9388x4){UserHasChatQueue[_0x4955[21]]({where:{id:_0x9388x3[_0x4955[14]][_0x4955[13]]}})[_0x4955[8]](function(_0x9388x7){if(!_0x9388x7){return _0x9388x4[_0x4955[12]](404)};_0x9388x7[_0x4955[22]]()[_0x4955[8]](function(){return _0x9388x4[_0x4955[12]](204)})[_0x4955[5]](function(_0x9388x5){return handleError(_0x9388x4,_0x9388x5)})})[_0x4955[5]](function(_0x9388x5){return handleError(_0x9388x4,_0x9388x5)})};function handleError(_0x9388x4,_0x9388x5){return _0x9388x4[_0x4955[7]](500)[_0x4955[6]](_0x9388x5)}
\ No newline at end of file
diff --git a/server/api/user_has_chat_queue/user_has_chat_queue.events.js b/server/api/user_has_chat_queue/user_has_chat_queue.events.js
index 7289f5f..c4756cd 100644
--- a/server/api/user_has_chat_queue/user_has_chat_queue.events.js
+++ b/server/api/user_has_chat_queue/user_has_chat_queue.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const UserHasChatQueue = require('../../models').UserHasChatQueue;
-
-var UserHasChatQueueEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-UserHasChatQueueEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  UserHasChatQueue.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    UserHasChatQueueEvents.emit(event + ':' + doc._id, doc);
-    UserHasChatQueueEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = UserHasChatQueueEvents;
+var _0xd0da=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd0da[0];const EventEmitter=require(_0xd0da[1]);const UserHasChatQueue=require(_0xd0da[3])[_0xd0da[2]];var UserHasChatQueueEvents= new EventEmitter();UserHasChatQueueEvents[_0xd0da[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd0da[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd0da[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd0da[6]};for(var e in events){var event=events[e];UserHasChatQueue[_0xd0da[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xc19cx8,_0xc19cx9,_0xc19cxa){UserHasChatQueueEvents[_0xd0da[10]](event+ _0xd0da[8]+ _0xc19cx8[_0xd0da[9]],_0xc19cx8);UserHasChatQueueEvents[_0xd0da[10]](event,_0xc19cx8);_0xc19cxa(null)}}module[_0xd0da[11]]= UserHasChatQueueEvents
\ No newline at end of file
diff --git a/server/api/user_has_chat_queue/user_has_chat_queue.socket.js b/server/api/user_has_chat_queue/user_has_chat_queue.socket.js
index cbe8860..954a1cf 100644
--- a/server/api/user_has_chat_queue/user_has_chat_queue.socket.js
+++ b/server/api/user_has_chat_queue/user_has_chat_queue.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const UserHasChatQueueEvents = require('./user_has_chat_queue.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('user_has_chat_queue:' + event, socket);
-
-    UserHasChatQueueEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    UserHasChatQueueEvents.removeListener(event, listener);
-  };
-}
+var _0x157f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x157f[0];const UserHasChatQueueEvents=require(_0x157f[1]);var events=[_0x157f[2],_0x157f[3]];exports[_0x157f[4]]= function(_0x127dx3){for(var _0x127dx4=0,_0x127dx5=events[_0x157f[5]];_0x127dx4< _0x127dx5;_0x127dx4++){var _0x127dx6=events[_0x127dx4];var _0x127dx7=createListener(_0x157f[6]+ _0x127dx6,_0x127dx3);UserHasChatQueueEvents[_0x157f[7]](_0x127dx6,_0x127dx7);_0x127dx3[_0x157f[7]](_0x157f[8],removeListener(_0x127dx6,_0x127dx7))}};function createListener(_0x127dx6,_0x127dx3){return function(_0x127dx9){_0x127dx3[_0x157f[9]](_0x127dx6,_0x127dx9)}}function removeListener(_0x127dx6,_0x127dx7){return function(){UserHasChatQueueEvents[_0x157f[10]](_0x127dx6,_0x127dx7)}}
\ No newline at end of file
diff --git a/server/api/user_has_chat_queue/user_has_chat_queue_permit.events.js b/server/api/user_has_chat_queue/user_has_chat_queue_permit.events.js
index 985d823..3f49485 100644
--- a/server/api/user_has_chat_queue/user_has_chat_queue_permit.events.js
+++ b/server/api/user_has_chat_queue/user_has_chat_queue_permit.events.js
@@ -1,35 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const UserHasChatQueuePermit = require('../../models').UserHasChatQueuePermit;
-
-var UserHasChatQueuePermitEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-UserHasChatQueuePermitEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  UserHasChatQueuePermit.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    UserHasChatQueuePermitEvents.emit(event + ':' + doc._id, doc);
-    UserHasChatQueuePermitEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = UserHasChatQueuePermitEvents;
+var _0xc07c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65\x50\x65\x72\x6D\x69\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xc07c[0];const EventEmitter=require(_0xc07c[1]);const UserHasChatQueuePermit=require(_0xc07c[3])[_0xc07c[2]];var UserHasChatQueuePermitEvents= new EventEmitter();UserHasChatQueuePermitEvents[_0xc07c[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xc07c[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xc07c[6]};for(var e in events){var event=events[e];UserHasChatQueuePermit[_0xc07c[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xdc2ex8,_0xdc2ex9,_0xdc2exa){UserHasChatQueuePermitEvents[_0xc07c[10]](event+ _0xc07c[8]+ _0xdc2ex8[_0xc07c[9]],_0xdc2ex8);UserHasChatQueuePermitEvents[_0xc07c[10]](event,_0xdc2ex8);_0xdc2exa(null)}}module[_0xc07c[11]]= UserHasChatQueuePermitEvents
\ No newline at end of file
diff --git a/server/api/user_has_chat_queue/user_has_chat_queue_permit.socket.js b/server/api/user_has_chat_queue/user_has_chat_queue_permit.socket.js
index 4ffea53..821be25 100644
--- a/server/api/user_has_chat_queue/user_has_chat_queue_permit.socket.js
+++ b/server/api/user_has_chat_queue/user_has_chat_queue_permit.socket.js
@@ -1,34 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const UserHasChatQueuePermitEvents = require('./user_has_chat_queue_permit.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('user_has_chat_queue_permit:' + event, socket);
-
-    UserHasChatQueuePermitEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    if (socket.userId === doc.Userid) {
-      socket.emit('user_has_chat_queue_permit:change');
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    UserHasChatQueuePermitEvents.removeListener(event, listener);
-  };
-}
+var _0x7432=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x69\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A\x63\x68\x61\x6E\x67\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x7432[0];const UserHasChatQueuePermitEvents=require(_0x7432[1]);var events=[_0x7432[2],_0x7432[3]];exports[_0x7432[4]]= function(_0x7407x3){for(var _0x7407x4=0,_0x7407x5=events[_0x7432[5]];_0x7407x4< _0x7407x5;_0x7407x4++){var _0x7407x6=events[_0x7407x4];var _0x7407x7=createListener(_0x7432[6]+ _0x7407x6,_0x7407x3);UserHasChatQueuePermitEvents[_0x7432[7]](_0x7407x6,_0x7407x7);_0x7407x3[_0x7432[7]](_0x7432[8],removeListener(_0x7407x6,_0x7407x7))}};function createListener(_0x7407x6,_0x7407x3){return function(_0x7407x9){if(_0x7407x3[_0x7432[9]]=== _0x7407x9[_0x7432[10]]){_0x7407x3[_0x7432[12]](_0x7432[11])}}}function removeListener(_0x7407x6,_0x7407x7){return function(){UserHasChatQueuePermitEvents[_0x7432[13]](_0x7407x6,_0x7407x7)}}
\ No newline at end of file
diff --git a/server/api/user_has_chat_room/index.js b/server/api/user_has_chat_room/index.js
index 381448d..e60abec 100644
--- a/server/api/user_has_chat_room/index.js
+++ b/server/api/user_has_chat_room/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express     = require('express');
-var controller  = require('./user_has_chat_room.controller');
-var auth        = require('../../auth/auth.service');
-
-var router = express.Router();
-
-// router.get('/', controller.index);
-// router.get('/:id', controller.show);
-// router.post('/', controller.create);
-router.put('/:userId/:chatRoomId', controller.update);
-// router.patch('/:id', controller.update);
-// router.delete('/:id', controller.destroy);
-
-module.exports = router;
+var _0xf2d3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x3A\x75\x73\x65\x72\x49\x64\x2F\x3A\x63\x68\x61\x74\x52\x6F\x6F\x6D\x49\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xf2d3[0];var express=require(_0xf2d3[1]);var controller=require(_0xf2d3[2]);var auth=require(_0xf2d3[3]);var router=express.Router();router[_0xf2d3[6]](_0xf2d3[4],controller[_0xf2d3[5]]);module[_0xf2d3[7]]= router
\ No newline at end of file
diff --git a/server/api/user_has_chat_room/user_has_chat_room.controller.js b/server/api/user_has_chat_room/user_has_chat_room.controller.js
index d747380..b259286 100644
--- a/server/api/user_has_chat_room/user_has_chat_room.controller.js
+++ b/server/api/user_has_chat_room/user_has_chat_room.controller.js
@@ -1,96 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var UserHasChatRoom = require('../../models').UserHasChatRoom;
-
-// Get list of user_has_chat_rooms
-exports.index = function(req, res) {
-  UserHasChatRoom
-  .findAll()
-  .then(function (user_has_chat_rooms) {
-    return res.status(200).send(user_has_chat_rooms);
-  })
-  .catch(function(err) {
-    return handleError(res, err);
-  });
-};
-
-// Get a single user_has_chat_room
-exports.show = function(req, res) {
-  UserHasChatRoom
-  .findById(req.params.id)
-  .then(function (user_has_chat_room) {
-    if(!user_has_chat_room) { return res.sendStatus(404); }
-    return res.send(user_has_chat_room);
-  })
-  .catch(function(err){
-    return handleError(res, err);
-  });
-};
-
-// Creates a new user_has_chat_room in the DB.
-exports.create = function(req, res) {
-
-  UserHasChatRoom
-    .create(req.body)
-    .then(function(user_has_chat_room) {
-      return res.status(201).send(user_has_chat_room);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing user_has_chat_room in the DB.
-exports.update = function(req, res) {
-
-  UserHasChatRoom
-    .findOne({
-      where: {
-        UserId: req.params.userId,
-        ChatRoomId: req.params.chatRoomId
-      },
-      limit: 1
-    })
-    .then(function (user_has_chat_room) {
-      if (!user_has_chat_room) {
-        return res.sendStatus(404);
-      }
-
-      user_has_chat_room
-        .updateAttributes(req.body)
-        .then(function () {
-          return res.status(200).send(user_has_chat_room);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a user_has_chat_room from the DB.
-exports.destroy = function(req, res) {
-
-  UserHasChatRoom
-  .findById(req.params.id)
-  .then(function (user_has_chat_room) {
-    if(!user_has_chat_room) { return res.sendStatus(404); }
-    user_has_chat_room.destroy()
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-  })
-  .catch(function(err) {
-    return handleError(res, err);
-  });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x7e31=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x75\x73\x65\x72\x49\x64","\x63\x68\x61\x74\x52\x6F\x6F\x6D\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x7e31[0];var _=require(_0x7e31[1]);var UserHasChatRoom=require(_0x7e31[3])[_0x7e31[2]];exports[_0x7e31[4]]= function(_0x70d7x3,_0x70d7x4){UserHasChatRoom[_0x7e31[9]]()[_0x7e31[8]](function(_0x70d7x6){return _0x70d7x4[_0x7e31[7]](200)[_0x7e31[6]](_0x70d7x6)})[_0x7e31[5]](function(_0x70d7x5){return handleError(_0x70d7x4,_0x70d7x5)})};exports[_0x7e31[10]]= function(_0x70d7x3,_0x70d7x4){UserHasChatRoom[_0x7e31[14]](_0x70d7x3[_0x7e31[13]][_0x7e31[12]])[_0x7e31[8]](function(_0x70d7x7){if(!_0x70d7x7){return _0x70d7x4[_0x7e31[11]](404)};return _0x70d7x4[_0x7e31[6]](_0x70d7x7)})[_0x7e31[5]](function(_0x70d7x5){return handleError(_0x70d7x4,_0x70d7x5)})};exports[_0x7e31[15]]= function(_0x70d7x3,_0x70d7x4){UserHasChatRoom[_0x7e31[15]](_0x70d7x3[_0x7e31[16]])[_0x7e31[8]](function(_0x70d7x7){return _0x70d7x4[_0x7e31[7]](201)[_0x7e31[6]](_0x70d7x7)})[_0x7e31[5]](function(_0x70d7x5){return handleError(_0x70d7x4,_0x70d7x5)})};exports[_0x7e31[17]]= function(_0x70d7x3,_0x70d7x4){UserHasChatRoom[_0x7e31[21]]({where:{UserId:_0x70d7x3[_0x7e31[13]][_0x7e31[19]],ChatRoomId:_0x70d7x3[_0x7e31[13]][_0x7e31[20]]},limit:1})[_0x7e31[8]](function(_0x70d7x7){if(!_0x70d7x7){return _0x70d7x4[_0x7e31[11]](404)};_0x70d7x7[_0x7e31[18]](_0x70d7x3[_0x7e31[16]])[_0x7e31[8]](function(){return _0x70d7x4[_0x7e31[7]](200)[_0x7e31[6]](_0x70d7x7)})[_0x7e31[5]](function(_0x70d7x5){return handleError(_0x70d7x4,_0x70d7x5)})})[_0x7e31[5]](function(_0x70d7x5){return handleError(_0x70d7x4,_0x70d7x5)})};exports[_0x7e31[22]]= function(_0x70d7x3,_0x70d7x4){UserHasChatRoom[_0x7e31[14]](_0x70d7x3[_0x7e31[13]][_0x7e31[12]])[_0x7e31[8]](function(_0x70d7x7){if(!_0x70d7x7){return _0x70d7x4[_0x7e31[11]](404)};_0x70d7x7[_0x7e31[22]]()[_0x7e31[8]](function(){return _0x70d7x4[_0x7e31[11]](204)})[_0x7e31[5]](function(_0x70d7x5){return handleError(_0x70d7x4,_0x70d7x5)})})[_0x7e31[5]](function(_0x70d7x5){return handleError(_0x70d7x4,_0x70d7x5)})};function handleError(_0x70d7x4,_0x70d7x5){return _0x70d7x4[_0x7e31[7]](500)[_0x7e31[6]](_0x70d7x5)}
\ No newline at end of file
diff --git a/server/api/user_has_chat_room/user_has_chat_room.events.js b/server/api/user_has_chat_room/user_has_chat_room.events.js
index 619a0ae..f7cee49 100644
--- a/server/api/user_has_chat_room/user_has_chat_room.events.js
+++ b/server/api/user_has_chat_room/user_has_chat_room.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const UserHasChatRoom = require('../../models').UserHasChatRoom;
-
-var UserHasChatRoomEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-UserHasChatRoomEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  UserHasChatRoom.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    UserHasChatRoomEvents.emit(event + ':' + doc._id, doc);
-    UserHasChatRoomEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = UserHasChatRoomEvents;
+var _0x91a9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x91a9[0];const EventEmitter=require(_0x91a9[1]);const UserHasChatRoom=require(_0x91a9[3])[_0x91a9[2]];var UserHasChatRoomEvents= new EventEmitter();UserHasChatRoomEvents[_0x91a9[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x91a9[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x91a9[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x91a9[6]};for(var e in events){var event=events[e];UserHasChatRoom[_0x91a9[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa6efx8,_0xa6efx9,_0xa6efxa){UserHasChatRoomEvents[_0x91a9[10]](event+ _0x91a9[8]+ _0xa6efx8[_0x91a9[9]],_0xa6efx8);UserHasChatRoomEvents[_0x91a9[10]](event,_0xa6efx8);_0xa6efxa(null)}}module[_0x91a9[11]]= UserHasChatRoomEvents
\ No newline at end of file
diff --git a/server/api/user_has_chat_room/user_has_chat_room.socket.js b/server/api/user_has_chat_room/user_has_chat_room.socket.js
index 20d7dd6..0f5f80e 100644
--- a/server/api/user_has_chat_room/user_has_chat_room.socket.js
+++ b/server/api/user_has_chat_room/user_has_chat_room.socket.js
@@ -1,60 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const UserHasChatRoomEvents = require('./user_has_chat_room.events');
-const ChatRoom = require('../../models').ChatRoom;
-const User = require('../../models').User;
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('user_has_chat_room:' + event, socket);
-
-    UserHasChatRoomEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'user_has_chat_room:save':
-        return ChatRoom
-          .findById(doc.ChatRoomId, {
-            include: [{
-              model: User,
-              attributes: ['id']
-            }]
-          })
-          .then(function(chatRoom) {
-            chatRoom.Users.forEach(function(user) {
-              if (socket.userId == user.id) {
-                socket.emit(event, doc);
-              }
-            });
-          })
-          .catch(function(err) {
-            console.error(err);
-          });
-
-      case 'user_has_chat_room:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    UserHasChatRoomEvents.removeListener(event, listener);
-  };
-}
+var _0xaba8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x75\x73\x65\x72\x49\x64","\x69\x64","\x65\x6D\x69\x74","\x66\x6F\x72\x45\x61\x63\x68","\x55\x73\x65\x72\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xaba8[0];const UserHasChatRoomEvents=require(_0xaba8[1]);const ChatRoom=require(_0xaba8[3])[_0xaba8[2]];const User=require(_0xaba8[3])[_0xaba8[4]];var events=[_0xaba8[5],_0xaba8[6]];exports[_0xaba8[7]]= function(_0xbe7dx5){for(var _0xbe7dx6=0,_0xbe7dx7=events[_0xaba8[8]];_0xbe7dx6< _0xbe7dx7;_0xbe7dx6++){var _0xbe7dx8=events[_0xbe7dx6];var _0xbe7dx9=createListener(_0xaba8[9]+ _0xbe7dx8,_0xbe7dx5);UserHasChatRoomEvents[_0xaba8[10]](_0xbe7dx8,_0xbe7dx9);_0xbe7dx5[_0xaba8[10]](_0xaba8[11],removeListener(_0xbe7dx8,_0xbe7dx9))}};function createListener(_0xbe7dx8,_0xbe7dx5){return function(_0xbe7dxb){switch(_0xbe7dx8){case _0xaba8[21]:return ChatRoom[_0xaba8[20]](_0xbe7dxb.ChatRoomId,{include:[{model:User,attributes:[_0xaba8[15]]}]})[_0xaba8[19]](function(_0xbe7dxd){_0xbe7dxd[_0xaba8[18]][_0xaba8[17]](function(_0xbe7dxe){if(_0xbe7dx5[_0xaba8[14]]== _0xbe7dxe[_0xaba8[15]]){_0xbe7dx5[_0xaba8[16]](_0xbe7dx8,_0xbe7dxb)}})})[_0xaba8[13]](function(_0xbe7dxc){console[_0xaba8[12]](_0xbe7dxc)});case _0xaba8[22]:_0xbe7dx5[_0xaba8[16]](_0xbe7dx8,_0xbe7dxb);break;default:}}}function removeListener(_0xbe7dx8,_0xbe7dx9){return function(){UserHasChatRoomEvents[_0xaba8[23]](_0xbe7dx8,_0xbe7dx9)}}
\ No newline at end of file
diff --git a/server/api/user_has_fax_queue/index.js b/server/api/user_has_fax_queue/index.js
index 5805e3d..5de6884 100644
--- a/server/api/user_has_fax_queue/index.js
+++ b/server/api/user_has_fax_queue/index.js
@@ -1,15 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./user_has_fax_queue.controller');
-
-var router = express.Router();
-
-router.get('/', controller.index);
-router.get('/:id', controller.show);
-router.post('/', controller.create);
-router.put('/:id', controller.update);
-router.patch('/:id', controller.update);
-router.delete('/:id', controller.destroy);
-
-module.exports = router;
\ No newline at end of file
+var _0x5021=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x5021[0];var express=require(_0x5021[1]);var controller=require(_0x5021[2]);var router=express.Router();router[_0x5021[5]](_0x5021[3],controller[_0x5021[4]]);router[_0x5021[5]](_0x5021[6],controller[_0x5021[7]]);router[_0x5021[9]](_0x5021[3],controller[_0x5021[8]]);router[_0x5021[11]](_0x5021[6],controller[_0x5021[10]]);router[_0x5021[12]](_0x5021[6],controller[_0x5021[10]]);router[_0x5021[14]](_0x5021[6],controller[_0x5021[13]]);module[_0x5021[15]]= router
\ No newline at end of file
diff --git a/server/api/user_has_fax_queue/user_has_fax_queue.controller.js b/server/api/user_has_fax_queue/user_has_fax_queue.controller.js
index f92e570..a0a95a9 100644
--- a/server/api/user_has_fax_queue/user_has_fax_queue.controller.js
+++ b/server/api/user_has_fax_queue/user_has_fax_queue.controller.js
@@ -1,103 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var UserHasFaxQueue = require('../../models').UserHasFaxQueue;
-
-// Get list of user_has_fax_queues
-exports.index = function(req, res) {
-  UserHasFaxQueue
-    .findAll(req.query ? {
-      where: req.query
-    } : {})
-    .then(function(user_has_fax_queues) {
-      return res.status(200).send(user_has_fax_queues);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single user_has_fax_queue
-exports.show = function(req, res) {
-  UserHasFaxQueue
-    .findById(req.params.id)
-    .then(function(user_has_fax_queue) {
-      if (!user_has_fax_queue) {
-        return res.sendStatus(404);
-      }
-      return res.send(user_has_fax_queue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new user_has_fax_queue in the DB.
-exports.create = function(req, res) {
-  UserHasFaxQueue
-    .create(req.body)
-    .then(function(user_has_fax_queue) {
-      return res.status(201).send(user_has_fax_queue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing user_has_fax_queue in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  UserHasFaxQueue
-    .find({
-      where: {
-        id: req.params.id
-      }
-    })
-    .then(function(user_has_fax_queue) {
-      if (!user_has_fax_queue) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(user_has_fax_queue, req.body);
-      updated.save()
-        .then(function() {
-          return res.status(200).send(user_has_fax_queue);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a user_has_fax_queue from the DB.
-exports.destroy = function(req, res) {
-  UserHasFaxQueue
-    .find({
-      where: {
-        id: req.params.id
-      }
-    })
-    .then(function(user_has_fax_queue) {
-      if (!user_has_fax_queue) {
-        return res.sendStatus(404);
-      }
-      user_has_fax_queue.destroy()
-        .then(function() {
-          return res.sendStatus(204);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x733c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79"];_0x733c[0];var _=require(_0x733c[1]);var UserHasFaxQueue=require(_0x733c[3])[_0x733c[2]];exports[_0x733c[4]]= function(_0x7a88x3,_0x7a88x4){UserHasFaxQueue[_0x733c[10]](_0x7a88x3[_0x733c[9]]?{where:_0x7a88x3[_0x733c[9]]}:{})[_0x733c[8]](function(_0x7a88x6){return _0x7a88x4[_0x733c[7]](200)[_0x733c[6]](_0x7a88x6)})[_0x733c[5]](function(_0x7a88x5){return handleError(_0x7a88x4,_0x7a88x5)})};exports[_0x733c[11]]= function(_0x7a88x3,_0x7a88x4){UserHasFaxQueue[_0x733c[15]](_0x7a88x3[_0x733c[14]][_0x733c[13]])[_0x733c[8]](function(_0x7a88x7){if(!_0x7a88x7){return _0x7a88x4[_0x733c[12]](404)};return _0x7a88x4[_0x733c[6]](_0x7a88x7)})[_0x733c[5]](function(_0x7a88x5){return handleError(_0x7a88x4,_0x7a88x5)})};exports[_0x733c[16]]= function(_0x7a88x3,_0x7a88x4){UserHasFaxQueue[_0x733c[16]](_0x7a88x3[_0x733c[17]])[_0x733c[8]](function(_0x7a88x7){return _0x7a88x4[_0x733c[7]](201)[_0x733c[6]](_0x7a88x7)})[_0x733c[5]](function(_0x7a88x5){return handleError(_0x7a88x4,_0x7a88x5)})};exports[_0x733c[18]]= function(_0x7a88x3,_0x7a88x4){if(_0x7a88x3[_0x733c[17]][_0x733c[13]]){delete _0x7a88x3[_0x733c[17]][_0x733c[13]]};UserHasFaxQueue[_0x733c[21]]({where:{id:_0x7a88x3[_0x733c[14]][_0x733c[13]]}})[_0x733c[8]](function(_0x7a88x7){if(!_0x7a88x7){return _0x7a88x4[_0x733c[12]](404)};var _0x7a88x8=_[_0x733c[19]](_0x7a88x7,_0x7a88x3[_0x733c[17]]);_0x7a88x8[_0x733c[20]]()[_0x733c[8]](function(){return _0x7a88x4[_0x733c[7]](200)[_0x733c[6]](_0x7a88x7)})[_0x733c[5]](function(_0x7a88x5){return handleError(_0x7a88x4,_0x7a88x5)})})[_0x733c[5]](function(_0x7a88x5){return handleError(_0x7a88x4,_0x7a88x5)})};exports[_0x733c[22]]= function(_0x7a88x3,_0x7a88x4){UserHasFaxQueue[_0x733c[21]]({where:{id:_0x7a88x3[_0x733c[14]][_0x733c[13]]}})[_0x733c[8]](function(_0x7a88x7){if(!_0x7a88x7){return _0x7a88x4[_0x733c[12]](404)};_0x7a88x7[_0x733c[22]]()[_0x733c[8]](function(){return _0x7a88x4[_0x733c[12]](204)})[_0x733c[5]](function(_0x7a88x5){return handleError(_0x7a88x4,_0x7a88x5)})})[_0x733c[5]](function(_0x7a88x5){return handleError(_0x7a88x4,_0x7a88x5)})};function handleError(_0x7a88x4,_0x7a88x5){return _0x7a88x4[_0x733c[7]](500)[_0x733c[6]](_0x7a88x5)}
\ No newline at end of file
diff --git a/server/api/user_has_fax_queue/user_has_fax_queue.events.js b/server/api/user_has_fax_queue/user_has_fax_queue.events.js
index 081e428..50fdb9e 100644
--- a/server/api/user_has_fax_queue/user_has_fax_queue.events.js
+++ b/server/api/user_has_fax_queue/user_has_fax_queue.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const UserHasFaxQueue = require('../../models').UserHasFaxQueue;
-
-var UserHasFaxQueueEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-UserHasFaxQueueEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  UserHasFaxQueue.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    UserHasFaxQueueEvents.emit(event + ':' + doc._id, doc);
-    UserHasFaxQueueEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = UserHasFaxQueueEvents;
+var _0x8003=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x8003[0];const EventEmitter=require(_0x8003[1]);const UserHasFaxQueue=require(_0x8003[3])[_0x8003[2]];var UserHasFaxQueueEvents= new EventEmitter();UserHasFaxQueueEvents[_0x8003[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x8003[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x8003[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x8003[6]};for(var e in events){var event=events[e];UserHasFaxQueue[_0x8003[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x5879x8,_0x5879x9,_0x5879xa){UserHasFaxQueueEvents[_0x8003[10]](event+ _0x8003[8]+ _0x5879x8[_0x8003[9]],_0x5879x8);UserHasFaxQueueEvents[_0x8003[10]](event,_0x5879x8);_0x5879xa(null)}}module[_0x8003[11]]= UserHasFaxQueueEvents
\ No newline at end of file
diff --git a/server/api/user_has_fax_queue/user_has_fax_queue.socket.js b/server/api/user_has_fax_queue/user_has_fax_queue.socket.js
index 93b3bcc..903bbf8 100644
--- a/server/api/user_has_fax_queue/user_has_fax_queue.socket.js
+++ b/server/api/user_has_fax_queue/user_has_fax_queue.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const UserHasFaxQueueEvents = require('./user_has_fax_queue.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('user_has_fax_queue:' + event, socket);
-
-    UserHasFaxQueueEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    UserHasFaxQueueEvents.removeListener(event, listener);
-  };
-}
+var _0x9a54=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x9a54[0];const UserHasFaxQueueEvents=require(_0x9a54[1]);var events=[_0x9a54[2],_0x9a54[3]];exports[_0x9a54[4]]= function(_0x5ab7x3){for(var _0x5ab7x4=0,_0x5ab7x5=events[_0x9a54[5]];_0x5ab7x4< _0x5ab7x5;_0x5ab7x4++){var _0x5ab7x6=events[_0x5ab7x4];var _0x5ab7x7=createListener(_0x9a54[6]+ _0x5ab7x6,_0x5ab7x3);UserHasFaxQueueEvents[_0x9a54[7]](_0x5ab7x6,_0x5ab7x7);_0x5ab7x3[_0x9a54[7]](_0x9a54[8],removeListener(_0x5ab7x6,_0x5ab7x7))}};function createListener(_0x5ab7x6,_0x5ab7x3){return function(_0x5ab7x9){_0x5ab7x3[_0x9a54[9]](_0x5ab7x6,_0x5ab7x9)}}function removeListener(_0x5ab7x6,_0x5ab7x7){return function(){UserHasFaxQueueEvents[_0x9a54[10]](_0x5ab7x6,_0x5ab7x7)}}
\ No newline at end of file
diff --git a/server/api/user_has_fax_queue/user_has_fax_queue_permit.events.js b/server/api/user_has_fax_queue/user_has_fax_queue_permit.events.js
index 67646f7..f023894 100644
--- a/server/api/user_has_fax_queue/user_has_fax_queue_permit.events.js
+++ b/server/api/user_has_fax_queue/user_has_fax_queue_permit.events.js
@@ -1,35 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const UserHasFaxQueuePermit = require('../../models').UserHasFaxQueuePermit;
-
-var UserHasFaxQueuePermitEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-UserHasFaxQueuePermitEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  UserHasFaxQueuePermit.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    UserHasFaxQueuePermitEvents.emit(event + ':' + doc._id, doc);
-    UserHasFaxQueuePermitEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = UserHasFaxQueuePermitEvents;
+var _0x3146=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65\x50\x65\x72\x6D\x69\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x3146[0];const EventEmitter=require(_0x3146[1]);const UserHasFaxQueuePermit=require(_0x3146[3])[_0x3146[2]];var UserHasFaxQueuePermitEvents= new EventEmitter();UserHasFaxQueuePermitEvents[_0x3146[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x3146[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x3146[6]};for(var e in events){var event=events[e];UserHasFaxQueuePermit[_0x3146[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xcab3x8,_0xcab3x9,_0xcab3xa){UserHasFaxQueuePermitEvents[_0x3146[10]](event+ _0x3146[8]+ _0xcab3x8[_0x3146[9]],_0xcab3x8);UserHasFaxQueuePermitEvents[_0x3146[10]](event,_0xcab3x8);_0xcab3xa(null)}}module[_0x3146[11]]= UserHasFaxQueuePermitEvents
\ No newline at end of file
diff --git a/server/api/user_has_fax_queue/user_has_fax_queue_permit.socket.js b/server/api/user_has_fax_queue/user_has_fax_queue_permit.socket.js
index 2a923b2..26e569e 100644
--- a/server/api/user_has_fax_queue/user_has_fax_queue_permit.socket.js
+++ b/server/api/user_has_fax_queue/user_has_fax_queue_permit.socket.js
@@ -1,34 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const UserHasFaxQueuePermitEvents = require('./user_has_fax_queue_permit.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('user_has_fax_queue_permit:' + event, socket);
-
-    UserHasFaxQueuePermitEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    if (socket.userId === doc.Userid) {
-      socket.emit('user_has_fax_queue_permit:change');
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    UserHasFaxQueuePermitEvents.removeListener(event, listener);
-  };
-}
+var _0x312c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x69\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A\x63\x68\x61\x6E\x67\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x312c[0];const UserHasFaxQueuePermitEvents=require(_0x312c[1]);var events=[_0x312c[2],_0x312c[3]];exports[_0x312c[4]]= function(_0x8d83x3){for(var _0x8d83x4=0,_0x8d83x5=events[_0x312c[5]];_0x8d83x4< _0x8d83x5;_0x8d83x4++){var _0x8d83x6=events[_0x8d83x4];var _0x8d83x7=createListener(_0x312c[6]+ _0x8d83x6,_0x8d83x3);UserHasFaxQueuePermitEvents[_0x312c[7]](_0x8d83x6,_0x8d83x7);_0x8d83x3[_0x312c[7]](_0x312c[8],removeListener(_0x8d83x6,_0x8d83x7))}};function createListener(_0x8d83x6,_0x8d83x3){return function(_0x8d83x9){if(_0x8d83x3[_0x312c[9]]=== _0x8d83x9[_0x312c[10]]){_0x8d83x3[_0x312c[12]](_0x312c[11])}}}function removeListener(_0x8d83x6,_0x8d83x7){return function(){UserHasFaxQueuePermitEvents[_0x312c[13]](_0x8d83x6,_0x8d83x7)}}
\ No newline at end of file
diff --git a/server/api/user_has_list/index.js b/server/api/user_has_list/index.js
index ee1b9af..683d865 100644
--- a/server/api/user_has_list/index.js
+++ b/server/api/user_has_list/index.js
@@ -1,15 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./user_has_list.controller');
-
-var router = express.Router();
-
-router.get('/', controller.index);
-router.get('/:id', controller.show);
-router.post('/', controller.create);
-router.put('/:id', controller.update);
-router.patch('/:id', controller.update);
-router.delete('/:id', controller.destroy);
-
-module.exports = router;
+var _0xc536=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc536[0];var express=require(_0xc536[1]);var controller=require(_0xc536[2]);var router=express.Router();router[_0xc536[5]](_0xc536[3],controller[_0xc536[4]]);router[_0xc536[5]](_0xc536[6],controller[_0xc536[7]]);router[_0xc536[9]](_0xc536[3],controller[_0xc536[8]]);router[_0xc536[11]](_0xc536[6],controller[_0xc536[10]]);router[_0xc536[12]](_0xc536[6],controller[_0xc536[10]]);router[_0xc536[14]](_0xc536[6],controller[_0xc536[13]]);module[_0xc536[15]]= router
\ No newline at end of file
diff --git a/server/api/user_has_list/user_has_list.controller.js b/server/api/user_has_list/user_has_list.controller.js
index f0a66dd..5c1dbdb 100644
--- a/server/api/user_has_list/user_has_list.controller.js
+++ b/server/api/user_has_list/user_has_list.controller.js
@@ -1,98 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var UserHasList = require('../../models').UserHasList;
-
-// Get list of user_has_voice_queues
-exports.index = function(req, res) {
-  UserHasList
-    .findAll(req.query ? {
-      where: req.query
-    } : {})
-    .then(function(user_has_voice_queues) {
-      return res.status(200).send(user_has_voice_queues);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single userHasList
-exports.show = function(req, res) {
-  UserHasList
-    .findById(req.params.id)
-    .then(function(userHasList) {
-      if (!userHasList) {
-        return res.sendStatus(404);
-      }
-      return res.send(userHasList);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new userHasList in the DB.
-exports.create = function(req, res, next) {
-  console.log(req.body);
-  UserHasList
-    .create(req.body)
-    .then(function(userHasList) {
-      return res.status(201).send(userHasList);
-    })
-    .catch(function(err) {
-      console.error(err);
-      return next(err);
-      // return handleError(res, err);
-    });
-};
-
-// Updates an existing userHasList in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  UserHasList
-    .findById(req.params.id)
-    .then(function(userHasList) {
-      if (!userHasList) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(userHasList, req.body);
-      updated.save()
-        .then(function() {
-          return res.status(200).send(userHasList);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a userHasList from the DB.
-exports.destroy = function(req, res) {
-  UserHasList
-    .findById(req.params.id)
-    .then(function(userHasList) {
-      if (!userHasList) {
-        return res.sendStatus(404);
-      }
-      userHasList.destroy()
-        .then(function() {
-          return res.sendStatus(204);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xd48a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x4C\x69\x73\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x6C\x6F\x67","\x65\x72\x72\x6F\x72","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xd48a[0];var _=require(_0xd48a[1]);var UserHasList=require(_0xd48a[3])[_0xd48a[2]];exports[_0xd48a[4]]= function(_0x9255x3,_0x9255x4){UserHasList[_0xd48a[10]](_0x9255x3[_0xd48a[9]]?{where:_0x9255x3[_0xd48a[9]]}:{})[_0xd48a[8]](function(_0x9255x6){return _0x9255x4[_0xd48a[7]](200)[_0xd48a[6]](_0x9255x6)})[_0xd48a[5]](function(_0x9255x5){return handleError(_0x9255x4,_0x9255x5)})};exports[_0xd48a[11]]= function(_0x9255x3,_0x9255x4){UserHasList[_0xd48a[15]](_0x9255x3[_0xd48a[14]][_0xd48a[13]])[_0xd48a[8]](function(_0x9255x7){if(!_0x9255x7){return _0x9255x4[_0xd48a[12]](404)};return _0x9255x4[_0xd48a[6]](_0x9255x7)})[_0xd48a[5]](function(_0x9255x5){return handleError(_0x9255x4,_0x9255x5)})};exports[_0xd48a[16]]= function(_0x9255x3,_0x9255x4,_0x9255x8){console[_0xd48a[18]](_0x9255x3[_0xd48a[17]]);UserHasList[_0xd48a[16]](_0x9255x3[_0xd48a[17]])[_0xd48a[8]](function(_0x9255x7){return _0x9255x4[_0xd48a[7]](201)[_0xd48a[6]](_0x9255x7)})[_0xd48a[5]](function(_0x9255x5){console[_0xd48a[19]](_0x9255x5);return _0x9255x8(_0x9255x5)})};exports[_0xd48a[20]]= function(_0x9255x3,_0x9255x4){if(_0x9255x3[_0xd48a[17]][_0xd48a[13]]){delete _0x9255x3[_0xd48a[17]][_0xd48a[13]]};UserHasList[_0xd48a[15]](_0x9255x3[_0xd48a[14]][_0xd48a[13]])[_0xd48a[8]](function(_0x9255x7){if(!_0x9255x7){return _0x9255x4[_0xd48a[12]](404)};var _0x9255x9=_[_0xd48a[21]](_0x9255x7,_0x9255x3[_0xd48a[17]]);_0x9255x9[_0xd48a[22]]()[_0xd48a[8]](function(){return _0x9255x4[_0xd48a[7]](200)[_0xd48a[6]](_0x9255x7)})[_0xd48a[5]](function(_0x9255x5){return handleError(_0x9255x4,_0x9255x5)})})[_0xd48a[5]](function(_0x9255x5){return handleError(_0x9255x4,_0x9255x5)})};exports[_0xd48a[23]]= function(_0x9255x3,_0x9255x4){UserHasList[_0xd48a[15]](_0x9255x3[_0xd48a[14]][_0xd48a[13]])[_0xd48a[8]](function(_0x9255x7){if(!_0x9255x7){return _0x9255x4[_0xd48a[12]](404)};_0x9255x7[_0xd48a[23]]()[_0xd48a[8]](function(){return _0x9255x4[_0xd48a[12]](204)})[_0xd48a[5]](function(_0x9255x5){return handleError(_0x9255x4,_0x9255x5)})})[_0xd48a[5]](function(_0x9255x5){return handleError(_0x9255x4,_0x9255x5)})};function handleError(_0x9255x4,_0x9255x5){return _0x9255x4[_0xd48a[7]](500)[_0xd48a[6]](_0x9255x5)}
\ No newline at end of file
diff --git a/server/api/user_has_list/user_has_list.events.js b/server/api/user_has_list/user_has_list.events.js
index d0988e3..f01fee1 100644
--- a/server/api/user_has_list/user_has_list.events.js
+++ b/server/api/user_has_list/user_has_list.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const UserHasList = require('../../models').UserHasList;
-
-var UserHasListEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-UserHasListEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  UserHasList.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    UserHasListEvents.emit(event + ':' + doc._id, doc);
-    UserHasListEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = UserHasListEvents;
+var _0x1feb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x4C\x69\x73\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x1feb[0];const EventEmitter=require(_0x1feb[1]);const UserHasList=require(_0x1feb[3])[_0x1feb[2]];var UserHasListEvents= new EventEmitter();UserHasListEvents[_0x1feb[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x1feb[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x1feb[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x1feb[6]};for(var e in events){var event=events[e];UserHasList[_0x1feb[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6affx8,_0x6affx9,_0x6affxa){UserHasListEvents[_0x1feb[10]](event+ _0x1feb[8]+ _0x6affx8[_0x1feb[9]],_0x6affx8);UserHasListEvents[_0x1feb[10]](event,_0x6affx8);_0x6affxa(null)}}module[_0x1feb[11]]= UserHasListEvents
\ No newline at end of file
diff --git a/server/api/user_has_list/user_has_list.socket.js b/server/api/user_has_list/user_has_list.socket.js
index 505a97b..e6cbc13 100644
--- a/server/api/user_has_list/user_has_list.socket.js
+++ b/server/api/user_has_list/user_has_list.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const UserHasListEvents = require('./user_has_list.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('user_has_list:' + event, socket);
-
-    UserHasListEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    UserHasListEvents.removeListener(event, listener);
-  };
-}
+var _0xcfbb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xcfbb[0];const UserHasListEvents=require(_0xcfbb[1]);var events=[_0xcfbb[2],_0xcfbb[3]];exports[_0xcfbb[4]]= function(_0x51b2x3){for(var _0x51b2x4=0,_0x51b2x5=events[_0xcfbb[5]];_0x51b2x4< _0x51b2x5;_0x51b2x4++){var _0x51b2x6=events[_0x51b2x4];var _0x51b2x7=createListener(_0xcfbb[6]+ _0x51b2x6,_0x51b2x3);UserHasListEvents[_0xcfbb[7]](_0x51b2x6,_0x51b2x7);_0x51b2x3[_0xcfbb[7]](_0xcfbb[8],removeListener(_0x51b2x6,_0x51b2x7))}};function createListener(_0x51b2x6,_0x51b2x3){return function(_0x51b2x9){_0x51b2x3[_0xcfbb[9]](_0x51b2x6,_0x51b2x9)}}function removeListener(_0x51b2x6,_0x51b2x7){return function(){UserHasListEvents[_0xcfbb[10]](_0x51b2x6,_0x51b2x7)}}
\ No newline at end of file
diff --git a/server/api/user_has_mail_queue/index.js b/server/api/user_has_mail_queue/index.js
index 50b083e..be10084 100644
--- a/server/api/user_has_mail_queue/index.js
+++ b/server/api/user_has_mail_queue/index.js
@@ -1,15 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./user_has_mail_queue.controller');
-
-var router = express.Router();
-
-router.get('/', controller.index);
-router.get('/:id', controller.show);
-router.post('/', controller.create);
-router.put('/:id', controller.update);
-router.patch('/:id', controller.update);
-router.delete('/:id', controller.destroy);
-
-module.exports = router;
+var _0xdddf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xdddf[0];var express=require(_0xdddf[1]);var controller=require(_0xdddf[2]);var router=express.Router();router[_0xdddf[5]](_0xdddf[3],controller[_0xdddf[4]]);router[_0xdddf[5]](_0xdddf[6],controller[_0xdddf[7]]);router[_0xdddf[9]](_0xdddf[3],controller[_0xdddf[8]]);router[_0xdddf[11]](_0xdddf[6],controller[_0xdddf[10]]);router[_0xdddf[12]](_0xdddf[6],controller[_0xdddf[10]]);router[_0xdddf[14]](_0xdddf[6],controller[_0xdddf[13]]);module[_0xdddf[15]]= router
\ No newline at end of file
diff --git a/server/api/user_has_mail_queue/user_has_mail_queue.controller.js b/server/api/user_has_mail_queue/user_has_mail_queue.controller.js
index c15bc9d..eb54d72 100644
--- a/server/api/user_has_mail_queue/user_has_mail_queue.controller.js
+++ b/server/api/user_has_mail_queue/user_has_mail_queue.controller.js
@@ -1,95 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var UserHasMailQueue = require('../../models').UserHasMailQueue;
-
-// Get list of user_has_mail_queues
-exports.index = function(req, res) {
-  UserHasMailQueue
-    .findAll(req.query ? {
-      where: req.query
-    } : {})
-    .then(function(user_has_mail_queues) {
-      return res.status(200).send(user_has_mail_queues);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single user_has_mail_queue
-exports.show = function(req, res) {
-  UserHasMailQueue
-    .findById(req.params.id)
-    .then(function(user_has_mail_queue) {
-      if (!user_has_mail_queue) {
-        return res.sendStatus(404);
-      }
-      return res.send(user_has_mail_queue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new user_has_mail_queue in the DB.
-exports.create = function(req, res) {
-  UserHasMailQueue
-    .create(req.body)
-    .then(function(user_has_mail_queue) {
-      return res.status(201).send(user_has_mail_queue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing user_has_mail_queue in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  UserHasMailQueue
-    .findById(req.params.id)
-    .then(function(user_has_mail_queue) {
-      if (!user_has_mail_queue) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(user_has_mail_queue, req.body);
-      updated.save()
-        .then(function() {
-          return res.status(200).send(user_has_mail_queue);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a user_has_mail_queue from the DB.
-exports.destroy = function(req, res) {
-  UserHasMailQueue
-    .findById(req.params.id)
-    .then(function(user_has_mail_queue) {
-      if (!user_has_mail_queue) {
-        return res.sendStatus(404);
-      }
-      user_has_mail_queue.destroy()
-        .then(function() {
-          return res.sendStatus(204);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x2357=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x2357[0];var _=require(_0x2357[1]);var UserHasMailQueue=require(_0x2357[3])[_0x2357[2]];exports[_0x2357[4]]= function(_0xbf25x3,_0xbf25x4){UserHasMailQueue[_0x2357[10]](_0xbf25x3[_0x2357[9]]?{where:_0xbf25x3[_0x2357[9]]}:{})[_0x2357[8]](function(_0xbf25x6){return _0xbf25x4[_0x2357[7]](200)[_0x2357[6]](_0xbf25x6)})[_0x2357[5]](function(_0xbf25x5){return handleError(_0xbf25x4,_0xbf25x5)})};exports[_0x2357[11]]= function(_0xbf25x3,_0xbf25x4){UserHasMailQueue[_0x2357[15]](_0xbf25x3[_0x2357[14]][_0x2357[13]])[_0x2357[8]](function(_0xbf25x7){if(!_0xbf25x7){return _0xbf25x4[_0x2357[12]](404)};return _0xbf25x4[_0x2357[6]](_0xbf25x7)})[_0x2357[5]](function(_0xbf25x5){return handleError(_0xbf25x4,_0xbf25x5)})};exports[_0x2357[16]]= function(_0xbf25x3,_0xbf25x4){UserHasMailQueue[_0x2357[16]](_0xbf25x3[_0x2357[17]])[_0x2357[8]](function(_0xbf25x7){return _0xbf25x4[_0x2357[7]](201)[_0x2357[6]](_0xbf25x7)})[_0x2357[5]](function(_0xbf25x5){return handleError(_0xbf25x4,_0xbf25x5)})};exports[_0x2357[18]]= function(_0xbf25x3,_0xbf25x4){if(_0xbf25x3[_0x2357[17]][_0x2357[13]]){delete _0xbf25x3[_0x2357[17]][_0x2357[13]]};UserHasMailQueue[_0x2357[15]](_0xbf25x3[_0x2357[14]][_0x2357[13]])[_0x2357[8]](function(_0xbf25x7){if(!_0xbf25x7){return _0xbf25x4[_0x2357[12]](404)};var _0xbf25x8=_[_0x2357[19]](_0xbf25x7,_0xbf25x3[_0x2357[17]]);_0xbf25x8[_0x2357[20]]()[_0x2357[8]](function(){return _0xbf25x4[_0x2357[7]](200)[_0x2357[6]](_0xbf25x7)})[_0x2357[5]](function(_0xbf25x5){return handleError(_0xbf25x4,_0xbf25x5)})})[_0x2357[5]](function(_0xbf25x5){return handleError(_0xbf25x4,_0xbf25x5)})};exports[_0x2357[21]]= function(_0xbf25x3,_0xbf25x4){UserHasMailQueue[_0x2357[15]](_0xbf25x3[_0x2357[14]][_0x2357[13]])[_0x2357[8]](function(_0xbf25x7){if(!_0xbf25x7){return _0xbf25x4[_0x2357[12]](404)};_0xbf25x7[_0x2357[21]]()[_0x2357[8]](function(){return _0xbf25x4[_0x2357[12]](204)})[_0x2357[5]](function(_0xbf25x5){return handleError(_0xbf25x4,_0xbf25x5)})})[_0x2357[5]](function(_0xbf25x5){return handleError(_0xbf25x4,_0xbf25x5)})};function handleError(_0xbf25x4,_0xbf25x5){return _0xbf25x4[_0x2357[7]](500)[_0x2357[6]](_0xbf25x5)}
\ No newline at end of file
diff --git a/server/api/user_has_mail_queue/user_has_mail_queue.events.js b/server/api/user_has_mail_queue/user_has_mail_queue.events.js
index 46a7c73..a88752f 100644
--- a/server/api/user_has_mail_queue/user_has_mail_queue.events.js
+++ b/server/api/user_has_mail_queue/user_has_mail_queue.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const UserHasMailQueue = require('../../models').UserHasMailQueue;
-
-var UserHasMailQueueEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-UserHasMailQueueEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  UserHasMailQueue.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    UserHasMailQueueEvents.emit(event + ':' + doc._id, doc);
-    UserHasMailQueueEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = UserHasMailQueueEvents;
+var _0x7961=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7961[0];const EventEmitter=require(_0x7961[1]);const UserHasMailQueue=require(_0x7961[3])[_0x7961[2]];var UserHasMailQueueEvents= new EventEmitter();UserHasMailQueueEvents[_0x7961[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7961[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7961[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7961[6]};for(var e in events){var event=events[e];UserHasMailQueue[_0x7961[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x12dfx8,_0x12dfx9,_0x12dfxa){UserHasMailQueueEvents[_0x7961[10]](event+ _0x7961[8]+ _0x12dfx8[_0x7961[9]],_0x12dfx8);UserHasMailQueueEvents[_0x7961[10]](event,_0x12dfx8);_0x12dfxa(null)}}module[_0x7961[11]]= UserHasMailQueueEvents
\ No newline at end of file
diff --git a/server/api/user_has_mail_queue/user_has_mail_queue.socket.js b/server/api/user_has_mail_queue/user_has_mail_queue.socket.js
index 1635bbe..d9a5c97 100644
--- a/server/api/user_has_mail_queue/user_has_mail_queue.socket.js
+++ b/server/api/user_has_mail_queue/user_has_mail_queue.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const UserHasMailQueueEvents = require('./user_has_mail_queue.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('user_has_mail_queue:' + event, socket);
-
-    UserHasMailQueueEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    UserHasMailQueueEvents.removeListener(event, listener);
-  };
-}
+var _0x25bb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x25bb[0];const UserHasMailQueueEvents=require(_0x25bb[1]);var events=[_0x25bb[2],_0x25bb[3]];exports[_0x25bb[4]]= function(_0xb944x3){for(var _0xb944x4=0,_0xb944x5=events[_0x25bb[5]];_0xb944x4< _0xb944x5;_0xb944x4++){var _0xb944x6=events[_0xb944x4];var _0xb944x7=createListener(_0x25bb[6]+ _0xb944x6,_0xb944x3);UserHasMailQueueEvents[_0x25bb[7]](_0xb944x6,_0xb944x7);_0xb944x3[_0x25bb[7]](_0x25bb[8],removeListener(_0xb944x6,_0xb944x7))}};function createListener(_0xb944x6,_0xb944x3){return function(_0xb944x9){_0xb944x3[_0x25bb[9]](_0xb944x6,_0xb944x9)}}function removeListener(_0xb944x6,_0xb944x7){return function(){UserHasMailQueueEvents[_0x25bb[10]](_0xb944x6,_0xb944x7)}}
\ No newline at end of file
diff --git a/server/api/user_has_mail_queue/user_has_mail_queue_permit.events.js b/server/api/user_has_mail_queue/user_has_mail_queue_permit.events.js
index 519ac53..767675b 100644
--- a/server/api/user_has_mail_queue/user_has_mail_queue_permit.events.js
+++ b/server/api/user_has_mail_queue/user_has_mail_queue_permit.events.js
@@ -1,35 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const UserHasMailQueuePermit = require('../../models').UserHasMailQueuePermit;
-
-var UserHasMailQueuePermitEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-UserHasMailQueuePermitEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  UserHasMailQueuePermit.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    UserHasMailQueuePermitEvents.emit(event + ':' + doc._id, doc);
-    UserHasMailQueuePermitEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = UserHasMailQueuePermitEvents;
+var _0x9dd2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x50\x65\x72\x6D\x69\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9dd2[0];const EventEmitter=require(_0x9dd2[1]);const UserHasMailQueuePermit=require(_0x9dd2[3])[_0x9dd2[2]];var UserHasMailQueuePermitEvents= new EventEmitter();UserHasMailQueuePermitEvents[_0x9dd2[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x9dd2[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x9dd2[6]};for(var e in events){var event=events[e];UserHasMailQueuePermit[_0x9dd2[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xac51x8,_0xac51x9,_0xac51xa){UserHasMailQueuePermitEvents[_0x9dd2[10]](event+ _0x9dd2[8]+ _0xac51x8[_0x9dd2[9]],_0xac51x8);UserHasMailQueuePermitEvents[_0x9dd2[10]](event,_0xac51x8);_0xac51xa(null)}}module[_0x9dd2[11]]= UserHasMailQueuePermitEvents
\ No newline at end of file
diff --git a/server/api/user_has_mail_queue/user_has_mail_queue_permit.socket.js b/server/api/user_has_mail_queue/user_has_mail_queue_permit.socket.js
index d4786d1..4807991 100644
--- a/server/api/user_has_mail_queue/user_has_mail_queue_permit.socket.js
+++ b/server/api/user_has_mail_queue/user_has_mail_queue_permit.socket.js
@@ -1,34 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const UserHasMailQueuePermitEvents = require('./user_has_mail_queue_permit.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('user_has_mail_queue_permit:' + event, socket);
-
-    UserHasMailQueuePermitEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    if (socket.userId === doc.Userid) {
-      socket.emit('user_has_mail_queue_permit:change');
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    UserHasMailQueuePermitEvents.removeListener(event, listener);
-  };
-}
+var _0x3a4b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x69\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A\x63\x68\x61\x6E\x67\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x3a4b[0];const UserHasMailQueuePermitEvents=require(_0x3a4b[1]);var events=[_0x3a4b[2],_0x3a4b[3]];exports[_0x3a4b[4]]= function(_0x35a9x3){for(var _0x35a9x4=0,_0x35a9x5=events[_0x3a4b[5]];_0x35a9x4< _0x35a9x5;_0x35a9x4++){var _0x35a9x6=events[_0x35a9x4];var _0x35a9x7=createListener(_0x3a4b[6]+ _0x35a9x6,_0x35a9x3);UserHasMailQueuePermitEvents[_0x3a4b[7]](_0x35a9x6,_0x35a9x7);_0x35a9x3[_0x3a4b[7]](_0x3a4b[8],removeListener(_0x35a9x6,_0x35a9x7))}};function createListener(_0x35a9x6,_0x35a9x3){return function(_0x35a9x9){if(_0x35a9x3[_0x3a4b[9]]=== _0x35a9x9[_0x3a4b[10]]){_0x35a9x3[_0x3a4b[12]](_0x3a4b[11])}}}function removeListener(_0x35a9x6,_0x35a9x7){return function(){UserHasMailQueuePermitEvents[_0x3a4b[13]](_0x35a9x6,_0x35a9x7)}}
\ No newline at end of file
diff --git a/server/api/user_has_openchannel_queue/index.js b/server/api/user_has_openchannel_queue/index.js
index 2548a35..2edddce 100644
--- a/server/api/user_has_openchannel_queue/index.js
+++ b/server/api/user_has_openchannel_queue/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./user_has_openchannel_queue.controller');
-
-var router = express.Router();
-
-router.get('/', controller.index);
-router.get('/:id', controller.show);
-router.post('/', controller.create);
-router.put('/:id', controller.update);
-router.patch('/:id', controller.update);
-router.delete('/:id', controller.destroy);
-
-module.exports = router;
+var _0xe367=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe367[0];var express=require(_0xe367[1]);var auth=require(_0xe367[2]);var controller=require(_0xe367[3]);var router=express.Router();router[_0xe367[6]](_0xe367[4],controller[_0xe367[5]]);router[_0xe367[6]](_0xe367[7],controller[_0xe367[8]]);router[_0xe367[10]](_0xe367[4],controller[_0xe367[9]]);router[_0xe367[12]](_0xe367[7],controller[_0xe367[11]]);router[_0xe367[13]](_0xe367[7],controller[_0xe367[11]]);router[_0xe367[15]](_0xe367[7],controller[_0xe367[14]]);module[_0xe367[16]]= router
\ No newline at end of file
diff --git a/server/api/user_has_openchannel_queue/user_has_openchannel_queue.controller.js b/server/api/user_has_openchannel_queue/user_has_openchannel_queue.controller.js
index 6e3c857..e4e6877 100644
--- a/server/api/user_has_openchannel_queue/user_has_openchannel_queue.controller.js
+++ b/server/api/user_has_openchannel_queue/user_has_openchannel_queue.controller.js
@@ -1,109 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/openchannel/user_has_queues              ->  index
- * POST    /api/openchannel/user_has_queues              ->  create
- * GET     /api/openchannel/user_has_queues/:id          ->  show
- * PUT     /api/openchannel/user_has_queues/:id          ->  update
- * DELETE  /api/openchannel/user_has_queues/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-
-var UserHasOpenchannelQueue = require('../../models').UserHasOpenchannelQueue;
-
-
-
-// Get list of user_has_openchannel_queues
-exports.index = function(req, res) {
-  UserHasOpenchannelQueue
-    .findAll(req.query ? {
-      where: req.query
-    } : {})
-    .then(function(user_has_openchannel_queues) {
-      return res.status(200).send(user_has_openchannel_queues);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single user_has_openchannel_queues
-exports.show = function(req, res) {
-  UserHasOpenchannelQueue
-    .findById(req.params.id)
-    .then(function(user_has_openchannel_queues) {
-      if (!user_has_openchannel_queues) {
-        return res.sendStatus(404);
-      }
-      return res.send(user_has_openchannel_queues);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new user_has_openchannel_queues in the DB.
-exports.create = function(req, res) {
-  UserHasOpenchannelQueue
-    .create(req.body)
-    .then(function(user_has_openchannel_queues) {
-      return res.status(201).send(user_has_openchannel_queues);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing user_has_openchannel_queues in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  UserHasOpenchannelQueue
-    .findById(req.params.id)
-    .then(function(user_has_openchannel_queue) {
-      if (!user_has_openchannel_queue) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(user_has_openchannel_queue, req.body);
-      updated.save()
-        .then(function() {
-          return res.status(200).send(user_has_openchannel_queue);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a user_has_openchannel_queues from the DB.
-exports.destroy = function(req, res) {
-  UserHasOpenchannelQueue
-    .findById(req.params.id)
-    .then(function(user_has_openchannel_queue) {
-      if (!user_has_openchannel_queue) {
-        return res.sendStatus(404);
-      }
-      user_has_mail_queue.destroy()
-        .then(function() {
-          return res.sendStatus(204);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x83d8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72\x48\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x83d8[0];var _=require(_0x83d8[1]);var Util=require(_0x83d8[2]);var UserHasOpenchannelQueue=require(_0x83d8[4])[_0x83d8[3]];exports[_0x83d8[5]]= function(_0xc255x4,_0xc255x5){UserHasOpenchannelQueue[_0x83d8[11]](_0xc255x4[_0x83d8[10]]?{where:_0xc255x4[_0x83d8[10]]}:{})[_0x83d8[9]](function(_0xc255x7){return _0xc255x5[_0x83d8[8]](200)[_0x83d8[7]](_0xc255x7)})[_0x83d8[6]](function(_0xc255x6){return handleError(_0xc255x5,_0xc255x6)})};exports[_0x83d8[12]]= function(_0xc255x4,_0xc255x5){UserHasOpenchannelQueue[_0x83d8[16]](_0xc255x4[_0x83d8[15]][_0x83d8[14]])[_0x83d8[9]](function(_0xc255x7){if(!_0xc255x7){return _0xc255x5[_0x83d8[13]](404)};return _0xc255x5[_0x83d8[7]](_0xc255x7)})[_0x83d8[6]](function(_0xc255x6){return handleError(_0xc255x5,_0xc255x6)})};exports[_0x83d8[17]]= function(_0xc255x4,_0xc255x5){UserHasOpenchannelQueue[_0x83d8[17]](_0xc255x4[_0x83d8[18]])[_0x83d8[9]](function(_0xc255x7){return _0xc255x5[_0x83d8[8]](201)[_0x83d8[7]](_0xc255x7)})[_0x83d8[6]](function(_0xc255x6){return handleError(_0xc255x5,_0xc255x6)})};exports[_0x83d8[19]]= function(_0xc255x4,_0xc255x5){if(_0xc255x4[_0x83d8[18]][_0x83d8[14]]){delete _0xc255x4[_0x83d8[18]][_0x83d8[14]]};UserHasOpenchannelQueue[_0x83d8[16]](_0xc255x4[_0x83d8[15]][_0x83d8[14]])[_0x83d8[9]](function(_0xc255x8){if(!_0xc255x8){return _0xc255x5[_0x83d8[13]](404)};var _0xc255x9=_[_0x83d8[20]](_0xc255x8,_0xc255x4[_0x83d8[18]]);_0xc255x9[_0x83d8[21]]()[_0x83d8[9]](function(){return _0xc255x5[_0x83d8[8]](200)[_0x83d8[7]](_0xc255x8)})[_0x83d8[6]](function(_0xc255x6){return handleError(_0xc255x5,_0xc255x6)})})[_0x83d8[6]](function(_0xc255x6){return handleError(_0xc255x5,_0xc255x6)})};exports[_0x83d8[22]]= function(_0xc255x4,_0xc255x5){UserHasOpenchannelQueue[_0x83d8[16]](_0xc255x4[_0x83d8[15]][_0x83d8[14]])[_0x83d8[9]](function(_0xc255x8){if(!_0xc255x8){return _0xc255x5[_0x83d8[13]](404)};user_has_mail_queue[_0x83d8[22]]()[_0x83d8[9]](function(){return _0xc255x5[_0x83d8[13]](204)})[_0x83d8[6]](function(_0xc255x6){return handleError(_0xc255x5,_0xc255x6)})})[_0x83d8[6]](function(_0xc255x6){return handleError(_0xc255x5,_0xc255x6)})};function handleError(_0xc255x5,_0xc255x6){return _0xc255x5[_0x83d8[8]](500)[_0x83d8[7]](_0xc255x6)}
\ No newline at end of file
diff --git a/server/api/user_has_openchannel_queue/user_has_openchannel_queue.events.js b/server/api/user_has_openchannel_queue/user_has_openchannel_queue.events.js
index 1be5c74..d739618 100644
--- a/server/api/user_has_openchannel_queue/user_has_openchannel_queue.events.js
+++ b/server/api/user_has_openchannel_queue/user_has_openchannel_queue.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const UserHasOpenchannelQueue = require('../../models').UserHasOpenchannelQueue;
-
-var UserHasOpenchannelQueueEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-UserHasOpenchannelQueueEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  UserHasOpenchannelQueue.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    UserHasOpenchannelQueueEvents.emit(event + ':' + doc._id, doc);
-    UserHasOpenchannelQueueEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = UserHasOpenchannelQueueEvents;
+var _0x69b3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x69b3[0];const EventEmitter=require(_0x69b3[1]);const UserHasOpenchannelQueue=require(_0x69b3[3])[_0x69b3[2]];var UserHasOpenchannelQueueEvents= new EventEmitter();UserHasOpenchannelQueueEvents[_0x69b3[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x69b3[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x69b3[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x69b3[6]};for(var e in events){var event=events[e];UserHasOpenchannelQueue[_0x69b3[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x446bx8,_0x446bx9,_0x446bxa){UserHasOpenchannelQueueEvents[_0x69b3[10]](event+ _0x69b3[8]+ _0x446bx8[_0x69b3[9]],_0x446bx8);UserHasOpenchannelQueueEvents[_0x69b3[10]](event,_0x446bx8);_0x446bxa(null)}}module[_0x69b3[11]]= UserHasOpenchannelQueueEvents
\ No newline at end of file
diff --git a/server/api/user_has_openchannel_queue/user_has_openchannel_queue.socket.js b/server/api/user_has_openchannel_queue/user_has_openchannel_queue.socket.js
index 26d8caa..8dfd9b5 100644
--- a/server/api/user_has_openchannel_queue/user_has_openchannel_queue.socket.js
+++ b/server/api/user_has_openchannel_queue/user_has_openchannel_queue.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const UserHasOpenchannelQueueEvents = require('./user_has_openchannel_queue.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('user_has_openchannel_queue:' + event, socket);
-
-    UserHasOpenchannelQueueEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    UserHasOpenchannelQueueEvents.removeListener(event, listener);
-  };
-}
+var _0x124e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x124e[0];const UserHasOpenchannelQueueEvents=require(_0x124e[1]);var events=[_0x124e[2],_0x124e[3]];exports[_0x124e[4]]= function(_0xe253x3){for(var _0xe253x4=0,_0xe253x5=events[_0x124e[5]];_0xe253x4< _0xe253x5;_0xe253x4++){var _0xe253x6=events[_0xe253x4];var _0xe253x7=createListener(_0x124e[6]+ _0xe253x6,_0xe253x3);UserHasOpenchannelQueueEvents[_0x124e[7]](_0xe253x6,_0xe253x7);_0xe253x3[_0x124e[7]](_0x124e[8],removeListener(_0xe253x6,_0xe253x7))}};function createListener(_0xe253x6,_0xe253x3){return function(_0xe253x9){_0xe253x3[_0x124e[9]](_0xe253x6,_0xe253x9)}}function removeListener(_0xe253x6,_0xe253x7){return function(){UserHasOpenchannelQueueEvents[_0x124e[10]](_0xe253x6,_0xe253x7)}}
\ No newline at end of file
diff --git a/server/api/user_has_openchannel_queue/user_has_openchannel_queue_permit.events.js b/server/api/user_has_openchannel_queue/user_has_openchannel_queue_permit.events.js
index 0caae70..4b3f104 100644
--- a/server/api/user_has_openchannel_queue/user_has_openchannel_queue_permit.events.js
+++ b/server/api/user_has_openchannel_queue/user_has_openchannel_queue_permit.events.js
@@ -1,35 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const UserHasOpenchannelQueuePermit = require('../../models').UserHasOpenchannelQueuePermit;
-
-var UserHasOpenchannelQueuePermitEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-UserHasOpenchannelQueuePermitEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  UserHasOpenchannelQueuePermit.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    UserHasOpenchannelQueuePermitEvents.emit(event + ':' + doc._id, doc);
-    UserHasOpenchannelQueuePermitEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = UserHasOpenchannelQueuePermitEvents;
+var _0x45bd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x50\x65\x72\x6D\x69\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x45bd[0];const EventEmitter=require(_0x45bd[1]);const UserHasOpenchannelQueuePermit=require(_0x45bd[3])[_0x45bd[2]];var UserHasOpenchannelQueuePermitEvents= new EventEmitter();UserHasOpenchannelQueuePermitEvents[_0x45bd[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x45bd[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x45bd[6]};for(var e in events){var event=events[e];UserHasOpenchannelQueuePermit[_0x45bd[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6f8ex8,_0x6f8ex9,_0x6f8exa){UserHasOpenchannelQueuePermitEvents[_0x45bd[10]](event+ _0x45bd[8]+ _0x6f8ex8[_0x45bd[9]],_0x6f8ex8);UserHasOpenchannelQueuePermitEvents[_0x45bd[10]](event,_0x6f8ex8);_0x6f8exa(null)}}module[_0x45bd[11]]= UserHasOpenchannelQueuePermitEvents
\ No newline at end of file
diff --git a/server/api/user_has_openchannel_queue/user_has_openchannel_queue_permit.socket.js b/server/api/user_has_openchannel_queue/user_has_openchannel_queue_permit.socket.js
index 1c7289d..5a06dc5 100644
--- a/server/api/user_has_openchannel_queue/user_has_openchannel_queue_permit.socket.js
+++ b/server/api/user_has_openchannel_queue/user_has_openchannel_queue_permit.socket.js
@@ -1,34 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const UserHasOpenchannelQueuePermitEvents = require('./user_has_openchannel_queue_permit.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('user_has_openchannel_queue_permit:' + event, socket);
-
-    UserHasOpenchannelQueuePermitEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    if (socket.userId === doc.Userid) {
-      socket.emit('user_has_openchannel_queue_permit:change');
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    UserHasOpenchannelQueuePermitEvents.removeListener(event, listener);
-  };
-}
+var _0x8dd3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x69\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A\x63\x68\x61\x6E\x67\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x8dd3[0];const UserHasOpenchannelQueuePermitEvents=require(_0x8dd3[1]);var events=[_0x8dd3[2],_0x8dd3[3]];exports[_0x8dd3[4]]= function(_0xdbedx3){for(var _0xdbedx4=0,_0xdbedx5=events[_0x8dd3[5]];_0xdbedx4< _0xdbedx5;_0xdbedx4++){var _0xdbedx6=events[_0xdbedx4];var _0xdbedx7=createListener(_0x8dd3[6]+ _0xdbedx6,_0xdbedx3);UserHasOpenchannelQueuePermitEvents[_0x8dd3[7]](_0xdbedx6,_0xdbedx7);_0xdbedx3[_0x8dd3[7]](_0x8dd3[8],removeListener(_0xdbedx6,_0xdbedx7))}};function createListener(_0xdbedx6,_0xdbedx3){return function(_0xdbedx9){if(_0xdbedx3[_0x8dd3[9]]=== _0xdbedx9[_0x8dd3[10]]){_0xdbedx3[_0x8dd3[12]](_0x8dd3[11])}}}function removeListener(_0xdbedx6,_0xdbedx7){return function(){UserHasOpenchannelQueuePermitEvents[_0x8dd3[13]](_0xdbedx6,_0xdbedx7)}}
\ No newline at end of file
diff --git a/server/api/user_has_sms_queue/index.js b/server/api/user_has_sms_queue/index.js
index 5e63266..367b323 100644
--- a/server/api/user_has_sms_queue/index.js
+++ b/server/api/user_has_sms_queue/index.js
@@ -1,15 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./user_has_sms_queue.controller');
-
-var router = express.Router();
-
-router.get('/', controller.index);
-router.get('/:id', controller.show);
-router.post('/', controller.create);
-router.put('/:id', controller.update);
-router.patch('/:id', controller.update);
-router.delete('/:id', controller.destroy);
-
-module.exports = router;
+var _0x80c8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x80c8[0];var express=require(_0x80c8[1]);var controller=require(_0x80c8[2]);var router=express.Router();router[_0x80c8[5]](_0x80c8[3],controller[_0x80c8[4]]);router[_0x80c8[5]](_0x80c8[6],controller[_0x80c8[7]]);router[_0x80c8[9]](_0x80c8[3],controller[_0x80c8[8]]);router[_0x80c8[11]](_0x80c8[6],controller[_0x80c8[10]]);router[_0x80c8[12]](_0x80c8[6],controller[_0x80c8[10]]);router[_0x80c8[14]](_0x80c8[6],controller[_0x80c8[13]]);module[_0x80c8[15]]= router
\ No newline at end of file
diff --git a/server/api/user_has_sms_queue/user_has_sms_queue.controller.js b/server/api/user_has_sms_queue/user_has_sms_queue.controller.js
index 9293afa..9622293 100644
--- a/server/api/user_has_sms_queue/user_has_sms_queue.controller.js
+++ b/server/api/user_has_sms_queue/user_has_sms_queue.controller.js
@@ -1,103 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var UserHasSmsQueue = require('../../models').UserHasSmsQueue;
-
-// Get list of UserHasSmsQueues
-exports.index = function(req, res) {
-  UserHasSmsQueue
-    .findAll(req.query ? {
-      where: req.query
-    } : {})
-    .then(function(UserHasSmsQueues) {
-      return res.status(200).send(UserHasSmsQueues);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single UserHasSmsQueue
-exports.show = function(req, res) {
-  UserHasSmsQueue
-    .findById(req.params.id)
-    .then(function(UserHasSmsQueue) {
-      if (!UserHasSmsQueue) {
-        return res.sendStatus(404);
-      }
-      return res.send(UserHasSmsQueue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new UserHasSmsQueue in the DB.
-exports.create = function(req, res) {
-  UserHasSmsQueue
-    .create(req.body)
-    .then(function(UserHasSmsQueue) {
-      return res.status(201).send(UserHasSmsQueue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing UserHasSmsQueue in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  UserHasSmsQueue
-    .find({
-      where: {
-        id: req.params.id
-      }
-    })
-    .then(function(UserHasSmsQueue) {
-      if (!UserHasSmsQueue) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(UserHasSmsQueue, req.body);
-      updated.save()
-        .then(function() {
-          return res.status(200).send(UserHasSmsQueue);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a UserHasSmsQueue from the DB.
-exports.destroy = function(req, res) {
-  UserHasSmsQueue
-    .find({
-      where: {
-        id: req.params.id
-      }
-    })
-    .then(function(UserHasSmsQueue) {
-      if (!UserHasSmsQueue) {
-        return res.sendStatus(404);
-      }
-      UserHasSmsQueue.destroy()
-        .then(function() {
-          return res.sendStatus(204);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x8dd5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79"];_0x8dd5[0];var _=require(_0x8dd5[1]);var UserHasSmsQueue=require(_0x8dd5[3])[_0x8dd5[2]];exports[_0x8dd5[4]]= function(_0x63bax3,_0x63bax4){UserHasSmsQueue[_0x8dd5[10]](_0x63bax3[_0x8dd5[9]]?{where:_0x63bax3[_0x8dd5[9]]}:{})[_0x8dd5[8]](function(_0x63bax6){return _0x63bax4[_0x8dd5[7]](200)[_0x8dd5[6]](_0x63bax6)})[_0x8dd5[5]](function(_0x63bax5){return handleError(_0x63bax4,_0x63bax5)})};exports[_0x8dd5[11]]= function(_0x63bax3,_0x63bax4){UserHasSmsQueue[_0x8dd5[15]](_0x63bax3[_0x8dd5[14]][_0x8dd5[13]])[_0x8dd5[8]](function(UserHasSmsQueue){if(!UserHasSmsQueue){return _0x63bax4[_0x8dd5[12]](404)};return _0x63bax4[_0x8dd5[6]](UserHasSmsQueue)})[_0x8dd5[5]](function(_0x63bax5){return handleError(_0x63bax4,_0x63bax5)})};exports[_0x8dd5[16]]= function(_0x63bax3,_0x63bax4){UserHasSmsQueue[_0x8dd5[16]](_0x63bax3[_0x8dd5[17]])[_0x8dd5[8]](function(UserHasSmsQueue){return _0x63bax4[_0x8dd5[7]](201)[_0x8dd5[6]](UserHasSmsQueue)})[_0x8dd5[5]](function(_0x63bax5){return handleError(_0x63bax4,_0x63bax5)})};exports[_0x8dd5[18]]= function(_0x63bax3,_0x63bax4){if(_0x63bax3[_0x8dd5[17]][_0x8dd5[13]]){delete _0x63bax3[_0x8dd5[17]][_0x8dd5[13]]};UserHasSmsQueue[_0x8dd5[21]]({where:{id:_0x63bax3[_0x8dd5[14]][_0x8dd5[13]]}})[_0x8dd5[8]](function(UserHasSmsQueue){if(!UserHasSmsQueue){return _0x63bax4[_0x8dd5[12]](404)};var _0x63bax7=_[_0x8dd5[19]](UserHasSmsQueue,_0x63bax3[_0x8dd5[17]]);_0x63bax7[_0x8dd5[20]]()[_0x8dd5[8]](function(){return _0x63bax4[_0x8dd5[7]](200)[_0x8dd5[6]](UserHasSmsQueue)})[_0x8dd5[5]](function(_0x63bax5){return handleError(_0x63bax4,_0x63bax5)})})[_0x8dd5[5]](function(_0x63bax5){return handleError(_0x63bax4,_0x63bax5)})};exports[_0x8dd5[22]]= function(_0x63bax3,_0x63bax4){UserHasSmsQueue[_0x8dd5[21]]({where:{id:_0x63bax3[_0x8dd5[14]][_0x8dd5[13]]}})[_0x8dd5[8]](function(UserHasSmsQueue){if(!UserHasSmsQueue){return _0x63bax4[_0x8dd5[12]](404)};UserHasSmsQueue[_0x8dd5[22]]()[_0x8dd5[8]](function(){return _0x63bax4[_0x8dd5[12]](204)})[_0x8dd5[5]](function(_0x63bax5){return handleError(_0x63bax4,_0x63bax5)})})[_0x8dd5[5]](function(_0x63bax5){return handleError(_0x63bax4,_0x63bax5)})};function handleError(_0x63bax4,_0x63bax5){return _0x63bax4[_0x8dd5[7]](500)[_0x8dd5[6]](_0x63bax5)}
\ No newline at end of file
diff --git a/server/api/user_has_sms_queue/user_has_sms_queue.events.js b/server/api/user_has_sms_queue/user_has_sms_queue.events.js
index 2104253..c71b68a 100644
--- a/server/api/user_has_sms_queue/user_has_sms_queue.events.js
+++ b/server/api/user_has_sms_queue/user_has_sms_queue.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const UserHasSmsQueue = require('../../models').UserHasSmsQueue;
-
-var UserHasSmsQueueEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-UserHasSmsQueueEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  UserHasSmsQueue.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    UserHasSmsQueueEvents.emit(event + ':' + doc._id, doc);
-    UserHasSmsQueueEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = UserHasSmsQueueEvents;
+var _0x13ff=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x13ff[0];const EventEmitter=require(_0x13ff[1]);const UserHasSmsQueue=require(_0x13ff[3])[_0x13ff[2]];var UserHasSmsQueueEvents= new EventEmitter();UserHasSmsQueueEvents[_0x13ff[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x13ff[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x13ff[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x13ff[6]};for(var e in events){var event=events[e];UserHasSmsQueue[_0x13ff[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xaf92x8,_0xaf92x9,_0xaf92xa){UserHasSmsQueueEvents[_0x13ff[10]](event+ _0x13ff[8]+ _0xaf92x8[_0x13ff[9]],_0xaf92x8);UserHasSmsQueueEvents[_0x13ff[10]](event,_0xaf92x8);_0xaf92xa(null)}}module[_0x13ff[11]]= UserHasSmsQueueEvents
\ No newline at end of file
diff --git a/server/api/user_has_sms_queue/user_has_sms_queue.socket.js b/server/api/user_has_sms_queue/user_has_sms_queue.socket.js
index 7dfde5c..cd1d403 100644
--- a/server/api/user_has_sms_queue/user_has_sms_queue.socket.js
+++ b/server/api/user_has_sms_queue/user_has_sms_queue.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const UserHasSmsQueueEvents = require('./user_has_sms_queue.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('user_has_sms_queue:' + event, socket);
-
-    UserHasSmsQueueEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    UserHasSmsQueueEvents.removeListener(event, listener);
-  };
-}
+var _0x84f6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x84f6[0];const UserHasSmsQueueEvents=require(_0x84f6[1]);var events=[_0x84f6[2],_0x84f6[3]];exports[_0x84f6[4]]= function(_0xeb8dx3){for(var _0xeb8dx4=0,_0xeb8dx5=events[_0x84f6[5]];_0xeb8dx4< _0xeb8dx5;_0xeb8dx4++){var _0xeb8dx6=events[_0xeb8dx4];var _0xeb8dx7=createListener(_0x84f6[6]+ _0xeb8dx6,_0xeb8dx3);UserHasSmsQueueEvents[_0x84f6[7]](_0xeb8dx6,_0xeb8dx7);_0xeb8dx3[_0x84f6[7]](_0x84f6[8],removeListener(_0xeb8dx6,_0xeb8dx7))}};function createListener(_0xeb8dx6,_0xeb8dx3){return function(_0xeb8dx9){_0xeb8dx3[_0x84f6[9]](_0xeb8dx6,_0xeb8dx9)}}function removeListener(_0xeb8dx6,_0xeb8dx7){return function(){UserHasSmsQueueEvents[_0x84f6[10]](_0xeb8dx6,_0xeb8dx7)}}
\ No newline at end of file
diff --git a/server/api/user_has_sms_queue/user_has_sms_queue_permit.events.js b/server/api/user_has_sms_queue/user_has_sms_queue_permit.events.js
index b6b7a01..ff9ce4f 100644
--- a/server/api/user_has_sms_queue/user_has_sms_queue_permit.events.js
+++ b/server/api/user_has_sms_queue/user_has_sms_queue_permit.events.js
@@ -1,35 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const UserHasSmsQueuePermit = require('../../models').UserHasSmsQueuePermit;
-
-var UserHasSmsQueuePermitEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-UserHasSmsQueuePermitEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  UserHasSmsQueuePermit.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    UserHasSmsQueuePermitEvents.emit(event + ':' + doc._id, doc);
-    UserHasSmsQueuePermitEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = UserHasSmsQueuePermitEvents;
+var _0x31f9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\x51\x75\x65\x75\x65\x50\x65\x72\x6D\x69\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x31f9[0];const EventEmitter=require(_0x31f9[1]);const UserHasSmsQueuePermit=require(_0x31f9[3])[_0x31f9[2]];var UserHasSmsQueuePermitEvents= new EventEmitter();UserHasSmsQueuePermitEvents[_0x31f9[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x31f9[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x31f9[6]};for(var e in events){var event=events[e];UserHasSmsQueuePermit[_0x31f9[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xc40bx8,_0xc40bx9,_0xc40bxa){UserHasSmsQueuePermitEvents[_0x31f9[10]](event+ _0x31f9[8]+ _0xc40bx8[_0x31f9[9]],_0xc40bx8);UserHasSmsQueuePermitEvents[_0x31f9[10]](event,_0xc40bx8);_0xc40bxa(null)}}module[_0x31f9[11]]= UserHasSmsQueuePermitEvents
\ No newline at end of file
diff --git a/server/api/user_has_sms_queue/user_has_sms_queue_permit.socket.js b/server/api/user_has_sms_queue/user_has_sms_queue_permit.socket.js
index 2c2b49c..d53656b 100644
--- a/server/api/user_has_sms_queue/user_has_sms_queue_permit.socket.js
+++ b/server/api/user_has_sms_queue/user_has_sms_queue_permit.socket.js
@@ -1,34 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const UserHasSmsQueuePermitEvents = require('./user_has_sms_queue_permit.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('user_has_sms_queue_permit:' + event, socket);
-
-    UserHasSmsQueuePermitEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    if (socket.userId === doc.Userid) {
-      socket.emit('user_has_sms_queue_permit:change');
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    UserHasSmsQueuePermitEvents.removeListener(event, listener);
-  };
-}
+var _0x15f5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x69\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A\x63\x68\x61\x6E\x67\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x15f5[0];const UserHasSmsQueuePermitEvents=require(_0x15f5[1]);var events=[_0x15f5[2],_0x15f5[3]];exports[_0x15f5[4]]= function(_0xf783x3){for(var _0xf783x4=0,_0xf783x5=events[_0x15f5[5]];_0xf783x4< _0xf783x5;_0xf783x4++){var _0xf783x6=events[_0xf783x4];var _0xf783x7=createListener(_0x15f5[6]+ _0xf783x6,_0xf783x3);UserHasSmsQueuePermitEvents[_0x15f5[7]](_0xf783x6,_0xf783x7);_0xf783x3[_0x15f5[7]](_0x15f5[8],removeListener(_0xf783x6,_0xf783x7))}};function createListener(_0xf783x6,_0xf783x3){return function(_0xf783x9){if(_0xf783x3[_0x15f5[9]]=== _0xf783x9[_0x15f5[10]]){_0xf783x3[_0x15f5[12]](_0x15f5[11])}}}function removeListener(_0xf783x6,_0xf783x7){return function(){UserHasSmsQueuePermitEvents[_0x15f5[13]](_0xf783x6,_0xf783x7)}}
\ No newline at end of file
diff --git a/server/api/user_has_team/index.js b/server/api/user_has_team/index.js
index 723bdc1..9c419a8 100644
--- a/server/api/user_has_team/index.js
+++ b/server/api/user_has_team/index.js
@@ -1,15 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./user_has_team.controller');
-
-var router = express.Router();
-
-router.get('/', controller.index);
-router.get('/:id', controller.show);
-router.post('/', controller.create);
-router.put('/:id', controller.update);
-router.patch('/:id', controller.update);
-router.delete('/:id', controller.destroy);
-
-module.exports = router;
\ No newline at end of file
+var _0xb09a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xb09a[0];var express=require(_0xb09a[1]);var controller=require(_0xb09a[2]);var router=express.Router();router[_0xb09a[5]](_0xb09a[3],controller[_0xb09a[4]]);router[_0xb09a[5]](_0xb09a[6],controller[_0xb09a[7]]);router[_0xb09a[9]](_0xb09a[3],controller[_0xb09a[8]]);router[_0xb09a[11]](_0xb09a[6],controller[_0xb09a[10]]);router[_0xb09a[12]](_0xb09a[6],controller[_0xb09a[10]]);router[_0xb09a[14]](_0xb09a[6],controller[_0xb09a[13]]);module[_0xb09a[15]]= router
\ No newline at end of file
diff --git a/server/api/user_has_team/user_has_team.controller.js b/server/api/user_has_team/user_has_team.controller.js
index 7f0f426..3006147 100644
--- a/server/api/user_has_team/user_has_team.controller.js
+++ b/server/api/user_has_team/user_has_team.controller.js
@@ -1,96 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var UserHasTeam = require('../../models').UserHasTeam;
-
-// Get list of user_has_teams
-exports.index = function(req, res) {
-  console.log(req.query);
-  UserHasTeam
-    .findAll({
-      where: req.query
-    })
-    .then(function(user_has_teams) {
-      return res.status(200).send(user_has_teams);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single user_has_team
-exports.show = function(req, res) {
-  UserHasTeam
-    .findById(req.params.id)
-    .then(function(user_has_team) {
-      if (!user_has_team) {
-        return res.sendStatus(404);
-      }
-      return res.send(user_has_team);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new user_has_team in the DB.
-exports.create = function(req, res) {
-  UserHasTeam
-    .create(req.body)
-    .then(function(user_has_team) {
-      return res.status(201).send(user_has_team);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing user_has_team in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  UserHasTeam
-    .findById(req.params.id)
-    .then(function(user_has_team) {
-      if (!user_has_team) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(user_has_team, req.body);
-      updated.save()
-        .then(function() {
-          return res.status(200).send(user_has_team);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a user_has_team from the DB.
-exports.destroy = function(req, res) {
-  UserHasTeam
-    .findById(req.params.id)
-    .then(function(user_has_team) {
-      if (!user_has_team) {
-        return res.sendStatus(404);
-      }
-      user_has_team.destroy()
-        .then(function() {
-          return res.sendStatus(204);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x3cee=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x54\x65\x61\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x71\x75\x65\x72\x79","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x3cee[0];var _=require(_0x3cee[1]);var UserHasTeam=require(_0x3cee[3])[_0x3cee[2]];exports[_0x3cee[4]]= function(_0xb3c2x3,_0xb3c2x4){console[_0x3cee[6]](_0xb3c2x3[_0x3cee[5]]);UserHasTeam[_0x3cee[11]]({where:_0xb3c2x3[_0x3cee[5]]})[_0x3cee[10]](function(_0xb3c2x6){return _0xb3c2x4[_0x3cee[9]](200)[_0x3cee[8]](_0xb3c2x6)})[_0x3cee[7]](function(_0xb3c2x5){return handleError(_0xb3c2x4,_0xb3c2x5)})};exports[_0x3cee[12]]= function(_0xb3c2x3,_0xb3c2x4){UserHasTeam[_0x3cee[16]](_0xb3c2x3[_0x3cee[15]][_0x3cee[14]])[_0x3cee[10]](function(_0xb3c2x7){if(!_0xb3c2x7){return _0xb3c2x4[_0x3cee[13]](404)};return _0xb3c2x4[_0x3cee[8]](_0xb3c2x7)})[_0x3cee[7]](function(_0xb3c2x5){return handleError(_0xb3c2x4,_0xb3c2x5)})};exports[_0x3cee[17]]= function(_0xb3c2x3,_0xb3c2x4){UserHasTeam[_0x3cee[17]](_0xb3c2x3[_0x3cee[18]])[_0x3cee[10]](function(_0xb3c2x7){return _0xb3c2x4[_0x3cee[9]](201)[_0x3cee[8]](_0xb3c2x7)})[_0x3cee[7]](function(_0xb3c2x5){return handleError(_0xb3c2x4,_0xb3c2x5)})};exports[_0x3cee[19]]= function(_0xb3c2x3,_0xb3c2x4){if(_0xb3c2x3[_0x3cee[18]][_0x3cee[14]]){delete _0xb3c2x3[_0x3cee[18]][_0x3cee[14]]};UserHasTeam[_0x3cee[16]](_0xb3c2x3[_0x3cee[15]][_0x3cee[14]])[_0x3cee[10]](function(_0xb3c2x7){if(!_0xb3c2x7){return _0xb3c2x4[_0x3cee[13]](404)};var _0xb3c2x8=_[_0x3cee[20]](_0xb3c2x7,_0xb3c2x3[_0x3cee[18]]);_0xb3c2x8[_0x3cee[21]]()[_0x3cee[10]](function(){return _0xb3c2x4[_0x3cee[9]](200)[_0x3cee[8]](_0xb3c2x7)})[_0x3cee[7]](function(_0xb3c2x5){return handleError(_0xb3c2x4,_0xb3c2x5)})})[_0x3cee[7]](function(_0xb3c2x5){return handleError(_0xb3c2x4,_0xb3c2x5)})};exports[_0x3cee[22]]= function(_0xb3c2x3,_0xb3c2x4){UserHasTeam[_0x3cee[16]](_0xb3c2x3[_0x3cee[15]][_0x3cee[14]])[_0x3cee[10]](function(_0xb3c2x7){if(!_0xb3c2x7){return _0xb3c2x4[_0x3cee[13]](404)};_0xb3c2x7[_0x3cee[22]]()[_0x3cee[10]](function(){return _0xb3c2x4[_0x3cee[13]](204)})[_0x3cee[7]](function(_0xb3c2x5){return handleError(_0xb3c2x4,_0xb3c2x5)})})[_0x3cee[7]](function(_0xb3c2x5){return handleError(_0xb3c2x4,_0xb3c2x5)})};function handleError(_0xb3c2x4,_0xb3c2x5){return _0xb3c2x4[_0x3cee[9]](500)[_0x3cee[8]](_0xb3c2x5)}
\ No newline at end of file
diff --git a/server/api/user_has_team/user_has_team.events.js b/server/api/user_has_team/user_has_team.events.js
index ce02e87..bc8ac9b 100644
--- a/server/api/user_has_team/user_has_team.events.js
+++ b/server/api/user_has_team/user_has_team.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const UserHasTeam = require('../../models').UserHasTeam;
-
-var UserHasTeamEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-UserHasTeamEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  UserHasTeam.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    UserHasTeamEvents.emit(event + ':' + doc._id, doc);
-    UserHasTeamEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = UserHasTeamEvents;
+var _0x16bd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x54\x65\x61\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x16bd[0];const EventEmitter=require(_0x16bd[1]);const UserHasTeam=require(_0x16bd[3])[_0x16bd[2]];var UserHasTeamEvents= new EventEmitter();UserHasTeamEvents[_0x16bd[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x16bd[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x16bd[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x16bd[6]};for(var e in events){var event=events[e];UserHasTeam[_0x16bd[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7b24x8,_0x7b24x9,_0x7b24xa){UserHasTeamEvents[_0x16bd[10]](event+ _0x16bd[8]+ _0x7b24x8[_0x16bd[9]],_0x7b24x8);UserHasTeamEvents[_0x16bd[10]](event,_0x7b24x8);_0x7b24xa(null)}}module[_0x16bd[11]]= UserHasTeamEvents
\ No newline at end of file
diff --git a/server/api/user_has_team/user_has_team.socket.js b/server/api/user_has_team/user_has_team.socket.js
index 423b31f..1d8898b 100644
--- a/server/api/user_has_team/user_has_team.socket.js
+++ b/server/api/user_has_team/user_has_team.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const UserHasTeamEvents = require('./user_has_team.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('user_has_team:' + event, socket);
-
-    UserHasTeamEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    UserHasTeamEvents.removeListener(event, listener);
-  };
-}
+var _0x2267=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x2267[0];const UserHasTeamEvents=require(_0x2267[1]);var events=[_0x2267[2],_0x2267[3]];exports[_0x2267[4]]= function(_0xac12x3){for(var _0xac12x4=0,_0xac12x5=events[_0x2267[5]];_0xac12x4< _0xac12x5;_0xac12x4++){var _0xac12x6=events[_0xac12x4];var _0xac12x7=createListener(_0x2267[6]+ _0xac12x6,_0xac12x3);UserHasTeamEvents[_0x2267[7]](_0xac12x6,_0xac12x7);_0xac12x3[_0x2267[7]](_0x2267[8],removeListener(_0xac12x6,_0xac12x7))}};function createListener(_0xac12x6,_0xac12x3){return function(_0xac12x9){_0xac12x3[_0x2267[9]](_0xac12x6,_0xac12x9)}}function removeListener(_0xac12x6,_0xac12x7){return function(){UserHasTeamEvents[_0x2267[10]](_0xac12x6,_0xac12x7)}}
\ No newline at end of file
diff --git a/server/api/user_has_voice_queue/index.js b/server/api/user_has_voice_queue/index.js
index 7924edc..ae9164c 100644
--- a/server/api/user_has_voice_queue/index.js
+++ b/server/api/user_has_voice_queue/index.js
@@ -1,12 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./user_has_voice_queue.controller');
-var auth = require('../../auth/auth.service');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/describe', auth.isAuthenticated(), license.isValidDate(), auth.hasModule([], ['admin', 'user']), controller.describe);
-
-module.exports = router;
+var _0x7933=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7933[0];var express=require(_0x7933[1]);var controller=require(_0x7933[2]);var auth=require(_0x7933[3]);var license=require(_0x7933[4]);var router=express.Router();router[_0x7933[12]](_0x7933[5],auth[_0x7933[6]](),license[_0x7933[7]](),auth[_0x7933[10]]([],[_0x7933[8],_0x7933[9]]),controller[_0x7933[11]]);module[_0x7933[13]]= router
\ No newline at end of file
diff --git a/server/api/user_has_voice_queue/user_has_voice_queue.controller.js b/server/api/user_has_voice_queue/user_has_voice_queue.controller.js
index 2c6afc8..671b216 100644
--- a/server/api/user_has_voice_queue/user_has_voice_queue.controller.js
+++ b/server/api/user_has_voice_queue/user_has_voice_queue.controller.js
@@ -1,20 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var UserHasVoiceQueue = require('../../models').UserHasVoiceQueue;
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return UserHasVoiceQueue
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xe621=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x64\x65\x73\x63\x72\x69\x62\x65","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E"];_0xe621[0];var _=require(_0xe621[1]);var UserHasVoiceQueue=require(_0xe621[3])[_0xe621[2]];exports[_0xe621[4]]= function(_0x5713x3,_0x5713x4){return UserHasVoiceQueue[_0xe621[4]]()[_0xe621[8]](function(_0x5713x6){return _0x5713x4[_0xe621[7]](200)[_0xe621[6]](_0x5713x6)})[_0xe621[5]](function(_0x5713x5){return handleError(_0x5713x4,_0x5713x5)})};function handleError(_0x5713x4,_0x5713x5){return _0x5713x4[_0xe621[7]](500)[_0xe621[6]](_0x5713x5)}
\ No newline at end of file
diff --git a/server/api/user_has_voice_queue/user_has_voice_queue.events.js b/server/api/user_has_voice_queue/user_has_voice_queue.events.js
index aacd9a7..edf4dab 100644
--- a/server/api/user_has_voice_queue/user_has_voice_queue.events.js
+++ b/server/api/user_has_voice_queue/user_has_voice_queue.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const UserHasVoiceQueue = require('../../models').UserHasVoiceQueue;
-
-var UserHasVoiceQueueEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-UserHasVoiceQueueEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  UserHasVoiceQueue.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    UserHasVoiceQueueEvents.emit(event + ':' + doc._id, doc);
-    UserHasVoiceQueueEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = UserHasVoiceQueueEvents;
+var _0x7782=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7782[0];const EventEmitter=require(_0x7782[1]);const UserHasVoiceQueue=require(_0x7782[3])[_0x7782[2]];var UserHasVoiceQueueEvents= new EventEmitter();UserHasVoiceQueueEvents[_0x7782[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7782[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7782[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7782[6]};for(var e in events){var event=events[e];UserHasVoiceQueue[_0x7782[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xb82cx8,_0xb82cx9,_0xb82cxa){UserHasVoiceQueueEvents[_0x7782[10]](event+ _0x7782[8]+ _0xb82cx8[_0x7782[9]],_0xb82cx8);UserHasVoiceQueueEvents[_0x7782[10]](event,_0xb82cx8);_0xb82cxa(null)}}module[_0x7782[11]]= UserHasVoiceQueueEvents
\ No newline at end of file
diff --git a/server/api/user_has_voice_queue/user_has_voice_queue.socket.js b/server/api/user_has_voice_queue/user_has_voice_queue.socket.js
index 5056bed..18c8917 100644
--- a/server/api/user_has_voice_queue/user_has_voice_queue.socket.js
+++ b/server/api/user_has_voice_queue/user_has_voice_queue.socket.js
@@ -1,58 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const UserHasVoiceQueueEvents = require('./user_has_voice_queue.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('user_has_voice_queue:' + event, socket);
-
-    UserHasVoiceQueueEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'user_has_voice_queue:save':
-        socket.emit(event, {
-          logged: doc.logged,
-          loggedAt: doc.loggedAt,
-          queue: doc.queue,
-          membername: doc.membername,
-          interface: doc.interface,
-          callstaken: doc.callstaken,
-          lastcall: doc.lastcall,
-          status: doc.status,
-          statusdesc: doc.statusdesc,
-          statusAt: doc.statusAt,
-          paused: doc.paused,
-          pausedAt: doc.pausedAt,
-          reason: doc.reason,
-          UserId: doc.UserId
-        });
-        break;
-
-      case 'user_has_voice_queue:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    UserHasVoiceQueueEvents.removeListener(event, listener);
-  };
-}
+var _0xcf79=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x6C\x6F\x67\x67\x65\x64","\x6C\x6F\x67\x67\x65\x64\x41\x74","\x71\x75\x65\x75\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x63\x61\x6C\x6C\x73\x74\x61\x6B\x65\x6E","\x6C\x61\x73\x74\x63\x61\x6C\x6C","\x73\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73\x64\x65\x73\x63","\x73\x74\x61\x74\x75\x73\x41\x74","\x70\x61\x75\x73\x65\x64","\x70\x61\x75\x73\x65\x64\x41\x74","\x72\x65\x61\x73\x6F\x6E","\x55\x73\x65\x72\x49\x64","\x65\x6D\x69\x74","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xcf79[0];const UserHasVoiceQueueEvents=require(_0xcf79[1]);var events=[_0xcf79[2],_0xcf79[3]];exports[_0xcf79[4]]= function(_0x3356x3){for(var _0x3356x4=0,_0x3356x5=events[_0xcf79[5]];_0x3356x4< _0x3356x5;_0x3356x4++){var _0x3356x6=events[_0x3356x4];var _0x3356x7=createListener(_0xcf79[6]+ _0x3356x6,_0x3356x3);UserHasVoiceQueueEvents[_0xcf79[7]](_0x3356x6,_0x3356x7);_0x3356x3[_0xcf79[7]](_0xcf79[8],removeListener(_0x3356x6,_0x3356x7))}};function createListener(_0x3356x6,_0x3356x3){return function(_0x3356x9){switch(_0x3356x6){case _0xcf79[24]:_0x3356x3[_0xcf79[23]](_0x3356x6,{logged:_0x3356x9[_0xcf79[9]],loggedAt:_0x3356x9[_0xcf79[10]],queue:_0x3356x9[_0xcf79[11]],membername:_0x3356x9[_0xcf79[12]],interface:_0x3356x9[_0xcf79[13]],callstaken:_0x3356x9[_0xcf79[14]],lastcall:_0x3356x9[_0xcf79[15]],status:_0x3356x9[_0xcf79[16]],statusdesc:_0x3356x9[_0xcf79[17]],statusAt:_0x3356x9[_0xcf79[18]],paused:_0x3356x9[_0xcf79[19]],pausedAt:_0x3356x9[_0xcf79[20]],reason:_0x3356x9[_0xcf79[21]],UserId:_0x3356x9[_0xcf79[22]]});break;case _0xcf79[25]:_0x3356x3[_0xcf79[23]](_0x3356x6,_0x3356x9);break;default:}}}function removeListener(_0x3356x6,_0x3356x7){return function(){UserHasVoiceQueueEvents[_0xcf79[26]](_0x3356x6,_0x3356x7)}}
\ No newline at end of file
diff --git a/server/api/user_has_voice_queue/user_has_voice_queue_permit.events.js b/server/api/user_has_voice_queue/user_has_voice_queue_permit.events.js
index edcd78c..0abe7e2 100644
--- a/server/api/user_has_voice_queue/user_has_voice_queue_permit.events.js
+++ b/server/api/user_has_voice_queue/user_has_voice_queue_permit.events.js
@@ -1,35 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const UserHasVoiceQueuePermit = require('../../models').UserHasVoiceQueuePermit;
-
-var UserHasVoiceQueuePermitEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-UserHasVoiceQueuePermitEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  UserHasVoiceQueuePermit.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    UserHasVoiceQueuePermitEvents.emit(event + ':' + doc._id, doc);
-    UserHasVoiceQueuePermitEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = UserHasVoiceQueuePermitEvents;
+var _0x9d29=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x50\x65\x72\x6D\x69\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9d29[0];const EventEmitter=require(_0x9d29[1]);const UserHasVoiceQueuePermit=require(_0x9d29[3])[_0x9d29[2]];var UserHasVoiceQueuePermitEvents= new EventEmitter();UserHasVoiceQueuePermitEvents[_0x9d29[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x9d29[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x9d29[6]};for(var e in events){var event=events[e];UserHasVoiceQueuePermit[_0x9d29[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xeb66x8,_0xeb66x9,_0xeb66xa){UserHasVoiceQueuePermitEvents[_0x9d29[10]](event+ _0x9d29[8]+ _0xeb66x8[_0x9d29[9]],_0xeb66x8);UserHasVoiceQueuePermitEvents[_0x9d29[10]](event,_0xeb66x8);_0xeb66xa(null)}}module[_0x9d29[11]]= UserHasVoiceQueuePermitEvents
\ No newline at end of file
diff --git a/server/api/user_has_voice_queue/user_has_voice_queue_permit.socket.js b/server/api/user_has_voice_queue/user_has_voice_queue_permit.socket.js
index 877e1e4..861f7d7 100644
--- a/server/api/user_has_voice_queue/user_has_voice_queue_permit.socket.js
+++ b/server/api/user_has_voice_queue/user_has_voice_queue_permit.socket.js
@@ -1,34 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const UserHasVoiceQueuePermitEvents = require('./user_has_voice_queue_permit.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('user_has_voice_queue_permit:' + event, socket);
-
-    UserHasVoiceQueuePermitEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    if (socket.userId === doc.Userid) {
-      socket.emit('user_has_voice_queue_permit:change');
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    UserHasVoiceQueuePermitEvents.removeListener(event, listener);
-  };
-}
+var _0x9e28=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x69\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A\x63\x68\x61\x6E\x67\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x9e28[0];const UserHasVoiceQueuePermitEvents=require(_0x9e28[1]);var events=[_0x9e28[2],_0x9e28[3]];exports[_0x9e28[4]]= function(_0xcd26x3){for(var _0xcd26x4=0,_0xcd26x5=events[_0x9e28[5]];_0xcd26x4< _0xcd26x5;_0xcd26x4++){var _0xcd26x6=events[_0xcd26x4];var _0xcd26x7=createListener(_0x9e28[6]+ _0xcd26x6,_0xcd26x3);UserHasVoiceQueuePermitEvents[_0x9e28[7]](_0xcd26x6,_0xcd26x7);_0xcd26x3[_0x9e28[7]](_0x9e28[8],removeListener(_0xcd26x6,_0xcd26x7))}};function createListener(_0xcd26x6,_0xcd26x3){return function(_0xcd26x9){if(_0xcd26x3[_0x9e28[9]]=== _0xcd26x9[_0x9e28[10]]){_0xcd26x3[_0x9e28[12]](_0x9e28[11])}}}function removeListener(_0xcd26x6,_0xcd26x7){return function(){UserHasVoiceQueuePermitEvents[_0x9e28[13]](_0xcd26x6,_0xcd26x7)}}
\ No newline at end of file
diff --git a/server/api/variable/index.js b/server/api/variable/index.js
index 21b09cd..5b60804 100644
--- a/server/api/variable/index.js
+++ b/server/api/variable/index.js
@@ -1,166 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./variable.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-/**
- * @api {get} /api/variables/ Get Variables' list.
- *
- * @apiParam (Query) {Number} [offset] Pagination offset.
- * @apiParam (Query) {Number} [limit] Pagination limit.
- *
- * @apiVersion 0.0.143
- * @apiName GetVariables
- * @apiGroup Variables
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Number} count Number of variables.
- * @apiSuccess {Object[]} rows  Variables' list.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *       "count": 2,
- *       "rows": [{
- *          "id": 1
- *          "name": "variable1"
- *          "description": "my variable description"
- *           ...
- *       },{
- *          "id": 2
- *          "name": "newvariable"
- *          "description": null
- *          ...
- *       },...]
- *     }
- */
-router.get('/', auth.isAuthenticated(), auth.hasModule([13, 14], ['admin']), controller.index);
-/**
- * @api {get} /api/variables/:id Get Variable's details.
- * @apiParam {Number} id Variable's unique ID.
- * @apiVersion 0.0.143
- * @apiName GetVariable
- * @apiGroup Variables
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccess {Object} Variable's details.
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *          "id": 1
- *          "name": "variable1"
- *          "description": "my variable description"
- *          ...
- *       }
- */
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show);
-/**
- * @api {post} /api/variables/ Create a new variable.
- * @apiParam (body) {String} name Variable's name.
- * @apiParam (body) {String} [description] Variable's description.
- *
- * @apiVersion 0.0.143
- * @apiName CreateVariable
- * @apiGroup Variables
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 201 Created
- *     {
- *        "id": 3
- *        "name": "Variable3"
- *        "description": "my variable"
- *        ...
- *     }
- */
-router.post('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.create);
-/**
- * @api {put} /api/variables/:id Update variable's details.
- * @apiParam {Number} id Variable's unique ID.
- * @apiParam (body) {String} name Variable's name.
- * @apiParam (body) {String} [description] Variable's description.
- *
- * @apiVersion 0.0.143
- * @apiName UpdateVariable
- * @apiGroup Variables
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 200 OK
- *     {
- *        "id": 3
- *        "name": "Variable 3"
- *        "description": "My new description"
- *        ...
- *     }
- */
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update);
-/**
- * @api {delete} /api/variables/ Bulk Delete variables.
- *
- * @apiParam (Query) {Number[]} ids Variables' unique ID array.
- *
- * @apiVersion 0.0.143
- * @apiName BulkDeleteVariables
- * @apiGroup Variables
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.bulkDestroy);
-/**
- * @api {delete} /api/variables/:id Delete a variable.
- *
- * @apiParam {Number} id Variable's unique ID.
- *
- * @apiVersion 0.0.143
- * @apiName DeleteVariable
- * @apiGroup Variables
- *
- * @apiHeader (Header) {String} Authorization Authorization access token.
- *
- * @apiHeaderExample {json} Header-Example:
- *     {
- *       "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI"
- *     }
- *
- * @apiSuccessExample {json} Success-Response:
- *     HTTP/1.1 204 No Content
- */
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0x1334=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x1334[0];var express=require(_0x1334[1]);var controller=require(_0x1334[2]);var auth=require(_0x1334[3]);var router=express.Router();router[_0x1334[9]](_0x1334[4],auth[_0x1334[5]](),auth[_0x1334[7]]([13,14],[_0x1334[6]]),controller[_0x1334[8]]);router[_0x1334[9]](_0x1334[10],auth[_0x1334[5]](),auth[_0x1334[7]]([13],[_0x1334[6]]),controller[_0x1334[11]]);router[_0x1334[13]](_0x1334[4],auth[_0x1334[5]](),auth[_0x1334[7]]([13],[_0x1334[6]]),controller[_0x1334[12]]);router[_0x1334[15]](_0x1334[10],auth[_0x1334[5]](),auth[_0x1334[7]]([13],[_0x1334[6]]),controller[_0x1334[14]]);router[_0x1334[17]](_0x1334[4],auth[_0x1334[5]](),auth[_0x1334[7]]([13],[_0x1334[6]]),controller[_0x1334[16]]);router[_0x1334[17]](_0x1334[10],auth[_0x1334[5]](),auth[_0x1334[7]]([13],[_0x1334[6]]),controller[_0x1334[18]]);module[_0x1334[19]]= router
\ No newline at end of file
diff --git a/server/api/variable/variable.controller.js b/server/api/variable/variable.controller.js
index 2378a95..2f4b52f 100644
--- a/server/api/variable/variable.controller.js
+++ b/server/api/variable/variable.controller.js
@@ -1,117 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Variable = require('../../models').Variable;
-var Util = require('../../config/util');
-
-// Get list of variables
-exports.index = function(req, res, next) {
-  return Variable
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single variable
-exports.show = function(req, res) {
-  return Variable
-    .findById(req.params.id)
-    .then(function(variable) {
-      if (!variable) {
-        return res.sendStatus(404);
-      }
-      return res.send(variable);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new variable in the DB.
-exports.create = function(req, res) {
-  return Variable
-    .create(req.body)
-    .then(function(variable) {
-      return res.status(201).send(variable);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing variable in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return Variable
-    .findById(req.params.id)
-    .then(function(variable) {
-      if (!variable) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(variable, req.body);
-      return updated
-        .save();
-    })
-    .then(function(variable) {
-      return res.status(200).send(variable);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a variable from the DB.
-exports.destroy = function(req, res) {
-  return Variable
-    .scope('fields')
-    .findById(req.params.id)
-    .then(function(variable) {
-      if (!variable) {
-        return res.sendStatus(404);
-      }
-      if (variableHasAssociation(variable)) {
-        var err = new Error();
-        err.message = 'Variable is associated with an integration\'s configuration';
-        throw err;
-      }
-      return variable.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.bulkDestroy = function(req, res) {
-  return Variable
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
-
-function variableHasAssociation(variable) {
-  return ((variable.ZendeskFields && variable.ZendeskFields.length > 0) || (variable.DeskFields && variable.DeskFields.length > 0) || (variable.SalesforceFields && variable.SalesforceFields.length >
-    0) || (variable.FreshdeskFields && variable.FreshdeskFields.length > 0) || (variable.SugarcrmFields && variable.SugarcrmFields.length > 0));
-}
+var _0xf162=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x61\x72\x69\x61\x62\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x6D\x65\x73\x73\x61\x67\x65","\x56\x61\x72\x69\x61\x62\x6C\x65\x20\x69\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x61\x6E\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x27\x73\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x73"];_0xf162[0];var _=require(_0xf162[1]);var Variable=require(_0xf162[3])[_0xf162[2]];var Util=require(_0xf162[4]);exports[_0xf162[5]]= function(_0xa80bx4,_0xa80bx5,_0xa80bx6){return Variable[_0xf162[12]](Util[_0xf162[11]](_0xa80bx4[_0xf162[10]]))[_0xf162[9]](function(_0xa80bx8){_0xa80bx5[_0xf162[8]](200)[_0xf162[7]](_0xa80bx8)})[_0xf162[6]](function(_0xa80bx7){return handleError(_0xa80bx5,_0xa80bx7)})};exports[_0xf162[13]]= function(_0xa80bx4,_0xa80bx5){return Variable[_0xf162[17]](_0xa80bx4[_0xf162[16]][_0xf162[15]])[_0xf162[9]](function(_0xa80bx9){if(!_0xa80bx9){return _0xa80bx5[_0xf162[14]](404)};return _0xa80bx5[_0xf162[7]](_0xa80bx9)})[_0xf162[6]](function(_0xa80bx7){return handleError(_0xa80bx5,_0xa80bx7)})};exports[_0xf162[18]]= function(_0xa80bx4,_0xa80bx5){return Variable[_0xf162[18]](_0xa80bx4[_0xf162[19]])[_0xf162[9]](function(_0xa80bx9){return _0xa80bx5[_0xf162[8]](201)[_0xf162[7]](_0xa80bx9)})[_0xf162[6]](function(_0xa80bx7){return handleError(_0xa80bx5,_0xa80bx7)})};exports[_0xf162[20]]= function(_0xa80bx4,_0xa80bx5){if(_0xa80bx4[_0xf162[19]][_0xf162[15]]){delete _0xa80bx4[_0xf162[19]][_0xf162[15]]};return Variable[_0xf162[17]](_0xa80bx4[_0xf162[16]][_0xf162[15]])[_0xf162[9]](function(_0xa80bx9){if(!_0xa80bx9){return _0xa80bx5[_0xf162[14]](404)};var _0xa80bxa=_[_0xf162[21]](_0xa80bx9,_0xa80bx4[_0xf162[19]]);return _0xa80bxa[_0xf162[22]]()})[_0xf162[9]](function(_0xa80bx9){return _0xa80bx5[_0xf162[8]](200)[_0xf162[7]](_0xa80bx9)})[_0xf162[6]](function(_0xa80bx7){return handleError(_0xa80bx5,_0xa80bx7)})};exports[_0xf162[23]]= function(_0xa80bx4,_0xa80bx5){return Variable[_0xf162[27]](_0xf162[26])[_0xf162[17]](_0xa80bx4[_0xf162[16]][_0xf162[15]])[_0xf162[9]](function(_0xa80bx9){if(!_0xa80bx9){return _0xa80bx5[_0xf162[14]](404)};if(variableHasAssociation(_0xa80bx9)){var _0xa80bx7= new Error();_0xa80bx7[_0xf162[24]]= _0xf162[25];throw _0xa80bx7};return _0xa80bx9[_0xf162[23]]()})[_0xf162[9]](function(){return _0xa80bx5[_0xf162[14]](204)})[_0xf162[6]](function(_0xa80bx7){return handleError(_0xa80bx5,_0xa80bx7)})};exports[_0xf162[28]]= function(_0xa80bx4,_0xa80bx5){return Variable[_0xf162[23]]({where:{id:_0xa80bx4[_0xf162[10]][_0xf162[29]]},individualHooks:true})[_0xf162[9]](function(){return _0xa80bx5[_0xf162[14]](204)})[_0xf162[6]](function(_0xa80bx7){return handleError(_0xa80bx5,_0xa80bx7)})};function handleError(_0xa80bx5,_0xa80bx7){return _0xa80bx5[_0xf162[8]](500)[_0xf162[7]](_0xa80bx7)}function variableHasAssociation(_0xa80bx9){return ((_0xa80bx9[_0xf162[30]]&& _0xa80bx9[_0xf162[30]][_0xf162[31]]> 0)|| (_0xa80bx9[_0xf162[32]]&& _0xa80bx9[_0xf162[32]][_0xf162[31]]> 0)|| (_0xa80bx9[_0xf162[33]]&& _0xa80bx9[_0xf162[33]][_0xf162[31]]> 0)|| (_0xa80bx9[_0xf162[34]]&& _0xa80bx9[_0xf162[34]][_0xf162[31]]> 0)|| (_0xa80bx9[_0xf162[35]]&& _0xa80bx9[_0xf162[35]][_0xf162[31]]> 0))}
\ No newline at end of file
diff --git a/server/api/variable/variable.events.js b/server/api/variable/variable.events.js
index 2f51fee..fb05716 100644
--- a/server/api/variable/variable.events.js
+++ b/server/api/variable/variable.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const Variable = require('../../models').Variable;
-
-var VariableEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-VariableEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  Variable.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    VariableEvents.emit(event + ':' + doc._id, doc);
-    VariableEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = VariableEvents;
+var _0xb5d0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x61\x72\x69\x61\x62\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xb5d0[0];const EventEmitter=require(_0xb5d0[1]);const Variable=require(_0xb5d0[3])[_0xb5d0[2]];var VariableEvents= new EventEmitter();VariableEvents[_0xb5d0[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb5d0[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb5d0[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb5d0[6]};for(var e in events){var event=events[e];Variable[_0xb5d0[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x3af5x8,_0x3af5x9,_0x3af5xa){VariableEvents[_0xb5d0[10]](event+ _0xb5d0[8]+ _0x3af5x8[_0xb5d0[9]],_0x3af5x8);VariableEvents[_0xb5d0[10]](event,_0x3af5x8);_0x3af5xa(null)}}module[_0xb5d0[11]]= VariableEvents
\ No newline at end of file
diff --git a/server/api/variable/variable.socket.js b/server/api/variable/variable.socket.js
index 32f14e8..6d979a2 100644
--- a/server/api/variable/variable.socket.js
+++ b/server/api/variable/variable.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const VariableEvents = require('./variable.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('variable:' + event, socket);
-
-    VariableEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    VariableEvents.removeListener(event, listener);
-  };
-}
+var _0x5a15=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x61\x72\x69\x61\x62\x6C\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x5a15[0];const VariableEvents=require(_0x5a15[1]);var events=[_0x5a15[2],_0x5a15[3]];exports[_0x5a15[4]]= function(_0x937fx3){for(var _0x937fx4=0,_0x937fx5=events[_0x5a15[5]];_0x937fx4< _0x937fx5;_0x937fx4++){var _0x937fx6=events[_0x937fx4];var _0x937fx7=createListener(_0x5a15[6]+ _0x937fx6,_0x937fx3);VariableEvents[_0x5a15[7]](_0x937fx6,_0x937fx7);_0x937fx3[_0x5a15[7]](_0x5a15[8],removeListener(_0x937fx6,_0x937fx7))}};function createListener(_0x937fx6,_0x937fx3){return function(_0x937fx9){_0x937fx3[_0x5a15[9]](_0x937fx6,_0x937fx9)}}function removeListener(_0x937fx6,_0x937fx7){return function(){VariableEvents[_0x5a15[10]](_0x937fx6,_0x937fx7)}}
\ No newline at end of file
diff --git a/server/api/voice_context/index.js b/server/api/voice_context/index.js
index 8f14e04..633923c 100644
--- a/server/api/voice_context/index.js
+++ b/server/api/voice_context/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./voice_context.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.create);
-router.post('/validate', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.contextValidation);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.update);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.destroy);
-module.exports = router;
+var _0xfb15=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65","\x63\x6F\x6E\x74\x65\x78\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xfb15[0];var express=require(_0xfb15[1]);var controller=require(_0xfb15[2]);var auth=require(_0xfb15[3]);var router=express.Router();router[_0xfb15[9]](_0xfb15[4],auth[_0xfb15[5]](),auth[_0xfb15[7]]([7],[_0xfb15[6]]),controller[_0xfb15[8]]);router[_0xfb15[9]](_0xfb15[10],auth[_0xfb15[5]](),auth[_0xfb15[7]]([7],[_0xfb15[6]]),controller[_0xfb15[11]]);router[_0xfb15[13]](_0xfb15[4],auth[_0xfb15[5]](),auth[_0xfb15[7]]([7],[_0xfb15[6]]),controller[_0xfb15[12]]);router[_0xfb15[13]](_0xfb15[14],auth[_0xfb15[5]](),auth[_0xfb15[7]]([7],[_0xfb15[6]]),controller[_0xfb15[15]]);router[_0xfb15[17]](_0xfb15[10],auth[_0xfb15[5]](),auth[_0xfb15[7]]([7],[_0xfb15[6]]),controller[_0xfb15[16]]);router[_0xfb15[19]](_0xfb15[4],auth[_0xfb15[5]](),auth[_0xfb15[7]]([7],[_0xfb15[6]]),controller[_0xfb15[18]]);router[_0xfb15[19]](_0xfb15[10],auth[_0xfb15[5]](),auth[_0xfb15[7]]([7],[_0xfb15[6]]),controller[_0xfb15[20]]);module[_0xfb15[21]]= router
\ No newline at end of file
diff --git a/server/api/voice_context/voice_context.controller.js b/server/api/voice_context/voice_context.controller.js
index c6ec224..72f6777 100644
--- a/server/api/voice_context/voice_context.controller.js
+++ b/server/api/voice_context/voice_context.controller.js
@@ -1,227 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-
-var Util = require('../../config/util');
-var sequelize = require('../../models').sequelize;
-
-var VoiceContext = require('../../models').VoiceContext;
-var VoiceExtension = require('../../models').VoiceExtension;
-
-// Get list of agents
-exports.index = function(req, res, next) {
-  return VoiceContext
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single voiceContext
-exports.show = function(req, res) {
-  return VoiceContext
-    .findById(req.params.id)
-    .then(function(voiceContext) {
-      if (!voiceContext) {
-        return res.sendStatus(404);
-      }
-      return res.send(voiceContext);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Validate the existence of a context
-exports.contextValidation = function(req, res) {
-  return VoiceContext
-    .findAll({
-      where: {
-        name: req.body.name
-      }
-    })
-    .then(function(voiceContexts) {
-      if (!voiceContexts) {
-        return res.sendStatus(404);
-      }
-      return res.send(voiceContexts);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new voiceContext in the DB.
-exports.create = function(req, res) {
-  return VoiceContext
-    .create(req.body)
-    .then(function(voiceContext) {
-      return res.status(201).send(voiceContext);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      err.message = 'The context name already exists';
-      err.translatedMessage = 'MESSAGE_EXIST_CONTEXT'
-      return handleError(res, err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-};
-
-// Updates an existing voiceContext in the DB.
-exports.update = function(req, res) {
-  return VoiceContext
-    .findAll({
-      where: {
-        name: req.body.name,
-        id: {
-          $ne: req.body.id
-        }
-      }
-    })
-    .then(function(existingContexts) {
-      if (!existingContexts) {
-        return res.sendStatus(404);
-      }
-      if (existingContexts.length > 0) {
-        return res.status(500).send({
-          message: 'MESSAGE_EXIST_CONTEXT'
-        });
-      }
-      if (req.body.id) {
-        delete req.body.id;
-      }
-      return VoiceContext
-        .findById(req.params.id);
-    })
-    .then(function(voiceContext) {
-      if (!voiceContext) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(voiceContext, req.body);
-      return updated
-        .save();
-    })
-    .then(function(voiceContext) {
-      return res.status(200).send(voiceContext);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-};
-
-// Deletes a voiceContext from the DB.
-exports.destroy = function(req, res) {
-  var _voiceContext;
-
-  return VoiceContext
-    .findById(req.params.id)
-    .then(function(voiceContext) {
-      _voiceContext = voiceContext;
-      if (!_voiceContext) {
-        return res.sendStatus(404);
-      }
-      if (_voiceContext.defaultEntry) {
-        return res.status(500).send({
-          message: 'You can\'t delete a default entry!',
-          translatedMessage: 'MESSAGE_DEFAULT_ENTRY'
-        });
-      }
-      return VoiceExtension
-        .findAll({
-          where: {
-            context: _voiceContext.name,
-            VoiceContextId: null
-          }
-        });
-    })
-    .then(function(contextExtensions) {
-      console.log(contextExtensions);
-      if (contextExtensions.length > 0) {
-        return res.status(500).send({
-          message: 'The context is associated to a route, delete or change it first',
-          translatedMessage: 'MESSAGE_CONTEXT_ROUTE_ASSOCIATED'
-        });
-      }
-      return _voiceContext
-        .destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      console.log('err', err);
-      return handleError(res, err);
-    });
-
-};
-
-// Deletes a context from the DB.
-exports.bulkDestroy = function(req, res) {
-
-  var _voiceContexts;
-
-  return VoiceContext
-    .findAll({
-      where: {
-        id: req.query.ids
-      }
-    })
-    .then(function(voiceContexts) {
-      _voiceContexts = voiceContexts;
-      var isDefault = _.find(_voiceContexts, {
-        defaultEntry: true
-      });
-      if (isDefault) {
-        return res.status(500).send({
-          message: 'You can\'t delete a default entry!',
-          translatedMessage: 'MESSAGE_DEFAULT_ENTRY'
-        });
-      }
-      if (!_voiceContexts) {
-        return res.sendStatus(404);
-      }
-      var destroyContextsNames = _.map(_.map(_voiceContexts, 'dataValues'), 'name');
-
-      return VoiceExtension
-        .findAll({
-          where: {
-            context: destroyContextsNames,
-            VoiceContextId: null
-          }
-        });
-    })
-    .then(function(contextExtensions) {
-      if (contextExtensions.length > _voiceContexts.length) {
-        return res.status(500).send({
-          message: 'The context is associated to a route, delete or change it first',
-          translatedMessage: 'MESSAGE_CONTEXT_ROUTE_ASSOCIATED'
-        });
-      }
-
-      return VoiceContext
-        .destroy({
-          where: {
-            id: req.query.ids
-          },
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x116c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x6F\x6E\x74\x65\x78\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x62\x6F\x64\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x6D\x65\x73\x73\x61\x67\x65","\x54\x68\x65\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x6E\x61\x6D\x65\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74\x73","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x43\x4F\x4E\x54\x45\x58\x54","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x73\x74\x72\x6F\x79","\x65\x72\x72","\x6C\x6F\x67","\x54\x68\x65\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x69\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x74\x6F\x20\x61\x20\x72\x6F\x75\x74\x65\x2C\x20\x64\x65\x6C\x65\x74\x65\x20\x6F\x72\x20\x63\x68\x61\x6E\x67\x65\x20\x69\x74\x20\x66\x69\x72\x73\x74","\x4D\x45\x53\x53\x41\x47\x45\x5F\x43\x4F\x4E\x54\x45\x58\x54\x5F\x52\x4F\x55\x54\x45\x5F\x41\x53\x53\x4F\x43\x49\x41\x54\x45\x44","\x64\x65\x66\x61\x75\x6C\x74\x45\x6E\x74\x72\x79","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x64\x65\x6C\x65\x74\x65\x20\x61\x20\x64\x65\x66\x61\x75\x6C\x74\x20\x65\x6E\x74\x72\x79\x21","\x4D\x45\x53\x53\x41\x47\x45\x5F\x44\x45\x46\x41\x55\x4C\x54\x5F\x45\x4E\x54\x52\x59","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x66\x69\x6E\x64","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x61\x70"];_0x116c[0];var _=require(_0x116c[1]);var util=require(_0x116c[2]);var Util=require(_0x116c[3]);var sequelize=require(_0x116c[5])[_0x116c[4]];var VoiceContext=require(_0x116c[5])[_0x116c[6]];var VoiceExtension=require(_0x116c[5])[_0x116c[7]];exports[_0x116c[8]]= function(_0x1f35x7,_0x1f35x8,_0x1f35x9){return VoiceContext[_0x116c[15]](Util[_0x116c[14]](_0x1f35x7[_0x116c[13]]))[_0x116c[12]](function(_0x1f35xb){_0x1f35x8[_0x116c[11]](200)[_0x116c[10]](_0x1f35xb)})[_0x116c[9]](function(_0x1f35xa){return handleError(_0x1f35x8,_0x1f35xa)})};exports[_0x116c[16]]= function(_0x1f35x7,_0x1f35x8){return VoiceContext[_0x116c[20]](_0x1f35x7[_0x116c[19]][_0x116c[18]])[_0x116c[12]](function(_0x1f35xc){if(!_0x1f35xc){return _0x1f35x8[_0x116c[17]](404)};return _0x1f35x8[_0x116c[10]](_0x1f35xc)})[_0x116c[9]](function(_0x1f35xa){return handleError(_0x1f35x8,_0x1f35xa)})};exports[_0x116c[21]]= function(_0x1f35x7,_0x1f35x8){return VoiceContext[_0x116c[24]]({where:{name:_0x1f35x7[_0x116c[23]][_0x116c[22]]}})[_0x116c[12]](function(_0x1f35xd){if(!_0x1f35xd){return _0x1f35x8[_0x116c[17]](404)};return _0x1f35x8[_0x116c[10]](_0x1f35xd)})[_0x116c[9]](function(_0x1f35xa){return handleError(_0x1f35x8,_0x1f35xa)})};exports[_0x116c[25]]= function(_0x1f35x7,_0x1f35x8){return VoiceContext[_0x116c[25]](_0x1f35x7[_0x116c[23]])[_0x116c[12]](function(_0x1f35xc){return _0x1f35x8[_0x116c[11]](201)[_0x116c[10]](_0x1f35xc)})[_0x116c[9]](sequelize.UniqueConstraintError,function(_0x1f35xa){_0x1f35xa[_0x116c[26]]= _0x116c[27];_0x1f35xa[_0x116c[28]]= _0x116c[29];return handleError(_0x1f35x8,_0x1f35xa)})[_0x116c[9]](function(_0x1f35xa){return handleError(_0x1f35x8,_0x1f35xa)})};exports[_0x116c[30]]= function(_0x1f35x7,_0x1f35x8){return VoiceContext[_0x116c[24]]({where:{name:_0x1f35x7[_0x116c[23]][_0x116c[22]],id:{$ne:_0x1f35x7[_0x116c[23]][_0x116c[18]]}}})[_0x116c[12]](function(_0x1f35xf){if(!_0x1f35xf){return _0x1f35x8[_0x116c[17]](404)};if(_0x1f35xf[_0x116c[33]]> 0){return _0x1f35x8[_0x116c[11]](500)[_0x116c[10]]({message:_0x116c[29]})};if(_0x1f35x7[_0x116c[23]][_0x116c[18]]){delete _0x1f35x7[_0x116c[23]][_0x116c[18]]};return VoiceContext[_0x116c[20]](_0x1f35x7[_0x116c[19]][_0x116c[18]])})[_0x116c[12]](function(_0x1f35xc){if(!_0x1f35xc){return _0x1f35x8[_0x116c[17]](404)};var _0x1f35xe=_[_0x116c[31]](_0x1f35xc,_0x1f35x7[_0x116c[23]]);return _0x1f35xe[_0x116c[32]]()})[_0x116c[12]](function(_0x1f35xc){return _0x1f35x8[_0x116c[11]](200)[_0x116c[10]](_0x1f35xc)})[_0x116c[9]](function(_0x1f35xa){return handleError(_0x1f35x8,_0x1f35xa)})};exports[_0x116c[34]]= function(_0x1f35x7,_0x1f35x8){var _0x1f35x10;return VoiceContext[_0x116c[20]](_0x1f35x7[_0x116c[19]][_0x116c[18]])[_0x116c[12]](function(_0x1f35xc){_0x1f35x10= _0x1f35xc;if(!_0x1f35x10){return _0x1f35x8[_0x116c[17]](404)};if(_0x1f35x10[_0x116c[39]]){return _0x1f35x8[_0x116c[11]](500)[_0x116c[10]]({message:_0x116c[40],translatedMessage:_0x116c[41]})};return VoiceExtension[_0x116c[24]]({where:{context:_0x1f35x10[_0x116c[22]],VoiceContextId:null}})})[_0x116c[12]](function(_0x1f35x11){console[_0x116c[36]](_0x1f35x11);if(_0x1f35x11[_0x116c[33]]> 0){return _0x1f35x8[_0x116c[11]](500)[_0x116c[10]]({message:_0x116c[37],translatedMessage:_0x116c[38]})};return _0x1f35x10[_0x116c[34]]()})[_0x116c[12]](function(){return _0x1f35x8[_0x116c[17]](204)})[_0x116c[9]](function(_0x1f35xa){console[_0x116c[36]](_0x116c[35],_0x1f35xa);return handleError(_0x1f35x8,_0x1f35xa)})};exports[_0x116c[42]]= function(_0x1f35x7,_0x1f35x8){var _0x1f35x12;return VoiceContext[_0x116c[24]]({where:{id:_0x1f35x7[_0x116c[13]][_0x116c[43]]}})[_0x116c[12]](function(_0x1f35xd){_0x1f35x12= _0x1f35xd;var _0x1f35x13=_[_0x116c[44]](_0x1f35x12,{defaultEntry:true});if(_0x1f35x13){return _0x1f35x8[_0x116c[11]](500)[_0x116c[10]]({message:_0x116c[40],translatedMessage:_0x116c[41]})};if(!_0x1f35x12){return _0x1f35x8[_0x116c[17]](404)};var _0x1f35x14=_[_0x116c[46]](_[_0x116c[46]](_0x1f35x12,_0x116c[45]),_0x116c[22]);return VoiceExtension[_0x116c[24]]({where:{context:_0x1f35x14,VoiceContextId:null}})})[_0x116c[12]](function(_0x1f35x11){if(_0x1f35x11[_0x116c[33]]> _0x1f35x12[_0x116c[33]]){return _0x1f35x8[_0x116c[11]](500)[_0x116c[10]]({message:_0x116c[37],translatedMessage:_0x116c[38]})};return VoiceContext[_0x116c[34]]({where:{id:_0x1f35x7[_0x116c[13]][_0x116c[43]]},individualHooks:true})})[_0x116c[12]](function(){return _0x1f35x8[_0x116c[17]](204)})[_0x116c[9]](function(_0x1f35xa){console[_0x116c[36]](_0x1f35xa);return handleError(_0x1f35x8,_0x1f35xa)})};function handleError(_0x1f35x8,_0x1f35xa){return _0x1f35x8[_0x116c[11]](500)[_0x116c[10]](_0x1f35xa)}
\ No newline at end of file
diff --git a/server/api/voice_context/voice_context.events.js b/server/api/voice_context/voice_context.events.js
index c7c0711..8a3bb34 100644
--- a/server/api/voice_context/voice_context.events.js
+++ b/server/api/voice_context/voice_context.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const VoiceContext = require('../../models').VoiceContext;
-
-var VoiceContextEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-VoiceContextEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  VoiceContext.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    VoiceContextEvents.emit(event + ':' + doc._id, doc);
-    VoiceContextEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = VoiceContextEvents;
+var _0xf6ea=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xf6ea[0];const EventEmitter=require(_0xf6ea[1]);const VoiceContext=require(_0xf6ea[3])[_0xf6ea[2]];var VoiceContextEvents= new EventEmitter();VoiceContextEvents[_0xf6ea[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xf6ea[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xf6ea[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xf6ea[6]};for(var e in events){var event=events[e];VoiceContext[_0xf6ea[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7a04x8,_0x7a04x9,_0x7a04xa){VoiceContextEvents[_0xf6ea[10]](event+ _0xf6ea[8]+ _0x7a04x8[_0xf6ea[9]],_0x7a04x8);VoiceContextEvents[_0xf6ea[10]](event,_0x7a04x8);_0x7a04xa(null)}}module[_0xf6ea[11]]= VoiceContextEvents
\ No newline at end of file
diff --git a/server/api/voice_context/voice_context.socket.js b/server/api/voice_context/voice_context.socket.js
index 34a2d6e..3b05298 100644
--- a/server/api/voice_context/voice_context.socket.js
+++ b/server/api/voice_context/voice_context.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const VoiceContextEvents = require('./voice_context.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('voice_context:' + event, socket);
-
-    VoiceContextEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    VoiceContextEvents.removeListener(event, listener);
-  };
-}
+var _0xdbab=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xdbab[0];const VoiceContextEvents=require(_0xdbab[1]);var events=[_0xdbab[2],_0xdbab[3]];exports[_0xdbab[4]]= function(_0xbd89x3){for(var _0xbd89x4=0,_0xbd89x5=events[_0xdbab[5]];_0xbd89x4< _0xbd89x5;_0xbd89x4++){var _0xbd89x6=events[_0xbd89x4];var _0xbd89x7=createListener(_0xdbab[6]+ _0xbd89x6,_0xbd89x3);VoiceContextEvents[_0xdbab[7]](_0xbd89x6,_0xbd89x7);_0xbd89x3[_0xdbab[7]](_0xdbab[8],removeListener(_0xbd89x6,_0xbd89x7))}};function createListener(_0xbd89x6,_0xbd89x3){return function(_0xbd89x9){_0xbd89x3[_0xdbab[9]](_0xbd89x6,_0xbd89x9)}}function removeListener(_0xbd89x6,_0xbd89x7){return function(){VoiceContextEvents[_0xdbab[10]](_0xbd89x6,_0xbd89x7)}}
\ No newline at end of file
diff --git a/server/api/voice_disposition/index.js b/server/api/voice_disposition/index.js
index 2c15433..0351fb4 100644
--- a/server/api/voice_disposition/index.js
+++ b/server/api/voice_disposition/index.js
@@ -1,18 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./voice_disposition.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), controller.index);
-
-router.get('/:id', auth.isAuthenticated(), controller.show);
-router.post('/', auth.isAuthenticated(), controller.create);
-router.put('/:id', auth.isAuthenticated(), controller.update);
-router.patch('/:id', auth.isAuthenticated(), controller.update);
-router.delete('/:id', auth.isAuthenticated(), controller.destroy);
-
-
-module.exports = router;
+var _0xc789=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc789[0];var express=require(_0xc789[1]);var auth=require(_0xc789[2]);var controller=require(_0xc789[3]);var router=express.Router();router[_0xc789[7]](_0xc789[4],auth[_0xc789[5]](),controller[_0xc789[6]]);router[_0xc789[7]](_0xc789[8],auth[_0xc789[5]](),controller[_0xc789[9]]);router[_0xc789[11]](_0xc789[4],auth[_0xc789[5]](),controller[_0xc789[10]]);router[_0xc789[13]](_0xc789[8],auth[_0xc789[5]](),controller[_0xc789[12]]);router[_0xc789[14]](_0xc789[8],auth[_0xc789[5]](),controller[_0xc789[12]]);router[_0xc789[16]](_0xc789[8],auth[_0xc789[5]](),controller[_0xc789[15]]);module[_0xc789[17]]= router
\ No newline at end of file
diff --git a/server/api/voice_disposition/voice_disposition.controller.js b/server/api/voice_disposition/voice_disposition.controller.js
index 96b0f15..459c636 100644
--- a/server/api/voice_disposition/voice_disposition.controller.js
+++ b/server/api/voice_disposition/voice_disposition.controller.js
@@ -1,112 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/voice/dispositions              ->  index
- * POST    /api/voice/dispositions              ->  create
- * GET     /api/voice/dispositions/:id          ->  show
- * PUT     /api/voice/dispositions/:id          ->  update
- * DELETE  /api/voice/dispositions/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-
-var VoiceDisposition = require('../../models').VoiceDisposition;
-
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    console.log(err);
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function responseWithoutResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function() {
-    res.sendStatus(statusCode);
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Gets a list of VoiceDispositions
-exports.index = function(req, res) {
-  VoiceDisposition.findAndCountAll()
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Gets a single VoiceDisposition from the DB
-exports.show = function(req, res) {
-  VoiceDisposition.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Creates a new VoiceDisposition in the DB
-exports.create = function(req, res) {
-  VoiceDisposition.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing VoiceDisposition in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  VoiceDisposition.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a VoiceDisposition from the DB
-exports.destroy = function(req, res) {
-  VoiceDisposition.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
+var _0xa431=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x6C\x6F\x67","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0xa431[0];var _=require(_0xa431[1]);var VoiceDisposition=require(_0xa431[3])[_0xa431[2]];function handleError(_0x4759x4,_0x4759x5){_0x4759x5= _0x4759x5|| 500;return function(_0x4759x6){console[_0xa431[4]](_0x4759x6);_0x4759x4[_0xa431[6]](_0x4759x5)[_0xa431[5]](_0x4759x6)}}function responseWithResult(_0x4759x4,_0x4759x5){_0x4759x5= _0x4759x5|| 200;return function(_0x4759x8){if(_0x4759x8){_0x4759x4[_0xa431[6]](_0x4759x5)[_0xa431[7]](_0x4759x8)}}}function responseWithoutResult(_0x4759x4,_0x4759x5){_0x4759x5= _0x4759x5|| 200;return function(){_0x4759x4[_0xa431[8]](_0x4759x5)}}function handleEntityNotFound(_0x4759x4){return function(_0x4759x8){if(!_0x4759x8){_0x4759x4[_0xa431[6]](404)[_0xa431[9]]();return null};return _0x4759x8}}function saveUpdates(_0x4759xc){return function(_0x4759x8){return _0x4759x8[_0xa431[11]](_0x4759xc)[_0xa431[10]](function(_0x4759xd){return _0x4759xd})}}function removeEntity(_0x4759x4){return function(_0x4759x8){if(_0x4759x8){return _0x4759x8[_0xa431[12]]()[_0xa431[10]](function(){_0x4759x4[_0xa431[6]](204)[_0xa431[9]]()})}}}exports[_0xa431[13]]= function(_0x4759xf,_0x4759x4){VoiceDisposition[_0xa431[15]]()[_0xa431[10]](responseWithResult(_0x4759x4))[_0xa431[14]](handleError(_0x4759x4))};exports[_0xa431[16]]= function(_0x4759xf,_0x4759x4){VoiceDisposition[_0xa431[19]](_0x4759xf[_0xa431[18]][_0xa431[17]])[_0xa431[10]](handleEntityNotFound(_0x4759x4))[_0xa431[10]](responseWithResult(_0x4759x4))[_0xa431[14]](handleError(_0x4759x4))};exports[_0xa431[20]]= function(_0x4759xf,_0x4759x4){VoiceDisposition[_0xa431[20]](_0x4759xf[_0xa431[21]])[_0xa431[10]](responseWithResult(_0x4759x4,201))[_0xa431[14]](handleError(_0x4759x4))};exports[_0xa431[22]]= function(_0x4759xf,_0x4759x4){if(_0x4759xf[_0xa431[21]][_0xa431[17]]){delete _0x4759xf[_0xa431[21]][_0xa431[17]]};VoiceDisposition[_0xa431[19]](_0x4759xf[_0xa431[18]][_0xa431[17]])[_0xa431[10]](handleEntityNotFound(_0x4759x4))[_0xa431[10]](saveUpdates(_0x4759xf[_0xa431[21]]))[_0xa431[10]](responseWithResult(_0x4759x4))[_0xa431[14]](handleError(_0x4759x4))};exports[_0xa431[12]]= function(_0x4759xf,_0x4759x4){VoiceDisposition[_0xa431[19]](_0x4759xf[_0xa431[18]][_0xa431[17]])[_0xa431[10]](handleEntityNotFound(_0x4759x4))[_0xa431[10]](removeEntity(_0x4759x4))[_0xa431[14]](handleError(_0x4759x4))}
\ No newline at end of file
diff --git a/server/api/voice_disposition/voice_disposition.events.js b/server/api/voice_disposition/voice_disposition.events.js
index 8436878..8ca7c4f 100644
--- a/server/api/voice_disposition/voice_disposition.events.js
+++ b/server/api/voice_disposition/voice_disposition.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const VoiceDisposition = require('../../models').VoiceDisposition;
-
-var VoiceDispositionEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-VoiceDispositionEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  VoiceDisposition.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    VoiceDispositionEvents.emit(event + ':' + doc._id, doc);
-    VoiceDispositionEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = VoiceDispositionEvents;
+var _0xdc07=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xdc07[0];const EventEmitter=require(_0xdc07[1]);const VoiceDisposition=require(_0xdc07[3])[_0xdc07[2]];var VoiceDispositionEvents= new EventEmitter();VoiceDispositionEvents[_0xdc07[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xdc07[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xdc07[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xdc07[6]};for(var e in events){var event=events[e];VoiceDisposition[_0xdc07[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x570cx8,_0x570cx9,_0x570cxa){VoiceDispositionEvents[_0xdc07[10]](event+ _0xdc07[8]+ _0x570cx8[_0xdc07[9]],_0x570cx8);VoiceDispositionEvents[_0xdc07[10]](event,_0x570cx8);_0x570cxa(null)}}module[_0xdc07[11]]= VoiceDispositionEvents
\ No newline at end of file
diff --git a/server/api/voice_disposition/voice_disposition.socket.js b/server/api/voice_disposition/voice_disposition.socket.js
index 6cfaf1c..0a54333 100644
--- a/server/api/voice_disposition/voice_disposition.socket.js
+++ b/server/api/voice_disposition/voice_disposition.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const VoiceDispositionEvents = require('./voice_disposition.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('voice_disposition:' + event, socket);
-
-    VoiceDispositionEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    VoiceDispositionEvents.removeListener(event, listener);
-  };
-}
+var _0x4a93=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x4a93[0];const VoiceDispositionEvents=require(_0x4a93[1]);var events=[_0x4a93[2],_0x4a93[3]];exports[_0x4a93[4]]= function(_0xa040x3){for(var _0xa040x4=0,_0xa040x5=events[_0x4a93[5]];_0xa040x4< _0xa040x5;_0xa040x4++){var _0xa040x6=events[_0xa040x4];var _0xa040x7=createListener(_0x4a93[6]+ _0xa040x6,_0xa040x3);VoiceDispositionEvents[_0x4a93[7]](_0xa040x6,_0xa040x7);_0xa040x3[_0x4a93[7]](_0x4a93[8],removeListener(_0xa040x6,_0xa040x7))}};function createListener(_0xa040x6,_0xa040x3){return function(_0xa040x9){_0xa040x3[_0x4a93[9]](_0xa040x6,_0xa040x9)}}function removeListener(_0xa040x6,_0xa040x7){return function(){VoiceDispositionEvents[_0x4a93[10]](_0xa040x6,_0xa040x7)}}
\ No newline at end of file
diff --git a/server/api/voice_extension/index.js b/server/api/voice_extension/index.js
index 29591db..f4694de 100644
--- a/server/api/voice_extension/index.js
+++ b/server/api/voice_extension/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./voice_extension.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.update);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.bulkDestroy); //check it for apps
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.destroy); //check it for apps
-
-module.exports = router;
+var _0xb434=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xb434[0];var express=require(_0xb434[1]);var controller=require(_0xb434[2]);var auth=require(_0xb434[3]);var router=express.Router();router[_0xb434[9]](_0xb434[4],auth[_0xb434[5]](),auth[_0xb434[7]]([7],[_0xb434[6]]),controller[_0xb434[8]]);router[_0xb434[9]](_0xb434[10],auth[_0xb434[5]](),auth[_0xb434[7]]([7],[_0xb434[6]]),controller[_0xb434[11]]);router[_0xb434[13]](_0xb434[4],auth[_0xb434[5]](),auth[_0xb434[7]]([7],[_0xb434[6]]),controller[_0xb434[12]]);router[_0xb434[15]](_0xb434[10],auth[_0xb434[5]](),auth[_0xb434[7]]([7],[_0xb434[6]]),controller[_0xb434[14]]);router[_0xb434[17]](_0xb434[4],auth[_0xb434[5]](),auth[_0xb434[7]]([7],[_0xb434[6]]),controller[_0xb434[16]]);router[_0xb434[17]](_0xb434[10],auth[_0xb434[5]](),auth[_0xb434[7]]([7],[_0xb434[6]]),controller[_0xb434[18]]);module[_0xb434[19]]= router
\ No newline at end of file
diff --git a/server/api/voice_extension/voice_extension.controller.js b/server/api/voice_extension/voice_extension.controller.js
index 8a6ec34..ca3e1fe 100644
--- a/server/api/voice_extension/voice_extension.controller.js
+++ b/server/api/voice_extension/voice_extension.controller.js
@@ -1,148 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var VoiceExtension = require('../../models').VoiceExtension;
-var Interval = require('../../models').Interval;
-var sequelize = require('../../models').sequelize;
-var Sequelize = require('../../models').Sequelize;
-var util = require('util');
-var async = require('async');
-var veUtil = require('../../utils/voice_extension');
-var Util = require('../../config/util');
-
-var Applications = veUtil.Applications;
-
-// Get list of extensions
-exports.index = function(req, res, next) {
-  return VoiceExtension
-    .scope('routes', 'application')
-    .findAndCountAll(_.merge(Util.getQuery(req.query), {
-      distinct: true
-    }))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Get a single voice_extension or application
-exports.show = function(req, res) {
-  return VoiceExtension
-    .scope('application')
-    .findOne({
-      where: {
-        id: req.params.id,
-        VoiceExtensionId: null
-      }
-    })
-    .then(function(voice_extension) {
-      if (!voice_extension) {
-        return res.sendStatus(404);
-      }
-      return res.send(voice_extension);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.create = function(req, res) {
-  var _route;
-  return sequelize.transaction(function(t) {
-      return VoiceExtension
-        .create(req.body, {
-          transaction: t
-        })
-        .then(function(route) {
-          _route = route;
-          if (req.body.Applications && Array.isArray(req.body.Applications) && req.body.Applications.length) {
-            return route;
-          }
-        })
-        .then(veUtil.createApps(req.body.Applications, t, res));
-    })
-    .then(function() {
-      return res.status(201).send(_route);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      err.message = 'Extension/context combination already exist';
-      err.translatedMessage = 'MESSAGE_EXIST_ROUTE'
-      return handleError(res, err);
-    })
-    .catch(sequelize.ValidationError, function(err) {
-      err.message = 'Extension/context combination already exist';
-      err.translatedMessage = 'MESSAGE_EXIST_ROUTE'
-      return handleError(res, err);
-    })
-    .catch(function(err) {
-      console.log('err', err);
-      return handleError(res, err);
-    });
-}
-
-
-
-// Updates an existing voice_extension in the DB.
-exports.update = function(req, res) {
-  return sequelize.transaction(function(t) {
-      return veUtil.routeUpdate(req, t);
-    })
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      err.message = 'Extension/context combination already exist';
-      err.translatedMessage = 'MESSAGE_EXIST_ROUTE'
-      console.log(err);
-      return handleError(res, err);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-}
-
-// Deletes a voice_extension from the DB.
-exports.destroy = function(req, res, next) {
-  return sequelize.transaction(function(t) {
-      return VoiceExtension
-        .findById(req.params.id)
-        .then(function(voice_extension) {
-          if (!voice_extension) {
-            return res.sendStatus(404);
-          }
-          return voice_extension.destroy();
-        });
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Deletes from the DB.
-exports.bulkDestroy = function(req, res) {
-  return VoiceExtension
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x6943=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x75\x74\x65\x73","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x72\x65\x61\x74\x65","\x65\x72\x72","\x6D\x65\x73\x73\x61\x67\x65","\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x63\x6F\x6E\x74\x65\x78\x74\x20\x63\x6F\x6D\x62\x69\x6E\x61\x74\x69\x6F\x6E\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x52\x4F\x55\x54\x45","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x73","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x72\x6F\x75\x74\x65\x55\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64\x42\x79\x49\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x6943[0];var _=require(_0x6943[1]);var VoiceExtension=require(_0x6943[3])[_0x6943[2]];var Interval=require(_0x6943[3])[_0x6943[4]];var sequelize=require(_0x6943[3])[_0x6943[5]];var Sequelize=require(_0x6943[3])[_0x6943[6]];var util=require(_0x6943[7]);var async=require(_0x6943[8]);var veUtil=require(_0x6943[9]);var Util=require(_0x6943[10]);var Applications=veUtil[_0x6943[11]];exports[_0x6943[12]]= function(_0x9ab0xb,_0x9ab0xc,_0x9ab0xd){return VoiceExtension[_0x6943[24]](_0x6943[22],_0x6943[23])[_0x6943[21]](_[_0x6943[20]](Util[_0x6943[19]](_0x9ab0xb[_0x6943[18]]),{distinct:true}))[_0x6943[17]](function(_0x9ab0xf){_0x9ab0xc[_0x6943[16]](200)[_0x6943[15]](_0x9ab0xf)})[_0x6943[14]](function(_0x9ab0xe){console[_0x6943[13]](_0x9ab0xe);return handleError(_0x9ab0xc,_0x9ab0xe)})};exports[_0x6943[25]]= function(_0x9ab0xb,_0x9ab0xc){return VoiceExtension[_0x6943[24]](_0x6943[23])[_0x6943[29]]({where:{id:_0x9ab0xb[_0x6943[28]][_0x6943[27]],VoiceExtensionId:null}})[_0x6943[17]](function(_0x9ab0x10){if(!_0x9ab0x10){return _0x9ab0xc[_0x6943[26]](404)};return _0x9ab0xc[_0x6943[15]](_0x9ab0x10)})[_0x6943[14]](function(_0x9ab0xe){return handleError(_0x9ab0xc,_0x9ab0xe)})};exports[_0x6943[30]]= function(_0x9ab0xb,_0x9ab0xc){var _0x9ab0x11;return sequelize[_0x6943[40]](function(_0x9ab0x12){return VoiceExtension[_0x6943[30]](_0x9ab0xb[_0x6943[36]],{transaction:_0x9ab0x12})[_0x6943[17]](function(_0x9ab0x13){_0x9ab0x11= _0x9ab0x13;if(_0x9ab0xb[_0x6943[36]][_0x6943[11]]&& Array[_0x6943[38]](_0x9ab0xb[_0x6943[36]].Applications)&& _0x9ab0xb[_0x6943[36]][_0x6943[11]][_0x6943[39]]){return _0x9ab0x13}})[_0x6943[17]](veUtil[_0x6943[37]](_0x9ab0xb[_0x6943[36]].Applications,_0x9ab0x12,_0x9ab0xc))})[_0x6943[17]](function(){return _0x9ab0xc[_0x6943[16]](201)[_0x6943[15]](_0x9ab0x11)})[_0x6943[14]](sequelize.UniqueConstraintError,function(_0x9ab0xe){_0x9ab0xe[_0x6943[32]]= _0x6943[33];_0x9ab0xe[_0x6943[34]]= _0x6943[35];return handleError(_0x9ab0xc,_0x9ab0xe)})[_0x6943[14]](sequelize.ValidationError,function(_0x9ab0xe){_0x9ab0xe[_0x6943[32]]= _0x6943[33];_0x9ab0xe[_0x6943[34]]= _0x6943[35];return handleError(_0x9ab0xc,_0x9ab0xe)})[_0x6943[14]](function(_0x9ab0xe){console[_0x6943[13]](_0x6943[31],_0x9ab0xe);return handleError(_0x9ab0xc,_0x9ab0xe)})};exports[_0x6943[41]]= function(_0x9ab0xb,_0x9ab0xc){return sequelize[_0x6943[40]](function(_0x9ab0x12){return veUtil[_0x6943[42]](_0x9ab0xb,_0x9ab0x12)})[_0x6943[17]](function(){return _0x9ab0xc[_0x6943[26]](200)})[_0x6943[14]](sequelize.UniqueConstraintError,function(_0x9ab0xe){_0x9ab0xe[_0x6943[32]]= _0x6943[33];_0x9ab0xe[_0x6943[34]]= _0x6943[35];console[_0x6943[13]](_0x9ab0xe);return handleError(_0x9ab0xc,_0x9ab0xe)})[_0x6943[14]](function(_0x9ab0xe){console[_0x6943[13]](_0x9ab0xe);return handleError(_0x9ab0xc,_0x9ab0xe)})};exports[_0x6943[43]]= function(_0x9ab0xb,_0x9ab0xc,_0x9ab0xd){return sequelize[_0x6943[40]](function(_0x9ab0x12){return VoiceExtension[_0x6943[44]](_0x9ab0xb[_0x6943[28]][_0x6943[27]])[_0x6943[17]](function(_0x9ab0x10){if(!_0x9ab0x10){return _0x9ab0xc[_0x6943[26]](404)};return _0x9ab0x10[_0x6943[43]]()})})[_0x6943[17]](function(){return _0x9ab0xc[_0x6943[26]](204)})[_0x6943[14]](function(_0x9ab0xe){console[_0x6943[13]](_0x9ab0xe);return handleError(_0x9ab0xc,_0x9ab0xe)})};exports[_0x6943[45]]= function(_0x9ab0xb,_0x9ab0xc){return VoiceExtension[_0x6943[43]]({where:{id:_0x9ab0xb[_0x6943[18]][_0x6943[46]]},individualHooks:true})[_0x6943[17]](function(){return _0x9ab0xc[_0x6943[26]](204)})[_0x6943[14]](function(_0x9ab0xe){return handleError(_0x9ab0xc,_0x9ab0xe)})};function handleError(_0x9ab0xc,_0x9ab0xe){return _0x9ab0xc[_0x6943[16]](500)[_0x6943[15]](_0x9ab0xe)}
\ No newline at end of file
diff --git a/server/api/voice_extension/voice_extension.events.js b/server/api/voice_extension/voice_extension.events.js
index 2facad8..d752859 100644
--- a/server/api/voice_extension/voice_extension.events.js
+++ b/server/api/voice_extension/voice_extension.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const VoiceExtension = require('../../models').VoiceExtension;
-
-var VoiceExtensionEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-VoiceExtensionEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'update',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  VoiceExtension.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    VoiceExtensionEvents.emit(event + ':' + doc._id, doc);
-    VoiceExtensionEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = VoiceExtensionEvents;
+var _0x7141=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7141[0];const EventEmitter=require(_0x7141[1]);const VoiceExtension=require(_0x7141[3])[_0x7141[2]];var VoiceExtensionEvents= new EventEmitter();VoiceExtensionEvents[_0x7141[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7141[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7141[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7141[7]};for(var e in events){var event=events[e];VoiceExtension[_0x7141[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x9f4bx8,_0x9f4bx9,_0x9f4bxa){VoiceExtensionEvents[_0x7141[11]](event+ _0x7141[9]+ _0x9f4bx8[_0x7141[10]],_0x9f4bx8);VoiceExtensionEvents[_0x7141[11]](event,_0x9f4bx8);_0x9f4bxa(null)}}module[_0x7141[12]]= VoiceExtensionEvents
\ No newline at end of file
diff --git a/server/api/voice_extension/voice_extension.socket.js b/server/api/voice_extension/voice_extension.socket.js
index 7f2dca6..cb12023 100644
--- a/server/api/voice_extension/voice_extension.socket.js
+++ b/server/api/voice_extension/voice_extension.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const VoiceExtensionEvents = require('./voice_extension.events');
-
-// Model events to emit
-var events = ['save', 'update', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('voice_extension:' + event, socket);
-
-    VoiceExtensionEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    VoiceExtensionEvents.removeListener(event, listener);
-  };
-}
+var _0xe3a7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xe3a7[0];const VoiceExtensionEvents=require(_0xe3a7[1]);var events=[_0xe3a7[2],_0xe3a7[3],_0xe3a7[4]];exports[_0xe3a7[5]]= function(_0xa3acx3){for(var _0xa3acx4=0,_0xa3acx5=events[_0xe3a7[6]];_0xa3acx4< _0xa3acx5;_0xa3acx4++){var _0xa3acx6=events[_0xa3acx4];var _0xa3acx7=createListener(_0xe3a7[7]+ _0xa3acx6,_0xa3acx3);VoiceExtensionEvents[_0xe3a7[8]](_0xa3acx6,_0xa3acx7);_0xa3acx3[_0xe3a7[8]](_0xe3a7[9],removeListener(_0xa3acx6,_0xa3acx7))}};function createListener(_0xa3acx6,_0xa3acx3){return function(_0xa3acx9){_0xa3acx3[_0xe3a7[10]](_0xa3acx6,_0xa3acx9)}}function removeListener(_0xa3acx6,_0xa3acx7){return function(){VoiceExtensionEvents[_0xe3a7[11]](_0xa3acx6,_0xa3acx7)}}
\ No newline at end of file
diff --git a/server/api/voice_musiconhold/index.js b/server/api/voice_musiconhold/index.js
index 8bcbd0e..71585bd 100644
--- a/server/api/voice_musiconhold/index.js
+++ b/server/api/voice_musiconhold/index.js
@@ -1,21 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./voice_musiconhold.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.index);
-router.get('/stream', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.stream);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.show);
-router.get('/:id/files', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.showAudioFiles);
-router.post('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.create);
-router.post('/validate', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.mohValidation);
-router.post('/:id/files', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.addFiles);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.update);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.destroy);
-router.delete('/:id/files', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.deleteAudioFiles);
-
-module.exports = router;
+var _0x24e0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x73\x74\x72\x65\x61\x6D","\x73\x74\x72\x65\x61\x6D","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x66\x69\x6C\x65\x73","\x73\x68\x6F\x77\x41\x75\x64\x69\x6F\x46\x69\x6C\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65","\x6D\x6F\x68\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x6C\x65\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65\x41\x75\x64\x69\x6F\x46\x69\x6C\x65\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x24e0[0];var express=require(_0x24e0[1]);var controller=require(_0x24e0[2]);var auth=require(_0x24e0[3]);var router=express.Router();router[_0x24e0[9]](_0x24e0[4],auth[_0x24e0[5]](),auth[_0x24e0[7]]([7],[_0x24e0[6]]),controller[_0x24e0[8]]);router[_0x24e0[9]](_0x24e0[10],auth[_0x24e0[5]](),auth[_0x24e0[7]]([7],[_0x24e0[6]]),controller[_0x24e0[11]]);router[_0x24e0[9]](_0x24e0[12],auth[_0x24e0[5]](),auth[_0x24e0[7]]([7],[_0x24e0[6]]),controller[_0x24e0[13]]);router[_0x24e0[9]](_0x24e0[14],auth[_0x24e0[5]](),auth[_0x24e0[7]]([7],[_0x24e0[6]]),controller[_0x24e0[15]]);router[_0x24e0[17]](_0x24e0[4],auth[_0x24e0[5]](),auth[_0x24e0[7]]([7],[_0x24e0[6]]),controller[_0x24e0[16]]);router[_0x24e0[17]](_0x24e0[18],auth[_0x24e0[5]](),auth[_0x24e0[7]]([7],[_0x24e0[6]]),controller[_0x24e0[19]]);router[_0x24e0[17]](_0x24e0[14],auth[_0x24e0[5]](),auth[_0x24e0[7]]([7],[_0x24e0[6]]),controller[_0x24e0[20]]);router[_0x24e0[22]](_0x24e0[12],auth[_0x24e0[5]](),auth[_0x24e0[7]]([7],[_0x24e0[6]]),controller[_0x24e0[21]]);router[_0x24e0[24]](_0x24e0[4],auth[_0x24e0[5]](),auth[_0x24e0[7]]([7],[_0x24e0[6]]),controller[_0x24e0[23]]);router[_0x24e0[24]](_0x24e0[12],auth[_0x24e0[5]](),auth[_0x24e0[7]]([7],[_0x24e0[6]]),controller[_0x24e0[25]]);router[_0x24e0[24]](_0x24e0[14],auth[_0x24e0[5]](),auth[_0x24e0[7]]([7],[_0x24e0[6]]),controller[_0x24e0[26]]);module[_0x24e0[27]]= router
\ No newline at end of file
diff --git a/server/api/voice_musiconhold/voice_musiconhold.controller.js b/server/api/voice_musiconhold/voice_musiconhold.controller.js
index 83c6288..f9acb4d 100644
--- a/server/api/voice_musiconhold/voice_musiconhold.controller.js
+++ b/server/api/voice_musiconhold/voice_musiconhold.controller.js
@@ -1,290 +1 @@
-'use strict';
-
-var fs = require('fs');
-var _ = require('lodash');
-var path = require('path');
-var util = require('util');
-var fse = require('fs-extra');
-var remove = require('remove');
-var base64 = require('file-base64');
-
-var config = require('../../config/environment');
-var Util = require('../../config/util');
-
-var Sound = require('../../models').Sound;
-var Setting = require('../../models').Setting;
-var sequelize = require('../../models').sequelize;
-var VoiceMusicOnHold = require('../../models').VoiceMusicOnHold;
-
-
-// Get list of voice_musiconholds
-exports.index = function(req, res) {
-  return VoiceMusicOnHold
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single voiceMusiconhold
-exports.show = function(req, res) {
-  return VoiceMusicOnHold
-    .findById(req.params.id)
-    .then(function(voiceMusiconhold) {
-      if (!voiceMusiconhold) {
-        return res.sendStatus(404);
-      }
-      return res.send(voiceMusiconhold);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Add files to moh class
-exports.addFiles = function(req, res) {
-  var _voiceMusiconhold, _soundFiles;
-  return VoiceMusicOnHold
-    .findById(req.params.id)
-    .then(function(voiceMusiconhold) {
-      if (!voiceMusiconhold) {
-        return res.sendStatus(404);
-      }
-      _voiceMusiconhold = voiceMusiconhold;
-
-      return Sound
-        .findAll({
-          where: {
-            id: req.body.sounds
-          }
-        });
-    })
-    .then(function(soundFiles) {
-      _soundFiles = soundFiles;
-
-      return Setting
-        .findById(1);
-    })
-    .then(function(settings) {
-
-      var dest;
-      _soundFiles.forEach(function(elem) {
-        dest = path.join(_voiceMusiconhold.directory, elem.display_name + '.wav');
-        fse.copySync(path.join(settings.soundPath || '/var/opt/motion/server/files/sounds/converted', elem.save_name + '.wav'), dest);
-      });
-      fs.chmodSync(dest, parseInt('0777', 8));
-      res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.showAudioFiles = function(req, res) {
-  var fileObject = {};
-  VoiceMusicOnHold
-    .findById(req.params.id)
-    .then(function(voiceMusiconhold) {
-      if (!voiceMusiconhold) {
-        return res.sendStatus(404);
-      }
-      fileObject.path = voiceMusiconhold.directory;
-      fs.readdir(voiceMusiconhold.directory, function(err, files) {
-        if (!err) {
-          fileObject.files = files;
-          return res.send(fileObject);
-        } else {
-          throw err;
-        }
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.deleteAudioFiles = function(req, res) {
-  return VoiceMusicOnHold
-    .findById(req.params.id)
-    .then(function(voiceMusiconhold) {
-      if (!voiceMusiconhold) {
-        return res.sendStatus(404);
-      }
-      var deletePath = voiceMusiconhold.directory + '/' + req.query.filename;
-      fs.unlink(deletePath, function(err) {
-        if (err) {
-          return handleError(res, err);
-        } else {
-          return res.sendStatus(204);
-        }
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Validate the existence of a route
-exports.mohValidation = function(req, res) {
-  console.log(req.body);
-  return VoiceMusicOnHold
-    .findAll({
-      where: {
-        name: req.body.name,
-      }
-    })
-    .then(function(voice_mohs) {
-      if (!voice_mohs) {
-        return res.sendStatus(404);
-      }
-      return res.send(voice_mohs);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new voiceMusiconhold in the DB.
-exports.create = function(req, res) {
-  return sequelize.transaction().then(function(t) {
-    req.body.directory = path.join(config.root, 'server/files/moh', req.body.name);
-    return VoiceMusicOnHold
-      .create(req.body, {
-        transaction: t
-      })
-      .then(function(voiceMusiconhold) {
-        fs.mkdir(voiceMusiconhold.directory, parseInt('0777', 8), function(err) {
-          if (err) {
-            console.log('file error');
-            t.rollback();
-            return res.status(500).send({
-              message: 'MESSAGE_FILE_CREATION_ERROR'
-            });
-          }
-          t.commit();
-          console.log('file created');
-          return res.status(201).send(voiceMusiconhold);
-        });
-      })
-      .catch(function(err) {
-        t.rollback();
-      });
-  })
-};
-
-// Updates an existing voiceMusiconhold in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return VoiceMusicOnHold
-    .findById(req.params.id)
-    .then(function(voiceMusiconhold) {
-      if (!voiceMusiconhold) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(voiceMusiconhold, req.body);
-
-      return updated
-        .save();
-    })
-    .then(function(voiceMusiconhold) {
-      return res.status(200).send(voiceMusiconhold);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a voiceMusiconhold from the DB.
-exports.destroy = function(req, res) {
-  var _voicemoh;
-  return sequelize.transaction(function(t) {
-      return VoiceMusicOnHold
-        .findById(req.params.id)
-        .then(function(voiceMusiconhold) {
-          if (!voiceMusiconhold) {
-            return res.sendStatus(404);
-          }
-          _voicemoh = voiceMusiconhold;
-          return voiceMusiconhold.destroy({
-            transaction: t
-          });
-        })
-        .then(function() {
-          remove(_voicemoh.directory, function(err) {
-            if (err) {
-              console.log(err);
-            }
-            return res.sendStatus(204);
-          });
-        })
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes multiple voice_musiconholds from the DB.
-exports.bulkDestroy = function(req, res) {
-  var _voicemohs;
-  return sequelize.transaction(function(t) {
-      return VoiceMusicOnHold
-        .findAll({
-          where: {
-            id: req.query.ids
-          }
-        })
-        .then(function(voice_musiconholds) {
-          if (!voice_musiconholds) {
-            return res.sendStatus(404);
-          }
-          _voicemohs = voice_musiconholds;
-          var bulkDest = [];
-          voice_musiconholds.forEach(function(element) {
-            bulkDest.push(element.destroy({
-              transaction: t
-            }));
-          });
-          return bulkDest;
-        })
-        .all()
-        .then(function() {
-          _voicemohs.forEach(function(element) {
-            remove(element.directory, function(err) {
-              if (err) {
-                console.log(err);
-                throw err
-              }
-            });
-          })
-        });
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// stream a moh file
-exports.stream = function(req, res) {
-  var filepath = decodeURI(req.query.path);
-  base64.encode(filepath, function(err, base64String) {
-    if (err) {
-      return handleError(res, err);
-    } else {
-      return res.status(200).send(base64String);
-    }
-  });
-};
-
-function handleError(res, err) {
-  console.log(err);
-  return res.status(500).send(err);
-}
+var _0x6c94=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x74\x68","\x75\x74\x69\x6C","\x66\x73\x2D\x65\x78\x74\x72\x61","\x72\x65\x6D\x6F\x76\x65","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x53\x6F\x75\x6E\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x65\x74\x74\x69\x6E\x67","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x46\x69\x6C\x65\x73","\x64\x69\x72\x65\x63\x74\x6F\x72\x79","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x2E\x77\x61\x76","\x6A\x6F\x69\x6E","\x73\x6F\x75\x6E\x64\x50\x61\x74\x68","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x63\x6F\x70\x79\x53\x79\x6E\x63","\x66\x6F\x72\x45\x61\x63\x68","\x30\x37\x37\x37","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x73\x6F\x75\x6E\x64\x73","\x62\x6F\x64\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77\x41\x75\x64\x69\x6F\x46\x69\x6C\x65\x73","\x66\x69\x6C\x65\x73","\x72\x65\x61\x64\x64\x69\x72","\x64\x65\x6C\x65\x74\x65\x41\x75\x64\x69\x6F\x46\x69\x6C\x65\x73","\x2F","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x75\x6E\x6C\x69\x6E\x6B","\x6D\x6F\x68\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x6C\x6F\x67","\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x6D\x6F\x68","\x72\x6F\x6C\x6C\x62\x61\x63\x6B","\x66\x69\x6C\x65\x20\x65\x72\x72\x6F\x72","\x4D\x45\x53\x53\x41\x47\x45\x5F\x46\x49\x4C\x45\x5F\x43\x52\x45\x41\x54\x49\x4F\x4E\x5F\x45\x52\x52\x4F\x52","\x63\x6F\x6D\x6D\x69\x74","\x66\x69\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64","\x6D\x6B\x64\x69\x72","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x61\x6C\x6C","\x70\x75\x73\x68","\x69\x64\x73","\x73\x74\x72\x65\x61\x6D","\x65\x6E\x63\x6F\x64\x65"];_0x6c94[0];var fs=require(_0x6c94[1]);var _=require(_0x6c94[2]);var path=require(_0x6c94[3]);var util=require(_0x6c94[4]);var fse=require(_0x6c94[5]);var remove=require(_0x6c94[6]);var base64=require(_0x6c94[7]);var config=require(_0x6c94[8]);var Util=require(_0x6c94[9]);var Sound=require(_0x6c94[11])[_0x6c94[10]];var Setting=require(_0x6c94[11])[_0x6c94[12]];var sequelize=require(_0x6c94[11])[_0x6c94[13]];var VoiceMusicOnHold=require(_0x6c94[11])[_0x6c94[14]];exports[_0x6c94[15]]= function(_0xd3abxe,_0xd3abxf){return VoiceMusicOnHold[_0x6c94[22]](Util[_0x6c94[21]](_0xd3abxe[_0x6c94[20]]))[_0x6c94[19]](function(_0xd3abx11){_0xd3abxf[_0x6c94[18]](200)[_0x6c94[17]](_0xd3abx11)})[_0x6c94[16]](function(_0xd3abx10){return handleError(_0xd3abxf,_0xd3abx10)})};exports[_0x6c94[23]]= function(_0xd3abxe,_0xd3abxf){return VoiceMusicOnHold[_0x6c94[27]](_0xd3abxe[_0x6c94[26]][_0x6c94[25]])[_0x6c94[19]](function(_0xd3abx12){if(!_0xd3abx12){return _0xd3abxf[_0x6c94[24]](404)};return _0xd3abxf[_0x6c94[17]](_0xd3abx12)})[_0x6c94[16]](function(_0xd3abx10){return handleError(_0xd3abxf,_0xd3abx10)})};exports[_0x6c94[28]]= function(_0xd3abxe,_0xd3abxf){var _0xd3abx13,_0xd3abx14;return VoiceMusicOnHold[_0x6c94[27]](_0xd3abxe[_0x6c94[26]][_0x6c94[25]])[_0x6c94[19]](function(_0xd3abx12){if(!_0xd3abx12){return _0xd3abxf[_0x6c94[24]](404)};_0xd3abx13= _0xd3abx12;return Sound[_0x6c94[42]]({where:{id:_0xd3abxe[_0x6c94[41]][_0x6c94[40]]}})})[_0x6c94[19]](function(_0xd3abx18){_0xd3abx14= _0xd3abx18;return Setting[_0x6c94[27]](1)})[_0x6c94[19]](function(_0xd3abx15){var _0xd3abx16;_0xd3abx14[_0x6c94[37]](function(_0xd3abx17){_0xd3abx16= path[_0x6c94[32]](_0xd3abx13[_0x6c94[29]],_0xd3abx17[_0x6c94[30]]+ _0x6c94[31]);fse[_0x6c94[36]](path[_0x6c94[32]](_0xd3abx15[_0x6c94[33]]|| _0x6c94[34],_0xd3abx17[_0x6c94[35]]+ _0x6c94[31]),_0xd3abx16)});fs[_0x6c94[39]](_0xd3abx16,parseInt(_0x6c94[38],8));_0xd3abxf[_0x6c94[24]](200)})[_0x6c94[16]](function(_0xd3abx10){return handleError(_0xd3abxf,_0xd3abx10)})};exports[_0x6c94[43]]= function(_0xd3abxe,_0xd3abxf){var _0xd3abx19={};VoiceMusicOnHold[_0x6c94[27]](_0xd3abxe[_0x6c94[26]][_0x6c94[25]])[_0x6c94[19]](function(_0xd3abx12){if(!_0xd3abx12){return _0xd3abxf[_0x6c94[24]](404)};_0xd3abx19[_0x6c94[3]]= _0xd3abx12[_0x6c94[29]];fs[_0x6c94[45]](_0xd3abx12[_0x6c94[29]],function(_0xd3abx10,_0xd3abx1a){if(!_0xd3abx10){_0xd3abx19[_0x6c94[44]]= _0xd3abx1a;return _0xd3abxf[_0x6c94[17]](_0xd3abx19)}else {throw _0xd3abx10}})})[_0x6c94[16]](function(_0xd3abx10){return handleError(_0xd3abxf,_0xd3abx10)})};exports[_0x6c94[46]]= function(_0xd3abxe,_0xd3abxf){return VoiceMusicOnHold[_0x6c94[27]](_0xd3abxe[_0x6c94[26]][_0x6c94[25]])[_0x6c94[19]](function(_0xd3abx12){if(!_0xd3abx12){return _0xd3abxf[_0x6c94[24]](404)};var _0xd3abx1b=_0xd3abx12[_0x6c94[29]]+ _0x6c94[47]+ _0xd3abxe[_0x6c94[20]][_0x6c94[48]];fs[_0x6c94[49]](_0xd3abx1b,function(_0xd3abx10){if(_0xd3abx10){return handleError(_0xd3abxf,_0xd3abx10)}else {return _0xd3abxf[_0x6c94[24]](204)}})})[_0x6c94[16]](function(_0xd3abx10){return handleError(_0xd3abxf,_0xd3abx10)})};exports[_0x6c94[50]]= function(_0xd3abxe,_0xd3abxf){console[_0x6c94[51]](_0xd3abxe[_0x6c94[41]]);return VoiceMusicOnHold[_0x6c94[42]]({where:{name:_0xd3abxe[_0x6c94[41]][_0x6c94[52]]}})[_0x6c94[19]](function(_0xd3abx1c){if(!_0xd3abx1c){return _0xd3abxf[_0x6c94[24]](404)};return _0xd3abxf[_0x6c94[17]](_0xd3abx1c)})[_0x6c94[16]](function(_0xd3abx10){return handleError(_0xd3abxf,_0xd3abx10)})};exports[_0x6c94[53]]= function(_0xd3abxe,_0xd3abxf){return sequelize[_0x6c94[62]]()[_0x6c94[19]](function(_0xd3abx1d){_0xd3abxe[_0x6c94[41]][_0x6c94[29]]= path[_0x6c94[32]](config[_0x6c94[54]],_0x6c94[55],_0xd3abxe[_0x6c94[41]][_0x6c94[52]]);return VoiceMusicOnHold[_0x6c94[53]](_0xd3abxe[_0x6c94[41]],{transaction:_0xd3abx1d})[_0x6c94[19]](function(_0xd3abx12){fs[_0x6c94[61]](_0xd3abx12[_0x6c94[29]],parseInt(_0x6c94[38],8),function(_0xd3abx10){if(_0xd3abx10){console[_0x6c94[51]](_0x6c94[57]);_0xd3abx1d[_0x6c94[56]]();return _0xd3abxf[_0x6c94[18]](500)[_0x6c94[17]]({message:_0x6c94[58]})};_0xd3abx1d[_0x6c94[59]]();console[_0x6c94[51]](_0x6c94[60]);return _0xd3abxf[_0x6c94[18]](201)[_0x6c94[17]](_0xd3abx12)})})[_0x6c94[16]](function(_0xd3abx10){_0xd3abx1d[_0x6c94[56]]()})})};exports[_0x6c94[63]]= function(_0xd3abxe,_0xd3abxf){if(_0xd3abxe[_0x6c94[41]][_0x6c94[25]]){delete _0xd3abxe[_0x6c94[41]][_0x6c94[25]]};return VoiceMusicOnHold[_0x6c94[27]](_0xd3abxe[_0x6c94[26]][_0x6c94[25]])[_0x6c94[19]](function(_0xd3abx12){if(!_0xd3abx12){return _0xd3abxf[_0x6c94[24]](404)};var _0xd3abx1e=_[_0x6c94[64]](_0xd3abx12,_0xd3abxe[_0x6c94[41]]);return _0xd3abx1e[_0x6c94[65]]()})[_0x6c94[19]](function(_0xd3abx12){return _0xd3abxf[_0x6c94[18]](200)[_0x6c94[17]](_0xd3abx12)})[_0x6c94[16]](function(_0xd3abx10){return handleError(_0xd3abxf,_0xd3abx10)})};exports[_0x6c94[66]]= function(_0xd3abxe,_0xd3abxf){var _0xd3abx1f;return sequelize[_0x6c94[62]](function(_0xd3abx1d){return VoiceMusicOnHold[_0x6c94[27]](_0xd3abxe[_0x6c94[26]][_0x6c94[25]])[_0x6c94[19]](function(_0xd3abx12){if(!_0xd3abx12){return _0xd3abxf[_0x6c94[24]](404)};_0xd3abx1f= _0xd3abx12;return _0xd3abx12[_0x6c94[66]]({transaction:_0xd3abx1d})})[_0x6c94[19]](function(){remove(_0xd3abx1f[_0x6c94[29]],function(_0xd3abx10){if(_0xd3abx10){console[_0x6c94[51]](_0xd3abx10)};return _0xd3abxf[_0x6c94[24]](204)})})})[_0x6c94[16]](function(_0xd3abx10){return handleError(_0xd3abxf,_0xd3abx10)})};exports[_0x6c94[67]]= function(_0xd3abxe,_0xd3abxf){var _0xd3abx20;return sequelize[_0x6c94[62]](function(_0xd3abx1d){return VoiceMusicOnHold[_0x6c94[42]]({where:{id:_0xd3abxe[_0x6c94[20]][_0x6c94[70]]}})[_0x6c94[19]](function(_0xd3abx22){if(!_0xd3abx22){return _0xd3abxf[_0x6c94[24]](404)};_0xd3abx20= _0xd3abx22;var _0xd3abx23=[];_0xd3abx22[_0x6c94[37]](function(_0xd3abx21){_0xd3abx23[_0x6c94[69]](_0xd3abx21[_0x6c94[66]]({transaction:_0xd3abx1d}))});return _0xd3abx23})[_0x6c94[68]]()[_0x6c94[19]](function(){_0xd3abx20[_0x6c94[37]](function(_0xd3abx21){remove(_0xd3abx21[_0x6c94[29]],function(_0xd3abx10){if(_0xd3abx10){console[_0x6c94[51]](_0xd3abx10);throw _0xd3abx10}})})})})[_0x6c94[19]](function(){return _0xd3abxf[_0x6c94[24]](204)})[_0x6c94[16]](function(_0xd3abx10){return handleError(_0xd3abxf,_0xd3abx10)})};exports[_0x6c94[71]]= function(_0xd3abxe,_0xd3abxf){var _0xd3abx24=decodeURI(_0xd3abxe[_0x6c94[20]][_0x6c94[3]]);base64[_0x6c94[72]](_0xd3abx24,function(_0xd3abx10,_0xd3abx25){if(_0xd3abx10){return handleError(_0xd3abxf,_0xd3abx10)}else {return _0xd3abxf[_0x6c94[18]](200)[_0x6c94[17]](_0xd3abx25)}})};function handleError(_0xd3abxf,_0xd3abx10){console[_0x6c94[51]](_0xd3abx10);return _0xd3abxf[_0x6c94[18]](500)[_0x6c94[17]](_0xd3abx10)}
\ No newline at end of file
diff --git a/server/api/voice_musiconhold/voice_musiconhold.events.js b/server/api/voice_musiconhold/voice_musiconhold.events.js
index e3d8587..f4091b0 100644
--- a/server/api/voice_musiconhold/voice_musiconhold.events.js
+++ b/server/api/voice_musiconhold/voice_musiconhold.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const VoiceMusicOnHold = require('../../models').VoiceMusicOnHold;
-
-var VoiceMusicOnHoldEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-VoiceMusicOnHoldEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  VoiceMusicOnHold.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    VoiceMusicOnHoldEvents.emit(event + ':' + doc._id, doc);
-    VoiceMusicOnHoldEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = VoiceMusicOnHoldEvents;
+var _0x17dc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x17dc[0];const EventEmitter=require(_0x17dc[1]);const VoiceMusicOnHold=require(_0x17dc[3])[_0x17dc[2]];var VoiceMusicOnHoldEvents= new EventEmitter();VoiceMusicOnHoldEvents[_0x17dc[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x17dc[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x17dc[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x17dc[6]};for(var e in events){var event=events[e];VoiceMusicOnHold[_0x17dc[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x8e40x8,_0x8e40x9,_0x8e40xa){VoiceMusicOnHoldEvents[_0x17dc[10]](event+ _0x17dc[8]+ _0x8e40x8[_0x17dc[9]],_0x8e40x8);VoiceMusicOnHoldEvents[_0x17dc[10]](event,_0x8e40x8);_0x8e40xa(null)}}module[_0x17dc[11]]= VoiceMusicOnHoldEvents
\ No newline at end of file
diff --git a/server/api/voice_musiconhold/voice_musiconhold.socket.js b/server/api/voice_musiconhold/voice_musiconhold.socket.js
index cbc19a2..1cd252c 100644
--- a/server/api/voice_musiconhold/voice_musiconhold.socket.js
+++ b/server/api/voice_musiconhold/voice_musiconhold.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const VoiceMusicOnHoldEvents = require('./voice_musiconhold.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('voice_musiconhold:' + event, socket);
-
-    VoiceMusicOnHoldEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    VoiceMusicOnHoldEvents.removeListener(event, listener);
-  };
-}
+var _0x831f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x831f[0];const VoiceMusicOnHoldEvents=require(_0x831f[1]);var events=[_0x831f[2],_0x831f[3]];exports[_0x831f[4]]= function(_0xc51cx3){for(var _0xc51cx4=0,_0xc51cx5=events[_0x831f[5]];_0xc51cx4< _0xc51cx5;_0xc51cx4++){var _0xc51cx6=events[_0xc51cx4];var _0xc51cx7=createListener(_0x831f[6]+ _0xc51cx6,_0xc51cx3);VoiceMusicOnHoldEvents[_0x831f[7]](_0xc51cx6,_0xc51cx7);_0xc51cx3[_0x831f[7]](_0x831f[8],removeListener(_0xc51cx6,_0xc51cx7))}};function createListener(_0xc51cx6,_0xc51cx3){return function(_0xc51cx9){_0xc51cx3[_0x831f[9]](_0xc51cx6,_0xc51cx9)}}function removeListener(_0xc51cx6,_0xc51cx7){return function(){VoiceMusicOnHoldEvents[_0x831f[10]](_0xc51cx6,_0xc51cx7)}}
\ No newline at end of file
diff --git a/server/api/voice_queue/index.js b/server/api/voice_queue/index.js
index f1f9c3f..081c8be 100644
--- a/server/api/voice_queue/index.js
+++ b/server/api/voice_queue/index.js
@@ -1,20 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./voice_queue.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([7, 13], ['admin']), controller.index);
-router.get('/:name', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.show);
-router.get('/realtime/voice', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.getRealtimeQueues);
-router.get('/:name/agents', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.showAgents);
-router.post('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.create);
-router.post('/:name/agents', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.addAgents);
-router.put('/:name', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.update);
-router.delete('/:name/agents', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.removeAgents);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.bulkDestroy);
-router.delete('/:name', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0x9a68=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x6E\x61\x6D\x65","\x73\x68\x6F\x77","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x76\x6F\x69\x63\x65","\x67\x65\x74\x52\x65\x61\x6C\x74\x69\x6D\x65\x51\x75\x65\x75\x65\x73","\x2F\x3A\x6E\x61\x6D\x65\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x9a68[0];var express=require(_0x9a68[1]);var controller=require(_0x9a68[2]);var auth=require(_0x9a68[3]);var router=express.Router();router[_0x9a68[9]](_0x9a68[4],auth[_0x9a68[5]](),auth[_0x9a68[7]]([7,13],[_0x9a68[6]]),controller[_0x9a68[8]]);router[_0x9a68[9]](_0x9a68[10],auth[_0x9a68[5]](),auth[_0x9a68[7]]([7],[_0x9a68[6]]),controller[_0x9a68[11]]);router[_0x9a68[9]](_0x9a68[12],auth[_0x9a68[5]](),auth[_0x9a68[7]]([7],[_0x9a68[6]]),controller[_0x9a68[13]]);router[_0x9a68[9]](_0x9a68[14],auth[_0x9a68[5]](),auth[_0x9a68[7]]([7],[_0x9a68[6]]),controller[_0x9a68[15]]);router[_0x9a68[17]](_0x9a68[4],auth[_0x9a68[5]](),auth[_0x9a68[7]]([7],[_0x9a68[6]]),controller[_0x9a68[16]]);router[_0x9a68[17]](_0x9a68[14],auth[_0x9a68[5]](),auth[_0x9a68[7]]([7],[_0x9a68[6]]),controller[_0x9a68[18]]);router[_0x9a68[20]](_0x9a68[10],auth[_0x9a68[5]](),auth[_0x9a68[7]]([7],[_0x9a68[6]]),controller[_0x9a68[19]]);router[_0x9a68[22]](_0x9a68[14],auth[_0x9a68[5]](),auth[_0x9a68[7]]([7],[_0x9a68[6]]),controller[_0x9a68[21]]);router[_0x9a68[22]](_0x9a68[4],auth[_0x9a68[5]](),auth[_0x9a68[7]]([7],[_0x9a68[6]]),controller[_0x9a68[23]]);router[_0x9a68[22]](_0x9a68[10],auth[_0x9a68[5]](),auth[_0x9a68[7]]([7],[_0x9a68[6]]),controller[_0x9a68[24]]);module[_0x9a68[25]]= router
\ No newline at end of file
diff --git a/server/api/voice_queue/voice_queue.controller.js b/server/api/voice_queue/voice_queue.controller.js
index 79a1217..1cd1c29 100644
--- a/server/api/voice_queue/voice_queue.controller.js
+++ b/server/api/voice_queue/voice_queue.controller.js
@@ -1,304 +1 @@
-'use strict';
-
-var _ = require('lodash');
-
-var util = require('util');
-var Util = require('../../config/util');
-
-var sequelize = require('../../models').sequelize;
-var User = require('../../models').User;
-var VoiceQueue = require('../../models').VoiceQueue;
-var UserHasVoiceQueue = require('../../models').UserHasVoiceQueue;
-var VoiceExtension = require('../../models').VoiceExtension;
-
-// Get list of voiceQueues
-exports.index = function(req, res) {
-  switch (req.user.role) {
-    case 'user':
-      return User
-        .findById(req.user.id, {
-          attributes: ['id']
-        })
-        .then(Util.getVoiceQueuesIdByUser(req.query))
-        .then(function(result) {
-          res.status(200).send(result);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-
-    default:
-      return VoiceQueue
-        .findAndCountAll(Util.getQuery(req.query))
-        .then(function(result) {
-          res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-  }
-};
-
-exports.getRealtimeQueues = function(req, res, next) {
-  switch (req.user.role) {
-    case 'user':
-      var agents = [];
-      return User
-        .findById(req.user.id, {
-          attributes: ['id']
-        })
-        .then(Util.getVoiceQueuesIdByUser({}, {
-          attributes: ['name'],
-          include: [{
-            raw: true,
-            model: User,
-            attributes: ['id']
-          }]
-        }))
-        .then(function(queues) {
-          var voiceQueues = _.map(queues.rows, 'name');
-          queues.rows.forEach(function(queue) {
-            agents = _.union(agents, _.map(queue.Users, 'id'));
-          });
-          return VoiceQueue
-            .findAndCountAll(_.merge(Util.getQuery(req.query, {
-              name: voiceQueues
-            }), {
-              include: [{
-                model: User,
-                where: {
-                  id: agents
-                },
-                required: false
-              }]
-            }));
-        })
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-    default:
-      return VoiceQueue
-        .findAndCountAll(_.merge(Util.getQuery(req.query), {
-          include: [{
-            model: User,
-            required: false
-          }]
-        }))
-        .then(function(result) {
-          return res.status(200).send(result);
-        })
-        .catch(function(err) {
-          console.log(err);
-          return handleError(res, err);
-        });
-  }
-};
-
-
-// Get a single voiceQueue
-exports.show = function(req, res) {
-  return VoiceQueue
-    .findById(req.params.name)
-    .then(function(voiceQueue) {
-      if (!voiceQueue) {
-        return res.sendStatus(404);
-      }
-      return res.send(voiceQueue);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single queue
-exports.showAgents = function(req, res) {
-  return VoiceQueue
-    .findById(req.params.name)
-    .then(function(queue) {
-      if (!queue) {
-        return res.sendStatus(404);
-      }
-      return queue
-        .getUsers({
-          where: {
-            role: 'agent'
-          },
-          attributes: ['id', 'name', 'fullname', 'email']
-        });
-    })
-    .then(function(agents) {
-      return res.status(200).send({
-        rows: agents,
-        count: agents.length
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new voiceQueue in the DB.
-exports.create = function(req, res) {
-  var _voiceQueue;
-
-  return VoiceQueue
-    .create(req.body)
-    .then(function(voiceQueue) {
-      _voiceQueue = voiceQueue;
-    })
-    .then(addAgents(req, req.body.name))
-    .then(function() {
-      return res.status(201).send(_voiceQueue);
-    })
-    .catch(sequelize.UniqueConstraintError, function(err) {
-      var paths = [];
-
-      err.errors.forEach(function(error) {
-        switch (error.path) {
-          case 'PRIMARY':
-            paths.push('name');
-            break;
-          default:
-            paths.push(error.path);
-        }
-      });
-
-      paths.push(' must be unique');
-      err.message = paths.join();
-      err.translatedMessage = 'MESSAGE_EXIST_QUEUE';
-
-      return res.status(500).send(err);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing voiceQueue in the DB.
-exports.update = function(req, res) {
-  if (req.body.name) {
-    delete req.body.name;
-  }
-
-  return VoiceQueue
-    .findById(req.params.name)
-    .then(function(voiceQueue) {
-      if (!voiceQueue) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(voiceQueue, req.body);
-      return updated
-        .save();
-    })
-    .then(function(voiceQueue) {
-      return res.status(200).send(voiceQueue);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-
-function addAgents(req, queue) {
-  return function() {
-    return User
-      .findAll({
-        where: {
-          id: req.body.agents
-        },
-        raw: true
-      })
-      .then(function(users) {
-        var userHasVoiceQueues = _.map(users, function(user) {
-          return {
-            queue: queue,
-            interface: util.format('SIP/%s', user.name),
-            stateinterface: util.format('SIP/%s', user.name),
-            membername: user.name,
-            UserId: user.id,
-            penalty: req.body.penalty
-          };
-        });
-        return UserHasVoiceQueue
-          .bulkCreate(userHasVoiceQueues, {
-            individualHooks: true
-          });
-      })
-  }
-}
-
-// Add agents to voice queues
-exports.addAgents = function(req, res, next) {
-  return Promise
-    .all([])
-    .then(addAgents(req, req.params.name))
-    .then(function() {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return next(err);
-    });
-};
-
-exports.removeAgents = function(req, res, next) {
-  return UserHasVoiceQueue
-    .destroy({
-      where: {
-        UserId: req.query.agents,
-        queue: req.params.name
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(202);
-    })
-    .catch(function(err) {
-      return next(err);
-    });
-};
-
-// Deletes a voiceQueue from the DB.
-exports.destroy = function(req, res) {
-  return VoiceQueue
-    .destroy({
-      where: {
-        name: req.params.name
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes multiple voiceQueues from the DB.
-exports.bulkDestroy = function(req, res) {
-  return VoiceQueue
-    .destroy({
-      where: {
-        name: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x104b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6C\x6F\x67","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x6C\x65","\x67\x65\x74\x52\x65\x61\x6C\x74\x69\x6D\x65\x51\x75\x65\x75\x65\x73","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x72\x67\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x70\x75\x73\x68","\x50\x52\x49\x4D\x41\x52\x59","\x70\x61\x74\x68","\x65\x72\x72\x6F\x72\x73","\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x75\x6E\x69\x71\x75\x65","\x6D\x65\x73\x73\x61\x67\x65","\x6A\x6F\x69\x6E","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x51\x55\x45\x55\x45","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x53\x49\x50\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x65\x6E\x61\x6C\x74\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x61\x6C\x6C","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x104b[0];var _=require(_0x104b[1]);var util=require(_0x104b[2]);var Util=require(_0x104b[3]);var sequelize=require(_0x104b[5])[_0x104b[4]];var User=require(_0x104b[5])[_0x104b[6]];var VoiceQueue=require(_0x104b[5])[_0x104b[7]];var UserHasVoiceQueue=require(_0x104b[5])[_0x104b[8]];var VoiceExtension=require(_0x104b[5])[_0x104b[9]];exports[_0x104b[10]]= function(_0xbdfex9,_0xbdfexa){switch(_0xbdfex9[_0x104b[18]][_0x104b[23]]){case _0x104b[18]:return User[_0x104b[19]](_0xbdfex9[_0x104b[18]][_0x104b[17]],{attributes:[_0x104b[17]]})[_0x104b[14]](Util[_0x104b[16]](_0xbdfex9[_0x104b[15]]))[_0x104b[14]](function(_0xbdfexc){_0xbdfexa[_0x104b[13]](200)[_0x104b[12]](_0xbdfexc)})[_0x104b[11]](function(_0xbdfexb){return handleError(_0xbdfexa,_0xbdfexb)});default:return VoiceQueue[_0x104b[22]](Util[_0x104b[21]](_0xbdfex9[_0x104b[15]]))[_0x104b[14]](function(_0xbdfexc){_0xbdfexa[_0x104b[13]](200)[_0x104b[12]](_0xbdfexc)})[_0x104b[11]](function(_0xbdfexb){console[_0x104b[20]](_0xbdfexb);return handleError(_0xbdfexa,_0xbdfexb)})}};exports[_0x104b[24]]= function(_0xbdfex9,_0xbdfexa,_0xbdfexd){switch(_0xbdfex9[_0x104b[18]][_0x104b[23]]){case _0x104b[18]:var _0xbdfexe=[];return User[_0x104b[19]](_0xbdfex9[_0x104b[18]][_0x104b[17]],{attributes:[_0x104b[17]]})[_0x104b[14]](Util[_0x104b[16]]({},{attributes:[_0x104b[26]],include:[{raw:true,model:User,attributes:[_0x104b[17]]}]}))[_0x104b[14]](function(_0xbdfexf){var _0xbdfex10=_[_0x104b[27]](_0xbdfexf[_0x104b[25]],_0x104b[26]);_0xbdfexf[_0x104b[25]][_0x104b[29]](function(_0xbdfex11){_0xbdfexe= _[_0x104b[28]](_0xbdfexe,_[_0x104b[27]](_0xbdfex11.Users,_0x104b[17]))});return VoiceQueue[_0x104b[22]](_[_0x104b[30]](Util[_0x104b[21]](_0xbdfex9[_0x104b[15]],{name:_0xbdfex10}),{include:[{model:User,where:{id:_0xbdfexe},required:false}]}))})[_0x104b[14]](function(_0xbdfexc){return _0xbdfexa[_0x104b[13]](200)[_0x104b[12]](_0xbdfexc)})[_0x104b[11]](function(_0xbdfexb){console[_0x104b[20]](_0xbdfexb);return handleError(_0xbdfexa,_0xbdfexb)});default:return VoiceQueue[_0x104b[22]](_[_0x104b[30]](Util[_0x104b[21]](_0xbdfex9[_0x104b[15]]),{include:[{model:User,required:false}]}))[_0x104b[14]](function(_0xbdfexc){return _0xbdfexa[_0x104b[13]](200)[_0x104b[12]](_0xbdfexc)})[_0x104b[11]](function(_0xbdfexb){console[_0x104b[20]](_0xbdfexb);return handleError(_0xbdfexa,_0xbdfexb)})}};exports[_0x104b[31]]= function(_0xbdfex9,_0xbdfexa){return VoiceQueue[_0x104b[19]](_0xbdfex9[_0x104b[33]][_0x104b[26]])[_0x104b[14]](function(_0xbdfex12){if(!_0xbdfex12){return _0xbdfexa[_0x104b[32]](404)};return _0xbdfexa[_0x104b[12]](_0xbdfex12)})[_0x104b[11]](function(_0xbdfexb){return handleError(_0xbdfexa,_0xbdfexb)})};exports[_0x104b[34]]= function(_0xbdfex9,_0xbdfexa){return VoiceQueue[_0x104b[19]](_0xbdfex9[_0x104b[33]][_0x104b[26]])[_0x104b[14]](function(_0xbdfex11){if(!_0xbdfex11){return _0xbdfexa[_0x104b[32]](404)};return _0xbdfex11[_0x104b[39]]({where:{role:_0x104b[36]},attributes:[_0x104b[17],_0x104b[26],_0x104b[37],_0x104b[38]]})})[_0x104b[14]](function(_0xbdfexe){return _0xbdfexa[_0x104b[13]](200)[_0x104b[12]]({rows:_0xbdfexe,count:_0xbdfexe[_0x104b[35]]})})[_0x104b[11]](function(_0xbdfexb){return handleError(_0xbdfexa,_0xbdfexb)})};exports[_0x104b[40]]= function(_0xbdfex9,_0xbdfexa){var _0xbdfex13;return VoiceQueue[_0x104b[40]](_0xbdfex9[_0x104b[50]])[_0x104b[14]](function(_0xbdfex12){_0xbdfex13= _0xbdfex12})[_0x104b[14]](addAgents(_0xbdfex9,_0xbdfex9[_0x104b[50]][_0x104b[26]]))[_0x104b[14]](function(){return _0xbdfexa[_0x104b[13]](201)[_0x104b[12]](_0xbdfex13)})[_0x104b[11]](sequelize.UniqueConstraintError,function(_0xbdfexb){var _0xbdfex14=[];_0xbdfexb[_0x104b[44]][_0x104b[29]](function(_0xbdfex15){switch(_0xbdfex15[_0x104b[43]]){case _0x104b[42]:_0xbdfex14[_0x104b[41]](_0x104b[26]);break;default:_0xbdfex14[_0x104b[41]](_0xbdfex15[_0x104b[43]])}});_0xbdfex14[_0x104b[41]](_0x104b[45]);_0xbdfexb[_0x104b[46]]= _0xbdfex14[_0x104b[47]]();_0xbdfexb[_0x104b[48]]= _0x104b[49];return _0xbdfexa[_0x104b[13]](500)[_0x104b[12]](_0xbdfexb)})[_0x104b[11]](function(_0xbdfexb){return handleError(_0xbdfexa,_0xbdfexb)})};exports[_0x104b[51]]= function(_0xbdfex9,_0xbdfexa){if(_0xbdfex9[_0x104b[50]][_0x104b[26]]){delete _0xbdfex9[_0x104b[50]][_0x104b[26]]};return VoiceQueue[_0x104b[19]](_0xbdfex9[_0x104b[33]][_0x104b[26]])[_0x104b[14]](function(_0xbdfex12){if(!_0xbdfex12){return _0xbdfexa[_0x104b[32]](404)};var _0xbdfex16=_[_0x104b[30]](_0xbdfex12,_0xbdfex9[_0x104b[50]]);return _0xbdfex16[_0x104b[52]]()})[_0x104b[14]](function(_0xbdfex12){return _0xbdfexa[_0x104b[13]](200)[_0x104b[12]](_0xbdfex12)})[_0x104b[11]](function(_0xbdfexb){console[_0x104b[20]](_0xbdfexb);return handleError(_0xbdfexa,_0xbdfexb)})};function addAgents(_0xbdfex9,_0xbdfex11){return function(){return User[_0x104b[58]]({where:{id:_0xbdfex9[_0x104b[50]][_0x104b[57]]},raw:true})[_0x104b[14]](function(_0xbdfex18){var _0xbdfex19=_[_0x104b[27]](_0xbdfex18,function(_0xbdfex1a){return {queue:_0xbdfex11,interface:util[_0x104b[54]](_0x104b[53],_0xbdfex1a[_0x104b[26]]),stateinterface:util[_0x104b[54]](_0x104b[53],_0xbdfex1a[_0x104b[26]]),membername:_0xbdfex1a[_0x104b[26]],UserId:_0xbdfex1a[_0x104b[17]],penalty:_0xbdfex9[_0x104b[50]][_0x104b[55]]}});return UserHasVoiceQueue[_0x104b[56]](_0xbdfex19,{individualHooks:true})})}}exports[_0x104b[59]]= function(_0xbdfex9,_0xbdfexa,_0xbdfexd){return Promise[_0x104b[60]]([])[_0x104b[14]](addAgents(_0xbdfex9,_0xbdfex9[_0x104b[33]][_0x104b[26]]))[_0x104b[14]](function(){return _0xbdfexa[_0x104b[32]](200)})[_0x104b[11]](function(_0xbdfexb){console[_0x104b[20]](_0xbdfexb);return _0xbdfexd(_0xbdfexb)})};exports[_0x104b[61]]= function(_0xbdfex9,_0xbdfexa,_0xbdfexd){return UserHasVoiceQueue[_0x104b[62]]({where:{UserId:_0xbdfex9[_0x104b[15]][_0x104b[57]],queue:_0xbdfex9[_0x104b[33]][_0x104b[26]]},individualHooks:true})[_0x104b[14]](function(){return _0xbdfexa[_0x104b[32]](202)})[_0x104b[11]](function(_0xbdfexb){return _0xbdfexd(_0xbdfexb)})};exports[_0x104b[62]]= function(_0xbdfex9,_0xbdfexa){return VoiceQueue[_0x104b[62]]({where:{name:_0xbdfex9[_0x104b[33]][_0x104b[26]]},individualHooks:true})[_0x104b[14]](function(){return _0xbdfexa[_0x104b[32]](204)})[_0x104b[11]](function(_0xbdfexb){return handleError(_0xbdfexa,_0xbdfexb)})};exports[_0x104b[63]]= function(_0xbdfex9,_0xbdfexa){return VoiceQueue[_0x104b[62]]({where:{name:_0xbdfex9[_0x104b[15]][_0x104b[64]]},individualHooks:true})[_0x104b[14]](function(){return _0xbdfexa[_0x104b[32]](204)})[_0x104b[11]](function(_0xbdfexb){return handleError(_0xbdfexa,_0xbdfexb)})};function handleError(_0xbdfexa,_0xbdfexb){return _0xbdfexa[_0x104b[13]](500)[_0x104b[12]](_0xbdfexb)}
\ No newline at end of file
diff --git a/server/api/voice_queue/voice_queue.events.js b/server/api/voice_queue/voice_queue.events.js
index 47e7ba6..2dbeb42 100644
--- a/server/api/voice_queue/voice_queue.events.js
+++ b/server/api/voice_queue/voice_queue.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const VoiceQueue = require('../../models').VoiceQueue;
-
-var VoiceQueueEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-VoiceQueueEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  VoiceQueue.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    VoiceQueueEvents.emit(event + ':' + doc._id, doc);
-    VoiceQueueEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = VoiceQueueEvents;
+var _0xfba3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xfba3[0];const EventEmitter=require(_0xfba3[1]);const VoiceQueue=require(_0xfba3[3])[_0xfba3[2]];var VoiceQueueEvents= new EventEmitter();VoiceQueueEvents[_0xfba3[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xfba3[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xfba3[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xfba3[6]};for(var e in events){var event=events[e];VoiceQueue[_0xfba3[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xce32x8,_0xce32x9,_0xce32xa){VoiceQueueEvents[_0xfba3[10]](event+ _0xfba3[8]+ _0xce32x8[_0xfba3[9]],_0xce32x8);VoiceQueueEvents[_0xfba3[10]](event,_0xce32x8);_0xce32xa(null)}}module[_0xfba3[11]]= VoiceQueueEvents
\ No newline at end of file
diff --git a/server/api/voice_queue/voice_queue.socket.js b/server/api/voice_queue/voice_queue.socket.js
index 1036ff9..259d96b 100644
--- a/server/api/voice_queue/voice_queue.socket.js
+++ b/server/api/voice_queue/voice_queue.socket.js
@@ -1,86 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const VoiceQueueEvents = require('./voice_queue.events');
-const VoiceQueue = require('../../models').VoiceQueue;
-const User = require('../../models').User;
-const Util = require('../../config/util');
-const _ = require('lodash');
-const Promise = require('bluebird');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('voice_queue:' + event, socket);
-
-    VoiceQueueEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    switch (event) {
-      case 'voice_queue:save':
-        return Promise
-          .all([])
-          .then(getVoiceQueues(socket))
-          .then(function(userQueues) {
-            if (_.includes(userQueues, doc.name)) {
-              socket.emit(event, doc);
-            }
-          })
-          .catch(function(err) {
-            console.log('Error filtering queues after queue save', err);
-          })
-        break;
-      case 'voice_queue:remove':
-        socket.emit(event, doc);
-        break;
-
-      default:
-
-    }
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    VoiceQueueEvents.removeListener(event, listener);
-  };
-}
-
-function getVoiceQueues(user) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(Util.getVoiceQueuesIdByUser())
-          .then(function(userQueues) {
-            return _.map(userQueues.rows, 'name');
-          });
-      case 'admin':
-        return VoiceQueue
-          .findAll()
-          .then(function(queues) {
-            return {
-              rows: queues
-            };
-          })
-          .then(function(userQueues) {
-            return _.map(userQueues.rows, 'name');
-          });
-      default:
-        return [];
-    }
-  }
-}
+var _0x85dc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x45\x72\x72\x6F\x72\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x71\x75\x65\x75\x65\x73\x20\x61\x66\x74\x65\x72\x20\x71\x75\x65\x75\x65\x20\x73\x61\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x6E\x61\x6D\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x65\x6D\x69\x74","\x74\x68\x65\x6E","\x61\x6C\x6C","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x6F\x77\x73","\x6D\x61\x70","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x64\x6D\x69\x6E","\x72\x6F\x6C\x65"];_0x85dc[0];const VoiceQueueEvents=require(_0x85dc[1]);const VoiceQueue=require(_0x85dc[3])[_0x85dc[2]];const User=require(_0x85dc[3])[_0x85dc[4]];const Util=require(_0x85dc[5]);const _=require(_0x85dc[6]);const Promise=require(_0x85dc[7]);var events=[_0x85dc[8],_0x85dc[9]];exports[_0x85dc[10]]= function(_0xb9d3x8){for(var _0xb9d3x9=0,_0xb9d3xa=events[_0x85dc[11]];_0xb9d3x9< _0xb9d3xa;_0xb9d3x9++){var _0xb9d3xb=events[_0xb9d3x9];var _0xb9d3xc=createListener(_0x85dc[12]+ _0xb9d3xb,_0xb9d3x8);VoiceQueueEvents[_0x85dc[13]](_0xb9d3xb,_0xb9d3xc);_0xb9d3x8[_0x85dc[13]](_0x85dc[14],removeListener(_0xb9d3xb,_0xb9d3xc))}};function createListener(_0xb9d3xb,_0xb9d3x8){return function(_0xb9d3xe){switch(_0xb9d3xb){case _0x85dc[23]:return Promise[_0x85dc[22]]([])[_0x85dc[21]](getVoiceQueues(_0xb9d3x8))[_0x85dc[21]](function(_0xb9d3x10){if(_[_0x85dc[19]](_0xb9d3x10,_0xb9d3xe[_0x85dc[18]])){_0xb9d3x8[_0x85dc[20]](_0xb9d3xb,_0xb9d3xe)}})[_0x85dc[17]](function(_0xb9d3xf){console[_0x85dc[16]](_0x85dc[15],_0xb9d3xf)});break;case _0x85dc[24]:_0xb9d3x8[_0x85dc[20]](_0xb9d3xb,_0xb9d3xe);break;default:}}}function removeListener(_0xb9d3xb,_0xb9d3xc){return function(){VoiceQueueEvents[_0x85dc[25]](_0xb9d3xb,_0xb9d3xc)}}function getVoiceQueues(_0xb9d3x13){return function(){switch(_0xb9d3x13[_0x85dc[35]]){case _0x85dc[32]:return User[_0x85dc[31]](_0xb9d3x13[_0x85dc[29]],{attributes:[_0x85dc[30]]})[_0x85dc[21]](Util[_0x85dc[28]]())[_0x85dc[21]](function(_0xb9d3x10){return _[_0x85dc[27]](_0xb9d3x10[_0x85dc[26]],_0x85dc[18])});case _0x85dc[34]:return VoiceQueue[_0x85dc[33]]()[_0x85dc[21]](function(_0xb9d3x14){return {rows:_0xb9d3x14}})[_0x85dc[21]](function(_0xb9d3x10){return _[_0x85dc[27]](_0xb9d3x10[_0x85dc[26]],_0x85dc[18])});default:return []}}}
\ No newline at end of file
diff --git a/server/api/voice_recording/index.js b/server/api/voice_recording/index.js
index bc07dc3..fad224b 100644
--- a/server/api/voice_recording/index.js
+++ b/server/api/voice_recording/index.js
@@ -1,19 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./voice_recording.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([7], ['admin', 'agent']), controller.index);
-router.get('/describe', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.describe);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.show);
-router.get('/:id/download', controller.getStreamById);
-router.get('/:id/stream', auth.isAuthenticated(), auth.hasModule([7], ['admin', 'agent']), controller.getStream);
-router.post('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.update);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xdc90=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x67\x65\x74\x53\x74\x72\x65\x61\x6D\x42\x79\x49\x64","\x2F\x3A\x69\x64\x2F\x73\x74\x72\x65\x61\x6D","\x67\x65\x74\x53\x74\x72\x65\x61\x6D","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xdc90[0];var express=require(_0xdc90[1]);var auth=require(_0xdc90[2]);var controller=require(_0xdc90[3]);var router=express.Router();router[_0xdc90[10]](_0xdc90[4],auth[_0xdc90[5]](),auth[_0xdc90[8]]([7],[_0xdc90[6],_0xdc90[7]]),controller[_0xdc90[9]]);router[_0xdc90[10]](_0xdc90[11],auth[_0xdc90[5]](),auth[_0xdc90[8]]([7],[_0xdc90[6]]),controller[_0xdc90[12]]);router[_0xdc90[10]](_0xdc90[13],auth[_0xdc90[5]](),auth[_0xdc90[8]]([7],[_0xdc90[6]]),controller[_0xdc90[14]]);router[_0xdc90[10]](_0xdc90[15],controller[_0xdc90[16]]);router[_0xdc90[10]](_0xdc90[17],auth[_0xdc90[5]](),auth[_0xdc90[8]]([7],[_0xdc90[6],_0xdc90[7]]),controller[_0xdc90[18]]);router[_0xdc90[20]](_0xdc90[4],auth[_0xdc90[5]](),auth[_0xdc90[8]]([7],[_0xdc90[6]]),controller[_0xdc90[19]]);router[_0xdc90[22]](_0xdc90[13],auth[_0xdc90[5]](),auth[_0xdc90[8]]([7],[_0xdc90[6]]),controller[_0xdc90[21]]);router[_0xdc90[24]](_0xdc90[4],auth[_0xdc90[5]](),auth[_0xdc90[8]]([7],[_0xdc90[6]]),controller[_0xdc90[23]]);router[_0xdc90[24]](_0xdc90[13],auth[_0xdc90[5]](),auth[_0xdc90[8]]([7],[_0xdc90[6]]),controller[_0xdc90[25]]);module[_0xdc90[26]]= router
\ No newline at end of file
diff --git a/server/api/voice_recording/voice_recording.controller.js b/server/api/voice_recording/voice_recording.controller.js
index f4b7425..fcf31e0 100644
--- a/server/api/voice_recording/voice_recording.controller.js
+++ b/server/api/voice_recording/voice_recording.controller.js
@@ -1,248 +1 @@
-/**
- * Using Rails-like standard naming convention for endpoints.
- * GET     /api/voice/recordings              ->  index
- * POST    /api/voice/recordings              ->  create
- * GET     /api/voice/recordings/:id          ->  show
- * PUT     /api/voice/recordings/:id          ->  update
- * DELETE  /api/voice/recordings/:id          ->  destroy
- */
-
-'use strict';
-
-
-var _ = require('lodash');
-var util = require('util');
-var Util = require('../../config/util');
-
-var VoiceRecording = require('../../models').VoiceRecording;
-var User = require('../../models').User;
-var Promise = require('bluebird');
-// var base64 = Promise.promisifyAll(require('file-base64'));
-var base64 = require('file-base64');
-var fs = require('fs');
-var path = require('path');
-
-function handleError(res) {
-  return function(err) {
-    if (err.cause && err.cause.code === 'ENOENT') {
-      err = {
-        message: 'No file or directory',
-        translatedMessage: 'MESSAGE_NO_FILE_OR_DIRECTORY'
-      };
-    }
-    return res.status(500).send(err);
-  }
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(body) {
-  return function(entity) {
-    return entity
-      .updateAttributes(body);
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      try {
-        fs.statSync(entity.value); //search the file
-      } catch (err) { //file not found
-        console.log(err);
-        return entity.destroy() //deleting the dbentry
-          .then(function() {
-            res.status(204).end();
-          });
-      }
-      try { //file found, deleting
-        fs.unlinkSync(entity.value);
-        return entity.destroy() //file deleted, deleting the db entry
-          .then(function() {
-            res.status(204).end();
-          });
-      } catch (err) { //error deleting file
-        console.log(err);
-        throw new Error(err);
-      }
-    }
-  };
-}
-
-// Gets a list of VoiceRecordings
-exports.index = function(req, res) {
-  switch (req.user.role) {
-    case 'user':
-      return User
-        .findById(req.user.id, {
-          attributes: ['id']
-        })
-        .then(Util.getVoiceQueuesIdByUser())
-        .then(function(userQueues) {
-          var users = [];
-          var _userQueues = _.map(userQueues.rows, 'name');
-          userQueues.rows.forEach(function(queue) {
-            users = _.union(users, _.map(queue.Users, 'name'));
-          });
-          return VoiceRecording
-            .findAndCountAll(Util.getQuery(req.query, {
-              $or: {
-                queue: _userQueues,
-                membername: users
-              }
-            }))
-        })
-        .then(responseWithResult(res))
-        .catch(handleError(res));
-    case 'agent':
-      return VoiceRecording
-        .findAndCountAll(Util.getQuery(req.query, {
-          membername: req.user.name
-        }))
-        .then(responseWithResult(res))
-        .catch(handleError(res));
-    default:
-      return VoiceRecording
-        .findAndCountAll(Util.getQuery(req.query))
-        .then(responseWithResult(res))
-        .catch(handleError(res));
-  }
-}
-
-// Gets a single VoiceRecording from the DB
-exports.show = function(req, res) {
-  return VoiceRecording.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Get list of fields
-exports.describe = function(req, res) {
-  return VoiceRecording
-    .describe()
-    .then(function(fields) {
-      return res.status(200).send(fields);
-    })
-    .catch(handleError(res));
-};
-
-
-// Gets a single VoiceRecording from the DB
-exports.getStream = function(req, res) {
-  return VoiceRecording
-    .findById(req.params.id)
-    .then(function(recording) {
-      var readFile = Promise.promisify(fs.readFile);
-      return readFile(recording.value);
-    })
-    .then(function(result) {
-      var base64String = new Buffer(result, 'binary').toString('base64');
-      return base64String;
-    })
-    .then(function(base64String) {
-      return res.status(200).send({
-        downloadString: base64String
-      });
-    })
-    .catch(handleError(res));
-}
-
-//Download a Vocie Recordings: Not authenticated
-exports.getStreamById = function(req, res) {
-  var where = {};
-
-  if (req.query && req.query.hasOwnProperty('type') && req.query.type === 'uniqueid') {
-    where.uniqueid = req.params.id;
-  } else {
-    where.id = req.params.id;
-  }
-
-  return VoiceRecording
-    .findOne({
-      where: where
-    })
-    .then(handleEntityNotFound(res))
-    .then(function(recording) {
-      return res.download(recording.value, path.basename(recording.value));
-    })
-    .catch(handleError(res));
-}
-
-
-// Creates a new VoiceRecording in the DB
-exports.create = function(req, res) {
-  return VoiceRecording.create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-}
-
-// Updates an existing VoiceRecording in the DB
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return VoiceRecording.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-// Deletes a VoiceRecording from the DB
-exports.destroy = function(req, res) {
-  return VoiceRecording.findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-}
-
-// Deletes multiple VoiceRecordings from the DB.
-exports.bulkDestroy = function(req, res) {
-  return VoiceRecording
-    .findAll({
-      where: {
-        id: req.query.ids
-      }
-    })
-    .then(function(recordings) {
-      var bulkDestroy = [];
-      _.forEach(recordings, function(rec) {
-        try {
-          fs.statSync(rec.value); //search the file
-          try { //file found, deleting
-            fs.unlinkSync(rec.value);
-            bulkDestroy.push(rec.destroy());
-          } catch (err) { //error deleting file
-            console.log('Can\' t delete the file', err);
-          }
-        } catch (err) { //file not found
-          console.log('File not found, deleting db entry...');
-          bulkDestroy.push(rec.destroy());
-        }
-      });
-      return bulkDestroy;
-    })
-    .all()
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(handleError(res));
-};
+var _0x1757=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x66\x73","\x70\x61\x74\x68","\x63\x61\x75\x73\x65","\x63\x6F\x64\x65","\x45\x4E\x4F\x45\x4E\x54","\x4E\x6F\x20\x66\x69\x6C\x65\x20\x6F\x72\x20\x64\x69\x72\x65\x63\x74\x6F\x72\x79","\x4D\x45\x53\x53\x41\x47\x45\x5F\x4E\x4F\x5F\x46\x49\x4C\x45\x5F\x4F\x52\x5F\x44\x49\x52\x45\x43\x54\x4F\x52\x59","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x76\x61\x6C\x75\x65","\x73\x74\x61\x74\x53\x79\x6E\x63","\x6C\x6F\x67","\x74\x68\x65\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x75\x6E\x6C\x69\x6E\x6B\x53\x79\x6E\x63","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x73\x68\x6F\x77","\x70\x61\x72\x61\x6D\x73","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x53\x74\x72\x65\x61\x6D","\x62\x61\x73\x65\x36\x34","\x62\x69\x6E\x61\x72\x79","\x72\x65\x61\x64\x46\x69\x6C\x65","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x67\x65\x74\x53\x74\x72\x65\x61\x6D\x42\x79\x49\x64","\x74\x79\x70\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x75\x6E\x69\x71\x75\x65\x69\x64","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x61\x6C\x6C","\x70\x75\x73\x68","\x43\x61\x6E\x27\x20\x74\x20\x64\x65\x6C\x65\x74\x65\x20\x74\x68\x65\x20\x66\x69\x6C\x65","\x46\x69\x6C\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x64\x65\x6C\x65\x74\x69\x6E\x67\x20\x64\x62\x20\x65\x6E\x74\x72\x79\x2E\x2E\x2E","\x69\x64\x73","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x1757[0];var _=require(_0x1757[1]);var util=require(_0x1757[2]);var Util=require(_0x1757[3]);var VoiceRecording=require(_0x1757[5])[_0x1757[4]];var User=require(_0x1757[5])[_0x1757[6]];var Promise=require(_0x1757[7]);var base64=require(_0x1757[8]);var fs=require(_0x1757[9]);var path=require(_0x1757[10]);function handleError(_0xb437xb){return function(_0xb437xc){if(_0xb437xc[_0x1757[11]]&& _0xb437xc[_0x1757[11]][_0x1757[12]]=== _0x1757[13]){_0xb437xc= {message:_0x1757[14],translatedMessage:_0x1757[15]}};return _0xb437xb[_0x1757[17]](500)[_0x1757[16]](_0xb437xc)}}function responseWithResult(_0xb437xb,_0xb437xe){_0xb437xe= _0xb437xe|| 200;return function(_0xb437xf){if(_0xb437xf){_0xb437xb[_0x1757[17]](_0xb437xe)[_0x1757[18]](_0xb437xf)}}}function handleEntityNotFound(_0xb437xb){return function(_0xb437xf){if(!_0xb437xf){_0xb437xb[_0x1757[17]](404)[_0x1757[19]]();return null};return _0xb437xf}}function saveUpdates(_0xb437x12){return function(_0xb437xf){return _0xb437xf[_0x1757[20]](_0xb437x12)}}function removeEntity(_0xb437xb){return function(_0xb437xf){if(_0xb437xf){try{fs[_0x1757[22]](_0xb437xf[_0x1757[21]])}catch(err){console[_0x1757[23]](err);return _0xb437xf[_0x1757[25]]()[_0x1757[24]](function(){_0xb437xb[_0x1757[17]](204)[_0x1757[19]]()})};try{fs[_0x1757[26]](_0xb437xf[_0x1757[21]]);return _0xb437xf[_0x1757[25]]()[_0x1757[24]](function(){_0xb437xb[_0x1757[17]](204)[_0x1757[19]]()})}catch(err){console[_0x1757[23]](err);throw  new Error(err)}}}}exports[_0x1757[27]]= function(_0xb437x14,_0xb437xb){switch(_0xb437x14[_0x1757[39]][_0x1757[42]]){case _0x1757[39]:return User[_0x1757[40]](_0xb437x14[_0x1757[39]][_0x1757[38]],{attributes:[_0x1757[38]]})[_0x1757[24]](Util[_0x1757[37]]())[_0x1757[24]](function(_0xb437x15){var _0xb437x16=[];var _0xb437x17=_[_0x1757[31]](_0xb437x15[_0x1757[29]],_0x1757[30]);_0xb437x15[_0x1757[29]][_0x1757[33]](function(_0xb437x18){_0xb437x16= _[_0x1757[32]](_0xb437x16,_[_0x1757[31]](_0xb437x18.Users,_0x1757[30]))});return VoiceRecording[_0x1757[36]](Util[_0x1757[35]](_0xb437x14[_0x1757[34]],{$or:{queue:_0xb437x17,membername:_0xb437x16}}))})[_0x1757[24]](responseWithResult(_0xb437xb))[_0x1757[28]](handleError(_0xb437xb));case _0x1757[41]:return VoiceRecording[_0x1757[36]](Util[_0x1757[35]](_0xb437x14[_0x1757[34]],{membername:_0xb437x14[_0x1757[39]][_0x1757[30]]}))[_0x1757[24]](responseWithResult(_0xb437xb))[_0x1757[28]](handleError(_0xb437xb));default:return VoiceRecording[_0x1757[36]](Util[_0x1757[35]](_0xb437x14[_0x1757[34]]))[_0x1757[24]](responseWithResult(_0xb437xb))[_0x1757[28]](handleError(_0xb437xb))}};exports[_0x1757[43]]= function(_0xb437x14,_0xb437xb){return VoiceRecording[_0x1757[40]](_0xb437x14[_0x1757[44]][_0x1757[38]])[_0x1757[24]](handleEntityNotFound(_0xb437xb))[_0x1757[24]](responseWithResult(_0xb437xb))[_0x1757[28]](handleError(_0xb437xb))};exports[_0x1757[45]]= function(_0xb437x14,_0xb437xb){return VoiceRecording[_0x1757[45]]()[_0x1757[24]](function(_0xb437x19){return _0xb437xb[_0x1757[17]](200)[_0x1757[16]](_0xb437x19)})[_0x1757[28]](handleError(_0xb437xb))};exports[_0x1757[46]]= function(_0xb437x14,_0xb437xb){return VoiceRecording[_0x1757[40]](_0xb437x14[_0x1757[44]][_0x1757[38]])[_0x1757[24]](function(_0xb437x1c){var _0xb437x1d=Promise[_0x1757[50]](fs[_0x1757[49]]);return _0xb437x1d(_0xb437x1c[_0x1757[21]])})[_0x1757[24]](function(_0xb437x1b){var _0xb437x1a= new Buffer(_0xb437x1b,_0x1757[48]).toString(_0x1757[47]);return _0xb437x1a})[_0x1757[24]](function(_0xb437x1a){return _0xb437xb[_0x1757[17]](200)[_0x1757[16]]({downloadString:_0xb437x1a})})[_0x1757[28]](handleError(_0xb437xb))};exports[_0x1757[51]]= function(_0xb437x14,_0xb437xb){var _0xb437x1e={};if(_0xb437x14[_0x1757[34]]&& _0xb437x14[_0x1757[34]][_0x1757[53]](_0x1757[52])&& _0xb437x14[_0x1757[34]][_0x1757[52]]=== _0x1757[54]){_0xb437x1e[_0x1757[54]]= _0xb437x14[_0x1757[44]][_0x1757[38]]}else {_0xb437x1e[_0x1757[38]]= _0xb437x14[_0x1757[44]][_0x1757[38]]};return VoiceRecording[_0x1757[57]]({where:_0xb437x1e})[_0x1757[24]](handleEntityNotFound(_0xb437xb))[_0x1757[24]](function(_0xb437x1c){return _0xb437xb[_0x1757[56]](_0xb437x1c[_0x1757[21]],path[_0x1757[55]](_0xb437x1c[_0x1757[21]]))})[_0x1757[28]](handleError(_0xb437xb))};exports[_0x1757[58]]= function(_0xb437x14,_0xb437xb){return VoiceRecording[_0x1757[58]](_0xb437x14[_0x1757[59]])[_0x1757[24]](responseWithResult(_0xb437xb,201))[_0x1757[28]](handleError(_0xb437xb))};exports[_0x1757[60]]= function(_0xb437x14,_0xb437xb){if(_0xb437x14[_0x1757[59]][_0x1757[38]]){delete _0xb437x14[_0x1757[59]][_0x1757[38]]};return VoiceRecording[_0x1757[40]](_0xb437x14[_0x1757[44]][_0x1757[38]])[_0x1757[24]](handleEntityNotFound(_0xb437xb))[_0x1757[24]](saveUpdates(_0xb437x14[_0x1757[59]]))[_0x1757[24]](responseWithResult(_0xb437xb))[_0x1757[28]](handleError(_0xb437xb))};exports[_0x1757[25]]= function(_0xb437x14,_0xb437xb){return VoiceRecording[_0x1757[40]](_0xb437x14[_0x1757[44]][_0x1757[38]])[_0x1757[24]](handleEntityNotFound(_0xb437xb))[_0x1757[24]](removeEntity(_0xb437xb))[_0x1757[28]](handleError(_0xb437xb))};exports[_0x1757[61]]= function(_0xb437x14,_0xb437xb){return VoiceRecording[_0x1757[68]]({where:{id:_0xb437x14[_0x1757[34]][_0x1757[67]]}})[_0x1757[24]](function(_0xb437x1f){var _0xb437x20=[];_[_0x1757[33]](_0xb437x1f,function(_0xb437x21){try{fs[_0x1757[22]](_0xb437x21[_0x1757[21]]);try{fs[_0x1757[26]](_0xb437x21[_0x1757[21]]);_0xb437x20[_0x1757[64]](_0xb437x21[_0x1757[25]]())}catch(err){console[_0x1757[23]](_0x1757[65],err)}}catch(err){console[_0x1757[23]](_0x1757[66]);_0xb437x20[_0x1757[64]](_0xb437x21[_0x1757[25]]())}});return _0xb437x20})[_0x1757[63]]()[_0x1757[24]](function(){return _0xb437xb[_0x1757[62]](204)})[_0x1757[28]](handleError(_0xb437xb))}
\ No newline at end of file
diff --git a/server/api/voice_recording/voice_recording.events.js b/server/api/voice_recording/voice_recording.events.js
index ac0c175..68987e8 100644
--- a/server/api/voice_recording/voice_recording.events.js
+++ b/server/api/voice_recording/voice_recording.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const VoiceRecording = require('../../models').VoiceRecording;
-
-var VoiceRecordingEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-VoiceRecordingEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  VoiceRecording.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    VoiceRecordingEvents.emit(event + ':' + doc._id, doc);
-    VoiceRecordingEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = VoiceRecordingEvents;
+var _0xabf3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xabf3[0];const EventEmitter=require(_0xabf3[1]);const VoiceRecording=require(_0xabf3[3])[_0xabf3[2]];var VoiceRecordingEvents= new EventEmitter();VoiceRecordingEvents[_0xabf3[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xabf3[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xabf3[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xabf3[6]};for(var e in events){var event=events[e];VoiceRecording[_0xabf3[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4bf2x8,_0x4bf2x9,_0x4bf2xa){VoiceRecordingEvents[_0xabf3[10]](event+ _0xabf3[8]+ _0x4bf2x8[_0xabf3[9]],_0x4bf2x8);VoiceRecordingEvents[_0xabf3[10]](event,_0x4bf2x8);_0x4bf2xa(null)}}module[_0xabf3[11]]= VoiceRecordingEvents
\ No newline at end of file
diff --git a/server/api/voice_recording/voice_recording.socket.js b/server/api/voice_recording/voice_recording.socket.js
index 6b7ee22..e7b5cd6 100644
--- a/server/api/voice_recording/voice_recording.socket.js
+++ b/server/api/voice_recording/voice_recording.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const VoiceRecordingEvents = require('./voice_recording.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('voice_recording:' + event, socket);
-
-    VoiceRecordingEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    VoiceRecordingEvents.removeListener(event, listener);
-  };
-}
+var _0x84e9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x84e9[0];const VoiceRecordingEvents=require(_0x84e9[1]);var events=[_0x84e9[2],_0x84e9[3]];exports[_0x84e9[4]]= function(_0x16b6x3){for(var _0x16b6x4=0,_0x16b6x5=events[_0x84e9[5]];_0x16b6x4< _0x16b6x5;_0x16b6x4++){var _0x16b6x6=events[_0x16b6x4];var _0x16b6x7=createListener(_0x84e9[6]+ _0x16b6x6,_0x16b6x3);VoiceRecordingEvents[_0x84e9[7]](_0x16b6x6,_0x16b6x7);_0x16b6x3[_0x84e9[7]](_0x84e9[8],removeListener(_0x16b6x6,_0x16b6x7))}};function createListener(_0x16b6x6,_0x16b6x3){return function(_0x16b6x9){_0x16b6x3[_0x84e9[9]](_0x16b6x6,_0x16b6x9)}}function removeListener(_0x16b6x6,_0x16b6x7){return function(){VoiceRecordingEvents[_0x84e9[10]](_0x16b6x6,_0x16b6x7)}}
\ No newline at end of file
diff --git a/server/api/voice_voicemail/index.js b/server/api/voice_voicemail/index.js
index db2e635..51cc113 100644
--- a/server/api/voice_voicemail/index.js
+++ b/server/api/voice_voicemail/index.js
@@ -1,17 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./voice_voicemail.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.index);
-router.get('/:uniqueid', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.create);
-router.post('/validate', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.mailboxValidation);
-router.put('/:uniqueid', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.update);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.bulkDestroy);
-router.delete('/:uniqueid', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0x2cb5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65","\x6D\x61\x69\x6C\x62\x6F\x78\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x2cb5[0];var express=require(_0x2cb5[1]);var controller=require(_0x2cb5[2]);var auth=require(_0x2cb5[3]);var router=express.Router();router[_0x2cb5[9]](_0x2cb5[4],auth[_0x2cb5[5]](),auth[_0x2cb5[7]]([7],[_0x2cb5[6]]),controller[_0x2cb5[8]]);router[_0x2cb5[9]](_0x2cb5[10],auth[_0x2cb5[5]](),auth[_0x2cb5[7]]([7],[_0x2cb5[6]]),controller[_0x2cb5[11]]);router[_0x2cb5[13]](_0x2cb5[4],auth[_0x2cb5[5]](),auth[_0x2cb5[7]]([7],[_0x2cb5[6]]),controller[_0x2cb5[12]]);router[_0x2cb5[13]](_0x2cb5[14],auth[_0x2cb5[5]](),auth[_0x2cb5[7]]([7],[_0x2cb5[6]]),controller[_0x2cb5[15]]);router[_0x2cb5[17]](_0x2cb5[10],auth[_0x2cb5[5]](),auth[_0x2cb5[7]]([7],[_0x2cb5[6]]),controller[_0x2cb5[16]]);router[_0x2cb5[19]](_0x2cb5[4],auth[_0x2cb5[5]](),auth[_0x2cb5[7]]([7],[_0x2cb5[6]]),controller[_0x2cb5[18]]);router[_0x2cb5[19]](_0x2cb5[10],auth[_0x2cb5[5]](),auth[_0x2cb5[7]]([7],[_0x2cb5[6]]),controller[_0x2cb5[20]]);module[_0x2cb5[21]]= router
\ No newline at end of file
diff --git a/server/api/voice_voicemail/voice_voicemail.controller.js b/server/api/voice_voicemail/voice_voicemail.controller.js
index 69a1139..b2c72bf 100644
--- a/server/api/voice_voicemail/voice_voicemail.controller.js
+++ b/server/api/voice_voicemail/voice_voicemail.controller.js
@@ -1,190 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var stream = require('stream');
-var Util = require('../../config/util');
-
-var VoiceVoicemail = require('../../models').VoiceVoicemail;
-var VoiceVoicemailMessages = require('../../models').VoiceVoicemailMessages;
-
-// Get list of voice_voicemails
-exports.index = function(req, res) {
-  return VoiceVoicemail
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single voice_voicemail
-exports.show = function(req, res) {
-  VoiceVoicemail
-    .find({
-      where: {
-        uniqueid: req.params.uniqueid
-      }
-    })
-    .then(function(voice_voicemail) {
-      if (!voice_voicemail) {
-        return res.sendStatus(404);
-      }
-      return res.send(voice_voicemail);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// validate mailbox uniqueness
-exports.mailboxValidation = function(req, res) {
-  console.log(req.body);
-  VoiceVoicemail
-    .findAll({
-      where: {
-        mailbox: req.body.mailbox,
-        context: req.body.context
-      }
-    })
-    .then(function(voicemails) {
-      if (!voicemails) {
-        return res.sendStatus(404);
-      }
-      return res.send(voicemails);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-// Creates a new voice_voicemail in the DB.
-exports.create = function(req, res) {
-  VoiceVoicemail
-    .findAll({
-      where: {
-        mailbox: req.body.mailbox,
-        context: req.body.context
-      }
-    })
-    .then(function(voicemails) {
-      if (!voicemails) {
-        return res.sendStatus(404);
-      }
-      if (voicemails.length > 0) {
-        return res.status(500).send({
-          message: 'MESSAGE_EXIST_MAILBOX'
-        })
-      }
-      VoiceVoicemail
-        .create(req.body)
-        .then(function(voice_voicemail) {
-          return res.status(201).send(voice_voicemail);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-};
-
-// Updates an existing voice_voicemail in the DB.
-exports.update = function(req, res) {
-  VoiceVoicemail
-    .findAll({
-      where: {
-        mailbox: req.body.mailbox,
-        context: req.body.context,
-        uniqueid: {
-          $ne: req.body.uniqueid
-        }
-      }
-    })
-    .then(function(voicemails) {
-      if (!voicemails) {
-        return res.sendStatus(404);
-      }
-      if (voicemails.length > 0) {
-        return res.status(500).send({
-          message: 'MESSAGE_EXIST_MAILBOX'
-        })
-      }
-      if (req.body.uniqueid) {
-        delete req.body.uniqueid;
-      }
-      VoiceVoicemail
-        .find({
-          where: {
-            uniqueid: req.params.uniqueid
-          }
-        })
-        .then(function(voice_voicemail) {
-          if (!voice_voicemail) {
-            return res.sendStatus(404);
-          }
-          var updated = _.merge(voice_voicemail, req.body);
-          updated.save()
-            .then(function() {
-              return res.status(200).send(voice_voicemail);
-            })
-            .catch(function(err) {
-              return handleError(res, err);
-            });
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-
-};
-
-// Deletes a voice_voicemail from the DB.
-exports.destroy = function(req, res) {
-  VoiceVoicemail
-    .find({
-      where: {
-        uniqueid: req.params.uniqueid
-      }
-    })
-    .then(function(voice_voicemail) {
-      if (!voice_voicemail) {
-        return res.sendStatus(404);
-      }
-      voice_voicemail.destroy()
-        .then(function() {
-          return res.sendStatus(204);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a voice_voicemail from the DB.
-exports.bulkDestroy = function(req, res) {
-  VoiceVoicemail
-    .destroy({
-      where: {
-        uniqueid: req.query.uniqueid
-      },
-      individualHooks: true
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xb55f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x74\x72\x65\x61\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x6D\x61\x69\x6C\x62\x6F\x78\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6C\x6F\x67","\x6D\x61\x69\x6C\x62\x6F\x78","\x63\x6F\x6E\x74\x65\x78\x74","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x6C\x65\x6E\x67\x74\x68","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x4D\x41\x49\x4C\x42\x4F\x58","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79"];_0xb55f[0];var _=require(_0xb55f[1]);var stream=require(_0xb55f[2]);var Util=require(_0xb55f[3]);var VoiceVoicemail=require(_0xb55f[5])[_0xb55f[4]];var VoiceVoicemailMessages=require(_0xb55f[5])[_0xb55f[6]];exports[_0xb55f[7]]= function(_0x11e6x6,_0x11e6x7){return VoiceVoicemail[_0xb55f[14]](Util[_0xb55f[13]](_0x11e6x6[_0xb55f[12]]))[_0xb55f[11]](function(_0x11e6x9){_0x11e6x7[_0xb55f[10]](200)[_0xb55f[9]](_0x11e6x9)})[_0xb55f[8]](function(_0x11e6x8){return handleError(_0x11e6x7,_0x11e6x8)})};exports[_0xb55f[15]]= function(_0x11e6x6,_0x11e6x7){VoiceVoicemail[_0xb55f[19]]({where:{uniqueid:_0x11e6x6[_0xb55f[18]][_0xb55f[17]]}})[_0xb55f[11]](function(_0x11e6xa){if(!_0x11e6xa){return _0x11e6x7[_0xb55f[16]](404)};return _0x11e6x7[_0xb55f[9]](_0x11e6xa)})[_0xb55f[8]](function(_0x11e6x8){return handleError(_0x11e6x7,_0x11e6x8)})};exports[_0xb55f[20]]= function(_0x11e6x6,_0x11e6x7){console[_0xb55f[22]](_0x11e6x6[_0xb55f[21]]);VoiceVoicemail[_0xb55f[25]]({where:{mailbox:_0x11e6x6[_0xb55f[21]][_0xb55f[23]],context:_0x11e6x6[_0xb55f[21]][_0xb55f[24]]}})[_0xb55f[11]](function(_0x11e6xb){if(!_0x11e6xb){return _0x11e6x7[_0xb55f[16]](404)};return _0x11e6x7[_0xb55f[9]](_0x11e6xb)})[_0xb55f[8]](function(_0x11e6x8){return handleError(_0x11e6x7,_0x11e6x8)})};exports[_0xb55f[26]]= function(_0x11e6x6,_0x11e6x7){VoiceVoicemail[_0xb55f[25]]({where:{mailbox:_0x11e6x6[_0xb55f[21]][_0xb55f[23]],context:_0x11e6x6[_0xb55f[21]][_0xb55f[24]]}})[_0xb55f[11]](function(_0x11e6xb){if(!_0x11e6xb){return _0x11e6x7[_0xb55f[16]](404)};if(_0x11e6xb[_0xb55f[27]]> 0){return _0x11e6x7[_0xb55f[10]](500)[_0xb55f[9]]({message:_0xb55f[28]})};VoiceVoicemail[_0xb55f[26]](_0x11e6x6[_0xb55f[21]])[_0xb55f[11]](function(_0x11e6xa){return _0x11e6x7[_0xb55f[10]](201)[_0xb55f[9]](_0x11e6xa)})[_0xb55f[8]](function(_0x11e6x8){return handleError(_0x11e6x7,_0x11e6x8)})[_0xb55f[8]](function(_0x11e6x8){return handleError(_0x11e6x7,_0x11e6x8)})})};exports[_0xb55f[29]]= function(_0x11e6x6,_0x11e6x7){VoiceVoicemail[_0xb55f[25]]({where:{mailbox:_0x11e6x6[_0xb55f[21]][_0xb55f[23]],context:_0x11e6x6[_0xb55f[21]][_0xb55f[24]],uniqueid:{$ne:_0x11e6x6[_0xb55f[21]][_0xb55f[17]]}}})[_0xb55f[11]](function(_0x11e6xb){if(!_0x11e6xb){return _0x11e6x7[_0xb55f[16]](404)};if(_0x11e6xb[_0xb55f[27]]> 0){return _0x11e6x7[_0xb55f[10]](500)[_0xb55f[9]]({message:_0xb55f[28]})};if(_0x11e6x6[_0xb55f[21]][_0xb55f[17]]){delete _0x11e6x6[_0xb55f[21]][_0xb55f[17]]};VoiceVoicemail[_0xb55f[19]]({where:{uniqueid:_0x11e6x6[_0xb55f[18]][_0xb55f[17]]}})[_0xb55f[11]](function(_0x11e6xa){if(!_0x11e6xa){return _0x11e6x7[_0xb55f[16]](404)};var _0x11e6xc=_[_0xb55f[30]](_0x11e6xa,_0x11e6x6[_0xb55f[21]]);_0x11e6xc[_0xb55f[31]]()[_0xb55f[11]](function(){return _0x11e6x7[_0xb55f[10]](200)[_0xb55f[9]](_0x11e6xa)})[_0xb55f[8]](function(_0x11e6x8){return handleError(_0x11e6x7,_0x11e6x8)})})[_0xb55f[8]](function(_0x11e6x8){return handleError(_0x11e6x7,_0x11e6x8)})})[_0xb55f[8]](function(_0x11e6x8){return handleError(_0x11e6x7,_0x11e6x8)})};exports[_0xb55f[32]]= function(_0x11e6x6,_0x11e6x7){VoiceVoicemail[_0xb55f[19]]({where:{uniqueid:_0x11e6x6[_0xb55f[18]][_0xb55f[17]]}})[_0xb55f[11]](function(_0x11e6xa){if(!_0x11e6xa){return _0x11e6x7[_0xb55f[16]](404)};_0x11e6xa[_0xb55f[32]]()[_0xb55f[11]](function(){return _0x11e6x7[_0xb55f[16]](204)})[_0xb55f[8]](function(_0x11e6x8){return handleError(_0x11e6x7,_0x11e6x8)})})[_0xb55f[8]](function(_0x11e6x8){return handleError(_0x11e6x7,_0x11e6x8)})};exports[_0xb55f[33]]= function(_0x11e6x6,_0x11e6x7){VoiceVoicemail[_0xb55f[32]]({where:{uniqueid:_0x11e6x6[_0xb55f[12]][_0xb55f[17]]},individualHooks:true})[_0xb55f[11]](function(){return _0x11e6x7[_0xb55f[16]](204)})[_0xb55f[8]](function(_0x11e6x8){return handleError(_0x11e6x7,_0x11e6x8)})};function handleError(_0x11e6x7,_0x11e6x8){return _0x11e6x7[_0xb55f[10]](500)[_0xb55f[9]](_0x11e6x8)}
\ No newline at end of file
diff --git a/server/api/voice_voicemail/voice_voicemail.events.js b/server/api/voice_voicemail/voice_voicemail.events.js
index 7f8360b..fb050cf 100644
--- a/server/api/voice_voicemail/voice_voicemail.events.js
+++ b/server/api/voice_voicemail/voice_voicemail.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const VoiceVoicemail = require('../../models').VoiceVoicemail;
-
-var VoiceVoicemailEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-VoiceVoicemailEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  VoiceVoicemail.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    VoiceVoicemailEvents.emit(event + ':' + doc._id, doc);
-    VoiceVoicemailEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = VoiceVoicemailEvents;
+var _0x54eb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x54eb[0];const EventEmitter=require(_0x54eb[1]);const VoiceVoicemail=require(_0x54eb[3])[_0x54eb[2]];var VoiceVoicemailEvents= new EventEmitter();VoiceVoicemailEvents[_0x54eb[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x54eb[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x54eb[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x54eb[6]};for(var e in events){var event=events[e];VoiceVoicemail[_0x54eb[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x9d11x8,_0x9d11x9,_0x9d11xa){VoiceVoicemailEvents[_0x54eb[10]](event+ _0x54eb[8]+ _0x9d11x8[_0x54eb[9]],_0x9d11x8);VoiceVoicemailEvents[_0x54eb[10]](event,_0x9d11x8);_0x9d11xa(null)}}module[_0x54eb[11]]= VoiceVoicemailEvents
\ No newline at end of file
diff --git a/server/api/voice_voicemail/voice_voicemail.socket.js b/server/api/voice_voicemail/voice_voicemail.socket.js
index 1c63f6d..bc99993 100644
--- a/server/api/voice_voicemail/voice_voicemail.socket.js
+++ b/server/api/voice_voicemail/voice_voicemail.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const VoiceVoicemailEvents = require('./voice_voicemail.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('voice_voicemail:' + event, socket);
-
-    VoiceVoicemailEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    VoiceVoicemailEvents.removeListener(event, listener);
-  };
-}
+var _0x8064=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x8064[0];const VoiceVoicemailEvents=require(_0x8064[1]);var events=[_0x8064[2],_0x8064[3]];exports[_0x8064[4]]= function(_0xe64ax3){for(var _0xe64ax4=0,_0xe64ax5=events[_0x8064[5]];_0xe64ax4< _0xe64ax5;_0xe64ax4++){var _0xe64ax6=events[_0xe64ax4];var _0xe64ax7=createListener(_0x8064[6]+ _0xe64ax6,_0xe64ax3);VoiceVoicemailEvents[_0x8064[7]](_0xe64ax6,_0xe64ax7);_0xe64ax3[_0x8064[7]](_0x8064[8],removeListener(_0xe64ax6,_0xe64ax7))}};function createListener(_0xe64ax6,_0xe64ax3){return function(_0xe64ax9){_0xe64ax3[_0x8064[9]](_0xe64ax6,_0xe64ax9)}}function removeListener(_0xe64ax6,_0xe64ax7){return function(){VoiceVoicemailEvents[_0x8064[10]](_0xe64ax6,_0xe64ax7)}}
\ No newline at end of file
diff --git a/server/api/voice_voicemail_messages/index.js b/server/api/voice_voicemail_messages/index.js
index 94f57a6..b90c135 100644
--- a/server/api/voice_voicemail_messages/index.js
+++ b/server/api/voice_voicemail_messages/index.js
@@ -1,15 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./voice_voicemail_messages.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.show);
-router.get('/:id/download', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.download);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xd465=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xd465[0];var express=require(_0xd465[1]);var controller=require(_0xd465[2]);var auth=require(_0xd465[3]);var router=express.Router();router[_0xd465[9]](_0xd465[4],auth[_0xd465[5]](),auth[_0xd465[7]]([7],[_0xd465[6]]),controller[_0xd465[8]]);router[_0xd465[9]](_0xd465[10],auth[_0xd465[5]](),auth[_0xd465[7]]([7],[_0xd465[6]]),controller[_0xd465[11]]);router[_0xd465[9]](_0xd465[12],auth[_0xd465[5]](),auth[_0xd465[7]]([7],[_0xd465[6]]),controller[_0xd465[13]]);router[_0xd465[15]](_0xd465[4],auth[_0xd465[5]](),auth[_0xd465[7]]([7],[_0xd465[6]]),controller[_0xd465[14]]);router[_0xd465[15]](_0xd465[10],auth[_0xd465[5]](),auth[_0xd465[7]]([7],[_0xd465[6]]),controller[_0xd465[16]]);module[_0xd465[17]]= router
\ No newline at end of file
diff --git a/server/api/voice_voicemail_messages/voice_voicemail_messages.controller.js b/server/api/voice_voicemail_messages/voice_voicemail_messages.controller.js
index f97d1a1..66559ae 100644
--- a/server/api/voice_voicemail_messages/voice_voicemail_messages.controller.js
+++ b/server/api/voice_voicemail_messages/voice_voicemail_messages.controller.js
@@ -1,106 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var stream = require('stream');
-var Util = require('../../config/util');
-
-var VoiceVoicemailMessages = require('../../models').VoiceVoicemailMessages;
-
-// Get list of voicemail messages
-exports.index = function(req, res) {
-  return VoiceVoicemailMessages
-    .scope({
-      method: ['mailbox', req.query]
-    })
-    .findAndCountAll(Util.getQuery(req.query))
-    .then(function(result) {
-      res.status(200).send(result);
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-// Get a single voicemail_message
-exports.show = function(req, res) {
-  return VoiceVoicemailMessages
-    .findById(req.params.id)
-    .then(function(voicemail_message) {
-      if (!voicemail_message) {
-        return res.sendStatus(404);
-      }
-      return res.send(voicemail_message);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a voicemail_message from the DB.
-exports.destroy = function(req, res) {
-  return VoiceVoicemailMessages
-    .findById(req.params.id)
-    .then(function(voicemail_message) {
-      if (!voicemail_message) {
-        return res.sendStatus(404);
-      }
-      voicemail_message.recording = null;
-      voicemail_message.destroy();
-    })
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes all voicemail_messages from the DB.
-exports.bulkDestroy = function(req, res) {
-  return VoiceVoicemailMessages
-    .findAll({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(function(voicemail_messages) {
-      var bulkDest = [];
-      voicemail_messages.forEach(function(message) {
-        message.recording = null;
-        bulkDest.push(message.destroy());
-      });
-      return bulkDest;
-    })
-    .all()
-    .then(function() {
-      return res.sendStatus(204);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.download = function(req, res) {
-  return VoiceVoicemailMessages
-    .findById(req.params.id)
-    .then(function(message) {
-      var base64String = new Buffer(message.recording, 'binary').toString('base64');
-      return base64String;
-    })
-    .then(function(base64String) {
-      return res.status(200).send({
-        downloadString: base64String
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0x2eab=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x74\x72\x65\x61\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x6D\x61\x69\x6C\x62\x6F\x78","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x61\x6C\x6C","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x69\x64\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x62\x61\x73\x65\x36\x34","\x62\x69\x6E\x61\x72\x79"];_0x2eab[0];var _=require(_0x2eab[1]);var stream=require(_0x2eab[2]);var Util=require(_0x2eab[3]);var VoiceVoicemailMessages=require(_0x2eab[5])[_0x2eab[4]];exports[_0x2eab[6]]= function(_0xc8b1x5,_0xc8b1x6){return VoiceVoicemailMessages[_0x2eab[16]]({method:[_0x2eab[15],_0xc8b1x5[_0x2eab[12]]]})[_0x2eab[14]](Util[_0x2eab[13]](_0xc8b1x5[_0x2eab[12]]))[_0x2eab[11]](function(_0xc8b1x8){_0xc8b1x6[_0x2eab[10]](200)[_0x2eab[9]](_0xc8b1x8)})[_0x2eab[8]](function(_0xc8b1x7){console[_0x2eab[7]](_0xc8b1x7);return handleError(_0xc8b1x6,_0xc8b1x7)})};exports[_0x2eab[17]]= function(_0xc8b1x5,_0xc8b1x6){return VoiceVoicemailMessages[_0x2eab[21]](_0xc8b1x5[_0x2eab[20]][_0x2eab[19]])[_0x2eab[11]](function(_0xc8b1x9){if(!_0xc8b1x9){return _0xc8b1x6[_0x2eab[18]](404)};return _0xc8b1x6[_0x2eab[9]](_0xc8b1x9)})[_0x2eab[8]](function(_0xc8b1x7){return handleError(_0xc8b1x6,_0xc8b1x7)})};exports[_0x2eab[22]]= function(_0xc8b1x5,_0xc8b1x6){return VoiceVoicemailMessages[_0x2eab[21]](_0xc8b1x5[_0x2eab[20]][_0x2eab[19]])[_0x2eab[11]](function(_0xc8b1x9){if(!_0xc8b1x9){return _0xc8b1x6[_0x2eab[18]](404)};_0xc8b1x9[_0x2eab[23]]= null;_0xc8b1x9[_0x2eab[22]]()})[_0x2eab[11]](function(){return _0xc8b1x6[_0x2eab[18]](204)})[_0x2eab[8]](function(_0xc8b1x7){return handleError(_0xc8b1x6,_0xc8b1x7)})};exports[_0x2eab[24]]= function(_0xc8b1x5,_0xc8b1x6){return VoiceVoicemailMessages[_0x2eab[29]]({where:{id:_0xc8b1x5[_0x2eab[12]][_0x2eab[28]]},individualHooks:true})[_0x2eab[11]](function(_0xc8b1xa){var _0xc8b1xb=[];_0xc8b1xa[_0x2eab[27]](function(_0xc8b1xc){_0xc8b1xc[_0x2eab[23]]= null;_0xc8b1xb[_0x2eab[26]](_0xc8b1xc[_0x2eab[22]]())});return _0xc8b1xb})[_0x2eab[25]]()[_0x2eab[11]](function(){return _0xc8b1x6[_0x2eab[18]](204)})[_0x2eab[8]](function(_0xc8b1x7){return handleError(_0xc8b1x6,_0xc8b1x7)})};exports[_0x2eab[30]]= function(_0xc8b1x5,_0xc8b1x6){return VoiceVoicemailMessages[_0x2eab[21]](_0xc8b1x5[_0x2eab[20]][_0x2eab[19]])[_0x2eab[11]](function(_0xc8b1xc){var _0xc8b1xd= new Buffer(_0xc8b1xc[_0x2eab[23]],_0x2eab[32]).toString(_0x2eab[31]);return _0xc8b1xd})[_0x2eab[11]](function(_0xc8b1xd){return _0xc8b1x6[_0x2eab[10]](200)[_0x2eab[9]]({downloadString:_0xc8b1xd})})[_0x2eab[8]](function(_0xc8b1x7){console[_0x2eab[7]](_0xc8b1x7);return handleError(_0xc8b1x6,_0xc8b1x7)})};function handleError(_0xc8b1x6,_0xc8b1x7){return _0xc8b1x6[_0x2eab[10]](500)[_0x2eab[9]](_0xc8b1x7)}
\ No newline at end of file
diff --git a/server/api/voice_voicemail_messages/voice_voicemail_messages.events.js b/server/api/voice_voicemail_messages/voice_voicemail_messages.events.js
index aa3edd9..6128a73 100644
--- a/server/api/voice_voicemail_messages/voice_voicemail_messages.events.js
+++ b/server/api/voice_voicemail_messages/voice_voicemail_messages.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const VoiceVoicemailMessages = require('../../models').VoiceVoicemailMessages;
-
-var VoiceVoicemailMessagesEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-VoiceVoicemailMessagesEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  VoiceVoicemailMessages.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    VoiceVoicemailMessagesEvents.emit(event + ':' + doc._id, doc);
-    VoiceVoicemailMessagesEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = VoiceVoicemailMessagesEvents;
+var _0xcf72=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xcf72[0];const EventEmitter=require(_0xcf72[1]);const VoiceVoicemailMessages=require(_0xcf72[3])[_0xcf72[2]];var VoiceVoicemailMessagesEvents= new EventEmitter();VoiceVoicemailMessagesEvents[_0xcf72[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xcf72[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xcf72[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xcf72[6]};for(var e in events){var event=events[e];VoiceVoicemailMessages[_0xcf72[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x3784x8,_0x3784x9,_0x3784xa){VoiceVoicemailMessagesEvents[_0xcf72[10]](event+ _0xcf72[8]+ _0x3784x8[_0xcf72[9]],_0x3784x8);VoiceVoicemailMessagesEvents[_0xcf72[10]](event,_0x3784x8);_0x3784xa(null)}}module[_0xcf72[11]]= VoiceVoicemailMessagesEvents
\ No newline at end of file
diff --git a/server/api/voice_voicemail_messages/voice_voicemail_messages.socket.js b/server/api/voice_voicemail_messages/voice_voicemail_messages.socket.js
index 3e1dac1..1d8d274 100644
--- a/server/api/voice_voicemail_messages/voice_voicemail_messages.socket.js
+++ b/server/api/voice_voicemail_messages/voice_voicemail_messages.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const VoiceVoicemailMessagesEvents = require('./voice_voicemail_messages.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('voice_voicemail_messages:' + event, socket);
-
-    VoiceVoicemailMessagesEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    VoiceVoicemailMessagesEvents.removeListener(event, listener);
-  };
-}
+var _0xc8ca=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xc8ca[0];const VoiceVoicemailMessagesEvents=require(_0xc8ca[1]);var events=[_0xc8ca[2],_0xc8ca[3]];exports[_0xc8ca[4]]= function(_0x47d4x3){for(var _0x47d4x4=0,_0x47d4x5=events[_0xc8ca[5]];_0x47d4x4< _0x47d4x5;_0x47d4x4++){var _0x47d4x6=events[_0x47d4x4];var _0x47d4x7=createListener(_0xc8ca[6]+ _0x47d4x6,_0x47d4x3);VoiceVoicemailMessagesEvents[_0xc8ca[7]](_0x47d4x6,_0x47d4x7);_0x47d4x3[_0xc8ca[7]](_0xc8ca[8],removeListener(_0x47d4x6,_0x47d4x7))}};function createListener(_0x47d4x6,_0x47d4x3){return function(_0x47d4x9){_0x47d4x3[_0xc8ca[9]](_0x47d4x6,_0x47d4x9)}}function removeListener(_0x47d4x6,_0x47d4x7){return function(){VoiceVoicemailMessagesEvents[_0xc8ca[10]](_0x47d4x6,_0x47d4x7)}}
\ No newline at end of file
diff --git a/server/api/widget/index.js b/server/api/widget/index.js
index a2d3e04..3476183 100644
--- a/server/api/widget/index.js
+++ b/server/api/widget/index.js
@@ -1,13 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./widget.controller');
-var auth = require('../../auth/auth.service');
-
-var router = express.Router();
-
-router.get('/counter', auth.isAuthenticated(), auth.hasModule([2], ['admin', 'agent']), controller.counter);
-router.get('/table', auth.isAuthenticated(), auth.hasModule([2], ['admin', 'agent']), controller.table);
-router.get('/piechart', auth.isAuthenticated(), auth.hasModule([2], ['admin', 'agent']), controller.piechart);
-
-module.exports = router;
+var _0x3b74=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x77\x69\x64\x67\x65\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x63\x6F\x75\x6E\x74\x65\x72","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x63\x6F\x75\x6E\x74\x65\x72","\x67\x65\x74","\x2F\x74\x61\x62\x6C\x65","\x74\x61\x62\x6C\x65","\x2F\x70\x69\x65\x63\x68\x61\x72\x74","\x70\x69\x65\x63\x68\x61\x72\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x3b74[0];var express=require(_0x3b74[1]);var controller=require(_0x3b74[2]);var auth=require(_0x3b74[3]);var router=express.Router();router[_0x3b74[10]](_0x3b74[4],auth[_0x3b74[5]](),auth[_0x3b74[8]]([2],[_0x3b74[6],_0x3b74[7]]),controller[_0x3b74[9]]);router[_0x3b74[10]](_0x3b74[11],auth[_0x3b74[5]](),auth[_0x3b74[8]]([2],[_0x3b74[6],_0x3b74[7]]),controller[_0x3b74[12]]);router[_0x3b74[10]](_0x3b74[13],auth[_0x3b74[5]](),auth[_0x3b74[8]]([2],[_0x3b74[6],_0x3b74[7]]),controller[_0x3b74[14]]);module[_0x3b74[15]]= router
\ No newline at end of file
diff --git a/server/api/widget/widget.controller.js b/server/api/widget/widget.controller.js
index 1f15835..f3c6c2e 100644
--- a/server/api/widget/widget.controller.js
+++ b/server/api/widget/widget.controller.js
@@ -1,147 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var sequelize = require('../../models').sequelize;
-var reportBuildUtils = require('../../utils/report_build');
-var Promise = require('bluebird');
-
-// var ReportAgent = require('../../models').ReportAgent;
-// var ReportCall = require('../../models').ReportCall;
-// var ReportDial = require('../../models').ReportDial;
-// var ReportMember = require('../../models').ReportMember;
-// var ReportQueue = require('../../models').ReportQueue;
-
-
-
-exports.counter = function(req, res) {
-  return Promise
-    .all([])
-    .then(function() {
-      return req.query.table;
-    })
-    .then(reportBuildUtils.buildFilter(req.user))
-    .then(function(filter) {
-      var query = util.format("SELECT %s FROM %s", req.query.select, req.query.table);
-      if (req.query.condition && req.query.condition !== 'null') {
-        query += util.format(" WHERE %s", decodeURIComponent(req.query.condition))
-      }
-      if (!filter || filter !== 'empty') {
-        if (filter) {
-          query += req.query.condition ? ' AND ' + filter : ' WHERE ' + filter;
-        }
-        console.log(' ==== RESULTING QUERY ====');
-        console.log(query);
-        console.log(' =========================');
-        return sequelize.query(query, {
-          type: sequelize.QueryTypes.SELECT
-        });
-      } else {
-        console.log(' ==== RESULTING QUERY ====');
-        console.log('NO SUFFICIENT PERMISSIONS');
-        console.log(' =========================');
-        return [];
-      }
-    })
-    .then(function(result) {
-      return res.status(200).send({
-        result: result
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-      return handleError(res, err);
-    });
-};
-
-exports.table = function(req, res) {
-  var columns = [];
-  var elem;
-  if (req.query.fields) {
-    if (_.isArray(req.query.fields)) {
-      req.query.fields.forEach(function(element) {
-        elem = JSON.parse(element);
-        if (elem.column && elem.alias) {
-          columns.push(elem.column + ' AS "' + elem.alias + '"');
-        }
-      });
-    } else if (_.isString(req.query.fields)) {
-      elem = JSON.parse(req.query.fields);
-      if (elem.column && elem.alias) {
-        columns.push(elem.column + ' AS "' + elem.alias + '"');
-      }
-    }
-  }
-  var select = columns.length ? columns.join(',') : '*';
-  sequelize.query(util.format("SELECT %s FROM %s WHERE %s", select, 'report' + req.query.table, decodeURIComponent(req.query.condition)), {
-      type: sequelize.QueryTypes.SELECT
-    })
-    .then(function(result) {
-      return res.status(200).send(result);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.piechart = function(req, res) {
-  return Promise
-    .all([])
-    .then(function() {
-      return req.query.table;
-    })
-    .then(reportBuildUtils.buildFilter(req.user))
-    .then(function(filter) {
-      var columns = [];
-      var elem;
-      if (req.query.fields) {
-        if (_.isArray(req.query.fields)) {
-          req.query.fields.forEach(function(element) {
-            elem = JSON.parse(element);
-            if (elem.column && elem.alias) {
-              columns.push(elem.column + ' AS "' + elem.alias + '"');
-            }
-          });
-        } else if (_.isString(req.query.fields)) {
-          elem = JSON.parse(req.query.fields);
-          if (elem.column && elem.alias) {
-            columns.push(elem.column + ' AS "' + elem.alias + '"');
-          }
-        }
-      }
-      var select = columns.length ? columns.join(',') : '*';
-      var where = '';
-      if (req.query.condition && req.query.condition !== 'undefined' && req.query.condition !== 'null') {
-        where = util.format(' WHERE %s', decodeURIComponent(req.query.condition));
-      }
-      if (!filter || filter !== 'empty') {
-        if (filter) {
-          where += where ? ' AND ' + filter : ' WHERE ' + filter;
-        }
-        var query = util.format("SELECT %s FROM %s%s", select, req.query.table, where);
-        console.log(' ==== RESULTING QUERY ====');
-        console.log(query);
-        console.log(' =========================');
-        return sequelize.query(query, {
-          type: sequelize.QueryTypes.SELECT
-        });
-      } else {
-        console.log(' ==== RESULTING QUERY ====');
-        console.log('NO SUFFICIENT PERMISSIONS');
-        console.log(' =========================');
-        return [];
-      }
-    })
-    .then(function(result) {
-      return res.status(200).send({
-        result: result
-      });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xf1f2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x62\x6C\x75\x65\x62\x69\x72\x64","\x63\x6F\x75\x6E\x74\x65\x72","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x53\x45\x4C\x45\x43\x54\x20\x25\x73\x20\x46\x52\x4F\x4D\x20\x25\x73","\x73\x65\x6C\x65\x63\x74","\x71\x75\x65\x72\x79","\x74\x61\x62\x6C\x65","\x66\x6F\x72\x6D\x61\x74","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x6E\x75\x6C\x6C","\x20\x57\x48\x45\x52\x45\x20\x25\x73","\x65\x6D\x70\x74\x79","\x20\x41\x4E\x44\x20","\x20\x57\x48\x45\x52\x45\x20","\x20\x3D\x3D\x3D\x3D\x20\x52\x45\x53\x55\x4C\x54\x49\x4E\x47\x20\x51\x55\x45\x52\x59\x20\x3D\x3D\x3D\x3D","\x20\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x4E\x4F\x20\x53\x55\x46\x46\x49\x43\x49\x45\x4E\x54\x20\x50\x45\x52\x4D\x49\x53\x53\x49\x4F\x4E\x53","\x75\x73\x65\x72","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","\x61\x6C\x6C","\x66\x69\x65\x6C\x64\x73","\x69\x73\x41\x72\x72\x61\x79","\x70\x61\x72\x73\x65","\x63\x6F\x6C\x75\x6D\x6E","\x61\x6C\x69\x61\x73","\x20\x41\x53\x20\x22","\x22","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x69\x73\x53\x74\x72\x69\x6E\x67","\x6C\x65\x6E\x67\x74\x68","\x2C","\x6A\x6F\x69\x6E","\x2A","\x53\x45\x4C\x45\x43\x54\x20\x25\x73\x20\x46\x52\x4F\x4D\x20\x25\x73\x20\x57\x48\x45\x52\x45\x20\x25\x73","\x72\x65\x70\x6F\x72\x74","\x70\x69\x65\x63\x68\x61\x72\x74","","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x53\x45\x4C\x45\x43\x54\x20\x25\x73\x20\x46\x52\x4F\x4D\x20\x25\x73\x25\x73"];_0xf1f2[0];var _=require(_0xf1f2[1]);var util=require(_0xf1f2[2]);var sequelize=require(_0xf1f2[4])[_0xf1f2[3]];var reportBuildUtils=require(_0xf1f2[5]);var Promise=require(_0xf1f2[6]);exports[_0xf1f2[7]]= function(_0x7a67x6,_0x7a67x7){return Promise[_0xf1f2[31]]([])[_0xf1f2[12]](function(){return _0x7a67x6[_0xf1f2[15]][_0xf1f2[16]]})[_0xf1f2[12]](reportBuildUtils[_0xf1f2[30]](_0x7a67x6[_0xf1f2[29]]))[_0xf1f2[12]](function(_0x7a67xa){var _0x7a67xb=util[_0xf1f2[17]](_0xf1f2[13],_0x7a67x6[_0xf1f2[15]][_0xf1f2[14]],_0x7a67x6[_0xf1f2[15]][_0xf1f2[16]]);if(_0x7a67x6[_0xf1f2[15]][_0xf1f2[18]]&& _0x7a67x6[_0xf1f2[15]][_0xf1f2[18]]!== _0xf1f2[19]){_0x7a67xb+= util[_0xf1f2[17]](_0xf1f2[20],decodeURIComponent(_0x7a67x6[_0xf1f2[15]][_0xf1f2[18]]))};if(!_0x7a67xa|| _0x7a67xa!== _0xf1f2[21]){if(_0x7a67xa){_0x7a67xb+= _0x7a67x6[_0xf1f2[15]][_0xf1f2[18]]?_0xf1f2[22]+ _0x7a67xa:_0xf1f2[23]+ _0x7a67xa};console[_0xf1f2[8]](_0xf1f2[24]);console[_0xf1f2[8]](_0x7a67xb);console[_0xf1f2[8]](_0xf1f2[25]);return sequelize[_0xf1f2[15]](_0x7a67xb,{type:sequelize[_0xf1f2[27]][_0xf1f2[26]]})}else {console[_0xf1f2[8]](_0xf1f2[24]);console[_0xf1f2[8]](_0xf1f2[28]);console[_0xf1f2[8]](_0xf1f2[25]);return []}})[_0xf1f2[12]](function(_0x7a67x9){return _0x7a67x7[_0xf1f2[11]](200)[_0xf1f2[10]]({result:_0x7a67x9})})[_0xf1f2[9]](function(_0x7a67x8){console[_0xf1f2[8]](_0x7a67x8);return handleError(_0x7a67x7,_0x7a67x8)})};exports[_0xf1f2[16]]= function(_0x7a67x6,_0x7a67x7){var _0x7a67xc=[];var _0x7a67xd;if(_0x7a67x6[_0xf1f2[15]][_0xf1f2[32]]){if(_[_0xf1f2[33]](_0x7a67x6[_0xf1f2[15]][_0xf1f2[32]])){_0x7a67x6[_0xf1f2[15]][_0xf1f2[32]][_0xf1f2[40]](function(_0x7a67xe){_0x7a67xd= JSON[_0xf1f2[34]](_0x7a67xe);if(_0x7a67xd[_0xf1f2[35]]&& _0x7a67xd[_0xf1f2[36]]){_0x7a67xc[_0xf1f2[39]](_0x7a67xd[_0xf1f2[35]]+ _0xf1f2[37]+ _0x7a67xd[_0xf1f2[36]]+ _0xf1f2[38])}})}else {if(_[_0xf1f2[41]](_0x7a67x6[_0xf1f2[15]][_0xf1f2[32]])){_0x7a67xd= JSON[_0xf1f2[34]](_0x7a67x6[_0xf1f2[15]][_0xf1f2[32]]);if(_0x7a67xd[_0xf1f2[35]]&& _0x7a67xd[_0xf1f2[36]]){_0x7a67xc[_0xf1f2[39]](_0x7a67xd[_0xf1f2[35]]+ _0xf1f2[37]+ _0x7a67xd[_0xf1f2[36]]+ _0xf1f2[38])}}}};var _0x7a67xf=_0x7a67xc[_0xf1f2[42]]?_0x7a67xc[_0xf1f2[44]](_0xf1f2[43]):_0xf1f2[45];sequelize[_0xf1f2[15]](util[_0xf1f2[17]](_0xf1f2[46],_0x7a67xf,_0xf1f2[47]+ _0x7a67x6[_0xf1f2[15]][_0xf1f2[16]],decodeURIComponent(_0x7a67x6[_0xf1f2[15]][_0xf1f2[18]])),{type:sequelize[_0xf1f2[27]][_0xf1f2[26]]})[_0xf1f2[12]](function(_0x7a67x9){return _0x7a67x7[_0xf1f2[11]](200)[_0xf1f2[10]](_0x7a67x9)})[_0xf1f2[9]](function(_0x7a67x8){return handleError(_0x7a67x7,_0x7a67x8)})};exports[_0xf1f2[48]]= function(_0x7a67x6,_0x7a67x7){return Promise[_0xf1f2[31]]([])[_0xf1f2[12]](function(){return _0x7a67x6[_0xf1f2[15]][_0xf1f2[16]]})[_0xf1f2[12]](reportBuildUtils[_0xf1f2[30]](_0x7a67x6[_0xf1f2[29]]))[_0xf1f2[12]](function(_0x7a67xa){var _0x7a67xc=[];var _0x7a67xd;if(_0x7a67x6[_0xf1f2[15]][_0xf1f2[32]]){if(_[_0xf1f2[33]](_0x7a67x6[_0xf1f2[15]][_0xf1f2[32]])){_0x7a67x6[_0xf1f2[15]][_0xf1f2[32]][_0xf1f2[40]](function(_0x7a67xe){_0x7a67xd= JSON[_0xf1f2[34]](_0x7a67xe);if(_0x7a67xd[_0xf1f2[35]]&& _0x7a67xd[_0xf1f2[36]]){_0x7a67xc[_0xf1f2[39]](_0x7a67xd[_0xf1f2[35]]+ _0xf1f2[37]+ _0x7a67xd[_0xf1f2[36]]+ _0xf1f2[38])}})}else {if(_[_0xf1f2[41]](_0x7a67x6[_0xf1f2[15]][_0xf1f2[32]])){_0x7a67xd= JSON[_0xf1f2[34]](_0x7a67x6[_0xf1f2[15]][_0xf1f2[32]]);if(_0x7a67xd[_0xf1f2[35]]&& _0x7a67xd[_0xf1f2[36]]){_0x7a67xc[_0xf1f2[39]](_0x7a67xd[_0xf1f2[35]]+ _0xf1f2[37]+ _0x7a67xd[_0xf1f2[36]]+ _0xf1f2[38])}}}};var _0x7a67xf=_0x7a67xc[_0xf1f2[42]]?_0x7a67xc[_0xf1f2[44]](_0xf1f2[43]):_0xf1f2[45];var _0x7a67x10=_0xf1f2[49];if(_0x7a67x6[_0xf1f2[15]][_0xf1f2[18]]&& _0x7a67x6[_0xf1f2[15]][_0xf1f2[18]]!== _0xf1f2[50]&& _0x7a67x6[_0xf1f2[15]][_0xf1f2[18]]!== _0xf1f2[19]){_0x7a67x10= util[_0xf1f2[17]](_0xf1f2[20],decodeURIComponent(_0x7a67x6[_0xf1f2[15]][_0xf1f2[18]]))};if(!_0x7a67xa|| _0x7a67xa!== _0xf1f2[21]){if(_0x7a67xa){_0x7a67x10+= _0x7a67x10?_0xf1f2[22]+ _0x7a67xa:_0xf1f2[23]+ _0x7a67xa};var _0x7a67xb=util[_0xf1f2[17]](_0xf1f2[51],_0x7a67xf,_0x7a67x6[_0xf1f2[15]][_0xf1f2[16]],_0x7a67x10);console[_0xf1f2[8]](_0xf1f2[24]);console[_0xf1f2[8]](_0x7a67xb);console[_0xf1f2[8]](_0xf1f2[25]);return sequelize[_0xf1f2[15]](_0x7a67xb,{type:sequelize[_0xf1f2[27]][_0xf1f2[26]]})}else {console[_0xf1f2[8]](_0xf1f2[24]);console[_0xf1f2[8]](_0xf1f2[28]);console[_0xf1f2[8]](_0xf1f2[25]);return []}})[_0xf1f2[12]](function(_0x7a67x9){return _0x7a67x7[_0xf1f2[11]](200)[_0xf1f2[10]]({result:_0x7a67x9})})[_0xf1f2[9]](function(_0x7a67x8){return handleError(_0x7a67x7,_0x7a67x8)})};function handleError(_0x7a67x7,_0x7a67x8){return _0x7a67x7[_0xf1f2[11]](500)[_0xf1f2[10]](_0x7a67x8)}
\ No newline at end of file
diff --git a/server/api/xchatty/index.js b/server/api/xchatty/index.js
index d408579..0ca25b2 100644
--- a/server/api/xchatty/index.js
+++ b/server/api/xchatty/index.js
@@ -1,28 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./xchatty.controller');
-var license = require('../../config/license/license.service');
-
-var router = express.Router();
-
-router.get('/jquery', controller.getJqueryLibrary);
-router.get('/assets', controller.getAssets);
-
-router.get('/submit', controller.submitEnquiry);
-router.get('/rating', controller.setRating);
-
-router.get('/:id', license.isValidDate(), license.hasChat(), controller.getJsByWebsite);
-router.get('/:id/abandon', license.isValidDate(), license.hasChat(), controller.abandonCustomer);
-router.get('/:id/html', license.isValidDate(), license.hasChat(), controller.getHtmlByWebsite);
-router.get('/:id/proactive', license.isValidDate(), license.hasChat(), controller.getProactiveActionsByWebsite);
-router.get('/:id/read', license.isValidDate(), license.hasChat(), controller.getMessages);
-router.get('/:id/send', license.isValidDate(), license.hasChat(), controller.sendMessage);
-router.get('/:id/signout', license.isValidDate(), license.hasChat(), controller.signoutCustomer);
-router.get('/:id/signup', license.isValidDate(), license.hasChat(), controller.signupCustomer);
-router.get('/:id/status', license.isValidDate(), license.hasChat(), controller.getStatusByWebsite);
-router.get('/:id/styles', license.isValidDate(), license.hasChat(), controller.getStyleByWebsite);
-router.get('/:id/transcript', license.isValidDate(), license.hasChat(), controller.getTranscript);
-router.get('/:id/unserved', license.isValidDate(), license.hasChat(), controller.unservedCustomer);
-
-module.exports = router;
+var _0x53e0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x78\x63\x68\x61\x74\x74\x79\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x6A\x71\x75\x65\x72\x79","\x67\x65\x74\x4A\x71\x75\x65\x72\x79\x4C\x69\x62\x72\x61\x72\x79","\x67\x65\x74","\x2F\x61\x73\x73\x65\x74\x73","\x67\x65\x74\x41\x73\x73\x65\x74\x73","\x2F\x73\x75\x62\x6D\x69\x74","\x73\x75\x62\x6D\x69\x74\x45\x6E\x71\x75\x69\x72\x79","\x2F\x72\x61\x74\x69\x6E\x67","\x73\x65\x74\x52\x61\x74\x69\x6E\x67","\x2F\x3A\x69\x64","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x67\x65\x74\x4A\x73\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x2F\x3A\x69\x64\x2F\x61\x62\x61\x6E\x64\x6F\x6E","\x61\x62\x61\x6E\x64\x6F\x6E\x43\x75\x73\x74\x6F\x6D\x65\x72","\x2F\x3A\x69\x64\x2F\x68\x74\x6D\x6C","\x67\x65\x74\x48\x74\x6D\x6C\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x2F\x3A\x69\x64\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65","\x67\x65\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x2F\x3A\x69\x64\x2F\x72\x65\x61\x64","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x2F\x3A\x69\x64\x2F\x73\x65\x6E\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x73\x69\x67\x6E\x6F\x75\x74","\x73\x69\x67\x6E\x6F\x75\x74\x43\x75\x73\x74\x6F\x6D\x65\x72","\x2F\x3A\x69\x64\x2F\x73\x69\x67\x6E\x75\x70","\x73\x69\x67\x6E\x75\x70\x43\x75\x73\x74\x6F\x6D\x65\x72","\x2F\x3A\x69\x64\x2F\x73\x74\x61\x74\x75\x73","\x67\x65\x74\x53\x74\x61\x74\x75\x73\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x2F\x3A\x69\x64\x2F\x73\x74\x79\x6C\x65\x73","\x67\x65\x74\x53\x74\x79\x6C\x65\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x2F\x3A\x69\x64\x2F\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x67\x65\x74\x54\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x2F\x3A\x69\x64\x2F\x75\x6E\x73\x65\x72\x76\x65\x64","\x75\x6E\x73\x65\x72\x76\x65\x64\x43\x75\x73\x74\x6F\x6D\x65\x72","\x65\x78\x70\x6F\x72\x74\x73"];_0x53e0[0];var express=require(_0x53e0[1]);var controller=require(_0x53e0[2]);var license=require(_0x53e0[3]);var router=express.Router();router[_0x53e0[6]](_0x53e0[4],controller[_0x53e0[5]]);router[_0x53e0[6]](_0x53e0[7],controller[_0x53e0[8]]);router[_0x53e0[6]](_0x53e0[9],controller[_0x53e0[10]]);router[_0x53e0[6]](_0x53e0[11],controller[_0x53e0[12]]);router[_0x53e0[6]](_0x53e0[13],license[_0x53e0[14]](),license[_0x53e0[15]](),controller[_0x53e0[16]]);router[_0x53e0[6]](_0x53e0[17],license[_0x53e0[14]](),license[_0x53e0[15]](),controller[_0x53e0[18]]);router[_0x53e0[6]](_0x53e0[19],license[_0x53e0[14]](),license[_0x53e0[15]](),controller[_0x53e0[20]]);router[_0x53e0[6]](_0x53e0[21],license[_0x53e0[14]](),license[_0x53e0[15]](),controller[_0x53e0[22]]);router[_0x53e0[6]](_0x53e0[23],license[_0x53e0[14]](),license[_0x53e0[15]](),controller[_0x53e0[24]]);router[_0x53e0[6]](_0x53e0[25],license[_0x53e0[14]](),license[_0x53e0[15]](),controller[_0x53e0[26]]);router[_0x53e0[6]](_0x53e0[27],license[_0x53e0[14]](),license[_0x53e0[15]](),controller[_0x53e0[28]]);router[_0x53e0[6]](_0x53e0[29],license[_0x53e0[14]](),license[_0x53e0[15]](),controller[_0x53e0[30]]);router[_0x53e0[6]](_0x53e0[31],license[_0x53e0[14]](),license[_0x53e0[15]](),controller[_0x53e0[32]]);router[_0x53e0[6]](_0x53e0[33],license[_0x53e0[14]](),license[_0x53e0[15]](),controller[_0x53e0[34]]);router[_0x53e0[6]](_0x53e0[35],license[_0x53e0[14]](),license[_0x53e0[15]](),controller[_0x53e0[36]]);router[_0x53e0[6]](_0x53e0[37],license[_0x53e0[14]](),license[_0x53e0[15]](),controller[_0x53e0[38]]);module[_0x53e0[39]]= router
\ No newline at end of file
diff --git a/server/api/xchatty/xchatty.controller.js b/server/api/xchatty/xchatty.controller.js
index 3932636..1fdf53b 100644
--- a/server/api/xchatty/xchatty.controller.js
+++ b/server/api/xchatty/xchatty.controller.js
@@ -1,1233 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var jsmin = require('jsmin').jsmin;
-var Mustache = require('mustache');
-var querystring = require('querystring');
-var path = require('path');
-var md5 = require('md5');
-var fs = require('fs');
-var UAParser = require('ua-parser-js');
-var uaParser = new UAParser();
-var languageParser = require('accept-language-parser');
-var ipaddr = require('ipaddr.js');
-var geoip = require('geoip-lite');
-var csv = require('to-csv');
-var util = require('util');
-var moment = require('moment');
-
-var Scheduler = require('../../config/routing/scheduler');
-var config = require('../../config/environment');
-var xchatty_components = require('../../components/xchatty');
-var Util = require('../../config/util');
-var license = require('../../config/license/license.service');
-var demoLicense = {
-  users: 1,
-  agents: 1,
-  telephones: 0,
-  chat: false,
-  mail: false,
-  fax: false,
-  messaging: false,
-  cm: false,
-  dialer: false,
-  jscripty: false,
-  update: false,
-  custom: false,
-  description: 'DEMO LICENSE'
-};
-
-var sequelize = require('../../models').sequelize;
-var User = require('../../models').User;
-var Agent = require('../../models').User;
-var ChatRoom = require('../../models').ChatRoom;
-var ChatEnquiry = require('../../models').ChatEnquiry;
-var ChatVisitor = require('../../models').ChatVisitor;
-var ChatMessage = require('../../models').ChatMessage;
-var ChatWebsite = require('../../models').ChatWebsite;
-var ChatWebsitesField = require('../../models').ChatWebsitesField;
-var ChatProactiveAction = require('../../models').ChatProactiveAction;
-var ReportChatSession = require('../../models').ReportChatSession;
-var ChatQueue = require('../../models').ChatQueue;
-var License = require('../../models').License;
-var Xchatty = require('../../models').Xchatty;
-var Setting = require('../../models').Setting;
-const Contact = require('../../models').Contact;
-var Interval = require('../../models').Interval;
-
-const weekDaysCollection = {
-  mon: 1,
-  tue: 2,
-  wed: 3,
-  thu: 4,
-  fri: 5,
-  sat: 6,
-  sun: 7
-};
-
-const monthsCollection = {
-  jan: 1,
-  feb: 2,
-  mar: 3,
-  apr: 4,
-  may: 5,
-  jun: 6,
-  jul: 7,
-  aug: 8,
-  sep: 9,
-  oct: 10,
-  nov: 11,
-  dec: 12
-};
-
-var id = 1;
-
-// Get list of xchattys
-exports.index = function(req, res, next) {
-  return Xchatty
-    .findAll()
-    .then(function(xchattys) {
-      return res.status(200).send(xchattys);
-    })
-    .catch(function(err) {
-      return next(err);
-    });
-};
-
-exports.getJsByWebsite = function(req, res, next) {
-
-  // TO DO: Find the configuration of the website and replace configuration in the file
-  ChatWebsite
-    .findById(req.params.id)
-    .then(function(chatWebsite) {
-      res.set({
-        'Content-Type': 'application/javascript',
-        'x-timestamp': Date.now(),
-        'x-sent': true
-      });
-
-      var js = xchatty_components.js;
-      /*jshint multistr: true */
-      var configJS = {
-        websiteId: req.params.id,
-        // rootPath: path.join(chatWebsite.remote, 'api', 'xchatty/'),
-        rootPath: Util.stripTrailingSlash(chatWebsite.remote) + '/api/xchatty/',
-        signedUp: 'false',
-        windowFocused: 'false',
-        isNewPage: 'true',
-        processingSignUp: 'false',
-        processingEnquiry: 'false',
-        processingSend: 'false',
-        processingRating: 'false',
-        visitorFullname: '""',
-        visitorAvatar: '""',
-        timerReadMessages: 'null',
-        timerCheckStatus: 'null',
-        isOnline: 'false',
-        decayHistory: 0,
-        defaultTimeout: 5000,
-        isInitialStatusCheck: 'true',
-        muteNotificationSoundOnce: 'false',
-        assetBase: Util.stripTrailingSlash(chatWebsite.remote) + '/api/xchatty/assets',
-        hasSessionSaf: 'false',
-        restoreOpenState: 'false',
-        animateHover: chatWebsite.animation,
-        hideEmail: 'false',
-        hideOffline: 'false',
-        headerShape: chatWebsite.header_shape,
-        HeaderOnline: chatWebsite.header_online,
-        OnlineMessage: chatWebsite.online_message,
-        UsernamePlaceholder: chatWebsite.username_placeholder,
-        EmailPlaceholder: chatWebsite.email_placeholder,
-        StartChatButtonText: chatWebsite.start_chat_button,
-        OfflineMessage: chatWebsite.offline_message,
-        HeaderOffline: chatWebsite.header_offline,
-        EnquiryMessagePlaceholder: chatWebsite.enquiry_message_placeholder,
-        EnquiryButtonText: chatWebsite.enquiry_button,
-        downloadTranscript: chatWebsite.download_transcript,
-        RatingMessage: chatWebsite.rating_message,
-        RatingSend: chatWebsite.rating_send,
-        RatingSkip: chatWebsite.rating_skip,
-        MessageAgentsBusy: chatWebsite.agents_busy,
-        NameTitle: chatWebsite.name_title,
-        EmailTitle: chatWebsite.email_title,
-        MessageTitle: chatWebsite.message_title
-      };
-
-      js = Mustache.render(js, configJS);
-      res.send(js);
-
-    })
-    .catch(function(err) {
-      next(err);
-    });
-
-};
-
-exports.getStyleByWebsite = function(req, res, next) {
-
-  // TO DO: Find the configuration of the website and replace configuration in the file
-  ChatWebsite
-    .findById(req.params.id)
-    .then(function(chatWebsite) {
-
-      res.set({
-        'Content-Type': 'text/css',
-        'x-timestamp': Date.now(),
-        'x-sent': true
-      });
-
-      var css = xchatty_components.css;
-
-      var configCSS = {
-        // assetBase: path.join(chatWebsite.remote, 'api', 'xchatty',
-        //   'assets'),
-        assetBase: Util.stripTrailingSlash(chatWebsite.remote) + '/api/xchatty/assets',
-        color: chatWebsite.color,
-        colorFocus: chatWebsite.color_focus,
-        colorButton: chatWebsite.color_button
-      };
-
-      css = Mustache.render(css, configCSS);
-      res.send(css);
-    })
-    .catch(function(err) {
-      next(err);
-    });
-};
-
-exports.getAssets = function(req, res, next) {
-  if (req.query.hasOwnProperty('uploaded')) {
-    res.download(path.join(config.root, 'server', 'files', req.query.resource));
-  } else {
-    res.download(path.join(config.root, 'server', 'components', 'xchatty', 'assets', req.query.resource));
-  }
-};
-
-exports.getJqueryLibrary = function(req, res, next) {
-
-  // TODO: Find the configuration of the website and replace configuration in the file
-  res.set({
-    'Content-Type': 'application/javascript',
-    'x-timestamp': Date.now(),
-    'x-sent': true
-  });
-
-  var jquery = xchatty_components.jquery;
-  res.send(jquery);
-
-};
-
-exports.getStatus = function(req, res, next) {
-
-  if (!req.session.xchatty) {
-    req.session.xchatty = {};
-  }
-
-  var _jsonResponse = {};
-
-  return Agent
-    .findAll({
-      where: {
-        online: true,
-        role: 'agent'
-      }
-    })
-    .then(function(agents) {
-      if (req.query.data.open_state)
-        req.session.xchatty.open_state = req.query.data.open_state === 'true' ? true : false;
-      _jsonResponse = {
-        success: true,
-        has_session_saf: null,
-        signed_up: req.session.xchatty.room_id ? true : false,
-        fullname: req.session.xchatty.fullname ? req.session.xchatty.fullname : '',
-        email: req.session.xchatty.email ? req.session.xchatty.email : '',
-        avatar: req.session.xchatty.avatar ? req.session.xchatty.avatar : '',
-        open_state: req.session.xchatty.open_state || req.session.xchatty.room_id ? true : false,
-        online: agents.length ? true : false,
-        is_unserved: false,
-        room_id: 0
-      };
-      return;
-    })
-    .then(function() {
-      if (req.session.xchatty.visitor_id) {
-        return ChatRoom
-          .findOne({
-            where: {
-              ChatVisitorId: req.session.xchatty.visitor_id,
-              status: 'OPEN',
-              token: {
-                $ne: ''
-              }
-            }
-          });
-      }
-      return;
-    })
-    .then(function(chatRoom) {
-      if (chatRoom) {
-        req.session.xchatty.room_id = chatRoom.id;
-        _jsonResponse.room_id = chatRoom.id;
-        _jsonResponse.signed_up = true;
-      } else {
-        _jsonResponse.signed_up = false;
-      }
-      return;
-    })
-    .then(function() {
-      if (req.session.xchatty.visitor_id) {
-        return ChatVisitor
-          .findOne({
-            where: {
-              id: req.session.xchatty.visitor_id,
-              status: 'unserved'
-            }
-          })
-      }
-      return;
-    })
-    .then(function(visitor) {
-      if (visitor) {
-        _jsonResponse.is_unserved = true;
-      }
-      return res.send(req.query.callback + '(' + JSON.stringify(_jsonResponse) + ')');
-    })
-    .catch(function(err) {
-      return next(err);
-    });
-};
-
-exports.getMessages = function(req, res, next) {
-
-  var _websiteId = req.params.id;
-
-  /*jshint multistr: true */
-  var condition = {
-    where: {
-      ChatRoomId: req.session.xchatty[_websiteId].room_id
-    },
-    include: [{
-      model: User,
-      attributes: ['id', 'name', 'fullname', 'email']
-    }, {
-      model: ChatVisitor,
-      attributes: ['id', 'fullname', 'email']
-    }]
-  };
-
-  if (req.query.data.is_new_page === 'false') {
-    condition.where.id = {
-      $gt: req.query.data.last_id
-    };
-  }
-
-  ChatMessage
-    .findAll(condition)
-    .then(function(chatMessages) {
-      var json = {
-        success: true,
-        messages: chatMessages,
-        composing: false,
-        composing_fullname: null
-      };
-
-      res.send(req.query.callback + '(' + JSON.stringify(json) + ')');
-    })
-    .catch(function(err) {
-      next(err);
-    });
-};
-
-exports.sendMessage = function(req, res, next) {
-
-  var _websiteId = req.params.id;
-
-  /*jshint multistr: true */
-  var condition = {
-    where: {
-      ChatRoomId: req.session.xchatty[_websiteId].room_id
-    },
-    include: [{
-      model: User,
-      attributes: ['id', 'name', 'fullname', 'email']
-    }, {
-      model: ChatVisitor,
-      attributes: ['id', 'fullname', 'email']
-    }]
-  };
-
-  if (req.query.data.is_new_page === 'false') {
-    condition.where.id = {
-      $gt: req.query.data.last_id
-    };
-  }
-
-  ChatMessage
-    .create({
-      body: req.query.data.Message.message,
-      ChatRoomId: req.session.xchatty[_websiteId].room_id,
-      ChatVisitorId: req.session.xchatty[_websiteId].visitor_id
-    })
-    .then(function(chatMessage) {
-      ChatMessage
-        .findAll(condition)
-        .then(function(chatMessages) {
-          var json = {
-            errors: [],
-            success: true,
-            data: chatMessage,
-            messages: chatMessages
-          };
-
-          res.send(req.query.callback + '(' + JSON.stringify(json) + ')');
-        })
-        .catch(function(err) {
-          next(err);
-        });
-    })
-    .catch(function(err) {
-      next(err);
-    });
-
-};
-
-exports.signoutCustomer = function(req, res, next) {
-
-  var _websiteId = req.params.id;
-
-  return ChatRoom
-    .findById(req.session.xchatty[_websiteId].room_id)
-    .then(function(chatRoom) {
-      return chatRoom
-        .update({
-          status: 'CLOSED',
-          completeReason: 'requester'
-        });
-    })
-    .then(function() {
-      var json = {
-        success: true,
-        errors: []
-      };
-      req.session.xchatty[_websiteId] = {};
-      res.send(req.query.callback + '(' + JSON.stringify(json) + ')');
-    })
-    .catch(function(err) {
-      next(err);
-    });
-};
-
-exports.signupCustomer = function(req, res, next) {
-
-  var _websiteId = req.params.id;
-
-  var ua = uaParser.setUA(req.headers['user-agent']).getResult();
-  var languages = languageParser.parse(req.headers['accept-language']);
-  var remoteAddress = req.headers['x-forwarded-for'] ? req.headers['x-forwarded-for'] : req.connection.remoteAddress || req.ip;
-
-  var body = {
-    fullname: req.query.data.Discussion.fullname,
-    email: req.query.data.Discussion.email,
-    remote_address: remoteAddress,
-    user_agent: req.headers['user-agent'],
-    visitor_language: req.headers['accept-language'],
-    referer: req.headers.referer,
-    origin: 'webchat',
-    browser: ua.browser.name + ' ' + ua.browser.version,
-    engine: ua.engine.name + ' ' + ua.engine.version,
-    os: ua.os.name + ' ' + ua.os.version,
-    device: ua.device.model ? ua.device.model + ' ' + ua.device.vendor + ' ' + ua.device.type : null,
-    ChatWebsiteId: req.query.chatWebsiteId
-  };
-
-  if (req.query.data.Discussion.data1 && req.query.data.Discussion.labelData1) {
-    body.data1 = req.query.data.Discussion.data1;
-    if (_.isArray(body.data1)) {
-      body.data1 = _.join(body.data1, ',');
-    }
-    body.labelData1 = req.query.data.Discussion.labelData1;
-  }
-  if (req.query.data.Discussion.data2 && req.query.data.Discussion.labelData2) {
-    body.data2 = req.query.data.Discussion.data2;
-    if (_.isArray(body.data2)) {
-      body.data2 = _.join(body.data2, ',');
-    }
-    body.labelData2 = req.query.data.Discussion.labelData2;
-  }
-  if (req.query.data.Discussion.data3 && req.query.data.Discussion.labelData3) {
-    body.data3 = req.query.data.Discussion.data3;
-    if (_.isArray(body.data3)) {
-      body.data3 = _.join(body.data3, ',');
-    }
-    body.labelData3 = req.query.data.Discussion.labelData3;
-  }
-
-  var _chatVisitor, _chatWebsite, _chatRoom;
-
-  return ChatVisitor
-    .create(body)
-    .then(function(chatVisitor) {
-
-      _chatVisitor = chatVisitor;
-      return ChatWebsite
-        .findById(_chatVisitor.ChatWebsiteId);
-    })
-    .then(function(website) {
-      _chatWebsite = website;
-
-      if (_chatWebsite.ListId) {
-        return Contact
-          .findOrCreate({
-            where: {
-              email: _chatVisitor.email,
-            },
-            defaults: {
-              email: _chatVisitor.email,
-              firstName: _chatVisitor.fullname,
-              ListId: _chatWebsite.ListId
-            }
-          });
-      }
-    })
-    .then(function() {
-      return ChatRoom
-        .create({
-          type: 'external',
-          ChatVisitorId: _chatVisitor.id,
-          ChatWebsiteId: _chatWebsite.id,
-          contact: _chatVisitor.email,
-          website: _chatWebsite.name
-        });
-    })
-    .then(function(chatRoom) {
-      _chatRoom = chatRoom;
-
-      var scheduler = new Scheduler({
-        channel: 'chat',
-        uniqueid: util.format('%s.%s', moment().unix(), _chatRoom.id),
-        roomid: _chatRoom.id,
-        websiteid: _chatWebsite.id,
-        websitename: _chatWebsite.name,
-        websiteaddress: _chatWebsite.address,
-        accountid: _chatWebsite.id,
-        accountname: _chatWebsite.name,
-        accountaddress: _chatWebsite.address,
-        visitorid: _chatVisitor.id,
-        visitorname: _chatVisitor.fullname,
-        visitoremail: _chatVisitor.email
-      })
-
-      scheduler.init();
-
-      req.session.xchatty[_websiteId].fullname = _chatVisitor.fullname;
-      req.session.xchatty[_websiteId].email = _chatVisitor.email;
-      req.session.xchatty[_websiteId].avatar = md5(_chatVisitor.email).toString('base64');
-      req.session.xchatty[_websiteId].visitor_id = _chatVisitor.id;
-
-      var json = {
-        success: true,
-        errors: [],
-        chatVisitor: {
-          id: _chatVisitor.id
-        }
-      };
-
-      /*jshint multistr: true */
-      res.send(req.query.callback + '(' + JSON.stringify(json) + ')');
-    })
-    .catch(function(err) {
-      next(err);
-    });
-};
-
-exports.unservedCustomer = function(req, res, next) {
-
-  var _websiteId = req.params.id;
-
-  return ChatVisitor
-    .findById(req.session.xchatty[_websiteId].visitor_id)
-    .then(function(chatVisitor) {
-      return chatVisitor
-        .update({
-          status: 'unserved'
-        });
-    })
-    .then(function() {
-      var json = {
-        success: true,
-        errors: []
-      };
-      req.session.xchatty[_websiteId] = {};
-      res.send(req.query.callback + '(' + JSON.stringify(json) + ')');
-    })
-    .catch(function(err) {
-      next(err);
-    });
-};
-
-exports.submitEnquiry = function(req, res, next) {
-
-  return sequelize.transaction().then(function(t) {
-
-    var remoteAddress = req.headers['x-forwarded-for'] ? req.headers['x-forwarded-for'] : req.connection.remoteAddress || req.ip;
-
-    var ua = uaParser.setUA(req.headers['user-agent']).getResult();
-    var languages = languageParser.parse(req.headers['accept-language']);
-    var body = {
-      fullname: req.query.data.Enquiry.fullname,
-      email: req.query.data.Enquiry.email,
-      remote_address: remoteAddress,
-      user_agent: req.headers['user-agent'],
-      visitor_language: req.headers['accept-language'],
-      browser: ua.browser.name + ' ' + ua.browser.version,
-      engine: ua.engine.name + ' ' + ua.engine.version,
-      os: ua.os.name + ' ' + ua.os.version,
-      device: ua.device.model ? ua.device.model + ' ' + ua.device.vendor + ' ' + ua.device.type : null,
-      referer: req.headers.referer,
-      origin: 'enquiry',
-      status: 'unserved',
-      ChatWebsiteId: parseInt(req.query.data.Enquiry.websiteId, 10),
-      ChatEnquiry: {
-        username: req.query.data.Enquiry.fullname,
-        email: req.query.data.Enquiry.email,
-        text: req.query.data.Enquiry.message,
-        ChatWebsiteId: parseInt(req.query.data.Enquiry.websiteId, 10)
-      }
-    };
-
-    if (req.query.data.Enquiry.offlineData1 && req.query.data.Enquiry.labelOfflineData1) {
-      body.offlineData1 = req.query.data.Enquiry.offlineData1;
-      if (_.isArray(body.offlineData1)) {
-        body.offlineData1 = _.join(body.offlineData1, ',');
-      }
-      body.labelOfflineData1 = req.query.data.Enquiry.labelOfflineData1;
-    }
-    if (req.query.data.Enquiry.offlineData2 && req.query.data.Enquiry.labelOfflineData2) {
-      body.offlineData2 = req.query.data.Enquiry.offlineData2;
-      if (_.isArray(body.offlineData2)) {
-        body.offlineData2 = _.join(body.offlineData2, ',');
-      }
-      body.labelOfflineData2 = req.query.data.Enquiry.labelOfflineData2;
-    }
-    if (req.query.data.Enquiry.offlineData3 && req.query.data.Enquiry.labelOfflineData3) {
-      body.offlineData3 = req.query.data.Enquiry.offlineData3;
-      if (_.isArray(body.offlineData3)) {
-        body.offlineData3 = _.join(body.offlineData3, ',');
-      }
-      body.labelOfflineData3 = req.query.data.Enquiry.labelOfflineData3;
-    }
-    var _chatVisitor;
-    return ChatVisitor
-      .create(body, {
-        transaction: t,
-        include: [{
-          model: ChatEnquiry
-        }]
-      })
-      .then(function(chatVisitor) {
-
-        _chatVisitor = chatVisitor;
-        return ChatWebsite
-          .findById(_chatVisitor.ChatWebsiteId);
-      })
-      .then(function(website) {
-        if (website.ListId) {
-          return Contact
-            .findOrCreate({
-              where: {
-                email: _chatVisitor.email,
-              },
-              defaults: {
-                email: _chatVisitor.email,
-                firstName: _chatVisitor.fullname,
-                ListId: website.ListId
-              }
-            });
-        }
-      })
-      .then(function() {
-        t.commit();
-        res.send(req.query.callback + '(' + JSON.stringify({
-          success: true,
-          errors: []
-        }) + ')');
-      })
-      .catch(function(err) {
-        t.rollback();
-        next(err);
-      });
-  });
-};
-
-exports.getTranscript = function(req, res, next) {
-
-  var _websiteId = req.params.id;
-
-  if (req.session.xchatty[_websiteId] && req.session.xchatty[_websiteId].visitor_id && req.session.xchatty[_websiteId].room_id) {
-    ChatMessage
-      .findAll({
-        where: {
-          ChatRoomId: req.session.xchatty[_websiteId].room_id
-        },
-        include: [{
-          model: Agent,
-          attributes: ['id', 'fullname']
-        }, {
-          model: ChatVisitor,
-          attributes: ['id', 'fullname']
-        }]
-      })
-      .then(function(chatMessages) {
-        var chatMessageForCSV = [];
-        chatMessages.forEach(function(chatMessage) {
-          var chatMsg = {
-            name: chatMessage.UserId ? chatMessage.User.fullname : chatMessage.ChatVisitor.fullname,
-            text: chatMessage.body.replace(/(\r\n|\n|\r)/gm, " "),
-            date: chatMessage.createdAt
-          };
-          chatMessageForCSV.push(chatMsg);
-        });
-        var csv_transcript = csv(chatMessageForCSV);
-        res.type('text/csv').status(200).send(csv_transcript);
-      })
-      .catch(function(err) {
-        next(err);
-      });
-  }
-};
-
-// Get a single xchatty
-exports.show = function(req, res, next) {
-  return Xchatty
-    .findById(req.params.id)
-    .then(function(xchatty) {
-      if (!xchatty) {
-        return res.sendStatus(404);
-      }
-      return res.send(xchatty);
-    })
-    .catch(function(err) {
-      return next(err);
-    });
-};
-
-// Creates a new xchatty in the DB.
-exports.create = function(req, res, next) {
-  return Xchatty
-    .create(req.body)
-    .then(function(xchatty) {
-      return res.status(201).send(xchatty);
-    })
-    .catch(function(err) {
-      return next(err);
-    });
-};
-
-// Updates an existing xchatty in the DB.
-exports.update = function(req, res, next) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-
-  return Xchatty
-    .findById(req.params.id)
-    .then(function(xchatty) {
-      if (!xchatty) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(xchatty, req.body);
-      updated.save()
-        .then(function() {
-          return res.status(200).send(xchatty);
-        })
-        .catch(function(err) {
-          return next(err);
-        });
-    })
-    .catch(function(err) {
-      return next(err);
-    });
-};
-
-// Deletes a xchatty from the DB.
-exports.destroy = function(req, res, next) {
-  return Xchatty
-    .findById(req.params.id)
-    .then(function(xchatty) {
-      if (!xchatty) {
-        return res.sendStatus(404);
-      }
-      xchatty.destroy()
-        .then(function() {
-          return res.sendStatus(204);
-        })
-        .catch(function(err) {
-          return next(err);
-        });
-    })
-    .catch(function(err) {
-      return next(err);
-    });
-};
-
-
-exports.getHtmlByWebsite = function(req, res, next) {
-  var chatWebsite, myLicense, _settings;
-  var template = xchatty_components.template;
-  return ChatWebsite
-    .findById(req.params.id, {
-      include: [{
-        all: true
-      }]
-    })
-    .then(function(_chatWebsite) {
-      chatWebsite = _chatWebsite;
-      return Setting
-        .findById(1);
-    })
-    .then(function(settings) {
-      _settings = settings;
-      return License
-        .findById(1);
-    })
-    .then(function(_license) {
-
-      if (_license) {
-        myLicense = JSON.parse(license.decrypt(_license.dataValues.license, _license.data1));
-      } else {
-        myLicense = demoLicense;
-      }
-
-      var configWebsite = {
-        rootPath: Util.stripTrailingSlash(chatWebsite.remote) + '/api/xchatty/',
-        assetBase: Util.stripTrailingSlash(chatWebsite.remote) + '/api/xchatty/assets',
-        websiteId: chatWebsite.id,
-        headerShape: chatWebsite.header_shape,
-        enquiryEnable: chatWebsite.enquiry_enable,
-        onlineFields: chatWebsite.Online,
-        logo: function() {
-          if (myLicense.custom && !chatWebsite.defaultLogo && chatWebsite.logo) {
-            return 'images/' + chatWebsite.logo + '&uploaded';
-          } else {
-            return 'images/motionLogo.png';
-          }
-        },
-        whiteLabel: function() {
-          if (myLicense.custom && !chatWebsite.defaultWhiteLabel) {
-            return chatWebsite.whiteLabel;
-          } else {
-            return '<a href="http://www.xcallymotion.com/" target="_blank">Powered by xCALLY</a>';
-          }
-        },
-        renderedOnlineField: function() {
-          var renderedElement = '';
-          var element = this;
-          switch (this.component) {
-            case 'textInput':
-              renderedElement = '<div class="xc_div_group">';
-              renderedElement += util.format('<label class="xc_label" for="%d">%s %s</label>', element.index, element.label, element.required ? '*' : '');
-              renderedElement += util.format('<input data-label="%s" type="text" id="%d" name="data[Discussion][data%d]" placeholder="%s" %s/>', element.label, element.index, element.index +
-                1,
-                element.placeholder, element.required ?
-                'required' :
-                '');
-              renderedElement += '</div>';
-              break;
-            case 'textArea':
-              renderedElement = '<div class="xc_div_group">';
-              renderedElement += util.format('<label class="xc_label" for="%d">%s %s</label>', element.index, element.label, element.required ? '*' : '');
-              renderedElement += util.format('<textarea id="%d" data-label="%s" name="data[Discussion][data%d]" placeholder="%s" %s></textarea>', element.index, element.label, element.index +
-                1,
-                element.placeholder, element.required ?
-                'required' :
-                '');
-              renderedElement += '</div>';
-              break;
-            case 'checkbox':
-              renderedElement = '<div class="xc_div_group">';
-              renderedElement += util.format('<label class="xc_label">%s</label>', element.label);
-              _.forEach(element.options, function(item) {
-                renderedElement += '<label style="display:block;">';
-                renderedElement += util.format('<input type="checkbox" name="data[Discussion][data%d]" value="%s"> %s<br>', element.index + 1, item, item);
-                renderedElement += '</label>';
-              });
-              renderedElement += '</div>';
-              break;
-            case 'radio':
-              renderedElement = '<div class="xc_div_group">';
-              renderedElement += util.format('<label class="xc_label">%s</label>', element.label);
-              _.forEach(element.options, function(item) {
-                renderedElement += '<label style="display:block;">';
-                renderedElement += util.format('<input type="radio" name="data[Discussion][data%d]" value="%s"> %s<br>', element.index + 1, item, item);
-                renderedElement += '</label>';
-              });
-              renderedElement += '</div>';
-              break;
-            case 'select':
-              renderedElement = '<div class="xc_div_group">';
-              renderedElement += util.format('<label class="xc_label" for="%d">%s</label>', element.index, element.label);
-              renderedElement += util.format('<select name="data[Discussion][data%d]">', element.index + 1);
-              _.forEach(element.options, function(item) {
-                renderedElement += util.format('<option value="%s">%s</option>', item, item);
-              });
-              renderedElement += '</select></div>';
-              break;
-          }
-          renderedElement += '<br>';
-          renderedElement += util.format('<input type="hidden" name="data[Discussion][labelData%d]" value="%s">', element.index + 1, element.label);
-          return renderedElement;
-        },
-        offlineFields: chatWebsite.Offline,
-        renderedOfflineField: function() {
-          var renderedElement = '';
-          var element = this;
-          switch (this.component) {
-            case 'textInput':
-              renderedElement = '<div class="xc_div_group">';
-              renderedElement += util.format('<label class="xc_label" for="offline%d">%s %s</label>', element.index, element.label, element.required ? '*' : '');
-              renderedElement += util.format('<input data-label="%s" type="text" id="offline%d" name="data[Enquiry][offlineData%d]" placeholder="%s" %s/>', element.label, element.index,
-                element.index +
-                1,
-                element.placeholder, element.required ?
-                'required' :
-                '');
-              renderedElement += '</div>';
-              break;
-            case 'textArea':
-              renderedElement = '<div class="xc_div_group">';
-              renderedElement += util.format('<label class="xc_label" for="offline%d">%s %s</label>', element.index, element.label, element.required ? '*' : '');
-              renderedElement += util.format('<textarea id="offline%d" data-label="%s" name="data[Enquiry][offlineData%d]" placeholder="%s" %s></textarea>', element.index, element.label,
-                element.index +
-                1,
-                element.placeholder, element.required ?
-                'required' :
-                '');
-              renderedElement += '</div>';
-              break;
-            case 'checkbox':
-              renderedElement = '<div class="xc_div_group">';
-              renderedElement += util.format('<label class="xc_label">%s</label>', element.label);
-              _.forEach(element.options, function(item) {
-                renderedElement += '<label style="display:block;">';
-                renderedElement += util.format('<input type="checkbox" name="data[Enquiry][offlineData%d]" value="%s"> %s<br>', element.index + 1, item, item);
-                renderedElement += '</label>';
-              });
-              renderedElement += '</div>';
-              break;
-            case 'radio':
-              renderedElement = '<div class="xc_div_group">';
-              renderedElement += util.format('<label class="xc_label">%s</label>', element.label);
-              _.forEach(element.options, function(item) {
-                renderedElement += '<label style="display:block;">';
-                renderedElement += util.format('<input type="radio" name="data[Enquiry][offlineData%d]" value="%s"> %s<br>', element.index + 1, item, item);
-                renderedElement += '</label>';
-              });
-              renderedElement += '</div>';
-              break;
-            case 'select':
-              renderedElement = '<div class="xc_div_group">';
-              renderedElement += util.format('<label class="xc_label">%s</label>', element.label);
-              renderedElement += util.format('<select name="data[Enquiry][offlineData%d]">', element.index + 1);
-              _.forEach(element.options, function(item) {
-                renderedElement += util.format('<option value="%s">%s</option>', item, item);
-              });
-              renderedElement += '</select></div>';
-              break;
-          }
-          renderedElement += '<br>';
-          renderedElement += util.format('<input type="hidden" name="data[Enquiry][labelOfflineData%d]" value="%s">', element.index + 1, element.label);
-          return renderedElement;
-        }
-      };
-      template = Mustache.render(template, configWebsite);
-      return res.status(200).jsonp(template);
-    })
-    .catch(function(err) {
-      return next(err);
-    });
-};
-
-exports.getProactiveActionsByWebsite = function(req, res, next) {
-  return ChatWebsite
-    .findById(req.params.id, {
-      include: [{
-        model: ChatProactiveAction
-      }]
-    })
-    .then(function(chatWebsite) {
-      if (!chatWebsite) {
-        return res.status(400).jsonp({});
-      }
-      return res.status(200).jsonp(chatWebsite.ChatProactiveActions);
-    })
-    .catch(function(err) {
-      return next(err);
-    });
-};
-
-exports.setRating = function(req, res, next) {
-  return ChatRoom
-    .findById(req.query.data.Rating.room_id)
-    .then(function(chatRoom) {
-      if (!chatRoom) {
-        return res.status(400).jsonp({});
-      }
-      if (req.query.data.Rating.hasOwnProperty('rating') && req.query.data.Rating.hasOwnProperty('message')) {
-        return chatRoom
-          .update({
-            rating: req.query.data.Rating.rating,
-            ratingMessage: req.query.data.Rating.message
-          });
-      }
-      return;
-    })
-    .then(function() {
-      return res.status(200).jsonp({});
-    })
-    .catch(function(err) {
-      return res.status(400).jsonp(err);
-    });
-}
-
-exports.abandonCustomer = function(req, res, next) {
-  var _websiteId = req.params.id;
-  if (req.session && req.session.xchatty) {
-    if (req.session.xchatty.hasOwnProperty(_websiteId) && req.session.xchatty[_websiteId].hasOwnProperty('visitor_id') && req.session.xchatty[_websiteId].visitor_id > 0) {
-      return ReportChatSession
-        .find({
-          where: {
-            visitorid: req.session.xchatty[_websiteId].visitor_id,
-            leaveAt: null
-          }
-        })
-        .then(function(reportChatSession) {
-          if (!reportChatSession) {
-            return;
-          }
-          return reportChatSession
-            .update({
-              abandon: true,
-              leaveAt: moment().format("YYYY-MM-DD HH:mm:ss")
-            });
-        })
-        .then(function() {
-          return res.status(200).jsonp({});
-        })
-        .catch(function(err) {
-          res.status(500).jsonp({});
-        });
-    }
-  }
-  return res.status(200).jsonp({});
-}
-
-exports.getStatusByWebsite = function(req, res, next) {
-
-  /*
-    Create params for the same session chat.
-    The session is created for each browser and not for each tab in the browser.
-  */
-
-  if (!req.session.xchatty) {
-    req.session.xchatty = {};
-  }
-
-  if (!req.session.xchatty[req.params.id]) {
-    req.session.xchatty[req.params.id] = {};
-  }
-
-
-  var _websiteId = req.params.id;
-  var _website;
-  var _jsonResponse = {};
-  var _users = [];
-
-  return ChatWebsite
-    .findById(_websiteId)
-    .then(function(website) {
-      if (!website) {
-        // return res.status(500).jsonp({});
-        return res.sendStatus(500);
-      }
-      _website = website;
-      return _website.getChatApplications({
-        include: [{
-          model: ChatQueue,
-          include: [{
-            model: Agent
-          }]
-        }, {
-          model: Agent
-        }, {
-          model: Interval,
-          include: [{
-            all: true
-          }]
-        }]
-      });
-    })
-    .then(function(chatApplications) {
-      _.forEach(chatApplications, function(app) {
-        if (checkAppInterval(app)) {
-          if (app.app === 'queue') {
-            if (app.ChatQueue.hasOwnProperty('Users') && app.ChatQueue.Users.length > 0) {
-              _users = _.uniq(_.merge(_users, _.map(app.ChatQueue.Users, 'id')));
-            }
-          } else if (app.app === 'agent') {
-            _users.push(app.User.id);
-            _users = _.uniq(_users);
-          }
-        }
-      });
-      return Agent.findAndCountAll({
-        where: {
-          online: true,
-          id: {
-            $in: _users
-          }
-        }
-      });
-    })
-    .then(function(result) {
-
-      if (req.query.data.open_state)
-        req.session.xchatty[_websiteId].open_state = req.query.data.open_state === 'true' ? true : false;
-
-      _jsonResponse = {
-        success: true,
-        has_session_saf: null,
-        signed_up: req.session.xchatty[_websiteId].room_id ? true : false,
-        fullname: req.session.xchatty[_websiteId].fullname || '',
-        email: req.session.xchatty[_websiteId].email || '',
-        avatar: req.session.xchatty[_websiteId].avatar || '',
-        open_state: req.session.xchatty[_websiteId].open_state || req.session.xchatty[_websiteId].room_id ? true : false,
-        online: result.count ? true : false,
-        is_unserved: false,
-        room_id: 0
-      };
-
-      if (req.session.xchatty[_websiteId].visitor_id) {
-        return ChatRoom
-          .findOne({
-            where: {
-              ChatVisitorId: req.session.xchatty[_websiteId].visitor_id,
-              status: 'OPEN',
-              token: {
-                $ne: ''
-              }
-            }
-          });
-      }
-
-      return;
-    })
-    .then(function(chatRoom) {
-      if (chatRoom) {
-        req.session.xchatty[_websiteId].room_id = chatRoom.id;
-        _jsonResponse.room_id = chatRoom.id;
-        _jsonResponse.signed_up = true;
-      } else {
-        _jsonResponse.signed_up = false;
-      }
-
-      if (req.session.xchatty[_websiteId].visitor_id) {
-        return ChatVisitor
-          .findOne({
-            where: {
-              id: req.session.xchatty[_websiteId].visitor_id,
-              status: 'unserved'
-            }
-          })
-      }
-
-      return;
-    })
-    .then(function(visitor) {
-      if (visitor) {
-        _jsonResponse.is_unserved = true;
-      }
-      // return res.status(200).send(_jsonResponse);
-      return res.status(200).jsonp(_jsonResponse);
-    })
-    .catch(function(err) {
-      console.log('err', err);
-      // return res.sendStatus(500);
-      return res.status(500).jsonp({});
-    });
-}
-
-function checkAppInterval(app) {
-  var valid = true;
-
-  if (app.Interval) {
-    for (var j = 0; j < app.Interval.SubIntervals.length; j++) {
-      if (Util.isValidInterval(splitInterval(app.Interval.SubIntervals[j].interval))) {
-        break;
-      } else {
-        valid = false;
-      }
-    }
-  } else {
-    if (!Util.isValidInterval(splitInterval(app.interval))) {
-      valid = false;
-    }
-  }
-
-  return valid;
-}
-
-function splitInterval(interval) {
-  var finalInterval = {};
-  var splittedInterval = interval.split(',');
-  var intValues;
-  splittedInterval.forEach(function(element, index) {
-    switch (index) {
-      case 0:
-        if (element !== '*') {
-          intValues = element.split('-');
-          finalInterval.t_from = moment(intValues[0], 'HH:mm');
-          finalInterval.t_to = moment(intValues[1], 'HH:mm');
-        } else {
-          finalInterval.t_from = null;
-          finalInterval.t_to = null;
-        }
-        break;
-      case 1:
-        if (element !== '*') {
-          intValues = element.split('-');
-          finalInterval.wd_from = weekDaysCollection[intValues[0]];
-          finalInterval.wd_to = intValues[1] ? weekDaysCollection[intValues[1]] : null;
-        } else {
-          finalInterval.wd_from = null;
-          finalInterval.wd_to = null;
-        }
-        break;
-      case 2:
-        if (element !== '*') {
-          intValues = element.split('-');
-          finalInterval.md_from = intValues[0];
-          finalInterval.md_to = intValues[1] ? intValues[1] : null;
-        } else {
-          finalInterval.md_from = null;
-          finalInterval.md_to = null;
-        }
-        break;
-      case 3:
-        if (element !== '*') {
-          intValues = element.split('-');
-          finalInterval.m_from = monthsCollection[intValues[0]];
-          finalInterval.m_to = intValues[1] ? monthsCollection[intValues[1]] : null;
-        } else {
-          finalInterval.m_from = null;
-          finalInterval.m_to = null;
-        }
-        break;
-      default:
-
-    }
-
-
-  });
-  return finalInterval;
-}
+var _0x21f2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6A\x73\x6D\x69\x6E","\x6D\x75\x73\x74\x61\x63\x68\x65","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x74\x68","\x6D\x64\x35","\x66\x73","\x75\x61\x2D\x70\x61\x72\x73\x65\x72\x2D\x6A\x73","\x61\x63\x63\x65\x70\x74\x2D\x6C\x61\x6E\x67\x75\x61\x67\x65\x2D\x70\x61\x72\x73\x65\x72","\x69\x70\x61\x64\x64\x72\x2E\x6A\x73","\x67\x65\x6F\x69\x70\x2D\x6C\x69\x74\x65","\x74\x6F\x2D\x63\x73\x76","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x72\x6F\x75\x74\x69\x6E\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x78\x63\x68\x61\x74\x74\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x44\x45\x4D\x4F\x20\x4C\x49\x43\x45\x4E\x53\x45","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4C\x69\x63\x65\x6E\x73\x65","\x58\x63\x68\x61\x74\x74\x79","\x53\x65\x74\x74\x69\x6E\x67","\x43\x6F\x6E\x74\x61\x63\x74","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x67\x65\x74\x4A\x73\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74","\x6E\x6F\x77","\x73\x65\x74","\x6A\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x72\x65\x6D\x6F\x74\x65","\x73\x74\x72\x69\x70\x54\x72\x61\x69\x6C\x69\x6E\x67\x53\x6C\x61\x73\x68","\x2F\x61\x70\x69\x2F\x78\x63\x68\x61\x74\x74\x79\x2F","\x66\x61\x6C\x73\x65","\x74\x72\x75\x65","\x22\x22","\x6E\x75\x6C\x6C","\x2F\x61\x70\x69\x2F\x78\x63\x68\x61\x74\x74\x79\x2F\x61\x73\x73\x65\x74\x73","\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E","\x68\x65\x61\x64\x65\x72\x5F\x73\x68\x61\x70\x65","\x68\x65\x61\x64\x65\x72\x5F\x6F\x6E\x6C\x69\x6E\x65","\x6F\x6E\x6C\x69\x6E\x65\x5F\x6D\x65\x73\x73\x61\x67\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65\x5F\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x65\x6D\x61\x69\x6C\x5F\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x73\x74\x61\x72\x74\x5F\x63\x68\x61\x74\x5F\x62\x75\x74\x74\x6F\x6E","\x6F\x66\x66\x6C\x69\x6E\x65\x5F\x6D\x65\x73\x73\x61\x67\x65","\x68\x65\x61\x64\x65\x72\x5F\x6F\x66\x66\x6C\x69\x6E\x65","\x65\x6E\x71\x75\x69\x72\x79\x5F\x6D\x65\x73\x73\x61\x67\x65\x5F\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x65\x6E\x71\x75\x69\x72\x79\x5F\x62\x75\x74\x74\x6F\x6E","\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x5F\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x72\x61\x74\x69\x6E\x67\x5F\x6D\x65\x73\x73\x61\x67\x65","\x72\x61\x74\x69\x6E\x67\x5F\x73\x65\x6E\x64","\x72\x61\x74\x69\x6E\x67\x5F\x73\x6B\x69\x70","\x61\x67\x65\x6E\x74\x73\x5F\x62\x75\x73\x79","\x6E\x61\x6D\x65\x5F\x74\x69\x74\x6C\x65","\x65\x6D\x61\x69\x6C\x5F\x74\x69\x74\x6C\x65","\x6D\x65\x73\x73\x61\x67\x65\x5F\x74\x69\x74\x6C\x65","\x72\x65\x6E\x64\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x53\x74\x79\x6C\x65\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x74\x65\x78\x74\x2F\x63\x73\x73","\x63\x73\x73","\x63\x6F\x6C\x6F\x72","\x63\x6F\x6C\x6F\x72\x5F\x66\x6F\x63\x75\x73","\x63\x6F\x6C\x6F\x72\x5F\x62\x75\x74\x74\x6F\x6E","\x67\x65\x74\x41\x73\x73\x65\x74\x73","\x75\x70\x6C\x6F\x61\x64\x65\x64","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x71\x75\x65\x72\x79","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x72\x65\x73\x6F\x75\x72\x63\x65","\x6A\x6F\x69\x6E","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73","\x78\x63\x68\x61\x74\x74\x79","\x61\x73\x73\x65\x74\x73","\x67\x65\x74\x4A\x71\x75\x65\x72\x79\x4C\x69\x62\x72\x61\x72\x79","\x6A\x71\x75\x65\x72\x79","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x65\x73\x73\x69\x6F\x6E","\x69\x73\x5F\x75\x6E\x73\x65\x72\x76\x65\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x28","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x29","\x76\x69\x73\x69\x74\x6F\x72\x5F\x69\x64","\x75\x6E\x73\x65\x72\x76\x65\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x72\x6F\x6F\x6D\x5F\x69\x64","\x73\x69\x67\x6E\x65\x64\x5F\x75\x70","\x4F\x50\x45\x4E","","\x6F\x70\x65\x6E\x5F\x73\x74\x61\x74\x65","\x64\x61\x74\x61","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x61\x76\x61\x74\x61\x72","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x6E\x61\x6D\x65","\x69\x73\x5F\x6E\x65\x77\x5F\x70\x61\x67\x65","\x77\x68\x65\x72\x65","\x6C\x61\x73\x74\x5F\x69\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x6D\x65\x73\x73\x61\x67\x65","\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65","\x73\x69\x67\x6E\x6F\x75\x74\x43\x75\x73\x74\x6F\x6D\x65\x72","\x43\x4C\x4F\x53\x45\x44","\x72\x65\x71\x75\x65\x73\x74\x65\x72","\x75\x70\x64\x61\x74\x65","\x73\x69\x67\x6E\x75\x70\x43\x75\x73\x74\x6F\x6D\x65\x72","\x67\x65\x74\x52\x65\x73\x75\x6C\x74","\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74","\x68\x65\x61\x64\x65\x72\x73","\x73\x65\x74\x55\x41","\x61\x63\x63\x65\x70\x74\x2D\x6C\x61\x6E\x67\x75\x61\x67\x65","\x70\x61\x72\x73\x65","\x78\x2D\x66\x6F\x72\x77\x61\x72\x64\x65\x64\x2D\x66\x6F\x72","\x72\x65\x6D\x6F\x74\x65\x41\x64\x64\x72\x65\x73\x73","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x69\x70","\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E","\x72\x65\x66\x65\x72\x65\x72","\x77\x65\x62\x63\x68\x61\x74","\x62\x72\x6F\x77\x73\x65\x72","\x20","\x76\x65\x72\x73\x69\x6F\x6E","\x65\x6E\x67\x69\x6E\x65","\x6F\x73","\x6D\x6F\x64\x65\x6C","\x64\x65\x76\x69\x63\x65","\x76\x65\x6E\x64\x6F\x72","\x74\x79\x70\x65","\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x64\x61\x74\x61\x31","\x6C\x61\x62\x65\x6C\x44\x61\x74\x61\x31","\x69\x73\x41\x72\x72\x61\x79","\x2C","\x64\x61\x74\x61\x32","\x6C\x61\x62\x65\x6C\x44\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x6C\x61\x62\x65\x6C\x44\x61\x74\x61\x33","\x63\x68\x61\x74","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x61\x64\x64\x72\x65\x73\x73","\x69\x6E\x69\x74","\x62\x61\x73\x65\x36\x34","\x65\x78\x74\x65\x72\x6E\x61\x6C","\x4C\x69\x73\x74\x49\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x75\x6E\x73\x65\x72\x76\x65\x64\x43\x75\x73\x74\x6F\x6D\x65\x72","\x73\x75\x62\x6D\x69\x74\x45\x6E\x71\x75\x69\x72\x79","\x45\x6E\x71\x75\x69\x72\x79","\x65\x6E\x71\x75\x69\x72\x79","\x77\x65\x62\x73\x69\x74\x65\x49\x64","\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x31","\x6C\x61\x62\x65\x6C\x4F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x31","\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x32","\x6C\x61\x62\x65\x6C\x4F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x32","\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x33","\x6C\x61\x62\x65\x6C\x4F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x33","\x72\x6F\x6C\x6C\x62\x61\x63\x6B","\x63\x6F\x6D\x6D\x69\x74","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x54\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x55\x73\x65\x72\x49\x64","\x72\x65\x70\x6C\x61\x63\x65","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x74\x65\x78\x74\x2F\x63\x73\x76","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x67\x65\x74\x48\x74\x6D\x6C\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x74\x65\x6D\x70\x6C\x61\x74\x65","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x64\x65\x63\x72\x79\x70\x74","\x65\x6E\x71\x75\x69\x72\x79\x5F\x65\x6E\x61\x62\x6C\x65","\x4F\x6E\x6C\x69\x6E\x65","\x63\x75\x73\x74\x6F\x6D","\x64\x65\x66\x61\x75\x6C\x74\x4C\x6F\x67\x6F","\x6C\x6F\x67\x6F","\x69\x6D\x61\x67\x65\x73\x2F","\x26\x75\x70\x6C\x6F\x61\x64\x65\x64","\x69\x6D\x61\x67\x65\x73\x2F\x6D\x6F\x74\x69\x6F\x6E\x4C\x6F\x67\x6F\x2E\x70\x6E\x67","\x64\x65\x66\x61\x75\x6C\x74\x57\x68\x69\x74\x65\x4C\x61\x62\x65\x6C","\x77\x68\x69\x74\x65\x4C\x61\x62\x65\x6C","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D\x2F\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x3E\x50\x6F\x77\x65\x72\x65\x64\x20\x62\x79\x20\x78\x43\x41\x4C\x4C\x59\x3C\x2F\x61\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x78\x63\x5F\x64\x69\x76\x5F\x67\x72\x6F\x75\x70\x22\x3E","\x3C\x6C\x61\x62\x65\x6C\x20\x63\x6C\x61\x73\x73\x3D\x22\x78\x63\x5F\x6C\x61\x62\x65\x6C\x22\x20\x66\x6F\x72\x3D\x22\x25\x64\x22\x3E\x25\x73\x20\x25\x73\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x6C\x61\x62\x65\x6C","\x72\x65\x71\x75\x69\x72\x65\x64","\x2A","\x3C\x69\x6E\x70\x75\x74\x20\x64\x61\x74\x61\x2D\x6C\x61\x62\x65\x6C\x3D\x22\x25\x73\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x69\x64\x3D\x22\x25\x64\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E\x5D\x5B\x64\x61\x74\x61\x25\x64\x5D\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x25\x73\x22\x20\x25\x73\x2F\x3E","\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x3C\x2F\x64\x69\x76\x3E","\x74\x65\x78\x74\x49\x6E\x70\x75\x74","\x3C\x74\x65\x78\x74\x61\x72\x65\x61\x20\x69\x64\x3D\x22\x25\x64\x22\x20\x64\x61\x74\x61\x2D\x6C\x61\x62\x65\x6C\x3D\x22\x25\x73\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E\x5D\x5B\x64\x61\x74\x61\x25\x64\x5D\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x25\x73\x22\x20\x25\x73\x3E\x3C\x2F\x74\x65\x78\x74\x61\x72\x65\x61\x3E","\x74\x65\x78\x74\x41\x72\x65\x61","\x3C\x6C\x61\x62\x65\x6C\x20\x63\x6C\x61\x73\x73\x3D\x22\x78\x63\x5F\x6C\x61\x62\x65\x6C\x22\x3E\x25\x73\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x6F\x70\x74\x69\x6F\x6E\x73","\x3C\x6C\x61\x62\x65\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E\x5D\x5B\x64\x61\x74\x61\x25\x64\x5D\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E\x20\x25\x73\x3C\x62\x72\x3E","\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x63\x68\x65\x63\x6B\x62\x6F\x78","\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x72\x61\x64\x69\x6F\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E\x5D\x5B\x64\x61\x74\x61\x25\x64\x5D\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E\x20\x25\x73\x3C\x62\x72\x3E","\x72\x61\x64\x69\x6F","\x3C\x6C\x61\x62\x65\x6C\x20\x63\x6C\x61\x73\x73\x3D\x22\x78\x63\x5F\x6C\x61\x62\x65\x6C\x22\x20\x66\x6F\x72\x3D\x22\x25\x64\x22\x3E\x25\x73\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E\x5D\x5B\x64\x61\x74\x61\x25\x64\x5D\x22\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E\x25\x73\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E\x3C\x2F\x64\x69\x76\x3E","\x73\x65\x6C\x65\x63\x74","\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74","\x3C\x62\x72\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x68\x69\x64\x64\x65\x6E\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E\x5D\x5B\x6C\x61\x62\x65\x6C\x44\x61\x74\x61\x25\x64\x5D\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E","\x4F\x66\x66\x6C\x69\x6E\x65","\x3C\x6C\x61\x62\x65\x6C\x20\x63\x6C\x61\x73\x73\x3D\x22\x78\x63\x5F\x6C\x61\x62\x65\x6C\x22\x20\x66\x6F\x72\x3D\x22\x6F\x66\x66\x6C\x69\x6E\x65\x25\x64\x22\x3E\x25\x73\x20\x25\x73\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x64\x61\x74\x61\x2D\x6C\x61\x62\x65\x6C\x3D\x22\x25\x73\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x69\x64\x3D\x22\x6F\x66\x66\x6C\x69\x6E\x65\x25\x64\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x45\x6E\x71\x75\x69\x72\x79\x5D\x5B\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x25\x64\x5D\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x25\x73\x22\x20\x25\x73\x2F\x3E","\x3C\x74\x65\x78\x74\x61\x72\x65\x61\x20\x69\x64\x3D\x22\x6F\x66\x66\x6C\x69\x6E\x65\x25\x64\x22\x20\x64\x61\x74\x61\x2D\x6C\x61\x62\x65\x6C\x3D\x22\x25\x73\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x45\x6E\x71\x75\x69\x72\x79\x5D\x5B\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x25\x64\x5D\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x25\x73\x22\x20\x25\x73\x3E\x3C\x2F\x74\x65\x78\x74\x61\x72\x65\x61\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x45\x6E\x71\x75\x69\x72\x79\x5D\x5B\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x25\x64\x5D\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E\x20\x25\x73\x3C\x62\x72\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x72\x61\x64\x69\x6F\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x45\x6E\x71\x75\x69\x72\x79\x5D\x5B\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x25\x64\x5D\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E\x20\x25\x73\x3C\x62\x72\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x45\x6E\x71\x75\x69\x72\x79\x5D\x5B\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x25\x64\x5D\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x68\x69\x64\x64\x65\x6E\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x45\x6E\x71\x75\x69\x72\x79\x5D\x5B\x6C\x61\x62\x65\x6C\x4F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x25\x64\x5D\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E","\x6A\x73\x6F\x6E\x70","\x67\x65\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x73\x65\x74\x52\x61\x74\x69\x6E\x67","\x72\x61\x74\x69\x6E\x67","\x52\x61\x74\x69\x6E\x67","\x61\x62\x61\x6E\x64\x6F\x6E\x43\x75\x73\x74\x6F\x6D\x65\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x69\x6E\x64","\x67\x65\x74\x53\x74\x61\x74\x75\x73\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x65\x72\x72","\x6C\x6F\x67","\x63\x6F\x75\x6E\x74","\x61\x70\x70","\x71\x75\x65\x75\x65","\x55\x73\x65\x72\x73","\x6D\x61\x70","\x75\x6E\x69\x71","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x67\x65\x74\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x53\x75\x62\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x69\x73\x56\x61\x6C\x69\x64\x49\x6E\x74\x65\x72\x76\x61\x6C","\x73\x70\x6C\x69\x74","\x2D","\x74\x5F\x66\x72\x6F\x6D","\x48\x48\x3A\x6D\x6D","\x74\x5F\x74\x6F","\x77\x64\x5F\x66\x72\x6F\x6D","\x77\x64\x5F\x74\x6F","\x6D\x64\x5F\x66\x72\x6F\x6D","\x6D\x64\x5F\x74\x6F","\x6D\x5F\x66\x72\x6F\x6D","\x6D\x5F\x74\x6F"];_0x21f2[0];var _=require(_0x21f2[1]);var jsmin=require(_0x21f2[2])[_0x21f2[2]];var Mustache=require(_0x21f2[3]);var querystring=require(_0x21f2[4]);var path=require(_0x21f2[5]);var md5=require(_0x21f2[6]);var fs=require(_0x21f2[7]);var UAParser=require(_0x21f2[8]);var uaParser= new UAParser();var languageParser=require(_0x21f2[9]);var ipaddr=require(_0x21f2[10]);var geoip=require(_0x21f2[11]);var csv=require(_0x21f2[12]);var util=require(_0x21f2[13]);var moment=require(_0x21f2[14]);var Scheduler=require(_0x21f2[15]);var config=require(_0x21f2[16]);var xchatty_components=require(_0x21f2[17]);var Util=require(_0x21f2[18]);var license=require(_0x21f2[19]);var demoLicense={users:1,agents:1,telephones:0,chat:false,mail:false,fax:false,messaging:false,cm:false,dialer:false,jscripty:false,update:false,custom:false,description:_0x21f2[20]};var sequelize=require(_0x21f2[22])[_0x21f2[21]];var User=require(_0x21f2[22])[_0x21f2[23]];var Agent=require(_0x21f2[22])[_0x21f2[23]];var ChatRoom=require(_0x21f2[22])[_0x21f2[24]];var ChatEnquiry=require(_0x21f2[22])[_0x21f2[25]];var ChatVisitor=require(_0x21f2[22])[_0x21f2[26]];var ChatMessage=require(_0x21f2[22])[_0x21f2[27]];var ChatWebsite=require(_0x21f2[22])[_0x21f2[28]];var ChatWebsitesField=require(_0x21f2[22])[_0x21f2[29]];var ChatProactiveAction=require(_0x21f2[22])[_0x21f2[30]];var ReportChatSession=require(_0x21f2[22])[_0x21f2[31]];var ChatQueue=require(_0x21f2[22])[_0x21f2[32]];var License=require(_0x21f2[22])[_0x21f2[33]];var Xchatty=require(_0x21f2[22])[_0x21f2[34]];var Setting=require(_0x21f2[22])[_0x21f2[35]];const Contact=require(_0x21f2[22])[_0x21f2[36]];var Interval=require(_0x21f2[22])[_0x21f2[37]];const weekDaysCollection={mon:1,tue:2,wed:3,thu:4,fri:5,sat:6,sun:7};const monthsCollection={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12};var id=1;exports[_0x21f2[38]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){return Xchatty[_0x21f2[43]]()[_0x21f2[42]](function(_0x10e2x2e){return _0x10e2x2b[_0x21f2[41]](200)[_0x21f2[40]](_0x10e2x2e)})[_0x21f2[39]](function(_0x10e2x2d){return _0x10e2x2c(_0x10e2x2d)})};exports[_0x21f2[44]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){ChatWebsite[_0x21f2[79]](_0x10e2x2a[_0x21f2[50]][_0x21f2[49]])[_0x21f2[42]](function(_0x10e2x2f){_0x10e2x2b[_0x21f2[47]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x21f2[45],"\x78\x2D\x74\x69\x6D\x65\x73\x74\x61\x6D\x70":Date[_0x21f2[46]](),"\x78\x2D\x73\x65\x6E\x74":true});var _0x10e2x30=xchatty_components[_0x21f2[48]];var _0x10e2x31={websiteId:_0x10e2x2a[_0x21f2[50]][_0x21f2[49]],rootPath:Util[_0x21f2[52]](_0x10e2x2f[_0x21f2[51]])+ _0x21f2[53],signedUp:_0x21f2[54],windowFocused:_0x21f2[54],isNewPage:_0x21f2[55],processingSignUp:_0x21f2[54],processingEnquiry:_0x21f2[54],processingSend:_0x21f2[54],processingRating:_0x21f2[54],visitorFullname:_0x21f2[56],visitorAvatar:_0x21f2[56],timerReadMessages:_0x21f2[57],timerCheckStatus:_0x21f2[57],isOnline:_0x21f2[54],decayHistory:0,defaultTimeout:5000,isInitialStatusCheck:_0x21f2[55],muteNotificationSoundOnce:_0x21f2[54],assetBase:Util[_0x21f2[52]](_0x10e2x2f[_0x21f2[51]])+ _0x21f2[58],hasSessionSaf:_0x21f2[54],restoreOpenState:_0x21f2[54],animateHover:_0x10e2x2f[_0x21f2[59]],hideEmail:_0x21f2[54],hideOffline:_0x21f2[54],headerShape:_0x10e2x2f[_0x21f2[60]],HeaderOnline:_0x10e2x2f[_0x21f2[61]],OnlineMessage:_0x10e2x2f[_0x21f2[62]],UsernamePlaceholder:_0x10e2x2f[_0x21f2[63]],EmailPlaceholder:_0x10e2x2f[_0x21f2[64]],StartChatButtonText:_0x10e2x2f[_0x21f2[65]],OfflineMessage:_0x10e2x2f[_0x21f2[66]],HeaderOffline:_0x10e2x2f[_0x21f2[67]],EnquiryMessagePlaceholder:_0x10e2x2f[_0x21f2[68]],EnquiryButtonText:_0x10e2x2f[_0x21f2[69]],downloadTranscript:_0x10e2x2f[_0x21f2[70]],RatingMessage:_0x10e2x2f[_0x21f2[71]],RatingSend:_0x10e2x2f[_0x21f2[72]],RatingSkip:_0x10e2x2f[_0x21f2[73]],MessageAgentsBusy:_0x10e2x2f[_0x21f2[74]],NameTitle:_0x10e2x2f[_0x21f2[75]],EmailTitle:_0x10e2x2f[_0x21f2[76]],MessageTitle:_0x10e2x2f[_0x21f2[77]]};_0x10e2x30= Mustache[_0x21f2[78]](_0x10e2x30,_0x10e2x31);_0x10e2x2b[_0x21f2[40]](_0x10e2x30)})[_0x21f2[39]](function(_0x10e2x2d){_0x10e2x2c(_0x10e2x2d)})};exports[_0x21f2[80]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){ChatWebsite[_0x21f2[79]](_0x10e2x2a[_0x21f2[50]][_0x21f2[49]])[_0x21f2[42]](function(_0x10e2x2f){_0x10e2x2b[_0x21f2[47]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x21f2[81],"\x78\x2D\x74\x69\x6D\x65\x73\x74\x61\x6D\x70":Date[_0x21f2[46]](),"\x78\x2D\x73\x65\x6E\x74":true});var _0x10e2x32=xchatty_components[_0x21f2[82]];var _0x10e2x33={assetBase:Util[_0x21f2[52]](_0x10e2x2f[_0x21f2[51]])+ _0x21f2[58],color:_0x10e2x2f[_0x21f2[83]],colorFocus:_0x10e2x2f[_0x21f2[84]],colorButton:_0x10e2x2f[_0x21f2[85]]};_0x10e2x32= Mustache[_0x21f2[78]](_0x10e2x32,_0x10e2x33);_0x10e2x2b[_0x21f2[40]](_0x10e2x32)})[_0x21f2[39]](function(_0x10e2x2d){_0x10e2x2c(_0x10e2x2d)})};exports[_0x21f2[86]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){if(_0x10e2x2a[_0x21f2[89]][_0x21f2[88]](_0x21f2[87])){_0x10e2x2b[_0x21f2[95]](path[_0x21f2[94]](config[_0x21f2[90]],_0x21f2[91],_0x21f2[92],_0x10e2x2a[_0x21f2[89]][_0x21f2[93]]))}else {_0x10e2x2b[_0x21f2[95]](path[_0x21f2[94]](config[_0x21f2[90]],_0x21f2[91],_0x21f2[96],_0x21f2[97],_0x21f2[98],_0x10e2x2a[_0x21f2[89]][_0x21f2[93]]))}};exports[_0x21f2[99]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){_0x10e2x2b[_0x21f2[47]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x21f2[45],"\x78\x2D\x74\x69\x6D\x65\x73\x74\x61\x6D\x70":Date[_0x21f2[46]](),"\x78\x2D\x73\x65\x6E\x74":true});var _0x10e2x34=xchatty_components[_0x21f2[100]];_0x10e2x2b[_0x21f2[40]](_0x10e2x34)};exports[_0x21f2[101]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){if(!_0x10e2x2a[_0x21f2[102]][_0x21f2[97]]){_0x10e2x2a[_0x21f2[102]][_0x21f2[97]]= {}};var _0x10e2x35={};return Agent[_0x21f2[43]]({where:{online:true,role:_0x21f2[121]}})[_0x21f2[42]](function(_0x10e2x38){if(_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[115]]){_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x21f2[115]]= _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[115]]=== _0x21f2[55]?true:false};_0x10e2x35= {success:true,has_session_saf:null,signed_up:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x21f2[111]]?true:false,fullname:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x21f2[117]]?_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x21f2[117]]:_0x21f2[114],email:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x21f2[118]]?_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x21f2[118]]:_0x21f2[114],avatar:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x21f2[119]]?_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x21f2[119]]:_0x21f2[114],open_state:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x21f2[115]]|| _0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x21f2[111]]?true:false,online:_0x10e2x38[_0x21f2[120]]?true:false,is_unserved:false,room_id:0};return})[_0x21f2[42]](function(){if(_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x21f2[108]]){return ChatRoom[_0x21f2[110]]({where:{ChatVisitorId:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x21f2[108]],status:_0x21f2[113],token:{$ne:_0x21f2[114]}}})};return})[_0x21f2[42]](function(_0x10e2x37){if(_0x10e2x37){_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x21f2[111]]= _0x10e2x37[_0x21f2[49]];_0x10e2x35[_0x21f2[111]]= _0x10e2x37[_0x21f2[49]];_0x10e2x35[_0x21f2[112]]= true}else {_0x10e2x35[_0x21f2[112]]= false};return})[_0x21f2[42]](function(){if(_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x21f2[108]]){return ChatVisitor[_0x21f2[110]]({where:{id:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x21f2[108]],status:_0x21f2[109]}})};return})[_0x21f2[42]](function(_0x10e2x36){if(_0x10e2x36){_0x10e2x35[_0x21f2[103]]= true};return _0x10e2x2b[_0x21f2[40]](_0x10e2x2a[_0x21f2[89]][_0x21f2[104]]+ _0x21f2[105]+ JSON[_0x21f2[106]](_0x10e2x35)+ _0x21f2[107])})[_0x21f2[39]](function(_0x10e2x2d){return _0x10e2x2c(_0x10e2x2d)})};exports[_0x21f2[122]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){var _0x10e2x39=_0x10e2x2a[_0x21f2[50]][_0x21f2[49]];var _0x10e2x3a={where:{ChatRoomId:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[111]]},include:[{model:User,attributes:[_0x21f2[49],_0x21f2[123],_0x21f2[117],_0x21f2[118]]},{model:ChatVisitor,attributes:[_0x21f2[49],_0x21f2[117],_0x21f2[118]]}]};if(_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[124]]=== _0x21f2[54]){_0x10e2x3a[_0x21f2[125]][_0x21f2[49]]= {$gt:_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[126]]}};ChatMessage[_0x21f2[43]](_0x10e2x3a)[_0x21f2[42]](function(_0x10e2x3b){var _0x10e2x3c={success:true,messages:_0x10e2x3b,composing:false,composing_fullname:null};_0x10e2x2b[_0x21f2[40]](_0x10e2x2a[_0x21f2[89]][_0x21f2[104]]+ _0x21f2[105]+ JSON[_0x21f2[106]](_0x10e2x3c)+ _0x21f2[107])})[_0x21f2[39]](function(_0x10e2x2d){_0x10e2x2c(_0x10e2x2d)})};exports[_0x21f2[127]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){var _0x10e2x39=_0x10e2x2a[_0x21f2[50]][_0x21f2[49]];var _0x10e2x3a={where:{ChatRoomId:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[111]]},include:[{model:User,attributes:[_0x21f2[49],_0x21f2[123],_0x21f2[117],_0x21f2[118]]},{model:ChatVisitor,attributes:[_0x21f2[49],_0x21f2[117],_0x21f2[118]]}]};if(_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[124]]=== _0x21f2[54]){_0x10e2x3a[_0x21f2[125]][_0x21f2[49]]= {$gt:_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[126]]}};ChatMessage[_0x21f2[130]]({body:_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[129]][_0x21f2[128]],ChatRoomId:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[111]],ChatVisitorId:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[108]]})[_0x21f2[42]](function(_0x10e2x3d){ChatMessage[_0x21f2[43]](_0x10e2x3a)[_0x21f2[42]](function(_0x10e2x3b){var _0x10e2x3c={errors:[],success:true,data:_0x10e2x3d,messages:_0x10e2x3b};_0x10e2x2b[_0x21f2[40]](_0x10e2x2a[_0x21f2[89]][_0x21f2[104]]+ _0x21f2[105]+ JSON[_0x21f2[106]](_0x10e2x3c)+ _0x21f2[107])})[_0x21f2[39]](function(_0x10e2x2d){_0x10e2x2c(_0x10e2x2d)})})[_0x21f2[39]](function(_0x10e2x2d){_0x10e2x2c(_0x10e2x2d)})};exports[_0x21f2[131]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){var _0x10e2x39=_0x10e2x2a[_0x21f2[50]][_0x21f2[49]];return ChatRoom[_0x21f2[79]](_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[111]])[_0x21f2[42]](function(_0x10e2x37){return _0x10e2x37[_0x21f2[134]]({status:_0x21f2[132],completeReason:_0x21f2[133]})})[_0x21f2[42]](function(){var _0x10e2x3c={success:true,errors:[]};_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39]= {};_0x10e2x2b[_0x21f2[40]](_0x10e2x2a[_0x21f2[89]][_0x21f2[104]]+ _0x21f2[105]+ JSON[_0x21f2[106]](_0x10e2x3c)+ _0x21f2[107])})[_0x21f2[39]](function(_0x10e2x2d){_0x10e2x2c(_0x10e2x2d)})};exports[_0x21f2[135]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){var _0x10e2x39=_0x10e2x2a[_0x21f2[50]][_0x21f2[49]];var _0x10e2x3e=uaParser[_0x21f2[139]](_0x10e2x2a[_0x21f2[138]][_0x21f2[137]])[_0x21f2[136]]();var _0x10e2x3f=languageParser[_0x21f2[141]](_0x10e2x2a[_0x21f2[138]][_0x21f2[140]]);var _0x10e2x40=_0x10e2x2a[_0x21f2[138]][_0x21f2[142]]?_0x10e2x2a[_0x21f2[138]][_0x21f2[142]]:_0x10e2x2a[_0x21f2[144]][_0x21f2[143]]|| _0x10e2x2a[_0x21f2[145]];var _0x10e2x41={fullname:_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[146]][_0x21f2[117]],email:_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[146]][_0x21f2[118]],remote_address:_0x10e2x40,user_agent:_0x10e2x2a[_0x21f2[138]][_0x21f2[137]],visitor_language:_0x10e2x2a[_0x21f2[138]][_0x21f2[140]],referer:_0x10e2x2a[_0x21f2[138]][_0x21f2[147]],origin:_0x21f2[148],browser:_0x10e2x3e[_0x21f2[149]][_0x21f2[123]]+ _0x21f2[150]+ _0x10e2x3e[_0x21f2[149]][_0x21f2[151]],engine:_0x10e2x3e[_0x21f2[152]][_0x21f2[123]]+ _0x21f2[150]+ _0x10e2x3e[_0x21f2[152]][_0x21f2[151]],os:_0x10e2x3e[_0x21f2[153]][_0x21f2[123]]+ _0x21f2[150]+ _0x10e2x3e[_0x21f2[153]][_0x21f2[151]],device:_0x10e2x3e[_0x21f2[155]][_0x21f2[154]]?_0x10e2x3e[_0x21f2[155]][_0x21f2[154]]+ _0x21f2[150]+ _0x10e2x3e[_0x21f2[155]][_0x21f2[156]]+ _0x21f2[150]+ _0x10e2x3e[_0x21f2[155]][_0x21f2[157]]:null,ChatWebsiteId:_0x10e2x2a[_0x21f2[89]][_0x21f2[158]]};if(_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[146]][_0x21f2[159]]&& _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[146]][_0x21f2[160]]){_0x10e2x41[_0x21f2[159]]= _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[146]][_0x21f2[159]];if(_[_0x21f2[161]](_0x10e2x41[_0x21f2[159]])){_0x10e2x41[_0x21f2[159]]= _[_0x21f2[94]](_0x10e2x41[_0x21f2[159]],_0x21f2[162])};_0x10e2x41[_0x21f2[160]]= _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[146]][_0x21f2[160]]};if(_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[146]][_0x21f2[163]]&& _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[146]][_0x21f2[164]]){_0x10e2x41[_0x21f2[163]]= _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[146]][_0x21f2[163]];if(_[_0x21f2[161]](_0x10e2x41[_0x21f2[163]])){_0x10e2x41[_0x21f2[163]]= _[_0x21f2[94]](_0x10e2x41[_0x21f2[163]],_0x21f2[162])};_0x10e2x41[_0x21f2[164]]= _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[146]][_0x21f2[164]]};if(_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[146]][_0x21f2[165]]&& _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[146]][_0x21f2[166]]){_0x10e2x41[_0x21f2[165]]= _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[146]][_0x21f2[165]];if(_[_0x21f2[161]](_0x10e2x41[_0x21f2[165]])){_0x10e2x41[_0x21f2[165]]= _[_0x21f2[94]](_0x10e2x41[_0x21f2[165]],_0x21f2[162])};_0x10e2x41[_0x21f2[166]]= _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[146]][_0x21f2[166]]};var _0x10e2x42,_0x10e2x43,_0x10e2x44;return ChatVisitor[_0x21f2[130]](_0x10e2x41)[_0x21f2[42]](function(_0x10e2x47){_0x10e2x42= _0x10e2x47;return ChatWebsite[_0x21f2[79]](_0x10e2x42.ChatWebsiteId)})[_0x21f2[42]](function(_0x10e2x46){_0x10e2x43= _0x10e2x46;if(_0x10e2x43[_0x21f2[175]]){return Contact[_0x21f2[176]]({where:{email:_0x10e2x42[_0x21f2[118]]},defaults:{email:_0x10e2x42[_0x21f2[118]],firstName:_0x10e2x42[_0x21f2[117]],ListId:_0x10e2x43[_0x21f2[175]]}})}})[_0x21f2[42]](function(){return ChatRoom[_0x21f2[130]]({type:_0x21f2[174],ChatVisitorId:_0x10e2x42[_0x21f2[49]],ChatWebsiteId:_0x10e2x43[_0x21f2[49]],contact:_0x10e2x42[_0x21f2[118]],website:_0x10e2x43[_0x21f2[123]]})})[_0x21f2[42]](function(_0x10e2x37){_0x10e2x44= _0x10e2x37;var _0x10e2x45= new Scheduler({channel:_0x21f2[167],uniqueid:util[_0x21f2[170]](_0x21f2[168],moment()[_0x21f2[169]](),_0x10e2x44[_0x21f2[49]]),roomid:_0x10e2x44[_0x21f2[49]],websiteid:_0x10e2x43[_0x21f2[49]],websitename:_0x10e2x43[_0x21f2[123]],websiteaddress:_0x10e2x43[_0x21f2[171]],accountid:_0x10e2x43[_0x21f2[49]],accountname:_0x10e2x43[_0x21f2[123]],accountaddress:_0x10e2x43[_0x21f2[171]],visitorid:_0x10e2x42[_0x21f2[49]],visitorname:_0x10e2x42[_0x21f2[117]],visitoremail:_0x10e2x42[_0x21f2[118]]});_0x10e2x45[_0x21f2[172]]();_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[117]]= _0x10e2x42[_0x21f2[117]];_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[118]]= _0x10e2x42[_0x21f2[118]];_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[119]]= md5(_0x10e2x42[_0x21f2[118]]).toString(_0x21f2[173]);_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[108]]= _0x10e2x42[_0x21f2[49]];var _0x10e2x3c={success:true,errors:[],chatVisitor:{id:_0x10e2x42[_0x21f2[49]]}};_0x10e2x2b[_0x21f2[40]](_0x10e2x2a[_0x21f2[89]][_0x21f2[104]]+ _0x21f2[105]+ JSON[_0x21f2[106]](_0x10e2x3c)+ _0x21f2[107])})[_0x21f2[39]](function(_0x10e2x2d){_0x10e2x2c(_0x10e2x2d)})};exports[_0x21f2[177]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){var _0x10e2x39=_0x10e2x2a[_0x21f2[50]][_0x21f2[49]];return ChatVisitor[_0x21f2[79]](_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[108]])[_0x21f2[42]](function(_0x10e2x47){return _0x10e2x47[_0x21f2[134]]({status:_0x21f2[109]})})[_0x21f2[42]](function(){var _0x10e2x3c={success:true,errors:[]};_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39]= {};_0x10e2x2b[_0x21f2[40]](_0x10e2x2a[_0x21f2[89]][_0x21f2[104]]+ _0x21f2[105]+ JSON[_0x21f2[106]](_0x10e2x3c)+ _0x21f2[107])})[_0x21f2[39]](function(_0x10e2x2d){_0x10e2x2c(_0x10e2x2d)})};exports[_0x21f2[178]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){return sequelize[_0x21f2[190]]()[_0x21f2[42]](function(_0x10e2x48){var _0x10e2x40=_0x10e2x2a[_0x21f2[138]][_0x21f2[142]]?_0x10e2x2a[_0x21f2[138]][_0x21f2[142]]:_0x10e2x2a[_0x21f2[144]][_0x21f2[143]]|| _0x10e2x2a[_0x21f2[145]];var _0x10e2x3e=uaParser[_0x21f2[139]](_0x10e2x2a[_0x21f2[138]][_0x21f2[137]])[_0x21f2[136]]();var _0x10e2x3f=languageParser[_0x21f2[141]](_0x10e2x2a[_0x21f2[138]][_0x21f2[140]]);var _0x10e2x41={fullname:_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[117]],email:_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[118]],remote_address:_0x10e2x40,user_agent:_0x10e2x2a[_0x21f2[138]][_0x21f2[137]],visitor_language:_0x10e2x2a[_0x21f2[138]][_0x21f2[140]],browser:_0x10e2x3e[_0x21f2[149]][_0x21f2[123]]+ _0x21f2[150]+ _0x10e2x3e[_0x21f2[149]][_0x21f2[151]],engine:_0x10e2x3e[_0x21f2[152]][_0x21f2[123]]+ _0x21f2[150]+ _0x10e2x3e[_0x21f2[152]][_0x21f2[151]],os:_0x10e2x3e[_0x21f2[153]][_0x21f2[123]]+ _0x21f2[150]+ _0x10e2x3e[_0x21f2[153]][_0x21f2[151]],device:_0x10e2x3e[_0x21f2[155]][_0x21f2[154]]?_0x10e2x3e[_0x21f2[155]][_0x21f2[154]]+ _0x21f2[150]+ _0x10e2x3e[_0x21f2[155]][_0x21f2[156]]+ _0x21f2[150]+ _0x10e2x3e[_0x21f2[155]][_0x21f2[157]]:null,referer:_0x10e2x2a[_0x21f2[138]][_0x21f2[147]],origin:_0x21f2[180],status:_0x21f2[109],ChatWebsiteId:parseInt(_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[181]],10),ChatEnquiry:{username:_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[117]],email:_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[118]],text:_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[128]],ChatWebsiteId:parseInt(_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[181]],10)}};if(_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[182]]&& _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[183]]){_0x10e2x41[_0x21f2[182]]= _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[182]];if(_[_0x21f2[161]](_0x10e2x41[_0x21f2[182]])){_0x10e2x41[_0x21f2[182]]= _[_0x21f2[94]](_0x10e2x41[_0x21f2[182]],_0x21f2[162])};_0x10e2x41[_0x21f2[183]]= _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[183]]};if(_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[184]]&& _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[185]]){_0x10e2x41[_0x21f2[184]]= _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[184]];if(_[_0x21f2[161]](_0x10e2x41[_0x21f2[184]])){_0x10e2x41[_0x21f2[184]]= _[_0x21f2[94]](_0x10e2x41[_0x21f2[184]],_0x21f2[162])};_0x10e2x41[_0x21f2[185]]= _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[185]]};if(_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[186]]&& _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[187]]){_0x10e2x41[_0x21f2[186]]= _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[186]];if(_[_0x21f2[161]](_0x10e2x41[_0x21f2[186]])){_0x10e2x41[_0x21f2[186]]= _[_0x21f2[94]](_0x10e2x41[_0x21f2[186]],_0x21f2[162])};_0x10e2x41[_0x21f2[187]]= _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[179]][_0x21f2[187]]};var _0x10e2x42;return ChatVisitor[_0x21f2[130]](_0x10e2x41,{transaction:_0x10e2x48,include:[{model:ChatEnquiry}]})[_0x21f2[42]](function(_0x10e2x47){_0x10e2x42= _0x10e2x47;return ChatWebsite[_0x21f2[79]](_0x10e2x42.ChatWebsiteId)})[_0x21f2[42]](function(_0x10e2x46){if(_0x10e2x46[_0x21f2[175]]){return Contact[_0x21f2[176]]({where:{email:_0x10e2x42[_0x21f2[118]]},defaults:{email:_0x10e2x42[_0x21f2[118]],firstName:_0x10e2x42[_0x21f2[117]],ListId:_0x10e2x46[_0x21f2[175]]}})}})[_0x21f2[42]](function(){_0x10e2x48[_0x21f2[189]]();_0x10e2x2b[_0x21f2[40]](_0x10e2x2a[_0x21f2[89]][_0x21f2[104]]+ _0x21f2[105]+ JSON[_0x21f2[106]]({success:true,errors:[]})+ _0x21f2[107])})[_0x21f2[39]](function(_0x10e2x2d){_0x10e2x48[_0x21f2[188]]();_0x10e2x2c(_0x10e2x2d)})})};exports[_0x21f2[191]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){var _0x10e2x39=_0x10e2x2a[_0x21f2[50]][_0x21f2[49]];if(_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39]&& _0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[108]]&& _0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[111]]){ChatMessage[_0x21f2[43]]({where:{ChatRoomId:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[111]]},include:[{model:Agent,attributes:[_0x21f2[49],_0x21f2[117]]},{model:ChatVisitor,attributes:[_0x21f2[49],_0x21f2[117]]}]})[_0x21f2[42]](function(_0x10e2x3b){var _0x10e2x49=[];_0x10e2x3b[_0x21f2[197]](function(_0x10e2x3d){var _0x10e2x4a={name:_0x10e2x3d[_0x21f2[192]]?_0x10e2x3d[_0x21f2[23]][_0x21f2[117]]:_0x10e2x3d[_0x21f2[26]][_0x21f2[117]],text:_0x10e2x3d[_0x21f2[194]][_0x21f2[193]](/(\r\n|\n|\r)/gm,_0x21f2[150]),date:_0x10e2x3d[_0x21f2[195]]};_0x10e2x49[_0x21f2[196]](_0x10e2x4a)});var _0x10e2x4b=csv(_0x10e2x49);_0x10e2x2b[_0x21f2[157]](_0x21f2[198])[_0x21f2[41]](200)[_0x21f2[40]](_0x10e2x4b)})[_0x21f2[39]](function(_0x10e2x2d){_0x10e2x2c(_0x10e2x2d)})}};exports[_0x21f2[199]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){return Xchatty[_0x21f2[79]](_0x10e2x2a[_0x21f2[50]][_0x21f2[49]])[_0x21f2[42]](function(_0x10e2x4c){if(!_0x10e2x4c){return _0x10e2x2b[_0x21f2[200]](404)};return _0x10e2x2b[_0x21f2[40]](_0x10e2x4c)})[_0x21f2[39]](function(_0x10e2x2d){return _0x10e2x2c(_0x10e2x2d)})};exports[_0x21f2[130]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){return Xchatty[_0x21f2[130]](_0x10e2x2a[_0x21f2[194]])[_0x21f2[42]](function(_0x10e2x4c){return _0x10e2x2b[_0x21f2[41]](201)[_0x21f2[40]](_0x10e2x4c)})[_0x21f2[39]](function(_0x10e2x2d){return _0x10e2x2c(_0x10e2x2d)})};exports[_0x21f2[134]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){if(_0x10e2x2a[_0x21f2[194]][_0x21f2[49]]){delete _0x10e2x2a[_0x21f2[194]][_0x21f2[49]]};return Xchatty[_0x21f2[79]](_0x10e2x2a[_0x21f2[50]][_0x21f2[49]])[_0x21f2[42]](function(_0x10e2x4c){if(!_0x10e2x4c){return _0x10e2x2b[_0x21f2[200]](404)};var _0x10e2x4d=_[_0x21f2[201]](_0x10e2x4c,_0x10e2x2a[_0x21f2[194]]);_0x10e2x4d[_0x21f2[202]]()[_0x21f2[42]](function(){return _0x10e2x2b[_0x21f2[41]](200)[_0x21f2[40]](_0x10e2x4c)})[_0x21f2[39]](function(_0x10e2x2d){return _0x10e2x2c(_0x10e2x2d)})})[_0x21f2[39]](function(_0x10e2x2d){return _0x10e2x2c(_0x10e2x2d)})};exports[_0x21f2[203]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){return Xchatty[_0x21f2[79]](_0x10e2x2a[_0x21f2[50]][_0x21f2[49]])[_0x21f2[42]](function(_0x10e2x4c){if(!_0x10e2x4c){return _0x10e2x2b[_0x21f2[200]](404)};_0x10e2x4c[_0x21f2[203]]()[_0x21f2[42]](function(){return _0x10e2x2b[_0x21f2[200]](204)})[_0x21f2[39]](function(_0x10e2x2d){return _0x10e2x2c(_0x10e2x2d)})})[_0x21f2[39]](function(_0x10e2x2d){return _0x10e2x2c(_0x10e2x2d)})};exports[_0x21f2[204]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){var _0x10e2x2f,_0x10e2x4e,_0x10e2x4f;var _0x10e2x50=xchatty_components[_0x21f2[205]];return ChatWebsite[_0x21f2[79]](_0x10e2x2a[_0x21f2[50]][_0x21f2[49]],{include:[{all:true}]})[_0x21f2[42]](function(_0x10e2x43){_0x10e2x2f= _0x10e2x43;return Setting[_0x21f2[79]](1)})[_0x21f2[42]](function(_0x10e2x56){_0x10e2x4f= _0x10e2x56;return License[_0x21f2[79]](1)})[_0x21f2[42]](function(_0x10e2x51){if(_0x10e2x51){_0x10e2x4e= JSON[_0x21f2[141]](license[_0x21f2[208]](_0x10e2x51[_0x21f2[207]][_0x21f2[206]],_0x10e2x51[_0x21f2[159]]))}else {_0x10e2x4e= demoLicense};var _0x10e2x52={rootPath:Util[_0x21f2[52]](_0x10e2x2f[_0x21f2[51]])+ _0x21f2[53],assetBase:Util[_0x21f2[52]](_0x10e2x2f[_0x21f2[51]])+ _0x21f2[58],websiteId:_0x10e2x2f[_0x21f2[49]],headerShape:_0x10e2x2f[_0x21f2[60]],enquiryEnable:_0x10e2x2f[_0x21f2[209]],onlineFields:_0x10e2x2f[_0x21f2[210]],logo:function(){if(_0x10e2x4e[_0x21f2[211]]&& !_0x10e2x2f[_0x21f2[212]]&& _0x10e2x2f[_0x21f2[213]]){return _0x21f2[214]+ _0x10e2x2f[_0x21f2[213]]+ _0x21f2[215]}else {return _0x21f2[216]}},whiteLabel:function(){if(_0x10e2x4e[_0x21f2[211]]&& !_0x10e2x2f[_0x21f2[217]]){return _0x10e2x2f[_0x21f2[218]]}else {return _0x21f2[219]}},renderedOnlineField:function(){var _0x10e2x53=_0x21f2[114];var _0x10e2x54=this;switch(this[_0x21f2[244]]){case _0x21f2[228]:_0x10e2x53= _0x21f2[220];_0x10e2x53+= util[_0x21f2[170]](_0x21f2[221],_0x10e2x54[_0x21f2[38]],_0x10e2x54[_0x21f2[222]],_0x10e2x54[_0x21f2[223]]?_0x21f2[224]:_0x21f2[114]);_0x10e2x53+= util[_0x21f2[170]](_0x21f2[225],_0x10e2x54[_0x21f2[222]],_0x10e2x54[_0x21f2[38]],_0x10e2x54[_0x21f2[38]]+ 1,_0x10e2x54[_0x21f2[226]],_0x10e2x54[_0x21f2[223]]?_0x21f2[223]:_0x21f2[114]);_0x10e2x53+= _0x21f2[227];break;case _0x21f2[230]:_0x10e2x53= _0x21f2[220];_0x10e2x53+= util[_0x21f2[170]](_0x21f2[221],_0x10e2x54[_0x21f2[38]],_0x10e2x54[_0x21f2[222]],_0x10e2x54[_0x21f2[223]]?_0x21f2[224]:_0x21f2[114]);_0x10e2x53+= util[_0x21f2[170]](_0x21f2[229],_0x10e2x54[_0x21f2[38]],_0x10e2x54[_0x21f2[222]],_0x10e2x54[_0x21f2[38]]+ 1,_0x10e2x54[_0x21f2[226]],_0x10e2x54[_0x21f2[223]]?_0x21f2[223]:_0x21f2[114]);_0x10e2x53+= _0x21f2[227];break;case _0x21f2[236]:_0x10e2x53= _0x21f2[220];_0x10e2x53+= util[_0x21f2[170]](_0x21f2[231],_0x10e2x54[_0x21f2[222]]);_[_0x21f2[197]](_0x10e2x54[_0x21f2[232]],function(_0x10e2x55){_0x10e2x53+= _0x21f2[233];_0x10e2x53+= util[_0x21f2[170]](_0x21f2[234],_0x10e2x54[_0x21f2[38]]+ 1,_0x10e2x55,_0x10e2x55);_0x10e2x53+= _0x21f2[235]});_0x10e2x53+= _0x21f2[227];break;case _0x21f2[238]:_0x10e2x53= _0x21f2[220];_0x10e2x53+= util[_0x21f2[170]](_0x21f2[231],_0x10e2x54[_0x21f2[222]]);_[_0x21f2[197]](_0x10e2x54[_0x21f2[232]],function(_0x10e2x55){_0x10e2x53+= _0x21f2[233];_0x10e2x53+= util[_0x21f2[170]](_0x21f2[237],_0x10e2x54[_0x21f2[38]]+ 1,_0x10e2x55,_0x10e2x55);_0x10e2x53+= _0x21f2[235]});_0x10e2x53+= _0x21f2[227];break;case _0x21f2[243]:_0x10e2x53= _0x21f2[220];_0x10e2x53+= util[_0x21f2[170]](_0x21f2[239],_0x10e2x54[_0x21f2[38]],_0x10e2x54[_0x21f2[222]]);_0x10e2x53+= util[_0x21f2[170]](_0x21f2[240],_0x10e2x54[_0x21f2[38]]+ 1);_[_0x21f2[197]](_0x10e2x54[_0x21f2[232]],function(_0x10e2x55){_0x10e2x53+= util[_0x21f2[170]](_0x21f2[241],_0x10e2x55,_0x10e2x55)});_0x10e2x53+= _0x21f2[242];break};_0x10e2x53+= _0x21f2[245];_0x10e2x53+= util[_0x21f2[170]](_0x21f2[246],_0x10e2x54[_0x21f2[38]]+ 1,_0x10e2x54[_0x21f2[222]]);return _0x10e2x53},offlineFields:_0x10e2x2f[_0x21f2[247]],renderedOfflineField:function(){var _0x10e2x53=_0x21f2[114];var _0x10e2x54=this;switch(this[_0x21f2[244]]){case _0x21f2[228]:_0x10e2x53= _0x21f2[220];_0x10e2x53+= util[_0x21f2[170]](_0x21f2[248],_0x10e2x54[_0x21f2[38]],_0x10e2x54[_0x21f2[222]],_0x10e2x54[_0x21f2[223]]?_0x21f2[224]:_0x21f2[114]);_0x10e2x53+= util[_0x21f2[170]](_0x21f2[249],_0x10e2x54[_0x21f2[222]],_0x10e2x54[_0x21f2[38]],_0x10e2x54[_0x21f2[38]]+ 1,_0x10e2x54[_0x21f2[226]],_0x10e2x54[_0x21f2[223]]?_0x21f2[223]:_0x21f2[114]);_0x10e2x53+= _0x21f2[227];break;case _0x21f2[230]:_0x10e2x53= _0x21f2[220];_0x10e2x53+= util[_0x21f2[170]](_0x21f2[248],_0x10e2x54[_0x21f2[38]],_0x10e2x54[_0x21f2[222]],_0x10e2x54[_0x21f2[223]]?_0x21f2[224]:_0x21f2[114]);_0x10e2x53+= util[_0x21f2[170]](_0x21f2[250],_0x10e2x54[_0x21f2[38]],_0x10e2x54[_0x21f2[222]],_0x10e2x54[_0x21f2[38]]+ 1,_0x10e2x54[_0x21f2[226]],_0x10e2x54[_0x21f2[223]]?_0x21f2[223]:_0x21f2[114]);_0x10e2x53+= _0x21f2[227];break;case _0x21f2[236]:_0x10e2x53= _0x21f2[220];_0x10e2x53+= util[_0x21f2[170]](_0x21f2[231],_0x10e2x54[_0x21f2[222]]);_[_0x21f2[197]](_0x10e2x54[_0x21f2[232]],function(_0x10e2x55){_0x10e2x53+= _0x21f2[233];_0x10e2x53+= util[_0x21f2[170]](_0x21f2[251],_0x10e2x54[_0x21f2[38]]+ 1,_0x10e2x55,_0x10e2x55);_0x10e2x53+= _0x21f2[235]});_0x10e2x53+= _0x21f2[227];break;case _0x21f2[238]:_0x10e2x53= _0x21f2[220];_0x10e2x53+= util[_0x21f2[170]](_0x21f2[231],_0x10e2x54[_0x21f2[222]]);_[_0x21f2[197]](_0x10e2x54[_0x21f2[232]],function(_0x10e2x55){_0x10e2x53+= _0x21f2[233];_0x10e2x53+= util[_0x21f2[170]](_0x21f2[252],_0x10e2x54[_0x21f2[38]]+ 1,_0x10e2x55,_0x10e2x55);_0x10e2x53+= _0x21f2[235]});_0x10e2x53+= _0x21f2[227];break;case _0x21f2[243]:_0x10e2x53= _0x21f2[220];_0x10e2x53+= util[_0x21f2[170]](_0x21f2[231],_0x10e2x54[_0x21f2[222]]);_0x10e2x53+= util[_0x21f2[170]](_0x21f2[253],_0x10e2x54[_0x21f2[38]]+ 1);_[_0x21f2[197]](_0x10e2x54[_0x21f2[232]],function(_0x10e2x55){_0x10e2x53+= util[_0x21f2[170]](_0x21f2[241],_0x10e2x55,_0x10e2x55)});_0x10e2x53+= _0x21f2[242];break};_0x10e2x53+= _0x21f2[245];_0x10e2x53+= util[_0x21f2[170]](_0x21f2[254],_0x10e2x54[_0x21f2[38]]+ 1,_0x10e2x54[_0x21f2[222]]);return _0x10e2x53}};_0x10e2x50= Mustache[_0x21f2[78]](_0x10e2x50,_0x10e2x52);return _0x10e2x2b[_0x21f2[41]](200)[_0x21f2[255]](_0x10e2x50)})[_0x21f2[39]](function(_0x10e2x2d){return _0x10e2x2c(_0x10e2x2d)})};exports[_0x21f2[256]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){return ChatWebsite[_0x21f2[79]](_0x10e2x2a[_0x21f2[50]][_0x21f2[49]],{include:[{model:ChatProactiveAction}]})[_0x21f2[42]](function(_0x10e2x2f){if(!_0x10e2x2f){return _0x10e2x2b[_0x21f2[41]](400)[_0x21f2[255]]({})};return _0x10e2x2b[_0x21f2[41]](200)[_0x21f2[255]](_0x10e2x2f.ChatProactiveActions)})[_0x21f2[39]](function(_0x10e2x2d){return _0x10e2x2c(_0x10e2x2d)})};exports[_0x21f2[257]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){return ChatRoom[_0x21f2[79]](_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[259]][_0x21f2[111]])[_0x21f2[42]](function(_0x10e2x37){if(!_0x10e2x37){return _0x10e2x2b[_0x21f2[41]](400)[_0x21f2[255]]({})};if(_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[259]][_0x21f2[88]](_0x21f2[258])&& _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[259]][_0x21f2[88]](_0x21f2[128])){return _0x10e2x37[_0x21f2[134]]({rating:_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[259]][_0x21f2[258]],ratingMessage:_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[259]][_0x21f2[128]]})};return})[_0x21f2[42]](function(){return _0x10e2x2b[_0x21f2[41]](200)[_0x21f2[255]]({})})[_0x21f2[39]](function(_0x10e2x2d){return _0x10e2x2b[_0x21f2[41]](400)[_0x21f2[255]](_0x10e2x2d)})};exports[_0x21f2[260]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){var _0x10e2x39=_0x10e2x2a[_0x21f2[50]][_0x21f2[49]];if(_0x10e2x2a[_0x21f2[102]]&& _0x10e2x2a[_0x21f2[102]][_0x21f2[97]]){if(_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x21f2[88]](_0x10e2x39)&& _0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[88]](_0x21f2[108])&& _0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[108]]> 0){return ReportChatSession[_0x21f2[262]]({where:{visitorid:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[108]],leaveAt:null}})[_0x21f2[42]](function(_0x10e2x57){if(!_0x10e2x57){return};return _0x10e2x57[_0x21f2[134]]({abandon:true,leaveAt:moment()[_0x21f2[170]](_0x21f2[261])})})[_0x21f2[42]](function(){return _0x10e2x2b[_0x21f2[41]](200)[_0x21f2[255]]({})})[_0x21f2[39]](function(_0x10e2x2d){_0x10e2x2b[_0x21f2[41]](500)[_0x21f2[255]]({})})}};return _0x10e2x2b[_0x21f2[41]](200)[_0x21f2[255]]({})};exports[_0x21f2[263]]= function(_0x10e2x2a,_0x10e2x2b,_0x10e2x2c){if(!_0x10e2x2a[_0x21f2[102]][_0x21f2[97]]){_0x10e2x2a[_0x21f2[102]][_0x21f2[97]]= {}};if(!_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x2a[_0x21f2[50]][_0x21f2[49]]]){_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x2a[_0x21f2[50]][_0x21f2[49]]]= {}};var _0x10e2x39=_0x10e2x2a[_0x21f2[50]][_0x21f2[49]];var _0x10e2x58;var _0x10e2x35={};var _0x10e2x59=[];return ChatWebsite[_0x21f2[79]](_0x10e2x39)[_0x21f2[42]](function(_0x10e2x46){if(!_0x10e2x46){return _0x10e2x2b[_0x21f2[200]](500)};_0x10e2x58= _0x10e2x46;return _0x10e2x58[_0x21f2[273]]({include:[{model:ChatQueue,include:[{model:Agent}]},{model:Agent},{model:Interval,include:[{all:true}]}]})})[_0x21f2[42]](function(_0x10e2x5b){_[_0x21f2[197]](_0x10e2x5b,function(_0x10e2x5c){if(checkAppInterval(_0x10e2x5c)){if(_0x10e2x5c[_0x21f2[267]]=== _0x21f2[268]){if(_0x10e2x5c[_0x21f2[32]][_0x21f2[88]](_0x21f2[269])&& _0x10e2x5c[_0x21f2[32]][_0x21f2[269]][_0x21f2[120]]> 0){_0x10e2x59= _[_0x21f2[271]](_[_0x21f2[201]](_0x10e2x59,_[_0x21f2[270]](_0x10e2x5c[_0x21f2[32]].Users,_0x21f2[49])))}}else {if(_0x10e2x5c[_0x21f2[267]]=== _0x21f2[121]){_0x10e2x59[_0x21f2[196]](_0x10e2x5c[_0x21f2[23]][_0x21f2[49]]);_0x10e2x59= _[_0x21f2[271]](_0x10e2x59)}}}});return Agent[_0x21f2[272]]({where:{online:true,id:{$in:_0x10e2x59}}})})[_0x21f2[42]](function(_0x10e2x5a){if(_0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[115]]){_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[115]]= _0x10e2x2a[_0x21f2[89]][_0x21f2[116]][_0x21f2[115]]=== _0x21f2[55]?true:false};_0x10e2x35= {success:true,has_session_saf:null,signed_up:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[111]]?true:false,fullname:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[117]]|| _0x21f2[114],email:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[118]]|| _0x21f2[114],avatar:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[119]]|| _0x21f2[114],open_state:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[115]]|| _0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[111]]?true:false,online:_0x10e2x5a[_0x21f2[266]]?true:false,is_unserved:false,room_id:0};if(_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[108]]){return ChatRoom[_0x21f2[110]]({where:{ChatVisitorId:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[108]],status:_0x21f2[113],token:{$ne:_0x21f2[114]}}})};return})[_0x21f2[42]](function(_0x10e2x37){if(_0x10e2x37){_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[111]]= _0x10e2x37[_0x21f2[49]];_0x10e2x35[_0x21f2[111]]= _0x10e2x37[_0x21f2[49]];_0x10e2x35[_0x21f2[112]]= true}else {_0x10e2x35[_0x21f2[112]]= false};if(_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[108]]){return ChatVisitor[_0x21f2[110]]({where:{id:_0x10e2x2a[_0x21f2[102]][_0x21f2[97]][_0x10e2x39][_0x21f2[108]],status:_0x21f2[109]}})};return})[_0x21f2[42]](function(_0x10e2x36){if(_0x10e2x36){_0x10e2x35[_0x21f2[103]]= true};return _0x10e2x2b[_0x21f2[41]](200)[_0x21f2[255]](_0x10e2x35)})[_0x21f2[39]](function(_0x10e2x2d){console[_0x21f2[265]](_0x21f2[264],_0x10e2x2d);return _0x10e2x2b[_0x21f2[41]](500)[_0x21f2[255]]({})})};function checkAppInterval(_0x10e2x5c){var _0x10e2x5e=true;if(_0x10e2x5c[_0x21f2[37]]){for(var _0x10e2x5f=0;_0x10e2x5f< _0x10e2x5c[_0x21f2[37]][_0x21f2[274]][_0x21f2[120]];_0x10e2x5f++){if(Util[_0x21f2[276]](splitInterval(_0x10e2x5c[_0x21f2[37]][_0x21f2[274]][_0x10e2x5f][_0x21f2[275]]))){break}else {_0x10e2x5e= false}}}else {if(!Util[_0x21f2[276]](splitInterval(_0x10e2x5c[_0x21f2[275]]))){_0x10e2x5e= false}};return _0x10e2x5e}function splitInterval(_0x10e2x61){var _0x10e2x62={};var _0x10e2x63=_0x10e2x61[_0x21f2[277]](_0x21f2[162]);var _0x10e2x64;_0x10e2x63[_0x21f2[197]](function(_0x10e2x54,_0x10e2x65){switch(_0x10e2x65){case 0:if(_0x10e2x54!== _0x21f2[224]){_0x10e2x64= _0x10e2x54[_0x21f2[277]](_0x21f2[278]);_0x10e2x62[_0x21f2[279]]= moment(_0x10e2x64[0],_0x21f2[280]);_0x10e2x62[_0x21f2[281]]= moment(_0x10e2x64[1],_0x21f2[280])}else {_0x10e2x62[_0x21f2[279]]= null;_0x10e2x62[_0x21f2[281]]= null};break;case 1:if(_0x10e2x54!== _0x21f2[224]){_0x10e2x64= _0x10e2x54[_0x21f2[277]](_0x21f2[278]);_0x10e2x62[_0x21f2[282]]= weekDaysCollection[_0x10e2x64[0]];_0x10e2x62[_0x21f2[283]]= _0x10e2x64[1]?weekDaysCollection[_0x10e2x64[1]]:null}else {_0x10e2x62[_0x21f2[282]]= null;_0x10e2x62[_0x21f2[283]]= null};break;case 2:if(_0x10e2x54!== _0x21f2[224]){_0x10e2x64= _0x10e2x54[_0x21f2[277]](_0x21f2[278]);_0x10e2x62[_0x21f2[284]]= _0x10e2x64[0];_0x10e2x62[_0x21f2[285]]= _0x10e2x64[1]?_0x10e2x64[1]:null}else {_0x10e2x62[_0x21f2[284]]= null;_0x10e2x62[_0x21f2[285]]= null};break;case 3:if(_0x10e2x54!== _0x21f2[224]){_0x10e2x64= _0x10e2x54[_0x21f2[277]](_0x21f2[278]);_0x10e2x62[_0x21f2[286]]= monthsCollection[_0x10e2x64[0]];_0x10e2x62[_0x21f2[287]]= _0x10e2x64[1]?monthsCollection[_0x10e2x64[1]]:null}else {_0x10e2x62[_0x21f2[286]]= null;_0x10e2x62[_0x21f2[287]]= null};break;default:}});return _0x10e2x62}
\ No newline at end of file
diff --git a/server/api/zendesk_account/index.js b/server/api/zendesk_account/index.js
index 46ca688..ad5d546 100644
--- a/server/api/zendesk_account/index.js
+++ b/server/api/zendesk_account/index.js
@@ -1,28 +1 @@
-'use strict';
-
-var express = require('express');
-var auth = require('../../auth/auth.service');
-var controller = require('./zendesk_account.controller');
-
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([19, 13], ['admin']), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show);
-router.get('/:id/check', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.checkAccount);
-router.get('/:id/fields', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.getFields);
-router.get('/:id/configurations', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.getAccountConfigurations);
-router.get('/:id/configurations/:cid', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.getConfiguration);
-router.post('/validate/:field', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.zendeskValidation);
-router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create);
-router.post('/:id/configurations', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.createConfiguration);
-router.post('/:id/configurations/:cid/:type', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.createField);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update);
-router.put('/:id/configurations/:cid/tags', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.addConfigurationTags);
-router.put('/:id/configurations/:cid/fields/:fid', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.updateField);
-router.delete('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.bulkDestroy);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy);
-router.delete('/:id/configurations', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.bulkDestroyConfigurations);
-router.delete('/:id/configurations/:cid', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroyConfiguration);
-router.delete('/:id/configurations/:cid/fields/:fid', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroyField);
-
-module.exports = router;
+var _0x36b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x63\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x63\x69\x64","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65\x2F\x3A\x66\x69\x65\x6C\x64","\x7A\x65\x6E\x64\x65\x73\x6B\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x63\x69\x64\x2F\x3A\x74\x79\x70\x65","\x63\x72\x65\x61\x74\x65\x46\x69\x65\x6C\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x63\x69\x64\x2F\x74\x61\x67\x73","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x54\x61\x67\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x63\x69\x64\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x66\x69\x64","\x75\x70\x64\x61\x74\x65\x46\x69\x65\x6C\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x46\x69\x65\x6C\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x36b0[0];var express=require(_0x36b0[1]);var auth=require(_0x36b0[2]);var controller=require(_0x36b0[3]);var router=express.Router();router[_0x36b0[9]](_0x36b0[4],auth[_0x36b0[5]](),auth[_0x36b0[7]]([19,13],[_0x36b0[6]]),controller[_0x36b0[8]]);router[_0x36b0[9]](_0x36b0[10],auth[_0x36b0[5]](),auth[_0x36b0[7]]([19],[_0x36b0[6]]),controller[_0x36b0[11]]);router[_0x36b0[9]](_0x36b0[12],auth[_0x36b0[5]](),auth[_0x36b0[7]]([19],[_0x36b0[6]]),controller[_0x36b0[13]]);router[_0x36b0[9]](_0x36b0[14],auth[_0x36b0[5]](),auth[_0x36b0[7]]([19],[_0x36b0[6]]),controller[_0x36b0[15]]);router[_0x36b0[9]](_0x36b0[16],auth[_0x36b0[5]](),auth[_0x36b0[7]]([19],[_0x36b0[6]]),controller[_0x36b0[17]]);router[_0x36b0[9]](_0x36b0[18],auth[_0x36b0[5]](),auth[_0x36b0[7]]([19],[_0x36b0[6]]),controller[_0x36b0[19]]);router[_0x36b0[22]](_0x36b0[20],auth[_0x36b0[5]](),auth[_0x36b0[7]]([19],[_0x36b0[6]]),controller[_0x36b0[21]]);router[_0x36b0[22]](_0x36b0[4],auth[_0x36b0[5]](),auth[_0x36b0[7]]([19],[_0x36b0[6]]),controller[_0x36b0[23]]);router[_0x36b0[22]](_0x36b0[16],auth[_0x36b0[5]](),auth[_0x36b0[7]]([19],[_0x36b0[6]]),controller[_0x36b0[24]]);router[_0x36b0[22]](_0x36b0[25],auth[_0x36b0[5]](),auth[_0x36b0[7]]([19],[_0x36b0[6]]),controller[_0x36b0[26]]);router[_0x36b0[28]](_0x36b0[10],auth[_0x36b0[5]](),auth[_0x36b0[7]]([19],[_0x36b0[6]]),controller[_0x36b0[27]]);router[_0x36b0[28]](_0x36b0[29],auth[_0x36b0[5]](),auth[_0x36b0[7]]([19],[_0x36b0[6]]),controller[_0x36b0[30]]);router[_0x36b0[28]](_0x36b0[31],auth[_0x36b0[5]](),auth[_0x36b0[7]]([19],[_0x36b0[6]]),controller[_0x36b0[32]]);router[_0x36b0[34]](_0x36b0[4],auth[_0x36b0[5]](),auth[_0x36b0[7]]([19],[_0x36b0[6]]),controller[_0x36b0[33]]);router[_0x36b0[34]](_0x36b0[10],auth[_0x36b0[5]](),auth[_0x36b0[7]]([19],[_0x36b0[6]]),controller[_0x36b0[35]]);router[_0x36b0[34]](_0x36b0[16],auth[_0x36b0[5]](),auth[_0x36b0[7]]([19],[_0x36b0[6]]),controller[_0x36b0[36]]);router[_0x36b0[34]](_0x36b0[18],auth[_0x36b0[5]](),auth[_0x36b0[7]]([19],[_0x36b0[6]]),controller[_0x36b0[37]]);router[_0x36b0[34]](_0x36b0[31],auth[_0x36b0[5]](),auth[_0x36b0[7]]([19],[_0x36b0[6]]),controller[_0x36b0[38]]);module[_0x36b0[39]]= router
\ No newline at end of file
diff --git a/server/api/zendesk_account/zendesk_account.controller.js b/server/api/zendesk_account/zendesk_account.controller.js
index 22ceb99..4861dc0 100644
--- a/server/api/zendesk_account/zendesk_account.controller.js
+++ b/server/api/zendesk_account/zendesk_account.controller.js
@@ -1,515 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Util = require('../../config/util');
-var zendesk = require('node-zendesk');
-
-var ZendeskAccount = require('../../models').ZendeskAccount;
-var ZendeskConfiguration = require('../../models').ZendeskConfiguration;
-var ZendeskField = require('../../models').ZendeskField;
-
-function handleError(res, statusCode) {
-  statusCode = statusCode || 500;
-  return function(err) {
-    res.status(statusCode).send(err);
-  };
-}
-
-function responseWithResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function(entity) {
-    if (entity) {
-      res.status(statusCode).json(entity);
-    }
-  };
-}
-
-function responseWithoutResult(res, statusCode) {
-  statusCode = statusCode || 200;
-  return function() {
-    res.sendStatus(statusCode);
-  };
-}
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function saveUpdates(updates) {
-  return function(entity) {
-    return entity.updateAttributes(updates)
-      .then(function(updated) {
-        return updated;
-      });
-  };
-}
-
-function removeEntity(res) {
-  return function(entity) {
-    if (entity) {
-      return entity.destroy()
-        .then(function() {
-          res.status(204).end();
-        });
-    }
-  };
-}
-
-// Get list of zendesk_accounts
-exports.index = function(req, res, next) {
-  return ZendeskAccount
-    .scope('configurations')
-    .findAndCountAll(_.merge(Util.getQuery(req.query), {
-      distinct: true
-    }))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-};
-
-// Get a single zendesk_account
-exports.show = function(req, res) {
-  return ZendeskAccount
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-};
-
-// Creates a new zendesk_account in the DB.
-exports.create = function(req, res) {
-  return ZendeskAccount
-    .create(req.body)
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-};
-
-// Updates an existing zendesk_account in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return ZendeskAccount
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-};
-
-// Deletes a zendesk_account from the DB.
-exports.destroy = function(req, res) {
-  return ZendeskAccount
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-};
-
-exports.bulkDestroy = function(req, res) {
-  return ZendeskAccount
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(responseWithResult(res, 204))
-    .catch(handleError(res));
-};
-
-exports.zendeskValidation = function(req, res) {
-  var where = {};
-  where[req.params.field] = req.body.value;
-  return ZendeskAccount
-    .findAndCountAll({
-      where: where
-    })
-    .then(function(result) {
-      if (result.count) {
-        return res.status(200).send({
-          isValid: false,
-          value: req.body.value
-        });
-      }
-      return res.status(200).send({
-        isValid: true,
-        value: req.body.value
-      });
-    })
-    .catch(handleError(res));
-
-};
-
-exports.checkAccount = function(req, res) {
-  return ZendeskAccount
-    .findById(req.params.id)
-    .then(function(account) {
-      var accountZendesk = {
-        username: account.username,
-        remoteUri: account.remoteUri,
-        // debug: true
-      };
-      if (account.authType === 'password') {
-        accountZendesk.password = account.password;
-      } else if (account.authType === 'token') {
-        accountZendesk.token = account.token;
-        // accountZendesk.oauth = true;
-      }
-      // console.log(accountZendesk);
-      var client = zendesk.createClient(accountZendesk);
-      client.users.auth(function(err, res2, result) {
-        if (err) {
-          console.error(err);
-          return handleError(res, err);
-        }
-        // console.log(result);
-        if (!result.verified) {
-          return res.sendStatus(500);
-        }
-        return res.sendStatus(204);
-      });
-    })
-    .catch(handleError(res));
-};
-
-exports.getFields = function(req, res) {
-  return ZendeskAccount
-    .findById(req.params.id)
-    .then(function(account) {
-      var accountZendesk = {
-        username: account.username,
-        remoteUri: account.remoteUri,
-        // debug: true
-      };
-      if (account.authType === 'password') {
-        accountZendesk.password = account.password;
-      } else if (account.authType === 'token') {
-        accountZendesk.token = account.token;
-      }
-      var client = zendesk.createClient(accountZendesk);
-      client.ticketfields.list(function(err, res2, result) {
-        if (err) {
-          console.error(err);
-          return handleError(res, err);
-        }
-        return res.status(200).send(result);
-      });
-    })
-    .catch(handleError(res));
-}
-
-exports.getAccountConfigurations = function(req, res) {
-  return ZendeskConfiguration
-    .scope({
-      method: ['account', req.params.id]
-    })
-    .findAndCountAll(_.merge(Util.getQuery(req.query), {
-      distinct: true
-    }))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-exports.getConfiguration = function(req, res) {
-
-  return ZendeskConfiguration
-    .scope({
-      method: ['account', req.params.id]
-    })
-    .findById(req.params.cid)
-    .then(handleEntityNotFound(res))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-}
-
-exports.destroyConfiguration = function(req, res) {
-  return ZendeskConfiguration
-    .scope({
-      method: ['account', req.params.id]
-    })
-    .findById(req.params.cid)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-};
-
-exports.bulkDestroyConfigurations = function(req, res) {
-  return ZendeskConfiguration
-    .destroy({
-      where: {
-        id: req.query.ids
-      },
-      individualHooks: true
-    })
-    .then(responseWithResult(res, 204))
-    .catch(handleError(res));
-};
-
-exports.createConfiguration = function(req, res) {
-  req.body['AccountId'] = req.params.id;
-
-  switch (req.body.channel) {
-    case 'voice':
-
-      if (req.body.type === 'Queue') {
-        req.body.Subject = [{
-          "type": "string",
-          "content": "[xCALLY Ticket]",
-          "variableName": null
-        }, {
-          "type": "variable",
-          "content": "",
-          "variableName": "queue"
-        }, {
-          "type": "variable",
-          "content": "",
-          "variableName": "calleridnum"
-        }];
-        req.body.Description = [{
-          "type": "string",
-          "content": "*** Call Info ***",
-          "key": null,
-          "keyType": null,
-          "variableName": null
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Caller Number",
-          "keyType": "variable",
-          "variableName": "calleridnum"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Caller Name",
-          "keyType": "variable",
-          "variableName": "calleridname"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Call To",
-          "keyType": "variable",
-          "variableName": "destexten"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Queue",
-          "keyType": "variable",
-          "variableName": "queue"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "UniqueId",
-          "keyType": "variable",
-          "variableName": "uniqueid"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Date",
-          "keyType": "variable",
-          "variableName": "agentcalledAt"
-        }, {
-          "type": "string",
-          "content": "*** Agent Info ***",
-          "key": null,
-          "keyType": null,
-          "variableName": null
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Agent Name",
-          "keyType": "variable",
-          "variableName": "destcalleridname"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Agent Number",
-          "keyType": "variable",
-          "variableName": "destcalleridnum"
-        }, {
-          "type": "string",
-          "content": "*** Time Info ***",
-          "key": null,
-          "keyType": null,
-          "variableName": null
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Agent Ring",
-          "keyType": "variable",
-          "variableName": "agentcalledAt"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Agent Connect",
-          "keyType": "variable",
-          "variableName": "agentconnectAt"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Agent Complete",
-          "keyType": "variable",
-          "variableName": "agentcompleteAt"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Hold Time",
-          "keyType": "variable",
-          "variableName": "holdtime"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Talk Time",
-          "keyType": "variable",
-          "variableName": "talktime"
-        }];
-      } else if (req.body.type === 'Outbound') {
-        req.body.Subject = [{
-          "type": "string",
-          "content": "[xCALLY Ticket]",
-          "variableName": null
-        }, {
-          "type": "string",
-          "content": "Outbound Call",
-          "variableName": null
-        }, {
-          "type": "variable",
-          "content": "",
-          "variableName": "destcalleridnum"
-        }];
-        req.body.Description = [{
-          "type": "string",
-          "content": "*** Call Info ***",
-          "variableName": null
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Called Number",
-          "keyType": "variable",
-          "keyContent": "",
-          "variableName": "destcalleridnum"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Member Name",
-          "keyType": "variable",
-          "keyContent": "",
-          "variableName": "membername"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "UniqueId",
-          "keyType": "variable",
-          "keyContent": "",
-          "variableName": "uniqueid"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Date",
-          "keyType": "variable",
-          "keyContent": "",
-          "variableName": "starttime"
-        }, {
-          "type": "string",
-          "content": "*** Time Info ***",
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Answer Time",
-          "keyType": "variable",
-          "keyContent": "",
-          "variableName": "answertime"
-        }, {
-          "type": "keyValue",
-          "content": "",
-          "key": "Complete Time",
-          "keyType": "variable",
-          "keyContent": "",
-          "variableName": "endtime"
-        }];
-      }
-      break;
-    default:
-      console.log('Channel not available:', req.body.channel);
-  }
-
-  delete req.body.channel;
-  delete req.body.type;
-
-  return ZendeskConfiguration
-    .create(req.body, {
-      include: [{
-        model: ZendeskField,
-        as: 'Subject'
-      }, {
-        model: ZendeskField,
-        as: 'Description'
-      }]
-    })
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-};
-
-exports.createField = function(req, res) {
-  return ZendeskConfiguration
-    .scope({
-      method: ['account', req.params.id]
-    })
-    .findById(req.params.cid)
-    .then(handleEntityNotFound(res))
-    .then(function(configuration) {
-      switch (req.params.type) {
-        case 'subject':
-          req.body['SubjectId'] = req.params.cid;
-          break;
-        case 'description':
-          req.body['DescriptionId'] = req.params.cid;
-          break;
-        case 'field':
-          req.body['FieldId'] = req.params.cid;
-          break;
-      }
-      return ZendeskField.create(req.body);
-    })
-    .then(responseWithResult(res, 201))
-    .catch(handleError(res));
-};
-
-exports.updateField = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return ZendeskField
-    .findById(req.params.fid)
-    .then(handleEntityNotFound(res))
-    .then(saveUpdates(req.body))
-    .then(responseWithResult(res))
-    .catch(handleError(res));
-};
-
-exports.destroyField = function(req, res) {
-  return ZendeskField
-    .findById(req.params.fid)
-    .then(handleEntityNotFound(res))
-    .then(removeEntity(res))
-    .catch(handleError(res));
-};
-
-exports.addConfigurationTags = function(req, res, next) {
-  return ZendeskConfiguration
-    .findById(req.params.cid)
-    .then(handleEntityNotFound(res))
-    .then(function(configuration) {
-      return configuration.setTags(req.body);
-    })
-    .then(responseWithoutResult(res, 200))
-    .catch(function(err) {
-      console.error(err);
-      return handleError(res, err);
-    });
-};
+var _0xfc75=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6E\x6F\x64\x65\x2D\x7A\x65\x6E\x64\x65\x73\x6B","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x7A\x65\x6E\x64\x65\x73\x6B\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x63\x6F\x75\x6E\x74","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x75\x74\x68\x54\x79\x70\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x74\x6F\x6B\x65\x6E","\x63\x72\x65\x61\x74\x65\x43\x6C\x69\x65\x6E\x74","\x65\x72\x72\x6F\x72","\x76\x65\x72\x69\x66\x69\x65\x64","\x61\x75\x74\x68","\x75\x73\x65\x72\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x6C\x69\x73\x74","\x74\x69\x63\x6B\x65\x74\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x41\x63\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x61\x63\x63\x6F\x75\x6E\x74","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x63\x69\x64","\x64\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x74\x79\x70\x65","\x51\x75\x65\x75\x65","\x53\x75\x62\x6A\x65\x63\x74","\x73\x74\x72\x69\x6E\x67","\x5B\x78\x43\x41\x4C\x4C\x59\x20\x54\x69\x63\x6B\x65\x74\x5D","\x76\x61\x72\x69\x61\x62\x6C\x65","","\x71\x75\x65\x75\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x2A\x2A\x2A\x20\x43\x61\x6C\x6C\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x43\x61\x6C\x6C\x65\x72\x20\x4E\x75\x6D\x62\x65\x72","\x43\x61\x6C\x6C\x65\x72\x20\x4E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x43\x61\x6C\x6C\x20\x54\x6F","\x64\x65\x73\x74\x65\x78\x74\x65\x6E","\x55\x6E\x69\x71\x75\x65\x49\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x44\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64\x41\x74","\x2A\x2A\x2A\x20\x41\x67\x65\x6E\x74\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x41\x67\x65\x6E\x74\x20\x4E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x41\x67\x65\x6E\x74\x20\x4E\x75\x6D\x62\x65\x72","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x2A\x2A\x2A\x20\x54\x69\x6D\x65\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x41\x67\x65\x6E\x74\x20\x52\x69\x6E\x67","\x41\x67\x65\x6E\x74\x20\x43\x6F\x6E\x6E\x65\x63\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x41\x67\x65\x6E\x74\x20\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x48\x6F\x6C\x64\x20\x54\x69\x6D\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x54\x61\x6C\x6B\x20\x54\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C","\x43\x61\x6C\x6C\x65\x64\x20\x4E\x75\x6D\x62\x65\x72","\x4D\x65\x6D\x62\x65\x72\x20\x4E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x41\x6E\x73\x77\x65\x72\x20\x54\x69\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x20\x54\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x76\x6F\x69\x63\x65","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3A","\x63\x68\x61\x6E\x6E\x65\x6C","\x6C\x6F\x67","\x63\x72\x65\x61\x74\x65\x46\x69\x65\x6C\x64","\x53\x75\x62\x6A\x65\x63\x74\x49\x64","\x73\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x49\x64","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64\x49\x64","\x75\x70\x64\x61\x74\x65\x46\x69\x65\x6C\x64","\x66\x69\x64","\x64\x65\x73\x74\x72\x6F\x79\x46\x69\x65\x6C\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x54\x61\x67\x73","\x73\x65\x74\x54\x61\x67\x73"];_0xfc75[0];var _=require(_0xfc75[1]);var Util=require(_0xfc75[2]);var zendesk=require(_0xfc75[3]);var ZendeskAccount=require(_0xfc75[5])[_0xfc75[4]];var ZendeskConfiguration=require(_0xfc75[5])[_0xfc75[6]];var ZendeskField=require(_0xfc75[5])[_0xfc75[7]];function handleError(_0xa325x8,_0xa325x9){_0xa325x9= _0xa325x9|| 500;return function(_0xa325xa){_0xa325x8[_0xfc75[9]](_0xa325x9)[_0xfc75[8]](_0xa325xa)}}function responseWithResult(_0xa325x8,_0xa325x9){_0xa325x9= _0xa325x9|| 200;return function(_0xa325xc){if(_0xa325xc){_0xa325x8[_0xfc75[9]](_0xa325x9)[_0xfc75[10]](_0xa325xc)}}}function responseWithoutResult(_0xa325x8,_0xa325x9){_0xa325x9= _0xa325x9|| 200;return function(){_0xa325x8[_0xfc75[11]](_0xa325x9)}}function handleEntityNotFound(_0xa325x8){return function(_0xa325xc){if(!_0xa325xc){_0xa325x8[_0xfc75[9]](404)[_0xfc75[12]]();return null};return _0xa325xc}}function saveUpdates(_0xa325x10){return function(_0xa325xc){return _0xa325xc[_0xfc75[14]](_0xa325x10)[_0xfc75[13]](function(_0xa325x11){return _0xa325x11})}}function removeEntity(_0xa325x8){return function(_0xa325xc){if(_0xa325xc){return _0xa325xc[_0xfc75[15]]()[_0xfc75[13]](function(){_0xa325x8[_0xfc75[9]](204)[_0xfc75[12]]()})}}}exports[_0xfc75[16]]= function(_0xa325x13,_0xa325x8,_0xa325x14){return ZendeskAccount[_0xfc75[23]](_0xfc75[22])[_0xfc75[21]](_[_0xfc75[20]](Util[_0xfc75[19]](_0xa325x13[_0xfc75[18]]),{distinct:true}))[_0xfc75[13]](responseWithResult(_0xa325x8))[_0xfc75[17]](handleError(_0xa325x8))};exports[_0xfc75[24]]= function(_0xa325x13,_0xa325x8){return ZendeskAccount[_0xfc75[27]](_0xa325x13[_0xfc75[26]][_0xfc75[25]])[_0xfc75[13]](handleEntityNotFound(_0xa325x8))[_0xfc75[13]](responseWithResult(_0xa325x8))[_0xfc75[17]](handleError(_0xa325x8))};exports[_0xfc75[28]]= function(_0xa325x13,_0xa325x8){return ZendeskAccount[_0xfc75[28]](_0xa325x13[_0xfc75[29]])[_0xfc75[13]](responseWithResult(_0xa325x8,201))[_0xfc75[17]](handleError(_0xa325x8))};exports[_0xfc75[30]]= function(_0xa325x13,_0xa325x8){if(_0xa325x13[_0xfc75[29]][_0xfc75[25]]){delete _0xa325x13[_0xfc75[29]][_0xfc75[25]]};return ZendeskAccount[_0xfc75[27]](_0xa325x13[_0xfc75[26]][_0xfc75[25]])[_0xfc75[13]](handleEntityNotFound(_0xa325x8))[_0xfc75[13]](saveUpdates(_0xa325x13[_0xfc75[29]]))[_0xfc75[13]](responseWithResult(_0xa325x8))[_0xfc75[17]](handleError(_0xa325x8))};exports[_0xfc75[15]]= function(_0xa325x13,_0xa325x8){return ZendeskAccount[_0xfc75[27]](_0xa325x13[_0xfc75[26]][_0xfc75[25]])[_0xfc75[13]](handleEntityNotFound(_0xa325x8))[_0xfc75[13]](removeEntity(_0xa325x8))[_0xfc75[17]](handleError(_0xa325x8))};exports[_0xfc75[31]]= function(_0xa325x13,_0xa325x8){return ZendeskAccount[_0xfc75[15]]({where:{id:_0xa325x13[_0xfc75[18]][_0xfc75[32]]},individualHooks:true})[_0xfc75[13]](responseWithResult(_0xa325x8,204))[_0xfc75[17]](handleError(_0xa325x8))};exports[_0xfc75[33]]= function(_0xa325x13,_0xa325x8){var _0xa325x15={};_0xa325x15[_0xa325x13[_0xfc75[26]][_0xfc75[34]]]= _0xa325x13[_0xfc75[29]][_0xfc75[35]];return ZendeskAccount[_0xfc75[21]]({where:_0xa325x15})[_0xfc75[13]](function(_0xa325x16){if(_0xa325x16[_0xfc75[36]]){return _0xa325x8[_0xfc75[9]](200)[_0xfc75[8]]({isValid:false,value:_0xa325x13[_0xfc75[29]][_0xfc75[35]]})};return _0xa325x8[_0xfc75[9]](200)[_0xfc75[8]]({isValid:true,value:_0xa325x13[_0xfc75[29]][_0xfc75[35]]})})[_0xfc75[17]](handleError(_0xa325x8))};exports[_0xfc75[37]]= function(_0xa325x13,_0xa325x8){return ZendeskAccount[_0xfc75[27]](_0xa325x13[_0xfc75[26]][_0xfc75[25]])[_0xfc75[13]](function(_0xa325x17){var _0xa325x18={username:_0xa325x17[_0xfc75[38]],remoteUri:_0xa325x17[_0xfc75[39]]};if(_0xa325x17[_0xfc75[40]]=== _0xfc75[41]){_0xa325x18[_0xfc75[41]]= _0xa325x17[_0xfc75[41]]}else {if(_0xa325x17[_0xfc75[40]]=== _0xfc75[42]){_0xa325x18[_0xfc75[42]]= _0xa325x17[_0xfc75[42]]}};var _0xa325x19=zendesk[_0xfc75[43]](_0xa325x18);_0xa325x19[_0xfc75[47]][_0xfc75[46]](function(_0xa325xa,_0xa325x1a,_0xa325x16){if(_0xa325xa){console[_0xfc75[44]](_0xa325xa);return handleError(_0xa325x8,_0xa325xa)};if(!_0xa325x16[_0xfc75[45]]){return _0xa325x8[_0xfc75[11]](500)};return _0xa325x8[_0xfc75[11]](204)})})[_0xfc75[17]](handleError(_0xa325x8))};exports[_0xfc75[48]]= function(_0xa325x13,_0xa325x8){return ZendeskAccount[_0xfc75[27]](_0xa325x13[_0xfc75[26]][_0xfc75[25]])[_0xfc75[13]](function(_0xa325x17){var _0xa325x18={username:_0xa325x17[_0xfc75[38]],remoteUri:_0xa325x17[_0xfc75[39]]};if(_0xa325x17[_0xfc75[40]]=== _0xfc75[41]){_0xa325x18[_0xfc75[41]]= _0xa325x17[_0xfc75[41]]}else {if(_0xa325x17[_0xfc75[40]]=== _0xfc75[42]){_0xa325x18[_0xfc75[42]]= _0xa325x17[_0xfc75[42]]}};var _0xa325x19=zendesk[_0xfc75[43]](_0xa325x18);_0xa325x19[_0xfc75[50]][_0xfc75[49]](function(_0xa325xa,_0xa325x1a,_0xa325x16){if(_0xa325xa){console[_0xfc75[44]](_0xa325xa);return handleError(_0xa325x8,_0xa325xa)};return _0xa325x8[_0xfc75[9]](200)[_0xfc75[8]](_0xa325x16)})})[_0xfc75[17]](handleError(_0xa325x8))};exports[_0xfc75[51]]= function(_0xa325x13,_0xa325x8){return ZendeskConfiguration[_0xfc75[23]]({method:[_0xfc75[52],_0xa325x13[_0xfc75[26]][_0xfc75[25]]]})[_0xfc75[21]](_[_0xfc75[20]](Util[_0xfc75[19]](_0xa325x13[_0xfc75[18]]),{distinct:true}))[_0xfc75[13]](responseWithResult(_0xa325x8))[_0xfc75[17]](handleError(_0xa325x8))};exports[_0xfc75[53]]= function(_0xa325x13,_0xa325x8){return ZendeskConfiguration[_0xfc75[23]]({method:[_0xfc75[52],_0xa325x13[_0xfc75[26]][_0xfc75[25]]]})[_0xfc75[27]](_0xa325x13[_0xfc75[26]][_0xfc75[54]])[_0xfc75[13]](handleEntityNotFound(_0xa325x8))[_0xfc75[13]](responseWithResult(_0xa325x8))[_0xfc75[17]](handleError(_0xa325x8))};exports[_0xfc75[55]]= function(_0xa325x13,_0xa325x8){return ZendeskConfiguration[_0xfc75[23]]({method:[_0xfc75[52],_0xa325x13[_0xfc75[26]][_0xfc75[25]]]})[_0xfc75[27]](_0xa325x13[_0xfc75[26]][_0xfc75[54]])[_0xfc75[13]](handleEntityNotFound(_0xa325x8))[_0xfc75[13]](removeEntity(_0xa325x8))[_0xfc75[17]](handleError(_0xa325x8))};exports[_0xfc75[56]]= function(_0xa325x13,_0xa325x8){return ZendeskConfiguration[_0xfc75[15]]({where:{id:_0xa325x13[_0xfc75[18]][_0xfc75[32]]},individualHooks:true})[_0xfc75[13]](responseWithResult(_0xa325x8,204))[_0xfc75[17]](handleError(_0xa325x8))};exports[_0xfc75[57]]= function(_0xa325x13,_0xa325x8){_0xa325x13[_0xfc75[29]][_0xfc75[58]]= _0xa325x13[_0xfc75[26]][_0xfc75[25]];switch(_0xa325x13[_0xfc75[29]][_0xfc75[107]]){case _0xfc75[105]:if(_0xa325x13[_0xfc75[29]][_0xfc75[59]]=== _0xfc75[60]){_0xa325x13[_0xfc75[29]][_0xfc75[61]]= [{"\x74\x79\x70\x65":_0xfc75[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[63],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xfc75[64],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[66]},{"\x74\x79\x70\x65":_0xfc75[64],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[67]}];_0xa325x13[_0xfc75[29]][_0xfc75[68]]= [{"\x74\x79\x70\x65":_0xfc75[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[69],"\x6B\x65\x79":null,"\x6B\x65\x79\x54\x79\x70\x65":null,"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[71],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[67]},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[72],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[73]},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[74],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[75]},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[60],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[66]},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[76],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[77]},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[78],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[79]},{"\x74\x79\x70\x65":_0xfc75[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[80],"\x6B\x65\x79":null,"\x6B\x65\x79\x54\x79\x70\x65":null,"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[81],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[82]},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[83],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[84]},{"\x74\x79\x70\x65":_0xfc75[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[85],"\x6B\x65\x79":null,"\x6B\x65\x79\x54\x79\x70\x65":null,"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[86],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[79]},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[87],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[88]},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[89],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[90]},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[91],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[92]},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[93],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[94]}]}else {if(_0xa325x13[_0xfc75[29]][_0xfc75[59]]=== _0xfc75[95]){_0xa325x13[_0xfc75[29]][_0xfc75[61]]= [{"\x74\x79\x70\x65":_0xfc75[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[63],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xfc75[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[96],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xfc75[64],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[84]}];_0xa325x13[_0xfc75[29]][_0xfc75[68]]= [{"\x74\x79\x70\x65":_0xfc75[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[69],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[97],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[84]},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[98],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[99]},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[76],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[77]},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[78],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[100]},{"\x74\x79\x70\x65":_0xfc75[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[85]},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[101],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[102]},{"\x74\x79\x70\x65":_0xfc75[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x6B\x65\x79":_0xfc75[103],"\x6B\x65\x79\x54\x79\x70\x65":_0xfc75[64],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0xfc75[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xfc75[104]}]}};break;default:console[_0xfc75[108]](_0xfc75[106],_0xa325x13[_0xfc75[29]][_0xfc75[107]])};delete _0xa325x13[_0xfc75[29]][_0xfc75[107]];delete _0xa325x13[_0xfc75[29]][_0xfc75[59]];return ZendeskConfiguration[_0xfc75[28]](_0xa325x13[_0xfc75[29]],{include:[{model:ZendeskField,as:_0xfc75[61]},{model:ZendeskField,as:_0xfc75[68]}]})[_0xfc75[13]](responseWithResult(_0xa325x8,201))[_0xfc75[17]](handleError(_0xa325x8))};exports[_0xfc75[109]]= function(_0xa325x13,_0xa325x8){return ZendeskConfiguration[_0xfc75[23]]({method:[_0xfc75[52],_0xa325x13[_0xfc75[26]][_0xfc75[25]]]})[_0xfc75[27]](_0xa325x13[_0xfc75[26]][_0xfc75[54]])[_0xfc75[13]](handleEntityNotFound(_0xa325x8))[_0xfc75[13]](function(_0xa325x1b){switch(_0xa325x13[_0xfc75[26]][_0xfc75[59]]){case _0xfc75[111]:_0xa325x13[_0xfc75[29]][_0xfc75[110]]= _0xa325x13[_0xfc75[26]][_0xfc75[54]];break;case _0xfc75[113]:_0xa325x13[_0xfc75[29]][_0xfc75[112]]= _0xa325x13[_0xfc75[26]][_0xfc75[54]];break;case _0xfc75[34]:_0xa325x13[_0xfc75[29]][_0xfc75[114]]= _0xa325x13[_0xfc75[26]][_0xfc75[54]];break};return ZendeskField[_0xfc75[28]](_0xa325x13[_0xfc75[29]])})[_0xfc75[13]](responseWithResult(_0xa325x8,201))[_0xfc75[17]](handleError(_0xa325x8))};exports[_0xfc75[115]]= function(_0xa325x13,_0xa325x8){if(_0xa325x13[_0xfc75[29]][_0xfc75[25]]){delete _0xa325x13[_0xfc75[29]][_0xfc75[25]]};return ZendeskField[_0xfc75[27]](_0xa325x13[_0xfc75[26]][_0xfc75[116]])[_0xfc75[13]](handleEntityNotFound(_0xa325x8))[_0xfc75[13]](saveUpdates(_0xa325x13[_0xfc75[29]]))[_0xfc75[13]](responseWithResult(_0xa325x8))[_0xfc75[17]](handleError(_0xa325x8))};exports[_0xfc75[117]]= function(_0xa325x13,_0xa325x8){return ZendeskField[_0xfc75[27]](_0xa325x13[_0xfc75[26]][_0xfc75[116]])[_0xfc75[13]](handleEntityNotFound(_0xa325x8))[_0xfc75[13]](removeEntity(_0xa325x8))[_0xfc75[17]](handleError(_0xa325x8))};exports[_0xfc75[118]]= function(_0xa325x13,_0xa325x8,_0xa325x14){return ZendeskConfiguration[_0xfc75[27]](_0xa325x13[_0xfc75[26]][_0xfc75[54]])[_0xfc75[13]](handleEntityNotFound(_0xa325x8))[_0xfc75[13]](function(_0xa325x1b){return _0xa325x1b[_0xfc75[119]](_0xa325x13[_0xfc75[29]])})[_0xfc75[13]](responseWithoutResult(_0xa325x8,200))[_0xfc75[17]](function(_0xa325xa){console[_0xfc75[44]](_0xa325xa);return handleError(_0xa325x8,_0xa325xa)})}
\ No newline at end of file
diff --git a/server/api/zendesk_account/zendesk_account.events.js b/server/api/zendesk_account/zendesk_account.events.js
index cf5855e..54804d6 100644
--- a/server/api/zendesk_account/zendesk_account.events.js
+++ b/server/api/zendesk_account/zendesk_account.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ZendeskAccount = require('../../models').ZendeskAccount;
-
-var ZendeskAccountEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ZendeskAccountEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ZendeskAccount.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ZendeskAccountEvents.emit(event + ':' + doc._id, doc);
-    ZendeskAccountEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ZendeskAccountEvents;
+var _0x8054=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x8054[0];const EventEmitter=require(_0x8054[1]);const ZendeskAccount=require(_0x8054[3])[_0x8054[2]];var ZendeskAccountEvents= new EventEmitter();ZendeskAccountEvents[_0x8054[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x8054[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x8054[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x8054[6]};for(var e in events){var event=events[e];ZendeskAccount[_0x8054[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x5545x8,_0x5545x9,_0x5545xa){ZendeskAccountEvents[_0x8054[10]](event+ _0x8054[8]+ _0x5545x8[_0x8054[9]],_0x5545x8);ZendeskAccountEvents[_0x8054[10]](event,_0x5545x8);_0x5545xa(null)}}module[_0x8054[11]]= ZendeskAccountEvents
\ No newline at end of file
diff --git a/server/api/zendesk_account/zendesk_account.socket.js b/server/api/zendesk_account/zendesk_account.socket.js
index c2f0be2..883240b 100644
--- a/server/api/zendesk_account/zendesk_account.socket.js
+++ b/server/api/zendesk_account/zendesk_account.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const ZendeskAccountEvents = require('./zendesk_account.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('zendesk_account:' + event, socket);
-
-    ZendeskAccountEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ZendeskAccountEvents.removeListener(event, listener);
-  };
-}
+var _0xba35=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xba35[0];const ZendeskAccountEvents=require(_0xba35[1]);var events=[_0xba35[2],_0xba35[3]];exports[_0xba35[4]]= function(_0xd792x3){for(var _0xd792x4=0,_0xd792x5=events[_0xba35[5]];_0xd792x4< _0xd792x5;_0xd792x4++){var _0xd792x6=events[_0xd792x4];var _0xd792x7=createListener(_0xba35[6]+ _0xd792x6,_0xd792x3);ZendeskAccountEvents[_0xba35[7]](_0xd792x6,_0xd792x7);_0xd792x3[_0xba35[7]](_0xba35[8],removeListener(_0xd792x6,_0xd792x7))}};function createListener(_0xd792x6,_0xd792x3){return function(_0xd792x9){_0xd792x3[_0xba35[9]](_0xd792x6,_0xd792x9)}}function removeListener(_0xd792x6,_0xd792x7){return function(){ZendeskAccountEvents[_0xba35[10]](_0xd792x6,_0xd792x7)}}
\ No newline at end of file
diff --git a/server/api/zendesk_configuration/index.js b/server/api/zendesk_configuration/index.js
index f91b034..2b622cb 100644
--- a/server/api/zendesk_configuration/index.js
+++ b/server/api/zendesk_configuration/index.js
@@ -1,16 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./zendesk_configuration.controller');
-var auth = require('../../auth/auth.service');
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update);
-router.post('/:id/tags', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.addConfigurationTags);
-router.post('/:id/:type', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.addConfigurationField);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0xc9b9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x54\x61\x67\x73","\x2F\x3A\x69\x64\x2F\x3A\x74\x79\x70\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc9b9[0];var express=require(_0xc9b9[1]);var controller=require(_0xc9b9[2]);var auth=require(_0xc9b9[3]);var router=express.Router();router[_0xc9b9[9]](_0xc9b9[4],auth[_0xc9b9[5]](),auth[_0xc9b9[7]]([19],[_0xc9b9[6]]),controller[_0xc9b9[8]]);router[_0xc9b9[9]](_0xc9b9[10],auth[_0xc9b9[5]](),auth[_0xc9b9[7]]([19],[_0xc9b9[6]]),controller[_0xc9b9[11]]);router[_0xc9b9[13]](_0xc9b9[4],auth[_0xc9b9[5]](),auth[_0xc9b9[7]]([19],[_0xc9b9[6]]),controller[_0xc9b9[12]]);router[_0xc9b9[15]](_0xc9b9[10],auth[_0xc9b9[5]](),auth[_0xc9b9[7]]([19],[_0xc9b9[6]]),controller[_0xc9b9[14]]);router[_0xc9b9[13]](_0xc9b9[16],auth[_0xc9b9[5]](),auth[_0xc9b9[7]]([19],[_0xc9b9[6]]),controller[_0xc9b9[17]]);router[_0xc9b9[13]](_0xc9b9[18],auth[_0xc9b9[5]](),auth[_0xc9b9[7]]([19],[_0xc9b9[6]]),controller[_0xc9b9[19]]);router[_0xc9b9[21]](_0xc9b9[10],auth[_0xc9b9[5]](),auth[_0xc9b9[7]]([19],[_0xc9b9[6]]),controller[_0xc9b9[20]]);module[_0xc9b9[22]]= router
\ No newline at end of file
diff --git a/server/api/zendesk_configuration/zendesk_configuration.controller.js b/server/api/zendesk_configuration/zendesk_configuration.controller.js
index e299424..d931c77 100644
--- a/server/api/zendesk_configuration/zendesk_configuration.controller.js
+++ b/server/api/zendesk_configuration/zendesk_configuration.controller.js
@@ -1,181 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var ZendeskConfiguration = require('../../models').ZendeskConfiguration;
-var ZendeskField = require('../../models').ZendeskField;
-
-// Get list of zendesk_configurations
-exports.index = function(req, res) {
-  ZendeskConfiguration
-    .findAll({
-      where: req.query
-    })
-    .then(function(zendesk_configurations) {
-      return res.status(200).send(zendesk_configurations);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single zendesk_configuration
-exports.show = function(req, res) {
-  ZendeskConfiguration
-    .find({
-      where: {
-        id: req.params.id
-      },
-      include: [{
-        all: true
-      }]
-    })
-    .then(function(zendesk_configuration) {
-      if (!zendesk_configuration) {
-        return res.sendStatus(404);
-      }
-      return res.send(zendesk_configuration);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new zendesk_configuration in the DB.
-exports.create = function(req, res) {
-  ZendeskConfiguration
-    .create(req.body)
-    .then(function(zendesk_configuration) {
-      return res.status(201).send(zendesk_configuration);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing zendesk_configuration in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  ZendeskConfiguration
-    .findById(req.params.id)
-    .then(function(zendesk_configuration) {
-      if (!zendesk_configuration) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(zendesk_configuration, req.body);
-      updated.save()
-        .then(function() {
-          return res.status(200).send(zendesk_configuration);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a zendesk_configuration from the DB.
-exports.destroy = function(req, res) {
-  ZendeskConfiguration
-    .findById(req.params.id)
-    .then(function(zendesk_configuration) {
-      if (!zendesk_configuration) {
-        return res.sendStatus(404);
-      }
-      zendesk_configuration.destroy()
-        .then(function() {
-          return res.sendStatus(204);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-exports.addConfigurationField = function(req, res, next) {
-  // console.log(req.params);
-  ZendeskConfiguration
-    .findById(req.params.id)
-    .then(function(configuration) {
-      if (!configuration) {
-        return res.sendStatus(500);
-      }
-      ZendeskField
-        .create(req.body)
-        .then(function(field) {
-          switch (req.params.type) {
-            case 'subject':
-              configuration.addSubject(field)
-                .then(function() {
-                  return res.status(200).send(field);
-                })
-                .catch(function(err) {
-                  return handleError(res, err);
-                });
-              break;
-            case 'description':
-              configuration.addDescription(field)
-                .then(function() {
-                  return res.status(200).send(field);
-                })
-                .catch(function(err) {
-                  return handleError(res, err);
-                });
-              break;
-            case 'field':
-              configuration.addField(field)
-                .then(function() {
-                  return res.status(200).send(field);
-                })
-                .catch(function(err) {
-                  return handleError(res, err);
-                });
-              break;
-          }
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-          // return next(err);
-        });
-    })
-    .catch(function(err) {
-      // return next(err);
-      return handleError(res, err);
-    });
-};
-
-exports.addConfigurationTags = function(req, res, next) {
-  ZendeskConfiguration
-    .findById(req.params.id)
-    .then(handleEntityNotFound(res))
-    .then(function(configuration) {
-      return configuration.setTags(req.body);
-    })
-    .then(function(data) {
-      return res.sendStatus(200);
-    })
-    .catch(function(err) {
-      console.error(err);
-      return handleError(res, err);
-    });
-};
-
-function handleEntityNotFound(res) {
-  return function(entity) {
-    if (!entity) {
-      res.status(404).end();
-      return null;
-    }
-    return entity;
-  };
-}
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xf114=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x65\x73\x74\x72\x6F\x79","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x54\x61\x67\x73","\x65\x72\x72\x6F\x72","\x73\x65\x74\x54\x61\x67\x73","\x65\x6E\x64"];_0xf114[0];var _=require(_0xf114[1]);var ZendeskConfiguration=require(_0xf114[3])[_0xf114[2]];var ZendeskField=require(_0xf114[3])[_0xf114[4]];exports[_0xf114[5]]= function(_0x8249x4,_0x8249x5){ZendeskConfiguration[_0xf114[11]]({where:_0x8249x4[_0xf114[10]]})[_0xf114[9]](function(_0x8249x7){return _0x8249x5[_0xf114[8]](200)[_0xf114[7]](_0x8249x7)})[_0xf114[6]](function(_0x8249x6){return handleError(_0x8249x5,_0x8249x6)})};exports[_0xf114[12]]= function(_0x8249x4,_0x8249x5){ZendeskConfiguration[_0xf114[16]]({where:{id:_0x8249x4[_0xf114[15]][_0xf114[14]]},include:[{all:true}]})[_0xf114[9]](function(_0x8249x8){if(!_0x8249x8){return _0x8249x5[_0xf114[13]](404)};return _0x8249x5[_0xf114[7]](_0x8249x8)})[_0xf114[6]](function(_0x8249x6){return handleError(_0x8249x5,_0x8249x6)})};exports[_0xf114[17]]= function(_0x8249x4,_0x8249x5){ZendeskConfiguration[_0xf114[17]](_0x8249x4[_0xf114[18]])[_0xf114[9]](function(_0x8249x8){return _0x8249x5[_0xf114[8]](201)[_0xf114[7]](_0x8249x8)})[_0xf114[6]](function(_0x8249x6){return handleError(_0x8249x5,_0x8249x6)})};exports[_0xf114[19]]= function(_0x8249x4,_0x8249x5){if(_0x8249x4[_0xf114[18]][_0xf114[14]]){delete _0x8249x4[_0xf114[18]][_0xf114[14]]};ZendeskConfiguration[_0xf114[22]](_0x8249x4[_0xf114[15]][_0xf114[14]])[_0xf114[9]](function(_0x8249x8){if(!_0x8249x8){return _0x8249x5[_0xf114[13]](404)};var _0x8249x9=_[_0xf114[20]](_0x8249x8,_0x8249x4[_0xf114[18]]);_0x8249x9[_0xf114[21]]()[_0xf114[9]](function(){return _0x8249x5[_0xf114[8]](200)[_0xf114[7]](_0x8249x8)})[_0xf114[6]](function(_0x8249x6){return handleError(_0x8249x5,_0x8249x6)})})[_0xf114[6]](function(_0x8249x6){return handleError(_0x8249x5,_0x8249x6)})};exports[_0xf114[23]]= function(_0x8249x4,_0x8249x5){ZendeskConfiguration[_0xf114[22]](_0x8249x4[_0xf114[15]][_0xf114[14]])[_0xf114[9]](function(_0x8249x8){if(!_0x8249x8){return _0x8249x5[_0xf114[13]](404)};_0x8249x8[_0xf114[23]]()[_0xf114[9]](function(){return _0x8249x5[_0xf114[13]](204)})[_0xf114[6]](function(_0x8249x6){return handleError(_0x8249x5,_0x8249x6)})})[_0xf114[6]](function(_0x8249x6){return handleError(_0x8249x5,_0x8249x6)})};exports[_0xf114[24]]= function(_0x8249x4,_0x8249x5,_0x8249xa){ZendeskConfiguration[_0xf114[22]](_0x8249x4[_0xf114[15]][_0xf114[14]])[_0xf114[9]](function(_0x8249xb){if(!_0x8249xb){return _0x8249x5[_0xf114[13]](500)};ZendeskField[_0xf114[17]](_0x8249x4[_0xf114[18]])[_0xf114[9]](function(_0x8249xc){switch(_0x8249x4[_0xf114[15]][_0xf114[31]]){case _0xf114[26]:_0x8249xb[_0xf114[25]](_0x8249xc)[_0xf114[9]](function(){return _0x8249x5[_0xf114[8]](200)[_0xf114[7]](_0x8249xc)})[_0xf114[6]](function(_0x8249x6){return handleError(_0x8249x5,_0x8249x6)});break;case _0xf114[28]:_0x8249xb[_0xf114[27]](_0x8249xc)[_0xf114[9]](function(){return _0x8249x5[_0xf114[8]](200)[_0xf114[7]](_0x8249xc)})[_0xf114[6]](function(_0x8249x6){return handleError(_0x8249x5,_0x8249x6)});break;case _0xf114[30]:_0x8249xb[_0xf114[29]](_0x8249xc)[_0xf114[9]](function(){return _0x8249x5[_0xf114[8]](200)[_0xf114[7]](_0x8249xc)})[_0xf114[6]](function(_0x8249x6){return handleError(_0x8249x5,_0x8249x6)});break}})[_0xf114[6]](function(_0x8249x6){return handleError(_0x8249x5,_0x8249x6)})})[_0xf114[6]](function(_0x8249x6){return handleError(_0x8249x5,_0x8249x6)})};exports[_0xf114[32]]= function(_0x8249x4,_0x8249x5,_0x8249xa){ZendeskConfiguration[_0xf114[22]](_0x8249x4[_0xf114[15]][_0xf114[14]])[_0xf114[9]](handleEntityNotFound(_0x8249x5))[_0xf114[9]](function(_0x8249xb){return _0x8249xb[_0xf114[34]](_0x8249x4[_0xf114[18]])})[_0xf114[9]](function(_0x8249xd){return _0x8249x5[_0xf114[13]](200)})[_0xf114[6]](function(_0x8249x6){console[_0xf114[33]](_0x8249x6);return handleError(_0x8249x5,_0x8249x6)})};function handleEntityNotFound(_0x8249x5){return function(_0x8249xf){if(!_0x8249xf){_0x8249x5[_0xf114[8]](404)[_0xf114[35]]();return null};return _0x8249xf}}function handleError(_0x8249x5,_0x8249x6){return _0x8249x5[_0xf114[8]](500)[_0xf114[7]](_0x8249x6)}
\ No newline at end of file
diff --git a/server/api/zendesk_configuration/zendesk_configuration.events.js b/server/api/zendesk_configuration/zendesk_configuration.events.js
index f745627..0405ea8 100644
--- a/server/api/zendesk_configuration/zendesk_configuration.events.js
+++ b/server/api/zendesk_configuration/zendesk_configuration.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ZendeskConfiguration = require('../../models').ZendeskConfiguration;
-
-var ZendeskConfigurationEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ZendeskConfigurationEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ZendeskConfiguration.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ZendeskConfigurationEvents.emit(event + ':' + doc._id, doc);
-    ZendeskConfigurationEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ZendeskConfigurationEvents;
+var _0x152d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x152d[0];const EventEmitter=require(_0x152d[1]);const ZendeskConfiguration=require(_0x152d[3])[_0x152d[2]];var ZendeskConfigurationEvents= new EventEmitter();ZendeskConfigurationEvents[_0x152d[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x152d[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x152d[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x152d[6]};for(var e in events){var event=events[e];ZendeskConfiguration[_0x152d[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe8c4x8,_0xe8c4x9,_0xe8c4xa){ZendeskConfigurationEvents[_0x152d[10]](event+ _0x152d[8]+ _0xe8c4x8[_0x152d[9]],_0xe8c4x8);ZendeskConfigurationEvents[_0x152d[10]](event,_0xe8c4x8);_0xe8c4xa(null)}}module[_0x152d[11]]= ZendeskConfigurationEvents
\ No newline at end of file
diff --git a/server/api/zendesk_configuration/zendesk_configuration.socket.js b/server/api/zendesk_configuration/zendesk_configuration.socket.js
index e6e6b68..8bc5fac 100644
--- a/server/api/zendesk_configuration/zendesk_configuration.socket.js
+++ b/server/api/zendesk_configuration/zendesk_configuration.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const ZendeskConfigurationEvents = require('./zendesk_configuration.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('zendesk_configuration:' + event, socket);
-
-    ZendeskConfigurationEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ZendeskConfigurationEvents.removeListener(event, listener);
-  };
-}
+var _0xdaa3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xdaa3[0];const ZendeskConfigurationEvents=require(_0xdaa3[1]);var events=[_0xdaa3[2],_0xdaa3[3]];exports[_0xdaa3[4]]= function(_0x6b70x3){for(var _0x6b70x4=0,_0x6b70x5=events[_0xdaa3[5]];_0x6b70x4< _0x6b70x5;_0x6b70x4++){var _0x6b70x6=events[_0x6b70x4];var _0x6b70x7=createListener(_0xdaa3[6]+ _0x6b70x6,_0x6b70x3);ZendeskConfigurationEvents[_0xdaa3[7]](_0x6b70x6,_0x6b70x7);_0x6b70x3[_0xdaa3[7]](_0xdaa3[8],removeListener(_0x6b70x6,_0x6b70x7))}};function createListener(_0x6b70x6,_0x6b70x3){return function(_0x6b70x9){_0x6b70x3[_0xdaa3[9]](_0x6b70x6,_0x6b70x9)}}function removeListener(_0x6b70x6,_0x6b70x7){return function(){ZendeskConfigurationEvents[_0xdaa3[10]](_0x6b70x6,_0x6b70x7)}}
\ No newline at end of file
diff --git a/server/api/zendesk_field/index.js b/server/api/zendesk_field/index.js
index e84b58d..9c3998c 100644
--- a/server/api/zendesk_field/index.js
+++ b/server/api/zendesk_field/index.js
@@ -1,14 +1 @@
-'use strict';
-
-var express = require('express');
-var controller = require('./zendesk_field.controller');
-var auth = require('../../auth/auth.service');
-var router = express.Router();
-
-router.get('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.index);
-router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show);
-router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create);
-router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update);
-router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy);
-
-module.exports = router;
+var _0x8152=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x8152[0];var express=require(_0x8152[1]);var controller=require(_0x8152[2]);var auth=require(_0x8152[3]);var router=express.Router();router[_0x8152[9]](_0x8152[4],auth[_0x8152[5]](),auth[_0x8152[7]]([19],[_0x8152[6]]),controller[_0x8152[8]]);router[_0x8152[9]](_0x8152[10],auth[_0x8152[5]](),auth[_0x8152[7]]([19],[_0x8152[6]]),controller[_0x8152[11]]);router[_0x8152[13]](_0x8152[4],auth[_0x8152[5]](),auth[_0x8152[7]]([19],[_0x8152[6]]),controller[_0x8152[12]]);router[_0x8152[15]](_0x8152[10],auth[_0x8152[5]](),auth[_0x8152[7]]([19],[_0x8152[6]]),controller[_0x8152[14]]);router[_0x8152[17]](_0x8152[10],auth[_0x8152[5]](),auth[_0x8152[7]]([19],[_0x8152[6]]),controller[_0x8152[16]]);module[_0x8152[18]]= router
\ No newline at end of file
diff --git a/server/api/zendesk_field/zendesk_field.controller.js b/server/api/zendesk_field/zendesk_field.controller.js
index 48d0c38..ddc002c 100644
--- a/server/api/zendesk_field/zendesk_field.controller.js
+++ b/server/api/zendesk_field/zendesk_field.controller.js
@@ -1,93 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var ZendeskField = require('../../models').ZendeskField;
-
-// Get list of zendesk_fields
-exports.index = function(req, res) {
-  ZendeskField
-    .findAll()
-    .then(function(zendesk_fields) {
-      return res.status(200).send(zendesk_fields);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Get a single zendesk_field
-exports.show = function(req, res) {
-  ZendeskField
-    .findById(req.params.id)
-    .then(function(zendesk_field) {
-      if (!zendesk_field) {
-        return res.sendStatus(404);
-      }
-      return res.send(zendesk_field);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Creates a new zendesk_field in the DB.
-exports.create = function(req, res) {
-  ZendeskField
-    .create(req.body)
-    .then(function(zendesk_field) {
-      return res.status(201).send(zendesk_field);
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Updates an existing zendesk_field in the DB.
-exports.update = function(req, res) {
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  ZendeskField
-    .findById(req.params.id)
-    .then(function(zendesk_field) {
-      if (!zendesk_field) {
-        return res.sendStatus(404);
-      }
-      var updated = _.merge(zendesk_field, req.body);
-      updated.save()
-        .then(function() {
-          return res.status(200).send(zendesk_field);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-// Deletes a zendesk_field from the DB.
-exports.destroy = function(req, res) {
-  ZendeskField
-    .findById(req.params.id)
-    .then(function(zendesk_field) {
-      if (!zendesk_field) {
-        return res.sendStatus(404);
-      }
-      zendesk_field.destroy()
-        .then(function() {
-          return res.sendStatus(204);
-        })
-        .catch(function(err) {
-          return handleError(res, err);
-        });
-    })
-    .catch(function(err) {
-      return handleError(res, err);
-    });
-};
-
-function handleError(res, err) {
-  return res.status(500).send(err);
-}
+var _0xe6c6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xe6c6[0];var _=require(_0xe6c6[1]);var ZendeskField=require(_0xe6c6[3])[_0xe6c6[2]];exports[_0xe6c6[4]]= function(_0xe290x3,_0xe290x4){ZendeskField[_0xe6c6[9]]()[_0xe6c6[8]](function(_0xe290x6){return _0xe290x4[_0xe6c6[7]](200)[_0xe6c6[6]](_0xe290x6)})[_0xe6c6[5]](function(_0xe290x5){return handleError(_0xe290x4,_0xe290x5)})};exports[_0xe6c6[10]]= function(_0xe290x3,_0xe290x4){ZendeskField[_0xe6c6[14]](_0xe290x3[_0xe6c6[13]][_0xe6c6[12]])[_0xe6c6[8]](function(_0xe290x7){if(!_0xe290x7){return _0xe290x4[_0xe6c6[11]](404)};return _0xe290x4[_0xe6c6[6]](_0xe290x7)})[_0xe6c6[5]](function(_0xe290x5){return handleError(_0xe290x4,_0xe290x5)})};exports[_0xe6c6[15]]= function(_0xe290x3,_0xe290x4){ZendeskField[_0xe6c6[15]](_0xe290x3[_0xe6c6[16]])[_0xe6c6[8]](function(_0xe290x7){return _0xe290x4[_0xe6c6[7]](201)[_0xe6c6[6]](_0xe290x7)})[_0xe6c6[5]](function(_0xe290x5){return handleError(_0xe290x4,_0xe290x5)})};exports[_0xe6c6[17]]= function(_0xe290x3,_0xe290x4){if(_0xe290x3[_0xe6c6[16]][_0xe6c6[12]]){delete _0xe290x3[_0xe6c6[16]][_0xe6c6[12]]};ZendeskField[_0xe6c6[14]](_0xe290x3[_0xe6c6[13]][_0xe6c6[12]])[_0xe6c6[8]](function(_0xe290x7){if(!_0xe290x7){return _0xe290x4[_0xe6c6[11]](404)};var _0xe290x8=_[_0xe6c6[18]](_0xe290x7,_0xe290x3[_0xe6c6[16]]);_0xe290x8[_0xe6c6[19]]()[_0xe6c6[8]](function(){return _0xe290x4[_0xe6c6[7]](200)[_0xe6c6[6]](_0xe290x7)})[_0xe6c6[5]](function(_0xe290x5){return handleError(_0xe290x4,_0xe290x5)})})[_0xe6c6[5]](function(_0xe290x5){return handleError(_0xe290x4,_0xe290x5)})};exports[_0xe6c6[20]]= function(_0xe290x3,_0xe290x4){ZendeskField[_0xe6c6[14]](_0xe290x3[_0xe6c6[13]][_0xe6c6[12]])[_0xe6c6[8]](function(_0xe290x7){if(!_0xe290x7){return _0xe290x4[_0xe6c6[11]](404)};_0xe290x7[_0xe6c6[20]]()[_0xe6c6[8]](function(){return _0xe290x4[_0xe6c6[11]](204)})[_0xe6c6[5]](function(_0xe290x5){return handleError(_0xe290x4,_0xe290x5)})})[_0xe6c6[5]](function(_0xe290x5){return handleError(_0xe290x4,_0xe290x5)})};function handleError(_0xe290x4,_0xe290x5){return _0xe290x4[_0xe6c6[7]](500)[_0xe6c6[6]](_0xe290x5)}
\ No newline at end of file
diff --git a/server/api/zendesk_field/zendesk_field.events.js b/server/api/zendesk_field/zendesk_field.events.js
index 3b68978..325b936 100644
--- a/server/api/zendesk_field/zendesk_field.events.js
+++ b/server/api/zendesk_field/zendesk_field.events.js
@@ -1,36 +1 @@
-/**
- * Thing model events
- */
-
-'use strict';
-
-const EventEmitter = require('events');
-const ZendeskField = require('../../models').ZendeskField;
-
-var ZendeskFieldEvents = new EventEmitter();
-
-// Set max event listeners (0 == unlimited)
-ZendeskFieldEvents.setMaxListeners(0);
-
-// Model events
-var events = {
-  'afterCreate': 'save',
-  'afterUpdate': 'save',
-  'afterDestroy': 'remove'
-};
-
-// Register the event emitter to the model events
-for (var e in events) {
-  var event = events[e];
-  ZendeskField.hook(e, emitEvent(event));
-}
-
-function emitEvent(event) {
-  return function(doc, options, done) {
-    ZendeskFieldEvents.emit(event + ':' + doc._id, doc);
-    ZendeskFieldEvents.emit(event, doc);
-    done(null);
-  }
-}
-
-module.exports = ZendeskFieldEvents;
+var _0x1720=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x1720[0];const EventEmitter=require(_0x1720[1]);const ZendeskField=require(_0x1720[3])[_0x1720[2]];var ZendeskFieldEvents= new EventEmitter();ZendeskFieldEvents[_0x1720[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x1720[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x1720[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x1720[6]};for(var e in events){var event=events[e];ZendeskField[_0x1720[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x49b7x8,_0x49b7x9,_0x49b7xa){ZendeskFieldEvents[_0x1720[10]](event+ _0x1720[8]+ _0x49b7x8[_0x1720[9]],_0x49b7x8);ZendeskFieldEvents[_0x1720[10]](event,_0x49b7x8);_0x49b7xa(null)}}module[_0x1720[11]]= ZendeskFieldEvents
\ No newline at end of file
diff --git a/server/api/zendesk_field/zendesk_field.socket.js b/server/api/zendesk_field/zendesk_field.socket.js
index 891c45b..811bdbc 100644
--- a/server/api/zendesk_field/zendesk_field.socket.js
+++ b/server/api/zendesk_field/zendesk_field.socket.js
@@ -1,32 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-const ZendeskFieldEvents = require('./zendesk_field.events');
-
-// Model events to emit
-var events = ['save', 'remove'];
-
-exports.register = function(socket) {
-  for (var i = 0, eventsLength = events.length; i < eventsLength; i++) {
-    var event = events[i];
-    var listener = createListener('zendesk_field:' + event, socket);
-
-    ZendeskFieldEvents.on(event, listener);
-    socket.on('disconnect', removeListener(event, listener));
-  }
-}
-
-function createListener(event, socket) {
-  return function(doc) {
-    socket.emit(event, doc);
-  };
-}
-
-function removeListener(event, listener) {
-  return function() {
-    ZendeskFieldEvents.removeListener(event, listener);
-  };
-}
+var _0x1f01=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x1f01[0];const ZendeskFieldEvents=require(_0x1f01[1]);var events=[_0x1f01[2],_0x1f01[3]];exports[_0x1f01[4]]= function(_0x6bd2x3){for(var _0x6bd2x4=0,_0x6bd2x5=events[_0x1f01[5]];_0x6bd2x4< _0x6bd2x5;_0x6bd2x4++){var _0x6bd2x6=events[_0x6bd2x4];var _0x6bd2x7=createListener(_0x1f01[6]+ _0x6bd2x6,_0x6bd2x3);ZendeskFieldEvents[_0x1f01[7]](_0x6bd2x6,_0x6bd2x7);_0x6bd2x3[_0x1f01[7]](_0x1f01[8],removeListener(_0x6bd2x6,_0x6bd2x7))}};function createListener(_0x6bd2x6,_0x6bd2x3){return function(_0x6bd2x9){_0x6bd2x3[_0x1f01[9]](_0x6bd2x6,_0x6bd2x9)}}function removeListener(_0x6bd2x6,_0x6bd2x7){return function(){ZendeskFieldEvents[_0x1f01[10]](_0x6bd2x6,_0x6bd2x7)}}
\ No newline at end of file
diff --git a/server/app.js b/server/app.js
index 9fcfe6a..97260fd 100644
--- a/server/app.js
+++ b/server/app.js
@@ -1,135 +1 @@
-'use strict';
-
-/**
- * Main application file
- */
-
-
-// Set default node environment to development
-process.env.NODE_ENV = process.env.NODE_ENV || 'development';
-process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0;
-
-process.on('uncaughtException', function(err) {
-  if (typeof err === 'object') {
-    if (err.message) {
-      console.log('\nMessage: ' + err.message)
-    }
-    if (err.stack) {
-      console.log('\nStacktrace:')
-      console.log('====================')
-      console.log(err.stack);
-    }
-  } else {
-    console.log('dumpError :: argument is not an object');
-  }
-});
-
-var os = require('os');
-var http = require('http');
-var util = require('util');
-var crypto = require('crypto');
-var cronjob = require('cron').CronJob;
-var shelljs = require('shelljs/global');
-var sticky = require('sticky-session');
-
-var express = require('express');
-var config = require('./config/environment');
-var models = require('./models');
-
-var sio = require('socket.io');
-var sio_redis = require('socket.io-redis');
-
-var heapdump = require('heapdump');
-var nextMBThreeshold = 0;
-setInterval(function() {
-  var memMB = process.memoryUsage().rss / 1048576;
-  if (memMB >= nextMBThreeshold) {
-    heapdump.writeSnapshot('/var/local/xcally/' + Date.now() + '.heapsnapshot');
-    nextMBThreeshold += 100;
-  }
-}, 6000 * 2);
-
-// Setup server
-var app = express();
-var server = http.createServer(app);
-
-// Start server
-server.listen(config.port, config.ip, function() {
-  console.log('Express server listening on %d, in %s mode', config.port, app.get('env'));
-});
-
-var io = sio(server, {
-  serveClient: (config.env === 'production') ? false : true,
-  path: '/socket.io-client'
-});
-
-if (config.redisPwd) {
-  var redis = require('redis').createClient;
-  var pub = redis(6379, config.ip, {
-    password: config.redisPwd
-  });
-  var sub = redis(6379, config.ip, {
-    return_buffers: true,
-    password: config.redisPwd
-  });
-  io.adapter(sio_redis({
-    pubClient: pub,
-    subClient: sub
-  }));
-} else {
-  io.adapter(sio_redis({
-    host: config.ip,
-    port: 6379
-  }));
-}
-
-require('./config/express')(app);
-
-models
-  .sequelize
-  .sync()
-  .then(function() {
-
-    // Populate DB Develop with sample data
-    if (config.seedDB) {
-      require('./config/seed');
-    }
-    // Populate DB Production with sample data
-    if (config.seedPDB) {
-      require('./config/seedp');
-    }
-
-    var cpAmi = require('./config/ami');
-
-    require('./routes')(app, cpAmi);
-    require('./services/dashboard')(cpAmi)
-    require('./config/socketio')(io);
-    require('./config/automations/mail')();
-    require('./config/automations/fax')();
-    require('./config/automations/chat')();
-    require('./config/triggers')(cpAmi);
-    require('./config/scheduler')();
-    require('./config/imap')();
-    require('./config/smtp')();
-    require('./config/sms')();
-    require('./config/chat')();
-    require('./config/openchannel')();
-    require('./config/tools')();
-    require('./config/agi')();
-    require('./config/license')();
-  })
-  .then(function() {
-    // Connect to database history
-    return models
-      .sequelize_history
-      .sync();
-  })
-  .then(function() {
-    require('./config/history/history')(cronjob);
-  })
-  .catch(function(err) {
-    console.error(err);
-  });
-
-// Expose app
-exports = module.exports = app;
+var _0xc05e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4E\x4F\x44\x45\x5F\x45\x4E\x56","\x65\x6E\x76","\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x4E\x4F\x44\x45\x5F\x54\x4C\x53\x5F\x52\x45\x4A\x45\x43\x54\x5F\x55\x4E\x41\x55\x54\x48\x4F\x52\x49\x5A\x45\x44","\x75\x6E\x63\x61\x75\x67\x68\x74\x45\x78\x63\x65\x70\x74\x69\x6F\x6E","\x6F\x62\x6A\x65\x63\x74","\x6D\x65\x73\x73\x61\x67\x65","\x0A\x4D\x65\x73\x73\x61\x67\x65\x3A\x20","\x6C\x6F\x67","\x73\x74\x61\x63\x6B","\x0A\x53\x74\x61\x63\x6B\x74\x72\x61\x63\x65\x3A","\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D","\x64\x75\x6D\x70\x45\x72\x72\x6F\x72\x20\x3A\x3A\x20\x61\x72\x67\x75\x6D\x65\x6E\x74\x20\x69\x73\x20\x6E\x6F\x74\x20\x61\x6E\x20\x6F\x62\x6A\x65\x63\x74","\x6F\x6E","\x6F\x73","\x68\x74\x74\x70","\x75\x74\x69\x6C","\x63\x72\x79\x70\x74\x6F","\x43\x72\x6F\x6E\x4A\x6F\x62","\x63\x72\x6F\x6E","\x73\x68\x65\x6C\x6C\x6A\x73\x2F\x67\x6C\x6F\x62\x61\x6C","\x73\x74\x69\x63\x6B\x79\x2D\x73\x65\x73\x73\x69\x6F\x6E","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x72\x65\x64\x69\x73","\x68\x65\x61\x70\x64\x75\x6D\x70","\x72\x73\x73","\x6D\x65\x6D\x6F\x72\x79\x55\x73\x61\x67\x65","\x2F\x76\x61\x72\x2F\x6C\x6F\x63\x61\x6C\x2F\x78\x63\x61\x6C\x6C\x79\x2F","\x6E\x6F\x77","\x2E\x68\x65\x61\x70\x73\x6E\x61\x70\x73\x68\x6F\x74","\x77\x72\x69\x74\x65\x53\x6E\x61\x70\x73\x68\x6F\x74","\x63\x72\x65\x61\x74\x65\x53\x65\x72\x76\x65\x72","\x70\x6F\x72\x74","\x69\x70","\x45\x78\x70\x72\x65\x73\x73\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x25\x64\x2C\x20\x69\x6E\x20\x25\x73\x20\x6D\x6F\x64\x65","\x67\x65\x74","\x6C\x69\x73\x74\x65\x6E","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x2F\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x63\x6C\x69\x65\x6E\x74","\x72\x65\x64\x69\x73\x50\x77\x64","\x63\x72\x65\x61\x74\x65\x43\x6C\x69\x65\x6E\x74","\x72\x65\x64\x69\x73","\x61\x64\x61\x70\x74\x65\x72","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x78\x70\x72\x65\x73\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x68\x69\x73\x74\x6F\x72\x79\x2F\x68\x69\x73\x74\x6F\x72\x79","\x74\x68\x65\x6E","\x73\x79\x6E\x63","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x73\x65\x65\x64\x44\x42","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x65\x65\x64","\x73\x65\x65\x64\x50\x44\x42","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x65\x65\x64\x70","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x6D\x69","\x2E\x2F\x72\x6F\x75\x74\x65\x73","\x2E\x2F\x73\x65\x72\x76\x69\x63\x65\x73\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x6F\x63\x6B\x65\x74\x69\x6F","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73\x2F\x6D\x61\x69\x6C","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73\x2F\x66\x61\x78","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73\x2F\x63\x68\x61\x74","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x72\x69\x67\x67\x65\x72\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x69\x6D\x61\x70","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x6D\x74\x70","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x6D\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x63\x68\x61\x74","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x6F\x6F\x6C\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x67\x69","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc05e[0];process[_0xc05e[2]][_0xc05e[1]]= process[_0xc05e[2]][_0xc05e[1]]|| _0xc05e[3];process[_0xc05e[2]][_0xc05e[4]]= 0;process[_0xc05e[14]](_0xc05e[5],function(_0xa7f4x1){if( typeof _0xa7f4x1=== _0xc05e[6]){if(_0xa7f4x1[_0xc05e[7]]){console[_0xc05e[9]](_0xc05e[8]+ _0xa7f4x1[_0xc05e[7]])};if(_0xa7f4x1[_0xc05e[10]]){console[_0xc05e[9]](_0xc05e[11]);console[_0xc05e[9]](_0xc05e[12]);console[_0xc05e[9]](_0xa7f4x1[_0xc05e[10]])}}else {console[_0xc05e[9]](_0xc05e[13])}});var os=require(_0xc05e[15]);var http=require(_0xc05e[16]);var util=require(_0xc05e[17]);var crypto=require(_0xc05e[18]);var cronjob=require(_0xc05e[20])[_0xc05e[19]];var shelljs=require(_0xc05e[21]);var sticky=require(_0xc05e[22]);var express=require(_0xc05e[23]);var config=require(_0xc05e[24]);var models=require(_0xc05e[25]);var sio=require(_0xc05e[26]);var sio_redis=require(_0xc05e[27]);var heapdump=require(_0xc05e[28]);var nextMBThreeshold=0;setInterval(function(){var _0xa7f4x10=process[_0xc05e[30]]()[_0xc05e[29]]/ 1048576;if(_0xa7f4x10>= nextMBThreeshold){heapdump[_0xc05e[34]](_0xc05e[31]+ Date[_0xc05e[32]]()+ _0xc05e[33]);nextMBThreeshold+= 100}},6000* 2);var app=express();var server=http[_0xc05e[35]](app);server[_0xc05e[40]](config[_0xc05e[36]],config[_0xc05e[37]],function(){console[_0xc05e[9]](_0xc05e[38],config[_0xc05e[36]],app[_0xc05e[39]](_0xc05e[2]))});var io=sio(server,{serveClient:(config[_0xc05e[2]]=== _0xc05e[41])?false:true,path:_0xc05e[42]});if(config[_0xc05e[43]]){var redis=require(_0xc05e[45])[_0xc05e[44]];var pub=redis(6379,config[_0xc05e[37]],{password:config[_0xc05e[43]]});var sub=redis(6379,config[_0xc05e[37]],{return_buffers:true,password:config[_0xc05e[43]]});io[_0xc05e[46]](sio_redis({pubClient:pub,subClient:sub}))}else {io[_0xc05e[46]](sio_redis({host:config[_0xc05e[37]],port:6379}))};require(_0xc05e[47])(app);models[_0xc05e[75]][_0xc05e[52]]()[_0xc05e[51]](function(){if(config[_0xc05e[54]]){require(_0xc05e[55])};if(config[_0xc05e[56]]){require(_0xc05e[57])};var _0xa7f4x17=require(_0xc05e[58]);require(_0xc05e[59])(app,_0xa7f4x17);require(_0xc05e[60])(_0xa7f4x17);require(_0xc05e[61])(io);require(_0xc05e[62])();require(_0xc05e[63])();require(_0xc05e[64])();require(_0xc05e[65])(_0xa7f4x17,io);require(_0xc05e[66])();require(_0xc05e[67])();require(_0xc05e[68])();require(_0xc05e[69])();require(_0xc05e[70])();require(_0xc05e[71])();require(_0xc05e[72])();require(_0xc05e[73])();require(_0xc05e[74])()})[_0xc05e[51]](function(){return models[_0xc05e[53]][_0xc05e[52]]()})[_0xc05e[51]](function(){require(_0xc05e[50])(cronjob)})[_0xc05e[49]](function(_0xa7f4x1){console[_0xc05e[48]](_0xa7f4x1)});exports= module[_0xc05e[76]]= app
\ No newline at end of file
diff --git a/server/auth/auth.service.js b/server/auth/auth.service.js
index e82ba59..dd46822 100644
--- a/server/auth/auth.service.js
+++ b/server/auth/auth.service.js
@@ -1,150 +1 @@
-'use strict';
-
-//var mongoose = require('mongoose');
-var passport = require('passport');
-var config = require('../config/environment');
-var jwt = require('jsonwebtoken');
-var expressJwt = require('express-jwt');
-var compose = require('composable-middleware');
-// var User = require('../api/user/user.model');
-var User = require('../models').User;
-var List = require('../models').List;
-var validateJwt = expressJwt({
-  secret: config.session.secret
-});
-var Promise = require('bluebird');
-var _ = require('lodash');
-
-/**
- * Attaches the user object to the request if authenticated
- * Otherwise returns 403
- */
-function isAuthenticated() {
-  return compose()
-    // Validate jwt
-    .use(function(req, res, next) {
-      // allow access_token to be passed through query parameter as well
-      if (req.query && req.query.hasOwnProperty('access_token')) {
-        req.headers.authorization = 'Bearer ' + req.query.access_token;
-      }
-      if (req.headers && req.headers.authorization && _.startsWith(req.headers.authorization, 'Basic')) {
-        var arrAuth = _.split(req.headers.authorization, ' ');
-        var authString = new Buffer(arrAuth[1], 'base64').toString("ascii");
-        var username = _.split(authString, ':')[0];
-        var pwd = _.split(authString, ':')[1];
-        return User.findOne({
-            where: {
-              name: username
-            }
-          })
-          .then(function(user) {
-            if (!user || !user.authenticate(pwd)) {
-              next(new Error('Wrong credentials.'));
-            }
-            req.user = {
-              id: user.id
-            };
-            next();
-          })
-      } else {
-        validateJwt(req, res, next);
-      }
-    })
-    // Attach user to request
-    .use(function(req, res, next) {
-      User
-        .findById(req.user.id, {
-          include: [{
-            model: List
-          }]
-        })
-        .then(function(user) {
-          if (!user) return res.sendStatus(401);
-          req.user = user;
-          return next();
-        })
-        .catch(function(err) {
-          return next(err);
-        });
-    });
-}
-
-/**
- * Checks if the module meets the requirements
- */
-function hasModule(modules, roles) {
-  return compose()
-    .use(function(req, res, next) {
-      return User
-        .findById(req.user.id)
-        .then(function(user) {
-          var bulkModule = [];
-          modules.forEach(function(element) {
-            bulkModule.push(user.hasModule(element));
-          });
-          return Promise.all(bulkModule);
-        })
-        .then(function(hasModuleArr) {
-          var hasModule = (_.reduce(hasModuleArr, function(total, n) {
-            return total || n;
-          }));
-          if (_.includes(roles, req.user.role) || hasModule) {
-            return next();
-          } else {
-            res.sendStatus(403);
-          }
-        })
-        .catch(function(err) {
-          return next(err);
-        });
-    });
-}
-
-/**
- * Checks if the user role meets the minimum requirements of the route
- */
-function hasRole(roleRequired) {
-  if (!roleRequired) throw new Error('Required role needs to be set');
-
-  return compose()
-    .use(isAuthenticated())
-    .use(function meetsRequirements(req, res, next) {
-      if (config.userRoles.indexOf(req.user.role) >= config.userRoles.indexOf(roleRequired)) {
-        return next();
-      } else {
-        return res.sendStatus(403);
-      }
-    });
-}
-
-/**
- * Returns a jwt token signed by the app secret
- */
-function signToken(id, role, remember) {
-  var expiresIn = 60 * 24 * 365 * 5; //If remember, it expires in 5 years
-  if (!remember)
-    expiresIn = "1d"; //Expire in one day
-  return jwt.sign({
-    id: id
-  }, config.session.secret, {
-    expiresIn: expiresIn
-  });
-}
-
-/**
- * Set token cookie directly for oAuth strategies
- */
-function setTokenCookie(req, res) {
-  if (!req.user) return res.json(404, {
-    message: 'Something went wrong, please try again.'
-  });
-  var token = signToken(req.user.id, req.user.role);
-  res.cookie('token', JSON.stringify(token));
-  res.redirect('/');
-}
-
-exports.isAuthenticated = isAuthenticated;
-exports.hasRole = hasRole;
-exports.hasModule = hasModule;
-exports.signToken = signToken;
-exports.setTokenCookie = setTokenCookie;
+var _0x267f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x73\x6F\x6E\x77\x65\x62\x74\x6F\x6B\x65\x6E","\x65\x78\x70\x72\x65\x73\x73\x2D\x6A\x77\x74","\x63\x6F\x6D\x70\x6F\x73\x61\x62\x6C\x65\x2D\x6D\x69\x64\x64\x6C\x65\x77\x61\x72\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4C\x69\x73\x74","\x73\x65\x63\x72\x65\x74","\x73\x65\x73\x73\x69\x6F\x6E","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x75\x73\x65\x72","\x74\x68\x65\x6E","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65","\x71\x75\x65\x72\x79","\x61\x63\x63\x65\x73\x73\x5F\x74\x6F\x6B\x65\x6E","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x61\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x68\x65\x61\x64\x65\x72\x73","\x42\x65\x61\x72\x65\x72\x20","\x42\x61\x73\x69\x63","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x20","\x73\x70\x6C\x69\x74","\x61\x73\x63\x69\x69","\x62\x61\x73\x65\x36\x34","\x3A","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73\x2E","\x66\x69\x6E\x64\x4F\x6E\x65","\x72\x65\x64\x75\x63\x65","\x72\x6F\x6C\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C","\x52\x65\x71\x75\x69\x72\x65\x64\x20\x72\x6F\x6C\x65\x20\x6E\x65\x65\x64\x73\x20\x74\x6F\x20\x62\x65\x20\x73\x65\x74","\x69\x6E\x64\x65\x78\x4F\x66","\x75\x73\x65\x72\x52\x6F\x6C\x65\x73","\x31\x64","\x73\x69\x67\x6E","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x77\x65\x6E\x74\x20\x77\x72\x6F\x6E\x67\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x74\x72\x79\x20\x61\x67\x61\x69\x6E\x2E","\x6A\x73\x6F\x6E","\x74\x6F\x6B\x65\x6E","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x63\x6F\x6F\x6B\x69\x65","\x2F","\x72\x65\x64\x69\x72\x65\x63\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x52\x6F\x6C\x65","\x73\x69\x67\x6E\x54\x6F\x6B\x65\x6E","\x73\x65\x74\x54\x6F\x6B\x65\x6E\x43\x6F\x6F\x6B\x69\x65"];_0x267f[0];var passport=require(_0x267f[1]);var config=require(_0x267f[2]);var jwt=require(_0x267f[3]);var expressJwt=require(_0x267f[4]);var compose=require(_0x267f[5]);var User=require(_0x267f[7])[_0x267f[6]];var List=require(_0x267f[7])[_0x267f[8]];var validateJwt=expressJwt({secret:config[_0x267f[10]][_0x267f[9]]});var Promise=require(_0x267f[11]);var _=require(_0x267f[12]);function isAuthenticated(){return compose()[_0x267f[19]](function(_0x7020xc,_0x7020xd,_0x7020xe){if(_0x7020xc[_0x267f[20]]&& _0x7020xc[_0x267f[20]][_0x267f[22]](_0x267f[21])){_0x7020xc[_0x267f[24]][_0x267f[23]]= _0x267f[25]+ _0x7020xc[_0x267f[20]][_0x267f[21]]};if(_0x7020xc[_0x267f[24]]&& _0x7020xc[_0x267f[24]][_0x267f[23]]&& _[_0x267f[27]](_0x7020xc[_0x267f[24]][_0x267f[23]],_0x267f[26])){var _0x7020x11=_[_0x267f[29]](_0x7020xc[_0x267f[24]][_0x267f[23]],_0x267f[28]);var _0x7020x12= new Buffer(_0x7020x11[1],_0x267f[31]).toString(_0x267f[30]);var _0x7020x13=_[_0x267f[29]](_0x7020x12,_0x267f[32])[0];var _0x7020x14=_[_0x267f[29]](_0x7020x12,_0x267f[32])[1];return User[_0x267f[35]]({where:{name:_0x7020x13}})[_0x267f[16]](function(_0x7020x10){if(!_0x7020x10|| !_0x7020x10[_0x267f[33]](_0x7020x14)){_0x7020xe( new Error(_0x267f[34]))};_0x7020xc[_0x267f[15]]= {id:_0x7020x10[_0x267f[17]]};_0x7020xe()})}else {validateJwt(_0x7020xc,_0x7020xd,_0x7020xe)}})[_0x267f[19]](function(_0x7020xc,_0x7020xd,_0x7020xe){User[_0x267f[18]](_0x7020xc[_0x267f[15]][_0x267f[17]],{include:[{model:List}]})[_0x267f[16]](function(_0x7020x10){if(!_0x7020x10){return _0x7020xd[_0x267f[14]](401)};_0x7020xc[_0x267f[15]]= _0x7020x10;return _0x7020xe()})[_0x267f[13]](function(_0x7020xf){return _0x7020xe(_0x7020xf)})})}function hasModule(_0x7020x16,_0x7020x17){return compose()[_0x267f[19]](function(_0x7020xc,_0x7020xd,_0x7020xe){return User[_0x267f[18]](_0x7020xc[_0x267f[15]][_0x267f[17]])[_0x267f[16]](function(_0x7020x10){var _0x7020x1b=[];_0x7020x16[_0x267f[41]](function(_0x7020x1c){_0x7020x1b[_0x267f[40]](_0x7020x10[_0x267f[39]](_0x7020x1c))});return Promise[_0x267f[42]](_0x7020x1b)})[_0x267f[16]](function(_0x7020x18){var hasModule=(_[_0x267f[36]](_0x7020x18,function(_0x7020x19,_0x7020x1a){return _0x7020x19|| _0x7020x1a}));if(_[_0x267f[38]](_0x7020x17,_0x7020xc[_0x267f[15]][_0x267f[37]])|| hasModule){return _0x7020xe()}else {_0x7020xd[_0x267f[14]](403)}})[_0x267f[13]](function(_0x7020xf){return _0x7020xe(_0x7020xf)})})}function hasRole(_0x7020x1e){if(!_0x7020x1e){throw  new Error(_0x267f[43])};return compose()[_0x267f[19]](isAuthenticated())[_0x267f[19]](function _0x7020x1f(_0x7020xc,_0x7020xd,_0x7020xe){if(config[_0x267f[45]][_0x267f[44]](_0x7020xc[_0x267f[15]][_0x267f[37]])>= config[_0x267f[45]][_0x267f[44]](_0x7020x1e)){return _0x7020xe()}else {return _0x7020xd[_0x267f[14]](403)}})}function signToken(_0x7020x21,_0x7020x22,_0x7020x23){var _0x7020x24=60* 24* 365* 5;if(!_0x7020x23){_0x7020x24= _0x267f[46]};return jwt[_0x267f[47]]({id:_0x7020x21},config[_0x267f[10]][_0x267f[9]],{expiresIn:_0x7020x24})}function setTokenCookie(_0x7020xc,_0x7020xd){if(!_0x7020xc[_0x267f[15]]){return _0x7020xd[_0x267f[49]](404,{message:_0x267f[48]})};var _0x7020x26=signToken(_0x7020xc[_0x267f[15]][_0x267f[17]],_0x7020xc[_0x267f[15]][_0x267f[37]]);_0x7020xd[_0x267f[52]](_0x267f[50],JSON[_0x267f[51]](_0x7020x26));_0x7020xd[_0x267f[54]](_0x267f[53])}exports[_0x267f[55]]= isAuthenticated;exports[_0x267f[56]]= hasRole;exports[_0x267f[39]]= hasModule;exports[_0x267f[57]]= signToken;exports[_0x267f[58]]= setTokenCookie
\ No newline at end of file
diff --git a/server/auth/facebook/index.js b/server/auth/facebook/index.js
index 4a6f878..e7423e7 100644
--- a/server/auth/facebook/index.js
+++ b/server/auth/facebook/index.js
@@ -1,21 +1 @@
-'use strict';
-
-var express = require('express');
-var passport = require('passport');
-var auth = require('../auth.service');
-
-var router = express.Router();
-
-router
-  .get('/', passport.authenticate('facebook', {
-    scope: ['email', 'user_about_me'],
-    failureRedirect: '/signup',
-    session: false
-  }))
-
-  .get('/callback', passport.authenticate('facebook', {
-    failureRedirect: '/signup',
-    session: false
-  }), auth.setTokenCookie);
-
-module.exports = router;
\ No newline at end of file
+var _0x3b6b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x66\x61\x63\x65\x62\x6F\x6F\x6B","\x2F\x73\x69\x67\x6E\x75\x70","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x73\x65\x74\x54\x6F\x6B\x65\x6E\x43\x6F\x6F\x6B\x69\x65","\x67\x65\x74","\x2F","\x65\x6D\x61\x69\x6C","\x75\x73\x65\x72\x5F\x61\x62\x6F\x75\x74\x5F\x6D\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3b6b[0];var express=require(_0x3b6b[1]);var passport=require(_0x3b6b[2]);var auth=require(_0x3b6b[3]);var router=express.Router();router[_0x3b6b[9]](_0x3b6b[10],passport[_0x3b6b[7]](_0x3b6b[5],{scope:[_0x3b6b[11],_0x3b6b[12]],failureRedirect:_0x3b6b[6],session:false}))[_0x3b6b[9]](_0x3b6b[4],passport[_0x3b6b[7]](_0x3b6b[5],{failureRedirect:_0x3b6b[6],session:false}),auth[_0x3b6b[8]]);module[_0x3b6b[13]]= router
\ No newline at end of file
diff --git a/server/auth/facebook/passport.js b/server/auth/facebook/passport.js
index 90ae489..dd900c5 100644
--- a/server/auth/facebook/passport.js
+++ b/server/auth/facebook/passport.js
@@ -1,37 +1 @@
-var passport = require('passport');
-var FacebookStrategy = require('passport-facebook').Strategy;
-
-exports.setup = function (User, config) {
-  passport.use(new FacebookStrategy({
-      clientID: config.facebook.clientID,
-      clientSecret: config.facebook.clientSecret,
-      callbackURL: config.facebook.callbackURL
-    },
-    function(accessToken, refreshToken, profile, done) {
-      User.findOne({
-        'facebook.id': profile.id
-      },
-      function(err, user) {
-        if (err) {
-          return done(err);
-        }
-        if (!user) {
-          user = new User({
-            name: profile.displayName,
-            email: profile.emails[0].value,
-            role: 'user',
-            username: profile.username,
-            provider: 'facebook',
-            facebook: profile._json
-          });
-          user.save(function(err) {
-            if (err) done(err);
-            return done(err, user);
-          });
-        } else {
-          return done(err, user);
-        }
-      })
-    }
-  ));
-};
\ No newline at end of file
+var _0xe85f=["\x70\x61\x73\x73\x70\x6F\x72\x74","\x53\x74\x72\x61\x74\x65\x67\x79","\x70\x61\x73\x73\x70\x6F\x72\x74\x2D\x66\x61\x63\x65\x62\x6F\x6F\x6B","\x73\x65\x74\x75\x70","\x63\x6C\x69\x65\x6E\x74\x49\x44","\x66\x61\x63\x65\x62\x6F\x6F\x6B","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x55\x52\x4C","\x69\x64","\x64\x69\x73\x70\x6C\x61\x79\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x65\x6D\x61\x69\x6C\x73","\x75\x73\x65\x72","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x5F\x6A\x73\x6F\x6E","\x73\x61\x76\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x73\x65"];var passport=require(_0xe85f[0]);var FacebookStrategy=require(_0xe85f[2])[_0xe85f[1]];exports[_0xe85f[3]]= function(_0x3fb9x3,_0x3fb9x4){passport[_0xe85f[17]]( new FacebookStrategy({clientID:_0x3fb9x4[_0xe85f[5]][_0xe85f[4]],clientSecret:_0x3fb9x4[_0xe85f[5]][_0xe85f[6]],callbackURL:_0x3fb9x4[_0xe85f[5]][_0xe85f[7]]},function(_0x3fb9x5,_0x3fb9x6,_0x3fb9x7,_0x3fb9x8){_0x3fb9x3[_0xe85f[16]]({"\x66\x61\x63\x65\x62\x6F\x6F\x6B\x2E\x69\x64":_0x3fb9x7[_0xe85f[8]]},function(_0x3fb9x9,_0x3fb9xa){if(_0x3fb9x9){return _0x3fb9x8(_0x3fb9x9)};if(!_0x3fb9xa){_0x3fb9xa=  new _0x3fb9x3({name:_0x3fb9x7[_0xe85f[9]],email:_0x3fb9x7[_0xe85f[11]][0][_0xe85f[10]],role:_0xe85f[12],username:_0x3fb9x7[_0xe85f[13]],provider:_0xe85f[5],facebook:_0x3fb9x7[_0xe85f[14]]});_0x3fb9xa[_0xe85f[15]](function(_0x3fb9x9){if(_0x3fb9x9){_0x3fb9x8(_0x3fb9x9)};return _0x3fb9x8(_0x3fb9x9,_0x3fb9xa)})}else {return _0x3fb9x8(_0x3fb9x9,_0x3fb9xa)}})}))}
\ No newline at end of file
diff --git a/server/auth/google/index.js b/server/auth/google/index.js
index 9b1ce39..639d3b8 100644
--- a/server/auth/google/index.js
+++ b/server/auth/google/index.js
@@ -1,24 +1 @@
-'use strict';
-
-var express = require('express');
-var passport = require('passport');
-var auth = require('../auth.service');
-
-var router = express.Router();
-
-router
-  .get('/', passport.authenticate('google', {
-    failureRedirect: '/signup',
-    scope: [
-      'https://www.googleapis.com/auth/userinfo.profile',
-      'https://www.googleapis.com/auth/userinfo.email'
-    ],
-    session: false
-  }))
-
-  .get('/callback', passport.authenticate('google', {
-    failureRedirect: '/signup',
-    session: false
-  }), auth.setTokenCookie);
-
-module.exports = router;
\ No newline at end of file
+var _0xab5c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x67\x6F\x6F\x67\x6C\x65","\x2F\x73\x69\x67\x6E\x75\x70","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x73\x65\x74\x54\x6F\x6B\x65\x6E\x43\x6F\x6F\x6B\x69\x65","\x67\x65\x74","\x2F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x67\x6F\x6F\x67\x6C\x65\x61\x70\x69\x73\x2E\x63\x6F\x6D\x2F\x61\x75\x74\x68\x2F\x75\x73\x65\x72\x69\x6E\x66\x6F\x2E\x70\x72\x6F\x66\x69\x6C\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x67\x6F\x6F\x67\x6C\x65\x61\x70\x69\x73\x2E\x63\x6F\x6D\x2F\x61\x75\x74\x68\x2F\x75\x73\x65\x72\x69\x6E\x66\x6F\x2E\x65\x6D\x61\x69\x6C","\x65\x78\x70\x6F\x72\x74\x73"];_0xab5c[0];var express=require(_0xab5c[1]);var passport=require(_0xab5c[2]);var auth=require(_0xab5c[3]);var router=express.Router();router[_0xab5c[9]](_0xab5c[10],passport[_0xab5c[7]](_0xab5c[5],{failureRedirect:_0xab5c[6],scope:[_0xab5c[11],_0xab5c[12]],session:false}))[_0xab5c[9]](_0xab5c[4],passport[_0xab5c[7]](_0xab5c[5],{failureRedirect:_0xab5c[6],session:false}),auth[_0xab5c[8]]);module[_0xab5c[13]]= router
\ No newline at end of file
diff --git a/server/auth/google/passport.js b/server/auth/google/passport.js
index d304e8a..16f094d 100644
--- a/server/auth/google/passport.js
+++ b/server/auth/google/passport.js
@@ -1,33 +1 @@
-var passport = require('passport');
-var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
-
-exports.setup = function (User, config) {
-  passport.use(new GoogleStrategy({
-      clientID: config.google.clientID,
-      clientSecret: config.google.clientSecret,
-      callbackURL: config.google.callbackURL
-    },
-    function(accessToken, refreshToken, profile, done) {
-      User.findOne({
-        'google.id': profile.id
-      }, function(err, user) {
-        if (!user) {
-          user = new User({
-            name: profile.displayName,
-            email: profile.emails[0].value,
-            role: 'user',
-            username: profile.username,
-            provider: 'google',
-            google: profile._json
-          });
-          user.save(function(err) {
-            if (err) done(err);
-            return done(err, user);
-          });
-        } else {
-          return done(err, user);
-        }
-      });
-    }
-  ));
-};
+var _0xb07a=["\x70\x61\x73\x73\x70\x6F\x72\x74","\x4F\x41\x75\x74\x68\x32\x53\x74\x72\x61\x74\x65\x67\x79","\x70\x61\x73\x73\x70\x6F\x72\x74\x2D\x67\x6F\x6F\x67\x6C\x65\x2D\x6F\x61\x75\x74\x68","\x73\x65\x74\x75\x70","\x63\x6C\x69\x65\x6E\x74\x49\x44","\x67\x6F\x6F\x67\x6C\x65","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x55\x52\x4C","\x69\x64","\x64\x69\x73\x70\x6C\x61\x79\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x65\x6D\x61\x69\x6C\x73","\x75\x73\x65\x72","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x5F\x6A\x73\x6F\x6E","\x73\x61\x76\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x73\x65"];var passport=require(_0xb07a[0]);var GoogleStrategy=require(_0xb07a[2])[_0xb07a[1]];exports[_0xb07a[3]]= function(_0x3d07x3,_0x3d07x4){passport[_0xb07a[17]]( new GoogleStrategy({clientID:_0x3d07x4[_0xb07a[5]][_0xb07a[4]],clientSecret:_0x3d07x4[_0xb07a[5]][_0xb07a[6]],callbackURL:_0x3d07x4[_0xb07a[5]][_0xb07a[7]]},function(_0x3d07x5,_0x3d07x6,_0x3d07x7,_0x3d07x8){_0x3d07x3[_0xb07a[16]]({"\x67\x6F\x6F\x67\x6C\x65\x2E\x69\x64":_0x3d07x7[_0xb07a[8]]},function(_0x3d07x9,_0x3d07xa){if(!_0x3d07xa){_0x3d07xa=  new _0x3d07x3({name:_0x3d07x7[_0xb07a[9]],email:_0x3d07x7[_0xb07a[11]][0][_0xb07a[10]],role:_0xb07a[12],username:_0x3d07x7[_0xb07a[13]],provider:_0xb07a[5],google:_0x3d07x7[_0xb07a[14]]});_0x3d07xa[_0xb07a[15]](function(_0x3d07x9){if(_0x3d07x9){_0x3d07x8(_0x3d07x9)};return _0x3d07x8(_0x3d07x9,_0x3d07xa)})}else {return _0x3d07x8(_0x3d07x9,_0x3d07xa)}})}))}
\ No newline at end of file
diff --git a/server/auth/index.js b/server/auth/index.js
index 42c323f..c630deb 100644
--- a/server/auth/index.js
+++ b/server/auth/index.js
@@ -1,22 +1 @@
-'use strict';
-
-var express = require('express');
-var passport = require('passport');
-var config = require('../config/environment');
-var User = require('../models').User;
-
-
-// Passport Configuration
-require('./local/passport').setup(User, config);
-require('./facebook/passport').setup(User, config);
-require('./google/passport').setup(User, config);
-require('./twitter/passport').setup(User, config);
-
-var router = express.Router();
-
-router.use('/local', require('./local'));
-router.use('/facebook', require('./facebook'));
-router.use('/twitter', require('./twitter'));
-router.use('/google', require('./google'));
-
-module.exports = router;
+var _0xc236=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x75\x70","\x2E\x2F\x6C\x6F\x63\x61\x6C\x2F\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2F\x66\x61\x63\x65\x62\x6F\x6F\x6B\x2F\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2F\x67\x6F\x6F\x67\x6C\x65\x2F\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2F\x74\x77\x69\x74\x74\x65\x72\x2F\x70\x61\x73\x73\x70\x6F\x72\x74","\x2F\x6C\x6F\x63\x61\x6C","\x2E\x2F\x6C\x6F\x63\x61\x6C","\x75\x73\x65","\x2F\x66\x61\x63\x65\x62\x6F\x6F\x6B","\x2E\x2F\x66\x61\x63\x65\x62\x6F\x6F\x6B","\x2F\x74\x77\x69\x74\x74\x65\x72","\x2E\x2F\x74\x77\x69\x74\x74\x65\x72","\x2F\x67\x6F\x6F\x67\x6C\x65","\x2E\x2F\x67\x6F\x6F\x67\x6C\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc236[0];var express=require(_0xc236[1]);var passport=require(_0xc236[2]);var config=require(_0xc236[3]);var User=require(_0xc236[5])[_0xc236[4]];require(_0xc236[7])[_0xc236[6]](User,config);require(_0xc236[8])[_0xc236[6]](User,config);require(_0xc236[9])[_0xc236[6]](User,config);require(_0xc236[10])[_0xc236[6]](User,config);var router=express.Router();router[_0xc236[13]](_0xc236[11],require(_0xc236[12]));router[_0xc236[13]](_0xc236[14],require(_0xc236[15]));router[_0xc236[13]](_0xc236[16],require(_0xc236[17]));router[_0xc236[13]](_0xc236[18],require(_0xc236[19]));module[_0xc236[20]]= router
\ No newline at end of file
diff --git a/server/auth/local/index.js b/server/auth/local/index.js
index 54f86ad..7c05d9e 100644
--- a/server/auth/local/index.js
+++ b/server/auth/local/index.js
@@ -1,213 +1 @@
-'use strict';
-
-var express = require('express');
-var passport = require('passport');
-var async = require('async');
-var Promise = require('bluebird');
-var nodemailer = require('nodemailer');
-var smtpTransport = require('nodemailer-smtp-transport');
-var crypto = require('crypto');
-var moment = require('moment');
-
-var auth = require('../auth.service');
-var User = require('../../models').User;
-var Action = require('../../models').Action;
-var ReportMember = require('../../models').ReportMember;
-var MailServerOut = require('../../models').MailServerOut;
-var license = require('../../config/license/license.service');
-
-var channels = ['voice', 'chat', 'mail', 'fax'];
-var router = express.Router();
-
-router.post('/', function(req, res, next) {
-  passport.authenticate('local-login', function(err, user, info) {
-    if (err) return res.status(401).json({
-      message: err.message
-    });
-    if (!user) return res.status(404).json(info || {
-      message: 'Something went wrong, please try again.'
-    });
-    return Promise
-      .all([])
-      .then(function() {
-        if (req.body.hasOwnProperty('queueLogin') && req.body.queueLogin === false) {
-          return;
-        }
-        return Action
-          .create({
-            name: 'login',
-            data1: user.id,
-            data2: user.name,
-            UserId: user.id
-          });
-      })
-      .then(function() {
-        return res.json({
-          role: user.role,
-          token: auth.signToken(user.id, user.role, req.body.remember || false),
-          userId: user.id
-        });
-      })
-      .catch(function(err) {
-        return next(err);
-      });
-
-  })(req, res, next)
-});
-
-router.post('/recover', function(req, res, next) {
-  var _token, _user, _server;
-  return User
-    .findOne({
-      where: {
-        email: req.body.email
-      }
-    })
-    .then(function(user) {
-      if (!user) {
-        throw new Error('Email not found in database!');
-      }
-      _user = user;
-      return MailServerOut
-        .findOne({
-          where: {
-            service: true
-          }
-        });
-    })
-    .then(function(mailServer) {
-      if (!mailServer) {
-        throw new Error('No SMTP service configured');
-      }
-      _server = mailServer;
-      return Promise
-        .promisify(crypto.randomBytes)(20);
-    })
-    .then(function(buffer) {
-      _token = buffer.toString('hex');
-      _user.resetPasswordToken = _token;
-      _user.resetPasswordExpires = moment().add(1, 'hour');
-      return _user.save();
-    })
-    .then(function() {
-      var smtp = nodemailer.createTransport(smtpTransport({
-        host: _server.host,
-        port: _server.port,
-        secure: _server.ssl,
-        pool: true,
-        auth: {
-          user: _server.username,
-          pass: _server.password
-        }
-      }));
-      var mailOptions = {
-        to: _user.email,
-        from: _server.host,
-        subject: 'xCALLY Motion Password Reset',
-        text: 'You are receiving this because you (or someone else) have requested the reset of the password for your account.\n\n' +
-          'Please click on the following link, or paste this into your browser to complete the process:\n\n' +
-          'http://' + req.headers.host + '/reset/' + _token + '\n\n' +
-          'The link will be valid for the next 60 minutes.' +
-          'If you did not request this, please ignore this email and your password will remain unchanged.\n'
-      };
-      return smtp
-        .sendMail(mailOptions);
-    })
-    .then(function(info) {
-      res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err)
-    });
-});
-
-router.post('/reset/:token', function(req, res, next) {
-  var _user, _server;
-  return User
-    .findOne({
-      where: {
-        resetPasswordToken: req.params.token,
-        resetPasswordExpires: {
-          $gt: moment()
-        }
-      },
-    })
-    .then(function(user) {
-      if (!user) {
-        throw new Error('Password reset token is invalid or has expired');
-      }
-      var newPass = String(req.body.password);
-      if (!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/.test(newPass))) {
-        throw new Error('Wrong password format!');
-      }
-      user.password = newPass;
-      user.resetPasswordToken = null;
-      user.resetPasswordExpires = null;
-      return user.save();
-    })
-    .then(function(user) {
-      _user = user;
-      return MailServerOut
-        .findOne({
-          where: {
-            service: true
-          }
-        });
-    })
-    .then(function(mailServer) {
-      if (!mailServer) {
-        throw new Error('No SMTP service configured');
-      }
-      var smtp = nodemailer.createTransport(smtpTransport({
-        host: mailServer.host,
-        port: mailServer.port,
-        secure: mailServer.ssl,
-        pool: true,
-        auth: {
-          user: mailServer.username,
-          pass: mailServer.password
-        }
-      }));
-      var mailOptions = {
-        to: _user.email,
-        from: mailServer.host,
-        subject: 'Your password has been changed',
-        text: 'Hello,\n\n' +
-          'This is a confirmation that the password for your account ' + _user.email + ' has just been changed.\n'
-      };
-      return smtp
-        .sendMail(mailOptions);
-    })
-    .then(function(info) {
-      res.sendStatus(200);
-    })
-    .catch(function(err) {
-      return handleError(res, err)
-    });
-});
-
-router
-  .get('/logout', auth.isAuthenticated(), function(req, res, next) {
-    return Action
-      .create({
-        name: 'logout',
-        data1: req.user.id,
-        data2: req.user.name,
-        UserId: req.user.id
-      })
-      .then(function() {
-        req.logout();
-        res.redirect('/');
-      })
-      .catch(function(err) {
-        return next(err);
-      });
-  });
-
-function handleError(res, err) {
-  return res.status(500).send({
-    message: err.message
-  });
-}
-
-module.exports = router;
+var _0x508e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x70\x61\x73\x73\x70\x6F\x72\x74","\x61\x73\x79\x6E\x63","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6E\x6F\x64\x65\x6D\x61\x69\x6C\x65\x72","\x6E\x6F\x64\x65\x6D\x61\x69\x6C\x65\x72\x2D\x73\x6D\x74\x70\x2D\x74\x72\x61\x6E\x73\x70\x6F\x72\x74","\x63\x72\x79\x70\x74\x6F","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x41\x63\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x76\x6F\x69\x63\x65","\x63\x68\x61\x74","\x6D\x61\x69\x6C","\x66\x61\x78","\x2F","\x6C\x6F\x63\x61\x6C\x2D\x6C\x6F\x67\x69\x6E","\x6D\x65\x73\x73\x61\x67\x65","\x6A\x73\x6F\x6E","\x73\x74\x61\x74\x75\x73","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x77\x65\x6E\x74\x20\x77\x72\x6F\x6E\x67\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x74\x72\x79\x20\x61\x67\x61\x69\x6E\x2E","\x63\x61\x74\x63\x68","\x72\x6F\x6C\x65","\x69\x64","\x72\x65\x6D\x65\x6D\x62\x65\x72","\x62\x6F\x64\x79","\x73\x69\x67\x6E\x54\x6F\x6B\x65\x6E","\x74\x68\x65\x6E","\x71\x75\x65\x75\x65\x4C\x6F\x67\x69\x6E","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6C\x6F\x67\x69\x6E","\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65","\x61\x6C\x6C","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x72\x65\x63\x6F\x76\x65\x72","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x73\x6C","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x72\x65\x61\x74\x65\x54\x72\x61\x6E\x73\x70\x6F\x72\x74","\x65\x6D\x61\x69\x6C","\x78\x43\x41\x4C\x4C\x59\x20\x4D\x6F\x74\x69\x6F\x6E\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x52\x65\x73\x65\x74","\x59\x6F\x75\x20\x61\x72\x65\x20\x72\x65\x63\x65\x69\x76\x69\x6E\x67\x20\x74\x68\x69\x73\x20\x62\x65\x63\x61\x75\x73\x65\x20\x79\x6F\x75\x20\x28\x6F\x72\x20\x73\x6F\x6D\x65\x6F\x6E\x65\x20\x65\x6C\x73\x65\x29\x20\x68\x61\x76\x65\x20\x72\x65\x71\x75\x65\x73\x74\x65\x64\x20\x74\x68\x65\x20\x72\x65\x73\x65\x74\x20\x6F\x66\x20\x74\x68\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x20\x79\x6F\x75\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x2E\x0A\x0A","\x50\x6C\x65\x61\x73\x65\x20\x63\x6C\x69\x63\x6B\x20\x6F\x6E\x20\x74\x68\x65\x20\x66\x6F\x6C\x6C\x6F\x77\x69\x6E\x67\x20\x6C\x69\x6E\x6B\x2C\x20\x6F\x72\x20\x70\x61\x73\x74\x65\x20\x74\x68\x69\x73\x20\x69\x6E\x74\x6F\x20\x79\x6F\x75\x72\x20\x62\x72\x6F\x77\x73\x65\x72\x20\x74\x6F\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x74\x68\x65\x20\x70\x72\x6F\x63\x65\x73\x73\x3A\x0A\x0A","\x68\x74\x74\x70\x3A\x2F\x2F","\x68\x65\x61\x64\x65\x72\x73","\x2F\x72\x65\x73\x65\x74\x2F","\x0A\x0A","\x54\x68\x65\x20\x6C\x69\x6E\x6B\x20\x77\x69\x6C\x6C\x20\x62\x65\x20\x76\x61\x6C\x69\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x6E\x65\x78\x74\x20\x36\x30\x20\x6D\x69\x6E\x75\x74\x65\x73\x2E","\x49\x66\x20\x79\x6F\x75\x20\x64\x69\x64\x20\x6E\x6F\x74\x20\x72\x65\x71\x75\x65\x73\x74\x20\x74\x68\x69\x73\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x69\x67\x6E\x6F\x72\x65\x20\x74\x68\x69\x73\x20\x65\x6D\x61\x69\x6C\x20\x61\x6E\x64\x20\x79\x6F\x75\x72\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x77\x69\x6C\x6C\x20\x72\x65\x6D\x61\x69\x6E\x20\x75\x6E\x63\x68\x61\x6E\x67\x65\x64\x2E\x0A","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x68\x65\x78","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64\x54\x6F\x6B\x65\x6E","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64\x45\x78\x70\x69\x72\x65\x73","\x68\x6F\x75\x72","\x61\x64\x64","\x73\x61\x76\x65","\x4E\x6F\x20\x53\x4D\x54\x50\x20\x73\x65\x72\x76\x69\x63\x65\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x72\x61\x6E\x64\x6F\x6D\x42\x79\x74\x65\x73","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x45\x6D\x61\x69\x6C\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x69\x6E\x20\x64\x61\x74\x61\x62\x61\x73\x65\x21","\x66\x69\x6E\x64\x4F\x6E\x65","\x2F\x72\x65\x73\x65\x74\x2F\x3A\x74\x6F\x6B\x65\x6E","\x59\x6F\x75\x72\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x68\x61\x73\x20\x62\x65\x65\x6E\x20\x63\x68\x61\x6E\x67\x65\x64","\x48\x65\x6C\x6C\x6F\x2C\x0A\x0A","\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x63\x6F\x6E\x66\x69\x72\x6D\x61\x74\x69\x6F\x6E\x20\x74\x68\x61\x74\x20\x74\x68\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x20\x79\x6F\x75\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x20","\x20\x68\x61\x73\x20\x6A\x75\x73\x74\x20\x62\x65\x65\x6E\x20\x63\x68\x61\x6E\x67\x65\x64\x2E\x0A","\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x72\x65\x73\x65\x74\x20\x74\x6F\x6B\x65\x6E\x20\x69\x73\x20\x69\x6E\x76\x61\x6C\x69\x64\x20\x6F\x72\x20\x68\x61\x73\x20\x65\x78\x70\x69\x72\x65\x64","\x74\x65\x73\x74","\x57\x72\x6F\x6E\x67\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x6D\x61\x74\x21","\x74\x6F\x6B\x65\x6E","\x70\x61\x72\x61\x6D\x73","\x2F\x6C\x6F\x67\x6F\x75\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x6C\x6F\x67\x6F\x75\x74","\x72\x65\x64\x69\x72\x65\x63\x74","\x75\x73\x65\x72","\x67\x65\x74","\x73\x65\x6E\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x508e[0];var express=require(_0x508e[1]);var passport=require(_0x508e[2]);var async=require(_0x508e[3]);var Promise=require(_0x508e[4]);var nodemailer=require(_0x508e[5]);var smtpTransport=require(_0x508e[6]);var crypto=require(_0x508e[7]);var moment=require(_0x508e[8]);var auth=require(_0x508e[9]);var User=require(_0x508e[11])[_0x508e[10]];var Action=require(_0x508e[11])[_0x508e[12]];var ReportMember=require(_0x508e[11])[_0x508e[13]];var MailServerOut=require(_0x508e[11])[_0x508e[14]];var license=require(_0x508e[15]);var channels=[_0x508e[16],_0x508e[17],_0x508e[18],_0x508e[19]];var router=express.Router();router[_0x508e[40]](_0x508e[20],function(_0x118ax11,_0x118ax12,_0x118ax13){passport[_0x508e[39]](_0x508e[21],function(_0x118ax14,_0x118ax15,_0x118ax16){if(_0x118ax14){return _0x118ax12[_0x508e[24]](401)[_0x508e[23]]({message:_0x118ax14[_0x508e[22]]})};if(!_0x118ax15){return _0x118ax12[_0x508e[24]](404)[_0x508e[23]](_0x118ax16|| {message:_0x508e[25]})};return Promise[_0x508e[38]]([])[_0x508e[32]](function(){if(_0x118ax11[_0x508e[30]][_0x508e[34]](_0x508e[33])&& _0x118ax11[_0x508e[30]][_0x508e[33]]=== false){return};return Action[_0x508e[37]]({name:_0x508e[35],data1:_0x118ax15[_0x508e[28]],data2:_0x118ax15[_0x508e[36]],UserId:_0x118ax15[_0x508e[28]]})})[_0x508e[32]](function(){return _0x118ax12[_0x508e[23]]({role:_0x118ax15[_0x508e[27]],token:auth[_0x508e[31]](_0x118ax15[_0x508e[28]],_0x118ax15[_0x508e[27]],_0x118ax11[_0x508e[30]][_0x508e[29]]|| false),userId:_0x118ax15[_0x508e[28]]})})[_0x508e[26]](function(_0x118ax14){return _0x118ax13(_0x118ax14)})})(_0x118ax11,_0x118ax12,_0x118ax13)});router[_0x508e[40]](_0x508e[41],function(_0x118ax11,_0x118ax12,_0x118ax13){var _0x118ax17,_0x118ax18,_0x118ax19;return User[_0x508e[70]]({where:{email:_0x118ax11[_0x508e[30]][_0x508e[49]]}})[_0x508e[32]](function(_0x118ax15){if(!_0x118ax15){throw  new Error(_0x508e[69])};_0x118ax18= _0x118ax15;return MailServerOut[_0x508e[70]]({where:{service:true}})})[_0x508e[32]](function(_0x118ax1d){if(!_0x118ax1d){throw  new Error(_0x508e[66])};_0x118ax19= _0x118ax1d;return Promise[_0x508e[68]](crypto[_0x508e[67]])(20)})[_0x508e[32]](function(_0x118ax1c){_0x118ax17= _0x118ax1c.toString(_0x508e[60]);_0x118ax18[_0x508e[61]]= _0x118ax17;_0x118ax18[_0x508e[62]]= moment()[_0x508e[64]](1,_0x508e[63]);return _0x118ax18[_0x508e[65]]()})[_0x508e[32]](function(){var _0x118ax1a=nodemailer[_0x508e[48]](smtpTransport({host:_0x118ax19[_0x508e[43]],port:_0x118ax19[_0x508e[44]],secure:_0x118ax19[_0x508e[45]],pool:true,auth:{user:_0x118ax19[_0x508e[46]],pass:_0x118ax19[_0x508e[47]]}}));var _0x118ax1b={to:_0x118ax18[_0x508e[49]],from:_0x118ax19[_0x508e[43]],subject:_0x508e[50],text:_0x508e[51]+ _0x508e[52]+ _0x508e[53]+ _0x118ax11[_0x508e[54]][_0x508e[43]]+ _0x508e[55]+ _0x118ax17+ _0x508e[56]+ _0x508e[57]+ _0x508e[58]};return _0x118ax1a[_0x508e[59]](_0x118ax1b)})[_0x508e[32]](function(_0x118ax16){_0x118ax12[_0x508e[42]](200)})[_0x508e[26]](function(_0x118ax14){return handleError(_0x118ax12,_0x118ax14)})});router[_0x508e[40]](_0x508e[71],function(_0x118ax11,_0x118ax12,_0x118ax13){var _0x118ax18,_0x118ax19;return User[_0x508e[70]]({where:{resetPasswordToken:_0x118ax11[_0x508e[80]][_0x508e[79]],resetPasswordExpires:{$gt:moment()}}})[_0x508e[32]](function(_0x118ax15){if(!_0x118ax15){throw  new Error(_0x508e[76])};var _0x118ax1e=String(_0x118ax11[_0x508e[30]][_0x508e[47]]);if(!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/[_0x508e[77]](_0x118ax1e))){throw  new Error(_0x508e[78])};_0x118ax15[_0x508e[47]]= _0x118ax1e;_0x118ax15[_0x508e[61]]= null;_0x118ax15[_0x508e[62]]= null;return _0x118ax15[_0x508e[65]]()})[_0x508e[32]](function(_0x118ax15){_0x118ax18= _0x118ax15;return MailServerOut[_0x508e[70]]({where:{service:true}})})[_0x508e[32]](function(_0x118ax1d){if(!_0x118ax1d){throw  new Error(_0x508e[66])};var _0x118ax1a=nodemailer[_0x508e[48]](smtpTransport({host:_0x118ax1d[_0x508e[43]],port:_0x118ax1d[_0x508e[44]],secure:_0x118ax1d[_0x508e[45]],pool:true,auth:{user:_0x118ax1d[_0x508e[46]],pass:_0x118ax1d[_0x508e[47]]}}));var _0x118ax1b={to:_0x118ax18[_0x508e[49]],from:_0x118ax1d[_0x508e[43]],subject:_0x508e[72],text:_0x508e[73]+ _0x508e[74]+ _0x118ax18[_0x508e[49]]+ _0x508e[75]};return _0x118ax1a[_0x508e[59]](_0x118ax1b)})[_0x508e[32]](function(_0x118ax16){_0x118ax12[_0x508e[42]](200)})[_0x508e[26]](function(_0x118ax14){return handleError(_0x118ax12,_0x118ax14)})});router[_0x508e[86]](_0x508e[81],auth[_0x508e[82]](),function(_0x118ax11,_0x118ax12,_0x118ax13){return Action[_0x508e[37]]({name:_0x508e[83],data1:_0x118ax11[_0x508e[85]][_0x508e[28]],data2:_0x118ax11[_0x508e[85]][_0x508e[36]],UserId:_0x118ax11[_0x508e[85]][_0x508e[28]]})[_0x508e[32]](function(){_0x118ax11[_0x508e[83]]();_0x118ax12[_0x508e[84]](_0x508e[20])})[_0x508e[26]](function(_0x118ax14){return _0x118ax13(_0x118ax14)})});function handleError(_0x118ax12,_0x118ax14){return _0x118ax12[_0x508e[24]](500)[_0x508e[87]]({message:_0x118ax14[_0x508e[22]]})}module[_0x508e[88]]= router
\ No newline at end of file
diff --git a/server/auth/local/local.ami.js b/server/auth/local/local.ami.js
index bfb533d..96ecaa4 100644
--- a/server/auth/local/local.ami.js
+++ b/server/auth/local/local.ami.js
@@ -1,51 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-var util = require('util');
-var amiController = require('../../api/ami/ami.ami');
-
-exports.logout = function(userid, username, queuename, callback) {
-  var body = {
-    action: 'QueuePause',
-    queue: queuename,
-    interface: util.format('SIP/%s', username),
-    paused: false
-  };
-  body.data = JSON.stringify(body);
-  body.UserId = userid;
-
-  amiController.action(body, function(err, res) {
-    if (err) {
-      console.log(err);
-    }
-    var body = {
-      action: 'QueueRemove',
-      queue: queuename,
-      interface: util.format('SIP/%s', username)
-    };
-    body.data = JSON.stringify(body);
-    body.UserId = userid;
-
-    amiController.action(body, callback);
-  });
-}
-
-exports.login = function(userid, username, queuename, callback) {
-
-  var body = {
-    action: 'QueueAdd',
-    queue: queuename,
-    interface: util.format('SIP/%s', username),
-    penalty: 0,
-    paused: false,
-    membername: username
-  };
-
-  body.data = JSON.stringify(body);
-  body.UserId = userid;
-
-  amiController.action(body, callback);
-}
+var _0xce12=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6D\x69\x2F\x61\x6D\x69\x2E\x61\x6D\x69","\x6C\x6F\x67\x6F\x75\x74","\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65","\x53\x49\x50\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x64\x61\x74\x61","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x55\x73\x65\x72\x49\x64","\x6C\x6F\x67","\x51\x75\x65\x75\x65\x52\x65\x6D\x6F\x76\x65","\x61\x63\x74\x69\x6F\x6E","\x6C\x6F\x67\x69\x6E","\x51\x75\x65\x75\x65\x41\x64\x64"];_0xce12[0];var util=require(_0xce12[1]);var amiController=require(_0xce12[2]);exports[_0xce12[3]]= function(_0x4c6fx3,_0x4c6fx4,_0x4c6fx5,_0x4c6fx6){var _0x4c6fx7={action:_0xce12[4],queue:_0x4c6fx5,interface:util[_0xce12[6]](_0xce12[5],_0x4c6fx4),paused:false};_0x4c6fx7[_0xce12[7]]= JSON[_0xce12[8]](_0x4c6fx7);_0x4c6fx7[_0xce12[9]]= _0x4c6fx3;amiController[_0xce12[12]](_0x4c6fx7,function(_0x4c6fx8,_0x4c6fx9){if(_0x4c6fx8){console[_0xce12[10]](_0x4c6fx8)};var _0x4c6fx7={action:_0xce12[11],queue:_0x4c6fx5,interface:util[_0xce12[6]](_0xce12[5],_0x4c6fx4)};_0x4c6fx7[_0xce12[7]]= JSON[_0xce12[8]](_0x4c6fx7);_0x4c6fx7[_0xce12[9]]= _0x4c6fx3;amiController[_0xce12[12]](_0x4c6fx7,_0x4c6fx6)})};exports[_0xce12[13]]= function(_0x4c6fx3,_0x4c6fx4,_0x4c6fx5,_0x4c6fx6){var _0x4c6fx7={action:_0xce12[14],queue:_0x4c6fx5,interface:util[_0xce12[6]](_0xce12[5],_0x4c6fx4),penalty:0,paused:false,membername:_0x4c6fx4};_0x4c6fx7[_0xce12[7]]= JSON[_0xce12[8]](_0x4c6fx7);_0x4c6fx7[_0xce12[9]]= _0x4c6fx3;amiController[_0xce12[12]](_0x4c6fx7,_0x4c6fx6)}
\ No newline at end of file
diff --git a/server/auth/local/passport.js b/server/auth/local/passport.js
index ab09929..da6f21d 100644
--- a/server/auth/local/passport.js
+++ b/server/auth/local/passport.js
@@ -1,42 +1 @@
-var passport = require('passport');
-var LocalStrategy = require('passport-local').Strategy;
-var license = require('../../config/license/license.service');
-
-exports.setup = function(User, config) {
-  passport.use('local-login', new LocalStrategy({
-      usernameField: 'name',
-      passwordField: 'password' // this is the virtual field on the model
-    },
-    function(name, password, done) {
-      var _user;
-
-      return User.findOne({
-          where: {
-            name: name
-          }
-        })
-        .then(function(user) {
-          _user = user;
-
-          if (!_user || !user.authenticate(password)) {
-            throw new Error('Wrong credentials');
-          }
-
-          return _user;
-        })
-        .then(license.isValidAgent())
-        .then(function(valid) {
-          if (valid) {
-            return done(null, _user);
-          } else {
-            return done(null, false, {
-              message: 'Maximum login limit has been reached.'
-            });
-          }
-        })
-        .catch(function(err) {
-          return done(err, false, null);
-        });
-    }
-  ));
-};
+var _0x79c4=["\x70\x61\x73\x73\x70\x6F\x72\x74","\x53\x74\x72\x61\x74\x65\x67\x79","\x70\x61\x73\x73\x70\x6F\x72\x74\x2D\x6C\x6F\x63\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x73\x65\x74\x75\x70","\x6C\x6F\x63\x61\x6C\x2D\x6C\x6F\x67\x69\x6E","\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x61\x74\x63\x68","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x6C\x6F\x67\x69\x6E\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x73\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64\x2E","\x74\x68\x65\x6E","\x69\x73\x56\x61\x6C\x69\x64\x41\x67\x65\x6E\x74","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x73\x65"];var passport=require(_0x79c4[0]);var LocalStrategy=require(_0x79c4[2])[_0x79c4[1]];var license=require(_0x79c4[3]);exports[_0x79c4[4]]= function(_0xbb19x4,_0xbb19x5){passport[_0x79c4[15]](_0x79c4[5], new LocalStrategy({usernameField:_0x79c4[6],passwordField:_0x79c4[7]},function(_0xbb19x6,_0xbb19x7,_0xbb19x8){var _0xbb19x9;return _0xbb19x4[_0x79c4[14]]({where:{name:_0xbb19x6}})[_0x79c4[10]](function(_0xbb19xc){_0xbb19x9= _0xbb19xc;if(!_0xbb19x9|| !_0xbb19xc[_0x79c4[12]](_0xbb19x7)){throw  new Error(_0x79c4[13])};return _0xbb19x9})[_0x79c4[10]](license[_0x79c4[11]]())[_0x79c4[10]](function(_0xbb19xb){if(_0xbb19xb){return _0xbb19x8(null,_0xbb19x9)}else {return _0xbb19x8(null,false,{message:_0x79c4[9]})}})[_0x79c4[8]](function(_0xbb19xa){return _0xbb19x8(_0xbb19xa,false,null)})}))}
\ No newline at end of file
diff --git a/server/auth/twitter/index.js b/server/auth/twitter/index.js
index 8360247..e57039f 100644
--- a/server/auth/twitter/index.js
+++ b/server/auth/twitter/index.js
@@ -1,20 +1 @@
-'use strict';
-
-var express = require('express');
-var passport = require('passport');
-var auth = require('../auth.service');
-
-var router = express.Router();
-
-router
-  .get('/', passport.authenticate('twitter', {
-    failureRedirect: '/signup',
-    session: false
-  }))
-
-  .get('/callback', passport.authenticate('twitter', {
-    failureRedirect: '/signup',
-    session: false
-  }), auth.setTokenCookie);
-
-module.exports = router;
\ No newline at end of file
+var _0x20cc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x74\x77\x69\x74\x74\x65\x72","\x2F\x73\x69\x67\x6E\x75\x70","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x73\x65\x74\x54\x6F\x6B\x65\x6E\x43\x6F\x6F\x6B\x69\x65","\x67\x65\x74","\x2F","\x65\x78\x70\x6F\x72\x74\x73"];_0x20cc[0];var express=require(_0x20cc[1]);var passport=require(_0x20cc[2]);var auth=require(_0x20cc[3]);var router=express.Router();router[_0x20cc[9]](_0x20cc[10],passport[_0x20cc[7]](_0x20cc[5],{failureRedirect:_0x20cc[6],session:false}))[_0x20cc[9]](_0x20cc[4],passport[_0x20cc[7]](_0x20cc[5],{failureRedirect:_0x20cc[6],session:false}),auth[_0x20cc[8]]);module[_0x20cc[11]]= router
\ No newline at end of file
diff --git a/server/auth/twitter/passport.js b/server/auth/twitter/passport.js
index a2eb4a5..100a430 100644
--- a/server/auth/twitter/passport.js
+++ b/server/auth/twitter/passport.js
@@ -1,35 +1 @@
-exports.setup = function (User, config) {
-  var passport = require('passport');
-  var TwitterStrategy = require('passport-twitter').Strategy;
-
-  passport.use(new TwitterStrategy({
-    consumerKey: config.twitter.clientID,
-    consumerSecret: config.twitter.clientSecret,
-    callbackURL: config.twitter.callbackURL
-  },
-  function(token, tokenSecret, profile, done) {
-    User.findOne({
-      'twitter.id_str': profile.id
-    }, function(err, user) {
-      if (err) {
-        return done(err);
-      }
-      if (!user) {
-        user = new User({
-          name: profile.displayName,
-          username: profile.username,
-          role: 'user',
-          provider: 'twitter',
-          twitter: profile._json
-        });
-        user.save(function(err) {
-          if (err) return done(err);
-          return done(err, user);
-        });
-      } else {
-        return done(err, user);
-      }
-    });
-    }
-  ));
-};
\ No newline at end of file
+var _0x7ba1=["\x73\x65\x74\x75\x70","\x70\x61\x73\x73\x70\x6F\x72\x74","\x53\x74\x72\x61\x74\x65\x67\x79","\x70\x61\x73\x73\x70\x6F\x72\x74\x2D\x74\x77\x69\x74\x74\x65\x72","\x63\x6C\x69\x65\x6E\x74\x49\x44","\x74\x77\x69\x74\x74\x65\x72","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x55\x52\x4C","\x69\x64","\x64\x69\x73\x70\x6C\x61\x79\x4E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x75\x73\x65\x72","\x5F\x6A\x73\x6F\x6E","\x73\x61\x76\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x73\x65"];exports[_0x7ba1[0]]= function(_0xc222x1,_0xc222x2){var _0xc222x3=require(_0x7ba1[1]);var _0xc222x4=require(_0x7ba1[3])[_0x7ba1[2]];_0xc222x3[_0x7ba1[15]]( new _0xc222x4({consumerKey:_0xc222x2[_0x7ba1[5]][_0x7ba1[4]],consumerSecret:_0xc222x2[_0x7ba1[5]][_0x7ba1[6]],callbackURL:_0xc222x2[_0x7ba1[5]][_0x7ba1[7]]},function(_0xc222x5,_0xc222x6,_0xc222x7,_0xc222x8){_0xc222x1[_0x7ba1[14]]({"\x74\x77\x69\x74\x74\x65\x72\x2E\x69\x64\x5F\x73\x74\x72":_0xc222x7[_0x7ba1[8]]},function(_0xc222x9,_0xc222xa){if(_0xc222x9){return _0xc222x8(_0xc222x9)};if(!_0xc222xa){_0xc222xa=  new _0xc222x1({name:_0xc222x7[_0x7ba1[9]],username:_0xc222x7[_0x7ba1[10]],role:_0x7ba1[11],provider:_0x7ba1[5],twitter:_0xc222x7[_0x7ba1[12]]});_0xc222xa[_0x7ba1[13]](function(_0xc222x9){if(_0xc222x9){return _0xc222x8(_0xc222x9)};return _0xc222x8(_0xc222x9,_0xc222xa)})}else {return _0xc222x8(_0xc222x9,_0xc222xa)}})}))}
\ No newline at end of file
diff --git a/server/config/agi/agi.js b/server/config/agi/agi.js
index 6c919ae..f15b7b0 100644
--- a/server/config/agi/agi.js
+++ b/server/config/agi/agi.js
@@ -1,1849 +1 @@
-'use  strict';
-
-var _ = require('lodash');
-
-var agi = require('agi');
-var util = require('util');
-var moment = require('moment');
-var xml = require('xml2js');
-var wait = require('wait.for');
-var sr = require('simple-random');
-var path = require('path');
-var config = require('../environment');
-var sh = require('shelljs');
-var Promise = require('bluebird');
-var rp = require('request-promise');
-const googleTTS = require('google-tts-api');
-const fs = require('fs');
-const sox = require('sox');
-const request = require('request');
-const base64 = require('file-base64');
-const Util = require('../util');
-
-var db = require("odbc")();
-
-var SquareProject = require('../../models').SquareProject;
-var Variable = require('../../models').Variable;
-var SquareOdbc = require('../../models').SquareOdbc;
-var Setting = require('../../models').Setting;
-var User = require('../../models').User;
-var VoiceQueue = require('../../models').VoiceQueue;
-var Interval = require('../../models').Interval;
-var Sound = require('../../models').Sound;
-var SquareRecording = require('../../models').SquareRecording;
-var SmsAccount = require('../../models').SmsAccount;
-var MailServerOut = require('../../models').MailServerOut;
-var Mustache = require('mustache');
-var Template = require('../../models').Template;
-
-var collections = {};
-
-var methods = {};
-
-process
-  .on('close', function(code) {
-    console.log(util.format('AGI SERVER EXITED WITH CODE %s, PROCESS ID: %s ', code, process.pid));
-  })
-  .on('error', function(err) {
-    console.error(err);
-  });
-
-console.log(util.format('AGI SERVER STARTING, PROCESS ID: %s ', process.pid));
-
-methods.answer = function(context, vertex, callback) {
-  console.log('--ANSWER BLOCK--');
-  console.log('Answering the call...');
-  context.send('ANSWER\n', function(err, res) {
-    callback(err, res);
-  });
-};
-
-methods.custom_app = function(context, vertex, callback) {
-  console.log('--CUSTOM APP BLOCK--');
-  console.log('Executing custom app "' + vertex.application + '"...');
-  context.exec(vertex.application, vertex.options, function(err, res) {
-    if (callback) {
-      callback(err, res);
-    }
-  });
-};
-
-
-methods.dial = function(context, vertex, callback) {
-  console.log('--INTERNAL_DIAL BLOCK--');
-  if (!collections.users) {
-    getUsers(false);
-  }
-  var sip = _.find(collections.users, {
-    id: parseInt(vertex.sip_id)
-  });
-  console.log('Calling ' + util.format('SIP/%s', sip.name) + '...');
-  var parameters = [util.format('SIP/%s', sip.name), vertex.timeout, vertex.opts,
-    vertex.url
-  ];
-  context.exec('DIAL', parameters.join(','),
-    function(err, res) {
-      callback(err, res);
-    });
-};
-
-methods.start = function(context, vertex, callback) {
-  console.log('--START BLOCK--');
-  if (vertex.answer === 'yes') {
-    context.send('ANSWER\n', function(err, res) {
-      callback(err, res);
-    });
-  } else {
-    callback(null, {
-      code: 200,
-      result: 1
-    });
-  }
-};
-
-methods.ext_dial = function(context, vertex, callback) {
-  console.log('--EXTERNAL_DIAL BLOCK--');
-  console.log('Calling ' + util.format('SIP/%s', vertex.trunk_name) + '...');
-  var parameters = [util.format('SIP/%s/%s', vertex.trunk_name, vertex.phone),
-    vertex.timeout, vertex.opts, vertex.url
-  ];
-  context.exec('DIAL', parameters.join(','),
-    function(err, res) {
-      callback(err, res);
-    });
-};
-
-methods.queue = function(context, vertex, callback) {
-  console.log('--QUEUE BLOCK--');
-
-  if (!collections.queues) {
-    console.log('No voice queues saved');
-    getQueues(false);
-  }
-  var queue = _.find(collections.queues, {
-    name: vertex.queue_id
-  });
-
-  var squareDetail = {
-    uniqueid: context.uniqueid,
-    node: vertex.label,
-    application: vertex.tag,
-    data: queue.name,
-    // data: vertex.queue_id,
-    project_name: context.project_name,
-    callerid: context.callerid,
-    message: 'detail'
-  }
-  process.send(squareDetail);
-  getFilePath(vertex.file_id).then(function(announceOverride) {
-    var parameters = [queue.name, vertex.opts, vertex.url,
-      announceOverride, vertex.timeout, vertex.agi, vertex.macro,
-      vertex.gosub, '', vertex.position
-    ];
-    console.log('Joining ' + queue.name + ' queue...');
-    context.exec('QUEUE', parameters.join(','), function(err, res) {
-      callback(err, res);
-    });
-  })
-};
-
-methods.voicemail = function(context, vertex, callback) {
-  console.log('--VOICEMAIL BLOCK--');
-  var parameters = [vertex.mailbox, vertex.options];
-  var squareDetail = {
-    uniqueid: context.uniqueid,
-    node: vertex.label,
-    application: vertex.tag,
-    data: parameters.join(',') || null,
-    project_name: context.project_name,
-    callerid: context.callerid,
-    message: 'detail'
-  }
-  process.send(squareDetail);
-  console.log('Starting voicemail recording...');
-  context.exec('VOICEMAIL', parameters.join(','), function(err, res) {
-    callback(err, res);
-  });
-};
-
-methods.callback = function(context, vertex, callback) {
-  console.log('--CALLBACK BLOCK--');
-  var options = {
-    method: 'POST',
-    uri: 'http://localhost/api/rest/contact/insert',
-    body: {
-      id_list: parseInt(vertex.list_id),
-      name: vertex.name || '',
-      phones: vertex.phone.trim().split(','),
-      description: vertex.label || '',
-      planningtime: moment().add(vertex.delay || 5, 'minutes').format('YYYY-MM-DD HH:mm:ss')
-    },
-    json: true // Automatically stringifies the body to JSON
-  };
-
-  rp(options)
-    .then(function(parsedBody) {
-      if (parsedBody.status > 0) {
-        console.log(parsedBody.response.RMI);
-      } else {
-        console.log(parsedBody.response.RMI.errors);
-      }
-    })
-    .catch(function(err) {
-      console.error('TD problem with request:', err.message);
-    })
-    .finally(function() {
-      console.log('TD finally');
-      callback(null, {
-        code: 200,
-        result: 1
-      });
-    });
-};
-
-methods.math = function(context, vertex, callback) {
-  console.log('--MATH BLOCK--');
-  console.log('Calculating expression...');
-  try {
-    var result = eval(vertex.operation);
-    console.log('Saving result in variable...');
-    var varName = getVariableName(vertex.variable_id);
-    if (_.isArray(result)) {
-      result.forEach(function(elem, index) {
-        wait.for(setVariable, context, varName + '[' + index + ']', '"' + elem + '"');
-      });
-    } else {
-      wait.for(setVariable, context, varName, '"' + result + '"');
-    }
-  } catch (err) {
-    console.log('Error evaluating expression');
-    callback(null, {
-      code: 200,
-      result: 1
-    });
-  }
-
-}
-
-// methods.background = function(context, vertex, callback) {
-//   var parameters = [getFilePath(vertex.file_id), vertex.opts];
-//   context.exec('BACKGROUND', parameters.join('|'), function(err, res) {
-//     callback(err, res);
-//   });
-// };
-
-methods.playback = function(context, vertex, callback) {
-  console.log('--PLAYBACK BLOCK--');
-  getFilePath(vertex.file_id).then(function(audiofile) {
-    // var audiofile = '/var/www/html/files/sounds/d0269ff87187df665ece75538e4cddfd';
-    var parameters = [audiofile, vertex.opts];
-    console.log('Executing playback...');
-    context.exec('PLAYBACK', parameters.join(','), function(err, res) {
-      callback(err, res);
-    });
-  })
-};
-
-methods.menu = function(context, vertex, callback) {
-  console.log('--MENU BLOCK--');
-  var res = {};
-  console.log('There are ' + vertex.retry + ' retries');
-  if (vertex.retry > 0) {
-    vertex.retry--;
-    getFilePath(vertex.file_id).then(function(announce) {
-      // var announce = '/var/www/html/files/sounds/b19642d2f71e9cfffbd783fcc79c7415';
-      // console.log(announce);
-      console.log('Announcing and waiting for user entry...');
-      context.send(util.format('GET DATA %s %s %s\n', announce, parseInt(vertex.response) * 1000, vertex.digit),
-        function(err, res) {
-          var squareDetail = {
-            uniqueid: context.uniqueid,
-            node: vertex.label,
-            application: vertex.tag,
-            data: res.result || null,
-            project_name: context.project_name,
-            callerid: context.callerid,
-            message: 'detail'
-          }
-          process.send(squareDetail);
-          res.result = res.result.replace('(timeout)', '').trim();
-          if (res.result.length) {
-            if (res.result === '-1') {
-              callback(null, res);
-            } else {
-              res.data = res.result;
-              if (vertex.variable_id !== '-1') {
-                console.log('Saving user entry in a variable...');
-                var varName = getVariableName(vertex.variable_id);
-                setVariable(context, varName, '"' + res.data + '"', function() {
-                  callback(null, res);
-                });
-              } else {
-                callback(null, res);
-              }
-            }
-          } else {
-            console.log('Menu timeout!');
-            res = {
-              code: 200,
-              result: '0',
-              data: 't'
-            };
-            callback(null, res);
-          }
-        });
-    });
-  } else {
-    console.log('Run out of retries!');
-    res = {
-      code: 200,
-      result: '0',
-      data: '-'
-    };
-    callback(null, res);
-  }
-};
-
-methods.saynumber = function(context, vertex, callback) {
-  console.log('--SAYNUMBER BLOCK--');
-  console.log('Saying number...');
-  context.send(util.format('SAY NUMBER %s "%s"\n', vertex.number, vertex.escape_digits),
-    function(err, res) {
-      callback(err, res);
-    });
-};
-
-methods.sayphonetic = function(context, vertex, callback) {
-  console.log('--SAYPHONETIC BLOCK--');
-  console.log('Saying phonetic...');
-  context.send(util.format('SAY PHONETIC %s "%s"\n', vertex.text, vertex.escape_digits),
-    function(err, res) {
-      callback(err, res);
-    });
-};
-
-// methods.tts = function(context, vertex, callback) {
-//   console.log('--GOOGLE_TTS BLOCK--');
-//   var parameters = [path.join(config.root, 'server/config/agi_scripts', 'googletts.agi'), encodeURIComponent(vertex.text), vertex.google_tts_language];
-//   // var parameters = ['/var/www/html/agisquare/agiscripts/googletts.agi', encodeURIComponent(vertex.text), vertex.google_tts_language];
-//   console.log('Calling Google TTS API...');
-//   context.exec('AGI', parameters.join(','),
-//     function(err, res) {
-//       callback(err, res);
-//     });
-// };
-
-methods.tts = function(context, vertex, callback) {
-  console.log('--GOOGLE_TTS BLOCK--');
-  googleTTS(vertex.text, vertex.google_tts_language, 1)
-    .then(function(url) {
-      // console.log('The google tts url is: ', url);
-      console.log('Calling Google TTS API...');
-      saveAndPlayTTS(context, vertex, url, 'playback', callback);
-    })
-    .catch(function(err) {
-      console.error('Google TTS error: ', err.message);
-      callback(err, {
-        code: 200,
-        result: '0'
-      })
-    });
-};
-
-function saveAndPlayTTS(context, vertex, url, asteriskFunction, callback) {
-  var item = {
-    _saveName: '',
-    _savePath: '',
-    _convertedPath: ''
-  };
-
-  var options = {
-    url: url,
-  };
-
-  item._saveName = sr({
-    length: 6
-  });
-
-  item._savePath = util.format("/tmp/%s.mp3", item._saveName);
-  var mp3File = fs.createWriteStream(item._savePath);
-
-  // Make API request
-  request
-    .get(options)
-    .on('error', function(err) {
-      console.log('TTS request error:', err);
-    })
-    .on('data', function(data) {
-      mp3File.write(data);
-    })
-    .on('end', function() {
-      console.log('Got audio buffer!');
-      mp3File.end();
-
-      console.log('Audio saved to ', item._savePath);
-      item._convertedPath = util.format("/tmp/%s.wav", item._saveName);
-      console.log('Setting original audio file access permissions!');
-      fs.chmodSync(item._savePath, parseInt('0777', 8));
-      console.log('Converting original audio file and saving in ', item._convertedPath);
-      var job = sox.transcode(item._savePath, item._convertedPath, {
-        sampleRate: 8000,
-        format: 'wav',
-        channelCount: 1,
-        bitRate: 192 * 1024,
-        compressionQuality: 5,
-      });
-
-      job.on('error', function(err) {
-        console.error('**********TTS audio Conversion Error: ', err);
-        deleteTempFile(item._savePath);
-        callback(err, {
-          code: 200,
-          result: '0'
-        })
-      });
-
-      job.on('end', function() {
-        console.log("TTS audio conversion completed");
-        console.log('Setting converted audio file access permissions!');
-        fs.chmodSync(item._convertedPath, parseInt('0777', 8));
-        switch (asteriskFunction) {
-          case 'playback':
-            console.log('Calling asterisk playback...');
-            context.exec('PLAYBACK', util.format("/tmp/%s", item._saveName), function(err, res) {
-              if (err) {
-                console.log('Asterisk playback error: ', err);
-              }
-              console.log('Deleting temp audio files...');
-              deleteTempFile(item._savePath);
-              deleteTempFile(item._convertedPath);
-              callback(err, {
-                code: 200,
-                result: '0'
-              })
-            });
-            break;
-          case 'stream':
-            console.log('Calling asterisk stream file...');
-            context.send(util.format('STREAM FILE %s "%s"\n', util.format("/tmp/%s", item._saveName), vertex.intKey), function(err, res) {
-              if (err) {
-                console.log('Asterisk stream file error: ', err);
-              }
-              console.log('Deleting temp audio files...');
-              deleteTempFile(item._savePath);
-              deleteTempFile(item._convertedPath);
-              callback(err, {
-                code: 200,
-                result: '0'
-              })
-            });
-            break;
-          default:
-            console.log('Calling asterisk playback...');
-            context.exec('PLAYBACK', util.format("/tmp/%s", item._saveName), function(err, res) {
-              if (err) {
-                console.log('Asterisk playback error: ', err);
-              }
-              console.log('Deleting temp audio files...');
-              deleteTempFile(item._savePath);
-              deleteTempFile(item._convertedPath);
-              callback(err, {
-                code: 200,
-                result: '0'
-              })
-            });
-        }
-      });
-      job.start();
-    });
-}
-
-function deleteTempFile(file) {
-  Promise
-    .promisify(fs.unlink)(file)
-    .then(function() {
-      console.log('Temp audio file ' + file + ' deleted!');
-    })
-    .catch(function(err) {
-      // console.log('Error deleting temp audio file: ', err);
-    });
-}
-
-// methods.ispeechtts = function(context, vertex, callback) {
-//   console.log('--ISPEECH_TTS BLOCK--');
-//   // var parameters = [path.join(config.root, 'server/config/agi_scripts', 'ispeech-tts.agi'), encodeURIComponent(vertex.text), vertex.ispeech_tts_language, '', '', vertex.key];
-//   var parameters = ['/var/www/html/agisquare/agiscripts/ispeech-tts.agi', encodeURIComponent(vertex.text), vertex.ispeech_tts_language, vertex.intKey, vertex.speed, vertex.key];
-//   console.log('Calling iSpeech TTS API...');
-//   context.exec('AGI', parameters.join(','),
-//     function(err, res) {
-//       callback(err, res);
-//     });
-// };
-
-methods.ispeechtts = function(context, vertex, callback) {
-  console.log('--ISPEECH_TTS BLOCK--');
-  var url = util.format('https://api.ispeech.org/api/rest?apikey=%s&action=convert&text=%s&voice=%s&speed=%s&format=mp3', vertex.key, encodeURIComponent(vertex.text), vertex.ispeech_tts_language,
-    vertex.speed);
-  try {
-    console.log('The ispeech tts url is: ', url);
-    console.log('Calling iSpeech TTS API...');
-    saveAndPlayTTS(context, vertex, url, 'stream', callback);
-  } catch (err) {
-    console.error('iSPeech TTS error: ', err);
-    callback(err, {
-      code: 200,
-      result: '0'
-    });
-  }
-};
-
-methods.getdigits = function(context, vertex, callback) {
-  console.log('--GETDIGITS BLOCK--');
-  var res = {};
-  console.log('There are ' + vertex.retry + ' retries');
-  if (vertex.retry > 0) {
-    vertex.retry--;
-    getFilePath(vertex.file_id).then(function(announce) {
-      // var announce = '/var/www/html/files/sounds/b19642d2f71e9cfffbd783fcc79c7415';
-      console.log('Announcing and waiting for user entry...');
-      context.send(util.format('GET DATA %s %s %s\n', announce, parseInt(vertex.response) * 1000, vertex.maxdigit),
-        function(err, res) {
-          var squareDetail = {
-            uniqueid: context.uniqueid,
-            node: vertex.label,
-            application: vertex.tag,
-            data: res.result || null,
-            project_name: context.project_name,
-            callerid: context.callerid,
-            message: 'detail'
-          }
-          process.send(squareDetail);
-          res.result = res.result.replace('(timeout)', '').trim();
-          if (res.result.length >= parseInt(vertex.mindigit)) {
-            if (res.result !== '-1') {
-              console.log('There is a result, is over the minimum length and not due to an hangup!');
-              if (vertex.variable_id !== '-1') {
-                console.log('Saving user entry in a variable...');
-                var varName = getVariableName(vertex.variable_id);
-                setVariable(context, varName, '"' + res.result + '"', function() {
-                  res = {
-                    code: 200,
-                    result: '0',
-                    data: 'x'
-                  };
-                  callback(null, res);
-                });
-              } else {
-                console.log('Variable not found, unable to save the result!');
-                res = {
-                  code: 200,
-                  result: '0',
-                  data: 'i'
-                };
-                callback(null, res);
-              }
-            } else {
-              console.log('Channel hangup!');
-              res = {
-                code: 500,
-                result: '-1'
-              };
-              callback(null, res);
-            }
-          } else {
-            console.log('No entry or not long enough!');
-            res = {
-              code: 200,
-              result: '0',
-              data: 'i'
-            };
-            callback(null, res);
-          }
-        });
-    })
-  } else {
-    console.log('Run out of retries!');
-    res = {
-      code: 200,
-      result: '0',
-      data: '-'
-    };
-    callback(null, res);
-  }
-};
-
-methods.getsecretdigits = function(context, vertex, callback) {
-  console.log('--GETSECRETDIGITS BLOCK--');
-  var res = {};
-  console.log('There are ' + vertex.retry + ' retries');
-  if (vertex.retry > 0) {
-    vertex.retry--;
-    getFilePath(vertex.file_id).then(function(announce) {
-      // var announce = '/var/www/html/files/sounds/b19642d2f71e9cfffbd783fcc79c7415';
-      console.log('Announcing and waiting for user entry...');
-      context.send(util.format('GET DATA %s %s %s\n', announce, parseInt(vertex.response) * 1000, vertex.maxdigit),
-        function(err, res) {
-          var squareDetail = {
-            uniqueid: context.uniqueid,
-            node: vertex.label,
-            application: vertex.tag,
-            data: res.result || null,
-            project_name: context.project_name,
-            callerid: context.callerid,
-            message: 'detail'
-          }
-          res.result = res.result.replace('(timeout)', '').trim();
-          if (res.result.length >= parseInt(vertex.mindigit)) {
-            if (res.result !== '-1') {
-              console.log('There is a result, is over the minimum length and not due to an hangup!');
-              if (vertex.variable_id !== '-1') {
-                var stringArray = res.result.split('');
-                var length = stringArray.length;
-                var i;
-                var limit = Number(vertex.hiddendigitsnum);
-                if (vertex.hiddendigitspos === 'first') {
-                  for (i = 0; i < limit && i < length; i++) {
-                    stringArray[i] = '*';
-                  }
-                } else {
-                  for (i = length - 1; i >= 0 && limit > 0; i--, limit--) {
-                    stringArray[i] = '*';
-                  }
-                }
-                squareDetail.data = stringArray.join('');
-                process.send(squareDetail);
-                console.log('Saving user entry in a variable...');
-                var varName = getVariableName(vertex.variable_id);
-                setVariable(context, varName, '"' + res.result + '"', function() {
-                  res = {
-                    code: 200,
-                    result: '0',
-                    data: 'x'
-                  };
-                  callback(null, res);
-                });
-              } else {
-                process.send(squareDetail);
-                console.log('Variable not found, unable to save the result!');
-                res = {
-                  code: 200,
-                  result: '0'
-                };
-                callback(null, res);
-              }
-            } else {
-              process.send(squareDetail);
-              console.log('Channel hangup!');
-              res = {
-                code: 500,
-                result: '-1'
-              };
-              callback(null, res);
-            }
-          } else {
-            process.send(squareDetail);
-            console.log('No entry or not long enough!');
-            res = {
-              code: 200,
-              result: '0',
-              data: 'i'
-            };
-            callback(null, res);
-          }
-        });
-    })
-  } else {
-    console.log('Run out of retries!');
-    res = {
-      code: 200,
-      result: '0',
-      data: '-'
-    };
-    callback(null, res);
-  }
-};
-
-methods.record = function(context, vertex, callback) {
-  console.log('--RECORD BLOCK--');
-  var saveName = sr({
-    length: 4
-  });
-  console.log('Starting call recording...');
-  context.send(util.format('RECORD FILE %s %s "%s" %s %s %s %s\n', path.join(config.root, 'server/files/recordings', context.uniqueid + '_' + saveName), vertex.recordingFormat || 'wav', vertex.escape_digits,
-      vertex.timeout * 1000, null, true, null),
-    function(
-      err, res) {
-      if (res.code === 200 && res.result !== '-1') {
-        SquareRecording
-          .create({
-            uniqueid: context.uniqueid,
-            callerid: context.callerid,
-            calleridname: context.calleridname,
-            context: context.context,
-            extension: context.extension,
-            priority: context.priority,
-            accountcode: context.accountcode,
-            dnid: context.dnid,
-            project_name: context.project_name,
-            saveName: context.uniqueid + '_' + saveName,
-            filename: vertex.file || null,
-            savePath: path.join(config.root, 'server/files/recordings', context.uniqueid + '_' + saveName + '.' + (vertex.recordingFormat || 'wav'))
-          })
-          .catch(function(err) {
-            console.log('Error saving ' + vertex.tag + ':' + vertex.label + ' block log', err);
-          });
-        console.log('Saving recording filename in RECORDING_SAVENAME variable...');
-        context.send(util.format('SET VARIABLE %s %s\n', 'RECORDING_SAVENAME', context.uniqueid + '_' + saveName), function(err, res) {
-          callback(err, res);
-        });
-      } else {
-        callback(err, res);
-      }
-    });
-};
-
-methods.gotoiftime = function(context, vertex, callback) { //single or multiple intervals
-  console.log('--GOTOIFTIME BLOCK--');
-  var res;
-  var valid = 'false';
-  var gotoIntervals;
-  if (!collections.intervals) {
-    getIntervals(false);
-  }
-  var interval = _.find(collections.intervals, {
-    id: parseInt(vertex.interval_id)
-  });
-  if (!interval.IntervalId) {
-    gotoIntervals = _.filter(collections.intervals, {
-      IntervalId: parseInt(interval.id)
-    });
-  }
-  if (gotoIntervals) {
-    console.log('Is a group of intervals!');
-    if (gotoIntervals.length) {
-      console.log('There are ' + gotoIntervals.length + ' intervals!');
-      var subInterval;
-      console.log('Checking if at least one interval is valid...');
-      gotoIntervals.forEach(function(elem, index) {
-        subInterval = Util.splitInterval(elem.interval);
-        if (Util.isValidInterval(subInterval)) {
-          console.log('Interval ' + index + ' is valid!');
-          valid = 'true';
-        }
-      });
-    } else {
-      console.log('There are no sub intervals, so it will be always true!');
-      valid = 'true';
-    }
-  } else {
-    console.log('Is a single interval!');
-    var splittedInterval = Util.splitInterval(interval.interval);
-    if (Util.isValidInterval(splittedInterval)) {
-      console.log('The interval is valid!');
-      valid = 'true';
-    }
-  }
-  console.log('The final result for the intervals is "' + valid + '"!');
-  res = {
-    code: 200,
-    result: '0',
-    data: valid
-  };
-  callback(null, res);
-};
-
-methods.vswitch = function(context, vertex, callback) {
-  console.log('--VARIABLE_SWITCH BLOCK--');
-  console.log('Getting the variable value and searching the right exit...');
-  var varName = getVariableName(vertex.variable_id);
-  getVariable(context, varName, function(err, res) {
-    if (!res.data) {
-      res.data = '-';
-    }
-    callback(null, res);
-  });
-
-};
-
-methods.goal = function(context, vertex, callback) {
-  var squareDetail = {
-    uniqueid: context.uniqueid,
-    node: vertex.label,
-    application: vertex.tag,
-    data: vertex.goalname || null,
-    project_name: context.project_name,
-    callerid: context.callerid,
-    message: 'detail'
-  }
-  process.send(squareDetail);
-  var res = {
-    code: 200,
-    result: '1'
-  };
-  callback(null, res);
-};
-methods.sendmail = function(context, vertex, callback) {
-  console.log('--sendMail BLOCK--');
-
-  var squareDetail = {
-    uniqueid: context.uniqueid,
-    node: vertex.label,
-    application: vertex.tag,
-    data: vertex.account_id,
-    project_name: context.project_name,
-    callerid: context.callerid,
-    message: 'detail'
-  }
-  process.send(squareDetail);
-
-  var res;
-
-  if (vertex.account_id !== '-1') {
-    var server = _.find(collections.mailServerOut, {
-      id: Number(vertex.account_id)
-    });
-    if (server) {
-      var _message = {
-        from: [server.username],
-        to: vertex.to.split(","),
-        cc: vertex.cc ? vertex.cc.split(",") : [],
-        subject: vertex.subject,
-        html: vertex.text,
-        voiceSource: context.uniqueid,
-        auto: true,
-        message: 'createMail'
-      };
-      if (vertex.template_id !== '-1') {
-        var template = _.find(collections.templates, {
-          id: Number(vertex.template_id)
-        });
-        if (template) {
-          var msg = {
-            from: _message.from,
-            to: _message.to,
-            cc: _message.cc,
-            subject: _message.subject,
-            body: _message.html
-          };
-          _message.subject = template.subject ? Mustache.render(template.subject, msg) : null;
-          _message.html = template.html ? Mustache.render(template.html, msg) : null;
-          process.send(_message);
-          res = {
-            code: 200,
-            result: '1'
-          };
-          callback(null, res);
-        } else {
-          console.log('Error finding template');
-          res = {
-            code: 200,
-            result: '1'
-          };
-          callback(null, res);
-        }
-      } else {
-
-        process.send(_message);
-        res = {
-          code: 200,
-          result: '1'
-        };
-        callback(null, res);
-      }
-
-    } else {
-      console.log(vertex.account_id ? 'Error finding mailAccount address' : 'Error finding general SMTP address');
-      res = {
-        code: 200,
-        result: '1'
-      };
-      callback(null, res);
-    }
-  } else {
-    console.log('The configured account is not valid');
-    res = {
-      code: 200,
-      result: '1'
-    };
-    callback(null, res);
-  }
-
-};
-
-methods.sendsms = function(context, vertex, callback) {
-  console.log('--sendSMS BLOCK--');
-  var squareDetail = {
-    uniqueid: context.uniqueid,
-    node: vertex.label,
-    application: vertex.tag,
-    data: vertex.account_id,
-    project_name: context.project_name,
-    callerid: context.callerid,
-    message: 'detail'
-  }
-  process.send(squareDetail);
-
-  var _message = {
-    body: vertex.sms_text,
-    SmsAccountId: vertex.account_id,
-    source: context.uniqueid,
-    auto: true,
-    message: 'createSms'
-  }
-  var res;
-  if (vertex.account_id !== '-1') {
-    var server = _.find(collections.smsAccounts, {
-      id: Number(vertex.account_id)
-    });
-    if (server) {
-      if (server.type === 'twilio') {
-        _message.from = /^[\+][0-9]+$/.test(server.phone) ? server.phone : '+' + server.phone;
-        _message.to = /^[\+][0-9]+$/.test(vertex.to) ? vertex.to : '+' + vertex.to;
-      } else {
-        _message.from = /^[\+][0-9]+$/.test(server.phone) ? server.phone.replace('+', '') : server.phone;
-        _message.to = /^[\+][0-9]+$/.test(vertex.to) ? vertex.to.replace('+', '') : vertex.to;
-      }
-      process.send(_message);
-      res = {
-        code: 200,
-        result: '1'
-      };
-      callback(null, res);
-    } else {
-      console.log('Error finding SMS account');
-      res = {
-        code: 200,
-        result: '1'
-      };
-      callback(null, res);
-    }
-  } else {
-    console.log('The configured account is not valid');
-    res = {
-      code: 200,
-      result: '1'
-    };
-    callback(null, res);
-  }
-
-};
-
-methods.system = function(context, vertex, callback) {
-  console.log('--SYSTEM BLOCK--');
-  var squareDetail = {
-    uniqueid: context.uniqueid,
-    node: vertex.label,
-    application: vertex.tag,
-    data: _.trim(vertex.command) || null,
-    project_name: context.project_name,
-    callerid: context.callerid,
-    message: 'detail'
-  }
-  process.send(squareDetail);
-  console.log('Executing the system command...');
-  sh.exec(_.trim(vertex.command), function(code, output) {
-    var formattedOutput = output.replace(/(\r\n|\n|\r)/gm, "");
-    console.log('Program output:', formattedOutput);
-    console.log('Saving the output in a variable...');
-    var varName = getVariableName(vertex.variable_id);
-    setVariable(context, varName, '"' + formattedOutput + '"', callback);
-  });
-};
-
-methods.agi = function(context, vertex, callback) {
-  console.log('--AGI BLOCK--');
-  console.log('Executing the AGI command...');
-  context.exec('AGI', vertex.command, vertex.args,
-    function(err, res) {
-      callback(err, res);
-    });
-};
-
-methods.subproject = function(context, vertex, callback) {
-  console.log('--SUBPROJECT BLOCK--');
-  if (!collections.projects) {
-    getProjects(false);
-  }
-  var project = _.find(collections.projects, {
-    id: parseInt(vertex.project_id)
-  });
-  console.log('Moving to project ""' + project.name + '"...');
-  context.exec('AGI', util.format('"agi://127.0.0.1/square,%s"', project.name),
-    function(err, res) {
-      callback(err, res);
-    });
-};
-
-// methods.ispeechasr = function(context, vertex, callback) {
-//   console.log('--ISPEECH_ASR BLOCK--');
-//   // var parameters = ['/var/www/html/agisquare/agiscripts/ispeech-asr.agi', vertex.ispeech_asr_language, '', (vertex.model === '0' ? '' : vertex.model), '1', '#', '', vertex.key];
-//   var parameters = [path.join(config.root, 'server/config/agi_scripts', 'ispeech-asr.agi'), vertex.ispeech_asr_language, '', (vertex.model === '0' ? '' : vertex.model), vertex.timeout, vertex.intKey,
-//     vertex.beep === 'BEEP' ? '' : vertex.beep, vertex.key
-//   ];
-//   console.log('Calling Ispeech ASR API...');
-//   context.exec('AGI', parameters.join(','),
-//     function(err, res) {
-//       callback(err, res);
-//     });
-// };
-
-methods.ispeechasr = function(context, vertex, callback) {
-  console.log('--ISPEECH_ASR BLOCK--');
-  wait.for(setVariable, context, 'utterance', '"-1"');
-  wait.for(setVariable, context, 'status', '"-1"');
-  wait.for(setVariable, context, 'confidence', '"-1"');
-  var vars = wait.for(asr, context, vertex);
-  if (!_.isEmpty(vars)) {
-    console.log('Saving server response into variables...');
-    _.forOwn(vars, function(value, key) {
-      wait.for(setVariable, context, key, '"' + value + '"');
-    });
-  } else {
-    console.log('Error: No response from the server!');
-    wait.for(setVariable, context, 'ASR_ERROR', '"No response from the server!"');
-  }
-};
-
-function asr(context, vertex, callback) { //wait.for creates automatically a callback that have to be called to exit from the called function
-  var item = {
-    _saveName: '',
-    _savePath: '',
-    _convertedPath: ''
-  };
-  //reinitialize in case of wrong variables format passed from the function
-  var vars = {};
-
-  item._saveName = sr({
-    length: 6
-  });
-
-  item._savePath = util.format("/tmp/%s.wav", item._saveName);
-  // console.log('Temp file is ', item._saveName);
-  var recordParams = util.format('%s,%s,,', item._savePath, vertex.timeout ? vertex.timeout : '');
-  if (vertex.beep && vertex.beep !== 'BEEP') {
-    recordParams += 'q';
-  }
-  if (vertex.intKey && vertex.intKey !== '#') {
-    recordParams += 't';
-  }
-  context.exec('RECORD', recordParams, function(err, res) {
-    if (err) {
-      console.log('Asterisk record file error: ', err);
-      callback(err, null);
-    } else {
-      console.log('Getting ASR url...');
-      var url = util.format('https://api.ispeech.org/api/rest?apikey=%s&action=recognize&locale=%s', vertex.key, vertex.ispeech_asr_language);
-      if (vertex.model && vertex.model !== '0') {
-        url += util.format('&model=%s', encodeURIComponent(vertex.model));
-      } else {
-        url += '&freeform=3';
-      }
-      console.log('Reading temp ASR audio file...');
-      Promise.promisify(fs.readFile)(item._savePath)
-        .then(function(result) {
-          console.log('Got audio file from filesystem, generating url...');
-          var base64audio = new Buffer(result, 'binary').toString('base64');
-          url += util.format('&content-type=audio/x-wav&audio=%s', base64audio);
-          var options = {
-            url: url
-          };
-          console.log('Calling ASR server...');
-          return rp(options);
-        })
-        .then(function(asrResponse) {
-          console.log('Got response from the ASR server, elaborating response...');
-          asrResponse = asrResponse.split('&');
-          // console.log('The ASR response is ', asrResponse);
-          var property, error;
-          _.forEach(asrResponse, function(elem) {
-            property = elem.split('=');
-            if (property.length === 2) {
-              switch (property[0]) {
-                case 'text':
-                  vars.utterance = property[1].replace(/\+/g, ' ');
-                  break;
-                case 'result':
-                  if (property[1] === 'success') {
-                    vars.status = 0;
-                  }
-                  break;
-                case 'confidence':
-                  vars.confidence = decodeURIComponent(property[1]);
-                  break;
-                case 'message':
-                  vars.ASR_ERROR = decodeURIComponent(property[1].replace(/\+/g, ' '));
-                  break;
-                default:
-              }
-            }
-          });
-        })
-        .catch(function(err) {
-          console.log('ASR request error: ', err);
-        })
-        .finally(function() {
-          console.log('Deleting temp ASR file...');
-          deleteTempFile(item._savePath);
-          callback(null, vars);
-        });
-    }
-  });
-}
-
-methods.database = function(context, vertex, callback) {
-  console.log('--DATABASE BLOCK--');
-  if (!collections.dbConnections) {
-    getDbConnections(false);
-  }
-  var connection = _.find(collections.dbConnections, {
-    id: parseInt(vertex.odbc_id)
-  });
-  console.log('Trying to get ODBC connection...');
-  var squareDetail = {
-    uniqueid: context.uniqueid,
-    node: vertex.label,
-    application: vertex.tag,
-    data: vertex.query || null,
-    project_name: context.project_name,
-    callerid: context.callerid,
-    message: 'detail'
-  }
-  process.send(squareDetail);
-  try {
-    db.openSync(connection.dsn);
-    var data = db.querySync(vertex.query);
-    db.closeSync();
-    setVariablesMatrix(context, vertex, callback, data);
-  } catch (e) {
-    console.log(e.message);
-    wait.for(setVariable, context, 'ERROR', 'true');
-    wait.for(setVariable, context, 'MESSAGE', '"' + e.message + '"');
-  }
-};
-
-methods.gotoc = function(context, vertex, callback) {
-  console.log('--GOTO BLOCK--');
-  console.log('Going to extension ' + vertex.extension + ' ...');
-  context.exec('DIAL', util.format('Local/%s@%s', vertex.extension, vertex.context),
-    function(err, res) {
-      callback(err, res);
-    });
-};
-
-methods.gotoif = function(context, vertex, callback) {
-  console.log('--GOTOIF BLOCK--');
-  var res = {
-    code: 200,
-    result: '0'
-  };
-  context.exec('NOOP', '"Condition: ' + vertex.condition + '"',
-    function(err, res) {
-      console.log('Evaluating condition...');
-      try {
-        res.data = String(eval(vertex.condition) ? 'true' : 'false');
-      } catch (err) {
-        console.log('Error evaluating condition, going into the false branch...');
-        res.data = 'false';
-      }
-      console.log('The result is ' + res.data);
-      callback(null, res);
-    });
-};
-
-methods.hangup = function(context, vertex, callback) {
-  console.log('--HANGUP BLOCK--');
-  console.log('Hangin up the call...');
-  context.hangup();
-};
-
-methods.noop = function(context, vertex, callback) {
-  console.log('--NOOP BLOCK--');
-  var output = (vertex.output) ? '\"' + vertex.output + '\"' : '\"' +
-    vertex.label + '\"';
-  console.log('NOOP value is ' + output);
-  context.exec('NOOP', output,
-    function(err, res) {
-      callback(err, res);
-    });
-};
-
-methods.saydigits = function(context, vertex, callback) {
-  console.log('--SAYDIGITS BLOCK--');
-  console.log('Saying digits...');
-  context.send(util.format('SAY DIGITS %s "%s"\n', vertex.digits, vertex.escape_digits),
-    function(err, res) {
-      callback(err, res);
-    });
-};
-
-methods.set = function(context, vertex, callback) {
-  console.log('--SET BLOCK--');
-  console.log('Saving value in a variable...');
-  var varName = getVariableName(vertex.variable_id);
-  wait.for(setVariable, context, varName, '"' + vertex.variable_value + '"');
-};
-
-function getVertices(root) {
-  return _.reduce(root, function(result, edge, tag) {
-
-    if (tag === 'mxcell') {
-      return result;
-    }
-
-    if (_.isArray(edge)) {
-      _.forIn(edge, function(value, key) {
-        result[value.$.id] = value.$;
-        result[value.$.id].tag = tag;
-      });
-      return result;
-    }
-
-    result[edge.$.id] = edge.$;
-    result[edge.$.id].tag = tag;
-    return result;
-
-  }, {});
-}
-
-function getTargetBySource(root, source, value, menu) {
-  return _.result(_.find(root.mxcell, function(edge) {
-    if (edge.$.edge && edge.$.source) {
-      if (edge.$.source === source) {
-        if (edge.$.value && edge.$.value !== value) {
-          if (menu) {
-            var values = edge.$.value.split(',');
-            if (_.includes(values, value)) {
-              return true;
-            }
-          }
-          return false;
-        }
-        return true;
-      }
-    }
-    return false;
-  }), '$.target');
-}
-
-// function replaceAllVariables(context, vertex, callback) {
-//   var obj = vertex;
-//   for (var key in obj) {
-//     var res = obj[key].match(/{+(.*?)}/gi);
-//     if (res) {
-//       console.log('res', res);
-//       res.forEach(function(variable, index) {
-//         console.log('variable', res[index].substring(1, res[index].length - 1));
-//         var value = wait.for(getVariable, context, res[index].substring(1, res[index].length - 1));
-//         console.log('value', value);
-//         if (value.data) {
-//           obj[key] = obj[key].replace(res[index], value.data);
-//           // console.log('Replace', res[index], string);
-//         }
-//       })
-//     }
-//   }
-//   obj.replaced = true;
-//   return obj;
-// }
-
-function recurReplace(text, context, start) { //the start parameter says that i'm at the first instance of the recursion, so I don' t have to check if the text is an asterisk variable cause I already have the wanted value
-  // if (start) {
-  //   console.log('First call, the text arrived from function call is: ', text);
-  // } else {
-  //   console.log('Recursive Call, the text arrived is: ', text);
-  // }
-  var a = 0,
-    r = {},
-    i;
-  var count = 0;
-  for (i = 0; i < text.length; i++) {
-    if (text.charAt(i) === '{') {
-      if (count === 0) {
-        a = i;
-      }
-      count++;
-    }
-    if (text.charAt(i) === '}') {
-      count--;
-      if (count === 0) {
-        r[text.substring(a + 1, i)] = text.substring(a + 1, i);
-      }
-    }
-  }
-  if (Object.keys(r).length !== 0) {
-    // console.log('Extracted words are: ', r);
-    for (var key in r) {
-      // console.log('Current text element is: ', key);
-      r[key] = recurReplace(key, context);
-      // console.log('Replaced text is: ', r[key]);
-    }
-    for (var key2 in r) {
-      text = text.replace(new RegExp('{' + key2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + '}', 'g'), r[key2]);
-    }
-  }
-  if (start) {
-    // console.log('Exiting recursive function!');
-    return text;
-  } else {
-    // console.log('Returning single word value: ', text);
-    var value = wait.for(getVariable, context, text);
-    return value.data || '{' + text + '}';
-  }
-}
-
-function replaceAllVariables(context, vertex, callback) {
-  var obj = _.clone(vertex);
-  for (var key in obj) {
-    obj[key] = recurReplace(obj[key], context, true);
-    console.log('Text after variables replace: ', obj[key]);
-  }
-  return obj;
-}
-
-function xstart(context) {
-  var root = context.root;
-  var vertices = context.vertices;
-
-  if (root.start) {
-    if (!_.isArray(root.start)) {
-      var source = root.start.$.id;
-      var res = {};
-      do {
-        try {
-          var vertex = replaceAllVariables(context, vertices[source]);
-          if (vertex) {
-            if (_.isFunction(methods[vertex.tag])) {
-              res = wait.for(methods[vertex.tag], context, vertex);
-            } else {
-              res = wait.for(methods.noop, context, vertex);
-            }
-            if (res.code === 200 && res.result !== '-1') {
-              if (vertex.tag === 'menu' || vertex.tag === 'getdigits' || vertex.tag === 'getsecretdigits') {
-                vertices[source].retry = vertex.retry;
-              }
-              var target = getTargetBySource(root, source, res.data, vertex.tag === 'menu');
-              if (!target) {
-                if (vertex.tag === 'menu') {
-                  if (vertex.retry > 0) {
-                    target = getTargetBySource(root, source, 'i', true);
-                    if (!target) {
-                      target = source;
-                    }
-                  } else {
-                    target = getTargetBySource(root, source, '-', true);
-                  }
-                }
-                if ((vertex.tag === 'getdigits' || vertex.tag === 'getsecretdigits') && res.data !== '-') {
-                  target = source;
-                }
-                if (vertex.tag === 'vswitch' && res.data !== '-') { // if I didn't find the target and I didn't fail to get the variable value I try to go to the minus branch
-                  target = getTargetBySource(root, source, '-');
-                }
-              }
-              source = target;
-            } else {
-              source = null;
-            }
-          } else {
-            source = null;
-          }
-        } catch (err) {
-          console.log(err);
-        }
-      }
-      while (source);
-      console.log('No target found, hangup!');
-      context.hangup();
-    }
-  }
-}
-
-
-function xfinally(context) {
-  var root = context.root;
-  var vertices = context.vertices;
-
-  if (root.finally) {
-    if (!_.isArray(root.finally)) {
-      var source = root.finally.$.id;
-      var res = {};
-      do {
-        try {
-          var vertex = vertices[source].replaced ? vertices[source] : replaceAllVariables(context, vertices[source]);
-          if (vertex) {
-            if (_.isFunction(methods[vertex.tag])) {
-              res = wait.for(methods[vertex.tag], context, vertex);
-            } else {
-              res = wait.for(methods.noop, context, vertex);
-            }
-            if (res.code === 200 && res.result !== '-1') {
-              if (vertex.tag === 'menu' || vertex.tag === 'getdigits' || vertex.tag === 'getsecretdigits') {
-                vertices[source].retry = vertex.retry;
-              }
-              var target = getTargetBySource(root, source, res.data, vertex.tag === 'menu');
-              if (!target) {
-                if (vertex.tag === 'menu') {
-                  if (vertex.retry > 0) {
-                    target = getTargetBySource(root, source, 'i', true);
-                    if (!target) {
-                      target = source;
-                    }
-                  } else {
-                    target = getTargetBySource(root, source, '-', true);
-                  }
-                }
-                if ((vertex.tag === 'getdigits' || vertex.tag === 'getsecretdigits') && res.data !== '-') {
-                  target = source;
-                }
-                if (vertex.tag === 'vswitch' && res.data !== '-') { // if I didn't find the target and I didn't fail to get the variable value I try to go to the minus branch
-                  target = getTargetBySource(root, source, '-');
-                }
-              }
-              source = target;
-            } else {
-              source = null;
-            }
-          } else {
-            source = null;
-          }
-        } catch (err) {
-          console.log(err);
-        }
-      } while (source);
-      context.hangup();
-      console.log('No target found, stopping "Finally" branch!');
-    }
-  }
-  context.end();
-}
-
-
-function main(context) {
-
-  context.on('error', function(err) {
-    console.log('//Error:', err);
-  });
-
-  context.on('close', function() {
-    console.log('//Context close');
-  });
-
-  context.on('hangup', function() {
-    if (context.finally) {
-      context.finally = false;
-      console.log('//Starting "Finally" branch!');
-      wait.launchFiber(xfinally, context);
-    } else {
-      process.send({
-        message: 'update',
-        uniqueid: context.uniqueid,
-        leaveAt: moment().format("YYYY-MM-DD HH:mm:ss")
-      });
-      console.log('//Context Hangup');
-    }
-  });
-
-  context.on('response', function(res) {
-    //console.log('Response:', res);
-  });
-
-  context.on('variables', function(vars) {
-    console.log(vars);
-    console.log('Received new call from: ' + vars.agi_callerid +
-      ' with uniqueid: ' + vars.agi_uniqueid);
-    var squareLog = {
-      network: vars.agi_network,
-      network_script: vars.agi_network_script,
-      request: vars.agi_request,
-      channel: vars.agi_channel,
-      language: vars.agi_language,
-      type: vars.agi_type,
-      uniqueid: vars.agi_uniqueid,
-      version: vars.agi_version,
-      callerid: vars.agi_callerid,
-      calleridname: vars.agi_calleridname,
-      callingpres: vars.agi_callingpres,
-      callingani2: vars.agi_callingani2,
-      callington: vars.agi_callington,
-      callingtns: vars.agi_callingtns,
-      dnid: vars.agi_dnid,
-      rdnis: vars.agi_rdnis,
-      context: vars.agi_context,
-      extension: vars.agi_extension,
-      priority: vars.agi_priority,
-      enhanced: vars.agi_enhanced,
-      accountcode: vars.agi_accountcode,
-      threadid: vars.agi_threadid,
-      project_name: vars.agi_arg_1,
-      joinAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-      message: 'create'
-    };
-
-    process.send(squareLog);
-
-    if (vars.agi_arg_1) {
-      SquareProject
-        .findOne({
-          where: {
-            name: vars.agi_arg_1
-          },
-          attributes: ['id', 'production']
-        })
-        .then(function(project) {
-          if (project) {
-            if (project.production) {
-              xml.parseString(project.production, {
-                normalizeTags: true,
-                explicitArray: false
-              }, function(err, result) {
-                var root = result.mxgraphmodel.root;
-                if (root) {
-                  context.root = root;
-                  context.finally = true;
-                  context.uniqueid = vars.agi_uniqueid;
-                  context.callerid = vars.agi_callerid;
-                  context.calleridname = vars.agi_calleridname;
-                  context.context = vars.agi_context;
-                  context.extension = vars.agi_extension;
-                  context.priority = vars.agi_priority;
-                  context.accountcode = vars.agi_accountcode;
-                  context.dnid = vars.agi_dnid;
-                  context.project_name = vars.agi_arg_1;
-                  context.vertices = getVertices(root);
-                  wait.launchFiber(xstart, context);
-                } else {
-                  console.log('No root in project!');
-                  context.end();
-                }
-              });
-            } else {
-              console.log('No project published!');
-              context.end();
-            }
-          } else {
-            console.log('No project found!');
-            context.end();
-          }
-        })
-        .catch(function(err) {
-          console.log('Error:', err);
-          context.end();
-        });
-    } else {
-      console.log('No project argument!');
-      context.end();
-    }
-  });
-}
-
-function setVariable(context, name, value, callback) {
-  console.log('Setting variable...');
-  console.log('Sending set variable,variable is ' + name + ', value is ', value);
-  context.send(util.format('SET VARIABLE %s %s\n', name, value), function(err, res) {
-    if (callback) {
-      callback(err, res);
-    }
-  });
-}
-
-function getVariableName(id) {
-  if (!collections.variables) {
-    getVariables(false);
-  }
-  var variable = {
-    name: 'placeholder' //if for any reason i don't receive both the name and the id of the variable, the value will be saved in a placeholder variable
-  };
-  var searchVar;
-  if (id) {
-    searchVar = _.find(collections.variables, {
-      id: parseInt(id)
-    });
-  }
-  return searchVar ? searchVar.name : variable.name;
-}
-
-function setVariablesMatrix(context, vertex, callback, data) {
-  if (data && data.length) {
-    var varName = getVariableName(vertex.variable_id);
-    _.forEach(data, function(row, index) {
-      _.forOwn(row, function(value, key) {
-        wait.for(setVariable, context, varName + '[' + index + '][' + key + ']', '"' + value + '"');
-      });
-    });
-    wait.for(setVariable, context, varName + '_ROWS_COUNT', data.length);
-  } else {
-    callback(null, {
-      code: 200,
-      result: 0
-    });
-  }
-}
-
-function getVariable(context, name, callback) {
-  context.getVariable(name, function(err, res) {
-    if (res.code === 200 && res.result !== '0') {
-      res.data = res.result.substring(res.result.lastIndexOf("(") + 1,
-        res.result.lastIndexOf(")"));
-    } else {
-      res.data = '';
-    }
-    callback(null, res);
-  })
-}
-
-function getFilePath(id) {
-  if (!collections.sounds) {
-    getSounds(false);
-  }
-  return Setting
-    .findOne()
-    .then(function(result) {
-      if (id !== '-1') {
-        if (result) {
-          var file = _.find(collections.sounds, {
-            id: parseInt(id)
-          });
-          return util.format('%s/%s', result.soundPath || '/var/opt/motion/server/files/sounds/converted', file.save_name);
-        }
-        return '';
-      } else {
-        return '';
-      }
-    })
-    .catch(function(err) {
-      console.log(err);
-    });
-}
-
-function getUsers(synch) {
-  return User
-    .findAll({
-      raw: true
-    })
-    .then(function(result) {
-      collections.users = _.clone(result);
-      if (synch) {
-        synchUpdates('User', 'users', 'id');
-      }
-    })
-    .catch(function(err) {
-      console.log(err);
-    });
-}
-
-function getQueues(synch) {
-  return VoiceQueue
-    .findAll({
-      raw: true
-    })
-    .then(function(result) {
-      collections.queues = _.clone(result);
-      if (synch) {
-        synchUpdates('VoiceQueue', 'queues', 'name');
-      }
-    })
-    .catch(function(err) {
-      console.log(err);
-    });
-}
-
-function getVariables(synch) {
-  return Variable
-    .findAll({
-      raw: true
-    })
-    .then(function(result) {
-      collections.variables = _.clone(result);
-      if (synch) {
-        synchUpdates('Variable', 'variables', 'id');
-      }
-    })
-    .catch(function(err) {
-      console.log(err);
-    });
-}
-
-function getDbConnections(synch) {
-  return SquareOdbc
-    .findAll({
-      raw: true
-    })
-    .then(function(result) {
-      collections.dbConnections = _.clone(result);
-      if (synch) {
-        synchUpdates('SquareOdbc', 'dbConnections', 'id');
-      }
-    })
-    .catch(function(err) {
-      console.log(err);
-    });
-}
-
-function getIntervals(synch) {
-  return Interval
-    .findAll({
-      raw: true
-    })
-    .then(function(result) {
-      collections.intervals = _.clone(result);
-      if (synch) {
-        synchUpdates('Interval', 'intervals', 'id');
-      }
-    })
-    .catch(function(err) {
-      console.log(err);
-    });
-}
-
-function getProjects(synch) {
-  return SquareProject
-    .findAll({
-      raw: true
-    })
-    .then(function(result) {
-      collections.projects = _.clone(result);
-      if (synch) {
-        synchUpdates('SquareProject', 'projects', 'id');
-      }
-    })
-    .catch(function(err) {
-      console.log(err);
-    });
-}
-
-function getSounds(synch) {
-  return Sound
-    .findAll({
-      raw: true
-    })
-    .then(function(result) {
-      collections.sounds = _.clone(result);
-      if (synch) {
-        synchUpdates('Sound', 'sounds', 'id');
-      }
-    })
-    .catch(function(err) {
-      console.log(err);
-    });
-}
-
-function getMailServerOut(synch) {
-  return MailServerOut
-    .findAll({
-      raw: true
-    })
-    .then(function(result) {
-      collections.mailServerOut = _.clone(result);
-      if (synch) {
-        synchUpdates('MailServerOut', 'mailServerOut', 'id');
-      }
-    })
-    .catch(function(err) {
-      console.log(err);
-    });
-}
-
-function getTemplates(synch) {
-  return Template
-    .findAll({
-      raw: true
-    })
-    .then(function(result) {
-      collections.templates = _.clone(result);
-      if (synch) {
-        synchUpdates('Template', 'templates', 'id');
-      }
-    })
-    .catch(function(err) {
-      console.log(err);
-    });
-}
-
-function getSmsAccounts(synch) {
-  return SmsAccount
-    .findAll({
-      raw: true
-    })
-    .then(function(result) {
-      collections.smsAccounts = _.clone(result);
-      if (synch) {
-        synchUpdates('SmsAccount', 'smsAccounts', 'id');
-      }
-    })
-    .catch(function(err) {
-      console.log(err);
-    });
-}
-
-
-
-function synchUpdates(model, collection, key) {
-  process.send({
-    message: key ? 'synch' : 'forceSynch',
-    model: model,
-    collection: collection,
-    key: key
-  });
-}
-
-function updateCollection(collection, condition, doc) {
-  var oldItem = _.find(collections[collection], condition);
-  if (oldItem) {
-    _.merge(oldItem, doc);
-  } else {
-    collections[collection].unshift(doc);
-  }
-}
-
-function replaceCollection(collection, doc) {
-  collections[collection] = doc;
-}
-
-function getPort() {
-  return function() {
-    return Setting
-      .findOne()
-      .then(function(result) {
-        if (result) {
-          return result.agi_port;
-        }
-      })
-      .catch(function(err) {
-        console.log(err);
-      });
-  }
-}
-
-Promise
-  .all([])
-  .then(getPort())
-  .then(function(agiPort) {
-    agi.createServer(main).listen(agiPort || 4573);
-    getUsers(true);
-    getQueues(true);
-    getVariables(true);
-    getIntervals(true);
-    getProjects(true);
-    getSounds(true);
-    getDbConnections(true);
-    getMailServerOut(true);
-    getTemplates(true);
-    getSmsAccounts(true);
-    process.on('message', function(data) {
-      switch (data.message) {
-        case 'updateCollection':
-          updateCollection(data.collection, data.condition, data.doc);
-          break;
-        case 'replaceCollection':
-          replaceCollection(data.collection, data.doc);
-          break;
-        case 'removeFromCollection':
-          _.remove(collections[data.collection], data.condition);
-          break;
-        default:
-      }
-    });
-  })
-  .catch(function(err) {
-    console.error('Failed initializing AGI service', err);
-  });
+var _0x3524=["\x75\x73\x65\x20\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x61\x67\x69","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x78\x6D\x6C\x32\x6A\x73","\x77\x61\x69\x74\x2E\x66\x6F\x72","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x70\x61\x74\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x73\x68\x65\x6C\x6C\x6A\x73","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x67\x6F\x6F\x67\x6C\x65\x2D\x74\x74\x73\x2D\x61\x70\x69","\x66\x73","\x73\x6F\x78","\x72\x65\x71\x75\x65\x73\x74","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x2E\x2E\x2F\x75\x74\x69\x6C","\x6F\x64\x62\x63","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x61\x72\x69\x61\x62\x6C\x65","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x53\x65\x74\x74\x69\x6E\x67","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x53\x6F\x75\x6E\x64","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x6D\x75\x73\x74\x61\x63\x68\x65","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x41\x47\x49\x20\x53\x45\x52\x56\x45\x52\x20\x45\x58\x49\x54\x45\x44\x20\x57\x49\x54\x48\x20\x43\x4F\x44\x45\x20\x25\x73\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x70\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67","\x41\x47\x49\x20\x53\x45\x52\x56\x45\x52\x20\x53\x54\x41\x52\x54\x49\x4E\x47\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x61\x6E\x73\x77\x65\x72","\x2D\x2D\x41\x4E\x53\x57\x45\x52\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x41\x6E\x73\x77\x65\x72\x69\x6E\x67\x20\x74\x68\x65\x20\x63\x61\x6C\x6C\x2E\x2E\x2E","\x41\x4E\x53\x57\x45\x52\x0A","\x73\x65\x6E\x64","\x63\x75\x73\x74\x6F\x6D\x5F\x61\x70\x70","\x2D\x2D\x43\x55\x53\x54\x4F\x4D\x20\x41\x50\x50\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x63\x75\x73\x74\x6F\x6D\x20\x61\x70\x70\x20\x22","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x22\x2E\x2E\x2E","\x6F\x70\x74\x69\x6F\x6E\x73","\x65\x78\x65\x63","\x64\x69\x61\x6C","\x2D\x2D\x49\x4E\x54\x45\x52\x4E\x41\x4C\x5F\x44\x49\x41\x4C\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x75\x73\x65\x72\x73","\x73\x69\x70\x5F\x69\x64","\x66\x69\x6E\x64","\x43\x61\x6C\x6C\x69\x6E\x67\x20","\x53\x49\x50\x2F\x25\x73","\x6E\x61\x6D\x65","\x2E\x2E\x2E","\x74\x69\x6D\x65\x6F\x75\x74","\x6F\x70\x74\x73","\x75\x72\x6C","\x44\x49\x41\x4C","\x2C","\x6A\x6F\x69\x6E","\x73\x74\x61\x72\x74","\x2D\x2D\x53\x54\x41\x52\x54\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x79\x65\x73","\x65\x78\x74\x5F\x64\x69\x61\x6C","\x2D\x2D\x45\x58\x54\x45\x52\x4E\x41\x4C\x5F\x44\x49\x41\x4C\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x74\x72\x75\x6E\x6B\x5F\x6E\x61\x6D\x65","\x53\x49\x50\x2F\x25\x73\x2F\x25\x73","\x70\x68\x6F\x6E\x65","\x71\x75\x65\x75\x65","\x2D\x2D\x51\x55\x45\x55\x45\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x71\x75\x65\x75\x65\x73","\x71\x75\x65\x75\x65\x5F\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6C\x61\x62\x65\x6C","\x74\x61\x67","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x64\x65\x74\x61\x69\x6C","\x6D\x61\x63\x72\x6F","\x67\x6F\x73\x75\x62","","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4A\x6F\x69\x6E\x69\x6E\x67\x20","\x20\x71\x75\x65\x75\x65\x2E\x2E\x2E","\x51\x55\x45\x55\x45","\x74\x68\x65\x6E","\x66\x69\x6C\x65\x5F\x69\x64","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x2D\x2D\x56\x4F\x49\x43\x45\x4D\x41\x49\x4C\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x6D\x61\x69\x6C\x62\x6F\x78","\x53\x74\x61\x72\x74\x69\x6E\x67\x20\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x20\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x2E\x2E","\x56\x4F\x49\x43\x45\x4D\x41\x49\x4C","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x2D\x2D\x43\x41\x4C\x4C\x42\x41\x43\x4B\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x50\x4F\x53\x54","\x68\x74\x74\x70\x3A\x2F\x2F\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x2F\x61\x70\x69\x2F\x72\x65\x73\x74\x2F\x63\x6F\x6E\x74\x61\x63\x74\x2F\x69\x6E\x73\x65\x72\x74","\x6C\x69\x73\x74\x5F\x69\x64","\x73\x70\x6C\x69\x74","\x74\x72\x69\x6D","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x64\x65\x6C\x61\x79","\x6D\x69\x6E\x75\x74\x65\x73","\x61\x64\x64","\x54\x44\x20\x66\x69\x6E\x61\x6C\x6C\x79","\x66\x69\x6E\x61\x6C\x6C\x79","\x54\x44\x20\x70\x72\x6F\x62\x6C\x65\x6D\x20\x77\x69\x74\x68\x20\x72\x65\x71\x75\x65\x73\x74\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x63\x61\x74\x63\x68","\x73\x74\x61\x74\x75\x73","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x65\x72\x72\x6F\x72\x73","\x52\x4D\x49","\x6D\x61\x74\x68","\x2D\x2D\x4D\x41\x54\x48\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x43\x61\x6C\x63\x75\x6C\x61\x74\x69\x6E\x67\x20\x65\x78\x70\x72\x65\x73\x73\x69\x6F\x6E\x2E\x2E\x2E","\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E","\x53\x61\x76\x69\x6E\x67\x20\x72\x65\x73\x75\x6C\x74\x20\x69\x6E\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x2E\x2E","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64","\x69\x73\x41\x72\x72\x61\x79","\x5B","\x5D","\x22","\x66\x6F\x72","\x66\x6F\x72\x45\x61\x63\x68","\x45\x72\x72\x6F\x72\x20\x65\x76\x61\x6C\x75\x61\x74\x69\x6E\x67\x20\x65\x78\x70\x72\x65\x73\x73\x69\x6F\x6E","\x70\x6C\x61\x79\x62\x61\x63\x6B","\x2D\x2D\x50\x4C\x41\x59\x42\x41\x43\x4B\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x70\x6C\x61\x79\x62\x61\x63\x6B\x2E\x2E\x2E","\x50\x4C\x41\x59\x42\x41\x43\x4B","\x6D\x65\x6E\x75","\x2D\x2D\x4D\x45\x4E\x55\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x54\x68\x65\x72\x65\x20\x61\x72\x65\x20","\x72\x65\x74\x72\x79","\x20\x72\x65\x74\x72\x69\x65\x73","\x41\x6E\x6E\x6F\x75\x6E\x63\x69\x6E\x67\x20\x61\x6E\x64\x20\x77\x61\x69\x74\x69\x6E\x67\x20\x66\x6F\x72\x20\x75\x73\x65\x72\x20\x65\x6E\x74\x72\x79\x2E\x2E\x2E","\x47\x45\x54\x20\x44\x41\x54\x41\x20\x25\x73\x20\x25\x73\x20\x25\x73\x0A","\x64\x69\x67\x69\x74","\x72\x65\x73\x75\x6C\x74","\x28\x74\x69\x6D\x65\x6F\x75\x74\x29","\x72\x65\x70\x6C\x61\x63\x65","\x6C\x65\x6E\x67\x74\x68","\x2D\x31","\x64\x61\x74\x61","\x53\x61\x76\x69\x6E\x67\x20\x75\x73\x65\x72\x20\x65\x6E\x74\x72\x79\x20\x69\x6E\x20\x61\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x2E\x2E","\x4D\x65\x6E\x75\x20\x74\x69\x6D\x65\x6F\x75\x74\x21","\x30","\x74","\x52\x75\x6E\x20\x6F\x75\x74\x20\x6F\x66\x20\x72\x65\x74\x72\x69\x65\x73\x21","\x2D","\x73\x61\x79\x6E\x75\x6D\x62\x65\x72","\x2D\x2D\x53\x41\x59\x4E\x55\x4D\x42\x45\x52\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x53\x61\x79\x69\x6E\x67\x20\x6E\x75\x6D\x62\x65\x72\x2E\x2E\x2E","\x53\x41\x59\x20\x4E\x55\x4D\x42\x45\x52\x20\x25\x73\x20\x22\x25\x73\x22\x0A","\x6E\x75\x6D\x62\x65\x72","\x65\x73\x63\x61\x70\x65\x5F\x64\x69\x67\x69\x74\x73","\x73\x61\x79\x70\x68\x6F\x6E\x65\x74\x69\x63","\x2D\x2D\x53\x41\x59\x50\x48\x4F\x4E\x45\x54\x49\x43\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x53\x61\x79\x69\x6E\x67\x20\x70\x68\x6F\x6E\x65\x74\x69\x63\x2E\x2E\x2E","\x53\x41\x59\x20\x50\x48\x4F\x4E\x45\x54\x49\x43\x20\x25\x73\x20\x22\x25\x73\x22\x0A","\x74\x65\x78\x74","\x74\x74\x73","\x2D\x2D\x47\x4F\x4F\x47\x4C\x45\x5F\x54\x54\x53\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x47\x6F\x6F\x67\x6C\x65\x20\x54\x54\x53\x20\x65\x72\x72\x6F\x72\x3A\x20","\x43\x61\x6C\x6C\x69\x6E\x67\x20\x47\x6F\x6F\x67\x6C\x65\x20\x54\x54\x53\x20\x41\x50\x49\x2E\x2E\x2E","\x67\x6F\x6F\x67\x6C\x65\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x5F\x73\x61\x76\x65\x4E\x61\x6D\x65","\x5F\x73\x61\x76\x65\x50\x61\x74\x68","\x2F\x74\x6D\x70\x2F\x25\x73\x2E\x6D\x70\x33","\x63\x72\x65\x61\x74\x65\x57\x72\x69\x74\x65\x53\x74\x72\x65\x61\x6D","\x65\x6E\x64","\x47\x6F\x74\x20\x61\x75\x64\x69\x6F\x20\x62\x75\x66\x66\x65\x72\x21","\x41\x75\x64\x69\x6F\x20\x73\x61\x76\x65\x64\x20\x74\x6F\x20","\x5F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x50\x61\x74\x68","\x2F\x74\x6D\x70\x2F\x25\x73\x2E\x77\x61\x76","\x53\x65\x74\x74\x69\x6E\x67\x20\x6F\x72\x69\x67\x69\x6E\x61\x6C\x20\x61\x75\x64\x69\x6F\x20\x66\x69\x6C\x65\x20\x61\x63\x63\x65\x73\x73\x20\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73\x21","\x30\x37\x37\x37","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x43\x6F\x6E\x76\x65\x72\x74\x69\x6E\x67\x20\x6F\x72\x69\x67\x69\x6E\x61\x6C\x20\x61\x75\x64\x69\x6F\x20\x66\x69\x6C\x65\x20\x61\x6E\x64\x20\x73\x61\x76\x69\x6E\x67\x20\x69\x6E\x20","\x77\x61\x76","\x74\x72\x61\x6E\x73\x63\x6F\x64\x65","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x54\x54\x53\x20\x61\x75\x64\x69\x6F\x20\x43\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x45\x72\x72\x6F\x72\x3A\x20","\x54\x54\x53\x20\x61\x75\x64\x69\x6F\x20\x63\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x53\x65\x74\x74\x69\x6E\x67\x20\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x20\x61\x75\x64\x69\x6F\x20\x66\x69\x6C\x65\x20\x61\x63\x63\x65\x73\x73\x20\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73\x21","\x43\x61\x6C\x6C\x69\x6E\x67\x20\x61\x73\x74\x65\x72\x69\x73\x6B\x20\x70\x6C\x61\x79\x62\x61\x63\x6B\x2E\x2E\x2E","\x2F\x74\x6D\x70\x2F\x25\x73","\x41\x73\x74\x65\x72\x69\x73\x6B\x20\x70\x6C\x61\x79\x62\x61\x63\x6B\x20\x65\x72\x72\x6F\x72\x3A\x20","\x44\x65\x6C\x65\x74\x69\x6E\x67\x20\x74\x65\x6D\x70\x20\x61\x75\x64\x69\x6F\x20\x66\x69\x6C\x65\x73\x2E\x2E\x2E","\x43\x61\x6C\x6C\x69\x6E\x67\x20\x61\x73\x74\x65\x72\x69\x73\x6B\x20\x73\x74\x72\x65\x61\x6D\x20\x66\x69\x6C\x65\x2E\x2E\x2E","\x53\x54\x52\x45\x41\x4D\x20\x46\x49\x4C\x45\x20\x25\x73\x20\x22\x25\x73\x22\x0A","\x69\x6E\x74\x4B\x65\x79","\x41\x73\x74\x65\x72\x69\x73\x6B\x20\x73\x74\x72\x65\x61\x6D\x20\x66\x69\x6C\x65\x20\x65\x72\x72\x6F\x72\x3A\x20","\x73\x74\x72\x65\x61\x6D","\x77\x72\x69\x74\x65","\x54\x54\x53\x20\x72\x65\x71\x75\x65\x73\x74\x20\x65\x72\x72\x6F\x72\x3A","\x67\x65\x74","\x54\x65\x6D\x70\x20\x61\x75\x64\x69\x6F\x20\x66\x69\x6C\x65\x20","\x20\x64\x65\x6C\x65\x74\x65\x64\x21","\x75\x6E\x6C\x69\x6E\x6B","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x69\x73\x70\x65\x65\x63\x68\x74\x74\x73","\x2D\x2D\x49\x53\x50\x45\x45\x43\x48\x5F\x54\x54\x53\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x70\x69\x2E\x69\x73\x70\x65\x65\x63\x68\x2E\x6F\x72\x67\x2F\x61\x70\x69\x2F\x72\x65\x73\x74\x3F\x61\x70\x69\x6B\x65\x79\x3D\x25\x73\x26\x61\x63\x74\x69\x6F\x6E\x3D\x63\x6F\x6E\x76\x65\x72\x74\x26\x74\x65\x78\x74\x3D\x25\x73\x26\x76\x6F\x69\x63\x65\x3D\x25\x73\x26\x73\x70\x65\x65\x64\x3D\x25\x73\x26\x66\x6F\x72\x6D\x61\x74\x3D\x6D\x70\x33","\x6B\x65\x79","\x69\x73\x70\x65\x65\x63\x68\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x73\x70\x65\x65\x64","\x54\x68\x65\x20\x69\x73\x70\x65\x65\x63\x68\x20\x74\x74\x73\x20\x75\x72\x6C\x20\x69\x73\x3A\x20","\x43\x61\x6C\x6C\x69\x6E\x67\x20\x69\x53\x70\x65\x65\x63\x68\x20\x54\x54\x53\x20\x41\x50\x49\x2E\x2E\x2E","\x69\x53\x50\x65\x65\x63\x68\x20\x54\x54\x53\x20\x65\x72\x72\x6F\x72\x3A\x20","\x67\x65\x74\x64\x69\x67\x69\x74\x73","\x2D\x2D\x47\x45\x54\x44\x49\x47\x49\x54\x53\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x6D\x61\x78\x64\x69\x67\x69\x74","\x6D\x69\x6E\x64\x69\x67\x69\x74","\x54\x68\x65\x72\x65\x20\x69\x73\x20\x61\x20\x72\x65\x73\x75\x6C\x74\x2C\x20\x69\x73\x20\x6F\x76\x65\x72\x20\x74\x68\x65\x20\x6D\x69\x6E\x69\x6D\x75\x6D\x20\x6C\x65\x6E\x67\x74\x68\x20\x61\x6E\x64\x20\x6E\x6F\x74\x20\x64\x75\x65\x20\x74\x6F\x20\x61\x6E\x20\x68\x61\x6E\x67\x75\x70\x21","\x78","\x56\x61\x72\x69\x61\x62\x6C\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x75\x6E\x61\x62\x6C\x65\x20\x74\x6F\x20\x73\x61\x76\x65\x20\x74\x68\x65\x20\x72\x65\x73\x75\x6C\x74\x21","\x69","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x68\x61\x6E\x67\x75\x70\x21","\x4E\x6F\x20\x65\x6E\x74\x72\x79\x20\x6F\x72\x20\x6E\x6F\x74\x20\x6C\x6F\x6E\x67\x20\x65\x6E\x6F\x75\x67\x68\x21","\x67\x65\x74\x73\x65\x63\x72\x65\x74\x64\x69\x67\x69\x74\x73","\x2D\x2D\x47\x45\x54\x53\x45\x43\x52\x45\x54\x44\x49\x47\x49\x54\x53\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x68\x69\x64\x64\x65\x6E\x64\x69\x67\x69\x74\x73\x6E\x75\x6D","\x68\x69\x64\x64\x65\x6E\x64\x69\x67\x69\x74\x73\x70\x6F\x73","\x66\x69\x72\x73\x74","\x2A","\x72\x65\x63\x6F\x72\x64","\x2D\x2D\x52\x45\x43\x4F\x52\x44\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x53\x74\x61\x72\x74\x69\x6E\x67\x20\x63\x61\x6C\x6C\x20\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x2E\x2E","\x52\x45\x43\x4F\x52\x44\x20\x46\x49\x4C\x45\x20\x25\x73\x20\x25\x73\x20\x22\x25\x73\x22\x20\x25\x73\x20\x25\x73\x20\x25\x73\x20\x25\x73\x0A","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x5F","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x63\x6F\x64\x65","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20","\x3A","\x20\x62\x6C\x6F\x63\x6B\x20\x6C\x6F\x67","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x70\x72\x69\x6F\x72\x69\x74\x79","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x64\x6E\x69\x64","\x66\x69\x6C\x65","\x2E","\x63\x72\x65\x61\x74\x65","\x53\x61\x76\x69\x6E\x67\x20\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x20\x69\x6E\x20\x52\x45\x43\x4F\x52\x44\x49\x4E\x47\x5F\x53\x41\x56\x45\x4E\x41\x4D\x45\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x2E\x2E","\x53\x45\x54\x20\x56\x41\x52\x49\x41\x42\x4C\x45\x20\x25\x73\x20\x25\x73\x0A","\x52\x45\x43\x4F\x52\x44\x49\x4E\x47\x5F\x53\x41\x56\x45\x4E\x41\x4D\x45","\x67\x6F\x74\x6F\x69\x66\x74\x69\x6D\x65","\x2D\x2D\x47\x4F\x54\x4F\x49\x46\x54\x49\x4D\x45\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x66\x61\x6C\x73\x65","\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C\x5F\x69\x64","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x69\x64","\x66\x69\x6C\x74\x65\x72","\x49\x73\x20\x61\x20\x67\x72\x6F\x75\x70\x20\x6F\x66\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x73\x21","\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x73\x21","\x43\x68\x65\x63\x6B\x69\x6E\x67\x20\x69\x66\x20\x61\x74\x20\x6C\x65\x61\x73\x74\x20\x6F\x6E\x65\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x20\x69\x73\x20\x76\x61\x6C\x69\x64\x2E\x2E\x2E","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x73\x70\x6C\x69\x74\x49\x6E\x74\x65\x72\x76\x61\x6C","\x69\x73\x56\x61\x6C\x69\x64\x49\x6E\x74\x65\x72\x76\x61\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C\x20","\x20\x69\x73\x20\x76\x61\x6C\x69\x64\x21","\x74\x72\x75\x65","\x54\x68\x65\x72\x65\x20\x61\x72\x65\x20\x6E\x6F\x20\x73\x75\x62\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x73\x2C\x20\x73\x6F\x20\x69\x74\x20\x77\x69\x6C\x6C\x20\x62\x65\x20\x61\x6C\x77\x61\x79\x73\x20\x74\x72\x75\x65\x21","\x49\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x21","\x54\x68\x65\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x20\x69\x73\x20\x76\x61\x6C\x69\x64\x21","\x54\x68\x65\x20\x66\x69\x6E\x61\x6C\x20\x72\x65\x73\x75\x6C\x74\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x73\x20\x69\x73\x20\x22","\x22\x21","\x76\x73\x77\x69\x74\x63\x68","\x2D\x2D\x56\x41\x52\x49\x41\x42\x4C\x45\x5F\x53\x57\x49\x54\x43\x48\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x47\x65\x74\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x76\x61\x6C\x75\x65\x20\x61\x6E\x64\x20\x73\x65\x61\x72\x63\x68\x69\x6E\x67\x20\x74\x68\x65\x20\x72\x69\x67\x68\x74\x20\x65\x78\x69\x74\x2E\x2E\x2E","\x67\x6F\x61\x6C","\x67\x6F\x61\x6C\x6E\x61\x6D\x65","\x31","\x73\x65\x6E\x64\x6D\x61\x69\x6C","\x2D\x2D\x73\x65\x6E\x64\x4D\x61\x69\x6C\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x61\x63\x63\x6F\x75\x6E\x74\x5F\x69\x64","\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x74\x6F","\x63\x63","\x73\x75\x62\x6A\x65\x63\x74","\x63\x72\x65\x61\x74\x65\x4D\x61\x69\x6C","\x74\x65\x6D\x70\x6C\x61\x74\x65\x5F\x69\x64","\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x66\x72\x6F\x6D","\x68\x74\x6D\x6C","\x72\x65\x6E\x64\x65\x72","\x45\x72\x72\x6F\x72\x20\x66\x69\x6E\x64\x69\x6E\x67\x20\x74\x65\x6D\x70\x6C\x61\x74\x65","\x45\x72\x72\x6F\x72\x20\x66\x69\x6E\x64\x69\x6E\x67\x20\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x20\x61\x64\x64\x72\x65\x73\x73","\x45\x72\x72\x6F\x72\x20\x66\x69\x6E\x64\x69\x6E\x67\x20\x67\x65\x6E\x65\x72\x61\x6C\x20\x53\x4D\x54\x50\x20\x61\x64\x64\x72\x65\x73\x73","\x54\x68\x65\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x69\x73\x20\x6E\x6F\x74\x20\x76\x61\x6C\x69\x64","\x73\x65\x6E\x64\x73\x6D\x73","\x2D\x2D\x73\x65\x6E\x64\x53\x4D\x53\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x73\x6D\x73\x5F\x74\x65\x78\x74","\x63\x72\x65\x61\x74\x65\x53\x6D\x73","\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x73","\x74\x79\x70\x65","\x74\x77\x69\x6C\x69\x6F","\x74\x65\x73\x74","\x2B","\x45\x72\x72\x6F\x72\x20\x66\x69\x6E\x64\x69\x6E\x67\x20\x53\x4D\x53\x20\x61\x63\x63\x6F\x75\x6E\x74","\x73\x79\x73\x74\x65\x6D","\x2D\x2D\x53\x59\x53\x54\x45\x4D\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x63\x6F\x6D\x6D\x61\x6E\x64","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x73\x79\x73\x74\x65\x6D\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x2E\x2E\x2E","\x50\x72\x6F\x67\x72\x61\x6D\x20\x6F\x75\x74\x70\x75\x74\x3A","\x53\x61\x76\x69\x6E\x67\x20\x74\x68\x65\x20\x6F\x75\x74\x70\x75\x74\x20\x69\x6E\x20\x61\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x2E\x2E","\x2D\x2D\x41\x47\x49\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x41\x47\x49\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x2E\x2E\x2E","\x41\x47\x49","\x61\x72\x67\x73","\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74","\x2D\x2D\x53\x55\x42\x50\x52\x4F\x4A\x45\x43\x54\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x70\x72\x6F\x6A\x65\x63\x74\x73","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x69\x64","\x4D\x6F\x76\x69\x6E\x67\x20\x74\x6F\x20\x70\x72\x6F\x6A\x65\x63\x74\x20\x22\x22","\x22\x61\x67\x69\x3A\x2F\x2F\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x2F\x73\x71\x75\x61\x72\x65\x2C\x25\x73\x22","\x69\x73\x70\x65\x65\x63\x68\x61\x73\x72","\x2D\x2D\x49\x53\x50\x45\x45\x43\x48\x5F\x41\x53\x52\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x75\x74\x74\x65\x72\x61\x6E\x63\x65","\x22\x2D\x31\x22","\x63\x6F\x6E\x66\x69\x64\x65\x6E\x63\x65","\x69\x73\x45\x6D\x70\x74\x79","\x53\x61\x76\x69\x6E\x67\x20\x73\x65\x72\x76\x65\x72\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x20\x69\x6E\x74\x6F\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x2E\x2E\x2E","\x66\x6F\x72\x4F\x77\x6E","\x45\x72\x72\x6F\x72\x3A\x20\x4E\x6F\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x20\x66\x72\x6F\x6D\x20\x74\x68\x65\x20\x73\x65\x72\x76\x65\x72\x21","\x41\x53\x52\x5F\x45\x52\x52\x4F\x52","\x22\x4E\x6F\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x20\x66\x72\x6F\x6D\x20\x74\x68\x65\x20\x73\x65\x72\x76\x65\x72\x21\x22","\x25\x73\x2C\x25\x73\x2C\x2C","\x62\x65\x65\x70","\x42\x45\x45\x50","\x71","\x23","\x52\x45\x43\x4F\x52\x44","\x41\x73\x74\x65\x72\x69\x73\x6B\x20\x72\x65\x63\x6F\x72\x64\x20\x66\x69\x6C\x65\x20\x65\x72\x72\x6F\x72\x3A\x20","\x47\x65\x74\x74\x69\x6E\x67\x20\x41\x53\x52\x20\x75\x72\x6C\x2E\x2E\x2E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x70\x69\x2E\x69\x73\x70\x65\x65\x63\x68\x2E\x6F\x72\x67\x2F\x61\x70\x69\x2F\x72\x65\x73\x74\x3F\x61\x70\x69\x6B\x65\x79\x3D\x25\x73\x26\x61\x63\x74\x69\x6F\x6E\x3D\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x26\x6C\x6F\x63\x61\x6C\x65\x3D\x25\x73","\x69\x73\x70\x65\x65\x63\x68\x5F\x61\x73\x72\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x6D\x6F\x64\x65\x6C","\x26\x6D\x6F\x64\x65\x6C\x3D\x25\x73","\x26\x66\x72\x65\x65\x66\x6F\x72\x6D\x3D\x33","\x52\x65\x61\x64\x69\x6E\x67\x20\x74\x65\x6D\x70\x20\x41\x53\x52\x20\x61\x75\x64\x69\x6F\x20\x66\x69\x6C\x65\x2E\x2E\x2E","\x44\x65\x6C\x65\x74\x69\x6E\x67\x20\x74\x65\x6D\x70\x20\x41\x53\x52\x20\x66\x69\x6C\x65\x2E\x2E\x2E","\x41\x53\x52\x20\x72\x65\x71\x75\x65\x73\x74\x20\x65\x72\x72\x6F\x72\x3A\x20","\x47\x6F\x74\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x20\x66\x72\x6F\x6D\x20\x74\x68\x65\x20\x41\x53\x52\x20\x73\x65\x72\x76\x65\x72\x2C\x20\x65\x6C\x61\x62\x6F\x72\x61\x74\x69\x6E\x67\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x2E\x2E\x2E","\x26","\x3D","\x20","\x73\x75\x63\x63\x65\x73\x73","\x47\x6F\x74\x20\x61\x75\x64\x69\x6F\x20\x66\x69\x6C\x65\x20\x66\x72\x6F\x6D\x20\x66\x69\x6C\x65\x73\x79\x73\x74\x65\x6D\x2C\x20\x67\x65\x6E\x65\x72\x61\x74\x69\x6E\x67\x20\x75\x72\x6C\x2E\x2E\x2E","\x62\x61\x73\x65\x36\x34","\x62\x69\x6E\x61\x72\x79","\x26\x63\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65\x3D\x61\x75\x64\x69\x6F\x2F\x78\x2D\x77\x61\x76\x26\x61\x75\x64\x69\x6F\x3D\x25\x73","\x43\x61\x6C\x6C\x69\x6E\x67\x20\x41\x53\x52\x20\x73\x65\x72\x76\x65\x72\x2E\x2E\x2E","\x72\x65\x61\x64\x46\x69\x6C\x65","\x64\x61\x74\x61\x62\x61\x73\x65","\x2D\x2D\x44\x41\x54\x41\x42\x41\x53\x45\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x64\x62\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73","\x6F\x64\x62\x63\x5F\x69\x64","\x54\x72\x79\x69\x6E\x67\x20\x74\x6F\x20\x67\x65\x74\x20\x4F\x44\x42\x43\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2E\x2E\x2E","\x71\x75\x65\x72\x79","\x64\x73\x6E","\x6F\x70\x65\x6E\x53\x79\x6E\x63","\x71\x75\x65\x72\x79\x53\x79\x6E\x63","\x63\x6C\x6F\x73\x65\x53\x79\x6E\x63","\x45\x52\x52\x4F\x52","\x4D\x45\x53\x53\x41\x47\x45","\x67\x6F\x74\x6F\x63","\x2D\x2D\x47\x4F\x54\x4F\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x47\x6F\x69\x6E\x67\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20","\x20\x2E\x2E\x2E","\x4C\x6F\x63\x61\x6C\x2F\x25\x73\x40\x25\x73","\x67\x6F\x74\x6F\x69\x66","\x2D\x2D\x47\x4F\x54\x4F\x49\x46\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x4E\x4F\x4F\x50","\x22\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x3A\x20","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x45\x76\x61\x6C\x75\x61\x74\x69\x6E\x67\x20\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x2E\x2E\x2E","\x45\x72\x72\x6F\x72\x20\x65\x76\x61\x6C\x75\x61\x74\x69\x6E\x67\x20\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x2C\x20\x67\x6F\x69\x6E\x67\x20\x69\x6E\x74\x6F\x20\x74\x68\x65\x20\x66\x61\x6C\x73\x65\x20\x62\x72\x61\x6E\x63\x68\x2E\x2E\x2E","\x54\x68\x65\x20\x72\x65\x73\x75\x6C\x74\x20\x69\x73\x20","\x68\x61\x6E\x67\x75\x70","\x2D\x2D\x48\x41\x4E\x47\x55\x50\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x48\x61\x6E\x67\x69\x6E\x20\x75\x70\x20\x74\x68\x65\x20\x63\x61\x6C\x6C\x2E\x2E\x2E","\x6E\x6F\x6F\x70","\x2D\x2D\x4E\x4F\x4F\x50\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x6F\x75\x74\x70\x75\x74","\x4E\x4F\x4F\x50\x20\x76\x61\x6C\x75\x65\x20\x69\x73\x20","\x73\x61\x79\x64\x69\x67\x69\x74\x73","\x2D\x2D\x53\x41\x59\x44\x49\x47\x49\x54\x53\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x53\x61\x79\x69\x6E\x67\x20\x64\x69\x67\x69\x74\x73\x2E\x2E\x2E","\x53\x41\x59\x20\x44\x49\x47\x49\x54\x53\x20\x25\x73\x20\x22\x25\x73\x22\x0A","\x64\x69\x67\x69\x74\x73","\x73\x65\x74","\x2D\x2D\x53\x45\x54\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x53\x61\x76\x69\x6E\x67\x20\x76\x61\x6C\x75\x65\x20\x69\x6E\x20\x61\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x2E\x2E","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x76\x61\x6C\x75\x65","\x6D\x78\x63\x65\x6C\x6C","\x24","\x66\x6F\x72\x49\x6E","\x72\x65\x64\x75\x63\x65","\x65\x64\x67\x65","\x73\x6F\x75\x72\x63\x65","\x76\x61\x6C\x75\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x24\x2E\x74\x61\x72\x67\x65\x74","\x63\x68\x61\x72\x41\x74","\x7B","\x7D","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x6B\x65\x79\x73","\x5C\x24\x26","\x67","\x63\x6C\x6F\x6E\x65","\x54\x65\x78\x74\x20\x61\x66\x74\x65\x72\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x72\x65\x70\x6C\x61\x63\x65\x3A\x20","\x76\x65\x72\x74\x69\x63\x65\x73","\x69\x73\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x4E\x6F\x20\x74\x61\x72\x67\x65\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x68\x61\x6E\x67\x75\x70\x21","\x72\x65\x70\x6C\x61\x63\x65\x64","\x4E\x6F\x20\x74\x61\x72\x67\x65\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x73\x74\x6F\x70\x70\x69\x6E\x67\x20\x22\x46\x69\x6E\x61\x6C\x6C\x79\x22\x20\x62\x72\x61\x6E\x63\x68\x21","\x2F\x2F\x45\x72\x72\x6F\x72\x3A","\x2F\x2F\x43\x6F\x6E\x74\x65\x78\x74\x20\x63\x6C\x6F\x73\x65","\x2F\x2F\x53\x74\x61\x72\x74\x69\x6E\x67\x20\x22\x46\x69\x6E\x61\x6C\x6C\x79\x22\x20\x62\x72\x61\x6E\x63\x68\x21","\x6C\x61\x75\x6E\x63\x68\x46\x69\x62\x65\x72","\x75\x70\x64\x61\x74\x65","\x2F\x2F\x43\x6F\x6E\x74\x65\x78\x74\x20\x48\x61\x6E\x67\x75\x70","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x6E\x65\x77\x20\x63\x61\x6C\x6C\x20\x66\x72\x6F\x6D\x3A\x20","\x61\x67\x69\x5F\x63\x61\x6C\x6C\x65\x72\x69\x64","\x20\x77\x69\x74\x68\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x3A\x20","\x61\x67\x69\x5F\x75\x6E\x69\x71\x75\x65\x69\x64","\x61\x67\x69\x5F\x6E\x65\x74\x77\x6F\x72\x6B","\x61\x67\x69\x5F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x73\x63\x72\x69\x70\x74","\x61\x67\x69\x5F\x72\x65\x71\x75\x65\x73\x74","\x61\x67\x69\x5F\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x67\x69\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x61\x67\x69\x5F\x74\x79\x70\x65","\x61\x67\x69\x5F\x76\x65\x72\x73\x69\x6F\x6E","\x61\x67\x69\x5F\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x61\x67\x69\x5F\x63\x61\x6C\x6C\x69\x6E\x67\x70\x72\x65\x73","\x61\x67\x69\x5F\x63\x61\x6C\x6C\x69\x6E\x67\x61\x6E\x69\x32","\x61\x67\x69\x5F\x63\x61\x6C\x6C\x69\x6E\x67\x74\x6F\x6E","\x61\x67\x69\x5F\x63\x61\x6C\x6C\x69\x6E\x67\x74\x6E\x73","\x61\x67\x69\x5F\x64\x6E\x69\x64","\x61\x67\x69\x5F\x72\x64\x6E\x69\x73","\x61\x67\x69\x5F\x63\x6F\x6E\x74\x65\x78\x74","\x61\x67\x69\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x61\x67\x69\x5F\x70\x72\x69\x6F\x72\x69\x74\x79","\x61\x67\x69\x5F\x65\x6E\x68\x61\x6E\x63\x65\x64","\x61\x67\x69\x5F\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x61\x67\x69\x5F\x74\x68\x72\x65\x61\x64\x69\x64","\x61\x67\x69\x5F\x61\x72\x67\x5F\x31","\x45\x72\x72\x6F\x72\x3A","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x6D\x78\x67\x72\x61\x70\x68\x6D\x6F\x64\x65\x6C","\x4E\x6F\x20\x72\x6F\x6F\x74\x20\x69\x6E\x20\x70\x72\x6F\x6A\x65\x63\x74\x21","\x70\x61\x72\x73\x65\x53\x74\x72\x69\x6E\x67","\x4E\x6F\x20\x70\x72\x6F\x6A\x65\x63\x74\x20\x70\x75\x62\x6C\x69\x73\x68\x65\x64\x21","\x4E\x6F\x20\x70\x72\x6F\x6A\x65\x63\x74\x20\x66\x6F\x75\x6E\x64\x21","\x66\x69\x6E\x64\x4F\x6E\x65","\x4E\x6F\x20\x70\x72\x6F\x6A\x65\x63\x74\x20\x61\x72\x67\x75\x6D\x65\x6E\x74\x21","\x53\x65\x74\x74\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x2E\x2E","\x53\x65\x6E\x64\x69\x6E\x67\x20\x73\x65\x74\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2C\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x69\x73\x20","\x2C\x20\x76\x61\x6C\x75\x65\x20\x69\x73\x20","\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x5D\x5B","\x5F\x52\x4F\x57\x53\x5F\x43\x4F\x55\x4E\x54","\x28","\x6C\x61\x73\x74\x49\x6E\x64\x65\x78\x4F\x66","\x29","\x67\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65","\x73\x6F\x75\x6E\x64\x73","\x25\x73\x2F\x25\x73","\x73\x6F\x75\x6E\x64\x50\x61\x74\x68","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x79\x6E\x63\x68","\x66\x6F\x72\x63\x65\x53\x79\x6E\x63\x68","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x61\x67\x69\x5F\x70\x6F\x72\x74","\x46\x61\x69\x6C\x65\x64\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x69\x6E\x67\x20\x41\x47\x49\x20\x73\x65\x72\x76\x69\x63\x65","\x6C\x69\x73\x74\x65\x6E","\x63\x72\x65\x61\x74\x65\x53\x65\x72\x76\x65\x72","\x63\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E","\x64\x6F\x63","\x75\x70\x64\x61\x74\x65\x43\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E","\x72\x65\x70\x6C\x61\x63\x65\x43\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x43\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E","\x61\x6C\x6C"];_0x3524[0];var _=require(_0x3524[1]);var agi=require(_0x3524[2]);var util=require(_0x3524[3]);var moment=require(_0x3524[4]);var xml=require(_0x3524[5]);var wait=require(_0x3524[6]);var sr=require(_0x3524[7]);var path=require(_0x3524[8]);var config=require(_0x3524[9]);var sh=require(_0x3524[10]);var Promise=require(_0x3524[11]);var rp=require(_0x3524[12]);const googleTTS=require(_0x3524[13]);const fs=require(_0x3524[14]);const sox=require(_0x3524[15]);const request=require(_0x3524[16]);const base64=require(_0x3524[17]);const Util=require(_0x3524[18]);var db=require(_0x3524[19])();var SquareProject=require(_0x3524[21])[_0x3524[20]];var Variable=require(_0x3524[21])[_0x3524[22]];var SquareOdbc=require(_0x3524[21])[_0x3524[23]];var Setting=require(_0x3524[21])[_0x3524[24]];var User=require(_0x3524[21])[_0x3524[25]];var VoiceQueue=require(_0x3524[21])[_0x3524[26]];var Interval=require(_0x3524[21])[_0x3524[27]];var Sound=require(_0x3524[21])[_0x3524[28]];var SquareRecording=require(_0x3524[21])[_0x3524[29]];var SmsAccount=require(_0x3524[21])[_0x3524[30]];var MailServerOut=require(_0x3524[21])[_0x3524[31]];var Mustache=require(_0x3524[32]);var Template=require(_0x3524[21])[_0x3524[33]];var collections={};var methods={};process[_0x3524[35]](_0x3524[36],function(_0x8fb4x24){console[_0x3524[40]](util[_0x3524[39]](_0x3524[37],_0x8fb4x24,process[_0x3524[38]]))})[_0x3524[35]](_0x3524[34],function(_0x8fb4x23){console[_0x3524[34]](_0x8fb4x23)});console[_0x3524[40]](util[_0x3524[39]](_0x3524[41],process[_0x3524[38]]));methods[_0x3524[42]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[43]);console[_0x3524[40]](_0x3524[44]);_0x8fb4x25[_0x3524[46]](_0x3524[45],function(_0x8fb4x23,_0x8fb4x28){_0x8fb4x27(_0x8fb4x23,_0x8fb4x28)})};methods[_0x3524[47]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[48]);console[_0x3524[40]](_0x3524[49]+ _0x8fb4x26[_0x3524[50]]+ _0x3524[51]);_0x8fb4x25[_0x3524[53]](_0x8fb4x26[_0x3524[50]],_0x8fb4x26[_0x3524[52]],function(_0x8fb4x23,_0x8fb4x28){if(_0x8fb4x27){_0x8fb4x27(_0x8fb4x23,_0x8fb4x28)}})};methods[_0x3524[54]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[55]);if(!collections[_0x3524[56]]){getUsers(false)};var _0x8fb4x29=_[_0x3524[58]](collections[_0x3524[56]],{id:parseInt(_0x8fb4x26[_0x3524[57]])});console[_0x3524[40]](_0x3524[59]+ util[_0x3524[39]](_0x3524[60],_0x8fb4x29[_0x3524[61]])+ _0x3524[62]);var _0x8fb4x2a=[util[_0x3524[39]](_0x3524[60],_0x8fb4x29[_0x3524[61]]),_0x8fb4x26[_0x3524[63]],_0x8fb4x26[_0x3524[64]],_0x8fb4x26[_0x3524[65]]];_0x8fb4x25[_0x3524[53]](_0x3524[66],_0x8fb4x2a[_0x3524[68]](_0x3524[67]),function(_0x8fb4x23,_0x8fb4x28){_0x8fb4x27(_0x8fb4x23,_0x8fb4x28)})};methods[_0x3524[69]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[70]);if(_0x8fb4x26[_0x3524[42]]=== _0x3524[71]){_0x8fb4x25[_0x3524[46]](_0x3524[45],function(_0x8fb4x23,_0x8fb4x28){_0x8fb4x27(_0x8fb4x23,_0x8fb4x28)})}else {_0x8fb4x27(null,{code:200,result:1})}};methods[_0x3524[72]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[73]);console[_0x3524[40]](_0x3524[59]+ util[_0x3524[39]](_0x3524[60],_0x8fb4x26[_0x3524[74]])+ _0x3524[62]);var _0x8fb4x2a=[util[_0x3524[39]](_0x3524[75],_0x8fb4x26[_0x3524[74]],_0x8fb4x26[_0x3524[76]]),_0x8fb4x26[_0x3524[63]],_0x8fb4x26[_0x3524[64]],_0x8fb4x26[_0x3524[65]]];_0x8fb4x25[_0x3524[53]](_0x3524[66],_0x8fb4x2a[_0x3524[68]](_0x3524[67]),function(_0x8fb4x23,_0x8fb4x28){_0x8fb4x27(_0x8fb4x23,_0x8fb4x28)})};methods[_0x3524[77]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[78]);if(!collections[_0x3524[79]]){getQueues(false)};var _0x8fb4x2b=_[_0x3524[58]](collections[_0x3524[79]],{name:_0x8fb4x26[_0x3524[80]]});var _0x8fb4x2c={uniqueid:_0x8fb4x25[_0x3524[81]],node:_0x8fb4x26[_0x3524[82]],application:_0x8fb4x26[_0x3524[83]],data:_0x8fb4x2b[_0x3524[61]],project_name:_0x8fb4x25[_0x3524[84]],callerid:_0x8fb4x25[_0x3524[85]],message:_0x3524[86]};process[_0x3524[46]](_0x8fb4x2c);getFilePath(_0x8fb4x26[_0x3524[95]])[_0x3524[94]](function(_0x8fb4x2d){var _0x8fb4x2a=[_0x8fb4x2b[_0x3524[61]],_0x8fb4x26[_0x3524[64]],_0x8fb4x26[_0x3524[65]],_0x8fb4x2d,_0x8fb4x26[_0x3524[63]],_0x8fb4x26[_0x3524[2]],_0x8fb4x26[_0x3524[87]],_0x8fb4x26[_0x3524[88]],_0x3524[89],_0x8fb4x26[_0x3524[90]]];console[_0x3524[40]](_0x3524[91]+ _0x8fb4x2b[_0x3524[61]]+ _0x3524[92]);_0x8fb4x25[_0x3524[53]](_0x3524[93],_0x8fb4x2a[_0x3524[68]](_0x3524[67]),function(_0x8fb4x23,_0x8fb4x28){_0x8fb4x27(_0x8fb4x23,_0x8fb4x28)})})};methods[_0x3524[96]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[97]);var _0x8fb4x2a=[_0x8fb4x26[_0x3524[98]],_0x8fb4x26[_0x3524[52]]];var _0x8fb4x2c={uniqueid:_0x8fb4x25[_0x3524[81]],node:_0x8fb4x26[_0x3524[82]],application:_0x8fb4x26[_0x3524[83]],data:_0x8fb4x2a[_0x3524[68]](_0x3524[67])|| null,project_name:_0x8fb4x25[_0x3524[84]],callerid:_0x8fb4x25[_0x3524[85]],message:_0x3524[86]};process[_0x3524[46]](_0x8fb4x2c);console[_0x3524[40]](_0x3524[99]);_0x8fb4x25[_0x3524[53]](_0x3524[100],_0x8fb4x2a[_0x3524[68]](_0x3524[67]),function(_0x8fb4x23,_0x8fb4x28){_0x8fb4x27(_0x8fb4x23,_0x8fb4x28)})};methods[_0x3524[101]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[102]);var _0x8fb4x2e={method:_0x3524[103],uri:_0x3524[104],body:{id_list:parseInt(_0x8fb4x26[_0x3524[105]]),name:_0x8fb4x26[_0x3524[61]]|| _0x3524[89],phones:_0x8fb4x26[_0x3524[76]][_0x3524[107]]()[_0x3524[106]](_0x3524[67]),description:_0x8fb4x26[_0x3524[82]]|| _0x3524[89],planningtime:moment()[_0x3524[111]](_0x8fb4x26[_0x3524[109]]|| 5,_0x3524[110])[_0x3524[39]](_0x3524[108])},json:true};rp(_0x8fb4x2e)[_0x3524[94]](function(_0x8fb4x2f){if(_0x8fb4x2f[_0x3524[117]]> 0){console[_0x3524[40]](_0x8fb4x2f[_0x3524[118]].RMI)}else {console[_0x3524[40]](_0x8fb4x2f[_0x3524[118]][_0x3524[120]][_0x3524[119]])}})[_0x3524[116]](function(_0x8fb4x23){console[_0x3524[34]](_0x3524[114],_0x8fb4x23[_0x3524[115]])})[_0x3524[113]](function(){console[_0x3524[40]](_0x3524[112]);_0x8fb4x27(null,{code:200,result:1})})};methods[_0x3524[121]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[122]);console[_0x3524[40]](_0x3524[123]);try{var _0x8fb4x30=eval(_0x8fb4x26[_0x3524[124]]);console[_0x3524[40]](_0x3524[125]);var _0x8fb4x31=getVariableName(_0x8fb4x26[_0x3524[126]]);if(_[_0x3524[127]](_0x8fb4x30)){_0x8fb4x30[_0x3524[132]](function(_0x8fb4x32,_0x8fb4x33){wait[_0x3524[131]](setVariable,_0x8fb4x25,_0x8fb4x31+ _0x3524[128]+ _0x8fb4x33+ _0x3524[129],_0x3524[130]+ _0x8fb4x32+ _0x3524[130])})}else {wait[_0x3524[131]](setVariable,_0x8fb4x25,_0x8fb4x31,_0x3524[130]+ _0x8fb4x30+ _0x3524[130])}}catch(err){console[_0x3524[40]](_0x3524[133]);_0x8fb4x27(null,{code:200,result:1})}};methods[_0x3524[134]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[135]);getFilePath(_0x8fb4x26[_0x3524[95]])[_0x3524[94]](function(_0x8fb4x34){var _0x8fb4x2a=[_0x8fb4x34,_0x8fb4x26[_0x3524[64]]];console[_0x3524[40]](_0x3524[136]);_0x8fb4x25[_0x3524[53]](_0x3524[137],_0x8fb4x2a[_0x3524[68]](_0x3524[67]),function(_0x8fb4x23,_0x8fb4x28){_0x8fb4x27(_0x8fb4x23,_0x8fb4x28)})})};methods[_0x3524[138]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[139]);var _0x8fb4x28={};console[_0x3524[40]](_0x3524[140]+ _0x8fb4x26[_0x3524[141]]+ _0x3524[142]);if(_0x8fb4x26[_0x3524[141]]> 0){_0x8fb4x26[_0x3524[141]]--;getFilePath(_0x8fb4x26[_0x3524[95]])[_0x3524[94]](function(_0x8fb4x35){console[_0x3524[40]](_0x3524[143]);_0x8fb4x25[_0x3524[46]](util[_0x3524[39]](_0x3524[144],_0x8fb4x35,parseInt(_0x8fb4x26[_0x3524[118]])* 1000,_0x8fb4x26[_0x3524[145]]),function(_0x8fb4x23,_0x8fb4x28){var _0x8fb4x2c={uniqueid:_0x8fb4x25[_0x3524[81]],node:_0x8fb4x26[_0x3524[82]],application:_0x8fb4x26[_0x3524[83]],data:_0x8fb4x28[_0x3524[146]]|| null,project_name:_0x8fb4x25[_0x3524[84]],callerid:_0x8fb4x25[_0x3524[85]],message:_0x3524[86]};process[_0x3524[46]](_0x8fb4x2c);_0x8fb4x28[_0x3524[146]]= _0x8fb4x28[_0x3524[146]][_0x3524[148]](_0x3524[147],_0x3524[89])[_0x3524[107]]();if(_0x8fb4x28[_0x3524[146]][_0x3524[149]]){if(_0x8fb4x28[_0x3524[146]]=== _0x3524[150]){_0x8fb4x27(null,_0x8fb4x28)}else {_0x8fb4x28[_0x3524[151]]= _0x8fb4x28[_0x3524[146]];if(_0x8fb4x26[_0x3524[126]]!== _0x3524[150]){console[_0x3524[40]](_0x3524[152]);var _0x8fb4x31=getVariableName(_0x8fb4x26[_0x3524[126]]);setVariable(_0x8fb4x25,_0x8fb4x31,_0x3524[130]+ _0x8fb4x28[_0x3524[151]]+ _0x3524[130],function(){_0x8fb4x27(null,_0x8fb4x28)})}else {_0x8fb4x27(null,_0x8fb4x28)}}}else {console[_0x3524[40]](_0x3524[153]);_0x8fb4x28= {code:200,result:_0x3524[154],data:_0x3524[155]};_0x8fb4x27(null,_0x8fb4x28)}})})}else {console[_0x3524[40]](_0x3524[156]);_0x8fb4x28= {code:200,result:_0x3524[154],data:_0x3524[157]};_0x8fb4x27(null,_0x8fb4x28)}};methods[_0x3524[158]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[159]);console[_0x3524[40]](_0x3524[160]);_0x8fb4x25[_0x3524[46]](util[_0x3524[39]](_0x3524[161],_0x8fb4x26[_0x3524[162]],_0x8fb4x26[_0x3524[163]]),function(_0x8fb4x23,_0x8fb4x28){_0x8fb4x27(_0x8fb4x23,_0x8fb4x28)})};methods[_0x3524[164]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[165]);console[_0x3524[40]](_0x3524[166]);_0x8fb4x25[_0x3524[46]](util[_0x3524[39]](_0x3524[167],_0x8fb4x26[_0x3524[168]],_0x8fb4x26[_0x3524[163]]),function(_0x8fb4x23,_0x8fb4x28){_0x8fb4x27(_0x8fb4x23,_0x8fb4x28)})};methods[_0x3524[169]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[170]);googleTTS(_0x8fb4x26[_0x3524[168]],_0x8fb4x26[_0x3524[173]],1)[_0x3524[94]](function(_0x8fb4x36){console[_0x3524[40]](_0x3524[172]);saveAndPlayTTS(_0x8fb4x25,_0x8fb4x26,_0x8fb4x36,_0x3524[134],_0x8fb4x27)})[_0x3524[116]](function(_0x8fb4x23){console[_0x3524[34]](_0x3524[171],_0x8fb4x23[_0x3524[115]]);_0x8fb4x27(_0x8fb4x23,{code:200,result:_0x3524[154]})})};function saveAndPlayTTS(_0x8fb4x25,_0x8fb4x26,_0x8fb4x36,_0x8fb4x38,_0x8fb4x27){var _0x8fb4x39={_saveName:_0x3524[89],_savePath:_0x3524[89],_convertedPath:_0x3524[89]};var _0x8fb4x2e={url:_0x8fb4x36};_0x8fb4x39[_0x3524[174]]= sr({length:6});_0x8fb4x39[_0x3524[175]]= util[_0x3524[39]](_0x3524[176],_0x8fb4x39._saveName);var _0x8fb4x3a=fs[_0x3524[177]](_0x8fb4x39._savePath);request[_0x3524[203]](_0x8fb4x2e)[_0x3524[35]](_0x3524[34],function(_0x8fb4x23){console[_0x3524[40]](_0x3524[202],_0x8fb4x23)})[_0x3524[35]](_0x3524[151],function(_0x8fb4x3c){_0x8fb4x3a[_0x3524[201]](_0x8fb4x3c)})[_0x3524[35]](_0x3524[178],function(){console[_0x3524[40]](_0x3524[179]);_0x8fb4x3a[_0x3524[178]]();console[_0x3524[40]](_0x3524[180],_0x8fb4x39._savePath);_0x8fb4x39[_0x3524[181]]= util[_0x3524[39]](_0x3524[182],_0x8fb4x39._saveName);console[_0x3524[40]](_0x3524[183]);fs[_0x3524[185]](_0x8fb4x39._savePath,parseInt(_0x3524[184],8));console[_0x3524[40]](_0x3524[186],_0x8fb4x39._convertedPath);var _0x8fb4x3b=sox[_0x3524[188]](_0x8fb4x39._savePath,_0x8fb4x39._convertedPath,{sampleRate:8000,format:_0x3524[187],channelCount:1,bitRate:192* 1024,compressionQuality:5});_0x8fb4x3b[_0x3524[35]](_0x3524[34],function(_0x8fb4x23){console[_0x3524[34]](_0x3524[189],_0x8fb4x23);deleteTempFile(_0x8fb4x39._savePath);_0x8fb4x27(_0x8fb4x23,{code:200,result:_0x3524[154]})});_0x8fb4x3b[_0x3524[35]](_0x3524[178],function(){console[_0x3524[40]](_0x3524[190]);console[_0x3524[40]](_0x3524[191]);fs[_0x3524[185]](_0x8fb4x39._convertedPath,parseInt(_0x3524[184],8));switch(_0x8fb4x38){case _0x3524[134]:console[_0x3524[40]](_0x3524[192]);_0x8fb4x25[_0x3524[53]](_0x3524[137],util[_0x3524[39]](_0x3524[193],_0x8fb4x39._saveName),function(_0x8fb4x23,_0x8fb4x28){if(_0x8fb4x23){console[_0x3524[40]](_0x3524[194],_0x8fb4x23)};console[_0x3524[40]](_0x3524[195]);deleteTempFile(_0x8fb4x39._savePath);deleteTempFile(_0x8fb4x39._convertedPath);_0x8fb4x27(_0x8fb4x23,{code:200,result:_0x3524[154]})});break;case _0x3524[200]:console[_0x3524[40]](_0x3524[196]);_0x8fb4x25[_0x3524[46]](util[_0x3524[39]](_0x3524[197],util[_0x3524[39]](_0x3524[193],_0x8fb4x39._saveName),_0x8fb4x26[_0x3524[198]]),function(_0x8fb4x23,_0x8fb4x28){if(_0x8fb4x23){console[_0x3524[40]](_0x3524[199],_0x8fb4x23)};console[_0x3524[40]](_0x3524[195]);deleteTempFile(_0x8fb4x39._savePath);deleteTempFile(_0x8fb4x39._convertedPath);_0x8fb4x27(_0x8fb4x23,{code:200,result:_0x3524[154]})});break;default:console[_0x3524[40]](_0x3524[192]);_0x8fb4x25[_0x3524[53]](_0x3524[137],util[_0x3524[39]](_0x3524[193],_0x8fb4x39._saveName),function(_0x8fb4x23,_0x8fb4x28){if(_0x8fb4x23){console[_0x3524[40]](_0x3524[194],_0x8fb4x23)};console[_0x3524[40]](_0x3524[195]);deleteTempFile(_0x8fb4x39._savePath);deleteTempFile(_0x8fb4x39._convertedPath);_0x8fb4x27(_0x8fb4x23,{code:200,result:_0x3524[154]})})}});_0x8fb4x3b[_0x3524[69]]()})}function deleteTempFile(_0x8fb4x3e){Promise[_0x3524[207]](fs[_0x3524[206]])(_0x8fb4x3e)[_0x3524[94]](function(){console[_0x3524[40]](_0x3524[204]+ _0x8fb4x3e+ _0x3524[205])})[_0x3524[116]](function(_0x8fb4x23){})}methods[_0x3524[208]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[209]);var _0x8fb4x36=util[_0x3524[39]](_0x3524[210],_0x8fb4x26[_0x3524[211]],encodeURIComponent(_0x8fb4x26[_0x3524[168]]),_0x8fb4x26[_0x3524[212]],_0x8fb4x26[_0x3524[213]]);try{console[_0x3524[40]](_0x3524[214],_0x8fb4x36);console[_0x3524[40]](_0x3524[215]);saveAndPlayTTS(_0x8fb4x25,_0x8fb4x26,_0x8fb4x36,_0x3524[200],_0x8fb4x27)}catch(err){console[_0x3524[34]](_0x3524[216],err);_0x8fb4x27(err,{code:200,result:_0x3524[154]})}};methods[_0x3524[217]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[218]);var _0x8fb4x28={};console[_0x3524[40]](_0x3524[140]+ _0x8fb4x26[_0x3524[141]]+ _0x3524[142]);if(_0x8fb4x26[_0x3524[141]]> 0){_0x8fb4x26[_0x3524[141]]--;getFilePath(_0x8fb4x26[_0x3524[95]])[_0x3524[94]](function(_0x8fb4x35){console[_0x3524[40]](_0x3524[143]);_0x8fb4x25[_0x3524[46]](util[_0x3524[39]](_0x3524[144],_0x8fb4x35,parseInt(_0x8fb4x26[_0x3524[118]])* 1000,_0x8fb4x26[_0x3524[219]]),function(_0x8fb4x23,_0x8fb4x28){var _0x8fb4x2c={uniqueid:_0x8fb4x25[_0x3524[81]],node:_0x8fb4x26[_0x3524[82]],application:_0x8fb4x26[_0x3524[83]],data:_0x8fb4x28[_0x3524[146]]|| null,project_name:_0x8fb4x25[_0x3524[84]],callerid:_0x8fb4x25[_0x3524[85]],message:_0x3524[86]};process[_0x3524[46]](_0x8fb4x2c);_0x8fb4x28[_0x3524[146]]= _0x8fb4x28[_0x3524[146]][_0x3524[148]](_0x3524[147],_0x3524[89])[_0x3524[107]]();if(_0x8fb4x28[_0x3524[146]][_0x3524[149]]>= parseInt(_0x8fb4x26[_0x3524[220]])){if(_0x8fb4x28[_0x3524[146]]!== _0x3524[150]){console[_0x3524[40]](_0x3524[221]);if(_0x8fb4x26[_0x3524[126]]!== _0x3524[150]){console[_0x3524[40]](_0x3524[152]);var _0x8fb4x31=getVariableName(_0x8fb4x26[_0x3524[126]]);setVariable(_0x8fb4x25,_0x8fb4x31,_0x3524[130]+ _0x8fb4x28[_0x3524[146]]+ _0x3524[130],function(){_0x8fb4x28= {code:200,result:_0x3524[154],data:_0x3524[222]};_0x8fb4x27(null,_0x8fb4x28)})}else {console[_0x3524[40]](_0x3524[223]);_0x8fb4x28= {code:200,result:_0x3524[154],data:_0x3524[224]};_0x8fb4x27(null,_0x8fb4x28)}}else {console[_0x3524[40]](_0x3524[225]);_0x8fb4x28= {code:500,result:_0x3524[150]};_0x8fb4x27(null,_0x8fb4x28)}}else {console[_0x3524[40]](_0x3524[226]);_0x8fb4x28= {code:200,result:_0x3524[154],data:_0x3524[224]};_0x8fb4x27(null,_0x8fb4x28)}})})}else {console[_0x3524[40]](_0x3524[156]);_0x8fb4x28= {code:200,result:_0x3524[154],data:_0x3524[157]};_0x8fb4x27(null,_0x8fb4x28)}};methods[_0x3524[227]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[228]);var _0x8fb4x28={};console[_0x3524[40]](_0x3524[140]+ _0x8fb4x26[_0x3524[141]]+ _0x3524[142]);if(_0x8fb4x26[_0x3524[141]]> 0){_0x8fb4x26[_0x3524[141]]--;getFilePath(_0x8fb4x26[_0x3524[95]])[_0x3524[94]](function(_0x8fb4x35){console[_0x3524[40]](_0x3524[143]);_0x8fb4x25[_0x3524[46]](util[_0x3524[39]](_0x3524[144],_0x8fb4x35,parseInt(_0x8fb4x26[_0x3524[118]])* 1000,_0x8fb4x26[_0x3524[219]]),function(_0x8fb4x23,_0x8fb4x28){var _0x8fb4x2c={uniqueid:_0x8fb4x25[_0x3524[81]],node:_0x8fb4x26[_0x3524[82]],application:_0x8fb4x26[_0x3524[83]],data:_0x8fb4x28[_0x3524[146]]|| null,project_name:_0x8fb4x25[_0x3524[84]],callerid:_0x8fb4x25[_0x3524[85]],message:_0x3524[86]};_0x8fb4x28[_0x3524[146]]= _0x8fb4x28[_0x3524[146]][_0x3524[148]](_0x3524[147],_0x3524[89])[_0x3524[107]]();if(_0x8fb4x28[_0x3524[146]][_0x3524[149]]>= parseInt(_0x8fb4x26[_0x3524[220]])){if(_0x8fb4x28[_0x3524[146]]!== _0x3524[150]){console[_0x3524[40]](_0x3524[221]);if(_0x8fb4x26[_0x3524[126]]!== _0x3524[150]){var _0x8fb4x3f=_0x8fb4x28[_0x3524[146]][_0x3524[106]](_0x3524[89]);var _0x8fb4x40=_0x8fb4x3f[_0x3524[149]];var _0x8fb4x41;var _0x8fb4x42=Number(_0x8fb4x26[_0x3524[229]]);if(_0x8fb4x26[_0x3524[230]]=== _0x3524[231]){for(_0x8fb4x41= 0;_0x8fb4x41< _0x8fb4x42&& _0x8fb4x41< _0x8fb4x40;_0x8fb4x41++){_0x8fb4x3f[_0x8fb4x41]= _0x3524[232]}}else {for(_0x8fb4x41= _0x8fb4x40- 1;_0x8fb4x41>= 0&& _0x8fb4x42> 0;_0x8fb4x41--,_0x8fb4x42--){_0x8fb4x3f[_0x8fb4x41]= _0x3524[232]}};_0x8fb4x2c[_0x3524[151]]= _0x8fb4x3f[_0x3524[68]](_0x3524[89]);process[_0x3524[46]](_0x8fb4x2c);console[_0x3524[40]](_0x3524[152]);var _0x8fb4x31=getVariableName(_0x8fb4x26[_0x3524[126]]);setVariable(_0x8fb4x25,_0x8fb4x31,_0x3524[130]+ _0x8fb4x28[_0x3524[146]]+ _0x3524[130],function(){_0x8fb4x28= {code:200,result:_0x3524[154],data:_0x3524[222]};_0x8fb4x27(null,_0x8fb4x28)})}else {process[_0x3524[46]](_0x8fb4x2c);console[_0x3524[40]](_0x3524[223]);_0x8fb4x28= {code:200,result:_0x3524[154]};_0x8fb4x27(null,_0x8fb4x28)}}else {process[_0x3524[46]](_0x8fb4x2c);console[_0x3524[40]](_0x3524[225]);_0x8fb4x28= {code:500,result:_0x3524[150]};_0x8fb4x27(null,_0x8fb4x28)}}else {process[_0x3524[46]](_0x8fb4x2c);console[_0x3524[40]](_0x3524[226]);_0x8fb4x28= {code:200,result:_0x3524[154],data:_0x3524[224]};_0x8fb4x27(null,_0x8fb4x28)}})})}else {console[_0x3524[40]](_0x3524[156]);_0x8fb4x28= {code:200,result:_0x3524[154],data:_0x3524[157]};_0x8fb4x27(null,_0x8fb4x28)}};methods[_0x3524[233]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[234]);var _0x8fb4x43=sr({length:4});console[_0x3524[40]](_0x3524[235]);_0x8fb4x25[_0x3524[46]](util[_0x3524[39]](_0x3524[236],path[_0x3524[68]](config[_0x3524[237]],_0x3524[238],_0x8fb4x25[_0x3524[81]]+ _0x3524[239]+ _0x8fb4x43),_0x8fb4x26[_0x3524[240]]|| _0x3524[187],_0x8fb4x26[_0x3524[163]],_0x8fb4x26[_0x3524[63]]* 1000,null,true,null),function(_0x8fb4x23,_0x8fb4x28){if(_0x8fb4x28[_0x3524[241]]=== 200&& _0x8fb4x28[_0x3524[146]]!== _0x3524[150]){SquareRecording[_0x3524[253]]({uniqueid:_0x8fb4x25[_0x3524[81]],callerid:_0x8fb4x25[_0x3524[85]],calleridname:_0x8fb4x25[_0x3524[245]],context:_0x8fb4x25[_0x3524[246]],extension:_0x8fb4x25[_0x3524[247]],priority:_0x8fb4x25[_0x3524[248]],accountcode:_0x8fb4x25[_0x3524[249]],dnid:_0x8fb4x25[_0x3524[250]],project_name:_0x8fb4x25[_0x3524[84]],saveName:_0x8fb4x25[_0x3524[81]]+ _0x3524[239]+ _0x8fb4x43,filename:_0x8fb4x26[_0x3524[251]]|| null,savePath:path[_0x3524[68]](config[_0x3524[237]],_0x3524[238],_0x8fb4x25[_0x3524[81]]+ _0x3524[239]+ _0x8fb4x43+ _0x3524[252]+ (_0x8fb4x26[_0x3524[240]]|| _0x3524[187]))})[_0x3524[116]](function(_0x8fb4x23){console[_0x3524[40]](_0x3524[242]+ _0x8fb4x26[_0x3524[83]]+ _0x3524[243]+ _0x8fb4x26[_0x3524[82]]+ _0x3524[244],_0x8fb4x23)});console[_0x3524[40]](_0x3524[254]);_0x8fb4x25[_0x3524[46]](util[_0x3524[39]](_0x3524[255],_0x3524[256],_0x8fb4x25[_0x3524[81]]+ _0x3524[239]+ _0x8fb4x43),function(_0x8fb4x23,_0x8fb4x28){_0x8fb4x27(_0x8fb4x23,_0x8fb4x28)})}else {_0x8fb4x27(_0x8fb4x23,_0x8fb4x28)}})};methods[_0x3524[257]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[258]);var _0x8fb4x28;var _0x8fb4x44=_0x3524[259];var _0x8fb4x45;if(!collections[_0x3524[260]]){getIntervals(false)};var _0x8fb4x46=_[_0x3524[58]](collections[_0x3524[260]],{id:parseInt(_0x8fb4x26[_0x3524[261]])});if(!_0x8fb4x46[_0x3524[262]]){_0x8fb4x45= _[_0x3524[264]](collections[_0x3524[260]],{IntervalId:parseInt(_0x8fb4x46[_0x3524[263]])})};if(_0x8fb4x45){console[_0x3524[40]](_0x3524[265]);if(_0x8fb4x45[_0x3524[149]]){console[_0x3524[40]](_0x3524[140]+ _0x8fb4x45[_0x3524[149]]+ _0x3524[266]);var _0x8fb4x47;console[_0x3524[40]](_0x3524[267]);_0x8fb4x45[_0x3524[132]](function(_0x8fb4x32,_0x8fb4x33){_0x8fb4x47= Util[_0x3524[269]](_0x8fb4x32[_0x3524[268]]);if(Util[_0x3524[270]](_0x8fb4x47)){console[_0x3524[40]](_0x3524[271]+ _0x8fb4x33+ _0x3524[272]);_0x8fb4x44= _0x3524[273]}})}else {console[_0x3524[40]](_0x3524[274]);_0x8fb4x44= _0x3524[273]}}else {console[_0x3524[40]](_0x3524[275]);var _0x8fb4x48=Util[_0x3524[269]](_0x8fb4x46[_0x3524[268]]);if(Util[_0x3524[270]](_0x8fb4x48)){console[_0x3524[40]](_0x3524[276]);_0x8fb4x44= _0x3524[273]}};console[_0x3524[40]](_0x3524[277]+ _0x8fb4x44+ _0x3524[278]);_0x8fb4x28= {code:200,result:_0x3524[154],data:_0x8fb4x44};_0x8fb4x27(null,_0x8fb4x28)};methods[_0x3524[279]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[280]);console[_0x3524[40]](_0x3524[281]);var _0x8fb4x31=getVariableName(_0x8fb4x26[_0x3524[126]]);getVariable(_0x8fb4x25,_0x8fb4x31,function(_0x8fb4x23,_0x8fb4x28){if(!_0x8fb4x28[_0x3524[151]]){_0x8fb4x28[_0x3524[151]]= _0x3524[157]};_0x8fb4x27(null,_0x8fb4x28)})};methods[_0x3524[282]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){var _0x8fb4x2c={uniqueid:_0x8fb4x25[_0x3524[81]],node:_0x8fb4x26[_0x3524[82]],application:_0x8fb4x26[_0x3524[83]],data:_0x8fb4x26[_0x3524[283]]|| null,project_name:_0x8fb4x25[_0x3524[84]],callerid:_0x8fb4x25[_0x3524[85]],message:_0x3524[86]};process[_0x3524[46]](_0x8fb4x2c);var _0x8fb4x28={code:200,result:_0x3524[284]};_0x8fb4x27(null,_0x8fb4x28)};methods[_0x3524[285]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[286]);var _0x8fb4x2c={uniqueid:_0x8fb4x25[_0x3524[81]],node:_0x8fb4x26[_0x3524[82]],application:_0x8fb4x26[_0x3524[83]],data:_0x8fb4x26[_0x3524[287]],project_name:_0x8fb4x25[_0x3524[84]],callerid:_0x8fb4x25[_0x3524[85]],message:_0x3524[86]};process[_0x3524[46]](_0x8fb4x2c);var _0x8fb4x28;if(_0x8fb4x26[_0x3524[287]]!== _0x3524[150]){var _0x8fb4x49=_[_0x3524[58]](collections[_0x3524[288]],{id:Number(_0x8fb4x26[_0x3524[287]])});if(_0x8fb4x49){var _0x8fb4x4a={from:[_0x8fb4x49[_0x3524[289]]],to:_0x8fb4x26[_0x3524[290]][_0x3524[106]](_0x3524[67]),cc:_0x8fb4x26[_0x3524[291]]?_0x8fb4x26[_0x3524[291]][_0x3524[106]](_0x3524[67]):[],subject:_0x8fb4x26[_0x3524[292]],html:_0x8fb4x26[_0x3524[168]],voiceSource:_0x8fb4x25[_0x3524[81]],auto:true,message:_0x3524[293]};if(_0x8fb4x26[_0x3524[294]]!== _0x3524[150]){var _0x8fb4x4b=_[_0x3524[58]](collections[_0x3524[295]],{id:Number(_0x8fb4x26[_0x3524[294]])});if(_0x8fb4x4b){var _0x8fb4x4c={from:_0x8fb4x4a[_0x3524[296]],to:_0x8fb4x4a[_0x3524[290]],cc:_0x8fb4x4a[_0x3524[291]],subject:_0x8fb4x4a[_0x3524[292]],body:_0x8fb4x4a[_0x3524[297]]};_0x8fb4x4a[_0x3524[292]]= _0x8fb4x4b[_0x3524[292]]?Mustache[_0x3524[298]](_0x8fb4x4b[_0x3524[292]],_0x8fb4x4c):null;_0x8fb4x4a[_0x3524[297]]= _0x8fb4x4b[_0x3524[297]]?Mustache[_0x3524[298]](_0x8fb4x4b[_0x3524[297]],_0x8fb4x4c):null;process[_0x3524[46]](_0x8fb4x4a);_0x8fb4x28= {code:200,result:_0x3524[284]};_0x8fb4x27(null,_0x8fb4x28)}else {console[_0x3524[40]](_0x3524[299]);_0x8fb4x28= {code:200,result:_0x3524[284]};_0x8fb4x27(null,_0x8fb4x28)}}else {process[_0x3524[46]](_0x8fb4x4a);_0x8fb4x28= {code:200,result:_0x3524[284]};_0x8fb4x27(null,_0x8fb4x28)}}else {console[_0x3524[40]](_0x8fb4x26[_0x3524[287]]?_0x3524[300]:_0x3524[301]);_0x8fb4x28= {code:200,result:_0x3524[284]};_0x8fb4x27(null,_0x8fb4x28)}}else {console[_0x3524[40]](_0x3524[302]);_0x8fb4x28= {code:200,result:_0x3524[284]};_0x8fb4x27(null,_0x8fb4x28)}};methods[_0x3524[303]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[304]);var _0x8fb4x2c={uniqueid:_0x8fb4x25[_0x3524[81]],node:_0x8fb4x26[_0x3524[82]],application:_0x8fb4x26[_0x3524[83]],data:_0x8fb4x26[_0x3524[287]],project_name:_0x8fb4x25[_0x3524[84]],callerid:_0x8fb4x25[_0x3524[85]],message:_0x3524[86]};process[_0x3524[46]](_0x8fb4x2c);var _0x8fb4x4a={body:_0x8fb4x26[_0x3524[305]],SmsAccountId:_0x8fb4x26[_0x3524[287]],source:_0x8fb4x25[_0x3524[81]],auto:true,message:_0x3524[306]};var _0x8fb4x28;if(_0x8fb4x26[_0x3524[287]]!== _0x3524[150]){var _0x8fb4x49=_[_0x3524[58]](collections[_0x3524[307]],{id:Number(_0x8fb4x26[_0x3524[287]])});if(_0x8fb4x49){if(_0x8fb4x49[_0x3524[308]]=== _0x3524[309]){_0x8fb4x4a[_0x3524[296]]= /^[\+][0-9]+$/[_0x3524[310]](_0x8fb4x49[_0x3524[76]])?_0x8fb4x49[_0x3524[76]]:_0x3524[311]+ _0x8fb4x49[_0x3524[76]];_0x8fb4x4a[_0x3524[290]]= /^[\+][0-9]+$/[_0x3524[310]](_0x8fb4x26[_0x3524[290]])?_0x8fb4x26[_0x3524[290]]:_0x3524[311]+ _0x8fb4x26[_0x3524[290]]}else {_0x8fb4x4a[_0x3524[296]]= /^[\+][0-9]+$/[_0x3524[310]](_0x8fb4x49[_0x3524[76]])?_0x8fb4x49[_0x3524[76]][_0x3524[148]](_0x3524[311],_0x3524[89]):_0x8fb4x49[_0x3524[76]];_0x8fb4x4a[_0x3524[290]]= /^[\+][0-9]+$/[_0x3524[310]](_0x8fb4x26[_0x3524[290]])?_0x8fb4x26[_0x3524[290]][_0x3524[148]](_0x3524[311],_0x3524[89]):_0x8fb4x26[_0x3524[290]]};process[_0x3524[46]](_0x8fb4x4a);_0x8fb4x28= {code:200,result:_0x3524[284]};_0x8fb4x27(null,_0x8fb4x28)}else {console[_0x3524[40]](_0x3524[312]);_0x8fb4x28= {code:200,result:_0x3524[284]};_0x8fb4x27(null,_0x8fb4x28)}}else {console[_0x3524[40]](_0x3524[302]);_0x8fb4x28= {code:200,result:_0x3524[284]};_0x8fb4x27(null,_0x8fb4x28)}};methods[_0x3524[313]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[314]);var _0x8fb4x2c={uniqueid:_0x8fb4x25[_0x3524[81]],node:_0x8fb4x26[_0x3524[82]],application:_0x8fb4x26[_0x3524[83]],data:_[_0x3524[107]](_0x8fb4x26[_0x3524[315]])|| null,project_name:_0x8fb4x25[_0x3524[84]],callerid:_0x8fb4x25[_0x3524[85]],message:_0x3524[86]};process[_0x3524[46]](_0x8fb4x2c);console[_0x3524[40]](_0x3524[316]);sh[_0x3524[53]](_[_0x3524[107]](_0x8fb4x26[_0x3524[315]]),function(_0x8fb4x24,_0x8fb4x4d){var _0x8fb4x4e=_0x8fb4x4d[_0x3524[148]](/(\r\n|\n|\r)/gm,_0x3524[89]);console[_0x3524[40]](_0x3524[317],_0x8fb4x4e);console[_0x3524[40]](_0x3524[318]);var _0x8fb4x31=getVariableName(_0x8fb4x26[_0x3524[126]]);setVariable(_0x8fb4x25,_0x8fb4x31,_0x3524[130]+ _0x8fb4x4e+ _0x3524[130],_0x8fb4x27)})};methods[_0x3524[2]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[319]);console[_0x3524[40]](_0x3524[320]);_0x8fb4x25[_0x3524[53]](_0x3524[321],_0x8fb4x26[_0x3524[315]],_0x8fb4x26[_0x3524[322]],function(_0x8fb4x23,_0x8fb4x28){_0x8fb4x27(_0x8fb4x23,_0x8fb4x28)})};methods[_0x3524[323]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[324]);if(!collections[_0x3524[325]]){getProjects(false)};var _0x8fb4x4f=_[_0x3524[58]](collections[_0x3524[325]],{id:parseInt(_0x8fb4x26[_0x3524[326]])});console[_0x3524[40]](_0x3524[327]+ _0x8fb4x4f[_0x3524[61]]+ _0x3524[51]);_0x8fb4x25[_0x3524[53]](_0x3524[321],util[_0x3524[39]](_0x3524[328],_0x8fb4x4f[_0x3524[61]]),function(_0x8fb4x23,_0x8fb4x28){_0x8fb4x27(_0x8fb4x23,_0x8fb4x28)})};methods[_0x3524[329]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[330]);wait[_0x3524[131]](setVariable,_0x8fb4x25,_0x3524[331],_0x3524[332]);wait[_0x3524[131]](setVariable,_0x8fb4x25,_0x3524[117],_0x3524[332]);wait[_0x3524[131]](setVariable,_0x8fb4x25,_0x3524[333],_0x3524[332]);var _0x8fb4x50=wait[_0x3524[131]](asr,_0x8fb4x25,_0x8fb4x26);if(!_[_0x3524[334]](_0x8fb4x50)){console[_0x3524[40]](_0x3524[335]);_[_0x3524[336]](_0x8fb4x50,function(_0x8fb4x51,_0x8fb4x52){wait[_0x3524[131]](setVariable,_0x8fb4x25,_0x8fb4x52,_0x3524[130]+ _0x8fb4x51+ _0x3524[130])})}else {console[_0x3524[40]](_0x3524[337]);wait[_0x3524[131]](setVariable,_0x8fb4x25,_0x3524[338],_0x3524[339])}};function asr(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){var _0x8fb4x39={_saveName:_0x3524[89],_savePath:_0x3524[89],_convertedPath:_0x3524[89]};var _0x8fb4x50={};_0x8fb4x39[_0x3524[174]]= sr({length:6});_0x8fb4x39[_0x3524[175]]= util[_0x3524[39]](_0x3524[182],_0x8fb4x39._saveName);var _0x8fb4x54=util[_0x3524[39]](_0x3524[340],_0x8fb4x39._savePath,_0x8fb4x26[_0x3524[63]]?_0x8fb4x26[_0x3524[63]]:_0x3524[89]);if(_0x8fb4x26[_0x3524[341]]&& _0x8fb4x26[_0x3524[341]]!== _0x3524[342]){_0x8fb4x54+= _0x3524[343]};if(_0x8fb4x26[_0x3524[198]]&& _0x8fb4x26[_0x3524[198]]!== _0x3524[344]){_0x8fb4x54+= _0x3524[155]};_0x8fb4x25[_0x3524[53]](_0x3524[345],_0x8fb4x54,function(_0x8fb4x23,_0x8fb4x28){if(_0x8fb4x23){console[_0x3524[40]](_0x3524[346],_0x8fb4x23);_0x8fb4x27(_0x8fb4x23,null)}else {console[_0x3524[40]](_0x3524[347]);var _0x8fb4x36=util[_0x3524[39]](_0x3524[348],_0x8fb4x26[_0x3524[211]],_0x8fb4x26[_0x3524[349]]);if(_0x8fb4x26[_0x3524[350]]&& _0x8fb4x26[_0x3524[350]]!== _0x3524[154]){_0x8fb4x36+= util[_0x3524[39]](_0x3524[351],encodeURIComponent(_0x8fb4x26[_0x3524[350]]))}else {_0x8fb4x36+= _0x3524[352]};console[_0x3524[40]](_0x3524[353]);Promise[_0x3524[207]](fs[_0x3524[366]])(_0x8fb4x39._savePath)[_0x3524[94]](function(_0x8fb4x30){console[_0x3524[40]](_0x3524[361]);var _0x8fb4x58= new Buffer(_0x8fb4x30,_0x3524[363]).toString(_0x3524[362]);_0x8fb4x36+= util[_0x3524[39]](_0x3524[364],_0x8fb4x58);var _0x8fb4x2e={url:_0x8fb4x36};console[_0x3524[40]](_0x3524[365]);return rp(_0x8fb4x2e)})[_0x3524[94]](function(_0x8fb4x55){console[_0x3524[40]](_0x3524[356]);_0x8fb4x55= _0x8fb4x55[_0x3524[106]](_0x3524[357]);var _0x8fb4x56,_0x8fb4x57;_[_0x3524[132]](_0x8fb4x55,function(_0x8fb4x32){_0x8fb4x56= _0x8fb4x32[_0x3524[106]](_0x3524[358]);if(_0x8fb4x56[_0x3524[149]]=== 2){switch(_0x8fb4x56[0]){case _0x3524[168]:_0x8fb4x50[_0x3524[331]]= _0x8fb4x56[1][_0x3524[148]](/\+/g,_0x3524[359]);break;case _0x3524[146]:if(_0x8fb4x56[1]=== _0x3524[360]){_0x8fb4x50[_0x3524[117]]= 0};break;case _0x3524[333]:_0x8fb4x50[_0x3524[333]]= decodeURIComponent(_0x8fb4x56[1]);break;case _0x3524[115]:_0x8fb4x50[_0x3524[338]]= decodeURIComponent(_0x8fb4x56[1][_0x3524[148]](/\+/g,_0x3524[359]));break;default:}}})})[_0x3524[116]](function(_0x8fb4x23){console[_0x3524[40]](_0x3524[355],_0x8fb4x23)})[_0x3524[113]](function(){console[_0x3524[40]](_0x3524[354]);deleteTempFile(_0x8fb4x39._savePath);_0x8fb4x27(null,_0x8fb4x50)})}})}methods[_0x3524[367]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[368]);if(!collections[_0x3524[369]]){getDbConnections(false)};var _0x8fb4x59=_[_0x3524[58]](collections[_0x3524[369]],{id:parseInt(_0x8fb4x26[_0x3524[370]])});console[_0x3524[40]](_0x3524[371]);var _0x8fb4x2c={uniqueid:_0x8fb4x25[_0x3524[81]],node:_0x8fb4x26[_0x3524[82]],application:_0x8fb4x26[_0x3524[83]],data:_0x8fb4x26[_0x3524[372]]|| null,project_name:_0x8fb4x25[_0x3524[84]],callerid:_0x8fb4x25[_0x3524[85]],message:_0x3524[86]};process[_0x3524[46]](_0x8fb4x2c);try{db[_0x3524[374]](_0x8fb4x59[_0x3524[373]]);var _0x8fb4x3c=db[_0x3524[375]](_0x8fb4x26[_0x3524[372]]);db[_0x3524[376]]();setVariablesMatrix(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27,_0x8fb4x3c)}catch(e){console[_0x3524[40]](e[_0x3524[115]]);wait[_0x3524[131]](setVariable,_0x8fb4x25,_0x3524[377],_0x3524[273]);wait[_0x3524[131]](setVariable,_0x8fb4x25,_0x3524[378],_0x3524[130]+ e[_0x3524[115]]+ _0x3524[130])}};methods[_0x3524[379]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[380]);console[_0x3524[40]](_0x3524[381]+ _0x8fb4x26[_0x3524[247]]+ _0x3524[382]);_0x8fb4x25[_0x3524[53]](_0x3524[66],util[_0x3524[39]](_0x3524[383],_0x8fb4x26[_0x3524[247]],_0x8fb4x26[_0x3524[246]]),function(_0x8fb4x23,_0x8fb4x28){_0x8fb4x27(_0x8fb4x23,_0x8fb4x28)})};methods[_0x3524[384]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[385]);var _0x8fb4x28={code:200,result:_0x3524[154]};_0x8fb4x25[_0x3524[53]](_0x3524[386],_0x3524[387]+ _0x8fb4x26[_0x3524[388]]+ _0x3524[130],function(_0x8fb4x23,_0x8fb4x28){console[_0x3524[40]](_0x3524[389]);try{_0x8fb4x28[_0x3524[151]]= String(eval(_0x8fb4x26[_0x3524[388]])?_0x3524[273]:_0x3524[259])}catch(_0x8fb4x23){console[_0x3524[40]](_0x3524[390]);_0x8fb4x28[_0x3524[151]]= _0x3524[259]};console[_0x3524[40]](_0x3524[391]+ _0x8fb4x28[_0x3524[151]]);_0x8fb4x27(null,_0x8fb4x28)})};methods[_0x3524[392]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[393]);console[_0x3524[40]](_0x3524[394]);_0x8fb4x25[_0x3524[392]]()};methods[_0x3524[395]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[396]);var _0x8fb4x4d=(_0x8fb4x26[_0x3524[397]])?_0x3524[130]+ _0x8fb4x26[_0x3524[397]]+ _0x3524[130]:_0x3524[130]+ _0x8fb4x26[_0x3524[82]]+ _0x3524[130];console[_0x3524[40]](_0x3524[398]+ _0x8fb4x4d);_0x8fb4x25[_0x3524[53]](_0x3524[386],_0x8fb4x4d,function(_0x8fb4x23,_0x8fb4x28){_0x8fb4x27(_0x8fb4x23,_0x8fb4x28)})};methods[_0x3524[399]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[400]);console[_0x3524[40]](_0x3524[401]);_0x8fb4x25[_0x3524[46]](util[_0x3524[39]](_0x3524[402],_0x8fb4x26[_0x3524[403]],_0x8fb4x26[_0x3524[163]]),function(_0x8fb4x23,_0x8fb4x28){_0x8fb4x27(_0x8fb4x23,_0x8fb4x28)})};methods[_0x3524[404]]= function(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){console[_0x3524[40]](_0x3524[405]);console[_0x3524[40]](_0x3524[406]);var _0x8fb4x31=getVariableName(_0x8fb4x26[_0x3524[126]]);wait[_0x3524[131]](setVariable,_0x8fb4x25,_0x8fb4x31,_0x3524[130]+ _0x8fb4x26[_0x3524[407]]+ _0x3524[130])};function getVertices(_0x8fb4x5b){return _[_0x3524[411]](_0x8fb4x5b,function(_0x8fb4x30,_0x8fb4x5c,_0x8fb4x5d){if(_0x8fb4x5d=== _0x3524[408]){return _0x8fb4x30};if(_[_0x3524[127]](_0x8fb4x5c)){_[_0x3524[410]](_0x8fb4x5c,function(_0x8fb4x51,_0x8fb4x52){_0x8fb4x30[_0x8fb4x51[_0x3524[409]][_0x3524[263]]]= _0x8fb4x51[_0x3524[409]];_0x8fb4x30[_0x8fb4x51[_0x3524[409]][_0x3524[263]]][_0x3524[83]]= _0x8fb4x5d});return _0x8fb4x30};_0x8fb4x30[_0x8fb4x5c[_0x3524[409]][_0x3524[263]]]= _0x8fb4x5c[_0x3524[409]];_0x8fb4x30[_0x8fb4x5c[_0x3524[409]][_0x3524[263]]][_0x3524[83]]= _0x8fb4x5d;return _0x8fb4x30},{})}function getTargetBySource(_0x8fb4x5b,_0x8fb4x5f,_0x8fb4x51,_0x8fb4x60){return _[_0x3524[146]](_[_0x3524[58]](_0x8fb4x5b[_0x3524[408]],function(_0x8fb4x5c){if(_0x8fb4x5c[_0x3524[409]][_0x3524[412]]&& _0x8fb4x5c[_0x3524[409]][_0x3524[413]]){if(_0x8fb4x5c[_0x3524[409]][_0x3524[413]]=== _0x8fb4x5f){if(_0x8fb4x5c[_0x3524[409]][_0x3524[414]]&& _0x8fb4x5c[_0x3524[409]][_0x3524[414]]!== _0x8fb4x51){if(_0x8fb4x60){var _0x8fb4x61=_0x8fb4x5c[_0x3524[409]][_0x3524[414]][_0x3524[106]](_0x3524[67]);if(_[_0x3524[415]](_0x8fb4x61,_0x8fb4x51)){return true}};return false};return true}};return false}),_0x3524[416])}function recurReplace(_0x8fb4x63,_0x8fb4x25,_0x8fb4x64){var _0x8fb4x65=0,_0x8fb4x66={},_0x8fb4x41;var _0x8fb4x67=0;for(_0x8fb4x41= 0;_0x8fb4x41< _0x8fb4x63[_0x3524[149]];_0x8fb4x41++){if(_0x8fb4x63[_0x3524[417]](_0x8fb4x41)=== _0x3524[418]){if(_0x8fb4x67=== 0){_0x8fb4x65= _0x8fb4x41};_0x8fb4x67++};if(_0x8fb4x63[_0x3524[417]](_0x8fb4x41)=== _0x3524[419]){_0x8fb4x67--;if(_0x8fb4x67=== 0){_0x8fb4x66[_0x8fb4x63[_0x3524[420]](_0x8fb4x65+ 1,_0x8fb4x41)]= _0x8fb4x63[_0x3524[420]](_0x8fb4x65+ 1,_0x8fb4x41)}}};if(Object[_0x3524[421]](_0x8fb4x66)[_0x3524[149]]!== 0){for(var _0x8fb4x52 in _0x8fb4x66){_0x8fb4x66[_0x8fb4x52]= recurReplace(_0x8fb4x52,_0x8fb4x25)};for(var _0x8fb4x68 in _0x8fb4x66){_0x8fb4x63= _0x8fb4x63[_0x3524[148]]( new RegExp(_0x3524[418]+ _0x8fb4x68[_0x3524[148]](/[.*+?^${}()|[\]\\]/g,_0x3524[422])+ _0x3524[419],_0x3524[423]),_0x8fb4x66[_0x8fb4x68])}};if(_0x8fb4x64){return _0x8fb4x63}else {var _0x8fb4x51=wait[_0x3524[131]](getVariable,_0x8fb4x25,_0x8fb4x63);return _0x8fb4x51[_0x3524[151]]|| _0x3524[418]+ _0x8fb4x63+ _0x3524[419]}}function replaceAllVariables(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27){var _0x8fb4x6a=_[_0x3524[424]](_0x8fb4x26);for(var _0x8fb4x52 in _0x8fb4x6a){_0x8fb4x6a[_0x8fb4x52]= recurReplace(_0x8fb4x6a[_0x8fb4x52],_0x8fb4x25,true);console[_0x3524[40]](_0x3524[425],_0x8fb4x6a[_0x8fb4x52])};return _0x8fb4x6a}function xstart(_0x8fb4x25){var _0x8fb4x5b=_0x8fb4x25[_0x3524[237]];var _0x8fb4x6c=_0x8fb4x25[_0x3524[426]];if(_0x8fb4x5b[_0x3524[69]]){if(!_[_0x3524[127]](_0x8fb4x5b[_0x3524[69]])){var _0x8fb4x5f=_0x8fb4x5b[_0x3524[69]][_0x3524[409]][_0x3524[263]];var _0x8fb4x28={};do{try{var _0x8fb4x26=replaceAllVariables(_0x8fb4x25,_0x8fb4x6c[_0x8fb4x5f]);if(_0x8fb4x26){if(_[_0x3524[427]](methods[_0x8fb4x26[_0x3524[83]]])){_0x8fb4x28= wait[_0x3524[131]](methods[_0x8fb4x26[_0x3524[83]]],_0x8fb4x25,_0x8fb4x26)}else {_0x8fb4x28= wait[_0x3524[131]](methods[_0x3524[395]],_0x8fb4x25,_0x8fb4x26)};if(_0x8fb4x28[_0x3524[241]]=== 200&& _0x8fb4x28[_0x3524[146]]!== _0x3524[150]){if(_0x8fb4x26[_0x3524[83]]=== _0x3524[138]|| _0x8fb4x26[_0x3524[83]]=== _0x3524[217]|| _0x8fb4x26[_0x3524[83]]=== _0x3524[227]){_0x8fb4x6c[_0x8fb4x5f][_0x3524[141]]= _0x8fb4x26[_0x3524[141]]};var _0x8fb4x6d=getTargetBySource(_0x8fb4x5b,_0x8fb4x5f,_0x8fb4x28[_0x3524[151]],_0x8fb4x26[_0x3524[83]]=== _0x3524[138]);if(!_0x8fb4x6d){if(_0x8fb4x26[_0x3524[83]]=== _0x3524[138]){if(_0x8fb4x26[_0x3524[141]]> 0){_0x8fb4x6d= getTargetBySource(_0x8fb4x5b,_0x8fb4x5f,_0x3524[224],true);if(!_0x8fb4x6d){_0x8fb4x6d= _0x8fb4x5f}}else {_0x8fb4x6d= getTargetBySource(_0x8fb4x5b,_0x8fb4x5f,_0x3524[157],true)}};if((_0x8fb4x26[_0x3524[83]]=== _0x3524[217]|| _0x8fb4x26[_0x3524[83]]=== _0x3524[227])&& _0x8fb4x28[_0x3524[151]]!== _0x3524[157]){_0x8fb4x6d= _0x8fb4x5f};if(_0x8fb4x26[_0x3524[83]]=== _0x3524[279]&& _0x8fb4x28[_0x3524[151]]!== _0x3524[157]){_0x8fb4x6d= getTargetBySource(_0x8fb4x5b,_0x8fb4x5f,_0x3524[157])}};_0x8fb4x5f= _0x8fb4x6d}else {_0x8fb4x5f= null}}else {_0x8fb4x5f= null}}catch(err){console[_0x3524[40]](err)}}while(_0x8fb4x5f);;console[_0x3524[40]](_0x3524[428]);_0x8fb4x25[_0x3524[392]]()}}}function xfinally(_0x8fb4x25){var _0x8fb4x5b=_0x8fb4x25[_0x3524[237]];var _0x8fb4x6c=_0x8fb4x25[_0x3524[426]];if(_0x8fb4x5b[_0x3524[113]]){if(!_[_0x3524[127]](_0x8fb4x5b[_0x3524[113]])){var _0x8fb4x5f=_0x8fb4x5b[_0x3524[113]][_0x3524[409]][_0x3524[263]];var _0x8fb4x28={};do{try{var _0x8fb4x26=_0x8fb4x6c[_0x8fb4x5f][_0x3524[429]]?_0x8fb4x6c[_0x8fb4x5f]:replaceAllVariables(_0x8fb4x25,_0x8fb4x6c[_0x8fb4x5f]);if(_0x8fb4x26){if(_[_0x3524[427]](methods[_0x8fb4x26[_0x3524[83]]])){_0x8fb4x28= wait[_0x3524[131]](methods[_0x8fb4x26[_0x3524[83]]],_0x8fb4x25,_0x8fb4x26)}else {_0x8fb4x28= wait[_0x3524[131]](methods[_0x3524[395]],_0x8fb4x25,_0x8fb4x26)};if(_0x8fb4x28[_0x3524[241]]=== 200&& _0x8fb4x28[_0x3524[146]]!== _0x3524[150]){if(_0x8fb4x26[_0x3524[83]]=== _0x3524[138]|| _0x8fb4x26[_0x3524[83]]=== _0x3524[217]|| _0x8fb4x26[_0x3524[83]]=== _0x3524[227]){_0x8fb4x6c[_0x8fb4x5f][_0x3524[141]]= _0x8fb4x26[_0x3524[141]]};var _0x8fb4x6d=getTargetBySource(_0x8fb4x5b,_0x8fb4x5f,_0x8fb4x28[_0x3524[151]],_0x8fb4x26[_0x3524[83]]=== _0x3524[138]);if(!_0x8fb4x6d){if(_0x8fb4x26[_0x3524[83]]=== _0x3524[138]){if(_0x8fb4x26[_0x3524[141]]> 0){_0x8fb4x6d= getTargetBySource(_0x8fb4x5b,_0x8fb4x5f,_0x3524[224],true);if(!_0x8fb4x6d){_0x8fb4x6d= _0x8fb4x5f}}else {_0x8fb4x6d= getTargetBySource(_0x8fb4x5b,_0x8fb4x5f,_0x3524[157],true)}};if((_0x8fb4x26[_0x3524[83]]=== _0x3524[217]|| _0x8fb4x26[_0x3524[83]]=== _0x3524[227])&& _0x8fb4x28[_0x3524[151]]!== _0x3524[157]){_0x8fb4x6d= _0x8fb4x5f};if(_0x8fb4x26[_0x3524[83]]=== _0x3524[279]&& _0x8fb4x28[_0x3524[151]]!== _0x3524[157]){_0x8fb4x6d= getTargetBySource(_0x8fb4x5b,_0x8fb4x5f,_0x3524[157])}};_0x8fb4x5f= _0x8fb4x6d}else {_0x8fb4x5f= null}}else {_0x8fb4x5f= null}}catch(err){console[_0x3524[40]](err)}}while(_0x8fb4x5f);;_0x8fb4x25[_0x3524[392]]();console[_0x3524[40]](_0x3524[430])}};_0x8fb4x25[_0x3524[178]]()}function main(_0x8fb4x25){_0x8fb4x25[_0x3524[35]](_0x3524[34],function(_0x8fb4x23){console[_0x3524[40]](_0x3524[431],_0x8fb4x23)});_0x8fb4x25[_0x3524[35]](_0x3524[36],function(){console[_0x3524[40]](_0x3524[432])});_0x8fb4x25[_0x3524[35]](_0x3524[392],function(){if(_0x8fb4x25[_0x3524[113]]){_0x8fb4x25[_0x3524[113]]= false;console[_0x3524[40]](_0x3524[433]);wait[_0x3524[434]](xfinally,_0x8fb4x25)}else {process[_0x3524[46]]({message:_0x3524[435],uniqueid:_0x8fb4x25[_0x3524[81]],leaveAt:moment()[_0x3524[39]](_0x3524[108])});console[_0x3524[40]](_0x3524[436])}});_0x8fb4x25[_0x3524[35]](_0x3524[118],function(_0x8fb4x28){});_0x8fb4x25[_0x3524[35]](_0x3524[437],function(_0x8fb4x50){console[_0x3524[40]](_0x8fb4x50);console[_0x3524[40]](_0x3524[438]+ _0x8fb4x50[_0x3524[439]]+ _0x3524[440]+ _0x8fb4x50[_0x3524[441]]);var _0x8fb4x70={network:_0x8fb4x50[_0x3524[442]],network_script:_0x8fb4x50[_0x3524[443]],request:_0x8fb4x50[_0x3524[444]],channel:_0x8fb4x50[_0x3524[445]],language:_0x8fb4x50[_0x3524[446]],type:_0x8fb4x50[_0x3524[447]],uniqueid:_0x8fb4x50[_0x3524[441]],version:_0x8fb4x50[_0x3524[448]],callerid:_0x8fb4x50[_0x3524[439]],calleridname:_0x8fb4x50[_0x3524[449]],callingpres:_0x8fb4x50[_0x3524[450]],callingani2:_0x8fb4x50[_0x3524[451]],callington:_0x8fb4x50[_0x3524[452]],callingtns:_0x8fb4x50[_0x3524[453]],dnid:_0x8fb4x50[_0x3524[454]],rdnis:_0x8fb4x50[_0x3524[455]],context:_0x8fb4x50[_0x3524[456]],extension:_0x8fb4x50[_0x3524[457]],priority:_0x8fb4x50[_0x3524[458]],enhanced:_0x8fb4x50[_0x3524[459]],accountcode:_0x8fb4x50[_0x3524[460]],threadid:_0x8fb4x50[_0x3524[461]],project_name:_0x8fb4x50[_0x3524[462]],joinAt:moment()[_0x3524[39]](_0x3524[108]),message:_0x3524[253]};process[_0x3524[46]](_0x8fb4x70);if(_0x8fb4x50[_0x3524[462]]){SquareProject[_0x3524[470]]({where:{name:_0x8fb4x50[_0x3524[462]]},attributes:[_0x3524[263],_0x3524[464]]})[_0x3524[94]](function(_0x8fb4x4f){if(_0x8fb4x4f){if(_0x8fb4x4f[_0x3524[464]]){xml[_0x3524[467]](_0x8fb4x4f[_0x3524[464]],{normalizeTags:true,explicitArray:false},function(_0x8fb4x23,_0x8fb4x30){var _0x8fb4x5b=_0x8fb4x30[_0x3524[465]][_0x3524[237]];if(_0x8fb4x5b){_0x8fb4x25[_0x3524[237]]= _0x8fb4x5b;_0x8fb4x25[_0x3524[113]]= true;_0x8fb4x25[_0x3524[81]]= _0x8fb4x50[_0x3524[441]];_0x8fb4x25[_0x3524[85]]= _0x8fb4x50[_0x3524[439]];_0x8fb4x25[_0x3524[245]]= _0x8fb4x50[_0x3524[449]];_0x8fb4x25[_0x3524[246]]= _0x8fb4x50[_0x3524[456]];_0x8fb4x25[_0x3524[247]]= _0x8fb4x50[_0x3524[457]];_0x8fb4x25[_0x3524[248]]= _0x8fb4x50[_0x3524[458]];_0x8fb4x25[_0x3524[249]]= _0x8fb4x50[_0x3524[460]];_0x8fb4x25[_0x3524[250]]= _0x8fb4x50[_0x3524[454]];_0x8fb4x25[_0x3524[84]]= _0x8fb4x50[_0x3524[462]];_0x8fb4x25[_0x3524[426]]= getVertices(_0x8fb4x5b);wait[_0x3524[434]](xstart,_0x8fb4x25)}else {console[_0x3524[40]](_0x3524[466]);_0x8fb4x25[_0x3524[178]]()}})}else {console[_0x3524[40]](_0x3524[468]);_0x8fb4x25[_0x3524[178]]()}}else {console[_0x3524[40]](_0x3524[469]);_0x8fb4x25[_0x3524[178]]()}})[_0x3524[116]](function(_0x8fb4x23){console[_0x3524[40]](_0x3524[463],_0x8fb4x23);_0x8fb4x25[_0x3524[178]]()})}else {console[_0x3524[40]](_0x3524[471]);_0x8fb4x25[_0x3524[178]]()}})}function setVariable(_0x8fb4x25,_0x8fb4x72,_0x8fb4x51,_0x8fb4x27){console[_0x3524[40]](_0x3524[472]);console[_0x3524[40]](_0x3524[473]+ _0x8fb4x72+ _0x3524[474],_0x8fb4x51);_0x8fb4x25[_0x3524[46]](util[_0x3524[39]](_0x3524[255],_0x8fb4x72,_0x8fb4x51),function(_0x8fb4x23,_0x8fb4x28){if(_0x8fb4x27){_0x8fb4x27(_0x8fb4x23,_0x8fb4x28)}})}function getVariableName(_0x8fb4x74){if(!collections[_0x3524[437]]){getVariables(false)};var _0x8fb4x75={name:_0x3524[475]};var _0x8fb4x76;if(_0x8fb4x74){_0x8fb4x76= _[_0x3524[58]](collections[_0x3524[437]],{id:parseInt(_0x8fb4x74)})};return _0x8fb4x76?_0x8fb4x76[_0x3524[61]]:_0x8fb4x75[_0x3524[61]]}function setVariablesMatrix(_0x8fb4x25,_0x8fb4x26,_0x8fb4x27,_0x8fb4x3c){if(_0x8fb4x3c&& _0x8fb4x3c[_0x3524[149]]){var _0x8fb4x31=getVariableName(_0x8fb4x26[_0x3524[126]]);_[_0x3524[132]](_0x8fb4x3c,function(_0x8fb4x78,_0x8fb4x33){_[_0x3524[336]](_0x8fb4x78,function(_0x8fb4x51,_0x8fb4x52){wait[_0x3524[131]](setVariable,_0x8fb4x25,_0x8fb4x31+ _0x3524[128]+ _0x8fb4x33+ _0x3524[476]+ _0x8fb4x52+ _0x3524[129],_0x3524[130]+ _0x8fb4x51+ _0x3524[130])})});wait[_0x3524[131]](setVariable,_0x8fb4x25,_0x8fb4x31+ _0x3524[477],_0x8fb4x3c[_0x3524[149]])}else {_0x8fb4x27(null,{code:200,result:0})}}function getVariable(_0x8fb4x25,_0x8fb4x72,_0x8fb4x27){_0x8fb4x25[_0x3524[481]](_0x8fb4x72,function(_0x8fb4x23,_0x8fb4x28){if(_0x8fb4x28[_0x3524[241]]=== 200&& _0x8fb4x28[_0x3524[146]]!== _0x3524[154]){_0x8fb4x28[_0x3524[151]]= _0x8fb4x28[_0x3524[146]][_0x3524[420]](_0x8fb4x28[_0x3524[146]][_0x3524[479]](_0x3524[478])+ 1,_0x8fb4x28[_0x3524[146]][_0x3524[479]](_0x3524[480]))}else {_0x8fb4x28[_0x3524[151]]= _0x3524[89]};_0x8fb4x27(null,_0x8fb4x28)})}function getFilePath(_0x8fb4x74){if(!collections[_0x3524[482]]){getSounds(false)};return Setting[_0x3524[470]]()[_0x3524[94]](function(_0x8fb4x30){if(_0x8fb4x74!== _0x3524[150]){if(_0x8fb4x30){var _0x8fb4x3e=_[_0x3524[58]](collections[_0x3524[482]],{id:parseInt(_0x8fb4x74)});return util[_0x3524[39]](_0x3524[483],_0x8fb4x30[_0x3524[484]]|| _0x3524[485],_0x8fb4x3e[_0x3524[486]])};return _0x3524[89]}else {return _0x3524[89]}})[_0x3524[116]](function(_0x8fb4x23){console[_0x3524[40]](_0x8fb4x23)})}function getUsers(_0x8fb4x7c){return User[_0x3524[487]]({raw:true})[_0x3524[94]](function(_0x8fb4x30){collections[_0x3524[56]]= _[_0x3524[424]](_0x8fb4x30);if(_0x8fb4x7c){synchUpdates(_0x3524[25],_0x3524[56],_0x3524[263])}})[_0x3524[116]](function(_0x8fb4x23){console[_0x3524[40]](_0x8fb4x23)})}function getQueues(_0x8fb4x7c){return VoiceQueue[_0x3524[487]]({raw:true})[_0x3524[94]](function(_0x8fb4x30){collections[_0x3524[79]]= _[_0x3524[424]](_0x8fb4x30);if(_0x8fb4x7c){synchUpdates(_0x3524[26],_0x3524[79],_0x3524[61])}})[_0x3524[116]](function(_0x8fb4x23){console[_0x3524[40]](_0x8fb4x23)})}function getVariables(_0x8fb4x7c){return Variable[_0x3524[487]]({raw:true})[_0x3524[94]](function(_0x8fb4x30){collections[_0x3524[437]]= _[_0x3524[424]](_0x8fb4x30);if(_0x8fb4x7c){synchUpdates(_0x3524[22],_0x3524[437],_0x3524[263])}})[_0x3524[116]](function(_0x8fb4x23){console[_0x3524[40]](_0x8fb4x23)})}function getDbConnections(_0x8fb4x7c){return SquareOdbc[_0x3524[487]]({raw:true})[_0x3524[94]](function(_0x8fb4x30){collections[_0x3524[369]]= _[_0x3524[424]](_0x8fb4x30);if(_0x8fb4x7c){synchUpdates(_0x3524[23],_0x3524[369],_0x3524[263])}})[_0x3524[116]](function(_0x8fb4x23){console[_0x3524[40]](_0x8fb4x23)})}function getIntervals(_0x8fb4x7c){return Interval[_0x3524[487]]({raw:true})[_0x3524[94]](function(_0x8fb4x30){collections[_0x3524[260]]= _[_0x3524[424]](_0x8fb4x30);if(_0x8fb4x7c){synchUpdates(_0x3524[27],_0x3524[260],_0x3524[263])}})[_0x3524[116]](function(_0x8fb4x23){console[_0x3524[40]](_0x8fb4x23)})}function getProjects(_0x8fb4x7c){return SquareProject[_0x3524[487]]({raw:true})[_0x3524[94]](function(_0x8fb4x30){collections[_0x3524[325]]= _[_0x3524[424]](_0x8fb4x30);if(_0x8fb4x7c){synchUpdates(_0x3524[20],_0x3524[325],_0x3524[263])}})[_0x3524[116]](function(_0x8fb4x23){console[_0x3524[40]](_0x8fb4x23)})}function getSounds(_0x8fb4x7c){return Sound[_0x3524[487]]({raw:true})[_0x3524[94]](function(_0x8fb4x30){collections[_0x3524[482]]= _[_0x3524[424]](_0x8fb4x30);if(_0x8fb4x7c){synchUpdates(_0x3524[28],_0x3524[482],_0x3524[263])}})[_0x3524[116]](function(_0x8fb4x23){console[_0x3524[40]](_0x8fb4x23)})}function getMailServerOut(_0x8fb4x7c){return MailServerOut[_0x3524[487]]({raw:true})[_0x3524[94]](function(_0x8fb4x30){collections[_0x3524[288]]= _[_0x3524[424]](_0x8fb4x30);if(_0x8fb4x7c){synchUpdates(_0x3524[31],_0x3524[288],_0x3524[263])}})[_0x3524[116]](function(_0x8fb4x23){console[_0x3524[40]](_0x8fb4x23)})}function getTemplates(_0x8fb4x7c){return Template[_0x3524[487]]({raw:true})[_0x3524[94]](function(_0x8fb4x30){collections[_0x3524[295]]= _[_0x3524[424]](_0x8fb4x30);if(_0x8fb4x7c){synchUpdates(_0x3524[33],_0x3524[295],_0x3524[263])}})[_0x3524[116]](function(_0x8fb4x23){console[_0x3524[40]](_0x8fb4x23)})}function getSmsAccounts(_0x8fb4x7c){return SmsAccount[_0x3524[487]]({raw:true})[_0x3524[94]](function(_0x8fb4x30){collections[_0x3524[307]]= _[_0x3524[424]](_0x8fb4x30);if(_0x8fb4x7c){synchUpdates(_0x3524[30],_0x3524[307],_0x3524[263])}})[_0x3524[116]](function(_0x8fb4x23){console[_0x3524[40]](_0x8fb4x23)})}function synchUpdates(_0x8fb4x87,_0x8fb4x88,_0x8fb4x52){process[_0x3524[46]]({message:_0x8fb4x52?_0x3524[488]:_0x3524[489],model:_0x8fb4x87,collection:_0x8fb4x88,key:_0x8fb4x52})}function updateCollection(_0x8fb4x88,_0x8fb4x8a,_0x8fb4x8b){var _0x8fb4x8c=_[_0x3524[58]](collections[_0x8fb4x88],_0x8fb4x8a);if(_0x8fb4x8c){_[_0x3524[490]](_0x8fb4x8c,_0x8fb4x8b)}else {collections[_0x8fb4x88][_0x3524[491]](_0x8fb4x8b)}}function replaceCollection(_0x8fb4x88,_0x8fb4x8b){collections[_0x8fb4x88]= _0x8fb4x8b}function getPort(){return function(){return Setting[_0x3524[470]]()[_0x3524[94]](function(_0x8fb4x30){if(_0x8fb4x30){return _0x8fb4x30[_0x3524[492]]}})[_0x3524[116]](function(_0x8fb4x23){console[_0x3524[40]](_0x8fb4x23)})}}Promise[_0x3524[502]]([])[_0x3524[94]](getPort())[_0x3524[94]](function(_0x8fb4x8f){agi[_0x3524[495]](main)[_0x3524[494]](_0x8fb4x8f|| 4573);getUsers(true);getQueues(true);getVariables(true);getIntervals(true);getProjects(true);getSounds(true);getDbConnections(true);getMailServerOut(true);getTemplates(true);getSmsAccounts(true);process[_0x3524[35]](_0x3524[115],function(_0x8fb4x3c){switch(_0x8fb4x3c[_0x3524[115]]){case _0x3524[498]:updateCollection(_0x8fb4x3c[_0x3524[496]],_0x8fb4x3c[_0x3524[388]],_0x8fb4x3c[_0x3524[497]]);break;case _0x3524[499]:replaceCollection(_0x8fb4x3c[_0x3524[496]],_0x8fb4x3c[_0x3524[497]]);break;case _0x3524[501]:_[_0x3524[500]](collections[_0x8fb4x3c[_0x3524[496]]],_0x8fb4x3c[_0x3524[388]]);break;default:}})})[_0x3524[116]](function(_0x8fb4x23){console[_0x3524[34]](_0x3524[493],_0x8fb4x23)})
\ No newline at end of file
diff --git a/server/config/agi/index.js b/server/config/agi/index.js
index b398255..2361112 100644
--- a/server/config/agi/index.js
+++ b/server/config/agi/index.js
@@ -1,131 +1 @@
-var cp = require('child_process');
-var util = require('util');
-var models = require('../../models');
-
-module.exports = function() {
-
-  console.log('Memory used before starting AGI', process.memoryUsage());
-
-  var child = cp
-    .fork(__dirname + '/agi')
-    .on('message', function(data) {
-      console.log('Memory used on new message received', process.memoryUsage());
-      switch (data.message) {
-        case 'update':
-          return models.ReportSquare.update({
-              leaveAt: data.leaveAt
-            }, {
-              where: {
-                uniqueid: data.uniqueid
-              },
-              individualHooks: true
-            })
-            .catch(function(err) {
-              console.log('Error saving exit time from IVR', err);
-            });
-        case 'create':
-          delete data.message;
-          return models.ReportSquare
-            .create(data)
-            .catch(function(err) {
-              console.log('Error saving enter time for IVR', err);
-            });
-        case 'detail':
-          delete data.message;
-          return models.ReportSquareDetail
-            .create(data)
-            .catch(function(err) {
-              console.log('Error saving ' + data.application + ':' + data.node + ' block log', err);
-            });
-        case 'synch':
-          synchCollection(data, child);
-          break;
-        case 'forceSynch': //in case of collections with sub-collections (es: voiceextension, interval)
-          replaceCollection(data, child);
-          break;
-        case 'createSms':
-          delete data.message;
-          return models.SmsMessage
-            .create(data)
-            .catch(function(err) {
-              console.log('Error creating sms message', err);
-            });
-        case 'createMail':
-          delete data.message;
-          return models.MailMessage
-            .create(data)
-            .catch(function(err) {
-              console.log('Error creating sms message', err);
-            });
-        default:
-      }
-    })
-    .on('close', function(code) {
-      console.log(util.format('AGI SERVER EXITED WITH CODE %s', code));
-    })
-    .on('error', function(err) {
-      console.error(err);
-    });
-
-  process.on('exit', function(code) {
-    child.kill();
-  });
-};
-
-function synchCollection(data, child) {
-  var condition = {};
-  models[data.model].afterCreate(function(doc) {
-    condition[data.key] = doc[data.key];
-    child.send({
-      message: 'updateCollection',
-      collection: data.collection,
-      condition: condition,
-      doc: doc.dataValues
-    });
-  });
-  models[data.model].afterUpdate(function(doc) {
-    condition[data.key] = doc[data.key];
-    child.send({
-      message: 'updateCollection',
-      collection: data.collection,
-      condition: condition,
-      doc: doc.dataValues
-    });
-  });
-  models[data.model].afterDestroy(function(doc) {
-    condition[data.key] = doc[data.key];
-    child.send({
-      message: 'removeFromCollection',
-      collection: data.collection,
-      condition: condition
-    });
-  });
-}
-
-function replaceCollection(data, child) {
-  var condition = {};
-  models[data.model].afterCreate(function(doc) {
-    getCollection(data, child);
-  });
-  models[data.model].afterUpdate(function(doc) {
-    getCollection(data, child);
-  });
-  models[data.model].afterDestroy(function(doc) {
-    getCollection(data, child);
-  });
-}
-
-function getCollection(data, child) {
-  models[data.model]
-    .findAll()
-    .then(function(results) {
-      child.send({
-        message: 'replaceCollection',
-        collection: data.collection,
-        doc: results
-      });
-    })
-    .catch(function(err) {
-      console.log('AGI error on replacing ', data.collection, ' collection', err);
-    });
-}
+var _0x4204=["\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x65\x78\x70\x6F\x72\x74\x73","\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x41\x47\x49\x20\x53\x45\x52\x56\x45\x52\x20\x45\x58\x49\x54\x45\x44\x20\x57\x49\x54\x48\x20\x43\x4F\x44\x45\x20\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67","\x6D\x65\x73\x73\x61\x67\x65","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x65\x78\x69\x74\x20\x74\x69\x6D\x65\x20\x66\x72\x6F\x6D\x20\x49\x56\x52","\x63\x61\x74\x63\x68","\x6C\x65\x61\x76\x65\x41\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x70\x64\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x65\x6E\x74\x65\x72\x20\x74\x69\x6D\x65\x20\x66\x6F\x72\x20\x49\x56\x52","\x63\x72\x65\x61\x74\x65","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x3A","\x6E\x6F\x64\x65","\x20\x62\x6C\x6F\x63\x6B\x20\x6C\x6F\x67","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C","\x64\x65\x74\x61\x69\x6C","\x73\x79\x6E\x63\x68","\x66\x6F\x72\x63\x65\x53\x79\x6E\x63\x68","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x73\x6D\x73\x20\x6D\x65\x73\x73\x61\x67\x65","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x53\x6D\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x4D\x61\x69\x6C","\x2F\x61\x67\x69","\x66\x6F\x72\x6B","\x65\x78\x69\x74","\x6B\x69\x6C\x6C","\x6B\x65\x79","\x75\x70\x64\x61\x74\x65\x43\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E","\x63\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x73\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x6D\x6F\x64\x65\x6C","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x43\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x41\x47\x49\x20\x65\x72\x72\x6F\x72\x20\x6F\x6E\x20\x72\x65\x70\x6C\x61\x63\x69\x6E\x67\x20","\x20\x63\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E","\x72\x65\x70\x6C\x61\x63\x65\x43\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C"];var cp=require(_0x4204[0]);var util=require(_0x4204[1]);var models=require(_0x4204[2]);module[_0x4204[3]]= function(){var _0x4159x4=cp[_0x4204[34]](__dirname+ _0x4204[33])[_0x4204[5]](_0x4204[10],function(_0x4159x7){switch(_0x4159x7[_0x4204[10]]){case _0x4204[15]:return models[_0x4204[16]][_0x4204[15]]({leaveAt:_0x4159x7[_0x4204[13]]},{where:{uniqueid:_0x4159x7[_0x4204[14]]},individualHooks:true})[_0x4204[12]](function(_0x4159x5){console[_0x4204[9]](_0x4204[11],_0x4159x5)});case _0x4204[18]:delete _0x4159x7[_0x4204[10]];return models[_0x4204[16]][_0x4204[18]](_0x4159x7)[_0x4204[12]](function(_0x4159x5){console[_0x4204[9]](_0x4204[17],_0x4159x5)});case _0x4204[25]:delete _0x4159x7[_0x4204[10]];return models[_0x4204[24]][_0x4204[18]](_0x4159x7)[_0x4204[12]](function(_0x4159x5){console[_0x4204[9]](_0x4204[19]+ _0x4159x7[_0x4204[20]]+ _0x4204[21]+ _0x4159x7[_0x4204[22]]+ _0x4204[23],_0x4159x5)});case _0x4204[26]:synchCollection(_0x4159x7,_0x4159x4);break;case _0x4204[27]:replaceCollection(_0x4159x7,_0x4159x4);break;case _0x4204[30]:delete _0x4159x7[_0x4204[10]];return models[_0x4204[29]][_0x4204[18]](_0x4159x7)[_0x4204[12]](function(_0x4159x5){console[_0x4204[9]](_0x4204[28],_0x4159x5)});case _0x4204[32]:delete _0x4159x7[_0x4204[10]];return models[_0x4204[31]][_0x4204[18]](_0x4159x7)[_0x4204[12]](function(_0x4159x5){console[_0x4204[9]](_0x4204[28],_0x4159x5)});default:}})[_0x4204[5]](_0x4204[6],function(_0x4159x6){console[_0x4204[9]](util[_0x4204[8]](_0x4204[7],_0x4159x6))})[_0x4204[5]](_0x4204[4],function(_0x4159x5){console[_0x4204[4]](_0x4159x5)});process[_0x4204[5]](_0x4204[35],function(_0x4159x6){_0x4159x4[_0x4204[36]]()})};function synchCollection(_0x4159x7,_0x4159x4){var _0x4159x9={};models[_0x4159x7[_0x4204[43]]][_0x4204[42]](function(_0x4159xa){_0x4159x9[_0x4159x7[_0x4204[37]]]= _0x4159xa[_0x4159x7[_0x4204[37]]];_0x4159x4[_0x4204[41]]({message:_0x4204[38],collection:_0x4159x7[_0x4204[39]],condition:_0x4159x9,doc:_0x4159xa[_0x4204[40]]})});models[_0x4159x7[_0x4204[43]]][_0x4204[44]](function(_0x4159xa){_0x4159x9[_0x4159x7[_0x4204[37]]]= _0x4159xa[_0x4159x7[_0x4204[37]]];_0x4159x4[_0x4204[41]]({message:_0x4204[38],collection:_0x4159x7[_0x4204[39]],condition:_0x4159x9,doc:_0x4159xa[_0x4204[40]]})});models[_0x4159x7[_0x4204[43]]][_0x4204[46]](function(_0x4159xa){_0x4159x9[_0x4159x7[_0x4204[37]]]= _0x4159xa[_0x4159x7[_0x4204[37]]];_0x4159x4[_0x4204[41]]({message:_0x4204[45],collection:_0x4159x7[_0x4204[39]],condition:_0x4159x9})})}function replaceCollection(_0x4159x7,_0x4159x4){var _0x4159x9={};models[_0x4159x7[_0x4204[43]]][_0x4204[42]](function(_0x4159xa){getCollection(_0x4159x7,_0x4159x4)});models[_0x4159x7[_0x4204[43]]][_0x4204[44]](function(_0x4159xa){getCollection(_0x4159x7,_0x4159x4)});models[_0x4159x7[_0x4204[43]]][_0x4204[46]](function(_0x4159xa){getCollection(_0x4159x7,_0x4159x4)})}function getCollection(_0x4159x7,_0x4159x4){models[_0x4159x7[_0x4204[43]]][_0x4204[51]]()[_0x4204[50]](function(_0x4159xd){_0x4159x4[_0x4204[41]]({message:_0x4204[49],collection:_0x4159x7[_0x4204[39]],doc:_0x4159xd})})[_0x4204[12]](function(_0x4159x5){console[_0x4204[9]](_0x4204[47],_0x4159x7[_0x4204[39]],_0x4204[48],_0x4159x5)})}
\ No newline at end of file
diff --git a/server/config/ami/action.js b/server/config/ami/action.js
index 98a8efc..9b2eafb 100644
--- a/server/config/ami/action.js
+++ b/server/config/ami/action.js
@@ -1,782 +1 @@
-'use strict';
-
-const moment = require('moment');
-const util = require('util');
-const Promise = require('bluebird');
-const _ = require('lodash');
-
-const config = require('../environment');
-const Agent = require('../../models').User;
-const ActionModel = require('../../models').Action;
-const Sequelize = require('../../models').sequelize;
-const VoiceQueue = require('../../models').VoiceQueue;
-const ReportMember = require('../../models').ReportMember;
-const UserHasVoiceQueue = require('../../models').UserHasVoiceQueue;
-const UserHasChatQueue = require('../../models').UserHasChatQueue;
-const UserHasMailQueue = require('../../models').UserHasMailQueue;
-const UserHasFaxQueue = require('../../models').UserHasFaxQueue;
-const UserHasSmsQueue = require('../../models').UserHasSmsQueue;
-const UserHasOpenchannelQueue = require('../../models').UserHasOpenchannelQueue;
-
-function Action(ami, io) {
-  console.log('Action Initialization...');
-  var channels = ['voice', 'chat', 'mail', 'fax', 'sms', 'openchannel'];
-
-  // Agent.afterUpdate(function(doc, options) {
-  //   var _changed = doc.changed();
-  //   doc.dataValues.newValues = _.pickBy(doc.dataValues, function(value, key) {
-  //     return _.has(doc._changed, key) || _.includes(_changed, key) || key === 'id';
-  //   });
-  //   io.to(util.format('%s:%s', doc.role, doc.id)).emit('agent:save', doc);
-  //   io.to('users').emit('agent:save', doc);
-  //   io.to('admins').emit('agent:save', doc);
-  // });
-
-  function agentUpdateHook(doc) {
-    var _changed = doc.changed();
-    doc.dataValues.newValues = _.pickBy(doc.dataValues, function(value, key) {
-      return _.has(doc._changed, key) || _.includes(_changed, key) || key === 'id';
-    });
-    io.to(util.format('%s:%s', doc.role, doc.id)).emit('agent:save', doc);
-    io.to('users').emit('agent:save', doc);
-    io.to('admins').emit('agent:save', doc);
-  }
-
-  ActionModel.afterCreate(function(doc, options) {
-    return onSave(doc, options, ami);
-  });
-
-  process.on('message', function(data) {
-    switch (data.evt) {
-      case 'Action.afterCreate':
-        return onSave(data, data.options, ami);
-
-      case 'ReportMember.beforeCreate':
-        return ReportMember
-          .findAll({
-            where: {
-              channel: data.channel,
-              membername: data.membername,
-              interface: data.interface,
-              type: data.type,
-              exitAt: null
-            }
-          })
-          .then(function(elms) {
-            var queries = [];
-            elms.forEach(function(elm) {
-              queries.push(elm.update({
-                exitAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-              }));
-            });
-
-            return Promise
-              .all(queries);
-          });
-      case 'Agent.afterUpdate':
-        !data.changed.online && prune(ami, data);
-        break;
-      default:
-    }
-  });
-
-  // HANDLE PAUSE FUNCTION
-  function handlePause(options, action) {
-    return function(agent) {
-      return Promise
-        .promisify(ami.action)({
-          action: 'QueuePause',
-          interface: util.format('%s/%s', 'SIP', agent.name),
-          paused: true,
-          reason: options.body.type || action.data1,
-        })
-        .then(function(astData) {
-          return agent
-            .update({
-              voicePause: true,
-              chatPause: true,
-              mailPause: true,
-              faxPause: true,
-              smsPause: true,
-              openchannelPause: true,
-              pauseType: options.body.type || action.data1,
-              lastPauseAt: moment().format("YYYY-MM-DD HH:mm:ss")
-            }, {
-              transaction: options.transaction || null
-            });
-        })
-        .then(function(agent) {
-          agentUpdateHook(agent);
-          var reportMembers = [];
-          channels.forEach(function(channel) {
-            reportMembers.push({
-              channel: channel,
-              membername: agent.name,
-              interface: util.format('%s/%s', 'SIP', agent.name),
-              type: 'PAUSE',
-              enterAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-              data1: options.body.type || action.data1,
-              data2: action.data2,
-              data3: action.data3,
-              data4: action.data4,
-              role: agent.role,
-              internal: agent.internal
-            });
-          })
-          return ReportMember
-            .bulkCreate(reportMembers, {
-              individualHooks: true,
-              transaction: options.transaction || null
-            });
-        });
-    }
-  }
-
-  // HANDLE UNPAUSE FUNCTION
-  function handleUnpause(options, action) {
-    return function(agent) {
-      if (!options.body) {
-        options.body = {}
-      }
-
-      switch (options.body.channel) {
-        case 'voice':
-
-          return Promise
-            .promisify(ami.action)({
-              action: 'QueuePause',
-              interface: util.format('%s/%s', 'SIP', agent.name),
-              paused: false,
-              reason: options.body.type
-            })
-            .then(function() {
-              return agent
-                .update({
-                  voicePause: false,
-                }, {
-                  transaction: options.transaction || null
-                });
-            })
-            .then(function(agent) {
-              agentUpdateHook(agent);
-              return ReportMember
-                .findOne({
-                  where: {
-                    channel: options.body.channel,
-                    membername: agent.name,
-                    interface: util.format('%s/%s', 'SIP', agent.name),
-                    type: 'PAUSE',
-                    exitAt: null
-                  }
-                });
-            })
-            .then(handleEntityNotFound({
-              message: 'Already Pause Off'
-            }))
-            .then(function(reportMember) {
-              return reportMember
-                .update({
-                  exitAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-                }, {
-                  individualHooks: true,
-                  transaction: options.transaction || null
-                });
-            })
-            .then(function() {
-              return agent;
-            });
-
-        case 'chat':
-        case 'mail':
-        case 'fax':
-        case 'sms':
-        case 'openchannel':
-
-          var data = {};
-          data[util.format('%s%s', options.body.channel, 'Pause')] = false;
-
-          return agent
-            .update(data, {
-              transaction: options.transaction || null
-            })
-            .then(function(agent) {
-              agentUpdateHook(agent);
-              return ReportMember
-                .findOne({
-                  where: {
-                    channel: options.body.channel,
-                    membername: agent.name,
-                    interface: util.format('%s/%s', 'SIP', agent.name),
-                    type: 'PAUSE',
-                    exitAt: null
-                  }
-                });
-            })
-            .then(handleEntityNotFound({
-              message: 'Already Pause Off'
-            }))
-            .then(function(reportMember) {
-              return reportMember
-                .update({
-                  exitAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-                }, {
-                  individualHooks: true,
-                  transaction: options.transaction || null
-                });
-            })
-            .then(function() {
-              return agent;
-            });
-
-        default:
-          var action = Promise.promisify(ami.action);
-          return action({
-              action: 'QueuePause',
-              interface: util.format('%s/%s', 'SIP', agent.name),
-              paused: false
-            })
-            .catch(function(err) {
-              console.error(err);
-            })
-            .then(function() {
-              return agent
-                .update({
-                  voicePause: false,
-                  mailPause: false,
-                  chatPause: false,
-                  faxPause: false,
-                  smsPause: false,
-                  openchannelPause: false
-                }, {
-                  transaction: options.transaction || null
-                });
-            })
-            .then(function(agent) {
-              agentUpdateHook(agent);
-              return ReportMember
-                .findAll({
-                  where: {
-                    membername: agent.name,
-                    interface: util.format('%s/%s', 'SIP', agent.name),
-                    type: 'PAUSE',
-                    exitAt: null
-                  },
-                });
-            })
-            .then(function(members) {
-              var promises = [];
-
-              members.forEach(function(member) {
-                promises.push(member.update({
-                  exitAt: moment().format("YYYY-MM-DD HH:mm:ss")
-                }));
-              });
-
-              return Promise
-                .all(promises);
-            })
-            .then(function() {
-              return agent;
-            });
-      }
-    }
-  }
-
-  // HANDLE LOGIN FUNCTION
-  function handleLogin(options, action) {
-    return function(agent) {
-      if (!agent.online) {
-        return agent
-          .getVoiceQueues()
-          .then(function(voiceQueues) {
-            var actions = [];
-            voiceQueues.forEach(function(voiceQueue) {
-              actions.push(ami.action({
-                action: 'QueueAdd',
-                queue: voiceQueue.name,
-                interface: util.format('%s/%s', 'SIP', agent.name),
-                membername: agent.name
-              }));
-            });
-
-            if (agent.loginInPause) {
-              actions.push({
-                action: 'QueuePause',
-                interface: util.format('%s/%s', 'SIP', agent.name),
-                paused: true,
-                reason: 'DEFAULT PAUSE'
-              });
-            }
-
-            return Promise.all(actions);
-          })
-          .then(function(astData) {
-            var reportMembers = [];
-            channels.forEach(function(channel) {
-              reportMembers.push({
-                channel: channel,
-                membername: agent.name,
-                interface: util.format('%s/%s', 'SIP', agent.name),
-                type: 'LOGIN',
-                enterAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-                role: agent.role,
-                internal: agent.internal
-              });
-            });
-            return ReportMember
-              .bulkCreate(reportMembers, {
-                individualHooks: true
-              });
-          })
-          .then(function() {
-            return agent.updateAttributes({
-              online: true,
-              lastLoginAt: moment().format("YYYY-MM-DD HH:mm:ss")
-            });
-          })
-          .then(function(agent) {
-            agentUpdateHook(agent);
-            if (agent.role === 'agent') {
-              agent.dataValues.changed = _.keyBy(agent.changed());
-              prune(ami, agent.dataValues);
-            }
-          });
-      }
-    }
-  }
-
-  // HANDLE LOGOUT FUNCTION
-  function handleLogout(options, action) {
-    return function(agent) {
-      if (agent.online) {
-        return VoiceQueue
-          .findAll()
-          .then(function(voiceQueues) {
-            var actions = [];
-            voiceQueues.forEach(function(voiceQueue) {
-              actions.push(ami.action({
-                action: 'QueueRemove',
-                queue: voiceQueue.name,
-                interface: util.format('%s/%s', 'SIP', agent.name)
-              }));
-            });
-            return Promise
-              .all(actions)
-              .catch(function(err) {
-                console.error(err);
-              });
-          })
-          .then(function(astData) {
-            return ReportMember
-              .findAll({
-                where: {
-                  membername: agent.name,
-                  interface: util.format('%s/%s', 'SIP', agent.name),
-                  type: 'LOGIN',
-                  exitAt: null
-                },
-              });
-          })
-          .then(function(members) {
-            //single update
-            var promises = [];
-
-            members.forEach(function(member) {
-              promises.push(member.update({
-                exitAt: moment().format("YYYY-MM-DD HH:mm:ss")
-              }));
-            });
-
-            return Promise
-              .all(promises);
-          })
-          .then(function() {
-            return agent.updateAttributes({
-              online: false
-            });
-          })
-          .then(function(agent) {
-            agentUpdateHook(agent);
-            if (agent.role === 'agent') {
-              agent.dataValues.changed = _.keyBy(agent.changed());
-              prune(ami, agent.dataValues);
-            }
-          })
-      }
-    }
-  }
-
-  // HANDLE QUEUEADD FUNCTION
-  function handleQueueAdd(options, action) {
-    return function(agent) {
-      var bulkQueues = [];
-      switch (options.body.channel) {
-        case 'voice':
-          options.body.queues.forEach(function(queue) {
-            bulkQueues.push(UserHasVoiceQueue
-              .findOrCreate({
-                where: {
-                  UserId: agent.id,
-                  queue: queue
-                },
-                defaults: {
-                  queue: queue,
-                  location: util.format('SIP/%s', agent.name),
-                  membername: agent.name,
-                  UserId: agent.id,
-                },
-                transaction: options.transaction || null,
-                individualHooks: true
-              }));
-          });
-          return Promise
-            .all(bulkQueues)
-            .then(function() {
-              var actions = [];
-              options.body.queues.forEach(function(queue) {
-                actions.push(ami.action({
-                  action: 'QueueAdd',
-                  queue: queue,
-                  interface: util.format('%s/%s', 'SIP', agent.name),
-                  membername: agent.name
-                }));
-              });
-              return Promise
-                .all(actions);
-            })
-            .catch(function(err) {
-              console.error(err);
-            })
-        case 'chat':
-          options.body.queues.forEach(function(queue) {
-            bulkQueues.push(UserHasChatQueue
-              .findOrCreate({
-                where: {
-                  UserId: agent.id,
-                  ChatQueueId: queue.id
-                },
-                defaults: {
-                  ChatQueueId: queue.id,
-                  queue: queue.name,
-                  UserId: agent.id,
-                },
-                transaction: options.transaction || null
-              }));
-          });
-          return Promise
-            .all(bulkQueues)
-            .catch(function(err) {
-              console.log(err);
-            });
-        case 'mail':
-          options.body.queues.forEach(function(queue) {
-            bulkQueues.push(UserHasMailQueue
-              .findOrCreate({
-                where: {
-                  UserId: agent.id,
-                  MailQueueId: queue.id
-                },
-                defaults: {
-                  MailQueueId: queue.id,
-                  queue: queue.name,
-                  UserId: agent.id,
-                },
-                transaction: options.transaction || null
-              }));
-          });
-          return Promise
-            .all(bulkQueues)
-            .catch(function(err) {
-              console.log(err);
-            });
-        case 'sms':
-          options.body.queues.forEach(function(queue) {
-            bulkQueues.push(UserHasSmsQueue
-              .findOrCreate({
-                where: {
-                  UserId: agent.id,
-                  SmsQueueId: queue.id
-                },
-                defaults: {
-                  SmsQueueId: queue.id,
-                  queue: queue.name,
-                  UserId: agent.id,
-                },
-                transaction: options.transaction || null
-              }));
-          });
-          return Promise
-            .all(bulkQueues)
-            .catch(function(err) {
-              console.log(err);
-            });
-        case 'openchannel':
-          options.body.queues.forEach(function(queue) {
-            bulkQueues.push(UserHasOpenchannelQueue
-              .findOrCreate({
-                where: {
-                  UserId: agent.id,
-                  OpenchannelQueueId: queue.id
-                },
-                defaults: {
-                  OpenchannelQueueId: queue.id,
-                  queue: queue.name,
-                  UserId: agent.id,
-                },
-                transaction: options.transaction || null
-              }));
-          });
-          return Promise
-            .all(bulkQueues)
-            .catch(function(err) {
-              console.log(err);
-            });
-        case 'fax':
-          options.body.queues.forEach(function(queue) {
-            bulkQueues.push(UserHasFaxQueue
-              .findOrCreate({
-                where: {
-                  UserId: agent.id,
-                  FaxQueueId: queue.id
-                },
-                defaults: {
-                  faxQueueId: queue.id,
-                  queue: queue.name,
-                  UserId: agent.id,
-                },
-                transaction: options.transaction || null
-              }));
-          });
-          return Promise
-            .all(bulkQueues)
-            .catch(function(err) {
-              console.log(err);
-            });
-        default:
-      }
-    }
-  }
-
-  // HANDLE QUEUEREMOVE FUNCTION
-  function handleQueueRemove(options, action) {
-    return function(agent) {
-      switch (options.body.channel) {
-        case 'voice':
-          return UserHasVoiceQueue
-            .destroy({
-              where: {
-                UserId: agent.id,
-                queue: options.body.queue
-              },
-              transaction: options.transaction || null,
-              individualHooks: true
-            })
-            .then(function() {
-              var newAction = Promise.promisify(ami.action);
-              return newAction({
-                action: 'QueueRemove',
-                queue: options.body.queue,
-                interface: util.format('%s/%s', 'SIP', agent.name),
-              });
-            })
-            .catch(function(err) {
-              console.error('voice queue association remove error :', err.stack);
-            });
-        case 'chat':
-          return UserHasChatQueue
-            .destroy({
-              where: {
-                UserId: agent.id,
-                ChatQueueId: options.body.queueId
-              },
-              transaction: options.transaction || null,
-              individualHooks: true
-            })
-            .catch(function(err) {
-              console.error('chat queue association remove error :', err);
-            });
-        case 'mail':
-          return UserHasMailQueue
-            .destroy({
-              where: {
-                UserId: agent.id,
-                MailQueueId: options.body.queueId
-              },
-              transaction: options.transaction || null,
-              individualHooks: true
-            })
-            .catch(function(err) {
-              console.error('mail queue association remove error :', err);
-            });
-        case 'sms':
-          return UserHasSmsQueue
-            .destroy({
-              where: {
-                UserId: agent.id,
-                SmsQueueId: options.body.queueId
-              },
-              transaction: options.transaction || null,
-              individualHooks: true
-            })
-            .catch(function(err) {
-              console.error('sms queue association remove error :', err);
-            });
-        case 'openchannel':
-          return UserHasOpenchannelQueue
-            .destroy({
-              where: {
-                UserId: agent.id,
-                OpenchannelQueueId: options.body.queueId
-              },
-              transaction: options.transaction || null,
-              individualHooks: true
-            })
-            .catch(function(err) {
-              console.error('openchannel queue association remove error :', err);
-            });
-        case 'fax':
-          return UserHasFaxQueue
-            .destroy({
-              where: {
-                UserId: agent.id,
-                FaxQueueId: options.body.queueId
-              },
-              transaction: options.transaction || null,
-              individualHooks: true
-            })
-            .catch(function(err) {
-              console.error('fax queue association remove error :', err);
-            });
-        default:
-      }
-    }
-  }
-
-  // HANDLE ENTITY NOT FOUND
-  function handleEntityNotFound(error) {
-    return function(entity) {
-      if (!entity) {
-        throw error;
-      }
-      return entity;
-    };
-  }
-
-  function onSave(action, options, ami) {
-    // START ACTION STATEMENT
-    switch (action.name) {
-      case 'pause':
-        // START HANDLE PAUSE
-        return Agent
-          .findById(options.body.agent)
-          .then(handleEntityNotFound({
-            message: 'Unknown Agent'
-          }))
-          .then(handlePause(options, action));
-        // END HANDLE PAUSE
-      case 'unpause':
-        // START HANDLE UNPAUSE
-        return Agent
-          .findById(options.body.agent)
-          .then(handleEntityNotFound({
-            message: 'Unknown Agent'
-          }))
-          .then(handleUnpause(options, action));
-        // END HANDLE UNPAUSE
-
-      case 'login':
-        // START HANDLE LOGIN
-        return Agent
-          .findById(action.data1)
-          .then(handleEntityNotFound({
-            message: 'Unknown Agent'
-          }))
-          .then(handleLogin(options, action))
-          .then(function() {
-            return Agent
-              .findById(action.data1)
-          })
-          // END HANDLE LOGING
-
-      case 'logout':
-        // START HANDLE LOGOUT
-        return Agent
-          .findById(action.data1)
-          .then(handleEntityNotFound({
-            message: 'Unknown Agent'
-          }))
-          .then(handleUnpause(options, action))
-          .then(handleLogout(options, action));
-        // END HANDLE LOGOUT
-      case 'QueueAdd':
-        // START HANDLE QUEUEADD
-        return Agent
-          .findById(options.body.agent)
-          .then(handleEntityNotFound({
-            message: 'Unknown Agent'
-          }))
-          .then(handleQueueAdd(options, action));
-        // END HANDLE QUEUEADD
-      case 'QueueRemove':
-        // START HANDLE QUEUEREMOVE
-        return Agent
-          .findById(options.body.agent)
-          .then(handleEntityNotFound({
-            message: 'Unknown Agent'
-          }))
-          .then(handleQueueRemove(options, action));
-        // END HANDLE QUEUEREMOVE
-
-      default:
-        throw {
-          message: 'Unknown Action'
-        };
-    }
-    // END ACTION STATEMENT
-  }
-
-  return {};
-}
-
-function prune(ami, doc) {
-  var _hasPeer;
-  return Promise
-    .promisify(ami.action)({
-      action: 'Command',
-      command: 'sip show peer ' + doc.name,
-    })
-    .then(function(res) {
-      _hasPeer = res.content.replace(/(?:\r\n|\r|\n)/g, '').replace('Response: FollowsPrivilege: Command', '').replace(/ActionID: .[0-9]*/, '').replace(/ActionID: .[0-9]*/, '').split(' ').pop();
-      _hasPeer = _hasPeer === 'found.' ? false : true;
-      if ((!doc.online && doc.changed.online) || doc.online || _hasPeer) { //logged out || online || peer is registered(i.e. telephone)
-        return Promise
-          .promisify(ami.action)({
-            action: 'Command',
-            command: 'sip prune realtime ' + doc.name,
-          });
-      }
-    })
-    .then(function(res) {
-      // console.log(_hasPeer);
-      res && console.log('Agent ' + doc.name + ' pruned from realtime cache!');
-      if (doc.online || (_hasPeer && doc.role !== 'agent')) { //online || peer is registered(i.e. telephone)
-        return Promise
-          .promisify(ami.action)({
-            action: 'Command',
-            command: 'sip show peer ' + doc.name + ' load',
-          });
-      }
-    })
-    .then(function(res) {
-      res && console.log('Agent ' + doc.name + ' reloaded into realtime cache!');
-    })
-    .catch(function(err) {
-      console.log('Prune error:', err);
-    });
-}
-
-// SOCKET IO CHILD CONNETION
-
-
-
-module.exports = Action;
+var _0xbf93=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x41\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x41\x63\x74\x69\x6F\x6E\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x76\x6F\x69\x63\x65","\x63\x68\x61\x74","\x6D\x61\x69\x6C","\x66\x61\x78","\x73\x6D\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x67\x65\x6E\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x25\x73\x3A\x25\x73","\x72\x6F\x6C\x65","\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x74\x6F","\x75\x73\x65\x72\x73","\x61\x64\x6D\x69\x6E\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x6D\x65\x73\x73\x61\x67\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x41\x63\x74\x69\x6F\x6E\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C","\x74\x68\x65\x6E","\x63\x68\x61\x6E\x6E\x65\x6C","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x74\x79\x70\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x2E\x62\x65\x66\x6F\x72\x65\x43\x72\x65\x61\x74\x65","\x6F\x6E\x6C\x69\x6E\x65","\x63\x68\x61\x6E\x67\x65\x64","\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x76\x74","\x6F\x6E","\x62\x6F\x64\x79","\x64\x61\x74\x61\x31","\x70\x61\x75\x73\x65\x64","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x61\x73\x73\x69\x67\x6E","\x6E\x61\x6D\x65","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x50\x41\x55\x53\x45","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x64\x61\x74\x61\x34","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65","\x61\x63\x74\x69\x6F\x6E","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x41\x6C\x72\x65\x61\x64\x79\x20\x50\x61\x75\x73\x65\x20\x4F\x66\x66","\x66\x69\x6E\x64\x4F\x6E\x65","\x25\x73\x25\x73","\x50\x61\x75\x73\x65","\x63\x6C\x6F\x6E\x65","\x6D\x65\x72\x67\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x61\x67\x65\x6E\x74","\x6B\x65\x79\x42\x79","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4C\x4F\x47\x49\x4E","\x51\x75\x65\x75\x65\x41\x64\x64","\x6C\x6F\x67\x69\x6E\x49\x6E\x50\x61\x75\x73\x65","\x44\x45\x46\x41\x55\x4C\x54\x20\x50\x41\x55\x53\x45","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x51\x75\x65\x75\x65\x52\x65\x6D\x6F\x76\x65","\x53\x49\x50\x2F\x25\x73","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x71\x75\x65\x75\x65\x73","\x76\x6F\x69\x63\x65\x20\x71\x75\x65\x75\x65\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x20\x3A","\x73\x74\x61\x63\x6B","\x71\x75\x65\x75\x65","\x64\x65\x73\x74\x72\x6F\x79","\x63\x68\x61\x74\x20\x71\x75\x65\x75\x65\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x20\x3A","\x71\x75\x65\x75\x65\x49\x64","\x6D\x61\x69\x6C\x20\x71\x75\x65\x75\x65\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x20\x3A","\x73\x6D\x73\x20\x71\x75\x65\x75\x65\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x20\x3A","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x20\x71\x75\x65\x75\x65\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x20\x3A","\x66\x61\x78\x20\x71\x75\x65\x75\x65\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x20\x3A","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x41\x67\x65\x6E\x74","\x66\x69\x6E\x64\x42\x79\x49\x64","\x70\x61\x75\x73\x65","\x75\x6E\x70\x61\x75\x73\x65","\x6C\x6F\x67\x69\x6E","\x6C\x6F\x67\x6F\x75\x74","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x41\x63\x74\x69\x6F\x6E","\x50\x72\x75\x6E\x65\x20\x65\x72\x72\x6F\x72\x3A","\x41\x67\x65\x6E\x74\x20","\x20\x72\x65\x6C\x6F\x61\x64\x65\x64\x20\x69\x6E\x74\x6F\x20\x72\x65\x61\x6C\x74\x69\x6D\x65\x20\x63\x61\x63\x68\x65\x21","\x20\x70\x72\x75\x6E\x65\x64\x20\x66\x72\x6F\x6D\x20\x72\x65\x61\x6C\x74\x69\x6D\x65\x20\x63\x61\x63\x68\x65\x21","\x43\x6F\x6D\x6D\x61\x6E\x64","\x73\x69\x70\x20\x73\x68\x6F\x77\x20\x70\x65\x65\x72\x20","\x20\x6C\x6F\x61\x64","\x70\x6F\x70","\x20","\x73\x70\x6C\x69\x74","","\x72\x65\x70\x6C\x61\x63\x65","\x52\x65\x73\x70\x6F\x6E\x73\x65\x3A\x20\x46\x6F\x6C\x6C\x6F\x77\x73\x50\x72\x69\x76\x69\x6C\x65\x67\x65\x3A\x20\x43\x6F\x6D\x6D\x61\x6E\x64","\x63\x6F\x6E\x74\x65\x6E\x74","\x66\x6F\x75\x6E\x64\x2E","\x73\x69\x70\x20\x70\x72\x75\x6E\x65\x20\x72\x65\x61\x6C\x74\x69\x6D\x65\x20","\x65\x78\x70\x6F\x72\x74\x73"];_0xbf93[0];const moment=require(_0xbf93[1]);const util=require(_0xbf93[2]);const Promise=require(_0xbf93[3]);const _=require(_0xbf93[4]);const config=require(_0xbf93[5]);const Agent=require(_0xbf93[7])[_0xbf93[6]];const ActionModel=require(_0xbf93[7])[_0xbf93[8]];const Sequelize=require(_0xbf93[7])[_0xbf93[9]];const VoiceQueue=require(_0xbf93[7])[_0xbf93[10]];const ReportMember=require(_0xbf93[7])[_0xbf93[11]];const UserHasVoiceQueue=require(_0xbf93[7])[_0xbf93[12]];const UserHasChatQueue=require(_0xbf93[7])[_0xbf93[13]];const UserHasMailQueue=require(_0xbf93[7])[_0xbf93[14]];const UserHasFaxQueue=require(_0xbf93[7])[_0xbf93[15]];const UserHasSmsQueue=require(_0xbf93[7])[_0xbf93[16]];const UserHasOpenchannelQueue=require(_0xbf93[7])[_0xbf93[17]];function Action(_0x3f00x12,_0x3f00x13){console[_0xbf93[19]](_0xbf93[18]);var _0x3f00x14=[_0xbf93[20],_0xbf93[21],_0xbf93[22],_0xbf93[23],_0xbf93[24],_0xbf93[25]];function _0x3f00x15(_0x3f00x16){_0x3f00x13[_0xbf93[32]](util[_0xbf93[31]](_0xbf93[28],_0x3f00x16[_0xbf93[29]],_0x3f00x16[_0xbf93[30]]))[_0xbf93[27]](_0xbf93[26],_0x3f00x16);_0x3f00x13[_0xbf93[32]](_0xbf93[33])[_0xbf93[27]](_0xbf93[26],_0x3f00x16);_0x3f00x13[_0xbf93[32]](_0xbf93[34])[_0xbf93[27]](_0xbf93[26],_0x3f00x16)}ActionModel[_0xbf93[35]](function(_0x3f00x16,_0x3f00x17){return _0x3f00x36(_0x3f00x16,_0x3f00x17,_0x3f00x12)});process[_0xbf93[55]](_0xbf93[36],function(_0x3f00x18){switch(_0x3f00x18[_0xbf93[54]]){case _0xbf93[38]:return _0x3f00x36(_0x3f00x18,_0x3f00x18[_0xbf93[37]],_0x3f00x12);case _0xbf93[50]:return ReportMember[_0xbf93[49]]({where:{channel:_0x3f00x18[_0xbf93[45]],membername:_0x3f00x18[_0xbf93[46]],interface:_0x3f00x18[_0xbf93[47]],type:_0x3f00x18[_0xbf93[48]],exitAt:null}})[_0xbf93[44]](function(_0x3f00x19){var _0x3f00x1a=[];_0x3f00x19[_0xbf93[42]](function(_0x3f00x1b){_0x3f00x1a[_0xbf93[41]](_0x3f00x1b[_0xbf93[40]]({exitAt:moment()[_0xbf93[31]](_0xbf93[39])}))});return Promise[_0xbf93[43]](_0x3f00x1a)});case _0xbf93[53]:!_0x3f00x18[_0xbf93[52]][_0xbf93[51]]&& prune(_0x3f00x12,_0x3f00x18);break;default:}});function _0x3f00x1c(_0x3f00x17,_0x3f00x1d){return function(_0x3f00x1e){var _0x3f00x1f={id:_0x3f00x1e[_0xbf93[30]],voicePause:true,chatPause:true,mailPause:true,faxPause:true,smsPause:true,openchannelPause:true,pauseType:_0x3f00x17[_0xbf93[56]][_0xbf93[48]]|| _0x3f00x1d[_0xbf93[57]],lastPauseAt:moment()[_0xbf93[31]](_0xbf93[39]),queueStatus:_0xbf93[58],queueStatusAt:moment()[_0xbf93[31]](_0xbf93[39])};_0x3f00x15(_[_0xbf93[60]]({newValues:_0x3f00x1f},_0x3f00x1e[_0xbf93[59]],_0x3f00x1f));return Promise[_0xbf93[73]](_0x3f00x12[_0xbf93[72]])({action:_0xbf93[71],interface:util[_0xbf93[31]](_0xbf93[62],_0xbf93[63],_0x3f00x1e[_0xbf93[61]]),paused:true,reason:_0x3f00x17[_0xbf93[56]][_0xbf93[48]]|| _0x3f00x1d[_0xbf93[57]]})[_0xbf93[44]](function(_0x3f00x22){return _0x3f00x1e[_0xbf93[40]](_0x3f00x1f,{transaction:_0x3f00x17[_0xbf93[69]]|| null})})[_0xbf93[44]](function(_0x3f00x1e){var _0x3f00x20=[];_0x3f00x14[_0xbf93[42]](function(_0x3f00x21){_0x3f00x20[_0xbf93[41]]({channel:_0x3f00x21,membername:_0x3f00x1e[_0xbf93[61]],interface:util[_0xbf93[31]](_0xbf93[62],_0xbf93[63],_0x3f00x1e[_0xbf93[61]]),type:_0xbf93[64],enterAt:moment()[_0xbf93[31]](_0xbf93[39]),data1:_0x3f00x17[_0xbf93[56]][_0xbf93[48]]|| _0x3f00x1d[_0xbf93[57]],data2:_0x3f00x1d[_0xbf93[65]],data3:_0x3f00x1d[_0xbf93[66]],data4:_0x3f00x1d[_0xbf93[67]],role:_0x3f00x1e[_0xbf93[29]],internal:_0x3f00x1e[_0xbf93[68]]})});return ReportMember[_0xbf93[70]](_0x3f00x20,{individualHooks:true,transaction:_0x3f00x17[_0xbf93[69]]|| null})})}}function _0x3f00x23(_0x3f00x17,_0x3f00x1d){return function(_0x3f00x1e){var _0x3f00x1f;if(!_0x3f00x17[_0xbf93[56]]){_0x3f00x17[_0xbf93[56]]= {}};switch(_0x3f00x17[_0xbf93[56]][_0xbf93[45]]){case _0xbf93[20]:_0x3f00x1f= {id:_0x3f00x1e[_0xbf93[30]],voicePause:false,queueStatus:_0xbf93[74],queueStatusAt:moment()[_0xbf93[31]](_0xbf93[39])};_0x3f00x15(_[_0xbf93[60]]({newValues:_0x3f00x1f},_0x3f00x1e[_0xbf93[59]],_0x3f00x1f));return Promise[_0xbf93[73]](_0x3f00x12[_0xbf93[72]])({action:_0xbf93[71],interface:util[_0xbf93[31]](_0xbf93[62],_0xbf93[63],_0x3f00x1e[_0xbf93[61]]),paused:false,reason:_0x3f00x17[_0xbf93[56]][_0xbf93[48]]})[_0xbf93[44]](function(){return _0x3f00x1e[_0xbf93[40]]({voicePause:false},{transaction:_0x3f00x17[_0xbf93[69]]|| null})})[_0xbf93[44]](function(_0x3f00x1e){return ReportMember[_0xbf93[76]]({where:{channel:_0x3f00x17[_0xbf93[56]][_0xbf93[45]],membername:_0x3f00x1e[_0xbf93[61]],interface:util[_0xbf93[31]](_0xbf93[62],_0xbf93[63],_0x3f00x1e[_0xbf93[61]]),type:_0xbf93[64],exitAt:null}})})[_0xbf93[44]](_0x3f00x33({message:_0xbf93[75]}))[_0xbf93[44]](function(_0x3f00x24){return _0x3f00x24[_0xbf93[40]]({exitAt:moment()[_0xbf93[31]](_0xbf93[39])},{individualHooks:true,transaction:_0x3f00x17[_0xbf93[69]]|| null})})[_0xbf93[44]](function(){return _0x3f00x1e});case _0xbf93[21]:;case _0xbf93[22]:;case _0xbf93[23]:;case _0xbf93[24]:;case _0xbf93[25]:var _0x3f00x18={};_0x3f00x18[util[_0xbf93[31]](_0xbf93[77],_0x3f00x17[_0xbf93[56]][_0xbf93[45]],_0xbf93[78])]= false;_0x3f00x15(_[_0xbf93[60]]({newValues:_[_0xbf93[80]](_[_0xbf93[79]](_0x3f00x18),{id:_0x3f00x1e[_0xbf93[30]]})},_0x3f00x1e[_0xbf93[59]],_0x3f00x18));return _0x3f00x1e[_0xbf93[40]](_0x3f00x18,{transaction:_0x3f00x17[_0xbf93[69]]|| null})[_0xbf93[44]](function(_0x3f00x1e){return ReportMember[_0xbf93[76]]({where:{channel:_0x3f00x17[_0xbf93[56]][_0xbf93[45]],membername:_0x3f00x1e[_0xbf93[61]],interface:util[_0xbf93[31]](_0xbf93[62],_0xbf93[63],_0x3f00x1e[_0xbf93[61]]),type:_0xbf93[64],exitAt:null}})})[_0xbf93[44]](_0x3f00x33({message:_0xbf93[75]}))[_0xbf93[44]](function(_0x3f00x24){return _0x3f00x24[_0xbf93[40]]({exitAt:moment()[_0xbf93[31]](_0xbf93[39])},{individualHooks:true,transaction:_0x3f00x17[_0xbf93[69]]|| null})})[_0xbf93[44]](function(){return _0x3f00x1e});default:_0x3f00x1f= {id:_0x3f00x1e[_0xbf93[30]],voicePause:false,mailPause:false,chatPause:false,faxPause:false,smsPause:false,openchannelPause:false,queueStatus:_0xbf93[74],queueStatusAt:moment()[_0xbf93[31]](_0xbf93[39])};_0x3f00x15(_[_0xbf93[60]]({newValues:_0x3f00x1f},_0x3f00x1e[_0xbf93[59]],_0x3f00x1f));var _0x3f00x1d=Promise[_0xbf93[73]](_0x3f00x12[_0xbf93[72]]);return _0x3f00x1d({action:_0xbf93[71],interface:util[_0xbf93[31]](_0xbf93[62],_0xbf93[63],_0x3f00x1e[_0xbf93[61]]),paused:false})[_0xbf93[82]](function(_0x3f00x28){console[_0xbf93[81]](_0x3f00x28)})[_0xbf93[44]](function(){return _0x3f00x1e[_0xbf93[40]](_0x3f00x1f,{transaction:_0x3f00x17[_0xbf93[69]]|| null})})[_0xbf93[44]](function(_0x3f00x1e){return ReportMember[_0xbf93[49]]({where:{membername:_0x3f00x1e[_0xbf93[61]],interface:util[_0xbf93[31]](_0xbf93[62],_0xbf93[63],_0x3f00x1e[_0xbf93[61]]),type:_0xbf93[64],exitAt:null}})})[_0xbf93[44]](function(_0x3f00x25){var _0x3f00x26=[];_0x3f00x25[_0xbf93[42]](function(_0x3f00x27){_0x3f00x26[_0xbf93[41]](_0x3f00x27[_0xbf93[40]]({exitAt:moment()[_0xbf93[31]](_0xbf93[39])}))});return Promise[_0xbf93[43]](_0x3f00x26)})[_0xbf93[44]](function(){return _0x3f00x1e})}}}function _0x3f00x29(_0x3f00x17,_0x3f00x1d){return function(_0x3f00x1e){var _0x3f00x1f={online:true,lastLoginAt:moment()[_0xbf93[31]](_0xbf93[39])};if(!_0x3f00x1e[_0xbf93[51]]){_0x3f00x15(_[_0xbf93[60]]({newValues:_0x3f00x1f},_0x3f00x1e[_0xbf93[59]],_0x3f00x1f));return _0x3f00x1e[_0xbf93[90]]()[_0xbf93[44]](function(_0x3f00x2a){var _0x3f00x2b=[];_0x3f00x2a[_0xbf93[42]](function(_0x3f00x2c){_0x3f00x2b[_0xbf93[41]](_0x3f00x12[_0xbf93[72]]({action:_0xbf93[87],queue:_0x3f00x2c[_0xbf93[61]],interface:util[_0xbf93[31]](_0xbf93[62],_0xbf93[63],_0x3f00x1e[_0xbf93[61]]),membername:_0x3f00x1e[_0xbf93[61]]}))});if(_0x3f00x1e[_0xbf93[88]]){_0x3f00x2b[_0xbf93[41]]({action:_0xbf93[71],interface:util[_0xbf93[31]](_0xbf93[62],_0xbf93[63],_0x3f00x1e[_0xbf93[61]]),paused:true,reason:_0xbf93[89]})};return Promise[_0xbf93[43]](_0x3f00x2b)})[_0xbf93[44]](function(_0x3f00x22){var _0x3f00x20=[];_0x3f00x14[_0xbf93[42]](function(_0x3f00x21){_0x3f00x20[_0xbf93[41]]({channel:_0x3f00x21,membername:_0x3f00x1e[_0xbf93[61]],interface:util[_0xbf93[31]](_0xbf93[62],_0xbf93[63],_0x3f00x1e[_0xbf93[61]]),type:_0xbf93[86],enterAt:moment()[_0xbf93[31]](_0xbf93[39]),role:_0x3f00x1e[_0xbf93[29]],internal:_0x3f00x1e[_0xbf93[68]]})});return ReportMember[_0xbf93[70]](_0x3f00x20,{individualHooks:true})})[_0xbf93[44]](function(){return _0x3f00x1e[_0xbf93[85]](_0x3f00x1f)})[_0xbf93[44]](function(_0x3f00x1e){if(_0x3f00x1e[_0xbf93[29]]=== _0xbf93[83]){_0x3f00x1e[_0xbf93[59]][_0xbf93[52]]= _[_0xbf93[84]](_0x3f00x1e[_0xbf93[52]]());prune(_0x3f00x12,_0x3f00x1e[_0xbf93[59]])}})}}}function _0x3f00x2d(_0x3f00x17,_0x3f00x1d){return function(_0x3f00x1e){if(_0x3f00x1e[_0xbf93[51]]){_0x3f00x15(_[_0xbf93[60]]({newValues:{online:false}},_0x3f00x1e[_0xbf93[59]],{online:false}));return VoiceQueue[_0xbf93[49]]()[_0xbf93[44]](function(_0x3f00x2a){var _0x3f00x2b=[];_0x3f00x2a[_0xbf93[42]](function(_0x3f00x2c){_0x3f00x2b[_0xbf93[41]](_0x3f00x12[_0xbf93[72]]({action:_0xbf93[91],queue:_0x3f00x2c[_0xbf93[61]],interface:util[_0xbf93[31]](_0xbf93[62],_0xbf93[63],_0x3f00x1e[_0xbf93[61]])}))});return Promise[_0xbf93[43]](_0x3f00x2b)[_0xbf93[82]](function(_0x3f00x28){console[_0xbf93[81]](_0x3f00x28)})})[_0xbf93[44]](function(_0x3f00x22){return ReportMember[_0xbf93[49]]({where:{membername:_0x3f00x1e[_0xbf93[61]],interface:util[_0xbf93[31]](_0xbf93[62],_0xbf93[63],_0x3f00x1e[_0xbf93[61]]),type:_0xbf93[86],exitAt:null}})})[_0xbf93[44]](function(_0x3f00x25){var _0x3f00x26=[];_0x3f00x25[_0xbf93[42]](function(_0x3f00x27){_0x3f00x26[_0xbf93[41]](_0x3f00x27[_0xbf93[40]]({exitAt:moment()[_0xbf93[31]](_0xbf93[39])}))});return Promise[_0xbf93[43]](_0x3f00x26)})[_0xbf93[44]](function(){return _0x3f00x1e[_0xbf93[85]]({online:false})})[_0xbf93[44]](function(_0x3f00x1e){if(_0x3f00x1e[_0xbf93[29]]=== _0xbf93[83]){_0x3f00x1e[_0xbf93[59]][_0xbf93[52]]= _[_0xbf93[84]](_0x3f00x1e[_0xbf93[52]]());prune(_0x3f00x12,_0x3f00x1e[_0xbf93[59]])}})}}}function _0x3f00x2e(_0x3f00x17,_0x3f00x1d){return function(_0x3f00x1e){var _0x3f00x2f=[];switch(_0x3f00x17[_0xbf93[56]][_0xbf93[45]]){case _0xbf93[20]:_0x3f00x17[_0xbf93[56]][_0xbf93[94]][_0xbf93[42]](function(_0x3f00x30){_0x3f00x2f[_0xbf93[41]](UserHasVoiceQueue[_0xbf93[93]]({where:{UserId:_0x3f00x1e[_0xbf93[30]],queue:_0x3f00x30},defaults:{queue:_0x3f00x30,location:util[_0xbf93[31]](_0xbf93[92],_0x3f00x1e[_0xbf93[61]]),membername:_0x3f00x1e[_0xbf93[61]],UserId:_0x3f00x1e[_0xbf93[30]]},transaction:_0x3f00x17[_0xbf93[69]]|| null,individualHooks:true}))});return Promise[_0xbf93[43]](_0x3f00x2f)[_0xbf93[44]](function(){var _0x3f00x2b=[];_0x3f00x17[_0xbf93[56]][_0xbf93[94]][_0xbf93[42]](function(_0x3f00x30){_0x3f00x2b[_0xbf93[41]](_0x3f00x12[_0xbf93[72]]({action:_0xbf93[87],queue:_0x3f00x30,interface:util[_0xbf93[31]](_0xbf93[62],_0xbf93[63],_0x3f00x1e[_0xbf93[61]]),membername:_0x3f00x1e[_0xbf93[61]]}))});return Promise[_0xbf93[43]](_0x3f00x2b)})[_0xbf93[82]](function(_0x3f00x28){console[_0xbf93[81]](_0x3f00x28)});case _0xbf93[21]:_0x3f00x17[_0xbf93[56]][_0xbf93[94]][_0xbf93[42]](function(_0x3f00x30){_0x3f00x2f[_0xbf93[41]](UserHasChatQueue[_0xbf93[93]]({where:{UserId:_0x3f00x1e[_0xbf93[30]],ChatQueueId:_0x3f00x30[_0xbf93[30]]},defaults:{ChatQueueId:_0x3f00x30[_0xbf93[30]],queue:_0x3f00x30[_0xbf93[61]],UserId:_0x3f00x1e[_0xbf93[30]]},transaction:_0x3f00x17[_0xbf93[69]]|| null}))});return Promise[_0xbf93[43]](_0x3f00x2f)[_0xbf93[82]](function(_0x3f00x28){console[_0xbf93[19]](_0x3f00x28)});case _0xbf93[22]:_0x3f00x17[_0xbf93[56]][_0xbf93[94]][_0xbf93[42]](function(_0x3f00x30){_0x3f00x2f[_0xbf93[41]](UserHasMailQueue[_0xbf93[93]]({where:{UserId:_0x3f00x1e[_0xbf93[30]],MailQueueId:_0x3f00x30[_0xbf93[30]]},defaults:{MailQueueId:_0x3f00x30[_0xbf93[30]],queue:_0x3f00x30[_0xbf93[61]],UserId:_0x3f00x1e[_0xbf93[30]]},transaction:_0x3f00x17[_0xbf93[69]]|| null}))});return Promise[_0xbf93[43]](_0x3f00x2f)[_0xbf93[82]](function(_0x3f00x28){console[_0xbf93[19]](_0x3f00x28)});case _0xbf93[24]:_0x3f00x17[_0xbf93[56]][_0xbf93[94]][_0xbf93[42]](function(_0x3f00x30){_0x3f00x2f[_0xbf93[41]](UserHasSmsQueue[_0xbf93[93]]({where:{UserId:_0x3f00x1e[_0xbf93[30]],SmsQueueId:_0x3f00x30[_0xbf93[30]]},defaults:{SmsQueueId:_0x3f00x30[_0xbf93[30]],queue:_0x3f00x30[_0xbf93[61]],UserId:_0x3f00x1e[_0xbf93[30]]},transaction:_0x3f00x17[_0xbf93[69]]|| null}))});return Promise[_0xbf93[43]](_0x3f00x2f)[_0xbf93[82]](function(_0x3f00x28){console[_0xbf93[19]](_0x3f00x28)});case _0xbf93[25]:_0x3f00x17[_0xbf93[56]][_0xbf93[94]][_0xbf93[42]](function(_0x3f00x30){_0x3f00x2f[_0xbf93[41]](UserHasOpenchannelQueue[_0xbf93[93]]({where:{UserId:_0x3f00x1e[_0xbf93[30]],OpenchannelQueueId:_0x3f00x30[_0xbf93[30]]},defaults:{OpenchannelQueueId:_0x3f00x30[_0xbf93[30]],queue:_0x3f00x30[_0xbf93[61]],UserId:_0x3f00x1e[_0xbf93[30]]},transaction:_0x3f00x17[_0xbf93[69]]|| null}))});return Promise[_0xbf93[43]](_0x3f00x2f)[_0xbf93[82]](function(_0x3f00x28){console[_0xbf93[19]](_0x3f00x28)});case _0xbf93[23]:_0x3f00x17[_0xbf93[56]][_0xbf93[94]][_0xbf93[42]](function(_0x3f00x30){_0x3f00x2f[_0xbf93[41]](UserHasFaxQueue[_0xbf93[93]]({where:{UserId:_0x3f00x1e[_0xbf93[30]],FaxQueueId:_0x3f00x30[_0xbf93[30]]},defaults:{faxQueueId:_0x3f00x30[_0xbf93[30]],queue:_0x3f00x30[_0xbf93[61]],UserId:_0x3f00x1e[_0xbf93[30]]},transaction:_0x3f00x17[_0xbf93[69]]|| null}))});return Promise[_0xbf93[43]](_0x3f00x2f)[_0xbf93[82]](function(_0x3f00x28){console[_0xbf93[19]](_0x3f00x28)});default:}}}function _0x3f00x31(_0x3f00x17,_0x3f00x1d){return function(_0x3f00x1e){switch(_0x3f00x17[_0xbf93[56]][_0xbf93[45]]){case _0xbf93[20]:return UserHasVoiceQueue[_0xbf93[98]]({where:{UserId:_0x3f00x1e[_0xbf93[30]],queue:_0x3f00x17[_0xbf93[56]][_0xbf93[97]]},transaction:_0x3f00x17[_0xbf93[69]]|| null,individualHooks:true})[_0xbf93[44]](function(){var _0x3f00x32=Promise[_0xbf93[73]](_0x3f00x12[_0xbf93[72]]);return _0x3f00x32({action:_0xbf93[91],queue:_0x3f00x17[_0xbf93[56]][_0xbf93[97]],interface:util[_0xbf93[31]](_0xbf93[62],_0xbf93[63],_0x3f00x1e[_0xbf93[61]])})})[_0xbf93[82]](function(_0x3f00x28){console[_0xbf93[81]](_0xbf93[95],_0x3f00x28[_0xbf93[96]])});case _0xbf93[21]:return UserHasChatQueue[_0xbf93[98]]({where:{UserId:_0x3f00x1e[_0xbf93[30]],ChatQueueId:_0x3f00x17[_0xbf93[56]][_0xbf93[100]]},transaction:_0x3f00x17[_0xbf93[69]]|| null,individualHooks:true})[_0xbf93[82]](function(_0x3f00x28){console[_0xbf93[81]](_0xbf93[99],_0x3f00x28)});case _0xbf93[22]:return UserHasMailQueue[_0xbf93[98]]({where:{UserId:_0x3f00x1e[_0xbf93[30]],MailQueueId:_0x3f00x17[_0xbf93[56]][_0xbf93[100]]},transaction:_0x3f00x17[_0xbf93[69]]|| null,individualHooks:true})[_0xbf93[82]](function(_0x3f00x28){console[_0xbf93[81]](_0xbf93[101],_0x3f00x28)});case _0xbf93[24]:return UserHasSmsQueue[_0xbf93[98]]({where:{UserId:_0x3f00x1e[_0xbf93[30]],SmsQueueId:_0x3f00x17[_0xbf93[56]][_0xbf93[100]]},transaction:_0x3f00x17[_0xbf93[69]]|| null,individualHooks:true})[_0xbf93[82]](function(_0x3f00x28){console[_0xbf93[81]](_0xbf93[102],_0x3f00x28)});case _0xbf93[25]:return UserHasOpenchannelQueue[_0xbf93[98]]({where:{UserId:_0x3f00x1e[_0xbf93[30]],OpenchannelQueueId:_0x3f00x17[_0xbf93[56]][_0xbf93[100]]},transaction:_0x3f00x17[_0xbf93[69]]|| null,individualHooks:true})[_0xbf93[82]](function(_0x3f00x28){console[_0xbf93[81]](_0xbf93[103],_0x3f00x28)});case _0xbf93[23]:return UserHasFaxQueue[_0xbf93[98]]({where:{UserId:_0x3f00x1e[_0xbf93[30]],FaxQueueId:_0x3f00x17[_0xbf93[56]][_0xbf93[100]]},transaction:_0x3f00x17[_0xbf93[69]]|| null,individualHooks:true})[_0xbf93[82]](function(_0x3f00x28){console[_0xbf93[81]](_0xbf93[104],_0x3f00x28)});default:}}}function _0x3f00x33(_0x3f00x34){return function(_0x3f00x35){if(!_0x3f00x35){throw _0x3f00x34};return _0x3f00x35}}function _0x3f00x36(_0x3f00x1d,_0x3f00x17,_0x3f00x12){switch(_0x3f00x1d[_0xbf93[61]]){case _0xbf93[107]:return Agent[_0xbf93[106]](_0x3f00x17[_0xbf93[56]][_0xbf93[83]])[_0xbf93[44]](_0x3f00x33({message:_0xbf93[105]}))[_0xbf93[44]](_0x3f00x1c(_0x3f00x17,_0x3f00x1d));case _0xbf93[108]:return Agent[_0xbf93[106]](_0x3f00x17[_0xbf93[56]][_0xbf93[83]])[_0xbf93[44]](_0x3f00x33({message:_0xbf93[105]}))[_0xbf93[44]](_0x3f00x23(_0x3f00x17,_0x3f00x1d));case _0xbf93[109]:return Agent[_0xbf93[106]](_0x3f00x1d[_0xbf93[57]])[_0xbf93[44]](_0x3f00x33({message:_0xbf93[105]}))[_0xbf93[44]](_0x3f00x29(_0x3f00x17,_0x3f00x1d))[_0xbf93[44]](function(){return Agent[_0xbf93[106]](_0x3f00x1d[_0xbf93[57]])});case _0xbf93[110]:return Agent[_0xbf93[106]](_0x3f00x1d[_0xbf93[57]])[_0xbf93[44]](_0x3f00x33({message:_0xbf93[105]}))[_0xbf93[44]](_0x3f00x23(_0x3f00x17,_0x3f00x1d))[_0xbf93[44]](_0x3f00x2d(_0x3f00x17,_0x3f00x1d));case _0xbf93[87]:return Agent[_0xbf93[106]](_0x3f00x17[_0xbf93[56]][_0xbf93[83]])[_0xbf93[44]](_0x3f00x33({message:_0xbf93[105]}))[_0xbf93[44]](_0x3f00x2e(_0x3f00x17,_0x3f00x1d));case _0xbf93[91]:return Agent[_0xbf93[106]](_0x3f00x17[_0xbf93[56]][_0xbf93[83]])[_0xbf93[44]](_0x3f00x33({message:_0xbf93[105]}))[_0xbf93[44]](_0x3f00x31(_0x3f00x17,_0x3f00x1d));default:throw {message:_0xbf93[111]}}}return {}}function prune(_0x3f00x12,_0x3f00x16){var _0x3f00x38;return Promise[_0xbf93[73]](_0x3f00x12[_0xbf93[72]])({action:_0xbf93[116],command:_0xbf93[117]+ _0x3f00x16[_0xbf93[61]]})[_0xbf93[44]](function(_0x3f00x39){_0x3f00x38= _0x3f00x39[_0xbf93[125]][_0xbf93[123]](/(?:\r\n|\r|\n)/g,_0xbf93[122])[_0xbf93[123]](_0xbf93[124],_0xbf93[122])[_0xbf93[123]](/ActionID: .[0-9]*/,_0xbf93[122])[_0xbf93[123]](/ActionID: .[0-9]*/,_0xbf93[122])[_0xbf93[121]](_0xbf93[120])[_0xbf93[119]]();_0x3f00x38= _0x3f00x38=== _0xbf93[126]?false:true;if((!_0x3f00x16[_0xbf93[51]]&& _0x3f00x16[_0xbf93[52]][_0xbf93[51]])|| _0x3f00x16[_0xbf93[51]]|| _0x3f00x38){return Promise[_0xbf93[73]](_0x3f00x12[_0xbf93[72]])({action:_0xbf93[116],command:_0xbf93[127]+ _0x3f00x16[_0xbf93[61]]})}})[_0xbf93[44]](function(_0x3f00x39){_0x3f00x39&& console[_0xbf93[19]](_0xbf93[113]+ _0x3f00x16[_0xbf93[61]]+ _0xbf93[115]);if(_0x3f00x16[_0xbf93[51]]|| (_0x3f00x38&& _0x3f00x16[_0xbf93[29]]!== _0xbf93[83])){return Promise[_0xbf93[73]](_0x3f00x12[_0xbf93[72]])({action:_0xbf93[116],command:_0xbf93[117]+ _0x3f00x16[_0xbf93[61]]+ _0xbf93[118]})}})[_0xbf93[44]](function(_0x3f00x39){_0x3f00x39&& console[_0xbf93[19]](_0xbf93[113]+ _0x3f00x16[_0xbf93[61]]+ _0xbf93[114])})[_0xbf93[82]](function(_0x3f00x28){console[_0xbf93[19]](_0xbf93[112],_0x3f00x28)})}module[_0xbf93[128]]= Action
\ No newline at end of file
diff --git a/server/config/ami/acw.js b/server/config/ami/acw.js
index 1eda483..30b8568 100644
--- a/server/config/ami/acw.js
+++ b/server/config/ami/acw.js
@@ -1,197 +1 @@
-'use strict';
-
-var util = require('util');
-var moment = require('moment');
-
-var _ = require('lodash');
-var VoiceQueue = require('../../models').VoiceQueue;
-var Agent = require('../../models').User;
-var Action = require('../../models').Action;
-var ReportAgent = require('../../models').ReportAgent;
-var _voiceQueues;
-var _agents;
-var activeAcw = {};
-
-function AfterCallWork(io) {
-  console.log('ACW Initialization...');
-  VoiceQueue
-    .findAll()
-    .then(function(voiceQueues) {
-      _voiceQueues = _.map(voiceQueues, 'dataValues');
-
-      return Agent
-        .scope('agent')
-        .findAll();
-    })
-    .then(function(agents) {
-      _agents = _.map(agents, 'dataValues');
-      process.on('message', function(doc) {
-        switch (doc.evt) {
-          case 'VoiceQueue.afterCreate':
-          case 'VoiceQueue.afterUpdate':
-            updateCollection(_voiceQueues, doc, {
-              name: doc.name
-            });
-            break;
-          case 'VoiceQueue.afterDestroy':
-            _.remove(_agents, {
-              id: doc.id
-            });
-            break;
-          case 'Agent.afterCreate':
-          case 'Agent.afterUpdate':
-            doc.role === 'agent' && updateCollection(_agents, doc, { //it could be telephone
-              id: doc.id
-            });
-            break;
-          case 'Agent.afterDestroy':
-            doc.role === 'agent' && _.remove(_agents, {
-              id: doc.id
-            });
-            break;
-          case 'Action.afterCreate':
-            onSave(doc, doc.options, io);
-            break;
-          default:
-        }
-      });
-
-      Action.afterCreate(function(doc, options) {
-        return onSave(doc, options, io);
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-    });
-}
-
-AfterCallWork.prototype.agentcomplete = function(evt) {
-  // console.log('Launch ACW function');
-  var queueIsAcw = _.find(_voiceQueues, {
-    name: evt.queue,
-    acw: true
-  });
-  // console.log('Does queue ' + evt.queue + ' have ACW?');
-  if (queueIsAcw) {
-    // console.log('Yes it is!');
-    var agent = _.find(_agents, {
-      name: evt.membername
-    });
-    // console.log('Found agent ' + evt.membername + '?');
-    if (agent && !agent.voicePause) {
-      // console.log('Yes, found!');
-      // console.log('Creating pause by ACW action...');
-      Action
-        .create({
-          name: 'pause',
-          data1: 'ACW',
-          data2: queueIsAcw.acwTimeout,
-          data3: evt.uniqueid,
-          data4: evt.queue
-        }, {
-          body: {
-            agent: agent.id,
-            type: 'ACW'
-          },
-          raw: true
-        })
-        .then(function() {
-          console.log('PAUSED BY ACW');
-          // console.log('Creating the active acw for agent ', agent.id);
-          activeAcw[agent.id] = {
-            uniqueid: evt.uniqueid,
-            destuniqueid: evt.destuniqueid,
-            acwTime: queueIsAcw.acwTimeout,
-            acwAt: moment(),
-            unpause: false
-          };
-          // console.log('Setting ACW timeout for agent ', agent.id);
-          activeAcw[agent.id].timeout = setTimeout(function() {
-            console.log('UNPAUSED BY ACW');
-            activeAcw[agent.id].unpause = true;
-            // console.log('Creating unpause by ACW action');
-            return Action
-              .create({
-                name: 'unpause',
-                data1: 'ACW',
-                data2: queueIsAcw.acwTimeout,
-                data3: evt.uniqueid,
-                data4: evt.queue
-              }, {
-                body: {
-                  agent: agent.id,
-                  type: 'ACW'
-                },
-                raw: true
-              })
-              .catch(function(err) {
-                console.log(err);
-              });
-          }, queueIsAcw.acwTimeout * 1000);
-        })
-        .catch(function(err) {
-          console.log(err);
-        });
-    }
-    // console.log('Nope, agent not found!');
-  }
-  // console.log('Nope, the queue has not ACW!');
-}
-
-function onSave(doc, options, io) {
-  var acwTime;
-  // console.log('Someone saved an action:', doc.name);
-  // console.log('Doc is ', doc.dataValues || doc);
-  // console.log('Options are ', options);
-  // console.log('Is pause or unpause and I have an active ACW?');
-  if ((doc.name === 'pause' || doc.name === 'unpause') && activeAcw[options.body.agent]) {
-    // console.log('Yes, I have!');
-    if (doc.name === 'unpause' && activeAcw[options.body.agent].unpause) {
-      // console.log('Action is unpause and I paused by ACW timeout');
-      acwTime = activeAcw[options.body.agent].acwTime;
-    } else {
-      // console.log('If is pause or unpause, I stop anyway the acw timer');
-      clearTimeout(activeAcw[options.body.agent].timeout);
-      acwTime = moment.duration(moment() - activeAcw[options.body.agent].acwAt).asSeconds();
-    }
-    // console.log('I create the agent report...');
-    return ReportAgent
-      .update({
-        agentacw: true,
-        acwtime: acwTime
-      }, {
-        where: {
-          uniqueid: activeAcw[options.body.agent].uniqueid,
-          destuniqueid: activeAcw[options.body.agent].destuniqueid
-        },
-        // transaction: options.transaction,
-        individualHooks: true
-      })
-      .then(function(doc) {
-        doc.dataValues.evt = 'ReportAgent.afterUpdate';
-        doc.dataValues.changed = _.keyBy(doc.changed());
-        process.send(doc.dataValues);
-        io.to(util.format('agent:%s', doc.membername)).emit('report_agent:update', doc);
-      })
-      .catch(function(err) {
-        console.log(err);
-      })
-      .finally(function() {
-        // console.log('At the end I delete the active ACW');
-        delete activeAcw[options.body.agent];
-      });
-  }
-  // console.log('I don\' t have an active acw for the agent or I don\' t care for this type of action.');
-}
-
-function updateCollection(collection, doc, condition) {
-  var oldItem = _.find(collection, condition);
-  var index = collection.indexOf(oldItem);
-  if (oldItem) {
-    _.merge(collection[index], doc);
-  } else {
-    collection.unshift(doc);
-  }
-}
-
-module.exports = AfterCallWork;
+var _0xa380=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x41\x63\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x41\x43\x57\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x61\x70","\x6D\x65\x73\x73\x61\x67\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x6E\x61\x6D\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x69\x64","\x72\x65\x6D\x6F\x76\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x41\x63\x74\x69\x6F\x6E\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x65\x76\x74","\x6F\x6E","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x63\x6F\x70\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x71\x75\x65\x75\x65","\x66\x69\x6E\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x50\x41\x55\x53\x45\x44\x20\x42\x59\x20\x41\x43\x57","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x61\x63\x77\x54\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x55\x4E\x50\x41\x55\x53\x45\x44\x20\x42\x59\x20\x41\x43\x57","\x75\x6E\x70\x61\x75\x73\x65","\x41\x43\x57","\x63\x72\x65\x61\x74\x65","\x70\x61\x75\x73\x65","\x62\x6F\x64\x79","\x61\x63\x77\x54\x69\x6D\x65","\x61\x73\x53\x65\x63\x6F\x6E\x64\x73","\x61\x63\x77\x41\x74","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x66\x69\x6E\x61\x6C\x6C\x79","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6B\x65\x79\x42\x79","\x73\x65\x6E\x64","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x3A\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x74\x6F","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x69\x6E\x64\x65\x78\x4F\x66","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xa380[0];var util=require(_0xa380[1]);var moment=require(_0xa380[2]);var _=require(_0xa380[3]);var VoiceQueue=require(_0xa380[5])[_0xa380[4]];var Agent=require(_0xa380[5])[_0xa380[6]];var Action=require(_0xa380[5])[_0xa380[7]];var ReportAgent=require(_0xa380[5])[_0xa380[8]];var _voiceQueues;var _agents;var activeAcw={};function AfterCallWork(_0x7920xc){console[_0xa380[10]](_0xa380[9]);VoiceQueue[_0xa380[32]]()[_0xa380[31]](function(_0x7920x11){_voiceQueues= _[_0xa380[13]](_0x7920x11,_0xa380[12]);return Agent[_0xa380[33]](_0xa380[23])[_0xa380[32]]()})[_0xa380[31]](function(_0x7920xe){_agents= _[_0xa380[13]](_0x7920xe,_0xa380[12]);process[_0xa380[29]](_0xa380[14],function(_0x7920xf){switch(_0x7920xf[_0xa380[28]]){case _0xa380[15]:;case _0xa380[17]:updateCollection(_voiceQueues,_0x7920xf,{name:_0x7920xf[_0xa380[16]]});break;case _0xa380[20]:_[_0xa380[19]](_agents,{id:_0x7920xf[_0xa380[18]]});break;case _0xa380[21]:;case _0xa380[24]:_0x7920xf[_0xa380[22]]=== _0xa380[23]&& updateCollection(_agents,_0x7920xf,{id:_0x7920xf[_0xa380[18]]});break;case _0xa380[25]:_0x7920xf[_0xa380[22]]=== _0xa380[23]&& _[_0xa380[19]](_agents,{id:_0x7920xf[_0xa380[18]]});break;case _0xa380[27]:onSave(_0x7920xf,_0x7920xf[_0xa380[26]],_0x7920xc);break;default:}});Action[_0xa380[30]](function(_0x7920xf,_0x7920x10){return onSave(_0x7920xf,_0x7920x10,_0x7920xc)})})[_0xa380[11]](function(_0x7920xd){console[_0xa380[10]](_0x7920xd)})}AfterCallWork[_0xa380[35]][_0xa380[34]]= function(_0x7920x12){var _0x7920x13=_[_0xa380[37]](_voiceQueues,{name:_0x7920x12[_0xa380[36]],acw:true});if(_0x7920x13){var _0x7920x14=_[_0xa380[37]](_agents,{name:_0x7920x12[_0xa380[38]]});if(_0x7920x14&& !_0x7920x14[_0xa380[39]]){Action[_0xa380[48]]({name:_0xa380[49],data1:_0xa380[47],data2:_0x7920x13[_0xa380[43]],data3:_0x7920x12[_0xa380[41]],data4:_0x7920x12[_0xa380[36]]},{body:{agent:_0x7920x14[_0xa380[18]],type:_0xa380[47]},raw:true})[_0xa380[31]](function(){console[_0xa380[10]](_0xa380[40]);activeAcw[_0x7920x14[_0xa380[18]]]= {uniqueid:_0x7920x12[_0xa380[41]],destuniqueid:_0x7920x12[_0xa380[42]],acwTime:_0x7920x13[_0xa380[43]],acwAt:moment(),unpause:false};activeAcw[_0x7920x14[_0xa380[18]]][_0xa380[44]]= setTimeout(function(){console[_0xa380[10]](_0xa380[45]);activeAcw[_0x7920x14[_0xa380[18]]][_0xa380[46]]= true;return Action[_0xa380[48]]({name:_0xa380[46],data1:_0xa380[47],data2:_0x7920x13[_0xa380[43]],data3:_0x7920x12[_0xa380[41]],data4:_0x7920x12[_0xa380[36]]},{body:{agent:_0x7920x14[_0xa380[18]],type:_0xa380[47]},raw:true})[_0xa380[11]](function(_0x7920xd){console[_0xa380[10]](_0x7920xd)})},_0x7920x13[_0xa380[43]]* 1000)})[_0xa380[11]](function(_0x7920xd){console[_0xa380[10]](_0x7920xd)})}}};function onSave(_0x7920xf,_0x7920x10,_0x7920xc){var _0x7920x16;if((_0x7920xf[_0xa380[16]]=== _0xa380[49]|| _0x7920xf[_0xa380[16]]=== _0xa380[46])&& activeAcw[_0x7920x10[_0xa380[50]][_0xa380[23]]]){if(_0x7920xf[_0xa380[16]]=== _0xa380[46]&& activeAcw[_0x7920x10[_0xa380[50]][_0xa380[23]]][_0xa380[46]]){_0x7920x16= activeAcw[_0x7920x10[_0xa380[50]][_0xa380[23]]][_0xa380[51]]}else {clearTimeout(activeAcw[_0x7920x10[_0xa380[50]][_0xa380[23]]][_0xa380[44]]);_0x7920x16= moment[_0xa380[54]](moment()- activeAcw[_0x7920x10[_0xa380[50]][_0xa380[23]]][_0xa380[53]])[_0xa380[52]]()};return ReportAgent[_0xa380[66]]({where:{uniqueid:activeAcw[_0x7920x10[_0xa380[50]][_0xa380[23]]][_0xa380[41]],destuniqueid:activeAcw[_0x7920x10[_0xa380[50]][_0xa380[23]]][_0xa380[42]]}})[_0xa380[31]](function(_0x7920xf){if(_0x7920xf){_0x7920xf[_0xa380[12]][_0xa380[28]]= _0xa380[56];_0x7920xf[_0xa380[12]][_0xa380[57]]= _[_0xa380[58]](_0x7920xf[_0xa380[57]]());process[_0xa380[59]](_0x7920xf[_0xa380[12]]);_0x7920xc[_0xa380[64]](util[_0xa380[63]](_0xa380[62],_0x7920xf[_0xa380[38]]))[_0xa380[61]](_0xa380[60],_0x7920xf);return _0x7920xf[_0xa380[65]]({agentacw:true,acwtime:_0x7920x16})}})[_0xa380[11]](function(_0x7920xd){console[_0xa380[10]](_0x7920xd)})[_0xa380[55]](function(){delete activeAcw[_0x7920x10[_0xa380[50]][_0xa380[23]]]})}}function updateCollection(_0x7920x18,_0x7920xf,_0x7920x19){var _0x7920x1a=_[_0xa380[37]](_0x7920x18,_0x7920x19);var _0x7920x1b=_0x7920x18[_0xa380[67]](_0x7920x1a);if(_0x7920x1a){_[_0xa380[68]](_0x7920x18[_0x7920x1b],_0x7920xf)}else {_0x7920x18[_0xa380[69]](_0x7920xf)}}module[_0xa380[70]]= AfterCallWork
\ No newline at end of file
diff --git a/server/config/ami/agent.js b/server/config/ami/agent.js
index 1326ba8..efd98f3 100644
--- a/server/config/ami/agent.js
+++ b/server/config/ami/agent.js
@@ -1,126 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const moment = require('moment');
-const ReportAgent = require('../../models').ReportAgent;
-const util = require('util');
-
-function Agent(io) {
-  console.log('Agent Initialization...');
-  // ReportAgent.afterCreate(function(doc, options) {
-  //   console.log('Time1-2', doc.id, doc.createdAt, moment().format('LTS'));
-  // doc.dataValues.evt = 'ReportAgent.afterCreate';
-  // process.send(doc.dataValues);
-  // io.to(util.format('agent:%s', doc.membername)).emit('report_agent:save', doc);
-  // });
-
-  // ReportAgent.afterUpdate(function(doc, options) { //called in acw
-  // doc.dataValues.evt = 'ReportAgent.afterUpdate';
-  // doc.dataValues.changed = _.keyBy(doc.changed());
-  // process.send(doc.dataValues);
-  // io.to(util.format('agent:%s', doc.membername)).emit('report_agent:update', doc);
-  // });
-}
-
-Agent.prototype.called = function(evt, io) {
-  evt.lastevent = 'called';
-  evt.agentcalledAt = moment().format("YYYY-MM-DD HH:mm:ss");
-  return createAgent(evt, io);
-}
-
-Agent.prototype.connect = function(evt, io) {
-  evt.lastevent = 'connect';
-  evt.agentconnectAt = moment().format("YYYY-MM-DD HH:mm:ss");
-  updateAgents(evt, null, io);
-  updateAgents({
-    agentringnoanswer: true,
-    agentringnoanswerAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-    reason: 'answered_elsewhere',
-    lastevent: 'answered_elsewhere',
-    answeredelsewheredestinationuniqueid: evt.destuniqueid,
-    answeredelsewheremembername: evt.membername
-  }, {
-    uniqueid: evt.uniqueid,
-    destuniqueid: {
-      $ne: evt.destuniqueid
-    },
-    reason: null
-  }, io);
-}
-
-Agent.prototype.complete = function(evt, io) {
-  evt.lastevent = 'complete';
-  evt.agentcomplete = true;
-  evt.agentcompleteAt = moment().format("YYYY-MM-DD HH:mm:ss");
-  return updateAgents(evt, null, io);
-}
-
-Agent.prototype.dump = function(evt, io) {
-  evt.lastevent = 'dump';
-
-  evt.agentdump = true;
-  evt.agentdumpAt = moment().format("YYYY-MM-DD HH:mm:ss");
-  return updateAgents(evt, null, io);
-}
-
-Agent.prototype.ringnoanswer = function(evt, io) {
-  evt.lastevent = 'rejected';
-  evt.agentringnoanswer = true;
-  evt.agentringnoanswerAt = moment().format("YYYY-MM-DD HH:mm:ss");
-  evt.reason = 'rejected';
-  return updateAgents(evt, null, io);
-}
-
-Agent.prototype.callerabandon = function(evt, io) {
-  evt.lastevent = 'abandoned';
-  evt.agentringnoanswer = true;
-  evt.agentringnoanswerAt = moment().format("YYYY-MM-DD HH:mm:ss");
-  evt.reason = 'abandoned';
-  return updateAgents(evt, {
-    uniqueid: evt.uniqueid,
-    reason: null
-  }, io);
-}
-
-function createAgent(evt, io) {
-  console.log('Time0', evt.agentcalledAt, moment().format('LTS'));
-  return ReportAgent
-    .create(evt, {
-      raw: true
-    })
-    .then(function(data) {
-      console.log('Time1', data.id, evt.agentcalledAt, data.createdAt, moment().format('LTS'));
-      data.dataValues.evt = 'ReportAgent.afterCreate';
-      process.send(data.dataValues);
-      io.to(util.format('agent:%s', data.membername)).emit('report_agent:save', data);
-      console.log('[report] agent create');
-    })
-    .catch(function(err) {
-      console.error('[report] agent ' + err);
-    });
-}
-
-function updateAgents(evt, where, io) {
-  return ReportAgent
-    .update(evt, {
-      where: where || {
-        uniqueid: evt.uniqueid,
-        destuniqueid: evt.destuniqueid
-      },
-      individualHooks: true
-    })
-    .then(function(res) {
-      _.forEach(res[1], function(data) {
-        data.dataValues.evt = 'ReportAgent.afterUpdate';
-        data.dataValues.changed = _.keyBy(data.changed());
-        process.send(data.dataValues);
-        io.to(util.format('agent:%s', data.membername)).emit('report_agent:update', data);
-        console.log('[agent] agent update');
-      });
-    })
-    .catch(function(err) {
-      console.error('[agent] agent error: ' + err);
-    });
-}
-
-module.exports = Agent;
+var _0x6418=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x41\x67\x65\x6E\x74\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x63\x61\x6C\x6C\x65\x64","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x65\x6C\x73\x65\x77\x68\x65\x72\x65","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x64\x75\x6D\x70","\x61\x67\x65\x6E\x74\x64\x75\x6D\x70","\x61\x67\x65\x6E\x74\x64\x75\x6D\x70\x41\x74","\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x72\x65\x6A\x65\x63\x74\x65\x64","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72\x41\x74","\x72\x65\x61\x73\x6F\x6E","\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x54\x69\x6D\x65\x30","\x4C\x54\x53","\x65\x76\x74","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x6E\x64","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x61\x67\x65\x6E\x74\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x61\x67\x65\x6E\x74\x20\x63\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x5B\x61\x67\x65\x6E\x74\x5D\x20\x61\x67\x65\x6E\x74\x20\x65\x72\x72\x6F\x72\x3A\x20","\x61\x6C\x6C","\x6C\x65\x6E\x67\x74\x68","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x70\x75\x73\x68","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x3A\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x25\x73","\x74\x6F","\x5B\x61\x67\x65\x6E\x74\x5D\x20\x61\x67\x65\x6E\x74\x20\x75\x70\x64\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x65\x78\x70\x6F\x72\x74\x73"];_0x6418[0];const _=require(_0x6418[1]);const moment=require(_0x6418[2]);const ReportAgent=require(_0x6418[4])[_0x6418[3]];const util=require(_0x6418[5]);function Agent(_0xad69x6){console[_0x6418[7]](_0x6418[6])}Agent[_0x6418[9]][_0x6418[8]]= function(_0xad69x7,_0xad69x6){_0xad69x7[_0x6418[10]]= _0x6418[8];_0xad69x7[_0x6418[11]]= moment()[_0x6418[13]](_0x6418[12]);return createAgent(_0xad69x7,_0xad69x6)};Agent[_0x6418[9]][_0x6418[14]]= function(_0xad69x7,_0xad69x6){_0xad69x7[_0x6418[10]]= _0x6418[14];_0xad69x7[_0x6418[15]]= moment()[_0x6418[13]](_0x6418[12]);updateAgents(_0xad69x7,null,_0xad69x6);updateAgents({agentringnoanswer:true,agentringnoanswerAt:moment()[_0x6418[13]](_0x6418[12]),reason:_0x6418[16],lastevent:_0x6418[16],answeredelsewheredestinationuniqueid:_0xad69x7[_0x6418[17]],answeredelsewheremembername:_0xad69x7[_0x6418[18]]},{uniqueid:_0xad69x7[_0x6418[19]],destuniqueid:{$ne:_0xad69x7[_0x6418[17]]},reason:null},_0xad69x6)};Agent[_0x6418[9]][_0x6418[20]]= function(_0xad69x7,_0xad69x6){_0xad69x7[_0x6418[10]]= _0x6418[20];_0xad69x7[_0x6418[21]]= true;_0xad69x7[_0x6418[22]]= moment()[_0x6418[13]](_0x6418[12]);return updateAgents(_0xad69x7,null,_0xad69x6)};Agent[_0x6418[9]][_0x6418[23]]= function(_0xad69x7,_0xad69x6){_0xad69x7[_0x6418[10]]= _0x6418[23];_0xad69x7[_0x6418[24]]= true;_0xad69x7[_0x6418[25]]= moment()[_0x6418[13]](_0x6418[12]);return updateAgents(_0xad69x7,null,_0xad69x6)};Agent[_0x6418[9]][_0x6418[26]]= function(_0xad69x7,_0xad69x6){_0xad69x7[_0x6418[10]]= _0x6418[27];_0xad69x7[_0x6418[28]]= true;_0xad69x7[_0x6418[29]]= moment()[_0x6418[13]](_0x6418[12]);_0xad69x7[_0x6418[30]]= _0x6418[27];return updateAgents(_0xad69x7,null,_0xad69x6)};Agent[_0x6418[9]][_0x6418[31]]= function(_0xad69x7,_0xad69x6){_0xad69x7[_0x6418[10]]= _0x6418[32];_0xad69x7[_0x6418[28]]= true;_0xad69x7[_0x6418[29]]= moment()[_0x6418[13]](_0x6418[12]);_0xad69x7[_0x6418[30]]= _0x6418[32];return updateAgents(_0xad69x7,{uniqueid:_0xad69x7[_0x6418[19]],reason:null},_0xad69x6)};function createAgent(_0xad69x7,_0xad69x6){console[_0x6418[7]](_0x6418[33],_0xad69x7[_0x6418[19]],moment()[_0x6418[13]](_0x6418[34]));_0xad69x7[_0x6418[35]]= _0x6418[36];process[_0x6418[37]](_0xad69x7);return ReportAgent[_0x6418[43]](_0xad69x7,{raw:true})[_0x6418[42]](function(_0xad69xa){console[_0x6418[7]](_0x6418[41])})[_0x6418[40]](function(_0xad69x9){console[_0x6418[39]](_0x6418[38]+ _0xad69x9)})}function updateAgents(_0xad69x7,_0xad69xc,_0xad69x6){return ReportAgent[_0x6418[58]]({where:_0xad69xc|| {uniqueid:_0xad69x7[_0x6418[19]],destuniqueid:_0xad69x7[_0x6418[17]]}})[_0x6418[42]](function(_0xad69xd){var _0xad69xe=[];if(_0xad69xd&& _0xad69xd[_0x6418[46]]){_[_0x6418[57]](_0xad69xd,function(_0xad69xa){_0xad69xe[_0x6418[48]](_0xad69xa[_0x6418[47]](_0xad69x7));_0xad69xa[_0x6418[49]][_0x6418[35]]= _0x6418[50];_0xad69xa[_0x6418[49]][_0x6418[51]]= _0xad69x7;process[_0x6418[37]](_0xad69xa[_0x6418[49]]);_0xad69x6[_0x6418[55]](util[_0x6418[13]](_0x6418[54],_0xad69xa[_0x6418[18]]))[_0x6418[53]](_0x6418[52],_0xad69xa);console[_0x6418[7]](_0x6418[56])})};return _0xad69xe})[_0x6418[45]]()[_0x6418[40]](function(_0xad69x9){console[_0x6418[39]](_0x6418[44]+ _0xad69x9)})}module[_0x6418[59]]= Agent
\ No newline at end of file
diff --git a/server/config/ami/ami.js b/server/config/ami/ami.js
index 80039f5..9c368fe 100644
--- a/server/config/ami/ami.js
+++ b/server/config/ami/ami.js
@@ -1,369 +1 @@
-'use strict';
-
-console.log('Ami process started..');
-
-var Agent = require('./agent');
-var Action = require('./action');
-var Call = require('./call');
-var Member = require('./member');
-var QueueCaller = require('./queue_caller');
-var QueueMember = require('./queue_member');
-var Recording = require('./recording');
-var Trunk = require('./trunk');
-var Context = require('./voice_context');
-var AfterCallWork = require('./acw');
-var User = require('./user');
-var Transfer = require('./transfer');
-var Network = require('./network');
-var Fax = require('./fax');
-var Dial = require('./dial');
-var Cleaner = require('./cleaner');
-const Promise = require('bluebird');
-const util = require('util');
-const redis = require('redis');
-
-var _ = require('lodash');
-var config = require('../environment');
-var trunkStates = {};
-
-function getVariable(event) {
-  var _event = _.clone(event)
-  var keys = _.keys(_event.variable);
-  _event.variable = keys[0];
-  return _event;
-}
-
-var ami = require('asterisk-manager')(config.asterisk.port,
-  config.asterisk.host,
-  config.asterisk.username,
-  config.asterisk.password,
-  true);
-
-ami.keepConnected();
-
-var redisConf;
-if (config.redisPwd) {
-  redisConf = {
-    password: config.redisPwd
-  }
-}
-var redisClient = redis.createClient(6379, config.ip, redisConf);
-var io = require('socket.io-emitter')(redisClient);
-
-var agent = new Agent(io);
-var call = new Call();
-var member = new Member();
-var queuemember = new QueueMember(io);
-var queuecaller = new QueueCaller(io);
-var recording = new Recording();
-var trunk = new Trunk(ami);
-var context = new Context(ami);
-var action = new Action(ami, io);
-var acw = new AfterCallWork();
-var user = new User(ami, io);
-var tranfer = new Transfer();
-var network = new Network(ami);
-var fax = new Fax(ami, io);
-var dial = new Dial(io);
-var cleaner = new Cleaner(ami);
-
-
-process.on('message', function(doc) {
-  switch (doc.evt) {
-    case 'console':
-      return Promise
-        .promisify(ami.action)({
-          action: 'Command',
-          command: doc.command,
-        })
-        .then(function(result) {
-          io.to(doc.socket).emit('console:result', result);
-        })
-        .catch(function(err) {
-          io.to(doc.socket).emit('console:error', err);
-        });
-    default:
-  }
-});
-
-// Asterisk Status Connect
-
-// Raised when asterisk is connected
-ami.on('connect', function() {
-  console.info('[%s:%s] AMI CONNECTED', ami.options.host, ami.options.port);
-  ami.options.connectedAt = new Date();
-  // Call onConnect.
-});
-
-// Raised when asterisk is disconnected
-ami.on('disconnect', function() {
-  // Call onDisconnect.
-  console.info('[%s:%s] AMI DISCONNECTED', ami.options.host, ami.options.port);
-});
-
-// Raised when asterisk is closed
-ami.on('close', function(flag) {
-  console.log('[%s:%s] AMI CLOSE: %s', ami.options.host, ami.options.port, flag);
-});
-
-// Raised when asterisk has an error
-ami.on('error', function(err) {
-  console.log('[%s:%s] AMI ERROR: %s', ami.options.host, ami.options.port, err);
-});
-
-// ami.on('managerevent', function(evt) {
-//   console.log(evt);
-// });
-
-ami.on('devicestatechange', function(evt) {
-  // console.log(evt);
-  if (evt.device.indexOf('SIP/') === 0) {
-    user.stateUpdate(evt, io);
-  }
-});
-
-// Agent Status Events
-
-// Raised when an Agent is notified of a member in the queue.
-ami.on('agentcalled', function(evt) {
-  agent.called(evt, io);
-  user.queueStatusUpdate('called', evt, io);
-});
-
-// Raised when an agent has finished servicing a member in the queue.
-ami.on('agentcomplete', function(evt) {
-  // console.log('agentcomplete', evt);
-  delete evt.holdtime;
-
-  recording.updateQueue(evt);
-  acw.agentcomplete(evt);
-  agent.complete(evt, io);
-  member.inboundComplete(evt);
-  queuecaller.complete(evt, io);
-  user.queueStatusUpdate('complete', evt, io);
-});
-
-// Raised when an agent answers and is bridged to a member in the queue.
-ami.on('agentconnect', function(evt) {
-  // console.log('agentconnect', evt);
-  queuecaller.leave(evt, io);
-  agent.connect(evt, io);
-  member.inboundTalking(evt);
-  user.queueStatusUpdate('connect', evt, io);
-});
-
-// Raised when an agent hangs up on a member in the queue.
-ami.on('agentdump', function(evt) {
-  // console.log('agentdump', evt);
-  agent.dump(evt, io);
-  user.queueStatusUpdate('complete', evt, io);
-});
-
-// Raised when an agent is notified of a member in the queue and fails to answer.
-ami.on('agentringnoanswer', function(evt) {
-  agent.ringnoanswer(evt, io);
-  user.queueStatusUpdate('complete', evt, io);
-});
-
-// Member Status Events in Queue
-
-// Raised when a member is added to the queue.
-ami.on('queuememberadded', function(evt) {
-  queuemember.added(evt, io);
-});
-
-// Raised when a member is paused/unpaused in the queue with a reason.
-ami.on('queuememberpause', function(evt) {
-  queuemember.pause(evt, io);
-  user.pause(evt, io);
-});
-
-// Raised when a member's penalty is changed.
-ami.on('queuememberpenalty', function(evt) {
-  queuemember.penalty(evt, io);
-});
-
-// Raised when a member is removed from the queue.
-ami.on('queuememberremoved', function(evt) {
-  queuemember.removed(evt, io);
-});
-
-// Raised when a member's ringinuse setting is changed.
-ami.on('queuememberringinuse', function(evt) {
-  queuemember.ringinuse(evt, io);
-});
-
-// Raised when a Queue member's status has changed.
-ami.on('queuememberstatus', function(evt) {
-  queuemember.status(evt, io);
-});
-
-// Queue Status Events
-
-// Raised when a caller joins a Queue.
-ami.on('queuecallerjoin', function(evt) {
-  queuecaller.join(evt, io);
-});
-
-// // Raised when a caller abandons the queue.
-ami.on('queuecallerabandon', function(evt) {
-  queuecaller.abandon(evt, io);
-  user.queueStatusUpdate('complete', evt, io);
-  agent.callerabandon(evt, io);
-});
-
-// Raised when a caller leaves a Queue.
-ami.on('queuecallerleave', function(evt) {
-  // queuecaller.leave(evt);
-});
-
-// Cdr Status Events
-
-// Raised when a CDR is generated.
-ami.on('cdr', function(evt) {
-  call.add(evt);
-  recording.updateType(evt);
-});
-
-// Hangup Status Events
-ami.on('hangup', function(evt) {
-  // console.log('hangup', evt);
-  dial.hangup(evt);
-  member.outboundComplete(evt);
-});
-
-// // Recordings Events
-// ami.on('monitorstart', function(evt) {
-//   // console.log('evt', evt);
-// });trna
-//
-// ami.on('monitorstop', function(evt) {
-//   // console.log('evt', evt);
-//   recording.create(evt, 'outbound');
-// });
-
-ami.on('blindtransfer', function(evt) {
-  // console.log('blindtransfer', evt);
-  evt.type = 'blind';
-  tranfer.createBlind(evt);
-});
-
-ami.on('attendedtransfer', function(evt) {
-  // console.log('attendedtransfer', evt);
-  evt.type = 'attended';
-  tranfer.createAttended(evt);
-});
-
-// Variable Events
-ami.on('varset', function(evt) {
-  evt.evt = evt.event;
-  process.send(evt);
-
-  var event = getVariable(evt);
-  switch (event.variable) {
-    case 'mixmonitor_filename':
-      recording.create(event);
-      break;
-    case 'queuestatus':
-      queuecaller.exit(event, io);
-      break;
-    case 'faxerror':
-      console.log('VarSet faxerror', evt);
-      if (evt.value) {
-        fax.updateError(evt);
-      }
-      break;
-    case 'faxstatusstring':
-      console.log('VarSet faxstatusstring', evt);
-      break;
-    case 'faxpages':
-      console.log('VarSet faxpages', evt);
-      break;
-    case 'outboundrouteid':
-      if (evt.value) {
-        dial.beforeDial({
-          uniqueid: evt.uniqueid,
-          routeId: evt.value
-        });
-      }
-      break;
-    default:
-      // console.log('Variable not managed:', event.variable);
-      break;
-  }
-});
-
-//Trunk registry event
-ami.on('registry', function(evt) {
-  if (trunkStates[evt.defaultuser]) {
-    if (trunkStates[evt.defaultuser] !== evt.status) {
-      trunk.statusUpdate(evt);
-    }
-  } else {
-    trunkStates[evt.defaultuser] = evt.status;
-    trunk.statusUpdate(evt);
-  }
-});
-
-ami.on('peerstatus', function(evt) {
-  trunk.peerstatusUpdate(evt);
-});
-
-//Fax Events
-ami.on('receivefax', function(evt) {
-  fax.receivefax(evt);
-});
-
-// Debug purpose
-// setTimeout(function() {
-//   console.log('New timeout');
-//   fax.receivefax({
-//     event: 'ReceiveFAX',
-//     privilege: 'call,all',
-//     channel: 'SIP/Demo citalia-0000003b',
-//     channelstate: '6',
-//     channelstatedesc: 'Up',
-//     calleridnum: '01119214291',
-//     calleridname: '<unknown>',
-//     connectedlinenum: '<unknown>',
-//     connectedlinename: '<unknown>',
-//     language: 'en',
-//     accountcode: '',
-//     context: 'from-voip-provider',
-//     exten: '01119827770',
-//     priority: '120',
-//     uniqueid: '1466507863.139',
-//     linkedid: '1466507863.139',
-//     localstationid: '01119827770',
-//     remotestationid: '01119214291',
-//     pagestransferred: '1',
-//     resolution: '8031x7700',
-//     transferrate: '9600',
-//     filename: '/var/opt/motion/server/files/fax/inbound/original/fax-20160621-131746.tif'
-//   });
-// }, 10 * 1000);
-
-ami.on('faxstatus', function(evt) {
-  if (evt.operation === 'send') {
-    console.log('FaxStatus Event', evt);
-    //Update outgoing message
-    fax.updateMessage(evt);
-  }
-});
-
-ami.on('dialbegin', function(evt) {
-  dial.begin(evt);
-});
-
-ami.on('dialend', function(evt) {
-  dial.end(evt);
-  member.outboundTalking(evt);
-})
-
-ami.on('sendfax', function(evt) {
-  console.log('SendFAX Event', evt);
-  fax.updateSend(evt);
-});
-
-// require('./../fax').register(ami);
-// require('../../api/ami/ami.ami').register(ami);
+var _0x38c9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x41\x6D\x69\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x73\x74\x61\x72\x74\x65\x64\x2E\x2E","\x6C\x6F\x67","\x2E\x2F\x61\x67\x65\x6E\x74","\x2E\x2F\x61\x63\x74\x69\x6F\x6E","\x2E\x2F\x63\x61\x6C\x6C","\x2E\x2F\x6D\x65\x6D\x62\x65\x72","\x2E\x2F\x71\x75\x65\x75\x65\x5F\x63\x61\x6C\x6C\x65\x72","\x2E\x2F\x71\x75\x65\x75\x65\x5F\x6D\x65\x6D\x62\x65\x72","\x2E\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2F\x74\x72\x75\x6E\x6B","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74","\x2E\x2F\x61\x63\x77","\x2E\x2F\x75\x73\x65\x72","\x2E\x2F\x74\x72\x61\x6E\x73\x66\x65\x72","\x2E\x2F\x6E\x65\x74\x77\x6F\x72\x6B","\x2E\x2F\x66\x61\x78","\x2E\x2F\x64\x69\x61\x6C","\x2E\x2F\x63\x6C\x65\x61\x6E\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x72\x65\x64\x69\x73","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x63\x6C\x6F\x6E\x65","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x70\x6F\x72\x74","\x61\x73\x74\x65\x72\x69\x73\x6B","\x68\x6F\x73\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x61\x73\x74\x65\x72\x69\x73\x6B\x2D\x6D\x61\x6E\x61\x67\x65\x72","\x6B\x65\x65\x70\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x72\x65\x64\x69\x73\x50\x77\x64","\x69\x70","\x63\x72\x65\x61\x74\x65\x43\x6C\x69\x65\x6E\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x6D\x65\x73\x73\x61\x67\x65","\x63\x6F\x6E\x73\x6F\x6C\x65\x3A\x65\x72\x72\x6F\x72","\x65\x6D\x69\x74","\x73\x6F\x63\x6B\x65\x74","\x74\x6F","\x63\x61\x74\x63\x68","\x63\x6F\x6E\x73\x6F\x6C\x65\x3A\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x43\x6F\x6D\x6D\x61\x6E\x64","\x63\x6F\x6D\x6D\x61\x6E\x64","\x61\x63\x74\x69\x6F\x6E","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x63\x6F\x6E\x73\x6F\x6C\x65","\x65\x76\x74","\x6F\x6E","\x63\x6F\x6E\x6E\x65\x63\x74","\x5B\x25\x73\x3A\x25\x73\x5D\x20\x41\x4D\x49\x20\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x6F\x70\x74\x69\x6F\x6E\x73","\x69\x6E\x66\x6F","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x41\x74","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x5B\x25\x73\x3A\x25\x73\x5D\x20\x41\x4D\x49\x20\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x63\x6C\x6F\x73\x65","\x5B\x25\x73\x3A\x25\x73\x5D\x20\x41\x4D\x49\x20\x43\x4C\x4F\x53\x45\x3A\x20\x25\x73","\x65\x72\x72\x6F\x72","\x5B\x25\x73\x3A\x25\x73\x5D\x20\x41\x4D\x49\x20\x45\x52\x52\x4F\x52\x3A\x20\x25\x73","\x64\x65\x76\x69\x63\x65\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65","\x53\x49\x50\x2F","\x69\x6E\x64\x65\x78\x4F\x66","\x64\x65\x76\x69\x63\x65","\x73\x74\x61\x74\x65\x55\x70\x64\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64","\x63\x61\x6C\x6C\x65\x64","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x55\x70\x64\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x75\x70\x64\x61\x74\x65\x51\x75\x65\x75\x65","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x69\x6E\x62\x6F\x75\x6E\x64\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x6C\x65\x61\x76\x65","\x69\x6E\x62\x6F\x75\x6E\x64\x54\x61\x6C\x6B\x69\x6E\x67","\x61\x67\x65\x6E\x74\x64\x75\x6D\x70","\x64\x75\x6D\x70","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x61\x64\x64\x65\x64","\x61\x64\x64\x65\x64","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x70\x61\x75\x73\x65","\x70\x61\x75\x73\x65","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x70\x65\x6E\x61\x6C\x74\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x72\x65\x6D\x6F\x76\x65\x64","\x72\x65\x6D\x6F\x76\x65\x64","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x72\x69\x6E\x67\x69\x6E\x75\x73\x65","\x72\x69\x6E\x67\x69\x6E\x75\x73\x65","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x73\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E","\x6A\x6F\x69\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x61\x62\x61\x6E\x64\x6F\x6E","\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65","\x63\x64\x72","\x61\x64\x64","\x75\x70\x64\x61\x74\x65\x54\x79\x70\x65","\x68\x61\x6E\x67\x75\x70","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x62\x6C\x69\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x74\x79\x70\x65","\x62\x6C\x69\x6E\x64","\x63\x72\x65\x61\x74\x65\x42\x6C\x69\x6E\x64","\x61\x74\x74\x65\x6E\x64\x65\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x61\x74\x74\x65\x6E\x64\x65\x64","\x63\x72\x65\x61\x74\x65\x41\x74\x74\x65\x6E\x64\x65\x64","\x76\x61\x72\x73\x65\x74","\x65\x76\x65\x6E\x74","\x73\x65\x6E\x64","\x63\x72\x65\x61\x74\x65","\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x69\x74","\x71\x75\x65\x75\x65\x73\x74\x61\x74\x75\x73","\x56\x61\x72\x53\x65\x74\x20\x66\x61\x78\x65\x72\x72\x6F\x72","\x76\x61\x6C\x75\x65","\x75\x70\x64\x61\x74\x65\x45\x72\x72\x6F\x72","\x66\x61\x78\x65\x72\x72\x6F\x72","\x56\x61\x72\x53\x65\x74\x20\x66\x61\x78\x73\x74\x61\x74\x75\x73\x73\x74\x72\x69\x6E\x67","\x66\x61\x78\x73\x74\x61\x74\x75\x73\x73\x74\x72\x69\x6E\x67","\x56\x61\x72\x53\x65\x74\x20\x66\x61\x78\x70\x61\x67\x65\x73","\x66\x61\x78\x70\x61\x67\x65\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x62\x65\x66\x6F\x72\x65\x44\x69\x61\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x72\x6F\x75\x74\x65\x69\x64","\x72\x65\x67\x69\x73\x74\x72\x79","\x64\x65\x66\x61\x75\x6C\x74\x75\x73\x65\x72","\x73\x74\x61\x74\x75\x73\x55\x70\x64\x61\x74\x65","\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73","\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73\x55\x70\x64\x61\x74\x65","\x72\x65\x63\x65\x69\x76\x65\x66\x61\x78","\x66\x61\x78\x73\x74\x61\x74\x75\x73","\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E","\x46\x61\x78\x53\x74\x61\x74\x75\x73\x20\x45\x76\x65\x6E\x74","\x75\x70\x64\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x64\x69\x61\x6C\x62\x65\x67\x69\x6E","\x62\x65\x67\x69\x6E","\x64\x69\x61\x6C\x65\x6E\x64","\x65\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x54\x61\x6C\x6B\x69\x6E\x67","\x73\x65\x6E\x64\x66\x61\x78","\x53\x65\x6E\x64\x46\x41\x58\x20\x45\x76\x65\x6E\x74","\x75\x70\x64\x61\x74\x65\x53\x65\x6E\x64"];_0x38c9[0];console[_0x38c9[2]](_0x38c9[1]);var Agent=require(_0x38c9[3]);var Action=require(_0x38c9[4]);var Call=require(_0x38c9[5]);var Member=require(_0x38c9[6]);var QueueCaller=require(_0x38c9[7]);var QueueMember=require(_0x38c9[8]);var Recording=require(_0x38c9[9]);var Trunk=require(_0x38c9[10]);var Context=require(_0x38c9[11]);var AfterCallWork=require(_0x38c9[12]);var User=require(_0x38c9[13]);var Transfer=require(_0x38c9[14]);var Network=require(_0x38c9[15]);var Fax=require(_0x38c9[16]);var Dial=require(_0x38c9[17]);var Cleaner=require(_0x38c9[18]);const Promise=require(_0x38c9[19]);const util=require(_0x38c9[20]);const redis=require(_0x38c9[21]);var _=require(_0x38c9[22]);var config=require(_0x38c9[23]);var trunkStates={};function getVariable(_0xb9c3x18){var _0xb9c3x19=_[_0x38c9[24]](_0xb9c3x18);var _0xb9c3x1a=_[_0x38c9[26]](_0xb9c3x19[_0x38c9[25]]);_0xb9c3x19[_0x38c9[25]]= _0xb9c3x1a[0];return _0xb9c3x19}var ami=require(_0x38c9[32])(config[_0x38c9[28]][_0x38c9[27]],config[_0x38c9[28]][_0x38c9[29]],config[_0x38c9[28]][_0x38c9[30]],config[_0x38c9[28]][_0x38c9[31]],true);ami[_0x38c9[33]]();var redisConf;if(config[_0x38c9[34]]){redisConf= {password:config[_0x38c9[34]]}};var redisClient=redis[_0x38c9[36]](6379,config[_0x38c9[35]],redisConf);var io=require(_0x38c9[37])(redisClient);var agent= new Agent(io);var call= new Call();var member= new Member();var queuemember= new QueueMember(io);var queuecaller= new QueueCaller(io);var recording= new Recording();var trunk= new Trunk(ami);var context= new Context(ami);var action= new Action(ami,io);var acw= new AfterCallWork();var user= new User(ami,io);var tranfer= new Transfer();var network= new Network(ami);var fax= new Fax(ami,io);var dial= new Dial(io);var cleaner= new Cleaner(ami);process[_0x38c9[52]](_0x38c9[38],function(_0xb9c3x2f){switch(_0xb9c3x2f[_0x38c9[51]]){case _0x38c9[50]:return Promise[_0x38c9[49]](ami[_0x38c9[48]])({action:_0x38c9[46],command:_0xb9c3x2f[_0x38c9[47]]})[_0x38c9[45]](function(_0xb9c3x31){io[_0x38c9[42]](_0xb9c3x2f[_0x38c9[41]])[_0x38c9[40]](_0x38c9[44],_0xb9c3x31)})[_0x38c9[43]](function(_0xb9c3x30){io[_0x38c9[42]](_0xb9c3x2f[_0x38c9[41]])[_0x38c9[40]](_0x38c9[39],_0xb9c3x30)});default:}});ami[_0x38c9[52]](_0x38c9[53],function(){console[_0x38c9[56]](_0x38c9[54],ami[_0x38c9[55]][_0x38c9[29]],ami[_0x38c9[55]][_0x38c9[27]]);ami[_0x38c9[55]][_0x38c9[57]]=  new Date()});ami[_0x38c9[52]](_0x38c9[58],function(){console[_0x38c9[56]](_0x38c9[59],ami[_0x38c9[55]][_0x38c9[29]],ami[_0x38c9[55]][_0x38c9[27]])});ami[_0x38c9[52]](_0x38c9[60],function(_0xb9c3x32){console[_0x38c9[2]](_0x38c9[61],ami[_0x38c9[55]][_0x38c9[29]],ami[_0x38c9[55]][_0x38c9[27]],_0xb9c3x32)});ami[_0x38c9[52]](_0x38c9[62],function(_0xb9c3x30){console[_0x38c9[2]](_0x38c9[63],ami[_0x38c9[55]][_0x38c9[29]],ami[_0x38c9[55]][_0x38c9[27]],_0xb9c3x30)});ami[_0x38c9[52]](_0x38c9[64],function(_0xb9c3x33){if(_0xb9c3x33[_0x38c9[67]][_0x38c9[66]](_0x38c9[65])=== 0){user[_0x38c9[68]](_0xb9c3x33,io)}});ami[_0x38c9[52]](_0x38c9[69],function(_0xb9c3x33){agent[_0x38c9[70]](_0xb9c3x33,io);user[_0x38c9[71]](_0x38c9[70],_0xb9c3x33,io)});ami[_0x38c9[52]](_0x38c9[72],function(_0xb9c3x33){delete _0xb9c3x33[_0x38c9[73]];recording[_0x38c9[74]](_0xb9c3x33);acw[_0x38c9[72]](_0xb9c3x33);agent[_0x38c9[75]](_0xb9c3x33,io);member[_0x38c9[76]](_0xb9c3x33);queuecaller[_0x38c9[75]](_0xb9c3x33,io);user[_0x38c9[71]](_0x38c9[75],_0xb9c3x33,io)});ami[_0x38c9[52]](_0x38c9[77],function(_0xb9c3x33){queuecaller[_0x38c9[78]](_0xb9c3x33,io);agent[_0x38c9[53]](_0xb9c3x33,io);member[_0x38c9[79]](_0xb9c3x33);user[_0x38c9[71]](_0x38c9[53],_0xb9c3x33,io)});ami[_0x38c9[52]](_0x38c9[80],function(_0xb9c3x33){agent[_0x38c9[81]](_0xb9c3x33,io);user[_0x38c9[71]](_0x38c9[75],_0xb9c3x33,io)});ami[_0x38c9[52]](_0x38c9[82],function(_0xb9c3x33){agent[_0x38c9[83]](_0xb9c3x33,io);user[_0x38c9[71]](_0x38c9[75],_0xb9c3x33,io)});ami[_0x38c9[52]](_0x38c9[84],function(_0xb9c3x33){queuemember[_0x38c9[85]](_0xb9c3x33,io)});ami[_0x38c9[52]](_0x38c9[86],function(_0xb9c3x33){queuemember[_0x38c9[87]](_0xb9c3x33,io);user[_0x38c9[87]](_0xb9c3x33,io)});ami[_0x38c9[52]](_0x38c9[88],function(_0xb9c3x33){queuemember[_0x38c9[89]](_0xb9c3x33,io)});ami[_0x38c9[52]](_0x38c9[90],function(_0xb9c3x33){queuemember[_0x38c9[91]](_0xb9c3x33,io)});ami[_0x38c9[52]](_0x38c9[92],function(_0xb9c3x33){queuemember[_0x38c9[93]](_0xb9c3x33,io)});ami[_0x38c9[52]](_0x38c9[94],function(_0xb9c3x33){queuemember[_0x38c9[95]](_0xb9c3x33,io)});ami[_0x38c9[52]](_0x38c9[96],function(_0xb9c3x33){queuecaller[_0x38c9[97]](_0xb9c3x33,io)});ami[_0x38c9[52]](_0x38c9[98],function(_0xb9c3x33){queuecaller[_0x38c9[99]](_0xb9c3x33,io);user[_0x38c9[71]](_0x38c9[75],_0xb9c3x33,io);agent[_0x38c9[100]](_0xb9c3x33,io)});ami[_0x38c9[52]](_0x38c9[101],function(_0xb9c3x33){});ami[_0x38c9[52]](_0x38c9[102],function(_0xb9c3x33){call[_0x38c9[103]](_0xb9c3x33);recording[_0x38c9[104]](_0xb9c3x33)});ami[_0x38c9[52]](_0x38c9[105],function(_0xb9c3x33){dial[_0x38c9[105]](_0xb9c3x33,io);member[_0x38c9[106]](_0xb9c3x33)});ami[_0x38c9[52]](_0x38c9[107],function(_0xb9c3x33){_0xb9c3x33[_0x38c9[108]]= _0x38c9[109];tranfer[_0x38c9[110]](_0xb9c3x33)});ami[_0x38c9[52]](_0x38c9[111],function(_0xb9c3x33){_0xb9c3x33[_0x38c9[108]]= _0x38c9[112];tranfer[_0x38c9[113]](_0xb9c3x33)});ami[_0x38c9[52]](_0x38c9[114],function(_0xb9c3x33){_0xb9c3x33[_0x38c9[51]]= _0xb9c3x33[_0x38c9[115]];process[_0x38c9[116]](_0xb9c3x33);var _0xb9c3x18=getVariable(_0xb9c3x33);switch(_0xb9c3x18[_0x38c9[25]]){case _0x38c9[118]:recording[_0x38c9[117]](_0xb9c3x18);break;case _0x38c9[120]:queuecaller[_0x38c9[119]](_0xb9c3x18,io);break;case _0x38c9[124]:console[_0x38c9[2]](_0x38c9[121],_0xb9c3x33);if(_0xb9c3x33[_0x38c9[122]]){fax[_0x38c9[123]](_0xb9c3x33)};break;case _0x38c9[126]:console[_0x38c9[2]](_0x38c9[125],_0xb9c3x33);break;case _0x38c9[128]:console[_0x38c9[2]](_0x38c9[127],_0xb9c3x33);break;case _0x38c9[131]:if(_0xb9c3x33[_0x38c9[122]]){dial[_0x38c9[130]]({uniqueid:_0xb9c3x33[_0x38c9[129]],routeId:_0xb9c3x33[_0x38c9[122]]},io)};break;default:break}});ami[_0x38c9[52]](_0x38c9[132],function(_0xb9c3x33){if(trunkStates[_0xb9c3x33[_0x38c9[133]]]){if(trunkStates[_0xb9c3x33[_0x38c9[133]]]!== _0xb9c3x33[_0x38c9[95]]){trunk[_0x38c9[134]](_0xb9c3x33)}}else {trunkStates[_0xb9c3x33[_0x38c9[133]]]= _0xb9c3x33[_0x38c9[95]];trunk[_0x38c9[134]](_0xb9c3x33)}});ami[_0x38c9[52]](_0x38c9[135],function(_0xb9c3x33){trunk[_0x38c9[136]](_0xb9c3x33)});ami[_0x38c9[52]](_0x38c9[137],function(_0xb9c3x33){fax[_0x38c9[137]](_0xb9c3x33)});ami[_0x38c9[52]](_0x38c9[138],function(_0xb9c3x33){if(_0xb9c3x33[_0x38c9[139]]=== _0x38c9[116]){console[_0x38c9[2]](_0x38c9[140],_0xb9c3x33);fax[_0x38c9[141]](_0xb9c3x33)}});ami[_0x38c9[52]](_0x38c9[142],function(_0xb9c3x33){dial[_0x38c9[143]](_0xb9c3x33,io)});ami[_0x38c9[52]](_0x38c9[144],function(_0xb9c3x33){dial[_0x38c9[145]](_0xb9c3x33,io);member[_0x38c9[146]](_0xb9c3x33)});ami[_0x38c9[52]](_0x38c9[147],function(_0xb9c3x33){console[_0x38c9[2]](_0x38c9[148],_0xb9c3x33);fax[_0x38c9[149]](_0xb9c3x33)})
\ No newline at end of file
diff --git a/server/config/ami/call.js b/server/config/ami/call.js
index 78c4387..f258072 100644
--- a/server/config/ami/call.js
+++ b/server/config/ami/call.js
@@ -1,70 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const moment = require('moment');
-const ReportCall = require('../../models').ReportCall;
-
-function Call() {
-  console.log('Call Initialization...');
-}
-
-Call.prototype.add = function(evt) {
-  if (evt.type) {
-    create(evt);
-  }
-}
-
-function create(evt) {
-  return ReportCall
-    .create(evt)
-    .then(function(call) {
-      call.dataValues.evt = 'ReportCall.afterCreate';
-      process.send(call.dataValues);
-
-      if (evt.answertime) {
-        console.log('[report] call uniqueid', evt.uniqueid, 'answertime', evt.answertime, 'updated');
-        call.answertime = evt.answertime;
-      }
-
-      if (evt.endtime && call.endtime) {
-        if (moment(evt.endtime).isAfter(call.endtime)) {
-          console.log('[report] call uniqueid', evt.uniqueid, 'endtime', evt.endtime, 'updated');
-
-          call.endtime = evt.endtime;
-          call.disposition = evt.disposition;
-          call.destinationchannel = evt.destinationchannel;
-          call.lastapplication = evt.lastapplication;
-          call.lastdata = evt.lastdata;
-
-          call.duration = moment(call.endtime).diff(call.starttime, 'seconds');
-          call.billableseconds = moment(call.endtime).diff(call.answertime, 'seconds');
-        }
-      }
-
-      return call.save();
-    })
-    .then(function(data) {
-      data.dataValues.evt = 'ReportCall.afterUpdate';
-      data.dataValues.changed = _.keyBy(data.changed());
-      process.send(data.dataValues);
-    })
-    .catch(function(err) {
-      if (err.name && err.name !== 'SequelizeUniqueConstraintError') {
-        console.error('[report] call ' + err);
-        console.error('[report] call evt' + evt);
-      }
-    });
-}
-
-// ReportCall.afterCreate(function(doc, options) {
-// doc.dataValues.evt = 'ReportCall.afterCreate';
-// process.send(doc.dataValues);
-// });
-
-// ReportCall.afterUpdate(function(doc, options) {
-// doc.dataValues.evt = 'ReportCall.afterUpdate';
-// doc.dataValues.changed = _.keyBy(doc.changed());
-// process.send(doc.dataValues);
-// });
-
-module.exports = Call;
+var _0xece2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x61\x6C\x6C\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x64\x64","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x74\x79\x70\x65","\x6E\x61\x6D\x65","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x63\x61\x6C\x6C\x20","\x65\x72\x72\x6F\x72","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x63\x61\x6C\x6C\x20\x65\x76\x74","\x63\x61\x74\x63\x68","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x63\x61\x6C\x6C\x20\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x70\x64\x61\x74\x65\x64","\x65\x6E\x64\x74\x69\x6D\x65","\x69\x73\x41\x66\x74\x65\x72","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x6C\x61\x73\x74\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6C\x61\x73\x74\x64\x61\x74\x61","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x62\x69\x6C\x6C\x61\x62\x6C\x65\x73\x65\x63\x6F\x6E\x64\x73","\x65\x76\x74","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x73\x65\x6E\x64","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xece2[0];const _=require(_0xece2[1]);const moment=require(_0xece2[2]);const ReportCall=require(_0xece2[4])[_0xece2[3]];function Call(){console[_0xece2[6]](_0xece2[5])}Call[_0xece2[8]][_0xece2[7]]= function(_0xa7a2x5){if(_0xa7a2x5[_0xece2[9]]){create(_0xa7a2x5)}};function create(_0xa7a2x5){var _0xa7a2x7={};return ReportCall[_0xece2[40]]({where:{uniqueid:_0xa7a2x5[_0xece2[18]]}})[_0xece2[39]](function(_0xa7a2x9){if(_0xa7a2x9){var _0xa7a2x7={};if(_0xa7a2x5[_0xece2[16]]){console[_0xece2[6]](_0xece2[17],_0xa7a2x5[_0xece2[18]],_0xece2[16],_0xa7a2x5[_0xece2[16]],_0xece2[19]);_0xa7a2x7[_0xece2[16]]= _0xa7a2x5[_0xece2[16]]};if(_0xa7a2x5[_0xece2[20]]&& _0xa7a2x9[_0xece2[20]]){if(moment(_0xa7a2x5[_0xece2[20]])[_0xece2[21]](_0xa7a2x9[_0xece2[20]])){console[_0xece2[6]](_0xece2[17],_0xa7a2x5[_0xece2[18]],_0xece2[20],_0xa7a2x5[_0xece2[20]],_0xece2[19]);_0xa7a2x7[_0xece2[20]]= _0xa7a2x5[_0xece2[20]];_0xa7a2x7[_0xece2[22]]= _0xa7a2x5[_0xece2[22]];_0xa7a2x7[_0xece2[23]]= _0xa7a2x5[_0xece2[23]];_0xa7a2x7[_0xece2[24]]= _0xa7a2x5[_0xece2[24]];_0xa7a2x7[_0xece2[25]]= _0xa7a2x5[_0xece2[25]];_0xa7a2x7[_0xece2[26]]= moment(_0xa7a2x9[_0xece2[20]])[_0xece2[29]](_0xa7a2x9[_0xece2[27]],_0xece2[28]);_0xa7a2x7[_0xece2[30]]= moment(_0xa7a2x9[_0xece2[20]])[_0xece2[29]](_0xa7a2x9[_0xece2[16]],_0xece2[28])}};_0xa7a2x9[_0xece2[32]][_0xece2[31]]= _0xece2[33];_0xa7a2x9[_0xece2[32]][_0xece2[34]]= _0xa7a2x7;process[_0xece2[35]](_0xa7a2x9[_0xece2[32]]);return _0xa7a2x9[_0xece2[36]](_0xa7a2x7)}else {_0xa7a2x5[_0xece2[31]]= _0xece2[37];process[_0xece2[35]](_0xa7a2x5);return ReportCall[_0xece2[38]](_0xa7a2x5)}})[_0xece2[15]](function(_0xa7a2x8){if(_0xa7a2x8[_0xece2[10]]&& _0xa7a2x8[_0xece2[10]]!== _0xece2[11]){console[_0xece2[13]](_0xece2[12]+ _0xa7a2x8);console[_0xece2[13]](_0xece2[14]+ _0xa7a2x5)}})}module[_0xece2[41]]= Call
\ No newline at end of file
diff --git a/server/config/ami/cleaner.js b/server/config/ami/cleaner.js
index a14cbab..9e2584e 100644
--- a/server/config/ami/cleaner.js
+++ b/server/config/ami/cleaner.js
@@ -1,151 +1 @@
-'use strict';
-
-var moment = require('moment');
-var _ = require('lodash');
-var Promise = require('bluebird');
-
-var models = require('../../models');
-
-function Cleaner(ami) {
-  console.log('Cleaner Initialization...');
-  var channels = ['Chat', 'Mail', 'Fax', 'Sms', 'Openchannel'];
-  clean(ami, channels);
-  setInterval(function() {
-    clean(ami, channels);
-  }, 10 * 60 * 1000);
-}
-
-function clean(ami, channels) {
-  removeInactiveCalls(ami);
-  _.forEach(channels, function(channel) {
-    removeExpiredApplications(channel);
-  });
-}
-
-function removeInactiveCalls(ami) {
-  console.log('Removing inactive calls...');
-  var _bulkClean = [],
-    _activeCalls = [];
-  return Promise
-    .promisify(ami.action)({
-      action: 'Command',
-      command: 'core show channels concise',
-    })
-    .then(function(result) {
-      var tmpArray;
-      if (result && result.content) {
-        var res = result.content.split('\n');
-        _.forEach(res, function(elem) {
-          if (elem) {
-            tmpArray = elem.split('!');
-            tmpArray.length === 14 && _activeCalls.push(tmpArray.pop());
-          }
-        });
-      }
-      return models.ReportQueue
-        .findAll({
-          where: {
-            $or: [{
-              queuecallerleaveAt: null
-            }, {
-              queuecallerexit: false,
-              queuecallerabandon: false,
-              queuecallercomplete: false,
-              queuecallerleaveAt: {
-                $ne: null
-              }
-            }]
-          }
-        });
-    })
-    .then(function(queueCalls) {
-      _.forEach(queueCalls, function(call) {
-        if (!_.includes(_activeCalls, call.uniqueid)) {
-          _bulkClean.push(call.updateAttributes({
-            queuecallerleaveAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-            queuecallerexitAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-            queuecallerexit: true,
-            queuecallerexitreason: 'zombie'
-          }))
-        }
-      });
-      return models.ReportSquare
-        .findAll({
-          where: {
-            leaveAt: null
-          }
-        });
-    })
-    .then(function(squareCalls) {
-      _.forEach(squareCalls, function(call) {
-        if (!_.includes(_activeCalls, call.uniqueid)) {
-          _bulkClean.push(call.updateAttributes({
-            leaveAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-            network: 'no'
-          }))
-        }
-      });
-
-      return models.ReportDial
-        .findAll({
-          where: {
-            endtime: null
-          }
-        });
-    })
-    .then(function(dialCalls) {
-      _.forEach(dialCalls, function(call) {
-        if (!_.includes(_activeCalls, call.uniqueid)) {
-          _bulkClean.push(call.updateAttributes({
-            endtime: moment().format("YYYY-MM-DD HH:mm:ss"),
-            dialstatus: 'ZOMBIE'
-          }))
-        }
-      });
-      return _bulkClean;
-    })
-    .all()
-    .then(function() {
-      console.log('Inactive calls cleaning completed!');
-    })
-    .catch(function(err) {
-      console.log('Inactive calls remove error:', err);
-    });
-}
-
-function removeExpiredApplications(channel) {
-
-  return models['Report' + channel + 'Session']
-    .findAll({
-      where: {
-        leaveAt: null,
-        timeslot: { //If for any reason the timeslot is not populated I can't check if the app is expired
-          $ne: null
-        }
-      }
-    })
-    .then(function(sessions) {
-      var expiration, bulkFix = [];
-      _.forEach(sessions, function(session) {
-        expiration = moment(session.updatedAt).add(session.timeslot, 'seconds');
-        if (moment().isSameOrAfter(expiration)) {
-          bulkFix.push(session.updateAttributes({
-            timeout: true,
-            leaveAt: moment().format("YYYY-MM-DD HH:mm:ss")
-          }));
-        }
-      });
-
-      return bulkFix;
-    })
-    .all()
-    .then(function() {
-      console.log('Inactive ' + channel + ' sessions cleaning completed!');
-    })
-    .catch(function(err) {
-      console.log('Inactive ' + channel + ' sessions remove error:', err);
-    });
-
-}
-
-module.exports = Cleaner;
+var _0x4a0b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x6C\x65\x61\x6E\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x43\x68\x61\x74","\x4D\x61\x69\x6C","\x46\x61\x78","\x53\x6D\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x66\x6F\x72\x45\x61\x63\x68","\x52\x65\x6D\x6F\x76\x69\x6E\x67\x20\x69\x6E\x61\x63\x74\x69\x76\x65\x20\x63\x61\x6C\x6C\x73\x2E\x2E\x2E","\x49\x6E\x61\x63\x74\x69\x76\x65\x20\x63\x61\x6C\x6C\x73\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x3A","\x63\x61\x74\x63\x68","\x49\x6E\x61\x63\x74\x69\x76\x65\x20\x63\x61\x6C\x6C\x73\x20\x63\x6C\x65\x61\x6E\x69\x6E\x67\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64\x21","\x74\x68\x65\x6E","\x61\x6C\x6C","\x75\x6E\x69\x71\x75\x65\x69\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x5A\x4F\x4D\x42\x49\x45","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x70\x75\x73\x68","\x6E\x6F","\x66\x69\x6E\x64\x41\x6C\x6C","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C","\x7A\x6F\x6D\x62\x69\x65","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65","\x63\x6F\x6E\x74\x65\x6E\x74","\x0A","\x73\x70\x6C\x69\x74","\x21","\x6C\x65\x6E\x67\x74\x68","\x70\x6F\x70","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x43\x6F\x6D\x6D\x61\x6E\x64","\x63\x6F\x72\x65\x20\x73\x68\x6F\x77\x20\x63\x68\x61\x6E\x6E\x65\x6C\x73\x20\x63\x6F\x6E\x63\x69\x73\x65","\x61\x63\x74\x69\x6F\x6E","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x49\x6E\x61\x63\x74\x69\x76\x65\x20","\x20\x73\x65\x73\x73\x69\x6F\x6E\x73\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x3A","\x20\x73\x65\x73\x73\x69\x6F\x6E\x73\x20\x63\x6C\x65\x61\x6E\x69\x6E\x67\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64\x21","\x74\x69\x6D\x65\x73\x6C\x6F\x74","\x73\x65\x63\x6F\x6E\x64\x73","\x61\x64\x64","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x69\x73\x53\x61\x6D\x65\x4F\x72\x41\x66\x74\x65\x72","\x52\x65\x70\x6F\x72\x74","\x53\x65\x73\x73\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x4a0b[0];var moment=require(_0x4a0b[1]);var _=require(_0x4a0b[2]);var Promise=require(_0x4a0b[3]);var models=require(_0x4a0b[4]);function Cleaner(_0x686cx6){console[_0x4a0b[6]](_0x4a0b[5]);var _0x686cx7=[_0x4a0b[7],_0x4a0b[8],_0x4a0b[9],_0x4a0b[10],_0x4a0b[11]];clean(_0x686cx6,_0x686cx7);setInterval(function(){clean(_0x686cx6,_0x686cx7)},10* 60* 1000)}function clean(_0x686cx6,_0x686cx7){removeInactiveCalls(_0x686cx6);_[_0x4a0b[12]](_0x686cx7,function(_0x686cx9){removeExpiredApplications(_0x686cx9)})}function removeInactiveCalls(_0x686cx6){console[_0x4a0b[6]](_0x4a0b[13]);var _0x686cxb=[],_0x686cxc=[];return Promise[_0x4a0b[41]](_0x686cx6[_0x4a0b[40]])({action:_0x4a0b[38],command:_0x4a0b[39]})[_0x4a0b[17]](function(_0x686cx12){var _0x686cx13;if(_0x686cx12&& _0x686cx12[_0x4a0b[31]]){var _0x686cx14=_0x686cx12[_0x4a0b[31]][_0x4a0b[33]](_0x4a0b[32]);_[_0x4a0b[12]](_0x686cx14,function(_0x686cx15){if(_0x686cx15){_0x686cx13= _0x686cx15[_0x4a0b[33]](_0x4a0b[34]);_0x686cx13[_0x4a0b[35]]=== 14&& _0x686cxc[_0x4a0b[25]](_0x686cx13[_0x4a0b[36]]())}})};return models[_0x4a0b[37]][_0x4a0b[27]]({where:{$or:[{queuecallerleaveAt:null},{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null}}]}})})[_0x4a0b[17]](function(_0x686cx11){_[_0x4a0b[12]](_0x686cx11,function(_0x686cxf){if(!_[_0x4a0b[20]](_0x686cxc,_0x686cxf[_0x4a0b[19]])){_0x686cxb[_0x4a0b[25]](_0x686cxf[_0x4a0b[24]]({queuecallerleaveAt:moment()[_0x4a0b[22]](_0x4a0b[21]),queuecallerexitAt:moment()[_0x4a0b[22]](_0x4a0b[21]),queuecallerexit:true,queuecallerexitreason:_0x4a0b[29]}))}});return models[_0x4a0b[30]][_0x4a0b[27]]({where:{leaveAt:null}})})[_0x4a0b[17]](function(_0x686cx10){_[_0x4a0b[12]](_0x686cx10,function(_0x686cxf){if(!_[_0x4a0b[20]](_0x686cxc,_0x686cxf[_0x4a0b[19]])){_0x686cxb[_0x4a0b[25]](_0x686cxf[_0x4a0b[24]]({leaveAt:moment()[_0x4a0b[22]](_0x4a0b[21]),network:_0x4a0b[26]}))}});return models[_0x4a0b[28]][_0x4a0b[27]]({where:{endtime:null}})})[_0x4a0b[17]](function(_0x686cxe){_[_0x4a0b[12]](_0x686cxe,function(_0x686cxf){if(!_[_0x4a0b[20]](_0x686cxc,_0x686cxf[_0x4a0b[19]])){_0x686cxb[_0x4a0b[25]](_0x686cxf[_0x4a0b[24]]({endtime:moment()[_0x4a0b[22]](_0x4a0b[21]),dialstatus:_0x4a0b[23]}))}});return _0x686cxb})[_0x4a0b[18]]()[_0x4a0b[17]](function(){console[_0x4a0b[6]](_0x4a0b[16])})[_0x4a0b[15]](function(_0x686cxd){console[_0x4a0b[6]](_0x4a0b[14],_0x686cxd)})}function removeExpiredApplications(_0x686cx9){return models[_0x4a0b[50]+ _0x686cx9+ _0x4a0b[51]][_0x4a0b[27]]({where:{leaveAt:null,timeslot:{$ne:null}}})[_0x4a0b[17]](function(_0x686cx17){var _0x686cx18,_0x686cx19=[];_[_0x4a0b[12]](_0x686cx17,function(_0x686cx1a){_0x686cx18= moment(_0x686cx1a[_0x4a0b[48]])[_0x4a0b[47]](_0x686cx1a[_0x4a0b[45]],_0x4a0b[46]);if(moment()[_0x4a0b[49]](_0x686cx18)){_0x686cx19[_0x4a0b[25]](_0x686cx1a[_0x4a0b[24]]({timeout:true,leaveAt:moment()[_0x4a0b[22]](_0x4a0b[21])}))}});return _0x686cx19})[_0x4a0b[18]]()[_0x4a0b[17]](function(){console[_0x4a0b[6]](_0x4a0b[42]+ _0x686cx9+ _0x4a0b[44])})[_0x4a0b[15]](function(_0x686cxd){console[_0x4a0b[6]](_0x4a0b[42]+ _0x686cx9+ _0x4a0b[43],_0x686cxd)})}module[_0x4a0b[52]]= Cleaner
\ No newline at end of file
diff --git a/server/config/ami/dial.js b/server/config/ami/dial.js
index 230e016..2c6d192 100644
--- a/server/config/ami/dial.js
+++ b/server/config/ami/dial.js
@@ -1,110 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const moment = require('moment');
-const ReportDial = require('../../models').ReportDial;
-const util = require('util');
-
-function Dial(io) {
-  console.log('Agent Initialization...');
-
-  ReportDial.afterCreate(function(doc, options) {
-    doc.dataValues.evt = 'ReportDial.afterCreate';
-    process.send(doc.dataValues);
-    console.log(doc.dataValues);
-    // io.to(util.format('agent:%s', doc.channel.split(/\/|-/)[1])).emit('report_dial:save', doc);//I don' t have the cannel yet, so I don' t know the agent that is calling
-    io.to('admins').emit('report_dial:save', doc);
-    io.to('users').emit('report_dial:save', doc);
-  });
-
-  ReportDial.afterUpdate(function(doc, options) {
-    console.log(doc.channel);
-    doc.dataValues.evt = 'ReportDial.afterUpdate';
-    doc.dataValues.changed = _.keyBy(doc.changed());
-    process.send(doc.dataValues);
-    io.to(util.format('agent:%s', doc.channel.split(/\/|-/)[1])).emit('report_dial:' + (options.begin ? 'save' : 'update'), doc); //if I just started the dial I send the save event and insert the row in the realtime tible. Otherwise I send the update event and update the realtime table
-    io.to('admins').emit('report_dial:update', doc);
-    io.to('users').emit('report_dial:update', doc);
-  });
-
-}
-
-Dial.prototype.beforeDial = function(evt) {
-  return createDial(evt); // I create the dial row in the database with the uniqueid
-}
-
-Dial.prototype.begin = function(evt) {
-  if (evt.dialstring) {
-    var dialString = evt.dialstring.split('/');
-    if (dialString.length > 1 && dialString[0] !== 'SIP') {
-      evt.starttime = moment().format("YYYY-MM-DD HH:mm:ss");
-      evt.lastevent = 'called';
-      return updateDial(evt, null, true); //At the start of the dial I update the existing row in the database. I pass a true parameter that say that I' m starting the dial
-    }
-  }
-}
-
-Dial.prototype.end = function(evt) {
-  evt.endtime = moment().format("YYYY-MM-DD HH:mm:ss");
-  if (evt.dialstatus === 'ANSWER') {
-    evt.lastevent = 'connect';
-    evt.answertime = moment().format("YYYY-MM-DD HH:mm:ss");
-  } else {
-    evt.lastevent = 'rejected';
-  }
-  return updateDial(evt);
-}
-
-Dial.prototype.hangup = function(evt) {
-  return ReportDial
-    .findOne({
-      where: {
-        uniqueid: evt.uniqueid
-      },
-      order: 'createdAt DESC'
-    })
-    .then(function(dial) {
-      if (dial) {
-        evt.endtime = moment().format("YYYY-MM-DD HH:mm:ss");
-        evt.lastevent = dial.answertime ? 'complete' : 'rejected';
-        return updateDial(evt);
-      }
-    })
-}
-
-function createDial(evt) {
-  return ReportDial
-    .create(evt)
-    .then(function(data) {
-      console.log('[dial] begin');
-    })
-    .catch(function(err) {
-      console.error('[dial] dial creation error: ' + err);
-    });
-}
-
-function updateDial(evt, where, begin) { //I update the dial row
-  return ReportDial
-    .findOne({
-      where: where || {
-        uniqueid: evt.uniqueid
-      },
-      order: 'createdAt DESC'
-    })
-    .then(function(row) {
-      if (row) {
-        return row
-          .update(evt, {
-            begin: begin // and pass the begin value as an option for the afterUpdate hook
-          });
-      }
-    })
-    .then(function(data) {
-      console.log('[dial] update');
-    })
-    .catch(function(err) {
-      console.error('[dial] update error: ' + err.stack);
-    });
-}
-
-module.exports = Dial;
+var _0x6993=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x41\x67\x65\x6E\x74\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x62\x65\x66\x6F\x72\x65\x44\x69\x61\x6C","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x62\x65\x67\x69\x6E","\x64\x69\x61\x6C\x73\x74\x72\x69\x6E\x67","\x2F","\x73\x70\x6C\x69\x74","\x6C\x65\x6E\x67\x74\x68","\x53\x49\x50","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x63\x61\x6C\x6C\x65\x64","\x65\x6E\x64","\x65\x6E\x64\x74\x69\x6D\x65","\x64\x69\x61\x6C\x73\x74\x61\x74\x75\x73","\x41\x4E\x53\x57\x45\x52","\x63\x6F\x6E\x6E\x65\x63\x74","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x72\x65\x6A\x65\x63\x74\x65\x64","\x68\x61\x6E\x67\x75\x70","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x74\x68\x65\x6E","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x44\x45\x53\x43","\x66\x69\x6E\x64\x4F\x6E\x65","\x65\x76\x74","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x6E\x64","\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x61\x64\x6D\x69\x6E\x73","\x74\x6F","\x75\x73\x65\x72\x73","\x5B\x64\x69\x61\x6C\x5D\x20\x64\x69\x61\x6C\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72\x3A\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x64\x69\x61\x6C\x5D\x20\x62\x65\x67\x69\x6E","\x63\x72\x65\x61\x74\x65","\x5B\x64\x69\x61\x6C\x5D\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A\x20","\x73\x74\x61\x63\x6B","\x5B\x64\x69\x61\x6C\x5D\x20\x75\x70\x64\x61\x74\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6B\x65\x79\x42\x79","\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C\x3A","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x61\x67\x65\x6E\x74\x3A\x25\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C\x3A\x75\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6993[0];const _=require(_0x6993[1]);const moment=require(_0x6993[2]);const ReportDial=require(_0x6993[4])[_0x6993[3]];const util=require(_0x6993[5]);function Dial(_0xdbdbx6){console[_0x6993[7]](_0x6993[6])}Dial[_0x6993[9]][_0x6993[8]]= function(_0xdbdbx7,_0xdbdbx6){return createDial(_0xdbdbx7,_0xdbdbx6)};Dial[_0x6993[9]][_0x6993[10]]= function(_0xdbdbx7,_0xdbdbx6){if(_0xdbdbx7[_0x6993[11]]){var _0xdbdbx8=_0xdbdbx7[_0x6993[11]][_0x6993[13]](_0x6993[12]);if(_0xdbdbx8[_0x6993[14]]> 1&& _0xdbdbx8[0]!== _0x6993[15]){_0xdbdbx7[_0x6993[16]]= moment()[_0x6993[18]](_0x6993[17]);_0xdbdbx7[_0x6993[19]]= _0x6993[20];return updateDial(_0xdbdbx7,null,true,_0xdbdbx6)}}};Dial[_0x6993[9]][_0x6993[21]]= function(_0xdbdbx7,_0xdbdbx6){_0xdbdbx7[_0x6993[22]]= moment()[_0x6993[18]](_0x6993[17]);if(_0xdbdbx7[_0x6993[23]]=== _0x6993[24]){_0xdbdbx7[_0x6993[19]]= _0x6993[25];_0xdbdbx7[_0x6993[26]]= moment()[_0x6993[18]](_0x6993[17])}else {_0xdbdbx7[_0x6993[19]]= _0x6993[27]};return updateDial(_0xdbdbx7,null,false,_0xdbdbx6)};Dial[_0x6993[9]][_0x6993[28]]= function(_0xdbdbx7,_0xdbdbx6){return ReportDial[_0x6993[33]]({where:{uniqueid:_0xdbdbx7[_0x6993[31]]},order:_0x6993[32]})[_0x6993[30]](function(_0xdbdbx9){if(_0xdbdbx9){_0xdbdbx7[_0x6993[22]]= moment()[_0x6993[18]](_0x6993[17]);_0xdbdbx7[_0x6993[19]]= _0xdbdbx9[_0x6993[26]]?_0x6993[29]:_0x6993[27];return updateDial(_0xdbdbx7,null,false,_0xdbdbx6)}})};function createDial(_0xdbdbx7,_0xdbdbx6){_0xdbdbx7[_0x6993[34]]= _0x6993[35];process[_0x6993[36]](_0xdbdbx7);_0xdbdbx6[_0x6993[40]](_0x6993[39])[_0x6993[38]](_0x6993[37],_0xdbdbx7);_0xdbdbx6[_0x6993[40]](_0x6993[41])[_0x6993[38]](_0x6993[37],_0xdbdbx7);return ReportDial[_0x6993[46]](_0xdbdbx7)[_0x6993[30]](function(_0xdbdbxc){console[_0x6993[7]](_0x6993[45])})[_0x6993[44]](function(_0xdbdbxb){console[_0x6993[43]](_0x6993[42]+ _0xdbdbxb)})}function updateDial(_0xdbdbx7,_0xdbdbxe,_0xdbdbxf,_0xdbdbx6){return ReportDial[_0x6993[33]]({where:_0xdbdbxe|| {uniqueid:_0xdbdbx7[_0x6993[31]]},order:_0x6993[32]})[_0x6993[30]](function(_0xdbdbx10){if(_0xdbdbx10){_0xdbdbx10[_0x6993[50]][_0x6993[34]]= _0x6993[51];_0xdbdbx10[_0x6993[50]][_0x6993[52]]= _[_0x6993[53]](_0xdbdbx10[_0x6993[52]]());process[_0x6993[36]](_0xdbdbx10[_0x6993[50]]);_0xdbdbx6[_0x6993[40]](util[_0x6993[18]](_0x6993[57],_0xdbdbx10[_0x6993[58]][_0x6993[13]](/\/|-/)[1]))[_0x6993[38]](_0x6993[54]+ (_0xdbdbxf?_0x6993[55]:_0x6993[56]),_0xdbdbx10);_0xdbdbx6[_0x6993[40]](_0x6993[39])[_0x6993[38]](_0x6993[59],_0xdbdbx10);_0xdbdbx6[_0x6993[40]](_0x6993[41])[_0x6993[38]](_0x6993[59],_0xdbdbx10);return _0xdbdbx10[_0x6993[56]](_0xdbdbx7,{begin:_0xdbdbxf})}})[_0x6993[30]](function(_0xdbdbxc){console[_0x6993[7]](_0x6993[49])})[_0x6993[44]](function(_0xdbdbxb){console[_0x6993[43]](_0x6993[47]+ _0xdbdbxb[_0x6993[48]])})}module[_0x6993[60]]= Dial
\ No newline at end of file
diff --git a/server/config/ami/fax.js b/server/config/ami/fax.js
index d0825e7..551269c 100644
--- a/server/config/ami/fax.js
+++ b/server/config/ami/fax.js
@@ -1,654 +1 @@
-'use stict';
-
-var fs = require('fs');
-var util = require('util');
-var path = require('path');
-var config = require('../../config/environment');
-var _ = require('lodash');
-var Promise = require('bluebird');
-
-// var tiff2pdf = Promise.promisify(require('tiff2pdf'));
-var exec = require('child-process-promise').exec;
-var fse = require('fs-extra');
-var moment = require('moment');
-
-var FaxAccount = require('../../models').FaxAccount;
-var FaxRoom = require('../../models').FaxRoom;
-var FaxMessage = require('../../models').FaxMessage;
-var FaxAttachment = require('../../models').FaxAttachment;
-var ReportFax = require('../../models').ReportFax;
-var Trunk = require('../../models').Trunk;
-var User = require('../../models').User;
-var Contact = require('../../models').Contact;
-var Util = require('../util');
-
-var faxaccounts;
-var io;
-
-function Fax(ami, socket) {
-  console.log('Fax Initialization...');
-
-  io = socket;
-
-  ReportFax.afterCreate(function(doc, options) {
-    io.to(util.format('agent:%s', doc.memberid)).emit('report_fax:save', doc);
-    io.to('users').emit('report_fax:save', doc);
-    io.to('admins').emit('report_fax:save', doc);
-  });
-
-  process.on('message', function(data) {
-    switch (data.message) {
-      case 'FaxMessage.afterCreate':
-        sendfax(data.doc, ami, 0, data.options, io);
-        break;
-      case 'FaxMessage.afterUpdate':
-        if (_.includes(data.options.changed, 'status') && data.doc.status === 'SENDING') {
-          sendfax(data.doc, ami, data.doc.retry + 1, data.options, io);
-        }
-        break;
-      case 'ReportFax.afterUpdate':
-        var account = _.find(faxaccounts, {
-          id: parseInt(data.doc.accountid)
-        });
-        if (account && _.includes(data.options.changed, 'connectid')) {
-          webhook(data.doc, account, 'accept');
-        }
-        if (account && _.includes(data.options.changed, 'rejectedAt')) {
-          webhook(data.doc, account, 'reject');
-        }
-        break;
-      case 'FaxRoom.afterUpdate':
-        var account1 = _.find(faxaccounts, {
-          id: data.doc.FaxAccountId
-        });
-        if (account1 && _.includes(data.options.changed, 'status') && data.doc.status === 'CLOSED') {
-          webhook(data.doc, account1, 'close');
-        }
-        break;
-      case 'FaxAccount.afterCreate':
-        faxaccounts.push(data.doc);
-        break;
-      case 'FaxAccount.afterUpdate':
-        var oldItem = _.find(faxaccounts, {
-          id: data.doc.id
-        });
-        if (oldItem) {
-          console.log('Fax account: ' + oldItem.name + ' Update');
-          _.merge(oldItem, data.doc);
-        } else {
-          faxaccounts.unshift(data.doc);
-        }
-        break;
-      case 'FaxAccount.afterDestroy':
-        _.remove(faxaccounts, {
-          id: data.doc.id
-        });
-        break;
-      default:
-    }
-  });
-
-  FaxAccount
-    .findAll()
-    .then(function(accounts) {
-      faxaccounts = accounts;
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-function webhook(doc, account, hook) {
-  var _Account = account;
-  switch (hook) {
-    case 'accept':
-      if (_Account.acceptMethod && _Account.acceptUrl) {
-        console.log('Fax account <' + _Account.name + '> executing accept webhook');
-        execRequest(doc.dataValues || doc, _Account.acceptMethod, _Account.acceptUrl);
-      }
-      if (_Account.actions.length) {
-        _.forEach(_Account.actions, function(action) {
-          if (action.enabled) {
-            Util.execAction(action, doc);
-          }
-        })
-      }
-      break;
-    case 'reject':
-      if (_Account.rejectMethod && _Account.rejectUrl) {
-        console.log('Fax account <' + _Account.name + '> executing reject webhook');
-        execRequest(doc.dataValues || doc, _Account.rejectMethod, _Account.rejectUrl);
-      }
-      break;
-    case 'close':
-      if (_Account.closeMethod && _Account.closeUrl) {
-        console.log('Fax account <' + _Account.name + '> executing close webhook');
-        execRequest(doc.dataValues || doc, _Account.closeMethod, _Account.closeUrl);
-      }
-      break;
-    default:
-      console.log('Webhook not recognized');
-  }
-}
-
-function execRequest(doc, method, url) {
-  return Util
-    .sendRequest(doc, method, url)
-    .then(function(values) {
-      console.log('request successeful!');
-    })
-    .catch(function(err) {
-      console.log('request failed!');
-    })
-}
-
-Fax.prototype.updateError = function(evt) {
-  return FaxMessage
-    .findOne({
-      where: {
-        channel: evt.channel
-      }
-    })
-    .then(function(faxMessage) {
-      if (!faxMessage) {
-        throw new Error('[Fax] Message not found');
-      }
-      return faxMessage.updateAttributes({
-        error: evt.value
-      });
-    })
-    .then(function(message) {
-      io.emit('fax_message:save', message);
-    })
-    .catch(function(err) {
-      console.error('[Fax] Error updating error:', err);
-    });
-};
-
-Fax.prototype.updateMessage = function(evt) {
-  return FaxMessage
-    .findOne({
-      where: {
-        filename: evt.filename,
-        localstationid: evt.localstationid
-      }
-    })
-    .then(function(faxMessage) {
-      if (!faxMessage) {
-        throw new Error('[Fax] Message not found');
-      }
-
-      return faxMessage
-        .updateAttributes({
-          channel: evt.channel,
-          channelstate: evt.channelstate,
-          channelstatedesc: evt.channelstatedesc,
-          calleridnum: evt.calleridnum,
-          calleridname: evt.calleridname,
-          connectedlinenum: evt.connectedlinenum,
-          connectedlinename: evt.connectedlinename,
-          accountcode: evt.accountcode,
-          context: evt.context,
-          exten: evt.exten,
-          priority: evt.priority,
-          uniqueid: evt.uniqueid,
-          linkedid: evt.linkedid,
-          lastStatus: evt.status
-        });
-
-    })
-    .then(function(message) {
-      io.emit('fax_message:save', message);
-    })
-    .catch(function(err) {
-      console.error('[Fax] Error updating message:', err);
-      console.error('[Fax] Message:', err.message);
-      console.error('[Fax] Stack:', err.stack);
-    });
-}
-
-Fax.prototype.updateSend = function(evt) {
-  var _fMessage;
-
-  return FaxMessage
-    .findOne({
-      where: {
-        filename: evt.filename,
-        localstationid: evt.localstationid
-      }
-    })
-    .then(function(faxMessage) {
-      if (!faxMessage) {
-        throw new Error('[Fax] Message not found');
-      }
-
-      _fMessage = faxMessage;
-
-      var status = 'SENT';
-      if (evt.pagestransferred == '0') {
-        status = 'FAILED';
-      }
-
-      return _fMessage
-        .updateAttributes({
-          remotestationid: evt.remotestationid,
-          pagestransferred: evt.pagestransferred,
-          resolution: evt.resolution,
-          transferrate: evt.transferrate,
-          status: status
-        });
-
-    })
-    .then(function(message) {
-      io.emit('fax_message:save', message);
-      console.log('[Fax] Message update for SendFax event', message.id);
-      return _fMessage.getFaxRoom();
-    })
-    .then(function(faxRoom) {
-      if (!faxRoom) {
-        throw new Error('[Fax] Room not found');
-      }
-      return faxRoom
-        .updateAttributes({
-          lastEvent: 'SENT'
-        }, {
-          individualHooks: true
-        });
-    })
-    .then(function(room) {
-      console.log('[Fax] Room update for SendFax event', room.id);
-      io.emit('fax_room:save', room);
-    })
-    .catch(function(err) {
-      console.error('[Fax] Error updating sending message:', err);
-      console.error('[Fax] Message:', err.message);
-      console.error('[Fax] Stack:', err.stack);
-    });
-}
-
-Fax.prototype.receivefax = function(evt) {
-
-  console.log(util.format('[Fax] New message from %s', evt.calleridnum));
-  var _message = _.clone(evt);
-  var _account;
-  var _fMessage, _fRoom;
-
-  //Get the FaxAccount based on localstationid
-  return FaxAccount
-    .findOne({
-      where: {
-        localstationid: evt.localstationid
-      }
-    })
-    .then(function(faxAccount) {
-      if (!faxAccount) {
-        throw new Error('[Fax] Account not found');
-      }
-      console.log('[Fax] Account found:', evt.localstationid);
-      _account = faxAccount;
-      if (_account.ListId) {
-        return Contact
-          .findOrCreate({
-            where: {
-              ListId: _account.ListId,
-              $or: [{
-                phone: evt.calleridnum
-              }, {
-                fax: evt.calleridnum
-              }]
-            },
-            defaults: {
-              phone: evt.calleridnum,
-              fax: evt.calleridnum,
-              firstName: evt.calleridnum,
-              ListId: _account.ListId
-            }
-          });
-      } else {
-        return [];
-      }
-    })
-    .spread(function(contact, created) {
-      if (created != undefined && !created) {
-        return contact.updateAttributes({
-          fax: evt.calleridnum
-        });
-      }
-      return;
-    })
-    .then(function() {
-      return FaxRoom
-        .findAll({
-          limit: 1,
-          where: {
-            contact: _message.calleridnum,
-            FaxAccountId: _account.id,
-            status: {
-              $ne: 'CLOSED'
-            }
-          },
-          order: [
-            ['createdAt', 'DESC']
-          ]
-        })
-    })
-    .then(function(room) {
-      if (room.length) {
-        room = _.first(room);
-        return room
-          .updateAttributes({
-            lastEvent: 'RECEIVED',
-            lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'),
-            status: 'OPEN',
-            openReason: 'system',
-            faxIn: ++room.faxIn
-          });
-      } else {
-        return FaxRoom
-          .create({
-            contact: _message.calleridnum,
-            account: _account.name,
-            status: 'NEW',
-            lastEvent: 'RECEIVED',
-            lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'),
-            FaxAccountId: _account.id,
-            faxIn: 1
-          });
-      }
-    })
-    .then(function(room) {
-      if (!room) {
-        throw new Error('[Fax] Room not found/created');
-      }
-      console.log('[Fax] Room:', room.id);
-      io.emit('fax_room:save', room);
-      _fRoom = room;
-      _message.FaxRoomId = room.id;
-      _message.status = 'RECEIVED';
-      _message.from = _message.calleridnum;
-      _message.to = _message.localstationid;
-      return FaxMessage.create(_message);
-    })
-    .then(function(message) {
-      if (!message) {
-        throw new Error('[Fax] Message not created');
-      }
-      _fMessage = message;
-      io.emit('fax_message:save', message);
-      console.log('[Fax] Message:', message.id);
-      var _files = [];
-      var name = path.parse(evt.filename).name;
-      var namePdf = name + '.pdf';
-      return FaxAttachment
-        .create({
-          path: path.join(config.root, 'server', 'files', 'fax', 'inbound', 'converted', namePdf),
-          basename: namePdf,
-          name: name,
-          FaxMessageId: message.id
-        });
-    })
-    .then(function(faxAttachment) {
-      if (!faxAttachment) {
-        throw new Error('[Fax] Attachment not created');
-      }
-      console.log('[Fax] Attachment:', faxAttachment.id);
-      return exec('tiff2pdf -o ' + faxAttachment.path + ' ' + evt.filename);
-      // return tiff2pdf(evt.filename, path.join(config.root, 'server', 'files', 'fax', 'inbound', 'converted', '/'));
-    })
-    .then(function() {
-      console.log('[Fax] File correctly converted');
-
-      var msg = {
-        type: 'initFaxScheduler',
-        doc: {
-          channel: 'fax',
-          uniqueid: util.format('%s.%s', moment().unix(), _fRoom.id),
-          messageid: _fMessage.id,
-          roomid: _fRoom.id,
-          accountid: _account.id,
-          accountname: _account.name,
-          accountphone: _account.localstationid,
-          from: _fMessage.from
-        }
-      };
-
-      process.send(msg);
-    })
-    .catch(function(err) {
-      console.error('[Fax] Error receiving message:', err);
-      console.error('[Fax] Message:', err.message);
-      console.error('[Fax] Stack:', err.stack);
-    });
-
-};
-
-function sendfax(message, ami, retry, opt, io) {
-  if (message.status === 'SENDING') {
-    var _fRoom;
-    var _fMessage = message;
-    var _fFrom = message.from;
-    var _fTo = message.to;
-    var _fAccount;
-    var _fTrunk;
-    var _originalFile, _convertedFile;
-
-    return FaxAccount
-      .findOne({
-        where: {
-          localstationid: _fMessage.from
-        }
-      })
-      .then(function(faxAccount) {
-        if (!faxAccount) {
-          throw new Error('[Fax] Account not found');
-        }
-        console.log('[Fax] Account found:', faxAccount.localstationid);
-        _fAccount = _.clone(faxAccount.dataValues);
-        return Trunk.findOne({
-          where: {
-            name: _fAccount.TrunkName
-          },
-          attributes: ['name']
-        });
-      })
-      .then(function(trunk) {
-        if (!trunk) {
-          throw new Error('[Fax] Trunk not found');
-        }
-        console.log('[Fax] Trunk found:', trunk.name);
-        _fTrunk = _.clone(trunk.dataValues);
-        return;
-      })
-      .then(function() {
-        return [_fAccount, _fMessage];
-      })
-      .spread(getFaxRoom())
-      .then(function(faxRoom) {
-        if (!faxRoom) {
-          throw new Error('[Fax] Room not found');
-        }
-        console.log('[Fax] Room:', faxRoom.id);
-        _fRoom = faxRoom;
-        return _fRoom.addFaxMessage(_fMessage.id);
-      })
-      .then(function() {
-        return _fRoom
-          .updateAttributes({
-            status: 'PENDING',
-            lastEvent: 'SENDING',
-            lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'),
-            faxOut: ++_fRoom.faxOut
-          }, {
-            individualHooks: true,
-            user: opt.user
-          });
-      })
-      .then(function(data) {
-        console.log('[Fax] Room updated:', data.id);
-        io.emit('fax_room:save', data);
-        return _fRoom.addUser(_fMessage.UserId);
-      })
-      .then(function() {
-        return User.findById(_fMessage.UserId);
-      })
-      .then(function() {
-        if (_fAccount.ListId) {
-          return Contact
-            .findOrCreate({
-              where: {
-                ListId: _fAccount.ListId,
-                $or: [{
-                  phone: _fTo
-                }, {
-                  fax: _fTo
-                }]
-              },
-              defaults: {
-                fax: _fTo,
-                phone: _fTo,
-                firstName: _fTo,
-                ListId: _fAccount.ListId
-              }
-            });
-        } else {
-          return [];
-        }
-      })
-      .spread(function(contact, created) {
-        if (created != undefined && !created) {
-          return contact.updateAttributes({
-            fax: _fTo
-          });
-        }
-        return;
-      })
-      .then(function() {
-        _originalFile = _fMessage.FaxAttachments[0].path;
-        if (_fMessage.FaxAttachments[0].type === 'application/pdf') {
-          //File is PDF
-          _convertedFile = path.join(config.root, 'server', 'files', 'fax', 'outbound', 'converted', '/', path.parse(_originalFile).name + '.tif');
-          return exec('gs -q -dNOPAUSE -dBATCH -sDEVICE=tiffg4 -sPAPERSIZE=letter -sOutputFile=' + _convertedFile + ' ' + _originalFile);
-        } else {
-          //File is TIFF: no conversation but I copy in the converted directory
-          _convertedFile = path.join(config.root, 'server', 'files', 'fax', 'outbound', 'converted', '/', path.parse(_originalFile).base);
-          fse.copySync(_originalFile, _convertedFile);
-          return;
-        }
-      })
-      .then(function() {
-        fs.chmodSync(_convertedFile, 511); //511 is the decimal version of 777
-        console.log('[Fax] File correctly converted and ready to use');
-        return FaxMessage
-          .update({
-            filename: _convertedFile,
-            localstationid: _fMessage.from,
-            retry: retry
-          }, {
-            where: {
-              id: _fMessage.id
-            }
-          });
-      })
-      .then(function(message) {
-        if (message) {
-          io.emit('fax_message:save', message);
-        }
-        return Promise
-          .promisify(ami.action)({
-            action: 'originate',
-            channel: util.format('%s/%s/%s', _fAccount.tech, _fTrunk.name, _fTo),
-            exten: _fTo,
-            context: 'outbound-fax',
-            priority: 1,
-            callerid: util.format("\"%s\" <%s>", _fAccount.localstationid, _fAccount.localstationid),
-            variable: {
-              FAXNAME: _fAccount.name,
-              FAXNUMBER: _fTo,
-              FAXECM: _fAccount.ecm,
-              FAXHEADERINFO: _fAccount.headerinfo,
-              FAXLOCALSTATIONID: _fAccount.localstationid,
-              FAXMINRATE: _fAccount.minrate,
-              FAXMAXRATE: _fAccount.maxrate,
-              FAXMODEM: util.format('\"%s\"', _fAccount.modem),
-              FAXGATEWAY: _fAccount.gateway,
-              FAXT38TIMEOUT: _fAccount.t38timeout,
-              FAXOUTFILE: _convertedFile
-            },
-            account: _fAccount.localstationid
-          });
-      })
-      .then(function(res) {
-        console.log('[Fax] Response to AMI Action Originate');
-        console.log(res);
-      })
-      .catch(function(err) {
-        console.error('[Fax] Error sending message:', err);
-        console.error('[Fax] Message:', err.message);
-        console.error('[Fax] Stack:', err.stack);
-        return FaxMessage
-          .update({
-            status: 'FAILED'
-          }, {
-            where: {
-              id: _fMessage.id
-            }
-          })
-          .then(function(data) {
-            io.emit('fax_message:save', data);
-            if (_fRoom) {
-              return _fRoom.updateAttributes({
-                lastEvent: 'FAILED'
-              });
-            }
-            return;
-          })
-          .then(function(data) {
-            if (data) {
-              io.emit('fax_room:save', data);
-            }
-          })
-          .catch(function(err) {
-            console.error('[Fax] Error updating error status:', err);
-            console.error('[Fax] Message:', err.message);
-            console.error('[Fax] Stack:', err.stack);
-          });
-      });
-  }
-}
-
-function getFaxRoom() {
-  return function(account, faxMessage) {
-    if (faxMessage.FaxRoomId) {
-      return FaxRoom.findById(faxMessage.FaxRoomId);
-    } else {
-      return FaxRoom
-        .findAll({
-          limit: 1,
-          where: {
-            contact: faxMessage.to,
-            FaxAccountId: account.id
-          },
-          order: [
-            ['createdAt', 'DESC']
-          ]
-        })
-        .then(function(faxrooms) {
-          var room = _.first(faxrooms);
-          if (!room || room.status === 'CLOSED') {
-            return FaxRoom
-              .create({
-                contact: faxMessage.to,
-                account: account.name,
-                status: 'PENDING',
-                FaxAccountId: account.id,
-              })
-          } else {
-            return room;
-          }
-        })
-    }
-
-  }
-}
-
-module.exports = Fax;
+var _0xb312=["\x75\x73\x65\x20\x73\x74\x69\x63\x74","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x2D\x70\x72\x6F\x63\x65\x73\x73\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x66\x73\x2D\x65\x78\x74\x72\x61","\x6D\x6F\x6D\x65\x6E\x74","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x54\x72\x75\x6E\x6B","\x55\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x75\x74\x69\x6C","\x46\x61\x78\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x25\x73","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x74\x6F","\x75\x73\x65\x72\x73","\x61\x64\x6D\x69\x6E\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x6D\x65\x73\x73\x61\x67\x65","\x64\x6F\x63","\x6F\x70\x74\x69\x6F\x6E\x73","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x53\x45\x4E\x44\x49\x4E\x47","\x72\x65\x74\x72\x79","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x66\x69\x6E\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x61\x63\x63\x65\x70\x74","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x72\x65\x6A\x65\x63\x74","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x43\x4C\x4F\x53\x45\x44","\x63\x6C\x6F\x73\x65","\x46\x61\x78\x52\x6F\x6F\x6D\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x70\x75\x73\x68","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x69\x64","\x46\x61\x78\x20\x61\x63\x63\x6F\x75\x6E\x74\x3A\x20","\x6E\x61\x6D\x65","\x20\x55\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6F\x6E","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x63\x63\x65\x70\x74\x4D\x65\x74\x68\x6F\x64","\x61\x63\x63\x65\x70\x74\x55\x72\x6C","\x46\x61\x78\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x3C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x61\x63\x63\x65\x70\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x63\x74\x69\x6F\x6E\x73","\x65\x6E\x61\x62\x6C\x65\x64","\x65\x78\x65\x63\x41\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x65\x6A\x65\x63\x74\x4D\x65\x74\x68\x6F\x64","\x72\x65\x6A\x65\x63\x74\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x72\x65\x6A\x65\x63\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x63\x6C\x6F\x73\x65\x4D\x65\x74\x68\x6F\x64","\x63\x6C\x6F\x73\x65\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x63\x6C\x6F\x73\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x57\x65\x62\x68\x6F\x6F\x6B\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x72\x65\x71\x75\x65\x73\x74\x20\x66\x61\x69\x6C\x65\x64\x21","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x75\x63\x63\x65\x73\x73\x65\x66\x75\x6C\x21","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x75\x70\x64\x61\x74\x65\x45\x72\x72\x6F\x72","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x5B\x46\x61\x78\x5D\x20\x45\x72\x72\x6F\x72\x20\x75\x70\x64\x61\x74\x69\x6E\x67\x20\x65\x72\x72\x6F\x72\x3A","\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x73\x61\x76\x65","\x5B\x46\x61\x78\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x76\x61\x6C\x75\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x70\x64\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x5B\x46\x61\x78\x5D\x20\x45\x72\x72\x6F\x72\x20\x75\x70\x64\x61\x74\x69\x6E\x67\x20\x6D\x65\x73\x73\x61\x67\x65\x3A","\x5B\x46\x61\x78\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x5B\x46\x61\x78\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x63\x68\x61\x6E\x6E\x65\x6C\x73\x74\x61\x74\x65","\x63\x68\x61\x6E\x6E\x65\x6C\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x65\x78\x74\x65\x6E","\x70\x72\x69\x6F\x72\x69\x74\x79","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x75\x70\x64\x61\x74\x65\x53\x65\x6E\x64","\x5B\x46\x61\x78\x5D\x20\x45\x72\x72\x6F\x72\x20\x75\x70\x64\x61\x74\x69\x6E\x67\x20\x73\x65\x6E\x64\x69\x6E\x67\x20\x6D\x65\x73\x73\x61\x67\x65\x3A","\x5B\x46\x61\x78\x5D\x20\x52\x6F\x6F\x6D\x20\x75\x70\x64\x61\x74\x65\x20\x66\x6F\x72\x20\x53\x65\x6E\x64\x46\x61\x78\x20\x65\x76\x65\x6E\x74","\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x5B\x46\x61\x78\x5D\x20\x52\x6F\x6F\x6D\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x53\x45\x4E\x54","\x5B\x46\x61\x78\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x75\x70\x64\x61\x74\x65\x20\x66\x6F\x72\x20\x53\x65\x6E\x64\x46\x61\x78\x20\x65\x76\x65\x6E\x74","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D","\x70\x61\x67\x65\x73\x74\x72\x61\x6E\x73\x66\x65\x72\x72\x65\x64","\x30","\x46\x41\x49\x4C\x45\x44","\x72\x65\x6D\x6F\x74\x65\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x72\x65\x73\x6F\x6C\x75\x74\x69\x6F\x6E","\x74\x72\x61\x6E\x73\x66\x65\x72\x72\x61\x74\x65","\x72\x65\x63\x65\x69\x76\x65\x66\x61\x78","\x5B\x46\x61\x78\x5D\x20\x4E\x65\x77\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x66\x72\x6F\x6D\x20\x25\x73","\x63\x6C\x6F\x6E\x65","\x5B\x46\x61\x78\x5D\x20\x45\x72\x72\x6F\x72\x20\x72\x65\x63\x65\x69\x76\x69\x6E\x67\x20\x6D\x65\x73\x73\x61\x67\x65\x3A","\x5B\x46\x61\x78\x5D\x20\x46\x69\x6C\x65\x20\x63\x6F\x72\x72\x65\x63\x74\x6C\x79\x20\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x69\x6E\x69\x74\x46\x61\x78\x53\x63\x68\x65\x64\x75\x6C\x65\x72","\x66\x61\x78","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x72\x6F\x6D","\x73\x65\x6E\x64","\x5B\x46\x61\x78\x5D\x20\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x20\x6E\x6F\x74\x20\x63\x72\x65\x61\x74\x65\x64","\x5B\x46\x61\x78\x5D\x20\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3A","\x74\x69\x66\x66\x32\x70\x64\x66\x20\x2D\x6F\x20","\x20","\x5B\x46\x61\x78\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x6E\x6F\x74\x20\x63\x72\x65\x61\x74\x65\x64","\x70\x61\x72\x73\x65","\x2E\x70\x64\x66","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x69\x6E\x62\x6F\x75\x6E\x64","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x6A\x6F\x69\x6E","\x63\x72\x65\x61\x74\x65","\x5B\x46\x61\x78\x5D\x20\x52\x6F\x6F\x6D\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2F\x63\x72\x65\x61\x74\x65\x64","\x5B\x46\x61\x78\x5D\x20\x52\x6F\x6F\x6D\x3A","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x52\x45\x43\x45\x49\x56\x45\x44","\x66\x69\x72\x73\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x4F\x50\x45\x4E","\x73\x79\x73\x74\x65\x6D","\x66\x61\x78\x49\x6E","\x4E\x45\x57","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x73\x70\x72\x65\x61\x64","\x5B\x46\x61\x78\x5D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x5B\x46\x61\x78\x5D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x4C\x69\x73\x74\x49\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x5B\x46\x61\x78\x5D\x20\x45\x72\x72\x6F\x72\x20\x73\x65\x6E\x64\x69\x6E\x67\x20\x6D\x65\x73\x73\x61\x67\x65\x3A","\x5B\x46\x61\x78\x5D\x20\x45\x72\x72\x6F\x72\x20\x75\x70\x64\x61\x74\x69\x6E\x67\x20\x65\x72\x72\x6F\x72\x20\x73\x74\x61\x74\x75\x73\x3A","\x75\x70\x64\x61\x74\x65","\x5B\x46\x61\x78\x5D\x20\x52\x65\x73\x70\x6F\x6E\x73\x65\x20\x74\x6F\x20\x41\x4D\x49\x20\x41\x63\x74\x69\x6F\x6E\x20\x4F\x72\x69\x67\x69\x6E\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x25\x73\x2F\x25\x73\x2F\x25\x73","\x74\x65\x63\x68","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x65\x63\x6D","\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F","\x6D\x69\x6E\x72\x61\x74\x65","\x6D\x61\x78\x72\x61\x74\x65","\x22\x25\x73\x22","\x6D\x6F\x64\x65\x6D","\x67\x61\x74\x65\x77\x61\x79","\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74","\x61\x63\x74\x69\x6F\x6E","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x5B\x46\x61\x78\x5D\x20\x46\x69\x6C\x65\x20\x63\x6F\x72\x72\x65\x63\x74\x6C\x79\x20\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x20\x61\x6E\x64\x20\x72\x65\x61\x64\x79\x20\x74\x6F\x20\x75\x73\x65","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x74\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x70\x64\x66","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x2F","\x2E\x74\x69\x66","\x67\x73\x20\x2D\x71\x20\x2D\x64\x4E\x4F\x50\x41\x55\x53\x45\x20\x2D\x64\x42\x41\x54\x43\x48\x20\x2D\x73\x44\x45\x56\x49\x43\x45\x3D\x74\x69\x66\x66\x67\x34\x20\x2D\x73\x50\x41\x50\x45\x52\x53\x49\x5A\x45\x3D\x6C\x65\x74\x74\x65\x72\x20\x2D\x73\x4F\x75\x74\x70\x75\x74\x46\x69\x6C\x65\x3D","\x62\x61\x73\x65","\x63\x6F\x70\x79\x53\x79\x6E\x63","\x66\x69\x6E\x64\x42\x79\x49\x64","\x5B\x46\x61\x78\x5D\x20\x52\x6F\x6F\x6D\x20\x75\x70\x64\x61\x74\x65\x64\x3A","\x61\x64\x64\x55\x73\x65\x72","\x50\x45\x4E\x44\x49\x4E\x47","\x66\x61\x78\x4F\x75\x74","\x75\x73\x65\x72","\x61\x64\x64\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x5B\x46\x61\x78\x5D\x20\x54\x72\x75\x6E\x6B\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x5B\x46\x61\x78\x5D\x20\x54\x72\x75\x6E\x6B\x20\x66\x6F\x75\x6E\x64\x3A","\x54\x72\x75\x6E\x6B\x4E\x61\x6D\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xb312[0];var fs=require(_0xb312[1]);var util=require(_0xb312[2]);var path=require(_0xb312[3]);var config=require(_0xb312[4]);var _=require(_0xb312[5]);var Promise=require(_0xb312[6]);var exec=require(_0xb312[8])[_0xb312[7]];var fse=require(_0xb312[9]);var moment=require(_0xb312[10]);var FaxAccount=require(_0xb312[12])[_0xb312[11]];var FaxRoom=require(_0xb312[12])[_0xb312[13]];var FaxMessage=require(_0xb312[12])[_0xb312[14]];var FaxAttachment=require(_0xb312[12])[_0xb312[15]];var ReportFax=require(_0xb312[12])[_0xb312[16]];var Trunk=require(_0xb312[12])[_0xb312[17]];var User=require(_0xb312[12])[_0xb312[18]];var Contact=require(_0xb312[12])[_0xb312[19]];var Util=require(_0xb312[20]);var faxaccounts;var io;function Fax(_0x8d59x16,_0x8d59x17){console[_0xb312[22]](_0xb312[21]);io= _0x8d59x17;ReportFax[_0xb312[31]](function(_0x8d59x18,_0x8d59x19){io[_0xb312[28]](util[_0xb312[27]](_0xb312[25],_0x8d59x18[_0xb312[26]]))[_0xb312[24]](_0xb312[23],_0x8d59x18);io[_0xb312[28]](_0xb312[29])[_0xb312[24]](_0xb312[23],_0x8d59x18);io[_0xb312[28]](_0xb312[30])[_0xb312[24]](_0xb312[23],_0x8d59x18)});process[_0xb312[64]](_0xb312[32],function(_0x8d59x1a){switch(_0x8d59x1a[_0xb312[32]]){case _0xb312[35]:sendfax(_0x8d59x1a[_0xb312[33]],_0x8d59x16,0,_0x8d59x1a[_0xb312[34]],io);break;case _0xb312[41]:if(_[_0xb312[38]](_0x8d59x1a[_0xb312[34]][_0xb312[36]],_0xb312[37])&& _0x8d59x1a[_0xb312[33]][_0xb312[37]]=== _0xb312[39]){sendfax(_0x8d59x1a[_0xb312[33]],_0x8d59x16,_0x8d59x1a[_0xb312[33]][_0xb312[40]]+ 1,_0x8d59x1a[_0xb312[34]],io)};break;case _0xb312[48]:var _0x8d59x1b=_[_0xb312[43]](faxaccounts,{id:parseInt(_0x8d59x1a[_0xb312[33]][_0xb312[42]])});if(_0x8d59x1b&& _[_0xb312[38]](_0x8d59x1a[_0xb312[34]][_0xb312[36]],_0xb312[44])){webhook(_0x8d59x1a[_0xb312[33]],_0x8d59x1b,_0xb312[45])};if(_0x8d59x1b&& _[_0xb312[38]](_0x8d59x1a[_0xb312[34]][_0xb312[36]],_0xb312[46])){webhook(_0x8d59x1a[_0xb312[33]],_0x8d59x1b,_0xb312[47])};break;case _0xb312[52]:var _0x8d59x1c=_[_0xb312[43]](faxaccounts,{id:_0x8d59x1a[_0xb312[33]][_0xb312[49]]});if(_0x8d59x1c&& _[_0xb312[38]](_0x8d59x1a[_0xb312[34]][_0xb312[36]],_0xb312[37])&& _0x8d59x1a[_0xb312[33]][_0xb312[37]]=== _0xb312[50]){webhook(_0x8d59x1a[_0xb312[33]],_0x8d59x1c,_0xb312[51])};break;case _0xb312[54]:faxaccounts[_0xb312[53]](_0x8d59x1a[_0xb312[33]]);break;case _0xb312[61]:var _0x8d59x1d=_[_0xb312[43]](faxaccounts,{id:_0x8d59x1a[_0xb312[33]][_0xb312[55]]});if(_0x8d59x1d){console[_0xb312[22]](_0xb312[56]+ _0x8d59x1d[_0xb312[57]]+ _0xb312[58]);_[_0xb312[59]](_0x8d59x1d,_0x8d59x1a[_0xb312[33]])}else {faxaccounts[_0xb312[60]](_0x8d59x1a[_0xb312[33]])};break;case _0xb312[63]:_[_0xb312[62]](faxaccounts,{id:_0x8d59x1a[_0xb312[33]][_0xb312[55]]});break;default:}});FaxAccount[_0xb312[68]]()[_0xb312[67]](function(_0x8d59x1f){faxaccounts= _0x8d59x1f})[_0xb312[66]](function(_0x8d59x1e){console[_0xb312[65]](_0x8d59x1e)})}function webhook(_0x8d59x18,_0x8d59x1b,_0x8d59x21){var _0x8d59x22=_0x8d59x1b;switch(_0x8d59x21){case _0xb312[45]:if(_0x8d59x22[_0xb312[69]]&& _0x8d59x22[_0xb312[70]]){console[_0xb312[22]](_0xb312[71]+ _0x8d59x22[_0xb312[57]]+ _0xb312[72]);execRequest(_0x8d59x18[_0xb312[73]]|| _0x8d59x18,_0x8d59x22[_0xb312[69]],_0x8d59x22[_0xb312[70]])};if(_0x8d59x22[_0xb312[75]][_0xb312[74]]){_[_0xb312[78]](_0x8d59x22[_0xb312[75]],function(_0x8d59x23){if(_0x8d59x23[_0xb312[76]]){Util[_0xb312[77]](_0x8d59x23,_0x8d59x18)}})};break;case _0xb312[47]:if(_0x8d59x22[_0xb312[79]]&& _0x8d59x22[_0xb312[80]]){console[_0xb312[22]](_0xb312[71]+ _0x8d59x22[_0xb312[57]]+ _0xb312[81]);execRequest(_0x8d59x18[_0xb312[73]]|| _0x8d59x18,_0x8d59x22[_0xb312[79]],_0x8d59x22[_0xb312[80]])};break;case _0xb312[51]:if(_0x8d59x22[_0xb312[82]]&& _0x8d59x22[_0xb312[83]]){console[_0xb312[22]](_0xb312[71]+ _0x8d59x22[_0xb312[57]]+ _0xb312[84]);execRequest(_0x8d59x18[_0xb312[73]]|| _0x8d59x18,_0x8d59x22[_0xb312[82]],_0x8d59x22[_0xb312[83]])};break;default:console[_0xb312[22]](_0xb312[85])}}function execRequest(_0x8d59x18,_0x8d59x25,_0x8d59x26){return Util[_0xb312[88]](_0x8d59x18,_0x8d59x25,_0x8d59x26)[_0xb312[67]](function(_0x8d59x27){console[_0xb312[22]](_0xb312[87])})[_0xb312[66]](function(_0x8d59x1e){console[_0xb312[22]](_0xb312[86])})}Fax[_0xb312[90]][_0xb312[89]]= function(_0x8d59x28){return FaxMessage[_0xb312[97]]({where:{channel:_0x8d59x28[_0xb312[96]]}})[_0xb312[67]](function(_0x8d59x2a){if(!_0x8d59x2a){throw  new Error(_0xb312[93])};return _0x8d59x2a[_0xb312[95]]({error:_0x8d59x28[_0xb312[94]]})})[_0xb312[67]](function(_0x8d59x29){io[_0xb312[24]](_0xb312[92],_0x8d59x29)})[_0xb312[66]](function(_0x8d59x1e){console[_0xb312[65]](_0xb312[91],_0x8d59x1e)})};Fax[_0xb312[90]][_0xb312[98]]= function(_0x8d59x28){return FaxMessage[_0xb312[97]]({where:{filename:_0x8d59x28[_0xb312[115]],localstationid:_0x8d59x28[_0xb312[116]]}})[_0xb312[67]](function(_0x8d59x2a){if(!_0x8d59x2a){throw  new Error(_0xb312[93])};return _0x8d59x2a[_0xb312[95]]({channel:_0x8d59x28[_0xb312[96]],channelstate:_0x8d59x28[_0xb312[103]],channelstatedesc:_0x8d59x28[_0xb312[104]],calleridnum:_0x8d59x28[_0xb312[105]],calleridname:_0x8d59x28[_0xb312[106]],connectedlinenum:_0x8d59x28[_0xb312[107]],connectedlinename:_0x8d59x28[_0xb312[108]],accountcode:_0x8d59x28[_0xb312[109]],context:_0x8d59x28[_0xb312[110]],exten:_0x8d59x28[_0xb312[111]],priority:_0x8d59x28[_0xb312[112]],uniqueid:_0x8d59x28[_0xb312[113]],linkedid:_0x8d59x28[_0xb312[114]],lastStatus:_0x8d59x28[_0xb312[37]]})})[_0xb312[67]](function(_0x8d59x29){io[_0xb312[24]](_0xb312[92],_0x8d59x29)})[_0xb312[66]](function(_0x8d59x1e){console[_0xb312[65]](_0xb312[99],_0x8d59x1e);console[_0xb312[65]](_0xb312[100],_0x8d59x1e[_0xb312[32]]);console[_0xb312[65]](_0xb312[101],_0x8d59x1e[_0xb312[102]])})};Fax[_0xb312[90]][_0xb312[117]]= function(_0x8d59x28){var _0x8d59x2b;return FaxMessage[_0xb312[97]]({where:{filename:_0x8d59x28[_0xb312[115]],localstationid:_0x8d59x28[_0xb312[116]]}})[_0xb312[67]](function(_0x8d59x2a){if(!_0x8d59x2a){throw  new Error(_0xb312[93])};_0x8d59x2b= _0x8d59x2a;var _0x8d59x2e=_0xb312[122];if(_0x8d59x28[_0xb312[125]]== _0xb312[126]){_0x8d59x2e= _0xb312[127]};return _0x8d59x2b[_0xb312[95]]({remotestationid:_0x8d59x28[_0xb312[128]],pagestransferred:_0x8d59x28[_0xb312[125]],resolution:_0x8d59x28[_0xb312[129]],transferrate:_0x8d59x28[_0xb312[130]],status:_0x8d59x2e})})[_0xb312[67]](function(_0x8d59x29){io[_0xb312[24]](_0xb312[92],_0x8d59x29);console[_0xb312[22]](_0xb312[123],_0x8d59x29[_0xb312[55]]);return _0x8d59x2b[_0xb312[124]]()})[_0xb312[67]](function(_0x8d59x2d){if(!_0x8d59x2d){throw  new Error(_0xb312[121])};return _0x8d59x2d[_0xb312[95]]({lastEvent:_0xb312[122]},{individualHooks:true})})[_0xb312[67]](function(_0x8d59x2c){console[_0xb312[22]](_0xb312[119],_0x8d59x2c[_0xb312[55]]);io[_0xb312[24]](_0xb312[120],_0x8d59x2c)})[_0xb312[66]](function(_0x8d59x1e){console[_0xb312[65]](_0xb312[118],_0x8d59x1e);console[_0xb312[65]](_0xb312[100],_0x8d59x1e[_0xb312[32]]);console[_0xb312[65]](_0xb312[101],_0x8d59x1e[_0xb312[102]])})};Fax[_0xb312[90]][_0xb312[131]]= function(_0x8d59x28){console[_0xb312[22]](util[_0xb312[27]](_0xb312[132],_0x8d59x28[_0xb312[105]]));var _0x8d59x2f=_[_0xb312[133]](_0x8d59x28);var _0x8d59x30;var _0x8d59x2b,_0x8d59x31;return FaxAccount[_0xb312[97]]({where:{localstationid:_0x8d59x28[_0xb312[116]]}})[_0xb312[67]](function(_0x8d59x39){if(!_0x8d59x39){throw  new Error(_0xb312[169])};console[_0xb312[22]](_0xb312[170],_0x8d59x28[_0xb312[116]]);_0x8d59x30= _0x8d59x39;if(_0x8d59x30[_0xb312[171]]){return Contact[_0xb312[172]]({where:{ListId:_0x8d59x30[_0xb312[171]],$or:[{phone:_0x8d59x28[_0xb312[105]]},{fax:_0x8d59x28[_0xb312[105]]}]},defaults:{phone:_0x8d59x28[_0xb312[105]],fax:_0x8d59x28[_0xb312[105]],firstName:_0x8d59x28[_0xb312[105]],ListId:_0x8d59x30[_0xb312[171]]}})}else {return []}})[_0xb312[168]](function(_0x8d59x37,_0x8d59x38){if(_0x8d59x38!= undefined&&  !_0x8d59x38){return _0x8d59x37[_0xb312[95]]({fax:_0x8d59x28[_0xb312[105]]})};return})[_0xb312[67]](function(){return FaxRoom[_0xb312[68]]({limit:1,where:{contact:_0x8d59x2f[_0xb312[105]],FaxAccountId:_0x8d59x30[_0xb312[55]],status:{$ne:_0xb312[50]}},order:[[_0xb312[166],_0xb312[167]]]})})[_0xb312[67]](function(_0x8d59x2c){if(_0x8d59x2c[_0xb312[74]]){_0x8d59x2c= _[_0xb312[160]](_0x8d59x2c);return _0x8d59x2c[_0xb312[95]]({lastEvent:_0xb312[159],lastEventAt:moment()[_0xb312[27]](_0xb312[161]),status:_0xb312[162],openReason:_0xb312[163],faxIn:++_0x8d59x2c[_0xb312[164]]})}else {return FaxRoom[_0xb312[155]]({contact:_0x8d59x2f[_0xb312[105]],account:_0x8d59x30[_0xb312[57]],status:_0xb312[165],lastEvent:_0xb312[159],lastEventAt:moment()[_0xb312[27]](_0xb312[161]),FaxAccountId:_0x8d59x30[_0xb312[55]],faxIn:1})}})[_0xb312[67]](function(_0x8d59x2c){if(!_0x8d59x2c){throw  new Error(_0xb312[156])};console[_0xb312[22]](_0xb312[157],_0x8d59x2c[_0xb312[55]]);io[_0xb312[24]](_0xb312[120],_0x8d59x2c);_0x8d59x31= _0x8d59x2c;_0x8d59x2f[_0xb312[158]]= _0x8d59x2c[_0xb312[55]];_0x8d59x2f[_0xb312[37]]= _0xb312[159];_0x8d59x2f[_0xb312[140]]= _0x8d59x2f[_0xb312[105]];_0x8d59x2f[_0xb312[28]]= _0x8d59x2f[_0xb312[116]];return FaxMessage[_0xb312[155]](_0x8d59x2f)})[_0xb312[67]](function(_0x8d59x29){if(!_0x8d59x29){throw  new Error(_0xb312[146])};_0x8d59x2b= _0x8d59x29;io[_0xb312[24]](_0xb312[92],_0x8d59x29);console[_0xb312[22]](_0xb312[100],_0x8d59x29[_0xb312[55]]);var _0x8d59x34=[];var _0x8d59x35=path[_0xb312[147]](_0x8d59x28[_0xb312[115]])[_0xb312[57]];var _0x8d59x36=_0x8d59x35+ _0xb312[148];return FaxAttachment[_0xb312[155]]({path:path[_0xb312[154]](config[_0xb312[149]],_0xb312[150],_0xb312[151],_0xb312[137],_0xb312[152],_0xb312[153],_0x8d59x36),basename:_0x8d59x36,name:_0x8d59x35,FaxMessageId:_0x8d59x29[_0xb312[55]]})})[_0xb312[67]](function(_0x8d59x33){if(!_0x8d59x33){throw  new Error(_0xb312[142])};console[_0xb312[22]](_0xb312[143],_0x8d59x33[_0xb312[55]]);return exec(_0xb312[144]+ _0x8d59x33[_0xb312[3]]+ _0xb312[145]+ _0x8d59x28[_0xb312[115]])})[_0xb312[67]](function(){console[_0xb312[22]](_0xb312[135]);var _0x8d59x32={type:_0xb312[136],doc:{channel:_0xb312[137],uniqueid:util[_0xb312[27]](_0xb312[138],moment()[_0xb312[139]](),_0x8d59x31[_0xb312[55]]),messageid:_0x8d59x2b[_0xb312[55]],roomid:_0x8d59x31[_0xb312[55]],accountid:_0x8d59x30[_0xb312[55]],accountname:_0x8d59x30[_0xb312[57]],accountphone:_0x8d59x30[_0xb312[116]],from:_0x8d59x2b[_0xb312[140]]}};process[_0xb312[141]](_0x8d59x32)})[_0xb312[66]](function(_0x8d59x1e){console[_0xb312[65]](_0xb312[134],_0x8d59x1e);console[_0xb312[65]](_0xb312[100],_0x8d59x1e[_0xb312[32]]);console[_0xb312[65]](_0xb312[101],_0x8d59x1e[_0xb312[102]])})};function sendfax(_0x8d59x29,_0x8d59x16,_0x8d59x3b,_0x8d59x3c,io){if(_0x8d59x29[_0xb312[37]]=== _0xb312[39]){var _0x8d59x31;var _0x8d59x2b=_0x8d59x29;var _0x8d59x3d=_0x8d59x29[_0xb312[140]];var _0x8d59x3e=_0x8d59x29[_0xb312[28]];var _0x8d59x3f;var _0x8d59x40;var _0x8d59x41,_0x8d59x42;return FaxAccount[_0xb312[97]]({where:{localstationid:_0x8d59x2b[_0xb312[140]]}})[_0xb312[67]](function(_0x8d59x39){if(!_0x8d59x39){throw  new Error(_0xb312[169])};console[_0xb312[22]](_0xb312[170],_0x8d59x39[_0xb312[116]]);_0x8d59x3f= _[_0xb312[133]](_0x8d59x39[_0xb312[73]]);return Trunk[_0xb312[97]]({where:{name:_0x8d59x3f[_0xb312[212]]},attributes:[_0xb312[57]]})})[_0xb312[67]](function(_0x8d59x44){if(!_0x8d59x44){throw  new Error(_0xb312[210])};console[_0xb312[22]](_0xb312[211],_0x8d59x44[_0xb312[57]]);_0x8d59x40= _[_0xb312[133]](_0x8d59x44[_0xb312[73]]);return})[_0xb312[67]](function(){return [_0x8d59x3f,_0x8d59x2b]})[_0xb312[168]](getFaxRoom())[_0xb312[67]](function(_0x8d59x2d){if(!_0x8d59x2d){throw  new Error(_0xb312[121])};console[_0xb312[22]](_0xb312[157],_0x8d59x2d[_0xb312[55]]);_0x8d59x31= _0x8d59x2d;return _0x8d59x31[_0xb312[209]](_0x8d59x2b[_0xb312[55]])})[_0xb312[67]](function(){return _0x8d59x31[_0xb312[95]]({status:_0xb312[206],lastEvent:_0xb312[39],lastEventAt:moment()[_0xb312[27]](_0xb312[161]),faxOut:++_0x8d59x31[_0xb312[207]]},{individualHooks:true,user:_0x8d59x3c[_0xb312[208]]})})[_0xb312[67]](function(_0x8d59x1a){console[_0xb312[22]](_0xb312[204],_0x8d59x1a[_0xb312[55]]);io[_0xb312[24]](_0xb312[120],_0x8d59x1a);return _0x8d59x31[_0xb312[205]](_0x8d59x2b.UserId)})[_0xb312[67]](function(){return User[_0xb312[203]](_0x8d59x2b.UserId)})[_0xb312[67]](function(){if(_0x8d59x3f[_0xb312[171]]){return Contact[_0xb312[172]]({where:{ListId:_0x8d59x3f[_0xb312[171]],$or:[{phone:_0x8d59x3e},{fax:_0x8d59x3e}]},defaults:{fax:_0x8d59x3e,phone:_0x8d59x3e,firstName:_0x8d59x3e,ListId:_0x8d59x3f[_0xb312[171]]}})}else {return []}})[_0xb312[168]](function(_0x8d59x37,_0x8d59x38){if(_0x8d59x38!= undefined&&  !_0x8d59x38){return _0x8d59x37[_0xb312[95]]({fax:_0x8d59x3e})};return})[_0xb312[67]](function(){_0x8d59x41= _0x8d59x2b[_0xb312[194]][0][_0xb312[3]];if(_0x8d59x2b[_0xb312[194]][0][_0xb312[195]]=== _0xb312[196]){_0x8d59x42= path[_0xb312[154]](config[_0xb312[149]],_0xb312[150],_0xb312[151],_0xb312[137],_0xb312[197],_0xb312[153],_0xb312[198],path[_0xb312[147]](_0x8d59x41)[_0xb312[57]]+ _0xb312[199]);return exec(_0xb312[200]+ _0x8d59x42+ _0xb312[145]+ _0x8d59x41)}else {_0x8d59x42= path[_0xb312[154]](config[_0xb312[149]],_0xb312[150],_0xb312[151],_0xb312[137],_0xb312[197],_0xb312[153],_0xb312[198],path[_0xb312[147]](_0x8d59x41)[_0xb312[201]]);fse[_0xb312[202]](_0x8d59x41,_0x8d59x42);return}})[_0xb312[67]](function(){fs[_0xb312[192]](_0x8d59x42,511);console[_0xb312[22]](_0xb312[193]);return FaxMessage[_0xb312[175]]({filename:_0x8d59x42,localstationid:_0x8d59x2b[_0xb312[140]],retry:_0x8d59x3b},{where:{id:_0x8d59x2b[_0xb312[55]]}})})[_0xb312[67]](function(_0x8d59x29){if(_0x8d59x29){io[_0xb312[24]](_0xb312[92],_0x8d59x29)};return Promise[_0xb312[191]](_0x8d59x16[_0xb312[190]])({action:_0xb312[177],channel:util[_0xb312[27]](_0xb312[178],_0x8d59x3f[_0xb312[179]],_0x8d59x40[_0xb312[57]],_0x8d59x3e),exten:_0x8d59x3e,context:_0xb312[180],priority:1,callerid:util[_0xb312[27]](_0xb312[181],_0x8d59x3f[_0xb312[116]],_0x8d59x3f[_0xb312[116]]),variable:{FAXNAME:_0x8d59x3f[_0xb312[57]],FAXNUMBER:_0x8d59x3e,FAXECM:_0x8d59x3f[_0xb312[182]],FAXHEADERINFO:_0x8d59x3f[_0xb312[183]],FAXLOCALSTATIONID:_0x8d59x3f[_0xb312[116]],FAXMINRATE:_0x8d59x3f[_0xb312[184]],FAXMAXRATE:_0x8d59x3f[_0xb312[185]],FAXMODEM:util[_0xb312[27]](_0xb312[186],_0x8d59x3f[_0xb312[187]]),FAXGATEWAY:_0x8d59x3f[_0xb312[188]],FAXT38TIMEOUT:_0x8d59x3f[_0xb312[189]],FAXOUTFILE:_0x8d59x42},account:_0x8d59x3f[_0xb312[116]]})})[_0xb312[67]](function(_0x8d59x43){console[_0xb312[22]](_0xb312[176]);console[_0xb312[22]](_0x8d59x43)})[_0xb312[66]](function(_0x8d59x1e){console[_0xb312[65]](_0xb312[173],_0x8d59x1e);console[_0xb312[65]](_0xb312[100],_0x8d59x1e[_0xb312[32]]);console[_0xb312[65]](_0xb312[101],_0x8d59x1e[_0xb312[102]]);return FaxMessage[_0xb312[175]]({status:_0xb312[127]},{where:{id:_0x8d59x2b[_0xb312[55]]}})[_0xb312[67]](function(_0x8d59x1a){io[_0xb312[24]](_0xb312[92],_0x8d59x1a);if(_0x8d59x31){return _0x8d59x31[_0xb312[95]]({lastEvent:_0xb312[127]})};return})[_0xb312[67]](function(_0x8d59x1a){if(_0x8d59x1a){io[_0xb312[24]](_0xb312[120],_0x8d59x1a)}})[_0xb312[66]](function(_0x8d59x1e){console[_0xb312[65]](_0xb312[174],_0x8d59x1e);console[_0xb312[65]](_0xb312[100],_0x8d59x1e[_0xb312[32]]);console[_0xb312[65]](_0xb312[101],_0x8d59x1e[_0xb312[102]])})})}}function getFaxRoom(){return function(_0x8d59x1b,_0x8d59x2a){if(_0x8d59x2a[_0xb312[158]]){return FaxRoom[_0xb312[203]](_0x8d59x2a.FaxRoomId)}else {return FaxRoom[_0xb312[68]]({limit:1,where:{contact:_0x8d59x2a[_0xb312[28]],FaxAccountId:_0x8d59x1b[_0xb312[55]]},order:[[_0xb312[166],_0xb312[167]]]})[_0xb312[67]](function(_0x8d59x46){var _0x8d59x2c=_[_0xb312[160]](_0x8d59x46);if(!_0x8d59x2c|| _0x8d59x2c[_0xb312[37]]=== _0xb312[50]){return FaxRoom[_0xb312[155]]({contact:_0x8d59x2a[_0xb312[28]],account:_0x8d59x1b[_0xb312[57]],status:_0xb312[206],FaxAccountId:_0x8d59x1b[_0xb312[55]]})}else {return _0x8d59x2c}})}}}module[_0xb312[213]]= Fax
\ No newline at end of file
diff --git a/server/config/ami/index.js b/server/config/ami/index.js
index 647fab6..26e9bb2 100644
--- a/server/config/ami/index.js
+++ b/server/config/ami/index.js
@@ -1,254 +1 @@
-'use strict';
-
-const path = require('path');
-const cp = require('child_process');
-const _ = require('lodash');
-const util = require('util');
-
-const config = require('../environment');
-const User = require('../../models').User;
-const Trunk = require('../../models').Trunk;
-const Action = require('../../models').Action;
-const ReportMember = require('../../models').ReportMember;
-const FaxMessage = require('../../models').FaxMessage;
-const ReportFax = require('../../models').ReportFax;
-const FaxRoom = require('../../models').FaxRoom;
-const FaxAccount = require('../../models').FaxAccount;
-const VoiceContext = require('../../models').VoiceContext;
-const Network = require('../../models').Network;
-const VoiceQueue = require('../../models').VoiceQueue;
-const Scheduler = require('../routing/scheduler');
-
-var cpAmi = cp.fork(path.join(__dirname, 'ami'));
-
-cpAmi.on('message', function(data) {
-    switch (data.type) {
-      case 'initFaxScheduler':
-        handleInitFaxScheduler(data.doc);
-        break;
-      default:
-    }
-  })
-  .on('close', function(code) {
-    console.log(util.format('AMI SERVICE EXITED WITH CODE %s', code));
-  })
-  .on('error', function(err) {
-    console.error(util.format('ERROR ON AMI SERVICE', err.message));
-  });
-
-VoiceContext.beforeUpdate(function(doc, options) {
-  // doc.dataValues.evt = 'VoiceContext.beforeUpdate';
-  // doc.dataValues.changed = _.keyBy(doc.changed());
-  // cpAmi.send(doc.dataValues);
-  if (doc.changed('name')) {
-    throw new Error("You can't modify a context name");
-  }
-  if (doc.defaultEntry) {
-    throw new Error("You can't modify a default context");
-  }
-});
-
-VoiceContext.beforeDestroy(function(doc, options) {
-  // doc.dataValues.evt = 'VoiceContext.beforeDestroy';
-  // cpAmi.send(doc.dataValues);
-  if (doc.defaultEntry) {
-    throw new Error("You can't delete a default context");
-  }
-});
-
-VoiceContext.afterCreate(function(doc, options) {
-  doc.dataValues.evt = 'VoiceContext.afterCreate';
-  cpAmi.send(doc.dataValues);
-});
-
-User.afterUpdate(function(doc, options) {
-  if (_.includes(['agent', 'telephone'], doc.role)) {
-    doc.dataValues.evt = 'User.afterUpdate';
-    cpAmi.send(doc.dataValues);
-  }
-});
-
-VoiceContext.afterDestroy(function(doc, options) {
-  doc.dataValues.evt = 'VoiceContext.afterDestroy';
-  cpAmi.send(doc.dataValues);
-});
-
-Trunk.afterCreate(function(doc, options) {
-  doc.dataValues.evt = 'Trunk.afterCreate';
-  cpAmi.send(doc.dataValues);
-});
-
-Trunk.afterUpdate(function(doc, options) {
-  doc.dataValues.evt = 'Trunk.afterUpdate';
-  doc.dataValues.changed = _.keyBy(doc.changed());
-  cpAmi.send(doc.dataValues);
-});
-
-Trunk.afterDestroy(function(doc, options) {
-  doc.dataValues.evt = 'Trunk.afterDestroy';
-  cpAmi.send(doc.dataValues);
-});
-
-Action.afterCreate(function(doc, options) {
-  doc.dataValues.evt = 'Action.afterCreate';
-  doc.dataValues.options = {
-    body: options.body || null
-  };
-
-  cpAmi.send(doc.dataValues);
-});
-
-ReportMember.afterCreate(function(doc, options) {
-  doc.dataValues.evt = 'ReportMember.beforeCreate';
-  cpAmi.send(doc.dataValues);
-});
-
-/*
-  Hooks for Fax service
-*/
-
-FaxMessage.afterCreate(function(doc, options) {
-  var data = {
-    message: 'FaxMessage.afterCreate',
-    doc: doc.dataValues,
-    options: {
-      user: options.user || null
-    }
-  };
-  cpAmi.send(data);
-});
-
-FaxMessage.afterUpdate(function(doc, options) {
-  var data = {
-    message: 'FaxMessage.afterUpdate',
-    doc: doc.dataValues,
-    options: {
-      user: options.user || null,
-      changed: doc.changed()
-    }
-  };
-  cpAmi.send(data);
-});
-
-ReportFax.afterUpdate(function(doc, options) {
-  var data = {
-    message: 'ReportFax.afterUpdate',
-    doc: doc.dataValues,
-    options: {
-      user: options.user || null,
-      changed: doc.changed()
-    }
-  };
-  cpAmi.send(data);
-});
-
-FaxRoom.afterUpdate(function(doc, options) {
-  var data = {
-    message: 'FaxRoom.afterUpdate',
-    doc: doc.dataValues,
-    options: {
-      user: options.user || null,
-      changed: doc.changed()
-    }
-  };
-  cpAmi.send(data);
-});
-
-FaxAccount.afterCreate(function(doc, options) {
-  var data = {
-    message: 'FaxAccount.afterCreate',
-    doc: doc.dataValues,
-    options: {
-      user: options.user || null
-    }
-  };
-  cpAmi.send(data);
-});
-
-FaxAccount.afterUpdate(function(doc, options) {
-  var data = {
-    message: 'FaxAccount.afterUpdate',
-    doc: doc.dataValues,
-    options: {
-      user: options.user || null,
-      changed: doc.changed()
-    }
-  };
-  cpAmi.send(data);
-});
-
-FaxAccount.afterDestroy(function(doc, options) {
-  var data = {
-    message: 'FaxAccount.afterDestroy',
-    doc: doc.dataValues,
-    options: {
-      user: options.user || null
-    }
-  };
-  cpAmi.send(data);
-});
-
-function handleInitFaxScheduler(data) {
-  var scheduler = new Scheduler(data);
-  scheduler.init();
-}
-
-/*
-  Hooks for Extenrip and Localnet
-*/
-
-Network.afterCreate(function(doc, options) {
-  doc.dataValues.evt = 'Network.afterCreate';
-  cpAmi.send(doc.dataValues);
-});
-
-Network.afterUpdate(function(doc, options) {
-  doc.dataValues.evt = 'Network.afterUpdate';
-  doc.dataValues.changed = _.keyBy(doc.changed());
-  cpAmi.send(doc.dataValues);
-});
-
-Network.afterDestroy(function(doc, options) {
-  doc.dataValues.evt = 'Network.afterDestroy';
-  cpAmi.send(doc.dataValues);
-});
-
-VoiceQueue.afterCreate(function(doc, options) {
-  doc.dataValues.evt = 'VoiceQueue.afterCreate';
-  cpAmi.send(doc.dataValues);
-});
-
-VoiceQueue.afterUpdate(function(doc, options) {
-  doc.dataValues.evt = 'VoiceQueue.afterUpdate';
-  doc.dataValues.changed = _.keyBy(doc.changed());
-  cpAmi.send(doc.dataValues);
-});
-
-VoiceQueue.afterDestroy(function(doc, options) {
-  doc.dataValues.evt = 'VoiceQueue.afterDestroy';
-  cpAmi.send(doc.dataValues);
-});
-
-User.afterCreate(function(doc, options) {
-  if (doc.role === 'agent') {
-    doc.dataValues.evt = 'Agent.afterCreate';
-    cpAmi.send(doc.dataValues);
-  }
-});
-
-User.afterUpdate(function(doc, options) {
-  if (doc.role === 'agent' || doc.role === 'telephone') {
-    doc.dataValues.evt = 'Agent.afterUpdate';
-    doc.dataValues.changed = _.keyBy(doc.changed());
-    cpAmi.send(doc.dataValues);
-  }
-});
-
-User.afterDestroy(function(doc, options) {
-  if (doc.role === 'agent' || doc.role === 'telephone') {
-    doc.dataValues.evt = 'Agent.afterDestroy';
-    cpAmi.send(doc.dataValues);
-  }
-});
-
-module.exports = cpAmi;
+var _0x9add=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x70\x61\x74\x68","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x72\x75\x6E\x6B","\x41\x63\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x4E\x65\x74\x77\x6F\x72\x6B","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x72\x6F\x75\x74\x69\x6E\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x61\x6D\x69","\x6A\x6F\x69\x6E","\x66\x6F\x72\x6B","\x65\x72\x72\x6F\x72","\x45\x52\x52\x4F\x52\x20\x4F\x4E\x20\x41\x4D\x49\x20\x53\x45\x52\x56\x49\x43\x45","\x6D\x65\x73\x73\x61\x67\x65","\x66\x6F\x72\x6D\x61\x74","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x41\x4D\x49\x20\x53\x45\x52\x56\x49\x43\x45\x20\x45\x58\x49\x54\x45\x44\x20\x57\x49\x54\x48\x20\x43\x4F\x44\x45\x20\x25\x73","\x6C\x6F\x67","\x64\x6F\x63","\x69\x6E\x69\x74\x46\x61\x78\x53\x63\x68\x65\x64\x75\x6C\x65\x72","\x74\x79\x70\x65","\x6E\x61\x6D\x65","\x63\x68\x61\x6E\x67\x65\x64","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x6D\x6F\x64\x69\x66\x79\x20\x61\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x6E\x61\x6D\x65","\x64\x65\x66\x61\x75\x6C\x74\x45\x6E\x74\x72\x79","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x6D\x6F\x64\x69\x66\x79\x20\x61\x20\x64\x65\x66\x61\x75\x6C\x74\x20\x63\x6F\x6E\x74\x65\x78\x74","\x62\x65\x66\x6F\x72\x65\x55\x70\x64\x61\x74\x65","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x64\x65\x6C\x65\x74\x65\x20\x61\x20\x64\x65\x66\x61\x75\x6C\x74\x20\x63\x6F\x6E\x74\x65\x78\x74","\x62\x65\x66\x6F\x72\x65\x44\x65\x73\x74\x72\x6F\x79","\x65\x76\x74","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x72\x6F\x6C\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x55\x73\x65\x72\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x54\x72\x75\x6E\x6B\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x54\x72\x75\x6E\x6B\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x6B\x65\x79\x42\x79","\x54\x72\x75\x6E\x6B\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x41\x63\x74\x69\x6F\x6E\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x62\x6F\x64\x79","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x2E\x62\x65\x66\x6F\x72\x65\x43\x72\x65\x61\x74\x65","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x75\x73\x65\x72","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x46\x61\x78\x52\x6F\x6F\x6D\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x69\x6E\x69\x74","\x4E\x65\x74\x77\x6F\x72\x6B\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x4E\x65\x74\x77\x6F\x72\x6B\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x4E\x65\x74\x77\x6F\x72\x6B\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x9add[0];const path=require(_0x9add[1]);const cp=require(_0x9add[2]);const _=require(_0x9add[3]);const util=require(_0x9add[4]);const config=require(_0x9add[5]);const User=require(_0x9add[7])[_0x9add[6]];const Trunk=require(_0x9add[7])[_0x9add[8]];const Action=require(_0x9add[7])[_0x9add[9]];const ReportMember=require(_0x9add[7])[_0x9add[10]];const FaxMessage=require(_0x9add[7])[_0x9add[11]];const ReportFax=require(_0x9add[7])[_0x9add[12]];const FaxRoom=require(_0x9add[7])[_0x9add[13]];const FaxAccount=require(_0x9add[7])[_0x9add[14]];const VoiceContext=require(_0x9add[7])[_0x9add[15]];const Network=require(_0x9add[7])[_0x9add[16]];const VoiceQueue=require(_0x9add[7])[_0x9add[17]];const Scheduler=require(_0x9add[18]);var cpAmi=cp[_0x9add[21]](path[_0x9add[20]](__dirname,_0x9add[19]));cpAmi[_0x9add[26]](_0x9add[24],function(_0xb5ecx15){switch(_0xb5ecx15[_0x9add[32]]){case _0x9add[31]:handleInitFaxScheduler(_0xb5ecx15[_0x9add[30]]);break;default:}})[_0x9add[26]](_0x9add[27],function(_0xb5ecx14){console[_0x9add[29]](util[_0x9add[25]](_0x9add[28],_0xb5ecx14))})[_0x9add[26]](_0x9add[22],function(_0xb5ecx13){console[_0x9add[22]](util[_0x9add[25]](_0x9add[23],_0xb5ecx13[_0x9add[24]]))});VoiceContext[_0x9add[38]](function(_0xb5ecx16,_0xb5ecx17){if(_0xb5ecx16[_0x9add[34]](_0x9add[33])){throw  new Error(_0x9add[35])};if(_0xb5ecx16[_0x9add[36]]){throw  new Error(_0x9add[37])}});VoiceContext[_0x9add[40]](function(_0xb5ecx16,_0xb5ecx17){if(_0xb5ecx16[_0x9add[36]]){throw  new Error(_0x9add[39])}});VoiceContext[_0x9add[45]](function(_0xb5ecx16,_0xb5ecx17){_0xb5ecx16[_0x9add[42]][_0x9add[41]]= _0x9add[43];cpAmi[_0x9add[44]](_0xb5ecx16[_0x9add[42]])});User[_0x9add[51]](function(_0xb5ecx16,_0xb5ecx17){if(_[_0x9add[49]]([_0x9add[46],_0x9add[47]],_0xb5ecx16[_0x9add[48]])){_0xb5ecx16[_0x9add[42]][_0x9add[41]]= _0x9add[50];cpAmi[_0x9add[44]](_0xb5ecx16[_0x9add[42]])}});VoiceContext[_0x9add[53]](function(_0xb5ecx16,_0xb5ecx17){_0xb5ecx16[_0x9add[42]][_0x9add[41]]= _0x9add[52];cpAmi[_0x9add[44]](_0xb5ecx16[_0x9add[42]])});Trunk[_0x9add[45]](function(_0xb5ecx16,_0xb5ecx17){_0xb5ecx16[_0x9add[42]][_0x9add[41]]= _0x9add[54];cpAmi[_0x9add[44]](_0xb5ecx16[_0x9add[42]])});Trunk[_0x9add[51]](function(_0xb5ecx16,_0xb5ecx17){_0xb5ecx16[_0x9add[42]][_0x9add[41]]= _0x9add[55];_0xb5ecx16[_0x9add[42]][_0x9add[34]]= _[_0x9add[56]](_0xb5ecx16[_0x9add[34]]());cpAmi[_0x9add[44]](_0xb5ecx16[_0x9add[42]])});Trunk[_0x9add[53]](function(_0xb5ecx16,_0xb5ecx17){_0xb5ecx16[_0x9add[42]][_0x9add[41]]= _0x9add[57];cpAmi[_0x9add[44]](_0xb5ecx16[_0x9add[42]])});Action[_0x9add[45]](function(_0xb5ecx16,_0xb5ecx17){_0xb5ecx16[_0x9add[42]][_0x9add[41]]= _0x9add[58];_0xb5ecx16[_0x9add[42]][_0x9add[59]]= {body:_0xb5ecx17[_0x9add[60]]|| null};cpAmi[_0x9add[44]](_0xb5ecx16[_0x9add[42]])});ReportMember[_0x9add[45]](function(_0xb5ecx16,_0xb5ecx17){_0xb5ecx16[_0x9add[42]][_0x9add[41]]= _0x9add[61];cpAmi[_0x9add[44]](_0xb5ecx16[_0x9add[42]])});FaxMessage[_0x9add[45]](function(_0xb5ecx16,_0xb5ecx17){var _0xb5ecx15={message:_0x9add[62],doc:_0xb5ecx16[_0x9add[42]],options:{user:_0xb5ecx17[_0x9add[63]]|| null}};cpAmi[_0x9add[44]](_0xb5ecx15)});FaxMessage[_0x9add[51]](function(_0xb5ecx16,_0xb5ecx17){var _0xb5ecx15={message:_0x9add[64],doc:_0xb5ecx16[_0x9add[42]],options:{user:_0xb5ecx17[_0x9add[63]]|| null,changed:_0xb5ecx16[_0x9add[34]]()}};cpAmi[_0x9add[44]](_0xb5ecx15)});ReportFax[_0x9add[51]](function(_0xb5ecx16,_0xb5ecx17){var _0xb5ecx15={message:_0x9add[65],doc:_0xb5ecx16[_0x9add[42]],options:{user:_0xb5ecx17[_0x9add[63]]|| null,changed:_0xb5ecx16[_0x9add[34]]()}};cpAmi[_0x9add[44]](_0xb5ecx15)});FaxRoom[_0x9add[51]](function(_0xb5ecx16,_0xb5ecx17){var _0xb5ecx15={message:_0x9add[66],doc:_0xb5ecx16[_0x9add[42]],options:{user:_0xb5ecx17[_0x9add[63]]|| null,changed:_0xb5ecx16[_0x9add[34]]()}};cpAmi[_0x9add[44]](_0xb5ecx15)});FaxAccount[_0x9add[45]](function(_0xb5ecx16,_0xb5ecx17){var _0xb5ecx15={message:_0x9add[67],doc:_0xb5ecx16[_0x9add[42]],options:{user:_0xb5ecx17[_0x9add[63]]|| null}};cpAmi[_0x9add[44]](_0xb5ecx15)});FaxAccount[_0x9add[51]](function(_0xb5ecx16,_0xb5ecx17){var _0xb5ecx15={message:_0x9add[68],doc:_0xb5ecx16[_0x9add[42]],options:{user:_0xb5ecx17[_0x9add[63]]|| null,changed:_0xb5ecx16[_0x9add[34]]()}};cpAmi[_0x9add[44]](_0xb5ecx15)});FaxAccount[_0x9add[53]](function(_0xb5ecx16,_0xb5ecx17){var _0xb5ecx15={message:_0x9add[69],doc:_0xb5ecx16[_0x9add[42]],options:{user:_0xb5ecx17[_0x9add[63]]|| null}};cpAmi[_0x9add[44]](_0xb5ecx15)});function handleInitFaxScheduler(_0xb5ecx15){var _0xb5ecx19= new Scheduler(_0xb5ecx15);_0xb5ecx19[_0x9add[70]]()}Network[_0x9add[45]](function(_0xb5ecx16,_0xb5ecx17){_0xb5ecx16[_0x9add[42]][_0x9add[41]]= _0x9add[71];cpAmi[_0x9add[44]](_0xb5ecx16[_0x9add[42]])});Network[_0x9add[51]](function(_0xb5ecx16,_0xb5ecx17){_0xb5ecx16[_0x9add[42]][_0x9add[41]]= _0x9add[72];_0xb5ecx16[_0x9add[42]][_0x9add[34]]= _[_0x9add[56]](_0xb5ecx16[_0x9add[34]]());cpAmi[_0x9add[44]](_0xb5ecx16[_0x9add[42]])});Network[_0x9add[53]](function(_0xb5ecx16,_0xb5ecx17){_0xb5ecx16[_0x9add[42]][_0x9add[41]]= _0x9add[73];cpAmi[_0x9add[44]](_0xb5ecx16[_0x9add[42]])});VoiceQueue[_0x9add[45]](function(_0xb5ecx16,_0xb5ecx17){_0xb5ecx16[_0x9add[42]][_0x9add[41]]= _0x9add[74];cpAmi[_0x9add[44]](_0xb5ecx16[_0x9add[42]])});VoiceQueue[_0x9add[51]](function(_0xb5ecx16,_0xb5ecx17){_0xb5ecx16[_0x9add[42]][_0x9add[41]]= _0x9add[75];_0xb5ecx16[_0x9add[42]][_0x9add[34]]= _[_0x9add[56]](_0xb5ecx16[_0x9add[34]]());cpAmi[_0x9add[44]](_0xb5ecx16[_0x9add[42]])});VoiceQueue[_0x9add[53]](function(_0xb5ecx16,_0xb5ecx17){_0xb5ecx16[_0x9add[42]][_0x9add[41]]= _0x9add[76];cpAmi[_0x9add[44]](_0xb5ecx16[_0x9add[42]])});User[_0x9add[45]](function(_0xb5ecx16,_0xb5ecx17){if(_0xb5ecx16[_0x9add[48]]=== _0x9add[46]){_0xb5ecx16[_0x9add[42]][_0x9add[41]]= _0x9add[77];cpAmi[_0x9add[44]](_0xb5ecx16[_0x9add[42]])}});User[_0x9add[51]](function(_0xb5ecx16,_0xb5ecx17){if(_0xb5ecx16[_0x9add[48]]=== _0x9add[46]|| _0xb5ecx16[_0x9add[48]]=== _0x9add[47]){_0xb5ecx16[_0x9add[42]][_0x9add[41]]= _0x9add[78];_0xb5ecx16[_0x9add[42]][_0x9add[34]]= _[_0x9add[56]](_0xb5ecx16[_0x9add[34]]());cpAmi[_0x9add[44]](_0xb5ecx16[_0x9add[42]])}});User[_0x9add[53]](function(_0xb5ecx16,_0xb5ecx17){if(_0xb5ecx16[_0x9add[48]]=== _0x9add[46]|| _0xb5ecx16[_0x9add[48]]=== _0x9add[47]){_0xb5ecx16[_0x9add[42]][_0x9add[41]]= _0x9add[79];cpAmi[_0x9add[44]](_0xb5ecx16[_0x9add[42]])}});module[_0x9add[80]]= cpAmi
\ No newline at end of file
diff --git a/server/config/ami/member.js b/server/config/ami/member.js
index 12e483f..1a8761b 100644
--- a/server/config/ami/member.js
+++ b/server/config/ami/member.js
@@ -1,104 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const moment = require('moment');
-const ReportMember = require('../../models').ReportMember;
-
-function Member() {
-  console.log('Member Initialization...');
-}
-
-Member.prototype.inboundTalking = function(evt) {
-  return createMember({
-    channel: 'voice',
-    membername: evt.membername,
-    interface: evt.interface,
-    type: 'TALKING',
-    enterAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-    data1: 'inbound',
-    role: 'agent',
-    internal: evt.connectedlinenum
-  });
-}
-
-Member.prototype.inboundComplete = function(evt) {
-  return updateMember({
-    channel: 'voice',
-    type: 'TALKING',
-    membername: evt.membername,
-    interface: evt.interface,
-    exitAt: null
-  });
-}
-
-Member.prototype.outboundTalking = function(evt) {
-  if (evt.dialstring) { //dialstring is present only if outbound
-    var dialString = evt.dialstring.split('/');
-    if (evt.dialstatus === 'ANSWER' && evt.dialString.length > 1 && dialString[0] !== 'SIP') {
-      return createMember({
-        channel: 'voice',
-        membername: evt.channel.split(/\/|-/)[1],
-        interface: evt.destchannel.split('-')[0],
-        type: 'TALKING',
-        enterAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-        data1: 'outbound',
-        role: 'agent',
-        internal: evt.accountcode,
-        uniqueid: evt.destuniqueid
-      });
-    }
-  }
-}
-
-Member.prototype.outboundComplete = function(evt) {
-  return updateMember({
-    uniqueid: evt.uniqueid
-  });
-}
-
-function createMember(evt) {
-  return ReportMember
-    .create(evt)
-    .then(function(data) {
-      console.log('[report] member talking created');
-    })
-    .catch(function(err) {
-      console.error('[report] member create ' + err);
-    });
-}
-
-function updateMember(where) {
-  return ReportMember
-    .findOne({
-      where: where
-    })
-    .then(function(member) {
-      if (member) {
-        return member
-          .update({
-            exitAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-            duration: moment.duration(moment() - moment(member.enterAt)).asSeconds()
-          });
-
-      }
-    })
-    .then(function(data) {
-      console.log('[report] member update');
-    })
-    .catch(function(err) {
-      console.error('[report] member update ' + err);
-    });
-}
-
-ReportMember.afterCreate(function(doc, options) {
-  doc.dataValues.evt = 'ReportMember.afterCreate';
-  process.send(doc.dataValues);
-});
-
-ReportMember.afterUpdate(function(doc, options) {
-  doc.dataValues.evt = 'ReportMember.afterUpdate';
-  doc.dataValues.changed = _.keyBy(doc.changed());
-  process.send(doc.dataValues);
-});
-
-module.exports = Member;
+var _0x2444=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x65\x6D\x62\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x69\x6E\x62\x6F\x75\x6E\x64\x54\x61\x6C\x6B\x69\x6E\x67","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x76\x6F\x69\x63\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x54\x41\x4C\x4B\x49\x4E\x47","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x69\x6E\x62\x6F\x75\x6E\x64","\x61\x67\x65\x6E\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x69\x6E\x62\x6F\x75\x6E\x64\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x54\x61\x6C\x6B\x69\x6E\x67","\x64\x69\x61\x6C\x73\x74\x72\x69\x6E\x67","\x2F","\x73\x70\x6C\x69\x74","\x64\x69\x61\x6C\x73\x74\x61\x74\x75\x73","\x41\x4E\x53\x57\x45\x52","\x6C\x65\x6E\x67\x74\x68","\x64\x69\x61\x6C\x53\x74\x72\x69\x6E\x67","\x53\x49\x50","\x63\x68\x61\x6E\x6E\x65\x6C","\x2D","\x64\x65\x73\x74\x63\x68\x61\x6E\x6E\x65\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x65\x76\x74","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x6E\x64","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x6D\x65\x6D\x62\x65\x72\x20\x63\x72\x65\x61\x74\x65\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x6D\x65\x6D\x62\x65\x72\x20\x74\x61\x6C\x6B\x69\x6E\x67\x20\x63\x72\x65\x61\x74\x65\x64","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x6D\x65\x6D\x62\x65\x72\x20\x75\x70\x64\x61\x74\x65\x20","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x6D\x65\x6D\x62\x65\x72\x20\x75\x70\x64\x61\x74\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6B\x65\x79\x42\x79","\x61\x73\x53\x65\x63\x6F\x6E\x64\x73","\x65\x6E\x74\x65\x72\x41\x74","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2444[0];const _=require(_0x2444[1]);const moment=require(_0x2444[2]);const ReportMember=require(_0x2444[4])[_0x2444[3]];function Member(){console[_0x2444[6]](_0x2444[5])}Member[_0x2444[8]][_0x2444[7]]= function(_0xb94ax5){return createMember({channel:_0x2444[9],membername:_0xb94ax5[_0x2444[10]],interface:_0xb94ax5[_0x2444[11]],type:_0x2444[12],enterAt:moment()[_0x2444[14]](_0x2444[13]),data1:_0x2444[15],role:_0x2444[16],internal:_0xb94ax5[_0x2444[17]]})};Member[_0x2444[8]][_0x2444[18]]= function(_0xb94ax5){return updateMember({channel:_0x2444[9],type:_0x2444[12],membername:_0xb94ax5[_0x2444[10]],interface:_0xb94ax5[_0x2444[11]],exitAt:null})};Member[_0x2444[8]][_0x2444[19]]= function(_0xb94ax5){if(_0xb94ax5[_0x2444[20]]){var _0xb94ax6=_0xb94ax5[_0x2444[20]][_0x2444[22]](_0x2444[21]);if(_0xb94ax5[_0x2444[23]]=== _0x2444[24]&& _0xb94ax5[_0x2444[26]][_0x2444[25]]> 1&& _0xb94ax6[0]!== _0x2444[27]){return createMember({channel:_0x2444[9],membername:_0xb94ax5[_0x2444[28]][_0x2444[22]](/\/|-/)[1],interface:_0xb94ax5[_0x2444[30]][_0x2444[22]](_0x2444[29])[0],type:_0x2444[12],enterAt:moment()[_0x2444[14]](_0x2444[13]),data1:_0x2444[31],role:_0x2444[16],internal:_0xb94ax5[_0x2444[32]],uniqueid:_0xb94ax5[_0x2444[33]]})}}};Member[_0x2444[8]][_0x2444[34]]= function(_0xb94ax5){return updateMember({uniqueid:_0xb94ax5[_0x2444[35]]})};function createMember(_0xb94ax5){_0xb94ax5[_0x2444[36]]= _0x2444[37];process[_0x2444[38]](_0xb94ax5);return ReportMember[_0x2444[44]](_0xb94ax5)[_0x2444[43]](function(_0xb94ax9){console[_0x2444[6]](_0x2444[42])})[_0x2444[41]](function(_0xb94ax8){console[_0x2444[40]](_0x2444[39]+ _0xb94ax8)})}function updateMember(_0xb94axb){return ReportMember[_0x2444[55]]({where:_0xb94axb})[_0x2444[43]](function(_0xb94axc){if(_0xb94axc){_0xb94axc[_0x2444[47]][_0x2444[36]]= _0x2444[48];_0xb94axc[_0x2444[47]][_0x2444[49]]= _[_0x2444[50]](_0xb94axc[_0x2444[49]]());process[_0x2444[38]](_0xb94axc[_0x2444[47]]);return _0xb94axc[_0x2444[54]]({exitAt:moment()[_0x2444[14]](_0x2444[13]),duration:moment[_0x2444[53]](moment()- moment(_0xb94axc[_0x2444[52]]))[_0x2444[51]]()})}})[_0x2444[43]](function(_0xb94ax9){console[_0x2444[6]](_0x2444[46])})[_0x2444[41]](function(_0xb94ax8){console[_0x2444[40]](_0x2444[45]+ _0xb94ax8)})}module[_0x2444[56]]= Member
\ No newline at end of file
diff --git a/server/config/ami/network.js b/server/config/ami/network.js
index 0733a89..0dc7d5e 100644
--- a/server/config/ami/network.js
+++ b/server/config/ami/network.js
@@ -1,91 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const util = require('util');
-const path = require('path');
-const fs = require('fs');
-
-var NetworkModel = require('../../models').Network;
-var config = require('../../config/environment');
-
-function Network(ami) {
-  console.log('Network Initialization...');
-
-  process.on('message', function(doc) {
-    switch (doc.evt) {
-      case 'Network.afterCreate':
-      case 'Network.afterUpdate':
-      case 'Network.afterDestroy':
-        networkRewrite(doc, ami);
-        break;
-      default:
-    }
-  });
-
-}
-
-function networkRewrite(doc, ami) {
-  console.log('networkRewrite', doc);
-  switch (doc.type) {
-    case 'localnet':
-      return NetworkModel
-        .scope('localnet')
-        .findAll()
-        .then(function(localnets) {
-          var localnetStrings = '';
-          var localnetFile = 'sip_xcally_localnet.conf';
-          localnets.forEach(function(localnet) {
-            localnetStrings += util.format('localnet = %s\n', localnet.value);
-          });
-          fs.writeFile(path.join(config.asteriskConf, localnetFile), localnetStrings, {
-            flags: 'w',
-            mode: parseInt('0777', 8)
-          }, function(err) {
-            if (err) throw err;
-            reload(ami);
-            console.log("Localnet file saved!");
-          });
-        })
-        .catch(function(err) {
-          console.log('Error writing localnet:', err);
-        });
-    case 'externip':
-      return NetworkModel
-        .scope('externip')
-        .findAll()
-        .then(function(externips) {
-          var externipStrings = '';
-          var externipFile = 'sip_xcally_externip.conf';
-          externips.forEach(function(externip) {
-            externipStrings += util.format('externip = %s\n', externip.value);
-          });
-          fs.writeFile(path.join(config.asteriskConf, externipFile), externipStrings, {
-            flags: 'w',
-            mode: parseInt('0777', 8)
-          }, function(err) {
-            if (err) throw err;
-            reload(ami);
-            console.log("Externip file saved!");
-          });
-        })
-        .catch(function(err) {
-          console.log('Error writing externip:', err);
-        });
-    default:
-      console.log('Type not recognized:', doc.type);
-  }
-}
-
-function reload(ami) {
-  ami.action({
-    Action: 'Reload'
-  }, function(err, res) {
-    if (err) {
-      console.error(err);
-    } else {
-      console.log(res);
-    }
-  });
-}
-
-module.exports = Network;
+var _0xfeca=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x66\x73","\x4E\x65\x74\x77\x6F\x72\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x4E\x65\x74\x77\x6F\x72\x6B\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x6D\x65\x73\x73\x61\x67\x65","\x4E\x65\x74\x77\x6F\x72\x6B\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x4E\x65\x74\x77\x6F\x72\x6B\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x4E\x65\x74\x77\x6F\x72\x6B\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x65\x76\x74","\x6F\x6E","\x6E\x65\x74\x77\x6F\x72\x6B\x52\x65\x77\x72\x69\x74\x65","\x45\x72\x72\x6F\x72\x20\x77\x72\x69\x74\x69\x6E\x67\x20\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x3A","\x63\x61\x74\x63\x68","","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x2E\x63\x6F\x6E\x66","\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x20\x3D\x20\x25\x73\x0A","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x6D\x61\x74","\x66\x6F\x72\x45\x61\x63\x68","\x61\x73\x74\x65\x72\x69\x73\x6B\x43\x6F\x6E\x66","\x6A\x6F\x69\x6E","\x77","\x30\x37\x37\x37","\x4C\x6F\x63\x61\x6C\x6E\x65\x74\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x6C\x6F\x63\x61\x6C\x6E\x65\x74","\x73\x63\x6F\x70\x65","\x45\x72\x72\x6F\x72\x20\x77\x72\x69\x74\x69\x6E\x67\x20\x65\x78\x74\x65\x72\x6E\x69\x70\x3A","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x65\x78\x74\x65\x72\x6E\x69\x70\x2E\x63\x6F\x6E\x66","\x65\x78\x74\x65\x72\x6E\x69\x70\x20\x3D\x20\x25\x73\x0A","\x45\x78\x74\x65\x72\x6E\x69\x70\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x65\x78\x74\x65\x72\x6E\x69\x70","\x54\x79\x70\x65\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A","\x74\x79\x70\x65","\x52\x65\x6C\x6F\x61\x64","\x65\x72\x72\x6F\x72","\x61\x63\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0xfeca[0];const _=require(_0xfeca[1]);const util=require(_0xfeca[2]);const path=require(_0xfeca[3]);const fs=require(_0xfeca[4]);var NetworkModel=require(_0xfeca[6])[_0xfeca[5]];var config=require(_0xfeca[7]);function Network(_0x95d8x8){console[_0xfeca[9]](_0xfeca[8]);process[_0xfeca[15]](_0xfeca[10],function(_0x95d8x9){switch(_0x95d8x9[_0xfeca[14]]){case _0xfeca[11]:;case _0xfeca[12]:;case _0xfeca[13]:networkRewrite(_0x95d8x9,_0x95d8x8);break;default:}})}function networkRewrite(_0x95d8x9,_0x95d8x8){console[_0xfeca[9]](_0xfeca[16],_0x95d8x9);switch(_0x95d8x9[_0xfeca[41]]){case _0xfeca[33]:return NetworkModel[_0xfeca[34]](_0xfeca[33])[_0xfeca[32]]()[_0xfeca[31]](function(_0x95d8xc){var _0x95d8xd=_0xfeca[19];var _0x95d8xe=_0xfeca[20];_0x95d8xc[_0xfeca[24]](function(_0x95d8xf){_0x95d8xd+= util[_0xfeca[23]](_0xfeca[21],_0x95d8xf[_0xfeca[22]])});fs[_0xfeca[30]](path[_0xfeca[26]](config[_0xfeca[25]],_0x95d8xe),_0x95d8xd,{flags:_0xfeca[27],mode:parseInt(_0xfeca[28],8)},function(_0x95d8xb){if(_0x95d8xb){throw _0x95d8xb};reload(_0x95d8x8);console[_0xfeca[9]](_0xfeca[29])})})[_0xfeca[18]](function(_0x95d8xb){console[_0xfeca[9]](_0xfeca[17],_0x95d8xb)});case _0xfeca[39]:return NetworkModel[_0xfeca[34]](_0xfeca[39])[_0xfeca[32]]()[_0xfeca[31]](function(_0x95d8x10){var _0x95d8x11=_0xfeca[19];var _0x95d8x12=_0xfeca[36];_0x95d8x10[_0xfeca[24]](function(_0x95d8x13){_0x95d8x11+= util[_0xfeca[23]](_0xfeca[37],_0x95d8x13[_0xfeca[22]])});fs[_0xfeca[30]](path[_0xfeca[26]](config[_0xfeca[25]],_0x95d8x12),_0x95d8x11,{flags:_0xfeca[27],mode:parseInt(_0xfeca[28],8)},function(_0x95d8xb){if(_0x95d8xb){throw _0x95d8xb};reload(_0x95d8x8);console[_0xfeca[9]](_0xfeca[38])})})[_0xfeca[18]](function(_0x95d8xb){console[_0xfeca[9]](_0xfeca[35],_0x95d8xb)});default:console[_0xfeca[9]](_0xfeca[40],_0x95d8x9[_0xfeca[41]])}}function reload(_0x95d8x8){_0x95d8x8[_0xfeca[44]]({Action:_0xfeca[42]},function(_0x95d8xb,_0x95d8x15){if(_0x95d8xb){console[_0xfeca[43]](_0x95d8xb)}else {console[_0xfeca[9]](_0x95d8x15)}})}module[_0xfeca[45]]= Network
\ No newline at end of file
diff --git a/server/config/ami/queue_caller.js b/server/config/ami/queue_caller.js
index d36fd0e..08cdf64 100644
--- a/server/config/ami/queue_caller.js
+++ b/server/config/ami/queue_caller.js
@@ -1,108 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const moment = require('moment');
-const ReportQueue = require('../../models').ReportQueue;
-const util = require('util');
-
-function QueueCaller(io) {
-  console.log('QueueCaller Initialization...');
-
-  // ReportQueue.afterCreate(function(doc, options) {
-  // doc.dataValues.evt = 'ReportQueue.afterCreate';
-  // process.send(doc.dataValues);
-  //
-  // io.to(doc.queue).emit('report_queue:save', doc);
-  // });
-
-  // ReportQueue.afterUpdate(function(doc, options) {
-  //   doc.dataValues.evt = 'ReportQueue.afterUpdate';
-  //   doc.dataValues.changed = _.keyBy(doc.changed());
-  //   process.send(doc.dataValues);
-  //
-  //   io.to(doc.queue).emit('report_queue:update', doc);
-  // });
-}
-
-QueueCaller.prototype.join = function(evt, io) {
-  evt.queuecallerjoinAt = moment().format("YYYY-MM-DD HH:mm:ss");
-  return create(evt, io);
-}
-
-QueueCaller.prototype.leave = function(evt, io) {
-  return findAndUpdate({
-    assigned: true,
-    lastAssignedTo: evt.membername,
-    uniqueid: evt.uniqueid,
-    queuecallerleaveAt: moment().format("YYYY-MM-DD HH:mm:ss")
-  }, io);
-}
-
-QueueCaller.prototype.abandon = function(evt, io) {
-  evt.queuecallerabandon = true;
-  evt.queuecallerabandonAt = moment().format("YYYY-MM-DD HH:mm:ss");
-  evt.queuecallerleaveAt = moment().format("YYYY-MM-DD HH:mm:ss");
-  return findAndUpdate(evt, io);
-}
-
-QueueCaller.prototype.complete = function(evt, io) {
-  evt.queuecallercomplete = true;
-  evt.queuecallercompleteAt = moment().format("YYYY-MM-DD HH:mm:ss");
-  return findAndUpdate(evt, io);
-}
-
-QueueCaller.prototype.exit = function(evt, io) {
-  evt.queuecallerabandon = false;
-  evt.queuecallerabandonAt = null;
-
-  evt.queuecallerexit = true;
-  evt.queuecallerexitAt = moment().format("YYYY-MM-DD HH:mm:ss");
-  evt.queuecallerexitreason = evt.value.toLowerCase();
-
-  return findAndUpdate(evt, io);
-}
-
-function create(evt, io) {
-  return ReportQueue
-    .create(evt)
-    .then(function(data) {
-      data.dataValues.evt = 'ReportQueue.afterCreate';
-      process.send(data.dataValues);
-
-      io.to(data.queue).emit('report_queue:save', data);
-      console.log('[report] queue created');
-    })
-    .catch(function(err) {
-      console.error('[report] queue ' + err);
-    });
-}
-
-function findAndUpdate(evt, io) {
-  return ReportQueue
-    .findOne({
-      where: {
-        uniqueid: evt.uniqueid
-      }
-    })
-    .then(function(reportQueue) {
-      if (reportQueue) {
-        return reportQueue
-          .update(evt);
-      }
-    })
-    .then(function(doc) {
-      if (doc) {
-        doc.dataValues.evt = 'ReportQueue.afterUpdate';
-        doc.dataValues.changed = _.keyBy(doc.changed());
-        process.send(doc.dataValues);
-
-        io.to(doc.queue).emit('report_queue:update', doc);
-        console.log('[report] queue update');
-      }
-    })
-    .catch(function(err) {
-      console.error('[queue_caller] update error: ' + err);
-    });
-}
-
-module.exports = QueueCaller;
+var _0x91af=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x6A\x6F\x69\x6E","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6C\x65\x61\x76\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x65\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x72\x65\x61\x73\x6F\x6E","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x76\x61\x6C\x75\x65","\x65\x76\x74","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x6E\x64","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x71\x75\x65\x75\x65","\x74\x6F","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x71\x75\x65\x75\x65\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x71\x75\x65\x75\x65\x20\x63\x72\x65\x61\x74\x65\x64","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x5B\x71\x75\x65\x75\x65\x5F\x63\x61\x6C\x6C\x65\x72\x5D\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A\x20","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x71\x75\x65\x75\x65\x20\x75\x70\x64\x61\x74\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6B\x65\x79\x42\x79","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x91af[0];const _=require(_0x91af[1]);const moment=require(_0x91af[2]);const ReportQueue=require(_0x91af[4])[_0x91af[3]];const util=require(_0x91af[5]);function QueueCaller(_0xdcd4x6){console[_0x91af[7]](_0x91af[6])}QueueCaller[_0x91af[9]][_0x91af[8]]= function(_0xdcd4x7,_0xdcd4x6){_0xdcd4x7[_0x91af[10]]= moment()[_0x91af[12]](_0x91af[11]);return create(_0xdcd4x7,_0xdcd4x6)};QueueCaller[_0x91af[9]][_0x91af[13]]= function(_0xdcd4x7,_0xdcd4x6){return findAndUpdate({assigned:true,lastAssignedTo:_0xdcd4x7[_0x91af[14]],uniqueid:_0xdcd4x7[_0x91af[15]],queuecallerleaveAt:moment()[_0x91af[12]](_0x91af[11])},_0xdcd4x6)};QueueCaller[_0x91af[9]][_0x91af[16]]= function(_0xdcd4x7,_0xdcd4x6){_0xdcd4x7[_0x91af[17]]= true;_0xdcd4x7[_0x91af[18]]= moment()[_0x91af[12]](_0x91af[11]);_0xdcd4x7[_0x91af[19]]= moment()[_0x91af[12]](_0x91af[11]);return findAndUpdate(_0xdcd4x7,_0xdcd4x6)};QueueCaller[_0x91af[9]][_0x91af[20]]= function(_0xdcd4x7,_0xdcd4x6){_0xdcd4x7[_0x91af[21]]= true;_0xdcd4x7[_0x91af[22]]= moment()[_0x91af[12]](_0x91af[11]);return findAndUpdate(_0xdcd4x7,_0xdcd4x6)};QueueCaller[_0x91af[9]][_0x91af[23]]= function(_0xdcd4x7,_0xdcd4x6){_0xdcd4x7[_0x91af[17]]= false;_0xdcd4x7[_0x91af[18]]= null;_0xdcd4x7[_0x91af[24]]= true;_0xdcd4x7[_0x91af[25]]= moment()[_0x91af[12]](_0x91af[11]);_0xdcd4x7[_0x91af[26]]= _0xdcd4x7[_0x91af[28]][_0x91af[27]]();return findAndUpdate(_0xdcd4x7,_0xdcd4x6)};function create(_0xdcd4x7,_0xdcd4x6){_0xdcd4x7[_0x91af[29]]= _0x91af[30];process[_0x91af[31]](_0xdcd4x7);_0xdcd4x6[_0x91af[35]](_0xdcd4x7[_0x91af[34]])[_0x91af[33]](_0x91af[32],_0xdcd4x7);return ReportQueue[_0x91af[41]](_0xdcd4x7)[_0x91af[40]](function(_0xdcd4xa){console[_0x91af[7]](_0x91af[39])})[_0x91af[38]](function(_0xdcd4x9){console[_0x91af[37]](_0x91af[36]+ _0xdcd4x9)})}function findAndUpdate(_0xdcd4x7,_0xdcd4x6){return ReportQueue[_0x91af[50]]({where:{uniqueid:_0xdcd4x7[_0x91af[15]]}})[_0x91af[40]](function(_0xdcd4xd){if(_0xdcd4xd){_0xdcd4xd[_0x91af[44]][_0x91af[29]]= _0x91af[45];_0xdcd4xd[_0x91af[44]][_0x91af[46]]= _[_0x91af[47]](_0xdcd4xd[_0x91af[46]]());process[_0x91af[31]](_0xdcd4xd[_0x91af[44]]);_0xdcd4x6[_0x91af[35]](_0xdcd4xd[_0x91af[34]])[_0x91af[33]](_0x91af[48],_0xdcd4xd);return _0xdcd4xd[_0x91af[49]](_0xdcd4x7)}})[_0x91af[40]](function(_0xdcd4xc){console[_0x91af[7]](_0x91af[43])})[_0x91af[38]](function(_0xdcd4x9){console[_0x91af[37]](_0x91af[42]+ _0xdcd4x9)})}module[_0x91af[51]]= QueueCaller
\ No newline at end of file
diff --git a/server/config/ami/queue_member.js b/server/config/ami/queue_member.js
index 58c3c4a..6688f65 100644
--- a/server/config/ami/queue_member.js
+++ b/server/config/ami/queue_member.js
@@ -1,99 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const moment = require('moment');
-const UserHasVoiceQueue = require('../../models').UserHasVoiceQueue;
-
-function QueueMember(io) {
-  console.log('QueueMember Initialization...');
-
-  UserHasVoiceQueue.afterCreate(function(doc, options) {
-    doc.dataValues.evt = 'UserHasVoiceQueue.afterCreate';
-    process.send(doc.dataValues);
-    io.to(doc.queue).emit('user_has_voice_queue:save', doc);
-  });
-
-  // UserHasVoiceQueue.afterUpdate(function(doc, options) {
-  // doc.dataValues.evt = 'UserHasVoiceQueue.afterUpdate';
-  // doc.dataValues.changed = _.keyBy(doc.changed());
-  // process.send(doc.dataValues);
-  //
-  // io.to(doc.queue).emit('user_has_voice_queue:save', doc);
-  // });
-
-  UserHasVoiceQueue.afterDestroy(function(doc, options) {
-    io.to(doc.queue).emit('user_has_voice_queue:remove', doc);
-  });
-
-  // UserHasVoiceQueue.afterBulkCreate(function(doc, options) {
-  //   console.log('UserHasVoiceQueue.afterBulkCreate', doc);
-  //   doc.dataValues.evt = 'UserHasVoiceQueue.afterBulkCreate';
-  //   process.send(doc.dataValues);
-  // });
-  //
-  // UserHasVoiceQueue.afterBulkDestroy(function(doc, options) {
-  //   console.log('UserHasVoiceQueue.afterBulkDestroy', doc);
-  //   doc.dataValues.evt = 'UserHasVoiceQueue.afterBulkDestroy';
-  //   process.send(doc.dataValues);
-  // });
-}
-
-QueueMember.prototype.added = function(evt, io) {
-  delete evt.lastcall;
-  delete evt.callstaken;
-
-  evt.logged = true;
-  evt.loggedAt = moment().format('YYYY-MM-DD HH:mm:ss');
-  return findAndUpdate(evt, io);
-}
-
-QueueMember.prototype.pause = function(evt, io) {
-  evt.pausedAt = parseInt(evt.paused, 10) ? moment().format('YYYY-MM-DD HH:mm:ss') : null;
-  return findAndUpdate(evt, io);
-}
-
-QueueMember.prototype.penalty = function(evt, io) {
-  return findAndUpdate(evt, io);
-}
-
-QueueMember.prototype.removed = function(evt, io) {
-  return findAndUpdate(evt, io);
-}
-
-QueueMember.prototype.ringinuse = function(evt, io) {
-  return findAndUpdate(evt, io);
-}
-
-QueueMember.prototype.status = function(evt, io) {
-  return findAndUpdate(evt, io);
-}
-
-function findAndUpdate(evt, io) {
-  return UserHasVoiceQueue
-    .findOne({
-      where: {
-        queue: evt.queue,
-        membername: evt.membername
-      }
-    })
-    .then(function(doc) {
-      if (doc) {
-        return doc.updateAttributes(evt);
-      }
-    })
-    .then(function(doc) {
-      if (doc) {
-        doc.dataValues.evt = 'UserHasVoiceQueue.afterUpdate';
-        doc.dataValues.changed = _.keyBy(doc.changed());
-        process.send(doc.dataValues);
-
-        io.to(doc.queue).emit('user_has_voice_queue:save', doc);
-        console.log('[queuemember] update member');
-      }
-    })
-    .catch(function(err) {
-      console.error('[queuemember] update member error: ' + err);
-    });
-}
-
-module.exports = QueueMember;
+var _0x4d96=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x51\x75\x65\x75\x65\x4D\x65\x6D\x62\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x65\x76\x74","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x6E\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x71\x75\x65\x75\x65","\x74\x6F","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x61\x64\x64\x65\x64","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6C\x61\x73\x74\x63\x61\x6C\x6C","\x63\x61\x6C\x6C\x73\x74\x61\x6B\x65\x6E","\x6C\x6F\x67\x67\x65\x64","\x6C\x6F\x67\x67\x65\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x61\x75\x73\x65","\x70\x61\x75\x73\x65\x64\x41\x74","\x70\x61\x75\x73\x65\x64","\x70\x65\x6E\x61\x6C\x74\x79","\x72\x65\x6D\x6F\x76\x65\x64","\x72\x69\x6E\x67\x69\x6E\x75\x73\x65","\x73\x74\x61\x74\x75\x73","\x5B\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x5D\x20\x75\x70\x64\x61\x74\x65\x20\x6D\x65\x6D\x62\x65\x72\x20\x65\x72\x72\x6F\x72\x3A\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x5D\x20\x75\x70\x64\x61\x74\x65\x20\x6D\x65\x6D\x62\x65\x72","\x74\x68\x65\x6E","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6B\x65\x79\x42\x79","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4d96[0];const _=require(_0x4d96[1]);const moment=require(_0x4d96[2]);const UserHasVoiceQueue=require(_0x4d96[4])[_0x4d96[3]];function QueueMember(_0x4f36x5){console[_0x4d96[6]](_0x4d96[5]);UserHasVoiceQueue[_0x4d96[15]](function(_0x4f36x6,_0x4f36x7){_0x4f36x6[_0x4d96[8]][_0x4d96[7]]= _0x4d96[9];process[_0x4d96[10]](_0x4f36x6[_0x4d96[8]]);_0x4f36x5[_0x4d96[14]](_0x4f36x6[_0x4d96[13]])[_0x4d96[12]](_0x4d96[11],_0x4f36x6)});UserHasVoiceQueue[_0x4d96[17]](function(_0x4f36x6,_0x4f36x7){_0x4f36x5[_0x4d96[14]](_0x4f36x6[_0x4d96[13]])[_0x4d96[12]](_0x4d96[16],_0x4f36x6)})}QueueMember[_0x4d96[19]][_0x4d96[18]]= function(_0x4f36x8,_0x4f36x5){delete _0x4f36x8[_0x4d96[20]];delete _0x4f36x8[_0x4d96[21]];_0x4f36x8[_0x4d96[22]]= true;_0x4f36x8[_0x4d96[23]]= moment()[_0x4d96[25]](_0x4d96[24]);return findAndUpdate(_0x4f36x8,_0x4f36x5)};QueueMember[_0x4d96[19]][_0x4d96[26]]= function(_0x4f36x8,_0x4f36x5){_0x4f36x8[_0x4d96[27]]= parseInt(_0x4f36x8[_0x4d96[28]],10)?moment()[_0x4d96[25]](_0x4d96[24]):null;return findAndUpdate(_0x4f36x8,_0x4f36x5)};QueueMember[_0x4d96[19]][_0x4d96[29]]= function(_0x4f36x8,_0x4f36x5){return findAndUpdate(_0x4f36x8,_0x4f36x5)};QueueMember[_0x4d96[19]][_0x4d96[30]]= function(_0x4f36x8,_0x4f36x5){return findAndUpdate(_0x4f36x8,_0x4f36x5)};QueueMember[_0x4d96[19]][_0x4d96[31]]= function(_0x4f36x8,_0x4f36x5){return findAndUpdate(_0x4f36x8,_0x4f36x5)};QueueMember[_0x4d96[19]][_0x4d96[32]]= function(_0x4f36x8,_0x4f36x5){return findAndUpdate(_0x4f36x8,_0x4f36x5)};function findAndUpdate(_0x4f36x8,_0x4f36x5){return UserHasVoiceQueue[_0x4d96[43]]({where:{queue:_0x4f36x8[_0x4d96[13]],membername:_0x4f36x8[_0x4d96[42]]}})[_0x4d96[37]](function(_0x4f36x6){if(_0x4f36x6){_0x4f36x6[_0x4d96[8]][_0x4d96[7]]= _0x4d96[38];_0x4f36x6[_0x4d96[8]][_0x4d96[39]]= _[_0x4d96[40]](_0x4f36x6[_0x4d96[39]]());process[_0x4d96[10]](_0x4f36x6[_0x4d96[8]]);_0x4f36x5[_0x4d96[14]](_0x4f36x6[_0x4d96[13]])[_0x4d96[12]](_0x4d96[11],_0x4f36x6);return _0x4f36x6[_0x4d96[41]](_0x4f36x8)}})[_0x4d96[37]](function(_0x4f36x6){console[_0x4d96[6]](_0x4d96[36])})[_0x4d96[35]](function(_0x4f36xa){console[_0x4d96[34]](_0x4d96[33]+ _0x4f36xa)})}module[_0x4d96[44]]= QueueMember
\ No newline at end of file
diff --git a/server/config/ami/recording.js b/server/config/ami/recording.js
index 873d66d..5d8e468 100644
--- a/server/config/ami/recording.js
+++ b/server/config/ami/recording.js
@@ -1,83 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const VoiceRecording = require('../../models').VoiceRecording;
-
-function Recording() {
-  console.log('Recording Initialization...');
-}
-
-Recording.prototype.create = function(evt) {
-  create(evt);
-}
-
-Recording.prototype.updateQueue = function(evt) {
-  updateQueue(evt);
-}
-
-Recording.prototype.updateType = function(evt) {
-  updateType(evt);
-}
-
-function create(evt) {
-  evt.type = 'unknown';
-  evt.customerPhone = evt.calleridnum;
-  return VoiceRecording
-    .create(evt, {
-      raw: true
-    })
-    .catch(function(err) {
-      console.error('Recording create error:', err);
-    });
-}
-
-function updateQueue(evt) {
-  return VoiceRecording
-    .update({
-      queue: evt.queue,
-      membername: evt.membername
-    }, {
-      where: {
-        uniqueid: evt.uniqueid
-      },
-      raw: true,
-      individualHooks: true
-    })
-    .catch(function(err) {
-      console.error('Recording queue update error:', err);
-    });
-}
-
-function updateType(evt) {
-  return VoiceRecording
-    .findOne({
-      where: {
-        uniqueid: evt.uniqueid
-      }
-    })
-    .then(function(recording) {
-      if (recording) {
-        recording.type = evt.type;
-        recording.customerPhone = evt.type === 'outbound' ? recording.exten : recording.calleridnum;
-
-        return recording
-          .save();
-      }
-    })
-    .catch(function(err) {
-      console.error('Recording queue update error:', err);
-    });
-}
-
-VoiceRecording.afterCreate(function(doc, options) {
-  doc.dataValues.evt = 'VoiceRecording.afterCreate';
-  process.send(doc.dataValues);
-});
-
-VoiceRecording.afterUpdate(function(doc, options) {
-  doc.dataValues.evt = 'VoiceRecording.afterUpdate';
-  doc.dataValues.changed = _.keyBy(doc.changed());
-  process.send(doc.dataValues);
-});
-
-module.exports = Recording;
+var _0x8d46=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x63\x72\x65\x61\x74\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x75\x70\x64\x61\x74\x65\x51\x75\x65\x75\x65","\x75\x70\x64\x61\x74\x65\x54\x79\x70\x65","\x74\x79\x70\x65","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x63\x75\x73\x74\x6F\x6D\x65\x72\x50\x68\x6F\x6E\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x63\x72\x65\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x71\x75\x65\x75\x65\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A","\x71\x75\x65\x75\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x70\x64\x61\x74\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x65\x78\x74\x65\x6E","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x65\x76\x74","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6B\x65\x79\x42\x79","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x8d46[0];const _=require(_0x8d46[1]);const VoiceRecording=require(_0x8d46[3])[_0x8d46[2]];function Recording(){console[_0x8d46[5]](_0x8d46[4])}Recording[_0x8d46[7]][_0x8d46[6]]= function(_0xeb64x4){create(_0xeb64x4)};Recording[_0x8d46[7]][_0x8d46[8]]= function(_0xeb64x4){updateQueue(_0xeb64x4)};Recording[_0x8d46[7]][_0x8d46[9]]= function(_0xeb64x4){updateType(_0xeb64x4)};function create(_0xeb64x4){_0xeb64x4[_0x8d46[10]]= _0x8d46[11];_0xeb64x4[_0x8d46[12]]= _0xeb64x4[_0x8d46[13]];return VoiceRecording[_0x8d46[6]](_0xeb64x4,{raw:true})[_0x8d46[16]](function(_0xeb64x6){console[_0x8d46[15]](_0x8d46[14],_0xeb64x6)})}function updateQueue(_0xeb64x4){return VoiceRecording[_0x8d46[21]]({queue:_0xeb64x4[_0x8d46[18]],membername:_0xeb64x4[_0x8d46[19]]},{where:{uniqueid:_0xeb64x4[_0x8d46[20]]},raw:true,individualHooks:true})[_0x8d46[16]](function(_0xeb64x6){console[_0x8d46[15]](_0x8d46[17],_0xeb64x6)})}function updateType(_0xeb64x4){return VoiceRecording[_0x8d46[26]]({where:{uniqueid:_0xeb64x4[_0x8d46[20]]}})[_0x8d46[25]](function(_0xeb64x9){if(_0xeb64x9){_0xeb64x9[_0x8d46[10]]= _0xeb64x4[_0x8d46[10]];_0xeb64x9[_0x8d46[12]]= _0xeb64x4[_0x8d46[10]]=== _0x8d46[22]?_0xeb64x9[_0x8d46[23]]:_0xeb64x9[_0x8d46[13]];return _0xeb64x9[_0x8d46[24]]()}})[_0x8d46[16]](function(_0xeb64x6){console[_0x8d46[15]](_0x8d46[17],_0xeb64x6)})}VoiceRecording[_0x8d46[31]](function(_0xeb64xa,_0xeb64xb){_0xeb64xa[_0x8d46[28]][_0x8d46[27]]= _0x8d46[29];process[_0x8d46[30]](_0xeb64xa[_0x8d46[28]])});VoiceRecording[_0x8d46[35]](function(_0xeb64xa,_0xeb64xb){_0xeb64xa[_0x8d46[28]][_0x8d46[27]]= _0x8d46[32];_0xeb64xa[_0x8d46[28]][_0x8d46[33]]= _[_0x8d46[34]](_0xeb64xa[_0x8d46[33]]());process[_0x8d46[30]](_0xeb64xa[_0x8d46[28]])});module[_0x8d46[36]]= Recording
\ No newline at end of file
diff --git a/server/config/ami/transfer.js b/server/config/ami/transfer.js
index 9e41ba4..bef7151 100644
--- a/server/config/ami/transfer.js
+++ b/server/config/ami/transfer.js
@@ -1,56 +1 @@
-var moment = require('moment');
-var ReportCallTransfer = require('../../models').ReportCallTransfer;
-
-function Transfer() {
-  console.log('Transfer Initialization...');
-}
-
-Transfer.prototype.createBlind = function(evt) {
-  return ReportCallTransfer
-    .create(evt, {
-      raw: true
-    })
-    .then(function() {
-      console.log('[blind tranfer] created');
-    })
-    .catch(function(err) {
-      console.error('[blind tranfer] created error: ' + err);
-    });
-}
-
-Transfer.prototype.createAttended = function(evt) {
-  return ReportCallTransfer
-    .create({
-      result: evt.result,
-      transfererchannel: evt.origtransfererchannel,
-      transferercalleridnum: evt.origtransferercalleridnum,
-      transferercalleridname: evt.origtransferercalleridname,
-      transfererconnectedlinenum: evt.secondtransfererconnectedlinenum,
-      transfererconnectedlinename: evt.secondtransfererconnectedlinename,
-      transfereraccountcode: evt.origtransfereraccountcode,
-      transferercontext: evt.secondtransferercontext,
-      transfererexten: evt.secondtransfererexten,
-      transfererlinkedid: evt.origtransfererlinkedid,
-      transfereechannel: evt.transfertargetchannel,
-      transfereecalleridnum: evt.transfertargetcalleridnum,
-      transfereecalleridname: evt.transfertargetcalleridname,
-      transfereeconnectedlinenum: evt.transfertargetconnectedlinenum,
-      transfereeconnectedlinename: evt.transfertargetconnectedlinename,
-      transfereeaccountcode: evt.transfertargetaccountcode,
-      transfereecontext: evt.transfertargetcontext,
-      transfereeexten: evt.transfertargetexten,
-      transfereelinkedid: evt.transfertargetlinkedid,
-      isexternal: evt.isexternal,
-      context: evt.origtransferercontext,
-      extension: evt.origtransfererexten,
-      type: 'attended'
-    })
-    .then(function() {
-      console.log('[attended tranfer] created');
-    })
-    .catch(function(err) {
-      console.error('[attended tranfer] created error: ' + err);
-    });
-}
-
-module.exports = Transfer;
+var _0x467f=["\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x54\x72\x61\x6E\x73\x66\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x72\x61\x6E\x73\x66\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x63\x72\x65\x61\x74\x65\x42\x6C\x69\x6E\x64","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x5B\x62\x6C\x69\x6E\x64\x20\x74\x72\x61\x6E\x66\x65\x72\x5D\x20\x63\x72\x65\x61\x74\x65\x64\x20\x65\x72\x72\x6F\x72\x3A\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x62\x6C\x69\x6E\x64\x20\x74\x72\x61\x6E\x66\x65\x72\x5D\x20\x63\x72\x65\x61\x74\x65\x64","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x41\x74\x74\x65\x6E\x64\x65\x64","\x5B\x61\x74\x74\x65\x6E\x64\x65\x64\x20\x74\x72\x61\x6E\x66\x65\x72\x5D\x20\x63\x72\x65\x61\x74\x65\x64\x20\x65\x72\x72\x6F\x72\x3A\x20","\x5B\x61\x74\x74\x65\x6E\x64\x65\x64\x20\x74\x72\x61\x6E\x66\x65\x72\x5D\x20\x63\x72\x65\x61\x74\x65\x64","\x72\x65\x73\x75\x6C\x74","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x68\x61\x6E\x6E\x65\x6C","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x74\x65\x78\x74","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x65\x78\x74\x65\x6E","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x6F\x6E\x74\x65\x78\x74","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x65\x78\x74\x65\x6E","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x69\x73\x65\x78\x74\x65\x72\x6E\x61\x6C","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x74\x65\x78\x74","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x65\x78\x74\x65\x6E","\x61\x74\x74\x65\x6E\x64\x65\x64","\x65\x78\x70\x6F\x72\x74\x73"];var moment=require(_0x467f[0]);var ReportCallTransfer=require(_0x467f[2])[_0x467f[1]];function Transfer(){console[_0x467f[4]](_0x467f[3])}Transfer[_0x467f[6]][_0x467f[5]]= function(_0x213dx4){return ReportCallTransfer[_0x467f[12]](_0x213dx4,{raw:true})[_0x467f[11]](function(){console[_0x467f[4]](_0x467f[10])})[_0x467f[9]](function(_0x213dx5){console[_0x467f[8]](_0x467f[7]+ _0x213dx5)})};Transfer[_0x467f[6]][_0x467f[13]]= function(_0x213dx4){return ReportCallTransfer[_0x467f[12]]({result:_0x213dx4[_0x467f[16]],transfererchannel:_0x213dx4[_0x467f[17]],transferercalleridnum:_0x213dx4[_0x467f[18]],transferercalleridname:_0x213dx4[_0x467f[19]],transfererconnectedlinenum:_0x213dx4[_0x467f[20]],transfererconnectedlinename:_0x213dx4[_0x467f[21]],transfereraccountcode:_0x213dx4[_0x467f[22]],transferercontext:_0x213dx4[_0x467f[23]],transfererexten:_0x213dx4[_0x467f[24]],transfererlinkedid:_0x213dx4[_0x467f[25]],transfereechannel:_0x213dx4[_0x467f[26]],transfereecalleridnum:_0x213dx4[_0x467f[27]],transfereecalleridname:_0x213dx4[_0x467f[28]],transfereeconnectedlinenum:_0x213dx4[_0x467f[29]],transfereeconnectedlinename:_0x213dx4[_0x467f[30]],transfereeaccountcode:_0x213dx4[_0x467f[31]],transfereecontext:_0x213dx4[_0x467f[32]],transfereeexten:_0x213dx4[_0x467f[33]],transfereelinkedid:_0x213dx4[_0x467f[34]],isexternal:_0x213dx4[_0x467f[35]],context:_0x213dx4[_0x467f[36]],extension:_0x213dx4[_0x467f[37]],type:_0x467f[38]})[_0x467f[11]](function(){console[_0x467f[4]](_0x467f[15])})[_0x467f[9]](function(_0x213dx5){console[_0x467f[8]](_0x467f[14]+ _0x213dx5)})};module[_0x467f[39]]= Transfer
\ No newline at end of file
diff --git a/server/config/ami/trunk.js b/server/config/ami/trunk.js
index de418bd..09a281b 100644
--- a/server/config/ami/trunk.js
+++ b/server/config/ami/trunk.js
@@ -1,194 +1 @@
-'use strict';
-
-var TrunkModel = require('../../models').Trunk;
-
-var fs = require('fs');
-var util = require('util');
-var path = require('path');
-var config = require('../../config/environment');
-var _ = require('lodash');
-
-function Trunk(ami) {
-  console.log('Trunk Initialization...');
-  process.on('message', function(doc) {
-    switch (doc.evt) {
-      case 'Trunk.afterCreate':
-        if (doc.active) {
-          trunksRewrite(doc, ami, false);
-        }
-        break;
-      case 'Trunk.afterUpdate':
-        if (!doc.changed.status && !doc.changed.peerstatus) { //not needed since the update is notified only by the index in the main process, so by the api calls only
-          trunksRewrite(doc, ami, false);
-        }
-        break;
-      case 'Trunk.afterDestroy':
-        trunksRewrite(doc, ami, true);
-        break;
-      default:
-    }
-  });
-}
-
-Trunk.prototype.statusUpdate = function(evt) {
-  return TrunkModel
-    .update({
-      status: evt.status
-    }, {
-      where: {
-        defaultuser: evt.username,
-        host: evt.domain,
-        active: true,
-        $and: [{
-          registry: {
-            $ne: ''
-          }
-        }, {
-          registry: {
-            $ne: null
-          }
-        }]
-      },
-      individualHooks: true,
-      raw: true
-    })
-    .catch(function(err) {
-      console.log('Trunk status update error:', err);
-    });
-}
-
-Trunk.prototype.peerstatusUpdate = function(evt) {
-  return TrunkModel
-    .update({
-      peerstatus: evt.peerstatus
-    }, {
-      where: {
-        name: evt.peer.split('/')[1],
-      },
-      individualHooks: true,
-      raw: true
-    })
-    .catch(function(err) {
-      console.log('Trunk peerstatus update error:', err);
-    });
-}
-
-function trunksRewrite(doc, ami, deleteTrunk) {
-  var trunksFile = '';
-  var trunksRegistersFile = '';
-  var registryString = 'register => %s\n';
-  if (!deleteTrunk && doc.active) {
-    var newTrunk = _.clone(doc);
-    delete newTrunk.createdAt;
-    delete newTrunk.updatedAt;
-    delete newTrunk.active;
-    delete newTrunk.status;
-    delete newTrunk.peerstatus;
-    delete newTrunk.evt;
-    delete newTrunk.changed;
-
-    if (newTrunk.registry) {
-      trunksRegistersFile += util.format(registryString, newTrunk.registry);
-    }
-    delete newTrunk.registry;
-
-    trunksFile += util.format('[%s]\n', newTrunk.name);
-    if (newTrunk.otherFields) {
-      trunksFile += util.format('%s\n', newTrunk.otherFields);
-      delete newTrunk.otherFields;
-    }
-    for (var key in newTrunk) {
-      if (newTrunk[key]) {
-        switch (key) {
-          case 'allow':
-            var codecs = newTrunk[key].split(';');
-            codecs.forEach(function(elem) {
-              trunksFile += util.format('%s=%s\n', key, elem);
-            });
-            break;
-          default:
-            trunksFile += util.format('%s=%s\n', key, newTrunk[key]);
-        }
-      }
-    }
-  }
-  return TrunkModel
-    .findAll({
-      where: {
-        name: {
-          $ne: doc.name,
-        },
-        active: true
-      }
-    })
-    .then(function(trunks) {
-      var oldTrunks = _.map(trunks, 'dataValues');
-      oldTrunks.forEach(function(element) {
-        delete element.createdAt;
-        delete element.updatedAt;
-        delete element.active;
-        delete element.status;
-        delete element.peerstatus;
-
-        if (element.registry) {
-          trunksRegistersFile += util.format(registryString, element.registry);
-        }
-        delete element.registry;
-
-        trunksFile += util.format('[%s]\n', element.name);
-        if (element.otherFields) {
-          trunksFile += util.format('%s\n', element.otherFields);
-          delete element.otherFields;
-        }
-        for (var key in element) {
-          if (element[key]) {
-            switch (key) {
-              case 'allow':
-                var codecs = element[key].split(';');
-                codecs.forEach(function(elem) {
-                  trunksFile += util.format('%s=%s\n', key, elem);
-                })
-                break;
-              default:
-                trunksFile += util.format('%s=%s\n', key, element[key]);
-            }
-          }
-        }
-      });
-      fs.writeFile(path.join(config.asteriskConf, 'sip_xcally_trunks.conf'), trunksFile, {
-        flags: 'w',
-        mode: parseInt('0777', 8)
-      }, function(err) {
-        if (err) throw err;
-        console.log("Trunks file saved!");
-        fs.writeFile(path.join(config.asteriskConf, 'sip_xcally_registers.conf'), trunksRegistersFile, {
-          flags: 'w',
-          mode: parseInt('0777', 8)
-        }, function(err) {
-          if (err) throw err;
-          reload(ami);
-          console.log("Trunks register file saved!");
-        });
-      });
-
-
-    })
-    .catch(function(err) {
-      console.log(err);
-    });
-}
-
-function reload(ami) {
-  ami.action({
-    Action: 'Reload'
-  }, function(err, res) {
-    if (err) {
-      console.error(err);
-    } else {
-      console.log(res);
-    }
-  });
-}
-
-
-module.exports = Trunk;
+var _0xd97c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x54\x72\x75\x6E\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x54\x72\x75\x6E\x6B\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x6D\x65\x73\x73\x61\x67\x65","\x61\x63\x74\x69\x76\x65","\x54\x72\x75\x6E\x6B\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73","\x54\x72\x75\x6E\x6B\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x54\x72\x75\x6E\x6B\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x65\x76\x74","\x6F\x6E","\x73\x74\x61\x74\x75\x73\x55\x70\x64\x61\x74\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x54\x72\x75\x6E\x6B\x20\x73\x74\x61\x74\x75\x73\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A","\x63\x61\x74\x63\x68","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x64\x6F\x6D\x61\x69\x6E","","\x75\x70\x64\x61\x74\x65","\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73\x55\x70\x64\x61\x74\x65","\x54\x72\x75\x6E\x6B\x20\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A","\x2F","\x73\x70\x6C\x69\x74","\x70\x65\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72\x20\x3D\x3E\x20\x25\x73\x0A","\x63\x6C\x6F\x6E\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x72\x65\x67\x69\x73\x74\x72\x79","\x66\x6F\x72\x6D\x61\x74","\x5B\x25\x73\x5D\x0A","\x6E\x61\x6D\x65","\x6F\x74\x68\x65\x72\x46\x69\x65\x6C\x64\x73","\x25\x73\x0A","\x3B","\x25\x73\x3D\x25\x73\x0A","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C\x6F\x77","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x61\x70","\x61\x73\x74\x65\x72\x69\x73\x6B\x43\x6F\x6E\x66","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x74\x72\x75\x6E\x6B\x73\x2E\x63\x6F\x6E\x66","\x6A\x6F\x69\x6E","\x77","\x30\x37\x37\x37","\x54\x72\x75\x6E\x6B\x73\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x72\x65\x67\x69\x73\x74\x65\x72\x73\x2E\x63\x6F\x6E\x66","\x54\x72\x75\x6E\x6B\x73\x20\x72\x65\x67\x69\x73\x74\x65\x72\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x52\x65\x6C\x6F\x61\x64","\x65\x72\x72\x6F\x72","\x61\x63\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0xd97c[0];var TrunkModel=require(_0xd97c[2])[_0xd97c[1]];var fs=require(_0xd97c[3]);var util=require(_0xd97c[4]);var path=require(_0xd97c[5]);var config=require(_0xd97c[6]);var _=require(_0xd97c[7]);function Trunk(_0x1074x8){console[_0xd97c[9]](_0xd97c[8]);process[_0xd97c[19]](_0xd97c[10],function(_0x1074x9){switch(_0x1074x9[_0xd97c[18]]){case _0xd97c[12]:if(_0x1074x9[_0xd97c[11]]){trunksRewrite(_0x1074x9,_0x1074x8,false)};break;case _0xd97c[16]:if(!_0x1074x9[_0xd97c[14]][_0xd97c[13]]&& !_0x1074x9[_0xd97c[14]][_0xd97c[15]]){trunksRewrite(_0x1074x9,_0x1074x8,false)};break;case _0xd97c[17]:trunksRewrite(_0x1074x9,_0x1074x8,true);break;default:}})}Trunk[_0xd97c[21]][_0xd97c[20]]= function(_0x1074xa){return TrunkModel[_0xd97c[27]]({status:_0x1074xa[_0xd97c[13]]},{where:{defaultuser:_0x1074xa[_0xd97c[24]],host:_0x1074xa[_0xd97c[25]],active:true,$and:[{registry:{$ne:_0xd97c[26]}},{registry:{$ne:null}}]},individualHooks:true,raw:true})[_0xd97c[23]](function(_0x1074xb){console[_0xd97c[9]](_0xd97c[22],_0x1074xb)})};Trunk[_0xd97c[21]][_0xd97c[28]]= function(_0x1074xa){return TrunkModel[_0xd97c[27]]({peerstatus:_0x1074xa[_0xd97c[15]]},{where:{name:_0x1074xa[_0xd97c[32]][_0xd97c[31]](_0xd97c[30])[1]},individualHooks:true,raw:true})[_0xd97c[23]](function(_0x1074xb){console[_0xd97c[9]](_0xd97c[29],_0x1074xb)})};function trunksRewrite(_0x1074x9,_0x1074x8,_0x1074xd){var _0x1074xe=_0xd97c[26];var _0x1074xf=_0xd97c[26];var _0x1074x10=_0xd97c[33];if(!_0x1074xd&& _0x1074x9[_0xd97c[11]]){var _0x1074x11=_[_0xd97c[34]](_0x1074x9);delete _0x1074x11[_0xd97c[35]];delete _0x1074x11[_0xd97c[36]];delete _0x1074x11[_0xd97c[11]];delete _0x1074x11[_0xd97c[13]];delete _0x1074x11[_0xd97c[15]];delete _0x1074x11[_0xd97c[18]];delete _0x1074x11[_0xd97c[14]];if(_0x1074x11[_0xd97c[37]]){_0x1074xf+= util[_0xd97c[38]](_0x1074x10,_0x1074x11[_0xd97c[37]])};delete _0x1074x11[_0xd97c[37]];_0x1074xe+= util[_0xd97c[38]](_0xd97c[39],_0x1074x11[_0xd97c[40]]);if(_0x1074x11[_0xd97c[41]]){_0x1074xe+= util[_0xd97c[38]](_0xd97c[42],_0x1074x11[_0xd97c[41]]);delete _0x1074x11[_0xd97c[41]]};for(var _0x1074x12 in _0x1074x11){if(_0x1074x11[_0x1074x12]){switch(_0x1074x12){case _0xd97c[46]:var _0x1074x13=_0x1074x11[_0x1074x12][_0xd97c[31]](_0xd97c[43]);_0x1074x13[_0xd97c[45]](function(_0x1074x14){_0x1074xe+= util[_0xd97c[38]](_0xd97c[44],_0x1074x12,_0x1074x14)});break;default:_0x1074xe+= util[_0xd97c[38]](_0xd97c[44],_0x1074x12,_0x1074x11[_0x1074x12])}}}};return TrunkModel[_0xd97c[59]]({where:{name:{$ne:_0x1074x9[_0xd97c[40]]},active:true}})[_0xd97c[58]](function(_0x1074x15){var _0x1074x16=_[_0xd97c[48]](_0x1074x15,_0xd97c[47]);_0x1074x16[_0xd97c[45]](function(_0x1074x17){delete _0x1074x17[_0xd97c[35]];delete _0x1074x17[_0xd97c[36]];delete _0x1074x17[_0xd97c[11]];delete _0x1074x17[_0xd97c[13]];delete _0x1074x17[_0xd97c[15]];if(_0x1074x17[_0xd97c[37]]){_0x1074xf+= util[_0xd97c[38]](_0x1074x10,_0x1074x17[_0xd97c[37]])};delete _0x1074x17[_0xd97c[37]];_0x1074xe+= util[_0xd97c[38]](_0xd97c[39],_0x1074x17[_0xd97c[40]]);if(_0x1074x17[_0xd97c[41]]){_0x1074xe+= util[_0xd97c[38]](_0xd97c[42],_0x1074x17[_0xd97c[41]]);delete _0x1074x17[_0xd97c[41]]};for(var _0x1074x12 in _0x1074x17){if(_0x1074x17[_0x1074x12]){switch(_0x1074x12){case _0xd97c[46]:var _0x1074x13=_0x1074x17[_0x1074x12][_0xd97c[31]](_0xd97c[43]);_0x1074x13[_0xd97c[45]](function(_0x1074x14){_0x1074xe+= util[_0xd97c[38]](_0xd97c[44],_0x1074x12,_0x1074x14)});break;default:_0x1074xe+= util[_0xd97c[38]](_0xd97c[44],_0x1074x12,_0x1074x17[_0x1074x12])}}}});fs[_0xd97c[57]](path[_0xd97c[51]](config[_0xd97c[49]],_0xd97c[50]),_0x1074xe,{flags:_0xd97c[52],mode:parseInt(_0xd97c[53],8)},function(_0x1074xb){if(_0x1074xb){throw _0x1074xb};console[_0xd97c[9]](_0xd97c[54]);fs[_0xd97c[57]](path[_0xd97c[51]](config[_0xd97c[49]],_0xd97c[55]),_0x1074xf,{flags:_0xd97c[52],mode:parseInt(_0xd97c[53],8)},function(_0x1074xb){if(_0x1074xb){throw _0x1074xb};reload(_0x1074x8);console[_0xd97c[9]](_0xd97c[56])})})})[_0xd97c[23]](function(_0x1074xb){console[_0xd97c[9]](_0x1074xb)})}function reload(_0x1074x8){_0x1074x8[_0xd97c[62]]({Action:_0xd97c[60]},function(_0x1074xb,_0x1074x19){if(_0x1074xb){console[_0xd97c[61]](_0x1074xb)}else {console[_0xd97c[9]](_0x1074x19)}})}module[_0xd97c[63]]= Trunk
\ No newline at end of file
diff --git a/server/config/ami/user.js b/server/config/ami/user.js
index 328223f..0c0b8b5 100644
--- a/server/config/ami/user.js
+++ b/server/config/ami/user.js
@@ -1,110 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const moment = require('moment');
-const UserModel = require('../../models').User;
-const Promise = require('bluebird');
-const util = require('util');
-
-function User(ami, io) {
-  console.log('QueueMember Initialization...');
-  // process.on('message', function(doc) {
-  //   switch (doc.evt) {
-  //     case 'Agent.afterUpdate':
-  //       !doc.changed.online && prune(ami, doc);
-  //       break;
-  //     default:
-  //   }
-  // });
-
-  // UserModel.afterUpdate(function(doc, options) {
-  //   if (doc.role === 'agent' && doc.changed('online')) {
-  //     doc.dataValues.changed = _.keyBy(doc.changed());
-  //     prune(ami, doc.dataValues);//moved to actions
-  //   }
-  // });
-}
-
-User.prototype.stateUpdate = function(evt, io) {
-  var obj = {
-    status: evt.state,
-    statusAt: moment().format("YYYY-MM-DD HH:mm:ss")
-  }
-  var condition = {
-    name: evt.device.replace('SIP/', '')
-  };
-  return findAndUpdate(obj, condition, io);
-}
-
-User.prototype.queueStatusUpdate = function(status, evt, io) {
-  var obj = {
-    queueStatus: status,
-    queueStatusAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-    lastQueue: evt.queue
-  };
-  var condition = (evt.event === 'QueueCallerAbandon') ? {
-    lastQueue: evt.queue,
-    voicePause: false
-  } : {
-    name: evt.membername,
-    voicePause: false
-  };
-  findAndUpdate(obj, condition, io);
-  if (status === 'connect') {
-    findAndUpdate({
-      queueStatus: 'complete',
-      queueStatusAt: moment().format("YYYY-MM-DD HH:mm:ss")
-    }, {
-      lastQueue: evt.queue,
-      name: {
-        $ne: evt.membername
-      },
-      voicePause: false
-    }, io);
-  }
-}
-
-User.prototype.pause = function(evt, io) {
-  if (parseInt(evt.paused, 10)) {
-    return findAndUpdate({
-      voicePause: true,
-      chatPause: true,
-      mailPause: true,
-      faxPause: true,
-      smsPause: true,
-      openchannelPause: true,
-      pauseType: evt.reason,
-      lastPauseAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-      // queuestatus: 'paused',
-      // queueStatusAt: moment().format("YYYY-MM-DD HH:mm:ss")
-    }, {
-      name: evt.membername
-    }, io);
-  }
-}
-
-function findAndUpdate(obj, condition, io) {
-  return UserModel
-    .update(obj, {
-      where: condition,
-      individualHooks: true,
-      raw: true
-    })
-    .then(function(data) {
-      _.forEach(data[1], function(doc) {
-        var _changed = doc.changed();
-        doc.dataValues.newValues = _.pickBy(doc.dataValues, function(value, key) {
-          return _.has(doc._changed, key) || _.includes(_changed, key) || key === 'id';
-        });
-        io.to(util.format('%s:%s', doc.role, doc.id)).emit('agent:save', doc);
-        io.to('users').emit('agent:save', doc);
-        io.to('admins').emit('agent:save', doc);
-        console.log('[user] status update');
-      });
-    })
-    .catch(function(err) {
-      console.error('[user] status update error: ' + err);
-    });
-}
-
-module.exports = User;
+var _0x29f3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x51\x75\x65\x75\x65\x4D\x65\x6D\x62\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x73\x74\x61\x74\x65\x55\x70\x64\x61\x74\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x73\x74\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x53\x49\x50\x2F","","\x72\x65\x70\x6C\x61\x63\x65","\x64\x65\x76\x69\x63\x65","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x55\x70\x64\x61\x74\x65","\x71\x75\x65\x75\x65","\x65\x76\x65\x6E\x74","\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x70\x61\x75\x73\x65","\x70\x61\x75\x73\x65\x64","\x72\x65\x61\x73\x6F\x6E","\x5B\x75\x73\x65\x72\x5D\x20\x73\x74\x61\x74\x75\x73\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x61\x6C\x6C","\x6C\x65\x6E\x67\x74\x68","\x69\x64","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x70\x75\x73\x68","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x61\x73\x73\x69\x67\x6E","\x61\x67\x65\x6E\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x25\x73\x3A\x25\x73","\x72\x6F\x6C\x65","\x74\x6F","\x75\x73\x65\x72\x73","\x61\x64\x6D\x69\x6E\x73","\x5B\x75\x73\x65\x72\x5D\x20\x73\x74\x61\x74\x75\x73\x20\x75\x70\x64\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x65\x78\x70\x6F\x72\x74\x73"];_0x29f3[0];const _=require(_0x29f3[1]);const moment=require(_0x29f3[2]);const UserModel=require(_0x29f3[4])[_0x29f3[3]];const Promise=require(_0x29f3[5]);const util=require(_0x29f3[6]);function User(_0xbf92x7,_0xbf92x8){console[_0x29f3[8]](_0x29f3[7])}User[_0x29f3[10]][_0x29f3[9]]= function(_0xbf92x9,_0xbf92x8){var _0xbf92xa={status:_0xbf92x9[_0x29f3[11]],statusAt:moment()[_0x29f3[13]](_0x29f3[12])};var _0xbf92xb={name:_0xbf92x9[_0x29f3[17]][_0x29f3[16]](_0x29f3[14],_0x29f3[15])};return findAndUpdate(_0xbf92xa,_0xbf92xb,_0xbf92x8)};User[_0x29f3[10]][_0x29f3[18]]= function(_0xbf92xc,_0xbf92x9,_0xbf92x8){var _0xbf92xa={queueStatus:_0xbf92xc,queueStatusAt:moment()[_0x29f3[13]](_0x29f3[12]),lastQueue:_0xbf92x9[_0x29f3[19]]};var _0xbf92xb=(_0xbf92x9[_0x29f3[20]]=== _0x29f3[21])?{lastQueue:_0xbf92x9[_0x29f3[19]],voicePause:false}:{name:_0xbf92x9[_0x29f3[22]],voicePause:false};findAndUpdate(_0xbf92xa,_0xbf92xb,_0xbf92x8);if(_0xbf92xc=== _0x29f3[23]){findAndUpdate({queueStatus:_0x29f3[24],queueStatusAt:moment()[_0x29f3[13]](_0x29f3[12])},{lastQueue:_0xbf92x9[_0x29f3[19]],name:{$ne:_0xbf92x9[_0x29f3[22]]},voicePause:false},_0xbf92x8)}};User[_0x29f3[10]][_0x29f3[25]]= function(_0xbf92x9,_0xbf92x8){if(parseInt(_0xbf92x9[_0x29f3[26]],10)){return findAndUpdate({voicePause:true,chatPause:true,mailPause:true,faxPause:true,smsPause:true,openchannelPause:true,pauseType:_0xbf92x9[_0x29f3[27]],lastPauseAt:moment()[_0x29f3[13]](_0x29f3[12]),queuestatus:_0x29f3[26],queueStatusAt:moment()[_0x29f3[13]](_0x29f3[12])},{name:_0xbf92x9[_0x29f3[22]]},_0xbf92x8)}};function findAndUpdate(_0xbf92xa,_0xbf92xb,_0xbf92x8){return UserModel[_0x29f3[48]]({where:_0xbf92xb})[_0x29f3[47]](function(_0xbf92xf){var _0xbf92x10=[],_0xbf92x11;if(_0xbf92xf&& _0xbf92xf[_0x29f3[32]]){_[_0x29f3[46]](_0xbf92xf,function(_0xbf92x12){_0xbf92xa[_0x29f3[33]]= _0xbf92x12[_0x29f3[33]];_0xbf92x10[_0x29f3[35]](_0xbf92x12[_0x29f3[34]](_0xbf92xa));_0xbf92x11= _[_0x29f3[37]]({newValues:_0xbf92xa},_0xbf92x12[_0x29f3[36]],_0xbf92xa);_0xbf92x8[_0x29f3[42]](util[_0x29f3[13]](_0x29f3[40],_0xbf92x12[_0x29f3[41]],_0xbf92x12[_0x29f3[33]]))[_0x29f3[39]](_0x29f3[38],_0xbf92x11);_0xbf92x8[_0x29f3[42]](_0x29f3[43])[_0x29f3[39]](_0x29f3[38],_0xbf92x11);_0xbf92x8[_0x29f3[42]](_0x29f3[44])[_0x29f3[39]](_0x29f3[38],_0xbf92x11);console[_0x29f3[8]](_0x29f3[45])})};return _0xbf92x10})[_0x29f3[31]]()[_0x29f3[30]](function(_0xbf92xe){console[_0x29f3[29]](_0x29f3[28]+ _0xbf92xe)})}module[_0x29f3[49]]= User
\ No newline at end of file
diff --git a/server/config/ami/voice_context.js b/server/config/ami/voice_context.js
index 2e0595e..577eb17 100644
--- a/server/config/ami/voice_context.js
+++ b/server/config/ami/voice_context.js
@@ -1,95 +1 @@
-'use strict';
-
-var VoiceContext = require('../../models').VoiceContext;
-var VoiceExtension = require('../../models').VoiceExtension;
-var fs = require('fs');
-var util = require('util');
-var path = require('path');
-var config = require('../../config/environment');
-
-function Context(ami) {
-
-  process.on('message', function(doc) {
-    switch (doc.evt) {
-      case 'VoiceContext.afterCreate':
-        rewriteContexts(doc, ami, false);
-        createHangup(doc);
-        break;
-      case 'VoiceContext.afterDestroy':
-        rewriteContexts(doc, ami, true);
-        break;
-      default:
-    }
-  });
-}
-
-function rewriteContexts(doc, ami, deleteContext) {
-  var contextValues = '';
-  if (!deleteContext) {
-    contextValues = util.format('[%s]\ninclude => %s-custom\nswitch => Realtime\n', doc.name, doc.name);
-  }
-  VoiceContext
-    .findAll({
-      where: {
-        id: {
-          $ne: doc.id
-        }
-      }
-    })
-    .then(function(contexts) {
-      contexts.forEach(function(element) {
-        contextValues += util.format('[%s]\ninclude => %s-custom\nswitch => Realtime\n', element.name, element.name);
-      });
-      fs.writeFile(path.join(config.asteriskConf, 'extensions_xcally_contexts.conf'), contextValues, {
-        flags: 'w',
-        mode: parseInt('0777', 8)
-      }, function(err) {
-        if (err) throw err;
-        console.log("Contexts file saved!");
-        ami.action({
-          Action: 'Reload',
-        }, function(err, res) {
-          if (err) {
-            console.error(err);
-          } else {
-            console.log(res);
-          }
-        });
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-    });
-}
-
-function createHangup(doc) {
-  console.log('create context hangup', doc.name);
-  var data = [{
-    context: doc.name,
-    exten: 'h',
-    priority: '1',
-    VoiceContextId: doc.id,
-    type: 'system',
-    app: 'Hangup'
-  }, {
-    context: doc.name,
-    exten: 'failed',
-    priority: '1',
-    VoiceContextId: doc.id,
-    type: 'system',
-    app: 'Hangup'
-  }];
-
-  return VoiceExtension
-    .bulkCreate(data, {
-      raw: true
-    })
-    .then(function() {
-      console.log('hangup extension created');
-    })
-    .catch(function(err) {
-      console.log(err);
-    });
-}
-
-module.exports = Context;
+var _0xff68=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6D\x65\x73\x73\x61\x67\x65","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x65\x76\x74","\x6F\x6E","","\x5B\x25\x73\x5D\x0A\x69\x6E\x63\x6C\x75\x64\x65\x20\x3D\x3E\x20\x25\x73\x2D\x63\x75\x73\x74\x6F\x6D\x0A\x73\x77\x69\x74\x63\x68\x20\x3D\x3E\x20\x52\x65\x61\x6C\x74\x69\x6D\x65\x0A","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x73\x74\x65\x72\x69\x73\x6B\x43\x6F\x6E\x66","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x63\x6F\x6E\x74\x65\x78\x74\x73\x2E\x63\x6F\x6E\x66","\x6A\x6F\x69\x6E","\x77","\x30\x37\x37\x37","\x43\x6F\x6E\x74\x65\x78\x74\x73\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x52\x65\x6C\x6F\x61\x64","\x65\x72\x72\x6F\x72","\x61\x63\x74\x69\x6F\x6E","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x74\x68\x65\x6E","\x69\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x68\x61\x6E\x67\x75\x70","\x68","\x31","\x73\x79\x73\x74\x65\x6D","\x48\x61\x6E\x67\x75\x70","\x66\x61\x69\x6C\x65\x64","\x68\x61\x6E\x67\x75\x70\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65\x64","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xff68[0];var VoiceContext=require(_0xff68[2])[_0xff68[1]];var VoiceExtension=require(_0xff68[2])[_0xff68[3]];var fs=require(_0xff68[4]);var util=require(_0xff68[5]);var path=require(_0xff68[6]);var config=require(_0xff68[7]);function Context(_0xb217x8){process[_0xff68[12]](_0xff68[8],function(_0xb217x9){switch(_0xb217x9[_0xff68[11]]){case _0xff68[9]:rewriteContexts(_0xb217x9,_0xb217x8,false);createHangup(_0xb217x9);break;case _0xff68[10]:rewriteContexts(_0xb217x9,_0xb217x8,true);break;default:}})}function rewriteContexts(_0xb217x9,_0xb217x8,_0xb217xb){var _0xb217xc=_0xff68[13];if(!_0xb217xb){_0xb217xc= util[_0xff68[16]](_0xff68[14],_0xb217x9[_0xff68[15]],_0xb217x9[_0xff68[15]])};VoiceContext[_0xff68[32]]({where:{id:{$ne:_0xb217x9[_0xff68[31]]}}})[_0xff68[30]](function(_0xb217xe){_0xb217xe[_0xff68[19]](function(_0xb217xf){_0xb217xc+= util[_0xff68[16]](_0xff68[14],_0xb217xf[_0xff68[15]],_0xb217xf[_0xff68[15]])});fs[_0xff68[29]](path[_0xff68[22]](config[_0xff68[20]],_0xff68[21]),_0xb217xc,{flags:_0xff68[23],mode:parseInt(_0xff68[24],8)},function(_0xb217xd){if(_0xb217xd){throw _0xb217xd};console[_0xff68[17]](_0xff68[25]);_0xb217x8[_0xff68[28]]({Action:_0xff68[26]},function(_0xb217xd,_0xb217x10){if(_0xb217xd){console[_0xff68[27]](_0xb217xd)}else {console[_0xff68[17]](_0xb217x10)}})})})[_0xff68[18]](function(_0xb217xd){console[_0xff68[17]](_0xb217xd)})}function createHangup(_0xb217x9){console[_0xff68[17]](_0xff68[33],_0xb217x9[_0xff68[15]]);var _0xb217x12=[{context:_0xb217x9[_0xff68[15]],exten:_0xff68[34],priority:_0xff68[35],VoiceContextId:_0xb217x9[_0xff68[31]],type:_0xff68[36],app:_0xff68[37]},{context:_0xb217x9[_0xff68[15]],exten:_0xff68[38],priority:_0xff68[35],VoiceContextId:_0xb217x9[_0xff68[31]],type:_0xff68[36],app:_0xff68[37]}];return VoiceExtension[_0xff68[40]](_0xb217x12,{raw:true})[_0xff68[30]](function(){console[_0xff68[17]](_0xff68[39])})[_0xff68[18]](function(_0xb217xd){console[_0xff68[17]](_0xb217xd)})}module[_0xff68[41]]= Context
\ No newline at end of file
diff --git a/server/config/analytics.js b/server/config/analytics.js
index e69de29..3a29297 100644
--- a/server/config/analytics.js
+++ b/server/config/analytics.js
@@ -0,0 +1 @@
+var _0xb978=[]
\ No newline at end of file
diff --git a/server/config/autodialer/index.js b/server/config/autodialer/index.js
index a47295f..1869df2 100644
--- a/server/config/autodialer/index.js
+++ b/server/config/autodialer/index.js
@@ -1,125 +1 @@
-'use strict';
-var util = require('util');
-var Process = require('./process');
-
-module.exports = function(ami) {
-
-  console.log('Autodialer Starting...');
-  var proc = new Process();
-
-  proc.getProcesses(function(res, err) {
-    if(err)
-    {
-      console.log(err);
-      return;
-    }
-    // console.log(res.Contacts);
-    // if (util.isArray(res.Contacts))
-    // {
-    //   var contact = res.Contacts;
-    //   console.log(contact);
-    // }
-    // else
-    // {
-    //   var contacts = res.Contacts;
-    //   if (contacts.length)
-    //   {
-    //     contacts.forEach(function(contact) {
-    //       console.log(contact);
-    //     })
-    //   }
-    // }
-
-
-
-  });
-
-}
-
-// var _ = require('lodash');
-//
-// var agents = ['SIP/massimiliano.bungaro', 'SIP/daniele.cinti'];
-// var channels = [];
-// var peers = [];
-// var contacts = ['600', '600', '600'];
-//
-// var ami;
-//
-// function coreshow() {
-//   channels = [];
-//   if (contacts.length > 0) {
-//     ami.action({
-//       action: 'CoreShowChannels'
-//     }, function(err, res) {
-//       if (err) {
-//         console.log(err);
-//       }
-//       console.log(res);
-//     });
-//   }
-//
-// }
-//
-// function peerstatus() {
-//   peers = [];
-//   if (contacts.length > 0) {
-//     ami.action({
-//       action: 'SIPpeerstatus'
-//     }, function(err, res) {
-//       if (err) {
-//         console.log(err);
-//       }
-//       console.log(res);
-//     })
-//   }
-// }
-//
-// module.exports = function(asterisk_manager) {
-//
-//   ami = asterisk_manager;
-//
-//   peerstatus();
-//
-//   ami.on('peerstatus', function(evt) {
-//     if (evt.peerstatus == 'Reachable') {
-//       peers.push(evt.peer);
-//     }
-//   });
-//
-//   ami.on('coreshowchannel', function(evt) {
-//     channels.push(evt.channel.split('-')[0]);
-//   });
-//
-//   ami.on('sippeerstatuscomplete', function(evt) {
-//     coreshow();
-//   });
-//
-//   ami.on('coreshowchannelscomplete', function(evt) {
-//     console.log('Agents registered ', peers);
-//     console.log('Agents in call ', channels);
-//
-//
-//     var agent = _.find(agents, function(agent) {
-//       return !_.includes(channels, agent);
-//     });
-//
-//     if (agent) {
-//       if (_.includes(peers, agent)) {
-//         ami.action({
-//           action: 'originate',
-//           channel: agent,
-//           exten: contacts.pop(),
-//           context: 'demo',
-//           priority: 1,
-//           async: true
-//         }, function(err, res) {
-//           if (err) {
-//             console.log(err);
-//           }
-//           console.log(res);
-//         });
-//       }
-//     }
-//     peerstatus();
-//   });
-// };
+var _0x894c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x2E\x2F\x70\x72\x6F\x63\x65\x73\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x75\x74\x6F\x64\x69\x61\x6C\x65\x72\x20\x53\x74\x61\x72\x74\x69\x6E\x67\x2E\x2E\x2E","\x6C\x6F\x67","\x67\x65\x74\x50\x72\x6F\x63\x65\x73\x73\x65\x73"];_0x894c[0];var util=require(_0x894c[1]);var Process=require(_0x894c[2]);module[_0x894c[3]]= function(_0xda6cx3){console[_0x894c[5]](_0x894c[4]);var _0xda6cx4= new Process();_0xda6cx4[_0x894c[6]](function(_0xda6cx5,_0xda6cx6){if(_0xda6cx6){console[_0x894c[5]](_0xda6cx6);return}})}
\ No newline at end of file
diff --git a/server/config/autodialer/process.js b/server/config/autodialer/process.js
index 7974168..76c5a8a 100644
--- a/server/config/autodialer/process.js
+++ b/server/config/autodialer/process.js
@@ -1,26 +1 @@
-var AutodialerProcess = require('../../models').AutodialerProcess;
-var Contact = require('../../models').Contact;
-
-function Process() {
-  console.log('Process Initialization...');
-}
-
-Process.prototype.getProcesses = function(callback) {
-
-  AutodialerProcess
-  .findAll({
-    where: {
-      enable: true
-    },
-    include: [Contact]
-  })
-  .then(function(res) {
-    callback(res);
-  })
-  .catch(function(err) {
-    callback(null, err);
-  });
-
-}
-
-module.exports = Process;
+var _0x67e7=["\x41\x75\x74\x6F\x64\x69\x61\x6C\x65\x72\x50\x72\x6F\x63\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x6F\x6E\x74\x61\x63\x74","\x50\x72\x6F\x63\x65\x73\x73\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x67\x65\x74\x50\x72\x6F\x63\x65\x73\x73\x65\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x65\x78\x70\x6F\x72\x74\x73"];var AutodialerProcess=require(_0x67e7[1])[_0x67e7[0]];var Contact=require(_0x67e7[1])[_0x67e7[2]];function Process(){console[_0x67e7[4]](_0x67e7[3])}Process[_0x67e7[6]][_0x67e7[5]]= function(_0xc0b4x4){AutodialerProcess[_0x67e7[9]]({where:{enable:true},include:[Contact]})[_0x67e7[8]](function(_0xc0b4x6){_0xc0b4x4(_0xc0b4x6)})[_0x67e7[7]](function(_0xc0b4x5){_0xc0b4x4(null,_0xc0b4x5)})};module[_0x67e7[10]]= Process
\ No newline at end of file
diff --git a/server/config/automations/chat.js b/server/config/automations/chat.js
index a874ea6..2c54ad8 100644
--- a/server/config/automations/chat.js
+++ b/server/config/automations/chat.js
@@ -1,190 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var moment = require('moment');
-
-var Automation = require('../../models').Automation;
-var ChatRoom = require('../../models').ChatRoom;
-var activeChatAutomations = {};
-
-function executeAutomation(id) {
-  console.log('[Automation] Executing Chat', id);
-  var _chatAutomation;
-  return Automation
-    .scope('all')
-    .findById(id)
-    .then(function(chatAutomation) {
-      _chatAutomation = chatAutomation;
-
-      var $or = [];
-      var $and = [];
-      var query = {
-        where: {}
-      };
-
-      chatAutomation.All.forEach(function(condition) {
-        $and.push(getCondition(condition.dataValues));
-      });
-      chatAutomation.Any.forEach(function(condition) {
-        $or.push(getCondition(condition.dataValues));
-      });
-
-      if ($and.length) {
-        query.where.$and = $and;
-      }
-      if ($or.length) {
-        query.where.$or = $or;
-      }
-
-      return ChatRoom.findAll(query);
-    })
-    .then(function(chats) {
-      chats.forEach(function(chat) {
-        _chatAutomation.Actions.forEach(function(action) {
-          switch (action.action) {
-            case 'status':
-              setStatus(chat.id, action.data1);
-              break;
-            default:
-          }
-        });
-      });
-    })
-    .catch(function(err) {
-      console.error('[Automation] Error in Chat exec');
-      console.error('[Automation] Message:', err.message);
-      console.error('[Automation] Stack:', err.stack);
-    });
-}
-
-function setStatus(ticketId, newStatus) {
-  return ChatRoom.update({
-      status: newStatus,
-    }, {
-      where: {
-        id: ticketId
-      }
-    })
-    .catch(function(err) {
-      console.error('[Automation] Error in Mail setStatus');
-      console.error('[Automation] Message:', err.message);
-      console.error('[Automation] Stack:', err.stack);
-    });
-}
-
-function getCondition(condition) {
-  var result = {};
-  switch (condition.field) {
-    case 'status':
-      switch (condition.operator) {
-        case 'equals':
-          result[condition.field] = condition.value;
-          break;
-        case 'not_equals':
-          result[condition.field] = {
-            $ne: condition.value
-          };
-          break;
-        default:
-      }
-      break;
-    case 'createdAt':
-      var compareDate = moment().subtract(parseInt(condition.value, 10), 'hours').format("YYYY-MM-DD HH:mm:ss");
-      switch (condition.operator) {
-        case 'greater':
-          result[condition.field] = {
-            lt: compareDate
-          };
-          break;
-        case 'greater_or_equal':
-          result[condition.field] = {
-            $lte: compareDate
-          };
-          break;
-        case 'less':
-          result[condition.field] = {
-            $gt: compareDate
-          };
-          break;
-        case 'less_or_equal':
-          result[condition.field] = {
-            $gte: compareDate
-          };
-          break;
-        default:
-      }
-      break;
-    default:
-  }
-  return result;
-}
-
-function createInterval(chatAutomation) {
-  console.log('[Automation] Mail', chatAutomation.id, 'set with timeout', chatAutomation.timeout * 60 * 1000);
-  activeChatAutomations['interval' + chatAutomation.id] = setInterval(function() {
-    executeAutomation(chatAutomation.id);
-  }, chatAutomation.timeout * 60 * 1000);
-}
-
-module.exports = function() {
-
-  console.log('[Automation] Chat service started');
-
-  Automation.afterCreate(function(doc, options) {
-    if (doc.channel === 'chat') {
-      console.log('[Automation] Chat', doc.id, 'created, the status is', doc.status);
-      if (doc.status) {
-        createInterval(doc);
-      }
-    }
-  });
-
-  Automation.afterUpdate(function(doc, options) {
-    if (doc.channel === 'chat') {
-      console.log('[Automation] Chat', doc.id, 'updated, the status is', doc.status);
-      if (activeChatAutomations['interval' + doc.id]) {
-        console.log('[Automation] Chat unset ', doc.id);
-        clearInterval(activeChatAutomations['interval' + doc.id]);
-        delete activeChatAutomations['interval' + doc.id];
-      }
-      if (doc.status) {
-        createInterval(doc);
-      }
-    }
-  });
-
-  Automation.afterDelete(function(doc, options) {
-    if (doc.channel === 'chat') {
-      console.log('[Automation] Chat', doc.id, ' deleted');
-      if (activeChatAutomations['interval' + doc.id]) {
-        console.log('[Automation] Chat unset ', doc.id);
-        clearInterval(activeChatAutomations['interval' + doc.id]);
-        delete activeChatAutomations['interval' + doc.id];
-      }
-    }
-  });
-
-  return Automation
-    .scope('all')
-    .findAll({
-      where: {
-        status: true,
-        channel: 'chat'
-      },
-      attributes: ['id', 'timeout']
-    })
-    .then(function(chatAutomations) {
-
-      console.log('[Automation] Chat are', chatAutomations.length);
-
-      chatAutomations.forEach(function(chatAutomation) {
-        createInterval(chatAutomation);
-      });
-
-    })
-    .catch(function(err) {
-      console.error('[Automation] Error in Chat init');
-      console.error('[Automation] Message:', err.message);
-      console.error('[Automation] Stack:', err.stack);
-    });
-};
+var _0x910e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x43\x68\x61\x74","\x6C\x6F\x67","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x43\x68\x61\x74\x20\x65\x78\x65\x63","\x65\x72\x72\x6F\x72","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x63\x61\x74\x63\x68","\x69\x64","\x64\x61\x74\x61\x31","\x73\x74\x61\x74\x75\x73","\x61\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x41\x63\x74\x69\x6F\x6E\x73","\x74\x68\x65\x6E","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x70\x75\x73\x68","\x41\x6C\x6C","\x41\x6E\x79","\x6C\x65\x6E\x67\x74\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x24\x6F\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x4D\x61\x69\x6C\x20\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x65\x71\x75\x61\x6C\x73","\x6E\x6F\x74\x5F\x65\x71\x75\x61\x6C\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x68\x6F\x75\x72\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x67\x72\x65\x61\x74\x65\x72","\x67\x72\x65\x61\x74\x65\x72\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x6C\x65\x73\x73","\x6C\x65\x73\x73\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C","\x73\x65\x74\x20\x77\x69\x74\x68\x20\x74\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x43\x68\x61\x74\x20\x73\x65\x72\x76\x69\x63\x65\x20\x73\x74\x61\x72\x74\x65\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x68\x61\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x43\x68\x61\x74","\x63\x72\x65\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x43\x68\x61\x74\x20\x75\x6E\x73\x65\x74\x20","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x20\x64\x65\x6C\x65\x74\x65\x64","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x43\x68\x61\x74\x20\x69\x6E\x69\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x43\x68\x61\x74\x20\x61\x72\x65"];_0x910e[0];var _=require(_0x910e[1]);var moment=require(_0x910e[2]);var Automation=require(_0x910e[4])[_0x910e[3]];var ChatRoom=require(_0x910e[4])[_0x910e[5]];var activeChatAutomations={};function executeAutomation(_0xec8bx7){console[_0x910e[7]](_0x910e[6],_0xec8bx7);var _0xec8bx8;return Automation[_0x910e[33]](_0x910e[32])[_0x910e[31]](_0xec8bx7)[_0x910e[21]](function(_0xec8bxd){_0xec8bx8= _0xec8bxd;var _0xec8bxe=[];var _0xec8bxf=[];var _0xec8bx10={where:{}};_0xec8bxd[_0x910e[24]][_0x910e[19]](function(_0xec8bx11){_0xec8bxf[_0x910e[23]](getCondition(_0xec8bx11[_0x910e[22]]))});_0xec8bxd[_0x910e[25]][_0x910e[19]](function(_0xec8bx11){_0xec8bxe[_0x910e[23]](getCondition(_0xec8bx11[_0x910e[22]]))});if(_0xec8bxf[_0x910e[26]]){_0xec8bx10[_0x910e[28]][_0x910e[27]]= _0xec8bxf};if(_0xec8bxe[_0x910e[26]]){_0xec8bx10[_0x910e[28]][_0x910e[29]]= _0xec8bxe};return ChatRoom[_0x910e[30]](_0xec8bx10)})[_0x910e[21]](function(_0xec8bxa){_0xec8bxa[_0x910e[19]](function(_0xec8bxb){_0xec8bx8[_0x910e[20]][_0x910e[19]](function(_0xec8bxc){switch(_0xec8bxc[_0x910e[18]]){case _0x910e[17]:setStatus(_0xec8bxb[_0x910e[15]],_0xec8bxc[_0x910e[16]]);break;default:}})})})[_0x910e[14]](function(_0xec8bx9){console[_0x910e[9]](_0x910e[8]);console[_0x910e[9]](_0x910e[10],_0xec8bx9[_0x910e[11]]);console[_0x910e[9]](_0x910e[12],_0xec8bx9[_0x910e[13]])})}function setStatus(_0xec8bx13,_0xec8bx14){return ChatRoom[_0x910e[35]]({status:_0xec8bx14},{where:{id:_0xec8bx13}})[_0x910e[14]](function(_0xec8bx9){console[_0x910e[9]](_0x910e[34]);console[_0x910e[9]](_0x910e[10],_0xec8bx9[_0x910e[11]]);console[_0x910e[9]](_0x910e[12],_0xec8bx9[_0x910e[13]])})}function getCondition(_0xec8bx11){var _0xec8bx16={};switch(_0xec8bx11[_0x910e[36]]){case _0x910e[17]:switch(_0xec8bx11[_0x910e[40]]){case _0x910e[38]:_0xec8bx16[_0xec8bx11[_0x910e[36]]]= _0xec8bx11[_0x910e[37]];break;case _0x910e[39]:_0xec8bx16[_0xec8bx11[_0x910e[36]]]= {$ne:_0xec8bx11[_0x910e[37]]};break;default:};break;case _0x910e[49]:var _0xec8bx17=moment()[_0x910e[44]](parseInt(_0xec8bx11[_0x910e[37]],10),_0x910e[43])[_0x910e[42]](_0x910e[41]);switch(_0xec8bx11[_0x910e[40]]){case _0x910e[45]:_0xec8bx16[_0xec8bx11[_0x910e[36]]]= {lt:_0xec8bx17};break;case _0x910e[46]:_0xec8bx16[_0xec8bx11[_0x910e[36]]]= {$lte:_0xec8bx17};break;case _0x910e[47]:_0xec8bx16[_0xec8bx11[_0x910e[36]]]= {$gt:_0xec8bx17};break;case _0x910e[48]:_0xec8bx16[_0xec8bx11[_0x910e[36]]]= {$gte:_0xec8bx17};break;default:};break;default:};return _0xec8bx16}function createInterval(_0xec8bxd){console[_0x910e[7]](_0x910e[50],_0xec8bxd[_0x910e[15]],_0x910e[51],_0xec8bxd[_0x910e[52]]* 60* 1000);activeChatAutomations[_0x910e[53]+ _0xec8bxd[_0x910e[15]]]= setInterval(function(){executeAutomation(_0xec8bxd[_0x910e[15]])},_0xec8bxd[_0x910e[52]]* 60* 1000)}module[_0x910e[54]]= function(){console[_0x910e[7]](_0x910e[55]);Automation[_0x910e[60]](function(_0xec8bx19,_0xec8bx1a){if(_0xec8bx19[_0x910e[56]]=== _0x910e[57]){console[_0x910e[7]](_0x910e[58],_0xec8bx19[_0x910e[15]],_0x910e[59],_0xec8bx19[_0x910e[17]]);if(_0xec8bx19[_0x910e[17]]){createInterval(_0xec8bx19)}}});Automation[_0x910e[63]](function(_0xec8bx19,_0xec8bx1a){if(_0xec8bx19[_0x910e[56]]=== _0x910e[57]){console[_0x910e[7]](_0x910e[58],_0xec8bx19[_0x910e[15]],_0x910e[61],_0xec8bx19[_0x910e[17]]);if(activeChatAutomations[_0x910e[53]+ _0xec8bx19[_0x910e[15]]]){console[_0x910e[7]](_0x910e[62],_0xec8bx19[_0x910e[15]]);clearInterval(activeChatAutomations[_0x910e[53]+ _0xec8bx19[_0x910e[15]]]);delete activeChatAutomations[_0x910e[53]+ _0xec8bx19[_0x910e[15]]]};if(_0xec8bx19[_0x910e[17]]){createInterval(_0xec8bx19)}}});Automation[_0x910e[65]](function(_0xec8bx19,_0xec8bx1a){if(_0xec8bx19[_0x910e[56]]=== _0x910e[57]){console[_0x910e[7]](_0x910e[58],_0xec8bx19[_0x910e[15]],_0x910e[64]);if(activeChatAutomations[_0x910e[53]+ _0xec8bx19[_0x910e[15]]]){console[_0x910e[7]](_0x910e[62],_0xec8bx19[_0x910e[15]]);clearInterval(activeChatAutomations[_0x910e[53]+ _0xec8bx19[_0x910e[15]]]);delete activeChatAutomations[_0x910e[53]+ _0xec8bx19[_0x910e[15]]]}}});return Automation[_0x910e[33]](_0x910e[32])[_0x910e[30]]({where:{status:true,channel:_0x910e[57]},attributes:[_0x910e[15],_0x910e[52]]})[_0x910e[21]](function(_0xec8bx1b){console[_0x910e[7]](_0x910e[67],_0xec8bx1b[_0x910e[26]]);_0xec8bx1b[_0x910e[19]](function(_0xec8bxd){createInterval(_0xec8bxd)})})[_0x910e[14]](function(_0xec8bx9){console[_0x910e[9]](_0x910e[66]);console[_0x910e[9]](_0x910e[10],_0xec8bx9[_0x910e[11]]);console[_0x910e[9]](_0x910e[12],_0xec8bx9[_0x910e[13]])})}
\ No newline at end of file
diff --git a/server/config/automations/fax.js b/server/config/automations/fax.js
index d69bba5..11912ae 100644
--- a/server/config/automations/fax.js
+++ b/server/config/automations/fax.js
@@ -1,191 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var moment = require('moment');
-
-var Automation = require('../../models').Automation;
-var FaxRoom = require('../../models').FaxRoom;
-var activeFaxAutomations = {};
-
-function executeAutomation(id) {
-  console.log('[Automation] Executing Fax', id);
-  var _faxAutomation;
-  return Automation
-    .scope('all')
-    .findById(id)
-    .then(function(faxAutomation) {
-      _faxAutomation = faxAutomation;
-
-      var $or = [];
-      var $and = [];
-      var query = {
-        where: {}
-      };
-
-      faxAutomation.All.forEach(function(condition) {
-        $and.push(getCondition(condition.dataValues));
-      });
-      faxAutomation.Any.forEach(function(condition) {
-        $or.push(getCondition(condition.dataValues));
-      });
-
-      if ($and.length) {
-        query.where.$and = $and;
-      }
-      if ($or.length) {
-        query.where.$or = $or;
-      }
-
-      return FaxRoom
-        .findAll(query);
-    })
-    .then(function(faxes) {
-      faxes.forEach(function(fax) {
-        _faxAutomation.Actions.forEach(function(action) {
-          switch (action.action) {
-            case 'status':
-              setStatus(fax.id, action.data1);
-              break;
-            default:
-          }
-        });
-      });
-    })
-    .catch(function(err) {
-      console.error('[Automation] Error in Fax exec');
-      console.error('[Automation] Message:', err.message);
-      console.error('[Automation] Stack:', err.stack);
-    });
-}
-
-function setStatus(ticketId, newStatus) {
-  return FaxRoom.update({
-      status: newStatus,
-    }, {
-      where: {
-        id: ticketId
-      }
-    })
-    .catch(function(err) {
-      console.error('[Automation] Error in Fax setStatus');
-      console.error('[Automation] Message:', err.message);
-      console.error('[Automation] Stack:', err.stack);
-    });
-}
-
-function getCondition(condition) {
-  var result = {};
-  switch (condition.field) {
-    case 'status':
-      switch (condition.operator) {
-        case 'equals':
-          result[condition.field] = condition.value;
-          break;
-        case 'not_equals':
-          result[condition.field] = {
-            $ne: condition.value
-          };
-          break;
-        default:
-      }
-      break;
-    case 'createdAt':
-      var compareDate = moment().subtract(parseInt(condition.value, 10), 'hours').format("YYYY-MM-DD HH:mm:ss");
-      switch (condition.operator) {
-        case 'greater':
-          result[condition.field] = {
-            lt: compareDate
-          };
-          break;
-        case 'greater_or_equal':
-          result[condition.field] = {
-            $lte: compareDate
-          };
-          break;
-        case 'less':
-          result[condition.field] = {
-            $gt: compareDate
-          };
-          break;
-        case 'less_or_equal':
-          result[condition.field] = {
-            $gte: compareDate
-          };
-          break;
-        default:
-      }
-      break;
-    default:
-  }
-  return result;
-}
-
-function createInterval(faxAutomation) {
-  console.log('[Automation] Mail', faxAutomation.id, 'set with timeout', faxAutomation.timeout * 60 * 1000);
-  activeFaxAutomations['interval' + faxAutomation.id] = setInterval(function() {
-    executeAutomation(faxAutomation.id);
-  }, faxAutomation.timeout * 60 * 1000);
-}
-
-module.exports = function() {
-
-  console.log('[Automation] Fax service started');
-
-  Automation.afterCreate(function(doc, options) {
-    if (doc.channel === 'fax') {
-      console.log('[Automation] Fax', doc.id, 'created, the status is', doc.status);
-      if (doc.status) {
-        createInterval(doc);
-      }
-    }
-  });
-
-  Automation.afterUpdate(function(doc, options) {
-    if (doc.channel === 'fax') {
-      console.log('[Automation] Fax', doc.id, 'updated, the status is', doc.status);
-      if (activeFaxAutomations['interval' + doc.id]) {
-        console.log('[Automation] Fax unset ', doc.id);
-        clearInterval(activeFaxAutomations['interval' + doc.id]);
-        delete activeFaxAutomations['interval' + doc.id];
-      }
-      if (doc.status) {
-        createInterval(doc);
-      }
-    }
-  });
-
-  Automation.afterDelete(function(doc, options) {
-    if (doc.channel === 'fax') {
-      console.log('[Automation] Fax', doc.id, ' deleted');
-      if (activeFaxAutomations['interval' + doc.id]) {
-        console.log('[Automation] Fax unset ', doc.id);
-        clearInterval(activeFaxAutomations['interval' + doc.id]);
-        delete activeFaxAutomations['interval' + doc.id];
-      }
-    }
-  });
-
-  return Automation
-    .scope('all')
-    .findAll({
-      where: {
-        status: true,
-        channel: 'fax'
-      },
-      attributes: ['id', 'timeout']
-    })
-    .then(function(faxAutomations) {
-
-      console.log('[Automation] Fax are', faxAutomations.length);
-
-      faxAutomations.forEach(function(faxAutomation) {
-        createInterval(faxAutomation);
-      });
-
-    })
-    .catch(function(err) {
-      console.error('[Automation] Error in Mail init');
-      console.error('[Automation] Message:', err.message);
-      console.error('[Automation] Stack:', err.stack);
-    });
-};
+var _0xb749=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x46\x61\x78","\x6C\x6F\x67","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x46\x61\x78\x20\x65\x78\x65\x63","\x65\x72\x72\x6F\x72","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x63\x61\x74\x63\x68","\x69\x64","\x64\x61\x74\x61\x31","\x73\x74\x61\x74\x75\x73","\x61\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x41\x63\x74\x69\x6F\x6E\x73","\x74\x68\x65\x6E","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x70\x75\x73\x68","\x41\x6C\x6C","\x41\x6E\x79","\x6C\x65\x6E\x67\x74\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x24\x6F\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x46\x61\x78\x20\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x65\x71\x75\x61\x6C\x73","\x6E\x6F\x74\x5F\x65\x71\x75\x61\x6C\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x68\x6F\x75\x72\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x67\x72\x65\x61\x74\x65\x72","\x67\x72\x65\x61\x74\x65\x72\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x6C\x65\x73\x73","\x6C\x65\x73\x73\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C","\x73\x65\x74\x20\x77\x69\x74\x68\x20\x74\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x46\x61\x78\x20\x73\x65\x72\x76\x69\x63\x65\x20\x73\x74\x61\x72\x74\x65\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x66\x61\x78","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x46\x61\x78","\x63\x72\x65\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x46\x61\x78\x20\x75\x6E\x73\x65\x74\x20","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x20\x64\x65\x6C\x65\x74\x65\x64","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x4D\x61\x69\x6C\x20\x69\x6E\x69\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x46\x61\x78\x20\x61\x72\x65"];_0xb749[0];var _=require(_0xb749[1]);var moment=require(_0xb749[2]);var Automation=require(_0xb749[4])[_0xb749[3]];var FaxRoom=require(_0xb749[4])[_0xb749[5]];var activeFaxAutomations={};function executeAutomation(_0x6f68x7){console[_0xb749[7]](_0xb749[6],_0x6f68x7);var _0x6f68x8;return Automation[_0xb749[33]](_0xb749[32])[_0xb749[31]](_0x6f68x7)[_0xb749[21]](function(_0x6f68xd){_0x6f68x8= _0x6f68xd;var _0x6f68xe=[];var _0x6f68xf=[];var _0x6f68x10={where:{}};_0x6f68xd[_0xb749[24]][_0xb749[19]](function(_0x6f68x11){_0x6f68xf[_0xb749[23]](getCondition(_0x6f68x11[_0xb749[22]]))});_0x6f68xd[_0xb749[25]][_0xb749[19]](function(_0x6f68x11){_0x6f68xe[_0xb749[23]](getCondition(_0x6f68x11[_0xb749[22]]))});if(_0x6f68xf[_0xb749[26]]){_0x6f68x10[_0xb749[28]][_0xb749[27]]= _0x6f68xf};if(_0x6f68xe[_0xb749[26]]){_0x6f68x10[_0xb749[28]][_0xb749[29]]= _0x6f68xe};return FaxRoom[_0xb749[30]](_0x6f68x10)})[_0xb749[21]](function(_0x6f68xa){_0x6f68xa[_0xb749[19]](function(_0x6f68xb){_0x6f68x8[_0xb749[20]][_0xb749[19]](function(_0x6f68xc){switch(_0x6f68xc[_0xb749[18]]){case _0xb749[17]:setStatus(_0x6f68xb[_0xb749[15]],_0x6f68xc[_0xb749[16]]);break;default:}})})})[_0xb749[14]](function(_0x6f68x9){console[_0xb749[9]](_0xb749[8]);console[_0xb749[9]](_0xb749[10],_0x6f68x9[_0xb749[11]]);console[_0xb749[9]](_0xb749[12],_0x6f68x9[_0xb749[13]])})}function setStatus(_0x6f68x13,_0x6f68x14){return FaxRoom[_0xb749[35]]({status:_0x6f68x14},{where:{id:_0x6f68x13}})[_0xb749[14]](function(_0x6f68x9){console[_0xb749[9]](_0xb749[34]);console[_0xb749[9]](_0xb749[10],_0x6f68x9[_0xb749[11]]);console[_0xb749[9]](_0xb749[12],_0x6f68x9[_0xb749[13]])})}function getCondition(_0x6f68x11){var _0x6f68x16={};switch(_0x6f68x11[_0xb749[36]]){case _0xb749[17]:switch(_0x6f68x11[_0xb749[40]]){case _0xb749[38]:_0x6f68x16[_0x6f68x11[_0xb749[36]]]= _0x6f68x11[_0xb749[37]];break;case _0xb749[39]:_0x6f68x16[_0x6f68x11[_0xb749[36]]]= {$ne:_0x6f68x11[_0xb749[37]]};break;default:};break;case _0xb749[49]:var _0x6f68x17=moment()[_0xb749[44]](parseInt(_0x6f68x11[_0xb749[37]],10),_0xb749[43])[_0xb749[42]](_0xb749[41]);switch(_0x6f68x11[_0xb749[40]]){case _0xb749[45]:_0x6f68x16[_0x6f68x11[_0xb749[36]]]= {lt:_0x6f68x17};break;case _0xb749[46]:_0x6f68x16[_0x6f68x11[_0xb749[36]]]= {$lte:_0x6f68x17};break;case _0xb749[47]:_0x6f68x16[_0x6f68x11[_0xb749[36]]]= {$gt:_0x6f68x17};break;case _0xb749[48]:_0x6f68x16[_0x6f68x11[_0xb749[36]]]= {$gte:_0x6f68x17};break;default:};break;default:};return _0x6f68x16}function createInterval(_0x6f68xd){console[_0xb749[7]](_0xb749[50],_0x6f68xd[_0xb749[15]],_0xb749[51],_0x6f68xd[_0xb749[52]]* 60* 1000);activeFaxAutomations[_0xb749[53]+ _0x6f68xd[_0xb749[15]]]= setInterval(function(){executeAutomation(_0x6f68xd[_0xb749[15]])},_0x6f68xd[_0xb749[52]]* 60* 1000)}module[_0xb749[54]]= function(){console[_0xb749[7]](_0xb749[55]);Automation[_0xb749[60]](function(_0x6f68x19,_0x6f68x1a){if(_0x6f68x19[_0xb749[56]]=== _0xb749[57]){console[_0xb749[7]](_0xb749[58],_0x6f68x19[_0xb749[15]],_0xb749[59],_0x6f68x19[_0xb749[17]]);if(_0x6f68x19[_0xb749[17]]){createInterval(_0x6f68x19)}}});Automation[_0xb749[63]](function(_0x6f68x19,_0x6f68x1a){if(_0x6f68x19[_0xb749[56]]=== _0xb749[57]){console[_0xb749[7]](_0xb749[58],_0x6f68x19[_0xb749[15]],_0xb749[61],_0x6f68x19[_0xb749[17]]);if(activeFaxAutomations[_0xb749[53]+ _0x6f68x19[_0xb749[15]]]){console[_0xb749[7]](_0xb749[62],_0x6f68x19[_0xb749[15]]);clearInterval(activeFaxAutomations[_0xb749[53]+ _0x6f68x19[_0xb749[15]]]);delete activeFaxAutomations[_0xb749[53]+ _0x6f68x19[_0xb749[15]]]};if(_0x6f68x19[_0xb749[17]]){createInterval(_0x6f68x19)}}});Automation[_0xb749[65]](function(_0x6f68x19,_0x6f68x1a){if(_0x6f68x19[_0xb749[56]]=== _0xb749[57]){console[_0xb749[7]](_0xb749[58],_0x6f68x19[_0xb749[15]],_0xb749[64]);if(activeFaxAutomations[_0xb749[53]+ _0x6f68x19[_0xb749[15]]]){console[_0xb749[7]](_0xb749[62],_0x6f68x19[_0xb749[15]]);clearInterval(activeFaxAutomations[_0xb749[53]+ _0x6f68x19[_0xb749[15]]]);delete activeFaxAutomations[_0xb749[53]+ _0x6f68x19[_0xb749[15]]]}}});return Automation[_0xb749[33]](_0xb749[32])[_0xb749[30]]({where:{status:true,channel:_0xb749[57]},attributes:[_0xb749[15],_0xb749[52]]})[_0xb749[21]](function(_0x6f68x1b){console[_0xb749[7]](_0xb749[67],_0x6f68x1b[_0xb749[26]]);_0x6f68x1b[_0xb749[19]](function(_0x6f68xd){createInterval(_0x6f68xd)})})[_0xb749[14]](function(_0x6f68x9){console[_0xb749[9]](_0xb749[66]);console[_0xb749[9]](_0xb749[10],_0x6f68x9[_0xb749[11]]);console[_0xb749[9]](_0xb749[12],_0x6f68x9[_0xb749[13]])})}
\ No newline at end of file
diff --git a/server/config/automations/mail.js b/server/config/automations/mail.js
index ec240d2..d8c953d 100644
--- a/server/config/automations/mail.js
+++ b/server/config/automations/mail.js
@@ -1,191 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var moment = require('moment');
-
-var Automation = require('../../models').Automation;
-var MailRoom = require('../../models').MailRoom;
-var activeMailAutomations = {};
-
-function executeAutomation(id) {
-  console.log('[Automation] Executing Mail', id);
-  var _mailAutomation;
-  return Automation
-    .scope('all')
-    .findById(id)
-    .then(function(mailAutomation) {
-      _mailAutomation = mailAutomation;
-
-      var $or = [];
-      var $and = [];
-      var query = {
-        where: {}
-      };
-
-      mailAutomation.All.forEach(function(condition) {
-        $and.push(getCondition(condition.dataValues));
-      });
-      mailAutomation.Any.forEach(function(condition) {
-        $or.push(getCondition(condition.dataValues));
-      });
-
-      if ($and.length) {
-        query.where.$and = $and;
-      }
-      if ($or.length) {
-        query.where.$or = $or;
-      }
-
-      return MailRoom
-        .findAll(query);
-    })
-    .then(function(mails) {
-      mails.forEach(function(mail) {
-        _mailAutomation.Actions.forEach(function(action) {
-          switch (action.action) {
-            case 'status':
-              setStatus(mail.id, action.data1);
-              break;
-            default:
-          }
-        });
-      });
-    })
-    .catch(function(err) {
-      console.error('[Automation] Error in Mail exec');
-      console.error('[Automation] Message:', err.message);
-      console.error('[Automation] Stack:', err.stack);
-    });
-}
-
-function setStatus(ticketId, newStatus) {
-  return MailRoom.update({
-      status: newStatus,
-    }, {
-      where: {
-        id: ticketId
-      }
-    })
-    .catch(function(err) {
-      console.error('[Automation] Error in Mail setStatus');
-      console.error('[Automation] Message:', err.message);
-      console.error('[Automation] Stack:', err.stack);
-    });
-}
-
-function getCondition(condition) {
-  var result = {};
-  switch (condition.field) {
-    case 'status':
-      switch (condition.operator) {
-        case 'equals':
-          result[condition.field] = condition.value;
-          break;
-        case 'not_equals':
-          result[condition.field] = {
-            $ne: condition.value
-          };
-          break;
-        default:
-      }
-      break;
-    case 'createdAt':
-      var compareDate = moment().subtract(parseInt(condition.value, 10), 'hours').format("YYYY-MM-DD HH:mm:ss");
-      switch (condition.operator) {
-        case 'greater':
-          result[condition.field] = {
-            lt: compareDate
-          };
-          break;
-        case 'greater_or_equal':
-          result[condition.field] = {
-            $lte: compareDate
-          };
-          break;
-        case 'less':
-          result[condition.field] = {
-            $gt: compareDate
-          };
-          break;
-        case 'less_or_equal':
-          result[condition.field] = {
-            $gte: compareDate
-          };
-          break;
-        default:
-      }
-      break;
-    default:
-  }
-  return result;
-}
-
-function createInterval(mailAutomation) {
-  console.log('[Automation] Mail', mailAutomation.id, 'set with timeout', mailAutomation.timeout * 60 * 1000);
-  activeMailAutomations['interval' + mailAutomation.id] = setInterval(function() {
-    executeAutomation(mailAutomation.id);
-  }, mailAutomation.timeout * 60 * 1000);
-}
-
-module.exports = function() {
-
-  console.log('[Automation] Mail service started');
-
-  Automation.afterCreate(function(doc, options) {
-    if (doc.channel === 'mail') {
-      console.log('[Automation] Mail', doc.id, 'created, the status is', doc.status);
-      if (doc.status) {
-        createInterval(doc);
-      }
-    }
-  });
-
-  Automation.afterUpdate(function(doc, options) {
-    if (doc.channel === 'mail') {
-      console.log('[Automation] Mail', doc.id, 'updated, the status is', doc.status);
-      if (activeMailAutomations['interval' + doc.id]) {
-        console.log('[Automation] Mail unset ', doc.id);
-        clearInterval(activeMailAutomations['interval' + doc.id]);
-        delete activeMailAutomations['interval' + doc.id];
-      }
-      if (doc.status) {
-        createInterval(doc);
-      }
-    }
-  });
-
-  Automation.afterDestroy(function(doc, options) {
-    if (doc.channel === 'mail') {
-      console.log('[Automation] Mail', doc.id, ' deleted');
-      if (activeMailAutomations['interval' + doc.id]) {
-        console.log('[Automation] Mail unset ', doc.id);
-        clearInterval(activeMailAutomations['interval' + doc.id]);
-        delete activeMailAutomations['interval' + doc.id];
-      }
-    }
-  });
-
-  return Automation
-    .scope('all')
-    .findAll({
-      where: {
-        status: true,
-        channel: 'mail'
-      },
-      attributes: ['id', 'timeout']
-    })
-    .then(function(mailAutomations) {
-
-      console.log('[Automation] Mail are', mailAutomations.length);
-
-      mailAutomations.forEach(function(mailAutomation) {
-        createInterval(mailAutomation);
-      });
-
-    })
-    .catch(function(err) {
-      console.error('[Automation] Error in Mail init');
-      console.error('[Automation] Message:', err.message);
-      console.error('[Automation] Stack:', err.stack);
-    });
-};
+var _0x8a1b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x4D\x61\x69\x6C","\x6C\x6F\x67","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x4D\x61\x69\x6C\x20\x65\x78\x65\x63","\x65\x72\x72\x6F\x72","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x63\x61\x74\x63\x68","\x69\x64","\x64\x61\x74\x61\x31","\x73\x74\x61\x74\x75\x73","\x61\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x41\x63\x74\x69\x6F\x6E\x73","\x74\x68\x65\x6E","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x70\x75\x73\x68","\x41\x6C\x6C","\x41\x6E\x79","\x6C\x65\x6E\x67\x74\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x24\x6F\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x4D\x61\x69\x6C\x20\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x65\x71\x75\x61\x6C\x73","\x6E\x6F\x74\x5F\x65\x71\x75\x61\x6C\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x68\x6F\x75\x72\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x67\x72\x65\x61\x74\x65\x72","\x67\x72\x65\x61\x74\x65\x72\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x6C\x65\x73\x73","\x6C\x65\x73\x73\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C","\x73\x65\x74\x20\x77\x69\x74\x68\x20\x74\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C\x20\x73\x65\x72\x76\x69\x63\x65\x20\x73\x74\x61\x72\x74\x65\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x6D\x61\x69\x6C","\x63\x72\x65\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C\x20\x75\x6E\x73\x65\x74\x20","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x20\x64\x65\x6C\x65\x74\x65\x64","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x4D\x61\x69\x6C\x20\x69\x6E\x69\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C\x20\x61\x72\x65"];_0x8a1b[0];var _=require(_0x8a1b[1]);var moment=require(_0x8a1b[2]);var Automation=require(_0x8a1b[4])[_0x8a1b[3]];var MailRoom=require(_0x8a1b[4])[_0x8a1b[5]];var activeMailAutomations={};function executeAutomation(_0x460ax7){console[_0x8a1b[7]](_0x8a1b[6],_0x460ax7);var _0x460ax8;return Automation[_0x8a1b[33]](_0x8a1b[32])[_0x8a1b[31]](_0x460ax7)[_0x8a1b[21]](function(_0x460axd){_0x460ax8= _0x460axd;var _0x460axe=[];var _0x460axf=[];var _0x460ax10={where:{}};_0x460axd[_0x8a1b[24]][_0x8a1b[19]](function(_0x460ax11){_0x460axf[_0x8a1b[23]](getCondition(_0x460ax11[_0x8a1b[22]]))});_0x460axd[_0x8a1b[25]][_0x8a1b[19]](function(_0x460ax11){_0x460axe[_0x8a1b[23]](getCondition(_0x460ax11[_0x8a1b[22]]))});if(_0x460axf[_0x8a1b[26]]){_0x460ax10[_0x8a1b[28]][_0x8a1b[27]]= _0x460axf};if(_0x460axe[_0x8a1b[26]]){_0x460ax10[_0x8a1b[28]][_0x8a1b[29]]= _0x460axe};return MailRoom[_0x8a1b[30]](_0x460ax10)})[_0x8a1b[21]](function(_0x460axa){_0x460axa[_0x8a1b[19]](function(_0x460axb){_0x460ax8[_0x8a1b[20]][_0x8a1b[19]](function(_0x460axc){switch(_0x460axc[_0x8a1b[18]]){case _0x8a1b[17]:setStatus(_0x460axb[_0x8a1b[15]],_0x460axc[_0x8a1b[16]]);break;default:}})})})[_0x8a1b[14]](function(_0x460ax9){console[_0x8a1b[9]](_0x8a1b[8]);console[_0x8a1b[9]](_0x8a1b[10],_0x460ax9[_0x8a1b[11]]);console[_0x8a1b[9]](_0x8a1b[12],_0x460ax9[_0x8a1b[13]])})}function setStatus(_0x460ax13,_0x460ax14){return MailRoom[_0x8a1b[35]]({status:_0x460ax14},{where:{id:_0x460ax13}})[_0x8a1b[14]](function(_0x460ax9){console[_0x8a1b[9]](_0x8a1b[34]);console[_0x8a1b[9]](_0x8a1b[10],_0x460ax9[_0x8a1b[11]]);console[_0x8a1b[9]](_0x8a1b[12],_0x460ax9[_0x8a1b[13]])})}function getCondition(_0x460ax11){var _0x460ax16={};switch(_0x460ax11[_0x8a1b[36]]){case _0x8a1b[17]:switch(_0x460ax11[_0x8a1b[40]]){case _0x8a1b[38]:_0x460ax16[_0x460ax11[_0x8a1b[36]]]= _0x460ax11[_0x8a1b[37]];break;case _0x8a1b[39]:_0x460ax16[_0x460ax11[_0x8a1b[36]]]= {$ne:_0x460ax11[_0x8a1b[37]]};break;default:};break;case _0x8a1b[49]:var _0x460ax17=moment()[_0x8a1b[44]](parseInt(_0x460ax11[_0x8a1b[37]],10),_0x8a1b[43])[_0x8a1b[42]](_0x8a1b[41]);switch(_0x460ax11[_0x8a1b[40]]){case _0x8a1b[45]:_0x460ax16[_0x460ax11[_0x8a1b[36]]]= {lt:_0x460ax17};break;case _0x8a1b[46]:_0x460ax16[_0x460ax11[_0x8a1b[36]]]= {$lte:_0x460ax17};break;case _0x8a1b[47]:_0x460ax16[_0x460ax11[_0x8a1b[36]]]= {$gt:_0x460ax17};break;case _0x8a1b[48]:_0x460ax16[_0x460ax11[_0x8a1b[36]]]= {$gte:_0x460ax17};break;default:};break;default:};return _0x460ax16}function createInterval(_0x460axd){console[_0x8a1b[7]](_0x8a1b[50],_0x460axd[_0x8a1b[15]],_0x8a1b[51],_0x460axd[_0x8a1b[52]]* 60* 1000);activeMailAutomations[_0x8a1b[53]+ _0x460axd[_0x8a1b[15]]]= setInterval(function(){executeAutomation(_0x460axd[_0x8a1b[15]])},_0x460axd[_0x8a1b[52]]* 60* 1000)}module[_0x8a1b[54]]= function(){console[_0x8a1b[7]](_0x8a1b[55]);Automation[_0x8a1b[59]](function(_0x460ax19,_0x460ax1a){if(_0x460ax19[_0x8a1b[56]]=== _0x8a1b[57]){console[_0x8a1b[7]](_0x8a1b[50],_0x460ax19[_0x8a1b[15]],_0x8a1b[58],_0x460ax19[_0x8a1b[17]]);if(_0x460ax19[_0x8a1b[17]]){createInterval(_0x460ax19)}}});Automation[_0x8a1b[62]](function(_0x460ax19,_0x460ax1a){if(_0x460ax19[_0x8a1b[56]]=== _0x8a1b[57]){console[_0x8a1b[7]](_0x8a1b[50],_0x460ax19[_0x8a1b[15]],_0x8a1b[60],_0x460ax19[_0x8a1b[17]]);if(activeMailAutomations[_0x8a1b[53]+ _0x460ax19[_0x8a1b[15]]]){console[_0x8a1b[7]](_0x8a1b[61],_0x460ax19[_0x8a1b[15]]);clearInterval(activeMailAutomations[_0x8a1b[53]+ _0x460ax19[_0x8a1b[15]]]);delete activeMailAutomations[_0x8a1b[53]+ _0x460ax19[_0x8a1b[15]]]};if(_0x460ax19[_0x8a1b[17]]){createInterval(_0x460ax19)}}});Automation[_0x8a1b[64]](function(_0x460ax19,_0x460ax1a){if(_0x460ax19[_0x8a1b[56]]=== _0x8a1b[57]){console[_0x8a1b[7]](_0x8a1b[50],_0x460ax19[_0x8a1b[15]],_0x8a1b[63]);if(activeMailAutomations[_0x8a1b[53]+ _0x460ax19[_0x8a1b[15]]]){console[_0x8a1b[7]](_0x8a1b[61],_0x460ax19[_0x8a1b[15]]);clearInterval(activeMailAutomations[_0x8a1b[53]+ _0x460ax19[_0x8a1b[15]]]);delete activeMailAutomations[_0x8a1b[53]+ _0x460ax19[_0x8a1b[15]]]}}});return Automation[_0x8a1b[33]](_0x8a1b[32])[_0x8a1b[30]]({where:{status:true,channel:_0x8a1b[57]},attributes:[_0x8a1b[15],_0x8a1b[52]]})[_0x8a1b[21]](function(_0x460ax1b){console[_0x8a1b[7]](_0x8a1b[66],_0x460ax1b[_0x8a1b[26]]);_0x460ax1b[_0x8a1b[19]](function(_0x460axd){createInterval(_0x460axd)})})[_0x8a1b[14]](function(_0x460ax9){console[_0x8a1b[9]](_0x8a1b[65]);console[_0x8a1b[9]](_0x8a1b[10],_0x460ax9[_0x8a1b[11]]);console[_0x8a1b[9]](_0x8a1b[12],_0x460ax9[_0x8a1b[13]])})}
\ No newline at end of file
diff --git a/server/config/chat.js b/server/config/chat.js
index eff997c..3656e92 100644
--- a/server/config/chat.js
+++ b/server/config/chat.js
@@ -1,109 +1 @@
-'use strict';
-var ChatWebsite = require('../models').ChatWebsite;
-var ChatRoom = require('../models').ChatRoom;
-var Website = require('./chat');
-var ReportChat = require('../models').ReportChat;
-var _ = require('lodash');
-var Util = require('./util');
-var chatwebsites;
-
-module.exports = function() {
-
-  return ChatWebsite
-    .findAll()
-    .then(function(websites) {
-      console.log('CHAT website Initialization');
-      chatwebsites = websites;
-      synch(chatwebsites);
-      ReportChat.afterUpdate(function(doc) {
-        var website = _.find(chatwebsites, {
-          id: doc.websiteid
-        });
-        if (website && doc.changed('connectid')) {
-          webhook(doc, website, 'accept');
-        }
-        if (website && doc.changed('rejectedAt')) {
-          webhook(doc, website, 'reject');
-        }
-      });
-      ChatRoom.afterUpdate(function(doc) {
-        var website = _.find(chatwebsites, {
-          id: doc.ChatWebsiteId
-        });
-        if (website && doc.changed('status') && doc.status === 'CLOSED') {
-          webhook(doc, website, 'close');
-        }
-      })
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-function webhook(doc, website, hook) {
-  var _website = website;
-  switch (hook) {
-    case 'accept':
-      if (_website.acceptMethod && _website.acceptUrl) {
-        console.log('Chat website <' + _website.name + '> executing accept webhook');
-        execRequest(doc.dataValues, _website.acceptMethod, _website.acceptUrl);
-      }
-      if (_website.actions.length) {
-        _.forEach(_website.actions, function(action) {
-          if (action.enabled) {
-            Util.execAction(action, doc);
-          }
-        })
-      }
-      break;
-    case 'reject':
-      if (_website.rejectMethod && _website.rejectUrl) {
-        console.log('Chat website <' + _website.name + '> executing reject webhook');
-        execRequest(doc.dataValues, _website.rejectMethod, _website.rejectUrl);
-      }
-      break;
-    case 'close':
-      if (_website.closeMethod && _website.closeUrl) {
-        console.log('Chat website <' + _website.name + '> executing close webhook');
-        execRequest(doc.dataValues, _website.closeMethod, _website.closeUrl);
-      }
-      break;
-    default:
-      console.log('Webhook not recognized');
-  }
-}
-
-function execRequest(doc, method, url) {
-  Util.sendRequest(doc, method, url)
-    .then(function(values) {
-      console.log('request successeful!');
-    })
-    .catch(function(err) {
-      console.log('request failed!');
-    })
-}
-
-
-function synch(chatwebsites) {
-  ChatWebsite.afterCreate(function(doc) {
-    console.log('Chat website: ' + doc.name + ' Create');
-    chatwebsites.push(doc);
-  });
-  ChatWebsite.afterUpdate(function(doc) {
-    var oldItem = _.find(chatwebsites, {
-      id: doc.id
-    });
-    if (oldItem) {
-      console.log('Chat website: ' + oldItem.name + ' Update');
-      _.merge(oldItem, doc);
-    } else {
-      chatwebsites.unshift(doc);
-    }
-  });
-  ChatWebsite.afterDestroy(function(doc) {
-    _.remove(chatwebsites, {
-      id: doc.id
-    });
-  });
-
-}
+var _0xf075=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2F\x63\x68\x61\x74","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x75\x74\x69\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x43\x48\x41\x54\x20\x77\x65\x62\x73\x69\x74\x65\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E","\x6C\x6F\x67","\x77\x65\x62\x73\x69\x74\x65\x69\x64","\x66\x69\x6E\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x63\x68\x61\x6E\x67\x65\x64","\x61\x63\x63\x65\x70\x74","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x72\x65\x6A\x65\x63\x74","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x73\x74\x61\x74\x75\x73","\x43\x4C\x4F\x53\x45\x44","\x63\x6C\x6F\x73\x65","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x63\x63\x65\x70\x74\x4D\x65\x74\x68\x6F\x64","\x61\x63\x63\x65\x70\x74\x55\x72\x6C","\x43\x68\x61\x74\x20\x77\x65\x62\x73\x69\x74\x65\x20\x3C","\x6E\x61\x6D\x65","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x61\x63\x63\x65\x70\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x63\x74\x69\x6F\x6E\x73","\x65\x6E\x61\x62\x6C\x65\x64","\x65\x78\x65\x63\x41\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x65\x6A\x65\x63\x74\x4D\x65\x74\x68\x6F\x64","\x72\x65\x6A\x65\x63\x74\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x72\x65\x6A\x65\x63\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x63\x6C\x6F\x73\x65\x4D\x65\x74\x68\x6F\x64","\x63\x6C\x6F\x73\x65\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x63\x6C\x6F\x73\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x57\x65\x62\x68\x6F\x6F\x6B\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x72\x65\x71\x75\x65\x73\x74\x20\x66\x61\x69\x6C\x65\x64\x21","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x75\x63\x63\x65\x73\x73\x65\x66\x75\x6C\x21","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x43\x68\x61\x74\x20\x77\x65\x62\x73\x69\x74\x65\x3A\x20","\x20\x43\x72\x65\x61\x74\x65","\x70\x75\x73\x68","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x69\x64","\x20\x55\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x72\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79"];_0xf075[0];var ChatWebsite=require(_0xf075[2])[_0xf075[1]];var ChatRoom=require(_0xf075[2])[_0xf075[3]];var Website=require(_0xf075[4]);var ReportChat=require(_0xf075[2])[_0xf075[5]];var _=require(_0xf075[6]);var Util=require(_0xf075[7]);var chatwebsites;module[_0xf075[8]]= function(){return ChatWebsite[_0xf075[26]]()[_0xf075[25]](function(_0x6135x9){console[_0xf075[12]](_0xf075[11]);chatwebsites= _0x6135x9;synch(chatwebsites);ReportChat[_0xf075[20]](function(_0x6135xa){var _0x6135xb=_[_0xf075[14]](chatwebsites,{id:_0x6135xa[_0xf075[13]]});if(_0x6135xb&& _0x6135xa[_0xf075[16]](_0xf075[15])){webhook(_0x6135xa,_0x6135xb,_0xf075[17])};if(_0x6135xb&& _0x6135xa[_0xf075[16]](_0xf075[18])){webhook(_0x6135xa,_0x6135xb,_0xf075[19])}});ChatRoom[_0xf075[20]](function(_0x6135xa){var _0x6135xb=_[_0xf075[14]](chatwebsites,{id:_0x6135xa[_0xf075[21]]});if(_0x6135xb&& _0x6135xa[_0xf075[16]](_0xf075[22])&& _0x6135xa[_0xf075[22]]=== _0xf075[23]){webhook(_0x6135xa,_0x6135xb,_0xf075[24])}})})[_0xf075[10]](function(_0x6135x8){console[_0xf075[9]](_0x6135x8)})};function webhook(_0x6135xa,_0x6135xb,_0x6135xd){var _0x6135xe=_0x6135xb;switch(_0x6135xd){case _0xf075[17]:if(_0x6135xe[_0xf075[27]]&& _0x6135xe[_0xf075[28]]){console[_0xf075[12]](_0xf075[29]+ _0x6135xe[_0xf075[30]]+ _0xf075[31]);execRequest(_0x6135xa[_0xf075[32]],_0x6135xe[_0xf075[27]],_0x6135xe[_0xf075[28]])};if(_0x6135xe[_0xf075[34]][_0xf075[33]]){_[_0xf075[37]](_0x6135xe[_0xf075[34]],function(_0x6135xf){if(_0x6135xf[_0xf075[35]]){Util[_0xf075[36]](_0x6135xf,_0x6135xa)}})};break;case _0xf075[19]:if(_0x6135xe[_0xf075[38]]&& _0x6135xe[_0xf075[39]]){console[_0xf075[12]](_0xf075[29]+ _0x6135xe[_0xf075[30]]+ _0xf075[40]);execRequest(_0x6135xa[_0xf075[32]],_0x6135xe[_0xf075[38]],_0x6135xe[_0xf075[39]])};break;case _0xf075[24]:if(_0x6135xe[_0xf075[41]]&& _0x6135xe[_0xf075[42]]){console[_0xf075[12]](_0xf075[29]+ _0x6135xe[_0xf075[30]]+ _0xf075[43]);execRequest(_0x6135xa[_0xf075[32]],_0x6135xe[_0xf075[41]],_0x6135xe[_0xf075[42]])};break;default:console[_0xf075[12]](_0xf075[44])}}function execRequest(_0x6135xa,_0x6135x11,_0x6135x12){Util[_0xf075[47]](_0x6135xa,_0x6135x11,_0x6135x12)[_0xf075[25]](function(_0x6135x13){console[_0xf075[12]](_0xf075[46])})[_0xf075[10]](function(_0x6135x8){console[_0xf075[12]](_0xf075[45])})}function synch(chatwebsites){ChatWebsite[_0xf075[51]](function(_0x6135xa){console[_0xf075[12]](_0xf075[48]+ _0x6135xa[_0xf075[30]]+ _0xf075[49]);chatwebsites[_0xf075[50]](_0x6135xa)});ChatWebsite[_0xf075[20]](function(_0x6135xa){var _0x6135x15=_[_0xf075[14]](chatwebsites,{id:_0x6135xa[_0xf075[52]]});if(_0x6135x15){console[_0xf075[12]](_0xf075[48]+ _0x6135x15[_0xf075[30]]+ _0xf075[53]);_[_0xf075[54]](_0x6135x15,_0x6135xa)}else {chatwebsites[_0xf075[55]](_0x6135xa)}});ChatWebsite[_0xf075[57]](function(_0x6135xa){_[_0xf075[56]](chatwebsites,{id:_0x6135xa[_0xf075[52]]})})}
\ No newline at end of file
diff --git a/server/config/express.js b/server/config/express.js
index 30258e5..55e147c 100644
--- a/server/config/express.js
+++ b/server/config/express.js
@@ -1,80 +1 @@
-/**
- * Express configuration
- */
-
-'use strict';
-
-var express = require('express');
-var favicon = require('serve-favicon');
-var morgan = require('morgan');
-var compression = require('compression');
-var bodyParser = require('body-parser');
-var queryParser = require('express-query-int');
-var methodOverride = require('method-override');
-var cookieParser = require('cookie-parser');
-var errorHandler = require('errorhandler');
-var path = require('path');
-var passport = require('passport');
-var session = require('express-session');
-var flash = require('connect-flash');
-var SessionStore = require('express-mysql-session')(session);
-var config = require('./environment');
-
-module.exports = function(app) {
-  var env = app.get('env');
-
-  app.set('views', config.root + '/server/views');
-  app.engine('html', require('ejs').renderFile);
-  app.set('view engine', 'html');
-  app.use(compression());
-  app.use(bodyParser.urlencoded({
-    limit: '50mb',
-    extended: false
-  }));
-  app.use(bodyParser.json());
-  // app.use(queryParser());
-  app.use(methodOverride());
-  app.use(cookieParser());
-  app.use(passport.initialize());
-
-  // Express/MySQL session storage
-  app.use(session({
-    secret: config.session.secret,
-    store: new SessionStore({
-      host: config.db.host,
-      port: config.db.port,
-      user: config.db.username,
-      password: config.db.password,
-      database: config.db.database
-    }),
-    cookie: config.session.cookie,
-    name: config.session.name,
-    resave: true,
-    saveUninitialized: true
-  }));
-
-  if ('production' === env) {
-    app.use(favicon(path.join(config.root, 'public', 'favicon.ico')));
-    app.use(express.static(path.join(config.root, 'public')));
-    app.set('appPath', config.root + '/public');
-    morgan.token('remote-address', function(req, res) {
-      return req.headers['x-forwarded-for'] ? req.headers['x-forwarded-for'] : req.connection.remoteAddress || req.ip;
-    });
-    app.use(morgan(':method :remote-address :remote-user :url :status :response-time ms - :res[content-length]'));
-  }
-
-  if ('development' === env || 'test' === env) {
-    app.use(require('connect-livereload')());
-    app.use(express.static(path.join(config.root, '.tmp')));
-    app.use(express.static(path.join(config.root, 'client')));
-    app.set('appPath', 'client');
-    morgan.token('remote-address', function(req, res) {
-      return req.headers['x-forwarded-for'] ? req.headers['x-forwarded-for'] : req.connection.remoteAddress || req.ip;
-    });
-    app.use(morgan(':method :remote-address :remote-user :url :status :response-time ms - :res[content-length]'));
-    app.use(errorHandler()); // Error handler - has to be last
-  }
-
-  // Connect flash for flash messages
-  app.use(flash());
-};
+var _0x7274=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x73\x65\x72\x76\x65\x2D\x66\x61\x76\x69\x63\x6F\x6E","\x6D\x6F\x72\x67\x61\x6E","\x63\x6F\x6D\x70\x72\x65\x73\x73\x69\x6F\x6E","\x62\x6F\x64\x79\x2D\x70\x61\x72\x73\x65\x72","\x65\x78\x70\x72\x65\x73\x73\x2D\x71\x75\x65\x72\x79\x2D\x69\x6E\x74","\x6D\x65\x74\x68\x6F\x64\x2D\x6F\x76\x65\x72\x72\x69\x64\x65","\x63\x6F\x6F\x6B\x69\x65\x2D\x70\x61\x72\x73\x65\x72","\x65\x72\x72\x6F\x72\x68\x61\x6E\x64\x6C\x65\x72","\x70\x61\x74\x68","\x70\x61\x73\x73\x70\x6F\x72\x74","\x65\x78\x70\x72\x65\x73\x73\x2D\x73\x65\x73\x73\x69\x6F\x6E","\x63\x6F\x6E\x6E\x65\x63\x74\x2D\x66\x6C\x61\x73\x68","\x65\x78\x70\x72\x65\x73\x73\x2D\x6D\x79\x73\x71\x6C\x2D\x73\x65\x73\x73\x69\x6F\x6E","\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x65\x6E\x76","\x67\x65\x74","\x76\x69\x65\x77\x73","\x72\x6F\x6F\x74","\x2F\x73\x65\x72\x76\x65\x72\x2F\x76\x69\x65\x77\x73","\x73\x65\x74","\x68\x74\x6D\x6C","\x72\x65\x6E\x64\x65\x72\x46\x69\x6C\x65","\x65\x6A\x73","\x65\x6E\x67\x69\x6E\x65","\x76\x69\x65\x77\x20\x65\x6E\x67\x69\x6E\x65","\x75\x73\x65","\x35\x30\x6D\x62","\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x6A\x73\x6F\x6E","\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65","\x73\x65\x63\x72\x65\x74","\x73\x65\x73\x73\x69\x6F\x6E","\x68\x6F\x73\x74","\x64\x62","\x70\x6F\x72\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x64\x61\x74\x61\x62\x61\x73\x65","\x63\x6F\x6F\x6B\x69\x65","\x6E\x61\x6D\x65","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x70\x75\x62\x6C\x69\x63","\x66\x61\x76\x69\x63\x6F\x6E\x2E\x69\x63\x6F","\x6A\x6F\x69\x6E","\x73\x74\x61\x74\x69\x63","\x61\x70\x70\x50\x61\x74\x68","\x2F\x70\x75\x62\x6C\x69\x63","\x72\x65\x6D\x6F\x74\x65\x2D\x61\x64\x64\x72\x65\x73\x73","\x78\x2D\x66\x6F\x72\x77\x61\x72\x64\x65\x64\x2D\x66\x6F\x72","\x68\x65\x61\x64\x65\x72\x73","\x72\x65\x6D\x6F\x74\x65\x41\x64\x64\x72\x65\x73\x73","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x69\x70","\x74\x6F\x6B\x65\x6E","\x3A\x6D\x65\x74\x68\x6F\x64\x20\x3A\x72\x65\x6D\x6F\x74\x65\x2D\x61\x64\x64\x72\x65\x73\x73\x20\x3A\x72\x65\x6D\x6F\x74\x65\x2D\x75\x73\x65\x72\x20\x3A\x75\x72\x6C\x20\x3A\x73\x74\x61\x74\x75\x73\x20\x3A\x72\x65\x73\x70\x6F\x6E\x73\x65\x2D\x74\x69\x6D\x65\x20\x6D\x73\x20\x2D\x20\x3A\x72\x65\x73\x5B\x63\x6F\x6E\x74\x65\x6E\x74\x2D\x6C\x65\x6E\x67\x74\x68\x5D","\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x74\x65\x73\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x2D\x6C\x69\x76\x65\x72\x65\x6C\x6F\x61\x64","\x2E\x74\x6D\x70","\x63\x6C\x69\x65\x6E\x74"];_0x7274[0];var express=require(_0x7274[1]);var favicon=require(_0x7274[2]);var morgan=require(_0x7274[3]);var compression=require(_0x7274[4]);var bodyParser=require(_0x7274[5]);var queryParser=require(_0x7274[6]);var methodOverride=require(_0x7274[7]);var cookieParser=require(_0x7274[8]);var errorHandler=require(_0x7274[9]);var path=require(_0x7274[10]);var passport=require(_0x7274[11]);var session=require(_0x7274[12]);var flash=require(_0x7274[13]);var SessionStore=require(_0x7274[14])(session);var config=require(_0x7274[15]);module[_0x7274[16]]= function(_0x7ff9x10){var _0x7ff9x11=_0x7ff9x10[_0x7274[18]](_0x7274[17]);_0x7ff9x10[_0x7274[22]](_0x7274[19],config[_0x7274[20]]+ _0x7274[21]);_0x7ff9x10[_0x7274[26]](_0x7274[23],require(_0x7274[25])[_0x7274[24]]);_0x7ff9x10[_0x7274[22]](_0x7274[27],_0x7274[23]);_0x7ff9x10[_0x7274[28]](compression());_0x7ff9x10[_0x7274[28]](bodyParser[_0x7274[30]]({limit:_0x7274[29],extended:false}));_0x7ff9x10[_0x7274[28]](bodyParser[_0x7274[31]]());_0x7ff9x10[_0x7274[28]](methodOverride());_0x7ff9x10[_0x7274[28]](cookieParser());_0x7ff9x10[_0x7274[28]](passport[_0x7274[32]]());_0x7ff9x10[_0x7274[28]](session({secret:config[_0x7274[34]][_0x7274[33]],store: new SessionStore({host:config[_0x7274[36]][_0x7274[35]],port:config[_0x7274[36]][_0x7274[37]],user:config[_0x7274[36]][_0x7274[38]],password:config[_0x7274[36]][_0x7274[39]],database:config[_0x7274[36]][_0x7274[40]]}),cookie:config[_0x7274[34]][_0x7274[41]],name:config[_0x7274[34]][_0x7274[42]],resave:true,saveUninitialized:true}));if(_0x7274[43]=== _0x7ff9x11){_0x7ff9x10[_0x7274[28]](favicon(path[_0x7274[46]](config[_0x7274[20]],_0x7274[44],_0x7274[45])));_0x7ff9x10[_0x7274[28]](express[_0x7274[47]](path[_0x7274[46]](config[_0x7274[20]],_0x7274[44])));_0x7ff9x10[_0x7274[22]](_0x7274[48],config[_0x7274[20]]+ _0x7274[49]);morgan[_0x7274[56]](_0x7274[50],function(_0x7ff9x12,_0x7ff9x13){return _0x7ff9x12[_0x7274[52]][_0x7274[51]]?_0x7ff9x12[_0x7274[52]][_0x7274[51]]:_0x7ff9x12[_0x7274[54]][_0x7274[53]]|| _0x7ff9x12[_0x7274[55]]});_0x7ff9x10[_0x7274[28]](morgan(_0x7274[57]))};if(_0x7274[58]=== _0x7ff9x11|| _0x7274[59]=== _0x7ff9x11){_0x7ff9x10[_0x7274[28]](require(_0x7274[60])());_0x7ff9x10[_0x7274[28]](express[_0x7274[47]](path[_0x7274[46]](config[_0x7274[20]],_0x7274[61])));_0x7ff9x10[_0x7274[28]](express[_0x7274[47]](path[_0x7274[46]](config[_0x7274[20]],_0x7274[62])));_0x7ff9x10[_0x7274[22]](_0x7274[48],_0x7274[62]);morgan[_0x7274[56]](_0x7274[50],function(_0x7ff9x12,_0x7ff9x13){return _0x7ff9x12[_0x7274[52]][_0x7274[51]]?_0x7ff9x12[_0x7274[52]][_0x7274[51]]:_0x7ff9x12[_0x7274[54]][_0x7274[53]]|| _0x7ff9x12[_0x7274[55]]});_0x7ff9x10[_0x7274[28]](morgan(_0x7274[57]));_0x7ff9x10[_0x7274[28]](errorHandler())};_0x7ff9x10[_0x7274[28]](flash())}
\ No newline at end of file
diff --git a/server/config/fax.js b/server/config/fax.js
index c64343b..6583e60 100644
--- a/server/config/fax.js
+++ b/server/config/fax.js
@@ -1,240 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var uuidLib = require('node-uuid');
-var ConvertTiff = require('tiff-to-png');
-var exec = require('child_process').exec;
-var fs = require('fs');
-var path = require('path');
-
-var FaxMessage = require('../models').FaxMessage;
-var FaxRoom = require('../models').FaxRoom;
-var Contact = require('../models').Contact;
-var Event = require('../models').Event;
-var config = require('./environment');
-
-exports.register = function(ami) {
-
-  ami.on('receivefax', function(evt) {
-
-    FaxRoom
-      .create({
-        status: 'NEW',
-        from: evt.remotestationid,
-        FaxAccountId: 1, //TODO Handle account ID
-      })
-      .then(function(faxRoom) {
-
-        evt.status = 'RECEIVED';
-        evt.FaxRoomId = faxRoom.id;
-
-        FaxMessage
-          .create(evt)
-          .then(function(faxMessage) {
-
-            Event
-              .create({
-                name: 'INCOMING',
-                channel: 'FAX',
-                FaxRoomId: faxRoom.id,
-                FaxAccountId: 1 //TODO Handle account ID
-              })
-              .catch(function(err) {
-                console.error(err);
-              });
-
-            Contact
-              .findOrCreate({
-                where: {
-                  phone: evt.remotestationid
-                },
-                defaults: {
-                  phone: evt.remotestationid,
-                  fullname: evt.remotestationid
-                }
-              })
-              .spread(function(contact, created) {
-                faxMessage.setFrom(contact);
-              });
-
-            Contact
-              .findOrCreate({
-                where: {
-                  phone: evt.localstationid
-                },
-                defaults: {
-                  phone: evt.localstationid,
-                  fullname: evt.localstationid
-                }
-              })
-              .spread(function(contact, created) {
-                faxMessage.setTo(contact);
-              });
-
-            //Convert tiff to png
-            var uuid = uuidLib.v4();
-            var inputPath = evt.filename; //Restore for normal usage
-            // var inputPath = '/tmp/sample.tif' //Used for testing
-            var resultPath = path.join(config.root, 'server', 'files', 'fax', 'inbound', uuid + '.pdf');
-            var command = 'convert ' + inputPath + ' ' + resultPath;
-            fs.exists(inputPath, function(exists) {
-              if (exists) {
-                console.error('The file ' + inputPath + ' exits');
-                //Install ImageMagick for doing that!
-                exec(command, function(err) {
-                  if (err) {
-                    console.error(err);
-                  } else {
-                    faxMessage.updateAttributes({
-                        filenamePDF: uuid + '.pdf'
-                      })
-                      .then(function() {
-                        console.error('The file ' + inputPath + ' was converted in PDF');
-                      })
-                      .catch(function(err) {
-                        console.error(err);
-                      });
-                  }
-                });
-              } else {
-                console.error('The file ' + inputPath + ' does not exits');
-              }
-            });
-          })
-          .catch(function(err) {
-            console.error(err);
-          });
-
-      })
-      .catch(function(err) {
-        console.error(err);
-      });
-  });
-
-  ami.on('sendfax', function(evt) {
-    console.log('***SendFAX***');
-
-    FaxMessage
-      .findOne({
-        where: {
-          uniqueid: evt.uniqueid
-        }
-      })
-      .then(function(faxMessage) {
-        if (faxMessage) {
-          faxMessage.updateAttributes(evt);
-        }
-      })
-      .catch(function(err) {
-        console.error(err);
-      });
-
-  });
-
-  ami.on('varset', function(evt) {
-    if (evt.variable.hasOwnProperty('faxstatus')) {
-      FaxMessage
-        .findOne({
-          where: {
-            uniqueid: evt.uniqueid
-          }
-        })
-        .then(function(faxMessage) {
-          if (faxMessage) {
-            console.log('VarSet: ', 'status', evt.value);
-            faxMessage.updateAttributes({
-              status: evt.value == 'FAILED' ? 'FAILED' : 'SENT'
-            });
-          }
-        })
-        .catch(function(err) {
-          console.error(err);
-        });
-    } else if (evt.variable.hasOwnProperty('faxerror')) {
-      FaxMessage
-        .findOne({
-          where: {
-            uniqueid: evt.uniqueid
-          }
-        })
-        .then(function(faxMessage) {
-          if (faxMessage) {
-            console.log('VarSet: ', 'error', evt.value);
-            faxMessage.updateAttributes({
-              error: evt.value
-            });
-          }
-        })
-        .catch(function(err) {
-          console.error(err);
-        });
-    } else if (evt.variable.hasOwnProperty('faxstatusstring')) {
-      FaxMessage
-        .findOne({
-          where: {
-            uniqueid: evt.uniqueid
-          }
-        })
-        .then(function(faxMessage) {
-          if (faxMessage) {
-            console.log('VarSet: ', 'laststatus', evt.value);
-            faxMessage.updateAttributes({
-              laststatus: evt.value
-            });
-          }
-        })
-        .catch(function(err) {
-          console.error(err);
-        });
-    }
-
-  });
-
-  ami.on('userevent', function(evt) {
-    if (evt.userevent === 'Fax') {
-      FaxMessage
-        .findOne({
-          where: {
-            uuid: evt.uuid
-          }
-        })
-        .then(function(faxMessage) {
-          if (faxMessage) {
-            evt.status = 'SENDING';
-            faxMessage.updateAttributes(evt);
-          }
-        })
-        .catch(function(err) {
-          console.error(err);
-        });
-    }
-
-  });
-
-  ami.on('faxstatus', function(evt) {
-    FaxMessage
-      .findOne({
-        where: {
-          uniqueid: evt.uniqueid
-        }
-      })
-      .then(function(faxMessage) {
-        if (faxMessage) {
-
-          console.log('FAXStatus: ', evt.uniqueid, evt.status);
-
-          faxMessage.updateAttributes({
-            operation: evt.operation,
-            laststatus: evt.status
-          });
-        }
-      })
-      .catch(function(err) {
-        console.error(err);
-      });
-
-  })
-
-  require('../api/fax_message/fax_message.ami').register(ami);
-
-};
+var _0xe5b8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6E\x6F\x64\x65\x2D\x75\x75\x69\x64","\x74\x69\x66\x66\x2D\x74\x6F\x2D\x70\x6E\x67","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x66\x73","\x70\x61\x74\x68","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x43\x6F\x6E\x74\x61\x63\x74","\x45\x76\x65\x6E\x74","\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x72\x65\x67\x69\x73\x74\x65\x72","\x72\x65\x63\x65\x69\x76\x65\x66\x61\x78","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x73\x74\x61\x74\x75\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x69\x64","\x49\x4E\x43\x4F\x4D\x49\x4E\x47","\x46\x41\x58","\x63\x72\x65\x61\x74\x65","\x73\x65\x74\x46\x72\x6F\x6D","\x73\x70\x72\x65\x61\x64","\x72\x65\x6D\x6F\x74\x65\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x74\x54\x6F","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x76\x34","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x66\x61\x78","\x69\x6E\x62\x6F\x75\x6E\x64","\x2E\x70\x64\x66","\x6A\x6F\x69\x6E","\x63\x6F\x6E\x76\x65\x72\x74\x20","\x20","\x54\x68\x65\x20\x66\x69\x6C\x65\x20","\x20\x65\x78\x69\x74\x73","\x20\x77\x61\x73\x20\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x20\x69\x6E\x20\x50\x44\x46","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x74\x73","\x65\x78\x69\x73\x74\x73","\x4E\x45\x57","\x6F\x6E","\x73\x65\x6E\x64\x66\x61\x78","\x2A\x2A\x2A\x53\x65\x6E\x64\x46\x41\x58\x2A\x2A\x2A","\x6C\x6F\x67","\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x76\x61\x72\x73\x65\x74","\x66\x61\x78\x73\x74\x61\x74\x75\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x76\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x53\x65\x74\x3A\x20","\x76\x61\x6C\x75\x65","\x46\x41\x49\x4C\x45\x44","\x53\x45\x4E\x54","\x66\x61\x78\x65\x72\x72\x6F\x72","\x66\x61\x78\x73\x74\x61\x74\x75\x73\x73\x74\x72\x69\x6E\x67","\x6C\x61\x73\x74\x73\x74\x61\x74\x75\x73","\x75\x73\x65\x72\x65\x76\x65\x6E\x74","\x46\x61\x78","\x53\x45\x4E\x44\x49\x4E\x47","\x75\x75\x69\x64","\x46\x41\x58\x53\x74\x61\x74\x75\x73\x3A\x20","\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x61\x6D\x69"];_0xe5b8[0];var _=require(_0xe5b8[1]);var uuidLib=require(_0xe5b8[2]);var ConvertTiff=require(_0xe5b8[3]);var exec=require(_0xe5b8[5])[_0xe5b8[4]];var fs=require(_0xe5b8[6]);var path=require(_0xe5b8[7]);var FaxMessage=require(_0xe5b8[9])[_0xe5b8[8]];var FaxRoom=require(_0xe5b8[9])[_0xe5b8[10]];var Contact=require(_0xe5b8[9])[_0xe5b8[11]];var Event=require(_0xe5b8[9])[_0xe5b8[12]];var config=require(_0xe5b8[13]);exports[_0xe5b8[14]]= function(_0xfe6fxc){_0xfe6fxc[_0xe5b8[50]](_0xe5b8[15],function(_0xfe6fxd){FaxRoom[_0xe5b8[24]]({status:_0xe5b8[49],from:_0xfe6fxd[_0xe5b8[27]],FaxAccountId:1})[_0xe5b8[45]](function(_0xfe6fxf){_0xfe6fxd[_0xe5b8[18]]= _0xe5b8[19];_0xfe6fxd[_0xe5b8[20]]= _0xfe6fxf[_0xe5b8[21]];FaxMessage[_0xe5b8[24]](_0xfe6fxd)[_0xe5b8[45]](function(_0xfe6fx10){Event[_0xe5b8[24]]({name:_0xe5b8[22],channel:_0xe5b8[23],FaxRoomId:_0xfe6fxf[_0xe5b8[21]],FaxAccountId:1})[_0xe5b8[17]](function(_0xfe6fxe){console[_0xe5b8[16]](_0xfe6fxe)});Contact[_0xe5b8[28]]({where:{phone:_0xfe6fxd[_0xe5b8[27]]},defaults:{phone:_0xfe6fxd[_0xe5b8[27]],fullname:_0xfe6fxd[_0xe5b8[27]]}})[_0xe5b8[26]](function(_0xfe6fx11,_0xfe6fx12){_0xfe6fx10[_0xe5b8[25]](_0xfe6fx11)});Contact[_0xe5b8[28]]({where:{phone:_0xfe6fxd[_0xe5b8[30]]},defaults:{phone:_0xfe6fxd[_0xe5b8[30]],fullname:_0xfe6fxd[_0xe5b8[30]]}})[_0xe5b8[26]](function(_0xfe6fx11,_0xfe6fx12){_0xfe6fx10[_0xe5b8[29]](_0xfe6fx11)});var _0xfe6fx13=uuidLib[_0xe5b8[31]]();var _0xfe6fx14=_0xfe6fxd[_0xe5b8[32]];var _0xfe6fx15=path[_0xe5b8[39]](config[_0xe5b8[33]],_0xe5b8[34],_0xe5b8[35],_0xe5b8[36],_0xe5b8[37],_0xfe6fx13+ _0xe5b8[38]);var _0xfe6fx16=_0xe5b8[40]+ _0xfe6fx14+ _0xe5b8[41]+ _0xfe6fx15;fs[_0xe5b8[48]](_0xfe6fx14,function(_0xfe6fx17){if(_0xfe6fx17){console[_0xe5b8[16]](_0xe5b8[42]+ _0xfe6fx14+ _0xe5b8[43]);exec(_0xfe6fx16,function(_0xfe6fxe){if(_0xfe6fxe){console[_0xe5b8[16]](_0xfe6fxe)}else {_0xfe6fx10[_0xe5b8[46]]({filenamePDF:_0xfe6fx13+ _0xe5b8[38]})[_0xe5b8[45]](function(){console[_0xe5b8[16]](_0xe5b8[42]+ _0xfe6fx14+ _0xe5b8[44])})[_0xe5b8[17]](function(_0xfe6fxe){console[_0xe5b8[16]](_0xfe6fxe)})}})}else {console[_0xe5b8[16]](_0xe5b8[42]+ _0xfe6fx14+ _0xe5b8[47])}})})[_0xe5b8[17]](function(_0xfe6fxe){console[_0xe5b8[16]](_0xfe6fxe)})})[_0xe5b8[17]](function(_0xfe6fxe){console[_0xe5b8[16]](_0xfe6fxe)})});_0xfe6fxc[_0xe5b8[50]](_0xe5b8[51],function(_0xfe6fxd){console[_0xe5b8[53]](_0xe5b8[52]);FaxMessage[_0xe5b8[55]]({where:{uniqueid:_0xfe6fxd[_0xe5b8[54]]}})[_0xe5b8[45]](function(_0xfe6fx10){if(_0xfe6fx10){_0xfe6fx10[_0xe5b8[46]](_0xfe6fxd)}})[_0xe5b8[17]](function(_0xfe6fxe){console[_0xe5b8[16]](_0xfe6fxe)})});_0xfe6fxc[_0xe5b8[50]](_0xe5b8[56],function(_0xfe6fxd){if(_0xfe6fxd[_0xe5b8[59]][_0xe5b8[58]](_0xe5b8[57])){FaxMessage[_0xe5b8[55]]({where:{uniqueid:_0xfe6fxd[_0xe5b8[54]]}})[_0xe5b8[45]](function(_0xfe6fx10){if(_0xfe6fx10){console[_0xe5b8[53]](_0xe5b8[60],_0xe5b8[18],_0xfe6fxd[_0xe5b8[61]]);_0xfe6fx10[_0xe5b8[46]]({status:_0xfe6fxd[_0xe5b8[61]]== _0xe5b8[62]?_0xe5b8[62]:_0xe5b8[63]})}})[_0xe5b8[17]](function(_0xfe6fxe){console[_0xe5b8[16]](_0xfe6fxe)})}else {if(_0xfe6fxd[_0xe5b8[59]][_0xe5b8[58]](_0xe5b8[64])){FaxMessage[_0xe5b8[55]]({where:{uniqueid:_0xfe6fxd[_0xe5b8[54]]}})[_0xe5b8[45]](function(_0xfe6fx10){if(_0xfe6fx10){console[_0xe5b8[53]](_0xe5b8[60],_0xe5b8[16],_0xfe6fxd[_0xe5b8[61]]);_0xfe6fx10[_0xe5b8[46]]({error:_0xfe6fxd[_0xe5b8[61]]})}})[_0xe5b8[17]](function(_0xfe6fxe){console[_0xe5b8[16]](_0xfe6fxe)})}else {if(_0xfe6fxd[_0xe5b8[59]][_0xe5b8[58]](_0xe5b8[65])){FaxMessage[_0xe5b8[55]]({where:{uniqueid:_0xfe6fxd[_0xe5b8[54]]}})[_0xe5b8[45]](function(_0xfe6fx10){if(_0xfe6fx10){console[_0xe5b8[53]](_0xe5b8[60],_0xe5b8[66],_0xfe6fxd[_0xe5b8[61]]);_0xfe6fx10[_0xe5b8[46]]({laststatus:_0xfe6fxd[_0xe5b8[61]]})}})[_0xe5b8[17]](function(_0xfe6fxe){console[_0xe5b8[16]](_0xfe6fxe)})}}}});_0xfe6fxc[_0xe5b8[50]](_0xe5b8[67],function(_0xfe6fxd){if(_0xfe6fxd[_0xe5b8[67]]=== _0xe5b8[68]){FaxMessage[_0xe5b8[55]]({where:{uuid:_0xfe6fxd[_0xe5b8[70]]}})[_0xe5b8[45]](function(_0xfe6fx10){if(_0xfe6fx10){_0xfe6fxd[_0xe5b8[18]]= _0xe5b8[69];_0xfe6fx10[_0xe5b8[46]](_0xfe6fxd)}})[_0xe5b8[17]](function(_0xfe6fxe){console[_0xe5b8[16]](_0xfe6fxe)})}});_0xfe6fxc[_0xe5b8[50]](_0xe5b8[57],function(_0xfe6fxd){FaxMessage[_0xe5b8[55]]({where:{uniqueid:_0xfe6fxd[_0xe5b8[54]]}})[_0xe5b8[45]](function(_0xfe6fx10){if(_0xfe6fx10){console[_0xe5b8[53]](_0xe5b8[71],_0xfe6fxd[_0xe5b8[54]],_0xfe6fxd[_0xe5b8[18]]);_0xfe6fx10[_0xe5b8[46]]({operation:_0xfe6fxd[_0xe5b8[72]],laststatus:_0xfe6fxd[_0xe5b8[18]]})}})[_0xe5b8[17]](function(_0xfe6fxe){console[_0xe5b8[16]](_0xfe6fxe)})});require(_0xe5b8[73])[_0xe5b8[14]](_0xfe6fxc)}
\ No newline at end of file
diff --git a/server/config/history/history.js b/server/config/history/history.js
index 617eace..ef9f547 100644
--- a/server/config/history/history.js
+++ b/server/config/history/history.js
@@ -1,131 +1 @@
-'use strict';
-
-
-var sequelize = require('../../models').sequelize;
-var moment = require('moment');
-var async = require('async');
-
-var ReportMove = require('./reportMove');
-var Models = require('../../models');
-var HistoryModels = require('../../models').history;
-var moment = require('moment');
-
-var defaultCondition = {
-  where: {
-    createdAt: {
-      $lte: moment().format("YYYY-MM-DD HH:mm:ss")
-    }
-  },
-  raw: true
-};
-
-module.exports = function(CronJob) {
-
-  // Every 1 Minute
-  var job = new CronJob({
-    cronTime: '0 59 23 * * *',
-    // cronTime: '* * * * *',
-    onTick: function() {
-      console.log('Moving data into history...');
-
-      return Promise
-        .all([])
-        .then(ReportMove.move(Models.ReportIntegration, HistoryModels.ReportIntegrationHistory))
-        .then(ReportMove.move(Models.ReportCall, HistoryModels.ReportCallHistory))
-        .then(ReportMove.move(Models.ReportSquareDetail, HistoryModels.ReportSquareDetailHistory))
-        // .then(ReportMove.move(Models.ReportTigerDial, HistoryModels.ReportTigerDialHistory))
-        .then(ReportMove.move(Models.ReportDial, HistoryModels.ReportDialHistory))
-        .then(ReportMove.move(Models.ReportCallTransfer, HistoryModels.ReportCallTransferHistory))
-        .then(ReportMove.move(Models.ReportAgent, HistoryModels.ReportAgentHistory, {
-          reason: {
-            $ne: null
-          }
-        }))
-        .then(ReportMove.move(Models.ReportMember, HistoryModels.ReportMemberHistory, {
-          exitAt: {
-            $ne: null
-          }
-        }))
-        .then(ReportMove.move(Models.ReportQueue, HistoryModels.ReportQueueHistory, {
-          queuecallerleaveAt: {
-            $ne: null
-          }
-        }))
-        .then(ReportMove.move(Models.ReportChat, HistoryModels.ReportChatHistory, {
-          reason: {
-            $ne: null
-          }
-        }))
-        .then(ReportMove.move(Models.ReportChatSession, HistoryModels.ReportChatSessionHistory, {
-          leaveAt: {
-            $ne: null
-          }
-        }))
-        .then(ReportMove.move(Models.ReportChatRoom, HistoryModels.ReportChatRoomHistory, {
-          leaveAt: {
-            $ne: null
-          }
-        }))
-        .then(ReportMove.move(Models.ReportMail, HistoryModels.ReportMailHistory, {
-          reason: {
-            $ne: null
-          }
-        }))
-        // .then(ReportMove.move(Models.ReportMailSession, HistoryModels.ReportMailSessionHistory, {
-        //   leaveAt: {
-        //     $ne: null
-        //   }
-        // }))
-        .then(ReportMove.move(Models.ReportMailRoom, HistoryModels.ReportMailRoomHistory, {
-          leaveAt: {
-            $ne: null
-          }
-        }))
-        .then(ReportMove.move(Models.ReportSms, HistoryModels.ReportSmsHistory, {
-          reason: {
-            $ne: null
-          }
-        }))
-        .then(ReportMove.move(Models.ReportSmsSession, HistoryModels.ReportSmsSessionHistory, {
-          leaveAt: {
-            $ne: null
-          }
-        }))
-        .then(ReportMove.move(Models.ReportSquare, HistoryModels.ReportSquareHistory, {
-          leaveAt: {
-            $ne: null
-          }
-        }))
-        .then(ReportMove.move(Models.ReportFax, HistoryModels.ReportFaxHistory, {
-          reason: {
-            $ne: null
-          }
-        }))
-        .then(ReportMove.move(Models.ReportFaxSession, HistoryModels.ReportFaxSessionHistory, {
-          leaveAt: {
-            $ne: null
-          }
-        }))
-        .then(ReportMove.move(Models.ReportFaxRoom, HistoryModels.ReportFaxRoomHistory, {
-          leaveAt: {
-            $ne: null
-          }
-        }))
-        .then(ReportMove.move(Models.ReportOpenchannel, HistoryModels.ReportOpenchannelHistory, {
-          reason: {
-            $ne: null
-          }
-        }))
-        .then(ReportMove.move(Models.ReportOpenchannelSession, HistoryModels.ReportOpenchannelSessionHistory, {
-          leaveAt: {
-            $ne: null
-          }
-        }))
-        .catch(function(err) {
-          console.error(err);
-        });
-    }
-  });
-
-  job.start();
-}
+var _0x4aee=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x6D\x6F\x6D\x65\x6E\x74","\x61\x73\x79\x6E\x63","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x4D\x6F\x76\x65","\x68\x69\x73\x74\x6F\x72\x79","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x65\x78\x70\x6F\x72\x74\x73","\x30\x20\x35\x39\x20\x32\x33\x20\x2A\x20\x2A\x20\x2A","\x4D\x6F\x76\x69\x6E\x67\x20\x64\x61\x74\x61\x20\x69\x6E\x74\x6F\x20\x68\x69\x73\x74\x6F\x72\x79\x2E\x2E\x2E","\x6C\x6F\x67","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x6D\x6F\x76\x65","\x74\x68\x65\x6E","\x61\x6C\x6C","\x73\x74\x61\x72\x74"];_0x4aee[0];var sequelize=require(_0x4aee[2])[_0x4aee[1]];var moment=require(_0x4aee[3]);var async=require(_0x4aee[4]);var ReportMove=require(_0x4aee[5]);var Models=require(_0x4aee[2]);var HistoryModels=require(_0x4aee[2])[_0x4aee[6]];var moment=require(_0x4aee[3]);var defaultCondition={where:{createdAt:{$lte:moment()[_0x4aee[8]](_0x4aee[7])}},raw:true};module[_0x4aee[9]]= function(_0x7c5ax8){var _0x7c5ax9= new _0x7c5ax8({cronTime:_0x4aee[10],onTick:function(){console[_0x4aee[12]](_0x4aee[11]);return Promise[_0x4aee[17]]([])[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportIntegration,HistoryModels.ReportIntegrationHistory))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportCall,HistoryModels.ReportCallHistory))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportSquareDetail,HistoryModels.ReportSquareDetailHistory))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportDial,HistoryModels.ReportDialHistory))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportCallTransfer,HistoryModels.ReportCallTransferHistory))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportAgent,HistoryModels.ReportAgentHistory,{reason:{$ne:null}}))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportMember,HistoryModels.ReportMemberHistory,{exitAt:{$ne:null}}))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportQueue,HistoryModels.ReportQueueHistory,{queuecallerleaveAt:{$ne:null}}))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportChat,HistoryModels.ReportChatHistory,{reason:{$ne:null}}))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportChatSession,HistoryModels.ReportChatSessionHistory,{leaveAt:{$ne:null}}))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportChatRoom,HistoryModels.ReportChatRoomHistory,{leaveAt:{$ne:null}}))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportMail,HistoryModels.ReportMailHistory,{reason:{$ne:null}}))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportMailRoom,HistoryModels.ReportMailRoomHistory,{leaveAt:{$ne:null}}))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportSms,HistoryModels.ReportSmsHistory,{reason:{$ne:null}}))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportSmsSession,HistoryModels.ReportSmsSessionHistory,{leaveAt:{$ne:null}}))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportSquare,HistoryModels.ReportSquareHistory,{leaveAt:{$ne:null}}))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportFax,HistoryModels.ReportFaxHistory,{reason:{$ne:null}}))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportFaxSession,HistoryModels.ReportFaxSessionHistory,{leaveAt:{$ne:null}}))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportFaxRoom,HistoryModels.ReportFaxRoomHistory,{leaveAt:{$ne:null}}))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportOpenchannel,HistoryModels.ReportOpenchannelHistory,{reason:{$ne:null}}))[_0x4aee[16]](ReportMove[_0x4aee[15]](Models.ReportOpenchannelSession,HistoryModels.ReportOpenchannelSessionHistory,{leaveAt:{$ne:null}}))[_0x4aee[14]](function(_0x7c5axa){console[_0x4aee[13]](_0x7c5axa)})}});_0x7c5ax9[_0x4aee[18]]()}
\ No newline at end of file
diff --git a/server/config/history/reportMove.js b/server/config/history/reportMove.js
index de5d2c8..c6150c1 100644
--- a/server/config/history/reportMove.js
+++ b/server/config/history/reportMove.js
@@ -1,50 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var moment = require('moment');
-var sequelize = require('../../models').sequelize;
-var util = require('util');
-
-exports.move = function(Report, ReportHistory, where) {
-  var _items;
-  var _where = {
-    createdAt: {
-      $lte: moment().format("YYYY-MM-DD HH:mm:ss")
-    }
-  };
-
-  return function() {
-    return sequelize.transaction(function(t) {
-        return Report
-          .findAll({
-            where: where ? _.merge(_where, where) : _where,
-            raw: true
-          })
-          .then(function(items) {
-            _items = items;
-            return ReportHistory
-              .bulkCreate(items, {
-                individualHooks: true,
-                transaction: t
-              });
-          })
-          .then(function() {
-            return Report
-              .destroy({
-                where: {
-                  id: _.map(_items, 'id')
-                }
-              }, {
-                individualHooks: true,
-                transaction: t
-              });
-          });
-      })
-      .then(function() {
-        console.log(util.format('Moving %s - DONE', Report.tableName));
-      })
-      .catch(function(err) {
-        console.error(util.format('Moving %s error: %s.', Report.tableName, _.map(err.errors, 'message').join('; ')));
-      });
-  }
-}
+var _0x73f0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x6D\x6F\x76\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x4D\x6F\x76\x69\x6E\x67\x20\x25\x73\x20\x65\x72\x72\x6F\x72\x3A\x20\x25\x73\x2E","\x74\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x3B\x20","\x6A\x6F\x69\x6E","\x65\x72\x72\x6F\x72\x73","\x6D\x65\x73\x73\x61\x67\x65","\x6D\x61\x70","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x4D\x6F\x76\x69\x6E\x67\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45","\x6C\x6F\x67","\x74\x68\x65\x6E","\x69\x64","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E"];_0x73f0[0];var _=require(_0x73f0[1]);var moment=require(_0x73f0[2]);var sequelize=require(_0x73f0[4])[_0x73f0[3]];var util=require(_0x73f0[5]);exports[_0x73f0[6]]= function(_0xcd3cx5,_0xcd3cx6,_0xcd3cx7){var _0xcd3cx8;var _0xcd3cx9={createdAt:{$lte:moment()[_0x73f0[8]](_0x73f0[7])}};return function(){return sequelize[_0x73f0[26]](function(_0xcd3cxb){return _0xcd3cx5[_0x73f0[25]]({where:_0xcd3cx7?_[_0x73f0[24]](_0xcd3cx9,_0xcd3cx7):_0xcd3cx9,raw:true})[_0x73f0[20]](function(_0xcd3cxc){_0xcd3cx8= _0xcd3cxc;return _0xcd3cx6[_0x73f0[23]](_0xcd3cxc,{individualHooks:true,transaction:_0xcd3cxb})})[_0x73f0[20]](function(){return _0xcd3cx5[_0x73f0[22]]({where:{id:_[_0x73f0[15]](_0xcd3cx8,_0x73f0[21])}},{individualHooks:true,transaction:_0xcd3cxb})})})[_0x73f0[20]](function(){console[_0x73f0[19]](util[_0x73f0[8]](_0x73f0[18],_0xcd3cx5[_0x73f0[10]]))})[_0x73f0[17]](function(_0xcd3cxa){console[_0x73f0[16]](util[_0x73f0[8]](_0x73f0[9],_0xcd3cx5[_0x73f0[10]],_[_0x73f0[15]](_0xcd3cxa[_0x73f0[13]],_0x73f0[14])[_0x73f0[12]](_0x73f0[11])))})}}
\ No newline at end of file
diff --git a/server/config/imap/imap.js b/server/config/imap/imap.js
index 93bfa0d..135dd6f 100644
--- a/server/config/imap/imap.js
+++ b/server/config/imap/imap.js
@@ -1,105 +1 @@
-'use strict';
-
-var util = require('util');
-var path = require('path');
-
-var _ = require('lodash');
-var Promise = require('bluebird');
-var ImapListener = require("mail-listener2");
-var writeFile = Promise.promisify(require("fs").writeFile);
-
-var config = require('../environment');
-
-var Server = require('../../models').MailServerIn;
-var Room = require('../../models').MailRoom;
-var Message = require('../../models').MailMessage;
-var Account = require('../../models').MailAccount;
-var Attachment = require('../../models').MailAttachment;
-
-var imap;
-var timeout;
-
-process
-  .on('close', function(code) {
-    console.log(util.format('IMAP SERVER %s EXITED WITH CODE %s, PROCESS ID: %s ', process.argv[3], code, process.pid));
-  })
-  .on('error', function(err) {
-    console.error(err);
-  });
-
-console.log(util.format('IMAP SERVER %s STARTING, PROCESS ID: %s ', process.argv[3], process.pid));
-
-process.send({
-  type: 'state',
-  state: 'CONNECTING'
-});
-
-function onSave(server) {
-  imap = new ImapListener({
-      username: server.username,
-      password: server.password,
-      host: server.host,
-      port: server.port,
-      tls: server.ssl,
-      tlsOptions: {
-        rejectUnauthorized: false
-      },
-      mailbox: server.mailbox, // mailbox to monitor
-      searchFilter: [server.filter], // the search filter being used after an IDLE notification has been retrieved
-      markSeen: true, // all fetched email willbe marked as seen and not fetched next time
-      fetchUnreadOnStart: true, // use it only if you want to get all unread email on lib start. Default is `false`,,
-      connTimeout: server.connTimeout * 1000, // *1000 because there are set and get on the model
-      authTimeout: server.authTimeout * 1000, // *1000 because there are set and get on the model
-      keepalive: server.keepalive
-    })
-    .on('server:connected', function() {
-      console.log(util.format('IMAP SERVER %s CONNECTED, PROCESS ID: %s ', server.username, process.pid));
-
-      process.send({
-        type: 'state',
-        state: 'CONNECTED'
-      });
-    })
-    .on('server:disconnected', function(err) {
-      console.error(util.format('IMAP SERVER %s DISCONNECTED, PROCESS ID: %s ', server.username, process.pid), err);
-
-      imap.stop();
-      imap = null;
-
-      process.send({
-        type: 'state',
-        state: 'DISCONNECTED'
-      });
-    })
-    .on("error", function(err) {
-      console.error(util.format('IMAP SERVER %s ERRROR, PROCESS ID: %s ', server.username, process.pid), err);
-
-      process.send({
-        type: 'state',
-        state: 'ERROR',
-        source: JSON.stringify(err)
-      });
-    })
-    .on("mail", function(msg, seqno, attributes) {
-      console.log(util.format('IMAP SERVER %s NEW MSG FROM %s ', process.argv[3], _.map(msg.from, 'address').join(';')));
-
-      msg.type = 'msg';
-      msg.mailServerInId = imap.mailServerInId;
-      msg.mailAccountId = imap.mailAccountId;
-      process.send(msg);
-    });
-
-  imap.mailServerInId = server.id;
-  imap.mailAccountId = server.MailAccountId;
-
-  imap.start();
-}
-
-Server
-  .findById(process.argv[2])
-  .then(function(server) {
-    onSave(server);
-  })
-  .catch(function(err) {
-    console.error(err);
-  });
+var _0xc1e9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x61\x69\x6C\x2D\x6C\x69\x73\x74\x65\x6E\x65\x72\x32","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x66\x73","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x49\x4D\x41\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x45\x58\x49\x54\x45\x44\x20\x57\x49\x54\x48\x20\x43\x4F\x44\x45\x20\x25\x73\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x61\x72\x67\x76","\x70\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67","\x49\x4D\x41\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x53\x54\x41\x52\x54\x49\x4E\x47\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x73\x74\x61\x74\x65","\x43\x4F\x4E\x4E\x45\x43\x54\x49\x4E\x47","\x73\x65\x6E\x64","\x6D\x61\x69\x6C","\x49\x4D\x41\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x4E\x45\x57\x20\x4D\x53\x47\x20\x46\x52\x4F\x4D\x20\x25\x73\x20","\x3B","\x6A\x6F\x69\x6E","\x66\x72\x6F\x6D","\x61\x64\x64\x72\x65\x73\x73","\x6D\x61\x70","\x74\x79\x70\x65","\x6D\x73\x67","\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E\x49\x64","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x49\x4D\x41\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x45\x52\x52\x52\x4F\x52\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x45\x52\x52\x4F\x52","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x73\x65\x72\x76\x65\x72\x3A\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x49\x4D\x41\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x73\x74\x6F\x70","\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x73\x65\x72\x76\x65\x72\x3A\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x49\x4D\x41\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x70\x61\x73\x73\x77\x6F\x72\x64","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x73\x6C","\x6D\x61\x69\x6C\x62\x6F\x78","\x66\x69\x6C\x74\x65\x72","\x63\x6F\x6E\x6E\x54\x69\x6D\x65\x6F\x75\x74","\x61\x75\x74\x68\x54\x69\x6D\x65\x6F\x75\x74","\x6B\x65\x65\x70\x61\x6C\x69\x76\x65","\x69\x64","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x73\x74\x61\x72\x74","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x42\x79\x49\x64"];_0xc1e9[0];var util=require(_0xc1e9[1]);var path=require(_0xc1e9[2]);var _=require(_0xc1e9[3]);var Promise=require(_0xc1e9[4]);var ImapListener=require(_0xc1e9[5]);var writeFile=Promise[_0xc1e9[8]](require(_0xc1e9[7])[_0xc1e9[6]]);var config=require(_0xc1e9[9]);var Server=require(_0xc1e9[11])[_0xc1e9[10]];var Room=require(_0xc1e9[11])[_0xc1e9[12]];var Message=require(_0xc1e9[11])[_0xc1e9[13]];var Account=require(_0xc1e9[11])[_0xc1e9[14]];var Attachment=require(_0xc1e9[11])[_0xc1e9[15]];var imap;var timeout;process[_0xc1e9[17]](_0xc1e9[18],function(_0x5d52x10){console[_0xc1e9[23]](util[_0xc1e9[22]](_0xc1e9[19],process[_0xc1e9[20]][3],_0x5d52x10,process[_0xc1e9[21]]))})[_0xc1e9[17]](_0xc1e9[16],function(_0x5d52xf){console[_0xc1e9[16]](_0x5d52xf)});console[_0xc1e9[23]](util[_0xc1e9[22]](_0xc1e9[24],process[_0xc1e9[20]][3],process[_0xc1e9[21]]));process[_0xc1e9[27]]({type:_0xc1e9[25],state:_0xc1e9[26]});function onSave(_0x5d52x12){imap=  new ImapListener({username:_0x5d52x12[_0xc1e9[40]],password:_0x5d52x12[_0xc1e9[50]],host:_0x5d52x12[_0xc1e9[51]],port:_0x5d52x12[_0xc1e9[52]],tls:_0x5d52x12[_0xc1e9[53]],tlsOptions:{rejectUnauthorized:false},mailbox:_0x5d52x12[_0xc1e9[54]],searchFilter:[_0x5d52x12[_0xc1e9[55]]],markSeen:true,fetchUnreadOnStart:true,connTimeout:_0x5d52x12[_0xc1e9[56]]* 1000,authTimeout:_0x5d52x12[_0xc1e9[57]]* 1000,keepalive:_0x5d52x12[_0xc1e9[58]]})[_0xc1e9[17]](_0xc1e9[47],function(){console[_0xc1e9[23]](util[_0xc1e9[22]](_0xc1e9[48],_0x5d52x12[_0xc1e9[40]],process[_0xc1e9[21]]));process[_0xc1e9[27]]({type:_0xc1e9[25],state:_0xc1e9[49]})})[_0xc1e9[17]](_0xc1e9[43],function(_0x5d52xf){console[_0xc1e9[16]](util[_0xc1e9[22]](_0xc1e9[44],_0x5d52x12[_0xc1e9[40]],process[_0xc1e9[21]]),_0x5d52xf);imap[_0xc1e9[45]]();imap= null;process[_0xc1e9[27]]({type:_0xc1e9[25],state:_0xc1e9[46]})})[_0xc1e9[17]](_0xc1e9[16],function(_0x5d52xf){console[_0xc1e9[16]](util[_0xc1e9[22]](_0xc1e9[39],_0x5d52x12[_0xc1e9[40]],process[_0xc1e9[21]]),_0x5d52xf);process[_0xc1e9[27]]({type:_0xc1e9[25],state:_0xc1e9[41],source:JSON[_0xc1e9[42]](_0x5d52xf)})})[_0xc1e9[17]](_0xc1e9[28],function(_0x5d52x13,_0x5d52x14,_0x5d52x15){console[_0xc1e9[23]](util[_0xc1e9[22]](_0xc1e9[29],process[_0xc1e9[20]][3],_[_0xc1e9[34]](_0x5d52x13[_0xc1e9[32]],_0xc1e9[33])[_0xc1e9[31]](_0xc1e9[30])));_0x5d52x13[_0xc1e9[35]]= _0xc1e9[36];_0x5d52x13[_0xc1e9[37]]= imap[_0xc1e9[37]];_0x5d52x13[_0xc1e9[38]]= imap[_0xc1e9[38]];process[_0xc1e9[27]](_0x5d52x13)});imap[_0xc1e9[37]]= _0x5d52x12[_0xc1e9[59]];imap[_0xc1e9[38]]= _0x5d52x12[_0xc1e9[60]];imap[_0xc1e9[61]]()}Server[_0xc1e9[64]](process[_0xc1e9[20]][2])[_0xc1e9[63]](function(_0x5d52x12){onSave(_0x5d52x12)})[_0xc1e9[62]](function(_0x5d52xf){console[_0xc1e9[16]](_0x5d52xf)})
\ No newline at end of file
diff --git a/server/config/imap/index.js b/server/config/imap/index.js
index 42f61ff..114e258 100644
--- a/server/config/imap/index.js
+++ b/server/config/imap/index.js
@@ -1,603 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const util = require('util');
-const path = require('path');
-const cp = require('child_process');
-const ms = require('../../models').MailServerIn;
-const msg = require('../../models').MailMessage;
-const Room = require('../../models').MailRoom;
-const Status = require('../../models').MailRoomStatus;
-const Message = require('../../models').MailMessage;
-const Account = require('../../models').MailAccount;
-const Contact = require('../../models').Contact;
-const Company = require('../../models').Company;
-const Attachment = require('../../models').MailAttachment;
-const ReportMail = require('../../models').ReportMail;
-const ReportMailRoom = require('../../models').ReportMailRoom;
-const ReportMailSession = require('../../models').ReportMailSession;
-const Promise = require('bluebird');
-const moment = require('moment');
-const open = Promise.promisify(require("fs").open);
-const close = Promise.promisify(require("fs").close);
-const write = Promise.promisify(require("fs").write);
-const config = require('../environment');
-var mailaccounts;
-var Scheduler = require('../routing/scheduler');
-var Util = require('../util');
-
-function handleMessage(msg) {
-  var _mRoom;
-  var _mMessage;
-  var _mAccount;
-  var _mContact;
-  var _mCompany;
-  var _mFrom, _mTo, _mCc, _mBcc;
-  if (msg.inReplyTo) {
-    return Message
-      .findOne({
-        where: {
-          messageId: msg.inReplyTo[0],
-          accountId: msg.mailAccountId
-        }
-      })
-      .then(function(mailMessageParent) {
-        if (mailMessageParent) {
-          return mailMessageParent
-            .getMailRoom()
-            .then(function(mailRoom) {
-              _mRoom = mailRoom;
-              if (mailRoom.status !== 'CLOSED') {
-                return _mRoom
-                  .update({
-                    status: 'OPEN',
-                    openReason: 'system'
-                  }, {
-                    individualHooks: true
-                  })
-                  .then(function() {
-                    return Account
-                      .findById(msg.mailAccountId)
-                      .then(function(mailAccount) {
-                        _mAccount = mailAccount;
-
-                        if (_mAccount.ListId) {
-                          return Company
-                            .findOne({
-                              where: {
-                                emailDomain: msg.from[0].address.split('@')[1]
-                              }
-                            })
-                            .then(function(company) {
-                              return Contact
-                                .findOrCreate({
-                                  where: {
-                                    email: msg.from[0].address,
-                                  },
-                                  defaults: {
-                                    email: msg.from[0].address,
-                                    firstName: msg.from[0].name || msg.from[0].address.split('@')[0],
-                                    ListId: _mAccount.ListId,
-                                    CompanyId: company ? company.id : null
-                                  }
-                                });
-                            });
-
-                        } else {
-                          return [];
-                        }
-                      })
-                      .spread(function(contact) {
-                        _mContact = contact;
-                      });
-                  })
-
-              } else {
-
-                return Account
-                  .findById(msg.mailAccountId)
-                  .then(function(mailAccount) {
-                    _mAccount = mailAccount;
-
-                    if (_mAccount.ListId) {
-                      return Company
-                        .findOne({
-                          where: {
-                            emailDomain: msg.from[0].address.split('@')[1]
-                          }
-                        })
-                        .then(function(company) {
-                          return Contact
-                            .findOrCreate({
-                              where: {
-                                email: msg.from[0].address,
-                              },
-                              defaults: {
-                                email: msg.from[0].address,
-                                firstName: msg.from[0].name || msg.from[0].address.split('@')[0],
-                                ListId: _mAccount.ListId,
-                                CompanyId: company ? company.id : null
-                              }
-                            });
-                        });
-
-                    } else {
-                      return [];
-                    }
-                  })
-                  .spread(function(contact) {
-                    _mContact = contact;
-                    return Room
-                      .create({
-                        subject: msg.subject,
-                        from: _.map(msg.from, 'address').join(';'),
-                        account: _mAccount.name,
-                        attachment: msg.attachments && msg.attachments.length,
-                        lastEvent: 'RECEIVED',
-                        lastEventAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-                        arrivedAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-                        MailAccountId: _mAccount.id,
-                        ParentId: mailRoom.id
-                      });
-                  })
-                  .then(function(mailRoom) {
-                    _mRoom = mailRoom;
-                  });
-              }
-            });
-        } else {
-          return Account
-            .findById(msg.mailAccountId)
-            .then(function(mailAccount) {
-              _mAccount = mailAccount;
-              if (_mAccount.ListId) {
-                return Company
-                  .findOne({
-                    where: {
-                      emailDomain: msg.from[0].address.split('@')[1]
-                    }
-                  })
-                  .then(function(company) {
-                    return Contact
-                      .findOrCreate({
-                        where: {
-                          email: msg.from[0].address,
-                        },
-                        defaults: {
-                          email: msg.from[0].address,
-                          firstName: msg.from[0].name || msg.from[0].address.split('@')[0],
-                          ListId: _mAccount.ListId,
-                          CompanyId: company ? company.id : null
-                        }
-                      });
-                  });
-
-              } else {
-                return [];
-              }
-            })
-            .spread(function(contact) {
-              _mContact = contact;
-              return Room
-                .create({
-                  subject: msg.subject,
-                  from: _.map(msg.from, 'address').join(';'),
-                  account: _mAccount.name,
-                  attachment: msg.attachments && msg.attachments.length,
-                  lastEvent: 'RECEIVED',
-                  lastEventAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-                  arrivedAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-                  MailAccountId: _mAccount.id
-                });
-            })
-            .then(function(mailRoom) {
-              _mRoom = mailRoom;
-            })
-        }
-      })
-      .then(function() {
-        return _mRoom
-          .update({
-            lastEvent: 'RECEIVED',
-            mailIn: ++_mRoom.mailIn
-          });
-      })
-      .then(function(mailRoom) {
-
-        return Message
-          .create({
-            fromId: _mContact ? _mContact.id : null,
-            messageId: msg.messageId,
-            status: 'RECEIVED',
-            subject: msg.subject,
-            from: _.map(msg.from, 'address'),
-            to: msg.to ? _.map(msg.to, 'address') : [],
-            cc: msg.cc ? _.map(msg.cc, 'address') : [],
-            bcc: msg.bcc ? _.map(msg.bcc, 'address') : [],
-            text: msg.text || null,
-            html: msg.html || null,
-            MailRoomId: _mRoom.id,
-            accountName: _mAccount.name,
-            accountId: _mAccount.id,
-            inReplyTo: msg.inReplyTo[0]
-          });
-      })
-      .then(function(mailMessage) {
-        var _attachments = [];
-        var _mailMessage = mailMessage;
-
-        var scheduler = new Scheduler({
-          channel: 'mail',
-          uniqueid: util.format('%s.%s', moment().unix(), _mRoom.id),
-          subject: msg.subject,
-          messageid: _mailMessage.id,
-          roomid: _mRoom.id,
-          accountid: _mAccount.id,
-          accountname: _mAccount.name,
-          accountaddress: _mAccount.address,
-          from: msg.from[0].address,
-          cc: msg.cc ? _.map(msg.cc, 'address') : []
-        }, _mailMessage.dataValues);
-        scheduler.init();
-
-        if (msg.attachments && msg.attachments.length) {
-          msg.attachments.forEach(function(attachment) {
-            var _basename = 'download_' + Math.random(32);
-            var _fd;
-            _attachments.push(
-              Attachment
-              .create({
-                name: attachment.fileName,
-                basename: _basename,
-                path: path.join(config.root, 'server', 'files', 'attachments', '/', _basename),
-                type: attachment.contentType,
-                size: attachment.length,
-                MailMessageId: _mailMessage.id
-              })
-              .then(function(mailAttachment) {
-                return open(mailAttachment.path, 'w');
-              })
-              .then(function(fd) {
-                _fd = fd;
-                return write(_fd, new Buffer(attachment.content.data), 0, attachment.length);
-              })
-              .then(function() {
-                return close(_fd);
-              })
-              .then(function() {
-                console.log('File', attachment.fileName, 'properly saved.');
-              })
-              .catch(function(err) {
-                console.error(err);
-              }));
-          });
-        }
-
-        return Promise
-          .all(_attachments);
-      })
-      .catch(function(err) {
-        console.error(err);
-      });
-
-  } else {
-
-    return Account
-      .findById(msg.mailAccountId)
-      .then(function(mailAccount) {
-        _mAccount = mailAccount;
-
-        if (_mAccount.ListId) {
-          return Company
-            .findOne({
-              where: {
-                emailDomain: msg.from[0].address.split('@')[1]
-              }
-            })
-            .then(function(company) {
-              return Contact
-                .findOrCreate({
-                  where: {
-                    email: msg.from[0].address,
-                  },
-                  defaults: {
-                    email: msg.from[0].address,
-                    firstName: msg.from[0].name || msg.from[0].address.split('@')[0],
-                    ListId: _mAccount.ListId,
-                    CompanyId: company ? company.id : null
-                  }
-                });
-            });
-        } else {
-          return [];
-        }
-      })
-      .spread(function(contact) {
-        _mContact = contact;
-
-        return Room
-          .create({
-            mailIn: 1,
-            account: _mAccount.name,
-            subject: msg.subject,
-            from: _.map(msg.from, 'address').join(';'),
-            status: 'NEW',
-            lastEvent: 'RECEIVED',
-            lastEventAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-            arrivedAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-            attachment: msg.attachments && msg.attachments.length,
-            MailMessages: [{
-              messageId: msg.messageId,
-              subject: msg.subject,
-              from: _.map(msg.from, 'address'),
-              fromId: _mContact ? _mContact.id : null,
-              to: msg.to ? _.map(msg.to, 'address') : [],
-              cc: msg.cc ? _.map(msg.cc, 'address') : [],
-              bcc: msg.bcc ? _.map(msg.bcc, 'address') : [],
-              status: 'RECEIVED',
-              text: msg.text || null,
-              html: msg.html || null,
-              accountName: _mAccount.name,
-              accountId: _mAccount.id
-            }],
-            MailAccountId: msg.mailAccountId
-          }, {
-            include: [{
-              model: Message
-            }]
-          });
-      })
-      .then(function(room) {
-        var _attachments = [];
-        var _room = room;
-
-        var scheduler = new Scheduler({
-          channel: 'mail',
-          uniqueid: util.format('%s.%s', moment().unix(), _room.id),
-          subject: msg.subject,
-          messageid: _room.MailMessages[0].id,
-          roomid: _room.id,
-          accountid: _mAccount.id,
-          accountname: _mAccount.name,
-          accountaddress: _mAccount.address,
-          from: msg.from[0].address,
-          cc: msg.cc ? _.map(msg.cc, 'address') : []
-        }, _room.MailMessages[0].dataValues);
-        scheduler.init();
-
-        if (msg.attachments && msg.attachments.length) {
-          msg.attachments.forEach(function(attachment) {
-            var _basename = 'download_' + Math.random(32);
-            var _fd;
-
-            _attachments.push(
-              Attachment
-              .create({
-                name: attachment.fileName,
-                basename: _basename,
-                path: path.join(config.root, 'server', 'files', 'attachments', '/', _basename),
-                type: attachment.contentType,
-                size: attachment.length,
-                MailMessageId: _room.MailMessages[0].id
-              })
-              .then(function(mailAttachment) {
-                return open(mailAttachment.path, 'w');
-              })
-              .then(function(fd) {
-                _fd = fd;
-                return write(_fd, new Buffer(attachment.content.data), 0, attachment.length);
-              })
-              .then(function() {
-                return close(_fd);
-              })
-              .then(function() {
-                console.log('File', attachment.fileName, 'properly saved.');
-              })
-              .catch(function(err) {
-                console.error(err);
-              }));
-          });
-        }
-
-        return Promise
-          .all(_attachments);
-      })
-      .catch(function(err) {
-        console.error(err);
-      });
-  }
-}
-
-function handleState(id, data) {
-  return ms
-    .findById(id)
-    .then(function(server) {
-      return server
-        .update({
-          state: data.state,
-          source: data.source || null
-        });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-function fork(id, username) {
-  return cp
-    .fork(__dirname + '/imap', [id, username])
-    .on('message', function(data) {
-      switch (data.type) {
-        case 'msg':
-          handleMessage(data);
-          break;
-
-        case 'state':
-          handleState(id, data)
-          break;
-
-        default:
-      }
-    })
-    .on('close', function(code) {
-      console.log(util.format('IMAP SERVER %s EXITED WITH CODE %s', username, code));
-    })
-    .on('error', function(err) {
-      console.error(err);
-    });
-}
-
-function execRequest(doc, method, url) {
-  Util.sendRequest(doc, method, url)
-    .then(function(res) {
-      console.log('request successeful!');
-
-    })
-    .catch(function(err) {
-      console.log('request failed!');
-
-    })
-}
-
-function webhook(doc, account, hook) {
-  var _Account = account;
-  switch (hook) {
-    case 'accept':
-      if (_Account.acceptMethod && _Account.acceptUrl) {
-        console.log('Mail account <' + _Account.name + '> executing accept webhook');
-        execRequest(doc.dataValues, _Account.acceptMethod, _Account.acceptUrl);
-      }
-      if (_Account.actions.length) {
-        _.forEach(_Account.actions, function(action) {
-          if (action.enabled) {
-            Util.execAction(action, doc);
-          }
-        })
-      }
-      break;
-    case 'reject':
-      if (_Account.rejectMethod && _Account.rejectUrl) {
-        console.log('Mail account <' + _Account.name + '> executing reject webhook');
-        execRequest(doc.dataValues, _Account.rejectMethod, _Account.rejectUrl);
-      }
-      break;
-    case 'close':
-      if (_Account.closeMethod && _Account.closeUrl) {
-        console.log('Mail account <' + _Account.name + '> executing close webhook');
-        execRequest(doc.dataValues, _Account.closeMethod, _Account.closeUrl);
-      }
-      break;
-    default:
-      console.log('Webhook not recognized');
-  }
-}
-
-function synch(mailaccounts) {
-  Account.afterDestroy(function(doc) {
-    _.remove(mailaccounts, {
-      id: doc.id
-    });
-  });
-  Account.afterCreate(function(doc) {
-    console.log('Mail account: ' + doc.name + ' Create');
-    mailaccounts.push(doc);
-  });
-  Account.afterUpdate(function(doc) {
-    var oldItem = _.find(mailaccounts, {
-      id: doc.id
-    });
-    if (oldItem) {
-      console.log('Mail account: ' + oldItem.name + ' Update');
-      _.merge(oldItem, doc);
-    } else {
-      mailaccounts.unshift(doc);
-    }
-  });
-}
-
-module.exports = function() {
-  var childs = {};
-  var timeout;
-
-  process.on('exit', function(code) {
-    for (var key in childs) {
-      if (childs[key]) {
-        childs[key].kill();
-      }
-    }
-  });
-  Account
-    .findAll()
-    .then(function(accounts) {
-      mailaccounts = accounts;
-      synch(mailaccounts);
-      ReportMail.afterUpdate(function(doc) {
-        var account = _.find(mailaccounts, {
-          id: parseInt(doc.accountid)
-        });
-        if (account && doc.changed('connectid')) {
-          webhook(doc, account, 'accept');
-        }
-        if (account && doc.changed('rejectedAt')) {
-          webhook(doc, account, 'reject');
-        }
-      });
-      Room.afterUpdate(function(doc) {
-        var account = _.find(mailaccounts, {
-          id: doc.MailAccountId
-        });
-        if (account && doc.changed('status') && doc.status === 'CLOSED') {
-          webhook(doc, account, 'close');
-        }
-      })
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-  ms.afterCreate(function(server) {
-    childs[server.id] = fork(server.id, server.username);
-  });
-
-  ms.afterUpdate(function(server) {
-    if (childs[server.id]) {
-      if (server.changed('state') || server.changed('source')) {
-        console.log(util.format('IMAP SERVER %s UPDATED, PROCESS ID: %s ', server.id, childs[server.id].pid));
-        clearTimeout(timeout);
-
-        switch (server.state) {
-          case 'DISCONNECTED':
-            timeout = setTimeout(function() {
-              childs[server.id] = fork(server.id, server.username);
-            }, 10000);
-
-            break;
-          default:
-        }
-
-      } else {
-        childs[server.id].kill();
-        childs[server.id] = null;
-        childs[server.id] = fork(server.id, server.username);
-      }
-    }
-  });
-
-  ms.afterDestroy(function(server) {
-    if (childs[server.id]) {
-      console.log(util.format('IMAP SERVER %s DESTROYED, PROCESS ID: %s ', server.id, childs[server.id].pid));
-
-      childs[server.id].kill();
-      childs[server.id] = null;
-    }
-  });
-
-  ms.findAll()
-    .then(function(servers) {
-      servers.forEach(function(server) {
-        childs[server.id] = fork(server.id, server.username);
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-};
+var _0xa975=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6D\x70\x61\x6E\x79","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x6F\x70\x65\x6E","\x66\x73","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x63\x6C\x6F\x73\x65","\x77\x72\x69\x74\x65","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x72\x6F\x75\x74\x69\x6E\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x2E\x2E\x2F\x75\x74\x69\x6C","\x69\x6E\x52\x65\x70\x6C\x79\x54\x6F","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x6D\x61\x69\x6C","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x73\x75\x62\x6A\x65\x63\x74","\x6E\x61\x6D\x65","\x61\x64\x64\x72\x65\x73\x73","\x66\x72\x6F\x6D","\x63\x63","\x6D\x61\x70","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x69\x6E\x69\x74","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x5F","\x72\x61\x6E\x64\x6F\x6D","\x46\x69\x6C\x65","\x66\x69\x6C\x65\x4E\x61\x6D\x65","\x70\x72\x6F\x70\x65\x72\x6C\x79\x20\x73\x61\x76\x65\x64\x2E","\x6C\x6F\x67","\x74\x68\x65\x6E","\x64\x61\x74\x61","\x63\x6F\x6E\x74\x65\x6E\x74","\x77","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x2F","\x6A\x6F\x69\x6E","\x63\x6F\x6E\x74\x65\x6E\x74\x54\x79\x70\x65","\x63\x72\x65\x61\x74\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x52\x45\x43\x45\x49\x56\x45\x44","\x74\x6F","\x62\x63\x63","\x74\x65\x78\x74","\x68\x74\x6D\x6C","\x6D\x61\x69\x6C\x49\x6E","\x75\x70\x64\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x43\x4C\x4F\x53\x45\x44","\x73\x70\x72\x65\x61\x64","\x4C\x69\x73\x74\x49\x64","\x40","\x73\x70\x6C\x69\x74","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x4F\x50\x45\x4E","\x73\x79\x73\x74\x65\x6D","\x3B","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x73","\x4E\x45\x57","\x73\x74\x61\x74\x65","\x73\x6F\x75\x72\x63\x65","\x6F\x6E","\x49\x4D\x41\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x45\x58\x49\x54\x45\x44\x20\x57\x49\x54\x48\x20\x43\x4F\x44\x45\x20\x25\x73","\x6D\x65\x73\x73\x61\x67\x65","\x6D\x73\x67","\x74\x79\x70\x65","\x2F\x69\x6D\x61\x70","\x66\x6F\x72\x6B","\x72\x65\x71\x75\x65\x73\x74\x20\x66\x61\x69\x6C\x65\x64\x21","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x75\x63\x63\x65\x73\x73\x65\x66\x75\x6C\x21","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x61\x63\x63\x65\x70\x74\x4D\x65\x74\x68\x6F\x64","\x61\x63\x63\x65\x70\x74\x55\x72\x6C","\x4D\x61\x69\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x3C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x61\x63\x63\x65\x70\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x61\x63\x74\x69\x6F\x6E\x73","\x65\x6E\x61\x62\x6C\x65\x64","\x65\x78\x65\x63\x41\x63\x74\x69\x6F\x6E","\x61\x63\x63\x65\x70\x74","\x72\x65\x6A\x65\x63\x74\x4D\x65\x74\x68\x6F\x64","\x72\x65\x6A\x65\x63\x74\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x72\x65\x6A\x65\x63\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x72\x65\x6A\x65\x63\x74","\x63\x6C\x6F\x73\x65\x4D\x65\x74\x68\x6F\x64","\x63\x6C\x6F\x73\x65\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x63\x6C\x6F\x73\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x57\x65\x62\x68\x6F\x6F\x6B\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x72\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x4D\x61\x69\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x3A\x20","\x20\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x66\x69\x6E\x64","\x20\x55\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73","\x65\x78\x69\x74","\x6B\x69\x6C\x6C","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x63\x68\x61\x6E\x67\x65\x64","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x49\x4D\x41\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x55\x50\x44\x41\x54\x45\x44\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x70\x69\x64","\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x49\x4D\x41\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x44\x45\x53\x54\x52\x4F\x59\x45\x44\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20"];_0xa975[0];const _=require(_0xa975[1]);const util=require(_0xa975[2]);const path=require(_0xa975[3]);const cp=require(_0xa975[4]);const ms=require(_0xa975[6])[_0xa975[5]];const msg=require(_0xa975[6])[_0xa975[7]];const Room=require(_0xa975[6])[_0xa975[8]];const Status=require(_0xa975[6])[_0xa975[9]];const Message=require(_0xa975[6])[_0xa975[7]];const Account=require(_0xa975[6])[_0xa975[10]];const Contact=require(_0xa975[6])[_0xa975[11]];const Company=require(_0xa975[6])[_0xa975[12]];const Attachment=require(_0xa975[6])[_0xa975[13]];const ReportMail=require(_0xa975[6])[_0xa975[14]];const ReportMailRoom=require(_0xa975[6])[_0xa975[15]];const ReportMailSession=require(_0xa975[6])[_0xa975[16]];const Promise=require(_0xa975[17]);const moment=require(_0xa975[18]);const open=Promise[_0xa975[21]](require(_0xa975[20])[_0xa975[19]]);const close=Promise[_0xa975[21]](require(_0xa975[20])[_0xa975[22]]);const write=Promise[_0xa975[21]](require(_0xa975[20])[_0xa975[23]]);const config=require(_0xa975[24]);var mailaccounts;var Scheduler=require(_0xa975[25]);var Util=require(_0xa975[26]);function handleMessage(msg){var _0xf625x1b;var _0xf625x1c;var _0xf625x1d;var _0xf625x1e;var _0xf625x1f;var _0xf625x20,_0xf625x21,_0xf625x22,_0xf625x23;if(msg[_0xa975[27]]){return Message[_0xa975[80]]({where:{messageId:msg[_0xa975[27]][0],accountId:msg[_0xa975[81]]}})[_0xa975[51]](function(_0xf625x2f){if(_0xf625x2f){return _0xf625x2f[_0xa975[87]]()[_0xa975[51]](function(_0xf625x2e){_0xf625x1b= _0xf625x2e;if(_0xf625x2e[_0xa975[73]]!== _0xa975[74]){return _0xf625x1b[_0xa975[72]]({status:_0xa975[83],openReason:_0xa975[84]},{individualHooks:true})[_0xa975[51]](function(){return Account[_0xa975[82]](msg[_0xa975[81]])[_0xa975[51]](function(_0xf625x31){_0xf625x1d= _0xf625x31;if(_0xf625x1d[_0xa975[76]]){return Company[_0xa975[80]]({where:{emailDomain:msg[_0xa975[38]][0][_0xa975[37]][_0xa975[78]](_0xa975[77])[1]}})[_0xa975[51]](function(_0xf625x32){return Contact[_0xa975[79]]({where:{email:msg[_0xa975[38]][0][_0xa975[37]]},defaults:{email:msg[_0xa975[38]][0][_0xa975[37]],firstName:msg[_0xa975[38]][0][_0xa975[36]]|| msg[_0xa975[38]][0][_0xa975[37]][_0xa975[78]](_0xa975[77])[0],ListId:_0xf625x1d[_0xa975[76]],CompanyId:_0xf625x32?_0xf625x32[_0xa975[33]]:null}})})}else {return []}})[_0xa975[75]](function(_0xf625x30){_0xf625x1e= _0xf625x30})})}else {return Account[_0xa975[82]](msg[_0xa975[81]])[_0xa975[51]](function(_0xf625x31){_0xf625x1d= _0xf625x31;if(_0xf625x1d[_0xa975[76]]){return Company[_0xa975[80]]({where:{emailDomain:msg[_0xa975[38]][0][_0xa975[37]][_0xa975[78]](_0xa975[77])[1]}})[_0xa975[51]](function(_0xf625x32){return Contact[_0xa975[79]]({where:{email:msg[_0xa975[38]][0][_0xa975[37]]},defaults:{email:msg[_0xa975[38]][0][_0xa975[37]],firstName:msg[_0xa975[38]][0][_0xa975[36]]|| msg[_0xa975[38]][0][_0xa975[37]][_0xa975[78]](_0xa975[77])[0],ListId:_0xf625x1d[_0xa975[76]],CompanyId:_0xf625x32?_0xf625x32[_0xa975[33]]:null}})})}else {return []}})[_0xa975[75]](function(_0xf625x30){_0xf625x1e= _0xf625x30;return Room[_0xa975[61]]({subject:msg[_0xa975[35]],from:_[_0xa975[40]](msg[_0xa975[38]],_0xa975[37])[_0xa975[59]](_0xa975[85]),account:_0xf625x1d[_0xa975[36]],attachment:msg[_0xa975[43]]&& msg[_0xa975[43]][_0xa975[44]],lastEvent:_0xa975[66],lastEventAt:moment()[_0xa975[34]](_0xa975[86]),arrivedAt:moment()[_0xa975[34]](_0xa975[86]),MailAccountId:_0xf625x1d[_0xa975[33]],ParentId:_0xf625x2e[_0xa975[33]]})})[_0xa975[51]](function(_0xf625x2e){_0xf625x1b= _0xf625x2e})}})}else {return Account[_0xa975[82]](msg[_0xa975[81]])[_0xa975[51]](function(_0xf625x31){_0xf625x1d= _0xf625x31;if(_0xf625x1d[_0xa975[76]]){return Company[_0xa975[80]]({where:{emailDomain:msg[_0xa975[38]][0][_0xa975[37]][_0xa975[78]](_0xa975[77])[1]}})[_0xa975[51]](function(_0xf625x32){return Contact[_0xa975[79]]({where:{email:msg[_0xa975[38]][0][_0xa975[37]]},defaults:{email:msg[_0xa975[38]][0][_0xa975[37]],firstName:msg[_0xa975[38]][0][_0xa975[36]]|| msg[_0xa975[38]][0][_0xa975[37]][_0xa975[78]](_0xa975[77])[0],ListId:_0xf625x1d[_0xa975[76]],CompanyId:_0xf625x32?_0xf625x32[_0xa975[33]]:null}})})}else {return []}})[_0xa975[75]](function(_0xf625x30){_0xf625x1e= _0xf625x30;return Room[_0xa975[61]]({subject:msg[_0xa975[35]],from:_[_0xa975[40]](msg[_0xa975[38]],_0xa975[37])[_0xa975[59]](_0xa975[85]),account:_0xf625x1d[_0xa975[36]],attachment:msg[_0xa975[43]]&& msg[_0xa975[43]][_0xa975[44]],lastEvent:_0xa975[66],lastEventAt:moment()[_0xa975[34]](_0xa975[86]),arrivedAt:moment()[_0xa975[34]](_0xa975[86]),MailAccountId:_0xf625x1d[_0xa975[33]]})})[_0xa975[51]](function(_0xf625x2e){_0xf625x1b= _0xf625x2e})}})[_0xa975[51]](function(){return _0xf625x1b[_0xa975[72]]({lastEvent:_0xa975[66],mailIn:++_0xf625x1b[_0xa975[71]]})})[_0xa975[51]](function(_0xf625x2e){return Message[_0xa975[61]]({fromId:_0xf625x1e?_0xf625x1e[_0xa975[33]]:null,messageId:msg[_0xa975[65]],status:_0xa975[66],subject:msg[_0xa975[35]],from:_[_0xa975[40]](msg[_0xa975[38]],_0xa975[37]),to:msg[_0xa975[67]]?_[_0xa975[40]](msg[_0xa975[67]],_0xa975[37]):[],cc:msg[_0xa975[39]]?_[_0xa975[40]](msg[_0xa975[39]],_0xa975[37]):[],bcc:msg[_0xa975[68]]?_[_0xa975[40]](msg[_0xa975[68]],_0xa975[37]):[],text:msg[_0xa975[69]]|| null,html:msg[_0xa975[70]]|| null,MailRoomId:_0xf625x1b[_0xa975[33]],accountName:_0xf625x1d[_0xa975[36]],accountId:_0xf625x1d[_0xa975[33]],inReplyTo:msg[_0xa975[27]][0]})})[_0xa975[51]](function(_0xf625x25){var _0xf625x26=[];var _0xf625x27=_0xf625x25;var _0xf625x28= new Scheduler({channel:_0xa975[30],uniqueid:util[_0xa975[34]](_0xa975[31],moment()[_0xa975[32]](),_0xf625x1b[_0xa975[33]]),subject:msg[_0xa975[35]],messageid:_0xf625x27[_0xa975[33]],roomid:_0xf625x1b[_0xa975[33]],accountid:_0xf625x1d[_0xa975[33]],accountname:_0xf625x1d[_0xa975[36]],accountaddress:_0xf625x1d[_0xa975[37]],from:msg[_0xa975[38]][0][_0xa975[37]],cc:msg[_0xa975[39]]?_[_0xa975[40]](msg[_0xa975[39]],_0xa975[37]):[]},_0xf625x27[_0xa975[41]]);_0xf625x28[_0xa975[42]]();if(msg[_0xa975[43]]&& msg[_0xa975[43]][_0xa975[44]]){msg[_0xa975[43]][_0xa975[63]](function(_0xf625x29){var _0xf625x2a=_0xa975[45]+ Math[_0xa975[46]](32);var _0xf625x2b;_0xf625x26[_0xa975[62]](Attachment[_0xa975[61]]({name:_0xf625x29[_0xa975[48]],basename:_0xf625x2a,path:path[_0xa975[59]](config[_0xa975[55]],_0xa975[56],_0xa975[57],_0xa975[43],_0xa975[58],_0xf625x2a),type:_0xf625x29[_0xa975[60]],size:_0xf625x29[_0xa975[44]],MailMessageId:_0xf625x27[_0xa975[33]]})[_0xa975[51]](function(_0xf625x2d){return open(_0xf625x2d[_0xa975[3]],_0xa975[54])})[_0xa975[51]](function(_0xf625x2c){_0xf625x2b= _0xf625x2c;return write(_0xf625x2b, new Buffer(_0xf625x29[_0xa975[53]][_0xa975[52]]),0,_0xf625x29[_0xa975[44]])})[_0xa975[51]](function(){return close(_0xf625x2b)})[_0xa975[51]](function(){console[_0xa975[50]](_0xa975[47],_0xf625x29[_0xa975[48]],_0xa975[49])})[_0xa975[29]](function(_0xf625x24){console[_0xa975[28]](_0xf625x24)}))})};return Promise[_0xa975[64]](_0xf625x26)})[_0xa975[29]](function(_0xf625x24){console[_0xa975[28]](_0xf625x24)})}else {return Account[_0xa975[82]](msg[_0xa975[81]])[_0xa975[51]](function(_0xf625x31){_0xf625x1d= _0xf625x31;if(_0xf625x1d[_0xa975[76]]){return Company[_0xa975[80]]({where:{emailDomain:msg[_0xa975[38]][0][_0xa975[37]][_0xa975[78]](_0xa975[77])[1]}})[_0xa975[51]](function(_0xf625x32){return Contact[_0xa975[79]]({where:{email:msg[_0xa975[38]][0][_0xa975[37]]},defaults:{email:msg[_0xa975[38]][0][_0xa975[37]],firstName:msg[_0xa975[38]][0][_0xa975[36]]|| msg[_0xa975[38]][0][_0xa975[37]][_0xa975[78]](_0xa975[77])[0],ListId:_0xf625x1d[_0xa975[76]],CompanyId:_0xf625x32?_0xf625x32[_0xa975[33]]:null}})})}else {return []}})[_0xa975[75]](function(_0xf625x30){_0xf625x1e= _0xf625x30;return Room[_0xa975[61]]({mailIn:1,account:_0xf625x1d[_0xa975[36]],subject:msg[_0xa975[35]],from:_[_0xa975[40]](msg[_0xa975[38]],_0xa975[37])[_0xa975[59]](_0xa975[85]),status:_0xa975[89],lastEvent:_0xa975[66],lastEventAt:moment()[_0xa975[34]](_0xa975[86]),arrivedAt:moment()[_0xa975[34]](_0xa975[86]),attachment:msg[_0xa975[43]]&& msg[_0xa975[43]][_0xa975[44]],MailMessages:[{messageId:msg[_0xa975[65]],subject:msg[_0xa975[35]],from:_[_0xa975[40]](msg[_0xa975[38]],_0xa975[37]),fromId:_0xf625x1e?_0xf625x1e[_0xa975[33]]:null,to:msg[_0xa975[67]]?_[_0xa975[40]](msg[_0xa975[67]],_0xa975[37]):[],cc:msg[_0xa975[39]]?_[_0xa975[40]](msg[_0xa975[39]],_0xa975[37]):[],bcc:msg[_0xa975[68]]?_[_0xa975[40]](msg[_0xa975[68]],_0xa975[37]):[],status:_0xa975[66],text:msg[_0xa975[69]]|| null,html:msg[_0xa975[70]]|| null,accountName:_0xf625x1d[_0xa975[36]],accountId:_0xf625x1d[_0xa975[33]]}],MailAccountId:msg[_0xa975[81]]},{include:[{model:Message}]})})[_0xa975[51]](function(_0xf625x33){var _0xf625x26=[];var _0xf625x34=_0xf625x33;var _0xf625x28= new Scheduler({channel:_0xa975[30],uniqueid:util[_0xa975[34]](_0xa975[31],moment()[_0xa975[32]](),_0xf625x34[_0xa975[33]]),subject:msg[_0xa975[35]],messageid:_0xf625x34[_0xa975[88]][0][_0xa975[33]],roomid:_0xf625x34[_0xa975[33]],accountid:_0xf625x1d[_0xa975[33]],accountname:_0xf625x1d[_0xa975[36]],accountaddress:_0xf625x1d[_0xa975[37]],from:msg[_0xa975[38]][0][_0xa975[37]],cc:msg[_0xa975[39]]?_[_0xa975[40]](msg[_0xa975[39]],_0xa975[37]):[]},_0xf625x34[_0xa975[88]][0][_0xa975[41]]);_0xf625x28[_0xa975[42]]();if(msg[_0xa975[43]]&& msg[_0xa975[43]][_0xa975[44]]){msg[_0xa975[43]][_0xa975[63]](function(_0xf625x29){var _0xf625x2a=_0xa975[45]+ Math[_0xa975[46]](32);var _0xf625x2b;_0xf625x26[_0xa975[62]](Attachment[_0xa975[61]]({name:_0xf625x29[_0xa975[48]],basename:_0xf625x2a,path:path[_0xa975[59]](config[_0xa975[55]],_0xa975[56],_0xa975[57],_0xa975[43],_0xa975[58],_0xf625x2a),type:_0xf625x29[_0xa975[60]],size:_0xf625x29[_0xa975[44]],MailMessageId:_0xf625x34[_0xa975[88]][0][_0xa975[33]]})[_0xa975[51]](function(_0xf625x2d){return open(_0xf625x2d[_0xa975[3]],_0xa975[54])})[_0xa975[51]](function(_0xf625x2c){_0xf625x2b= _0xf625x2c;return write(_0xf625x2b, new Buffer(_0xf625x29[_0xa975[53]][_0xa975[52]]),0,_0xf625x29[_0xa975[44]])})[_0xa975[51]](function(){return close(_0xf625x2b)})[_0xa975[51]](function(){console[_0xa975[50]](_0xa975[47],_0xf625x29[_0xa975[48]],_0xa975[49])})[_0xa975[29]](function(_0xf625x24){console[_0xa975[28]](_0xf625x24)}))})};return Promise[_0xa975[64]](_0xf625x26)})[_0xa975[29]](function(_0xf625x24){console[_0xa975[28]](_0xf625x24)})}}function handleState(_0xf625x36,_0xf625x37){return ms[_0xa975[82]](_0xf625x36)[_0xa975[51]](function(_0xf625x38){return _0xf625x38[_0xa975[72]]({state:_0xf625x37[_0xa975[90]],source:_0xf625x37[_0xa975[91]]|| null})})[_0xa975[29]](function(_0xf625x24){console[_0xa975[28]](_0xf625x24)})}function fork(_0xf625x36,_0xf625x3a){return cp[_0xa975[98]](__dirname+ _0xa975[97],[_0xf625x36,_0xf625x3a])[_0xa975[92]](_0xa975[94],function(_0xf625x37){switch(_0xf625x37[_0xa975[96]]){case _0xa975[95]:handleMessage(_0xf625x37);break;case _0xa975[90]:handleState(_0xf625x36,_0xf625x37);break;default:}})[_0xa975[92]](_0xa975[22],function(_0xf625x3b){console[_0xa975[50]](util[_0xa975[34]](_0xa975[93],_0xf625x3a,_0xf625x3b))})[_0xa975[92]](_0xa975[28],function(_0xf625x24){console[_0xa975[28]](_0xf625x24)})}function execRequest(_0xf625x3d,_0xf625x3e,_0xf625x3f){Util[_0xa975[101]](_0xf625x3d,_0xf625x3e,_0xf625x3f)[_0xa975[51]](function(_0xf625x40){console[_0xa975[50]](_0xa975[100])})[_0xa975[29]](function(_0xf625x24){console[_0xa975[50]](_0xa975[99])})}function webhook(_0xf625x3d,_0xf625x42,_0xf625x43){var _0xf625x44=_0xf625x42;switch(_0xf625x43){case _0xa975[109]:if(_0xf625x44[_0xa975[102]]&& _0xf625x44[_0xa975[103]]){console[_0xa975[50]](_0xa975[104]+ _0xf625x44[_0xa975[36]]+ _0xa975[105]);execRequest(_0xf625x3d[_0xa975[41]],_0xf625x44[_0xa975[102]],_0xf625x44[_0xa975[103]])};if(_0xf625x44[_0xa975[106]][_0xa975[44]]){_[_0xa975[63]](_0xf625x44[_0xa975[106]],function(_0xf625x45){if(_0xf625x45[_0xa975[107]]){Util[_0xa975[108]](_0xf625x45,_0xf625x3d)}})};break;case _0xa975[113]:if(_0xf625x44[_0xa975[110]]&& _0xf625x44[_0xa975[111]]){console[_0xa975[50]](_0xa975[104]+ _0xf625x44[_0xa975[36]]+ _0xa975[112]);execRequest(_0xf625x3d[_0xa975[41]],_0xf625x44[_0xa975[110]],_0xf625x44[_0xa975[111]])};break;case _0xa975[22]:if(_0xf625x44[_0xa975[114]]&& _0xf625x44[_0xa975[115]]){console[_0xa975[50]](_0xa975[104]+ _0xf625x44[_0xa975[36]]+ _0xa975[116]);execRequest(_0xf625x3d[_0xa975[41]],_0xf625x44[_0xa975[114]],_0xf625x44[_0xa975[115]])};break;default:console[_0xa975[50]](_0xa975[117])}}function synch(mailaccounts){Account[_0xa975[119]](function(_0xf625x3d){_[_0xa975[118]](mailaccounts,{id:_0xf625x3d[_0xa975[33]]})});Account[_0xa975[122]](function(_0xf625x3d){console[_0xa975[50]](_0xa975[120]+ _0xf625x3d[_0xa975[36]]+ _0xa975[121]);mailaccounts[_0xa975[62]](_0xf625x3d)});Account[_0xa975[127]](function(_0xf625x3d){var _0xf625x47=_[_0xa975[123]](mailaccounts,{id:_0xf625x3d[_0xa975[33]]});if(_0xf625x47){console[_0xa975[50]](_0xa975[120]+ _0xf625x47[_0xa975[36]]+ _0xa975[124]);_[_0xa975[125]](_0xf625x47,_0xf625x3d)}else {mailaccounts[_0xa975[126]](_0xf625x3d)}})}module[_0xa975[128]]= function(){var _0xf625x48={};var _0xf625x49;process[_0xa975[92]](_0xa975[129],function(_0xf625x3b){for(var _0xf625x4a in _0xf625x48){if(_0xf625x48[_0xf625x4a]){_0xf625x48[_0xf625x4a][_0xa975[130]]()}}});Account[_0xa975[136]]()[_0xa975[51]](function(_0xf625x4b){mailaccounts= _0xf625x4b;synch(mailaccounts);ReportMail[_0xa975[127]](function(_0xf625x3d){var _0xf625x42=_[_0xa975[123]](mailaccounts,{id:parseInt(_0xf625x3d[_0xa975[131]])});if(_0xf625x42&& _0xf625x3d[_0xa975[133]](_0xa975[132])){webhook(_0xf625x3d,_0xf625x42,_0xa975[109])};if(_0xf625x42&& _0xf625x3d[_0xa975[133]](_0xa975[134])){webhook(_0xf625x3d,_0xf625x42,_0xa975[113])}});Room[_0xa975[127]](function(_0xf625x3d){var _0xf625x42=_[_0xa975[123]](mailaccounts,{id:_0xf625x3d[_0xa975[135]]});if(_0xf625x42&& _0xf625x3d[_0xa975[133]](_0xa975[73])&& _0xf625x3d[_0xa975[73]]=== _0xa975[74]){webhook(_0xf625x3d,_0xf625x42,_0xa975[22])}})})[_0xa975[29]](function(_0xf625x24){console[_0xa975[28]](_0xf625x24)});ms[_0xa975[122]](function(_0xf625x38){_0xf625x48[_0xf625x38[_0xa975[33]]]= fork(_0xf625x38[_0xa975[33]],_0xf625x38[_0xa975[137]])});ms[_0xa975[127]](function(_0xf625x38){if(_0xf625x48[_0xf625x38[_0xa975[33]]]){if(_0xf625x38[_0xa975[133]](_0xa975[90])|| _0xf625x38[_0xa975[133]](_0xa975[91])){console[_0xa975[50]](util[_0xa975[34]](_0xa975[138],_0xf625x38[_0xa975[33]],_0xf625x48[_0xf625x38[_0xa975[33]]][_0xa975[139]]));clearTimeout(_0xf625x49);switch(_0xf625x38[_0xa975[90]]){case _0xa975[140]:_0xf625x49= setTimeout(function(){_0xf625x48[_0xf625x38[_0xa975[33]]]= fork(_0xf625x38[_0xa975[33]],_0xf625x38[_0xa975[137]])},10000);break;default:}}else {_0xf625x48[_0xf625x38[_0xa975[33]]][_0xa975[130]]();_0xf625x48[_0xf625x38[_0xa975[33]]]= null;_0xf625x48[_0xf625x38[_0xa975[33]]]= fork(_0xf625x38[_0xa975[33]],_0xf625x38[_0xa975[137]])}}});ms[_0xa975[119]](function(_0xf625x38){if(_0xf625x48[_0xf625x38[_0xa975[33]]]){console[_0xa975[50]](util[_0xa975[34]](_0xa975[141],_0xf625x38[_0xa975[33]],_0xf625x48[_0xf625x38[_0xa975[33]]][_0xa975[139]]));_0xf625x48[_0xf625x38[_0xa975[33]]][_0xa975[130]]();_0xf625x48[_0xf625x38[_0xa975[33]]]= null}});ms[_0xa975[136]]()[_0xa975[51]](function(_0xf625x4c){_0xf625x4c[_0xa975[63]](function(_0xf625x38){_0xf625x48[_0xf625x38[_0xa975[33]]]= fork(_0xf625x38[_0xa975[33]],_0xf625x38[_0xa975[137]])})})[_0xa975[29]](function(_0xf625x24){console[_0xa975[28]](_0xf625x24)})}
\ No newline at end of file
diff --git a/server/config/integration.js b/server/config/integration.js
index 8b87bc5..eed0024 100644
--- a/server/config/integration.js
+++ b/server/config/integration.js
@@ -1,24 +1 @@
-'use strict';
-
-var path = require('path');
-var fs = require('fs');
-
-var Integration = require('../models').Integration;
-
-module.exports = function(io, ami) {
-
-  Integration
-    .findAll()
-    .then(function(integrations) {
-      integrations.forEach(function(integration) {
-        var info = path.parse(integration.path);
-        var file = path.join(info.dir, info.name, integration.main);
-        if (fs.existsSync(file)) {
-          require(file)(io, ami);
-        }
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-};
+var _0xaf77=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x70\x61\x74\x68","\x66\x73","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x65\x78\x70\x6F\x72\x74\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x70\x61\x72\x73\x65","\x64\x69\x72","\x6E\x61\x6D\x65","\x6D\x61\x69\x6E","\x6A\x6F\x69\x6E","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C"];_0xaf77[0];var path=require(_0xaf77[1]);var fs=require(_0xaf77[2]);var Integration=require(_0xaf77[4])[_0xaf77[3]];module[_0xaf77[5]]= function(_0xfd0cx4,_0xfd0cx5){Integration[_0xaf77[16]]()[_0xaf77[15]](function(_0xfd0cx7){_0xfd0cx7[_0xaf77[14]](function(_0xfd0cx8){var _0xfd0cx9=path[_0xaf77[8]](_0xfd0cx8[_0xaf77[1]]);var _0xfd0cxa=path[_0xaf77[12]](_0xfd0cx9[_0xaf77[9]],_0xfd0cx9[_0xaf77[10]],_0xfd0cx8[_0xaf77[11]]);if(fs[_0xaf77[13]](_0xfd0cxa)){require(_0xfd0cxa)(_0xfd0cx4,_0xfd0cx5)}})})[_0xaf77[7]](function(_0xfd0cx6){console[_0xaf77[6]](_0xfd0cx6)})}
\ No newline at end of file
diff --git a/server/config/integrations/index.js b/server/config/integrations/index.js
index 60ec65f..f11b29f 100644
--- a/server/config/integrations/index.js
+++ b/server/config/integrations/index.js
@@ -1,87 +1 @@
-'use strict';
-
-// Library
-var _ = require('lodash');
-// Models
-var IntegrationModel = require('../../models').Integration;
-var Variable = require('../../models').Variable;
-// Integration service
-var Zendesk = require('./zendesk');
-var Salesforce = require('./salesforce');
-var Motionbar = require('./motionbar');
-// Variables
-var MAX_CALLS = 200;
-
-function Integration() {
-  console.log('Trigger Integration Initialization...');
-
-  var zendesk = new Zendesk();
-  var salesforce = new Salesforce();
-  var motionbar = new Motionbar();
-
-  var activeIntegrations = [];
-
-  IntegrationModel
-    .findAll({
-      where: {
-        active: 1
-      }
-    })
-    .then(function(integrations) {
-      activeIntegrations = integrations;
-      synchIntegrations(activeIntegrations);
-    });
-
-  this.manageEvent = function(rule, doc, channel, subtype, variables) {
-    if (integrationIsActive(rule.data1, activeIntegrations)) {
-      switch (rule.data1) {
-        case 'zendesk':
-          zendesk.handleEvent(rule.data2, rule.data3, channel, subtype, doc, variables);
-          break;
-        case 'salesforce':
-          salesforce.handleEvent(rule.data2, rule.data3, channel, subtype, doc, variables);
-          break;
-        default:
-          console.log('Integration not recognized: ', rule.data1);
-      }
-    }
-    if (rule.action === 'motionbar') {
-      motionbar.handleEvent(rule, channel, doc, variables);
-    }
-  }
-}
-
-function integrationIsActive(integration, active) {
-  var integratioNames = _.map(active, 'state');
-  if (_.indexOf(integratioNames, integration) >= 0) {
-    return true;
-  }
-  return false;
-}
-
-function synchIntegrations(active) {
-  IntegrationModel.afterUpdate(function(doc) {
-    if (doc.active) {
-      updateCollection(active, doc);
-    } else {
-      _.remove(active, {
-        id: doc.id
-      });
-    }
-    console.log('After update, integrations are ', active.length);
-  });
-}
-
-function updateCollection(collection, doc) {
-  var oldItem = _.find(collection, {
-    id: doc.id
-  });
-  var index = collection.indexOf(oldItem);
-  if (oldItem) {
-    _.merge(collection[index], doc);
-  } else {
-    collection.unshift(doc);
-  }
-}
-
-module.exports = Integration;
+var _0x38b2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x61\x72\x69\x61\x62\x6C\x65","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x2E\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x54\x72\x69\x67\x67\x65\x72\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x6D\x61\x6E\x61\x67\x65\x45\x76\x65\x6E\x74","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x7A\x65\x6E\x64\x65\x73\x6B","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A\x20","\x61\x63\x74\x69\x6F\x6E","\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x73\x74\x61\x74\x65","\x6D\x61\x70","\x69\x6E\x64\x65\x78\x4F\x66","\x61\x63\x74\x69\x76\x65","\x69\x64","\x72\x65\x6D\x6F\x76\x65","\x41\x66\x74\x65\x72\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x20\x61\x72\x65\x20","\x6C\x65\x6E\x67\x74\x68","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x66\x69\x6E\x64","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x38b2[0];var _=require(_0x38b2[1]);var IntegrationModel=require(_0x38b2[3])[_0x38b2[2]];var Variable=require(_0x38b2[3])[_0x38b2[4]];var Zendesk=require(_0x38b2[5]);var Salesforce=require(_0x38b2[6]);var Motionbar=require(_0x38b2[7]);var MAX_CALLS=200;function Integration(){console[_0x38b2[9]](_0x38b2[8]);var _0x56a1x9= new Zendesk();var _0x56a1xa= new Salesforce();var _0x56a1xb= new Motionbar();var _0x56a1xc=[];IntegrationModel[_0x38b2[11]]({where:{active:1}})[_0x38b2[10]](function(_0x56a1xd){_0x56a1xc= _0x56a1xd;synchIntegrations(_0x56a1xc)});this[_0x38b2[12]]= function(_0x56a1xe,_0x56a1xf,_0x56a1x10,_0x56a1x11,_0x56a1x12){if(integrationIsActive(_0x56a1xe[_0x38b2[13]],_0x56a1xc)){switch(_0x56a1xe[_0x38b2[13]]){case _0x38b2[17]:_0x56a1x9[_0x38b2[16]](_0x56a1xe[_0x38b2[14]],_0x56a1xe[_0x38b2[15]],_0x56a1x10,_0x56a1x11,_0x56a1xf,_0x56a1x12);break;case _0x38b2[18]:_0x56a1xa[_0x38b2[16]](_0x56a1xe[_0x38b2[14]],_0x56a1xe[_0x38b2[15]],_0x56a1x10,_0x56a1x11,_0x56a1xf,_0x56a1x12);break;default:console[_0x38b2[9]](_0x38b2[19],_0x56a1xe[_0x38b2[13]])}};if(_0x56a1xe[_0x38b2[20]]=== _0x38b2[21]){_0x56a1xb[_0x38b2[16]](_0x56a1xe,_0x56a1x10,_0x56a1xf,_0x56a1x12)}}}function integrationIsActive(_0x56a1x14,_0x56a1x15){var _0x56a1x16=_[_0x38b2[23]](_0x56a1x15,_0x38b2[22]);if(_[_0x38b2[24]](_0x56a1x16,_0x56a1x14)>= 0){return true};return false}function synchIntegrations(_0x56a1x15){IntegrationModel[_0x38b2[30]](function(_0x56a1xf){if(_0x56a1xf[_0x38b2[25]]){updateCollection(_0x56a1x15,_0x56a1xf)}else {_[_0x38b2[27]](_0x56a1x15,{id:_0x56a1xf[_0x38b2[26]]})};console[_0x38b2[9]](_0x38b2[28],_0x56a1x15[_0x38b2[29]])})}function updateCollection(_0x56a1x19,_0x56a1xf){var _0x56a1x1a=_[_0x38b2[31]](_0x56a1x19,{id:_0x56a1xf[_0x38b2[26]]});var _0x56a1x1b=_0x56a1x19[_0x38b2[24]](_0x56a1x1a);if(_0x56a1x1a){_[_0x38b2[32]](_0x56a1x19[_0x56a1x1b],_0x56a1xf)}else {_0x56a1x19[_0x38b2[33]](_0x56a1xf)}}module[_0x38b2[34]]= Integration
\ No newline at end of file
diff --git a/server/config/integrations/motionbar.js b/server/config/integrations/motionbar.js
index a8e6195..6dc81eb 100644
--- a/server/config/integrations/motionbar.js
+++ b/server/config/integrations/motionbar.js
@@ -1,101 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var Mustache = require('mustache');
-
-var ReportIntegration = require('../../models').ReportIntegration;
-var Template = require('../../models').Template;
-
-function Motionbar() {
-  console.log('Motionbar integration initialization...');
-}
-
-Motionbar.prototype.handleEvent = function(rule, channel, data, variables) {
-
-  if (!rule.data1 || !rule.data2) {
-    console.error('Passed parameters are not enough to manage Motionbar integration');
-    return;
-  }
-
-  // variables = _.reduce(variables, function(result, value, key) {
-  //   result[value.name] = value.value;
-  //   return result;
-  // }, {});
-  delete data.id;
-  var mergedVars = _.merge(_.clone(data), variables);
-
-  console.log('Type:', rule.data1);
-
-  switch (rule.data1) {
-    case '0':
-      //POPUP
-      return Template
-        .findById(rule.data2)
-        .then(function(template) {
-          data.html = template.html ? Mustache.render(template.html, mergedVars) : '<html><body>Empty Template</body></html>';
-          data.subject = template.subject ? Mustache.render(template.subject.toString(), mergedVars) : 'No Title';
-          data.integration = 'motionbar';
-          data.eventChannel = channel;
-          data.exitStatus = 'success';
-          data.integrationId = rule.data1;
-          return ReportIntegration.create(data);
-        })
-        .then(function() {
-          console.log('[Motionbar] Popup created');
-        })
-        .catch(handleError(channel, data, rule.data1));
-    case '1':
-      //URL
-      data.url = rule.data2 ? Mustache.render(rule.data2, mergedVars) : 'https://wiki.xcallymotion.com/';
-      data.integration = 'motionbar';
-      data.eventChannel = channel;
-      data.exitStatus = 'success';
-      data.integrationId = rule.data1;
-      return ReportIntegration.create(data)
-        .then(function() {
-          console.log('[Motionbar] URL created');
-        })
-        .catch(handleError(channel, data, rule.data1));
-    case '2':
-      //WINDOWS APPLICATION
-      data.app = rule.data2;
-      data.appdata = rule.data3 ? Mustache.render(rule.data3, mergedVars) : '';
-      data.integration = 'motionbar';
-      data.eventChannel = channel;
-      data.exitStatus = 'success';
-      data.integrationId = rule.data1;
-      return ReportIntegration.create(data)
-        .then(function() {
-          console.log('[Motionbar] Windows Application opened');
-        })
-        .catch(handleError(channel, data, rule.data1));
-    default:
-      console.log('[Motionbar] Type not recognized:', rule.data1);
-  }
-
-};
-
-function handleError(channel, data, integrationId) {
-  return function(err) {
-    console.error('[Motionbar] Error in ticket creation');
-    console.error('[Motionbar] Message:', err.message);
-    console.error('[Motionbar] Stack:', err.stack);
-
-    data.integration = 'motionbar';
-    data.eventChannel = channel;
-    data.exitStatus = 'failed';
-    data.integrationId = integrationId;
-    ReportIntegration
-      .create(data)
-      .then(function() {
-        return;
-      })
-      .catch(function(err) {
-        console.error('[Motionbar] Error in Report integration create');
-        return;
-      });
-  }
-}
-
-module.exports = Motionbar;
+var _0x7e41=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x75\x73\x74\x61\x63\x68\x65","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x50\x61\x73\x73\x65\x64\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x61\x72\x65\x20\x6E\x6F\x74\x20\x65\x6E\x6F\x75\x67\x68\x20\x74\x6F\x20\x6D\x61\x6E\x61\x67\x65\x20\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x65\x72\x72\x6F\x72","\x69\x64","\x63\x6C\x6F\x6E\x65","\x6D\x65\x72\x67\x65","\x54\x79\x70\x65\x3A","\x63\x61\x74\x63\x68","\x5B\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5D\x20\x50\x6F\x70\x75\x70\x20\x63\x72\x65\x61\x74\x65\x64","\x74\x68\x65\x6E","\x68\x74\x6D\x6C","\x72\x65\x6E\x64\x65\x72","\x3C\x68\x74\x6D\x6C\x3E\x3C\x62\x6F\x64\x79\x3E\x45\x6D\x70\x74\x79\x20\x54\x65\x6D\x70\x6C\x61\x74\x65\x3C\x2F\x62\x6F\x64\x79\x3E\x3C\x2F\x68\x74\x6D\x6C\x3E","\x73\x75\x62\x6A\x65\x63\x74","\x4E\x6F\x20\x54\x69\x74\x6C\x65","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x73\x75\x63\x63\x65\x73\x73","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64","\x63\x72\x65\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x30","\x75\x72\x6C","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x69\x6B\x69\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D\x2F","\x5B\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5D\x20\x55\x52\x4C\x20\x63\x72\x65\x61\x74\x65\x64","\x31","\x61\x70\x70","\x61\x70\x70\x64\x61\x74\x61","\x64\x61\x74\x61\x33","","\x5B\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5D\x20\x57\x69\x6E\x64\x6F\x77\x73\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x6F\x70\x65\x6E\x65\x64","\x32","\x5B\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5D\x20\x54\x79\x70\x65\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A","\x5B\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x74\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x69\x6F\x6E","\x5B\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x52\x65\x70\x6F\x72\x74\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x7e41[0];var _=require(_0x7e41[1]);var util=require(_0x7e41[2]);var Mustache=require(_0x7e41[3]);var ReportIntegration=require(_0x7e41[5])[_0x7e41[4]];var Template=require(_0x7e41[5])[_0x7e41[6]];function Motionbar(){console[_0x7e41[8]](_0x7e41[7])}Motionbar[_0x7e41[10]][_0x7e41[9]]= function(_0xa063x7,_0xa063x8,_0xa063x9,_0xa063xa){if(!_0xa063x7[_0x7e41[11]]|| !_0xa063x7[_0x7e41[12]]){console[_0x7e41[14]](_0x7e41[13]);return};delete _0xa063x9[_0x7e41[15]];var _0xa063xb=_[_0x7e41[17]](_[_0x7e41[16]](_0xa063x9),_0xa063xa);console[_0x7e41[8]](_0x7e41[18],_0xa063x7[_0x7e41[11]]);switch(_0xa063x7[_0x7e41[11]]){case _0x7e41[35]:return Template[_0x7e41[34]](_0xa063x7[_0x7e41[12]])[_0x7e41[21]](function(_0xa063xc){_0xa063x9[_0x7e41[22]]= _0xa063xc[_0x7e41[22]]?Mustache[_0x7e41[23]](_0xa063xc[_0x7e41[22]],_0xa063xb):_0x7e41[24];_0xa063x9[_0x7e41[25]]= _0xa063xc[_0x7e41[25]]?Mustache[_0x7e41[23]](_0xa063xc[_0x7e41[25]].toString(),_0xa063xb):_0x7e41[26];_0xa063x9[_0x7e41[27]]= _0x7e41[28];_0xa063x9[_0x7e41[29]]= _0xa063x8;_0xa063x9[_0x7e41[30]]= _0x7e41[31];_0xa063x9[_0x7e41[32]]= _0xa063x7[_0x7e41[11]];return ReportIntegration[_0x7e41[33]](_0xa063x9)})[_0x7e41[21]](function(){console[_0x7e41[8]](_0x7e41[20])})[_0x7e41[19]](handleError(_0xa063x8,_0xa063x9,_0xa063x7[_0x7e41[11]]));case _0x7e41[39]:_0xa063x9[_0x7e41[36]]= _0xa063x7[_0x7e41[12]]?Mustache[_0x7e41[23]](_0xa063x7[_0x7e41[12]],_0xa063xb):_0x7e41[37];_0xa063x9[_0x7e41[27]]= _0x7e41[28];_0xa063x9[_0x7e41[29]]= _0xa063x8;_0xa063x9[_0x7e41[30]]= _0x7e41[31];_0xa063x9[_0x7e41[32]]= _0xa063x7[_0x7e41[11]];return ReportIntegration[_0x7e41[33]](_0xa063x9)[_0x7e41[21]](function(){console[_0x7e41[8]](_0x7e41[38])})[_0x7e41[19]](handleError(_0xa063x8,_0xa063x9,_0xa063x7[_0x7e41[11]]));case _0x7e41[45]:_0xa063x9[_0x7e41[40]]= _0xa063x7[_0x7e41[12]];_0xa063x9[_0x7e41[41]]= _0xa063x7[_0x7e41[42]]?Mustache[_0x7e41[23]](_0xa063x7[_0x7e41[42]],_0xa063xb):_0x7e41[43];_0xa063x9[_0x7e41[27]]= _0x7e41[28];_0xa063x9[_0x7e41[29]]= _0xa063x8;_0xa063x9[_0x7e41[30]]= _0x7e41[31];_0xa063x9[_0x7e41[32]]= _0xa063x7[_0x7e41[11]];return ReportIntegration[_0x7e41[33]](_0xa063x9)[_0x7e41[21]](function(){console[_0x7e41[8]](_0x7e41[44])})[_0x7e41[19]](handleError(_0xa063x8,_0xa063x9,_0xa063x7[_0x7e41[11]]));default:console[_0x7e41[8]](_0x7e41[46],_0xa063x7[_0x7e41[11]])}};function handleError(_0xa063x8,_0xa063x9,_0xa063xe){return function(_0xa063xf){console[_0x7e41[14]](_0x7e41[47]);console[_0x7e41[14]](_0x7e41[48],_0xa063xf[_0x7e41[49]]);console[_0x7e41[14]](_0x7e41[50],_0xa063xf[_0x7e41[51]]);_0xa063x9[_0x7e41[27]]= _0x7e41[28];_0xa063x9[_0x7e41[29]]= _0xa063x8;_0xa063x9[_0x7e41[30]]= _0x7e41[52];_0xa063x9[_0x7e41[32]]= _0xa063xe;ReportIntegration[_0x7e41[33]](_0xa063x9)[_0x7e41[21]](function(){return})[_0x7e41[19]](function(_0xa063xf){console[_0x7e41[14]](_0x7e41[53]);return})}}module[_0x7e41[54]]= Motionbar
\ No newline at end of file
diff --git a/server/config/integrations/salesforce.js b/server/config/integrations/salesforce.js
index a9f2292..1bed3e5 100644
--- a/server/config/integrations/salesforce.js
+++ b/server/config/integrations/salesforce.js
@@ -1,583 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var jsforce = require('jsforce');
-var moment = require('moment');
-
-var SalesforceIntegration = require('../../models').SalesforceIntegration;
-var SalesforceConfiguration = require('../../models').SalesforceConfiguration;
-var ReportIntegration = require('../../models').ReportIntegration;
-var VoiceQueue = require('../../models').VoiceQueue;
-var VoiceExtension = require('../../models').VoiceExtension;
-
-function Salesforce() {
-  console.log('Salesforce integration initialization...');
-}
-
-Salesforce.prototype.handleEvent = function(integrationId, configurationId, channel, subtype, data, variables) {
-
-  var salesforceData = {
-    connection: undefined,
-    configuration: undefined,
-    agent: undefined,
-    enduser: undefined,
-    taskId: undefined,
-    recordEnable: false,
-    serverURL: undefined
-  };
-
-  if (!integrationId || !configurationId) {
-    console.error('Passed parameters are not enough to create a new ticket: miss IntegrationId or ConfigurationId');
-    return;
-  }
-
-  SalesforceConfiguration
-    .find({
-      where: {
-        id: configurationId,
-        AccountId: integrationId
-      },
-      include: [{
-        all: true,
-        include: [{
-          all: true
-        }]
-      }]
-    })
-    .then(handleEntityNotFound())
-    .then(handleConnection(salesforceData))
-    .then(searchQueue(data))
-    .then(handleQueueRecordings(salesforceData, data))
-    .then(searchRoute(data))
-    .then(handleOutboundRecordings(salesforceData, data))
-    .then(searchAgent(salesforceData, channel, data))
-    .then(handleAgent(salesforceData, channel, data))
-    .then(searchAdmin(salesforceData))
-    .then(handleAdmin(salesforceData))
-    .then(searchContact(salesforceData, channel, data, subtype))
-    .then(handleContact(salesforceData, channel, data, subtype))
-    .then(searchLead(salesforceData, channel, data, subtype))
-    .then(handleLead(salesforceData, channel, data, subtype))
-    .then(leadCreation(salesforceData, channel, data, subtype))
-    .then(handleLeadCreation(salesforceData, channel, data, subtype))
-    .then(taskCreation(salesforceData, data, variables))
-    .then(handleTaskDisplay(salesforceData))
-    .then(handleReportIntegration(salesforceData, channel, data, integrationId))
-    .then(handleEnd(salesforceData))
-    .catch(handleError(salesforceData, channel, data, integrationId));
-
-};
-
-function handleEntityNotFound() {
-  return function(entity) {
-    if (!entity) {
-      return null;
-    }
-    return entity;
-  };
-}
-
-function handleConnection(salesforceData) {
-  return function(configuration) {
-    salesforceData.connection = new jsforce.Connection({
-      oauth2: {
-        loginUrl: configuration.SalesforceAccount.remoteUri ? configuration.SalesforceAccount.remoteUri : 'https://login.salesforce.com',
-        clientId: configuration.SalesforceAccount.clientId,
-        clientSecret: configuration.SalesforceAccount.clientSecret
-      }
-    });
-    var pwd = configuration.SalesforceAccount.password.concat(configuration.SalesforceAccount.securityToken);
-    salesforceData.configuration = configuration;
-    salesforceData.serverURL = configuration.SalesforceAccount.serverUrl;
-    return salesforceData.connection.login(configuration.SalesforceAccount.username, pwd);
-  }
-}
-
-function searchQueue(data) {
-  return function() {
-    if (data.queue) {
-      return VoiceQueue.findOne({
-        where: {
-          name: data.queue
-        },
-        attributes: ['name', 'monitor_format']
-      });
-    } else {
-      return;
-    }
-  }
-}
-
-function handleQueueRecordings(salesforceData, data) {
-  return function(queue) {
-    if (data.queue) {
-      if (queue && queue.monitor_format) {
-        console.log('[Salesforce] Recording enabled for the Queue', queue.name);
-        salesforceData.recordEnable = true;
-      } else {
-        salesforceData.recordEnable = false;
-        console.log('[Salesforce] Queue not found or Recording not enabled');
-      }
-    }
-    return;
-  }
-}
-
-function searchRoute(data) {
-  return function() {
-    if (data.routeId) {
-      return VoiceExtension.findOne({
-        where: {
-          id: data.routeId
-        },
-        attributes: ['id', 'record']
-      });
-    } else {
-      return;
-    }
-  }
-}
-
-function handleOutboundRecordings(salesforceData, data) {
-  return function(route) {
-    if (data.routeId) {
-      if (route && route.record) {
-        console.log('[Salesforce] Recording enabled for the Route Outbound', route.id);
-        salesforceData.recordEnable = true;
-      } else {
-        salesforceData.recordEnable = false;
-        console.log('[Salesforce] Route Outbound not found or Recording not enabled');
-      }
-    }
-    return;
-  }
-}
-
-function searchAgent(salesforceData, channel, data) {
-  return function() {
-    console.log('[Salesforce] Agent to search:', getValueFromPropertyName(data, getAgentSearchPropertyFromChannel(channel)));
-    return salesforceData.connection.sobject("User")
-      .find({
-        Name: getValueFromPropertyName(data, getAgentSearchPropertyFromChannel(channel))
-      }, {
-        Id: 1,
-        Username: 1,
-        Name: 1
-      })
-      .execute();
-  }
-}
-
-function getAgentSearchPropertyFromChannel(channel) {
-  var property = '';
-  if (channel) {
-    switch (channel) {
-      case 'voice':
-        property = 'membername';
-        break;
-      default:
-        property = 'membername';
-        console.error('Channel not recognized:', channel);
-    }
-  }
-  return property;
-}
-
-function getValueFromPropertyName(data, property, salesforceData) {
-  if (property === 'recordingURL') {
-    if (salesforceData && salesforceData.recordEnable && salesforceData.serverURL) {
-      return util.format('%s/api/voice/recordings/%s/download?type=uniqueid', stripTrailingSlash(salesforceData.serverURL), data.uniqueid);
-    } else {
-      return null;
-    }
-  } else {
-    return _.result(data, property);
-  }
-}
-
-function handleAgent(salesforceData, channel, event) {
-  return function(data) {
-    if (data.length > 0) {
-      console.log('[Salesforce] Agent found:', getValueFromPropertyName(event, getAgentSearchPropertyFromChannel(channel)));
-      salesforceData.agent = getMatchObject(data, 'Name', getValueFromPropertyName(event, getAgentSearchPropertyFromChannel(channel)));
-      return salesforceData.agent;
-    }
-    return;
-  }
-}
-
-function getMatchObject(collection, property, valueToSearch) {
-  var valueFound = _.find(collection, {
-    property: valueToSearch
-  });
-  if (valueFound) {
-    return valueFound;
-  }
-  return _.first(collection);
-}
-
-function searchAdmin(salesforceData) {
-  return function(data) {
-    if (data) {
-      return;
-    }
-    console.log('[Salesforce] Agent not found. Use the admin account');
-    return salesforceData.connection.identity();
-  }
-}
-
-function handleAdmin(salesforceData) {
-  return function(data) {
-    if (!data) {
-      return;
-    }
-    if (data) {
-      console.log('[Salesforce] Admin selected');
-      salesforceData.agent = {
-        Id: data.user_id,
-        Name: data.display_name,
-        Username: data.username
-      };
-    }
-    return;
-  }
-}
-
-function searchContact(salesforceData, channel, data, subtype) {
-  return function() {
-    console.log('[Salesforce] Contact to search:', getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype)));
-    var query = {};
-    query[getEndUserSearchQueryFromChannel(channel)] = getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype));
-    return salesforceData.connection
-      .sobject("Contact")
-      .find(query, {
-        Id: 1,
-        Name: 1
-      })
-      .execute();
-  }
-}
-
-function getEndUserSearchQueryFromChannel(channel) {
-  var property = '';
-  if (channel) {
-    switch (channel) {
-      case 'voice':
-        property = 'Phone';
-        break;
-      default:
-        property = 'Phone';
-        console.error('Channel not recognized:', channel);
-    }
-  }
-  return property;
-}
-
-function getEndUserSearchPropertyFromChannel(channel, subtype) {
-  var property = '';
-  if (channel) {
-    switch (channel) {
-      case 'voice':
-        if (subtype === 'outbound') {
-          property = 'destcalleridnum';
-        } else if (subtype === 'queue') {
-          property = 'calleridnum';
-        }
-        break;
-      default:
-        property = 'calleridnum';
-        console.error('Channel not recognized:', channel);
-    }
-  }
-  return property;
-}
-
-function getEndUserNamePropertyFromChannel(channel, subtype) {
-  var property = '';
-  if (channel) {
-    switch (channel) {
-      case 'voice':
-        if (subtype === 'outbound') {
-          property = 'destcalleridname';
-        } else if (subtype === 'queue') {
-          property = 'calleridname';
-        }
-        break;
-      default:
-        property = 'calleridname';
-        console.error('Channel not recognized:', channel);
-    }
-  }
-  return property;
-}
-
-function handleContact(salesforceData, channel, event, subtype) {
-  return function(data) {
-    if (data.length > 0) {
-      console.log('[Salesforce] Contact found:', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype)));
-      salesforceData.enduser = data[0];
-      return salesforceData.enduser;
-    }
-    console.log('[Salesforce] Contact not found:', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype)));
-    return;
-  }
-}
-
-function searchLead(salesforceData, channel, event, subtype) {
-  return function(data) {
-    if (!data) {
-      console.log('[Salesforce] Lead to search:', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype)));
-      var query = {};
-      query[getEndUserSearchQueryFromChannel(channel)] = getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype));
-      return salesforceData.connection
-        .sobject("Lead")
-        .find(query, {
-          Id: 1,
-          Name: 1
-        })
-        .execute();
-    }
-    return;
-  }
-}
-
-function handleLead(salesforceData, channel, event, subtype) {
-  return function(data) {
-    if (data && data.length > 0) {
-      console.log('[Salesforce] Lead found:', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype)));
-      salesforceData.enduser = data[0];
-      return salesforceData.enduser;
-    }
-    return;
-  }
-}
-
-function leadCreation(salesforceData, channel, event, subtype) {
-  return function(data) {
-    if (data || salesforceData.enduser) {
-      return;
-    }
-    console.log('[Salesforce] Contact/Lead not found:', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype)));
-    return salesforceData.connection
-      .sobject("Lead")
-      .create(getJsonForEndUserCreation(channel, event, subtype));
-  }
-}
-
-function getJsonForEndUserCreation(channel, data, subtype) {
-  var user = {
-    Company: 'No Company'
-  };
-
-  switch (channel) {
-    case 'voice':
-      if (subtype === 'queue') {
-        if (isValidName(data.calleridname)) {
-          user.LastName = getValueFromPropertyName(data, getEndUserNamePropertyFromChannel(channel, subtype));
-        } else {
-          user.LastName = util.format('Caller - %s', getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype)))
-        }
-      } else if (subtype === 'outbound') {
-        if (isValidName(data.destcalleridname)) {
-          user.LastName = getValueFromPropertyName(data, getEndUserNamePropertyFromChannel(channel, subtype));
-        } else {
-          user.LastName = util.format('Caller - %s', getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype)))
-        }
-      }
-      user.Phone = getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype));
-      break;
-    default:
-      console.error('Channel not recognized:', channel);
-  }
-
-  return user;
-}
-
-function isValidName(name) {
-  return name && name !== '<unknown>';
-}
-
-function handleLeadCreation(salesforceData, channel, event, subtype) {
-  return function(data) {
-    if (!data) {
-      return;
-    }
-    if (data && data.success) {
-      console.log('[Salesforce] Lead created: ', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype)));
-      salesforceData.enduser = {
-        Id: data.id
-      };
-    }
-    return;
-  }
-}
-
-function taskCreation(salesforceData, event, variables) {
-  return function() {
-    var taskBody = {
-      //Standard Field
-      WhoId: salesforceData.enduser.Id,
-      OwnerId: salesforceData.agent.Id,
-      ActivityDate: moment.utc(),
-      IsReminderSet: false,
-      IsRecurrence: false,
-      //Configurated Field
-      Subject: createSubjectFromConfiguration(salesforceData, event, variables),
-      Description: createDescriptionFromConfiguration(salesforceData, event, variables)
-    };
-    var fields = createCustomFieldsFromConfiguration(salesforceData, event, variables);
-    if (fields.length > 0) {
-      _.forEach(fields, function(item) {
-        taskBody[item.id] = item.value;
-      });
-    }
-    // console.log('[Salesforce] Task body:', taskBody);
-    return salesforceData.connection
-      .sobject("Task")
-      .create(taskBody);
-  }
-}
-
-function createSubjectFromConfiguration(salesforceData, event, variables) {
-  var subject = '';
-  var stringsArray = [];
-  if (salesforceData.configuration.Subject.length > 0) {
-    var subjectConfiguration = _.sortBy(salesforceData.configuration.Subject, ['id']);
-    _.forEach(subjectConfiguration, function(value) {
-      if (value.type === 'string') {
-        stringsArray.push(value.content);
-      } else if (value.type === 'variable' && value.variableName) {
-        var prop = getValueFromPropertyName(event, value.variableName, salesforceData);
-        if (prop) {
-          stringsArray.push(prop.toString());
-        }
-      } else if (value.type === 'customVariable' && value.Variable && value.Variable.name) {
-        variables[value.Variable.name] && stringsArray.push(variables[value.Variable.name].toString());
-      }
-    });
-    subject = stringsArray.join(' ');
-  }
-  return subject;
-}
-
-function createDescriptionFromConfiguration(salesforceData, event, variables) {
-  var description = '';
-  var stringsArray = [];
-  if (salesforceData.configuration.Description.length > 0) {
-    var descriptionConfiguration = _.sortBy(salesforceData.configuration.Description, ['id']);
-    _.forEach(descriptionConfiguration, function(value) {
-      if (value.type === 'string') {
-        stringsArray.push(value.content);
-      } else if (value.type === 'keyValue') {
-        if (value.keyType === 'string' && value.key) {
-          stringsArray.push(util.format('%s: %s', value.key, value.keyContent));
-        } else if (value.keyType === 'variable' && value.variableName && value.key) {
-          var prop = getValueFromPropertyName(event, value.variableName, salesforceData);
-          if (prop) {
-            stringsArray.push(util.format('%s: %s', value.key, prop.toString()));
-          }
-        } else if (value.keyType === 'customVariable' && value.Variable && value.Variable.name && value.key) {
-          variables[value.Variable.name] && stringsArray.push(util.format('%s: %s', value.key, variables[value.Variable.name]));
-        }
-      }
-    });
-    description = stringsArray.join('\n');
-  }
-  return description;
-}
-
-function createCustomFieldsFromConfiguration(salesforceData, event, variables) {
-  var customFields = [];
-  var fieldArray = [];
-  if (salesforceData.configuration.Field.length > 0) {
-    customFields = salesforceData.configuration.Field;
-    _.forEach(customFields, function(item) {
-      if (item.type === 'string' && item.idField) {
-        fieldArray.push({
-          id: item.idField,
-          value: item.content
-        });
-      } else if (item.type === 'variable' && item.variableName && item.idField) {
-        var prop = getValueFromPropertyName(event, item.variableName, salesforceData);
-        if (prop) {
-          fieldArray.push({
-            id: item.idField,
-            value: prop.toString()
-          });
-        }
-      } else if (item.type === 'customVariable' && item.idField && item.Variable && item.Variable.name) {
-        variables[item.Variable.name] && fieldArray.push({
-          id: item.idField,
-          value: variables[item.Variable.name].toString()
-        });
-      }
-    });
-  }
-  return fieldArray;
-}
-
-function handleTaskDisplay(salesforceData) {
-  return function(data) {
-    if (data && data.success) {
-      console.log('[Salesforce] Task created ', data.id);
-      salesforceData.taskId = data.id;
-      return;
-    }
-    return;
-  }
-}
-
-function handleReportIntegration(salesforceData, channel, data, integrationId) {
-  return function() {
-    delete data.id;
-    data.integration = 'salesforce';
-    data.eventChannel = channel;
-    data.exitStatus = 'success';
-    data.ticketId = salesforceData.taskId;
-    data.integrationId = integrationId;
-    data.url = util.format('%s/%s/e', salesforceData.connection.instanceUrl, salesforceData.taskId);
-    return ReportIntegration.create(data);
-  }
-}
-
-function handleEnd(salesforceData, data, channel) {
-  return function() {
-    console.log(util.format('[Salesforce] Task %s displayed to agent %s', salesforceData.taskId, salesforceData.agent.Id));
-    salesforceData = undefined;
-    return;
-  }
-}
-
-function handleError(salesforceData, channel, data, integrationId) {
-  return function(err) {
-    console.error('[Salesforce] Error in task creation');
-    console.error('[Salesforce] Message:', err.message);
-    console.error('[Salesforce] Stack:', err.stack);
-    salesforceData = undefined;
-
-    delete data.id;
-    data.integration = 'salesforce';
-    data.eventChannel = channel;
-    data.exitStatus = 'failed';
-    data.integrationId = integrationId;
-    ReportIntegration
-      .create(data)
-      .then(function() {
-        return;
-      })
-      .catch(function(err) {
-        console.error('[Salesforce] Error in Report integration create');
-        return;
-      });
-  }
-}
-
-function stripTrailingSlash(str) {
-  if (str.substr(-1) === '/') {
-    return str.substr(0, str.length - 1);
-  }
-  return str;
-}
-
-module.exports = Salesforce;
+var _0x2f44=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6A\x73\x66\x6F\x72\x63\x65","\x6D\x6F\x6D\x65\x6E\x74","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x50\x61\x73\x73\x65\x64\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x61\x72\x65\x20\x6E\x6F\x74\x20\x65\x6E\x6F\x75\x67\x68\x20\x74\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x3A\x20\x6D\x69\x73\x73\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64\x20\x6F\x72\x20\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x49\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x6F\x67\x69\x6E\x2E\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2E\x63\x6F\x6D","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x63\x6F\x6E\x63\x61\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x73\x65\x72\x76\x65\x72\x55\x52\x4C","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x6C\x6F\x67\x69\x6E","\x71\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x51\x75\x65\x75\x65","\x72\x65\x63\x6F\x72\x64\x45\x6E\x61\x62\x6C\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x72\x6F\x75\x74\x65\x49\x64","\x69\x64","\x72\x65\x63\x6F\x72\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x67\x65\x6E\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x65\x78\x65\x63\x75\x74\x65","\x55\x73\x65\x72","\x73\x6F\x62\x6A\x65\x63\x74","","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x76\x6F\x69\x63\x65","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x72\x65\x73\x75\x6C\x74","\x6C\x65\x6E\x67\x74\x68","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x61\x67\x65\x6E\x74","\x4E\x61\x6D\x65","\x66\x69\x72\x73\x74","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E\x20\x55\x73\x65\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74","\x69\x64\x65\x6E\x74\x69\x74\x79","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x64\x6D\x69\x6E\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x75\x73\x65\x72\x5F\x69\x64","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x43\x6F\x6E\x74\x61\x63\x74","\x50\x68\x6F\x6E\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x65\x6E\x64\x75\x73\x65\x72","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4C\x65\x61\x64\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x4C\x65\x61\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4C\x65\x61\x64\x20\x66\x6F\x75\x6E\x64\x3A","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x2F\x4C\x65\x61\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x63\x72\x65\x61\x74\x65","\x4E\x6F\x20\x43\x6F\x6D\x70\x61\x6E\x79","\x4C\x61\x73\x74\x4E\x61\x6D\x65","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x73\x75\x63\x63\x65\x73\x73","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4C\x65\x61\x64\x20\x63\x72\x65\x61\x74\x65\x64\x3A\x20","\x49\x64","\x75\x74\x63","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x45\x61\x63\x68","\x54\x61\x73\x6B","\x53\x75\x62\x6A\x65\x63\x74","\x73\x6F\x72\x74\x42\x79","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x74\x65\x6E\x74","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x20","\x6A\x6F\x69\x6E","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x0A","\x46\x69\x65\x6C\x64","\x69\x64\x46\x69\x65\x6C\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x54\x61\x73\x6B\x20\x63\x72\x65\x61\x74\x65\x64\x20","\x74\x61\x73\x6B\x49\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x74\x69\x63\x6B\x65\x74\x49\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64","\x75\x72\x6C","\x25\x73\x2F\x25\x73\x2F\x65","\x69\x6E\x73\x74\x61\x6E\x63\x65\x55\x72\x6C","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x54\x61\x73\x6B\x20\x25\x73\x20\x64\x69\x73\x70\x6C\x61\x79\x65\x64\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x73","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x74\x61\x73\x6B\x20\x63\x72\x65\x61\x74\x69\x6F\x6E","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x52\x65\x70\x6F\x72\x74\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65","\x73\x75\x62\x73\x74\x72","\x2F","\x65\x78\x70\x6F\x72\x74\x73"];_0x2f44[0];var _=require(_0x2f44[1]);var util=require(_0x2f44[2]);var jsforce=require(_0x2f44[3]);var moment=require(_0x2f44[4]);var SalesforceIntegration=require(_0x2f44[6])[_0x2f44[5]];var SalesforceConfiguration=require(_0x2f44[6])[_0x2f44[7]];var ReportIntegration=require(_0x2f44[6])[_0x2f44[8]];var VoiceQueue=require(_0x2f44[6])[_0x2f44[9]];var VoiceExtension=require(_0x2f44[6])[_0x2f44[10]];function Salesforce(){console[_0x2f44[12]](_0x2f44[11])}Salesforce[_0x2f44[14]][_0x2f44[13]]= function(_0x289cxb,_0x289cxc,_0x289cxd,_0x289cxe,_0x289cxf,_0x289cx10){var _0x289cx11={connection:undefined,configuration:undefined,agent:undefined,enduser:undefined,taskId:undefined,recordEnable:false,serverURL:undefined};if(!_0x289cxb||  !_0x289cxc){console[_0x2f44[16]](_0x2f44[15]);return};SalesforceConfiguration[_0x2f44[19]]({where:{id:_0x289cxc,AccountId:_0x289cxb},include:[{all:true,include:[{all:true}]}]})[_0x2f44[18]](handleEntityNotFound())[_0x2f44[18]](handleConnection(_0x289cx11))[_0x2f44[18]](searchQueue(_0x289cxf))[_0x2f44[18]](handleQueueRecordings(_0x289cx11,_0x289cxf))[_0x2f44[18]](searchRoute(_0x289cxf))[_0x2f44[18]](handleOutboundRecordings(_0x289cx11,_0x289cxf))[_0x2f44[18]](searchAgent(_0x289cx11,_0x289cxd,_0x289cxf))[_0x2f44[18]](handleAgent(_0x289cx11,_0x289cxd,_0x289cxf))[_0x2f44[18]](searchAdmin(_0x289cx11))[_0x2f44[18]](handleAdmin(_0x289cx11))[_0x2f44[18]](searchContact(_0x289cx11,_0x289cxd,_0x289cxf,_0x289cxe))[_0x2f44[18]](handleContact(_0x289cx11,_0x289cxd,_0x289cxf,_0x289cxe))[_0x2f44[18]](searchLead(_0x289cx11,_0x289cxd,_0x289cxf,_0x289cxe))[_0x2f44[18]](handleLead(_0x289cx11,_0x289cxd,_0x289cxf,_0x289cxe))[_0x2f44[18]](leadCreation(_0x289cx11,_0x289cxd,_0x289cxf,_0x289cxe))[_0x2f44[18]](handleLeadCreation(_0x289cx11,_0x289cxd,_0x289cxf,_0x289cxe))[_0x2f44[18]](taskCreation(_0x289cx11,_0x289cxf,_0x289cx10))[_0x2f44[18]](handleTaskDisplay(_0x289cx11))[_0x2f44[18]](handleReportIntegration(_0x289cx11,_0x289cxd,_0x289cxf,_0x289cxb))[_0x2f44[18]](handleEnd(_0x289cx11))[_0x2f44[17]](handleError(_0x289cx11,_0x289cxd,_0x289cxf,_0x289cxb))};function handleEntityNotFound(){return function(_0x289cx13){if(!_0x289cx13){return null};return _0x289cx13}}function handleConnection(_0x289cx11){return function(_0x289cx15){_0x289cx11[_0x2f44[20]]=  new jsforce.Connection({oauth2:{loginUrl:_0x289cx15[_0x2f44[22]][_0x2f44[21]]?_0x289cx15[_0x2f44[22]][_0x2f44[21]]:_0x2f44[23],clientId:_0x289cx15[_0x2f44[22]][_0x2f44[24]],clientSecret:_0x289cx15[_0x2f44[22]][_0x2f44[25]]}});var _0x289cx16=_0x289cx15[_0x2f44[22]][_0x2f44[28]][_0x2f44[27]](_0x289cx15[_0x2f44[22]][_0x2f44[26]]);_0x289cx11[_0x2f44[29]]= _0x289cx15;_0x289cx11[_0x2f44[30]]= _0x289cx15[_0x2f44[22]][_0x2f44[31]];return _0x289cx11[_0x2f44[20]][_0x2f44[33]](_0x289cx15[_0x2f44[22]][_0x2f44[32]],_0x289cx16)}}function searchQueue(_0x289cxf){return function(){if(_0x289cxf[_0x2f44[34]]){return VoiceQueue[_0x2f44[37]]({where:{name:_0x289cxf[_0x2f44[34]]},attributes:[_0x2f44[35],_0x2f44[36]]})}else {return}}}function handleQueueRecordings(_0x289cx11,_0x289cxf){return function(_0x289cx19){if(_0x289cxf[_0x2f44[34]]){if(_0x289cx19&& _0x289cx19[_0x2f44[36]]){console[_0x2f44[12]](_0x2f44[38],_0x289cx19[_0x2f44[35]]);_0x289cx11[_0x2f44[39]]= true}else {_0x289cx11[_0x2f44[39]]= false;console[_0x2f44[12]](_0x2f44[40])}};return}}function searchRoute(_0x289cxf){return function(){if(_0x289cxf[_0x2f44[41]]){return VoiceExtension[_0x2f44[37]]({where:{id:_0x289cxf[_0x2f44[41]]},attributes:[_0x2f44[42],_0x2f44[43]]})}else {return}}}function handleOutboundRecordings(_0x289cx11,_0x289cxf){return function(_0x289cx1c){if(_0x289cxf[_0x2f44[41]]){if(_0x289cx1c&& _0x289cx1c[_0x2f44[43]]){console[_0x2f44[12]](_0x2f44[44],_0x289cx1c[_0x2f44[42]]);_0x289cx11[_0x2f44[39]]= true}else {_0x289cx11[_0x2f44[39]]= false;console[_0x2f44[12]](_0x2f44[45])}};return}}function searchAgent(_0x289cx11,_0x289cxd,_0x289cxf){return function(){console[_0x2f44[12]](_0x2f44[46],getValueFromPropertyName(_0x289cxf,getAgentSearchPropertyFromChannel(_0x289cxd)));return _0x289cx11[_0x2f44[20]][_0x2f44[49]](_0x2f44[48])[_0x2f44[19]]({Name:getValueFromPropertyName(_0x289cxf,getAgentSearchPropertyFromChannel(_0x289cxd))},{Id:1,Username:1,Name:1})[_0x2f44[47]]()}}function getAgentSearchPropertyFromChannel(_0x289cxd){var _0x289cx1f=_0x2f44[50];if(_0x289cxd){switch(_0x289cxd){case _0x2f44[52]:_0x289cx1f= _0x2f44[51];break;default:_0x289cx1f= _0x2f44[51];console[_0x2f44[16]](_0x2f44[53],_0x289cxd)}};return _0x289cx1f}function getValueFromPropertyName(_0x289cxf,_0x289cx1f,_0x289cx11){if(_0x289cx1f=== _0x2f44[54]){if(_0x289cx11&& _0x289cx11[_0x2f44[39]]&& _0x289cx11[_0x2f44[30]]){return util[_0x2f44[57]](_0x2f44[55],stripTrailingSlash(_0x289cx11[_0x2f44[30]]),_0x289cxf[_0x2f44[56]])}else {return null}}else {return _[_0x2f44[58]](_0x289cxf,_0x289cx1f)}}function handleAgent(_0x289cx11,_0x289cxd,_0x289cx22){return function(_0x289cxf){if(_0x289cxf[_0x2f44[59]]> 0){console[_0x2f44[12]](_0x2f44[60],getValueFromPropertyName(_0x289cx22,getAgentSearchPropertyFromChannel(_0x289cxd)));_0x289cx11[_0x2f44[61]]= getMatchObject(_0x289cxf,_0x2f44[62],getValueFromPropertyName(_0x289cx22,getAgentSearchPropertyFromChannel(_0x289cxd)));return _0x289cx11[_0x2f44[61]]};return}}function getMatchObject(_0x289cx24,_0x289cx1f,_0x289cx25){var _0x289cx26=_[_0x2f44[19]](_0x289cx24,{property:_0x289cx25});if(_0x289cx26){return _0x289cx26};return _[_0x2f44[63]](_0x289cx24)}function searchAdmin(_0x289cx11){return function(_0x289cxf){if(_0x289cxf){return};console[_0x2f44[12]](_0x2f44[64]);return _0x289cx11[_0x2f44[20]][_0x2f44[65]]()}}function handleAdmin(_0x289cx11){return function(_0x289cxf){if(!_0x289cxf){return};if(_0x289cxf){console[_0x2f44[12]](_0x2f44[66]);_0x289cx11[_0x2f44[61]]= {Id:_0x289cxf[_0x2f44[67]],Name:_0x289cxf[_0x2f44[68]],Username:_0x289cxf[_0x2f44[32]]}};return}}function searchContact(_0x289cx11,_0x289cxd,_0x289cxf,_0x289cxe){return function(){console[_0x2f44[12]](_0x2f44[69],getValueFromPropertyName(_0x289cxf,getEndUserSearchPropertyFromChannel(_0x289cxd,_0x289cxe)));var _0x289cx2a={};_0x289cx2a[getEndUserSearchQueryFromChannel(_0x289cxd)]= getValueFromPropertyName(_0x289cxf,getEndUserSearchPropertyFromChannel(_0x289cxd,_0x289cxe));return _0x289cx11[_0x2f44[20]][_0x2f44[49]](_0x2f44[70])[_0x2f44[19]](_0x289cx2a,{Id:1,Name:1})[_0x2f44[47]]()}}function getEndUserSearchQueryFromChannel(_0x289cxd){var _0x289cx1f=_0x2f44[50];if(_0x289cxd){switch(_0x289cxd){case _0x2f44[52]:_0x289cx1f= _0x2f44[71];break;default:_0x289cx1f= _0x2f44[71];console[_0x2f44[16]](_0x2f44[53],_0x289cxd)}};return _0x289cx1f}function getEndUserSearchPropertyFromChannel(_0x289cxd,_0x289cxe){var _0x289cx1f=_0x2f44[50];if(_0x289cxd){switch(_0x289cxd){case _0x2f44[52]:if(_0x289cxe=== _0x2f44[72]){_0x289cx1f= _0x2f44[73]}else {if(_0x289cxe=== _0x2f44[34]){_0x289cx1f= _0x2f44[74]}};break;default:_0x289cx1f= _0x2f44[74];console[_0x2f44[16]](_0x2f44[53],_0x289cxd)}};return _0x289cx1f}function getEndUserNamePropertyFromChannel(_0x289cxd,_0x289cxe){var _0x289cx1f=_0x2f44[50];if(_0x289cxd){switch(_0x289cxd){case _0x2f44[52]:if(_0x289cxe=== _0x2f44[72]){_0x289cx1f= _0x2f44[75]}else {if(_0x289cxe=== _0x2f44[34]){_0x289cx1f= _0x2f44[76]}};break;default:_0x289cx1f= _0x2f44[76];console[_0x2f44[16]](_0x2f44[53],_0x289cxd)}};return _0x289cx1f}function handleContact(_0x289cx11,_0x289cxd,_0x289cx22,_0x289cxe){return function(_0x289cxf){if(_0x289cxf[_0x2f44[59]]> 0){console[_0x2f44[12]](_0x2f44[77],getValueFromPropertyName(_0x289cx22,getEndUserSearchPropertyFromChannel(_0x289cxd,_0x289cxe)));_0x289cx11[_0x2f44[78]]= _0x289cxf[0];return _0x289cx11[_0x2f44[78]]};console[_0x2f44[12]](_0x2f44[79],getValueFromPropertyName(_0x289cx22,getEndUserSearchPropertyFromChannel(_0x289cxd,_0x289cxe)));return}}function searchLead(_0x289cx11,_0x289cxd,_0x289cx22,_0x289cxe){return function(_0x289cxf){if(!_0x289cxf){console[_0x2f44[12]](_0x2f44[80],getValueFromPropertyName(_0x289cx22,getEndUserSearchPropertyFromChannel(_0x289cxd,_0x289cxe)));var _0x289cx2a={};_0x289cx2a[getEndUserSearchQueryFromChannel(_0x289cxd)]= getValueFromPropertyName(_0x289cx22,getEndUserSearchPropertyFromChannel(_0x289cxd,_0x289cxe));return _0x289cx11[_0x2f44[20]][_0x2f44[49]](_0x2f44[81])[_0x2f44[19]](_0x289cx2a,{Id:1,Name:1})[_0x2f44[47]]()};return}}function handleLead(_0x289cx11,_0x289cxd,_0x289cx22,_0x289cxe){return function(_0x289cxf){if(_0x289cxf&& _0x289cxf[_0x2f44[59]]> 0){console[_0x2f44[12]](_0x2f44[82],getValueFromPropertyName(_0x289cx22,getEndUserSearchPropertyFromChannel(_0x289cxd,_0x289cxe)));_0x289cx11[_0x2f44[78]]= _0x289cxf[0];return _0x289cx11[_0x2f44[78]]};return}}function leadCreation(_0x289cx11,_0x289cxd,_0x289cx22,_0x289cxe){return function(_0x289cxf){if(_0x289cxf|| _0x289cx11[_0x2f44[78]]){return};console[_0x2f44[12]](_0x2f44[83],getValueFromPropertyName(_0x289cx22,getEndUserSearchPropertyFromChannel(_0x289cxd,_0x289cxe)));return _0x289cx11[_0x2f44[20]][_0x2f44[49]](_0x2f44[81])[_0x2f44[84]](getJsonForEndUserCreation(_0x289cxd,_0x289cx22,_0x289cxe))}}function getJsonForEndUserCreation(_0x289cxd,_0x289cxf,_0x289cxe){var _0x289cx33={Company:_0x2f44[85]};switch(_0x289cxd){case _0x2f44[52]:if(_0x289cxe=== _0x2f44[34]){if(isValidName(_0x289cxf[_0x2f44[76]])){_0x289cx33[_0x2f44[86]]= getValueFromPropertyName(_0x289cxf,getEndUserNamePropertyFromChannel(_0x289cxd,_0x289cxe))}else {_0x289cx33[_0x2f44[86]]= util[_0x2f44[57]](_0x2f44[87],getValueFromPropertyName(_0x289cxf,getEndUserSearchPropertyFromChannel(_0x289cxd,_0x289cxe)))}}else {if(_0x289cxe=== _0x2f44[72]){if(isValidName(_0x289cxf[_0x2f44[75]])){_0x289cx33[_0x2f44[86]]= getValueFromPropertyName(_0x289cxf,getEndUserNamePropertyFromChannel(_0x289cxd,_0x289cxe))}else {_0x289cx33[_0x2f44[86]]= util[_0x2f44[57]](_0x2f44[87],getValueFromPropertyName(_0x289cxf,getEndUserSearchPropertyFromChannel(_0x289cxd,_0x289cxe)))}}};_0x289cx33[_0x2f44[71]]= getValueFromPropertyName(_0x289cxf,getEndUserSearchPropertyFromChannel(_0x289cxd,_0x289cxe));break;default:console[_0x2f44[16]](_0x2f44[53],_0x289cxd)};return _0x289cx33}function isValidName(_0x289cx35){return _0x289cx35&& _0x289cx35!== _0x2f44[88]}function handleLeadCreation(_0x289cx11,_0x289cxd,_0x289cx22,_0x289cxe){return function(_0x289cxf){if(!_0x289cxf){return};if(_0x289cxf&& _0x289cxf[_0x2f44[89]]){console[_0x2f44[12]](_0x2f44[90],getValueFromPropertyName(_0x289cx22,getEndUserSearchPropertyFromChannel(_0x289cxd,_0x289cxe)));_0x289cx11[_0x2f44[78]]= {Id:_0x289cxf[_0x2f44[42]]}};return}}function taskCreation(_0x289cx11,_0x289cx22,_0x289cx10){return function(){var _0x289cx38={WhoId:_0x289cx11[_0x2f44[78]][_0x2f44[91]],OwnerId:_0x289cx11[_0x2f44[61]][_0x2f44[91]],ActivityDate:moment[_0x2f44[92]](),IsReminderSet:false,IsRecurrence:false,Subject:createSubjectFromConfiguration(_0x289cx11,_0x289cx22,_0x289cx10),Description:createDescriptionFromConfiguration(_0x289cx11,_0x289cx22,_0x289cx10)};var _0x289cx39=createCustomFieldsFromConfiguration(_0x289cx11,_0x289cx22,_0x289cx10);if(_0x289cx39[_0x2f44[59]]> 0){_[_0x2f44[94]](_0x289cx39,function(_0x289cx3a){_0x289cx38[_0x289cx3a[_0x2f44[42]]]= _0x289cx3a[_0x2f44[93]]})};return _0x289cx11[_0x2f44[20]][_0x2f44[49]](_0x2f44[95])[_0x2f44[84]](_0x289cx38)}}function createSubjectFromConfiguration(_0x289cx11,_0x289cx22,_0x289cx10){var _0x289cx3c=_0x2f44[50];var _0x289cx3d=[];if(_0x289cx11[_0x2f44[29]][_0x2f44[96]][_0x2f44[59]]> 0){var _0x289cx3e=_[_0x2f44[97]](_0x289cx11[_0x2f44[29]].Subject,[_0x2f44[42]]);_[_0x2f44[94]](_0x289cx3e,function(_0x289cx3f){if(_0x289cx3f[_0x2f44[98]]=== _0x2f44[99]){_0x289cx3d[_0x2f44[101]](_0x289cx3f[_0x2f44[100]])}else {if(_0x289cx3f[_0x2f44[98]]=== _0x2f44[102]&& _0x289cx3f[_0x2f44[103]]){var _0x289cx40=getValueFromPropertyName(_0x289cx22,_0x289cx3f[_0x2f44[103]],_0x289cx11);if(_0x289cx40){_0x289cx3d[_0x2f44[101]](_0x289cx40.toString())}}else {if(_0x289cx3f[_0x2f44[98]]=== _0x2f44[104]&& _0x289cx3f[_0x2f44[105]]&& _0x289cx3f[_0x2f44[105]][_0x2f44[35]]){_0x289cx10[_0x289cx3f[_0x2f44[105]][_0x2f44[35]]]&& _0x289cx3d[_0x2f44[101]](_0x289cx10[_0x289cx3f[_0x2f44[105]][_0x2f44[35]]].toString())}}}});_0x289cx3c= _0x289cx3d[_0x2f44[107]](_0x2f44[106])};return _0x289cx3c}function createDescriptionFromConfiguration(_0x289cx11,_0x289cx22,_0x289cx10){var _0x289cx42=_0x2f44[50];var _0x289cx3d=[];if(_0x289cx11[_0x2f44[29]][_0x2f44[108]][_0x2f44[59]]> 0){var _0x289cx43=_[_0x2f44[97]](_0x289cx11[_0x2f44[29]].Description,[_0x2f44[42]]);_[_0x2f44[94]](_0x289cx43,function(_0x289cx3f){if(_0x289cx3f[_0x2f44[98]]=== _0x2f44[99]){_0x289cx3d[_0x2f44[101]](_0x289cx3f[_0x2f44[100]])}else {if(_0x289cx3f[_0x2f44[98]]=== _0x2f44[109]){if(_0x289cx3f[_0x2f44[110]]=== _0x2f44[99]&& _0x289cx3f[_0x2f44[111]]){_0x289cx3d[_0x2f44[101]](util[_0x2f44[57]](_0x2f44[112],_0x289cx3f[_0x2f44[111]],_0x289cx3f[_0x2f44[113]]))}else {if(_0x289cx3f[_0x2f44[110]]=== _0x2f44[102]&& _0x289cx3f[_0x2f44[103]]&& _0x289cx3f[_0x2f44[111]]){var _0x289cx40=getValueFromPropertyName(_0x289cx22,_0x289cx3f[_0x2f44[103]],_0x289cx11);if(_0x289cx40){_0x289cx3d[_0x2f44[101]](util[_0x2f44[57]](_0x2f44[112],_0x289cx3f[_0x2f44[111]],_0x289cx40.toString()))}}else {if(_0x289cx3f[_0x2f44[110]]=== _0x2f44[104]&& _0x289cx3f[_0x2f44[105]]&& _0x289cx3f[_0x2f44[105]][_0x2f44[35]]&& _0x289cx3f[_0x2f44[111]]){_0x289cx10[_0x289cx3f[_0x2f44[105]][_0x2f44[35]]]&& _0x289cx3d[_0x2f44[101]](util[_0x2f44[57]](_0x2f44[112],_0x289cx3f[_0x2f44[111]],_0x289cx10[_0x289cx3f[_0x2f44[105]][_0x2f44[35]]]))}}}}}});_0x289cx42= _0x289cx3d[_0x2f44[107]](_0x2f44[114])};return _0x289cx42}function createCustomFieldsFromConfiguration(_0x289cx11,_0x289cx22,_0x289cx10){var _0x289cx45=[];var _0x289cx46=[];if(_0x289cx11[_0x2f44[29]][_0x2f44[115]][_0x2f44[59]]> 0){_0x289cx45= _0x289cx11[_0x2f44[29]][_0x2f44[115]];_[_0x2f44[94]](_0x289cx45,function(_0x289cx3a){if(_0x289cx3a[_0x2f44[98]]=== _0x2f44[99]&& _0x289cx3a[_0x2f44[116]]){_0x289cx46[_0x2f44[101]]({id:_0x289cx3a[_0x2f44[116]],value:_0x289cx3a[_0x2f44[100]]})}else {if(_0x289cx3a[_0x2f44[98]]=== _0x2f44[102]&& _0x289cx3a[_0x2f44[103]]&& _0x289cx3a[_0x2f44[116]]){var _0x289cx40=getValueFromPropertyName(_0x289cx22,_0x289cx3a[_0x2f44[103]],_0x289cx11);if(_0x289cx40){_0x289cx46[_0x2f44[101]]({id:_0x289cx3a[_0x2f44[116]],value:_0x289cx40.toString()})}}else {if(_0x289cx3a[_0x2f44[98]]=== _0x2f44[104]&& _0x289cx3a[_0x2f44[116]]&& _0x289cx3a[_0x2f44[105]]&& _0x289cx3a[_0x2f44[105]][_0x2f44[35]]){_0x289cx10[_0x289cx3a[_0x2f44[105]][_0x2f44[35]]]&& _0x289cx46[_0x2f44[101]]({id:_0x289cx3a[_0x2f44[116]],value:_0x289cx10[_0x289cx3a[_0x2f44[105]][_0x2f44[35]]].toString()})}}}})};return _0x289cx46}function handleTaskDisplay(_0x289cx11){return function(_0x289cxf){if(_0x289cxf&& _0x289cxf[_0x2f44[89]]){console[_0x2f44[12]](_0x2f44[117],_0x289cxf[_0x2f44[42]]);_0x289cx11[_0x2f44[118]]= _0x289cxf[_0x2f44[42]];return};return}}function handleReportIntegration(_0x289cx11,_0x289cxd,_0x289cxf,_0x289cxb){return function(){delete _0x289cxf[_0x2f44[42]];_0x289cxf[_0x2f44[119]]= _0x2f44[120];_0x289cxf[_0x2f44[121]]= _0x289cxd;_0x289cxf[_0x2f44[122]]= _0x2f44[89];_0x289cxf[_0x2f44[123]]= _0x289cx11[_0x2f44[118]];_0x289cxf[_0x2f44[124]]= _0x289cxb;_0x289cxf[_0x2f44[125]]= util[_0x2f44[57]](_0x2f44[126],_0x289cx11[_0x2f44[20]][_0x2f44[127]],_0x289cx11[_0x2f44[118]]);return ReportIntegration[_0x2f44[84]](_0x289cxf)}}function handleEnd(_0x289cx11,_0x289cxf,_0x289cxd){return function(){console[_0x2f44[12]](util[_0x2f44[57]](_0x2f44[128],_0x289cx11[_0x2f44[118]],_0x289cx11[_0x2f44[61]].Id));_0x289cx11= undefined;return}}function handleError(_0x289cx11,_0x289cxd,_0x289cxf,_0x289cxb){return function(_0x289cx4b){console[_0x2f44[16]](_0x2f44[129]);console[_0x2f44[16]](_0x2f44[130],_0x289cx4b[_0x2f44[131]]);console[_0x2f44[16]](_0x2f44[132],_0x289cx4b[_0x2f44[133]]);_0x289cx11= undefined;delete _0x289cxf[_0x2f44[42]];_0x289cxf[_0x2f44[119]]= _0x2f44[120];_0x289cxf[_0x2f44[121]]= _0x289cxd;_0x289cxf[_0x2f44[122]]= _0x2f44[134];_0x289cxf[_0x2f44[124]]= _0x289cxb;ReportIntegration[_0x2f44[84]](_0x289cxf)[_0x2f44[18]](function(){return})[_0x2f44[17]](function(_0x289cx4b){console[_0x2f44[16]](_0x2f44[135]);return})}}function stripTrailingSlash(_0x289cx4d){if(_0x289cx4d[_0x2f44[136]](-1) === _0x2f44[137]){return _0x289cx4d[_0x2f44[136]](0,_0x289cx4d[_0x2f44[59]]- 1)};return _0x289cx4d}module[_0x2f44[138]]= Salesforce
\ No newline at end of file
diff --git a/server/config/integrations/zendesk.js b/server/config/integrations/zendesk.js
index b560a80..6c3633d 100644
--- a/server/config/integrations/zendesk.js
+++ b/server/config/integrations/zendesk.js
@@ -1,637 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var rp = require('request-promise');
-
-var ZendeskIntegration = require('../../models').ZendeskIntegration;
-var ZendeskConfiguration = require('../../models').ZendeskConfiguration;
-var ReportIntegration = require('../../models').ReportIntegration;
-var VoiceQueue = require('../../models').VoiceQueue;
-var VoiceExtension = require('../../models').VoiceExtension;
-var Agent = require('../../models').User;
-
-function Zendesk() {
-  console.log('Zendesk integration initialization...');
-}
-
-Zendesk.prototype.handleEvent = function(integrationId, configurationId, channel, subtype, data, variables) {
-
-  var zendeskData = {
-    uri: undefined,
-    headers: undefined,
-    agent: undefined,
-    enduser: undefined,
-    ticket: undefined,
-    configuration: undefined,
-    recordEnable: false,
-    serverURL: undefined,
-    agentName: undefined
-  };
-
-  if (!integrationId || !configurationId) {
-    console.error('Passed parameters are not enough to create a new ticket: miss IntegrationId or ConfigurationId');
-    return;
-  }
-
-  ZendeskConfiguration
-    .find({
-      where: {
-        id: configurationId,
-        AccountId: integrationId
-      },
-      include: [{
-        all: true,
-        include: [{
-          all: true
-        }]
-      }]
-    })
-    .then(handleEntityNotFound())
-    .then(handleConnection(zendeskData))
-    .then(searchMotionAgent(channel, data))
-    .then(handleMotionAgent(zendeskData))
-    .then(searchQueue(data))
-    .then(handleQueueRecordings(zendeskData, data))
-    .then(searchRoute(data))
-    .then(handleOutboundRecordings(zendeskData, data))
-    .then(searchAgent(zendeskData))
-    .then(handleAgent(zendeskData))
-    .then(searchAdmin(zendeskData))
-    .then(handleAdmin(zendeskData))
-    .then(searchEndUser(zendeskData, channel, data, subtype))
-    .then(handleEndUser(zendeskData, channel, data, subtype))
-    .then(endUserCreation(zendeskData, channel, data, subtype))
-    .then(handleEndUserCreation(zendeskData, channel, data, subtype))
-    .then(ticketCreation(zendeskData, data, variables))
-    .then(handleTicketDisplay(zendeskData))
-    .then(handleReportIntegration(zendeskData, channel, data, integrationId))
-    .then(handleEnd(zendeskData))
-    .catch(handleError(zendeskData, channel, data, integrationId));
-
-};
-
-function handleEntityNotFound() {
-  return function(entity) {
-    if (!entity) {
-      return null;
-    }
-    return entity;
-  };
-}
-
-function handleConnection(zendeskData) {
-  return function(configuration) {
-    var accConfiguration = getAccountConfiguration(configuration.ZendeskAccount);
-    zendeskData.configuration = configuration;
-    zendeskData.uri = accConfiguration.uri;
-    zendeskData.headers = accConfiguration.headers;
-    zendeskData.serverURL = configuration.ZendeskAccount.serverUrl;
-  }
-}
-
-function searchMotionAgent(channel, data) {
-  return function() {
-    return Agent
-      .scope('agent')
-      .findOne({
-        where: {
-          name: getValueFromPropertyName(data, getAgentSearchPropertyFromChannel(channel))
-        },
-        attributes: ['fullname']
-      });
-  }
-}
-
-function handleMotionAgent(zendeskData) {
-  return function(agent) {
-    if (agent && agent.fullname) {
-      zendeskData.agentName = agent.fullname;
-    }
-    return;
-  }
-}
-
-function searchQueue(data) {
-  return function() {
-    console.log('Searching Queue...');
-    if (data.queue) {
-      return VoiceQueue.findOne({
-        where: {
-          name: data.queue
-        },
-        attributes: ['name', 'monitor_format']
-      });
-    } else {
-      return;
-    }
-  }
-}
-
-function handleQueueRecordings(zendeskData, data) {
-  return function(queue) {
-    if (data.queue) {
-      if (queue && queue.monitor_format) {
-        console.log('[Zendesk] Recording enabled for the Queue', queue.name);
-        zendeskData.recordEnable = true;
-      } else {
-        zendeskData.recordEnable = false;
-        console.log('[Zendesk] Queue not found or Recording not enabled');
-      }
-    }
-    return;
-  }
-}
-
-function searchRoute(data) {
-  return function() {
-    if (data.routeId) {
-      return VoiceExtension.findOne({
-        where: {
-          id: data.routeId
-        },
-        attributes: ['id', 'record']
-      });
-    } else {
-      return;
-    }
-  }
-}
-
-function handleOutboundRecordings(zendeskData, data) {
-  return function(route) {
-    if (data.routeId) {
-      if (route && route.record) {
-        console.log('[Zendesk] Recording enabled for the Route Outbound', route.id);
-        zendeskData.recordEnable = true;
-      } else {
-        zendeskData.recordEnable = false;
-        console.log('[Zendesk] Route Outbound not found or Recording not enabled');
-      }
-    }
-    return;
-  }
-}
-
-function getAccountConfiguration(account) {
-  var authJson = {
-    uri: stripTrailingSlash(account.remoteUri),
-    headers: {
-      'Authorization': undefined,
-      'Content-Type': 'application/json',
-      'Accept': 'application/json'
-    }
-  };
-  var auth = account.username;
-  if (account.authType === 'password') {
-    auth = auth + ':' + account.password;
-  } else if (account.authType === 'token') {
-    auth = auth + '/token:' + account.token;
-  }
-  authJson.headers.Authorization = 'Basic ' + new Buffer(auth).toString('base64');
-  return authJson;
-}
-
-function searchAgent(zendeskData) {
-  return function() {
-    console.log('[Zendesk] Agent to search:', zendeskData.agentName);
-    return rp({
-      uri: zendeskData.uri + '/search.json',
-      qs: {
-        // 'query': "type:user role:agent name:Andrea Bianco"
-        'query': util.format("type:user role:agent name:%s", zendeskData.agentName)
-      },
-      headers: zendeskData.headers,
-      json: true
-    });
-  }
-}
-
-function getAgentSearchPropertyFromChannel(channel) {
-  var property = '';
-  if (channel) {
-    switch (channel) {
-      case 'voice':
-        property = 'membername';
-        break;
-      default:
-        property = 'membername';
-        console.error('Channel not recognized:', channel);
-    }
-  }
-  return property;
-}
-
-function getValueFromPropertyName(data, property, zendeskData) {
-  if (property === 'recordingURL') {
-    if (zendeskData && zendeskData.recordEnable && zendeskData.serverURL) {
-      return util.format('%s/api/voice/recordings/%s/download?type=uniqueid', stripTrailingSlash(zendeskData.serverURL), data.uniqueid);
-    } else {
-      return null;
-    }
-  } else {
-    return _.result(data, property);
-  }
-}
-
-function handleAgent(zendeskData) {
-  return function(data) {
-    if (data.results.length > 0 && data.count > 0) {
-      console.log('[Zendesk] Agent found:', zendeskData.agentName);
-      zendeskData.agent = getMatchObject(data.results, 'name', zendeskData.agentName);
-      return zendeskData.agent;
-    }
-    return;
-  }
-}
-
-function getMatchObject(collection, property, valueToSearch) {
-  var valueFound = _.find(collection, {
-    property: valueToSearch
-  });
-  if (valueFound) {
-    return valueFound;
-  }
-  return _.first(collection);
-}
-
-function searchAdmin(zendeskData) {
-  return function(data) {
-    if (data) {
-      return;
-    }
-    console.log('[Zendesk] Agent not found. Use the admin account');
-    return rp({
-      uri: zendeskData.uri + '/users/me.json',
-      headers: zendeskData.headers,
-      json: true
-    });
-  }
-}
-
-function handleAdmin(zendeskData) {
-  return function(data) {
-    if (!data) {
-      return;
-    }
-    if (data.user) {
-      console.log('[Zendesk] Admin selected');
-      zendeskData.agent = data.user;
-    }
-    return;
-  }
-}
-
-function searchEndUser(zendeskData, channel, data, subtype) {
-  return function() {
-    console.log('[Zendesk] End User to search:', getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype)));
-    return rp({
-      uri: zendeskData.uri + '/search.json',
-      qs: {
-        'query': util.format("type:user role:end-user %s:%s", getEndUserSearchQueryFromChannel(channel), getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype)))
-      },
-      headers: zendeskData.headers,
-      json: true
-    });
-  }
-}
-
-function getEndUserSearchQueryFromChannel(channel) {
-  var property = '';
-  if (channel) {
-    switch (channel) {
-      case 'voice':
-        property = 'phone';
-        break;
-      default:
-        property = 'phone';
-        console.error('Channel not recognized:', channel);
-    }
-  }
-  return property;
-}
-
-function getEndUserSearchPropertyFromChannel(channel, subtype) {
-  var property = '';
-  if (channel) {
-    switch (channel) {
-      case 'voice':
-        if (subtype === 'outbound') {
-          property = 'destcalleridnum';
-        } else if (subtype === 'queue') {
-          property = 'calleridnum';
-        }
-        break;
-      default:
-        property = 'calleridnum';
-        console.error('Channel not recognized:', channel);
-    }
-  }
-  return property;
-}
-
-function getEndUserNamePropertyFromChannel(channel, subtype) {
-  var property = '';
-  if (channel) {
-    switch (channel) {
-      case 'voice':
-        if (subtype === 'outbound') {
-          property = 'destcalleridname';
-        } else if (subtype === 'queue') {
-          property = 'calleridname';
-        }
-        break;
-      default:
-        property = 'calleridname';
-        console.error('Channel not recognized:', channel);
-    }
-  }
-  return property;
-}
-
-function handleEndUser(zendeskData, channel, event, subtype) {
-  return function(data) {
-    if (data.results.length > 0 && data.count > 0) {
-      console.log('[Zendesk] End User found:', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype)));
-      zendeskData.enduser = data.results[0];
-      return zendeskData.enduser;
-    }
-    return;
-  }
-}
-
-function endUserCreation(zendeskData, channel, event, subtype) {
-  return function(data) {
-    if (data) {
-      return;
-    }
-    console.log('[Zendesk] End User not found:', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype)));
-    console.log(getJsonForEndUserCreation(channel, event, subtype));
-    return rp({
-      uri: zendeskData.uri + '/users.json',
-      method: 'POST',
-      body: {
-        user: getJsonForEndUserCreation(channel, event, subtype)
-      },
-      headers: zendeskData.headers,
-      json: true
-    });
-  }
-}
-
-function getJsonForEndUserCreation(channel, data, subtype) {
-  var user = {
-    role: 'end-user'
-  };
-
-  switch (channel) {
-    case 'voice':
-      if (subtype === 'queue') {
-        if (isValidName(data.calleridname)) {
-          user.name = getValueFromPropertyName(data, getEndUserNamePropertyFromChannel(channel, subtype));
-        } else {
-          user.name = util.format('Caller - %s', getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype)))
-        }
-      } else if (subtype === 'outbound') {
-        if (isValidName(data.destcalleridname)) {
-          user.name = getValueFromPropertyName(data, getEndUserNamePropertyFromChannel(channel, subtype));
-        } else {
-          user.name = util.format('Caller - %s', getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype)))
-        }
-      }
-      user.phone = getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype));
-      break;
-    default:
-      console.error('Channel not recognized:', channel);
-  }
-
-  return user;
-}
-
-function isValidName(name) {
-  return name && name !== '<unknown>';
-}
-
-function handleEndUserCreation(zendeskData, channel, event, subtype) {
-  return function(data) {
-    if (!data) {
-      return;
-    }
-    if (data.user) {
-      console.log('[Zendesk] End User created:', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype)));
-      zendeskData.enduser = data.user;
-    }
-    return;
-  }
-}
-
-function ticketCreation(zendeskData, event, variables) {
-  return function() {
-    var ticketBody = {
-      //Standard Field
-      requester_id: zendeskData.agent.id,
-      submitter_id: zendeskData.enduser.id,
-      assignee_id: zendeskData.enduser.id,
-      //Tag
-      tags: createTagsFromConfiguration(zendeskData),
-      //Configurated Field
-      subject: createSubjectFromConfiguration(zendeskData, event, variables),
-      description: createDescriptionFromConfiguration(zendeskData, event, variables),
-      custom_fields: createCustomFieldsFromConfiguration(zendeskData, event, variables)
-    };
-    var fields = createFieldsFromConfiguration(zendeskData);
-    if (fields.length > 0) {
-      _.forEach(fields, function(item) {
-        ticketBody[item.id] = item.value;
-      });
-    }
-    console.log('[Zendesk] Ticket body:', ticketBody);
-    return rp({
-      uri: zendeskData.uri + '/tickets.json',
-      method: 'POST',
-      body: {
-        ticket: ticketBody
-      },
-      headers: zendeskData.headers,
-      json: true
-    });
-  }
-}
-
-function createTagsFromConfiguration(zendeskData) {
-  var tags = [];
-  if (zendeskData.configuration.Tags.length > 0) {
-    tags = _.map(zendeskData.configuration.Tags, 'name');
-  }
-  return tags;
-}
-
-function createSubjectFromConfiguration(zendeskData, event, variables) {
-  var subject = '';
-  var stringsArray = [];
-  if (zendeskData.configuration.Subject.length > 0) {
-    var subjectConfiguration = _.sortBy(zendeskData.configuration.Subject, ['id']);
-    _.forEach(subjectConfiguration, function(value) {
-      if (value.type === 'string') {
-        stringsArray.push(value.content);
-      } else if (value.type === 'variable' && value.variableName) {
-        var prop = getValueFromPropertyName(event, value.variableName, zendeskData);
-        if (prop) {
-          stringsArray.push(prop.toString());
-        }
-      } else if (value.type === 'customVariable' && value.Variable && value.Variable.name) {
-        variables[value.Variable.name] && stringsArray.push(variables[value.Variable.name].toString());
-      }
-    });
-    subject = stringsArray.join(' ');
-  }
-  return subject;
-}
-
-function createDescriptionFromConfiguration(zendeskData, event, variables) {
-  var description = '';
-  var stringsArray = [];
-  if (zendeskData.configuration.Description.length > 0) {
-    var descriptionConfiguration = _.sortBy(zendeskData.configuration.Description, ['id']);
-    _.forEach(descriptionConfiguration, function(value) {
-      if (value.type === 'string') {
-        stringsArray.push(value.content);
-      } else if (value.type === 'keyValue') {
-        if (value.keyType === 'string' && value.key) {
-          stringsArray.push(util.format('%s: %s', value.key, value.keyContent));
-        } else if (value.keyType === 'variable' && value.variableName && value.key) {
-          var prop = getValueFromPropertyName(event, value.variableName, zendeskData);
-          if (prop) {
-            stringsArray.push(util.format('%s: %s', value.key, prop.toString()));
-          }
-        } else if (value.keyType === 'customVariable' && value.Variable && value.Variable.name && value.key) {
-          variables[value.Variable.name] && stringsArray.push(util.format('%s: %s', value.key, variables[value.Variable.name]));
-        }
-      }
-    });
-    description = stringsArray.join('\n');
-  }
-  return description;
-}
-
-function createCustomFieldsFromConfiguration(zendeskData, event, variables) {
-  var customFields = [];
-  var fieldArray = [];
-  if (zendeskData.configuration.Field.length > 0) {
-    customFields = _.filter(zendeskData.configuration.Field, {
-      'customField': true
-    });
-    _.forEach(customFields, function(item) {
-      if (item.type === 'string' && item.idField) {
-        fieldArray.push({
-          id: item.idField,
-          value: item.content
-        });
-      } else if (item.type === 'variable' && item.variableName && item.idField) {
-        var prop = getValueFromPropertyName(event, item.variableName, zendeskData);
-        if (prop) {
-          fieldArray.push({
-            id: item.idField,
-            value: prop.toString()
-          });
-        }
-      } else if (item.type === 'customVariable' && item.Variable && item.Variable.name && item.idField) {
-        variables[item.Variable.name] && fieldArray.push({
-          id: item.idField,
-          value: variables[item.Variable.name].toString()
-        });
-      }
-    });
-  }
-  return fieldArray;
-}
-
-function createFieldsFromConfiguration(zendeskData) {
-  var fields = [];
-  var fieldArray = [];
-  if (zendeskData.configuration.Field.length > 0) {
-    fields = _.filter(zendeskData.configuration.Field, {
-      'customField': false
-    });
-    _.forEach(fields, function(item) {
-      if (item.type === 'string' && item.nameField) {
-        fieldArray.push({
-          id: item.nameField,
-          value: item.content
-        });
-      }
-    });
-  }
-  return fieldArray;
-}
-
-function handleTicketDisplay(zendeskData) {
-  return function(data) {
-    if (data.ticket) {
-      console.log('[Zendesk] Ticket created');
-      zendeskData.ticket = data.ticket;
-      var urlDisplay = util.format('/channels/voice/agents/%d/tickets/%d/display.json', zendeskData.agent.id, zendeskData.ticket.id);
-      return rp({
-        uri: zendeskData.uri + urlDisplay,
-        method: 'POST',
-        headers: zendeskData.headers,
-        json: true
-      });
-    }
-    return;
-  }
-}
-
-function handleReportIntegration(zendeskData, channel, data, integrationId) {
-  return function() {
-    delete data.id;
-    data.integration = 'zendesk';
-    data.eventChannel = channel;
-    data.exitStatus = 'success';
-    data.ticketId = zendeskData.ticket.id;
-    data.url = zendeskData.ticket.url;
-    data.integrationId = integrationId;
-    return ReportIntegration.create(data);
-  }
-}
-
-function handleEnd(zendeskData, data, channel) {
-  return function() {
-    console.log(util.format('[Zendesk] Ticket %d displayed to agent %d', zendeskData.ticket.id, zendeskData.agent.id));
-    zendeskData = undefined;
-    return;
-  }
-}
-
-function handleError(zendeskData, channel, data, integrationId) {
-  return function(err) {
-    console.error('[Zendesk] Error in ticket creation');
-    console.error('[Zendesk] Message:', err.message);
-    console.error('[Zendesk] Stack:', err.stack);
-    zendeskData = undefined;
-
-    delete data.id;
-    data.integration = 'zendesk';
-    data.eventChannel = channel;
-    data.exitStatus = 'failed';
-    data.integrationId = integrationId;
-    ReportIntegration
-      .create(data)
-      .then(function() {
-        return;
-      })
-      .catch(function(err) {
-        console.error('[Zendesk] Error in Report integration create');
-        return;
-      });
-  }
-}
-
-function stripTrailingSlash(str) {
-  if (str.substr(-1) === '/') {
-    return str.substr(0, str.length - 1);
-  }
-  return str;
-}
-
-module.exports = Zendesk;
+var _0xbf6b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x5A\x65\x6E\x64\x65\x73\x6B\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x55\x73\x65\x72","\x5A\x65\x6E\x64\x65\x73\x6B\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x50\x61\x73\x73\x65\x64\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x61\x72\x65\x20\x6E\x6F\x74\x20\x65\x6E\x6F\x75\x67\x68\x20\x74\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x3A\x20\x6D\x69\x73\x73\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64\x20\x6F\x72\x20\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x49\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x72\x69","\x68\x65\x61\x64\x65\x72\x73","\x73\x65\x72\x76\x65\x72\x55\x52\x4C","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x61\x67\x65\x6E\x74\x4E\x61\x6D\x65","\x53\x65\x61\x72\x63\x68\x69\x6E\x67\x20\x51\x75\x65\x75\x65\x2E\x2E\x2E","\x71\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x51\x75\x65\x75\x65","\x72\x65\x63\x6F\x72\x64\x45\x6E\x61\x62\x6C\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x72\x6F\x75\x74\x65\x49\x64","\x69\x64","\x72\x65\x63\x6F\x72\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x61\x75\x74\x68\x54\x79\x70\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x3A","\x74\x6F\x6B\x65\x6E","\x2F\x74\x6F\x6B\x65\x6E\x3A","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x61\x73\x69\x63\x20","\x62\x61\x73\x65\x36\x34","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x2F\x73\x65\x61\x72\x63\x68\x2E\x6A\x73\x6F\x6E","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x61\x67\x65\x6E\x74\x20\x6E\x61\x6D\x65\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x76\x6F\x69\x63\x65","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x72\x65\x73\x75\x6C\x74","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x73\x75\x6C\x74\x73","\x63\x6F\x75\x6E\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x66\x69\x72\x73\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E\x20\x55\x73\x65\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x75\x73\x65\x72\x73\x2F\x6D\x65\x2E\x6A\x73\x6F\x6E","\x75\x73\x65\x72","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x64\x6D\x69\x6E\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x65\x6E\x64\x2D\x75\x73\x65\x72\x20\x25\x73\x3A\x25\x73","\x70\x68\x6F\x6E\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x3A","\x65\x6E\x64\x75\x73\x65\x72","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x2F\x75\x73\x65\x72\x73\x2E\x6A\x73\x6F\x6E","\x50\x4F\x53\x54","\x65\x6E\x64\x2D\x75\x73\x65\x72","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x63\x72\x65\x61\x74\x65\x64\x3A","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x45\x61\x63\x68","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x62\x6F\x64\x79\x3A","\x2F\x74\x69\x63\x6B\x65\x74\x73\x2E\x6A\x73\x6F\x6E","\x54\x61\x67\x73","\x6D\x61\x70","\x53\x75\x62\x6A\x65\x63\x74","\x73\x6F\x72\x74\x42\x79","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x74\x65\x6E\x74","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x20","\x6A\x6F\x69\x6E","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x0A","\x46\x69\x65\x6C\x64","\x66\x69\x6C\x74\x65\x72","\x69\x64\x46\x69\x65\x6C\x64","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x74\x69\x63\x6B\x65\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x65\x64","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x61\x67\x65\x6E\x74\x73\x2F\x25\x64\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F\x25\x64\x2F\x64\x69\x73\x70\x6C\x61\x79\x2E\x6A\x73\x6F\x6E","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x7A\x65\x6E\x64\x65\x73\x6B","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x73\x75\x63\x63\x65\x73\x73","\x74\x69\x63\x6B\x65\x74\x49\x64","\x75\x72\x6C","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64","\x63\x72\x65\x61\x74\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x25\x64\x20\x64\x69\x73\x70\x6C\x61\x79\x65\x64\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x74\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x69\x6F\x6E","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x52\x65\x70\x6F\x72\x74\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65","\x73\x75\x62\x73\x74\x72","\x2F","\x65\x78\x70\x6F\x72\x74\x73"];_0xbf6b[0];var _=require(_0xbf6b[1]);var util=require(_0xbf6b[2]);var rp=require(_0xbf6b[3]);var ZendeskIntegration=require(_0xbf6b[5])[_0xbf6b[4]];var ZendeskConfiguration=require(_0xbf6b[5])[_0xbf6b[6]];var ReportIntegration=require(_0xbf6b[5])[_0xbf6b[7]];var VoiceQueue=require(_0xbf6b[5])[_0xbf6b[8]];var VoiceExtension=require(_0xbf6b[5])[_0xbf6b[9]];var Agent=require(_0xbf6b[5])[_0xbf6b[10]];function Zendesk(){console[_0xbf6b[12]](_0xbf6b[11])}Zendesk[_0xbf6b[14]][_0xbf6b[13]]= function(_0x393axb,_0x393axc,_0x393axd,_0x393axe,_0x393axf,_0x393ax10){var _0x393ax11={uri:undefined,headers:undefined,agent:undefined,enduser:undefined,ticket:undefined,configuration:undefined,recordEnable:false,serverURL:undefined,agentName:undefined};if(!_0x393axb||  !_0x393axc){console[_0xbf6b[16]](_0xbf6b[15]);return};ZendeskConfiguration[_0xbf6b[19]]({where:{id:_0x393axc,AccountId:_0x393axb},include:[{all:true,include:[{all:true}]}]})[_0xbf6b[18]](handleEntityNotFound())[_0xbf6b[18]](handleConnection(_0x393ax11))[_0xbf6b[18]](searchMotionAgent(_0x393axd,_0x393axf))[_0xbf6b[18]](handleMotionAgent(_0x393ax11))[_0xbf6b[18]](searchQueue(_0x393axf))[_0xbf6b[18]](handleQueueRecordings(_0x393ax11,_0x393axf))[_0xbf6b[18]](searchRoute(_0x393axf))[_0xbf6b[18]](handleOutboundRecordings(_0x393ax11,_0x393axf))[_0xbf6b[18]](searchAgent(_0x393ax11))[_0xbf6b[18]](handleAgent(_0x393ax11))[_0xbf6b[18]](searchAdmin(_0x393ax11))[_0xbf6b[18]](handleAdmin(_0x393ax11))[_0xbf6b[18]](searchEndUser(_0x393ax11,_0x393axd,_0x393axf,_0x393axe))[_0xbf6b[18]](handleEndUser(_0x393ax11,_0x393axd,_0x393axf,_0x393axe))[_0xbf6b[18]](endUserCreation(_0x393ax11,_0x393axd,_0x393axf,_0x393axe))[_0xbf6b[18]](handleEndUserCreation(_0x393ax11,_0x393axd,_0x393axf,_0x393axe))[_0xbf6b[18]](ticketCreation(_0x393ax11,_0x393axf,_0x393ax10))[_0xbf6b[18]](handleTicketDisplay(_0x393ax11))[_0xbf6b[18]](handleReportIntegration(_0x393ax11,_0x393axd,_0x393axf,_0x393axb))[_0xbf6b[18]](handleEnd(_0x393ax11))[_0xbf6b[17]](handleError(_0x393ax11,_0x393axd,_0x393axf,_0x393axb))};function handleEntityNotFound(){return function(_0x393ax13){if(!_0x393ax13){return null};return _0x393ax13}}function handleConnection(_0x393ax11){return function(_0x393ax15){var _0x393ax16=getAccountConfiguration(_0x393ax15.ZendeskAccount);_0x393ax11[_0xbf6b[20]]= _0x393ax15;_0x393ax11[_0xbf6b[21]]= _0x393ax16[_0xbf6b[21]];_0x393ax11[_0xbf6b[22]]= _0x393ax16[_0xbf6b[22]];_0x393ax11[_0xbf6b[23]]= _0x393ax15[_0xbf6b[25]][_0xbf6b[24]]}}function searchMotionAgent(_0x393axd,_0x393axf){return function(){return Agent[_0xbf6b[29]](_0xbf6b[28])[_0xbf6b[27]]({where:{name:getValueFromPropertyName(_0x393axf,getAgentSearchPropertyFromChannel(_0x393axd))},attributes:[_0xbf6b[26]]})}}function handleMotionAgent(_0x393ax11){return function(_0x393ax19){if(_0x393ax19&& _0x393ax19[_0xbf6b[26]]){_0x393ax11[_0xbf6b[30]]= _0x393ax19[_0xbf6b[26]]};return}}function searchQueue(_0x393axf){return function(){console[_0xbf6b[12]](_0xbf6b[31]);if(_0x393axf[_0xbf6b[32]]){return VoiceQueue[_0xbf6b[27]]({where:{name:_0x393axf[_0xbf6b[32]]},attributes:[_0xbf6b[33],_0xbf6b[34]]})}else {return}}}function handleQueueRecordings(_0x393ax11,_0x393axf){return function(_0x393ax1c){if(_0x393axf[_0xbf6b[32]]){if(_0x393ax1c&& _0x393ax1c[_0xbf6b[34]]){console[_0xbf6b[12]](_0xbf6b[35],_0x393ax1c[_0xbf6b[33]]);_0x393ax11[_0xbf6b[36]]= true}else {_0x393ax11[_0xbf6b[36]]= false;console[_0xbf6b[12]](_0xbf6b[37])}};return}}function searchRoute(_0x393axf){return function(){if(_0x393axf[_0xbf6b[38]]){return VoiceExtension[_0xbf6b[27]]({where:{id:_0x393axf[_0xbf6b[38]]},attributes:[_0xbf6b[39],_0xbf6b[40]]})}else {return}}}function handleOutboundRecordings(_0x393ax11,_0x393axf){return function(_0x393ax1f){if(_0x393axf[_0xbf6b[38]]){if(_0x393ax1f&& _0x393ax1f[_0xbf6b[40]]){console[_0xbf6b[12]](_0xbf6b[41],_0x393ax1f[_0xbf6b[39]]);_0x393ax11[_0xbf6b[36]]= true}else {_0x393ax11[_0xbf6b[36]]= false;console[_0xbf6b[12]](_0xbf6b[42])}};return}}function getAccountConfiguration(_0x393ax21){var _0x393ax22={uri:stripTrailingSlash(_0x393ax21[_0xbf6b[43]]),headers:{"\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E":undefined,"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xbf6b[44],"\x41\x63\x63\x65\x70\x74":_0xbf6b[44]}};var _0x393ax23=_0x393ax21[_0xbf6b[45]];if(_0x393ax21[_0xbf6b[46]]=== _0xbf6b[47]){_0x393ax23= _0x393ax23+ _0xbf6b[48]+ _0x393ax21[_0xbf6b[47]]}else {if(_0x393ax21[_0xbf6b[46]]=== _0xbf6b[49]){_0x393ax23= _0x393ax23+ _0xbf6b[50]+ _0x393ax21[_0xbf6b[49]]}};_0x393ax22[_0xbf6b[22]][_0xbf6b[51]]= _0xbf6b[52]+  new Buffer(_0x393ax23).toString(_0xbf6b[53]);return _0x393ax22}function searchAgent(_0x393ax11){return function(){console[_0xbf6b[12]](_0xbf6b[54],_0x393ax11[_0xbf6b[30]]);return rp({uri:_0x393ax11[_0xbf6b[21]]+ _0xbf6b[55],qs:{"\x71\x75\x65\x72\x79":util[_0xbf6b[57]](_0xbf6b[56],_0x393ax11[_0xbf6b[30]])},headers:_0x393ax11[_0xbf6b[22]],json:true})}}function getAgentSearchPropertyFromChannel(_0x393axd){var _0x393ax26=_0xbf6b[58];if(_0x393axd){switch(_0x393axd){case _0xbf6b[60]:_0x393ax26= _0xbf6b[59];break;default:_0x393ax26= _0xbf6b[59];console[_0xbf6b[16]](_0xbf6b[61],_0x393axd)}};return _0x393ax26}function getValueFromPropertyName(_0x393axf,_0x393ax26,_0x393ax11){if(_0x393ax26=== _0xbf6b[62]){if(_0x393ax11&& _0x393ax11[_0xbf6b[36]]&& _0x393ax11[_0xbf6b[23]]){return util[_0xbf6b[57]](_0xbf6b[63],stripTrailingSlash(_0x393ax11[_0xbf6b[23]]),_0x393axf[_0xbf6b[64]])}else {return null}}else {return _[_0xbf6b[65]](_0x393axf,_0x393ax26)}}function handleAgent(_0x393ax11){return function(_0x393axf){if(_0x393axf[_0xbf6b[67]][_0xbf6b[66]]> 0&& _0x393axf[_0xbf6b[68]]> 0){console[_0xbf6b[12]](_0xbf6b[69],_0x393ax11[_0xbf6b[30]]);_0x393ax11[_0xbf6b[28]]= getMatchObject(_0x393axf[_0xbf6b[67]],_0xbf6b[33],_0x393ax11[_0xbf6b[30]]);return _0x393ax11[_0xbf6b[28]]};return}}function getMatchObject(_0x393ax2a,_0x393ax26,_0x393ax2b){var _0x393ax2c=_[_0xbf6b[19]](_0x393ax2a,{property:_0x393ax2b});if(_0x393ax2c){return _0x393ax2c};return _[_0xbf6b[70]](_0x393ax2a)}function searchAdmin(_0x393ax11){return function(_0x393axf){if(_0x393axf){return};console[_0xbf6b[12]](_0xbf6b[71]);return rp({uri:_0x393ax11[_0xbf6b[21]]+ _0xbf6b[72],headers:_0x393ax11[_0xbf6b[22]],json:true})}}function handleAdmin(_0x393ax11){return function(_0x393axf){if(!_0x393axf){return};if(_0x393axf[_0xbf6b[73]]){console[_0xbf6b[12]](_0xbf6b[74]);_0x393ax11[_0xbf6b[28]]= _0x393axf[_0xbf6b[73]]};return}}function searchEndUser(_0x393ax11,_0x393axd,_0x393axf,_0x393axe){return function(){console[_0xbf6b[12]](_0xbf6b[75],getValueFromPropertyName(_0x393axf,getEndUserSearchPropertyFromChannel(_0x393axd,_0x393axe)));return rp({uri:_0x393ax11[_0xbf6b[21]]+ _0xbf6b[55],qs:{"\x71\x75\x65\x72\x79":util[_0xbf6b[57]](_0xbf6b[76],getEndUserSearchQueryFromChannel(_0x393axd),getValueFromPropertyName(_0x393axf,getEndUserSearchPropertyFromChannel(_0x393axd,_0x393axe)))},headers:_0x393ax11[_0xbf6b[22]],json:true})}}function getEndUserSearchQueryFromChannel(_0x393axd){var _0x393ax26=_0xbf6b[58];if(_0x393axd){switch(_0x393axd){case _0xbf6b[60]:_0x393ax26= _0xbf6b[77];break;default:_0x393ax26= _0xbf6b[77];console[_0xbf6b[16]](_0xbf6b[61],_0x393axd)}};return _0x393ax26}function getEndUserSearchPropertyFromChannel(_0x393axd,_0x393axe){var _0x393ax26=_0xbf6b[58];if(_0x393axd){switch(_0x393axd){case _0xbf6b[60]:if(_0x393axe=== _0xbf6b[78]){_0x393ax26= _0xbf6b[79]}else {if(_0x393axe=== _0xbf6b[32]){_0x393ax26= _0xbf6b[80]}};break;default:_0x393ax26= _0xbf6b[80];console[_0xbf6b[16]](_0xbf6b[61],_0x393axd)}};return _0x393ax26}function getEndUserNamePropertyFromChannel(_0x393axd,_0x393axe){var _0x393ax26=_0xbf6b[58];if(_0x393axd){switch(_0x393axd){case _0xbf6b[60]:if(_0x393axe=== _0xbf6b[78]){_0x393ax26= _0xbf6b[81]}else {if(_0x393axe=== _0xbf6b[32]){_0x393ax26= _0xbf6b[82]}};break;default:_0x393ax26= _0xbf6b[82];console[_0xbf6b[16]](_0xbf6b[61],_0x393axd)}};return _0x393ax26}function handleEndUser(_0x393ax11,_0x393axd,_0x393ax34,_0x393axe){return function(_0x393axf){if(_0x393axf[_0xbf6b[67]][_0xbf6b[66]]> 0&& _0x393axf[_0xbf6b[68]]> 0){console[_0xbf6b[12]](_0xbf6b[83],getValueFromPropertyName(_0x393ax34,getEndUserSearchPropertyFromChannel(_0x393axd,_0x393axe)));_0x393ax11[_0xbf6b[84]]= _0x393axf[_0xbf6b[67]][0];return _0x393ax11[_0xbf6b[84]]};return}}function endUserCreation(_0x393ax11,_0x393axd,_0x393ax34,_0x393axe){return function(_0x393axf){if(_0x393axf){return};console[_0xbf6b[12]](_0xbf6b[85],getValueFromPropertyName(_0x393ax34,getEndUserSearchPropertyFromChannel(_0x393axd,_0x393axe)));console[_0xbf6b[12]](getJsonForEndUserCreation(_0x393axd,_0x393ax34,_0x393axe));return rp({uri:_0x393ax11[_0xbf6b[21]]+ _0xbf6b[86],method:_0xbf6b[87],body:{user:getJsonForEndUserCreation(_0x393axd,_0x393ax34,_0x393axe)},headers:_0x393ax11[_0xbf6b[22]],json:true})}}function getJsonForEndUserCreation(_0x393axd,_0x393axf,_0x393axe){var _0x393ax37={role:_0xbf6b[88]};switch(_0x393axd){case _0xbf6b[60]:if(_0x393axe=== _0xbf6b[32]){if(isValidName(_0x393axf[_0xbf6b[82]])){_0x393ax37[_0xbf6b[33]]= getValueFromPropertyName(_0x393axf,getEndUserNamePropertyFromChannel(_0x393axd,_0x393axe))}else {_0x393ax37[_0xbf6b[33]]= util[_0xbf6b[57]](_0xbf6b[89],getValueFromPropertyName(_0x393axf,getEndUserSearchPropertyFromChannel(_0x393axd,_0x393axe)))}}else {if(_0x393axe=== _0xbf6b[78]){if(isValidName(_0x393axf[_0xbf6b[81]])){_0x393ax37[_0xbf6b[33]]= getValueFromPropertyName(_0x393axf,getEndUserNamePropertyFromChannel(_0x393axd,_0x393axe))}else {_0x393ax37[_0xbf6b[33]]= util[_0xbf6b[57]](_0xbf6b[89],getValueFromPropertyName(_0x393axf,getEndUserSearchPropertyFromChannel(_0x393axd,_0x393axe)))}}};_0x393ax37[_0xbf6b[77]]= getValueFromPropertyName(_0x393axf,getEndUserSearchPropertyFromChannel(_0x393axd,_0x393axe));break;default:console[_0xbf6b[16]](_0xbf6b[61],_0x393axd)};return _0x393ax37}function isValidName(_0x393ax39){return _0x393ax39&& _0x393ax39!== _0xbf6b[90]}function handleEndUserCreation(_0x393ax11,_0x393axd,_0x393ax34,_0x393axe){return function(_0x393axf){if(!_0x393axf){return};if(_0x393axf[_0xbf6b[73]]){console[_0xbf6b[12]](_0xbf6b[91],getValueFromPropertyName(_0x393ax34,getEndUserSearchPropertyFromChannel(_0x393axd,_0x393axe)));_0x393ax11[_0xbf6b[84]]= _0x393axf[_0xbf6b[73]]};return}}function ticketCreation(_0x393ax11,_0x393ax34,_0x393ax10){return function(){var _0x393ax3c={requester_id:_0x393ax11[_0xbf6b[28]][_0xbf6b[39]],submitter_id:_0x393ax11[_0xbf6b[84]][_0xbf6b[39]],assignee_id:_0x393ax11[_0xbf6b[84]][_0xbf6b[39]],tags:createTagsFromConfiguration(_0x393ax11),subject:createSubjectFromConfiguration(_0x393ax11,_0x393ax34,_0x393ax10),description:createDescriptionFromConfiguration(_0x393ax11,_0x393ax34,_0x393ax10),custom_fields:createCustomFieldsFromConfiguration(_0x393ax11,_0x393ax34,_0x393ax10)};var _0x393ax3d=createFieldsFromConfiguration(_0x393ax11);if(_0x393ax3d[_0xbf6b[66]]> 0){_[_0xbf6b[93]](_0x393ax3d,function(_0x393ax3e){_0x393ax3c[_0x393ax3e[_0xbf6b[39]]]= _0x393ax3e[_0xbf6b[92]]})};console[_0xbf6b[12]](_0xbf6b[94],_0x393ax3c);return rp({uri:_0x393ax11[_0xbf6b[21]]+ _0xbf6b[95],method:_0xbf6b[87],body:{ticket:_0x393ax3c},headers:_0x393ax11[_0xbf6b[22]],json:true})}}function createTagsFromConfiguration(_0x393ax11){var _0x393ax40=[];if(_0x393ax11[_0xbf6b[20]][_0xbf6b[96]][_0xbf6b[66]]> 0){_0x393ax40= _[_0xbf6b[97]](_0x393ax11[_0xbf6b[20]].Tags,_0xbf6b[33])};return _0x393ax40}function createSubjectFromConfiguration(_0x393ax11,_0x393ax34,_0x393ax10){var _0x393ax42=_0xbf6b[58];var _0x393ax43=[];if(_0x393ax11[_0xbf6b[20]][_0xbf6b[98]][_0xbf6b[66]]> 0){var _0x393ax44=_[_0xbf6b[99]](_0x393ax11[_0xbf6b[20]].Subject,[_0xbf6b[39]]);_[_0xbf6b[93]](_0x393ax44,function(_0x393ax45){if(_0x393ax45[_0xbf6b[100]]=== _0xbf6b[101]){_0x393ax43[_0xbf6b[103]](_0x393ax45[_0xbf6b[102]])}else {if(_0x393ax45[_0xbf6b[100]]=== _0xbf6b[104]&& _0x393ax45[_0xbf6b[105]]){var _0x393ax46=getValueFromPropertyName(_0x393ax34,_0x393ax45[_0xbf6b[105]],_0x393ax11);if(_0x393ax46){_0x393ax43[_0xbf6b[103]](_0x393ax46.toString())}}else {if(_0x393ax45[_0xbf6b[100]]=== _0xbf6b[106]&& _0x393ax45[_0xbf6b[107]]&& _0x393ax45[_0xbf6b[107]][_0xbf6b[33]]){_0x393ax10[_0x393ax45[_0xbf6b[107]][_0xbf6b[33]]]&& _0x393ax43[_0xbf6b[103]](_0x393ax10[_0x393ax45[_0xbf6b[107]][_0xbf6b[33]]].toString())}}}});_0x393ax42= _0x393ax43[_0xbf6b[109]](_0xbf6b[108])};return _0x393ax42}function createDescriptionFromConfiguration(_0x393ax11,_0x393ax34,_0x393ax10){var _0x393ax48=_0xbf6b[58];var _0x393ax43=[];if(_0x393ax11[_0xbf6b[20]][_0xbf6b[110]][_0xbf6b[66]]> 0){var _0x393ax49=_[_0xbf6b[99]](_0x393ax11[_0xbf6b[20]].Description,[_0xbf6b[39]]);_[_0xbf6b[93]](_0x393ax49,function(_0x393ax45){if(_0x393ax45[_0xbf6b[100]]=== _0xbf6b[101]){_0x393ax43[_0xbf6b[103]](_0x393ax45[_0xbf6b[102]])}else {if(_0x393ax45[_0xbf6b[100]]=== _0xbf6b[111]){if(_0x393ax45[_0xbf6b[112]]=== _0xbf6b[101]&& _0x393ax45[_0xbf6b[113]]){_0x393ax43[_0xbf6b[103]](util[_0xbf6b[57]](_0xbf6b[114],_0x393ax45[_0xbf6b[113]],_0x393ax45[_0xbf6b[115]]))}else {if(_0x393ax45[_0xbf6b[112]]=== _0xbf6b[104]&& _0x393ax45[_0xbf6b[105]]&& _0x393ax45[_0xbf6b[113]]){var _0x393ax46=getValueFromPropertyName(_0x393ax34,_0x393ax45[_0xbf6b[105]],_0x393ax11);if(_0x393ax46){_0x393ax43[_0xbf6b[103]](util[_0xbf6b[57]](_0xbf6b[114],_0x393ax45[_0xbf6b[113]],_0x393ax46.toString()))}}else {if(_0x393ax45[_0xbf6b[112]]=== _0xbf6b[106]&& _0x393ax45[_0xbf6b[107]]&& _0x393ax45[_0xbf6b[107]][_0xbf6b[33]]&& _0x393ax45[_0xbf6b[113]]){_0x393ax10[_0x393ax45[_0xbf6b[107]][_0xbf6b[33]]]&& _0x393ax43[_0xbf6b[103]](util[_0xbf6b[57]](_0xbf6b[114],_0x393ax45[_0xbf6b[113]],_0x393ax10[_0x393ax45[_0xbf6b[107]][_0xbf6b[33]]]))}}}}}});_0x393ax48= _0x393ax43[_0xbf6b[109]](_0xbf6b[116])};return _0x393ax48}function createCustomFieldsFromConfiguration(_0x393ax11,_0x393ax34,_0x393ax10){var _0x393ax4b=[];var _0x393ax4c=[];if(_0x393ax11[_0xbf6b[20]][_0xbf6b[117]][_0xbf6b[66]]> 0){_0x393ax4b= _[_0xbf6b[118]](_0x393ax11[_0xbf6b[20]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":true});_[_0xbf6b[93]](_0x393ax4b,function(_0x393ax3e){if(_0x393ax3e[_0xbf6b[100]]=== _0xbf6b[101]&& _0x393ax3e[_0xbf6b[119]]){_0x393ax4c[_0xbf6b[103]]({id:_0x393ax3e[_0xbf6b[119]],value:_0x393ax3e[_0xbf6b[102]]})}else {if(_0x393ax3e[_0xbf6b[100]]=== _0xbf6b[104]&& _0x393ax3e[_0xbf6b[105]]&& _0x393ax3e[_0xbf6b[119]]){var _0x393ax46=getValueFromPropertyName(_0x393ax34,_0x393ax3e[_0xbf6b[105]],_0x393ax11);if(_0x393ax46){_0x393ax4c[_0xbf6b[103]]({id:_0x393ax3e[_0xbf6b[119]],value:_0x393ax46.toString()})}}else {if(_0x393ax3e[_0xbf6b[100]]=== _0xbf6b[106]&& _0x393ax3e[_0xbf6b[107]]&& _0x393ax3e[_0xbf6b[107]][_0xbf6b[33]]&& _0x393ax3e[_0xbf6b[119]]){_0x393ax10[_0x393ax3e[_0xbf6b[107]][_0xbf6b[33]]]&& _0x393ax4c[_0xbf6b[103]]({id:_0x393ax3e[_0xbf6b[119]],value:_0x393ax10[_0x393ax3e[_0xbf6b[107]][_0xbf6b[33]]].toString()})}}}})};return _0x393ax4c}function createFieldsFromConfiguration(_0x393ax11){var _0x393ax3d=[];var _0x393ax4c=[];if(_0x393ax11[_0xbf6b[20]][_0xbf6b[117]][_0xbf6b[66]]> 0){_0x393ax3d= _[_0xbf6b[118]](_0x393ax11[_0xbf6b[20]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":false});_[_0xbf6b[93]](_0x393ax3d,function(_0x393ax3e){if(_0x393ax3e[_0xbf6b[100]]=== _0xbf6b[101]&& _0x393ax3e[_0xbf6b[120]]){_0x393ax4c[_0xbf6b[103]]({id:_0x393ax3e[_0xbf6b[120]],value:_0x393ax3e[_0xbf6b[102]]})}})};return _0x393ax4c}function handleTicketDisplay(_0x393ax11){return function(_0x393axf){if(_0x393axf[_0xbf6b[121]]){console[_0xbf6b[12]](_0xbf6b[122]);_0x393ax11[_0xbf6b[121]]= _0x393axf[_0xbf6b[121]];var _0x393ax4f=util[_0xbf6b[57]](_0xbf6b[123],_0x393ax11[_0xbf6b[28]][_0xbf6b[39]],_0x393ax11[_0xbf6b[121]][_0xbf6b[39]]);return rp({uri:_0x393ax11[_0xbf6b[21]]+ _0x393ax4f,method:_0xbf6b[87],headers:_0x393ax11[_0xbf6b[22]],json:true})};return}}function handleReportIntegration(_0x393ax11,_0x393axd,_0x393axf,_0x393axb){return function(){delete _0x393axf[_0xbf6b[39]];_0x393axf[_0xbf6b[124]]= _0xbf6b[125];_0x393axf[_0xbf6b[126]]= _0x393axd;_0x393axf[_0xbf6b[127]]= _0xbf6b[128];_0x393axf[_0xbf6b[129]]= _0x393ax11[_0xbf6b[121]][_0xbf6b[39]];_0x393axf[_0xbf6b[130]]= _0x393ax11[_0xbf6b[121]][_0xbf6b[130]];_0x393axf[_0xbf6b[131]]= _0x393axb;return ReportIntegration[_0xbf6b[132]](_0x393axf)}}function handleEnd(_0x393ax11,_0x393axf,_0x393axd){return function(){console[_0xbf6b[12]](util[_0xbf6b[57]](_0xbf6b[133],_0x393ax11[_0xbf6b[121]][_0xbf6b[39]],_0x393ax11[_0xbf6b[28]][_0xbf6b[39]]));_0x393ax11= undefined;return}}function handleError(_0x393ax11,_0x393axd,_0x393axf,_0x393axb){return function(_0x393ax53){console[_0xbf6b[16]](_0xbf6b[134]);console[_0xbf6b[16]](_0xbf6b[135],_0x393ax53[_0xbf6b[136]]);console[_0xbf6b[16]](_0xbf6b[137],_0x393ax53[_0xbf6b[138]]);_0x393ax11= undefined;delete _0x393axf[_0xbf6b[39]];_0x393axf[_0xbf6b[124]]= _0xbf6b[125];_0x393axf[_0xbf6b[126]]= _0x393axd;_0x393axf[_0xbf6b[127]]= _0xbf6b[139];_0x393axf[_0xbf6b[131]]= _0x393axb;ReportIntegration[_0xbf6b[132]](_0x393axf)[_0xbf6b[18]](function(){return})[_0xbf6b[17]](function(_0x393ax53){console[_0xbf6b[16]](_0xbf6b[140]);return})}}function stripTrailingSlash(_0x393ax55){if(_0x393ax55[_0xbf6b[141]](-1) === _0xbf6b[142]){return _0x393ax55[_0xbf6b[141]](0,_0x393ax55[_0xbf6b[66]]- 1)};return _0x393ax55}module[_0xbf6b[143]]= Zendesk
\ No newline at end of file
diff --git a/server/config/license/hardware.js b/server/config/license/hardware.js
index 57ddc35..bbf3845 100644
--- a/server/config/license/hardware.js
+++ b/server/config/license/hardware.js
@@ -1,59 +1 @@
-'use strict';
-/**
- * Imports
- */
-var os = require('os'),
-  crypto = require('crypto'),
-  path = require('path'),
-  machineId = require('machine-uuid'),
-  machine = require('bimedia-machine-uuid'),
-  async = require('async');
-
-
-function getInterfaces() {
-  var ifaces = [];
-  var interfaces = os.networkInterfaces();
-  for (var dev in interfaces) {
-    // ... and find the one that matches the criteria
-    var iface = interfaces[dev].filter(function(details) {
-      return details.family === 'IPv4' && details.internal === false;
-    });
-    ifaces = ifaces.concat(iface);
-  }
-
-  return ifaces;
-}
-
-/**
- * Retrieve unique MAC addresses
- *
- * @returns   {string}   array of MAC addresses
- */
-function macAddress() {
-  var ifaces = getInterfaces();
-  return (ifaces.length > 0) ? ifaces[0].mac : '00:00:00:00:00:00';
-}
-
-/**
- * Retrieve unique IP addresses
- *
- * @returns   {string}   array of IP addresses
- */
-function ipAddress() {
-  var ifaces = getInterfaces();
-  return (ifaces.length > 0) ? ifaces[0].address : '127.0.0.1';
-}
-
-/**
- * Generate the machine ID
- *
- * @param   {Bolean}    [format]    true to return a formatted ID
- * @returns {String}    machine ID
- */
-module.exports = function(format) {
-  var s = machine.uuid + '|' + macAddress() + '|' + ipAddress();
-  var ID = crypto.createHash('md5').update(s).digest('hex');
-  var FORMATTED = ID.substring(0, 8) + '-' + ID.substring(8, 12) + '-' + ID.substring(12, 16) + '-' + ID.substring(16, 20) + '-' + ID.substring(20);
-
-  return format === true ? FORMATTED : ID;
-};
+var _0xb764=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6F\x73","\x63\x72\x79\x70\x74\x6F","\x70\x61\x74\x68","\x6D\x61\x63\x68\x69\x6E\x65\x2D\x75\x75\x69\x64","\x62\x69\x6D\x65\x64\x69\x61\x2D\x6D\x61\x63\x68\x69\x6E\x65\x2D\x75\x75\x69\x64","\x61\x73\x79\x6E\x63","\x6E\x65\x74\x77\x6F\x72\x6B\x49\x6E\x74\x65\x72\x66\x61\x63\x65\x73","\x66\x61\x6D\x69\x6C\x79","\x49\x50\x76\x34","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x66\x69\x6C\x74\x65\x72","\x63\x6F\x6E\x63\x61\x74","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x63","\x30\x30\x3A\x30\x30\x3A\x30\x30\x3A\x30\x30\x3A\x30\x30\x3A\x30\x30","\x61\x64\x64\x72\x65\x73\x73","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x65\x78\x70\x6F\x72\x74\x73","\x75\x75\x69\x64","\x7C","\x68\x65\x78","\x64\x69\x67\x65\x73\x74","\x75\x70\x64\x61\x74\x65","\x6D\x64\x35","\x63\x72\x65\x61\x74\x65\x48\x61\x73\x68","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x2D"];_0xb764[0];var os=require(_0xb764[1]),crypto=require(_0xb764[2]),path=require(_0xb764[3]),machineId=require(_0xb764[4]),machine=require(_0xb764[5]),async=require(_0xb764[6]);function getInterfaces(){var _0x2b78x8=[];var _0x2b78x9=os[_0xb764[7]]();for(var _0x2b78xa in _0x2b78x9){var _0x2b78xb=_0x2b78x9[_0x2b78xa][_0xb764[11]](function(_0x2b78xc){return _0x2b78xc[_0xb764[8]]=== _0xb764[9]&& _0x2b78xc[_0xb764[10]]=== false});_0x2b78x8= _0x2b78x8[_0xb764[12]](_0x2b78xb)};return _0x2b78x8}function macAddress(){var _0x2b78x8=getInterfaces();return (_0x2b78x8[_0xb764[13]]> 0)?_0x2b78x8[0][_0xb764[14]]:_0xb764[15]}function ipAddress(){var _0x2b78x8=getInterfaces();return (_0x2b78x8[_0xb764[13]]> 0)?_0x2b78x8[0][_0xb764[16]]:_0xb764[17]}module[_0xb764[18]]= function(_0x2b78xf){var _0x2b78x10=machine[_0xb764[19]]+ _0xb764[20]+ macAddress()+ _0xb764[20]+ ipAddress();var _0x2b78x11=crypto[_0xb764[25]](_0xb764[24])[_0xb764[23]](_0x2b78x10)[_0xb764[22]](_0xb764[21]);var _0x2b78x12=_0x2b78x11[_0xb764[26]](0,8)+ _0xb764[27]+ _0x2b78x11[_0xb764[26]](8,12)+ _0xb764[27]+ _0x2b78x11[_0xb764[26]](12,16)+ _0xb764[27]+ _0x2b78x11[_0xb764[26]](16,20)+ _0xb764[27]+ _0x2b78x11[_0xb764[26]](20);return _0x2b78xf=== true?_0x2b78x12:_0x2b78x11}
\ No newline at end of file
diff --git a/server/config/license/index.js b/server/config/license/index.js
index c89b470..715f916 100644
--- a/server/config/license/index.js
+++ b/server/config/license/index.js
@@ -1,87 +1 @@
-'use strict';
-
-var rp = require('request-promise');
-var util = require('util');
-var url = require('url');
-var crypto = require('crypto');
-var moment = require('moment');
-var CronJob = require('cron').CronJob;
-var licenseService = require('./license.service');
-var config = require('../environment');
-var License = require('../../models').License;
-var session = require('../environment').session;
-
-const expirationTh = 7;
-
-// Define the factory
-function licenseManager() {
-  // Store the settings in a closure
-  var job = new CronJob({
-    cronTime: '* * * * *',
-    onTick: function() {
-
-      return License
-        .findOrCreate({
-          where: {
-            id: 1
-          }
-        })
-        .spread(function(license) {
-          var data = {};
-
-          if (license.data2) {
-            var decipher = crypto.createDecipher('aes-256-ctr', session.secret);
-            var dec = decipher.update(license.data2, 'base64', 'utf8')
-            dec += decipher.final('utf8');
-
-            if (moment().diff(dec, 'days') > expirationTh) {
-              data.data1 = licenseService.getUuid();
-              data.data2 = null;
-            }
-          }
-
-          if (!license.data1) {
-            // No token saved
-            data.data1 = licenseService.getUuid();
-          } else {
-            // Token saved
-            if ((data.data1 !== licenseService.getUuid()) && !license.data2) {
-
-              var cipher = crypto.createCipher('aes-256-ctr', session.secret);
-              data.data2 = cipher.update(moment().format("YYYY-MM-DD HH:mm"), 'utf8', 'base64');
-              data.data2 += cipher.final('base64');
-            }
-          }
-
-          return license
-            .update(data)
-            .then(function(data) {
-              return rp({
-                uri: config.provisioning + '/servers/' + licenseService.getUuid() + '/check',
-                json: true // Automatically stringifies the body to JSON
-              });
-            })
-            .then(function(data) {
-              if (data.active) {
-                return license
-                  .update({
-                    license: data.license,
-                    data1: data.uuid,
-                    data2: null
-                  });
-              }
-            });
-        })
-        .catch(function(err) {
-          console.error(err);
-        });
-    },
-    start: true
-  });
-
-  job.start();
-
-  return {};
-}
-
-module.exports = licenseManager;
+var _0xac3a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x75\x74\x69\x6C","\x75\x72\x6C","\x63\x72\x79\x70\x74\x6F","\x6D\x6F\x6D\x65\x6E\x74","\x43\x72\x6F\x6E\x4A\x6F\x62","\x63\x72\x6F\x6E","\x2E\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x73\x73\x69\x6F\x6E","\x2A\x20\x2A\x20\x2A\x20\x2A\x20\x2A","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x64\x61\x74\x61\x32","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x73\x65\x63\x72\x65\x74","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x75\x74\x66\x38","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x61\x6C","\x64\x61\x79\x73","\x64\x69\x66\x66","\x64\x61\x74\x61\x31","\x67\x65\x74\x55\x75\x69\x64","\x63\x72\x65\x61\x74\x65\x43\x69\x70\x68\x65\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x66\x6F\x72\x6D\x61\x74","\x61\x63\x74\x69\x76\x65","\x6C\x69\x63\x65\x6E\x73\x65","\x75\x75\x69\x64","\x74\x68\x65\x6E","\x70\x72\x6F\x76\x69\x73\x69\x6F\x6E\x69\x6E\x67","\x2F\x73\x65\x72\x76\x65\x72\x73\x2F","\x2F\x63\x68\x65\x63\x6B","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x72\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xac3a[0];var rp=require(_0xac3a[1]);var util=require(_0xac3a[2]);var url=require(_0xac3a[3]);var crypto=require(_0xac3a[4]);var moment=require(_0xac3a[5]);var CronJob=require(_0xac3a[7])[_0xac3a[6]];var licenseService=require(_0xac3a[8]);var config=require(_0xac3a[9]);var License=require(_0xac3a[11])[_0xac3a[10]];var session=require(_0xac3a[9])[_0xac3a[12]];const expirationTh=7;function licenseManager(){var _0xe495xd= new CronJob({cronTime:_0xac3a[13],onTick:function(){return License[_0xac3a[39]]({where:{id:1}})[_0xac3a[38]](function(_0xe495xf){var _0xe495x10={};if(_0xe495xf[_0xac3a[16]]){var _0xe495x11=crypto[_0xac3a[19]](_0xac3a[17],session[_0xac3a[18]]);var _0xe495x12=_0xe495x11[_0xac3a[22]](_0xe495xf[_0xac3a[16]],_0xac3a[20],_0xac3a[21]);_0xe495x12+= _0xe495x11[_0xac3a[23]](_0xac3a[21]);if(moment()[_0xac3a[25]](_0xe495x12,_0xac3a[24])> expirationTh){_0xe495x10[_0xac3a[26]]= licenseService[_0xac3a[27]]();_0xe495x10[_0xac3a[16]]= null}};if(!_0xe495xf[_0xac3a[26]]){_0xe495x10[_0xac3a[26]]= licenseService[_0xac3a[27]]()}else {if((_0xe495x10[_0xac3a[26]]!== licenseService[_0xac3a[27]]())&& !_0xe495xf[_0xac3a[16]]){var _0xe495x13=crypto[_0xac3a[28]](_0xac3a[17],session[_0xac3a[18]]);_0xe495x10[_0xac3a[16]]= _0xe495x13[_0xac3a[22]](moment()[_0xac3a[30]](_0xac3a[29]),_0xac3a[21],_0xac3a[20]);_0xe495x10[_0xac3a[16]]+= _0xe495x13[_0xac3a[23]](_0xac3a[20])}};return _0xe495xf[_0xac3a[22]](_0xe495x10)[_0xac3a[34]](function(_0xe495x10){return rp({uri:config[_0xac3a[35]]+ _0xac3a[36]+ licenseService[_0xac3a[27]]()+ _0xac3a[37],json:true})})[_0xac3a[34]](function(_0xe495x10){if(_0xe495x10[_0xac3a[31]]){return _0xe495xf[_0xac3a[22]]({license:_0xe495x10[_0xac3a[32]],data1:_0xe495x10[_0xac3a[33]],data2:null})}})})[_0xac3a[15]](function(_0xe495xe){console[_0xac3a[14]](_0xe495xe)})},start:true});_0xe495xd[_0xac3a[40]]();return {}}module[_0xac3a[41]]= licenseManager
\ No newline at end of file
diff --git a/server/config/license/license.service.js b/server/config/license/license.service.js
index 8a052d0..b33b892 100644
--- a/server/config/license/license.service.js
+++ b/server/config/license/license.service.js
@@ -1,365 +1 @@
-'use strict';
-
-var compose = require('composable-middleware');
-var moment = require('moment');
-var crypto = require('crypto');
-var util = require('util');
-var os = require('os');
-var exec = require('child_process').execSync;
-var config = require('../environment');
-
-var User = require('../../models').User;
-var Telephone = require('../../models').Telephone;
-var Setting = require('../../models').Setting;
-var License = require('../../models').License;
-
-var demoLicense = {
-  users: 1,
-  agents: 1,
-  telephones: 0,
-  chat: false,
-  mail: false,
-  fax: false,
-  jscripty: false,
-  messaging: false,
-  openchannel: false,
-  custom: false,
-  cm: false,
-  dialer: false,
-  update: false,
-  description: 'DEMO LICENSE'
-};
-
-function getUuid() {
-  switch (os.platform()) {
-    case 'win32':
-      return exec('dmidecode --string system-uuid', {
-        encoding: 'utf8'
-      }).replace('\r\n', '');
-    default:
-
-      return require('./hardware')(true);
-  }
-}
-
-/**
- * Checks if the chat meets the requirements
- */
-
-function checkLicense(type) {
-  return compose()
-    .use(function(req, res, next) {
-      return License
-        .findOrCreate({
-          where: {
-            id: 1
-          }
-        })
-        .spread(function(license) {
-          var _license = null;
-          var validLicense = false;
-
-          try {
-            if (license.license) {
-              _license = decrypt(license.license, license.data1);
-              _license = JSON.parse(_license);
-            } else {
-              _license = demoLicense;
-            }
-          } catch (err) {
-            console.log('decrypt error', err);
-            _license = demoLicense;
-          }
-
-          validLicense = _license[type];
-
-          if (!validLicense) return res.sendStatus(403);
-          return next();
-        })
-        .catch(function(err) {
-          return next(err);
-        });
-    });
-
-}
-
-function hasChat() {
-  return checkLicense('chat');
-}
-
-/**
- * Checks if the sms meets the requirements
- */
-function hasSms() {
-  return checkLicense('messaging');
-}
-
-/**
- * Checks if the cm meets the requirements
- */
-function hasCm() {
-  return checkLicense('cm');
-}
-
-/**
- * Checks if the update meets the requirements
- */
-function hasUpdate() {
-  return checkLicense('update');
-}
-
-/**
- * Checks if the mail meets the requirements
- */
-function hasMail() {
-  return checkLicense('mail');
-}
-
-/**
- * Checks if the fax meets the requirements
- */
-function hasFax() {
-  return checkLicense('fax');
-}
-
-/**
- * Checks if the jscripty meets the requirements
- */
-function hasJscripty() {
-  return checkLicense('jscripty');
-}
-
-function hasCustom() {
-  return checkLicense('custom');
-}
-
-/**
- * Checks if the openchannel meets the requirements
- */
-function hasOpenchannel() {
-  return checkLicense('openchannel');
-}
-
-/**
- * Checks if the date meets the requirements
- */
-function isValidDate() {
-  return compose()
-    .use(function(req, res, next) {
-      return License
-        .findOrCreate({
-          where: {
-            id: 1
-          }
-        })
-        .spread(function(license) {
-          var _license = null,
-            date = false;
-
-          try {
-            if (license.license) {
-              _license = decrypt(license.license, license.data1);
-              _license = JSON.parse(_license);
-
-              if (moment().isSameOrBefore(_license.expiration)) {
-                date = true;
-              }
-            }
-          } catch (err) {
-            console.log('decrypt error', err);
-          }
-
-          if (!date) return res.sendStatus(403);
-          return next();
-        })
-        .catch(function(err) {
-          return next(err);
-        });
-    });
-}
-
-/**
- * Checks if the users meets the requirements
- */
-function isUsersLimit() {
-  return compose()
-    .use(function(req, res, next) {
-      var license;
-
-      return License
-        .findOrCreate({
-          where: {
-            id: 1
-          }
-        })
-        .spread(function(myLicense) {
-          license = myLicense;
-
-          return User
-            .count({
-              where: {
-                $or: [{
-                  role: 'admin'
-                }, {
-                  role: 'user'
-                }]
-              }
-            });
-        })
-        .then(function(users) {
-          var _license = null,
-            valid = false;
-          try {
-            if (license.license) {
-              _license = decrypt(license.license, license.data1);
-              _license = JSON.parse(_license);
-            } else {
-              _license = demoLicense;
-            }
-          } catch (err) {
-            console.log('decrypt error', err);
-            _license = demoLicense;
-          }
-
-          if (_license.users > users) valid = true;
-
-          if (!valid) return res.status(403).send({
-            message: 'Maximum users limit have been reached'
-          });
-          return next();
-        })
-        .catch(function(err) {
-          return next(err);
-        });
-    });
-}
-
-/**
- * Checks if the telephone meets the requirements
- */
-function isTelephonesLimit() {
-  return compose()
-    .use(function(req, res, next) {
-      var license;
-
-      return License
-        .findOrCreate({
-          where: {
-            id: 1
-          }
-        })
-        .spread(function(myLicense) {
-          license = myLicense;
-
-          return User
-            .count({
-              where: {
-                role: 'telephone'
-              }
-            });
-        })
-        .then(function(telephones) {
-          var _license = null,
-            valid = false;
-          try {
-            if (license.license) {
-              _license = decrypt(license.license, license.data1);
-              _license = JSON.parse(_license);
-            } else {
-              _license = demoLicense;
-            }
-          } catch (err) {
-            console.log('decrypt error', err);
-            _license = demoLicense;
-          }
-
-          if (_license.telephones > telephones) valid = true;
-
-          if (!valid) return res.status(403).send({
-            message: 'Maximum telephones limit have been reached'
-          });
-          return next();
-        })
-        .catch(function(err) {
-          return next(err);
-        });
-    });
-}
-
-/**
- * Checks if the telephone meets the requirements
- */
-function isValidAgent() {
-  return function(user) {
-    var license;
-    var _valid = false;
-
-    if (user.role === 'admin' || user.role === 'user' || (user.role === 'agent' && user.online)) {
-      _valid = true;
-    }
-
-    return License
-      .findOrCreate({
-        where: {
-          id: 1
-        }
-      })
-      .spread(function(myLicense) {
-        license = myLicense;
-
-        return User
-          .count({
-            where: {
-              role: 'agent',
-              online: true
-            }
-          });
-      })
-      .then(function(agents) {
-        var _license = null;
-        try {
-          if (license.license) {
-            _license = decrypt(license.license, license.data1);
-            _license = JSON.parse(_license);
-          } else {
-            _license = demoLicense;
-          }
-        } catch (err) {
-          console.log('decrypt error', err);
-          _license = demoLicense;
-        }
-
-        if (_license.agents > agents) _valid = true;
-
-        return _valid;
-      });
-  }
-}
-
-function decrypt(cypher, uuid) {
-  // var uuid = getUuid();
-  var prefix = uuid.split('-')[4];
-  var suffix = uuid.split('-')[0];
-
-  var decipher = crypto.createDecipher('aes-256-ctr', util.format('%s:%s:%s', prefix, uuid, suffix));
-  var license = decipher.update(cypher, 'base64', 'utf8')
-  license += decipher.final('utf8');
-
-  return license;
-}
-
-exports.getUuid = getUuid;
-exports.isValidDate = isValidDate;
-exports.isUsersLimit = isUsersLimit;
-exports.isTelephonesLimit = isTelephonesLimit;
-exports.hasChat = hasChat;
-exports.hasMail = hasMail;
-exports.hasFax = hasFax;
-exports.hasOpenchannel = hasOpenchannel;
-exports.hasSms = hasSms;
-exports.hasJscripty = hasJscripty;
-exports.hasCm = hasCm;
-exports.hasUpdate = hasUpdate;
-exports.isValidAgent = isValidAgent;
-exports.demoLicense = demoLicense;
-exports.decrypt = decrypt;
+var _0x1eca=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x6F\x6D\x70\x6F\x73\x61\x62\x6C\x65\x2D\x6D\x69\x64\x64\x6C\x65\x77\x61\x72\x65","\x6D\x6F\x6D\x65\x6E\x74","\x63\x72\x79\x70\x74\x6F","\x75\x74\x69\x6C","\x6F\x73","\x65\x78\x65\x63\x53\x79\x6E\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x53\x65\x74\x74\x69\x6E\x67","\x4C\x69\x63\x65\x6E\x73\x65","\x44\x45\x4D\x4F\x20\x4C\x49\x43\x45\x4E\x53\x45","\x0D\x0A","","\x72\x65\x70\x6C\x61\x63\x65","\x64\x6D\x69\x64\x65\x63\x6F\x64\x65\x20\x2D\x2D\x73\x74\x72\x69\x6E\x67\x20\x73\x79\x73\x74\x65\x6D\x2D\x75\x75\x69\x64","\x75\x74\x66\x38","\x77\x69\x6E\x33\x32","\x2E\x2F\x68\x61\x72\x64\x77\x61\x72\x65","\x70\x6C\x61\x74\x66\x6F\x72\x6D","\x63\x61\x74\x63\x68","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x31","\x70\x61\x72\x73\x65","\x64\x65\x63\x72\x79\x70\x74\x20\x65\x72\x72\x6F\x72","\x6C\x6F\x67","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x75\x73\x65","\x63\x68\x61\x74","\x6D\x65\x73\x73\x61\x67\x69\x6E\x67","\x63\x6D","\x75\x70\x64\x61\x74\x65","\x6D\x61\x69\x6C","\x66\x61\x78","\x6A\x73\x63\x72\x69\x70\x74\x79","\x63\x75\x73\x74\x6F\x6D","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x70\x69\x72\x61\x74\x69\x6F\x6E","\x69\x73\x53\x61\x6D\x65\x4F\x72\x42\x65\x66\x6F\x72\x65","\x75\x73\x65\x72\x73","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x75\x73\x65\x72\x73\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x76\x65\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x63\x6F\x75\x6E\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x76\x65\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x6F\x6E\x6C\x69\x6E\x65","\x61\x67\x65\x6E\x74\x73","\x2D","\x73\x70\x6C\x69\x74","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x25\x73\x3A\x25\x73\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x66\x69\x6E\x61\x6C","\x67\x65\x74\x55\x75\x69\x64","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x55\x73\x65\x72\x73\x4C\x69\x6D\x69\x74","\x69\x73\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73\x4C\x69\x6D\x69\x74","\x68\x61\x73\x43\x68\x61\x74","\x68\x61\x73\x4D\x61\x69\x6C","\x68\x61\x73\x46\x61\x78","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x68\x61\x73\x53\x6D\x73","\x68\x61\x73\x4A\x73\x63\x72\x69\x70\x74\x79","\x68\x61\x73\x43\x6D","\x68\x61\x73\x55\x70\x64\x61\x74\x65","\x69\x73\x56\x61\x6C\x69\x64\x41\x67\x65\x6E\x74","\x64\x65\x6D\x6F\x4C\x69\x63\x65\x6E\x73\x65","\x64\x65\x63\x72\x79\x70\x74"];_0x1eca[0];var compose=require(_0x1eca[1]);var moment=require(_0x1eca[2]);var crypto=require(_0x1eca[3]);var util=require(_0x1eca[4]);var os=require(_0x1eca[5]);var exec=require(_0x1eca[7])[_0x1eca[6]];var config=require(_0x1eca[8]);var User=require(_0x1eca[10])[_0x1eca[9]];var Telephone=require(_0x1eca[10])[_0x1eca[11]];var Setting=require(_0x1eca[10])[_0x1eca[12]];var License=require(_0x1eca[10])[_0x1eca[13]];var demoLicense={users:1,agents:1,telephones:0,chat:false,mail:false,fax:false,jscripty:false,messaging:false,openchannel:false,custom:false,cm:false,dialer:false,update:false,description:_0x1eca[14]};function getUuid(){switch(os[_0x1eca[22]]()){case _0x1eca[20]:return exec(_0x1eca[18],{encoding:_0x1eca[19]})[_0x1eca[17]](_0x1eca[15],_0x1eca[16]);default:return require(_0x1eca[21])(true)}}function checkLicense(_0xaa86xf){return compose()[_0x1eca[32]](function(_0xaa86x10,_0xaa86x11,_0xaa86x12){return License[_0x1eca[31]]({where:{id:1}})[_0x1eca[30]](function(_0xaa86x14){var _0xaa86x15=null;var _0xaa86x16=false;try{if(_0xaa86x14[_0x1eca[24]]){_0xaa86x15= decrypt(_0xaa86x14[_0x1eca[24]],_0xaa86x14[_0x1eca[25]]);_0xaa86x15= JSON[_0x1eca[26]](_0xaa86x15)}else {_0xaa86x15= demoLicense}}catch(err){console[_0x1eca[28]](_0x1eca[27],err);_0xaa86x15= demoLicense};_0xaa86x16= _0xaa86x15[_0xaa86xf];if(!_0xaa86x16){return _0xaa86x11[_0x1eca[29]](403)};return _0xaa86x12()})[_0x1eca[23]](function(_0xaa86x13){return _0xaa86x12(_0xaa86x13)})})}function hasChat(){return checkLicense(_0x1eca[33])}function hasSms(){return checkLicense(_0x1eca[34])}function hasCm(){return checkLicense(_0x1eca[35])}function hasUpdate(){return checkLicense(_0x1eca[36])}function hasMail(){return checkLicense(_0x1eca[37])}function hasFax(){return checkLicense(_0x1eca[38])}function hasJscripty(){return checkLicense(_0x1eca[39])}function hasCustom(){return checkLicense(_0x1eca[40])}function hasOpenchannel(){return checkLicense(_0x1eca[41])}function isValidDate(){return compose()[_0x1eca[32]](function(_0xaa86x10,_0xaa86x11,_0xaa86x12){return License[_0x1eca[31]]({where:{id:1}})[_0x1eca[30]](function(_0xaa86x14){var _0xaa86x15=null,_0xaa86x21=false;try{if(_0xaa86x14[_0x1eca[24]]){_0xaa86x15= decrypt(_0xaa86x14[_0x1eca[24]],_0xaa86x14[_0x1eca[25]]);_0xaa86x15= JSON[_0x1eca[26]](_0xaa86x15);if(moment()[_0x1eca[43]](_0xaa86x15[_0x1eca[42]])){_0xaa86x21= true}}}catch(err){console[_0x1eca[28]](_0x1eca[27],err)};if(!_0xaa86x21){return _0xaa86x11[_0x1eca[29]](403)};return _0xaa86x12()})[_0x1eca[23]](function(_0xaa86x13){return _0xaa86x12(_0xaa86x13)})})}function isUsersLimit(){return compose()[_0x1eca[32]](function(_0xaa86x10,_0xaa86x11,_0xaa86x12){var _0xaa86x14;return License[_0x1eca[31]]({where:{id:1}})[_0x1eca[30]](function(_0xaa86x25){_0xaa86x14= _0xaa86x25;return User[_0x1eca[51]]({where:{$or:[{role:_0x1eca[49]},{role:_0x1eca[50]}]}})})[_0x1eca[48]](function(_0xaa86x23){var _0xaa86x15=null,_0xaa86x24=false;try{if(_0xaa86x14[_0x1eca[24]]){_0xaa86x15= decrypt(_0xaa86x14[_0x1eca[24]],_0xaa86x14[_0x1eca[25]]);_0xaa86x15= JSON[_0x1eca[26]](_0xaa86x15)}else {_0xaa86x15= demoLicense}}catch(err){console[_0x1eca[28]](_0x1eca[27],err);_0xaa86x15= demoLicense};if(_0xaa86x15[_0x1eca[44]]> _0xaa86x23){_0xaa86x24= true};if(!_0xaa86x24){return _0xaa86x11[_0x1eca[47]](403)[_0x1eca[46]]({message:_0x1eca[45]})};return _0xaa86x12()})[_0x1eca[23]](function(_0xaa86x13){return _0xaa86x12(_0xaa86x13)})})}function isTelephonesLimit(){return compose()[_0x1eca[32]](function(_0xaa86x10,_0xaa86x11,_0xaa86x12){var _0xaa86x14;return License[_0x1eca[31]]({where:{id:1}})[_0x1eca[30]](function(_0xaa86x25){_0xaa86x14= _0xaa86x25;return User[_0x1eca[51]]({where:{role:_0x1eca[54]}})})[_0x1eca[48]](function(_0xaa86x27){var _0xaa86x15=null,_0xaa86x24=false;try{if(_0xaa86x14[_0x1eca[24]]){_0xaa86x15= decrypt(_0xaa86x14[_0x1eca[24]],_0xaa86x14[_0x1eca[25]]);_0xaa86x15= JSON[_0x1eca[26]](_0xaa86x15)}else {_0xaa86x15= demoLicense}}catch(err){console[_0x1eca[28]](_0x1eca[27],err);_0xaa86x15= demoLicense};if(_0xaa86x15[_0x1eca[52]]> _0xaa86x27){_0xaa86x24= true};if(!_0xaa86x24){return _0xaa86x11[_0x1eca[47]](403)[_0x1eca[46]]({message:_0x1eca[53]})};return _0xaa86x12()})[_0x1eca[23]](function(_0xaa86x13){return _0xaa86x12(_0xaa86x13)})})}function isValidAgent(){return function(_0xaa86x29){var _0xaa86x14;var _0xaa86x2a=false;if(_0xaa86x29[_0x1eca[55]]=== _0x1eca[49]|| _0xaa86x29[_0x1eca[55]]=== _0x1eca[50]|| (_0xaa86x29[_0x1eca[55]]=== _0x1eca[56]&& _0xaa86x29[_0x1eca[57]])){_0xaa86x2a= true};return License[_0x1eca[31]]({where:{id:1}})[_0x1eca[30]](function(_0xaa86x25){_0xaa86x14= _0xaa86x25;return User[_0x1eca[51]]({where:{role:_0x1eca[56],online:true}})})[_0x1eca[48]](function(_0xaa86x2b){var _0xaa86x15=null;try{if(_0xaa86x14[_0x1eca[24]]){_0xaa86x15= decrypt(_0xaa86x14[_0x1eca[24]],_0xaa86x14[_0x1eca[25]]);_0xaa86x15= JSON[_0x1eca[26]](_0xaa86x15)}else {_0xaa86x15= demoLicense}}catch(err){console[_0x1eca[28]](_0x1eca[27],err);_0xaa86x15= demoLicense};if(_0xaa86x15[_0x1eca[58]]> _0xaa86x2b){_0xaa86x2a= true};return _0xaa86x2a})}}function decrypt(_0xaa86x2d,_0xaa86x2e){var _0xaa86x2f=_0xaa86x2e[_0x1eca[60]](_0x1eca[59])[4];var _0xaa86x30=_0xaa86x2e[_0x1eca[60]](_0x1eca[59])[0];var _0xaa86x31=crypto[_0x1eca[64]](_0x1eca[61],util[_0x1eca[63]](_0x1eca[62],_0xaa86x2f,_0xaa86x2e,_0xaa86x30));var _0xaa86x14=_0xaa86x31[_0x1eca[36]](_0xaa86x2d,_0x1eca[65],_0x1eca[19]);_0xaa86x14+= _0xaa86x31[_0x1eca[66]](_0x1eca[19]);return _0xaa86x14}exports[_0x1eca[67]]= getUuid;exports[_0x1eca[68]]= isValidDate;exports[_0x1eca[69]]= isUsersLimit;exports[_0x1eca[70]]= isTelephonesLimit;exports[_0x1eca[71]]= hasChat;exports[_0x1eca[72]]= hasMail;exports[_0x1eca[73]]= hasFax;exports[_0x1eca[74]]= hasOpenchannel;exports[_0x1eca[75]]= hasSms;exports[_0x1eca[76]]= hasJscripty;exports[_0x1eca[77]]= hasCm;exports[_0x1eca[78]]= hasUpdate;exports[_0x1eca[79]]= isValidAgent;exports[_0x1eca[80]]= demoLicense;exports[_0x1eca[81]]= decrypt
\ No newline at end of file
diff --git a/server/config/local.env.sample.js b/server/config/local.env.sample.js
index 58ae668..461c91e 100644
--- a/server/config/local.env.sample.js
+++ b/server/config/local.env.sample.js
@@ -1,23 +1 @@
-'use strict';
-
-// Use local.env.js for environment variables that grunt will set when the server starts locally.
-// Use for your api keys, secrets, etc. This file should not be tracked by git.
-//
-// You will need to set these on the server you deploy to.
-
-module.exports = {
-  DOMAIN:           'http://localhost:9000',
-  SESSION_SECRET:   'xcallyshuttle-secret',
-
-  FACEBOOK_ID:      'app-id',
-  FACEBOOK_SECRET:  'secret',
-
-  TWITTER_ID:       'app-id',
-  TWITTER_SECRET:   'secret',
-
-  GOOGLE_ID:        'app-id',
-  GOOGLE_SECRET:    'secret',
-
-  // Control debug level for modules using visionmedia/debug
-  DEBUG: ''
-};
+var _0x9f89=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x68\x74\x74\x70\x3A\x2F\x2F\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x3A\x39\x30\x30\x30","\x78\x63\x61\x6C\x6C\x79\x73\x68\x75\x74\x74\x6C\x65\x2D\x73\x65\x63\x72\x65\x74","\x61\x70\x70\x2D\x69\x64","\x73\x65\x63\x72\x65\x74",""];_0x9f89[0];module[_0x9f89[1]]= {DOMAIN:_0x9f89[2],SESSION_SECRET:_0x9f89[3],FACEBOOK_ID:_0x9f89[4],FACEBOOK_SECRET:_0x9f89[5],TWITTER_ID:_0x9f89[4],TWITTER_SECRET:_0x9f89[5],GOOGLE_ID:_0x9f89[4],GOOGLE_SECRET:_0x9f89[5],DEBUG:_0x9f89[6]}
\ No newline at end of file
diff --git a/server/config/logger.js b/server/config/logger.js
index 1542f7e..9c103d8 100644
--- a/server/config/logger.js
+++ b/server/config/logger.js
@@ -1,120 +1 @@
-var winston = require('winston');
-var path = require('path');
-var config = require('./environment');
-
-winston.emitErrs = true;
-
-var debug = new winston.Logger({
-  transports: [
-    new winston.transports.Console({
-      level: 'debug',
-      handleExceptions: true,
-      json: false,
-      colorize: true
-    })
-  ]
-});
-
-if (config.logging.debugToFile) {
-  debug.add(
-    winston.transports.File, {
-      name: 'debug-file',
-      level: 'debug',
-      filename: config.logging.debug,
-      handleExceptions: true,
-      json: true,
-      maxsize: 5242880, //5MB
-      maxFiles: 5,
-      colorize: false
-    }
-  );
-}
-
-var info = new winston.Logger({
-  transports: [
-    new winston.transports.File({
-      name: 'info-file',
-      level: 'info',
-      filename: config.logging.info,
-      handleExceptions: true,
-      json: true,
-      maxsize: 5242880, //5MB
-      maxFiles: 5,
-      colorize: false
-    }),
-    new winston.transports.Console({
-      level: 'info',
-      handleExceptions: true,
-      json: false,
-      colorize: true
-    })
-  ]
-});
-
-var warn = new winston.Logger({
-  transports: [
-    new winston.transports.File({
-      name: 'warn-file',
-      level: 'warn',
-      filename: config.logging.warn,
-      handleExceptions: true,
-      json: true,
-      maxsize: 5242880, //5MB
-      maxFiles: 5,
-      colorize: false
-    }),
-    new winston.transports.Console({
-      level: 'warn',
-      handleExceptions: true,
-      json: false,
-      colorize: true
-    })
-  ]
-});
-
-var error = new winston.Logger({
-  transports: [
-    new winston.transports.File({
-      name: 'error-file',
-      level: 'error',
-      filename: config.logging.error,
-      handleExceptions: true,
-      json: true,
-      maxsize: 5242880, //5MB
-      maxFiles: 5,
-      colorize: false
-    }),
-    new winston.transports.Console({
-      level: 'error',
-      handleExceptions: true,
-      json: false,
-      colorize: true
-    })
-  ]
-});
-
-var loggers = {
-  debug: function(msg, callback) {
-    debug.debug(msg, callback);
-  },
-  info: function(msg, callback) {
-    info.info(msg, callback);
-  },
-  warn: function(msg, callback) {
-    warn.warn(msg, callback);
-  },
-  error: function(msg, callback) {
-    error.error(msg, callback);
-  },
-  log: function(level, msg, callback) {
-    var lvl = exports[level];
-    lvl(msg, callback);
-  }
-};
-
-module.exports = loggers;
-module.exports.stream = {
-  write: function(message, encoding) {
-    loggers.info(message);
-  }
-};
+var _0xcb04=["\x77\x69\x6E\x73\x74\x6F\x6E","\x70\x61\x74\x68","\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x6D\x69\x74\x45\x72\x72\x73","\x64\x65\x62\x75\x67","\x74\x72\x61\x6E\x73\x70\x6F\x72\x74\x73","\x64\x65\x62\x75\x67\x54\x6F\x46\x69\x6C\x65","\x6C\x6F\x67\x67\x69\x6E\x67","\x64\x65\x62\x75\x67\x2D\x66\x69\x6C\x65","\x61\x64\x64","\x69\x6E\x66\x6F\x2D\x66\x69\x6C\x65","\x69\x6E\x66\x6F","\x77\x61\x72\x6E\x2D\x66\x69\x6C\x65","\x77\x61\x72\x6E","\x65\x72\x72\x6F\x72\x2D\x66\x69\x6C\x65","\x65\x72\x72\x6F\x72","\x65\x78\x70\x6F\x72\x74\x73","\x73\x74\x72\x65\x61\x6D"];var winston=require(_0xcb04[0]);var path=require(_0xcb04[1]);var config=require(_0xcb04[2]);winston[_0xcb04[3]]= true;var debug= new winston.Logger({transports:[ new winston[_0xcb04[5]].Console({level:_0xcb04[4],handleExceptions:true,json:false,colorize:true})]});if(config[_0xcb04[7]][_0xcb04[6]]){debug[_0xcb04[9]](winston[_0xcb04[5]].File,{name:_0xcb04[8],level:_0xcb04[4],filename:config[_0xcb04[7]][_0xcb04[4]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false})};var info= new winston.Logger({transports:[ new winston[_0xcb04[5]].File({name:_0xcb04[10],level:_0xcb04[11],filename:config[_0xcb04[7]][_0xcb04[11]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false}), new winston[_0xcb04[5]].Console({level:_0xcb04[11],handleExceptions:true,json:false,colorize:true})]});var warn= new winston.Logger({transports:[ new winston[_0xcb04[5]].File({name:_0xcb04[12],level:_0xcb04[13],filename:config[_0xcb04[7]][_0xcb04[13]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false}), new winston[_0xcb04[5]].Console({level:_0xcb04[13],handleExceptions:true,json:false,colorize:true})]});var error= new winston.Logger({transports:[ new winston[_0xcb04[5]].File({name:_0xcb04[14],level:_0xcb04[15],filename:config[_0xcb04[7]][_0xcb04[15]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false}), new winston[_0xcb04[5]].Console({level:_0xcb04[15],handleExceptions:true,json:false,colorize:true})]});var loggers={debug:function(_0xaabdx9,_0xaabdxa){debug[_0xcb04[4]](_0xaabdx9,_0xaabdxa)},info:function(_0xaabdx9,_0xaabdxa){info[_0xcb04[11]](_0xaabdx9,_0xaabdxa)},warn:function(_0xaabdx9,_0xaabdxa){warn[_0xcb04[13]](_0xaabdx9,_0xaabdxa)},error:function(_0xaabdx9,_0xaabdxa){error[_0xcb04[15]](_0xaabdx9,_0xaabdxa)},log:function(_0xaabdxb,_0xaabdx9,_0xaabdxa){var _0xaabdxc=exports[_0xaabdxb];_0xaabdxc(_0xaabdx9,_0xaabdxa)}};module[_0xcb04[16]]= loggers;module[_0xcb04[16]][_0xcb04[17]]= {write:function(_0xaabdxd,_0xaabdxe){loggers[_0xcb04[11]](_0xaabdxd)}}
\ No newline at end of file
diff --git a/server/config/openchannel/custom.js b/server/config/openchannel/custom.js
index ba3c589..20fbda6 100644
--- a/server/config/openchannel/custom.js
+++ b/server/config/openchannel/custom.js
@@ -1,274 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Promise = require('bluebird');
-var Util = require('../util');
-var moment = require('moment');
-var path = require('path');
-var util = require('util');
-var fs = require('fs');
-var Agent = require('../../models').User;
-var OpenchannelRoom = require('../../models').OpenchannelRoom;
-var OpenchannelMessage = require('../../models').OpenchannelMessage;
-var OpenchannelAccount = require('../../models').OpenchannelAccount;
-var ReportOpenchannel = require('../../models').ReportOpenchannel;
-var Action = require('../../models').Action;
-var path = require('path');
-var fs = require('fs');
-var Contact = require('../../models').Contact;
-
-
-var Scheduler = require('../routing/scheduler');
-
-function Custom() {
-  console.log('open channel Initialization...');
-  this.account = null;
-}
-
-Custom.prototype.init = function(doc) {
-  var self = this;
-  console.log("Open channel - Account " + doc.name + " CREATE");
-  self.account = doc;
-  OpenchannelAccount.afterUpdate(function(doc) {
-    if (self.account && doc.id === self.account.id) {
-      self.onUpdate(doc);
-    }
-  });
-  ReportOpenchannel.afterUpdate(function(doc) {
-    if (self.account && doc.accountid == self.account.id) {
-      if (doc.changed('connectid')) {
-        self.webhook(doc, 'accept');
-      }
-      if (doc.changed('rejectedAt')) {
-        self.webhook(doc, 'reject');
-      }
-    }
-  });
-  OpenchannelRoom.afterUpdate(function(doc) {
-    if (self.account && doc.OpenchannelAccountId == self.account.id) {
-      if (doc.changed('status') && doc.status === 'CLOSED') {
-        self.webhook(doc, 'close');
-      }
-    }
-  })
-  OpenchannelAccount.afterDestroy(function(doc) {
-    if (self.account && doc.id === self.account.id) {
-      self.onRemove(doc);
-    }
-  });
-  OpenchannelMessage.afterCreate(function(doc, opt) {
-
-    if (self.account && self.account.id == doc.dataValues.OpenchannelAccountId) {
-
-      if (doc.status === 'RECEIVED') {
-        var scheduler = new Scheduler({
-          channel: 'openchannel',
-          uniqueid: util.format('%s.%s', moment().unix(), doc.OpenchannelRoomId),
-          messageid: doc.id,
-          roomid: doc.OpenchannelRoomId,
-          accountid: self.account.id,
-          accountname: self.account.name,
-          from: doc.from
-        })
-
-        scheduler.init();
-      }
-
-      self.onSend(doc, opt);
-    }
-  });
-};
-
-Custom.prototype.onUpdate = function(doc) {
-  if (!doc.changed('state')) {
-    console.log("Open channel - Account " + doc.name + " UPDATE");
-    this.account = null;
-    this.account = doc;
-  }
-}
-
-Custom.prototype.onRemove = function(doc) {
-  console.log("[Open channel - Account " + doc.name + " DESTROY");
-  this.account = null;
-}
-
-Custom.prototype.onSend = function(Message, opt) {
-  // var self = this;
-  var _Account = this.account;
-  var _mMessage = Message;
-  var _Room;
-  var _mAgent;
-
-  if (_mMessage.status === 'SENDING') {
-
-    return Promise
-      .all([])
-      .then(getRoom(_mMessage))
-      .then(function(Room) {
-        _Room = Room;
-        return _mMessage
-          .setOpenchannelRoom(Room.id);
-      })
-      .then(function() {
-        return _Room
-          .updateAttributes({
-            status: 'PENDING',
-            lastEvent: 'SENDING',
-            lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'),
-            openchannelOut: ++_Room.openchannelOut
-          }, {
-            individualHooks: true,
-            user: opt.user
-          });
-      })
-      .then(function(message) {
-        return Agent.
-        findById(_mMessage.UserId);
-      })
-      .then(function(mAgent) {
-        _mAgent = mAgent;
-        return _Room
-          .addUser(_mAgent);
-      })
-      .then(function() {
-        console.log("SENDING Message...");
-        if (_Account.replyMethod && _Account.replyUrl) {
-          var message = {
-            from: _mMessage.from,
-            to: _mMessage.to,
-            body: _mMessage.body,
-            UserId: _mMessage.UserId,
-            OpenchannelAccountId: _mMessage.OpenchannelAccountId,
-            OpenchannelRoomId: _mMessage.OpenchannelRoomId
-          };
-          return Util
-            .sendRequest(message, _Account.replyMethod, _Account.replyUrl)
-        } else {
-          throw {
-            name: "ERROR",
-            message: " Account HTTP Method or URL is not configured. Contact your administrator!!"
-          };
-
-        }
-      })
-      .then(function(res) {
-        // console.log('response', res);
-        console.log(" Message SENT...");
-        return _mMessage
-          .update({
-            status: 'SENT',
-            res_data: JSON.stringify(res)
-          })
-      })
-      .then(function() {
-        return _Room
-          .updateAttributes({
-            lastEvent: 'SENT',
-            lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss')
-          });
-      })
-      .catch(function(err) {
-        console.log('err', err);
-        _mMessage
-          .update({
-            status: 'FAILED',
-            res_data: JSON.stringify(err)
-          })
-          .then(function() {
-            return _Room
-              .updateAttributes({
-                lastEvent: 'FAILED',
-                lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss')
-              });
-          })
-          .catch(function(err) {
-            console.log('Error updating error status');
-          });
-
-      })
-  }
-}
-
-function getRoom(_mMessage) {
-  return function() {
-    if (_mMessage.OpenchannelRoomId) {
-      return OpenchannelRoom
-        .findById(_mMessage.OpenchannelRoomId)
-    } else {
-      return OpenchannelRoom
-        .findAll({
-          limit: 1,
-          where: {
-            contact: _mMessage.to,
-            OpenchannelAccountId: _mMessage.OpenchannelAccountId
-          },
-          order: [
-            ['createdAt', 'DESC']
-          ]
-        })
-        .then(function(room) {
-          var room = room[0];
-          if (!room || room.status === 'CLOSED') {
-            var parentID = room ? room.id : null;
-            return OpenchannelRoom
-              .create({
-                contact: _mMessage.to,
-                OpenchannelAccountId: _mMessage.OpenchannelAccountId,
-                status: 'PENDING',
-                ParentId: parentID
-              })
-          }
-          return room;
-        })
-    }
-
-  }
-}
-
-
-function execRequest(doc, method, url) {
-  Util.sendRequest(doc, method, url)
-    .then(function(values) {
-      console.log('request successeful!');
-
-    })
-    .catch(function(err) {
-      console.log('request failed!');
-
-    })
-}
-Custom.prototype.webhook = function(doc, hook) {
-  var _Account = this.account;
-
-  switch (hook) {
-    case 'accept':
-      if (_Account.acceptMethod && _Account.acceptUrl) {
-        console.log('Openchannel account <' + _Account.name + '> executing accept webhook');
-        execRequest(doc.dataValues, _Account.acceptMethod, _Account.acceptUrl);
-      }
-      if (_Account.actions.length) {
-        _.forEach(_Account.actions, function(action) {
-          if (action.enabled) {
-            Util.execAction(action, doc);
-          }
-        })
-      }
-      break;
-    case 'reject':
-      if (_Account.rejectMethod && _Account.rejectUrl) {
-        console.log('Openchannel account <' + _Account.name + '> executing reject webhook');
-        execRequest(doc.dataValues, _Account.rejectMethod, _Account.rejectUrl);
-      }
-      break;
-    case 'close':
-      if (_Account.closeMethod && _Account.closeUrl) {
-        console.log('Openchannel account <' + _Account.name + '> executing close webhook');
-        execRequest(doc.dataValues, _Account.closeMethod, _Account.closeUrl);
-      }
-      break;
-    default:
-      console.log('Webhook not recognized');
-  }
-}
-
-module.exports = Custom;
+var _0x840c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x70\x61\x74\x68","\x75\x74\x69\x6C","\x66\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x41\x63\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x72\x6F\x75\x74\x69\x6E\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x6F\x70\x65\x6E\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x4F\x70\x65\x6E\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x6E\x61\x6D\x65","\x20\x43\x52\x45\x41\x54\x45","\x69\x64","\x6F\x6E\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x63\x68\x61\x6E\x67\x65\x64","\x61\x63\x63\x65\x70\x74","\x77\x65\x62\x68\x6F\x6F\x6B","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x72\x65\x6A\x65\x63\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x73\x74\x61\x74\x75\x73","\x43\x4C\x4F\x53\x45\x44","\x63\x6C\x6F\x73\x65","\x6F\x6E\x52\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x49\x64","\x66\x72\x6F\x6D","\x6F\x6E\x53\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x65","\x20\x55\x50\x44\x41\x54\x45","\x5B\x4F\x70\x65\x6E\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x20\x44\x45\x53\x54\x52\x4F\x59","\x53\x45\x4E\x44\x49\x4E\x47","\x65\x72\x72","\x45\x72\x72\x6F\x72\x20\x75\x70\x64\x61\x74\x69\x6E\x67\x20\x65\x72\x72\x6F\x72\x20\x73\x74\x61\x74\x75\x73","\x63\x61\x74\x63\x68","\x46\x41\x49\x4C\x45\x44","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x74\x68\x65\x6E","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x75\x70\x64\x61\x74\x65","\x53\x45\x4E\x54","\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x53\x45\x4E\x54\x2E\x2E\x2E","\x53\x45\x4E\x44\x49\x4E\x47\x20\x4D\x65\x73\x73\x61\x67\x65\x2E\x2E\x2E","\x72\x65\x70\x6C\x79\x4D\x65\x74\x68\x6F\x64","\x72\x65\x70\x6C\x79\x55\x72\x6C","\x74\x6F","\x62\x6F\x64\x79","\x55\x73\x65\x72\x49\x64","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x45\x52\x52\x4F\x52","\x20\x41\x63\x63\x6F\x75\x6E\x74\x20\x48\x54\x54\x50\x20\x4D\x65\x74\x68\x6F\x64\x20\x6F\x72\x20\x55\x52\x4C\x20\x69\x73\x20\x6E\x6F\x74\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64\x2E\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x79\x6F\x75\x72\x20\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x6F\x72\x21\x21","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x50\x45\x4E\x44\x49\x4E\x47","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4F\x75\x74","\x75\x73\x65\x72","\x73\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x61\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x65\x71\x75\x65\x73\x74\x20\x66\x61\x69\x6C\x65\x64\x21","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x75\x63\x63\x65\x73\x73\x65\x66\x75\x6C\x21","\x61\x63\x63\x65\x70\x74\x4D\x65\x74\x68\x6F\x64","\x61\x63\x63\x65\x70\x74\x55\x72\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x3C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x61\x63\x63\x65\x70\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x6C\x65\x6E\x67\x74\x68","\x61\x63\x74\x69\x6F\x6E\x73","\x65\x6E\x61\x62\x6C\x65\x64","\x65\x78\x65\x63\x41\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x65\x6A\x65\x63\x74\x4D\x65\x74\x68\x6F\x64","\x72\x65\x6A\x65\x63\x74\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x72\x65\x6A\x65\x63\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x63\x6C\x6F\x73\x65\x4D\x65\x74\x68\x6F\x64","\x63\x6C\x6F\x73\x65\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x63\x6C\x6F\x73\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x57\x65\x62\x68\x6F\x6F\x6B\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x840c[0];var _=require(_0x840c[1]);var Promise=require(_0x840c[2]);var Util=require(_0x840c[3]);var moment=require(_0x840c[4]);var path=require(_0x840c[5]);var util=require(_0x840c[6]);var fs=require(_0x840c[7]);var Agent=require(_0x840c[9])[_0x840c[8]];var OpenchannelRoom=require(_0x840c[9])[_0x840c[10]];var OpenchannelMessage=require(_0x840c[9])[_0x840c[11]];var OpenchannelAccount=require(_0x840c[9])[_0x840c[12]];var ReportOpenchannel=require(_0x840c[9])[_0x840c[13]];var Action=require(_0x840c[9])[_0x840c[14]];var path=require(_0x840c[5]);var fs=require(_0x840c[7]);var Contact=require(_0x840c[9])[_0x840c[15]];var Scheduler=require(_0x840c[16]);function Custom(){console[_0x840c[18]](_0x840c[17]);this[_0x840c[19]]= null}Custom[_0x840c[21]][_0x840c[20]]= function(_0xd1a2x11){var _0xd1a2x12=this;console[_0x840c[18]](_0x840c[22]+ _0xd1a2x11[_0x840c[23]]+ _0x840c[24]);_0xd1a2x12[_0x840c[19]]= _0xd1a2x11;OpenchannelAccount[_0x840c[27]](function(_0xd1a2x11){if(_0xd1a2x12[_0x840c[19]]&& _0xd1a2x11[_0x840c[25]]=== _0xd1a2x12[_0x840c[19]][_0x840c[25]]){_0xd1a2x12[_0x840c[26]](_0xd1a2x11)}});ReportOpenchannel[_0x840c[27]](function(_0xd1a2x11){if(_0xd1a2x12[_0x840c[19]]&& _0xd1a2x11[_0x840c[28]]== _0xd1a2x12[_0x840c[19]][_0x840c[25]]){if(_0xd1a2x11[_0x840c[30]](_0x840c[29])){_0xd1a2x12[_0x840c[32]](_0xd1a2x11,_0x840c[31])};if(_0xd1a2x11[_0x840c[30]](_0x840c[33])){_0xd1a2x12[_0x840c[32]](_0xd1a2x11,_0x840c[34])}}});OpenchannelRoom[_0x840c[27]](function(_0xd1a2x11){if(_0xd1a2x12[_0x840c[19]]&& _0xd1a2x11[_0x840c[35]]== _0xd1a2x12[_0x840c[19]][_0x840c[25]]){if(_0xd1a2x11[_0x840c[30]](_0x840c[36])&& _0xd1a2x11[_0x840c[36]]=== _0x840c[37]){_0xd1a2x12[_0x840c[32]](_0xd1a2x11,_0x840c[38])}}});OpenchannelAccount[_0x840c[40]](function(_0xd1a2x11){if(_0xd1a2x12[_0x840c[19]]&& _0xd1a2x11[_0x840c[25]]=== _0xd1a2x12[_0x840c[19]][_0x840c[25]]){_0xd1a2x12[_0x840c[39]](_0xd1a2x11)}});OpenchannelMessage[_0x840c[50]](function(_0xd1a2x11,_0xd1a2x13){if(_0xd1a2x12[_0x840c[19]]&& _0xd1a2x12[_0x840c[19]][_0x840c[25]]== _0xd1a2x11[_0x840c[41]][_0x840c[35]]){if(_0xd1a2x11[_0x840c[36]]=== _0x840c[42]){var _0xd1a2x14= new Scheduler({channel:_0x840c[43],uniqueid:util[_0x840c[46]](_0x840c[44],moment()[_0x840c[45]](),_0xd1a2x11.OpenchannelRoomId),messageid:_0xd1a2x11[_0x840c[25]],roomid:_0xd1a2x11[_0x840c[47]],accountid:_0xd1a2x12[_0x840c[19]][_0x840c[25]],accountname:_0xd1a2x12[_0x840c[19]][_0x840c[23]],from:_0xd1a2x11[_0x840c[48]]});_0xd1a2x14[_0x840c[20]]()};_0xd1a2x12[_0x840c[49]](_0xd1a2x11,_0xd1a2x13)}})};Custom[_0x840c[21]][_0x840c[26]]= function(_0xd1a2x11){if(!_0xd1a2x11[_0x840c[30]](_0x840c[51])){console[_0x840c[18]](_0x840c[22]+ _0xd1a2x11[_0x840c[23]]+ _0x840c[52]);this[_0x840c[19]]= null;this[_0x840c[19]]= _0xd1a2x11}};Custom[_0x840c[21]][_0x840c[39]]= function(_0xd1a2x11){console[_0x840c[18]](_0x840c[53]+ _0xd1a2x11[_0x840c[23]]+ _0x840c[54]);this[_0x840c[19]]= null};Custom[_0x840c[21]][_0x840c[49]]= function(_0xd1a2x15,_0xd1a2x13){var _0xd1a2x16=this[_0x840c[19]];var _0xd1a2x17=_0xd1a2x15;var _0xd1a2x18;var _0xd1a2x19;if(_0xd1a2x17[_0x840c[36]]=== _0x840c[55]){return Promise[_0x840c[82]]([])[_0x840c[62]](getRoom(_0xd1a2x17))[_0x840c[62]](function(_0xd1a2x1e){_0xd1a2x18= _0xd1a2x1e;return _0xd1a2x17[_0x840c[81]](_0xd1a2x1e[_0x840c[25]])})[_0x840c[62]](function(){return _0xd1a2x18[_0x840c[61]]({status:_0x840c[78],lastEvent:_0x840c[55],lastEventAt:moment()[_0x840c[46]](_0x840c[60]),openchannelOut:++_0xd1a2x18[_0x840c[79]]},{individualHooks:true,user:_0xd1a2x13[_0x840c[80]]})})[_0x840c[62]](function(_0xd1a2x1c){return Agent[_0x840c[77]](_0xd1a2x17.UserId)})[_0x840c[62]](function(_0xd1a2x1d){_0xd1a2x19= _0xd1a2x1d;return _0xd1a2x18[_0x840c[76]](_0xd1a2x19)})[_0x840c[62]](function(){console[_0x840c[18]](_0x840c[67]);if(_0xd1a2x16[_0x840c[68]]&& _0xd1a2x16[_0x840c[69]]){var _0xd1a2x1c={from:_0xd1a2x17[_0x840c[48]],to:_0xd1a2x17[_0x840c[70]],body:_0xd1a2x17[_0x840c[71]],UserId:_0xd1a2x17[_0x840c[72]],OpenchannelAccountId:_0xd1a2x17[_0x840c[35]],OpenchannelRoomId:_0xd1a2x17[_0x840c[47]]};return Util[_0x840c[73]](_0xd1a2x1c,_0xd1a2x16[_0x840c[68]],_0xd1a2x16[_0x840c[69]])}else {throw {name:_0x840c[74],message:_0x840c[75]}}})[_0x840c[62]](function(_0xd1a2x1b){console[_0x840c[18]](_0x840c[66]);return _0xd1a2x17[_0x840c[64]]({status:_0x840c[65],res_data:JSON[_0x840c[63]](_0xd1a2x1b)})})[_0x840c[62]](function(){return _0xd1a2x18[_0x840c[61]]({lastEvent:_0x840c[65],lastEventAt:moment()[_0x840c[46]](_0x840c[60])})})[_0x840c[58]](function(_0xd1a2x1a){console[_0x840c[18]](_0x840c[56],_0xd1a2x1a);_0xd1a2x17[_0x840c[64]]({status:_0x840c[59],res_data:JSON[_0x840c[63]](_0xd1a2x1a)})[_0x840c[62]](function(){return _0xd1a2x18[_0x840c[61]]({lastEvent:_0x840c[59],lastEventAt:moment()[_0x840c[46]](_0x840c[60])})})[_0x840c[58]](function(_0xd1a2x1a){console[_0x840c[18]](_0x840c[57])})})}};function getRoom(_0xd1a2x17){return function(){if(_0xd1a2x17[_0x840c[47]]){return OpenchannelRoom[_0x840c[77]](_0xd1a2x17.OpenchannelRoomId)}else {return OpenchannelRoom[_0x840c[86]]({limit:1,where:{contact:_0xd1a2x17[_0x840c[70]],OpenchannelAccountId:_0xd1a2x17[_0x840c[35]]},order:[[_0x840c[84],_0x840c[85]]]})[_0x840c[62]](function(_0xd1a2x20){var _0xd1a2x20=_0xd1a2x20[0];if(!_0xd1a2x20|| _0xd1a2x20[_0x840c[36]]=== _0x840c[37]){var _0xd1a2x21=_0xd1a2x20?_0xd1a2x20[_0x840c[25]]:null;return OpenchannelRoom[_0x840c[83]]({contact:_0xd1a2x17[_0x840c[70]],OpenchannelAccountId:_0xd1a2x17[_0x840c[35]],status:_0x840c[78],ParentId:_0xd1a2x21})};return _0xd1a2x20})}}}function execRequest(_0xd1a2x11,_0xd1a2x23,_0xd1a2x24){Util[_0x840c[73]](_0xd1a2x11,_0xd1a2x23,_0xd1a2x24)[_0x840c[62]](function(_0xd1a2x25){console[_0x840c[18]](_0x840c[88])})[_0x840c[58]](function(_0xd1a2x1a){console[_0x840c[18]](_0x840c[87])})}Custom[_0x840c[21]][_0x840c[32]]= function(_0xd1a2x11,_0xd1a2x26){var _0xd1a2x16=this[_0x840c[19]];switch(_0xd1a2x26){case _0x840c[31]:if(_0xd1a2x16[_0x840c[89]]&& _0xd1a2x16[_0x840c[90]]){console[_0x840c[18]](_0x840c[91]+ _0xd1a2x16[_0x840c[23]]+ _0x840c[92]);execRequest(_0xd1a2x11[_0x840c[41]],_0xd1a2x16[_0x840c[89]],_0xd1a2x16[_0x840c[90]])};if(_0xd1a2x16[_0x840c[94]][_0x840c[93]]){_[_0x840c[97]](_0xd1a2x16[_0x840c[94]],function(_0xd1a2x27){if(_0xd1a2x27[_0x840c[95]]){Util[_0x840c[96]](_0xd1a2x27,_0xd1a2x11)}})};break;case _0x840c[34]:if(_0xd1a2x16[_0x840c[98]]&& _0xd1a2x16[_0x840c[99]]){console[_0x840c[18]](_0x840c[91]+ _0xd1a2x16[_0x840c[23]]+ _0x840c[100]);execRequest(_0xd1a2x11[_0x840c[41]],_0xd1a2x16[_0x840c[98]],_0xd1a2x16[_0x840c[99]])};break;case _0x840c[38]:if(_0xd1a2x16[_0x840c[101]]&& _0xd1a2x16[_0x840c[102]]){console[_0x840c[18]](_0x840c[91]+ _0xd1a2x16[_0x840c[23]]+ _0x840c[103]);execRequest(_0xd1a2x11[_0x840c[41]],_0xd1a2x16[_0x840c[101]],_0xd1a2x16[_0x840c[102]])};break;default:console[_0x840c[18]](_0x840c[104])}};module[_0x840c[105]]= Custom
\ No newline at end of file
diff --git a/server/config/openchannel/index.js b/server/config/openchannel/index.js
index f6a56c3..36c99d0 100644
--- a/server/config/openchannel/index.js
+++ b/server/config/openchannel/index.js
@@ -1,23 +1 @@
-'use strict';
-var OpenchannelAccount = require('../../models').OpenchannelAccount;
-var Custom = require('./custom');
-
-
-module.exports = function() {
-  OpenchannelAccount.afterCreate(function(server) {
-    var custom = new Custom();
-    custom.init(server);
-  });
-
-  return OpenchannelAccount
-    .findAll()
-    .then(function(accounts) {
-      accounts.forEach(function(account) {
-        var custom = new Custom();
-        custom.init(account);
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
+var _0x97d2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2F\x63\x75\x73\x74\x6F\x6D","\x65\x78\x70\x6F\x72\x74\x73","\x69\x6E\x69\x74","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x97d2[0];var OpenchannelAccount=require(_0x97d2[2])[_0x97d2[1]];var Custom=require(_0x97d2[3]);module[_0x97d2[4]]= function(){OpenchannelAccount[_0x97d2[6]](function(_0xdc93x3){var _0xdc93x4= new Custom();_0xdc93x4[_0x97d2[5]](_0xdc93x3)});return OpenchannelAccount[_0x97d2[11]]()[_0x97d2[10]](function(_0xdc93x6){_0xdc93x6[_0x97d2[9]](function(_0xdc93x7){var _0xdc93x4= new Custom();_0xdc93x4[_0x97d2[5]](_0xdc93x7)})})[_0x97d2[8]](function(_0xdc93x5){console[_0x97d2[7]](_0xdc93x5)})}
\ No newline at end of file
diff --git a/server/config/routing/agent.js b/server/config/routing/agent.js
index d2231e5..1a3b116 100644
--- a/server/config/routing/agent.js
+++ b/server/config/routing/agent.js
@@ -1,118 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const config = require('../environment');
-const structure = require('./structure');
-
-// NODEJS API
-const cp = require('child_process');
-const util = require('util');
-const moment = require('moment');
-
-// MODELS
-const User = require('../../models').User;
-
-// Define the factory
-function Agent(app, data, next) {
-  this.app = app;
-  this.data = data;
-  this.called = [];
-  this.rejected = [];
-  //callbacks
-  this.next = next;
-}
-
-Agent.prototype.init = function init() {
-  var self = this;
-  var query = {
-    where: {
-      id: self.app.UserId,
-      online: true
-    },
-    include: []
-  };
-
-  query.where[structure.labels.pauses[self.data.channel]] = false;
-  query.include.push({
-    model: structure.models.rooms[self.data.channel],
-    attributes: ['id']
-  });
-
-  return User
-    .findAll(query)
-    .then(function(agents) {
-      self._agents = agents;
-
-      console.info(self.data.channel.toUpperCase(), 'APP AGENT, INTERACTION:', self.data.uniqueid, 'TIMEOUT', self.app.timeout, 'SEC');
-
-      if (self._agents.length && available(
-          self._agents[0].online,
-          self._agents[0][structure.labels.pauses[self.data.channel]],
-          _.filter(self._agents[0][structure.labels.rooms[self.data.channel]], {
-            status: 'OPEN'
-          }),
-          self._agents[0][structure.labels.capacities[self.data.channel]])) {
-        self.writeReport();
-
-        self.timeout = setTimeout(function() {
-          self.next();
-        }, self.app.timeout * 1000);
-      } else {
-        console.info(self.data.channel.toUpperCase(), 'APP FIDELITY SKIP INTERACTION:', self.data.roomId);
-        self.next();
-      }
-    })
-    .then(function() {
-      return structure.models.rooms[self.data.channel]
-        .update({
-          waiting: true
-        }, {
-          where: {
-            id: self.data.roomid,
-          },
-          individualHooks: true
-        })
-        .then(function() {
-          console.log('AGENT ACTION STARTED');
-        })
-        .catch(function(err) {
-          console.error();
-        });
-    });
-}
-
-Agent.prototype.writeReport = function writeReport() {
-  var self = this;
-  var values = _.map(self._agents, function(agent) {
-    return _.merge(self.data, {
-      timeslot: self.app.timeout,
-      application: 'agent',
-      membername: agent.name,
-      memberid: agent.id,
-      calledAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-      joinAt: moment().format("YYYY-MM-DD HH:mm:ss")
-    });
-  });
-
-  return structure.models.sessions[self.data.channel]
-    .bulkCreate(values, {
-      individualHooks: true
-    })
-    .then(function() {
-      return structure.models.reports[self.data.channel]
-        .bulkCreate(values, {
-          individualHooks: true
-        });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-function available(online, pause, rooms, capacity) {
-  // CHECK CAPACITY
-  return online && !pause && ((rooms.length < capacity) || capacity === 0);
-}
-
-// Export this file as a module
-module.exports = Agent;
+var _0xa072=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x61\x70\x70","\x64\x61\x74\x61","\x63\x61\x6C\x6C\x65\x64","\x72\x65\x6A\x65\x63\x74\x65\x64","\x6E\x65\x78\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x55\x73\x65\x72\x49\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x61\x75\x73\x65\x73","\x6C\x61\x62\x65\x6C\x73","\x77\x68\x65\x72\x65","\x72\x6F\x6F\x6D\x73","\x6D\x6F\x64\x65\x6C\x73","\x69\x64","\x70\x75\x73\x68","\x69\x6E\x63\x6C\x75\x64\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x41\x47\x45\x4E\x54\x20\x41\x43\x54\x49\x4F\x4E\x20\x53\x54\x41\x52\x54\x45\x44","\x6C\x6F\x67","\x74\x68\x65\x6E","\x72\x6F\x6F\x6D\x69\x64","\x75\x70\x64\x61\x74\x65","\x5F\x61\x67\x65\x6E\x74\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x41\x50\x50\x20\x41\x47\x45\x4E\x54\x2C\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x54\x49\x4D\x45\x4F\x55\x54","\x74\x69\x6D\x65\x6F\x75\x74","\x53\x45\x43","\x69\x6E\x66\x6F","\x6C\x65\x6E\x67\x74\x68","\x6F\x6E\x6C\x69\x6E\x65","\x4F\x50\x45\x4E","\x66\x69\x6C\x74\x65\x72","\x63\x61\x70\x61\x63\x69\x74\x69\x65\x73","\x77\x72\x69\x74\x65\x52\x65\x70\x6F\x72\x74","\x41\x50\x50\x20\x46\x49\x44\x45\x4C\x49\x54\x59\x20\x53\x4B\x49\x50\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x72\x6F\x6F\x6D\x49\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x73","\x73\x65\x73\x73\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xa072[0];const _=require(_0xa072[1]);const config=require(_0xa072[2]);const structure=require(_0xa072[3]);const cp=require(_0xa072[4]);const util=require(_0xa072[5]);const moment=require(_0xa072[6]);const User=require(_0xa072[8])[_0xa072[7]];function Agent(_0x8eddx9,_0x8eddxa,_0x8eddxb){this[_0xa072[9]]= _0x8eddx9;this[_0xa072[10]]= _0x8eddxa;this[_0xa072[11]]= [];this[_0xa072[12]]= [];this[_0xa072[13]]= _0x8eddxb}Agent[_0xa072[15]][_0xa072[14]]= function init(){var _0x8eddxd=this;var _0x8eddxe={where:{id:_0x8eddxd[_0xa072[9]][_0xa072[16]],online:true},include:[]};_0x8eddxe[_0xa072[20]][structure[_0xa072[19]][_0xa072[18]][_0x8eddxd[_0xa072[10]][_0xa072[17]]]]= false;_0x8eddxe[_0xa072[25]][_0xa072[24]]({model:structure[_0xa072[22]][_0xa072[21]][_0x8eddxd[_0xa072[10]][_0xa072[17]]],attributes:[_0xa072[23]]});return User[_0xa072[49]](_0x8eddxe)[_0xa072[30]](function(_0x8eddx10){_0x8eddxd[_0xa072[33]]= _0x8eddx10;console[_0xa072[40]](_0x8eddxd[_0xa072[10]][_0xa072[17]][_0xa072[34]](),_0xa072[35],_0x8eddxd[_0xa072[10]][_0xa072[36]],_0xa072[37],_0x8eddxd[_0xa072[9]][_0xa072[38]],_0xa072[39]);if(_0x8eddxd[_0xa072[33]][_0xa072[41]]&& available(_0x8eddxd[_0xa072[33]][0][_0xa072[42]],_0x8eddxd[_0xa072[33]][0][structure[_0xa072[19]][_0xa072[18]][_0x8eddxd[_0xa072[10]][_0xa072[17]]]],_[_0xa072[44]](_0x8eddxd[_0xa072[33]][0][structure[_0xa072[19]][_0xa072[21]][_0x8eddxd[_0xa072[10]][_0xa072[17]]]],{status:_0xa072[43]}),_0x8eddxd[_0xa072[33]][0][structure[_0xa072[19]][_0xa072[45]][_0x8eddxd[_0xa072[10]][_0xa072[17]]]])){_0x8eddxd[_0xa072[46]]();_0x8eddxd[_0xa072[38]]= setTimeout(function(){_0x8eddxd[_0xa072[13]]()},_0x8eddxd[_0xa072[9]][_0xa072[38]]* 1000)}else {console[_0xa072[40]](_0x8eddxd[_0xa072[10]][_0xa072[17]][_0xa072[34]](),_0xa072[47],_0x8eddxd[_0xa072[10]][_0xa072[48]]);_0x8eddxd[_0xa072[13]]()}})[_0xa072[30]](function(){return structure[_0xa072[22]][_0xa072[21]][_0x8eddxd[_0xa072[10]][_0xa072[17]]][_0xa072[32]]({waiting:true},{where:{id:_0x8eddxd[_0xa072[10]][_0xa072[31]]},individualHooks:true})[_0xa072[30]](function(){console[_0xa072[29]](_0xa072[28])})[_0xa072[27]](function(_0x8eddxf){console[_0xa072[26]]()})})};Agent[_0xa072[15]][_0xa072[46]]= function writeReport(){var _0x8eddxd=this;var _0x8eddx12=_[_0xa072[55]](_0x8eddxd._agents,function(_0x8eddx13){return _[_0xa072[54]](_0x8eddxd[_0xa072[10]],{timeslot:_0x8eddxd[_0xa072[9]][_0xa072[38]],application:_0xa072[50],membername:_0x8eddx13[_0xa072[51]],memberid:_0x8eddx13[_0xa072[23]],calledAt:moment()[_0xa072[53]](_0xa072[52]),joinAt:moment()[_0xa072[53]](_0xa072[52])})});return structure[_0xa072[22]][_0xa072[58]][_0x8eddxd[_0xa072[10]][_0xa072[17]]][_0xa072[56]](_0x8eddx12,{individualHooks:true})[_0xa072[30]](function(){return structure[_0xa072[22]][_0xa072[57]][_0x8eddxd[_0xa072[10]][_0xa072[17]]][_0xa072[56]](_0x8eddx12,{individualHooks:true})})[_0xa072[27]](function(_0x8eddxf){console[_0xa072[26]](_0x8eddxf)})};function available(_0x8eddx15,_0x8eddx16,_0x8eddx17,_0x8eddx18){return _0x8eddx15&& !_0x8eddx16&& ((_0x8eddx17[_0xa072[41]]< _0x8eddx18)|| _0x8eddx18=== 0)}module[_0xa072[59]]= Agent
\ No newline at end of file
diff --git a/server/config/routing/fidelity.js b/server/config/routing/fidelity.js
index eef584f..f7109ff 100644
--- a/server/config/routing/fidelity.js
+++ b/server/config/routing/fidelity.js
@@ -1,105 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const config = require('../environment');
-const structure = require('./structure');
-
-// NODEJS API
-const cp = require('child_process');
-const util = require('util');
-const moment = require('moment');
-
-// MODELS
-const Agent = require('../../models').User;
-
-// Define the factory
-function Fidelity(app, data, next) {
-  this.app = app;
-  this.data = data;
-  //callbacks
-  this.next = next;
-}
-
-Fidelity.prototype.init = function init() {
-  var self = this;
-  var query = {
-    where: {
-      online: true
-    },
-    attributes: ['id', 'name', 'fullname'],
-    raw: true
-  };
-
-  query.where[structure.labels.pauses[self.data.channel]] = false;
-
-  return structure.models.rooms[self.data.channel]
-    .findById(self.data.roomid)
-    .then(function(room) {
-      return room
-        .getUsers(query);
-    })
-    .then(function(agents) {
-      self._agents = agents;
-      console.info(self.data.channel.toUpperCase(), 'APP FIDELITY INTERACTION:', self.data.roomid, 'TIMEOUT', self.app.timeout, 'SEC');
-      if (self._agents.length) {
-        self.writeReport();
-
-        self.timeout = setTimeout(function() {
-          self.next();
-        }, self.app.timeout * 1000);
-
-      } else {
-        console.info(self.data.channel.toUpperCase(), 'APP FIDELITY SKIP INTERACTION:', self.data.roomid);
-        self.next();
-      }
-    })
-    .then(function() {
-      return structure.models.rooms[self.data.channel]
-        .update({
-          waiting: true
-        }, {
-          where: {
-            id: self.data.roomid,
-          },
-          individualHooks: true
-        })
-        .then(function() {
-          console.log('FIDELITY ACTION STARTED');
-        })
-        .catch(function(err) {
-          console.error();
-        });
-    });
-}
-
-Fidelity.prototype.writeReport = function writeReport() {
-  var self = this;
-  var values = _.map(self._agents, function(agent) {
-    return _.merge(self.data, {
-      timeslot: self.app.timeout,
-      application: 'fidelity',
-      membername: agent.name,
-      memberid: agent.id,
-      calledAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-      joinAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-      fidelity: self.app.timeout
-    });
-  });
-
-  return structure.models.sessions[self.data.channel]
-    .bulkCreate(values, {
-      individualHooks: true
-    })
-    .then(function() {
-      return structure.models.reports[self.data.channel]
-        .bulkCreate(values, {
-          individualHooks: true
-        });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Export this file as a module
-module.exports = Fidelity;
+var _0xc72f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x61\x70\x70","\x64\x61\x74\x61","\x6E\x65\x78\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x64","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x61\x75\x73\x65\x73","\x6C\x61\x62\x65\x6C\x73","\x77\x68\x65\x72\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x46\x49\x44\x45\x4C\x49\x54\x59\x20\x41\x43\x54\x49\x4F\x4E\x20\x53\x54\x41\x52\x54\x45\x44","\x6C\x6F\x67","\x74\x68\x65\x6E","\x72\x6F\x6F\x6D\x69\x64","\x75\x70\x64\x61\x74\x65","\x72\x6F\x6F\x6D\x73","\x6D\x6F\x64\x65\x6C\x73","\x5F\x61\x67\x65\x6E\x74\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x41\x50\x50\x20\x46\x49\x44\x45\x4C\x49\x54\x59\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x54\x49\x4D\x45\x4F\x55\x54","\x74\x69\x6D\x65\x6F\x75\x74","\x53\x45\x43","\x69\x6E\x66\x6F","\x6C\x65\x6E\x67\x74\x68","\x77\x72\x69\x74\x65\x52\x65\x70\x6F\x72\x74","\x41\x50\x50\x20\x46\x49\x44\x45\x4C\x49\x54\x59\x20\x53\x4B\x49\x50\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x67\x65\x74\x55\x73\x65\x72\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x66\x69\x64\x65\x6C\x69\x74\x79","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x73","\x73\x65\x73\x73\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xc72f[0];const _=require(_0xc72f[1]);const config=require(_0xc72f[2]);const structure=require(_0xc72f[3]);const cp=require(_0xc72f[4]);const util=require(_0xc72f[5]);const moment=require(_0xc72f[6]);const Agent=require(_0xc72f[8])[_0xc72f[7]];function Fidelity(_0x98d2x9,_0x98d2xa,_0x98d2xb){this[_0xc72f[9]]= _0x98d2x9;this[_0xc72f[10]]= _0x98d2xa;this[_0xc72f[11]]= _0x98d2xb}Fidelity[_0xc72f[13]][_0xc72f[12]]= function init(){var _0x98d2xd=this;var _0x98d2xe={where:{online:true},attributes:[_0xc72f[14],_0xc72f[15],_0xc72f[16]],raw:true};_0x98d2xe[_0xc72f[20]][structure[_0xc72f[19]][_0xc72f[18]][_0x98d2xd[_0xc72f[10]][_0xc72f[17]]]]= false;return structure[_0xc72f[29]][_0xc72f[28]][_0x98d2xd[_0xc72f[10]][_0xc72f[17]]][_0xc72f[41]](_0x98d2xd[_0xc72f[10]][_0xc72f[26]])[_0xc72f[25]](function(_0x98d2x11){return _0x98d2x11[_0xc72f[40]](_0x98d2xe)})[_0xc72f[25]](function(_0x98d2x10){_0x98d2xd[_0xc72f[30]]= _0x98d2x10;console[_0xc72f[36]](_0x98d2xd[_0xc72f[10]][_0xc72f[17]][_0xc72f[31]](),_0xc72f[32],_0x98d2xd[_0xc72f[10]][_0xc72f[26]],_0xc72f[33],_0x98d2xd[_0xc72f[9]][_0xc72f[34]],_0xc72f[35]);if(_0x98d2xd[_0xc72f[30]][_0xc72f[37]]){_0x98d2xd[_0xc72f[38]]();_0x98d2xd[_0xc72f[34]]= setTimeout(function(){_0x98d2xd[_0xc72f[11]]()},_0x98d2xd[_0xc72f[9]][_0xc72f[34]]* 1000)}else {console[_0xc72f[36]](_0x98d2xd[_0xc72f[10]][_0xc72f[17]][_0xc72f[31]](),_0xc72f[39],_0x98d2xd[_0xc72f[10]][_0xc72f[26]]);_0x98d2xd[_0xc72f[11]]()}})[_0xc72f[25]](function(){return structure[_0xc72f[29]][_0xc72f[28]][_0x98d2xd[_0xc72f[10]][_0xc72f[17]]][_0xc72f[27]]({waiting:true},{where:{id:_0x98d2xd[_0xc72f[10]][_0xc72f[26]]},individualHooks:true})[_0xc72f[25]](function(){console[_0xc72f[24]](_0xc72f[23])})[_0xc72f[22]](function(_0x98d2xf){console[_0xc72f[21]]()})})};Fidelity[_0xc72f[13]][_0xc72f[38]]= function writeReport(){var _0x98d2xd=this;var _0x98d2x13=_[_0xc72f[46]](_0x98d2xd._agents,function(_0x98d2x14){return _[_0xc72f[45]](_0x98d2xd[_0xc72f[10]],{timeslot:_0x98d2xd[_0xc72f[9]][_0xc72f[34]],application:_0xc72f[42],membername:_0x98d2x14[_0xc72f[15]],memberid:_0x98d2x14[_0xc72f[14]],calledAt:moment()[_0xc72f[44]](_0xc72f[43]),joinAt:moment()[_0xc72f[44]](_0xc72f[43]),fidelity:_0x98d2xd[_0xc72f[9]][_0xc72f[34]]})});return structure[_0xc72f[29]][_0xc72f[49]][_0x98d2xd[_0xc72f[10]][_0xc72f[17]]][_0xc72f[47]](_0x98d2x13,{individualHooks:true})[_0xc72f[25]](function(){return structure[_0xc72f[29]][_0xc72f[48]][_0x98d2xd[_0xc72f[10]][_0xc72f[17]]][_0xc72f[47]](_0x98d2x13,{individualHooks:true})})[_0xc72f[22]](function(_0x98d2xf){console[_0xc72f[21]](_0x98d2xf)})};module[_0xc72f[50]]= Fidelity
\ No newline at end of file
diff --git a/server/config/routing/queue.js b/server/config/routing/queue.js
index 250affd..7a84b75 100644
--- a/server/config/routing/queue.js
+++ b/server/config/routing/queue.js
@@ -1,301 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const config = require('../environment');
-const structure = require('./structure');
-
-// NODEJS API
-const cp = require('child_process');
-const util = require('util');
-const moment = require('moment');
-
-const Agent = require('../../models').User;
-
-// Define the factory
-function Queue(app, data, next) {
-  this.app = app;
-  this.data = data;
-  this.elapsed = 0;
-  //callbacks
-  this.next = next;
-  this.called = [];
-  this.rejected = [];
-}
-
-Queue.prototype.init = function init() {
-  var self = this;
-
-  return structure.models.queues[self.data.channel]
-    .findById(self.app[structure.labels.appQueues[self.data.channel]], {
-      attributes: ['id', 'name', 'timeout', 'strategy', 'lastAgent'],
-      include: [{
-        model: Agent,
-        attributes: ['id'],
-        order: [
-          ['penalty', 'ASC']
-        ]
-      }]
-    })
-    .then(function(queue) {
-      console.info(util.format('%s QUEUE INSTANCE FOR ACCOUNT %s', self.data.channel.toUpperCase(), self.data.accountname));
-
-      self._queue = queue;
-      self._duration = self.app.timeout;
-
-      switch (self._queue.strategy) {
-        case 'beepall':
-          console.info(self.data.channel.toUpperCase(), 'QUEUE BEEPALL STRATEGY, DURATION', self.app.timeout);
-
-          self._agents = _.values(_.groupBy(queue.Users, structure.labels.penaltyTables[self.data.channel]));
-          self.beepall();
-          break;
-        case 'roundrobin':
-          console.info(self.data.channel.toUpperCase(), 'QUEUE ROUND ROBIN STRATEGY, DURATION', self.app.timeout);
-          self._agents = queue.Users;
-          self.rr();
-          break;
-        case 'rrmemory':
-          console.info(self.data.channel.toUpperCase(), 'QUEUE RR MEMORY STRATEGY, DURATION', self.app.timeout);
-          self._agents = queue.Users;
-          if (self._queue.lastAgent) {
-            var agent;
-            for (var i = 0; i < self._agents.length; i++) {
-              agent = self._agents.shift();
-              self._agents.push(agent);
-
-              if (agent.id === self._queue.lastAgent) {
-                break;
-              }
-            }
-          }
-
-          self.rr();
-          break;
-        default:
-      }
-    })
-    .then(function() {
-      var values = [_.merge(self.data, {
-        timeslot: self.app.timeout,
-        application: 'queue',
-        queue: self._queue.id,
-        queuename: self._queue.name,
-        calledAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-        joinAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-        membername: null,
-        memberid: null
-      })];
-      return structure.models.sessions[self.data.channel]
-        .bulkCreate(values, {
-          individualHooks: true
-        });
-    })
-    .then(function() {
-      return structure.models.rooms[self.data.channel]
-        .update({
-          waiting: true
-        }, {
-          where: {
-            id: self.data.roomid,
-          },
-          individualHooks: true
-        })
-        .then(function() {
-          console.log('QUEUE ACTION STARTED');
-        })
-        .catch(function(err) {
-          console.error();
-        });
-    });
-}
-
-Queue.prototype.beepall = function beepall() {
-  var self = this;
-  var attempts = self._agents.shift();
-  self._agents.push(attempts);
-
-  var query = {
-    where: {
-      id: {
-        $in: _.map(attempts, 'id')
-      },
-      online: true
-    },
-    include: [{
-      model: structure.models.rooms[self.data.channel],
-      attributes: ['id', 'status']
-    }],
-    attributes: ['id', 'name', 'fullname', 'online', 'mailPause', 'chatPause', 'faxPause', 'smsPause', 'openchannelPause', 'mailCapacity', 'chatCapacity', 'faxCapacity', 'smsCapacity',
-      'openchannelCapacity'
-    ]
-  };
-
-  query.where[structure.labels.pauses[self.data.channel]] = false;
-
-  var timeslot = ((self.app.timeout - self.elapsed) > self._queue.timeout) ? self._queue.timeout : (self.app.timeout - self.elapsed);
-
-  self.timeout = setTimeout(function() {
-    self.elapsed += self._queue.timeout;
-    self.beepall();
-  }, timeslot * 1000);
-
-  if (timeslot > 0) {
-    Agent
-      .findAll(query)
-      .then(function(agents) {
-        // REMOVE AGENTS BY CAPACITY
-        agents = _.remove(agents, function(agent) {
-          if (available(agent,
-              agent[structure.labels.pauses[self.data.channel]],
-              self.rejected,
-              _.filter(agent[structure.labels.rooms[self.data.channel]], {
-                status: 'OPEN'
-              }),
-              agent[structure.labels.capacities[self.data.channel]])) {
-            return true;
-          } else {
-            return false;
-          }
-        });
-
-        var values = _.map(agents, function(agent) {
-          var value = _.merge(self.data, {
-            timeslot: timeslot,
-            application: 'queue',
-            membername: agent.name,
-            memberid: agent.id,
-            queue: self._queue.id,
-            queuename: self._queue.name,
-            calledAt: moment().format("YYYY-MM-DD HH:mm:ss")
-          });
-
-          return _.clone(value);
-        });
-
-        structure.models.reports[self.data.channel]
-          .bulkCreate(values, {
-            individualHooks: true
-          })
-          .catch(function(err) {
-            console.error(err);
-          });
-      })
-      .catch(function(err) {
-        console.error(err);
-      });
-  } else {
-    clearTimeout(self.timeout);
-    this.next();
-  }
-}
-
-Queue.prototype.rr = function rr() {
-  var self = this;
-  var timeslot = ((self.app.timeout - self.elapsed) > self._queue.timeout) ? self._queue.timeout : (self.app.timeout - self.elapsed);
-
-  self.timeout = setTimeout(function() {
-    self.elapsed += self._queue.timeout;
-    self.rr();
-  }, timeslot * 1000);
-
-  var query = {
-    where: {
-      id: {
-        $in: _.map(self._agents, 'id')
-      }
-    },
-    include: [{
-      model: structure.models.rooms[self.data.channel],
-      attributes: ['id']
-    }],
-    attributes: ['id', 'name', 'fullname', 'online', 'mailPause', 'chatPause', 'faxPause', 'smsPause', 'openchannelPause', 'mailCapacity', 'chatCapacity', 'faxCapacity', 'smsCapacity',
-      'openchannelCapacity'
-    ]
-  };
-
-  if (_.map(self._agents, 'id').join().length) {
-    query.order = [
-      [{
-        raw: 'FIELD(User.id,' + _.map(self._agents, 'id').join() + ')'
-      }]
-    ];
-  }
-
-  if (timeslot > 0) {
-    Agent
-      .findAll(query)
-      .then(function(agents) {
-        if (agents.length) {
-          self._agents = agents;
-
-          for (var i = 0; i < self._agents.length; i++) {
-
-            if (available(self._agents[0],
-                self._agents[0][structure.labels.pauses[self.data.channel]],
-                self.rejected,
-                _.filter(self._agents[0][structure.labels.rooms[self.data.channel]], {
-                  status: 'OPEN'
-                }),
-                self._agents[0][structure.labels.capacities[self.data.channel]]
-              )) {
-
-              var values = [_.merge(self.data, {
-                timeslot: timeslot,
-                application: 'queue',
-                membername: self._agents[0].name,
-                memberid: self._agents[0].id,
-                queue: self._queue.id,
-                queuename: self._queue.name,
-                calledAt: moment().format("YYYY-MM-DD HH:mm:ss")
-              })];
-
-              return structure.models.reports[self.data.channel]
-                .bulkCreate(values, {
-                  individualHooks: true
-                })
-                .then(function() {
-                  return structure.models.queues[self.data.channel]
-                    .update({
-                      lastAgent: self._agents[0].id
-                    }, {
-                      where: {
-                        id: self._queue.id
-                      }
-                    });
-                })
-                .catch(function(err) {
-                  console.error(err);
-                });
-
-            } else {
-              var agent = self._agents.shift();
-              self._agents.push(agent);
-            }
-          }
-        }
-      })
-      .then(function() {
-        var agent = self._agents.shift();
-        self._agents.push(agent);
-      })
-      .catch(function(err) {
-        console.error(err);
-      });
-  } else {
-    clearTimeout(self.timeout);
-    this.next();
-  }
-}
-
-function available(agent, pause, rejected, rooms, capacity) {
-  // CHECK REJECTED
-  var reject = _.find(rejected, {
-    id: agent.id
-  }) ? true : false;
-  // CHECK CAPACITY
-
-  return agent.online && !pause && !reject && ((rooms.length < capacity) || (capacity === 0));
-}
-
-// Export this file as a module
-module.exports = Queue;
+var _0x6e82=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x61\x70\x70","\x64\x61\x74\x61","\x65\x6C\x61\x70\x73\x65\x64","\x6E\x65\x78\x74","\x63\x61\x6C\x6C\x65\x64","\x72\x65\x6A\x65\x63\x74\x65\x64","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x51\x55\x45\x55\x45\x20\x41\x43\x54\x49\x4F\x4E\x20\x53\x54\x41\x52\x54\x45\x44","\x6C\x6F\x67","\x74\x68\x65\x6E","\x72\x6F\x6F\x6D\x69\x64","\x75\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x72\x6F\x6F\x6D\x73","\x6D\x6F\x64\x65\x6C\x73","\x74\x69\x6D\x65\x6F\x75\x74","\x71\x75\x65\x75\x65","\x69\x64","\x5F\x71\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x73\x65\x73\x73\x69\x6F\x6E\x73","\x25\x73\x20\x51\x55\x45\x55\x45\x20\x49\x4E\x53\x54\x41\x4E\x43\x45\x20\x46\x4F\x52\x20\x41\x43\x43\x4F\x55\x4E\x54\x20\x25\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x69\x6E\x66\x6F","\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x51\x55\x45\x55\x45\x20\x42\x45\x45\x50\x41\x4C\x4C\x20\x53\x54\x52\x41\x54\x45\x47\x59\x2C\x20\x44\x55\x52\x41\x54\x49\x4F\x4E","\x5F\x61\x67\x65\x6E\x74\x73","\x70\x65\x6E\x61\x6C\x74\x79\x54\x61\x62\x6C\x65\x73","\x6C\x61\x62\x65\x6C\x73","\x67\x72\x6F\x75\x70\x42\x79","\x76\x61\x6C\x75\x65\x73","\x62\x65\x65\x70\x61\x6C\x6C","\x51\x55\x45\x55\x45\x20\x52\x4F\x55\x4E\x44\x20\x52\x4F\x42\x49\x4E\x20\x53\x54\x52\x41\x54\x45\x47\x59\x2C\x20\x44\x55\x52\x41\x54\x49\x4F\x4E","\x55\x73\x65\x72\x73","\x72\x72","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E","\x51\x55\x45\x55\x45\x20\x52\x52\x20\x4D\x45\x4D\x4F\x52\x59\x20\x53\x54\x52\x41\x54\x45\x47\x59\x2C\x20\x44\x55\x52\x41\x54\x49\x4F\x4E","\x6C\x61\x73\x74\x41\x67\x65\x6E\x74","\x6C\x65\x6E\x67\x74\x68","\x73\x68\x69\x66\x74","\x70\x75\x73\x68","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x73\x74\x72\x61\x74\x65\x67\x79","\x61\x70\x70\x51\x75\x65\x75\x65\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x41\x53\x43","\x66\x69\x6E\x64\x42\x79\x49\x64","\x71\x75\x65\x75\x65\x73","\x6D\x61\x70","\x73\x74\x61\x74\x75\x73","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x73\x6D\x73\x50\x61\x75\x73\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x50\x61\x75\x73\x65","\x6D\x61\x69\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x63\x68\x61\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x66\x61\x78\x43\x61\x70\x61\x63\x69\x74\x79","\x73\x6D\x73\x43\x61\x70\x61\x63\x69\x74\x79","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x70\x61\x75\x73\x65\x73","\x77\x68\x65\x72\x65","\x4F\x50\x45\x4E","\x66\x69\x6C\x74\x65\x72","\x63\x61\x70\x61\x63\x69\x74\x69\x65\x73","\x72\x65\x6D\x6F\x76\x65","\x63\x6C\x6F\x6E\x65","\x72\x65\x70\x6F\x72\x74\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x6A\x6F\x69\x6E","\x6F\x72\x64\x65\x72","\x46\x49\x45\x4C\x44\x28\x55\x73\x65\x72\x2E\x69\x64\x2C","\x29","\x66\x69\x6E\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x6e82[0];const _=require(_0x6e82[1]);const config=require(_0x6e82[2]);const structure=require(_0x6e82[3]);const cp=require(_0x6e82[4]);const util=require(_0x6e82[5]);const moment=require(_0x6e82[6]);const Agent=require(_0x6e82[8])[_0x6e82[7]];function Queue(_0x787bx9,_0x787bxa,_0x787bxb){this[_0x6e82[9]]= _0x787bx9;this[_0x6e82[10]]= _0x787bxa;this[_0x6e82[11]]= 0;this[_0x6e82[12]]= _0x787bxb;this[_0x6e82[13]]= [];this[_0x6e82[14]]= []}Queue[_0x6e82[16]][_0x6e82[15]]= function init(){var _0x787bxd=this;return structure[_0x6e82[26]][_0x6e82[64]][_0x787bxd[_0x6e82[10]][_0x6e82[24]]][_0x6e82[63]](_0x787bxd[_0x6e82[9]][structure[_0x6e82[45]][_0x6e82[60]][_0x787bxd[_0x6e82[10]][_0x6e82[24]]]],{attributes:[_0x6e82[29],_0x6e82[31],_0x6e82[27],_0x6e82[59],_0x6e82[54]],include:[{model:Agent,attributes:[_0x6e82[29]],order:[[_0x6e82[61],_0x6e82[62]]]}]})[_0x6e82[21]](function(_0x787bx10){console[_0x6e82[40]](util[_0x6e82[33]](_0x6e82[37],_0x787bxd[_0x6e82[10]][_0x6e82[24]][_0x6e82[38]](),_0x787bxd[_0x6e82[10]][_0x6e82[39]]));_0x787bxd[_0x6e82[30]]= _0x787bx10;_0x787bxd[_0x6e82[41]]= _0x787bxd[_0x6e82[9]][_0x6e82[27]];switch(_0x787bxd[_0x6e82[30]][_0x6e82[59]]){case _0x6e82[48]:console[_0x6e82[40]](_0x787bxd[_0x6e82[10]][_0x6e82[24]][_0x6e82[38]](),_0x6e82[42],_0x787bxd[_0x6e82[9]][_0x6e82[27]]);_0x787bxd[_0x6e82[43]]= _[_0x6e82[47]](_[_0x6e82[46]](_0x787bx10.Users,structure[_0x6e82[45]][_0x6e82[44]][_0x787bxd[_0x6e82[10]][_0x6e82[24]]]));_0x787bxd[_0x6e82[48]]();break;case _0x6e82[52]:console[_0x6e82[40]](_0x787bxd[_0x6e82[10]][_0x6e82[24]][_0x6e82[38]](),_0x6e82[49],_0x787bxd[_0x6e82[9]][_0x6e82[27]]);_0x787bxd[_0x6e82[43]]= _0x787bx10[_0x6e82[50]];_0x787bxd[_0x6e82[51]]();break;case _0x6e82[58]:console[_0x6e82[40]](_0x787bxd[_0x6e82[10]][_0x6e82[24]][_0x6e82[38]](),_0x6e82[53],_0x787bxd[_0x6e82[9]][_0x6e82[27]]);_0x787bxd[_0x6e82[43]]= _0x787bx10[_0x6e82[50]];if(_0x787bxd[_0x6e82[30]][_0x6e82[54]]){var _0x787bx11;for(var _0x787bx12=0;_0x787bx12< _0x787bxd[_0x6e82[43]][_0x6e82[55]];_0x787bx12++){_0x787bx11= _0x787bxd[_0x6e82[43]][_0x6e82[56]]();_0x787bxd[_0x6e82[43]][_0x6e82[57]](_0x787bx11);if(_0x787bx11[_0x6e82[29]]=== _0x787bxd[_0x6e82[30]][_0x6e82[54]]){break}}};_0x787bxd[_0x6e82[51]]();break;default:}})[_0x6e82[21]](function(){var _0x787bxf=[_[_0x6e82[34]](_0x787bxd[_0x6e82[10]],{timeslot:_0x787bxd[_0x6e82[9]][_0x6e82[27]],application:_0x6e82[28],queue:_0x787bxd[_0x6e82[30]][_0x6e82[29]],queuename:_0x787bxd[_0x6e82[30]][_0x6e82[31]],calledAt:moment()[_0x6e82[33]](_0x6e82[32]),joinAt:moment()[_0x6e82[33]](_0x6e82[32]),membername:null,memberid:null})];return structure[_0x6e82[26]][_0x6e82[36]][_0x787bxd[_0x6e82[10]][_0x6e82[24]]][_0x6e82[35]](_0x787bxf,{individualHooks:true})})[_0x6e82[21]](function(){return structure[_0x6e82[26]][_0x6e82[25]][_0x787bxd[_0x6e82[10]][_0x6e82[24]]][_0x6e82[23]]({waiting:true},{where:{id:_0x787bxd[_0x6e82[10]][_0x6e82[22]]},individualHooks:true})[_0x6e82[21]](function(){console[_0x6e82[20]](_0x6e82[19])})[_0x6e82[18]](function(_0x787bxe){console[_0x6e82[17]]()})})};Queue[_0x6e82[16]][_0x6e82[48]]= function beepall(){var _0x787bxd=this;var _0x787bx14=_0x787bxd[_0x6e82[43]][_0x6e82[56]]();_0x787bxd[_0x6e82[43]][_0x6e82[57]](_0x787bx14);var _0x787bx15={where:{id:{$in:_[_0x6e82[65]](_0x787bx14,_0x6e82[29])},online:true},include:[{model:structure[_0x6e82[26]][_0x6e82[25]][_0x787bxd[_0x6e82[10]][_0x6e82[24]]],attributes:[_0x6e82[29],_0x6e82[66]]}],attributes:[_0x6e82[29],_0x6e82[31],_0x6e82[67],_0x6e82[68],_0x6e82[69],_0x6e82[70],_0x6e82[71],_0x6e82[72],_0x6e82[73],_0x6e82[74],_0x6e82[75],_0x6e82[76],_0x6e82[77],_0x6e82[78]]};_0x787bx15[_0x6e82[80]][structure[_0x6e82[45]][_0x6e82[79]][_0x787bxd[_0x6e82[10]][_0x6e82[24]]]]= false;var _0x787bx16=((_0x787bxd[_0x6e82[9]][_0x6e82[27]]- _0x787bxd[_0x6e82[11]])> _0x787bxd[_0x6e82[30]][_0x6e82[27]])?_0x787bxd[_0x6e82[30]][_0x6e82[27]]:(_0x787bxd[_0x6e82[9]][_0x6e82[27]]- _0x787bxd[_0x6e82[11]]);_0x787bxd[_0x6e82[27]]= setTimeout(function(){_0x787bxd[_0x6e82[11]]+= _0x787bxd[_0x6e82[30]][_0x6e82[27]];_0x787bxd[_0x6e82[48]]()},_0x787bx16* 1000);if(_0x787bx16> 0){Agent[_0x6e82[87]](_0x787bx15)[_0x6e82[21]](function(_0x787bx17){_0x787bx17= _[_0x6e82[84]](_0x787bx17,function(_0x787bx11){if(available(_0x787bx11,_0x787bx11[structure[_0x6e82[45]][_0x6e82[79]][_0x787bxd[_0x6e82[10]][_0x6e82[24]]]],_0x787bxd[_0x6e82[14]],_[_0x6e82[82]](_0x787bx11[structure[_0x6e82[45]][_0x6e82[25]][_0x787bxd[_0x6e82[10]][_0x6e82[24]]]],{status:_0x6e82[81]}),_0x787bx11[structure[_0x6e82[45]][_0x6e82[83]][_0x787bxd[_0x6e82[10]][_0x6e82[24]]]])){return true}else {return false}});var _0x787bxf=_[_0x6e82[65]](_0x787bx17,function(_0x787bx11){var _0x787bx18=_[_0x6e82[34]](_0x787bxd[_0x6e82[10]],{timeslot:_0x787bx16,application:_0x6e82[28],membername:_0x787bx11[_0x6e82[31]],memberid:_0x787bx11[_0x6e82[29]],queue:_0x787bxd[_0x6e82[30]][_0x6e82[29]],queuename:_0x787bxd[_0x6e82[30]][_0x6e82[31]],calledAt:moment()[_0x6e82[33]](_0x6e82[32])});return _[_0x6e82[85]](_0x787bx18)});structure[_0x6e82[26]][_0x6e82[86]][_0x787bxd[_0x6e82[10]][_0x6e82[24]]][_0x6e82[35]](_0x787bxf,{individualHooks:true})[_0x6e82[18]](function(_0x787bxe){console[_0x6e82[17]](_0x787bxe)})})[_0x6e82[18]](function(_0x787bxe){console[_0x6e82[17]](_0x787bxe)})}else {clearTimeout(_0x787bxd[_0x6e82[27]]);this[_0x6e82[12]]()}};Queue[_0x6e82[16]][_0x6e82[51]]= function rr(){var _0x787bxd=this;var _0x787bx16=((_0x787bxd[_0x6e82[9]][_0x6e82[27]]- _0x787bxd[_0x6e82[11]])> _0x787bxd[_0x6e82[30]][_0x6e82[27]])?_0x787bxd[_0x6e82[30]][_0x6e82[27]]:(_0x787bxd[_0x6e82[9]][_0x6e82[27]]- _0x787bxd[_0x6e82[11]]);_0x787bxd[_0x6e82[27]]= setTimeout(function(){_0x787bxd[_0x6e82[11]]+= _0x787bxd[_0x6e82[30]][_0x6e82[27]];_0x787bxd[_0x6e82[51]]()},_0x787bx16* 1000);var _0x787bx15={where:{id:{$in:_[_0x6e82[65]](_0x787bxd._agents,_0x6e82[29])}},include:[{model:structure[_0x6e82[26]][_0x6e82[25]][_0x787bxd[_0x6e82[10]][_0x6e82[24]]],attributes:[_0x6e82[29]]}],attributes:[_0x6e82[29],_0x6e82[31],_0x6e82[67],_0x6e82[68],_0x6e82[69],_0x6e82[70],_0x6e82[71],_0x6e82[72],_0x6e82[73],_0x6e82[74],_0x6e82[75],_0x6e82[76],_0x6e82[77],_0x6e82[78]]};if(_[_0x6e82[65]](_0x787bxd._agents,_0x6e82[29])[_0x6e82[88]]()[_0x6e82[55]]){_0x787bx15[_0x6e82[89]]= [[{raw:_0x6e82[90]+ _[_0x6e82[65]](_0x787bxd._agents,_0x6e82[29])[_0x6e82[88]]()+ _0x6e82[91]}]]};if(_0x787bx16> 0){Agent[_0x6e82[87]](_0x787bx15)[_0x6e82[21]](function(_0x787bx17){if(_0x787bx17[_0x6e82[55]]){_0x787bxd[_0x6e82[43]]= _0x787bx17;for(var _0x787bx12=0;_0x787bx12< _0x787bxd[_0x6e82[43]][_0x6e82[55]];_0x787bx12++){if(available(_0x787bxd[_0x6e82[43]][0],_0x787bxd[_0x6e82[43]][0][structure[_0x6e82[45]][_0x6e82[79]][_0x787bxd[_0x6e82[10]][_0x6e82[24]]]],_0x787bxd[_0x6e82[14]],_[_0x6e82[82]](_0x787bxd[_0x6e82[43]][0][structure[_0x6e82[45]][_0x6e82[25]][_0x787bxd[_0x6e82[10]][_0x6e82[24]]]],{status:_0x6e82[81]}),_0x787bxd[_0x6e82[43]][0][structure[_0x6e82[45]][_0x6e82[83]][_0x787bxd[_0x6e82[10]][_0x6e82[24]]]])){var _0x787bxf=[_[_0x6e82[34]](_0x787bxd[_0x6e82[10]],{timeslot:_0x787bx16,application:_0x6e82[28],membername:_0x787bxd[_0x6e82[43]][0][_0x6e82[31]],memberid:_0x787bxd[_0x6e82[43]][0][_0x6e82[29]],queue:_0x787bxd[_0x6e82[30]][_0x6e82[29]],queuename:_0x787bxd[_0x6e82[30]][_0x6e82[31]],calledAt:moment()[_0x6e82[33]](_0x6e82[32])})];return structure[_0x6e82[26]][_0x6e82[86]][_0x787bxd[_0x6e82[10]][_0x6e82[24]]][_0x6e82[35]](_0x787bxf,{individualHooks:true})[_0x6e82[21]](function(){return structure[_0x6e82[26]][_0x6e82[64]][_0x787bxd[_0x6e82[10]][_0x6e82[24]]][_0x6e82[23]]({lastAgent:_0x787bxd[_0x6e82[43]][0][_0x6e82[29]]},{where:{id:_0x787bxd[_0x6e82[30]][_0x6e82[29]]}})})[_0x6e82[18]](function(_0x787bxe){console[_0x6e82[17]](_0x787bxe)})}else {var _0x787bx11=_0x787bxd[_0x6e82[43]][_0x6e82[56]]();_0x787bxd[_0x6e82[43]][_0x6e82[57]](_0x787bx11)}}}})[_0x6e82[21]](function(){var _0x787bx11=_0x787bxd[_0x6e82[43]][_0x6e82[56]]();_0x787bxd[_0x6e82[43]][_0x6e82[57]](_0x787bx11)})[_0x6e82[18]](function(_0x787bxe){console[_0x6e82[17]](_0x787bxe)})}else {clearTimeout(_0x787bxd[_0x6e82[27]]);this[_0x6e82[12]]()}};function available(_0x787bx11,_0x787bx1b,_0x787bx1c,_0x787bx1d,_0x787bx1e){var _0x787bx1f=_[_0x6e82[92]](_0x787bx1c,{id:_0x787bx11[_0x6e82[29]]})?true:false;return _0x787bx11[_0x6e82[68]]&& !_0x787bx1b&& !_0x787bx1f&& ((_0x787bx1d[_0x6e82[55]]< _0x787bx1e)|| (_0x787bx1e=== 0))}module[_0x6e82[93]]= Queue
\ No newline at end of file
diff --git a/server/config/routing/replyMail.js b/server/config/routing/replyMail.js
index f78acdb..db2419b 100644
--- a/server/config/routing/replyMail.js
+++ b/server/config/routing/replyMail.js
@@ -1,86 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const config = require('../environment');
-const structure = require('./structure');
-
-// NODEJS API
-const cp = require('child_process');
-const util = require('util');
-const moment = require('moment');
-const Mustache = require('mustache');
-
-// MODELS
-const User = require('../../models').User;
-const Message = require('../../models').MailMessage;
-const Account = require('../../models').MailAccount;
-const Template = require('../../models').Template;
-
-// Define the factory
-function ReplyMail(app, data, next, msg) {
-  this.app = app;
-  this.data = data;
-  this.msg = msg;
-  console.log(msg);
-  //callbacks
-  this.next = next;
-}
-
-ReplyMail.prototype.init = function init() {
-  var self = this;
-  var _smtp;
-  var _message = {
-    from: [],
-    to: []
-  };
-
-  return Account
-    .findById(self.app.data8)
-    .then(function(account) {
-      return account
-        .getMailServerOut();
-    })
-    .then(function(smtp) {
-      _smtp = smtp;
-      _message.from.push(_smtp.username);
-      _message.to.push(self.data.from);
-
-      switch (self.app.data1) {
-        case 'replyAll':
-          _message.cc = self.data.cc;
-          break;
-        default:
-      }
-
-      return Template
-        .findById(self.app.data9);
-    })
-    .then(function(template) {
-      var msg = {
-        subject: template.subject ? Mustache.render(template.subject, msg) : null,
-        from: self.msg.from,
-        to: self.msg.to,
-        cc: self.msg.cc,
-        bcc: self.msg.bcc,
-        accountName: self.msg.accountName,
-        interactionId: self.msg.MailRoomId,
-        createdAt: self.msg.createdAt
-      }
-      _message.subject = template.subject ? Mustache.render(template.subject, msg) : null;
-      _message.html = template.html ? Mustache.render(template.html, msg) : null;
-      _message.auto = true;
-      _message.MailRoomId = self.data.roomid;
-
-      return Message
-        .create(_message);
-    })
-    .then(function() {
-      self.next();
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Export this file as a module
-module.exports = ReplyMail;
+var _0x1d9a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x75\x73\x74\x61\x63\x68\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x61\x70\x70","\x64\x61\x74\x61","\x6D\x73\x67","\x6C\x6F\x67","\x6E\x65\x78\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x73\x75\x62\x6A\x65\x63\x74","\x72\x65\x6E\x64\x65\x72","\x66\x72\x6F\x6D","\x74\x6F","\x63\x63","\x62\x63\x63","\x61\x63\x63\x6F\x75\x6E\x74\x4E\x61\x6D\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x68\x74\x6D\x6C","\x61\x75\x74\x6F","\x72\x6F\x6F\x6D\x69\x64","\x63\x72\x65\x61\x74\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x75\x73\x68","\x72\x65\x70\x6C\x79\x41\x6C\x6C","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x39","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x64\x61\x74\x61\x38","\x65\x78\x70\x6F\x72\x74\x73"];_0x1d9a[0];const _=require(_0x1d9a[1]);const config=require(_0x1d9a[2]);const structure=require(_0x1d9a[3]);const cp=require(_0x1d9a[4]);const util=require(_0x1d9a[5]);const moment=require(_0x1d9a[6]);const Mustache=require(_0x1d9a[7]);const User=require(_0x1d9a[9])[_0x1d9a[8]];const Message=require(_0x1d9a[9])[_0x1d9a[10]];const Account=require(_0x1d9a[9])[_0x1d9a[11]];const Template=require(_0x1d9a[9])[_0x1d9a[12]];function ReplyMail(_0x55c4xd,_0x55c4xe,_0x55c4xf,_0x55c4x10){this[_0x1d9a[13]]= _0x55c4xd;this[_0x1d9a[14]]= _0x55c4xe;this[_0x1d9a[15]]= _0x55c4x10;console[_0x1d9a[16]](_0x55c4x10);this[_0x1d9a[17]]= _0x55c4xf}ReplyMail[_0x1d9a[19]][_0x1d9a[18]]= function init(){var _0x55c4x12=this;var _0x55c4x13;var _0x55c4x14={from:[],to:[]};return Account[_0x1d9a[41]](_0x55c4x12[_0x1d9a[13]][_0x1d9a[43]])[_0x1d9a[22]](function(_0x55c4x18){return _0x55c4x18[_0x1d9a[42]]()})[_0x1d9a[22]](function(_0x55c4x17){_0x55c4x13= _0x55c4x17;_0x55c4x14[_0x1d9a[25]][_0x1d9a[37]](_0x55c4x13[_0x1d9a[36]]);_0x55c4x14[_0x1d9a[26]][_0x1d9a[37]](_0x55c4x12[_0x1d9a[14]][_0x1d9a[25]]);switch(_0x55c4x12[_0x1d9a[13]][_0x1d9a[39]]){case _0x1d9a[38]:_0x55c4x14[_0x1d9a[27]]= _0x55c4x12[_0x1d9a[14]][_0x1d9a[27]];break;default:};return Template[_0x1d9a[41]](_0x55c4x12[_0x1d9a[13]][_0x1d9a[40]])})[_0x1d9a[22]](function(_0x55c4x16){var _0x55c4x10={subject:_0x55c4x16[_0x1d9a[23]]?Mustache[_0x1d9a[24]](_0x55c4x16[_0x1d9a[23]],_0x55c4x10):null,from:_0x55c4x12[_0x1d9a[15]][_0x1d9a[25]],to:_0x55c4x12[_0x1d9a[15]][_0x1d9a[26]],cc:_0x55c4x12[_0x1d9a[15]][_0x1d9a[27]],bcc:_0x55c4x12[_0x1d9a[15]][_0x1d9a[28]],accountName:_0x55c4x12[_0x1d9a[15]][_0x1d9a[29]],interactionId:_0x55c4x12[_0x1d9a[15]][_0x1d9a[30]],createdAt:_0x55c4x12[_0x1d9a[15]][_0x1d9a[31]]};_0x55c4x14[_0x1d9a[23]]= _0x55c4x16[_0x1d9a[23]]?Mustache[_0x1d9a[24]](_0x55c4x16[_0x1d9a[23]],_0x55c4x10):null;_0x55c4x14[_0x1d9a[32]]= _0x55c4x16[_0x1d9a[32]]?Mustache[_0x1d9a[24]](_0x55c4x16[_0x1d9a[32]],_0x55c4x10):null;_0x55c4x14[_0x1d9a[33]]= true;_0x55c4x14[_0x1d9a[30]]= _0x55c4x12[_0x1d9a[14]][_0x1d9a[34]];return Message[_0x1d9a[35]](_0x55c4x14)})[_0x1d9a[22]](function(){_0x55c4x12[_0x1d9a[17]]()})[_0x1d9a[21]](function(_0x55c4x15){console[_0x1d9a[20]](_0x55c4x15)})};module[_0x1d9a[44]]= ReplyMail
\ No newline at end of file
diff --git a/server/config/routing/scheduler.js b/server/config/routing/scheduler.js
index 37644f4..2bcc4a2 100644
--- a/server/config/routing/scheduler.js
+++ b/server/config/routing/scheduler.js
@@ -1,346 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const moment = require('moment');
-const config = require('../environment');
-const structure = require('./structure');
-const Util = require('../util');
-
-// NODEJS API
-const cp = require('child_process');
-const util = require('util');
-// MODELS
-const User = require('../../models').User;
-const Interval = require('../../models').Interval;
-
-const MailAccount = require('../../models').MailAccount;
-
-const ReportMail = require('../../models').ReportMail;
-const ReportChat = require('../../models').ReportChat;
-const ReportSms = require('../../models').ReportSms;
-const ReportFax = require('../../models').ReportFax;
-const ReportOpenchannel = require('../../models').ReportOpenchannel;
-
-var Fidelity = require('./fidelity');
-var Agent = require('./agent');
-var Queue = require('./queue');
-var SendMail = require('./sendMail');
-var SendSms = require('./sendSms');
-var ReplyMail = require('./replyMail');
-
-// Define the factory
-function Scheduler(data, msg) {
-  this.data = data;
-  this.msg = msg;
-
-  this._apps = [];
-}
-
-// Define a method with async internals
-Scheduler.prototype.init = function init() {
-  var self = this; // Use a closure to preserve `this`
-  var attributes = ['id', 'app', 'timeout', 'interval', 'UserId'];
-  // HOOKS
-
-  attributes.push(structure.labels.appQueues[self.data.channel]);
-  structure.models.rooms[self.data.channel].addHook('afterUpdate', function(doc, options) {
-    if (self.data.roomid === doc.id) {
-      if (doc.changed('status')) {
-        console.info(util.format('STOP SCHEDULER INSTANCE, INTERACTION:', doc.id));
-
-        self.app && clearTimeout(self.app.timeout);
-        self.app && clearInterval(self.app.interval);
-      }
-    }
-  });
-
-  structure.models.reports[self.data.channel].addHook('afterUpdate', function(doc, options) {
-    if (self.data.roomid === doc.roomid) {
-      if (doc.changed('connectid')) {
-        console.info(util.format('STOP SCHEDULER INSTANCE, INTERACTION:', doc.roomid));
-
-        self.app && clearTimeout(self.app.timeout);
-        self.app && clearInterval(self.app.interval);
-
-        return structure.models.sessions[self.data.channel]
-          .update({
-            memberid: doc.memberid,
-            membername: doc.membername,
-            leaveAt: moment().format("YYYY-MM-DD HH:mm:ss")
-          }, {
-            where: {
-              uniqueid: doc.uniqueid,
-              leaveAt: null
-            },
-            individualHooks: true
-          })
-          .then(function() {
-            return structure.models.rooms[self.data.channel]
-              .update({
-                waiting: false
-              }, {
-                where: {
-                  id: doc.roomid,
-                },
-                individualHooks: true
-              })
-              .then(function() {
-                console.log('dialplan ended');
-              })
-              .catch(function(err) {
-                console.error();
-              });
-          });
-      }
-
-      if (doc.changed('rejectedAt')) {
-        console.info(util.format('STOP SCHEDULER INSTANCE REJECTED, INTERACTION:', doc.roomid, 'AGENT:', doc.membername));
-
-        self.app && self.app.rejected.push({
-          id: doc.memberid
-        });
-      }
-    }
-  });
-
-  if (self.data.channel === 'chat') {
-    structure.models.sessions[self.data.channel].addHook('afterUpdate', function(doc, options) {
-      if (doc.changed('abandon') && doc.abandon) {
-        console.info(util.format('STOP SCHEDULER INSTANCE, INTERACTION:', doc.roomid));
-
-        self.app && clearTimeout(self.app.timeout);
-        self.app && clearInterval(self.app.interval);
-
-        return structure.models.rooms[self.data.channel]
-          .update({
-            status: 'ABANDON'
-          }, {
-            where: {
-              id: self.data.roomid,
-            },
-            individualHooks: true
-          })
-          .then(function() {
-            console.log('dialplan ended');
-          })
-          .catch(function(err) {
-            console.error();
-          });
-      }
-    });
-  }
-
-  return structure.models.accounts[self.data.channel]
-    .findById(self.data.accountid, {
-      attributes: ['id', 'name', 'fidelity', 'timeout']
-    })
-    .then(function(account) {
-      console.info(util.format('CREATE SCHEDULER INSTANCE FOR ACCOUNT %s', account.name));
-
-      if (account.fidelity) {
-        self._apps.push({
-          app: 'fidelity',
-          timeout: account.timeout
-        });
-      }
-
-      switch (self.data.channel) {
-        case 'mail':
-          return account
-            .getMailApplications({
-              order: 'MailApplication.priority ASC',
-              include: [{
-                model: Interval,
-                include: [{
-                  all: true
-                }]
-              }]
-            });
-        case 'chat':
-          return account
-            .getChatApplications({
-              order: 'ChatApplication.priority ASC',
-              include: [{
-                model: Interval,
-                include: [{
-                  all: true
-                }]
-              }]
-            });
-        case 'fax':
-          return account
-            .getFaxApplications({
-              order: 'FaxApplication.priority ASC',
-              include: [{
-                model: Interval,
-                include: [{
-                  all: true
-                }]
-              }]
-            });
-        case 'sms':
-          return account
-            .getSmsApplications({
-              order: 'SmsApplication.priority ASC',
-              include: [{
-                model: Interval,
-                include: [{
-                  all: true
-                }]
-              }]
-            });
-        case 'openchannel':
-          return account
-            .getOpenchannelApplications({
-              order: 'OpenchannelApplication.priority ASC',
-              include: [{
-                model: Interval,
-                include: [{
-                  all: true
-                }]
-              }]
-            });
-        default:
-          return [];
-      }
-    })
-    .then(function(apps) {
-      var valid;
-
-      for (var i = 0; i < apps.length; i++) {
-        valid = true;
-
-        if (apps[i].Interval) {
-          for (var j = 0; j < apps[i].Interval.SubIntervals.length; j++) {
-            if (Util.isValidInterval(Util.splitInterval(apps[i].Interval.SubIntervals[j].interval))) {
-              valid = true;
-              break;
-            } else {
-              console.info(self.data.channel.toUpperCase(), 'APP', apps[i].app.toUpperCase(), 'SKIP BY INTERVAL. INTERACTION:', self.data.roomid);
-              valid = false;
-            }
-          }
-        } else {
-          if (!Util.isValidInterval(Util.splitInterval(apps[i].interval))) {
-            valid = false;
-            console.info(self.data.channel.toUpperCase(), 'APP', apps[i].app.toUpperCase(), 'SKIP BY INTERVAL. INTERACTION:', self.data.roomid);
-          }
-        }
-
-        if (valid) {
-          self._apps.push(apps[i].dataValues)
-        }
-      }
-
-      self.next();
-    });
-};
-
-// Define a method with async internals
-Scheduler.prototype.next = function next() {
-  var self = this; // Use a closure to preserve `this`
-  var app = self._apps.shift();
-
-  if (app) {
-    structure.models.reports[self.data.channel].removeHook('afterUpdate', structure.labels.reports[self.data.channel]);
-
-    switch (app.app) {
-      case 'fidelity':
-        self.app = new Fidelity(app, self.data, function() {
-          return structure.models.sessions[self.data.channel]
-            .update({
-              leaveAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-              timeout: true
-            }, {
-              where: {
-                leaveAt: null,
-                uniqueid: self.data.uniqueid,
-              },
-              individualHooks: true
-            })
-            .then(function() {
-              self.next();
-            });
-        });
-        break;
-      case 'agent':
-        self.app = new Agent(app, self.data, function() {
-          return structure.models.sessions[self.data.channel]
-            .update({
-              leaveAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-              timeout: true
-            }, {
-              where: {
-                leaveAt: null,
-                uniqueid: self.data.uniqueid,
-              },
-              individualHooks: true
-            })
-            .then(function() {
-              self.next();
-            });
-        });
-        break;
-      case 'queue':
-        self.app = new Queue(app, self.data, function() {
-          return structure.models.sessions[self.data.channel]
-            .update({
-              leaveAt: moment().format("YYYY-MM-DD HH:mm:ss"),
-              timeout: true
-            }, {
-              where: {
-                leaveAt: null,
-                uniqueid: self.data.uniqueid,
-              },
-              individualHooks: true
-            })
-            .then(function() {
-              self.next();
-            });
-        });
-        break;
-      case 'sendMail':
-        self.app = new SendMail(app, self.data, function() {
-          self.next();
-        });
-        break;
-      case 'replyMail':
-        self.app = new ReplyMail(app, self.data, function() {
-          self.next();
-        }, self.msg);
-        break;
-      case 'sendSms':
-        self.app = new SendSms(app, self.data, function() {
-          self.next();
-        });
-        break;
-      default:
-        console.log('unknown app');
-    }
-
-    self.app.init();
-  } else {
-
-    var updated = {
-      waiting: false
-    };
-
-    if (self.data.channel === 'chat') {
-      updated.status = 'UNMANAGED';
-    }
-
-    structure.models.rooms[self.data.channel]
-      .update(updated, {
-        where: {
-          id: self.data.roomid,
-        },
-        individualHooks: true
-      })
-      .catch(function(err) {
-        console.error();
-      });
-  }
-};
-
-// Export this file as a module
-module.exports = Scheduler;
+var _0xc355=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x2E\x2E\x2F\x75\x74\x69\x6C","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x2E\x2F\x66\x69\x64\x65\x6C\x69\x74\x79","\x2E\x2F\x61\x67\x65\x6E\x74","\x2E\x2F\x71\x75\x65\x75\x65","\x2E\x2F\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x2E\x2F\x73\x65\x6E\x64\x53\x6D\x73","\x2E\x2F\x72\x65\x70\x6C\x79\x4D\x61\x69\x6C","\x64\x61\x74\x61","\x6D\x73\x67","\x5F\x61\x70\x70\x73","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x64","\x61\x70\x70","\x74\x69\x6D\x65\x6F\x75\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x55\x73\x65\x72\x49\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x70\x70\x51\x75\x65\x75\x65\x73","\x6C\x61\x62\x65\x6C\x73","\x70\x75\x73\x68","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x72\x6F\x6F\x6D\x69\x64","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x53\x54\x4F\x50\x20\x53\x43\x48\x45\x44\x55\x4C\x45\x52\x20\x49\x4E\x53\x54\x41\x4E\x43\x45\x2C\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x66\x6F\x72\x6D\x61\x74","\x69\x6E\x66\x6F","\x61\x64\x64\x48\x6F\x6F\x6B","\x72\x6F\x6F\x6D\x73","\x6D\x6F\x64\x65\x6C\x73","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x64\x69\x61\x6C\x70\x6C\x61\x6E\x20\x65\x6E\x64\x65\x64","\x6C\x6F\x67","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x73\x65\x73\x73\x69\x6F\x6E\x73","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x53\x54\x4F\x50\x20\x53\x43\x48\x45\x44\x55\x4C\x45\x52\x20\x49\x4E\x53\x54\x41\x4E\x43\x45\x20\x52\x45\x4A\x45\x43\x54\x45\x44\x2C\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x41\x47\x45\x4E\x54\x3A","\x72\x65\x6A\x65\x63\x74\x65\x64","\x72\x65\x70\x6F\x72\x74\x73","\x63\x68\x61\x74","\x61\x62\x61\x6E\x64\x6F\x6E","\x41\x42\x41\x4E\x44\x4F\x4E","\x6C\x65\x6E\x67\x74\x68","\x53\x75\x62\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x73\x70\x6C\x69\x74\x49\x6E\x74\x65\x72\x76\x61\x6C","\x69\x73\x56\x61\x6C\x69\x64\x49\x6E\x74\x65\x72\x76\x61\x6C","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x41\x50\x50","\x53\x4B\x49\x50\x20\x42\x59\x20\x49\x4E\x54\x45\x52\x56\x41\x4C\x2E\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6E\x65\x78\x74","\x43\x52\x45\x41\x54\x45\x20\x53\x43\x48\x45\x44\x55\x4C\x45\x52\x20\x49\x4E\x53\x54\x41\x4E\x43\x45\x20\x46\x4F\x52\x20\x41\x43\x43\x4F\x55\x4E\x54\x20\x25\x73","\x6E\x61\x6D\x65","\x66\x69\x64\x65\x6C\x69\x74\x79","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x67\x65\x74\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6D\x61\x69\x6C","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x67\x65\x74\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x67\x65\x74\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x61\x78","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x67\x65\x74\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x6D\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x63\x63\x6F\x75\x6E\x74\x73","\x73\x68\x69\x66\x74","\x72\x65\x6D\x6F\x76\x65\x48\x6F\x6F\x6B","\x61\x67\x65\x6E\x74","\x71\x75\x65\x75\x65","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x72\x65\x70\x6C\x79\x4D\x61\x69\x6C","\x73\x65\x6E\x64\x53\x6D\x73","\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x61\x70\x70","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x65\x78\x70\x6F\x72\x74\x73"];_0xc355[0];const _=require(_0xc355[1]);const moment=require(_0xc355[2]);const config=require(_0xc355[3]);const structure=require(_0xc355[4]);const Util=require(_0xc355[5]);const cp=require(_0xc355[6]);const util=require(_0xc355[7]);const User=require(_0xc355[9])[_0xc355[8]];const Interval=require(_0xc355[9])[_0xc355[10]];const MailAccount=require(_0xc355[9])[_0xc355[11]];const ReportMail=require(_0xc355[9])[_0xc355[12]];const ReportChat=require(_0xc355[9])[_0xc355[13]];const ReportSms=require(_0xc355[9])[_0xc355[14]];const ReportFax=require(_0xc355[9])[_0xc355[15]];const ReportOpenchannel=require(_0xc355[9])[_0xc355[16]];var Fidelity=require(_0xc355[17]);var Agent=require(_0xc355[18]);var Queue=require(_0xc355[19]);var SendMail=require(_0xc355[20]);var SendSms=require(_0xc355[21]);var ReplyMail=require(_0xc355[22]);function Scheduler(_0xcab6x17,_0xcab6x18){this[_0xc355[23]]= _0xcab6x17;this[_0xc355[24]]= _0xcab6x18;this[_0xc355[25]]= []}Scheduler[_0xc355[27]][_0xc355[26]]= function init(){var _0xcab6x1a=this;var _0xcab6x1b=[_0xc355[28],_0xc355[29],_0xc355[30],_0xc355[31],_0xc355[32]];_0xcab6x1b[_0xc355[36]](structure[_0xc355[35]][_0xc355[34]][_0xcab6x1a[_0xc355[23]][_0xc355[33]]]);structure[_0xc355[46]][_0xc355[45]][_0xcab6x1a[_0xc355[23]][_0xc355[33]]][_0xc355[44]](_0xc355[37],function(_0xcab6x1c,_0xcab6x1d){if(_0xcab6x1a[_0xc355[23]][_0xc355[38]]=== _0xcab6x1c[_0xc355[28]]){if(_0xcab6x1c[_0xc355[40]](_0xc355[39])){console[_0xc355[43]](util[_0xc355[42]](_0xc355[41],_0xcab6x1c[_0xc355[28]]));_0xcab6x1a[_0xc355[29]]&& clearTimeout(_0xcab6x1a[_0xc355[29]][_0xc355[30]]);_0xcab6x1a[_0xc355[29]]&& clearInterval(_0xcab6x1a[_0xc355[29]][_0xc355[31]])}}});structure[_0xc355[46]][_0xc355[63]][_0xcab6x1a[_0xc355[23]][_0xc355[33]]][_0xc355[44]](_0xc355[37],function(_0xcab6x1c,_0xcab6x1d){if(_0xcab6x1a[_0xc355[23]][_0xc355[38]]=== _0xcab6x1c[_0xc355[38]]){if(_0xcab6x1c[_0xc355[40]](_0xc355[47])){console[_0xc355[43]](util[_0xc355[42]](_0xc355[41],_0xcab6x1c[_0xc355[38]]));_0xcab6x1a[_0xc355[29]]&& clearTimeout(_0xcab6x1a[_0xc355[29]][_0xc355[30]]);_0xcab6x1a[_0xc355[29]]&& clearInterval(_0xcab6x1a[_0xc355[29]][_0xc355[31]]);return structure[_0xc355[46]][_0xc355[58]][_0xcab6x1a[_0xc355[23]][_0xc355[33]]][_0xc355[53]]({memberid:_0xcab6x1c[_0xc355[54]],membername:_0xcab6x1c[_0xc355[55]],leaveAt:moment()[_0xc355[42]](_0xc355[56])},{where:{uniqueid:_0xcab6x1c[_0xc355[57]],leaveAt:null},individualHooks:true})[_0xc355[52]](function(){return structure[_0xc355[46]][_0xc355[45]][_0xcab6x1a[_0xc355[23]][_0xc355[33]]][_0xc355[53]]({waiting:false},{where:{id:_0xcab6x1c[_0xc355[38]]},individualHooks:true})[_0xc355[52]](function(){console[_0xc355[51]](_0xc355[50])})[_0xc355[49]](function(_0xcab6x1e){console[_0xc355[48]]()})})};if(_0xcab6x1c[_0xc355[40]](_0xc355[59])){console[_0xc355[43]](util[_0xc355[42]](_0xc355[60],_0xcab6x1c[_0xc355[38]],_0xc355[61],_0xcab6x1c[_0xc355[55]]));_0xcab6x1a[_0xc355[29]]&& _0xcab6x1a[_0xc355[29]][_0xc355[62]][_0xc355[36]]({id:_0xcab6x1c[_0xc355[54]]})}}});if(_0xcab6x1a[_0xc355[23]][_0xc355[33]]=== _0xc355[64]){structure[_0xc355[46]][_0xc355[58]][_0xcab6x1a[_0xc355[23]][_0xc355[33]]][_0xc355[44]](_0xc355[37],function(_0xcab6x1c,_0xcab6x1d){if(_0xcab6x1c[_0xc355[40]](_0xc355[65])&& _0xcab6x1c[_0xc355[65]]){console[_0xc355[43]](util[_0xc355[42]](_0xc355[41],_0xcab6x1c[_0xc355[38]]));_0xcab6x1a[_0xc355[29]]&& clearTimeout(_0xcab6x1a[_0xc355[29]][_0xc355[30]]);_0xcab6x1a[_0xc355[29]]&& clearInterval(_0xcab6x1a[_0xc355[29]][_0xc355[31]]);return structure[_0xc355[46]][_0xc355[45]][_0xcab6x1a[_0xc355[23]][_0xc355[33]]][_0xc355[53]]({status:_0xc355[66]},{where:{id:_0xcab6x1a[_0xc355[23]][_0xc355[38]]},individualHooks:true})[_0xc355[52]](function(){console[_0xc355[51]](_0xc355[50])})[_0xc355[49]](function(_0xcab6x1e){console[_0xc355[48]]()})}})};return structure[_0xc355[46]][_0xc355[95]][_0xcab6x1a[_0xc355[23]][_0xc355[33]]][_0xc355[94]](_0xcab6x1a[_0xc355[23]][_0xc355[93]],{attributes:[_0xc355[28],_0xc355[77],_0xc355[78],_0xc355[30]]})[_0xc355[52]](function(_0xcab6x23){console[_0xc355[43]](util[_0xc355[42]](_0xc355[76],_0xcab6x23[_0xc355[77]]));if(_0xcab6x23[_0xc355[78]]){_0xcab6x1a[_0xc355[25]][_0xc355[36]]({app:_0xc355[78],timeout:_0xcab6x23[_0xc355[30]]})};switch(_0xcab6x1a[_0xc355[23]][_0xc355[33]]){case _0xc355[81]:return _0xcab6x23[_0xc355[80]]({order:_0xc355[79],include:[{model:Interval,include:[{all:true}]}]});case _0xc355[64]:return _0xcab6x23[_0xc355[83]]({order:_0xc355[82],include:[{model:Interval,include:[{all:true}]}]});case _0xc355[86]:return _0xcab6x23[_0xc355[85]]({order:_0xc355[84],include:[{model:Interval,include:[{all:true}]}]});case _0xc355[89]:return _0xcab6x23[_0xc355[88]]({order:_0xc355[87],include:[{model:Interval,include:[{all:true}]}]});case _0xc355[92]:return _0xcab6x23[_0xc355[91]]({order:_0xc355[90],include:[{model:Interval,include:[{all:true}]}]});default:return []}})[_0xc355[52]](function(_0xcab6x1f){var _0xcab6x20;for(var _0xcab6x21=0;_0xcab6x21< _0xcab6x1f[_0xc355[67]];_0xcab6x21++){_0xcab6x20= true;if(_0xcab6x1f[_0xcab6x21][_0xc355[10]]){for(var _0xcab6x22=0;_0xcab6x22< _0xcab6x1f[_0xcab6x21][_0xc355[10]][_0xc355[68]][_0xc355[67]];_0xcab6x22++){if(Util[_0xc355[70]](Util[_0xc355[69]](_0xcab6x1f[_0xcab6x21][_0xc355[10]][_0xc355[68]][_0xcab6x22][_0xc355[31]]))){_0xcab6x20= true;break}else {console[_0xc355[43]](_0xcab6x1a[_0xc355[23]][_0xc355[33]][_0xc355[71]](),_0xc355[72],_0xcab6x1f[_0xcab6x21][_0xc355[29]][_0xc355[71]](),_0xc355[73],_0xcab6x1a[_0xc355[23]][_0xc355[38]]);_0xcab6x20= false}}}else {if(!Util[_0xc355[70]](Util[_0xc355[69]](_0xcab6x1f[_0xcab6x21][_0xc355[31]]))){_0xcab6x20= false;console[_0xc355[43]](_0xcab6x1a[_0xc355[23]][_0xc355[33]][_0xc355[71]](),_0xc355[72],_0xcab6x1f[_0xcab6x21][_0xc355[29]][_0xc355[71]](),_0xc355[73],_0xcab6x1a[_0xc355[23]][_0xc355[38]])}};if(_0xcab6x20){_0xcab6x1a[_0xc355[25]][_0xc355[36]](_0xcab6x1f[_0xcab6x21][_0xc355[74]])}};_0xcab6x1a[_0xc355[75]]()})};Scheduler[_0xc355[27]][_0xc355[75]]= function next(){var _0xcab6x1a=this;var _0xcab6x25=_0xcab6x1a[_0xc355[25]][_0xc355[96]]();if(_0xcab6x25){structure[_0xc355[46]][_0xc355[63]][_0xcab6x1a[_0xc355[23]][_0xc355[33]]][_0xc355[97]](_0xc355[37],structure[_0xc355[35]][_0xc355[63]][_0xcab6x1a[_0xc355[23]][_0xc355[33]]]);switch(_0xcab6x25[_0xc355[29]]){case _0xc355[78]:_0xcab6x1a[_0xc355[29]]=  new Fidelity(_0xcab6x25,_0xcab6x1a[_0xc355[23]],function(){return structure[_0xc355[46]][_0xc355[58]][_0xcab6x1a[_0xc355[23]][_0xc355[33]]][_0xc355[53]]({leaveAt:moment()[_0xc355[42]](_0xc355[56]),timeout:true},{where:{leaveAt:null,uniqueid:_0xcab6x1a[_0xc355[23]][_0xc355[57]]},individualHooks:true})[_0xc355[52]](function(){_0xcab6x1a[_0xc355[75]]()})});break;case _0xc355[98]:_0xcab6x1a[_0xc355[29]]=  new Agent(_0xcab6x25,_0xcab6x1a[_0xc355[23]],function(){return structure[_0xc355[46]][_0xc355[58]][_0xcab6x1a[_0xc355[23]][_0xc355[33]]][_0xc355[53]]({leaveAt:moment()[_0xc355[42]](_0xc355[56]),timeout:true},{where:{leaveAt:null,uniqueid:_0xcab6x1a[_0xc355[23]][_0xc355[57]]},individualHooks:true})[_0xc355[52]](function(){_0xcab6x1a[_0xc355[75]]()})});break;case _0xc355[99]:_0xcab6x1a[_0xc355[29]]=  new Queue(_0xcab6x25,_0xcab6x1a[_0xc355[23]],function(){return structure[_0xc355[46]][_0xc355[58]][_0xcab6x1a[_0xc355[23]][_0xc355[33]]][_0xc355[53]]({leaveAt:moment()[_0xc355[42]](_0xc355[56]),timeout:true},{where:{leaveAt:null,uniqueid:_0xcab6x1a[_0xc355[23]][_0xc355[57]]},individualHooks:true})[_0xc355[52]](function(){_0xcab6x1a[_0xc355[75]]()})});break;case _0xc355[100]:_0xcab6x1a[_0xc355[29]]=  new SendMail(_0xcab6x25,_0xcab6x1a[_0xc355[23]],function(){_0xcab6x1a[_0xc355[75]]()});break;case _0xc355[101]:_0xcab6x1a[_0xc355[29]]=  new ReplyMail(_0xcab6x25,_0xcab6x1a[_0xc355[23]],function(){_0xcab6x1a[_0xc355[75]]()},_0xcab6x1a[_0xc355[24]]);break;case _0xc355[102]:_0xcab6x1a[_0xc355[29]]=  new SendSms(_0xcab6x25,_0xcab6x1a[_0xc355[23]],function(){_0xcab6x1a[_0xc355[75]]()});break;default:console[_0xc355[51]](_0xc355[103])};_0xcab6x1a[_0xc355[29]][_0xc355[26]]()}else {var _0xcab6x26={waiting:false};if(_0xcab6x1a[_0xc355[23]][_0xc355[33]]=== _0xc355[64]){_0xcab6x26[_0xc355[39]]= _0xc355[104]};structure[_0xc355[46]][_0xc355[45]][_0xcab6x1a[_0xc355[23]][_0xc355[33]]][_0xc355[53]](_0xcab6x26,{where:{id:_0xcab6x1a[_0xc355[23]][_0xc355[38]]},individualHooks:true})[_0xc355[49]](function(_0xcab6x1e){console[_0xc355[48]]()})}};module[_0xc355[105]]= Scheduler
\ No newline at end of file
diff --git a/server/config/routing/sendMail.js b/server/config/routing/sendMail.js
index 17306f7..ce09c2a 100644
--- a/server/config/routing/sendMail.js
+++ b/server/config/routing/sendMail.js
@@ -1,82 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const config = require('../environment');
-const structure = require('./structure');
-
-// NODEJS API
-const cp = require('child_process');
-const util = require('util');
-const moment = require('moment');
-const Mustache = require('mustache');
-
-// MODELS
-const User = require('../../models').User;
-const Account = require('../../models').MailAccount;
-const Template = require('../../models').Template;
-
-// Define the factory
-function SendMail(app, data, next) {
-  this.app = app;
-  this.data = data;
-  //callbacks
-  this.next = next;
-}
-
-SendMail.prototype.init = function init() {
-  var self = this;
-
-  var _smtp;
-  var _message = {
-    from: [],
-    to: []
-  };
-
-  return Account
-    .findById(self.app.data8)
-    .then(function(account) {
-      return account
-        .getMailServerOut();
-    })
-    .then(function(smtp) {
-      _smtp = smtp;
-      _message.from.push(_smtp.username);
-      _message.to.push(self.app.data2);
-
-      return Template
-        .findById(self.app.data9);
-    })
-    .then(function(template) {
-      _message.subject = template.subject;
-      _message.MailRoomId = self.data.channel === 'mail' ? self.data.roomid : null;
-      _message.html = Mustache.render(template.html, {
-        interactionId: self.data.roomid,
-        subject: template.subject,
-        accountName: self.data.accountname,
-        from: _message.from.join(', '),
-        to: _message.to.join(', '),
-        cc: self.data.channel === 'mail' ? self.data.cc.join(', ') : null,
-        createdAt: self.app.createdAt
-      });
-      if (self.data.messageid) {
-        return structure.models.messages[self.data.channel]
-          .findById(self.data.messageid)
-          .then(function(data) {
-            _message.body = self.data.channel === 'mail' ? data.text : data.body;
-          });
-      }
-    })
-    .then(function() {
-      return structure.models.messages.mail
-        .create(_message);
-    })
-    .then(function() {
-      self.next();
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Export this file as a module
-module.exports = SendMail;
+var _0xe737=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x75\x73\x74\x61\x63\x68\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x61\x70\x70","\x64\x61\x74\x61","\x6E\x65\x78\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x6D\x61\x69\x6C","\x6D\x65\x73\x73\x61\x67\x65\x73","\x6D\x6F\x64\x65\x6C\x73","\x73\x75\x62\x6A\x65\x63\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x72\x6F\x6F\x6D\x69\x64","\x68\x74\x6D\x6C","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x2C\x20","\x6A\x6F\x69\x6E","\x66\x72\x6F\x6D","\x74\x6F","\x63\x63","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x72\x65\x6E\x64\x65\x72","\x6D\x65\x73\x73\x61\x67\x65\x69\x64","\x62\x6F\x64\x79","\x74\x65\x78\x74","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x75\x73\x68","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x39","\x67\x65\x74\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x64\x61\x74\x61\x38","\x65\x78\x70\x6F\x72\x74\x73"];_0xe737[0];const _=require(_0xe737[1]);const config=require(_0xe737[2]);const structure=require(_0xe737[3]);const cp=require(_0xe737[4]);const util=require(_0xe737[5]);const moment=require(_0xe737[6]);const Mustache=require(_0xe737[7]);const User=require(_0xe737[9])[_0xe737[8]];const Account=require(_0xe737[9])[_0xe737[10]];const Template=require(_0xe737[9])[_0xe737[11]];function SendMail(_0xdb1bxc,_0xdb1bxd,_0xdb1bxe){this[_0xe737[12]]= _0xdb1bxc;this[_0xe737[13]]= _0xdb1bxd;this[_0xe737[14]]= _0xdb1bxe}SendMail[_0xe737[16]][_0xe737[15]]= function init(){var _0xdb1bx10=this;var _0xdb1bx11;var _0xdb1bx12={from:[],to:[]};return Account[_0xe737[40]](_0xdb1bx10[_0xe737[12]][_0xe737[46]])[_0xe737[19]](function(_0xdb1bx16){return _0xdb1bx16[_0xe737[45]]()})[_0xe737[19]](function(_0xdb1bx15){_0xdb1bx11= _0xdb1bx15;_0xdb1bx12[_0xe737[32]][_0xe737[42]](_0xdb1bx11[_0xe737[41]]);_0xdb1bx12[_0xe737[33]][_0xe737[42]](_0xdb1bx10[_0xe737[12]][_0xe737[43]]);return Template[_0xe737[40]](_0xdb1bx10[_0xe737[12]][_0xe737[44]])})[_0xe737[19]](function(_0xdb1bx14){_0xdb1bx12[_0xe737[24]]= _0xdb1bx14[_0xe737[24]];_0xdb1bx12[_0xe737[25]]= _0xdb1bx10[_0xe737[13]][_0xe737[26]]=== _0xe737[21]?_0xdb1bx10[_0xe737[13]][_0xe737[27]]:null;_0xdb1bx12[_0xe737[28]]= Mustache[_0xe737[36]](_0xdb1bx14[_0xe737[28]],{interactionId:_0xdb1bx10[_0xe737[13]][_0xe737[27]],subject:_0xdb1bx14[_0xe737[24]],accountName:_0xdb1bx10[_0xe737[13]][_0xe737[29]],from:_0xdb1bx12[_0xe737[32]][_0xe737[31]](_0xe737[30]),to:_0xdb1bx12[_0xe737[33]][_0xe737[31]](_0xe737[30]),cc:_0xdb1bx10[_0xe737[13]][_0xe737[26]]=== _0xe737[21]?_0xdb1bx10[_0xe737[13]][_0xe737[34]][_0xe737[31]](_0xe737[30]):null,createdAt:_0xdb1bx10[_0xe737[12]][_0xe737[35]]});if(_0xdb1bx10[_0xe737[13]][_0xe737[37]]){return structure[_0xe737[23]][_0xe737[22]][_0xdb1bx10[_0xe737[13]][_0xe737[26]]][_0xe737[40]](_0xdb1bx10[_0xe737[13]][_0xe737[37]])[_0xe737[19]](function(_0xdb1bxd){_0xdb1bx12[_0xe737[38]]= _0xdb1bx10[_0xe737[13]][_0xe737[26]]=== _0xe737[21]?_0xdb1bxd[_0xe737[39]]:_0xdb1bxd[_0xe737[38]]})}})[_0xe737[19]](function(){return structure[_0xe737[23]][_0xe737[22]][_0xe737[21]][_0xe737[20]](_0xdb1bx12)})[_0xe737[19]](function(){_0xdb1bx10[_0xe737[14]]()})[_0xe737[18]](function(_0xdb1bx13){console[_0xe737[17]](_0xdb1bx13)})};module[_0xe737[47]]= SendMail
\ No newline at end of file
diff --git a/server/config/routing/sendSms.js b/server/config/routing/sendSms.js
index 9850581..984fbf5 100644
--- a/server/config/routing/sendSms.js
+++ b/server/config/routing/sendSms.js
@@ -1,56 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const config = require('../environment');
-const structure = require('./structure');
-
-// NODEJS API
-const cp = require('child_process');
-const util = require('util');
-const moment = require('moment');
-const Mustache = require('mustache');
-
-// MODELS
-const User = require('../../models').User;
-const Message = require('../../models').SmsMessage;
-const Account = require('../../models').SmsAccount;
-
-// Define the factory
-function SendSms(app, data, next) {
-  this.app = app;
-  this.data = data;
-  //callbacks
-  this.next = next;
-}
-
-SendSms.prototype.init = function init() {
-  var self = this;
-  var _smtp;
-  var _message = {
-    from: '',
-    to: '',
-    body: ''
-  };
-
-  return Account
-    .findById(self.app.data8)
-    .then(function(account) {
-      _message.SmsAccountId = account.id;
-      _message.from = account.phone;
-      _message.to = self.app.data2;
-      _message.body = self.app.data6;
-      _message.auto = true;
-      _message.status = 'SENDING';
-      return Message
-        .create(_message);
-    })
-    .then(function(message) {
-      self.next();
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Export this file as a module
-module.exports = SendSms;
+var _0xb308=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x75\x73\x74\x61\x63\x68\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x61\x70\x70","\x64\x61\x74\x61","\x6E\x65\x78\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x69\x64","\x66\x72\x6F\x6D","\x70\x68\x6F\x6E\x65","\x74\x6F","\x64\x61\x74\x61\x32","\x62\x6F\x64\x79","\x64\x61\x74\x61\x36","\x61\x75\x74\x6F","\x73\x74\x61\x74\x75\x73","\x53\x45\x4E\x44\x49\x4E\x47","\x63\x72\x65\x61\x74\x65","\x64\x61\x74\x61\x38","\x66\x69\x6E\x64\x42\x79\x49\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0xb308[0];const _=require(_0xb308[1]);const config=require(_0xb308[2]);const structure=require(_0xb308[3]);const cp=require(_0xb308[4]);const util=require(_0xb308[5]);const moment=require(_0xb308[6]);const Mustache=require(_0xb308[7]);const User=require(_0xb308[9])[_0xb308[8]];const Message=require(_0xb308[9])[_0xb308[10]];const Account=require(_0xb308[9])[_0xb308[11]];function SendSms(_0x52e6xc,_0x52e6xd,_0x52e6xe){this[_0xb308[12]]= _0x52e6xc;this[_0xb308[13]]= _0x52e6xd;this[_0xb308[14]]= _0x52e6xe}SendSms[_0xb308[16]][_0xb308[15]]= function init(){var _0x52e6x10=this;var _0x52e6x11;var _0x52e6x12={from:_0xb308[17],to:_0xb308[17],body:_0xb308[17]};return Account[_0xb308[34]](_0x52e6x10[_0xb308[12]][_0xb308[33]])[_0xb308[20]](function(_0x52e6x15){_0x52e6x12[_0xb308[21]]= _0x52e6x15[_0xb308[22]];_0x52e6x12[_0xb308[23]]= _0x52e6x15[_0xb308[24]];_0x52e6x12[_0xb308[25]]= _0x52e6x10[_0xb308[12]][_0xb308[26]];_0x52e6x12[_0xb308[27]]= _0x52e6x10[_0xb308[12]][_0xb308[28]];_0x52e6x12[_0xb308[29]]= true;_0x52e6x12[_0xb308[30]]= _0xb308[31];return Message[_0xb308[32]](_0x52e6x12)})[_0xb308[20]](function(_0x52e6x14){_0x52e6x10[_0xb308[14]]()})[_0xb308[19]](function(_0x52e6x13){console[_0xb308[18]](_0x52e6x13)})};module[_0xb308[35]]= SendSms
\ No newline at end of file
diff --git a/server/config/routing/structure.js b/server/config/routing/structure.js
index e0624e9..5d06789 100644
--- a/server/config/routing/structure.js
+++ b/server/config/routing/structure.js
@@ -1,140 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const moment = require('moment');
-const config = require('../environment');
-// NODEJS API
-const cp = require('child_process');
-const util = require('util');
-// MODELS
-const User = require('../../models').User;
-const Interval = require('../../models').Interval;
-
-const ReportMail = require('../../models').ReportMail;
-const ReportChat = require('../../models').ReportChat;
-const ReportSms = require('../../models').ReportSms;
-const ReportFax = require('../../models').ReportFax;
-const ReportOpenchannel = require('../../models').ReportOpenchannel;
-
-const MailAccount = require('../../models').MailAccount;
-const ChatWebsite = require('../../models').ChatWebsite;
-const SmsAccount = require('../../models').SmsAccount;
-const FaxAccount = require('../../models').FaxAccount;
-const OpenchannelAccount = require('../../models').OpenchannelAccount;
-
-const MailQueue = require('../../models').MailQueue;
-const ChatQueue = require('../../models').ChatQueue;
-const SmsQueue = require('../../models').SmsQueue;
-const FaxQueue = require('../../models').FaxQueue;
-const OpenchannelQueue = require('../../models').OpenchannelQueue;
-
-const MailRoom = require('../../models').MailRoom;
-const ChatRoom = require('../../models').ChatRoom;
-const SmsRoom = require('../../models').SmsRoom;
-const FaxRoom = require('../../models').FaxRoom;
-const OpenchannelRoom = require('../../models').OpenchannelRoom;
-
-const MailSession = require('../../models').ReportMailSession;
-const ChatSession = require('../../models').ReportChatSession;
-const SmsSession = require('../../models').ReportSmsSession;
-const FaxSession = require('../../models').ReportFaxSession;
-const OpenchannelSession = require('../../models').ReportOpenchannelSession;
-
-const MailMessage = require('../../models').MailMessage;
-const ChatMessage = require('../../models').ChatMessage;
-const SmsMessage = require('../../models').SmsMessage;
-const FaxMessage = require('../../models').FaxMessage;
-const OpenchannelMessage = require('../../models').OpenchannelMessage;
-
-// Export this file as a module
-module.exports = {
-  labels: {
-    rooms: {
-      mail: 'MailRooms',
-      chat: 'ChatRooms',
-      sms: 'SmsRooms',
-      fax: 'FaxRooms',
-      openchannel: 'OpenchannelRooms'
-    },
-    pauses: {
-      mail: 'mailPause',
-      chat: 'chatPause',
-      sms: 'smsPause',
-      fax: 'faxPause',
-      openchannel: 'openchannelPause'
-    },
-    capacities: {
-      mail: 'mailCapacity',
-      chat: 'chatCapacity',
-      sms: 'smsCapacity',
-      fax: 'faxCapacity',
-      openchannel: 'openchannelCapacity'
-    },
-    appQueues: {
-      mail: 'MailQueueId',
-      chat: 'ChatQueueId',
-      sms: 'SmsQueueId',
-      fax: 'FaxQueueId',
-      openchannel: 'OpenchannelQueueId'
-    },
-    penaltyTables: {
-      mail: 'UserHasMailQueue.penalty',
-      chat: 'UserHasChatQueue.penalty',
-      sms: 'UserHasSmsQueue.penalty',
-      fax: 'UserHasFaxQueue.penalty',
-      openchannel: 'UserHasOpenchannelQueue.penalty'
-    },
-    reports: {
-      mail: 'report_mail',
-      chat: 'report_chat',
-      sms: 'report_sms',
-      fax: 'report_fax',
-      openchannel: 'report_openchannel'
-    }
-  },
-
-  models: {
-    reports: {
-      mail: ReportMail,
-      chat: ReportChat,
-      sms: ReportSms,
-      fax: ReportFax,
-      openchannel: ReportOpenchannel
-    },
-    accounts: {
-      mail: MailAccount,
-      chat: ChatWebsite,
-      sms: SmsAccount,
-      fax: FaxAccount,
-      openchannel: OpenchannelAccount
-    },
-    queues: {
-      mail: MailQueue,
-      chat: ChatQueue,
-      sms: SmsQueue,
-      fax: FaxQueue,
-      openchannel: OpenchannelQueue
-    },
-    rooms: {
-      mail: MailRoom,
-      chat: ChatRoom,
-      sms: SmsRoom,
-      fax: FaxRoom,
-      openchannel: OpenchannelRoom
-    },
-    sessions: {
-      mail: MailSession,
-      chat: ChatSession,
-      sms: SmsSession,
-      fax: FaxSession,
-      openchannel: OpenchannelSession
-    },
-    messages: {
-      mail: MailMessage,
-      chat: ChatMessage,
-      sms: SmsMessage,
-      fax: FaxMessage,
-      openchannel: OpenchannelMessage
-    }
-  }
-};
+var _0x8dc4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x53\x6D\x73\x52\x6F\x6F\x6D","\x46\x61\x78\x52\x6F\x6F\x6D","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x53\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D\x73","\x53\x6D\x73\x52\x6F\x6F\x6D\x73","\x46\x61\x78\x52\x6F\x6F\x6D\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x73","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x73\x6D\x73\x50\x61\x75\x73\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x50\x61\x75\x73\x65","\x6D\x61\x69\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x63\x68\x61\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x73\x6D\x73\x43\x61\x70\x61\x63\x69\x74\x79","\x66\x61\x78\x43\x61\x70\x61\x63\x69\x74\x79","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x49\x64","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x49\x64","\x53\x6D\x73\x51\x75\x65\x75\x65\x49\x64","\x46\x61\x78\x51\x75\x65\x75\x65\x49\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x49\x64","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C"];_0x8dc4[0];const _=require(_0x8dc4[1]);const moment=require(_0x8dc4[2]);const config=require(_0x8dc4[3]);const cp=require(_0x8dc4[4]);const util=require(_0x8dc4[5]);const User=require(_0x8dc4[7])[_0x8dc4[6]];const Interval=require(_0x8dc4[7])[_0x8dc4[8]];const ReportMail=require(_0x8dc4[7])[_0x8dc4[9]];const ReportChat=require(_0x8dc4[7])[_0x8dc4[10]];const ReportSms=require(_0x8dc4[7])[_0x8dc4[11]];const ReportFax=require(_0x8dc4[7])[_0x8dc4[12]];const ReportOpenchannel=require(_0x8dc4[7])[_0x8dc4[13]];const MailAccount=require(_0x8dc4[7])[_0x8dc4[14]];const ChatWebsite=require(_0x8dc4[7])[_0x8dc4[15]];const SmsAccount=require(_0x8dc4[7])[_0x8dc4[16]];const FaxAccount=require(_0x8dc4[7])[_0x8dc4[17]];const OpenchannelAccount=require(_0x8dc4[7])[_0x8dc4[18]];const MailQueue=require(_0x8dc4[7])[_0x8dc4[19]];const ChatQueue=require(_0x8dc4[7])[_0x8dc4[20]];const SmsQueue=require(_0x8dc4[7])[_0x8dc4[21]];const FaxQueue=require(_0x8dc4[7])[_0x8dc4[22]];const OpenchannelQueue=require(_0x8dc4[7])[_0x8dc4[23]];const MailRoom=require(_0x8dc4[7])[_0x8dc4[24]];const ChatRoom=require(_0x8dc4[7])[_0x8dc4[25]];const SmsRoom=require(_0x8dc4[7])[_0x8dc4[26]];const FaxRoom=require(_0x8dc4[7])[_0x8dc4[27]];const OpenchannelRoom=require(_0x8dc4[7])[_0x8dc4[28]];const MailSession=require(_0x8dc4[7])[_0x8dc4[29]];const ChatSession=require(_0x8dc4[7])[_0x8dc4[30]];const SmsSession=require(_0x8dc4[7])[_0x8dc4[31]];const FaxSession=require(_0x8dc4[7])[_0x8dc4[32]];const OpenchannelSession=require(_0x8dc4[7])[_0x8dc4[33]];const MailMessage=require(_0x8dc4[7])[_0x8dc4[34]];const ChatMessage=require(_0x8dc4[7])[_0x8dc4[35]];const SmsMessage=require(_0x8dc4[7])[_0x8dc4[36]];const FaxMessage=require(_0x8dc4[7])[_0x8dc4[37]];const OpenchannelMessage=require(_0x8dc4[7])[_0x8dc4[38]];module[_0x8dc4[39]]= {labels:{rooms:{mail:_0x8dc4[40],chat:_0x8dc4[41],sms:_0x8dc4[42],fax:_0x8dc4[43],openchannel:_0x8dc4[44]},pauses:{mail:_0x8dc4[45],chat:_0x8dc4[46],sms:_0x8dc4[47],fax:_0x8dc4[48],openchannel:_0x8dc4[49]},capacities:{mail:_0x8dc4[50],chat:_0x8dc4[51],sms:_0x8dc4[52],fax:_0x8dc4[53],openchannel:_0x8dc4[54]},appQueues:{mail:_0x8dc4[55],chat:_0x8dc4[56],sms:_0x8dc4[57],fax:_0x8dc4[58],openchannel:_0x8dc4[59]},penaltyTables:{mail:_0x8dc4[60],chat:_0x8dc4[61],sms:_0x8dc4[62],fax:_0x8dc4[63],openchannel:_0x8dc4[64]},reports:{mail:_0x8dc4[65],chat:_0x8dc4[66],sms:_0x8dc4[67],fax:_0x8dc4[68],openchannel:_0x8dc4[69]}},models:{reports:{mail:ReportMail,chat:ReportChat,sms:ReportSms,fax:ReportFax,openchannel:ReportOpenchannel},accounts:{mail:MailAccount,chat:ChatWebsite,sms:SmsAccount,fax:FaxAccount,openchannel:OpenchannelAccount},queues:{mail:MailQueue,chat:ChatQueue,sms:SmsQueue,fax:FaxQueue,openchannel:OpenchannelQueue},rooms:{mail:MailRoom,chat:ChatRoom,sms:SmsRoom,fax:FaxRoom,openchannel:OpenchannelRoom},sessions:{mail:MailSession,chat:ChatSession,sms:SmsSession,fax:FaxSession,openchannel:OpenchannelSession},messages:{mail:MailMessage,chat:ChatMessage,sms:SmsMessage,fax:FaxMessage,openchannel:OpenchannelMessage}}}
\ No newline at end of file
diff --git a/server/config/scheduler/index.js b/server/config/scheduler/index.js
index 429d7a2..d5f1d3d 100644
--- a/server/config/scheduler/index.js
+++ b/server/config/scheduler/index.js
@@ -1,103 +1 @@
-var Schedule = require('../../models').Schedule;
-var MailServerOut = require('../../models').MailServerOut;
-var CronJobManager = require('cron-job-manager');
-var _ = require('lodash');
-var Reports = require('./reports');
-
-
-function deleteSchedule(data, manager) {
-  console.log("Deleting " + data.name + " job");
-  if (manager.exists(data.id.toString())) {
-    manager.deleteJob(data.id.toString());
-    console.log("I got the current jobs: " + manager);
-  } else {
-    console.log("Job " + data.name + " does not exist");
-  }
-}
-
-function updateSchedule(data, manager, reports) {
-  console.log("Updating " + data.name + " job");
-  if (data.active) {
-    createJob(data, manager, reports);
-  } else {
-    deleteSchedule(data, manager);
-  }
-}
-
-module.exports = function() {
-  var manager = new CronJobManager();
-  var reports = new Reports();
-
-  Schedule
-    .findAll({
-      where: {
-        active: true
-      },
-      attributes: ['id', 'name', 'type', 'active']
-    })
-    .then(function(schedules) {
-      _.forEach(schedules.rows, function(schedule) {
-        createJob(schedule, manager, reports);
-      });
-    })
-    .finally(function() {
-      synchSchedules(manager, reports);
-    })
-    .catch(function(err) {
-      console.log('Error getting/setting schedules');
-    });
-};
-
-function createJob(schedule, manager, reports) {
-  console.log("Creating '" + schedule.name + "' job");
-  manager.add(schedule.id.toString(),
-    "00 " + schedule.cron,
-    // "00 */2 * * * *",
-    function() {
-      executeSchedule(schedule.id, reports);
-    }, {
-      start: true,
-      completion: function() {
-        console.log("Job " + schedule.name + " stopped");
-      }
-    });
-  console.log("Job '" + schedule.name + "' created!");
-  console.log("I got the current jobs: " + manager);
-}
-
-function executeSchedule(scheduleId, reports) {
-  console.log('Executing schedule ', scheduleId);
-  return Schedule
-    .findById(scheduleId, {
-      include: [MailServerOut]
-    })
-    .then(function(schedule) {
-      if (!schedule) {
-        console.log('Schedule not found!');
-        return;
-      }
-      switch (schedule.type) {
-        case 'report':
-          reports.extractReport(schedule);
-          break;
-        default:
-      }
-    })
-    .catch(function(err) {
-      console.log('Error retrieving schedule!');
-    });
-}
-
-function synchSchedules(manager, reports) {
-  Schedule.afterCreate(function(doc, options) {
-    if (doc.active) {
-      createJob(doc.dataValues, manager, reports);
-    }
-  });
-  Schedule.afterUpdate(function(doc, options) {
-    updateSchedule(doc.dataValues, manager, reports);
-  });
-  Schedule.afterDestroy(function(doc) {
-    deleteSchedule(doc.dataValues, manager);
-  });
-}
+var _0xae57=["\x53\x63\x68\x65\x64\x75\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x63\x72\x6F\x6E\x2D\x6A\x6F\x62\x2D\x6D\x61\x6E\x61\x67\x65\x72","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x73","\x44\x65\x6C\x65\x74\x69\x6E\x67\x20","\x6E\x61\x6D\x65","\x20\x6A\x6F\x62","\x6C\x6F\x67","\x69\x64","\x65\x78\x69\x73\x74\x73","\x64\x65\x6C\x65\x74\x65\x4A\x6F\x62","\x49\x20\x67\x6F\x74\x20\x74\x68\x65\x20\x63\x75\x72\x72\x65\x6E\x74\x20\x6A\x6F\x62\x73\x3A\x20","\x4A\x6F\x62\x20","\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x55\x70\x64\x61\x74\x69\x6E\x67\x20","\x61\x63\x74\x69\x76\x65","\x65\x78\x70\x6F\x72\x74\x73","\x45\x72\x72\x6F\x72\x20\x67\x65\x74\x74\x69\x6E\x67\x2F\x73\x65\x74\x74\x69\x6E\x67\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x73","\x63\x61\x74\x63\x68","\x66\x69\x6E\x61\x6C\x6C\x79","\x72\x6F\x77\x73","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x74\x79\x70\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x27","\x27\x20\x6A\x6F\x62","\x30\x30\x20","\x63\x72\x6F\x6E","\x20\x73\x74\x6F\x70\x70\x65\x64","\x61\x64\x64","\x4A\x6F\x62\x20\x27","\x27\x20\x63\x72\x65\x61\x74\x65\x64\x21","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x20","\x45\x72\x72\x6F\x72\x20\x72\x65\x74\x72\x69\x65\x76\x69\x6E\x67\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x21","\x53\x63\x68\x65\x64\x75\x6C\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x21","\x65\x78\x74\x72\x61\x63\x74\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79"];var Schedule=require(_0xae57[1])[_0xae57[0]];var MailServerOut=require(_0xae57[1])[_0xae57[2]];var CronJobManager=require(_0xae57[3]);var _=require(_0xae57[4]);var Reports=require(_0xae57[5]);function deleteSchedule(_0x9d0ex7,_0x9d0ex8){console[_0xae57[9]](_0xae57[6]+ _0x9d0ex7[_0xae57[7]]+ _0xae57[8]);if(_0x9d0ex8[_0xae57[11]](_0x9d0ex7[_0xae57[10]].toString())){_0x9d0ex8[_0xae57[12]](_0x9d0ex7[_0xae57[10]].toString());console[_0xae57[9]](_0xae57[13]+ _0x9d0ex8)}else {console[_0xae57[9]](_0xae57[14]+ _0x9d0ex7[_0xae57[7]]+ _0xae57[15])}}function updateSchedule(_0x9d0ex7,_0x9d0ex8,_0x9d0exa){console[_0xae57[9]](_0xae57[16]+ _0x9d0ex7[_0xae57[7]]+ _0xae57[8]);if(_0x9d0ex7[_0xae57[17]]){createJob(_0x9d0ex7,_0x9d0ex8,_0x9d0exa)}else {deleteSchedule(_0x9d0ex7,_0x9d0ex8)}}module[_0xae57[18]]= function(){var _0x9d0ex8= new CronJobManager();var _0x9d0exa= new Reports();Schedule[_0xae57[26]]({where:{active:true},attributes:[_0xae57[10],_0xae57[7],_0xae57[25],_0xae57[17]]})[_0xae57[24]](function(_0x9d0exc){_[_0xae57[23]](_0x9d0exc[_0xae57[22]],function(_0x9d0exd){createJob(_0x9d0exd,_0x9d0ex8,_0x9d0exa)})})[_0xae57[21]](function(){synchSchedules(_0x9d0ex8,_0x9d0exa)})[_0xae57[20]](function(_0x9d0exb){console[_0xae57[9]](_0xae57[19])})};function createJob(_0x9d0exd,_0x9d0ex8,_0x9d0exa){console[_0xae57[9]](_0xae57[27]+ _0x9d0exd[_0xae57[7]]+ _0xae57[28]);_0x9d0ex8[_0xae57[32]](_0x9d0exd[_0xae57[10]].toString(),_0xae57[29]+ _0x9d0exd[_0xae57[30]],function(){executeSchedule(_0x9d0exd[_0xae57[10]],_0x9d0exa)},{start:true,completion:function(){console[_0xae57[9]](_0xae57[14]+ _0x9d0exd[_0xae57[7]]+ _0xae57[31])}});console[_0xae57[9]](_0xae57[33]+ _0x9d0exd[_0xae57[7]]+ _0xae57[34]);console[_0xae57[9]](_0xae57[13]+ _0x9d0ex8)}function executeSchedule(_0x9d0ex10,_0x9d0exa){console[_0xae57[9]](_0xae57[35],_0x9d0ex10);return Schedule[_0xae57[40]](_0x9d0ex10,{include:[MailServerOut]})[_0xae57[24]](function(_0x9d0exd){if(!_0x9d0exd){console[_0xae57[9]](_0xae57[37]);return};switch(_0x9d0exd[_0xae57[25]]){case _0xae57[39]:_0x9d0exa[_0xae57[38]](_0x9d0exd);break;default:}})[_0xae57[20]](function(_0x9d0exb){console[_0xae57[9]](_0xae57[36])})}function synchSchedules(_0x9d0ex8,_0x9d0exa){Schedule[_0xae57[42]](function(_0x9d0ex12,_0x9d0ex13){if(_0x9d0ex12[_0xae57[17]]){createJob(_0x9d0ex12[_0xae57[41]],_0x9d0ex8,_0x9d0exa)}});Schedule[_0xae57[43]](function(_0x9d0ex12,_0x9d0ex13){updateSchedule(_0x9d0ex12[_0xae57[41]],_0x9d0ex8,_0x9d0exa)});Schedule[_0xae57[44]](function(_0x9d0ex12){deleteSchedule(_0x9d0ex12[_0xae57[41]],_0x9d0ex8)})}
\ No newline at end of file
diff --git a/server/config/scheduler/reports.js b/server/config/scheduler/reports.js
index 70e212f..93a51a0 100644
--- a/server/config/scheduler/reports.js
+++ b/server/config/scheduler/reports.js
@@ -1,228 +1 @@
-var cp = require('child_process');
-var moment = require('moment');
-require('moment-range');
-var CustomReport = require('../../models').CustomReport;
-var DefaultReport = require('../../models').DefaultReport;
-var ExtractedReport = require('../../models').ExtractedReport;
-var MailAttachment = require('../../models').MailAttachment;
-var MailServerOut = require('../../models').MailServerOut;
-var MailMessage = require('../../models').MailMessage;
-var path = require('path');
-var config = require('../../config/environment');
-var fs = require('fs-extra');
-var _ = require('lodash');
-var ReportTree = require('../../models').ReportTree;
-
-function Reports() {
-  console.log('Reports schedules launcher Initialization...');
-}
-
-Reports.prototype.extractReport = function(schedule, user) {
-  console.log('Extracting report...');
-  extract(schedule, user);
-}
-
-function extract(schedule, user) {
-  switch (schedule.cronType) {
-    case 'currentDay':
-      extractTodayReport(schedule, user);
-      break;
-    default:
-      extractRangeReport(schedule, user);
-      break;
-  }
-}
-
-function extractTodayReport(schedule, user) {
-  console.log('Checking today schedule range validity...');
-  if (user || checkValidity(schedule.validityStart, schedule.validityEnd)) {
-    console.log('The hours range is valid, extracting today report...');
-    docExtract(schedule, moment().format('YYYY-MM-DD'), moment().format('YYYY-MM-DD'), user, '00:00', '23:59');
-  } else {
-    console.log('Out of hours range, skipping record extraction!');
-  }
-}
-
-function extractRangeReport(schedule, user) {
-  switch (schedule.reportRange) {
-    case 'yesterday':
-      docExtract(schedule, moment().subtract(1, 'days').format('YYYY-MM-DD'), moment().subtract(1, 'days').format('YYYY-MM-DD'), user)
-      break;
-    case 'last7':
-      docExtract(schedule, moment().subtract(7, 'days').format('YYYY-MM-DD'), moment().subtract(1, 'days').format('YYYY-MM-DD'), user)
-      break;
-    case 'last30':
-      docExtract(schedule, moment().subtract(30, 'days').format('YYYY-MM-DD'), moment().subtract(1, 'days').format('YYYY-MM-DD'), user)
-      break;
-    case 'lastMonth':
-      docExtract(schedule, moment().subtract(1, 'months').startOf('month').format('YYYY-MM-DD'), moment().subtract(1, 'months').endOf('month').format('YYYY-MM-DD'), user)
-      break;
-  }
-}
-
-function checkValidity(startHour, endHour) {
-  return moment().range(moment(startHour, "h"), moment(endHour, "h")).contains(moment());
-}
-
-function getReportPath(folder, tree, path) {
-  path = folder.text + '/ ' + path;
-  if (folder.parent === '#') {
-    return path;
-  } else {
-    return getReportPath(_.find(tree, {
-      id: folder.parent
-    }), tree, path);
-  }
-}
-
-function docExtract(schedule, startDate, endDate, user, startTime, endTime) {
-  // console.log('common docExtract api function');
-  var resource = schedule.reportType === 'default' ? DefaultReport : CustomReport;
-  var report;
-  resource //DO NOT ADD RETURN CAUSE THE EXTRACTING FUNCTION WILL KEEP EXTRACTING AFTER THE API HAS RETURNED
-    .scope('fields')
-    .findById(schedule.reportId)
-    .then(function(_report) {
-      if (!_report) {
-        console.log('Report not found!');
-        return;
-      }
-      report = _report;
-      return ReportTree
-        .findById(schedule.reportType === 'default' ? 1 : 2);
-    })
-    .then(function(tree) {
-      tree = JSON.parse(tree.tree);
-      var folder = _.find(tree, {
-        id: report.parent
-      });
-      var path = getReportPath(folder, tree, report.name);
-      // console.log('found the report, creating the new DB row for extracted reports..');
-      //CREATE A DB ROW IN A TABLE WITH THE REPORT INFO, QUERY DATES, AND THE STATUS 'ELABORATING'
-      if (schedule.cronType === 'currentDay') {
-        report.dataValues.table = report.dataValues.table.replace('_history', '');
-      }
-      return [report, ExtractedReport.create({
-        name: report.name,
-        startDate: startDate,
-        endDate: endDate,
-        output: schedule.reportOutput,
-        type: user ? 'manual' : 'scheduled',
-        UserId: user ? user.id : null
-      })]
-    })
-    .spread(function(report, extractedReport) {
-      // console.log('created new extracted reports db entry, calling external extraction function: ' + typeFunction);
-      var child = cp.fork(__dirname + '/../../utils/report_extraction.js');
-      child.on('message', function(data) {
-        console.log('child message', data);
-        if (schedule.sendMail && data.status === 'completed') {
-          sendReportByMail(schedule, extractedReport.id, user, child);
-        } else {
-          child.kill();
-        }
-      }).on('close', function() {
-        console.log('child close');
-      }).on('error', function(err) {
-        console.log('child error', err);
-      });
-      child.send({
-        report: report,
-        query: {
-          startDate: startDate,
-          endDate: endDate,
-          startTime: startTime || null,
-          endTime: endTime || null
-        },
-        extractedId: extractedReport.id,
-        user: user ? user : {
-          role: 'admin'
-        },
-        type: schedule.reportOutput
-      });
-    })
-    .catch(function(err) {
-      console.log('Scheduled report extraction error: ', err);
-    });
-}
-
-function sendReportByMail(schedule, extractedId, user, child) {
-  var _extract;
-  return ExtractedReport
-    .findById(extractedId)
-    .then(function(extract) {
-      if (!extract) {
-        console.log('Extracted report not found!');
-        return;
-      }
-      _extract = extract;
-      if (schedule.MailServerOut && schedule.MailServerOut.username) {
-        var attachment = getAttachment(_extract);
-        var message = {
-          subject: 'Scheduled Report',
-          from: [schedule.MailServerOut.username],
-          to: [schedule.email],
-          cc: [],
-          html: null,
-          text: null,
-          inReplyTo: null,
-          status: 'SENDING',
-          attachment: true,
-          UserId: user ? user.id : null, //how to get user if sent automatically??
-          MailAttachments: [attachment]
-        };
-        return MailMessage
-          .create(message, {
-            include: [{
-              model: MailAttachment
-            }]
-          })
-      } else {
-        throw new Error("No Account or SMTP address configured");
-      }
-    })
-    .then(function(mailMessage) {
-      return _extract.setMailMessage(mailMessage);
-    })
-    .then(function() {
-      console.log('Scheduled message sent!');
-    })
-    .catch(function(err) {
-      console.log('Error sending extracted report by mail!', err);
-    })
-    .finally(function() {
-      child.kill();
-    });
-}
-
-function getAttachment(extract) {
-  var oldFile = path.join(config.root, 'server', 'files', 'reports', extract.savename);
-  var newPath = path.join(config.root, 'server', 'files', 'attachments');
-  var newSavename = path.basename(extract.savename, '.' + extract.output.toLowerCase());
-  try {
-    fs.copySync(oldFile, path.join(newPath, newSavename));
-    console.log("success!");
-  } catch (err) {
-    console.error('Error getting the extracted report attachment!');
-    return null;
-  }
-  return {
-    size: getFilesizeInBytes(oldFile),
-    path: path.join(newPath, newSavename),
-    name: extract.name + '_' + moment(extract.startDate).format("DD-MM-YYYY") + '_' + moment(extract.endDate).format("DD-MM-YYYY") + '.' + extract.output.toLowerCase(),
-    type: 'application/' + extract.output.toLowerCase(),
-    basename: newSavename
-  };
-}
-
-function getFilesizeInBytes(filename) {
-  try {
-    var stats = fs.statSync(filename)
-    var fileSizeInBytes = stats.size;
-    return fileSizeInBytes
-  } catch (err) {
-    return 0;
-  }
-}
-
-module.exports = Reports;
+var _0x7593=["\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x6F\x6D\x65\x6E\x74\x2D\x72\x61\x6E\x67\x65","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x66\x73\x2D\x65\x78\x74\x72\x61","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x52\x65\x70\x6F\x72\x74\x73\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x73\x20\x6C\x61\x75\x6E\x63\x68\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x65\x78\x74\x72\x61\x63\x74\x52\x65\x70\x6F\x72\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x45\x78\x74\x72\x61\x63\x74\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x2E\x2E\x2E","\x63\x75\x72\x72\x65\x6E\x74\x44\x61\x79","\x63\x72\x6F\x6E\x54\x79\x70\x65","\x43\x68\x65\x63\x6B\x69\x6E\x67\x20\x74\x6F\x64\x61\x79\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x20\x72\x61\x6E\x67\x65\x20\x76\x61\x6C\x69\x64\x69\x74\x79\x2E\x2E\x2E","\x76\x61\x6C\x69\x64\x69\x74\x79\x53\x74\x61\x72\x74","\x76\x61\x6C\x69\x64\x69\x74\x79\x45\x6E\x64","\x54\x68\x65\x20\x68\x6F\x75\x72\x73\x20\x72\x61\x6E\x67\x65\x20\x69\x73\x20\x76\x61\x6C\x69\x64\x2C\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6E\x67\x20\x74\x6F\x64\x61\x79\x20\x72\x65\x70\x6F\x72\x74\x2E\x2E\x2E","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44","\x66\x6F\x72\x6D\x61\x74","\x30\x30\x3A\x30\x30","\x32\x33\x3A\x35\x39","\x4F\x75\x74\x20\x6F\x66\x20\x68\x6F\x75\x72\x73\x20\x72\x61\x6E\x67\x65\x2C\x20\x73\x6B\x69\x70\x70\x69\x6E\x67\x20\x72\x65\x63\x6F\x72\x64\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x21","\x64\x61\x79\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x79\x65\x73\x74\x65\x72\x64\x61\x79","\x6C\x61\x73\x74\x37","\x6C\x61\x73\x74\x33\x30","\x6D\x6F\x6E\x74\x68","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x6F\x6E\x74\x68\x73","\x65\x6E\x64\x4F\x66","\x6C\x61\x73\x74\x4D\x6F\x6E\x74\x68","\x72\x65\x70\x6F\x72\x74\x52\x61\x6E\x67\x65","\x63\x6F\x6E\x74\x61\x69\x6E\x73","\x68","\x72\x61\x6E\x67\x65","\x74\x65\x78\x74","\x2F\x20","\x70\x61\x72\x65\x6E\x74","\x23","\x66\x69\x6E\x64","\x72\x65\x70\x6F\x72\x74\x54\x79\x70\x65","\x64\x65\x66\x61\x75\x6C\x74","\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72\x3A\x20","\x63\x61\x74\x63\x68","\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6A\x73","\x66\x6F\x72\x6B","\x65\x72\x72\x6F\x72","\x63\x68\x69\x6C\x64\x20\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x63\x68\x69\x6C\x64\x20\x63\x6C\x6F\x73\x65","\x6D\x65\x73\x73\x61\x67\x65","\x63\x68\x69\x6C\x64\x20\x6D\x65\x73\x73\x61\x67\x65","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x73\x74\x61\x74\x75\x73","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x69\x64","\x6B\x69\x6C\x6C","\x61\x64\x6D\x69\x6E","\x72\x65\x70\x6F\x72\x74\x4F\x75\x74\x70\x75\x74","\x73\x65\x6E\x64","\x73\x70\x72\x65\x61\x64","\x74\x72\x65\x65","\x70\x61\x72\x73\x65","\x6E\x61\x6D\x65","\x74\x61\x62\x6C\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x5F\x68\x69\x73\x74\x6F\x72\x79","","\x72\x65\x70\x6C\x61\x63\x65","\x6D\x61\x6E\x75\x61\x6C","\x73\x63\x68\x65\x64\x75\x6C\x65\x64","\x63\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x52\x65\x70\x6F\x72\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x21","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x65\x70\x6F\x72\x74\x49\x64","\x66\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\x66\x69\x6E\x61\x6C\x6C\x79","\x45\x72\x72\x6F\x72\x20\x73\x65\x6E\x64\x69\x6E\x67\x20\x65\x78\x74\x72\x61\x63\x74\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x20\x62\x79\x20\x6D\x61\x69\x6C\x21","\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x73\x65\x6E\x74\x21","\x73\x65\x74\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x21","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x20\x52\x65\x70\x6F\x72\x74","\x65\x6D\x61\x69\x6C","\x53\x45\x4E\x44\x49\x4E\x47","\x4E\x6F\x20\x41\x63\x63\x6F\x75\x6E\x74\x20\x6F\x72\x20\x53\x4D\x54\x50\x20\x61\x64\x64\x72\x65\x73\x73\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x72\x65\x70\x6F\x72\x74\x73","\x73\x61\x76\x65\x6E\x61\x6D\x65","\x6A\x6F\x69\x6E","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x2E","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x6F\x75\x74\x70\x75\x74","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x63\x6F\x70\x79\x53\x79\x6E\x63","\x73\x75\x63\x63\x65\x73\x73\x21","\x45\x72\x72\x6F\x72\x20\x67\x65\x74\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x65\x78\x74\x72\x61\x63\x74\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x20\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x21","\x5F","\x44\x44\x2D\x4D\x4D\x2D\x59\x59\x59\x59","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x65\x6E\x64\x44\x61\x74\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F","\x73\x74\x61\x74\x53\x79\x6E\x63","\x73\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73"];var cp=require(_0x7593[0]);var moment=require(_0x7593[1]);require(_0x7593[2]);var CustomReport=require(_0x7593[4])[_0x7593[3]];var DefaultReport=require(_0x7593[4])[_0x7593[5]];var ExtractedReport=require(_0x7593[4])[_0x7593[6]];var MailAttachment=require(_0x7593[4])[_0x7593[7]];var MailServerOut=require(_0x7593[4])[_0x7593[8]];var MailMessage=require(_0x7593[4])[_0x7593[9]];var path=require(_0x7593[10]);var config=require(_0x7593[11]);var fs=require(_0x7593[12]);var _=require(_0x7593[13]);var ReportTree=require(_0x7593[4])[_0x7593[14]];function Reports(){console[_0x7593[16]](_0x7593[15])}Reports[_0x7593[18]][_0x7593[17]]= function(_0x3c87xf,_0x3c87x10){console[_0x7593[16]](_0x7593[19]);extract(_0x3c87xf,_0x3c87x10)};function extract(_0x3c87xf,_0x3c87x10){switch(_0x3c87xf[_0x7593[21]]){case _0x7593[20]:extractTodayReport(_0x3c87xf,_0x3c87x10);break;default:extractRangeReport(_0x3c87xf,_0x3c87x10);break}}function extractTodayReport(_0x3c87xf,_0x3c87x10){console[_0x7593[16]](_0x7593[22]);if(_0x3c87x10|| checkValidity(_0x3c87xf[_0x7593[23]],_0x3c87xf[_0x7593[24]])){console[_0x7593[16]](_0x7593[25]);docExtract(_0x3c87xf,moment()[_0x7593[27]](_0x7593[26]),moment()[_0x7593[27]](_0x7593[26]),_0x3c87x10,_0x7593[28],_0x7593[29])}else {console[_0x7593[16]](_0x7593[30])}}function extractRangeReport(_0x3c87xf,_0x3c87x10){switch(_0x3c87xf[_0x7593[41]]){case _0x7593[33]:docExtract(_0x3c87xf,moment()[_0x7593[32]](1,_0x7593[31])[_0x7593[27]](_0x7593[26]),moment()[_0x7593[32]](1,_0x7593[31])[_0x7593[27]](_0x7593[26]),_0x3c87x10);break;case _0x7593[34]:docExtract(_0x3c87xf,moment()[_0x7593[32]](7,_0x7593[31])[_0x7593[27]](_0x7593[26]),moment()[_0x7593[32]](1,_0x7593[31])[_0x7593[27]](_0x7593[26]),_0x3c87x10);break;case _0x7593[35]:docExtract(_0x3c87xf,moment()[_0x7593[32]](30,_0x7593[31])[_0x7593[27]](_0x7593[26]),moment()[_0x7593[32]](1,_0x7593[31])[_0x7593[27]](_0x7593[26]),_0x3c87x10);break;case _0x7593[40]:docExtract(_0x3c87xf,moment()[_0x7593[32]](1,_0x7593[38])[_0x7593[37]](_0x7593[36])[_0x7593[27]](_0x7593[26]),moment()[_0x7593[32]](1,_0x7593[38])[_0x7593[39]](_0x7593[36])[_0x7593[27]](_0x7593[26]),_0x3c87x10);break}}function checkValidity(_0x3c87x15,_0x3c87x16){return moment()[_0x7593[44]](moment(_0x3c87x15,_0x7593[43]),moment(_0x3c87x16,_0x7593[43]))[_0x7593[42]](moment())}function getReportPath(_0x3c87x18,_0x3c87x19,path){path= _0x3c87x18[_0x7593[45]]+ _0x7593[46]+ path;if(_0x3c87x18[_0x7593[47]]=== _0x7593[48]){return path}else {return getReportPath(_[_0x7593[49]](_0x3c87x19,{id:_0x3c87x18[_0x7593[47]]}),_0x3c87x19,path)}}function docExtract(_0x3c87xf,_0x3c87x1b,_0x3c87x1c,_0x3c87x10,_0x3c87x1d,_0x3c87x1e){var _0x3c87x1f=_0x3c87xf[_0x7593[50]]=== _0x7593[51]?DefaultReport:CustomReport;var _0x3c87x20;_0x3c87x1f[_0x7593[88]](_0x7593[87])[_0x7593[85]](_0x3c87xf[_0x7593[86]])[_0x7593[83]](function(_0x3c87x25){if(!_0x3c87x25){console[_0x7593[16]](_0x7593[84]);return};_0x3c87x20= _0x3c87x25;return ReportTree[_0x7593[85]](_0x3c87xf[_0x7593[50]]=== _0x7593[51]?1:2)})[_0x7593[83]](function(_0x3c87x19){_0x3c87x19= JSON[_0x7593[73]](_0x3c87x19[_0x7593[72]]);var _0x3c87x18=_[_0x7593[49]](_0x3c87x19,{id:_0x3c87x20[_0x7593[47]]});var path=getReportPath(_0x3c87x18,_0x3c87x19,_0x3c87x20[_0x7593[74]]);if(_0x3c87xf[_0x7593[21]]=== _0x7593[20]){_0x3c87x20[_0x7593[76]][_0x7593[75]]= _0x3c87x20[_0x7593[76]][_0x7593[75]][_0x7593[79]](_0x7593[77],_0x7593[78])};return [_0x3c87x20,ExtractedReport[_0x7593[82]]({name:_0x3c87x20[_0x7593[74]],startDate:_0x3c87x1b,endDate:_0x3c87x1c,output:_0x3c87xf[_0x7593[69]],type:_0x3c87x10?_0x7593[80]:_0x7593[81],UserId:_0x3c87x10?_0x3c87x10[_0x7593[66]]:null})]})[_0x7593[71]](function(_0x3c87x20,_0x3c87x22){var _0x3c87x23=cp[_0x7593[55]](__dirname+ _0x7593[54]);_0x3c87x23[_0x7593[58]](_0x7593[61],function(_0x3c87x24){console[_0x7593[16]](_0x7593[62],_0x3c87x24);if(_0x3c87xf[_0x7593[63]]&& _0x3c87x24[_0x7593[64]]=== _0x7593[65]){sendReportByMail(_0x3c87xf,_0x3c87x22[_0x7593[66]],_0x3c87x10,_0x3c87x23)}else {_0x3c87x23[_0x7593[67]]()}})[_0x7593[58]](_0x7593[59],function(){console[_0x7593[16]](_0x7593[60])})[_0x7593[58]](_0x7593[56],function(_0x3c87x21){console[_0x7593[16]](_0x7593[57],_0x3c87x21)});_0x3c87x23[_0x7593[70]]({report:_0x3c87x20,query:{startDate:_0x3c87x1b,endDate:_0x3c87x1c,startTime:_0x3c87x1d|| null,endTime:_0x3c87x1e|| null},extractedId:_0x3c87x22[_0x7593[66]],user:_0x3c87x10?_0x3c87x10:{role:_0x7593[68]},type:_0x3c87xf[_0x7593[69]]})})[_0x7593[53]](function(_0x3c87x21){console[_0x7593[16]](_0x7593[52],_0x3c87x21)})}function sendReportByMail(_0x3c87xf,_0x3c87x27,_0x3c87x10,_0x3c87x23){var _0x3c87x28;return ExtractedReport[_0x7593[85]](_0x3c87x27)[_0x7593[83]](function(extract){if(!extract){console[_0x7593[16]](_0x7593[93]);return};_0x3c87x28= extract;if(_0x3c87xf[_0x7593[8]]&& _0x3c87xf[_0x7593[8]][_0x7593[94]]){var _0x3c87x2a=getAttachment(_0x3c87x28);var _0x3c87x2b={subject:_0x7593[95],from:[_0x3c87xf[_0x7593[8]][_0x7593[94]]],to:[_0x3c87xf[_0x7593[96]]],cc:[],html:null,text:null,inReplyTo:null,status:_0x7593[97],attachment:true,UserId:_0x3c87x10?_0x3c87x10[_0x7593[66]]:null,MailAttachments:[_0x3c87x2a]};return MailMessage[_0x7593[82]](_0x3c87x2b,{include:[{model:MailAttachment}]})}else {throw  new Error(_0x7593[98])}})[_0x7593[83]](function(_0x3c87x29){return _0x3c87x28[_0x7593[92]](_0x3c87x29)})[_0x7593[83]](function(){console[_0x7593[16]](_0x7593[91])})[_0x7593[53]](function(_0x3c87x21){console[_0x7593[16]](_0x7593[90],_0x3c87x21)})[_0x7593[89]](function(){_0x3c87x23[_0x7593[67]]()})}function getAttachment(extract){var _0x3c87x2d=path[_0x7593[104]](config[_0x7593[99]],_0x7593[100],_0x7593[101],_0x7593[102],extract[_0x7593[103]]);var _0x3c87x2e=path[_0x7593[104]](config[_0x7593[99]],_0x7593[100],_0x7593[101],_0x7593[105]);var _0x3c87x2f=path[_0x7593[109]](extract[_0x7593[103]],_0x7593[106]+ extract[_0x7593[108]][_0x7593[107]]());try{fs[_0x7593[110]](_0x3c87x2d,path[_0x7593[104]](_0x3c87x2e,_0x3c87x2f));console[_0x7593[16]](_0x7593[111])}catch(err){console[_0x7593[56]](_0x7593[112]);return null};return {size:getFilesizeInBytes(_0x3c87x2d),path:path[_0x7593[104]](_0x3c87x2e,_0x3c87x2f),name:extract[_0x7593[74]]+ _0x7593[113]+ moment(extract[_0x7593[115]])[_0x7593[27]](_0x7593[114])+ _0x7593[113]+ moment(extract[_0x7593[116]])[_0x7593[27]](_0x7593[114])+ _0x7593[106]+ extract[_0x7593[108]][_0x7593[107]](),type:_0x7593[117]+ extract[_0x7593[108]][_0x7593[107]](),basename:_0x3c87x2f}}function getFilesizeInBytes(_0x3c87x31){try{var _0x3c87x32=fs[_0x7593[118]](_0x3c87x31);var _0x3c87x33=_0x3c87x32[_0x7593[119]];return _0x3c87x33}catch(err){return 0}}module[_0x7593[120]]= Reports
\ No newline at end of file
diff --git a/server/config/seed.js b/server/config/seed.js
index ab5b614..d1ef0ee 100644
--- a/server/config/seed.js
+++ b/server/config/seed.js
@@ -1,4005 +1 @@
-/**
- * Populate DB with sample data on server start
- * to disable, edit config/environment/index.js, and set `seedDB: false`
- */
-'use strict';
-
-var _ = require('lodash');
-var models = require('../models');
-var sequelize = require('../models').sequelize;
-
-models.User.bulkCreate([{
-  provider: 'local',
-  role: 'agent',
-  fullname: 'Giuseppe Careri',
-  email: [email-masked]',
-  name: 'giuseppe.careri',
-  password: '75xcally75',
-  defaultuser: 'giuseppe.careri',
-  host: 'dynamic',
-  type: 'FRIEND',
-  transport: 'udp',
-  allow: 'alaw;ulaw;gsm',
-  qualify: 'yes',
-  nat: 'force_rport,comedia',
-  disallow: 'all',
-  context: 'from-sip',
-  internal: 1000
-}, {
-  provider: 'local',
-  role: 'agent',
-  fullname: 'Daniele Cinti',
-  email: [email-masked]',
-  name: 'daniele.cinti',
-  password: '75xcally75',
-  defaultuser: 'daniele.cinti',
-  host: 'dynamic',
-  type: 'FRIEND',
-  transport: 'udp',
-  allow: 'alaw;ulaw;gsm',
-  qualify: 'yes',
-  nat: 'force_rport,comedia',
-  disallow: 'all',
-  context: 'from-sip',
-  internal: 1001
-}, {
-  provider: 'local',
-  role: 'agent',
-  fullname: 'Andrea Bianco',
-  email: [email-masked]',
-  name: 'andrea.bianco',
-  password: '75xcally75',
-  defaultuser: 'andrea.bianco',
-  host: 'dynamic',
-  type: 'FRIEND',
-  transport: 'udp',
-  allow: 'alaw;ulaw;gsm',
-  qualify: 'yes',
-  nat: 'force_rport,comedia',
-  disallow: 'all',
-  context: 'from-sip',
-  internal: 1002
-}, {
-  provider: 'local',
-  role: 'agent',
-  fullname: 'Massimiliano Bungaro',
-  email: [email-masked]',
-  name: 'massimiliano.bungaro',
-  password: '75xcally75',
-  defaultuser: 'massimiliano.bungaro',
-  host: 'dynamic',
-  type: 'FRIEND',
-  transport: 'udp',
-  allow: 'alaw;ulaw;gsm',
-  qualify: 'yes',
-  nat: 'force_rport,comedia',
-  disallow: 'all',
-  context: 'from-sip',
-  internal: 1003
-}, {
-  provider: 'local',
-  role: 'agent',
-  fullname: 'Valerio Ciotta',
-  email: [email-masked]',
-  name: 'valerio.ciotta',
-  password: '75xcally75',
-  defaultuser: 'valerio.ciotta',
-  host: 'dynamic',
-  type: 'FRIEND',
-  transport: 'udp',
-  allow: 'alaw;ulaw;gsm',
-  qualify: 'yes',
-  nat: 'force_rport,comedia',
-  disallow: 'all',
-  context: 'from-sip',
-  internal: 1004
-}, {
-  provider: 'local',
-  role: 'admin',
-  fullname: 'Clarotech',
-  email: [email-masked]',
-  name: 'clarotech',
-  password: 'clarotech',
-  defaultuser: 'clarotech',
-  host: 'dynamic',
-  type: 'FRIEND',
-  transport: 'udp',
-  allow: 'alaw;ulaw;gsm',
-  qualify: 'yes',
-  nat: 'force_rport,comedia',
-  disallow: 'all',
-  context: 'from-sip',
-  internal: 1005
-}, {
-  provider: 'local',
-  role: 'agent',
-  fullname: 'Abigael',
-  email: [email-masked]',
-  name: 'abigael',
-  password: '75xcally75',
-  defaultuser: 'abigael',
-  host: 'dynamic',
-  type: 'FRIEND',
-  transport: 'udp',
-  allow: 'alaw;ulaw;gsm',
-  qualify: 'yes',
-  nat: 'force_rport,comedia',
-  disallow: 'all',
-  context: 'from-sip',
-  internal: 1006
-}, {
-  provider: 'local',
-  role: 'agent',
-  fullname: 'Tony Russell',
-  email: [email-masked]',
-  name: 'tony.russell',
-  password: 'clarotech',
-  defaultuser: 'tony.russell',
-  host: 'dynamic',
-  type: 'FRIEND',
-  transport: 'udp',
-  allow: 'alaw;ulaw;gsm',
-  qualify: 'yes',
-  nat: 'force_rport,comedia',
-  disallow: 'all',
-  context: 'from-sip',
-  internal: 1007
-}, {
-  provider: 'local',
-  role: 'agent',
-  fullname: 'Colin Fair',
-  email: [email-masked]',
-  name: 'colin.fair',
-  password: 'clarotech',
-  defaultuser: 'colin.fair',
-  host: 'dynamic',
-  type: 'FRIEND',
-  transport: 'udp',
-  allow: 'alaw;ulaw;gsm',
-  qualify: 'yes',
-  nat: 'force_rport,comedia',
-  disallow: 'all',
-  context: 'from-sip',
-  internal: 1008
-}, {
-  provider: 'local',
-  role: 'agent',
-  fullname: 'Diego Gosmar',
-  email: [email-masked]',
-  name: 'diego.gosmar',
-  password: '75xcally75',
-  defaultuser: 'diego.gosmar',
-  host: 'dynamic',
-  type: 'FRIEND',
-  transport: 'udp',
-  allow: 'alaw;ulaw;gsm',
-  qualify: 'yes',
-  nat: 'force_rport,comedia',
-  disallow: 'all',
-  context: 'from-sip',
-  internal: 1009
-}, {
-  provider: 'local',
-  role: 'agent',
-  fullname: 'Giuseppe Innamorato',
-  email: [email-masked]',
-  name: 'giuseppe.innamorato',
-  password: '75xcally75',
-  defaultuser: 'giuseppe.innamorato',
-  host: 'dynamic',
-  type: 'FRIEND',
-  transport: 'upd',
-  allow: 'alaw;ulaw;gsm',
-  qualify: 'yes',
-  nat: 'force_rport,comedia',
-  disallow: 'all',
-  context: 'from-sip',
-  internal: 1010
-}, {
-  provider: 'local',
-  role: 'agent',
-  fullname: 'Alessandra Bessone',
-  email: [email-masked]',
-  name: 'alessandra.bessone',
-  password: '75xcally75',
-  defaultuser: 'alessandra.bessone',
-  host: 'dynamic',
-  type: 'FRIEND',
-  transport: 'upd',
-  allow: 'alaw;ulaw;gsm',
-  qualify: 'yes',
-  nat: 'force_rport,comedia',
-  disallow: 'all',
-  context: 'from-sip',
-  internal: 1011
-}, {
-  provider: 'local',
-  role: 'agent',
-  fullname: 'Felice Briscese',
-  email: [email-masked]',
-  name: 'felice.briscese',
-  password: '75xcally75',
-  defaultuser: 'felice.briscese',
-  host: 'dynamic',
-  type: 'FRIEND',
-  transport: 'upd',
-  allow: 'alaw;ulaw;gsm',
-  qualify: 'yes',
-  nat: 'force_rport,comedia',
-  disallow: 'all',
-  context: 'from-sip',
-  internal: 1012
-}, {
-  provider: 'local',
-  role: 'admin',
-  fullname: 'xCally',
-  email: [email-masked]',
-  name: 'xcally',
-  password: '388xshuttle388',
-  defaultuser: 'xcally',
-  host: 'dynamic',
-  type: 'FRIEND',
-  transport: 'udp',
-  allow: 'alaw;ulaw;gsm',
-  qualify: 'yes',
-  nat: 'force_rport,comedia',
-  disallow: 'all',
-  context: 'from-sip',
-  internal: 1013
-}, {
-  provider: 'local',
-  role: 'agent',
-  fullname: 'John Doe',
-  email: [email-masked]',
-  name: 'john.doe',
-  password: '75xcally75',
-  defaultuser: 'john.doe',
-  host: 'dynamic',
-  type: 'FRIEND',
-  transport: 'udp',
-  allow: 'alaw;ulaw;gsm',
-  qualify: 'yes',
-  nat: 'force_rport,comedia',
-  disallow: 'all',
-  context: 'from-sip',
-  internal: 1014
-}, {
-  provider: 'local',
-  role: 'agent',
-  fullname: 'Jane Miller',
-  email: [email-masked]',
-  name: 'jane.miller',
-  password: '75xcally75',
-  defaultuser: 'jane.miller',
-  host: 'dynamic',
-  type: 'FRIEND',
-  transport: 'udp',
-  allow: 'alaw;ulaw;gsm',
-  qualify: 'yes',
-  nat: 'force_rport,comedia',
-  disallow: 'all',
-  context: 'from-sip',
-  internal: 1015
-}], {
-  ignoreDuplicates: true,
-  individualHooks: true
-}).then(function() {
-  console.log('Finished populating users');
-});
-
-models.Trunk.bulkCreate([{
-  name: 'citalia',
-  type: 'friend',
-  insecure: 'port,invite',
-  defaultuser: '01119827770',
-  secret: 'T!NPnv-qjCMe9v',
-  password: 'T!NPnv-qjCMe9v',
-  context: 'from-voip-provider',
-  language: 'it',
-  host: 'voip.eutelia.it',
-  fromdomain: 'voip.eutelia.it',
-  dtmfmode: 'rfc2833',
-  qualify: 'yes',
-  nat: 'force_rport,comedia',
-  callerid: ' "" <>',
-  limitonpeers: 'yes',
-  callcounter: 'yes',
-  disallow: 'all',
-  allow: 'ulaw;alaw;gsm',
-  canreinvite: 'no',
-  directmedia: 'no'
-}], {
-  ignoreDuplicates: true,
-  individualHooks: true
-}).then(function() {
-  console.log('Finished populating trunks');
-});
-
-// Init modules table
-var newModules = [{
-  id: 1,
-  name: "dashboard",
-  title: "APPLICATION_DASHBOARD",
-  ModuleId: null,
-  path: '/dashboard/voice'
-}, {
-  id: 2,
-  name: "yourdashboards",
-  title: "APPLICATION_YOUR_DASHBOARDS",
-  ModuleId: null,
-  path: '/tools/yourdashboards/show/1'
-}, {
-  id: 3,
-  name: "staff",
-  title: "APPLICATION_STAFF",
-  ModuleId: null,
-  path: '/staff/agents/list'
-}, {
-  id: 4,
-  name: "agents",
-  title: "APPLICATION_AGENTS",
-  ModuleId: 3,
-  path: '/staff/agents/list'
-}, {
-  id: 5,
-  name: "contactmanager",
-  title: "APPLICATION_CONTACT_MANAGER",
-  ModuleId: null,
-  path: '/contactmanager/contacts/list'
-}, {
-  id: 6,
-  name: "channels",
-  title: "APPLICATION_CHANNELS",
-  ModuleId: null,
-  path: '/channels/voice/queues/list'
-}, {
-  id: 7,
-  name: "voice",
-  title: "APPLICATION_VOICE",
-  ModuleId: 6,
-  path: '/channels/voice/queues/list'
-}, {
-  id: 8,
-  name: "chat",
-  title: "APPLICATION_CHAT",
-  ModuleId: 6,
-  path: '/channels/chat/websites/list'
-}, {
-  id: 9,
-  name: "mail",
-  title: "APPLICATION_MAIL",
-  ModuleId: 6,
-  path: '/channels/mail/accounts/list'
-}, {
-  id: 10,
-  name: "fax",
-  title: "APPLICATION_FAX",
-  ModuleId: 6,
-  path: '/channels/fax/accounts/list'
-}, {
-  id: 11,
-  name: "sms",
-  title: "APPLICATION_SMS",
-  ModuleId: 6,
-  path: '/channels/sms/accounts/list'
-}, {
-  id: 12,
-  name: "realtime",
-  title: "APPLICATION_REALTIME",
-  ModuleId: 6,
-  path: '/channels/realtime/view/agents'
-}, {
-  id: 13,
-  name: "tools",
-  title: "APPLICATION_TOOLS",
-  ModuleId: null,
-  path: '/tools/triggers/list'
-}, {
-  id: 14,
-  name: "square",
-  title: "APPLICATION_CALLYSQUARE",
-  ModuleId: null,
-  path: '/square/projects/list'
-}, {
-  id: 15,
-  name: "jscripty",
-  title: "APPLICATION_JSCRIPTY",
-  ModuleId: null,
-  path: '/jscripty/projects/list'
-}, {
-  id: 16,
-  name: "motiondialer",
-  title: "APPLICATION_MOTION_DIALER",
-  ModuleId: null,
-  path: '/motiondialer/lists/list'
-}, {
-  id: 17,
-  name: "analytics",
-  title: "APPLICATION_ANALYTICS",
-  ModuleId: null,
-  path: '/analytics/reports/list'
-}, {
-  id: 18,
-  name: "setting",
-  title: "APPLICATION_SETTINGS",
-  ModuleId: null,
-  path: '/setting/updates/list'
-}, {
-  id: 19,
-  name: "integration",
-  title: "APPLICATION_INTEGRATION",
-  ModuleId: null,
-  path: '/market'
-}, {
-  id: 20,
-  name: "openchannel",
-  title: "APPLICATION_OPEN_CHANNEL",
-  ModuleId: 6,
-  path: '/channels/openchannel/accounts/list'
-}, {
-  id: 21,
-  name: "routes",
-  title: "APPLICATION_ROUTES",
-  ModuleId: 7,
-  path: '/channels/voice/routes'
-}, {
-  id: 22,
-  name: "contexts",
-  title: "APPLICATION_CONTEXTS",
-  ModuleId: 7,
-  path: '/channels/voice/contexts/list'
-}, {
-  id: 23,
-  name: "voicemails",
-  title: "APPLICATION_VOICEMAILS",
-  ModuleId: 7,
-  path: '/channels/voice/voicemails/list'
-}, {
-  id: 24,
-  name: "moh",
-  title: "APPLICATION_MOH",
-  ModuleId: 7,
-  path: '/channels/voice/moh/list'
-}, {
-  id: 25,
-  name: "recordings",
-  title: "APPLICATION_RECORDINGS",
-  ModuleId: 7,
-  path: '/channels/voice/recordings/list'
-}, {
-  id: 26,
-  name: "realtime",
-  title: "APPLICATION_REALTIME",
-  ModuleId: 7,
-  path: '/channels/voice/realtime/view/agents'
-}, {
-  id: 27,
-  name: "chanspy",
-  title: "APPLICATION_CHANSPY",
-  ModuleId: 7,
-  path: '/channels/voice/chanspy/list'
-}, {
-  id: 28,
-  name: "dispositions",
-  title: "APPLICATION_DISPOSITIONS",
-  ModuleId: 7,
-  path: '/channels/voice/dispositions/list'
-}];
-
-models.Module.findAll().then(function(oldModules) {
-  var bulkModules = [];
-  oldModules = _.map(oldModules, 'id');
-  newModules.forEach(function(module) {
-    if (_.includes(oldModules, module.id)) {
-      bulkModules.push(models.Module.update(module, {
-        where: {
-          id: module.id
-        }
-      }));
-    } else {
-      bulkModules.push(models.Module.create(module));
-    }
-  });
-  return bulkModules;
-}).all().then(function() {
-  console.log('Finished populating modules');
-}).catch(function(err) {
-  console.log('Error populating modules:', err);
-});
-
-models.Team.create({
-  name: "T1",
-  description: "Default Team",
-  defaultEntry: true
-}).then(function(team) {
-  models.User.findAll({
-    where: {
-      role: 'agent'
-    }
-  }).then(function(users) {
-    team.addUsers(_.map(users, 'id')).then(function() {
-      models.ChatQueue.create({
-        name: "CQ1",
-        description: "CQ1 Desc",
-        timeout: 5,
-        strategy: "rrmemory"
-      }).then(function(chatQueue) {
-        console.log('Finished populating chat queue 1');
-        models.Team.findOne({
-          where: {
-            name: 'T1'
-          },
-          include: [{
-            all: true
-          }]
-        }).then(function(team) {
-          chatQueue.addUsers(_.map(team.Users, 'id')).catch(function(err) {
-            // console.error(err);
-          });
-        }).catch(function(err) {
-          // console.error(err);
-        });
-      });
-      models.MailQueue.create({
-        name: "MQ1",
-        description: "MQ1 Desc",
-        timeout: 5,
-        strategy: "rrmemory"
-      }).then(function(mailQueue) {
-        console.log('Finished populating mail queue 1');
-        models.Team.findOne({
-          where: {
-            name: 'T1'
-          },
-          include: [{
-            all: true
-          }]
-        }).then(function(team) {
-          if (team) {
-            console.log('team found');
-          } else {
-            console.log('test');
-          }
-          mailQueue.addUsers(_.map(team.Users, 'id')).catch(function(err) {
-            // console.error(err);
-          });
-        }).catch(function(err) {
-          // console.error(err);
-        });
-      });
-      models.FaxQueue.create({
-        name: "FQ1",
-        description: "FQ1 Desc",
-        timeout: 5,
-        strategy: "rrmemory"
-      }).then(function(faxQueue) {
-        console.log('Finished populating fax queue 1');
-        models.Team.findOne({
-          where: {
-            name: 'T1'
-          },
-          include: [{
-            all: true
-          }]
-        }).then(function(team) {
-          faxQueue.addUsers(_.map(team.Users, 'id')).catch(function(err) {
-            // console.error(err);
-          });
-        }).catch(function(err) {
-          // console.error(err);
-        });
-      });
-    }).catch(function(err) {
-      // console.error(err);
-    });
-  }).catch(function(err) {
-    // console.error(err);
-  });
-}).catch(function(err) {
-  // console.error(err);
-});
-
-models.MailAccount.create({
-  name: "xCally Development",
-  description: "xCally Development",
-  address: "[email-masked]"
-}).then(function(mailAccount) {
-  console.log('Finished populating mail account');
-  models.MailServerIn.create({
-    description: 'xcally',
-    host: 'imap.xcally.com',
-    username: [email-masked]',
-    password: 'phokucloka',
-    port: 143,
-    mailbox: 'INBOX',
-    ssl: false,
-    delete: false,
-    filter: 'UNSEEN',
-    protocol: 'IMAP',
-    MailAccountId: mailAccount.id
-  }).then(function() {
-    console.log('Finished populating mail server in');
-    models.MailServerOut.create({
-      description: 'xcally',
-      host: 'smtp.xcally.com',
-      username: [email-masked]',
-      password: 'phokucloka',
-      port: 587,
-      ssl: false,
-      MailAccountId: mailAccount.id
-    }).then(function() {
-      console.log('Finished populating mail server out');
-    }).catch(function(err) {
-      // console.error(err);
-    });
-  }).catch(function(err) {
-    // console.error(err);
-  });
-});
-// models.FaxAccount
-//   .create({
-//     description: 'FA1 Desc',
-//     name: 'FA1',
-//     phone: '01119827770',
-//     ecm: true,
-//     faxheader: 'xCALLY',
-//     localid: '01119827770',
-//     maxrate: '9600',
-//     minrate: '14400',
-//   })
-//   .then(function(faxAccount) {
-//     console.log('Finished populating fax account');
-//
-//     models.Trunk
-//       .findOne({
-//         where: {
-//           name: 'citalia'
-//         }
-//       })
-//       .then(function(trunk) {
-//         faxAccount
-//           .setTrunk(trunk)
-//           .catch(function(err) {
-//             // console.error(err);
-//           });
-//
-//
-//         models.VoiceExtension
-//           .create({
-//             context: 'from-voip-provider',
-//             exten: '01119827770',
-//             priority: 1,
-//             app: 'Goto',
-//             appdata: 'inbound-fax,s,1',
-//             type: 'inbound-fax'
-//           })
-//
-//       })
-//       .catch(function(err) {
-//         // console.error(err);
-//       });
-//
-//     models.FaxQueue
-//       .findAll()
-//       .then(function(faxQueues) {
-//         models.FaxApplication
-//           .create({
-//             app: 'queue',
-//             appdata: faxQueues[0].id,
-//             priority: 1,
-//             timeout: 30,
-//             FaxAccountId: faxAccount.id,
-//             FaxQueueId: faxQueues[0].id
-//           })
-//           .then(function() {
-//             console.log('Finished populating chat website application 1');
-//           })
-//           .catch(function(err) {
-//             // console.error(err);
-//           });
-//
-//         models.FaxApplication
-//           .create({
-//             app: 'queue',
-//             appdata: faxQueues[1].id,
-//             priority: 2,
-//             timeout: 30,
-//             FaxAccountId: faxAccount.id,
-//             FaxQueueId: faxQueues[1].id
-//           })
-//           .then(function() {
-//             console.log('Finished populating chat website application 2');
-//           })
-//           .catch(function(err) {
-//             // console.error(err);
-//           });
-//       })
-//       .catch(function(err) {
-//         // console.error(err);
-//       });
-//   })
-//   .catch(function(err) {
-//     // console.error(err);
-//   });
-// models.FaxAccount
-//   .create({
-//     description: 'FA1 Desc',
-//     name: 'FA1',
-//     phone: '01119827770',
-//     ecm: true,
-//     faxheader: 'xCALLY',
-//     localid: '01119827770',
-//     maxrate: '9600',
-//     minrate: '14400',
-//   })
-//   .then(function (faxAccount) {
-//     console.log('Finished populating fax account');
-//
-//     models.Trunk
-//       .findOne({
-//         where: {
-//           name: 'citalia'
-//         }
-//       })
-//       .then(function (trunk) {
-//         faxAccount
-//           .setTrunk(trunk)
-//           .catch(function (err) {
-//             // console.error(err);
-//           });
-//
-//
-//         models.VoiceExtension
-//           .create({
-//             context: 'from-voip-provider',
-//             exten: '01119827770',
-//             priority: 1,
-//             app: 'Goto',
-//             appdata: 'inbound-fax,s,1',
-//             type: 'inbound-fax',
-//             TrunkId: trunk.name
-//           })
-//
-//       })
-//       .catch(function (err) {
-//         // console.error(err);
-//       });
-//
-//     models.FaxQueue
-//       .findAll()
-//       .then(function (faxQueues) {
-//         models.FaxApplication
-//           .create({
-//             app: 'queue',
-//             appdata: faxQueues[0].id,
-//             priority: 1,
-//             timeout: 30,
-//             FaxAccountId: faxAccount.id,
-//             FaxQueueId: faxQueues[0].id
-//           })
-//           .then(function () {
-//             console.log('Finished populating chat website application 1');
-//           })
-//           .catch(function (err) {
-//             // console.error(err);
-//           });
-//
-//         models.FaxApplication
-//           .create({
-//             app: 'queue',
-//             appdata: faxQueues[1].id,
-//             priority: 2,
-//             timeout: 30,
-//             FaxAccountId: faxAccount.id,
-//             FaxQueueId: faxQueues[1].id
-//           })
-//           .then(function () {
-//             console.log('Finished populating chat website application 2');
-//           })
-//           .catch(function (err) {
-//             // console.error(err);
-//           });
-//       })
-//       .catch(function (err) {
-//         // console.error(err);
-//       });
-//   })
-//   .catch(function (err) {
-//     // console.error(err);
-//   });
-// models.VoiceExtension
-//   .bulkCreate([{
-//     context: 'outbound-fax',
-//     exten: 's',
-//     priority: 1,
-//     app: 'NoOp',
-//     appdata: 'Fax UUID: ${FAXUUID}',
-//     type: 'outbound-fax'
-//   }, {
-//     context: 'outbound-fax',
-//     exten: 's',
-//     priority: 2,
-//     app: 'UserEvent',
-//     appdata: 'Fax,uuid: ${FAXUUID}',
-//     type: 'outbound-fax'
-//   }, {
-//     context: 'outbound-fax',
-//     exten: 's',
-//     priority: 3,
-//     app: 'Set',
-//     appdata: 'FAXOPT(filename):${FAXFILE}',
-//     type: 'outbound-fax'
-//   }, {
-//     context: 'outbound-fax',
-//     exten: 's',
-//     priority: 4,
-//     app: 'Set',
-//     appdata: 'FAXOPT(ecm):${ECM}',
-//     type: 'outbound-fax'
-//   }, {
-//     context: 'outbound-fax',
-//     exten: 's',
-//     priority: 5,
-//     app: 'Set',
-//     appdata: 'FAXOPT(headerinfo):${FAXHEADER}',
-//     type: 'outbound-fax'
-//   }, {
-//     context: 'outbound-fax',
-//     exten: 's',
-//     priority: 6,
-//     app: 'Set',
-//     appdata: 'FAXOPT(localstationid):${LOCALID}',
-//     type: 'outbound-fax'
-//   }, {
-//     context: 'outbound-fax',
-//     exten: 's',
-//     priority: 7,
-//     app: 'Set',
-//     appdata: 'FAXOPT(maxrate):${MAXRATE}',
-//     type: 'outbound-fax'
-//   }, {
-//     context: 'outbound-fax',
-//     exten: 's',
-//     priority: 8,
-//     app: 'Set',
-//     appdata: 'FAXOPT(minrate):${MINRATE}',
-//     type: 'outbound-fax'
-//   }, {
-//     context: 'outbound-fax',
-//     exten: 's',
-//     priority: 9,
-//     app: 'SendFAX',
-//     appdata: '${FAXFILE},d',
-//     type: 'outbound-fax'
-//   }, {
-//     context: 'outbound-fax',
-//     exten: 's',
-//     priority: 10,
-//     app: 'NoOp',
-//     appdata: 'ERROR "${TIMESTAMP}" "NO_STATUS" "NO_PAGES"',
-//     type: 'outbound-fax'
-//   }, {
-//     context: 'outbound-fax',
-//     exten: 'h',
-//     priority: 1,
-//     app: 'NoOp',
-//     appdata: 'FAXOPT(ecm) : ${FAXOPT(ecm)}',
-//     type: 'outbound-fax'
-//   }, {
-//     context: 'outbound-fax',
-//     exten: 'h',
-//     priority: 2,
-//     app: 'NoOp',
-//     appdata: 'FaxStatus : ${FAXSTATUS}',
-//     type: 'outbound-fax'
-//   }, {
-//     context: 'outbound-fax',
-//     exten: 'h',
-//     priority: 3,
-//     app: 'NoOp',
-//     appdata: 'FaxStatusString : ${FAXSTATUSSTRING}',
-//     type: 'outbound-fax'
-//   }, {
-//     context: 'outbound-fax',
-//     exten: 'h',
-//     priority: 4,
-//     app: 'NoOp',
-//     appdata: 'FaxError : ${FAXERROR}',
-//     type: 'outbound-fax'
-//   }, {
-//     context: 'outbound-fax',
-//     exten: 'h',
-//     priority: 5,
-//     app: 'NoOp',
-//     appdata: 'RemoteStationID : ${REMOTESTATIONID}',
-//     type: 'outbound-fax'
-//   }, {
-//     context: 'outbound-fax',
-//     exten: 'h',
-//     priority: 6,
-//     app: 'NoOp',
-//     appdata: 'FaxPages : ${FAXPAGES}',
-//     type: 'outbound-fax'
-//   }, {
-//     context: 'outbound-fax',
-//     exten: 'h',
-//     priority: 7,
-//     app: 'NoOp',
-//     appdata: 'FaxBitRate : ${FAXBITRATE}',
-//     type: 'outbound-fax'
-//   }, {
-//     context: 'outbound-fax',
-//     exten: 'h',
-//     priority: 8,
-//     app: 'NoOp',
-//     appdata: 'FaxResolution : ${FAXRESOLUTION}',
-//     type: 'outbound-fax'
-//   }, {
-//     context: 'outbound-fax',
-//     exten: 'h',
-//     priority: 9,
-//     app: 'NoOp',
-//     appdata: 'OK "${TIMESTAMP}" "${FAXSTATUSSTRING}" "${FAXPAGES}"',
-//     type: 'outbound-fax'
-//   }], {
-//     ignoreDuplicates: true
-//   })
-//   .then(function() {
-//     console.log('Finished populating fax outbound voice extension');
-//   });
-//
-// models.VoiceExtension
-//   .bulkCreate([{
-//     context: 'inbound-fax',
-//     exten: 's',
-//     priority: 1,
-//     app: 'NoOp',
-//     appdata: '**** FAX RECEIVED from ${CALLERID(num)} ${STRFTIME(${EPOCH},,%c)} ****',
-//     type: 'inbound-fax'
-//   }, {
-//     context: 'inbound-fax',
-//     exten: 's',
-//     priority: 2,
-//     app: 'Set',
-//     appdata: 'FAXOPT(ecm):yes',
-//     type: 'inbound-fax'
-//   }, {
-//     context: 'inbound-fax',
-//     exten: 's',
-//     priority: 3,
-//     app: 'Set',
-//     appdata: 'FILENAME:${UNIQUEID}',
-//     type: 'inbound-fax'
-//   }, {
-//     context: 'inbound-fax',
-//     exten: 's',
-//     priority: 4,
-//     app: 'Set',
-//     appdata: 'FAXFILE:${FILENAME}.tif',
-//     type: 'inbound-fax'
-//   }, {
-//     context: 'inbound-fax',
-//     exten: 's',
-//     priority: 5,
-//     app: 'Set',
-//     appdata: 'FAXOPT(headerinfo):Received by XeniaLAB ${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M)}',
-//     type: 'inbound-fax'
-//   }, {
-//     context: 'inbound-fax',
-//     exten: 's',
-//     priority: 6,
-//     app: 'Set',
-//     appdata: 'FAXOPT(localstationid):${LOCALID}',
-//     type: 'inbound-fax'
-//   }, {
-//     context: 'inbound-fax',
-//     exten: 's',
-//     priority: 7,
-//     app: 'Set',
-//     appdata: 'FAXOPT(maxrate):${MAXRATE}',
-//     type: 'inbound-fax'
-//   }, {
-//     context: 'inbound-fax',
-//     exten: 's',
-//     priority: 8,
-//     app: 'Set',
-//     appdata: 'FAXOPT(minrate):${MINRATE}',
-//     type: 'inbound-fax'
-//   }, {
-//     context: 'inbound-fax',
-//     exten: 's',
-//     priority: 9,
-//     app: 'NoOp',
-//     appdata: 'FAXOPT(ecm) : ${FAXOPT(ecm)}',
-//     type: 'inbound-fax'
-//   }, {
-//     context: 'inbound-fax',
-//     exten: 's',
-//     priority: 10,
-//     app: 'NoOp',
-//     appdata: 'FAXOPT(headerinfo) : ${FAXOPT(headerinfo)}',
-//     type: 'inbound-fax'
-//   }, {
-//     context: 'inbound-fax',
-//     exten: 's',
-//     priority: 11,
-//     app: 'NoOp',
-//     appdata: 'FAXOPT(localstationid) : ${FAXOPT(localstationid)}',
-//     type: 'inbound-fax'
-//   }, {
-//     context: 'inbound-fax',
-//     exten: 's',
-//     priority: 12,
-//     app: 'NoOp',
-//     appdata: 'FAXOPT(maxrate) : ${FAXOPT(maxrate)}',
-//     type: 'inbound-fax'
-//   }, {
-//     context: 'inbound-fax',
-//     exten: 's',
-//     priority: 13,
-//     app: 'NoOp',
-//     appdata: 'FAXOPT(minrate) : ${FAXOPT(minrate)}',
-//     type: 'inbound-fax'
-//   }, {
-//     context: 'inbound-fax',
-//     exten: 's',
-//     priority: 14,
-//     app: 'NoOp',
-//     appdata: '**** RECEIVING FAX : ${FAXFILE} ****',
-//     type: 'inbound-fax'
-//   }, {
-//     context: 'inbound-fax',
-//     exten: 's',
-//     priority: 15,
-//     app: 'ReceiveFax',
-//     appdata: '/tmp/${FAXFILE}',
-//     type: 'inbound-fax'
-//   }, {
-//     context: 'inbound-fax',
-//     exten: 's',
-//     priority: 16,
-//     app: 'Hangup',
-//     type: 'inbound-fax'
-//   }, {
-//     context: 'inbound-fax',
-//     exten: 'h',
-//     priority: 1,
-//     app: 'NoOp',
-//     appdata: 'FAXOPT(ecm) : ${FAXOPT(ecm)}',
-//     type: 'inbound-fax'
-//   }], {
-//     ignoreDuplicates: true
-//   })
-//   .then(function() {
-//     console.log('Finished populating fax outbound voice extension');
-//   });
-
-models.SquareProject.bulkCreate([{
-  name: "project1",
-  description: "description project"
-}], {
-  ignoreDuplicates: true
-}).then(function() {
-  console.log('Finished populating square projects');
-});
-
-models.ChatWebsite.create({
-  name: 'xCally Shop',
-  description: 'xCally Shop',
-  address: 'http://www.xcally.com/shop/',
-  color: '#f51111',
-  color_focus: '#f51111',
-  color_button: '#f51111',
-  remote: 'http://localhost:9000',
-  animation: true,
-  header_shape: 'squared',
-  header_online: 'We are here!',
-  online_message: 'Questions? Insert your name and email address to start a live-chat with our support team.',
-  username_placeholder: 'Your name',
-  email_placeholder: 'Your email address',
-  start_chat_button: 'Chat',
-  header_offline: 'Contact us',
-  offline_message: "<strong>We're not online.</strong><br />It doesn't mean we're not there to help - leave your message below and we'll be in touch as soon as possible.'",
-  enquiry_message_placeholder: 'Your message...',
-  enquiry_button: 'Leave message',
-  download_transcript: true
-}).then(function(chatWebsite) {
-  console.log('Finished populating chat website');
-  models.ChatQueue.findAll().then(function(chatQueues) {
-    models.ChatApplication.create({
-      app: 'queue',
-      appdata: chatQueues[0].id,
-      priority: 1,
-      timeout: 30,
-      ChatWebsiteId: chatWebsite.id,
-      ChatQueueId: chatQueues[0].id
-    }).then(function() {
-      console.log('Finished populating chat website application 1');
-    }).catch(function(err) {
-      // console.error(err);
-    });
-    models.ChatApplication.create({
-      app: 'queue',
-      appdata: chatQueues[1].id,
-      priority: 2,
-      timeout: 30,
-      ChatWebsiteId: chatWebsite.id,
-      ChatQueueId: chatQueues[1].id
-    }).then(function() {
-      console.log('Finished populating chat website application 2');
-    }).catch(function(err) {
-      // console.error(err);
-    });
-  }).catch(function(err) {
-    // console.error(err);
-  });
-}).catch(function(err) {
-  // console.error(err);
-});
-
-models.Variable.bulkCreate([{
-  name: "variable1",
-  description: "description project"
-}], {
-  ignoreDuplicates: true
-}).then(function() {
-  console.log('Finished populating variables');
-});
-
-models.VoiceContext.bulkCreate([{
-  name: "from-sip",
-  description: "Default context (DO NOT DELETE)",
-  defaultEntry: true
-}, {
-  name: "from-voip-provider",
-  description: "Default context (DO NOT DELETE)",
-  defaultEntry: true
-}, {
-  name: "inbound-fax",
-  description: "Default context (DO NOT DELETE)",
-  defaultEntry: true
-}, {
-  name: "outbound-fax",
-  description: "Default context (DO NOT DELETE)",
-  defaultEntry: true
-}, {
-  name: "from-voicemail",
-  description: "Default context (DO NOT DELETE)",
-  defaultEntry: true
-}], {
-  ignoreDuplicates: true,
-  individualHooks: true
-}).then(function() {
-  console.log('Finished populating context variables');
-});
-
-models.VoiceMusicOnHold.bulkCreate([{
-  name: "default",
-  mode: "files",
-  directory: 'var/lib/asterisk/moh',
-  sort: 'alpha',
-  format: 'wav',
-  defaultEntry: true
-}], {
-  ignoreDuplicates: true,
-  individualHooks: true
-}).then(function() {
-  console.log('Finished populating moh variables');
-});
-
-models.Setting.bulkCreate([{
-  id: 1,
-  min_internal: 1000,
-  soundPath: '/var/opt/motion/server/files/sounds/converted'
-}], {
-  ignoreDuplicates: true,
-  individualHooks: true
-}).then(function() {
-  console.log('Finished populating moh variables');
-});
-
-models.Dashboard.bulkCreate([{
-  id: 1,
-  name: 'Motion Dashboard',
-  model: JSON.stringify({
-    title: 'Motion Dashboard',
-    rows: [{
-      columns: [{
-        styleClass: 'col-md-4',
-        widgets: [{
-          type: 'clock',
-          title: 'Clock',
-          config: {
-            timePattern: 'hh:mm:ss a',
-            datePattern: 'dddd, MMMM Do YYYY'
-          }
-        }]
-      }, {
-        styleClass: 'col-md-8',
-        widgets: [{
-          type: 'iframe',
-          title: 'Iframe',
-          config: {
-            url: 'https://demo.xcally.com/shop/'
-          }
-        }]
-      }]
-    }]
-  }),
-  defaultEntry: true,
-  editable: false
-}], {
-  ignoreDuplicates: true,
-  individualHooks: true
-}).then(function() {
-  console.log('Finished populating moh variables');
-});
-
-var newIntegrations = [{
-  name: 'Zendesk',
-  version: '1.0.0',
-  author: 'XeniaLAB s.r.l.',
-  logo: 'assets/images/media/zendesk2.png',
-  state: 'zendesk',
-  description: 'Start using xCALLY - Zendesk integration: Auto-Generated Tickets, fully customizable comments, Custom Fields management, Tag support and Simple Setup',
-  link: 'https://wiki.xcallymotion.com/display/XMD/Zendesk+integration'
-}, {
-  name: 'Salesforce',
-  version: '1.0.0',
-  author: 'XeniaLAB s.r.l.',
-  logo: 'assets/images/media/salesforce2.png',
-  state: 'salesforce',
-  description: 'Start using xCALLY - Salesforce integration: Auto-Generated Tasks, fully customizable comments, Custom Fields management and OpenCTI support',
-  link: 'https://wiki.xcallymotion.com/display/XMD/Salesforce+integration'
-}, {
-  name: 'iFrame',
-  version: '1.0.0',
-  author: 'XeniaLAB s.r.l.',
-  logo: 'assets/images/media/iframe.png',
-  state: 'iframe',
-  description: 'Start using iFrame integration: enable your agents to view external pages (like your CRM) directly from Motion GUI',
-  link: 'https://wiki.xcallymotion.com/display/XMD/iFrame+Integration'
-}, {
-  name: 'Desk.com',
-  version: '1.0.0',
-  author: 'XeniaLAB s.r.l.',
-  logo: 'assets/images/media/desk2.png',
-  state: 'desk',
-  description: 'Description for Desk.com asdnvlsdbjv saeklbvqwoVBQ'
-}, {
-  name: 'Freshdesk',
-  version: '1.0.0',
-  author: 'XeniaLAB s.r.l.',
-  logo: 'assets/images/media/freshdesk.png',
-  state: 'freshdesk',
-  description: 'Description for Freshdesk'
-}, {
-  name: 'SugarCRM',
-  version: '1.0.0',
-  author: 'XeniaLAB s.r.l.',
-  logo: 'assets/images/media/sugarcrm2.png',
-  state: 'sugarcrm',
-  description: 'Description for SugarCRM'
-}];
-
-models.Integration
-  .findAll()
-  .then(function(oldIntegrations) {
-    var bulkIntegrations = [];
-    oldIntegrations = _.map(oldIntegrations, 'state');
-    newIntegrations.forEach(function(integration) {
-      if (_.includes(oldIntegrations, integration.state)) {
-        bulkIntegrations.push(models.Integration.update(integration, {
-          where: {
-            state: integration.state
-          }
-        }));
-      } else {
-        bulkIntegrations.push(models.Integration.create(integration));
-      }
-    });
-    return bulkIntegrations;
-  })
-  .all()
-  .then(function() {
-    console.log('Finished populating integrations');
-  })
-  .catch(function(err) {
-    console.log('Error populating integrations:', err);
-  });
-
-var newDefaulReports = [{
-  "id": 1,
-  "name": "Queue - Details",
-  "description": null,
-  "parent": "j4_3",
-  "table": "report_queue_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-}, {
-  "id": 2,
-  "name": "Details",
-  "description": "Calls details (cdr)",
-  "parent": "j20_1",
-  "table": "report_call_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-}, {
-  "id": 3,
-  "name": "Outbound",
-  "description": "Manual outbound calls detail",
-  "parent": "j20_1",
-  "table": "report_call_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"outbound\"}]}}"
-}, {
-  "id": 4,
-  "name": "Calls by Queue",
-  "description": null,
-  "parent": "j4_7",
-  "table": "report_queue_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-}, {
-  "id": 5,
-  "name": "Details",
-  "description": null,
-  "parent": "j4_5",
-  "table": "report_agent_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\"}]}}"
-}, {
-  "id": 6,
-  "name": "Calls by Agent",
-  "description": null,
-  "parent": "j4_5",
-  "table": "report_agent_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-}, {
-  "id": 7,
-  "name": "Calls by Queue",
-  "description": null,
-  "parent": "j4_5",
-  "table": "report_agent_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\"}]}}"
-}, {
-  "id": 8,
-  "name": "Answer Time by Queue",
-  "description": null,
-  "parent": "j4_5",
-  "table": "report_agent_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\"}]}}"
-}, {
-  "id": 9,
-  "name": "Disconnection Cause",
-  "description": null,
-  "parent": "j4_5",
-  "table": "report_agent_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\"}]}}"
-}, {
-  "id": 10,
-  "name": "Details",
-  "description": null,
-  "parent": "j4_6",
-  "table": "report_queue_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"queuecallercomplete\",\"value\":\"0\"}]}}"
-}, {
-  "id": 11,
-  "name": "Unanswered by Queue",
-  "description": null,
-  "parent": "j4_6",
-  "table": "report_queue_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"queuecallercomplete\",\"value\":\"0\"}]}}"
-}, {
-  "id": 12,
-  "name": "Exit Cause",
-  "description": null,
-  "parent": "j4_6",
-  "table": "report_queue_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"queuecallerexit\",\"value\":\"1\"}]}}"
-}, {
-  "id": 13,
-  "name": "Abandon Time by Queue",
-  "description": null,
-  "parent": "j4_6",
-  "table": "report_queue_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"queuecallerabandon\",\"value\":\"1\"}]}}"
-}, {
-  "id": 14,
-  "name": "Calls by Date",
-  "description": null,
-  "parent": "j4_7",
-  "table": "report_queue_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-}, {
-  "id": 15,
-  "name": "Calls by Hour",
-  "description": null,
-  "parent": "j4_7",
-  "table": "report_queue_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-}, {
-  "id": 16,
-  "name": "Calls by Day",
-  "description": null,
-  "parent": "j4_7",
-  "table": "report_queue_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-}, {
-  "id": 17,
-  "name": "Calls by Type",
-  "description": null,
-  "parent": "j20_1",
-  "table": "report_call_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-}, {
-  "id": 18,
-  "name": "Outbound Calls Disposition",
-  "description": "Outbound calls grouped by disposition",
-  "parent": "j20_1",
-  "table": "report_call_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"outbound\"}]}}"
-}, {
-  "id": 19,
-  "name": "Pause Time",
-  "description": null,
-  "parent": "j4_4",
-  "table": "report_member_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"PAUSE\"},{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"voice\"}]}}"
-}, {
-  "id": 20,
-  "name": "Login Time",
-  "description": null,
-  "parent": "j4_4",
-  "table": "report_member_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"LOGIN\"},{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"voice\"}]}}"
-}, {
-  "id": 21,
-  "name": "Website Summary",
-  "description": null,
-  "parent": "j4_1",
-  "table": "report_chat_session_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-}, {
-  "id": 22,
-  "name": "Session Detail",
-  "description": null,
-  "parent": "j4_1",
-  "table": "report_chat_session_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}",
-}, {
-  "id": 23,
-  "name": "Chat by Agent",
-  "description": null,
-  "parent": "j4_1",
-  "table": "report_chat_session_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"complete\",\"value\":\"1\"}]}}"
-}, {
-  "id": 24,
-  "name": "Chat by Queue",
-  "description": null,
-  "parent": "j4_1",
-  "table": "report_chat_session_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"application\",\"value\":\"queue\"}]}}"
-}, {
-  "id": 25,
-  "name": "Details",
-  "description": "Agents status details",
-  "parent": "j4_4",
-  "table": "report_member_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"voice\"}]}}"
-}, {
-  "id": 26,
-  "name": "Summary",
-  "description": "CallySquare Summary",
-  "parent": "j112_1",
-  "table": "report_square_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-}, {
-  "id": 27,
-  "name": "Blocks",
-  "description": "CallySquare Blocks",
-  "parent": "j112_1",
-  "table": "report_square_details_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-}, {
-  "id": 28,
-  "name": "Login Details",
-  "description": "Agents status details",
-  "parent": "j24_1",
-  "table": "report_member_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"voice\"},{\"condition\":\"=\",\"field\":\"type\",\"value\":\"LOGIN\"}]}}"
-}, {
-  "id": 29,
-  "name": "Pause Time by Channel",
-  "description": "",
-  "parent": "j24_1",
-  "table": "report_member_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"PAUSE\"}]}}"
-}, {
-  "id": 30,
-  "name": "Pause Details",
-  "description": "Agents status details",
-  "parent": "j4_4",
-  "table": "report_member_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"voice\"},{\"condition\":\"=\",\"field\":\"type\",\"value\":\"PAUSE\"}]}}"
-}, {
-  "id": 31,
-  "name": "Rating by Agent",
-  "description": null,
-  "parent": "j20_3",
-  "table": "voice_recordings",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-}, {
-  "id": 32,
-  "name": "Rating by Queue",
-  "description": null,
-  "parent": "j20_3",
-  "table": "voice_recordings",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"IS NOT EMPTY\",\"field\":\"queue\",\"value\":\"\",\"required\":false}]}}"
-}, {
-  "id": 33,
-  "name": "Queue - Calls",
-  "description": null,
-  "parent": "j4_3",
-  "table": "report_queue_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-}, {
-  "id": 34,
-  "name": "Answer Time by Hour",
-  "description": null,
-  "parent": "j4_5",
-  "table": "report_agent_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\"}]}}"
-}, {
-  "id": 35,
-  "name": "Received emails by account",
-  "description": "Summary of the emails accepted by application for each account",
-  "parent": "j4_2",
-  "table": "report_mail_session_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-}, {
-  "id": 36,
-  "name": "Received emails by queue",
-  "description": "Summary of received email by queue",
-  "parent": "j4_2",
-  "table": "report_mail_session_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"application\",\"value\":\"queue\",\"required\":true}]}}"
-}, {
-  "id": 37,
-  "name": "Accepted emails by agent",
-  "description": "Summary of accepted email by agent",
-  "parent": "j4_2",
-  "table": "report_mail_session_history",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"timeout\",\"value\":\"0\",\"required\":true}]}}"
-}, {
-  "id": 38,
-  "name": "Messages Summary by Date",
-  "description": "Global messages summary by date",
-  "parent": "j4_2",
-  "table": "mail_messages",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"auto\",\"value\":false}]}}"
-}, {
-  "id": 39,
-  "name": "Interactions detail",
-  "description": "Detailed report about the interactions",
-  "parent": "j4_2",
-  "table": "mail_rooms",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-}, {
-  "id": 40,
-  "name": "Disposition Summary",
-  "description": "Closed interactions by disposition (filtered by disposition not null)",
-  "parent": "j4_2",
-  "table": "mail_rooms",
-  "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"IS NOT NULL\",\"field\":\"disposition\",\"value\":\"\",\"required\":false}]}}"
-}, {
-  "id": 41,
-  "name": "Closed interactions by date",
-  "description": "Summary of closed interactions grouped by date + average handle time (from when the first email arrived to when the interaction has been closed)",
-  "parent": "j4_2",
-  "table": "mail_rooms",
-  "conditions": "{\"group\":{\"operator\":\"OR\",\"rules\":[{\"condition\":\"=\",\"field\":\"status\",\"value\":\"'CLOSED'\",\"required\":true}]}}"
-}];
-
-var newDefaultMetrics = [{
-  "id": 1,
-  "name": "Queue - TalkTime",
-  "table": "report_queue_history",
-  "metric": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)"
-}, {
-  "id": 2,
-  "name": "Queue - Abandon Time",
-  "table": "report_queue_history",
-  "metric": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)"
-}, {
-  "id": 3,
-  "name": "Abandoned <10s",
-  "table": "report_queue_history",
-  "metric": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <10,1,NULL))",
-  "description": "Count of abandoned calls within 10 seconds (Short Calls)"
-}, {
-  "id": 4,
-  "name": "Queue - AnswerTime",
-  "table": "report_queue_history",
-  "metric": "IF(queuecallercomplete=1,holdtime,null)"
-}, {
-  "id": 5,
-  "name": "Answered < 10s",
-  "table": "report_agent_history",
-  "metric": "COUNT(IF(holdtime<10,1,NULL))",
-  "description": "Count of answered calls within 10 seconds"
-}, {
-  "id": 6,
-  "name": "Answered 10-20s",
-  "table": "report_agent_history",
-  "metric": "COUNT(IF(holdtime >=10 AND holdtime <20,1,NULL))",
-  "description": "Count of answered calls between 10 and 20 seconds"
-}, {
-  "id": 7,
-  "name": "Answered 20-30s",
-  "table": "report_agent_history",
-  "metric": "COUNT(IF(holdtime >=20 AND holdtime <30,1,NULL))",
-  "description": "Count of answered calls between 20 and 30 seconds"
-}, {
-  "id": 8,
-  "name": "Answered >30s",
-  "table": "report_agent_history",
-  "metric": "COUNT(IF(holdtime >=30,1,NULL))",
-  "description": "Count of answered calls over 30 seconds"
-}, {
-  "id": 9,
-  "name": "Queue - Exit Time",
-  "table": "report_queue_history",
-  "metric": "UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)"
-}, {
-  "id": 10,
-  "name": "Abandoned 10-60s",
-  "table": "report_queue_history",
-  "metric": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=10 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <60,1,NULL))",
-  "description": "Count of abandoned calls between 10 and 60 seconds"
-}, {
-  "id": 11,
-  "name": "Abandoned 60-120s",
-  "table": "report_queue_history",
-  "metric": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=60 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <120,1,NULL))",
-  "description": "Count of abandoned calls between 60 and 120 seconds"
-}, {
-  "id": 12,
-  "name": "Queue - Abandoned >120s",
-  "table": "report_queue_history",
-  "metric": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=120,1,NULL))",
-  "description": "Count of abandoned calls over 120 seconds"
-}, {
-  "id": 13,
-  "name": "Queue - JoinDate",
-  "table": "report_queue_history",
-  "metric": "DATE(queuecallerjoinat)",
-  "description": "Extract the date of the join queue"
-}, {
-  "id": 14,
-  "name": "Queue - JoinHour",
-  "table": "report_queue_history",
-  "metric": "HOUR(queuecallerjoinat)",
-  "description": "Extract the hour of the join queue"
-}, {
-  "id": 15,
-  "name": "Queue - JoinDay",
-  "table": "report_queue_history",
-  "metric": "DAY(queuecallerjoinat)",
-  "description": "Extract the day of the join queue"
-}, {
-  "id": 16,
-  "name": "Member - Event Duration",
-  "table": "report_member_history",
-  "metric": "UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt)",
-  "description": "Member event duration in seconds"
-}, {
-  "id": 17,
-  "name": "Member - Total Event Duration",
-  "table": "report_member_history",
-  "metric": "SEC_TO_TIME(SUM(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt)))",
-  "description": "Total event duration"
-}, {
-  "id": 18,
-  "name": "Chat - Session Time",
-  "table": "report_chat_session_history",
-  "metric": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)",
-  "description": "Session Time",
-}, {
-  "id": 19,
-  "name": "Chat - Queue",
-  "table": "report_chat_session_history",
-  "metric": "COUNT(IF(application=\"queue\",1,NULL))",
-  "description": "Chat queue application count",
-}, {
-  "id": 20,
-  "name": "Chat - Agent",
-  "table": "report_chat_session_history",
-  "metric": "COUNT(IF(application=\"agent\",1,NULL))",
-  "description": "Chat agent application count",
-}, {
-  "id": 21,
-  "name": "Chat - Avg Session Time",
-  "table": "report_chat_session_history",
-  "metric": "ROUND(AVG(UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)))",
-  "description": "Average session time"
-}, {
-  "id": 22,
-  "name": "Member - Event Duration (HH:mm:ss)",
-  "table": "report_member_history",
-  "metric": "SEC_TO_TIME(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt))",
-  "description": "Member events duration in time format"
-}, {
-  "id": 23,
-  "name": "Square - Duration",
-  "table": "report_square_history",
-  "metric": "UNIX_TIMESTAMP(leaveAt)-UNIX_TIMESTAMP(joinAt)",
-  "description": "IVR Duration"
-}, {
-  "id": 24,
-  "name": "Queue - EndTime Call",
-  "table": "report_queue_history",
-  "metric": "CASE WHEN queuecallercomplete=1 THEN queuecallercompleteAt ELSE queuecallerLeaveAt END",
-  "description": null
-}, {
-  "id": 25,
-  "name": "Queue - Calls Result",
-  "table": "report_queue_history",
-  "metric": "CASE WHEN queuecallercomplete=1 THEN \"YES\" ELSE \"NO\" END",
-  "description": "Show if a call is answered or not"
-}];
-
-models.ReportTree.destroy({
-    where: {
-      id: 1
-    }
-  })
-  .then(function() {
-    return models.ReportTree.create({
-      id: 1,
-      tree: '[{"id":"1","parent":"#","text":"Motion Reports","icon":"icon-rocket","state":{"selected":true,"opened":true}},{"id":"2","text":"Voice","icon":true,"li_attr":{"id":"2"},"a_attr":{"href":"#","id":"2_anchor"},"state":{"loaded":true,"opened":true,"selected":false,"disabled":false},"data":{},"parent":"1"},{"id":"j4_3","text":"Queues","icon":true,"li_attr":{"id":"j4_3"},"a_attr":{"href":"#","id":"j4_3_anchor"},"state":{"loaded":true,"opened":true,"selected":false,"disabled":false},"data":{},"parent":"2"},{"id":"j4_5","text":"Answered","icon":true,"li_attr":{"id":"j4_5"},"a_attr":{"href":"#","id":"j4_5_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j4_3"},{"id":"j4_6","text":"Unanswered","icon":true,"li_attr":{"id":"j4_6"},"a_attr":{"href":"#","id":"j4_6_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j4_3"},{"id":"j4_7","text":"Distribution","icon":true,"li_attr":{"id":"j4_7"},"a_attr":{"href":"#","id":"j4_7_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j4_3"},{"id":"j20_1","text":"Calls","icon":true,"li_attr":{"id":"j20_1"},"a_attr":{"href":"#","id":"j20_1_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"2"},{"id":"j4_4","text":"Agents","icon":true,"li_attr":{"id":"j4_4"},"a_attr":{"href":"#","id":"j4_4_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"2"},{"id":"j112_1","text":"CallySquare","icon":true,"li_attr":{"id":"j112_1"},"a_attr":{"href":"#","id":"j112_1_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"2"},{"id":"j20_2","text":"Integration","icon":true,"li_attr":{"id":"j20_2"},"a_attr":{"href":"#","id":"j20_2_anchor"},"state":{"loaded":true,"opened":false,"selected":true,"disabled":false},"data":{},"parent":"2"},{"id":"j20_3","text":"Recordings","icon":true,"li_attr":{"id":"j20_3"},"a_attr":{"href":"#","id":"j20_3_anchor"},"state":{"loaded":true,"opened":false,"selected":true,"disabled":false},"data":{},"parent":"2"},{"id":"j4_1","text":"Chat","icon":true,"li_attr":{"id":"j4_1"},"a_attr":{"href":"#","id":"j4_1_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"1"},{"id":"j4_2","text":"Mail","icon":true,"li_attr":{"id":"j4_2"},"a_attr":{"href":"#","id":"j4_2_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"1"},{"id":"j24_1","text":"Agents","icon":true,"li_attr":{"id":"j24_1"},"a_attr":{"href":"#","id":"j24_1_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"1"}]',
-    })
-  })
-  .then(function() {
-    return models.ReportTree.findOrCreate({
-      where: {
-        id: 2
-      },
-      defaults: {
-        id: 2,
-        tree: '[{"id":"1","text":"Custom Reports","icon":"icon-book-open","li_attr":{"id":"1"},"a_attr":{"href":"#","id":"1_anchor"},"state":{"loaded":true,"opened":true,"selected":false,"disabled":false},"data":{},"parent":"#"},{"id":"2","text":"Basic Node","icon":true,"li_attr":{"id":"2"},"a_attr":{"href":"#","id":"2_anchor"},"state":{"loaded":true,"opened":true,"selected":false,"disabled":false},"data":{},"parent":"1"}]'
-      }
-    })
-  })
-  .then(function() {
-    return models.DefaultMetric.findAll();
-  })
-  .then(function(oldDefaultMetrics) {
-    var bulkDefaultMetrics = [];
-    oldDefaultMetrics = _.map(oldDefaultMetrics, 'id');
-    newDefaultMetrics.forEach(function(defaultMet) {
-      if (_.includes(oldDefaultMetrics, defaultMet.id)) {
-        bulkDefaultMetrics.push(models.DefaultMetric.update(defaultMet, {
-          where: {
-            id: defaultMet.id
-          }
-        }));
-      } else {
-        bulkDefaultMetrics.push(models.DefaultMetric.create(defaultMet));
-      }
-    });
-    return bulkDefaultMetrics;
-  })
-  .all()
-  .then(function() {
-    return models.DefaultReport.findAll()
-  })
-  .then(function(oldDefaultReports) {
-    var bulkDefaultReports = [];
-    oldDefaultReports = _.map(oldDefaultReports, 'id');
-    newDefaulReports.forEach(function(defaultRep) {
-      if (_.includes(oldDefaultReports, defaultRep.id)) {
-        bulkDefaultReports.push(models.DefaultReport.update(defaultRep, {
-          where: {
-            id: defaultRep.id
-          }
-        }));
-      } else {
-        bulkDefaultReports.push(models.DefaultReport.create(defaultRep));
-      }
-    });
-    return bulkDefaultReports;
-  })
-  .all()
-  .then(function() {
-    return models.ReportField.destroy({
-      where: {
-        DefaultReportId: {
-          $gt: 0
-        }
-      }
-    })
-  })
-  .then(function() {
-    return models.ReportField.bulkCreate([{
-      "field": "uniqueid",
-      "alias": "UniqueId",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 1
-    }, {
-      "field": "calleridnum",
-      "alias": "CallerIdNum",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 1
-    }, {
-      "field": "calleridname",
-      "alias": "CallerIdName",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 1
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 1
-    }, {
-      "field": "queuecallerjoinAt",
-      "alias": "QueueJoinAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 1
-    }, {
-      "field": "queuecallerleaveAt",
-      "alias": "QueueLeaveAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 1
-    }, {
-      "field": "queuecallerabandon",
-      "alias": "QueueAbandon",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 1
-    }, {
-      "field": "queuecallerabandonAt",
-      "alias": "QueueAbandonAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 1
-    }, {
-      "field": "queuecallercomplete",
-      "alias": "Complete",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 1
-    }, {
-      "field": "queuecallercompleteAt",
-      "alias": "CompleteAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 1
-    }, {
-      "field": "queuecallerexit",
-      "alias": "QueueExit",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 1
-    }, {
-      "field": "queuecallerexitAt",
-      "alias": "QueueExitAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 1
-    }, {
-      "field": "queuecallerexitreason",
-      "alias": "QueueExitReason",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 1
-    }, {
-      "field": "exten",
-      "alias": "DID",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 1
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)",
-      "alias": "TalkTime",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 1,
-      "DefaultReportId": 1
-    }, {
-      "field": "IF(queuecallercomplete=1,holdtime,null)",
-      "alias": "AnswerTime",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 4,
-      "DefaultReportId": 1
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)",
-      "alias": "AbandonTime",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 2,
-      "DefaultReportId": 1
-    }, {
-      "field": "uniqueid",
-      "alias": "UniqueID",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 2
-    }, {
-      "field": "type",
-      "alias": "Type",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 2
-    }, {
-      "field": "tag",
-      "alias": "Tag",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 2
-    }, {
-      "field": "source",
-      "alias": "Source",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 2
-    }, {
-      "field": "destination",
-      "alias": "Destination",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 2
-    }, {
-      "field": "callerid",
-      "alias": "CallerID",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 2
-    }, {
-      "field": "destinationchannel",
-      "alias": "DestChannel",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 2
-    }, {
-      "field": "lastapplication",
-      "alias": "LastApp",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 2
-    }, {
-      "field": "lastdata",
-      "alias": "LastData",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 2
-    }, {
-      "field": "starttime",
-      "alias": "StartTime",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 2
-    }, {
-      "field": "answertime",
-      "alias": "AnswerTime",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 2
-    }, {
-      "field": "endtime",
-      "alias": "EndTime",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 2
-    }, {
-      "field": "duration",
-      "alias": "Duration",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 2
-    }, {
-      "field": "disposition",
-      "alias": "Disposition",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 2
-    }, {
-      "field": "uniqueid",
-      "alias": "UniqueID",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 3
-    }, {
-      "field": "accountcode",
-      "alias": "AgentExtension",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 3
-    }, {
-      "field": "source",
-      "alias": "Source",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 3
-    }, {
-      "field": "destination",
-      "alias": "Destination",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 3
-    }, {
-      "field": "callerid",
-      "alias": "CallerId",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 3
-    }, {
-      "field": "starttime",
-      "alias": "StartTime",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 3
-    }, {
-      "field": "answertime",
-      "alias": "AnswerTime",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 3
-    }, {
-      "field": "endtime",
-      "alias": "EndTIme",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 3
-    }, {
-      "field": "duration",
-      "alias": "Duration",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 3
-    }, {
-      "field": "billableseconds",
-      "alias": "Billsec",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 3
-    }, {
-      "field": "disposition",
-      "alias": "Disposition",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 3
-    }, {
-      "field": "tag",
-      "alias": "Tag",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 3
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 4
-    }, {
-      "field": "uniqueid",
-      "alias": "Offered",
-      "function": "COUNT",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 4
-    }, {
-      "field": "queuecallercomplete",
-      "alias": "Completed",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 4
-    }, {
-      "field": "queuecallerabandon",
-      "alias": "Abandoned",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 4
-    }, {
-      "field": "queuecallerexit",
-      "alias": "Unmanaged",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 4
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)",
-      "alias": "AvgTalkTime",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 1,
-      "DefaultReportId": 4
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)",
-      "alias": "AvgAbandonTime",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 1,
-      "DefaultReportId": 4
-    }, {
-      "field": "IF(queuecallercomplete=1,holdtime,null)",
-      "alias": "AvgAnswerTime",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 4,
-      "DefaultReportId": 4
-    }, {
-      "field": "uniqueid",
-      "alias": "UniqueId",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 5
-    }, {
-      "field": "calleridnum",
-      "alias": "CallerIdNum",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 5
-    }, {
-      "field": "calleridname",
-      "alias": "CallerIdName",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 5
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 5
-    }, {
-      "field": "membername",
-      "alias": "Agent",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 5
-    }, {
-      "field": "agentcalledAt",
-      "alias": "AgentCalledAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 5
-    }, {
-      "field": "agentconnectAt",
-      "alias": "AgentConnectAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 5
-    }, {
-      "field": "agentcompleteAt",
-      "alias": "AgentCompleteAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 5
-    }, {
-      "field": "holdtime",
-      "alias": "AnswerTime",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 5
-    }, {
-      "field": "talktime",
-      "alias": "TalkTime",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 5
-    }, {
-      "field": "agentacw",
-      "alias": "AgentACW",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 5
-    }, {
-      "field": "acwtime",
-      "alias": "AgentACWTime",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 5
-    }, {
-      "field": "agentcomplete",
-      "alias": "AgentComplete",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 5
-    }, {
-      "field": "reason",
-      "alias": "HangupReason",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 5
-    }, {
-      "field": "lastevent",
-      "alias": "LastEvent",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 5
-    }, {
-      "field": "exten",
-      "alias": "DID",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 5
-    }, {
-      "field": "membername",
-      "alias": "Agent",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 6
-    }, {
-      "field": "agentcomplete",
-      "alias": "Completed",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 6
-    }, {
-      "field": "agentringnoanswer",
-      "alias": "RingNoAnswer",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 6
-    }, {
-      "field": "talktime",
-      "alias": "TotTalkTime",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 6
-    }, {
-      "field": "acwtime",
-      "alias": "TotACWTime",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 6
-    }, {
-      "field": "talktime",
-      "alias": "AvgTalkTime",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 6
-    }, {
-      "field": "acwtime",
-      "alias": "AvgACWTime",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 6
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 7
-    }, {
-      "field": "agentcomplete",
-      "alias": "Completed",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 7
-    }, {
-      "field": "talktime",
-      "alias": "Tot TalkTime",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 7
-    }, {
-      "field": "talktime",
-      "alias": "Avg TalkTime",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 7
-    }, {
-      "field": "holdtime",
-      "alias": "Tot HoldTime",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 7
-    }, {
-      "field": "holdtime",
-      "alias": "Avg HoldTime",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 7
-    }, {
-      "field": "acwtime",
-      "alias": "Tot ACWTime",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 7
-    }, {
-      "field": "acwtime",
-      "alias": "Avg ACWTime",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 7
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 8
-    }, {
-      "field": "agentcomplete",
-      "alias": "Tot Answered",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 8
-    }, {
-      "field": "COUNT(IF(holdtime<10,1,NULL))",
-      "alias": "Answered <10s",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 5,
-      "DefaultReportId": 8
-    }, {
-      "field": "COUNT(IF(holdtime >=10 AND holdtime <20,1,NULL))",
-      "alias": "Answered 10-20s",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 6,
-      "DefaultReportId": 8
-    }, {
-      "field": "COUNT(IF(holdtime >=20 AND holdtime <30,1,NULL))",
-      "alias": "Answered 20-30s",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 7,
-      "DefaultReportId": 8
-    }, {
-      "field": "COUNT(IF(holdtime >=30,1,NULL))",
-      "alias": "Answered >30s",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 8,
-      "DefaultReportId": 8
-    }, {
-      "field": "reason",
-      "alias": "Reason",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 9
-    }, {
-      "field": "uniqueid",
-      "alias": "Calls",
-      "function": "COUNT",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 9
-    }, {
-      "field": "uniqueid",
-      "alias": "UniqueId",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 10
-    }, {
-      "field": "calleridnum",
-      "alias": "CallerIdNum",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 10
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 10
-    }, {
-      "field": "queuecallerjoinAt",
-      "alias": "QueueJoinAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 10
-    }, {
-      "field": "queuecallerleaveAt",
-      "alias": "QueueLeaveAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 10
-    }, {
-      "field": "queuecallerabandon",
-      "alias": "QueueAbandon",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 10
-    }, {
-      "field": "queuecallerabandonAt",
-      "alias": "QueueAbandonAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 10
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)",
-      "alias": "Abandon Time",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 2,
-      "DefaultReportId": 10
-    }, {
-      "field": "queuecallerexit",
-      "alias": "QueueExit",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 10
-    }, {
-      "field": "queuecallerexitAt",
-      "alias": "QueueExitAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 10
-    }, {
-      "field": "queuecallerexitreason",
-      "alias": "QueueExitReason",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 10
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)",
-      "alias": "Exit Time",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 9,
-      "DefaultReportId": 10
-    }, {
-      "field": "position",
-      "alias": "QueuePosition",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 10
-    }, {
-      "field": "exten",
-      "alias": "DID",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 10
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 11
-    }, {
-      "field": "queuecallerabandon",
-      "alias": "Abandoned",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 11
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)",
-      "alias": "AvgAbandonTime",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 2,
-      "DefaultReportId": 11
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)",
-      "alias": "Tot AbandonTime",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 2,
-      "DefaultReportId": 11
-    }, {
-      "field": "queuecallerexit",
-      "alias": "Exited",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 11
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)",
-      "alias": "Avg ExitedTIme",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 9,
-      "DefaultReportId": 11
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)",
-      "alias": "Tot ExitedTime",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 9,
-      "DefaultReportId": 11
-    }, {
-      "field": "queuecallerexitreason",
-      "alias": "Reason",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 12
-    }, {
-      "field": "queuecallerexit",
-      "alias": "Calls",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 12
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)",
-      "alias": "Tot ExitTime",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 9,
-      "DefaultReportId": 12
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 13
-    }, {
-      "field": "queuecallerabandon",
-      "alias": "Tot Abandoned",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 13
-    }, {
-      "field": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <10,1,NULL))",
-      "alias": "Abandoned<10s",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 3,
-      "DefaultReportId": 13
-    }, {
-      "field": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=10 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <60,1,NULL))",
-      "alias": "Abandoned 10-60s",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 10,
-      "DefaultReportId": 13
-    }, {
-      "field": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=60 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <120,1,NULL))",
-      "alias": "Abandoned 60-120s",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 11,
-      "DefaultReportId": 13
-    }, {
-      "field": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=120,1,NULL))",
-      "alias": "Abandoned>120s",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 12,
-      "DefaultReportId": 13
-    }, {
-      "field": "DATE(queuecallerjoinat)",
-      "alias": "Date",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultMetricId": 13,
-      "DefaultReportId": 14
-    }, {
-      "field": "uniqueid",
-      "alias": "Offered",
-      "function": "COUNT",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 14
-    }, {
-      "field": "queuecallercomplete",
-      "alias": "Completed",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 14
-    }, {
-      "field": "queuecallerabandon",
-      "alias": "Abandoned",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 14
-    }, {
-      "field": "queuecallerexit",
-      "alias": "Unmanaged",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 14
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)",
-      "alias": "AvgTalkTime",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 1,
-      "DefaultReportId": 14
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)",
-      "alias": "AvgAbandonTime",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 2,
-      "DefaultReportId": 14
-    }, {
-      "field": "IF(queuecallercomplete=1,holdtime,null)",
-      "alias": "AvgAnswerTime",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 4,
-      "DefaultReportId": 14
-    }, {
-      "field": "HOUR(queuecallerjoinat)",
-      "alias": "Hour",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultMetricId": 14,
-      "DefaultReportId": 15
-    }, {
-      "field": "uniqueid",
-      "alias": "Offered",
-      "function": "COUNT",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 15
-    }, {
-      "field": "queuecallercomplete",
-      "alias": "Completed",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 15
-    }, {
-      "field": "queuecallerabandon",
-      "alias": "Abandoned",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 15
-    }, {
-      "field": "queuecallerexit",
-      "alias": "Unmanaged",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 15
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)",
-      "alias": "AvgTalkTime",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 1,
-      "DefaultReportId": 15
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)",
-      "alias": "AvgAbandonTime",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 2,
-      "DefaultReportId": 15
-    }, {
-      "field": "IF(queuecallercomplete=1,holdtime,null)",
-      "alias": "AvgAnswerTime",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 4,
-      "DefaultReportId": 15
-    }, {
-      "field": "DAY(queuecallerjoinat)",
-      "alias": "Day",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultMetricId": 15,
-      "DefaultReportId": 16
-    }, {
-      "field": "uniqueid",
-      "alias": "Offered",
-      "function": "COUNT",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 16
-    }, {
-      "field": "queuecallercomplete",
-      "alias": "Completed",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 16
-    }, {
-      "field": "queuecallerabandon",
-      "alias": "Abandoned",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 16
-    }, {
-      "field": "queuecallerexit",
-      "alias": "Unmanaged",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 16
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)",
-      "alias": "AvgTalkTime",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 1,
-      "DefaultReportId": 16
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)",
-      "alias": "AvgAbandonTime",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 2,
-      "DefaultReportId": 16
-    }, {
-      "field": "IF(queuecallercomplete=1,holdtime,null)",
-      "alias": "AvgAnswerTime",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 4,
-      "DefaultReportId": 16
-    }, {
-      "field": "type",
-      "alias": "Type",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 17
-    }, {
-      "field": "uniqueid",
-      "alias": "Calls",
-      "function": "COUNT",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 17
-    }, {
-      "field": "duration",
-      "alias": "Tot Duration",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 17
-    }, {
-      "field": "duration",
-      "alias": "Avg Duration",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 17
-    }, {
-      "field": "disposition",
-      "alias": "Disposition",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 18
-    }, {
-      "field": "uniqueid",
-      "alias": "Calls",
-      "function": "COUNT",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 18
-    }, {
-      "field": "duration",
-      "alias": "Tot Duration",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 18
-    }, {
-      "field": "duration",
-      "alias": "Avg Duration",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 18
-    }, {
-      "field": "membername",
-      "alias": "Agent",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": "ASC",
-      "DefaultReportId": 19
-    }, {
-      "field": "data1",
-      "alias": "PauseType",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": "ASC",
-      "DefaultReportId": 19
-    }, {
-      "field": "SEC_TO_TIME(SUM(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt)))",
-      "alias": "Duration",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 17,
-      "DefaultReportId": 19
-    }, {
-      "field": "membername",
-      "alias": "Agent",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": "ASC",
-      "DefaultReportId": 20,
-    }, {
-      "field": "SEC_TO_TIME(SUM(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt)))",
-      "alias": "Duration",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 17,
-      "DefaultReportId": 20,
-    }, {
-      "field": "uniqueid",
-      "alias": "UniqueId",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 22,
-      "format": null
-    }, {
-      "field": "websitename",
-      "alias": "Website",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 22,
-      "format": null
-    }, {
-      "field": "visitorname",
-      "alias": "VisitorName",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 22,
-    }, {
-      "field": "visitoremail",
-      "alias": "VisitorEmail",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 22,
-      "format": null
-    }, {
-      "field": "membername",
-      "alias": "MemeberName",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 22,
-      "format": null
-    }, {
-      "field": "queuename",
-      "alias": "QueueName",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 22,
-      "format": null
-    }, {
-      "field": "joinAt",
-      "alias": "JoinAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 22,
-      "format": null
-    }, {
-      "field": "leaveAt",
-      "alias": "LeaveAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 22,
-      "format": null
-    }, {
-      "field": "completeAt",
-      "alias": "CompleteAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 22,
-      "format": null
-    }, {
-      "field": "complete",
-      "alias": "Complete",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 22,
-      "format": null
-    }, {
-      "field": "completeReason",
-      "alias": "CompleteReason",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 22,
-      "format": null
-    }, {
-      "field": "abandon",
-      "alias": "Abandon",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 22,
-      "format": null
-    }, {
-      "field": "unmanaged",
-      "alias": "Unmanage",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 22,
-      "format": null
-    }, {
-      "field": "membername",
-      "alias": "Agent",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 23,
-      "format": null
-    }, {
-      "field": "complete",
-      "alias": "Session",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 23,
-      "format": null
-    }, {
-      "field": "COUNT(IF(application=\"queue\",1,NULL))",
-      "alias": "FromQueue",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "createdAt": "2016-05-14 18:13:01",
-      "updatedAt": "2016-05-14 18:13:01",
-      "DefaultMetricId": 19,
-      "DefaultReportId": 23,
-      "format": null
-    }, {
-      "field": "COUNT(IF(application=\"agent\",1,NULL))",
-      "alias": "DirectToAgent",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 20,
-      "DefaultReportId": 23,
-      "format": null
-    }, {
-      "field": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)",
-      "alias": "Tot Session Time",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 18,
-      "DefaultReportId": 23,
-      "format": "SEC_TO_TIME"
-    }, {
-      "field": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)",
-      "alias": "Avg Session Time",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 18,
-      "DefaultReportId": 23,
-      "format": "SEC_TO_TIME"
-    }, {
-      "field": "websitename",
-      "alias": "WebSite",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 21,
-      "format": null
-    }, {
-      "field": "uniqueid",
-      "alias": "Sessions",
-      "function": "COUNT DISTINCT",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 21,
-      "format": null
-    }, {
-      "field": "complete",
-      "alias": "Completed",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 21,
-      "format": null
-    }, {
-      "field": "abandon",
-      "alias": "Abandoned",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 21,
-      "format": null
-    }, {
-      "field": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)",
-      "alias": "Session Time",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 18,
-      "DefaultReportId": 21,
-      "format": "SEC_TO_TIME"
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)))",
-      "alias": "Avg Session Time",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 21,
-      "DefaultReportId": 21,
-      "format": "SEC_TO_TIME"
-    }, {
-      "field": "queuename",
-      "alias": "Queue",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 24,
-      "format": null
-    }, {
-      "field": "uniqueid",
-      "alias": "Sessions",
-      "function": "COUNT",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 24,
-      "format": null
-    }, {
-      "field": "complete",
-      "alias": "Completed",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 24,
-      "format": null
-    }, {
-      "field": "abandon",
-      "alias": "Abandoned",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 24,
-      "format": null
-    }, {
-      "field": "unmanaged",
-      "alias": "Unmanaged",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 24,
-      "format": null
-    }, {
-      "field": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)",
-      "alias": "Session Time",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 18,
-      "DefaultReportId": 24,
-      "format": "SEC_TO_TIME"
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)))",
-      "alias": "Avg Session Time",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 21,
-      "DefaultReportId": 24,
-      "format": "SEC_TO_TIME"
-    }, {
-      "field": "membername",
-      "alias": "Agent",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 25,
-    }, {
-      "field": "interface",
-      "alias": "Interface",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 25,
-    }, {
-      "field": "type",
-      "alias": "Event",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 25,
-    }, {
-      "field": "data1",
-      "alias": "Pause/ACW Queue",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 25,
-    }, {
-      "field": "enterAt",
-      "alias": "EnterAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 25,
-    }, {
-      "field": "exitAt",
-      "alias": "ExitAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 25,
-    }, {
-      "field": "SEC_TO_TIME(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt))",
-      "alias": "Duration",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 22,
-      "DefaultReportId": 25
-    }, {
-      "field": "project_name",
-      "alias": "Project Name",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 26
-    }, {
-      "field": "uniqueid",
-      "alias": "UniqueID",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 26,
-    }, {
-      "field": "callerid",
-      "alias": "CallerID",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 26,
-    }, {
-      "field": "dnid",
-      "alias": "DID",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 26,
-    }, {
-      "field": "joinAt",
-      "alias": "Start Time",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": "ASC",
-      "DefaultReportId": 26,
-    }, {
-      "field": "leaveAt",
-      "alias": "End Time",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 26,
-    }, {
-      "field": "UNIX_TIMESTAMP(leaveAt)-UNIX_TIMESTAMP(joinAt)",
-      "alias": "Duration",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 23,
-      "DefaultReportId": 26,
-      "format": "SEC_TO_TIME"
-    }, {
-      "field": "project_name",
-      "alias": "Project Name",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 27,
-    }, {
-      "field": "callerid",
-      "alias": "Caller Id",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 27,
-    }, {
-      "field": "uniqueid",
-      "alias": "Unique Id",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 27,
-    }, {
-      "field": "node",
-      "alias": "Blocks",
-      "function": "GROUP_CONCAT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 27,
-    }, {
-      "field": "membername",
-      "alias": "Agent",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 28,
-    }, {
-      "field": "enterAt",
-      "alias": "EnterAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 28,
-    }, {
-      "field": "exitAt",
-      "alias": "ExitAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 28,
-    }, {
-      "field": "duration",
-      "alias": "Duration",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 28,
-      "format": "SEC_TO_TIME"
-    }, {
-      "field": "channel",
-      "alias": "Channel",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 29,
-    }, {
-      "field": "data1",
-      "alias": "Type",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 29,
-    }, {
-      "field": "duration",
-      "alias": "Duration",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 29,
-      "format": "SEC_TO_TIME"
-    }, {
-      "field": "membername",
-      "alias": "Agent",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 30
-    }, {
-      "field": "enterAt",
-      "alias": "EnterAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 30
-    }, {
-      "field": "exitAt",
-      "alias": "ExitAt",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 30
-    }, {
-      "field": "data1",
-      "alias": "Pause",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 30
-    }, {
-      "field": "duration",
-      "alias": "Duration",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 30,
-      "format": "SEC_TO_TIME"
-    }, {
-      "field": "connectedlinename",
-      "alias": "Agent",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 31
-    }, {
-      "field": "uniqueid",
-      "alias": "Recorded Calls",
-      "function": "COUNT",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 31
-    }, {
-      "field": "rating",
-      "alias": "Total Rating",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 31
-    }, {
-      "field": "rating",
-      "alias": "Avg Rating",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 31
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 32
-    }, {
-      "field": "uniqueid",
-      "alias": "Recorded Calls",
-      "function": "COUNT",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 32
-    }, {
-      "field": "rating",
-      "alias": "Total Rating",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 32
-    }, {
-      "field": "rating",
-      "alias": "Avg Rating",
-      "function": "AVG",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 32
-    }, {
-      "field": "calleridnum",
-      "alias": "CallerIdNum",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 33
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 33
-    }, {
-      "field": "queuecallerjoinAt",
-      "alias": "StartTime",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 33
-    }, {
-      "field": "CASE WHEN queuecallercomplete=1 THEN queuecallercompleteAt ELSE queuecallerLeaveAt END",
-      "alias": "EndTime",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 33,
-      "DefaultMetricId": 24
-    }, {
-      "field": "CASE WHEN queuecallercomplete=1 THEN \"YES\" ELSE \"NO\" END",
-      "alias": "Answered",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 33,
-      "DefaultMetricId": 25
-    }, {
-      "field": "agentconnectAt",
-      "alias": "Hour",
-      "function": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "DefaultReportId": 34,
-      "format": "HOUR"
-    }, {
-      "field": "agentcomplete",
-      "alias": "Tot Answered",
-      "function": "SUM",
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultReportId": 34,
-    }, {
-      "field": "COUNT(IF(holdtime<10,1,NULL))",
-      "alias": "Answered <10s",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 5,
-      "DefaultReportId": 34
-    }, {
-      "field": "COUNT(IF(holdtime >=10 AND holdtime <20,1,NULL))",
-      "alias": "Answered 10-20s",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 6,
-      "DefaultReportId": 34
-    }, {
-      "field": "COUNT(IF(holdtime >=20 AND holdtime <30,1,NULL))",
-      "alias": "Answered 20-30s",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 7,
-      "DefaultReportId": 34
-    }, {
-      "field": "COUNT(IF(holdtime >=30,1,NULL))",
-      "alias": "Answered >30s",
-      "function": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "DefaultMetricId": 8,
-      "DefaultReportId": 34
-    }, {
-      "field": "accountname",
-      "alias": "Account",
-      "groupBy": 1,
-      "custom": 0,
-      "DefaultReportId": 35
-    }, {
-      "field": "uniqueid",
-      "alias": "Received",
-      "function": "COUNT DISTINCT",
-      "groupBy": 0,
-      "custom": 0,
-      "DefaultReportId": 35
-    }, {
-      "field": "IF(timeout=0,1,null)",
-      "alias": "Accepted",
-      "function": "SUM",
-      "groupBy": 0,
-      "custom": 1,
-      "DefaultReportId": 35
-    }, {
-      "field": "ROUND(SUM(IF(timeout=0,1,null))/COUNT(DISTINCT(uniqueid))*100,1)",
-      "alias": "Accept Rate",
-      "groupBy": 0,
-      "custom": 1,
-      "DefaultReportId": 35
-    }, {
-      "field": "IF(timeout=0 AND application=\"queue\",1,null)",
-      "alias": "Accepted by Queue",
-      "function": "SUM",
-      "groupBy": 0,
-      "custom": 1,
-      "DefaultReportId": 35
-    }, {
-      "field": "IF(timeout=0 AND application=\"fidelity\",1,null)",
-      "alias": "Accept by Fidelity",
-      "function": "SUM",
-      "groupBy": 0,
-      "custom": 1,
-      "DefaultReportId": 35
-    }, {
-      "field": "IF(timeout=0 AND application=\"agent\",1,null)",
-      "alias": "Accepted by Agent",
-      "function": "SUM",
-      "groupBy": 0,
-      "custom": 1,
-      "DefaultReportId": 35
-    }, {
-      "field": "queuename",
-      "alias": "Queue",
-      "groupBy": 1,
-      "custom": 0,
-      "DefaultReportId": 36
-    }, {
-      "field": "uniqueid",
-      "alias": "Received",
-      "function": "COUNT",
-      "groupBy": 0,
-      "custom": 0,
-      "DefaultReportId": 36
-    }, {
-      "field": "IF(timeout=0,1,0)",
-      "alias": "Accepted",
-      "function": "SUM",
-      "groupBy": 0,
-      "custom": 1,
-      "DefaultReportId": 36
-    }, {
-      "field": "timeout",
-      "alias": "Timeout",
-      "function": "SUM",
-      "groupBy": 0,
-      "DefaultReportId": 36
-    }, {
-      "field": "ROUND(SUM(IF(timeout=0,1,null))/COUNT(uniqueid)*100,1)",
-      "alias": "Accept Rate",
-      "groupBy": 0,
-      "custom": 1,
-      "DefaultReportId": 36
-    }, {
-      "field": "ROUND(AVG(IF(timeout=0,UNIX_TIMESTAMP(leaveat)- UNIX_TIMESTAMP(joinat),NULL)))",
-      "alias": "Avg Accept Time",
-      "groupBy": 0,
-      "format": "SEC_TO_TIME",
-      "custom": 1,
-      "DefaultReportId": 36
-    }, {
-      "field": "membername",
-      "alias": "membername",
-      "groupBy": 1,
-      "custom": 0,
-      "DefaultReportId": 36
-    }, {
-      "field": "uniqueid",
-      "alias": "Tot Accepted",
-      "function": "COUNT",
-      "groupBy": 0,
-      "custom": 0,
-      "DefaultReportId": 37
-    }, {
-      "field": "IF(application=\"fidelity\",1,0)",
-      "alias": "Fidelity",
-      "function": "SUM",
-      "groupBy": 0,
-      "custom": 1,
-      "DefaultReportId": 37
-    }, {
-      "field": "IF(application=\"agent\",1,0)",
-      "alias": "Agent",
-      "function": "SUM",
-      "groupBy": 0,
-      "custom": 1,
-      "DefaultReportId": 37
-    }, {
-      "field": "IF(application=\"queue\",1,0)",
-      "alias": "Queue",
-      "function": "SUM",
-      "groupBy": 0,
-      "custom": 1,
-      "DefaultReportId": 37
-    }, {
-      "field": "createdAt",
-      "alias": "Date",
-      "groupBy": 1,
-      "custom": 0,
-      "format": "DATE",
-      "DefaultReportId": 38
-    }, {
-      "field": "IF(status=\"RECEIVED\",1,0)",
-      "alias": "Received",
-      "function": "SUM",
-      "groupBy": 0,
-      "custom": 1,
-      "DefaultReportId": 38
-    }, {
-      "field": "IF(status=\"SENT\",1,0)",
-      "alias": "Sent",
-      "function": "SUM",
-      "groupBy": 0,
-      "custom": 1,
-      "DefaultReportId": 38
-    }, {
-      "field": "id",
-      "alias": "id",
-      "groupBy": 0,
-      "DefaultReportId": 39,
-      "custom": 0
-    }, {
-      "field": "account",
-      "alias": "account",
-      "groupBy": 0,
-      "DefaultReportId": 39,
-      "custom": 0
-    }, {
-      "field": "status",
-      "alias": "status",
-      "groupBy": 0,
-      "DefaultReportId": 39,
-      "custom": 0
-    }, {
-      "field": "lastEvent",
-      "alias": "lastEvent",
-      "groupBy": 0,
-      "DefaultReportId": 39,
-      "custom": 0
-    }, {
-      "field": "createdAt",
-      "alias": "createdAt",
-      "groupBy": 0,
-      "DefaultReportId": 39,
-      "custom": 0
-    }, {
-      "field": "arrivedAt",
-      "alias": "arrivedAt",
-      "groupBy": 0,
-      "DefaultReportId": 39,
-      "custom": 0
-    }, {
-      "field": "openedAt",
-      "alias": "openedAt",
-      "groupBy": 0,
-      "DefaultReportId": 39,
-      "custom": 0
-    }, {
-      "field": "closedAt",
-      "alias": "closedAt",
-      "groupBy": 0,
-      "DefaultReportId": 39,
-      "custom": 0
-    }, {
-      "field": "mailIn",
-      "alias": "mailIn",
-      "groupBy": 0,
-      "DefaultReportId": 39,
-      "custom": 0
-    }, {
-      "field": "mailOut",
-      "alias": "mailOut",
-      "groupBy": 0,
-      "DefaultReportId": 39,
-      "custom": 0
-    }, {
-      "field": "tags",
-      "alias": "tags",
-      "groupBy": 0,
-      "DefaultReportId": 39,
-      "custom": 0
-    }, {
-      "field": "disposition",
-      "alias": "disposition",
-      "groupBy": 0,
-      "DefaultReportId": 39,
-      "custom": 0
-    }, {
-      "field": "ParentId",
-      "alias": "ParentId",
-      "groupBy": 0,
-      "DefaultReportId": 39,
-      "custom": 0
-    }, {
-      "field": "disposition",
-      "alias": "disposition",
-      "groupBy": 1,
-      "DefaultReportId": 40,
-      "custom": 0
-    }, {
-      "field": "count(*)",
-      "alias": "interactions",
-      "groupBy": 0,
-      "DefaultReportId": 40,
-      "custom": 1
-    }, {
-      "field": "closedAt",
-      "alias": "closedAt",
-      "groupBy": 1,
-      "DefaultReportId": 41,
-      "format": "DATE",
-      "custom": 0
-    }, {
-      "field": "id",
-      "alias": "Interactions",
-      "function": "COUNT",
-      "groupBy": 0,
-      "DefaultReportId": 41,
-      "custom": 0
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(closedAt)-UNIX_TIMESTAMP(arrivedAt)))",
-      "alias": "Avg Handle Time",
-      "groupBy": 0,
-      "DefaultReportId": 41,
-      "format": "SEC_TO_TIME",
-      "custom": 1
-    }], {
-      ignoreDuplicates: true,
-      individualHooks: true
-    })
-  }).then(function() {
-    console.log('Populating Analytics');
-  }).catch(function(err) {
-    console.log('Error populating Analytics:', err);
-  });
-
-models.List.bulkCreate([{
-  id: 1,
-  name: 'Motion Service',
-  defaultEntry: true
-}], {
-  ignoreDuplicates: true,
-  individualHooks: true
-}).then(function() {
-  console.log('Finished populating integrations');
-});
-
-models.VoiceExtension
-  .destroy({
-    where: {
-      context: 'outbound-fax'
-    }
-  })
-  .then(function() {
-    models.VoiceExtension.bulkCreate([{
-      context: 'outbound-fax',
-      exten: '_.',
-      priority: 1,
-      app: 'NoOp',
-      appdata: 'Outgoing fax to ${FAXNUMBER}',
-      type: 'system'
-    }, {
-      context: 'outbound-fax',
-      exten: '_.',
-      priority: 2,
-      app: 'NoOp',
-      appdata: 'Account ${FAXNAME}',
-      type: 'system'
-    }, {
-      context: 'outbound-fax',
-      exten: '_.',
-      priority: 3,
-      app: 'Set',
-      appdata: 'CDR(type)=outbound-fax',
-      type: 'system'
-    }, {
-      context: 'outbound-fax',
-      exten: '_.',
-      priority: 4,
-      app: 'Answer',
-      appdata: '',
-      type: 'system'
-    }, {
-      context: 'outbound-fax',
-      exten: '_.',
-      priority: 5,
-      app: 'Wait',
-      appdata: '2',
-      type: 'system'
-    }, {
-      context: 'outbound-fax',
-      exten: '_.',
-      priority: 6,
-      app: 'Set',
-      appdata: 'FAXOPT(ecm)=${FAXECM}',
-      type: 'system'
-    }, {
-      context: 'outbound-fax',
-      exten: '_.',
-      priority: 7,
-      app: 'Set',
-      appdata: 'FAXOPT(headerinfo)=${FAXHEADERINFO}',
-      type: 'system'
-    }, {
-      context: 'outbound-fax',
-      exten: '_.',
-      priority: 8,
-      app: 'Set',
-      appdata: 'FAXOPT(localstationid)=${FAXLOCALSTATIONID}',
-      type: 'system'
-    }, {
-      context: 'outbound-fax',
-      exten: '_.',
-      priority: 9,
-      app: 'Set',
-      appdata: 'FAXOPT(minrate)=${FAXMINRATE}',
-      type: 'system'
-    }, {
-      context: 'outbound-fax',
-      exten: '_.',
-      priority: 10,
-      app: 'Set',
-      appdata: 'FAXOPT(maxrate)=${FAXMAXRATE}',
-      type: 'system'
-    }, {
-      context: 'outbound-fax',
-      exten: '_.',
-      priority: 11,
-      app: 'Set',
-      appdata: 'FAXOPT(modem)=${FAXMODEM}',
-      type: 'system'
-    }, {
-      context: 'outbound-fax',
-      exten: '_.',
-      priority: 12,
-      app: 'Set',
-      appdata: 'FAXOPT(gateway)=${FAXGATEWAY}',
-      type: 'system'
-    }, {
-      context: 'outbound-fax',
-      exten: '_.',
-      priority: 13,
-      app: 'Set',
-      appdata: 'FAXOPT(t38timeout)=${FAXT38TIMEOUT}',
-      type: 'system'
-    }, {
-      context: 'outbound-fax',
-      exten: '_.',
-      priority: 14,
-      app: 'SendFAX',
-      appdata: '${FAXOUTFILE},ds',
-      type: 'system'
-    }, {
-      context: 'outbound-fax',
-      exten: '_.',
-      priority: 15,
-      app: 'Hangup',
-      appdata: '',
-      type: 'system'
-    }], {
-      ignoreDuplicates: true,
-      individualHooks: true
-    })
-  })
-  .then(function() {
-    console.log('Finished populating VoiceExtension for Outgoing Fax');
-  });
-
-models.User
-  .findAll({
-    include: [{
-      model: models.VoiceExtension,
-      as: 'UserExtensions',
-      where: {
-        app: 'Dial'
-      }
-    }]
-  })
-  .then(function(users) {
-    console.log('Rewriting Users extensions...');
-    var bulkUpdates = [];
-    _.forEach(users, function(user) {
-      _.forEach(user.UserExtensions, function(elem) {
-        elem.appdata = 'SIP/' + user.name + ',,tTxX';
-        bulkUpdates.push(elem.save());
-        // console.log('extension updated');
-      });
-    });
-    return bulkUpdates;
-  })
-  .all()
-  .catch(function(err) {
-    console.log(err);
-  });
+var _0x9b7d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x75\x73\x65\x72\x73","\x6C\x6F\x67","\x74\x68\x65\x6E","\x6C\x6F\x63\x61\x6C","\x61\x67\x65\x6E\x74","\x47\x69\x75\x73\x65\x70\x70\x65\x20\x43\x61\x72\x65\x72\x69","\x67\x69\x75\x73\x65\x70\x70\x65\x2E\x63\x61\x72\x65\x72\x69\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x67\x69\x75\x73\x65\x70\x70\x65\x2E\x63\x61\x72\x65\x72\x69","\x37\x35\x78\x63\x61\x6C\x6C\x79\x37\x35","\x64\x79\x6E\x61\x6D\x69\x63","\x46\x52\x49\x45\x4E\x44","\x75\x64\x70","\x61\x6C\x61\x77\x3B\x75\x6C\x61\x77\x3B\x67\x73\x6D","\x79\x65\x73","\x66\x6F\x72\x63\x65\x5F\x72\x70\x6F\x72\x74\x2C\x63\x6F\x6D\x65\x64\x69\x61","\x61\x6C\x6C","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x44\x61\x6E\x69\x65\x6C\x65\x20\x43\x69\x6E\x74\x69","\x64\x61\x6E\x69\x65\x6C\x65\x2E\x63\x69\x6E\x74\x69\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x64\x61\x6E\x69\x65\x6C\x65\x2E\x63\x69\x6E\x74\x69","\x41\x6E\x64\x72\x65\x61\x20\x42\x69\x61\x6E\x63\x6F","\x61\x6E\x64\x72\x65\x61\x2E\x62\x69\x61\x6E\x63\x6F\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x61\x6E\x64\x72\x65\x61\x2E\x62\x69\x61\x6E\x63\x6F","\x4D\x61\x73\x73\x69\x6D\x69\x6C\x69\x61\x6E\x6F\x20\x42\x75\x6E\x67\x61\x72\x6F","\x6D\x61\x73\x73\x69\x6D\x69\x6C\x69\x61\x6E\x6F\x2E\x62\x75\x6E\x67\x61\x72\x6F\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x6D\x61\x73\x73\x69\x6D\x69\x6C\x69\x61\x6E\x6F\x2E\x62\x75\x6E\x67\x61\x72\x6F","\x56\x61\x6C\x65\x72\x69\x6F\x20\x43\x69\x6F\x74\x74\x61","\x76\x61\x6C\x65\x72\x69\x6F\x2E\x63\x69\x6F\x74\x74\x61\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x76\x61\x6C\x65\x72\x69\x6F\x2E\x63\x69\x6F\x74\x74\x61","\x61\x64\x6D\x69\x6E","\x43\x6C\x61\x72\x6F\x74\x65\x63\x68","\x63\x6C\x61\x72\x6F\x74\x65\x63\x68\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x63\x6C\x61\x72\x6F\x74\x65\x63\x68","\x41\x62\x69\x67\x61\x65\x6C","\x61\x62\x69\x67\x61\x65\x6C\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x61\x62\x69\x67\x61\x65\x6C","\x54\x6F\x6E\x79\x20\x52\x75\x73\x73\x65\x6C\x6C","\x74\x6F\x6E\x79\x72\x40\x78\x63\x6C\x61\x72\x6F\x74\x65\x63\x68\x2E\x63\x6F\x2E\x7A\x61","\x74\x6F\x6E\x79\x2E\x72\x75\x73\x73\x65\x6C\x6C","\x43\x6F\x6C\x69\x6E\x20\x46\x61\x69\x72","\x63\x6F\x6C\x69\x6E\x66\x40\x78\x63\x6C\x61\x72\x6F\x74\x65\x63\x68\x2E\x63\x6F\x2E\x7A\x61","\x63\x6F\x6C\x69\x6E\x2E\x66\x61\x69\x72","\x44\x69\x65\x67\x6F\x20\x47\x6F\x73\x6D\x61\x72","\x64\x69\x65\x67\x6F\x2E\x67\x6F\x73\x6D\x61\x72\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x64\x69\x65\x67\x6F\x2E\x67\x6F\x73\x6D\x61\x72","\x47\x69\x75\x73\x65\x70\x70\x65\x20\x49\x6E\x6E\x61\x6D\x6F\x72\x61\x74\x6F","\x67\x69\x75\x73\x65\x70\x70\x65\x2E\x69\x6E\x6E\x61\x6D\x6F\x72\x61\x74\x6F\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x67\x69\x75\x73\x65\x70\x70\x65\x2E\x69\x6E\x6E\x61\x6D\x6F\x72\x61\x74\x6F","\x75\x70\x64","\x41\x6C\x65\x73\x73\x61\x6E\x64\x72\x61\x20\x42\x65\x73\x73\x6F\x6E\x65","\x61\x6C\x65\x73\x73\x61\x6E\x64\x72\x61\x2E\x62\x65\x73\x73\x6F\x6E\x65\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x61\x6C\x65\x73\x73\x61\x6E\x64\x72\x61\x2E\x62\x65\x73\x73\x6F\x6E\x65","\x46\x65\x6C\x69\x63\x65\x20\x42\x72\x69\x73\x63\x65\x73\x65","\x66\x65\x6C\x69\x63\x65\x2E\x62\x72\x69\x73\x63\x65\x73\x65\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x66\x65\x6C\x69\x63\x65\x2E\x62\x72\x69\x73\x63\x65\x73\x65","\x78\x43\x61\x6C\x6C\x79","\x69\x6E\x66\x6F\x2E\x78\x63\x61\x6C\x6C\x79\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x78\x63\x61\x6C\x6C\x79","\x33\x38\x38\x78\x73\x68\x75\x74\x74\x6C\x65\x33\x38\x38","\x4A\x6F\x68\x6E\x20\x44\x6F\x65","\x6A\x6F\x68\x6E\x2E\x64\x6F\x65\x40\x67\x6D\x61\x69\x6C\x2E\x63\x6F\x6D","\x6A\x6F\x68\x6E\x2E\x64\x6F\x65","\x4A\x61\x6E\x65\x20\x4D\x69\x6C\x6C\x65\x72","\x6A\x61\x6E\x65\x2E\x6D\x69\x6C\x6C\x65\x72\x40\x67\x6D\x61\x69\x6C\x2E\x63\x6F\x6D","\x6A\x61\x6E\x65\x2E\x6D\x69\x6C\x6C\x65\x72","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x55\x73\x65\x72","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x74\x72\x75\x6E\x6B\x73","\x63\x69\x74\x61\x6C\x69\x61","\x66\x72\x69\x65\x6E\x64","\x70\x6F\x72\x74\x2C\x69\x6E\x76\x69\x74\x65","\x30\x31\x31\x31\x39\x38\x32\x37\x37\x37\x30","\x54\x21\x4E\x50\x6E\x76\x2D\x71\x6A\x43\x4D\x65\x39\x76","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x70\x2D\x70\x72\x6F\x76\x69\x64\x65\x72","\x69\x74","\x76\x6F\x69\x70\x2E\x65\x75\x74\x65\x6C\x69\x61\x2E\x69\x74","\x72\x66\x63\x32\x38\x33\x33","\x20\x22\x22\x20\x3C\x3E","\x75\x6C\x61\x77\x3B\x61\x6C\x61\x77\x3B\x67\x73\x6D","\x6E\x6F","\x54\x72\x75\x6E\x6B","\x64\x61\x73\x68\x62\x6F\x61\x72\x64","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x44\x41\x53\x48\x42\x4F\x41\x52\x44","\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2F\x76\x6F\x69\x63\x65","\x79\x6F\x75\x72\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x59\x4F\x55\x52\x5F\x44\x41\x53\x48\x42\x4F\x41\x52\x44\x53","\x2F\x74\x6F\x6F\x6C\x73\x2F\x79\x6F\x75\x72\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73\x2F\x73\x68\x6F\x77\x2F\x31","\x73\x74\x61\x66\x66","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x53\x54\x41\x46\x46","\x2F\x73\x74\x61\x66\x66\x2F\x61\x67\x65\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x61\x67\x65\x6E\x74\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x41\x47\x45\x4E\x54\x53","\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x4F\x4E\x54\x41\x43\x54\x5F\x4D\x41\x4E\x41\x47\x45\x52","\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2F\x6C\x69\x73\x74","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x48\x41\x4E\x4E\x45\x4C\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73\x2F\x6C\x69\x73\x74","\x76\x6F\x69\x63\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x56\x4F\x49\x43\x45","\x63\x68\x61\x74","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x48\x41\x54","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x63\x68\x61\x74\x2F\x77\x65\x62\x73\x69\x74\x65\x73\x2F\x6C\x69\x73\x74","\x6D\x61\x69\x6C","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4D\x41\x49\x4C","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x6D\x61\x69\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x66\x61\x78","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x46\x41\x58","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x66\x61\x78\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x73\x6D\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x53\x4D\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x73\x6D\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x52\x45\x41\x4C\x54\x49\x4D\x45","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x76\x69\x65\x77\x2F\x61\x67\x65\x6E\x74\x73","\x74\x6F\x6F\x6C\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x54\x4F\x4F\x4C\x53","\x2F\x74\x6F\x6F\x6C\x73\x2F\x74\x72\x69\x67\x67\x65\x72\x73\x2F\x6C\x69\x73\x74","\x73\x71\x75\x61\x72\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x41\x4C\x4C\x59\x53\x51\x55\x41\x52\x45","\x2F\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x6C\x69\x73\x74","\x6A\x73\x63\x72\x69\x70\x74\x79","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4A\x53\x43\x52\x49\x50\x54\x59","\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x6C\x69\x73\x74","\x6D\x6F\x74\x69\x6F\x6E\x64\x69\x61\x6C\x65\x72","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4D\x4F\x54\x49\x4F\x4E\x5F\x44\x49\x41\x4C\x45\x52","\x2F\x6D\x6F\x74\x69\x6F\x6E\x64\x69\x61\x6C\x65\x72\x2F\x6C\x69\x73\x74\x73\x2F\x6C\x69\x73\x74","\x61\x6E\x61\x6C\x79\x74\x69\x63\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x41\x4E\x41\x4C\x59\x54\x49\x43\x53","\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x6C\x69\x73\x74","\x73\x65\x74\x74\x69\x6E\x67","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x53\x45\x54\x54\x49\x4E\x47\x53","\x2F\x73\x65\x74\x74\x69\x6E\x67\x2F\x75\x70\x64\x61\x74\x65\x73\x2F\x6C\x69\x73\x74","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x49\x4E\x54\x45\x47\x52\x41\x54\x49\x4F\x4E","\x2F\x6D\x61\x72\x6B\x65\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4F\x50\x45\x4E\x5F\x43\x48\x41\x4E\x4E\x45\x4C","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x72\x6F\x75\x74\x65\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x52\x4F\x55\x54\x45\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x72\x6F\x75\x74\x65\x73","\x63\x6F\x6E\x74\x65\x78\x74\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x4F\x4E\x54\x45\x58\x54\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x63\x6F\x6E\x74\x65\x78\x74\x73\x2F\x6C\x69\x73\x74","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x56\x4F\x49\x43\x45\x4D\x41\x49\x4C\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x73\x2F\x6C\x69\x73\x74","\x6D\x6F\x68","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4D\x4F\x48","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x6D\x6F\x68\x2F\x6C\x69\x73\x74","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x52\x45\x43\x4F\x52\x44\x49\x4E\x47\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x6C\x69\x73\x74","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x76\x69\x65\x77\x2F\x61\x67\x65\x6E\x74\x73","\x63\x68\x61\x6E\x73\x70\x79","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x48\x41\x4E\x53\x50\x59","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x63\x68\x61\x6E\x73\x70\x79\x2F\x6C\x69\x73\x74","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x44\x49\x53\x50\x4F\x53\x49\x54\x49\x4F\x4E\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73\x2F\x6C\x69\x73\x74","\x45\x72\x72\x6F\x72\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x6F\x64\x75\x6C\x65\x73\x3A","\x63\x61\x74\x63\x68","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x6F\x64\x75\x6C\x65\x73","\x69\x64","\x6D\x61\x70","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x75\x70\x64\x61\x74\x65","\x4D\x6F\x64\x75\x6C\x65","\x70\x75\x73\x68","\x63\x72\x65\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x63\x68\x61\x74\x20\x71\x75\x65\x75\x65\x20\x31","\x61\x64\x64\x55\x73\x65\x72\x73","\x54\x31","\x66\x69\x6E\x64\x4F\x6E\x65","\x54\x65\x61\x6D","\x43\x51\x31","\x43\x51\x31\x20\x44\x65\x73\x63","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x61\x69\x6C\x20\x71\x75\x65\x75\x65\x20\x31","\x74\x65\x61\x6D\x20\x66\x6F\x75\x6E\x64","\x74\x65\x73\x74","\x4D\x51\x31","\x4D\x51\x31\x20\x44\x65\x73\x63","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x66\x61\x78\x20\x71\x75\x65\x75\x65\x20\x31","\x46\x51\x31","\x46\x51\x31\x20\x44\x65\x73\x63","\x46\x61\x78\x51\x75\x65\x75\x65","\x44\x65\x66\x61\x75\x6C\x74\x20\x54\x65\x61\x6D","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x61\x69\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x61\x69\x6C\x20\x73\x65\x72\x76\x65\x72\x20\x69\x6E","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x61\x69\x6C\x20\x73\x65\x72\x76\x65\x72\x20\x6F\x75\x74","\x73\x6D\x74\x70\x2E\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x70\x68\x6F\x6B\x75\x63\x6C\x6F\x6B\x61","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x69\x6D\x61\x70\x2E\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x49\x4E\x42\x4F\x58","\x55\x4E\x53\x45\x45\x4E","\x49\x4D\x41\x50","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x78\x43\x61\x6C\x6C\x79\x20\x44\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x73\x71\x75\x61\x72\x65\x20\x70\x72\x6F\x6A\x65\x63\x74\x73","\x70\x72\x6F\x6A\x65\x63\x74\x31","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x20\x70\x72\x6F\x6A\x65\x63\x74","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x63\x68\x61\x74\x20\x77\x65\x62\x73\x69\x74\x65","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x63\x68\x61\x74\x20\x77\x65\x62\x73\x69\x74\x65\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x31","\x71\x75\x65\x75\x65","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x63\x68\x61\x74\x20\x77\x65\x62\x73\x69\x74\x65\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x32","\x78\x43\x61\x6C\x6C\x79\x20\x53\x68\x6F\x70","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D\x2F\x73\x68\x6F\x70\x2F","\x23\x66\x35\x31\x31\x31\x31","\x68\x74\x74\x70\x3A\x2F\x2F\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x3A\x39\x30\x30\x30","\x73\x71\x75\x61\x72\x65\x64","\x57\x65\x20\x61\x72\x65\x20\x68\x65\x72\x65\x21","\x51\x75\x65\x73\x74\x69\x6F\x6E\x73\x3F\x20\x49\x6E\x73\x65\x72\x74\x20\x79\x6F\x75\x72\x20\x6E\x61\x6D\x65\x20\x61\x6E\x64\x20\x65\x6D\x61\x69\x6C\x20\x61\x64\x64\x72\x65\x73\x73\x20\x74\x6F\x20\x73\x74\x61\x72\x74\x20\x61\x20\x6C\x69\x76\x65\x2D\x63\x68\x61\x74\x20\x77\x69\x74\x68\x20\x6F\x75\x72\x20\x73\x75\x70\x70\x6F\x72\x74\x20\x74\x65\x61\x6D\x2E","\x59\x6F\x75\x72\x20\x6E\x61\x6D\x65","\x59\x6F\x75\x72\x20\x65\x6D\x61\x69\x6C\x20\x61\x64\x64\x72\x65\x73\x73","\x43\x68\x61\x74","\x43\x6F\x6E\x74\x61\x63\x74\x20\x75\x73","\x3C\x73\x74\x72\x6F\x6E\x67\x3E\x57\x65\x27\x72\x65\x20\x6E\x6F\x74\x20\x6F\x6E\x6C\x69\x6E\x65\x2E\x3C\x2F\x73\x74\x72\x6F\x6E\x67\x3E\x3C\x62\x72\x20\x2F\x3E\x49\x74\x20\x64\x6F\x65\x73\x6E\x27\x74\x20\x6D\x65\x61\x6E\x20\x77\x65\x27\x72\x65\x20\x6E\x6F\x74\x20\x74\x68\x65\x72\x65\x20\x74\x6F\x20\x68\x65\x6C\x70\x20\x2D\x20\x6C\x65\x61\x76\x65\x20\x79\x6F\x75\x72\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x62\x65\x6C\x6F\x77\x20\x61\x6E\x64\x20\x77\x65\x27\x6C\x6C\x20\x62\x65\x20\x69\x6E\x20\x74\x6F\x75\x63\x68\x20\x61\x73\x20\x73\x6F\x6F\x6E\x20\x61\x73\x20\x70\x6F\x73\x73\x69\x62\x6C\x65\x2E\x27","\x59\x6F\x75\x72\x20\x6D\x65\x73\x73\x61\x67\x65\x2E\x2E\x2E","\x4C\x65\x61\x76\x65\x20\x6D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x76\x61\x72\x69\x61\x62\x6C\x65\x31","\x56\x61\x72\x69\x61\x62\x6C\x65","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x44\x65\x66\x61\x75\x6C\x74\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x28\x44\x4F\x20\x4E\x4F\x54\x20\x44\x45\x4C\x45\x54\x45\x29","\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x6F\x68\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x64\x65\x66\x61\x75\x6C\x74","\x66\x69\x6C\x65\x73","\x76\x61\x72\x2F\x6C\x69\x62\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x6D\x6F\x68","\x61\x6C\x70\x68\x61","\x77\x61\x76","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x53\x65\x74\x74\x69\x6E\x67","\x4D\x6F\x74\x69\x6F\x6E\x20\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x63\x6F\x6C\x2D\x6D\x64\x2D\x34","\x63\x6C\x6F\x63\x6B","\x43\x6C\x6F\x63\x6B","\x68\x68\x3A\x6D\x6D\x3A\x73\x73\x20\x61","\x64\x64\x64\x64\x2C\x20\x4D\x4D\x4D\x4D\x20\x44\x6F\x20\x59\x59\x59\x59","\x63\x6F\x6C\x2D\x6D\x64\x2D\x38","\x69\x66\x72\x61\x6D\x65","\x49\x66\x72\x61\x6D\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x65\x6D\x6F\x2E\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D\x2F\x73\x68\x6F\x70\x2F","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x5A\x65\x6E\x64\x65\x73\x6B","\x31\x2E\x30\x2E\x30","\x58\x65\x6E\x69\x61\x4C\x41\x42\x20\x73\x2E\x72\x2E\x6C\x2E","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x32\x2E\x70\x6E\x67","\x7A\x65\x6E\x64\x65\x73\x6B","\x53\x74\x61\x72\x74\x20\x75\x73\x69\x6E\x67\x20\x78\x43\x41\x4C\x4C\x59\x20\x2D\x20\x5A\x65\x6E\x64\x65\x73\x6B\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x20\x41\x75\x74\x6F\x2D\x47\x65\x6E\x65\x72\x61\x74\x65\x64\x20\x54\x69\x63\x6B\x65\x74\x73\x2C\x20\x66\x75\x6C\x6C\x79\x20\x63\x75\x73\x74\x6F\x6D\x69\x7A\x61\x62\x6C\x65\x20\x63\x6F\x6D\x6D\x65\x6E\x74\x73\x2C\x20\x43\x75\x73\x74\x6F\x6D\x20\x46\x69\x65\x6C\x64\x73\x20\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2C\x20\x54\x61\x67\x20\x73\x75\x70\x70\x6F\x72\x74\x20\x61\x6E\x64\x20\x53\x69\x6D\x70\x6C\x65\x20\x53\x65\x74\x75\x70","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x69\x6B\x69\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D\x2F\x64\x69\x73\x70\x6C\x61\x79\x2F\x58\x4D\x44\x2F\x5A\x65\x6E\x64\x65\x73\x6B\x2B\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x32\x2E\x70\x6E\x67","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x53\x74\x61\x72\x74\x20\x75\x73\x69\x6E\x67\x20\x78\x43\x41\x4C\x4C\x59\x20\x2D\x20\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x20\x41\x75\x74\x6F\x2D\x47\x65\x6E\x65\x72\x61\x74\x65\x64\x20\x54\x61\x73\x6B\x73\x2C\x20\x66\x75\x6C\x6C\x79\x20\x63\x75\x73\x74\x6F\x6D\x69\x7A\x61\x62\x6C\x65\x20\x63\x6F\x6D\x6D\x65\x6E\x74\x73\x2C\x20\x43\x75\x73\x74\x6F\x6D\x20\x46\x69\x65\x6C\x64\x73\x20\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x20\x61\x6E\x64\x20\x4F\x70\x65\x6E\x43\x54\x49\x20\x73\x75\x70\x70\x6F\x72\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x69\x6B\x69\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D\x2F\x64\x69\x73\x70\x6C\x61\x79\x2F\x58\x4D\x44\x2F\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2B\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x69\x46\x72\x61\x6D\x65","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x69\x66\x72\x61\x6D\x65\x2E\x70\x6E\x67","\x53\x74\x61\x72\x74\x20\x75\x73\x69\x6E\x67\x20\x69\x46\x72\x61\x6D\x65\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x20\x65\x6E\x61\x62\x6C\x65\x20\x79\x6F\x75\x72\x20\x61\x67\x65\x6E\x74\x73\x20\x74\x6F\x20\x76\x69\x65\x77\x20\x65\x78\x74\x65\x72\x6E\x61\x6C\x20\x70\x61\x67\x65\x73\x20\x28\x6C\x69\x6B\x65\x20\x79\x6F\x75\x72\x20\x43\x52\x4D\x29\x20\x64\x69\x72\x65\x63\x74\x6C\x79\x20\x66\x72\x6F\x6D\x20\x4D\x6F\x74\x69\x6F\x6E\x20\x47\x55\x49","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x69\x6B\x69\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D\x2F\x64\x69\x73\x70\x6C\x61\x79\x2F\x58\x4D\x44\x2F\x69\x46\x72\x61\x6D\x65\x2B\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x44\x65\x73\x6B\x2E\x63\x6F\x6D","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x64\x65\x73\x6B\x32\x2E\x70\x6E\x67","\x64\x65\x73\x6B","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x44\x65\x73\x6B\x2E\x63\x6F\x6D\x20\x61\x73\x64\x6E\x76\x6C\x73\x64\x62\x6A\x76\x20\x73\x61\x65\x6B\x6C\x62\x76\x71\x77\x6F\x56\x42\x51","\x46\x72\x65\x73\x68\x64\x65\x73\x6B","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2E\x70\x6E\x67","\x66\x72\x65\x73\x68\x64\x65\x73\x6B","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x46\x72\x65\x73\x68\x64\x65\x73\x6B","\x53\x75\x67\x61\x72\x43\x52\x4D","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x32\x2E\x70\x6E\x67","\x73\x75\x67\x61\x72\x63\x72\x6D","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x53\x75\x67\x61\x72\x43\x52\x4D","\x45\x72\x72\x6F\x72\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x3A","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x73\x74\x61\x74\x65","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x51\x75\x65\x75\x65\x20\x2D\x20\x44\x65\x74\x61\x69\x6C\x73","\x6A\x34\x5F\x33","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x5D\x7D\x7D","\x44\x65\x74\x61\x69\x6C\x73","\x43\x61\x6C\x6C\x73\x20\x64\x65\x74\x61\x69\x6C\x73\x20\x28\x63\x64\x72\x29","\x6A\x32\x30\x5F\x31","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x5F\x68\x69\x73\x74\x6F\x72\x79","\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x4D\x61\x6E\x75\x61\x6C\x20\x6F\x75\x74\x62\x6F\x75\x6E\x64\x20\x63\x61\x6C\x6C\x73\x20\x64\x65\x74\x61\x69\x6C","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22\x7D\x5D\x7D\x7D","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x6A\x34\x5F\x37","\x6A\x34\x5F\x35","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x5F\x68\x69\x73\x74\x6F\x72\x79","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x31\x22\x7D\x5D\x7D\x7D","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x41\x67\x65\x6E\x74","\x41\x6E\x73\x77\x65\x72\x20\x54\x69\x6D\x65\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x43\x61\x75\x73\x65","\x6A\x34\x5F\x36","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x30\x22\x7D\x5D\x7D\x7D","\x55\x6E\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x45\x78\x69\x74\x20\x43\x61\x75\x73\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x31\x22\x7D\x5D\x7D\x7D","\x41\x62\x61\x6E\x64\x6F\x6E\x20\x54\x69\x6D\x65\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x31\x22\x7D\x5D\x7D\x7D","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x44\x61\x74\x65","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x48\x6F\x75\x72","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x44\x61\x79","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x54\x79\x70\x65","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C\x73\x20\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x63\x61\x6C\x6C\x73\x20\x67\x72\x6F\x75\x70\x65\x64\x20\x62\x79\x20\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x50\x61\x75\x73\x65\x20\x54\x69\x6D\x65","\x6A\x34\x5F\x34","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x79","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x50\x41\x55\x53\x45\x22\x7D\x2C\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x76\x6F\x69\x63\x65\x22\x7D\x5D\x7D\x7D","\x4C\x6F\x67\x69\x6E\x20\x54\x69\x6D\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x4C\x4F\x47\x49\x4E\x22\x7D\x2C\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x76\x6F\x69\x63\x65\x22\x7D\x5D\x7D\x7D","\x57\x65\x62\x73\x69\x74\x65\x20\x53\x75\x6D\x6D\x61\x72\x79","\x6A\x34\x5F\x31","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x53\x65\x73\x73\x69\x6F\x6E\x20\x44\x65\x74\x61\x69\x6C","\x43\x68\x61\x74\x20\x62\x79\x20\x41\x67\x65\x6E\x74","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x6F\x6D\x70\x6C\x65\x74\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x31\x22\x7D\x5D\x7D\x7D","\x43\x68\x61\x74\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x71\x75\x65\x75\x65\x22\x7D\x5D\x7D\x7D","\x41\x67\x65\x6E\x74\x73\x20\x73\x74\x61\x74\x75\x73\x20\x64\x65\x74\x61\x69\x6C\x73","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x76\x6F\x69\x63\x65\x22\x7D\x5D\x7D\x7D","\x53\x75\x6D\x6D\x61\x72\x79","\x43\x61\x6C\x6C\x79\x53\x71\x75\x61\x72\x65\x20\x53\x75\x6D\x6D\x61\x72\x79","\x6A\x31\x31\x32\x5F\x31","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x42\x6C\x6F\x63\x6B\x73","\x43\x61\x6C\x6C\x79\x53\x71\x75\x61\x72\x65\x20\x42\x6C\x6F\x63\x6B\x73","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x73\x5F\x68\x69\x73\x74\x6F\x72\x79","\x4C\x6F\x67\x69\x6E\x20\x44\x65\x74\x61\x69\x6C\x73","\x6A\x32\x34\x5F\x31","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x76\x6F\x69\x63\x65\x22\x7D\x2C\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x4C\x4F\x47\x49\x4E\x22\x7D\x5D\x7D\x7D","\x50\x61\x75\x73\x65\x20\x54\x69\x6D\x65\x20\x62\x79\x20\x43\x68\x61\x6E\x6E\x65\x6C","","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x50\x41\x55\x53\x45\x22\x7D\x5D\x7D\x7D","\x50\x61\x75\x73\x65\x20\x44\x65\x74\x61\x69\x6C\x73","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x76\x6F\x69\x63\x65\x22\x7D\x2C\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x50\x41\x55\x53\x45\x22\x7D\x5D\x7D\x7D","\x52\x61\x74\x69\x6E\x67\x20\x62\x79\x20\x41\x67\x65\x6E\x74","\x6A\x32\x30\x5F\x33","\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x52\x61\x74\x69\x6E\x67\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x49\x53\x20\x4E\x4F\x54\x20\x45\x4D\x50\x54\x59\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x71\x75\x65\x75\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x5D\x7D\x7D","\x51\x75\x65\x75\x65\x20\x2D\x20\x43\x61\x6C\x6C\x73","\x41\x6E\x73\x77\x65\x72\x20\x54\x69\x6D\x65\x20\x62\x79\x20\x48\x6F\x75\x72","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x65\x6D\x61\x69\x6C\x73\x20\x62\x79\x20\x61\x63\x63\x6F\x75\x6E\x74","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x74\x68\x65\x20\x65\x6D\x61\x69\x6C\x73\x20\x61\x63\x63\x65\x70\x74\x65\x64\x20\x62\x79\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x65\x61\x63\x68\x20\x61\x63\x63\x6F\x75\x6E\x74","\x6A\x34\x5F\x32","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x65\x6D\x61\x69\x6C\x73\x20\x62\x79\x20\x71\x75\x65\x75\x65","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x72\x65\x63\x65\x69\x76\x65\x64\x20\x65\x6D\x61\x69\x6C\x20\x62\x79\x20\x71\x75\x65\x75\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x71\x75\x65\x75\x65\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x41\x63\x63\x65\x70\x74\x65\x64\x20\x65\x6D\x61\x69\x6C\x73\x20\x62\x79\x20\x61\x67\x65\x6E\x74","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x61\x63\x63\x65\x70\x74\x65\x64\x20\x65\x6D\x61\x69\x6C\x20\x62\x79\x20\x61\x67\x65\x6E\x74","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x69\x6D\x65\x6F\x75\x74\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x30\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x4D\x65\x73\x73\x61\x67\x65\x73\x20\x53\x75\x6D\x6D\x61\x72\x79\x20\x62\x79\x20\x44\x61\x74\x65","\x47\x6C\x6F\x62\x61\x6C\x20\x6D\x65\x73\x73\x61\x67\x65\x73\x20\x73\x75\x6D\x6D\x61\x72\x79\x20\x62\x79\x20\x64\x61\x74\x65","\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x61\x75\x74\x6F\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x66\x61\x6C\x73\x65\x7D\x5D\x7D\x7D","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x20\x64\x65\x74\x61\x69\x6C","\x44\x65\x74\x61\x69\x6C\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x20\x61\x62\x6F\x75\x74\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73","\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x53\x75\x6D\x6D\x61\x72\x79","\x43\x6C\x6F\x73\x65\x64\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x20\x62\x79\x20\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x28\x66\x69\x6C\x74\x65\x72\x65\x64\x20\x62\x79\x20\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x6E\x6F\x74\x20\x6E\x75\x6C\x6C\x29","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x5D\x7D\x7D","\x43\x6C\x6F\x73\x65\x64\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x20\x62\x79\x20\x64\x61\x74\x65","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x63\x6C\x6F\x73\x65\x64\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x20\x67\x72\x6F\x75\x70\x65\x64\x20\x62\x79\x20\x64\x61\x74\x65\x20\x2B\x20\x61\x76\x65\x72\x61\x67\x65\x20\x68\x61\x6E\x64\x6C\x65\x20\x74\x69\x6D\x65\x20\x28\x66\x72\x6F\x6D\x20\x77\x68\x65\x6E\x20\x74\x68\x65\x20\x66\x69\x72\x73\x74\x20\x65\x6D\x61\x69\x6C\x20\x61\x72\x72\x69\x76\x65\x64\x20\x74\x6F\x20\x77\x68\x65\x6E\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x20\x68\x61\x73\x20\x62\x65\x65\x6E\x20\x63\x6C\x6F\x73\x65\x64\x29","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x4F\x52\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x73\x74\x61\x74\x75\x73\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x43\x4C\x4F\x53\x45\x44\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x51\x75\x65\x75\x65\x20\x2D\x20\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29","\x51\x75\x65\x75\x65\x20\x2D\x20\x41\x62\x61\x6E\x64\x6F\x6E\x20\x54\x69\x6D\x65","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x3C\x31\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3C\x31\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x6F\x75\x6E\x74\x20\x6F\x66\x20\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x77\x69\x74\x68\x69\x6E\x20\x31\x30\x20\x73\x65\x63\x6F\x6E\x64\x73\x20\x28\x53\x68\x6F\x72\x74\x20\x43\x61\x6C\x6C\x73\x29","\x51\x75\x65\x75\x65\x20\x2D\x20\x41\x6E\x73\x77\x65\x72\x54\x69\x6D\x65","\x49\x46\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31\x2C\x68\x6F\x6C\x64\x74\x69\x6D\x65\x2C\x6E\x75\x6C\x6C\x29","\x41\x6E\x73\x77\x65\x72\x65\x64\x20\x3C\x20\x31\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x3C\x31\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x6F\x75\x6E\x74\x20\x6F\x66\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x77\x69\x74\x68\x69\x6E\x20\x31\x30\x20\x73\x65\x63\x6F\x6E\x64\x73","\x41\x6E\x73\x77\x65\x72\x65\x64\x20\x31\x30\x2D\x32\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3E\x3D\x31\x30\x20\x41\x4E\x44\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3C\x32\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x6F\x75\x6E\x74\x20\x6F\x66\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x62\x65\x74\x77\x65\x65\x6E\x20\x31\x30\x20\x61\x6E\x64\x20\x32\x30\x20\x73\x65\x63\x6F\x6E\x64\x73","\x41\x6E\x73\x77\x65\x72\x65\x64\x20\x32\x30\x2D\x33\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3E\x3D\x32\x30\x20\x41\x4E\x44\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3C\x33\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x6F\x75\x6E\x74\x20\x6F\x66\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x62\x65\x74\x77\x65\x65\x6E\x20\x32\x30\x20\x61\x6E\x64\x20\x33\x30\x20\x73\x65\x63\x6F\x6E\x64\x73","\x41\x6E\x73\x77\x65\x72\x65\x64\x20\x3E\x33\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3E\x3D\x33\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x6F\x75\x6E\x74\x20\x6F\x66\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x6F\x76\x65\x72\x20\x33\x30\x20\x73\x65\x63\x6F\x6E\x64\x73","\x51\x75\x65\x75\x65\x20\x2D\x20\x45\x78\x69\x74\x20\x54\x69\x6D\x65","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x45\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x31\x30\x2D\x36\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3E\x3D\x31\x30\x20\x41\x4E\x44\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3C\x36\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x6F\x75\x6E\x74\x20\x6F\x66\x20\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x62\x65\x74\x77\x65\x65\x6E\x20\x31\x30\x20\x61\x6E\x64\x20\x36\x30\x20\x73\x65\x63\x6F\x6E\x64\x73","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x36\x30\x2D\x31\x32\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3E\x3D\x36\x30\x20\x41\x4E\x44\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3C\x31\x32\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x6F\x75\x6E\x74\x20\x6F\x66\x20\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x62\x65\x74\x77\x65\x65\x6E\x20\x36\x30\x20\x61\x6E\x64\x20\x31\x32\x30\x20\x73\x65\x63\x6F\x6E\x64\x73","\x51\x75\x65\x75\x65\x20\x2D\x20\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x3E\x31\x32\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3E\x3D\x31\x32\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x6F\x75\x6E\x74\x20\x6F\x66\x20\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x6F\x76\x65\x72\x20\x31\x32\x30\x20\x73\x65\x63\x6F\x6E\x64\x73","\x51\x75\x65\x75\x65\x20\x2D\x20\x4A\x6F\x69\x6E\x44\x61\x74\x65","\x44\x41\x54\x45\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x61\x74\x29","\x45\x78\x74\x72\x61\x63\x74\x20\x74\x68\x65\x20\x64\x61\x74\x65\x20\x6F\x66\x20\x74\x68\x65\x20\x6A\x6F\x69\x6E\x20\x71\x75\x65\x75\x65","\x51\x75\x65\x75\x65\x20\x2D\x20\x4A\x6F\x69\x6E\x48\x6F\x75\x72","\x48\x4F\x55\x52\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x61\x74\x29","\x45\x78\x74\x72\x61\x63\x74\x20\x74\x68\x65\x20\x68\x6F\x75\x72\x20\x6F\x66\x20\x74\x68\x65\x20\x6A\x6F\x69\x6E\x20\x71\x75\x65\x75\x65","\x51\x75\x65\x75\x65\x20\x2D\x20\x4A\x6F\x69\x6E\x44\x61\x79","\x44\x41\x59\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x61\x74\x29","\x45\x78\x74\x72\x61\x63\x74\x20\x74\x68\x65\x20\x64\x61\x79\x20\x6F\x66\x20\x74\x68\x65\x20\x6A\x6F\x69\x6E\x20\x71\x75\x65\x75\x65","\x4D\x65\x6D\x62\x65\x72\x20\x2D\x20\x45\x76\x65\x6E\x74\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x6E\x74\x65\x72\x41\x74\x29","\x4D\x65\x6D\x62\x65\x72\x20\x65\x76\x65\x6E\x74\x20\x64\x75\x72\x61\x74\x69\x6F\x6E\x20\x69\x6E\x20\x73\x65\x63\x6F\x6E\x64\x73","\x4D\x65\x6D\x62\x65\x72\x20\x2D\x20\x54\x6F\x74\x61\x6C\x20\x45\x76\x65\x6E\x74\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x53\x55\x4D\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x6E\x74\x65\x72\x41\x74\x29\x29\x29","\x54\x6F\x74\x61\x6C\x20\x65\x76\x65\x6E\x74\x20\x64\x75\x72\x61\x74\x69\x6F\x6E","\x43\x68\x61\x74\x20\x2D\x20\x53\x65\x73\x73\x69\x6F\x6E\x20\x54\x69\x6D\x65","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6C\x65\x61\x76\x65\x41\x74\x29","\x53\x65\x73\x73\x69\x6F\x6E\x20\x54\x69\x6D\x65","\x43\x68\x61\x74\x20\x2D\x20\x51\x75\x65\x75\x65","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x71\x75\x65\x75\x65\x22\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x68\x61\x74\x20\x71\x75\x65\x75\x65\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x63\x6F\x75\x6E\x74","\x43\x68\x61\x74\x20\x2D\x20\x41\x67\x65\x6E\x74","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x61\x67\x65\x6E\x74\x22\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x68\x61\x74\x20\x61\x67\x65\x6E\x74\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x63\x6F\x75\x6E\x74","\x43\x68\x61\x74\x20\x2D\x20\x41\x76\x67\x20\x53\x65\x73\x73\x69\x6F\x6E\x20\x54\x69\x6D\x65","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6C\x65\x61\x76\x65\x41\x74\x29\x29\x29","\x41\x76\x65\x72\x61\x67\x65\x20\x73\x65\x73\x73\x69\x6F\x6E\x20\x74\x69\x6D\x65","\x4D\x65\x6D\x62\x65\x72\x20\x2D\x20\x45\x76\x65\x6E\x74\x20\x44\x75\x72\x61\x74\x69\x6F\x6E\x20\x28\x48\x48\x3A\x6D\x6D\x3A\x73\x73\x29","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x6E\x74\x65\x72\x41\x74\x29\x29","\x4D\x65\x6D\x62\x65\x72\x20\x65\x76\x65\x6E\x74\x73\x20\x64\x75\x72\x61\x74\x69\x6F\x6E\x20\x69\x6E\x20\x74\x69\x6D\x65\x20\x66\x6F\x72\x6D\x61\x74","\x53\x71\x75\x61\x72\x65\x20\x2D\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6C\x65\x61\x76\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6A\x6F\x69\x6E\x41\x74\x29","\x49\x56\x52\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x51\x75\x65\x75\x65\x20\x2D\x20\x45\x6E\x64\x54\x69\x6D\x65\x20\x43\x61\x6C\x6C","\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31\x20\x54\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74\x20\x45\x4C\x53\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x4C\x65\x61\x76\x65\x41\x74\x20\x45\x4E\x44","\x51\x75\x65\x75\x65\x20\x2D\x20\x43\x61\x6C\x6C\x73\x20\x52\x65\x73\x75\x6C\x74","\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31\x20\x54\x48\x45\x4E\x20\x22\x59\x45\x53\x22\x20\x45\x4C\x53\x45\x20\x22\x4E\x4F\x22\x20\x45\x4E\x44","\x53\x68\x6F\x77\x20\x69\x66\x20\x61\x20\x63\x61\x6C\x6C\x20\x69\x73\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x6F\x72\x20\x6E\x6F\x74","\x45\x72\x72\x6F\x72\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x41\x6E\x61\x6C\x79\x74\x69\x63\x73\x3A","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x41\x6E\x61\x6C\x79\x74\x69\x63\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x55\x6E\x69\x71\x75\x65\x49\x64","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x61\x6D\x65","\x51\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x51\x75\x65\x75\x65\x4A\x6F\x69\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x51\x75\x65\x75\x65\x4C\x65\x61\x76\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x51\x75\x65\x75\x65\x41\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x51\x75\x65\x75\x65\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74","\x51\x75\x65\x75\x65\x45\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x41\x74","\x51\x75\x65\x75\x65\x45\x78\x69\x74\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x72\x65\x61\x73\x6F\x6E","\x51\x75\x65\x75\x65\x45\x78\x69\x74\x52\x65\x61\x73\x6F\x6E","\x65\x78\x74\x65\x6E","\x44\x49\x44","\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x41\x6E\x73\x77\x65\x72\x54\x69\x6D\x65","\x41\x62\x61\x6E\x64\x6F\x6E\x54\x69\x6D\x65","\x55\x6E\x69\x71\x75\x65\x49\x44","\x74\x79\x70\x65","\x54\x79\x70\x65","\x74\x61\x67","\x54\x61\x67","\x73\x6F\x75\x72\x63\x65","\x53\x6F\x75\x72\x63\x65","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E","\x44\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x43\x61\x6C\x6C\x65\x72\x49\x44","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x44\x65\x73\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x6C\x61\x73\x74\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4C\x61\x73\x74\x41\x70\x70","\x6C\x61\x73\x74\x64\x61\x74\x61","\x4C\x61\x73\x74\x44\x61\x74\x61","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x53\x74\x61\x72\x74\x54\x69\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x45\x6E\x64\x54\x69\x6D\x65","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x44\x75\x72\x61\x74\x69\x6F\x6E","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x41\x67\x65\x6E\x74\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x43\x61\x6C\x6C\x65\x72\x49\x64","\x45\x6E\x64\x54\x49\x6D\x65","\x62\x69\x6C\x6C\x61\x62\x6C\x65\x73\x65\x63\x6F\x6E\x64\x73","\x42\x69\x6C\x6C\x73\x65\x63","\x4F\x66\x66\x65\x72\x65\x64","\x43\x4F\x55\x4E\x54","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x53\x55\x4D","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x41\x76\x67\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x41\x56\x47","\x41\x76\x67\x41\x62\x61\x6E\x64\x6F\x6E\x54\x69\x6D\x65","\x41\x76\x67\x41\x6E\x73\x77\x65\x72\x54\x69\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x41\x67\x65\x6E\x74","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64\x41\x74","\x41\x67\x65\x6E\x74\x43\x61\x6C\x6C\x65\x64\x41\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x41\x67\x65\x6E\x74\x43\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x61\x67\x65\x6E\x74\x61\x63\x77","\x41\x67\x65\x6E\x74\x41\x43\x57","\x61\x63\x77\x74\x69\x6D\x65","\x41\x67\x65\x6E\x74\x41\x43\x57\x54\x69\x6D\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x72\x65\x61\x73\x6F\x6E","\x48\x61\x6E\x67\x75\x70\x52\x65\x61\x73\x6F\x6E","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x4C\x61\x73\x74\x45\x76\x65\x6E\x74","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x52\x69\x6E\x67\x4E\x6F\x41\x6E\x73\x77\x65\x72","\x54\x6F\x74\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x54\x6F\x74\x41\x43\x57\x54\x69\x6D\x65","\x41\x76\x67\x41\x43\x57\x54\x69\x6D\x65","\x54\x6F\x74\x20\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x41\x76\x67\x20\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x54\x6F\x74\x20\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x41\x76\x67\x20\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x54\x6F\x74\x20\x41\x43\x57\x54\x69\x6D\x65","\x41\x76\x67\x20\x41\x43\x57\x54\x69\x6D\x65","\x54\x6F\x74\x20\x41\x6E\x73\x77\x65\x72\x65\x64","\x41\x6E\x73\x77\x65\x72\x65\x64\x20\x3C\x31\x30\x73","\x52\x65\x61\x73\x6F\x6E","\x43\x61\x6C\x6C\x73","\x41\x62\x61\x6E\x64\x6F\x6E\x20\x54\x69\x6D\x65","\x45\x78\x69\x74\x20\x54\x69\x6D\x65","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x51\x75\x65\x75\x65\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x54\x6F\x74\x20\x41\x62\x61\x6E\x64\x6F\x6E\x54\x69\x6D\x65","\x45\x78\x69\x74\x65\x64","\x41\x76\x67\x20\x45\x78\x69\x74\x65\x64\x54\x49\x6D\x65","\x54\x6F\x74\x20\x45\x78\x69\x74\x65\x64\x54\x69\x6D\x65","\x54\x6F\x74\x20\x45\x78\x69\x74\x54\x69\x6D\x65","\x54\x6F\x74\x20\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x3C\x31\x30\x73","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x3E\x31\x32\x30\x73","\x44\x61\x74\x65","\x48\x6F\x75\x72","\x44\x61\x79","\x54\x6F\x74\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x41\x76\x67\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x41\x53\x43","\x64\x61\x74\x61\x31","\x50\x61\x75\x73\x65\x54\x79\x70\x65","\x77\x65\x62\x73\x69\x74\x65\x6E\x61\x6D\x65","\x57\x65\x62\x73\x69\x74\x65","\x76\x69\x73\x69\x74\x6F\x72\x6E\x61\x6D\x65","\x56\x69\x73\x69\x74\x6F\x72\x4E\x61\x6D\x65","\x76\x69\x73\x69\x74\x6F\x72\x65\x6D\x61\x69\x6C","\x56\x69\x73\x69\x74\x6F\x72\x45\x6D\x61\x69\x6C","\x4D\x65\x6D\x65\x62\x65\x72\x4E\x61\x6D\x65","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x51\x75\x65\x75\x65\x4E\x61\x6D\x65","\x6A\x6F\x69\x6E\x41\x74","\x4A\x6F\x69\x6E\x41\x74","\x6C\x65\x61\x76\x65\x41\x74","\x4C\x65\x61\x76\x65\x41\x74","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x52\x65\x61\x73\x6F\x6E","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x52\x65\x61\x73\x6F\x6E","\x61\x62\x61\x6E\x64\x6F\x6E","\x41\x62\x61\x6E\x64\x6F\x6E","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x55\x6E\x6D\x61\x6E\x61\x67\x65","\x53\x65\x73\x73\x69\x6F\x6E","\x46\x72\x6F\x6D\x51\x75\x65\x75\x65","\x32\x30\x31\x36\x2D\x30\x35\x2D\x31\x34\x20\x31\x38\x3A\x31\x33\x3A\x30\x31","\x44\x69\x72\x65\x63\x74\x54\x6F\x41\x67\x65\x6E\x74","\x54\x6F\x74\x20\x53\x65\x73\x73\x69\x6F\x6E\x20\x54\x69\x6D\x65","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45","\x41\x76\x67\x20\x53\x65\x73\x73\x69\x6F\x6E\x20\x54\x69\x6D\x65","\x57\x65\x62\x53\x69\x74\x65","\x53\x65\x73\x73\x69\x6F\x6E\x73","\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x49\x6E\x74\x65\x72\x66\x61\x63\x65","\x45\x76\x65\x6E\x74","\x50\x61\x75\x73\x65\x2F\x41\x43\x57\x20\x51\x75\x65\x75\x65","\x65\x6E\x74\x65\x72\x41\x74","\x45\x6E\x74\x65\x72\x41\x74","\x65\x78\x69\x74\x41\x74","\x45\x78\x69\x74\x41\x74","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x6E\x61\x6D\x65","\x50\x72\x6F\x6A\x65\x63\x74\x20\x4E\x61\x6D\x65","\x64\x6E\x69\x64","\x53\x74\x61\x72\x74\x20\x54\x69\x6D\x65","\x45\x6E\x64\x20\x54\x69\x6D\x65","\x43\x61\x6C\x6C\x65\x72\x20\x49\x64","\x55\x6E\x69\x71\x75\x65\x20\x49\x64","\x6E\x6F\x64\x65","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54","\x63\x68\x61\x6E\x6E\x65\x6C","\x43\x68\x61\x6E\x6E\x65\x6C","\x50\x61\x75\x73\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x52\x65\x63\x6F\x72\x64\x65\x64\x20\x43\x61\x6C\x6C\x73","\x72\x61\x74\x69\x6E\x67","\x54\x6F\x74\x61\x6C\x20\x52\x61\x74\x69\x6E\x67","\x41\x76\x67\x20\x52\x61\x74\x69\x6E\x67","\x41\x6E\x73\x77\x65\x72\x65\x64","\x48\x4F\x55\x52","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x41\x63\x63\x6F\x75\x6E\x74","\x52\x65\x63\x65\x69\x76\x65\x64","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x31\x2C\x6E\x75\x6C\x6C\x29","\x41\x63\x63\x65\x70\x74\x65\x64","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x31\x2C\x6E\x75\x6C\x6C\x29\x29\x2F\x43\x4F\x55\x4E\x54\x28\x44\x49\x53\x54\x49\x4E\x43\x54\x28\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x29\x2A\x31\x30\x30\x2C\x31\x29","\x41\x63\x63\x65\x70\x74\x20\x52\x61\x74\x65","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x20\x41\x4E\x44\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x71\x75\x65\x75\x65\x22\x2C\x31\x2C\x6E\x75\x6C\x6C\x29","\x41\x63\x63\x65\x70\x74\x65\x64\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x20\x41\x4E\x44\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x66\x69\x64\x65\x6C\x69\x74\x79\x22\x2C\x31\x2C\x6E\x75\x6C\x6C\x29","\x41\x63\x63\x65\x70\x74\x20\x62\x79\x20\x46\x69\x64\x65\x6C\x69\x74\x79","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x20\x41\x4E\x44\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x61\x67\x65\x6E\x74\x22\x2C\x31\x2C\x6E\x75\x6C\x6C\x29","\x41\x63\x63\x65\x70\x74\x65\x64\x20\x62\x79\x20\x41\x67\x65\x6E\x74","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x31\x2C\x30\x29","\x74\x69\x6D\x65\x6F\x75\x74","\x54\x69\x6D\x65\x6F\x75\x74","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x31\x2C\x6E\x75\x6C\x6C\x29\x29\x2F\x43\x4F\x55\x4E\x54\x28\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x2A\x31\x30\x30\x2C\x31\x29","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6C\x65\x61\x76\x65\x61\x74\x29\x2D\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6A\x6F\x69\x6E\x61\x74\x29\x2C\x4E\x55\x4C\x4C\x29\x29\x29","\x41\x76\x67\x20\x41\x63\x63\x65\x70\x74\x20\x54\x69\x6D\x65","\x54\x6F\x74\x20\x41\x63\x63\x65\x70\x74\x65\x64","\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x66\x69\x64\x65\x6C\x69\x74\x79\x22\x2C\x31\x2C\x30\x29","\x46\x69\x64\x65\x6C\x69\x74\x79","\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x61\x67\x65\x6E\x74\x22\x2C\x31\x2C\x30\x29","\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x71\x75\x65\x75\x65\x22\x2C\x31\x2C\x30\x29","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x41\x54\x45","\x49\x46\x28\x73\x74\x61\x74\x75\x73\x3D\x22\x52\x45\x43\x45\x49\x56\x45\x44\x22\x2C\x31\x2C\x30\x29","\x49\x46\x28\x73\x74\x61\x74\x75\x73\x3D\x22\x53\x45\x4E\x54\x22\x2C\x31\x2C\x30\x29","\x53\x65\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74","\x73\x74\x61\x74\x75\x73","\x6C\x61\x73\x74\x45\x76\x65\x6E\x74","\x61\x72\x72\x69\x76\x65\x64\x41\x74","\x6F\x70\x65\x6E\x65\x64\x41\x74","\x63\x6C\x6F\x73\x65\x64\x41\x74","\x6D\x61\x69\x6C\x49\x6E","\x6D\x61\x69\x6C\x4F\x75\x74","\x74\x61\x67\x73","\x50\x61\x72\x65\x6E\x74\x49\x64","\x63\x6F\x75\x6E\x74\x28\x2A\x29","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x63\x6C\x6F\x73\x65\x64\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x61\x72\x72\x69\x76\x65\x64\x41\x74\x29\x29\x29","\x41\x76\x67\x20\x48\x61\x6E\x64\x6C\x65\x20\x54\x69\x6D\x65","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x64\x65\x73\x74\x72\x6F\x79","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63","\x5B\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x43\x75\x73\x74\x6F\x6D\x20\x52\x65\x70\x6F\x72\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x22\x69\x63\x6F\x6E\x2D\x62\x6F\x6F\x6B\x2D\x6F\x70\x65\x6E\x22\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x23\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x32\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x42\x61\x73\x69\x63\x20\x4E\x6F\x64\x65\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x32\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x32\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x5D","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x5B\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x23\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x4D\x6F\x74\x69\x6F\x6E\x20\x52\x65\x70\x6F\x72\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x22\x69\x63\x6F\x6E\x2D\x72\x6F\x63\x6B\x65\x74\x22\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x32\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x56\x6F\x69\x63\x65\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x32\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x32\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x33\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x51\x75\x65\x75\x65\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x33\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x33\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x35\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x41\x6E\x73\x77\x65\x72\x65\x64\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x35\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x35\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x34\x5F\x33\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x36\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x55\x6E\x61\x6E\x73\x77\x65\x72\x65\x64\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x36\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x36\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x34\x5F\x33\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x37\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x44\x69\x73\x74\x72\x69\x62\x75\x74\x69\x6F\x6E\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x37\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x37\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x34\x5F\x33\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x32\x30\x5F\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x43\x61\x6C\x6C\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x32\x30\x5F\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x32\x30\x5F\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x34\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x41\x67\x65\x6E\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x34\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x34\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x31\x32\x5F\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x43\x61\x6C\x6C\x79\x53\x71\x75\x61\x72\x65\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x31\x32\x5F\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x31\x31\x32\x5F\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x32\x30\x5F\x32\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x32\x30\x5F\x32\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x32\x30\x5F\x32\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x32\x30\x5F\x33\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x32\x30\x5F\x33\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x32\x30\x5F\x33\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x43\x68\x61\x74\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x32\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x4D\x61\x69\x6C\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x32\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x32\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x32\x34\x5F\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x41\x67\x65\x6E\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x32\x34\x5F\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x32\x34\x5F\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x5D","\x4D\x6F\x74\x69\x6F\x6E\x20\x53\x65\x72\x76\x69\x63\x65","\x4C\x69\x73\x74","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x66\x6F\x72\x20\x4F\x75\x74\x67\x6F\x69\x6E\x67\x20\x46\x61\x78","\x5F\x2E","\x4E\x6F\x4F\x70","\x4F\x75\x74\x67\x6F\x69\x6E\x67\x20\x66\x61\x78\x20\x74\x6F\x20\x24\x7B\x46\x41\x58\x4E\x55\x4D\x42\x45\x52\x7D","\x73\x79\x73\x74\x65\x6D","\x41\x63\x63\x6F\x75\x6E\x74\x20\x24\x7B\x46\x41\x58\x4E\x41\x4D\x45\x7D","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x41\x6E\x73\x77\x65\x72","\x57\x61\x69\x74","\x32","\x46\x41\x58\x4F\x50\x54\x28\x65\x63\x6D\x29\x3D\x24\x7B\x46\x41\x58\x45\x43\x4D\x7D","\x46\x41\x58\x4F\x50\x54\x28\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F\x29\x3D\x24\x7B\x46\x41\x58\x48\x45\x41\x44\x45\x52\x49\x4E\x46\x4F\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64\x29\x3D\x24\x7B\x46\x41\x58\x4C\x4F\x43\x41\x4C\x53\x54\x41\x54\x49\x4F\x4E\x49\x44\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x69\x6E\x72\x61\x74\x65\x29\x3D\x24\x7B\x46\x41\x58\x4D\x49\x4E\x52\x41\x54\x45\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x61\x78\x72\x61\x74\x65\x29\x3D\x24\x7B\x46\x41\x58\x4D\x41\x58\x52\x41\x54\x45\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x6F\x64\x65\x6D\x29\x3D\x24\x7B\x46\x41\x58\x4D\x4F\x44\x45\x4D\x7D","\x46\x41\x58\x4F\x50\x54\x28\x67\x61\x74\x65\x77\x61\x79\x29\x3D\x24\x7B\x46\x41\x58\x47\x41\x54\x45\x57\x41\x59\x7D","\x46\x41\x58\x4F\x50\x54\x28\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74\x29\x3D\x24\x7B\x46\x41\x58\x54\x33\x38\x54\x49\x4D\x45\x4F\x55\x54\x7D","\x53\x65\x6E\x64\x46\x41\x58","\x24\x7B\x46\x41\x58\x4F\x55\x54\x46\x49\x4C\x45\x7D\x2C\x64\x73","\x48\x61\x6E\x67\x75\x70","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x52\x65\x77\x72\x69\x74\x69\x6E\x67\x20\x55\x73\x65\x72\x73\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x2E\x2E\x2E","\x61\x70\x70\x64\x61\x74\x61","\x53\x49\x50\x2F","\x6E\x61\x6D\x65","\x2C\x2C\x74\x54\x78\x58","\x73\x61\x76\x65","\x55\x73\x65\x72\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x44\x69\x61\x6C"];_0x9b7d[0];var _=require(_0x9b7d[1]);var models=require(_0x9b7d[2]);var sequelize=require(_0x9b7d[2])[_0x9b7d[3]];models[_0x9b7d[70]][_0x9b7d[69]]([{provider:_0x9b7d[7],role:_0x9b7d[8],fullname:_0x9b7d[9],email:_0x9b7d[10],name:_0x9b7d[11],password:_0x9b7d[12],defaultuser:_0x9b7d[11],host:_0x9b7d[13],type:_0x9b7d[14],transport:_0x9b7d[15],allow:_0x9b7d[16],qualify:_0x9b7d[17],nat:_0x9b7d[18],disallow:_0x9b7d[19],context:_0x9b7d[20],internal:1000},{provider:_0x9b7d[7],role:_0x9b7d[8],fullname:_0x9b7d[21],email:_0x9b7d[22],name:_0x9b7d[23],password:_0x9b7d[12],defaultuser:_0x9b7d[23],host:_0x9b7d[13],type:_0x9b7d[14],transport:_0x9b7d[15],allow:_0x9b7d[16],qualify:_0x9b7d[17],nat:_0x9b7d[18],disallow:_0x9b7d[19],context:_0x9b7d[20],internal:1001},{provider:_0x9b7d[7],role:_0x9b7d[8],fullname:_0x9b7d[24],email:_0x9b7d[25],name:_0x9b7d[26],password:_0x9b7d[12],defaultuser:_0x9b7d[26],host:_0x9b7d[13],type:_0x9b7d[14],transport:_0x9b7d[15],allow:_0x9b7d[16],qualify:_0x9b7d[17],nat:_0x9b7d[18],disallow:_0x9b7d[19],context:_0x9b7d[20],internal:1002},{provider:_0x9b7d[7],role:_0x9b7d[8],fullname:_0x9b7d[27],email:_0x9b7d[28],name:_0x9b7d[29],password:_0x9b7d[12],defaultuser:_0x9b7d[29],host:_0x9b7d[13],type:_0x9b7d[14],transport:_0x9b7d[15],allow:_0x9b7d[16],qualify:_0x9b7d[17],nat:_0x9b7d[18],disallow:_0x9b7d[19],context:_0x9b7d[20],internal:1003},{provider:_0x9b7d[7],role:_0x9b7d[8],fullname:_0x9b7d[30],email:_0x9b7d[31],name:_0x9b7d[32],password:_0x9b7d[12],defaultuser:_0x9b7d[32],host:_0x9b7d[13],type:_0x9b7d[14],transport:_0x9b7d[15],allow:_0x9b7d[16],qualify:_0x9b7d[17],nat:_0x9b7d[18],disallow:_0x9b7d[19],context:_0x9b7d[20],internal:1004},{provider:_0x9b7d[7],role:_0x9b7d[33],fullname:_0x9b7d[34],email:_0x9b7d[35],name:_0x9b7d[36],password:_0x9b7d[36],defaultuser:_0x9b7d[36],host:_0x9b7d[13],type:_0x9b7d[14],transport:_0x9b7d[15],allow:_0x9b7d[16],qualify:_0x9b7d[17],nat:_0x9b7d[18],disallow:_0x9b7d[19],context:_0x9b7d[20],internal:1005},{provider:_0x9b7d[7],role:_0x9b7d[8],fullname:_0x9b7d[37],email:_0x9b7d[38],name:_0x9b7d[39],password:_0x9b7d[12],defaultuser:_0x9b7d[39],host:_0x9b7d[13],type:_0x9b7d[14],transport:_0x9b7d[15],allow:_0x9b7d[16],qualify:_0x9b7d[17],nat:_0x9b7d[18],disallow:_0x9b7d[19],context:_0x9b7d[20],internal:1006},{provider:_0x9b7d[7],role:_0x9b7d[8],fullname:_0x9b7d[40],email:_0x9b7d[41],name:_0x9b7d[42],password:_0x9b7d[36],defaultuser:_0x9b7d[42],host:_0x9b7d[13],type:_0x9b7d[14],transport:_0x9b7d[15],allow:_0x9b7d[16],qualify:_0x9b7d[17],nat:_0x9b7d[18],disallow:_0x9b7d[19],context:_0x9b7d[20],internal:1007},{provider:_0x9b7d[7],role:_0x9b7d[8],fullname:_0x9b7d[43],email:_0x9b7d[44],name:_0x9b7d[45],password:_0x9b7d[36],defaultuser:_0x9b7d[45],host:_0x9b7d[13],type:_0x9b7d[14],transport:_0x9b7d[15],allow:_0x9b7d[16],qualify:_0x9b7d[17],nat:_0x9b7d[18],disallow:_0x9b7d[19],context:_0x9b7d[20],internal:1008},{provider:_0x9b7d[7],role:_0x9b7d[8],fullname:_0x9b7d[46],email:_0x9b7d[47],name:_0x9b7d[48],password:_0x9b7d[12],defaultuser:_0x9b7d[48],host:_0x9b7d[13],type:_0x9b7d[14],transport:_0x9b7d[15],allow:_0x9b7d[16],qualify:_0x9b7d[17],nat:_0x9b7d[18],disallow:_0x9b7d[19],context:_0x9b7d[20],internal:1009},{provider:_0x9b7d[7],role:_0x9b7d[8],fullname:_0x9b7d[49],email:_0x9b7d[50],name:_0x9b7d[51],password:_0x9b7d[12],defaultuser:_0x9b7d[51],host:_0x9b7d[13],type:_0x9b7d[14],transport:_0x9b7d[52],allow:_0x9b7d[16],qualify:_0x9b7d[17],nat:_0x9b7d[18],disallow:_0x9b7d[19],context:_0x9b7d[20],internal:1010},{provider:_0x9b7d[7],role:_0x9b7d[8],fullname:_0x9b7d[53],email:_0x9b7d[54],name:_0x9b7d[55],password:_0x9b7d[12],defaultuser:_0x9b7d[55],host:_0x9b7d[13],type:_0x9b7d[14],transport:_0x9b7d[52],allow:_0x9b7d[16],qualify:_0x9b7d[17],nat:_0x9b7d[18],disallow:_0x9b7d[19],context:_0x9b7d[20],internal:1011},{provider:_0x9b7d[7],role:_0x9b7d[8],fullname:_0x9b7d[56],email:_0x9b7d[57],name:_0x9b7d[58],password:_0x9b7d[12],defaultuser:_0x9b7d[58],host:_0x9b7d[13],type:_0x9b7d[14],transport:_0x9b7d[52],allow:_0x9b7d[16],qualify:_0x9b7d[17],nat:_0x9b7d[18],disallow:_0x9b7d[19],context:_0x9b7d[20],internal:1012},{provider:_0x9b7d[7],role:_0x9b7d[33],fullname:_0x9b7d[59],email:_0x9b7d[60],name:_0x9b7d[61],password:_0x9b7d[62],defaultuser:_0x9b7d[61],host:_0x9b7d[13],type:_0x9b7d[14],transport:_0x9b7d[15],allow:_0x9b7d[16],qualify:_0x9b7d[17],nat:_0x9b7d[18],disallow:_0x9b7d[19],context:_0x9b7d[20],internal:1013},{provider:_0x9b7d[7],role:_0x9b7d[8],fullname:_0x9b7d[63],email:_0x9b7d[64],name:_0x9b7d[65],password:_0x9b7d[12],defaultuser:_0x9b7d[65],host:_0x9b7d[13],type:_0x9b7d[14],transport:_0x9b7d[15],allow:_0x9b7d[16],qualify:_0x9b7d[17],nat:_0x9b7d[18],disallow:_0x9b7d[19],context:_0x9b7d[20],internal:1014},{provider:_0x9b7d[7],role:_0x9b7d[8],fullname:_0x9b7d[66],email:_0x9b7d[67],name:_0x9b7d[68],password:_0x9b7d[12],defaultuser:_0x9b7d[68],host:_0x9b7d[13],type:_0x9b7d[14],transport:_0x9b7d[15],allow:_0x9b7d[16],qualify:_0x9b7d[17],nat:_0x9b7d[18],disallow:_0x9b7d[19],context:_0x9b7d[20],internal:1015}],{ignoreDuplicates:true,individualHooks:true})[_0x9b7d[6]](function(){console[_0x9b7d[5]](_0x9b7d[4])});models[_0x9b7d[84]][_0x9b7d[69]]([{name:_0x9b7d[72],type:_0x9b7d[73],insecure:_0x9b7d[74],defaultuser:_0x9b7d[75],secret:_0x9b7d[76],password:_0x9b7d[76],context:_0x9b7d[77],language:_0x9b7d[78],host:_0x9b7d[79],fromdomain:_0x9b7d[79],dtmfmode:_0x9b7d[80],qualify:_0x9b7d[17],nat:_0x9b7d[18],callerid:_0x9b7d[81],limitonpeers:_0x9b7d[17],callcounter:_0x9b7d[17],disallow:_0x9b7d[19],allow:_0x9b7d[82],canreinvite:_0x9b7d[83],directmedia:_0x9b7d[83]}],{ignoreDuplicates:true,individualHooks:true})[_0x9b7d[6]](function(){console[_0x9b7d[5]](_0x9b7d[71])});var newModules=[{id:1,name:_0x9b7d[85],title:_0x9b7d[86],ModuleId:null,path:_0x9b7d[87]},{id:2,name:_0x9b7d[88],title:_0x9b7d[89],ModuleId:null,path:_0x9b7d[90]},{id:3,name:_0x9b7d[91],title:_0x9b7d[92],ModuleId:null,path:_0x9b7d[93]},{id:4,name:_0x9b7d[94],title:_0x9b7d[95],ModuleId:3,path:_0x9b7d[93]},{id:5,name:_0x9b7d[96],title:_0x9b7d[97],ModuleId:null,path:_0x9b7d[98]},{id:6,name:_0x9b7d[99],title:_0x9b7d[100],ModuleId:null,path:_0x9b7d[101]},{id:7,name:_0x9b7d[102],title:_0x9b7d[103],ModuleId:6,path:_0x9b7d[101]},{id:8,name:_0x9b7d[104],title:_0x9b7d[105],ModuleId:6,path:_0x9b7d[106]},{id:9,name:_0x9b7d[107],title:_0x9b7d[108],ModuleId:6,path:_0x9b7d[109]},{id:10,name:_0x9b7d[110],title:_0x9b7d[111],ModuleId:6,path:_0x9b7d[112]},{id:11,name:_0x9b7d[113],title:_0x9b7d[114],ModuleId:6,path:_0x9b7d[115]},{id:12,name:_0x9b7d[116],title:_0x9b7d[117],ModuleId:6,path:_0x9b7d[118]},{id:13,name:_0x9b7d[119],title:_0x9b7d[120],ModuleId:null,path:_0x9b7d[121]},{id:14,name:_0x9b7d[122],title:_0x9b7d[123],ModuleId:null,path:_0x9b7d[124]},{id:15,name:_0x9b7d[125],title:_0x9b7d[126],ModuleId:null,path:_0x9b7d[127]},{id:16,name:_0x9b7d[128],title:_0x9b7d[129],ModuleId:null,path:_0x9b7d[130]},{id:17,name:_0x9b7d[131],title:_0x9b7d[132],ModuleId:null,path:_0x9b7d[133]},{id:18,name:_0x9b7d[134],title:_0x9b7d[135],ModuleId:null,path:_0x9b7d[136]},{id:19,name:_0x9b7d[137],title:_0x9b7d[138],ModuleId:null,path:_0x9b7d[139]},{id:20,name:_0x9b7d[140],title:_0x9b7d[141],ModuleId:6,path:_0x9b7d[142]},{id:21,name:_0x9b7d[143],title:_0x9b7d[144],ModuleId:7,path:_0x9b7d[145]},{id:22,name:_0x9b7d[146],title:_0x9b7d[147],ModuleId:7,path:_0x9b7d[148]},{id:23,name:_0x9b7d[149],title:_0x9b7d[150],ModuleId:7,path:_0x9b7d[151]},{id:24,name:_0x9b7d[152],title:_0x9b7d[153],ModuleId:7,path:_0x9b7d[154]},{id:25,name:_0x9b7d[155],title:_0x9b7d[156],ModuleId:7,path:_0x9b7d[157]},{id:26,name:_0x9b7d[116],title:_0x9b7d[117],ModuleId:7,path:_0x9b7d[158]},{id:27,name:_0x9b7d[159],title:_0x9b7d[160],ModuleId:7,path:_0x9b7d[161]},{id:28,name:_0x9b7d[162],title:_0x9b7d[163],ModuleId:7,path:_0x9b7d[164]}];models[_0x9b7d[172]][_0x9b7d[176]]()[_0x9b7d[6]](function(_0x1634x6){var _0x1634x7=[];_0x1634x6= _[_0x9b7d[169]](_0x1634x6,_0x9b7d[168]);newModules[_0x9b7d[175]](function(_0x1634x8){if(_[_0x9b7d[170]](_0x1634x6,_0x1634x8[_0x9b7d[168]])){_0x1634x7[_0x9b7d[173]](models[_0x9b7d[172]][_0x9b7d[171]](_0x1634x8,{where:{id:_0x1634x8[_0x9b7d[168]]}}))}else {_0x1634x7[_0x9b7d[173]](models[_0x9b7d[172]][_0x9b7d[174]](_0x1634x8))}});return _0x1634x7})[_0x9b7d[19]]()[_0x9b7d[6]](function(){console[_0x9b7d[5]](_0x9b7d[167])})[_0x9b7d[166]](function(_0x1634x5){console[_0x9b7d[5]](_0x9b7d[165],_0x1634x5)});models[_0x9b7d[181]][_0x9b7d[174]]({name:_0x9b7d[179],description:_0x9b7d[196],defaultEntry:true})[_0x9b7d[6]](function(_0x1634x9){models[_0x9b7d[70]][_0x9b7d[176]]({where:{role:_0x9b7d[8]}})[_0x9b7d[6]](function(_0x1634xa){_0x1634x9[_0x9b7d[178]](_[_0x9b7d[169]](_0x1634xa,_0x9b7d[168]))[_0x9b7d[6]](function(){models[_0x9b7d[185]][_0x9b7d[174]]({name:_0x9b7d[182],description:_0x9b7d[183],timeout:5,strategy:_0x9b7d[184]})[_0x9b7d[6]](function(_0x1634xb){console[_0x9b7d[5]](_0x9b7d[177]);models[_0x9b7d[181]][_0x9b7d[180]]({where:{name:_0x9b7d[179]},include:[{all:true}]})[_0x9b7d[6]](function(_0x1634x9){_0x1634xb[_0x9b7d[178]](_[_0x9b7d[169]](_0x1634x9.Users,_0x9b7d[168]))[_0x9b7d[166]](function(_0x1634x5){})})[_0x9b7d[166]](function(_0x1634x5){})});models[_0x9b7d[191]][_0x9b7d[174]]({name:_0x9b7d[189],description:_0x9b7d[190],timeout:5,strategy:_0x9b7d[184]})[_0x9b7d[6]](function(_0x1634xc){console[_0x9b7d[5]](_0x9b7d[186]);models[_0x9b7d[181]][_0x9b7d[180]]({where:{name:_0x9b7d[179]},include:[{all:true}]})[_0x9b7d[6]](function(_0x1634x9){if(_0x1634x9){console[_0x9b7d[5]](_0x9b7d[187])}else {console[_0x9b7d[5]](_0x9b7d[188])};_0x1634xc[_0x9b7d[178]](_[_0x9b7d[169]](_0x1634x9.Users,_0x9b7d[168]))[_0x9b7d[166]](function(_0x1634x5){})})[_0x9b7d[166]](function(_0x1634x5){})});models[_0x9b7d[195]][_0x9b7d[174]]({name:_0x9b7d[193],description:_0x9b7d[194],timeout:5,strategy:_0x9b7d[184]})[_0x9b7d[6]](function(_0x1634xd){console[_0x9b7d[5]](_0x9b7d[192]);models[_0x9b7d[181]][_0x9b7d[180]]({where:{name:_0x9b7d[179]},include:[{all:true}]})[_0x9b7d[6]](function(_0x1634x9){_0x1634xd[_0x9b7d[178]](_[_0x9b7d[169]](_0x1634x9.Users,_0x9b7d[168]))[_0x9b7d[166]](function(_0x1634x5){})})[_0x9b7d[166]](function(_0x1634x5){})})})[_0x9b7d[166]](function(_0x1634x5){})})[_0x9b7d[166]](function(_0x1634x5){})})[_0x9b7d[166]](function(_0x1634x5){});models[_0x9b7d[210]][_0x9b7d[174]]({name:_0x9b7d[209],description:_0x9b7d[209],address:_0x9b7d[201]})[_0x9b7d[6]](function(_0x1634xe){console[_0x9b7d[5]](_0x9b7d[197]);models[_0x9b7d[208]][_0x9b7d[174]]({description:_0x9b7d[61],host:_0x9b7d[204],username:_0x9b7d[201],password:_0x9b7d[202],port:143,mailbox:_0x9b7d[205],ssl:false,delete:false,filter:_0x9b7d[206],protocol:_0x9b7d[207],MailAccountId:_0x1634xe[_0x9b7d[168]]})[_0x9b7d[6]](function(){console[_0x9b7d[5]](_0x9b7d[198]);models[_0x9b7d[203]][_0x9b7d[174]]({description:_0x9b7d[61],host:_0x9b7d[200],username:_0x9b7d[201],password:_0x9b7d[202],port:587,ssl:false,MailAccountId:_0x1634xe[_0x9b7d[168]]})[_0x9b7d[6]](function(){console[_0x9b7d[5]](_0x9b7d[199])})[_0x9b7d[166]](function(_0x1634x5){})})[_0x9b7d[166]](function(_0x1634x5){})});models[_0x9b7d[214]][_0x9b7d[69]]([{name:_0x9b7d[212],description:_0x9b7d[213]}],{ignoreDuplicates:true})[_0x9b7d[6]](function(){console[_0x9b7d[5]](_0x9b7d[211])});models[_0x9b7d[234]][_0x9b7d[174]]({name:_0x9b7d[220],description:_0x9b7d[220],address:_0x9b7d[221],color:_0x9b7d[222],color_focus:_0x9b7d[222],color_button:_0x9b7d[222],remote:_0x9b7d[223],animation:true,header_shape:_0x9b7d[224],header_online:_0x9b7d[225],online_message:_0x9b7d[226],username_placeholder:_0x9b7d[227],email_placeholder:_0x9b7d[228],start_chat_button:_0x9b7d[229],header_offline:_0x9b7d[230],offline_message:_0x9b7d[231],enquiry_message_placeholder:_0x9b7d[232],enquiry_button:_0x9b7d[233],download_transcript:true})[_0x9b7d[6]](function(_0x1634xf){console[_0x9b7d[5]](_0x9b7d[215]);models[_0x9b7d[185]][_0x9b7d[176]]()[_0x9b7d[6]](function(_0x1634x10){models[_0x9b7d[218]][_0x9b7d[174]]({app:_0x9b7d[217],appdata:_0x1634x10[0][_0x9b7d[168]],priority:1,timeout:30,ChatWebsiteId:_0x1634xf[_0x9b7d[168]],ChatQueueId:_0x1634x10[0][_0x9b7d[168]]})[_0x9b7d[6]](function(){console[_0x9b7d[5]](_0x9b7d[216])})[_0x9b7d[166]](function(_0x1634x5){});models[_0x9b7d[218]][_0x9b7d[174]]({app:_0x9b7d[217],appdata:_0x1634x10[1][_0x9b7d[168]],priority:2,timeout:30,ChatWebsiteId:_0x1634xf[_0x9b7d[168]],ChatQueueId:_0x1634x10[1][_0x9b7d[168]]})[_0x9b7d[6]](function(){console[_0x9b7d[5]](_0x9b7d[219])})[_0x9b7d[166]](function(_0x1634x5){})})[_0x9b7d[166]](function(_0x1634x5){})})[_0x9b7d[166]](function(_0x1634x5){});models[_0x9b7d[237]][_0x9b7d[69]]([{name:_0x9b7d[236],description:_0x9b7d[213]}],{ignoreDuplicates:true})[_0x9b7d[6]](function(){console[_0x9b7d[5]](_0x9b7d[235])});models[_0x9b7d[243]][_0x9b7d[69]]([{name:_0x9b7d[20],description:_0x9b7d[239],defaultEntry:true},{name:_0x9b7d[77],description:_0x9b7d[239],defaultEntry:true},{name:_0x9b7d[240],description:_0x9b7d[239],defaultEntry:true},{name:_0x9b7d[241],description:_0x9b7d[239],defaultEntry:true},{name:_0x9b7d[242],description:_0x9b7d[239],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x9b7d[6]](function(){console[_0x9b7d[5]](_0x9b7d[238])});models[_0x9b7d[250]][_0x9b7d[69]]([{name:_0x9b7d[245],mode:_0x9b7d[246],directory:_0x9b7d[247],sort:_0x9b7d[248],format:_0x9b7d[249],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x9b7d[6]](function(){console[_0x9b7d[5]](_0x9b7d[244])});models[_0x9b7d[252]][_0x9b7d[69]]([{id:1,min_internal:1000,soundPath:_0x9b7d[251]}],{ignoreDuplicates:true,individualHooks:true})[_0x9b7d[6]](function(){console[_0x9b7d[5]](_0x9b7d[244])});models[_0x9b7d[264]][_0x9b7d[69]]([{id:1,name:_0x9b7d[253],model:JSON[_0x9b7d[263]]({title:_0x9b7d[253],rows:[{columns:[{styleClass:_0x9b7d[254],widgets:[{type:_0x9b7d[255],title:_0x9b7d[256],config:{timePattern:_0x9b7d[257],datePattern:_0x9b7d[258]}}]},{styleClass:_0x9b7d[259],widgets:[{type:_0x9b7d[260],title:_0x9b7d[261],config:{url:_0x9b7d[262]}}]}]}]}),defaultEntry:true,editable:false}],{ignoreDuplicates:true,individualHooks:true})[_0x9b7d[6]](function(){console[_0x9b7d[5]](_0x9b7d[244])});var newIntegrations=[{name:_0x9b7d[265],version:_0x9b7d[266],author:_0x9b7d[267],logo:_0x9b7d[268],state:_0x9b7d[269],description:_0x9b7d[270],link:_0x9b7d[271]},{name:_0x9b7d[272],version:_0x9b7d[266],author:_0x9b7d[267],logo:_0x9b7d[273],state:_0x9b7d[274],description:_0x9b7d[275],link:_0x9b7d[276]},{name:_0x9b7d[277],version:_0x9b7d[266],author:_0x9b7d[267],logo:_0x9b7d[278],state:_0x9b7d[260],description:_0x9b7d[279],link:_0x9b7d[280]},{name:_0x9b7d[281],version:_0x9b7d[266],author:_0x9b7d[267],logo:_0x9b7d[282],state:_0x9b7d[283],description:_0x9b7d[284]},{name:_0x9b7d[285],version:_0x9b7d[266],author:_0x9b7d[267],logo:_0x9b7d[286],state:_0x9b7d[287],description:_0x9b7d[288]},{name:_0x9b7d[289],version:_0x9b7d[266],author:_0x9b7d[267],logo:_0x9b7d[290],state:_0x9b7d[291],description:_0x9b7d[292]}];models[_0x9b7d[296]][_0x9b7d[176]]()[_0x9b7d[6]](function(_0x1634x12){var _0x1634x13=[];_0x1634x12= _[_0x9b7d[169]](_0x1634x12,_0x9b7d[295]);newIntegrations[_0x9b7d[175]](function(_0x1634x14){if(_[_0x9b7d[170]](_0x1634x12,_0x1634x14[_0x9b7d[295]])){_0x1634x13[_0x9b7d[173]](models[_0x9b7d[296]][_0x9b7d[171]](_0x1634x14,{where:{state:_0x1634x14[_0x9b7d[295]]}}))}else {_0x1634x13[_0x9b7d[173]](models[_0x9b7d[296]][_0x9b7d[174]](_0x1634x14))}});return _0x1634x13})[_0x9b7d[19]]()[_0x9b7d[6]](function(){console[_0x9b7d[5]](_0x9b7d[294])})[_0x9b7d[166]](function(_0x1634x5){console[_0x9b7d[5]](_0x9b7d[293],_0x1634x5)});var newDefaulReports=[{"\x69\x64":1,"\x6E\x61\x6D\x65":_0x9b7d[297],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[298],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[300]},{"\x69\x64":2,"\x6E\x61\x6D\x65":_0x9b7d[301],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[302],"\x70\x61\x72\x65\x6E\x74":_0x9b7d[303],"\x74\x61\x62\x6C\x65":_0x9b7d[304],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[300]},{"\x69\x64":3,"\x6E\x61\x6D\x65":_0x9b7d[305],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[306],"\x70\x61\x72\x65\x6E\x74":_0x9b7d[303],"\x74\x61\x62\x6C\x65":_0x9b7d[304],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[307]},{"\x69\x64":4,"\x6E\x61\x6D\x65":_0x9b7d[308],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[309],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[300]},{"\x69\x64":5,"\x6E\x61\x6D\x65":_0x9b7d[301],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[310],"\x74\x61\x62\x6C\x65":_0x9b7d[311],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[312]},{"\x69\x64":6,"\x6E\x61\x6D\x65":_0x9b7d[313],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[310],"\x74\x61\x62\x6C\x65":_0x9b7d[311],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[300]},{"\x69\x64":7,"\x6E\x61\x6D\x65":_0x9b7d[308],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[310],"\x74\x61\x62\x6C\x65":_0x9b7d[311],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[312]},{"\x69\x64":8,"\x6E\x61\x6D\x65":_0x9b7d[314],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[310],"\x74\x61\x62\x6C\x65":_0x9b7d[311],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[312]},{"\x69\x64":9,"\x6E\x61\x6D\x65":_0x9b7d[315],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[310],"\x74\x61\x62\x6C\x65":_0x9b7d[311],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[312]},{"\x69\x64":10,"\x6E\x61\x6D\x65":_0x9b7d[301],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[316],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[317]},{"\x69\x64":11,"\x6E\x61\x6D\x65":_0x9b7d[318],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[316],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[317]},{"\x69\x64":12,"\x6E\x61\x6D\x65":_0x9b7d[319],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[316],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[320]},{"\x69\x64":13,"\x6E\x61\x6D\x65":_0x9b7d[321],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[316],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[322]},{"\x69\x64":14,"\x6E\x61\x6D\x65":_0x9b7d[323],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[309],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[300]},{"\x69\x64":15,"\x6E\x61\x6D\x65":_0x9b7d[324],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[309],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[300]},{"\x69\x64":16,"\x6E\x61\x6D\x65":_0x9b7d[325],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[309],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[300]},{"\x69\x64":17,"\x6E\x61\x6D\x65":_0x9b7d[326],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[303],"\x74\x61\x62\x6C\x65":_0x9b7d[304],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[300]},{"\x69\x64":18,"\x6E\x61\x6D\x65":_0x9b7d[327],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[328],"\x70\x61\x72\x65\x6E\x74":_0x9b7d[303],"\x74\x61\x62\x6C\x65":_0x9b7d[304],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[307]},{"\x69\x64":19,"\x6E\x61\x6D\x65":_0x9b7d[329],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[330],"\x74\x61\x62\x6C\x65":_0x9b7d[331],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[332]},{"\x69\x64":20,"\x6E\x61\x6D\x65":_0x9b7d[333],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[330],"\x74\x61\x62\x6C\x65":_0x9b7d[331],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[334]},{"\x69\x64":21,"\x6E\x61\x6D\x65":_0x9b7d[335],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[336],"\x74\x61\x62\x6C\x65":_0x9b7d[337],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[300]},{"\x69\x64":22,"\x6E\x61\x6D\x65":_0x9b7d[338],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[336],"\x74\x61\x62\x6C\x65":_0x9b7d[337],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[300]},{"\x69\x64":23,"\x6E\x61\x6D\x65":_0x9b7d[339],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[336],"\x74\x61\x62\x6C\x65":_0x9b7d[337],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[340]},{"\x69\x64":24,"\x6E\x61\x6D\x65":_0x9b7d[341],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[336],"\x74\x61\x62\x6C\x65":_0x9b7d[337],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[342]},{"\x69\x64":25,"\x6E\x61\x6D\x65":_0x9b7d[301],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[343],"\x70\x61\x72\x65\x6E\x74":_0x9b7d[330],"\x74\x61\x62\x6C\x65":_0x9b7d[331],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[344]},{"\x69\x64":26,"\x6E\x61\x6D\x65":_0x9b7d[345],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[346],"\x70\x61\x72\x65\x6E\x74":_0x9b7d[347],"\x74\x61\x62\x6C\x65":_0x9b7d[348],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[300]},{"\x69\x64":27,"\x6E\x61\x6D\x65":_0x9b7d[349],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[350],"\x70\x61\x72\x65\x6E\x74":_0x9b7d[347],"\x74\x61\x62\x6C\x65":_0x9b7d[351],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[300]},{"\x69\x64":28,"\x6E\x61\x6D\x65":_0x9b7d[352],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[343],"\x70\x61\x72\x65\x6E\x74":_0x9b7d[353],"\x74\x61\x62\x6C\x65":_0x9b7d[331],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[354]},{"\x69\x64":29,"\x6E\x61\x6D\x65":_0x9b7d[355],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[356],"\x70\x61\x72\x65\x6E\x74":_0x9b7d[353],"\x74\x61\x62\x6C\x65":_0x9b7d[331],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[357]},{"\x69\x64":30,"\x6E\x61\x6D\x65":_0x9b7d[358],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[343],"\x70\x61\x72\x65\x6E\x74":_0x9b7d[330],"\x74\x61\x62\x6C\x65":_0x9b7d[331],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[359]},{"\x69\x64":31,"\x6E\x61\x6D\x65":_0x9b7d[360],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[361],"\x74\x61\x62\x6C\x65":_0x9b7d[362],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[300]},{"\x69\x64":32,"\x6E\x61\x6D\x65":_0x9b7d[363],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[361],"\x74\x61\x62\x6C\x65":_0x9b7d[362],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[364]},{"\x69\x64":33,"\x6E\x61\x6D\x65":_0x9b7d[365],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[298],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[300]},{"\x69\x64":34,"\x6E\x61\x6D\x65":_0x9b7d[366],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x9b7d[310],"\x74\x61\x62\x6C\x65":_0x9b7d[311],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[312]},{"\x69\x64":35,"\x6E\x61\x6D\x65":_0x9b7d[367],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[368],"\x70\x61\x72\x65\x6E\x74":_0x9b7d[369],"\x74\x61\x62\x6C\x65":_0x9b7d[370],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[300]},{"\x69\x64":36,"\x6E\x61\x6D\x65":_0x9b7d[371],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[372],"\x70\x61\x72\x65\x6E\x74":_0x9b7d[369],"\x74\x61\x62\x6C\x65":_0x9b7d[370],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[373]},{"\x69\x64":37,"\x6E\x61\x6D\x65":_0x9b7d[374],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[375],"\x70\x61\x72\x65\x6E\x74":_0x9b7d[369],"\x74\x61\x62\x6C\x65":_0x9b7d[370],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[376]},{"\x69\x64":38,"\x6E\x61\x6D\x65":_0x9b7d[377],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[378],"\x70\x61\x72\x65\x6E\x74":_0x9b7d[369],"\x74\x61\x62\x6C\x65":_0x9b7d[379],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[380]},{"\x69\x64":39,"\x6E\x61\x6D\x65":_0x9b7d[381],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[382],"\x70\x61\x72\x65\x6E\x74":_0x9b7d[369],"\x74\x61\x62\x6C\x65":_0x9b7d[383],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[300]},{"\x69\x64":40,"\x6E\x61\x6D\x65":_0x9b7d[384],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[385],"\x70\x61\x72\x65\x6E\x74":_0x9b7d[369],"\x74\x61\x62\x6C\x65":_0x9b7d[383],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[386]},{"\x69\x64":41,"\x6E\x61\x6D\x65":_0x9b7d[387],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[388],"\x70\x61\x72\x65\x6E\x74":_0x9b7d[369],"\x74\x61\x62\x6C\x65":_0x9b7d[383],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x9b7d[389]}];var newDefaultMetrics=[{"\x69\x64":1,"\x6E\x61\x6D\x65":_0x9b7d[390],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[391]},{"\x69\x64":2,"\x6E\x61\x6D\x65":_0x9b7d[392],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[393]},{"\x69\x64":3,"\x6E\x61\x6D\x65":_0x9b7d[394],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[395],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[396]},{"\x69\x64":4,"\x6E\x61\x6D\x65":_0x9b7d[397],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[398]},{"\x69\x64":5,"\x6E\x61\x6D\x65":_0x9b7d[399],"\x74\x61\x62\x6C\x65":_0x9b7d[311],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[400],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[401]},{"\x69\x64":6,"\x6E\x61\x6D\x65":_0x9b7d[402],"\x74\x61\x62\x6C\x65":_0x9b7d[311],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[403],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[404]},{"\x69\x64":7,"\x6E\x61\x6D\x65":_0x9b7d[405],"\x74\x61\x62\x6C\x65":_0x9b7d[311],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[406],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[407]},{"\x69\x64":8,"\x6E\x61\x6D\x65":_0x9b7d[408],"\x74\x61\x62\x6C\x65":_0x9b7d[311],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[409],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[410]},{"\x69\x64":9,"\x6E\x61\x6D\x65":_0x9b7d[411],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[412]},{"\x69\x64":10,"\x6E\x61\x6D\x65":_0x9b7d[413],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[414],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[415]},{"\x69\x64":11,"\x6E\x61\x6D\x65":_0x9b7d[416],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[417],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[418]},{"\x69\x64":12,"\x6E\x61\x6D\x65":_0x9b7d[419],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[420],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[421]},{"\x69\x64":13,"\x6E\x61\x6D\x65":_0x9b7d[422],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[423],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[424]},{"\x69\x64":14,"\x6E\x61\x6D\x65":_0x9b7d[425],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[426],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[427]},{"\x69\x64":15,"\x6E\x61\x6D\x65":_0x9b7d[428],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[429],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[430]},{"\x69\x64":16,"\x6E\x61\x6D\x65":_0x9b7d[431],"\x74\x61\x62\x6C\x65":_0x9b7d[331],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[432],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[433]},{"\x69\x64":17,"\x6E\x61\x6D\x65":_0x9b7d[434],"\x74\x61\x62\x6C\x65":_0x9b7d[331],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[435],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[436]},{"\x69\x64":18,"\x6E\x61\x6D\x65":_0x9b7d[437],"\x74\x61\x62\x6C\x65":_0x9b7d[337],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[438],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[439]},{"\x69\x64":19,"\x6E\x61\x6D\x65":_0x9b7d[440],"\x74\x61\x62\x6C\x65":_0x9b7d[337],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[441],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[442]},{"\x69\x64":20,"\x6E\x61\x6D\x65":_0x9b7d[443],"\x74\x61\x62\x6C\x65":_0x9b7d[337],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[444],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[445]},{"\x69\x64":21,"\x6E\x61\x6D\x65":_0x9b7d[446],"\x74\x61\x62\x6C\x65":_0x9b7d[337],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[447],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[448]},{"\x69\x64":22,"\x6E\x61\x6D\x65":_0x9b7d[449],"\x74\x61\x62\x6C\x65":_0x9b7d[331],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[450],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[451]},{"\x69\x64":23,"\x6E\x61\x6D\x65":_0x9b7d[452],"\x74\x61\x62\x6C\x65":_0x9b7d[348],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[453],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[454]},{"\x69\x64":24,"\x6E\x61\x6D\x65":_0x9b7d[455],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[456],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null},{"\x69\x64":25,"\x6E\x61\x6D\x65":_0x9b7d[457],"\x74\x61\x62\x6C\x65":_0x9b7d[299],"\x6D\x65\x74\x72\x69\x63":_0x9b7d[458],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x9b7d[459]}];models[_0x9b7d[697]][_0x9b7d[692]]({where:{id:1}})[_0x9b7d[6]](function(){return models[_0x9b7d[697]][_0x9b7d[174]]({id:1,tree:_0x9b7d[698]})})[_0x9b7d[6]](function(){return models[_0x9b7d[697]][_0x9b7d[696]]({where:{id:2},defaults:{id:2,tree:_0x9b7d[695]}})})[_0x9b7d[6]](function(){return models[_0x9b7d[694]][_0x9b7d[176]]()})[_0x9b7d[6]](function(_0x1634x1a){var _0x1634x1b=[];_0x1634x1a= _[_0x9b7d[169]](_0x1634x1a,_0x9b7d[168]);newDefaultMetrics[_0x9b7d[175]](function(_0x1634x1c){if(_[_0x9b7d[170]](_0x1634x1a,_0x1634x1c[_0x9b7d[168]])){_0x1634x1b[_0x9b7d[173]](models[_0x9b7d[694]][_0x9b7d[171]](_0x1634x1c,{where:{id:_0x1634x1c[_0x9b7d[168]]}}))}else {_0x1634x1b[_0x9b7d[173]](models[_0x9b7d[694]][_0x9b7d[174]](_0x1634x1c))}});return _0x1634x1b})[_0x9b7d[19]]()[_0x9b7d[6]](function(){return models[_0x9b7d[693]][_0x9b7d[176]]()})[_0x9b7d[6]](function(_0x1634x17){var _0x1634x18=[];_0x1634x17= _[_0x9b7d[169]](_0x1634x17,_0x9b7d[168]);newDefaulReports[_0x9b7d[175]](function(_0x1634x19){if(_[_0x9b7d[170]](_0x1634x17,_0x1634x19[_0x9b7d[168]])){_0x1634x18[_0x9b7d[173]](models[_0x9b7d[693]][_0x9b7d[171]](_0x1634x19,{where:{id:_0x1634x19[_0x9b7d[168]]}}))}else {_0x1634x18[_0x9b7d[173]](models[_0x9b7d[693]][_0x9b7d[174]](_0x1634x19))}});return _0x1634x18})[_0x9b7d[19]]()[_0x9b7d[6]](function(){return models[_0x9b7d[691]][_0x9b7d[692]]({where:{DefaultReportId:{$gt:0}}})})[_0x9b7d[6]](function(){return models[_0x9b7d[691]][_0x9b7d[69]]([{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[463],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x9b7d[464],"\x61\x6C\x69\x61\x73":_0x9b7d[465],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x9b7d[466],"\x61\x6C\x69\x61\x73":_0x9b7d[467],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x9b7d[217],"\x61\x6C\x69\x61\x73":_0x9b7d[468],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x9b7d[469],"\x61\x6C\x69\x61\x73":_0x9b7d[470],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x9b7d[471],"\x61\x6C\x69\x61\x73":_0x9b7d[472],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x9b7d[473],"\x61\x6C\x69\x61\x73":_0x9b7d[474],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x9b7d[475],"\x61\x6C\x69\x61\x73":_0x9b7d[476],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x9b7d[477],"\x61\x6C\x69\x61\x73":_0x9b7d[478],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x9b7d[479],"\x61\x6C\x69\x61\x73":_0x9b7d[480],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x9b7d[481],"\x61\x6C\x69\x61\x73":_0x9b7d[482],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x9b7d[483],"\x61\x6C\x69\x61\x73":_0x9b7d[484],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x9b7d[485],"\x61\x6C\x69\x61\x73":_0x9b7d[486],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x9b7d[487],"\x61\x6C\x69\x61\x73":_0x9b7d[488],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x9b7d[391],"\x61\x6C\x69\x61\x73":_0x9b7d[489],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x9b7d[398],"\x61\x6C\x69\x61\x73":_0x9b7d[490],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":4,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x9b7d[393],"\x61\x6C\x69\x61\x73":_0x9b7d[491],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":2,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[492],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x9b7d[493],"\x61\x6C\x69\x61\x73":_0x9b7d[494],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x9b7d[495],"\x61\x6C\x69\x61\x73":_0x9b7d[496],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x9b7d[497],"\x61\x6C\x69\x61\x73":_0x9b7d[498],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x9b7d[499],"\x61\x6C\x69\x61\x73":_0x9b7d[500],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x9b7d[501],"\x61\x6C\x69\x61\x73":_0x9b7d[502],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x9b7d[503],"\x61\x6C\x69\x61\x73":_0x9b7d[504],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x9b7d[505],"\x61\x6C\x69\x61\x73":_0x9b7d[506],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x9b7d[507],"\x61\x6C\x69\x61\x73":_0x9b7d[508],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x9b7d[509],"\x61\x6C\x69\x61\x73":_0x9b7d[510],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x9b7d[511],"\x61\x6C\x69\x61\x73":_0x9b7d[490],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x9b7d[512],"\x61\x6C\x69\x61\x73":_0x9b7d[513],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x9b7d[514],"\x61\x6C\x69\x61\x73":_0x9b7d[515],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x9b7d[516],"\x61\x6C\x69\x61\x73":_0x9b7d[517],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[492],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x9b7d[518],"\x61\x6C\x69\x61\x73":_0x9b7d[519],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x9b7d[497],"\x61\x6C\x69\x61\x73":_0x9b7d[498],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x9b7d[499],"\x61\x6C\x69\x61\x73":_0x9b7d[500],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x9b7d[501],"\x61\x6C\x69\x61\x73":_0x9b7d[520],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x9b7d[509],"\x61\x6C\x69\x61\x73":_0x9b7d[510],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x9b7d[511],"\x61\x6C\x69\x61\x73":_0x9b7d[490],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x9b7d[512],"\x61\x6C\x69\x61\x73":_0x9b7d[521],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x9b7d[514],"\x61\x6C\x69\x61\x73":_0x9b7d[515],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x9b7d[522],"\x61\x6C\x69\x61\x73":_0x9b7d[523],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x9b7d[516],"\x61\x6C\x69\x61\x73":_0x9b7d[517],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x9b7d[495],"\x61\x6C\x69\x61\x73":_0x9b7d[496],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x9b7d[217],"\x61\x6C\x69\x61\x73":_0x9b7d[468],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":4},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[524],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[525],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":4},{"\x66\x69\x65\x6C\x64":_0x9b7d[477],"\x61\x6C\x69\x61\x73":_0x9b7d[526],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":4},{"\x66\x69\x65\x6C\x64":_0x9b7d[473],"\x61\x6C\x69\x61\x73":_0x9b7d[528],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":4},{"\x66\x69\x65\x6C\x64":_0x9b7d[481],"\x61\x6C\x69\x61\x73":_0x9b7d[529],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":4},{"\x66\x69\x65\x6C\x64":_0x9b7d[391],"\x61\x6C\x69\x61\x73":_0x9b7d[530],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":4},{"\x66\x69\x65\x6C\x64":_0x9b7d[393],"\x61\x6C\x69\x61\x73":_0x9b7d[532],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":4},{"\x66\x69\x65\x6C\x64":_0x9b7d[398],"\x61\x6C\x69\x61\x73":_0x9b7d[533],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":4,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":4},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[463],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x9b7d[464],"\x61\x6C\x69\x61\x73":_0x9b7d[465],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x9b7d[466],"\x61\x6C\x69\x61\x73":_0x9b7d[467],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x9b7d[217],"\x61\x6C\x69\x61\x73":_0x9b7d[468],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x9b7d[534],"\x61\x6C\x69\x61\x73":_0x9b7d[535],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x9b7d[536],"\x61\x6C\x69\x61\x73":_0x9b7d[537],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x9b7d[538],"\x61\x6C\x69\x61\x73":_0x9b7d[539],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x9b7d[540],"\x61\x6C\x69\x61\x73":_0x9b7d[541],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x9b7d[542],"\x61\x6C\x69\x61\x73":_0x9b7d[490],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x9b7d[543],"\x61\x6C\x69\x61\x73":_0x9b7d[489],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x9b7d[544],"\x61\x6C\x69\x61\x73":_0x9b7d[545],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x9b7d[546],"\x61\x6C\x69\x61\x73":_0x9b7d[547],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x9b7d[548],"\x61\x6C\x69\x61\x73":_0x9b7d[549],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x9b7d[550],"\x61\x6C\x69\x61\x73":_0x9b7d[551],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x9b7d[552],"\x61\x6C\x69\x61\x73":_0x9b7d[553],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x9b7d[487],"\x61\x6C\x69\x61\x73":_0x9b7d[488],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x9b7d[534],"\x61\x6C\x69\x61\x73":_0x9b7d[535],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":6},{"\x66\x69\x65\x6C\x64":_0x9b7d[548],"\x61\x6C\x69\x61\x73":_0x9b7d[526],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":6},{"\x66\x69\x65\x6C\x64":_0x9b7d[554],"\x61\x6C\x69\x61\x73":_0x9b7d[555],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":6},{"\x66\x69\x65\x6C\x64":_0x9b7d[543],"\x61\x6C\x69\x61\x73":_0x9b7d[556],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":6},{"\x66\x69\x65\x6C\x64":_0x9b7d[546],"\x61\x6C\x69\x61\x73":_0x9b7d[557],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":6},{"\x66\x69\x65\x6C\x64":_0x9b7d[543],"\x61\x6C\x69\x61\x73":_0x9b7d[530],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":6},{"\x66\x69\x65\x6C\x64":_0x9b7d[546],"\x61\x6C\x69\x61\x73":_0x9b7d[558],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":6},{"\x66\x69\x65\x6C\x64":_0x9b7d[217],"\x61\x6C\x69\x61\x73":_0x9b7d[468],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":7},{"\x66\x69\x65\x6C\x64":_0x9b7d[548],"\x61\x6C\x69\x61\x73":_0x9b7d[526],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":7},{"\x66\x69\x65\x6C\x64":_0x9b7d[543],"\x61\x6C\x69\x61\x73":_0x9b7d[559],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":7},{"\x66\x69\x65\x6C\x64":_0x9b7d[543],"\x61\x6C\x69\x61\x73":_0x9b7d[560],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":7},{"\x66\x69\x65\x6C\x64":_0x9b7d[542],"\x61\x6C\x69\x61\x73":_0x9b7d[561],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":7},{"\x66\x69\x65\x6C\x64":_0x9b7d[542],"\x61\x6C\x69\x61\x73":_0x9b7d[562],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":7},{"\x66\x69\x65\x6C\x64":_0x9b7d[546],"\x61\x6C\x69\x61\x73":_0x9b7d[563],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":7},{"\x66\x69\x65\x6C\x64":_0x9b7d[546],"\x61\x6C\x69\x61\x73":_0x9b7d[564],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":7},{"\x66\x69\x65\x6C\x64":_0x9b7d[217],"\x61\x6C\x69\x61\x73":_0x9b7d[468],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":8},{"\x66\x69\x65\x6C\x64":_0x9b7d[548],"\x61\x6C\x69\x61\x73":_0x9b7d[565],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":8},{"\x66\x69\x65\x6C\x64":_0x9b7d[400],"\x61\x6C\x69\x61\x73":_0x9b7d[566],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":5,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":8},{"\x66\x69\x65\x6C\x64":_0x9b7d[403],"\x61\x6C\x69\x61\x73":_0x9b7d[402],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":6,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":8},{"\x66\x69\x65\x6C\x64":_0x9b7d[406],"\x61\x6C\x69\x61\x73":_0x9b7d[405],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":7,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":8},{"\x66\x69\x65\x6C\x64":_0x9b7d[409],"\x61\x6C\x69\x61\x73":_0x9b7d[408],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":8,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":8},{"\x66\x69\x65\x6C\x64":_0x9b7d[550],"\x61\x6C\x69\x61\x73":_0x9b7d[567],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":9},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[568],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[525],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":9},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[463],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x9b7d[464],"\x61\x6C\x69\x61\x73":_0x9b7d[465],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x9b7d[217],"\x61\x6C\x69\x61\x73":_0x9b7d[468],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x9b7d[469],"\x61\x6C\x69\x61\x73":_0x9b7d[470],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x9b7d[471],"\x61\x6C\x69\x61\x73":_0x9b7d[472],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x9b7d[473],"\x61\x6C\x69\x61\x73":_0x9b7d[474],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x9b7d[475],"\x61\x6C\x69\x61\x73":_0x9b7d[476],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x9b7d[393],"\x61\x6C\x69\x61\x73":_0x9b7d[569],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":2,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x9b7d[481],"\x61\x6C\x69\x61\x73":_0x9b7d[482],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x9b7d[483],"\x61\x6C\x69\x61\x73":_0x9b7d[484],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x9b7d[485],"\x61\x6C\x69\x61\x73":_0x9b7d[486],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x9b7d[412],"\x61\x6C\x69\x61\x73":_0x9b7d[570],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":9,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x9b7d[571],"\x61\x6C\x69\x61\x73":_0x9b7d[572],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x9b7d[487],"\x61\x6C\x69\x61\x73":_0x9b7d[488],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x9b7d[217],"\x61\x6C\x69\x61\x73":_0x9b7d[468],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":11},{"\x66\x69\x65\x6C\x64":_0x9b7d[473],"\x61\x6C\x69\x61\x73":_0x9b7d[528],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":11},{"\x66\x69\x65\x6C\x64":_0x9b7d[393],"\x61\x6C\x69\x61\x73":_0x9b7d[532],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":2,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":11},{"\x66\x69\x65\x6C\x64":_0x9b7d[393],"\x61\x6C\x69\x61\x73":_0x9b7d[573],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":2,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":11},{"\x66\x69\x65\x6C\x64":_0x9b7d[481],"\x61\x6C\x69\x61\x73":_0x9b7d[574],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":11},{"\x66\x69\x65\x6C\x64":_0x9b7d[412],"\x61\x6C\x69\x61\x73":_0x9b7d[575],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":9,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":11},{"\x66\x69\x65\x6C\x64":_0x9b7d[412],"\x61\x6C\x69\x61\x73":_0x9b7d[576],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":9,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":11},{"\x66\x69\x65\x6C\x64":_0x9b7d[485],"\x61\x6C\x69\x61\x73":_0x9b7d[567],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":12},{"\x66\x69\x65\x6C\x64":_0x9b7d[481],"\x61\x6C\x69\x61\x73":_0x9b7d[568],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":12},{"\x66\x69\x65\x6C\x64":_0x9b7d[412],"\x61\x6C\x69\x61\x73":_0x9b7d[577],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":9,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":12},{"\x66\x69\x65\x6C\x64":_0x9b7d[217],"\x61\x6C\x69\x61\x73":_0x9b7d[468],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":13},{"\x66\x69\x65\x6C\x64":_0x9b7d[473],"\x61\x6C\x69\x61\x73":_0x9b7d[578],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":13},{"\x66\x69\x65\x6C\x64":_0x9b7d[395],"\x61\x6C\x69\x61\x73":_0x9b7d[579],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":3,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":13},{"\x66\x69\x65\x6C\x64":_0x9b7d[414],"\x61\x6C\x69\x61\x73":_0x9b7d[413],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":10,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":13},{"\x66\x69\x65\x6C\x64":_0x9b7d[417],"\x61\x6C\x69\x61\x73":_0x9b7d[416],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":11,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":13},{"\x66\x69\x65\x6C\x64":_0x9b7d[420],"\x61\x6C\x69\x61\x73":_0x9b7d[580],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":12,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":13},{"\x66\x69\x65\x6C\x64":_0x9b7d[423],"\x61\x6C\x69\x61\x73":_0x9b7d[581],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":13,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":14},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[524],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[525],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":14},{"\x66\x69\x65\x6C\x64":_0x9b7d[477],"\x61\x6C\x69\x61\x73":_0x9b7d[526],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":14},{"\x66\x69\x65\x6C\x64":_0x9b7d[473],"\x61\x6C\x69\x61\x73":_0x9b7d[528],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":14},{"\x66\x69\x65\x6C\x64":_0x9b7d[481],"\x61\x6C\x69\x61\x73":_0x9b7d[529],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":14},{"\x66\x69\x65\x6C\x64":_0x9b7d[391],"\x61\x6C\x69\x61\x73":_0x9b7d[530],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":14},{"\x66\x69\x65\x6C\x64":_0x9b7d[393],"\x61\x6C\x69\x61\x73":_0x9b7d[532],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":2,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":14},{"\x66\x69\x65\x6C\x64":_0x9b7d[398],"\x61\x6C\x69\x61\x73":_0x9b7d[533],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":4,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":14},{"\x66\x69\x65\x6C\x64":_0x9b7d[426],"\x61\x6C\x69\x61\x73":_0x9b7d[582],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":14,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":15},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[524],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[525],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":15},{"\x66\x69\x65\x6C\x64":_0x9b7d[477],"\x61\x6C\x69\x61\x73":_0x9b7d[526],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":15},{"\x66\x69\x65\x6C\x64":_0x9b7d[473],"\x61\x6C\x69\x61\x73":_0x9b7d[528],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":15},{"\x66\x69\x65\x6C\x64":_0x9b7d[481],"\x61\x6C\x69\x61\x73":_0x9b7d[529],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":15},{"\x66\x69\x65\x6C\x64":_0x9b7d[391],"\x61\x6C\x69\x61\x73":_0x9b7d[530],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":15},{"\x66\x69\x65\x6C\x64":_0x9b7d[393],"\x61\x6C\x69\x61\x73":_0x9b7d[532],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":2,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":15},{"\x66\x69\x65\x6C\x64":_0x9b7d[398],"\x61\x6C\x69\x61\x73":_0x9b7d[533],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":4,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":15},{"\x66\x69\x65\x6C\x64":_0x9b7d[429],"\x61\x6C\x69\x61\x73":_0x9b7d[583],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":15,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":16},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[524],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[525],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":16},{"\x66\x69\x65\x6C\x64":_0x9b7d[477],"\x61\x6C\x69\x61\x73":_0x9b7d[526],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":16},{"\x66\x69\x65\x6C\x64":_0x9b7d[473],"\x61\x6C\x69\x61\x73":_0x9b7d[528],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":16},{"\x66\x69\x65\x6C\x64":_0x9b7d[481],"\x61\x6C\x69\x61\x73":_0x9b7d[529],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":16},{"\x66\x69\x65\x6C\x64":_0x9b7d[391],"\x61\x6C\x69\x61\x73":_0x9b7d[530],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":16},{"\x66\x69\x65\x6C\x64":_0x9b7d[393],"\x61\x6C\x69\x61\x73":_0x9b7d[532],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":2,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":16},{"\x66\x69\x65\x6C\x64":_0x9b7d[398],"\x61\x6C\x69\x61\x73":_0x9b7d[533],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":4,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":16},{"\x66\x69\x65\x6C\x64":_0x9b7d[493],"\x61\x6C\x69\x61\x73":_0x9b7d[494],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":17},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[568],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[525],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":17},{"\x66\x69\x65\x6C\x64":_0x9b7d[514],"\x61\x6C\x69\x61\x73":_0x9b7d[584],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":17},{"\x66\x69\x65\x6C\x64":_0x9b7d[514],"\x61\x6C\x69\x61\x73":_0x9b7d[585],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":17},{"\x66\x69\x65\x6C\x64":_0x9b7d[516],"\x61\x6C\x69\x61\x73":_0x9b7d[517],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":18},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[568],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[525],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":18},{"\x66\x69\x65\x6C\x64":_0x9b7d[514],"\x61\x6C\x69\x61\x73":_0x9b7d[584],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":18},{"\x66\x69\x65\x6C\x64":_0x9b7d[514],"\x61\x6C\x69\x61\x73":_0x9b7d[585],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":18},{"\x66\x69\x65\x6C\x64":_0x9b7d[534],"\x61\x6C\x69\x61\x73":_0x9b7d[535],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":_0x9b7d[586],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":19},{"\x66\x69\x65\x6C\x64":_0x9b7d[587],"\x61\x6C\x69\x61\x73":_0x9b7d[588],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":_0x9b7d[586],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":19},{"\x66\x69\x65\x6C\x64":_0x9b7d[435],"\x61\x6C\x69\x61\x73":_0x9b7d[515],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":17,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":19},{"\x66\x69\x65\x6C\x64":_0x9b7d[534],"\x61\x6C\x69\x61\x73":_0x9b7d[535],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":_0x9b7d[586],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":20},{"\x66\x69\x65\x6C\x64":_0x9b7d[435],"\x61\x6C\x69\x61\x73":_0x9b7d[515],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":17,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":20},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[463],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[589],"\x61\x6C\x69\x61\x73":_0x9b7d[590],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[591],"\x61\x6C\x69\x61\x73":_0x9b7d[592],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22},{"\x66\x69\x65\x6C\x64":_0x9b7d[593],"\x61\x6C\x69\x61\x73":_0x9b7d[594],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[534],"\x61\x6C\x69\x61\x73":_0x9b7d[595],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[596],"\x61\x6C\x69\x61\x73":_0x9b7d[597],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[598],"\x61\x6C\x69\x61\x73":_0x9b7d[599],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[600],"\x61\x6C\x69\x61\x73":_0x9b7d[601],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[602],"\x61\x6C\x69\x61\x73":_0x9b7d[480],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[603],"\x61\x6C\x69\x61\x73":_0x9b7d[478],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[604],"\x61\x6C\x69\x61\x73":_0x9b7d[605],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[606],"\x61\x6C\x69\x61\x73":_0x9b7d[607],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[608],"\x61\x6C\x69\x61\x73":_0x9b7d[609],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[534],"\x61\x6C\x69\x61\x73":_0x9b7d[535],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":23,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[603],"\x61\x6C\x69\x61\x73":_0x9b7d[610],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":23,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[441],"\x61\x6C\x69\x61\x73":_0x9b7d[611],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x63\x72\x65\x61\x74\x65\x64\x41\x74":_0x9b7d[612],"\x75\x70\x64\x61\x74\x65\x64\x41\x74":_0x9b7d[612],"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":19,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":23,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[444],"\x61\x6C\x69\x61\x73":_0x9b7d[613],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":20,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":23,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[438],"\x61\x6C\x69\x61\x73":_0x9b7d[614],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":18,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":23,"\x66\x6F\x72\x6D\x61\x74":_0x9b7d[615]},{"\x66\x69\x65\x6C\x64":_0x9b7d[438],"\x61\x6C\x69\x61\x73":_0x9b7d[616],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":18,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":23,"\x66\x6F\x72\x6D\x61\x74":_0x9b7d[615]},{"\x66\x69\x65\x6C\x64":_0x9b7d[589],"\x61\x6C\x69\x61\x73":_0x9b7d[617],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":21,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[618],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[619],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":21,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[603],"\x61\x6C\x69\x61\x73":_0x9b7d[526],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":21,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[606],"\x61\x6C\x69\x61\x73":_0x9b7d[528],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":21,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[438],"\x61\x6C\x69\x61\x73":_0x9b7d[439],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":18,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":21,"\x66\x6F\x72\x6D\x61\x74":_0x9b7d[615]},{"\x66\x69\x65\x6C\x64":_0x9b7d[447],"\x61\x6C\x69\x61\x73":_0x9b7d[616],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":21,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":21,"\x66\x6F\x72\x6D\x61\x74":_0x9b7d[615]},{"\x66\x69\x65\x6C\x64":_0x9b7d[596],"\x61\x6C\x69\x61\x73":_0x9b7d[468],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":24,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[618],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[525],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":24,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[603],"\x61\x6C\x69\x61\x73":_0x9b7d[526],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":24,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[606],"\x61\x6C\x69\x61\x73":_0x9b7d[528],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":24,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[608],"\x61\x6C\x69\x61\x73":_0x9b7d[529],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":24,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x9b7d[438],"\x61\x6C\x69\x61\x73":_0x9b7d[439],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":18,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":24,"\x66\x6F\x72\x6D\x61\x74":_0x9b7d[615]},{"\x66\x69\x65\x6C\x64":_0x9b7d[447],"\x61\x6C\x69\x61\x73":_0x9b7d[616],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":21,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":24,"\x66\x6F\x72\x6D\x61\x74":_0x9b7d[615]},{"\x66\x69\x65\x6C\x64":_0x9b7d[534],"\x61\x6C\x69\x61\x73":_0x9b7d[535],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25},{"\x66\x69\x65\x6C\x64":_0x9b7d[620],"\x61\x6C\x69\x61\x73":_0x9b7d[621],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25},{"\x66\x69\x65\x6C\x64":_0x9b7d[493],"\x61\x6C\x69\x61\x73":_0x9b7d[622],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25},{"\x66\x69\x65\x6C\x64":_0x9b7d[587],"\x61\x6C\x69\x61\x73":_0x9b7d[623],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25},{"\x66\x69\x65\x6C\x64":_0x9b7d[624],"\x61\x6C\x69\x61\x73":_0x9b7d[625],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25},{"\x66\x69\x65\x6C\x64":_0x9b7d[626],"\x61\x6C\x69\x61\x73":_0x9b7d[627],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25},{"\x66\x69\x65\x6C\x64":_0x9b7d[450],"\x61\x6C\x69\x61\x73":_0x9b7d[515],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":22,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25},{"\x66\x69\x65\x6C\x64":_0x9b7d[628],"\x61\x6C\x69\x61\x73":_0x9b7d[629],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[492],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26},{"\x66\x69\x65\x6C\x64":_0x9b7d[501],"\x61\x6C\x69\x61\x73":_0x9b7d[502],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26},{"\x66\x69\x65\x6C\x64":_0x9b7d[630],"\x61\x6C\x69\x61\x73":_0x9b7d[488],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26},{"\x66\x69\x65\x6C\x64":_0x9b7d[598],"\x61\x6C\x69\x61\x73":_0x9b7d[631],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":_0x9b7d[586],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26},{"\x66\x69\x65\x6C\x64":_0x9b7d[600],"\x61\x6C\x69\x61\x73":_0x9b7d[632],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26},{"\x66\x69\x65\x6C\x64":_0x9b7d[453],"\x61\x6C\x69\x61\x73":_0x9b7d[515],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":23,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26,"\x66\x6F\x72\x6D\x61\x74":_0x9b7d[615]},{"\x66\x69\x65\x6C\x64":_0x9b7d[628],"\x61\x6C\x69\x61\x73":_0x9b7d[629],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":27},{"\x66\x69\x65\x6C\x64":_0x9b7d[501],"\x61\x6C\x69\x61\x73":_0x9b7d[633],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":27},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[634],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":27},{"\x66\x69\x65\x6C\x64":_0x9b7d[635],"\x61\x6C\x69\x61\x73":_0x9b7d[349],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[636],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":27},{"\x66\x69\x65\x6C\x64":_0x9b7d[534],"\x61\x6C\x69\x61\x73":_0x9b7d[535],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28},{"\x66\x69\x65\x6C\x64":_0x9b7d[624],"\x61\x6C\x69\x61\x73":_0x9b7d[625],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28},{"\x66\x69\x65\x6C\x64":_0x9b7d[626],"\x61\x6C\x69\x61\x73":_0x9b7d[627],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28},{"\x66\x69\x65\x6C\x64":_0x9b7d[514],"\x61\x6C\x69\x61\x73":_0x9b7d[515],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x66\x6F\x72\x6D\x61\x74":_0x9b7d[615]},{"\x66\x69\x65\x6C\x64":_0x9b7d[637],"\x61\x6C\x69\x61\x73":_0x9b7d[638],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29},{"\x66\x69\x65\x6C\x64":_0x9b7d[587],"\x61\x6C\x69\x61\x73":_0x9b7d[494],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29},{"\x66\x69\x65\x6C\x64":_0x9b7d[514],"\x61\x6C\x69\x61\x73":_0x9b7d[515],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29,"\x66\x6F\x72\x6D\x61\x74":_0x9b7d[615]},{"\x66\x69\x65\x6C\x64":_0x9b7d[534],"\x61\x6C\x69\x61\x73":_0x9b7d[535],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30},{"\x66\x69\x65\x6C\x64":_0x9b7d[624],"\x61\x6C\x69\x61\x73":_0x9b7d[625],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30},{"\x66\x69\x65\x6C\x64":_0x9b7d[626],"\x61\x6C\x69\x61\x73":_0x9b7d[627],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30},{"\x66\x69\x65\x6C\x64":_0x9b7d[587],"\x61\x6C\x69\x61\x73":_0x9b7d[639],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30},{"\x66\x69\x65\x6C\x64":_0x9b7d[514],"\x61\x6C\x69\x61\x73":_0x9b7d[515],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x66\x6F\x72\x6D\x61\x74":_0x9b7d[615]},{"\x66\x69\x65\x6C\x64":_0x9b7d[640],"\x61\x6C\x69\x61\x73":_0x9b7d[535],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[641],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[525],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31},{"\x66\x69\x65\x6C\x64":_0x9b7d[642],"\x61\x6C\x69\x61\x73":_0x9b7d[643],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31},{"\x66\x69\x65\x6C\x64":_0x9b7d[642],"\x61\x6C\x69\x61\x73":_0x9b7d[644],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31},{"\x66\x69\x65\x6C\x64":_0x9b7d[217],"\x61\x6C\x69\x61\x73":_0x9b7d[468],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":32},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[641],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[525],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":32},{"\x66\x69\x65\x6C\x64":_0x9b7d[642],"\x61\x6C\x69\x61\x73":_0x9b7d[643],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":32},{"\x66\x69\x65\x6C\x64":_0x9b7d[642],"\x61\x6C\x69\x61\x73":_0x9b7d[644],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[531],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":32},{"\x66\x69\x65\x6C\x64":_0x9b7d[464],"\x61\x6C\x69\x61\x73":_0x9b7d[465],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":33},{"\x66\x69\x65\x6C\x64":_0x9b7d[217],"\x61\x6C\x69\x61\x73":_0x9b7d[468],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":33},{"\x66\x69\x65\x6C\x64":_0x9b7d[469],"\x61\x6C\x69\x61\x73":_0x9b7d[510],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":33},{"\x66\x69\x65\x6C\x64":_0x9b7d[456],"\x61\x6C\x69\x61\x73":_0x9b7d[513],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":33,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":24},{"\x66\x69\x65\x6C\x64":_0x9b7d[458],"\x61\x6C\x69\x61\x73":_0x9b7d[645],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":33,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":25},{"\x66\x69\x65\x6C\x64":_0x9b7d[538],"\x61\x6C\x69\x61\x73":_0x9b7d[582],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34,"\x66\x6F\x72\x6D\x61\x74":_0x9b7d[646]},{"\x66\x69\x65\x6C\x64":_0x9b7d[548],"\x61\x6C\x69\x61\x73":_0x9b7d[565],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34},{"\x66\x69\x65\x6C\x64":_0x9b7d[400],"\x61\x6C\x69\x61\x73":_0x9b7d[566],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":5,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34},{"\x66\x69\x65\x6C\x64":_0x9b7d[403],"\x61\x6C\x69\x61\x73":_0x9b7d[402],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":6,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34},{"\x66\x69\x65\x6C\x64":_0x9b7d[406],"\x61\x6C\x69\x61\x73":_0x9b7d[405],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":7,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34},{"\x66\x69\x65\x6C\x64":_0x9b7d[409],"\x61\x6C\x69\x61\x73":_0x9b7d[408],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":8,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34},{"\x66\x69\x65\x6C\x64":_0x9b7d[647],"\x61\x6C\x69\x61\x73":_0x9b7d[648],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x63\x75\x73\x74\x6F\x6D":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[649],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[619],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35},{"\x66\x69\x65\x6C\x64":_0x9b7d[650],"\x61\x6C\x69\x61\x73":_0x9b7d[651],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35},{"\x66\x69\x65\x6C\x64":_0x9b7d[652],"\x61\x6C\x69\x61\x73":_0x9b7d[653],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35},{"\x66\x69\x65\x6C\x64":_0x9b7d[654],"\x61\x6C\x69\x61\x73":_0x9b7d[655],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35},{"\x66\x69\x65\x6C\x64":_0x9b7d[656],"\x61\x6C\x69\x61\x73":_0x9b7d[657],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35},{"\x66\x69\x65\x6C\x64":_0x9b7d[658],"\x61\x6C\x69\x61\x73":_0x9b7d[659],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35},{"\x66\x69\x65\x6C\x64":_0x9b7d[596],"\x61\x6C\x69\x61\x73":_0x9b7d[468],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x63\x75\x73\x74\x6F\x6D":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[649],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[525],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36},{"\x66\x69\x65\x6C\x64":_0x9b7d[660],"\x61\x6C\x69\x61\x73":_0x9b7d[651],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36},{"\x66\x69\x65\x6C\x64":_0x9b7d[661],"\x61\x6C\x69\x61\x73":_0x9b7d[662],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36},{"\x66\x69\x65\x6C\x64":_0x9b7d[663],"\x61\x6C\x69\x61\x73":_0x9b7d[653],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36},{"\x66\x69\x65\x6C\x64":_0x9b7d[664],"\x61\x6C\x69\x61\x73":_0x9b7d[665],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x66\x6F\x72\x6D\x61\x74":_0x9b7d[615],"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36},{"\x66\x69\x65\x6C\x64":_0x9b7d[534],"\x61\x6C\x69\x61\x73":_0x9b7d[534],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x63\x75\x73\x74\x6F\x6D":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36},{"\x66\x69\x65\x6C\x64":_0x9b7d[462],"\x61\x6C\x69\x61\x73":_0x9b7d[666],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[525],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":37},{"\x66\x69\x65\x6C\x64":_0x9b7d[667],"\x61\x6C\x69\x61\x73":_0x9b7d[668],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":37},{"\x66\x69\x65\x6C\x64":_0x9b7d[669],"\x61\x6C\x69\x61\x73":_0x9b7d[535],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":37},{"\x66\x69\x65\x6C\x64":_0x9b7d[670],"\x61\x6C\x69\x61\x73":_0x9b7d[468],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":37},{"\x66\x69\x65\x6C\x64":_0x9b7d[671],"\x61\x6C\x69\x61\x73":_0x9b7d[581],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x63\x75\x73\x74\x6F\x6D":0,"\x66\x6F\x72\x6D\x61\x74":_0x9b7d[672],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38},{"\x66\x69\x65\x6C\x64":_0x9b7d[673],"\x61\x6C\x69\x61\x73":_0x9b7d[649],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38},{"\x66\x69\x65\x6C\x64":_0x9b7d[674],"\x61\x6C\x69\x61\x73":_0x9b7d[675],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[527],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38},{"\x66\x69\x65\x6C\x64":_0x9b7d[168],"\x61\x6C\x69\x61\x73":_0x9b7d[168],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x9b7d[676],"\x61\x6C\x69\x61\x73":_0x9b7d[676],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x9b7d[677],"\x61\x6C\x69\x61\x73":_0x9b7d[677],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x9b7d[678],"\x61\x6C\x69\x61\x73":_0x9b7d[678],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x9b7d[671],"\x61\x6C\x69\x61\x73":_0x9b7d[671],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x9b7d[679],"\x61\x6C\x69\x61\x73":_0x9b7d[679],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x9b7d[680],"\x61\x6C\x69\x61\x73":_0x9b7d[680],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x9b7d[681],"\x61\x6C\x69\x61\x73":_0x9b7d[681],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x9b7d[682],"\x61\x6C\x69\x61\x73":_0x9b7d[682],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x9b7d[683],"\x61\x6C\x69\x61\x73":_0x9b7d[683],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x9b7d[684],"\x61\x6C\x69\x61\x73":_0x9b7d[684],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x9b7d[516],"\x61\x6C\x69\x61\x73":_0x9b7d[516],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x9b7d[685],"\x61\x6C\x69\x61\x73":_0x9b7d[685],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x9b7d[516],"\x61\x6C\x69\x61\x73":_0x9b7d[516],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x9b7d[686],"\x61\x6C\x69\x61\x73":_0x9b7d[687],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x9b7d[681],"\x61\x6C\x69\x61\x73":_0x9b7d[681],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x66\x6F\x72\x6D\x61\x74":_0x9b7d[672],"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x9b7d[168],"\x61\x6C\x69\x61\x73":_0x9b7d[688],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x9b7d[525],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x9b7d[689],"\x61\x6C\x69\x61\x73":_0x9b7d[690],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x66\x6F\x72\x6D\x61\x74":_0x9b7d[615],"\x63\x75\x73\x74\x6F\x6D":1}],{ignoreDuplicates:true,individualHooks:true})})[_0x9b7d[6]](function(){console[_0x9b7d[5]](_0x9b7d[461])})[_0x9b7d[166]](function(_0x1634x5){console[_0x9b7d[5]](_0x9b7d[460],_0x1634x5)});models[_0x9b7d[700]][_0x9b7d[69]]([{id:1,name:_0x9b7d[699],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x9b7d[6]](function(){console[_0x9b7d[5]](_0x9b7d[294])});models[_0x9b7d[723]][_0x9b7d[692]]({where:{context:_0x9b7d[241]}})[_0x9b7d[6]](function(){models[_0x9b7d[723]][_0x9b7d[69]]([{context:_0x9b7d[241],exten:_0x9b7d[702],priority:1,app:_0x9b7d[703],appdata:_0x9b7d[704],type:_0x9b7d[705]},{context:_0x9b7d[241],exten:_0x9b7d[702],priority:2,app:_0x9b7d[703],appdata:_0x9b7d[706],type:_0x9b7d[705]},{context:_0x9b7d[241],exten:_0x9b7d[702],priority:3,app:_0x9b7d[707],appdata:_0x9b7d[708],type:_0x9b7d[705]},{context:_0x9b7d[241],exten:_0x9b7d[702],priority:4,app:_0x9b7d[709],appdata:_0x9b7d[356],type:_0x9b7d[705]},{context:_0x9b7d[241],exten:_0x9b7d[702],priority:5,app:_0x9b7d[710],appdata:_0x9b7d[711],type:_0x9b7d[705]},{context:_0x9b7d[241],exten:_0x9b7d[702],priority:6,app:_0x9b7d[707],appdata:_0x9b7d[712],type:_0x9b7d[705]},{context:_0x9b7d[241],exten:_0x9b7d[702],priority:7,app:_0x9b7d[707],appdata:_0x9b7d[713],type:_0x9b7d[705]},{context:_0x9b7d[241],exten:_0x9b7d[702],priority:8,app:_0x9b7d[707],appdata:_0x9b7d[714],type:_0x9b7d[705]},{context:_0x9b7d[241],exten:_0x9b7d[702],priority:9,app:_0x9b7d[707],appdata:_0x9b7d[715],type:_0x9b7d[705]},{context:_0x9b7d[241],exten:_0x9b7d[702],priority:10,app:_0x9b7d[707],appdata:_0x9b7d[716],type:_0x9b7d[705]},{context:_0x9b7d[241],exten:_0x9b7d[702],priority:11,app:_0x9b7d[707],appdata:_0x9b7d[717],type:_0x9b7d[705]},{context:_0x9b7d[241],exten:_0x9b7d[702],priority:12,app:_0x9b7d[707],appdata:_0x9b7d[718],type:_0x9b7d[705]},{context:_0x9b7d[241],exten:_0x9b7d[702],priority:13,app:_0x9b7d[707],appdata:_0x9b7d[719],type:_0x9b7d[705]},{context:_0x9b7d[241],exten:_0x9b7d[702],priority:14,app:_0x9b7d[720],appdata:_0x9b7d[721],type:_0x9b7d[705]},{context:_0x9b7d[241],exten:_0x9b7d[702],priority:15,app:_0x9b7d[722],appdata:_0x9b7d[356],type:_0x9b7d[705]}],{ignoreDuplicates:true,individualHooks:true})})[_0x9b7d[6]](function(){console[_0x9b7d[5]](_0x9b7d[701])});models[_0x9b7d[70]][_0x9b7d[176]]({include:[{model:models[_0x9b7d[723]],as:_0x9b7d[730],where:{app:_0x9b7d[731]}}]})[_0x9b7d[6]](function(_0x1634xa){console[_0x9b7d[5]](_0x9b7d[724]);var _0x1634x1d=[];_[_0x9b7d[175]](_0x1634xa,function(_0x1634x1e){_[_0x9b7d[175]](_0x1634x1e.UserExtensions,function(_0x1634x1f){_0x1634x1f[_0x9b7d[725]]= _0x9b7d[726]+ _0x1634x1e[_0x9b7d[727]]+ _0x9b7d[728];_0x1634x1d[_0x9b7d[173]](_0x1634x1f[_0x9b7d[729]]())})});return _0x1634x1d})[_0x9b7d[19]]()[_0x9b7d[166]](function(_0x1634x5){console[_0x9b7d[5]](_0x1634x5)})
\ No newline at end of file
diff --git a/server/config/seedp.js b/server/config/seedp.js
index 0e64ba1..9cc0ed2 100644
--- a/server/config/seedp.js
+++ b/server/config/seedp.js
@@ -1,8017 +1 @@
-/**
- * Populate DB with sample data on server start
- * to disable, edit config/environment/index.js, and set `seedDB: false`
- */
-
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-
-var models = require('../models');
-var sequelize = require('../models').sequelize;
-
-var _agents = [];
-var _voiceQueues = [];
-var _mailQueues = [];
-var _chatQueues = [];
-var _miller, _doe;
-var _setting;
-
-
-return models.Setting
-  .findOrCreate({
-    where: {
-      id: 1
-    },
-    defaults: {
-      id: 1,
-      min_internal: 1000,
-      min_mailbox: 1000,
-      agi_port: 4573,
-      automation_timeout: 3600,
-      soundPath: '/var/opt/motion/server/files/sounds/converted'
-    }
-  })
-  .spread(function(setting) {
-    console.log(util.format('Populating Setting - DONE '));
-    return setting;
-  })
-  .then(function(setting) {
-    _setting = setting
-    if (_setting.firstSetup) {
-      models.User
-        .bulkCreate([{
-          role: 'admin',
-          fullname: 'Administrator',
-          email: [email-masked]',
-          name: 'admin',
-          password: 'password',
-          defaultuser: 'admin',
-          internal: 1000
-        }], {
-          ignoreDuplicates: true,
-          individualHooks: true
-        })
-        .then(function(users) {
-          console.log(util.format('Populating Users: %s - DONE ', _.map(users, 'name').join()));
-          return models.Team
-            .create({
-              name: "Default Team",
-              description: "Default Team",
-              defaultEntry: true,
-              Users: [{
-                role: 'agent',
-                fullname: 'John Doe',
-                email: [email-masked]',
-                name: 'john.doe',
-                password: 'shuttle55',
-                defaultuser: 'john.doe',
-                internal: 1001
-              }, {
-                role: 'agent',
-                fullname: 'Jane Miller',
-                email: [email-masked]',
-                name: 'jane.miller',
-                password: 'shuttle55',
-                defaultuser: 'jane.miller',
-                internal: 1002
-              }]
-            }, {
-              include: [{
-                model: models.User
-              }]
-            });
-        })
-        .then(function(team) {
-          _agents = team.Users;
-
-          console.log(util.format('Populating Agents: %s - DONE ', _.map(team.Users, 'name').join()));
-          console.log(util.format('Populating Teams: %s - DONE ', team.name));
-
-          return models.VoiceQueue
-            .bulkCreate([{
-              name: 'Sales',
-              musiconhold: 'default',
-              strategy: 'rrmemory'
-            }, {
-              name: 'Support',
-              musiconhold: 'default',
-              strategy: 'ringall'
-            }], {
-              ignoreDuplicates: true,
-              individualHooks: true
-            });
-        })
-        .then(function(voiceQueues) {
-          console.log(util.format('Populating Voice Queues: %s - DONE ', _.map(voiceQueues, 'name').join()));
-          _voiceQueues = voiceQueues;
-
-          _miller = _.find(_agents, {
-            name: 'jane.miller'
-          });
-          _doe = _.find(_agents, {
-            name: 'john.doe'
-          });
-
-          return _voiceQueues[0]
-            .addUser(_miller.id);
-        })
-        .then(function() {
-          return _voiceQueues[1]
-            .addUsers([_miller.id, _doe.id]);
-        })
-        .then(function() {
-          return models.MailQueue
-            .bulkCreate([{
-              name: 'Sales',
-              timeout: 5,
-              strategy: 'rrmemory'
-            }, {
-              name: 'Support',
-              timeout: 5,
-              strategy: 'beepall'
-            }], {
-              ignoreDuplicates: true,
-              individualHooks: true
-            });
-        })
-        .then(function(mailQueues) {
-          console.log(util.format('Populating Mail Queues: %s - DONE ', _.map(mailQueues, 'name').join()));
-          _mailQueues = mailQueues;
-
-          return _mailQueues[0]
-            .addUser(_miller.id);
-        })
-        .then(function() {
-          return _mailQueues[1]
-            .addUsers([_miller.id, _doe.id]);
-        })
-        .then(function() {
-          return models.ChatQueue
-            .bulkCreate([{
-              name: 'Sales',
-              timeout: 5,
-              strategy: 'rrmemory'
-            }, {
-              name: 'Support',
-              timeout: 5,
-              strategy: 'beepall'
-            }], {
-              ignoreDuplicates: true,
-              individualHooks: true
-            });
-        })
-        .then(function(chatQueues) {
-          console.log(util.format('Populating Mail Queues: %s - DONE ', _.map(chatQueues, 'name').join()));
-          _chatQueues = chatQueues;
-
-          return _chatQueues[0]
-            .addUser(_miller.id);
-        })
-        .then(function() {
-          return _chatQueues[1]
-            .addUsers([_miller.id, _doe.id]);
-        })
-        .catch(function(err) {
-          console.log(err);
-        });
-
-      models.ChanSpy
-        .bulkCreate([{
-          name: 'ChanSpy1',
-          prefix: 'spy1',
-          description: 'The supervisor can listen and talk to the agent. The customer will not listen to the supervisor voice.',
-          options: 'bw'
-        }, {
-          name: 'ChanSpy2',
-          prefix: 'spy2',
-          description: 'The supervisor can only listen the agent channel (neither the agent nor the customer will listen to the supervisor voice.',
-          options: 'bo'
-        }, {
-          name: 'ChanSpy3',
-          prefix: 'spy3',
-          description: 'The supervisor can listen and talk both to the agent and to the customer, like a pure 3 way conference room.',
-          options: 'bW'
-        }], {
-          ignoreDuplicates: true,
-          individualHooks: true
-        })
-        .then(function(chanSpys) {
-          console.log(util.format('Populating ChanSpy: %s - DONE ', _.map(chanSpys, 'name').join()));
-        });
-
-      models.List
-        .create({
-          name: 'System List',
-          description: 'Default List',
-          defaultEntry: true
-        })
-        .then(function(list) {
-          console.log(util.format('Populating CM List: %s - DONE ', list.name));
-        });
-
-      models.VoiceMusicOnHold
-        .create({
-          name: 'default',
-          directory: '/var/lib/asterisk/moh/',
-          mode: 'files',
-          sort: 'random',
-          format: 'wav',
-          defaultEntry: true
-        })
-        .then(function(voiceMusicOnHold) {
-          console.log(util.format('Populating Voice Music On Hold: %s - DONE ', voiceMusicOnHold.name));
-        });
-
-      models.Variable
-        .bulkCreate([{
-          name: 'CHOICE'
-        }, {
-          description: 'Order number',
-          name: 'ORDERNUM'
-        }, {
-          description: 'Data Base Query Result',
-          name: 'DBRESULT'
-        }, {
-          name: 'RATE'
-        }], {
-          ignoreDuplicates: true,
-          individualHooks: true
-        })
-        .then(function(variables) {
-          console.log(util.format('Populating Variables: %s - DONE ', _.map(variables, 'name').join()));
-        });
-
-      models.Pause
-        .bulkCreate([{
-          name: 'BACKOFFICE'
-        }, {
-          name: 'AFTERCALL'
-        }], {
-          ignoreDuplicates: true,
-          individualHooks: true
-        })
-        .then(function(pauses) {
-          console.log(util.format('Populating Pauses: %s - DONE ', _.map(pauses, 'name').join()));
-        });
-
-      models.Trunk
-        .create({
-          name: 'DemoTrunk',
-          context: 'from-voip-provider',
-          callingpres: 'ALLOWED_NOT_SCREENED',
-          deny: '0.0.0.0/0.0.0.0',
-          permit: '0.0.0.0/0.0.0.0',
-          secret: '55xcally55'
-        })
-        .then(function(trunk) {
-          console.log(util.format('Populating Trunk: %s - DONE ', trunk.name));
-        });
-
-      models.VoiceExtension
-        .create({
-          context: 'from-sip',
-          exten: '_600',
-          priority: '1',
-          app: 'NoOp',
-          appdata: 'Internal Call',
-          type: 'internal',
-          description: 'Echo Test',
-          Applications: [{
-            context: 'from-sip',
-            exten: '_600',
-            priority: '2',
-            app: 'Set',
-            appdata: 'CDR(type)=internal',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '3',
-            app: 'GotoIfTime',
-            appdata: '*,*,*,*?from-sip,${EXTEN},4:from-sip,${EXTEN},9',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '4',
-            app: 'NoOP',
-            appdata: 'Skipped CallerID Set',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '5',
-            app: 'NoOP',
-            appdata: 'Skipped MixMonitor',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '6',
-            app: 'NoOP',
-            appdata: 'Skipped Progress',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '7',
-            app: 'Playback',
-            appdata: 'demo-echotest',
-            type: 'internal',
-            interval: '*,*,*,*',
-            isApp: true
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '8',
-            app: 'NoOP',
-            appdata: 'Skipped StopMixMonitor',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '9',
-            app: 'NoOP',
-            appdata: 'Playback Application End',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '10',
-            app: 'GotoIfTime',
-            appdata: '*,*,*,*?from-sip,${EXTEN},11:from-sip,${EXTEN},16',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '11',
-            app: 'NoOP',
-            appdata: 'Skipped CallerID Set',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '12',
-            app: 'NoOP',
-            appdata: 'Skipped MixMonitor',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '13',
-            app: 'NoOP',
-            appdata: 'Skipped Progress',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '14',
-            app: 'Echo',
-            appdata: '',
-            type: 'internal',
-            interval: '*,*,*,*',
-            isApp: true
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '15',
-            app: 'NoOP',
-            appdata: 'Skipped StopMixMonitor',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '16',
-            app: 'NoOP',
-            appdata: 'Echo Application End',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '17',
-            app: 'GotoIfTime',
-            appdata: '*,*,*,*?from-sip,${EXTEN},18:from-sip,${EXTEN},23',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '18',
-            app: 'NoOP',
-            appdata: 'Skipped CallerID Set',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '19',
-            app: 'NoOP',
-            appdata: 'Skipped MixMonitor',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '20',
-            app: 'NoOP',
-            appdata: 'Skipped Progress',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '21',
-            app: 'Playback',
-            appdata: 'demo-echotest',
-            type: 'internal',
-            interval: '*,*,*,*',
-            isApp: true
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '22',
-            app: 'NoOP',
-            appdata: 'Skipped StopMixMonitor',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_600',
-            priority: '23',
-            app: 'NoOP',
-            appdata: 'Playback Application End',
-            type: 'internal'
-          }]
-        }, {
-          include: [{
-            model: models.VoiceExtension,
-            as: 'Applications'
-          }]
-        })
-        .then(function(voiceExtension) {
-          console.log(util.format('Populating Voice Extension: %s %s - DONE ', voiceExtension.context, voiceExtension.exten));
-        });
-
-      models.VoiceExtension
-        .create({
-          context: 'from-sip',
-          exten: '_6000',
-          priority: '1',
-          app: 'NoOp',
-          appdata: 'Internal Call',
-          type: 'internal',
-          description: 'Support Queue',
-          Applications: [{
-            context: 'from-sip',
-            exten: '_6000',
-            priority: '2',
-            app: 'Set',
-            appdata: 'CDR(type)=internal',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6000',
-            priority: '3',
-            app: 'GotoIfTime',
-            appdata: '*,*,*,*?from-sip,${EXTEN},4:from-sip,${EXTEN},9',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6000',
-            priority: '4',
-            app: 'NoOP',
-            appdata: 'Skipped CallerID Set',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6000',
-            priority: '5',
-            app: 'NoOP',
-            appdata: 'Skipped MixMonitor',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6000',
-            priority: '6',
-            app: 'Progress',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6000',
-            priority: '7',
-            app: 'Queue',
-            appdata: 'Support,,,,',
-            type: 'internal',
-            interval: '*,*,*,*',
-            isApp: true
-          }, {
-            context: 'from-sip',
-            exten: '_6000',
-            priority: '8',
-            app: 'NoOP',
-            appdata: 'Skipped StopMixMonitor',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6000',
-            priority: '9',
-            app: 'NoOP',
-            appdata: 'Queue Application End',
-            type: 'internal'
-          }]
-        }, {
-          include: [{
-            model: models.VoiceExtension,
-            as: 'Applications'
-          }]
-        })
-        .then(function(voiceExtension) {
-          console.log(util.format('Populating Voice Extension: %s %s - DONE ', voiceExtension.context, voiceExtension.exten));
-        });
-
-      models.VoiceExtension
-        .create({
-          context: 'from-sip',
-          exten: '_6666',
-          priority: '1',
-          app: 'NoOp',
-          appdata: 'Internal Call',
-          type: 'internal',
-          description: 'Support Queue',
-          Applications: [{
-            context: 'from-sip',
-            exten: '_6666',
-            priority: '2',
-            app: 'Set',
-            appdata: 'CDR(type)=internal',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6666',
-            priority: '3',
-            app: 'GotoIfTime',
-            appdata: '*,*,*,*?from-sip,${EXTEN},4:from-sip,${EXTEN},9',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6666',
-            priority: '4',
-            app: 'NoOP',
-            appdata: 'Skipped CallerID Set',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6666',
-            priority: '5',
-            app: 'NoOP',
-            appdata: 'Skipped MixMonitor',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6666',
-            priority: '6',
-            app: 'NoOP',
-            appdata: 'Skipped Progress',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6666',
-            priority: '7',
-            app: 'AGI',
-            appdata: 'agi://127.0.0.1/square,Auto Attendant',
-            type: 'internal',
-            interval: '*,*,*,*',
-            isApp: true
-          }, {
-            context: 'from-sip',
-            exten: '_6666',
-            priority: '8',
-            app: 'NoOP',
-            appdata: 'Skipped StopMixMonitor',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6666',
-            priority: '9',
-            app: 'NoOP',
-            appdata: 'AGI Application End',
-            type: 'internal'
-          }]
-        }, {
-          include: [{
-            model: models.VoiceExtension,
-            as: 'Applications'
-          }]
-        })
-        .then(function(voiceExtension) {
-          console.log(util.format('Populating Voice Extension: %s %s - DONE ', voiceExtension.context, voiceExtension.exten));
-        });
-
-      models.VoiceExtension
-        .create({
-          context: 'from-sip',
-          exten: '_6667',
-          priority: '1',
-          app: 'NoOp',
-          appdata: 'Internal Call',
-          type: 'internal',
-          description: 'Support Queue',
-          Applications: [{
-            context: 'from-sip',
-            exten: '_6667',
-            priority: '2',
-            app: 'Set',
-            appdata: 'CDR(type)=internal',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6667',
-            priority: '3',
-            app: 'GotoIfTime',
-            appdata: '*,*,*,*?from-sip,${EXTEN},4:from-sip,${EXTEN},9',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6667',
-            priority: '4',
-            app: 'NoOP',
-            appdata: 'Skipped CallerID Set',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6667',
-            priority: '5',
-            app: 'NoOP',
-            appdata: 'Skipped MixMonitor',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6667',
-            priority: '6',
-            app: 'NoOP',
-            appdata: 'Skipped Progress',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6667',
-            priority: '7',
-            app: 'AGI',
-            appdata: 'agi://127.0.0.1/square,Orders',
-            type: 'internal',
-            interval: '*,*,*,*',
-            isApp: true
-          }, {
-            context: 'from-sip',
-            exten: '_6667',
-            priority: '8',
-            app: 'NoOP',
-            appdata: 'Skipped StopMixMonitor',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6667',
-            priority: '9',
-            app: 'NoOP',
-            appdata: 'AGI Application End',
-            type: 'internal'
-          }]
-        }, {
-          include: [{
-            model: models.VoiceExtension,
-            as: 'Applications'
-          }]
-        })
-        .then(function(voiceExtension) {
-          console.log(util.format('Populating Voice Extension: %s %s - DONE ', voiceExtension.context, voiceExtension.exten));
-        });
-
-      models.VoiceExtension
-        .create({
-          context: 'from-sip',
-          exten: '_6668',
-          priority: '1',
-          app: 'NoOp',
-          appdata: 'Internal Call',
-          type: 'internal',
-          description: 'Support Queue',
-          Applications: [{
-            context: 'from-sip',
-            exten: '_6668',
-            priority: '2',
-            app: 'Set',
-            appdata: 'CDR(type)=internal',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6668',
-            priority: '3',
-            app: 'GotoIfTime',
-            appdata: '*,*,*,*?from-sip,${EXTEN},4:from-sip,${EXTEN},9',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6668',
-            priority: '4',
-            app: 'NoOP',
-            appdata: 'Skipped CallerID Set',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6668',
-            priority: '5',
-            app: 'NoOP',
-            appdata: 'Skipped MixMonitor',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6668',
-            priority: '6',
-            app: 'NoOP',
-            appdata: 'Skipped Progress',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6668',
-            priority: '7',
-            app: 'AGI',
-            appdata: 'agi://127.0.0.1/square,CSI',
-            type: 'internal',
-            interval: '*,*,*,*',
-            isApp: true
-          }, {
-            context: 'from-sip',
-            exten: '_6668',
-            priority: '8',
-            app: 'NoOP',
-            appdata: 'Skipped StopMixMonitor',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6668',
-            priority: '9',
-            app: 'NoOP',
-            appdata: 'AGI Application End',
-            type: 'internal'
-          }]
-        }, {
-          include: [{
-            model: models.VoiceExtension,
-            as: 'Applications'
-          }]
-        })
-        .then(function(voiceExtension) {
-          console.log(util.format('Populating Voice Extension: %s %s - DONE ', voiceExtension.context, voiceExtension.exten));
-        });
-
-      models.VoiceExtension
-        .create({
-          context: 'from-sip',
-          exten: '_X.',
-          priority: '1',
-          app: 'NoOp',
-          appdata: 'Outbound Call',
-          type: 'outbound',
-          description: 'Outbound Call',
-          Applications: [{
-            context: 'from-sip',
-            exten: '_X.',
-            priority: '2',
-            app: 'Set',
-            appdata: 'CDR(type)=outbound',
-            type: 'outbound'
-          }, {
-            context: 'from-sip',
-            exten: '_X.',
-            priority: '3',
-            app: 'Set',
-            appdata: 'CDR(tag)=--',
-            type: 'outbound'
-          }, {
-            context: 'from-sip',
-            exten: '_X.',
-            priority: '4',
-            app: 'GotoIfTime',
-            appdata: '*,*,*,*?from-sip,${EXTEN},5:from-sip,${EXTEN},10',
-            type: 'outbound'
-          }, {
-            context: 'from-sip',
-            exten: '_X.',
-            priority: '5',
-            app: 'NoOP',
-            appdata: 'Skipped CallerID Set',
-            type: 'outbound'
-          }, {
-            context: 'from-sip',
-            exten: '_X.',
-            priority: '6',
-            app: 'NoOP',
-            appdata: 'Skipped MixMonitor',
-            type: 'outbound'
-          }, {
-            context: 'from-sip',
-            exten: '_X.',
-            priority: '7',
-            app: 'NoOP',
-            appdata: 'Skipped Progress',
-            type: 'outbound'
-          }, {
-            context: 'from-sip',
-            exten: '_X.',
-            priority: '8',
-            app: 'Dial',
-            appdata: 'SIP/Demo Trunk/${EXTEN:0}',
-            type: 'outbound',
-            interval: '*,*,*,*',
-            isApp: true
-          }, {
-            context: 'from-sip',
-            exten: '_X.',
-            priority: '9',
-            app: 'NoOP',
-            appdata: 'Skipped StopMixMonitor',
-            type: 'outbound'
-          }, {
-            context: 'from-sip',
-            exten: '_X.',
-            priority: '10',
-            app: 'NoOP',
-            appdata: 'Dial Application End',
-            type: 'outbound'
-          }]
-        }, {
-          include: [{
-            model: models.VoiceExtension,
-            as: 'Applications'
-          }]
-        })
-        .then(function(voiceExtension) {
-          console.log(util.format('Populating Voice Extension: %s %s - DONE ', voiceExtension.context, voiceExtension.exten));
-        });
-
-      models.VoiceExtension
-        .create({
-          context: 'from-sip',
-          exten: '_6001',
-          priority: '1',
-          app: 'NoOp',
-          appdata: 'Internal Call',
-          type: 'internal',
-          description: 'Sales Queue',
-          Applications: [{
-            context: 'from-sip',
-            exten: '_6001',
-            priority: '2',
-            app: 'Set',
-            appdata: 'CDR(type)=internal',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6001',
-            priority: '3',
-            app: 'GotoIfTime',
-            appdata: '*,*,*,*?from-sip,${EXTEN},4:from-sip,${EXTEN},9',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6001',
-            priority: '4',
-            app: 'NoOP',
-            appdata: 'Skipped CallerID Set',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6001',
-            priority: '5',
-            app: 'NoOP',
-            appdata: 'Skipped MixMonitor',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6001',
-            priority: '6',
-            app: 'Progress',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6001',
-            priority: '7',
-            app: 'Queue',
-            appdata: 'Sales,,,,',
-            type: 'internal',
-            interval: '*,*,*,*',
-            isApp: true
-          }, {
-            context: 'from-sip',
-            exten: '_6001',
-            priority: '8',
-            app: 'NoOP',
-            appdata: 'Skipped StopMixMonitor',
-            type: 'internal'
-          }, {
-            context: 'from-sip',
-            exten: '_6001',
-            priority: '9',
-            app: 'NoOP',
-            appdata: 'Queue Application End',
-            type: 'internal'
-          }]
-        }, {
-          include: [{
-            model: models.VoiceExtension,
-            as: 'Applications'
-          }]
-        })
-        .then(function(voiceExtension) {
-          console.log(util.format('Populating Voice Extension: %s %s - DONE ', voiceExtension.context, voiceExtension.exten));
-        });
-
-      models.SquareProject
-        .bulkCreate([{
-          "name": "Auto Attendant",
-          "description": "IVR SAMPLE 1",
-          "preproduction": "<mxGraphModel grid=\"1\" guides=\"1\" tooltips=\"1\" connect=\"1\" fold=\"1\" page=\"0\" pageScale=\"1\" pageWidth=\"826\" pageHeight=\"1169\">\n <root>\n  <mxCell id=\"0\"/>\n  <mxCell id=\"1\" parent=\"0\"/>\n  <menu label=\"Menu\" file_id=\"1\" response=\"5\" digit=\"1\" retry=\"2\" variable_id=\"1\" id=\"3\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/playback/menu_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"130\" y=\"150\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </menu>\n  <queue label=\"Queue Sales\" queue_id=\"1\" opts=\"\" url=\"\" file_id=\"0\" timeout=\"300\" agi=\"\" macro=\"\" gosub=\"\" position=\"\" id=\"5\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/call_management/queue_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"470\" y=\"9.999999999999993\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </queue>\n  <queue label=\"Queue Support\" queue_id=\"2\" opts=\"\" url=\"\" file_id=\"0\" timeout=\"300\" agi=\"\" macro=\"\" gosub=\"\" position=\"\" id=\"6\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/call_management/queue_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"540\" y=\"149.99999999999997\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </queue>\n  <dial label=\"Internal Dial John Doe\" sip_id=\"1\" timeout=\"60\" opts=\"\" url=\"\" id=\"7\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/call_management/dial_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"470\" y=\"310\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </dial>\n  <mxCell id=\"8\" value=\"1\" parent=\"1\" source=\"3\" target=\"5\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <mxCell id=\"9\" value=\"2\" parent=\"1\" source=\"3\" target=\"6\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <noop label=\"NoOp choice view\" output=\"Choice: {CHOICE}\" id=\"11\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/general/noop_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"300\" y=\"310\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </noop>\n  <end label=\"End\" id=\"15\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/entry/end_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"720\" y=\"150\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </end>\n  <mxCell id=\"16\" value=\"3\" parent=\"1\" source=\"3\" target=\"11\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <mxCell id=\"17\" parent=\"1\" source=\"5\" target=\"15\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <mxCell id=\"18\" parent=\"1\" source=\"6\" target=\"15\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <mxCell id=\"19\" parent=\"1\" source=\"7\" target=\"15\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <mxCell id=\"20\" parent=\"1\" source=\"11\" target=\"7\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <start label=\"Start\" answer=\"yes\" id=\"21\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/entry/start_128x128.png\" vertex=\"1\" parent=\"1\">\n      <mxGeometry x=\"30\" y=\"150\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </start>\n  <mxCell id=\"22\" edge=\"1\" parent=\"1\" source=\"21\" target=\"3\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n </root>\n </mxGraphModel>",
-          "production": "<mxGraphModel grid=\"1\" guides=\"1\" tooltips=\"1\" connect=\"1\" fold=\"1\" page=\"0\" pageScale=\"1\" pageWidth=\"826\" pageHeight=\"1169\">\n <root>\n  <mxCell id=\"0\"/>\n  <mxCell id=\"1\" parent=\"0\"/>\n  <menu label=\"Menu\" file_id=\"1\" response=\"5\" digit=\"1\" retry=\"2\" variable_id=\"1\" id=\"3\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/playback/menu_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"130\" y=\"150\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </menu>\n  <queue label=\"Queue Sales\" queue_id=\"1\" opts=\"\" url=\"\" file_id=\"0\" timeout=\"300\" agi=\"\" macro=\"\" gosub=\"\" position=\"\" id=\"5\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/call_management/queue_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"470\" y=\"9.999999999999993\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </queue>\n  <queue label=\"Queue Support\" queue_id=\"2\" opts=\"\" url=\"\" file_id=\"0\" timeout=\"300\" agi=\"\" macro=\"\" gosub=\"\" position=\"\" id=\"6\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/call_management/queue_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"540\" y=\"149.99999999999997\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </queue>\n  <dial label=\"Internal Dial John Doe\" sip_id=\"1\" timeout=\"60\" opts=\"\" url=\"\" id=\"7\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/call_management/dial_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"470\" y=\"310\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </dial>\n  <mxCell id=\"8\" value=\"1\" parent=\"1\" source=\"3\" target=\"5\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <mxCell id=\"9\" value=\"2\" parent=\"1\" source=\"3\" target=\"6\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <noop label=\"NoOp choice view\" output=\"Choice: {CHOICE}\" id=\"11\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/general/noop_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"300\" y=\"310\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </noop>\n  <end label=\"End\" id=\"15\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/entry/end_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"720\" y=\"150\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </end>\n  <mxCell id=\"16\" value=\"3\" parent=\"1\" source=\"3\" target=\"11\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <mxCell id=\"17\" parent=\"1\" source=\"5\" target=\"15\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <mxCell id=\"18\" parent=\"1\" source=\"6\" target=\"15\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <mxCell id=\"19\" parent=\"1\" source=\"7\" target=\"15\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <mxCell id=\"20\" parent=\"1\" source=\"11\" target=\"7\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <start label=\"Start\" answer=\"yes\" id=\"21\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/entry/start_128x128.png\" vertex=\"1\" parent=\"1\">\n      <mxGeometry x=\"30\" y=\"150\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </start>\n  <mxCell id=\"22\" edge=\"1\" parent=\"1\" source=\"21\" target=\"3\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n </root>\n </mxGraphModel>"
-        }, {
-          "name": "CSI",
-          "description": "Customer Satisfaction Index example",
-          "preproduction": "<mxGraphModel grid=\"1\" guides=\"1\" tooltips=\"1\" connect=\"1\" fold=\"1\" page=\"0\" pageScale=\"1\" pageWidth=\"826\" pageHeight=\"1169\">\n <root>\n  <mxCell id=\"0\"/>\n  <mxCell id=\"1\" parent=\"0\"/>\n  <queue label=\"Queue OPTION C to continue\" queue_id=\"2\" opts=\"c\" url=\"\" file_id=\"0\" timeout=\"10\" agi=\"\" macro=\"\" gosub=\"\" position=\"\" id=\"3\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/call_management/queue_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"260\" y=\"110\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </queue>\n  <subproject label=\"SubProject Survey\" project_id=\"4\" id=\"5\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/general/subproject_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"430\" y=\"110\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </subproject>\n  <mxCell id=\"6\" parent=\"1\" source=\"3\" target=\"5\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <end label=\"End\" id=\"7\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/entry/end_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"600\" y=\"110\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </end>\n  <mxCell id=\"8\" parent=\"1\" source=\"5\" target=\"7\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <start label=\"Start\" answer=\"yes\" id=\"10\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/entry/start_128x128.png\" vertex=\"1\" parent=\"1\">\n      <mxGeometry x=\"90\" y=\"110\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </start>\n  <mxCell id=\"11\" edge=\"1\" parent=\"1\" source=\"10\" target=\"3\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n </root>\n </mxGraphModel>",
-          "production": "<mxGraphModel grid=\"1\" guides=\"1\" tooltips=\"1\" connect=\"1\" fold=\"1\" page=\"0\" pageScale=\"1\" pageWidth=\"826\" pageHeight=\"1169\">\n <root>\n  <mxCell id=\"0\"/>\n  <mxCell id=\"1\" parent=\"0\"/>\n  <queue label=\"Queue OPTION C to continue\" queue_id=\"2\" opts=\"c\" url=\"\" file_id=\"0\" timeout=\"10\" agi=\"\" macro=\"\" gosub=\"\" position=\"\" id=\"3\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/call_management/queue_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"260\" y=\"110\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </queue>\n  <subproject label=\"SubProject Survey\" project_id=\"4\" id=\"5\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/general/subproject_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"430\" y=\"110\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </subproject>\n  <mxCell id=\"6\" parent=\"1\" source=\"3\" target=\"5\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <end label=\"End\" id=\"7\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/entry/end_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"600\" y=\"110\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </end>\n  <mxCell id=\"8\" parent=\"1\" source=\"5\" target=\"7\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <start label=\"Start\" answer=\"yes\" id=\"10\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/entry/start_128x128.png\" vertex=\"1\" parent=\"1\">\n      <mxGeometry x=\"90\" y=\"110\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </start>\n  <mxCell id=\"11\" edge=\"1\" parent=\"1\" source=\"10\" target=\"3\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n </root>\n </mxGraphModel>"
-        }, {
-          "name": "Orders",
-          "description": "Order DB IVR Sample",
-          "preproduction": "<mxGraphModel grid=\"1\" guides=\"1\" tooltips=\"1\" connect=\"1\" fold=\"1\" page=\"0\" pageScale=\"1\" pageWidth=\"826\" pageHeight=\"1169\">\n <root>\n  <mxCell id=\"0\"/>\n  <mxCell id=\"1\" parent=\"0\"/>\n  <menu label=\"Menu\" file_id=\"2\" response=\"5\" digit=\"5\" retry=\"1\" variable_id=\"2\" id=\"4\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/playback/menu_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"250\" y=\"110\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </menu>\n  <noop label=\"NoOp Debug ORDERNUM\" output=\"ORDER NUMBER: {ORDERNUM}\" id=\"6\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/general/noop_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"400\" y=\"109.56782713085232\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </noop>\n  <mxCell id=\"7\" value=\"-\" parent=\"1\" source=\"4\" target=\"6\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <gotoif label=\"GotoIf\" condition=\"{DBRESULT} == 1\" id=\"10\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/callflow/gotoif_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"730\" y=\"109.56782713085231\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </gotoif>\n  <playback label=\"Playback Order shipped\" file_id=\"3\" skip=\"0\" noanswer=\"0\" id=\"12\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/playback/playback_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"1010\" y=\"50\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </playback>\n  <mxCell id=\"13\" value=\"true\" parent=\"1\" source=\"10\" target=\"12\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <playback label=\"Playback Order on elaboration\" file_id=\"4\" skip=\"0\" noanswer=\"0\" id=\"14\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/playback/playback_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"1010\" y=\"189.56782713085232\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </playback>\n  <mxCell id=\"15\" value=\"false\" parent=\"1\" source=\"10\" target=\"14\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <hangup label=\"Hangup\" id=\"16\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/call_management/hangup_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"1180\" y=\"109.5678271308523\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </hangup>\n  <mxCell id=\"17\" parent=\"1\" source=\"12\" target=\"16\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <mxCell id=\"18\" parent=\"1\" source=\"14\" target=\"16\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <start label=\"Start\" answer=\"yes\" id=\"19\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/entry/start_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"100\" y=\"110\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </start>\n  <mxCell id=\"20\" parent=\"1\" source=\"19\" target=\"4\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <database label=\"Database query EXAMPLE\" odbc_id=\"1\" query=\"SELECT status from orders WHERE id={ORDERNUM}\" variable_id=\"1\" id=\"21\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/integration_server/database_128x128.png\" vertex=\"1\" parent=\"1\">\n      <mxGeometry x=\"560\" y=\"110\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </database>\n  <mxCell id=\"22\" edge=\"1\" parent=\"1\" source=\"6\" target=\"21\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <mxCell id=\"23\" edge=\"1\" parent=\"1\" source=\"21\" target=\"10\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n </root>\n </mxGraphModel>",
-          "production": "<mxGraphModel grid=\"1\" guides=\"1\" tooltips=\"1\" connect=\"1\" fold=\"1\" page=\"0\" pageScale=\"1\" pageWidth=\"826\" pageHeight=\"1169\">\n <root>\n  <mxCell id=\"0\"/>\n  <mxCell id=\"1\" parent=\"0\"/>\n  <menu label=\"Menu\" file_id=\"2\" response=\"5\" digit=\"5\" retry=\"1\" variable_id=\"2\" id=\"4\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/playback/menu_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"250\" y=\"110\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </menu>\n  <noop label=\"NoOp Debug ORDERNUM\" output=\"ORDER NUMBER: {ORDERNUM}\" id=\"6\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/general/noop_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"400\" y=\"109.56782713085232\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </noop>\n  <mxCell id=\"7\" value=\"-\" parent=\"1\" source=\"4\" target=\"6\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <gotoif label=\"GotoIf\" condition=\"{DBRESULT} == 1\" id=\"10\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/callflow/gotoif_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"730\" y=\"109.56782713085231\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </gotoif>\n  <playback label=\"Playback Order shipped\" file_id=\"3\" skip=\"0\" noanswer=\"0\" id=\"12\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/playback/playback_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"1010\" y=\"50\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </playback>\n  <mxCell id=\"13\" value=\"true\" parent=\"1\" source=\"10\" target=\"12\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <playback label=\"Playback Order on elaboration\" file_id=\"4\" skip=\"0\" noanswer=\"0\" id=\"14\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/playback/playback_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"1010\" y=\"189.56782713085232\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </playback>\n  <mxCell id=\"15\" value=\"false\" parent=\"1\" source=\"10\" target=\"14\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <hangup label=\"Hangup\" id=\"16\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/call_management/hangup_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"1180\" y=\"109.5678271308523\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </hangup>\n  <mxCell id=\"17\" parent=\"1\" source=\"12\" target=\"16\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <mxCell id=\"18\" parent=\"1\" source=\"14\" target=\"16\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <start label=\"Start\" answer=\"yes\" id=\"19\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/entry/start_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"100\" y=\"110\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </start>\n  <mxCell id=\"20\" parent=\"1\" source=\"19\" target=\"4\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <database label=\"Database query EXAMPLE\" odbc_id=\"1\" query=\"SELECT status from orders WHERE id={ORDERNUM}\" variable_id=\"1\" id=\"21\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/integration_server/database_128x128.png\" vertex=\"1\" parent=\"1\">\n      <mxGeometry x=\"560\" y=\"110\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </database>\n  <mxCell id=\"22\" edge=\"1\" parent=\"1\" source=\"6\" target=\"21\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <mxCell id=\"23\" edge=\"1\" parent=\"1\" source=\"21\" target=\"10\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n </root>\n </mxGraphModel>"
-        }, {
-          "name": "Survey",
-          "description": "Survey IVR example",
-          "preproduction": "<mxGraphModel grid=\"1\" guides=\"1\" tooltips=\"1\" connect=\"1\" fold=\"1\" page=\"0\" pageScale=\"1\" pageWidth=\"826\" pageHeight=\"1169\">\n <root>\n  <mxCell id=\"0\"/>\n  <mxCell id=\"1\" parent=\"0\"/>\n  <start label=\"Start\" id=\"2\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/entry/start_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"70\" y=\"110\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </start>\n  <menu label=\"Menu\" file_id=\"5\" response=\"5\" digit=\"1\" retry=\"1\" variable_id=\"4\" id=\"3\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/playback/menu_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"222\" y=\"110\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </menu>\n  <mxCell id=\"4\" parent=\"1\" source=\"2\" target=\"3\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <noop label=\"NoOp\" output=\"\" id=\"5\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/general/noop_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"378.99999999999994\" y=\"110.13565426170464\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </noop>\n  <mxCell id=\"6\" value=\"1,2,3,4,5\" parent=\"1\" source=\"3\" target=\"5\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <hangup label=\"Hangup\" id=\"10\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/call_management/hangup_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"838\" y=\"110.13565426170464\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </hangup>\n  <playback label=\"Playback Thank you\" file_id=\"6\" skip=\"0\" noanswer=\"0\" id=\"13\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/playback/playback_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"520\" y=\"110.13565426170464\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </playback>\n  <mxCell id=\"14\" parent=\"1\" source=\"5\" target=\"13\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <database label=\"Database\" odbc_id=\"1\" query=\"INSERT INTO survey (agent, queue, result)&#xa;VALUES ({MEMBERINTERFACE}, {QUEUENAME}, {RATE})\" variable_id=\"1\" id=\"15\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/integration_server/database_128x128.png\" vertex=\"1\" parent=\"1\">\n      <mxGeometry x=\"680\" y=\"110.13565426170464\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </database>\n  <mxCell id=\"16\" edge=\"1\" parent=\"1\" source=\"13\" target=\"15\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <mxCell id=\"17\" edge=\"1\" parent=\"1\" source=\"15\" target=\"10\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n </root>\n </mxGraphModel>",
-          "production": "<mxGraphModel grid=\"1\" guides=\"1\" tooltips=\"1\" connect=\"1\" fold=\"1\" page=\"0\" pageScale=\"1\" pageWidth=\"826\" pageHeight=\"1169\">\n <root>\n  <mxCell id=\"0\"/>\n  <mxCell id=\"1\" parent=\"0\"/>\n  <start label=\"Start\" id=\"2\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/entry/start_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"70\" y=\"110\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </start>\n  <menu label=\"Menu\" file_id=\"5\" response=\"5\" digit=\"1\" retry=\"1\" variable_id=\"4\" id=\"3\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/playback/menu_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"222\" y=\"110\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </menu>\n  <mxCell id=\"4\" parent=\"1\" source=\"2\" target=\"3\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <noop label=\"NoOp\" output=\"\" id=\"5\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/general/noop_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"378.99999999999994\" y=\"110.13565426170464\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </noop>\n  <mxCell id=\"6\" value=\"1,2,3,4,5\" parent=\"1\" source=\"3\" target=\"5\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <hangup label=\"Hangup\" id=\"10\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/call_management/hangup_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"838\" y=\"110.13565426170464\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </hangup>\n  <playback label=\"Playback Thank you\" file_id=\"6\" skip=\"0\" noanswer=\"0\" id=\"13\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/playback/playback_128x128.png\" parent=\"1\" vertex=\"1\">\n      <mxGeometry x=\"520\" y=\"110.13565426170464\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </playback>\n  <mxCell id=\"14\" parent=\"1\" source=\"5\" target=\"13\" edge=\"1\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <database label=\"Database\" odbc_id=\"1\" query=\"INSERT INTO survey (agent, queue, result)&#xa;VALUES ({MEMBERINTERFACE}, {QUEUENAME}, {RATE})\" variable_id=\"1\" id=\"15\">\n    <mxCell style=\"image;image=/assets/plugins/square/stencils/integration_server/database_128x128.png\" vertex=\"1\" parent=\"1\">\n      <mxGeometry x=\"680\" y=\"110.13565426170464\" width=\"80\" height=\"80\" as=\"geometry\"/>\n    </mxCell>\n  </database>\n  <mxCell id=\"16\" edge=\"1\" parent=\"1\" source=\"13\" target=\"15\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n  <mxCell id=\"17\" edge=\"1\" parent=\"1\" source=\"15\" target=\"10\">\n    <mxGeometry relative=\"1\" as=\"geometry\"/>\n  </mxCell>\n </root>\n </mxGraphModel>"
-        }])
-        .then(function(projects) {
-          console.log(util.format('Populating Square Project: %s - DONE ', _.map(projects, 'name').join()));
-        });
-
-      models.SquareOdbc
-        .create({
-          name: 'xcally',
-          dsn: 'DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=xC@LL1234;DATABASE=motion'
-        })
-        .then(function(squareOdbc) {
-          console.log(util.format('Populating Square ODBC: %s - DONE ', squareOdbc.name));
-        });
-
-      var newIntegrations = [{
-        name: 'Zendesk',
-        version: '1.0.0',
-        author: 'XeniaLAB s.r.l.',
-        logo: 'assets/images/media/zendesk2.png',
-        state: 'zendesk',
-        description: 'Start using xCALLY - Zendesk integration: Auto-Generated Tickets, fully customizable comments, Custom Fields management, Tag support and Simple Setup',
-        link: 'https://wiki.xcallymotion.com/display/XMD/Zendesk+integration'
-      }, {
-        name: 'Salesforce',
-        version: '1.0.0',
-        author: 'XeniaLAB s.r.l.',
-        logo: 'assets/images/media/salesforce2.png',
-        state: 'salesforce',
-        description: 'Start using xCALLY - Salesforce integration: Auto-Generated Tasks, fully customizable comments, Custom Fields management and OpenCTI support',
-        link: 'https://wiki.xcallymotion.com/display/XMD/Salesforce+integration'
-      }, {
-        name: 'iFrame',
-        version: '1.0.0',
-        author: 'XeniaLAB s.r.l.',
-        logo: 'assets/images/media/iframe.png',
-        state: 'iframe',
-        description: 'Start using iFrame integration: enable your agents to view external pages (like your CRM) directly from Motion GUI',
-        link: 'https://wiki.xcallymotion.com/display/XMD/iFrame+Integration'
-      }];
-
-      models.Integration
-        .findAll()
-        .then(function(oldIntegrations) {
-          var bulkIntegrations = [];
-          oldIntegrations = _.map(oldIntegrations, 'state');
-          newIntegrations.forEach(function(integration) {
-            if (_.includes(oldIntegrations, integration.state)) {
-              bulkIntegrations.push(models.Integration.update(integration, {
-                where: {
-                  state: integration.state
-                }
-              }));
-            } else {
-              bulkIntegrations.push(models.Integration.create(integration));
-            }
-          });
-          return bulkIntegrations;
-        })
-        .all()
-        .then(function() {
-          console.log('Finished populating integrations');
-        })
-        .catch(function(err) {
-          console.log('Error populating integrations:', err);
-        });
-
-      models.Company
-        .bulkCreate([{
-          name: 'Acme',
-          type: 'ltd',
-          street: 'Acme Sreet',
-        }, {
-          name: 'Xenialab',
-          type: 'srl',
-          street: 'C.so Vittorio Emanuele II, 111',
-          postalCode: '10128',
-          country: 'Italy',
-          city: 'Turin',
-          vat: '09668910012',
-          website: 'http://www.xenialab.com/',
-          phone: '+39 011.19886500',
-          fax: '+39 011.0960070',
-          email: [email-masked]'
-        }])
-        .then(function(companies) {
-          console.log(util.format('Populating Companies: %s - DONE ', _.map(companies, 'name').join()));
-        });
-
-      models.Dashboard
-        .destroy({
-          where: {
-            defaultEntry: true
-          }
-        })
-        .then(function() {
-          return models.Dashboard
-            .bulkCreate([{
-              name: 'Inbound Calls',
-              model: JSON.stringify({
-                "title": "Voice Inbound",
-                "rows": [{
-                  "columns": [{
-                    "styleClass": "col-md-3",
-                    "widgets": [{
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "blue-madison",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "report": "report_queue_history",
-                        "condition": "queuecallerabandon=0 AND queuecallercomplete=0 AND queuecallerexit=0 AND queuecallerleaveAt is not null",
-                        "details": "Active Calls",
-                        "select": "COUNT(*)"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1454772532346-10"
-                    }, {
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "blue-madison",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "report": "report_queue_history",
-                        "condition": "queuecallercomplete=1",
-                        "details": "Total Answered",
-                        "select": "COUNT(*)"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1456841031111-8"
-                    }, {
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "blue-madison",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "ROUND(SUM(queuecallercomplete) / (SUM(queuecallercomplete)+SUM(queuecallerabandon)) *100,1)",
-                        "report": "report_queue_history",
-                        "condition": "1",
-                        "details": "Answer Rate(%)"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457270124802-4"
-                    }, {
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "blue-madison",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "SEC_TO_TIME(ROUND(AVG(talktime),0))",
-                        "report": "report_agent_history",
-                        "condition": "agentcomplete=1",
-                        "details": "Avg Talk Time"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457270214766-5"
-                    }, {
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "green-haze",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "ROUND(SUM(CASE WHEN queuecallercomplete=1 AND (UNIX_TIMESTAMP(queuecallerleaveAt)-UNIX_TIMESTAMP(queuecallerjoinAt) < 10) THEN 1 ELSE 0 END)/(SUM(queuecallercomplete) + SUM(CASE WHEN queuecallerabandon=1 AND (UNIX_TIMESTAMP(queuecallerleaveAt)-UNIX_TIMESTAMP(queuecallerjoinAt) > 10) THEN 1 ELSE 0 END)) *100,1)",
-                        "report": "report_queue_history",
-                        "condition": "1",
-                        "details": "Service Level 10 (%)"
-                      },
-                      "title": "SERVICE LEVEL",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457366965794-3"
-                    }],
-                    "cid": "1456841191661-21"
-                  }, {
-                    "styleClass": "col-md-3",
-                    "widgets": [{
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "red-intense",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "report": "report_queue_history",
-                        "condition": "queuecallerleaveAt IS NULL",
-                        "details": "Waiting Calls",
-                        "select": "COUNT(*)"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1456839870449-5"
-                    }, {
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "red-intense",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "report": "report_queue_history",
-                        "condition": "queuecallerabandon=1",
-                        "details": "Total Abandoned",
-                        "select": "COUNT(*)"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1456841244931-27"
-                    }, {
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "red-intense",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "ROUND(SUM(queuecallerabandon) / (SUM(queuecallercomplete)+SUM(queuecallerabandon)) *100,1)",
-                        "report": "report_queue_history",
-                        "condition": "1",
-                        "details": "Abandon Rate (%)"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457269033923-3"
-                    }, {
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "yellow-casablanca",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "SEC_TO_TIME(ROUND(AVG(holdtime),0))",
-                        "report": "report_agent_history",
-                        "condition": "agentcomplete=1",
-                        "details": "Avg Answer Time"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457270230324-8"
-                    }, {
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "condition": "1",
-                        "color": "green-haze",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "ROUND(SUM(CASE WHEN queuecallercomplete=1 AND (UNIX_TIMESTAMP(queuecallerleaveAt)-UNIX_TIMESTAMP(queuecallerjoinAt) < 15) THEN 1 ELSE 0 END)/(SUM(queuecallercomplete) + SUM(CASE WHEN queuecallerabandon=1 AND (UNIX_TIMESTAMP(queuecallerleaveAt)-UNIX_TIMESTAMP(queuecallerjoinAt) > 15) THEN 1 ELSE 0 END)) *100,1)",
-                        "report": "report_queue_history",
-                        "details": "Service Level 15 (%)"
-                      },
-                      "title": "SERVICE LEVEL 15",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457952734590-1"
-                    }],
-                    "cid": "1456841191662-22"
-                  }, {
-                    "styleClass": "col-md-3",
-                    "widgets": [{
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "blue-madison",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "SEC_TO_TIME(MAX(UNIX_TIMESTAMP()-UNIX_TIMESTAMP(queuecallerleaveAt)))",
-                        "report": "report_queue_history",
-                        "condition": "queuecallerabandon=0 AND queuecallercomplete=0 AND queuecallerexit=0 AND queuecallerleaveAt is not null",
-                        "details": "Longest Active Call"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457275258494-11"
-                    }, {
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "yellow-casablanca",
-                        "icon": "fa-bar-chart",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "COUNT(distinct uniqueid)",
-                        "report": "report_queue_history",
-                        "details": "Total Offered",
-                        "condition": "1"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457269010616-1"
-                    }, {
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "yellow-casablanca",
-                        "icon": "fa-bar-chart",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "ROUND(COUNT(DISTINCT uniqueid)/HOUR(CURRENT_TIMESTAMP()),1)",
-                        "report": "report_queue_history",
-                        "condition": "1",
-                        "details": "Avg Offered Per Hour"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457275263022-12"
-                    }, {
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "red-intense",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "SEC_TO_TIME(ROUND(AVG(UNIX_TIMESTAMP(queuecallerabandonAt)- UNIX_TIMESTAMP(queuecallerJoinAt)),0))",
-                        "report": "report_queue_history",
-                        "condition": "queuecallerabandon=1",
-                        "details": "Avg Abandon Time"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457270223870-7"
-                    }, {
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "condition": "1",
-                        "color": "green-haze",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "ROUND(SUM(CASE WHEN queuecallercomplete=1 AND (UNIX_TIMESTAMP(queuecallerleaveAt)-UNIX_TIMESTAMP(queuecallerjoinAt) < 20) THEN 1 ELSE 0 END)/(SUM(queuecallercomplete) + SUM(CASE WHEN queuecallerabandon=1 AND (UNIX_TIMESTAMP(queuecallerleaveAt)-UNIX_TIMESTAMP(queuecallerjoinAt) > 20) THEN 1 ELSE 0 END)) *100,1)",
-                        "report": "report_queue_history",
-                        "details": "Service Level 20 (%)"
-                      },
-                      "title": "SERVICE LEVEL 20",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457952751605-2"
-                    }],
-                    "cid": "1456841191663-23"
-                  }, {
-                    "styleClass": "col-md-3",
-                    "widgets": [{
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "red-intense",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "SEC_TO_TIME(MAX(UNIX_TIMESTAMP()-UNIX_TIMESTAMP(queuecallerjoinAt)))",
-                        "report": "report_queue_history",
-                        "condition": "queuecallerleaveAt IS NULL",
-                        "details": "Oldest Waiting Call"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457275254061-10"
-                    }, {
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "red-intense",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "COUNT(*)",
-                        "condition": "queuecallerexit=1",
-                        "report": "report_queue_history",
-                        "details": "Unmanaged"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457269022062-2"
-                    }, {
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "yellow-crusta",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "SEC_TO_TIME(ROUND(AVG(acwtime),0))",
-                        "report": "report_agent_history",
-                        "condition": "agentcomplete=1",
-                        "details": "Avg ACW Time"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457270219355-6"
-                    }],
-                    "cid": "1456841191664-24"
-                  }]
-                }],
-                "titleTemplateUrl": "../src/templates/dashboard-title.html",
-                "structure": "3-3-3-3"
-              }),
-              defaultEntry: true,
-              editable: true
-            }, {
-              name: 'Outbound Calls',
-              model: JSON.stringify({
-                "title": "Outbound Calls",
-                "rows": [{
-                  "columns": [{
-                    "styleClass": "col-md-3",
-                    "widgets": [{
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "purple-plum",
-                        "icon": "fa-globe",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "COUNT(*)",
-                        "report": "report_call_history",
-                        "condition": "type=\"outbound\"",
-                        "details": "Manual Outbound"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457276458424-14"
-                    }, {
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "condition": "type=\"outbound\" AND disposition=\"ANSWERED\"",
-                        "color": "green-haze",
-                        "icon": "fa-globe",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "COUNT(*)",
-                        "report": "report_call_history",
-                        "details": "Answered"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457718579522-2"
-                    }],
-                    "cid": "1456841191661-21"
-                  }, {
-                    "styleClass": "col-md-3",
-                    "widgets": [{
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "purple-plum",
-                        "icon": "fa-globe",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "SEC_TO_TIME(SUM(duration))",
-                        "report": "report_call_history",
-                        "condition": "type=\"outbound\"",
-                        "details": "Global Duration"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457276453465-13"
-                    }, {
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "condition": "type=\"outbound\"",
-                        "color": "yellow-casablanca",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "ROUND(SUM(IF(disposition=\"ANSWERED\",1,0))/COUNT(*)*100,1)",
-                        "report": "report_call_history",
-                        "details": "Answer Rate (%)"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457718591243-3"
-                    }],
-                    "cid": "1456841191662-22"
-                  }, {
-                    "styleClass": "col-md-3",
-                    "widgets": [{
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "condition": "type=\"outbound\"",
-                        "color": "blue-madison",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "SEC_TO_TIME(ROUND(AVG(duration),0))",
-                        "report": "report_call_history",
-                        "details": "Avg Duration"
-                      },
-                      "title": "CALLS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457718482396-1"
-                    }],
-                    "cid": "1456841191663-23"
-                  }, {
-                    "styleClass": "col-md-3",
-                    "widgets": [],
-                    "cid": "1456841191664-24"
-                  }]
-                }],
-                "titleTemplateUrl": "../src/templates/dashboard-title.html",
-                "structure": "3-3-3-3"
-              }),
-              defaultEntry: true,
-              editable: true
-            }, {
-              name: 'Agents Status',
-              model: JSON.stringify({
-                "title": "Agents Status",
-                "rows": [{
-                  "columns": [{
-                    "styleClass": "col-md-3",
-                    "widgets": [{
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "purple-plum",
-                        "icon": "fa-globe",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "COUNT(*)",
-                        "report": "users",
-                        "condition": "online=1 AND role=\"agent\"",
-                        "details": "Logged"
-                      },
-                      "title": "AGENTS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457275248521-9"
-                    }],
-                    "cid": "1456841191661-21"
-                  }, {
-                    "styleClass": "col-md-3",
-                    "widgets": [{
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "yellow-crusta",
-                        "icon": "fa-globe",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "COUNT(*)",
-                        "report": "users",
-                        "condition": "online=1 AND role=\"agent\" AND (voicePause=1 OR chatPause=1 OR mailPause=1 OR faxPAuse=1) and pauseType !=\"ACW\"",
-                        "details": "Paused"
-                      },
-                      "title": "AGENTS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457276462846-15"
-                    }],
-                    "cid": "1456841191662-22"
-                  }, {
-                    "styleClass": "col-md-3",
-                    "widgets": [{
-                      "type": "counter",
-                      "config": {
-                        "timeout": 5,
-                        "color": "yellow-casablanca",
-                        "icon": "fa-comments",
-                        "link": "#",
-                        "linkText": "VIEW MORE",
-                        "reportTables": [{
-                          "name": "Agents",
-                          "value": "report_agent"
-                        }, {
-                          "name": "Calls",
-                          "value": "report_call"
-                        }, {
-                          "name": "Dials",
-                          "value": "report_dial"
-                        }, {
-                          "name": "Queues",
-                          "value": "report_queue"
-                        }, {
-                          "name": "Users",
-                          "value": "users"
-                        }, {
-                          "name": "Chat Sessions",
-                          "value": "report_chat_session"
-                        }, {
-                          "name": "Mail Sessions",
-                          "value": "report_mail_session"
-                        }],
-                        "colors": [{
-                          "name": "Blue",
-                          "value": "blue-madison"
-                        }, {
-                          "name": "Red",
-                          "value": "red-intense"
-                        }, {
-                          "name": "Green",
-                          "value": "green-haze"
-                        }, {
-                          "name": "Purple",
-                          "value": "purple-plum"
-                        }, {
-                          "name": "Orange",
-                          "value": "yellow-casablanca"
-                        }, {
-                          "name": "Yellow",
-                          "value": "yellow-crusta"
-                        }],
-                        "icons": [{
-                          "name": "Talk bubbles",
-                          "value": "fa-comments"
-                        }, {
-                          "name": "Bar Chart",
-                          "value": "fa-bar-chart"
-                        }, {
-                          "name": "Shopping Cart",
-                          "value": "fa-shopping-cart"
-                        }, {
-                          "name": "Globe",
-                          "value": "fa-globe"
-                        }],
-                        "select": "COUNT(*)",
-                        "report": "users",
-                        "condition": "voicePause=1 and pauseType=\"ACW\"",
-                        "details": "ACW"
-                      },
-                      "title": "AGENTS",
-                      "titleTemplateUrl": "../src/templates/widget-title.html",
-                      "wid": "1457360464208-1"
-                    }],
-                    "cid": "1456841191663-23"
-                  }, {
-                    "styleClass": "col-md-3",
-                    "widgets": [],
-                    "cid": "1456841191664-24"
-                  }]
-                }],
-                "titleTemplateUrl": "../src/templates/dashboard-title.html",
-                "structure": "3-3-3-3"
-              }),
-              defaultEntry: true,
-              editable: true
-            }], {
-              ignoreDuplicates: true,
-              individualHooks: true
-            });
-        })
-        .then(function(dashboards) {
-          console.log(util.format('Populating Dashboards: %s - DONE ', _.map(dashboards, 'name').join()));
-        });
-
-      // Init modules table
-
-      models.VoiceExtension.destroy({
-          where: {
-            context: 'outbound-fax'
-          }
-        })
-        .then(function() {
-          models.VoiceExtension.bulkCreate([{
-            context: 'outbound-fax',
-            exten: '_.',
-            priority: 1,
-            app: 'NoOp',
-            appdata: 'Outgoing fax to ${FAXNUMBER}',
-            type: 'system'
-          }, {
-            context: 'outbound-fax',
-            exten: '_.',
-            priority: 2,
-            app: 'NoOp',
-            appdata: 'Account ${FAXNAME}',
-            type: 'system'
-          }, {
-            context: 'outbound-fax',
-            exten: '_.',
-            priority: 3,
-            app: 'Set',
-            appdata: 'CDR(type)=outbound-fax',
-            type: 'system'
-          }, {
-            context: 'outbound-fax',
-            exten: '_.',
-            priority: 4,
-            app: 'Answer',
-            appdata: '',
-            type: 'system'
-          }, {
-            context: 'outbound-fax',
-            exten: '_.',
-            priority: 5,
-            app: 'Wait',
-            appdata: '2',
-            type: 'system'
-          }, {
-            context: 'outbound-fax',
-            exten: '_.',
-            priority: 6,
-            app: 'Set',
-            appdata: 'FAXOPT(ecm)=${FAXECM}',
-            type: 'system'
-          }, {
-            context: 'outbound-fax',
-            exten: '_.',
-            priority: 7,
-            app: 'Set',
-            appdata: 'FAXOPT(headerinfo)=${FAXHEADERINFO}',
-            type: 'system'
-          }, {
-            context: 'outbound-fax',
-            exten: '_.',
-            priority: 8,
-            app: 'Set',
-            appdata: 'FAXOPT(localstationid)=${FAXLOCALSTATIONID}',
-            type: 'system'
-          }, {
-            context: 'outbound-fax',
-            exten: '_.',
-            priority: 9,
-            app: 'Set',
-            appdata: 'FAXOPT(minrate)=${FAXMINRATE}',
-            type: 'system'
-          }, {
-            context: 'outbound-fax',
-            exten: '_.',
-            priority: 10,
-            app: 'Set',
-            appdata: 'FAXOPT(maxrate)=${FAXMAXRATE}',
-            type: 'system'
-          }, {
-            context: 'outbound-fax',
-            exten: '_.',
-            priority: 11,
-            app: 'Set',
-            appdata: 'FAXOPT(modem)=${FAXMODEM}',
-            type: 'system'
-          }, {
-            context: 'outbound-fax',
-            exten: '_.',
-            priority: 12,
-            app: 'Set',
-            appdata: 'FAXOPT(gateway)=${FAXGATEWAY}',
-            type: 'system'
-          }, {
-            context: 'outbound-fax',
-            exten: '_.',
-            priority: 13,
-            app: 'Set',
-            appdata: 'FAXOPT(t38timeout)=${FAXT38TIMEOUT}',
-            type: 'system'
-          }, {
-            context: 'outbound-fax',
-            exten: '_.',
-            priority: 14,
-            app: 'SendFAX',
-            appdata: '${FAXOUTFILE},ds',
-            type: 'system'
-          }, {
-            context: 'outbound-fax',
-            exten: '_.',
-            priority: 15,
-            app: 'Hangup',
-            appdata: '',
-            type: 'system'
-          }], {
-            ignoreDuplicates: true,
-            individualHooks: true
-          })
-        })
-        .then(function() {
-          console.log('Finished populating VoiceExtension for Outgoing Fax');
-        });
-
-      models.User
-        .findAll({
-          include: [{
-            model: models.VoiceExtension,
-            as: 'UserExtensions',
-            where: {
-              app: 'Dial'
-            }
-          }]
-        })
-        .then(function(users) {
-          console.log('Rewriting Users extensions...');
-          var bulkUpdates = [];
-          _.forEach(users, function(user) {
-            _.forEach(user.UserExtensions, function(elem) {
-              elem.appdata = 'SIP/' + user.name + ',,tTxX';
-              bulkUpdates.push(elem.save());
-              // console.log('extension updated');
-            });
-          });
-          return bulkUpdates;
-        })
-        .all()
-        .catch(function(err) {
-          console.log(err);
-        });
-
-      _setting
-        .update({
-          firstSetup: false
-        });
-    }
-
-    models.VoiceContext
-      .bulkCreate([{
-        name: 'from-sip',
-        description: 'Default context (DO NOT DELETE)',
-        defaultEntry: true
-      }, {
-        name: 'from-voip-provider',
-        description: 'Default context (DO NOT DELETE)',
-        defaultEntry: true
-      }, {
-        name: 'inbound-fax',
-        description: 'Default context (DO NOT DELETE)',
-        defaultEntry: true
-      }, {
-        name: 'outbound-fax',
-        description: 'Default context (DO NOT DELETE)',
-        defaultEntry: true
-      }, {
-        name: 'from-voicemail',
-        description: 'Default context (DO NOT DELETE)',
-        defaultEntry: true
-      }], {
-        ignoreDuplicates: true,
-        individualHooks: true
-      })
-      .then(function(pauses) {
-        console.log(util.format('Populating Contexts: %s - DONE ', _.map(pauses, 'name').join()));
-      });
-
-    var newModules = [{
-      id: 1,
-      name: "dashboard",
-      title: "APPLICATION_DASHBOARD",
-      ModuleId: null,
-      path: '/dashboard/voice'
-    }, {
-      id: 2,
-      name: "yourdashboards",
-      title: "APPLICATION_YOUR_DASHBOARDS",
-      ModuleId: null,
-      path: '/tools/yourdashboards/show/1'
-    }, {
-      id: 3,
-      name: "staff",
-      title: "APPLICATION_STAFF",
-      ModuleId: null,
-      path: null
-    }, {
-      id: 4,
-      name: "agents",
-      title: "APPLICATION_AGENTS",
-      ModuleId: 3,
-      path: '/staff/agents/list'
-    }, {
-      id: 5,
-      name: "contactmanager",
-      title: "APPLICATION_CONTACT_MANAGER",
-      ModuleId: null,
-      path: '/contactmanager/contacts/list'
-    }, {
-      id: 6,
-      name: "channels",
-      title: "APPLICATION_CHANNELS",
-      ModuleId: null,
-      path: null
-    }, {
-      id: 7,
-      name: "voice",
-      title: "APPLICATION_VOICE",
-      ModuleId: 6,
-      path: null
-    }, {
-      id: 8,
-      name: "chat",
-      title: "APPLICATION_CHAT",
-      ModuleId: 6,
-      path: null
-    }, {
-      id: 9,
-      name: "mail",
-      title: "APPLICATION_MAIL",
-      ModuleId: 6,
-      path: null
-    }, {
-      id: 10,
-      name: "fax",
-      title: "APPLICATION_FAX",
-      ModuleId: 6,
-      path: null
-    }, {
-      id: 11,
-      name: "sms",
-      title: "APPLICATION_SMS",
-      ModuleId: 6,
-      path: null
-    }, {
-      id: 12,
-      name: "realtime",
-      title: "APPLICATION_REALTIME",
-      ModuleId: 6,
-      path: '/channels/realtime/view/agents'
-    }, {
-      id: 13,
-      name: "tools",
-      title: "APPLICATION_TOOLS",
-      ModuleId: null,
-      path: null
-    }, {
-      id: 14,
-      name: "square",
-      title: "APPLICATION_CALLYSQUARE",
-      ModuleId: null,
-      path: '/square/projects/list'
-    }, {
-      id: 15,
-      name: "jscripty",
-      title: "APPLICATION_JSCRIPTY",
-      ModuleId: null,
-      path: '/jscripty/projects/list'
-    }, {
-      id: 16,
-      name: "motiondialer",
-      title: "APPLICATION_MOTION_DIALER",
-      ModuleId: null,
-      path: '/motiondialer/lists/list'
-    }, {
-      id: 17,
-      name: "analytics",
-      title: "APPLICATION_ANALYTICS",
-      ModuleId: null,
-      path: '/analytics/reports/list'
-    }, {
-      id: 18,
-      name: "setting",
-      title: "APPLICATION_SETTINGS",
-      ModuleId: null,
-      path: '/setting/updates/list'
-    }, {
-      id: 19,
-      name: "integration",
-      title: "APPLICATION_INTEGRATION",
-      ModuleId: null,
-      path: '/integrations/list'
-    }, {
-      id: 20,
-      name: "openchannel",
-      title: "APPLICATION_OPEN_CHANNEL",
-      ModuleId: 6,
-      path: '/channels/openchannel/accounts/list'
-    }, {
-      id: 21,
-      name: "routes",
-      title: "APPLICATION_ROUTES",
-      ModuleId: 7,
-      path: '/channels/voice/routes/inbound/list'
-    }, {
-      id: 22,
-      name: "contexts",
-      title: "APPLICATION_CONTEXTS",
-      ModuleId: 7,
-      path: '/channels/voice/contexts/list'
-    }, {
-      id: 23,
-      name: "voicemails",
-      title: "APPLICATION_VOICEMAILS",
-      ModuleId: 7,
-      path: '/channels/voice/voicemails/list'
-    }, {
-      id: 24,
-      name: "moh",
-      title: "APPLICATION_MOH",
-      ModuleId: 7,
-      path: '/channels/voice/moh/list'
-    }, {
-      id: 25,
-      name: "recordings",
-      title: "APPLICATION_RECORDINGS",
-      ModuleId: 7,
-      path: '/channels/voice/recordings/list'
-    }, {
-      id: 26,
-      name: "realtime",
-      title: "APPLICATION_REALTIME",
-      ModuleId: 7,
-      path: '/channels/voice/realtime/view/agents'
-    }, {
-      id: 27,
-      name: "chanspy",
-      title: "APPLICATION_CHANSPY",
-      ModuleId: 7,
-      path: '/channels/voice/chanspy/list'
-    }, {
-      id: 28,
-      name: "dispositions",
-      title: "APPLICATION_DISPOSITIONS",
-      ModuleId: 7,
-      path: '/channels/voice/dispositions/list'
-    }, {
-      id: 29,
-      name: "websites",
-      title: "APPLICATION_WEB_SITES",
-      ModuleId: 8,
-      path: '/channels/chat/websites/list'
-    }, {
-      id: 30,
-      name: "queues",
-      title: "APPLICATION_QUEUES",
-      ModuleId: 8,
-      path: '/channels/chat/queues/list'
-    }, {
-      id: 31,
-      name: "interactions",
-      title: "APPLICATION_INTERACTIONS",
-      ModuleId: 8,
-      path: '/channels/chat/room/internal/list'
-    }, {
-      id: 32,
-      name: "offline",
-      title: "APPLICATION_OFFLINE_MESSAGES",
-      ModuleId: 8,
-      path: '/channels/chat/offline/list'
-    }, {
-      id: 33,
-      name: "realtime",
-      title: "APPLICATION_REALTIME",
-      ModuleId: 8,
-      path: '/channels/chat/realtime/view/agents'
-    }, {
-      id: 34,
-      name: "accounts",
-      title: "APPLICATION_ACCOUNTS",
-      ModuleId: 9,
-      path: '/channels/mail/accounts/list'
-    }, {
-      id: 35,
-      name: "queues",
-      title: "APPLICATION_QUEUES",
-      ModuleId: 9,
-      path: '/channels/mail/queues/list'
-    }, {
-      id: 36,
-      name: "inbox",
-      title: "APPLICATION_INBOX",
-      ModuleId: 9,
-      path: '/channels/mail/inbox/view'
-    }, {
-      id: 37,
-      name: "realtime",
-      title: "APPLICATION_REALTIME",
-      ModuleId: 9,
-      path: '/channels/mail/realtime/view/agents'
-    }, {
-      id: 38,
-      name: "accounts",
-      title: "APPLICATION_ACCOUNTS",
-      ModuleId: 10,
-      path: '/channels/fax/accounts/list'
-    }, {
-      id: 39,
-      name: "queues",
-      title: "APPLICATION_QUEUES",
-      ModuleId: 10,
-      path: '/channels/fax/queues/list'
-    }, {
-      id: 40,
-      name: "inbox",
-      title: "APPLICATION_INBOX",
-      ModuleId: 10,
-      path: '/channels/fax/inbox/view'
-    }, {
-      id: 41,
-      name: "realtime",
-      title: "APPLICATION_REALTIME",
-      ModuleId: 10,
-      path: '/channels/fax/realtime/view/agents'
-    }, {
-      id: 42,
-      name: "accounts",
-      title: "APPLICATION_ACCOUNTS",
-      ModuleId: 11,
-      path: '/channels/sms/accounts/list'
-    }, {
-      id: 43,
-      name: "queues",
-      title: "APPLICATION_QUEUES",
-      ModuleId: 11,
-      path: '/channels/sms/queues/list'
-    }, {
-      id: 44,
-      name: "inbox",
-      title: "APPLICATION_INBOX",
-      ModuleId: 11,
-      path: '/channels/sms/inbox/view'
-    }, {
-      id: 45,
-      name: "realtime",
-      title: "APPLICATION_REALTIME",
-      ModuleId: 11,
-      path: '/channels/sms/realtime/view/agents'
-    }, {
-      id: 46,
-      name: "accounts",
-      title: "APPLICATION_ACCOUNTS",
-      ModuleId: 20,
-      path: '/channels/openchannel/accounts/list'
-    }, {
-      id: 47,
-      name: "queues",
-      title: "APPLICATION_QUEUES",
-      ModuleId: 20,
-      path: '/channels/openchannel/queues/list'
-    }, {
-      id: 48,
-      name: "inbox",
-      title: "APPLICATION_INBOX",
-      ModuleId: 20,
-      path: '/channels/openchannel/inbox/view'
-    }, {
-      id: 49,
-      name: "realtime",
-      title: "APPLICATION_REALTIME",
-      ModuleId: 20,
-      path: '/channels/openchannel/realtime/view/agents'
-    }, {
-      id: 50,
-      name: "triggers",
-      title: "APPLICATION_TRIGGERS",
-      ModuleId: 13,
-      path: '/tools/triggers/list'
-    }, {
-      id: 51,
-      name: "automations",
-      title: "APPLICATION_AUTOMATIONS",
-      ModuleId: 13,
-      path: '/tools/automations/list'
-    }, {
-      id: 52,
-      name: "trunks",
-      title: "APPLICATION_TRUNKS",
-      ModuleId: 13,
-      path: '/tools/trunks/list'
-    }, {
-      id: 53,
-      name: "intervals",
-      title: "APPLICATION_INTERVALS",
-      ModuleId: 13,
-      path: '/tools/intervals/list'
-    }, {
-      id: 54,
-      name: "variables",
-      title: "APPLICATION_VARIABLES",
-      ModuleId: 13,
-      path: '/tools/variables/list'
-    }, {
-      id: 55,
-      name: "tags",
-      title: "APPLICATION_TAGS",
-      ModuleId: 13,
-      path: '/tools/tags/list'
-    }, {
-      id: 56,
-      name: "templates",
-      title: "APPLICATION_TEMPLATES",
-      ModuleId: 13,
-      path: '/tools/templates/list'
-    }, {
-      id: 57,
-      name: "pauses",
-      title: "APPLICATION_PAUSES",
-      ModuleId: 13,
-      path: '/tools/pauses/list'
-    }, {
-      id: 58,
-      name: "answers",
-      title: "APPLICATION_CANNED_ANSWERS",
-      ModuleId: 13,
-      path: '/tools/answers/list'
-    }, {
-      id: 59,
-      name: "yourdashboards",
-      title: "APPLICATION_DASHBOARDS_MANAGER",
-      ModuleId: 13,
-      path: '/tools/yourdashboards/list'
-    }, {
-      id: 60,
-      name: "sounds",
-      title: "APPLICATION_SOUNDS",
-      ModuleId: 13,
-      path: '/tools/sounds/list'
-    }, {
-      id: 61,
-      name: "scheduler",
-      title: "APPLICATION_SCHEDULER",
-      ModuleId: 13,
-      path: '/tools/scheduler/list'
-    }];
-
-
-    models.Module
-      .findAll()
-      .then(function(oldModules) {
-        var bulkModules = [];
-        oldModules = _.map(oldModules, 'id');
-        newModules.forEach(function(module) {
-          if (_.includes(oldModules, module.id)) {
-            bulkModules.push(models.Module.update(module, {
-              where: {
-                id: module.id
-              }
-            }));
-          } else {
-            bulkModules.push(models.Module.create(module));
-          }
-        });
-        return bulkModules;
-      })
-      .all()
-      .then(function() {
-        console.log('Finished populating modules');
-      })
-      .catch(function(err) {
-        console.log('Error populating modules:', err);
-      });
-
-    var newDefaultReports = [{
-      "id": 25,
-      "name": "Details",
-      "description": "Detailed queues report",
-      "parent": "j12_7",
-      "table": "report_queue_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }, {
-      "id": 26,
-      "name": "Calls Result",
-      "description": "Simple queue calls overview",
-      "parent": "j12_7",
-      "table": "report_queue_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }, {
-      "id": 28,
-      "name": "Details",
-      "description": "Detailed report about answered queue calls",
-      "parent": "j60_1",
-      "table": "report_agent_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\",\"required\":true}]}}"
-    }, {
-      "id": 29,
-      "name": "Calls by Agent",
-      "description": "Agent calls timer Handle time= talk time + ACW time",
-      "parent": "j60_1",
-      "table": "report_agent_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\",\"required\":true}]}}"
-    }, {
-      "id": 30,
-      "name": "Calls by Queue",
-      "description": "Queue timer Handle Time= Talk Time + AVG TIme",
-      "parent": "j60_1",
-      "table": "report_agent_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\",\"required\":true}]}}"
-    }, {
-      "id": 31,
-      "name": "Answer Time by Queue",
-      "description": "Queues answer time performance",
-      "parent": "j60_1",
-      "table": "report_agent_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\",\"required\":true}]}}"
-    }, {
-      "id": 32,
-      "name": "Disconnection Cause",
-      "description": "Summary of the calls cdisconnection causes",
-      "parent": "j60_1",
-      "table": "report_agent_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\",\"required\":true}]}}"
-    }, {
-      "id": 34,
-      "name": "Answer Time by Hour",
-      "description": "Answer time  by hour",
-      "parent": "j60_1",
-      "table": "report_agent_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\",\"required\":true}]}}"
-    }, {
-      "id": 35,
-      "name": "Details",
-      "description": "Detailed report about the unanswered calls",
-      "parent": "j60_2",
-      "table": "report_queue_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"queuecallercomplete\",\"value\":\"0\",\"required\":true}]}}"
-    }, {
-      "id": 36,
-      "name": "Unanswered by Queue",
-      "description": "Unanswered calls summary by queue",
-      "parent": "j60_2",
-      "table": "report_queue_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"queuecallercomplete\",\"value\":\"0\",\"required\":true}]}}"
-    }, {
-      "id": 37,
-      "name": "Unmanaged calls",
-      "description": "Unmanaged calls summary",
-      "parent": "j60_2",
-      "table": "report_queue_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"queuecallerexit\",\"value\":\"1\",\"required\":true}]}}"
-    }, {
-      "id": 38,
-      "name": "Abandon Time by Queue",
-      "description": "Abandon time performance by queue",
-      "parent": "j60_2",
-      "table": "report_queue_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"queuecallerabandon\",\"value\":\"1\",\"required\":true}]}}"
-    }, {
-      "id": 40,
-      "name": "Calls by Date",
-      "description": "Queue calls summary by date",
-      "parent": "j60_3",
-      "table": "report_queue_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }, {
-      "id": 41,
-      "name": "Calls by Hour",
-      "description": "Calls distribution by hour",
-      "parent": "j60_3",
-      "table": "report_queue_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }, {
-      "id": 46,
-      "name": "Calls by Day",
-      "description": "Calls distribution by day of the month",
-      "parent": "j60_3",
-      "table": "report_queue_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }, {
-      "id": 47,
-      "name": "Calls by Weekday",
-      "description": "Calls distribution by day of the week",
-      "parent": "j60_3",
-      "table": "report_queue_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }, {
-      "id": 49,
-      "name": "Summary",
-      "description": "Calls distribution by queue",
-      "parent": "j12_7",
-      "table": "report_queue_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }, {
-      "id": 50,
-      "name": "Details",
-      "description": "Calls detail (cdr)",
-      "parent": "j51_1",
-      "table": "report_call_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }, {
-      "id": 51,
-      "name": "Outbound",
-      "description": "Manual outbound calls detailed report",
-      "parent": "j51_1",
-      "table": "report_call_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"'outbound'\",\"required\":true}]}}"
-    }, {
-      "id": 52,
-      "name": "Calls by Type",
-      "description": "Summary report of the calls type",
-      "parent": "j51_1",
-      "table": "report_call_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }, {
-      "id": 53,
-      "name": "Outbound Calls Disposition",
-      "description": "Outbound calls grouped by disposition",
-      "parent": "j51_1",
-      "table": "report_call_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"'outbound'\",\"required\":true}]}}"
-    }, {
-      "id": 54,
-      "name": "Outbound Calls by Agent",
-      "description": "Summary of outbound calls grouped by agent",
-      "parent": "j51_1",
-      "table": "report_call_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"'outbound'\",\"required\":true}]}}"
-    }, {
-      "id": 55,
-      "name": "Outbound Calls by Date",
-      "description": "Summary of outbound calls grouped by date",
-      "parent": "j51_1",
-      "table": "report_call_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"'outbound'\",\"required\":true}]}}"
-    }, {
-      "id": 57,
-      "name": "Login Time",
-      "description": "Agent's login time",
-      "parent": "j12_5",
-      "table": "report_member_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"'LOGIN'\",\"required\":true},{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"'voice'\",\"required\":true}]}}"
-    }, {
-      "id": 61,
-      "name": "Activities Summary",
-      "description": "Agent's activities report",
-      "parent": "j87_1",
-      "table": "report_member_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"'voice'\",\"required\":true}]}}"
-    }, {
-      "id": 62,
-      "name": "Pause Details",
-      "description": "Agents status details",
-      "parent": "j87_1",
-      "table": "report_member_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"'voice'\",\"required\":true},{\"condition\":\"=\",\"field\":\"type\",\"value\":\"'PAUSE'\",\"required\":true}]}}"
-    }, {
-      "id": 63,
-      "name": "Details",
-      "description": "Agent's status detail",
-      "parent": "j87_1",
-      "table": "report_member_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"'voice'\",\"required\":true}]}}"
-    }, {
-      "id": 64,
-      "name": "Pause Time",
-      "description": "Agent's pause time",
-      "parent": "j87_1",
-      "table": "report_member_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"'PAUSE'\",\"required\":true},{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"'voice'\",\"required\":true}]}}"
-    }, {
-      "id": 65,
-      "name": "Summary",
-      "description": "CallySquare Summary",
-      "parent": "j87_2",
-      "table": "report_square_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }, {
-      "id": 67,
-      "name": "Blocks",
-      "description": "CallySquare Blocks Detail",
-      "parent": "j87_2",
-      "table": "report_square_details_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }, {
-      "id": 68,
-      "name": "Received emails by account",
-      "description": "Summary of the emails accepted by application for each account",
-      "parent": "j12_4",
-      "table": "report_mail_session_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }, {
-      "id": 69,
-      "name": "Rating by Agent",
-      "description": "Records rating by agent",
-      "parent": "j110_1",
-      "table": "voice_recordings",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\">\",\"field\":\"rating\",\"value\":\"0\",\"required\":true}]}}"
-    }, {
-      "id": 70,
-      "name": "Rating by Queue",
-      "description": "Records rating by queue",
-      "parent": "j110_1",
-      "table": "voice_recordings",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"IS NOT NULL\",\"field\":\"queue\",\"value\":\"\",\"required\":false},{\"condition\":\">\",\"field\":\"rating\",\"value\":\"0\",\"required\":true}]}}"
-    }, {
-      "id": 72,
-      "name": "Website Summary",
-      "description": "Chat session information by website",
-      "parent": "j12_3",
-      "table": "report_chat_session_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }, {
-      "id": 73,
-      "name": "Session Detail",
-      "description": "Detailed report about chat session",
-      "parent": "j12_3",
-      "table": "report_chat_session_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }, {
-      "id": 74,
-      "name": "Chat by Agent",
-      "description": "Session chat by agent",
-      "parent": "j12_3",
-      "table": "report_chat_session_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"complete\",\"value\":\"1\",\"required\":true}]}}"
-    }, {
-      "id": 75,
-      "name": "Chat by Queue",
-      "description": "Chat sessions by queue",
-      "parent": "j12_3",
-      "table": "report_chat_session_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"application\",\"value\":\"'queue'\",\"required\":true}]}}"
-    }, {
-      "id": 76,
-      "name": "Chat by Date",
-      "description": "Session chat by date",
-      "parent": "j12_3",
-      "table": "report_chat_session_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }, {
-      "id": 77,
-      "name": "Received emails by queue",
-      "description": "Summary of received email by queue",
-      "parent": "j12_4",
-      "table": "report_mail_session_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"application\",\"value\":\"'queue'\",\"required\":true}]}}"
-    }, {
-      "id": 79,
-      "name": "Accepted emails by agent",
-      "description": "Summary of accepted email by agent",
-      "parent": "j12_4",
-      "table": "report_mail_session_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"timeout\",\"value\":\"0\",\"required\":true}]}}"
-    }, {
-      "id": 81,
-      "name": "Messages Summary by Date",
-      "description": "Global messages summary by date",
-      "parent": "j12_4",
-      "table": "mail_messages",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }, {
-      "id": 82,
-      "name": "Interactions detail",
-      "description": "Detailed report about the interactions",
-      "parent": "j12_4",
-      "table": "mail_rooms",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }, {
-      "id": 83,
-      "name": "Disposition Summary",
-      "description": "Closed interactions by disposition (filtered by disposition not null)",
-      "parent": "j12_4",
-      "table": "mail_rooms",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"IS NOT NULL\",\"field\":\"disposition\",\"value\":\"\",\"required\":false}]}}"
-    }, {
-      "id": 84,
-      "name": "Closed interactions by date",
-      "description": "Summary of closed interactions grouped by date + average handle time (from when the first email arrived to when the interaction has been closed)",
-      "parent": "j12_4",
-      "table": "mail_rooms",
-      "conditions": "{\"group\":{\"operator\":\"OR\",\"rules\":[{\"condition\":\"=\",\"field\":\"status\",\"value\":\"'CLOSED'\",\"required\":true}]}}"
-    }, {
-      "id": 85,
-      "name": "Details",
-      "description": null,
-      "parent": "j12_6",
-      "table": "sms_messages",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }, {
-      "id": 90,
-      "name": "Details",
-      "description": null,
-      "parent": "j4_10",
-      "table": "report_integration_history",
-      "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}"
-    }];
-
-    var newDefaulReportsFields = [{
-      "field": "uniqueid",
-      "alias": "UniqueId",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 25,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "calleridnum",
-      "alias": "CallerIdNum",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 25,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "calleridname",
-      "alias": "CallerIdName",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 25,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 25,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerjoinAt",
-      "alias": "QueueJoinAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 25,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerleaveAt",
-      "alias": "QueueLeaveAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 25,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerabandon",
-      "alias": "QueueAbandon",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 25,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerabandonAt",
-      "alias": "QueueAbandonAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 25,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallercomplete",
-      "alias": "Complete",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 25,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallercompleteAt",
-      "alias": "CompleteAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 25,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerexit",
-      "alias": "QueueExit",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 25,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerexitAt",
-      "alias": "QueueExitAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 25,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerexitreason",
-      "alias": "QueueExitReason",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 25,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "exten",
-      "alias": "DID",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 25,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)",
-      "alias": "TalkTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 25,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)",
-      "alias": "AbandonTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 25,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "IF(queuecallercomplete=1,holdtime,null)",
-      "alias": "AnswerTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 25,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "calleridnum",
-      "alias": "CallerID",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 26,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 26,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerjoinAt",
-      "alias": "StartTime",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 26,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "CASE WHEN queuecallercomplete=1 THEN queuecallercompleteAt ELSE queuecallerLeaveAt END",
-      "alias": "EndTime",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 26,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "holdtime",
-      "alias": "HoldTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 26,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "CASE WHEN queuecallercomplete=1 THEN \"YES\" ELSE \"NO\" END",
-      "alias": "Answered",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 26,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "uniqueid",
-      "alias": "UniqueId",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 28,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "calleridnum",
-      "alias": "CallerIdNum",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 28,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "calleridname",
-      "alias": "CallerIdName",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 28,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 28,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "membername",
-      "alias": "Agent",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 28,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "agentcalledAt",
-      "alias": "AgentCalledAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 28,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "agentconnectAt",
-      "alias": "AgentConnectAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 28,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "agentcompleteAt",
-      "alias": "AgentCompleteAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 28,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "holdtime",
-      "alias": "AnswerTime",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 28,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "talktime",
-      "alias": "TalkTime",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 28,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "agentacw",
-      "alias": "AgentACW",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 28,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "acwtime",
-      "alias": "AgentACWTime",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 28,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "agentcomplete",
-      "alias": "AgentComplete",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 28,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "reason",
-      "alias": "HangupReason",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 28,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "lastevent",
-      "alias": "LastEvent",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 28,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "exten",
-      "alias": "DID",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 28,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "membername",
-      "alias": "Agent",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 29,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "agentcomplete",
-      "alias": "Completed",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 29,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "talktime",
-      "alias": "TotTalkTime",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 29,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "acwtime",
-      "alias": "TotACWTime",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 29,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "talktime + acwtime",
-      "alias": "TotHandleTime",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 29,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(talktime))",
-      "alias": "AvgTalkTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 29,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(acwtime))",
-      "alias": "AvgACWTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 29,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(SUM(talktime + acwtime)/COUNT(agentcomplete))",
-      "alias": "AvgHandleTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 29,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 30,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "agentcomplete",
-      "alias": "Completed",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 30,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "talktime",
-      "alias": "Tot TalkTime",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 30,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "holdtime",
-      "alias": "Tot HoldTime",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 30,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "acwtime",
-      "alias": "Tot ACWTime",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 30,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "talktime + acwtime",
-      "alias": "Tot Handle Time",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 30,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(talktime))",
-      "alias": "Avg TalkTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 30,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(holdtime))",
-      "alias": "Avg HoldTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 30,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(acwtime))",
-      "alias": "Avg ACWTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 30,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(SUM(talktime + acwtime)/COUNT(agentcomplete))",
-      "alias": "Avg Handle Time",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 30,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 31,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "agentcomplete",
-      "alias": "Tot Answered",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 31,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "COUNT(IF(holdtime<10,1,NULL))",
-      "alias": "Answered <10s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 31,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(COUNT(IF(holdtime<10,1,NULL)) / SUM(agentcomplete) *100,1)",
-      "alias": "Answer Rate <10s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 31,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "COUNT(IF(holdtime >=10 AND holdtime <20,1,NULL))",
-      "alias": "Answered 10-20s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 31,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(COUNT(IF(holdtime >=10 AND holdtime <20,1,NULL)) / SUM(agentcomplete) *100,1)",
-      "alias": "Answer Rate 10-20s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 31,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "COUNT(IF(holdtime >=20 AND holdtime <30,1,NULL))",
-      "alias": "Answered 20-30s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 31,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(COUNT(IF(holdtime >=20 AND holdtime <30,1,NULL)) / SUM(agentcomplete) *100,1)",
-      "alias": "Answer Rate 20-30s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 31,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "COUNT(IF(holdtime >=30,1,NULL))",
-      "alias": "Answered >30s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 31,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(COUNT(IF(holdtime >=30,1,NULL)) / SUM(agentcomplete) *100,1)",
-      "alias": "Answer Rate >30s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 31,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "reason",
-      "alias": "Reason",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 32,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "uniqueid",
-      "alias": "Calls",
-      "function": "COUNT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 32,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "agentconnectAt",
-      "alias": "Hour",
-      "function": null,
-      "format": "HOUR",
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 34,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "agentcomplete",
-      "alias": "Tot Answered",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 34,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "COUNT(IF(holdtime<10,1,NULL))",
-      "alias": "Answered <10s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 34,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "COUNT(IF(holdtime >=10 AND holdtime <20,1,NULL))",
-      "alias": "Answered 10-20s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 34,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "COUNT(IF(holdtime >=20 AND holdtime <30,1,NULL))",
-      "alias": "Answered 20-30s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 34,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "COUNT(IF(holdtime >=30,1,NULL))",
-      "alias": "Answered >30s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 34,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "uniqueid",
-      "alias": "UniqueId",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 35,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "calleridnum",
-      "alias": "CallerIdNum",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 35,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 35,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerjoinAt",
-      "alias": "JoinAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 35,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerleaveAt",
-      "alias": "LeaveAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 35,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerabandon",
-      "alias": "Abandon",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 35,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerabandonAt",
-      "alias": "AbandonAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 35,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerexit",
-      "alias": "Unmanaged",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 35,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerexitAt",
-      "alias": "UnmanagedAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 35,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerexitreason",
-      "alias": "UnmanagedReason",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 35,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "position",
-      "alias": "QueuePosition",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 35,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "exten",
-      "alias": "DID",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 35,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)",
-      "alias": "Abandon Time",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 35,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)",
-      "alias": "Unmanaged HoldTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 35,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 36,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerabandon",
-      "alias": "Abandoned",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 36,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerexit",
-      "alias": "Unmanaged",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 36,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)",
-      "alias": "Tot AbandonTime",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 36,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)))",
-      "alias": "AvgAbandonTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 36,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)",
-      "alias": "Tot Unmanaged Time",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 36,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)))",
-      "alias": "Avg Unmanaged TIme",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 36,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "queuecallerexitreason",
-      "alias": "Reason",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 37,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerexit",
-      "alias": "Calls",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 37,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)",
-      "alias": "Tot Unmanaged Time",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 37,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 38,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerabandon",
-      "alias": "Tot Abandoned",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 38,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <10,1,NULL))",
-      "alias": "Abandoned<10s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 38,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <10,1,NULL)) / SUM(queuecallerabandon) *100,1)",
-      "alias": "Abandoned Rate<10s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 38,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=10 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <60,1,NULL))",
-      "alias": "Abandoned 10-60s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 38,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=10 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <60,1,NULL))  / SUM(queuecallerabandon) *100,1)",
-      "alias": "Abandoned Rate 10-60s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 38,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=60 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <120,1,NULL))",
-      "alias": "Abandoned 60-120s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 38,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=60 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <120,1,NULL))   / SUM(queuecallerabandon) *100,1)",
-      "alias": "Abandoned Rate 60-120s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 38,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=120,1,NULL))",
-      "alias": "Abandoned>120s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 38,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=120,1,NULL))  / SUM(queuecallerabandon) *100,1)",
-      "alias": "Abandoned Rate>120s",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 38,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "queuecallerjoinat",
-      "alias": "Date",
-      "function": null,
-      "format": "DATE",
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 40,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "uniqueid",
-      "alias": "Offered",
-      "function": "COUNT DISTINCT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 40,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallercomplete",
-      "alias": "Completed",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 40,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerabandon",
-      "alias": "Abandoned",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 40,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "queuecallerexit",
-      "alias": "Unmanaged",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 40,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)",
-      "alias": "Tot TalkTime",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 40,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)))",
-      "alias": "AvgTalkTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 40,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)))",
-      "alias": "AvgAbandonTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 40,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "queuecallerjoinat",
-      "alias": "Hour",
-      "function": null,
-      "format": "HOUR",
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 41,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "uniqueid",
-      "alias": "Offered",
-      "function": "COUNT DISTINCT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 41,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallercomplete",
-      "alias": "Answered",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 41,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "ROUND(SUM(queuecallercomplete)/COUNT(DISTINCT uniqueid)*100,1)",
-      "alias": "Answer Rate",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 41,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "queuecallerabandon",
-      "alias": "Abandoned",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 41,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerexit",
-      "alias": "Unmanaged",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 41,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)",
-      "alias": "Tot TalkTime",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 41,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)))",
-      "alias": "AvgTalkTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 41,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)))",
-      "alias": "AvgAbandonTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 41,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "DAY(queuecallerjoinat)",
-      "alias": "Day",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 46,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "uniqueid",
-      "alias": "Offered",
-      "function": "COUNT DISTINCT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 46,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallercomplete",
-      "alias": "Answered",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 46,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "ROUND(SUM(queuecallercomplete)/COUNT(DISTINCT uniqueid)*100,1)",
-      "alias": "Answer Rate",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 46,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "queuecallerabandon",
-      "alias": "Abandoned",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 46,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerexit",
-      "alias": "Unmanaged",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 46,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)",
-      "alias": "Tot TalkTime",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 46,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)))",
-      "alias": "AvgTalkTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 46,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)))",
-      "alias": "AvgAbandonTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 46,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "DAYNAME(queuecallerjoinat)",
-      "alias": "DayOfWeek",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 47,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "uniqueid",
-      "alias": "Offered",
-      "function": "COUNT DISTINCT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 47,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallercomplete",
-      "alias": "Answered",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 47,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "ROUND(SUM(queuecallercomplete)/COUNT(DISTINCT uniqueid)*100,1)",
-      "alias": "Answer Rate",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 47,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "queuecallerabandon",
-      "alias": "Abandoned",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": "ASC",
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 47,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerexit",
-      "alias": "Unmanaged",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 47,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)",
-      "alias": "Tot TalkTime",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 47,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)))",
-      "alias": "AvgTalkTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 47,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)))",
-      "alias": "AvgAbandonTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 47,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 49,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "uniqueid",
-      "alias": "Offered",
-      "function": "COUNT DISTINCT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 49,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallercomplete",
-      "alias": "Answered",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 49,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "ROUND(SUM(queuecallercomplete)/COUNT(DISTINCT uniqueid)*100,1)",
-      "alias": "Answer Rate",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 49,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "queuecallerabandon",
-      "alias": "Abandoned",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 49,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuecallerexit",
-      "alias": "Unmanaged",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 49,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)",
-      "alias": "Tot TalkTime",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 49,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)))",
-      "alias": "AvgTalkTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 49,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)))",
-      "alias": "AvgAbandonTime",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 49,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "uniqueid",
-      "alias": "UniqueID",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 50,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "type",
-      "alias": "Type",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 50,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "tag",
-      "alias": "Tag",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 50,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "source",
-      "alias": "Source",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 50,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "destination",
-      "alias": "Destination",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 50,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "callerid",
-      "alias": "CallerID",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 50,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "destinationchannel",
-      "alias": "DestChannel",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 50,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "lastapplication",
-      "alias": "LastApp",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 50,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "lastdata",
-      "alias": "LastData",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 50,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "starttime",
-      "alias": "StartTime",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 50,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "answertime",
-      "alias": "AnswerTime",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 50,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "endtime",
-      "alias": "EndTime",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 50,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "duration",
-      "alias": "Duration",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 50,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "disposition",
-      "alias": "Disposition",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 50,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "uniqueid",
-      "alias": "UniqueID",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 51,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "accountcode",
-      "alias": "AgentExtension",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 51,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "source",
-      "alias": "Source",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 51,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "destination",
-      "alias": "Destination",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 51,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "callerid",
-      "alias": "CallerId",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 51,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "starttime",
-      "alias": "StartTime",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 51,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "answertime",
-      "alias": "AnswerTime",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 51,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "endtime",
-      "alias": "EndTime",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 51,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "duration",
-      "alias": "Duration",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 51,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "billableseconds",
-      "alias": "Billsec",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 51,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "disposition",
-      "alias": "Disposition",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 51,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "tag",
-      "alias": "Tag",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 51,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "type",
-      "alias": "Type",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 52,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "uniqueid",
-      "alias": "Calls",
-      "function": "COUNT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 52,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "duration",
-      "alias": "Tot Duration",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 52,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "ROUND(AVG(duration))",
-      "alias": "Avg Duration",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 52,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "disposition",
-      "alias": "Disposition",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 53,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "uniqueid",
-      "alias": "Calls",
-      "function": "COUNT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 53,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "duration",
-      "alias": "Tot Duration",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 53,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "ROUND(AVG(duration))",
-      "alias": "Avg Duration",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 53,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "SUBSTRING_INDEX(channel, '-', 1)",
-      "alias": "Agent",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 54,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "uniqueid",
-      "alias": "Calls",
-      "function": "COUNT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 54,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "duration",
-      "alias": "Tot Duration",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 54,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "ROUND(AVG(duration))",
-      "alias": "Avg Duration",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 54,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "starttime",
-      "alias": "Date",
-      "function": null,
-      "format": "DATE",
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 55,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "uniqueid",
-      "alias": "Calls",
-      "function": "COUNT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 55,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "duration",
-      "alias": "Tot Duration",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 55,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "ROUND(AVG(duration))",
-      "alias": "Avg Duration",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 55,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "membername",
-      "alias": "Agent",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": "ASC",
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 57,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "SEC_TO_TIME(SUM(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt)))",
-      "alias": "Duration",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 57,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "membername",
-      "alias": "Agent",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 61,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "CASE WHEN type=\"LOGIN\" THEN UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt) END",
-      "alias": "Login Time",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 61,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "CASE WHEN type=\"TALKING\" THEN UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt) END",
-      "alias": "Talk Time",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 61,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "CASE WHEN type=\"PAUSE\" THEN UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt) END",
-      "alias": "Pause Time",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 61,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "membername",
-      "alias": "Agent",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 62,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "enterAt",
-      "alias": "EnterAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 62,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "exitAt",
-      "alias": "ExitAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 62,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "data1",
-      "alias": "Pause",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 62,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "duration",
-      "alias": "Duration",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 62,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "membername",
-      "alias": "Agent",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 63,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "interface",
-      "alias": "Interface",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 63,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "type",
-      "alias": "Event",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 63,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "data1",
-      "alias": "Type",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 63,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "enterAt",
-      "alias": "EnterAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 63,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "exitAt",
-      "alias": "ExitAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 63,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "SEC_TO_TIME(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt))",
-      "alias": "Duration",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 63,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "membername",
-      "alias": "Agent",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": "ASC",
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 64,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "data1",
-      "alias": "PauseType",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": "ASC",
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 64,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "SEC_TO_TIME(SUM(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt)))",
-      "alias": "Duration",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 64,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "project_name",
-      "alias": "Project Name",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 65,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "uniqueid",
-      "alias": "UniqueId",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 65,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "callerid",
-      "alias": "CallerId",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 65,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "dnid",
-      "alias": "DID",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 65,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "joinAt",
-      "alias": "Start Time",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": "ASC",
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 65,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "leaveAt",
-      "alias": "End Time",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 65,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "UNIX_TIMESTAMP(leaveAt)-UNIX_TIMESTAMP(joinAt)",
-      "alias": "Duration",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 65,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "uniqueid",
-      "alias": "Unique Id",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 67,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "project_name",
-      "alias": "Project Name",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 67,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "callerid",
-      "alias": "Caller Id",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 67,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "node",
-      "alias": "Block",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 67,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "data",
-      "alias": "Data",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 67,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "accountname",
-      "alias": "Account",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 68,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "uniqueid",
-      "alias": "Received",
-      "function": "COUNT DISTINCT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 68,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "IF(timeout=0,1,null)",
-      "alias": "Accepted",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 68,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(SUM(IF(timeout=0,1,null))/COUNT(DISTINCT(uniqueid))*100,1)",
-      "alias": "Accept Rate",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 68,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "IF(timeout=0 AND application=\"queue\",1,null)",
-      "alias": "Accepted by Queue",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 68,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "IF(timeout=0 AND application=\"fidelity\",1,null)",
-      "alias": "Accept by Fidelity",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 68,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "IF(timeout=0 AND application=\"agent\",1,null)",
-      "alias": "Accepted by Agent",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 68,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "connectedlinename",
-      "alias": "Agent",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 69,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "uniqueid",
-      "alias": "Recorded Calls",
-      "function": "COUNT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 69,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "rating",
-      "alias": "Total Rating",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 69,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "rating",
-      "alias": "Avg Rating",
-      "function": "AVG",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 69,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 70,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "uniqueid",
-      "alias": "Rated Calls",
-      "function": "COUNT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 70,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "rating",
-      "alias": "Total Rating",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 70,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "rating",
-      "alias": "Avg Rating",
-      "function": "AVG",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 70,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "websitename",
-      "alias": "WebSite",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 72,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "uniqueid",
-      "alias": "Sessions",
-      "function": "COUNT DISTINCT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 72,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "complete",
-      "alias": "Completed",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 72,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "abandon",
-      "alias": "Abandoned",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 72,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "timeout",
-      "alias": "Timeout",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 72,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)",
-      "alias": "Tot Session Time",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 72,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)))",
-      "alias": "Avg Session Time",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 72,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "uniqueid",
-      "alias": "UniqueId",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 73,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "websitename",
-      "alias": "Website",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 73,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "visitorname",
-      "alias": "VisitorName",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 73,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "visitoremail",
-      "alias": "VisitorEmail",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 73,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "membername",
-      "alias": "MemeberName",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 73,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queuename",
-      "alias": "QueueName",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 73,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "joinAt",
-      "alias": "JoinAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 73,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "leaveAt",
-      "alias": "LeaveAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 73,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "completeAt",
-      "alias": "CompleteAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 73,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "complete",
-      "alias": "Completed",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 73,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "completeReason",
-      "alias": "CompleteReason",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 73,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "abandon",
-      "alias": "Abandoned",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 73,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "timeout",
-      "alias": "Timeout",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 73,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "membername",
-      "alias": "Agent",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 74,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "complete",
-      "alias": "Session",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 74,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)",
-      "alias": "Tot Session Time",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 74,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)))",
-      "alias": "Avg Session Time",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 74,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "COUNT(IF(application=\"queue\",1,NULL))",
-      "alias": "FromQueue",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 74,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "COUNT(IF(application=\"agent\",1,NULL))",
-      "alias": "DirectToAgent",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 74,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "queuename",
-      "alias": "Queue",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 75,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "uniqueid",
-      "alias": "Sessions",
-      "function": "COUNT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 75,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "complete",
-      "alias": "Completed",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 75,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "abandon",
-      "alias": "Abandoned",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 75,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "timeout",
-      "alias": "Timeout",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 75,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)",
-      "alias": "Session Time",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 75,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)))",
-      "alias": "Avg Session Time",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 75,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "joinAt",
-      "alias": "Date",
-      "function": null,
-      "format": "DATE",
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 76,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "uniqueid",
-      "alias": "Sessions",
-      "function": "COUNT DISTINCT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 76,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "complete",
-      "alias": "Completed",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 76,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "ROUND(SUM(complete)/COUNT(DISTINCT uniqueid) *100,1)",
-      "alias": "Complete Rate",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 76,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)",
-      "alias": "Tot Session Time",
-      "function": "SUM",
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 76,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)))",
-      "alias": "Avg Session Time",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 76,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "queuename",
-      "alias": "Queue",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 77,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "uniqueid",
-      "alias": "Received",
-      "function": "COUNT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 77,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "IF(timeout=0,1,0)",
-      "alias": "Accepted",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 77,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "timeout",
-      "alias": "Timeout",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 77,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "ROUND(SUM(IF(timeout=0,1,null))/COUNT(uniqueid)*100,1)",
-      "alias": "Accept Rate",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 77,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "ROUND(AVG(IF(timeout=0,UNIX_TIMESTAMP(leaveat)- UNIX_TIMESTAMP(joinat),NULL)))",
-      "alias": "Avg Accept Time",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 77,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "membername",
-      "alias": "membername",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 79,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "uniqueid",
-      "alias": "Tot Accepted",
-      "function": "COUNT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 79,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "IF(application=\"fidelity\",1,0)",
-      "alias": "Fidelity",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 79,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "IF(application=\"agent\",1,0)",
-      "alias": "Agent",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 79,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "IF(application=\"queue\",1,0)",
-      "alias": "Queue",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 79,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "createdAt",
-      "alias": "Date",
-      "function": null,
-      "format": "DATE",
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 81,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "IF(status=\"RECEIVED\",1,0)",
-      "alias": "Received",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 81,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "IF(status=\"SENT\",1,0)",
-      "alias": "Sent",
-      "function": "SUM",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 81,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "account",
-      "alias": "account",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 82,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "status",
-      "alias": "status",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 82,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "lastEvent",
-      "alias": "lastEvent",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 82,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "createdAt",
-      "alias": "createdAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 82,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "arrivedAt",
-      "alias": "arrivedAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 82,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "openedAt",
-      "alias": "openedAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 82,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "closedAt",
-      "alias": "closedAt",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 82,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "mailIn",
-      "alias": "mailIn",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 82,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "mailOut",
-      "alias": "mailOut",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 82,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "tags",
-      "alias": "tags",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 82,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "disposition",
-      "alias": "disposition",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 82,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "ParentId",
-      "alias": "ParentId",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 82,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "disposition",
-      "alias": "disposition",
-      "function": null,
-      "format": null,
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 83,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "count(*)",
-      "alias": "interactions",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 83,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "closedAt",
-      "alias": "closedAt",
-      "function": null,
-      "format": "DATE",
-      "groupBy": 1,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 84,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "alias": "Interactions",
-      "field": "id",
-      "function": "COUNT",
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 84,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "ROUND(AVG(UNIX_TIMESTAMP(closedAt)-UNIX_TIMESTAMP(arrivedAt)))",
-      "alias": "Avg Handle Time",
-      "function": null,
-      "format": "SEC_TO_TIME",
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 84,
-      "MetricId": null,
-      "custom": 1
-    }, {
-      "field": "createdAt",
-      "alias": "DateTime",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 85,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "alias": "Id",
-      "field": "id",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 85,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "from",
-      "alias": "fromNumber",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 85,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "to",
-      "alias": "toNumber",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 85,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "status",
-      "alias": "Status",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 85,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "createdAt",
-      "alias": "DateTime",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 90,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "uniqueid",
-      "alias": "UniqueID",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 90,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "integration",
-      "alias": "Integration",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 90,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "queue",
-      "alias": "Queue",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 90,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "calleridnum",
-      "alias": "CallerID",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 90,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "membername",
-      "alias": "AgentName",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 90,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "exitStatus",
-      "alias": "exitStatus",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 90,
-      "MetricId": null,
-      "custom": 0
-    }, {
-      "field": "ticketId",
-      "alias": "TicketID",
-      "function": null,
-      "format": null,
-      "groupBy": 0,
-      "orderBy": null,
-      "CustomReportId": null,
-      "DefaultMetricId": null,
-      "DefaultReportId": 90,
-      "MetricId": null,
-      "custom": 0
-    }];
-
-    // var newDefaultMetrics = [{
-    //   "id": 1,
-    //   "name": "Queue - TalkTime",
-    //   "table": "report_queue_history",
-    //   "metric": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)"
-    // }, {
-    //   "id": 2,
-    //   "name": "Queue - Abandon Time",
-    //   "table": "report_queue_history",
-    //   "metric": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)"
-    // }, {
-    //   "id": 3,
-    //   "name": "Abandoned <10s",
-    //   "table": "report_queue_history",
-    //   "metric": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <10,1,NULL))",
-    //   "description": "Count of abandoned calls within 10 seconds (Short Calls)"
-    // }, {
-    //   "id": 4,
-    //   "name": "Queue - AnswerTime",
-    //   "table": "report_queue_history",
-    //   "metric": "IF(queuecallercomplete=1,holdtime,null)"
-    // }, {
-    //   "id": 5,
-    //   "name": "Answered < 10s",
-    //   "table": "report_agent_history",
-    //   "metric": "COUNT(IF(holdtime<10,1,NULL))",
-    //   "description": "Count of answered calls within 10 seconds"
-    // }, {
-    //   "id": 6,
-    //   "name": "Answered 10-20s",
-    //   "table": "report_agent_history",
-    //   "metric": "COUNT(IF(holdtime >=10 AND holdtime <20,1,NULL))",
-    //   "description": "Count of answered calls between 10 and 20 seconds"
-    // }, {
-    //   "id": 7,
-    //   "name": "Answered 20-30s",
-    //   "table": "report_agent_history",
-    //   "metric": "COUNT(IF(holdtime >=20 AND holdtime <30,1,NULL))",
-    //   "description": "Count of answered calls between 20 and 30 seconds"
-    // }, {
-    //   "id": 8,
-    //   "name": "Answered >30s",
-    //   "table": "report_agent_history",
-    //   "metric": "COUNT(IF(holdtime >=30,1,NULL))",
-    //   "description": "Count of answered calls over 30 seconds"
-    // }, {
-    //   "id": 9,
-    //   "name": "Queue - Exit Time",
-    //   "table": "report_queue_history",
-    //   "metric": "UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)"
-    // }, {
-    //   "id": 10,
-    //   "name": "Abandoned 10-60s",
-    //   "table": "report_queue_history",
-    //   "metric": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=10 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <60,1,NULL))",
-    //   "description": "Count of abandoned calls between 10 and 60 seconds"
-    // }, {
-    //   "id": 11,
-    //   "name": "Abandoned 60-120s",
-    //   "table": "report_queue_history",
-    //   "metric": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=60 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <120,1,NULL))",
-    //   "description": "Count of abandoned calls between 60 and 120 seconds"
-    // }, {
-    //   "id": 12,
-    //   "name": "Queue - Abandoned >120s",
-    //   "table": "report_queue_history",
-    //   "metric": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=120,1,NULL))",
-    //   "description": "Count of abandoned calls over 120 seconds"
-    // }, {
-    //   "id": 13,
-    //   "name": "Queue - JoinDate",
-    //   "table": "report_queue_history",
-    //   "metric": "DATE(queuecallerjoinat)",
-    //   "description": "Extract the date of the join queue"
-    // }, {
-    //   "id": 14,
-    //   "name": "Queue - JoinHour",
-    //   "table": "report_queue_history",
-    //   "metric": "HOUR(queuecallerjoinat)",
-    //   "description": "Extract the hour of the join queue"
-    // }, {
-    //   "id": 15,
-    //   "name": "Queue - JoinDay",
-    //   "table": "report_queue_history",
-    //   "metric": "DAY(queuecallerjoinat)",
-    //   "description": "Extract the day of the join queue"
-    // }, {
-    //   "id": 16,
-    //   "name": "Member - Event Duration",
-    //   "table": "report_member_history",
-    //   "metric": "UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt)",
-    //   "description": "Member event duration in seconds"
-    // }, {
-    //   "id": 17,
-    //   "name": "Member - Total Event Duration",
-    //   "table": "report_member_history",
-    //   "metric": "SEC_TO_TIME(SUM(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt)))",
-    //   "description": "Total event duration"
-    // }, {
-    //   "id": 18,
-    //   "name": "Chat - Session Time",
-    //   "table": "report_chat_session_history",
-    //   "metric": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)",
-    //   "description": "Session Time",
-    // }, {
-    //   "id": 19,
-    //   "name": "Chat - Queue",
-    //   "table": "report_chat_session_history",
-    //   "metric": "COUNT(IF(application=\"queue\",1,NULL))",
-    //   "description": "Chat queue application count",
-    // }, {
-    //   "id": 20,
-    //   "name": "Chat - Agent",
-    //   "table": "report_chat_session_history",
-    //   "metric": "COUNT(IF(application=\"agent\",1,NULL))",
-    //   "description": "Chat agent application count",
-    // }, {
-    //   "id": 21,
-    //   "name": "Chat - Avg Session Time",
-    //   "table": "report_chat_session_history",
-    //   "metric": "ROUND(AVG(UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)))",
-    //   "description": "Average session time"
-    // }, {
-    //   "id": 22,
-    //   "name": "Member - Event Duration (HH:mm:ss)",
-    //   "table": "report_member_history",
-    //   "metric": "SEC_TO_TIME(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt))",
-    //   "description": "Member events duration in time format"
-    // }, {
-    //   "id": 23,
-    //   "name": "Square - Duration",
-    //   "table": "report_square_history",
-    //   "metric": "UNIX_TIMESTAMP(leaveAt)-UNIX_TIMESTAMP(joinAt)",
-    //   "description": "IVR Duration"
-    // }, {
-    //   "id": 24,
-    //   "name": "Queue - EndTime Call",
-    //   "table": "report_queue_history",
-    //   "metric": "CASE WHEN queuecallercomplete=1 THEN queuecallercompleteAt ELSE queuecallerLeaveAt END",
-    //   "description": null
-    // }, {
-    //   "id": 25,
-    //   "name": "Queue - Calls Result",
-    //   "table": "report_queue_history",
-    //   "metric": "CASE WHEN queuecallercomplete=1 THEN \"YES\" ELSE \"NO\" END",
-    //   "description": "Show if a call is answered or not"
-    // }];
-
-    models.ReportTree.destroy({
-        where: {
-          id: 1
-        }
-      })
-      .then(function() {
-        return models.ReportTree.create({
-          id: 1,
-          tree: '[{"id":"1","text":"Motion Reports","icon":"icon-book-open","li_attr":{"id":"1"},"a_attr":{"href":"#","id":"1_anchor"},"state":{"loaded":true,"opened":true,"selected":false,"disabled":false},"data":{},"parent":"#"},{"id":"j12_2","text":"Voice","icon":true,"li_attr":{"id":"j12_2"},"a_attr":{"href":"#","id":"j12_2_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"1"},{"id":"j12_7","text":"Queues","icon":true,"li_attr":{"id":"j12_7"},"a_attr":{"href":"#","id":"j12_7_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j12_2"},{"id":"j60_1","text":"Answered","icon":true,"li_attr":{"id":"j60_1"},"a_attr":{"href":"#","id":"j60_1_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j12_7"},{"id":"j60_2","text":"Unanswered","icon":true,"li_attr":{"id":"j60_2"},"a_attr":{"href":"#","id":"j60_2_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j12_7"},{"id":"j60_3","text":"Distribution","icon":true,"li_attr":{"id":"j60_3"},"a_attr":{"href":"#","id":"j60_3_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j12_7"},{"id":"j51_1","text":"Calls","icon":true,"li_attr":{"id":"j51_1"},"a_attr":{"href":"#","id":"j51_1_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j12_2"},{"id":"j87_1","text":"Agents","icon":true,"li_attr":{"id":"j87_1"},"a_attr":{"href":"#","id":"j87_1_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j12_2"},{"id":"j87_2","text":"CallySquare","icon":true,"li_attr":{"id":"j87_2"},"a_attr":{"href":"#","id":"j87_2_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j12_2"},{"id":"j110_1","text":"Recordings","icon":true,"li_attr":{"id":"j110_1"},"a_attr":{"href":"#","id":"j110_1_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j12_2"},{"id":"j4_10","text":"Integration","icon":true,"li_attr":{"id":"j4_10"},"a_attr":{"href":"#","id":"j4_10_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j12_2"},{"id":"j12_3","text":"Chat","icon":true,"li_attr":{"id":"j12_3"},"a_attr":{"href":"#","id":"j12_3_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"1"},{"id":"j12_4","text":"E-Mail","icon":true,"li_attr":{"id":"j12_4"},"a_attr":{"href":"#","id":"j12_4_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"1"},{"id":"j12_6","text":"SMS","icon":true,"li_attr":{"id":"j12_6"},"a_attr":{"href":"#","id":"j12_6_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"1"},{"id":"j12_5","text":"Agents","icon":true,"li_attr":{"id":"j12_5"},"a_attr":{"href":"#","id":"j12_5_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"1"}]',
-        })
-      })
-      .then(function() {
-        return models.ReportTree.findOrCreate({
-          where: {
-            id: 2
-          },
-          defaults: {
-            id: 2,
-            tree: '[{"id":"1","text":"Custom Reports","icon":"icon-book-open","li_attr":{"id":"1"},"a_attr":{"href":"#","id":"1_anchor"},"state":{"loaded":true,"opened":true,"selected":false,"disabled":false},"data":{},"parent":"#"},{"id":"2","text":"My Reports","icon":true,"li_attr":{"id":"2"},"a_attr":{"href":"#","id":"2_anchor"},"state":{"loaded":true,"opened":true,"selected":false,"disabled":false},"data":{},"parent":"1"}]'
-          }
-        })
-      })
-      // .then(function() {
-      //   return models.DefaultMetric.findAll();
-      // })
-      // .then(function(oldDefaultMetrics) {
-      //   var bulkDefaultMetrics = [];
-      //   oldDefaultMetrics = _.map(oldDefaultMetrics, 'id');
-      //   newDefaultMetrics.forEach(function(defaultMet) {
-      //     if (_.includes(oldDefaultMetrics, defaultMet.id)) {
-      //       bulkDefaultMetrics.push(models.DefaultMetric.update(defaultMet, {
-      //         where: {
-      //           id: defaultMet.id
-      //         }
-      //       }));
-      //     } else {
-      //       bulkDefaultMetrics.push(models.DefaultMetric.create(defaultMet));
-      //     }
-      //   });
-      //   return bulkDefaultMetrics;
-      // })
-      // .all()
-      // .then(function() {
-      //   return models.DefaultReport.findAll()
-      // })
-      // .then(function(oldDefaultReports) {
-      //   var bulkDefaultReports = [];
-      //   oldDefaultReports = _.map(oldDefaultReports, 'id');
-      //   newDefaulReports.forEach(function(defaultRep) {
-      //     if (_.includes(oldDefaultReports, defaultRep.id)) {
-      //       bulkDefaultReports.push(models.DefaultReport.update(defaultRep, {
-      //         where: {
-      //           id: defaultRep.id
-      //         }
-      //       }));
-      //     } else {
-      //       bulkDefaultReports.push(models.DefaultReport.create(defaultRep));
-      //     }
-      //   });
-      //   return bulkDefaultReports;
-      // })
-      // .all()
-      .then(function() {
-        return models.ReportField.destroy({
-          where: {
-            DefaultReportId: {
-              $ne: null
-            }
-          }
-        })
-      })
-      .then(function() {
-        return models.DefaultReport.destroy({
-          where: {
-            id: {
-              $ne: null
-            }
-          }
-        });
-      })
-      .then(function() {
-        return models.DefaultReport.bulkCreate(newDefaultReports);
-      })
-      .then(function() {
-        return models.ReportField.bulkCreate(newDefaulReportsFields, {
-          ignoreDuplicates: true,
-          individualHooks: true
-        })
-      }).then(function() {
-        console.log('Populating Analytics');
-      }).catch(function(err) {
-        console.log('Error populating Analytics:', err);
-      });
-
-  })
-  .catch(function(err) {
-    console.error(err);
-  });
+var _0x4f50=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x66\x69\x72\x73\x74\x53\x65\x74\x75\x70","\x6C\x6F\x67","\x69\x64","\x61\x64\x64\x55\x73\x65\x72\x73","\x74\x68\x65\x6E","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x4D\x61\x69\x6C\x20\x51\x75\x65\x75\x65\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x6A\x6F\x69\x6E","\x6E\x61\x6D\x65","\x6D\x61\x70","\x66\x6F\x72\x6D\x61\x74","\x61\x64\x64\x55\x73\x65\x72","\x53\x61\x6C\x65\x73","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x53\x75\x70\x70\x6F\x72\x74","\x62\x65\x65\x70\x61\x6C\x6C","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x56\x6F\x69\x63\x65\x20\x51\x75\x65\x75\x65\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x6A\x61\x6E\x65\x2E\x6D\x69\x6C\x6C\x65\x72","\x66\x69\x6E\x64","\x6A\x6F\x68\x6E\x2E\x64\x6F\x65","\x55\x73\x65\x72\x73","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x41\x67\x65\x6E\x74\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x54\x65\x61\x6D\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x64\x65\x66\x61\x75\x6C\x74","\x72\x69\x6E\x67\x61\x6C\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x55\x73\x65\x72\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x44\x65\x66\x61\x75\x6C\x74\x20\x54\x65\x61\x6D","\x61\x67\x65\x6E\x74","\x4A\x6F\x68\x6E\x20\x44\x6F\x65","\x6A\x6F\x68\x6E\x2E\x64\x6F\x65\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x73\x68\x75\x74\x74\x6C\x65\x35\x35","\x4A\x61\x6E\x65\x20\x4D\x69\x6C\x6C\x65\x72","\x6A\x61\x6E\x65\x2E\x6D\x69\x6C\x6C\x65\x72\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x55\x73\x65\x72","\x63\x72\x65\x61\x74\x65","\x54\x65\x61\x6D","\x61\x64\x6D\x69\x6E","\x41\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x6F\x72","\x61\x64\x6D\x69\x6E\x40\x61\x64\x6D\x69\x6E\x2E\x63\x6F\x6D","\x70\x61\x73\x73\x77\x6F\x72\x64","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x43\x68\x61\x6E\x53\x70\x79\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x43\x68\x61\x6E\x53\x70\x79\x31","\x73\x70\x79\x31","\x54\x68\x65\x20\x73\x75\x70\x65\x72\x76\x69\x73\x6F\x72\x20\x63\x61\x6E\x20\x6C\x69\x73\x74\x65\x6E\x20\x61\x6E\x64\x20\x74\x61\x6C\x6B\x20\x74\x6F\x20\x74\x68\x65\x20\x61\x67\x65\x6E\x74\x2E\x20\x54\x68\x65\x20\x63\x75\x73\x74\x6F\x6D\x65\x72\x20\x77\x69\x6C\x6C\x20\x6E\x6F\x74\x20\x6C\x69\x73\x74\x65\x6E\x20\x74\x6F\x20\x74\x68\x65\x20\x73\x75\x70\x65\x72\x76\x69\x73\x6F\x72\x20\x76\x6F\x69\x63\x65\x2E","\x62\x77","\x43\x68\x61\x6E\x53\x70\x79\x32","\x73\x70\x79\x32","\x54\x68\x65\x20\x73\x75\x70\x65\x72\x76\x69\x73\x6F\x72\x20\x63\x61\x6E\x20\x6F\x6E\x6C\x79\x20\x6C\x69\x73\x74\x65\x6E\x20\x74\x68\x65\x20\x61\x67\x65\x6E\x74\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x28\x6E\x65\x69\x74\x68\x65\x72\x20\x74\x68\x65\x20\x61\x67\x65\x6E\x74\x20\x6E\x6F\x72\x20\x74\x68\x65\x20\x63\x75\x73\x74\x6F\x6D\x65\x72\x20\x77\x69\x6C\x6C\x20\x6C\x69\x73\x74\x65\x6E\x20\x74\x6F\x20\x74\x68\x65\x20\x73\x75\x70\x65\x72\x76\x69\x73\x6F\x72\x20\x76\x6F\x69\x63\x65\x2E","\x62\x6F","\x43\x68\x61\x6E\x53\x70\x79\x33","\x73\x70\x79\x33","\x54\x68\x65\x20\x73\x75\x70\x65\x72\x76\x69\x73\x6F\x72\x20\x63\x61\x6E\x20\x6C\x69\x73\x74\x65\x6E\x20\x61\x6E\x64\x20\x74\x61\x6C\x6B\x20\x62\x6F\x74\x68\x20\x74\x6F\x20\x74\x68\x65\x20\x61\x67\x65\x6E\x74\x20\x61\x6E\x64\x20\x74\x6F\x20\x74\x68\x65\x20\x63\x75\x73\x74\x6F\x6D\x65\x72\x2C\x20\x6C\x69\x6B\x65\x20\x61\x20\x70\x75\x72\x65\x20\x33\x20\x77\x61\x79\x20\x63\x6F\x6E\x66\x65\x72\x65\x6E\x63\x65\x20\x72\x6F\x6F\x6D\x2E","\x62\x57","\x43\x68\x61\x6E\x53\x70\x79","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x43\x4D\x20\x4C\x69\x73\x74\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x53\x79\x73\x74\x65\x6D\x20\x4C\x69\x73\x74","\x44\x65\x66\x61\x75\x6C\x74\x20\x4C\x69\x73\x74","\x4C\x69\x73\x74","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x56\x6F\x69\x63\x65\x20\x4D\x75\x73\x69\x63\x20\x4F\x6E\x20\x48\x6F\x6C\x64\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x2F\x76\x61\x72\x2F\x6C\x69\x62\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x6D\x6F\x68\x2F","\x66\x69\x6C\x65\x73","\x72\x61\x6E\x64\x6F\x6D","\x77\x61\x76","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x43\x48\x4F\x49\x43\x45","\x4F\x72\x64\x65\x72\x20\x6E\x75\x6D\x62\x65\x72","\x4F\x52\x44\x45\x52\x4E\x55\x4D","\x44\x61\x74\x61\x20\x42\x61\x73\x65\x20\x51\x75\x65\x72\x79\x20\x52\x65\x73\x75\x6C\x74","\x44\x42\x52\x45\x53\x55\x4C\x54","\x52\x41\x54\x45","\x56\x61\x72\x69\x61\x62\x6C\x65","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x50\x61\x75\x73\x65\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x42\x41\x43\x4B\x4F\x46\x46\x49\x43\x45","\x41\x46\x54\x45\x52\x43\x41\x4C\x4C","\x50\x61\x75\x73\x65","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x54\x72\x75\x6E\x6B\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x44\x65\x6D\x6F\x54\x72\x75\x6E\x6B","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x70\x2D\x70\x72\x6F\x76\x69\x64\x65\x72","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x30\x2E\x30\x2E\x30\x2E\x30\x2F\x30\x2E\x30\x2E\x30\x2E\x30","\x35\x35\x78\x63\x61\x6C\x6C\x79\x35\x35","\x54\x72\x75\x6E\x6B","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x56\x6F\x69\x63\x65\x20\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x3A\x20\x25\x73\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x63\x6F\x6E\x74\x65\x78\x74","\x65\x78\x74\x65\x6E","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x5F\x36\x30\x30","\x31","\x4E\x6F\x4F\x70","\x49\x6E\x74\x65\x72\x6E\x61\x6C\x20\x43\x61\x6C\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x45\x63\x68\x6F\x20\x54\x65\x73\x74","\x32","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x33","\x47\x6F\x74\x6F\x49\x66\x54\x69\x6D\x65","\x2A\x2C\x2A\x2C\x2A\x2C\x2A\x3F\x66\x72\x6F\x6D\x2D\x73\x69\x70\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x34\x3A\x66\x72\x6F\x6D\x2D\x73\x69\x70\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x39","\x34","\x4E\x6F\x4F\x50","\x53\x6B\x69\x70\x70\x65\x64\x20\x43\x61\x6C\x6C\x65\x72\x49\x44\x20\x53\x65\x74","\x35","\x53\x6B\x69\x70\x70\x65\x64\x20\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x36","\x53\x6B\x69\x70\x70\x65\x64\x20\x50\x72\x6F\x67\x72\x65\x73\x73","\x37","\x50\x6C\x61\x79\x62\x61\x63\x6B","\x64\x65\x6D\x6F\x2D\x65\x63\x68\x6F\x74\x65\x73\x74","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x38","\x53\x6B\x69\x70\x70\x65\x64\x20\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x39","\x50\x6C\x61\x79\x62\x61\x63\x6B\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x45\x6E\x64","\x31\x30","\x2A\x2C\x2A\x2C\x2A\x2C\x2A\x3F\x66\x72\x6F\x6D\x2D\x73\x69\x70\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x31\x31\x3A\x66\x72\x6F\x6D\x2D\x73\x69\x70\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x31\x36","\x31\x31","\x31\x32","\x31\x33","\x31\x34","\x45\x63\x68\x6F","","\x31\x35","\x31\x36","\x45\x63\x68\x6F\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x45\x6E\x64","\x31\x37","\x2A\x2C\x2A\x2C\x2A\x2C\x2A\x3F\x66\x72\x6F\x6D\x2D\x73\x69\x70\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x31\x38\x3A\x66\x72\x6F\x6D\x2D\x73\x69\x70\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x32\x33","\x31\x38","\x31\x39","\x32\x30","\x32\x31","\x32\x32","\x32\x33","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x5F\x36\x30\x30\x30","\x53\x75\x70\x70\x6F\x72\x74\x20\x51\x75\x65\x75\x65","\x50\x72\x6F\x67\x72\x65\x73\x73","\x51\x75\x65\x75\x65","\x53\x75\x70\x70\x6F\x72\x74\x2C\x2C\x2C\x2C","\x51\x75\x65\x75\x65\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x45\x6E\x64","\x5F\x36\x36\x36\x36","\x41\x47\x49","\x61\x67\x69\x3A\x2F\x2F\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x2F\x73\x71\x75\x61\x72\x65\x2C\x41\x75\x74\x6F\x20\x41\x74\x74\x65\x6E\x64\x61\x6E\x74","\x41\x47\x49\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x45\x6E\x64","\x5F\x36\x36\x36\x37","\x61\x67\x69\x3A\x2F\x2F\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x2F\x73\x71\x75\x61\x72\x65\x2C\x4F\x72\x64\x65\x72\x73","\x5F\x36\x36\x36\x38","\x61\x67\x69\x3A\x2F\x2F\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x2F\x73\x71\x75\x61\x72\x65\x2C\x43\x53\x49","\x5F\x58\x2E","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x43\x44\x52\x28\x74\x61\x67\x29\x3D\x2D\x2D","\x2A\x2C\x2A\x2C\x2A\x2C\x2A\x3F\x66\x72\x6F\x6D\x2D\x73\x69\x70\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x35\x3A\x66\x72\x6F\x6D\x2D\x73\x69\x70\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x31\x30","\x44\x69\x61\x6C","\x53\x49\x50\x2F\x44\x65\x6D\x6F\x20\x54\x72\x75\x6E\x6B\x2F\x24\x7B\x45\x58\x54\x45\x4E\x3A\x30\x7D","\x44\x69\x61\x6C\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x45\x6E\x64","\x5F\x36\x30\x30\x31","\x53\x61\x6C\x65\x73\x20\x51\x75\x65\x75\x65","\x53\x61\x6C\x65\x73\x2C\x2C\x2C\x2C","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x53\x71\x75\x61\x72\x65\x20\x50\x72\x6F\x6A\x65\x63\x74\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x41\x75\x74\x6F\x20\x41\x74\x74\x65\x6E\x64\x61\x6E\x74","\x49\x56\x52\x20\x53\x41\x4D\x50\x4C\x45\x20\x31","\x3C\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x20\x67\x72\x69\x64\x3D\x22\x31\x22\x20\x67\x75\x69\x64\x65\x73\x3D\x22\x31\x22\x20\x74\x6F\x6F\x6C\x74\x69\x70\x73\x3D\x22\x31\x22\x20\x63\x6F\x6E\x6E\x65\x63\x74\x3D\x22\x31\x22\x20\x66\x6F\x6C\x64\x3D\x22\x31\x22\x20\x70\x61\x67\x65\x3D\x22\x30\x22\x20\x70\x61\x67\x65\x53\x63\x61\x6C\x65\x3D\x22\x31\x22\x20\x70\x61\x67\x65\x57\x69\x64\x74\x68\x3D\x22\x38\x32\x36\x22\x20\x70\x61\x67\x65\x48\x65\x69\x67\x68\x74\x3D\x22\x31\x31\x36\x39\x22\x3E\x0A\x20\x3C\x72\x6F\x6F\x74\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x30\x22\x2F\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x30\x22\x2F\x3E\x0A\x20\x20\x3C\x6D\x65\x6E\x75\x20\x6C\x61\x62\x65\x6C\x3D\x22\x4D\x65\x6E\x75\x22\x20\x66\x69\x6C\x65\x5F\x69\x64\x3D\x22\x31\x22\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x3D\x22\x35\x22\x20\x64\x69\x67\x69\x74\x3D\x22\x31\x22\x20\x72\x65\x74\x72\x79\x3D\x22\x32\x22\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64\x3D\x22\x31\x22\x20\x69\x64\x3D\x22\x33\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x2F\x6D\x65\x6E\x75\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x31\x33\x30\x22\x20\x79\x3D\x22\x31\x35\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x6D\x65\x6E\x75\x3E\x0A\x20\x20\x3C\x71\x75\x65\x75\x65\x20\x6C\x61\x62\x65\x6C\x3D\x22\x51\x75\x65\x75\x65\x20\x53\x61\x6C\x65\x73\x22\x20\x71\x75\x65\x75\x65\x5F\x69\x64\x3D\x22\x31\x22\x20\x6F\x70\x74\x73\x3D\x22\x22\x20\x75\x72\x6C\x3D\x22\x22\x20\x66\x69\x6C\x65\x5F\x69\x64\x3D\x22\x30\x22\x20\x74\x69\x6D\x65\x6F\x75\x74\x3D\x22\x33\x30\x30\x22\x20\x61\x67\x69\x3D\x22\x22\x20\x6D\x61\x63\x72\x6F\x3D\x22\x22\x20\x67\x6F\x73\x75\x62\x3D\x22\x22\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3D\x22\x22\x20\x69\x64\x3D\x22\x35\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x63\x61\x6C\x6C\x5F\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2F\x71\x75\x65\x75\x65\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x34\x37\x30\x22\x20\x79\x3D\x22\x39\x2E\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x33\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x71\x75\x65\x75\x65\x3E\x0A\x20\x20\x3C\x71\x75\x65\x75\x65\x20\x6C\x61\x62\x65\x6C\x3D\x22\x51\x75\x65\x75\x65\x20\x53\x75\x70\x70\x6F\x72\x74\x22\x20\x71\x75\x65\x75\x65\x5F\x69\x64\x3D\x22\x32\x22\x20\x6F\x70\x74\x73\x3D\x22\x22\x20\x75\x72\x6C\x3D\x22\x22\x20\x66\x69\x6C\x65\x5F\x69\x64\x3D\x22\x30\x22\x20\x74\x69\x6D\x65\x6F\x75\x74\x3D\x22\x33\x30\x30\x22\x20\x61\x67\x69\x3D\x22\x22\x20\x6D\x61\x63\x72\x6F\x3D\x22\x22\x20\x67\x6F\x73\x75\x62\x3D\x22\x22\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3D\x22\x22\x20\x69\x64\x3D\x22\x36\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x63\x61\x6C\x6C\x5F\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2F\x71\x75\x65\x75\x65\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x35\x34\x30\x22\x20\x79\x3D\x22\x31\x34\x39\x2E\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x37\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x71\x75\x65\x75\x65\x3E\x0A\x20\x20\x3C\x64\x69\x61\x6C\x20\x6C\x61\x62\x65\x6C\x3D\x22\x49\x6E\x74\x65\x72\x6E\x61\x6C\x20\x44\x69\x61\x6C\x20\x4A\x6F\x68\x6E\x20\x44\x6F\x65\x22\x20\x73\x69\x70\x5F\x69\x64\x3D\x22\x31\x22\x20\x74\x69\x6D\x65\x6F\x75\x74\x3D\x22\x36\x30\x22\x20\x6F\x70\x74\x73\x3D\x22\x22\x20\x75\x72\x6C\x3D\x22\x22\x20\x69\x64\x3D\x22\x37\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x63\x61\x6C\x6C\x5F\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2F\x64\x69\x61\x6C\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x34\x37\x30\x22\x20\x79\x3D\x22\x33\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x64\x69\x61\x6C\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x38\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x33\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x35\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x39\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x32\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x33\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x36\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x6E\x6F\x6F\x70\x20\x6C\x61\x62\x65\x6C\x3D\x22\x4E\x6F\x4F\x70\x20\x63\x68\x6F\x69\x63\x65\x20\x76\x69\x65\x77\x22\x20\x6F\x75\x74\x70\x75\x74\x3D\x22\x43\x68\x6F\x69\x63\x65\x3A\x20\x7B\x43\x48\x4F\x49\x43\x45\x7D\x22\x20\x69\x64\x3D\x22\x31\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x67\x65\x6E\x65\x72\x61\x6C\x2F\x6E\x6F\x6F\x70\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x33\x30\x30\x22\x20\x79\x3D\x22\x33\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x6E\x6F\x6F\x70\x3E\x0A\x20\x20\x3C\x65\x6E\x64\x20\x6C\x61\x62\x65\x6C\x3D\x22\x45\x6E\x64\x22\x20\x69\x64\x3D\x22\x31\x35\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x65\x6E\x74\x72\x79\x2F\x65\x6E\x64\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x37\x32\x30\x22\x20\x79\x3D\x22\x31\x35\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x65\x6E\x64\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x33\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x33\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x31\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x37\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x35\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x35\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x38\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x36\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x35\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x39\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x37\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x35\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x32\x30\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x31\x31\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x37\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x73\x74\x61\x72\x74\x20\x6C\x61\x62\x65\x6C\x3D\x22\x53\x74\x61\x72\x74\x22\x20\x61\x6E\x73\x77\x65\x72\x3D\x22\x79\x65\x73\x22\x20\x69\x64\x3D\x22\x32\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x65\x6E\x74\x72\x79\x2F\x73\x74\x61\x72\x74\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x33\x30\x22\x20\x79\x3D\x22\x31\x35\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x73\x74\x61\x72\x74\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x32\x32\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x32\x31\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x33\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x3C\x2F\x72\x6F\x6F\x74\x3E\x0A\x20\x3C\x2F\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x3E","\x43\x53\x49","\x43\x75\x73\x74\x6F\x6D\x65\x72\x20\x53\x61\x74\x69\x73\x66\x61\x63\x74\x69\x6F\x6E\x20\x49\x6E\x64\x65\x78\x20\x65\x78\x61\x6D\x70\x6C\x65","\x3C\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x20\x67\x72\x69\x64\x3D\x22\x31\x22\x20\x67\x75\x69\x64\x65\x73\x3D\x22\x31\x22\x20\x74\x6F\x6F\x6C\x74\x69\x70\x73\x3D\x22\x31\x22\x20\x63\x6F\x6E\x6E\x65\x63\x74\x3D\x22\x31\x22\x20\x66\x6F\x6C\x64\x3D\x22\x31\x22\x20\x70\x61\x67\x65\x3D\x22\x30\x22\x20\x70\x61\x67\x65\x53\x63\x61\x6C\x65\x3D\x22\x31\x22\x20\x70\x61\x67\x65\x57\x69\x64\x74\x68\x3D\x22\x38\x32\x36\x22\x20\x70\x61\x67\x65\x48\x65\x69\x67\x68\x74\x3D\x22\x31\x31\x36\x39\x22\x3E\x0A\x20\x3C\x72\x6F\x6F\x74\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x30\x22\x2F\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x30\x22\x2F\x3E\x0A\x20\x20\x3C\x71\x75\x65\x75\x65\x20\x6C\x61\x62\x65\x6C\x3D\x22\x51\x75\x65\x75\x65\x20\x4F\x50\x54\x49\x4F\x4E\x20\x43\x20\x74\x6F\x20\x63\x6F\x6E\x74\x69\x6E\x75\x65\x22\x20\x71\x75\x65\x75\x65\x5F\x69\x64\x3D\x22\x32\x22\x20\x6F\x70\x74\x73\x3D\x22\x63\x22\x20\x75\x72\x6C\x3D\x22\x22\x20\x66\x69\x6C\x65\x5F\x69\x64\x3D\x22\x30\x22\x20\x74\x69\x6D\x65\x6F\x75\x74\x3D\x22\x31\x30\x22\x20\x61\x67\x69\x3D\x22\x22\x20\x6D\x61\x63\x72\x6F\x3D\x22\x22\x20\x67\x6F\x73\x75\x62\x3D\x22\x22\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3D\x22\x22\x20\x69\x64\x3D\x22\x33\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x63\x61\x6C\x6C\x5F\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2F\x71\x75\x65\x75\x65\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x32\x36\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x71\x75\x65\x75\x65\x3E\x0A\x20\x20\x3C\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74\x20\x6C\x61\x62\x65\x6C\x3D\x22\x53\x75\x62\x50\x72\x6F\x6A\x65\x63\x74\x20\x53\x75\x72\x76\x65\x79\x22\x20\x70\x72\x6F\x6A\x65\x63\x74\x5F\x69\x64\x3D\x22\x34\x22\x20\x69\x64\x3D\x22\x35\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x67\x65\x6E\x65\x72\x61\x6C\x2F\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x34\x33\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x36\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x33\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x35\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x65\x6E\x64\x20\x6C\x61\x62\x65\x6C\x3D\x22\x45\x6E\x64\x22\x20\x69\x64\x3D\x22\x37\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x65\x6E\x74\x72\x79\x2F\x65\x6E\x64\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x36\x30\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x65\x6E\x64\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x38\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x35\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x37\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x73\x74\x61\x72\x74\x20\x6C\x61\x62\x65\x6C\x3D\x22\x53\x74\x61\x72\x74\x22\x20\x61\x6E\x73\x77\x65\x72\x3D\x22\x79\x65\x73\x22\x20\x69\x64\x3D\x22\x31\x30\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x65\x6E\x74\x72\x79\x2F\x73\x74\x61\x72\x74\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x39\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x73\x74\x61\x72\x74\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x31\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x31\x30\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x33\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x3C\x2F\x72\x6F\x6F\x74\x3E\x0A\x20\x3C\x2F\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x3E","\x4F\x72\x64\x65\x72\x73","\x4F\x72\x64\x65\x72\x20\x44\x42\x20\x49\x56\x52\x20\x53\x61\x6D\x70\x6C\x65","\x3C\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x20\x67\x72\x69\x64\x3D\x22\x31\x22\x20\x67\x75\x69\x64\x65\x73\x3D\x22\x31\x22\x20\x74\x6F\x6F\x6C\x74\x69\x70\x73\x3D\x22\x31\x22\x20\x63\x6F\x6E\x6E\x65\x63\x74\x3D\x22\x31\x22\x20\x66\x6F\x6C\x64\x3D\x22\x31\x22\x20\x70\x61\x67\x65\x3D\x22\x30\x22\x20\x70\x61\x67\x65\x53\x63\x61\x6C\x65\x3D\x22\x31\x22\x20\x70\x61\x67\x65\x57\x69\x64\x74\x68\x3D\x22\x38\x32\x36\x22\x20\x70\x61\x67\x65\x48\x65\x69\x67\x68\x74\x3D\x22\x31\x31\x36\x39\x22\x3E\x0A\x20\x3C\x72\x6F\x6F\x74\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x30\x22\x2F\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x30\x22\x2F\x3E\x0A\x20\x20\x3C\x6D\x65\x6E\x75\x20\x6C\x61\x62\x65\x6C\x3D\x22\x4D\x65\x6E\x75\x22\x20\x66\x69\x6C\x65\x5F\x69\x64\x3D\x22\x32\x22\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x3D\x22\x35\x22\x20\x64\x69\x67\x69\x74\x3D\x22\x35\x22\x20\x72\x65\x74\x72\x79\x3D\x22\x31\x22\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64\x3D\x22\x32\x22\x20\x69\x64\x3D\x22\x34\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x2F\x6D\x65\x6E\x75\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x32\x35\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x6D\x65\x6E\x75\x3E\x0A\x20\x20\x3C\x6E\x6F\x6F\x70\x20\x6C\x61\x62\x65\x6C\x3D\x22\x4E\x6F\x4F\x70\x20\x44\x65\x62\x75\x67\x20\x4F\x52\x44\x45\x52\x4E\x55\x4D\x22\x20\x6F\x75\x74\x70\x75\x74\x3D\x22\x4F\x52\x44\x45\x52\x20\x4E\x55\x4D\x42\x45\x52\x3A\x20\x7B\x4F\x52\x44\x45\x52\x4E\x55\x4D\x7D\x22\x20\x69\x64\x3D\x22\x36\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x67\x65\x6E\x65\x72\x61\x6C\x2F\x6E\x6F\x6F\x70\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x34\x30\x30\x22\x20\x79\x3D\x22\x31\x30\x39\x2E\x35\x36\x37\x38\x32\x37\x31\x33\x30\x38\x35\x32\x33\x32\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x6E\x6F\x6F\x70\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x37\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x2D\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x34\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x36\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x67\x6F\x74\x6F\x69\x66\x20\x6C\x61\x62\x65\x6C\x3D\x22\x47\x6F\x74\x6F\x49\x66\x22\x20\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x3D\x22\x7B\x44\x42\x52\x45\x53\x55\x4C\x54\x7D\x20\x3D\x3D\x20\x31\x22\x20\x69\x64\x3D\x22\x31\x30\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x63\x61\x6C\x6C\x66\x6C\x6F\x77\x2F\x67\x6F\x74\x6F\x69\x66\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x37\x33\x30\x22\x20\x79\x3D\x22\x31\x30\x39\x2E\x35\x36\x37\x38\x32\x37\x31\x33\x30\x38\x35\x32\x33\x31\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x67\x6F\x74\x6F\x69\x66\x3E\x0A\x20\x20\x3C\x70\x6C\x61\x79\x62\x61\x63\x6B\x20\x6C\x61\x62\x65\x6C\x3D\x22\x50\x6C\x61\x79\x62\x61\x63\x6B\x20\x4F\x72\x64\x65\x72\x20\x73\x68\x69\x70\x70\x65\x64\x22\x20\x66\x69\x6C\x65\x5F\x69\x64\x3D\x22\x33\x22\x20\x73\x6B\x69\x70\x3D\x22\x30\x22\x20\x6E\x6F\x61\x6E\x73\x77\x65\x72\x3D\x22\x30\x22\x20\x69\x64\x3D\x22\x31\x32\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x31\x30\x31\x30\x22\x20\x79\x3D\x22\x35\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x33\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x74\x72\x75\x65\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x31\x30\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x32\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x70\x6C\x61\x79\x62\x61\x63\x6B\x20\x6C\x61\x62\x65\x6C\x3D\x22\x50\x6C\x61\x79\x62\x61\x63\x6B\x20\x4F\x72\x64\x65\x72\x20\x6F\x6E\x20\x65\x6C\x61\x62\x6F\x72\x61\x74\x69\x6F\x6E\x22\x20\x66\x69\x6C\x65\x5F\x69\x64\x3D\x22\x34\x22\x20\x73\x6B\x69\x70\x3D\x22\x30\x22\x20\x6E\x6F\x61\x6E\x73\x77\x65\x72\x3D\x22\x30\x22\x20\x69\x64\x3D\x22\x31\x34\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x31\x30\x31\x30\x22\x20\x79\x3D\x22\x31\x38\x39\x2E\x35\x36\x37\x38\x32\x37\x31\x33\x30\x38\x35\x32\x33\x32\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x35\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x31\x30\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x34\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x68\x61\x6E\x67\x75\x70\x20\x6C\x61\x62\x65\x6C\x3D\x22\x48\x61\x6E\x67\x75\x70\x22\x20\x69\x64\x3D\x22\x31\x36\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x63\x61\x6C\x6C\x5F\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2F\x68\x61\x6E\x67\x75\x70\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x31\x31\x38\x30\x22\x20\x79\x3D\x22\x31\x30\x39\x2E\x35\x36\x37\x38\x32\x37\x31\x33\x30\x38\x35\x32\x33\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x68\x61\x6E\x67\x75\x70\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x37\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x31\x32\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x36\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x38\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x31\x34\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x36\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x73\x74\x61\x72\x74\x20\x6C\x61\x62\x65\x6C\x3D\x22\x53\x74\x61\x72\x74\x22\x20\x61\x6E\x73\x77\x65\x72\x3D\x22\x79\x65\x73\x22\x20\x69\x64\x3D\x22\x31\x39\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x65\x6E\x74\x72\x79\x2F\x73\x74\x61\x72\x74\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x31\x30\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x73\x74\x61\x72\x74\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x32\x30\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x31\x39\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x34\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x64\x61\x74\x61\x62\x61\x73\x65\x20\x6C\x61\x62\x65\x6C\x3D\x22\x44\x61\x74\x61\x62\x61\x73\x65\x20\x71\x75\x65\x72\x79\x20\x45\x58\x41\x4D\x50\x4C\x45\x22\x20\x6F\x64\x62\x63\x5F\x69\x64\x3D\x22\x31\x22\x20\x71\x75\x65\x72\x79\x3D\x22\x53\x45\x4C\x45\x43\x54\x20\x73\x74\x61\x74\x75\x73\x20\x66\x72\x6F\x6D\x20\x6F\x72\x64\x65\x72\x73\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3D\x7B\x4F\x52\x44\x45\x52\x4E\x55\x4D\x7D\x22\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64\x3D\x22\x31\x22\x20\x69\x64\x3D\x22\x32\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x5F\x73\x65\x72\x76\x65\x72\x2F\x64\x61\x74\x61\x62\x61\x73\x65\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x35\x36\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x64\x61\x74\x61\x62\x61\x73\x65\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x32\x32\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x36\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x32\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x32\x33\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x32\x31\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x30\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x3C\x2F\x72\x6F\x6F\x74\x3E\x0A\x20\x3C\x2F\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x3E","\x53\x75\x72\x76\x65\x79","\x53\x75\x72\x76\x65\x79\x20\x49\x56\x52\x20\x65\x78\x61\x6D\x70\x6C\x65","\x3C\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x20\x67\x72\x69\x64\x3D\x22\x31\x22\x20\x67\x75\x69\x64\x65\x73\x3D\x22\x31\x22\x20\x74\x6F\x6F\x6C\x74\x69\x70\x73\x3D\x22\x31\x22\x20\x63\x6F\x6E\x6E\x65\x63\x74\x3D\x22\x31\x22\x20\x66\x6F\x6C\x64\x3D\x22\x31\x22\x20\x70\x61\x67\x65\x3D\x22\x30\x22\x20\x70\x61\x67\x65\x53\x63\x61\x6C\x65\x3D\x22\x31\x22\x20\x70\x61\x67\x65\x57\x69\x64\x74\x68\x3D\x22\x38\x32\x36\x22\x20\x70\x61\x67\x65\x48\x65\x69\x67\x68\x74\x3D\x22\x31\x31\x36\x39\x22\x3E\x0A\x20\x3C\x72\x6F\x6F\x74\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x30\x22\x2F\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x30\x22\x2F\x3E\x0A\x20\x20\x3C\x73\x74\x61\x72\x74\x20\x6C\x61\x62\x65\x6C\x3D\x22\x53\x74\x61\x72\x74\x22\x20\x69\x64\x3D\x22\x32\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x65\x6E\x74\x72\x79\x2F\x73\x74\x61\x72\x74\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x37\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x73\x74\x61\x72\x74\x3E\x0A\x20\x20\x3C\x6D\x65\x6E\x75\x20\x6C\x61\x62\x65\x6C\x3D\x22\x4D\x65\x6E\x75\x22\x20\x66\x69\x6C\x65\x5F\x69\x64\x3D\x22\x35\x22\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x3D\x22\x35\x22\x20\x64\x69\x67\x69\x74\x3D\x22\x31\x22\x20\x72\x65\x74\x72\x79\x3D\x22\x31\x22\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64\x3D\x22\x34\x22\x20\x69\x64\x3D\x22\x33\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x2F\x6D\x65\x6E\x75\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x32\x32\x32\x22\x20\x79\x3D\x22\x31\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x6D\x65\x6E\x75\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x34\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x32\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x33\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x6E\x6F\x6F\x70\x20\x6C\x61\x62\x65\x6C\x3D\x22\x4E\x6F\x4F\x70\x22\x20\x6F\x75\x74\x70\x75\x74\x3D\x22\x22\x20\x69\x64\x3D\x22\x35\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x67\x65\x6E\x65\x72\x61\x6C\x2F\x6E\x6F\x6F\x70\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x33\x37\x38\x2E\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x34\x22\x20\x79\x3D\x22\x31\x31\x30\x2E\x31\x33\x35\x36\x35\x34\x32\x36\x31\x37\x30\x34\x36\x34\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x6E\x6F\x6F\x70\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x2C\x32\x2C\x33\x2C\x34\x2C\x35\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x33\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x35\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x68\x61\x6E\x67\x75\x70\x20\x6C\x61\x62\x65\x6C\x3D\x22\x48\x61\x6E\x67\x75\x70\x22\x20\x69\x64\x3D\x22\x31\x30\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x63\x61\x6C\x6C\x5F\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2F\x68\x61\x6E\x67\x75\x70\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x38\x33\x38\x22\x20\x79\x3D\x22\x31\x31\x30\x2E\x31\x33\x35\x36\x35\x34\x32\x36\x31\x37\x30\x34\x36\x34\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x68\x61\x6E\x67\x75\x70\x3E\x0A\x20\x20\x3C\x70\x6C\x61\x79\x62\x61\x63\x6B\x20\x6C\x61\x62\x65\x6C\x3D\x22\x50\x6C\x61\x79\x62\x61\x63\x6B\x20\x54\x68\x61\x6E\x6B\x20\x79\x6F\x75\x22\x20\x66\x69\x6C\x65\x5F\x69\x64\x3D\x22\x36\x22\x20\x73\x6B\x69\x70\x3D\x22\x30\x22\x20\x6E\x6F\x61\x6E\x73\x77\x65\x72\x3D\x22\x30\x22\x20\x69\x64\x3D\x22\x31\x33\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x35\x32\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x2E\x31\x33\x35\x36\x35\x34\x32\x36\x31\x37\x30\x34\x36\x34\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x34\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x35\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x33\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x64\x61\x74\x61\x62\x61\x73\x65\x20\x6C\x61\x62\x65\x6C\x3D\x22\x44\x61\x74\x61\x62\x61\x73\x65\x22\x20\x6F\x64\x62\x63\x5F\x69\x64\x3D\x22\x31\x22\x20\x71\x75\x65\x72\x79\x3D\x22\x49\x4E\x53\x45\x52\x54\x20\x49\x4E\x54\x4F\x20\x73\x75\x72\x76\x65\x79\x20\x28\x61\x67\x65\x6E\x74\x2C\x20\x71\x75\x65\x75\x65\x2C\x20\x72\x65\x73\x75\x6C\x74\x29\x26\x23\x78\x61\x3B\x56\x41\x4C\x55\x45\x53\x20\x28\x7B\x4D\x45\x4D\x42\x45\x52\x49\x4E\x54\x45\x52\x46\x41\x43\x45\x7D\x2C\x20\x7B\x51\x55\x45\x55\x45\x4E\x41\x4D\x45\x7D\x2C\x20\x7B\x52\x41\x54\x45\x7D\x29\x22\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64\x3D\x22\x31\x22\x20\x69\x64\x3D\x22\x31\x35\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x5F\x73\x65\x72\x76\x65\x72\x2F\x64\x61\x74\x61\x62\x61\x73\x65\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x36\x38\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x2E\x31\x33\x35\x36\x35\x34\x32\x36\x31\x37\x30\x34\x36\x34\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x64\x61\x74\x61\x62\x61\x73\x65\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x36\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x31\x33\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x35\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x37\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x31\x35\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x30\x22\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x3C\x2F\x72\x6F\x6F\x74\x3E\x0A\x20\x3C\x2F\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x3E","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x53\x71\x75\x61\x72\x65\x20\x4F\x44\x42\x43\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x78\x63\x61\x6C\x6C\x79","\x44\x52\x49\x56\x45\x52\x3D\x4D\x79\x53\x51\x4C\x3B\x53\x45\x52\x56\x45\x52\x3D\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x3B\x55\x49\x44\x3D\x78\x63\x61\x6C\x6C\x3B\x50\x57\x44\x3D\x78\x43\x40\x4C\x4C\x31\x32\x33\x34\x3B\x44\x41\x54\x41\x42\x41\x53\x45\x3D\x6D\x6F\x74\x69\x6F\x6E","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x5A\x65\x6E\x64\x65\x73\x6B","\x31\x2E\x30\x2E\x30","\x58\x65\x6E\x69\x61\x4C\x41\x42\x20\x73\x2E\x72\x2E\x6C\x2E","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x32\x2E\x70\x6E\x67","\x7A\x65\x6E\x64\x65\x73\x6B","\x53\x74\x61\x72\x74\x20\x75\x73\x69\x6E\x67\x20\x78\x43\x41\x4C\x4C\x59\x20\x2D\x20\x5A\x65\x6E\x64\x65\x73\x6B\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x20\x41\x75\x74\x6F\x2D\x47\x65\x6E\x65\x72\x61\x74\x65\x64\x20\x54\x69\x63\x6B\x65\x74\x73\x2C\x20\x66\x75\x6C\x6C\x79\x20\x63\x75\x73\x74\x6F\x6D\x69\x7A\x61\x62\x6C\x65\x20\x63\x6F\x6D\x6D\x65\x6E\x74\x73\x2C\x20\x43\x75\x73\x74\x6F\x6D\x20\x46\x69\x65\x6C\x64\x73\x20\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2C\x20\x54\x61\x67\x20\x73\x75\x70\x70\x6F\x72\x74\x20\x61\x6E\x64\x20\x53\x69\x6D\x70\x6C\x65\x20\x53\x65\x74\x75\x70","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x69\x6B\x69\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D\x2F\x64\x69\x73\x70\x6C\x61\x79\x2F\x58\x4D\x44\x2F\x5A\x65\x6E\x64\x65\x73\x6B\x2B\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x32\x2E\x70\x6E\x67","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x53\x74\x61\x72\x74\x20\x75\x73\x69\x6E\x67\x20\x78\x43\x41\x4C\x4C\x59\x20\x2D\x20\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x20\x41\x75\x74\x6F\x2D\x47\x65\x6E\x65\x72\x61\x74\x65\x64\x20\x54\x61\x73\x6B\x73\x2C\x20\x66\x75\x6C\x6C\x79\x20\x63\x75\x73\x74\x6F\x6D\x69\x7A\x61\x62\x6C\x65\x20\x63\x6F\x6D\x6D\x65\x6E\x74\x73\x2C\x20\x43\x75\x73\x74\x6F\x6D\x20\x46\x69\x65\x6C\x64\x73\x20\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x20\x61\x6E\x64\x20\x4F\x70\x65\x6E\x43\x54\x49\x20\x73\x75\x70\x70\x6F\x72\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x69\x6B\x69\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D\x2F\x64\x69\x73\x70\x6C\x61\x79\x2F\x58\x4D\x44\x2F\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2B\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x69\x46\x72\x61\x6D\x65","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x69\x66\x72\x61\x6D\x65\x2E\x70\x6E\x67","\x69\x66\x72\x61\x6D\x65","\x53\x74\x61\x72\x74\x20\x75\x73\x69\x6E\x67\x20\x69\x46\x72\x61\x6D\x65\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x20\x65\x6E\x61\x62\x6C\x65\x20\x79\x6F\x75\x72\x20\x61\x67\x65\x6E\x74\x73\x20\x74\x6F\x20\x76\x69\x65\x77\x20\x65\x78\x74\x65\x72\x6E\x61\x6C\x20\x70\x61\x67\x65\x73\x20\x28\x6C\x69\x6B\x65\x20\x79\x6F\x75\x72\x20\x43\x52\x4D\x29\x20\x64\x69\x72\x65\x63\x74\x6C\x79\x20\x66\x72\x6F\x6D\x20\x4D\x6F\x74\x69\x6F\x6E\x20\x47\x55\x49","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x69\x6B\x69\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D\x2F\x64\x69\x73\x70\x6C\x61\x79\x2F\x58\x4D\x44\x2F\x69\x46\x72\x61\x6D\x65\x2B\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x45\x72\x72\x6F\x72\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x3A","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x61\x6C\x6C","\x73\x74\x61\x74\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x75\x70\x64\x61\x74\x65","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x43\x6F\x6D\x70\x61\x6E\x69\x65\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x41\x63\x6D\x65","\x6C\x74\x64","\x41\x63\x6D\x65\x20\x53\x72\x65\x65\x74","\x58\x65\x6E\x69\x61\x6C\x61\x62","\x73\x72\x6C","\x43\x2E\x73\x6F\x20\x56\x69\x74\x74\x6F\x72\x69\x6F\x20\x45\x6D\x61\x6E\x75\x65\x6C\x65\x20\x49\x49\x2C\x20\x31\x31\x31","\x31\x30\x31\x32\x38","\x49\x74\x61\x6C\x79","\x54\x75\x72\x69\x6E","\x30\x39\x36\x36\x38\x39\x31\x30\x30\x31\x32","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x78\x65\x6E\x69\x61\x6C\x61\x62\x2E\x63\x6F\x6D\x2F","\x2B\x33\x39\x20\x30\x31\x31\x2E\x31\x39\x38\x38\x36\x35\x30\x30","\x2B\x33\x39\x20\x30\x31\x31\x2E\x30\x39\x36\x30\x30\x37\x30","\x69\x6E\x66\x6F\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x43\x6F\x6D\x70\x61\x6E\x79","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x49\x6E\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C\x73","\x56\x6F\x69\x63\x65\x20\x49\x6E\x62\x6F\x75\x6E\x64","\x63\x6F\x6C\x2D\x6D\x64\x2D\x33","\x63\x6F\x75\x6E\x74\x65\x72","\x62\x6C\x75\x65\x2D\x6D\x61\x64\x69\x73\x6F\x6E","\x66\x61\x2D\x63\x6F\x6D\x6D\x65\x6E\x74\x73","\x23","\x56\x49\x45\x57\x20\x4D\x4F\x52\x45","\x41\x67\x65\x6E\x74\x73","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74","\x43\x61\x6C\x6C\x73","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C","\x44\x69\x61\x6C\x73","\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C","\x51\x75\x65\x75\x65\x73","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65","\x75\x73\x65\x72\x73","\x43\x68\x61\x74\x20\x53\x65\x73\x73\x69\x6F\x6E\x73","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x4D\x61\x69\x6C\x20\x53\x65\x73\x73\x69\x6F\x6E\x73","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x42\x6C\x75\x65","\x52\x65\x64","\x72\x65\x64\x2D\x69\x6E\x74\x65\x6E\x73\x65","\x47\x72\x65\x65\x6E","\x67\x72\x65\x65\x6E\x2D\x68\x61\x7A\x65","\x50\x75\x72\x70\x6C\x65","\x70\x75\x72\x70\x6C\x65\x2D\x70\x6C\x75\x6D","\x4F\x72\x61\x6E\x67\x65","\x79\x65\x6C\x6C\x6F\x77\x2D\x63\x61\x73\x61\x62\x6C\x61\x6E\x63\x61","\x59\x65\x6C\x6C\x6F\x77","\x79\x65\x6C\x6C\x6F\x77\x2D\x63\x72\x75\x73\x74\x61","\x54\x61\x6C\x6B\x20\x62\x75\x62\x62\x6C\x65\x73","\x42\x61\x72\x20\x43\x68\x61\x72\x74","\x66\x61\x2D\x62\x61\x72\x2D\x63\x68\x61\x72\x74","\x53\x68\x6F\x70\x70\x69\x6E\x67\x20\x43\x61\x72\x74","\x66\x61\x2D\x73\x68\x6F\x70\x70\x69\x6E\x67\x2D\x63\x61\x72\x74","\x47\x6C\x6F\x62\x65","\x66\x61\x2D\x67\x6C\x6F\x62\x65","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x3D\x30\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x30\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x3D\x30\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x20\x69\x73\x20\x6E\x6F\x74\x20\x6E\x75\x6C\x6C","\x41\x63\x74\x69\x76\x65\x20\x43\x61\x6C\x6C\x73","\x43\x4F\x55\x4E\x54\x28\x2A\x29","\x43\x41\x4C\x4C\x53","\x2E\x2E\x2F\x73\x72\x63\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x77\x69\x64\x67\x65\x74\x2D\x74\x69\x74\x6C\x65\x2E\x68\x74\x6D\x6C","\x31\x34\x35\x34\x37\x37\x32\x35\x33\x32\x33\x34\x36\x2D\x31\x30","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31","\x54\x6F\x74\x61\x6C\x20\x41\x6E\x73\x77\x65\x72\x65\x64","\x31\x34\x35\x36\x38\x34\x31\x30\x33\x31\x31\x31\x31\x2D\x38","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2F\x20\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x2B\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x6E\x73\x77\x65\x72\x20\x52\x61\x74\x65\x28\x25\x29","\x31\x34\x35\x37\x32\x37\x30\x31\x32\x34\x38\x30\x32\x2D\x34","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x2C\x30\x29\x29","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x5F\x68\x69\x73\x74\x6F\x72\x79","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31","\x41\x76\x67\x20\x54\x61\x6C\x6B\x20\x54\x69\x6D\x65","\x31\x34\x35\x37\x32\x37\x30\x32\x31\x34\x37\x36\x36\x2D\x35","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31\x20\x41\x4E\x44\x20\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3C\x20\x31\x30\x29\x20\x54\x48\x45\x4E\x20\x31\x20\x45\x4C\x53\x45\x20\x30\x20\x45\x4E\x44\x29\x2F\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2B\x20\x53\x55\x4D\x28\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x3D\x31\x20\x41\x4E\x44\x20\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3E\x20\x31\x30\x29\x20\x54\x48\x45\x4E\x20\x31\x20\x45\x4C\x53\x45\x20\x30\x20\x45\x4E\x44\x29\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x53\x65\x72\x76\x69\x63\x65\x20\x4C\x65\x76\x65\x6C\x20\x31\x30\x20\x28\x25\x29","\x53\x45\x52\x56\x49\x43\x45\x20\x4C\x45\x56\x45\x4C","\x31\x34\x35\x37\x33\x36\x36\x39\x36\x35\x37\x39\x34\x2D\x33","\x31\x34\x35\x36\x38\x34\x31\x31\x39\x31\x36\x36\x31\x2D\x32\x31","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x57\x61\x69\x74\x69\x6E\x67\x20\x43\x61\x6C\x6C\x73","\x31\x34\x35\x36\x38\x33\x39\x38\x37\x30\x34\x34\x39\x2D\x35","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x3D\x31","\x54\x6F\x74\x61\x6C\x20\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x31\x34\x35\x36\x38\x34\x31\x32\x34\x34\x39\x33\x31\x2D\x32\x37","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x20\x2F\x20\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x2B\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x20\x52\x61\x74\x65\x20\x28\x25\x29","\x31\x34\x35\x37\x32\x36\x39\x30\x33\x33\x39\x32\x33\x2D\x33","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x2C\x30\x29\x29","\x41\x76\x67\x20\x41\x6E\x73\x77\x65\x72\x20\x54\x69\x6D\x65","\x31\x34\x35\x37\x32\x37\x30\x32\x33\x30\x33\x32\x34\x2D\x38","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31\x20\x41\x4E\x44\x20\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3C\x20\x31\x35\x29\x20\x54\x48\x45\x4E\x20\x31\x20\x45\x4C\x53\x45\x20\x30\x20\x45\x4E\x44\x29\x2F\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2B\x20\x53\x55\x4D\x28\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x3D\x31\x20\x41\x4E\x44\x20\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3E\x20\x31\x35\x29\x20\x54\x48\x45\x4E\x20\x31\x20\x45\x4C\x53\x45\x20\x30\x20\x45\x4E\x44\x29\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x53\x65\x72\x76\x69\x63\x65\x20\x4C\x65\x76\x65\x6C\x20\x31\x35\x20\x28\x25\x29","\x53\x45\x52\x56\x49\x43\x45\x20\x4C\x45\x56\x45\x4C\x20\x31\x35","\x31\x34\x35\x37\x39\x35\x32\x37\x33\x34\x35\x39\x30\x2D\x31","\x31\x34\x35\x36\x38\x34\x31\x31\x39\x31\x36\x36\x32\x2D\x32\x32","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x4D\x41\x58\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29\x29\x29","\x4C\x6F\x6E\x67\x65\x73\x74\x20\x41\x63\x74\x69\x76\x65\x20\x43\x61\x6C\x6C","\x31\x34\x35\x37\x32\x37\x35\x32\x35\x38\x34\x39\x34\x2D\x31\x31","\x43\x4F\x55\x4E\x54\x28\x64\x69\x73\x74\x69\x6E\x63\x74\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29","\x54\x6F\x74\x61\x6C\x20\x4F\x66\x66\x65\x72\x65\x64","\x31\x34\x35\x37\x32\x36\x39\x30\x31\x30\x36\x31\x36\x2D\x31","\x52\x4F\x55\x4E\x44\x28\x43\x4F\x55\x4E\x54\x28\x44\x49\x53\x54\x49\x4E\x43\x54\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x2F\x48\x4F\x55\x52\x28\x43\x55\x52\x52\x45\x4E\x54\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x29\x29\x2C\x31\x29","\x41\x76\x67\x20\x4F\x66\x66\x65\x72\x65\x64\x20\x50\x65\x72\x20\x48\x6F\x75\x72","\x31\x34\x35\x37\x32\x37\x35\x32\x36\x33\x30\x32\x32\x2D\x31\x32","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x4A\x6F\x69\x6E\x41\x74\x29\x29\x2C\x30\x29\x29","\x41\x76\x67\x20\x41\x62\x61\x6E\x64\x6F\x6E\x20\x54\x69\x6D\x65","\x31\x34\x35\x37\x32\x37\x30\x32\x32\x33\x38\x37\x30\x2D\x37","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31\x20\x41\x4E\x44\x20\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3C\x20\x32\x30\x29\x20\x54\x48\x45\x4E\x20\x31\x20\x45\x4C\x53\x45\x20\x30\x20\x45\x4E\x44\x29\x2F\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2B\x20\x53\x55\x4D\x28\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x3D\x31\x20\x41\x4E\x44\x20\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3E\x20\x32\x30\x29\x20\x54\x48\x45\x4E\x20\x31\x20\x45\x4C\x53\x45\x20\x30\x20\x45\x4E\x44\x29\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x53\x65\x72\x76\x69\x63\x65\x20\x4C\x65\x76\x65\x6C\x20\x32\x30\x20\x28\x25\x29","\x53\x45\x52\x56\x49\x43\x45\x20\x4C\x45\x56\x45\x4C\x20\x32\x30","\x31\x34\x35\x37\x39\x35\x32\x37\x35\x31\x36\x30\x35\x2D\x32","\x31\x34\x35\x36\x38\x34\x31\x31\x39\x31\x36\x36\x33\x2D\x32\x33","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x4D\x41\x58\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x29\x29","\x4F\x6C\x64\x65\x73\x74\x20\x57\x61\x69\x74\x69\x6E\x67\x20\x43\x61\x6C\x6C","\x31\x34\x35\x37\x32\x37\x35\x32\x35\x34\x30\x36\x31\x2D\x31\x30","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x3D\x31","\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x31\x34\x35\x37\x32\x36\x39\x30\x32\x32\x30\x36\x32\x2D\x32","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x61\x63\x77\x74\x69\x6D\x65\x29\x2C\x30\x29\x29","\x41\x76\x67\x20\x41\x43\x57\x20\x54\x69\x6D\x65","\x31\x34\x35\x37\x32\x37\x30\x32\x31\x39\x33\x35\x35\x2D\x36","\x31\x34\x35\x36\x38\x34\x31\x31\x39\x31\x36\x36\x34\x2D\x32\x34","\x2E\x2E\x2F\x73\x72\x63\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2D\x74\x69\x74\x6C\x65\x2E\x68\x74\x6D\x6C","\x33\x2D\x33\x2D\x33\x2D\x33","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C\x73","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x5F\x68\x69\x73\x74\x6F\x72\x79","\x74\x79\x70\x65\x3D\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22","\x4D\x61\x6E\x75\x61\x6C\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x31\x34\x35\x37\x32\x37\x36\x34\x35\x38\x34\x32\x34\x2D\x31\x34","\x74\x79\x70\x65\x3D\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22\x20\x41\x4E\x44\x20\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3D\x22\x41\x4E\x53\x57\x45\x52\x45\x44\x22","\x41\x6E\x73\x77\x65\x72\x65\x64","\x31\x34\x35\x37\x37\x31\x38\x35\x37\x39\x35\x32\x32\x2D\x32","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x53\x55\x4D\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x29","\x47\x6C\x6F\x62\x61\x6C\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x31\x34\x35\x37\x32\x37\x36\x34\x35\x33\x34\x36\x35\x2D\x31\x33","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x49\x46\x28\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3D\x22\x41\x4E\x53\x57\x45\x52\x45\x44\x22\x2C\x31\x2C\x30\x29\x29\x2F\x43\x4F\x55\x4E\x54\x28\x2A\x29\x2A\x31\x30\x30\x2C\x31\x29","\x41\x6E\x73\x77\x65\x72\x20\x52\x61\x74\x65\x20\x28\x25\x29","\x31\x34\x35\x37\x37\x31\x38\x35\x39\x31\x32\x34\x33\x2D\x33","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x2C\x30\x29\x29","\x41\x76\x67\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x31\x34\x35\x37\x37\x31\x38\x34\x38\x32\x33\x39\x36\x2D\x31","\x41\x67\x65\x6E\x74\x73\x20\x53\x74\x61\x74\x75\x73","\x6F\x6E\x6C\x69\x6E\x65\x3D\x31\x20\x41\x4E\x44\x20\x72\x6F\x6C\x65\x3D\x22\x61\x67\x65\x6E\x74\x22","\x4C\x6F\x67\x67\x65\x64","\x41\x47\x45\x4E\x54\x53","\x31\x34\x35\x37\x32\x37\x35\x32\x34\x38\x35\x32\x31\x2D\x39","\x6F\x6E\x6C\x69\x6E\x65\x3D\x31\x20\x41\x4E\x44\x20\x72\x6F\x6C\x65\x3D\x22\x61\x67\x65\x6E\x74\x22\x20\x41\x4E\x44\x20\x28\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65\x3D\x31\x20\x4F\x52\x20\x63\x68\x61\x74\x50\x61\x75\x73\x65\x3D\x31\x20\x4F\x52\x20\x6D\x61\x69\x6C\x50\x61\x75\x73\x65\x3D\x31\x20\x4F\x52\x20\x66\x61\x78\x50\x41\x75\x73\x65\x3D\x31\x29\x20\x61\x6E\x64\x20\x70\x61\x75\x73\x65\x54\x79\x70\x65\x20\x21\x3D\x22\x41\x43\x57\x22","\x50\x61\x75\x73\x65\x64","\x31\x34\x35\x37\x32\x37\x36\x34\x36\x32\x38\x34\x36\x2D\x31\x35","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65\x3D\x31\x20\x61\x6E\x64\x20\x70\x61\x75\x73\x65\x54\x79\x70\x65\x3D\x22\x41\x43\x57\x22","\x41\x43\x57","\x31\x34\x35\x37\x33\x36\x30\x34\x36\x34\x32\x30\x38\x2D\x31","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x64\x65\x73\x74\x72\x6F\x79","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x66\x6F\x72\x20\x4F\x75\x74\x67\x6F\x69\x6E\x67\x20\x46\x61\x78","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x5F\x2E","\x4F\x75\x74\x67\x6F\x69\x6E\x67\x20\x66\x61\x78\x20\x74\x6F\x20\x24\x7B\x46\x41\x58\x4E\x55\x4D\x42\x45\x52\x7D","\x73\x79\x73\x74\x65\x6D","\x41\x63\x63\x6F\x75\x6E\x74\x20\x24\x7B\x46\x41\x58\x4E\x41\x4D\x45\x7D","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x41\x6E\x73\x77\x65\x72","\x57\x61\x69\x74","\x46\x41\x58\x4F\x50\x54\x28\x65\x63\x6D\x29\x3D\x24\x7B\x46\x41\x58\x45\x43\x4D\x7D","\x46\x41\x58\x4F\x50\x54\x28\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F\x29\x3D\x24\x7B\x46\x41\x58\x48\x45\x41\x44\x45\x52\x49\x4E\x46\x4F\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64\x29\x3D\x24\x7B\x46\x41\x58\x4C\x4F\x43\x41\x4C\x53\x54\x41\x54\x49\x4F\x4E\x49\x44\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x69\x6E\x72\x61\x74\x65\x29\x3D\x24\x7B\x46\x41\x58\x4D\x49\x4E\x52\x41\x54\x45\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x61\x78\x72\x61\x74\x65\x29\x3D\x24\x7B\x46\x41\x58\x4D\x41\x58\x52\x41\x54\x45\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x6F\x64\x65\x6D\x29\x3D\x24\x7B\x46\x41\x58\x4D\x4F\x44\x45\x4D\x7D","\x46\x41\x58\x4F\x50\x54\x28\x67\x61\x74\x65\x77\x61\x79\x29\x3D\x24\x7B\x46\x41\x58\x47\x41\x54\x45\x57\x41\x59\x7D","\x46\x41\x58\x4F\x50\x54\x28\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74\x29\x3D\x24\x7B\x46\x41\x58\x54\x33\x38\x54\x49\x4D\x45\x4F\x55\x54\x7D","\x53\x65\x6E\x64\x46\x41\x58","\x24\x7B\x46\x41\x58\x4F\x55\x54\x46\x49\x4C\x45\x7D\x2C\x64\x73","\x48\x61\x6E\x67\x75\x70","\x52\x65\x77\x72\x69\x74\x69\x6E\x67\x20\x55\x73\x65\x72\x73\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x2E\x2E\x2E","\x61\x70\x70\x64\x61\x74\x61","\x53\x49\x50\x2F","\x2C\x2C\x74\x54\x78\x58","\x73\x61\x76\x65","\x55\x73\x65\x72\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x43\x6F\x6E\x74\x65\x78\x74\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x44\x65\x66\x61\x75\x6C\x74\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x28\x44\x4F\x20\x4E\x4F\x54\x20\x44\x45\x4C\x45\x54\x45\x29","\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x64\x61\x73\x68\x62\x6F\x61\x72\x64","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x44\x41\x53\x48\x42\x4F\x41\x52\x44","\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2F\x76\x6F\x69\x63\x65","\x79\x6F\x75\x72\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x59\x4F\x55\x52\x5F\x44\x41\x53\x48\x42\x4F\x41\x52\x44\x53","\x2F\x74\x6F\x6F\x6C\x73\x2F\x79\x6F\x75\x72\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73\x2F\x73\x68\x6F\x77\x2F\x31","\x73\x74\x61\x66\x66","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x53\x54\x41\x46\x46","\x61\x67\x65\x6E\x74\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x41\x47\x45\x4E\x54\x53","\x2F\x73\x74\x61\x66\x66\x2F\x61\x67\x65\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x4F\x4E\x54\x41\x43\x54\x5F\x4D\x41\x4E\x41\x47\x45\x52","\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2F\x6C\x69\x73\x74","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x48\x41\x4E\x4E\x45\x4C\x53","\x76\x6F\x69\x63\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x56\x4F\x49\x43\x45","\x63\x68\x61\x74","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x48\x41\x54","\x6D\x61\x69\x6C","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4D\x41\x49\x4C","\x66\x61\x78","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x46\x41\x58","\x73\x6D\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x53\x4D\x53","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x52\x45\x41\x4C\x54\x49\x4D\x45","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x76\x69\x65\x77\x2F\x61\x67\x65\x6E\x74\x73","\x74\x6F\x6F\x6C\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x54\x4F\x4F\x4C\x53","\x73\x71\x75\x61\x72\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x41\x4C\x4C\x59\x53\x51\x55\x41\x52\x45","\x2F\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x6C\x69\x73\x74","\x6A\x73\x63\x72\x69\x70\x74\x79","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4A\x53\x43\x52\x49\x50\x54\x59","\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x6C\x69\x73\x74","\x6D\x6F\x74\x69\x6F\x6E\x64\x69\x61\x6C\x65\x72","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4D\x4F\x54\x49\x4F\x4E\x5F\x44\x49\x41\x4C\x45\x52","\x2F\x6D\x6F\x74\x69\x6F\x6E\x64\x69\x61\x6C\x65\x72\x2F\x6C\x69\x73\x74\x73\x2F\x6C\x69\x73\x74","\x61\x6E\x61\x6C\x79\x74\x69\x63\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x41\x4E\x41\x4C\x59\x54\x49\x43\x53","\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x6C\x69\x73\x74","\x73\x65\x74\x74\x69\x6E\x67","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x53\x45\x54\x54\x49\x4E\x47\x53","\x2F\x73\x65\x74\x74\x69\x6E\x67\x2F\x75\x70\x64\x61\x74\x65\x73\x2F\x6C\x69\x73\x74","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x49\x4E\x54\x45\x47\x52\x41\x54\x49\x4F\x4E","\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x6C\x69\x73\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4F\x50\x45\x4E\x5F\x43\x48\x41\x4E\x4E\x45\x4C","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x72\x6F\x75\x74\x65\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x52\x4F\x55\x54\x45\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x72\x6F\x75\x74\x65\x73\x2F\x69\x6E\x62\x6F\x75\x6E\x64\x2F\x6C\x69\x73\x74","\x63\x6F\x6E\x74\x65\x78\x74\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x4F\x4E\x54\x45\x58\x54\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x63\x6F\x6E\x74\x65\x78\x74\x73\x2F\x6C\x69\x73\x74","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x56\x4F\x49\x43\x45\x4D\x41\x49\x4C\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x73\x2F\x6C\x69\x73\x74","\x6D\x6F\x68","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4D\x4F\x48","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x6D\x6F\x68\x2F\x6C\x69\x73\x74","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x52\x45\x43\x4F\x52\x44\x49\x4E\x47\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x6C\x69\x73\x74","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x76\x69\x65\x77\x2F\x61\x67\x65\x6E\x74\x73","\x63\x68\x61\x6E\x73\x70\x79","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x48\x41\x4E\x53\x50\x59","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x63\x68\x61\x6E\x73\x70\x79\x2F\x6C\x69\x73\x74","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x44\x49\x53\x50\x4F\x53\x49\x54\x49\x4F\x4E\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73\x2F\x6C\x69\x73\x74","\x77\x65\x62\x73\x69\x74\x65\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x57\x45\x42\x5F\x53\x49\x54\x45\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x63\x68\x61\x74\x2F\x77\x65\x62\x73\x69\x74\x65\x73\x2F\x6C\x69\x73\x74","\x71\x75\x65\x75\x65\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x51\x55\x45\x55\x45\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x63\x68\x61\x74\x2F\x71\x75\x65\x75\x65\x73\x2F\x6C\x69\x73\x74","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x63\x68\x61\x74\x2F\x72\x6F\x6F\x6D\x2F\x69\x6E\x74\x65\x72\x6E\x61\x6C\x2F\x6C\x69\x73\x74","\x6F\x66\x66\x6C\x69\x6E\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4F\x46\x46\x4C\x49\x4E\x45\x5F\x4D\x45\x53\x53\x41\x47\x45\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x63\x68\x61\x74\x2F\x6F\x66\x66\x6C\x69\x6E\x65\x2F\x6C\x69\x73\x74","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x63\x68\x61\x74\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x76\x69\x65\x77\x2F\x61\x67\x65\x6E\x74\x73","\x61\x63\x63\x6F\x75\x6E\x74\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x41\x43\x43\x4F\x55\x4E\x54\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x6D\x61\x69\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x6D\x61\x69\x6C\x2F\x71\x75\x65\x75\x65\x73\x2F\x6C\x69\x73\x74","\x69\x6E\x62\x6F\x78","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x49\x4E\x42\x4F\x58","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x6D\x61\x69\x6C\x2F\x69\x6E\x62\x6F\x78\x2F\x76\x69\x65\x77","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x6D\x61\x69\x6C\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x76\x69\x65\x77\x2F\x61\x67\x65\x6E\x74\x73","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x66\x61\x78\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x66\x61\x78\x2F\x71\x75\x65\x75\x65\x73\x2F\x6C\x69\x73\x74","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x66\x61\x78\x2F\x69\x6E\x62\x6F\x78\x2F\x76\x69\x65\x77","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x66\x61\x78\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x76\x69\x65\x77\x2F\x61\x67\x65\x6E\x74\x73","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x73\x6D\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x73\x6D\x73\x2F\x71\x75\x65\x75\x65\x73\x2F\x6C\x69\x73\x74","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x73\x6D\x73\x2F\x69\x6E\x62\x6F\x78\x2F\x76\x69\x65\x77","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x73\x6D\x73\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x76\x69\x65\x77\x2F\x61\x67\x65\x6E\x74\x73","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x71\x75\x65\x75\x65\x73\x2F\x6C\x69\x73\x74","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x69\x6E\x62\x6F\x78\x2F\x76\x69\x65\x77","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x76\x69\x65\x77\x2F\x61\x67\x65\x6E\x74\x73","\x74\x72\x69\x67\x67\x65\x72\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x54\x52\x49\x47\x47\x45\x52\x53","\x2F\x74\x6F\x6F\x6C\x73\x2F\x74\x72\x69\x67\x67\x65\x72\x73\x2F\x6C\x69\x73\x74","\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x41\x55\x54\x4F\x4D\x41\x54\x49\x4F\x4E\x53","\x2F\x74\x6F\x6F\x6C\x73\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73\x2F\x6C\x69\x73\x74","\x74\x72\x75\x6E\x6B\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x54\x52\x55\x4E\x4B\x53","\x2F\x74\x6F\x6F\x6C\x73\x2F\x74\x72\x75\x6E\x6B\x73\x2F\x6C\x69\x73\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x49\x4E\x54\x45\x52\x56\x41\x4C\x53","\x2F\x74\x6F\x6F\x6C\x73\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x73\x2F\x6C\x69\x73\x74","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x56\x41\x52\x49\x41\x42\x4C\x45\x53","\x2F\x74\x6F\x6F\x6C\x73\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x2F\x6C\x69\x73\x74","\x74\x61\x67\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x54\x41\x47\x53","\x2F\x74\x6F\x6F\x6C\x73\x2F\x74\x61\x67\x73\x2F\x6C\x69\x73\x74","\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x54\x45\x4D\x50\x4C\x41\x54\x45\x53","\x2F\x74\x6F\x6F\x6C\x73\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x6C\x69\x73\x74","\x70\x61\x75\x73\x65\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x50\x41\x55\x53\x45\x53","\x2F\x74\x6F\x6F\x6C\x73\x2F\x70\x61\x75\x73\x65\x73\x2F\x6C\x69\x73\x74","\x61\x6E\x73\x77\x65\x72\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x41\x4E\x4E\x45\x44\x5F\x41\x4E\x53\x57\x45\x52\x53","\x2F\x74\x6F\x6F\x6C\x73\x2F\x61\x6E\x73\x77\x65\x72\x73\x2F\x6C\x69\x73\x74","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x44\x41\x53\x48\x42\x4F\x41\x52\x44\x53\x5F\x4D\x41\x4E\x41\x47\x45\x52","\x2F\x74\x6F\x6F\x6C\x73\x2F\x79\x6F\x75\x72\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73\x2F\x6C\x69\x73\x74","\x73\x6F\x75\x6E\x64\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x53\x4F\x55\x4E\x44\x53","\x2F\x74\x6F\x6F\x6C\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x6C\x69\x73\x74","\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x53\x43\x48\x45\x44\x55\x4C\x45\x52","\x2F\x74\x6F\x6F\x6C\x73\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72\x2F\x6C\x69\x73\x74","\x45\x72\x72\x6F\x72\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x6F\x64\x75\x6C\x65\x73\x3A","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x6F\x64\x75\x6C\x65\x73","\x4D\x6F\x64\x75\x6C\x65","\x44\x65\x74\x61\x69\x6C\x73","\x44\x65\x74\x61\x69\x6C\x65\x64\x20\x71\x75\x65\x75\x65\x73\x20\x72\x65\x70\x6F\x72\x74","\x6A\x31\x32\x5F\x37","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x5D\x7D\x7D","\x43\x61\x6C\x6C\x73\x20\x52\x65\x73\x75\x6C\x74","\x53\x69\x6D\x70\x6C\x65\x20\x71\x75\x65\x75\x65\x20\x63\x61\x6C\x6C\x73\x20\x6F\x76\x65\x72\x76\x69\x65\x77","\x44\x65\x74\x61\x69\x6C\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x20\x61\x62\x6F\x75\x74\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x71\x75\x65\x75\x65\x20\x63\x61\x6C\x6C\x73","\x6A\x36\x30\x5F\x31","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x31\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x41\x67\x65\x6E\x74","\x41\x67\x65\x6E\x74\x20\x63\x61\x6C\x6C\x73\x20\x74\x69\x6D\x65\x72\x20\x48\x61\x6E\x64\x6C\x65\x20\x74\x69\x6D\x65\x3D\x20\x74\x61\x6C\x6B\x20\x74\x69\x6D\x65\x20\x2B\x20\x41\x43\x57\x20\x74\x69\x6D\x65","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x51\x75\x65\x75\x65\x20\x74\x69\x6D\x65\x72\x20\x48\x61\x6E\x64\x6C\x65\x20\x54\x69\x6D\x65\x3D\x20\x54\x61\x6C\x6B\x20\x54\x69\x6D\x65\x20\x2B\x20\x41\x56\x47\x20\x54\x49\x6D\x65","\x41\x6E\x73\x77\x65\x72\x20\x54\x69\x6D\x65\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x51\x75\x65\x75\x65\x73\x20\x61\x6E\x73\x77\x65\x72\x20\x74\x69\x6D\x65\x20\x70\x65\x72\x66\x6F\x72\x6D\x61\x6E\x63\x65","\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x43\x61\x75\x73\x65","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x74\x68\x65\x20\x63\x61\x6C\x6C\x73\x20\x63\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x63\x61\x75\x73\x65\x73","\x41\x6E\x73\x77\x65\x72\x20\x54\x69\x6D\x65\x20\x62\x79\x20\x48\x6F\x75\x72","\x41\x6E\x73\x77\x65\x72\x20\x74\x69\x6D\x65\x20\x20\x62\x79\x20\x68\x6F\x75\x72","\x44\x65\x74\x61\x69\x6C\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x20\x61\x62\x6F\x75\x74\x20\x74\x68\x65\x20\x75\x6E\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x63\x61\x6C\x6C\x73","\x6A\x36\x30\x5F\x32","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x30\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x55\x6E\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x55\x6E\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x73\x75\x6D\x6D\x61\x72\x79\x20\x62\x79\x20\x71\x75\x65\x75\x65","\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64\x20\x63\x61\x6C\x6C\x73","\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x73\x75\x6D\x6D\x61\x72\x79","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x31\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x41\x62\x61\x6E\x64\x6F\x6E\x20\x54\x69\x6D\x65\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x41\x62\x61\x6E\x64\x6F\x6E\x20\x74\x69\x6D\x65\x20\x70\x65\x72\x66\x6F\x72\x6D\x61\x6E\x63\x65\x20\x62\x79\x20\x71\x75\x65\x75\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x31\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x44\x61\x74\x65","\x51\x75\x65\x75\x65\x20\x63\x61\x6C\x6C\x73\x20\x73\x75\x6D\x6D\x61\x72\x79\x20\x62\x79\x20\x64\x61\x74\x65","\x6A\x36\x30\x5F\x33","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x48\x6F\x75\x72","\x43\x61\x6C\x6C\x73\x20\x64\x69\x73\x74\x72\x69\x62\x75\x74\x69\x6F\x6E\x20\x62\x79\x20\x68\x6F\x75\x72","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x44\x61\x79","\x43\x61\x6C\x6C\x73\x20\x64\x69\x73\x74\x72\x69\x62\x75\x74\x69\x6F\x6E\x20\x62\x79\x20\x64\x61\x79\x20\x6F\x66\x20\x74\x68\x65\x20\x6D\x6F\x6E\x74\x68","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x57\x65\x65\x6B\x64\x61\x79","\x43\x61\x6C\x6C\x73\x20\x64\x69\x73\x74\x72\x69\x62\x75\x74\x69\x6F\x6E\x20\x62\x79\x20\x64\x61\x79\x20\x6F\x66\x20\x74\x68\x65\x20\x77\x65\x65\x6B","\x53\x75\x6D\x6D\x61\x72\x79","\x43\x61\x6C\x6C\x73\x20\x64\x69\x73\x74\x72\x69\x62\x75\x74\x69\x6F\x6E\x20\x62\x79\x20\x71\x75\x65\x75\x65","\x43\x61\x6C\x6C\x73\x20\x64\x65\x74\x61\x69\x6C\x20\x28\x63\x64\x72\x29","\x6A\x35\x31\x5F\x31","\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x4D\x61\x6E\x75\x61\x6C\x20\x6F\x75\x74\x62\x6F\x75\x6E\x64\x20\x63\x61\x6C\x6C\x73\x20\x64\x65\x74\x61\x69\x6C\x65\x64\x20\x72\x65\x70\x6F\x72\x74","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x6F\x75\x74\x62\x6F\x75\x6E\x64\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x54\x79\x70\x65","\x53\x75\x6D\x6D\x61\x72\x79\x20\x72\x65\x70\x6F\x72\x74\x20\x6F\x66\x20\x74\x68\x65\x20\x63\x61\x6C\x6C\x73\x20\x74\x79\x70\x65","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C\x73\x20\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x63\x61\x6C\x6C\x73\x20\x67\x72\x6F\x75\x70\x65\x64\x20\x62\x79\x20\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x41\x67\x65\x6E\x74","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x6F\x75\x74\x62\x6F\x75\x6E\x64\x20\x63\x61\x6C\x6C\x73\x20\x67\x72\x6F\x75\x70\x65\x64\x20\x62\x79\x20\x61\x67\x65\x6E\x74","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x44\x61\x74\x65","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x6F\x75\x74\x62\x6F\x75\x6E\x64\x20\x63\x61\x6C\x6C\x73\x20\x67\x72\x6F\x75\x70\x65\x64\x20\x62\x79\x20\x64\x61\x74\x65","\x4C\x6F\x67\x69\x6E\x20\x54\x69\x6D\x65","\x41\x67\x65\x6E\x74\x27\x73\x20\x6C\x6F\x67\x69\x6E\x20\x74\x69\x6D\x65","\x6A\x31\x32\x5F\x35","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x79","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x4C\x4F\x47\x49\x4E\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x2C\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x76\x6F\x69\x63\x65\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x41\x63\x74\x69\x76\x69\x74\x69\x65\x73\x20\x53\x75\x6D\x6D\x61\x72\x79","\x41\x67\x65\x6E\x74\x27\x73\x20\x61\x63\x74\x69\x76\x69\x74\x69\x65\x73\x20\x72\x65\x70\x6F\x72\x74","\x6A\x38\x37\x5F\x31","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x76\x6F\x69\x63\x65\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x50\x61\x75\x73\x65\x20\x44\x65\x74\x61\x69\x6C\x73","\x41\x67\x65\x6E\x74\x73\x20\x73\x74\x61\x74\x75\x73\x20\x64\x65\x74\x61\x69\x6C\x73","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x76\x6F\x69\x63\x65\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x2C\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x50\x41\x55\x53\x45\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x41\x67\x65\x6E\x74\x27\x73\x20\x73\x74\x61\x74\x75\x73\x20\x64\x65\x74\x61\x69\x6C","\x50\x61\x75\x73\x65\x20\x54\x69\x6D\x65","\x41\x67\x65\x6E\x74\x27\x73\x20\x70\x61\x75\x73\x65\x20\x74\x69\x6D\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x50\x41\x55\x53\x45\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x2C\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x76\x6F\x69\x63\x65\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x43\x61\x6C\x6C\x79\x53\x71\x75\x61\x72\x65\x20\x53\x75\x6D\x6D\x61\x72\x79","\x6A\x38\x37\x5F\x32","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x42\x6C\x6F\x63\x6B\x73","\x43\x61\x6C\x6C\x79\x53\x71\x75\x61\x72\x65\x20\x42\x6C\x6F\x63\x6B\x73\x20\x44\x65\x74\x61\x69\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x73\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x65\x6D\x61\x69\x6C\x73\x20\x62\x79\x20\x61\x63\x63\x6F\x75\x6E\x74","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x74\x68\x65\x20\x65\x6D\x61\x69\x6C\x73\x20\x61\x63\x63\x65\x70\x74\x65\x64\x20\x62\x79\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x65\x61\x63\x68\x20\x61\x63\x63\x6F\x75\x6E\x74","\x6A\x31\x32\x5F\x34","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x61\x74\x69\x6E\x67\x20\x62\x79\x20\x41\x67\x65\x6E\x74","\x52\x65\x63\x6F\x72\x64\x73\x20\x72\x61\x74\x69\x6E\x67\x20\x62\x79\x20\x61\x67\x65\x6E\x74","\x6A\x31\x31\x30\x5F\x31","\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3E\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x72\x61\x74\x69\x6E\x67\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x30\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x52\x61\x74\x69\x6E\x67\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x52\x65\x63\x6F\x72\x64\x73\x20\x72\x61\x74\x69\x6E\x67\x20\x62\x79\x20\x71\x75\x65\x75\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x71\x75\x65\x75\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3E\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x72\x61\x74\x69\x6E\x67\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x30\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x57\x65\x62\x73\x69\x74\x65\x20\x53\x75\x6D\x6D\x61\x72\x79","\x43\x68\x61\x74\x20\x73\x65\x73\x73\x69\x6F\x6E\x20\x69\x6E\x66\x6F\x72\x6D\x61\x74\x69\x6F\x6E\x20\x62\x79\x20\x77\x65\x62\x73\x69\x74\x65","\x6A\x31\x32\x5F\x33","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x53\x65\x73\x73\x69\x6F\x6E\x20\x44\x65\x74\x61\x69\x6C","\x44\x65\x74\x61\x69\x6C\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x20\x61\x62\x6F\x75\x74\x20\x63\x68\x61\x74\x20\x73\x65\x73\x73\x69\x6F\x6E","\x43\x68\x61\x74\x20\x62\x79\x20\x41\x67\x65\x6E\x74","\x53\x65\x73\x73\x69\x6F\x6E\x20\x63\x68\x61\x74\x20\x62\x79\x20\x61\x67\x65\x6E\x74","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x6F\x6D\x70\x6C\x65\x74\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x31\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x43\x68\x61\x74\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x20\x73\x65\x73\x73\x69\x6F\x6E\x73\x20\x62\x79\x20\x71\x75\x65\x75\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x71\x75\x65\x75\x65\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x43\x68\x61\x74\x20\x62\x79\x20\x44\x61\x74\x65","\x53\x65\x73\x73\x69\x6F\x6E\x20\x63\x68\x61\x74\x20\x62\x79\x20\x64\x61\x74\x65","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x65\x6D\x61\x69\x6C\x73\x20\x62\x79\x20\x71\x75\x65\x75\x65","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x72\x65\x63\x65\x69\x76\x65\x64\x20\x65\x6D\x61\x69\x6C\x20\x62\x79\x20\x71\x75\x65\x75\x65","\x41\x63\x63\x65\x70\x74\x65\x64\x20\x65\x6D\x61\x69\x6C\x73\x20\x62\x79\x20\x61\x67\x65\x6E\x74","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x61\x63\x63\x65\x70\x74\x65\x64\x20\x65\x6D\x61\x69\x6C\x20\x62\x79\x20\x61\x67\x65\x6E\x74","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x69\x6D\x65\x6F\x75\x74\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x30\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x4D\x65\x73\x73\x61\x67\x65\x73\x20\x53\x75\x6D\x6D\x61\x72\x79\x20\x62\x79\x20\x44\x61\x74\x65","\x47\x6C\x6F\x62\x61\x6C\x20\x6D\x65\x73\x73\x61\x67\x65\x73\x20\x73\x75\x6D\x6D\x61\x72\x79\x20\x62\x79\x20\x64\x61\x74\x65","\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x20\x64\x65\x74\x61\x69\x6C","\x44\x65\x74\x61\x69\x6C\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x20\x61\x62\x6F\x75\x74\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73","\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x53\x75\x6D\x6D\x61\x72\x79","\x43\x6C\x6F\x73\x65\x64\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x20\x62\x79\x20\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x28\x66\x69\x6C\x74\x65\x72\x65\x64\x20\x62\x79\x20\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x6E\x6F\x74\x20\x6E\x75\x6C\x6C\x29","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x5D\x7D\x7D","\x43\x6C\x6F\x73\x65\x64\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x20\x62\x79\x20\x64\x61\x74\x65","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x63\x6C\x6F\x73\x65\x64\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x20\x67\x72\x6F\x75\x70\x65\x64\x20\x62\x79\x20\x64\x61\x74\x65\x20\x2B\x20\x61\x76\x65\x72\x61\x67\x65\x20\x68\x61\x6E\x64\x6C\x65\x20\x74\x69\x6D\x65\x20\x28\x66\x72\x6F\x6D\x20\x77\x68\x65\x6E\x20\x74\x68\x65\x20\x66\x69\x72\x73\x74\x20\x65\x6D\x61\x69\x6C\x20\x61\x72\x72\x69\x76\x65\x64\x20\x74\x6F\x20\x77\x68\x65\x6E\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x20\x68\x61\x73\x20\x62\x65\x65\x6E\x20\x63\x6C\x6F\x73\x65\x64\x29","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x4F\x52\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x73\x74\x61\x74\x75\x73\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x43\x4C\x4F\x53\x45\x44\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x6A\x31\x32\x5F\x36","\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x6A\x34\x5F\x31\x30","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x75\x6E\x69\x71\x75\x65\x69\x64","\x55\x6E\x69\x71\x75\x65\x49\x64","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x51\x75\x65\x75\x65\x4A\x6F\x69\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x51\x75\x65\x75\x65\x4C\x65\x61\x76\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x51\x75\x65\x75\x65\x41\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x51\x75\x65\x75\x65\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74","\x51\x75\x65\x75\x65\x45\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x41\x74","\x51\x75\x65\x75\x65\x45\x78\x69\x74\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x72\x65\x61\x73\x6F\x6E","\x51\x75\x65\x75\x65\x45\x78\x69\x74\x52\x65\x61\x73\x6F\x6E","\x44\x49\x44","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29","\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x54\x69\x6D\x65","\x49\x46\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31\x2C\x68\x6F\x6C\x64\x74\x69\x6D\x65\x2C\x6E\x75\x6C\x6C\x29","\x41\x6E\x73\x77\x65\x72\x54\x69\x6D\x65","\x43\x61\x6C\x6C\x65\x72\x49\x44","\x53\x74\x61\x72\x74\x54\x69\x6D\x65","\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31\x20\x54\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74\x20\x45\x4C\x53\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x4C\x65\x61\x76\x65\x41\x74\x20\x45\x4E\x44","\x45\x6E\x64\x54\x69\x6D\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31\x20\x54\x48\x45\x4E\x20\x22\x59\x45\x53\x22\x20\x45\x4C\x53\x45\x20\x22\x4E\x4F\x22\x20\x45\x4E\x44","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x41\x67\x65\x6E\x74","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64\x41\x74","\x41\x67\x65\x6E\x74\x43\x61\x6C\x6C\x65\x64\x41\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x41\x67\x65\x6E\x74\x43\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x61\x67\x65\x6E\x74\x61\x63\x77","\x41\x67\x65\x6E\x74\x41\x43\x57","\x61\x63\x77\x74\x69\x6D\x65","\x41\x67\x65\x6E\x74\x41\x43\x57\x54\x69\x6D\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x72\x65\x61\x73\x6F\x6E","\x48\x61\x6E\x67\x75\x70\x52\x65\x61\x73\x6F\x6E","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x4C\x61\x73\x74\x45\x76\x65\x6E\x74","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x53\x55\x4D","\x54\x6F\x74\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x54\x6F\x74\x41\x43\x57\x54\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65\x20\x2B\x20\x61\x63\x77\x74\x69\x6D\x65","\x54\x6F\x74\x48\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x29","\x41\x76\x67\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x61\x63\x77\x74\x69\x6D\x65\x29\x29","\x41\x76\x67\x41\x43\x57\x54\x69\x6D\x65","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x20\x2B\x20\x61\x63\x77\x74\x69\x6D\x65\x29\x2F\x43\x4F\x55\x4E\x54\x28\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x29","\x41\x76\x67\x48\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65","\x54\x6F\x74\x20\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x54\x6F\x74\x20\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x54\x6F\x74\x20\x41\x43\x57\x54\x69\x6D\x65","\x54\x6F\x74\x20\x48\x61\x6E\x64\x6C\x65\x20\x54\x69\x6D\x65","\x41\x76\x67\x20\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x29","\x41\x76\x67\x20\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x41\x76\x67\x20\x41\x43\x57\x54\x69\x6D\x65","\x41\x76\x67\x20\x48\x61\x6E\x64\x6C\x65\x20\x54\x69\x6D\x65","\x54\x6F\x74\x20\x41\x6E\x73\x77\x65\x72\x65\x64","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x3C\x31\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x41\x6E\x73\x77\x65\x72\x65\x64\x20\x3C\x31\x30\x73","\x52\x4F\x55\x4E\x44\x28\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x3C\x31\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29\x20\x2F\x20\x53\x55\x4D\x28\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x6E\x73\x77\x65\x72\x20\x52\x61\x74\x65\x20\x3C\x31\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3E\x3D\x31\x30\x20\x41\x4E\x44\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3C\x32\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x41\x6E\x73\x77\x65\x72\x65\x64\x20\x31\x30\x2D\x32\x30\x73","\x52\x4F\x55\x4E\x44\x28\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3E\x3D\x31\x30\x20\x41\x4E\x44\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3C\x32\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29\x20\x2F\x20\x53\x55\x4D\x28\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x6E\x73\x77\x65\x72\x20\x52\x61\x74\x65\x20\x31\x30\x2D\x32\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3E\x3D\x32\x30\x20\x41\x4E\x44\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3C\x33\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x41\x6E\x73\x77\x65\x72\x65\x64\x20\x32\x30\x2D\x33\x30\x73","\x52\x4F\x55\x4E\x44\x28\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3E\x3D\x32\x30\x20\x41\x4E\x44\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3C\x33\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29\x20\x2F\x20\x53\x55\x4D\x28\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x6E\x73\x77\x65\x72\x20\x52\x61\x74\x65\x20\x32\x30\x2D\x33\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3E\x3D\x33\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x41\x6E\x73\x77\x65\x72\x65\x64\x20\x3E\x33\x30\x73","\x52\x4F\x55\x4E\x44\x28\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3E\x3D\x33\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29\x20\x2F\x20\x53\x55\x4D\x28\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x6E\x73\x77\x65\x72\x20\x52\x61\x74\x65\x20\x3E\x33\x30\x73","\x52\x65\x61\x73\x6F\x6E","\x43\x4F\x55\x4E\x54","\x48\x6F\x75\x72","\x48\x4F\x55\x52","\x4A\x6F\x69\x6E\x41\x74","\x4C\x65\x61\x76\x65\x41\x74","\x41\x62\x61\x6E\x64\x6F\x6E","\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64\x41\x74","\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64\x52\x65\x61\x73\x6F\x6E","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x51\x75\x65\x75\x65\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x41\x62\x61\x6E\x64\x6F\x6E\x20\x54\x69\x6D\x65","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x45\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29","\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64\x20\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x54\x6F\x74\x20\x41\x62\x61\x6E\x64\x6F\x6E\x54\x69\x6D\x65","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x29\x29","\x41\x76\x67\x41\x62\x61\x6E\x64\x6F\x6E\x54\x69\x6D\x65","\x54\x6F\x74\x20\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64\x20\x54\x69\x6D\x65","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x45\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x29\x29","\x41\x76\x67\x20\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64\x20\x54\x49\x6D\x65","\x54\x6F\x74\x20\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3C\x31\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x3C\x31\x30\x73","\x52\x4F\x55\x4E\x44\x28\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3C\x31\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29\x20\x2F\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x52\x61\x74\x65\x3C\x31\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3E\x3D\x31\x30\x20\x41\x4E\x44\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3C\x36\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x31\x30\x2D\x36\x30\x73","\x52\x4F\x55\x4E\x44\x28\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3E\x3D\x31\x30\x20\x41\x4E\x44\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3C\x36\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29\x20\x20\x2F\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x52\x61\x74\x65\x20\x31\x30\x2D\x36\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3E\x3D\x36\x30\x20\x41\x4E\x44\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3C\x31\x32\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x36\x30\x2D\x31\x32\x30\x73","\x52\x4F\x55\x4E\x44\x28\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3E\x3D\x36\x30\x20\x41\x4E\x44\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3C\x31\x32\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29\x20\x20\x20\x2F\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x52\x61\x74\x65\x20\x36\x30\x2D\x31\x32\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3E\x3D\x31\x32\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x3E\x31\x32\x30\x73","\x52\x4F\x55\x4E\x44\x28\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3E\x3D\x31\x32\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29\x20\x20\x2F\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x52\x61\x74\x65\x3E\x31\x32\x30\x73","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x61\x74","\x44\x61\x74\x65","\x44\x41\x54\x45","\x4F\x66\x66\x65\x72\x65\x64","\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29\x29\x29","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x2F\x43\x4F\x55\x4E\x54\x28\x44\x49\x53\x54\x49\x4E\x43\x54\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x2A\x31\x30\x30\x2C\x31\x29","\x41\x6E\x73\x77\x65\x72\x20\x52\x61\x74\x65","\x44\x41\x59\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x61\x74\x29","\x44\x61\x79","\x44\x41\x59\x4E\x41\x4D\x45\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x61\x74\x29","\x44\x61\x79\x4F\x66\x57\x65\x65\x6B","\x41\x53\x43","\x55\x6E\x69\x71\x75\x65\x49\x44","\x74\x79\x70\x65","\x54\x79\x70\x65","\x74\x61\x67","\x54\x61\x67","\x73\x6F\x75\x72\x63\x65","\x53\x6F\x75\x72\x63\x65","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E","\x44\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x44\x65\x73\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x6C\x61\x73\x74\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4C\x61\x73\x74\x41\x70\x70","\x6C\x61\x73\x74\x64\x61\x74\x61","\x4C\x61\x73\x74\x44\x61\x74\x61","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x44\x75\x72\x61\x74\x69\x6F\x6E","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x41\x67\x65\x6E\x74\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x43\x61\x6C\x6C\x65\x72\x49\x64","\x62\x69\x6C\x6C\x61\x62\x6C\x65\x73\x65\x63\x6F\x6E\x64\x73","\x42\x69\x6C\x6C\x73\x65\x63","\x54\x6F\x74\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x29","\x53\x55\x42\x53\x54\x52\x49\x4E\x47\x5F\x49\x4E\x44\x45\x58\x28\x63\x68\x61\x6E\x6E\x65\x6C\x2C\x20\x27\x2D\x27\x2C\x20\x31\x29","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x53\x55\x4D\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x6E\x74\x65\x72\x41\x74\x29\x29\x29","\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x74\x79\x70\x65\x3D\x22\x4C\x4F\x47\x49\x4E\x22\x20\x54\x48\x45\x4E\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x6E\x74\x65\x72\x41\x74\x29\x20\x45\x4E\x44","\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x74\x79\x70\x65\x3D\x22\x54\x41\x4C\x4B\x49\x4E\x47\x22\x20\x54\x48\x45\x4E\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x6E\x74\x65\x72\x41\x74\x29\x20\x45\x4E\x44","\x54\x61\x6C\x6B\x20\x54\x69\x6D\x65","\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x74\x79\x70\x65\x3D\x22\x50\x41\x55\x53\x45\x22\x20\x54\x48\x45\x4E\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x6E\x74\x65\x72\x41\x74\x29\x20\x45\x4E\x44","\x65\x6E\x74\x65\x72\x41\x74","\x45\x6E\x74\x65\x72\x41\x74","\x65\x78\x69\x74\x41\x74","\x45\x78\x69\x74\x41\x74","\x64\x61\x74\x61\x31","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x49\x6E\x74\x65\x72\x66\x61\x63\x65","\x45\x76\x65\x6E\x74","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x6E\x74\x65\x72\x41\x74\x29\x29","\x50\x61\x75\x73\x65\x54\x79\x70\x65","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x6E\x61\x6D\x65","\x50\x72\x6F\x6A\x65\x63\x74\x20\x4E\x61\x6D\x65","\x64\x6E\x69\x64","\x6A\x6F\x69\x6E\x41\x74","\x53\x74\x61\x72\x74\x20\x54\x69\x6D\x65","\x6C\x65\x61\x76\x65\x41\x74","\x45\x6E\x64\x20\x54\x69\x6D\x65","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6C\x65\x61\x76\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6A\x6F\x69\x6E\x41\x74\x29","\x55\x6E\x69\x71\x75\x65\x20\x49\x64","\x43\x61\x6C\x6C\x65\x72\x20\x49\x64","\x6E\x6F\x64\x65","\x42\x6C\x6F\x63\x6B","\x64\x61\x74\x61","\x44\x61\x74\x61","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x41\x63\x63\x6F\x75\x6E\x74","\x52\x65\x63\x65\x69\x76\x65\x64","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x31\x2C\x6E\x75\x6C\x6C\x29","\x41\x63\x63\x65\x70\x74\x65\x64","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x31\x2C\x6E\x75\x6C\x6C\x29\x29\x2F\x43\x4F\x55\x4E\x54\x28\x44\x49\x53\x54\x49\x4E\x43\x54\x28\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x29\x2A\x31\x30\x30\x2C\x31\x29","\x41\x63\x63\x65\x70\x74\x20\x52\x61\x74\x65","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x20\x41\x4E\x44\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x71\x75\x65\x75\x65\x22\x2C\x31\x2C\x6E\x75\x6C\x6C\x29","\x41\x63\x63\x65\x70\x74\x65\x64\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x20\x41\x4E\x44\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x66\x69\x64\x65\x6C\x69\x74\x79\x22\x2C\x31\x2C\x6E\x75\x6C\x6C\x29","\x41\x63\x63\x65\x70\x74\x20\x62\x79\x20\x46\x69\x64\x65\x6C\x69\x74\x79","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x20\x41\x4E\x44\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x61\x67\x65\x6E\x74\x22\x2C\x31\x2C\x6E\x75\x6C\x6C\x29","\x41\x63\x63\x65\x70\x74\x65\x64\x20\x62\x79\x20\x41\x67\x65\x6E\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x52\x65\x63\x6F\x72\x64\x65\x64\x20\x43\x61\x6C\x6C\x73","\x72\x61\x74\x69\x6E\x67","\x54\x6F\x74\x61\x6C\x20\x52\x61\x74\x69\x6E\x67","\x41\x76\x67\x20\x52\x61\x74\x69\x6E\x67","\x41\x56\x47","\x52\x61\x74\x65\x64\x20\x43\x61\x6C\x6C\x73","\x77\x65\x62\x73\x69\x74\x65\x6E\x61\x6D\x65","\x57\x65\x62\x53\x69\x74\x65","\x53\x65\x73\x73\x69\x6F\x6E\x73","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x62\x61\x6E\x64\x6F\x6E","\x74\x69\x6D\x65\x6F\x75\x74","\x54\x69\x6D\x65\x6F\x75\x74","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6C\x65\x61\x76\x65\x41\x74\x29","\x54\x6F\x74\x20\x53\x65\x73\x73\x69\x6F\x6E\x20\x54\x69\x6D\x65","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6C\x65\x61\x76\x65\x41\x74\x29\x29\x29","\x41\x76\x67\x20\x53\x65\x73\x73\x69\x6F\x6E\x20\x54\x69\x6D\x65","\x57\x65\x62\x73\x69\x74\x65","\x76\x69\x73\x69\x74\x6F\x72\x6E\x61\x6D\x65","\x56\x69\x73\x69\x74\x6F\x72\x4E\x61\x6D\x65","\x76\x69\x73\x69\x74\x6F\x72\x65\x6D\x61\x69\x6C","\x56\x69\x73\x69\x74\x6F\x72\x45\x6D\x61\x69\x6C","\x4D\x65\x6D\x65\x62\x65\x72\x4E\x61\x6D\x65","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x51\x75\x65\x75\x65\x4E\x61\x6D\x65","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x52\x65\x61\x73\x6F\x6E","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x52\x65\x61\x73\x6F\x6E","\x53\x65\x73\x73\x69\x6F\x6E","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x71\x75\x65\x75\x65\x22\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x46\x72\x6F\x6D\x51\x75\x65\x75\x65","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x61\x67\x65\x6E\x74\x22\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x44\x69\x72\x65\x63\x74\x54\x6F\x41\x67\x65\x6E\x74","\x53\x65\x73\x73\x69\x6F\x6E\x20\x54\x69\x6D\x65","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x2F\x43\x4F\x55\x4E\x54\x28\x44\x49\x53\x54\x49\x4E\x43\x54\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x20\x52\x61\x74\x65","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x31\x2C\x30\x29","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x31\x2C\x6E\x75\x6C\x6C\x29\x29\x2F\x43\x4F\x55\x4E\x54\x28\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x2A\x31\x30\x30\x2C\x31\x29","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6C\x65\x61\x76\x65\x61\x74\x29\x2D\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6A\x6F\x69\x6E\x61\x74\x29\x2C\x4E\x55\x4C\x4C\x29\x29\x29","\x41\x76\x67\x20\x41\x63\x63\x65\x70\x74\x20\x54\x69\x6D\x65","\x54\x6F\x74\x20\x41\x63\x63\x65\x70\x74\x65\x64","\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x66\x69\x64\x65\x6C\x69\x74\x79\x22\x2C\x31\x2C\x30\x29","\x46\x69\x64\x65\x6C\x69\x74\x79","\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x61\x67\x65\x6E\x74\x22\x2C\x31\x2C\x30\x29","\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x71\x75\x65\x75\x65\x22\x2C\x31\x2C\x30\x29","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x49\x46\x28\x73\x74\x61\x74\x75\x73\x3D\x22\x52\x45\x43\x45\x49\x56\x45\x44\x22\x2C\x31\x2C\x30\x29","\x49\x46\x28\x73\x74\x61\x74\x75\x73\x3D\x22\x53\x45\x4E\x54\x22\x2C\x31\x2C\x30\x29","\x53\x65\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74","\x73\x74\x61\x74\x75\x73","\x6C\x61\x73\x74\x45\x76\x65\x6E\x74","\x61\x72\x72\x69\x76\x65\x64\x41\x74","\x6F\x70\x65\x6E\x65\x64\x41\x74","\x63\x6C\x6F\x73\x65\x64\x41\x74","\x6D\x61\x69\x6C\x49\x6E","\x6D\x61\x69\x6C\x4F\x75\x74","\x50\x61\x72\x65\x6E\x74\x49\x64","\x63\x6F\x75\x6E\x74\x28\x2A\x29","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x63\x6C\x6F\x73\x65\x64\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x61\x72\x72\x69\x76\x65\x64\x41\x74\x29\x29\x29","\x44\x61\x74\x65\x54\x69\x6D\x65","\x49\x64","\x66\x72\x6F\x6D","\x66\x72\x6F\x6D\x4E\x75\x6D\x62\x65\x72","\x74\x6F","\x74\x6F\x4E\x75\x6D\x62\x65\x72","\x53\x74\x61\x74\x75\x73","\x41\x67\x65\x6E\x74\x4E\x61\x6D\x65","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x74\x69\x63\x6B\x65\x74\x49\x64","\x54\x69\x63\x6B\x65\x74\x49\x44","\x45\x72\x72\x6F\x72\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x41\x6E\x61\x6C\x79\x74\x69\x63\x73\x3A","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x41\x6E\x61\x6C\x79\x74\x69\x63\x73","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x5B\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x43\x75\x73\x74\x6F\x6D\x20\x52\x65\x70\x6F\x72\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x22\x69\x63\x6F\x6E\x2D\x62\x6F\x6F\x6B\x2D\x6F\x70\x65\x6E\x22\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x23\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x32\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x4D\x79\x20\x52\x65\x70\x6F\x72\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x32\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x32\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x5D","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x5B\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x4D\x6F\x74\x69\x6F\x6E\x20\x52\x65\x70\x6F\x72\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x22\x69\x63\x6F\x6E\x2D\x62\x6F\x6F\x6B\x2D\x6F\x70\x65\x6E\x22\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x23\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x32\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x56\x6F\x69\x63\x65\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x32\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x32\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x37\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x51\x75\x65\x75\x65\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x37\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x37\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x31\x32\x5F\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x36\x30\x5F\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x41\x6E\x73\x77\x65\x72\x65\x64\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x36\x30\x5F\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x36\x30\x5F\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x31\x32\x5F\x37\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x36\x30\x5F\x32\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x55\x6E\x61\x6E\x73\x77\x65\x72\x65\x64\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x36\x30\x5F\x32\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x36\x30\x5F\x32\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x31\x32\x5F\x37\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x36\x30\x5F\x33\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x44\x69\x73\x74\x72\x69\x62\x75\x74\x69\x6F\x6E\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x36\x30\x5F\x33\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x36\x30\x5F\x33\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x31\x32\x5F\x37\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x35\x31\x5F\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x43\x61\x6C\x6C\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x35\x31\x5F\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x35\x31\x5F\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x31\x32\x5F\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x38\x37\x5F\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x41\x67\x65\x6E\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x38\x37\x5F\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x38\x37\x5F\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x31\x32\x5F\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x38\x37\x5F\x32\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x43\x61\x6C\x6C\x79\x53\x71\x75\x61\x72\x65\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x38\x37\x5F\x32\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x38\x37\x5F\x32\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x31\x32\x5F\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x31\x30\x5F\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x31\x30\x5F\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x31\x31\x30\x5F\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x31\x32\x5F\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x31\x30\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x31\x30\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x31\x30\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x31\x32\x5F\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x33\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x43\x68\x61\x74\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x33\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x33\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x34\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x45\x2D\x4D\x61\x69\x6C\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x34\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x34\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x36\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x53\x4D\x53\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x36\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x36\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x35\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x41\x67\x65\x6E\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x35\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x35\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x5D","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x53\x65\x74\x74\x69\x6E\x67\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x73\x70\x72\x65\x61\x64","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x53\x65\x74\x74\x69\x6E\x67"];_0x4f50[0];var _=require(_0x4f50[1]);var util=require(_0x4f50[2]);var models=require(_0x4f50[3]);var sequelize=require(_0x4f50[3])[_0x4f50[4]];var _agents=[];var _voiceQueues=[];var _mailQueues=[];var _chatQueues=[];var _miller,_doe;var _setting;return models[_0x4f50[976]][_0x4f50[970]]({where:{id:1},defaults:{id:1,min_internal:1000,min_mailbox:1000,agi_port:4573,automation_timeout:3600,soundPath:_0x4f50[975]}})[_0x4f50[974]](function(_0xd284xd){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[973]));return _0xd284xd})[_0x4f50[11]](function(_0xd284xd){_setting= _0xd284xd;if(_setting[_0x4f50[7]]){models[_0x4f50[43]][_0x4f50[22]]([{role:_0x4f50[46],fullname:_0x4f50[47],email:_0x4f50[48],name:_0x4f50[46],password:_0x4f50[49],defaultuser:_0x4f50[46],internal:1000}],{ignoreDuplicates:true,individualHooks:true})[_0x4f50[11]](function(_0xd284x12){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[35],_[_0x4f50[15]](_0xd284x12,_0x4f50[14])[_0x4f50[13]]()));return models[_0x4f50[45]][_0x4f50[44]]({name:_0x4f50[36],description:_0x4f50[36],defaultEntry:true,Users:[{role:_0x4f50[37],fullname:_0x4f50[38],email:_0x4f50[39],name:_0x4f50[28],password:_0x4f50[40],defaultuser:_0x4f50[28],internal:1001},{role:_0x4f50[37],fullname:_0x4f50[41],email:_0x4f50[42],name:_0x4f50[26],password:_0x4f50[40],defaultuser:_0x4f50[26],internal:1002}]},{include:[{model:models[_0x4f50[43]]}]})})[_0x4f50[11]](function(_0xd284x11){_agents= _0xd284x11[_0x4f50[29]];console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[30],_[_0x4f50[15]](_0xd284x11.Users,_0x4f50[14])[_0x4f50[13]]()));console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[31],_0xd284x11[_0x4f50[14]]));return models[_0x4f50[34]][_0x4f50[22]]([{name:_0x4f50[18],musiconhold:_0x4f50[32],strategy:_0x4f50[19]},{name:_0x4f50[20],musiconhold:_0x4f50[32],strategy:_0x4f50[33]}],{ignoreDuplicates:true,individualHooks:true})})[_0x4f50[11]](function(_0xd284x10){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[25],_[_0x4f50[15]](_0xd284x10,_0x4f50[14])[_0x4f50[13]]()));_voiceQueues= _0xd284x10;_miller= _[_0x4f50[27]](_agents,{name:_0x4f50[26]});_doe= _[_0x4f50[27]](_agents,{name:_0x4f50[28]});return _voiceQueues[0][_0x4f50[17]](_miller[_0x4f50[9]])})[_0x4f50[11]](function(){return _voiceQueues[1][_0x4f50[10]]([_miller[_0x4f50[9]],_doe[_0x4f50[9]]])})[_0x4f50[11]](function(){return models[_0x4f50[24]][_0x4f50[22]]([{name:_0x4f50[18],timeout:5,strategy:_0x4f50[19]},{name:_0x4f50[20],timeout:5,strategy:_0x4f50[21]}],{ignoreDuplicates:true,individualHooks:true})})[_0x4f50[11]](function(_0xd284xf){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[12],_[_0x4f50[15]](_0xd284xf,_0x4f50[14])[_0x4f50[13]]()));_mailQueues= _0xd284xf;return _mailQueues[0][_0x4f50[17]](_miller[_0x4f50[9]])})[_0x4f50[11]](function(){return _mailQueues[1][_0x4f50[10]]([_miller[_0x4f50[9]],_doe[_0x4f50[9]]])})[_0x4f50[11]](function(){return models[_0x4f50[23]][_0x4f50[22]]([{name:_0x4f50[18],timeout:5,strategy:_0x4f50[19]},{name:_0x4f50[20],timeout:5,strategy:_0x4f50[21]}],{ignoreDuplicates:true,individualHooks:true})})[_0x4f50[11]](function(_0xd284xe){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[12],_[_0x4f50[15]](_0xd284xe,_0x4f50[14])[_0x4f50[13]]()));_chatQueues= _0xd284xe;return _chatQueues[0][_0x4f50[17]](_miller[_0x4f50[9]])})[_0x4f50[11]](function(){return _chatQueues[1][_0x4f50[10]]([_miller[_0x4f50[9]],_doe[_0x4f50[9]]])})[_0x4f50[6]](function(_0xd284xc){console[_0x4f50[8]](_0xd284xc)});models[_0x4f50[63]][_0x4f50[22]]([{name:_0x4f50[51],prefix:_0x4f50[52],description:_0x4f50[53],options:_0x4f50[54]},{name:_0x4f50[55],prefix:_0x4f50[56],description:_0x4f50[57],options:_0x4f50[58]},{name:_0x4f50[59],prefix:_0x4f50[60],description:_0x4f50[61],options:_0x4f50[62]}],{ignoreDuplicates:true,individualHooks:true})[_0x4f50[11]](function(_0xd284x13){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[50],_[_0x4f50[15]](_0xd284x13,_0x4f50[14])[_0x4f50[13]]()))});models[_0x4f50[67]][_0x4f50[44]]({name:_0x4f50[65],description:_0x4f50[66],defaultEntry:true})[_0x4f50[11]](function(_0xd284x14){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[64],_0xd284x14[_0x4f50[14]]))});models[_0x4f50[73]][_0x4f50[44]]({name:_0x4f50[32],directory:_0x4f50[69],mode:_0x4f50[70],sort:_0x4f50[71],format:_0x4f50[72],defaultEntry:true})[_0x4f50[11]](function(_0xd284x15){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[68],_0xd284x15[_0x4f50[14]]))});models[_0x4f50[81]][_0x4f50[22]]([{name:_0x4f50[75]},{description:_0x4f50[76],name:_0x4f50[77]},{description:_0x4f50[78],name:_0x4f50[79]},{name:_0x4f50[80]}],{ignoreDuplicates:true,individualHooks:true})[_0x4f50[11]](function(_0xd284x16){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[74],_[_0x4f50[15]](_0xd284x16,_0x4f50[14])[_0x4f50[13]]()))});models[_0x4f50[85]][_0x4f50[22]]([{name:_0x4f50[83]},{name:_0x4f50[84]}],{ignoreDuplicates:true,individualHooks:true})[_0x4f50[11]](function(_0xd284x17){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[82],_[_0x4f50[15]](_0xd284x17,_0x4f50[14])[_0x4f50[13]]()))});models[_0x4f50[92]][_0x4f50[44]]({name:_0x4f50[87],context:_0x4f50[88],callingpres:_0x4f50[89],deny:_0x4f50[90],permit:_0x4f50[90],secret:_0x4f50[91]})[_0x4f50[11]](function(_0xd284x18){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[86],_0xd284x18[_0x4f50[14]]))});models[_0x4f50[143]][_0x4f50[44]]({context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[98],app:_0x4f50[99],appdata:_0x4f50[100],type:_0x4f50[101],description:_0x4f50[102],Applications:[{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[103],app:_0x4f50[104],appdata:_0x4f50[105],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[106],app:_0x4f50[107],appdata:_0x4f50[108],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[109],app:_0x4f50[110],appdata:_0x4f50[111],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[112],app:_0x4f50[110],appdata:_0x4f50[113],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[114],app:_0x4f50[110],appdata:_0x4f50[115],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[116],app:_0x4f50[117],appdata:_0x4f50[118],type:_0x4f50[101],interval:_0x4f50[119],isApp:true},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[120],app:_0x4f50[110],appdata:_0x4f50[121],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[122],app:_0x4f50[110],appdata:_0x4f50[123],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[124],app:_0x4f50[107],appdata:_0x4f50[125],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[126],app:_0x4f50[110],appdata:_0x4f50[111],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[127],app:_0x4f50[110],appdata:_0x4f50[113],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[128],app:_0x4f50[110],appdata:_0x4f50[115],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[129],app:_0x4f50[130],appdata:_0x4f50[131],type:_0x4f50[101],interval:_0x4f50[119],isApp:true},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[132],app:_0x4f50[110],appdata:_0x4f50[121],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[133],app:_0x4f50[110],appdata:_0x4f50[134],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[135],app:_0x4f50[107],appdata:_0x4f50[136],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[137],app:_0x4f50[110],appdata:_0x4f50[111],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[138],app:_0x4f50[110],appdata:_0x4f50[113],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[139],app:_0x4f50[110],appdata:_0x4f50[115],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[140],app:_0x4f50[117],appdata:_0x4f50[118],type:_0x4f50[101],interval:_0x4f50[119],isApp:true},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[141],app:_0x4f50[110],appdata:_0x4f50[121],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[97],priority:_0x4f50[142],app:_0x4f50[110],appdata:_0x4f50[123],type:_0x4f50[101]}]},{include:[{model:models[_0x4f50[143]],as:_0x4f50[144]}]})[_0x4f50[11]](function(_0xd284x19){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[93],_0xd284x19[_0x4f50[94]],_0xd284x19[_0x4f50[95]]))});models[_0x4f50[143]][_0x4f50[44]]({context:_0x4f50[96],exten:_0x4f50[145],priority:_0x4f50[98],app:_0x4f50[99],appdata:_0x4f50[100],type:_0x4f50[101],description:_0x4f50[146],Applications:[{context:_0x4f50[96],exten:_0x4f50[145],priority:_0x4f50[103],app:_0x4f50[104],appdata:_0x4f50[105],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[145],priority:_0x4f50[106],app:_0x4f50[107],appdata:_0x4f50[108],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[145],priority:_0x4f50[109],app:_0x4f50[110],appdata:_0x4f50[111],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[145],priority:_0x4f50[112],app:_0x4f50[110],appdata:_0x4f50[113],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[145],priority:_0x4f50[114],app:_0x4f50[147],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[145],priority:_0x4f50[116],app:_0x4f50[148],appdata:_0x4f50[149],type:_0x4f50[101],interval:_0x4f50[119],isApp:true},{context:_0x4f50[96],exten:_0x4f50[145],priority:_0x4f50[120],app:_0x4f50[110],appdata:_0x4f50[121],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[145],priority:_0x4f50[122],app:_0x4f50[110],appdata:_0x4f50[150],type:_0x4f50[101]}]},{include:[{model:models[_0x4f50[143]],as:_0x4f50[144]}]})[_0x4f50[11]](function(_0xd284x19){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[93],_0xd284x19[_0x4f50[94]],_0xd284x19[_0x4f50[95]]))});models[_0x4f50[143]][_0x4f50[44]]({context:_0x4f50[96],exten:_0x4f50[151],priority:_0x4f50[98],app:_0x4f50[99],appdata:_0x4f50[100],type:_0x4f50[101],description:_0x4f50[146],Applications:[{context:_0x4f50[96],exten:_0x4f50[151],priority:_0x4f50[103],app:_0x4f50[104],appdata:_0x4f50[105],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[151],priority:_0x4f50[106],app:_0x4f50[107],appdata:_0x4f50[108],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[151],priority:_0x4f50[109],app:_0x4f50[110],appdata:_0x4f50[111],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[151],priority:_0x4f50[112],app:_0x4f50[110],appdata:_0x4f50[113],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[151],priority:_0x4f50[114],app:_0x4f50[110],appdata:_0x4f50[115],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[151],priority:_0x4f50[116],app:_0x4f50[152],appdata:_0x4f50[153],type:_0x4f50[101],interval:_0x4f50[119],isApp:true},{context:_0x4f50[96],exten:_0x4f50[151],priority:_0x4f50[120],app:_0x4f50[110],appdata:_0x4f50[121],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[151],priority:_0x4f50[122],app:_0x4f50[110],appdata:_0x4f50[154],type:_0x4f50[101]}]},{include:[{model:models[_0x4f50[143]],as:_0x4f50[144]}]})[_0x4f50[11]](function(_0xd284x19){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[93],_0xd284x19[_0x4f50[94]],_0xd284x19[_0x4f50[95]]))});models[_0x4f50[143]][_0x4f50[44]]({context:_0x4f50[96],exten:_0x4f50[155],priority:_0x4f50[98],app:_0x4f50[99],appdata:_0x4f50[100],type:_0x4f50[101],description:_0x4f50[146],Applications:[{context:_0x4f50[96],exten:_0x4f50[155],priority:_0x4f50[103],app:_0x4f50[104],appdata:_0x4f50[105],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[155],priority:_0x4f50[106],app:_0x4f50[107],appdata:_0x4f50[108],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[155],priority:_0x4f50[109],app:_0x4f50[110],appdata:_0x4f50[111],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[155],priority:_0x4f50[112],app:_0x4f50[110],appdata:_0x4f50[113],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[155],priority:_0x4f50[114],app:_0x4f50[110],appdata:_0x4f50[115],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[155],priority:_0x4f50[116],app:_0x4f50[152],appdata:_0x4f50[156],type:_0x4f50[101],interval:_0x4f50[119],isApp:true},{context:_0x4f50[96],exten:_0x4f50[155],priority:_0x4f50[120],app:_0x4f50[110],appdata:_0x4f50[121],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[155],priority:_0x4f50[122],app:_0x4f50[110],appdata:_0x4f50[154],type:_0x4f50[101]}]},{include:[{model:models[_0x4f50[143]],as:_0x4f50[144]}]})[_0x4f50[11]](function(_0xd284x19){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[93],_0xd284x19[_0x4f50[94]],_0xd284x19[_0x4f50[95]]))});models[_0x4f50[143]][_0x4f50[44]]({context:_0x4f50[96],exten:_0x4f50[157],priority:_0x4f50[98],app:_0x4f50[99],appdata:_0x4f50[100],type:_0x4f50[101],description:_0x4f50[146],Applications:[{context:_0x4f50[96],exten:_0x4f50[157],priority:_0x4f50[103],app:_0x4f50[104],appdata:_0x4f50[105],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[157],priority:_0x4f50[106],app:_0x4f50[107],appdata:_0x4f50[108],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[157],priority:_0x4f50[109],app:_0x4f50[110],appdata:_0x4f50[111],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[157],priority:_0x4f50[112],app:_0x4f50[110],appdata:_0x4f50[113],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[157],priority:_0x4f50[114],app:_0x4f50[110],appdata:_0x4f50[115],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[157],priority:_0x4f50[116],app:_0x4f50[152],appdata:_0x4f50[158],type:_0x4f50[101],interval:_0x4f50[119],isApp:true},{context:_0x4f50[96],exten:_0x4f50[157],priority:_0x4f50[120],app:_0x4f50[110],appdata:_0x4f50[121],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[157],priority:_0x4f50[122],app:_0x4f50[110],appdata:_0x4f50[154],type:_0x4f50[101]}]},{include:[{model:models[_0x4f50[143]],as:_0x4f50[144]}]})[_0x4f50[11]](function(_0xd284x19){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[93],_0xd284x19[_0x4f50[94]],_0xd284x19[_0x4f50[95]]))});models[_0x4f50[143]][_0x4f50[44]]({context:_0x4f50[96],exten:_0x4f50[159],priority:_0x4f50[98],app:_0x4f50[99],appdata:_0x4f50[160],type:_0x4f50[161],description:_0x4f50[160],Applications:[{context:_0x4f50[96],exten:_0x4f50[159],priority:_0x4f50[103],app:_0x4f50[104],appdata:_0x4f50[162],type:_0x4f50[161]},{context:_0x4f50[96],exten:_0x4f50[159],priority:_0x4f50[106],app:_0x4f50[104],appdata:_0x4f50[163],type:_0x4f50[161]},{context:_0x4f50[96],exten:_0x4f50[159],priority:_0x4f50[109],app:_0x4f50[107],appdata:_0x4f50[164],type:_0x4f50[161]},{context:_0x4f50[96],exten:_0x4f50[159],priority:_0x4f50[112],app:_0x4f50[110],appdata:_0x4f50[111],type:_0x4f50[161]},{context:_0x4f50[96],exten:_0x4f50[159],priority:_0x4f50[114],app:_0x4f50[110],appdata:_0x4f50[113],type:_0x4f50[161]},{context:_0x4f50[96],exten:_0x4f50[159],priority:_0x4f50[116],app:_0x4f50[110],appdata:_0x4f50[115],type:_0x4f50[161]},{context:_0x4f50[96],exten:_0x4f50[159],priority:_0x4f50[120],app:_0x4f50[165],appdata:_0x4f50[166],type:_0x4f50[161],interval:_0x4f50[119],isApp:true},{context:_0x4f50[96],exten:_0x4f50[159],priority:_0x4f50[122],app:_0x4f50[110],appdata:_0x4f50[121],type:_0x4f50[161]},{context:_0x4f50[96],exten:_0x4f50[159],priority:_0x4f50[124],app:_0x4f50[110],appdata:_0x4f50[167],type:_0x4f50[161]}]},{include:[{model:models[_0x4f50[143]],as:_0x4f50[144]}]})[_0x4f50[11]](function(_0xd284x19){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[93],_0xd284x19[_0x4f50[94]],_0xd284x19[_0x4f50[95]]))});models[_0x4f50[143]][_0x4f50[44]]({context:_0x4f50[96],exten:_0x4f50[168],priority:_0x4f50[98],app:_0x4f50[99],appdata:_0x4f50[100],type:_0x4f50[101],description:_0x4f50[169],Applications:[{context:_0x4f50[96],exten:_0x4f50[168],priority:_0x4f50[103],app:_0x4f50[104],appdata:_0x4f50[105],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[168],priority:_0x4f50[106],app:_0x4f50[107],appdata:_0x4f50[108],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[168],priority:_0x4f50[109],app:_0x4f50[110],appdata:_0x4f50[111],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[168],priority:_0x4f50[112],app:_0x4f50[110],appdata:_0x4f50[113],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[168],priority:_0x4f50[114],app:_0x4f50[147],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[168],priority:_0x4f50[116],app:_0x4f50[148],appdata:_0x4f50[170],type:_0x4f50[101],interval:_0x4f50[119],isApp:true},{context:_0x4f50[96],exten:_0x4f50[168],priority:_0x4f50[120],app:_0x4f50[110],appdata:_0x4f50[121],type:_0x4f50[101]},{context:_0x4f50[96],exten:_0x4f50[168],priority:_0x4f50[122],app:_0x4f50[110],appdata:_0x4f50[150],type:_0x4f50[101]}]},{include:[{model:models[_0x4f50[143]],as:_0x4f50[144]}]})[_0x4f50[11]](function(_0xd284x19){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[93],_0xd284x19[_0x4f50[94]],_0xd284x19[_0x4f50[95]]))});models[_0x4f50[184]][_0x4f50[22]]([{"\x6E\x61\x6D\x65":_0x4f50[172],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[173],"\x70\x72\x65\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E":_0x4f50[174],"\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E":_0x4f50[174]},{"\x6E\x61\x6D\x65":_0x4f50[175],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[176],"\x70\x72\x65\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E":_0x4f50[177],"\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E":_0x4f50[177]},{"\x6E\x61\x6D\x65":_0x4f50[178],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[179],"\x70\x72\x65\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E":_0x4f50[180],"\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E":_0x4f50[180]},{"\x6E\x61\x6D\x65":_0x4f50[181],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[182],"\x70\x72\x65\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E":_0x4f50[183],"\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E":_0x4f50[183]}])[_0x4f50[11]](function(_0xd284x1a){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[171],_[_0x4f50[15]](_0xd284x1a,_0x4f50[14])[_0x4f50[13]]()))});models[_0x4f50[188]][_0x4f50[44]]({name:_0x4f50[186],dsn:_0x4f50[187]})[_0x4f50[11]](function(_0xd284x1b){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[185],_0xd284x1b[_0x4f50[14]]))});var _0xd284x1c=[{name:_0x4f50[189],version:_0x4f50[190],author:_0x4f50[191],logo:_0x4f50[192],state:_0x4f50[193],description:_0x4f50[194],link:_0x4f50[195]},{name:_0x4f50[196],version:_0x4f50[190],author:_0x4f50[191],logo:_0x4f50[197],state:_0x4f50[198],description:_0x4f50[199],link:_0x4f50[200]},{name:_0x4f50[201],version:_0x4f50[190],author:_0x4f50[191],logo:_0x4f50[202],state:_0x4f50[203],description:_0x4f50[204],link:_0x4f50[205]}];models[_0x4f50[212]][_0x4f50[215]]()[_0x4f50[11]](function(_0xd284x1d){var _0xd284x1e=[];_0xd284x1d= _[_0x4f50[15]](_0xd284x1d,_0x4f50[209]);_0xd284x1c[_0x4f50[214]](function(_0xd284x1f){if(_[_0x4f50[210]](_0xd284x1d,_0xd284x1f[_0x4f50[209]])){_0xd284x1e[_0x4f50[213]](models[_0x4f50[212]][_0x4f50[211]](_0xd284x1f,{where:{state:_0xd284x1f[_0x4f50[209]]}}))}else {_0xd284x1e[_0x4f50[213]](models[_0x4f50[212]][_0x4f50[44]](_0xd284x1f))}});return _0xd284x1e})[_0x4f50[208]]()[_0x4f50[11]](function(){console[_0x4f50[8]](_0x4f50[207])})[_0x4f50[6]](function(_0xd284xc){console[_0x4f50[8]](_0x4f50[206],_0xd284xc)});models[_0x4f50[231]][_0x4f50[22]]([{name:_0x4f50[217],type:_0x4f50[218],street:_0x4f50[219]},{name:_0x4f50[220],type:_0x4f50[221],street:_0x4f50[222],postalCode:_0x4f50[223],country:_0x4f50[224],city:_0x4f50[225],vat:_0x4f50[226],website:_0x4f50[227],phone:_0x4f50[228],fax:_0x4f50[229],email:_0x4f50[230]}])[_0x4f50[11]](function(_0xd284x20){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[216],_[_0x4f50[15]](_0xd284x20,_0x4f50[14])[_0x4f50[13]]()))});models[_0x4f50[370]][_0x4f50[371]]({where:{defaultEntry:true}})[_0x4f50[11]](function(){return models[_0x4f50[370]][_0x4f50[22]]([{name:_0x4f50[233],model:JSON[_0x4f50[341]]({"\x74\x69\x74\x6C\x65":_0x4f50[234],"\x72\x6F\x77\x73":[{"\x63\x6F\x6C\x75\x6D\x6E\x73":[{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0x4f50[235],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[237],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x72\x65\x70\x6F\x72\x74":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[273],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[274],"\x73\x65\x6C\x65\x63\x74":_0x4f50[275]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[278]},{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[237],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x72\x65\x70\x6F\x72\x74":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[279],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[280],"\x73\x65\x6C\x65\x63\x74":_0x4f50[275]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[281]},{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[237],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[282],"\x72\x65\x70\x6F\x72\x74":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[98],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[283]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[284]},{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[237],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[285],"\x72\x65\x70\x6F\x72\x74":_0x4f50[286],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[287],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[288]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[289]},{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[258],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[290],"\x72\x65\x70\x6F\x72\x74":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[98],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[291]},"\x74\x69\x74\x6C\x65":_0x4f50[292],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[293]}],"\x63\x69\x64":_0x4f50[294]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0x4f50[235],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[256],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x72\x65\x70\x6F\x72\x74":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[295],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[296],"\x73\x65\x6C\x65\x63\x74":_0x4f50[275]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[297]},{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[256],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x72\x65\x70\x6F\x72\x74":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[298],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[299],"\x73\x65\x6C\x65\x63\x74":_0x4f50[275]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[300]},{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[256],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[301],"\x72\x65\x70\x6F\x72\x74":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[98],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[302]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[303]},{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[262],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[304],"\x72\x65\x70\x6F\x72\x74":_0x4f50[286],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[287],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[305]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[306]},{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[98],"\x63\x6F\x6C\x6F\x72":_0x4f50[258],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[307],"\x72\x65\x70\x6F\x72\x74":_0x4f50[272],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[308]},"\x74\x69\x74\x6C\x65":_0x4f50[309],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[310]}],"\x63\x69\x64":_0x4f50[311]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0x4f50[235],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[237],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[312],"\x72\x65\x70\x6F\x72\x74":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[273],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[313]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[314]},{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[262],"\x69\x63\x6F\x6E":_0x4f50[267],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[315],"\x72\x65\x70\x6F\x72\x74":_0x4f50[272],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[316],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[98]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[317]},{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[262],"\x69\x63\x6F\x6E":_0x4f50[267],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[318],"\x72\x65\x70\x6F\x72\x74":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[98],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[319]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[320]},{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[256],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[321],"\x72\x65\x70\x6F\x72\x74":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[298],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[322]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[323]},{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[98],"\x63\x6F\x6C\x6F\x72":_0x4f50[258],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[324],"\x72\x65\x70\x6F\x72\x74":_0x4f50[272],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[325]},"\x74\x69\x74\x6C\x65":_0x4f50[326],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[327]}],"\x63\x69\x64":_0x4f50[328]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0x4f50[235],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[256],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[329],"\x72\x65\x70\x6F\x72\x74":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[295],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[330]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[331]},{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[256],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[275],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[332],"\x72\x65\x70\x6F\x72\x74":_0x4f50[272],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[333]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[334]},{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[264],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[335],"\x72\x65\x70\x6F\x72\x74":_0x4f50[286],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[287],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[336]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[337]}],"\x63\x69\x64":_0x4f50[338]}]}],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[339],"\x73\x74\x72\x75\x63\x74\x75\x72\x65":_0x4f50[340]}),defaultEntry:true,editable:true},{name:_0x4f50[342],model:JSON[_0x4f50[341]]({"\x74\x69\x74\x6C\x65":_0x4f50[342],"\x72\x6F\x77\x73":[{"\x63\x6F\x6C\x75\x6D\x6E\x73":[{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0x4f50[235],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[260],"\x69\x63\x6F\x6E":_0x4f50[271],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[275],"\x72\x65\x70\x6F\x72\x74":_0x4f50[343],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[344],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[345]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[346]},{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[347],"\x63\x6F\x6C\x6F\x72":_0x4f50[258],"\x69\x63\x6F\x6E":_0x4f50[271],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[275],"\x72\x65\x70\x6F\x72\x74":_0x4f50[343],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[348]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[349]}],"\x63\x69\x64":_0x4f50[294]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0x4f50[235],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[260],"\x69\x63\x6F\x6E":_0x4f50[271],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[350],"\x72\x65\x70\x6F\x72\x74":_0x4f50[343],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[344],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[351]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[352]},{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[344],"\x63\x6F\x6C\x6F\x72":_0x4f50[262],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[353],"\x72\x65\x70\x6F\x72\x74":_0x4f50[343],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[354]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[355]}],"\x63\x69\x64":_0x4f50[311]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0x4f50[235],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[344],"\x63\x6F\x6C\x6F\x72":_0x4f50[237],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[356],"\x72\x65\x70\x6F\x72\x74":_0x4f50[343],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[357]},"\x74\x69\x74\x6C\x65":_0x4f50[276],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[358]}],"\x63\x69\x64":_0x4f50[328]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0x4f50[235],"\x77\x69\x64\x67\x65\x74\x73":[],"\x63\x69\x64":_0x4f50[338]}]}],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[339],"\x73\x74\x72\x75\x63\x74\x75\x72\x65":_0x4f50[340]}),defaultEntry:true,editable:true},{name:_0x4f50[359],model:JSON[_0x4f50[341]]({"\x74\x69\x74\x6C\x65":_0x4f50[359],"\x72\x6F\x77\x73":[{"\x63\x6F\x6C\x75\x6D\x6E\x73":[{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0x4f50[235],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[260],"\x69\x63\x6F\x6E":_0x4f50[271],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[275],"\x72\x65\x70\x6F\x72\x74":_0x4f50[249],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[360],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[361]},"\x74\x69\x74\x6C\x65":_0x4f50[362],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[363]}],"\x63\x69\x64":_0x4f50[294]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0x4f50[235],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[264],"\x69\x63\x6F\x6E":_0x4f50[271],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[275],"\x72\x65\x70\x6F\x72\x74":_0x4f50[249],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[364],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[365]},"\x74\x69\x74\x6C\x65":_0x4f50[362],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[366]}],"\x63\x69\x64":_0x4f50[311]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0x4f50[235],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0x4f50[236],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0x4f50[262],"\x69\x63\x6F\x6E":_0x4f50[238],"\x6C\x69\x6E\x6B":_0x4f50[239],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0x4f50[240],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0x4f50[241],"\x76\x61\x6C\x75\x65":_0x4f50[242]},{"\x6E\x61\x6D\x65":_0x4f50[243],"\x76\x61\x6C\x75\x65":_0x4f50[244]},{"\x6E\x61\x6D\x65":_0x4f50[245],"\x76\x61\x6C\x75\x65":_0x4f50[246]},{"\x6E\x61\x6D\x65":_0x4f50[247],"\x76\x61\x6C\x75\x65":_0x4f50[248]},{"\x6E\x61\x6D\x65":_0x4f50[29],"\x76\x61\x6C\x75\x65":_0x4f50[249]},{"\x6E\x61\x6D\x65":_0x4f50[250],"\x76\x61\x6C\x75\x65":_0x4f50[251]},{"\x6E\x61\x6D\x65":_0x4f50[252],"\x76\x61\x6C\x75\x65":_0x4f50[253]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0x4f50[254],"\x76\x61\x6C\x75\x65":_0x4f50[237]},{"\x6E\x61\x6D\x65":_0x4f50[255],"\x76\x61\x6C\x75\x65":_0x4f50[256]},{"\x6E\x61\x6D\x65":_0x4f50[257],"\x76\x61\x6C\x75\x65":_0x4f50[258]},{"\x6E\x61\x6D\x65":_0x4f50[259],"\x76\x61\x6C\x75\x65":_0x4f50[260]},{"\x6E\x61\x6D\x65":_0x4f50[261],"\x76\x61\x6C\x75\x65":_0x4f50[262]},{"\x6E\x61\x6D\x65":_0x4f50[263],"\x76\x61\x6C\x75\x65":_0x4f50[264]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0x4f50[265],"\x76\x61\x6C\x75\x65":_0x4f50[238]},{"\x6E\x61\x6D\x65":_0x4f50[266],"\x76\x61\x6C\x75\x65":_0x4f50[267]},{"\x6E\x61\x6D\x65":_0x4f50[268],"\x76\x61\x6C\x75\x65":_0x4f50[269]},{"\x6E\x61\x6D\x65":_0x4f50[270],"\x76\x61\x6C\x75\x65":_0x4f50[271]}],"\x73\x65\x6C\x65\x63\x74":_0x4f50[275],"\x72\x65\x70\x6F\x72\x74":_0x4f50[249],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0x4f50[367],"\x64\x65\x74\x61\x69\x6C\x73":_0x4f50[368]},"\x74\x69\x74\x6C\x65":_0x4f50[362],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[277],"\x77\x69\x64":_0x4f50[369]}],"\x63\x69\x64":_0x4f50[328]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0x4f50[235],"\x77\x69\x64\x67\x65\x74\x73":[],"\x63\x69\x64":_0x4f50[338]}]}],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0x4f50[339],"\x73\x74\x72\x75\x63\x74\x75\x72\x65":_0x4f50[340]}),defaultEntry:true,editable:true}],{ignoreDuplicates:true,individualHooks:true})})[_0x4f50[11]](function(_0xd284x21){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[232],_[_0x4f50[15]](_0xd284x21,_0x4f50[14])[_0x4f50[13]]()))});models[_0x4f50[143]][_0x4f50[371]]({where:{context:_0x4f50[373]}})[_0x4f50[11]](function(){models[_0x4f50[143]][_0x4f50[22]]([{context:_0x4f50[373],exten:_0x4f50[374],priority:1,app:_0x4f50[99],appdata:_0x4f50[375],type:_0x4f50[376]},{context:_0x4f50[373],exten:_0x4f50[374],priority:2,app:_0x4f50[99],appdata:_0x4f50[377],type:_0x4f50[376]},{context:_0x4f50[373],exten:_0x4f50[374],priority:3,app:_0x4f50[104],appdata:_0x4f50[378],type:_0x4f50[376]},{context:_0x4f50[373],exten:_0x4f50[374],priority:4,app:_0x4f50[379],appdata:_0x4f50[131],type:_0x4f50[376]},{context:_0x4f50[373],exten:_0x4f50[374],priority:5,app:_0x4f50[380],appdata:_0x4f50[103],type:_0x4f50[376]},{context:_0x4f50[373],exten:_0x4f50[374],priority:6,app:_0x4f50[104],appdata:_0x4f50[381],type:_0x4f50[376]},{context:_0x4f50[373],exten:_0x4f50[374],priority:7,app:_0x4f50[104],appdata:_0x4f50[382],type:_0x4f50[376]},{context:_0x4f50[373],exten:_0x4f50[374],priority:8,app:_0x4f50[104],appdata:_0x4f50[383],type:_0x4f50[376]},{context:_0x4f50[373],exten:_0x4f50[374],priority:9,app:_0x4f50[104],appdata:_0x4f50[384],type:_0x4f50[376]},{context:_0x4f50[373],exten:_0x4f50[374],priority:10,app:_0x4f50[104],appdata:_0x4f50[385],type:_0x4f50[376]},{context:_0x4f50[373],exten:_0x4f50[374],priority:11,app:_0x4f50[104],appdata:_0x4f50[386],type:_0x4f50[376]},{context:_0x4f50[373],exten:_0x4f50[374],priority:12,app:_0x4f50[104],appdata:_0x4f50[387],type:_0x4f50[376]},{context:_0x4f50[373],exten:_0x4f50[374],priority:13,app:_0x4f50[104],appdata:_0x4f50[388],type:_0x4f50[376]},{context:_0x4f50[373],exten:_0x4f50[374],priority:14,app:_0x4f50[389],appdata:_0x4f50[390],type:_0x4f50[376]},{context:_0x4f50[373],exten:_0x4f50[374],priority:15,app:_0x4f50[391],appdata:_0x4f50[131],type:_0x4f50[376]}],{ignoreDuplicates:true,individualHooks:true})})[_0x4f50[11]](function(){console[_0x4f50[8]](_0x4f50[372])});models[_0x4f50[43]][_0x4f50[215]]({include:[{model:models[_0x4f50[143]],as:_0x4f50[397],where:{app:_0x4f50[165]}}]})[_0x4f50[11]](function(_0xd284x12){console[_0x4f50[8]](_0x4f50[392]);var _0xd284x22=[];_[_0x4f50[214]](_0xd284x12,function(_0xd284x23){_[_0x4f50[214]](_0xd284x23.UserExtensions,function(_0xd284x24){_0xd284x24[_0x4f50[393]]= _0x4f50[394]+ _0xd284x23[_0x4f50[14]]+ _0x4f50[395];_0xd284x22[_0x4f50[213]](_0xd284x24[_0x4f50[396]]())})});return _0xd284x22})[_0x4f50[208]]()[_0x4f50[6]](function(_0xd284xc){console[_0x4f50[8]](_0xd284xc)});_setting[_0x4f50[211]]({firstSetup:false})};models[_0x4f50[402]][_0x4f50[22]]([{name:_0x4f50[96],description:_0x4f50[399],defaultEntry:true},{name:_0x4f50[88],description:_0x4f50[399],defaultEntry:true},{name:_0x4f50[400],description:_0x4f50[399],defaultEntry:true},{name:_0x4f50[373],description:_0x4f50[399],defaultEntry:true},{name:_0x4f50[401],description:_0x4f50[399],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x4f50[11]](function(_0xd284x17){console[_0x4f50[8]](util[_0x4f50[16]](_0x4f50[398],_[_0x4f50[15]](_0xd284x17,_0x4f50[14])[_0x4f50[13]]()))});var _0xd284x25=[{id:1,name:_0x4f50[403],title:_0x4f50[404],ModuleId:null,path:_0x4f50[405]},{id:2,name:_0x4f50[406],title:_0x4f50[407],ModuleId:null,path:_0x4f50[408]},{id:3,name:_0x4f50[409],title:_0x4f50[410],ModuleId:null,path:null},{id:4,name:_0x4f50[411],title:_0x4f50[412],ModuleId:3,path:_0x4f50[413]},{id:5,name:_0x4f50[414],title:_0x4f50[415],ModuleId:null,path:_0x4f50[416]},{id:6,name:_0x4f50[417],title:_0x4f50[418],ModuleId:null,path:null},{id:7,name:_0x4f50[419],title:_0x4f50[420],ModuleId:6,path:null},{id:8,name:_0x4f50[421],title:_0x4f50[422],ModuleId:6,path:null},{id:9,name:_0x4f50[423],title:_0x4f50[424],ModuleId:6,path:null},{id:10,name:_0x4f50[425],title:_0x4f50[426],ModuleId:6,path:null},{id:11,name:_0x4f50[427],title:_0x4f50[428],ModuleId:6,path:null},{id:12,name:_0x4f50[429],title:_0x4f50[430],ModuleId:6,path:_0x4f50[431]},{id:13,name:_0x4f50[432],title:_0x4f50[433],ModuleId:null,path:null},{id:14,name:_0x4f50[434],title:_0x4f50[435],ModuleId:null,path:_0x4f50[436]},{id:15,name:_0x4f50[437],title:_0x4f50[438],ModuleId:null,path:_0x4f50[439]},{id:16,name:_0x4f50[440],title:_0x4f50[441],ModuleId:null,path:_0x4f50[442]},{id:17,name:_0x4f50[443],title:_0x4f50[444],ModuleId:null,path:_0x4f50[445]},{id:18,name:_0x4f50[446],title:_0x4f50[447],ModuleId:null,path:_0x4f50[448]},{id:19,name:_0x4f50[449],title:_0x4f50[450],ModuleId:null,path:_0x4f50[451]},{id:20,name:_0x4f50[452],title:_0x4f50[453],ModuleId:6,path:_0x4f50[454]},{id:21,name:_0x4f50[455],title:_0x4f50[456],ModuleId:7,path:_0x4f50[457]},{id:22,name:_0x4f50[458],title:_0x4f50[459],ModuleId:7,path:_0x4f50[460]},{id:23,name:_0x4f50[461],title:_0x4f50[462],ModuleId:7,path:_0x4f50[463]},{id:24,name:_0x4f50[464],title:_0x4f50[465],ModuleId:7,path:_0x4f50[466]},{id:25,name:_0x4f50[467],title:_0x4f50[468],ModuleId:7,path:_0x4f50[469]},{id:26,name:_0x4f50[429],title:_0x4f50[430],ModuleId:7,path:_0x4f50[470]},{id:27,name:_0x4f50[471],title:_0x4f50[472],ModuleId:7,path:_0x4f50[473]},{id:28,name:_0x4f50[474],title:_0x4f50[475],ModuleId:7,path:_0x4f50[476]},{id:29,name:_0x4f50[477],title:_0x4f50[478],ModuleId:8,path:_0x4f50[479]},{id:30,name:_0x4f50[480],title:_0x4f50[481],ModuleId:8,path:_0x4f50[482]},{id:31,name:_0x4f50[483],title:_0x4f50[484],ModuleId:8,path:_0x4f50[485]},{id:32,name:_0x4f50[486],title:_0x4f50[487],ModuleId:8,path:_0x4f50[488]},{id:33,name:_0x4f50[429],title:_0x4f50[430],ModuleId:8,path:_0x4f50[489]},{id:34,name:_0x4f50[490],title:_0x4f50[491],ModuleId:9,path:_0x4f50[492]},{id:35,name:_0x4f50[480],title:_0x4f50[481],ModuleId:9,path:_0x4f50[493]},{id:36,name:_0x4f50[494],title:_0x4f50[495],ModuleId:9,path:_0x4f50[496]},{id:37,name:_0x4f50[429],title:_0x4f50[430],ModuleId:9,path:_0x4f50[497]},{id:38,name:_0x4f50[490],title:_0x4f50[491],ModuleId:10,path:_0x4f50[498]},{id:39,name:_0x4f50[480],title:_0x4f50[481],ModuleId:10,path:_0x4f50[499]},{id:40,name:_0x4f50[494],title:_0x4f50[495],ModuleId:10,path:_0x4f50[500]},{id:41,name:_0x4f50[429],title:_0x4f50[430],ModuleId:10,path:_0x4f50[501]},{id:42,name:_0x4f50[490],title:_0x4f50[491],ModuleId:11,path:_0x4f50[502]},{id:43,name:_0x4f50[480],title:_0x4f50[481],ModuleId:11,path:_0x4f50[503]},{id:44,name:_0x4f50[494],title:_0x4f50[495],ModuleId:11,path:_0x4f50[504]},{id:45,name:_0x4f50[429],title:_0x4f50[430],ModuleId:11,path:_0x4f50[505]},{id:46,name:_0x4f50[490],title:_0x4f50[491],ModuleId:20,path:_0x4f50[454]},{id:47,name:_0x4f50[480],title:_0x4f50[481],ModuleId:20,path:_0x4f50[506]},{id:48,name:_0x4f50[494],title:_0x4f50[495],ModuleId:20,path:_0x4f50[507]},{id:49,name:_0x4f50[429],title:_0x4f50[430],ModuleId:20,path:_0x4f50[508]},{id:50,name:_0x4f50[509],title:_0x4f50[510],ModuleId:13,path:_0x4f50[511]},{id:51,name:_0x4f50[512],title:_0x4f50[513],ModuleId:13,path:_0x4f50[514]},{id:52,name:_0x4f50[515],title:_0x4f50[516],ModuleId:13,path:_0x4f50[517]},{id:53,name:_0x4f50[518],title:_0x4f50[519],ModuleId:13,path:_0x4f50[520]},{id:54,name:_0x4f50[521],title:_0x4f50[522],ModuleId:13,path:_0x4f50[523]},{id:55,name:_0x4f50[524],title:_0x4f50[525],ModuleId:13,path:_0x4f50[526]},{id:56,name:_0x4f50[527],title:_0x4f50[528],ModuleId:13,path:_0x4f50[529]},{id:57,name:_0x4f50[530],title:_0x4f50[531],ModuleId:13,path:_0x4f50[532]},{id:58,name:_0x4f50[533],title:_0x4f50[534],ModuleId:13,path:_0x4f50[535]},{id:59,name:_0x4f50[406],title:_0x4f50[536],ModuleId:13,path:_0x4f50[537]},{id:60,name:_0x4f50[538],title:_0x4f50[539],ModuleId:13,path:_0x4f50[540]},{id:61,name:_0x4f50[541],title:_0x4f50[542],ModuleId:13,path:_0x4f50[543]}];models[_0x4f50[546]][_0x4f50[215]]()[_0x4f50[11]](function(_0xd284x26){var _0xd284x27=[];_0xd284x26= _[_0x4f50[15]](_0xd284x26,_0x4f50[9]);_0xd284x25[_0x4f50[214]](function(_0xd284x28){if(_[_0x4f50[210]](_0xd284x26,_0xd284x28[_0x4f50[9]])){_0xd284x27[_0x4f50[213]](models[_0x4f50[546]][_0x4f50[211]](_0xd284x28,{where:{id:_0xd284x28[_0x4f50[9]]}}))}else {_0xd284x27[_0x4f50[213]](models[_0x4f50[546]][_0x4f50[44]](_0xd284x28))}});return _0xd284x27})[_0x4f50[208]]()[_0x4f50[11]](function(){console[_0x4f50[8]](_0x4f50[545])})[_0x4f50[6]](function(_0xd284xc){console[_0x4f50[8]](_0x4f50[544],_0xd284xc)});var _0xd284x29=[{"\x69\x64":25,"\x6E\x61\x6D\x65":_0x4f50[547],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[548],"\x70\x61\x72\x65\x6E\x74":_0x4f50[549],"\x74\x61\x62\x6C\x65":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]},{"\x69\x64":26,"\x6E\x61\x6D\x65":_0x4f50[551],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[552],"\x70\x61\x72\x65\x6E\x74":_0x4f50[549],"\x74\x61\x62\x6C\x65":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]},{"\x69\x64":28,"\x6E\x61\x6D\x65":_0x4f50[547],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[553],"\x70\x61\x72\x65\x6E\x74":_0x4f50[554],"\x74\x61\x62\x6C\x65":_0x4f50[286],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[555]},{"\x69\x64":29,"\x6E\x61\x6D\x65":_0x4f50[556],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[557],"\x70\x61\x72\x65\x6E\x74":_0x4f50[554],"\x74\x61\x62\x6C\x65":_0x4f50[286],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[555]},{"\x69\x64":30,"\x6E\x61\x6D\x65":_0x4f50[558],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[559],"\x70\x61\x72\x65\x6E\x74":_0x4f50[554],"\x74\x61\x62\x6C\x65":_0x4f50[286],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[555]},{"\x69\x64":31,"\x6E\x61\x6D\x65":_0x4f50[560],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[561],"\x70\x61\x72\x65\x6E\x74":_0x4f50[554],"\x74\x61\x62\x6C\x65":_0x4f50[286],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[555]},{"\x69\x64":32,"\x6E\x61\x6D\x65":_0x4f50[562],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[563],"\x70\x61\x72\x65\x6E\x74":_0x4f50[554],"\x74\x61\x62\x6C\x65":_0x4f50[286],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[555]},{"\x69\x64":34,"\x6E\x61\x6D\x65":_0x4f50[564],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[565],"\x70\x61\x72\x65\x6E\x74":_0x4f50[554],"\x74\x61\x62\x6C\x65":_0x4f50[286],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[555]},{"\x69\x64":35,"\x6E\x61\x6D\x65":_0x4f50[547],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[566],"\x70\x61\x72\x65\x6E\x74":_0x4f50[567],"\x74\x61\x62\x6C\x65":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[568]},{"\x69\x64":36,"\x6E\x61\x6D\x65":_0x4f50[569],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[570],"\x70\x61\x72\x65\x6E\x74":_0x4f50[567],"\x74\x61\x62\x6C\x65":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[568]},{"\x69\x64":37,"\x6E\x61\x6D\x65":_0x4f50[571],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[572],"\x70\x61\x72\x65\x6E\x74":_0x4f50[567],"\x74\x61\x62\x6C\x65":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[573]},{"\x69\x64":38,"\x6E\x61\x6D\x65":_0x4f50[574],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[575],"\x70\x61\x72\x65\x6E\x74":_0x4f50[567],"\x74\x61\x62\x6C\x65":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[576]},{"\x69\x64":40,"\x6E\x61\x6D\x65":_0x4f50[577],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[578],"\x70\x61\x72\x65\x6E\x74":_0x4f50[579],"\x74\x61\x62\x6C\x65":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]},{"\x69\x64":41,"\x6E\x61\x6D\x65":_0x4f50[580],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[581],"\x70\x61\x72\x65\x6E\x74":_0x4f50[579],"\x74\x61\x62\x6C\x65":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]},{"\x69\x64":46,"\x6E\x61\x6D\x65":_0x4f50[582],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[583],"\x70\x61\x72\x65\x6E\x74":_0x4f50[579],"\x74\x61\x62\x6C\x65":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]},{"\x69\x64":47,"\x6E\x61\x6D\x65":_0x4f50[584],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[585],"\x70\x61\x72\x65\x6E\x74":_0x4f50[579],"\x74\x61\x62\x6C\x65":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]},{"\x69\x64":49,"\x6E\x61\x6D\x65":_0x4f50[586],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[587],"\x70\x61\x72\x65\x6E\x74":_0x4f50[549],"\x74\x61\x62\x6C\x65":_0x4f50[272],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]},{"\x69\x64":50,"\x6E\x61\x6D\x65":_0x4f50[547],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[588],"\x70\x61\x72\x65\x6E\x74":_0x4f50[589],"\x74\x61\x62\x6C\x65":_0x4f50[343],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]},{"\x69\x64":51,"\x6E\x61\x6D\x65":_0x4f50[590],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[591],"\x70\x61\x72\x65\x6E\x74":_0x4f50[589],"\x74\x61\x62\x6C\x65":_0x4f50[343],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[592]},{"\x69\x64":52,"\x6E\x61\x6D\x65":_0x4f50[593],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[594],"\x70\x61\x72\x65\x6E\x74":_0x4f50[589],"\x74\x61\x62\x6C\x65":_0x4f50[343],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]},{"\x69\x64":53,"\x6E\x61\x6D\x65":_0x4f50[595],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[596],"\x70\x61\x72\x65\x6E\x74":_0x4f50[589],"\x74\x61\x62\x6C\x65":_0x4f50[343],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[592]},{"\x69\x64":54,"\x6E\x61\x6D\x65":_0x4f50[597],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[598],"\x70\x61\x72\x65\x6E\x74":_0x4f50[589],"\x74\x61\x62\x6C\x65":_0x4f50[343],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[592]},{"\x69\x64":55,"\x6E\x61\x6D\x65":_0x4f50[599],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[600],"\x70\x61\x72\x65\x6E\x74":_0x4f50[589],"\x74\x61\x62\x6C\x65":_0x4f50[343],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[592]},{"\x69\x64":57,"\x6E\x61\x6D\x65":_0x4f50[601],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[602],"\x70\x61\x72\x65\x6E\x74":_0x4f50[603],"\x74\x61\x62\x6C\x65":_0x4f50[604],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[605]},{"\x69\x64":61,"\x6E\x61\x6D\x65":_0x4f50[606],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[607],"\x70\x61\x72\x65\x6E\x74":_0x4f50[608],"\x74\x61\x62\x6C\x65":_0x4f50[604],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[609]},{"\x69\x64":62,"\x6E\x61\x6D\x65":_0x4f50[610],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[611],"\x70\x61\x72\x65\x6E\x74":_0x4f50[608],"\x74\x61\x62\x6C\x65":_0x4f50[604],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[612]},{"\x69\x64":63,"\x6E\x61\x6D\x65":_0x4f50[547],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[613],"\x70\x61\x72\x65\x6E\x74":_0x4f50[608],"\x74\x61\x62\x6C\x65":_0x4f50[604],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[609]},{"\x69\x64":64,"\x6E\x61\x6D\x65":_0x4f50[614],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[615],"\x70\x61\x72\x65\x6E\x74":_0x4f50[608],"\x74\x61\x62\x6C\x65":_0x4f50[604],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[616]},{"\x69\x64":65,"\x6E\x61\x6D\x65":_0x4f50[586],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[617],"\x70\x61\x72\x65\x6E\x74":_0x4f50[618],"\x74\x61\x62\x6C\x65":_0x4f50[619],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]},{"\x69\x64":67,"\x6E\x61\x6D\x65":_0x4f50[620],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[621],"\x70\x61\x72\x65\x6E\x74":_0x4f50[618],"\x74\x61\x62\x6C\x65":_0x4f50[622],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]},{"\x69\x64":68,"\x6E\x61\x6D\x65":_0x4f50[623],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[624],"\x70\x61\x72\x65\x6E\x74":_0x4f50[625],"\x74\x61\x62\x6C\x65":_0x4f50[626],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]},{"\x69\x64":69,"\x6E\x61\x6D\x65":_0x4f50[627],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[628],"\x70\x61\x72\x65\x6E\x74":_0x4f50[629],"\x74\x61\x62\x6C\x65":_0x4f50[630],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[631]},{"\x69\x64":70,"\x6E\x61\x6D\x65":_0x4f50[632],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[633],"\x70\x61\x72\x65\x6E\x74":_0x4f50[629],"\x74\x61\x62\x6C\x65":_0x4f50[630],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[634]},{"\x69\x64":72,"\x6E\x61\x6D\x65":_0x4f50[635],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[636],"\x70\x61\x72\x65\x6E\x74":_0x4f50[637],"\x74\x61\x62\x6C\x65":_0x4f50[638],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]},{"\x69\x64":73,"\x6E\x61\x6D\x65":_0x4f50[639],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[640],"\x70\x61\x72\x65\x6E\x74":_0x4f50[637],"\x74\x61\x62\x6C\x65":_0x4f50[638],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]},{"\x69\x64":74,"\x6E\x61\x6D\x65":_0x4f50[641],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[642],"\x70\x61\x72\x65\x6E\x74":_0x4f50[637],"\x74\x61\x62\x6C\x65":_0x4f50[638],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[643]},{"\x69\x64":75,"\x6E\x61\x6D\x65":_0x4f50[644],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[645],"\x70\x61\x72\x65\x6E\x74":_0x4f50[637],"\x74\x61\x62\x6C\x65":_0x4f50[638],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[646]},{"\x69\x64":76,"\x6E\x61\x6D\x65":_0x4f50[647],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[648],"\x70\x61\x72\x65\x6E\x74":_0x4f50[637],"\x74\x61\x62\x6C\x65":_0x4f50[638],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]},{"\x69\x64":77,"\x6E\x61\x6D\x65":_0x4f50[649],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[650],"\x70\x61\x72\x65\x6E\x74":_0x4f50[625],"\x74\x61\x62\x6C\x65":_0x4f50[626],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[646]},{"\x69\x64":79,"\x6E\x61\x6D\x65":_0x4f50[651],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[652],"\x70\x61\x72\x65\x6E\x74":_0x4f50[625],"\x74\x61\x62\x6C\x65":_0x4f50[626],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[653]},{"\x69\x64":81,"\x6E\x61\x6D\x65":_0x4f50[654],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[655],"\x70\x61\x72\x65\x6E\x74":_0x4f50[625],"\x74\x61\x62\x6C\x65":_0x4f50[656],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]},{"\x69\x64":82,"\x6E\x61\x6D\x65":_0x4f50[657],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[658],"\x70\x61\x72\x65\x6E\x74":_0x4f50[625],"\x74\x61\x62\x6C\x65":_0x4f50[659],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]},{"\x69\x64":83,"\x6E\x61\x6D\x65":_0x4f50[660],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[661],"\x70\x61\x72\x65\x6E\x74":_0x4f50[625],"\x74\x61\x62\x6C\x65":_0x4f50[659],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[662]},{"\x69\x64":84,"\x6E\x61\x6D\x65":_0x4f50[663],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x4f50[664],"\x70\x61\x72\x65\x6E\x74":_0x4f50[625],"\x74\x61\x62\x6C\x65":_0x4f50[659],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[665]},{"\x69\x64":85,"\x6E\x61\x6D\x65":_0x4f50[547],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x4f50[666],"\x74\x61\x62\x6C\x65":_0x4f50[667],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]},{"\x69\x64":90,"\x6E\x61\x6D\x65":_0x4f50[547],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x4f50[668],"\x74\x61\x62\x6C\x65":_0x4f50[669],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x4f50[550]}];var _0xd284x2a=[{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[671],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[672],"\x61\x6C\x69\x61\x73":_0x4f50[673],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[674],"\x61\x6C\x69\x61\x73":_0x4f50[675],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[676],"\x61\x6C\x69\x61\x73":_0x4f50[148],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[677],"\x61\x6C\x69\x61\x73":_0x4f50[678],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[679],"\x61\x6C\x69\x61\x73":_0x4f50[680],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[681],"\x61\x6C\x69\x61\x73":_0x4f50[682],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[683],"\x61\x6C\x69\x61\x73":_0x4f50[684],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[685],"\x61\x6C\x69\x61\x73":_0x4f50[686],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[687],"\x61\x6C\x69\x61\x73":_0x4f50[688],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[689],"\x61\x6C\x69\x61\x73":_0x4f50[690],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[691],"\x61\x6C\x69\x61\x73":_0x4f50[692],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[693],"\x61\x6C\x69\x61\x73":_0x4f50[694],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[95],"\x61\x6C\x69\x61\x73":_0x4f50[695],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[696],"\x61\x6C\x69\x61\x73":_0x4f50[697],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[699],"\x61\x6C\x69\x61\x73":_0x4f50[700],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[701],"\x61\x6C\x69\x61\x73":_0x4f50[702],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[672],"\x61\x6C\x69\x61\x73":_0x4f50[703],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[676],"\x61\x6C\x69\x61\x73":_0x4f50[148],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[677],"\x61\x6C\x69\x61\x73":_0x4f50[704],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[705],"\x61\x6C\x69\x61\x73":_0x4f50[706],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[707],"\x61\x6C\x69\x61\x73":_0x4f50[708],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[709],"\x61\x6C\x69\x61\x73":_0x4f50[348],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[671],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[672],"\x61\x6C\x69\x61\x73":_0x4f50[673],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[674],"\x61\x6C\x69\x61\x73":_0x4f50[675],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[676],"\x61\x6C\x69\x61\x73":_0x4f50[148],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[710],"\x61\x6C\x69\x61\x73":_0x4f50[711],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[712],"\x61\x6C\x69\x61\x73":_0x4f50[713],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[714],"\x61\x6C\x69\x61\x73":_0x4f50[715],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[716],"\x61\x6C\x69\x61\x73":_0x4f50[717],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[707],"\x61\x6C\x69\x61\x73":_0x4f50[702],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[718],"\x61\x6C\x69\x61\x73":_0x4f50[697],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[719],"\x61\x6C\x69\x61\x73":_0x4f50[720],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[721],"\x61\x6C\x69\x61\x73":_0x4f50[722],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[723],"\x61\x6C\x69\x61\x73":_0x4f50[724],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[725],"\x61\x6C\x69\x61\x73":_0x4f50[726],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[727],"\x61\x6C\x69\x61\x73":_0x4f50[728],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[95],"\x61\x6C\x69\x61\x73":_0x4f50[695],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[710],"\x61\x6C\x69\x61\x73":_0x4f50[711],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[723],"\x61\x6C\x69\x61\x73":_0x4f50[729],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[718],"\x61\x6C\x69\x61\x73":_0x4f50[731],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[721],"\x61\x6C\x69\x61\x73":_0x4f50[732],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[733],"\x61\x6C\x69\x61\x73":_0x4f50[734],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[735],"\x61\x6C\x69\x61\x73":_0x4f50[736],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[737],"\x61\x6C\x69\x61\x73":_0x4f50[738],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[739],"\x61\x6C\x69\x61\x73":_0x4f50[740],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[676],"\x61\x6C\x69\x61\x73":_0x4f50[148],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[723],"\x61\x6C\x69\x61\x73":_0x4f50[729],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[718],"\x61\x6C\x69\x61\x73":_0x4f50[741],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[707],"\x61\x6C\x69\x61\x73":_0x4f50[742],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[721],"\x61\x6C\x69\x61\x73":_0x4f50[743],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[733],"\x61\x6C\x69\x61\x73":_0x4f50[744],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[735],"\x61\x6C\x69\x61\x73":_0x4f50[745],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[746],"\x61\x6C\x69\x61\x73":_0x4f50[747],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[737],"\x61\x6C\x69\x61\x73":_0x4f50[748],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[739],"\x61\x6C\x69\x61\x73":_0x4f50[749],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[676],"\x61\x6C\x69\x61\x73":_0x4f50[148],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[723],"\x61\x6C\x69\x61\x73":_0x4f50[750],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[751],"\x61\x6C\x69\x61\x73":_0x4f50[752],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[753],"\x61\x6C\x69\x61\x73":_0x4f50[754],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[755],"\x61\x6C\x69\x61\x73":_0x4f50[756],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[757],"\x61\x6C\x69\x61\x73":_0x4f50[758],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[759],"\x61\x6C\x69\x61\x73":_0x4f50[760],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[761],"\x61\x6C\x69\x61\x73":_0x4f50[762],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[763],"\x61\x6C\x69\x61\x73":_0x4f50[764],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[765],"\x61\x6C\x69\x61\x73":_0x4f50[766],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[725],"\x61\x6C\x69\x61\x73":_0x4f50[767],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":32,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[243],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[768],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":32,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[714],"\x61\x6C\x69\x61\x73":_0x4f50[769],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[770],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[723],"\x61\x6C\x69\x61\x73":_0x4f50[750],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[751],"\x61\x6C\x69\x61\x73":_0x4f50[752],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[755],"\x61\x6C\x69\x61\x73":_0x4f50[756],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[759],"\x61\x6C\x69\x61\x73":_0x4f50[760],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[763],"\x61\x6C\x69\x61\x73":_0x4f50[764],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[671],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[672],"\x61\x6C\x69\x61\x73":_0x4f50[673],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[676],"\x61\x6C\x69\x61\x73":_0x4f50[148],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[677],"\x61\x6C\x69\x61\x73":_0x4f50[771],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[679],"\x61\x6C\x69\x61\x73":_0x4f50[772],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[681],"\x61\x6C\x69\x61\x73":_0x4f50[773],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[683],"\x61\x6C\x69\x61\x73":_0x4f50[774],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[689],"\x61\x6C\x69\x61\x73":_0x4f50[333],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[691],"\x61\x6C\x69\x61\x73":_0x4f50[775],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[693],"\x61\x6C\x69\x61\x73":_0x4f50[776],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[777],"\x61\x6C\x69\x61\x73":_0x4f50[778],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[95],"\x61\x6C\x69\x61\x73":_0x4f50[695],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[699],"\x61\x6C\x69\x61\x73":_0x4f50[779],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[780],"\x61\x6C\x69\x61\x73":_0x4f50[781],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[676],"\x61\x6C\x69\x61\x73":_0x4f50[148],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[681],"\x61\x6C\x69\x61\x73":_0x4f50[782],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[689],"\x61\x6C\x69\x61\x73":_0x4f50[333],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[699],"\x61\x6C\x69\x61\x73":_0x4f50[783],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[784],"\x61\x6C\x69\x61\x73":_0x4f50[785],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[780],"\x61\x6C\x69\x61\x73":_0x4f50[786],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[787],"\x61\x6C\x69\x61\x73":_0x4f50[788],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[693],"\x61\x6C\x69\x61\x73":_0x4f50[767],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":37,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[689],"\x61\x6C\x69\x61\x73":_0x4f50[243],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":37,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[780],"\x61\x6C\x69\x61\x73":_0x4f50[786],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":37,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[676],"\x61\x6C\x69\x61\x73":_0x4f50[148],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[681],"\x61\x6C\x69\x61\x73":_0x4f50[789],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[790],"\x61\x6C\x69\x61\x73":_0x4f50[791],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[792],"\x61\x6C\x69\x61\x73":_0x4f50[793],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[794],"\x61\x6C\x69\x61\x73":_0x4f50[795],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[796],"\x61\x6C\x69\x61\x73":_0x4f50[797],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[798],"\x61\x6C\x69\x61\x73":_0x4f50[799],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[800],"\x61\x6C\x69\x61\x73":_0x4f50[801],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[802],"\x61\x6C\x69\x61\x73":_0x4f50[803],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[804],"\x61\x6C\x69\x61\x73":_0x4f50[805],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[806],"\x61\x6C\x69\x61\x73":_0x4f50[807],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[808],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[809],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[810],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[685],"\x61\x6C\x69\x61\x73":_0x4f50[729],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[681],"\x61\x6C\x69\x61\x73":_0x4f50[782],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[689],"\x61\x6C\x69\x61\x73":_0x4f50[333],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[696],"\x61\x6C\x69\x61\x73":_0x4f50[741],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[811],"\x61\x6C\x69\x61\x73":_0x4f50[736],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[784],"\x61\x6C\x69\x61\x73":_0x4f50[785],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[806],"\x61\x6C\x69\x61\x73":_0x4f50[769],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[770],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[809],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[810],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[685],"\x61\x6C\x69\x61\x73":_0x4f50[348],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[812],"\x61\x6C\x69\x61\x73":_0x4f50[813],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[681],"\x61\x6C\x69\x61\x73":_0x4f50[782],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[689],"\x61\x6C\x69\x61\x73":_0x4f50[333],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[696],"\x61\x6C\x69\x61\x73":_0x4f50[741],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[811],"\x61\x6C\x69\x61\x73":_0x4f50[736],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[784],"\x61\x6C\x69\x61\x73":_0x4f50[785],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[814],"\x61\x6C\x69\x61\x73":_0x4f50[815],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":46,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[809],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[810],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":46,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[685],"\x61\x6C\x69\x61\x73":_0x4f50[348],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":46,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[812],"\x61\x6C\x69\x61\x73":_0x4f50[813],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":46,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[681],"\x61\x6C\x69\x61\x73":_0x4f50[782],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":46,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[689],"\x61\x6C\x69\x61\x73":_0x4f50[333],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":46,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[696],"\x61\x6C\x69\x61\x73":_0x4f50[741],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":46,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[811],"\x61\x6C\x69\x61\x73":_0x4f50[736],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":46,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[784],"\x61\x6C\x69\x61\x73":_0x4f50[785],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":46,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[816],"\x61\x6C\x69\x61\x73":_0x4f50[817],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":47,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[809],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[810],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":47,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[685],"\x61\x6C\x69\x61\x73":_0x4f50[348],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":47,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[812],"\x61\x6C\x69\x61\x73":_0x4f50[813],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":47,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[681],"\x61\x6C\x69\x61\x73":_0x4f50[782],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":_0x4f50[818],"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":47,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[689],"\x61\x6C\x69\x61\x73":_0x4f50[333],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":47,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[696],"\x61\x6C\x69\x61\x73":_0x4f50[741],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":47,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[811],"\x61\x6C\x69\x61\x73":_0x4f50[736],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":47,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[784],"\x61\x6C\x69\x61\x73":_0x4f50[785],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":47,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[676],"\x61\x6C\x69\x61\x73":_0x4f50[148],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":49,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[809],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[810],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":49,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[685],"\x61\x6C\x69\x61\x73":_0x4f50[348],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":49,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[812],"\x61\x6C\x69\x61\x73":_0x4f50[813],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":49,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[681],"\x61\x6C\x69\x61\x73":_0x4f50[782],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":49,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[689],"\x61\x6C\x69\x61\x73":_0x4f50[333],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":49,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[696],"\x61\x6C\x69\x61\x73":_0x4f50[741],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":49,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[811],"\x61\x6C\x69\x61\x73":_0x4f50[736],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":49,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[784],"\x61\x6C\x69\x61\x73":_0x4f50[785],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":49,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[819],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[820],"\x61\x6C\x69\x61\x73":_0x4f50[821],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[822],"\x61\x6C\x69\x61\x73":_0x4f50[823],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[824],"\x61\x6C\x69\x61\x73":_0x4f50[825],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[826],"\x61\x6C\x69\x61\x73":_0x4f50[827],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[828],"\x61\x6C\x69\x61\x73":_0x4f50[703],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[829],"\x61\x6C\x69\x61\x73":_0x4f50[830],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[831],"\x61\x6C\x69\x61\x73":_0x4f50[832],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[833],"\x61\x6C\x69\x61\x73":_0x4f50[834],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[835],"\x61\x6C\x69\x61\x73":_0x4f50[704],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[836],"\x61\x6C\x69\x61\x73":_0x4f50[702],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[837],"\x61\x6C\x69\x61\x73":_0x4f50[706],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[838],"\x61\x6C\x69\x61\x73":_0x4f50[839],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[840],"\x61\x6C\x69\x61\x73":_0x4f50[841],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[819],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[842],"\x61\x6C\x69\x61\x73":_0x4f50[843],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[824],"\x61\x6C\x69\x61\x73":_0x4f50[825],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[826],"\x61\x6C\x69\x61\x73":_0x4f50[827],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[828],"\x61\x6C\x69\x61\x73":_0x4f50[844],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[835],"\x61\x6C\x69\x61\x73":_0x4f50[704],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[836],"\x61\x6C\x69\x61\x73":_0x4f50[702],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[837],"\x61\x6C\x69\x61\x73":_0x4f50[706],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[838],"\x61\x6C\x69\x61\x73":_0x4f50[839],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[845],"\x61\x6C\x69\x61\x73":_0x4f50[846],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[840],"\x61\x6C\x69\x61\x73":_0x4f50[841],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[822],"\x61\x6C\x69\x61\x73":_0x4f50[823],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[820],"\x61\x6C\x69\x61\x73":_0x4f50[821],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":52,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[243],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[768],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":52,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[838],"\x61\x6C\x69\x61\x73":_0x4f50[847],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":52,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[848],"\x61\x6C\x69\x61\x73":_0x4f50[357],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":52,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[840],"\x61\x6C\x69\x61\x73":_0x4f50[841],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":53,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[243],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[768],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":53,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[838],"\x61\x6C\x69\x61\x73":_0x4f50[847],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":53,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[848],"\x61\x6C\x69\x61\x73":_0x4f50[357],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":53,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[849],"\x61\x6C\x69\x61\x73":_0x4f50[711],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":54,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[243],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[768],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":54,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[838],"\x61\x6C\x69\x61\x73":_0x4f50[847],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":54,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[848],"\x61\x6C\x69\x61\x73":_0x4f50[357],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":54,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[835],"\x61\x6C\x69\x61\x73":_0x4f50[807],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[808],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":55,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[243],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[768],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":55,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[838],"\x61\x6C\x69\x61\x73":_0x4f50[847],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":55,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[848],"\x61\x6C\x69\x61\x73":_0x4f50[357],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":55,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[710],"\x61\x6C\x69\x61\x73":_0x4f50[711],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":_0x4f50[818],"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":57,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[850],"\x61\x6C\x69\x61\x73":_0x4f50[839],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":57,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[710],"\x61\x6C\x69\x61\x73":_0x4f50[711],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":61,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[851],"\x61\x6C\x69\x61\x73":_0x4f50[601],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":61,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[852],"\x61\x6C\x69\x61\x73":_0x4f50[853],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":61,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[854],"\x61\x6C\x69\x61\x73":_0x4f50[614],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":61,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[710],"\x61\x6C\x69\x61\x73":_0x4f50[711],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":62,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[855],"\x61\x6C\x69\x61\x73":_0x4f50[856],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":62,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[857],"\x61\x6C\x69\x61\x73":_0x4f50[858],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":62,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[859],"\x61\x6C\x69\x61\x73":_0x4f50[85],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":62,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[838],"\x61\x6C\x69\x61\x73":_0x4f50[839],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":62,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[710],"\x61\x6C\x69\x61\x73":_0x4f50[711],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":63,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[860],"\x61\x6C\x69\x61\x73":_0x4f50[861],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":63,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[820],"\x61\x6C\x69\x61\x73":_0x4f50[862],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":63,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[859],"\x61\x6C\x69\x61\x73":_0x4f50[821],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":63,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[855],"\x61\x6C\x69\x61\x73":_0x4f50[856],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":63,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[857],"\x61\x6C\x69\x61\x73":_0x4f50[858],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":63,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[863],"\x61\x6C\x69\x61\x73":_0x4f50[839],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":63,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[710],"\x61\x6C\x69\x61\x73":_0x4f50[711],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":_0x4f50[818],"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":64,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[859],"\x61\x6C\x69\x61\x73":_0x4f50[864],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":_0x4f50[818],"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":64,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[850],"\x61\x6C\x69\x61\x73":_0x4f50[839],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":64,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[865],"\x61\x6C\x69\x61\x73":_0x4f50[866],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":65,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[671],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":65,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[828],"\x61\x6C\x69\x61\x73":_0x4f50[844],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":65,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[867],"\x61\x6C\x69\x61\x73":_0x4f50[695],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":65,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[868],"\x61\x6C\x69\x61\x73":_0x4f50[869],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":_0x4f50[818],"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":65,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[870],"\x61\x6C\x69\x61\x73":_0x4f50[871],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":65,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[872],"\x61\x6C\x69\x61\x73":_0x4f50[839],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":65,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[873],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":67,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[865],"\x61\x6C\x69\x61\x73":_0x4f50[866],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":67,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[828],"\x61\x6C\x69\x61\x73":_0x4f50[874],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":67,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[875],"\x61\x6C\x69\x61\x73":_0x4f50[876],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":67,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[877],"\x61\x6C\x69\x61\x73":_0x4f50[878],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":67,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[879],"\x61\x6C\x69\x61\x73":_0x4f50[880],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":68,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[881],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[810],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":68,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[882],"\x61\x6C\x69\x61\x73":_0x4f50[883],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":68,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[884],"\x61\x6C\x69\x61\x73":_0x4f50[885],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":68,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[886],"\x61\x6C\x69\x61\x73":_0x4f50[887],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":68,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[888],"\x61\x6C\x69\x61\x73":_0x4f50[889],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":68,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[890],"\x61\x6C\x69\x61\x73":_0x4f50[891],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":68,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[892],"\x61\x6C\x69\x61\x73":_0x4f50[711],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":69,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[893],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[768],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":69,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[894],"\x61\x6C\x69\x61\x73":_0x4f50[895],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":69,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[894],"\x61\x6C\x69\x61\x73":_0x4f50[896],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[897],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":69,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[676],"\x61\x6C\x69\x61\x73":_0x4f50[148],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":70,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[898],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[768],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":70,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[894],"\x61\x6C\x69\x61\x73":_0x4f50[895],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":70,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[894],"\x61\x6C\x69\x61\x73":_0x4f50[896],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[897],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":70,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[899],"\x61\x6C\x69\x61\x73":_0x4f50[900],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":72,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[901],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[810],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":72,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[902],"\x61\x6C\x69\x61\x73":_0x4f50[729],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":72,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[903],"\x61\x6C\x69\x61\x73":_0x4f50[782],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":72,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[904],"\x61\x6C\x69\x61\x73":_0x4f50[905],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":72,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[906],"\x61\x6C\x69\x61\x73":_0x4f50[907],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":72,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[908],"\x61\x6C\x69\x61\x73":_0x4f50[909],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":72,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[671],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[899],"\x61\x6C\x69\x61\x73":_0x4f50[910],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[911],"\x61\x6C\x69\x61\x73":_0x4f50[912],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[913],"\x61\x6C\x69\x61\x73":_0x4f50[914],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[710],"\x61\x6C\x69\x61\x73":_0x4f50[915],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[916],"\x61\x6C\x69\x61\x73":_0x4f50[917],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[868],"\x61\x6C\x69\x61\x73":_0x4f50[771],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[870],"\x61\x6C\x69\x61\x73":_0x4f50[772],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[918],"\x61\x6C\x69\x61\x73":_0x4f50[688],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[902],"\x61\x6C\x69\x61\x73":_0x4f50[729],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[919],"\x61\x6C\x69\x61\x73":_0x4f50[920],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[903],"\x61\x6C\x69\x61\x73":_0x4f50[782],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[904],"\x61\x6C\x69\x61\x73":_0x4f50[905],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[710],"\x61\x6C\x69\x61\x73":_0x4f50[711],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":74,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[902],"\x61\x6C\x69\x61\x73":_0x4f50[921],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":74,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[906],"\x61\x6C\x69\x61\x73":_0x4f50[907],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":74,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[908],"\x61\x6C\x69\x61\x73":_0x4f50[909],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":74,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[922],"\x61\x6C\x69\x61\x73":_0x4f50[923],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":74,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[924],"\x61\x6C\x69\x61\x73":_0x4f50[925],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":74,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[916],"\x61\x6C\x69\x61\x73":_0x4f50[148],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":75,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[901],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[768],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":75,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[902],"\x61\x6C\x69\x61\x73":_0x4f50[729],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":75,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[903],"\x61\x6C\x69\x61\x73":_0x4f50[782],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":75,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[904],"\x61\x6C\x69\x61\x73":_0x4f50[905],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":75,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[906],"\x61\x6C\x69\x61\x73":_0x4f50[926],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":75,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[908],"\x61\x6C\x69\x61\x73":_0x4f50[909],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":75,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[868],"\x61\x6C\x69\x61\x73":_0x4f50[807],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[808],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":76,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[901],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[810],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":76,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[902],"\x61\x6C\x69\x61\x73":_0x4f50[729],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":76,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[927],"\x61\x6C\x69\x61\x73":_0x4f50[928],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":76,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[906],"\x61\x6C\x69\x61\x73":_0x4f50[907],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":76,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[908],"\x61\x6C\x69\x61\x73":_0x4f50[909],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":76,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[916],"\x61\x6C\x69\x61\x73":_0x4f50[148],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":77,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[881],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[768],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":77,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[929],"\x61\x6C\x69\x61\x73":_0x4f50[883],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":77,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[904],"\x61\x6C\x69\x61\x73":_0x4f50[905],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":77,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[930],"\x61\x6C\x69\x61\x73":_0x4f50[885],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":77,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[931],"\x61\x6C\x69\x61\x73":_0x4f50[932],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":77,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[710],"\x61\x6C\x69\x61\x73":_0x4f50[710],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":79,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[933],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[768],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":79,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[934],"\x61\x6C\x69\x61\x73":_0x4f50[935],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":79,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[936],"\x61\x6C\x69\x61\x73":_0x4f50[711],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":79,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[937],"\x61\x6C\x69\x61\x73":_0x4f50[148],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":79,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[938],"\x61\x6C\x69\x61\x73":_0x4f50[807],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[808],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":81,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[939],"\x61\x6C\x69\x61\x73":_0x4f50[881],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":81,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[940],"\x61\x6C\x69\x61\x73":_0x4f50[941],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[730],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":81,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[942],"\x61\x6C\x69\x61\x73":_0x4f50[942],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[943],"\x61\x6C\x69\x61\x73":_0x4f50[943],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[944],"\x61\x6C\x69\x61\x73":_0x4f50[944],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[938],"\x61\x6C\x69\x61\x73":_0x4f50[938],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[945],"\x61\x6C\x69\x61\x73":_0x4f50[945],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[946],"\x61\x6C\x69\x61\x73":_0x4f50[946],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[947],"\x61\x6C\x69\x61\x73":_0x4f50[947],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[948],"\x61\x6C\x69\x61\x73":_0x4f50[948],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[949],"\x61\x6C\x69\x61\x73":_0x4f50[949],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[524],"\x61\x6C\x69\x61\x73":_0x4f50[524],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[840],"\x61\x6C\x69\x61\x73":_0x4f50[840],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[950],"\x61\x6C\x69\x61\x73":_0x4f50[950],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[840],"\x61\x6C\x69\x61\x73":_0x4f50[840],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":83,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[951],"\x61\x6C\x69\x61\x73":_0x4f50[483],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":83,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[947],"\x61\x6C\x69\x61\x73":_0x4f50[947],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[808],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":84,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x61\x6C\x69\x61\x73":_0x4f50[952],"\x66\x69\x65\x6C\x64":_0x4f50[9],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x4f50[768],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":84,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[953],"\x61\x6C\x69\x61\x73":_0x4f50[749],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0x4f50[698],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":84,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x4f50[938],"\x61\x6C\x69\x61\x73":_0x4f50[954],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":85,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x61\x6C\x69\x61\x73":_0x4f50[955],"\x66\x69\x65\x6C\x64":_0x4f50[9],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":85,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[956],"\x61\x6C\x69\x61\x73":_0x4f50[957],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":85,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[958],"\x61\x6C\x69\x61\x73":_0x4f50[959],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":85,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[943],"\x61\x6C\x69\x61\x73":_0x4f50[960],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":85,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[938],"\x61\x6C\x69\x61\x73":_0x4f50[954],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":90,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[670],"\x61\x6C\x69\x61\x73":_0x4f50[819],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":90,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[449],"\x61\x6C\x69\x61\x73":_0x4f50[212],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":90,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[676],"\x61\x6C\x69\x61\x73":_0x4f50[148],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":90,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[672],"\x61\x6C\x69\x61\x73":_0x4f50[703],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":90,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[710],"\x61\x6C\x69\x61\x73":_0x4f50[961],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":90,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[962],"\x61\x6C\x69\x61\x73":_0x4f50[962],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":90,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x4f50[963],"\x61\x6C\x69\x61\x73":_0x4f50[964],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":90,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0}];models[_0x4f50[971]][_0x4f50[371]]({where:{id:1}})[_0x4f50[11]](function(){return models[_0x4f50[971]][_0x4f50[44]]({id:1,tree:_0x4f50[972]})})[_0x4f50[11]](function(){return models[_0x4f50[971]][_0x4f50[970]]({where:{id:2},defaults:{id:2,tree:_0x4f50[969]}})})[_0x4f50[11]](function(){return models[_0x4f50[967]][_0x4f50[371]]({where:{DefaultReportId:{$ne:null}}})})[_0x4f50[11]](function(){return models[_0x4f50[968]][_0x4f50[371]]({where:{id:{$ne:null}}})})[_0x4f50[11]](function(){return models[_0x4f50[968]][_0x4f50[22]](_0xd284x29)})[_0x4f50[11]](function(){return models[_0x4f50[967]][_0x4f50[22]](_0xd284x2a,{ignoreDuplicates:true,individualHooks:true})})[_0x4f50[11]](function(){console[_0x4f50[8]](_0x4f50[966])})[_0x4f50[6]](function(_0xd284xc){console[_0x4f50[8]](_0x4f50[965],_0xd284xc)})})[_0x4f50[6]](function(_0xd284xc){console[_0x4f50[5]](_0xd284xc)})
\ No newline at end of file
diff --git a/server/config/sms/index.js b/server/config/sms/index.js
index 81fbf23..adf4fa6 100644
--- a/server/config/sms/index.js
+++ b/server/config/sms/index.js
@@ -1,23 +1 @@
-'use strict';
-var SmsAccount = require('../../models').SmsAccount;
-var Sms = require('./sms');
-
-
-module.exports = function() {
-  SmsAccount.afterCreate(function(server) {
-    var sms = new Sms();
-    sms.init(server);
-  });
-
-  return SmsAccount
-    .findAll()
-    .then(function(servers) {
-      servers.forEach(function(server) {
-        var sms = new Sms();
-        sms.init(server);
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
+var _0x7d07=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2F\x73\x6D\x73","\x65\x78\x70\x6F\x72\x74\x73","\x69\x6E\x69\x74","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x7d07[0];var SmsAccount=require(_0x7d07[2])[_0x7d07[1]];var Sms=require(_0x7d07[3]);module[_0x7d07[4]]= function(){SmsAccount[_0x7d07[6]](function(_0x8b58x3){var _0x8b58x4= new Sms();_0x8b58x4[_0x7d07[5]](_0x8b58x3)});return SmsAccount[_0x7d07[11]]()[_0x7d07[10]](function(_0x8b58x6){_0x8b58x6[_0x7d07[9]](function(_0x8b58x3){var _0x8b58x4= new Sms();_0x8b58x4[_0x7d07[5]](_0x8b58x3)})})[_0x7d07[8]](function(_0x8b58x5){console[_0x7d07[7]](_0x8b58x5)})}
\ No newline at end of file
diff --git a/server/config/sms/skebby.js b/server/config/sms/skebby.js
index 4f65a2d..76c0c31 100644
--- a/server/config/sms/skebby.js
+++ b/server/config/sms/skebby.js
@@ -1,110 +1 @@
-var qs = require('querystring');
-var https = require('https');
-var rp = require('request-promise');
-var Promise = require('bluebird');
-
-
-var skebbyMessage = function(input, callback) {
-
-  var text = input.text;
-  var sender_number = input.sender_number || "";
-  var sender_string = input.sender_string || "";
-  var method = input.method;
-  var lrecipients = input.recipients || [];
-  var username = input.username;
-  var password = input.password;
-
-  switch (method) {
-    case 'classic':
-      method = 'send_sms_classic';
-      break;
-    case 'classic+':
-      method = 'send_sms_classic_report';
-      break;
-    case 'test':
-      method = 'test_send_sms_basic';
-      break;
-    case 'basic':
-    default:
-      method = 'send_sms_basic';
-
-  }
-
-  var test = input.test || false;
-
-  var params = {
-    method: method,
-    username: username,
-    password: password,
-    "recipients[]": lrecipients,
-    text: text,
-    charset: "UTF-8",
-  };
-
-  if (sender_number) {
-    params.sender_number = sender_number;
-  } else if (sender_string) {
-    params.sender_string = sender_string;
-  }
-
-  if (test) {
-    params.method = "test_" + params.method;
-  }
-
-  var res_done = false;
-  var data = qs.stringify(params);
-
-  var client = https.request({
-    port: 443,
-    path: "/api/send/smseasy/advanced/http.php",
-    host: "gateway.skebby.it",
-    method: "POST",
-    headers: {
-      "Content-Type": "application/x-www-form-urlencoded",
-      "Content-Length": data.length,
-      "Content-Encoding": "utf8",
-    }
-  }, function(res) {
-    var res_data = "";
-    res.on('data', function(data) {
-      res_data += data;
-    });
-    res.on("end", function() {
-      if (!res_done) {
-        var res_parsed = qs.parse(res_data);
-        if (res_parsed.status == "success") {
-          callback(null, {
-            data: res_parsed
-          });
-        } else {
-          callback(res_parsed);
-        }
-        res_done = true;
-      }
-    });
-  });
-
-  client.end(data);
-  client.on('error', function(e) {
-    if (!res_done) {
-      callback(e);
-      res_done = true;
-    }
-  });
-};
-
-var sendMessage = function(message, account) {
-
-  var _message = {
-    method: account.smstype,
-    username: account.username,
-    password: account.password,
-    sender_number: /^[\+][0-9]+$/.test(message.from) ? message.from.replace("+", "") : message.from,
-    recipients: /^[\+][0-9]+$/.test(message.to) ? message.to.replace("+", "") : message.to,
-    text: message.body
-  };
-  var send = Promise.promisify(skebbyMessage);
-  return send(_message);
-};
-
-module.exports.sendMessage = sendMessage;
+var _0xaf93=["\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x68\x74\x74\x70\x73","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x74\x65\x78\x74","\x73\x65\x6E\x64\x65\x72\x5F\x6E\x75\x6D\x62\x65\x72","","\x73\x65\x6E\x64\x65\x72\x5F\x73\x74\x72\x69\x6E\x67","\x6D\x65\x74\x68\x6F\x64","\x72\x65\x63\x69\x70\x69\x65\x6E\x74\x73","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x63\x6C\x61\x73\x73\x69\x63","\x63\x6C\x61\x73\x73\x69\x63","\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x63\x6C\x61\x73\x73\x69\x63\x5F\x72\x65\x70\x6F\x72\x74","\x63\x6C\x61\x73\x73\x69\x63\x2B","\x74\x65\x73\x74\x5F\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x62\x61\x73\x69\x63","\x74\x65\x73\x74","\x62\x61\x73\x69\x63","\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x62\x61\x73\x69\x63","\x55\x54\x46\x2D\x38","\x74\x65\x73\x74\x5F","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x2F\x61\x70\x69\x2F\x73\x65\x6E\x64\x2F\x73\x6D\x73\x65\x61\x73\x79\x2F\x61\x64\x76\x61\x6E\x63\x65\x64\x2F\x68\x74\x74\x70\x2E\x70\x68\x70","\x67\x61\x74\x65\x77\x61\x79\x2E\x73\x6B\x65\x62\x62\x79\x2E\x69\x74","\x50\x4F\x53\x54","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x6C\x65\x6E\x67\x74\x68","\x75\x74\x66\x38","\x64\x61\x74\x61","\x6F\x6E","\x65\x6E\x64","\x70\x61\x72\x73\x65","\x73\x74\x61\x74\x75\x73","\x73\x75\x63\x63\x65\x73\x73","\x72\x65\x71\x75\x65\x73\x74","\x65\x72\x72\x6F\x72","\x73\x6D\x73\x74\x79\x70\x65","\x66\x72\x6F\x6D","\x2B","\x72\x65\x70\x6C\x61\x63\x65","\x74\x6F","\x62\x6F\x64\x79","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x65\x78\x70\x6F\x72\x74\x73"];var qs=require(_0xaf93[0]);var https=require(_0xaf93[1]);var rp=require(_0xaf93[2]);var Promise=require(_0xaf93[3]);var skebbyMessage=function(_0x8887x6,_0x8887x7){var _0x8887x8=_0x8887x6[_0xaf93[4]];var _0x8887x9=_0x8887x6[_0xaf93[5]]|| _0xaf93[6];var _0x8887xa=_0x8887x6[_0xaf93[7]]|| _0xaf93[6];var _0x8887xb=_0x8887x6[_0xaf93[8]];var _0x8887xc=_0x8887x6[_0xaf93[9]]|| [];var _0x8887xd=_0x8887x6[_0xaf93[10]];var _0x8887xe=_0x8887x6[_0xaf93[11]];switch(_0x8887xb){case _0xaf93[13]:_0x8887xb= _0xaf93[12];break;case _0xaf93[15]:_0x8887xb= _0xaf93[14];break;case _0xaf93[17]:_0x8887xb= _0xaf93[16];break;case _0xaf93[18]:;default:_0x8887xb= _0xaf93[19]};var _0x8887xf=_0x8887x6[_0xaf93[17]]|| false;var _0x8887x10={method:_0x8887xb,username:_0x8887xd,password:_0x8887xe,"\x72\x65\x63\x69\x70\x69\x65\x6E\x74\x73\x5B\x5D":_0x8887xc,text:_0x8887x8,charset:_0xaf93[20]};if(_0x8887x9){_0x8887x10[_0xaf93[5]]= _0x8887x9}else {if(_0x8887xa){_0x8887x10[_0xaf93[7]]= _0x8887xa}};if(_0x8887xf){_0x8887x10[_0xaf93[8]]= _0xaf93[21]+ _0x8887x10[_0xaf93[8]]};var _0x8887x11=false;var _0x8887x12=qs[_0xaf93[22]](_0x8887x10);var _0x8887x13=https[_0xaf93[35]]({port:443,path:_0xaf93[23],host:_0xaf93[24],method:_0xaf93[25],headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xaf93[26],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68":_0x8887x12[_0xaf93[27]],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67":_0xaf93[28]}},function(_0x8887x14){var _0x8887x15=_0xaf93[6];_0x8887x14[_0xaf93[30]](_0xaf93[29],function(_0x8887x12){_0x8887x15+= _0x8887x12});_0x8887x14[_0xaf93[30]](_0xaf93[31],function(){if(!_0x8887x11){var _0x8887x16=qs[_0xaf93[32]](_0x8887x15);if(_0x8887x16[_0xaf93[33]]== _0xaf93[34]){_0x8887x7(null,{data:_0x8887x16})}else {_0x8887x7(_0x8887x16)};_0x8887x11= true}})});_0x8887x13[_0xaf93[31]](_0x8887x12);_0x8887x13[_0xaf93[30]](_0xaf93[36],function(_0x8887x17){if(!_0x8887x11){_0x8887x7(_0x8887x17);_0x8887x11= true}})};var sendMessage=function(_0x8887x19,_0x8887x1a){var _0x8887x1b={method:_0x8887x1a[_0xaf93[37]],username:_0x8887x1a[_0xaf93[10]],password:_0x8887x1a[_0xaf93[11]],sender_number:/^[\+][0-9]+$/[_0xaf93[17]](_0x8887x19[_0xaf93[38]])?_0x8887x19[_0xaf93[38]][_0xaf93[40]](_0xaf93[39],_0xaf93[6]):_0x8887x19[_0xaf93[38]],recipients:/^[\+][0-9]+$/[_0xaf93[17]](_0x8887x19[_0xaf93[41]])?_0x8887x19[_0xaf93[41]][_0xaf93[40]](_0xaf93[39],_0xaf93[6]):_0x8887x19[_0xaf93[41]],text:_0x8887x19[_0xaf93[42]]};var _0x8887x1c=Promise[_0xaf93[43]](skebbyMessage);return _0x8887x1c(_0x8887x1b)};module[_0xaf93[45]][_0xaf93[44]]= sendMessage
\ No newline at end of file
diff --git a/server/config/sms/sms.js b/server/config/sms/sms.js
index 2fe7f71..62501af 100644
--- a/server/config/sms/sms.js
+++ b/server/config/sms/sms.js
@@ -1,285 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Promise = require('bluebird');
-var Util = require('../util');
-var moment = require('moment');
-var path = require('path');
-var util = require('util');
-var fs = require('fs');
-var Agent = require('../../models').User;
-var SmsRoom = require('../../models').SmsRoom;
-var SmsMessage = require('../../models').SmsMessage;
-var SmsAccount = require('../../models').SmsAccount;
-var ReportSms = require('../../models').ReportSms;
-var Action = require('../../models').Action;
-var path = require('path');
-var fs = require('fs');
-var Contact = require('../../models').Contact;
-
-
-var Scheduler = require('../routing/scheduler');
-
-function Sms() {
-  console.log('Sms Initialization...');
-  this.account = null;
-}
-
-Sms.prototype.init = function(doc) {
-  var self = this;
-  console.log("SMS - Account " + doc.name + " SMS CREATE");
-  self.account = doc;
-  SmsAccount.afterUpdate(function(doc) {
-    if (self.account && doc.id === self.account.id) {
-      self.onUpdate(doc);
-    }
-  });
-  ReportSms.afterUpdate(function(doc) {
-    if (self.account && doc.accountid == self.account.id) {
-      if (doc.changed('connectid')) {
-        self.webhook(doc, 'accept');
-      }
-      if (doc.changed('rejectedAt')) {
-        self.webhook(doc, 'reject');
-      }
-    }
-  });
-  SmsRoom.afterUpdate(function(doc) {
-    if (self.account && doc.SmsAccountId == self.account.id) {
-      if (doc.changed('status') && doc.status === 'CLOSED') {
-        self.webhook(doc, 'close');
-      }
-    }
-  })
-  SmsAccount.afterDestroy(function(doc) {
-    if (self.account && doc.id === self.account.id) {
-      self.onRemove(doc);
-    }
-  });
-  SmsMessage.afterCreate(function(doc, opt) {
-
-    if (self.account && self.account.id == doc.dataValues.SmsAccountId) {
-
-      if (doc.status === 'RECEIVED') {
-        var scheduler = new Scheduler({
-          channel: 'sms',
-          uniqueid: util.format('%s.%s', moment().unix(), doc.SmsRoomId),
-          messageid: doc.id,
-          roomid: doc.SmsRoomId,
-          accountid: self.account.id,
-          accountname: self.account.name,
-          accountnumber: self.account.phone,
-          from: doc.from
-        })
-
-        scheduler.init();
-      }
-
-      self.onSend(doc, opt);
-    }
-  });
-};
-
-Sms.prototype.onUpdate = function(doc) {
-  if (!doc.changed('state')) {
-    console.log("SMS - Account " + doc.name + " SMS UPDATE");
-    this.account = null;
-    this.account = doc;
-  }
-}
-
-Sms.prototype.onRemove = function(doc) {
-  console.log("[SMS - Account " + doc.name + " SMS DESTROY");
-  this.account = null;
-}
-
-Sms.prototype.onSend = function(smsMessage, opt) {
-  // var self = this;
-  var _Account = this.account;
-  var _mMessage = smsMessage;
-  var _Room;
-  var _mAgent;
-
-  if (_mMessage.status === 'SENDING') {
-
-    return Promise
-      .all([])
-      .then(getSmsRoom(_mMessage, this.account.name))
-      .then(function(smsRoom) {
-        _Room = smsRoom;
-        return _mMessage
-          .setSmsRoom(smsRoom.id);
-      })
-      .then(function() {
-        return _Room
-          .updateAttributes({
-            voiceSource: _Room.voiceSource || _mMessage.auto,
-            lastEvent: 'SENDING',
-            lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'),
-            smsOut: ++_Room.smsOut
-          }, {
-            individualHooks: true,
-            user: opt.user
-          });
-      })
-      .then(function(message) {
-        return Agent.
-        findById(_mMessage.UserId);
-      })
-      .then(function(mAgent) {
-        _mAgent = mAgent;
-        return _Room
-          .addUser(_mAgent);
-      })
-      .then(function() {
-        if (_Account.ListId) {
-          return Contact
-            .findOrCreate({
-              where: {
-                ListId: _Account.ListId,
-                mobile: _mMessage.from
-              },
-              defaults: {
-                ListId: _Account.ListId,
-                mobile: _mMessage.from
-              }
-            });
-        } else {
-          return [];
-        }
-      })
-      .then(function() {
-        console.log("SENDING SMS...");
-        var file = path.join(__dirname, _Account.type + '.js');
-        if (fs.existsSync(file)) {
-          return require(file).sendMessage(_mMessage, _Account)
-        } else {
-          throw new Error("SMS - INTERGRATION " + _Account.type + " NOT FOUND!!");
-        }
-      })
-      .then(function(res) {
-        // console.log('response', response);
-        console.log(" SMS SENT...");
-        return _mMessage
-          .update({
-            status: (_Account.type == 'skebby') ? 'SENT' : res.status,
-            skebby_message_id: (_Account.type == 'skebby') ? res.data.id : null,
-            res_data: JSON.stringify(res)
-          })
-      })
-      .then(function() {
-        return _Room
-          .updateAttributes({
-            lastEvent: 'SENT',
-            lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss')
-          });
-      })
-      .catch(function(err) {
-        console.log('err', err);
-        _mMessage
-          .update({
-            status: 'FAILED',
-            errorcode: err.code,
-            res_data: JSON.stringify(err)
-          })
-          .then(function() {
-            return _Room
-              .updateAttributes({
-                lastEvent: 'FAILED',
-                lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss')
-              });
-          })
-          .catch(function(err) {
-            console.log('Error updating error status');
-          });
-
-      })
-  }
-}
-
-function getSmsRoom(_mMessage, name) {
-  return function() {
-    if (_mMessage.SmsRoomId) {
-      return SmsRoom
-        .findById(_mMessage.SmsRoomId)
-    } else {
-      return SmsRoom
-        .findAll({
-          limit: 1,
-          where: {
-            contact: _mMessage.to,
-            SmsAccountId: _mMessage.SmsAccountId
-          },
-          order: [
-            ['createdAt', 'DESC']
-          ]
-        })
-        .then(function(smsroom) {
-          var room = smsroom[0];
-          if (!room || room.status === 'CLOSED') {
-            var parentID = room ? room.id : null;
-            return SmsRoom
-              .create({
-                contact: _mMessage.to,
-                SmsAccountId: _mMessage.SmsAccountId,
-                status: _mMessage.auto ? 'CLOSED' : 'PENDING',
-                ParentId: parentID,
-                account: name
-              })
-          } else {
-            return room;
-          }
-        })
-    }
-
-  }
-}
-
-
-function execRequest(doc, method, url) {
-  Util.sendRequest(doc, method, url)
-    .then(function(values) {
-      console.log('request successeful!');
-
-    })
-    .catch(function(err) {
-      console.log('request failed!');
-
-    })
-}
-
-Sms.prototype.webhook = function(doc, hook) {
-  var _Account = this.account;
-
-  switch (hook) {
-    case 'accept':
-      if (_Account.acceptMethod && _Account.acceptUrl) {
-        console.log('SMS account <' + _Account.name + '> executing accept webhook');
-        execRequest(doc.dataValues, _Account.acceptMethod, _Account.acceptUrl);
-      }
-      if (_Account.actions.length) {
-        _.forEach(_Account.actions, function(action) {
-          if (action.enabled) {
-            Util.execAction(action, doc);
-          }
-        })
-      }
-      break;
-    case 'reject':
-      if (_Account.rejectMethod && _Account.rejectUrl) {
-        console.log('SMS account <' + _Account.name + '> executing reject webhook');
-        execRequest(doc.dataValues, _Account.rejectMethod, _Account.rejectUrl);
-      }
-      break;
-    case 'close':
-      if (_Account.closeMethod && _Account.closeUrl) {
-        console.log('SMS account <' + _Account.name + '> executing close webhook');
-        execRequest(doc.dataValues, _Account.closeMethod, _Account.closeUrl);
-      }
-      break;
-    default:
-      console.log('Webhook not recognized');
-  }
-}
-
-module.exports = Sms;
+var _0xaa4d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x70\x61\x74\x68","\x75\x74\x69\x6C","\x66\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x52\x6F\x6F\x6D","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73","\x41\x63\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x72\x6F\x75\x74\x69\x6E\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x53\x6D\x73\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x53\x4D\x53\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x6E\x61\x6D\x65","\x20\x53\x4D\x53\x20\x43\x52\x45\x41\x54\x45","\x69\x64","\x6F\x6E\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x63\x68\x61\x6E\x67\x65\x64","\x61\x63\x63\x65\x70\x74","\x77\x65\x62\x68\x6F\x6F\x6B","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x72\x65\x6A\x65\x63\x74","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x73\x74\x61\x74\x75\x73","\x43\x4C\x4F\x53\x45\x44","\x63\x6C\x6F\x73\x65","\x6F\x6E\x52\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x73\x6D\x73","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x53\x6D\x73\x52\x6F\x6F\x6D\x49\x64","\x70\x68\x6F\x6E\x65","\x66\x72\x6F\x6D","\x6F\x6E\x53\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x65","\x20\x53\x4D\x53\x20\x55\x50\x44\x41\x54\x45","\x5B\x53\x4D\x53\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x20\x53\x4D\x53\x20\x44\x45\x53\x54\x52\x4F\x59","\x53\x45\x4E\x44\x49\x4E\x47","\x65\x72\x72","\x45\x72\x72\x6F\x72\x20\x75\x70\x64\x61\x74\x69\x6E\x67\x20\x65\x72\x72\x6F\x72\x20\x73\x74\x61\x74\x75\x73","\x63\x61\x74\x63\x68","\x46\x41\x49\x4C\x45\x44","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x74\x68\x65\x6E","\x63\x6F\x64\x65","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x75\x70\x64\x61\x74\x65","\x53\x45\x4E\x54","\x20\x53\x4D\x53\x20\x53\x45\x4E\x54\x2E\x2E\x2E","\x74\x79\x70\x65","\x73\x6B\x65\x62\x62\x79","\x64\x61\x74\x61","\x53\x45\x4E\x44\x49\x4E\x47\x20\x53\x4D\x53\x2E\x2E\x2E","\x2E\x6A\x73","\x6A\x6F\x69\x6E","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x53\x4D\x53\x20\x2D\x20\x49\x4E\x54\x45\x52\x47\x52\x41\x54\x49\x4F\x4E\x20","\x20\x4E\x4F\x54\x20\x46\x4F\x55\x4E\x44\x21\x21","\x4C\x69\x73\x74\x49\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x76\x6F\x69\x63\x65\x53\x6F\x75\x72\x63\x65","\x61\x75\x74\x6F","\x73\x6D\x73\x4F\x75\x74","\x75\x73\x65\x72","\x73\x65\x74\x53\x6D\x73\x52\x6F\x6F\x6D","\x61\x6C\x6C","\x74\x6F","\x50\x45\x4E\x44\x49\x4E\x47","\x63\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x65\x71\x75\x65\x73\x74\x20\x66\x61\x69\x6C\x65\x64\x21","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x75\x63\x63\x65\x73\x73\x65\x66\x75\x6C\x21","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x61\x63\x63\x65\x70\x74\x4D\x65\x74\x68\x6F\x64","\x61\x63\x63\x65\x70\x74\x55\x72\x6C","\x53\x4D\x53\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x3C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x61\x63\x63\x65\x70\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x6C\x65\x6E\x67\x74\x68","\x61\x63\x74\x69\x6F\x6E\x73","\x65\x6E\x61\x62\x6C\x65\x64","\x65\x78\x65\x63\x41\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x65\x6A\x65\x63\x74\x4D\x65\x74\x68\x6F\x64","\x72\x65\x6A\x65\x63\x74\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x72\x65\x6A\x65\x63\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x63\x6C\x6F\x73\x65\x4D\x65\x74\x68\x6F\x64","\x63\x6C\x6F\x73\x65\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x63\x6C\x6F\x73\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x57\x65\x62\x68\x6F\x6F\x6B\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0xaa4d[0];var _=require(_0xaa4d[1]);var Promise=require(_0xaa4d[2]);var Util=require(_0xaa4d[3]);var moment=require(_0xaa4d[4]);var path=require(_0xaa4d[5]);var util=require(_0xaa4d[6]);var fs=require(_0xaa4d[7]);var Agent=require(_0xaa4d[9])[_0xaa4d[8]];var SmsRoom=require(_0xaa4d[9])[_0xaa4d[10]];var SmsMessage=require(_0xaa4d[9])[_0xaa4d[11]];var SmsAccount=require(_0xaa4d[9])[_0xaa4d[12]];var ReportSms=require(_0xaa4d[9])[_0xaa4d[13]];var Action=require(_0xaa4d[9])[_0xaa4d[14]];var path=require(_0xaa4d[5]);var fs=require(_0xaa4d[7]);var Contact=require(_0xaa4d[9])[_0xaa4d[15]];var Scheduler=require(_0xaa4d[16]);function Sms(){console[_0xaa4d[18]](_0xaa4d[17]);this[_0xaa4d[19]]= null}Sms[_0xaa4d[21]][_0xaa4d[20]]= function(_0x2240x11){var _0x2240x12=this;console[_0xaa4d[18]](_0xaa4d[22]+ _0x2240x11[_0xaa4d[23]]+ _0xaa4d[24]);_0x2240x12[_0xaa4d[19]]= _0x2240x11;SmsAccount[_0xaa4d[27]](function(_0x2240x11){if(_0x2240x12[_0xaa4d[19]]&& _0x2240x11[_0xaa4d[25]]=== _0x2240x12[_0xaa4d[19]][_0xaa4d[25]]){_0x2240x12[_0xaa4d[26]](_0x2240x11)}});ReportSms[_0xaa4d[27]](function(_0x2240x11){if(_0x2240x12[_0xaa4d[19]]&& _0x2240x11[_0xaa4d[28]]== _0x2240x12[_0xaa4d[19]][_0xaa4d[25]]){if(_0x2240x11[_0xaa4d[30]](_0xaa4d[29])){_0x2240x12[_0xaa4d[32]](_0x2240x11,_0xaa4d[31])};if(_0x2240x11[_0xaa4d[30]](_0xaa4d[33])){_0x2240x12[_0xaa4d[32]](_0x2240x11,_0xaa4d[34])}}});SmsRoom[_0xaa4d[27]](function(_0x2240x11){if(_0x2240x12[_0xaa4d[19]]&& _0x2240x11[_0xaa4d[35]]== _0x2240x12[_0xaa4d[19]][_0xaa4d[25]]){if(_0x2240x11[_0xaa4d[30]](_0xaa4d[36])&& _0x2240x11[_0xaa4d[36]]=== _0xaa4d[37]){_0x2240x12[_0xaa4d[32]](_0x2240x11,_0xaa4d[38])}}});SmsAccount[_0xaa4d[40]](function(_0x2240x11){if(_0x2240x12[_0xaa4d[19]]&& _0x2240x11[_0xaa4d[25]]=== _0x2240x12[_0xaa4d[19]][_0xaa4d[25]]){_0x2240x12[_0xaa4d[39]](_0x2240x11)}});SmsMessage[_0xaa4d[51]](function(_0x2240x11,_0x2240x13){if(_0x2240x12[_0xaa4d[19]]&& _0x2240x12[_0xaa4d[19]][_0xaa4d[25]]== _0x2240x11[_0xaa4d[41]][_0xaa4d[35]]){if(_0x2240x11[_0xaa4d[36]]=== _0xaa4d[42]){var _0x2240x14= new Scheduler({channel:_0xaa4d[43],uniqueid:util[_0xaa4d[46]](_0xaa4d[44],moment()[_0xaa4d[45]](),_0x2240x11.SmsRoomId),messageid:_0x2240x11[_0xaa4d[25]],roomid:_0x2240x11[_0xaa4d[47]],accountid:_0x2240x12[_0xaa4d[19]][_0xaa4d[25]],accountname:_0x2240x12[_0xaa4d[19]][_0xaa4d[23]],accountnumber:_0x2240x12[_0xaa4d[19]][_0xaa4d[48]],from:_0x2240x11[_0xaa4d[49]]});_0x2240x14[_0xaa4d[20]]()};_0x2240x12[_0xaa4d[50]](_0x2240x11,_0x2240x13)}})};Sms[_0xaa4d[21]][_0xaa4d[26]]= function(_0x2240x11){if(!_0x2240x11[_0xaa4d[30]](_0xaa4d[52])){console[_0xaa4d[18]](_0xaa4d[22]+ _0x2240x11[_0xaa4d[23]]+ _0xaa4d[53]);this[_0xaa4d[19]]= null;this[_0xaa4d[19]]= _0x2240x11}};Sms[_0xaa4d[21]][_0xaa4d[39]]= function(_0x2240x11){console[_0xaa4d[18]](_0xaa4d[54]+ _0x2240x11[_0xaa4d[23]]+ _0xaa4d[55]);this[_0xaa4d[19]]= null};Sms[_0xaa4d[21]][_0xaa4d[50]]= function(_0x2240x15,_0x2240x13){var _0x2240x16=this[_0xaa4d[19]];var _0x2240x17=_0x2240x15;var _0x2240x18;var _0x2240x19;if(_0x2240x17[_0xaa4d[36]]=== _0xaa4d[56]){return Promise[_0xaa4d[88]]([])[_0xaa4d[63]](getSmsRoom(_0x2240x17,this[_0xaa4d[19]][_0xaa4d[23]]))[_0xaa4d[63]](function(_0x2240x1f){_0x2240x18= _0x2240x1f;return _0x2240x17[_0xaa4d[87]](_0x2240x1f[_0xaa4d[25]])})[_0xaa4d[63]](function(){return _0x2240x18[_0xaa4d[62]]({voiceSource:_0x2240x18[_0xaa4d[83]]|| _0x2240x17[_0xaa4d[84]],lastEvent:_0xaa4d[56],lastEventAt:moment()[_0xaa4d[46]](_0xaa4d[61]),smsOut:++_0x2240x18[_0xaa4d[85]]},{individualHooks:true,user:_0x2240x13[_0xaa4d[86]]})})[_0xaa4d[63]](function(_0x2240x1e){return Agent[_0xaa4d[82]](_0x2240x17.UserId)})[_0xaa4d[63]](function(_0x2240x1d){_0x2240x19= _0x2240x1d;return _0x2240x18[_0xaa4d[81]](_0x2240x19)})[_0xaa4d[63]](function(){if(_0x2240x16[_0xaa4d[79]]){return Contact[_0xaa4d[80]]({where:{ListId:_0x2240x16[_0xaa4d[79]],mobile:_0x2240x17[_0xaa4d[49]]},defaults:{ListId:_0x2240x16[_0xaa4d[79]],mobile:_0x2240x17[_0xaa4d[49]]}})}else {return []}})[_0xaa4d[63]](function(){console[_0xaa4d[18]](_0xaa4d[72]);var _0x2240x1c=path[_0xaa4d[74]](__dirname,_0x2240x16[_0xaa4d[69]]+ _0xaa4d[73]);if(fs[_0xaa4d[75]](_0x2240x1c)){return require(_0x2240x1c)[_0xaa4d[76]](_0x2240x17,_0x2240x16)}else {throw  new Error(_0xaa4d[77]+ _0x2240x16[_0xaa4d[69]]+ _0xaa4d[78])}})[_0xaa4d[63]](function(_0x2240x1b){console[_0xaa4d[18]](_0xaa4d[68]);return _0x2240x17[_0xaa4d[66]]({status:(_0x2240x16[_0xaa4d[69]]== _0xaa4d[70])?_0xaa4d[67]:_0x2240x1b[_0xaa4d[36]],skebby_message_id:(_0x2240x16[_0xaa4d[69]]== _0xaa4d[70])?_0x2240x1b[_0xaa4d[71]][_0xaa4d[25]]:null,res_data:JSON[_0xaa4d[65]](_0x2240x1b)})})[_0xaa4d[63]](function(){return _0x2240x18[_0xaa4d[62]]({lastEvent:_0xaa4d[67],lastEventAt:moment()[_0xaa4d[46]](_0xaa4d[61])})})[_0xaa4d[59]](function(_0x2240x1a){console[_0xaa4d[18]](_0xaa4d[57],_0x2240x1a);_0x2240x17[_0xaa4d[66]]({status:_0xaa4d[60],errorcode:_0x2240x1a[_0xaa4d[64]],res_data:JSON[_0xaa4d[65]](_0x2240x1a)})[_0xaa4d[63]](function(){return _0x2240x18[_0xaa4d[62]]({lastEvent:_0xaa4d[60],lastEventAt:moment()[_0xaa4d[46]](_0xaa4d[61])})})[_0xaa4d[59]](function(_0x2240x1a){console[_0xaa4d[18]](_0xaa4d[58])})})}};function getSmsRoom(_0x2240x17,_0x2240x21){return function(){if(_0x2240x17[_0xaa4d[47]]){return SmsRoom[_0xaa4d[82]](_0x2240x17.SmsRoomId)}else {return SmsRoom[_0xaa4d[94]]({limit:1,where:{contact:_0x2240x17[_0xaa4d[89]],SmsAccountId:_0x2240x17[_0xaa4d[35]]},order:[[_0xaa4d[92],_0xaa4d[93]]]})[_0xaa4d[63]](function(_0x2240x22){var _0x2240x23=_0x2240x22[0];if(!_0x2240x23|| _0x2240x23[_0xaa4d[36]]=== _0xaa4d[37]){var _0x2240x24=_0x2240x23?_0x2240x23[_0xaa4d[25]]:null;return SmsRoom[_0xaa4d[91]]({contact:_0x2240x17[_0xaa4d[89]],SmsAccountId:_0x2240x17[_0xaa4d[35]],status:_0x2240x17[_0xaa4d[84]]?_0xaa4d[37]:_0xaa4d[90],ParentId:_0x2240x24,account:_0x2240x21})}else {return _0x2240x23}})}}}function execRequest(_0x2240x11,_0x2240x26,_0x2240x27){Util[_0xaa4d[97]](_0x2240x11,_0x2240x26,_0x2240x27)[_0xaa4d[63]](function(_0x2240x28){console[_0xaa4d[18]](_0xaa4d[96])})[_0xaa4d[59]](function(_0x2240x1a){console[_0xaa4d[18]](_0xaa4d[95])})}Sms[_0xaa4d[21]][_0xaa4d[32]]= function(_0x2240x11,_0x2240x29){var _0x2240x16=this[_0xaa4d[19]];switch(_0x2240x29){case _0xaa4d[31]:if(_0x2240x16[_0xaa4d[98]]&& _0x2240x16[_0xaa4d[99]]){console[_0xaa4d[18]](_0xaa4d[100]+ _0x2240x16[_0xaa4d[23]]+ _0xaa4d[101]);execRequest(_0x2240x11[_0xaa4d[41]],_0x2240x16[_0xaa4d[98]],_0x2240x16[_0xaa4d[99]])};if(_0x2240x16[_0xaa4d[103]][_0xaa4d[102]]){_[_0xaa4d[106]](_0x2240x16[_0xaa4d[103]],function(_0x2240x2a){if(_0x2240x2a[_0xaa4d[104]]){Util[_0xaa4d[105]](_0x2240x2a,_0x2240x11)}})};break;case _0xaa4d[34]:if(_0x2240x16[_0xaa4d[107]]&& _0x2240x16[_0xaa4d[108]]){console[_0xaa4d[18]](_0xaa4d[100]+ _0x2240x16[_0xaa4d[23]]+ _0xaa4d[109]);execRequest(_0x2240x11[_0xaa4d[41]],_0x2240x16[_0xaa4d[107]],_0x2240x16[_0xaa4d[108]])};break;case _0xaa4d[38]:if(_0x2240x16[_0xaa4d[110]]&& _0x2240x16[_0xaa4d[111]]){console[_0xaa4d[18]](_0xaa4d[100]+ _0x2240x16[_0xaa4d[23]]+ _0xaa4d[112]);execRequest(_0x2240x11[_0xaa4d[41]],_0x2240x16[_0xaa4d[110]],_0x2240x16[_0xaa4d[111]])};break;default:console[_0xaa4d[18]](_0xaa4d[113])}};module[_0xaa4d[114]]= Sms
\ No newline at end of file
diff --git a/server/config/sms/twilio.js b/server/config/sms/twilio.js
index b4949ef..d3829f7 100644
--- a/server/config/sms/twilio.js
+++ b/server/config/sms/twilio.js
@@ -1,22 +1 @@
-'use strict';
-var twilio = require('twilio');
-// https://twilio.github.io/twilio-node/
-var SmsMessage = require('../../models').SmsMessage;
-var Promise = require('bluebird');
-
-
-var sendMessage = function(message, account) {
-  var client = twilio(account.sid, account.token);
-  var url = account.remote + '/api/sms/accounts/' + account.id + '/message/' +
-    message.id + '/update';
-
-  var send = Promise.promisify(client.sendMessage);
-  return send({
-    to: /^[\+][0-9]+$/.test(message.to) ? message.to : '+' + message.to, // Any number Twilio can deliver to
-    from: /^[\+][0-9]+$/.test(message.from) ? message.from : '+' + message.from, // A number you bought from Twilio and can use for outbound communication
-    body: message.body, // body of the SMS message
-    StatusCallback: url
-  });
-}
-
-module.exports.sendMessage = sendMessage;
+var _0x1fc4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x74\x77\x69\x6C\x69\x6F","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x69\x64","\x74\x6F\x6B\x65\x6E","\x72\x65\x6D\x6F\x74\x65","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F","\x69\x64","\x2F\x6D\x65\x73\x73\x61\x67\x65\x2F","\x2F\x75\x70\x64\x61\x74\x65","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x74\x6F","\x74\x65\x73\x74","\x2B","\x66\x72\x6F\x6D","\x62\x6F\x64\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x1fc4[0];var twilio=require(_0x1fc4[1]);var SmsMessage=require(_0x1fc4[3])[_0x1fc4[2]];var Promise=require(_0x1fc4[4]);var sendMessage=function(_0x11edx5,_0x11edx6){var _0x11edx7=twilio(_0x11edx6[_0x1fc4[5]],_0x11edx6[_0x1fc4[6]]);var _0x11edx8=_0x11edx6[_0x1fc4[7]]+ _0x1fc4[8]+ _0x11edx6[_0x1fc4[9]]+ _0x1fc4[10]+ _0x11edx5[_0x1fc4[9]]+ _0x1fc4[11];var _0x11edx9=Promise[_0x1fc4[13]](_0x11edx7[_0x1fc4[12]]);return _0x11edx9({to:/^[\+][0-9]+$/[_0x1fc4[15]](_0x11edx5[_0x1fc4[14]])?_0x11edx5[_0x1fc4[14]]:_0x1fc4[16]+ _0x11edx5[_0x1fc4[14]],from:/^[\+][0-9]+$/[_0x1fc4[15]](_0x11edx5[_0x1fc4[17]])?_0x11edx5[_0x1fc4[17]]:_0x1fc4[16]+ _0x11edx5[_0x1fc4[17]],body:_0x11edx5[_0x1fc4[18]],StatusCallback:_0x11edx8})};module[_0x1fc4[19]][_0x1fc4[12]]= sendMessage
\ No newline at end of file
diff --git a/server/config/smtp/index.js b/server/config/smtp/index.js
index 60a6f38..4ce84f2 100644
--- a/server/config/smtp/index.js
+++ b/server/config/smtp/index.js
@@ -1,131 +1 @@
-'use strict';
-
-const util = require('util');
-const cp = require('child_process');
-const ms = require('../../models').MailServerOut;
-const msg = require('../../models').MailMessage;
-const rm = require('../../models').MailRoom;
-
-function fork(id, username) {
-  return cp
-    .fork(__dirname + '/smtp', [id, username])
-    .on('message', function(data) {
-
-      if (data.type === 'update') {
-        return msg
-          .findById(data.msgId)
-          .then(function(message) {
-            return message
-              .update(data);
-          })
-          .then(function() {
-            return rm
-              .findById(data.roomId);
-          })
-          .then(function(room) {
-            return room
-              .update({
-                lastEvent: data.status
-              });
-          });
-      }
-
-      if (data.type === 'state') {
-        return ms
-          .findById(id)
-          .then(function(server) {
-            return server
-              .update({
-                state: data.state,
-                source: data.source || null
-              });
-          })
-          .then(function() {
-            console.log(data.log);
-          })
-          .catch(function(err) {
-            console.error(err);
-          });
-      }
-    })
-    .on('close', function(code) {
-      console.log(util.format('SMTP SERVER %s EXITED WITH CODE %s', username, code));
-    })
-    .on('error', function(err) {
-      console.error(err);
-    });
-}
-
-module.exports = function() {
-  var childs = {};
-
-  process.on('exit', function(code) {
-    for (var key in childs) {
-      if (childs[key]) {
-        childs[key].kill();
-      }
-    }
-  });
-
-  msg.afterCreate(function(message) {
-    if (childs[message.from]) {
-      message.dataValues.type = 'message';
-      message.dataValues.retrySend = 0;
-      childs[message.from].send(message.dataValues);
-    }
-  });
-
-  msg.afterUpdate(function(message) {
-    if (message.changed('status') && message.status === 'SENDING') {
-      if (childs[message.from]) {
-        message.dataValues.type = 'message';
-        message.dataValues.retrySend = message.dataValues.retry + 1;
-        childs[message.from].send(message.dataValues);
-      }
-    }
-  });
-
-  ms.afterCreate(function(server) {
-    childs[server.username] = fork(server.id, server.username);
-  });
-
-  ms.afterUpdate(function(server) {
-    if (childs[server.username]) {
-      if ((!server.changed('state') && !server.changed('source')) || server.changed('host') || server.changed('username') || server.changed('password') || server.changed('port') || server.changed(
-          'ssl')) {
-        childs[server.username].kill();
-        childs[server.username] = null;
-
-        childs[server.username] = fork(server.id, server.username);
-
-        console.log(util.format('SMTP SERVER %s UPDATED, PROCESS ID: %s ', server.id, childs[server.username].pid));
-      } else {
-        childs[server.username].send({
-          type: 'state',
-          state: server.state,
-          source: server.source,
-          username: server.username
-        });
-      }
-    }
-  });
-
-  ms.afterDestroy(function(server) {
-    if (childs[server.username]) {
-      console.log(util.format('SMTP SERVER %s DESTROYED, PROCESS ID: %s ', server.id, childs[server.username].pid));
-
-      childs[server.username].kill();
-      childs[server.username] = null;
-    }
-  });
-
-  ms.findAll()
-    .then(function(servers) {
-      servers.forEach(function(server) {
-        childs[server.username] = fork(server.id, server.username);
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
+var _0x943f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x45\x58\x49\x54\x45\x44\x20\x57\x49\x54\x48\x20\x43\x4F\x44\x45\x20\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67","\x6D\x65\x73\x73\x61\x67\x65","\x74\x79\x70\x65","\x75\x70\x64\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x72\x6F\x6F\x6D\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6D\x73\x67\x49\x64","\x73\x74\x61\x74\x65","\x63\x61\x74\x63\x68","\x73\x6F\x75\x72\x63\x65","\x2F\x73\x6D\x74\x70","\x66\x6F\x72\x6B","\x65\x78\x70\x6F\x72\x74\x73","\x65\x78\x69\x74","\x6B\x69\x6C\x6C","\x66\x72\x6F\x6D","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x72\x65\x74\x72\x79\x53\x65\x6E\x64","\x73\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x53\x45\x4E\x44\x49\x4E\x47","\x72\x65\x74\x72\x79","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x69\x64","\x68\x6F\x73\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x70\x6F\x72\x74","\x73\x73\x6C","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x55\x50\x44\x41\x54\x45\x44\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x70\x69\x64","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x44\x45\x53\x54\x52\x4F\x59\x45\x44\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x66\x6F\x72\x45\x61\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x943f[0];const util=require(_0x943f[1]);const cp=require(_0x943f[2]);const ms=require(_0x943f[4])[_0x943f[3]];const msg=require(_0x943f[4])[_0x943f[5]];const rm=require(_0x943f[4])[_0x943f[6]];function fork(_0xa37ex7,_0xa37ex8){return cp[_0x943f[25]](__dirname+ _0x943f[24],[_0xa37ex7,_0xa37ex8])[_0x943f[8]](_0x943f[13],function(_0xa37exb){if(_0xa37exb[_0x943f[14]]=== _0x943f[15]){return msg[_0x943f[19]](_0xa37exb[_0x943f[20]])[_0x943f[17]](function(_0xa37exd){return _0xa37exd[_0x943f[15]](_0xa37exb)})[_0x943f[17]](function(){return rm[_0x943f[19]](_0xa37exb[_0x943f[18]])})[_0x943f[17]](function(_0xa37exc){return _0xa37exc[_0x943f[15]]({lastEvent:_0xa37exb[_0x943f[16]]})})};if(_0xa37exb[_0x943f[14]]=== _0x943f[21]){return ms[_0x943f[19]](_0xa37ex7)[_0x943f[17]](function(_0xa37exe){return _0xa37exe[_0x943f[15]]({state:_0xa37exb[_0x943f[21]],source:_0xa37exb[_0x943f[23]]|| null})})[_0x943f[17]](function(){console[_0x943f[12]](_0xa37exb[_0x943f[12]])})[_0x943f[22]](function(_0xa37ex9){console[_0x943f[7]](_0xa37ex9)})}})[_0x943f[8]](_0x943f[9],function(_0xa37exa){console[_0x943f[12]](util[_0x943f[11]](_0x943f[10],_0xa37ex8,_0xa37exa))})[_0x943f[8]](_0x943f[7],function(_0xa37ex9){console[_0x943f[7]](_0xa37ex9)})}module[_0x943f[26]]= function(){var _0xa37exf={};process[_0x943f[8]](_0x943f[27],function(_0xa37exa){for(var _0xa37ex10 in _0xa37exf){if(_0xa37exf[_0xa37ex10]){_0xa37exf[_0xa37ex10][_0x943f[28]]()}}});msg[_0x943f[33]](function(_0xa37exd){if(_0xa37exf[_0xa37exd[_0x943f[29]]]){_0xa37exd[_0x943f[30]][_0x943f[14]]= _0x943f[13];_0xa37exd[_0x943f[30]][_0x943f[31]]= 0;_0xa37exf[_0xa37exd[_0x943f[29]]][_0x943f[32]](_0xa37exd[_0x943f[30]])}});msg[_0x943f[37]](function(_0xa37exd){if(_0xa37exd[_0x943f[34]](_0x943f[16])&& _0xa37exd[_0x943f[16]]=== _0x943f[35]){if(_0xa37exf[_0xa37exd[_0x943f[29]]]){_0xa37exd[_0x943f[30]][_0x943f[14]]= _0x943f[13];_0xa37exd[_0x943f[30]][_0x943f[31]]= _0xa37exd[_0x943f[30]][_0x943f[36]]+ 1;_0xa37exf[_0xa37exd[_0x943f[29]]][_0x943f[32]](_0xa37exd[_0x943f[30]])}}});ms[_0x943f[33]](function(_0xa37exe){_0xa37exf[_0xa37exe[_0x943f[38]]]= fork(_0xa37exe[_0x943f[39]],_0xa37exe[_0x943f[38]])});ms[_0x943f[37]](function(_0xa37exe){if(_0xa37exf[_0xa37exe[_0x943f[38]]]){if((!_0xa37exe[_0x943f[34]](_0x943f[21])&& !_0xa37exe[_0x943f[34]](_0x943f[23]))|| _0xa37exe[_0x943f[34]](_0x943f[40])|| _0xa37exe[_0x943f[34]](_0x943f[38])|| _0xa37exe[_0x943f[34]](_0x943f[41])|| _0xa37exe[_0x943f[34]](_0x943f[42])|| _0xa37exe[_0x943f[34]](_0x943f[43])){_0xa37exf[_0xa37exe[_0x943f[38]]][_0x943f[28]]();_0xa37exf[_0xa37exe[_0x943f[38]]]= null;_0xa37exf[_0xa37exe[_0x943f[38]]]= fork(_0xa37exe[_0x943f[39]],_0xa37exe[_0x943f[38]]);console[_0x943f[12]](util[_0x943f[11]](_0x943f[44],_0xa37exe[_0x943f[39]],_0xa37exf[_0xa37exe[_0x943f[38]]][_0x943f[45]]))}else {_0xa37exf[_0xa37exe[_0x943f[38]]][_0x943f[32]]({type:_0x943f[21],state:_0xa37exe[_0x943f[21]],source:_0xa37exe[_0x943f[23]],username:_0xa37exe[_0x943f[38]]})}}});ms[_0x943f[47]](function(_0xa37exe){if(_0xa37exf[_0xa37exe[_0x943f[38]]]){console[_0x943f[12]](util[_0x943f[11]](_0x943f[46],_0xa37exe[_0x943f[39]],_0xa37exf[_0xa37exe[_0x943f[38]]][_0x943f[45]]));_0xa37exf[_0xa37exe[_0x943f[38]]][_0x943f[28]]();_0xa37exf[_0xa37exe[_0x943f[38]]]= null}});ms[_0x943f[49]]()[_0x943f[17]](function(_0xa37ex11){_0xa37ex11[_0x943f[48]](function(_0xa37exe){_0xa37exf[_0xa37exe[_0x943f[38]]]= fork(_0xa37exe[_0x943f[39]],_0xa37exe[_0x943f[38]])})})[_0x943f[22]](function(_0xa37ex9){console[_0x943f[7]](_0xa37ex9)})}
\ No newline at end of file
diff --git a/server/config/smtp/smtp.js b/server/config/smtp/smtp.js
index 5d66100..1034b2b 100644
--- a/server/config/smtp/smtp.js
+++ b/server/config/smtp/smtp.js
@@ -1,396 +1 @@
-'use strict';
-
-var util = require('util');
-var promise = require('bluebird');
-
-var _ = require('lodash');
-var moment = require('moment');
-var Mustache = require('mustache');
-
-var nodemailer = require('nodemailer');
-var smtpTransport = require('nodemailer-smtp-transport');
-var htmlToText = require('html-to-text');
-
-var Agent = require('../../models').User;
-var Room = require('../../models').MailRoom;
-var Template = require('../../models').Template;
-var Account = require('../../models').MailAccount;
-var Message = require('../../models').MailMessage;
-var Server = require('../../models').MailServerOut;
-var Status = require('../../models').MailRoomStatus;
-var Attachment = require('../../models').MailAttachment;
-
-var smtp;
-var timeout;
-
-process
-  .on('message', function(data) {
-    if (data.type === 'message') {
-      onSend(data);
-    }
-
-    if (data.type === 'state') {
-      switch (data.state) {
-        case 'CONNECTING':
-          onVerify(data.username);
-          break;
-
-        default:
-      }
-    }
-  })
-  .on('close', function(code) {
-    console.log(util.format('SMTP SERVER %s EXITED WITH CODE %s', process.argv[3], code));
-  })
-  .on('error', function(err) {
-    console.error(err);
-  });
-
-console.log(util.format('SMTP SERVER %s STARTING, PROCESS ID: %s ', process.argv[3], process.pid));
-
-function onVerify(username) {
-  smtp.verify()
-    .then(function() {
-      process.send({
-        type: 'state',
-        state: 'CONNECTED',
-        source: null,
-        log: util.format('SMTP SERVER %s CONNECTED, PROCESS ID: %s ', username, process.pid)
-      });
-    })
-    .catch(function(err) {
-      process.send({
-        type: 'state',
-        state: 'ERROR',
-        source: JSON.stringify(err),
-        log: util.format('SMTP SERVER %s ERROR, PROCESS ID: %s ', username, process.pid)
-      });
-    });
-}
-
-function onSave(server) {
-
-  smtp = nodemailer
-    .createTransport(smtpTransport({
-      host: server.host,
-      port: server.port,
-      secure: server.ssl,
-      pool: true,
-      auth: {
-        user: server.username,
-        pass: server.password
-      }
-    }));
-
-  smtp.mailAccountId = server.MailAccountId;
-  smtp.mailServerOutId = server.id;
-  smtp.username = server.username;
-
-  onVerify(server.username);
-}
-
-function onSend(message) {
-  console.log(util.format('SMTP SERVER %s SENDING MSG, PROCESS ID: %s ', process.argv[3], process.pid));
-
-  if (message.status === 'SENDING') {
-    var _mRoom;
-    var _mAccount;
-    var _mAgent;
-    var _mMessage = message;
-    var _mFrom, _mTo, _mCc, _mBcc;
-
-    if (_mMessage.inReplyTo) {
-      return Message
-        .findOne({
-          where: {
-            messageId: _mMessage.inReplyTo
-          }
-        })
-        .then(function(mailMessageParent) {
-          return mailMessageParent
-            .getMailRoom({
-              include: {
-                model: Account,
-                include: [{
-                  model: Template
-                }]
-              }
-            });
-        })
-        .then(function(mailRoom) {
-          _mRoom = mailRoom;
-          _mAccount = mailRoom.MailAccount;
-          return _mRoom
-            .addMailMessage(_mMessage.id);
-        })
-        .then(function() {
-          var data = {
-            lastEvent: 'SENDING',
-            attachment: _mMessage.MailAttachments && _mMessage.MailAttachments.length,
-            mailOut: ++_mRoom.mailOut
-          };
-
-          if (!message.auto) {
-            data.status = 'PENDING';
-          }
-
-          return _mRoom
-            .update(data);
-        })
-        .then(function() {
-          return Agent.
-          findById(_mMessage.UserId);
-        })
-        .then(function(mAgent) {
-          _mAgent = mAgent;
-          return _mRoom
-            .addUser(_mAgent);
-        })
-        .then(function() {
-          _mMessage.html = _mMessage.html ? _mMessage.html.toString('utf8') : null;
-          _mMessage.text = _mMessage.text ? _mMessage.text.toString('utf8') : null;
-
-          var _to = _mMessage.to ? _.without(_mMessage.to.split(';'), _mAccount.address) : [];
-          var _cc = _mMessage.cc ? _.without(_mMessage.cc.split(';'), _mAccount.address) : [];
-          var _bcc = _mMessage.bcc ? _.without(_mMessage.bcc.split(';'), _mAccount.address) : [];
-
-          var _html = (_mAccount.Template && !message.auto) ? Mustache.render(_mAccount.Template.html, {
-            interactionId: _mRoom.id,
-            subject: _mMessage.subject,
-            body: _mMessage.html ? _mMessage.html : _mMessage.text,
-            accountName: _mAccount.name,
-            from: _mMessage.from,
-            to: _to.join(';'),
-            cc: _cc.join(';'),
-            bcc: _bcc.join(';'),
-            agentName: _mAgent.fullname,
-            agentEmail: _mAgent.email,
-            createdAt: _mMessage.createdAt
-          }) : _mMessage.html;
-
-          var _text;
-          if (_mMessage.text) {
-            _text = _mMessage.text;
-          } else {
-            _text = _mMessage.html ? htmlToText.fromString(_mMessage.html, {
-              wordwrap: false
-            }) : null;
-          }
-          if (_mAccount.whiteLabel) {
-            _html += '<br>' + _mAccount.whiteLabel;
-            _text += '<br>' + _mAccount.whiteLabel;
-          } else {
-            _html += '<br> Sent with XCALLYÂ®';
-            _text += '<br> Sent with XCALLYÂ®';
-          }
-          var mail = {
-            status: _mMessage.status,
-            from: {
-              name: _mAccount.name,
-              address: _mAccount.address
-            },
-            to: _to.join(';'),
-            cc: _cc.join(';'),
-            bcc: _bcc.join(';'),
-            subject: _mMessage.subject,
-            html: _html,
-            text: _text
-          };
-
-          if (_mMessage.MailAttachments) {
-            mail.attachments = _.map(_mMessage.MailAttachments, function(elm) {
-              return {
-                path: elm.path,
-                filename: elm.name
-              }
-            });
-          }
-
-          return smtp
-            .sendMail(mail);
-        })
-        .then(function(info) {
-          process.send({
-            msgId: _mMessage.id,
-            roomId: _mRoom.id,
-            type: 'update',
-            messageId: info.messageId,
-            status: 'SENT',
-            retry: _mMessage.retrySend
-          });
-        })
-        .catch(function(err) {
-          console.error(err);
-          process.send({
-            msgId: _mMessage.id,
-            roomId: _mRoom.id,
-            type: 'update',
-            status: 'FAILED',
-            retry: _mMessage.retrySend
-          });
-        });
-    } else {
-      // NO REPLY, NEW MESSAGE, NEW ROOM
-      return Account
-        .findById(smtp.mailAccountId, {
-          include: [{
-            model: Template
-          }]
-        })
-        .then(function(mailAccount) {
-          _mAccount = mailAccount;
-
-          return Room
-            .findById(_mMessage.MailRoomId);
-        })
-        .then(function(mailRoom) {
-          if (!mailRoom) {
-            return Agent
-              .findById(message.UserId)
-              .then(function(agent) {
-                return Room
-                  .create({
-                    subject: _mMessage.subject,
-                    from: _mMessage.from,
-                    account: _mAccount ? _mAccount.name : null,
-                    status: 'PENDING',
-                    lastEvent: 'SENDING',
-                    attachment: _mMessage.MailAttachments && _mMessage.MailAttachments.length,
-                    MailAccountId: _mAccount ? _mAccount.id : null,
-                    mailOut: 1,
-                    arrivedAt: moment().format('YYYY-MM-DD HH:mm:ss'),
-                    MailRoomStatuses: [{
-                      status: 'PENDING',
-                      data1: agent ? agent.name : null,
-                      data2: agent ? agent.fullname : null,
-                      UserId: agent ? agent.id : null
-                    }]
-                  }, {
-                    include: [{
-                      model: Message
-                    }, {
-                      model: Status
-                    }]
-                  });
-              });
-          } else {
-            return mailRoom;
-          }
-        })
-        .then(function(mailRoom) {
-          _mRoom = mailRoom
-
-          return Message
-            .update({
-              MailRoomId: mailRoom.id
-            }, {
-              where: {
-                id: message.id
-              },
-              individualHooks: true
-            });
-        })
-        .then(function() {
-
-          return Agent
-            .findById(_mMessage.UserId);
-        })
-        .then(function(mAgent) {
-          _mAgent = mAgent;
-          return _mRoom
-            .addUser(_mAgent);
-        })
-        .then(function() {
-          _mMessage.html = _mMessage.html ? _mMessage.html.toString('utf8') : null;
-          _mMessage.text = _mMessage.text ? _mMessage.text.toString('utf8') : null;
-
-          var _to = _mMessage.to ? _.without(_mMessage.to.split(';'), _mAccount.address) : [];
-          var _cc = _mMessage.cc ? _.without(_mMessage.cc.split(';'), _mAccount.address) : [];
-          var _bcc = _mMessage.bcc ? _.without(_mMessage.bcc.split(';'), _mAccount.address) : [];
-
-          var _html = (_mAccount.Template && !message.auto) ? Mustache.render(_mAccount.Template.html, {
-            interactionId: _mRoom.id,
-            subject: _mMessage.subject,
-            body: _mMessage.html ? _mMessage.html : _mMessage.text,
-            accountName: _mAccount.name,
-            from: _mMessage.from,
-            to: _to.join(';'),
-            cc: _cc.join(';'),
-            bcc: _bcc.join(';'),
-            agentName: _mAgent ? _mAgent.fullname : '',
-            agentEmail: _mAgent ? _mAgent.email : '',
-            createdAt: _mMessage.createdAt
-          }) : _mMessage.html;
-
-          var _text;
-          if (_mMessage.text) {
-            _text = _mMessage.text;
-          } else {
-            _text = _mMessage.html ? htmlToText.fromString(_mMessage.html, {
-              wordwrap: false
-            }) : null;
-          }
-          if (_mAccount.whiteLabel) {
-            _html += '<br>' + _mAccount.whiteLabel;
-            _text += '<br>' + _mAccount.whiteLabel;
-          } else {
-            _html += '<br> Sent with XCALLYÂ®';
-            _text += '<br> Sent with XCALLYÂ®';
-          }
-          var mail = {
-            status: _mMessage.status,
-            from: {
-              name: _mAccount.name,
-              address: _mAccount.address
-            },
-            to: _to.join(';'),
-            cc: _cc.join(';'),
-            bcc: _bcc.join(';'),
-            subject: _mMessage.subject,
-            html: _html,
-            text: _text
-          };
-          if (_mMessage.MailAttachments) {
-            mail.attachments = _.map(_mMessage.MailAttachments, function(elm) {
-              return {
-                path: elm.path,
-                filename: elm.name
-              }
-            });
-          }
-
-          return smtp
-            .sendMail(mail);
-        })
-        .then(function(info) {
-          process.send({
-            msgId: _mMessage.id,
-            roomId: _mRoom.id,
-            type: 'update',
-            messageId: info.messageId,
-            status: 'SENT',
-            retry: _mMessage.retrySend
-          });
-        })
-        .catch(function(err) {
-          console.error(err);
-          process.send({
-            msgId: _mMessage.id,
-            roomId: _mRoom.id,
-            type: 'update',
-            status: 'FAILED',
-            retry: _mMessage.retrySend
-          });
-        });
-    }
-  }
-}
-
-Server
-  .findById(process.argv[2])
-  .then(function(server) {
-    onSave(server);
-  })
-  .catch(function(err) {
-    console.error(err);
-  });
+var _0xa5f1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x75\x73\x74\x61\x63\x68\x65","\x6E\x6F\x64\x65\x6D\x61\x69\x6C\x65\x72","\x6E\x6F\x64\x65\x6D\x61\x69\x6C\x65\x72\x2D\x73\x6D\x74\x70\x2D\x74\x72\x61\x6E\x73\x70\x6F\x72\x74","\x68\x74\x6D\x6C\x2D\x74\x6F\x2D\x74\x65\x78\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x45\x58\x49\x54\x45\x44\x20\x57\x49\x54\x48\x20\x43\x4F\x44\x45\x20\x25\x73","\x61\x72\x67\x76","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67","\x6D\x65\x73\x73\x61\x67\x65","\x74\x79\x70\x65","\x73\x74\x61\x74\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x43\x4F\x4E\x4E\x45\x43\x54\x49\x4E\x47","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x53\x54\x41\x52\x54\x49\x4E\x47\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x70\x69\x64","\x45\x52\x52\x4F\x52","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x45\x52\x52\x4F\x52\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x73\x65\x6E\x64","\x63\x61\x74\x63\x68","\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x74\x68\x65\x6E","\x76\x65\x72\x69\x66\x79","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x73\x6C","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x72\x65\x61\x74\x65\x54\x72\x61\x6E\x73\x70\x6F\x72\x74","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x49\x64","\x69\x64","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x53\x45\x4E\x44\x49\x4E\x47\x20\x4D\x53\x47\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x73\x74\x61\x74\x75\x73","\x53\x45\x4E\x44\x49\x4E\x47","\x69\x6E\x52\x65\x70\x6C\x79\x54\x6F","\x75\x70\x64\x61\x74\x65","\x46\x41\x49\x4C\x45\x44","\x72\x65\x74\x72\x79\x53\x65\x6E\x64","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x53\x45\x4E\x54","\x68\x74\x6D\x6C","\x75\x74\x66\x38","\x74\x65\x78\x74","\x74\x6F","\x3B","\x73\x70\x6C\x69\x74","\x61\x64\x64\x72\x65\x73\x73","\x77\x69\x74\x68\x6F\x75\x74","\x63\x63","\x62\x63\x63","\x61\x75\x74\x6F","\x73\x75\x62\x6A\x65\x63\x74","\x6E\x61\x6D\x65","\x66\x72\x6F\x6D","\x6A\x6F\x69\x6E","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x72\x65\x6E\x64\x65\x72","\x66\x72\x6F\x6D\x53\x74\x72\x69\x6E\x67","\x77\x68\x69\x74\x65\x4C\x61\x62\x65\x6C","\x3C\x62\x72\x3E","\x3C\x62\x72\x3E\x20\x53\x65\x6E\x74\x20\x77\x69\x74\x68\x20\x58\x43\x41\x4C\x4C\x59\xAE","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x70\x61\x74\x68","\x6D\x61\x70","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x4F\x75\x74","\x50\x45\x4E\x44\x49\x4E\x47","\x61\x64\x64\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x66\x69\x6E\x64\x4F\x6E\x65","","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x63\x72\x65\x61\x74\x65"];_0xa5f1[0];var util=require(_0xa5f1[1]);var promise=require(_0xa5f1[2]);var _=require(_0xa5f1[3]);var moment=require(_0xa5f1[4]);var Mustache=require(_0xa5f1[5]);var nodemailer=require(_0xa5f1[6]);var smtpTransport=require(_0xa5f1[7]);var htmlToText=require(_0xa5f1[8]);var Agent=require(_0xa5f1[10])[_0xa5f1[9]];var Room=require(_0xa5f1[10])[_0xa5f1[11]];var Template=require(_0xa5f1[10])[_0xa5f1[12]];var Account=require(_0xa5f1[10])[_0xa5f1[13]];var Message=require(_0xa5f1[10])[_0xa5f1[14]];var Server=require(_0xa5f1[10])[_0xa5f1[15]];var Status=require(_0xa5f1[10])[_0xa5f1[16]];var Attachment=require(_0xa5f1[10])[_0xa5f1[17]];var smtp;var timeout;process[_0xa5f1[19]](_0xa5f1[25],function(_0x8685x15){if(_0x8685x15[_0xa5f1[26]]=== _0xa5f1[25]){onSend(_0x8685x15)};if(_0x8685x15[_0xa5f1[26]]=== _0xa5f1[27]){switch(_0x8685x15[_0xa5f1[27]]){case _0xa5f1[29]:onVerify(_0x8685x15[_0xa5f1[28]]);break;default:}}})[_0xa5f1[19]](_0xa5f1[20],function(_0x8685x14){console[_0xa5f1[24]](util[_0xa5f1[23]](_0xa5f1[21],process[_0xa5f1[22]][3],_0x8685x14))})[_0xa5f1[19]](_0xa5f1[18],function(_0x8685x13){console[_0xa5f1[18]](_0x8685x13)});console[_0xa5f1[24]](util[_0xa5f1[23]](_0xa5f1[30],process[_0xa5f1[22]][3],process[_0xa5f1[31]]));function onVerify(_0x8685x17){smtp[_0xa5f1[40]]()[_0xa5f1[39]](function(){process[_0xa5f1[35]]({type:_0xa5f1[27],state:_0xa5f1[37],source:null,log:util[_0xa5f1[23]](_0xa5f1[38],_0x8685x17,process[_0xa5f1[31]])})})[_0xa5f1[36]](function(_0x8685x13){process[_0xa5f1[35]]({type:_0xa5f1[27],state:_0xa5f1[32],source:JSON[_0xa5f1[33]](_0x8685x13),log:util[_0xa5f1[23]](_0xa5f1[34],_0x8685x17,process[_0xa5f1[31]])})})}function onSave(_0x8685x19){smtp= nodemailer[_0xa5f1[45]](smtpTransport({host:_0x8685x19[_0xa5f1[41]],port:_0x8685x19[_0xa5f1[42]],secure:_0x8685x19[_0xa5f1[43]],pool:true,auth:{user:_0x8685x19[_0xa5f1[28]],pass:_0x8685x19[_0xa5f1[44]]}}));smtp[_0xa5f1[46]]= _0x8685x19[_0xa5f1[47]];smtp[_0xa5f1[48]]= _0x8685x19[_0xa5f1[49]];smtp[_0xa5f1[28]]= _0x8685x19[_0xa5f1[28]];onVerify(_0x8685x19[_0xa5f1[28]])}function onSend(_0x8685x1b){console[_0xa5f1[24]](util[_0xa5f1[23]](_0xa5f1[50],process[_0xa5f1[22]][3],process[_0xa5f1[31]]));if(_0x8685x1b[_0xa5f1[51]]=== _0xa5f1[52]){var _0x8685x1c;var _0x8685x1d;var _0x8685x1e;var _0x8685x1f=_0x8685x1b;var _0x8685x20,_0x8685x21,_0x8685x22,_0x8685x23;if(_0x8685x1f[_0xa5f1[53]]){return Message[_0xa5f1[94]]({where:{messageId:_0x8685x1f[_0xa5f1[53]]}})[_0xa5f1[39]](function(_0x8685x2e){return _0x8685x2e[_0xa5f1[93]]({include:{model:Account,include:[{model:Template}]}})})[_0xa5f1[39]](function(_0x8685x2d){_0x8685x1c= _0x8685x2d;_0x8685x1d= _0x8685x2d[_0xa5f1[13]];return _0x8685x1c[_0xa5f1[92]](_0x8685x1f[_0xa5f1[49]])})[_0xa5f1[39]](function(){var _0x8685x15={lastEvent:_0xa5f1[52],attachment:_0x8685x1f[_0xa5f1[82]]&& _0x8685x1f[_0xa5f1[82]][_0xa5f1[89]],mailOut:++_0x8685x1c[_0xa5f1[90]]};if(!_0x8685x1b[_0xa5f1[69]]){_0x8685x15[_0xa5f1[51]]= _0xa5f1[91]};return _0x8685x1c[_0xa5f1[54]](_0x8685x15)})[_0xa5f1[39]](function(){return Agent[_0xa5f1[88]](_0x8685x1f.UserId)})[_0xa5f1[39]](function(_0x8685x2c){_0x8685x1e= _0x8685x2c;return _0x8685x1c[_0xa5f1[87]](_0x8685x1e)})[_0xa5f1[39]](function(){_0x8685x1f[_0xa5f1[59]]= _0x8685x1f[_0xa5f1[59]]?_0x8685x1f[_0xa5f1[59]].toString(_0xa5f1[60]):null;_0x8685x1f[_0xa5f1[61]]= _0x8685x1f[_0xa5f1[61]]?_0x8685x1f[_0xa5f1[61]].toString(_0xa5f1[60]):null;var _0x8685x25=_0x8685x1f[_0xa5f1[62]]?_[_0xa5f1[66]](_0x8685x1f[_0xa5f1[62]][_0xa5f1[64]](_0xa5f1[63]),_0x8685x1d[_0xa5f1[65]]):[];var _0x8685x26=_0x8685x1f[_0xa5f1[67]]?_[_0xa5f1[66]](_0x8685x1f[_0xa5f1[67]][_0xa5f1[64]](_0xa5f1[63]),_0x8685x1d[_0xa5f1[65]]):[];var _0x8685x27=_0x8685x1f[_0xa5f1[68]]?_[_0xa5f1[66]](_0x8685x1f[_0xa5f1[68]][_0xa5f1[64]](_0xa5f1[63]),_0x8685x1d[_0xa5f1[65]]):[];var _0x8685x28=(_0x8685x1d[_0xa5f1[12]]&& !_0x8685x1b[_0xa5f1[69]])?Mustache[_0xa5f1[77]](_0x8685x1d[_0xa5f1[12]][_0xa5f1[59]],{interactionId:_0x8685x1c[_0xa5f1[49]],subject:_0x8685x1f[_0xa5f1[70]],body:_0x8685x1f[_0xa5f1[59]]?_0x8685x1f[_0xa5f1[59]]:_0x8685x1f[_0xa5f1[61]],accountName:_0x8685x1d[_0xa5f1[71]],from:_0x8685x1f[_0xa5f1[72]],to:_0x8685x25[_0xa5f1[73]](_0xa5f1[63]),cc:_0x8685x26[_0xa5f1[73]](_0xa5f1[63]),bcc:_0x8685x27[_0xa5f1[73]](_0xa5f1[63]),agentName:_0x8685x1e[_0xa5f1[74]],agentEmail:_0x8685x1e[_0xa5f1[75]],createdAt:_0x8685x1f[_0xa5f1[76]]}):_0x8685x1f[_0xa5f1[59]];var _0x8685x29;if(_0x8685x1f[_0xa5f1[61]]){_0x8685x29= _0x8685x1f[_0xa5f1[61]]}else {_0x8685x29= _0x8685x1f[_0xa5f1[59]]?htmlToText[_0xa5f1[78]](_0x8685x1f[_0xa5f1[59]],{wordwrap:false}):null};if(_0x8685x1d[_0xa5f1[79]]){_0x8685x28+= _0xa5f1[80]+ _0x8685x1d[_0xa5f1[79]];_0x8685x29+= _0xa5f1[80]+ _0x8685x1d[_0xa5f1[79]]}else {_0x8685x28+= _0xa5f1[81];_0x8685x29+= _0xa5f1[81]};var _0x8685x2a={status:_0x8685x1f[_0xa5f1[51]],from:{name:_0x8685x1d[_0xa5f1[71]],address:_0x8685x1d[_0xa5f1[65]]},to:_0x8685x25[_0xa5f1[73]](_0xa5f1[63]),cc:_0x8685x26[_0xa5f1[73]](_0xa5f1[63]),bcc:_0x8685x27[_0xa5f1[73]](_0xa5f1[63]),subject:_0x8685x1f[_0xa5f1[70]],html:_0x8685x28,text:_0x8685x29};if(_0x8685x1f[_0xa5f1[82]]){_0x8685x2a[_0xa5f1[83]]= _[_0xa5f1[85]](_0x8685x1f.MailAttachments,function(_0x8685x2b){return {path:_0x8685x2b[_0xa5f1[84]],filename:_0x8685x2b[_0xa5f1[71]]}})};return smtp[_0xa5f1[86]](_0x8685x2a)})[_0xa5f1[39]](function(_0x8685x24){process[_0xa5f1[35]]({msgId:_0x8685x1f[_0xa5f1[49]],roomId:_0x8685x1c[_0xa5f1[49]],type:_0xa5f1[54],messageId:_0x8685x24[_0xa5f1[57]],status:_0xa5f1[58],retry:_0x8685x1f[_0xa5f1[56]]})})[_0xa5f1[36]](function(_0x8685x13){console[_0xa5f1[18]](_0x8685x13);process[_0xa5f1[35]]({msgId:_0x8685x1f[_0xa5f1[49]],roomId:_0x8685x1c[_0xa5f1[49]],type:_0xa5f1[54],status:_0xa5f1[55],retry:_0x8685x1f[_0xa5f1[56]]})})}else {return Account[_0xa5f1[88]](smtp[_0xa5f1[46]],{include:[{model:Template}]})[_0xa5f1[39]](function(_0x8685x30){_0x8685x1d= _0x8685x30;return Room[_0xa5f1[88]](_0x8685x1f.MailRoomId)})[_0xa5f1[39]](function(_0x8685x2d){if(!_0x8685x2d){return Agent[_0xa5f1[88]](_0x8685x1b.UserId)[_0xa5f1[39]](function(_0x8685x2f){return Room[_0xa5f1[97]]({subject:_0x8685x1f[_0xa5f1[70]],from:_0x8685x1f[_0xa5f1[72]],account:_0x8685x1d?_0x8685x1d[_0xa5f1[71]]:null,status:_0xa5f1[91],lastEvent:_0xa5f1[52],attachment:_0x8685x1f[_0xa5f1[82]]&& _0x8685x1f[_0xa5f1[82]][_0xa5f1[89]],MailAccountId:_0x8685x1d?_0x8685x1d[_0xa5f1[49]]:null,mailOut:1,arrivedAt:moment()[_0xa5f1[23]](_0xa5f1[96]),MailRoomStatuses:[{status:_0xa5f1[91],data1:_0x8685x2f?_0x8685x2f[_0xa5f1[71]]:null,data2:_0x8685x2f?_0x8685x2f[_0xa5f1[74]]:null,UserId:_0x8685x2f?_0x8685x2f[_0xa5f1[49]]:null}]},{include:[{model:Message},{model:Status}]})})}else {return _0x8685x2d}})[_0xa5f1[39]](function(_0x8685x2d){_0x8685x1c= _0x8685x2d;return Message[_0xa5f1[54]]({MailRoomId:_0x8685x2d[_0xa5f1[49]]},{where:{id:_0x8685x1b[_0xa5f1[49]]},individualHooks:true})})[_0xa5f1[39]](function(){return Agent[_0xa5f1[88]](_0x8685x1f.UserId)})[_0xa5f1[39]](function(_0x8685x2c){_0x8685x1e= _0x8685x2c;return _0x8685x1c[_0xa5f1[87]](_0x8685x1e)})[_0xa5f1[39]](function(){_0x8685x1f[_0xa5f1[59]]= _0x8685x1f[_0xa5f1[59]]?_0x8685x1f[_0xa5f1[59]].toString(_0xa5f1[60]):null;_0x8685x1f[_0xa5f1[61]]= _0x8685x1f[_0xa5f1[61]]?_0x8685x1f[_0xa5f1[61]].toString(_0xa5f1[60]):null;var _0x8685x25=_0x8685x1f[_0xa5f1[62]]?_[_0xa5f1[66]](_0x8685x1f[_0xa5f1[62]][_0xa5f1[64]](_0xa5f1[63]),_0x8685x1d[_0xa5f1[65]]):[];var _0x8685x26=_0x8685x1f[_0xa5f1[67]]?_[_0xa5f1[66]](_0x8685x1f[_0xa5f1[67]][_0xa5f1[64]](_0xa5f1[63]),_0x8685x1d[_0xa5f1[65]]):[];var _0x8685x27=_0x8685x1f[_0xa5f1[68]]?_[_0xa5f1[66]](_0x8685x1f[_0xa5f1[68]][_0xa5f1[64]](_0xa5f1[63]),_0x8685x1d[_0xa5f1[65]]):[];var _0x8685x28=(_0x8685x1d[_0xa5f1[12]]&& !_0x8685x1b[_0xa5f1[69]])?Mustache[_0xa5f1[77]](_0x8685x1d[_0xa5f1[12]][_0xa5f1[59]],{interactionId:_0x8685x1c[_0xa5f1[49]],subject:_0x8685x1f[_0xa5f1[70]],body:_0x8685x1f[_0xa5f1[59]]?_0x8685x1f[_0xa5f1[59]]:_0x8685x1f[_0xa5f1[61]],accountName:_0x8685x1d[_0xa5f1[71]],from:_0x8685x1f[_0xa5f1[72]],to:_0x8685x25[_0xa5f1[73]](_0xa5f1[63]),cc:_0x8685x26[_0xa5f1[73]](_0xa5f1[63]),bcc:_0x8685x27[_0xa5f1[73]](_0xa5f1[63]),agentName:_0x8685x1e?_0x8685x1e[_0xa5f1[74]]:_0xa5f1[95],agentEmail:_0x8685x1e?_0x8685x1e[_0xa5f1[75]]:_0xa5f1[95],createdAt:_0x8685x1f[_0xa5f1[76]]}):_0x8685x1f[_0xa5f1[59]];var _0x8685x29;if(_0x8685x1f[_0xa5f1[61]]){_0x8685x29= _0x8685x1f[_0xa5f1[61]]}else {_0x8685x29= _0x8685x1f[_0xa5f1[59]]?htmlToText[_0xa5f1[78]](_0x8685x1f[_0xa5f1[59]],{wordwrap:false}):null};if(_0x8685x1d[_0xa5f1[79]]){_0x8685x28+= _0xa5f1[80]+ _0x8685x1d[_0xa5f1[79]];_0x8685x29+= _0xa5f1[80]+ _0x8685x1d[_0xa5f1[79]]}else {_0x8685x28+= _0xa5f1[81];_0x8685x29+= _0xa5f1[81]};var _0x8685x2a={status:_0x8685x1f[_0xa5f1[51]],from:{name:_0x8685x1d[_0xa5f1[71]],address:_0x8685x1d[_0xa5f1[65]]},to:_0x8685x25[_0xa5f1[73]](_0xa5f1[63]),cc:_0x8685x26[_0xa5f1[73]](_0xa5f1[63]),bcc:_0x8685x27[_0xa5f1[73]](_0xa5f1[63]),subject:_0x8685x1f[_0xa5f1[70]],html:_0x8685x28,text:_0x8685x29};if(_0x8685x1f[_0xa5f1[82]]){_0x8685x2a[_0xa5f1[83]]= _[_0xa5f1[85]](_0x8685x1f.MailAttachments,function(_0x8685x2b){return {path:_0x8685x2b[_0xa5f1[84]],filename:_0x8685x2b[_0xa5f1[71]]}})};return smtp[_0xa5f1[86]](_0x8685x2a)})[_0xa5f1[39]](function(_0x8685x24){process[_0xa5f1[35]]({msgId:_0x8685x1f[_0xa5f1[49]],roomId:_0x8685x1c[_0xa5f1[49]],type:_0xa5f1[54],messageId:_0x8685x24[_0xa5f1[57]],status:_0xa5f1[58],retry:_0x8685x1f[_0xa5f1[56]]})})[_0xa5f1[36]](function(_0x8685x13){console[_0xa5f1[18]](_0x8685x13);process[_0xa5f1[35]]({msgId:_0x8685x1f[_0xa5f1[49]],roomId:_0x8685x1c[_0xa5f1[49]],type:_0xa5f1[54],status:_0xa5f1[55],retry:_0x8685x1f[_0xa5f1[56]]})})}}}Server[_0xa5f1[88]](process[_0xa5f1[22]][2])[_0xa5f1[39]](function(_0x8685x19){onSave(_0x8685x19)})[_0xa5f1[36]](function(_0x8685x13){console[_0xa5f1[18]](_0x8685x13)})
\ No newline at end of file
diff --git a/server/config/socketio.js b/server/config/socketio.js
index 9a17428..1b15979 100644
--- a/server/config/socketio.js
+++ b/server/config/socketio.js
@@ -1,315 +1 @@
-/**
- * Socket.io configuration
- */
-
-'use strict';
-
-var moment = require('moment');
-var util = require('util');
-var config = require('./environment');
-
-var User = require('../models').User;
-var Action = require('../models').Action;
-var VoiceQueue = require('../models').VoiceQueue;
-
-function onDisconnect(socket) {
-  console.info('[%s] SOCKET DISCONNECTED', socket.handshake.address);
-
-  if (socket.handshake.query.role) {
-    socket.leave(util.format("%ss", socket.handshake.query.role));
-  }
-
-  if (socket.userId) {
-    return User
-      .findById(socket.userId)
-      .then(function(user) {
-        if (!user) {
-          throw new Error('socket: no user found');
-        }
-        // return user
-        //   .update({
-        //     online: false
-        //   });
-        return Action
-          .create({
-            name: 'logout',
-            data1: socket.userId,
-            data2: socket.name,
-            UserId: socket.userId
-          })
-      })
-      .then(function(user) {
-        console.log('socket: user offline', user.name);
-      })
-      .catch(function(err) {
-        console.error(err);
-      });
-  } else {
-    console.log('socket: no user found');
-  }
-}
-
-function onConnect(socket, dashboardProcess) {
-
-  console.info('[%s] SOCKET CONNECTED', socket.handshake.address);
-
-  socket.setMaxListeners(0);
-  socket.address = socket.handshake.address !== null ? socket.handshake.address.address + ':' + socket.handshake.address.port : process.env.DOMAIN;
-  socket.userId = socket.handshake.query.userId;
-  socket.role = socket.handshake.query.role;
-  socket.name = socket.handshake.query.name;
-  socket.source = socket.handshake.query.source;
-  socket.connectedAt = new Date();
-
-  if (socket.handshake.query.role) {
-    socket.join(util.format("%ss", socket.handshake.query.role));
-  }
-
-  if (socket.userId) {
-    var _user;
-    return User
-      .findById(socket.userId, {
-        attributes: ['id', 'name', 'role'],
-        include: [{
-          model: VoiceQueue,
-          as: 'PVoiceQueues',
-          attributes: ['name'],
-        }, {
-          model: VoiceQueue
-        }],
-      })
-      .then(function(user) {
-        if (!user) {
-          throw new Error('socket: no user found');
-        }
-        _user = user;
-        if (!user.online) {
-          return Action
-            .create({
-              name: 'login',
-              data1: user.id,
-              data2: user.name,
-              UserId: user.id
-            });
-        }
-        return;
-      })
-      .then(function() {
-        return _user
-          .update({
-            online: true,
-            lastLoginAt: moment().format("YYYY-MM-DD HH:mm:ss")
-          })
-      })
-      .then(function(user) {
-
-        if (user.role !== 'agent') {
-          require('./tools/dashboard').register(socket);
-        }
-
-        // ADD USER TO THE QUEUE ROOM
-        socket.join(util.format('%s:%s', user.role, user.name));
-        socket.join(util.format('%s:%s', user.role, user.id));
-        socket.join(util.format('%s', user.name));
-
-        switch (user.role) {
-          case 'admin':
-            VoiceQueue
-              .findAll({
-                attributes: ['name']
-              })
-              .then(function(PVoiceQueues) {
-                PVoiceQueues.forEach(function(queue) {
-                  socket.join(queue.name);
-                });
-              })
-              .catch(function(err) {
-                console.error(err);
-              });
-            break;
-
-          case 'user':
-            user.PVoiceQueues.forEach(function(queue) {
-              socket.join(queue.name);
-            });
-            break;
-          case 'agent':
-            user.VoiceQueues.forEach(function(queue) {
-              socket.join(queue.name);
-            });
-            break;
-          default:
-        }
-
-        console.log('socket: user online', user.name);
-        // Insert sockets below
-        require('../api/report_openchannel_session/report_openchannel_session.socket').register(socket);
-        require('../api/report_openchannel/report_openchannel.socket').register(socket);
-        require('../api/user_has_openchannel_queue/user_has_openchannel_queue.socket').register(socket);
-        require('../api/openchannel_disposition/openchannel_disposition.socket').register(socket);
-        require('../api/openchannel_application/openchannel_application.socket').register(socket);
-        require('../api/openchannel_queue/openchannel_queue.socket').register(socket);
-        require('../api/openchannel_room/openchannel_room.socket').register(socket);
-        require('../api/openchannel_message/openchannel_message.socket').register(socket);
-        require('../api/openchannel_account/openchannel_account.socket').register(socket);
-        require('../api/fax_disposition/fax_disposition.socket').register(socket);
-        require('../api/sms_disposition/sms_disposition.socket').register(socket);
-        require('../api/mail_disposition/mail_disposition.socket').register(socket);
-        require('../api/chat_disposition/chat_disposition.socket').register(socket);
-        require('../api/voice_disposition/voice_disposition.socket').register(socket);
-        require('../api/fax_attachment/fax_attachment.socket').register(socket);
-        require('../api/report_fax_session/report_fax_session.socket').register(socket);
-        require('../api/report_fax/report_fax.socket').register(socket);
-        require('../api/network_externip/network_externip.socket').register(socket);
-        require('../api/network_localnet/network_localnet.socket').register(socket);
-
-        //Ordered alphabetically
-        require('../api/agent/agent.socket').register(socket);
-        require('../api/ami/ami.socket').register(socket);
-        require('../api/automation/automation.socket').register(socket);
-        require('../api/scheduler/scheduler.socket').register(socket);
-        require('../api/canned_answer/canned_answer.socket').register(socket);
-        require('../api/chanspy/chanspy.socket').register(socket);
-        require('../api/chat_application/chat_application.socket').register(socket);
-        require('../api/chat_enquiry/enquiry.socket').register(socket);
-        require('../api/chat_message/chat_message.socket').register(socket);
-        require('../api/chat_proactive_action/chat_proactive_action.socket').register(socket);
-        require('../api/chat_queue/chat_queue.socket').register(socket);
-        require('../api/chat_room/chat_room.socket').register(socket);
-        require('../api/chat_visitor/chat_visitor.socket').register(socket);
-        require('../api/chat_website/chat_website.socket').register(socket);
-        require('../api/chat_websites_field/chat_websites_field.socket').register(socket);
-        require('../api/company/company.socket').register(socket);
-        require('../api/contact_manager/contact_manager.socket').register(socket);
-        require('../api/custom_report/custom_report.socket').register(socket);
-        require('../api/dashboard/dashboard.socket').register(socket);
-        require('../api/default_report/default_report.socket').register(socket);
-        require('../api/desk_account/desk_account.socket').register(socket);
-        require('../api/desk_configuration/desk_configuration.socket').register(socket);
-        require('../api/desk_field/desk_field.socket').register(socket);
-        require('../api/extracted_report/extracted_report.socket').register(socket);
-        require('../api/fax_account/fax_account.socket').register(socket);
-        require('../api/fax_application/fax_application.socket').register(socket);
-        require('../api/fax_message/fax_message.socket').register(socket);
-        require('../api/fax_queue/fax_queue.socket').register(socket);
-        require('../api/fax_room/fax_room.socket').register(socket);
-        require('../api/freshdesk_account/freshdesk_account.socket').register(socket);
-        require('../api/freshdesk_configuration/freshdesk_configuration.socket').register(socket);
-        require('../api/freshdesk_field/freshdesk_field.socket').register(socket);
-        require('../api/integration/integration.socket').register(socket);
-        require('../api/interval/interval.socket').register(socket);
-        require('../api/jscripty_project/jscripty_project.socket').register(socket);
-        require('../api/list/list.socket').register(socket);
-        require('../api/mail_account/mail_account.socket').register(socket);
-        require('../api/mail_application/mail_application.socket').register(socket);
-        require('../api/mail_attachment/mail_attachment.socket').register(socket);
-        require('../api/mail_message/mail_message.socket').register(socket);
-        require('../api/mail_queue/mail_queue.socket').register(socket);
-        require('../api/mail_room/mail_room.socket').register(socket);
-        require('../api/mail_server_in/mail_server_in.socket').register(socket);
-        require('../api/mail_server_out/mail_server_out.socket').register(socket);
-        require('../api/template/template.socket').register(socket);
-        require('../api/metric/metric.socket').register(socket);
-        require('../api/module/module.socket').register(socket);
-        require('../api/motionbar/motionbar.socket').register(socket);
-        require('../api/report_tiger_dial/report_tiger_dial.socket').register(socket);
-        require('../api/report_agent/report_agent.socket').register(socket);
-        require('../api/report_member/report_member.socket').register(socket);
-        require('../api/report_call/report_call.socket').register(socket);
-        require('../api/report_dial/report_dial.socket').register(socket);
-        require('../api/report_chat/report_chat.socket').register(socket);
-        require('../api/report_chat_session/report_chat_session.socket').register(socket);
-        require('../api/report_integration/report_integration.socket').register(socket);
-        require('../api/report_sms/report_sms.socket').register(socket);
-        require('../api/report_mail/report_mail.socket').register(socket);
-        require('../api/report_mail_session/report_mail_session.socket').register(socket);
-        require('../api/report_sms_session/report_sms_session.socket').register(socket);
-        require('../api/report_queue/report_queue.socket').register(socket);
-        require('../api/report_square/report_square.socket').register(socket);
-        require('../api/report_square_detail/report_square_detail.socket').register(socket);
-        require('../api/report_tree/report_tree.socket').register(socket);
-        require('../api/salesforce_account/salesforce_account.socket').register(socket);
-        require('../api/salesforce_configuration/salesforce_configuration.socket').register(socket);
-        require('../api/salesforce_field/salesforce_field.socket').register(socket);
-        require('../api/setting/setting.socket').register(socket);
-        require('../api/sms_account/sms_account.socket').register(socket);
-        require('../api/sms_application/sms_application.socket').register(socket);
-        require('../api/sms_message/sms_message.socket').register(socket);
-        require('../api/sms_queue/sms_queue.socket').register(socket);
-        require('../api/sms_room/sms_room.socket').register(socket);
-        require('../api/square_odbc/square_odbc.socket').register(socket);
-        require('../api/square_project/square_project.socket').register(socket);
-        require('../api/square_recording/square_recording.socket').register(socket);
-        require('../api/sugarcrm_account/sugarcrm_account.socket').register(socket);
-        require('../api/sugarcrm_configuration/sugarcrm_configuration.socket').register(socket);
-        require('../api/sugarcrm_field/sugarcrm_field.socket').register(socket);
-        require('../api/tag/tag.socket').register(socket);
-        require('../api/team/team.socket').register(socket);
-        require('../api/trigger/trigger.socket').register(socket);
-        require('../api/trunk/trunk.socket').register(socket);
-        require('../api/user/user.socket').register(socket);
-        require('../api/sound/sound.socket').register(socket);
-        require('../api/user_has_chat_queue/user_has_chat_queue.socket').register(socket);
-        require('../api/user_has_chat_queue/user_has_chat_queue_permit.socket').register(socket);
-        require('../api/user_has_sms_queue/user_has_sms_queue.socket').register(socket);
-        require('../api/user_has_sms_queue/user_has_sms_queue_permit.socket').register(socket);
-        require('../api/user_has_chat_room/user_has_chat_room.socket').register(socket);
-        require('../api/user_has_fax_queue/user_has_fax_queue.socket').register(socket);
-        require('../api/user_has_fax_queue/user_has_fax_queue_permit.socket').register(socket);
-        require('../api/user_has_mail_queue/user_has_mail_queue.socket').register(socket);
-        require('../api/user_has_mail_queue/user_has_mail_queue_permit.socket').register(socket);
-        require('../api/user_has_team/user_has_team.socket').register(socket);
-        require('../api/user_has_voice_queue/user_has_voice_queue.socket').register(socket);
-        require('../api/user_has_voice_queue/user_has_voice_queue_permit.socket').register(socket);
-        require('../api/user_has_list/user_has_list.socket').register(socket);
-        require('../api/variable/variable.socket').register(socket);
-        require('../api/voice_context/voice_context.socket').register(socket);
-        require('../api/voice_extension/voice_extension.socket').register(socket);
-        require('../api/voice_musiconhold/voice_musiconhold.socket').register(socket);
-        require('../api/voice_queue/voice_queue.socket').register(socket);
-        require('../api/voice_recording/voice_recording.socket').register(socket);
-        require('../api/voice_voicemail/voice_voicemail.socket').register(socket);
-        require('../api/voice_voicemail_messages/voice_voicemail_messages.socket').register(socket);
-        require('../api/zendesk_account/zendesk_account.socket').register(socket);
-        require('../api/zendesk_configuration/zendesk_configuration.socket').register(socket);
-        require('../api/zendesk_field/zendesk_field.socket').register(socket);
-      })
-      .catch(function(err) {
-        console.error(err);
-      });
-  } else {
-    console.log('socket: no user found');
-  }
-
-  socket.on('info', function(data) {
-    console.info('[%s] %s', socket.address, JSON.stringify(data, null, 2));
-  });
-}
-
-module.exports = function(socketio, dashboardProcess) {
-  // socket.io (v1.x.x) is powered by debug.
-  // In order to see all the debug output, set DEBUG (in server/config/local.env.js) to including the desired scope.
-  //
-  // ex: DEBUG: "http*,socket.io:socket"
-
-  // We can authenticate socket.io users and access their token through socket.handshake.decoded_token
-  //
-  // 1. You will need to send the token in `client/components/socket/socket.service.js`
-  //
-  // 2. Require authentication here:
-
-  socketio.use(require('socketio-jwt').authorize({
-    secret: config.session.secret,
-    handshake: true
-  }));
-
-  socketio.on('connection', function(socket) {
-    // Call onDisconnect.
-    socket.on('disconnect', function() {
-      onDisconnect(socket);
-    });
-
-    // Call onConnect.
-    onConnect(socket, dashboardProcess);
-  });
-};
+var _0xf0c5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x41\x63\x74\x69\x6F\x6E","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x5B\x25\x73\x5D\x20\x53\x4F\x43\x4B\x45\x54\x20\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x61\x64\x64\x72\x65\x73\x73","\x68\x61\x6E\x64\x73\x68\x61\x6B\x65","\x69\x6E\x66\x6F","\x72\x6F\x6C\x65","\x71\x75\x65\x72\x79","\x25\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6C\x65\x61\x76\x65","\x75\x73\x65\x72\x49\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x73\x6F\x63\x6B\x65\x74\x3A\x20\x75\x73\x65\x72\x20\x6F\x66\x66\x6C\x69\x6E\x65","\x6E\x61\x6D\x65","\x6C\x6F\x67","\x74\x68\x65\x6E","\x73\x6F\x63\x6B\x65\x74\x3A\x20\x6E\x6F\x20\x75\x73\x65\x72\x20\x66\x6F\x75\x6E\x64","\x6C\x6F\x67\x6F\x75\x74","\x63\x72\x65\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x5B\x25\x73\x5D\x20\x53\x4F\x43\x4B\x45\x54\x20\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x3A","\x70\x6F\x72\x74","\x44\x4F\x4D\x41\x49\x4E","\x65\x6E\x76","\x73\x6F\x75\x72\x63\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x41\x74","\x6A\x6F\x69\x6E","\x61\x67\x65\x6E\x74","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x74\x6F\x6F\x6C\x73\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64","\x25\x73\x3A\x25\x73","\x69\x64","\x25\x73","\x66\x6F\x72\x45\x61\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x64\x6D\x69\x6E","\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x75\x73\x65\x72","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x73\x6F\x63\x6B\x65\x74\x3A\x20\x75\x73\x65\x72\x20\x6F\x6E\x6C\x69\x6E\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x72\x6F\x6F\x6D\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x72\x6F\x6F\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x66\x61\x78\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x73\x6D\x73\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x6D\x61\x69\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x63\x68\x61\x74\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x76\x6F\x69\x63\x65\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2F\x66\x61\x78\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x65\x78\x74\x65\x72\x6E\x69\x70\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x65\x78\x74\x65\x72\x6E\x69\x70\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x67\x65\x6E\x74\x2F\x61\x67\x65\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6D\x69\x2F\x61\x6D\x69\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x6E\x73\x70\x79\x2F\x63\x68\x61\x6E\x73\x70\x79\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x65\x6E\x71\x75\x69\x72\x79\x2F\x65\x6E\x71\x75\x69\x72\x79\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x2F\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72\x2F\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6F\x6D\x70\x61\x6E\x79\x2F\x63\x6F\x6D\x70\x61\x6E\x79\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6D\x61\x6E\x61\x67\x65\x72\x2F\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6D\x61\x6E\x61\x67\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2F\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x2F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6C\x69\x73\x74\x2F\x6C\x69\x73\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2F\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x2F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x65\x74\x72\x69\x63\x2F\x6D\x65\x74\x72\x69\x63\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x6F\x64\x75\x6C\x65\x2F\x6D\x6F\x64\x75\x6C\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x69\x67\x65\x72\x5F\x64\x69\x61\x6C\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x69\x67\x65\x72\x5F\x64\x69\x61\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x2F\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C\x2F\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x2F\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x65\x74\x74\x69\x6E\x67\x2F\x73\x65\x74\x74\x69\x6E\x67\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x72\x6F\x6F\x6D\x2F\x73\x6D\x73\x5F\x72\x6F\x6F\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63\x2F\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2F\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2F\x73\x71\x75\x61\x72\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x61\x67\x2F\x74\x61\x67\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x65\x61\x6D\x2F\x74\x65\x61\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72\x2F\x74\x72\x69\x67\x67\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B\x2F\x74\x72\x75\x6E\x6B\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x2F\x75\x73\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64\x2F\x73\x6F\x75\x6E\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74\x2F\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64\x2F\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2F\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x75\x70\x64\x61\x74\x65","\x6F\x6E\x6C\x69\x6E\x65","\x6C\x6F\x67\x69\x6E","\x5B\x25\x73\x5D\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x73\x65\x63\x72\x65\x74","\x73\x65\x73\x73\x69\x6F\x6E","\x61\x75\x74\x68\x6F\x72\x69\x7A\x65","\x73\x6F\x63\x6B\x65\x74\x69\x6F\x2D\x6A\x77\x74","\x75\x73\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74"];_0xf0c5[0];var moment=require(_0xf0c5[1]);var util=require(_0xf0c5[2]);var config=require(_0xf0c5[3]);var User=require(_0xf0c5[5])[_0xf0c5[4]];var Action=require(_0xf0c5[5])[_0xf0c5[6]];var VoiceQueue=require(_0xf0c5[5])[_0xf0c5[7]];function onDisconnect(_0x60e0x8){console[_0xf0c5[11]](_0xf0c5[8],_0x60e0x8[_0xf0c5[10]][_0xf0c5[9]]);if(_0x60e0x8[_0xf0c5[10]][_0xf0c5[13]][_0xf0c5[12]]){_0x60e0x8[_0xf0c5[16]](util[_0xf0c5[15]](_0xf0c5[14],_0x60e0x8[_0xf0c5[10]][_0xf0c5[13]][_0xf0c5[12]]))};if(_0x60e0x8[_0xf0c5[17]]){return User[_0xf0c5[27]](_0x60e0x8[_0xf0c5[17]])[_0xf0c5[23]](function(_0x60e0xa){if(!_0x60e0xa){throw  new Error(_0xf0c5[24])};return Action[_0xf0c5[26]]({name:_0xf0c5[25],data1:_0x60e0x8[_0xf0c5[17]],data2:_0x60e0x8[_0xf0c5[21]],UserId:_0x60e0x8[_0xf0c5[17]]})})[_0xf0c5[23]](function(_0x60e0xa){console[_0xf0c5[22]](_0xf0c5[20],_0x60e0xa[_0xf0c5[21]])})[_0xf0c5[19]](function(_0x60e0x9){console[_0xf0c5[18]](_0x60e0x9)})}else {console[_0xf0c5[22]](_0xf0c5[24])}}function onConnect(_0x60e0x8,_0x60e0xc){console[_0xf0c5[11]](_0xf0c5[28],_0x60e0x8[_0xf0c5[10]][_0xf0c5[9]]);_0x60e0x8[_0xf0c5[29]](0);_0x60e0x8[_0xf0c5[9]]= _0x60e0x8[_0xf0c5[10]][_0xf0c5[9]]!== null?_0x60e0x8[_0xf0c5[10]][_0xf0c5[9]][_0xf0c5[9]]+ _0xf0c5[30]+ _0x60e0x8[_0xf0c5[10]][_0xf0c5[9]][_0xf0c5[31]]:process[_0xf0c5[33]][_0xf0c5[32]];_0x60e0x8[_0xf0c5[17]]= _0x60e0x8[_0xf0c5[10]][_0xf0c5[13]][_0xf0c5[17]];_0x60e0x8[_0xf0c5[12]]= _0x60e0x8[_0xf0c5[10]][_0xf0c5[13]][_0xf0c5[12]];_0x60e0x8[_0xf0c5[21]]= _0x60e0x8[_0xf0c5[10]][_0xf0c5[13]][_0xf0c5[21]];_0x60e0x8[_0xf0c5[34]]= _0x60e0x8[_0xf0c5[10]][_0xf0c5[13]][_0xf0c5[34]];_0x60e0x8[_0xf0c5[35]]=  new Date();if(_0x60e0x8[_0xf0c5[10]][_0xf0c5[13]][_0xf0c5[12]]){_0x60e0x8[_0xf0c5[36]](util[_0xf0c5[15]](_0xf0c5[14],_0x60e0x8[_0xf0c5[10]][_0xf0c5[13]][_0xf0c5[12]]))};if(_0x60e0x8[_0xf0c5[17]]){var _0x60e0xd;return User[_0xf0c5[27]](_0x60e0x8[_0xf0c5[17]],{attributes:[_0xf0c5[41],_0xf0c5[21],_0xf0c5[12]],include:[{model:VoiceQueue,as:_0xf0c5[46],attributes:[_0xf0c5[21]]},{model:VoiceQueue}]})[_0xf0c5[23]](function(_0x60e0xa){if(!_0x60e0xa){throw  new Error(_0xf0c5[24])};_0x60e0xd= _0x60e0xa;if(!_0x60e0xa[_0xf0c5[180]]){return Action[_0xf0c5[26]]({name:_0xf0c5[181],data1:_0x60e0xa[_0xf0c5[41]],data2:_0x60e0xa[_0xf0c5[21]],UserId:_0x60e0xa[_0xf0c5[41]]})};return})[_0xf0c5[23]](function(){return _0x60e0xd[_0xf0c5[179]]({online:true,lastLoginAt:moment()[_0xf0c5[15]](_0xf0c5[178])})})[_0xf0c5[23]](function(_0x60e0xa){if(_0x60e0xa[_0xf0c5[12]]!== _0xf0c5[37]){require(_0xf0c5[39])[_0xf0c5[38]](_0x60e0x8)};_0x60e0x8[_0xf0c5[36]](util[_0xf0c5[15]](_0xf0c5[40],_0x60e0xa[_0xf0c5[12]],_0x60e0xa[_0xf0c5[21]]));_0x60e0x8[_0xf0c5[36]](util[_0xf0c5[15]](_0xf0c5[40],_0x60e0xa[_0xf0c5[12]],_0x60e0xa[_0xf0c5[41]]));_0x60e0x8[_0xf0c5[36]](util[_0xf0c5[15]](_0xf0c5[42],_0x60e0xa[_0xf0c5[21]]));switch(_0x60e0xa[_0xf0c5[12]]){case _0xf0c5[45]:VoiceQueue[_0xf0c5[44]]({attributes:[_0xf0c5[21]]})[_0xf0c5[23]](function(_0x60e0xe){_0x60e0xe[_0xf0c5[43]](function(_0x60e0xf){_0x60e0x8[_0xf0c5[36]](_0x60e0xf[_0xf0c5[21]])})})[_0xf0c5[19]](function(_0x60e0x9){console[_0xf0c5[18]](_0x60e0x9)});break;case _0xf0c5[47]:_0x60e0xa[_0xf0c5[46]][_0xf0c5[43]](function(_0x60e0xf){_0x60e0x8[_0xf0c5[36]](_0x60e0xf[_0xf0c5[21]])});break;case _0xf0c5[37]:_0x60e0xa[_0xf0c5[48]][_0xf0c5[43]](function(_0x60e0xf){_0x60e0x8[_0xf0c5[36]](_0x60e0xf[_0xf0c5[21]])});break;default:};console[_0xf0c5[22]](_0xf0c5[49],_0x60e0xa[_0xf0c5[21]]);require(_0xf0c5[50])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[51])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[52])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[53])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[54])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[55])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[56])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[57])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[58])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[59])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[60])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[61])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[62])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[63])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[64])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[65])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[66])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[67])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[68])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[69])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[70])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[71])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[72])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[73])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[74])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[75])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[76])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[77])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[78])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[79])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[80])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[81])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[82])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[83])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[84])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[85])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[86])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[87])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[88])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[89])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[90])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[91])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[92])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[93])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[94])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[95])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[96])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[97])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[98])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[99])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[100])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[101])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[102])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[103])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[104])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[105])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[106])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[107])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[108])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[109])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[110])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[111])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[112])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[113])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[114])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[115])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[116])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[117])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[118])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[119])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[120])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[121])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[122])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[123])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[124])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[125])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[126])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[127])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[128])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[129])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[130])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[131])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[132])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[133])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[134])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[135])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[136])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[137])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[138])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[139])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[140])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[141])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[142])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[143])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[144])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[145])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[146])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[147])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[148])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[149])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[150])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[151])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[152])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[153])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[154])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[155])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[156])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[157])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[158])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[159])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[160])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[161])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[162])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[163])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[164])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[165])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[166])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[167])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[168])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[169])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[170])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[171])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[172])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[173])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[174])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[175])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[176])[_0xf0c5[38]](_0x60e0x8);require(_0xf0c5[177])[_0xf0c5[38]](_0x60e0x8)})[_0xf0c5[19]](function(_0x60e0x9){console[_0xf0c5[18]](_0x60e0x9)})}else {console[_0xf0c5[22]](_0xf0c5[24])};_0x60e0x8[_0xf0c5[184]](_0xf0c5[11],function(_0x60e0x10){console[_0xf0c5[11]](_0xf0c5[182],_0x60e0x8[_0xf0c5[9]],JSON[_0xf0c5[183]](_0x60e0x10,null,2))})}module[_0xf0c5[185]]= function(_0x60e0x11,_0x60e0xc){_0x60e0x11[_0xf0c5[190]](require(_0xf0c5[189])[_0xf0c5[188]]({secret:config[_0xf0c5[187]][_0xf0c5[186]],handshake:true}));_0x60e0x11[_0xf0c5[184]](_0xf0c5[191],function(_0x60e0x8){_0x60e0x8[_0xf0c5[184]](_0xf0c5[192],function(){onDisconnect(_0x60e0x8)});onConnect(_0x60e0x8,_0x60e0xc)})}
\ No newline at end of file
diff --git a/server/config/tools/channelSpy.js b/server/config/tools/channelSpy.js
index d46a052..3d40b6d 100644
--- a/server/config/tools/channelSpy.js
+++ b/server/config/tools/channelSpy.js
@@ -1,109 +1 @@
-'use strict';
-
-var fs = require('fs');
-var util = require('util');
-var path = require('path');
-var config = require('../../config/environment');
-var ChanSpyModel = require('../../models').ChanSpy;
-var User = require('../../models').User;
-var VoiceExtension = require('../../models').VoiceExtension;
-var sequelize = require('../../models').sequelize;
-var Promise = require('bluebird');
-
-function ChanSpy() {
-  ChanSpyModel.afterCreate(function(doc, options) {
-    return Promise
-      .all([])
-      .then(createSpyExtensions(doc, options));
-  })
-  ChanSpyModel.afterUpdate(function(doc, options) {
-    return Promise
-      .all([])
-      .then(deleteSpyExtensions(doc, options))
-      .then(createSpyExtensions(doc, options));
-  })
-  ChanSpyModel.afterDelete(function(doc, options) {
-    return deleteSpyExtensions(doc, options);
-  })
-}
-
-function deleteSpyExtensions(doc, options) {
-  return VoiceExtension
-    .destroy({
-      where: {
-        ChanSpyId: doc.id
-      },
-      transaction: options.transaction
-    });
-}
-
-function createSpyExtensions(doc, options) {
-  return User
-    .scope('agent')
-    .findAll({
-      where: {
-        chanspy: true
-      }
-    })
-    .then(function(agents) {
-      var bulkSpies = [];
-      agents.forEach(function(elem) {
-        var spies = [];
-        var priority = 1;
-        if (doc.auth) {
-          spies.push({
-            context: 'from-sip',
-            exten: util.format('%s%s', doc.prefix, elem.name),
-            priority: priority,
-            app: 'Authenticate',
-            appdata: doc.password,
-            UserId: elem.id,
-            ChanSpyId: doc.id,
-            type: 'system'
-          });
-          priority++;
-        }
-        spies.push({
-          context: 'from-sip',
-          exten: util.format('%s%s', doc.prefix, elem.name),
-          priority: priority,
-          app: 'ChanSpy',
-          appdata: util.format('SIP/%s,%s', elem.name, doc.options),
-          UserId: elem.id,
-          ChanSpyId: doc.id,
-          type: 'system'
-        });
-        priority = 1;
-        if (doc.auth) {
-          spies.push({
-            context: 'from-sip',
-            exten: util.format('%s%s', doc.prefix, elem.internal),
-            priority: priority,
-            app: 'Authenticate',
-            appdata: doc.password,
-            UserId: elem.id,
-            ChanSpyId: doc.id,
-            type: 'system'
-          });
-          priority++;
-        }
-        spies.push({
-          context: 'from-sip',
-          exten: util.format('%s%s', doc.prefix, elem.internal),
-          priority: priority,
-          app: 'ChanSpy',
-          appdata: util.format('SIP/%s,%s', elem.name, doc.options),
-          UserId: elem.id,
-          ChanSpyId: doc.id,
-          type: 'system'
-        });
-        bulkSpies.push(VoiceExtension.bulkCreate(spies, {
-          transaction: options.transaction
-        }));
-      });
-      return bulkSpies;
-    })
-    .all();
-}
-
-module.exports = ChanSpy;
+var _0x99d7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x43\x68\x61\x6E\x53\x70\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x74\x68\x65\x6E","\x61\x6C\x6C","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","\x69\x64","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x61\x75\x74\x68","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x25\x73\x25\x73","\x70\x72\x65\x66\x69\x78","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x79\x73\x74\x65\x6D","\x70\x75\x73\x68","\x53\x49\x50\x2F\x25\x73\x2C\x25\x73","\x6F\x70\x74\x69\x6F\x6E\x73","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x99d7[0];var fs=require(_0x99d7[1]);var util=require(_0x99d7[2]);var path=require(_0x99d7[3]);var config=require(_0x99d7[4]);var ChanSpyModel=require(_0x99d7[6])[_0x99d7[5]];var User=require(_0x99d7[6])[_0x99d7[7]];var VoiceExtension=require(_0x99d7[6])[_0x99d7[8]];var sequelize=require(_0x99d7[6])[_0x99d7[9]];var Promise=require(_0x99d7[10]);function ChanSpy(){ChanSpyModel[_0x99d7[13]](function(_0x2d0cxb,_0x2d0cxc){return Promise[_0x99d7[12]]([])[_0x99d7[11]](createSpyExtensions(_0x2d0cxb,_0x2d0cxc))});ChanSpyModel[_0x99d7[14]](function(_0x2d0cxb,_0x2d0cxc){return Promise[_0x99d7[12]]([])[_0x99d7[11]](deleteSpyExtensions(_0x2d0cxb,_0x2d0cxc))[_0x99d7[11]](createSpyExtensions(_0x2d0cxb,_0x2d0cxc))});ChanSpyModel[_0x99d7[15]](function(_0x2d0cxb,_0x2d0cxc){return deleteSpyExtensions(_0x2d0cxb,_0x2d0cxc)})}function deleteSpyExtensions(_0x2d0cxb,_0x2d0cxc){return VoiceExtension[_0x99d7[18]]({where:{ChanSpyId:_0x2d0cxb[_0x99d7[16]]},transaction:_0x2d0cxc[_0x99d7[17]]})}function createSpyExtensions(_0x2d0cxb,_0x2d0cxc){return User[_0x99d7[36]](_0x99d7[35])[_0x99d7[34]]({where:{chanspy:true}})[_0x99d7[11]](function(_0x2d0cxf){var _0x2d0cx10=[];_0x2d0cxf[_0x99d7[33]](function(_0x2d0cx11){var _0x2d0cx12=[];var _0x2d0cx13=1;if(_0x2d0cxb[_0x99d7[19]]){_0x2d0cx12[_0x99d7[28]]({context:_0x99d7[20],exten:util[_0x99d7[24]](_0x99d7[21],_0x2d0cxb[_0x99d7[22]],_0x2d0cx11[_0x99d7[23]]),priority:_0x2d0cx13,app:_0x99d7[25],appdata:_0x2d0cxb[_0x99d7[26]],UserId:_0x2d0cx11[_0x99d7[16]],ChanSpyId:_0x2d0cxb[_0x99d7[16]],type:_0x99d7[27]});_0x2d0cx13++};_0x2d0cx12[_0x99d7[28]]({context:_0x99d7[20],exten:util[_0x99d7[24]](_0x99d7[21],_0x2d0cxb[_0x99d7[22]],_0x2d0cx11[_0x99d7[23]]),priority:_0x2d0cx13,app:_0x99d7[5],appdata:util[_0x99d7[24]](_0x99d7[29],_0x2d0cx11[_0x99d7[23]],_0x2d0cxb[_0x99d7[30]]),UserId:_0x2d0cx11[_0x99d7[16]],ChanSpyId:_0x2d0cxb[_0x99d7[16]],type:_0x99d7[27]});_0x2d0cx13= 1;if(_0x2d0cxb[_0x99d7[19]]){_0x2d0cx12[_0x99d7[28]]({context:_0x99d7[20],exten:util[_0x99d7[24]](_0x99d7[21],_0x2d0cxb[_0x99d7[22]],_0x2d0cx11[_0x99d7[31]]),priority:_0x2d0cx13,app:_0x99d7[25],appdata:_0x2d0cxb[_0x99d7[26]],UserId:_0x2d0cx11[_0x99d7[16]],ChanSpyId:_0x2d0cxb[_0x99d7[16]],type:_0x99d7[27]});_0x2d0cx13++};_0x2d0cx12[_0x99d7[28]]({context:_0x99d7[20],exten:util[_0x99d7[24]](_0x99d7[21],_0x2d0cxb[_0x99d7[22]],_0x2d0cx11[_0x99d7[31]]),priority:_0x2d0cx13,app:_0x99d7[5],appdata:util[_0x99d7[24]](_0x99d7[29],_0x2d0cx11[_0x99d7[23]],_0x2d0cxb[_0x99d7[30]]),UserId:_0x2d0cx11[_0x99d7[16]],ChanSpyId:_0x2d0cxb[_0x99d7[16]],type:_0x99d7[27]});_0x2d0cx10[_0x99d7[28]](VoiceExtension[_0x99d7[32]](_0x2d0cx12,{transaction:_0x2d0cxc[_0x99d7[17]]}))});return _0x2d0cx10})[_0x99d7[12]]()}module[_0x99d7[37]]= ChanSpy
\ No newline at end of file
diff --git a/server/config/tools/chatRoom.js b/server/config/tools/chatRoom.js
index 69714fe..7ee8203 100644
--- a/server/config/tools/chatRoom.js
+++ b/server/config/tools/chatRoom.js
@@ -1,104 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var moment = require('moment');
-
-var ChatRoomModel = require('../../models').ChatRoom;
-var ChatVisitorModel = require('../../models').ChatVisitor;
-var ReportChatSessionModel = require('../../models').ReportChatSession;
-var ReportChatRoomModel = require('../../models').ReportChatRoom;
-
-function ChatRoom() {
-  ChatRoomModel.afterUpdate(function(doc) {
-    if (doc.changed('status') && doc.status === 'CLOSED') {
-      if (doc.ChatVisitorId) {
-        return ChatVisitorModel
-          .findById(doc.ChatVisitorId)
-          .then(function(chatVisitor) {
-            if (chatVisitor) {
-              var updated = _.merge(chatVisitor, {
-                status: 'served'
-              });
-              return updated.save();
-            }
-          })
-          .then(function() {
-            return ReportChatSessionModel
-              .update({
-                complete: true,
-                completeReason: doc.completeReason,
-                completeAt: moment().format("YYYY-MM-DD HH:mm:ss")
-              }, {
-                where: {
-                  roomid: doc.id,
-                  complete: false,
-                  abandon: false,
-                  timeout: false
-                },
-                individualHooks: true
-              });
-          })
-          .catch(function(err) {
-            console.log('Error:', err);
-          });
-      }
-    }
-
-    if (doc.changed('status') && doc.status === 'UNMANAGED') {
-      if (doc.ChatVisitorId) {
-        return ChatVisitorModel
-          .findById(doc.ChatVisitorId)
-          .then(function(chatVisitor) {
-            if (chatVisitor) {
-              return chatVisitor
-                .update({
-                  status: 'unserved'
-                });
-            }
-          })
-          .catch(function(err) {
-            console.log('Error:', err);
-          });
-      }
-    }
-
-    if (doc.changed('status') && doc.status === 'ABANDON') {
-      if (doc.ChatVisitorId) {
-        return ChatVisitorModel
-          .findById(doc.ChatVisitorId)
-          .then(function(chatVisitor) {
-            if (chatVisitor) {
-              return chatVisitor
-                .update({
-                  status: 'abandon'
-                });
-            }
-          })
-          .catch(function(err) {
-            console.log('Error:', err);
-          });
-      }
-    }
-
-    if (doc.changed('rating')) {
-      if (doc.id) {
-        return ReportChatRoomModel
-          .update({
-            crating: doc.rating,
-            cratingMessage: doc.ratingMessage
-          }, {
-            where: {
-              roomid: doc.id
-            },
-            individualHooks: true
-          })
-          .catch(function(err) {
-            console.log('Error:', err);
-          });
-      }
-    }
-
-  })
-}
-
-module.exports = ChatRoom;
+var _0xd4b5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72\x49\x64","\x45\x72\x72\x6F\x72\x3A","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x52\x65\x61\x73\x6F\x6E","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x69\x64","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x73\x65\x72\x76\x65\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x75\x6E\x73\x65\x72\x76\x65\x64","\x41\x42\x41\x4E\x44\x4F\x4E","\x61\x62\x61\x6E\x64\x6F\x6E","\x72\x61\x74\x69\x6E\x67","\x72\x61\x74\x69\x6E\x67\x4D\x65\x73\x73\x61\x67\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xd4b5[0];var _=require(_0xd4b5[1]);var moment=require(_0xd4b5[2]);var ChatRoomModel=require(_0xd4b5[4])[_0xd4b5[3]];var ChatVisitorModel=require(_0xd4b5[4])[_0xd4b5[5]];var ReportChatSessionModel=require(_0xd4b5[4])[_0xd4b5[6]];var ReportChatRoomModel=require(_0xd4b5[4])[_0xd4b5[7]];function ChatRoom(){ChatRoomModel[_0xd4b5[31]](function(_0x98fax8){if(_0x98fax8[_0xd4b5[9]](_0xd4b5[8])&& _0x98fax8[_0xd4b5[8]]=== _0xd4b5[10]){if(_0x98fax8[_0xd4b5[11]]){return ChatVisitorModel[_0xd4b5[24]](_0x98fax8.ChatVisitorId)[_0xd4b5[20]](function(_0x98faxa){if(_0x98faxa){var _0x98faxb=_[_0xd4b5[22]](_0x98faxa,{status:_0xd4b5[21]});return _0x98faxb[_0xd4b5[23]]()}})[_0xd4b5[20]](function(){return ReportChatSessionModel[_0xd4b5[19]]({complete:true,completeReason:_0x98fax8[_0xd4b5[15]],completeAt:moment()[_0xd4b5[17]](_0xd4b5[16])},{where:{roomid:_0x98fax8[_0xd4b5[18]],complete:false,abandon:false,timeout:false},individualHooks:true})})[_0xd4b5[14]](function(_0x98fax9){console[_0xd4b5[13]](_0xd4b5[12],_0x98fax9)})}};if(_0x98fax8[_0xd4b5[9]](_0xd4b5[8])&& _0x98fax8[_0xd4b5[8]]=== _0xd4b5[25]){if(_0x98fax8[_0xd4b5[11]]){return ChatVisitorModel[_0xd4b5[24]](_0x98fax8.ChatVisitorId)[_0xd4b5[20]](function(_0x98faxa){if(_0x98faxa){return _0x98faxa[_0xd4b5[19]]({status:_0xd4b5[26]})}})[_0xd4b5[14]](function(_0x98fax9){console[_0xd4b5[13]](_0xd4b5[12],_0x98fax9)})}};if(_0x98fax8[_0xd4b5[9]](_0xd4b5[8])&& _0x98fax8[_0xd4b5[8]]=== _0xd4b5[27]){if(_0x98fax8[_0xd4b5[11]]){return ChatVisitorModel[_0xd4b5[24]](_0x98fax8.ChatVisitorId)[_0xd4b5[20]](function(_0x98faxa){if(_0x98faxa){return _0x98faxa[_0xd4b5[19]]({status:_0xd4b5[28]})}})[_0xd4b5[14]](function(_0x98fax9){console[_0xd4b5[13]](_0xd4b5[12],_0x98fax9)})}};if(_0x98fax8[_0xd4b5[9]](_0xd4b5[29])){if(_0x98fax8[_0xd4b5[18]]){return ReportChatRoomModel[_0xd4b5[19]]({crating:_0x98fax8[_0xd4b5[29]],cratingMessage:_0x98fax8[_0xd4b5[30]]},{where:{roomid:_0x98fax8[_0xd4b5[18]]},individualHooks:true})[_0xd4b5[14]](function(_0x98fax9){console[_0xd4b5[13]](_0xd4b5[12],_0x98fax9)})}}})}module[_0xd4b5[32]]= ChatRoom
\ No newline at end of file
diff --git a/server/config/tools/dashboard.js b/server/config/tools/dashboard.js
index 1a38228..c027a42 100644
--- a/server/config/tools/dashboard.js
+++ b/server/config/tools/dashboard.js
@@ -1,1248 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-var sequelize = require('../../models').sequelize;
-var models = require('../../models');
-var Util = require('../../config/util');
-var _ = require('lodash');
-var moment = require('moment');
-var Promise = require('bluebird');
-
-exports.register = function(socket) {
-
-  models.ReportMailSession.afterCreate(function(doc) {
-    updateMail(doc);
-  });
-
-  models.ReportMailSession.afterUpdate(function(doc) {
-    updateMail(doc);
-  });
-
-  models.MailRoom.afterCreate(function(doc) {
-    updateMail(doc);
-  });
-
-  models.MailRoom.afterUpdate(function(doc) {
-    updateMail(doc);
-  });
-
-  function updateMail(doc) {
-    onNewMail(socket, doc);
-    onOpenMail(socket, doc);
-    onClosedMail(socket, doc);
-    onTimeoutMail(socket, doc);
-    onPendingMail(socket, doc);
-    onWaitingMail(socket, doc);
-  }
-
-  models.ReportChatSession.afterCreate(function(doc) {
-    updateChat(doc);
-  });
-
-  models.ReportChatSession.afterUpdate(function(doc) {
-    updateChat(doc);
-  });
-
-  models.ChatRoom.afterCreate(function(doc) {
-    updateChat(doc);
-  });
-
-  models.ChatRoom.afterUpdate(function(doc) {
-    updateChat(doc);
-  });
-
-  function updateChat(doc) {
-    onNewChat(socket, doc);
-    onOpenChat(socket, doc);
-    onClosedChat(socket, doc);
-    onTimeoutChat(socket, doc);
-    onAbandonedChat(socket, doc);
-    onUnmanagedChat(socket, doc);
-  }
-
-  models.ReportFaxSession.afterCreate(function(doc) {
-    updateFax(doc);
-  });
-
-  models.ReportFaxSession.afterUpdate(function(doc) {
-    updateFax(doc);
-  });
-
-  models.FaxRoom.afterCreate(function(doc) {
-    updateFax(doc);
-  });
-
-  models.FaxRoom.afterUpdate(function(doc) {
-    updateFax(doc);
-  });
-
-  function updateFax(doc) {
-    onNewFax(socket, doc);
-    onOpenFax(socket, doc);
-    onClosedFax(socket, doc);
-    onTimeoutFax(socket, doc);
-    onPendingFax(socket, doc);
-    onWaitingFax(socket, doc);
-  }
-
-  models.ReportSmsSession.afterCreate(function(doc) {
-    updateSms(doc);
-  });
-
-  models.ReportSmsSession.afterUpdate(function(doc) {
-    updateSms(doc);
-  });
-
-  models.SmsRoom.afterCreate(function(doc) {
-    updateSms(doc);
-  });
-
-  models.SmsRoom.afterUpdate(function(doc) {
-    updateSms(doc);
-  });
-
-  function updateSms(doc) {
-    onNewSms(socket, doc);
-    onOpenSms(socket, doc);
-    onClosedSms(socket, doc);
-    onTimeoutSms(socket, doc);
-    onPendingSms(socket, doc);
-    onWaitingSms(socket, doc);
-  }
-
-  models.ReportOpenchannelSession.afterCreate(function(doc) {
-    updateOpenchannel(doc);
-  });
-
-  models.ReportOpenchannelSession.afterUpdate(function(doc) {
-    updateOpenchannel(doc);
-  });
-
-  models.OpenchannelRoom.afterCreate(function(doc) {
-    updateOpenchannel(doc);
-  });
-
-  models.OpenchannelRoom.afterUpdate(function(doc) {
-    updateOpenchannel(doc);
-  });
-
-  function updateOpenchannel(doc) {
-    onNewOpenchannel(socket, doc);
-    onOpenOpenchannel(socket, doc);
-    onClosedOpenchannel(socket, doc);
-    onTimeoutOpenchannel(socket, doc);
-    onPendingOpenchannel(socket, doc);
-    onWaitingOpenchannel(socket, doc);
-  }
-}
-
-function getMailQueues(user, room) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return models.User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(Util.getMailQueuesIdByUser({}, {
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: models.User,
-              attributes: ['id']
-            }]
-          }))
-          .then(function(userQueues) {
-            if (room) {
-              return {
-                include: {
-                  model: models.MailAccount,
-                  include: {
-                    model: models.MailApplication,
-                    include: {
-                      model: models.MailQueue,
-                      where: {
-                        id: _.map(userQueues, 'id')
-                      }
-                    }
-                  }
-                }
-              };
-            } else {
-              var users = [];
-              userQueues.rows.forEach(function(queue) {
-                users = _.union(users, _.map(queue.Users, 'id'));
-              });
-              return {
-                where: {
-                  $or: {
-                    queue: _.map(userQueues.rows, 'id'),
-                    memberid: users
-                  }
-                }
-              };
-            }
-          });
-      case 'agent':
-        return models.User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(function(agent) {
-            return agent
-              .getMailQueues({
-                attributes: ['id']
-              });
-          })
-          .then(function(userQueues) {
-            return {
-              where: {
-                $or: {
-                  queue: _.map(userQueues, 'id'),
-                  memberid: user.userId
-                }
-              }
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
-
-function getChatQueues(user, room) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return models.User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(Util.getChatQueuesIdByUser({}, {
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: models.User,
-              attributes: ['id']
-            }]
-          }))
-          .then(function(userQueues) {
-            if (room) {
-              return {
-                include: {
-                  model: models.ChatWebsite,
-                  include: {
-                    model: models.ChatApplication,
-                    include: {
-                      model: models.ChatQueue,
-                      where: {
-                        id: _.map(userQueues, 'id')
-                      }
-                    }
-                  }
-                }
-              };
-            } else {
-              var users = [];
-              userQueues.rows.forEach(function(queue) {
-                users = _.union(users, _.map(queue.Users, 'id'));
-              });
-              return {
-                where: {
-                  $or: {
-                    queue: _.map(userQueues.rows, 'id'),
-                    memberid: users
-                  }
-                }
-              };
-            }
-          });
-      case 'agent':
-        return models.User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(function(agent) {
-            return agent
-              .getChatQueues({
-                attributes: ['id']
-              });
-          })
-          .then(function(userQueues) {
-            return {
-              where: {
-                $or: {
-                  queue: _.map(userQueues, 'id'),
-                  memberid: user.userId
-                }
-              }
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
-
-function getFaxQueues(user, room) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return models.User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(Util.getFaxQueuesIdByUser({}, {
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: models.User,
-              attributes: ['id']
-            }]
-          }))
-          .then(function(userQueues) {
-            if (room) {
-              return {
-                include: {
-                  model: models.FaxAccount,
-                  include: {
-                    model: models.FaxApplication,
-                    include: {
-                      model: models.FaxQueue,
-                      where: {
-                        id: _.map(userQueues, 'id')
-                      }
-                    }
-                  }
-                }
-              };
-            } else {
-              var users = [];
-              userQueues.rows.forEach(function(queue) {
-                users = _.union(users, _.map(queue.Users, 'id'));
-              });
-              return {
-                where: {
-                  $or: {
-                    queue: _.map(userQueues.rows, 'id'),
-                    memberid: users
-                  }
-                }
-              };
-            }
-          });
-      case 'agent':
-        return models.User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(function(agent) {
-            return agent
-              .getFaxQueues({
-                attributes: ['id']
-              });
-          })
-          .then(function(userQueues) {
-            return {
-              where: {
-                $or: {
-                  queue: _.map(userQueues, 'id'),
-                  memberid: user.userId
-                }
-              }
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
-
-function getSmsQueues(user, room) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return models.User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(Util.getSmsQueuesIdByUser({}, {
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: models.User,
-              attributes: ['id']
-            }]
-          }))
-          .then(function(userQueues) {
-            if (room) {
-              return {
-                include: {
-                  model: models.SmsAccount,
-                  include: {
-                    model: models.SmsApplication,
-                    include: {
-                      model: models.SmsQueue,
-                      where: {
-                        id: _.map(userQueues, 'id')
-                      }
-                    }
-                  }
-                }
-              };
-            } else {
-              var users = [];
-              userQueues.rows.forEach(function(queue) {
-                users = _.union(users, _.map(queue.Users, 'id'));
-              });
-              return {
-                where: {
-                  $or: {
-                    queue: _.map(userQueues.rows, 'id'),
-                    memberid: users
-                  }
-                }
-              };
-            }
-          });
-      case 'agent':
-        return models.User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(function(agent) {
-            return agent
-              .getSmsQueues({
-                attributes: ['id']
-              });
-          })
-          .then(function(userQueues) {
-            return {
-              where: {
-                $or: {
-                  queue: _.map(userQueues, 'id'),
-                  memberid: user.userId
-                }
-              }
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
-
-function getOpenchannelQueues(user, room) {
-  return function() {
-    switch (user.role) {
-      case 'user':
-        return models.User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(Util.getOpenchannelQueuesIdByUser({}, {
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: models.User,
-              attributes: ['id']
-            }]
-          }))
-          .then(function(userQueues) {
-            if (room) {
-              return {
-                include: {
-                  model: models.OpenchannelAccount,
-                  include: {
-                    model: models.OpenchannelApplication,
-                    include: {
-                      model: models.OpenchannelQueue,
-                      where: {
-                        id: _.map(userQueues, 'id')
-                      }
-                    }
-                  }
-                }
-              };
-            } else {
-              var users = [];
-              userQueues.rows.forEach(function(queue) {
-                users = _.union(users, _.map(queue.Users, 'id'));
-              });
-              return {
-                where: {
-                  $or: {
-                    queue: _.map(userQueues.rows, 'id'),
-                    memberid: users
-                  }
-                }
-              };
-            }
-          });
-      case 'agent':
-        return models.User
-          .findById(user.userId, {
-            attributes: ['id']
-          })
-          .then(function(agent) {
-            return agent
-              .getOpenchannelQueues({
-                attributes: ['id']
-              });
-          })
-          .then(function(userQueues) {
-            return {
-              where: {
-                $or: {
-                  queue: _.map(userQueues, 'id'),
-                  memberid: user.userId
-                }
-              }
-            };
-          });
-      default:
-        return {};
-    }
-  }
-}
-
-
-// Get Open mails
-function onOpenMail(socket, doc) {
-  return Promise
-    .all([])
-    .then(getMailQueues(socket, true))
-    .then(function(condition) {
-      return models.MailRoom
-        .count(_.merge({
-          where: {
-            status: 'OPEN',
-            updatedAt: {
-              $gte: moment().startOf('day')
-            }
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_mail_dashboard:open', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get closed mails
-function onClosedMail(socket, doc) {
-  return Promise
-    .all([])
-    .then(getMailQueues(socket, true))
-    .then(function(condition) {
-      return models.MailRoom
-        .count(_.merge({
-          where: {
-            status: 'CLOSED',
-            updatedAt: {
-              $gte: moment().startOf('day')
-            }
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_mail_dashboard:closed', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get new mails
-function onNewMail(socket, doc) {
-  return Promise
-    .all([])
-    .then(getMailQueues(socket, true))
-    .then(function(condition) {
-      return models.MailRoom
-        .count(_.merge({
-          where: {
-            status: 'NEW',
-            updatedAt: {
-              $gte: moment().startOf('day')
-            }
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_mail_dashboard:new', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get new mails
-function onWaitingMail(socket, doc) {
-  return Promise
-    .all([])
-    .then(getMailQueues(socket))
-    .then(function(condition) {
-      return models.ReportMailSession
-        .count(_.merge({
-          where: {
-            leaveAt: null
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_mail_dashboard:waiting', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get timeout mails
-function onTimeoutMail(socket, doc) {
-  return Promise
-    .all([])
-    .then(getMailQueues(socket))
-    .then(function(condition) {
-      return models.ReportMailSession
-        .count(_.merge({
-          where: {
-            timeout: true
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_mail_dashboard:timeout', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-function onPendingMail(socket, doc) {
-  return Promise
-    .all([])
-    .then(getMailQueues(socket, true))
-    .then(function(condition) {
-      return models.MailRoom
-        .count(_.merge({
-          where: {
-            status: 'PENDING',
-            updatedAt: {
-              $gte: moment().startOf('day')
-            }
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_mail_dashboard:pending', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get Open chat
-function onOpenChat(socket, doc) {
-  return Promise
-    .all([])
-    .then(getChatQueues(socket, true))
-    .then(function(condition) {
-      return models.ReportChatSession
-        .count(_.merge({
-          where: {
-            leaveAt: {
-              $ne: null
-            },
-            complete: null,
-            timeout: null
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_chat_dashboard:open', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get closed chat
-function onClosedChat(socket, doc) {
-  return Promise
-    .all([])
-    .then(getChatQueues(socket))
-    .then(function(condition) {
-      return models.ReportChatSession
-        .count(_.merge({
-          where: {
-            complete: true
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_chat_dashboard:closed', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get new chat
-function onNewChat(socket, doc) {
-  return Promise
-    .all([])
-    .then(getChatQueues(socket))
-    .then(function(condition) {
-      return models.ReportChatSession
-        .count(_.merge({
-          where: {
-            leaveAt: null
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_chat_dashboard:new', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get timeout chat
-function onTimeoutChat(socket, doc) {
-  return Promise
-    .all([])
-    .then(getChatQueues(socket))
-    .then(function(condition) {
-      return models.ReportChatSession
-        .count(_.merge({
-          where: {
-            timeout: true
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_chat_dashboard:timeout', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get abandoned chat
-function onAbandonedChat(socket, doc) {
-  return Promise
-    .all([])
-    .then(getChatQueues(socket))
-    .then(function(condition) {
-      return models.ReportChatSession
-        .count(_.merge({
-          where: {
-            abandon: true
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_chat_dashboard:abandoned', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-function onUnmanagedChat(socket, doc) {
-  return Promise
-    .all([])
-    .then(getChatQueues(socket, true))
-    .then(function(condition) {
-      return models.ChatRoom
-        .count(_.merge({
-          where: {
-            status: 'UNMANAGED',
-            updatedAt: {
-              $gte: moment().startOf('day')
-            }
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_chat_dashboard:unmanaged', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get Open fax
-function onOpenFax(socket, doc) {
-  return Promise
-    .all([])
-    .then(getFaxQueues(socket, true))
-    .then(function(condition) {
-      return models.FaxRoom
-        .count(_.merge({
-          where: {
-            status: 'OPEN',
-            updatedAt: {
-              $gte: moment().startOf('day')
-            }
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_fax_dashboard:open', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get closed fax
-function onClosedFax(socket, doc) {
-  return Promise
-    .all([])
-    .then(getFaxQueues(socket, true))
-    .then(function(condition) {
-      return models.FaxRoom
-        .count(_.merge({
-          where: {
-            status: 'CLOSED',
-            updatedAt: {
-              $gte: moment().startOf('day')
-            }
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_fax_dashboard:closed', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get new fax
-function onNewFax(socket, doc) {
-  return Promise
-    .all([])
-    .then(getFaxQueues(socket, true))
-    .then(function(condition) {
-      return models.FaxRoom
-        .count(_.merge({
-          where: {
-            status: 'NEW',
-            updatedAt: {
-              $gte: moment().startOf('day')
-            }
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_fax_dashboard:new', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get timeout fax
-function onTimeoutFax(socket, doc) {
-  return Promise
-    .all([])
-    .then(getFaxQueues(socket))
-    .then(function(condition) {
-      return models.ReportFaxSession
-        .count(_.merge({
-          where: {
-            timeout: true
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_fax_dashboard:timeout', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-function onPendingFax(socket, doc) {
-  return Promise
-    .all([])
-    .then(getFaxQueues(socket, true))
-    .then(function(condition) {
-      return models.FaxRoom
-        .count(_.merge({
-          where: {
-            status: 'PENDING',
-            updatedAt: {
-              $gte: moment().startOf('day')
-            }
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_fax_dashboard:pending', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-function onWaitingFax(socket, doc) {
-  return Promise
-    .all([])
-    .then(getFaxQueues(socket, true))
-    .then(function(condition) {
-      return models.ReportFaxSession
-        .count(_.merge({
-          where: {
-            leaveAt: true
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_fax_dashboard:waiting', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get Open sms
-function onOpenSms(socket, doc) {
-  return Promise
-    .all([])
-    .then(getSmsQueues(socket, true))
-    .then(function(condition) {
-      return models.SmsRoom
-        .count(_.merge({
-          where: {
-            status: 'OPEN',
-            updatedAt: {
-              $gte: moment().startOf('day')
-            }
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_sms_dashboard:open', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get closed sms
-function onClosedSms(socket, doc) {
-  return Promise
-    .all([])
-    .then(getSmsQueues(socket, true))
-    .then(function(condition) {
-      return models.SmsRoom
-        .count(_.merge({
-          where: {
-            status: 'CLOSED',
-            updatedAt: {
-              $gte: moment().startOf('day')
-            }
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_sms_dashboard:closed', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get new sms
-function onNewSms(socket, doc) {
-  return Promise
-    .all([])
-    .then(getSmsQueues(socket, true))
-    .then(function(condition) {
-      return models.SmsRoom
-        .count(_.merge({
-          where: {
-            status: 'NEW',
-            updatedAt: {
-              $gte: moment().startOf('day')
-            }
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_sms_dashboard:new', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get timeout sms
-function onTimeoutSms(socket, doc) {
-  return Promise
-    .all([])
-    .then(getSmsQueues(socket))
-    .then(function(condition) {
-      return models.ReportSmsSession
-        .count(_.merge({
-          where: {
-            timeout: true
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_sms_dashboard:timeout', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-function onPendingSms(socket, doc) {
-  return Promise
-    .all([])
-    .then(getSmsQueues(socket, true))
-    .then(function(condition) {
-      return models.SmsRoom
-        .count(_.merge({
-          where: {
-            status: 'PENDING',
-            updatedAt: {
-              $gte: moment().startOf('day')
-            }
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_sms_dashboard:pending', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-function onWaitingSms(socket, doc) {
-  return Promise
-    .all([])
-    .then(getSmsQueues(socket))
-    .then(function(condition) {
-      return models.ReportSmsSession
-        .count(_.merge({
-          where: {
-            leaveAt: null
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_sms_dashboard:pending', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get Open openchannel
-function onOpenOpenchannel(socket, doc) {
-  return Promise
-    .all([])
-    .then(getOpenchannelQueues(socket, true))
-    .then(function(condition) {
-      return models.OpenchannelRoom
-        .count(_.merge({
-          where: {
-            status: 'OPEN',
-            updatedAt: {
-              $gte: moment().startOf('day')
-            }
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_openchannel_dashboard:open', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get closed openchannel
-function onClosedOpenchannel(socket, doc) {
-  return Promise
-    .all([])
-    .then(getOpenchannelQueues(socket, true))
-    .then(function(condition) {
-      return models.OpenchannelRoom
-        .count(_.merge({
-          where: {
-            status: 'CLOSED',
-            updatedAt: {
-              $gte: moment().startOf('day')
-            }
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_openchannel_dashboard:closed', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get new openchannel
-function onNewOpenchannel(socket, doc) {
-  return Promise
-    .all([])
-    .then(getOpenchannelQueues(socket, true))
-    .then(function(condition) {
-      return models.OpenchannelRoom
-        .count(_.merge({
-          where: {
-            status: 'NEW',
-            updatedAt: {
-              $gte: moment().startOf('day')
-            }
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_openchannel_dashboard:new', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-// Get timeout openchannel
-function onTimeoutOpenchannel(socket, doc) {
-  return Promise
-    .all([])
-    .then(getOpenchannelQueues(socket))
-    .then(function(condition) {
-      return models.ReportOpenchannelSession
-        .count(_.merge({
-          where: {
-            timeout: true
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_openchannel_dashboard:timeout', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-function onPendingOpenchannel(socket, doc) {
-  return Promise
-    .all([])
-    .then(getOpenchannelQueues(socket, true))
-    .then(function(condition) {
-      return models.OpenchannelRoom
-        .count(_.merge({
-          where: {
-            status: 'PENDING',
-            updatedAt: {
-              $gte: moment().startOf('day')
-            }
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_openchannel_dashboard:pending', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-function onWaitingOpenchannel(socket, doc) {
-  return Promise
-    .all([])
-    .then(getOpenchannelQueues(socket))
-    .then(function(condition) {
-      return models.ReportOpenchannelSession
-        .count(_.merge({
-          where: {
-            leaveAt: null
-          }
-        }, condition));
-    })
-    .then(function(data) {
-      socket.emit('report_openchannel_dashboard:pending', {
-        value: data
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
+var _0xaa02=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x46\x61\x78\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x53\x65\x73\x73\x69\x6F\x6E","\x53\x6D\x73\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x74\x68\x65\x6E","\x55\x73\x65\x72","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x61\x78\x51\x75\x65\x75\x65","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x53\x6D\x73\x51\x75\x65\x75\x65","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x65\x6D\x69\x74","\x4F\x50\x45\x4E","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x4E\x45\x57","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x77\x61\x69\x74\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x77\x61\x69\x74\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67"];_0xaa02[0];var sequelize=require(_0xaa02[2])[_0xaa02[1]];var models=require(_0xaa02[2]);var Util=require(_0xaa02[3]);var _=require(_0xaa02[4]);var moment=require(_0xaa02[5]);var Promise=require(_0xaa02[6]);exports[_0xaa02[7]]= function(_0x96a3x7){models[_0xaa02[9]][_0xaa02[8]](function(_0x96a3x8){_0x96a3x9(_0x96a3x8)});models[_0xaa02[9]][_0xaa02[10]](function(_0x96a3x8){_0x96a3x9(_0x96a3x8)});models[_0xaa02[11]][_0xaa02[8]](function(_0x96a3x8){_0x96a3x9(_0x96a3x8)});models[_0xaa02[11]][_0xaa02[10]](function(_0x96a3x8){_0x96a3x9(_0x96a3x8)});function _0x96a3x9(_0x96a3x8){onNewMail(_0x96a3x7,_0x96a3x8);onOpenMail(_0x96a3x7,_0x96a3x8);onClosedMail(_0x96a3x7,_0x96a3x8);onTimeoutMail(_0x96a3x7,_0x96a3x8);onPendingMail(_0x96a3x7,_0x96a3x8);onWaitingMail(_0x96a3x7,_0x96a3x8)}models[_0xaa02[12]][_0xaa02[8]](function(_0x96a3x8){_0x96a3xa(_0x96a3x8)});models[_0xaa02[12]][_0xaa02[10]](function(_0x96a3x8){_0x96a3xa(_0x96a3x8)});models[_0xaa02[13]][_0xaa02[8]](function(_0x96a3x8){_0x96a3xa(_0x96a3x8)});models[_0xaa02[13]][_0xaa02[10]](function(_0x96a3x8){_0x96a3xa(_0x96a3x8)});function _0x96a3xa(_0x96a3x8){onNewChat(_0x96a3x7,_0x96a3x8);onOpenChat(_0x96a3x7,_0x96a3x8);onClosedChat(_0x96a3x7,_0x96a3x8);onTimeoutChat(_0x96a3x7,_0x96a3x8);onAbandonedChat(_0x96a3x7,_0x96a3x8);onUnmanagedChat(_0x96a3x7,_0x96a3x8)}models[_0xaa02[14]][_0xaa02[8]](function(_0x96a3x8){_0x96a3xb(_0x96a3x8)});models[_0xaa02[14]][_0xaa02[10]](function(_0x96a3x8){_0x96a3xb(_0x96a3x8)});models[_0xaa02[15]][_0xaa02[8]](function(_0x96a3x8){_0x96a3xb(_0x96a3x8)});models[_0xaa02[15]][_0xaa02[10]](function(_0x96a3x8){_0x96a3xb(_0x96a3x8)});function _0x96a3xb(_0x96a3x8){onNewFax(_0x96a3x7,_0x96a3x8);onOpenFax(_0x96a3x7,_0x96a3x8);onClosedFax(_0x96a3x7,_0x96a3x8);onTimeoutFax(_0x96a3x7,_0x96a3x8);onPendingFax(_0x96a3x7,_0x96a3x8);onWaitingFax(_0x96a3x7,_0x96a3x8)}models[_0xaa02[16]][_0xaa02[8]](function(_0x96a3x8){_0x96a3xc(_0x96a3x8)});models[_0xaa02[16]][_0xaa02[10]](function(_0x96a3x8){_0x96a3xc(_0x96a3x8)});models[_0xaa02[17]][_0xaa02[8]](function(_0x96a3x8){_0x96a3xc(_0x96a3x8)});models[_0xaa02[17]][_0xaa02[10]](function(_0x96a3x8){_0x96a3xc(_0x96a3x8)});function _0x96a3xc(_0x96a3x8){onNewSms(_0x96a3x7,_0x96a3x8);onOpenSms(_0x96a3x7,_0x96a3x8);onClosedSms(_0x96a3x7,_0x96a3x8);onTimeoutSms(_0x96a3x7,_0x96a3x8);onPendingSms(_0x96a3x7,_0x96a3x8);onWaitingSms(_0x96a3x7,_0x96a3x8)}models[_0xaa02[18]][_0xaa02[8]](function(_0x96a3x8){_0x96a3xd(_0x96a3x8)});models[_0xaa02[18]][_0xaa02[10]](function(_0x96a3x8){_0x96a3xd(_0x96a3x8)});models[_0xaa02[19]][_0xaa02[8]](function(_0x96a3x8){_0x96a3xd(_0x96a3x8)});models[_0xaa02[19]][_0xaa02[10]](function(_0x96a3x8){_0x96a3xd(_0x96a3x8)});function _0x96a3xd(_0x96a3x8){onNewOpenchannel(_0x96a3x7,_0x96a3x8);onOpenOpenchannel(_0x96a3x7,_0x96a3x8);onClosedOpenchannel(_0x96a3x7,_0x96a3x8);onTimeoutOpenchannel(_0x96a3x7,_0x96a3x8);onPendingOpenchannel(_0x96a3x7,_0x96a3x8);onWaitingOpenchannel(_0x96a3x7,_0x96a3x8)}};function getMailQueues(_0x96a3xf,_0x96a3x10){return function(){switch(_0x96a3xf[_0xaa02[36]]){case _0xaa02[33]:return models[_0xaa02[29]][_0xaa02[32]](_0x96a3xf[_0xaa02[31]],{attributes:[_0xaa02[23]]})[_0xaa02[28]](Util[_0xaa02[30]]({},{attributes:[_0xaa02[23]],include:[{raw:true,model:models[_0xaa02[29]],attributes:[_0xaa02[23]]}]}))[_0xaa02[28]](function(_0x96a3x11){if(_0x96a3x10){return {include:{model:models[_0xaa02[20]],include:{model:models[_0xaa02[21]],include:{model:models[_0xaa02[22]],where:{id:_[_0xaa02[24]](_0x96a3x11,_0xaa02[23])}}}}}}else {var _0x96a3x12=[];_0x96a3x11[_0xaa02[27]][_0xaa02[26]](function(_0x96a3x13){_0x96a3x12= _[_0xaa02[25]](_0x96a3x12,_[_0xaa02[24]](_0x96a3x13.Users,_0xaa02[23]))});return {where:{$or:{queue:_[_0xaa02[24]](_0x96a3x11[_0xaa02[27]],_0xaa02[23]),memberid:_0x96a3x12}}}}});case _0xaa02[35]:return models[_0xaa02[29]][_0xaa02[32]](_0x96a3xf[_0xaa02[31]],{attributes:[_0xaa02[23]]})[_0xaa02[28]](function(_0x96a3x14){return _0x96a3x14[_0xaa02[34]]({attributes:[_0xaa02[23]]})})[_0xaa02[28]](function(_0x96a3x11){return {where:{$or:{queue:_[_0xaa02[24]](_0x96a3x11,_0xaa02[23]),memberid:_0x96a3xf[_0xaa02[31]]}}}});default:return {}}}}function getChatQueues(_0x96a3xf,_0x96a3x10){return function(){switch(_0x96a3xf[_0xaa02[36]]){case _0xaa02[33]:return models[_0xaa02[29]][_0xaa02[32]](_0x96a3xf[_0xaa02[31]],{attributes:[_0xaa02[23]]})[_0xaa02[28]](Util[_0xaa02[40]]({},{attributes:[_0xaa02[23]],include:[{raw:true,model:models[_0xaa02[29]],attributes:[_0xaa02[23]]}]}))[_0xaa02[28]](function(_0x96a3x11){if(_0x96a3x10){return {include:{model:models[_0xaa02[37]],include:{model:models[_0xaa02[38]],include:{model:models[_0xaa02[39]],where:{id:_[_0xaa02[24]](_0x96a3x11,_0xaa02[23])}}}}}}else {var _0x96a3x12=[];_0x96a3x11[_0xaa02[27]][_0xaa02[26]](function(_0x96a3x13){_0x96a3x12= _[_0xaa02[25]](_0x96a3x12,_[_0xaa02[24]](_0x96a3x13.Users,_0xaa02[23]))});return {where:{$or:{queue:_[_0xaa02[24]](_0x96a3x11[_0xaa02[27]],_0xaa02[23]),memberid:_0x96a3x12}}}}});case _0xaa02[35]:return models[_0xaa02[29]][_0xaa02[32]](_0x96a3xf[_0xaa02[31]],{attributes:[_0xaa02[23]]})[_0xaa02[28]](function(_0x96a3x14){return _0x96a3x14[_0xaa02[41]]({attributes:[_0xaa02[23]]})})[_0xaa02[28]](function(_0x96a3x11){return {where:{$or:{queue:_[_0xaa02[24]](_0x96a3x11,_0xaa02[23]),memberid:_0x96a3xf[_0xaa02[31]]}}}});default:return {}}}}function getFaxQueues(_0x96a3xf,_0x96a3x10){return function(){switch(_0x96a3xf[_0xaa02[36]]){case _0xaa02[33]:return models[_0xaa02[29]][_0xaa02[32]](_0x96a3xf[_0xaa02[31]],{attributes:[_0xaa02[23]]})[_0xaa02[28]](Util[_0xaa02[45]]({},{attributes:[_0xaa02[23]],include:[{raw:true,model:models[_0xaa02[29]],attributes:[_0xaa02[23]]}]}))[_0xaa02[28]](function(_0x96a3x11){if(_0x96a3x10){return {include:{model:models[_0xaa02[42]],include:{model:models[_0xaa02[43]],include:{model:models[_0xaa02[44]],where:{id:_[_0xaa02[24]](_0x96a3x11,_0xaa02[23])}}}}}}else {var _0x96a3x12=[];_0x96a3x11[_0xaa02[27]][_0xaa02[26]](function(_0x96a3x13){_0x96a3x12= _[_0xaa02[25]](_0x96a3x12,_[_0xaa02[24]](_0x96a3x13.Users,_0xaa02[23]))});return {where:{$or:{queue:_[_0xaa02[24]](_0x96a3x11[_0xaa02[27]],_0xaa02[23]),memberid:_0x96a3x12}}}}});case _0xaa02[35]:return models[_0xaa02[29]][_0xaa02[32]](_0x96a3xf[_0xaa02[31]],{attributes:[_0xaa02[23]]})[_0xaa02[28]](function(_0x96a3x14){return _0x96a3x14[_0xaa02[46]]({attributes:[_0xaa02[23]]})})[_0xaa02[28]](function(_0x96a3x11){return {where:{$or:{queue:_[_0xaa02[24]](_0x96a3x11,_0xaa02[23]),memberid:_0x96a3xf[_0xaa02[31]]}}}});default:return {}}}}function getSmsQueues(_0x96a3xf,_0x96a3x10){return function(){switch(_0x96a3xf[_0xaa02[36]]){case _0xaa02[33]:return models[_0xaa02[29]][_0xaa02[32]](_0x96a3xf[_0xaa02[31]],{attributes:[_0xaa02[23]]})[_0xaa02[28]](Util[_0xaa02[50]]({},{attributes:[_0xaa02[23]],include:[{raw:true,model:models[_0xaa02[29]],attributes:[_0xaa02[23]]}]}))[_0xaa02[28]](function(_0x96a3x11){if(_0x96a3x10){return {include:{model:models[_0xaa02[47]],include:{model:models[_0xaa02[48]],include:{model:models[_0xaa02[49]],where:{id:_[_0xaa02[24]](_0x96a3x11,_0xaa02[23])}}}}}}else {var _0x96a3x12=[];_0x96a3x11[_0xaa02[27]][_0xaa02[26]](function(_0x96a3x13){_0x96a3x12= _[_0xaa02[25]](_0x96a3x12,_[_0xaa02[24]](_0x96a3x13.Users,_0xaa02[23]))});return {where:{$or:{queue:_[_0xaa02[24]](_0x96a3x11[_0xaa02[27]],_0xaa02[23]),memberid:_0x96a3x12}}}}});case _0xaa02[35]:return models[_0xaa02[29]][_0xaa02[32]](_0x96a3xf[_0xaa02[31]],{attributes:[_0xaa02[23]]})[_0xaa02[28]](function(_0x96a3x14){return _0x96a3x14[_0xaa02[51]]({attributes:[_0xaa02[23]]})})[_0xaa02[28]](function(_0x96a3x11){return {where:{$or:{queue:_[_0xaa02[24]](_0x96a3x11,_0xaa02[23]),memberid:_0x96a3xf[_0xaa02[31]]}}}});default:return {}}}}function getOpenchannelQueues(_0x96a3xf,_0x96a3x10){return function(){switch(_0x96a3xf[_0xaa02[36]]){case _0xaa02[33]:return models[_0xaa02[29]][_0xaa02[32]](_0x96a3xf[_0xaa02[31]],{attributes:[_0xaa02[23]]})[_0xaa02[28]](Util[_0xaa02[55]]({},{attributes:[_0xaa02[23]],include:[{raw:true,model:models[_0xaa02[29]],attributes:[_0xaa02[23]]}]}))[_0xaa02[28]](function(_0x96a3x11){if(_0x96a3x10){return {include:{model:models[_0xaa02[52]],include:{model:models[_0xaa02[53]],include:{model:models[_0xaa02[54]],where:{id:_[_0xaa02[24]](_0x96a3x11,_0xaa02[23])}}}}}}else {var _0x96a3x12=[];_0x96a3x11[_0xaa02[27]][_0xaa02[26]](function(_0x96a3x13){_0x96a3x12= _[_0xaa02[25]](_0x96a3x12,_[_0xaa02[24]](_0x96a3x13.Users,_0xaa02[23]))});return {where:{$or:{queue:_[_0xaa02[24]](_0x96a3x11[_0xaa02[27]],_0xaa02[23]),memberid:_0x96a3x12}}}}});case _0xaa02[35]:return models[_0xaa02[29]][_0xaa02[32]](_0x96a3xf[_0xaa02[31]],{attributes:[_0xaa02[23]]})[_0xaa02[28]](function(_0x96a3x14){return _0x96a3x14[_0xaa02[56]]({attributes:[_0xaa02[23]]})})[_0xaa02[28]](function(_0x96a3x11){return {where:{$or:{queue:_[_0xaa02[24]](_0x96a3x11,_0xaa02[23]),memberid:_0x96a3xf[_0xaa02[31]]}}}});default:return {}}}}function onOpenMail(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getMailQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[11]][_0xaa02[65]](_[_0xaa02[64]]({where:{status:_0xaa02[61],updatedAt:{$gte:moment()[_0xaa02[63]](_0xaa02[62])}}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[59],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onClosedMail(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getMailQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[11]][_0xaa02[65]](_[_0xaa02[64]]({where:{status:_0xaa02[68],updatedAt:{$gte:moment()[_0xaa02[63]](_0xaa02[62])}}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[67],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onNewMail(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getMailQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[11]][_0xaa02[65]](_[_0xaa02[64]]({where:{status:_0xaa02[70],updatedAt:{$gte:moment()[_0xaa02[63]](_0xaa02[62])}}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[69],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onWaitingMail(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getMailQueues(_0x96a3x7))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[9]][_0xaa02[65]](_[_0xaa02[64]]({where:{leaveAt:null}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[71],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onTimeoutMail(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getMailQueues(_0x96a3x7))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[9]][_0xaa02[65]](_[_0xaa02[64]]({where:{timeout:true}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[72],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onPendingMail(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getMailQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[11]][_0xaa02[65]](_[_0xaa02[64]]({where:{status:_0xaa02[74],updatedAt:{$gte:moment()[_0xaa02[63]](_0xaa02[62])}}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[73],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onOpenChat(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getChatQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[12]][_0xaa02[65]](_[_0xaa02[64]]({where:{leaveAt:{$ne:null},complete:null,timeout:null}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[75],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onClosedChat(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getChatQueues(_0x96a3x7))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[12]][_0xaa02[65]](_[_0xaa02[64]]({where:{complete:true}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[76],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onNewChat(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getChatQueues(_0x96a3x7))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[12]][_0xaa02[65]](_[_0xaa02[64]]({where:{leaveAt:null}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[77],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onTimeoutChat(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getChatQueues(_0x96a3x7))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[12]][_0xaa02[65]](_[_0xaa02[64]]({where:{timeout:true}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[78],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onAbandonedChat(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getChatQueues(_0x96a3x7))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[12]][_0xaa02[65]](_[_0xaa02[64]]({where:{abandon:true}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[79],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onUnmanagedChat(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getChatQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[13]][_0xaa02[65]](_[_0xaa02[64]]({where:{status:_0xaa02[81],updatedAt:{$gte:moment()[_0xaa02[63]](_0xaa02[62])}}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[80],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onOpenFax(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getFaxQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[15]][_0xaa02[65]](_[_0xaa02[64]]({where:{status:_0xaa02[61],updatedAt:{$gte:moment()[_0xaa02[63]](_0xaa02[62])}}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[82],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onClosedFax(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getFaxQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[15]][_0xaa02[65]](_[_0xaa02[64]]({where:{status:_0xaa02[68],updatedAt:{$gte:moment()[_0xaa02[63]](_0xaa02[62])}}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[83],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onNewFax(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getFaxQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[15]][_0xaa02[65]](_[_0xaa02[64]]({where:{status:_0xaa02[70],updatedAt:{$gte:moment()[_0xaa02[63]](_0xaa02[62])}}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[84],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onTimeoutFax(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getFaxQueues(_0x96a3x7))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[14]][_0xaa02[65]](_[_0xaa02[64]]({where:{timeout:true}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[85],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onPendingFax(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getFaxQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[15]][_0xaa02[65]](_[_0xaa02[64]]({where:{status:_0xaa02[74],updatedAt:{$gte:moment()[_0xaa02[63]](_0xaa02[62])}}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[86],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onWaitingFax(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getFaxQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[14]][_0xaa02[65]](_[_0xaa02[64]]({where:{leaveAt:true}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[87],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onOpenSms(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getSmsQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[17]][_0xaa02[65]](_[_0xaa02[64]]({where:{status:_0xaa02[61],updatedAt:{$gte:moment()[_0xaa02[63]](_0xaa02[62])}}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[88],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onClosedSms(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getSmsQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[17]][_0xaa02[65]](_[_0xaa02[64]]({where:{status:_0xaa02[68],updatedAt:{$gte:moment()[_0xaa02[63]](_0xaa02[62])}}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[89],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onNewSms(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getSmsQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[17]][_0xaa02[65]](_[_0xaa02[64]]({where:{status:_0xaa02[70],updatedAt:{$gte:moment()[_0xaa02[63]](_0xaa02[62])}}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[90],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onTimeoutSms(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getSmsQueues(_0x96a3x7))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[16]][_0xaa02[65]](_[_0xaa02[64]]({where:{timeout:true}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[91],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onPendingSms(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getSmsQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[17]][_0xaa02[65]](_[_0xaa02[64]]({where:{status:_0xaa02[74],updatedAt:{$gte:moment()[_0xaa02[63]](_0xaa02[62])}}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[92],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onWaitingSms(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getSmsQueues(_0x96a3x7))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[16]][_0xaa02[65]](_[_0xaa02[64]]({where:{leaveAt:null}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[92],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onOpenOpenchannel(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getOpenchannelQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[19]][_0xaa02[65]](_[_0xaa02[64]]({where:{status:_0xaa02[61],updatedAt:{$gte:moment()[_0xaa02[63]](_0xaa02[62])}}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[93],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onClosedOpenchannel(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getOpenchannelQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[19]][_0xaa02[65]](_[_0xaa02[64]]({where:{status:_0xaa02[68],updatedAt:{$gte:moment()[_0xaa02[63]](_0xaa02[62])}}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[94],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onNewOpenchannel(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getOpenchannelQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[19]][_0xaa02[65]](_[_0xaa02[64]]({where:{status:_0xaa02[70],updatedAt:{$gte:moment()[_0xaa02[63]](_0xaa02[62])}}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[95],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onTimeoutOpenchannel(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getOpenchannelQueues(_0x96a3x7))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[18]][_0xaa02[65]](_[_0xaa02[64]]({where:{timeout:true}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[96],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onPendingOpenchannel(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getOpenchannelQueues(_0x96a3x7,true))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[19]][_0xaa02[65]](_[_0xaa02[64]]({where:{status:_0xaa02[74],updatedAt:{$gte:moment()[_0xaa02[63]](_0xaa02[62])}}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[97],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}function onWaitingOpenchannel(_0x96a3x7,_0x96a3x8){return Promise[_0xaa02[66]]([])[_0xaa02[28]](getOpenchannelQueues(_0x96a3x7))[_0xaa02[28]](function(_0x96a3x1c){return models[_0xaa02[18]][_0xaa02[65]](_[_0xaa02[64]]({where:{leaveAt:null}},_0x96a3x1c))})[_0xaa02[28]](function(_0x96a3x1b){_0x96a3x7[_0xaa02[60]](_0xaa02[97],{value:_0x96a3x1b})})[_0xaa02[58]](function(_0x96a3x1a){console[_0xaa02[57]](_0x96a3x1a)})}
\ No newline at end of file
diff --git a/server/config/tools/faxAccount.js b/server/config/tools/faxAccount.js
index ccc342d..035100c 100644
--- a/server/config/tools/faxAccount.js
+++ b/server/config/tools/faxAccount.js
@@ -1,257 +1 @@
-'use strict';
-
-var util = require('util');
-
-var VoiceExtension = require('../../models').VoiceExtension;
-var FaxAccountModel = require('../../models').FaxAccount;
-var sequelize = require('../../models').sequelize;
-var veUtil = require('../../utils/voice_extension');
-var Promise = require('bluebird');
-
-function FaxAccount() {
-
-  FaxAccountModel.afterCreate(function(doc, options) {
-    var _exten = util.format('_%s', doc.localstationid);
-    var _accountId = doc.id;
-    var _description = util.format("Generated by Fax Channel - Account: %s", doc.name);
-
-    var body = generateExtensionArray(doc);
-    var _route;
-
-    return VoiceExtension
-      .create(body, {
-        transaction: options.transaction
-      })
-      .then(function(route) {
-        _route = route;
-        return route;
-      })
-      .then(veUtil.createApps(body.Applications, options.transaction));
-  });
-
-  FaxAccountModel.afterUpdate(function(doc, options) {
-    var _exten = util.format('_%s', doc.localstationid);
-    var _accountId = doc.id;
-    var _description = util.format("Generated by Fax Channel - Account: %s", doc.name);
-
-    return VoiceExtension
-      .findOne({
-        where: {
-          FaxAccountId: doc.id
-        }
-      })
-      .then(function(voiceExtension) {
-        if (!voiceExtension) {
-          return;
-        }
-        var req = {
-          params: {
-            id: voiceExtension.id
-          },
-          body: generateExtensionArray(doc)
-        };
-        return veUtil.routeUpdate(req, options.transaction);
-      });
-
-  });
-
-  FaxAccountModel.afterDelete(function(doc, options) {
-    return deleteVoiceExtensions(doc, options);
-  });
-
-}
-
-function generateExtensionArray(doc) {
-  var _exten = util.format('_%s', doc.localstationid);
-  var _accountId = doc.id;
-  var _description = util.format("Generated by Fax Channel - Account: %s", doc.name);
-
-  return {
-    "appdata": "Inbound Call",
-    "context": "from-voip-provider",
-    "exten": _exten,
-    "priority": "1",
-    "tag": "--",
-    "app": "NoOp",
-    "type": "inbound",
-    "description": _description,
-    "interval": null,
-    "IntervalId": null,
-    "isApp": false,
-    "record": false,
-    "FaxAccountId": _accountId,
-    "Applications": [{
-      "appdata": [
-        "Incoming fax from ${CALLERID(num)}"
-      ],
-      "app": "NoOp",
-      "interval": "*,*,*,*",
-      "IntervalId": null,
-      "callerID": null,
-      "type": "inbound",
-      "appType": "custom"
-    }, {
-      "appdata": [
-        util.format('Account %s', doc.name)
-      ],
-      "app": "NoOp",
-      "interval": "*,*,*,*",
-      "IntervalId": null,
-      "callerID": null,
-      "type": "inbound",
-      "appType": "custom"
-    }, {
-      "appdata": [
-        "CDR(type)=inbound-fax"
-      ],
-      "app": "Set",
-      "interval": "*,*,*,*",
-      "IntervalId": null,
-      "callerID": null,
-      "type": "inbound",
-      "appType": null
-    }, {
-      "appdata": [
-        ""
-      ],
-      "app": "Answer",
-      "interval": "*,*,*,*",
-      "IntervalId": null,
-      "callerID": null,
-      "type": "inbound",
-      "appType": "custom"
-    }, {
-      "appdata": [
-        "2"
-      ],
-      "app": "Wait",
-      "interval": "*,*,*,*",
-      "IntervalId": null,
-      "callerID": null,
-      "type": "inbound",
-      "appType": "custom"
-    }, {
-      "appdata": [
-        util.format('FAXOPT(ecm)=%s', doc.ecm)
-      ],
-      "app": "Set",
-      "interval": "*,*,*,*",
-      "IntervalId": null,
-      "callerID": null,
-      "type": "inbound",
-      "appType": null
-    }, {
-      "appdata": [
-        util.format('FAXOPT(headerinfo)=%s', doc.headerinfo)
-      ],
-      "app": "Set",
-      "interval": "*,*,*,*",
-      "IntervalId": null,
-      "callerID": null,
-      "type": "inbound",
-      "appType": null
-    }, {
-      "appdata": [
-        util.format('FAXOPT(localstationid)=%s', doc.localstationid)
-      ],
-      "app": "Set",
-      "interval": "*,*,*,*",
-      "IntervalId": null,
-      "callerID": null,
-      "type": "inbound",
-      "appType": null
-    }, {
-      "appdata": [
-        util.format('FAXOPT(minrate)=%s', doc.minrate)
-      ],
-      "app": "Set",
-      "interval": "*,*,*,*",
-      "IntervalId": null,
-      "callerID": null,
-      "type": "inbound",
-      "appType": null
-    }, {
-      "appdata": [
-        util.format('FAXOPT(maxrate)=%s', doc.maxrate)
-      ],
-      "app": "Set",
-      "interval": "*,*,*,*",
-      "IntervalId": null,
-      "callerID": null,
-      "type": "inbound",
-      "appType": null
-    }, {
-      "appdata": [
-        util.format('FAXOPT(modem)=%s', doc.modem)
-      ],
-      "app": "Set",
-      "interval": "*,*,*,*",
-      "IntervalId": null,
-      "callerID": null,
-      "type": "inbound",
-      "appType": null
-    }, {
-      "appdata": [
-        util.format('FAXOPT(gateway)=%s', doc.gateway)
-      ],
-      "app": "Set",
-      "interval": "*,*,*,*",
-      "IntervalId": null,
-      "callerID": null,
-      "type": "inbound",
-      "appType": null
-    }, {
-      "appdata": [
-        util.format('FAXOPT(t38timeout)=%s', doc.t38timeout)
-      ],
-      "app": "Set",
-      "interval": "*,*,*,*",
-      "IntervalId": null,
-      "callerID": null,
-      "type": "inbound",
-      "appType": null
-    }, {
-      "appdata": [
-        util.format('FAXOPT(faxdetect)=%s', doc.faxdetect)
-      ],
-      "app": "Set",
-      "interval": "*,*,*,*",
-      "IntervalId": null,
-      "callerID": null,
-      "type": "inbound",
-      "appType": null
-    }, {
-      "appdata": [
-        '/var/opt/motion/server/files/fax/inbound/original/fax-${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}.tif'
-      ],
-      "app": "ReceiveFAX",
-      "interval": "*,*,*,*",
-      "IntervalId": null,
-      "callerID": null,
-      "type": "inbound",
-      "appType": "custom"
-    }, {
-      "appdata": [
-        ""
-      ],
-      "app": "Hangup",
-      "interval": "*,*,*,*",
-      "IntervalId": null,
-      "callerID": null,
-      "type": "inbound",
-      "appType": null
-    }]
-  };
-}
-
-function deleteVoiceExtensions(doc, options) {
-  return VoiceExtension
-    .destroy({
-      where: {
-        FaxAccountId: doc.id
-      },
-      transaction: options.transaction
-    });
-}
-
-module.exports = FaxAccount;
+var _0x2585=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x62\x6C\x75\x65\x62\x69\x72\x64","\x5F\x25\x73","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x69\x64","\x47\x65\x6E\x65\x72\x61\x74\x65\x64\x20\x62\x79\x20\x46\x61\x78\x20\x43\x68\x61\x6E\x6E\x65\x6C\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x3A\x20\x25\x73","\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x73","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x72\x6F\x75\x74\x65\x55\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","\x49\x6E\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x70\x2D\x70\x72\x6F\x76\x69\x64\x65\x72","\x31","\x2D\x2D","\x4E\x6F\x4F\x70","\x69\x6E\x62\x6F\x75\x6E\x64","\x49\x6E\x63\x6F\x6D\x69\x6E\x67\x20\x66\x61\x78\x20\x66\x72\x6F\x6D\x20\x24\x7B\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x6E\x75\x6D\x29\x7D","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x63\x75\x73\x74\x6F\x6D","\x41\x63\x63\x6F\x75\x6E\x74\x20\x25\x73","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x53\x65\x74","","\x41\x6E\x73\x77\x65\x72","\x32","\x57\x61\x69\x74","\x46\x41\x58\x4F\x50\x54\x28\x65\x63\x6D\x29\x3D\x25\x73","\x65\x63\x6D","\x46\x41\x58\x4F\x50\x54\x28\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F\x29\x3D\x25\x73","\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F","\x46\x41\x58\x4F\x50\x54\x28\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64\x29\x3D\x25\x73","\x46\x41\x58\x4F\x50\x54\x28\x6D\x69\x6E\x72\x61\x74\x65\x29\x3D\x25\x73","\x6D\x69\x6E\x72\x61\x74\x65","\x46\x41\x58\x4F\x50\x54\x28\x6D\x61\x78\x72\x61\x74\x65\x29\x3D\x25\x73","\x6D\x61\x78\x72\x61\x74\x65","\x46\x41\x58\x4F\x50\x54\x28\x6D\x6F\x64\x65\x6D\x29\x3D\x25\x73","\x6D\x6F\x64\x65\x6D","\x46\x41\x58\x4F\x50\x54\x28\x67\x61\x74\x65\x77\x61\x79\x29\x3D\x25\x73","\x67\x61\x74\x65\x77\x61\x79","\x46\x41\x58\x4F\x50\x54\x28\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74\x29\x3D\x25\x73","\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74","\x46\x41\x58\x4F\x50\x54\x28\x66\x61\x78\x64\x65\x74\x65\x63\x74\x29\x3D\x25\x73","\x66\x61\x78\x64\x65\x74\x65\x63\x74","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x66\x61\x78\x2F\x69\x6E\x62\x6F\x75\x6E\x64\x2F\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2F\x66\x61\x78\x2D\x24\x7B\x53\x54\x52\x46\x54\x49\x4D\x45\x28\x24\x7B\x45\x50\x4F\x43\x48\x7D\x2C\x2C\x25\x59\x25\x6D\x25\x64\x2D\x25\x48\x25\x4D\x25\x53\x29\x7D\x2E\x74\x69\x66","\x52\x65\x63\x65\x69\x76\x65\x46\x41\x58","\x48\x61\x6E\x67\x75\x70","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x2585[0];var util=require(_0x2585[1]);var VoiceExtension=require(_0x2585[3])[_0x2585[2]];var FaxAccountModel=require(_0x2585[3])[_0x2585[4]];var sequelize=require(_0x2585[3])[_0x2585[5]];var veUtil=require(_0x2585[6]);var Promise=require(_0x2585[7]);function FaxAccount(){FaxAccountModel[_0x2585[18]](function(_0x40fex8,_0x40fex9){var _0x40fexa=util[_0x2585[10]](_0x2585[8],_0x40fex8[_0x2585[9]]);var _0x40fexb=_0x40fex8[_0x2585[11]];var _0x40fexc=util[_0x2585[10]](_0x2585[12],_0x40fex8[_0x2585[13]]);var _0x40fexd=generateExtensionArray(_0x40fex8);var _0x40fexe;return VoiceExtension[_0x2585[17]](_0x40fexd,{transaction:_0x40fex9[_0x2585[14]]})[_0x2585[16]](function(_0x40fexf){_0x40fexe= _0x40fexf;return _0x40fexf})[_0x2585[16]](veUtil[_0x2585[15]](_0x40fexd.Applications,_0x40fex9[_0x2585[14]]))});FaxAccountModel[_0x2585[21]](function(_0x40fex8,_0x40fex9){var _0x40fexa=util[_0x2585[10]](_0x2585[8],_0x40fex8[_0x2585[9]]);var _0x40fexb=_0x40fex8[_0x2585[11]];var _0x40fexc=util[_0x2585[10]](_0x2585[12],_0x40fex8[_0x2585[13]]);return VoiceExtension[_0x2585[20]]({where:{FaxAccountId:_0x40fex8[_0x2585[11]]}})[_0x2585[16]](function(_0x40fex10){if(!_0x40fex10){return};var _0x40fex11={params:{id:_0x40fex10[_0x2585[11]]},body:generateExtensionArray(_0x40fex8)};return veUtil[_0x2585[19]](_0x40fex11,_0x40fex9[_0x2585[14]])})});FaxAccountModel[_0x2585[22]](function(_0x40fex8,_0x40fex9){return deleteVoiceExtensions(_0x40fex8,_0x40fex9)})}function generateExtensionArray(_0x40fex8){var _0x40fexa=util[_0x2585[10]](_0x2585[8],_0x40fex8[_0x2585[9]]);var _0x40fexb=_0x40fex8[_0x2585[11]];var _0x40fexc=util[_0x2585[10]](_0x2585[12],_0x40fex8[_0x2585[13]]);return {"\x61\x70\x70\x64\x61\x74\x61":_0x2585[23],"\x63\x6F\x6E\x74\x65\x78\x74":_0x2585[24],"\x65\x78\x74\x65\x6E":_0x40fexa,"\x70\x72\x69\x6F\x72\x69\x74\x79":_0x2585[25],"\x74\x61\x67":_0x2585[26],"\x61\x70\x70":_0x2585[27],"\x74\x79\x70\x65":_0x2585[28],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x40fexc,"\x69\x6E\x74\x65\x72\x76\x61\x6C":null,"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x69\x73\x41\x70\x70":false,"\x72\x65\x63\x6F\x72\x64":false,"\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64":_0x40fexb,"\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73":[{"\x61\x70\x70\x64\x61\x74\x61":[_0x2585[29]],"\x61\x70\x70":_0x2585[27],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x2585[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0x2585[28],"\x61\x70\x70\x54\x79\x70\x65":_0x2585[31]},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x2585[10]](_0x2585[32],_0x40fex8[_0x2585[13]])],"\x61\x70\x70":_0x2585[27],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x2585[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0x2585[28],"\x61\x70\x70\x54\x79\x70\x65":_0x2585[31]},{"\x61\x70\x70\x64\x61\x74\x61":[_0x2585[33]],"\x61\x70\x70":_0x2585[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x2585[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0x2585[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[_0x2585[35]],"\x61\x70\x70":_0x2585[36],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x2585[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0x2585[28],"\x61\x70\x70\x54\x79\x70\x65":_0x2585[31]},{"\x61\x70\x70\x64\x61\x74\x61":[_0x2585[37]],"\x61\x70\x70":_0x2585[38],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x2585[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0x2585[28],"\x61\x70\x70\x54\x79\x70\x65":_0x2585[31]},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x2585[10]](_0x2585[39],_0x40fex8[_0x2585[40]])],"\x61\x70\x70":_0x2585[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x2585[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0x2585[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x2585[10]](_0x2585[41],_0x40fex8[_0x2585[42]])],"\x61\x70\x70":_0x2585[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x2585[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0x2585[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x2585[10]](_0x2585[43],_0x40fex8[_0x2585[9]])],"\x61\x70\x70":_0x2585[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x2585[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0x2585[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x2585[10]](_0x2585[44],_0x40fex8[_0x2585[45]])],"\x61\x70\x70":_0x2585[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x2585[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0x2585[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x2585[10]](_0x2585[46],_0x40fex8[_0x2585[47]])],"\x61\x70\x70":_0x2585[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x2585[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0x2585[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x2585[10]](_0x2585[48],_0x40fex8[_0x2585[49]])],"\x61\x70\x70":_0x2585[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x2585[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0x2585[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x2585[10]](_0x2585[50],_0x40fex8[_0x2585[51]])],"\x61\x70\x70":_0x2585[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x2585[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0x2585[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x2585[10]](_0x2585[52],_0x40fex8[_0x2585[53]])],"\x61\x70\x70":_0x2585[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x2585[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0x2585[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x2585[10]](_0x2585[54],_0x40fex8[_0x2585[55]])],"\x61\x70\x70":_0x2585[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x2585[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0x2585[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[_0x2585[56]],"\x61\x70\x70":_0x2585[57],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x2585[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0x2585[28],"\x61\x70\x70\x54\x79\x70\x65":_0x2585[31]},{"\x61\x70\x70\x64\x61\x74\x61":[_0x2585[35]],"\x61\x70\x70":_0x2585[58],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x2585[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0x2585[28],"\x61\x70\x70\x54\x79\x70\x65":null}]}}function deleteVoiceExtensions(_0x40fex8,_0x40fex9){return VoiceExtension[_0x2585[59]]({where:{FaxAccountId:_0x40fex8[_0x2585[11]]},transaction:_0x40fex9[_0x2585[14]]})}module[_0x2585[60]]= FaxAccount
\ No newline at end of file
diff --git a/server/config/tools/faxRoom.js b/server/config/tools/faxRoom.js
index 3c52a65..74eff11 100644
--- a/server/config/tools/faxRoom.js
+++ b/server/config/tools/faxRoom.js
@@ -1,35 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const moment = require('moment');
-
-const Room = require('../../models').FaxRoom;
-const Status = require('../../models').FaxRoomStatus;
-
-function FaxRoom() {
-  Room.afterCreate(function(doc, opt) {
-    return Status
-      .create({
-        status: doc.status,
-        data1: opt.user ? opt.user.name : null,
-        data2: opt.user ? opt.user.fullname : null,
-        FaxRoomId: doc.id,
-        UserId: opt.user ? opt.user.id : null
-      });
-  });
-
-  Room.afterUpdate(function(doc, opt) {
-    if (doc.changed('status') || doc.changed('openReason')) {
-      return Status
-        .create({
-          status: doc.status,
-          data1: opt.user ? opt.user.name : null,
-          data2: opt.user ? opt.user.fullname : null,
-          FaxRoomId: doc.id,
-          UserId: opt.user ? opt.user.id : null
-        });
-    }
-  });
-}
-
-module.exports = FaxRoom;
+var _0xb3a5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73","\x75\x73\x65\x72","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x69\x64","\x63\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6F\x70\x65\x6E\x52\x65\x61\x73\x6F\x6E","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xb3a5[0];const _=require(_0xb3a5[1]);const moment=require(_0xb3a5[2]);const Room=require(_0xb3a5[4])[_0xb3a5[3]];const Status=require(_0xb3a5[4])[_0xb3a5[5]];function FaxRoom(){Room[_0xb3a5[12]](function(_0xd885x6,_0xd885x7){return Status[_0xb3a5[11]]({status:_0xd885x6[_0xb3a5[6]],data1:_0xd885x7[_0xb3a5[7]]?_0xd885x7[_0xb3a5[7]][_0xb3a5[8]]:null,data2:_0xd885x7[_0xb3a5[7]]?_0xd885x7[_0xb3a5[7]][_0xb3a5[9]]:null,FaxRoomId:_0xd885x6[_0xb3a5[10]],UserId:_0xd885x7[_0xb3a5[7]]?_0xd885x7[_0xb3a5[7]][_0xb3a5[10]]:null})});Room[_0xb3a5[15]](function(_0xd885x6,_0xd885x7){if(_0xd885x6[_0xb3a5[13]](_0xb3a5[6])|| _0xd885x6[_0xb3a5[13]](_0xb3a5[14])){return Status[_0xb3a5[11]]({status:_0xd885x6[_0xb3a5[6]],data1:_0xd885x7[_0xb3a5[7]]?_0xd885x7[_0xb3a5[7]][_0xb3a5[8]]:null,data2:_0xd885x7[_0xb3a5[7]]?_0xd885x7[_0xb3a5[7]][_0xb3a5[9]]:null,FaxRoomId:_0xd885x6[_0xb3a5[10]],UserId:_0xd885x7[_0xb3a5[7]]?_0xd885x7[_0xb3a5[7]][_0xb3a5[10]]:null})}})}module[_0xb3a5[16]]= FaxRoom
\ No newline at end of file
diff --git a/server/config/tools/index.js b/server/config/tools/index.js
index f9c1659..74e9060 100644
--- a/server/config/tools/index.js
+++ b/server/config/tools/index.js
@@ -1,26 +1 @@
-'use strict';
-
-var Interval = require('./interval');
-var User = require('./user');
-var ChanSpy = require('./channelSpy');
-var MailRoom = require('./mailRoom');
-var MailAccount = require('./mailAccount');
-var ChatRoom = require('./chatRoom');
-var FaxRoom = require('./faxRoom');
-var SmsRoom = require('./smsRoom');
-var OpenchannelRoom = require('./openchannelRoom');
-var FaxAccount = require('./faxAccount');
-
-module.exports = function() {
-  // Tools Mangament
-  new Interval();
-  new User();
-  new ChanSpy();
-  new MailRoom();
-  new MailAccount();
-  new ChatRoom();
-  new FaxRoom();
-  new SmsRoom();
-  new FaxAccount();
-  new OpenchannelRoom();
-}
+var _0xcdc1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2F\x75\x73\x65\x72","\x2E\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x53\x70\x79","\x2E\x2F\x6D\x61\x69\x6C\x52\x6F\x6F\x6D","\x2E\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2F\x66\x61\x78\x52\x6F\x6F\x6D","\x2E\x2F\x73\x6D\x73\x52\x6F\x6F\x6D","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x2E\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xcdc1[0];var Interval=require(_0xcdc1[1]);var User=require(_0xcdc1[2]);var ChanSpy=require(_0xcdc1[3]);var MailRoom=require(_0xcdc1[4]);var MailAccount=require(_0xcdc1[5]);var ChatRoom=require(_0xcdc1[6]);var FaxRoom=require(_0xcdc1[7]);var SmsRoom=require(_0xcdc1[8]);var OpenchannelRoom=require(_0xcdc1[9]);var FaxAccount=require(_0xcdc1[10]);module[_0xcdc1[11]]= function(){ new Interval(); new User(); new ChanSpy(); new MailRoom(); new MailAccount(); new ChatRoom(); new FaxRoom(); new SmsRoom(); new FaxAccount(); new OpenchannelRoom()}
\ No newline at end of file
diff --git a/server/config/tools/interval.js b/server/config/tools/interval.js
index 223b7bf..97f176e 100644
--- a/server/config/tools/interval.js
+++ b/server/config/tools/interval.js
@@ -1,74 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var IntervalModel = require('../../models').Interval;
-var VoiceExtension = require('../../models').VoiceExtension;
-var veUtil = require('../../utils/voice_extension');
-var sequelize = require('../../models').sequelize;
-var Applications = veUtil.Applications;
-
-function Interval() {
-  console.log('Interval Initialization..');
-  IntervalModel.afterUpdate(function(interval) {
-    updatevoiceExtension(interval);
-  })
-
-  IntervalModel.beforeDestroy(function(interval) {
-    if (interval.IntervalId !== null) {
-      updatevoiceExtension(interval);
-    }
-  })
-
-  IntervalModel.afterCreate(function(interval) {
-    if (interval.IntervalId !== null) {
-      updatevoiceExtension(interval);
-    }
-  })
-}
-
-function updatevoiceExtension(interval) {
-  var IntervalId = interval.IntervalId === null ? interval.id : interval.IntervalId;
-  return VoiceExtension
-    .findAll({
-      where: {
-        VoiceExtensionId: null
-      },
-      include: [{
-        model: VoiceExtension,
-        as: 'Applications',
-        where: {
-          IntervalId: IntervalId
-        },
-        attributes: ['app', 'interval', 'IntervalId', 'callerID', 'appdata', 'type']
-      }]
-    })
-    .then(function(voiceExtensions) {
-      voiceExtensions.forEach(function(elem) {
-        return sequelize.transaction(function(t) {
-            return veUtil.routeUpdate({
-              body: elem.dataValues,
-              params: {
-                id: elem.id
-              }
-            }, t);
-          })
-          .catch(sequelize.UniqueConstraintError, function(err) {
-            if (err.fields.PRIMARY) {
-              err.message = 'Extension/context combination already exist';
-              err.translatedMessage = 'MESSAGE_EXIST_ROUTE'
-            }
-            console.log(err);
-          })
-          .catch(function(err) {
-            console.log(err);
-          });
-      });
-    })
-    .catch(function(err) {
-      console.log(err);
-    });
-}
-
-
-module.exports = Interval;
+var _0x4704=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E","\x6C\x6F\x67","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x62\x65\x66\x6F\x72\x65\x44\x65\x73\x74\x72\x6F\x79","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x69\x64","\x63\x61\x74\x63\x68","\x50\x52\x49\x4D\x41\x52\x59","\x66\x69\x65\x6C\x64\x73","\x6D\x65\x73\x73\x61\x67\x65","\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x63\x6F\x6E\x74\x65\x78\x74\x20\x63\x6F\x6D\x62\x69\x6E\x61\x74\x69\x6F\x6E\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x52\x4F\x55\x54\x45","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x72\x6F\x75\x74\x65\x55\x70\x64\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x61\x70\x70","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x63\x61\x6C\x6C\x65\x72\x49\x44","\x61\x70\x70\x64\x61\x74\x61","\x74\x79\x70\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x65\x78\x70\x6F\x72\x74\x73"];_0x4704[0];var _=require(_0x4704[1]);var util=require(_0x4704[2]);var IntervalModel=require(_0x4704[4])[_0x4704[3]];var VoiceExtension=require(_0x4704[4])[_0x4704[5]];var veUtil=require(_0x4704[6]);var sequelize=require(_0x4704[4])[_0x4704[7]];var Applications=veUtil[_0x4704[8]];function Interval(){console[_0x4704[10]](_0x4704[9]);IntervalModel[_0x4704[11]](function(_0x869fx9){updatevoiceExtension(_0x869fx9)});IntervalModel[_0x4704[13]](function(_0x869fx9){if(_0x869fx9[_0x4704[12]]!== null){updatevoiceExtension(_0x869fx9)}});IntervalModel[_0x4704[14]](function(_0x869fx9){if(_0x869fx9[_0x4704[12]]!== null){updatevoiceExtension(_0x869fx9)}})}function updatevoiceExtension(_0x869fx9){var _0x869fxb=_0x869fx9[_0x4704[12]]=== null?_0x869fx9[_0x4704[15]]:_0x869fx9[_0x4704[12]];return VoiceExtension[_0x4704[33]]({where:{VoiceExtensionId:null},include:[{model:VoiceExtension,as:_0x4704[8],where:{IntervalId:_0x869fxb},attributes:[_0x4704[28],_0x4704[29],_0x4704[12],_0x4704[30],_0x4704[31],_0x4704[32]]}]})[_0x4704[27]](function(_0x869fxd){_0x869fxd[_0x4704[26]](function(_0x869fxe){return sequelize[_0x4704[25]](function(_0x869fxf){return veUtil[_0x4704[24]]({body:_0x869fxe[_0x4704[23]],params:{id:_0x869fxe[_0x4704[15]]}},_0x869fxf)})[_0x4704[16]](sequelize.UniqueConstraintError,function(_0x869fxc){if(_0x869fxc[_0x4704[18]][_0x4704[17]]){_0x869fxc[_0x4704[19]]= _0x4704[20];_0x869fxc[_0x4704[21]]= _0x4704[22]};console[_0x4704[10]](_0x869fxc)})[_0x4704[16]](function(_0x869fxc){console[_0x4704[10]](_0x869fxc)})})})[_0x4704[16]](function(_0x869fxc){console[_0x4704[10]](_0x869fxc)})}module[_0x4704[34]]= Interval
\ No newline at end of file
diff --git a/server/config/tools/mailAccount.js b/server/config/tools/mailAccount.js
index e2da0c5..637a567 100644
--- a/server/config/tools/mailAccount.js
+++ b/server/config/tools/mailAccount.js
@@ -1,40 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const moment = require('moment');
-
-const Account = require('../../models').MailAccount;
-
-function MailAccount() {
-  Account.afterCreate(function(doc, opt) {
-    if (doc.service) {
-      return Account
-        .update({
-          service: false
-        }, {
-          where: {
-            id: {
-              $ne: doc.id
-            }
-          }
-        });
-    }
-  });
-
-  Account.afterUpdate(function(doc, opt) {
-    if (doc.changed('service') && doc.service) {
-      return Account
-        .update({
-          service: false
-        }, {
-          where: {
-            id: {
-              $ne: doc.id
-            }
-          }
-        });
-    }
-  });
-}
-
-module.exports = MailAccount;
+var _0x7c1d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x72\x76\x69\x63\x65","\x69\x64","\x75\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x7c1d[0];const _=require(_0x7c1d[1]);const moment=require(_0x7c1d[2]);const Account=require(_0x7c1d[4])[_0x7c1d[3]];function MailAccount(){Account[_0x7c1d[8]](function(_0xfa99x5,_0xfa99x6){if(_0xfa99x5[_0x7c1d[5]]){return Account[_0x7c1d[7]]({service:false},{where:{id:{$ne:_0xfa99x5[_0x7c1d[6]]}}})}});Account[_0x7c1d[10]](function(_0xfa99x5,_0xfa99x6){if(_0xfa99x5[_0x7c1d[9]](_0x7c1d[5])&& _0xfa99x5[_0x7c1d[5]]){return Account[_0x7c1d[7]]({service:false},{where:{id:{$ne:_0xfa99x5[_0x7c1d[6]]}}})}})}module[_0x7c1d[11]]= MailAccount
\ No newline at end of file
diff --git a/server/config/tools/mailRoom.js b/server/config/tools/mailRoom.js
index 697cbbb..3b47ebc 100644
--- a/server/config/tools/mailRoom.js
+++ b/server/config/tools/mailRoom.js
@@ -1,35 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const moment = require('moment');
-
-const Room = require('../../models').MailRoom;
-const Status = require('../../models').MailRoomStatus;
-
-function MailRoom() {
-  Room.afterCreate(function(doc, opt) {
-    return Status
-      .create({
-        status: doc.status,
-        data1: opt.user ? opt.user.name : null,
-        data2: opt.user ? opt.user.fullname : null,
-        MailRoomId: doc.id,
-        UserId: opt.user ? opt.user.id : null
-      });
-  });
-
-  Room.afterUpdate(function(doc, opt) {
-    if (doc.changed('status') || doc.changed('openReason')) {
-      return Status
-        .create({
-          status: doc.status,
-          data1: opt.user ? opt.user.name : null,
-          data2: opt.user ? opt.user.fullname : null,
-          MailRoomId: doc.id,
-          UserId: opt.user ? opt.user.id : null
-        });
-    }
-  });
-}
-
-module.exports = MailRoom;
+var _0xeed1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73","\x75\x73\x65\x72","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x69\x64","\x63\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6F\x70\x65\x6E\x52\x65\x61\x73\x6F\x6E","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xeed1[0];const _=require(_0xeed1[1]);const moment=require(_0xeed1[2]);const Room=require(_0xeed1[4])[_0xeed1[3]];const Status=require(_0xeed1[4])[_0xeed1[5]];function MailRoom(){Room[_0xeed1[12]](function(_0x758ex6,_0x758ex7){return Status[_0xeed1[11]]({status:_0x758ex6[_0xeed1[6]],data1:_0x758ex7[_0xeed1[7]]?_0x758ex7[_0xeed1[7]][_0xeed1[8]]:null,data2:_0x758ex7[_0xeed1[7]]?_0x758ex7[_0xeed1[7]][_0xeed1[9]]:null,MailRoomId:_0x758ex6[_0xeed1[10]],UserId:_0x758ex7[_0xeed1[7]]?_0x758ex7[_0xeed1[7]][_0xeed1[10]]:null})});Room[_0xeed1[15]](function(_0x758ex6,_0x758ex7){if(_0x758ex6[_0xeed1[13]](_0xeed1[6])|| _0x758ex6[_0xeed1[13]](_0xeed1[14])){return Status[_0xeed1[11]]({status:_0x758ex6[_0xeed1[6]],data1:_0x758ex7[_0xeed1[7]]?_0x758ex7[_0xeed1[7]][_0xeed1[8]]:null,data2:_0x758ex7[_0xeed1[7]]?_0x758ex7[_0xeed1[7]][_0xeed1[9]]:null,MailRoomId:_0x758ex6[_0xeed1[10]],UserId:_0x758ex7[_0xeed1[7]]?_0x758ex7[_0xeed1[7]][_0xeed1[10]]:null})}})}module[_0xeed1[16]]= MailRoom
\ No newline at end of file
diff --git a/server/config/tools/openchannelRoom.js b/server/config/tools/openchannelRoom.js
index 6cd41af..b2a7dc3 100644
--- a/server/config/tools/openchannelRoom.js
+++ b/server/config/tools/openchannelRoom.js
@@ -1,26 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const moment = require('moment');
-
-const Room = require('../../models').OpenchannelRoom;
-const Status = require('../../models').OpenchannelRoomStatus;
-
-function OpenchannelRoom() {
-  Room.afterCreate(function(doc, opt) {});
-
-  Room.afterUpdate(function(doc, opt) {
-    if (doc.changed('status') || doc.changed('openReason')) {
-      return Status
-        .create({
-          status: doc.status,
-          data1: opt.user ? opt.user.name : null,
-          data2: opt.user ? opt.user.fullname : null,
-          OpenchannelRoomId: doc.id,
-          UserId: opt.user ? opt.user.id : null
-        });
-    }
-  });
-}
-
-module.exports = OpenchannelRoom;
+var _0xc25b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x6F\x70\x65\x6E\x52\x65\x61\x73\x6F\x6E","\x75\x73\x65\x72","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x69\x64","\x63\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc25b[0];const _=require(_0xc25b[1]);const moment=require(_0xc25b[2]);const Room=require(_0xc25b[4])[_0xc25b[3]];const Status=require(_0xc25b[4])[_0xc25b[5]];function OpenchannelRoom(){Room[_0xc25b[6]](function(_0x5252x6,_0x5252x7){});Room[_0xc25b[15]](function(_0x5252x6,_0x5252x7){if(_0x5252x6[_0xc25b[8]](_0xc25b[7])|| _0x5252x6[_0xc25b[8]](_0xc25b[9])){return Status[_0xc25b[14]]({status:_0x5252x6[_0xc25b[7]],data1:_0x5252x7[_0xc25b[10]]?_0x5252x7[_0xc25b[10]][_0xc25b[11]]:null,data2:_0x5252x7[_0xc25b[10]]?_0x5252x7[_0xc25b[10]][_0xc25b[12]]:null,OpenchannelRoomId:_0x5252x6[_0xc25b[13]],UserId:_0x5252x7[_0xc25b[10]]?_0x5252x7[_0xc25b[10]][_0xc25b[13]]:null})}})}module[_0xc25b[16]]= OpenchannelRoom
\ No newline at end of file
diff --git a/server/config/tools/queueParameters.js b/server/config/tools/queueParameters.js
index 81ea345..047df00 100644
--- a/server/config/tools/queueParameters.js
+++ b/server/config/tools/queueParameters.js
@@ -1,384 +1 @@
-/**
- * Broadcast updates to client when the model changes
- */
-
-'use strict';
-
-var sequelize = require('../../models').sequelize;
-var models = require('../../models');
-var Util = require('../../config/util');
-var Promise = require('bluebird');
-var _ = require('lodash');
-var util = require('util');
-
-exports.register = function(socket) {
-  // Inbound Events
-  models.ReportQueue.afterCreate(function(doc) {
-    onWaiting(socket, doc);
-  });
-  models.ReportQueue.afterUpdate(function(doc) {
-    if (doc.changed('queuecallerleaveAt')) {
-      onWaiting(socket, doc);
-      onActive(socket, doc);
-    }
-  });
-  models.ReportQueue.afterUpdate(function(doc) {
-    if (doc.changed('queuecallerabandon') || doc.changed('queuecallercomplete')) {
-      onAbandon(socket, doc);
-      onComplete(socket, doc);
-      onActive(socket, doc);
-      onAvgAnswerTime(socket, doc);
-      onAvgTalkTime(socket, doc);
-      onTotalOffered(socket, doc);
-      onUnmanaged(socket, doc);
-    }
-  });
-}
-
-function getQueues(id, role) {
-  return function() {
-    switch (role) {
-      case 'user':
-        return models.User
-          .findById(id, {
-            attributes: ['id']
-          })
-          .then(Util.getVoiceQueuesIdByUser());
-      default:
-        return models.VoiceQueue
-          .findAll()
-          .then(function(queues) {
-            return {
-              rows: queues
-            };
-          });
-    }
-  }
-}
-
-function onWaiting(socket, doc) {
-  return Promise
-    .all([])
-    .then(getQueues(socket.userId, socket.role))
-    .then(function(userQueues) {
-      if (userQueues.rows.length) {
-        return models
-          .ReportQueue
-          .findAll({
-            where: {
-              queuecallerleaveAt: null,
-              queue: _.find(userQueues.rows, {
-                name: doc.queue
-              }) ? doc.queue : []
-            },
-            group: 'queue',
-            attributes: [
-              ['queue', 'name'],
-              [sequelize.fn('COUNT', sequelize.col('id')), 'waiting']
-            ]
-          });
-      }
-      return null;
-    })
-    .then(function(waiting) {
-      if (waiting) {
-        var _parameters;
-        if (waiting.length) {
-          _parameters = waiting[0].dataValues;
-        } else {
-          _parameters = {
-            name: doc.queue,
-            waiting: 0
-          };
-        }
-        socket.emit('report_queue:parameters', _parameters);
-      }
-    })
-    .catch(function(err) {
-      console.error('WAITING ERROR', err);
-    });
-}
-
-function onActive(socket, doc) {
-  return Promise
-    .all([])
-    .then(getQueues(socket.userId, socket.role))
-    .then(function(userQueues) {
-      if (userQueues.rows.length) {
-        return models
-          .ReportQueue
-          .findAll({
-            where: {
-              queuecallerexit: false,
-              queuecallerabandon: false,
-              queuecallercomplete: false,
-              queuecallerleaveAt: {
-                $ne: null
-              },
-              queue: _.find(userQueues.rows, {
-                name: doc.queue
-              }) ? doc.queue : []
-            },
-            group: 'queue',
-            attributes: [
-              ['queue', 'name'],
-              [sequelize.fn('COUNT', sequelize.col('id')), 'active']
-            ]
-          });
-      }
-      return null;
-    })
-    .then(function(active) {
-      if (active) {
-        var _parameters;
-        if (active.length) {
-          _parameters = active[0].dataValues;
-        } else {
-          _parameters = {
-            name: doc.queue,
-            active: 0
-          };
-        }
-        socket.emit('report_queue:parameters', _parameters);
-      }
-    })
-    .catch(function(err) {
-      console.error('ACTIVE ERROR', err);
-    });
-}
-
-function onAbandon(socket, doc) {
-  return Promise
-    .all([])
-    .then(getQueues(socket.userId, socket.role))
-    .then(function(userQueues) {
-      if (userQueues.rows.length) {
-        return models
-          .ReportQueue
-          .findAll({
-            where: {
-              queuecallerabandon: true,
-              queue: _.find(userQueues.rows, {
-                name: doc.queue
-              }) ? doc.queue : []
-            },
-            group: 'queue',
-            attributes: [
-              ['queue', 'name'],
-              [sequelize.fn('COUNT', sequelize.col('id')), 'abandoned']
-            ]
-          });
-      }
-      return null;
-    })
-    .then(function(abandoned) {
-      if (abandoned) {
-        var _parameters;
-        if (abandoned.length) {
-          _parameters = abandoned[0].dataValues;
-        } else {
-          _parameters = {
-            name: doc.queue,
-            abandoned: 0
-          };
-        }
-        socket.emit('report_queue:parameters', _parameters);
-      }
-    })
-    .catch(function(err) {
-      console.error('ABANDONED ERROR', err);
-    });
-}
-
-function onComplete(socket, doc) {
-  return Promise
-    .all([])
-    .then(getQueues(socket.userId, socket.role))
-    .then(function(userQueues) {
-      if (userQueues.rows.length) {
-        return models
-          .ReportQueue
-          .findAll({
-            where: {
-              queuecallercomplete: true,
-              queue: _.find(userQueues.rows, {
-                name: doc.queue
-              }) ? doc.queue : []
-            },
-            group: 'queue',
-            attributes: [
-              ['queue', 'name'],
-              [sequelize.fn('COUNT', sequelize.col('id')), 'answered']
-            ]
-          });
-      }
-      return null;
-    })
-    .then(function(answered) {
-      if (answered) {
-        var _parameters;
-        if (answered.length) {
-          _parameters = answered[0].dataValues;
-        } else {
-          _parameters = {
-            name: doc.queue,
-            answered: 0
-          };
-        }
-        socket.emit('report_queue:parameters', _parameters);
-      }
-    })
-    .catch(function(err) {
-      console.error('ANSWERED ERROR', err);
-    });
-}
-
-function onAvgAnswerTime(socket, doc) {
-  return Promise
-    .all([])
-    .then(getQueues(socket.userId, socket.role))
-    .then(function(userQueues) {
-      if (userQueues.rows.length) {
-        var queue = _.find(userQueues.rows, {
-          name: doc.queue
-        }) ? doc.queue : '';
-        var query = util.format('SELECT queue AS \'name\',SEC_TO_TIME(ROUND(AVG(holdtime), 0)) as holdtime FROM report_agent WHERE agentcomplete = 1 AND queue =\'%s\' GROUP BY queue', queue);
-        return sequelize
-          .query(query, {
-            type: sequelize.QueryTypes.SELECT
-          });
-      }
-      return null;
-    })
-    .then(function(holdtime) {
-      if (holdtime) {
-        var _parameters;
-        if (holdtime.length) {
-          _parameters = holdtime[0];
-        } else {
-          _parameters = {
-            name: doc.queue,
-            holdtime: '00:00:00'
-          };
-        }
-        socket.emit('report_queue:parameters', _parameters);
-      }
-    })
-    .catch(function(err) {
-      console.error('HOLDTIME ERROR', err);
-    });
-}
-
-function onAvgTalkTime(socket, doc) {
-  return Promise
-    .all([])
-    .then(getQueues(socket.userId, socket.role))
-    .then(function(userQueues) {
-      if (userQueues.rows.length) {
-        var queue = _.find(userQueues.rows, {
-          name: doc.queue
-        }) ? doc.queue : '';
-        return sequelize
-          .query(util.format('SELECT queue AS \'name\',SEC_TO_TIME(ROUND(AVG(talktime), 0)) as talktime FROM report_agent WHERE agentcomplete = 1 AND queue =\'%s\' GROUP BY queue', queue), {
-            type: sequelize.QueryTypes.SELECT
-          });
-      }
-      return null;
-    })
-    .then(function(talktime) {
-      if (talktime) {
-        var _parameters;
-        if (talktime.length) {
-          _parameters = talktime[0];
-        } else {
-          _parameters = {
-            name: doc.queue,
-            talktime: '00:00:00'
-          };
-        }
-        socket.emit('report_queue:parameters', _parameters);
-      }
-    })
-    .catch(function(err) {
-      console.error('TALKTIME ERROR', err);
-    });
-}
-
-
-function onTotalOffered(socket, doc) {
-  return Promise
-    .all([])
-    .then(getQueues(socket.userId, socket.role))
-    .then(function(userQueues) {
-      if (userQueues.rows.length) {
-        var queue = _.find(userQueues.rows, {
-          name: doc.queue
-        }) ? doc.queue : '';
-        return sequelize
-          .query(util.format('SELECT queue AS \'name\',COUNT(distinct uniqueid) as totalcalls FROM report_queue WHERE queue =\'%s\' GROUP BY queue', queue), {
-            type: sequelize.QueryTypes.SELECT
-          });
-      }
-      return null;
-    })
-    .then(function(totalcalls) {
-      if (totalcalls) {
-        var _parameters;
-        if (totalcalls.length) {
-          _parameters = totalcalls[0];
-        } else {
-          _parameters = {
-            name: doc.queue,
-            totalcalls: 0
-          };
-        }
-        socket.emit('report_queue:parameters', _parameters);
-      }
-    })
-    .catch(function(err) {
-      console.error('TOTALCALLS ERROR', err);
-    });
-}
-
-function onUnmanaged(socket, doc) {
-  return Promise
-    .all([])
-    .then(getQueues(socket.userId, socket.role))
-    .then(function(userQueues) {
-      if (userQueues.rows.length) {
-        return models
-          .ReportQueue
-          .findAll({
-            where: {
-              queuecallerexit: true,
-              queue: _.find(userQueues.rows, {
-                name: doc.queue
-              }) ? doc.queue : []
-            },
-            group: 'queue',
-            attributes: [
-              ['queue', 'name'],
-              [sequelize.fn('COUNT', sequelize.col('id')), 'unmanaged']
-            ]
-          });
-      }
-      return null;
-    })
-    .then(function(unmanaged) {
-      if (unmanaged) {
-        var _parameters;
-        if (unmanaged.length) {
-          _parameters = unmanaged[0].dataValues;
-        } else {
-          _parameters = {
-            name: doc.queue,
-            _parameters: 0
-          };
-        }
-        socket.emit('report_queue:parameters', _parameters);
-      }
-    })
-    .catch(function(err) {
-      console.error('UNMANAGED ERROR', err);
-    });
-}
+var _0x4545=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x63\x68\x61\x6E\x67\x65\x64","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x74\x68\x65\x6E","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x55\x73\x65\x72","\x75\x73\x65\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x57\x41\x49\x54\x49\x4E\x47\x20\x45\x52\x52\x4F\x52","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x6C\x65\x6E\x67\x74\x68","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x71\x75\x65\x75\x65","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73","\x65\x6D\x69\x74","\x72\x6F\x77\x73","\x66\x69\x6E\x64","\x6E\x61\x6D\x65","\x43\x4F\x55\x4E\x54","\x63\x6F\x6C","\x66\x6E","\x77\x61\x69\x74\x69\x6E\x67","\x75\x73\x65\x72\x49\x64","\x72\x6F\x6C\x65","\x61\x6C\x6C","\x41\x43\x54\x49\x56\x45\x20\x45\x52\x52\x4F\x52","\x61\x63\x74\x69\x76\x65","\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44\x20\x45\x52\x52\x4F\x52","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x41\x4E\x53\x57\x45\x52\x45\x44\x20\x45\x52\x52\x4F\x52","\x61\x6E\x73\x77\x65\x72\x65\x64","\x48\x4F\x4C\x44\x54\x49\x4D\x45\x20\x45\x52\x52\x4F\x52","\x30\x30\x3A\x30\x30\x3A\x30\x30","","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x20\x41\x53\x20\x27\x6E\x61\x6D\x65\x27\x2C\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x3D\x27\x25\x73\x27\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65","\x66\x6F\x72\x6D\x61\x74","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x71\x75\x65\x72\x79","\x54\x41\x4C\x4B\x54\x49\x4D\x45\x20\x45\x52\x52\x4F\x52","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x20\x41\x53\x20\x27\x6E\x61\x6D\x65\x27\x2C\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x74\x61\x6C\x6B\x74\x69\x6D\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x3D\x27\x25\x73\x27\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65","\x54\x4F\x54\x41\x4C\x43\x41\x4C\x4C\x53\x20\x45\x52\x52\x4F\x52","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x20\x41\x53\x20\x27\x6E\x61\x6D\x65\x27\x2C\x43\x4F\x55\x4E\x54\x28\x64\x69\x73\x74\x69\x6E\x63\x74\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x20\x61\x73\x20\x74\x6F\x74\x61\x6C\x63\x61\x6C\x6C\x73\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x20\x3D\x27\x25\x73\x27\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44\x20\x45\x52\x52\x4F\x52","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64"];_0x4545[0];var sequelize=require(_0x4545[2])[_0x4545[1]];var models=require(_0x4545[2]);var Util=require(_0x4545[3]);var Promise=require(_0x4545[4]);var _=require(_0x4545[5]);var util=require(_0x4545[6]);exports[_0x4545[7]]= function(_0xa4cdx7){models[_0x4545[9]][_0x4545[8]](function(_0xa4cdx8){onWaiting(_0xa4cdx7,_0xa4cdx8)});models[_0x4545[9]][_0x4545[12]](function(_0xa4cdx8){if(_0xa4cdx8[_0x4545[11]](_0x4545[10])){onWaiting(_0xa4cdx7,_0xa4cdx8);onActive(_0xa4cdx7,_0xa4cdx8)}});models[_0x4545[9]][_0x4545[12]](function(_0xa4cdx8){if(_0xa4cdx8[_0x4545[11]](_0x4545[13])|| _0xa4cdx8[_0x4545[11]](_0x4545[14])){onAbandon(_0xa4cdx7,_0xa4cdx8);onComplete(_0xa4cdx7,_0xa4cdx8);onActive(_0xa4cdx7,_0xa4cdx8);onAvgAnswerTime(_0xa4cdx7,_0xa4cdx8);onAvgTalkTime(_0xa4cdx7,_0xa4cdx8);onTotalOffered(_0xa4cdx7,_0xa4cdx8);onUnmanaged(_0xa4cdx7,_0xa4cdx8)}})};function getQueues(_0xa4cdxa,_0xa4cdxb){return function(){switch(_0xa4cdxb){case _0x4545[20]:return models[_0x4545[19]][_0x4545[18]](_0xa4cdxa,{attributes:[_0x4545[17]]})[_0x4545[16]](Util[_0x4545[15]]());default:return models[_0x4545[22]][_0x4545[21]]()[_0x4545[16]](function(_0xa4cdxc){return {rows:_0xa4cdxc}})}}}function onWaiting(_0xa4cdx7,_0xa4cdx8){return Promise[_0x4545[40]]([])[_0x4545[16]](getQueues(_0xa4cdx7[_0x4545[38]],_0xa4cdx7[_0x4545[39]]))[_0x4545[16]](function(_0xa4cdx11){if(_0xa4cdx11[_0x4545[31]][_0x4545[26]]){return models[_0x4545[9]][_0x4545[21]]({where:{queuecallerleaveAt:null,queue:_[_0x4545[32]](_0xa4cdx11[_0x4545[31]],{name:_0xa4cdx8[_0x4545[28]]})?_0xa4cdx8[_0x4545[28]]:[]},group:_0x4545[28],attributes:[[_0x4545[28],_0x4545[33]],[sequelize[_0x4545[36]](_0x4545[34],sequelize[_0x4545[35]](_0x4545[17])),_0x4545[37]]]})};return null})[_0x4545[16]](function(_0xa4cdxf){if(_0xa4cdxf){var _0xa4cdx10;if(_0xa4cdxf[_0x4545[26]]){_0xa4cdx10= _0xa4cdxf[0][_0x4545[27]]}else {_0xa4cdx10= {name:_0xa4cdx8[_0x4545[28]],waiting:0}};_0xa4cdx7[_0x4545[30]](_0x4545[29],_0xa4cdx10)}})[_0x4545[25]](function(_0xa4cdxe){console[_0x4545[24]](_0x4545[23],_0xa4cdxe)})}function onActive(_0xa4cdx7,_0xa4cdx8){return Promise[_0x4545[40]]([])[_0x4545[16]](getQueues(_0xa4cdx7[_0x4545[38]],_0xa4cdx7[_0x4545[39]]))[_0x4545[16]](function(_0xa4cdx11){if(_0xa4cdx11[_0x4545[31]][_0x4545[26]]){return models[_0x4545[9]][_0x4545[21]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null},queue:_[_0x4545[32]](_0xa4cdx11[_0x4545[31]],{name:_0xa4cdx8[_0x4545[28]]})?_0xa4cdx8[_0x4545[28]]:[]},group:_0x4545[28],attributes:[[_0x4545[28],_0x4545[33]],[sequelize[_0x4545[36]](_0x4545[34],sequelize[_0x4545[35]](_0x4545[17])),_0x4545[42]]]})};return null})[_0x4545[16]](function(_0xa4cdx13){if(_0xa4cdx13){var _0xa4cdx10;if(_0xa4cdx13[_0x4545[26]]){_0xa4cdx10= _0xa4cdx13[0][_0x4545[27]]}else {_0xa4cdx10= {name:_0xa4cdx8[_0x4545[28]],active:0}};_0xa4cdx7[_0x4545[30]](_0x4545[29],_0xa4cdx10)}})[_0x4545[25]](function(_0xa4cdxe){console[_0x4545[24]](_0x4545[41],_0xa4cdxe)})}function onAbandon(_0xa4cdx7,_0xa4cdx8){return Promise[_0x4545[40]]([])[_0x4545[16]](getQueues(_0xa4cdx7[_0x4545[38]],_0xa4cdx7[_0x4545[39]]))[_0x4545[16]](function(_0xa4cdx11){if(_0xa4cdx11[_0x4545[31]][_0x4545[26]]){return models[_0x4545[9]][_0x4545[21]]({where:{queuecallerabandon:true,queue:_[_0x4545[32]](_0xa4cdx11[_0x4545[31]],{name:_0xa4cdx8[_0x4545[28]]})?_0xa4cdx8[_0x4545[28]]:[]},group:_0x4545[28],attributes:[[_0x4545[28],_0x4545[33]],[sequelize[_0x4545[36]](_0x4545[34],sequelize[_0x4545[35]](_0x4545[17])),_0x4545[44]]]})};return null})[_0x4545[16]](function(_0xa4cdx15){if(_0xa4cdx15){var _0xa4cdx10;if(_0xa4cdx15[_0x4545[26]]){_0xa4cdx10= _0xa4cdx15[0][_0x4545[27]]}else {_0xa4cdx10= {name:_0xa4cdx8[_0x4545[28]],abandoned:0}};_0xa4cdx7[_0x4545[30]](_0x4545[29],_0xa4cdx10)}})[_0x4545[25]](function(_0xa4cdxe){console[_0x4545[24]](_0x4545[43],_0xa4cdxe)})}function onComplete(_0xa4cdx7,_0xa4cdx8){return Promise[_0x4545[40]]([])[_0x4545[16]](getQueues(_0xa4cdx7[_0x4545[38]],_0xa4cdx7[_0x4545[39]]))[_0x4545[16]](function(_0xa4cdx11){if(_0xa4cdx11[_0x4545[31]][_0x4545[26]]){return models[_0x4545[9]][_0x4545[21]]({where:{queuecallercomplete:true,queue:_[_0x4545[32]](_0xa4cdx11[_0x4545[31]],{name:_0xa4cdx8[_0x4545[28]]})?_0xa4cdx8[_0x4545[28]]:[]},group:_0x4545[28],attributes:[[_0x4545[28],_0x4545[33]],[sequelize[_0x4545[36]](_0x4545[34],sequelize[_0x4545[35]](_0x4545[17])),_0x4545[46]]]})};return null})[_0x4545[16]](function(_0xa4cdx17){if(_0xa4cdx17){var _0xa4cdx10;if(_0xa4cdx17[_0x4545[26]]){_0xa4cdx10= _0xa4cdx17[0][_0x4545[27]]}else {_0xa4cdx10= {name:_0xa4cdx8[_0x4545[28]],answered:0}};_0xa4cdx7[_0x4545[30]](_0x4545[29],_0xa4cdx10)}})[_0x4545[25]](function(_0xa4cdxe){console[_0x4545[24]](_0x4545[45],_0xa4cdxe)})}function onAvgAnswerTime(_0xa4cdx7,_0xa4cdx8){return Promise[_0x4545[40]]([])[_0x4545[16]](getQueues(_0xa4cdx7[_0x4545[38]],_0xa4cdx7[_0x4545[39]]))[_0x4545[16]](function(_0xa4cdx11){if(_0xa4cdx11[_0x4545[31]][_0x4545[26]]){var _0xa4cdx1a=_[_0x4545[32]](_0xa4cdx11[_0x4545[31]],{name:_0xa4cdx8[_0x4545[28]]})?_0xa4cdx8[_0x4545[28]]:_0x4545[49];var _0xa4cdx1b=util[_0x4545[51]](_0x4545[50],_0xa4cdx1a);return sequelize[_0x4545[54]](_0xa4cdx1b,{type:sequelize[_0x4545[53]][_0x4545[52]]})};return null})[_0x4545[16]](function(_0xa4cdx19){if(_0xa4cdx19){var _0xa4cdx10;if(_0xa4cdx19[_0x4545[26]]){_0xa4cdx10= _0xa4cdx19[0]}else {_0xa4cdx10= {name:_0xa4cdx8[_0x4545[28]],holdtime:_0x4545[48]}};_0xa4cdx7[_0x4545[30]](_0x4545[29],_0xa4cdx10)}})[_0x4545[25]](function(_0xa4cdxe){console[_0x4545[24]](_0x4545[47],_0xa4cdxe)})}function onAvgTalkTime(_0xa4cdx7,_0xa4cdx8){return Promise[_0x4545[40]]([])[_0x4545[16]](getQueues(_0xa4cdx7[_0x4545[38]],_0xa4cdx7[_0x4545[39]]))[_0x4545[16]](function(_0xa4cdx11){if(_0xa4cdx11[_0x4545[31]][_0x4545[26]]){var _0xa4cdx1a=_[_0x4545[32]](_0xa4cdx11[_0x4545[31]],{name:_0xa4cdx8[_0x4545[28]]})?_0xa4cdx8[_0x4545[28]]:_0x4545[49];return sequelize[_0x4545[54]](util[_0x4545[51]](_0x4545[56],_0xa4cdx1a),{type:sequelize[_0x4545[53]][_0x4545[52]]})};return null})[_0x4545[16]](function(_0xa4cdx1d){if(_0xa4cdx1d){var _0xa4cdx10;if(_0xa4cdx1d[_0x4545[26]]){_0xa4cdx10= _0xa4cdx1d[0]}else {_0xa4cdx10= {name:_0xa4cdx8[_0x4545[28]],talktime:_0x4545[48]}};_0xa4cdx7[_0x4545[30]](_0x4545[29],_0xa4cdx10)}})[_0x4545[25]](function(_0xa4cdxe){console[_0x4545[24]](_0x4545[55],_0xa4cdxe)})}function onTotalOffered(_0xa4cdx7,_0xa4cdx8){return Promise[_0x4545[40]]([])[_0x4545[16]](getQueues(_0xa4cdx7[_0x4545[38]],_0xa4cdx7[_0x4545[39]]))[_0x4545[16]](function(_0xa4cdx11){if(_0xa4cdx11[_0x4545[31]][_0x4545[26]]){var _0xa4cdx1a=_[_0x4545[32]](_0xa4cdx11[_0x4545[31]],{name:_0xa4cdx8[_0x4545[28]]})?_0xa4cdx8[_0x4545[28]]:_0x4545[49];return sequelize[_0x4545[54]](util[_0x4545[51]](_0x4545[58],_0xa4cdx1a),{type:sequelize[_0x4545[53]][_0x4545[52]]})};return null})[_0x4545[16]](function(_0xa4cdx1f){if(_0xa4cdx1f){var _0xa4cdx10;if(_0xa4cdx1f[_0x4545[26]]){_0xa4cdx10= _0xa4cdx1f[0]}else {_0xa4cdx10= {name:_0xa4cdx8[_0x4545[28]],totalcalls:0}};_0xa4cdx7[_0x4545[30]](_0x4545[29],_0xa4cdx10)}})[_0x4545[25]](function(_0xa4cdxe){console[_0x4545[24]](_0x4545[57],_0xa4cdxe)})}function onUnmanaged(_0xa4cdx7,_0xa4cdx8){return Promise[_0x4545[40]]([])[_0x4545[16]](getQueues(_0xa4cdx7[_0x4545[38]],_0xa4cdx7[_0x4545[39]]))[_0x4545[16]](function(_0xa4cdx11){if(_0xa4cdx11[_0x4545[31]][_0x4545[26]]){return models[_0x4545[9]][_0x4545[21]]({where:{queuecallerexit:true,queue:_[_0x4545[32]](_0xa4cdx11[_0x4545[31]],{name:_0xa4cdx8[_0x4545[28]]})?_0xa4cdx8[_0x4545[28]]:[]},group:_0x4545[28],attributes:[[_0x4545[28],_0x4545[33]],[sequelize[_0x4545[36]](_0x4545[34],sequelize[_0x4545[35]](_0x4545[17])),_0x4545[60]]]})};return null})[_0x4545[16]](function(_0xa4cdx21){if(_0xa4cdx21){var _0xa4cdx10;if(_0xa4cdx21[_0x4545[26]]){_0xa4cdx10= _0xa4cdx21[0][_0x4545[27]]}else {_0xa4cdx10= {name:_0xa4cdx8[_0x4545[28]],_parameters:0}};_0xa4cdx7[_0x4545[30]](_0x4545[29],_0xa4cdx10)}})[_0x4545[25]](function(_0xa4cdxe){console[_0x4545[24]](_0x4545[59],_0xa4cdxe)})}
\ No newline at end of file
diff --git a/server/config/tools/smsRoom.js b/server/config/tools/smsRoom.js
index 632af77..578a63a 100644
--- a/server/config/tools/smsRoom.js
+++ b/server/config/tools/smsRoom.js
@@ -1,26 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const moment = require('moment');
-
-const Room = require('../../models').SmsRoom;
-const Status = require('../../models').SmsRoomStatus;
-
-function SmsRoom() {
-  Room.afterCreate(function(doc, opt) {});
-
-  Room.afterUpdate(function(doc, opt) {
-    if (doc.changed('status') || doc.changed('openReason')) {
-      return Status
-        .create({
-          status: doc.status,
-          data1: opt.user ? opt.user.name : null,
-          data2: opt.user ? opt.user.fullname : null,
-          SmsRoomId: doc.id,
-          UserId: opt.user ? opt.user.id : null
-        });
-    }
-  });
-}
-
-module.exports = SmsRoom;
+var _0x9dd4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x53\x6D\x73\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x6F\x70\x65\x6E\x52\x65\x61\x73\x6F\x6E","\x75\x73\x65\x72","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x69\x64","\x63\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9dd4[0];const _=require(_0x9dd4[1]);const moment=require(_0x9dd4[2]);const Room=require(_0x9dd4[4])[_0x9dd4[3]];const Status=require(_0x9dd4[4])[_0x9dd4[5]];function SmsRoom(){Room[_0x9dd4[6]](function(_0xeb7ax6,_0xeb7ax7){});Room[_0x9dd4[15]](function(_0xeb7ax6,_0xeb7ax7){if(_0xeb7ax6[_0x9dd4[8]](_0x9dd4[7])|| _0xeb7ax6[_0x9dd4[8]](_0x9dd4[9])){return Status[_0x9dd4[14]]({status:_0xeb7ax6[_0x9dd4[7]],data1:_0xeb7ax7[_0x9dd4[10]]?_0xeb7ax7[_0x9dd4[10]][_0x9dd4[11]]:null,data2:_0xeb7ax7[_0x9dd4[10]]?_0xeb7ax7[_0x9dd4[10]][_0x9dd4[12]]:null,SmsRoomId:_0xeb7ax6[_0x9dd4[13]],UserId:_0xeb7ax7[_0x9dd4[10]]?_0xeb7ax7[_0x9dd4[10]][_0x9dd4[13]]:null})}})}module[_0x9dd4[16]]= SmsRoom
\ No newline at end of file
diff --git a/server/config/tools/system.js b/server/config/tools/system.js
index ee4b3d3..59cf9ea 100644
--- a/server/config/tools/system.js
+++ b/server/config/tools/system.js
@@ -1,60 +1 @@
-'use strict';
-
-var Promise = require('bluebird'),
-  _ = require('lodash'),
-  pidStat = Promise.promisify(require('pidusage').stat),
-  os = require('os'),
-  df = Promise.promisify(require('node-df'));
-
-exports.checkStatus = function() {
-  return function() {
-    var stats = {};
-    return pidStat(process.pid)
-      .then(function(stat) {
-        stats.cpu = {
-          motion: stat.cpu
-        };
-        var motionMem = stat.memory / 1024;
-        stats.memory = {
-          Total: os.totalmem() / 1024,
-          details: {}
-        };
-        stats.memory.details.Free = os.freemem() / 1024;
-        stats.memory.details.Other = stats.memory.Total - motionMem - stats.memory.details.Free;
-        stats.memory.details.Motion = motionMem;
-        stats.cpu.cores = oscpu();
-        return df();
-      })
-      .then(function(disks) {
-        stats.disks = [];
-        _.forEach(disks, function(disk) {
-          stats.disks.push({
-            mount: disk.mount,
-            size: disk.size,
-            details: {
-              Used: disk.used,
-              Available: disk.available
-            }
-          });
-        });
-        return stats;
-      });
-  }
-}
-
-function oscpu() {
-  var cpus = os.cpus();
-  var data = [],
-    _cpu, total;
-
-  _.forEach(cpus, function(cpu) {
-    _cpu = {};
-    total = _.sum(_.values(cpu.times));
-    _.forOwn(cpu.times, function(time, key) {
-      _cpu[key] = Math.round(100 * time / total);
-    });
-    data.push(_cpu);
-  });
-
-  return data;
-}
+var _0xbe40=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x73\x74\x61\x74","\x70\x69\x64\x75\x73\x61\x67\x65","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x6F\x73","\x6E\x6F\x64\x65\x2D\x64\x66","\x63\x68\x65\x63\x6B\x53\x74\x61\x74\x75\x73","\x64\x69\x73\x6B\x73","\x6D\x6F\x75\x6E\x74","\x73\x69\x7A\x65","\x75\x73\x65\x64","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x63\x70\x75","\x6D\x65\x6D\x6F\x72\x79","\x74\x6F\x74\x61\x6C\x6D\x65\x6D","\x46\x72\x65\x65","\x64\x65\x74\x61\x69\x6C\x73","\x66\x72\x65\x65\x6D\x65\x6D","\x4F\x74\x68\x65\x72","\x54\x6F\x74\x61\x6C","\x4D\x6F\x74\x69\x6F\x6E","\x63\x6F\x72\x65\x73","\x70\x69\x64","\x63\x70\x75\x73","\x74\x69\x6D\x65\x73","\x76\x61\x6C\x75\x65\x73","\x73\x75\x6D","\x72\x6F\x75\x6E\x64","\x66\x6F\x72\x4F\x77\x6E"];_0xbe40[0];var Promise=require(_0xbe40[1]),_=require(_0xbe40[2]),pidStat=Promise[_0xbe40[5]](require(_0xbe40[4])[_0xbe40[3]]),os=require(_0xbe40[6]),df=Promise[_0xbe40[5]](require(_0xbe40[7]));exports[_0xbe40[8]]= function(){return function(){var _0x79f6x6={};return pidStat(process[_0xbe40[27]])[_0xbe40[16]](function(_0x79f6x9){_0x79f6x6[_0xbe40[17]]= {motion:_0x79f6x9[_0xbe40[17]]};var _0x79f6xa=_0x79f6x9[_0xbe40[18]]/ 1024;_0x79f6x6[_0xbe40[18]]= {Total:os[_0xbe40[19]]()/ 1024,details:{}};_0x79f6x6[_0xbe40[18]][_0xbe40[21]][_0xbe40[20]]= os[_0xbe40[22]]()/ 1024;_0x79f6x6[_0xbe40[18]][_0xbe40[21]][_0xbe40[23]]= _0x79f6x6[_0xbe40[18]][_0xbe40[24]]- _0x79f6xa- _0x79f6x6[_0xbe40[18]][_0xbe40[21]][_0xbe40[20]];_0x79f6x6[_0xbe40[18]][_0xbe40[21]][_0xbe40[25]]= _0x79f6xa;_0x79f6x6[_0xbe40[17]][_0xbe40[26]]= oscpu();return df()})[_0xbe40[16]](function(_0x79f6x7){_0x79f6x6[_0xbe40[9]]= [];_[_0xbe40[15]](_0x79f6x7,function(_0x79f6x8){_0x79f6x6[_0xbe40[9]][_0xbe40[14]]({mount:_0x79f6x8[_0xbe40[10]],size:_0x79f6x8[_0xbe40[11]],details:{Used:_0x79f6x8[_0xbe40[12]],Available:_0x79f6x8[_0xbe40[13]]}})});return _0x79f6x6})}};function oscpu(){var _0x79f6xc=os[_0xbe40[28]]();var _0x79f6xd=[],_0x79f6xe,_0x79f6xf;_[_0xbe40[15]](_0x79f6xc,function(_0x79f6x10){_0x79f6xe= {};_0x79f6xf= _[_0xbe40[31]](_[_0xbe40[30]](_0x79f6x10[_0xbe40[29]]));_[_0xbe40[33]](_0x79f6x10[_0xbe40[29]],function(_0x79f6x11,_0x79f6x12){_0x79f6xe[_0x79f6x12]= Math[_0xbe40[32]](100* _0x79f6x11/ _0x79f6xf)});_0x79f6xd[_0xbe40[14]](_0x79f6xe)});return _0x79f6xd}
\ No newline at end of file
diff --git a/server/config/tools/user.js b/server/config/tools/user.js
index 50b0908..8a46a6c 100644
--- a/server/config/tools/user.js
+++ b/server/config/tools/user.js
@@ -1,219 +1 @@
-'use strict';
-
-var fs = require('fs');
-var util = require('util');
-var path = require('path');
-var config = require('../../config/environment');
-var UserModel = require('../../models').User;
-var VoiceExtension = require('../../models').VoiceExtension;
-var ChanSpy = require('../../models').ChanSpy;
-var sequelize = require('../../models').sequelize;
-var Promise = require('bluebird');
-
-function User() {
-  UserModel.afterCreate(function(doc, options) {
-    delete doc._changed.internal;
-    return Promise
-      .all([])
-      .then(createCallerID(doc, options))
-      .then(createExtension(doc, options))
-      .then(function() {
-        if (doc.chanspy) {
-          createChanspy(doc, options);
-        }
-      })
-  })
-
-  UserModel.beforeUpdate(function(doc, options) {
-    if (doc.changed('internal')) {
-      throw new sequelize.Error("You can't modify the internal of a User/Agent/Telephone");
-    }
-  })
-
-  UserModel.afterUpdate(function(doc, options) {
-    // console.log('Users updated', doc._changed);
-    // console.log(doc._changed, doc.name, doc.status);
-    if (!doc.changed('status') && !doc.changed('queueStatus') && !doc.changed('callerid') && !doc.changed('lastLoginAt') && !doc.changed('online')) {
-      return Promise
-        .all([])
-        .then(createCallerID(doc, options))
-        .then(function() {
-          if ((doc.chanspy && doc.changed('chanspy'))) {
-            return createChanspy(doc, options);
-          }
-        })
-        .then(function() {
-          if (doc.chanspy && !doc.changed('chanspy') && doc.changed('name')) {
-            return deleteChanSpy(doc, options);
-          }
-        })
-        .then(function() {
-          if (doc.chanspy && !doc.changed('chanspy') && doc.changed('name')) {
-            return createChanspy(doc, options);
-          }
-        })
-        .then(function() {
-          if (!doc.chanspy && doc.changed('chanspy')) {
-            return deleteChanSpy(doc, options);
-          }
-        })
-    }
-  })
-}
-
-function createChanspy(doc, options) {
-  console.log('Creating chanspy...');
-  return ChanSpy
-    .findAll()
-    .then(function(chanspy) {
-      var bulkSpies = [];
-      chanspy.forEach(function(elem) {
-        var spies = [];
-        var priority = 1;
-        if (elem.auth) {
-          spies.push({
-            context: 'from-sip',
-            exten: util.format('%s%s', elem.prefix, doc.name),
-            priority: priority,
-            app: 'Authenticate',
-            appdata: elem.password,
-            UserId: doc.id,
-            ChanSpyId: elem.id,
-            type: 'system'
-          });
-          priority++;
-        }
-        spies.push({
-          context: 'from-sip',
-          exten: util.format('%s%s', elem.prefix, doc.name),
-          priority: priority,
-          app: 'ChanSpy',
-          appdata: util.format('SIP/%s,%s', doc.name, elem.options),
-          UserId: doc.id,
-          ChanSpyId: elem.id,
-          type: 'system'
-        });
-        priority = 1;
-        if (elem.auth) {
-          spies.push({
-            context: 'from-sip',
-            exten: util.format('%s%s', elem.prefix, doc.internal),
-            priority: priority,
-            app: 'Authenticate',
-            appdata: elem.password,
-            UserId: doc.id,
-            ChanSpyId: elem.id,
-            type: 'system'
-          });
-          priority++;
-        }
-        spies.push({
-          context: 'from-sip',
-          exten: util.format('%s%s', elem.prefix, doc.internal),
-          priority: priority,
-          app: 'ChanSpy',
-          appdata: util.format('SIP/%s,%s', doc.name, elem.options),
-          UserId: doc.id,
-          ChanSpyId: elem.id,
-          type: 'system'
-        });
-        bulkSpies.push(VoiceExtension.bulkCreate(spies, {
-          transaction: options.transaction
-        }));
-      });
-      return bulkSpies;
-    })
-    .all();
-}
-
-function deleteChanSpy(doc, options) {
-  console.log('Deleting chanspy...');
-  return VoiceExtension
-    .destroy({
-      where: {
-        UserId: doc.id,
-        ChanSpyId: {
-          $ne: null
-        }
-      },
-      transaction: options.transaction
-    });
-}
-
-function createCallerID(doc, options) {
-  return function() {
-    // devo aspettare che ci siano entrambi i campi
-    if (doc.fullname && doc.internal && doc.changed('fullname')) {
-      console.log('Creating callerID...');
-      doc.callerid = util.format('"%s" <%s>', doc.fullname, doc.internal);
-      return doc.save({
-        transaction: options.transaction
-      });
-      // console.log('callerid created');
-    }
-
-    return;
-  }
-}
-
-function createExtension(doc, options) {
-  console.log('Creating extension...');
-  return function() {
-    var userDials = [{
-      context: 'from-sip',
-      exten: '_' + doc.internal,
-      priority: 1,
-      app: 'Set',
-      appdata: 'CDR(type)=internal',
-      UserId: doc.id,
-      type: 'system'
-    }, {
-      context: 'from-sip',
-      exten: '_' + doc.internal,
-      priority: 2,
-      app: 'Dial',
-      appdata: 'SIP/' + doc.name + ',,tTxX',
-      UserId: doc.id,
-      type: 'system'
-    }, {
-      context: 'from-sip',
-      exten: '_' + doc.internal,
-      priority: 3,
-      app: 'Hangup',
-      appdata: '',
-      UserId: doc.id,
-      type: 'system'
-    }, {
-      context: 'from-sip',
-      exten: doc.name,
-      priority: 1,
-      app: 'Set',
-      appdata: 'CDR(type)=internal',
-      UserId: doc.id,
-      type: 'system'
-    }, {
-      context: 'from-sip',
-      exten: doc.name,
-      priority: 2,
-      app: 'Dial',
-      appdata: 'SIP/' + doc.name + ',,tTxX',
-      UserId: doc.id,
-      type: 'system'
-    }, {
-      context: 'from-sip',
-      exten: doc.name,
-      priority: 3,
-      app: 'Hangup',
-      appdata: '',
-      UserId: doc.id,
-      type: 'system'
-    }];
-
-    return VoiceExtension
-      .bulkCreate(userDials, {
-        transaction: options.transaction
-      })
-  }
-}
-
-module.exports = User;
+var _0xd024=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x43\x68\x61\x6E\x53\x70\x79","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x5F\x63\x68\x61\x6E\x67\x65\x64","\x63\x68\x61\x6E\x73\x70\x79","\x74\x68\x65\x6E","\x61\x6C\x6C","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x6D\x6F\x64\x69\x66\x79\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x72\x6E\x61\x6C\x20\x6F\x66\x20\x61\x20\x55\x73\x65\x72\x2F\x41\x67\x65\x6E\x74\x2F\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x62\x65\x66\x6F\x72\x65\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x6C\x61\x73\x74\x4C\x6F\x67\x69\x6E\x41\x74","\x6F\x6E\x6C\x69\x6E\x65","\x6E\x61\x6D\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x63\x68\x61\x6E\x73\x70\x79\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x75\x74\x68","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x25\x73\x25\x73","\x70\x72\x65\x66\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x69\x64","\x73\x79\x73\x74\x65\x6D","\x70\x75\x73\x68","\x53\x49\x50\x2F\x25\x73\x2C\x25\x73","\x6F\x70\x74\x69\x6F\x6E\x73","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x44\x65\x6C\x65\x74\x69\x6E\x67\x20\x63\x68\x61\x6E\x73\x70\x79\x2E\x2E\x2E","\x64\x65\x73\x74\x72\x6F\x79","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x63\x61\x6C\x6C\x65\x72\x49\x44\x2E\x2E\x2E","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x73\x61\x76\x65","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x2E\x2E","\x5F","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x44\x69\x61\x6C","\x53\x49\x50\x2F","\x2C\x2C\x74\x54\x78\x58","\x48\x61\x6E\x67\x75\x70","","\x65\x78\x70\x6F\x72\x74\x73"];_0xd024[0];var fs=require(_0xd024[1]);var util=require(_0xd024[2]);var path=require(_0xd024[3]);var config=require(_0xd024[4]);var UserModel=require(_0xd024[6])[_0xd024[5]];var VoiceExtension=require(_0xd024[6])[_0xd024[7]];var ChanSpy=require(_0xd024[6])[_0xd024[8]];var sequelize=require(_0xd024[6])[_0xd024[9]];var Promise=require(_0xd024[10]);function User(){UserModel[_0xd024[16]](function(_0xacdexb,_0xacdexc){delete _0xacdexb[_0xd024[12]][_0xd024[11]];return Promise[_0xd024[15]]([])[_0xd024[14]](createCallerID(_0xacdexb,_0xacdexc))[_0xd024[14]](createExtension(_0xacdexb,_0xacdexc))[_0xd024[14]](function(){if(_0xacdexb[_0xd024[13]]){createChanspy(_0xacdexb,_0xacdexc)}})});UserModel[_0xd024[19]](function(_0xacdexb,_0xacdexc){if(_0xacdexb[_0xd024[17]](_0xd024[11])){throw  new sequelize.Error(_0xd024[18])}});UserModel[_0xd024[26]](function(_0xacdexb,_0xacdexc){if(!_0xacdexb[_0xd024[17]](_0xd024[20])&& !_0xacdexb[_0xd024[17]](_0xd024[21])&& !_0xacdexb[_0xd024[17]](_0xd024[22])&& !_0xacdexb[_0xd024[17]](_0xd024[23])&& !_0xacdexb[_0xd024[17]](_0xd024[24])){return Promise[_0xd024[15]]([])[_0xd024[14]](createCallerID(_0xacdexb,_0xacdexc))[_0xd024[14]](function(){if((_0xacdexb[_0xd024[13]]&& _0xacdexb[_0xd024[17]](_0xd024[13]))){return createChanspy(_0xacdexb,_0xacdexc)}})[_0xd024[14]](function(){if(_0xacdexb[_0xd024[13]]&& !_0xacdexb[_0xd024[17]](_0xd024[13])&& _0xacdexb[_0xd024[17]](_0xd024[25])){return deleteChanSpy(_0xacdexb,_0xacdexc)}})[_0xd024[14]](function(){if(_0xacdexb[_0xd024[13]]&& !_0xacdexb[_0xd024[17]](_0xd024[13])&& _0xacdexb[_0xd024[17]](_0xd024[25])){return createChanspy(_0xacdexb,_0xacdexc)}})[_0xd024[14]](function(){if(!_0xacdexb[_0xd024[13]]&& _0xacdexb[_0xd024[17]](_0xd024[13])){return deleteChanSpy(_0xacdexb,_0xacdexc)}})}})}function createChanspy(_0xacdexb,_0xacdexc){console[_0xd024[28]](_0xd024[27]);return ChanSpy[_0xd024[44]]()[_0xd024[14]](function(_0xacdexe){var _0xacdexf=[];_0xacdexe[_0xd024[43]](function(_0xacdex10){var _0xacdex11=[];var _0xacdex12=1;if(_0xacdex10[_0xd024[29]]){_0xacdex11[_0xd024[38]]({context:_0xd024[30],exten:util[_0xd024[33]](_0xd024[31],_0xacdex10[_0xd024[32]],_0xacdexb[_0xd024[25]]),priority:_0xacdex12,app:_0xd024[34],appdata:_0xacdex10[_0xd024[35]],UserId:_0xacdexb[_0xd024[36]],ChanSpyId:_0xacdex10[_0xd024[36]],type:_0xd024[37]});_0xacdex12++};_0xacdex11[_0xd024[38]]({context:_0xd024[30],exten:util[_0xd024[33]](_0xd024[31],_0xacdex10[_0xd024[32]],_0xacdexb[_0xd024[25]]),priority:_0xacdex12,app:_0xd024[8],appdata:util[_0xd024[33]](_0xd024[39],_0xacdexb[_0xd024[25]],_0xacdex10[_0xd024[40]]),UserId:_0xacdexb[_0xd024[36]],ChanSpyId:_0xacdex10[_0xd024[36]],type:_0xd024[37]});_0xacdex12= 1;if(_0xacdex10[_0xd024[29]]){_0xacdex11[_0xd024[38]]({context:_0xd024[30],exten:util[_0xd024[33]](_0xd024[31],_0xacdex10[_0xd024[32]],_0xacdexb[_0xd024[11]]),priority:_0xacdex12,app:_0xd024[34],appdata:_0xacdex10[_0xd024[35]],UserId:_0xacdexb[_0xd024[36]],ChanSpyId:_0xacdex10[_0xd024[36]],type:_0xd024[37]});_0xacdex12++};_0xacdex11[_0xd024[38]]({context:_0xd024[30],exten:util[_0xd024[33]](_0xd024[31],_0xacdex10[_0xd024[32]],_0xacdexb[_0xd024[11]]),priority:_0xacdex12,app:_0xd024[8],appdata:util[_0xd024[33]](_0xd024[39],_0xacdexb[_0xd024[25]],_0xacdex10[_0xd024[40]]),UserId:_0xacdexb[_0xd024[36]],ChanSpyId:_0xacdex10[_0xd024[36]],type:_0xd024[37]});_0xacdexf[_0xd024[38]](VoiceExtension[_0xd024[42]](_0xacdex11,{transaction:_0xacdexc[_0xd024[41]]}))});return _0xacdexf})[_0xd024[15]]()}function deleteChanSpy(_0xacdexb,_0xacdexc){console[_0xd024[28]](_0xd024[45]);return VoiceExtension[_0xd024[46]]({where:{UserId:_0xacdexb[_0xd024[36]],ChanSpyId:{$ne:null}},transaction:_0xacdexc[_0xd024[41]]})}function createCallerID(_0xacdexb,_0xacdexc){return function(){if(_0xacdexb[_0xd024[47]]&& _0xacdexb[_0xd024[11]]&& _0xacdexb[_0xd024[17]](_0xd024[47])){console[_0xd024[28]](_0xd024[48]);_0xacdexb[_0xd024[22]]= util[_0xd024[33]](_0xd024[49],_0xacdexb[_0xd024[47]],_0xacdexb[_0xd024[11]]);return _0xacdexb[_0xd024[50]]({transaction:_0xacdexc[_0xd024[41]]})};return}}function createExtension(_0xacdexb,_0xacdexc){console[_0xd024[28]](_0xd024[51]);return function(){var _0xacdex16=[{context:_0xd024[30],exten:_0xd024[52]+ _0xacdexb[_0xd024[11]],priority:1,app:_0xd024[53],appdata:_0xd024[54],UserId:_0xacdexb[_0xd024[36]],type:_0xd024[37]},{context:_0xd024[30],exten:_0xd024[52]+ _0xacdexb[_0xd024[11]],priority:2,app:_0xd024[55],appdata:_0xd024[56]+ _0xacdexb[_0xd024[25]]+ _0xd024[57],UserId:_0xacdexb[_0xd024[36]],type:_0xd024[37]},{context:_0xd024[30],exten:_0xd024[52]+ _0xacdexb[_0xd024[11]],priority:3,app:_0xd024[58],appdata:_0xd024[59],UserId:_0xacdexb[_0xd024[36]],type:_0xd024[37]},{context:_0xd024[30],exten:_0xacdexb[_0xd024[25]],priority:1,app:_0xd024[53],appdata:_0xd024[54],UserId:_0xacdexb[_0xd024[36]],type:_0xd024[37]},{context:_0xd024[30],exten:_0xacdexb[_0xd024[25]],priority:2,app:_0xd024[55],appdata:_0xd024[56]+ _0xacdexb[_0xd024[25]]+ _0xd024[57],UserId:_0xacdexb[_0xd024[36]],type:_0xd024[37]},{context:_0xd024[30],exten:_0xacdexb[_0xd024[25]],priority:3,app:_0xd024[58],appdata:_0xd024[59],UserId:_0xacdexb[_0xd024[36]],type:_0xd024[37]}];return VoiceExtension[_0xd024[42]](_0xacdex16,{transaction:_0xacdexc[_0xd024[41]]})}}module[_0xd024[60]]= User
\ No newline at end of file
diff --git a/server/config/triggers/chat.js b/server/config/triggers/chat.js
index 964d4ad..0260fd4 100644
--- a/server/config/triggers/chat.js
+++ b/server/config/triggers/chat.js
@@ -1,141 +1 @@
-'use strict';
-
-const _ = require('lodash');
-const rp = require('request-promise');
-const Mustache = require('mustache');
-
-const Template = require('../../models').Template;
-const ChatRoom = require('../../models').ChatRoom;
-const ChatEnquiry = require('../../models').ChatEnquiry;
-const ChatWebsite = require('../../models').ChatWebsite;
-const MailMessage = require('../../models').MailMessage;
-const MailAccount = require('../../models').MailAccount;
-const MailServerOut = require('../../models').MailServerOut;
-
-function Chat() {
-  console.log('Trigger Chat Initialization...');
-
-  ChatEnquiry.afterCreate(function(chatEnquiry, options) {
-    var _chatEnquiry = chatEnquiry;
-    var _chatWebsite;
-    var _mailServerOut;
-    var _offlineTemplate;
-
-    console.log('[Chat] New Enquiry', chatEnquiry.id);
-
-    return ChatWebsite
-      .findById(chatEnquiry.ChatWebsiteId)
-      .then(function(chatWebsite) {
-        _chatWebsite = chatWebsite;
-        _chatEnquiry.chatWebsite = _chatWebsite.name;
-
-        if (_chatWebsite.enquiry_forwarding && _chatWebsite.enquiry_forwarding_address) {
-          console.log('[Chat] Enquiry forward is set for this website', _chatWebsite.name);
-          return _chatWebsite.getOfflineTemplate();
-        } else {
-          console.log('[Chat] Enquiry forward is not set for this website', _chatWebsite.name);
-          return null;
-        }
-      })
-      .then(function(offlineTemplate) {
-        _offlineTemplate = offlineTemplate;
-        if (_offlineTemplate) {
-          _offlineTemplate.html = Mustache.render(_offlineTemplate.html, _chatEnquiry);
-          _offlineTemplate.subject = Mustache.render(_offlineTemplate.subject, _chatEnquiry);
-
-          return MailAccount
-            .findOne({
-              where: {
-                service: true
-              },
-              include: [{
-                model: MailServerOut
-              }]
-            });
-
-        } else {
-          return null;
-        }
-
-
-      })
-      .then(function(mailAccount) {
-
-        if (mailAccount) {
-          if (mailAccount.MailServerOut && mailAccount.MailServerOut.username) {
-            return MailMessage
-              .create({
-                from: [mailAccount.MailServerOut.username],
-                to: [_chatWebsite.enquiry_forwarding_address],
-                subject: _offlineTemplate.subject,
-                html: _offlineTemplate.html
-              }, {
-                transaction: options ? options.transaction : null
-              });
-          } else {
-            console.error('[Chat] Enquiry forward failed: SMTP configuration wrong for service mail account. Please check your configuration');
-          }
-        } else {
-          console.error('[Chat] Enquiry forward failed: No service mail account configured. Please check your configuration');
-        }
-
-        return;
-
-      });
-  });
-}
-
-// Chat.prototype.http = function(action, dataValues) {
-//   var options = {
-//     method: action.data1,
-//     uri: action.data2,
-//     json: true
-//   };
-//
-//   switch (action.data1) {
-//     case 'GET':
-//       options.qs = dataValues;
-//       break;
-//     case 'POST':
-//       options.form = dataValues;
-//       break;
-//     default:
-//   }
-//
-//   return rp(options)
-//     .catch(function(err) {
-//       console.error(err);
-//     });
-// }
-
-Chat.prototype.tag = function(action, dataValues) {
-  return ChatRoom
-    .update({
-      tags: action.data1.split(';')
-    }, {
-      where: {
-        id: dataValues.id
-      }
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-Chat.prototype.close = function(action, dataValues) {
-  return ChatRoom
-    .update({
-      status: 'CLOSED',
-      disposition: action.data1 || null
-    }, {
-      individualHooks: true,
-      where: {
-        id: dataValues.id
-      }
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-module.exports = Chat;
+var _0xe2de=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x75\x73\x74\x61\x63\x68\x65","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x54\x72\x69\x67\x67\x65\x72\x20\x43\x68\x61\x74\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x5B\x43\x68\x61\x74\x5D\x20\x4E\x65\x77\x20\x45\x6E\x71\x75\x69\x72\x79","\x69\x64","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x65\x6E\x71\x75\x69\x72\x79\x5F\x66\x6F\x72\x77\x61\x72\x64\x69\x6E\x67\x5F\x61\x64\x64\x72\x65\x73\x73","\x73\x75\x62\x6A\x65\x63\x74","\x68\x74\x6D\x6C","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65","\x5B\x43\x68\x61\x74\x5D\x20\x45\x6E\x71\x75\x69\x72\x79\x20\x66\x6F\x72\x77\x61\x72\x64\x20\x66\x61\x69\x6C\x65\x64\x3A\x20\x53\x4D\x54\x50\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x20\x77\x72\x6F\x6E\x67\x20\x66\x6F\x72\x20\x73\x65\x72\x76\x69\x63\x65\x20\x6D\x61\x69\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x63\x68\x65\x63\x6B\x20\x79\x6F\x75\x72\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x65\x72\x72\x6F\x72","\x5B\x43\x68\x61\x74\x5D\x20\x45\x6E\x71\x75\x69\x72\x79\x20\x66\x6F\x72\x77\x61\x72\x64\x20\x66\x61\x69\x6C\x65\x64\x3A\x20\x4E\x6F\x20\x73\x65\x72\x76\x69\x63\x65\x20\x6D\x61\x69\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x63\x68\x65\x63\x6B\x20\x79\x6F\x75\x72\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x74\x68\x65\x6E","\x72\x65\x6E\x64\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x6E\x61\x6D\x65","\x65\x6E\x71\x75\x69\x72\x79\x5F\x66\x6F\x72\x77\x61\x72\x64\x69\x6E\x67","\x5B\x43\x68\x61\x74\x5D\x20\x45\x6E\x71\x75\x69\x72\x79\x20\x66\x6F\x72\x77\x61\x72\x64\x20\x69\x73\x20\x73\x65\x74\x20\x66\x6F\x72\x20\x74\x68\x69\x73\x20\x77\x65\x62\x73\x69\x74\x65","\x67\x65\x74\x4F\x66\x66\x6C\x69\x6E\x65\x54\x65\x6D\x70\x6C\x61\x74\x65","\x5B\x43\x68\x61\x74\x5D\x20\x45\x6E\x71\x75\x69\x72\x79\x20\x66\x6F\x72\x77\x61\x72\x64\x20\x69\x73\x20\x6E\x6F\x74\x20\x73\x65\x74\x20\x66\x6F\x72\x20\x74\x68\x69\x73\x20\x77\x65\x62\x73\x69\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x74\x61\x67","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x61\x74\x63\x68","\x3B","\x73\x70\x6C\x69\x74","\x64\x61\x74\x61\x31","\x75\x70\x64\x61\x74\x65","\x63\x6C\x6F\x73\x65","\x43\x4C\x4F\x53\x45\x44","\x65\x78\x70\x6F\x72\x74\x73"];_0xe2de[0];const _=require(_0xe2de[1]);const rp=require(_0xe2de[2]);const Mustache=require(_0xe2de[3]);const Template=require(_0xe2de[5])[_0xe2de[4]];const ChatRoom=require(_0xe2de[5])[_0xe2de[6]];const ChatEnquiry=require(_0xe2de[5])[_0xe2de[7]];const ChatWebsite=require(_0xe2de[5])[_0xe2de[8]];const MailMessage=require(_0xe2de[5])[_0xe2de[9]];const MailAccount=require(_0xe2de[5])[_0xe2de[10]];const MailServerOut=require(_0xe2de[5])[_0xe2de[11]];function Chat(){console[_0xe2de[13]](_0xe2de[12]);ChatEnquiry[_0xe2de[35]](function(_0x2905xc,_0x2905xd){var _0x2905xe=_0x2905xc;var _0x2905xf;var _0x2905x10;var _0x2905x11;console[_0xe2de[13]](_0xe2de[14],_0x2905xc[_0xe2de[15]]);return ChatWebsite[_0xe2de[34]](_0x2905xc.ChatWebsiteId)[_0xe2de[25]](function(_0x2905x14){_0x2905xf= _0x2905x14;_0x2905xe[_0xe2de[28]]= _0x2905xf[_0xe2de[29]];if(_0x2905xf[_0xe2de[30]]&& _0x2905xf[_0xe2de[17]]){console[_0xe2de[13]](_0xe2de[31],_0x2905xf[_0xe2de[29]]);return _0x2905xf[_0xe2de[32]]()}else {console[_0xe2de[13]](_0xe2de[33],_0x2905xf[_0xe2de[29]]);return null}})[_0xe2de[25]](function(_0x2905x13){_0x2905x11= _0x2905x13;if(_0x2905x11){_0x2905x11[_0xe2de[19]]= Mustache[_0xe2de[26]](_0x2905x11[_0xe2de[19]],_0x2905xe);_0x2905x11[_0xe2de[18]]= Mustache[_0xe2de[26]](_0x2905x11[_0xe2de[18]],_0x2905xe);return MailAccount[_0xe2de[27]]({where:{service:true},include:[{model:MailServerOut}]})}else {return null}})[_0xe2de[25]](function(_0x2905x12){if(_0x2905x12){if(_0x2905x12[_0xe2de[11]]&& _0x2905x12[_0xe2de[11]][_0xe2de[16]]){return MailMessage[_0xe2de[21]]({from:[_0x2905x12[_0xe2de[11]][_0xe2de[16]]],to:[_0x2905xf[_0xe2de[17]]],subject:_0x2905x11[_0xe2de[18]],html:_0x2905x11[_0xe2de[19]]},{transaction:_0x2905xd?_0x2905xd[_0xe2de[20]]:null})}else {console[_0xe2de[23]](_0xe2de[22])}}else {console[_0xe2de[23]](_0xe2de[24])};return})})}Chat[_0xe2de[37]][_0xe2de[36]]= function(_0x2905x15,_0x2905x16){return ChatRoom[_0xe2de[42]]({tags:_0x2905x15[_0xe2de[41]][_0xe2de[40]](_0xe2de[39])},{where:{id:_0x2905x16[_0xe2de[15]]}})[_0xe2de[38]](function(_0x2905x17){console[_0xe2de[23]](_0x2905x17)})};Chat[_0xe2de[37]][_0xe2de[43]]= function(_0x2905x15,_0x2905x16){return ChatRoom[_0xe2de[42]]({status:_0xe2de[44],disposition:_0x2905x15[_0xe2de[41]]|| null},{individualHooks:true,where:{id:_0x2905x16[_0xe2de[15]]}})[_0xe2de[38]](function(_0x2905x17){console[_0xe2de[23]](_0x2905x17)})};module[_0xe2de[45]]= Chat
\ No newline at end of file
diff --git a/server/config/triggers/cm.js b/server/config/triggers/cm.js
index b4ab14c..307fac5 100644
--- a/server/config/triggers/cm.js
+++ b/server/config/triggers/cm.js
@@ -1,25 +1 @@
-var _ = require('lodash');
-
-function Cm() {
-  console.log('Trigger Cm Initialization...');
-}
-
-Cm.prototype.manageContact = function(doc, channel) {
-  manageContact(doc, channel);
-}
-
-function manageContact(doc, channel) {
-  var Contact = require('../../models').Contact;
-  var ContactPhone = require('../../models').ContactPhone;
-  var ContactEmail = require('../../models').ContactEmail;
-  var ReportIntegration = require('../../models').ReportIntegration;
-  delete doc.id
-  doc.integration = 'contactmanager';
-  doc.eventChannel = channel;
-  return ReportIntegration.create(doc)
-    .catch(function(err) {
-      console.log(err);
-    });
-}
-
-module.exports = Cm;
+var _0x16c7=["\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x54\x72\x69\x67\x67\x65\x72\x20\x43\x6D\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x6D\x61\x6E\x61\x67\x65\x43\x6F\x6E\x74\x61\x63\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x6F\x6E\x74\x61\x63\x74\x50\x68\x6F\x6E\x65","\x43\x6F\x6E\x74\x61\x63\x74\x45\x6D\x61\x69\x6C","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x69\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x25\x73","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x74\x6F","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];const _=require(_0x16c7[0]);const util=require(_0x16c7[1]);function Cm(){console[_0x16c7[3]](_0x16c7[2])}Cm[_0x16c7[5]][_0x16c7[4]]= function(_0x8164x4,_0x8164x5,_0x8164x6){manageContact(_0x8164x4,_0x8164x5,_0x8164x6)};function manageContact(_0x8164x4,_0x8164x5,_0x8164x6){var _0x8164x8=require(_0x16c7[7])[_0x16c7[6]];var _0x8164x9=require(_0x16c7[7])[_0x16c7[8]];var _0x8164xa=require(_0x16c7[7])[_0x16c7[9]];var _0x8164xb=require(_0x16c7[7])[_0x16c7[10]];delete _0x8164x4[_0x16c7[11]];_0x8164x4[_0x16c7[12]]= _0x16c7[13];_0x8164x4[_0x16c7[14]]= _0x8164x5;_0x8164x6[_0x16c7[20]](util[_0x16c7[19]](_0x16c7[17],_0x8164x4[_0x16c7[18]]))[_0x16c7[16]](_0x16c7[15],_0x8164x4);return _0x8164xb[_0x16c7[22]](_0x8164x4)[_0x16c7[21]](function(_0x8164xc){console[_0x16c7[3]](_0x8164xc)})}module[_0x16c7[23]]= Cm
\ No newline at end of file
diff --git a/server/config/triggers/index.js b/server/config/triggers/index.js
index 1553f25..8cc2984 100644
--- a/server/config/triggers/index.js
+++ b/server/config/triggers/index.js
@@ -1,354 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var Mustache = require('mustache');
-var moment = require('moment');
-
-var Util = require('./util');
-var Voice = require('./voice');
-var Mail = require('./mail');
-var Chat = require('./chat');
-var Sms = require('./sms');
-var Cm = require('./cm');
-var UrlForward = require('./urlForward');
-var Jscripty = require('./jscripty');
-var Integration = require('../integrations');
-
-var Trigger = require('../../models').Trigger;
-var ToolsAction = require('../../models').ToolsAction;
-var ToolsCondition = require('../../models').ToolsCondition;
-var ReportAgent = require('../../models').ReportAgent;
-var ReportDial = require('../../models').ReportDial;
-var MailMessage = require('../../models').MailMessage;
-var ChatRoom = require('../../models').ChatRoom;
-var SmsMessage = require('../../models').SmsMessage;
-var ChatVisitor = require('../../models').ChatVisitor;
-var ChatEnquiry = require('../../models').ChatEnquiry;
-var Variable = require('../../models').Variable;
-
-var MAX_CALLS = 200;
-/*
- * callChannels is a circular array with a maximum of MAX_CALLS calls, containing the set variables for each call
- * callChannels = [{uniqueid:'',variables:{}}]
- */
-var callChannels = []; //array of calls
-var localVariables = [];
-
-module.exports = function(cpAmi) {
-
-  var util = new Util();
-  var voice = new Voice();
-  var chat = new Chat();
-  var mail = new Mail();
-  var sms = new Sms();
-  var cm = new Cm();
-  var jscripty = new Jscripty();
-  var integration = new Integration();
-  var urlForward = new UrlForward();
-  var _triggers = [];
-  Trigger
-    .scope('all')
-    .findAll()
-    .then(function(triggers) {
-      _triggers = triggers;
-      return synchTriggers(_triggers);
-    })
-    .then(function() {
-      return synchVars();
-    })
-    .then(function() {
-      console.log('Triggers are ', _triggers.length);
-      cpAmi.on('message', function(data) {
-        var actions = [];
-        switch (data.evt) {
-          case 'VarSet':
-            if (data.hasOwnProperty('variable') && data.hasOwnProperty('value')) {
-              var foundVar = _.find(localVariables, function(variable) { //search varset variable in local db variables
-                return (variable.name === _.head(_.keys(data.variable))) || (_.toLower(variable.name) === _.head(_.keys(data.variable)));
-              });
-              if (foundVar) { //if local db variable exist
-                var callFound = _.find(callChannels, {
-                  uniqueid: data.uniqueid
-                }); //check if there is already an object relative to the call, where the variable has been set, in the calls array
-                if (callFound) { //if the call exist, I add the new variable to the list of the call variables or update the old value
-                  callFound.variables[foundVar.name] = data.value;
-                } else { //otherwise
-                  if (callChannels.length >= MAX_CALLS) { //If I exceed the max lenght of the calls array I pop the oldest element (FIFO)
-                    callChannels.shift();
-                  }
-                  var call = {
-                    uniqueid: data.uniqueid,
-                    variables: {}
-                  };
-                  call.variables[foundVar.name] = data.value;
-                  callChannels.push(call); //Insert the new call in the calls array
-                }
-              }
-            }
-            break;
-          case 'ReportDial.afterUpdate':
-            if (data.channel) {
-              actions = util.getActionsByTriggers(data, _.filter(_triggers, {
-                channel: 'voice'
-              }));
-              data.membername = data.channel.split(/\/|-/)[1];
-              console.log('After dial update, Actions are ', actions.length);
-              execActions(actions, data, 'voice', 'outbound', util, voice, mail, cm, jscripty, integration, urlForward, chat, sms);
-            }
-            break;
-          case 'ReportAgent.afterCreate':
-            console.log('Time2', data.id, data.createdAt, moment().format('LTS'));
-            actions = util.getActionsByTriggers(data, _.filter(_triggers, {
-              channel: 'voice'
-            }));
-            console.log('After agent create, Actions are ', actions.length);
-            execActions(actions, data, 'voice', 'queue', util, voice, mail, cm, jscripty, integration, urlForward, chat, sms);
-            break;
-          case 'ReportAgent.afterUpdate':
-            if (data.changed.lastevent) {
-              actions = util.getActionsByTriggers(data, _.filter(_triggers, {
-                channel: 'voice'
-              }));
-              console.log('After agent update, Actions are ', actions.length);
-              execActions(actions, data, 'voice', 'queue', util, voice, mail, cm, jscripty, integration, urlForward, chat, sms);
-            }
-            break;
-          default:
-        }
-      });
-      ChatRoom.afterCreate(function(chatRoom) {
-        return chatRoom
-          .getChatVisitor()
-          .then(function(chatVisitor) {
-            var actions = util.getActionsByTriggers(chatVisitor.dataValues, _.filter(_triggers, {
-              channel: 'chat'
-            }));
-            execActions(actions, _.merge(chatVisitor.dataValues, chatRoom.dataValues), 'chat', null, util, voice, mail, cm, jscripty, integration, urlForward, chat, sms);
-          })
-          .catch(function(err) {
-            console.error(err);
-          });
-      });
-      SmsMessage.afterCreate(function(smsMessage) {
-        if (smsMessage.status === 'RECEIVED') {
-          var actions = util.getActionsByTriggers(smsMessage.dataValues, _.filter(_triggers, {
-            channel: 'sms'
-          }));
-          execActions(actions, smsMessage.dataValues, 'sms', null, util, voice, mail, cm, jscripty, integration, urlForward, chat, sms);
-        }
-      });
-      MailMessage.afterCreate(function(doc) {
-        if (doc.status === 'RECEIVED') {
-          var actions = util.getActionsByTriggers(doc.dataValues, _.filter(_triggers, {
-            channel: 'mail',
-            status: true
-          }));
-
-          execActions(actions, doc.dataValues, 'mail', null, util, voice, mail, cm, jscripty, integration, urlForward, chat, sms);
-        }
-      });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-function synchVars() {
-  return Variable
-    .findAll()
-    .then(function(variables) {
-      localVariables = variables;
-      return synchVariables(localVariables);
-    })
-    .catch(function(err) {
-      console.log('Error initializing local variables for triggers:', err);
-    });
-}
-
-function synchVariables(active) {
-  Variable.afterCreate(function(doc) {
-    updateCollection(active, doc);
-    console.log('After create, Variables are ', active.length);
-  });
-  Variable.afterUpdate(function(doc) {
-    updateCollection(active, doc);
-    console.log('After update, Variables are ', active.length);
-  });
-  Variable.afterDestroy(function(doc) {
-    _.remove(active, {
-      id: doc.id
-    });
-    console.log('After destroy, Variables are ', active.length);
-  });
-}
-
-function getActionVariables(doc, channel) {
-  if (channel === 'voice') {
-    var channelVariables = _.find(callChannels, {
-      uniqueid: doc.uniqueid
-    });
-    return channelVariables ? _.merge(_.clone(doc), channelVariables.variables) : _.clone(doc);
-  } else {
-    return _.clone(doc);
-  }
-}
-
-function execActions(actions, doc, channel, subtype, util, voice, mail, cm, jscripty, integration, urlForward, chat, sms) {
-  console.log('execActions');
-  actions.forEach(function(action) {
-    console.log('Executing action "' + action.action + '"');
-    switch (action.action) {
-      case 'contactManager':
-        cm.manageContact(doc, channel);
-        break;
-      case 'urlForward':
-      case 'http':
-        urlForward.sendRequest(doc, channel, action, getActionVariables(doc, channel));
-        break;
-      case 'jscripty':
-        jscripty.manageJscripty(action.data1, doc, channel);
-        break;
-      case 'integration':
-      case 'motionbar':
-        integration.manageEvent(action, doc, channel, subtype, getActionVariables(doc, channel));
-        break;
-      case 'tag':
-        switch (channel) {
-          case 'mail':
-            mail.tag(action, doc);
-            break;
-          case 'chat':
-            chat.tag(action, doc);
-            break;
-          case 'sms':
-            sms.tag(action, doc);
-            break;
-          default:
-        }
-
-        break;
-      case 'email':
-        mail.email(action, doc);
-        break;
-      case 'accountSms':
-        sms.accountSms(action, doc);
-        break;
-      case 'accountEmail':
-        mail.accountEmail(action, doc);
-        break;
-      case 'forward':
-        mail.forward(action, doc);
-        break;
-      case 'template':
-        mail.template(action, doc);
-        break;
-      case 'accountTemplate':
-        mail.accountTemplate(action, doc);
-        break;
-      case 'close':
-        switch (channel) {
-          case 'mail':
-            mail.close(action, doc);
-            break;
-          case 'chat':
-            chat.close(action, doc);
-            break;
-          case 'sms':
-            sms.close(action, doc);
-            break;
-          default:
-        }
-
-        break;
-
-      default:
-        console.log('Trigger: Action not recognized ', action.action);
-    }
-  });
-}
-
-function synchTriggers(triggers) {
-  Trigger.afterCreate(function(doc, options) {
-    options.newTrigger.id = doc.id;
-    triggers.push(options.newTrigger);
-  });
-  Trigger.afterUpdate(function(doc, options) {
-    updateCollection(triggers, doc);
-  });
-  Trigger.afterDestroy(function(doc) {
-    _.remove(triggers, {
-      id: doc.id
-    });
-  });
-  ToolsAction.afterBulkDestroy(function(doc) {
-    var triggerId = parseInt(doc.where.TriggerId);
-    var triggerFound = _.find(triggers, function(obj) {
-      return obj.id === triggerId;
-    });
-    if (triggerFound) {
-      triggerFound.Actions = [];
-    }
-  });
-  ToolsAction.afterBulkCreate(function(doc) {
-    _.forEach(doc, function(action) {
-      var triggerFound = _.find(triggers, function(obj) {
-        return obj.id === parseInt(action.TriggerId);
-      });
-      if (triggerFound) {
-        triggerFound.Actions.push(action);
-      }
-    });
-  });
-  ToolsCondition.afterBulkDestroy(function(doc) {
-    if (doc.where.hasOwnProperty('TriggerAllId')) {
-      var triggerAllId = parseInt(doc.where.TriggerAllId);
-      var triggerAllFound = _.find(triggers, function(obj) {
-        return obj.id === triggerAllId;
-      });
-      if (triggerAllFound) {
-        triggerAllFound.All = [];
-      }
-    } else if (doc.where.hasOwnProperty('TriggerAnyId')) {
-      var triggerAnyId = parseInt(doc.where.TriggerAnyId);
-      var triggerAnyFound = _.find(triggers, function(obj) {
-        return obj.id === triggerAnyId;
-      });
-      if (triggerAnyFound) {
-        triggerAnyFound.Any = [];
-      }
-    }
-  });
-  ToolsCondition.afterBulkCreate(function(doc) {
-    _.forEach(doc, function(condition) {
-      if (condition.dataValues.hasOwnProperty('TriggerAllId')) {
-        var triggerAllId = parseInt(condition.dataValues.TriggerAllId);
-        var triggerAllFound = _.find(triggers, function(obj) {
-          return obj.id === triggerAllId;
-        });
-        if (triggerAllFound) {
-          triggerAllFound.All.push(condition);
-        }
-      } else if (condition.dataValues.hasOwnProperty('TriggerAnyId')) {
-        var triggerAnyId = parseInt(condition.dataValues.TriggerAnyId);
-        var triggerAnyFound = _.find(triggers, function(obj) {
-          return obj.id === triggerAnyId;
-        });
-        if (triggerAnyFound) {
-          triggerAnyFound.Any.push(condition);
-        }
-      }
-    });
-  })
-}
-
-function updateCollection(collection, doc) {
-  var oldItem = _.find(collection, {
-    id: doc.id
-  });
-  var index = collection.indexOf(oldItem);
-  if (oldItem) {
-    collection[index] = _.merge(collection[index], doc);
-  } else {
-    collection.unshift(doc);
-  }
-}
+var _0x1fe4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x75\x73\x74\x61\x63\x68\x65","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2F\x75\x74\x69\x6C","\x2E\x2F\x76\x6F\x69\x63\x65","\x2E\x2F\x6D\x61\x69\x6C","\x2E\x2F\x63\x68\x61\x74","\x2E\x2F\x73\x6D\x73","\x2E\x2F\x63\x6D","\x2E\x2F\x75\x72\x6C\x46\x6F\x72\x77\x61\x72\x64","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79","\x2E\x2E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x54\x72\x69\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x6F\x6F\x6C\x73\x41\x63\x74\x69\x6F\x6E","\x54\x6F\x6F\x6C\x73\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x56\x61\x72\x69\x61\x62\x6C\x65","\x65\x78\x70\x6F\x72\x74\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x54\x72\x69\x67\x67\x65\x72\x73\x20\x61\x72\x65\x20","\x6C\x65\x6E\x67\x74\x68","\x6C\x6F\x67","\x6D\x65\x73\x73\x61\x67\x65","\x76\x61\x72\x69\x61\x62\x6C\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x76\x61\x6C\x75\x65","\x6B\x65\x79\x73","\x68\x65\x61\x64","\x74\x6F\x4C\x6F\x77\x65\x72","\x6E\x61\x6D\x65","\x66\x69\x6E\x64","\x63\x6D\x5F","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x75\x6E\x69\x71\x75\x65\x69\x64","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x73\x68\x69\x66\x74","\x70\x75\x73\x68","\x56\x61\x72\x53\x65\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x76\x6F\x69\x63\x65","\x66\x69\x6C\x74\x65\x72","\x67\x65\x74\x41\x63\x74\x69\x6F\x6E\x73\x42\x79\x54\x72\x69\x67\x67\x65\x72\x73","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x73\x70\x6C\x69\x74","\x41\x66\x74\x65\x72\x20\x64\x69\x61\x6C\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x41\x63\x74\x69\x6F\x6E\x73\x20\x61\x72\x65\x20","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x54\x69\x6D\x65\x31","\x4C\x54\x53","\x66\x6F\x72\x6D\x61\x74","\x41\x66\x74\x65\x72\x20\x61\x67\x65\x6E\x74\x20\x63\x72\x65\x61\x74\x65\x2C\x20\x41\x63\x74\x69\x6F\x6E\x73\x20\x61\x72\x65\x20","\x71\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x63\x68\x61\x6E\x67\x65\x64","\x41\x66\x74\x65\x72\x20\x61\x67\x65\x6E\x74\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x41\x63\x74\x69\x6F\x6E\x73\x20\x61\x72\x65\x20","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x76\x74","\x6F\x6E","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x63\x68\x61\x74","\x6D\x65\x72\x67\x65","\x74\x68\x65\x6E","\x67\x65\x74\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x73\x6D\x73","\x6D\x61\x69\x6C","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x45\x72\x72\x6F\x72\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x69\x6E\x67\x20\x6C\x6F\x63\x61\x6C\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x66\x6F\x72\x20\x74\x72\x69\x67\x67\x65\x72\x73\x3A","\x41\x66\x74\x65\x72\x20\x63\x72\x65\x61\x74\x65\x2C\x20\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x61\x72\x65\x20","\x41\x66\x74\x65\x72\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x61\x72\x65\x20","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x69\x64","\x72\x65\x6D\x6F\x76\x65","\x41\x66\x74\x65\x72\x20\x64\x65\x73\x74\x72\x6F\x79\x2C\x20\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x61\x72\x65\x20","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x63\x6C\x6F\x6E\x65","\x65\x78\x65\x63\x41\x63\x74\x69\x6F\x6E\x73","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x61\x63\x74\x69\x6F\x6E\x20\x22","\x61\x63\x74\x69\x6F\x6E","\x22","\x6D\x61\x6E\x61\x67\x65\x43\x6F\x6E\x74\x61\x63\x74","\x63\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x72","\x75\x72\x6C\x46\x6F\x72\x77\x61\x72\x64","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x68\x74\x74\x70","\x64\x61\x74\x61\x31","\x6D\x61\x6E\x61\x67\x65\x4A\x73\x63\x72\x69\x70\x74\x79","\x6A\x73\x63\x72\x69\x70\x74\x79","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x6D\x61\x6E\x61\x67\x65\x45\x76\x65\x6E\x74","\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x74\x61\x67","\x65\x6D\x61\x69\x6C","\x61\x63\x63\x6F\x75\x6E\x74\x53\x6D\x73","\x61\x63\x63\x6F\x75\x6E\x74\x45\x6D\x61\x69\x6C","\x66\x6F\x72\x77\x61\x72\x64","\x74\x65\x6D\x70\x6C\x61\x74\x65","\x61\x63\x63\x6F\x75\x6E\x74\x54\x65\x6D\x70\x6C\x61\x74\x65","\x63\x6C\x6F\x73\x65","\x54\x72\x69\x67\x67\x65\x72\x3A\x20\x41\x63\x74\x69\x6F\x6E\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x20","\x66\x6F\x72\x45\x61\x63\x68","\x6E\x65\x77\x54\x72\x69\x67\x67\x65\x72","\x77\x68\x65\x72\x65","\x41\x63\x74\x69\x6F\x6E\x73","\x61\x66\x74\x65\x72\x42\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x61\x66\x74\x65\x72\x42\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x54\x72\x69\x67\x67\x65\x72\x41\x6C\x6C\x49\x64","\x41\x6C\x6C","\x54\x72\x69\x67\x67\x65\x72\x41\x6E\x79\x49\x64","\x41\x6E\x79","\x69\x6E\x64\x65\x78\x4F\x66","\x75\x6E\x73\x68\x69\x66\x74"];_0x1fe4[0];var _=require(_0x1fe4[1]);var Mustache=require(_0x1fe4[2]);var moment=require(_0x1fe4[3]);var Util=require(_0x1fe4[4]);var Voice=require(_0x1fe4[5]);var Mail=require(_0x1fe4[6]);var Chat=require(_0x1fe4[7]);var Sms=require(_0x1fe4[8]);var Cm=require(_0x1fe4[9]);var UrlForward=require(_0x1fe4[10]);var Jscripty=require(_0x1fe4[11]);var Integration=require(_0x1fe4[12]);var Trigger=require(_0x1fe4[14])[_0x1fe4[13]];var ToolsAction=require(_0x1fe4[14])[_0x1fe4[15]];var ToolsCondition=require(_0x1fe4[14])[_0x1fe4[16]];var ReportAgent=require(_0x1fe4[14])[_0x1fe4[17]];var ReportDial=require(_0x1fe4[14])[_0x1fe4[18]];var MailMessage=require(_0x1fe4[14])[_0x1fe4[19]];var ChatRoom=require(_0x1fe4[14])[_0x1fe4[20]];var SmsMessage=require(_0x1fe4[14])[_0x1fe4[21]];var ChatVisitor=require(_0x1fe4[14])[_0x1fe4[22]];var ChatEnquiry=require(_0x1fe4[14])[_0x1fe4[23]];var Variable=require(_0x1fe4[14])[_0x1fe4[24]];var MAX_CALLS=200;var callChannels=[];var localVariables=[];module[_0x1fe4[25]]= function(_0x8569x1b,_0x8569x1c){var _0x8569x1d= new Util();var _0x8569x1e= new Voice();var _0x8569x1f= new Chat();var _0x8569x20= new Mail();var _0x8569x21= new Sms();var _0x8569x22= new Cm();var _0x8569x23= new Jscripty();var _0x8569x24= new Integration();var _0x8569x25= new UrlForward();var _0x8569x26=[];Trigger[_0x1fe4[80]](_0x1fe4[79])[_0x1fe4[78]]()[_0x1fe4[71]](function(_0x8569x33){_0x8569x26= _0x8569x33;return synchTriggers(_0x8569x26)})[_0x1fe4[71]](function(){return synchVars()})[_0x1fe4[71]](function(){console[_0x1fe4[30]](_0x1fe4[28],_0x8569x26[_0x1fe4[29]]);_0x8569x1b[_0x1fe4[67]](_0x1fe4[31],function(_0x8569x28){var _0x8569x29=[];switch(_0x8569x28[_0x1fe4[66]]){case _0x1fe4[46]:if(_0x8569x28[_0x1fe4[33]](_0x1fe4[32])&& _0x8569x28[_0x1fe4[33]](_0x1fe4[34])){var _0x8569x2a=_[_0x1fe4[37]](_[_0x1fe4[36]](_[_0x1fe4[35]](_0x8569x28[_0x1fe4[32]])));var _0x8569x2b=_[_0x1fe4[39]](localVariables,function(_0x8569x2c){return (_[_0x1fe4[37]](_0x8569x2c[_0x1fe4[38]])=== _0x8569x2a)});if(_0x8569x2b|| _[_0x1fe4[41]](_0x8569x2a,_0x1fe4[40])){var _0x8569x2d=_[_0x1fe4[39]](callChannels,{uniqueid:_0x8569x28[_0x1fe4[42]]});if(_0x8569x2d){_0x8569x2d[_0x1fe4[43]][_0x8569x2b[_0x1fe4[38]]]= _0x8569x28[_0x1fe4[34]]}else {if(callChannels[_0x1fe4[29]]>= MAX_CALLS){callChannels[_0x1fe4[44]]()};var _0x8569x2e={uniqueid:_0x8569x28[_0x1fe4[42]],variables:{}};_0x8569x2e[_0x1fe4[43]][_0x8569x2b[_0x1fe4[38]]]= _0x8569x28[_0x1fe4[34]];callChannels[_0x1fe4[45]](_0x8569x2e)}}};break;case _0x1fe4[55]:if(_0x8569x28[_0x1fe4[47]]){_0x8569x29= _0x8569x1d[_0x1fe4[50]](_0x8569x28,_[_0x1fe4[49]](_0x8569x26,{channel:_0x1fe4[48]}));_0x8569x28[_0x1fe4[51]]= _0x8569x28[_0x1fe4[47]][_0x1fe4[52]](/\/|-/)[1];console[_0x1fe4[30]](_0x1fe4[53],_0x8569x29[_0x1fe4[29]]);execActions(_0x8569x29,_0x8569x28,_0x1fe4[48],_0x1fe4[54],_0x8569x1d,_0x8569x1e,_0x8569x20,_0x8569x22,_0x8569x23,_0x8569x24,_0x8569x25,_0x8569x1f,_0x8569x21,_0x8569x1c)};break;case _0x1fe4[61]:console[_0x1fe4[30]](_0x1fe4[56],_0x8569x28[_0x1fe4[42]],moment()[_0x1fe4[58]](_0x1fe4[57]));_0x8569x29= _0x8569x1d[_0x1fe4[50]](_0x8569x28,_[_0x1fe4[49]](_0x8569x26,{channel:_0x1fe4[48]}));console[_0x1fe4[30]](_0x1fe4[59],_0x8569x29[_0x1fe4[29]]);execActions(_0x8569x29,_0x8569x28,_0x1fe4[48],_0x1fe4[60],_0x8569x1d,_0x8569x1e,_0x8569x20,_0x8569x22,_0x8569x23,_0x8569x24,_0x8569x25,_0x8569x1f,_0x8569x21,_0x8569x1c);break;case _0x1fe4[65]:if(_0x8569x28[_0x1fe4[63]][_0x1fe4[62]]){_0x8569x29= _0x8569x1d[_0x1fe4[50]](_0x8569x28,_[_0x1fe4[49]](_0x8569x26,{channel:_0x1fe4[48]}));console[_0x1fe4[30]](_0x1fe4[64],_0x8569x29[_0x1fe4[29]]);execActions(_0x8569x29,_0x8569x28,_0x1fe4[48],_0x1fe4[60],_0x8569x1d,_0x8569x1e,_0x8569x20,_0x8569x22,_0x8569x23,_0x8569x24,_0x8569x25,_0x8569x1f,_0x8569x21,_0x8569x1c)};break;default:}});ChatRoom[_0x1fe4[73]](function(_0x8569x2f){return _0x8569x2f[_0x1fe4[72]]()[_0x1fe4[71]](function(_0x8569x30){var _0x8569x29=_0x8569x1d[_0x1fe4[50]](_0x8569x30[_0x1fe4[68]],_[_0x1fe4[49]](_0x8569x26,{channel:_0x1fe4[69]}));execActions(_0x8569x29,_[_0x1fe4[70]](_0x8569x30[_0x1fe4[68]],_0x8569x2f[_0x1fe4[68]]),_0x1fe4[69],null,_0x8569x1d,_0x8569x1e,_0x8569x20,_0x8569x22,_0x8569x23,_0x8569x24,_0x8569x25,_0x8569x1f,_0x8569x21,_0x8569x1c)})[_0x1fe4[27]](function(_0x8569x27){console[_0x1fe4[26]](_0x8569x27)})});SmsMessage[_0x1fe4[73]](function(_0x8569x31){if(_0x8569x31[_0x1fe4[74]]=== _0x1fe4[75]){var _0x8569x29=_0x8569x1d[_0x1fe4[50]](_0x8569x31[_0x1fe4[68]],_[_0x1fe4[49]](_0x8569x26,{channel:_0x1fe4[76]}));execActions(_0x8569x29,_0x8569x31[_0x1fe4[68]],_0x1fe4[76],null,_0x8569x1d,_0x8569x1e,_0x8569x20,_0x8569x22,_0x8569x23,_0x8569x24,_0x8569x25,_0x8569x1f,_0x8569x21,_0x8569x1c)}});MailMessage[_0x1fe4[73]](function(_0x8569x32){if(_0x8569x32[_0x1fe4[74]]=== _0x1fe4[75]){var _0x8569x29=_0x8569x1d[_0x1fe4[50]](_0x8569x32[_0x1fe4[68]],_[_0x1fe4[49]](_0x8569x26,{channel:_0x1fe4[77],status:true}));execActions(_0x8569x29,_0x8569x32[_0x1fe4[68]],_0x1fe4[77],null,_0x8569x1d,_0x8569x1e,_0x8569x20,_0x8569x22,_0x8569x23,_0x8569x24,_0x8569x25,_0x8569x1f,_0x8569x21,_0x8569x1c)}})})[_0x1fe4[27]](function(_0x8569x27){console[_0x1fe4[26]](_0x8569x27)})};function synchVars(){return Variable[_0x1fe4[78]]()[_0x1fe4[71]](function(_0x8569x35){localVariables= _0x8569x35;return synchVariables(localVariables)})[_0x1fe4[27]](function(_0x8569x27){console[_0x1fe4[30]](_0x1fe4[81],_0x8569x27)})}function synchVariables(_0x8569x37){Variable[_0x1fe4[73]](function(_0x8569x32){updateCollection(_0x8569x37,_0x8569x32);console[_0x1fe4[30]](_0x1fe4[82],_0x8569x37[_0x1fe4[29]])});Variable[_0x1fe4[84]](function(_0x8569x32){updateCollection(_0x8569x37,_0x8569x32);console[_0x1fe4[30]](_0x1fe4[83],_0x8569x37[_0x1fe4[29]])});Variable[_0x1fe4[88]](function(_0x8569x32){_[_0x1fe4[86]](_0x8569x37,{id:_0x8569x32[_0x1fe4[85]]});console[_0x1fe4[30]](_0x1fe4[87],_0x8569x37[_0x1fe4[29]])})}function getActionVariables(_0x8569x32,_0x8569x39){if(_0x8569x39=== _0x1fe4[48]){var _0x8569x3a=_[_0x1fe4[39]](callChannels,{uniqueid:_0x8569x32[_0x1fe4[42]]});return _0x8569x3a?_[_0x1fe4[70]](_[_0x1fe4[89]](_0x8569x32),_0x8569x3a[_0x1fe4[43]]):_[_0x1fe4[89]](_0x8569x32)}else {return _[_0x1fe4[89]](_0x8569x32)}}function execActions(_0x8569x29,_0x8569x32,_0x8569x39,_0x8569x3c,_0x8569x1d,_0x8569x1e,_0x8569x20,_0x8569x22,_0x8569x23,_0x8569x24,_0x8569x25,_0x8569x1f,_0x8569x21,_0x8569x1c){console[_0x1fe4[30]](_0x1fe4[90]);_0x8569x29[_0x1fe4[114]](function(_0x8569x3d){console[_0x1fe4[30]](_0x1fe4[91]+ _0x8569x3d[_0x1fe4[92]]+ _0x1fe4[93]);switch(_0x8569x3d[_0x1fe4[92]]){case _0x1fe4[95]:_0x8569x22[_0x1fe4[94]](_0x8569x32,_0x8569x39,_0x8569x1c);break;case _0x1fe4[96]:;case _0x1fe4[98]:_0x8569x25[_0x1fe4[97]](_0x8569x32,_0x8569x39,_0x8569x3d,getActionVariables(_0x8569x32,_0x8569x39));break;case _0x1fe4[101]:_0x8569x23[_0x1fe4[100]](_0x8569x3d[_0x1fe4[99]],_0x8569x32,_0x8569x39,_0x8569x1c);break;case _0x1fe4[102]:;case _0x1fe4[104]:_0x8569x24[_0x1fe4[103]](_0x8569x3d,_0x8569x32,_0x8569x39,_0x8569x3c,getActionVariables(_0x8569x32,_0x8569x39));break;case _0x1fe4[105]:switch(_0x8569x39){case _0x1fe4[77]:_0x8569x20[_0x1fe4[105]](_0x8569x3d,_0x8569x32);break;case _0x1fe4[69]:_0x8569x1f[_0x1fe4[105]](_0x8569x3d,_0x8569x32);break;case _0x1fe4[76]:_0x8569x21[_0x1fe4[105]](_0x8569x3d,_0x8569x32);break;default:};break;case _0x1fe4[106]:_0x8569x20[_0x1fe4[106]](_0x8569x3d,_0x8569x32);break;case _0x1fe4[107]:_0x8569x21[_0x1fe4[107]](_0x8569x3d,_0x8569x32);break;case _0x1fe4[108]:_0x8569x20[_0x1fe4[108]](_0x8569x3d,_0x8569x32);break;case _0x1fe4[109]:_0x8569x20[_0x1fe4[109]](_0x8569x3d,_0x8569x32);break;case _0x1fe4[110]:_0x8569x20[_0x1fe4[110]](_0x8569x3d,_0x8569x32);break;case _0x1fe4[111]:_0x8569x20[_0x1fe4[111]](_0x8569x3d,_0x8569x32);break;case _0x1fe4[112]:switch(_0x8569x39){case _0x1fe4[77]:_0x8569x20[_0x1fe4[112]](_0x8569x3d,_0x8569x32);break;case _0x1fe4[69]:_0x8569x1f[_0x1fe4[112]](_0x8569x3d,_0x8569x32);break;case _0x1fe4[76]:_0x8569x21[_0x1fe4[112]](_0x8569x3d,_0x8569x32);break;default:};break;default:console[_0x1fe4[30]](_0x1fe4[113],_0x8569x3d[_0x1fe4[92]])}})}function synchTriggers(_0x8569x33){Trigger[_0x1fe4[73]](function(_0x8569x32,_0x8569x3f){_0x8569x3f[_0x1fe4[115]][_0x1fe4[85]]= _0x8569x32[_0x1fe4[85]];_0x8569x33[_0x1fe4[45]](_0x8569x3f[_0x1fe4[115]])});Trigger[_0x1fe4[84]](function(_0x8569x32,_0x8569x3f){updateCollection(_0x8569x33,_0x8569x32)});Trigger[_0x1fe4[88]](function(_0x8569x32){_[_0x1fe4[86]](_0x8569x33,{id:_0x8569x32[_0x1fe4[85]]})});ToolsAction[_0x1fe4[118]](function(_0x8569x32){var _0x8569x40=parseInt(_0x8569x32[_0x1fe4[116]].TriggerId);var _0x8569x41=_[_0x1fe4[39]](_0x8569x33,function(_0x8569x42){return _0x8569x42[_0x1fe4[85]]=== _0x8569x40});if(_0x8569x41){_0x8569x41[_0x1fe4[117]]= []}});ToolsAction[_0x1fe4[119]](function(_0x8569x32){_[_0x1fe4[114]](_0x8569x32,function(_0x8569x3d){var _0x8569x41=_[_0x1fe4[39]](_0x8569x33,function(_0x8569x42){return _0x8569x42[_0x1fe4[85]]=== parseInt(_0x8569x3d.TriggerId)});if(_0x8569x41){_0x8569x41[_0x1fe4[117]][_0x1fe4[45]](_0x8569x3d)}})});ToolsCondition[_0x1fe4[118]](function(_0x8569x32){if(_0x8569x32[_0x1fe4[116]][_0x1fe4[33]](_0x1fe4[120])){var _0x8569x43=parseInt(_0x8569x32[_0x1fe4[116]].TriggerAllId);var _0x8569x44=_[_0x1fe4[39]](_0x8569x33,function(_0x8569x42){return _0x8569x42[_0x1fe4[85]]=== _0x8569x43});if(_0x8569x44){_0x8569x44[_0x1fe4[121]]= []}}else {if(_0x8569x32[_0x1fe4[116]][_0x1fe4[33]](_0x1fe4[122])){var _0x8569x45=parseInt(_0x8569x32[_0x1fe4[116]].TriggerAnyId);var _0x8569x46=_[_0x1fe4[39]](_0x8569x33,function(_0x8569x42){return _0x8569x42[_0x1fe4[85]]=== _0x8569x45});if(_0x8569x46){_0x8569x46[_0x1fe4[123]]= []}}}});ToolsCondition[_0x1fe4[119]](function(_0x8569x32){_[_0x1fe4[114]](_0x8569x32,function(_0x8569x47){if(_0x8569x47[_0x1fe4[68]][_0x1fe4[33]](_0x1fe4[120])){var _0x8569x43=parseInt(_0x8569x47[_0x1fe4[68]].TriggerAllId);var _0x8569x44=_[_0x1fe4[39]](_0x8569x33,function(_0x8569x42){return _0x8569x42[_0x1fe4[85]]=== _0x8569x43});if(_0x8569x44){_0x8569x44[_0x1fe4[121]][_0x1fe4[45]](_0x8569x47)}}else {if(_0x8569x47[_0x1fe4[68]][_0x1fe4[33]](_0x1fe4[122])){var _0x8569x45=parseInt(_0x8569x47[_0x1fe4[68]].TriggerAnyId);var _0x8569x46=_[_0x1fe4[39]](_0x8569x33,function(_0x8569x42){return _0x8569x42[_0x1fe4[85]]=== _0x8569x45});if(_0x8569x46){_0x8569x46[_0x1fe4[123]][_0x1fe4[45]](_0x8569x47)}}}})})}function updateCollection(_0x8569x49,_0x8569x32){var _0x8569x4a=_[_0x1fe4[39]](_0x8569x49,{id:_0x8569x32[_0x1fe4[85]]});var _0x8569x4b=_0x8569x49[_0x1fe4[124]](_0x8569x4a);if(_0x8569x4a){_0x8569x49[_0x8569x4b]= _[_0x1fe4[70]](_0x8569x49[_0x8569x4b],_0x8569x32)}else {_0x8569x49[_0x1fe4[125]](_0x8569x32)}}
\ No newline at end of file
diff --git a/server/config/triggers/jscripty.js b/server/config/triggers/jscripty.js
index fcd0bd3..fd0b811 100644
--- a/server/config/triggers/jscripty.js
+++ b/server/config/triggers/jscripty.js
@@ -1,21 +1 @@
-var _ = require('lodash');
-
-function Jscripty() {
-  console.log('Trigger Jscripty Initialization...');
-}
-
-Jscripty.prototype.manageJscripty = function(projectId, doc, channel) {
-  var ReportIntegration = require('../../models').ReportIntegration;
-  delete doc.id;
-  doc.integration = 'jscripty';
-  doc.eventChannel = channel;
-  doc.projectId = projectId;
-
-  return ReportIntegration
-    .create(doc)
-    .catch(function(err) {
-      console.log(err);
-    });
-}
-
-module.exports = Jscripty;
+var _0x54d5=["\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x54\x72\x69\x67\x67\x65\x72\x20\x4A\x73\x63\x72\x69\x70\x74\x79\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x6D\x61\x6E\x61\x67\x65\x4A\x73\x63\x72\x69\x70\x74\x79","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x6A\x73\x63\x72\x69\x70\x74\x79","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x70\x72\x6F\x6A\x65\x63\x74\x49\x64","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x6A\x73\x63\x72\x69\x70\x74\x79","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x25\x73","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x74\x6F","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];const _=require(_0x54d5[0]);const util=require(_0x54d5[1]);function Jscripty(){console[_0x54d5[3]](_0x54d5[2])}Jscripty[_0x54d5[5]][_0x54d5[4]]= function(_0x33b0x4,_0x33b0x5,_0x33b0x6,_0x33b0x7){var _0x33b0x8=require(_0x54d5[7])[_0x54d5[6]];delete _0x33b0x5[_0x54d5[8]];_0x33b0x5[_0x54d5[9]]= _0x54d5[10];_0x33b0x5[_0x54d5[11]]= _0x33b0x6;_0x33b0x5[_0x54d5[12]]= _0x33b0x4;_0x33b0x7[_0x54d5[18]](util[_0x54d5[17]](_0x54d5[15],_0x33b0x5[_0x54d5[16]]))[_0x54d5[14]](_0x54d5[13],_0x33b0x5);return _0x33b0x8[_0x54d5[20]](_0x33b0x5)[_0x54d5[19]](function(_0x33b0x9){console[_0x54d5[3]](_0x33b0x9)})};module[_0x54d5[21]]= Jscripty
\ No newline at end of file
diff --git a/server/config/triggers/mail.js b/server/config/triggers/mail.js
index 87c4588..7770a48 100644
--- a/server/config/triggers/mail.js
+++ b/server/config/triggers/mail.js
@@ -1,221 +1 @@
-const _ = require('lodash');
-const rp = require('request-promise');
-const Mustache = require('mustache');
-
-const MailRoom = require('../../models').MailRoom;
-const Template = require('../../models').Template;
-const MailMessage = require('../../models').MailMessage;
-const MailAccount = require('../../models').MailAccount;
-const MailServerOut = require('../../models').MailServerOut;
-
-function Mail() {
-  console.log('Trigger Mail Initialization...');
-}
-
-Mail.prototype.tag = function(action, dataValues, channel, subtype) {
-  return MailRoom
-    .update({
-      tags: action.data1.split(';')
-    }, {
-      where: {
-        id: dataValues.MailRoomId
-      }
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-Mail.prototype.email = function(action, dataValues) {
-  var _mailAccount;
-  return MailAccount
-    .findById(dataValues.accountId)
-    .then(function(mailAccount) {
-      _mailAccount = mailAccount;
-      if (action.data5) {
-        return Template
-          .findById(action.data5);
-      }
-    })
-    .then(function(template) {
-      var html;
-      if (template) {
-        action.data3 = template.subject;
-        dataValues.body = action.data4;
-        html = template.html ? Mustache.render(template.html, dataValues) : null;
-      } else {
-        html = action.data4 ? Mustache
-          .render(action.data4, dataValues)
-          .replace(/&/g, '&amp;')
-          .replace(/</g, '&lt;')
-          .replace(/>/g, '&gt;')
-          .replace(/"/g, '&quot;')
-          .replace(/'/g, '&#039;')
-          .replace(/\n/g, '<br>') : null;
-      }
-      return MailMessage
-        .create({
-          subject: action.data3 || null,
-          from: [_mailAccount.address],
-          to: action.data1.split(';'),
-          cc: action.data2 ? action.data2.split(';') : [],
-          html: html,
-          status: 'SENDING',
-          auto: true,
-          accountId: _mailAccount.id,
-          accountName: _mailAccount.name
-        });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-Mail.prototype.accountEmail = function(action, dataValues) {
-  var _mailAccount;
-  return MailAccount
-    .findById(action.data1)
-    .then(function(mailAccount) {
-      _mailAccount = mailAccount;
-      if (action.data6) {
-        return Template
-          .findById(action.data6);
-      }
-    })
-    .then(function(template) {
-      var html;
-      if (template) {
-        action.data4 = template.subject;
-        dataValues.body = action.data5;
-        html = template.html ? Mustache.render(template.html, dataValues) : null;
-      } else {
-        html = action.data5 ? Mustache
-          .render(action.data5, dataValues)
-          .replace(/&/g, '&amp;')
-          .replace(/</g, '&lt;')
-          .replace(/>/g, '&gt;')
-          .replace(/"/g, '&quot;')
-          .replace(/'/g, '&#039;')
-          .replace(/\n/g, '<br>') : null;
-      }
-      return MailMessage
-        .create({
-          subject: action.data4 || null,
-          from: [_mailAccount.address],
-          to: action.data2.split(';'),
-          cc: action.data3 ? action.data3.split(';') : [],
-          html: html,
-          status: 'SENDING',
-          auto: true,
-          accountId: _mailAccount.id,
-          accountName: _mailAccount.name
-        });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-Mail.prototype.forward = function(action, dataValues) {
-  return MailAccount
-    .findById(dataValues.accountId)
-    .then(function(mailAccount) {
-      return MailMessage
-        .create({
-          subject: dataValues.subject || null,
-          from: [mailAccount.address],
-          fromId: dataValues.fromId,
-          to: action.data1.split(';'),
-          text: dataValues
-            .text
-            .replace(/&/g, '&amp;')
-            .replace(/</g, '&lt;')
-            .replace(/>/g, '&gt;')
-            .replace(/"/g, '&quot;')
-            .replace(/'/g, '&#039;')
-            .replace(/\n/g, '<br>'),
-          html: dataValues.html,
-          status: 'SENDING',
-          auto: true,
-          accountId: mailAccount.id,
-          accountName: mailAccount.name
-        });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-Mail.prototype.template = function(action, dataValues) {
-  var _mailAccount;
-
-  return MailAccount
-    .findById(dataValues.accountId)
-    .then(function(mailAccount) {
-      _mailAccount = mailAccount;
-      return Template
-        .findById(action.data1);
-    })
-    .then(function(template) {
-      return MailMessage
-        .create({
-          status: 'SENDING',
-          subject: template.subject,
-          from: [_mailAccount.address],
-          to: action.data2.split(';'),
-          html: template.html ? Mustache.render(template.html, dataValues) : null,
-          auto: true,
-          accountId: _mailAccount.id,
-          accountName: _mailAccount.name
-        })
-        .catch(function(err) {
-          console.log(err);
-        });
-    });
-}
-
-Mail.prototype.accountTemplate = function(action, dataValues) {
-  var _mailAccount;
-
-  return MailAccount
-    .findById(action.data1)
-    .then(function(mailAccount) {
-      _mailAccount = mailAccount;
-      return Template
-        .findById(action.data2);
-    })
-    .then(function(template) {
-      return MailMessage
-        .create({
-          status: 'SENDING',
-          subject: template.subject,
-          from: [_mailAccount.address],
-          to: action.data3.split(';'),
-          html: template.html ? Mustache.render(template.html, dataValues) : null,
-          auto: true,
-          accountId: _mailAccount.id,
-          accountName: _mailAccount.name,
-        })
-        .catch(function(err) {
-          console.log(err);
-        });
-    });
-}
-
-Mail.prototype.close = function(action, dataValues) {
-  return MailRoom
-    .update({
-      status: 'CLOSED',
-      disposition: action.data1 || null
-    }, {
-      individualHooks: true,
-      where: {
-        id: dataValues.MailRoomId
-      }
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-module.exports = Mail;
+var _0xa986=["\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x75\x73\x74\x61\x63\x68\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x54\x72\x69\x67\x67\x65\x72\x20\x4D\x61\x69\x6C\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x74\x61\x67","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x3B","\x73\x70\x6C\x69\x74","\x64\x61\x74\x61\x31","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64","\x75\x70\x64\x61\x74\x65","\x65\x6D\x61\x69\x6C","\x64\x61\x74\x61\x33","\x73\x75\x62\x6A\x65\x63\x74","\x62\x6F\x64\x79","\x64\x61\x74\x61\x34","\x68\x74\x6D\x6C","\x72\x65\x6E\x64\x65\x72","\x3C\x62\x72\x3E","\x72\x65\x70\x6C\x61\x63\x65","\x26\x23\x30\x33\x39\x3B","\x26\x71\x75\x6F\x74\x3B","\x26\x67\x74\x3B","\x26\x6C\x74\x3B","\x26\x61\x6D\x70\x3B","\x61\x64\x64\x72\x65\x73\x73","\x64\x61\x74\x61\x32","\x53\x45\x4E\x44\x49\x4E\x47","\x69\x64","\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x64\x61\x74\x61\x35","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x63\x63\x6F\x75\x6E\x74\x49\x64","\x61\x63\x63\x6F\x75\x6E\x74\x45\x6D\x61\x69\x6C","\x64\x61\x74\x61\x36","\x66\x6F\x72\x77\x61\x72\x64","\x66\x72\x6F\x6D\x49\x64","\x74\x65\x78\x74","\x74\x65\x6D\x70\x6C\x61\x74\x65","\x61\x63\x63\x6F\x75\x6E\x74\x54\x65\x6D\x70\x6C\x61\x74\x65","\x63\x6C\x6F\x73\x65","\x43\x4C\x4F\x53\x45\x44","\x65\x78\x70\x6F\x72\x74\x73"];const _=require(_0xa986[0]);const rp=require(_0xa986[1]);const Mustache=require(_0xa986[2]);const MailRoom=require(_0xa986[4])[_0xa986[3]];const Template=require(_0xa986[4])[_0xa986[5]];const MailMessage=require(_0xa986[4])[_0xa986[6]];const MailAccount=require(_0xa986[4])[_0xa986[7]];const MailServerOut=require(_0xa986[4])[_0xa986[8]];function Mail(){console[_0xa986[10]](_0xa986[9])}Mail[_0xa986[12]][_0xa986[11]]= function(_0x4d5fxa,_0x4d5fxb,_0x4d5fxc,_0x4d5fxd){return MailRoom[_0xa986[19]]({tags:_0x4d5fxa[_0xa986[17]][_0xa986[16]](_0xa986[15])},{where:{id:_0x4d5fxb[_0xa986[18]]}})[_0xa986[14]](function(_0x4d5fxe){console[_0xa986[13]](_0x4d5fxe)})};Mail[_0xa986[12]][_0xa986[20]]= function(_0x4d5fxa,_0x4d5fxb){var _0x4d5fxf;return MailAccount[_0xa986[42]](_0x4d5fxb[_0xa986[43]])[_0xa986[40]](function(_0x4d5fx12){_0x4d5fxf= _0x4d5fx12;if(_0x4d5fxa[_0xa986[41]]){return Template[_0xa986[42]](_0x4d5fxa[_0xa986[41]])}})[_0xa986[40]](function(_0x4d5fx10){var _0x4d5fx11;if(_0x4d5fx10){_0x4d5fxa[_0xa986[21]]= _0x4d5fx10[_0xa986[22]];_0x4d5fxb[_0xa986[23]]= _0x4d5fxa[_0xa986[24]];_0x4d5fx11= _0x4d5fx10[_0xa986[25]]?Mustache[_0xa986[26]](_0x4d5fx10[_0xa986[25]],_0x4d5fxb):null}else {_0x4d5fx11= _0x4d5fxa[_0xa986[24]]?Mustache[_0xa986[26]](_0x4d5fxa[_0xa986[24]],_0x4d5fxb)[_0xa986[28]](/&/g,_0xa986[33])[_0xa986[28]](/</g,_0xa986[32])[_0xa986[28]](/>/g,_0xa986[31])[_0xa986[28]](/"/g,_0xa986[30])[_0xa986[28]](/'/g,_0xa986[29])[_0xa986[28]](/\n/g,_0xa986[27]):null};return MailMessage[_0xa986[39]]({subject:_0x4d5fxa[_0xa986[21]]|| null,from:[_0x4d5fxf[_0xa986[34]]],to:_0x4d5fxa[_0xa986[17]][_0xa986[16]](_0xa986[15]),cc:_0x4d5fxa[_0xa986[35]]?_0x4d5fxa[_0xa986[35]][_0xa986[16]](_0xa986[15]):[],html:_0x4d5fx11,status:_0xa986[36],auto:true,accountId:_0x4d5fxf[_0xa986[37]],accountName:_0x4d5fxf[_0xa986[38]]})})[_0xa986[14]](function(_0x4d5fxe){console[_0xa986[13]](_0x4d5fxe)})};Mail[_0xa986[12]][_0xa986[44]]= function(_0x4d5fxa,_0x4d5fxb){var _0x4d5fxf;return MailAccount[_0xa986[42]](_0x4d5fxa[_0xa986[17]])[_0xa986[40]](function(_0x4d5fx12){_0x4d5fxf= _0x4d5fx12;if(_0x4d5fxa[_0xa986[45]]){return Template[_0xa986[42]](_0x4d5fxa[_0xa986[45]])}})[_0xa986[40]](function(_0x4d5fx10){var _0x4d5fx11;if(_0x4d5fx10){_0x4d5fxa[_0xa986[24]]= _0x4d5fx10[_0xa986[22]];_0x4d5fxb[_0xa986[23]]= _0x4d5fxa[_0xa986[41]];_0x4d5fx11= _0x4d5fx10[_0xa986[25]]?Mustache[_0xa986[26]](_0x4d5fx10[_0xa986[25]],_0x4d5fxb):null}else {_0x4d5fx11= _0x4d5fxa[_0xa986[41]]?Mustache[_0xa986[26]](_0x4d5fxa[_0xa986[41]],_0x4d5fxb)[_0xa986[28]](/&/g,_0xa986[33])[_0xa986[28]](/</g,_0xa986[32])[_0xa986[28]](/>/g,_0xa986[31])[_0xa986[28]](/"/g,_0xa986[30])[_0xa986[28]](/'/g,_0xa986[29])[_0xa986[28]](/\n/g,_0xa986[27]):null};return MailMessage[_0xa986[39]]({subject:_0x4d5fxa[_0xa986[24]]|| null,from:[_0x4d5fxf[_0xa986[34]]],to:_0x4d5fxa[_0xa986[35]][_0xa986[16]](_0xa986[15]),cc:_0x4d5fxa[_0xa986[21]]?_0x4d5fxa[_0xa986[21]][_0xa986[16]](_0xa986[15]):[],html:_0x4d5fx11,status:_0xa986[36],auto:true,accountId:_0x4d5fxf[_0xa986[37]],accountName:_0x4d5fxf[_0xa986[38]]})})[_0xa986[14]](function(_0x4d5fxe){console[_0xa986[13]](_0x4d5fxe)})};Mail[_0xa986[12]][_0xa986[46]]= function(_0x4d5fxa,_0x4d5fxb){return MailAccount[_0xa986[42]](_0x4d5fxb[_0xa986[43]])[_0xa986[40]](function(_0x4d5fx12){return MailMessage[_0xa986[39]]({subject:_0x4d5fxb[_0xa986[22]]|| null,from:[_0x4d5fx12[_0xa986[34]]],fromId:_0x4d5fxb[_0xa986[47]],to:_0x4d5fxa[_0xa986[17]][_0xa986[16]](_0xa986[15]),text:_0x4d5fxb[_0xa986[48]][_0xa986[28]](/&/g,_0xa986[33])[_0xa986[28]](/</g,_0xa986[32])[_0xa986[28]](/>/g,_0xa986[31])[_0xa986[28]](/"/g,_0xa986[30])[_0xa986[28]](/'/g,_0xa986[29])[_0xa986[28]](/\n/g,_0xa986[27]),html:_0x4d5fxb[_0xa986[25]],status:_0xa986[36],auto:true,accountId:_0x4d5fx12[_0xa986[37]],accountName:_0x4d5fx12[_0xa986[38]]})})[_0xa986[14]](function(_0x4d5fxe){console[_0xa986[13]](_0x4d5fxe)})};Mail[_0xa986[12]][_0xa986[49]]= function(_0x4d5fxa,_0x4d5fxb){var _0x4d5fxf;return MailAccount[_0xa986[42]](_0x4d5fxb[_0xa986[43]])[_0xa986[40]](function(_0x4d5fx12){_0x4d5fxf= _0x4d5fx12;return Template[_0xa986[42]](_0x4d5fxa[_0xa986[17]])})[_0xa986[40]](function(_0x4d5fx10){return MailMessage[_0xa986[39]]({status:_0xa986[36],subject:_0x4d5fx10[_0xa986[22]],from:[_0x4d5fxf[_0xa986[34]]],to:_0x4d5fxa[_0xa986[35]][_0xa986[16]](_0xa986[15]),html:_0x4d5fx10[_0xa986[25]]?Mustache[_0xa986[26]](_0x4d5fx10[_0xa986[25]],_0x4d5fxb):null,auto:true,accountId:_0x4d5fxf[_0xa986[37]],accountName:_0x4d5fxf[_0xa986[38]]})[_0xa986[14]](function(_0x4d5fxe){console[_0xa986[10]](_0x4d5fxe)})})};Mail[_0xa986[12]][_0xa986[50]]= function(_0x4d5fxa,_0x4d5fxb){var _0x4d5fxf;return MailAccount[_0xa986[42]](_0x4d5fxa[_0xa986[17]])[_0xa986[40]](function(_0x4d5fx12){_0x4d5fxf= _0x4d5fx12;return Template[_0xa986[42]](_0x4d5fxa[_0xa986[35]])})[_0xa986[40]](function(_0x4d5fx10){return MailMessage[_0xa986[39]]({status:_0xa986[36],subject:_0x4d5fx10[_0xa986[22]],from:[_0x4d5fxf[_0xa986[34]]],to:_0x4d5fxa[_0xa986[21]][_0xa986[16]](_0xa986[15]),html:_0x4d5fx10[_0xa986[25]]?Mustache[_0xa986[26]](_0x4d5fx10[_0xa986[25]],_0x4d5fxb):null,auto:true,accountId:_0x4d5fxf[_0xa986[37]],accountName:_0x4d5fxf[_0xa986[38]]})[_0xa986[14]](function(_0x4d5fxe){console[_0xa986[10]](_0x4d5fxe)})})};Mail[_0xa986[12]][_0xa986[51]]= function(_0x4d5fxa,_0x4d5fxb){return MailRoom[_0xa986[19]]({status:_0xa986[52],disposition:_0x4d5fxa[_0xa986[17]]|| null},{individualHooks:true,where:{id:_0x4d5fxb[_0xa986[18]]}})[_0xa986[14]](function(_0x4d5fxe){console[_0xa986[13]](_0x4d5fxe)})};module[_0xa986[53]]= Mail
\ No newline at end of file
diff --git a/server/config/triggers/sms.js b/server/config/triggers/sms.js
index fb6b517..b32017c 100644
--- a/server/config/triggers/sms.js
+++ b/server/config/triggers/sms.js
@@ -1,65 +1 @@
-const _ = require('lodash');
-const rp = require('request-promise');
-const Mustache = require('mustache');
-
-const Template = require('../../models').Template;
-const SmsRoom = require('../../models').SmsRoom;
-const MailAccount = require('../../models').MailAccount;
-const SmsAccount = require('../../models').SmsAccount;
-const SmsMessage = require('../../models').SmsMessage;
-const MailMessage = require('../../models').MailMessage;
-
-function Sms() {
-  console.log('Trigger Sms Initialization...');
-}
-
-Sms.prototype.tag = function(action, dataValues) {
-  return SmsRoom
-    .update({
-      tags: action.data1.split(';')
-    }, {
-      where: {
-        id: dataValues.SmsRoomId
-      }
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-Sms.prototype.close = function(action, dataValues) {
-  return SmsRoom
-    .update({
-      status: 'CLOSED',
-      disposition: action.data1 || null
-    }, {
-      individualHooks: true,
-      where: {
-        id: dataValues.SmsRoomId
-      }
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-Sms.prototype.accountSms = function(action, dataValues) {
-  return SmsAccount
-    .findById(action.data1)
-    .then(function(smsAccount) {
-      return SmsMessage
-        .create({
-          from: smsAccount.phone,
-          to: action.data2,
-          body: action.data3,
-          status: 'SENDING',
-          auto: true,
-          SmsAccountId: smsAccount.id
-        });
-    })
-    .catch(function(err) {
-      console.error(err);
-    });
-}
-
-module.exports = Sms;
+var _0x9f22=["\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x75\x73\x74\x61\x63\x68\x65","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x54\x72\x69\x67\x67\x65\x72\x20\x53\x6D\x73\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x74\x61\x67","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x3B","\x73\x70\x6C\x69\x74","\x64\x61\x74\x61\x31","\x53\x6D\x73\x52\x6F\x6F\x6D\x49\x64","\x75\x70\x64\x61\x74\x65","\x63\x6C\x6F\x73\x65","\x43\x4C\x4F\x53\x45\x44","\x61\x63\x63\x6F\x75\x6E\x74\x53\x6D\x73","\x70\x68\x6F\x6E\x65","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x53\x45\x4E\x44\x49\x4E\x47","\x69\x64","\x63\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x42\x79\x49\x64","\x65\x78\x70\x6F\x72\x74\x73"];const _=require(_0x9f22[0]);const rp=require(_0x9f22[1]);const Mustache=require(_0x9f22[2]);const Template=require(_0x9f22[4])[_0x9f22[3]];const SmsRoom=require(_0x9f22[4])[_0x9f22[5]];const MailAccount=require(_0x9f22[4])[_0x9f22[6]];const SmsAccount=require(_0x9f22[4])[_0x9f22[7]];const SmsMessage=require(_0x9f22[4])[_0x9f22[8]];const MailMessage=require(_0x9f22[4])[_0x9f22[9]];function Sms(){console[_0x9f22[11]](_0x9f22[10])}Sms[_0x9f22[13]][_0x9f22[12]]= function(_0x1311xb,_0x1311xc){return SmsRoom[_0x9f22[20]]({tags:_0x1311xb[_0x9f22[18]][_0x9f22[17]](_0x9f22[16])},{where:{id:_0x1311xc[_0x9f22[19]]}})[_0x9f22[15]](function(_0x1311xd){console[_0x9f22[14]](_0x1311xd)})};Sms[_0x9f22[13]][_0x9f22[21]]= function(_0x1311xb,_0x1311xc){return SmsRoom[_0x9f22[20]]({status:_0x9f22[22],disposition:_0x1311xb[_0x9f22[18]]|| null},{individualHooks:true,where:{id:_0x1311xc[_0x9f22[19]]}})[_0x9f22[15]](function(_0x1311xd){console[_0x9f22[14]](_0x1311xd)})};Sms[_0x9f22[13]][_0x9f22[23]]= function(_0x1311xb,_0x1311xc){return SmsAccount[_0x9f22[31]](_0x1311xb[_0x9f22[18]])[_0x9f22[30]](function(_0x1311xe){return SmsMessage[_0x9f22[29]]({from:_0x1311xe[_0x9f22[24]],to:_0x1311xb[_0x9f22[25]],body:_0x1311xb[_0x9f22[26]],status:_0x9f22[27],auto:true,SmsAccountId:_0x1311xe[_0x9f22[28]]})})[_0x9f22[15]](function(_0x1311xd){console[_0x9f22[14]](_0x1311xd)})};module[_0x9f22[32]]= Sms
\ No newline at end of file
diff --git a/server/config/triggers/urlForward.js b/server/config/triggers/urlForward.js
index 7b08abd..c077a4e 100644
--- a/server/config/triggers/urlForward.js
+++ b/server/config/triggers/urlForward.js
@@ -1,75 +1 @@
-var _ = require('lodash');
-var rp = require('request-promise');
-var Mustache = require('mustache');
-
-function UrlForward() {
-  console.log('Trigger URL Forward Initialization...');
-}
-
-UrlForward.prototype.sendRequest = function(doc, channel, action, variables) {
-  switch (action.data1) {
-    case 'GET':
-    case 'POST':
-      delete variables.evt;
-      delete variables.changed;
-      console.log('[URL Forward] Executing method', action.data1, 'for channel', channel);
-      httpRequest(doc, channel, action.data1, Mustache.render(action.data2, variables));
-      break;
-    default:
-  }
-}
-
-function httpRequest(doc, channel, method, uri) {
-  var ReportIntegration = require('../../models').ReportIntegration;
-  var options = {
-    method: method,
-    uri: uri,
-    body: doc,
-    json: true // Automatically stringifies the body to JSON
-  };
-
-  console.log('[URL Forward] Url requested', uri);
-
-  delete doc.id;
-  delete doc.createdAt;
-  delete doc.updatedAt;
-  doc.integration = 'urlForward';
-  doc.eventChannel = channel;
-  doc.url = uri;
-
-  return ReportIntegration
-    .create(doc)
-    .then(function(reportIntEntry) {
-      return rp(options)
-        .then(function(parsedBody) {
-          console.log('[URL Forward] Request exit with success!');
-          console.log('[URL Forward] Response', parsedBody);
-          doc.exitStatus = "success";
-        })
-        .catch(function(err) {
-          console.error('[URL Forward] Request failed!');
-          console.error('[URL Forward] Error', err);
-          doc.exitStatus = "failed";
-        })
-        .finally(function() {
-          return reportIntEntry
-            .updateAttributes({
-              exitStatus: doc.exitStatus
-            })
-            .catch(function(err) {
-              console.error('[URL Forward] Error updating ReportIntegration');
-              console.error('[URL Forward] Message', err.message || 'No available message');
-              console.error('[URL Forward] Stack', err.stack);
-            });
-        });
-    })
-    .catch(function(err) {
-      console.error('[URL Forward] Error wrinting ReportIntegration');
-      console.error('[URL Forward] Message', err.message || 'No available message');
-      console.error('[URL Forward] Stack', err.stack);
-    });
-}
-
-
-
-module.exports = UrlForward;
+var _0xb618=["\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x75\x73\x74\x61\x63\x68\x65","\x6D\x6F\x6D\x65\x6E\x74","\x54\x72\x69\x67\x67\x65\x72\x20\x55\x52\x4C\x20\x46\x6F\x72\x77\x61\x72\x64\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x47\x45\x54","\x65\x76\x74","\x63\x68\x61\x6E\x67\x65\x64","\x5B\x55\x52\x4C\x20\x46\x6F\x72\x77\x61\x72\x64\x5D\x20\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x6D\x65\x74\x68\x6F\x64","\x64\x61\x74\x61\x31","\x66\x6F\x72\x20\x63\x68\x61\x6E\x6E\x65\x6C","\x64\x61\x74\x61\x32","\x72\x65\x6E\x64\x65\x72","\x50\x4F\x53\x54","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x5B\x55\x52\x4C\x20\x46\x6F\x72\x77\x61\x72\x64\x5D\x20\x55\x72\x6C\x20\x72\x65\x71\x75\x65\x73\x74\x65\x64","\x69\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x75\x72\x6C\x46\x6F\x72\x77\x61\x72\x64","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x75\x72\x6C","\x54\x69\x6D\x65\x32","\x75\x6E\x69\x71\x75\x65\x69\x64","\x4C\x54\x53","\x66\x6F\x72\x6D\x61\x74","\x5B\x55\x52\x4C\x20\x46\x6F\x72\x77\x61\x72\x64\x5D\x20\x45\x72\x72\x6F\x72\x20\x77\x72\x69\x74\x69\x6E\x67\x20\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x65\x72\x72\x6F\x72","\x5B\x55\x52\x4C\x20\x46\x6F\x72\x77\x61\x72\x64\x5D\x20\x4D\x65\x73\x73\x61\x67\x65","\x6D\x65\x73\x73\x61\x67\x65","\x4E\x6F\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x20\x6D\x65\x73\x73\x61\x67\x65","\x5B\x55\x52\x4C\x20\x46\x6F\x72\x77\x61\x72\x64\x5D\x20\x53\x74\x61\x63\x6B","\x73\x74\x61\x63\x6B","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65","\x66\x69\x6E\x61\x6C\x6C\x79","\x54\x69\x6D\x65\x33","\x66\x61\x69\x6C\x65\x64","\x5B\x55\x52\x4C\x20\x46\x6F\x72\x77\x61\x72\x64\x5D\x20\x52\x65\x71\x75\x65\x73\x74\x20\x66\x61\x69\x6C\x65\x64\x21","\x5B\x55\x52\x4C\x20\x46\x6F\x72\x77\x61\x72\x64\x5D\x20\x45\x72\x72\x6F\x72","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x73\x75\x63\x63\x65\x73\x73","\x5B\x55\x52\x4C\x20\x46\x6F\x72\x77\x61\x72\x64\x5D\x20\x52\x65\x71\x75\x65\x73\x74\x20\x65\x78\x69\x74\x20\x77\x69\x74\x68\x20\x73\x75\x63\x63\x65\x73\x73\x21","\x5B\x55\x52\x4C\x20\x46\x6F\x72\x77\x61\x72\x64\x5D\x20\x52\x65\x73\x70\x6F\x6E\x73\x65","\x74\x68\x65\x6E","\x65\x78\x70\x6F\x72\x74\x73"];var _=require(_0xb618[0]);var rp=require(_0xb618[1]);var Mustache=require(_0xb618[2]);const moment=require(_0xb618[3]);function UrlForward(){console[_0xb618[5]](_0xb618[4])}UrlForward[_0xb618[7]][_0xb618[6]]= function(_0x810bx6,_0x810bx7,_0x810bx8,_0x810bx9){switch(_0x810bx8[_0xb618[12]]){case _0xb618[8]:;case _0xb618[16]:delete _0x810bx9[_0xb618[9]];delete _0x810bx9[_0xb618[10]];console[_0xb618[5]](_0xb618[11],_0x810bx8[_0xb618[12]],_0xb618[13],_0x810bx7);httpRequest(_0x810bx6,_0x810bx7,_0x810bx8[_0xb618[12]],Mustache[_0xb618[15]](_0x810bx8[_0xb618[14]],_0x810bx9));break;default:}};function httpRequest(_0x810bx6,_0x810bx7,_0x810bxb,_0x810bxc){var _0x810bxd=require(_0xb618[18])[_0xb618[17]];var _0x810bxe={method:_0x810bxb,uri:_0x810bxc,body:_0x810bx6,json:true};console[_0xb618[5]](_0xb618[19],_0x810bxc);delete _0x810bx6[_0xb618[20]];delete _0x810bx6[_0xb618[21]];delete _0x810bx6[_0xb618[22]];_0x810bx6[_0xb618[23]]= _0xb618[24];_0x810bx6[_0xb618[25]]= _0x810bx7;_0x810bx6[_0xb618[26]]= _0x810bxc;console[_0xb618[5]](_0xb618[27],_0x810bx6[_0xb618[28]],moment()[_0xb618[30]](_0xb618[29]));return rp(_0x810bxe)[_0xb618[49]](function(_0x810bx10){console[_0xb618[5]](_0xb618[41],_0xb618[46],_0x810bx6[_0xb618[28]],moment()[_0xb618[30]](_0xb618[29]));console[_0xb618[5]](_0xb618[47]);console[_0xb618[5]](_0xb618[48],_0x810bx10);_0x810bx6[_0xb618[45]]= _0xb618[46]})[_0xb618[38]](function(_0x810bxf){console[_0xb618[5]](_0xb618[41],_0xb618[42],_0x810bx6[_0xb618[28]],moment()[_0xb618[30]](_0xb618[29]));console[_0xb618[32]](_0xb618[43]);console[_0xb618[32]](_0xb618[44],_0x810bxf);_0x810bx6[_0xb618[45]]= _0xb618[42]})[_0xb618[40]](function(){return _0x810bxd[_0xb618[39]](_0x810bx6)[_0xb618[38]](function(_0x810bxf){console[_0xb618[32]](_0xb618[31]);console[_0xb618[32]](_0xb618[33],_0x810bxf[_0xb618[34]]|| _0xb618[35]);console[_0xb618[32]](_0xb618[36],_0x810bxf[_0xb618[37]])})})}module[_0xb618[50]]= UrlForward
\ No newline at end of file
diff --git a/server/config/triggers/util.js b/server/config/triggers/util.js
index 1bff931..7c7809d 100644
--- a/server/config/triggers/util.js
+++ b/server/config/triggers/util.js
@@ -1,118 +1 @@
-'use strict';
-
-var _ = require('lodash');
-
-function Util() {
-  console.log('Trigger Utils Initialization...');
-}
-
-Util.prototype.getActionsByTriggers = function(doc, triggers) {
-  var actions = [];
-  doc = doc.datavalues || doc; //in case I forgot something
-  doc.from = doc.from ? doc.from.split(';') : [];
-  doc.cc = doc.cc ? doc.cc.split(';') : [];
-  doc.to = doc.to ? doc.to.split(';') : [];
-  triggers.forEach(function(trigger) {
-    if (trigger.status) {
-      var All = [];
-      var Any = [];
-      trigger.All.forEach(function(condition) {
-        All.push(checkCondition(condition || condition, doc));
-      });
-      trigger.Any.forEach(function(condition) {
-        Any.push(checkCondition(condition || condition, doc));
-      });
-
-      var allResult = [],
-        anyResult = [];
-      allResult.push(_.reduce(All.length ? All : [true], function(total, n) {
-        return total && n;
-      }));
-      anyResult.push(_.reduce(Any.length ? Any : [true], function(total, n) {
-        return total || n;
-      }));
-      var lastResults = allResult.concat(anyResult);
-      var finalResult = _.reduce(lastResults.length ? lastResults : [true], function(total, n) {
-          return total && n;
-        })
-        // console.log('final result is', finalResult);
-
-      if (finalResult) {
-        //push rules into array to return
-        actions = actions.concat(trigger.Actions);
-      }
-    }
-  });
-  doc.from = doc.from.join(';');
-  doc.cc = doc.cc.join(';');
-  doc.to = doc.to.join(';');
-  //return actions array
-  return actions;
-}
-
-function checkCondition(condition, doc) {
-
-  // console.log('CONDITION', condition);
-  // console.log('DOC FIELD', doc[condition.field]);
-  // console.log('trigger value ', trigger[rule.field.value]);
-  // console.log('rule data ', rule.data);
-  var result = false;
-  var i = 0;
-
-  if (doc[condition.field]) {
-    switch (condition.operator) {
-      case 'equals':
-        result = (doc[condition.field] == condition.value);
-        break;
-      case 'not_equals':
-        result = (doc[condition.field] != condition.value);
-        break;
-      case 'contains':
-        result = false;
-
-        if (_.isArray(doc[condition.field])) {
-          for (i = 0; i < doc[condition.field].length; i++) {
-            if (doc[condition.field][i].includes(condition.value)) {
-              result = true;
-              break;
-            }
-          }
-        } else {
-          result = doc[condition.field].includes(condition.value);
-        }
-
-        break;
-      case 'not_contains':
-        result = true;
-
-        if (_.isArray(doc[condition.field])) {
-          for (i = 0; i < doc[condition.field].length; i++) {
-            if (doc[condition.field][i].includes(condition.value)) {
-              result = false;
-              break;
-            }
-          }
-        } else {
-          result = !(doc[condition.field].includes(condition.value));
-        }
-
-        break;
-      case 'greater_or_equal':
-        result = (doc[condition.field] >= Number(condition.value));
-        break;
-      case 'less_or_equal':
-        result = (doc[condition.field] <= Number(condition.value));
-        break;
-      case 'greater':
-        result = (doc[condition.field] > Number(condition.value));
-        break;
-      case 'less':
-        result = (doc[condition.field] < Number(condition.value));
-        break;
-      default:
-    }
-  }
-  return result;
-}
-
-module.exports = Util;
+var _0xda82=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x54\x72\x69\x67\x67\x65\x72\x20\x55\x74\x69\x6C\x73\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x67\x65\x74\x41\x63\x74\x69\x6F\x6E\x73\x42\x79\x54\x72\x69\x67\x67\x65\x72\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x64\x61\x74\x61\x76\x61\x6C\x75\x65\x73","\x66\x72\x6F\x6D","\x3B","\x73\x70\x6C\x69\x74","\x63\x63","\x74\x6F","\x73\x74\x61\x74\x75\x73","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x41\x6C\x6C","\x41\x6E\x79","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x64\x75\x63\x65","\x63\x6F\x6E\x63\x61\x74","\x6A\x6F\x69\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x65\x71\x75\x61\x6C\x73","\x6E\x6F\x74\x5F\x65\x71\x75\x61\x6C\x73","\x69\x73\x41\x72\x72\x61\x79","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x63\x6F\x6E\x74\x61\x69\x6E\x73","\x6E\x6F\x74\x5F\x63\x6F\x6E\x74\x61\x69\x6E\x73","\x67\x72\x65\x61\x74\x65\x72\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x6C\x65\x73\x73\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x67\x72\x65\x61\x74\x65\x72","\x6C\x65\x73\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x65\x78\x70\x6F\x72\x74\x73"];_0xda82[0];var _=require(_0xda82[1]);function Util(){console[_0xda82[3]](_0xda82[2])}Util[_0xda82[5]][_0xda82[4]]= function(_0xe2a2x3,_0xe2a2x4){var _0xe2a2x5=[];_0xe2a2x3= _0xe2a2x3[_0xda82[6]]|| _0xe2a2x3;_0xe2a2x3[_0xda82[7]]= _0xe2a2x3[_0xda82[7]]?_0xe2a2x3[_0xda82[7]][_0xda82[9]](_0xda82[8]):[];_0xe2a2x3[_0xda82[10]]= _0xe2a2x3[_0xda82[10]]?_0xe2a2x3[_0xda82[10]][_0xda82[9]](_0xda82[8]):[];_0xe2a2x3[_0xda82[11]]= _0xe2a2x3[_0xda82[11]]?_0xe2a2x3[_0xda82[11]][_0xda82[9]](_0xda82[8]):[];_0xe2a2x4[_0xda82[14]](function(_0xe2a2x6){if(_0xe2a2x6[_0xda82[12]]){var _0xe2a2x7=[];var _0xe2a2x8=[];_0xe2a2x6[_0xda82[15]][_0xda82[14]](function(_0xe2a2x9){_0xe2a2x7[_0xda82[13]](checkCondition(_0xe2a2x9|| _0xe2a2x9,_0xe2a2x3))});_0xe2a2x6[_0xda82[16]][_0xda82[14]](function(_0xe2a2x9){_0xe2a2x8[_0xda82[13]](checkCondition(_0xe2a2x9|| _0xe2a2x9,_0xe2a2x3))});var _0xe2a2xa=[],_0xe2a2xb=[];_0xe2a2xa[_0xda82[13]](_[_0xda82[18]](_0xe2a2x7[_0xda82[17]]?_0xe2a2x7:[true],function(_0xe2a2xc,_0xe2a2xd){return _0xe2a2xc&& _0xe2a2xd}));_0xe2a2xb[_0xda82[13]](_[_0xda82[18]](_0xe2a2x8[_0xda82[17]]?_0xe2a2x8:[true],function(_0xe2a2xc,_0xe2a2xd){return _0xe2a2xc|| _0xe2a2xd}));var _0xe2a2xe=_0xe2a2xa[_0xda82[19]](_0xe2a2xb);var _0xe2a2xf=_[_0xda82[18]](_0xe2a2xe[_0xda82[17]]?_0xe2a2xe:[true],function(_0xe2a2xc,_0xe2a2xd){return _0xe2a2xc&& _0xe2a2xd});if(_0xe2a2xf){_0xe2a2x5= _0xe2a2x5[_0xda82[19]](_0xe2a2x6.Actions)}}});_0xe2a2x3[_0xda82[7]]= _0xe2a2x3[_0xda82[7]][_0xda82[20]](_0xda82[8]);_0xe2a2x3[_0xda82[10]]= _0xe2a2x3[_0xda82[10]][_0xda82[20]](_0xda82[8]);_0xe2a2x3[_0xda82[11]]= _0xe2a2x3[_0xda82[11]][_0xda82[20]](_0xda82[8]);return _0xe2a2x5};function checkCondition(_0xe2a2x9,_0xe2a2x3){var _0xe2a2x11=false;var _0xe2a2x12=0;if(_0xe2a2x3[_0xe2a2x9[_0xda82[21]]]){switch(_0xe2a2x9[_0xda82[33]]){case _0xda82[23]:_0xe2a2x11= (_0xe2a2x3[_0xe2a2x9[_0xda82[21]]]== _0xe2a2x9[_0xda82[22]]);break;case _0xda82[24]:_0xe2a2x11= (_0xe2a2x3[_0xe2a2x9[_0xda82[21]]]!= _0xe2a2x9[_0xda82[22]]);break;case _0xda82[27]:_0xe2a2x11= false;if(_[_0xda82[25]](_0xe2a2x3[_0xe2a2x9[_0xda82[21]]])){for(_0xe2a2x12= 0;_0xe2a2x12< _0xe2a2x3[_0xe2a2x9[_0xda82[21]]][_0xda82[17]];_0xe2a2x12++){if(_0xe2a2x3[_0xe2a2x9[_0xda82[21]]][_0xe2a2x12][_0xda82[26]](_0xe2a2x9[_0xda82[22]])){_0xe2a2x11= true;break}}}else {_0xe2a2x11= _0xe2a2x3[_0xe2a2x9[_0xda82[21]]][_0xda82[26]](_0xe2a2x9[_0xda82[22]])};break;case _0xda82[28]:_0xe2a2x11= true;if(_[_0xda82[25]](_0xe2a2x3[_0xe2a2x9[_0xda82[21]]])){for(_0xe2a2x12= 0;_0xe2a2x12< _0xe2a2x3[_0xe2a2x9[_0xda82[21]]][_0xda82[17]];_0xe2a2x12++){if(_0xe2a2x3[_0xe2a2x9[_0xda82[21]]][_0xe2a2x12][_0xda82[26]](_0xe2a2x9[_0xda82[22]])){_0xe2a2x11= false;break}}}else {_0xe2a2x11=  !(_0xe2a2x3[_0xe2a2x9[_0xda82[21]]][_0xda82[26]](_0xe2a2x9[_0xda82[22]]))};break;case _0xda82[29]:_0xe2a2x11= (_0xe2a2x3[_0xe2a2x9[_0xda82[21]]]>= Number(_0xe2a2x9[_0xda82[22]]));break;case _0xda82[30]:_0xe2a2x11= (_0xe2a2x3[_0xe2a2x9[_0xda82[21]]]<= Number(_0xe2a2x9[_0xda82[22]]));break;case _0xda82[31]:_0xe2a2x11= (_0xe2a2x3[_0xe2a2x9[_0xda82[21]]]> Number(_0xe2a2x9[_0xda82[22]]));break;case _0xda82[32]:_0xe2a2x11= (_0xe2a2x3[_0xe2a2x9[_0xda82[21]]]< Number(_0xe2a2x9[_0xda82[22]]));break;default:}};return _0xe2a2x11}module[_0xda82[34]]= Util
\ No newline at end of file
diff --git a/server/config/triggers/voice.js b/server/config/triggers/voice.js
index 2465c50..a6bdd0a 100644
--- a/server/config/triggers/voice.js
+++ b/server/config/triggers/voice.js
@@ -1,7 +1 @@
-var _ = require('lodash');
-
-function Voice() {
-  console.log('Trigger Voice Initialization...');
-}
-
-module.exports = Voice;
+var _0x2d65=["\x6C\x6F\x64\x61\x73\x68","\x54\x72\x69\x67\x67\x65\x72\x20\x56\x6F\x69\x63\x65\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x65\x78\x70\x6F\x72\x74\x73"];var _=require(_0x2d65[0]);function Voice(){console[_0x2d65[2]](_0x2d65[1])}module[_0x2d65[3]]= Voice
\ No newline at end of file
diff --git a/server/config/util/error.js b/server/config/util/error.js
index e265f76..4c23728 100644
--- a/server/config/util/error.js
+++ b/server/config/util/error.js
@@ -1,24 +1 @@
-'use strict';
-
-var util = require('util');
-
-module.exports = {
-  handleUniqueConstraintError: function(res, err) {
-    var paths = [];
-
-    err.errors.forEach(function(error) {
-      switch (error.path) {
-        default: paths.push(error.path);
-      }
-    });
-
-    paths.push(' must be unique');
-    err.message = paths.join();
-
-    return res.status(500).send(err);
-  },
-  handleForeignKeyConstraintError: function(res, app, name, err) {
-    err.message = util.format('Impossible to remove %s %s because of an existing association', app, name);
-    return res.status(500).send(err);
-  }
-};
+var _0x3e4a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x70\x61\x74\x68","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x65\x72\x72\x6F\x72\x73","\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x75\x6E\x69\x71\x75\x65","\x6D\x65\x73\x73\x61\x67\x65","\x6A\x6F\x69\x6E","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x49\x6D\x70\x6F\x73\x73\x69\x62\x6C\x65\x20\x74\x6F\x20\x72\x65\x6D\x6F\x76\x65\x20\x25\x73\x20\x25\x73\x20\x62\x65\x63\x61\x75\x73\x65\x20\x6F\x66\x20\x61\x6E\x20\x65\x78\x69\x73\x74\x69\x6E\x67\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E","\x66\x6F\x72\x6D\x61\x74"];_0x3e4a[0];var util=require(_0x3e4a[1]);module[_0x3e4a[2]]= {handleUniqueConstraintError:function(_0x2f01x2,_0x2f01x3){var _0x2f01x4=[];_0x2f01x3[_0x3e4a[6]][_0x3e4a[5]](function(_0x2f01x5){switch(_0x2f01x5[_0x3e4a[3]]){default:_0x2f01x4[_0x3e4a[4]](_0x2f01x5[_0x3e4a[3]])}});_0x2f01x4[_0x3e4a[4]](_0x3e4a[7]);_0x2f01x3[_0x3e4a[8]]= _0x2f01x4[_0x3e4a[9]]();return _0x2f01x2[_0x3e4a[11]](500)[_0x3e4a[10]](_0x2f01x3)},handleForeignKeyConstraintError:function(_0x2f01x2,_0x2f01x6,_0x2f01x7,_0x2f01x3){_0x2f01x3[_0x3e4a[8]]= util[_0x3e4a[13]](_0x3e4a[12],_0x2f01x6,_0x2f01x7);return _0x2f01x2[_0x3e4a[11]](500)[_0x3e4a[10]](_0x2f01x3)}}
\ No newline at end of file
diff --git a/server/config/util/index.js b/server/config/util/index.js
index ae792cd..4316e92 100644
--- a/server/config/util/index.js
+++ b/server/config/util/index.js
@@ -1,784 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var moment = require('moment');
-var request = require('request-promise');
-
-var User = require('../../models').User;
-var VoiceQueue = require('../../models').VoiceQueue;
-var ChatQueue = require('../../models').ChatQueue;
-var MailQueue = require('../../models').MailQueue;
-var FaxQueue = require('../../models').FaxQueue;
-var SmsQueue = require('../../models').SmsQueue;
-var OpenchannelQueue = require('../../models').OpenchannelQueue;
-var Action = require('../../models').Action;
-
-// var checkInterval = function(interval) {
-//
-//   var daysOfWeek = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
-//   var daysOfMonth = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31];
-//   var months = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];
-//   var i, shift;
-//
-//   var tRange = interval.split(',')[0];
-//   var dwRange = interval.split(',')[1];
-//   var dmRange = interval.split(',')[2];
-//   var mRange = interval.split(',')[3];
-//   // TIME RANGE CHECKING
-//   if (tRange !== '*') {
-//     var time = moment().format("HH:mm");
-//     var tFrom = tRange.split('-')[0];
-//     var tTo = tRange.split('-')[1];
-//
-//     if ((time < tFrom) || (time > tTo)) {
-//       console.log('TRANGE KO');
-//       return false;
-//     }
-//   }
-//   // DAYS OF WEEK RANGE CHECKING
-//   if (dwRange !== '*') {
-//     var cWeekDay = daysOfWeek[moment().day()];
-//     var dwFrom = _.indexOf(daysOfWeek, dwRange.split('-')[0]);
-//     var dwTo = _.indexOf(daysOfWeek, dwRange.split('-')[1]);
-//
-//     for (i = 0; i < dwFrom; i++) {
-//       shift = daysOfWeek.shift();
-//       daysOfWeek.push(shift);
-//     }
-//
-//     dwFrom = _.indexOf(daysOfWeek, dwRange.split('-')[0]);
-//     dwTo = _.indexOf(daysOfWeek, dwRange.split('-')[1]) + 1;
-//
-//     daysOfWeek = daysOfWeek.slice(dwFrom, dwTo);
-//
-//     if (!_.includes(daysOfWeek, cWeekDay)) {
-//       console.log('DWRANGE KO');
-//       return false;
-//     }
-//   }
-//   // DAYS OF MONTH RANGE CHECKING
-//   if (dmRange !== '*') {
-//     var cMonthDay = moment().date();
-//     var dmFrom = _.indexOf(daysOfMonth, parseInt(dmRange.split('-')[0], 10));
-//     var dmTo = _.indexOf(daysOfMonth, parseInt(dmRange.split('-')[1]));
-//
-//     for (i = 0; i < dmFrom; i++) {
-//       shift = daysOfMonth.shift();
-//       daysOfMonth.push(shift);
-//     }
-//
-//     dmFrom = _.indexOf(daysOfMonth, parseInt(dmRange.split('-')[0], 10));
-//     dmTo = _.indexOf(daysOfMonth, parseInt(dmRange.split('-')[1]), 10) + 1;
-//
-//     daysOfMonth = daysOfMonth.slice(dmFrom, dmTo);
-//
-//     if (!_.includes(daysOfMonth, cMonthDay)) {
-//       console.log('DMRANGE KO');
-//       return false;
-//     }
-//   }
-//   // MONTHS RANGE CHECKING
-//   if (mRange !== '*') {
-//     var cMonth = months[moment().month()];
-//     var mFrom = _.indexOf(months, mRange.split('-')[0]);
-//     var mTo = _.indexOf(months, mRange.split('-')[1]);
-//
-//     for (i = 0; i < mFrom; i++) {
-//       shift = months.shift();
-//       months.push(shift);
-//     }
-//
-//     mFrom = _.indexOf(months, mRange.split('-')[0]);
-//     mTo = _.indexOf(months, mRange.split('-')[1]) + 1;
-//
-//     months = months.slice(mFrom, mTo);
-//
-//     if (!_.includes(months, cMonth)) {
-//       console.log('MRANGE KO');
-//       return false;
-//     }
-//   }
-//
-//   console.log('INTERVAL OK');
-//
-//   return true;
-// }
-
-// var isValidInterval = function(interval) {
-//   if (_.isObject(interval)) {
-//     for (var i = 0; i < interval.SubIntervals.length; i++) {
-//       if (!checkInterval(interval.SubIntervals[i].interval)) {
-//         return false;
-//       }
-//     }
-//     return true;
-//   } else {
-//     return checkInterval(interval);
-//   }
-// }
-
-var weekDaysCollection = {
-  mon: 1,
-  tue: 2,
-  wed: 3,
-  thu: 4,
-  fri: 5,
-  sat: 6,
-  sun: 7
-};
-var monthsCollection = {
-  jan: 1,
-  feb: 2,
-  mar: 3,
-  apr: 4,
-  may: 5,
-  jun: 6,
-  jul: 7,
-  aug: 8,
-  sep: 9,
-  oct: 10,
-  nov: 11,
-  dec: 12
-};
-
-function splitInterval(interval) {
-  var finalInterval = {};
-  var splittedInterval = interval.split(',');
-  var intValues;
-  splittedInterval.forEach(function(element, index) {
-    switch (index) {
-      case 0:
-        if (element !== '*') {
-          intValues = element.split('-');
-          finalInterval.t_from = moment(intValues[0], 'HH:mm');
-          finalInterval.t_to = moment(intValues[1], 'HH:mm');
-        } else {
-          finalInterval.t_from = null;
-          finalInterval.t_to = null;
-        }
-        break;
-      case 1:
-        if (element !== '*') {
-          intValues = element.split('-');
-          finalInterval.wd_from = Number(weekDaysCollection[intValues[0]]);
-          finalInterval.wd_to = intValues[1] ? Number(weekDaysCollection[intValues[1]]) : null;
-        } else {
-          finalInterval.wd_from = null;
-          finalInterval.wd_to = null;
-        }
-        break;
-      case 2:
-        if (element !== '*') {
-          intValues = element.split('-');
-          finalInterval.md_from = Number(intValues[0]);
-          finalInterval.md_to = intValues[1] ? Number(intValues[1]) : null;
-        } else {
-          finalInterval.md_from = null;
-          finalInterval.md_to = null;
-        }
-        break;
-      case 3:
-        if (element !== '*') {
-          intValues = element.split('-');
-          finalInterval.m_from = Number(monthsCollection[intValues[0]]);
-          finalInterval.m_to = intValues[1] ? Number(monthsCollection[intValues[1]]) : null;
-        } else {
-          finalInterval.m_from = null;
-          finalInterval.m_to = null;
-        }
-        break;
-      default:
-
-    }
-
-
-  });
-  return finalInterval;
-}
-
-function isIntervalValid(interval) {
-  var hour = moment().format("HH:mm");
-  var day = moment().format("E");
-  var monthDay = moment().format("D");
-  var month = moment().format("M");
-  // console.log('Now: Hour: ', hour, ', Day: ', day, ', MonthDay: ', monthDay, ', Month: ', month);
-  // console.log('Interval:');
-  // console.log(' Hours:', moment(interval.t_from, "HH:mm").format('HH:mm'), ' - ', moment(interval.t_to, "HH:mm").format('HH:mm'));
-  // console.log(' weekday:', interval.wd_from, ' - ', interval.wd_to);
-  // console.log(' monthday:', interval.md_from, ' - ', interval.md_to);
-  // console.log(' month:', interval.m_from, ' - ', interval.m_to);
-  var tValid, wdValid, mdValid, mValid;
-  var monthsNumbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
-  var weekDaysNumbers = [1, 2, 3, 4, 5, 6, 7];
-  var daysOfMonthsNumbers = [];
-  for (var i = 1; i <= 31; i++) {
-    daysOfMonthsNumbers.push(i);
-  }
-  // console.log(interval);
-  if (interval.t_from && interval.t_to) {
-    if (interval.t_to.isAfter(interval.t_from)) {
-      tValid = moment(hour, "HH:mm").isBetween(interval.t_from, interval.t_to, null, '[]');
-    } else {
-      tValid = !moment(hour, "HH:mm").isBetween(interval.t_to, interval.t_from, null, '[]');
-    }
-  } else {
-    tValid = true;
-  }
-  if (interval.wd_from) {
-    if (interval.wd_to && interval.wd_to !== interval.wd_from) {
-      var validWeekdays = _.filter(weekDaysNumbers, function(elem) {
-        if (interval.wd_from < interval.wd_to) {
-          return (elem >= interval.wd_from) && (elem <= interval.wd_to);
-        } else {
-          return (1 <= elem && elem <= interval.wd_to) || (interval.wd_from <= elem && elem <= 7);
-        }
-      });
-      // console.log('valid weekdays', validWeekdays);
-      wdValid = (validWeekdays.indexOf(parseInt(day)) !== -1) ? true : false;
-    } else {
-      wdValid = (parseInt(day) === interval.wd_from) ? true : false;
-    }
-  } else {
-    wdValid = true;
-  }
-  if (interval.md_from) {
-    if (interval.md_to && interval.md_to !== interval.md_from) {
-      var validMonthsdays = _.filter(daysOfMonthsNumbers, function(elem) {
-        if (interval.md_from < interval.md_to) {
-          return (elem >= interval.md_from) && (elem <= interval.md_to);
-        } else {
-          return (1 <= elem && elem <= interval.md_to) || (interval.md_from <= elem && elem <= 7);
-        }
-      });
-      // console.log('valid monthsdays', validMonthsdays);
-      mdValid = (validMonthsdays.indexOf(parseInt(monthDay)) !== -1) ? true : false;
-    } else {
-      mdValid = (parseInt(monthDay) === interval.md_from) ? true : false;
-    }
-  } else {
-    mdValid = true;
-  }
-  if (interval.m_from) {
-    if (interval.m_to && interval.m_to !== interval.m_from) {
-      var validMonths = _.filter(monthsNumbers, function(elem) {
-        if (interval.m_from < interval.m_to) {
-          return (elem >= interval.m_from) && (elem <= interval.m_to);
-        } else {
-          return (1 <= elem && elem <= interval.m_to) || (interval.m_from <= elem && elem <= 7);
-        }
-      });
-      // console.log('valid months', validMonths);
-      mValid = (validMonths.indexOf(parseInt(month)) !== -1) ? true : false;
-    } else {
-      mValid = (parseInt(month) === interval.m_from) ? true : false;
-    }
-  } else {
-    mValid = true;
-  }
-  console.log('Time is ', tValid, ', WeekDay is ', wdValid, ', MonthDay is ', mdValid, ', Month is ', mValid);
-  return tValid && wdValid && mdValid && mValid;
-}
-
-var getDate = function(dateString, when) {
-  var dateTimeFormat = 'YYYY-MM-DD HH:mm';
-  if (moment(dateString, dateTimeFormat, true).isValid()) {
-    return moment(dateString);
-  } else {
-    switch (when) {
-      case 'dayStart':
-        return moment(dateString).startOf('day');
-      case 'dayEnd':
-        return moment(dateString).endOf('day');
-      default:
-        return moment(dateString);
-    }
-  }
-}
-
-var getQuery = function(query, extraWhere) {
-  var _query = {
-    where: {}
-  };
-
-  if (query) {
-    var realKey, condition = {};
-    for (var key in query) { //DO NOT change with lodash forEach, or the properties will not be removed from the query object!
-      if (_.includes(key, '_uiFrom')) {
-        realKey = key.replace('_uiFrom', '');
-        if (query[realKey + '_uiTo']) {
-          _query.where.$and = _query.where.$and || [];
-          condition = {};
-          condition[realKey] = {
-            $gte: getDate(query[key], 'dayStart')
-          };
-          _query.where.$and.push(condition);
-          condition = {};
-          condition[realKey] = {
-            $lte: getDate(query[realKey + '_uiTo'], 'dayEnd')
-          };
-          _query.where.$and.push(condition);
-          delete query[realKey + '_uiTo'];
-        } else {
-          _query.where[key.replace('_uiFrom', '')] = {
-            $gte: getDate(query[key], 'dayStart')
-          };
-        }
-        delete query[key];
-      } else if (_.includes(key, '_uiTo')) {
-        realKey = key.replace('_uiTo', '');
-        if (query[realKey + '_uiFrom']) {
-          _query.where.$and = _query.where.$and || [];
-          condition = {};
-          condition[realKey] = {
-            $lte: getDate(query[key], 'dayEnd')
-          };
-          _query.where.$and.push(condition);
-          condition[realKey] = {
-            $gte: getDate(query[realKey + '_uiFrom'], 'dayStart')
-          };
-          _query.where.$and.push(condition);
-          delete query[realKey + '_uiFrom'];
-        } else {
-          _query.where[key.replace('_uiTo', '')] = {
-            $lte: getDate(query[key], 'dayEnd')
-          };
-        }
-        delete query[key];
-      }
-    }
-
-    _.forEach(query, function(value, key) {
-      switch (key) {
-        case 'offset':
-        case 'limit':
-          _query[key] = Number(value);
-          break;
-        case 'order':
-          _query[key] = value;
-          break;
-        case 'type':
-        case 'parent':
-          _query.where[key] = value;
-          break;
-        default:
-          _query.where[key] = {
-            $like: '%' + value + '%'
-          };
-      }
-    });
-  }
-
-
-
-  if (extraWhere) {
-    _.merge(_query.where, extraWhere);
-  }
-
-  return _query;
-}
-
-var getVoiceQueuesIdByUser = function(query, extraQuery) { //differently from the extraWhere, this will be merged with all the query options, not just the where. Useful for inclusions and other query options
-  return function(user) {
-    var _queues = [];
-    var _user = user;
-    var _query = query || {};
-    var _extraQuery = extraQuery || {};
-
-    return _user
-      .getPVoiceQueues({
-        attributes: ['name']
-      })
-      .then(function(queues) {
-        _queues = _.map(queues, 'name');
-      })
-      .then(function() {
-        return VoiceQueue
-          .findAndCountAll(_.merge(getQuery(query, {
-            name: {
-              $in: _queues
-            }
-          }), _extraQuery));
-      });
-  };
-}
-
-var getChatQueuesIdByUser = function(query, extraQuery) {
-  return function(user) {
-    var _queues = [];
-    var _user = user;
-    var _query = query || {};
-    var _extraQuery = _.merge(extraQuery || {}, {
-      distinct: true
-    });
-
-    return _user
-      .getPChatQueues({
-        attributes: ['id']
-      })
-      .then(function(queues) {
-        _queues = _.map(queues, 'id');
-      })
-      .then(function() {
-        return ChatQueue
-          .scope('default')
-          .findAndCountAll(_.merge(getQuery(_query, {
-            id: {
-              $in: _queues
-            }
-          }), _extraQuery));
-      });
-  };
-}
-
-var getMailQueuesIdByUser = function(query, extraQuery) {
-  return function(user) {
-    var _queues = [];
-    var _user = user;
-    var _query = query || {};
-    var _extraQuery = _.merge(extraQuery || {}, {
-      distinct: true
-    });
-
-    return _user
-      .getPMailQueues({
-        attributes: ['id']
-      })
-      .then(function(queues) {
-        _queues = _.map(queues, 'id');
-      })
-      .then(function() {
-        return MailQueue
-          .scope('default')
-          .findAndCountAll(_.merge(getQuery(_query, {
-            id: {
-              $in: _queues
-            }
-          }), _extraQuery));
-      });
-  };
-}
-var getSmsQueuesIdByUser = function(query, extraQuery) {
-  return function(user) {
-    var _queues = [];
-    var _user = user;
-    var _query = query || {};
-    var _extraQuery = _.merge(extraQuery || {}, {
-      distinct: true
-    });
-
-    return _user
-      .getPSmsQueues({
-        attributes: ['id']
-      })
-      .then(function(queues) {
-        _queues = _.map(queues, 'id');
-      })
-      .then(function() {
-        return SmsQueue
-          .scope('default')
-          .findAndCountAll(_.merge(getQuery(_query, {
-            id: {
-              $in: _queues
-            }
-          }), _extraQuery));
-      });
-  };
-}
-
-var getFaxQueuesIdByUser = function(query, extraQuery) {
-  return function(user) {
-    var _queues = [];
-    var _user = user;
-    var _query = query || {};
-    var _extraQuery = _.merge(extraQuery || {}, {
-      distinct: true
-    });
-
-    return _user
-      .getPFaxQueues({
-        attributes: ['id']
-      })
-      .then(function(queues) {
-        _queues = _.map(queues, 'id');
-      })
-      .then(function() {
-        return FaxQueue
-          .scope('default')
-          .findAndCountAll(_.merge(getQuery(_query, {
-            id: {
-              $in: _queues
-            }
-          }), _extraQuery));
-      });
-  };
-}
-var getOpenchannelQueuesIdByUser = function(query, extraQuery) {
-  return function(user) {
-    var _queues = [];
-    var _user = user;
-    var _query = query || {};
-    var _extraQuery = _.merge(extraQuery || {}, {
-      distinct: true
-    });
-
-    return _user
-      .getPOpenchannelQueues({
-        attributes: ['id']
-      })
-      .then(function(queues) {
-        _queues = _.map(queues, 'id');
-      })
-      .then(function() {
-        return OpenchannelQueue
-          .scope('default')
-          .findAndCountAll(_.merge(getQuery(_query, {
-            id: {
-              $in: _queues
-            }
-          }), _extraQuery));
-      });
-  };
-}
-var getAgentsIdByUser = function(query) {
-  return function(user) {
-    var _users = [];
-    var _user = user;
-    var _query = query || {};
-    var _voiceQueues = [],
-      _chatQueues = [],
-      _mailQueues = [],
-      _faxQueues = [],
-      _openchannelQueues = [],
-      _smsQueues = [];
-
-    return _user
-      .getPVoiceQueues({
-        attributes: ['name'],
-        include: [{
-          raw: true,
-          model: User,
-          attributes: ['id']
-        }]
-      })
-      .then(function(queues) {
-        _voiceQueues = _.map(queues, 'name');
-        queues.forEach(function(queue) {
-          _users = _.union(_users, _.map(queue.Users, 'id'));
-        });
-      })
-      .then(function() {
-        return _user
-          .getPChatQueues({
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: User,
-              attributes: ['id']
-            }]
-          });
-      })
-      .then(function(queues) {
-        _chatQueues = _.map(queues, 'id');
-        queues.forEach(function(queue) {
-          _users = _.union(_users, _.map(queue.Users, 'id'));
-        });
-      })
-      .then(function() {
-        return _user
-          .getPMailQueues({
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: User,
-              attributes: ['id']
-            }]
-          });
-      })
-      .then(function(queues) {
-        _mailQueues = _.map(queues, 'id');
-        queues.forEach(function(queue) {
-          _users = _.union(_users, _.map(queue.Users, 'id'));
-        });
-      })
-      .then(function() {
-        return _user
-          .getPFaxQueues({
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: User,
-              attributes: ['id']
-            }]
-          });
-      })
-      .then(function(queues) {
-        _faxQueues = _.map(queues, 'id');
-        queues.forEach(function(queue) {
-          _users = _.union(_users, _.map(queue.Users, 'id'));
-        });
-      })
-      .then(function() {
-        return _user
-          .getPSmsQueues({
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: User,
-              attributes: ['id']
-            }]
-          });
-      })
-      .then(function(queues) {
-        _smsQueues = _.map(queues, 'id');
-        queues.forEach(function(queue) {
-          _users = _.union(_users, _.map(queue.Users, 'id'));
-        });
-      })
-      .then(function() {
-        return _user
-          .getPOpenchannelQueues({
-            attributes: ['id'],
-            include: [{
-              raw: true,
-              model: User,
-              attributes: ['id']
-            }]
-          });
-      })
-      .then(function(queues) {
-        _openchannelQueues = _.map(queues, 'id');
-        queues.forEach(function(queue) {
-          _users = _.union(_users, _.map(queue.Users, 'id'));
-        });
-      })
-      .then(function() {
-        return User
-          .scope('agent', {
-            method: ['checkPauseStatus', _query]
-          }, {
-            method: ['checkQueueStatus', _query]
-          }, {
-            method: ['checkOnlineStatus', _query]
-          }, {
-            method: ['checkSipStatus', _query]
-          })
-          .findAndCountAll(_.merge(getQuery(_query, {
-            id: {
-              $in: _users
-            }
-          }), {
-            include: [{
-              model: VoiceQueue,
-              where: {
-                name: {
-                  $in: _voiceQueues
-                }
-              },
-              required: false
-            }, {
-              model: ChatQueue,
-              where: {
-                id: {
-                  $in: _chatQueues
-                }
-              },
-              required: false
-            }, {
-              model: MailQueue,
-              where: {
-                id: {
-                  $in: _mailQueues
-                }
-              },
-              required: false
-            }, {
-              model: FaxQueue,
-              where: {
-                id: {
-                  $in: _faxQueues
-                }
-              },
-              required: false
-            }, {
-              model: SmsQueue,
-              where: {
-                id: {
-                  $in: _smsQueues
-                }
-              },
-              required: false
-            }, {
-              model: OpenchannelQueue,
-              where: {
-                id: {
-                  $in: _openchannelQueues
-                }
-              },
-              required: false
-            }]
-          }));
-      })
-  };
-}
-
-var stripTrailingSlash = function(str) {
-  if (str.substr(-1) === '/') {
-    return str.substr(0, str.length - 1);
-  }
-  return str;
-}
-var sendRequest = function(data, method, uri) {
-    if (method == 'GET' || method == 'POST') {
-      var options = {
-        method: method,
-        uri: uri,
-        body: data,
-        json: true // Automatically stringifies the body to JSON
-      };
-      return request(options);
-    } else {
-      console.log('Unknown Method');
-    }
-  }
-  // HANDLE action
-var execAction = function(action, data) {
-  switch (action.action) {
-    case 'pause':
-      Action
-        .create({
-          name: action.action,
-          data4: action.type || 'DEFAULT PAUSE' //to track the pause type in the actions table
-        }, {
-          body: {
-            name: action.action,
-            agent: data.memberid,
-            type: action.type || 'DEFAULT PAUSE', // to set the pauseType in the user record
-          }
-        })
-        .then(function() {
-          console.log('Action Successful');
-        })
-        .catch(function(err) {
-          console.log('Action Failed', err);
-        });
-      break;
-    default:
-      console.log('Unknown Action');
-  }
-}
-module.exports = {
-  getQuery: getQuery,
-  getVoiceQueuesIdByUser: getVoiceQueuesIdByUser,
-  getChatQueuesIdByUser: getChatQueuesIdByUser,
-  getMailQueuesIdByUser: getMailQueuesIdByUser,
-  getFaxQueuesIdByUser: getFaxQueuesIdByUser,
-  getSmsQueuesIdByUser: getSmsQueuesIdByUser,
-  getOpenchannelQueuesIdByUser: getOpenchannelQueuesIdByUser,
-  getAgentsIdByUser: getAgentsIdByUser,
-  stripTrailingSlash: stripTrailingSlash,
-  splitInterval: splitInterval,
-  isValidInterval: isIntervalValid,
-  sendRequest: sendRequest,
-  execAction: execAction,
-  errorManager: require('./error')
-};
+var _0x7e76=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x41\x63\x74\x69\x6F\x6E","\x2C","\x73\x70\x6C\x69\x74","\x2A","\x2D","\x74\x5F\x66\x72\x6F\x6D","\x48\x48\x3A\x6D\x6D","\x74\x5F\x74\x6F","\x77\x64\x5F\x66\x72\x6F\x6D","\x77\x64\x5F\x74\x6F","\x6D\x64\x5F\x66\x72\x6F\x6D","\x6D\x64\x5F\x74\x6F","\x6D\x5F\x66\x72\x6F\x6D","\x6D\x5F\x74\x6F","\x66\x6F\x72\x45\x61\x63\x68","\x66\x6F\x72\x6D\x61\x74","\x45","\x44","\x4D","\x70\x75\x73\x68","\x69\x73\x41\x66\x74\x65\x72","\x5B\x5D","\x69\x73\x42\x65\x74\x77\x65\x65\x6E","\x66\x69\x6C\x74\x65\x72","\x69\x6E\x64\x65\x78\x4F\x66","\x54\x69\x6D\x65\x20\x69\x73\x20","\x2C\x20\x57\x65\x65\x6B\x44\x61\x79\x20\x69\x73\x20","\x2C\x20\x4D\x6F\x6E\x74\x68\x44\x61\x79\x20\x69\x73\x20","\x2C\x20\x4D\x6F\x6E\x74\x68\x20\x69\x73\x20","\x6C\x6F\x67","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x69\x73\x56\x61\x6C\x69\x64","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x64\x61\x79\x53\x74\x61\x72\x74","\x65\x6E\x64\x4F\x66","\x64\x61\x79\x45\x6E\x64","\x5F\x75\x69\x46\x72\x6F\x6D","\x69\x6E\x63\x6C\x75\x64\x65\x73","","\x72\x65\x70\x6C\x61\x63\x65","\x5F\x75\x69\x54\x6F","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x6F\x72\x64\x65\x72","\x74\x79\x70\x65","\x70\x61\x72\x65\x6E\x74","\x25","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x74\x68\x65\x6E","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x69\x64","\x67\x65\x74\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x63\x68\x65\x63\x6B\x50\x61\x75\x73\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x4F\x6E\x6C\x69\x6E\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x53\x69\x70\x53\x74\x61\x74\x75\x73","\x75\x6E\x69\x6F\x6E","\x73\x75\x62\x73\x74\x72","\x2F","\x6C\x65\x6E\x67\x74\x68","\x47\x45\x54","\x50\x4F\x53\x54","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x4D\x65\x74\x68\x6F\x64","\x41\x63\x74\x69\x6F\x6E\x20\x46\x61\x69\x6C\x65\x64","\x63\x61\x74\x63\x68","\x41\x63\x74\x69\x6F\x6E\x20\x53\x75\x63\x63\x65\x73\x73\x66\x75\x6C","\x61\x63\x74\x69\x6F\x6E","\x44\x45\x46\x41\x55\x4C\x54\x20\x50\x41\x55\x53\x45","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x63\x72\x65\x61\x74\x65","\x70\x61\x75\x73\x65","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x41\x63\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x2E\x2F\x65\x72\x72\x6F\x72"];_0x7e76[0];var _=require(_0x7e76[1]);var moment=require(_0x7e76[2]);var request=require(_0x7e76[3]);var User=require(_0x7e76[5])[_0x7e76[4]];var VoiceQueue=require(_0x7e76[5])[_0x7e76[6]];var ChatQueue=require(_0x7e76[5])[_0x7e76[7]];var MailQueue=require(_0x7e76[5])[_0x7e76[8]];var FaxQueue=require(_0x7e76[5])[_0x7e76[9]];var SmsQueue=require(_0x7e76[5])[_0x7e76[10]];var OpenchannelQueue=require(_0x7e76[5])[_0x7e76[11]];var Action=require(_0x7e76[5])[_0x7e76[12]];var weekDaysCollection={mon:1,tue:2,wed:3,thu:4,fri:5,sat:6,sun:7};var monthsCollection={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12};function splitInterval(_0x14b4xf){var _0x14b4x10={};var _0x14b4x11=_0x14b4xf[_0x7e76[14]](_0x7e76[13]);var _0x14b4x12;_0x14b4x11[_0x7e76[26]](function(_0x14b4x13,_0x14b4x14){switch(_0x14b4x14){case 0:if(_0x14b4x13!== _0x7e76[15]){_0x14b4x12= _0x14b4x13[_0x7e76[14]](_0x7e76[16]);_0x14b4x10[_0x7e76[17]]= moment(_0x14b4x12[0],_0x7e76[18]);_0x14b4x10[_0x7e76[19]]= moment(_0x14b4x12[1],_0x7e76[18])}else {_0x14b4x10[_0x7e76[17]]= null;_0x14b4x10[_0x7e76[19]]= null};break;case 1:if(_0x14b4x13!== _0x7e76[15]){_0x14b4x12= _0x14b4x13[_0x7e76[14]](_0x7e76[16]);_0x14b4x10[_0x7e76[20]]= Number(weekDaysCollection[_0x14b4x12[0]]);_0x14b4x10[_0x7e76[21]]= _0x14b4x12[1]?Number(weekDaysCollection[_0x14b4x12[1]]):null}else {_0x14b4x10[_0x7e76[20]]= null;_0x14b4x10[_0x7e76[21]]= null};break;case 2:if(_0x14b4x13!== _0x7e76[15]){_0x14b4x12= _0x14b4x13[_0x7e76[14]](_0x7e76[16]);_0x14b4x10[_0x7e76[22]]= Number(_0x14b4x12[0]);_0x14b4x10[_0x7e76[23]]= _0x14b4x12[1]?Number(_0x14b4x12[1]):null}else {_0x14b4x10[_0x7e76[22]]= null;_0x14b4x10[_0x7e76[23]]= null};break;case 3:if(_0x14b4x13!== _0x7e76[15]){_0x14b4x12= _0x14b4x13[_0x7e76[14]](_0x7e76[16]);_0x14b4x10[_0x7e76[24]]= Number(monthsCollection[_0x14b4x12[0]]);_0x14b4x10[_0x7e76[25]]= _0x14b4x12[1]?Number(monthsCollection[_0x14b4x12[1]]):null}else {_0x14b4x10[_0x7e76[24]]= null;_0x14b4x10[_0x7e76[25]]= null};break;default:}});return _0x14b4x10}function isIntervalValid(_0x14b4xf){var _0x14b4x16=moment()[_0x7e76[27]](_0x7e76[18]);var _0x14b4x17=moment()[_0x7e76[27]](_0x7e76[28]);var _0x14b4x18=moment()[_0x7e76[27]](_0x7e76[29]);var _0x14b4x19=moment()[_0x7e76[27]](_0x7e76[30]);var _0x14b4x1a,_0x14b4x1b,_0x14b4x1c,_0x14b4x1d;var _0x14b4x1e=[1,2,3,4,5,6,7,8,9,10,11,12];var _0x14b4x1f=[1,2,3,4,5,6,7];var _0x14b4x20=[];for(var _0x14b4x21=1;_0x14b4x21<= 31;_0x14b4x21++){_0x14b4x20[_0x7e76[31]](_0x14b4x21)};if(_0x14b4xf[_0x7e76[17]]&& _0x14b4xf[_0x7e76[19]]){if(_0x14b4xf[_0x7e76[19]][_0x7e76[32]](_0x14b4xf[_0x7e76[17]])){_0x14b4x1a= moment(_0x14b4x16,_0x7e76[18])[_0x7e76[34]](_0x14b4xf[_0x7e76[17]],_0x14b4xf[_0x7e76[19]],null,_0x7e76[33])}else {_0x14b4x1a= !moment(_0x14b4x16,_0x7e76[18])[_0x7e76[34]](_0x14b4xf[_0x7e76[19]],_0x14b4xf[_0x7e76[17]],null,_0x7e76[33])}}else {_0x14b4x1a= true};if(_0x14b4xf[_0x7e76[20]]){if(_0x14b4xf[_0x7e76[21]]&& _0x14b4xf[_0x7e76[21]]!== _0x14b4xf[_0x7e76[20]]){var _0x14b4x22=_[_0x7e76[35]](_0x14b4x1f,function(_0x14b4x23){if(_0x14b4xf[_0x7e76[20]]< _0x14b4xf[_0x7e76[21]]){return (_0x14b4x23>= _0x14b4xf[_0x7e76[20]])&& (_0x14b4x23<= _0x14b4xf[_0x7e76[21]])}else {return (1<= _0x14b4x23&& _0x14b4x23<= _0x14b4xf[_0x7e76[21]])|| (_0x14b4xf[_0x7e76[20]]<= _0x14b4x23&& _0x14b4x23<= 7)}});_0x14b4x1b= (_0x14b4x22[_0x7e76[36]](parseInt(_0x14b4x17))!==  -1)?true:false}else {_0x14b4x1b= (parseInt(_0x14b4x17)=== _0x14b4xf[_0x7e76[20]])?true:false}}else {_0x14b4x1b= true};if(_0x14b4xf[_0x7e76[22]]){if(_0x14b4xf[_0x7e76[23]]&& _0x14b4xf[_0x7e76[23]]!== _0x14b4xf[_0x7e76[22]]){var _0x14b4x24=_[_0x7e76[35]](_0x14b4x20,function(_0x14b4x23){if(_0x14b4xf[_0x7e76[22]]< _0x14b4xf[_0x7e76[23]]){return (_0x14b4x23>= _0x14b4xf[_0x7e76[22]])&& (_0x14b4x23<= _0x14b4xf[_0x7e76[23]])}else {return (1<= _0x14b4x23&& _0x14b4x23<= _0x14b4xf[_0x7e76[23]])|| (_0x14b4xf[_0x7e76[22]]<= _0x14b4x23&& _0x14b4x23<= 7)}});_0x14b4x1c= (_0x14b4x24[_0x7e76[36]](parseInt(_0x14b4x18))!==  -1)?true:false}else {_0x14b4x1c= (parseInt(_0x14b4x18)=== _0x14b4xf[_0x7e76[22]])?true:false}}else {_0x14b4x1c= true};if(_0x14b4xf[_0x7e76[24]]){if(_0x14b4xf[_0x7e76[25]]&& _0x14b4xf[_0x7e76[25]]!== _0x14b4xf[_0x7e76[24]]){var _0x14b4x25=_[_0x7e76[35]](_0x14b4x1e,function(_0x14b4x23){if(_0x14b4xf[_0x7e76[24]]< _0x14b4xf[_0x7e76[25]]){return (_0x14b4x23>= _0x14b4xf[_0x7e76[24]])&& (_0x14b4x23<= _0x14b4xf[_0x7e76[25]])}else {return (1<= _0x14b4x23&& _0x14b4x23<= _0x14b4xf[_0x7e76[25]])|| (_0x14b4xf[_0x7e76[24]]<= _0x14b4x23&& _0x14b4x23<= 7)}});_0x14b4x1d= (_0x14b4x25[_0x7e76[36]](parseInt(_0x14b4x19))!==  -1)?true:false}else {_0x14b4x1d= (parseInt(_0x14b4x19)=== _0x14b4xf[_0x7e76[24]])?true:false}}else {_0x14b4x1d= true};console[_0x7e76[41]](_0x7e76[37],_0x14b4x1a,_0x7e76[38],_0x14b4x1b,_0x7e76[39],_0x14b4x1c,_0x7e76[40],_0x14b4x1d);return _0x14b4x1a&& _0x14b4x1b&& _0x14b4x1c&& _0x14b4x1d}var getDate=function(_0x14b4x27,_0x14b4x28){var _0x14b4x29=_0x7e76[42];if(moment(_0x14b4x27,_0x14b4x29,true)[_0x7e76[43]]()){return moment(_0x14b4x27)}else {switch(_0x14b4x28){case _0x7e76[46]:return moment(_0x14b4x27)[_0x7e76[45]](_0x7e76[44]);case _0x7e76[48]:return moment(_0x14b4x27)[_0x7e76[47]](_0x7e76[44]);default:return moment(_0x14b4x27)}}};var getQuery=function(_0x14b4x2b,_0x14b4x2c){var _0x14b4x2d={where:{}};if(_0x14b4x2b){var _0x14b4x2e,_0x14b4x2f={};for(var _0x14b4x30 in _0x14b4x2b){if(_[_0x7e76[50]](_0x14b4x30,_0x7e76[49])){_0x14b4x2e= _0x14b4x30[_0x7e76[52]](_0x7e76[49],_0x7e76[51]);if(_0x14b4x2b[_0x14b4x2e+ _0x7e76[53]]){_0x14b4x2d[_0x7e76[55]][_0x7e76[54]]= _0x14b4x2d[_0x7e76[55]][_0x7e76[54]]|| [];_0x14b4x2f= {};_0x14b4x2f[_0x14b4x2e]= {$gte:getDate(_0x14b4x2b[_0x14b4x30],_0x7e76[46])};_0x14b4x2d[_0x7e76[55]][_0x7e76[54]][_0x7e76[31]](_0x14b4x2f);_0x14b4x2f= {};_0x14b4x2f[_0x14b4x2e]= {$lte:getDate(_0x14b4x2b[_0x14b4x2e+ _0x7e76[53]],_0x7e76[48])};_0x14b4x2d[_0x7e76[55]][_0x7e76[54]][_0x7e76[31]](_0x14b4x2f);delete _0x14b4x2b[_0x14b4x2e+ _0x7e76[53]]}else {_0x14b4x2d[_0x7e76[55]][_0x14b4x30[_0x7e76[52]](_0x7e76[49],_0x7e76[51])]= {$gte:getDate(_0x14b4x2b[_0x14b4x30],_0x7e76[46])}};delete _0x14b4x2b[_0x14b4x30]}else {if(_[_0x7e76[50]](_0x14b4x30,_0x7e76[53])){_0x14b4x2e= _0x14b4x30[_0x7e76[52]](_0x7e76[53],_0x7e76[51]);if(_0x14b4x2b[_0x14b4x2e+ _0x7e76[49]]){_0x14b4x2d[_0x7e76[55]][_0x7e76[54]]= _0x14b4x2d[_0x7e76[55]][_0x7e76[54]]|| [];_0x14b4x2f= {};_0x14b4x2f[_0x14b4x2e]= {$lte:getDate(_0x14b4x2b[_0x14b4x30],_0x7e76[48])};_0x14b4x2d[_0x7e76[55]][_0x7e76[54]][_0x7e76[31]](_0x14b4x2f);_0x14b4x2f[_0x14b4x2e]= {$gte:getDate(_0x14b4x2b[_0x14b4x2e+ _0x7e76[49]],_0x7e76[46])};_0x14b4x2d[_0x7e76[55]][_0x7e76[54]][_0x7e76[31]](_0x14b4x2f);delete _0x14b4x2b[_0x14b4x2e+ _0x7e76[49]]}else {_0x14b4x2d[_0x7e76[55]][_0x14b4x30[_0x7e76[52]](_0x7e76[53],_0x7e76[51])]= {$lte:getDate(_0x14b4x2b[_0x14b4x30],_0x7e76[48])}};delete _0x14b4x2b[_0x14b4x30]}}};_[_0x7e76[26]](_0x14b4x2b,function(_0x14b4x31,_0x14b4x30){switch(_0x14b4x30){case _0x7e76[56]:;case _0x7e76[57]:_0x14b4x2d[_0x14b4x30]= Number(_0x14b4x31);break;case _0x7e76[58]:_0x14b4x2d[_0x14b4x30]= _0x14b4x31;break;case _0x7e76[59]:;case _0x7e76[60]:_0x14b4x2d[_0x7e76[55]][_0x14b4x30]= _0x14b4x31;break;default:_0x14b4x2d[_0x7e76[55]][_0x14b4x30]= {$like:_0x7e76[61]+ _0x14b4x31+ _0x7e76[61]}}})};if(_0x14b4x2c){_[_0x7e76[62]](_0x14b4x2d[_0x7e76[55]],_0x14b4x2c)};return _0x14b4x2d};var getVoiceQueuesIdByUser=function(_0x14b4x2b,_0x14b4x33){return function(_0x14b4x34){var _0x14b4x35=[];var _0x14b4x36=_0x14b4x34;var _0x14b4x2d=_0x14b4x2b|| {};var _0x14b4x37=_0x14b4x33|| {};return _0x14b4x36[_0x7e76[67]]({attributes:[_0x7e76[65]]})[_0x7e76[64]](function(_0x14b4x38){_0x14b4x35= _[_0x7e76[66]](_0x14b4x38,_0x7e76[65])})[_0x7e76[64]](function(){return VoiceQueue[_0x7e76[63]](_[_0x7e76[62]](getQuery(_0x14b4x2b,{name:{$in:_0x14b4x35}}),_0x14b4x37))})}};var getChatQueuesIdByUser=function(_0x14b4x2b,_0x14b4x33){return function(_0x14b4x34){var _0x14b4x35=[];var _0x14b4x36=_0x14b4x34;var _0x14b4x2d=_0x14b4x2b|| {};var _0x14b4x37=_[_0x7e76[62]](_0x14b4x33|| {},{distinct:true});return _0x14b4x36[_0x7e76[71]]({attributes:[_0x7e76[70]]})[_0x7e76[64]](function(_0x14b4x38){_0x14b4x35= _[_0x7e76[66]](_0x14b4x38,_0x7e76[70])})[_0x7e76[64]](function(){return ChatQueue[_0x7e76[69]](_0x7e76[68])[_0x7e76[63]](_[_0x7e76[62]](getQuery(_0x14b4x2d,{id:{$in:_0x14b4x35}}),_0x14b4x37))})}};var getMailQueuesIdByUser=function(_0x14b4x2b,_0x14b4x33){return function(_0x14b4x34){var _0x14b4x35=[];var _0x14b4x36=_0x14b4x34;var _0x14b4x2d=_0x14b4x2b|| {};var _0x14b4x37=_[_0x7e76[62]](_0x14b4x33|| {},{distinct:true});return _0x14b4x36[_0x7e76[72]]({attributes:[_0x7e76[70]]})[_0x7e76[64]](function(_0x14b4x38){_0x14b4x35= _[_0x7e76[66]](_0x14b4x38,_0x7e76[70])})[_0x7e76[64]](function(){return MailQueue[_0x7e76[69]](_0x7e76[68])[_0x7e76[63]](_[_0x7e76[62]](getQuery(_0x14b4x2d,{id:{$in:_0x14b4x35}}),_0x14b4x37))})}};var getSmsQueuesIdByUser=function(_0x14b4x2b,_0x14b4x33){return function(_0x14b4x34){var _0x14b4x35=[];var _0x14b4x36=_0x14b4x34;var _0x14b4x2d=_0x14b4x2b|| {};var _0x14b4x37=_[_0x7e76[62]](_0x14b4x33|| {},{distinct:true});return _0x14b4x36[_0x7e76[73]]({attributes:[_0x7e76[70]]})[_0x7e76[64]](function(_0x14b4x38){_0x14b4x35= _[_0x7e76[66]](_0x14b4x38,_0x7e76[70])})[_0x7e76[64]](function(){return SmsQueue[_0x7e76[69]](_0x7e76[68])[_0x7e76[63]](_[_0x7e76[62]](getQuery(_0x14b4x2d,{id:{$in:_0x14b4x35}}),_0x14b4x37))})}};var getFaxQueuesIdByUser=function(_0x14b4x2b,_0x14b4x33){return function(_0x14b4x34){var _0x14b4x35=[];var _0x14b4x36=_0x14b4x34;var _0x14b4x2d=_0x14b4x2b|| {};var _0x14b4x37=_[_0x7e76[62]](_0x14b4x33|| {},{distinct:true});return _0x14b4x36[_0x7e76[74]]({attributes:[_0x7e76[70]]})[_0x7e76[64]](function(_0x14b4x38){_0x14b4x35= _[_0x7e76[66]](_0x14b4x38,_0x7e76[70])})[_0x7e76[64]](function(){return FaxQueue[_0x7e76[69]](_0x7e76[68])[_0x7e76[63]](_[_0x7e76[62]](getQuery(_0x14b4x2d,{id:{$in:_0x14b4x35}}),_0x14b4x37))})}};var getOpenchannelQueuesIdByUser=function(_0x14b4x2b,_0x14b4x33){return function(_0x14b4x34){var _0x14b4x35=[];var _0x14b4x36=_0x14b4x34;var _0x14b4x2d=_0x14b4x2b|| {};var _0x14b4x37=_[_0x7e76[62]](_0x14b4x33|| {},{distinct:true});return _0x14b4x36[_0x7e76[75]]({attributes:[_0x7e76[70]]})[_0x7e76[64]](function(_0x14b4x38){_0x14b4x35= _[_0x7e76[66]](_0x14b4x38,_0x7e76[70])})[_0x7e76[64]](function(){return OpenchannelQueue[_0x7e76[69]](_0x7e76[68])[_0x7e76[63]](_[_0x7e76[62]](getQuery(_0x14b4x2d,{id:{$in:_0x14b4x35}}),_0x14b4x37))})}};var getAgentsIdByUser=function(_0x14b4x2b){return function(_0x14b4x34){var _0x14b4x3f=[];var _0x14b4x36=_0x14b4x34;var _0x14b4x2d=_0x14b4x2b|| {};var _0x14b4x40=[],_0x14b4x41=[],_0x14b4x42=[],_0x14b4x43=[],_0x14b4x44=[],_0x14b4x45=[];return _0x14b4x36[_0x7e76[67]]({attributes:[_0x7e76[65]],include:[{raw:true,model:User,attributes:[_0x7e76[70]]}]})[_0x7e76[64]](function(_0x14b4x38){_0x14b4x40= _[_0x7e76[66]](_0x14b4x38,_0x7e76[65]);_0x14b4x38[_0x7e76[26]](function(_0x14b4x46){_0x14b4x3f= _[_0x7e76[81]](_0x14b4x3f,_[_0x7e76[66]](_0x14b4x46.Users,_0x7e76[70]))})})[_0x7e76[64]](function(){return _0x14b4x36[_0x7e76[71]]({attributes:[_0x7e76[70]],include:[{raw:true,model:User,attributes:[_0x7e76[70]]}]})})[_0x7e76[64]](function(_0x14b4x38){_0x14b4x41= _[_0x7e76[66]](_0x14b4x38,_0x7e76[70]);_0x14b4x38[_0x7e76[26]](function(_0x14b4x46){_0x14b4x3f= _[_0x7e76[81]](_0x14b4x3f,_[_0x7e76[66]](_0x14b4x46.Users,_0x7e76[70]))})})[_0x7e76[64]](function(){return _0x14b4x36[_0x7e76[72]]({attributes:[_0x7e76[70]],include:[{raw:true,model:User,attributes:[_0x7e76[70]]}]})})[_0x7e76[64]](function(_0x14b4x38){_0x14b4x42= _[_0x7e76[66]](_0x14b4x38,_0x7e76[70]);_0x14b4x38[_0x7e76[26]](function(_0x14b4x46){_0x14b4x3f= _[_0x7e76[81]](_0x14b4x3f,_[_0x7e76[66]](_0x14b4x46.Users,_0x7e76[70]))})})[_0x7e76[64]](function(){return _0x14b4x36[_0x7e76[74]]({attributes:[_0x7e76[70]],include:[{raw:true,model:User,attributes:[_0x7e76[70]]}]})})[_0x7e76[64]](function(_0x14b4x38){_0x14b4x43= _[_0x7e76[66]](_0x14b4x38,_0x7e76[70]);_0x14b4x38[_0x7e76[26]](function(_0x14b4x46){_0x14b4x3f= _[_0x7e76[81]](_0x14b4x3f,_[_0x7e76[66]](_0x14b4x46.Users,_0x7e76[70]))})})[_0x7e76[64]](function(){return _0x14b4x36[_0x7e76[73]]({attributes:[_0x7e76[70]],include:[{raw:true,model:User,attributes:[_0x7e76[70]]}]})})[_0x7e76[64]](function(_0x14b4x38){_0x14b4x45= _[_0x7e76[66]](_0x14b4x38,_0x7e76[70]);_0x14b4x38[_0x7e76[26]](function(_0x14b4x46){_0x14b4x3f= _[_0x7e76[81]](_0x14b4x3f,_[_0x7e76[66]](_0x14b4x46.Users,_0x7e76[70]))})})[_0x7e76[64]](function(){return _0x14b4x36[_0x7e76[75]]({attributes:[_0x7e76[70]],include:[{raw:true,model:User,attributes:[_0x7e76[70]]}]})})[_0x7e76[64]](function(_0x14b4x38){_0x14b4x44= _[_0x7e76[66]](_0x14b4x38,_0x7e76[70]);_0x14b4x38[_0x7e76[26]](function(_0x14b4x46){_0x14b4x3f= _[_0x7e76[81]](_0x14b4x3f,_[_0x7e76[66]](_0x14b4x46.Users,_0x7e76[70]))})})[_0x7e76[64]](function(){return User[_0x7e76[69]](_0x7e76[76],{method:[_0x7e76[77],_0x14b4x2d]},{method:[_0x7e76[78],_0x14b4x2d]},{method:[_0x7e76[79],_0x14b4x2d]},{method:[_0x7e76[80],_0x14b4x2d]})[_0x7e76[63]](_[_0x7e76[62]](getQuery(_0x14b4x2d,{id:{$in:_0x14b4x3f}}),{include:[{model:VoiceQueue,where:{name:{$in:_0x14b4x40}},required:false},{model:ChatQueue,where:{id:{$in:_0x14b4x41}},required:false},{model:MailQueue,where:{id:{$in:_0x14b4x42}},required:false},{model:FaxQueue,where:{id:{$in:_0x14b4x43}},required:false},{model:SmsQueue,where:{id:{$in:_0x14b4x45}},required:false},{model:OpenchannelQueue,where:{id:{$in:_0x14b4x44}},required:false}]}))})}};var stripTrailingSlash=function(_0x14b4x48){if(_0x14b4x48[_0x7e76[82]](-1) === _0x7e76[83]){return _0x14b4x48[_0x7e76[82]](0,_0x14b4x48[_0x7e76[84]]- 1)};return _0x14b4x48};var sendRequest=function(_0x14b4x4a,_0x14b4x4b,_0x14b4x4c){if(_0x14b4x4b== _0x7e76[85]|| _0x14b4x4b== _0x7e76[86]){var _0x14b4x4d={method:_0x14b4x4b,uri:_0x14b4x4c,body:_0x14b4x4a,json:true};return request(_0x14b4x4d)}else {console[_0x7e76[41]](_0x7e76[87])}};var execAction=function(_0x14b4x4f,_0x14b4x4a){switch(_0x14b4x4f[_0x7e76[91]]){case _0x7e76[95]:Action[_0x7e76[94]]({name:_0x14b4x4f[_0x7e76[91]],data4:_0x14b4x4f[_0x7e76[59]]|| _0x7e76[92]},{body:{name:_0x14b4x4f[_0x7e76[91]],agent:_0x14b4x4a[_0x7e76[93]],type:_0x14b4x4f[_0x7e76[59]]|| _0x7e76[92]}})[_0x7e76[64]](function(){console[_0x7e76[41]](_0x7e76[90])})[_0x7e76[89]](function(_0x14b4x50){console[_0x7e76[41]](_0x7e76[88],_0x14b4x50)});break;default:console[_0x7e76[41]](_0x7e76[96])}};module[_0x7e76[97]]= {getQuery:getQuery,getVoiceQueuesIdByUser:getVoiceQueuesIdByUser,getChatQueuesIdByUser:getChatQueuesIdByUser,getMailQueuesIdByUser:getMailQueuesIdByUser,getFaxQueuesIdByUser:getFaxQueuesIdByUser,getSmsQueuesIdByUser:getSmsQueuesIdByUser,getOpenchannelQueuesIdByUser:getOpenchannelQueuesIdByUser,getAgentsIdByUser:getAgentsIdByUser,stripTrailingSlash:stripTrailingSlash,splitInterval:splitInterval,isValidInterval:isIntervalValid,sendRequest:sendRequest,execAction:execAction,errorManager:require(_0x7e76[98])}
\ No newline at end of file
diff --git a/server/migrations-history/20160801125118-placeholder.js b/server/migrations-history/20160801125118-placeholder.js
index f9b590d..5d4b31f 100644
--- a/server/migrations-history/20160801125118-placeholder.js
+++ b/server/migrations-history/20160801125118-placeholder.js
@@ -1,23 +1 @@
-'use strict';
-
-module.exports = {
-  up: function (queryInterface, Sequelize) {
-    /*
-      Add altering commands here.
-      Return a promise to correctly handle asynchronicity.
-
-      Example:
-      return queryInterface.createTable('users', { id: Sequelize.INTEGER });
-    */
-  },
-
-  down: function (queryInterface, Sequelize) {
-    /*
-      Add reverting commands here.
-      Return a promise to correctly handle asynchronicity.
-
-      Example:
-      return queryInterface.dropTable('users');
-    */
-  }
-};
+var _0x5cfc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x5cfc[0];module[_0x5cfc[1]]= {up:function(_0xab61x1,_0xab61x2){},down:function(_0xab61x1,_0xab61x2){}}
\ No newline at end of file
diff --git a/server/migrations-history/20160916135658-report-session.js b/server/migrations-history/20160916135658-report-session.js
index 300487f..a1c9ae7 100644
--- a/server/migrations-history/20160916135658-report-session.js
+++ b/server/migrations-history/20160916135658-report-session.js
@@ -1,19 +1 @@
-'use strict';
-
-module.exports = {
-  up: function(queryInterface, Sequelize) {
-    queryInterface.addColumn('report_chat_session_history', 'timeslot', Sequelize.INTEGER);
-    queryInterface.addColumn('report_mail_session_history', 'timeslot', Sequelize.INTEGER);
-    queryInterface.addColumn('report_fax_session_history', 'timeslot', Sequelize.INTEGER);
-    queryInterface.addColumn('report_sms_session_history', 'timeslot', Sequelize.INTEGER);
-    queryInterface.addColumn('report_openchannel_session_history', 'timeslot', Sequelize.INTEGER);
-  },
-
-  down: function(queryInterface, Sequelize) {
-    queryInterface.removeColumn('report_chat_session_history', 'timeslot');
-    queryInterface.removeColumn('report_mail_session_history', 'timeslot');
-    queryInterface.removeColumn('report_fax_session_history', 'timeslot');
-    queryInterface.removeColumn('report_sms_session_history', 'timeslot');
-    queryInterface.removeColumn('report_openchannel_session_history', 'timeslot');
-  }
-};
+var _0xadfd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x74\x69\x6D\x65\x73\x6C\x6F\x74","\x61\x64\x64\x43\x6F\x6C\x75\x6D\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x6D\x6F\x76\x65\x43\x6F\x6C\x75\x6D\x6E"];_0xadfd[0];module[_0xadfd[1]]= {up:function(_0xb20ex1,_0xb20ex2){_0xb20ex1[_0xadfd[4]](_0xadfd[2],_0xadfd[3],_0xb20ex2.INTEGER);_0xb20ex1[_0xadfd[4]](_0xadfd[5],_0xadfd[3],_0xb20ex2.INTEGER);_0xb20ex1[_0xadfd[4]](_0xadfd[6],_0xadfd[3],_0xb20ex2.INTEGER);_0xb20ex1[_0xadfd[4]](_0xadfd[7],_0xadfd[3],_0xb20ex2.INTEGER);_0xb20ex1[_0xadfd[4]](_0xadfd[8],_0xadfd[3],_0xb20ex2.INTEGER)},down:function(_0xb20ex1,_0xb20ex2){_0xb20ex1[_0xadfd[9]](_0xadfd[2],_0xadfd[3]);_0xb20ex1[_0xadfd[9]](_0xadfd[5],_0xadfd[3]);_0xb20ex1[_0xadfd[9]](_0xadfd[6],_0xadfd[3]);_0xb20ex1[_0xadfd[9]](_0xadfd[7],_0xadfd[3]);_0xb20ex1[_0xadfd[9]](_0xadfd[8],_0xadfd[3])}}
\ No newline at end of file
diff --git a/server/migrations-history/20160920170835-report_tdial.js b/server/migrations-history/20160920170835-report_tdial.js
index 97e1e5d..791d719 100644
--- a/server/migrations-history/20160920170835-report_tdial.js
+++ b/server/migrations-history/20160920170835-report_tdial.js
@@ -1,14 +1 @@
-'use strict';
-
-module.exports = {
-  up: function(queryInterface, Sequelize) {
-    queryInterface.addColumn('report_tdial_history', 'monitor_event', {
-      type: Sequelize.INTEGER(11),
-      defaultValue: 0
-    });
-  },
-
-  down: function(queryInterface, Sequelize) {
-    queryInterface.removeColumn('report_tdial_history', 'monitor_event');
-  }
-};
+var _0x1f9d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x72\x65\x70\x6F\x72\x74\x5F\x74\x64\x69\x61\x6C\x5F\x68\x69\x73\x74\x6F\x72\x79","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x65\x76\x65\x6E\x74","\x61\x64\x64\x43\x6F\x6C\x75\x6D\x6E","\x72\x65\x6D\x6F\x76\x65\x43\x6F\x6C\x75\x6D\x6E"];_0x1f9d[0];module[_0x1f9d[1]]= {up:function(_0x6e1cx1,_0x6e1cx2){_0x6e1cx1[_0x1f9d[4]](_0x1f9d[2],_0x1f9d[3],{type:_0x6e1cx2.INTEGER(11),defaultValue:0})},down:function(_0x6e1cx1,_0x6e1cx2){_0x6e1cx1[_0x1f9d[5]](_0x1f9d[2],_0x1f9d[3])}}
\ No newline at end of file
diff --git a/server/migrations-history/20161005162141-report_tdial_history.js b/server/migrations-history/20161005162141-report_tdial_history.js
index 78ec4b4..35b19d0 100644
--- a/server/migrations-history/20161005162141-report_tdial_history.js
+++ b/server/migrations-history/20161005162141-report_tdial_history.js
@@ -1,472 +1 @@
-'use strict';
-
-module.exports = {
-  up: function(queryInterface, Sequelize) {
-
-    //New fields
-    queryInterface.addColumn('report_tdial_history', 'preview_peer', {
-      type: Sequelize.STRING,
-      defaultValue: ''
-    });
-
-    //DataTypes wrong
-    queryInterface.changeColumn('report_tdial_history', 'channel_date', {
-      type: Sequelize.DATEONLY,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'channel_time', {
-      type: Sequelize.TIME,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'dialed_date', {
-      type: Sequelize.DATEONLY,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'dialed_time', {
-      type: Sequelize.TIME,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'hangup_date', {
-      type: Sequelize.DATEONLY,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'hangup_time', {
-      type: Sequelize.TIME,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'insert_list_date', {
-      type: Sequelize.DATEONLY,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'insert_list_time', {
-      type: Sequelize.TIME,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'linked_connect_date', {
-      type: Sequelize.DATEONLY,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'linked_connect_time', {
-      type: Sequelize.TIME,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'linked_date', {
-      type: Sequelize.DATEONLY,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'linked_time', {
-      type: Sequelize.TIME,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'queue_joined_date', {
-      type: Sequelize.DATEONLY,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'queue_joined_time', {
-      type: Sequelize.TIME,
-      allowNull: true
-    })
-
-    //defaultValue wrong - STRING
-    queryInterface.changeColumn('report_tdial_history', 'channel', {
-      type: Sequelize.STRING,
-      allowNull: true,
-      defaultValue: ''
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'channel_callerid_name', {
-      type: Sequelize.STRING,
-      allowNull: true,
-      defaultValue: ''
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'channel_callerid_num', {
-      type: Sequelize.STRING,
-      allowNull: true,
-      defaultValue: ''
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'device', {
-      type: Sequelize.STRING,
-      allowNull: true,
-      defaultValue: ''
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'dialed_callerid_name', {
-      type: Sequelize.STRING,
-      allowNull: true,
-      defaultValue: ''
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'dialed_channel', {
-      type: Sequelize.STRING,
-      allowNull: true,
-      defaultValue: ''
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'linked_callerid_name', {
-      type: Sequelize.STRING,
-      allowNull: true,
-      defaultValue: ''
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'linked_channel', {
-      type: Sequelize.STRING,
-      allowNull: true,
-      defaultValue: ''
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'linkedid', {
-      type: Sequelize.STRING,
-      allowNull: true,
-      defaultValue: ''
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'list_name', {
-      type: Sequelize.STRING,
-      allowNull: true,
-      defaultValue: ''
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'number', {
-      type: Sequelize.STRING,
-      allowNull: true,
-      defaultValue: ''
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'process_name', {
-      type: Sequelize.STRING,
-      allowNull: true,
-      defaultValue: ''
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'queue', {
-      type: Sequelize.STRING,
-      allowNull: true,
-      defaultValue: ''
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'rtdtm', {
-      type: Sequelize.STRING,
-      allowNull: true,
-      defaultValue: ''
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'rttime', {
-      type: Sequelize.STRING,
-      allowNull: true,
-      defaultValue: ''
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'source', {
-      type: Sequelize.STRING,
-      allowNull: true,
-      defaultValue: ''
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'spooler_name', {
-      type: Sequelize.STRING,
-      allowNull: true,
-      defaultValue: ''
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'uniqueid', {
-      type: Sequelize.STRING,
-      allowNull: true,
-      defaultValue: ''
-    })
-
-    //defaultValue wrong - INT
-    queryInterface.changeColumn('report_tdial_history', 'channel_event', {
-      type: Sequelize.INTEGER(11),
-      allowNull: true,
-      defaultValue: 0
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'dialed_event', {
-      type: Sequelize.INTEGER(11),
-      allowNull: true,
-      defaultValue: 0
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'id_list', {
-      type: Sequelize.BIGINT,
-      allowNull: true,
-      defaultValue: 0
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'id_process', {
-      type: Sequelize.BIGINT,
-      allowNull: true,
-      defaultValue: 0
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'id_source', {
-      type: Sequelize.BIGINT,
-      allowNull: true,
-      defaultValue: 0
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'id_spooler', {
-      type: Sequelize.BIGINT,
-      allowNull: true,
-      defaultValue: 0
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'linked_event', {
-      type: Sequelize.INTEGER(11),
-      allowNull: true,
-      defaultValue: 0
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'preview_event', {
-      type: Sequelize.INTEGER(11),
-      allowNull: true,
-      defaultValue: 0
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'queue_entry_event', {
-      type: Sequelize.INTEGER(11),
-      allowNull: true,
-      defaultValue: 0
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'queue_position', {
-      type: Sequelize.INTEGER(11),
-      allowNull: true,
-      defaultValue: 0
-    })
-
-  },
-
-  down: function(queryInterface, Sequelize) {
-    //New fields
-    queryInterface.removeColumn('report_tdial_history', 'preview_peer');
-
-    //DataTypes wrong
-    queryInterface.changeColumn('report_tdial_history', 'channel_date', {
-      type: Sequelize.DATE,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'channel_time', {
-      type: Sequelize.DATE,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'dialed_date', {
-      type: Sequelize.DATE,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'dialed_time', {
-      type: Sequelize.DATE,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'hangup_date', {
-      type: Sequelize.DATE,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'hangup_time', {
-      type: Sequelize.DATE,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'insert_list_date', {
-      type: Sequelize.DATE,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'insert_list_time', {
-      type: Sequelize.DATE,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'linked_connect_date', {
-      type: Sequelize.DATE,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'linked_connect_time', {
-      type: Sequelize.DATE,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'linked_date', {
-      type: Sequelize.DATE,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'linked_time', {
-      type: Sequelize.DATE,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'queue_joined_date', {
-      type: Sequelize.DATE,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'queue_joined_time', {
-      type: Sequelize.DATE,
-      allowNull: true
-    })
-
-    //defaultValue wrong - STRING
-    queryInterface.changeColumn('report_tdial_history', 'channel', {
-      type: Sequelize.STRING,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'channel_callerid_name', {
-      type: Sequelize.STRING,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'channel_callerid_num', {
-      type: Sequelize.STRING,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'device', {
-      type: Sequelize.STRING,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'dialed_callerid_name', {
-      type: Sequelize.STRING,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'dialed_channel', {
-      type: Sequelize.STRING,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'linked_callerid_name', {
-      type: Sequelize.STRING,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'linked_channel', {
-      type: Sequelize.STRING,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'linkedid', {
-      type: Sequelize.STRING,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'list_name', {
-      type: Sequelize.STRING,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'number', {
-      type: Sequelize.STRING,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'process_name', {
-      type: Sequelize.STRING,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'queue', {
-      type: Sequelize.STRING,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'rtdtm', {
-      type: Sequelize.STRING,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'rttime', {
-      type: Sequelize.STRING,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'source', {
-      type: Sequelize.STRING,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'spooler_name', {
-      type: Sequelize.STRING,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'uniqueid', {
-      type: Sequelize.STRING,
-      allowNull: true
-    })
-
-    //defaultValue wrong - INT
-    queryInterface.changeColumn('report_tdial_history', 'channel_event', {
-      type: Sequelize.INTEGER(11),
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'dialed_event', {
-      type: Sequelize.INTEGER(11),
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'id_list', {
-      type: Sequelize.BIGINT,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'id_process', {
-      type: Sequelize.BIGINT,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'id_source', {
-      type: Sequelize.BIGINT,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'id_spooler', {
-      type: Sequelize.BIGINT,
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'linked_event', {
-      type: Sequelize.INTEGER(11),
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'preview_event', {
-      type: Sequelize.INTEGER(11),
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'queue_entry_event', {
-      type: Sequelize.INTEGER(11),
-      allowNull: true
-    })
-
-    queryInterface.changeColumn('report_tdial_history', 'queue_position', {
-      type: Sequelize.INTEGER(11),
-      allowNull: true
-    })
-  }
-};
+var _0x6b79=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x72\x65\x70\x6F\x72\x74\x5F\x74\x64\x69\x61\x6C\x5F\x68\x69\x73\x74\x6F\x72\x79","\x70\x72\x65\x76\x69\x65\x77\x5F\x70\x65\x65\x72","\x53\x54\x52\x49\x4E\x47","","\x61\x64\x64\x43\x6F\x6C\x75\x6D\x6E","\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x74\x65","\x44\x41\x54\x45\x4F\x4E\x4C\x59","\x63\x68\x61\x6E\x67\x65\x43\x6F\x6C\x75\x6D\x6E","\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x74\x69\x6D\x65","\x54\x49\x4D\x45","\x64\x69\x61\x6C\x65\x64\x5F\x64\x61\x74\x65","\x64\x69\x61\x6C\x65\x64\x5F\x74\x69\x6D\x65","\x68\x61\x6E\x67\x75\x70\x5F\x64\x61\x74\x65","\x68\x61\x6E\x67\x75\x70\x5F\x74\x69\x6D\x65","\x69\x6E\x73\x65\x72\x74\x5F\x6C\x69\x73\x74\x5F\x64\x61\x74\x65","\x69\x6E\x73\x65\x72\x74\x5F\x6C\x69\x73\x74\x5F\x74\x69\x6D\x65","\x6C\x69\x6E\x6B\x65\x64\x5F\x63\x6F\x6E\x6E\x65\x63\x74\x5F\x64\x61\x74\x65","\x6C\x69\x6E\x6B\x65\x64\x5F\x63\x6F\x6E\x6E\x65\x63\x74\x5F\x74\x69\x6D\x65","\x6C\x69\x6E\x6B\x65\x64\x5F\x64\x61\x74\x65","\x6C\x69\x6E\x6B\x65\x64\x5F\x74\x69\x6D\x65","\x71\x75\x65\x75\x65\x5F\x6A\x6F\x69\x6E\x65\x64\x5F\x64\x61\x74\x65","\x71\x75\x65\x75\x65\x5F\x6A\x6F\x69\x6E\x65\x64\x5F\x74\x69\x6D\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x63\x61\x6C\x6C\x65\x72\x69\x64\x5F\x6E\x61\x6D\x65","\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x63\x61\x6C\x6C\x65\x72\x69\x64\x5F\x6E\x75\x6D","\x64\x65\x76\x69\x63\x65","\x64\x69\x61\x6C\x65\x64\x5F\x63\x61\x6C\x6C\x65\x72\x69\x64\x5F\x6E\x61\x6D\x65","\x64\x69\x61\x6C\x65\x64\x5F\x63\x68\x61\x6E\x6E\x65\x6C","\x6C\x69\x6E\x6B\x65\x64\x5F\x63\x61\x6C\x6C\x65\x72\x69\x64\x5F\x6E\x61\x6D\x65","\x6C\x69\x6E\x6B\x65\x64\x5F\x63\x68\x61\x6E\x6E\x65\x6C","\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x6C\x69\x73\x74\x5F\x6E\x61\x6D\x65","\x6E\x75\x6D\x62\x65\x72","\x70\x72\x6F\x63\x65\x73\x73\x5F\x6E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x72\x74\x64\x74\x6D","\x72\x74\x74\x69\x6D\x65","\x73\x6F\x75\x72\x63\x65","\x73\x70\x6F\x6F\x6C\x65\x72\x5F\x6E\x61\x6D\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x65\x76\x65\x6E\x74","\x64\x69\x61\x6C\x65\x64\x5F\x65\x76\x65\x6E\x74","\x69\x64\x5F\x6C\x69\x73\x74","\x42\x49\x47\x49\x4E\x54","\x69\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x69\x64\x5F\x73\x6F\x75\x72\x63\x65","\x69\x64\x5F\x73\x70\x6F\x6F\x6C\x65\x72","\x6C\x69\x6E\x6B\x65\x64\x5F\x65\x76\x65\x6E\x74","\x70\x72\x65\x76\x69\x65\x77\x5F\x65\x76\x65\x6E\x74","\x71\x75\x65\x75\x65\x5F\x65\x6E\x74\x72\x79\x5F\x65\x76\x65\x6E\x74","\x71\x75\x65\x75\x65\x5F\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65\x43\x6F\x6C\x75\x6D\x6E","\x44\x41\x54\x45"];_0x6b79[0];module[_0x6b79[1]]= {up:function(_0xd66fx1,_0xd66fx2){_0xd66fx1[_0x6b79[6]](_0x6b79[2],_0x6b79[3],{type:_0xd66fx2[_0x6b79[4]],defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[7],{type:_0xd66fx2[_0x6b79[8]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[10],{type:_0xd66fx2[_0x6b79[11]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[12],{type:_0xd66fx2[_0x6b79[8]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[13],{type:_0xd66fx2[_0x6b79[11]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[14],{type:_0xd66fx2[_0x6b79[8]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[15],{type:_0xd66fx2[_0x6b79[11]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[16],{type:_0xd66fx2[_0x6b79[8]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[17],{type:_0xd66fx2[_0x6b79[11]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[18],{type:_0xd66fx2[_0x6b79[8]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[19],{type:_0xd66fx2[_0x6b79[11]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[20],{type:_0xd66fx2[_0x6b79[8]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[21],{type:_0xd66fx2[_0x6b79[11]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[22],{type:_0xd66fx2[_0x6b79[8]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[23],{type:_0xd66fx2[_0x6b79[11]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[24],{type:_0xd66fx2[_0x6b79[4]],allowNull:true,defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[25],{type:_0xd66fx2[_0x6b79[4]],allowNull:true,defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[26],{type:_0xd66fx2[_0x6b79[4]],allowNull:true,defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[27],{type:_0xd66fx2[_0x6b79[4]],allowNull:true,defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[28],{type:_0xd66fx2[_0x6b79[4]],allowNull:true,defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[29],{type:_0xd66fx2[_0x6b79[4]],allowNull:true,defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[30],{type:_0xd66fx2[_0x6b79[4]],allowNull:true,defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[31],{type:_0xd66fx2[_0x6b79[4]],allowNull:true,defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[32],{type:_0xd66fx2[_0x6b79[4]],allowNull:true,defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[33],{type:_0xd66fx2[_0x6b79[4]],allowNull:true,defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[34],{type:_0xd66fx2[_0x6b79[4]],allowNull:true,defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[35],{type:_0xd66fx2[_0x6b79[4]],allowNull:true,defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[36],{type:_0xd66fx2[_0x6b79[4]],allowNull:true,defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[37],{type:_0xd66fx2[_0x6b79[4]],allowNull:true,defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[38],{type:_0xd66fx2[_0x6b79[4]],allowNull:true,defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[39],{type:_0xd66fx2[_0x6b79[4]],allowNull:true,defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[40],{type:_0xd66fx2[_0x6b79[4]],allowNull:true,defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[41],{type:_0xd66fx2[_0x6b79[4]],allowNull:true,defaultValue:_0x6b79[5]});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[42],{type:_0xd66fx2.INTEGER(11),allowNull:true,defaultValue:0});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[43],{type:_0xd66fx2.INTEGER(11),allowNull:true,defaultValue:0});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[44],{type:_0xd66fx2[_0x6b79[45]],allowNull:true,defaultValue:0});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[46],{type:_0xd66fx2[_0x6b79[45]],allowNull:true,defaultValue:0});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[47],{type:_0xd66fx2[_0x6b79[45]],allowNull:true,defaultValue:0});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[48],{type:_0xd66fx2[_0x6b79[45]],allowNull:true,defaultValue:0});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[49],{type:_0xd66fx2.INTEGER(11),allowNull:true,defaultValue:0});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[50],{type:_0xd66fx2.INTEGER(11),allowNull:true,defaultValue:0});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[51],{type:_0xd66fx2.INTEGER(11),allowNull:true,defaultValue:0});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[52],{type:_0xd66fx2.INTEGER(11),allowNull:true,defaultValue:0})},down:function(_0xd66fx1,_0xd66fx2){_0xd66fx1[_0x6b79[53]](_0x6b79[2],_0x6b79[3]);_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[7],{type:_0xd66fx2[_0x6b79[54]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[10],{type:_0xd66fx2[_0x6b79[54]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[12],{type:_0xd66fx2[_0x6b79[54]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[13],{type:_0xd66fx2[_0x6b79[54]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[14],{type:_0xd66fx2[_0x6b79[54]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[15],{type:_0xd66fx2[_0x6b79[54]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[16],{type:_0xd66fx2[_0x6b79[54]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[17],{type:_0xd66fx2[_0x6b79[54]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[18],{type:_0xd66fx2[_0x6b79[54]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[19],{type:_0xd66fx2[_0x6b79[54]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[20],{type:_0xd66fx2[_0x6b79[54]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[21],{type:_0xd66fx2[_0x6b79[54]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[22],{type:_0xd66fx2[_0x6b79[54]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[23],{type:_0xd66fx2[_0x6b79[54]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[24],{type:_0xd66fx2[_0x6b79[4]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[25],{type:_0xd66fx2[_0x6b79[4]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[26],{type:_0xd66fx2[_0x6b79[4]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[27],{type:_0xd66fx2[_0x6b79[4]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[28],{type:_0xd66fx2[_0x6b79[4]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[29],{type:_0xd66fx2[_0x6b79[4]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[30],{type:_0xd66fx2[_0x6b79[4]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[31],{type:_0xd66fx2[_0x6b79[4]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[32],{type:_0xd66fx2[_0x6b79[4]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[33],{type:_0xd66fx2[_0x6b79[4]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[34],{type:_0xd66fx2[_0x6b79[4]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[35],{type:_0xd66fx2[_0x6b79[4]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[36],{type:_0xd66fx2[_0x6b79[4]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[37],{type:_0xd66fx2[_0x6b79[4]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[38],{type:_0xd66fx2[_0x6b79[4]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[39],{type:_0xd66fx2[_0x6b79[4]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[40],{type:_0xd66fx2[_0x6b79[4]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[41],{type:_0xd66fx2[_0x6b79[4]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[42],{type:_0xd66fx2.INTEGER(11),allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[43],{type:_0xd66fx2.INTEGER(11),allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[44],{type:_0xd66fx2[_0x6b79[45]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[46],{type:_0xd66fx2[_0x6b79[45]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[47],{type:_0xd66fx2[_0x6b79[45]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[48],{type:_0xd66fx2[_0x6b79[45]],allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[49],{type:_0xd66fx2.INTEGER(11),allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[50],{type:_0xd66fx2.INTEGER(11),allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[51],{type:_0xd66fx2.INTEGER(11),allowNull:true});_0xd66fx1[_0x6b79[9]](_0x6b79[2],_0x6b79[52],{type:_0xd66fx2.INTEGER(11),allowNull:true})}}
\ No newline at end of file
diff --git a/server/routes.js b/server/routes.js
index 593ba9d..4efef1a 100644
--- a/server/routes.js
+++ b/server/routes.js
@@ -1,171 +1 @@
-/**
- * Main application routes
- */
-
-'use strict';
-
-var config = require('./config/environment');
-var errors = require('./components/errors');
-var path = require('path');
-var moment = require('moment');
-
-module.exports = function(app, ami) {
-  var env = app.get('env');
-  app.locals.ami = ami;
-
-
-
-  // Insert routes below
-  app.use('/api/report/openchannel/sessions', require('./api/report_openchannel_session'));
-  app.use('/api/report/openchannel', require('./api/report_openchannel'));
-  app.use('/api/openchannel/user_has_queues', require('./api/user_has_openchannel_queue'));
-  app.use('/api/openchannel/disposition', require('./api/openchannel_disposition'));
-  app.use('/api/openchannel/applications', require('./api/openchannel_application'));
-  app.use('/api/openchannel/queues', require('./api/openchannel_queue'));
-  app.use('/api/openchannel/rooms', require('./api/openchannel_room'));
-  app.use('/api/openchannel/messages', require('./api/openchannel_message'));
-  app.use('/api/openchannel/accounts', require('./api/openchannel_account'));
-  app.use('/api/fax/dispositions', require('./api/fax_disposition'));
-  app.use('/api/sms/dispositions', require('./api/sms_disposition'));
-  app.use('/api/mail/dispositions', require('./api/mail_disposition'));
-  app.use('/api/chat/dispositions', require('./api/chat_disposition'));
-  app.use('/api/voice/dispositions', require('./api/voice_disposition'));
-  app.use('/api/scheduler', require('./api/scheduler'));
-  app.use('/api/fax/attachments', require('./api/fax_attachment'));
-  app.use('/api/report/fax/sessions', require('./api/report_fax_session'));
-  app.use('/api/report/faxs', require('./api/report_fax'));
-  app.use('/api/network/externips', require('./api/network_externip'));
-  app.use('/api/network/localnets', require('./api/network_localnet'));
-  app.use('/api/sms/queues', require('./api/sms_queue'));
-  app.use('/api/sms/applications', require('./api/sms_application'));
-  app.use('/api/sms/messages', require('./api/sms_message'));
-  app.use('/api/sms/rooms', require('./api/sms_room'));
-  app.use('/api/sms/accounts', require('./api/sms_account'));
-  app.use('/api/report/calls', require('./api/report_call'));
-  app.use('/api/report/dials', require('./api/report_dial'));
-  app.use('/api/chat/proactives', require('./api/chat_proactive_action'));
-  app.use('/api/chat/websites/fields', require('./api/chat_websites_field'));
-  app.use('/api/answers', require('./api/canned_answer'));
-  app.use('/api/actions', require('./api/action'));
-  app.use('/api/pauses', require('./api/pause'));
-  app.use('/api/voice/recordings', require('./api/voice_recording'));
-  app.use('/api/jscripty/projects', require('./api/jscripty_project'));
-  app.use('/api/telephones', require('./api/telephone'));
-  app.use('/api/licenses', require('./api/license'));
-  app.use('/api/sugarcrm/fields', require('./api/sugarcrm_field'));
-  app.use('/api/sugarcrm/configurations', require('./api/sugarcrm_configuration'));
-  app.use('/api/sugarcrm/accounts', require('./api/sugarcrm_account'));
-  app.use('/api/freshdesk/fields', require('./api/freshdesk_field'));
-  app.use('/api/freshdesk/configurations', require('./api/freshdesk_configuration'));
-  app.use('/api/freshdesk/accounts', require('./api/freshdesk_account'));
-  app.use('/api/salesforce/fields', require('./api/salesforce_field'));
-  app.use('/api/salesforce/configurations', require('./api/salesforce_configuration'));
-  app.use('/api/salesforce/accounts', require('./api/salesforce_account'));
-  app.use('/api/desk/fields', require('./api/desk_field'));
-  app.use('/api/desk/configurations', require('./api/desk_configuration'));
-  app.use('/api/desk/accounts', require('./api/desk_account'));
-  app.use('/api/analytics/reports/default', require('./api/default_report'));
-  app.use('/api/analytics/reports/custom', require('./api/custom_report'));
-  app.use('/api/analytics/reports/trees', require('./api/report_tree'));
-  app.use('/api/analytics/metrics/default', require('./api/default_metric'));
-  app.use('/api/analytics/metrics', require('./api/metric'));
-  app.use('/api/modules', require('./api/module'));
-  app.use('/api/analytics/extracted', require('./api/extracted_report'));
-  app.use('/api/updates', require('./api/update'));
-  app.use('/api/report/chat/sessions', require('./api/report_chat_session'));
-  app.use('/api/zendesk/fields', require('./api/zendesk_field'));
-  app.use('/api/report/chats', require('./api/report_chat'));
-  app.use('/api/zendesk/configurations', require('./api/zendesk_configuration'));
-  app.use('/api/motionbar', require('./api/motionbar'));
-  app.use('/api/report/motiondialer', require('./api/report_tiger_dial'));
-  app.use('/api/report/mail/sessions', require('./api/report_mail_session'));
-  app.use('/api/report/sms/sessions', require('./api/report_sms_session'));
-  app.use('/api/report/mails', require('./api/report_mail'));
-  app.use('/api/report/sms', require('./api/report_sms'));
-  app.use('/api/widgets', require('./api/widget'));
-  app.use('/api/zendesk/accounts', require('./api/zendesk_account'));
-  app.use('/api/report/queues', require('./api/report_queue'));
-  app.use('/api/report/integrations', require('./api/report_integration'));
-  app.use('/api/report/agents', require('./api/report_agent'));
-  app.use('/api/report/members', require('./api/report_member'));
-  app.use('/api/report/square', require('./api/report_square'));
-  app.use('/api/report/square/details', require('./api/report_square_detail'));
-  app.use('/api/dashboards', require('./api/dashboard'));
-  app.use('/api/settings', require('./api/setting'));
-  app.use('/api/triggers', require('./api/trigger'));
-  app.use('/api/automations', require('./api/automation'));
-  app.use('/api/templates', require('./api/template'));
-  app.use('/api/ami', require('./api/ami'));
-  app.use('/api/integrations', require('./api/integration'));
-  app.use('/api/voice/musiconholds', require('./api/voice_musiconhold'));
-  app.use('/api/voice/voicemails/messages', require('./api/voice_voicemail_messages'));
-  app.use('/api/voice/voicemails', require('./api/voice_voicemail'));
-  app.use('/api/contactmanager/contacts', require('./api/contact_manager'));
-  app.use('/api/contactmanager/companies', require('./api/company'));
-  app.use('/api/contactmanager/lists', require('./api/list'));
-  app.use('/api/contactmanager/user_has_lists', require('./api/user_has_list'));
-  app.use('/api/intervals', require('./api/interval'));
-  app.use('/api/voice/extensions', require('./api/voice_extension'));
-  app.use('/api/voice/contexts', require('./api/voice_context'));
-  app.use('/api/voice/user_has_queues', require('./api/user_has_voice_queue'));
-  app.use('/api/voice/queues', require('./api/voice_queue'));
-  app.use('/api/trunks', require('./api/trunk'));
-  app.use('/api/chat/applications', require('./api/chat_application'));
-  app.use('/api/chat/user_has_queues', require('./api/user_has_chat_queue'));
-  app.use('/api/square/odbc', require('./api/square_odbc'));
-  app.use('/api/square/recordings', require('./api/square_recording'));
-  app.use('/api/fax/applications', require('./api/fax_application'));
-  app.use('/api/fax/user_has_queues', require('./api/user_has_fax_queue'));
-  app.use('/api/sms/user_has_queues', require('./api/user_has_sms_queue'));
-  app.use('/api/fax/queues', require('./api/fax_queue'));
-  app.use('/api/mail/attachments', require('./api/mail_attachment'));
-  app.use('/api/user_has_teams', require('./api/user_has_team'));
-  app.use('/api/variables', require('./api/variable'));
-  app.use('/api/chanspy', require('./api/chanspy'));
-  app.use('/api/tags', require('./api/tag'));
-  app.use('/api/square/projects', require('./api/square_project'));
-  app.use('/api/chat/queues', require('./api/chat_queue'));
-  app.use('/api/fax/messages', require('./api/fax_message'));
-  app.use('/api/fax/rooms', require('./api/fax_room'));
-  app.use('/api/fax/accounts', require('./api/fax_account'));
-  app.use('/api/agents', require('./api/agent'));
-  app.use('/api/chat/enquiries', require('./api/chat_enquiry'));
-  app.use('/api/chat/messages', require('./api/chat_message'));
-  app.use('/api/chat/rooms', require('./api/chat_room'));
-  app.use('/api/chat/visitors', require('./api/chat_visitor'));
-  app.use('/api/chat/websites', require('./api/chat_website'));
-  app.use('/api/chat/queues', require('./api/chat_queue'));
-  app.use('/api/mail/accounts', require('./api/mail_account'));
-  app.use('/api/mail/messages', require('./api/mail_message'));
-  app.use('/api/mail/rooms', require('./api/mail_room'));
-  app.use('/api/mail/servers/in', require('./api/mail_server_in'));
-  app.use('/api/mail/servers/out', require('./api/mail_server_out'));
-  app.use('/api/mail/queues', require('./api/mail_queue'));
-  app.use('/api/mail/user_has_queues', require('./api/user_has_mail_queue'));
-  app.use('/api/mail/applications', require('./api/mail_application'));
-  app.use('/api/teams', require('./api/team'));
-  app.use('/api/sounds', require('./api/sound'));
-  app.use('/api/users', require('./api/user'));
-  app.use('/api/chat/user_has_rooms', require('./api/user_has_chat_room'));
-  app.use('/api/xchatty', require('./api/xchatty'));
-  app.use('/auth', require('./auth'));
-
-  // All undefined asset or api routes should return a 404
-  app.route('/:url(api|auth|components|app|bower_components|assets)/*').get(errors[404]);
-
-  // All other routes should redirect to the index.html
-  app.all("/*", function(req, res, next) {
-
-    var options = {};
-
-    if ('production' === env) {
-      options.root = path.join(config.root, 'public');
-    }
-
-    if ('development' === env || 'test' === env) {
-      options.root = path.join(config.root, 'client');
-    }
-
-    res.sendFile('index.html', options);
-  });
-};
+var _0xd3f5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x65\x72\x72\x6F\x72\x73","\x70\x61\x74\x68","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x65\x6E\x76","\x67\x65\x74","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x75\x73\x65","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x72\x6F\x6F\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x72\x6F\x6F\x6D","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x2E\x2F\x61\x70\x69\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x66\x61\x78\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x66\x61\x78\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78","\x2F\x61\x70\x69\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2F\x65\x78\x74\x65\x72\x6E\x69\x70\x73","\x2E\x2F\x61\x70\x69\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x65\x78\x74\x65\x72\x6E\x69\x70","\x2F\x61\x70\x69\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2F\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x6C\x6F\x63\x61\x6C\x6E\x65\x74","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x72\x6F\x6F\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x72\x6F\x6F\x6D","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x63\x61\x6C\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x64\x69\x61\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x77\x65\x62\x73\x69\x74\x65\x73\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x61\x6E\x73\x77\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72","\x2F\x61\x70\x69\x2F\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x70\x61\x75\x73\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x70\x61\x75\x73\x65","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74","\x2F\x61\x70\x69\x2F\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x2F\x61\x70\x69\x2F\x6C\x69\x63\x65\x6E\x73\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6C\x69\x63\x65\x6E\x73\x65","\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x64\x65\x66\x61\x75\x6C\x74","\x2E\x2F\x61\x70\x69\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x63\x75\x73\x74\x6F\x6D","\x2E\x2F\x61\x70\x69\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x74\x72\x65\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x6D\x65\x74\x72\x69\x63\x73\x2F\x64\x65\x66\x61\x75\x6C\x74","\x2E\x2F\x61\x70\x69\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x6D\x65\x74\x72\x69\x63","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x6D\x65\x74\x72\x69\x63\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x65\x74\x72\x69\x63","\x2F\x61\x70\x69\x2F\x6D\x6F\x64\x75\x6C\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x6F\x64\x75\x6C\x65","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64","\x2E\x2F\x61\x70\x69\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x75\x70\x64\x61\x74\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x70\x64\x61\x74\x65","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x63\x68\x61\x74\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x63\x68\x61\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74","\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x2E\x2F\x61\x70\x69\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x64\x69\x61\x6C\x65\x72","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x69\x67\x65\x72\x5F\x64\x69\x61\x6C","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x6D\x61\x69\x6C\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x73\x6D\x73\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x6D\x61\x69\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x73\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73","\x2F\x61\x70\x69\x2F\x77\x69\x64\x67\x65\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x77\x69\x64\x67\x65\x74","\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x61\x67\x65\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x6D\x65\x6D\x62\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x73\x71\x75\x61\x72\x65","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x73\x71\x75\x61\x72\x65\x2F\x64\x65\x74\x61\x69\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C","\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64","\x2F\x61\x70\x69\x2F\x73\x65\x74\x74\x69\x6E\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x65\x74\x74\x69\x6E\x67","\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72","\x2F\x61\x70\x69\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65","\x2F\x61\x70\x69\x2F\x61\x6D\x69","\x2E\x2F\x61\x70\x69\x2F\x61\x6D\x69","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x73\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6D\x61\x6E\x61\x67\x65\x72","\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x6F\x6D\x70\x61\x6E\x79","\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x6C\x69\x73\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6C\x69\x73\x74","\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x63\x6F\x6E\x74\x65\x78\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x6F\x64\x62\x63","\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D","\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65","\x2F\x61\x70\x69\x2F\x63\x68\x61\x6E\x73\x70\x79","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x6E\x73\x70\x79","\x2F\x61\x70\x69\x2F\x74\x61\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x61\x67","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x72\x6F\x6F\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x72\x6F\x6F\x6D","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x61\x67\x65\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x67\x65\x6E\x74","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x65\x6E\x71\x75\x69\x72\x69\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x65\x6E\x71\x75\x69\x72\x79","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x72\x6F\x6F\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x76\x69\x73\x69\x74\x6F\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x77\x65\x62\x73\x69\x74\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x72\x6F\x6F\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x73\x65\x72\x76\x65\x72\x73\x2F\x69\x6E","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x73\x65\x72\x76\x65\x72\x73\x2F\x6F\x75\x74","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x74\x65\x61\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x65\x61\x6D","\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64","\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x72\x6F\x6F\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D","\x2F\x61\x70\x69\x2F\x78\x63\x68\x61\x74\x74\x79","\x2E\x2F\x61\x70\x69\x2F\x78\x63\x68\x61\x74\x74\x79","\x2F\x61\x75\x74\x68","\x2E\x2F\x61\x75\x74\x68","\x2F\x3A\x75\x72\x6C\x28\x61\x70\x69\x7C\x61\x75\x74\x68\x7C\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x7C\x61\x70\x70\x7C\x62\x6F\x77\x65\x72\x5F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x7C\x61\x73\x73\x65\x74\x73\x29\x2F\x2A","\x72\x6F\x75\x74\x65","\x2F\x2A","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x72\x6F\x6F\x74","\x70\x75\x62\x6C\x69\x63","\x6A\x6F\x69\x6E","\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x74\x65\x73\x74","\x63\x6C\x69\x65\x6E\x74","\x69\x6E\x64\x65\x78\x2E\x68\x74\x6D\x6C","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x61\x6C\x6C"];_0xd3f5[0];var config=require(_0xd3f5[1]);var errors=require(_0xd3f5[2]);var path=require(_0xd3f5[3]);var moment=require(_0xd3f5[4]);module[_0xd3f5[5]]= function(_0x1906x5,_0x1906x6){var _0x1906x7=_0x1906x5[_0xd3f5[7]](_0xd3f5[6]);_0x1906x5[_0xd3f5[9]][_0xd3f5[8]]= _0x1906x6;_0x1906x5[_0xd3f5[12]](_0xd3f5[10],require(_0xd3f5[11]));_0x1906x5[_0xd3f5[12]](_0xd3f5[13],require(_0xd3f5[14]));_0x1906x5[_0xd3f5[12]](_0xd3f5[15],require(_0xd3f5[16]));_0x1906x5[_0xd3f5[12]](_0xd3f5[17],require(_0xd3f5[18]));_0x1906x5[_0xd3f5[12]](_0xd3f5[19],require(_0xd3f5[20]));_0x1906x5[_0xd3f5[12]](_0xd3f5[21],require(_0xd3f5[22]));_0x1906x5[_0xd3f5[12]](_0xd3f5[23],require(_0xd3f5[24]));_0x1906x5[_0xd3f5[12]](_0xd3f5[25],require(_0xd3f5[26]));_0x1906x5[_0xd3f5[12]](_0xd3f5[27],require(_0xd3f5[28]));_0x1906x5[_0xd3f5[12]](_0xd3f5[29],require(_0xd3f5[30]));_0x1906x5[_0xd3f5[12]](_0xd3f5[31],require(_0xd3f5[32]));_0x1906x5[_0xd3f5[12]](_0xd3f5[33],require(_0xd3f5[34]));_0x1906x5[_0xd3f5[12]](_0xd3f5[35],require(_0xd3f5[36]));_0x1906x5[_0xd3f5[12]](_0xd3f5[37],require(_0xd3f5[38]));_0x1906x5[_0xd3f5[12]](_0xd3f5[39],require(_0xd3f5[40]));_0x1906x5[_0xd3f5[12]](_0xd3f5[41],require(_0xd3f5[42]));_0x1906x5[_0xd3f5[12]](_0xd3f5[43],require(_0xd3f5[44]));_0x1906x5[_0xd3f5[12]](_0xd3f5[45],require(_0xd3f5[46]));_0x1906x5[_0xd3f5[12]](_0xd3f5[47],require(_0xd3f5[48]));_0x1906x5[_0xd3f5[12]](_0xd3f5[49],require(_0xd3f5[50]));_0x1906x5[_0xd3f5[12]](_0xd3f5[51],require(_0xd3f5[52]));_0x1906x5[_0xd3f5[12]](_0xd3f5[53],require(_0xd3f5[54]));_0x1906x5[_0xd3f5[12]](_0xd3f5[55],require(_0xd3f5[56]));_0x1906x5[_0xd3f5[12]](_0xd3f5[57],require(_0xd3f5[58]));_0x1906x5[_0xd3f5[12]](_0xd3f5[59],require(_0xd3f5[60]));_0x1906x5[_0xd3f5[12]](_0xd3f5[61],require(_0xd3f5[62]));_0x1906x5[_0xd3f5[12]](_0xd3f5[63],require(_0xd3f5[64]));_0x1906x5[_0xd3f5[12]](_0xd3f5[65],require(_0xd3f5[66]));_0x1906x5[_0xd3f5[12]](_0xd3f5[67],require(_0xd3f5[68]));_0x1906x5[_0xd3f5[12]](_0xd3f5[69],require(_0xd3f5[70]));_0x1906x5[_0xd3f5[12]](_0xd3f5[71],require(_0xd3f5[72]));_0x1906x5[_0xd3f5[12]](_0xd3f5[73],require(_0xd3f5[74]));_0x1906x5[_0xd3f5[12]](_0xd3f5[75],require(_0xd3f5[76]));_0x1906x5[_0xd3f5[12]](_0xd3f5[77],require(_0xd3f5[78]));_0x1906x5[_0xd3f5[12]](_0xd3f5[79],require(_0xd3f5[80]));_0x1906x5[_0xd3f5[12]](_0xd3f5[81],require(_0xd3f5[82]));_0x1906x5[_0xd3f5[12]](_0xd3f5[83],require(_0xd3f5[84]));_0x1906x5[_0xd3f5[12]](_0xd3f5[85],require(_0xd3f5[86]));_0x1906x5[_0xd3f5[12]](_0xd3f5[87],require(_0xd3f5[88]));_0x1906x5[_0xd3f5[12]](_0xd3f5[89],require(_0xd3f5[90]));_0x1906x5[_0xd3f5[12]](_0xd3f5[91],require(_0xd3f5[92]));_0x1906x5[_0xd3f5[12]](_0xd3f5[93],require(_0xd3f5[94]));_0x1906x5[_0xd3f5[12]](_0xd3f5[95],require(_0xd3f5[96]));_0x1906x5[_0xd3f5[12]](_0xd3f5[97],require(_0xd3f5[98]));_0x1906x5[_0xd3f5[12]](_0xd3f5[99],require(_0xd3f5[100]));_0x1906x5[_0xd3f5[12]](_0xd3f5[101],require(_0xd3f5[102]));_0x1906x5[_0xd3f5[12]](_0xd3f5[103],require(_0xd3f5[104]));_0x1906x5[_0xd3f5[12]](_0xd3f5[105],require(_0xd3f5[106]));_0x1906x5[_0xd3f5[12]](_0xd3f5[107],require(_0xd3f5[108]));_0x1906x5[_0xd3f5[12]](_0xd3f5[109],require(_0xd3f5[110]));_0x1906x5[_0xd3f5[12]](_0xd3f5[111],require(_0xd3f5[112]));_0x1906x5[_0xd3f5[12]](_0xd3f5[113],require(_0xd3f5[114]));_0x1906x5[_0xd3f5[12]](_0xd3f5[115],require(_0xd3f5[116]));_0x1906x5[_0xd3f5[12]](_0xd3f5[117],require(_0xd3f5[118]));_0x1906x5[_0xd3f5[12]](_0xd3f5[119],require(_0xd3f5[120]));_0x1906x5[_0xd3f5[12]](_0xd3f5[121],require(_0xd3f5[122]));_0x1906x5[_0xd3f5[12]](_0xd3f5[123],require(_0xd3f5[124]));_0x1906x5[_0xd3f5[12]](_0xd3f5[125],require(_0xd3f5[126]));_0x1906x5[_0xd3f5[12]](_0xd3f5[127],require(_0xd3f5[128]));_0x1906x5[_0xd3f5[12]](_0xd3f5[129],require(_0xd3f5[130]));_0x1906x5[_0xd3f5[12]](_0xd3f5[131],require(_0xd3f5[132]));_0x1906x5[_0xd3f5[12]](_0xd3f5[133],require(_0xd3f5[134]));_0x1906x5[_0xd3f5[12]](_0xd3f5[135],require(_0xd3f5[136]));_0x1906x5[_0xd3f5[12]](_0xd3f5[137],require(_0xd3f5[138]));_0x1906x5[_0xd3f5[12]](_0xd3f5[139],require(_0xd3f5[140]));_0x1906x5[_0xd3f5[12]](_0xd3f5[141],require(_0xd3f5[142]));_0x1906x5[_0xd3f5[12]](_0xd3f5[143],require(_0xd3f5[144]));_0x1906x5[_0xd3f5[12]](_0xd3f5[145],require(_0xd3f5[146]));_0x1906x5[_0xd3f5[12]](_0xd3f5[147],require(_0xd3f5[148]));_0x1906x5[_0xd3f5[12]](_0xd3f5[149],require(_0xd3f5[150]));_0x1906x5[_0xd3f5[12]](_0xd3f5[151],require(_0xd3f5[152]));_0x1906x5[_0xd3f5[12]](_0xd3f5[153],require(_0xd3f5[154]));_0x1906x5[_0xd3f5[12]](_0xd3f5[155],require(_0xd3f5[156]));_0x1906x5[_0xd3f5[12]](_0xd3f5[157],require(_0xd3f5[158]));_0x1906x5[_0xd3f5[12]](_0xd3f5[159],require(_0xd3f5[160]));_0x1906x5[_0xd3f5[12]](_0xd3f5[161],require(_0xd3f5[162]));_0x1906x5[_0xd3f5[12]](_0xd3f5[163],require(_0xd3f5[164]));_0x1906x5[_0xd3f5[12]](_0xd3f5[165],require(_0xd3f5[166]));_0x1906x5[_0xd3f5[12]](_0xd3f5[167],require(_0xd3f5[168]));_0x1906x5[_0xd3f5[12]](_0xd3f5[169],require(_0xd3f5[170]));_0x1906x5[_0xd3f5[12]](_0xd3f5[171],require(_0xd3f5[172]));_0x1906x5[_0xd3f5[12]](_0xd3f5[173],require(_0xd3f5[174]));_0x1906x5[_0xd3f5[12]](_0xd3f5[175],require(_0xd3f5[176]));_0x1906x5[_0xd3f5[12]](_0xd3f5[177],require(_0xd3f5[178]));_0x1906x5[_0xd3f5[12]](_0xd3f5[179],require(_0xd3f5[180]));_0x1906x5[_0xd3f5[12]](_0xd3f5[181],require(_0xd3f5[182]));_0x1906x5[_0xd3f5[12]](_0xd3f5[183],require(_0xd3f5[184]));_0x1906x5[_0xd3f5[12]](_0xd3f5[185],require(_0xd3f5[186]));_0x1906x5[_0xd3f5[12]](_0xd3f5[187],require(_0xd3f5[188]));_0x1906x5[_0xd3f5[12]](_0xd3f5[189],require(_0xd3f5[190]));_0x1906x5[_0xd3f5[12]](_0xd3f5[191],require(_0xd3f5[192]));_0x1906x5[_0xd3f5[12]](_0xd3f5[193],require(_0xd3f5[194]));_0x1906x5[_0xd3f5[12]](_0xd3f5[195],require(_0xd3f5[196]));_0x1906x5[_0xd3f5[12]](_0xd3f5[197],require(_0xd3f5[198]));_0x1906x5[_0xd3f5[12]](_0xd3f5[199],require(_0xd3f5[200]));_0x1906x5[_0xd3f5[12]](_0xd3f5[201],require(_0xd3f5[202]));_0x1906x5[_0xd3f5[12]](_0xd3f5[203],require(_0xd3f5[204]));_0x1906x5[_0xd3f5[12]](_0xd3f5[205],require(_0xd3f5[206]));_0x1906x5[_0xd3f5[12]](_0xd3f5[207],require(_0xd3f5[208]));_0x1906x5[_0xd3f5[12]](_0xd3f5[209],require(_0xd3f5[210]));_0x1906x5[_0xd3f5[12]](_0xd3f5[211],require(_0xd3f5[212]));_0x1906x5[_0xd3f5[12]](_0xd3f5[213],require(_0xd3f5[214]));_0x1906x5[_0xd3f5[12]](_0xd3f5[215],require(_0xd3f5[216]));_0x1906x5[_0xd3f5[12]](_0xd3f5[217],require(_0xd3f5[218]));_0x1906x5[_0xd3f5[12]](_0xd3f5[219],require(_0xd3f5[220]));_0x1906x5[_0xd3f5[12]](_0xd3f5[221],require(_0xd3f5[222]));_0x1906x5[_0xd3f5[12]](_0xd3f5[223],require(_0xd3f5[224]));_0x1906x5[_0xd3f5[12]](_0xd3f5[225],require(_0xd3f5[226]));_0x1906x5[_0xd3f5[12]](_0xd3f5[227],require(_0xd3f5[228]));_0x1906x5[_0xd3f5[12]](_0xd3f5[229],require(_0xd3f5[230]));_0x1906x5[_0xd3f5[12]](_0xd3f5[231],require(_0xd3f5[232]));_0x1906x5[_0xd3f5[12]](_0xd3f5[233],require(_0xd3f5[234]));_0x1906x5[_0xd3f5[12]](_0xd3f5[235],require(_0xd3f5[236]));_0x1906x5[_0xd3f5[12]](_0xd3f5[237],require(_0xd3f5[238]));_0x1906x5[_0xd3f5[12]](_0xd3f5[239],require(_0xd3f5[240]));_0x1906x5[_0xd3f5[12]](_0xd3f5[241],require(_0xd3f5[242]));_0x1906x5[_0xd3f5[12]](_0xd3f5[243],require(_0xd3f5[244]));_0x1906x5[_0xd3f5[12]](_0xd3f5[245],require(_0xd3f5[246]));_0x1906x5[_0xd3f5[12]](_0xd3f5[227],require(_0xd3f5[228]));_0x1906x5[_0xd3f5[12]](_0xd3f5[247],require(_0xd3f5[248]));_0x1906x5[_0xd3f5[12]](_0xd3f5[249],require(_0xd3f5[250]));_0x1906x5[_0xd3f5[12]](_0xd3f5[251],require(_0xd3f5[252]));_0x1906x5[_0xd3f5[12]](_0xd3f5[253],require(_0xd3f5[254]));_0x1906x5[_0xd3f5[12]](_0xd3f5[255],require(_0xd3f5[256]));_0x1906x5[_0xd3f5[12]](_0xd3f5[257],require(_0xd3f5[258]));_0x1906x5[_0xd3f5[12]](_0xd3f5[259],require(_0xd3f5[260]));_0x1906x5[_0xd3f5[12]](_0xd3f5[261],require(_0xd3f5[262]));_0x1906x5[_0xd3f5[12]](_0xd3f5[263],require(_0xd3f5[264]));_0x1906x5[_0xd3f5[12]](_0xd3f5[265],require(_0xd3f5[266]));_0x1906x5[_0xd3f5[12]](_0xd3f5[267],require(_0xd3f5[268]));_0x1906x5[_0xd3f5[12]](_0xd3f5[269],require(_0xd3f5[270]));_0x1906x5[_0xd3f5[12]](_0xd3f5[271],require(_0xd3f5[272]));_0x1906x5[_0xd3f5[12]](_0xd3f5[273],require(_0xd3f5[274]));_0x1906x5[_0xd3f5[276]](_0xd3f5[275])[_0xd3f5[7]](errors[404]);_0x1906x5[_0xd3f5[287]](_0xd3f5[277],function(_0x1906x8,_0x1906x9,_0x1906xa){var _0x1906xb={};if(_0xd3f5[278]=== _0x1906x7){_0x1906xb[_0xd3f5[279]]= path[_0xd3f5[281]](config[_0xd3f5[279]],_0xd3f5[280])};if(_0xd3f5[282]=== _0x1906x7|| _0xd3f5[283]=== _0x1906x7){_0x1906xb[_0xd3f5[279]]= path[_0xd3f5[281]](config[_0xd3f5[279]],_0xd3f5[284])};_0x1906x9[_0xd3f5[286]](_0xd3f5[285],_0x1906xb)})}
\ No newline at end of file
diff --git a/server/services/dashboard/hooks/index.js b/server/services/dashboard/hooks/index.js
index b5011ab..efde365 100644
--- a/server/services/dashboard/hooks/index.js
+++ b/server/services/dashboard/hooks/index.js
@@ -1,12 +1 @@
-'use strict';
-
-const User = require('../../../models').User;
-const VoiceQueue = require('../../../models').VoiceQueue;
-
-const _ = require('lodash');
-
-module.exports = function(n, cpAmi) {
-  console.log('services/dashboard/hooks');
-
-  require('./voice')(n, cpAmi);
-};
+var _0x44e8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x6C\x6F\x64\x61\x73\x68","\x65\x78\x70\x6F\x72\x74\x73","\x73\x65\x72\x76\x69\x63\x65\x73\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2F\x68\x6F\x6F\x6B\x73","\x6C\x6F\x67","\x2E\x2F\x76\x6F\x69\x63\x65"];_0x44e8[0];const User=require(_0x44e8[2])[_0x44e8[1]];const VoiceQueue=require(_0x44e8[2])[_0x44e8[3]];const _=require(_0x44e8[4]);module[_0x44e8[5]]= function(_0xa4dex4,_0xa4dex5){console[_0x44e8[7]](_0x44e8[6]);require(_0x44e8[8])(_0xa4dex4,_0xa4dex5)}
\ No newline at end of file
diff --git a/server/services/dashboard/hooks/voice.js b/server/services/dashboard/hooks/voice.js
index 68db8ca..019c906 100644
--- a/server/services/dashboard/hooks/voice.js
+++ b/server/services/dashboard/hooks/voice.js
@@ -1,89 +1 @@
-'use strict';
-
-const UserHasVoiceQueue = require('../../../models').UserHasVoiceQueue;
-
-const ReportAgent = require('../../../models').ReportAgent;
-const ReportQueue = require('../../../models').ReportQueue;
-const ReportCall = require('../../../models').ReportCall;
-const VoiceQueue = require('../../../models').VoiceQueue;
-const sequelize = require('../../../models').sequelize;
-
-const _ = require('lodash');
-
-function onSend(process, type, doc) {
-  doc.type = type;
-  process.send(doc);
-}
-
-module.exports = function(n, cpAmi) {
-
-  cpAmi.on('message', function(doc) {
-    switch (doc.evt) {
-      case 'ReportAgent.afterUpdate':
-        if (doc.changed.holdtime) {
-          onSend(n, 'holdtime', doc); // OK
-        }
-
-        if (doc.changed.talktime) {
-          onSend(n, 'talktime', doc);
-        }
-        break;
-
-      case 'ReportQueue.afterCreate': // OK
-        onSend(n, 'waiting:up', doc);
-        break;
-
-      case 'ReportQueue.afterUpdate': // OK
-        if (doc.changed.queuecallerexit) {
-          onSend(n, 'unmanaged:up', doc)
-        }
-
-        if (doc.changed.queuecallerleaveAt) {
-          onSend(n, 'waiting:down', doc)
-
-          if (!doc.queuecallercomplete && !doc.queuecallerabandon && !doc.queuecallerexit && doc.queuecallerleaveAt) {
-            if (!doc.changed.queuecallerabandon) {
-              onSend(n, 'active:up', doc);
-            }
-          }
-        }
-
-        if (doc.changed.queuecallercomplete && doc.queuecallercomplete) {
-          onSend(n, 'active:down', doc);
-          onSend(n, 'complete:up', doc);
-        }
-
-        if (doc.changed.queuecallerabandon && doc.queuecallerabandon) {
-          onSend(n, 'abandon:up', doc);
-        }
-        break;
-
-      case 'ReportCall.afterCreate':
-        if (doc.type === 'outbound') {
-          onSend(n, 'outbound:up', doc);
-        }
-        break;
-
-      case 'UserHasVoiceQueue.afterCreate':
-        onSend(n, 'agent:join', doc);
-        break;
-
-      case 'UserHasVoiceQueue.afterDestroy':
-        onSend(n, 'agent:leave', {
-          dataValues: {
-            UserId: doc.where.UserId,
-            queue: doc.where.queue
-          }
-        });
-        break;
-
-      case 'UserHasVoiceQueue.afterUpdate':
-        if (doc.changed.lastcall) {
-          onSend(n, 'lastcall', doc);
-        }
-        break;
-
-      default:
-    }
-  });
-};
+var _0x5607=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6C\x6F\x64\x61\x73\x68","\x74\x79\x70\x65","\x73\x65\x6E\x64","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x73\x73\x61\x67\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x63\x68\x61\x6E\x67\x65\x64","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x77\x61\x69\x74\x69\x6E\x67\x3A\x75\x70","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x3A\x75\x70","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x77\x61\x69\x74\x69\x6E\x67\x3A\x64\x6F\x77\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x61\x63\x74\x69\x76\x65\x3A\x75\x70","\x61\x63\x74\x69\x76\x65\x3A\x64\x6F\x77\x6E","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3A\x75\x70","\x61\x62\x61\x6E\x64\x6F\x6E\x3A\x75\x70","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x3A\x75\x70","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x3A\x6A\x6F\x69\x6E","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x3A\x6C\x65\x61\x76\x65","\x55\x73\x65\x72\x49\x64","\x77\x68\x65\x72\x65","\x71\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6C\x61\x73\x74\x63\x61\x6C\x6C","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x76\x74","\x6F\x6E"];_0x5607[0];const UserHasVoiceQueue=require(_0x5607[2])[_0x5607[1]];const ReportAgent=require(_0x5607[2])[_0x5607[3]];const ReportQueue=require(_0x5607[2])[_0x5607[4]];const ReportCall=require(_0x5607[2])[_0x5607[5]];const VoiceQueue=require(_0x5607[2])[_0x5607[6]];const sequelize=require(_0x5607[2])[_0x5607[7]];const _=require(_0x5607[8]);function onSend(_0x7bb3x9,_0x7bb3xa,_0x7bb3xb){_0x7bb3xb[_0x5607[9]]= _0x7bb3xa;_0x7bb3x9[_0x5607[10]](_0x7bb3xb)}module[_0x5607[11]]= function(_0x7bb3xc,_0x7bb3xd){_0x7bb3xd[_0x5607[43]](_0x5607[12],function(_0x7bb3xb){switch(_0x7bb3xb[_0x5607[42]]){case _0x5607[16]:if(_0x7bb3xb[_0x5607[14]][_0x5607[13]]){onSend(_0x7bb3xc,_0x5607[13],_0x7bb3xb)};if(_0x7bb3xb[_0x5607[14]][_0x5607[15]]){onSend(_0x7bb3xc,_0x5607[15],_0x7bb3xb)};break;case _0x5607[18]:onSend(_0x7bb3xc,_0x5607[17],_0x7bb3xb);break;case _0x5607[29]:if(_0x7bb3xb[_0x5607[14]][_0x5607[19]]){onSend(_0x7bb3xc,_0x5607[20],_0x7bb3xb)};if(_0x7bb3xb[_0x5607[14]][_0x5607[21]]){onSend(_0x7bb3xc,_0x5607[22],_0x7bb3xb);if(!_0x7bb3xb[_0x5607[23]]&& !_0x7bb3xb[_0x5607[24]]&& !_0x7bb3xb[_0x5607[19]]&& _0x7bb3xb[_0x5607[21]]){if(!_0x7bb3xb[_0x5607[14]][_0x5607[24]]){onSend(_0x7bb3xc,_0x5607[25],_0x7bb3xb)}}};if(_0x7bb3xb[_0x5607[14]][_0x5607[23]]&& _0x7bb3xb[_0x5607[23]]){onSend(_0x7bb3xc,_0x5607[26],_0x7bb3xb);onSend(_0x7bb3xc,_0x5607[27],_0x7bb3xb)};if(_0x7bb3xb[_0x5607[14]][_0x5607[24]]&& _0x7bb3xb[_0x5607[24]]){onSend(_0x7bb3xc,_0x5607[28],_0x7bb3xb)};break;case _0x5607[32]:if(_0x7bb3xb[_0x5607[9]]=== _0x5607[30]){onSend(_0x7bb3xc,_0x5607[31],_0x7bb3xb)};break;case _0x5607[34]:onSend(_0x7bb3xc,_0x5607[33],_0x7bb3xb);break;case _0x5607[39]:onSend(_0x7bb3xc,_0x5607[35],{dataValues:{UserId:_0x7bb3xb[_0x5607[37]][_0x5607[36]],queue:_0x7bb3xb[_0x5607[37]][_0x5607[38]]}});break;case _0x5607[41]:if(_0x7bb3xb[_0x5607[14]][_0x5607[40]]){onSend(_0x7bb3xc,_0x5607[40],_0x7bb3xb)};break;default:}})}
\ No newline at end of file
diff --git a/server/services/dashboard/index.js b/server/services/dashboard/index.js
index 9807e6a..d695d65 100644
--- a/server/services/dashboard/index.js
+++ b/server/services/dashboard/index.js
@@ -1,19 +1 @@
-'use strict';
-
-const util = require('util');
-const cp = require('child_process');
-
-module.exports = function(cpAmi) {
-  const n = cp
-    .fork(__dirname + '/workers')
-    .on('message', function(data) {
-      console.log('child process message', data);
-    })
-    .on('error', function(err) {
-      console.error(err);
-    });
-
-  require('./hooks')(n, cpAmi);
-
-  return n;
-};
+var _0x8b41=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x65\x78\x70\x6F\x72\x74\x73","\x65\x72\x72\x6F\x72","\x6F\x6E","\x6D\x65\x73\x73\x61\x67\x65","\x63\x68\x69\x6C\x64\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x6D\x65\x73\x73\x61\x67\x65","\x6C\x6F\x67","\x2F\x77\x6F\x72\x6B\x65\x72\x73","\x66\x6F\x72\x6B","\x2E\x2F\x68\x6F\x6F\x6B\x73"];_0x8b41[0];const util=require(_0x8b41[1]);const cp=require(_0x8b41[2]);module[_0x8b41[3]]= function(_0x713cx3){const _0x713cx4=cp[_0x8b41[10]](__dirname+ _0x8b41[9])[_0x8b41[5]](_0x8b41[6],function(_0x713cx6){console[_0x8b41[8]](_0x8b41[7],_0x713cx6)})[_0x8b41[5]](_0x8b41[4],function(_0x713cx5){console[_0x8b41[4]](_0x713cx5)});require(_0x8b41[11])(_0x713cx4,_0x713cx3);return _0x713cx4}
\ No newline at end of file
diff --git a/server/services/dashboard/workers/index.js b/server/services/dashboard/workers/index.js
index 41bf8d2..be35c29 100644
--- a/server/services/dashboard/workers/index.js
+++ b/server/services/dashboard/workers/index.js
@@ -1,193 +1 @@
-'use strict';
-
-/*jshint multistr:true */
-
-const _ = require('lodash');
-const redis = require('redis');
-
-const config = require('../../../config/environment');
-const sequelize = require('../../../models').sequelize;
-
-const VoiceQueue = require('../../../models').VoiceQueue;
-const ReportQueue = require('../../../models').ReportQueue;
-
-// SOCKET IO CHILD CONNETION
-var redisConf;
-if (config.redisPwd) {
-  redisConf = {
-    password: config.redisPwd
-  }
-}
-var redisClient = redis.createClient(6379, config.ip, redisConf);
-var io = require('socket.io-emitter')(redisClient);
-
-// QUEUE SET
-var queues = {};
-var outbound = {};
-
-VoiceQueue
-  .findAll({
-    attributes: ['name'],
-    raw: true
-  })
-  .then(function(data) {
-    queues = _.keyBy(data, 'name');
-
-    return sequelize
-      .query('SELECT queue, count(*) as waiting \
-      FROM report_queue \
-      WHERE queuecallerleaveAt IS NULL \
-      GROUP BY queue;', {
-        type: sequelize.QueryTypes.SELECT
-      });
-  })
-  .then(function(data) {
-    data.forEach(function(elm) {
-      if (queues[elm.queue]) {
-        queues[elm.queue].waiting = elm.waiting;
-      }
-    });
-
-    return sequelize
-      .query(
-        'SELECT queue, count(*) as active \
-        FROM report_queue \
-        WHERE queuecallerexit = 0 \
-        AND queuecallerabandon = 0 \
-        AND queuecallercomplete = 0 \
-        AND queuecallerleaveAt IS NOT NULL \
-        GROUP BY queue;', {
-          type: sequelize.QueryTypes.SELECT
-        });
-  })
-  .then(function(data) {
-    data.forEach(function(elm) {
-      if (queues[elm.queue]) {
-        queues[elm.queue].active = elm.active;
-      }
-    });
-
-    return sequelize
-      .query(
-        'SELECT queue, count(*) as abandon \
-        FROM report_queue \
-        WHERE queuecallerabandon = 1 \
-        GROUP BY queue;', {
-          type: sequelize.QueryTypes.SELECT
-        });
-  })
-  .then(function(data) {
-    data.forEach(function(elm) {
-      if (queues[elm.queue]) {
-        queues[elm.queue].abandon = elm.abandon;
-      }
-    });
-
-    return sequelize
-      .query(
-        'SELECT queue, count(*) as complete \
-        FROM report_queue \
-        WHERE queuecallercomplete = 1 \
-        GROUP BY queue;', {
-          type: sequelize.QueryTypes.SELECT
-        });
-  })
-  .then(function(data) {
-    data.forEach(function(elm) {
-      if (queues[elm.queue]) {
-        queues[elm.queue].complete = elm.complete;
-      }
-    });
-
-    return sequelize
-      .query('SELECT queue, count(*) as calls, SUM(holdtime) as holdtime \
-      FROM report_agent \
-      WHERE agentcomplete = 1 \
-      GROUP BY queue;', {
-        type: sequelize.QueryTypes.SELECT
-      });
-  })
-  .then(function(data) {
-    data.forEach(function(elm) {
-      if (queues[elm.queue]) {
-        queues[elm.queue].holdtime = elm.holdtime;
-      }
-    });
-
-    return sequelize
-      .query('SELECT queue, count(*) as calls, SUM(talktime) as talktime \
-      FROM report_agent \
-      WHERE agentcomplete = 1 \
-      GROUP BY queue;', {
-        type: sequelize.QueryTypes.SELECT
-      });
-  })
-  .then(function(data) {
-    data.forEach(function(elm) {
-      if (queues[elm.queue]) {
-        queues[elm.queue].talktime = elm.talktime;
-      }
-    });
-
-    return sequelize
-      .query('SELECT queue, count(*) as unmanaged \
-      FROM report_queue \
-      WHERE queuecallerexit = 1 \
-      GROUP BY queue;', {
-        type: sequelize.QueryTypes.SELECT
-      });
-  })
-  .then(function(data) {
-    data.forEach(function(elm) {
-      if (queues[elm.queue]) {
-        queues[elm.queue].unmanaged = elm.unmanaged;
-      }
-    });
-
-    return sequelize
-      .query('SELECT count(*) as answered \
-      FROM report_call \
-      WHERE disposition = \'ANSWERED\' \
-      AND type = \'outbound\';', {
-        type: sequelize.QueryTypes.SELECT
-      });
-  })
-  .then(function(data) {
-    outbound.answered = data[0].answered;
-
-    return sequelize
-      .query('SELECT count(*) as manualOutbound \
-      FROM report_call \
-      WHERE type = \'outbound\';', {
-        type: sequelize.QueryTypes.SELECT
-      });
-  })
-  .then(function(data) {
-    outbound.manualOutbound = data[0].manualOutbound;
-
-    return sequelize
-      .query('SELECT SUM(duration) as globalDuration \
-      FROM report_call \
-      WHERE type = \'outbound\';', {
-        type: sequelize.QueryTypes.SELECT
-      });
-  })
-  .then(function(data) {
-    outbound.globalDuration = data[0].globalDuration || 0;
-
-    return sequelize
-      .query('SELECT AVG(duration) as avgDuration \
-    FROM report_call \
-    WHERE type=\'outbound\';', {
-        type: sequelize.QueryTypes.SELECT
-      });
-  })
-  .then(function(data) {
-    outbound.avgDuration = data[0].avgDuration || 0;
-    outbound.answerRate = outbound.avgDuration ? ((outbound.answered / outbound.globalDuration) * 100) : 0;
-
-    require('./voice')(queues, outbound, io);
-  })
-  .catch(function(err) {
-    console.error(err);
-  });
+var _0x1116=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x64\x69\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x72\x65\x64\x69\x73\x50\x77\x64","\x69\x70","\x63\x72\x65\x61\x74\x65\x43\x6C\x69\x65\x6E\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x61\x76\x67\x44\x75\x72\x61\x74\x69\x6F\x6E","\x61\x6E\x73\x77\x65\x72\x52\x61\x74\x65","\x61\x6E\x73\x77\x65\x72\x65\x64","\x67\x6C\x6F\x62\x61\x6C\x44\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2F\x76\x6F\x69\x63\x65","\x74\x68\x65\x6E","\x53\x45\x4C\x45\x43\x54\x20\x41\x56\x47\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x20\x61\x73\x20\x61\x76\x67\x44\x75\x72\x61\x74\x69\x6F\x6E\x20\x0A\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x0A\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x3D\x27\x6F\x75\x74\x62\x6F\x75\x6E\x64\x27\x3B","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x71\x75\x65\x72\x79","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x53\x45\x4C\x45\x43\x54\x20\x53\x55\x4D\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x20\x61\x73\x20\x67\x6C\x6F\x62\x61\x6C\x44\x75\x72\x61\x74\x69\x6F\x6E\x20\x0A\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x0A\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x20\x3D\x20\x27\x6F\x75\x74\x62\x6F\x75\x6E\x64\x27\x3B","\x53\x45\x4C\x45\x43\x54\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x0A\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x0A\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x20\x3D\x20\x27\x6F\x75\x74\x62\x6F\x75\x6E\x64\x27\x3B","\x71\x75\x65\x75\x65","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x66\x6F\x72\x45\x61\x63\x68","\x53\x45\x4C\x45\x43\x54\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x0A\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x0A\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x3D\x20\x27\x41\x4E\x53\x57\x45\x52\x45\x44\x27\x20\x0A\x20\x20\x20\x20\x20\x20\x41\x4E\x44\x20\x74\x79\x70\x65\x20\x3D\x20\x27\x6F\x75\x74\x62\x6F\x75\x6E\x64\x27\x3B","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x20\x0A\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x63\x61\x6C\x6C\x73\x2C\x20\x53\x55\x4D\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x20\x61\x73\x20\x74\x61\x6C\x6B\x74\x69\x6D\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x0A\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x63\x61\x6C\x6C\x73\x2C\x20\x53\x55\x4D\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x20\x61\x73\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x0A\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x61\x62\x61\x6E\x64\x6F\x6E","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x61\x63\x74\x69\x76\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x61\x62\x61\x6E\x64\x6F\x6E\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x77\x61\x69\x74\x69\x6E\x67","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x61\x63\x74\x69\x76\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x20\x3D\x20\x30\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x20\x3D\x20\x30\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x30\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x20\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x6E\x61\x6D\x65","\x6B\x65\x79\x42\x79","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x77\x61\x69\x74\x69\x6E\x67\x20\x0A\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x20\x49\x53\x20\x4E\x55\x4C\x4C\x20\x0A\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x1116[0];const _=require(_0x1116[1]);const redis=require(_0x1116[2]);const config=require(_0x1116[3]);const sequelize=require(_0x1116[5])[_0x1116[4]];const VoiceQueue=require(_0x1116[5])[_0x1116[6]];const ReportQueue=require(_0x1116[5])[_0x1116[7]];var redisConf;if(config[_0x1116[8]]){redisConf= {password:config[_0x1116[8]]}};var redisClient=redis[_0x1116[10]](6379,config[_0x1116[9]],redisConf);var io=require(_0x1116[11])(redisClient);var queues={};var outbound={};VoiceQueue[_0x1116[46]]({attributes:[_0x1116[43]],raw:true})[_0x1116[19]](function(_0xae5bxd){queues= _[_0x1116[44]](_0xae5bxd,_0x1116[43]);return sequelize[_0x1116[23]](_0x1116[45],{type:sequelize[_0x1116[22]][_0x1116[21]]})})[_0x1116[19]](function(_0xae5bxd){_0xae5bxd[_0x1116[29]](function(_0xae5bxe){if(queues[_0xae5bxe[_0x1116[27]]]){queues[_0xae5bxe[_0x1116[27]]][_0x1116[41]]= _0xae5bxe[_0x1116[41]]}});return sequelize[_0x1116[23]](_0x1116[42],{type:sequelize[_0x1116[22]][_0x1116[21]]})})[_0x1116[19]](function(_0xae5bxd){_0xae5bxd[_0x1116[29]](function(_0xae5bxe){if(queues[_0xae5bxe[_0x1116[27]]]){queues[_0xae5bxe[_0x1116[27]]][_0x1116[39]]= _0xae5bxe[_0x1116[39]]}});return sequelize[_0x1116[23]](_0x1116[40],{type:sequelize[_0x1116[22]][_0x1116[21]]})})[_0x1116[19]](function(_0xae5bxd){_0xae5bxd[_0x1116[29]](function(_0xae5bxe){if(queues[_0xae5bxe[_0x1116[27]]]){queues[_0xae5bxe[_0x1116[27]]][_0x1116[37]]= _0xae5bxe[_0x1116[37]]}});return sequelize[_0x1116[23]](_0x1116[38],{type:sequelize[_0x1116[22]][_0x1116[21]]})})[_0x1116[19]](function(_0xae5bxd){_0xae5bxd[_0x1116[29]](function(_0xae5bxe){if(queues[_0xae5bxe[_0x1116[27]]]){queues[_0xae5bxe[_0x1116[27]]][_0x1116[35]]= _0xae5bxe[_0x1116[35]]}});return sequelize[_0x1116[23]](_0x1116[36],{type:sequelize[_0x1116[22]][_0x1116[21]]})})[_0x1116[19]](function(_0xae5bxd){_0xae5bxd[_0x1116[29]](function(_0xae5bxe){if(queues[_0xae5bxe[_0x1116[27]]]){queues[_0xae5bxe[_0x1116[27]]][_0x1116[33]]= _0xae5bxe[_0x1116[33]]}});return sequelize[_0x1116[23]](_0x1116[34],{type:sequelize[_0x1116[22]][_0x1116[21]]})})[_0x1116[19]](function(_0xae5bxd){_0xae5bxd[_0x1116[29]](function(_0xae5bxe){if(queues[_0xae5bxe[_0x1116[27]]]){queues[_0xae5bxe[_0x1116[27]]][_0x1116[31]]= _0xae5bxe[_0x1116[31]]}});return sequelize[_0x1116[23]](_0x1116[32],{type:sequelize[_0x1116[22]][_0x1116[21]]})})[_0x1116[19]](function(_0xae5bxd){_0xae5bxd[_0x1116[29]](function(_0xae5bxe){if(queues[_0xae5bxe[_0x1116[27]]]){queues[_0xae5bxe[_0x1116[27]]][_0x1116[28]]= _0xae5bxe[_0x1116[28]]}});return sequelize[_0x1116[23]](_0x1116[30],{type:sequelize[_0x1116[22]][_0x1116[21]]})})[_0x1116[19]](function(_0xae5bxd){outbound[_0x1116[16]]= _0xae5bxd[0][_0x1116[16]];return sequelize[_0x1116[23]](_0x1116[26],{type:sequelize[_0x1116[22]][_0x1116[21]]})})[_0x1116[19]](function(_0xae5bxd){outbound[_0x1116[24]]= _0xae5bxd[0][_0x1116[24]];return sequelize[_0x1116[23]](_0x1116[25],{type:sequelize[_0x1116[22]][_0x1116[21]]})})[_0x1116[19]](function(_0xae5bxd){outbound[_0x1116[17]]= _0xae5bxd[0][_0x1116[17]]|| 0;return sequelize[_0x1116[23]](_0x1116[20],{type:sequelize[_0x1116[22]][_0x1116[21]]})})[_0x1116[19]](function(_0xae5bxd){outbound[_0x1116[14]]= _0xae5bxd[0][_0x1116[14]]|| 0;outbound[_0x1116[15]]= outbound[_0x1116[14]]?((outbound[_0x1116[16]]/ outbound[_0x1116[17]])* 100):0;require(_0x1116[18])(queues,outbound,io)})[_0x1116[13]](function(_0xae5bxc){console[_0x1116[12]](_0xae5bxc)})
\ No newline at end of file
diff --git a/server/services/dashboard/workers/voice.js b/server/services/dashboard/workers/voice.js
index 5f8efaf..47be4b0 100644
--- a/server/services/dashboard/workers/voice.js
+++ b/server/services/dashboard/workers/voice.js
@@ -1,226 +1 @@
-'use strict';
-
-/*jshint multistr:true */
-
-const _ = require('lodash');
-const util = require('util');
-
-const config = require('../../../config/environment');
-const User = require('../../../models').User;
-const sequelize = require('../../../models').sequelize;
-
-const VoiceQueue = require('../../../models').VoiceQueue;
-const ReportQueue = require('../../../models').ReportQueue;
-
-module.exports = function(queues, outbound, io) {
-  function onVoiceWaitingUp(data) {
-    if (queues[data.queue]) {
-      if (!queues[data.queue].waiting) {
-        queues[data.queue].waiting = 0;
-      }
-    } else {
-      queues[data.queue] = {};
-      queues[data.queue].waiting = 0;
-    }
-
-    queues[data.queue].waiting++;
-    io.to(data.queue).emit('dashboard:voice:waiting', queues[data.queue]);
-  }
-
-  function onVoiceWaitingDown(data) {
-    if (queues[data.queue]) {
-      if (!queues[data.queue].waiting) {
-        queues[data.queue].waiting = 0;
-      } else {
-        queues[data.queue].waiting--;
-      }
-    } else {
-      queues[data.queue] = {};
-      queues[data.queue].waiting = 0;
-    }
-
-    io.to(data.queue).emit('dashboard:voice:waiting', queues[data.queue]);
-  }
-
-  function onVoiceActiveUp(data) {
-    if (queues[data.queue]) {
-      if (!queues[data.queue].active) {
-        queues[data.queue].active = 0;
-      }
-    } else {
-      queues[data.queue] = {};
-      queues[data.queue].active = 0;
-    }
-
-    queues[data.queue].active++;
-    io.to(data.queue).emit('dashboard:voice:active', queues[data.queue]);
-  }
-
-  function onVoiceActiveDown(data) {
-    if (queues[data.queue]) {
-      if (!queues[data.queue].active) {
-        queues[data.queue].active = 0;
-      } else {
-        queues[data.queue].active--;
-      }
-    } else {
-      queues[data.queue] = {};
-      queues[data.queue].active = 0;
-    }
-
-    io.to(data.queue).emit('dashboard:voice:active', queues[data.queue]);
-  }
-
-  function onVoiceAbandonUp(data) {
-    if (queues[data.queue]) {
-      if (!queues[data.queue].abandon) {
-        queues[data.queue].abandon = 0;
-      }
-    } else {
-      queues[data.queue] = {};
-      queues[data.queue].abandon = 0;
-    }
-
-    queues[data.queue].abandon++;
-    io.to(data.queue).emit('dashboard:voice:abandon', queues[data.queue]);
-  }
-
-  function onVoiceCompleteUp(data) {
-    if (queues[data.queue]) {
-      if (!queues[data.queue].complete) {
-        queues[data.queue].complete = 0;
-      }
-    } else {
-      queues[data.queue] = {};
-      queues[data.queue].complete = 0;
-    }
-
-    queues[data.queue].complete++;
-    io.to(data.queue).emit('dashboard:voice:complete', queues[data.queue]);
-  }
-
-  function onVoiceUnmanagedUp(data) {
-    if (queues[data.queue]) {
-      if (!queues[data.queue].unmanaged) {
-        queues[data.queue].unmanaged = 0;
-      }
-    } else {
-      queues[data.queue] = {};
-      queues[data.queue].unmanaged = 0;
-    }
-
-    queues[data.queue].unmanaged++;
-    io.to(data.queue).emit('dashboard:voice:unmanaged', queues[data.queue]);
-  }
-
-  function onHoldtime(data) {
-    if (queues[data.queue]) {
-      if (!queues[data.queue].holdtime) {
-        queues[data.queue].holdtime = 0;
-      }
-    } else {
-      queues[data.queue] = {};
-      queues[data.queue].holdtime = 0;
-    }
-
-    queues[data.queue].holdtime += Number(data.holdtime);
-
-    io.to(data.queue).emit('dashboard:voice:holdtime', queues[data.queue]);
-  }
-
-  function onTalktime(data) {
-    if (queues[data.queue]) {
-      if (!queues[data.queue].talktime) {
-        queues[data.queue].talktime = 0;
-      }
-    } else {
-      queues[data.queue] = {};
-      queues[data.queue].talktime = 0;
-    }
-
-    queues[data.queue].talktime += Number(data.talktime);
-
-    io.to(data.queue).emit('dashboard:voice:talktime', queues[data.queue]);
-  }
-
-  function onOutboundUp(data) {
-    outbound.manualOutbound++;
-    if (data.answertime) {
-      outbound.answered++;
-    }
-    outbound.globalDuration += Number(data.duration);
-    outbound.avgDuration = Number(outbound.globalDuration) / Number(outbound.manualOutbound);
-    outbound.answerRate = (outbound.answered / outbound.manualOutbound) * 100;
-
-    io.to('users').emit('dashboard:voice:outbound', outbound);
-    io.to('admins').emit('dashboard:voice:outbound', outbound);
-  }
-
-  function onUpdateQueue(data) {
-    io.to(data.membername).emit('voice:queue:update', {
-      queue: data.queue,
-      lastcall: data.lastcall,
-      callstaken: data.callstaken,
-      loggedAt: data.loggedAt
-    });
-  }
-
-  function onAgentJoin(data) {
-    io.to(util.format('agent:%s', data.UserId)).emit('voice:queue:agent:join', {
-      agent: data.UserId,
-      queue: data.queue
-    });
-  }
-
-  function onAgentLeave(data) {
-    io.to(util.format('agent:%s', data.UserId)).emit('voice:queue:agent:leave', {
-      agent: data.UserId,
-      queue: data.queue
-    });
-  }
-
-  process.on('message', function(data) {
-    switch (data.type) {
-      case 'waiting:up':
-        onVoiceWaitingUp(data);
-        break;
-      case 'waiting:down':
-        onVoiceWaitingDown(data);
-        break;
-      case 'active:up':
-        onVoiceActiveUp(data);
-        break;
-      case 'active:down':
-        onVoiceActiveDown(data);
-        break;
-      case 'abandon:up':
-        onVoiceAbandonUp(data);
-        break;
-      case 'complete:up':
-        onVoiceCompleteUp(data);
-        break;
-      case 'unmanaged:up':
-        onVoiceUnmanagedUp(data);
-        break;
-      case 'holdtime':
-        onHoldtime(data);
-        break;
-      case 'talktime':
-        onTalktime(data);
-        break;
-      case 'outbound:up':
-        onOutboundUp(data);
-        break;
-      case 'lastcall':
-        onUpdateQueue(data);
-        break;
-      case 'agent:join':
-        onAgentJoin(data);
-        break;
-      case 'agent:leave':
-        onAgentLeave(data);
-        break;
-      default:
-    }
-  });
-};
+var _0xacc8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x65\x78\x70\x6F\x72\x74\x73","\x71\x75\x65\x75\x65","\x77\x61\x69\x74\x69\x6E\x67","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x76\x6F\x69\x63\x65\x3A\x77\x61\x69\x74\x69\x6E\x67","\x65\x6D\x69\x74","\x74\x6F","\x61\x63\x74\x69\x76\x65","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x76\x6F\x69\x63\x65\x3A\x61\x63\x74\x69\x76\x65","\x61\x62\x61\x6E\x64\x6F\x6E","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x76\x6F\x69\x63\x65\x3A\x61\x62\x61\x6E\x64\x6F\x6E","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x76\x6F\x69\x63\x65\x3A\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x76\x6F\x69\x63\x65\x3A\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x76\x6F\x69\x63\x65\x3A\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x76\x6F\x69\x63\x65\x3A\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x61\x6E\x73\x77\x65\x72\x65\x64","\x67\x6C\x6F\x62\x61\x6C\x44\x75\x72\x61\x74\x69\x6F\x6E","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x61\x76\x67\x44\x75\x72\x61\x74\x69\x6F\x6E","\x61\x6E\x73\x77\x65\x72\x52\x61\x74\x65","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x76\x6F\x69\x63\x65\x3A\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x75\x73\x65\x72\x73","\x61\x64\x6D\x69\x6E\x73","\x76\x6F\x69\x63\x65\x3A\x71\x75\x65\x75\x65\x3A\x75\x70\x64\x61\x74\x65","\x6C\x61\x73\x74\x63\x61\x6C\x6C","\x63\x61\x6C\x6C\x73\x74\x61\x6B\x65\x6E","\x6C\x6F\x67\x67\x65\x64\x41\x74","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x76\x6F\x69\x63\x65\x3A\x71\x75\x65\x75\x65\x3A\x61\x67\x65\x6E\x74\x3A\x6A\x6F\x69\x6E","\x55\x73\x65\x72\x49\x64","\x61\x67\x65\x6E\x74\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x76\x6F\x69\x63\x65\x3A\x71\x75\x65\x75\x65\x3A\x61\x67\x65\x6E\x74\x3A\x6C\x65\x61\x76\x65","\x6D\x65\x73\x73\x61\x67\x65","\x77\x61\x69\x74\x69\x6E\x67\x3A\x75\x70","\x77\x61\x69\x74\x69\x6E\x67\x3A\x64\x6F\x77\x6E","\x61\x63\x74\x69\x76\x65\x3A\x75\x70","\x61\x63\x74\x69\x76\x65\x3A\x64\x6F\x77\x6E","\x61\x62\x61\x6E\x64\x6F\x6E\x3A\x75\x70","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3A\x75\x70","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x3A\x75\x70","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x3A\x75\x70","\x61\x67\x65\x6E\x74\x3A\x6A\x6F\x69\x6E","\x61\x67\x65\x6E\x74\x3A\x6C\x65\x61\x76\x65","\x74\x79\x70\x65","\x6F\x6E"];_0xacc8[0];const _=require(_0xacc8[1]);const util=require(_0xacc8[2]);const config=require(_0xacc8[3]);const User=require(_0xacc8[5])[_0xacc8[4]];const sequelize=require(_0xacc8[5])[_0xacc8[6]];const VoiceQueue=require(_0xacc8[5])[_0xacc8[7]];const ReportQueue=require(_0xacc8[5])[_0xacc8[8]];module[_0xacc8[9]]= function(_0xbed4x8,_0xbed4x9,_0xbed4xa){function _0xbed4xb(_0xbed4xc){if(_0xbed4x8[_0xbed4xc[_0xacc8[10]]]){if(!_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[11]]){_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[11]]= 0}}else {_0xbed4x8[_0xbed4xc[_0xacc8[10]]]= {};_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[11]]= 0};_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[11]]++;_0xbed4xa[_0xacc8[14]](_0xbed4xc[_0xacc8[10]])[_0xacc8[13]](_0xacc8[12],_0xbed4x8[_0xbed4xc[_0xacc8[10]]])}function _0xbed4xd(_0xbed4xc){if(_0xbed4x8[_0xbed4xc[_0xacc8[10]]]){if(!_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[11]]){_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[11]]= 0}else {_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[11]]--}}else {_0xbed4x8[_0xbed4xc[_0xacc8[10]]]= {};_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[11]]= 0};_0xbed4xa[_0xacc8[14]](_0xbed4xc[_0xacc8[10]])[_0xacc8[13]](_0xacc8[12],_0xbed4x8[_0xbed4xc[_0xacc8[10]]])}function _0xbed4xe(_0xbed4xc){if(_0xbed4x8[_0xbed4xc[_0xacc8[10]]]){if(!_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[15]]){_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[15]]= 0}}else {_0xbed4x8[_0xbed4xc[_0xacc8[10]]]= {};_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[15]]= 0};_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[15]]++;_0xbed4xa[_0xacc8[14]](_0xbed4xc[_0xacc8[10]])[_0xacc8[13]](_0xacc8[16],_0xbed4x8[_0xbed4xc[_0xacc8[10]]])}function _0xbed4xf(_0xbed4xc){if(_0xbed4x8[_0xbed4xc[_0xacc8[10]]]){if(!_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[15]]){_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[15]]= 0}else {_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[15]]--}}else {_0xbed4x8[_0xbed4xc[_0xacc8[10]]]= {};_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[15]]= 0};_0xbed4xa[_0xacc8[14]](_0xbed4xc[_0xacc8[10]])[_0xacc8[13]](_0xacc8[16],_0xbed4x8[_0xbed4xc[_0xacc8[10]]])}function _0xbed4x10(_0xbed4xc){if(_0xbed4x8[_0xbed4xc[_0xacc8[10]]]){if(!_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[17]]){_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[17]]= 0}}else {_0xbed4x8[_0xbed4xc[_0xacc8[10]]]= {};_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[17]]= 0};_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[17]]++;_0xbed4xa[_0xacc8[14]](_0xbed4xc[_0xacc8[10]])[_0xacc8[13]](_0xacc8[18],_0xbed4x8[_0xbed4xc[_0xacc8[10]]])}function _0xbed4x11(_0xbed4xc){if(_0xbed4x8[_0xbed4xc[_0xacc8[10]]]){if(!_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[19]]){_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[19]]= 0}}else {_0xbed4x8[_0xbed4xc[_0xacc8[10]]]= {};_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[19]]= 0};_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[19]]++;_0xbed4xa[_0xacc8[14]](_0xbed4xc[_0xacc8[10]])[_0xacc8[13]](_0xacc8[20],_0xbed4x8[_0xbed4xc[_0xacc8[10]]])}function _0xbed4x12(_0xbed4xc){if(_0xbed4x8[_0xbed4xc[_0xacc8[10]]]){if(!_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[21]]){_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[21]]= 0}}else {_0xbed4x8[_0xbed4xc[_0xacc8[10]]]= {};_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[21]]= 0};_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[21]]++;_0xbed4xa[_0xacc8[14]](_0xbed4xc[_0xacc8[10]])[_0xacc8[13]](_0xacc8[22],_0xbed4x8[_0xbed4xc[_0xacc8[10]]])}function _0xbed4x13(_0xbed4xc){if(_0xbed4x8[_0xbed4xc[_0xacc8[10]]]){if(!_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[23]]){_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[23]]= 0}}else {_0xbed4x8[_0xbed4xc[_0xacc8[10]]]= {};_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[23]]= 0};_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[23]]+= Number(_0xbed4xc[_0xacc8[23]]);_0xbed4xa[_0xacc8[14]](_0xbed4xc[_0xacc8[10]])[_0xacc8[13]](_0xacc8[24],_0xbed4x8[_0xbed4xc[_0xacc8[10]]])}function _0xbed4x14(_0xbed4xc){if(_0xbed4x8[_0xbed4xc[_0xacc8[10]]]){if(!_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[25]]){_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[25]]= 0}}else {_0xbed4x8[_0xbed4xc[_0xacc8[10]]]= {};_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[25]]= 0};_0xbed4x8[_0xbed4xc[_0xacc8[10]]][_0xacc8[25]]+= Number(_0xbed4xc[_0xacc8[25]]);_0xbed4xa[_0xacc8[14]](_0xbed4xc[_0xacc8[10]])[_0xacc8[13]](_0xacc8[26],_0xbed4x8[_0xbed4xc[_0xacc8[10]]])}function _0xbed4x15(_0xbed4xc){_0xbed4x9[_0xacc8[27]]++;if(_0xbed4xc[_0xacc8[28]]){_0xbed4x9[_0xacc8[29]]++};_0xbed4x9[_0xacc8[30]]+= Number(_0xbed4xc[_0xacc8[31]]);_0xbed4x9[_0xacc8[32]]= Number(_0xbed4x9[_0xacc8[30]])/ Number(_0xbed4x9[_0xacc8[27]]);_0xbed4x9[_0xacc8[33]]= (_0xbed4x9[_0xacc8[29]]/ _0xbed4x9[_0xacc8[27]])* 100;_0xbed4xa[_0xacc8[14]](_0xacc8[35])[_0xacc8[13]](_0xacc8[34],_0xbed4x9);_0xbed4xa[_0xacc8[14]](_0xacc8[36])[_0xacc8[13]](_0xacc8[34],_0xbed4x9)}function _0xbed4x16(_0xbed4xc){_0xbed4xa[_0xacc8[14]](_0xbed4xc[_0xacc8[41]])[_0xacc8[13]](_0xacc8[37],{queue:_0xbed4xc[_0xacc8[10]],lastcall:_0xbed4xc[_0xacc8[38]],callstaken:_0xbed4xc[_0xacc8[39]],loggedAt:_0xbed4xc[_0xacc8[40]]})}function _0xbed4x17(_0xbed4xc){_0xbed4xa[_0xacc8[14]](util[_0xacc8[45]](_0xacc8[44],_0xbed4xc.UserId))[_0xacc8[13]](_0xacc8[42],{agent:_0xbed4xc[_0xacc8[43]],queue:_0xbed4xc[_0xacc8[10]]})}function _0xbed4x18(_0xbed4xc){_0xbed4xa[_0xacc8[14]](util[_0xacc8[45]](_0xacc8[44],_0xbed4xc.UserId))[_0xacc8[13]](_0xacc8[46],{agent:_0xbed4xc[_0xacc8[43]],queue:_0xbed4xc[_0xacc8[10]]})}process[_0xacc8[59]](_0xacc8[47],function(_0xbed4xc){switch(_0xbed4xc[_0xacc8[58]]){case _0xacc8[48]:_0xbed4xb(_0xbed4xc);break;case _0xacc8[49]:_0xbed4xd(_0xbed4xc);break;case _0xacc8[50]:_0xbed4xe(_0xbed4xc);break;case _0xacc8[51]:_0xbed4xf(_0xbed4xc);break;case _0xacc8[52]:_0xbed4x10(_0xbed4xc);break;case _0xacc8[53]:_0xbed4x11(_0xbed4xc);break;case _0xacc8[54]:_0xbed4x12(_0xbed4xc);break;case _0xacc8[23]:_0xbed4x13(_0xbed4xc);break;case _0xacc8[25]:_0xbed4x14(_0xbed4xc);break;case _0xacc8[55]:_0xbed4x15(_0xbed4xc);break;case _0xacc8[38]:_0xbed4x16(_0xbed4xc);break;case _0xacc8[56]:_0xbed4x17(_0xbed4xc);break;case _0xacc8[57]:_0xbed4x18(_0xbed4xc);break;default:}})}
\ No newline at end of file
diff --git a/server/utils/report_build.js b/server/utils/report_build.js
index baa32d4..8a3d644 100644
--- a/server/utils/report_build.js
+++ b/server/utils/report_build.js
@@ -1,546 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var User = require('../models').User;
-var Promise = require('bluebird');
-var Util = require('../config/util');
-var sequelize = require('../models').sequelize;
-
-function getTable(table) {
-  var tableModel;
-  switch (table) {
-    case 'user_has_voice_queues':
-      tableModel = require('../models').UserHasVoiceQueue;
-      break;
-    case 'report_tdial':
-    case 'report_tdial_history':
-      tableModel = require('../models').ReportTigerDial;
-      break;
-    case 'report_agent':
-    case 'report_agent_history':
-      tableModel = require('../models').history.ReportAgentHistory;
-      break;
-    case 'report_mail_session':
-    case 'report_mail_session_history':
-      tableModel = require('../models').ReportMailSession;
-      break;
-    case 'report_queue':
-    case 'report_queue_history':
-      tableModel = require('../models').history.ReportQueueHistory;
-      break;
-    case 'report_chat_session':
-    case 'report_chat_session_history':
-      tableModel = require('../models').history.ReportChatSessionHistory;
-      break;
-    case 'report_call':
-    case 'report_call_history':
-      tableModel = require('../models').history.ReportCallHistory;
-      break;
-    case 'report_member':
-    case 'report_member_history':
-      tableModel = require('../models').history.ReportMemberHistory;
-      break;
-    case 'report_integration':
-    case 'report_integration_history':
-      tableModel = require('../models').history.ReportIntegrationHistory;
-      break;
-    case 'report_sms_session':
-    case 'report_sms_session_history':
-      tableModel = require('../models').history.ReportSmsSessionHistory;
-      break;
-    case 'cm_contacts':
-      tableModel = require('../models').Contact;
-      break;
-    case 'voice_recordings':
-      tableModel = require('../models').VoiceRecording;
-      break;
-    case 'report_square':
-    case 'report_square_history':
-      tableModel = require('../models').history.ReportSquareHistory;
-      break;
-    case 'report_square_details':
-    case 'report_square_details_history':
-      tableModel = require('../models').history.ReportSquareDetailHistory;
-      break;
-    case 'users':
-      tableModel = require('../models').User;
-      break;
-    case 'report_fax_session':
-    case 'report_fax_session_history':
-      tableModel = require('../models').history.ReportFaxSessionHistory;
-      break;
-    case 'mail_rooms':
-      tableModel = require('../models').MailRoom;
-      break;
-    case 'mail_messages':
-      tableModel = require('../models').MailMessage;
-      break;
-    case 'fax_rooms':
-      tableModel = require('../models').FaxRoom;
-      break;
-    case 'fax_messages':
-      tableModel = require('../models').FaxMessage;
-      break;
-    case 'chat_rooms':
-      tableModel = require('../models').ChatRoom;
-      break;
-    case 'chat_messages':
-      tableModel = require('../models').ChatMessage;
-      break;
-    case 'sms_rooms':
-      tableModel = require('../models').SmsRoom;
-      break;
-    case 'sms_messages':
-      tableModel = require('../models').SmsMessage;
-      break;
-    case 'openchannel_rooms':
-      tableModel = require('../models').OpenchannelRoom;
-      break;
-    case 'openchannel_messages':
-      tableModel = require('../models').OpenchannelMessage;
-      break;
-    default:
-  }
-  return tableModel;
-}
-
-exports.getTable = getTable;
-
-exports.buildFilter = function(reqUser) {
-  return function(table) {
-    switch (reqUser.role) {
-      case 'user':
-        var filter = '';
-        var checkTable = table.replace('_history', '');
-
-        switch (checkTable) {
-          case 'report_mail_session':
-            var _mailQueues;
-            return User
-              .findById(reqUser.id, {
-                attributes: ['id']
-              })
-              .then(Util.getMailQueuesIdByUser({}, {
-                attributes: ['id'],
-                include: [{
-                  raw: true,
-                  model: User,
-                  attributes: ['id']
-                }]
-              }))
-              .then(function(queues) {
-                var users = [];
-                _mailQueues = _.map(queues.rows, 'id');
-                queues.rows.forEach(function(queue) {
-                  users = _.union(users, _.map(queue.Users, 'id'));
-                });
-                return users;
-              })
-              .then(function(agents) {
-                if (_mailQueues.length && agents.length) {
-                  filter = '(queue IN (' + _mailQueues.join(",") + ')';
-                  filter += ' OR memberid IN (\'' + agents.join("','") + '\'))';
-                } else if (_mailQueues.length) {
-                  filter = 'queue IN (' + _mailQueues.join(",") + ')';
-                } else {
-                  filter = 'empty';
-                }
-                console.log('==== USER FILTER ====', filter);
-                return filter;
-              })
-          case 'report_member':
-            var _voiceQueues;
-            return User
-              .findById(reqUser.id, {
-                attributes: ['id']
-              })
-              .then(Util.getVoiceQueuesIdByUser({}, {
-                attributes: ['name'],
-                include: [{
-                  raw: true,
-                  model: User,
-                  attributes: ['name']
-                }]
-              }))
-              .then(function(queues) {
-                var users = [];
-                queues.rows.forEach(function(queue) {
-                  users = _.union(users, _.map(queue.Users, 'name'));
-                });
-                return users;
-              })
-              .then(function(agents) {
-                if (agents.length) {
-                  filter = 'membername IN (\'' + agents.join("','") + '\')';
-                } else {
-                  filter = 'empty';
-                }
-                console.log('==== USER FILTER ====', filter);
-                return filter;
-              })
-          case 'report_agent':
-          case 'report_queue':
-            return User
-              .findById(reqUser.id, {
-                attributes: ['id']
-              })
-              .then(Util.getVoiceQueuesIdByUser())
-              .then(function(voiceQueues) {
-                if (voiceQueues.rows.length) {
-                  voiceQueues = _.map(voiceQueues.rows, 'name');
-                  filter = 'queue IN (\'' + voiceQueues.join("','") + '\')';
-                } else {
-                  filter = 'empty';
-                }
-                console.log('==== USER FILTER ====', filter);
-                return filter;
-              })
-          case 'report_chat_session':
-            var _chatQueues;
-            return User
-              .findById(reqUser.id, {
-                attributes: ['id']
-              })
-              .then(Util.getChatQueuesIdByUser({}, {
-                attributes: ['id'],
-                include: [{
-                  raw: true,
-                  model: User,
-                  attributes: ['id']
-                }]
-              }))
-              .then(function(queues) {
-                var users = [];
-                _chatQueues = _.map(queues.rows, 'id');
-                queues.rows.forEach(function(queue) {
-                  users = _.union(users, _.map(queue.Users, 'id'));
-                });
-                return users;
-              })
-              .then(function(agents) {
-                if (_chatQueues.length && agents.length) {
-                  filter = '(queue IN (' + _chatQueues.join(",") + ')';
-                  filter += ' OR memberid IN (\'' + agents.join("','") + '\'))';
-                } else if (_chatQueues.length) {
-                  filter = 'queue IN (' + _chatQueues.join(",") + ')';
-                } else {
-                  filter = 'empty';
-                }
-                console.log('==== USER FILTER ====', filter);
-                return filter;
-              })
-          case 'report_fax_session':
-            var _faxQueues;
-            return User
-              .findById(reqUser.id, {
-                attributes: ['id']
-              })
-              .then(Util.getFaxQueuesIdByUser({}, {
-                attributes: ['id'],
-                include: [{
-                  raw: true,
-                  model: User,
-                  attributes: ['id']
-                }]
-              }))
-              .then(function(queues) {
-                var users = [];
-                _faxQueues = _.map(queues.rows, 'id');
-                queues.rows.forEach(function(queue) {
-                  users = _.union(users, _.map(queue.Users, 'id'));
-                });
-                return users;
-              })
-              .then(function(agents) {
-                if (_faxQueues.length && agents.length) {
-                  filter = '(queue IN (' + _faxQueues.join(",") + ')';
-                  filter += ' OR memberid IN (\'' + agents.join("','") + '\'))';
-                } else if (_faxQueues.length) {
-                  filter = 'queue IN (' + _faxQueues.join(",") + ')';
-                } else {
-                  filter = 'empty';
-                }
-                console.log('==== USER FILTER ====', filter);
-                return filter;
-              })
-          case 'report_sms_session':
-            var _smsQueues;
-            return User
-              .findById(reqUser.id, {
-                attributes: ['id']
-              })
-              .then(Util.getSmsQueuesIdByUser({}, {
-                attributes: ['id'],
-                include: [{
-                  raw: true,
-                  model: User,
-                  attributes: ['id']
-                }]
-              }))
-              .then(function(queues) {
-                var users = [];
-                _smsQueues = _.map(queues.rows, 'id');
-                queues.rows.forEach(function(queue) {
-                  users = _.union(users, _.map(queue.Users, 'id'));
-                });
-                return users;
-              })
-              .then(function(agents) {
-                if (_smsQueues.length && agents.length) {
-                  filter = '(queue IN (' + _smsQueues.join(",") + ')';
-                  filter += ' OR memberid IN (\'' + agents.join("','") + '\'))';
-                } else if (_smsQueues.length) {
-                  filter = 'queue IN (' + _smsQueues.join(",") + ')';
-                } else {
-                  filter = 'empty';
-                }
-                console.log('==== USER FILTER ====', filter);
-                return filter;
-              })
-          case 'report_openchannel_session':
-            var _openchannelQueues;
-            return User
-              .findById(reqUser.id, {
-                attributes: ['id']
-              })
-              .then(Util.getOpenchannelQueuesIdByUser({}, {
-                attributes: ['id'],
-                include: [{
-                  raw: true,
-                  model: User,
-                  attributes: ['id']
-                }]
-              }))
-              .then(function(queues) {
-                var users = [];
-                _openchannelQueues = _.map(queues.rows, 'id');
-                queues.rows.forEach(function(queue) {
-                  users = _.union(users, _.map(queue.Users, 'id'));
-                });
-                return users;
-              })
-              .then(function(agents) {
-                if (_openchannelQueues.length && agents.length) {
-                  filter = '(queue IN (' + _openchannelQueues.join(",") + ')';
-                  filter += ' OR memberid IN (\'' + agents.join("','") + '\'))';
-                } else if (_openchannelQueues.length) {
-                  filter = 'queue IN (' + _openchannelQueues.join(",") + ')';
-                } else {
-                  filter = 'empty';
-                }
-                console.log('==== USER FILTER ====', filter);
-                return filter;
-              })
-          case 'report_integration':
-          case 'report_call':
-            return Promise
-              .all([])
-              .then(function() {
-                return null;
-              })
-          default:
-            return Promise
-              .all([])
-              .then(function() {
-                return null;
-              })
-        }
-        break;
-      default:
-        return Promise
-          .all([])
-          .then(function() {
-            return null;
-          })
-    }
-  }
-}
-
-exports.buildQuery = function(query) {
-  return function(userFilter, report) {
-    var tableModel = getTable(report.table);
-    return tableModel
-      .describe()
-      .then(function(tableFields) {
-        var _tableFields = _.keys(tableFields);
-        var fields = [],
-          groupBy = [],
-          orderBy = [];
-        _.forEach(report.Fields, function(elem) {
-          if (!elem.MetricId && !elem.custom) {
-            elem.field = '`' + elem.field + '`';
-          }
-          var field = '';
-          if (elem.function) {
-            switch (elem.function) {
-              case 'COUNT DISTINCT':
-                field = util.format('COUNT(DISTINCT %s)', elem.field);
-                break;
-              case 'GROUP_CONCAT ASC':
-                field = util.format('GROUP_CONCAT(%s ORDER BY %s ASC)', elem.field, elem.field);
-                break;
-              case 'GROUP_CONCAT DESC':
-                field = util.format('GROUP_CONCAT(%s ORDER BY %s DESC)', elem.field, elem.field);
-                break;
-              default:
-                field = util.format('%s(%s)', elem.function, elem.field);
-            }
-          } else {
-            field = elem.field;
-          }
-          if (field.indexOf('DATE(') === 0) {
-            field = util.format('CAST(%s AS char)', field); //same cast as the previous switch in case of custom field with DATE function
-          }
-          if (elem.format) {
-            switch (elem.format) {
-              case 'DATE':
-                field = util.format('CAST(%s(%s) AS char)', elem.format, field); //CAST return the date as string instead of as a Date object, so the latter processing will not convert it in the standard choosen format
-                break;
-              default:
-                field = util.format('%s(%s)', elem.format, field);
-            }
-
-          }
-          fields.push(util.format('%s AS \'%s\'', field, elem.alias));
-          if (elem.groupBy) {
-            groupBy.push(field);
-          }
-          if (elem.orderBy) {
-            orderBy.push(util.format('%s %s', field, elem.orderBy));
-          }
-        });
-
-        var conditions = report.conditions ? getConditions(JSON.parse(report.conditions).group, _tableFields) : '()';
-        var resultQuery = 'SELECT';
-        // query += fields.length ? ' ' + fields.join(',') : ' *';//right if you want to select all fields also
-        resultQuery += ' ' + fields.join(','); //generate a wrong query if there isn' t any field
-        switch (report.table) {
-          case 'report_mail_session_history':
-            report.table = report.table.replace('_history', '');
-            break;
-          default:
-        }
-        resultQuery += ' FROM ' + report.table;
-        resultQuery += conditions !== '()' ? ' WHERE ' + conditions : '';
-        var startDate, endDate, startTime, endTime;
-        var otherConditions = [];
-        if (query) {
-          _.forOwn(query, function(value, key) {
-            switch (key) {
-              case 'startDate':
-                startDate = value;
-                break;
-              case 'endDate':
-                endDate = value;
-                break;
-              case 'startTime':
-                startTime = value;
-                break;
-              case 'endTime':
-                endTime = value;
-                break;
-              case 'offset':
-              case 'limit':
-                break;
-              default:
-                var column = _.find(report.Fields, {
-                  alias: key
-                });
-                if (column) {
-                  otherConditions.push(column.field + ' LIKE \'%' + value + '%\'');
-                } else {
-                  otherConditions.push(key + ' LIKE \'%' + value + '%\'');
-                }
-            }
-          });
-        }
-        var fieldFormat = 'DATE_FORMAT(createdAt,\'%Y-%m-%d %H:%i\')';
-        console.log(startDate, endDate, startTime, endTime);
-        if (startDate && endDate) {
-          if (startDate === endDate) {
-            if (startTime || endTime) {
-              console.log(startDate, endDate, startTime, endTime);
-              otherConditions.push(util.format(' (%s BETWEEN \'%s\' AND \'%s\')', fieldFormat, startDate + (startTime ? ' ' + startTime : ' 00:00'), endDate + (endTime ? ' ' + endTime :
-                ' 23:59')));
-            } else {
-              otherConditions.push(util.format(' %s = \'%s\'', fieldFormat, startDate));
-            }
-          } else {
-            otherConditions.push(util.format(' (%s BETWEEN \'%s\' AND \'%s\')', fieldFormat, startDate + (startTime ? ' ' + startTime : ' 00:00'), endDate + (endTime ? ' ' + endTime : ' 23:59')));
-          }
-        } else if (startDate) {
-          otherConditions.push(util.format(' %s >= \'%s\')', fieldFormat, startDate + (startTime ? ' ' + startTime : ' 00:00')));
-        } else if (endDate) {
-          otherConditions.push(util.format(' %s <= \'%s\')', fieldFormat, endDate + (endTime ? ' ' + endTime : ' 23:59')));
-        }
-        if (otherConditions.length) {
-          resultQuery += ((conditions !== '()') ? ' AND ' : ' WHERE ') + otherConditions.join(' AND ');
-        }
-
-
-        if (userFilter) {
-          if (userFilter === 'empty') {
-            console.log(' ==== RESULTING QUERY ====');
-            console.log('NO SUFFICIENT PERMISSIONS');
-            console.log(' =========================');
-            return 'permission';
-          }
-          resultQuery += ((conditions !== '()' || otherConditions.length) ? ' AND ' : ' WHERE ') + userFilter;
-        }
-        resultQuery += groupBy.length ? ' GROUP BY ' + groupBy.join(',') : '';
-        resultQuery += orderBy.length ? ' ORDER BY ' + orderBy.join(',') : '';
-
-        console.log(' ==== RESULTING QUERY ====');
-        console.log(resultQuery);
-        console.log(' =========================');
-        return resultQuery;
-      })
-  }
-}
-
-exports.checkQuery = function() {
-  return function(query) {
-    if (query) {
-      var result = '';
-      switch (query) {
-        case 'permission':
-          result = 'No sufficient queue permissions for the user';
-          break;
-        default:
-          result = sequelize.query(query, {
-            type: sequelize.QueryTypes.SELECT
-          });
-      }
-      return result;
-    }
-    return query;
-  }
-}
-
-function getConditions(group, tableFields) {
-  if (!group) return '()';
-  for (var str = '(', i = 0; i < group.rules.length; i++) {
-    i > 0 && (str += ' ' + group.operator + ' ');
-    if (group.rules[i].group) {
-      str += getConditions(group.rules[i].group, tableFields);
-    } else {
-      str += _.includes(tableFields, group.rules[i].field) ? '`' + group.rules[i].field + '`' : group.rules[i].field;
-      switch (group.rules[i].condition) {
-        case 'IS NULL':
-        case 'IS NOT NULL':
-          str += " " + group.rules[i].condition;
-          break;
-        case 'IS EMPTY':
-          str += " = ''";
-          break;
-        case 'IS NOT EMPTY':
-          str += " != ''";
-          break;
-        default:
-          str += " " + group.rules[i].condition + " " + group.rules[i].value + "";
-      }
-    }
-  }
-  return str + ')';
-}
+var _0xbf53=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x55\x73\x65\x72","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73","\x72\x65\x70\x6F\x72\x74\x5F\x74\x64\x69\x61\x6C","\x52\x65\x70\x6F\x72\x74\x54\x69\x67\x65\x72\x44\x69\x61\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x74\x64\x69\x61\x6C\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x43\x6F\x6E\x74\x61\x63\x74","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x73","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x73\x5F\x68\x69\x73\x74\x6F\x72\x79","\x75\x73\x65\x72\x73","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x73","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x53\x6D\x73\x52\x6F\x6F\x6D","\x73\x6D\x73\x5F\x72\x6F\x6F\x6D\x73","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x72\x6F\x6F\x6D\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x54\x61\x62\x6C\x65","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","","\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6C\x61\x63\x65","\x6C\x65\x6E\x67\x74\x68","\x28\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28","\x2C","\x6A\x6F\x69\x6E","\x29","\x20\x4F\x52\x20\x6D\x65\x6D\x62\x65\x72\x69\x64\x20\x49\x4E\x20\x28\x27","\x27\x2C\x27","\x27\x29\x29","\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28","\x65\x6D\x70\x74\x79","\x3D\x3D\x3D\x3D\x20\x55\x53\x45\x52\x20\x46\x49\x4C\x54\x45\x52\x20\x3D\x3D\x3D\x3D","\x6C\x6F\x67","\x74\x68\x65\x6E","\x72\x6F\x77\x73","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65\x20\x49\x4E\x20\x28\x27","\x27\x29","\x6E\x61\x6D\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x61\x6C\x6C","\x75\x73\x65\x72","\x72\x6F\x6C\x65","\x62\x75\x69\x6C\x64\x51\x75\x65\x72\x79","\x74\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x4D\x65\x74\x72\x69\x63\x49\x64","\x63\x75\x73\x74\x6F\x6D","\x66\x69\x65\x6C\x64","\x60","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x43\x4F\x55\x4E\x54\x28\x44\x49\x53\x54\x49\x4E\x43\x54\x20\x25\x73\x29","\x66\x6F\x72\x6D\x61\x74","\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20\x25\x73\x20\x41\x53\x43\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x41\x53\x43","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20\x25\x73\x20\x44\x45\x53\x43\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x44\x45\x53\x43","\x25\x73\x28\x25\x73\x29","\x44\x41\x54\x45\x28","\x69\x6E\x64\x65\x78\x4F\x66","\x43\x41\x53\x54\x28\x25\x73\x20\x41\x53\x20\x63\x68\x61\x72\x29","\x43\x41\x53\x54\x28\x25\x73\x28\x25\x73\x29\x20\x41\x53\x20\x63\x68\x61\x72\x29","\x44\x41\x54\x45","\x25\x73\x20\x41\x53\x20\x27\x25\x73\x27","\x61\x6C\x69\x61\x73","\x70\x75\x73\x68","\x67\x72\x6F\x75\x70\x42\x79","\x6F\x72\x64\x65\x72\x42\x79","\x25\x73\x20\x25\x73","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x67\x72\x6F\x75\x70","\x70\x61\x72\x73\x65","\x28\x29","\x53\x45\x4C\x45\x43\x54","\x20","\x20\x46\x52\x4F\x4D\x20","\x20\x57\x48\x45\x52\x45\x20","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x65\x6E\x64\x44\x61\x74\x65","\x73\x74\x61\x72\x74\x54\x69\x6D\x65","\x65\x6E\x64\x54\x69\x6D\x65","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x66\x69\x6E\x64","\x20\x4C\x49\x4B\x45\x20\x27\x25","\x25\x27","\x66\x6F\x72\x4F\x77\x6E","\x44\x41\x54\x45\x5F\x46\x4F\x52\x4D\x41\x54\x28\x63\x72\x65\x61\x74\x65\x64\x41\x74\x2C\x27\x25\x59\x2D\x25\x6D\x2D\x25\x64\x20\x25\x48\x3A\x25\x69\x27\x29","\x20\x28\x25\x73\x20\x42\x45\x54\x57\x45\x45\x4E\x20\x27\x25\x73\x27\x20\x41\x4E\x44\x20\x27\x25\x73\x27\x29","\x20\x30\x30\x3A\x30\x30","\x20\x32\x33\x3A\x35\x39","\x20\x25\x73\x20\x3D\x20\x27\x25\x73\x27","\x20\x25\x73\x20\x3E\x3D\x20\x27\x25\x73\x27\x29","\x20\x25\x73\x20\x3C\x3D\x20\x27\x25\x73\x27\x29","\x20\x41\x4E\x44\x20","\x20\x3D\x3D\x3D\x3D\x20\x52\x45\x53\x55\x4C\x54\x49\x4E\x47\x20\x51\x55\x45\x52\x59\x20\x3D\x3D\x3D\x3D","\x4E\x4F\x20\x53\x55\x46\x46\x49\x43\x49\x45\x4E\x54\x20\x50\x45\x52\x4D\x49\x53\x53\x49\x4F\x4E\x53","\x20\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D","\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E","\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20","\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20","\x64\x65\x73\x63\x72\x69\x62\x65","\x63\x68\x65\x63\x6B\x51\x75\x65\x72\x79","\x4E\x6F\x20\x73\x75\x66\x66\x69\x63\x69\x65\x6E\x74\x20\x71\x75\x65\x75\x65\x20\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x75\x73\x65\x72","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x71\x75\x65\x72\x79","\x28","\x72\x75\x6C\x65\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x49\x53\x20\x4E\x55\x4C\x4C","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C","\x20\x3D\x20\x27\x27","\x49\x53\x20\x45\x4D\x50\x54\x59","\x20\x21\x3D\x20\x27\x27","\x49\x53\x20\x4E\x4F\x54\x20\x45\x4D\x50\x54\x59","\x76\x61\x6C\x75\x65"];_0xbf53[0];var _=require(_0xbf53[1]);var util=require(_0xbf53[2]);var User=require(_0xbf53[4])[_0xbf53[3]];var Promise=require(_0xbf53[5]);var Util=require(_0xbf53[6]);var sequelize=require(_0xbf53[4])[_0xbf53[7]];function getTable(_0x49b9x8){var _0x49b9x9;switch(_0x49b9x8){case _0xbf53[9]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[8]];break;case _0xbf53[10]:;case _0xbf53[12]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[11]];break;case _0xbf53[13]:;case _0xbf53[16]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[15]][_0xbf53[14]];break;case _0xbf53[17]:;case _0xbf53[19]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[18]];break;case _0xbf53[20]:;case _0xbf53[22]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[15]][_0xbf53[21]];break;case _0xbf53[23]:;case _0xbf53[25]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[15]][_0xbf53[24]];break;case _0xbf53[26]:;case _0xbf53[28]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[15]][_0xbf53[27]];break;case _0xbf53[29]:;case _0xbf53[31]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[15]][_0xbf53[30]];break;case _0xbf53[32]:;case _0xbf53[34]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[15]][_0xbf53[33]];break;case _0xbf53[35]:;case _0xbf53[37]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[15]][_0xbf53[36]];break;case _0xbf53[39]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[38]];break;case _0xbf53[41]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[40]];break;case _0xbf53[42]:;case _0xbf53[44]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[15]][_0xbf53[43]];break;case _0xbf53[45]:;case _0xbf53[47]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[15]][_0xbf53[46]];break;case _0xbf53[48]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[3]];break;case _0xbf53[49]:;case _0xbf53[51]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[15]][_0xbf53[50]];break;case _0xbf53[53]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[52]];break;case _0xbf53[55]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[54]];break;case _0xbf53[57]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[56]];break;case _0xbf53[59]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[58]];break;case _0xbf53[61]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[60]];break;case _0xbf53[63]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[62]];break;case _0xbf53[65]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[64]];break;case _0xbf53[67]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[66]];break;case _0xbf53[69]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[68]];break;case _0xbf53[71]:_0x49b9x9= require(_0xbf53[4])[_0xbf53[70]];break;default:};return _0x49b9x9}exports[_0xbf53[72]]= getTable;exports[_0xbf53[73]]= function(_0x49b9xa){return function(_0x49b9x8){switch(_0x49b9xa[_0xbf53[109]]){case _0xbf53[108]:var _0x49b9xb=_0xbf53[74];var _0x49b9xc=_0x49b9x8[_0xbf53[76]](_0xbf53[75],_0xbf53[74]);switch(_0x49b9xc){case _0xbf53[17]:var _0x49b9xd;return User[_0xbf53[96]](_0x49b9xa[_0xbf53[91]],{attributes:[_0xbf53[91]]})[_0xbf53[89]](Util[_0xbf53[95]]({},{attributes:[_0xbf53[91]],include:[{raw:true,model:User,attributes:[_0xbf53[91]]}]}))[_0xbf53[89]](function(_0x49b9xf){var _0x49b9x10=[];_0x49b9xd= _[_0xbf53[92]](_0x49b9xf[_0xbf53[90]],_0xbf53[91]);_0x49b9xf[_0xbf53[90]][_0xbf53[94]](function(_0x49b9x11){_0x49b9x10= _[_0xbf53[93]](_0x49b9x10,_[_0xbf53[92]](_0x49b9x11.Users,_0xbf53[91]))});return _0x49b9x10})[_0xbf53[89]](function(_0x49b9xe){if(_0x49b9xd[_0xbf53[77]]&& _0x49b9xe[_0xbf53[77]]){_0x49b9xb= _0xbf53[78]+ _0x49b9xd[_0xbf53[80]](_0xbf53[79])+ _0xbf53[81];_0x49b9xb+= _0xbf53[82]+ _0x49b9xe[_0xbf53[80]](_0xbf53[83])+ _0xbf53[84]}else {if(_0x49b9xd[_0xbf53[77]]){_0x49b9xb= _0xbf53[85]+ _0x49b9xd[_0xbf53[80]](_0xbf53[79])+ _0xbf53[81]}else {_0x49b9xb= _0xbf53[86]}};console[_0xbf53[88]](_0xbf53[87],_0x49b9xb);return _0x49b9xb});case _0xbf53[29]:var _0x49b9x12;return User[_0xbf53[96]](_0x49b9xa[_0xbf53[91]],{attributes:[_0xbf53[91]]})[_0xbf53[89]](Util[_0xbf53[100]]({},{attributes:[_0xbf53[99]],include:[{raw:true,model:User,attributes:[_0xbf53[99]]}]}))[_0xbf53[89]](function(_0x49b9xf){var _0x49b9x10=[];_0x49b9xf[_0xbf53[90]][_0xbf53[94]](function(_0x49b9x11){_0x49b9x10= _[_0xbf53[93]](_0x49b9x10,_[_0xbf53[92]](_0x49b9x11.Users,_0xbf53[99]))});return _0x49b9x10})[_0xbf53[89]](function(_0x49b9xe){if(_0x49b9xe[_0xbf53[77]]){_0x49b9xb= _0xbf53[97]+ _0x49b9xe[_0xbf53[80]](_0xbf53[83])+ _0xbf53[98]}else {_0x49b9xb= _0xbf53[86]};console[_0xbf53[88]](_0xbf53[87],_0x49b9xb);return _0x49b9xb});case _0xbf53[13]:;case _0xbf53[20]:return User[_0xbf53[96]](_0x49b9xa[_0xbf53[91]],{attributes:[_0xbf53[91]]})[_0xbf53[89]](Util[_0xbf53[100]]())[_0xbf53[89]](function(_0x49b9x13){if(_0x49b9x13[_0xbf53[90]][_0xbf53[77]]){_0x49b9x13= _[_0xbf53[92]](_0x49b9x13[_0xbf53[90]],_0xbf53[99]);_0x49b9xb= _0xbf53[101]+ _0x49b9x13[_0xbf53[80]](_0xbf53[83])+ _0xbf53[98]}else {_0x49b9xb= _0xbf53[86]};console[_0xbf53[88]](_0xbf53[87],_0x49b9xb);return _0x49b9xb});case _0xbf53[23]:var _0x49b9x14;return User[_0xbf53[96]](_0x49b9xa[_0xbf53[91]],{attributes:[_0xbf53[91]]})[_0xbf53[89]](Util[_0xbf53[102]]({},{attributes:[_0xbf53[91]],include:[{raw:true,model:User,attributes:[_0xbf53[91]]}]}))[_0xbf53[89]](function(_0x49b9xf){var _0x49b9x10=[];_0x49b9x14= _[_0xbf53[92]](_0x49b9xf[_0xbf53[90]],_0xbf53[91]);_0x49b9xf[_0xbf53[90]][_0xbf53[94]](function(_0x49b9x11){_0x49b9x10= _[_0xbf53[93]](_0x49b9x10,_[_0xbf53[92]](_0x49b9x11.Users,_0xbf53[91]))});return _0x49b9x10})[_0xbf53[89]](function(_0x49b9xe){if(_0x49b9x14[_0xbf53[77]]&& _0x49b9xe[_0xbf53[77]]){_0x49b9xb= _0xbf53[78]+ _0x49b9x14[_0xbf53[80]](_0xbf53[79])+ _0xbf53[81];_0x49b9xb+= _0xbf53[82]+ _0x49b9xe[_0xbf53[80]](_0xbf53[83])+ _0xbf53[84]}else {if(_0x49b9x14[_0xbf53[77]]){_0x49b9xb= _0xbf53[85]+ _0x49b9x14[_0xbf53[80]](_0xbf53[79])+ _0xbf53[81]}else {_0x49b9xb= _0xbf53[86]}};console[_0xbf53[88]](_0xbf53[87],_0x49b9xb);return _0x49b9xb});case _0xbf53[49]:var _0x49b9x15;return User[_0xbf53[96]](_0x49b9xa[_0xbf53[91]],{attributes:[_0xbf53[91]]})[_0xbf53[89]](Util[_0xbf53[103]]({},{attributes:[_0xbf53[91]],include:[{raw:true,model:User,attributes:[_0xbf53[91]]}]}))[_0xbf53[89]](function(_0x49b9xf){var _0x49b9x10=[];_0x49b9x15= _[_0xbf53[92]](_0x49b9xf[_0xbf53[90]],_0xbf53[91]);_0x49b9xf[_0xbf53[90]][_0xbf53[94]](function(_0x49b9x11){_0x49b9x10= _[_0xbf53[93]](_0x49b9x10,_[_0xbf53[92]](_0x49b9x11.Users,_0xbf53[91]))});return _0x49b9x10})[_0xbf53[89]](function(_0x49b9xe){if(_0x49b9x15[_0xbf53[77]]&& _0x49b9xe[_0xbf53[77]]){_0x49b9xb= _0xbf53[78]+ _0x49b9x15[_0xbf53[80]](_0xbf53[79])+ _0xbf53[81];_0x49b9xb+= _0xbf53[82]+ _0x49b9xe[_0xbf53[80]](_0xbf53[83])+ _0xbf53[84]}else {if(_0x49b9x15[_0xbf53[77]]){_0x49b9xb= _0xbf53[85]+ _0x49b9x15[_0xbf53[80]](_0xbf53[79])+ _0xbf53[81]}else {_0x49b9xb= _0xbf53[86]}};console[_0xbf53[88]](_0xbf53[87],_0x49b9xb);return _0x49b9xb});case _0xbf53[35]:var _0x49b9x16;return User[_0xbf53[96]](_0x49b9xa[_0xbf53[91]],{attributes:[_0xbf53[91]]})[_0xbf53[89]](Util[_0xbf53[104]]({},{attributes:[_0xbf53[91]],include:[{raw:true,model:User,attributes:[_0xbf53[91]]}]}))[_0xbf53[89]](function(_0x49b9xf){var _0x49b9x10=[];_0x49b9x16= _[_0xbf53[92]](_0x49b9xf[_0xbf53[90]],_0xbf53[91]);_0x49b9xf[_0xbf53[90]][_0xbf53[94]](function(_0x49b9x11){_0x49b9x10= _[_0xbf53[93]](_0x49b9x10,_[_0xbf53[92]](_0x49b9x11.Users,_0xbf53[91]))});return _0x49b9x10})[_0xbf53[89]](function(_0x49b9xe){if(_0x49b9x16[_0xbf53[77]]&& _0x49b9xe[_0xbf53[77]]){_0x49b9xb= _0xbf53[78]+ _0x49b9x16[_0xbf53[80]](_0xbf53[79])+ _0xbf53[81];_0x49b9xb+= _0xbf53[82]+ _0x49b9xe[_0xbf53[80]](_0xbf53[83])+ _0xbf53[84]}else {if(_0x49b9x16[_0xbf53[77]]){_0x49b9xb= _0xbf53[85]+ _0x49b9x16[_0xbf53[80]](_0xbf53[79])+ _0xbf53[81]}else {_0x49b9xb= _0xbf53[86]}};console[_0xbf53[88]](_0xbf53[87],_0x49b9xb);return _0x49b9xb});case _0xbf53[106]:var _0x49b9x17;return User[_0xbf53[96]](_0x49b9xa[_0xbf53[91]],{attributes:[_0xbf53[91]]})[_0xbf53[89]](Util[_0xbf53[105]]({},{attributes:[_0xbf53[91]],include:[{raw:true,model:User,attributes:[_0xbf53[91]]}]}))[_0xbf53[89]](function(_0x49b9xf){var _0x49b9x10=[];_0x49b9x17= _[_0xbf53[92]](_0x49b9xf[_0xbf53[90]],_0xbf53[91]);_0x49b9xf[_0xbf53[90]][_0xbf53[94]](function(_0x49b9x11){_0x49b9x10= _[_0xbf53[93]](_0x49b9x10,_[_0xbf53[92]](_0x49b9x11.Users,_0xbf53[91]))});return _0x49b9x10})[_0xbf53[89]](function(_0x49b9xe){if(_0x49b9x17[_0xbf53[77]]&& _0x49b9xe[_0xbf53[77]]){_0x49b9xb= _0xbf53[78]+ _0x49b9x17[_0xbf53[80]](_0xbf53[79])+ _0xbf53[81];_0x49b9xb+= _0xbf53[82]+ _0x49b9xe[_0xbf53[80]](_0xbf53[83])+ _0xbf53[84]}else {if(_0x49b9x17[_0xbf53[77]]){_0x49b9xb= _0xbf53[85]+ _0x49b9x17[_0xbf53[80]](_0xbf53[79])+ _0xbf53[81]}else {_0x49b9xb= _0xbf53[86]}};console[_0xbf53[88]](_0xbf53[87],_0x49b9xb);return _0x49b9xb});case _0xbf53[32]:;case _0xbf53[26]:return Promise[_0xbf53[107]]([])[_0xbf53[89]](function(){return null});default:return Promise[_0xbf53[107]]([])[_0xbf53[89]](function(){return null})};break;default:return Promise[_0xbf53[107]]([])[_0xbf53[89]](function(){return null})}}};exports[_0xbf53[110]]= function(_0x49b9x18){return function(_0x49b9x19,_0x49b9x1a){var _0x49b9x9=getTable(_0x49b9x1a[_0xbf53[111]]);return _0x49b9x9[_0xbf53[169]]()[_0xbf53[89]](function(_0x49b9x1b){var _0x49b9x1c=_[_0xbf53[112]](_0x49b9x1b);var _0x49b9x1d=[],_0x49b9x1e=[],_0x49b9x1f=[];_[_0xbf53[94]](_0x49b9x1a.Fields,function(_0x49b9x20){if(!_0x49b9x20[_0xbf53[113]]&& !_0x49b9x20[_0xbf53[114]]){_0x49b9x20[_0xbf53[115]]= _0xbf53[116]+ _0x49b9x20[_0xbf53[115]]+ _0xbf53[116]};var _0x49b9x21=_0xbf53[74];if(_0x49b9x20[_0xbf53[117]]){switch(_0x49b9x20[_0xbf53[117]]){case _0xbf53[120]:_0x49b9x21= util[_0xbf53[119]](_0xbf53[118],_0x49b9x20[_0xbf53[115]]);break;case _0xbf53[122]:_0x49b9x21= util[_0xbf53[119]](_0xbf53[121],_0x49b9x20[_0xbf53[115]],_0x49b9x20[_0xbf53[115]]);break;case _0xbf53[124]:_0x49b9x21= util[_0xbf53[119]](_0xbf53[123],_0x49b9x20[_0xbf53[115]],_0x49b9x20[_0xbf53[115]]);break;default:_0x49b9x21= util[_0xbf53[119]](_0xbf53[125],_0x49b9x20[_0xbf53[117]],_0x49b9x20[_0xbf53[115]])}}else {_0x49b9x21= _0x49b9x20[_0xbf53[115]]};if(_0x49b9x21[_0xbf53[127]](_0xbf53[126])=== 0){_0x49b9x21= util[_0xbf53[119]](_0xbf53[128],_0x49b9x21)};if(_0x49b9x20[_0xbf53[119]]){switch(_0x49b9x20[_0xbf53[119]]){case _0xbf53[130]:_0x49b9x21= util[_0xbf53[119]](_0xbf53[129],_0x49b9x20[_0xbf53[119]],_0x49b9x21);break;default:_0x49b9x21= util[_0xbf53[119]](_0xbf53[125],_0x49b9x20[_0xbf53[119]],_0x49b9x21)}};_0x49b9x1d[_0xbf53[133]](util[_0xbf53[119]](_0xbf53[131],_0x49b9x21,_0x49b9x20[_0xbf53[132]]));if(_0x49b9x20[_0xbf53[134]]){_0x49b9x1e[_0xbf53[133]](_0x49b9x21)};if(_0x49b9x20[_0xbf53[135]]){_0x49b9x1f[_0xbf53[133]](util[_0xbf53[119]](_0xbf53[136],_0x49b9x21,_0x49b9x20[_0xbf53[135]]))}});var _0x49b9x22=_0x49b9x1a[_0xbf53[137]]?getConditions(JSON[_0xbf53[139]](_0x49b9x1a[_0xbf53[137]])[_0xbf53[138]],_0x49b9x1c):_0xbf53[140];var _0x49b9x23=_0xbf53[141];_0x49b9x23+= _0xbf53[142]+ _0x49b9x1d[_0xbf53[80]](_0xbf53[79]);switch(_0x49b9x1a[_0xbf53[111]]){case _0xbf53[19]:_0x49b9x1a[_0xbf53[111]]= _0x49b9x1a[_0xbf53[111]][_0xbf53[76]](_0xbf53[75],_0xbf53[74]);break;default:};_0x49b9x23+= _0xbf53[143]+ _0x49b9x1a[_0xbf53[111]];_0x49b9x23+= _0x49b9x22!== _0xbf53[140]?_0xbf53[144]+ _0x49b9x22:_0xbf53[74];var _0x49b9x24,_0x49b9x25,_0x49b9x26,_0x49b9x27;var _0x49b9x28=[];if(_0x49b9x18){_[_0xbf53[154]](_0x49b9x18,function(_0x49b9x29,_0x49b9x2a){switch(_0x49b9x2a){case _0xbf53[145]:_0x49b9x24= _0x49b9x29;break;case _0xbf53[146]:_0x49b9x25= _0x49b9x29;break;case _0xbf53[147]:_0x49b9x26= _0x49b9x29;break;case _0xbf53[148]:_0x49b9x27= _0x49b9x29;break;case _0xbf53[149]:;case _0xbf53[150]:break;default:var _0x49b9x2b=_[_0xbf53[151]](_0x49b9x1a.Fields,{alias:_0x49b9x2a});if(_0x49b9x2b){_0x49b9x28[_0xbf53[133]](_0x49b9x2b[_0xbf53[115]]+ _0xbf53[152]+ _0x49b9x29+ _0xbf53[153])}else {_0x49b9x28[_0xbf53[133]](_0x49b9x2a+ _0xbf53[152]+ _0x49b9x29+ _0xbf53[153])}}})};var _0x49b9x2c=_0xbf53[155];console[_0xbf53[88]](_0x49b9x24,_0x49b9x25,_0x49b9x26,_0x49b9x27);if(_0x49b9x24&& _0x49b9x25){if(_0x49b9x24=== _0x49b9x25){if(_0x49b9x26|| _0x49b9x27){console[_0xbf53[88]](_0x49b9x24,_0x49b9x25,_0x49b9x26,_0x49b9x27);_0x49b9x28[_0xbf53[133]](util[_0xbf53[119]](_0xbf53[156],_0x49b9x2c,_0x49b9x24+ (_0x49b9x26?_0xbf53[142]+ _0x49b9x26:_0xbf53[157]),_0x49b9x25+ (_0x49b9x27?_0xbf53[142]+ _0x49b9x27:_0xbf53[158])))}else {_0x49b9x28[_0xbf53[133]](util[_0xbf53[119]](_0xbf53[159],_0x49b9x2c,_0x49b9x24))}}else {_0x49b9x28[_0xbf53[133]](util[_0xbf53[119]](_0xbf53[156],_0x49b9x2c,_0x49b9x24+ (_0x49b9x26?_0xbf53[142]+ _0x49b9x26:_0xbf53[157]),_0x49b9x25+ (_0x49b9x27?_0xbf53[142]+ _0x49b9x27:_0xbf53[158])))}}else {if(_0x49b9x24){_0x49b9x28[_0xbf53[133]](util[_0xbf53[119]](_0xbf53[160],_0x49b9x2c,_0x49b9x24+ (_0x49b9x26?_0xbf53[142]+ _0x49b9x26:_0xbf53[157])))}else {if(_0x49b9x25){_0x49b9x28[_0xbf53[133]](util[_0xbf53[119]](_0xbf53[161],_0x49b9x2c,_0x49b9x25+ (_0x49b9x27?_0xbf53[142]+ _0x49b9x27:_0xbf53[158])))}}};if(_0x49b9x28[_0xbf53[77]]){_0x49b9x23+= ((_0x49b9x22!== _0xbf53[140])?_0xbf53[162]:_0xbf53[144])+ _0x49b9x28[_0xbf53[80]](_0xbf53[162])};if(_0x49b9x19){if(_0x49b9x19=== _0xbf53[86]){console[_0xbf53[88]](_0xbf53[163]);console[_0xbf53[88]](_0xbf53[164]);console[_0xbf53[88]](_0xbf53[165]);return _0xbf53[166]};_0x49b9x23+= ((_0x49b9x22!== _0xbf53[140]|| _0x49b9x28[_0xbf53[77]])?_0xbf53[162]:_0xbf53[144])+ _0x49b9x19};_0x49b9x23+= _0x49b9x1e[_0xbf53[77]]?_0xbf53[167]+ _0x49b9x1e[_0xbf53[80]](_0xbf53[79]):_0xbf53[74];_0x49b9x23+= _0x49b9x1f[_0xbf53[77]]?_0xbf53[168]+ _0x49b9x1f[_0xbf53[80]](_0xbf53[79]):_0xbf53[74];console[_0xbf53[88]](_0xbf53[163]);console[_0xbf53[88]](_0x49b9x23);console[_0xbf53[88]](_0xbf53[165]);return _0x49b9x23})}};exports[_0xbf53[170]]= function(){return function(_0x49b9x18){if(_0x49b9x18){var _0x49b9x2d=_0xbf53[74];switch(_0x49b9x18){case _0xbf53[166]:_0x49b9x2d= _0xbf53[171];break;default:_0x49b9x2d= sequelize[_0xbf53[173]](_0x49b9x18,{type:sequelize[_0xbf53[172]][_0xbf53[141]]})};return _0x49b9x2d};return _0x49b9x18}};function getConditions(_0x49b9x2f,_0x49b9x1b){if(!_0x49b9x2f){return _0xbf53[140]};for(var _0x49b9x30=_0xbf53[174],_0x49b9x31=0;_0x49b9x31< _0x49b9x2f[_0xbf53[175]][_0xbf53[77]];_0x49b9x31++){_0x49b9x31> 0&& (_0x49b9x30+= _0xbf53[142]+ _0x49b9x2f[_0xbf53[176]]+ _0xbf53[142]);if(_0x49b9x2f[_0xbf53[175]][_0x49b9x31][_0xbf53[138]]){_0x49b9x30+= getConditions(_0x49b9x2f[_0xbf53[175]][_0x49b9x31][_0xbf53[138]],_0x49b9x1b)}else {_0x49b9x30+= _[_0xbf53[177]](_0x49b9x1b,_0x49b9x2f[_0xbf53[175]][_0x49b9x31][_0xbf53[115]])?_0xbf53[116]+ _0x49b9x2f[_0xbf53[175]][_0x49b9x31][_0xbf53[115]]+ _0xbf53[116]:_0x49b9x2f[_0xbf53[175]][_0x49b9x31][_0xbf53[115]];switch(_0x49b9x2f[_0xbf53[175]][_0x49b9x31][_0xbf53[179]]){case _0xbf53[178]:;case _0xbf53[180]:_0x49b9x30+= _0xbf53[142]+ _0x49b9x2f[_0xbf53[175]][_0x49b9x31][_0xbf53[179]];break;case _0xbf53[182]:_0x49b9x30+= _0xbf53[181];break;case _0xbf53[184]:_0x49b9x30+= _0xbf53[183];break;default:_0x49b9x30+= _0xbf53[142]+ _0x49b9x2f[_0xbf53[175]][_0x49b9x31][_0xbf53[179]]+ _0xbf53[142]+ _0x49b9x2f[_0xbf53[175]][_0x49b9x31][_0xbf53[185]]+ _0xbf53[74]}}};return _0x49b9x30+ _0xbf53[81]}
\ No newline at end of file
diff --git a/server/utils/report_extraction.js b/server/utils/report_extraction.js
index 7e1bf00..ab35809 100644
--- a/server/utils/report_extraction.js
+++ b/server/utils/report_extraction.js
@@ -1,299 +1 @@
-'use strict';
-
-var csv = require('to-csv');
-var PdfMake = require('pdfmake');
-var _ = require('lodash');
-var util = require('util');
-var ExtractedReport = require('../models').ExtractedReport;
-var License = require('../models').License;
-var Setting = require('../models').Setting;
-var sequelize = require('../models').sequelize;
-var fs = require('fs');
-var moment = require('moment');
-var Promise = require('bluebird');
-var base64 = Promise.promisify(require('file-base64').encode);
-var sr = require('simple-random');
-var path = require('path');
-var config = require('../config/environment');
-var reportBuildUtils = require('./report_build');
-var license = require('../config/license/license.service');
-
-var fonts = {
-  Roboto: {
-    normal: path.join(config.fonts, 'Roboto-Regular.ttf'),
-    bold: path.join(config.fonts, 'Roboto-Medium.ttf'),
-    italics: path.join(config.fonts, 'Roboto-Italic.ttf'),
-    bolditalics: path.join(config.fonts, 'Roboto-Italic.ttf')
-  }
-};
-
-process.on('message', function(data) {
-  if (data !== 'sticky:balance') {
-    general(data.report, data.query, data.extractedId, data.type.toLowerCase(), data.user)
-  }
-});
-
-function general(report, query, extractedId, type, user) {
-  // console.log('--general function, calling extract function...');
-  extract(report, query, extractedId, type, user);
-}
-
-function extract(report, dataQuery, extractedId, type, user) {
-  // console.log('--extract function, building query...');
-  var _license, _settings;
-  return License
-    .findById(1)
-    .then(function(myLicense) {
-      _license = myLicense;
-      return Setting
-        .findById(1);
-    })
-    .then(function(settings) {
-      _settings = settings;
-      return report.table;
-    })
-    .then(reportBuildUtils.buildFilter(user))
-    .then(function(filter) {
-      return [filter, report];
-    })
-    .spread(reportBuildUtils.buildQuery(dataQuery))
-    .then(reportBuildUtils.checkQuery())
-    .then(function(res) {
-      if (res) {
-        if (_.isArray(res)) {
-          if (res.length) {
-            _.forEach(res, function(row) {
-              _.forOwn(row, function(property, key) {
-                if (property instanceof Date) {
-                  row[key] = moment(property).format("YYYY-MM-DD HH:mm:ss").toString();
-                }
-              });
-            });
-            // console.log('--report extracted, creating output as: ' + type);
-            switch (type) {
-              case 'pdf':
-                var myLicense = _license ? JSON.parse(license.decrypt(_license.license, _license.data1)) : null;
-                var imagePath = (_settings && !_settings.defaultLoginLogo && _settings.loginLogo && myLicense && myLicense.custom) ? path.join(config.root, 'server', 'files', 'images', _settings.loginLogo) :
-                  path.join(config.root, 'server', 'files', 'images', 'default', 'logo-big-pdf.png');
-                return base64(imagePath)
-                  .then(function(base64String) {
-                    var extension = imagePath.split('.').pop();
-                    return createPdf(res, report, dataQuery, extractedId, base64String, extension);
-                  })
-              case 'csv':
-                return createCsv(res, report, dataQuery, extractedId);
-              default:
-                return createCsv(res, report, dataQuery, extractedId);
-            }
-          } else {
-            return updateExtracted(extractedId, null, 'empty');
-          }
-        } else {
-          return updateExtracted(extractedId, null, res);
-        }
-      } else {
-        // console.log('--error executing the report query');
-        return updateExtracted(extractedId, null, 'query extraction error');
-
-      }
-    })
-    .catch(function(err) {
-      console.log(err);
-      return updateExtracted(extractedId, null, 'query error');
-    });
-}
-
-function createPdf(res, report, dataQuery, id, logo, extension) {
-  switch (extension) {
-    case 'jpg':
-      extension = 'jpeg';
-      break;
-    default:
-  }
-  // console.log('--pdf function, creating pdf output...');
-  var filename = sr({
-    length: 20,
-    prefix: "report_" + report.name + '_',
-    suffix: ".pdf"
-  });
-  var tableHeader = [];
-  // width = 100 / report.Fields.length,
-  // widths = [];
-  _.forEach(report.Fields, function(elem) {
-    tableHeader.push({
-      text: String(elem.alias),
-      style: 'tableHeader'
-    });
-    // widths.push(width + '%');
-  });
-  // console.log(widths);
-  var tableBody = [tableHeader];
-  _.forEach(res, function(elem) {
-    var row = [];
-    _.forOwn(elem, function(value, key) {
-      row.push(value ? String(value) : '');
-    });
-    tableBody.push(row);
-  });
-
-  var headerColumns = [{
-    text: report.name,
-    style: 'header',
-  }];
-  if (report.description) {
-    headerColumns.push({
-      text: report.description || '',
-      color: '#828682',
-      margin: [0, 0, 0, 5]
-    });
-  }
-  if (dataQuery.startDate) {
-    headerColumns.push({
-      text: [{
-          text: 'From: ',
-          style: 'label'
-        },
-        moment(dataQuery.startDate).startOf('day').format("YYYY-MM-DD HH:mm").toString(), {
-          text: '  To: ',
-          style: 'label'
-        },
-        moment(dataQuery.endDate || dataQuery.startDate).endOf('day').format("YYYY-MM-DD HH:mm").toString()
-      ]
-    });
-  }
-  var content = [];
-  content.push({
-    style: 'tableExample',
-    table: {
-      headerRows: 1,
-      dontBreakRows: true,
-      // widths: widths,
-      // keepWithHeaderRows: 1,
-      // dontBreakRows: true,
-      body: tableBody,
-
-    }
-  });
-  var pdfContent = {
-    pageOrientation: 'landscape',
-    pageMargins: [15, 90, 15, 25],
-    header: function() {
-      return {
-        margin: [15, 15, 0, 0],
-        columns: [{
-          table: {
-            widths: [100, '*'],
-            body: [
-              [{
-                  image: 'data:image/' + extension + ';base64,' + logo,
-                  fit: [100, 60]
-                },
-                headerColumns
-              ]
-            ]
-          },
-          layout: 'noBorders'
-        }]
-      };
-    },
-    content: content,
-    footer: function(currentPage, pageCount) {
-      return {
-        columns: [{
-          text: currentPage.toString() + ' of ' + pageCount,
-          alignment: 'center'
-        }]
-      }
-    },
-    styles: {
-      header: {
-        fontSize: 18,
-        bold: true,
-        margin: [0, 0, 0, 5]
-      },
-      tableExample: {
-        margin: [0, 0, 0, 5],
-        fontSize: 8,
-      },
-      tableHeader: {
-        bold: true,
-        fontSize: 8,
-        color: 'black',
-        wordWrap: 'break-word'
-      },
-      label: {
-        bold: true,
-        color: 'black'
-      }
-    }
-  };
-  var printer = new PdfMake(fonts);
-  var pdfDoc = printer.createPdfKitDocument(pdfContent);
-  if (pdfDoc) {
-    // pdfDoc is a stream so you can pipe it to the file system
-    var writeStream = fs.createWriteStream(config.reports + filename);
-    writeStream.on('error', function() {
-      // console.log('--pdf write error');
-      return updateExtracted(id, null, 'pdf write error')
-    });
-    writeStream.on('finish', function() {
-      // console.log('--pdf write finished');
-      return updateExtracted(id, filename, 'completed')
-    });
-    pdfDoc.pipe(writeStream);
-    pdfDoc.end();
-  } else {
-    // console.log('--pdf creation error');
-    return updateExtracted(id, null, 'pdf creation error')
-  }
-}
-
-function createCsv(res, report, dataQuery, id) {
-  // console.log(res);
-  // console.log('--csv function, creating pdf output...');
-  var filename = sr({
-    length: 20,
-    prefix: "report_" + report.name + '_',
-    suffix: ".csv"
-  });
-  var csv_report = csv(res);
-  if (csv_report) {
-    fs.writeFile(config.reports + filename, csv_report, function(err) {
-      if (err) {
-        // console.log('--csv write error');
-        console.log(err);
-        return updateExtracted(id, null, 'csv write error')
-      } else {
-        // console.log('--csv write completed');
-        return updateExtracted(id, filename, 'completed')
-      }
-    });
-  } else {
-    // console.log('--csv creation error');
-    return updateExtracted(id, null, 'csv creation error')
-  }
-}
-
-function updateExtracted(id, filename, status) {
-  // console.log('--updating the extracted report db row..');
-  return ExtractedReport.update({
-      status: status,
-      savename: filename
-    }, {
-      where: {
-        id: id
-      }
-    })
-    .then(function() {
-      console.log('--Finished extracting report');
-    })
-    .catch(function(err) {
-      console.log('--Finished extracting report with error : ' + err);
-    })
-    .finally(function() {
-      process.send({
-        message: 'finished',
-        status: status
-      });
-    });
-}
+var _0x625a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x74\x6F\x2D\x63\x73\x76","\x70\x64\x66\x6D\x61\x6B\x65","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4C\x69\x63\x65\x6E\x73\x65","\x53\x65\x74\x74\x69\x6E\x67","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x73","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x65\x6E\x63\x6F\x64\x65","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x70\x61\x74\x68","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x66\x6F\x6E\x74\x73","\x52\x6F\x62\x6F\x74\x6F\x2D\x52\x65\x67\x75\x6C\x61\x72\x2E\x74\x74\x66","\x6A\x6F\x69\x6E","\x52\x6F\x62\x6F\x74\x6F\x2D\x4D\x65\x64\x69\x75\x6D\x2E\x74\x74\x66","\x52\x6F\x62\x6F\x74\x6F\x2D\x49\x74\x61\x6C\x69\x63\x2E\x74\x74\x66","\x6D\x65\x73\x73\x61\x67\x65","\x73\x74\x69\x63\x6B\x79\x3A\x62\x61\x6C\x61\x6E\x63\x65","\x72\x65\x70\x6F\x72\x74","\x71\x75\x65\x72\x79","\x65\x78\x74\x72\x61\x63\x74\x65\x64\x49\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x74\x79\x70\x65","\x75\x73\x65\x72","\x6F\x6E","\x6C\x6F\x67","\x71\x75\x65\x72\x79\x20\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x66\x6F\x72\x4F\x77\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x31","\x64\x65\x63\x72\x79\x70\x74","\x70\x61\x72\x73\x65","\x64\x65\x66\x61\x75\x6C\x74\x4C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x6C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x63\x75\x73\x74\x6F\x6D","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x69\x6D\x61\x67\x65\x73","\x64\x65\x66\x61\x75\x6C\x74","\x6C\x6F\x67\x6F\x2D\x62\x69\x67\x2D\x70\x64\x66\x2E\x70\x6E\x67","\x70\x6F\x70","\x2E","\x73\x70\x6C\x69\x74","\x74\x68\x65\x6E","\x70\x64\x66","\x63\x73\x76","\x65\x6D\x70\x74\x79","\x71\x75\x65\x72\x79\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x63\x68\x65\x63\x6B\x51\x75\x65\x72\x79","\x62\x75\x69\x6C\x64\x51\x75\x65\x72\x79","\x73\x70\x72\x65\x61\x64","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","\x74\x61\x62\x6C\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6A\x70\x65\x67","\x6A\x70\x67","\x72\x65\x70\x6F\x72\x74\x5F","\x6E\x61\x6D\x65","\x5F","\x2E\x70\x64\x66","\x61\x6C\x69\x61\x73","\x74\x61\x62\x6C\x65\x48\x65\x61\x64\x65\x72","\x70\x75\x73\x68","","\x68\x65\x61\x64\x65\x72","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x23\x38\x32\x38\x36\x38\x32","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x46\x72\x6F\x6D\x3A\x20","\x6C\x61\x62\x65\x6C","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x20\x20\x54\x6F\x3A\x20","\x65\x6E\x64\x4F\x66","\x65\x6E\x64\x44\x61\x74\x65","\x74\x61\x62\x6C\x65\x45\x78\x61\x6D\x70\x6C\x65","\x6C\x61\x6E\x64\x73\x63\x61\x70\x65","\x2A","\x64\x61\x74\x61\x3A\x69\x6D\x61\x67\x65\x2F","\x3B\x62\x61\x73\x65\x36\x34\x2C","\x6E\x6F\x42\x6F\x72\x64\x65\x72\x73","\x20\x6F\x66\x20","\x63\x65\x6E\x74\x65\x72","\x62\x6C\x61\x63\x6B","\x62\x72\x65\x61\x6B\x2D\x77\x6F\x72\x64","\x63\x72\x65\x61\x74\x65\x50\x64\x66\x4B\x69\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x72\x65\x70\x6F\x72\x74\x73","\x63\x72\x65\x61\x74\x65\x57\x72\x69\x74\x65\x53\x74\x72\x65\x61\x6D","\x65\x72\x72\x6F\x72","\x70\x64\x66\x20\x77\x72\x69\x74\x65\x20\x65\x72\x72\x6F\x72","\x66\x69\x6E\x69\x73\x68","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x70\x69\x70\x65","\x65\x6E\x64","\x70\x64\x66\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x2E\x63\x73\x76","\x63\x73\x76\x20\x77\x72\x69\x74\x65\x20\x65\x72\x72\x6F\x72","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x63\x73\x76\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x66\x69\x6E\x69\x73\x68\x65\x64","\x73\x65\x6E\x64","\x66\x69\x6E\x61\x6C\x6C\x79","\x2D\x2D\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x77\x69\x74\x68\x20\x65\x72\x72\x6F\x72\x20\x3A\x20","\x2D\x2D\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65"];_0x625a[0];var csv=require(_0x625a[1]);var PdfMake=require(_0x625a[2]);var _=require(_0x625a[3]);var util=require(_0x625a[4]);var ExtractedReport=require(_0x625a[6])[_0x625a[5]];var License=require(_0x625a[6])[_0x625a[7]];var Setting=require(_0x625a[6])[_0x625a[8]];var sequelize=require(_0x625a[6])[_0x625a[9]];var fs=require(_0x625a[10]);var moment=require(_0x625a[11]);var Promise=require(_0x625a[12]);var base64=Promise[_0x625a[15]](require(_0x625a[14])[_0x625a[13]]);var sr=require(_0x625a[16]);var path=require(_0x625a[17]);var config=require(_0x625a[18]);var reportBuildUtils=require(_0x625a[19]);var license=require(_0x625a[20]);var fonts={Roboto:{normal:path[_0x625a[23]](config[_0x625a[21]],_0x625a[22]),bold:path[_0x625a[23]](config[_0x625a[21]],_0x625a[24]),italics:path[_0x625a[23]](config[_0x625a[21]],_0x625a[25]),bolditalics:path[_0x625a[23]](config[_0x625a[21]],_0x625a[25])}};process[_0x625a[34]](_0x625a[26],function(_0x7b31x13){if(_0x7b31x13!== _0x625a[27]){general(_0x7b31x13[_0x625a[28]],_0x7b31x13[_0x625a[29]],_0x7b31x13[_0x625a[30]],_0x7b31x13[_0x625a[32]][_0x625a[31]](),_0x7b31x13[_0x625a[33]])}});function general(_0x7b31x15,_0x7b31x16,_0x7b31x17,_0x7b31x18,_0x7b31x19){extract(_0x7b31x15,_0x7b31x16,_0x7b31x17,_0x7b31x18,_0x7b31x19)}function extract(_0x7b31x15,_0x7b31x1b,_0x7b31x17,_0x7b31x18,_0x7b31x19){var _0x7b31x1c,_0x7b31x1d;return License[_0x625a[70]](1)[_0x625a[60]](function(_0x7b31x23){_0x7b31x1c= _0x7b31x23;return Setting[_0x625a[70]](1)})[_0x625a[60]](function(_0x7b31x28){_0x7b31x1d= _0x7b31x28;return _0x7b31x15[_0x625a[69]]})[_0x625a[60]](reportBuildUtils[_0x625a[68]](_0x7b31x19))[_0x625a[60]](function(_0x7b31x27){return [_0x7b31x27,_0x7b31x15]})[_0x625a[67]](reportBuildUtils[_0x625a[66]](_0x7b31x1b))[_0x625a[60]](reportBuildUtils[_0x625a[65]]())[_0x625a[60]](function(_0x7b31x1f){if(_0x7b31x1f){if(_[_0x625a[38]](_0x7b31x1f)){if(_0x7b31x1f[_0x625a[39]]){_[_0x625a[43]](_0x7b31x1f,function(_0x7b31x20){_[_0x625a[42]](_0x7b31x20,function(_0x7b31x21,_0x7b31x22){if(_0x7b31x21 instanceof  Date){_0x7b31x20[_0x7b31x22]= moment(_0x7b31x21)[_0x625a[41]](_0x625a[40]).toString()}})});switch(_0x7b31x18){case _0x625a[61]:var _0x7b31x23=_0x7b31x1c?JSON[_0x625a[47]](license[_0x625a[46]](_0x7b31x1c[_0x625a[44]],_0x7b31x1c[_0x625a[45]])):null;var _0x7b31x24=(_0x7b31x1d&& !_0x7b31x1d[_0x625a[48]]&& _0x7b31x1d[_0x625a[49]]&& _0x7b31x23&& _0x7b31x23[_0x625a[50]])?path[_0x625a[23]](config[_0x625a[51]],_0x625a[52],_0x625a[53],_0x625a[54],_0x7b31x1d[_0x625a[49]]):path[_0x625a[23]](config[_0x625a[51]],_0x625a[52],_0x625a[53],_0x625a[54],_0x625a[55],_0x625a[56]);return base64(_0x7b31x24)[_0x625a[60]](function(_0x7b31x25){var _0x7b31x26=_0x7b31x24[_0x625a[59]](_0x625a[58])[_0x625a[57]]();return createPdf(_0x7b31x1f,_0x7b31x15,_0x7b31x1b,_0x7b31x17,_0x7b31x25,_0x7b31x26)});case _0x625a[62]:return createCsv(_0x7b31x1f,_0x7b31x15,_0x7b31x1b,_0x7b31x17);default:return createCsv(_0x7b31x1f,_0x7b31x15,_0x7b31x1b,_0x7b31x17)}}else {return updateExtracted(_0x7b31x17,null,_0x625a[63])}}else {return updateExtracted(_0x7b31x17,null,_0x7b31x1f)}}else {return updateExtracted(_0x7b31x17,null,_0x625a[64])}})[_0x625a[37]](function(_0x7b31x1e){console[_0x625a[35]](_0x7b31x1e);return updateExtracted(_0x7b31x17,null,_0x625a[36])})}function createPdf(_0x7b31x1f,_0x7b31x15,_0x7b31x1b,_0x7b31x2a,_0x7b31x2b,_0x7b31x26){switch(_0x7b31x26){case _0x625a[72]:_0x7b31x26= _0x625a[71];break;default:};var _0x7b31x2c=sr({length:20,prefix:_0x625a[73]+ _0x7b31x15[_0x625a[74]]+ _0x625a[75],suffix:_0x625a[76]});var _0x7b31x2d=[];_[_0x625a[43]](_0x7b31x15.Fields,function(_0x7b31x2e){_0x7b31x2d[_0x625a[79]]({text:String(_0x7b31x2e[_0x625a[77]]),style:_0x625a[78]})});var _0x7b31x2f=[_0x7b31x2d];_[_0x625a[43]](_0x7b31x1f,function(_0x7b31x2e){var _0x7b31x20=[];_[_0x625a[42]](_0x7b31x2e,function(_0x7b31x30,_0x7b31x22){_0x7b31x20[_0x625a[79]](_0x7b31x30?String(_0x7b31x30):_0x625a[80])});_0x7b31x2f[_0x625a[79]](_0x7b31x20)});var _0x7b31x31=[{text:_0x7b31x15[_0x625a[74]],style:_0x625a[81]}];if(_0x7b31x15[_0x625a[82]]){_0x7b31x31[_0x625a[79]]({text:_0x7b31x15[_0x625a[82]]|| _0x625a[80],color:_0x625a[83],margin:[0,0,0,5]})};if(_0x7b31x1b[_0x625a[84]]){_0x7b31x31[_0x625a[79]]({text:[{text:_0x625a[85],style:_0x625a[86]},moment(_0x7b31x1b[_0x625a[84]])[_0x625a[89]](_0x625a[88])[_0x625a[41]](_0x625a[87]).toString(),{text:_0x625a[90],style:_0x625a[86]},moment(_0x7b31x1b[_0x625a[92]]|| _0x7b31x1b[_0x625a[84]])[_0x625a[91]](_0x625a[88])[_0x625a[41]](_0x625a[87]).toString()]})};var _0x7b31x32=[];_0x7b31x32[_0x625a[79]]({style:_0x625a[93],table:{headerRows:1,dontBreakRows:true,body:_0x7b31x2f}});var _0x7b31x33={pageOrientation:_0x625a[94],pageMargins:[15,90,15,25],header:function(){return {margin:[15,15,0,0],columns:[{table:{widths:[100,_0x625a[95]],body:[[{image:_0x625a[96]+ _0x7b31x26+ _0x625a[97]+ _0x7b31x2b,fit:[100,60]},_0x7b31x31]]},layout:_0x625a[98]}]}},content:_0x7b31x32,footer:function(_0x7b31x34,_0x7b31x35){return {columns:[{text:_0x7b31x34.toString()+ _0x625a[99]+ _0x7b31x35,alignment:_0x625a[100]}]}},styles:{header:{fontSize:18,bold:true,margin:[0,0,0,5]},tableExample:{margin:[0,0,0,5],fontSize:8},tableHeader:{bold:true,fontSize:8,color:_0x625a[101],wordWrap:_0x625a[102]},label:{bold:true,color:_0x625a[101]}}};var _0x7b31x36= new PdfMake(fonts);var _0x7b31x37=_0x7b31x36[_0x625a[103]](_0x7b31x33);if(_0x7b31x37){var _0x7b31x38=fs[_0x625a[105]](config[_0x625a[104]]+ _0x7b31x2c);_0x7b31x38[_0x625a[34]](_0x625a[106],function(){return updateExtracted(_0x7b31x2a,null,_0x625a[107])});_0x7b31x38[_0x625a[34]](_0x625a[108],function(){return updateExtracted(_0x7b31x2a,_0x7b31x2c,_0x625a[109])});_0x7b31x37[_0x625a[110]](_0x7b31x38);_0x7b31x37[_0x625a[111]]()}else {return updateExtracted(_0x7b31x2a,null,_0x625a[112])}}function createCsv(_0x7b31x1f,_0x7b31x15,_0x7b31x1b,_0x7b31x2a){var _0x7b31x2c=sr({length:20,prefix:_0x625a[73]+ _0x7b31x15[_0x625a[74]]+ _0x625a[75],suffix:_0x625a[113]});var _0x7b31x3a=csv(_0x7b31x1f);if(_0x7b31x3a){fs[_0x625a[115]](config[_0x625a[104]]+ _0x7b31x2c,_0x7b31x3a,function(_0x7b31x1e){if(_0x7b31x1e){console[_0x625a[35]](_0x7b31x1e);return updateExtracted(_0x7b31x2a,null,_0x625a[114])}else {return updateExtracted(_0x7b31x2a,_0x7b31x2c,_0x625a[109])}})}else {return updateExtracted(_0x7b31x2a,null,_0x625a[116])}}function updateExtracted(_0x7b31x2a,_0x7b31x2c,_0x7b31x3c){return ExtractedReport[_0x625a[122]]({status:_0x7b31x3c,savename:_0x7b31x2c},{where:{id:_0x7b31x2a}})[_0x625a[60]](function(){console[_0x625a[35]](_0x625a[121])})[_0x625a[37]](function(_0x7b31x1e){console[_0x625a[35]](_0x625a[120]+ _0x7b31x1e)})[_0x625a[119]](function(){process[_0x625a[118]]({message:_0x625a[117],status:_0x7b31x3c})})}
\ No newline at end of file
diff --git a/server/utils/voice_extension.js b/server/utils/voice_extension.js
index 6617972..6a22dd8 100644
--- a/server/utils/voice_extension.js
+++ b/server/utils/voice_extension.js
@@ -1,321 +1 @@
-'use strict';
-
-var _ = require('lodash');
-var util = require('util');
-var Interval = require('../models').Interval;
-var sequelize = require('../models').sequelize;
-var VoiceExtension = require('../models').VoiceExtension;
-
-exports.createApps = createApplications;
-
-exports.routeUpdate = function(req, t) {
-  var sequelize = require('../models').sequelize;
-  var VoiceExtension = require('../models').VoiceExtension;
-  if (req.body.id) {
-    delete req.body.id;
-  }
-  return VoiceExtension
-    .update(req.body, {
-      where: {
-        id: req.params.id
-      },
-      transaction: t
-    })
-    .then(function(route) {
-      if (req.body.Applications) {
-        req.body.id = req.params.id;
-        return VoiceExtension
-          .destroy({
-            where: {
-              VoiceExtensionId: req.params.id
-            },
-            transaction: t
-          });
-      }
-    })
-    .then(function() {
-      if (req.body.Applications && Array.isArray(req.body.Applications) && req.body.Applications.length) {
-        return req.body;
-      }
-    })
-    .then(createApplications(req.body.Applications, t));
-}
-
-
-function createApplications(applications, t) {
-  var Interval = require('../models').Interval;
-  var VoiceExtension = require('../models').VoiceExtension;
-  return function(route) {
-    if (route) {
-      return Interval
-        .findAll() //find all existing intervals
-        .then(function(intervals) {
-          var priority = 2;
-          var routeDefault = {
-            exten: route.exten,
-            type: route.type,
-            context: route.context,
-            VoiceExtensionId: route.id
-          };
-          var bulkApps = [];
-          var applicationLength = 8; //update in case of adding other rows in the extension
-          var firstRows = [],
-            lastRows = [];
-          firstRows.push(_.merge({
-              app: 'Set',
-              appdata: util.format('CDR(type)=%s', route.type),
-              priority: priority
-            },
-            routeDefault));
-          priority++;
-          if (route.type === 'outbound') {
-            firstRows.push(_.merge({
-                app: 'Set',
-                appdata: util.format('CDR(tag)=%s', route.tag || '--'),
-                priority: priority
-              },
-              routeDefault));
-            priority++;
-          }
-          var hasAgi = _.find(applications, function(application) {
-            return application.app.toLowerCase() === 'agi';
-          });
-          if (hasAgi) {
-            firstRows.push(_.merge({
-                app: 'Set',
-                appdata: 'VOLUME(RX)=0',
-                priority: priority
-              },
-              routeDefault));
-            priority++;
-          }
-          bulkApps.push(VoiceExtension.bulkCreate(firstRows, {
-            transaction: t
-          }));
-          applications.forEach(function(application) {
-            var appIntervals = [];
-            var extension = [];
-            if (application.IntervalId) { //if the interval for the app is chosen by a list we search for the subintervals
-              var foundIntervals = _.filter(intervals, {
-                IntervalId: application.IntervalId
-              });
-              appIntervals = foundIntervals.length ? _.map(foundIntervals, 'interval') : ['*,*,*,*']; //if the interval list has no subintervals the interval is always
-              var parentInterval = _.find(intervals, {
-                id: application.IntervalId
-              });
-              application.interval = parentInterval ? parentInterval.name : '*,*,*,*';
-            } else { //otherwise i will have the interval directly from the app, i still use an array to keep the creation logic the same
-              appIntervals = [application.interval];
-            }
-            extension.push(_.merge({
-                app: 'NoOP',
-                appdata: application.app + ' Application Start',
-                priority: priority
-              },
-              routeDefault));
-            priority++;
-            var intLength = appIntervals.length;
-            appIntervals.forEach(function(elem, index) {
-              extension.push(_.merge({
-                  app: 'GotoIfTime',
-                  appdata: util.format('%s?%s,${EXTEN},%s:%s,${EXTEN},%s', elem, route.context, priority + (intLength - index), route.context, ((index + 1) < intLength) ? priority +
-                    1 : priority +
-                    applicationLength),
-                  priority: priority
-                },
-                routeDefault));
-              priority++;
-            });
-            if (application.app.toLowerCase() === 'dial' && route.type === 'outbound' && application.appdata[1]) {
-              extension.push(_.merge({
-                  app: 'Set',
-                  appdata: util.format('CALLERID(all)=%s', application.appdata[1]),
-                  priority: priority
-                },
-                routeDefault));
-            } else {
-              extension.push(_.merge({
-                  app: 'NoOP',
-                  appdata: 'Skipped CallerID Set',
-                  priority: priority
-                },
-                routeDefault));
-            }
-            priority++;
-            if (application.app.toLowerCase() === 'dial' && route.record && route.type === 'outbound') {
-              extension.push(_.merge({
-                  app: 'MixMonitor',
-                  appdata: '${UNIQUEID}.' + (route.recordingFormat || 'wav') + ',ab',
-                  priority: priority
-                },
-                routeDefault));
-            } else {
-              extension.push(_.merge({
-                  app: 'NoOP',
-                  appdata: 'Skipped MixMonitor',
-                  priority: priority
-                },
-                routeDefault));
-            }
-            priority++;
-            if (application.app.toLowerCase() === 'queue' && application.appType !== 'custom' && !application.answer) {
-              extension.push(_.merge({
-                  app: 'Progress',
-                  appdata: '',
-                  priority: priority
-                },
-                routeDefault));
-            } else {
-              extension.push(_.merge({
-                  app: 'NoOP',
-                  appdata: 'Skipped Progress',
-                  priority: priority
-                },
-                routeDefault));
-            }
-            priority++;
-            if ((application.app.toLowerCase() === 'queue' || application.app.toLowerCase() === 'playback') && application.appType !== 'custom' && application.answer) {
-              extension.push(_.merge({
-                  app: 'Answer',
-                  appdata: '',
-                  priority: priority
-                },
-                routeDefault));
-            } else {
-              extension.push(_.merge({
-                  app: 'NoOP',
-                  appdata: 'Skipped Answer',
-                  priority: priority
-                },
-                routeDefault));
-            }
-            priority++;
-            if (application.app.toLowerCase() === 'dial' && route.type === 'outbound') {
-              extension.push(_.merge({
-                  app: 'Set',
-                  appdata: util.format('outboundrouteid=%d', route.id || ''),
-                  priority: priority
-                },
-                routeDefault));
-            } else {
-              extension.push(_.merge({
-                  app: 'NoOP',
-                  appdata: 'Skipped Outound Route Id Set',
-                  priority: priority
-                },
-                routeDefault));
-            }
-            priority++;
-            if (application.app.toLowerCase() === 'dial' && application.appType === 'outboundDial') {
-              application.appdata[4] = application.appdata[4] || '';
-              application.appdata[4] += (_.includes(application.appdata[4], 'x') ? '' : 'x') + (_.includes(application.appdata[4], 'X') ? '' : 'X');
-              extension.push(_.merge({
-                  app: application.app,
-                  appdata: util.format('SIP/%s/%s${EXTEN:%s},%s,%s,%s', application.appdata[0], application.appdata[2] || '', route.cutdigits || 0, application.appdata[3] || '',
-                    application.appdata[4] || '', application.appdata[5] || ''),
-                  priority: priority,
-                  IntervalId: application.IntervalId || null,
-                  interval: application.interval || '*,*,*,*',
-                  isApp: true,
-                  callerID: application.appdata[1] || null,
-                  appType: application.appType
-                },
-                routeDefault));
-            } else if (application.app.toLowerCase() === 'dial' && application.appType === 'externalDial') {
-              application.appdata[3] = application.appdata[3] || '';
-              application.appdata[3] += (_.includes(application.appdata[3], 'x') ? '' : 'x') + (_.includes(application.appdata[3], 'X') ? '' : 'X');
-              extension.push(_.merge({
-                  app: application.app,
-                  appdata: util.format('SIP/%s/%s,%s,%s,%s', application.appdata[0], application.appdata[1], application.appdata[2] || '', application.appdata[3] || '', application.appdata[
-                    4] || ''),
-                  priority: priority,
-                  IntervalId: application.IntervalId || null,
-                  interval: application.interval || '*,*,*,*',
-                  isApp: true,
-                  appType: application.appType
-                },
-                routeDefault));
-            } else if (application.app.toLowerCase() === 'dial' && application.appType === 'internalDial') {
-              application.appdata[2] = application.appdata[2] || '';
-              application.appdata[2] += (_.includes(application.appdata[2], 'x') ? '' : 'x') + (_.includes(application.appdata[2], 'X') ? '' : 'X');
-              extension.push(_.merge({
-                  app: application.app,
-                  appdata: util.format('SIP/%s,%s,%s,%s', application.appdata[0], application.appdata[1] || '', application.appdata[2] || '', application.appdata[3] || ''),
-                  priority: priority,
-                  IntervalId: application.IntervalId || null,
-                  interval: application.interval || '*,*,*,*',
-                  isApp: true,
-                  appType: application.appType
-                },
-                routeDefault));
-            } else {
-              if ((application.app.toLowerCase() === 'dial' || application.app.toLowerCase() === 'queue') && application.appType !== 'custom') {
-                var appdataIndex = application.app.toLowerCase() === 'dial' ? 2 : 1;
-                application.appdata[appdataIndex] = application.appdata[appdataIndex] || '';
-                application.appdata[appdataIndex] += (_.includes(application.appdata[appdataIndex], 'x') ? '' : 'x') + (_.includes(application.appdata[appdataIndex], 'X') ? '' : 'X');
-              }
-              extension.push(_.merge({
-                  app: application.app,
-                  appdata: application.appdata.join(','),
-                  priority: priority,
-                  IntervalId: application.IntervalId,
-                  interval: application.interval || '*,*,*,*',
-                  isApp: true,
-                  appType: application.appType || null,
-                  answer: application.answer || false
-                },
-                routeDefault));
-            }
-            priority++;
-            if (application.app.toLowerCase() === 'dial' && route.record && route.type === 'outbound') {
-              extension.push(_.merge({
-                  app: 'StopMixMonitor',
-                  appdata: '',
-                  priority: priority
-                },
-                routeDefault));
-            } else {
-              extension.push(_.merge({
-                  app: 'NoOP',
-                  appdata: 'Skipped StopMixMonitor',
-                  priority: priority
-                },
-                routeDefault));
-            }
-            priority++;
-            extension.push(_.merge({
-                app: 'NoOP',
-                appdata: application.app + ' Application End',
-                priority: priority
-              },
-              routeDefault));
-            priority++;
-            bulkApps.push(VoiceExtension.bulkCreate(extension, {
-              transaction: t
-            }));
-          });
-          lastRows.push(_.merge({
-              app: 'NoOP',
-              appdata: route.type + ' call end',
-              priority: priority
-            },
-            routeDefault));
-          priority++;
-          if (route.type === 'internal' || route.type === 'outbound') {
-            lastRows.push(_.merge({
-                app: 'Hangup',
-                appdata: '',
-                priority: priority
-              },
-              routeDefault));
-            priority++;
-          }
-          bulkApps.push(VoiceExtension.bulkCreate(lastRows, {
-            transaction: t
-          }));
-          return bulkApps;
-        })
-        .all();
-    }
-  }
-}
+var _0xb609=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x73","\x72\x6F\x75\x74\x65\x55\x70\x64\x61\x74\x65","\x69\x64","\x62\x6F\x64\x79","\x74\x68\x65\x6E","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x70\x61\x72\x61\x6D\x73","\x64\x65\x73\x74\x72\x6F\x79","\x75\x70\x64\x61\x74\x65","\x61\x6C\x6C","\x65\x78\x74\x65\x6E","\x74\x79\x70\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x70\x75\x73\x68","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x43\x44\x52\x28\x74\x61\x67\x29\x3D\x25\x73","\x74\x61\x67","\x2D\x2D","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x70\x70","\x61\x67\x69","\x66\x69\x6E\x64","\x56\x4F\x4C\x55\x4D\x45\x28\x52\x58\x29\x3D\x30","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x66\x69\x6C\x74\x65\x72","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x6D\x61\x70","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x6E\x61\x6D\x65","\x4E\x6F\x4F\x50","\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x53\x74\x61\x72\x74","\x47\x6F\x74\x6F\x49\x66\x54\x69\x6D\x65","\x25\x73\x3F\x25\x73\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x25\x73\x3A\x25\x73\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x25\x73","\x66\x6F\x72\x45\x61\x63\x68","\x64\x69\x61\x6C","\x61\x70\x70\x64\x61\x74\x61","\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x61\x6C\x6C\x29\x3D\x25\x73","\x53\x6B\x69\x70\x70\x65\x64\x20\x43\x61\x6C\x6C\x65\x72\x49\x44\x20\x53\x65\x74","\x72\x65\x63\x6F\x72\x64","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D\x2E","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x77\x61\x76","\x2C\x61\x62","\x53\x6B\x69\x70\x70\x65\x64\x20\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x71\x75\x65\x75\x65","\x61\x70\x70\x54\x79\x70\x65","\x63\x75\x73\x74\x6F\x6D","\x61\x6E\x73\x77\x65\x72","\x50\x72\x6F\x67\x72\x65\x73\x73","","\x53\x6B\x69\x70\x70\x65\x64\x20\x50\x72\x6F\x67\x72\x65\x73\x73","\x70\x6C\x61\x79\x62\x61\x63\x6B","\x41\x6E\x73\x77\x65\x72","\x53\x6B\x69\x70\x70\x65\x64\x20\x41\x6E\x73\x77\x65\x72","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x72\x6F\x75\x74\x65\x69\x64\x3D\x25\x64","\x53\x6B\x69\x70\x70\x65\x64\x20\x4F\x75\x74\x6F\x75\x6E\x64\x20\x52\x6F\x75\x74\x65\x20\x49\x64\x20\x53\x65\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x69\x61\x6C","\x78","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x58","\x53\x49\x50\x2F\x25\x73\x2F\x25\x73\x24\x7B\x45\x58\x54\x45\x4E\x3A\x25\x73\x7D\x2C\x25\x73\x2C\x25\x73\x2C\x25\x73","\x63\x75\x74\x64\x69\x67\x69\x74\x73","\x65\x78\x74\x65\x72\x6E\x61\x6C\x44\x69\x61\x6C","\x53\x49\x50\x2F\x25\x73\x2F\x25\x73\x2C\x25\x73\x2C\x25\x73\x2C\x25\x73","\x69\x6E\x74\x65\x72\x6E\x61\x6C\x44\x69\x61\x6C","\x53\x49\x50\x2F\x25\x73\x2C\x25\x73\x2C\x25\x73\x2C\x25\x73","\x2C","\x6A\x6F\x69\x6E","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x53\x6B\x69\x70\x70\x65\x64\x20\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x45\x6E\x64","\x20\x63\x61\x6C\x6C\x20\x65\x6E\x64","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x48\x61\x6E\x67\x75\x70","\x66\x69\x6E\x64\x41\x6C\x6C"];_0xb609[0];var _=require(_0xb609[1]);var util=require(_0xb609[2]);var Interval=require(_0xb609[4])[_0xb609[3]];var sequelize=require(_0xb609[4])[_0xb609[5]];var VoiceExtension=require(_0xb609[4])[_0xb609[6]];exports[_0xb609[7]]= createApplications;exports[_0xb609[8]]= function(_0xafe2x6,_0xafe2x7){var sequelize=require(_0xb609[4])[_0xb609[5]];var VoiceExtension=require(_0xb609[4])[_0xb609[6]];if(_0xafe2x6[_0xb609[10]][_0xb609[9]]){delete _0xafe2x6[_0xb609[10]][_0xb609[9]]};return VoiceExtension[_0xb609[17]](_0xafe2x6[_0xb609[10]],{where:{id:_0xafe2x6[_0xb609[15]][_0xb609[9]]},transaction:_0xafe2x7})[_0xb609[11]](function(_0xafe2x8){if(_0xafe2x6[_0xb609[10]][_0xb609[12]]){_0xafe2x6[_0xb609[10]][_0xb609[9]]= _0xafe2x6[_0xb609[15]][_0xb609[9]];return VoiceExtension[_0xb609[16]]({where:{VoiceExtensionId:_0xafe2x6[_0xb609[15]][_0xb609[9]]},transaction:_0xafe2x7})}})[_0xb609[11]](function(){if(_0xafe2x6[_0xb609[10]][_0xb609[12]]&& Array[_0xb609[13]](_0xafe2x6[_0xb609[10]].Applications)&& _0xafe2x6[_0xb609[10]][_0xb609[12]][_0xb609[14]]){return _0xafe2x6[_0xb609[10]]}})[_0xb609[11]](createApplications(_0xafe2x6[_0xb609[10]].Applications,_0xafe2x7))};function createApplications(_0xafe2xa,_0xafe2x7){var Interval=require(_0xb609[4])[_0xb609[3]];var VoiceExtension=require(_0xb609[4])[_0xb609[6]];return function(_0xafe2x8){if(_0xafe2x8){return Interval[_0xb609[89]]()[_0xb609[11]](function(_0xafe2xb){var _0xafe2xc=2;var _0xafe2xd={exten:_0xafe2x8[_0xb609[19]],type:_0xafe2x8[_0xb609[20]],context:_0xafe2x8[_0xb609[21]],VoiceExtensionId:_0xafe2x8[_0xb609[9]]};var _0xafe2xe=[];var _0xafe2xf=8;var _0xafe2x10=[],_0xafe2x11=[];_0xafe2x10[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[22],appdata:util[_0xb609[24]](_0xb609[23],_0xafe2x8[_0xb609[20]]),priority:_0xafe2xc},_0xafe2xd));_0xafe2xc++;if(_0xafe2x8[_0xb609[20]]=== _0xb609[27]){_0xafe2x10[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[22],appdata:util[_0xb609[24]](_0xb609[28],_0xafe2x8[_0xb609[29]]|| _0xb609[30]),priority:_0xafe2xc},_0xafe2xd));_0xafe2xc++};var _0xafe2x12=_[_0xb609[34]](_0xafe2xa,function(_0xafe2x13){return _0xafe2x13[_0xb609[32]][_0xb609[31]]()=== _0xb609[33]});if(_0xafe2x12){_0xafe2x10[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[22],appdata:_0xb609[35],priority:_0xafe2xc},_0xafe2xd));_0xafe2xc++};_0xafe2xe[_0xb609[26]](VoiceExtension[_0xb609[36]](_0xafe2x10,{transaction:_0xafe2x7}));_0xafe2xa[_0xb609[47]](function(_0xafe2x13){var _0xafe2x14=[];var _0xafe2x15=[];if(_0xafe2x13[_0xb609[37]]){var _0xafe2x16=_[_0xb609[38]](_0xafe2xb,{IntervalId:_0xafe2x13[_0xb609[37]]});_0xafe2x14= _0xafe2x16[_0xb609[14]]?_[_0xb609[40]](_0xafe2x16,_0xb609[39]):[_0xb609[41]];var _0xafe2x17=_[_0xb609[34]](_0xafe2xb,{id:_0xafe2x13[_0xb609[37]]});_0xafe2x13[_0xb609[39]]= _0xafe2x17?_0xafe2x17[_0xb609[42]]:_0xb609[41]}else {_0xafe2x14= [_0xafe2x13[_0xb609[39]]]};_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[43],appdata:_0xafe2x13[_0xb609[32]]+ _0xb609[44],priority:_0xafe2xc},_0xafe2xd));_0xafe2xc++;var _0xafe2x18=_0xafe2x14[_0xb609[14]];_0xafe2x14[_0xb609[47]](function(_0xafe2x19,_0xafe2x1a){_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[45],appdata:util[_0xb609[24]](_0xb609[46],_0xafe2x19,_0xafe2x8[_0xb609[21]],_0xafe2xc+ (_0xafe2x18- _0xafe2x1a),_0xafe2x8[_0xb609[21]],((_0xafe2x1a+ 1)< _0xafe2x18)?_0xafe2xc+ 1:_0xafe2xc+ _0xafe2xf),priority:_0xafe2xc},_0xafe2xd));_0xafe2xc++});if(_0xafe2x13[_0xb609[32]][_0xb609[31]]()=== _0xb609[48]&& _0xafe2x8[_0xb609[20]]=== _0xb609[27]&& _0xafe2x13[_0xb609[49]][1]){_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[22],appdata:util[_0xb609[24]](_0xb609[50],_0xafe2x13[_0xb609[49]][1]),priority:_0xafe2xc},_0xafe2xd))}else {_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[43],appdata:_0xb609[51],priority:_0xafe2xc},_0xafe2xd))};_0xafe2xc++;if(_0xafe2x13[_0xb609[32]][_0xb609[31]]()=== _0xb609[48]&& _0xafe2x8[_0xb609[52]]&& _0xafe2x8[_0xb609[20]]=== _0xb609[27]){_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[53],appdata:_0xb609[54]+ (_0xafe2x8[_0xb609[55]]|| _0xb609[56])+ _0xb609[57],priority:_0xafe2xc},_0xafe2xd))}else {_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[43],appdata:_0xb609[58],priority:_0xafe2xc},_0xafe2xd))};_0xafe2xc++;if(_0xafe2x13[_0xb609[32]][_0xb609[31]]()=== _0xb609[59]&& _0xafe2x13[_0xb609[60]]!== _0xb609[61]&& !_0xafe2x13[_0xb609[62]]){_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[63],appdata:_0xb609[64],priority:_0xafe2xc},_0xafe2xd))}else {_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[43],appdata:_0xb609[65],priority:_0xafe2xc},_0xafe2xd))};_0xafe2xc++;if((_0xafe2x13[_0xb609[32]][_0xb609[31]]()=== _0xb609[59]|| _0xafe2x13[_0xb609[32]][_0xb609[31]]()=== _0xb609[66])&& _0xafe2x13[_0xb609[60]]!== _0xb609[61]&& _0xafe2x13[_0xb609[62]]){_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[67],appdata:_0xb609[64],priority:_0xafe2xc},_0xafe2xd))}else {_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[43],appdata:_0xb609[68],priority:_0xafe2xc},_0xafe2xd))};_0xafe2xc++;if(_0xafe2x13[_0xb609[32]][_0xb609[31]]()=== _0xb609[48]&& _0xafe2x8[_0xb609[20]]=== _0xb609[27]){_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[22],appdata:util[_0xb609[24]](_0xb609[69],_0xafe2x8[_0xb609[9]]|| _0xb609[64]),priority:_0xafe2xc},_0xafe2xd))}else {_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[43],appdata:_0xb609[70],priority:_0xafe2xc},_0xafe2xd))};_0xafe2xc++;if(_0xafe2x13[_0xb609[32]][_0xb609[31]]()=== _0xb609[48]&& _0xafe2x13[_0xb609[60]]=== _0xb609[71]){_0xafe2x13[_0xb609[49]][4]= _0xafe2x13[_0xb609[49]][4]|| _0xb609[64];_0xafe2x13[_0xb609[49]][4]+= (_[_0xb609[73]](_0xafe2x13[_0xb609[49]][4],_0xb609[72])?_0xb609[64]:_0xb609[72])+ (_[_0xb609[73]](_0xafe2x13[_0xb609[49]][4],_0xb609[74])?_0xb609[64]:_0xb609[74]);_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xafe2x13[_0xb609[32]],appdata:util[_0xb609[24]](_0xb609[75],_0xafe2x13[_0xb609[49]][0],_0xafe2x13[_0xb609[49]][2]|| _0xb609[64],_0xafe2x8[_0xb609[76]]|| 0,_0xafe2x13[_0xb609[49]][3]|| _0xb609[64],_0xafe2x13[_0xb609[49]][4]|| _0xb609[64],_0xafe2x13[_0xb609[49]][5]|| _0xb609[64]),priority:_0xafe2xc,IntervalId:_0xafe2x13[_0xb609[37]]|| null,interval:_0xafe2x13[_0xb609[39]]|| _0xb609[41],isApp:true,callerID:_0xafe2x13[_0xb609[49]][1]|| null,appType:_0xafe2x13[_0xb609[60]]},_0xafe2xd))}else {if(_0xafe2x13[_0xb609[32]][_0xb609[31]]()=== _0xb609[48]&& _0xafe2x13[_0xb609[60]]=== _0xb609[77]){_0xafe2x13[_0xb609[49]][3]= _0xafe2x13[_0xb609[49]][3]|| _0xb609[64];_0xafe2x13[_0xb609[49]][3]+= (_[_0xb609[73]](_0xafe2x13[_0xb609[49]][3],_0xb609[72])?_0xb609[64]:_0xb609[72])+ (_[_0xb609[73]](_0xafe2x13[_0xb609[49]][3],_0xb609[74])?_0xb609[64]:_0xb609[74]);_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xafe2x13[_0xb609[32]],appdata:util[_0xb609[24]](_0xb609[78],_0xafe2x13[_0xb609[49]][0],_0xafe2x13[_0xb609[49]][1],_0xafe2x13[_0xb609[49]][2]|| _0xb609[64],_0xafe2x13[_0xb609[49]][3]|| _0xb609[64],_0xafe2x13[_0xb609[49]][4]|| _0xb609[64]),priority:_0xafe2xc,IntervalId:_0xafe2x13[_0xb609[37]]|| null,interval:_0xafe2x13[_0xb609[39]]|| _0xb609[41],isApp:true,appType:_0xafe2x13[_0xb609[60]]},_0xafe2xd))}else {if(_0xafe2x13[_0xb609[32]][_0xb609[31]]()=== _0xb609[48]&& _0xafe2x13[_0xb609[60]]=== _0xb609[79]){_0xafe2x13[_0xb609[49]][2]= _0xafe2x13[_0xb609[49]][2]|| _0xb609[64];_0xafe2x13[_0xb609[49]][2]+= (_[_0xb609[73]](_0xafe2x13[_0xb609[49]][2],_0xb609[72])?_0xb609[64]:_0xb609[72])+ (_[_0xb609[73]](_0xafe2x13[_0xb609[49]][2],_0xb609[74])?_0xb609[64]:_0xb609[74]);_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xafe2x13[_0xb609[32]],appdata:util[_0xb609[24]](_0xb609[80],_0xafe2x13[_0xb609[49]][0],_0xafe2x13[_0xb609[49]][1]|| _0xb609[64],_0xafe2x13[_0xb609[49]][2]|| _0xb609[64],_0xafe2x13[_0xb609[49]][3]|| _0xb609[64]),priority:_0xafe2xc,IntervalId:_0xafe2x13[_0xb609[37]]|| null,interval:_0xafe2x13[_0xb609[39]]|| _0xb609[41],isApp:true,appType:_0xafe2x13[_0xb609[60]]},_0xafe2xd))}else {if((_0xafe2x13[_0xb609[32]][_0xb609[31]]()=== _0xb609[48]|| _0xafe2x13[_0xb609[32]][_0xb609[31]]()=== _0xb609[59])&& _0xafe2x13[_0xb609[60]]!== _0xb609[61]){var _0xafe2x1b=_0xafe2x13[_0xb609[32]][_0xb609[31]]()=== _0xb609[48]?2:1;_0xafe2x13[_0xb609[49]][_0xafe2x1b]= _0xafe2x13[_0xb609[49]][_0xafe2x1b]|| _0xb609[64];_0xafe2x13[_0xb609[49]][_0xafe2x1b]+= (_[_0xb609[73]](_0xafe2x13[_0xb609[49]][_0xafe2x1b],_0xb609[72])?_0xb609[64]:_0xb609[72])+ (_[_0xb609[73]](_0xafe2x13[_0xb609[49]][_0xafe2x1b],_0xb609[74])?_0xb609[64]:_0xb609[74])};_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xafe2x13[_0xb609[32]],appdata:_0xafe2x13[_0xb609[49]][_0xb609[82]](_0xb609[81]),priority:_0xafe2xc,IntervalId:_0xafe2x13[_0xb609[37]],interval:_0xafe2x13[_0xb609[39]]|| _0xb609[41],isApp:true,appType:_0xafe2x13[_0xb609[60]]|| null,answer:_0xafe2x13[_0xb609[62]]|| false},_0xafe2xd))}}};_0xafe2xc++;if(_0xafe2x13[_0xb609[32]][_0xb609[31]]()=== _0xb609[48]&& _0xafe2x8[_0xb609[52]]&& _0xafe2x8[_0xb609[20]]=== _0xb609[27]){_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[83],appdata:_0xb609[64],priority:_0xafe2xc},_0xafe2xd))}else {_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[43],appdata:_0xb609[84],priority:_0xafe2xc},_0xafe2xd))};_0xafe2xc++;_0xafe2x15[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[43],appdata:_0xafe2x13[_0xb609[32]]+ _0xb609[85],priority:_0xafe2xc},_0xafe2xd));_0xafe2xc++;_0xafe2xe[_0xb609[26]](VoiceExtension[_0xb609[36]](_0xafe2x15,{transaction:_0xafe2x7}))});_0xafe2x11[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[43],appdata:_0xafe2x8[_0xb609[20]]+ _0xb609[86],priority:_0xafe2xc},_0xafe2xd));_0xafe2xc++;if(_0xafe2x8[_0xb609[20]]=== _0xb609[87]|| _0xafe2x8[_0xb609[20]]=== _0xb609[27]){_0xafe2x11[_0xb609[26]](_[_0xb609[25]]({app:_0xb609[88],appdata:_0xb609[64],priority:_0xafe2xc},_0xafe2xd));_0xafe2xc++};_0xafe2xe[_0xb609[26]](VoiceExtension[_0xb609[36]](_0xafe2x11,{transaction:_0xafe2x7}));return _0xafe2xe})[_0xb609[18]]()}}}
\ No newline at end of file
-- 
1.7.1